From b578433e37c6857a6b4cd6c872bfea16d27660c6 Mon Sep 17 00:00:00 2001 From: Rian Drake Date: Thu, 15 Oct 2026 14:09:11 +1300 Subject: [PATCH] first --- .gitattributes | 2 + Brutal.Box2D/B2Joint.cs | 68 + Brutal.Box2D/Box2D.cs | 32 + Brutal.Box2D/Box2D.gen.cs | 2459 ++ Brutal.Box2D/Enumerations.gen.cs | 539 + .../BRUTAL-BOX2D-THIRD-PARTY-NOTICES.txt | 33 + Brutal.Box2D/Structs.cs | 239 + Brutal.Box2D/Structs.gen.cs | 4679 +++ Brutal.Box2D/Typedefs.gen.cs | 177 + Brutal.Collections/FreeList.cs | 145 + Brutal.Collections/Name/Name.cs | 102 + Brutal.Collections/Name/Namespace.cs | 56 + Brutal.Collections/NativeList/INativeList.cs | 69 + Brutal.Collections/NativeList/NativeList.cs | 380 + .../NativeList/NativeListEnumerator.cs | 53 + .../NativeList/NativeListOfT.cs | 178 + .../NativeList/NativeStrideList.cs | 253 + Brutal.Collections/Span/NativeStrideSpan.cs | 96 + Brutal.Collections/Span/ScratchSpan.cs | 53 + Brutal.Concurrency/Jobs/IJob.cs | 9 + Brutal.Concurrency/Jobs/JobRunner.cs | 371 + Brutal.Concurrency/Jobs/JobRunnerMetrics.cs | 22 + Brutal.Concurrency/Jobs/JobRunnerTimer.cs | 42 + Brutal.Concurrency/Jobs/JobScheduler.cs | 324 + Brutal.Concurrency/Jobs/JobState.cs | 25 + .../Statistics/MovingAverage.cs | 85 + Brutal.Concurrency/Statistics/Sampler.cs | 43 + Brutal.Core/Attributes.cs | 6 + Brutal.Core/Enums/BitMask.cs | 247 + Brutal.Core/Enums/Enum.Info.cs | 93 + Brutal.Core/Enums/EnumArithmetic.gen.cs | 380 + Brutal.Core/Enums/EnumExtensions.cs | 72 + Brutal.Core/Enums/EnumFormatting.cs | 129 + Brutal.Core/Enums/EnumMask.cs | 259 + Brutal.Core/Extensions/BitOperationsEx.cs | 27 + Brutal.Core/Extensions/SpanExtensions.cs | 35 + Brutal.Core/Extensions/Utf8Ex.cs | 29 + Brutal.Core/GlobalUsings.cs | 2 + Brutal.Core/Interfaces/INullable.cs | 27 + Brutal.Core/Interfaces/ISpanLike.cs | 22 + .../IAssociativeArithmeticOperators.cs | 32 + Brutal.Core/Platform.cs | 46 + Brutal.Core/Pointers/PointerExtensions.cs | 62 + Brutal.Core/Pointers/Ptr.cs | 103 + Brutal.Core/Pointers/PtrOfT.cs | 130 + Brutal.Core/Pointers/PtrPtr.cs | 90 + Brutal.Core/Pointers/PtrPtrOfT.cs | 84 + Brutal.Core/Types/Bool32.cs | 70 + Brutal.Core/Types/Bool8.cs | 70 + Brutal.Core/Types/BoolExtensions.cs | 138 + Brutal.Core/Types/ByteSize.cs | 550 + Brutal.Core/Types/ElementCount.cs | 74 + .../FmodCoreApi/Generated/Callbacks.gen.cs | 2172 ++ .../Enums/ChannelControlCallbackType.gen.cs | 23 + .../Enums/ChannelControlDspIndex.gen.cs | 21 + .../Generated/Enums/ChannelControlType.gen.cs | 21 + .../Generated/Enums/ChannelMask.gen.cs | 38 + .../Generated/Enums/ChannelOrder.gen.cs | 25 + .../Generated/Enums/CodecSeekMethod.gen.cs | 21 + .../Generated/Enums/DebugFlags.gen.cs | 30 + .../Generated/Enums/DebugMode.gen.cs | 21 + .../Generated/Enums/DriverState.gen.cs | 21 + .../Generated/Enums/DspCallbackType.gen.cs | 20 + .../Generated/Enums/DspChannelMix.gen.cs | 83 + .../Enums/DspChannelMixOutput.gen.cs | 27 + .../Generated/Enums/DspChorus.gen.cs | 21 + .../Generated/Enums/DspCompressor.gen.cs | 25 + .../Generated/Enums/DspConnectionType.gen.cs | 23 + .../Enums/DspConvolutionReverb.gen.cs | 22 + .../Generated/Enums/DspDelay.gen.cs | 35 + .../Generated/Enums/DspDistortion.gen.cs | 19 + .../Generated/Enums/DspEcho.gen.cs | 23 + .../Enums/DspEchoDelayChangeModeType.gen.cs | 21 + .../Generated/Enums/DspFader.gen.cs | 20 + .../FmodCoreApi/Generated/Enums/DspFft.gen.cs | 28 + .../Generated/Enums/DspFftDownmixType.gen.cs | 20 + .../Generated/Enums/DspFftWindowType.gen.cs | 24 + .../Generated/Enums/DspFlange.gen.cs | 21 + .../Generated/Enums/DspHighPass.gen.cs | 20 + .../Generated/Enums/DspHighPassSimple.gen.cs | 19 + .../Generated/Enums/DspItEcho.gen.cs | 23 + .../Generated/Enums/DspItLowPass.gen.cs | 20 + .../Generated/Enums/DspLimiter.gen.cs | 22 + .../Generated/Enums/DspLoudnessMeter.gen.cs | 21 + .../Enums/DspLoudnessMeterStateType.gen.cs | 23 + .../Generated/Enums/DspLowPass.gen.cs | 20 + .../Generated/Enums/DspLowPassSimple.gen.cs | 19 + .../Enums/DspMultibandDynamics.gen.cs | 46 + .../Enums/DspMultibandDynamicsModeType.gen.cs | 23 + .../Generated/Enums/DspMultibandEq.gen.cs | 38 + .../Enums/DspMultibandEqFilterType.gen.cs | 33 + .../Generated/Enums/DspNormalize.gen.cs | 21 + .../Generated/Enums/DspObjectPan.gen.cs | 29 + .../Generated/Enums/DspOscillator.gen.cs | 20 + .../FmodCoreApi/Generated/Enums/DspPan.gen.cs | 42 + .../Enums/DspPan2dStereoModeType.gen.cs | 20 + .../Enums/DspPan3dExtentModeType.gen.cs | 21 + .../Enums/DspPan3dRolloffType.gen.cs | 23 + .../Generated/Enums/DspPanModeType.gen.cs | 21 + .../Enums/DspPanSurroundFlags.gen.cs | 20 + .../Generated/Enums/DspParamEq.gen.cs | 21 + .../Enums/DspParameterDataType.gen.cs | 26 + .../Enums/DspParameterFloatMappingType.gen.cs | 21 + .../Generated/Enums/DspParameterType.gen.cs | 23 + .../Generated/Enums/DspPitchshift.gen.cs | 22 + .../Enums/DspProcessOperation.gen.cs | 20 + .../Generated/Enums/DspResampler.gen.cs | 24 + .../Generated/Enums/DspReturn.gen.cs | 20 + .../Generated/Enums/DspSend.gen.cs | 20 + .../Generated/Enums/DspSfxReverb.gen.cs | 31 + .../Generated/Enums/DspThreeEq.gen.cs | 24 + .../Enums/DspThreeEqCrossoverSlopeType.gen.cs | 21 + .../Generated/Enums/DspTransceiver.gen.cs | 22 + .../Enums/DspTransceiverSpeakerMode.gen.cs | 22 + .../Generated/Enums/DspTremolo.gen.cs | 26 + .../Generated/Enums/DspType.gen.cs | 53 + .../Enums/ErrorCallbackInstanceType.gen.cs | 37 + .../Generated/Enums/InitFlags.gen.cs | 33 + .../Generated/Enums/MemoryType.gen.cs | 27 + .../FmodCoreApi/Generated/Enums/Mode.gen.cs | 48 + .../Generated/Enums/OpenState.gen.cs | 27 + .../Generated/Enums/OutputMethod.gen.cs | 20 + .../Generated/Enums/OutputType.gen.cs | 41 + .../Generated/Enums/PluginType.gen.cs | 22 + .../Generated/Enums/PortIndex.gen.cs | 20 + .../Generated/Enums/PortType.gen.cs | 28 + .../FmodCoreApi/Generated/Enums/Result.gen.cs | 100 + .../Generated/Enums/SoundFormat.gen.cs | 26 + .../Generated/Enums/SoundGroupBehavior.gen.cs | 22 + .../Generated/Enums/SoundType.gen.cs | 44 + .../Generated/Enums/Speaker.gen.cs | 32 + .../Generated/Enums/SpeakerMode.gen.cs | 28 + .../Generated/Enums/SystemCallbackType.gen.cs | 36 + .../Generated/Enums/TagDataType.gen.cs | 26 + .../Generated/Enums/TagType.gen.cs | 31 + .../Generated/Enums/ThreadAffinity.gen.cs | 53 + .../Generated/Enums/ThreadPriority.gen.cs | 40 + .../Generated/Enums/ThreadStackSize.gen.cs | 32 + .../Generated/Enums/ThreadType.gen.cs | 32 + .../Generated/Enums/TimeUnit.gen.cs | 27 + .../FmodCoreApi/Generated/Handles.gen.cs | 105 + .../Generated/Libraries/Fmod.Channel.gen.cs | 1174 + .../Libraries/Fmod.ChannelGroup.gen.cs | 1059 + .../Generated/Libraries/Fmod.Dsp.gen.cs | 1179 + .../Libraries/Fmod.DspConnection.gen.cs | 272 + .../Libraries/Fmod.FmodSystem.gen.cs | 2959 ++ .../Generated/Libraries/Fmod.Geometry.gen.cs | 596 + .../Generated/Libraries/Fmod.Reverb3d.gen.cs | 265 + .../Generated/Libraries/Fmod.Sound.gen.cs | 1233 + .../Libraries/Fmod.SoundGroup.gen.cs | 456 + .../Generated/Libraries/Fmod.gen.cs | 111 + .../FmodCoreApi/Generated/PInvokes.gen.cs | 1791 ++ .../Generated/ResultExtensions.gen.cs | 133 + .../Generated/Structs/AdvancedSettings.gen.cs | 88 + .../Generated/Structs/AsyncReadInfo.gen.cs | 42 + .../Generated/Structs/Attributes3d.gen.cs | 30 + .../Generated/Structs/CodecDescription.gen.cs | 61 + .../Generated/Structs/CodecState.gen.cs | 30 + .../Structs/CodecStateFunctions.gen.cs | 43 + .../Generated/Structs/CodecWaveFormat.gen.cs | 61 + .../Generated/Structs/Complex.gen.cs | 24 + .../Generated/Structs/CpuUsage.gen.cs | 36 + .../Structs/CreateSoundExInfo.gen.cs | 126 + .../Generated/Structs/DspBufferArray.gen.cs | 33 + .../Structs/DspDataParameterInfo.gen.cs | 27 + .../Generated/Structs/DspDescription.gen.cs | 100 + .../Structs/DspLoudnessMeterInfoType.gen.cs | 42 + .../DspLoudnessMeterWeightingType.gen.cs | 21 + .../Generated/Structs/DspMeteringInfo.gen.cs | 30 + .../Structs/DspParameter3dAttributes.gen.cs | 24 + .../DspParameterAttenuationRange.gen.cs | 24 + .../Structs/DspParameterDescBool.gen.cs | 24 + .../Structs/DspParameterDescData.gen.cs | 21 + .../Structs/DspParameterDescFloat.gen.cs | 30 + .../Structs/DspParameterDescInt.gen.cs | 33 + .../DspParameterDynamicResponse.gen.cs | 24 + .../Structs/DspParameterFloatMapping.gen.cs | 24 + ...arameterFloatMappingPiecewiseLinear.gen.cs | 27 + .../Structs/DspParameterOverallGain.gen.cs | 24 + .../Structs/DspParameterSidechain.gen.cs | 21 + .../Generated/Structs/DspState.gen.cs | 42 + .../Structs/DspStateDftFunctions.gen.cs | 24 + .../Structs/DspStateFunctions.gen.cs | 55 + .../Structs/DspStatePanFunctions.gen.cs | 36 + .../Structs/ErrorCallbackInfo.gen.cs | 33 + .../Structs/OutputDescription.gen.cs | 82 + .../Structs/OutputObject3dInfo.gen.cs | 36 + .../Generated/Structs/OutputState.gen.cs | 40 + .../Generated/Structs/PluginList.gen.cs | 24 + .../Generated/Structs/ReverbProperties.gen.cs | 54 + .../FmodCoreApi/Generated/Structs/Tag.gen.cs | 36 + .../FmodCoreApi/Manual/CallbackExtensions.cs | 15 + Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs | 9 + .../FmodCoreApi/Manual/ResultExtensions.cs | 36 + .../Manual/Structs/AdvancedSettings.cs | 14 + .../Manual/Structs/CreateSoundExInfo.cs | 16 + .../Structs/DspParameter3dAttributesMulti.cs | 29 + .../Manual/Structs/DspParameterDesc.cs | 31 + .../Manual/Structs/DspParameterFft.cs | 16 + .../Manual/Structs/ReverbProperties.cs | 485 + .../FmodStudioApi/Generated/Callbacks.gen.cs | 139 + .../Enums/CommandCaptureFlags.gen.cs | 22 + .../Generated/Enums/CommandReplayFlags.gen.cs | 23 + .../Generated/Enums/EventCallbackType.gen.cs | 39 + .../Generated/Enums/EventProperty.gen.cs | 25 + .../Generated/Enums/InstanceType.gen.cs | 27 + .../Generated/Enums/LoadBankFlags.gen.cs | 23 + .../Generated/Enums/LoadMemoryMode.gen.cs | 20 + .../Generated/Enums/LoadingState.gen.cs | 23 + .../Generated/Enums/ParameterFlags.gen.cs | 24 + .../Generated/Enums/ParameterType.gen.cs | 29 + .../Generated/Enums/PlaybackState.gen.cs | 23 + .../Generated/Enums/StopMode.gen.cs | 20 + .../Generated/Enums/StudioInitFlags.gen.cs | 26 + .../Enums/StudioSystemCallbackType.gen.cs | 25 + .../Generated/Enums/UserPropertyType.gen.cs | 22 + .../FmodStudioApi/Generated/Handles.gen.cs | 68 + .../Libraries/FmodStudio.Bank.gen.cs | 549 + .../Generated/Libraries/FmodStudio.Bus.gen.cs | 429 + .../Libraries/FmodStudio.CommandReplay.gen.cs | 576 + .../FmodStudio.EventDescription.gen.cs | 1023 + .../Libraries/FmodStudio.EventInstance.gen.cs | 1123 + .../FmodStudio.FmodStudioSystem.gen.cs | 1813 ++ .../Generated/Libraries/FmodStudio.Vca.gen.cs | 121 + .../Generated/Libraries/FmodStudio.gen.cs | 66 + .../FmodStudioApi/Generated/PInvokes.gen.cs | 929 + .../Generated/Structs/BankInfo.gen.cs | 39 + .../Generated/Structs/BufferInfo.gen.cs | 33 + .../Generated/Structs/BufferUsage.gen.cs | 24 + .../Generated/Structs/CommandInfo.gen.cs | 42 + .../Generated/Structs/MemoryUsage.gen.cs | 27 + .../Structs/ParameterDescription.gen.cs | 42 + .../Generated/Structs/ParameterId.gen.cs | 24 + .../Structs/PluginInstanceProperties.gen.cs | 24 + .../Structs/ProgrammerSoundProperties.gen.cs | 27 + .../Generated/Structs/SoundInfo.gen.cs | 30 + .../Structs/StudioAdvancedSettings.gen.cs | 39 + .../Generated/Structs/StudioCpuUsage.gen.cs | 21 + .../Structs/TimelineBeatProperties.gen.cs | 36 + .../Structs/TimelineMarkerProperties.gen.cs | 24 + .../TimelineNestedBeatProperties.gen.cs | 24 + .../FmodStudioApi/Manual/FmodStudio.cs | 12 + .../Manual/Structs/UserProperty.cs | 50 + Brutal.Fmod/GlobalUsings.gen.cs | 8 + .../BRUTAL-FMOD-THIRD-PARTY-NOTICES.txt | 8 + .../BRUTAL-FREETYPE-THIRD-PARTY-NOTICES.txt | 364 + Brutal.FreeType/LICENSES/FTL.txt | 169 + Brutal.Glfw/CustomStringMarshaller.cs | 180 + .../Generated/Enums/GlfwButtonAction.gen.cs | 12 + .../Enums/GlfwContextAttribute.gen.cs | 21 + .../Generated/Enums/GlfwCursorMode.gen.cs | 14 + .../Generated/Enums/GlfwErrorCode.gen.cs | 97 + .../Generated/Enums/GlfwFocusEvent.gen.cs | 12 + .../Generated/Enums/GlfwGamepadAxis.gen.cs | 17 + .../Generated/Enums/GlfwGamepadButton.gen.cs | 30 + .../Generated/Enums/GlfwIconifyEvent.gen.cs | 12 + .../Generated/Enums/GlfwInitHint.gen.cs | 15 + .../Generated/Enums/GlfwInputMode.gen.cs | 16 + .../Generated/Enums/GlfwJoystickEvent.gen.cs | 12 + .../Generated/Enums/GlfwJoystickHat.gen.cs | 20 + Brutal.Glfw/Generated/Enums/GlfwKey.gen.cs | 132 + .../Generated/Enums/GlfwKeyAction.gen.cs | 13 + .../Generated/Enums/GlfwMaximizeEvent.gen.cs | 12 + .../Generated/Enums/GlfwModifier.gen.cs | 17 + .../Generated/Enums/GlfwMonitorEvent.gen.cs | 12 + .../Generated/Enums/GlfwMouseButton.gen.cs | 22 + .../Generated/Enums/GlfwPlatform.gen.cs | 38 + .../Generated/Enums/GlfwScrollFlags.gen.cs | 15 + .../Generated/Enums/GlfwStandardCursor.gen.cs | 23 + .../Enums/GlfwWindowAttribute.gen.cs | 22 + .../Generated/Enums/GlfwWindowHint.gen.cs | 56 + Brutal.Glfw/Generated/Glfw.Constants.gen.cs | 351 + Brutal.Glfw/Generated/Glfw.Delegates.gen.cs | 104 + Brutal.Glfw/Generated/Glfw.PInvoke.gen.cs | 1795 ++ Brutal.Glfw/Generated/Glfw.Structs.gen.cs | 59 + .../Generated/Libraries/Glfw.Context.gen.cs | 85 + .../Generated/Libraries/Glfw.Cursor.gen.cs | 31 + .../Libraries/Glfw.Initialization.gen.cs | 57 + .../Generated/Libraries/Glfw.Input.gen.cs | 458 + .../Generated/Libraries/Glfw.Monitor.gen.cs | 253 + .../Libraries/Glfw.Native.Cocoa.gen.cs | 89 + .../Libraries/Glfw.Native.Egl.gen.cs | 100 + .../Libraries/Glfw.Native.OSMesa.gen.cs | 78 + .../Libraries/Glfw.Native.Wayland.gen.cs | 70 + .../Libraries/Glfw.Native.Win32.gen.cs | 93 + .../Libraries/Glfw.Native.X11.gen.cs | 192 + .../Generated/Libraries/Glfw.Platform.gen.cs | 50 + .../Generated/Libraries/Glfw.Vulkan.gen.cs | 148 + .../Generated/Libraries/Glfw.Window.gen.cs | 587 + Brutal.Glfw/Glfw.cs | 60 + Brutal.Glfw/GlobalUsings.cs | 5 + .../BRUTAL-GLFW-THIRD-PARTY-NOTICES.txt | 198 + Brutal.Glfw/Manual/Glfw.PInvoke.cs | 100 + Brutal.Glfw/Manual/Libraries/Glfw.Context.cs | 60 + Brutal.Glfw/Manual/Libraries/Glfw.Cursor.cs | 120 + .../Manual/Libraries/Glfw.Initialization.cs | 264 + Brutal.Glfw/Manual/Libraries/Glfw.Input.cs | 239 + Brutal.Glfw/Manual/Libraries/Glfw.Monitor.cs | 228 + Brutal.Glfw/Manual/Libraries/Glfw.Vulkan.cs | 63 + Brutal.Glfw/Manual/Libraries/Glfw.Window.cs | 1721 + Brutal.Gli/Gli.cs | 379 + .../BRUTAL-GLI-THIRD-PARTY-NOTICES.txt | 131 + Brutal.Gli/Types/Format.cs | 255 + Brutal.Gli/Types/Swizzle.cs | 55 + Brutal.Gli/Types/Target.cs | 56 + Brutal.Gltf/GlobalUsings.cs | 1 + Brutal.Gltf/GltfApi/Accessor.cs | 55 + .../GltfApi/GeneratedSchema/Accessor.gen.cs | 383 + .../GeneratedSchema/AccessorSparse.gen.cs | 150 + .../AccessorSparseIndices.gen.cs | 157 + .../AccessorSparseValues.gen.cs | 125 + .../GltfApi/GeneratedSchema/Animation.gen.cs | 168 + .../GeneratedSchema/AnimationChannel.gen.cs | 123 + .../AnimationChannelTarget.gen.cs | 138 + .../GeneratedSchema/AnimationSampler.gen.cs | 158 + .../GltfApi/GeneratedSchema/Asset.gen.cs | 179 + .../GltfApi/GeneratedSchema/Buffer.gen.cs | 148 + .../GltfApi/GeneratedSchema/BufferView.gen.cs | 242 + .../GltfApi/GeneratedSchema/Camera.gen.cs | 183 + .../GeneratedSchema/CameraOrthographic.gen.cs | 156 + .../GeneratedSchema/CameraPerspective.gen.cs | 176 + ...mpressionGltfMeshPrimitiveExtension.gen.cs | 123 + .../GltfApi/GeneratedSchema/Extension.gen.cs | 22 + .../GltfApi/GeneratedSchema/Extras.gen.cs | 22 + .../GltfApi/GeneratedSchema/Gltf.gen.cs | 625 + .../GltfChildOfRootProperty.gen.cs | 99 + .../GeneratedSchema/GltfProperty.gen.cs | 73 + .../GltfApi/GeneratedSchema/Image.gen.cs | 181 + ...LightsPunctualGltfDocumentExtension.gen.cs | 108 + .../LightsPunctualLightProperties.gen.cs | 260 + .../LightsPunctualLightSpotProperties.gen.cs | 138 + .../GltfApi/GeneratedSchema/Material.gen.cs | 325 + .../MaterialNormalTextureInfo.gen.cs | 151 + .../MaterialOcclusionTextureInfo.gen.cs | 157 + .../MaterialPbrMetallicRoughness.gen.cs | 216 + ...ialsAnisotropyGltfMaterialExtension.gen.cs | 159 + ...rialsClearcoatGltfMaterialExtension.gen.cs | 217 + ...issiveStrengthGltfMaterialExtension.gen.cs | 104 + ...alsIridescenceGltfMaterialExtension.gen.cs | 246 + ...MaterialsSheenGltfMaterialExtension.gen.cs | 185 + ...erialsSpecularGltfMaterialExtension.gen.cs | 185 + ...lsTransmissionGltfMaterialExtension.gen.cs | 133 + ...MaterialsUnlitGltfMaterialExtension.gen.cs | 75 + ...aterialsVolumeGltfMaterialExtension.gen.cs | 185 + .../GltfApi/GeneratedSchema/Mesh.gen.cs | 167 + .../GeneratedSchema/MeshPrimitive.gen.cs | 239 + .../GltfApi/GeneratedSchema/Node.gen.cs | 363 + .../GltfApi/GeneratedSchema/Sampler.gen.cs | 260 + .../GltfApi/GeneratedSchema/Scene.gen.cs | 139 + .../GltfApi/GeneratedSchema/Skin.gen.cs | 198 + .../GltfApi/GeneratedSchema/Texture.gen.cs | 158 + .../TextureBasisuGltfTextureExtension.gen.cs | 104 + .../GeneratedSchema/TextureInfo.gen.cs | 125 + ...reTransformGltfTextureinfoExtension.gen.cs | 182 + Brutal.Gltf/GltfApi/Gltf.cs | 24 + Brutal.Gltf/GltfApi/GltfLoader.Transform.cs | 621 + Brutal.Gltf/GltfApi/GltfLoader.cs | 328 + Brutal.Gltf/GltfApi/GltfUtility.cs | 1074 + Brutal.Gltf/GltfApi/IExtensionGltfObject.cs | 28 + Brutal.Gltf/GltfApi/Image.cs | 20 + Brutal.Gltf/GltfApi/JsonHelpers.cs | 249 + Brutal.Gltf/GltfApi/Material.cs | 3 + Brutal.Gltf/GltfApi/Node.cs | 25 + .../BRUTAL-GLTF-THIRD-PARTY-NOTICES.txt | 139 + .../ConsoleWindow/ConsoleColor.cs | 78 + .../ConsoleWindow/ConsoleLogEntry.cs | 17 + .../ConsoleWindow/ConsoleWindow.cs | 889 + .../ConsoleWindow/TableString.cs | 76 + .../Terminal/TerminalCallbackAttribute.cs | 53 + .../ConsoleWindow/Terminal/TerminalCommand.cs | 197 + .../Terminal/TerminalInterface.cs | 272 + .../Terminal/TerminalInterfaceException.cs | 14 + .../ConsoleWindow/Terminal/TerminalParser.cs | 90 + Brutal.ImGui.Abstractions/GlobalUsings.cs | 3 + Brutal.ImGui.Abstractions/ImGuiUtils.cs | 32 + .../Interfaces/IPlatformBackend.cs | 6 + .../Interfaces/IRendererBackend.cs | 6 + .../GlfwBackend.GlfwInterop.cs | 18 + .../GlfwBackend.WindowsNative.cs | 136 + .../PlatformBackends/GlfwBackend.cs | 1227 + .../RendererBackends/OpenGlBackend.Helpers.cs | 16 + .../RendererBackends/OpenGlBackend.cs | 605 + .../RendererBackends/VulkanBackend.Helpers.cs | 424 + .../RendererBackends/VulkanBackend.cs | 1590 + .../ImGui.Compatibility.Internals.cs | 9 + .../ImGui.Compatibility.Obsolete.cs | 32 + .../Compatibility/ImGui.Compatibility.cs | 47 + Brutal.ImGui.Extensions/GlobalUsings.cs | 2 + Brutal.ImGui.Extensions/ImGui.extensions.cs | 315 + .../Enums/ImGuiFreeTypeLoaderFlags.gen.cs | 265 + .../Generated/Functions/ImGuiFreeType.gen.cs | 94 + .../PInvoke/DebugEditFontLoaderFlags.gen.cs | 28 + .../Generated/PInvoke/GetFontLoader.gen.cs | 32 + .../PInvoke/SetAllocatorFunctions.gen.cs | 29 + Brutal.ImGui.FreeType/GlobalUsings.cs | 3 + Brutal.ImGui/Core/VaList.cs | 245 + .../Delegates/ImGuiContextHookCallback.gen.cs | 18 + .../Delegates/ImGuiErrorCallback.gen.cs | 26 + .../Enums/ImGuiActivateFlags.gen.cs | 87 + .../Generated-Internal/Enums/ImGuiAxis.gen.cs | 63 + .../Enums/ImGuiButtonFlagsPrivate.gen.cs | 435 + .../Enums/ImGuiComboFlagsPrivate.gen.cs | 204 + .../Enums/ImGuiContextHookType.gen.cs | 89 + .../Enums/ImGuiDataAuthority.gen.cs | 63 + .../Enums/ImGuiDataTypePrivate.gen.cs | 267 + .../Enums/ImGuiDebugLogFlags.gen.cs | 253 + .../Enums/ImGuiDockNodeFlagsPrivate.gen.cs | 498 + .../Enums/ImGuiDockNodeState.gen.cs | 52 + .../Enums/ImGuiFocusRequestFlags.gen.cs | 78 + .../Enums/ImGuiHoveredFlagsPrivate.gen.cs | 494 + .../Enums/ImGuiInputEventType.gen.cs | 97 + .../Enums/ImGuiInputFlagsPrivate.gen.cs | 624 + .../Enums/ImGuiInputSource.gen.cs | 64 + .../Enums/ImGuiInputTextFlagsPrivate.gen.cs | 506 + .../Enums/ImGuiItemFlagsPrivate.gen.cs | 358 + .../Enums/ImGuiItemStatusFlags.gen.cs | 240 + .../Enums/ImGuiLayoutType.gen.cs | 52 + .../Enums/ImGuiLocKey.gen.cs | 235 + .../Enums/ImGuiLogFlags.gen.cs | 82 + .../Enums/ImGuiNavLayer.gen.cs | 49 + .../Enums/ImGuiNavMoveFlags.gen.cs | 228 + .../Enums/ImGuiNavRenderCursorFlags.gen.cs | 60 + .../Enums/ImGuiNextItemDataFlags.gen.cs | 71 + .../Enums/ImGuiNextWindowDataFlags.gen.cs | 152 + .../Enums/ImGuiOldColumnFlags.gen.cs | 122 + .../Enums/ImGuiPlotType.gen.cs | 34 + .../Enums/ImGuiPopupPositionPolicy.gen.cs | 43 + .../Enums/ImGuiScrollFlags.gen.cs | 188 + .../Enums/ImGuiSelectableFlagsPrivate.gen.cs | 274 + .../Enums/ImGuiSeparatorFlags.gen.cs | 59 + .../Enums/ImGuiSliderFlagsPrivate.gen.cs | 247 + .../Enums/ImGuiTabBarFlagsPrivate.gen.cs | 287 + .../Enums/ImGuiTabItemFlagsPrivate.gen.cs | 275 + .../Enums/ImGuiTextFlags.gen.cs | 35 + .../Enums/ImGuiTooltipFlags.gen.cs | 38 + .../Enums/ImGuiTreeNodeFlagsPrivate.gen.cs | 484 + .../Enums/ImGuiTypingSelectFlags.gen.cs | 71 + .../Enums/ImGuiWindowDockStyleCol.gen.cs | 177 + .../Enums/ImGuiWindowRefreshFlags.gen.cs | 63 + .../Functions/ImBitVector.gen.cs | 88 + .../Functions/ImDrawListSharedData.gen.cs | 21 + .../Generated-Internal/Functions/ImGui.gen.cs | 11009 +++++++ .../Functions/ImGuiDockNode.gen.cs | 135 + .../ImGuiInputTextDeactivatedState.gen.cs | 19 + .../Functions/ImGuiInputTextState.gen.cs | 259 + .../Functions/ImGuiKeyRoutingTable.gen.cs | 19 + .../Functions/ImGuiListClipperData.gen.cs | 19 + .../Functions/ImGuiListClipperRange.gen.cs | 37 + .../Functions/ImGuiMenuColumns.gen.cs | 55 + .../Functions/ImGuiMultiSelectTempData.gen.cs | 32 + .../Functions/ImGuiNavItemData.gen.cs | 19 + .../Functions/ImGuiNextItemData.gen.cs | 22 + .../Functions/ImGuiNextWindowData.gen.cs | 19 + .../Functions/ImGuiStyleVarInfo.gen.cs | 19 + .../Functions/ImGuiTableSettings.gen.cs | 19 + .../Functions/ImGuiTextIndex.gen.cs | 59 + .../Functions/ImGuiTypingSelectState.gen.cs | 22 + .../Functions/ImGuiViewportP.gen.cs | 135 + .../Functions/ImGuiWindow.gen.cs | 139 + .../Functions/ImGuiWindowSettings.gen.cs | 19 + .../Generated-Internal/InlineArrays.gen.cs | 140 + .../PInvoke/ActivateItemByID_internal.gen.cs | 32 + .../PInvoke/AddContextHook_internal.gen.cs | 29 + .../AddDrawListToDrawDataEx_internal.gen.cs | 35 + .../AddSettingsHandler_internal.gen.cs | 26 + .../PInvoke/ArrowButtonEx_internal.gen.cs | 32 + .../PInvoke/BeginBoxSelect_internal.gen.cs | 32 + .../PInvoke/BeginChildEx_internal.gen.cs | 33 + .../PInvoke/BeginColumns_internal.gen.cs | 29 + .../PInvoke/BeginComboPopup_internal.gen.cs | 30 + .../PInvoke/BeginComboPreview_internal.gen.cs | 30 + ...inDisabledOverrideReenable_internal.gen.cs | 31 + ...eginDockableDragDropSource_internal.gen.cs | 27 + ...eginDockableDragDropTarget_internal.gen.cs | 27 + .../PInvoke/BeginDocked_internal.gen.cs | 27 + .../BeginDragDropTargetCustom_internal.gen.cs | 26 + .../PInvoke/BeginErrorTooltip_internal.gen.cs | 30 + .../PInvoke/BeginMenuEx_internal.gen.cs | 26 + .../PInvoke/BeginPopupEx_internal.gen.cs | 29 + .../PInvoke/BeginPopupMenuEx_internal.gen.cs | 30 + .../PInvoke/BeginTabBarEx_internal.gen.cs | 30 + .../PInvoke/BeginTableEx_internal.gen.cs | 34 + .../PInvoke/BeginTooltipEx_internal.gen.cs | 29 + .../BeginTooltipHidden_internal.gen.cs | 26 + .../BeginViewportSideBar_internal.gen.cs | 38 + .../BringWindowToDisplayBack_internal.gen.cs | 26 + ...BringWindowToDisplayBehind_internal.gen.cs | 29 + .../BringWindowToDisplayFront_internal.gen.cs | 29 + .../BringWindowToFocusFront_internal.gen.cs | 26 + .../PInvoke/ButtonBehavior_internal.gen.cs | 43 + .../PInvoke/ButtonEx_internal.gen.cs | 27 + .../PInvoke/CalcItemSize_internal.gen.cs | 32 + ...RoundingFlagsForRectInRect_internal.gen.cs | 31 + .../CalcTypematicRepeatAmount_internal.gen.cs | 34 + .../CalcWindowNextAutoFitSize_internal.gen.cs | 30 + .../CalcWrapWidthForPos_internal.gen.cs | 26 + .../PInvoke/CallContextHooks_internal.gen.cs | 30 + .../PInvoke/CheckboxFlags_internal.gen.cs | 43 + .../PInvoke/ClearActiveID_internal.gen.cs | 26 + .../PInvoke/ClearDragDrop_internal.gen.cs | 26 + .../PInvoke/ClearIniSettings_internal.gen.cs | 29 + .../ClearWindowSettings_internal.gen.cs | 30 + .../PInvoke/CloseButton_internal.gen.cs | 29 + .../PInvoke/ClosePopupToLevel_internal.gen.cs | 29 + .../ClosePopupsExceptModals_internal.gen.cs | 26 + .../ClosePopupsOverWindow_internal.gen.cs | 34 + .../PInvoke/CollapseButton_internal.gen.cs | 29 + .../ColorEditOptionsPopup_internal.gen.cs | 26 + .../ColorPickerOptionsPopup_internal.gen.cs | 26 + .../PInvoke/ColorTooltip_internal.gen.cs | 29 + .../ConvertSingleModFlagToKey_internal.gen.cs | 25 + .../CreateNewWindowSettings_internal.gen.cs | 26 + .../DataTypeApplyFromText_internal.gen.cs | 37 + .../PInvoke/DataTypeApplyOp_internal.gen.cs | 33 + .../PInvoke/DataTypeClamp_internal.gen.cs | 32 + .../PInvoke/DataTypeCompare_internal.gen.cs | 26 + .../DataTypeFormatString_internal.gen.cs | 33 + .../PInvoke/DataTypeGetInfo_internal.gen.cs | 26 + .../PInvoke/DataTypeIsZero_internal.gen.cs | 26 + .../PInvoke/DebugAllocHook_internal.gen.cs | 38 + .../DebugBreakButtonTooltip_internal.gen.cs | 29 + .../PInvoke/DebugBreakButton_internal.gen.cs | 30 + .../DebugBreakClearData_internal.gen.cs | 26 + .../DebugDrawCursorPos_internal.gen.cs | 29 + .../PInvoke/DebugDrawItemRect_internal.gen.cs | 29 + .../DebugDrawLineExtents_internal.gen.cs | 29 + .../PInvoke/DebugHookIdInfo_internal.gen.cs | 35 + .../DebugLocateItemOnHover_internal.gen.cs | 32 + ...ateItemResolveWithLastItem_internal.gen.cs | 26 + .../PInvoke/DebugLocateItem_internal.gen.cs | 29 + .../PInvoke/DebugNodeColumns_internal.gen.cs | 29 + .../PInvoke/DebugNodeDockNode_internal.gen.cs | 29 + ...wCmdShowMeshAndBoundingBox_internal.gen.cs | 36 + .../PInvoke/DebugNodeDrawList_internal.gen.cs | 36 + .../DebugNodeFontGlyph_internal.gen.cs | 26 + ...gNodeFontGlyphesForSrcMask_internal.gen.cs | 30 + .../PInvoke/DebugNodeFont_internal.gen.cs | 29 + .../DebugNodeInputTextState_internal.gen.cs | 26 + .../DebugNodeMultiSelectState_internal.gen.cs | 26 + .../DebugNodePlatformMonitor_internal.gen.cs | 30 + .../PInvoke/DebugNodeStorage_internal.gen.cs | 29 + .../PInvoke/DebugNodeTabBar_internal.gen.cs | 29 + .../DebugNodeTableSettings_internal.gen.cs | 26 + .../PInvoke/DebugNodeTable_internal.gen.cs | 26 + .../PInvoke/DebugNodeTexture_internal.gen.cs | 34 + ...DebugNodeTypingSelectState_internal.gen.cs | 26 + .../PInvoke/DebugNodeViewport_internal.gen.cs | 26 + .../DebugNodeWindowSettings_internal.gen.cs | 26 + .../PInvoke/DebugNodeWindow_internal.gen.cs | 26 + ...dowsListByBeginStackParent_internal.gen.cs | 34 + .../DebugNodeWindowsList_internal.gen.cs | 26 + ...DebugRenderKeyboardPreview_internal.gen.cs | 29 + ...bugRenderViewportThumbnail_internal.gen.cs | 31 + ...tUnformattedWithLocateItem_internal.gen.cs | 29 + .../DestroyPlatformWindow_internal.gen.cs | 26 + .../DockBuilderAddNode_internal.gen.cs | 43 + .../DockBuilderCopyDockSpace_internal.gen.cs | 43 + .../DockBuilderCopyNode_internal.gen.cs | 39 + ...kBuilderCopyWindowSettings_internal.gen.cs | 34 + .../DockBuilderDockWindow_internal.gen.cs | 34 + .../PInvoke/DockBuilderFinish_internal.gen.cs | 37 + .../DockBuilderGetCentralNode_internal.gen.cs | 32 + .../DockBuilderGetNode_internal.gen.cs | 34 + ...uilderRemoveNodeChildNodes_internal.gen.cs | 41 + ...derRemoveNodeDockedWindows_internal.gen.cs | 37 + .../DockBuilderRemoveNode_internal.gen.cs | 37 + .../DockBuilderSetNodePos_internal.gen.cs | 34 + .../DockBuilderSetNodeSize_internal.gen.cs | 34 + .../DockBuilderSplitNode_internal.gen.cs | 49 + ...ntextCalcDropPosForDocking_internal.gen.cs | 39 + .../DockContextClearNodes_internal.gen.cs | 34 + .../DockContextEndFrame_internal.gen.cs | 27 + .../DockContextFindNodeByID_internal.gen.cs | 27 + .../DockContextGenNodeID_internal.gen.cs | 27 + .../DockContextInitialize_internal.gen.cs | 27 + ...ntextNewFrameUpdateDocking_internal.gen.cs | 30 + ...extNewFrameUpdateUndocking_internal.gen.cs | 30 + ...ckContextProcessUndockNode_internal.gen.cs | 27 + ...ContextProcessUndockWindow_internal.gen.cs | 32 + .../DockContextQueueDock_internal.gen.cs | 36 + ...DockContextQueueUndockNode_internal.gen.cs | 27 + ...ckContextQueueUndockWindow_internal.gen.cs | 27 + .../DockContextRebuildNodes_internal.gen.cs | 31 + .../DockContextShutdown_internal.gen.cs | 27 + .../DockNodeBeginAmendTabBar_internal.gen.cs | 30 + .../DockNodeEndAmendTabBar_internal.gen.cs | 27 + .../PInvoke/DockNodeGetDepth_internal.gen.cs | 25 + .../DockNodeGetRootNode_internal.gen.cs | 25 + ...kNodeGetWindowMenuButtonId_internal.gen.cs | 25 + .../DockNodeIsInHierarchyOf_internal.gen.cs | 25 + .../DockNodeWindowMenuHandler_internal.gen.cs | 39 + .../PInvoke/DragBehavior_internal.gen.cs | 36 + .../PInvoke/EndBoxSelect_internal.gen.cs | 26 + .../PInvoke/EndColumns_internal.gen.cs | 29 + .../PInvoke/EndComboPreview_internal.gen.cs | 26 + ...ndDisabledOverrideReenable_internal.gen.cs | 26 + .../PInvoke/EndErrorTooltip_internal.gen.cs | 26 + ...dFrameFinalizeErrorTooltip_internal.gen.cs | 26 + ...osToExtendParentBoundaries_internal.gen.cs | 36 + .../PInvoke/ErrorLog_internal.gen.cs | 26 + .../ErrorRecoveryStoreState_internal.gen.cs | 30 + ...rRecoveryTryToRecoverState_internal.gen.cs | 31 + ...eryTryToRecoverWindowState_internal.gen.cs | 33 + ...indBestWindowPosForPopupEx_internal.gen.cs | 41 + .../FindBestWindowPosForPopup_internal.gen.cs | 26 + .../PInvoke/FindBlockingModal_internal.gen.cs | 41 + ...ibleWindowWithinBeginStack_internal.gen.cs | 28 + ...ortFromPlatformWindowStack_internal.gen.cs | 34 + .../FindHoveredWindowEx_internal.gen.cs | 40 + .../FindOrCreateColumns_internal.gen.cs | 26 + .../FindRenderedTextEnd_internal.gen.cs | 31 + .../FindSettingsHandler_internal.gen.cs | 26 + .../PInvoke/FindWindowByID_internal.gen.cs | 30 + .../PInvoke/FindWindowByName_internal.gen.cs | 30 + .../FindWindowDisplayIndex_internal.gen.cs | 26 + .../FindWindowSettingsByID_internal.gen.cs | 30 + ...FindWindowSettingsByWindow_internal.gen.cs | 29 + .../PInvoke/FixupKeyChord_internal.gen.cs | 27 + .../PInvoke/FocusItem_internal.gen.cs | 34 + ...FocusTopMostWindowUnderOne_internal.gen.cs | 32 + .../PInvoke/FocusWindow_internal.gen.cs | 29 + ...wakeTransientWindowBuffers_internal.gen.cs | 26 + ...ompactTransientMiscBuffers_internal.gen.cs | 26 + ...pactTransientWindowBuffers_internal.gen.cs | 32 + .../PInvoke/GetActiveID_internal.gen.cs | 24 + .../PInvoke/GetBoxSelectState_internal.gen.cs | 24 + .../GetColumnNormFromOffset_internal.gen.cs | 26 + .../GetColumnOffsetFromNorm_internal.gen.cs | 29 + .../PInvoke/GetColumnsID_internal.gen.cs | 26 + .../GetCurrentFocusScope_internal.gen.cs | 34 + .../PInvoke/GetCurrentTabBar_internal.gen.cs | 24 + .../PInvoke/GetCurrentTable_internal.gen.cs | 24 + .../GetCurrentWindowRead_internal.gen.cs | 28 + .../PInvoke/GetCurrentWindow_internal.gen.cs | 28 + .../PInvoke/GetDefaultFont_internal.gen.cs | 26 + .../PInvoke/GetFocusID_internal.gen.cs | 24 + .../GetFontRasterizerDensity_internal.gen.cs | 24 + .../GetForegroundDrawList_internal.gen.cs | 24 + .../PInvoke/GetHoveredID_internal.gen.cs | 26 + .../PInvoke/GetIDWithSeed_internal.gen.cs | 52 + .../PInvoke/GetIO_internal.gen.cs | 34 + .../PInvoke/GetInputTextState_internal.gen.cs | 27 + .../PInvoke/GetItemFlags_internal.gen.cs | 24 + .../GetItemStatusFlags_internal.gen.cs | 24 + .../PInvoke/GetKeyChordName_internal.gen.cs | 27 + .../PInvoke/GetKeyData_internal.gen.cs | 31 + .../PInvoke/GetKeyMagnitude2d_internal.gen.cs | 33 + .../PInvoke/GetKeyOwnerData_internal.gen.cs | 34 + .../PInvoke/GetKeyOwner_internal.gen.cs | 36 + .../GetMultiSelectState_internal.gen.cs | 24 + .../GetNavTweakPressedAmount_internal.gen.cs | 21 + .../PInvoke/GetPlatformIO_internal.gen.cs | 34 + .../GetPopupAllowedExtentRect_internal.gen.cs | 29 + .../GetRoundedFontSize_internal.gen.cs | 24 + .../GetShortcutRoutingData_internal.gen.cs | 39 + .../PInvoke/GetStyleVarInfo_internal.gen.cs | 26 + ...opMostAndVisiblePopupModal_internal.gen.cs | 29 + .../GetTopMostPopupModal_internal.gen.cs | 29 + .../GetTypematicRepeatRate_internal.gen.cs | 25 + .../GetTypingSelectRequest_internal.gen.cs | 40 + ...GetViewportPlatformMonitor_internal.gen.cs | 29 + ...tWindowAlwaysWantOwnTabBar_internal.gen.cs | 27 + .../PInvoke/GetWindowDockNode_internal.gen.cs | 25 + .../GetWindowResizeBorderID_internal.gen.cs | 29 + .../GetWindowResizeCornerID_internal.gen.cs | 32 + .../GetWindowScrollbarID_internal.gen.cs | 26 + .../GetWindowScrollbarRect_internal.gen.cs | 30 + .../PInvoke/ImBitVector_internal.gen.cs | 89 + .../ImDrawListSharedData_internal.gen.cs | 24 + .../PInvoke/ImGuiDockNode_internal.gen.cs | 138 + ...iInputTextDeactivatedState_internal.gen.cs | 21 + .../ImGuiInputTextState_internal.gen.cs | 271 + .../ImGuiKeyRoutingTable_internal.gen.cs | 19 + .../ImGuiListClipperData_internal.gen.cs | 22 + .../ImGuiListClipperRange_internal.gen.cs | 39 + .../PInvoke/ImGuiMenuColumns_internal.gen.cs | 63 + .../ImGuiMultiSelectTempData_internal.gen.cs | 32 + .../PInvoke/ImGuiNavItemData_internal.gen.cs | 19 + .../PInvoke/ImGuiNextItemData_internal.gen.cs | 22 + .../ImGuiNextWindowData_internal.gen.cs | 19 + .../PInvoke/ImGuiStyleVarInfo_internal.gen.cs | 22 + .../ImGuiTableSettings_internal.gen.cs | 21 + .../PInvoke/ImGuiTextIndex_internal.gen.cs | 74 + .../ImGuiTypingSelectState_internal.gen.cs | 22 + .../PInvoke/ImGuiViewportP_internal.gen.cs | 125 + .../ImGuiWindowSettings_internal.gen.cs | 19 + .../PInvoke/ImGuiWindow_internal.gen.cs | 132 + .../PInvoke/ImRect_internal.gen.cs | 278 + .../PInvoke/ImageButtonEx_internal.gen.cs | 36 + .../PInvoke/Initialize_internal.gen.cs | 26 + .../InputTextDeactivateHook_internal.gen.cs | 32 + .../PInvoke/InputTextEx_internal.gen.cs | 46 + .../IsActiveIdUsingNavDir_internal.gen.cs | 19 + .../PInvoke/IsAliasKey_internal.gen.cs | 25 + .../PInvoke/IsClippedEx_internal.gen.cs | 30 + .../PInvoke/IsDragDropActive_internal.gen.cs | 26 + ...agDropPayloadBeingAccepted_internal.gen.cs | 26 + .../PInvoke/IsGamepadKey_internal.gen.cs | 25 + .../IsItemActiveAsInputText_internal.gen.cs | 28 + .../PInvoke/IsKeyChordPressed_internal.gen.cs | 38 + .../PInvoke/IsKeyDown_internal.gen.cs | 31 + .../PInvoke/IsKeyPressed_internal.gen.cs | 39 + .../PInvoke/IsKeyReleased_internal.gen.cs | 31 + .../PInvoke/IsKeyboardKey_internal.gen.cs | 25 + .../PInvoke/IsLRModKey_internal.gen.cs | 25 + .../PInvoke/IsLegacyKey_internal.gen.cs | 25 + .../PInvoke/IsMouseClicked_internal.gen.cs | 35 + .../IsMouseDoubleClicked_internal.gen.cs | 31 + .../PInvoke/IsMouseDown_internal.gen.cs | 31 + .../IsMouseDragPastThreshold_internal.gen.cs | 30 + .../PInvoke/IsMouseKey_internal.gen.cs | 25 + .../PInvoke/IsMouseReleased_internal.gen.cs | 31 + .../PInvoke/IsNamedKeyOrMod_internal.gen.cs | 25 + .../PInvoke/IsNamedKey_internal.gen.cs | 25 + .../PInvoke/IsPopupOpen_internal.gen.cs | 29 + .../PInvoke/IsWindowAbove_internal.gen.cs | 33 + .../PInvoke/IsWindowChildOf_internal.gen.cs | 36 + .../IsWindowContentHoverable_internal.gen.cs | 29 + .../IsWindowNavFocusable_internal.gen.cs | 35 + ...IsWindowWithinBeginStackOf_internal.gen.cs | 33 + .../PInvoke/ItemAdd_internal.gen.cs | 32 + .../PInvoke/ItemHoverable_internal.gen.cs | 35 + .../PInvoke/ItemSize_internal.gen.cs | 44 + .../PInvoke/KeepAliveID_internal.gen.cs | 30 + .../PInvoke/LocalizeGetMsg_internal.gen.cs | 24 + .../LocalizeRegisterEntries_internal.gen.cs | 26 + .../PInvoke/LogBegin_internal.gen.cs | 32 + .../PInvoke/LogRenderedText_internal.gen.cs | 31 + .../LogSetNextTextDecoration_internal.gen.cs | 30 + .../PInvoke/LogToBuffer_internal.gen.cs | 29 + .../MarkIniSettingsDirty_internal.gen.cs | 43 + .../PInvoke/MarkItemEdited_internal.gen.cs | 29 + .../PInvoke/MenuItemEx_internal.gen.cs | 33 + .../PInvoke/MouseButtonToKey_internal.gen.cs | 19 + .../MultiSelectAddSetAll_internal.gen.cs | 26 + .../MultiSelectAddSetRange_internal.gen.cs | 33 + .../MultiSelectItemFooter_internal.gen.cs | 39 + .../MultiSelectItemHeader_internal.gen.cs | 36 + ...avClearPreferredPosForAxis_internal.gen.cs | 26 + .../NavHighlightActivated_internal.gen.cs | 26 + .../NavInitRequestApplyResult_internal.gen.cs | 26 + .../PInvoke/NavInitWindow_internal.gen.cs | 29 + .../NavMoveRequestApplyResult_internal.gen.cs | 29 + ...vMoveRequestButNoResultYet_internal.gen.cs | 26 + .../NavMoveRequestCancel_internal.gen.cs | 26 + .../NavMoveRequestForward_internal.gen.cs | 35 + ...RequestResolveWithLastItem_internal.gen.cs | 26 + ...estResolveWithPastTreeNode_internal.gen.cs | 33 + .../NavMoveRequestSubmit_internal.gen.cs | 35 + .../NavMoveRequestTryWrapping_internal.gen.cs | 33 + ...entWindowIsScrollPushableX_internal.gen.cs | 30 + .../PInvoke/OpenPopupEx_internal.gen.cs | 32 + .../PInvoke/PlotEx_internal.gen.cs | 38 + .../PopColumnsBackground_internal.gen.cs | 26 + .../PInvoke/PopFocusScope_internal.gen.cs | 33 + .../PInvoke/PopPasswordFont_internal.gen.cs | 26 + .../PushColumnClipRect_internal.gen.cs | 26 + .../PushColumnsBackground_internal.gen.cs | 30 + .../PInvoke/PushFocusScope_internal.gen.cs | 33 + .../PushMultiItemsWidths_internal.gen.cs | 26 + .../PInvoke/PushOverrideID_internal.gen.cs | 32 + .../PInvoke/PushPasswordFont_internal.gen.cs | 26 + .../PInvoke/RegisterFontAtlas_internal.gen.cs | 26 + .../RegisterUserTexture_internal.gen.cs | 32 + .../PInvoke/RemoveContextHook_internal.gen.cs | 29 + .../RemoveSettingsHandler_internal.gen.cs | 26 + .../RenderArrowDockMenu_internal.gen.cs | 35 + .../RenderArrowPointingAt_internal.gen.cs | 37 + .../PInvoke/RenderArrow_internal.gen.cs | 37 + .../PInvoke/RenderBullet_internal.gen.cs | 26 + .../PInvoke/RenderCheckMark_internal.gen.cs | 31 + ...rRectWithAlphaCheckerboard_internal.gen.cs | 44 + .../RenderDragDropTargetRect_internal.gen.cs | 29 + .../PInvoke/RenderFrameBorder_internal.gen.cs | 28 + .../PInvoke/RenderFrame_internal.gen.cs | 38 + .../PInvoke/RenderMouseCursor_internal.gen.cs | 36 + .../PInvoke/RenderNavCursor_internal.gen.cs | 36 + .../RenderRectFilledRangeH_internal.gen.cs | 37 + .../RenderRectFilledWithHole_internal.gen.cs | 33 + .../RenderTextClippedEx_internal.gen.cs | 45 + .../PInvoke/RenderTextClipped_internal.gen.cs | 37 + .../RenderTextEllipsis_internal.gen.cs | 43 + .../PInvoke/RenderTextWrapped_internal.gen.cs | 33 + .../PInvoke/RenderText_internal.gen.cs | 38 + .../ScaleWindowsInViewport_internal.gen.cs | 29 + .../ScrollToBringRectIntoView_internal.gen.cs | 24 + .../PInvoke/ScrollToItem_internal.gen.cs | 26 + .../PInvoke/ScrollToRectEx_internal.gen.cs | 34 + .../PInvoke/ScrollToRect_internal.gen.cs | 30 + .../PInvoke/ScrollbarEx_internal.gen.cs | 43 + .../PInvoke/Scrollbar_internal.gen.cs | 26 + .../PInvoke/SeparatorEx_internal.gen.cs | 31 + .../PInvoke/SeparatorTextEx_internal.gen.cs | 32 + .../PInvoke/SetActiveID_internal.gen.cs | 26 + ...tiveIdUsingAllKeyboardKeys_internal.gen.cs | 27 + .../PInvoke/SetCurrentFont_internal.gen.cs | 41 + .../SetCurrentViewport_internal.gen.cs | 26 + .../PInvoke/SetFocusID_internal.gen.cs | 26 + .../SetFontRasterizerDensity_internal.gen.cs | 30 + .../PInvoke/SetHoveredID_internal.gen.cs | 26 + .../PInvoke/SetItemKeyOwner_internal.gen.cs | 48 + .../PInvoke/SetKeyOwner_internal.gen.cs | 43 + .../SetKeyOwnersForKeyChord_internal.gen.cs | 43 + .../PInvoke/SetLastItemData_internal.gen.cs | 36 + ...tNavCursorVisibleAfterMove_internal.gen.cs | 29 + .../PInvoke/SetNavFocusScope_internal.gen.cs | 26 + .../PInvoke/SetNavID_internal.gen.cs | 32 + .../PInvoke/SetNavWindow_internal.gen.cs | 26 + .../PInvoke/SetNextItemRefVal_internal.gen.cs | 26 + ...SetNextWindowRefreshPolicy_internal.gen.cs | 29 + .../PInvoke/SetScrollFromPosX_internal.gen.cs | 42 + .../PInvoke/SetScrollFromPosY_internal.gen.cs | 30 + .../PInvoke/SetScrollX_internal.gen.cs | 26 + .../PInvoke/SetScrollY_internal.gen.cs | 26 + .../SetShortcutRouting_internal.gen.cs | 53 + ...owClipRectBeforeSetChannel_internal.gen.cs | 35 + .../SetWindowCollapsed_internal.gen.cs | 34 + .../PInvoke/SetWindowDock_internal.gen.cs | 30 + ...ndSkipItemsForCurrentFrame_internal.gen.cs | 30 + .../SetWindowHitTestHole_internal.gen.cs | 31 + ...wParentWindowForFocusRoute_internal.gen.cs | 35 + .../PInvoke/SetWindowPos_internal.gen.cs | 30 + .../PInvoke/SetWindowSize_internal.gen.cs | 30 + .../PInvoke/SetWindowViewport_internal.gen.cs | 26 + ...nearColorGradientKeepAlpha_internal.gen.cs | 38 + .../ShadeVertsLinearUV_internal.gen.cs | 39 + .../ShadeVertsTransformPos_internal.gen.cs | 35 + .../PInvoke/Shortcut_internal.gen.cs | 43 + .../PInvoke/ShowFontAtlas_internal.gen.cs | 29 + .../PInvoke/ShrinkWidths_internal.gen.cs | 36 + .../PInvoke/Shutdown_internal.gen.cs | 33 + .../PInvoke/SliderBehavior_internal.gen.cs | 42 + .../PInvoke/SplitterBehavior_internal.gen.cs | 42 + ...artMouseMovingWindowOrNode_internal.gen.cs | 34 + .../StartMouseMovingWindow_internal.gen.cs | 26 + .../StopMouseMovingWindow_internal.gen.cs | 32 + .../PInvoke/TabBarAddTab_internal.gen.cs | 34 + .../PInvoke/TabBarCloseTab_internal.gen.cs | 29 + ...SelectedTabForActiveWindow_internal.gen.cs | 31 + .../PInvoke/TabBarFindTabByID_internal.gen.cs | 26 + .../TabBarFindTabByOrder_internal.gen.cs | 29 + .../TabBarGetCurrentTab_internal.gen.cs | 26 + .../PInvoke/TabBarGetTabName_internal.gen.cs | 26 + .../PInvoke/TabBarGetTabOrder_internal.gen.cs | 24 + .../TabBarProcessReorder_internal.gen.cs | 26 + .../PInvoke/TabBarQueueFocus_internal.gen.cs | 43 + ...arQueueReorderFromMousePos_internal.gen.cs | 31 + .../TabBarQueueReorder_internal.gen.cs | 30 + .../PInvoke/TabBarRemoveTab_internal.gen.cs | 30 + .../PInvoke/TabItemBackground_internal.gen.cs | 32 + .../PInvoke/TabItemCalcSize_internal.gen.cs | 46 + .../PInvoke/TabItemEx_internal.gen.cs | 33 + ...TabItemLabelAndCloseButton_internal.gen.cs | 42 + .../PInvoke/TabItemSpacing_internal.gen.cs | 26 + .../TableAngledHeadersRowEx_internal.gen.cs | 36 + .../TableBeginApplyRequests_internal.gen.cs | 29 + .../PInvoke/TableBeginCell_internal.gen.cs | 31 + ...TableBeginContextMenuPopup_internal.gen.cs | 26 + .../TableBeginInitMemory_internal.gen.cs | 37 + .../PInvoke/TableBeginRow_internal.gen.cs | 29 + .../TableCalcMaxColumnWidth_internal.gen.cs | 30 + .../PInvoke/TableDrawBorders_internal.gen.cs | 30 + ...ableDrawDefaultContextMenu_internal.gen.cs | 34 + .../PInvoke/TableEndCell_internal.gen.cs | 29 + .../PInvoke/TableEndRow_internal.gen.cs | 29 + .../PInvoke/TableFindByID_internal.gen.cs | 26 + ...ableFixColumnSortDirection_internal.gen.cs | 33 + .../TableGcCompactSettings_internal.gen.cs | 29 + ...eGcCompactTransientBuffers_internal.gen.cs | 46 + .../TableGetBoundSettings_internal.gen.cs | 29 + .../TableGetCellBgRect_internal.gen.cs | 34 + .../TableGetColumnName_internal.gen.cs | 26 + ...GetColumnNextSortDirection_internal.gen.cs | 28 + .../TableGetColumnResizeID_internal.gen.cs | 33 + .../TableGetColumnWidthAuto_internal.gen.cs | 32 + ...tHeaderAngledMaxLabelWidth_internal.gen.cs | 26 + .../TableGetHeaderRowHeight_internal.gen.cs | 26 + .../TableGetHoveredRow_internal.gen.cs | 35 + .../TableGetInstanceData_internal.gen.cs | 27 + .../TableGetInstanceID_internal.gen.cs | 24 + .../PInvoke/TableLoadSettings_internal.gen.cs | 26 + .../TableMergeDrawChannels_internal.gen.cs | 29 + .../TableOpenContextMenu_internal.gen.cs | 29 + .../TablePopBackgroundChannel_internal.gen.cs | 26 + .../TablePopColumnChannel_internal.gen.cs | 26 + ...TablePushBackgroundChannel_internal.gen.cs | 30 + .../TablePushColumnChannel_internal.gen.cs | 29 + .../PInvoke/TableRemove_internal.gen.cs | 29 + .../TableResetSettings_internal.gen.cs | 29 + .../PInvoke/TableSaveSettings_internal.gen.cs | 26 + ...ableSetColumnSortDirection_internal.gen.cs | 35 + ...TableSetColumnWidthAutoAll_internal.gen.cs | 26 + ...leSetColumnWidthAutoSingle_internal.gen.cs | 30 + .../TableSetColumnWidth_internal.gen.cs | 29 + ...SettingsAddSettingsHandler_internal.gen.cs | 26 + .../TableSettingsCreate_internal.gen.cs | 26 + .../TableSettingsFindByID_internal.gen.cs | 29 + .../TableSetupDrawChannels_internal.gen.cs | 44 + .../TableSortSpecsBuild_internal.gen.cs | 26 + .../TableSortSpecsSanitize_internal.gen.cs | 26 + .../TableUpdateBorders_internal.gen.cs | 30 + ...dateColumnsWeightFromWidth_internal.gen.cs | 26 + .../PInvoke/TableUpdateLayout_internal.gen.cs | 32 + .../PInvoke/TeleportMousePos_internal.gen.cs | 27 + .../PInvoke/TempInputIsActive_internal.gen.cs | 24 + .../PInvoke/TempInputScalar_internal.gen.cs | 41 + .../PInvoke/TempInputText_internal.gen.cs | 40 + .../PInvoke/TestKeyOwner_internal.gen.cs | 45 + .../TestShortcutRouting_internal.gen.cs | 43 + .../PInvoke/TextAligned_internal.gen.cs | 29 + .../PInvoke/TextEx_internal.gen.cs | 26 + ...TranslateWindowsInViewport_internal.gen.cs | 37 + .../PInvoke/TreeNodeBehavior_internal.gen.cs | 36 + ...reeNodeDrawLineToChildNode_internal.gen.cs | 30 + .../TreeNodeDrawLineToTreePop_internal.gen.cs | 29 + .../PInvoke/TreeNodeGetOpen_internal.gen.cs | 26 + .../PInvoke/TreeNodeSetOpen_internal.gen.cs | 26 + .../TreeNodeUpdateNextOpen_internal.gen.cs | 32 + .../TreePushOverrideID_internal.gen.cs | 26 + ...SelectFindBestLeadingMatch_internal.gen.cs | 34 + .../TypingSelectFindMatch_internal.gen.cs | 43 + ...ectFindNextSingleCharMatch_internal.gen.cs | 39 + .../UnregisterFontAtlas_internal.gen.cs | 26 + .../UnregisterUserTexture_internal.gen.cs | 26 + .../UpdateCurrentFontSize_internal.gen.cs | 26 + ...veredWindowAndCaptureFlags_internal.gen.cs | 30 + .../PInvoke/UpdateInputEvents_internal.gen.cs | 32 + ...eMouseMovingWindowEndFrame_internal.gen.cs | 31 + ...eMouseMovingWindowNewFrame_internal.gen.cs | 33 + ...teWindowParentAndRootLinks_internal.gen.cs | 35 + .../UpdateWindowSkipRefresh_internal.gen.cs | 34 + .../PInvoke/WindowPosAbsToRel_internal.gen.cs | 28 + .../PInvoke/WindowPosRelToAbs_internal.gen.cs | 28 + .../WindowRectAbsToRel_internal.gen.cs | 28 + .../WindowRectRelToAbs_internal.gen.cs | 28 + .../Structs/ImBitVector.gen.cs | 87 + .../Structs/ImFontAtlasPostProcessData.gen.cs | 345 + .../Structs/ImFontAtlasRectEntry.gen.cs | 179 + .../Structs/ImFontStackData.gen.cs | 107 + .../Structs/ImGuiBoxSelectState.gen.cs | 541 + .../Structs/ImGuiColorMod.gen.cs | 112 + .../Structs/ImGuiComboPreviewData.gen.cs | 222 + .../Structs/ImGuiContextHook.gen.cs | 155 + .../Structs/ImGuiDataTypeInfo.gen.cs | 194 + .../Structs/ImGuiDataTypeStorage.gen.cs | 63 + .../Structs/ImGuiDeactivatedItemData.gen.cs | 170 + .../Structs/ImGuiDebugAllocEntry.gen.cs | 95 + .../Structs/ImGuiDebugAllocInfo.gen.cs | 133 + .../Structs/ImGuiDockContext.gen.cs | 137 + .../Structs/ImGuiDockNode.gen.cs | 1179 + .../Structs/ImGuiErrorRecoveryState.gen.cs | 373 + .../Structs/ImGuiFocusScopeData.gen.cs | 106 + .../Structs/ImGuiGroupData.gen.cs | 431 + .../Structs/ImGuiIDStackTool.gen.cs | 264 + .../Structs/ImGuiInputEvent.gen.cs | 301 + .../Structs/ImGuiInputEventAppFocused.gen.cs | 81 + .../Structs/ImGuiInputEventKey.gen.cs | 143 + .../Structs/ImGuiInputEventMouseButton.gen.cs | 144 + .../Structs/ImGuiInputEventMousePos.gen.cs | 143 + .../ImGuiInputEventMouseViewport.gen.cs | 82 + .../Structs/ImGuiInputEventMouseWheel.gen.cs | 143 + .../Structs/ImGuiInputEventText.gen.cs | 81 + .../ImGuiInputTextDeactivatedState.gen.cs | 120 + .../Structs/ImGuiInputTextState.gen.cs | 714 + .../Structs/ImGuiKeyOwnerData.gen.cs | 188 + .../Structs/ImGuiKeyRoutingData.gen.cs | 240 + .../Structs/ImGuiKeyRoutingTable.gen.cs | 157 + .../Structs/ImGuiLastItemData.gen.cs | 338 + .../Structs/ImGuiListClipperData.gen.cs | 194 + .../Structs/ImGuiListClipperRange.gen.cs | 211 + .../Structs/ImGuiLocEntry.gen.cs | 92 + .../Structs/ImGuiMenuColumns.gen.cs | 320 + .../Structs/ImGuiMetricsConfig.gen.cs | 339 + .../Structs/ImGuiMultiSelectState.gen.cs | 316 + .../Structs/ImGuiMultiSelectTempData.gen.cs | 578 + .../Structs/ImGuiNavItemData.gen.cs | 371 + .../Structs/ImGuiNextItemData.gen.cs | 439 + .../Structs/ImGuiNextWindowData.gen.cs | 742 + .../Structs/ImGuiOldColumnData.gen.cs | 142 + .../Structs/ImGuiOldColumns.gen.cs | 420 + .../Structs/ImGuiPopupData.gen.cs | 338 + .../Structs/ImGuiPtrOrIndex.gen.cs | 90 + .../Structs/ImGuiSettingsHandler.gen.cs | 277 + .../Structs/ImGuiShrinkWidthItem.gen.cs | 95 + .../Structs/ImGuiStackLevelInfo.gen.cs | 139 + .../Structs/ImGuiStyleMod.gen.cs | 147 + .../Structs/ImGuiStyleVarInfo.gen.cs | 123 + .../Structs/ImGuiTabBar.gen.cs | 1177 + .../Structs/ImGuiTabItem.gen.cs | 495 + .../Structs/ImGuiTable.gen.cs | 3849 +++ .../Structs/ImGuiTableCellData.gen.cs | 124 + .../Structs/ImGuiTableColumn.gen.cs | 1750 + .../Structs/ImGuiTableColumnSettings.gen.cs | 286 + .../Structs/ImGuiTableHeaderData.gen.cs | 192 + .../Structs/ImGuiTableInstanceData.gen.cs | 272 + .../Structs/ImGuiTableSettings.gen.cs | 274 + .../Structs/ImGuiTableTempData.gen.cs | 471 + .../Structs/ImGuiTextIndex.gen.cs | 124 + .../Structs/ImGuiTreeNodeStackData.gen.cs | 311 + .../Structs/ImGuiTypingSelectRequest.gen.cs | 264 + .../Structs/ImGuiTypingSelectState.gen.cs | 224 + .../Structs/ImGuiViewportP.gen.cs | 826 + .../Structs/ImGuiWindow.gen.cs | 4101 +++ .../Structs/ImGuiWindowDockStyle.gen.cs | 85 + .../Structs/ImGuiWindowSettings.gen.cs | 494 + .../Structs/ImGuiWindowStackData.gen.cs | 208 + .../Structs/ImGuiWindowTempData.gen.cs | 1466 + .../Structs/stbrp_context_opaque.gen.cs | 55 + .../Generated/Delegates/ImDrawCallback.gen.cs | 29 + .../Delegates/ImGuiInputTextCallback.gen.cs | 26 + .../Delegates/ImGuiMemAllocFunc.gen.cs | 26 + .../Delegates/ImGuiMemFreeFunc.gen.cs | 26 + .../Delegates/ImGuiSizeCallback.gen.cs | 26 + .../Generated/Enums/ImDrawFlags.gen.cs | 265 + .../Generated/Enums/ImDrawListFlags.gen.cs | 113 + .../Generated/Enums/ImFontAtlasFlags.gen.cs | 89 + .../Generated/Enums/ImFontFlags.gen.cs | 95 + .../Generated/Enums/ImGuiBackendFlags.gen.cs | 180 + .../Generated/Enums/ImGuiButtonFlags.gen.cs | 122 + .../Generated/Enums/ImGuiChildFlags.gen.cs | 283 + Brutal.ImGui/Generated/Enums/ImGuiCol.gen.cs | 974 + .../Enums/ImGuiColorEditFlags.gen.cs | 552 + .../Generated/Enums/ImGuiComboFlags.gen.cs | 188 + Brutal.ImGui/Generated/Enums/ImGuiCond.gen.cs | 118 + .../Generated/Enums/ImGuiConfigFlags.gen.cs | 197 + .../Generated/Enums/ImGuiDataType.gen.cs | 239 + Brutal.ImGui/Generated/Enums/ImGuiDir.gen.cs | 113 + .../Generated/Enums/ImGuiDockNodeFlags.gen.cs | 178 + .../Generated/Enums/ImGuiDragDropFlags.gen.cs | 250 + .../Generated/Enums/ImGuiFocusedFlags.gen.cs | 139 + .../Generated/Enums/ImGuiHoveredFlags.gen.cs | 431 + .../Generated/Enums/ImGuiInputFlags.gen.cs | 225 + .../Enums/ImGuiInputTextFlags.gen.cs | 456 + .../Generated/Enums/ImGuiItemFlags.gen.cs | 153 + Brutal.ImGui/Generated/Enums/ImGuiKey.gen.cs | 2018 ++ .../Generated/Enums/ImGuiMouseButton.gen.cs | 82 + .../Generated/Enums/ImGuiMouseCursor.gen.cs | 247 + .../Generated/Enums/ImGuiMouseSource.gen.cs | 107 + .../Enums/ImGuiMultiSelectFlags.gen.cs | 321 + .../Generated/Enums/ImGuiPopupFlags.gen.cs | 310 + .../Enums/ImGuiSelectableFlags.gen.cs | 138 + .../Enums/ImGuiSelectionRequestType.gen.cs | 72 + .../Generated/Enums/ImGuiSliderFlags.gen.cs | 216 + .../Generated/Enums/ImGuiSortDirection.gen.cs | 77 + .../Generated/Enums/ImGuiStyleVar.gen.cs | 705 + .../Generated/Enums/ImGuiTabBarFlags.gen.cs | 238 + .../Generated/Enums/ImGuiTabItemFlags.gen.cs | 193 + .../Generated/Enums/ImGuiTableBgTarget.gen.cs | 127 + .../Enums/ImGuiTableColumnFlags.gen.cs | 497 + .../Generated/Enums/ImGuiTableFlags.gen.cs | 685 + .../Generated/Enums/ImGuiTableRowFlags.gen.cs | 54 + .../Generated/Enums/ImGuiTreeNodeFlags.gen.cs | 403 + .../Generated/Enums/ImGuiViewportFlags.gen.cs | 282 + .../Generated/Enums/ImGuiWindowFlags.gen.cs | 555 + .../Generated/Enums/ImTextureFormat.gen.cs | 58 + .../Generated/Enums/ImTextureStatus.gen.cs | 104 + .../Generated/Functions/ImDrawCmd.gen.cs | 27 + .../Generated/Functions/ImDrawData.gen.cs | 102 + .../Generated/Functions/ImDrawList.gen.cs | 2069 ++ .../Functions/ImDrawListSplitter.gen.cs | 72 + .../Generated/Functions/ImFont.gen.cs | 319 + .../Generated/Functions/ImFontAtlas.gen.cs | 645 + .../Generated/Functions/ImFontBaked.gen.cs | 106 + .../Functions/ImFontGlyphRangesBuilder.gen.cs | 119 + Brutal.ImGui/Generated/Functions/ImGui.gen.cs | 11524 +++++++ .../Generated/Functions/ImGuiIO.gen.cs | 374 + .../ImGuiInputTextCallbackData.gen.cs | 104 + .../Functions/ImGuiListClipper.gen.cs | 160 + .../Generated/Functions/ImGuiPayload.gen.cs | 51 + .../ImGuiSelectionBasicStorage.gen.cs | 185 + .../ImGuiSelectionExternalStorage.gen.cs | 36 + .../Generated/Functions/ImGuiStorage.gen.cs | 310 + .../Generated/Functions/ImGuiStyle.gen.cs | 33 + .../Functions/ImGuiTextFilter.gen.cs | 133 + .../Generated/Functions/ImGuiViewport.gen.cs | 38 + .../Generated/Functions/ImTextureData.gen.cs | 167 + .../Generated/Functions/ImTextureRef.gen.cs | 21 + Brutal.ImGui/Generated/InlineArrays.gen.cs | 116 + Brutal.ImGui/Generated/Macros.gen.cs | 14 + .../PInvoke/AcceptDragDropPayload.gen.cs | 38 + .../PInvoke/AlignTextToFramePadding.gen.cs | 33 + .../Generated/PInvoke/ArrowButton.gen.cs | 34 + Brutal.ImGui/Generated/PInvoke/Begin.gen.cs | 49 + .../Generated/PInvoke/BeginChild.gen.cs | 96 + .../Generated/PInvoke/BeginCombo.gen.cs | 31 + .../Generated/PInvoke/BeginDisabled.gen.cs | 42 + .../PInvoke/BeginDragDropSource.gen.cs | 46 + .../PInvoke/BeginDragDropTarget.gen.cs | 43 + .../Generated/PInvoke/BeginGroup.gen.cs | 37 + .../Generated/PInvoke/BeginItemTooltip.gen.cs | 35 + .../Generated/PInvoke/BeginListBox.gen.cs | 45 + .../Generated/PInvoke/BeginMainMenuBar.gen.cs | 36 + .../Generated/PInvoke/BeginMenu.gen.cs | 36 + .../Generated/PInvoke/BeginMenuBar.gen.cs | 42 + .../Generated/PInvoke/BeginMultiSelect.gen.cs | 50 + .../Generated/PInvoke/BeginPopup.gen.cs | 41 + .../PInvoke/BeginPopupContextItem.gen.cs | 56 + .../PInvoke/BeginPopupContextVoid.gen.cs | 36 + .../PInvoke/BeginPopupContextWindow.gen.cs | 36 + .../Generated/PInvoke/BeginPopupModal.gen.cs | 47 + .../Generated/PInvoke/BeginTabBar.gen.cs | 33 + .../Generated/PInvoke/BeginTabItem.gen.cs | 33 + .../Generated/PInvoke/BeginTable.gen.cs | 59 + .../Generated/PInvoke/BeginTooltip.gen.cs | 35 + Brutal.ImGui/Generated/PInvoke/Bullet.gen.cs | 35 + .../Generated/PInvoke/BulletText.gen.cs | 32 + Brutal.ImGui/Generated/PInvoke/Button.gen.cs | 34 + .../Generated/PInvoke/CalcItemWidth.gen.cs | 37 + .../Generated/PInvoke/CalcTextSize.gen.cs | 39 + .../Generated/PInvoke/Checkbox.gen.cs | 31 + .../Generated/PInvoke/CheckboxFlags.gen.cs | 50 + .../PInvoke/CloseCurrentPopup.gen.cs | 42 + .../Generated/PInvoke/CollapsingHeader.gen.cs | 71 + .../Generated/PInvoke/ColorButton.gen.cs | 46 + .../PInvoke/ColorConvertFloat4ToU32.gen.cs | 29 + .../PInvoke/ColorConvertHSVtoRGB.gen.cs | 41 + .../PInvoke/ColorConvertRGBtoHSV.gen.cs | 41 + .../PInvoke/ColorConvertU32ToFloat4.gen.cs | 29 + .../Generated/PInvoke/ColorEdit3.gen.cs | 31 + .../Generated/PInvoke/ColorEdit4.gen.cs | 36 + .../Generated/PInvoke/ColorPicker3.gen.cs | 31 + .../Generated/PInvoke/ColorPicker4.gen.cs | 43 + Brutal.ImGui/Generated/PInvoke/Columns.gen.cs | 30 + Brutal.ImGui/Generated/PInvoke/Combo.gen.cs | 103 + .../Generated/PInvoke/CreateContext.gen.cs | 32 + .../DebugCheckVersionAndDataLayout.gen.cs | 54 + .../PInvoke/DebugFlashStyleColor.gen.cs | 33 + .../Generated/PInvoke/DebugLog.gen.cs | 33 + .../PInvoke/DebugStartItemPicker.gen.cs | 30 + .../PInvoke/DebugTextEncoding.gen.cs | 34 + .../Generated/PInvoke/DestroyContext.gen.cs | 35 + .../PInvoke/DestroyPlatformWindows.gen.cs | 35 + .../Generated/PInvoke/DockSpace.gen.cs | 53 + .../PInvoke/DockSpaceOverViewport.gen.cs | 53 + .../Generated/PInvoke/DragFloat.gen.cs | 52 + .../Generated/PInvoke/DragFloat2.gen.cs | 49 + .../Generated/PInvoke/DragFloat3.gen.cs | 49 + .../Generated/PInvoke/DragFloat4.gen.cs | 49 + .../Generated/PInvoke/DragFloatRange2.gen.cs | 54 + Brutal.ImGui/Generated/PInvoke/DragInt.gen.cs | 55 + .../Generated/PInvoke/DragInt2.gen.cs | 49 + .../Generated/PInvoke/DragInt3.gen.cs | 49 + .../Generated/PInvoke/DragInt4.gen.cs | 49 + .../Generated/PInvoke/DragIntRange2.gen.cs | 54 + .../Generated/PInvoke/DragScalar.gen.cs | 54 + .../Generated/PInvoke/DragScalarN.gen.cs | 51 + Brutal.ImGui/Generated/PInvoke/Dummy.gen.cs | 33 + Brutal.ImGui/Generated/PInvoke/End.gen.cs | 40 + .../Generated/PInvoke/EndChild.gen.cs | 46 + .../Generated/PInvoke/EndCombo.gen.cs | 34 + .../Generated/PInvoke/EndDisabled.gen.cs | 33 + .../PInvoke/EndDragDropSource.gen.cs | 36 + .../PInvoke/EndDragDropTarget.gen.cs | 36 + .../Generated/PInvoke/EndFrame.gen.cs | 38 + .../Generated/PInvoke/EndGroup.gen.cs | 33 + .../Generated/PInvoke/EndListBox.gen.cs | 38 + .../Generated/PInvoke/EndMainMenuBar.gen.cs | 36 + Brutal.ImGui/Generated/PInvoke/EndMenu.gen.cs | 36 + .../Generated/PInvoke/EndMenuBar.gen.cs | 36 + .../Generated/PInvoke/EndMultiSelect.gen.cs | 39 + .../Generated/PInvoke/EndPopup.gen.cs | 41 + .../Generated/PInvoke/EndTabBar.gen.cs | 33 + .../Generated/PInvoke/EndTabItem.gen.cs | 33 + .../Generated/PInvoke/EndTable.gen.cs | 52 + .../Generated/PInvoke/EndTooltip.gen.cs | 35 + .../Generated/PInvoke/FindViewportByID.gen.cs | 37 + .../FindViewportByPlatformHandle.gen.cs | 35 + .../PInvoke/GetAllocatorFunctions.gen.cs | 41 + .../PInvoke/GetBackgroundDrawList.gen.cs | 34 + .../Generated/PInvoke/GetClipboardText.gen.cs | 30 + .../Generated/PInvoke/GetColorU32.gen.cs | 76 + .../Generated/PInvoke/GetColumnIndex.gen.cs | 33 + .../Generated/PInvoke/GetColumnOffset.gen.cs | 34 + .../Generated/PInvoke/GetColumnWidth.gen.cs | 33 + .../Generated/PInvoke/GetColumnsCount.gen.cs | 30 + .../PInvoke/GetContentRegionAvail.gen.cs | 41 + .../PInvoke/GetCurrentContext.gen.cs | 36 + .../Generated/PInvoke/GetCursorPos.gen.cs | 45 + .../Generated/PInvoke/GetCursorPosX.gen.cs | 41 + .../Generated/PInvoke/GetCursorPosY.gen.cs | 41 + .../PInvoke/GetCursorScreenPos.gen.cs | 42 + .../PInvoke/GetCursorStartPos.gen.cs | 42 + .../PInvoke/GetDragDropPayload.gen.cs | 37 + .../Generated/PInvoke/GetDrawData.gen.cs | 37 + .../PInvoke/GetDrawListSharedData.gen.cs | 32 + Brutal.ImGui/Generated/PInvoke/GetFont.gen.cs | 47 + .../Generated/PInvoke/GetFontBaked.gen.cs | 47 + .../Generated/PInvoke/GetFontSize.gen.cs | 54 + .../PInvoke/GetFontTexUvWhitePixel.gen.cs | 33 + .../PInvoke/GetForegroundDrawList.gen.cs | 34 + .../Generated/PInvoke/GetFrameCount.gen.cs | 32 + .../Generated/PInvoke/GetFrameHeight.gen.cs | 32 + .../PInvoke/GetFrameHeightWithSpacing.gen.cs | 33 + Brutal.ImGui/Generated/PInvoke/GetID.gen.cs | 124 + Brutal.ImGui/Generated/PInvoke/GetIO.gen.cs | 33 + .../Generated/PInvoke/GetItemID.gen.cs | 34 + .../Generated/PInvoke/GetItemRectMax.gen.cs | 34 + .../Generated/PInvoke/GetItemRectMin.gen.cs | 34 + .../Generated/PInvoke/GetItemRectSize.gen.cs | 34 + .../Generated/PInvoke/GetKeyName.gen.cs | 36 + .../PInvoke/GetKeyPressedAmount.gen.cs | 40 + .../Generated/PInvoke/GetMainViewport.gen.cs | 35 + .../PInvoke/GetMouseClickedCount.gen.cs | 35 + .../Generated/PInvoke/GetMouseCursor.gen.cs | 43 + .../PInvoke/GetMouseDragDelta.gen.cs | 42 + .../Generated/PInvoke/GetMousePos.gen.cs | 35 + .../GetMousePosOnOpeningCurrentPopup.gen.cs | 40 + .../Generated/PInvoke/GetPlatformIO.gen.cs | 33 + .../Generated/PInvoke/GetScrollMaxX.gen.cs | 34 + .../Generated/PInvoke/GetScrollMaxY.gen.cs | 34 + .../Generated/PInvoke/GetScrollX.gen.cs | 34 + .../Generated/PInvoke/GetScrollY.gen.cs | 34 + .../Generated/PInvoke/GetStateStorage.gen.cs | 29 + .../Generated/PInvoke/GetStyle.gen.cs | 33 + .../PInvoke/GetStyleColorName.gen.cs | 32 + .../PInvoke/GetStyleColorVec4.gen.cs | 34 + .../PInvoke/GetTextLineHeight.gen.cs | 32 + .../GetTextLineHeightWithSpacing.gen.cs | 32 + Brutal.ImGui/Generated/PInvoke/GetTime.gen.cs | 32 + .../PInvoke/GetTreeNodeToLabelSpacing.gen.cs | 37 + .../Generated/PInvoke/GetVersion.gen.cs | 33 + .../Generated/PInvoke/GetWindowDockID.gen.cs | 41 + .../PInvoke/GetWindowDpiScale.gen.cs | 33 + .../PInvoke/GetWindowDrawList.gen.cs | 33 + .../Generated/PInvoke/GetWindowHeight.gen.cs | 34 + .../Generated/PInvoke/GetWindowPos.gen.cs | 34 + .../Generated/PInvoke/GetWindowSize.gen.cs | 34 + .../PInvoke/GetWindowViewport.gen.cs | 33 + .../Generated/PInvoke/GetWindowWidth.gen.cs | 33 + .../Generated/PInvoke/ImDrawCmd.gen.cs | 31 + .../Generated/PInvoke/ImDrawData.gen.cs | 102 + .../Generated/PInvoke/ImDrawList.gen.cs | 1735 + .../PInvoke/ImDrawListSplitter.gen.cs | 84 + Brutal.ImGui/Generated/PInvoke/ImFont.gen.cs | 283 + .../Generated/PInvoke/ImFontAtlas.gen.cs | 564 + .../Generated/PInvoke/ImFontBaked.gen.cs | 109 + .../PInvoke/ImFontGlyphRangesBuilder.gen.cs | 126 + Brutal.ImGui/Generated/PInvoke/ImGuiIO.gen.cs | 381 + .../PInvoke/ImGuiInputTextCallbackData.gen.cs | 115 + .../Generated/PInvoke/ImGuiListClipper.gen.cs | 147 + .../Generated/PInvoke/ImGuiPayload.gen.cs | 52 + .../PInvoke/ImGuiSelectionBasicStorage.gen.cs | 194 + .../ImGuiSelectionExternalStorage.gen.cs | 40 + .../Generated/PInvoke/ImGuiStorage.gen.cs | 336 + .../Generated/PInvoke/ImGuiStyle.gen.cs | 36 + .../Generated/PInvoke/ImGuiTextFilter.gen.cs | 100 + .../Generated/PInvoke/ImGuiViewport.gen.cs | 42 + .../Generated/PInvoke/ImTextureData.gen.cs | 177 + .../Generated/PInvoke/ImTextureRef.gen.cs | 25 + Brutal.ImGui/Generated/PInvoke/Image.gen.cs | 35 + .../Generated/PInvoke/ImageButton.gen.cs | 47 + .../Generated/PInvoke/ImageWithBg.gen.cs | 46 + Brutal.ImGui/Generated/PInvoke/Indent.gen.cs | 32 + .../Generated/PInvoke/InputDouble.gen.cs | 39 + .../Generated/PInvoke/InputFloat.gen.cs | 39 + .../Generated/PInvoke/InputFloat2.gen.cs | 37 + .../Generated/PInvoke/InputFloat3.gen.cs | 37 + .../Generated/PInvoke/InputFloat4.gen.cs | 37 + .../Generated/PInvoke/InputInt.gen.cs | 38 + .../Generated/PInvoke/InputInt2.gen.cs | 31 + .../Generated/PInvoke/InputInt3.gen.cs | 31 + .../Generated/PInvoke/InputInt4.gen.cs | 31 + .../Generated/PInvoke/InputScalar.gen.cs | 44 + .../Generated/PInvoke/InputScalarN.gen.cs | 41 + .../Generated/PInvoke/InputText.gen.cs | 39 + .../PInvoke/InputTextMultiline.gen.cs | 40 + .../PInvoke/InputTextWithHint.gen.cs | 40 + .../Generated/PInvoke/InvisibleButton.gen.cs | 40 + .../Generated/PInvoke/IsAnyItemActive.gen.cs | 34 + .../Generated/PInvoke/IsAnyItemFocused.gen.cs | 34 + .../Generated/PInvoke/IsAnyItemHovered.gen.cs | 39 + .../Generated/PInvoke/IsAnyMouseDown.gen.cs | 40 + .../Generated/PInvoke/IsItemActivated.gen.cs | 34 + .../Generated/PInvoke/IsItemActive.gen.cs | 36 + .../Generated/PInvoke/IsItemClicked.gen.cs | 40 + .../PInvoke/IsItemDeactivated.gen.cs | 35 + .../PInvoke/IsItemDeactivatedAfterEdit.gen.cs | 37 + .../Generated/PInvoke/IsItemEdited.gen.cs | 35 + .../Generated/PInvoke/IsItemFocused.gen.cs | 37 + .../Generated/PInvoke/IsItemHovered.gen.cs | 39 + .../PInvoke/IsItemToggledOpen.gen.cs | 34 + .../PInvoke/IsItemToggledSelection.gen.cs | 46 + .../Generated/PInvoke/IsItemVisible.gen.cs | 34 + .../PInvoke/IsKeyChordPressed.gen.cs | 39 + .../Generated/PInvoke/IsKeyDown.gen.cs | 39 + .../Generated/PInvoke/IsKeyPressed.gen.cs | 35 + .../Generated/PInvoke/IsKeyReleased.gen.cs | 35 + .../Generated/PInvoke/IsMouseClicked.gen.cs | 35 + .../PInvoke/IsMouseDoubleClicked.gen.cs | 36 + .../Generated/PInvoke/IsMouseDown.gen.cs | 35 + .../Generated/PInvoke/IsMouseDragging.gen.cs | 35 + .../PInvoke/IsMouseHoveringRect.gen.cs | 42 + .../Generated/PInvoke/IsMousePosValid.gen.cs | 38 + .../Generated/PInvoke/IsMouseReleased.gen.cs | 35 + .../PInvoke/IsMouseReleasedWithDelay.gen.cs | 42 + .../Generated/PInvoke/IsPopupOpen.gen.cs | 35 + .../Generated/PInvoke/IsRectVisible.gen.cs | 53 + .../PInvoke/IsWindowAppearing.gen.cs | 30 + .../PInvoke/IsWindowCollapsed.gen.cs | 30 + .../Generated/PInvoke/IsWindowDocked.gen.cs | 44 + .../Generated/PInvoke/IsWindowFocused.gen.cs | 36 + .../Generated/PInvoke/IsWindowHovered.gen.cs | 43 + .../Generated/PInvoke/LabelText.gen.cs | 32 + Brutal.ImGui/Generated/PInvoke/ListBox.gen.cs | 77 + .../PInvoke/LoadIniSettingsFromDisk.gen.cs | 36 + .../PInvoke/LoadIniSettingsFromMemory.gen.cs | 40 + .../Generated/PInvoke/LogButtons.gen.cs | 37 + .../Generated/PInvoke/LogFinish.gen.cs | 33 + Brutal.ImGui/Generated/PInvoke/LogText.gen.cs | 33 + .../Generated/PInvoke/LogToClipboard.gen.cs | 36 + .../Generated/PInvoke/LogToFile.gen.cs | 36 + .../Generated/PInvoke/LogToTTY.gen.cs | 33 + .../Generated/PInvoke/MemAlloc.gen.cs | 35 + Brutal.ImGui/Generated/PInvoke/MemFree.gen.cs | 35 + .../Generated/PInvoke/MenuItem.gen.cs | 67 + .../Generated/PInvoke/NewFrame.gen.cs | 32 + Brutal.ImGui/Generated/PInvoke/NewLine.gen.cs | 32 + .../Generated/PInvoke/NextColumn.gen.cs | 33 + .../Generated/PInvoke/OpenPopup.gen.cs | 66 + .../PInvoke/OpenPopupOnItemClick.gen.cs | 44 + .../Generated/PInvoke/PlotHistogram.gen.cs | 70 + .../Generated/PInvoke/PlotLines.gen.cs | 70 + .../Generated/PInvoke/PopClipRect.gen.cs | 30 + Brutal.ImGui/Generated/PInvoke/PopFont.gen.cs | 44 + Brutal.ImGui/Generated/PInvoke/PopID.gen.cs | 42 + .../Generated/PInvoke/PopItemFlag.gen.cs | 29 + .../Generated/PInvoke/PopItemWidth.gen.cs | 29 + .../Generated/PInvoke/PopStyleColor.gen.cs | 29 + .../Generated/PInvoke/PopStyleVar.gen.cs | 29 + .../Generated/PInvoke/PopTextWrapPos.gen.cs | 29 + .../Generated/PInvoke/ProgressBar.gen.cs | 35 + .../Generated/PInvoke/PushClipRect.gen.cs | 45 + .../Generated/PInvoke/PushFont.gen.cs | 50 + Brutal.ImGui/Generated/PInvoke/PushID.gen.cs | 132 + .../Generated/PInvoke/PushItemFlag.gen.cs | 32 + .../Generated/PInvoke/PushItemWidth.gen.cs | 36 + .../Generated/PInvoke/PushStyleColor.gen.cs | 53 + .../Generated/PInvoke/PushStyleVar.gen.cs | 52 + .../Generated/PInvoke/PushStyleVarX.gen.cs | 32 + .../Generated/PInvoke/PushStyleVarY.gen.cs | 32 + .../Generated/PInvoke/PushTextWrapPos.gen.cs | 33 + .../Generated/PInvoke/RadioButton.gen.cs | 60 + Brutal.ImGui/Generated/PInvoke/Render.gen.cs | 37 + .../RenderPlatformWindowsDefault.gen.cs | 40 + .../PInvoke/ResetMouseDragDelta.gen.cs | 32 + .../Generated/PInvoke/SameLine.gen.cs | 39 + .../PInvoke/SaveIniSettingsToDisk.gen.cs | 36 + .../PInvoke/SaveIniSettingsToMemory.gen.cs | 40 + .../Generated/PInvoke/Selectable.gen.cs | 76 + .../Generated/PInvoke/Separator.gen.cs | 33 + .../Generated/PInvoke/SeparatorText.gen.cs | 32 + .../PInvoke/SetAllocatorFunctions.gen.cs | 33 + .../Generated/PInvoke/SetClipboardText.gen.cs | 30 + .../PInvoke/SetColorEditOptions.gen.cs | 39 + .../Generated/PInvoke/SetColumnOffset.gen.cs | 34 + .../Generated/PInvoke/SetColumnWidth.gen.cs | 33 + .../PInvoke/SetCurrentContext.gen.cs | 32 + .../Generated/PInvoke/SetCursorPos.gen.cs | 41 + .../Generated/PInvoke/SetCursorPosX.gen.cs | 41 + .../Generated/PInvoke/SetCursorPosY.gen.cs | 41 + .../PInvoke/SetCursorScreenPos.gen.cs | 41 + .../PInvoke/SetDragDropPayload.gen.cs | 42 + .../PInvoke/SetItemDefaultFocus.gen.cs | 32 + .../Generated/PInvoke/SetItemKeyOwner.gen.cs | 38 + .../Generated/PInvoke/SetItemTooltip.gen.cs | 39 + .../PInvoke/SetKeyboardFocusHere.gen.cs | 37 + .../Generated/PInvoke/SetMouseCursor.gen.cs | 40 + .../PInvoke/SetNavCursorVisible.gen.cs | 33 + .../SetNextFrameWantCaptureKeyboard.gen.cs | 38 + .../SetNextFrameWantCaptureMouse.gen.cs | 37 + .../PInvoke/SetNextItemAllowOverlap.gen.cs | 39 + .../Generated/PInvoke/SetNextItemOpen.gen.cs | 36 + .../SetNextItemSelectionUserData.gen.cs | 35 + .../PInvoke/SetNextItemShortcut.gen.cs | 43 + .../PInvoke/SetNextItemStorageID.gen.cs | 36 + .../Generated/PInvoke/SetNextItemWidth.gen.cs | 36 + .../PInvoke/SetNextWindowBgAlpha.gen.cs | 34 + .../PInvoke/SetNextWindowClass.gen.cs | 45 + .../PInvoke/SetNextWindowCollapsed.gen.cs | 33 + .../PInvoke/SetNextWindowContentSize.gen.cs | 39 + .../PInvoke/SetNextWindowDockID.gen.cs | 44 + .../PInvoke/SetNextWindowFocus.gen.cs | 33 + .../Generated/PInvoke/SetNextWindowPos.gen.cs | 34 + .../PInvoke/SetNextWindowScroll.gen.cs | 33 + .../PInvoke/SetNextWindowSize.gen.cs | 33 + .../SetNextWindowSizeConstraints.gen.cs | 47 + .../PInvoke/SetNextWindowViewport.gen.cs | 33 + .../PInvoke/SetScrollFromPosX.gen.cs | 35 + .../PInvoke/SetScrollFromPosY.gen.cs | 35 + .../Generated/PInvoke/SetScrollHereX.gen.cs | 40 + .../Generated/PInvoke/SetScrollHereY.gen.cs | 39 + .../Generated/PInvoke/SetScrollX.gen.cs | 34 + .../Generated/PInvoke/SetScrollY.gen.cs | 34 + .../Generated/PInvoke/SetStateStorage.gen.cs | 33 + .../Generated/PInvoke/SetTabItemClosed.gen.cs | 40 + .../Generated/PInvoke/SetTooltip.gen.cs | 36 + .../PInvoke/SetWindowCollapsed.gen.cs | 54 + .../Generated/PInvoke/SetWindowFocus.gen.cs | 54 + .../Generated/PInvoke/SetWindowPos.gen.cs | 55 + .../Generated/PInvoke/SetWindowSize.gen.cs | 55 + .../Generated/PInvoke/Shortcut.gen.cs | 43 + .../Generated/PInvoke/ShowAboutWindow.gen.cs | 32 + .../PInvoke/ShowDebugLogWindow.gen.cs | 32 + .../Generated/PInvoke/ShowDemoWindow.gen.cs | 38 + .../Generated/PInvoke/ShowFontSelector.gen.cs | 36 + .../PInvoke/ShowIDStackToolWindow.gen.cs | 36 + .../PInvoke/ShowMetricsWindow.gen.cs | 33 + .../Generated/PInvoke/ShowStyleEditor.gen.cs | 37 + .../PInvoke/ShowStyleSelector.gen.cs | 37 + .../Generated/PInvoke/ShowUserGuide.gen.cs | 37 + .../Generated/PInvoke/SliderAngle.gen.cs | 42 + .../Generated/PInvoke/SliderFloat.gen.cs | 45 + .../Generated/PInvoke/SliderFloat2.gen.cs | 42 + .../Generated/PInvoke/SliderFloat3.gen.cs | 42 + .../Generated/PInvoke/SliderFloat4.gen.cs | 42 + .../Generated/PInvoke/SliderInt.gen.cs | 42 + .../Generated/PInvoke/SliderInt2.gen.cs | 42 + .../Generated/PInvoke/SliderInt3.gen.cs | 42 + .../Generated/PInvoke/SliderInt4.gen.cs | 42 + .../Generated/PInvoke/SliderScalar.gen.cs | 47 + .../Generated/PInvoke/SliderScalarN.gen.cs | 47 + .../Generated/PInvoke/SmallButton.gen.cs | 37 + Brutal.ImGui/Generated/PInvoke/Spacing.gen.cs | 32 + .../PInvoke/StyleColorsClassic.gen.cs | 32 + .../Generated/PInvoke/StyleColorsDark.gen.cs | 32 + .../Generated/PInvoke/StyleColorsLight.gen.cs | 35 + .../Generated/PInvoke/TabItemButton.gen.cs | 33 + .../PInvoke/TableAngledHeadersRow.gen.cs | 44 + .../PInvoke/TableGetColumnCount.gen.cs | 37 + .../PInvoke/TableGetColumnFlags.gen.cs | 41 + .../PInvoke/TableGetColumnIndex.gen.cs | 37 + .../PInvoke/TableGetColumnName.gen.cs | 38 + .../PInvoke/TableGetHoveredColumn.gen.cs | 43 + .../Generated/PInvoke/TableGetRowIndex.gen.cs | 41 + .../PInvoke/TableGetSortSpecs.gen.cs | 45 + .../Generated/PInvoke/TableHeader.gen.cs | 44 + .../Generated/PInvoke/TableHeadersRow.gen.cs | 48 + .../Generated/PInvoke/TableNextColumn.gen.cs | 56 + .../Generated/PInvoke/TableNextRow.gen.cs | 55 + .../Generated/PInvoke/TableSetBgColor.gen.cs | 37 + .../PInvoke/TableSetColumnEnabled.gen.cs | 47 + .../PInvoke/TableSetColumnIndex.gen.cs | 55 + .../Generated/PInvoke/TableSetupColumn.gen.cs | 46 + .../PInvoke/TableSetupScrollFreeze.gen.cs | 42 + Brutal.ImGui/Generated/PInvoke/Text.gen.cs | 32 + .../Generated/PInvoke/TextColored.gen.cs | 32 + .../Generated/PInvoke/TextDisabled.gen.cs | 33 + .../Generated/PInvoke/TextLink.gen.cs | 40 + .../Generated/PInvoke/TextLinkOpenURL.gen.cs | 34 + .../Generated/PInvoke/TextUnformatted.gen.cs | 34 + Brutal.ImGui/Generated/PInvoke/TextV.gen.cs | 29 + .../Generated/PInvoke/TextWrapped.gen.cs | 34 + .../Generated/PInvoke/TreeNode.gen.cs | 73 + .../Generated/PInvoke/TreeNodeEx.gen.cs | 68 + Brutal.ImGui/Generated/PInvoke/TreePop.gen.cs | 33 + .../Generated/PInvoke/TreePush.gen.cs | 55 + .../Generated/PInvoke/Unindent.gen.cs | 32 + .../PInvoke/UpdatePlatformWindows.gen.cs | 39 + .../Generated/PInvoke/VSliderFloat.gen.cs | 43 + .../Generated/PInvoke/VSliderInt.gen.cs | 43 + .../Generated/PInvoke/VSliderScalar.gen.cs | 44 + Brutal.ImGui/Generated/PInvoke/Value.gen.cs | 84 + .../Generated/Structs/ImDrawChannel.gen.cs | 114 + .../Generated/Structs/ImDrawCmd.gen.cs | 457 + .../Generated/Structs/ImDrawCmdHeader.gen.cs | 135 + .../Generated/Structs/ImDrawData.gen.cs | 457 + .../Generated/Structs/ImDrawList.gen.cs | 627 + .../Structs/ImDrawListSplitter.gen.cs | 165 + .../Generated/Structs/ImDrawVert.gen.cs | 143 + Brutal.ImGui/Generated/Structs/ImFont.gen.cs | 496 + .../Generated/Structs/ImFontAtlas.gen.cs | 1129 + .../Structs/ImFontAtlasBuilder.gen.cs | 716 + .../Generated/Structs/ImFontAtlasRect.gen.cs | 288 + .../Generated/Structs/ImFontBaked.gen.cs | 661 + .../Generated/Structs/ImFontConfig.gen.cs | 945 + .../Generated/Structs/ImFontGlyph.gen.cs | 582 + .../Structs/ImFontGlyphRangesBuilder.gen.cs | 91 + .../Generated/Structs/ImFontLoader.gen.cs | 388 + .../Generated/Structs/ImGuiContext.gen.cs | 10417 ++++++ Brutal.ImGui/Generated/Structs/ImGuiIO.gen.cs | 3997 +++ .../Structs/ImGuiInputTextCallbackData.gen.cs | 654 + .../Generated/Structs/ImGuiKeyData.gen.cs | 202 + .../Generated/Structs/ImGuiListClipper.gen.cs | 638 + .../Structs/ImGuiMultiSelectIO.gen.cs | 323 + .../Generated/Structs/ImGuiPayload.gen.cs | 312 + .../Generated/Structs/ImGuiPlatformIO.gen.cs | 1423 + .../Structs/ImGuiPlatformImeData.gen.cs | 241 + .../Structs/ImGuiPlatformMonitor.gen.cs | 282 + .../Structs/ImGuiSelectionBasicStorage.gen.cs | 271 + .../ImGuiSelectionExternalStorage.gen.cs | 130 + .../Structs/ImGuiSelectionRequest.gen.cs | 239 + .../Structs/ImGuiSizeCallbackData.gen.cs | 204 + .../Generated/Structs/ImGuiStorage.gen.cs | 83 + .../Generated/Structs/ImGuiStoragePair.gen.cs | 170 + .../Generated/Structs/ImGuiStyle.gen.cs | 1905 ++ .../Structs/ImGuiTableColumnSortSpecs.gen.cs | 196 + .../Structs/ImGuiTableSortSpecs.gen.cs | 180 + .../Generated/Structs/ImGuiTextBuffer.gen.cs | 89 + .../Generated/Structs/ImGuiTextFilter.gen.cs | 50 + .../Generated/Structs/ImGuiViewport.gen.cs | 894 + .../Generated/Structs/ImGuiWindowClass.gen.cs | 503 + .../Generated/Structs/ImTextureData.gen.cs | 814 + .../Generated/Structs/ImTextureRect.gen.cs | 210 + .../Generated/Structs/ImTextureRef.gen.cs | 152 + Brutal.ImGui/GlobalUsings.cs | 18 + Brutal.ImGui/ImString/ArenaStringBuilder.cs | 122 + Brutal.ImGui/ImString/ImInputString.cs | 114 + .../ImString/ImString.Interpolation.cs | 94 + Brutal.ImGui/ImString/ImString.ToString.cs | 42 + Brutal.ImGui/ImString/ImString.cs | 126 + Brutal.ImGui/ImString/InteropExtensions.cs | 25 + .../BRUTAL-IMGUI-THIRD-PARTY-NOTICES.txt | 175 + Brutal.ImGui/Manual/Functions/ImDrawList.cs | 120 + Brutal.ImGui/Manual/Functions/ImGui.Text.cs | 45 + Brutal.ImGui/Manual/Functions/ImGui.cs | 385 + .../Manual/Handles/ImDrawListSharedData.cs | 17 + Brutal.ImGui/Manual/ImAssert.cs | 15 + Brutal.ImGui/Manual/ImColor8.cs | 77 + Brutal.ImGui/Manual/ImGui.Internal.cs | 15 + Brutal.ImGui/Manual/ImGuiCpp.cs | 118 + Brutal.ImGui/Manual/ImVector.cs | 226 + Brutal.ImGui/Manual/Interop.cs | 40 + .../Manual/StructExtensions/ImDrawCmd.cs | 23 + .../StructExtensions/ImGuiPlatformIO.cs | 12 + .../StructExtensions/ImGuiTextFilter.cs | 23 + .../Manual/Structs/ImDrawDataBuilder.cs | 49 + .../Manual/Structs/ImGuiListClipper.cs | 7 + .../Manual/Structs/ImGuiOnceUponAFrame.cs | 27 + Brutal.ImGui/Manual/Structs/ImGuiTextRange.cs | 22 + .../Manual/Typedefs/ImFontAtlasRectId.cs | 6 + Brutal.ImGui/Manual/Typedefs/ImGuiID.cs | 12 + Brutal.ImGui/Manual/Typedefs/ImGuiKeyChord.cs | 7 + Brutal.ImGui/Manual/Typedefs/ImTextureID.cs | 11 + Brutal.ImGui/Manual/Typedefs/TODO.cs | 31 + .../Delegates/ImPlotLocator.gen.cs | 26 + .../Enums/ImPlotDateFmt.gen.cs | 88 + .../Enums/ImPlotTimeFmt.gen.cs | 136 + .../Enums/ImPlotTimeUnit.gen.cs | 121 + .../Functions/ImPlot.gen.cs | 2257 ++ .../Functions/ImPlotAlignmentData.gen.cs | 81 + .../ImPlotAnnotationCollection.gen.cs | 107 + .../Functions/ImPlotAxis.gen.cs | 367 + .../Functions/ImPlotColormapData.gen.cs | 169 + .../Functions/ImPlotItemGroup.gen.cs | 129 + .../Functions/ImPlotLegend.gen.cs | 18 + .../Functions/ImPlotNextItemData.gen.cs | 24 + .../Functions/ImPlotNextPlotData.gen.cs | 19 + .../Functions/ImPlotPlot.gen.cs | 133 + .../Functions/ImPlotTagCollection.gen.cs | 76 + .../Functions/ImPlotTicker.gen.cs | 146 + .../Functions/ImPlotTime.gen.cs | 52 + .../Generated-Internal/InlineArrays.gen.cs | 80 + .../PInvoke/AddTextCentered_internal.gen.cs | 31 + .../PInvoke/AddTextVertical_internal.gen.cs | 31 + .../PInvoke/AddTime_internal.gen.cs | 25 + .../AllAxesInputLocked_internal.gen.cs | 24 + .../PInvoke/AnyAxesHeld_internal.gen.cs | 19 + .../PInvoke/AnyAxesHovered_internal.gen.cs | 19 + .../AnyAxesInputLocked_internal.gen.cs | 24 + .../PInvoke/BeginItem_internal.gen.cs | 34 + .../PInvoke/BustItemCache_internal.gen.cs | 26 + .../PInvoke/BustPlotCache_internal.gen.cs | 25 + .../PInvoke/CalcHoverColor_internal.gen.cs | 24 + .../PInvoke/CalcLegendSize_internal.gen.cs | 30 + .../PInvoke/CalcTextColor_internal.gen.cs | 39 + .../CalcTextSizeVertical_internal.gen.cs | 24 + .../PInvoke/CalculateBins_internal.gen.cs | 229 + .../PInvoke/CeilTime_internal.gen.cs | 25 + .../PInvoke/ClampLabelPos_internal.gen.cs | 25 + .../PInvoke/ClampLegendRect_internal.gen.cs | 29 + .../PInvoke/CombineDateTime_internal.gen.cs | 25 + .../PInvoke/EndItem_internal.gen.cs | 29 + .../PInvoke/FitPointX_internal.gen.cs | 24 + .../PInvoke/FitPointY_internal.gen.cs | 24 + .../PInvoke/FitPoint_internal.gen.cs | 24 + .../PInvoke/FitThisFrame_internal.gen.cs | 24 + .../PInvoke/FloorTime_internal.gen.cs | 25 + .../PInvoke/FormatDateTime_internal.gen.cs | 30 + .../PInvoke/FormatDate_internal.gen.cs | 32 + .../PInvoke/FormatTime_internal.gen.cs | 32 + .../PInvoke/Formatter_internal.gen.cs | 39 + .../PInvoke/GetAutoColor_internal.gen.cs | 25 + .../GetColormapColorU32_internal.gen.cs | 25 + .../PInvoke/GetCurrentItem_internal.gen.cs | 26 + .../PInvoke/GetCurrentPlot_internal.gen.cs | 25 + .../PInvoke/GetDaysInMonth_internal.gen.cs | 24 + .../PInvoke/GetGmtTime_internal.gen.cs | 25 + .../PInvoke/GetItemData_internal.gen.cs | 24 + .../PInvoke/GetItem_internal.gen.cs | 26 + .../PInvoke/GetLocTime_internal.gen.cs | 25 + .../PInvoke/GetLocationPos_internal.gen.cs | 31 + .../PInvoke/GetMonth_internal.gen.cs | 25 + .../PInvoke/GetPlot_internal.gen.cs | 25 + .../PInvoke/GetStyleColorU32_internal.gen.cs | 24 + .../PInvoke/GetStyleColorVec4_internal.gen.cs | 24 + .../PInvoke/GetTime_internal.gen.cs | 24 + .../PInvoke/GetYear_internal.gen.cs | 25 + .../ImPlotAlignmentData_internal.gen.cs | 75 + ...ImPlotAnnotationCollection_internal.gen.cs | 71 + .../PInvoke/ImPlotAxis_internal.gen.cs | 374 + .../ImPlotColormapData_internal.gen.cs | 196 + .../PInvoke/ImPlotItemGroup_internal.gen.cs | 137 + .../PInvoke/ImPlotLegend_internal.gen.cs | 19 + .../ImPlotNextItemData_internal.gen.cs | 24 + .../ImPlotNextPlotData_internal.gen.cs | 19 + .../PInvoke/ImPlotPlot_internal.gen.cs | 123 + .../ImPlotTagCollection_internal.gen.cs | 66 + .../PInvoke/ImPlotTicker_internal.gen.cs | 106 + .../PInvoke/ImPlotTime_internal.gen.cs | 54 + .../PInvoke/Initialize_internal.gen.cs | 25 + .../PInvoke/Intersection_internal.gen.cs | 25 + .../PInvoke/IsColorAuto_internal.gen.cs | 39 + .../PInvoke/IsLeapYear_internal.gen.cs | 24 + .../PInvoke/LabelAxisValue_internal.gen.cs | 32 + .../PInvoke/Locator_internal.gen.cs | 82 + .../PInvoke/MakeTime_internal.gen.cs | 34 + .../PInvoke/MkGmtTime_internal.gen.cs | 25 + .../PInvoke/MkLocTime_internal.gen.cs | 25 + .../PInvoke/MkTime_internal.gen.cs | 24 + .../NextColormapColorU32_internal.gen.cs | 25 + .../PInvoke/NiceNum_internal.gen.cs | 25 + .../PInvoke/Now_internal.gen.cs | 24 + .../PInvoke/OrderOfMagnitude_internal.gen.cs | 24 + .../PInvoke/OrderToPrecision_internal.gen.cs | 24 + .../PInvoke/Precision_internal.gen.cs | 24 + .../PInvoke/RangesOverlap_internal.gen.cs | 24 + .../PInvoke/RegisterOrGetItem_internal.gen.cs | 31 + .../PInvoke/RenderColorBar_internal.gen.cs | 34 + ...esetCtxForNextAlignedPlots_internal.gen.cs | 25 + .../ResetCtxForNextPlot_internal.gen.cs | 25 + .../ResetCtxForNextSubplot_internal.gen.cs | 25 + .../PInvoke/RoundTime_internal.gen.cs | 25 + .../PInvoke/RoundTo_internal.gen.cs | 24 + .../PInvoke/SampleColormapU32_internal.gen.cs | 25 + .../PInvoke/SetupLock_internal.gen.cs | 24 + .../PInvoke/ShowAltLegend_internal.gen.cs | 33 + .../ShowAxisContextMenu_internal.gen.cs | 30 + .../PInvoke/ShowDatePicker_internal.gen.cs | 35 + .../ShowLegendContextMenu_internal.gen.cs | 25 + .../PInvoke/ShowLegendEntries_internal.gen.cs | 33 + .../ShowPlotContextMenu_internal.gen.cs | 25 + .../ShowSubplotsContextMenu_internal.gen.cs | 25 + .../PInvoke/ShowTimePicker_internal.gen.cs | 26 + .../PInvoke/SubplotNextCell_internal.gen.cs | 25 + .../PInvoke/Today_internal.gen.cs | 24 + .../PInvoke/TransformForward_internal.gen.cs | 39 + .../PInvoke/TransformInverse_internal.gen.cs | 39 + .../Structs/ImPlotAlignmentData.gen.cs | 193 + .../Structs/ImPlotAnnotation.gen.cs | 222 + .../Structs/ImPlotAnnotationCollection.gen.cs | 107 + .../Structs/ImPlotAxis.gen.cs | 1035 + .../Structs/ImPlotColormapData.gen.cs | 367 + .../Structs/ImPlotDateTimeSpec.gen.cs | 164 + .../Structs/ImPlotItem.gen.cs | 241 + .../Structs/ImPlotItemGroup.gen.cs | 164 + .../Structs/ImPlotLegend.gen.cs | 386 + .../Structs/ImPlotNextItemData.gen.cs | 547 + .../Structs/ImPlotNextPlotData.gen.cs | 212 + .../Structs/ImPlotPlot.gen.cs | 792 + .../Structs/ImPlotPointError.gen.cs | 164 + .../Structs/ImPlotSubplot.gen.cs | 601 + .../Structs/ImPlotTag.gen.cs | 133 + .../Structs/ImPlotTagCollection.gen.cs | 95 + .../Structs/ImPlotTick.gen.cs | 270 + .../Structs/ImPlotTicker.gen.cs | 183 + .../Structs/ImPlotTime.gen.cs | 118 + .../Delegates/ImPlotFormatter.gen.cs | 22 + .../Generated/Delegates/ImPlotGetter.gen.cs | 22 + .../Delegates/ImPlotTransform.gen.cs | 22 + Brutal.ImPlot/Generated/Enums/ImAxis.gen.cs | 129 + .../Generated/Enums/ImPlotAxisFlags.gen.cs | 333 + .../Enums/ImPlotBarGroupsFlags.gen.cs | 69 + .../Generated/Enums/ImPlotBarsFlags.gen.cs | 53 + .../Generated/Enums/ImPlotBin.gen.cs | 84 + .../Generated/Enums/ImPlotCol.gen.cs | 369 + .../Generated/Enums/ImPlotColormap.gen.cs | 276 + .../Enums/ImPlotColormapScaleFlags.gen.cs | 86 + .../Generated/Enums/ImPlotCond.gen.cs | 72 + .../Generated/Enums/ImPlotDigitalFlags.gen.cs | 37 + .../Enums/ImPlotDragToolFlags.gen.cs | 101 + .../Generated/Enums/ImPlotDummyFlags.gen.cs | 37 + .../Enums/ImPlotErrorBarsFlags.gen.cs | 53 + .../Generated/Enums/ImPlotFlags.gen.cs | 195 + .../Generated/Enums/ImPlotHeatmapFlags.gen.cs | 53 + .../Enums/ImPlotHistogramFlags.gen.cs | 119 + .../Generated/Enums/ImPlotImageFlags.gen.cs | 37 + .../Enums/ImPlotInfLinesFlags.gen.cs | 53 + .../Generated/Enums/ImPlotItemFlags.gen.cs | 66 + .../Generated/Enums/ImPlotLegendFlags.gen.cs | 149 + .../Generated/Enums/ImPlotLineFlags.gen.cs | 118 + .../Generated/Enums/ImPlotLocation.gen.cs | 164 + .../Generated/Enums/ImPlotMarker.gen.cs | 209 + .../Enums/ImPlotMouseTextFlags.gen.cs | 85 + .../Enums/ImPlotPieChartFlags.gen.cs | 85 + .../Generated/Enums/ImPlotScale.gen.cs | 84 + .../Generated/Enums/ImPlotScatterFlags.gen.cs | 53 + .../Generated/Enums/ImPlotShadedFlags.gen.cs | 37 + .../Generated/Enums/ImPlotStairsFlags.gen.cs | 71 + .../Generated/Enums/ImPlotStemsFlags.gen.cs | 53 + .../Generated/Enums/ImPlotStyleVar.gen.cs | 466 + .../Generated/Enums/ImPlotSubplotFlags.gen.cs | 214 + .../Generated/Enums/ImPlotTextFlags.gen.cs | 53 + .../Generated/Functions/ImPlot.gen.cs | 20853 ++++++++++++ .../Generated/Functions/ImPlotRange.gen.cs | 50 + .../Generated/Functions/ImPlotRect.gen.cs | 114 + Brutal.ImPlot/Generated/InlineArrays.gen.cs | 20 + Brutal.ImPlot/Generated/Macros.gen.cs | 12 + .../Generated/PInvoke/AddColormap.gen.cs | 52 + .../Generated/PInvoke/Annotation.gen.cs | 60 + .../PInvoke/BeginAlignedPlots.gen.cs | 28 + .../PInvoke/BeginDragDropSourceAxis.gen.cs | 28 + .../PInvoke/BeginDragDropSourceItem.gen.cs | 28 + .../PInvoke/BeginDragDropSourcePlot.gen.cs | 28 + .../PInvoke/BeginDragDropTargetAxis.gen.cs | 27 + .../PInvoke/BeginDragDropTargetLegend.gen.cs | 27 + .../PInvoke/BeginDragDropTargetPlot.gen.cs | 28 + .../Generated/PInvoke/BeginLegendPopup.gen.cs | 27 + .../Generated/PInvoke/BeginPlot.gen.cs | 32 + .../Generated/PInvoke/BeginSubplots.gen.cs | 30 + .../Generated/PInvoke/BustColorCache.gen.cs | 33 + .../PInvoke/CancelPlotSelection.gen.cs | 27 + .../Generated/PInvoke/ColormapButton.gen.cs | 28 + .../Generated/PInvoke/ColormapIcon.gen.cs | 27 + .../Generated/PInvoke/ColormapScale.gen.cs | 38 + .../Generated/PInvoke/ColormapSlider.gen.cs | 35 + .../Generated/PInvoke/CreateContext.gen.cs | 27 + .../Generated/PInvoke/DestroyContext.gen.cs | 28 + .../Generated/PInvoke/DragLineX.gen.cs | 37 + .../Generated/PInvoke/DragLineY.gen.cs | 37 + .../Generated/PInvoke/DragPoint.gen.cs | 38 + .../Generated/PInvoke/DragRect.gen.cs | 39 + .../Generated/PInvoke/EndAlignedPlots.gen.cs | 27 + .../PInvoke/EndDragDropSource.gen.cs | 27 + .../PInvoke/EndDragDropTarget.gen.cs | 27 + .../Generated/PInvoke/EndLegendPopup.gen.cs | 27 + .../Generated/PInvoke/EndPlot.gen.cs | 28 + .../Generated/PInvoke/EndSubplots.gen.cs | 28 + .../Generated/PInvoke/GetColormapColor.gen.cs | 27 + .../Generated/PInvoke/GetColormapCount.gen.cs | 27 + .../Generated/PInvoke/GetColormapIndex.gen.cs | 27 + .../Generated/PInvoke/GetColormapName.gen.cs | 28 + .../Generated/PInvoke/GetColormapSize.gen.cs | 27 + .../PInvoke/GetCurrentContext.gen.cs | 27 + .../Generated/PInvoke/GetInputMap.gen.cs | 28 + .../Generated/PInvoke/GetLastItemColor.gen.cs | 27 + .../Generated/PInvoke/GetMarkerName.gen.cs | 27 + .../Generated/PInvoke/GetPlotDrawList.gen.cs | 27 + .../Generated/PInvoke/GetPlotLimits.gen.cs | 27 + .../Generated/PInvoke/GetPlotMousePos.gen.cs | 28 + .../Generated/PInvoke/GetPlotPos.gen.cs | 27 + .../Generated/PInvoke/GetPlotSelection.gen.cs | 27 + .../Generated/PInvoke/GetPlotSize.gen.cs | 27 + .../Generated/PInvoke/GetStyle.gen.cs | 27 + .../PInvoke/GetStyleColorName.gen.cs | 27 + .../Generated/PInvoke/HideNextItem.gen.cs | 28 + .../Generated/PInvoke/ImPlotRange.gen.cs | 54 + .../Generated/PInvoke/ImPlotRect.gen.cs | 110 + .../Generated/PInvoke/IsAxisHovered.gen.cs | 27 + .../PInvoke/IsLegendEntryHovered.gen.cs | 27 + .../Generated/PInvoke/IsPlotHovered.gen.cs | 27 + .../Generated/PInvoke/IsPlotSelected.gen.cs | 27 + .../PInvoke/IsSubplotsHovered.gen.cs | 27 + .../Generated/PInvoke/ItemIcon.gen.cs | 42 + .../Generated/PInvoke/MapInputDefault.gen.cs | 28 + .../Generated/PInvoke/MapInputReverse.gen.cs | 28 + .../PInvoke/NextColormapColor.gen.cs | 28 + .../Generated/PInvoke/PixelsToPlot.gen.cs | 46 + .../Generated/PInvoke/PlotBarGroups.gen.cs | 262 + .../Generated/PInvoke/PlotBars.gen.cs | 512 + .../Generated/PInvoke/PlotBarsG.gen.cs | 35 + .../Generated/PInvoke/PlotDigital.gen.cs | 262 + .../Generated/PInvoke/PlotDigitalG.gen.cs | 38 + .../Generated/PInvoke/PlotDummy.gen.cs | 27 + .../Generated/PInvoke/PlotErrorBars.gen.cs | 542 + .../Generated/PInvoke/PlotHeatmap.gen.cs | 302 + .../Generated/PInvoke/PlotHistogram.gen.cs | 262 + .../Generated/PInvoke/PlotHistogram2D.gen.cs | 272 + .../Generated/PInvoke/PlotImage.gen.cs | 38 + .../Generated/PInvoke/PlotInfLines.gen.cs | 242 + .../Generated/PInvoke/PlotLine.gen.cs | 502 + .../Generated/PInvoke/PlotLineG.gen.cs | 37 + .../Generated/PInvoke/PlotPieChart.gen.cs | 562 + .../Generated/PInvoke/PlotScatter.gen.cs | 502 + .../Generated/PInvoke/PlotScatterG.gen.cs | 37 + .../Generated/PInvoke/PlotShaded.gen.cs | 802 + .../Generated/PInvoke/PlotShadedG.gen.cs | 40 + .../Generated/PInvoke/PlotStairs.gen.cs | 522 + .../Generated/PInvoke/PlotStairsG.gen.cs | 38 + .../Generated/PInvoke/PlotStems.gen.cs | 522 + .../Generated/PInvoke/PlotText.gen.cs | 35 + .../Generated/PInvoke/PlotToPixels.gen.cs | 46 + .../Generated/PInvoke/PopColormap.gen.cs | 27 + .../Generated/PInvoke/PopPlotClipRect.gen.cs | 27 + .../Generated/PInvoke/PopStyleColor.gen.cs | 27 + .../Generated/PInvoke/PopStyleVar.gen.cs | 27 + .../Generated/PInvoke/PushColormap.gen.cs | 44 + .../Generated/PInvoke/PushPlotClipRect.gen.cs | 28 + .../Generated/PInvoke/PushStyleColor.gen.cs | 42 + .../Generated/PInvoke/PushStyleVar.gen.cs | 57 + .../Generated/PInvoke/SampleColormap.gen.cs | 27 + .../Generated/PInvoke/SetAxes.gen.cs | 27 + .../Generated/PInvoke/SetAxis.gen.cs | 27 + .../PInvoke/SetCurrentContext.gen.cs | 27 + .../Generated/PInvoke/SetImGuiContext.gen.cs | 30 + .../PInvoke/SetNextAxesLimits.gen.cs | 35 + .../Generated/PInvoke/SetNextAxesToFit.gen.cs | 27 + .../PInvoke/SetNextAxisLimits.gen.cs | 33 + .../Generated/PInvoke/SetNextAxisLinks.gen.cs | 28 + .../Generated/PInvoke/SetNextAxisToFit.gen.cs | 27 + .../PInvoke/SetNextErrorBarStyle.gen.cs | 28 + .../Generated/PInvoke/SetNextFillStyle.gen.cs | 28 + .../Generated/PInvoke/SetNextLineStyle.gen.cs | 28 + .../PInvoke/SetNextMarkerStyle.gen.cs | 34 + .../Generated/PInvoke/SetupAxes.gen.cs | 33 + .../Generated/PInvoke/SetupAxesLimits.gen.cs | 35 + .../Generated/PInvoke/SetupAxis.gen.cs | 28 + .../Generated/PInvoke/SetupAxisFormat.gen.cs | 44 + .../Generated/PInvoke/SetupAxisLimits.gen.cs | 29 + .../PInvoke/SetupAxisLimitsConstraints.gen.cs | 27 + .../Generated/PInvoke/SetupAxisLinks.gen.cs | 28 + .../Generated/PInvoke/SetupAxisScale.gen.cs | 43 + .../Generated/PInvoke/SetupAxisTicks.gen.cs | 58 + .../PInvoke/SetupAxisZoomConstraints.gen.cs | 27 + .../Generated/PInvoke/SetupFinish.gen.cs | 28 + .../Generated/PInvoke/SetupLegend.gen.cs | 28 + .../Generated/PInvoke/SetupMouseText.gen.cs | 27 + .../PInvoke/ShowColormapSelector.gen.cs | 27 + .../Generated/PInvoke/ShowDemoWindow.gen.cs | 27 + .../PInvoke/ShowInputMapSelector.gen.cs | 27 + .../PInvoke/ShowMetricsWindow.gen.cs | 27 + .../Generated/PInvoke/ShowStyleEditor.gen.cs | 27 + .../PInvoke/ShowStyleSelector.gen.cs | 27 + .../Generated/PInvoke/ShowUserGuide.gen.cs | 27 + .../Generated/PInvoke/StyleColorsAuto.gen.cs | 27 + .../PInvoke/StyleColorsClassic.gen.cs | 27 + .../Generated/PInvoke/StyleColorsDark.gen.cs | 27 + .../Generated/PInvoke/StyleColorsLight.gen.cs | 27 + Brutal.ImPlot/Generated/PInvoke/TagX.gen.cs | 42 + Brutal.ImPlot/Generated/PInvoke/TagY.gen.cs | 42 + .../Generated/Structs/ImPlotContext.gen.cs | 929 + .../Generated/Structs/ImPlotInputMap.gen.cs | 442 + .../Generated/Structs/ImPlotRange.gen.cs | 100 + .../Generated/Structs/ImPlotRect.gen.cs | 100 + .../Generated/Structs/ImPlotStyle.gen.cs | 1106 + Brutal.ImPlot/GlobalUsings.cs | 12 + Brutal.ImPlot/Manual/ImPlot.Internal.cs | 15 + Brutal.ImPlot/Manual/Macros.manual.cs | 6 + Brutal.ImPlot/Manual/PlotLine.manual.cs | 40 + Brutal.ImPlot/Manual/PlotShaded.manual.cs | 23 + Brutal.ImPlot/Manual/TODO.cs | 1 + Brutal.Interop/IInteropHandle.cs | 11 + Brutal.Interop/InteropHandleAttribute.cs | 6 + Brutal.Interop/InteropHandleMarshaller.cs | 18 + .../InteropNullableStringMarshaller.cs | 30 + Brutal.Interop/InteropStringMarshaller.cs | 178 + .../Generated/Classes/AABBTreeBuilder.gen.cs | 65 + .../Classes/AngleConstraintPart.gen.cs | 359 + .../Classes/AxisConstraintPart.gen.cs | 402 + Brutal.Jolt/Generated/Classes/Body.gen.cs | 1611 + .../Classes/BodyActivationListener.gen.cs | 58 + .../Classes/BodyCreationSettings.gen.cs | 1142 + .../Generated/Classes/BodyDrawFilter.gen.cs | 42 + .../Generated/Classes/BodyFilter.gen.cs | 56 + .../Generated/Classes/BodyInterface.gen.cs | 1841 ++ .../Classes/BodyLockInterface.gen.cs | 177 + .../Classes/BodyLockInterfaceLocking.gen.cs | 164 + .../Classes/BodyLockInterfaceNoLock.gen.cs | 164 + .../Classes/BodyLockMultiRead.gen.cs | 52 + .../Classes/BodyLockMultiWrite.gen.cs | 24 + .../Generated/Classes/BodyLockRead.gen.cs | 90 + .../Generated/Classes/BodyLockWrite.gen.cs | 67 + .../Generated/Classes/BodyManager.gen.cs | 1235 + Brutal.Jolt/Generated/Classes/BoxShape.gen.cs | 383 + .../Generated/Classes/BoxShapeSettings.gen.cs | 151 + .../Generated/Classes/BroadPhase.gen.cs | 460 + .../Classes/BroadPhaseBruteForce.gen.cs | 455 + .../Classes/BroadPhaseLayerFilter.gen.cs | 43 + .../Classes/BroadPhaseLayerInterface.gen.cs | 52 + .../BroadPhaseLayerInterfaceMask.gen.cs | 119 + .../BroadPhaseLayerInterfaceTable.gen.cs | 59 + .../Classes/BroadPhaseQuadTree.gen.cs | 455 + .../Generated/Classes/BroadPhaseQuery.gen.cs | 340 + .../Generated/Classes/ByteBuffer.gen.cs | 42 + .../Classes/CalculateSolverSteps.gen.cs | 80 + .../Generated/Classes/CapsuleShape.gen.cs | 384 + .../Classes/CapsuleShapeSettings.gen.cs | 172 + .../Classes/CastConvexVsTriangles.gen.cs | 48 + .../Classes/CastSphereVsTriangles.gen.cs | 48 + .../Generated/Classes/Character.gen.cs | 586 + .../Generated/Classes/CharacterBase.gen.cs | 378 + .../Classes/CharacterBaseSettings.gen.cs | 199 + .../Classes/CharacterContactListener.gen.cs | 305 + .../Classes/CharacterSettings.gen.cs | 215 + .../Generated/Classes/CharacterVirtual.gen.cs | 1615 + .../Classes/CharacterVirtualSettings.gen.cs | 591 + .../CharacterVsCharacterCollision.gen.cs | 215 + ...CharacterVsCharacterCollisionSimple.gen.cs | 162 + .../Classes/CollideConvexVsTriangles.gen.cs | 48 + .../Classes/CollideSettingsBase.gen.cs | 175 + .../Classes/CollideShapeSettings.gen.cs | 154 + .../CollideSoftBodyVertexIterator.gen.cs | 115 + .../Classes/CollideSphereVsTriangles.gen.cs | 48 + .../CollisionCollectorTraitsCastRay.gen.cs | 62 + .../CollisionCollectorTraitsCastShape.gen.cs | 63 + ...ollisionCollectorTraitsCollideShape.gen.cs | 63 + .../Classes/CollisionDispatch.gen.cs | 593 + .../Generated/Classes/CollisionGroup.gen.cs | 210 + .../Generated/Classes/CompoundShape.gen.cs | 643 + .../Classes/CompoundShapeSettings.gen.cs | 197 + .../Generated/Classes/ConeConstraint.gen.cs | 236 + .../Classes/ConeConstraintSettings.gen.cs | 243 + .../Generated/Classes/Constraint.gen.cs | 516 + .../Classes/ConstraintManager.gen.cs | 333 + .../Classes/ConstraintSettings.gen.cs | 281 + .../Generated/Classes/ContactListener.gen.cs | 184 + .../Classes/ConvexHullBuilder.gen.cs | 222 + .../Classes/ConvexHullBuilder2D.gen.cs | 144 + .../Generated/Classes/ConvexHullShape.gen.cs | 645 + .../Classes/ConvexHullShapeSettings.gen.cs | 241 + .../Generated/Classes/ConvexShape.gen.cs | 407 + .../Classes/ConvexShapeSettings.gen.cs | 124 + .../Generated/Classes/CylinderShape.gen.cs | 400 + .../Classes/CylinderShapeSettings.gen.cs | 168 + .../Generated/Classes/DebugRenderer.gen.cs | 904 + .../Classes/DebugRendererPlayback.gen.cs | 80 + .../Classes/DebugRendererRecorder.gen.cs | 547 + .../Classes/DebugRendererSimple.gen.cs | 297 + .../Generated/Classes/DecoratedShape.gen.cs | 301 + .../Classes/DecoratedShapeSettings.gen.cs | 122 + .../DefaultBroadPhaseLayerFilter.gen.cs | 49 + .../Classes/DefaultObjectLayerFilter.gen.cs | 47 + .../Classes/DistanceConstraint.gen.cs | 236 + .../Classes/DistanceConstraintSettings.gen.cs | 271 + .../Classes/DualAxisConstraintPart.gen.cs | 129 + .../Classes/DummyCalculateSolverSteps.gen.cs | 32 + .../Generated/Classes/DynMatrix.gen.cs | 60 + .../Classes/EPAConvexHullBuilder.gen.cs | 130 + .../Classes/EPAPenetrationDepth.gen.cs | 107 + Brutal.Jolt/Generated/Classes/Ellipse.gen.cs | 100 + .../Generated/Classes/EmptyShape.gen.cs | 347 + .../Classes/EmptyShapeSettings.gen.cs | 106 + .../FPExceptionDisableDivByZero.gen.cs | 26 + .../Classes/FPExceptionDisableInvalid.gen.cs | 26 + .../Classes/FPExceptionDisableOverflow.gen.cs | 26 + .../Classes/FPExceptionsEnable.gen.cs | 29 + .../Generated/Classes/FPFlushDenormals.gen.cs | 30 + Brutal.Jolt/Generated/Classes/Factory.gen.cs | 188 + .../Generated/Classes/FixedConstraint.gen.cs | 183 + .../Classes/FixedConstraintSettings.gen.cs | 288 + .../Generated/Classes/GJKClosestPoint.gen.cs | 30 + .../Generated/Classes/GearConstraint.gen.cs | 188 + .../Classes/GearConstraintPart.gen.cs | 219 + .../Classes/GearConstraintSettings.gen.cs | 226 + .../GetTrianglesContextMultiVertexList.gen.cs | 145 + .../GetTrianglesContextVertexList.gen.cs | 96 + .../Generated/Classes/GroupFilter.gen.cs | 114 + .../Generated/Classes/GroupFilterTable.gen.cs | 139 + .../Classes/GroupFilterToIDMap.gen.cs | 34 + .../Generated/Classes/HeightFieldShape.gen.cs | 742 + .../Classes/HeightFieldShapeSettings.gen.cs | 559 + .../Generated/Classes/HingeConstraint.gen.cs | 493 + .../Classes/HingeConstraintSettings.gen.cs | 419 + .../HingeRotationConstraintPart.gen.cs | 111 + .../Classes/IDToGroupFilterMap.gen.cs | 35 + .../Generated/Classes/IDToMaterialMap.gen.cs | 35 + .../Generated/Classes/IDToShapeMap.gen.cs | 35 + .../Classes/IDToSharedSettingsMap.gen.cs | 35 + .../Classes/IgnoreMultipleBodiesFilter.gen.cs | 77 + .../Classes/IgnoreSingleBodyFilter.gen.cs | 49 + .../IgnoreSingleBodyFilterChained.gen.cs | 50 + .../IndependentAxisConstraintPart.gen.cs | 271 + .../InternalEdgeRemovingCollector.gen.cs | 244 + .../Generated/Classes/IslandBuilder.gen.cs | 211 + .../Generated/Classes/JobSystem.gen.cs | 96 + .../Classes/JobSystemSingleThreaded.gen.cs | 76 + .../Classes/JobSystemThreadPool.gen.cs | 157 + .../Classes/JobSystemWithBarrier.gen.cs | 65 + .../Generated/Classes/LFHMAllocator.gen.cs | 83 + .../Classes/LFHMAllocatorContext.gen.cs | 65 + .../Classes/LargeIslandSplitter.gen.cs | 280 + .../Generated/Classes/LinearCurve.gen.cs | 161 + .../ManagedBodyActivationListener.gen.cs | 233 + .../Classes/ManagedBodyDrawFilter.gen.cs | 199 + .../Classes/ManagedBodyFilter.gen.cs | 231 + .../ManagedBroadPhaseLayerFilter.gen.cs | 200 + .../ManagedCharacterContactListener.gen.cs | 840 + .../Classes/ManagedContactListener.gen.cs | 444 + .../Classes/ManagedDebugRendererSimple.gen.cs | 297 + .../Classes/ManagedObjectLayerFilter.gen.cs | 200 + .../ManagedObjectLayerPairFilter.gen.cs | 199 + ...anagedObjectVsBroadPhaseLayerFilter.gen.cs | 201 + .../Classes/ManagedPhysicsStepListener.gen.cs | 204 + .../Classes/ManagedShapeFilter.gen.cs | 267 + .../Classes/ManagedSimShapeFilter.gen.cs | 240 + .../ManagedSoftBodyContactListener.gen.cs | 281 + .../Classes/ManagedStateRecorderFilter.gen.cs | 292 + .../Generated/Classes/MassProperties.gen.cs | 211 + .../Generated/Classes/MaterialToIDMap.gen.cs | 34 + .../Generated/Classes/MeshShape.gen.cs | 497 + .../Classes/MeshShapeSettings.gen.cs | 478 + .../Generated/Classes/MortonCode.gen.cs | 54 + .../Generated/Classes/MotionProperties.gen.cs | 879 + .../Generated/Classes/MotorSettings.gen.cs | 334 + .../Classes/MotorcycleController.gen.cs | 339 + .../MotorcycleControllerSettings.gen.cs | 262 + .../Classes/MutableCompoundShape.gen.cs | 632 + .../MutableCompoundShapeSettings.gen.cs | 77 + .../Generated/Classes/NarrowPhaseQuery.gen.cs | 645 + .../Classes/ObjectLayerFilter.gen.cs | 43 + .../Classes/ObjectLayerPairFilter.gen.cs | 44 + .../Classes/ObjectLayerPairFilterMask.gen.cs | 112 + .../Classes/ObjectLayerPairFilterTable.gen.cs | 100 + .../ObjectVsBroadPhaseLayerFilter.gen.cs | 43 + .../ObjectVsBroadPhaseLayerFilterMask.gen.cs | 49 + .../ObjectVsBroadPhaseLayerFilterTable.gen.cs | 68 + .../Classes/OffsetCenterOfMassShape.gen.cs | 357 + .../OffsetCenterOfMassShapeSettings.gen.cs | 141 + .../Generated/Classes/OrientedBox.gen.cs | 146 + .../Generated/Classes/PathConstraint.gen.cs | 364 + .../Classes/PathConstraintPath.gen.cs | 211 + .../Classes/PathConstraintPathHermite.gen.cs | 153 + .../Classes/PathConstraintSettings.gen.cs | 316 + .../Generated/Classes/PhysicsLock.gen.cs | 30 + .../Generated/Classes/PhysicsMaterial.gen.cs | 237 + .../Classes/PhysicsMaterialSimple.gen.cs | 91 + .../Generated/Classes/PhysicsScene.gen.cs | 418 + .../Classes/PhysicsStepListener.gen.cs | 45 + .../Classes/PhysicsStepListenerContext.gen.cs | 139 + .../Generated/Classes/PhysicsSystem.gen.cs | 1208 + .../Classes/PhysicsUpdateContext.gen.cs | 376 + .../Generated/Classes/PlaneShape.gen.cs | 394 + .../Classes/PlaneShapeSettings.gen.cs | 187 + .../Generated/Classes/PointConstraint.gen.cs | 228 + .../Classes/PointConstraintPart.gen.cs | 206 + .../Classes/PointConstraintSettings.gen.cs | 179 + ...PolyhedronSubmergedVolumeCalculator.gen.cs | 97 + .../Generated/Classes/PulleyConstraint.gen.cs | 219 + .../Classes/PulleyConstraintSettings.gen.cs | 315 + Brutal.Jolt/Generated/Classes/QuadTree.gen.cs | 97 + Brutal.Jolt/Generated/Classes/RTTI.gen.cs | 314 + .../Classes/RackAndPinionConstraint.gen.cs | 192 + .../RackAndPinionConstraintPart.gen.cs | 219 + .../RackAndPinionConstraintSettings.gen.cs | 230 + Brutal.Jolt/Generated/Classes/Ragdoll.gen.cs | 579 + .../Generated/Classes/RagdollSettings.gen.cs | 522 + .../Generated/Classes/RayCastSettings.gen.cs | 127 + .../Generated/Classes/RayInvDirection.gen.cs | 115 + .../Classes/ReversedShapeFilter.gen.cs | 57 + .../Classes/RotatedTranslatedShape.gen.cs | 383 + .../RotatedTranslatedShapeSettings.gen.cs | 168 + .../RotationEulerConstraintPart.gen.cs | 237 + .../Classes/RotationQuatConstraintPart.gen.cs | 236 + .../Generated/Classes/ScaledShape.gen.cs | 358 + .../Classes/ScaledShapeSettings.gen.cs | 135 + .../Generated/Classes/Semaphore.gen.cs | 79 + Brutal.Jolt/Generated/Classes/Shape.gen.cs | 1335 + .../Classes/ShapeCastSettings.gen.cs | 223 + .../Generated/Classes/ShapeFilter.gen.cs | 111 + .../Generated/Classes/ShapeFunctions.gen.cs | 60 + .../Generated/Classes/ShapeSettings.gen.cs | 132 + .../Generated/Classes/ShapeToIDMap.gen.cs | 34 + .../Classes/SharedSettingsToIDMap.gen.cs | 34 + .../Generated/Classes/SimShapeFilter.gen.cs | 78 + .../Classes/SimShapeFilterWrapper.gen.cs | 106 + .../Generated/Classes/SixDOFConstraint.gen.cs | 643 + .../Classes/SixDOFConstraintSettings.gen.cs | 531 + .../Classes/SkeletalAnimation.gen.cs | 242 + Brutal.Jolt/Generated/Classes/Skeleton.gen.cs | 237 + .../Generated/Classes/SkeletonMapper.gen.cs | 717 + .../Generated/Classes/SkeletonPose.gen.cs | 315 + .../Generated/Classes/SliderConstraint.gen.cs | 395 + .../Classes/SliderConstraintSettings.gen.cs | 459 + .../Classes/SoftBodyContactListener.gen.cs | 87 + .../Classes/SoftBodyCreationSettings.gen.cs | 677 + .../Generated/Classes/SoftBodyManifold.gen.cs | 141 + .../Classes/SoftBodyMotionProperties.gen.cs | 1249 + .../Generated/Classes/SoftBodyShape.gen.cs | 335 + .../Classes/SoftBodySharedSettings.gen.cs | 1751 + .../Classes/SoftBodyUpdateContext.gen.cs | 459 + .../SpecifiedBroadPhaseLayerFilter.gen.cs | 47 + .../Classes/SpecifiedObjectLayerFilter.gen.cs | 47 + Brutal.Jolt/Generated/Classes/Sphere.gen.cs | 122 + .../Generated/Classes/SphereShape.gen.cs | 367 + .../Classes/SphereShapeSettings.gen.cs | 121 + .../Generated/Classes/SpringPart.gen.cs | 242 + .../Generated/Classes/SpringSettings.gen.cs | 285 + .../Generated/Classes/StateRecorder.gen.cs | 117 + .../Classes/StateRecorderFilter.gen.cs | 84 + .../Classes/StateRecorderImpl.gen.cs | 187 + .../Classes/StaticCompoundShape.gen.cs | 464 + .../StaticCompoundShapeSettings.gen.cs | 103 + Brutal.Jolt/Generated/Classes/StreamIn.gen.cs | 106 + .../Generated/Classes/StreamInWrapper.gen.cs | 60 + .../Generated/Classes/StreamOut.gen.cs | 91 + .../Generated/Classes/StreamOutWrapper.gen.cs | 57 + .../Classes/SubShapeIDCreator.gen.cs | 75 + .../Classes/SwingTwistConstraint.gen.cs | 550 + .../Classes/SwingTwistConstraintPart.gen.cs | 446 + .../SwingTwistConstraintSettings.gen.cs | 539 + .../Classes/TaperedCapsuleShape.gen.cs | 380 + .../TaperedCapsuleShapeSettings.gen.cs | 202 + .../Classes/TaperedCylinderShape.gen.cs | 393 + .../TaperedCylinderShapeSettings.gen.cs | 196 + .../Generated/Classes/TempAllocator.gen.cs | 68 + .../Classes/TempAllocatorImpl.gen.cs | 140 + ...TempAllocatorImplWithMallocFallback.gen.cs | 78 + .../Classes/TempAllocatorMalloc.gen.cs | 65 + .../Classes/TrackedVehicleController.gen.cs | 246 + .../TrackedVehicleControllerSettings.gen.cs | 173 + .../Generated/Classes/TransformedShape.gen.cs | 854 + .../Generated/Classes/TriangleShape.gen.cs | 408 + .../Classes/TriangleShapeSettings.gen.cs | 188 + .../Generated/Classes/TriangleSplitter.gen.cs | 203 + .../Classes/TriangleSplitterBinning.gen.cs | 188 + .../Classes/TriangleSplitterMean.gen.cs | 86 + .../Classes/TwoBodyConstraint.gen.cs | 191 + .../Classes/TwoBodyConstraintSettings.gen.cs | 108 + .../Classes/VehicleCollisionTester.gen.cs | 282 + .../VehicleCollisionTesterCastCylinder.gen.cs | 147 + .../VehicleCollisionTesterCastSphere.gen.cs | 151 + .../Classes/VehicleCollisionTesterRay.gen.cs | 149 + .../Classes/VehicleConstraint.gen.cs | 691 + .../Classes/VehicleConstraintSettings.gen.cs | 296 + .../Classes/VehicleController.gen.cs | 88 + .../Classes/VehicleControllerSettings.gen.cs | 91 + .../Generated/Classes/VehicleEngine.gen.cs | 245 + .../Classes/VehicleEngineSettings.gen.cs | 239 + .../Generated/Classes/VehicleTrack.gen.cs | 101 + .../Classes/VehicleTrackSettings.gen.cs | 231 + .../Classes/VehicleTransmission.gen.cs | 207 + .../VehicleTransmissionSettings.gen.cs | 333 + Brutal.Jolt/Generated/Classes/Wheel.gen.cs | 325 + .../Generated/Classes/WheelSettings.gen.cs | 468 + .../Generated/Classes/WheelSettingsTV.gen.cs | 187 + .../Generated/Classes/WheelSettingsWV.gen.cs | 370 + Brutal.Jolt/Generated/Classes/WheelTV.gen.cs | 269 + Brutal.Jolt/Generated/Classes/WheelWV.gen.cs | 293 + .../Classes/WheeledVehicleController.gen.cs | 325 + .../WheeledVehicleControllerSettings.gen.cs | 216 + Brutal.Jolt/Generated/Enums/Activation.gen.cs | 46 + .../Generated/Enums/ActiveEdgeMode.gen.cs | 47 + .../Generated/Enums/AllowedDOFs.gen.cs | 138 + .../Generated/Enums/BackFaceMode.gen.cs | 46 + Brutal.Jolt/Generated/Enums/BodyType.gen.cs | 46 + Brutal.Jolt/Generated/Enums/CanSleep.gen.cs | 46 + .../Generated/Enums/CollectFacesMode.gen.cs | 46 + .../Generated/Enums/ConstraintSpace.gen.cs | 49 + .../Generated/Enums/ConstraintSubType.gen.cs | 193 + .../Generated/Enums/ConstraintType.gen.cs | 40 + .../Generated/Enums/MotionQuality.gen.cs | 69 + Brutal.Jolt/Generated/Enums/MotionType.gen.cs | 59 + Brutal.Jolt/Generated/Enums/MotorState.gen.cs | 71 + .../Generated/Enums/ObjectStreamType.gen.cs | 18 + .../Enums/OverrideMassProperties.gen.cs | 60 + .../Enums/PathRotationConstraintType.gen.cs | 98 + .../Generated/Enums/PhysicsUpdateError.gen.cs | 77 + .../Generated/Enums/ShapeSubType.gen.cs | 381 + Brutal.Jolt/Generated/Enums/ShapeType.gen.cs | 169 + .../Enums/SoftBodyConstraintColor.gen.cs | 60 + .../Enums/SoftBodyValidateResult.gen.cs | 46 + Brutal.Jolt/Generated/Enums/SpringMode.gen.cs | 60 + .../Generated/Enums/StateRecorderState.gen.cs | 98 + Brutal.Jolt/Generated/Enums/SwingType.gen.cs | 47 + Brutal.Jolt/Generated/Enums/TrackSide.gen.cs | 50 + .../Generated/Enums/TransmissionMode.gen.cs | 46 + .../Generated/Enums/ValidateResult.gen.cs | 75 + Brutal.Jolt/Generated/GlobalUsings.gen.cs | 58 + Brutal.Jolt/Generated/InlineArrays.gen.cs | 261 + Brutal.Jolt/Generated/Jolt.gen.cs | 1276 + .../Generated/PInvoke/AABBTreeBuilder.gen.cs | 29 + Brutal.Jolt/Generated/PInvoke/AABox.gen.cs | 435 + .../PInvoke/AngleConstraintPart.gen.cs | 139 + .../PInvoke/AxisConstraintPart.gen.cs | 145 + Brutal.Jolt/Generated/PInvoke/Body.gen.cs | 454 + .../PInvoke/BodyActivationListener.gen.cs | 52 + .../PInvoke/BodyCreationSettings.gen.cs | 483 + .../Generated/PInvoke/BodyDrawFilter.gen.cs | 40 + .../Generated/PInvoke/BodyFilter.gen.cs | 50 + .../Generated/PInvoke/BodyInterface.gen.cs | 657 + .../PInvoke/BodyLockInterface.gen.cs | 63 + .../PInvoke/BodyLockInterfaceLocking.gen.cs | 59 + .../PInvoke/BodyLockInterfaceNoLock.gen.cs | 59 + .../Generated/PInvoke/BodyLockRead.gen.cs | 38 + .../Generated/PInvoke/BodyLockWrite.gen.cs | 38 + .../Generated/PInvoke/BodyManager.gen.cs | 223 + Brutal.Jolt/Generated/PInvoke/BoxShape.gen.cs | 43 + .../Generated/PInvoke/BoxShapeSettings.gen.cs | 47 + .../Generated/PInvoke/BroadPhase.gen.cs | 170 + .../PInvoke/BroadPhaseBruteForce.gen.cs | 274 + .../PInvoke/BroadPhaseCastResult.gen.cs | 44 + .../PInvoke/BroadPhaseLayerFilter.gen.cs | 43 + .../PInvoke/BroadPhaseLayerInterface.gen.cs | 26 + .../BroadPhaseLayerInterfaceMask.gen.cs | 41 + .../BroadPhaseLayerInterfaceTable.gen.cs | 33 + .../PInvoke/BroadPhaseQuadTree.gen.cs | 274 + .../Generated/PInvoke/BroadPhaseQuery.gen.cs | 239 + .../Generated/PInvoke/ByteBuffer.gen.cs | 25 + .../PInvoke/CalculateSolverSteps.gen.cs | 34 + .../Generated/PInvoke/CapsuleShape.gen.cs | 43 + .../PInvoke/CapsuleShapeSettings.gen.cs | 58 + .../PInvoke/CastConvexVsTriangles.gen.cs | 26 + .../PInvoke/CastSphereVsTriangles.gen.cs | 26 + .../Generated/PInvoke/Character.gen.cs | 254 + .../Generated/PInvoke/CharacterBase.gen.cs | 111 + .../PInvoke/CharacterBaseSettings.gen.cs | 82 + .../Generated/PInvoke/CharacterContact.gen.cs | 40 + .../PInvoke/CharacterContactKey.gen.cs | 89 + .../PInvoke/CharacterContactListener.gen.cs | 248 + .../PInvoke/CharacterSettings.gen.cs | 69 + .../Generated/PInvoke/CharacterVirtual.gen.cs | 469 + .../PInvoke/CharacterVirtualSettings.gen.cs | 241 + .../CharacterVsCharacterCollision.gen.cs | 163 + ...CharacterVsCharacterCollisionSimple.gen.cs | 44 + .../PInvoke/CollideConvexVsTriangles.gen.cs | 26 + .../PInvoke/CollidePointResult.gen.cs | 30 + .../PInvoke/CollideSettingsBase.gen.cs | 83 + .../PInvoke/CollideShapeResult.gen.cs | 60 + .../PInvoke/CollideShapeSettings.gen.cs | 62 + .../CollideSoftBodyVertexIterator.gen.cs | 51 + .../PInvoke/CollideSphereVsTriangles.gen.cs | 26 + .../CollisionCollectorTraitsCastRay.gen.cs | 29 + .../CollisionCollectorTraitsCastShape.gen.cs | 31 + ...ollisionCollectorTraitsCollideShape.gen.cs | 31 + .../PInvoke/CollisionDispatch.gen.cs | 435 + .../Generated/PInvoke/CollisionGroup.gen.cs | 78 + .../Generated/PInvoke/CompoundShape.gen.cs | 92 + .../PInvoke/CompoundShapeSettings.gen.cs | 42 + .../Generated/PInvoke/ConeConstraint.gen.cs | 39 + .../PInvoke/ConeConstraintSettings.gen.cs | 84 + .../Generated/PInvoke/Constraint.gen.cs | 200 + .../PInvoke/ConstraintManager.gen.cs | 122 + .../PInvoke/ConstraintSettings.gen.cs | 127 + .../Generated/PInvoke/ContactListener.gen.cs | 91 + .../Generated/PInvoke/ContactManifold.gen.cs | 29 + .../PInvoke/ConvexHullBuilder.gen.cs | 42 + .../PInvoke/ConvexHullBuilder2D.gen.cs | 37 + .../Generated/PInvoke/ConvexHullShape.gen.cs | 90 + .../PInvoke/ConvexHullShapeSettings.gen.cs | 79 + .../Generated/PInvoke/ConvexShape.gen.cs | 35 + .../PInvoke/ConvexShapeSettings.gen.cs | 32 + .../Generated/PInvoke/CylinderShape.gen.cs | 48 + .../PInvoke/CylinderShapeSettings.gen.cs | 58 + .../Generated/PInvoke/DebugRenderer.gen.cs | 272 + .../PInvoke/DebugRendererPlayback.gen.cs | 34 + .../PInvoke/DebugRendererRecorder.gen.cs | 47 + .../PInvoke/DebugRendererSimple.gen.cs | 57 + .../Generated/PInvoke/DecoratedShape.gen.cs | 19 + .../PInvoke/DecoratedShapeSettings.gen.cs | 37 + .../DefaultBroadPhaseLayerFilter.gen.cs | 25 + .../PInvoke/DefaultObjectLayerFilter.gen.cs | 25 + .../PInvoke/DistanceConstraint.gen.cs | 54 + .../PInvoke/DistanceConstraintSettings.gen.cs | 96 + .../PInvoke/DualAxisConstraintPart.gen.cs | 76 + .../PInvoke/DummyCalculateSolverSteps.gen.cs | 21 + .../Generated/PInvoke/DynMatrix.gen.cs | 30 + .../PInvoke/EPAConvexHullBuilder.gen.cs | 48 + .../PInvoke/EPAPenetrationDepth.gen.cs | 21 + Brutal.Jolt/Generated/PInvoke/Ellipse.gen.cs | 34 + .../Generated/PInvoke/EmptyShape.gen.cs | 31 + .../PInvoke/EmptyShapeSettings.gen.cs | 33 + .../FPExceptionDisableDivByZero.gen.cs | 21 + .../PInvoke/FPExceptionDisableInvalid.gen.cs | 21 + .../PInvoke/FPExceptionDisableOverflow.gen.cs | 21 + .../PInvoke/FPExceptionsEnable.gen.cs | 21 + .../Generated/PInvoke/FPFlushDenormals.gen.cs | 21 + Brutal.Jolt/Generated/PInvoke/Factory.gen.cs | 57 + .../Generated/PInvoke/FixedConstraint.gen.cs | 31 + .../PInvoke/FixedConstraintSettings.gen.cs | 104 + .../Generated/PInvoke/GJKClosestPoint.gen.cs | 21 + .../Generated/PInvoke/GearConstraint.gen.cs | 35 + .../PInvoke/GearConstraintPart.gen.cs | 74 + .../PInvoke/GearConstraintSettings.gen.cs | 69 + .../GetTrianglesContextMultiVertexList.gen.cs | 45 + .../GetTrianglesContextVertexList.gen.cs | 39 + .../Generated/PInvoke/GroupFilter.gen.cs | 63 + .../Generated/PInvoke/GroupFilterTable.gen.cs | 43 + .../Generated/PInvoke/HeightFieldShape.gen.cs | 143 + .../PInvoke/HeightFieldShapeSettings.gen.cs | 199 + .../Generated/PInvoke/HingeConstraint.gen.cs | 144 + .../PInvoke/HingeConstraintSettings.gen.cs | 160 + .../HingeRotationConstraintPart.gen.cs | 63 + .../PInvoke/IgnoreMultipleBodiesFilter.gen.cs | 36 + .../PInvoke/IgnoreSingleBodyFilter.gen.cs | 22 + .../IgnoreSingleBodyFilterChained.gen.cs | 25 + .../IndependentAxisConstraintPart.gen.cs | 88 + .../Generated/PInvoke/IndexedTriangle.gen.cs | 58 + .../PInvoke/IndexedTriangleNoMaterial.gen.cs | 137 + .../InternalEdgeRemovingCollector.gen.cs | 107 + .../Generated/PInvoke/IslandBuilder.gen.cs | 96 + .../Generated/PInvoke/JobSystem.gen.cs | 19 + .../PInvoke/JobSystemSingleThreaded.gen.cs | 30 + .../PInvoke/JobSystemThreadPool.gen.cs | 91 + .../PInvoke/JobSystemWithBarrier.gen.cs | 19 + Brutal.Jolt/Generated/PInvoke/Jolt.gen.cs | 565 + .../Generated/PInvoke/LFHMAllocator.gen.cs | 38 + .../PInvoke/LFHMAllocatorContext.gen.cs | 34 + .../PInvoke/LargeIslandSplitter.gen.cs | 72 + .../Generated/PInvoke/LinearCurve.gen.cs | 57 + .../Generated/PInvoke/MassProperties.gen.cs | 85 + .../Generated/PInvoke/MeshShape.gen.cs | 55 + .../PInvoke/MeshShapeSettings.gen.cs | 136 + .../Generated/PInvoke/MortonCode.gen.cs | 29 + .../Generated/PInvoke/MotionProperties.gen.cs | 340 + .../Generated/PInvoke/MotorSettings.gen.cs | 125 + .../PInvoke/MotorcycleController.gen.cs | 112 + .../MotorcycleControllerSettings.gen.cs | 112 + .../PInvoke/MutableCompoundShape.gen.cs | 88 + .../MutableCompoundShapeSettings.gen.cs | 18 + .../Generated/PInvoke/NarrowPhaseQuery.gen.cs | 416 + .../PInvoke/ObjectLayerFilter.gen.cs | 40 + .../PInvoke/ObjectLayerPairFilter.gen.cs | 44 + .../PInvoke/ObjectLayerPairFilterMask.gen.cs | 49 + .../PInvoke/ObjectLayerPairFilterTable.gen.cs | 50 + .../ObjectVsBroadPhaseLayerFilter.gen.cs | 44 + .../ObjectVsBroadPhaseLayerFilterMask.gen.cs | 26 + .../ObjectVsBroadPhaseLayerFilterTable.gen.cs | 29 + .../PInvoke/OffsetCenterOfMassShape.gen.cs | 37 + .../OffsetCenterOfMassShapeSettings.gen.cs | 48 + .../Generated/PInvoke/OrientedBox.gen.cs | 58 + .../Generated/PInvoke/PathConstraint.gen.cs | 95 + .../PInvoke/PathConstraintPath.gen.cs | 94 + .../PInvoke/PathConstraintPathHermite.gen.cs | 27 + .../PInvoke/PathConstraintSettings.gen.cs | 106 + .../Generated/PInvoke/PhysicsLock.gen.cs | 21 + .../Generated/PInvoke/PhysicsMaterial.gen.cs | 101 + .../PInvoke/PhysicsMaterialSimple.gen.cs | 23 + .../Generated/PInvoke/PhysicsScene.gen.cs | 137 + .../PInvoke/PhysicsStepListener.gen.cs | 37 + .../PInvoke/PhysicsStepListenerContext.gen.cs | 77 + .../Generated/PInvoke/PhysicsSystem.gen.cs | 492 + .../PInvoke/PhysicsUpdateContext.gen.cs | 139 + Brutal.Jolt/Generated/PInvoke/Plane.gen.cs | 179 + .../Generated/PInvoke/PlaneShape.gen.cs | 51 + .../PInvoke/PlaneShapeSettings.gen.cs | 57 + .../Generated/PInvoke/PointConstraint.gen.cs | 51 + .../PInvoke/PointConstraintPart.gen.cs | 71 + .../PInvoke/PointConstraintSettings.gen.cs | 51 + ...PolyhedronSubmergedVolumeCalculator.gen.cs | 50 + .../Generated/PInvoke/PulleyConstraint.gen.cs | 47 + .../PInvoke/PulleyConstraintSettings.gen.cs | 119 + Brutal.Jolt/Generated/PInvoke/QuadTree.gen.cs | 41 + Brutal.Jolt/Generated/PInvoke/RTTI.gen.cs | 59 + .../PInvoke/RackAndPinionConstraint.gen.cs | 35 + .../RackAndPinionConstraintPart.gen.cs | 74 + .../RackAndPinionConstraintSettings.gen.cs | 85 + Brutal.Jolt/Generated/PInvoke/Ragdoll.gen.cs | 195 + .../Generated/PInvoke/RagdollSettings.gen.cs | 180 + .../Generated/PInvoke/RayCastSettings.gen.cs | 58 + .../Generated/PInvoke/RayInvDirection.gen.cs | 50 + .../PInvoke/ReversedShapeFilter.gen.cs | 22 + .../PInvoke/RotatedTranslatedShape.gen.cs | 52 + .../RotatedTranslatedShapeSettings.gen.cs | 65 + .../RotationEulerConstraintPart.gen.cs | 95 + .../PInvoke/RotationQuatConstraintPart.gen.cs | 75 + .../Generated/PInvoke/ScaledShape.gen.cs | 35 + .../PInvoke/ScaledShapeSettings.gen.cs | 37 + .../Generated/PInvoke/Semaphore.gen.cs | 34 + Brutal.Jolt/Generated/PInvoke/Shape.gen.cs | 530 + .../Generated/PInvoke/ShapeCastResult.gen.cs | 71 + .../PInvoke/ShapeCastSettings.gen.cs | 89 + .../Generated/PInvoke/ShapeFilter.gen.cs | 69 + .../Generated/PInvoke/ShapeFunctions.gen.cs | 29 + .../Generated/PInvoke/ShapeSettings.gen.cs | 65 + .../Generated/PInvoke/SimShapeFilter.gen.cs | 48 + .../PInvoke/SimShapeFilterWrapper.gen.cs | 48 + .../Generated/PInvoke/SixDOFConstraint.gen.cs | 211 + .../PInvoke/SixDOFConstraintSettings.gen.cs | 166 + .../PInvoke/SkeletalAnimation.gen.cs | 98 + Brutal.Jolt/Generated/PInvoke/Skeleton.gen.cs | 104 + .../Generated/PInvoke/SkeletonMapper.gen.cs | 169 + .../Generated/PInvoke/SkeletonPose.gen.cs | 92 + .../Generated/PInvoke/SliderConstraint.gen.cs | 110 + .../PInvoke/SliderConstraintSettings.gen.cs | 190 + .../PInvoke/SoftBodyContactListener.gen.cs | 59 + .../PInvoke/SoftBodyCreationSettings.gen.cs | 312 + .../Generated/PInvoke/SoftBodyManifold.gen.cs | 62 + .../PInvoke/SoftBodyMotionProperties.gen.cs | 357 + .../Generated/PInvoke/SoftBodyShape.gen.cs | 31 + .../PInvoke/SoftBodySharedSettings.gen.cs | 287 + .../PInvoke/SoftBodyUpdateContext.gen.cs | 153 + .../Generated/PInvoke/SoftBodyVertex.gen.cs | 47 + .../SpecifiedBroadPhaseLayerFilter.gen.cs | 22 + .../PInvoke/SpecifiedObjectLayerFilter.gen.cs | 22 + Brutal.Jolt/Generated/PInvoke/Sphere.gen.cs | 50 + .../Generated/PInvoke/SphereShape.gen.cs | 35 + .../PInvoke/SphereShapeSettings.gen.cs | 36 + .../Generated/PInvoke/SpringPart.gen.cs | 87 + .../Generated/PInvoke/SpringSettings.gen.cs | 86 + .../Generated/PInvoke/StateRecorder.gen.cs | 34 + .../PInvoke/StateRecorderFilter.gen.cs | 81 + .../PInvoke/StateRecorderImpl.gen.cs | 60 + .../PInvoke/StaticCompoundShape.gen.cs | 30 + .../StaticCompoundShapeSettings.gen.cs | 41 + Brutal.Jolt/Generated/PInvoke/StreamIn.gen.cs | 39 + .../Generated/PInvoke/StreamInWrapper.gen.cs | 19 + .../Generated/PInvoke/StreamOut.gen.cs | 35 + .../Generated/PInvoke/StreamOutWrapper.gen.cs | 19 + .../PInvoke/SubShapeIDCreator.gen.cs | 37 + .../Generated/PInvoke/SubShapeIDPair.gen.cs | 84 + .../PInvoke/SwingTwistConstraint.gen.cs | 180 + .../PInvoke/SwingTwistConstraintPart.gen.cs | 143 + .../SwingTwistConstraintSettings.gen.cs | 227 + .../PInvoke/TaperedCapsuleShape.gen.cs | 41 + .../TaperedCapsuleShapeSettings.gen.cs | 77 + .../PInvoke/TaperedCylinderShape.gen.cs | 45 + .../TaperedCylinderShapeSettings.gen.cs | 81 + .../Generated/PInvoke/TempAllocator.gen.cs | 27 + .../PInvoke/TempAllocatorImpl.gen.cs | 50 + ...TempAllocatorImplWithMallocFallback.gen.cs | 41 + .../PInvoke/TempAllocatorMalloc.gen.cs | 29 + .../PInvoke/TrackedVehicleController.gen.cs | 104 + .../TrackedVehicleControllerSettings.gen.cs | 52 + .../Generated/PInvoke/TransformedShape.gen.cs | 440 + Brutal.Jolt/Generated/PInvoke/Triangle.gen.cs | 44 + .../Generated/PInvoke/TriangleShape.gen.cs | 53 + .../PInvoke/TriangleShapeSettings.gen.cs | 69 + .../Generated/PInvoke/TriangleSplitter.gen.cs | 54 + .../PInvoke/TriangleSplitterBinning.gen.cs | 30 + .../PInvoke/TriangleSplitterMean.gen.cs | 27 + .../PInvoke/TwoBodyConstraint.gen.cs | 31 + .../PInvoke/TwoBodyConstraintSettings.gen.cs | 23 + .../PInvoke/VehicleAntiRollBar.gen.cs | 49 + .../PInvoke/VehicleCollisionTester.gen.cs | 108 + .../VehicleCollisionTesterCastCylinder.gen.cs | 22 + .../VehicleCollisionTesterCastSphere.gen.cs | 24 + .../PInvoke/VehicleCollisionTesterRay.gen.cs | 23 + .../PInvoke/VehicleConstraint.gen.cs | 266 + .../PInvoke/VehicleConstraintSettings.gen.cs | 94 + .../PInvoke/VehicleController.gen.cs | 39 + .../PInvoke/VehicleControllerSettings.gen.cs | 46 + .../VehicleDifferentialSettings.gen.cs | 78 + .../Generated/PInvoke/VehicleEngine.gen.cs | 74 + .../PInvoke/VehicleEngineSettings.gen.cs | 97 + .../Generated/PInvoke/VehicleTrack.gen.cs | 31 + .../PInvoke/VehicleTrackSettings.gen.cs | 103 + .../PInvoke/VehicleTransmission.gen.cs | 59 + .../VehicleTransmissionSettings.gen.cs | 160 + Brutal.Jolt/Generated/PInvoke/Wheel.gen.cs | 113 + .../Generated/PInvoke/WheelSettings.gen.cs | 174 + .../Generated/PInvoke/WheelSettingsTV.gen.cs | 38 + .../Generated/PInvoke/WheelSettingsWV.gen.cs | 85 + Brutal.Jolt/Generated/PInvoke/WheelTV.gen.cs | 80 + Brutal.Jolt/Generated/PInvoke/WheelWV.gen.cs | 90 + .../PInvoke/WheeledVehicleController.gen.cs | 157 + .../WheeledVehicleControllerSettings.gen.cs | 74 + .../Structs/AABBTreeBuilderStats.gen.cs | 182 + Brutal.Jolt/Generated/Structs/AABox.gen.cs | 515 + .../Generated/Structs/AABoxCast.gen.cs | 53 + Brutal.Jolt/Generated/Structs/BodyPair.gen.cs | 47 + .../Structs/BroadPhaseCastResult.gen.cs | 81 + .../Generated/Structs/CharacterContact.gen.cs | 271 + .../Structs/CharacterContactKey.gen.cs | 150 + .../Structs/CharacterContactSettings.gen.cs | 55 + .../Structs/CollidePointResult.gen.cs | 68 + .../Structs/CollideShapeResult.gen.cs | 227 + .../Structs/CollisionEstimationResult.gen.cs | 179 + .../Generated/Structs/ContactManifold.gen.cs | 139 + .../Generated/Structs/ContactSettings.gen.cs | 160 + .../Generated/Structs/IndexedTriangle.gen.cs | 102 + .../Structs/IndexedTriangleNoMaterial.gen.cs | 178 + .../Generated/Structs/NativeSpanView.gen.cs | 13 + .../Structs/NativeStridedView.gen.cs | 14 + .../Generated/Structs/PhysicsSettings.gen.cs | 444 + Brutal.Jolt/Generated/Structs/Plane.gen.cs | 254 + .../Structs/PointConvexSupport.gen.cs | 36 + Brutal.Jolt/Generated/Structs/RRayCast.gen.cs | 28 + .../Generated/Structs/RShapeCast.gen.cs | 41 + Brutal.Jolt/Generated/Structs/RayCast.gen.cs | 28 + .../Generated/Structs/RayCastResult.gen.cs | 45 + .../Generated/Structs/ShapeCast.gen.cs | 41 + .../Generated/Structs/ShapeCastResult.gen.cs | 175 + .../Structs/SoftBodyContactSettings.gen.cs | 84 + .../Generated/Structs/SoftBodyVertex.gen.cs | 166 + .../Generated/Structs/SubShapeIDPair.gen.cs | 150 + Brutal.Jolt/Generated/Structs/Triangle.gen.cs | 112 + .../Structs/TriangleConvexSupport.gen.cs | 61 + .../Structs/VehicleAntiRollBar.gen.cs | 96 + .../VehicleDifferentialSettings.gen.cs | 172 + Brutal.Jolt/GlobalUsings.cs | 7 + .../BRUTAL-JOLT-THIRD-PARTY-NOTICES.txt | 16 + Brutal.Jolt/Manual/BodyAddBatch.cs | 58 + .../Manual/BodyInterface.PrepareAddBodies.cs | 24 + Brutal.Jolt/Manual/BodyState.cs | 60 + Brutal.Jolt/Manual/ClosestPoint.cs | 51 + Brutal.Jolt/Manual/ContactEvent.cs | 89 + Brutal.Jolt/Manual/ContactEventListener.cs | 94 + Brutal.Jolt/Manual/ContactManifold.cs | 28 + Brutal.Jolt/Manual/ConvexObject.cs | 63 + Brutal.Jolt/Manual/Handles.cs | 40 + Brutal.Jolt/Manual/JoltException.cs | 30 + Brutal.Jolt/Manual/NativeArray.cs | 65 + Brutal.Jolt/Manual/NativeArrayBlock.cs | 13 + Brutal.Jolt/Manual/NativeHandleArray.cs | 67 + Brutal.Jolt/Manual/NativeHandleSpan.cs | 105 + Brutal.Jolt/Manual/PInvoke.BodyAddBatch.cs | 42 + Brutal.Jolt/Manual/PInvoke.ClosestPoint.cs | 45 + Brutal.Jolt/Manual/PInvoke.ContactEvents.cs | 80 + .../Manual/PInvoke.PenetrationDepth.cs | 23 + Brutal.Jolt/Manual/PenetrationDepth.cs | 44 + Brutal.Ktx/Abstractions/GpuUploadUtils.cs | 18 + .../Abstractions/KtxAstcParamsPartial.cs | 25 + .../Abstractions/KtxBasisParamsPartial.cs | 25 + Brutal.Ktx/Abstractions/KtxNativeBuffer.cs | 40 + Brutal.Ktx/Abstractions/KtxNativeMemory.cs | 13 + .../Abstractions/KtxTextureExtensions.cs | 137 + Brutal.Ktx/Generated/ClassId.gen.cs | 12 + .../Generated/IterateCallbackDelegate.gen.cs | 18 + Brutal.Ktx/Generated/KhrDfModel.gen.cs | 152 + Brutal.Ktx/Generated/KhrDfPrimaries.gen.cs | 54 + Brutal.Ktx/Generated/KhrDfTransfer.gen.cs | 141 + Brutal.Ktx/Generated/KtxAstcParams.gen.cs | 38 + Brutal.Ktx/Generated/KtxBasisParams.gen.cs | 87 + Brutal.Ktx/Generated/KtxErrorCode.gen.cs | 75 + Brutal.Ktx/Generated/KtxFormatSize.gen.cs | 39 + .../KtxPackAstcBlockDimension.gen.cs | 82 + .../Generated/KtxPackAstcQualityLevels.gen.cs | 16 + .../Generated/KtxPackUastcFlagBits.gen.cs | 23 + Brutal.Ktx/Generated/KtxSupercmpScheme.gen.cs | 26 + Brutal.Ktx/Generated/KtxTexture.gen.cs | 171 + Brutal.Ktx/Generated/KtxTexture1.gen.cs | 201 + Brutal.Ktx/Generated/KtxTexture1Handle.gen.cs | 55 + Brutal.Ktx/Generated/KtxTexture1Native.gen.cs | 74 + Brutal.Ktx/Generated/KtxTexture2.gen.cs | 283 + Brutal.Ktx/Generated/KtxTexture2Handle.gen.cs | 58 + Brutal.Ktx/Generated/KtxTexture2Native.gen.cs | 79 + .../Generated/KtxTextureCreateFlagBits.gen.cs | 16 + .../Generated/KtxTextureCreateInfo.gen.cs | 58 + .../KtxTextureCreateStorageEnum.gen.cs | 15 + Brutal.Ktx/Generated/KtxTextureHandle.gen.cs | 49 + Brutal.Ktx/Generated/KtxTextureNative.gen.cs | 58 + .../Generated/KtxTextureProtected.gen.cs | 13 + .../Generated/KtxTranscodeFlagBits.gen.cs | 14 + Brutal.Ktx/Generated/KtxTranscodeFmt.gen.cs | 56 + Brutal.Ktx/Generated/Orientation.gen.cs | 22 + Brutal.Ktx/Generated/OrientationX.gen.cs | 12 + Brutal.Ktx/Generated/OrientationY.gen.cs | 12 + Brutal.Ktx/Generated/OrientationZ.gen.cs | 12 + Brutal.Ktx/Generated/Strings.gen.cs | 21 + Brutal.Ktx/Generated/VkFormat.gen.cs | 346 + .../BRUTAL-KTX-THIRD-PARTY-NOTICES.txt | 332 + .../Buffers/FixedMemoryWriterLengthHint.cs | 16 + .../Buffers/IFixedBufferWriter.cs | 39 + .../Buffers/RingBufferWriter.cs | 109 + ...riteInterpolatedStringHandlerExtensions.cs | 21 + Brutal.Localization/DefaultOptions.cs | 24 + ...RUTAL-LOCALIZATION-THIRD-PARTY-NOTICES.txt | 47 + Brutal.Localization/LString.Format.cs | 72 + Brutal.Localization/LString.Format.gen.cs | 3117 ++ Brutal.Localization/LString.cs | 209 + Brutal.Localization/LStringGlobalOptions.cs | 15 + Brutal.Localization/LStringId.cs | 54 + Brutal.Localization/LStrings.cs | 96 + Brutal.Localization/LStringsOptions.cs | 16 + Brutal.Localization/LocalizedStrings.cs | 216 + .../ResX.NET/ResXBadRootTagException.cs | 28 + .../Resources/ResX.NET/ResXConvert.cs | 180 + .../Resources/ResX.NET/ResXData.cs | 9 + .../Resources/ResX.NET/ResXFile.RootHeader.cs | 130 + .../Resources/ResX.NET/ResXFile.cs | 184 + .../ResX.NET/ResXNoAttributeException.cs | 28 + .../ResX.NET/ResXNoValueException.cs | 28 + Brutal.Localization/Resources/ResXReader.cs | 114 + Brutal.Localization/Resources/ResXWriter.cs | 78 + Brutal.Logging/DefaultCategory.cs | 18 + Brutal.Logging/LogCategory.cs | 267 + Brutal.Logging/LogString.cs | 136 + Brutal.Logging/LogSystem.cs | 40 + Brutal.Maths/RandomExtensions.cs | 214 + Brutal.Memory/Mem.cs | 219 + Brutal.Memory/Partition/IPartitioner.cs | 28 + Brutal.Memory/PtrOwner.cs | 141 + Brutal.MeshOptimizer/Generated/Enums.cs | 43 + .../Generated/MeshOptimizer.cs | 1524 + .../Generated/Structs/MeshOptBounds.cs | 35 + .../Structs/MeshOptCoverageStatistics.cs | 17 + .../Generated/Structs/MeshOptMeshlet.cs | 24 + .../Structs/MeshOptOverdrawStatistics.cs | 20 + .../Generated/Structs/MeshOptStream.cs | 19 + .../Structs/MeshOptVertexCacheStatistics.cs | 24 + .../Structs/MeshOptVertexFetchStatistics.cs | 17 + Brutal.MeshOptimizer/GlobalUsings.cs | 1 + ...UTAL-MESHOPTIMIZER-THIRD-PARTY-NOTICES.txt | 44 + Brutal.Monitor.Common/CrashTail.cs | 250 + Brutal.Monitor.Common/MonitorFileNames.cs | 74 + Brutal.Monitor.Common/ProcessExtension.cs | 20 + .../ProcessResponseReader.cs | 106 + Brutal.Monitor.Common/Shared.cs | 48 + .../Logging/BackgroundLogWriter.cs | 516 + Brutal.Monitor.Host/Logging/MonitorLogger.cs | 243 + Brutal.Monitor.Host/Monitor.cs | 447 + ...L-NATIVEFILEDIALOG-THIRD-PARTY-NOTICES.txt | 32 + Brutal.NativeFileDialog/NativeFileDialog.cs | 402 + .../NativeFileDialogTypes.cs | 157 + Brutal.NotCurses/Generated/Constants.gen.cs | 291 + .../Generated/Enums/NcAlign.gen.cs | 12 + .../Generated/Enums/NcAlpha.gen.cs | 12 + .../Generated/Enums/NcBlitter.gen.cs | 20 + .../Generated/Enums/NcBoxOption.gen.cs | 16 + .../Generated/Enums/NcDirectOption.gen.cs | 14 + .../Generated/Enums/NcInType.gen.cs | 11 + .../Generated/Enums/NcKeyModifier.gen.cs | 16 + .../Generated/Enums/NcLogLevel.gen.cs | 22 + .../Generated/Enums/NcMenuOption.gen.cs | 10 + .../Generated/Enums/NcMiceEvent.gen.cs | 13 + .../Generated/Enums/NcPixelImpl.gen.cs | 26 + .../Generated/Enums/NcPlaneOption.gen.cs | 14 + .../Generated/Enums/NcPlotOption.gen.cs | 14 + .../Generated/Enums/NcProgbarOption.gen.cs | 9 + .../Generated/Enums/NcReaderOption.gen.cs | 12 + .../Generated/Enums/NcReelOption.gen.cs | 10 + .../Generated/Enums/NcScale.gen.cs | 18 + .../Generated/Enums/NcStyle.gen.cs | 15 + .../Generated/Enums/NcTabbedOption.gen.cs | 9 + .../Generated/Enums/NcVisualOption.gen.cs | 15 + .../Generated/Enums/NotCursesOption.gen.cs | 18 + .../Generated/Handles/NcDPlotHandle.gen.cs | 37 + .../Generated/Handles/NcDirectHandle.gen.cs | 342 + .../Generated/Handles/NcFadectxHandle.gen.cs | 23 + .../Generated/Handles/NcFdPlaneHandle.gen.cs | 23 + .../Generated/Handles/NcMenuHandle.gen.cs | 98 + .../Handles/NcMultiSelectorHandle.gen.cs | 35 + .../Generated/Handles/NcPlaneHandle.gen.cs | 953 + .../Generated/Handles/NcProgBarHandle.gen.cs | 27 + .../Generated/Handles/NcReaderHandle.gen.cs | 70 + .../Generated/Handles/NcReelHandle.gen.cs | 53 + .../Generated/Handles/NcSelectorHandle.gen.cs | 56 + .../Generated/Handles/NcSubProcHandle.gen.cs | 23 + .../Generated/Handles/NcTabHandle.gen.cs | 48 + .../Generated/Handles/NcTabbedHandle.gen.cs | 105 + .../Generated/Handles/NcTabletHandle.gen.cs | 20 + .../Generated/Handles/NcTreeHandle.gen.cs | 80 + .../Generated/Handles/NcUPlotHandle.gen.cs | 37 + .../Generated/Handles/NcVisualHandle.gen.cs | 67 + .../Generated/Handles/NotCursesHandle.gen.cs | 266 + Brutal.NotCurses/Generated/NotCurses.gen.cs | 1202 + .../Generated/Structs/NcCapabilities.gen.cs | 20 + .../Generated/Structs/NcCell.gen.cs | 65 + .../Generated/Structs/NcFdPlaneOptions.gen.cs | 18 + .../Generated/Structs/NcInput.gen.cs | 27 + .../Generated/Structs/NcMSelectorItem.gen.cs | 13 + .../Generated/Structs/NcMenuItem.gen.cs | 17 + .../Generated/Structs/NcMenuOptions.gen.cs | 15 + .../Generated/Structs/NcMenuSection.gen.cs | 14 + .../Structs/NcMultiSelectorOptions.gen.cs | 26 + .../Generated/Structs/NcPalette.gen.cs | 15 + .../Generated/Structs/NcPlaneOptions.gen.cs | 20 + .../Generated/Structs/NcPlotOptions.gen.cs | 24 + .../Generated/Structs/NcProgBarOptions.gen.cs | 15 + .../Generated/Structs/NcReaderOptions.gen.cs | 13 + .../Generated/Structs/NcReelOptions.gen.cs | 16 + .../Generated/Structs/NcSelectorItem.gen.cs | 16 + .../Structs/NcSelectorOptions.gen.cs | 25 + .../Generated/Structs/NcStats.gen.cs | 48 + .../Generated/Structs/NcSubProcOptions.gen.cs | 13 + .../Generated/Structs/NcTabbedOptions.gen.cs | 15 + .../Generated/Structs/NcTreeItem.gen.cs | 14 + .../Generated/Structs/NcTreeOptions.gen.cs | 15 + .../Generated/Structs/NcVGeom.gen.cs | 43 + .../Generated/Structs/NcVisualOptions.gen.cs | 50 + .../Generated/Structs/NotCursesOptions.gen.cs | 42 + .../BRUTAL-NOTCURSES-THIRD-PARTY-NOTICES.txt | 1292 + Brutal.NotCurses/NcDirectHandle.cs | 45 + Brutal.NotCurses/NcResultException.cs | 17 + Brutal.NotCurses/NcVisualHandle.cs | 37 + Brutal.NotCurses/NotCurses.cs | 14 + Brutal.NotCurses/NotCursesHandle.cs | 36 + Brutal.NotCurses/ScratchBuffer.cs | 53 + Brutal.NotCurses/TimeSpec.cs | 25 + Brutal.Numerics/Color/Color.Preset.cs | 104 + Brutal.Numerics/Color/Color.cs | 20 + Brutal.Numerics/GlobalUsings.cs | 9 + Brutal.Numerics/Matrix/IMatrix.cs | 318 + Brutal.Numerics/Matrix/Unsupported.double.cs | 60 + Brutal.Numerics/Matrix/Unsupported.float.cs | 60 + .../Matrix/double3x2/double3x2.access.gen.cs | 47 + .../double3x2/double3x2.equality.gen.cs | 31 + .../Matrix/double3x2/double3x2.format.gen.cs | 19 + .../Matrix/double3x2/double3x2.gen.cs | 93 + .../double3x2/double3x2.numerics.gen.cs | 381 + .../double3x2/double3x2.operators.gen.cs | 102 + .../Matrix/double3x2/double3x2.pack.gen.cs | 32 + .../Matrix/double3x2/double3x2.swizzle.gen.cs | 55 + .../Matrix/double4x4/double4x4.access.gen.cs | 48 + .../double4x4/double4x4.equality.gen.cs | 31 + .../Matrix/double4x4/double4x4.format.gen.cs | 19 + .../Matrix/double4x4/double4x4.gen.cs | 189 + .../double4x4/double4x4.numerics.gen.cs | 1667 + .../double4x4/double4x4.operators.gen.cs | 100 + .../Matrix/double4x4/double4x4.pack.gen.cs | 32 + .../Matrix/double4x4/double4x4.swizzle.gen.cs | 135 + .../Matrix/float3x2/float3x2.access.gen.cs | 47 + .../Matrix/float3x2/float3x2.equality.gen.cs | 31 + .../Matrix/float3x2/float3x2.format.gen.cs | 19 + .../Matrix/float3x2/float3x2.gen.cs | 93 + .../Matrix/float3x2/float3x2.numerics.gen.cs | 381 + .../Matrix/float3x2/float3x2.operators.gen.cs | 102 + .../Matrix/float3x2/float3x2.pack.gen.cs | 32 + .../Matrix/float3x2/float3x2.swizzle.gen.cs | 55 + .../Matrix/float4x4/float4x4.access.gen.cs | 48 + .../Matrix/float4x4/float4x4.equality.gen.cs | 31 + .../Matrix/float4x4/float4x4.format.gen.cs | 19 + .../Matrix/float4x4/float4x4.gen.cs | 197 + .../Matrix/float4x4/float4x4.numerics.gen.cs | 1667 + .../Matrix/float4x4/float4x4.operators.gen.cs | 100 + .../Matrix/float4x4/float4x4.pack.gen.cs | 32 + .../Matrix/float4x4/float4x4.swizzle.gen.cs | 135 + Brutal.Numerics/Packing/MatrixPack.cs | 86 + Brutal.Numerics/Packing/PackUtils.cs | 1067 + Brutal.Numerics/Packing/QuaternionPack.cs | 79 + Brutal.Numerics/Packing/VectorPack.cs | 79 + Brutal.Numerics/Plane/IPlane.cs | 32 + .../Plane/doublePlane/doublePlane.gen.cs | 149 + .../doublePlane/doublePlane.numerics.gen.cs | 80 + .../Plane/floatPlane/floatPlane.gen.cs | 149 + .../floatPlane/floatPlane.numerics.gen.cs | 80 + Brutal.Numerics/Quaternion/IQuaternion.cs | 110 + .../doubleQuat/doubleQuat.copy.gen.cs | 28 + .../doubleQuat/doubleQuat.equality.gen.cs | 41 + .../doubleQuat/doubleQuat.format.gen.cs | 144 + .../Quaternion/doubleQuat/doubleQuat.gen.cs | 116 + .../doubleQuat/doubleQuat.math-metric.gen.cs | 48 + .../doubleQuat/doubleQuat.math.gen.cs | 200 + .../doubleQuat/doubleQuat.numerics.gen.cs | 515 + .../doubleQuat/doubleQuat.pack.gen.cs | 36 + .../floatQuat/floatQuat.copy.gen.cs | 28 + .../floatQuat/floatQuat.equality.gen.cs | 41 + .../floatQuat/floatQuat.format.gen.cs | 144 + .../Quaternion/floatQuat/floatQuat.gen.cs | 116 + .../floatQuat/floatQuat.math-metric.gen.cs | 48 + .../floatQuat/floatQuat.math.gen.cs | 197 + .../floatQuat/floatQuat.numerics.gen.cs | 496 + .../floatQuat/floatQuat.pack.gen.cs | 36 + .../Rect/doubleRect/doubleRect.gen.cs | 68 + .../Rect/floatRect/floatRect.gen.cs | 62 + Brutal.Numerics/StringHelpers.cs | 104 + Brutal.Numerics/Vector/IVector.cs | 610 + Brutal.Numerics/Vector/NumberConversion.cs | 279 + .../Vector/bool2/bool2.copy.gen.cs | 28 + .../Vector/bool2/bool2.equality.gen.cs | 41 + .../Vector/bool2/bool2.format.gen.cs | 38 + Brutal.Numerics/Vector/bool2/bool2.gen.cs | 105 + .../Vector/bool2/bool2.math.gen.cs | 13 + .../Vector/bool2/bool2.numerics.gen.cs | 53 + .../Vector/bool2/bool2.swizzle.gen.cs | 80 + .../Vector/bool3/bool3.copy.gen.cs | 28 + .../Vector/bool3/bool3.equality.gen.cs | 41 + .../Vector/bool3/bool3.format.gen.cs | 38 + Brutal.Numerics/Vector/bool3/bool3.gen.cs | 121 + .../Vector/bool3/bool3.math.gen.cs | 13 + .../Vector/bool3/bool3.numerics.gen.cs | 53 + .../Vector/bool3/bool3.swizzle.gen.cs | 400 + .../Vector/bool4/bool4.copy.gen.cs | 28 + .../Vector/bool4/bool4.equality.gen.cs | 41 + .../Vector/bool4/bool4.format.gen.cs | 38 + Brutal.Numerics/Vector/bool4/bool4.gen.cs | 146 + .../Vector/bool4/bool4.math.gen.cs | 13 + .../Vector/bool4/bool4.numerics.gen.cs | 53 + .../Vector/bool4/bool4.swizzle.gen.cs | 1963 ++ .../Vector/byte2/byte2.copy.gen.cs | 28 + .../Vector/byte2/byte2.equality.gen.cs | 41 + .../Vector/byte2/byte2.format.gen.cs | 92 + Brutal.Numerics/Vector/byte2/byte2.gen.cs | 106 + .../Vector/byte2/byte2.math-metric.gen.cs | 42 + .../Vector/byte2/byte2.numerics-binary.gen.cs | 100 + .../Vector/byte2/byte2.numerics.gen.cs | 389 + .../Vector/byte2/byte2.pack.gen.cs | 210 + .../Vector/byte2/byte2.swizzle.gen.cs | 80 + .../Vector/byte3/byte3.color.gen.cs | 87 + .../Vector/byte3/byte3.copy.gen.cs | 28 + .../Vector/byte3/byte3.equality.gen.cs | 41 + .../Vector/byte3/byte3.format.gen.cs | 92 + Brutal.Numerics/Vector/byte3/byte3.gen.cs | 123 + .../Vector/byte3/byte3.math-metric.gen.cs | 42 + .../Vector/byte3/byte3.math.gen.cs | 17 + .../Vector/byte3/byte3.numerics-binary.gen.cs | 100 + .../Vector/byte3/byte3.numerics.gen.cs | 389 + .../Vector/byte3/byte3.pack.gen.cs | 210 + .../Vector/byte3/byte3.swizzle.gen.cs | 400 + .../Vector/byte4/byte4.color.gen.cs | 113 + .../Vector/byte4/byte4.copy.gen.cs | 28 + .../Vector/byte4/byte4.equality.gen.cs | 41 + .../Vector/byte4/byte4.format.gen.cs | 92 + Brutal.Numerics/Vector/byte4/byte4.gen.cs | 147 + .../Vector/byte4/byte4.math-metric.gen.cs | 42 + .../Vector/byte4/byte4.numerics-binary.gen.cs | 100 + .../Vector/byte4/byte4.numerics.gen.cs | 389 + .../Vector/byte4/byte4.pack.gen.cs | 217 + .../Vector/byte4/byte4.swizzle.gen.cs | 1963 ++ .../Vector/double2/double2.copy.gen.cs | 28 + .../Vector/double2/double2.equality.gen.cs | 41 + .../Vector/double2/double2.format.gen.cs | 92 + Brutal.Numerics/Vector/double2/double2.gen.cs | 107 + .../Vector/double2/double2.math-metric.gen.cs | 62 + .../Vector/double2/double2.math.gen.cs | 60 + .../double2/double2.numerics-binary.gen.cs | 54 + .../double2/double2.numerics-floating.gen.cs | 441 + .../Vector/double2/double2.numerics.gen.cs | 545 + .../Vector/double2/double2.pack.gen.cs | 210 + .../Vector/double2/double2.swizzle.gen.cs | 80 + .../Vector/double3/double3.copy.gen.cs | 28 + .../Vector/double3/double3.equality.gen.cs | 41 + .../Vector/double3/double3.format.gen.cs | 92 + Brutal.Numerics/Vector/double3/double3.gen.cs | 123 + .../Vector/double3/double3.math-metric.gen.cs | 62 + .../Vector/double3/double3.math.gen.cs | 75 + .../double3/double3.numerics-binary.gen.cs | 54 + .../double3/double3.numerics-floating.gen.cs | 442 + .../Vector/double3/double3.numerics.gen.cs | 545 + .../Vector/double3/double3.pack.gen.cs | 210 + .../Vector/double3/double3.swizzle.gen.cs | 400 + .../Vector/double4/double4.copy.gen.cs | 28 + .../Vector/double4/double4.equality.gen.cs | 41 + .../Vector/double4/double4.format.gen.cs | 92 + Brutal.Numerics/Vector/double4/double4.gen.cs | 148 + .../Vector/double4/double4.math-metric.gen.cs | 62 + .../Vector/double4/double4.math.gen.cs | 97 + .../double4/double4.numerics-binary.gen.cs | 54 + .../double4/double4.numerics-floating.gen.cs | 443 + .../Vector/double4/double4.numerics.gen.cs | 545 + .../Vector/double4/double4.pack.gen.cs | 210 + .../Vector/double4/double4.swizzle.gen.cs | 1963 ++ .../Vector/float2/float2.copy.gen.cs | 28 + .../Vector/float2/float2.equality.gen.cs | 41 + .../Vector/float2/float2.format.gen.cs | 92 + Brutal.Numerics/Vector/float2/float2.gen.cs | 107 + .../Vector/float2/float2.math-metric.gen.cs | 62 + .../Vector/float2/float2.math.gen.cs | 60 + .../float2/float2.numerics-binary.gen.cs | 54 + .../float2/float2.numerics-floating.gen.cs | 445 + .../Vector/float2/float2.numerics.gen.cs | 545 + .../Vector/float2/float2.pack.gen.cs | 210 + .../Vector/float2/float2.swizzle.gen.cs | 80 + .../Vector/float3/float3.color.gen.cs | 31 + .../Vector/float3/float3.copy.gen.cs | 28 + .../Vector/float3/float3.equality.gen.cs | 41 + .../Vector/float3/float3.format.gen.cs | 92 + Brutal.Numerics/Vector/float3/float3.gen.cs | 123 + .../Vector/float3/float3.math-metric.gen.cs | 62 + .../Vector/float3/float3.math.gen.cs | 75 + .../float3/float3.numerics-binary.gen.cs | 54 + .../float3/float3.numerics-floating.gen.cs | 446 + .../Vector/float3/float3.numerics.gen.cs | 545 + .../Vector/float3/float3.pack.gen.cs | 210 + .../Vector/float3/float3.swizzle.gen.cs | 400 + .../Vector/float4/float4.color.gen.cs | 57 + .../Vector/float4/float4.copy.gen.cs | 28 + .../Vector/float4/float4.equality.gen.cs | 41 + .../Vector/float4/float4.format.gen.cs | 92 + Brutal.Numerics/Vector/float4/float4.gen.cs | 148 + .../Vector/float4/float4.math-metric.gen.cs | 62 + .../Vector/float4/float4.math.gen.cs | 93 + .../float4/float4.numerics-binary.gen.cs | 54 + .../float4/float4.numerics-floating.gen.cs | 447 + .../Vector/float4/float4.numerics.gen.cs | 545 + .../Vector/float4/float4.pack.gen.cs | 210 + .../Vector/float4/float4.swizzle.gen.cs | 1963 ++ Brutal.Numerics/Vector/int2/int2.copy.gen.cs | 28 + .../Vector/int2/int2.equality.gen.cs | 41 + .../Vector/int2/int2.format.gen.cs | 92 + Brutal.Numerics/Vector/int2/int2.gen.cs | 106 + .../Vector/int2/int2.math-metric.gen.cs | 43 + .../Vector/int2/int2.numerics-binary.gen.cs | 100 + .../Vector/int2/int2.numerics.gen.cs | 438 + Brutal.Numerics/Vector/int2/int2.pack.gen.cs | 210 + .../Vector/int2/int2.swizzle.gen.cs | 80 + Brutal.Numerics/Vector/int3/int3.copy.gen.cs | 28 + .../Vector/int3/int3.equality.gen.cs | 41 + .../Vector/int3/int3.format.gen.cs | 92 + Brutal.Numerics/Vector/int3/int3.gen.cs | 123 + .../Vector/int3/int3.math-metric.gen.cs | 43 + Brutal.Numerics/Vector/int3/int3.math.gen.cs | 17 + .../Vector/int3/int3.numerics-binary.gen.cs | 100 + .../Vector/int3/int3.numerics.gen.cs | 438 + Brutal.Numerics/Vector/int3/int3.pack.gen.cs | 210 + .../Vector/int3/int3.swizzle.gen.cs | 400 + Brutal.Numerics/Vector/int4/int4.copy.gen.cs | 28 + .../Vector/int4/int4.equality.gen.cs | 41 + .../Vector/int4/int4.format.gen.cs | 92 + Brutal.Numerics/Vector/int4/int4.gen.cs | 147 + .../Vector/int4/int4.math-metric.gen.cs | 43 + .../Vector/int4/int4.numerics-binary.gen.cs | 100 + .../Vector/int4/int4.numerics.gen.cs | 438 + Brutal.Numerics/Vector/int4/int4.pack.gen.cs | 210 + .../Vector/int4/int4.swizzle.gen.cs | 1963 ++ .../Vector/long2/long2.copy.gen.cs | 28 + .../Vector/long2/long2.equality.gen.cs | 41 + .../Vector/long2/long2.format.gen.cs | 92 + Brutal.Numerics/Vector/long2/long2.gen.cs | 106 + .../Vector/long2/long2.math-metric.gen.cs | 42 + .../Vector/long2/long2.numerics-binary.gen.cs | 100 + .../Vector/long2/long2.numerics.gen.cs | 438 + .../Vector/long2/long2.swizzle.gen.cs | 80 + .../Vector/long3/long3.copy.gen.cs | 28 + .../Vector/long3/long3.equality.gen.cs | 41 + .../Vector/long3/long3.format.gen.cs | 92 + Brutal.Numerics/Vector/long3/long3.gen.cs | 123 + .../Vector/long3/long3.math-metric.gen.cs | 42 + .../Vector/long3/long3.math.gen.cs | 17 + .../Vector/long3/long3.numerics-binary.gen.cs | 100 + .../Vector/long3/long3.numerics.gen.cs | 438 + .../Vector/long3/long3.swizzle.gen.cs | 400 + .../Vector/long4/long4.copy.gen.cs | 28 + .../Vector/long4/long4.equality.gen.cs | 41 + .../Vector/long4/long4.format.gen.cs | 92 + Brutal.Numerics/Vector/long4/long4.gen.cs | 147 + .../Vector/long4/long4.math-metric.gen.cs | 42 + .../Vector/long4/long4.numerics-binary.gen.cs | 100 + .../Vector/long4/long4.numerics.gen.cs | 438 + .../Vector/long4/long4.swizzle.gen.cs | 1963 ++ .../Vector/sbyte2/sbyte2.copy.gen.cs | 28 + .../Vector/sbyte2/sbyte2.equality.gen.cs | 41 + .../Vector/sbyte2/sbyte2.format.gen.cs | 92 + Brutal.Numerics/Vector/sbyte2/sbyte2.gen.cs | 106 + .../Vector/sbyte2/sbyte2.math-metric.gen.cs | 42 + .../sbyte2/sbyte2.numerics-binary.gen.cs | 100 + .../Vector/sbyte2/sbyte2.numerics.gen.cs | 438 + .../Vector/sbyte2/sbyte2.pack.gen.cs | 210 + .../Vector/sbyte2/sbyte2.swizzle.gen.cs | 80 + .../Vector/sbyte3/sbyte3.copy.gen.cs | 28 + .../Vector/sbyte3/sbyte3.equality.gen.cs | 41 + .../Vector/sbyte3/sbyte3.format.gen.cs | 92 + Brutal.Numerics/Vector/sbyte3/sbyte3.gen.cs | 123 + .../Vector/sbyte3/sbyte3.math-metric.gen.cs | 42 + .../Vector/sbyte3/sbyte3.math.gen.cs | 17 + .../sbyte3/sbyte3.numerics-binary.gen.cs | 100 + .../Vector/sbyte3/sbyte3.numerics.gen.cs | 438 + .../Vector/sbyte3/sbyte3.pack.gen.cs | 210 + .../Vector/sbyte3/sbyte3.swizzle.gen.cs | 400 + .../Vector/sbyte4/sbyte4.copy.gen.cs | 28 + .../Vector/sbyte4/sbyte4.equality.gen.cs | 41 + .../Vector/sbyte4/sbyte4.format.gen.cs | 92 + Brutal.Numerics/Vector/sbyte4/sbyte4.gen.cs | 147 + .../Vector/sbyte4/sbyte4.math-metric.gen.cs | 42 + .../sbyte4/sbyte4.numerics-binary.gen.cs | 100 + .../Vector/sbyte4/sbyte4.numerics.gen.cs | 438 + .../Vector/sbyte4/sbyte4.pack.gen.cs | 210 + .../Vector/sbyte4/sbyte4.swizzle.gen.cs | 1963 ++ .../Vector/short2/short2.copy.gen.cs | 28 + .../Vector/short2/short2.equality.gen.cs | 41 + .../Vector/short2/short2.format.gen.cs | 92 + Brutal.Numerics/Vector/short2/short2.gen.cs | 106 + .../Vector/short2/short2.math-metric.gen.cs | 42 + .../short2/short2.numerics-binary.gen.cs | 100 + .../Vector/short2/short2.numerics.gen.cs | 438 + .../Vector/short2/short2.pack.gen.cs | 210 + .../Vector/short2/short2.swizzle.gen.cs | 80 + .../Vector/short3/short3.copy.gen.cs | 28 + .../Vector/short3/short3.equality.gen.cs | 41 + .../Vector/short3/short3.format.gen.cs | 92 + Brutal.Numerics/Vector/short3/short3.gen.cs | 123 + .../Vector/short3/short3.math-metric.gen.cs | 42 + .../Vector/short3/short3.math.gen.cs | 17 + .../short3/short3.numerics-binary.gen.cs | 100 + .../Vector/short3/short3.numerics.gen.cs | 438 + .../Vector/short3/short3.pack.gen.cs | 210 + .../Vector/short3/short3.swizzle.gen.cs | 400 + .../Vector/short4/short4.copy.gen.cs | 28 + .../Vector/short4/short4.equality.gen.cs | 41 + .../Vector/short4/short4.format.gen.cs | 92 + Brutal.Numerics/Vector/short4/short4.gen.cs | 147 + .../Vector/short4/short4.math-metric.gen.cs | 42 + .../short4/short4.numerics-binary.gen.cs | 100 + .../Vector/short4/short4.numerics.gen.cs | 438 + .../Vector/short4/short4.pack.gen.cs | 210 + .../Vector/short4/short4.swizzle.gen.cs | 1963 ++ .../Vector/uint2/uint2.copy.gen.cs | 28 + .../Vector/uint2/uint2.equality.gen.cs | 41 + .../Vector/uint2/uint2.format.gen.cs | 92 + Brutal.Numerics/Vector/uint2/uint2.gen.cs | 106 + .../Vector/uint2/uint2.math-metric.gen.cs | 43 + .../Vector/uint2/uint2.numerics-binary.gen.cs | 100 + .../Vector/uint2/uint2.numerics.gen.cs | 389 + .../Vector/uint2/uint2.pack.gen.cs | 210 + .../Vector/uint2/uint2.swizzle.gen.cs | 80 + .../Vector/uint3/uint3.copy.gen.cs | 28 + .../Vector/uint3/uint3.equality.gen.cs | 41 + .../Vector/uint3/uint3.format.gen.cs | 92 + Brutal.Numerics/Vector/uint3/uint3.gen.cs | 123 + .../Vector/uint3/uint3.math-metric.gen.cs | 43 + .../Vector/uint3/uint3.math.gen.cs | 17 + .../Vector/uint3/uint3.numerics-binary.gen.cs | 100 + .../Vector/uint3/uint3.numerics.gen.cs | 389 + .../Vector/uint3/uint3.pack.gen.cs | 210 + .../Vector/uint3/uint3.swizzle.gen.cs | 400 + .../Vector/uint4/uint4.copy.gen.cs | 28 + .../Vector/uint4/uint4.equality.gen.cs | 41 + .../Vector/uint4/uint4.format.gen.cs | 92 + Brutal.Numerics/Vector/uint4/uint4.gen.cs | 147 + .../Vector/uint4/uint4.math-metric.gen.cs | 43 + .../Vector/uint4/uint4.numerics-binary.gen.cs | 100 + .../Vector/uint4/uint4.numerics.gen.cs | 389 + .../Vector/uint4/uint4.pack.gen.cs | 210 + .../Vector/uint4/uint4.swizzle.gen.cs | 1963 ++ .../Vector/ulong2/ulong2.copy.gen.cs | 28 + .../Vector/ulong2/ulong2.equality.gen.cs | 41 + .../Vector/ulong2/ulong2.format.gen.cs | 92 + Brutal.Numerics/Vector/ulong2/ulong2.gen.cs | 106 + .../Vector/ulong2/ulong2.math-metric.gen.cs | 42 + .../ulong2/ulong2.numerics-binary.gen.cs | 100 + .../Vector/ulong2/ulong2.numerics.gen.cs | 389 + .../Vector/ulong2/ulong2.swizzle.gen.cs | 80 + .../Vector/ulong3/ulong3.copy.gen.cs | 28 + .../Vector/ulong3/ulong3.equality.gen.cs | 41 + .../Vector/ulong3/ulong3.format.gen.cs | 92 + Brutal.Numerics/Vector/ulong3/ulong3.gen.cs | 123 + .../Vector/ulong3/ulong3.math-metric.gen.cs | 42 + .../Vector/ulong3/ulong3.math.gen.cs | 17 + .../ulong3/ulong3.numerics-binary.gen.cs | 100 + .../Vector/ulong3/ulong3.numerics.gen.cs | 389 + .../Vector/ulong3/ulong3.swizzle.gen.cs | 400 + .../Vector/ulong4/ulong4.copy.gen.cs | 28 + .../Vector/ulong4/ulong4.equality.gen.cs | 41 + .../Vector/ulong4/ulong4.format.gen.cs | 92 + Brutal.Numerics/Vector/ulong4/ulong4.gen.cs | 147 + .../Vector/ulong4/ulong4.math-metric.gen.cs | 42 + .../ulong4/ulong4.numerics-binary.gen.cs | 100 + .../Vector/ulong4/ulong4.numerics.gen.cs | 389 + .../Vector/ulong4/ulong4.swizzle.gen.cs | 1963 ++ .../Vector/ushort2/ushort2.copy.gen.cs | 28 + .../Vector/ushort2/ushort2.equality.gen.cs | 41 + .../Vector/ushort2/ushort2.format.gen.cs | 92 + Brutal.Numerics/Vector/ushort2/ushort2.gen.cs | 106 + .../Vector/ushort2/ushort2.math-metric.gen.cs | 42 + .../ushort2/ushort2.numerics-binary.gen.cs | 100 + .../Vector/ushort2/ushort2.numerics.gen.cs | 389 + .../Vector/ushort2/ushort2.pack.gen.cs | 210 + .../Vector/ushort2/ushort2.swizzle.gen.cs | 80 + .../Vector/ushort3/ushort3.color.gen.cs | 31 + .../Vector/ushort3/ushort3.copy.gen.cs | 28 + .../Vector/ushort3/ushort3.equality.gen.cs | 41 + .../Vector/ushort3/ushort3.format.gen.cs | 92 + Brutal.Numerics/Vector/ushort3/ushort3.gen.cs | 123 + .../Vector/ushort3/ushort3.math-metric.gen.cs | 42 + .../Vector/ushort3/ushort3.math.gen.cs | 17 + .../ushort3/ushort3.numerics-binary.gen.cs | 100 + .../Vector/ushort3/ushort3.numerics.gen.cs | 389 + .../Vector/ushort3/ushort3.pack.gen.cs | 210 + .../Vector/ushort3/ushort3.swizzle.gen.cs | 400 + .../Vector/ushort4/ushort4.color.gen.cs | 57 + .../Vector/ushort4/ushort4.copy.gen.cs | 28 + .../Vector/ushort4/ushort4.equality.gen.cs | 41 + .../Vector/ushort4/ushort4.format.gen.cs | 92 + Brutal.Numerics/Vector/ushort4/ushort4.gen.cs | 147 + .../Vector/ushort4/ushort4.math-metric.gen.cs | 42 + .../ushort4/ushort4.numerics-binary.gen.cs | 100 + .../Vector/ushort4/ushort4.numerics.gen.cs | 389 + .../Vector/ushort4/ushort4.pack.gen.cs | 210 + .../Vector/ushort4/ushort4.swizzle.gen.cs | 1963 ++ Brutal.Numerics/VectorShuffle2.cs | 56 + .../Generated/Al/Al.Constants.gen.cs | 701 + Brutal.OpenAl/Generated/Al/Al.Ext.gen.cs | 745 + Brutal.OpenAl/Generated/Al/Al.Getters.gen.cs | 120 + .../Al/Al.Listener.Properties.gen.cs | 106 + .../Generated/Al/Al.ObjectNames.gen.cs | 107 + Brutal.OpenAl/Generated/Al/Al.PInvoke.gen.cs | 381 + Brutal.OpenAl/Generated/Al/Al.Verbs.gen.cs | 61 + .../AlAuxiliaryEffectSlot.ObjectName.gen.cs | 55 + .../AlAuxiliaryEffectSlot.Properties.gen.cs | 66 + .../Generated/Al/AlBuffer.ObjectName.gen.cs | 55 + .../Generated/Al/AlBuffer.Properties.gen.cs | 198 + .../Generated/Al/AlDebug.ObjectLabels.gen.cs | 99 + .../Generated/Al/AlEffect.ObjectName.gen.cs | 55 + .../Generated/Al/AlEffect.Properties.gen.cs | 24 + .../Generated/Al/AlFilter.ObjectName.gen.cs | 55 + .../Generated/Al/AlFilter.Properties.gen.cs | 24 + .../Generated/Al/AlSource.ObjectName.gen.cs | 55 + .../Generated/Al/AlSource.Properties.gen.cs | 741 + .../Generated/Al/AlSource.Verbs.gen.cs | 29 + .../Generated/Al/Efx/AutowahEffect.gen.cs | 100 + .../Generated/Al/Efx/BandpassFilter.gen.cs | 86 + .../Generated/Al/Efx/ChorusEffect.gen.cs | 128 + .../Generated/Al/Efx/CompressorEffect.gen.cs | 58 + .../Al/Efx/DedicatedDialogueEffect.gen.cs | 55 + .../Al/Efx/DedicatedLowFrequencyEffect.gen.cs | 55 + .../Generated/Al/Efx/DistortionEffect.gen.cs | 114 + .../Generated/Al/Efx/EaxReverbEffect.gen.cs | 396 + .../Generated/Al/Efx/EchoEffect.gen.cs | 113 + .../Generated/Al/Efx/Efx.Creates.gen.cs | 131 + .../Generated/Al/Efx/Efx.ObjectNames.gen.cs | 167 + .../Generated/Al/Efx/EfxParams.gen.cs | 287 + .../Generated/Al/Efx/EqualizerEffect.gen.cs | 184 + .../Generated/Al/Efx/FlangerEffect.gen.cs | 128 + .../Al/Efx/FrequencyShifterEffect.gen.cs | 86 + .../Generated/Al/Efx/HighpassFilter.gen.cs | 72 + .../Generated/Al/Efx/LowpassFilter.gen.cs | 72 + .../Al/Efx/PitchShifterEffect.gen.cs | 72 + .../Generated/Al/Efx/ReverbEffect.gen.cs | 246 + .../Generated/Al/Efx/ReverbPreset.gen.cs | 3403 ++ .../Generated/Al/Efx/ReverbProperties.gen.cs | 127 + .../Al/Efx/RingModulatorEffect.gen.cs | 86 + .../Al/Efx/VocalMorpherEffect.gen.cs | 128 + .../Al/Enums/AlAmbisonicLayout.gen.cs | 17 + .../Al/Enums/AlAmbisonicScaling.gen.cs | 18 + .../Generated/Al/Enums/AlAutowahf.gen.cs | 34 + .../Generated/Al/Enums/AlBandpassf.gen.cs | 29 + .../Generated/Al/Enums/AlBufferi.gen.cs | 89 + .../Al/Enums/AlChorusWaveform.gen.cs | 17 + .../Generated/Al/Enums/AlChorusf.gen.cs | 34 + .../Generated/Al/Enums/AlChorusi.gen.cs | 24 + .../Generated/Al/Enums/AlCompressori.gen.cs | 19 + .../Generated/Al/Enums/AlDebugSeverity.gen.cs | 20 + .../Generated/Al/Enums/AlDebugSource.gen.cs | 21 + .../Generated/Al/Enums/AlDebugType.gen.cs | 25 + .../Al/Enums/AlDedicatedDialoguef.gen.cs | 19 + .../AlDedicatedLowFrequencyEffectf.gen.cs | 19 + .../Al/Enums/AlDirectChannelsMode.gen.cs | 21 + .../Generated/Al/Enums/AlDistanceModel.gen.cs | 25 + .../Generated/Al/Enums/AlDistortionf.gen.cs | 39 + .../Generated/Al/Enums/AlEaxReverb3f.gen.cs | 24 + .../Generated/Al/Enums/AlEaxReverbf.gen.cs | 114 + .../Generated/Al/Enums/AlEaxReverbi.gen.cs | 19 + .../Generated/Al/Enums/AlEchof.gen.cs | 39 + .../Generated/Al/Enums/AlEffectType.gen.cs | 31 + .../Generated/Al/Enums/AlEqualizerf.gen.cs | 64 + .../Generated/Al/Enums/AlError.gen.cs | 44 + .../Generated/Al/Enums/AlEventType.gen.cs | 18 + .../Generated/Al/Enums/AlFilterType.gen.cs | 19 + .../Al/Enums/AlFlangerWaveform.gen.cs | 17 + .../Generated/Al/Enums/AlFlangerf.gen.cs | 34 + .../Generated/Al/Enums/AlFlangeri.gen.cs | 24 + .../Generated/Al/Enums/AlFormat.gen.cs | 91 + .../Enums/AlFrequencyShifterDirection.gen.cs | 18 + .../Al/Enums/AlFrequencyShifterf.gen.cs | 19 + .../Al/Enums/AlFrequencyShifteri.gen.cs | 24 + .../Generated/Al/Enums/AlGetString.gen.cs | 34 + .../Generated/Al/Enums/AlHighpassf.gen.cs | 24 + .../Generated/Al/Enums/AlListener3f.gen.cs | 50 + .../Generated/Al/Enums/AlListenerf.gen.cs | 37 + .../Generated/Al/Enums/AlLowpassf.gen.cs | 24 + .../Al/Enums/AlObjectLabelIdentifier.gen.cs | 20 + .../Generated/Al/Enums/AlPitchShifteri.gen.cs | 24 + .../Generated/Al/Enums/AlReverbf.gen.cs | 74 + .../Generated/Al/Enums/AlReverbi.gen.cs | 19 + .../Al/Enums/AlRingModulatorWaveform.gen.cs | 18 + .../Al/Enums/AlRingModulatorf.gen.cs | 24 + .../Al/Enums/AlRingModulatori.gen.cs | 19 + .../Generated/Al/Enums/AlSource3f.gen.cs | 67 + .../Generated/Al/Enums/AlSourceState.gen.cs | 19 + .../Generated/Al/Enums/AlSourceType.gen.cs | 18 + .../Generated/Al/Enums/AlSourced.gen.cs | 29 + .../Generated/Al/Enums/AlSourcef.gen.cs | 203 + .../Generated/Al/Enums/AlSourcei.gen.cs | 203 + .../Generated/Al/Enums/AlSourcei64.gen.cs | 34 + .../Al/Enums/AlSpatializeMode.gen.cs | 25 + .../Generated/Al/Enums/AlStereoMode.gen.cs | 17 + .../Al/Enums/AlVocalMorpherPhoneme.gen.cs | 45 + .../Al/Enums/AlVocalMorpherWaveform.gen.cs | 18 + .../Generated/Al/Enums/AlVocalMorpherf.gen.cs | 19 + .../Generated/Al/Enums/AlVocalMorpheri.gen.cs | 31 + Brutal.OpenAl/Generated/Al/Params.gen.cs | 107 + .../Generated/Alc/Alc.Constants.gen.cs | 101 + Brutal.OpenAl/Generated/Alc/Alc.Ext.gen.cs | 289 + .../Generated/Alc/Alc.PInvoke.gen.cs | 122 + .../Alc/Enums/AlcAmbisonicLayout.gen.cs | 17 + .../Alc/Enums/AlcAmbisonicScaling.gen.cs | 18 + .../Alc/Enums/AlcChannelLayout.gen.cs | 22 + .../Alc/Enums/AlcContextAttribute.gen.cs | 66 + .../Generated/Alc/Enums/AlcDeviceType.gen.cs | 17 + .../Generated/Alc/Enums/AlcError.gen.cs | 44 + .../Generated/Alc/Enums/AlcEventType.gen.cs | 18 + .../Generated/Alc/Enums/AlcGetString.gen.cs | 72 + .../Generated/Alc/Enums/AlcHrtfStatus.gen.cs | 21 + .../Generated/Alc/Enums/AlcInteger.gen.cs | 72 + .../Generated/Alc/Enums/AlcOutputMode.gen.cs | 25 + .../Generated/Alc/Enums/AlcSampleType.gen.cs | 22 + Brutal.OpenAl/Generated/Alc/Handles.gen.cs | 44 + Brutal.OpenAl/GlobalUsings.cs | 6 + .../BRUTAL-OPENAL-THIRD-PARTY-NOTICES.txt | 666 + .../LICENSES/openal-soft-BSD-3Clause.txt | 31 + .../LICENSES/openal-soft-COPYING.txt | 437 + .../LICENSES/openal-soft-LICENSE-pffft.txt | 38 + .../LICENSES/openal-soft-fmt-LICENSE.txt | 27 + .../LICENSES/openal-soft-gsl-LICENSE.txt | 21 + Brutal.OpenAl/Manual/Al.Listener.cs | 22 + Brutal.OpenAl/Manual/Al.Wrapper.Internal.cs | 72 + Brutal.OpenAl/Manual/Al.Wrapper.cs | 80 + Brutal.OpenAl/Manual/Al.cs | 7 + Brutal.OpenAl/Manual/AlAuxiliaryEffectSlot.cs | 9 + Brutal.OpenAl/Manual/AlBuffer.cs | 14 + Brutal.OpenAl/Manual/AlDebug.Internal.cs | 67 + Brutal.OpenAl/Manual/AlDebug.cs | 222 + Brutal.OpenAl/Manual/AlSource.Ext.cs | 56 + Brutal.OpenAl/Manual/AlSource.cs | 29 + Brutal.OpenAl/Manual/Alc.Wrapper.Internal.cs | 117 + Brutal.OpenAl/Manual/Alc.Wrapper.cs | 72 + Brutal.OpenAl/Manual/Alc.cs | 7 + Brutal.OpenAl/Manual/Callbacks.Internal.cs | 185 + Brutal.OpenAl/Manual/Callbacks.cs | 132 + .../Manual/CaptureDevice.Internal.cs | 30 + Brutal.OpenAl/Manual/CaptureDevice.cs | 92 + Brutal.OpenAl/Manual/Context.Internal.cs | 37 + Brutal.OpenAl/Manual/Context.cs | 156 + Brutal.OpenAl/Manual/Device.cs | 311 + Brutal.OpenAl/Manual/Efx.Internal.cs | 96 + Brutal.OpenAl/Manual/Efx.cs | 45 + Brutal.OpenAl/Manual/Errors.cs | 97 + Brutal.OpenAl/Manual/Extensions.cs | 78 + Brutal.OpenAl/Manual/LoopbackDevice.cs | 132 + Brutal.OpenAl/Manual/NativeLoader.cs | 40 + Brutal.OpenAl/Manual/Params.cs | 18 + Brutal.OpenAl/Manual/StringUtils.cs | 23 + Brutal.OpenAl/Manual/Utf8Buffer.cs | 45 + Brutal.OpenGl/Constants.gen.cs | 1412 + Brutal.OpenGl/Glad.cs | 25 + Brutal.OpenGl/Glad.gen.cs | 20 + .../BRUTAL-OPENGL-THIRD-PARTY-NOTICES.txt | 338 + Brutal.OpenGl/Loader.gen.cs | 5387 ++++ Brutal.OpenGl/OpenGl.cs | 1381 + Brutal.OpenGl/OpenGl.gen.cs | 4532 +++ Brutal.OpenGl/Types/GlAttribute.cs | 3 + Brutal.OpenGl/Types/GlBehavior.cs | 10 + Brutal.OpenGl/Types/GlBindTarget.cs | 21 + Brutal.OpenGl/Types/GlBitfield.cs | 10 + Brutal.OpenGl/Types/GlBuffer.cs | 12 + Brutal.OpenGl/Types/GlBufferUsage.cs | 16 + Brutal.OpenGl/Types/GlCapability.cs | 42 + Brutal.OpenGl/Types/GlClearBit.cs | 11 + Brutal.OpenGl/Types/GlEnum.cs | 8 + Brutal.OpenGl/Types/GlFace.cs | 10 + Brutal.OpenGl/Types/GlFramebuffer.cs | 3 + Brutal.OpenGl/Types/GlFrontFace.cs | 9 + Brutal.OpenGl/Types/GlFunc.cs | 15 + Brutal.OpenGl/Types/GlGetProcAddressFunc.cs | 6 + Brutal.OpenGl/Types/GlHint.cs | 11 + Brutal.OpenGl/Types/GlIndexType.cs | 11 + Brutal.OpenGl/Types/GlLogicOp.cs | 23 + Brutal.OpenGl/Types/GlPipeline.cs | 3 + Brutal.OpenGl/Types/GlProgram.cs | 1410 + Brutal.OpenGl/Types/GlQuery.cs | 3 + Brutal.OpenGl/Types/GlRenderbuffer.cs | 3 + Brutal.OpenGl/Types/GlSampler.cs | 3 + Brutal.OpenGl/Types/GlScaling.cs | 8 + Brutal.OpenGl/Types/GlShader.cs | 114 + Brutal.OpenGl/Types/GlShaderType.cs | 13 + Brutal.OpenGl/Types/GlStencilOp.cs | 15 + Brutal.OpenGl/Types/GlSync.cs | 6 + Brutal.OpenGl/Types/GlTexture.cs | 3 + Brutal.OpenGl/Types/GlTopology.cs | 20 + Brutal.OpenGl/Types/GlVertexArray.cs | 15 + Brutal.OpenGl/Types/GlVertexAttribute.cs | 19 + .../Generated/Classes/AddressOrGUID.gen.cs | 12 + .../Classes/AddressSystemAddress.gen.cs | 12 + Brutal.RakNet/Generated/Classes/InAddr.gen.cs | 11 + Brutal.RakNet/Generated/Classes/Packet.gen.cs | 26 + .../Generated/Classes/PublicKey.gen.cs | 21 + .../Generated/Classes/RNS2EventHandler.gen.cs | 8 + .../Generated/Classes/RakNetGUID.gen.cs | 15 + .../Generated/Classes/RakNetLibrary.gen.cs | 12 + .../Generated/Classes/RakNetSocket2.gen.cs | 21 + .../Generated/Classes/RakNetStatistics.gen.cs | 49 + .../Generated/Classes/SUnBSUnInAddr.gen.cs | 21 + .../Generated/Classes/SUnInAddr.gen.cs | 18 + .../Generated/Classes/SUnWSUnInAddr.gen.cs | 15 + .../Generated/Classes/SockaddrIn.gen.cs | 21 + .../Generated/Classes/SocketDescriptor.gen.cs | 29 + .../Generated/Classes/SystemAddress.gen.cs | 15 + .../Enums/ConnectionAttemptResult.gen.cs | 12 + .../Generated/Enums/ConnectionState.gen.cs | 26 + .../Enums/DefaultMessageIDTypes.gen.cs | 407 + .../Generated/Enums/PacketPriority.gen.cs | 18 + .../Generated/Enums/PacketReliability.gen.cs | 30 + .../Generated/Enums/PublicKeyMode.gen.cs | 17 + Brutal.RakNet/Generated/Enums/RNS2Type.gen.cs | 15 + .../Generated/Enums/StartupResult.gen.cs | 18 + .../Generated/Handles/RakPeerInstance.gen.cs | 18 + .../Libraries/RakPeerInterface.gen.cs | 678 + .../BRUTAL-RAKNET-THIRD-PARTY-NOTICES.txt | 236 + .../Manual/APIPartials/AddressOrGuid.cs | 40 + .../Manual/APIPartials/RakNetGuid.cs | 70 + .../Manual/APIPartials/SockaddrIn.cs | 42 + .../Manual/APIPartials/SocketDescriptor.cs | 115 + .../Manual/APIPartials/SystemAddress.cs | 34 + Brutal.RakNet/Manual/Utility/Stream.cs | 190 + Brutal.RakNet/Manual/Utility/Time.cs | 23 + Brutal.Render.Mesh/Mesh.cs | 381 + Brutal.Render.Mesh/ProcGenMesh.Primitives.cs | 564 + Brutal.Render.Mesh/ProcGenMesh.cs | 570 + Brutal.RenderDoc.ImGui/GlobalUsings.cs | 6 + .../BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt | 34 + Brutal.RenderDoc.ImGui/RenderDocWindow.cs | 314 + .../Generated/CaptureOptions.gen.cs | 78 + .../Generated/Enums/ApiVersions.gen.cs | 50 + .../Generated/Enums/CaptureOption.gen.cs | 48 + .../Generated/Enums/InputButton.gen.cs | 197 + .../Generated/Enums/OverlayBits.gen.cs | 27 + Brutal.RenderDoc/Generated/RenderDoc.gen.cs | 147 + .../Generated/Structs/RenderDocApi.gen.cs | 140 + Brutal.RenderDoc/GlobalUsings.cs | 3 + .../BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt | 33 + Brutal.RenderDoc/Manual/Logger.cs | 9 + Brutal.RenderDoc/Manual/RenderDoc.manual.cs | 317 + Brutal.RenderDoc/Manual/Typedefs.manual.cs | 5 + .../Enums/ImgAnimationDecoderStatus.gen.cs | 14 + .../Libraries/SdlImage.Ergonomic.gen.cs | 2691 ++ .../Generated/SdlImage.Constants.gen.cs | 60 + .../Generated/SdlImage.Delegates.gen.cs | 5 + .../Generated/SdlImage.HandleMethods.gen.cs | 211 + .../Generated/SdlImage.Handles.gen.cs | 44 + .../Generated/SdlImage.PInvoke.gen.cs | 1214 + .../Generated/SdlImage.Structs.gen.cs | 16 + Brutal.Sdl.Image/GlobalUsings.cs | 3 + .../BRUTAL-SDL-IMAGE-THIRD-PARTY-NOTICES.txt | 217 + Brutal.Sdl.Image/SdlImage.cs | 95 + .../Libraries/SdlMixer.Ergonomic.gen.cs | 2168 ++ .../Generated/SdlMixer.Constants.gen.cs | 46 + .../Generated/SdlMixer.Delegates.gen.cs | 36 + .../Generated/SdlMixer.HandleMethods.gen.cs | 1471 + .../Generated/SdlMixer.Handles.gen.cs | 98 + .../Generated/SdlMixer.PInvoke.gen.cs | 1074 + .../Generated/SdlMixer.Structs.gen.cs | 21 + Brutal.Sdl.Mixer/GlobalUsings.cs | 3 + .../BRUTAL-SDL-MIXER-THIRD-PARTY-NOTICES.txt | 237 + .../Manual/ExceptionAggregator.cs | 76 + .../Manual/Libraries/SdlMixer.Callbacks.cs | 232 + .../Manual/Libraries/SdlMixer.Init.cs | 12 + Brutal.Sdl.Mixer/SdlMixer.cs | 114 + .../Generated/Enums/TtfDirection.gen.cs | 15 + .../Generated/Enums/TtfDrawCommand.gen.cs | 13 + .../Generated/Enums/TtfFontStyleFlags.gen.cs | 16 + .../Enums/TtfGpuTextEngineWinding.gen.cs | 13 + .../Generated/Enums/TtfHintingFlags.gen.cs | 16 + .../Enums/TtfHorizontalAlignment.gen.cs | 14 + .../Generated/Enums/TtfImageType.gen.cs | 14 + .../Generated/Enums/TtfSubStringFlags.gen.cs | 15 + .../Libraries/SdlTtf.Ergonomic.gen.cs | 3013 ++ .../Generated/SdlTtf.Constants.gen.cs | 50 + .../Generated/SdlTtf.Delegates.gen.cs | 5 + .../Generated/SdlTtf.HandleMethods.gen.cs | 1296 + .../Generated/SdlTtf.Handles.gen.cs | 26 + .../Generated/SdlTtf.PInvoke.gen.cs | 1416 + .../Generated/SdlTtf.Structs.gen.cs | 101 + Brutal.Sdl.Ttf/GlobalUsings.cs | 3 + .../BRUTAL-SDL-TTF-THIRD-PARTY-NOTICES.txt | 503 + Brutal.Sdl.Ttf/SdlTtf.cs | 95 + Brutal.Sdl/CustomStringMarshaller.cs | 99 + .../Generated/Enums/SdlAppResult.gen.cs | 13 + .../Generated/Enums/SdlArrayOrder.gen.cs | 17 + .../Generated/Enums/SdlAssertState.gen.cs | 15 + .../Generated/Enums/SdlAsyncIOResult.gen.cs | 13 + .../Generated/Enums/SdlAsyncIOTaskType.gen.cs | 13 + .../Generated/Enums/SdlAudioFormat.gen.cs | 22 + .../Generated/Enums/SdlBitmapOrder.gen.cs | 13 + .../Generated/Enums/SdlBlendFactor.gen.cs | 20 + .../Generated/Enums/SdlBlendOperation.gen.cs | 15 + .../Enums/SdlCameraPermissionState.gen.cs | 13 + .../Generated/Enums/SdlCameraPosition.gen.cs | 13 + .../Generated/Enums/SdlCapitalization.gen.cs | 14 + .../Generated/Enums/SdlChromaLocation.gen.cs | 14 + .../Generated/Enums/SdlColorPrimaries.gen.cs | 24 + .../Generated/Enums/SdlColorRange.gen.cs | 13 + .../Generated/Enums/SdlColorType.gen.cs | 13 + .../Generated/Enums/SdlColorspace.gen.cs | 23 + .../Generated/Enums/SdlDateFormat.gen.cs | 13 + .../Enums/SdlDisplayOrientation.gen.cs | 15 + .../Enums/SdlEnumerationResult.gen.cs | 13 + .../Generated/Enums/SdlEventAction.gen.cs | 13 + .../Generated/Enums/SdlEventType.gen.cs | 134 + .../Generated/Enums/SdlFileDialogType.gen.cs | 13 + .../Generated/Enums/SdlFlashOperation.gen.cs | 13 + Brutal.Sdl/Generated/Enums/SdlFlipMode.gen.cs | 14 + Brutal.Sdl/Generated/Enums/SdlFolder.gen.cs | 22 + Brutal.Sdl/Generated/Enums/SdlGLAttr.gen.cs | 38 + .../Generated/Enums/SdlGamepadAxis.gen.cs | 18 + .../Enums/SdlGamepadBindingType.gen.cs | 14 + .../Generated/Enums/SdlGamepadButton.gen.cs | 38 + .../Enums/SdlGamepadButtonLabel.gen.cs | 19 + .../Generated/Enums/SdlGamepadType.gen.cs | 23 + .../Generated/Enums/SdlGlobFlags.gen.cs | 12 + .../Generated/Enums/SdlGpuBlendFactor.gen.cs | 24 + .../Generated/Enums/SdlGpuBlendOp.gen.cs | 16 + .../Enums/SdlGpuBufferUsageFlags.gen.cs | 17 + .../Enums/SdlGpuColorComponentFlags.gen.cs | 15 + .../Generated/Enums/SdlGpuCompareOp.gen.cs | 19 + .../Generated/Enums/SdlGpuCubeMapFace.gen.cs | 16 + .../Generated/Enums/SdlGpuCullMode.gen.cs | 13 + .../Generated/Enums/SdlGpuFillMode.gen.cs | 12 + .../Generated/Enums/SdlGpuFilter.gen.cs | 12 + .../Generated/Enums/SdlGpuFrontFace.gen.cs | 12 + .../Enums/SdlGpuIndexElementSize.gen.cs | 12 + .../Generated/Enums/SdlGpuLoadOp.gen.cs | 13 + .../Generated/Enums/SdlGpuPresentMode.gen.cs | 13 + .../Enums/SdlGpuPrimitiveType.gen.cs | 15 + .../Generated/Enums/SdlGpuSampleCount.gen.cs | 14 + .../Enums/SdlGpuSamplerAddressMode.gen.cs | 13 + .../Enums/SdlGpuSamplerMipmapMode.gen.cs | 12 + .../Generated/Enums/SdlGpuShaderStage.gen.cs | 12 + .../Generated/Enums/SdlGpuStencilOp.gen.cs | 19 + .../Generated/Enums/SdlGpuStoreOp.gen.cs | 14 + .../Enums/SdlGpuSwapchainComposition.gen.cs | 14 + .../Enums/SdlGpuTextureFormat.gen.cs | 115 + .../Generated/Enums/SdlGpuTextureType.gen.cs | 15 + .../Enums/SdlGpuTextureUsageFlags.gen.cs | 18 + .../Enums/SdlGpuTransferBufferUsage.gen.cs | 12 + .../Enums/SdlGpuVertexElementFormat.gen.cs | 41 + .../Enums/SdlGpuVertexInputRate.gen.cs | 12 + .../Generated/Enums/SdlHidBusType.gen.cs | 15 + .../Generated/Enums/SdlHintPriority.gen.cs | 13 + .../Generated/Enums/SdlHitTestResult.gen.cs | 20 + Brutal.Sdl/Generated/Enums/SdlIOStatus.gen.cs | 16 + Brutal.Sdl/Generated/Enums/SdlIOWhence.gen.cs | 13 + .../Generated/Enums/SdlInitFlags.gen.cs | 19 + .../Generated/Enums/SdlInitStatus.gen.cs | 14 + .../Enums/SdlJoystickConnectionState.gen.cs | 14 + .../Generated/Enums/SdlJoystickType.gen.cs | 21 + Brutal.Sdl/Generated/Enums/SdlKeycode.gen.cs | 266 + .../Generated/Enums/SdlLogCategory.gen.cs | 30 + .../Generated/Enums/SdlLogPriority.gen.cs | 19 + .../Enums/SdlMatrixCoefficients.gen.cs | 25 + .../Enums/SdlMessageBoxButtonFlags.gen.cs | 13 + .../Enums/SdlMessageBoxColorType.gen.cs | 16 + .../Generated/Enums/SdlMessageBoxFlags.gen.cs | 16 + .../Enums/SdlMouseButtonFlags.gen.cs | 16 + .../Enums/SdlMouseWheelDirection.gen.cs | 12 + .../Generated/Enums/SdlPackedLayout.gen.cs | 19 + .../Generated/Enums/SdlPackedOrder.gen.cs | 19 + Brutal.Sdl/Generated/Enums/SdlPathType.gen.cs | 14 + Brutal.Sdl/Generated/Enums/SdlPenAxis.gen.cs | 18 + .../Generated/Enums/SdlPenDeviceType.gen.cs | 14 + .../Generated/Enums/SdlPenInputFlags.gen.cs | 19 + .../Generated/Enums/SdlPixelFormat.gen.cs | 83 + .../Generated/Enums/SdlPixelType.gen.cs | 23 + .../Generated/Enums/SdlPowerState.gen.cs | 16 + .../Generated/Enums/SdlProcessIO.gen.cs | 14 + .../Generated/Enums/SdlProgressState.gen.cs | 16 + .../Generated/Enums/SdlPropertyType.gen.cs | 16 + .../SdlRendererLogicalPresentation.gen.cs | 15 + Brutal.Sdl/Generated/Enums/SdlSandbox.gen.cs | 15 + .../Generated/Enums/SdlScaleMode.gen.cs | 14 + Brutal.Sdl/Generated/Enums/SdlScancode.gen.cs | 259 + .../Generated/Enums/SdlSensorType.gen.cs | 19 + .../Generated/Enums/SdlSurfaceFlags.gen.cs | 15 + .../Generated/Enums/SdlSystemCursor.gen.cs | 31 + .../Generated/Enums/SdlSystemTheme.gen.cs | 13 + .../Generated/Enums/SdlTextInputType.gen.cs | 19 + .../Generated/Enums/SdlTextureAccess.gen.cs | 13 + .../Enums/SdlTextureAddressMode.gen.cs | 14 + .../Generated/Enums/SdlThreadPriority.gen.cs | 14 + .../Generated/Enums/SdlThreadState.gen.cs | 14 + .../Generated/Enums/SdlTimeFormat.gen.cs | 12 + .../Generated/Enums/SdlTouchDeviceType.gen.cs | 14 + .../Enums/SdlTransferCharacteristics.gen.cs | 29 + .../Generated/Enums/SdlTrayEntryFlags.gen.cs | 16 + .../Generated/Enums/SdlWindowFlags.gen.cs | 37 + .../Generated/Libraries/Sdl.Events.gen.cs | 557 + .../Generated/Libraries/Sdl.Gamepad.gen.cs | 1571 + .../Generated/Libraries/Sdl.Init.gen.cs | 253 + .../Generated/Libraries/Sdl.Joystick.gen.cs | 1448 + .../Generated/Libraries/Sdl.Keyboard.gen.cs | 561 + .../Generated/Libraries/Sdl.Mouse.gen.cs | 635 + .../Generated/Libraries/Sdl.Render.gen.cs | 3349 ++ .../Generated/Libraries/Sdl.Video.gen.cs | 2975 ++ Brutal.Sdl/Generated/Sdl.Constants.gen.cs | 797 + Brutal.Sdl/Generated/Sdl.Delegates.gen.cs | 132 + Brutal.Sdl/Generated/Sdl.HandleMethods.gen.cs | 6651 ++++ Brutal.Sdl/Generated/Sdl.Handles.gen.cs | 170 + Brutal.Sdl/Generated/Sdl.PInvoke.gen.cs | 14617 +++++++++ Brutal.Sdl/Generated/Sdl.Structs.gen.cs | 1521 + Brutal.Sdl/GlobalUsings.cs | 2 + .../BRUTAL-SDL-THIRD-PARTY-NOTICES.txt | 621 + Brutal.Sdl/Manual/Libraries/Sdl.Events.cs | 108 + Brutal.Sdl/Manual/Libraries/Sdl.Gamepad.cs | 35 + Brutal.Sdl/Manual/Libraries/Sdl.Init.cs | 21 + Brutal.Sdl/Manual/Libraries/Sdl.Keyboard.cs | 43 + Brutal.Sdl/Manual/Libraries/Sdl.Log.cs | 39 + Brutal.Sdl/Manual/Libraries/Sdl.Vulkan.cs | 72 + Brutal.Sdl/Manual/Sdl.PInvoke.cs | 92 + Brutal.Sdl/Manual/SdlGamepadBinding.cs | 41 + Brutal.Sdl/Sdl.cs | 159 + Brutal.Sdl/SdlException.cs | 36 + Brutal.ShaderC/BespokeUtf8Encoder.cs | 72 + Brutal.ShaderC/Generated/Enumerations.gen.cs | 484 + Brutal.ShaderC/Generated/ShaderC.gen.cs | 265 + Brutal.ShaderC/Generated/Structs.gen.cs | 288 + Brutal.ShaderC/GlobalUsings.cs | 3 + Brutal.ShaderC/HighLevel.cs | 297 + .../BRUTAL-SHADERC-THIRD-PARTY-NOTICES.txt | 1700 + Brutal.ShaderC/ShaderC.cs | 149 + Brutal.ShaderC/ShaderKindInference.cs | 83 + Brutal.ShaderC/Types/CompileOptions.cs | 29 + Brutal.ShaderC/Types/Delegates.cs | 70 + Brutal.ShaderC/Utilities/Callbacks.cs | 193 + Brutal.ShaderC/Utilities/ShaderException.cs | 60 + Brutal.Slang/Generated/Classes.gen.cs | 1 + Brutal.Slang/Generated/Constants.gen.cs | 13 + Brutal.Slang/Generated/Enumerations.gen.cs | 862 + Brutal.Slang/Generated/GlobalUsings.gen.cs | 72 + Brutal.Slang/Generated/Interfaces.gen.cs | 656 + Brutal.Slang/Generated/InterfacesExt.gen.cs | 419 + Brutal.Slang/Generated/Slang.gen.cs | 2419 ++ Brutal.Slang/Generated/Structs.gen.cs | 1455 + Brutal.Slang/GlobalUsings.cs | 1 + Brutal.Slang/ICompileRequestExtensions.cs | 158 + Brutal.Slang/IGlobalSessionExtensions.cs | 19 + Brutal.Slang/ISessionExtensions.cs | 168 + Brutal.Slang/ISlangBlobExtensions.cs | 17 + .../BRUTAL-SLANG-THIRD-PARTY-NOTICES.txt | 2304 ++ Brutal.Slang/Result.cs | 57 + Brutal.Slang/Slang.cs | 168 + Brutal.Slang/SlangException.cs | 28 + Brutal.Stb/DataType.cs | 14 + .../BRUTAL-STB-THIRD-PARTY-NOTICES.txt | 65 + Brutal.Stb/Stb.cs | 501 + Brutal.Stb/StbImage16.cs | 39 + Brutal.Stb/StbImage8.cs | 39 + Brutal.Stb/StbImageF.cs | 39 + Brutal.Strings/ByteSpanDebugView.cs | 120 + Brutal.Strings/GlobalUsings.cs | 20 + Brutal.Strings/IString.cs | 13 + Brutal.Strings/IString8.cs | 15 + Brutal.Strings/RefString8Array.cs | 132 + Brutal.Strings/SpanExtensions.cs | 14 + Brutal.Strings/String8/RefString8.cs | 118 + .../String8/RefString8Marshaller.cs | 33 + Brutal.Strings/String8/String8.cs | 204 + .../String8/String8Extensions.Comparison.cs | 126 + .../String8/String8Extensions.Searching.cs | 146 + .../StringBuilder/StringBuilder.Append.cs | 194 + .../StringBuilder.Interpolation.cs | 81 + Brutal.Strings/StringBuilder/StringBuilder.cs | 215 + .../StringBuilder/StringBuilderPool.cs | 44 + .../StringBuilder/StringBuilderUtility.cs | 53 + .../ValueStringBuilder.Append.gen.cs | 198 + .../ValueStringBuilder.Interpolation.cs | 87 + .../StringBuilder/ValueStringBuilder.cs | 135 + Brutal.Strings/Unicode/Unicode.cs | 90 + Brutal.Strings/Unicode/Utf.cs | 202 + Brutal.Strings/Unicode/Utf16.TryFormat.cs | 243 + Brutal.Strings/Unicode/Utf16.cs | 25 + Brutal.Strings/Unicode/Utf16Formatter.cs | 91 + Brutal.Strings/Unicode/Utf8.TryFormat.cs | 318 + Brutal.Strings/Unicode/Utf8.cs | 395 + Brutal.Strings/Utf8Path.cs | 305 + .../Extensions/TextureFormatExtensions.cs | 709 + .../Format/FormatDescriptor.cs | 91 + .../ITextureImplementations/GenericTexture.cs | 343 + .../Layout/BlockCount3.cs | 6 + .../Layout/ImageExtent.cs | 46 + .../Layout/TextureImageMemoryLayout.cs | 48 + .../Layout/TextureMemoryLayout.cs | 69 + .../Upload/StageUploadRegions.cs | 25 + .../Upload/StagingRegion.cs | 44 + .../Upload/UploadRegion.cs | 28 + .../Upload/UploadRegions.cs | 266 + .../DerivedTexturePropertiesExtensions.cs | 56 + Brutal.Texture/Gli/GliConversionUtils.cs | 50 + Brutal.Texture/Gli/GliFormatExtensions.cs | 430 + Brutal.Texture/Gli/GliTexture.cs | 42 + Brutal.Texture/Gli/GliTextureException.cs | 9 + Brutal.Texture/Gli/GliTextureLoader.cs | 36 + Brutal.Texture/Gli/GliTextureSaveException.cs | 3 + Brutal.Texture/Gli/GliTextureWriter.cs | 59 + Brutal.Texture/ITexture.cs | 75 + Brutal.Texture/Ktx/KtxConverter.cs | 113 + Brutal.Texture/Ktx/KtxTexture.cs | 196 + Brutal.Texture/Ktx/KtxTextureException.cs | 15 + Brutal.Texture/Ktx/KtxTextureLoader.cs | 94 + Brutal.Texture/Ktx/KtxTextureWriter.cs | 34 + Brutal.Texture/Resources/ResourceTracker.cs | 141 + .../Resources/StackTraceFormatting.cs | 72 + Brutal.Texture/ScopedTexture.cs | 40 + Brutal.Texture/Stb/StbDataTypeExtensions.cs | 30 + Brutal.Texture/Stb/StbTexture.cs | 73 + Brutal.Texture/Stb/StbTexture16.cs | 52 + Brutal.Texture/Stb/StbTexture8.cs | 52 + Brutal.Texture/Stb/StbTextureException.cs | 7 + Brutal.Texture/Stb/StbTextureF.cs | 52 + Brutal.Texture/Stb/StbTextureLoader.cs | 178 + Brutal.Texture/Stb/StbTextureReadException.cs | 10 + Brutal.Texture/Stb/StbTextureWriter.cs | 158 + Brutal.Texture/TexelCount3.cs | 8 + Brutal.Texture/TextureDescriptor.cs | 28 + Brutal.Texture/TextureException.cs | 7 + Brutal.Texture/TextureFormat.cs | 1261 + Brutal.Texture/TextureLoadSettings.cs | 6 + Brutal.Texture/TextureLoader.cs | 311 + Brutal.Texture/TextureWriter.cs | 34 + .../Allocator/Allocation.cs | 55 + .../Allocator/IAllocator.cs | 28 + .../Allocator/IBufferAllocator.cs | 46 + .../Allocator/IGlobalAllocator.cs | 8 + .../Allocator/IImageAllocator.cs | 72 + Brutal.Vulkan.Abstractions/BufferEx.cs | 206 + .../Classes/DeviceEx.cs | 282 + .../DebugNameExtensions.cs | 90 + .../DescriptorPoolEx.cs | 416 + .../DescriptorSetLayoutEx.cs | 95 + .../Extensions/ByteSizeExtensions.cs | 29 + .../Extensions/CommandBufferExtensions.cs | 273 + .../Extensions/DeviceExtensions.cs | 694 + .../Extensions/DisposableExtensions.cs | 45 + .../Extensions/FormatExtensions.cs | 56 + .../Extensions/InstanceExtensions.cs | 6 + .../Extensions/MapInfo.cs | 22 + .../Extensions/PhysicalDeviceExtensions.cs | 81 + .../Extensions/QueueExtensions.cs | 137 + .../Extensions/ShaderModuleExtensions.cs | 12 + .../Extensions/SubresourceExtensions.cs | 93 + Brutal.Vulkan.Abstractions/FrameResources.cs | 65 + Brutal.Vulkan.Abstractions/GlobalUsings.cs | 10 + Brutal.Vulkan.Abstractions/IBindBuffer.cs | 155 + .../IDescriptorSetWrapper.cs | 33 + Brutal.Vulkan.Abstractions/IImageView.cs | 37 + Brutal.Vulkan.Abstractions/IMappable.cs | 85 + Brutal.Vulkan.Abstractions/ImageEx.cs | 280 + Brutal.Vulkan.Abstractions/ImageViewEx.cs | 58 + ...ULKAN-ABSTRACTIONS-THIRD-PARTY-NOTICES.txt | 591 + Brutal.Vulkan.Abstractions/MappedMemory.cs | 184 + .../Buffer/BinaryTreeBufferPartitioner.cs | 504 + .../Partitioner/Buffer/BufferPartitionInfo.cs | 72 + .../Partitioner/Buffer/IBufferPartitioner.cs | 56 + .../Buffer/LinearBufferPartitioner.cs | 95 + .../Partitioner/Image/Atlas2DPartitioner.cs | 161 + .../Image/IImageViewPartitioner.cs | 57 + .../Partitioner/Image/ImageStagingRange.cs | 70 + .../Image/ImageViewPartitionInfo.cs | 91 + .../Partitioner/Image/QuadTreePartitioner.cs | 533 + .../Image/TextureArrayPartitioner.cs | 100 + Brutal.Vulkan.Abstractions/Presets.cs | 555 + .../Shaders/ShaderStages.cs | 69 + Brutal.Vulkan.Abstractions/StagingPool.cs | 292 + Brutal.Vulkan.Abstractions/SyncObjects.cs | 50 + Brutal.Vulkan.Abstractions/VertexInput.cs | 815 + .../VulkanDeviceInfo.cs | 71 + Brutal.Vulkan.Abstractions/VulkanHelpers.cs | 346 + Brutal.Vulkan.Vma/Generated/Globals.gen.cs | 52 + .../Generated/InlineArrays.gen.cs | 16 + .../Enums/VmaAllocationCreateFlags.gen.cs | 26 + .../Enums/VmaAllocatorCreateFlags.gen.cs | 19 + .../Enums/VmaDefragmentationFlags.gen.cs | 14 + .../VmaDefragmentationMoveOperation.gen.cs | 9 + .../Types/Enums/VmaMemoryUsage.gen.cs | 17 + .../Types/Enums/VmaPoolCreateFlags.gen.cs | 12 + .../VmaVirtualAllocationCreateFlags.gen.cs | 14 + .../Enums/VmaVirtualBlockCreateFlags.gen.cs | 11 + .../Types/Handles/VmaAllocation.gen.cs | 18 + .../Handles/VmaDefragmentationContext.gen.cs | 18 + .../Generated/Types/Handles/VmaPool.gen.cs | 18 + .../Types/Handles/VmaVirtualAllocation.gen.cs | 18 + .../Types/Handles/VmaVirtualBlock.gen.cs | 18 + .../Structs/VmaAllocationCreateInfo.gen.cs | 33 + .../Types/Structs/VmaAllocationInfo.gen.cs | 27 + .../Types/Structs/VmaAllocationInfo2.gen.cs | 15 + .../Structs/VmaAllocatorCreateInfo.gen.cs | 39 + .../Types/Structs/VmaAllocatorInfo.gen.cs | 15 + .../Generated/Types/Structs/VmaBudget.gen.cs | 15 + .../Structs/VmaDefragmentationInfo.gen.cs | 24 + .../Structs/VmaDefragmentationMove.gen.cs | 15 + .../VmaDefragmentationPassMoveInfo.gen.cs | 12 + .../Structs/VmaDefragmentationStats.gen.cs | 18 + .../Structs/VmaDetailedStatistics.gen.cs | 24 + .../Structs/VmaDeviceMemoryCallbacks.gen.cs | 15 + .../Types/Structs/VmaPoolCreateInfo.gen.cs | 30 + .../Types/Structs/VmaStatistics.gen.cs | 18 + .../Types/Structs/VmaTotalStatistics.gen.cs | 15 + .../VmaVirtualAllocationCreateInfo.gen.cs | 18 + .../Structs/VmaVirtualAllocationInfo.gen.cs | 15 + .../Structs/VmaVirtualBlockCreateInfo.gen.cs | 15 + .../Types/Structs/VmaVulkanFunctions.gen.cs | 90 + Brutal.Vulkan.Vma/Generated/Vma.gen.cs | 515 + .../Generated/VmaAllocatorEx.gen.cs | 1425 + Brutal.Vulkan.Vma/GlobalUsings.cs | 2 + .../BRUTAL-VULKAN-VMA-THIRD-PARTY-NOTICES.txt | 39 + Brutal.Vulkan.Vma/Manual/VmaAllocator.cs | 242 + .../Manual/VmaDeviceExtensions.cs | 53 + Brutal.Vulkan/AssemblyInfo.cs | 1 + Brutal.Vulkan/BitFields.cs | 48 + Brutal.Vulkan/Generated/Constants/VK.gen.cs | 1081 + .../VkExportMetalObjectTypeFlagsEXT.gen.cs | 67 + .../Platforms/VkFullScreenExclusiveEXT.gen.cs | 51 + .../StdVideoAV1ChromaSamplePosition.gen.cs | 36 + .../Enums/StdVideoAV1ColorPrimaries.gen.cs | 81 + .../StdVideoAV1FrameRestorationType.gen.cs | 36 + .../Enums/StdVideoAV1FrameType.gen.cs | 36 + .../StdVideoAV1InterpolationFilter.gen.cs | 41 + .../Generated/Enums/StdVideoAV1Level.gen.cs | 136 + .../StdVideoAV1MatrixCoefficients.gen.cs | 91 + .../Generated/Enums/StdVideoAV1Profile.gen.cs | 31 + .../Enums/StdVideoAV1ReferenceName.gen.cs | 56 + .../StdVideoAV1TransferCharacteristics.gen.cs | 111 + .../Generated/Enums/StdVideoAV1TxMode.gen.cs | 31 + .../StdVideoDecodeH264FieldOrderCount.gen.cs | 26 + .../Enums/StdVideoH264AspectRatioIdc.gen.cs | 106 + .../Enums/StdVideoH264CabacInitIdc.gen.cs | 31 + .../Enums/StdVideoH264ChromaFormatIdc.gen.cs | 36 + ...VideoH264DisableDeblockingFilterIdc.gen.cs | 31 + .../Enums/StdVideoH264LevelIdc.gen.cs | 111 + .../Enums/StdVideoH264MemMgmtControlOp.gen.cs | 51 + ...tdVideoH264ModificationOfPicNumsIdc.gen.cs | 36 + .../Enums/StdVideoH264NonVclNaluType.gen.cs | 51 + .../Enums/StdVideoH264PictureType.gen.cs | 36 + .../Enums/StdVideoH264PocType.gen.cs | 31 + .../Enums/StdVideoH264ProfileIdc.gen.cs | 46 + .../Enums/StdVideoH264SliceType.gen.cs | 31 + .../StdVideoH264WeightedBipredIdc.gen.cs | 31 + .../Enums/StdVideoH265AspectRatioIdc.gen.cs | 106 + .../Enums/StdVideoH265ChromaFormatIdc.gen.cs | 36 + .../Enums/StdVideoH265LevelIdc.gen.cs | 81 + .../Enums/StdVideoH265PictureType.gen.cs | 36 + .../Enums/StdVideoH265ProfileIdc.gen.cs | 41 + .../Enums/StdVideoH265SliceType.gen.cs | 31 + .../Enums/StdVideoVP9ColorSpace.gen.cs | 56 + .../Enums/StdVideoVP9FrameType.gen.cs | 26 + .../StdVideoVP9InterpolationFilter.gen.cs | 41 + .../Generated/Enums/StdVideoVP9Level.gen.cs | 86 + .../Generated/Enums/StdVideoVP9Profile.gen.cs | 36 + .../Enums/StdVideoVP9ReferenceName.gen.cs | 36 + ...VkAccelerationStructureBuildTypeKHR.gen.cs | 45 + ...celerationStructureCompatibilityKHR.gen.cs | 36 + ...AccelerationStructureCreateFlagsKHR.gen.cs | 49 + ...onStructureMemoryRequirementsTypeNV.gen.cs | 45 + ...rationStructureMotionInstanceTypeNV.gen.cs | 45 + ...tionStructureSerializedBlockTypeKHR.gen.cs | 33 + .../VkAccelerationStructureTypeKHR.gen.cs | 66 + .../Generated/Enums/VkAccessFlags.gen.cs | 255 + .../Generated/Enums/VkAccessFlags2.gen.cs | 539 + .../Generated/Enums/VkAccessFlags3KHR.gen.cs | 30 + .../VkAcquireProfilingLockFlagsKHR.gen.cs | 24 + .../Enums/VkAddressCommandFlagsKHR.gen.cs | 65 + .../Enums/VkAddressCopyFlagsKHR.gen.cs | 45 + .../Generated/Enums/VkAntiLagModeAMD.gen.cs | 42 + .../Generated/Enums/VkAntiLagStageAMD.gen.cs | 36 + .../Enums/VkAttachmentDescriptionFlags.gen.cs | 48 + .../Generated/Enums/VkAttachmentLoadOp.gen.cs | 62 + .../Enums/VkAttachmentStoreOp.gen.cs | 65 + .../Generated/Enums/VkBlendFactor.gen.cs | 138 + .../Generated/Enums/VkBlendOp.gen.cs | 379 + .../Generated/Enums/VkBlendOverlapEXT.gen.cs | 56 + .../VkBlockMatchWindowCompareModeQCOM.gen.cs | 37 + .../Generated/Enums/VkBorderColor.gen.cs | 74 + .../Enums/VkBufferCreateFlags.gen.cs | 88 + .../Generated/Enums/VkBufferUsageFlags.gen.cs | 238 + .../Enums/VkBufferUsageFlags2.gen.cs | 319 + ...kBuildAccelerationStructureFlagsKHR.gen.cs | 210 + ...VkBuildAccelerationStructureModeKHR.gen.cs | 38 + .../Enums/VkBuildMicromapFlagsEXT.gen.cs | 49 + .../Enums/VkBuildMicromapModeEXT.gen.cs | 32 + .../Generated/Enums/VkChromaLocation.gen.cs | 50 + ...onStructureAddressResolutionFlagsNV.gen.cs | 72 + ...AccelerationStructureClusterFlagsNV.gen.cs | 35 + ...ccelerationStructureGeometryFlagsNV.gen.cs | 47 + ...lerationStructureIndexFormatFlagsNV.gen.cs | 51 + ...lusterAccelerationStructureOpModeNV.gen.cs | 42 + ...lusterAccelerationStructureOpTypeNV.gen.cs | 60 + ...kClusterAccelerationStructureTypeNV.gen.cs | 41 + .../Enums/VkCoarseSampleOrderTypeNV.gen.cs | 49 + .../Enums/VkColorComponentFlags.gen.cs | 54 + .../Generated/Enums/VkColorSpaceKHR.gen.cs | 146 + .../Enums/VkCommandBufferLevel.gen.cs | 36 + .../Enums/VkCommandBufferResetFlags.gen.cs | 34 + .../Enums/VkCommandBufferUsageFlags.gen.cs | 46 + .../Enums/VkCommandPoolCreateFlags.gen.cs | 47 + .../Enums/VkCommandPoolResetFlags.gen.cs | 34 + .../Generated/Enums/VkCompareOp.gen.cs | 74 + .../Generated/Enums/VkComponentSwizzle.gen.cs | 66 + .../Generated/Enums/VkComponentTypeKHR.gen.cs | 250 + .../Enums/VkCompositeAlphaFlagsKHR.gen.cs | 52 + .../VkConditionalRenderingFlagsEXT.gen.cs | 35 + .../VkConservativeRasterizationModeEXT.gen.cs | 43 + .../VkCooperativeVectorMatrixLayoutNV.gen.cs | 47 + .../VkCopyAccelerationStructureModeKHR.gen.cs | 67 + .../Enums/VkCopyMicromapModeEXT.gen.cs | 51 + .../Enums/VkCoverageModulationModeNV.gen.cs | 49 + .../Enums/VkCoverageReductionModeNV.gen.cs | 37 + .../Enums/VkCubicFilterWeightsQCOM.gen.cs | 50 + .../Generated/Enums/VkCullModeFlags.gen.cs | 51 + .../VkDataGraphModelCacheTypeQCOM.gen.cs | 33 + ...kDataGraphOpticalFlowCreateFlagsARM.gen.cs | 47 + ...DataGraphOpticalFlowExecuteFlagsARM.gen.cs | 59 + ...ataGraphOpticalFlowGridSizeFlagsARM.gen.cs | 66 + ...aGraphOpticalFlowImageUsageFlagsARM.gen.cs | 59 + ...GraphOpticalFlowPerformanceLevelARM.gen.cs | 49 + ...aGraphPipelineNodeConnectionTypeARM.gen.cs | 59 + .../VkDataGraphPipelineNodeTypeARM.gen.cs | 34 + .../VkDataGraphPipelinePropertyARM.gen.cs | 54 + ...ataGraphPipelineSessionBindPointARM.gen.cs | 47 + ...raphPipelineSessionBindPointTypeARM.gen.cs | 33 + ...aGraphPipelineSessionCreateFlagsARM.gen.cs | 37 + .../Enums/VkDataGraphTosaLevelARM.gen.cs | 38 + .../VkDataGraphTosaQualityFlagsARM.gen.cs | 53 + .../Enums/VkDebugReportFlagsEXT.gen.cs | 59 + .../Enums/VkDebugReportObjectTypeEXT.gen.cs | 309 + ...VkDebugUtilsMessageSeverityFlagsEXT.gen.cs | 53 + .../VkDebugUtilsMessageTypeFlagsEXT.gen.cs | 54 + .../VkDefaultVertexAttributeValueKHR.gen.cs | 36 + .../Generated/Enums/VkDependencyFlags.gen.cs | 83 + .../Enums/VkDepthBiasRepresentationEXT.gen.cs | 43 + .../Enums/VkDepthClampModeEXT.gen.cs | 37 + .../Enums/VkDescriptorBindingFlags.gen.cs | 81 + .../Enums/VkDescriptorMappingSourceEXT.gen.cs | 92 + .../Enums/VkDescriptorPoolCreateFlags.gen.cs | 76 + .../VkDescriptorSetLayoutCreateFlags.gen.cs | 99 + .../Generated/Enums/VkDescriptorType.gen.cs | 159 + .../VkDescriptorUpdateTemplateType.gen.cs | 52 + .../VkDeviceAddressBindingFlagsEXT.gen.cs | 35 + .../VkDeviceAddressBindingTypeEXT.gen.cs | 35 + .../VkDeviceDiagnosticsConfigFlagsNV.gen.cs | 52 + .../Enums/VkDeviceEventTypeEXT.gen.cs | 30 + .../Enums/VkDeviceFaultAddressTypeKHR.gen.cs | 114 + .../Enums/VkDeviceFaultFlagsKHR.gen.cs | 65 + ...ceFaultVendorBinaryHeaderVersionKHR.gen.cs | 36 + .../VkDeviceGroupPresentModeFlagsKHR.gen.cs | 53 + .../VkDeviceMemoryReportEventTypeEXT.gen.cs | 55 + .../Enums/VkDeviceQueueCreateFlags.gen.cs | 42 + .../VkDirectDriverLoadingModeLUNARG.gen.cs | 36 + .../Enums/VkDiscardRectangleModeEXT.gen.cs | 35 + .../Enums/VkDisplayEventTypeEXT.gen.cs | 30 + .../Enums/VkDisplayPlaneAlphaFlagsKHR.gen.cs | 53 + .../Enums/VkDisplayPowerStateEXT.gen.cs | 42 + .../Enums/VkDisplaySurfaceStereoTypeNV.gen.cs | 49 + .../Generated/Enums/VkDriverId.gen.cs | 288 + .../Generated/Enums/VkDynamicState.gen.cs | 647 + .../Generated/Enums/VkEventCreateFlags.gen.cs | 38 + .../Enums/VkExternalFenceFeatureFlags.gen.cs | 55 + .../VkExternalFenceHandleTypeFlags.gen.cs | 87 + .../Enums/VkExternalMemoryFeatureFlags.gen.cs | 68 + .../VkExternalMemoryFeatureFlagsNV.gen.cs | 47 + .../VkExternalMemoryHandleTypeFlags.gen.cs | 197 + .../VkExternalMemoryHandleTypeFlagsNV.gen.cs | 52 + .../VkExternalSemaphoreFeatureFlags.gen.cs | 55 + .../VkExternalSemaphoreHandleTypeFlags.gen.cs | 107 + .../Generated/Enums/VkFenceCreateFlags.gen.cs | 30 + .../Generated/Enums/VkFenceImportFlags.gen.cs | 47 + Brutal.Vulkan/Generated/Enums/VkFilter.gen.cs | 51 + Brutal.Vulkan/Generated/Enums/VkFormat.gen.cs | 2328 ++ .../Enums/VkFormatFeatureFlags.gen.cs | 313 + .../Enums/VkFormatFeatureFlags2.gen.cs | 607 + .../VkFragmentShadingRateCombinerOpKHR.gen.cs | 54 + .../Enums/VkFragmentShadingRateNV.gen.cs | 97 + .../Enums/VkFragmentShadingRateTypeNV.gen.cs | 38 + .../Enums/VkFrameBoundaryFlagsEXT.gen.cs | 33 + .../Enums/VkFramebufferCreateFlags.gen.cs | 42 + .../Generated/Enums/VkFrontFace.gen.cs | 59 + .../Generated/Enums/VkGeometryFlagsKHR.gen.cs | 57 + .../Enums/VkGeometryInstanceFlagsKHR.gen.cs | 133 + .../Generated/Enums/VkGeometryTypeKHR.gen.cs | 88 + .../Enums/VkGpaDeviceClockModeAMD.gen.cs | 59 + .../Generated/Enums/VkGpaPerfBlockAMD.gen.cs | 377 + .../Generated/Enums/VkGpaSampleTypeAMD.gen.cs | 42 + .../Enums/VkGpaSqShaderStageFlagsAMD.gen.cs | 69 + .../VkGraphicsPipelineLibraryFlagsEXT.gen.cs | 53 + .../Enums/VkHostImageCopyFlags.gen.cs | 58 + .../Generated/Enums/VkImageAspectFlags.gen.cs | 133 + ...VkImageCompressionFixedRateFlagsEXT.gen.cs | 179 + .../Enums/VkImageCompressionFlagsEXT.gen.cs | 52 + .../Generated/Enums/VkImageCreateFlags.gen.cs | 226 + .../Enums/VkImageCreateFlags2KHR.gen.cs | 166 + .../Generated/Enums/VkImageLayout.gen.cs | 308 + .../Generated/Enums/VkImageTiling.gen.cs | 43 + .../Generated/Enums/VkImageType.gen.cs | 42 + .../Generated/Enums/VkImageUsageFlags.gen.cs | 214 + .../Enums/VkImageUsageFlags2KHR.gen.cs | 191 + .../Enums/VkImageViewCreateFlags.gen.cs | 49 + .../Generated/Enums/VkImageViewType.gen.cs | 65 + .../Generated/Enums/VkIndexType.gen.cs | 72 + ...VkIndirectCommandsInputModeFlagsEXT.gen.cs | 41 + ...IndirectCommandsLayoutUsageFlagsEXT.gen.cs | 41 + ...kIndirectCommandsLayoutUsageFlagsNV.gen.cs | 47 + .../VkIndirectCommandsTokenTypeEXT.gen.cs | 134 + .../VkIndirectCommandsTokenTypeNV.gen.cs | 101 + .../VkIndirectExecutionSetInfoTypeEXT.gen.cs | 37 + .../Enums/VkIndirectStateFlagsNV.gen.cs | 34 + .../Enums/VkInstanceCreateFlags.gen.cs | 31 + .../Enums/VkInternalAllocationType.gen.cs | 30 + .../Generated/Enums/VkLatencyMarkerNV.gen.cs | 95 + .../Enums/VkLayerSettingTypeEXT.gen.cs | 72 + .../VkLayeredDriverUnderlyingApiMSFT.gen.cs | 36 + .../Enums/VkLineRasterizationMode.gen.cs | 105 + .../Generated/Enums/VkLogicOp.gen.cs | 129 + .../Enums/VkMemoryAllocateFlags.gen.cs | 76 + ...VkMemoryDecompressionMethodFlagsEXT.gen.cs | 38 + .../Generated/Enums/VkMemoryHeapFlags.gen.cs | 55 + .../Generated/Enums/VkMemoryMapFlags.gen.cs | 36 + .../VkMemoryOverallocationBehaviorAMD.gen.cs | 43 + .../Enums/VkMemoryPropertyFlags.gen.cs | 86 + .../Generated/Enums/VkMemoryUnmapFlags.gen.cs | 35 + .../Enums/VkMicromapCreateFlagsEXT.gen.cs | 34 + .../Generated/Enums/VkMicromapTypeEXT.gen.cs | 42 + ...kNeuralAcceleratorStatisticsModeARM.gen.cs | 41 + .../Generated/Enums/VkObjectType.gen.cs | 445 + .../Enums/VkOpacityMicromapFormatKHR.gen.cs | 53 + .../VkOpacityMicromapSpecialIndexKHR.gen.cs | 85 + .../Enums/VkOpticalFlowExecuteFlagsNV.gen.cs | 34 + .../Enums/VkOpticalFlowGridSizeFlagsNV.gen.cs | 68 + .../VkOpticalFlowPerformanceLevelNV.gen.cs | 51 + .../VkOpticalFlowSessionBindingPointNV.gen.cs | 77 + .../VkOpticalFlowSessionCreateFlagsNV.gen.cs | 59 + .../Enums/VkOpticalFlowUsageFlagsNV.gen.cs | 64 + .../Enums/VkOutOfBandQueueTypeNV.gen.cs | 35 + ...ccelerationStructureInstanceFlagsNV.gen.cs | 59 + ...tionedAccelerationStructureOpTypeNV.gen.cs | 42 + .../VkPastPresentationTimingFlagsEXT.gen.cs | 41 + .../Enums/VkPeerMemoryFeatureFlags.gen.cs | 81 + .../Generated/Enums/VkPerfHintTypeQCOM.gen.cs | 48 + ...VkPerformanceConfigurationTypeINTEL.gen.cs | 31 + ...rformanceCounterDescriptionFlagsKHR.gen.cs | 55 + .../Enums/VkPerformanceCounterScopeKHR.gen.cs | 52 + .../VkPerformanceCounterStorageKHR.gen.cs | 64 + .../Enums/VkPerformanceCounterUnitKHR.gen.cs | 94 + .../VkPerformanceOverrideTypeINTEL.gen.cs | 36 + .../VkPerformanceParameterTypeINTEL.gen.cs | 36 + .../Enums/VkPerformanceValueTypeINTEL.gen.cs | 68 + ...icalDeviceDataGraphOperationTypeARM.gen.cs | 53 + ...iceDataGraphProcessingEngineTypeARM.gen.cs | 46 + .../VkPhysicalDeviceLayeredApiKHR.gen.cs | 55 + ...calDeviceSchedulingControlsFlagsARM.gen.cs | 36 + .../Enums/VkPhysicalDeviceType.gen.cs | 54 + .../Enums/VkPipelineBindPoint.gen.cs | 73 + .../Enums/VkPipelineCacheCreateFlags.gen.cs | 49 + .../Enums/VkPipelineCacheHeaderVersion.gen.cs | 37 + ...kPipelineColorBlendStateCreateFlags.gen.cs | 42 + .../VkPipelineCompilerControlFlagsAMD.gen.cs | 28 + .../Enums/VkPipelineCreateFlags.gen.cs | 321 + .../Enums/VkPipelineCreateFlags2.gen.cs | 390 + .../VkPipelineCreationFeedbackFlags.gen.cs | 67 + ...ipelineDepthStencilStateCreateFlags.gen.cs | 56 + ...ipelineExecutableStatisticFormatKHR.gen.cs | 47 + .../Enums/VkPipelineLayoutCreateFlags.gen.cs | 38 + .../VkPipelineRobustnessBufferBehavior.gen.cs | 76 + .../VkPipelineRobustnessImageBehavior.gen.cs | 76 + .../VkPipelineShaderStageCreateFlags.gen.cs | 57 + .../Enums/VkPipelineStageFlags.gen.cs | 246 + .../Enums/VkPipelineStageFlags2.gen.cs | 555 + .../Enums/VkPointClippingBehavior.gen.cs | 52 + .../Generated/Enums/VkPolygonMode.gen.cs | 51 + .../Enums/VkPresentGravityFlagsKHR.gen.cs | 66 + .../Generated/Enums/VkPresentModeKHR.gen.cs | 77 + .../Enums/VkPresentScalingFlagsKHR.gen.cs | 65 + .../Enums/VkPresentStageFlagsEXT.gen.cs | 52 + .../Enums/VkPresentTimingInfoFlagsEXT.gen.cs | 40 + .../Enums/VkPrimitiveTopology.gen.cs | 89 + .../Enums/VkProvokingVertexModeEXT.gen.cs | 37 + .../Enums/VkQueryControlFlags.gen.cs | 34 + .../VkQueryPipelineStatisticFlags.gen.cs | 117 + .../Enums/VkQueryPoolCreateFlags.gen.cs | 35 + .../Enums/VkQueryPoolSamplingModeINTEL.gen.cs | 31 + .../Generated/Enums/VkQueryResultFlags.gen.cs | 60 + .../Enums/VkQueryResultStatusKHR.gen.cs | 49 + .../Generated/Enums/VkQueryType.gen.cs | 147 + .../Generated/Enums/VkQueueFlags.gen.cs | 87 + .../Enums/VkQueueGlobalPriority.gen.cs | 105 + .../Enums/VkRasterizationOrderAMD.gen.cs | 37 + ...kRayTracingInvocationReorderModeEXT.gen.cs | 51 + .../VkRayTracingLssIndexingModeNV.gen.cs | 39 + ...RayTracingLssPrimitiveEndCapsModeNV.gen.cs | 39 + .../VkRayTracingShaderGroupTypeKHR.gen.cs | 65 + .../Enums/VkRenderPassCreateFlags.gen.cs | 42 + .../VkRenderingAttachmentFlagsKHR.gen.cs | 50 + .../Generated/Enums/VkRenderingFlags.gen.cs | 116 + .../Enums/VkResolveImageFlagsKHR.gen.cs | 42 + .../Generated/Enums/VkResolveModeFlags.gen.cs | 112 + Brutal.Vulkan/Generated/Enums/VkResult.gen.cs | 447 + .../Generated/Enums/VkSampleCountFlags.gen.cs | 71 + .../Enums/VkSamplerAddressMode.gen.cs | 63 + .../Enums/VkSamplerCreateFlags.gen.cs | 63 + .../Enums/VkSamplerMipmapMode.gen.cs | 36 + .../Enums/VkSamplerReductionMode.gen.cs | 70 + .../VkSamplerYCbCrModelConversion.gen.cs | 90 + .../Enums/VkSamplerYCbCrRange.gen.cs | 52 + .../Generated/Enums/VkScopeKHR.gen.cs | 75 + .../Enums/VkSemaphoreImportFlags.gen.cs | 47 + .../Generated/Enums/VkSemaphoreType.gen.cs | 50 + .../Enums/VkSemaphoreWaitFlags.gen.cs | 41 + .../Enums/VkShaderCodeTypeEXT.gen.cs | 36 + .../VkShaderCorePropertiesFlagsAMD.gen.cs | 30 + .../Enums/VkShaderCreateFlagsEXT.gen.cs | 118 + .../VkShaderFloatControlsIndependence.gen.cs | 64 + .../Enums/VkShaderGroupShaderKHR.gen.cs | 48 + .../Enums/VkShaderInfoTypeAMD.gen.cs | 42 + .../Generated/Enums/VkShaderStageFlags.gen.cs | 202 + .../Enums/VkShadingRatePaletteEntryNV.gen.cs | 96 + .../Generated/Enums/VkSharingMode.gen.cs | 37 + .../Enums/VkSparseImageFormatFlags.gen.cs | 46 + .../Enums/VkSparseMemoryBindFlags.gen.cs | 34 + .../Enums/VkSpirvResourceTypeFlagsEXT.gen.cs | 96 + .../Generated/Enums/VkStencilFaceFlags.gen.cs | 47 + .../Generated/Enums/VkStencilOp.gen.cs | 73 + .../Generated/Enums/VkStructureType.gen.cs | 10540 ++++++ .../Enums/VkSubgroupFeatureFlags.gen.cs | 120 + .../Generated/Enums/VkSubmitFlags.gen.cs | 41 + .../Generated/Enums/VkSubpassContents.gen.cs | 50 + .../Enums/VkSubpassDescriptionFlags.gen.cs | 126 + .../Enums/VkSubpassMergeStatusEXT.gen.cs | 108 + .../Enums/VkSurfaceCounterFlagsEXT.gen.cs | 42 + .../Enums/VkSurfaceTransformFlagsKHR.gen.cs | 87 + .../Enums/VkSwapchainCreateFlagsKHR.gen.cs | 91 + .../Enums/VkSystemAllocationScope.gen.cs | 58 + .../Enums/VkTensorCreateFlagsARM.gen.cs | 49 + .../Generated/Enums/VkTensorTilingARM.gen.cs | 71 + .../Enums/VkTensorUsageFlagsARM.gen.cs | 54 + .../Enums/VkTensorViewCreateFlagsARM.gen.cs | 30 + .../Enums/VkTessellationDomainOrigin.gen.cs | 50 + .../Enums/VkThrottleHintTypeSEC.gen.cs | 43 + .../VkTileShadingRenderPassFlagsQCOM.gen.cs | 41 + .../Generated/Enums/VkTimeDomainKHR.gen.cs | 89 + .../Generated/Enums/VkToolPurposeFlags.gen.cs | 108 + .../VkValidationCacheHeaderVersionEXT.gen.cs | 31 + .../Enums/VkValidationCheckEXT.gen.cs | 37 + .../VkValidationFeatureDisableEXT.gen.cs | 73 + .../Enums/VkValidationFeatureEnableEXT.gen.cs | 55 + .../Generated/Enums/VkVendorId.gen.cs | 78 + .../Generated/Enums/VkVertexInputRate.gen.cs | 36 + .../Enums/VkVideoCapabilityFlagsKHR.gen.cs | 39 + .../VkVideoChromaSubsamplingFlagsKHR.gen.cs | 57 + .../VkVideoCodecOperationFlagsKHR.gen.cs | 84 + .../Enums/VkVideoCodingControlFlagsKHR.gen.cs | 48 + .../VkVideoComponentBitDepthFlagsKHR.gen.cs | 51 + .../VkVideoDecodeCapabilityFlagsKHR.gen.cs | 40 + ...ideoDecodeH264PictureLayoutFlagsKHR.gen.cs | 45 + .../Enums/VkVideoDecodeUsageFlagsKHR.gen.cs | 53 + .../VkVideoEncodeAV1CapabilityFlagsKHR.gen.cs | 66 + .../VkVideoEncodeAV1PredictionModeKHR.gen.cs | 47 + ...VkVideoEncodeAV1RateControlFlagsKHR.gen.cs | 53 + ...VkVideoEncodeAV1RateControlGroupKHR.gen.cs | 41 + .../Enums/VkVideoEncodeAV1StdFlagsKHR.gen.cs | 53 + ...ideoEncodeAV1SuperblockSizeFlagsKHR.gen.cs | 41 + .../VkVideoEncodeCapabilityFlagsKHR.gen.cs | 54 + .../Enums/VkVideoEncodeContentFlagsKHR.gen.cs | 53 + .../VkVideoEncodeFeedbackFlagsKHR.gen.cs | 96 + .../Enums/VkVideoEncodeFlagsKHR.gen.cs | 49 + ...VkVideoEncodeH264CapabilityFlagsKHR.gen.cs | 97 + ...kVideoEncodeH264RateControlFlagsKHR.gen.cs | 59 + .../Enums/VkVideoEncodeH264StdFlagsKHR.gen.cs | 149 + ...VkVideoEncodeH265CapabilityFlagsKHR.gen.cs | 103 + .../VkVideoEncodeH265CtbSizeFlagsKHR.gen.cs | 47 + ...kVideoEncodeH265RateControlFlagsKHR.gen.cs | 59 + .../Enums/VkVideoEncodeH265StdFlagsKHR.gen.cs | 155 + ...ncodeH265TransformBlockSizeFlagsKHR.gen.cs | 53 + ...VideoEncodeIntraRefreshModeFlagsKHR.gen.cs | 57 + ...oEncodePerPartitionFeedbackFlagsKHR.gen.cs | 47 + ...ideoEncodeRGBChromaOffsetFlagsVALVE.gen.cs | 46 + ...oEncodeRGBModelConversionFlagsVALVE.gen.cs | 64 + ...EncodeRGBRangeCompressionFlagsVALVE.gen.cs | 47 + ...kVideoEncodeRateControlModeFlagsKHR.gen.cs | 51 + .../Enums/VkVideoEncodeTuningModeKHR.gen.cs | 53 + .../Enums/VkVideoEncodeUsageFlagsKHR.gen.cs | 59 + .../Enums/VkVideoSessionCreateFlagsKHR.gen.cs | 69 + ...ideoSessionParametersCreateFlagsKHR.gen.cs | 35 + .../VkViewportCoordinateSwizzleNV.gen.cs | 73 + .../Platforms/AndroidExtensions.gen.cs | 215 + .../Platforms/MetalExtensions.gen.cs | 248 + .../Platforms/WaylandExtensions.gen.cs | 106 + .../Platforms/Win32Extensions.gen.cs | 962 + .../Extensions/Platforms/XcbExtensions.gen.cs | 110 + .../Platforms/XlibExtensions.gen.cs | 223 + .../Extensions/VkDeviceExtensions.gen.cs | 26687 ++++++++++++++++ .../Extensions/VkInstanceExtensions.gen.cs | 5883 ++++ Brutal.Vulkan/Generated/Functions.gen.cs | 15805 +++++++++ Brutal.Vulkan/Generated/Globals.gen.cs | 556 + .../Handles/VkAccelerationStructureKHR.gen.cs | 42 + .../Handles/VkAccelerationStructureNV.gen.cs | 41 + .../Generated/Handles/VkBuffer.gen.cs | 43 + .../Generated/Handles/VkBufferView.gen.cs | 49 + .../Generated/Handles/VkCommandBuffer.gen.cs | 45 + .../Generated/Handles/VkCommandPool.gen.cs | 47 + .../Generated/Handles/VkCuFunctionNVX.gen.cs | 39 + .../Generated/Handles/VkCuModuleNVX.gen.cs | 39 + .../VkDataGraphPipelineSessionARM.gen.cs | 41 + .../Handles/VkDebugReportCallbackEXT.gen.cs | 38 + .../Handles/VkDebugUtilsMessengerEXT.gen.cs | 38 + .../Handles/VkDeferredOperationKHR.gen.cs | 37 + .../Generated/Handles/VkDescriptorPool.gen.cs | 44 + .../Generated/Handles/VkDescriptorSet.gen.cs | 38 + .../Handles/VkDescriptorSetLayout.gen.cs | 46 + .../Handles/VkDescriptorUpdateTemplate.gen.cs | 44 + .../Generated/Handles/VkDevice.gen.cs | 1993 ++ .../Generated/Handles/VkDeviceMemory.gen.cs | 38 + .../Generated/Handles/VkDisplayKHR.gen.cs | 37 + .../Generated/Handles/VkDisplayModeKHR.gen.cs | 37 + .../Generated/Handles/VkEvent.gen.cs | 51 + .../Handles/VkExternalComputeQueueNV.gen.cs | 43 + .../Generated/Handles/VkFence.gen.cs | 47 + .../Generated/Handles/VkFramebuffer.gen.cs | 42 + .../Generated/Handles/VkGpaSessionAMD.gen.cs | 38 + .../Generated/Handles/VkImage.gen.cs | 44 + .../Generated/Handles/VkImageView.gen.cs | 45 + .../VkIndirectCommandsLayoutEXT.gen.cs | 34 + .../Handles/VkIndirectCommandsLayoutNV.gen.cs | 34 + .../Handles/VkIndirectExecutionSetEXT.gen.cs | 38 + .../Generated/Handles/VkInstance.gen.cs | 408 + .../Generated/Handles/VkMicromapEXT.gen.cs | 41 + .../Handles/VkOpticalFlowSessionNV.gen.cs | 38 + .../VkPerformanceConfigurationINTEL.gen.cs | 41 + .../Generated/Handles/VkPhysicalDevice.gen.cs | 49 + .../Generated/Handles/VkPipeline.gen.cs | 38 + .../Handles/VkPipelineBinaryKHR.gen.cs | 56 + .../Generated/Handles/VkPipelineCache.gen.cs | 50 + .../Generated/Handles/VkPipelineLayout.gen.cs | 49 + .../Handles/VkPrivateDataSlot.gen.cs | 37 + .../Generated/Handles/VkQueryPool.gen.cs | 42 + .../Generated/Handles/VkQueue.gen.cs | 46 + .../Generated/Handles/VkRenderPass.gen.cs | 42 + .../Generated/Handles/VkSampler.gen.cs | 42 + .../Handles/VkSamplerYcbcrConversion.gen.cs | 39 + .../Generated/Handles/VkSemaphore.gen.cs | 46 + .../Generated/Handles/VkShaderEXT.gen.cs | 37 + .../Handles/VkShaderInstrumentationARM.gen.cs | 41 + .../Generated/Handles/VkShaderModule.gen.cs | 45 + .../Generated/Handles/VkSurfaceKHR.gen.cs | 38 + .../Generated/Handles/VkSwapchainKHR.gen.cs | 39 + .../Generated/Handles/VkTensorARM.gen.cs | 49 + .../Generated/Handles/VkTensorViewARM.gen.cs | 44 + .../Handles/VkValidationCacheEXT.gen.cs | 52 + .../Handles/VkVideoSessionKHR.gen.cs | 41 + .../VkVideoSessionParametersKHR.gen.cs | 38 + Brutal.Vulkan/Generated/InlineArrays.gen.cs | 292 + .../PInvoke/VulkanApi/VulkanApi.gen.cs | 98 + .../PInvoke/VulkanApi/VulkanApiEx.gen.cs | 290 + ...dwareBufferFormatProperties2ANDROID.gen.cs | 97 + ...rdwareBufferFormatPropertiesANDROID.gen.cs | 96 + ...ufferFormatResolvePropertiesANDROID.gen.cs | 44 + ...roidHardwareBufferPropertiesANDROID.gen.cs | 51 + ...VkAndroidHardwareBufferUsageANDROID.gen.cs | 47 + .../VkAndroidSurfaceCreateInfoKHR.gen.cs | 50 + .../VkD3D12FenceSubmitInfoKHR.gen.cs | 68 + .../VkExportFenceWin32HandleInfoKHR.gen.cs | 60 + .../VkExportMemoryWin32HandleInfoKHR.gen.cs | 60 + .../VkExportMemoryWin32HandleInfoNV.gen.cs | 57 + .../VkExportMetalBufferInfoEXT.gen.cs | 56 + .../VkExportMetalCommandQueueInfoEXT.gen.cs | 56 + .../VkExportMetalDeviceInfoEXT.gen.cs | 49 + .../VkExportMetalIOSurfaceInfoEXT.gen.cs | 56 + .../VkExportMetalObjectCreateInfoEXT.gen.cs | 53 + .../VkExportMetalObjectsInfoEXT.gen.cs | 36 + .../VkExportMetalSharedEventInfoEXT.gen.cs | 64 + .../VkExportMetalTextureInfoEXT.gen.cs | 77 + ...VkExportSemaphoreWin32HandleInfoKHR.gen.cs | 60 + .../Platforms/VkExternalFormatANDROID.gen.cs | 43 + .../VkFenceGetWin32HandleInfoKHR.gen.cs | 50 + ...ortAndroidHardwareBufferInfoANDROID.gen.cs | 47 + .../VkImportFenceWin32HandleInfoKHR.gen.cs | 71 + .../VkImportMemoryMetalHandleInfoEXT.gen.cs | 55 + .../VkImportMemoryWin32HandleInfoKHR.gen.cs | 62 + .../VkImportMemoryWin32HandleInfoNV.gen.cs | 56 + .../VkImportMetalBufferInfoEXT.gen.cs | 49 + .../VkImportMetalIOSurfaceInfoEXT.gen.cs | 49 + .../VkImportMetalSharedEventInfoEXT.gen.cs | 50 + .../VkImportMetalTextureInfoEXT.gen.cs | 56 + ...VkImportSemaphoreWin32HandleInfoKHR.gen.cs | 71 + ...GetAndroidHardwareBufferInfoANDROID.gen.cs | 44 + .../VkMemoryGetMetalHandleInfoEXT.gen.cs | 50 + .../VkMemoryGetWin32HandleInfoKHR.gen.cs | 50 + .../VkMemoryMetalHandlePropertiesEXT.gen.cs | 43 + .../VkMemoryWin32HandlePropertiesKHR.gen.cs | 43 + .../VkMetalSurfaceCreateInfoEXT.gen.cs | 50 + ...xternalFormatResolveFeaturesANDROID.gen.cs | 44 + ...ernalFormatResolvePropertiesANDROID.gen.cs | 58 + .../VkSemaphoreGetWin32HandleInfoKHR.gen.cs | 50 + ...eCapabilitiesFullScreenExclusiveEXT.gen.cs | 44 + ...VkSurfaceFullScreenExclusiveInfoEXT.gen.cs | 48 + ...faceFullScreenExclusiveWin32InfoEXT.gen.cs | 43 + .../VkWaylandSurfaceCreateInfoKHR.gen.cs | 57 + ...in32KeyedMutexAcquireReleaseInfoKHR.gen.cs | 99 + ...Win32KeyedMutexAcquireReleaseInfoNV.gen.cs | 99 + .../VkWin32SurfaceCreateInfoKHR.gen.cs | 57 + .../VkXcbSurfaceCreateInfoKHR.gen.cs | 57 + .../VkXlibSurfaceCreateInfoKHR.gen.cs | 57 + .../Generated/Structs/StdVideoAV1CDEF.gen.cs | 35 + .../Structs/StdVideoAV1ColorConfig.gen.cs | 61 + .../StdVideoAV1ColorConfigFlags.gen.cs | 75 + .../Structs/StdVideoAV1FilmGrain.gen.cs | 139 + .../Structs/StdVideoAV1FilmGrainFlags.gen.cs | 75 + .../Structs/StdVideoAV1GlobalMotion.gen.cs | 17 + .../Structs/StdVideoAV1LoopFilter.gen.cs | 47 + .../Structs/StdVideoAV1LoopFilterFlags.gen.cs | 49 + .../Structs/StdVideoAV1LoopRestoration.gen.cs | 19 + .../Structs/StdVideoAV1Quantization.gen.cs | 67 + .../StdVideoAV1QuantizationFlags.gen.cs | 49 + .../Structs/StdVideoAV1Segmentation.gen.cs | 17 + .../Structs/StdVideoAV1SequenceHeader.gen.cs | 89 + .../StdVideoAV1SequenceHeaderFlags.gen.cs | 270 + .../Structs/StdVideoAV1TileInfo.gen.cs | 65 + .../Structs/StdVideoAV1TileInfoFlags.gen.cs | 36 + .../Structs/StdVideoAV1TimingInfo.gen.cs | 31 + .../Structs/StdVideoAV1TimingInfoFlags.gen.cs | 36 + .../StdVideoDecodeAV1PictureInfo.gen.cs | 147 + .../StdVideoDecodeAV1PictureInfoFlags.gen.cs | 400 + .../StdVideoDecodeAV1ReferenceInfo.gen.cs | 35 + ...StdVideoDecodeAV1ReferenceInfoFlags.gen.cs | 49 + .../StdVideoDecodeH264PictureInfo.gen.cs | 55 + .../StdVideoDecodeH264PictureInfoFlags.gen.cs | 88 + .../StdVideoDecodeH264ReferenceInfo.gen.cs | 31 + ...tdVideoDecodeH264ReferenceInfoFlags.gen.cs | 62 + .../StdVideoDecodeH265PictureInfo.gen.cs | 67 + .../StdVideoDecodeH265PictureInfoFlags.gen.cs | 62 + .../StdVideoDecodeH265ReferenceInfo.gen.cs | 19 + ...tdVideoDecodeH265ReferenceInfoFlags.gen.cs | 36 + .../StdVideoDecodeVP9PictureInfo.gen.cs | 115 + .../StdVideoDecodeVP9PictureInfoFlags.gen.cs | 127 + .../StdVideoEncodeAV1DecoderModelInfo.gen.cs | 37 + .../StdVideoEncodeAV1ExtensionHeader.gen.cs | 19 + ...StdVideoEncodeAV1OperatingPointInfo.gen.cs | 49 + ...deoEncodeAV1OperatingPointInfoFlags.gen.cs | 62 + .../StdVideoEncodeAV1PictureInfo.gen.cs | 163 + .../StdVideoEncodeAV1PictureInfoFlags.gen.cs | 400 + .../StdVideoEncodeAV1ReferenceInfo.gen.cs | 43 + ...StdVideoEncodeAV1ReferenceInfoFlags.gen.cs | 49 + .../StdVideoEncodeH264PictureInfo.gen.cs | 67 + .../StdVideoEncodeH264PictureInfoFlags.gen.cs | 88 + .../StdVideoEncodeH264RefListModEntry.gen.cs | 25 + ...tdVideoEncodeH264RefPicMarkingEntry.gen.cs | 37 + .../StdVideoEncodeH264ReferenceInfo.gen.cs | 49 + ...tdVideoEncodeH264ReferenceInfoFlags.gen.cs | 36 + ...tdVideoEncodeH264ReferenceListsInfo.gen.cs | 73 + ...eoEncodeH264ReferenceListsInfoFlags.gen.cs | 49 + .../StdVideoEncodeH264SliceHeader.gen.cs | 67 + .../StdVideoEncodeH264SliceHeaderFlags.gen.cs | 49 + .../StdVideoEncodeH264WeightTable.gen.cs | 65 + .../StdVideoEncodeH264WeightTableFlags.gen.cs | 31 + .../StdVideoEncodeH265LongTermRefPics.gen.cs | 41 + .../StdVideoEncodeH265PictureInfo.gen.cs | 77 + .../StdVideoEncodeH265PictureInfoFlags.gen.cs | 140 + .../StdVideoEncodeH265ReferenceInfo.gen.cs | 31 + ...tdVideoEncodeH265ReferenceInfoFlags.gen.cs | 49 + ...tdVideoEncodeH265ReferenceListsInfo.gen.cs | 41 + ...eoEncodeH265ReferenceListsInfoFlags.gen.cs | 49 + ...tdVideoEncodeH265SliceSegmentHeader.gen.cs | 97 + ...eoEncodeH265SliceSegmentHeaderFlags.gen.cs | 179 + .../StdVideoEncodeH265WeightTable.gen.cs | 65 + .../StdVideoEncodeH265WeightTableFlags.gen.cs | 31 + .../Structs/StdVideoH264HrdParameters.gen.cs | 67 + .../StdVideoH264PictureParameterSet.gen.cs | 73 + .../Structs/StdVideoH264PpsFlags.gen.cs | 114 + .../Structs/StdVideoH264ScalingLists.gen.cs | 31 + .../StdVideoH264SequenceParameterSet.gen.cs | 157 + ...StdVideoH264SequenceParameterSetVui.gen.cs | 103 + .../Structs/StdVideoH264SpsFlags.gen.cs | 218 + .../Structs/StdVideoH264SpsVuiFlags.gen.cs | 166 + .../Structs/StdVideoH265DecPicBufMgr.gen.cs | 19 + .../Structs/StdVideoH265HrdFlags.gen.cs | 101 + .../Structs/StdVideoH265HrdParameters.gen.cs | 93 + .../StdVideoH265LongTermRefPicsSps.gen.cs | 17 + .../StdVideoH265PictureParameterSet.gen.cs | 215 + .../Structs/StdVideoH265PpsFlags.gen.cs | 413 + ...StdVideoH265PredictorPaletteEntries.gen.cs | 13 + .../StdVideoH265ProfileTierLevel.gen.cs | 25 + .../StdVideoH265ProfileTierLevelFlags.gen.cs | 75 + .../Structs/StdVideoH265ScalingLists.gen.cs | 41 + .../StdVideoH265SequenceParameterSet.gen.cs | 241 + ...StdVideoH265SequenceParameterSetVui.gen.cs | 163 + .../StdVideoH265ShortTermRefPicSet.gen.cs | 87 + ...StdVideoH265ShortTermRefPicSetFlags.gen.cs | 36 + .../Structs/StdVideoH265SpsFlags.gen.cs | 400 + .../Structs/StdVideoH265SpsVuiFlags.gen.cs | 244 + .../StdVideoH265SubLayerHrdParameters.gen.cs | 29 + .../StdVideoH265VideoParameterSet.gen.cs | 79 + .../Structs/StdVideoH265VpsFlags.gen.cs | 62 + .../Structs/StdVideoVP9ColorConfig.gen.cs | 43 + .../StdVideoVP9ColorConfigFlags.gen.cs | 36 + .../Structs/StdVideoVP9LoopFilter.gen.cs | 49 + .../Structs/StdVideoVP9LoopFilterFlags.gen.cs | 49 + .../Structs/StdVideoVP9Segmentation.gen.cs | 33 + .../StdVideoVP9SegmentationFlags.gen.cs | 75 + .../Structs/VkAabbPositionsKHR.gen.cs | 64 + ...rationStructureBuildGeometryInfoKHR.gen.cs | 100 + ...elerationStructureBuildRangeInfoKHR.gen.cs | 50 + ...elerationStructureBuildSizesInfoKHR.gen.cs | 59 + ...ructureCaptureDescriptorDataInfoEXT.gen.cs | 49 + ...AccelerationStructureCreateInfo2KHR.gen.cs | 64 + ...kAccelerationStructureCreateInfoKHR.gen.cs | 78 + ...VkAccelerationStructureCreateInfoNV.gen.cs | 50 + ...rationStructureDeviceAddressInfoKHR.gen.cs | 44 + ...rationStructureGeometryAabbsDataKHR.gen.cs | 51 + ...ccelerationStructureGeometryDataKHR.gen.cs | 43 + ...onStructureGeometryInstancesDataKHR.gen.cs | 51 + .../VkAccelerationStructureGeometryKHR.gen.cs | 57 + ...ureGeometryLinearSweptSpheresDataNV.gen.cs | 120 + ...ionStructureGeometryMicromapDataKHR.gen.cs | 85 + ...uctureGeometryMotionTrianglesDataNV.gen.cs | 44 + ...ationStructureGeometrySpheresDataNV.gen.cs | 105 + ...onStructureGeometryTrianglesDataKHR.gen.cs | 86 + .../VkAccelerationStructureInfoNV.gen.cs | 71 + .../VkAccelerationStructureInstanceKHR.gen.cs | 104 + ...tionStructureMatrixMotionInstanceNV.gen.cs | 103 + ...onStructureMemoryRequirementsInfoNV.gen.cs | 51 + ...VkAccelerationStructureMotionInfoNV.gen.cs | 50 + ...rationStructureMotionInstanceDataNV.gen.cs | 43 + ...celerationStructureMotionInstanceNV.gen.cs | 51 + ...erationStructureSRTMotionInstanceNV.gen.cs | 102 + ...tructureTrianglesOpacityMicromapEXT.gen.cs | 93 + ...tructureTrianglesOpacityMicromapKHR.gen.cs | 72 + ...AccelerationStructureVersionInfoKHR.gen.cs | 43 + .../Structs/VkAcquireNextImageInfoKHR.gen.cs | 68 + .../VkAcquireProfilingLockInfoKHR.gen.cs | 47 + .../Structs/VkAllocationCallbacks.gen.cs | 62 + .../VkAmigoProfilingSubmitInfoSEC.gen.cs | 49 + .../Generated/Structs/VkAntiLagDataAMD.gen.cs | 54 + .../VkAntiLagPresentationInfoAMD.gen.cs | 47 + .../Structs/VkApplicationInfo.gen.cs | 68 + .../Structs/VkAttachmentDescription.gen.cs | 85 + .../Structs/VkAttachmentDescription2.gen.cs | 99 + ...kAttachmentDescriptionStencilLayout.gen.cs | 47 + .../VkAttachmentFeedbackLoopInfoEXT.gen.cs | 45 + .../Structs/VkAttachmentReference.gen.cs | 36 + .../Structs/VkAttachmentReference2.gen.cs | 57 + .../VkAttachmentReferenceStencilLayout.gen.cs | 40 + .../VkAttachmentSampleCountInfoAMD.gen.cs | 45 + .../VkAttachmentSampleLocationsEXT.gen.cs | 33 + .../Structs/VkBaseInStructure.gen.cs | 33 + .../Structs/VkBaseOutStructure.gen.cs | 33 + .../VkBeginCustomResolveInfoEXT.gen.cs | 33 + ...ndAccelerationStructureMemoryInfoNV.gen.cs | 71 + .../VkBindBufferMemoryDeviceGroupInfo.gen.cs | 47 + .../Structs/VkBindBufferMemoryInfo.gen.cs | 61 + ...taGraphPipelineSessionMemoryInfoARM.gen.cs | 72 + ...riptorBufferEmbeddedSamplersInfoEXT.gen.cs | 58 + .../Structs/VkBindDescriptorSetsInfo.gen.cs | 85 + .../Structs/VkBindHeapInfoEXT.gen.cs | 54 + .../VkBindImageMemoryDeviceGroupInfo.gen.cs | 61 + .../Structs/VkBindImageMemoryInfo.gen.cs | 61 + .../VkBindImageMemorySwapchainInfoKHR.gen.cs | 53 + .../Structs/VkBindImagePlaneMemoryInfo.gen.cs | 45 + .../Structs/VkBindIndexBuffer3InfoKHR.gen.cs | 57 + ...VkBindIndexBufferIndirectCommandEXT.gen.cs | 41 + .../VkBindIndexBufferIndirectCommandNV.gen.cs | 41 + .../Structs/VkBindMemoryStatus.gen.cs | 40 + .../VkBindPipelineIndirectCommandNV.gen.cs | 27 + .../VkBindShaderGroupIndirectCommandNV.gen.cs | 27 + .../Generated/Structs/VkBindSparseInfo.gen.cs | 103 + .../Structs/VkBindTensorMemoryInfoARM.gen.cs | 54 + ...BindTransformFeedbackBuffer2InfoEXT.gen.cs | 50 + .../Structs/VkBindVertexBuffer3InfoKHR.gen.cs | 57 + ...kBindVertexBufferIndirectCommandEXT.gen.cs | 41 + ...VkBindVertexBufferIndirectCommandNV.gen.cs | 41 + .../VkBindVideoSessionMemoryInfoKHR.gen.cs | 61 + .../VkBlitImageCubicWeightsInfoQCOM.gen.cs | 43 + .../Generated/Structs/VkBlitImageInfo2.gen.cs | 85 + ...kBufferCaptureDescriptorDataInfoEXT.gen.cs | 41 + .../Generated/Structs/VkBufferCopy.gen.cs | 43 + .../Generated/Structs/VkBufferCopy2.gen.cs | 57 + .../Structs/VkBufferCreateInfo.gen.cs | 78 + .../VkBufferDeviceAddressCreateInfoEXT.gen.cs | 43 + .../Structs/VkBufferDeviceAddressInfo.gen.cs | 43 + .../Structs/VkBufferImageCopy.gen.cs | 65 + .../Structs/VkBufferImageCopy2.gen.cs | 79 + .../Structs/VkBufferMemoryBarrier.gen.cs | 85 + .../Structs/VkBufferMemoryBarrier2.gen.cs | 99 + .../VkBufferMemoryRequirementsInfo2.gen.cs | 40 + ...ufferOpaqueCaptureAddressCreateInfo.gen.cs | 43 + .../VkBufferUsageFlags2CreateInfo.gen.cs | 40 + .../Structs/VkBufferViewCreateInfo.gen.cs | 68 + ...elerationStructureIndirectCommandNV.gen.cs | 44 + ...titionedAccelerationStructureInfoNV.gen.cs | 79 + .../VkCalibratedTimestampInfoKHR.gen.cs | 40 + .../Structs/VkCheckpointData2NV.gen.cs | 47 + .../Structs/VkCheckpointDataNV.gen.cs | 47 + .../Structs/VkClearAttachment.gen.cs | 40 + .../Structs/VkClearColorValue.gen.cs | 40 + .../Structs/VkClearDepthStencilValue.gen.cs | 33 + .../Generated/Structs/VkClearRect.gen.cs | 40 + .../Generated/Structs/VkClearValue.gen.cs | 33 + ...ctureBuildClustersBottomLevelInfoNV.gen.cs | 44 + ...StructureBuildTriangleClusterInfoNV.gen.cs | 180 + ...eBuildTriangleClusterTemplateInfoNV.gen.cs | 187 + ...StructureClustersBottomLevelInputNV.gen.cs | 52 + ...AccelerationStructureCommandsInfoNV.gen.cs | 93 + ...tureGeometryIndexAndGeometryFlagsNV.gen.cs | 68 + ...onStructureGetTemplateIndicesInfoNV.gen.cs | 30 + ...terAccelerationStructureInputInfoNV.gen.cs | 71 + ...onStructureInstantiateClusterInfoNV.gen.cs | 75 + ...elerationStructureMoveObjectsInfoNV.gen.cs | 30 + ...lerationStructureMoveObjectsInputNV.gen.cs | 58 + ...usterAccelerationStructureOpInputNV.gen.cs | 43 + ...tionStructureTriangleClusterInputNV.gen.cs | 93 + .../Structs/VkCoarseSampleLocationNV.gen.cs | 43 + .../VkCoarseSampleOrderCustomNV.gen.cs | 47 + .../Structs/VkColorBlendAdvancedEXT.gen.cs | 54 + .../Structs/VkColorBlendEquationEXT.gen.cs | 61 + .../VkCommandBufferAllocateInfo.gen.cs | 54 + .../Structs/VkCommandBufferBeginInfo.gen.cs | 47 + ...eritanceConditionalRenderingInfoEXT.gen.cs | 48 + ...ferInheritanceDescriptorHeapInfoEXT.gen.cs | 54 + .../VkCommandBufferInheritanceInfo.gen.cs | 77 + ...eritanceRenderPassTransformInfoQCOM.gen.cs | 57 + ...mmandBufferInheritanceRenderingInfo.gen.cs | 82 + ...ferInheritanceViewportScissorInfoNV.gen.cs | 55 + .../Structs/VkCommandBufferSubmitInfo.gen.cs | 47 + .../Structs/VkCommandPoolCreateInfo.gen.cs | 47 + .../Structs/VkComponentMapping.gen.cs | 47 + ...omputeOccupancyPriorityParametersNV.gen.cs | 47 + .../VkComputePipelineCreateInfo.gen.cs | 71 + ...ComputePipelineIndirectBufferInfoNV.gen.cs | 54 + ...VkConditionalRenderingBeginInfo2EXT.gen.cs | 57 + .../VkConditionalRenderingBeginInfoEXT.gen.cs | 54 + .../Structs/VkConformanceVersion.gen.cs | 48 + ...onvertCooperativeVectorMatrixInfoNV.gen.cs | 121 + ...atrixFlexibleDimensionsPropertiesNV.gen.cs | 104 + .../VkCooperativeMatrixPropertiesKHR.gen.cs | 96 + .../VkCooperativeMatrixPropertiesNV.gen.cs | 89 + .../VkCooperativeVectorPropertiesNV.gen.cs | 81 + .../VkCopyAccelerationStructureInfoKHR.gen.cs | 57 + ...ccelerationStructureToMemoryInfoKHR.gen.cs | 54 + .../Structs/VkCopyBufferInfo2.gen.cs | 64 + .../Structs/VkCopyBufferToImageInfo2.gen.cs | 71 + .../VkCopyCommandTransformInfoQCOM.gen.cs | 40 + .../Structs/VkCopyDescriptorSet.gen.cs | 82 + .../VkCopyDeviceMemoryImageInfoKHR.gen.cs | 57 + .../Structs/VkCopyDeviceMemoryInfoKHR.gen.cs | 50 + .../Generated/Structs/VkCopyImageInfo2.gen.cs | 78 + .../Structs/VkCopyImageToBufferInfo2.gen.cs | 71 + .../Structs/VkCopyImageToImageInfo.gen.cs | 85 + .../Structs/VkCopyImageToMemoryInfo.gen.cs | 77 + .../VkCopyMemoryIndirectCommandKHR.gen.cs | 44 + .../VkCopyMemoryIndirectInfoKHR.gen.cs | 64 + ...emoryToAccelerationStructureInfoKHR.gen.cs | 58 + ...CopyMemoryToImageIndirectCommandKHR.gen.cs | 65 + .../VkCopyMemoryToImageIndirectInfoKHR.gen.cs | 78 + .../Structs/VkCopyMemoryToImageInfo.gen.cs | 77 + .../VkCopyMemoryToMicromapInfoEXT.gen.cs | 57 + .../Structs/VkCopyMicromapInfoEXT.gen.cs | 57 + .../VkCopyMicromapToMemoryInfoEXT.gen.cs | 54 + .../Structs/VkCopyTensorInfoARM.gen.cs | 61 + .../Structs/VkCuFunctionCreateInfoNVX.gen.cs | 49 + .../Structs/VkCuLaunchInfoNVX.gen.cs | 119 + .../Structs/VkCuModuleCreateInfoNVX.gen.cs | 49 + ...kCuModuleTexturingModeCreateInfoNVX.gen.cs | 42 + .../VkCustomResolveCreateInfoEXT.gen.cs | 68 + ...aGraphOpticalFlowImageFormatInfoARM.gen.cs | 40 + ...OpticalFlowImageFormatPropertiesARM.gen.cs | 41 + ...hPipelineBuiltinModelCreateInfoQCOM.gen.cs | 44 + ...ipelineCompilerControlCreateInfoARM.gen.cs | 44 + .../VkDataGraphPipelineConstantARM.gen.cs | 50 + ...TensorSemiStructuredSparsityInfoARM.gen.cs | 59 + .../VkDataGraphPipelineCreateInfoARM.gen.cs | 64 + .../VkDataGraphPipelineDispatchInfoARM.gen.cs | 40 + ...raphPipelineIdentifierCreateInfoARM.gen.cs | 51 + .../Structs/VkDataGraphPipelineInfoARM.gen.cs | 43 + ...pelineNeuralStatisticsCreateInfoARM.gen.cs | 44 + ...aphPipelineOpticalFlowCreateInfoARM.gen.cs | 97 + ...hPipelineOpticalFlowDispatchInfoARM.gen.cs | 48 + ...GraphPipelinePropertyQueryResultARM.gen.cs | 64 + .../VkDataGraphPipelineResourceInfoARM.gen.cs | 57 + ...hPipelineResourceInfoImageLayoutARM.gen.cs | 44 + ...elineSessionBindPointRequirementARM.gen.cs | 54 + ...SessionBindPointRequirementsInfoARM.gen.cs | 40 + ...taGraphPipelineSessionCreateInfoARM.gen.cs | 50 + ...ineSessionMemoryRequirementsInfoARM.gen.cs | 58 + ...essionNeuralStatisticsCreateInfoARM.gen.cs | 40 + ...phPipelineShaderModuleCreateInfoARM.gen.cs | 72 + ...raphPipelineSingleNodeConnectionARM.gen.cs | 55 + ...raphPipelineSingleNodeCreateInfoARM.gen.cs | 58 + ...aGraphProcessingEngineCreateInfoARM.gen.cs | 47 + .../VkDataGraphTosaNameQualityARM.gen.cs | 31 + .../Structs/VkDebugMarkerMarkerInfoEXT.gen.cs | 47 + .../VkDebugMarkerObjectNameInfoEXT.gen.cs | 54 + .../VkDebugMarkerObjectTagInfoEXT.gen.cs | 68 + .../VkDebugReportCallbackCreateInfoEXT.gen.cs | 54 + .../Structs/VkDebugUtilsLabelEXT.gen.cs | 47 + ...kDebugUtilsMessengerCallbackDataEXT.gen.cs | 103 + .../VkDebugUtilsMessengerCreateInfoEXT.gen.cs | 68 + .../VkDebugUtilsObjectNameInfoEXT.gen.cs | 54 + .../VkDebugUtilsObjectTagInfoEXT.gen.cs | 68 + .../Structs/VkDecompressMemoryInfoEXT.gen.cs | 57 + .../VkDecompressMemoryRegionEXT.gen.cs | 50 + .../Structs/VkDecompressMemoryRegionNV.gen.cs | 57 + ...dicatedAllocationBufferCreateInfoNV.gen.cs | 46 + ...edicatedAllocationImageCreateInfoNV.gen.cs | 46 + ...catedAllocationMemoryAllocateInfoNV.gen.cs | 53 + .../Generated/Structs/VkDependencyInfo.gen.cs | 82 + .../Structs/VkDepthBiasInfoEXT.gen.cs | 57 + .../VkDepthBiasRepresentationInfoEXT.gen.cs | 50 + .../Structs/VkDepthClampRangeEXT.gen.cs | 33 + .../Structs/VkDescriptorAddressInfoEXT.gen.cs | 58 + .../VkDescriptorBufferBindingInfoEXT.gen.cs | 51 + ...indingPushDescriptorBufferHandleEXT.gen.cs | 43 + .../Structs/VkDescriptorBufferInfo.gen.cs | 40 + .../Structs/VkDescriptorDataEXT.gen.cs | 90 + .../Structs/VkDescriptorGetInfoEXT.gen.cs | 48 + .../VkDescriptorGetTensorInfoARM.gen.cs | 40 + .../Structs/VkDescriptorImageInfo.gen.cs | 40 + ...iptorMappingSourceConstantOffsetEXT.gen.cs | 58 + .../VkDescriptorMappingSourceDataEXT.gen.cs | 99 + ...kDescriptorMappingSourceHeapDataEXT.gen.cs | 36 + ...ptorMappingSourceIndirectAddressEXT.gen.cs | 37 + ...rMappingSourceIndirectIndexArrayEXT.gen.cs | 93 + ...riptorMappingSourceIndirectIndexEXT.gen.cs | 106 + ...DescriptorMappingSourcePushIndexEXT.gen.cs | 92 + ...orMappingSourceShaderRecordIndexEXT.gen.cs | 93 + .../Structs/VkDescriptorPoolCreateInfo.gen.cs | 62 + ...torPoolInlineUniformBlockCreateInfo.gen.cs | 53 + .../Structs/VkDescriptorPoolSize.gen.cs | 33 + .../VkDescriptorSetAllocateInfo.gen.cs | 54 + ...VkDescriptorSetAndBindingMappingEXT.gen.cs | 78 + ...kDescriptorSetBindingReferenceVALVE.gen.cs | 49 + .../VkDescriptorSetLayoutBinding.gen.cs | 54 + ...ptorSetLayoutBindingFlagsCreateInfo.gen.cs | 54 + .../VkDescriptorSetLayoutCreateInfo.gen.cs | 55 + ...riptorSetLayoutHostMappingInfoVALVE.gen.cs | 49 + .../VkDescriptorSetLayoutSupport.gen.cs | 41 + ...VariableDescriptorCountAllocateInfo.gen.cs | 55 + ...ariableDescriptorCountLayoutSupport.gen.cs | 43 + ...kDescriptorUpdateTemplateCreateInfo.gen.cs | 89 + .../VkDescriptorUpdateTemplateEntry.gen.cs | 61 + ...DeviceAddressBindingCallbackDataEXT.gen.cs | 61 + .../Structs/VkDeviceAddressRangeKHR.gen.cs | 36 + .../VkDeviceBufferMemoryRequirements.gen.cs | 40 + .../Structs/VkDeviceCreateInfo.gen.cs | 91 + ...viceDeviceMemoryReportCreateInfoEXT.gen.cs | 57 + ...DeviceDiagnosticsConfigCreateInfoNV.gen.cs | 43 + .../Structs/VkDeviceEventInfoEXT.gen.cs | 40 + .../VkDeviceFaultAddressInfoKHR.gen.cs | 40 + .../Structs/VkDeviceFaultCountsEXT.gen.cs | 54 + .../Structs/VkDeviceFaultDebugInfoKHR.gen.cs | 59 + .../Structs/VkDeviceFaultInfoEXT.gen.cs | 59 + .../Structs/VkDeviceFaultInfoKHR.gen.cs | 73 + ...eviceFaultShaderAbortMessageInfoKHR.gen.cs | 47 + ...aultVendorBinaryHeaderVersionOneKHR.gen.cs | 94 + .../Structs/VkDeviceFaultVendorInfoKHR.gen.cs | 38 + .../VkDeviceGroupBindSparseInfo.gen.cs | 53 + ...VkDeviceGroupCommandBufferBeginInfo.gen.cs | 45 + .../VkDeviceGroupDeviceCreateInfo.gen.cs | 50 + ...VkDeviceGroupPresentCapabilitiesKHR.gen.cs | 45 + .../VkDeviceGroupPresentInfoKHR.gen.cs | 59 + .../VkDeviceGroupRenderPassBeginInfo.gen.cs | 60 + .../Structs/VkDeviceGroupSubmitInfo.gen.cs | 81 + ...VkDeviceGroupSwapchainCreateInfoKHR.gen.cs | 46 + .../VkDeviceImageMemoryRequirements.gen.cs | 47 + .../VkDeviceImageSubresourceInfo.gen.cs | 50 + .../Structs/VkDeviceMemoryCopyKHR.gen.cs | 64 + .../Structs/VkDeviceMemoryImageCopyKHR.gen.cs | 92 + ...eviceMemoryOpaqueCaptureAddressInfo.gen.cs | 40 + ...ceMemoryOverallocationCreateInfoAMD.gen.cs | 45 + ...VkDeviceMemoryReportCallbackDataEXT.gen.cs | 82 + .../VkDeviceOrHostAddressConstKHR.gen.cs | 36 + .../Structs/VkDeviceOrHostAddressKHR.gen.cs | 36 + ...pelineBinaryInternalCacheControlKHR.gen.cs | 42 + .../VkDevicePrivateDataCreateInfo.gen.cs | 44 + .../Structs/VkDeviceQueueCreateInfo.gen.cs | 61 + ...DeviceQueueGlobalPriorityCreateInfo.gen.cs | 45 + .../Structs/VkDeviceQueueInfo2.gen.cs | 54 + ...QueueShaderCoreControlCreateInfoARM.gen.cs | 46 + ...VkDeviceTensorMemoryRequirementsARM.gen.cs | 40 + .../VkDirectDriverLoadingInfoLUNARG.gen.cs | 47 + .../VkDirectDriverLoadingListLUNARG.gen.cs | 54 + .../Structs/VkDispatchIndirect2InfoKHR.gen.cs | 50 + .../Structs/VkDispatchIndirectCommand.gen.cs | 40 + .../Structs/VkDispatchParametersARM.gen.cs | 54 + .../Structs/VkDispatchTileInfoQCOM.gen.cs | 33 + .../Structs/VkDisplayEventInfoEXT.gen.cs | 40 + .../Structs/VkDisplayModeCreateInfoKHR.gen.cs | 47 + .../Structs/VkDisplayModeParametersKHR.gen.cs | 33 + .../VkDisplayModeProperties2KHR.gen.cs | 40 + .../Structs/VkDisplayModePropertiesKHR.gen.cs | 33 + .../VkDisplayModeStereoPropertiesNV.gen.cs | 40 + ...playNativeHdrSurfaceCapabilitiesAMD.gen.cs | 40 + .../VkDisplayPlaneCapabilities2KHR.gen.cs | 40 + .../VkDisplayPlaneCapabilitiesKHR.gen.cs | 82 + .../Structs/VkDisplayPlaneInfo2KHR.gen.cs | 47 + .../VkDisplayPlaneProperties2KHR.gen.cs | 40 + .../VkDisplayPlanePropertiesKHR.gen.cs | 33 + .../Structs/VkDisplayPowerInfoEXT.gen.cs | 40 + .../Structs/VkDisplayPresentInfoKHR.gen.cs | 54 + .../Structs/VkDisplayProperties2KHR.gen.cs | 40 + .../Structs/VkDisplayPropertiesKHR.gen.cs | 68 + .../VkDisplaySurfaceCreateInfoKHR.gen.cs | 89 + .../VkDisplaySurfaceStereoCreateInfoNV.gen.cs | 40 + .../VkDrawIndexedIndirectCommand.gen.cs | 57 + .../Structs/VkDrawIndirect2InfoKHR.gen.cs | 57 + .../Structs/VkDrawIndirectCommand.gen.cs | 50 + .../VkDrawIndirectCount2InfoKHR.gen.cs | 71 + ...DrawIndirectCountIndirectCommandEXT.gen.cs | 41 + .../VkDrawMeshTasksIndirectCommandEXT.gen.cs | 43 + .../VkDrawMeshTasksIndirectCommandNV.gen.cs | 33 + .../VkDrmFormatModifierProperties2EXT.gen.cs | 47 + .../VkDrmFormatModifierPropertiesEXT.gen.cs | 47 + ...DrmFormatModifierPropertiesList2EXT.gen.cs | 53 + ...kDrmFormatModifierPropertiesListEXT.gen.cs | 53 + .../Structs/VkEventCreateInfo.gen.cs | 40 + .../Structs/VkExportFenceCreateInfo.gen.cs | 43 + .../Structs/VkExportMemoryAllocateInfo.gen.cs | 46 + .../VkExportMemoryAllocateInfoNV.gen.cs | 40 + .../VkExportSemaphoreCreateInfo.gen.cs | 43 + .../Structs/VkExtensionProperties.gen.cs | 31 + .../Generated/Structs/VkExtent2D.gen.cs | 33 + .../Generated/Structs/VkExtent3D.gen.cs | 40 + .../Structs/VkExternalBufferProperties.gen.cs | 40 + .../VkExternalComputeQueueCreateInfoNV.gen.cs | 40 + .../VkExternalComputeQueueDataParamsNV.gen.cs | 40 + ...ernalComputeQueueDeviceCreateInfoNV.gen.cs | 40 + .../Structs/VkExternalFenceProperties.gen.cs | 54 + .../VkExternalImageFormatProperties.gen.cs | 40 + .../VkExternalImageFormatPropertiesNV.gen.cs | 47 + ...kExternalMemoryAcquireUnmodifiedEXT.gen.cs | 48 + .../VkExternalMemoryBufferCreateInfo.gen.cs | 43 + .../VkExternalMemoryImageCreateInfo.gen.cs | 43 + .../VkExternalMemoryImageCreateInfoNV.gen.cs | 45 + .../Structs/VkExternalMemoryProperties.gen.cs | 40 + ...VkExternalMemoryTensorCreateInfoARM.gen.cs | 46 + .../VkExternalSemaphoreProperties.gen.cs | 54 + .../VkExternalTensorPropertiesARM.gen.cs | 40 + .../Structs/VkFenceCreateInfo.gen.cs | 40 + .../Structs/VkFenceGetFdInfoKHR.gen.cs | 47 + ...icImageViewImageFormatPropertiesEXT.gen.cs | 48 + .../Structs/VkFormatProperties.gen.cs | 40 + .../Structs/VkFormatProperties2.gen.cs | 40 + .../Structs/VkFormatProperties3.gen.cs | 59 + .../Structs/VkFormatProperties4KHR.gen.cs | 54 + ...ragmentShadingRateAttachmentInfoKHR.gen.cs | 47 + .../Structs/VkFrameBoundaryEXT.gen.cs | 96 + .../Structs/VkFrameBoundaryTensorsARM.gen.cs | 47 + .../VkFramebufferAttachmentImageInfo.gen.cs | 82 + .../VkFramebufferAttachmentsCreateInfo.gen.cs | 47 + .../Structs/VkFramebufferCreateInfo.gen.cs | 82 + ...ramebufferMixedSamplesCombinationNV.gen.cs | 61 + .../Structs/VkGeneratedCommandsInfoEXT.gen.cs | 106 + .../Structs/VkGeneratedCommandsInfoNV.gen.cs | 127 + ...edCommandsMemoryRequirementsInfoEXT.gen.cs | 58 + ...tedCommandsMemoryRequirementsInfoNV.gen.cs | 58 + .../VkGeneratedCommandsPipelineInfoEXT.gen.cs | 37 + .../VkGeneratedCommandsShaderInfoEXT.gen.cs | 44 + .../Generated/Structs/VkGeometryAabbNV.gen.cs | 65 + .../Generated/Structs/VkGeometryDataNV.gen.cs | 37 + .../Generated/Structs/VkGeometryNV.gen.cs | 58 + .../Structs/VkGeometryTrianglesNV.gen.cs | 114 + .../Structs/VkGetLatencyMarkerInfoNV.gen.cs | 47 + .../VkGpaDeviceClockModeInfoAMD.gen.cs | 57 + .../Structs/VkGpaDeviceGetClockInfoAMD.gen.cs | 64 + .../VkGpaPerfBlockPropertiesAMD.gen.cs | 68 + .../Structs/VkGpaPerfCounterAMD.gen.cs | 40 + .../Structs/VkGpaSampleBeginInfoAMD.gen.cs | 131 + .../Structs/VkGpaSessionCreateInfoAMD.gen.cs | 40 + .../VkGraphicsPipelineCreateInfo.gen.cs | 155 + ...raphicsPipelineLibraryCreateInfoEXT.gen.cs | 40 + ...icsPipelineShaderGroupsCreateInfoNV.gen.cs | 62 + .../VkGraphicsShaderGroupCreateInfoNV.gen.cs | 65 + .../Generated/Structs/VkHdrMetadataEXT.gen.cs | 89 + .../VkHdrVividDynamicMetadataHUAWEI.gen.cs | 53 + .../VkHeadlessSurfaceCreateInfoEXT.gen.cs | 40 + .../Structs/VkHostAddressRangeConstEXT.gen.cs | 34 + .../Structs/VkHostAddressRangeEXT.gen.cs | 33 + ...HostImageCopyDevicePerformanceQuery.gen.cs | 54 + .../VkHostImageLayoutTransitionInfo.gen.cs | 64 + ...ImageAlignmentControlCreateInfoMESA.gen.cs | 45 + .../Generated/Structs/VkImageBlit.gen.cs | 50 + .../Generated/Structs/VkImageBlit2.gen.cs | 64 + ...VkImageCaptureDescriptorDataInfoEXT.gen.cs | 41 + .../VkImageCompressionControlEXT.gen.cs | 59 + .../VkImageCompressionPropertiesEXT.gen.cs | 50 + .../Generated/Structs/VkImageCopy.gen.cs | 57 + .../Generated/Structs/VkImageCopy2.gen.cs | 71 + .../VkImageCreateFlags2CreateInfoKHR.gen.cs | 40 + .../Structs/VkImageCreateInfo.gen.cs | 124 + .../Structs/VkImageDescriptorInfoEXT.gen.cs | 47 + ...FormatModifierExplicitCreateInfoEXT.gen.cs | 61 + ...eDrmFormatModifierListCreateInfoEXT.gen.cs | 54 + ...ImageDrmFormatModifierPropertiesEXT.gen.cs | 40 + .../VkImageFormatListCreateInfo.gen.cs | 52 + .../Structs/VkImageFormatProperties.gen.cs | 54 + .../Structs/VkImageFormatProperties2.gen.cs | 40 + .../Structs/VkImageMemoryBarrier.gen.cs | 92 + .../Structs/VkImageMemoryBarrier2.gen.cs | 106 + .../VkImageMemoryRequirementsInfo2.gen.cs | 40 + .../VkImagePlaneMemoryRequirementsInfo.gen.cs | 45 + .../Generated/Structs/VkImageResolve.gen.cs | 57 + .../Generated/Structs/VkImageResolve2.gen.cs | 71 + ...kImageSparseMemoryRequirementsInfo2.gen.cs | 40 + .../VkImageStencilUsage2CreateInfoKHR.gen.cs | 40 + .../VkImageStencilUsageCreateInfo.gen.cs | 40 + .../Structs/VkImageSubresource.gen.cs | 40 + .../Structs/VkImageSubresource2.gen.cs | 40 + .../Structs/VkImageSubresourceLayers.gen.cs | 47 + .../Structs/VkImageSubresourceRange.gen.cs | 54 + .../VkImageSwapchainCreateInfoKHR.gen.cs | 46 + .../Structs/VkImageToMemoryCopy.gen.cs | 81 + .../VkImageUsageFlags2CreateInfoKHR.gen.cs | 40 + .../VkImageViewAddressPropertiesNVX.gen.cs | 47 + .../VkImageViewAstcDecodeModeEXT.gen.cs | 45 + ...ageViewCaptureDescriptorDataInfoEXT.gen.cs | 41 + .../Structs/VkImageViewCreateInfo.gen.cs | 75 + .../Structs/VkImageViewHandleInfoNVX.gen.cs | 54 + .../VkImageViewMinLodCreateInfoEXT.gen.cs | 40 + ...ImageViewSampleWeightCreateInfoQCOM.gen.cs | 60 + .../VkImageViewSlicedCreateInfoEXT.gen.cs | 53 + .../VkImageViewUsage2CreateInfoKHR.gen.cs | 46 + .../Structs/VkImageViewUsageCreateInfo.gen.cs | 46 + .../Structs/VkImportFenceFdInfoKHR.gen.cs | 61 + .../Structs/VkImportMemoryFdInfoKHR.gen.cs | 50 + .../VkImportMemoryHostPointerInfoEXT.gen.cs | 50 + .../Structs/VkImportSemaphoreFdInfoKHR.gen.cs | 61 + ...ndirectCommandsExecutionSetTokenEXT.gen.cs | 35 + ...IndirectCommandsIndexBufferTokenEXT.gen.cs | 28 + ...IndirectCommandsLayoutCreateInfoEXT.gen.cs | 75 + ...kIndirectCommandsLayoutCreateInfoNV.gen.cs | 75 + ...directCommandsLayoutPushDataTokenNV.gen.cs | 48 + .../VkIndirectCommandsLayoutTokenEXT.gen.cs | 55 + .../VkIndirectCommandsLayoutTokenNV.gen.cs | 125 + ...ndirectCommandsPushConstantTokenEXT.gen.cs | 29 + .../Structs/VkIndirectCommandsStreamNV.gen.cs | 34 + .../VkIndirectCommandsTokenDataEXT.gen.cs | 48 + ...ndirectCommandsVertexBufferTokenEXT.gen.cs | 28 + ...VkIndirectExecutionSetCreateInfoEXT.gen.cs | 47 + .../VkIndirectExecutionSetInfoEXT.gen.cs | 33 + ...IndirectExecutionSetPipelineInfoEXT.gen.cs | 47 + ...VkIndirectExecutionSetShaderInfoEXT.gen.cs | 75 + ...rectExecutionSetShaderLayoutInfoEXT.gen.cs | 47 + ...VkInitializePerformanceApiInfoINTEL.gen.cs | 40 + .../VkInputAttachmentAspectReference.gen.cs | 40 + .../Structs/VkInstanceCreateInfo.gen.cs | 75 + .../Structs/VkLatencySleepInfoNV.gen.cs | 47 + .../Structs/VkLatencySleepModeInfoNV.gen.cs | 54 + .../VkLatencySubmissionPresentIdNV.gen.cs | 40 + .../VkLatencySurfaceCapabilitiesNV.gen.cs | 47 + .../VkLatencyTimingsFrameReportNV.gen.cs | 132 + .../Structs/VkLayerProperties.gen.cs | 43 + .../Structs/VkLayerSettingEXT.gen.cs | 56 + .../VkLayerSettingsCreateInfoEXT.gen.cs | 50 + .../Structs/VkMappedMemoryRange.gen.cs | 54 + .../Structs/VkMemoryAllocateFlagsInfo.gen.cs | 53 + .../Structs/VkMemoryAllocateInfo.gen.cs | 47 + .../Generated/Structs/VkMemoryBarrier.gen.cs | 47 + .../Generated/Structs/VkMemoryBarrier2.gen.cs | 64 + .../VkMemoryBarrierAccessFlags3KHR.gen.cs | 47 + .../VkMemoryDedicatedAllocateInfo.gen.cs | 52 + ...emoryDedicatedAllocateInfoTensorARM.gen.cs | 46 + .../VkMemoryDedicatedRequirements.gen.cs | 47 + .../Structs/VkMemoryFdPropertiesKHR.gen.cs | 40 + .../Structs/VkMemoryGetFdInfoKHR.gen.cs | 47 + .../VkMemoryGetRemoteAddressInfoNV.gen.cs | 47 + .../Generated/Structs/VkMemoryHeap.gen.cs | 33 + .../VkMemoryHostPointerPropertiesEXT.gen.cs | 40 + .../Generated/Structs/VkMemoryMapInfo.gen.cs | 61 + .../Structs/VkMemoryMapPlacedInfoEXT.gen.cs | 58 + .../Structs/VkMemoryMarkerInfoAMD.gen.cs | 64 + ...oryOpaqueCaptureAddressAllocateInfo.gen.cs | 43 + .../VkMemoryPriorityAllocateInfoEXT.gen.cs | 44 + .../Structs/VkMemoryRangeBarrierKHR.gen.cs | 92 + .../VkMemoryRangeBarriersInfoKHR.gen.cs | 50 + .../Structs/VkMemoryRequirements.gen.cs | 40 + .../Structs/VkMemoryRequirements2.gen.cs | 40 + .../Structs/VkMemoryToImageCopy.gen.cs | 81 + .../Generated/Structs/VkMemoryType.gen.cs | 33 + .../Structs/VkMemoryUnmapInfo.gen.cs | 47 + .../Structs/VkMicromapBuildInfoEXT.gen.cs | 113 + .../VkMicromapBuildSizesInfoEXT.gen.cs | 58 + .../Structs/VkMicromapCreateInfoEXT.gen.cs | 78 + .../Structs/VkMicromapTriangleKHR.gen.cs | 43 + .../Structs/VkMicromapUsageEXT.gen.cs | 43 + .../Structs/VkMicromapUsageKHR.gen.cs | 43 + .../Structs/VkMicromapVersionInfoEXT.gen.cs | 43 + .../Structs/VkMultiDrawIndexedInfoEXT.gen.cs | 40 + .../Structs/VkMultiDrawInfoEXT.gen.cs | 33 + .../Structs/VkMultisamplePropertiesEXT.gen.cs | 40 + ...sampledRenderToSingleSampledInfoEXT.gen.cs | 54 + ...VkMultiviewPerViewAttributesInfoNVX.gen.cs | 47 + ...wRenderAreasRenderPassBeginInfoQCOM.gen.cs | 55 + ...kMutableDescriptorTypeCreateInfoEXT.gen.cs | 54 + .../VkMutableDescriptorTypeListEXT.gen.cs | 37 + .../Generated/Structs/VkOffset2D.gen.cs | 33 + .../Generated/Structs/VkOffset3D.gen.cs | 40 + .../VkOpaqueCaptureDataCreateInfoEXT.gen.cs | 40 + ...eCaptureDescriptorDataCreateInfoEXT.gen.cs | 41 + .../Structs/VkOpticalFlowExecuteInfoNV.gen.cs | 54 + .../VkOpticalFlowImageFormatInfoNV.gen.cs | 40 + ...kOpticalFlowImageFormatPropertiesNV.gen.cs | 40 + .../VkOpticalFlowSessionCreateInfoNV.gen.cs | 96 + ...lFlowSessionCreatePrivateDataInfoNV.gen.cs | 55 + .../Structs/VkOutOfBandQueueTypeInfoNV.gen.cs | 40 + ...itionedAccelerationStructureFlagsNV.gen.cs | 43 + ...celerationStructureInstancesInputNV.gen.cs | 72 + ...rationStructureUpdateInstanceDataNV.gen.cs | 44 + ...erationStructureWriteInstanceDataNV.gen.cs | 84 + ...tureWritePartitionTranslationDataNV.gen.cs | 37 + .../VkPastPresentationTimingEXT.gen.cs | 82 + .../VkPastPresentationTimingGOOGLE.gen.cs | 54 + .../VkPastPresentationTimingInfoEXT.gen.cs | 47 + ...PastPresentationTimingPropertiesEXT.gen.cs | 61 + .../Structs/VkPerTileBeginInfoQCOM.gen.cs | 33 + .../Structs/VkPerTileEndInfoQCOM.gen.cs | 33 + .../Structs/VkPerfHintInfoQCOM.gen.cs | 47 + ...rmanceConfigurationAcquireInfoINTEL.gen.cs | 41 + .../Structs/VkPerformanceCounterARM.gen.cs | 40 + .../VkPerformanceCounterDescriptionARM.gen.cs | 45 + .../VkPerformanceCounterDescriptionKHR.gen.cs | 55 + .../Structs/VkPerformanceCounterKHR.gen.cs | 59 + .../VkPerformanceCounterResultKHR.gen.cs | 61 + .../VkPerformanceMarkerInfoINTEL.gen.cs | 40 + .../VkPerformanceOverrideInfoINTEL.gen.cs | 54 + .../VkPerformanceQuerySubmitInfoKHR.gen.cs | 40 + .../VkPerformanceStreamMarkerInfoINTEL.gen.cs | 40 + .../VkPerformanceValueDataINTEL.gen.cs | 54 + .../Structs/VkPerformanceValueINTEL.gen.cs | 33 + ...kPhysicalDevice16BitStorageFeatures.gen.cs | 61 + ...hysicalDevice4444FormatsFeaturesEXT.gen.cs | 47 + ...VkPhysicalDevice8BitStorageFeatures.gen.cs | 54 + ...iceAccelerationStructureFeaturesKHR.gen.cs | 70 + ...eAccelerationStructurePropertiesKHR.gen.cs | 90 + ...viceAddressBindingReportFeaturesEXT.gen.cs | 41 + ...icalDeviceAmigoProfilingFeaturesSEC.gen.cs | 43 + .../VkPhysicalDeviceAntiLagFeaturesAMD.gen.cs | 40 + ...PhysicalDeviceAstcDecodeFeaturesEXT.gen.cs | 40 + ...FeedbackLoopDynamicStateFeaturesEXT.gen.cs | 42 + ...chmentFeedbackLoopLayoutFeaturesEXT.gen.cs | 41 + ...ceBlendOperationAdvancedFeaturesEXT.gen.cs | 41 + ...BlendOperationAdvancedPropertiesEXT.gen.cs | 76 + ...DeviceBorderColorSwizzleFeaturesEXT.gen.cs | 48 + ...alDeviceBufferDeviceAddressFeatures.gen.cs | 55 + ...eviceBufferDeviceAddressFeaturesEXT.gen.cs | 60 + ...sterAccelerationStructureFeaturesNV.gen.cs | 41 + ...erAccelerationStructurePropertiesNV.gen.cs | 91 + ...eClusterCullingShaderFeaturesHUAWEI.gen.cs | 48 + ...lusterCullingShaderPropertiesHUAWEI.gen.cs | 62 + ...usterCullingShaderVrsFeaturesHUAWEI.gen.cs | 45 + ...icalDeviceCoherentMemoryFeaturesAMD.gen.cs | 40 + ...alDeviceColorWriteEnableFeaturesEXT.gen.cs | 41 + ...eCommandBufferInheritanceFeaturesNV.gen.cs | 41 + ...eComputeOccupancyPriorityFeaturesNV.gen.cs | 41 + ...ComputeShaderDerivativesFeaturesKHR.gen.cs | 48 + ...mputeShaderDerivativesPropertiesKHR.gen.cs | 41 + ...viceConditionalRenderingFeaturesEXT.gen.cs | 48 + ...servativeRasterizationPropertiesEXT.gen.cs | 97 + ...lDeviceCooperativeMatrix2FeaturesNV.gen.cs | 83 + ...eviceCooperativeMatrix2PropertiesNV.gen.cs | 55 + ...erativeMatrixConversionFeaturesQCOM.gen.cs | 41 + ...erativeMatrixDecodeVectorFeaturesNV.gen.cs | 41 + ...lDeviceCooperativeMatrixFeaturesKHR.gen.cs | 48 + ...alDeviceCooperativeMatrixFeaturesNV.gen.cs | 48 + ...eviceCooperativeMatrixPropertiesKHR.gen.cs | 41 + ...DeviceCooperativeMatrixPropertiesNV.gen.cs | 41 + ...alDeviceCooperativeVectorFeaturesNV.gen.cs | 48 + ...DeviceCooperativeVectorPropertiesNV.gen.cs | 62 + ...DeviceCopyMemoryIndirectFeaturesKHR.gen.cs | 48 + ...lDeviceCopyMemoryIndirectFeaturesNV.gen.cs | 41 + ...viceCopyMemoryIndirectPropertiesKHR.gen.cs | 41 + ...lDeviceCornerSampledImageFeaturesNV.gen.cs | 41 + ...viceCoverageReductionModeFeaturesNV.gen.cs | 41 + ...hysicalDeviceCubicClampFeaturesQCOM.gen.cs | 40 + ...sicalDeviceCubicWeightsFeaturesQCOM.gen.cs | 40 + ...lDeviceCustomBorderColorFeaturesEXT.gen.cs | 48 + ...eviceCustomBorderColorPropertiesEXT.gen.cs | 41 + ...sicalDeviceCustomResolveFeaturesEXT.gen.cs | 40 + ...kPhysicalDeviceDataGraphFeaturesARM.gen.cs | 68 + ...calDeviceDataGraphModelFeaturesQCOM.gen.cs | 41 + ...ralAcceleratorStatisticsFeaturesARM.gen.cs | 42 + ...lDeviceDataGraphOperationSupportARM.gen.cs | 39 + ...viceDataGraphOpticalFlowFeaturesARM.gen.cs | 41 + ...lDeviceDataGraphProcessingEngineARM.gen.cs | 34 + ...edAllocationImageAliasingFeaturesNV.gen.cs | 42 + ...alDeviceDepthBiasControlFeaturesEXT.gen.cs | 62 + ...lDeviceDepthClampControlFeaturesEXT.gen.cs | 41 + ...lDeviceDepthClampZeroOneFeaturesKHR.gen.cs | 41 + ...alDeviceDepthClipControlFeaturesEXT.gen.cs | 41 + ...calDeviceDepthClipEnableFeaturesEXT.gen.cs | 41 + ...DeviceDepthStencilResolveProperties.gen.cs | 62 + ...riptorBufferDensityMapPropertiesEXT.gen.cs | 41 + ...alDeviceDescriptorBufferFeaturesEXT.gen.cs | 62 + ...DeviceDescriptorBufferPropertiesEXT.gen.cs | 265 + ...ceDescriptorBufferTensorFeaturesARM.gen.cs | 41 + ...DescriptorBufferTensorPropertiesARM.gen.cs | 55 + ...icalDeviceDescriptorHeapFeaturesEXT.gen.cs | 47 + ...alDeviceDescriptorHeapPropertiesEXT.gen.cs | 167 + ...ceDescriptorHeapTensorPropertiesARM.gen.cs | 55 + ...calDeviceDescriptorIndexingFeatures.gen.cs | 174 + ...lDeviceDescriptorIndexingProperties.gen.cs | 195 + ...criptorPoolOverallocationFeaturesNV.gen.cs | 41 + ...scriptorSetHostMappingFeaturesVALVE.gen.cs | 42 + ...iceDeviceAddressCommandsFeaturesKHR.gen.cs | 41 + ...eGeneratedCommandsComputeFeaturesNV.gen.cs | 56 + ...eDeviceGeneratedCommandsFeaturesEXT.gen.cs | 48 + ...ceDeviceGeneratedCommandsFeaturesNV.gen.cs | 41 + ...eviceGeneratedCommandsPropertiesEXT.gen.cs | 118 + ...DeviceGeneratedCommandsPropertiesNV.gen.cs | 97 + ...DeviceDeviceMemoryReportFeaturesEXT.gen.cs | 41 + ...alDeviceDiagnosticsConfigFeaturesNV.gen.cs | 41 + ...DeviceDiscardRectanglePropertiesEXT.gen.cs | 41 + .../VkPhysicalDeviceDriverProperties.gen.cs | 57 + .../VkPhysicalDeviceDrmPropertiesEXT.gen.cs | 75 + ...sicalDeviceDynamicRenderingFeatures.gen.cs | 40 + ...ceDynamicRenderingLocalReadFeatures.gen.cs | 41 + ...nderingUnusedAttachmentsFeaturesEXT.gen.cs | 42 + ...DeviceElapsedTimerQueryFeaturesQCOM.gen.cs | 41 + ...calDeviceExclusiveScissorFeaturesNV.gen.cs | 41 + ...iceExtendedDynamicState2FeaturesEXT.gen.cs | 55 + ...iceExtendedDynamicState3FeaturesEXT.gen.cs | 251 + ...eExtendedDynamicState3PropertiesEXT.gen.cs | 41 + ...viceExtendedDynamicStateFeaturesEXT.gen.cs | 41 + ...sicalDeviceExtendedFlagsFeaturesKHR.gen.cs | 40 + ...xtendedSparseAddressSpaceFeaturesNV.gen.cs | 41 + ...endedSparseAddressSpacePropertiesNV.gen.cs | 55 + .../VkPhysicalDeviceExternalBufferInfo.gen.cs | 57 + ...iceExternalComputeQueuePropertiesNV.gen.cs | 48 + .../VkPhysicalDeviceExternalFenceInfo.gen.cs | 40 + ...ysicalDeviceExternalImageFormatInfo.gen.cs | 47 + ...viceExternalMemoryHostPropertiesEXT.gen.cs | 41 + ...lDeviceExternalMemoryRdmaFeaturesNV.gen.cs | 41 + ...PhysicalDeviceExternalSemaphoreInfo.gen.cs | 40 + ...PhysicalDeviceExternalTensorInfoARM.gen.cs | 54 + .../VkPhysicalDeviceFaultFeaturesEXT.gen.cs | 47 + .../VkPhysicalDeviceFaultFeaturesKHR.gen.cs | 61 + .../VkPhysicalDeviceFaultPropertiesKHR.gen.cs | 40 + .../Structs/VkPhysicalDeviceFeatures.gen.cs | 404 + .../Structs/VkPhysicalDeviceFeatures2.gen.cs | 40 + ...ysicalDeviceFloatControlsProperties.gen.cs | 152 + ...PhysicalDeviceFormatPackFeaturesARM.gen.cs | 40 + ...eviceFragmentDensityMap2FeaturesEXT.gen.cs | 41 + ...iceFragmentDensityMap2PropertiesEXT.gen.cs | 62 + ...DeviceFragmentDensityMapFeaturesEXT.gen.cs | 55 + ...gmentDensityMapLayeredFeaturesVALVE.gen.cs | 41 + ...entDensityMapLayeredPropertiesVALVE.gen.cs | 42 + ...FragmentDensityMapOffsetFeaturesEXT.gen.cs | 41 + ...agmentDensityMapOffsetPropertiesEXT.gen.cs | 41 + ...viceFragmentDensityMapPropertiesEXT.gen.cs | 55 + ...ragmentShaderBarycentricFeaturesKHR.gen.cs | 41 + ...gmentShaderBarycentricPropertiesKHR.gen.cs | 41 + ...eFragmentShaderInterlockFeaturesEXT.gen.cs | 55 + ...eFragmentShadingRateEnumsFeaturesNV.gen.cs | 55 + ...ragmentShadingRateEnumsPropertiesNV.gen.cs | 41 + ...eviceFragmentShadingRateFeaturesKHR.gen.cs | 55 + ...hysicalDeviceFragmentShadingRateKHR.gen.cs | 47 + ...iceFragmentShadingRatePropertiesKHR.gen.cs | 153 + ...sicalDeviceFrameBoundaryFeaturesEXT.gen.cs | 40 + ...alDeviceGlobalPriorityQueryFeatures.gen.cs | 41 + .../VkPhysicalDeviceGpaFeaturesAMD.gen.cs | 61 + .../VkPhysicalDeviceGpaProperties2AMD.gen.cs | 40 + .../VkPhysicalDeviceGpaPropertiesAMD.gen.cs | 68 + ...eGraphicsPipelineLibraryFeaturesEXT.gen.cs | 41 + ...raphicsPipelineLibraryPropertiesEXT.gen.cs | 48 + .../VkPhysicalDeviceGroupProperties.gen.cs | 54 + ...hysicalDeviceHdrVividFeaturesHUAWEI.gen.cs | 40 + ...PhysicalDeviceHostImageCopyFeatures.gen.cs | 40 + ...ysicalDeviceHostImageCopyProperties.gen.cs | 73 + ...hysicalDeviceHostQueryResetFeatures.gen.cs | 40 + .../VkPhysicalDeviceIdProperties.gen.cs | 62 + ...calDeviceImage2DViewOf3DFeaturesEXT.gen.cs | 48 + ...ceImageAlignmentControlFeaturesMESA.gen.cs | 41 + ...ImageAlignmentControlPropertiesMESA.gen.cs | 41 + ...eImageCompressionControlFeaturesEXT.gen.cs | 41 + ...pressionControlSwapchainFeaturesEXT.gen.cs | 42 + ...DeviceImageDrmFormatModifierInfoEXT.gen.cs | 70 + .../VkPhysicalDeviceImageFormatInfo2.gen.cs | 68 + ...lDeviceImageProcessing2FeaturesQCOM.gen.cs | 41 + ...eviceImageProcessing2PropertiesQCOM.gen.cs | 41 + ...lDeviceImageProcessing3FeaturesQCOM.gen.cs | 55 + ...alDeviceImageProcessingFeaturesQCOM.gen.cs | 55 + ...DeviceImageProcessingPropertiesQCOM.gen.cs | 62 + ...ysicalDeviceImageRobustnessFeatures.gen.cs | 40 + ...eviceImageSlicedViewOf3DFeaturesEXT.gen.cs | 41 + ...alDeviceImageViewImageFormatInfoEXT.gen.cs | 41 + ...calDeviceImageViewMinLodFeaturesEXT.gen.cs | 41 + ...lDeviceImagelessFramebufferFeatures.gen.cs | 41 + ...hysicalDeviceIndexTypeUInt8Features.gen.cs | 40 + ...eInheritedViewportScissorFeaturesNV.gen.cs | 41 + ...calDeviceInlineUniformBlockFeatures.gen.cs | 48 + ...lDeviceInlineUniformBlockProperties.gen.cs | 69 + ...rnallySynchronizedQueuesFeaturesKHR.gen.cs | 41 + ...lDeviceInvocationMaskFeaturesHUAWEI.gen.cs | 41 + ...ysicalDeviceLayeredApiPropertiesKHR.gen.cs | 59 + ...alDeviceLayeredApiPropertiesListKHR.gen.cs | 48 + ...DeviceLayeredApiVulkanPropertiesKHR.gen.cs | 41 + ...alDeviceLayeredDriverPropertiesMSFT.gen.cs | 41 + ...calDeviceLegacyDitheringFeaturesEXT.gen.cs | 41 + ...ceLegacyVertexAttributesFeaturesEXT.gen.cs | 41 + ...LegacyVertexAttributesPropertiesEXT.gen.cs | 41 + .../Structs/VkPhysicalDeviceLimits.gen.cs | 761 + ...icalDeviceLineRasterizationFeatures.gen.cs | 75 + ...alDeviceLineRasterizationProperties.gen.cs | 41 + ...viceLinearColorAttachmentFeaturesNV.gen.cs | 41 + ...sicalDeviceMaintenance10FeaturesKHR.gen.cs | 40 + ...calDeviceMaintenance10PropertiesKHR.gen.cs | 55 + ...sicalDeviceMaintenance11FeaturesKHR.gen.cs | 40 + ...hysicalDeviceMaintenance3Properties.gen.cs | 47 + ...kPhysicalDeviceMaintenance4Features.gen.cs | 40 + ...hysicalDeviceMaintenance4Properties.gen.cs | 40 + ...kPhysicalDeviceMaintenance5Features.gen.cs | 40 + ...hysicalDeviceMaintenance5Properties.gen.cs | 75 + ...kPhysicalDeviceMaintenance6Features.gen.cs | 40 + ...hysicalDeviceMaintenance6Properties.gen.cs | 54 + ...ysicalDeviceMaintenance7FeaturesKHR.gen.cs | 40 + ...icalDeviceMaintenance7PropertiesKHR.gen.cs | 89 + ...ysicalDeviceMaintenance8FeaturesKHR.gen.cs | 40 + ...ysicalDeviceMaintenance9FeaturesKHR.gen.cs | 40 + ...icalDeviceMaintenance9PropertiesKHR.gen.cs | 47 + ...calDeviceMapMemoryPlacedFeaturesEXT.gen.cs | 55 + ...lDeviceMapMemoryPlacedPropertiesEXT.gen.cs | 41 + ...icalDeviceMemoryBudgetPropertiesEXT.gen.cs | 52 + ...eviceMemoryDecompressionFeaturesEXT.gen.cs | 41 + ...iceMemoryDecompressionPropertiesEXT.gen.cs | 48 + ...icalDeviceMemoryPriorityFeaturesEXT.gen.cs | 40 + .../VkPhysicalDeviceMemoryProperties.gen.cs | 47 + .../VkPhysicalDeviceMemoryProperties2.gen.cs | 40 + ...PhysicalDeviceMeshShaderFeaturesEXT.gen.cs | 68 + ...kPhysicalDeviceMeshShaderFeaturesNV.gen.cs | 47 + ...ysicalDeviceMeshShaderPropertiesEXT.gen.cs | 229 + ...hysicalDeviceMeshShaderPropertiesNV.gen.cs | 124 + ...kPhysicalDeviceMultiDrawFeaturesEXT.gen.cs | 40 + ...hysicalDeviceMultiDrawPropertiesEXT.gen.cs | 40 + ...ledRenderToSingleSampledFeaturesEXT.gen.cs | 42 + ...sampledRenderToSwapchainFeaturesEXT.gen.cs | 42 + .../VkPhysicalDeviceMultiviewFeatures.gen.cs | 54 + ...iviewPerViewAttributesPropertiesNVX.gen.cs | 41 + ...iviewPerViewRenderAreasFeaturesQCOM.gen.cs | 41 + ...ltiviewPerViewViewportsFeaturesQCOM.gen.cs | 41 + ...VkPhysicalDeviceMultiviewProperties.gen.cs | 47 + ...iceMutableDescriptorTypeFeaturesEXT.gen.cs | 41 + ...eviceNestedCommandBufferFeaturesEXT.gen.cs | 55 + ...iceNestedCommandBufferPropertiesEXT.gen.cs | 41 + ...DeviceNonSeamlessCubeMapFeaturesEXT.gen.cs | 41 + ...calDeviceOpacityMicromapFeaturesEXT.gen.cs | 56 + ...calDeviceOpacityMicromapFeaturesKHR.gen.cs | 41 + ...lDeviceOpacityMicromapPropertiesEXT.gen.cs | 48 + ...lDeviceOpacityMicromapPropertiesKHR.gen.cs | 62 + ...PhysicalDeviceOpticalFlowFeaturesNV.gen.cs | 40 + ...ysicalDeviceOpticalFlowPropertiesNV.gen.cs | 110 + ...ageableDeviceLocalMemoryFeaturesEXT.gen.cs | 41 + ...onedAccelerationStructureFeaturesNV.gen.cs | 42 + ...edAccelerationStructurePropertiesNV.gen.cs | 42 + ...ysicalDevicePciBusInfoPropertiesEXT.gen.cs | 61 + ...vicePerStageDescriptorSetFeaturesNV.gen.cs | 48 + ...formanceCountersByRegionFeaturesARM.gen.cs | 41 + ...rmanceCountersByRegionPropertiesARM.gen.cs | 70 + ...alDevicePerformanceQueryFeaturesKHR.gen.cs | 48 + ...DevicePerformanceQueryPropertiesKHR.gen.cs | 41 + ...icalDevicePipelineBinaryFeaturesKHR.gen.cs | 40 + ...alDevicePipelineBinaryPropertiesKHR.gen.cs | 69 + ...lineCacheIncrementalModeFeaturesSEC.gen.cs | 43 + ...ipelineCreationCacheControlFeatures.gen.cs | 41 + ...lineExecutablePropertiesFeaturesKHR.gen.cs | 41 + ...elineLibraryGroupHandlesFeaturesEXT.gen.cs | 41 + ...ePipelineOpacityMicromapFeaturesARM.gen.cs | 41 + ...DevicePipelinePropertiesFeaturesEXT.gen.cs | 41 + ...vicePipelineProtectedAccessFeatures.gen.cs | 41 + ...calDevicePipelineRobustnessFeatures.gen.cs | 41 + ...lDevicePipelineRobustnessProperties.gen.cs | 62 + ...ysicalDevicePointClippingProperties.gen.cs | 40 + ...lDevicePortabilitySubsetFeaturesKHR.gen.cs | 139 + ...evicePortabilitySubsetPropertiesKHR.gen.cs | 41 + ...sicalDevicePresentBarrierFeaturesNV.gen.cs | 40 + ...PhysicalDevicePresentId2FeaturesKHR.gen.cs | 40 + ...kPhysicalDevicePresentIdFeaturesKHR.gen.cs | 40 + ...icalDevicePresentMeteringFeaturesNV.gen.cs | 40 + ...esentModeFifoLatestReadyFeaturesKHR.gen.cs | 41 + ...sicalDevicePresentTimingFeaturesEXT.gen.cs | 54 + ...ysicalDevicePresentWait2FeaturesKHR.gen.cs | 40 + ...hysicalDevicePresentWaitFeaturesKHR.gen.cs | 40 + ...icePrimitiveRestartIndexFeaturesEXT.gen.cs | 41 + ...itiveTopologyListRestartFeaturesEXT.gen.cs | 48 + ...PrimitivesGeneratedQueryFeaturesEXT.gen.cs | 55 + ...VkPhysicalDevicePrivateDataFeatures.gen.cs | 40 + .../Structs/VkPhysicalDeviceProperties.gen.cs | 78 + .../VkPhysicalDeviceProperties2.gen.cs | 40 + ...ysicalDeviceProtectedMemoryFeatures.gen.cs | 40 + ...icalDeviceProtectedMemoryProperties.gen.cs | 40 + ...calDeviceProvokingVertexFeaturesEXT.gen.cs | 48 + ...lDeviceProvokingVertexPropertiesEXT.gen.cs | 48 + ...calDevicePushConstantBankFeaturesNV.gen.cs | 41 + ...lDevicePushConstantBankPropertiesNV.gen.cs | 62 + ...sicalDevicePushDescriptorProperties.gen.cs | 40 + ...ilyDataGraphProcessingEngineInfoARM.gen.cs | 49 + ...icalDeviceQueuePerfHintFeaturesQCOM.gen.cs | 40 + ...alDeviceQueuePerfHintPropertiesQCOM.gen.cs | 41 + ...calDeviceRGBA10X6FormatsFeaturesEXT.gen.cs | 41 + ...ionOrderAttachmentAccessFeaturesEXT.gen.cs | 56 + ...icalDeviceRawAccessChainsFeaturesNV.gen.cs | 40 + ...VkPhysicalDeviceRayQueryFeaturesKHR.gen.cs | 40 + ...TracingInvocationReorderFeaturesEXT.gen.cs | 41 + ...yTracingInvocationReorderFeaturesNV.gen.cs | 41 + ...acingInvocationReorderPropertiesEXT.gen.cs | 49 + ...racingInvocationReorderPropertiesNV.gen.cs | 41 + ...TracingLinearSweptSpheresFeaturesNV.gen.cs | 48 + ...ceRayTracingMaintenance1FeaturesKHR.gen.cs | 48 + ...eviceRayTracingMotionBlurFeaturesNV.gen.cs | 48 + ...DeviceRayTracingPipelineFeaturesKHR.gen.cs | 69 + ...viceRayTracingPipelinePropertiesKHR.gen.cs | 90 + ...eRayTracingPositionFetchFeaturesKHR.gen.cs | 41 + ...hysicalDeviceRayTracingPropertiesNV.gen.cs | 89 + ...eviceRayTracingValidationFeaturesNV.gen.cs | 41 + ...RelaxedLineRasterizationFeaturesIMG.gen.cs | 41 + ...lDeviceRenderPassStripedFeaturesARM.gen.cs | 41 + ...eviceRenderPassStripedPropertiesARM.gen.cs | 48 + ...epresentativeFragmentTestFeaturesNV.gen.cs | 41 + ...hysicalDeviceRobustness2FeaturesKHR.gen.cs | 54 + ...sicalDeviceRobustness2PropertiesKHR.gen.cs | 47 + ...lDeviceSampleLocationsPropertiesEXT.gen.cs | 69 + ...DeviceSamplerFilterMinmaxProperties.gen.cs | 48 + ...eviceSamplerYCbCrConversionFeatures.gen.cs | 41 + ...icalDeviceScalarBlockLayoutFeatures.gen.cs | 40 + ...rolsDispatchParametersPropertiesARM.gen.cs | 56 + ...DeviceSchedulingControlsFeaturesARM.gen.cs | 41 + ...viceSchedulingControlsPropertiesARM.gen.cs | 41 + ...SeparateDepthStencilLayoutsFeatures.gen.cs | 41 + ...eviceShader64BitIndexingFeaturesEXT.gen.cs | 41 + ...hysicalDeviceShaderAbortFeaturesKHR.gen.cs | 40 + ...sicalDeviceShaderAbortPropertiesKHR.gen.cs | 40 + ...ShaderAtomicFloat16VectorFeaturesNV.gen.cs | 41 + ...DeviceShaderAtomicFloat2FeaturesEXT.gen.cs | 118 + ...lDeviceShaderAtomicFloatFeaturesEXT.gen.cs | 118 + ...icalDeviceShaderAtomicInt64Features.gen.cs | 47 + ...icalDeviceShaderBfloat16FeaturesKHR.gen.cs | 54 + ...hysicalDeviceShaderClockFeaturesKHR.gen.cs | 47 + ...DeviceShaderConstantDataFeaturesKHR.gen.cs | 41 + ...DeviceShaderCoreBuiltinsFeaturesARM.gen.cs | 41 + ...viceShaderCoreBuiltinsPropertiesARM.gen.cs | 55 + ...sicalDeviceShaderCoreProperties2AMD.gen.cs | 47 + ...ysicalDeviceShaderCorePropertiesAMD.gen.cs | 131 + ...ysicalDeviceShaderCorePropertiesARM.gen.cs | 54 + ...derDemoteToHelperInvocationFeatures.gen.cs | 41 + ...lDeviceShaderDrawParametersFeatures.gen.cs | 46 + ...arlyAndLateFragmentTestsFeaturesAMD.gen.cs | 42 + ...calDeviceShaderExpectAssumeFeatures.gen.cs | 41 + ...icalDeviceShaderFloat16Int8Features.gen.cs | 47 + ...ysicalDeviceShaderFloat8FeaturesEXT.gen.cs | 47 + ...lDeviceShaderFloatControls2Features.gen.cs | 41 + ...kPhysicalDeviceShaderFmaFeaturesKHR.gen.cs | 54 + ...ceShaderImageAtomicInt64FeaturesEXT.gen.cs | 48 + ...eviceShaderImageFootprintFeaturesNV.gen.cs | 41 + ...iceShaderInstrumentationFeaturesARM.gen.cs | 41 + ...eShaderInstrumentationPropertiesARM.gen.cs | 48 + ...viceShaderIntegerDotProductFeatures.gen.cs | 41 + ...ceShaderIntegerDotProductProperties.gen.cs | 244 + ...haderIntegerFunctions2FeaturesINTEL.gen.cs | 41 + ...alDeviceShaderLongVectorFeaturesEXT.gen.cs | 41 + ...DeviceShaderLongVectorPropertiesEXT.gen.cs | 41 + ...aderMaximalReconvergenceFeaturesKHR.gen.cs | 41 + ...erMixedFloatDotProductFeaturesVALVE.gen.cs | 62 + ...ceShaderModuleIdentifierFeaturesEXT.gen.cs | 41 + ...ShaderModuleIdentifierPropertiesEXT.gen.cs | 39 + ...haderMultipleWaitQueuesFeaturesQCOM.gen.cs | 41 + ...derMultipleWaitQueuesPropertiesQCOM.gen.cs | 41 + ...aderOCPMicroscalingTypesFeaturesEXT.gen.cs | 62 + ...ysicalDeviceShaderObjectFeaturesEXT.gen.cs | 40 + ...icalDeviceShaderObjectPropertiesEXT.gen.cs | 45 + ...lDeviceShaderQuadControlFeaturesKHR.gen.cs | 41 + ...laxedExtendedInstructionFeaturesKHR.gen.cs | 42 + ...aderReplicatedCompositesFeaturesEXT.gen.cs | 41 + ...calDeviceShaderSmBuiltinsFeaturesNV.gen.cs | 41 + ...lDeviceShaderSmBuiltinsPropertiesNV.gen.cs | 48 + ...DeviceShaderSplitBarrierFeaturesEXT.gen.cs | 41 + ...viceShaderSplitBarrierPropertiesEXT.gen.cs | 41 + ...ShaderSubgroupExtendedTypesFeatures.gen.cs | 41 + ...haderSubgroupPartitionedFeaturesEXT.gen.cs | 41 + ...lDeviceShaderSubgroupRotateFeatures.gen.cs | 48 + ...bgroupUniformControlFlowFeaturesKHR.gen.cs | 42 + ...ceShaderTerminateInvocationFeatures.gen.cs | 41 + ...calDeviceShaderTileImageFeaturesEXT.gen.cs | 55 + ...lDeviceShaderTileImagePropertiesEXT.gen.cs | 55 + ...niformBufferUnsizedArrayFeaturesEXT.gen.cs | 42 + ...iceShaderUntypedPointersFeaturesKHR.gen.cs | 41 + ...calDeviceShadingRateImageFeaturesNV.gen.cs | 48 + ...lDeviceShadingRateImagePropertiesNV.gen.cs | 55 + ...hysicalDeviceSparseImageFormatInfo2.gen.cs | 68 + .../VkPhysicalDeviceSparseProperties.gen.cs | 54 + .../VkPhysicalDeviceSubgroupProperties.gen.cs | 61 + ...alDeviceSubgroupSizeControlFeatures.gen.cs | 48 + ...DeviceSubgroupSizeControlProperties.gen.cs | 62 + ...viceSubpassMergeFeedbackFeaturesEXT.gen.cs | 41 + ...lDeviceSubpassShadingFeaturesHUAWEI.gen.cs | 41 + ...eviceSubpassShadingPropertiesHUAWEI.gen.cs | 41 + .../VkPhysicalDeviceSurfaceInfo2KHR.gen.cs | 40 + ...iceSwapchainMaintenance1FeaturesKHR.gen.cs | 41 + ...sicalDeviceSynchronization2Features.gen.cs | 40 + .../VkPhysicalDeviceTensorFeaturesARM.gen.cs | 75 + ...VkPhysicalDeviceTensorPropertiesARM.gen.cs | 124 + ...viceTexelBufferAlignmentFeaturesEXT.gen.cs | 41 + ...eviceTexelBufferAlignmentProperties.gen.cs | 62 + ...TextureCompressionAstc3DFeaturesEXT.gen.cs | 41 + ...ceTextureCompressionAstcHdrFeatures.gen.cs | 41 + ...ysicalDeviceThrottleHintFeaturesSEC.gen.cs | 43 + ...calDeviceTileMemoryHeapFeaturesQCOM.gen.cs | 41 + ...lDeviceTileMemoryHeapPropertiesQCOM.gen.cs | 48 + ...calDeviceTilePropertiesFeaturesQCOM.gen.cs | 41 + ...ysicalDeviceTileShadingFeaturesQCOM.gen.cs | 131 + ...icalDeviceTileShadingPropertiesQCOM.gen.cs | 61 + ...icalDeviceTimelineSemaphoreFeatures.gen.cs | 40 + ...alDeviceTimelineSemaphoreProperties.gen.cs | 41 + .../VkPhysicalDeviceToolProperties.gen.cs | 60 + ...lDeviceTransformFeedbackFeaturesEXT.gen.cs | 48 + ...eviceTransformFeedbackPropertiesEXT.gen.cs | 104 + ...eviceUnifiedImageLayoutsFeaturesKHR.gen.cs | 48 + ...UniformBufferStandardLayoutFeatures.gen.cs | 41 + ...sicalDeviceVariablePointersFeatures.gen.cs | 47 + ...eviceVertexAttributeDivisorFeatures.gen.cs | 48 + ...iceVertexAttributeDivisorProperties.gen.cs | 48 + ...VertexAttributeDivisorPropertiesEXT.gen.cs | 41 + ...ertexAttributeRobustnessFeaturesEXT.gen.cs | 41 + ...eVertexInputDynamicStateFeaturesEXT.gen.cs | 41 + ...icalDeviceVideoDecodeVP9FeaturesKHR.gen.cs | 40 + ...icalDeviceVideoEncodeAV1FeaturesKHR.gen.cs | 40 + ...viceVideoEncodeFeedback2FeaturesKHR.gen.cs | 41 + ...eVideoEncodeIntraRefreshFeaturesKHR.gen.cs | 41 + ...eviceVideoEncodeQualityLevelInfoKHR.gen.cs | 48 + ...deoEncodeQuantizationMapFeaturesKHR.gen.cs | 41 + ...deoEncodeRGBConversionFeaturesVALVE.gen.cs | 41 + .../VkPhysicalDeviceVideoFormatInfoKHR.gen.cs | 40 + ...lDeviceVideoMaintenance1FeaturesKHR.gen.cs | 41 + ...lDeviceVideoMaintenance2FeaturesKHR.gen.cs | 41 + .../VkPhysicalDeviceVulkan11Features.gen.cs | 117 + .../VkPhysicalDeviceVulkan11Properties.gen.cs | 132 + .../VkPhysicalDeviceVulkan12Features.gen.cs | 362 + .../VkPhysicalDeviceVulkan12Properties.gen.cs | 393 + .../VkPhysicalDeviceVulkan13Features.gen.cs | 138 + .../VkPhysicalDeviceVulkan13Properties.gen.cs | 348 + .../VkPhysicalDeviceVulkan14Features.gen.cs | 180 + .../VkPhysicalDeviceVulkan14Properties.gen.cs | 206 + ...icalDeviceVulkanMemoryModelFeatures.gen.cs | 54 + ...roupMemoryExplicitLayoutFeaturesKHR.gen.cs | 63 + ...iceYCbCr2Plane444FormatsFeaturesEXT.gen.cs | 41 + ...sicalDeviceYCbCrDegammaFeaturesQCOM.gen.cs | 40 + ...alDeviceYCbCrImageArraysFeaturesEXT.gen.cs | 41 + ...roInitializeDeviceMemoryFeaturesEXT.gen.cs | 41 + ...roInitializeWorkgroupMemoryFeatures.gen.cs | 41 + .../VkPipelineBinaryCreateInfoKHR.gen.cs | 54 + .../VkPipelineBinaryDataInfoKHR.gen.cs | 40 + .../Structs/VkPipelineBinaryDataKHR.gen.cs | 33 + .../VkPipelineBinaryHandlesInfoKHR.gen.cs | 47 + .../Structs/VkPipelineBinaryInfoKHR.gen.cs | 47 + .../Structs/VkPipelineBinaryKeyKHR.gen.cs | 45 + .../VkPipelineBinaryKeysAndDataKHR.gen.cs | 40 + .../Structs/VkPipelineCacheCreateInfo.gen.cs | 54 + ...lineCacheHeaderVersionDataGraphQCOM.gen.cs | 54 + .../VkPipelineCacheHeaderVersionOne.gen.cs | 52 + ...olorBlendAdvancedStateCreateInfoEXT.gen.cs | 61 + ...VkPipelineColorBlendAttachmentState.gen.cs | 75 + ...VkPipelineColorBlendStateCreateInfo.gen.cs | 75 + .../VkPipelineColorWriteCreateInfoEXT.gen.cs | 47 + ...ipelineCompilerControlCreateInfoAMD.gen.cs | 43 + ...CoverageModulationStateCreateInfoNV.gen.cs | 79 + ...eCoverageReductionStateCreateInfoNV.gen.cs | 48 + ...ineCoverageToColorStateCreateInfoNV.gen.cs | 55 + .../VkPipelineCreateFlags2CreateInfo.gen.cs | 40 + .../Structs/VkPipelineCreateInfoKHR.gen.cs | 33 + .../Structs/VkPipelineCreationFeedback.gen.cs | 33 + ...kPipelineCreationFeedbackCreateInfo.gen.cs | 58 + ...PipelineDepthStencilStateCreateInfo.gen.cs | 103 + ...eDiscardRectangleStateCreateInfoEXT.gen.cs | 62 + .../VkPipelineDynamicStateCreateInfo.gen.cs | 54 + .../VkPipelineExecutableInfoKHR.gen.cs | 47 + ...ExecutableInternalRepresentationKHR.gen.cs | 65 + .../VkPipelineExecutablePropertiesKHR.gen.cs | 57 + .../VkPipelineExecutableStatisticKHR.gen.cs | 57 + ...PipelineExecutableStatisticValueKHR.gen.cs | 47 + ...entDensityMapLayeredCreateInfoVALVE.gen.cs | 41 + ...entShadingRateEnumStateCreateInfoNV.gen.cs | 55 + ...agmentShadingRateStateCreateInfoKHR.gen.cs | 48 + ...PipelineIndirectDeviceAddressInfoNV.gen.cs | 50 + .../Structs/VkPipelineInfoKHR.gen.cs | 40 + ...ipelineInputAssemblyStateCreateInfo.gen.cs | 58 + .../Structs/VkPipelineLayoutCreateInfo.gen.cs | 68 + .../VkPipelineLibraryCreateInfoKHR.gen.cs | 47 + ...kPipelineMultisampleStateCreateInfo.gen.cs | 82 + .../VkPipelinePropertiesIdentifierEXT.gen.cs | 38 + ...ationConservativeStateCreateInfoEXT.gen.cs | 60 + ...rizationDepthClipStateCreateInfoEXT.gen.cs | 54 + ...ineRasterizationLineStateCreateInfo.gen.cs | 66 + ...onProvokingVertexStateCreateInfoEXT.gen.cs | 50 + ...ipelineRasterizationStateCreateInfo.gen.cs | 110 + ...erizationStateRasterizationOrderAMD.gen.cs | 47 + ...sterizationStateStreamCreateInfoEXT.gen.cs | 54 + .../VkPipelineRenderingCreateInfo.gen.cs | 68 + ...tativeFragmentTestStateCreateInfoNV.gen.cs | 47 + .../VkPipelineRobustnessCreateInfo.gen.cs | 61 + ...neSampleLocationsStateCreateInfoEXT.gen.cs | 58 + .../VkPipelineShaderStageCreateInfo.gen.cs | 71 + ...rStageModuleIdentifierCreateInfoEXT.gen.cs | 52 + ...StageRequiredSubgroupSizeCreateInfo.gen.cs | 41 + ...ellationDomainOriginStateCreateInfo.gen.cs | 41 + ...PipelineTessellationStateCreateInfo.gen.cs | 47 + ...neVertexInputDivisorStateCreateInfo.gen.cs | 55 + ...kPipelineVertexInputStateCreateInfo.gen.cs | 68 + ...tCoarseSampleOrderStateCreateInfoNV.gen.cs | 61 + ...wportDepthClampControlCreateInfoEXT.gen.cs | 48 + ...ewportDepthClipControlCreateInfoEXT.gen.cs | 41 + ...rtExclusiveScissorStateCreateInfoNV.gen.cs | 48 + ...rtShadingRateImageStateCreateInfoNV.gen.cs | 60 + .../VkPipelineViewportStateCreateInfo.gen.cs | 68 + ...ineViewportSwizzleStateCreateInfoNV.gen.cs | 57 + ...neViewportWScalingStateCreateInfoNV.gen.cs | 55 + .../Generated/Structs/VkPresentId2KHR.gen.cs | 47 + .../Generated/Structs/VkPresentIdKHR.gen.cs | 47 + .../Generated/Structs/VkPresentInfoKHR.gen.cs | 75 + .../Structs/VkPresentRegionKHR.gen.cs | 34 + .../Structs/VkPresentRegionsKHR.gen.cs | 60 + .../Structs/VkPresentStageTimeEXT.gen.cs | 33 + .../Structs/VkPresentTimeGOOGLE.gen.cs | 33 + .../Structs/VkPresentTimesInfoGOOGLE.gen.cs | 61 + .../Structs/VkPresentTimingInfoEXT.gen.cs | 68 + ...PresentTimingSurfaceCapabilitiesEXT.gen.cs | 61 + .../Structs/VkPresentTimingsInfoEXT.gen.cs | 55 + .../Structs/VkPresentWait2InfoKHR.gen.cs | 47 + .../VkPrivateDataSlotCreateInfo.gen.cs | 40 + .../Structs/VkProtectedSubmitInfo.gen.cs | 43 + .../Structs/VkPushConstantBankInfoNV.gen.cs | 40 + .../Structs/VkPushConstantRange.gen.cs | 40 + .../Structs/VkPushConstantsInfo.gen.cs | 71 + .../Structs/VkPushDataInfoEXT.gen.cs | 50 + .../Structs/VkPushDescriptorSetInfo.gen.cs | 71 + ...VkPushDescriptorSetWithTemplateInfo.gen.cs | 64 + .../Structs/VkQueryLowLatencySupportNV.gen.cs | 40 + .../Structs/VkQueryPoolCreateInfo.gen.cs | 61 + ...VkQueryPoolPerformanceCreateInfoKHR.gen.cs | 54 + ...PoolPerformanceQueryCreateInfoINTEL.gen.cs | 46 + ...oolVideoEncodeFeedbackCreateInfoKHR.gen.cs | 41 + ...dePerPartitionFeedbackCreateInfoKHR.gen.cs | 48 + ...kQueueFamilyCheckpointProperties2NV.gen.cs | 40 + ...VkQueueFamilyCheckpointPropertiesNV.gen.cs | 40 + ...lyDataGraphOpticalFlowPropertiesARM.gen.cs | 93 + ...aGraphProcessingEnginePropertiesARM.gen.cs | 48 + ...VkQueueFamilyDataGraphPropertiesARM.gen.cs | 47 + ...eueFamilyDataGraphTosaPropertiesARM.gen.cs | 68 + ...QueueFamilyGlobalPriorityProperties.gen.cs | 47 + ...ageTransferGranularityPropertiesKHR.gen.cs | 42 + ...amilyOwnershipTransferPropertiesKHR.gen.cs | 41 + .../Structs/VkQueueFamilyProperties.gen.cs | 47 + .../Structs/VkQueueFamilyProperties2.gen.cs | 40 + ...amilyQueryResultStatusPropertiesKHR.gen.cs | 41 + .../VkQueueFamilyVideoPropertiesKHR.gen.cs | 40 + ...erAccelerationStructureCreateInfoNV.gen.cs | 45 + .../VkRayTracingPipelineCreateInfoKHR.gen.cs | 120 + .../VkRayTracingPipelineCreateInfoNV.gen.cs | 99 + ...acingPipelineInterfaceCreateInfoKHR.gen.cs | 51 + ...kRayTracingShaderGroupCreateInfoKHR.gen.cs | 78 + ...VkRayTracingShaderGroupCreateInfoNV.gen.cs | 71 + .../Generated/Structs/VkRect2D.gen.cs | 37 + .../Generated/Structs/VkRectLayerKHR.gen.cs | 40 + .../VkRefreshCycleDurationGOOGLE.gen.cs | 26 + ...kReleaseCapturedPipelineDataInfoKHR.gen.cs | 40 + .../VkReleaseSwapchainImagesInfoKHR.gen.cs | 54 + .../VkRenderPassAttachmentBeginInfo.gen.cs | 47 + .../Structs/VkRenderPassBeginInfo.gen.cs | 68 + .../Structs/VkRenderPassCreateInfo.gen.cs | 82 + .../Structs/VkRenderPassCreateInfo2.gen.cs | 96 + .../VkRenderPassCreationControlEXT.gen.cs | 43 + ...erPassCreationFeedbackCreateInfoEXT.gen.cs | 43 + ...VkRenderPassCreationFeedbackInfoEXT.gen.cs | 26 + ...PassFragmentDensityMapCreateInfoEXT.gen.cs | 46 + ...sFragmentDensityMapOffsetEndInfoEXT.gen.cs | 55 + ...PassInputAttachmentAspectCreateInfo.gen.cs | 48 + .../VkRenderPassMultiviewCreateInfo.gen.cs | 81 + ...ormanceCountersByRegionBeginInfoARM.gen.cs | 69 + ...nderPassSampleLocationsBeginInfoEXT.gen.cs | 73 + .../VkRenderPassStripeBeginInfoARM.gen.cs | 47 + .../Structs/VkRenderPassStripeInfoARM.gen.cs | 40 + .../VkRenderPassStripeSubmitInfoARM.gen.cs | 47 + ...derPassSubpassFeedbackCreateInfoEXT.gen.cs | 43 + .../VkRenderPassSubpassFeedbackInfoEXT.gen.cs | 38 + ...RenderPassTileShadingCreateInfoQCOM.gen.cs | 57 + .../VkRenderPassTransformBeginInfoQCOM.gen.cs | 46 + .../Structs/VkRenderingAreaInfo.gen.cs | 68 + .../VkRenderingAttachmentFlagsInfoKHR.gen.cs | 45 + .../Structs/VkRenderingAttachmentInfo.gen.cs | 89 + .../VkRenderingAttachmentLocationInfo.gen.cs | 47 + .../Structs/VkRenderingEndInfoKHR.gen.cs | 33 + ...FragmentDensityMapAttachmentInfoEXT.gen.cs | 48 + ...ragmentShadingRateAttachmentInfoKHR.gen.cs | 55 + .../Generated/Structs/VkRenderingInfo.gen.cs | 89 + ...VkRenderingInputAttachmentIndexInfo.gen.cs | 61 + .../Structs/VkResolveImageInfo2.gen.cs | 78 + .../Structs/VkResolveImageModeInfoKHR.gen.cs | 57 + .../VkResourceDescriptorDataEXT.gen.cs | 47 + .../VkResourceDescriptorInfoEXT.gen.cs | 47 + .../Generated/Structs/VkSRTDataNV.gen.cs | 134 + .../Structs/VkSampleLocationEXT.gen.cs | 33 + .../Structs/VkSampleLocationsInfoEXT.gen.cs | 61 + ...mplerBlockMatchWindowCreateInfoQCOM.gen.cs | 47 + ...rColorComponentMappingCreateInfoEXT.gen.cs | 61 + ...SamplerCaptureDescriptorDataInfoEXT.gen.cs | 41 + .../Structs/VkSamplerCreateInfo.gen.cs | 145 + ...VkSamplerCubicWeightsCreateInfoQCOM.gen.cs | 40 + ...mplerCustomBorderColorCreateInfoEXT.gen.cs | 53 + ...CustomBorderColorIndexCreateInfoEXT.gen.cs | 41 + .../VkSamplerReductionModeCreateInfo.gen.cs | 40 + .../VkSamplerYCbCrConversionCreateInfo.gen.cs | 89 + ...CbCrConversionImageFormatProperties.gen.cs | 48 + .../VkSamplerYCbCrConversionInfo.gen.cs | 58 + ...onversionYCbCrDegammaCreateInfoQCOM.gen.cs | 54 + .../Structs/VkSemaphoreCreateInfo.gen.cs | 40 + .../Structs/VkSemaphoreGetFdInfoKHR.gen.cs | 47 + .../Structs/VkSemaphoreSignalInfo.gen.cs | 47 + .../Structs/VkSemaphoreSubmitInfo.gen.cs | 64 + .../Structs/VkSemaphoreTypeCreateInfo.gen.cs | 47 + .../Structs/VkSemaphoreWaitInfo.gen.cs | 61 + ...VkSetDescriptorBufferOffsetsInfoEXT.gen.cs | 78 + .../Structs/VkSetLatencyMarkerInfoNV.gen.cs | 47 + .../Structs/VkSetPresentConfigNV.gen.cs | 53 + .../VkSetStateFlagsIndirectCommandNV.gen.cs | 29 + .../Structs/VkShaderCreateInfoEXT.gen.cs | 120 + ...scriptorSetAndBindingMappingInfoEXT.gen.cs | 51 + ...kShaderInstrumentationCreateInfoARM.gen.cs | 33 + ...rInstrumentationMetricDataHeaderARM.gen.cs | 47 + ...InstrumentationMetricDescriptionARM.gen.cs | 44 + .../Structs/VkShaderModuleCreateInfo.gen.cs | 57 + .../VkShaderModuleIdentifierEXT.gen.cs | 46 + ...rModuleValidationCacheCreateInfoEXT.gen.cs | 47 + .../Structs/VkShaderResourceUsageAMD.gen.cs | 54 + .../Structs/VkShaderStatisticsInfoAMD.gen.cs | 68 + .../Structs/VkShadingRatePaletteNV.gen.cs | 34 + ...haredPresentSurfaceCapabilities2KHR.gen.cs | 40 + ...SharedPresentSurfaceCapabilitiesKHR.gen.cs | 40 + .../VkSparseBufferMemoryBindInfo.gen.cs | 42 + .../VkSparseImageFormatProperties.gen.cs | 40 + .../VkSparseImageFormatProperties2.gen.cs | 40 + .../Structs/VkSparseImageMemoryBind.gen.cs | 61 + .../VkSparseImageMemoryBindInfo.gen.cs | 42 + .../VkSparseImageMemoryRequirements.gen.cs | 54 + .../VkSparseImageMemoryRequirements2.gen.cs | 40 + .../VkSparseImageOpaqueMemoryBindInfo.gen.cs | 41 + .../Structs/VkSparseMemoryBind.gen.cs | 54 + .../Structs/VkSpecializationInfo.gen.cs | 47 + .../Structs/VkSpecializationMapEntry.gen.cs | 40 + .../Generated/Structs/VkStencilOpState.gen.cs | 68 + .../Structs/VkStridedDeviceAddressNV.gen.cs | 36 + .../VkStridedDeviceAddressRangeKHR.gen.cs | 43 + .../VkStridedDeviceAddressRegionKHR.gen.cs | 43 + .../Generated/Structs/VkSubmitInfo.gen.cs | 83 + .../Generated/Structs/VkSubmitInfo2.gen.cs | 82 + .../Structs/VkSubpassBeginInfo.gen.cs | 40 + .../Structs/VkSubpassDependency.gen.cs | 69 + .../Structs/VkSubpassDependency2.gen.cs | 90 + .../Structs/VkSubpassDescription.gen.cs | 92 + .../Structs/VkSubpassDescription2.gen.cs | 113 + ...bpassDescriptionDepthStencilResolve.gen.cs | 54 + .../Generated/Structs/VkSubpassEndInfo.gen.cs | 33 + ...VkSubpassResolvePerformanceQueryEXT.gen.cs | 46 + .../VkSubpassSampleLocationsEXT.gen.cs | 33 + ...passShadingPipelineCreateInfoHUAWEI.gen.cs | 57 + .../VkSubresourceHostMemcpySize.gen.cs | 48 + .../Structs/VkSubresourceLayout.gen.cs | 55 + .../Structs/VkSubresourceLayout2.gen.cs | 41 + ...kSubsampledImageFormatPropertiesEXT.gen.cs | 47 + .../Structs/VkSurfaceCapabilities2EXT.gen.cs | 110 + .../Structs/VkSurfaceCapabilities2KHR.gen.cs | 40 + .../Structs/VkSurfaceCapabilitiesKHR.gen.cs | 89 + ...SurfaceCapabilitiesPresentBarrierNV.gen.cs | 40 + .../VkSurfaceCapabilitiesPresentId2KHR.gen.cs | 40 + ...kSurfaceCapabilitiesPresentWait2KHR.gen.cs | 40 + .../Structs/VkSurfaceFormat2KHR.gen.cs | 40 + .../Structs/VkSurfaceFormatKHR.gen.cs | 33 + ...kSurfacePresentModeCompatibilityKHR.gen.cs | 47 + .../Structs/VkSurfacePresentModeKHR.gen.cs | 40 + ...urfacePresentScalingCapabilitiesKHR.gen.cs | 68 + .../VkSurfaceProtectedCapabilitiesKHR.gen.cs | 46 + ...SwapchainCalibratedTimestampInfoEXT.gen.cs | 54 + .../VkSwapchainCounterCreateInfoEXT.gen.cs | 43 + .../Structs/VkSwapchainCreateInfoKHR.gen.cs | 145 + ...pchainDisplayNativeHdrCreateInfoAMD.gen.cs | 46 + ...wapchainFlagsSurfaceCapabilitiesEXT.gen.cs | 40 + .../VkSwapchainLatencyCreateInfoNV.gen.cs | 45 + ...SwapchainPresentBarrierCreateInfoNV.gen.cs | 40 + .../VkSwapchainPresentFenceInfoKHR.gen.cs | 47 + .../VkSwapchainPresentModeInfoKHR.gen.cs | 47 + ...kSwapchainPresentModesCreateInfoKHR.gen.cs | 56 + ...wapchainPresentScalingCreateInfoKHR.gen.cs | 71 + .../VkSwapchainTimeDomainPropertiesEXT.gen.cs | 54 + .../VkSwapchainTimingPropertiesEXT.gen.cs | 47 + ...kTensorCaptureDescriptorDataInfoARM.gen.cs | 41 + .../Generated/Structs/VkTensorCopyARM.gen.cs | 61 + .../Structs/VkTensorCreateInfoARM.gen.cs | 68 + .../Structs/VkTensorDependencyInfoARM.gen.cs | 47 + .../Structs/VkTensorDescriptionARM.gen.cs | 75 + ...orExplicitTilingFormatPropertiesARM.gen.cs | 75 + .../VkTensorFormatPropertiesARM.gen.cs | 53 + .../Structs/VkTensorMemoryBarrierARM.gen.cs | 82 + .../VkTensorMemoryRequirementsInfoARM.gen.cs | 40 + ...VkTensorRollingBackingCreateInfoARM.gen.cs | 45 + ...sorViewCaptureDescriptorDataInfoARM.gen.cs | 41 + .../Structs/VkTensorViewCreateInfoARM.gen.cs | 54 + .../VkTexelBufferDescriptorInfoEXT.gen.cs | 47 + ...TextureLodGatherFormatPropertiesAMD.gen.cs | 47 + .../VkThrottleHintSubmitInfoSEC.gen.cs | 42 + .../Structs/VkTileMemoryBindInfoQCOM.gen.cs | 40 + .../VkTileMemoryRequirementsQCOM.gen.cs | 52 + .../Structs/VkTileMemorySizeInfoQCOM.gen.cs | 47 + .../Structs/VkTilePropertiesQCOM.gen.cs | 54 + .../VkTimelineSemaphoreSubmitInfo.gen.cs | 67 + .../VkTraceRaysIndirectCommand2KHR.gen.cs | 120 + .../VkTraceRaysIndirectCommandKHR.gen.cs | 43 + .../VkValidationCacheCreateInfoEXT.gen.cs | 54 + .../Structs/VkValidationFeaturesEXT.gen.cs | 64 + .../Structs/VkValidationFlagsEXT.gen.cs | 50 + .../VkVertexInputAttributeDescription.gen.cs | 48 + ...VertexInputAttributeDescription2EXT.gen.cs | 61 + .../VkVertexInputBindingDescription.gen.cs | 41 + ...VkVertexInputBindingDescription2EXT.gen.cs | 61 + ...ertexInputBindingDivisorDescription.gen.cs | 34 + .../Structs/VkVideoBeginCodingInfoKHR.gen.cs | 68 + .../Structs/VkVideoCapabilitiesKHR.gen.cs | 96 + .../VkVideoCodingControlInfoKHR.gen.cs | 40 + .../VkVideoDecodeAV1CapabilitiesKHR.gen.cs | 47 + .../VkVideoDecodeAV1DpbSlotInfoKHR.gen.cs | 40 + ...deAV1InlineSessionParametersInfoKHR.gen.cs | 41 + .../VkVideoDecodeAV1PictureInfoKHR.gen.cs | 73 + .../VkVideoDecodeAV1ProfileInfoKHR.gen.cs | 54 + ...deAV1SessionParametersCreateInfoKHR.gen.cs | 49 + .../VkVideoDecodeCapabilitiesKHR.gen.cs | 47 + .../VkVideoDecodeH264CapabilitiesKHR.gen.cs | 54 + .../VkVideoDecodeH264DpbSlotInfoKHR.gen.cs | 40 + ...eH264InlineSessionParametersInfoKHR.gen.cs | 48 + .../VkVideoDecodeH264PictureInfoKHR.gen.cs | 54 + .../VkVideoDecodeH264ProfileInfoKHR.gen.cs | 54 + ...codeH264SessionParametersAddInfoKHR.gen.cs | 62 + ...eH264SessionParametersCreateInfoKHR.gen.cs | 63 + .../VkVideoDecodeH265CapabilitiesKHR.gen.cs | 47 + .../VkVideoDecodeH265DpbSlotInfoKHR.gen.cs | 40 + ...eH265InlineSessionParametersInfoKHR.gen.cs | 55 + .../VkVideoDecodeH265PictureInfoKHR.gen.cs | 54 + .../VkVideoDecodeH265ProfileInfoKHR.gen.cs | 47 + ...codeH265SessionParametersAddInfoKHR.gen.cs | 76 + ...eH265SessionParametersCreateInfoKHR.gen.cs | 70 + .../Structs/VkVideoDecodeInfoKHR.gen.cs | 89 + .../Structs/VkVideoDecodeUsageInfoKHR.gen.cs | 45 + .../VkVideoDecodeVP9CapabilitiesKHR.gen.cs | 47 + .../VkVideoDecodeVP9PictureInfoKHR.gen.cs | 68 + .../VkVideoDecodeVP9ProfileInfoKHR.gen.cs | 47 + .../VkVideoEncodeAV1CapabilitiesKHR.gen.cs | 208 + .../VkVideoEncodeAV1DpbSlotInfoKHR.gen.cs | 40 + .../VkVideoEncodeAV1FrameSizeKHR.gen.cs | 40 + ...eoEncodeAV1GopRemainingFrameInfoKHR.gen.cs | 61 + .../VkVideoEncodeAV1PictureInfoKHR.gen.cs | 80 + .../VkVideoEncodeAV1ProfileInfoKHR.gen.cs | 47 + .../Structs/VkVideoEncodeAV1QIndexKHR.gen.cs | 40 + ...oEncodeAV1QualityLevelPropertiesKHR.gen.cs | 147 + ...deAV1QuantizationMapCapabilitiesKHR.gen.cs | 56 + .../VkVideoEncodeAV1RateControlInfoKHR.gen.cs | 68 + ...deoEncodeAV1RateControlLayerInfoKHR.gen.cs | 75 + ...kVideoEncodeAV1SessionCreateInfoKHR.gen.cs | 47 + ...deAV1SessionParametersCreateInfoKHR.gen.cs | 70 + .../VkVideoEncodeCapabilitiesKHR.gen.cs | 89 + ...VideoEncodeFeedback2CapabilitiesKHR.gen.cs | 47 + .../VkVideoEncodeH264CapabilitiesKHR.gen.cs | 131 + .../VkVideoEncodeH264DpbSlotInfoKHR.gen.cs | 40 + .../VkVideoEncodeH264FrameSizeKHR.gen.cs | 40 + ...oEncodeH264GopRemainingFrameInfoKHR.gen.cs | 61 + .../VkVideoEncodeH264NaluSliceInfoKHR.gen.cs | 47 + .../VkVideoEncodeH264PictureInfoKHR.gen.cs | 61 + .../VkVideoEncodeH264ProfileInfoKHR.gen.cs | 47 + .../Structs/VkVideoEncodeH264QpKHR.gen.cs | 40 + ...EncodeH264QualityLevelPropertiesKHR.gen.cs | 106 + ...eH264QuantizationMapCapabilitiesKHR.gen.cs | 56 + ...VkVideoEncodeH264RateControlInfoKHR.gen.cs | 68 + ...eoEncodeH264RateControlLayerInfoKHR.gen.cs | 75 + ...VideoEncodeH264SessionCreateInfoKHR.gen.cs | 47 + ...codeH264SessionParametersAddInfoKHR.gen.cs | 62 + ...eH264SessionParametersCreateInfoKHR.gen.cs | 63 + ...264SessionParametersFeedbackInfoKHR.gen.cs | 48 + ...codeH264SessionParametersGetInfoKHR.gen.cs | 62 + .../VkVideoEncodeH265CapabilitiesKHR.gen.cs | 152 + .../VkVideoEncodeH265DpbSlotInfoKHR.gen.cs | 40 + .../VkVideoEncodeH265FrameSizeKHR.gen.cs | 40 + ...oEncodeH265GopRemainingFrameInfoKHR.gen.cs | 61 + ...eoEncodeH265NaluSliceSegmentInfoKHR.gen.cs | 47 + .../VkVideoEncodeH265PictureInfoKHR.gen.cs | 54 + .../VkVideoEncodeH265ProfileInfoKHR.gen.cs | 47 + .../Structs/VkVideoEncodeH265QpKHR.gen.cs | 40 + ...EncodeH265QualityLevelPropertiesKHR.gen.cs | 99 + ...eH265QuantizationMapCapabilitiesKHR.gen.cs | 56 + ...VkVideoEncodeH265RateControlInfoKHR.gen.cs | 68 + ...eoEncodeH265RateControlLayerInfoKHR.gen.cs | 75 + ...VideoEncodeH265SessionCreateInfoKHR.gen.cs | 47 + ...codeH265SessionParametersAddInfoKHR.gen.cs | 76 + ...eH265SessionParametersCreateInfoKHR.gen.cs | 70 + ...265SessionParametersFeedbackInfoKHR.gen.cs | 55 + ...codeH265SessionParametersGetInfoKHR.gen.cs | 76 + .../Structs/VkVideoEncodeInfoKHR.gen.cs | 96 + ...eoEncodeIntraRefreshCapabilitiesKHR.gen.cs | 75 + .../VkVideoEncodeIntraRefreshInfoKHR.gen.cs | 47 + ...EncodeProfileRGBConversionInfoVALVE.gen.cs | 48 + .../VkVideoEncodeQualityLevelInfoKHR.gen.cs | 40 + ...ideoEncodeQualityLevelPropertiesKHR.gen.cs | 47 + ...ncodeQuantizationMapCapabilitiesKHR.gen.cs | 48 + ...VkVideoEncodeQuantizationMapInfoKHR.gen.cs | 53 + ...onMapSessionParametersCreateInfoKHR.gen.cs | 42 + ...ncodeRGBConversionCapabilitiesVALVE.gen.cs | 69 + .../VkVideoEncodeRateControlInfoKHR.gen.cs | 75 + ...kVideoEncodeRateControlLayerInfoKHR.gen.cs | 61 + ...odeSessionIntraRefreshCreateInfoKHR.gen.cs | 41 + ...odeSessionParametersFeedbackInfoKHR.gen.cs | 41 + ...eoEncodeSessionParametersGetInfoKHR.gen.cs | 40 + ...SessionRGBConversionCreateInfoVALVE.gen.cs | 62 + .../Structs/VkVideoEncodeUsageInfoKHR.gen.cs | 59 + .../Structs/VkVideoEndCodingInfoKHR.gen.cs | 40 + ...rmatAV1QuantizationMapPropertiesKHR.gen.cs | 48 + ...matH265QuantizationMapPropertiesKHR.gen.cs | 48 + .../Structs/VkVideoFormatPropertiesKHR.gen.cs | 75 + ...oFormatQuantizationMapPropertiesKHR.gen.cs | 47 + .../Structs/VkVideoInlineQueryInfoKHR.gen.cs | 54 + .../VkVideoPictureResourceInfoKHR.gen.cs | 61 + .../Structs/VkVideoProfileInfoKHR.gen.cs | 61 + .../Structs/VkVideoProfileListInfoKHR.gen.cs | 47 + ...VkVideoReferenceIntraRefreshInfoKHR.gen.cs | 40 + .../VkVideoReferenceSlotInfoKHR.gen.cs | 47 + .../VkVideoSessionCreateInfoKHR.gen.cs | 96 + ...VkVideoSessionMemoryRequirementsKHR.gen.cs | 47 + ...VideoSessionParametersCreateInfoKHR.gen.cs | 54 + ...VideoSessionParametersUpdateInfoKHR.gen.cs | 40 + .../Generated/Structs/VkViewport.gen.cs | 61 + .../Structs/VkViewportSwizzleNV.gen.cs | 47 + .../Structs/VkViewportWScalingNV.gen.cs | 33 + .../Structs/VkWriteDescriptorSet.gen.cs | 89 + ...scriptorSetAccelerationStructureKHR.gen.cs | 51 + ...escriptorSetAccelerationStructureNV.gen.cs | 51 + ...riteDescriptorSetInlineUniformBlock.gen.cs | 54 + ...tPartitionedAccelerationStructureNV.gen.cs | 58 + .../VkWriteDescriptorSetTensorARM.gen.cs | 47 + ...riteIndirectExecutionSetPipelineEXT.gen.cs | 47 + ...kWriteIndirectExecutionSetShaderEXT.gen.cs | 47 + .../Generated/Structs/VkXYColorEXT.gen.cs | 33 + Brutal.Vulkan/GlobalUsings.cs | 9 + Brutal.Vulkan/ImportResolver.cs | 50 + .../BRUTAL-VULKAN-THIRD-PARTY-NOTICES.txt | 592 + Brutal.Vulkan/Manual/Classes/CommandBuffer.cs | 25 + Brutal.Vulkan/Manual/Classes/Device.cs | 138 + Brutal.Vulkan/Manual/Classes/Instance.cs | 169 + .../Manual/Classes/PhysicalDevice.cs | 214 + Brutal.Vulkan/Manual/Classes/Queue.cs | 106 + Brutal.Vulkan/Manual/Classes/VkAllocator.cs | 13 + Brutal.Vulkan/Manual/Classes/VkResultError.cs | 12 + .../Manual/Classes/VulkanHandleWrapper.cs | 9 + Brutal.Vulkan/Manual/Constants/VK.cs | 16 + .../Manual/Interfaces/IVulkanHandle.cs | 17 + Brutal.Vulkan/Manual/Partials/VK.cs | 9 + Brutal.Vulkan/Manual/Partials/VkClearValue.cs | 9 + Brutal.Vulkan/Manual/Partials/VkExtent2D.cs | 11 + Brutal.Vulkan/Manual/Partials/VkExtent3D.cs | 12 + Brutal.Vulkan/Manual/Partials/VkOffset2D.cs | 11 + Brutal.Vulkan/Manual/Partials/VkOffset3D.cs | 12 + Brutal.Vulkan/Manual/Partials/VkRect2D.cs | 18 + Brutal.Vulkan/Manual/Partials/Vulkan.cs | 14 + .../Manual/Structs/VkDeviceAddress.cs | 6 + Brutal.Vulkan/Manual/Structs/VkFlags.cs | 6 + Brutal.Vulkan/Manual/Structs/VkFlags64.cs | 6 + .../Manual/Structs/VkRemoteAddressNV.cs | 6 + Brutal.Vulkan/Manual/Structs/VkSampleMask.cs | 6 + .../Manual/Structs/VkTransformMatrixKHR.cs | 26 + .../BRUTAL-ZLIB-THIRD-PARTY-NOTICES.txt | 51 + 5621 files changed, 784842 insertions(+) create mode 100644 .gitattributes create mode 100644 Brutal.Box2D/B2Joint.cs create mode 100644 Brutal.Box2D/Box2D.cs create mode 100644 Brutal.Box2D/Box2D.gen.cs create mode 100644 Brutal.Box2D/Enumerations.gen.cs create mode 100644 Brutal.Box2D/LICENSES/BRUTAL-BOX2D-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Box2D/Structs.cs create mode 100644 Brutal.Box2D/Structs.gen.cs create mode 100644 Brutal.Box2D/Typedefs.gen.cs create mode 100644 Brutal.Collections/FreeList.cs create mode 100644 Brutal.Collections/Name/Name.cs create mode 100644 Brutal.Collections/Name/Namespace.cs create mode 100644 Brutal.Collections/NativeList/INativeList.cs create mode 100644 Brutal.Collections/NativeList/NativeList.cs create mode 100644 Brutal.Collections/NativeList/NativeListEnumerator.cs create mode 100644 Brutal.Collections/NativeList/NativeListOfT.cs create mode 100644 Brutal.Collections/NativeList/NativeStrideList.cs create mode 100644 Brutal.Collections/Span/NativeStrideSpan.cs create mode 100644 Brutal.Collections/Span/ScratchSpan.cs create mode 100644 Brutal.Concurrency/Jobs/IJob.cs create mode 100644 Brutal.Concurrency/Jobs/JobRunner.cs create mode 100644 Brutal.Concurrency/Jobs/JobRunnerMetrics.cs create mode 100644 Brutal.Concurrency/Jobs/JobRunnerTimer.cs create mode 100644 Brutal.Concurrency/Jobs/JobScheduler.cs create mode 100644 Brutal.Concurrency/Jobs/JobState.cs create mode 100644 Brutal.Concurrency/Statistics/MovingAverage.cs create mode 100644 Brutal.Concurrency/Statistics/Sampler.cs create mode 100644 Brutal.Core/Attributes.cs create mode 100644 Brutal.Core/Enums/BitMask.cs create mode 100644 Brutal.Core/Enums/Enum.Info.cs create mode 100644 Brutal.Core/Enums/EnumArithmetic.gen.cs create mode 100644 Brutal.Core/Enums/EnumExtensions.cs create mode 100644 Brutal.Core/Enums/EnumFormatting.cs create mode 100644 Brutal.Core/Enums/EnumMask.cs create mode 100644 Brutal.Core/Extensions/BitOperationsEx.cs create mode 100644 Brutal.Core/Extensions/SpanExtensions.cs create mode 100644 Brutal.Core/Extensions/Utf8Ex.cs create mode 100644 Brutal.Core/GlobalUsings.cs create mode 100644 Brutal.Core/Interfaces/INullable.cs create mode 100644 Brutal.Core/Interfaces/ISpanLike.cs create mode 100644 Brutal.Core/Numerics/IAssociativeArithmeticOperators.cs create mode 100644 Brutal.Core/Platform.cs create mode 100644 Brutal.Core/Pointers/PointerExtensions.cs create mode 100644 Brutal.Core/Pointers/Ptr.cs create mode 100644 Brutal.Core/Pointers/PtrOfT.cs create mode 100644 Brutal.Core/Pointers/PtrPtr.cs create mode 100644 Brutal.Core/Pointers/PtrPtrOfT.cs create mode 100644 Brutal.Core/Types/Bool32.cs create mode 100644 Brutal.Core/Types/Bool8.cs create mode 100644 Brutal.Core/Types/BoolExtensions.cs create mode 100644 Brutal.Core/Types/ByteSize.cs create mode 100644 Brutal.Core/Types/ElementCount.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Callbacks.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlCallbackType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlDspIndex.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelMask.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelOrder.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/CodecSeekMethod.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugFlags.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugMode.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DriverState.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCallbackType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMix.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMixOutput.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChorus.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCompressor.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConnectionType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConvolutionReverb.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDelay.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDistortion.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEcho.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEchoDelayChangeModeType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFader.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFft.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftDownmixType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftWindowType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFlange.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPass.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPassSimple.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItEcho.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItLowPass.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLimiter.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeter.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeterStateType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPass.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPassSimple.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamics.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamicsModeType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEq.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEqFilterType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspNormalize.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspObjectPan.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspOscillator.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan2dStereoModeType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dExtentModeType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dRolloffType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanModeType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanSurroundFlags.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParamEq.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterDataType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterFloatMappingType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPitchshift.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspProcessOperation.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspResampler.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspReturn.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSend.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSfxReverb.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEq.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEqCrossoverSlopeType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiver.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiverSpeakerMode.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTremolo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/DspType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ErrorCallbackInstanceType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/InitFlags.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/MemoryType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/Mode.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/OpenState.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputMethod.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/PluginType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/PortIndex.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/PortType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/Result.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundFormat.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundGroupBehavior.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/Speaker.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/SpeakerMode.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/SystemCallbackType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/TagDataType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/TagType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadAffinity.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadPriority.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadStackSize.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Enums/TimeUnit.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Handles.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Channel.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.ChannelGroup.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Dsp.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.DspConnection.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.FmodSystem.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Geometry.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Reverb3d.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Sound.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.SoundGroup.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/PInvokes.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/ResultExtensions.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/AdvancedSettings.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/AsyncReadInfo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/Attributes3d.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecDescription.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecState.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecStateFunctions.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecWaveFormat.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/Complex.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/CpuUsage.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/CreateSoundExInfo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspBufferArray.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDataParameterInfo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDescription.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterInfoType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterWeightingType.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspMeteringInfo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameter3dAttributes.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterAttenuationRange.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescBool.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescData.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescFloat.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescInt.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDynamicResponse.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMapping.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMappingPiecewiseLinear.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterOverallGain.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterSidechain.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspState.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateDftFunctions.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateFunctions.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStatePanFunctions.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/ErrorCallbackInfo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputDescription.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputObject3dInfo.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputState.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/PluginList.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/ReverbProperties.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Generated/Structs/Tag.gen.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/CallbackExtensions.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/ResultExtensions.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Structs/AdvancedSettings.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Structs/CreateSoundExInfo.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameter3dAttributesMulti.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterDesc.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterFft.cs create mode 100644 Brutal.Fmod/FmodCoreApi/Manual/Structs/ReverbProperties.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Callbacks.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandCaptureFlags.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandReplayFlags.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/EventCallbackType.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/EventProperty.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/InstanceType.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadBankFlags.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadMemoryMode.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadingState.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterFlags.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterType.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/PlaybackState.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/StopMode.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioInitFlags.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioSystemCallbackType.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Enums/UserPropertyType.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Handles.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bank.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bus.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.CommandReplay.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventDescription.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventInstance.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.FmodStudioSystem.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Vca.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/PInvokes.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/BankInfo.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferInfo.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferUsage.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/CommandInfo.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/MemoryUsage.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterDescription.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterId.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/PluginInstanceProperties.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/ProgrammerSoundProperties.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/SoundInfo.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioAdvancedSettings.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioCpuUsage.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineBeatProperties.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineMarkerProperties.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineNestedBeatProperties.gen.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Manual/FmodStudio.cs create mode 100644 Brutal.Fmod/FmodStudioApi/Manual/Structs/UserProperty.cs create mode 100644 Brutal.Fmod/GlobalUsings.gen.cs create mode 100644 Brutal.Fmod/LICENSES/BRUTAL-FMOD-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.FreeType/LICENSES/BRUTAL-FREETYPE-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.FreeType/LICENSES/FTL.txt create mode 100644 Brutal.Glfw/CustomStringMarshaller.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwButtonAction.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwContextAttribute.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwCursorMode.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwErrorCode.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwFocusEvent.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwGamepadAxis.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwGamepadButton.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwIconifyEvent.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwInitHint.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwInputMode.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwJoystickEvent.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwJoystickHat.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwKey.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwKeyAction.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwMaximizeEvent.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwModifier.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwMonitorEvent.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwMouseButton.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwPlatform.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwScrollFlags.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwStandardCursor.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwWindowAttribute.gen.cs create mode 100644 Brutal.Glfw/Generated/Enums/GlfwWindowHint.gen.cs create mode 100644 Brutal.Glfw/Generated/Glfw.Constants.gen.cs create mode 100644 Brutal.Glfw/Generated/Glfw.Delegates.gen.cs create mode 100644 Brutal.Glfw/Generated/Glfw.PInvoke.gen.cs create mode 100644 Brutal.Glfw/Generated/Glfw.Structs.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Context.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Cursor.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Initialization.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Input.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Monitor.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Native.Cocoa.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Native.Egl.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Native.OSMesa.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Native.Wayland.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Native.Win32.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Native.X11.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Platform.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Vulkan.gen.cs create mode 100644 Brutal.Glfw/Generated/Libraries/Glfw.Window.gen.cs create mode 100644 Brutal.Glfw/Glfw.cs create mode 100644 Brutal.Glfw/GlobalUsings.cs create mode 100644 Brutal.Glfw/LICENSES/BRUTAL-GLFW-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Glfw/Manual/Glfw.PInvoke.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Context.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Cursor.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Initialization.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Input.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Monitor.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Vulkan.cs create mode 100644 Brutal.Glfw/Manual/Libraries/Glfw.Window.cs create mode 100644 Brutal.Gli/Gli.cs create mode 100644 Brutal.Gli/LICENSES/BRUTAL-GLI-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Gli/Types/Format.cs create mode 100644 Brutal.Gli/Types/Swizzle.cs create mode 100644 Brutal.Gli/Types/Target.cs create mode 100644 Brutal.Gltf/GlobalUsings.cs create mode 100644 Brutal.Gltf/GltfApi/Accessor.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Accessor.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparse.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseIndices.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseValues.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Animation.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannel.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannelTarget.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/AnimationSampler.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Asset.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Buffer.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/BufferView.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Camera.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/CameraOrthographic.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/CameraPerspective.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/DracoMeshCompressionGltfMeshPrimitiveExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Extension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Extras.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Gltf.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/GltfChildOfRootProperty.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/GltfProperty.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Image.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualGltfDocumentExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightProperties.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightSpotProperties.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Material.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialNormalTextureInfo.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialOcclusionTextureInfo.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialPbrMetallicRoughness.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsAnisotropyGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsClearcoatGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsEmissiveStrengthGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsIridescenceGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSheenGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSpecularGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsTransmissionGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsUnlitGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsVolumeGltfMaterialExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Mesh.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/MeshPrimitive.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Node.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Sampler.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Scene.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Skin.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/Texture.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/TextureBasisuGltfTextureExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/TextureInfo.gen.cs create mode 100644 Brutal.Gltf/GltfApi/GeneratedSchema/TextureTransformGltfTextureinfoExtension.gen.cs create mode 100644 Brutal.Gltf/GltfApi/Gltf.cs create mode 100644 Brutal.Gltf/GltfApi/GltfLoader.Transform.cs create mode 100644 Brutal.Gltf/GltfApi/GltfLoader.cs create mode 100644 Brutal.Gltf/GltfApi/GltfUtility.cs create mode 100644 Brutal.Gltf/GltfApi/IExtensionGltfObject.cs create mode 100644 Brutal.Gltf/GltfApi/Image.cs create mode 100644 Brutal.Gltf/GltfApi/JsonHelpers.cs create mode 100644 Brutal.Gltf/GltfApi/Material.cs create mode 100644 Brutal.Gltf/GltfApi/Node.cs create mode 100644 Brutal.Gltf/LICENSES/BRUTAL-GLTF-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleColor.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleLogEntry.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleWindow.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/TableString.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCallbackAttribute.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCommand.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterface.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterfaceException.cs create mode 100644 Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalParser.cs create mode 100644 Brutal.ImGui.Abstractions/GlobalUsings.cs create mode 100644 Brutal.ImGui.Abstractions/ImGuiUtils.cs create mode 100644 Brutal.ImGui.Backends/Interfaces/IPlatformBackend.cs create mode 100644 Brutal.ImGui.Backends/Interfaces/IRendererBackend.cs create mode 100644 Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.GlfwInterop.cs create mode 100644 Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.WindowsNative.cs create mode 100644 Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs create mode 100644 Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.Helpers.cs create mode 100644 Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.cs create mode 100644 Brutal.ImGui.Backends/RendererBackends/VulkanBackend.Helpers.cs create mode 100644 Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs create mode 100644 Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Internals.cs create mode 100644 Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Obsolete.cs create mode 100644 Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.cs create mode 100644 Brutal.ImGui.Extensions/GlobalUsings.cs create mode 100644 Brutal.ImGui.Extensions/ImGui.extensions.cs create mode 100644 Brutal.ImGui.FreeType/Generated/Enums/ImGuiFreeTypeLoaderFlags.gen.cs create mode 100644 Brutal.ImGui.FreeType/Generated/Functions/ImGuiFreeType.gen.cs create mode 100644 Brutal.ImGui.FreeType/Generated/PInvoke/DebugEditFontLoaderFlags.gen.cs create mode 100644 Brutal.ImGui.FreeType/Generated/PInvoke/GetFontLoader.gen.cs create mode 100644 Brutal.ImGui.FreeType/Generated/PInvoke/SetAllocatorFunctions.gen.cs create mode 100644 Brutal.ImGui.FreeType/GlobalUsings.cs create mode 100644 Brutal.ImGui/Core/VaList.cs create mode 100644 Brutal.ImGui/Generated-Internal/Delegates/ImGuiContextHookCallback.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Delegates/ImGuiErrorCallback.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiActivateFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiAxis.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiButtonFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiComboFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiContextHookType.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiDataAuthority.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiDataTypePrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiDebugLogFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiFocusRequestFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiHoveredFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiInputEventType.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiInputFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiInputSource.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiInputTextFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiItemFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiItemStatusFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiLayoutType.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiLocKey.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiLogFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiNavLayer.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiNavMoveFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiNavRenderCursorFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiNextItemDataFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiNextWindowDataFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiOldColumnFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiPlotType.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiPopupPositionPolicy.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiScrollFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiSelectableFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiSeparatorFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiSliderFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiTabBarFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiTabItemFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiTextFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiTooltipFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiTreeNodeFlagsPrivate.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiTypingSelectFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowDockStyleCol.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowRefreshFlags.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImBitVector.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImDrawListSharedData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiDockNode.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextDeactivatedState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiKeyRoutingTable.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperRange.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiMenuColumns.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiMultiSelectTempData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiNavItemData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiNextItemData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiNextWindowData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiStyleVarInfo.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiTableSettings.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiTextIndex.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiTypingSelectState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiViewportP.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiWindow.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Functions/ImGuiWindowSettings.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/InlineArrays.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ActivateItemByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/AddContextHook_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/AddDrawListToDrawDataEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/AddSettingsHandler_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ArrowButtonEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginBoxSelect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginChildEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginColumns_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPopup_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPreview_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginDisabledOverrideReenable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropSource_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropTarget_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginDocked_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginDragDropTargetCustom_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginErrorTooltip_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginMenuEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupMenuEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginTabBarEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginTableEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipHidden_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BeginViewportSideBar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBack_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBehind_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayFront_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToFocusFront_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ButtonBehavior_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ButtonEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CalcItemSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CalcRoundingFlagsForRectInRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CalcTypematicRepeatAmount_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CalcWindowNextAutoFitSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CalcWrapWidthForPos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CallContextHooks_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CheckboxFlags_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClearActiveID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClearDragDrop_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClearIniSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClearWindowSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CloseButton_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupToLevel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsExceptModals_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsOverWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CollapseButton_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ColorEditOptionsPopup_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ColorPickerOptionsPopup_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ColorTooltip_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ConvertSingleModFlagToKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/CreateNewWindowSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyFromText_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyOp_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeClamp_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeCompare_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeFormatString_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeGetInfo_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DataTypeIsZero_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugAllocHook_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButtonTooltip_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButton_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakClearData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawCursorPos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawItemRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawLineExtents_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugHookIdInfo_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemOnHover_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemResolveWithLastItem_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItem_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeColumns_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDockNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawCmdShowMeshAndBoundingBox_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawList_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyph_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyphesForSrcMask_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFont_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeInputTextState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeMultiSelectState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodePlatformMonitor_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeStorage_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTabBar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTableSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTexture_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTypingSelectState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeViewport_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsListByBeginStackParent_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsList_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderKeyboardPreview_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderViewportThumbnail_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DebugTextUnformattedWithLocateItem_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DestroyPlatformWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderAddNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyDockSpace_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyWindowSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderDockWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderFinish_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetCentralNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeChildNodes_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeDockedWindows_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodePos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodeSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSplitNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextCalcDropPosForDocking_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextClearNodes_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextEndFrame_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextFindNodeByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextGenNodeID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextInitialize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateDocking_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateUndocking_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueDock_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextRebuildNodes_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockContextShutdown_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeBeginAmendTabBar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeEndAmendTabBar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetDepth_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetRootNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetWindowMenuButtonId_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeIsInHierarchyOf_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DockNodeWindowMenuHandler_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/DragBehavior_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/EndBoxSelect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/EndColumns_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/EndComboPreview_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/EndDisabledOverrideReenable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/EndErrorTooltip_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckEndFrameFinalizeErrorTooltip_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckUsingSetCursorPosToExtendParentBoundaries_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ErrorLog_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryStoreState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverWindowState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopupEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopup_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindBlockingModal_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindBottomMostVisibleWindowWithinBeginStack_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredViewportFromPlatformWindowStack_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredWindowEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindOrCreateColumns_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindRenderedTextEnd_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindSettingsHandler_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByName_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindWindowDisplayIndex_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FixupKeyChord_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FocusItem_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FocusTopMostWindowUnderOne_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/FocusWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GcAwakeTransientWindowBuffers_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientMiscBuffers_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientWindowBuffers_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetActiveID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetBoxSelectState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetColumnNormFromOffset_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetColumnOffsetFromNorm_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetColumnsID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentFocusScope_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTabBar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindowRead_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetDefaultFont_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetFocusID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetFontRasterizerDensity_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetForegroundDrawList_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetHoveredID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetIDWithSeed_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetIO_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetInputTextState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetItemFlags_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetItemStatusFlags_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetKeyChordName_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetKeyData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetKeyMagnitude2d_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwnerData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwner_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetMultiSelectState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetNavTweakPressedAmount_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetPlatformIO_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetPopupAllowedExtentRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetRoundedFontSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetShortcutRoutingData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetStyleVarInfo_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostAndVisiblePopupModal_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostPopupModal_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetTypematicRepeatRate_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetTypingSelectRequest_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetViewportPlatformMonitor_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetWindowAlwaysWantOwnTabBar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetWindowDockNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeBorderID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeCornerID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImBitVector_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImDrawListSharedData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiDockNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextDeactivatedState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiKeyRoutingTable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperRange_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMenuColumns_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMultiSelectTempData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNavItemData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextItemData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextWindowData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiStyleVarInfo_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTableSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTextIndex_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTypingSelectState_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiViewportP_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindowSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ImageButtonEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/Initialize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/InputTextDeactivateHook_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/InputTextEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsActiveIdUsingNavDir_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsAliasKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsClippedEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropActive_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropPayloadBeingAccepted_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsGamepadKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsItemActiveAsInputText_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsKeyChordPressed_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsKeyDown_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsKeyPressed_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsKeyReleased_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsKeyboardKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsLRModKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsLegacyKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsMouseClicked_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDoubleClicked_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDown_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDragPastThreshold_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsMouseKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsMouseReleased_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKeyOrMod_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsPopupOpen_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsWindowAbove_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsWindowChildOf_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsWindowContentHoverable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsWindowNavFocusable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/IsWindowWithinBeginStackOf_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ItemAdd_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ItemHoverable_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ItemSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/KeepAliveID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/LocalizeGetMsg_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/LocalizeRegisterEntries_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/LogBegin_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/LogRenderedText_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/LogSetNextTextDecoration_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/LogToBuffer_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MarkIniSettingsDirty_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MarkItemEdited_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MenuItemEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MouseButtonToKey_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetAll_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetRange_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemFooter_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemHeader_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavClearPreferredPosForAxis_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavHighlightActivated_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavInitRequestApplyResult_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavInitWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestApplyResult_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestButNoResultYet_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestCancel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestForward_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithLastItem_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithPastTreeNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestSubmit_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestTryWrapping_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/NavUpdateCurrentWindowIsScrollPushableX_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/OpenPopupEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PlotEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PopColumnsBackground_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PopFocusScope_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PopPasswordFont_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PushColumnClipRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PushColumnsBackground_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PushFocusScope_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PushMultiItemsWidths_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PushOverrideID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/PushPasswordFont_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RegisterFontAtlas_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RegisterUserTexture_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RemoveContextHook_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RemoveSettingsHandler_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowDockMenu_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowPointingAt_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderArrow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderBullet_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderCheckMark_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderColorRectWithAlphaCheckerboard_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderDragDropTargetRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderFrameBorder_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderFrame_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderMouseCursor_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderNavCursor_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledRangeH_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledWithHole_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClippedEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClipped_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderTextEllipsis_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderTextWrapped_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/RenderText_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ScaleWindowsInViewport_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ScrollToBringRectIntoView_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ScrollToItem_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRectEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ScrollbarEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/Scrollbar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SeparatorEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SeparatorTextEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetActiveID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetActiveIdUsingAllKeyboardKeys_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentFont_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentViewport_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetFocusID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetFontRasterizerDensity_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetHoveredID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetItemKeyOwner_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwner_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwnersForKeyChord_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetLastItemData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetNavCursorVisibleAfterMove_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetNavFocusScope_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetNavID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetNavWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetNextItemRefVal_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetNextWindowRefreshPolicy_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosX_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosY_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetScrollX_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetScrollY_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetShortcutRouting_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowClipRectBeforeSetChannel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowCollapsed_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowDock_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHiddenAndSkipItemsForCurrentFrame_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHitTestHole_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowParentWindowForFocusRoute_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowPos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SetWindowViewport_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearColorGradientKeepAlpha_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearUV_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsTransformPos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/Shortcut_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ShowFontAtlas_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/ShrinkWidths_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/Shutdown_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SliderBehavior_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/SplitterBehavior_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindowOrNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/StopMouseMovingWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarAddTab_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarCloseTab_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindMostRecentlySelectedTabForActiveWindow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByOrder_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetCurrentTab_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabName_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabOrder_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarProcessReorder_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueFocus_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorderFromMousePos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorder_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabBarRemoveTab_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabItemBackground_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabItemCalcSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabItemEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabItemLabelAndCloseButton_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TabItemSpacing_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableAngledHeadersRowEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableBeginApplyRequests_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableBeginCell_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableBeginContextMenuPopup_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableBeginInitMemory_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableBeginRow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableCalcMaxColumnWidth_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableDrawBorders_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableDrawDefaultContextMenu_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableEndCell_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableEndRow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableFindByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableFixColumnSortDirection_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactTransientBuffers_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetBoundSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetCellBgRect_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnName_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnNextSortDirection_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnResizeID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnWidthAuto_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderAngledMaxLabelWidth_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderRowHeight_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetHoveredRow_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceData_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableLoadSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableMergeDrawChannels_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableOpenContextMenu_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TablePopBackgroundChannel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TablePopColumnChannel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TablePushBackgroundChannel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TablePushColumnChannel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableRemove_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableResetSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSaveSettings_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnSortDirection_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoAll_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoSingle_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidth_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsAddSettingsHandler_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsCreate_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsFindByID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSetupDrawChannels_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsBuild_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsSanitize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateBorders_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateColumnsWeightFromWidth_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateLayout_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TeleportMousePos_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TempInputIsActive_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TempInputScalar_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TempInputText_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TestKeyOwner_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TestShortcutRouting_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TextAligned_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TextEx_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TranslateWindowsInViewport_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeBehavior_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToChildNode_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToTreePop_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeGetOpen_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeSetOpen_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeUpdateNextOpen_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TreePushOverrideID_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindBestLeadingMatch_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindMatch_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindNextSingleCharMatch_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UnregisterFontAtlas_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UnregisterUserTexture_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateCurrentFontSize_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateHoveredWindowAndCaptureFlags_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateInputEvents_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowEndFrame_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowNewFrame_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowParentAndRootLinks_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowSkipRefresh_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/WindowPosAbsToRel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/WindowPosRelToAbs_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/WindowRectAbsToRel_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/PInvoke/WindowRectRelToAbs_internal.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImBitVector.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasPostProcessData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasRectEntry.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImFontStackData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiBoxSelectState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiColorMod.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiComboPreviewData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiContextHook.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeInfo.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeStorage.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDeactivatedItemData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocEntry.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocInfo.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDockContext.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiDockNode.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiErrorRecoveryState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiFocusScopeData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiGroupData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiIDStackTool.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEvent.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventAppFocused.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventKey.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseButton.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMousePos.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseViewport.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseWheel.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventText.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextDeactivatedState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyOwnerData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingTable.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiLastItemData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperRange.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiLocEntry.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiMenuColumns.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiMetricsConfig.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectTempData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiNavItemData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiNextItemData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiNextWindowData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumnData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumns.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiPopupData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiPtrOrIndex.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiSettingsHandler.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiShrinkWidthItem.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiStackLevelInfo.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleMod.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleVarInfo.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTabBar.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTabItem.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTable.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableCellData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumn.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumnSettings.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableHeaderData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableInstanceData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableSettings.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTableTempData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTextIndex.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTreeNodeStackData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectRequest.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectState.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiViewportP.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiWindow.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowDockStyle.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowSettings.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowStackData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowTempData.gen.cs create mode 100644 Brutal.ImGui/Generated-Internal/Structs/stbrp_context_opaque.gen.cs create mode 100644 Brutal.ImGui/Generated/Delegates/ImDrawCallback.gen.cs create mode 100644 Brutal.ImGui/Generated/Delegates/ImGuiInputTextCallback.gen.cs create mode 100644 Brutal.ImGui/Generated/Delegates/ImGuiMemAllocFunc.gen.cs create mode 100644 Brutal.ImGui/Generated/Delegates/ImGuiMemFreeFunc.gen.cs create mode 100644 Brutal.ImGui/Generated/Delegates/ImGuiSizeCallback.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImDrawFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImDrawListFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImFontAtlasFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImFontFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiBackendFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiButtonFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiChildFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiCol.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiColorEditFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiComboFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiCond.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiConfigFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiDataType.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiDir.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiDockNodeFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiDragDropFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiFocusedFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiHoveredFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiInputFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiInputTextFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiItemFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiKey.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiMouseButton.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiMouseCursor.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiMouseSource.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiMultiSelectFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiPopupFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiSelectableFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiSelectionRequestType.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiSliderFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiSortDirection.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiStyleVar.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTabBarFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTabItemFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTableBgTarget.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTableColumnFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTableFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTableRowFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiTreeNodeFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiViewportFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImGuiWindowFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImTextureFormat.gen.cs create mode 100644 Brutal.ImGui/Generated/Enums/ImTextureStatus.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImDrawCmd.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImDrawData.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImDrawList.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImDrawListSplitter.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImFont.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImFontAtlas.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImFontBaked.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImFontGlyphRangesBuilder.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGui.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiIO.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiInputTextCallbackData.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiListClipper.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiPayload.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiSelectionBasicStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiSelectionExternalStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiStyle.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiTextFilter.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImGuiViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImTextureData.gen.cs create mode 100644 Brutal.ImGui/Generated/Functions/ImTextureRef.gen.cs create mode 100644 Brutal.ImGui/Generated/InlineArrays.gen.cs create mode 100644 Brutal.ImGui/Generated/Macros.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/AcceptDragDropPayload.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/AlignTextToFramePadding.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ArrowButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Begin.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginChild.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginCombo.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginDisabled.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginDragDropSource.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginDragDropTarget.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginGroup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginItemTooltip.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginListBox.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginMainMenuBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginMenu.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginMenuBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginMultiSelect.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginPopup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginPopupContextItem.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginPopupContextVoid.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginPopupContextWindow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginPopupModal.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginTabBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginTabItem.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginTable.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BeginTooltip.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Bullet.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/BulletText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Button.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/CalcItemWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/CalcTextSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Checkbox.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/CheckboxFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/CloseCurrentPopup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/CollapsingHeader.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorConvertFloat4ToU32.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorConvertHSVtoRGB.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorConvertRGBtoHSV.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorConvertU32ToFloat4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorEdit3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorEdit4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorPicker3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ColorPicker4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Columns.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Combo.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/CreateContext.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DebugCheckVersionAndDataLayout.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DebugFlashStyleColor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DebugLog.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DebugStartItemPicker.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DebugTextEncoding.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DestroyContext.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DestroyPlatformWindows.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DockSpace.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DockSpaceOverViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragFloat.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragFloat2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragFloat3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragFloat4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragFloatRange2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragInt.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragInt2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragInt3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragInt4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragIntRange2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragScalar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/DragScalarN.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Dummy.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/End.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndChild.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndCombo.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndDisabled.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndDragDropSource.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndDragDropTarget.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndFrame.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndGroup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndListBox.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndMainMenuBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndMenu.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndMenuBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndMultiSelect.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndPopup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndTabBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndTabItem.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndTable.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/EndTooltip.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/FindViewportByID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/FindViewportByPlatformHandle.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetAllocatorFunctions.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetBackgroundDrawList.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetClipboardText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetColorU32.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetColumnIndex.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetColumnOffset.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetColumnWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetColumnsCount.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetContentRegionAvail.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetCurrentContext.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetCursorPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetCursorPosX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetCursorPosY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetCursorScreenPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetCursorStartPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetDragDropPayload.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetDrawData.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetDrawListSharedData.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFont.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFontBaked.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFontSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFontTexUvWhitePixel.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetForegroundDrawList.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFrameCount.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFrameHeight.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetFrameHeightWithSpacing.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetIO.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetItemID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetItemRectMax.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetItemRectMin.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetItemRectSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetKeyName.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetKeyPressedAmount.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetMainViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetMouseClickedCount.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetMouseCursor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetMouseDragDelta.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetMousePos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetMousePosOnOpeningCurrentPopup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetPlatformIO.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetScrollMaxX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetScrollMaxY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetScrollX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetScrollY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetStateStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetStyle.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetStyleColorName.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetStyleColorVec4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetTextLineHeight.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetTextLineHeightWithSpacing.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetTime.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetTreeNodeToLabelSpacing.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetVersion.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowDockID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowDpiScale.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowDrawList.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowHeight.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/GetWindowWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImDrawCmd.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImDrawData.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImDrawList.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImDrawListSplitter.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImFont.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImFontAtlas.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImFontBaked.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImFontGlyphRangesBuilder.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiIO.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiInputTextCallbackData.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiListClipper.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiPayload.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiSelectionBasicStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiSelectionExternalStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiStyle.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiTextFilter.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImGuiViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImTextureData.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImTextureRef.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Image.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImageButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ImageWithBg.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Indent.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputDouble.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputFloat.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputFloat2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputFloat3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputFloat4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputInt.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputInt2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputInt3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputInt4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputScalar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputScalarN.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputTextMultiline.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InputTextWithHint.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/InvisibleButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsAnyItemActive.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsAnyItemFocused.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsAnyItemHovered.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsAnyMouseDown.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemActivated.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemActive.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemClicked.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemDeactivated.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemDeactivatedAfterEdit.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemEdited.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemFocused.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemHovered.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemToggledOpen.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemToggledSelection.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsItemVisible.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsKeyChordPressed.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsKeyDown.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsKeyPressed.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsKeyReleased.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseClicked.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseDoubleClicked.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseDown.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseDragging.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseHoveringRect.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMousePosValid.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseReleased.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsMouseReleasedWithDelay.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsPopupOpen.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsRectVisible.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsWindowAppearing.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsWindowCollapsed.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsWindowDocked.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsWindowFocused.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/IsWindowHovered.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LabelText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ListBox.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromDisk.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromMemory.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LogButtons.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LogFinish.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LogText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LogToClipboard.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LogToFile.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/LogToTTY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/MemAlloc.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/MemFree.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/MenuItem.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/NewFrame.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/NewLine.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/NextColumn.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/OpenPopup.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/OpenPopupOnItemClick.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PlotHistogram.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PlotLines.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopClipRect.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopFont.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopItemFlag.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopItemWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopStyleColor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopStyleVar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PopTextWrapPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ProgressBar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushClipRect.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushFont.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushItemFlag.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushItemWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushStyleColor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushStyleVar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushStyleVarX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushStyleVarY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/PushTextWrapPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/RadioButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Render.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/RenderPlatformWindowsDefault.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ResetMouseDragDelta.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SameLine.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToDisk.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToMemory.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Selectable.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Separator.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SeparatorText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetAllocatorFunctions.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetClipboardText.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetColorEditOptions.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetColumnOffset.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetColumnWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetCurrentContext.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetCursorPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetCursorPosX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetCursorPosY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetCursorScreenPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetDragDropPayload.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetItemDefaultFocus.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetItemKeyOwner.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetItemTooltip.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetKeyboardFocusHere.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetMouseCursor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNavCursorVisible.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureKeyboard.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureMouse.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextItemAllowOverlap.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextItemOpen.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextItemSelectionUserData.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextItemShortcut.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextItemStorageID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextItemWidth.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowBgAlpha.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowClass.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowCollapsed.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowContentSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowDockID.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowFocus.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowScroll.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowSizeConstraints.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetNextWindowViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetScrollFromPosX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetScrollFromPosY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetScrollHereX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetScrollHereY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetScrollX.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetScrollY.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetStateStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetTabItemClosed.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetTooltip.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetWindowCollapsed.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetWindowFocus.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetWindowPos.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SetWindowSize.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Shortcut.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowAboutWindow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowDebugLogWindow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowDemoWindow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowFontSelector.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowIDStackToolWindow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowMetricsWindow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowStyleEditor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowStyleSelector.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/ShowUserGuide.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderAngle.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderFloat.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderFloat2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderFloat3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderFloat4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderInt.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderInt2.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderInt3.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderInt4.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderScalar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SliderScalarN.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/SmallButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Spacing.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/StyleColorsClassic.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/StyleColorsDark.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/StyleColorsLight.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TabItemButton.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableAngledHeadersRow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetColumnCount.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetColumnFlags.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetColumnIndex.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetColumnName.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetHoveredColumn.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetRowIndex.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableGetSortSpecs.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableHeader.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableHeadersRow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableNextColumn.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableNextRow.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableSetBgColor.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableSetColumnEnabled.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableSetColumnIndex.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableSetupColumn.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TableSetupScrollFreeze.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Text.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextColored.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextDisabled.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextLink.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextLinkOpenURL.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextUnformatted.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextV.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TextWrapped.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TreeNode.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TreeNodeEx.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TreePop.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/TreePush.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Unindent.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/UpdatePlatformWindows.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/VSliderFloat.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/VSliderInt.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/VSliderScalar.gen.cs create mode 100644 Brutal.ImGui/Generated/PInvoke/Value.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawChannel.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawCmd.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawCmdHeader.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawData.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawList.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawListSplitter.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImDrawVert.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFont.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontAtlas.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontAtlasBuilder.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontAtlasRect.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontBaked.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontConfig.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontGlyph.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImFontLoader.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiContext.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiIO.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiInputTextCallbackData.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiKeyData.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiListClipper.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiMultiSelectIO.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiPayload.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiPlatformIO.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiPlatformImeData.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiPlatformMonitor.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiSelectionBasicStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiSelectionExternalStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiSelectionRequest.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiSizeCallbackData.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiStorage.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiStoragePair.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiStyle.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiTableSortSpecs.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiTextBuffer.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiTextFilter.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiViewport.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImGuiWindowClass.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImTextureData.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImTextureRect.gen.cs create mode 100644 Brutal.ImGui/Generated/Structs/ImTextureRef.gen.cs create mode 100644 Brutal.ImGui/GlobalUsings.cs create mode 100644 Brutal.ImGui/ImString/ArenaStringBuilder.cs create mode 100644 Brutal.ImGui/ImString/ImInputString.cs create mode 100644 Brutal.ImGui/ImString/ImString.Interpolation.cs create mode 100644 Brutal.ImGui/ImString/ImString.ToString.cs create mode 100644 Brutal.ImGui/ImString/ImString.cs create mode 100644 Brutal.ImGui/ImString/InteropExtensions.cs create mode 100644 Brutal.ImGui/LICENSES/BRUTAL-IMGUI-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.ImGui/Manual/Functions/ImDrawList.cs create mode 100644 Brutal.ImGui/Manual/Functions/ImGui.Text.cs create mode 100644 Brutal.ImGui/Manual/Functions/ImGui.cs create mode 100644 Brutal.ImGui/Manual/Handles/ImDrawListSharedData.cs create mode 100644 Brutal.ImGui/Manual/ImAssert.cs create mode 100644 Brutal.ImGui/Manual/ImColor8.cs create mode 100644 Brutal.ImGui/Manual/ImGui.Internal.cs create mode 100644 Brutal.ImGui/Manual/ImGuiCpp.cs create mode 100644 Brutal.ImGui/Manual/ImVector.cs create mode 100644 Brutal.ImGui/Manual/Interop.cs create mode 100644 Brutal.ImGui/Manual/StructExtensions/ImDrawCmd.cs create mode 100644 Brutal.ImGui/Manual/StructExtensions/ImGuiPlatformIO.cs create mode 100644 Brutal.ImGui/Manual/StructExtensions/ImGuiTextFilter.cs create mode 100644 Brutal.ImGui/Manual/Structs/ImDrawDataBuilder.cs create mode 100644 Brutal.ImGui/Manual/Structs/ImGuiListClipper.cs create mode 100644 Brutal.ImGui/Manual/Structs/ImGuiOnceUponAFrame.cs create mode 100644 Brutal.ImGui/Manual/Structs/ImGuiTextRange.cs create mode 100644 Brutal.ImGui/Manual/Typedefs/ImFontAtlasRectId.cs create mode 100644 Brutal.ImGui/Manual/Typedefs/ImGuiID.cs create mode 100644 Brutal.ImGui/Manual/Typedefs/ImGuiKeyChord.cs create mode 100644 Brutal.ImGui/Manual/Typedefs/ImTextureID.cs create mode 100644 Brutal.ImGui/Manual/Typedefs/TODO.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Delegates/ImPlotLocator.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Enums/ImPlotDateFmt.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeFmt.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeUnit.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotAlignmentData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotAnnotationCollection.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotColormapData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotItemGroup.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotLegend.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextItemData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextPlotData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotTagCollection.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotTicker.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Functions/ImPlotTime.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/InlineArrays.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AddTextCentered_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AddTextVertical_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AddTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AllAxesInputLocked_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHeld_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHovered_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesInputLocked_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/BeginItem_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/BustItemCache_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/BustPlotCache_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CalcHoverColor_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CalcLegendSize_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextColor_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextSizeVertical_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CalculateBins_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CeilTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ClampLabelPos_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ClampLegendRect_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/CombineDateTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/EndItem_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FitPointX_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FitPointY_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FitPoint_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FitThisFrame_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FloorTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FormatDateTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FormatDate_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/FormatTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Formatter_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetAutoColor_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetColormapColorU32_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentItem_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentPlot_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetDaysInMonth_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetGmtTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetItemData_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetItem_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetLocTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetLocationPos_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetMonth_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetPlot_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorU32_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorVec4_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/GetYear_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAlignmentData_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAnnotationCollection_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAxis_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotColormapData_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotItemGroup_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotLegend_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextItemData_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextPlotData_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotPlot_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTagCollection_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTicker_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Initialize_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Intersection_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/IsColorAuto_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/IsLeapYear_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/LabelAxisValue_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Locator_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/MakeTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/MkGmtTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/MkLocTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/MkTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/NextColormapColorU32_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/NiceNum_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Now_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/OrderOfMagnitude_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/OrderToPrecision_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Precision_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/RangesOverlap_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/RegisterOrGetItem_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/RenderColorBar_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextAlignedPlots_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextPlot_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextSubplot_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/RoundTime_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/RoundTo_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/SampleColormapU32_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/SetupLock_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowAltLegend_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowAxisContextMenu_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowDatePicker_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendContextMenu_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendEntries_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowPlotContextMenu_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowSubplotsContextMenu_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/ShowTimePicker_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/SubplotNextCell_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/Today_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/TransformForward_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/PInvoke/TransformInverse_internal.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotAlignmentData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotation.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotationCollection.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotColormapData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotDateTimeSpec.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotItem.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotItemGroup.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotLegend.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextItemData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextPlotData.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotPointError.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotSubplot.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotTag.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotTagCollection.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotTick.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotTicker.gen.cs create mode 100644 Brutal.ImPlot/Generated-Internal/Structs/ImPlotTime.gen.cs create mode 100644 Brutal.ImPlot/Generated/Delegates/ImPlotFormatter.gen.cs create mode 100644 Brutal.ImPlot/Generated/Delegates/ImPlotGetter.gen.cs create mode 100644 Brutal.ImPlot/Generated/Delegates/ImPlotTransform.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotAxisFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotBarGroupsFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotBarsFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotBin.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotCol.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotColormap.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotColormapScaleFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotCond.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotDigitalFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotDragToolFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotDummyFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotErrorBarsFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotHeatmapFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotHistogramFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotImageFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotInfLinesFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotItemFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotLegendFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotLineFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotLocation.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotMarker.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotMouseTextFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotPieChartFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotScale.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotScatterFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotShadedFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotStairsFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotStemsFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotStyleVar.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotSubplotFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Enums/ImPlotTextFlags.gen.cs create mode 100644 Brutal.ImPlot/Generated/Functions/ImPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated/Functions/ImPlotRange.gen.cs create mode 100644 Brutal.ImPlot/Generated/Functions/ImPlotRect.gen.cs create mode 100644 Brutal.ImPlot/Generated/InlineArrays.gen.cs create mode 100644 Brutal.ImPlot/Generated/Macros.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/AddColormap.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/Annotation.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginAlignedPlots.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceItem.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourcePlot.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetLegend.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginLegendPopup.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BeginSubplots.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/BustColorCache.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/CancelPlotSelection.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ColormapButton.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ColormapIcon.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ColormapScale.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ColormapSlider.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/CreateContext.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/DestroyContext.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/DragLineX.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/DragLineY.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/DragPoint.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/DragRect.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/EndAlignedPlots.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/EndDragDropSource.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/EndDragDropTarget.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/EndLegendPopup.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/EndPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/EndSubplots.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetColormapColor.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetColormapCount.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetColormapIndex.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetColormapName.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetColormapSize.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetCurrentContext.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetInputMap.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetLastItemColor.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetMarkerName.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetPlotDrawList.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetPlotLimits.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetPlotMousePos.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetPlotPos.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetPlotSelection.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetPlotSize.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetStyle.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/GetStyleColorName.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/HideNextItem.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ImPlotRange.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ImPlotRect.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/IsAxisHovered.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/IsLegendEntryHovered.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/IsPlotHovered.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/IsPlotSelected.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/IsSubplotsHovered.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ItemIcon.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/MapInputDefault.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/MapInputReverse.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/NextColormapColor.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PixelsToPlot.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotBarGroups.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotBars.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotBarsG.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotDigital.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotDigitalG.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotDummy.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotErrorBars.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotHeatmap.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotHistogram.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotHistogram2D.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotImage.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotInfLines.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotLine.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotLineG.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotPieChart.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotScatter.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotScatterG.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotShaded.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotShadedG.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotStairs.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotStairsG.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotStems.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotText.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PlotToPixels.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PopColormap.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PopPlotClipRect.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PopStyleColor.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PopStyleVar.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PushColormap.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PushPlotClipRect.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PushStyleColor.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/PushStyleVar.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SampleColormap.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetAxes.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetCurrentContext.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetImGuiContext.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextAxesLimits.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextAxesToFit.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextAxisLimits.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextAxisLinks.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextAxisToFit.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextErrorBarStyle.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextFillStyle.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextLineStyle.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetNextMarkerStyle.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxes.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxesLimits.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxis.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisFormat.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisLimits.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisLimitsConstraints.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisLinks.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisScale.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisTicks.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupAxisZoomConstraints.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupFinish.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupLegend.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/SetupMouseText.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowColormapSelector.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowDemoWindow.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowInputMapSelector.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowMetricsWindow.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowStyleEditor.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowStyleSelector.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/ShowUserGuide.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/StyleColorsAuto.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/StyleColorsClassic.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/StyleColorsDark.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/StyleColorsLight.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/TagX.gen.cs create mode 100644 Brutal.ImPlot/Generated/PInvoke/TagY.gen.cs create mode 100644 Brutal.ImPlot/Generated/Structs/ImPlotContext.gen.cs create mode 100644 Brutal.ImPlot/Generated/Structs/ImPlotInputMap.gen.cs create mode 100644 Brutal.ImPlot/Generated/Structs/ImPlotRange.gen.cs create mode 100644 Brutal.ImPlot/Generated/Structs/ImPlotRect.gen.cs create mode 100644 Brutal.ImPlot/Generated/Structs/ImPlotStyle.gen.cs create mode 100644 Brutal.ImPlot/GlobalUsings.cs create mode 100644 Brutal.ImPlot/Manual/ImPlot.Internal.cs create mode 100644 Brutal.ImPlot/Manual/Macros.manual.cs create mode 100644 Brutal.ImPlot/Manual/PlotLine.manual.cs create mode 100644 Brutal.ImPlot/Manual/PlotShaded.manual.cs create mode 100644 Brutal.ImPlot/Manual/TODO.cs create mode 100644 Brutal.Interop/IInteropHandle.cs create mode 100644 Brutal.Interop/InteropHandleAttribute.cs create mode 100644 Brutal.Interop/InteropHandleMarshaller.cs create mode 100644 Brutal.Interop/InteropNullableStringMarshaller.cs create mode 100644 Brutal.Interop/InteropStringMarshaller.cs create mode 100644 Brutal.Jolt/Generated/Classes/AABBTreeBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/AngleConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/AxisConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Body.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyActivationListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyCreationSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyDrawFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyInterface.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockInterface.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockInterfaceLocking.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockInterfaceNoLock.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockMultiRead.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockMultiWrite.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockRead.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyLockWrite.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BodyManager.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BoxShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BoxShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhase.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseBruteForce.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterface.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceMask.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceTable.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseQuadTree.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/BroadPhaseQuery.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ByteBuffer.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CalculateSolverSteps.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CapsuleShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CapsuleShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CastConvexVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CastSphereVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Character.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterBase.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterBaseSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterVirtual.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterVirtualSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollision.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollisionSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollideConvexVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollideSettingsBase.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollideShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollideSoftBodyVertexIterator.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollideSphereVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastRay.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCollideShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollisionDispatch.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CollisionGroup.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CompoundShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CompoundShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConeConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConeConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Constraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConstraintManager.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConvexHullBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConvexHullBuilder2D.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConvexHullShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConvexHullShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConvexShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ConvexShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CylinderShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/CylinderShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DebugRenderer.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DebugRendererPlayback.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DebugRendererRecorder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DebugRendererSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DecoratedShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DecoratedShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DefaultBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DefaultObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DistanceConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DistanceConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DualAxisConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DummyCalculateSolverSteps.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/DynMatrix.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/EPAConvexHullBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/EPAPenetrationDepth.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Ellipse.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/EmptyShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/EmptyShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FPExceptionDisableDivByZero.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FPExceptionDisableInvalid.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FPExceptionDisableOverflow.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FPExceptionsEnable.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FPFlushDenormals.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Factory.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FixedConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/FixedConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GJKClosestPoint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GearConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GearConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GearConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GetTrianglesContextMultiVertexList.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GetTrianglesContextVertexList.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GroupFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GroupFilterTable.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/GroupFilterToIDMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/HeightFieldShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/HeightFieldShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/HingeConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/HingeConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/HingeRotationConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IDToGroupFilterMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IDToMaterialMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IDToShapeMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IDToSharedSettingsMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IgnoreMultipleBodiesFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilterChained.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IndependentAxisConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/InternalEdgeRemovingCollector.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/IslandBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/JobSystem.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/JobSystemSingleThreaded.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/JobSystemThreadPool.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/JobSystemWithBarrier.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/LFHMAllocator.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/LFHMAllocatorContext.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/LargeIslandSplitter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/LinearCurve.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedBodyActivationListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedBodyDrawFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedBodyFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedCharacterContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedDebugRendererSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedObjectLayerPairFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedObjectVsBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedPhysicsStepListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedSimShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedSoftBodyContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ManagedStateRecorderFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MassProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MaterialToIDMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MeshShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MeshShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MortonCode.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MotionProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MotorSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MotorcycleController.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MotorcycleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MutableCompoundShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/MutableCompoundShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/NarrowPhaseQuery.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectLayerPairFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterMask.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterTable.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterMask.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterTable.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/OrientedBox.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PathConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PathConstraintPath.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PathConstraintPathHermite.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PathConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsLock.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsMaterial.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsMaterialSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsScene.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsStepListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsStepListenerContext.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsSystem.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PhysicsUpdateContext.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PlaneShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PlaneShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PointConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PointConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PointConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PolyhedronSubmergedVolumeCalculator.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PulleyConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/PulleyConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/QuadTree.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RTTI.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RackAndPinionConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RackAndPinionConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RackAndPinionConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Ragdoll.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RagdollSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RayCastSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RayInvDirection.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ReversedShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RotatedTranslatedShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RotatedTranslatedShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RotationEulerConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/RotationQuatConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ScaledShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ScaledShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Semaphore.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Shape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ShapeCastSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ShapeFunctions.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/ShapeToIDMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SharedSettingsToIDMap.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SimShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SimShapeFilterWrapper.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SixDOFConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SixDOFConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SkeletalAnimation.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Skeleton.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SkeletonMapper.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SkeletonPose.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SliderConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SliderConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodyContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodyCreationSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodyManifold.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodyMotionProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodyShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodySharedSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SoftBodyUpdateContext.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SpecifiedBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SpecifiedObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Sphere.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SphereShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SphereShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SpringPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SpringSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StateRecorder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StateRecorderFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StateRecorderImpl.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StaticCompoundShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StaticCompoundShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StreamIn.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StreamInWrapper.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StreamOut.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/StreamOutWrapper.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SubShapeIDCreator.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SwingTwistConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SwingTwistConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/SwingTwistConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TaperedCapsuleShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TaperedCapsuleShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TaperedCylinderShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TaperedCylinderShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TempAllocator.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TempAllocatorImpl.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TempAllocatorImplWithMallocFallback.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TrackedVehicleController.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TrackedVehicleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TransformedShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TriangleShape.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TriangleShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TriangleSplitter.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TriangleSplitterBinning.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TriangleSplitterMean.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TwoBodyConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/TwoBodyConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleCollisionTester.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastCylinder.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastSphere.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleCollisionTesterRay.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleController.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleEngine.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleEngineSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleTrack.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleTrackSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleTransmission.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/VehicleTransmissionSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/Wheel.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheelSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheelSettingsTV.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheelSettingsWV.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheelTV.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheelWV.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheeledVehicleController.gen.cs create mode 100644 Brutal.Jolt/Generated/Classes/WheeledVehicleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/Activation.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ActiveEdgeMode.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/AllowedDOFs.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/BackFaceMode.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/BodyType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/CanSleep.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/CollectFacesMode.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ConstraintSpace.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ConstraintSubType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ConstraintType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/MotionQuality.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/MotionType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/MotorState.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ObjectStreamType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/OverrideMassProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/PathRotationConstraintType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/PhysicsUpdateError.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ShapeSubType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ShapeType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/SoftBodyConstraintColor.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/SoftBodyValidateResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/SpringMode.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/StateRecorderState.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/SwingType.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/TrackSide.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/TransmissionMode.gen.cs create mode 100644 Brutal.Jolt/Generated/Enums/ValidateResult.gen.cs create mode 100644 Brutal.Jolt/Generated/GlobalUsings.gen.cs create mode 100644 Brutal.Jolt/Generated/InlineArrays.gen.cs create mode 100644 Brutal.Jolt/Generated/Jolt.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/AABBTreeBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/AABox.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/AngleConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/AxisConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Body.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyActivationListener.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyCreationSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyDrawFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyInterface.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyLockInterface.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceLocking.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceNoLock.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyLockRead.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyLockWrite.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BodyManager.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BoxShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BoxShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhase.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseBruteForce.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseCastResult.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterface.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceMask.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceTable.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseQuadTree.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/BroadPhaseQuery.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ByteBuffer.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CalculateSolverSteps.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CapsuleShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CapsuleShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CastConvexVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CastSphereVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Character.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterBase.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterBaseSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterContact.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterContactKey.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterVirtual.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterVirtualSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollision.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollisionSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollideConvexVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollidePointResult.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollideSettingsBase.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollideShapeResult.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollideShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollideSoftBodyVertexIterator.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollideSphereVsTriangles.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastRay.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCollideShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollisionDispatch.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CollisionGroup.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CompoundShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CompoundShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConeConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConeConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Constraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConstraintManager.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ContactManifold.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder2D.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConvexHullShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConvexHullShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConvexShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ConvexShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CylinderShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/CylinderShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DebugRenderer.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DebugRendererPlayback.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DebugRendererRecorder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DebugRendererSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DecoratedShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DecoratedShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DefaultBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DefaultObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DistanceConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DistanceConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DualAxisConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DummyCalculateSolverSteps.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/DynMatrix.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/EPAConvexHullBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/EPAPenetrationDepth.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Ellipse.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/EmptyShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/EmptyShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FPExceptionDisableDivByZero.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FPExceptionDisableInvalid.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FPExceptionDisableOverflow.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FPExceptionsEnable.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FPFlushDenormals.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Factory.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FixedConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/FixedConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GJKClosestPoint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GearConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GearConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GearConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GetTrianglesContextMultiVertexList.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GetTrianglesContextVertexList.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GroupFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/GroupFilterTable.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/HeightFieldShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/HeightFieldShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/HingeConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/HingeConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/HingeRotationConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IgnoreMultipleBodiesFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilterChained.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IndependentAxisConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IndexedTriangle.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IndexedTriangleNoMaterial.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/InternalEdgeRemovingCollector.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/IslandBuilder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/JobSystem.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/JobSystemSingleThreaded.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/JobSystemThreadPool.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/JobSystemWithBarrier.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Jolt.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/LFHMAllocator.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/LFHMAllocatorContext.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/LargeIslandSplitter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/LinearCurve.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MassProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MeshShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MeshShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MortonCode.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MotionProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MotorSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MotorcycleController.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MotorcycleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MutableCompoundShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/MutableCompoundShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/NarrowPhaseQuery.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterMask.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterTable.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterMask.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterTable.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/OrientedBox.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PathConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PathConstraintPath.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PathConstraintPathHermite.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PathConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsLock.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsMaterial.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsMaterialSimple.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsScene.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsStepListener.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsStepListenerContext.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsSystem.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PhysicsUpdateContext.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Plane.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PlaneShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PlaneShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PointConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PointConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PointConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PolyhedronSubmergedVolumeCalculator.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PulleyConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/PulleyConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/QuadTree.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RTTI.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Ragdoll.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RagdollSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RayCastSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RayInvDirection.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ReversedShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RotationEulerConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/RotationQuatConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ScaledShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ScaledShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Semaphore.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Shape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ShapeCastResult.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ShapeCastSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ShapeFunctions.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/ShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SimShapeFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SimShapeFilterWrapper.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SixDOFConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SixDOFConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SkeletalAnimation.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Skeleton.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SkeletonMapper.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SkeletonPose.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SliderConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SliderConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyContactListener.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyCreationSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyManifold.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyMotionProperties.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodySharedSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyUpdateContext.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SoftBodyVertex.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SpecifiedBroadPhaseLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SpecifiedObjectLayerFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Sphere.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SphereShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SphereShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SpringPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SpringSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StateRecorder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StateRecorderFilter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StateRecorderImpl.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StaticCompoundShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StaticCompoundShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StreamIn.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StreamInWrapper.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StreamOut.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/StreamOutWrapper.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SubShapeIDCreator.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SubShapeIDPair.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SwingTwistConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintPart.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TaperedCylinderShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TaperedCylinderShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TempAllocator.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TempAllocatorImpl.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TempAllocatorImplWithMallocFallback.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TempAllocatorMalloc.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TrackedVehicleController.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TrackedVehicleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TransformedShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Triangle.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TriangleShape.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TriangleShapeSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TriangleSplitter.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TriangleSplitterBinning.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TriangleSplitterMean.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TwoBodyConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/TwoBodyConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleAntiRollBar.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleCollisionTester.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastCylinder.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastSphere.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterRay.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleConstraint.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleConstraintSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleController.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleDifferentialSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleEngine.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleEngineSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleTrack.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleTrackSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleTransmission.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/VehicleTransmissionSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/Wheel.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheelSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheelSettingsTV.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheelSettingsWV.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheelTV.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheelWV.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheeledVehicleController.gen.cs create mode 100644 Brutal.Jolt/Generated/PInvoke/WheeledVehicleControllerSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/AABBTreeBuilderStats.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/AABox.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/AABoxCast.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/BodyPair.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/BroadPhaseCastResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/CharacterContact.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/CharacterContactKey.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/CharacterContactSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/CollidePointResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/CollideShapeResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/CollisionEstimationResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/ContactManifold.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/ContactSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/IndexedTriangle.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/IndexedTriangleNoMaterial.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/NativeSpanView.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/NativeStridedView.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/PhysicsSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/Plane.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/PointConvexSupport.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/RRayCast.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/RShapeCast.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/RayCast.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/RayCastResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/ShapeCast.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/ShapeCastResult.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/SoftBodyContactSettings.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/SoftBodyVertex.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/SubShapeIDPair.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/Triangle.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/TriangleConvexSupport.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/VehicleAntiRollBar.gen.cs create mode 100644 Brutal.Jolt/Generated/Structs/VehicleDifferentialSettings.gen.cs create mode 100644 Brutal.Jolt/GlobalUsings.cs create mode 100644 Brutal.Jolt/LICENSES/BRUTAL-JOLT-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Jolt/Manual/BodyAddBatch.cs create mode 100644 Brutal.Jolt/Manual/BodyInterface.PrepareAddBodies.cs create mode 100644 Brutal.Jolt/Manual/BodyState.cs create mode 100644 Brutal.Jolt/Manual/ClosestPoint.cs create mode 100644 Brutal.Jolt/Manual/ContactEvent.cs create mode 100644 Brutal.Jolt/Manual/ContactEventListener.cs create mode 100644 Brutal.Jolt/Manual/ContactManifold.cs create mode 100644 Brutal.Jolt/Manual/ConvexObject.cs create mode 100644 Brutal.Jolt/Manual/Handles.cs create mode 100644 Brutal.Jolt/Manual/JoltException.cs create mode 100644 Brutal.Jolt/Manual/NativeArray.cs create mode 100644 Brutal.Jolt/Manual/NativeArrayBlock.cs create mode 100644 Brutal.Jolt/Manual/NativeHandleArray.cs create mode 100644 Brutal.Jolt/Manual/NativeHandleSpan.cs create mode 100644 Brutal.Jolt/Manual/PInvoke.BodyAddBatch.cs create mode 100644 Brutal.Jolt/Manual/PInvoke.ClosestPoint.cs create mode 100644 Brutal.Jolt/Manual/PInvoke.ContactEvents.cs create mode 100644 Brutal.Jolt/Manual/PInvoke.PenetrationDepth.cs create mode 100644 Brutal.Jolt/Manual/PenetrationDepth.cs create mode 100644 Brutal.Ktx/Abstractions/GpuUploadUtils.cs create mode 100644 Brutal.Ktx/Abstractions/KtxAstcParamsPartial.cs create mode 100644 Brutal.Ktx/Abstractions/KtxBasisParamsPartial.cs create mode 100644 Brutal.Ktx/Abstractions/KtxNativeBuffer.cs create mode 100644 Brutal.Ktx/Abstractions/KtxNativeMemory.cs create mode 100644 Brutal.Ktx/Abstractions/KtxTextureExtensions.cs create mode 100644 Brutal.Ktx/Generated/ClassId.gen.cs create mode 100644 Brutal.Ktx/Generated/IterateCallbackDelegate.gen.cs create mode 100644 Brutal.Ktx/Generated/KhrDfModel.gen.cs create mode 100644 Brutal.Ktx/Generated/KhrDfPrimaries.gen.cs create mode 100644 Brutal.Ktx/Generated/KhrDfTransfer.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxAstcParams.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxBasisParams.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxErrorCode.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxFormatSize.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxPackAstcBlockDimension.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxPackAstcQualityLevels.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxPackUastcFlagBits.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxSupercmpScheme.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture1.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture1Handle.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture1Native.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture2.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture2Handle.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTexture2Native.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTextureCreateFlagBits.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTextureCreateInfo.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTextureCreateStorageEnum.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTextureHandle.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTextureNative.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTextureProtected.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTranscodeFlagBits.gen.cs create mode 100644 Brutal.Ktx/Generated/KtxTranscodeFmt.gen.cs create mode 100644 Brutal.Ktx/Generated/Orientation.gen.cs create mode 100644 Brutal.Ktx/Generated/OrientationX.gen.cs create mode 100644 Brutal.Ktx/Generated/OrientationY.gen.cs create mode 100644 Brutal.Ktx/Generated/OrientationZ.gen.cs create mode 100644 Brutal.Ktx/Generated/Strings.gen.cs create mode 100644 Brutal.Ktx/Generated/VkFormat.gen.cs create mode 100644 Brutal.Ktx/LICENSES/BRUTAL-KTX-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Localization/Buffers/FixedMemoryWriterLengthHint.cs create mode 100644 Brutal.Localization/Buffers/IFixedBufferWriter.cs create mode 100644 Brutal.Localization/Buffers/RingBufferWriter.cs create mode 100644 Brutal.Localization/Buffers/TryWriteInterpolatedStringHandlerExtensions.cs create mode 100644 Brutal.Localization/DefaultOptions.cs create mode 100644 Brutal.Localization/LICENSES/BRUTAL-LOCALIZATION-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Localization/LString.Format.cs create mode 100644 Brutal.Localization/LString.Format.gen.cs create mode 100644 Brutal.Localization/LString.cs create mode 100644 Brutal.Localization/LStringGlobalOptions.cs create mode 100644 Brutal.Localization/LStringId.cs create mode 100644 Brutal.Localization/LStrings.cs create mode 100644 Brutal.Localization/LStringsOptions.cs create mode 100644 Brutal.Localization/LocalizedStrings.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXBadRootTagException.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXConvert.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXData.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXFile.RootHeader.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXFile.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXNoAttributeException.cs create mode 100644 Brutal.Localization/Resources/ResX.NET/ResXNoValueException.cs create mode 100644 Brutal.Localization/Resources/ResXReader.cs create mode 100644 Brutal.Localization/Resources/ResXWriter.cs create mode 100644 Brutal.Logging/DefaultCategory.cs create mode 100644 Brutal.Logging/LogCategory.cs create mode 100644 Brutal.Logging/LogString.cs create mode 100644 Brutal.Logging/LogSystem.cs create mode 100644 Brutal.Maths/RandomExtensions.cs create mode 100644 Brutal.Memory/Mem.cs create mode 100644 Brutal.Memory/Partition/IPartitioner.cs create mode 100644 Brutal.Memory/PtrOwner.cs create mode 100644 Brutal.MeshOptimizer/Generated/Enums.cs create mode 100644 Brutal.MeshOptimizer/Generated/MeshOptimizer.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptBounds.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptCoverageStatistics.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptMeshlet.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptOverdrawStatistics.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptStream.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexCacheStatistics.cs create mode 100644 Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexFetchStatistics.cs create mode 100644 Brutal.MeshOptimizer/GlobalUsings.cs create mode 100644 Brutal.MeshOptimizer/LICENSES/BRUTAL-MESHOPTIMIZER-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Monitor.Common/CrashTail.cs create mode 100644 Brutal.Monitor.Common/MonitorFileNames.cs create mode 100644 Brutal.Monitor.Common/ProcessExtension.cs create mode 100644 Brutal.Monitor.Common/ProcessResponseReader.cs create mode 100644 Brutal.Monitor.Common/Shared.cs create mode 100644 Brutal.Monitor.Host/Logging/BackgroundLogWriter.cs create mode 100644 Brutal.Monitor.Host/Logging/MonitorLogger.cs create mode 100644 Brutal.Monitor.Host/Monitor.cs create mode 100644 Brutal.NativeFileDialog/LICENSES/BRUTAL-NATIVEFILEDIALOG-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.NativeFileDialog/NativeFileDialog.cs create mode 100644 Brutal.NativeFileDialog/NativeFileDialogTypes.cs create mode 100644 Brutal.NotCurses/Generated/Constants.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcAlign.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcAlpha.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcBlitter.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcBoxOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcDirectOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcInType.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcKeyModifier.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcLogLevel.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcMenuOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcMiceEvent.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcPixelImpl.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcPlaneOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcPlotOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcProgbarOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcReaderOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcReelOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcScale.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcStyle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcTabbedOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NcVisualOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Enums/NotCursesOption.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcDPlotHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcDirectHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcFadectxHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcFdPlaneHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcMenuHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcMultiSelectorHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcPlaneHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcProgBarHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcReaderHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcReelHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcSelectorHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcSubProcHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcTabHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcTabbedHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcTabletHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcTreeHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcUPlotHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NcVisualHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/Handles/NotCursesHandle.gen.cs create mode 100644 Brutal.NotCurses/Generated/NotCurses.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcCapabilities.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcCell.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcFdPlaneOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcInput.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcMSelectorItem.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcMenuItem.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcMenuOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcMenuSection.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcMultiSelectorOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcPalette.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcPlaneOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcPlotOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcProgBarOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcReaderOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcReelOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcSelectorItem.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcSelectorOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcStats.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcSubProcOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcTabbedOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcTreeItem.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcTreeOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcVGeom.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NcVisualOptions.gen.cs create mode 100644 Brutal.NotCurses/Generated/Structs/NotCursesOptions.gen.cs create mode 100644 Brutal.NotCurses/LICENSES/BRUTAL-NOTCURSES-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.NotCurses/NcDirectHandle.cs create mode 100644 Brutal.NotCurses/NcResultException.cs create mode 100644 Brutal.NotCurses/NcVisualHandle.cs create mode 100644 Brutal.NotCurses/NotCurses.cs create mode 100644 Brutal.NotCurses/NotCursesHandle.cs create mode 100644 Brutal.NotCurses/ScratchBuffer.cs create mode 100644 Brutal.NotCurses/TimeSpec.cs create mode 100644 Brutal.Numerics/Color/Color.Preset.cs create mode 100644 Brutal.Numerics/Color/Color.cs create mode 100644 Brutal.Numerics/GlobalUsings.cs create mode 100644 Brutal.Numerics/Matrix/IMatrix.cs create mode 100644 Brutal.Numerics/Matrix/Unsupported.double.cs create mode 100644 Brutal.Numerics/Matrix/Unsupported.float.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.access.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.equality.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.format.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.numerics.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.operators.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.pack.gen.cs create mode 100644 Brutal.Numerics/Matrix/double3x2/double3x2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.access.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.equality.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.format.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.operators.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.pack.gen.cs create mode 100644 Brutal.Numerics/Matrix/double4x4/double4x4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.access.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.equality.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.format.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.numerics.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.operators.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.pack.gen.cs create mode 100644 Brutal.Numerics/Matrix/float3x2/float3x2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.access.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.equality.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.format.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.numerics.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.operators.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.pack.gen.cs create mode 100644 Brutal.Numerics/Matrix/float4x4/float4x4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Packing/MatrixPack.cs create mode 100644 Brutal.Numerics/Packing/PackUtils.cs create mode 100644 Brutal.Numerics/Packing/QuaternionPack.cs create mode 100644 Brutal.Numerics/Packing/VectorPack.cs create mode 100644 Brutal.Numerics/Plane/IPlane.cs create mode 100644 Brutal.Numerics/Plane/doublePlane/doublePlane.gen.cs create mode 100644 Brutal.Numerics/Plane/doublePlane/doublePlane.numerics.gen.cs create mode 100644 Brutal.Numerics/Plane/floatPlane/floatPlane.gen.cs create mode 100644 Brutal.Numerics/Plane/floatPlane/floatPlane.numerics.gen.cs create mode 100644 Brutal.Numerics/Quaternion/IQuaternion.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.copy.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.equality.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.format.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math-metric.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.numerics.gen.cs create mode 100644 Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.pack.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.copy.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.equality.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.format.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.math-metric.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.math.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.numerics.gen.cs create mode 100644 Brutal.Numerics/Quaternion/floatQuat/floatQuat.pack.gen.cs create mode 100644 Brutal.Numerics/Rect/doubleRect/doubleRect.gen.cs create mode 100644 Brutal.Numerics/Rect/floatRect/floatRect.gen.cs create mode 100644 Brutal.Numerics/StringHelpers.cs create mode 100644 Brutal.Numerics/Vector/IVector.cs create mode 100644 Brutal.Numerics/Vector/NumberConversion.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.gen.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.math.gen.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/bool2/bool2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/bool3/bool3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.math.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/bool4/bool4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/byte2/byte2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.color.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/byte3/byte3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.color.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/byte4/byte4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.math.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.numerics-floating.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/double2/double2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.numerics-floating.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/double3/double3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.math.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.numerics-floating.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/double4/double4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.math.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.numerics-floating.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/float2/float2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.color.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.numerics-floating.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/float3/float3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.color.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.math.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.numerics-floating.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/float4/float4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/int2/int2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/int3/int3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/int4/int4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/long2/long2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/long3/long3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/long4/long4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte2/sbyte2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte3/sbyte3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/sbyte4/sbyte4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/short2/short2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/short3/short3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/short4/short4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/uint2/uint2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/uint3/uint3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/uint4/uint4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong2/ulong2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong3/ulong3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/ulong4/ulong4.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.format.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort2/ushort2.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.color.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.format.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.math.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort3/ushort3.swizzle.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.color.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.copy.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.equality.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.format.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.math-metric.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.numerics-binary.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.numerics.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.pack.gen.cs create mode 100644 Brutal.Numerics/Vector/ushort4/ushort4.swizzle.gen.cs create mode 100644 Brutal.Numerics/VectorShuffle2.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.Constants.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.Ext.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.Getters.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.Listener.Properties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.ObjectNames.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.PInvoke.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Al.Verbs.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.ObjectName.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.Properties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlBuffer.ObjectName.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlBuffer.Properties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlDebug.ObjectLabels.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlEffect.ObjectName.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlEffect.Properties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlFilter.ObjectName.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlFilter.Properties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlSource.ObjectName.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlSource.Properties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/AlSource.Verbs.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/AutowahEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/BandpassFilter.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/ChorusEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/CompressorEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/DedicatedDialogueEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/DedicatedLowFrequencyEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/DistortionEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/EaxReverbEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/EchoEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/Efx.Creates.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/Efx.ObjectNames.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/EfxParams.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/EqualizerEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/FlangerEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/FrequencyShifterEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/HighpassFilter.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/LowpassFilter.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/PitchShifterEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/ReverbEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/ReverbPreset.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/ReverbProperties.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/RingModulatorEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Efx/VocalMorpherEffect.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicLayout.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicScaling.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlAutowahf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlBandpassf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlBufferi.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlChorusWaveform.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlChorusf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlChorusi.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlCompressori.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDebugSeverity.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDebugSource.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDebugType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDedicatedDialoguef.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDedicatedLowFrequencyEffectf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDirectChannelsMode.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDistanceModel.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlDistortionf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEaxReverb3f.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbi.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEchof.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEffectType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEqualizerf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlError.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlEventType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFilterType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFlangerWaveform.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFlangerf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFlangeri.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFormat.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterDirection.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifteri.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlGetString.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlHighpassf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlListener3f.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlListenerf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlLowpassf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlObjectLabelIdentifier.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlPitchShifteri.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlReverbf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlReverbi.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorWaveform.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlRingModulatori.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSource3f.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSourceState.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSourceType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSourced.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSourcef.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSourcei.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSourcei64.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlSpatializeMode.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlStereoMode.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherPhoneme.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherWaveform.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherf.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpheri.gen.cs create mode 100644 Brutal.OpenAl/Generated/Al/Params.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Alc.Constants.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Alc.Ext.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Alc.PInvoke.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicLayout.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicScaling.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcChannelLayout.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcContextAttribute.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcDeviceType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcError.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcEventType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcGetString.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcHrtfStatus.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcInteger.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcOutputMode.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Enums/AlcSampleType.gen.cs create mode 100644 Brutal.OpenAl/Generated/Alc/Handles.gen.cs create mode 100644 Brutal.OpenAl/GlobalUsings.cs create mode 100644 Brutal.OpenAl/LICENSES/BRUTAL-OPENAL-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.OpenAl/LICENSES/openal-soft-BSD-3Clause.txt create mode 100644 Brutal.OpenAl/LICENSES/openal-soft-COPYING.txt create mode 100644 Brutal.OpenAl/LICENSES/openal-soft-LICENSE-pffft.txt create mode 100644 Brutal.OpenAl/LICENSES/openal-soft-fmt-LICENSE.txt create mode 100644 Brutal.OpenAl/LICENSES/openal-soft-gsl-LICENSE.txt create mode 100644 Brutal.OpenAl/Manual/Al.Listener.cs create mode 100644 Brutal.OpenAl/Manual/Al.Wrapper.Internal.cs create mode 100644 Brutal.OpenAl/Manual/Al.Wrapper.cs create mode 100644 Brutal.OpenAl/Manual/Al.cs create mode 100644 Brutal.OpenAl/Manual/AlAuxiliaryEffectSlot.cs create mode 100644 Brutal.OpenAl/Manual/AlBuffer.cs create mode 100644 Brutal.OpenAl/Manual/AlDebug.Internal.cs create mode 100644 Brutal.OpenAl/Manual/AlDebug.cs create mode 100644 Brutal.OpenAl/Manual/AlSource.Ext.cs create mode 100644 Brutal.OpenAl/Manual/AlSource.cs create mode 100644 Brutal.OpenAl/Manual/Alc.Wrapper.Internal.cs create mode 100644 Brutal.OpenAl/Manual/Alc.Wrapper.cs create mode 100644 Brutal.OpenAl/Manual/Alc.cs create mode 100644 Brutal.OpenAl/Manual/Callbacks.Internal.cs create mode 100644 Brutal.OpenAl/Manual/Callbacks.cs create mode 100644 Brutal.OpenAl/Manual/CaptureDevice.Internal.cs create mode 100644 Brutal.OpenAl/Manual/CaptureDevice.cs create mode 100644 Brutal.OpenAl/Manual/Context.Internal.cs create mode 100644 Brutal.OpenAl/Manual/Context.cs create mode 100644 Brutal.OpenAl/Manual/Device.cs create mode 100644 Brutal.OpenAl/Manual/Efx.Internal.cs create mode 100644 Brutal.OpenAl/Manual/Efx.cs create mode 100644 Brutal.OpenAl/Manual/Errors.cs create mode 100644 Brutal.OpenAl/Manual/Extensions.cs create mode 100644 Brutal.OpenAl/Manual/LoopbackDevice.cs create mode 100644 Brutal.OpenAl/Manual/NativeLoader.cs create mode 100644 Brutal.OpenAl/Manual/Params.cs create mode 100644 Brutal.OpenAl/Manual/StringUtils.cs create mode 100644 Brutal.OpenAl/Manual/Utf8Buffer.cs create mode 100644 Brutal.OpenGl/Constants.gen.cs create mode 100644 Brutal.OpenGl/Glad.cs create mode 100644 Brutal.OpenGl/Glad.gen.cs create mode 100644 Brutal.OpenGl/LICENSES/BRUTAL-OPENGL-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.OpenGl/Loader.gen.cs create mode 100644 Brutal.OpenGl/OpenGl.cs create mode 100644 Brutal.OpenGl/OpenGl.gen.cs create mode 100644 Brutal.OpenGl/Types/GlAttribute.cs create mode 100644 Brutal.OpenGl/Types/GlBehavior.cs create mode 100644 Brutal.OpenGl/Types/GlBindTarget.cs create mode 100644 Brutal.OpenGl/Types/GlBitfield.cs create mode 100644 Brutal.OpenGl/Types/GlBuffer.cs create mode 100644 Brutal.OpenGl/Types/GlBufferUsage.cs create mode 100644 Brutal.OpenGl/Types/GlCapability.cs create mode 100644 Brutal.OpenGl/Types/GlClearBit.cs create mode 100644 Brutal.OpenGl/Types/GlEnum.cs create mode 100644 Brutal.OpenGl/Types/GlFace.cs create mode 100644 Brutal.OpenGl/Types/GlFramebuffer.cs create mode 100644 Brutal.OpenGl/Types/GlFrontFace.cs create mode 100644 Brutal.OpenGl/Types/GlFunc.cs create mode 100644 Brutal.OpenGl/Types/GlGetProcAddressFunc.cs create mode 100644 Brutal.OpenGl/Types/GlHint.cs create mode 100644 Brutal.OpenGl/Types/GlIndexType.cs create mode 100644 Brutal.OpenGl/Types/GlLogicOp.cs create mode 100644 Brutal.OpenGl/Types/GlPipeline.cs create mode 100644 Brutal.OpenGl/Types/GlProgram.cs create mode 100644 Brutal.OpenGl/Types/GlQuery.cs create mode 100644 Brutal.OpenGl/Types/GlRenderbuffer.cs create mode 100644 Brutal.OpenGl/Types/GlSampler.cs create mode 100644 Brutal.OpenGl/Types/GlScaling.cs create mode 100644 Brutal.OpenGl/Types/GlShader.cs create mode 100644 Brutal.OpenGl/Types/GlShaderType.cs create mode 100644 Brutal.OpenGl/Types/GlStencilOp.cs create mode 100644 Brutal.OpenGl/Types/GlSync.cs create mode 100644 Brutal.OpenGl/Types/GlTexture.cs create mode 100644 Brutal.OpenGl/Types/GlTopology.cs create mode 100644 Brutal.OpenGl/Types/GlVertexArray.cs create mode 100644 Brutal.OpenGl/Types/GlVertexAttribute.cs create mode 100644 Brutal.RakNet/Generated/Classes/AddressOrGUID.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/AddressSystemAddress.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/InAddr.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/Packet.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/PublicKey.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/RNS2EventHandler.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/RakNetGUID.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/RakNetLibrary.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/RakNetSocket2.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/RakNetStatistics.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/SUnBSUnInAddr.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/SUnInAddr.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/SUnWSUnInAddr.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/SockaddrIn.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/SocketDescriptor.gen.cs create mode 100644 Brutal.RakNet/Generated/Classes/SystemAddress.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/ConnectionAttemptResult.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/ConnectionState.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/DefaultMessageIDTypes.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/PacketPriority.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/PacketReliability.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/PublicKeyMode.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/RNS2Type.gen.cs create mode 100644 Brutal.RakNet/Generated/Enums/StartupResult.gen.cs create mode 100644 Brutal.RakNet/Generated/Handles/RakPeerInstance.gen.cs create mode 100644 Brutal.RakNet/Generated/Libraries/RakPeerInterface.gen.cs create mode 100644 Brutal.RakNet/LICENSES/BRUTAL-RAKNET-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.RakNet/Manual/APIPartials/AddressOrGuid.cs create mode 100644 Brutal.RakNet/Manual/APIPartials/RakNetGuid.cs create mode 100644 Brutal.RakNet/Manual/APIPartials/SockaddrIn.cs create mode 100644 Brutal.RakNet/Manual/APIPartials/SocketDescriptor.cs create mode 100644 Brutal.RakNet/Manual/APIPartials/SystemAddress.cs create mode 100644 Brutal.RakNet/Manual/Utility/Stream.cs create mode 100644 Brutal.RakNet/Manual/Utility/Time.cs create mode 100644 Brutal.Render.Mesh/Mesh.cs create mode 100644 Brutal.Render.Mesh/ProcGenMesh.Primitives.cs create mode 100644 Brutal.Render.Mesh/ProcGenMesh.cs create mode 100644 Brutal.RenderDoc.ImGui/GlobalUsings.cs create mode 100644 Brutal.RenderDoc.ImGui/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.RenderDoc.ImGui/RenderDocWindow.cs create mode 100644 Brutal.RenderDoc/Generated/CaptureOptions.gen.cs create mode 100644 Brutal.RenderDoc/Generated/Enums/ApiVersions.gen.cs create mode 100644 Brutal.RenderDoc/Generated/Enums/CaptureOption.gen.cs create mode 100644 Brutal.RenderDoc/Generated/Enums/InputButton.gen.cs create mode 100644 Brutal.RenderDoc/Generated/Enums/OverlayBits.gen.cs create mode 100644 Brutal.RenderDoc/Generated/RenderDoc.gen.cs create mode 100644 Brutal.RenderDoc/Generated/Structs/RenderDocApi.gen.cs create mode 100644 Brutal.RenderDoc/GlobalUsings.cs create mode 100644 Brutal.RenderDoc/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.RenderDoc/Manual/Logger.cs create mode 100644 Brutal.RenderDoc/Manual/RenderDoc.manual.cs create mode 100644 Brutal.RenderDoc/Manual/Typedefs.manual.cs create mode 100644 Brutal.Sdl.Image/Generated/Enums/ImgAnimationDecoderStatus.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/Libraries/SdlImage.Ergonomic.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/SdlImage.Constants.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/SdlImage.Delegates.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/SdlImage.HandleMethods.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/SdlImage.Handles.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/SdlImage.PInvoke.gen.cs create mode 100644 Brutal.Sdl.Image/Generated/SdlImage.Structs.gen.cs create mode 100644 Brutal.Sdl.Image/GlobalUsings.cs create mode 100644 Brutal.Sdl.Image/LICENSES/BRUTAL-SDL-IMAGE-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Sdl.Image/SdlImage.cs create mode 100644 Brutal.Sdl.Mixer/Generated/Libraries/SdlMixer.Ergonomic.gen.cs create mode 100644 Brutal.Sdl.Mixer/Generated/SdlMixer.Constants.gen.cs create mode 100644 Brutal.Sdl.Mixer/Generated/SdlMixer.Delegates.gen.cs create mode 100644 Brutal.Sdl.Mixer/Generated/SdlMixer.HandleMethods.gen.cs create mode 100644 Brutal.Sdl.Mixer/Generated/SdlMixer.Handles.gen.cs create mode 100644 Brutal.Sdl.Mixer/Generated/SdlMixer.PInvoke.gen.cs create mode 100644 Brutal.Sdl.Mixer/Generated/SdlMixer.Structs.gen.cs create mode 100644 Brutal.Sdl.Mixer/GlobalUsings.cs create mode 100644 Brutal.Sdl.Mixer/LICENSES/BRUTAL-SDL-MIXER-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Sdl.Mixer/Manual/ExceptionAggregator.cs create mode 100644 Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Callbacks.cs create mode 100644 Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Init.cs create mode 100644 Brutal.Sdl.Mixer/SdlMixer.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfDirection.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfDrawCommand.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfFontStyleFlags.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfGpuTextEngineWinding.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfHintingFlags.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfHorizontalAlignment.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfImageType.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Enums/TtfSubStringFlags.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/Libraries/SdlTtf.Ergonomic.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/SdlTtf.Constants.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/SdlTtf.Delegates.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/SdlTtf.HandleMethods.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/SdlTtf.Handles.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/SdlTtf.PInvoke.gen.cs create mode 100644 Brutal.Sdl.Ttf/Generated/SdlTtf.Structs.gen.cs create mode 100644 Brutal.Sdl.Ttf/GlobalUsings.cs create mode 100644 Brutal.Sdl.Ttf/LICENSES/BRUTAL-SDL-TTF-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Sdl.Ttf/SdlTtf.cs create mode 100644 Brutal.Sdl/CustomStringMarshaller.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlAppResult.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlArrayOrder.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlAssertState.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlAsyncIOResult.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlAsyncIOTaskType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlAudioFormat.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlBitmapOrder.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlBlendFactor.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlBlendOperation.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlCameraPermissionState.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlCameraPosition.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlCapitalization.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlChromaLocation.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlColorPrimaries.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlColorRange.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlColorType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlColorspace.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlDateFormat.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlDisplayOrientation.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlEnumerationResult.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlEventAction.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlEventType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlFileDialogType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlFlashOperation.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlFlipMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlFolder.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGLAttr.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGamepadAxis.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGamepadBindingType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGamepadButton.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGamepadButtonLabel.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGamepadType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGlobFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuBlendFactor.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuBlendOp.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuBufferUsageFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuColorComponentFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuCompareOp.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuCubeMapFace.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuCullMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuFillMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuFilter.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuFrontFace.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuIndexElementSize.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuLoadOp.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuPresentMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuPrimitiveType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuSampleCount.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuSamplerAddressMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuSamplerMipmapMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuShaderStage.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuStencilOp.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuStoreOp.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuSwapchainComposition.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuTextureFormat.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuTextureType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuTextureUsageFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuTransferBufferUsage.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuVertexElementFormat.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlGpuVertexInputRate.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlHidBusType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlHintPriority.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlHitTestResult.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlIOStatus.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlIOWhence.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlInitFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlInitStatus.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlJoystickConnectionState.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlJoystickType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlKeycode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlLogCategory.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlLogPriority.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlMatrixCoefficients.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlMessageBoxButtonFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlMessageBoxColorType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlMessageBoxFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlMouseButtonFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlMouseWheelDirection.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPackedLayout.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPackedOrder.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPathType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPenAxis.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPenDeviceType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPenInputFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPixelFormat.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPixelType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPowerState.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlProcessIO.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlProgressState.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlPropertyType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlRendererLogicalPresentation.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlSandbox.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlScaleMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlScancode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlSensorType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlSurfaceFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlSystemCursor.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlSystemTheme.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTextInputType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTextureAccess.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTextureAddressMode.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlThreadPriority.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlThreadState.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTimeFormat.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTouchDeviceType.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTransferCharacteristics.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlTrayEntryFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Enums/SdlWindowFlags.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Events.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Gamepad.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Init.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Joystick.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Keyboard.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Mouse.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Render.gen.cs create mode 100644 Brutal.Sdl/Generated/Libraries/Sdl.Video.gen.cs create mode 100644 Brutal.Sdl/Generated/Sdl.Constants.gen.cs create mode 100644 Brutal.Sdl/Generated/Sdl.Delegates.gen.cs create mode 100644 Brutal.Sdl/Generated/Sdl.HandleMethods.gen.cs create mode 100644 Brutal.Sdl/Generated/Sdl.Handles.gen.cs create mode 100644 Brutal.Sdl/Generated/Sdl.PInvoke.gen.cs create mode 100644 Brutal.Sdl/Generated/Sdl.Structs.gen.cs create mode 100644 Brutal.Sdl/GlobalUsings.cs create mode 100644 Brutal.Sdl/LICENSES/BRUTAL-SDL-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Sdl/Manual/Libraries/Sdl.Events.cs create mode 100644 Brutal.Sdl/Manual/Libraries/Sdl.Gamepad.cs create mode 100644 Brutal.Sdl/Manual/Libraries/Sdl.Init.cs create mode 100644 Brutal.Sdl/Manual/Libraries/Sdl.Keyboard.cs create mode 100644 Brutal.Sdl/Manual/Libraries/Sdl.Log.cs create mode 100644 Brutal.Sdl/Manual/Libraries/Sdl.Vulkan.cs create mode 100644 Brutal.Sdl/Manual/Sdl.PInvoke.cs create mode 100644 Brutal.Sdl/Manual/SdlGamepadBinding.cs create mode 100644 Brutal.Sdl/Sdl.cs create mode 100644 Brutal.Sdl/SdlException.cs create mode 100644 Brutal.ShaderC/BespokeUtf8Encoder.cs create mode 100644 Brutal.ShaderC/Generated/Enumerations.gen.cs create mode 100644 Brutal.ShaderC/Generated/ShaderC.gen.cs create mode 100644 Brutal.ShaderC/Generated/Structs.gen.cs create mode 100644 Brutal.ShaderC/GlobalUsings.cs create mode 100644 Brutal.ShaderC/HighLevel.cs create mode 100644 Brutal.ShaderC/LICENSES/BRUTAL-SHADERC-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.ShaderC/ShaderC.cs create mode 100644 Brutal.ShaderC/ShaderKindInference.cs create mode 100644 Brutal.ShaderC/Types/CompileOptions.cs create mode 100644 Brutal.ShaderC/Types/Delegates.cs create mode 100644 Brutal.ShaderC/Utilities/Callbacks.cs create mode 100644 Brutal.ShaderC/Utilities/ShaderException.cs create mode 100644 Brutal.Slang/Generated/Classes.gen.cs create mode 100644 Brutal.Slang/Generated/Constants.gen.cs create mode 100644 Brutal.Slang/Generated/Enumerations.gen.cs create mode 100644 Brutal.Slang/Generated/GlobalUsings.gen.cs create mode 100644 Brutal.Slang/Generated/Interfaces.gen.cs create mode 100644 Brutal.Slang/Generated/InterfacesExt.gen.cs create mode 100644 Brutal.Slang/Generated/Slang.gen.cs create mode 100644 Brutal.Slang/Generated/Structs.gen.cs create mode 100644 Brutal.Slang/GlobalUsings.cs create mode 100644 Brutal.Slang/ICompileRequestExtensions.cs create mode 100644 Brutal.Slang/IGlobalSessionExtensions.cs create mode 100644 Brutal.Slang/ISessionExtensions.cs create mode 100644 Brutal.Slang/ISlangBlobExtensions.cs create mode 100644 Brutal.Slang/LICENSES/BRUTAL-SLANG-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Slang/Result.cs create mode 100644 Brutal.Slang/Slang.cs create mode 100644 Brutal.Slang/SlangException.cs create mode 100644 Brutal.Stb/DataType.cs create mode 100644 Brutal.Stb/LICENSES/BRUTAL-STB-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Stb/Stb.cs create mode 100644 Brutal.Stb/StbImage16.cs create mode 100644 Brutal.Stb/StbImage8.cs create mode 100644 Brutal.Stb/StbImageF.cs create mode 100644 Brutal.Strings/ByteSpanDebugView.cs create mode 100644 Brutal.Strings/GlobalUsings.cs create mode 100644 Brutal.Strings/IString.cs create mode 100644 Brutal.Strings/IString8.cs create mode 100644 Brutal.Strings/RefString8Array.cs create mode 100644 Brutal.Strings/SpanExtensions.cs create mode 100644 Brutal.Strings/String8/RefString8.cs create mode 100644 Brutal.Strings/String8/RefString8Marshaller.cs create mode 100644 Brutal.Strings/String8/String8.cs create mode 100644 Brutal.Strings/String8/String8Extensions.Comparison.cs create mode 100644 Brutal.Strings/String8/String8Extensions.Searching.cs create mode 100644 Brutal.Strings/StringBuilder/StringBuilder.Append.cs create mode 100644 Brutal.Strings/StringBuilder/StringBuilder.Interpolation.cs create mode 100644 Brutal.Strings/StringBuilder/StringBuilder.cs create mode 100644 Brutal.Strings/StringBuilder/StringBuilderPool.cs create mode 100644 Brutal.Strings/StringBuilder/StringBuilderUtility.cs create mode 100644 Brutal.Strings/StringBuilder/ValueStringBuilder.Append.gen.cs create mode 100644 Brutal.Strings/StringBuilder/ValueStringBuilder.Interpolation.cs create mode 100644 Brutal.Strings/StringBuilder/ValueStringBuilder.cs create mode 100644 Brutal.Strings/Unicode/Unicode.cs create mode 100644 Brutal.Strings/Unicode/Utf.cs create mode 100644 Brutal.Strings/Unicode/Utf16.TryFormat.cs create mode 100644 Brutal.Strings/Unicode/Utf16.cs create mode 100644 Brutal.Strings/Unicode/Utf16Formatter.cs create mode 100644 Brutal.Strings/Unicode/Utf8.TryFormat.cs create mode 100644 Brutal.Strings/Unicode/Utf8.cs create mode 100644 Brutal.Strings/Utf8Path.cs create mode 100644 Brutal.Texture.Abstractions/Extensions/TextureFormatExtensions.cs create mode 100644 Brutal.Texture.Abstractions/Format/FormatDescriptor.cs create mode 100644 Brutal.Texture.Abstractions/ITextureImplementations/GenericTexture.cs create mode 100644 Brutal.Texture.Abstractions/Layout/BlockCount3.cs create mode 100644 Brutal.Texture.Abstractions/Layout/ImageExtent.cs create mode 100644 Brutal.Texture.Abstractions/Layout/TextureImageMemoryLayout.cs create mode 100644 Brutal.Texture.Abstractions/Layout/TextureMemoryLayout.cs create mode 100644 Brutal.Texture.Abstractions/Upload/StageUploadRegions.cs create mode 100644 Brutal.Texture.Abstractions/Upload/StagingRegion.cs create mode 100644 Brutal.Texture.Abstractions/Upload/UploadRegion.cs create mode 100644 Brutal.Texture.Abstractions/Upload/UploadRegions.cs create mode 100644 Brutal.Texture/DerivedTexturePropertiesExtensions.cs create mode 100644 Brutal.Texture/Gli/GliConversionUtils.cs create mode 100644 Brutal.Texture/Gli/GliFormatExtensions.cs create mode 100644 Brutal.Texture/Gli/GliTexture.cs create mode 100644 Brutal.Texture/Gli/GliTextureException.cs create mode 100644 Brutal.Texture/Gli/GliTextureLoader.cs create mode 100644 Brutal.Texture/Gli/GliTextureSaveException.cs create mode 100644 Brutal.Texture/Gli/GliTextureWriter.cs create mode 100644 Brutal.Texture/ITexture.cs create mode 100644 Brutal.Texture/Ktx/KtxConverter.cs create mode 100644 Brutal.Texture/Ktx/KtxTexture.cs create mode 100644 Brutal.Texture/Ktx/KtxTextureException.cs create mode 100644 Brutal.Texture/Ktx/KtxTextureLoader.cs create mode 100644 Brutal.Texture/Ktx/KtxTextureWriter.cs create mode 100644 Brutal.Texture/Resources/ResourceTracker.cs create mode 100644 Brutal.Texture/Resources/StackTraceFormatting.cs create mode 100644 Brutal.Texture/ScopedTexture.cs create mode 100644 Brutal.Texture/Stb/StbDataTypeExtensions.cs create mode 100644 Brutal.Texture/Stb/StbTexture.cs create mode 100644 Brutal.Texture/Stb/StbTexture16.cs create mode 100644 Brutal.Texture/Stb/StbTexture8.cs create mode 100644 Brutal.Texture/Stb/StbTextureException.cs create mode 100644 Brutal.Texture/Stb/StbTextureF.cs create mode 100644 Brutal.Texture/Stb/StbTextureLoader.cs create mode 100644 Brutal.Texture/Stb/StbTextureReadException.cs create mode 100644 Brutal.Texture/Stb/StbTextureWriter.cs create mode 100644 Brutal.Texture/TexelCount3.cs create mode 100644 Brutal.Texture/TextureDescriptor.cs create mode 100644 Brutal.Texture/TextureException.cs create mode 100644 Brutal.Texture/TextureFormat.cs create mode 100644 Brutal.Texture/TextureLoadSettings.cs create mode 100644 Brutal.Texture/TextureLoader.cs create mode 100644 Brutal.Texture/TextureWriter.cs create mode 100644 Brutal.Vulkan.Abstractions/Allocator/Allocation.cs create mode 100644 Brutal.Vulkan.Abstractions/Allocator/IAllocator.cs create mode 100644 Brutal.Vulkan.Abstractions/Allocator/IBufferAllocator.cs create mode 100644 Brutal.Vulkan.Abstractions/Allocator/IGlobalAllocator.cs create mode 100644 Brutal.Vulkan.Abstractions/Allocator/IImageAllocator.cs create mode 100644 Brutal.Vulkan.Abstractions/BufferEx.cs create mode 100644 Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs create mode 100644 Brutal.Vulkan.Abstractions/DebugNameExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/DescriptorPoolEx.cs create mode 100644 Brutal.Vulkan.Abstractions/DescriptorSetLayoutEx.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/ByteSizeExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/CommandBufferExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/DeviceExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/DisposableExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/FormatExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/InstanceExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/MapInfo.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/PhysicalDeviceExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/QueueExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/ShaderModuleExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/Extensions/SubresourceExtensions.cs create mode 100644 Brutal.Vulkan.Abstractions/FrameResources.cs create mode 100644 Brutal.Vulkan.Abstractions/GlobalUsings.cs create mode 100644 Brutal.Vulkan.Abstractions/IBindBuffer.cs create mode 100644 Brutal.Vulkan.Abstractions/IDescriptorSetWrapper.cs create mode 100644 Brutal.Vulkan.Abstractions/IImageView.cs create mode 100644 Brutal.Vulkan.Abstractions/IMappable.cs create mode 100644 Brutal.Vulkan.Abstractions/ImageEx.cs create mode 100644 Brutal.Vulkan.Abstractions/ImageViewEx.cs create mode 100644 Brutal.Vulkan.Abstractions/LICENSES/BRUTAL-VULKAN-ABSTRACTIONS-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Vulkan.Abstractions/MappedMemory.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Buffer/BinaryTreeBufferPartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Buffer/BufferPartitionInfo.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Buffer/IBufferPartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Buffer/LinearBufferPartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Image/Atlas2DPartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Image/IImageViewPartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Image/ImageStagingRange.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Image/ImageViewPartitionInfo.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Image/QuadTreePartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Partitioner/Image/TextureArrayPartitioner.cs create mode 100644 Brutal.Vulkan.Abstractions/Presets.cs create mode 100644 Brutal.Vulkan.Abstractions/Shaders/ShaderStages.cs create mode 100644 Brutal.Vulkan.Abstractions/StagingPool.cs create mode 100644 Brutal.Vulkan.Abstractions/SyncObjects.cs create mode 100644 Brutal.Vulkan.Abstractions/VertexInput.cs create mode 100644 Brutal.Vulkan.Abstractions/VulkanDeviceInfo.cs create mode 100644 Brutal.Vulkan.Abstractions/VulkanHelpers.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Globals.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/InlineArrays.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocationCreateFlags.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocatorCreateFlags.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationFlags.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationMoveOperation.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaMemoryUsage.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaPoolCreateFlags.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualAllocationCreateFlags.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualBlockCreateFlags.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Handles/VmaAllocation.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Handles/VmaDefragmentationContext.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Handles/VmaPool.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualAllocation.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualBlock.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationCreateInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo2.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorCreateInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaBudget.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationMove.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationPassMoveInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationStats.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDetailedStatistics.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDeviceMemoryCallbacks.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaPoolCreateInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaStatistics.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaTotalStatistics.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationCreateInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualBlockCreateInfo.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVulkanFunctions.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/Vma.gen.cs create mode 100644 Brutal.Vulkan.Vma/Generated/VmaAllocatorEx.gen.cs create mode 100644 Brutal.Vulkan.Vma/GlobalUsings.cs create mode 100644 Brutal.Vulkan.Vma/LICENSES/BRUTAL-VULKAN-VMA-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Vulkan.Vma/Manual/VmaAllocator.cs create mode 100644 Brutal.Vulkan.Vma/Manual/VmaDeviceExtensions.cs create mode 100644 Brutal.Vulkan/AssemblyInfo.cs create mode 100644 Brutal.Vulkan/BitFields.cs create mode 100644 Brutal.Vulkan/Generated/Constants/VK.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/Platforms/VkExportMetalObjectTypeFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/Platforms/VkFullScreenExclusiveEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1ChromaSamplePosition.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1ColorPrimaries.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameRestorationType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1InterpolationFilter.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1Level.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1MatrixCoefficients.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1Profile.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1ReferenceName.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1TransferCharacteristics.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoAV1TxMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoDecodeH264FieldOrderCount.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264AspectRatioIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264CabacInitIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264ChromaFormatIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264DisableDeblockingFilterIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264LevelIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264MemMgmtControlOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264ModificationOfPicNumsIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264NonVclNaluType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264PictureType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264PocType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264ProfileIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264SliceType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH264WeightedBipredIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH265AspectRatioIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH265ChromaFormatIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH265LevelIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH265PictureType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH265ProfileIdc.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoH265SliceType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoVP9ColorSpace.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoVP9FrameType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoVP9InterpolationFilter.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoVP9Level.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoVP9Profile.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/StdVideoVP9ReferenceName.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureBuildTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCompatibilityKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCreateFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMemoryRequirementsTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMotionInstanceTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureSerializedBlockTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccelerationStructureTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccessFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccessFlags2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAccessFlags3KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAcquireProfilingLockFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAddressCommandFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAddressCopyFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAntiLagModeAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAntiLagStageAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAttachmentDescriptionFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAttachmentLoadOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkAttachmentStoreOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBlendFactor.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBlendOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBlendOverlapEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBlockMatchWindowCompareModeQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBorderColor.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBufferCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBuildMicromapFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkBuildMicromapModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkChromaLocation.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureAddressResolutionFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureClusterFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureGeometryFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureIndexFormatFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpModeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCoarseSampleOrderTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkColorComponentFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkColorSpaceKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCommandBufferLevel.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCommandBufferResetFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCommandBufferUsageFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCommandPoolCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCommandPoolResetFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCompareOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkComponentSwizzle.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkComponentTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCompositeAlphaFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkConditionalRenderingFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkConservativeRasterizationModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCooperativeVectorMatrixLayoutNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCopyAccelerationStructureModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCopyMicromapModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCoverageModulationModeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCoverageReductionModeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCubicFilterWeightsQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkCullModeFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphModelCacheTypeQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowCreateFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowExecuteFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowGridSizeFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowImageUsageFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowPerformanceLevelARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeConnectionTypeARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeTypeARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphPipelinePropertyARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointTypeARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionCreateFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphTosaLevelARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDataGraphTosaQualityFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDebugReportFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDebugReportObjectTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageSeverityFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageTypeFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDefaultVertexAttributeValueKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDependencyFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDepthBiasRepresentationEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDepthClampModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDescriptorBindingFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDescriptorMappingSourceEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDescriptorPoolCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDescriptorSetLayoutCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDescriptorType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDescriptorUpdateTemplateType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceDiagnosticsConfigFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceEventTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceFaultAddressTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceFaultFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceFaultVendorBinaryHeaderVersionKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceGroupPresentModeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceMemoryReportEventTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDeviceQueueCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDirectDriverLoadingModeLUNARG.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDiscardRectangleModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDisplayEventTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDisplayPlaneAlphaFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDisplayPowerStateEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDisplaySurfaceStereoTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDriverId.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkDynamicState.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkEventCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalFenceFeatureFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalFenceHandleTypeFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreFeatureFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreHandleTypeFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFenceCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFenceImportFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFilter.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFormat.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateCombinerOpKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFrameBoundaryFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFramebufferCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkFrontFace.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGeometryFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGeometryInstanceFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGeometryTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGpaDeviceClockModeAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGpaPerfBlockAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGpaSampleTypeAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGpaSqShaderStageFlagsAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkGraphicsPipelineLibraryFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkHostImageCopyFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageAspectFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageCompressionFixedRateFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageCompressionFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageCreateFlags2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageLayout.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageTiling.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageUsageFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageUsageFlags2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageViewCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkImageViewType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndexType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectCommandsInputModeFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectExecutionSetInfoTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkIndirectStateFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkInstanceCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkInternalAllocationType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkLatencyMarkerNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkLayerSettingTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkLayeredDriverUnderlyingApiMSFT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkLineRasterizationMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkLogicOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryAllocateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryDecompressionMethodFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryHeapFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryMapFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryOverallocationBehaviorAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryPropertyFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMemoryUnmapFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMicromapCreateFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkMicromapTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkNeuralAcceleratorStatisticsModeARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkObjectType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpacityMicromapFormatKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpacityMicromapSpecialIndexKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpticalFlowExecuteFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpticalFlowGridSizeFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpticalFlowPerformanceLevelNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionBindingPointNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionCreateFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOpticalFlowUsageFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkOutOfBandQueueTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureInstanceFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureOpTypeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPastPresentationTimingFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPeerMemoryFeatureFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerfHintTypeQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceConfigurationTypeINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceCounterDescriptionFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceCounterScopeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceCounterStorageKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceCounterUnitKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceOverrideTypeINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceParameterTypeINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPerformanceValueTypeINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphOperationTypeARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphProcessingEngineTypeARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceLayeredApiKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceSchedulingControlsFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineBindPoint.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineCacheCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineCacheHeaderVersion.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineColorBlendStateCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineCompilerControlFlagsAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineCreationFeedbackFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineDepthStencilStateCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineExecutableStatisticFormatKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineLayoutCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessBufferBehavior.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessImageBehavior.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineShaderStageCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPointClippingBehavior.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPolygonMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPresentGravityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPresentModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPresentScalingFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPresentStageFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPresentTimingInfoFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkPrimitiveTopology.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkProvokingVertexModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryControlFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryPipelineStatisticFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryPoolCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryPoolSamplingModeINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryResultFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryResultStatusKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueryType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueueFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkQueueGlobalPriority.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRasterizationOrderAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRayTracingInvocationReorderModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRayTracingLssIndexingModeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRayTracingLssPrimitiveEndCapsModeNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRayTracingShaderGroupTypeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRenderPassCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRenderingAttachmentFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkRenderingFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkResolveImageFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkResolveModeFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkResult.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSampleCountFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSamplerAddressMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSamplerCreateFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSamplerMipmapMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSamplerReductionMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrModelConversion.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrRange.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkScopeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSemaphoreImportFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSemaphoreType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSemaphoreWaitFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderCodeTypeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderCorePropertiesFlagsAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderCreateFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderFloatControlsIndependence.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderGroupShaderKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderInfoTypeAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShaderStageFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkShadingRatePaletteEntryNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSharingMode.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSparseImageFormatFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSparseMemoryBindFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSpirvResourceTypeFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkStencilFaceFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkStencilOp.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkStructureType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSubgroupFeatureFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSubmitFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSubpassContents.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSubpassDescriptionFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSubpassMergeStatusEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSurfaceCounterFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSurfaceTransformFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSwapchainCreateFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkSystemAllocationScope.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTensorCreateFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTensorTilingARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTensorUsageFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTensorViewCreateFlagsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTessellationDomainOrigin.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkThrottleHintTypeSEC.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTileShadingRenderPassFlagsQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkTimeDomainKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkToolPurposeFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkValidationCacheHeaderVersionEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkValidationCheckEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkValidationFeatureDisableEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkValidationFeatureEnableEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVendorId.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVertexInputRate.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoCapabilityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoChromaSubsamplingFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoCodecOperationFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoCodingControlFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoComponentBitDepthFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoDecodeCapabilityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoDecodeH264PictureLayoutFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoDecodeUsageFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1CapabilityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1PredictionModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlGroupKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1StdFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1SuperblockSizeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeCapabilityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeContentFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeFeedbackFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264CapabilityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264RateControlFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264StdFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CapabilityFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CtbSizeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265RateControlFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265StdFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265TransformBlockSizeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeIntraRefreshModeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodePerPartitionFeedbackFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBChromaOffsetFlagsVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBModelConversionFlagsVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBRangeCompressionFlagsVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeRateControlModeFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeTuningModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoEncodeUsageFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoSessionCreateFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkVideoSessionParametersCreateFlagsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Enums/VkViewportCoordinateSwizzleNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/Platforms/AndroidExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/Platforms/MetalExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/Platforms/WaylandExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/Platforms/Win32Extensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/Platforms/XcbExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/Platforms/XlibExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/VkDeviceExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Extensions/VkInstanceExtensions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Functions.gen.cs create mode 100644 Brutal.Vulkan/Generated/Globals.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkAccelerationStructureKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkAccelerationStructureNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkBuffer.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkBufferView.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkCommandBuffer.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkCommandPool.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkCuFunctionNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkCuModuleNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDataGraphPipelineSessionARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDebugReportCallbackEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDebugUtilsMessengerEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDeferredOperationKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDescriptorPool.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDescriptorSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDescriptorSetLayout.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDescriptorUpdateTemplate.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDevice.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDeviceMemory.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDisplayKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkDisplayModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkEvent.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkExternalComputeQueueNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkFence.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkFramebuffer.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkGpaSessionAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkImage.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkImageView.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkIndirectExecutionSetEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkInstance.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkMicromapEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkOpticalFlowSessionNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPerformanceConfigurationINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPhysicalDevice.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPipeline.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPipelineBinaryKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPipelineCache.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPipelineLayout.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkPrivateDataSlot.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkQueryPool.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkQueue.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkRenderPass.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkSampler.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkSamplerYcbcrConversion.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkSemaphore.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkShaderEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkShaderInstrumentationARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkShaderModule.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkSurfaceKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkSwapchainKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkTensorARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkTensorViewARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkValidationCacheEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkVideoSessionKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Handles/VkVideoSessionParametersKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/InlineArrays.gen.cs create mode 100644 Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApi.gen.cs create mode 100644 Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApiEx.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatProperties2ANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatPropertiesANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferPropertiesANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferUsageANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidSurfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkD3D12FenceSubmitInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportFenceWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalBufferInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalCommandQueueInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalDeviceInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalIOSurfaceInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectsInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalSharedEventInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalTextureInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExportSemaphoreWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkExternalFormatANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkFenceGetWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportAndroidHardwareBufferInfoANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportFenceWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryMetalHandleInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalBufferInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalIOSurfaceInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalSharedEventInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalTextureInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkImportSemaphoreWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetAndroidHardwareBufferInfoANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetMetalHandleInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryMetalHandlePropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryWin32HandlePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkMetalSurfaceCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkSemaphoreGetWin32HandleInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceCapabilitiesFullScreenExclusiveEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveWin32InfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkWaylandSurfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkWin32SurfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkXcbSurfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/Platforms/VkXlibSurfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1CDEF.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfig.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfigFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrain.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrainFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1GlobalMotion.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilter.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilterFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopRestoration.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1Quantization.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1QuantizationFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1Segmentation.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeader.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeaderFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1DecoderModelInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ExtensionHeader.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefListModEntry.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefPicMarkingEntry.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeader.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeaderFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTable.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTableFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265LongTermRefPics.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfoFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeader.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeaderFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTable.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTableFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264HrdParameters.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264PictureParameterSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264PpsFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264ScalingLists.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSetVui.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264SpsFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH264SpsVuiFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265DecPicBufMgr.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265HrdFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265HrdParameters.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265LongTermRefPicsSps.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265PictureParameterSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265PpsFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265PredictorPaletteEntries.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevel.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevelFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265ScalingLists.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSetVui.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSetFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265SpsFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265SpsVuiFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265SubLayerHrdParameters.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265VideoParameterSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoH265VpsFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfig.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfigFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilter.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilterFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoVP9Segmentation.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/StdVideoVP9SegmentationFlags.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAabbPositionsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildGeometryInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildRangeInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildSizesInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCaptureDescriptorDataInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfo2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureDeviceAddressInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryAabbsDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryInstancesDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryLinearSweptSpheresDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMicromapDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMotionTrianglesDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometrySpheresDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryTrianglesDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInstanceKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMatrixMotionInstanceNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMemoryRequirementsInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureSRTMotionInstanceNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAccelerationStructureVersionInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAcquireNextImageInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAcquireProfilingLockInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAllocationCallbacks.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAmigoProfilingSubmitInfoSEC.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAntiLagDataAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAntiLagPresentationInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkApplicationInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentDescription.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentDescription2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentDescriptionStencilLayout.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentFeedbackLoopInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentReference.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentReference2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentReferenceStencilLayout.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentSampleCountInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkAttachmentSampleLocationsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBaseInStructure.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBaseOutStructure.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBeginCustomResolveInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindAccelerationStructureMemoryInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryDeviceGroupInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindDataGraphPipelineSessionMemoryInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindDescriptorSetsInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindHeapInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindImageMemoryDeviceGroupInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindImageMemoryInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindImageMemorySwapchainInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindImagePlaneMemoryInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindIndexBuffer3InfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindMemoryStatus.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindPipelineIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindShaderGroupIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindSparseInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindTensorMemoryInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindTransformFeedbackBuffer2InfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindVertexBuffer3InfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBindVideoSessionMemoryInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBlitImageCubicWeightsInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBlitImageInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferCaptureDescriptorDataInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferCopy.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferCopy2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferImageCopy.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferImageCopy2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferMemoryRequirementsInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferOpaqueCaptureAddressCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferUsageFlags2CreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBufferViewCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCalibratedTimestampInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCheckpointData2NV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCheckpointDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClearAttachment.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClearColorValue.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClearDepthStencilValue.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClearRect.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClearValue.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureClustersBottomLevelInputNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureCommandsInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGetTemplateIndicesInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInputInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInstantiateClusterInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInputNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureOpInputNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureTriangleClusterInputNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCoarseSampleLocationNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCoarseSampleOrderCustomNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkColorBlendAdvancedEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkColorBlendEquationEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferBeginInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceConditionalRenderingInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceDescriptorHeapInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderingInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceViewportScissorInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandBufferSubmitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCommandPoolCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkComponentMapping.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkComputeOccupancyPriorityParametersNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkComputePipelineCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkComputePipelineIndirectBufferInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfo2EXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkConformanceVersion.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkConvertCooperativeVectorMatrixInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCooperativeVectorPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureToMemoryInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyBufferInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyBufferToImageInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyCommandTransformInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyDescriptorSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryImageInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyImageInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyImageToBufferInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyImageToImageInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyImageToMemoryInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectCommandKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryToAccelerationStructureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectCommandKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMemoryToMicromapInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMicromapInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyMicromapToMemoryInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCopyTensorInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCuFunctionCreateInfoNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCuLaunchInfoNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCuModuleCreateInfoNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCuModuleTexturingModeCreateInfoNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkCustomResolveCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineBuiltinModelCreateInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCompilerControlCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineDispatchInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineIdentifierCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineNeuralStatisticsCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowDispatchInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelinePropertyQueryResultARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoImageLayoutARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementsInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionMemoryRequirementsInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineShaderModuleCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeConnectionARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphProcessingEngineCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDataGraphTosaNameQualityARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugMarkerMarkerInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectNameInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectTagInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugReportCallbackCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugUtilsLabelEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCallbackDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectNameInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectTagInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDecompressMemoryInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationBufferCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationImageCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationMemoryAllocateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDependencyInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDepthBiasInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDepthBiasRepresentationInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDepthClampRangeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorAddressInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorBufferInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorGetInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorGetTensorInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorImageInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceConstantOffsetEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceHeapDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectAddressEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexArrayEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourcePushIndexEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceShaderRecordIndexEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorPoolCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorPoolInlineUniformBlockCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorPoolSize.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetAndBindingMappingEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetBindingReferenceVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBinding.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBindingFlagsCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutHostMappingInfoVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutSupport.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountLayoutSupport.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateEntry.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceAddressBindingCallbackDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceAddressRangeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceBufferMemoryRequirements.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceDeviceMemoryReportCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceDiagnosticsConfigCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceEventInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultAddressInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultCountsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultDebugInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultShaderAbortMessageInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorBinaryHeaderVersionOneKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupBindSparseInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupCommandBufferBeginInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupDeviceCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupRenderPassBeginInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupSubmitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceGroupSwapchainCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceImageMemoryRequirements.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceImageSubresourceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceMemoryCopyKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceMemoryImageCopyKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOpaqueCaptureAddressInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOverallocationCreateInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceMemoryReportCallbackDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressConstKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDevicePipelineBinaryInternalCacheControlKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDevicePrivateDataCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceQueueCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceQueueGlobalPriorityCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceQueueInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceQueueShaderCoreControlCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDeviceTensorMemoryRequirementsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingInfoLUNARG.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingListLUNARG.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDispatchIndirect2InfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDispatchIndirectCommand.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDispatchParametersARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDispatchTileInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayEventInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayModeCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayModeParametersKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayModeProperties2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayModePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayModeStereoPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayNativeHdrSurfaceCapabilitiesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilities2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPlaneInfo2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPlaneProperties2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPlanePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPowerInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPresentInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayProperties2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplayPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceStereoCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawIndexedIndirectCommand.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawIndirect2InfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawIndirectCommand.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawIndirectCount2InfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawIndirectCountIndirectCommandEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierProperties2EXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesList2EXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesListEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkEventCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExportFenceCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExportSemaphoreCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExtensionProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExtent2D.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExtent3D.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalBufferProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDataParamsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDeviceCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalFenceProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalImageFormatProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalImageFormatPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalMemoryAcquireUnmodifiedEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalMemoryBufferCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalMemoryProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalMemoryTensorCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalSemaphoreProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkExternalTensorPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFenceCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFenceGetFdInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFilterCubicImageViewImageFormatPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFormatProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFormatProperties2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFormatProperties3.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFormatProperties4KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFragmentShadingRateAttachmentInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFrameBoundaryEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFrameBoundaryTensorsARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentImageInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentsCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFramebufferCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkFramebufferMixedSamplesCombinationNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsPipelineInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsShaderInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeometryAabbNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeometryDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeometryNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGeometryTrianglesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGetLatencyMarkerInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGpaDeviceClockModeInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGpaDeviceGetClockInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGpaPerfBlockPropertiesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGpaPerfCounterAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGpaSampleBeginInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGpaSessionCreateInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineLibraryCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkGraphicsShaderGroupCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHdrMetadataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHdrVividDynamicMetadataHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHeadlessSurfaceCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHostAddressRangeConstEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHostAddressRangeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHostImageCopyDevicePerformanceQuery.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkHostImageLayoutTransitionInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageAlignmentControlCreateInfoMESA.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageBlit.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageBlit2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCaptureDescriptorDataInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCompressionControlEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCompressionPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCopy.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCopy2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCreateFlags2CreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageDescriptorInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierListCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageFormatListCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageFormatProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageFormatProperties2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageMemoryRequirementsInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImagePlaneMemoryRequirementsInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageResolve.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageResolve2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageSparseMemoryRequirementsInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageStencilUsage2CreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageStencilUsageCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageSubresource.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageSubresource2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageSubresourceLayers.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageSubresourceRange.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageSwapchainCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageToMemoryCopy.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageUsageFlags2CreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewAddressPropertiesNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewAstcDecodeModeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewCaptureDescriptorDataInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewHandleInfoNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewMinLodCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewSampleWeightCreateInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewSlicedCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewUsage2CreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImageViewUsageCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImportFenceFdInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImportMemoryFdInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImportMemoryHostPointerInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkImportSemaphoreFdInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsExecutionSetTokenEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsIndexBufferTokenEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutPushDataTokenNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsPushConstantTokenEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsStreamNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsTokenDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectCommandsVertexBufferTokenEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetPipelineInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderLayoutInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkInitializePerformanceApiInfoINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkInputAttachmentAspectReference.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkInstanceCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLatencySleepInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLatencySleepModeInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLatencySubmissionPresentIdNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLatencySurfaceCapabilitiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLatencyTimingsFrameReportNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLayerProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLayerSettingEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkLayerSettingsCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMappedMemoryRange.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryAllocateFlagsInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryBarrier.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryBarrier2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryBarrierAccessFlags3KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfoTensorARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedRequirements.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryFdPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryGetFdInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryGetRemoteAddressInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryHeap.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryHostPointerPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryMapInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryMapPlacedInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryMarkerInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryOpaqueCaptureAddressAllocateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryPriorityAllocateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarrierKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarriersInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryRequirements.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryRequirements2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryToImageCopy.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryType.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMemoryUnmapInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapBuildInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapBuildSizesInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapTriangleKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapUsageEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapUsageKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMicromapVersionInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMultiDrawIndexedInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMultiDrawInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMultisamplePropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMultisampledRenderToSingleSampledInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewAttributesInfoNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeListEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOffset2D.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOffset3D.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDataCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDescriptorDataCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpticalFlowExecuteInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreatePrivateDataInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkOutOfBandQueueTypeInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureFlagsNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureInstancesInputNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureUpdateInstanceDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWriteInstanceDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWritePartitionTranslationDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingGOOGLE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerTileBeginInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerTileEndInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerfHintInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceConfigurationAcquireInfoINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceCounterARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceCounterKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceCounterResultKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceMarkerInfoINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceOverrideInfoINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceQuerySubmitInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceStreamMarkerInfoINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceValueDataINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPerformanceValueINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevice16BitStorageFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevice4444FormatsFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevice8BitStorageFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructureFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructurePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAddressBindingReportFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAmigoProfilingFeaturesSEC.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAntiLagFeaturesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAstcDecodeFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructureFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructurePropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoherentMemoryFeaturesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceColorWriteEnableFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConditionalRenderingFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCornerSampledImageFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoverageReductionModeFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicClampFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicWeightsFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomResolveFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphModelFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOperationSupportARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphProcessingEngineARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthBiasControlFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampControlFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampZeroOneFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipControlFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipEnableFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthStencilResolveProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapTensorPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiscardRectanglePropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDriverProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDrmPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExclusiveScissorFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedFlagsFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalBufferInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalComputeQueuePropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalFenceInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalImageFormatInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryRdmaFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalSemaphoreInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalTensorInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFloatControlsProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFormatPackFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFrameBoundaryFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGlobalPriorityQueryFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaFeaturesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaProperties2AMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaPropertiesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGroupProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHdrVividFeaturesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostQueryResetFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIdProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageFormatInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2FeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2PropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing3FeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingPropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageRobustnessFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewImageFormatInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewMinLodFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImagelessFramebufferFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIndexTypeUInt8Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesListKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredDriverPropertiesMSFT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyDitheringFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLimits.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10PropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance11FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance3Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7PropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance8FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9PropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryPriorityFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePciBusInfoPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCreationCacheControlFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineOpacityMicromapFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelinePropertiesFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineProtectedAccessFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePointClippingProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentBarrierFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentId2FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentIdFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentMeteringFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentTimingFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWait2FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWaitFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrivateDataFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushDescriptorProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintPropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRawAccessChainsFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayQueryFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingValidationFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2PropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSampleLocationsPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerFilterMinmaxProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerYCbCrConversionFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceScalarBlockLayoutFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShader64BitIndexingFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicInt64Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderBfloat16FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderClockFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderConstantDataFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreProperties2AMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDrawParametersFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderExpectAssumeFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat16Int8Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat8FeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloatControls2Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFmaFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageFootprintFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderQuadControlFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupRotateFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTerminateInvocationFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImageFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImagePropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUntypedPointersFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImageFeaturesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImagePropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseImageFormatInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSurfaceInfo2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSynchronization2Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorFeaturesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstc3DFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstcHdrFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceThrottleHintFeaturesSEC.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapPropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTilePropertiesFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingPropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceToolProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVariablePointersFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoDecodeVP9FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoFormatInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance2FeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Features.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Properties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkanMemoryModelFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrDegammaFeaturesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrImageArraysFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryHandlesInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeyKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeysAndDataKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCacheCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionDataGraphQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionOne.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAdvancedStateCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAttachmentState.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineColorWriteCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCompilerControlCreateInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCoverageModulationStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCoverageReductionStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCoverageToColorStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCreateFlags2CreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedback.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedbackCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineDepthStencilStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineDiscardRectangleStateCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineDynamicStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInternalRepresentationKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineExecutablePropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticValueKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineFragmentDensityMapLayeredCreateInfoVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateStateCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineIndirectDeviceAddressInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineInputAssemblyStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineLayoutCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineLibraryCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineMultisampleStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelinePropertiesIdentifierEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationConservativeStateCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationDepthClipStateCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationLineStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateRasterizationOrderAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateStreamCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRenderingCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineRobustnessCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineSampleLocationsStateCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineTessellationDomainOriginStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineTessellationStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputDivisorStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClampControlCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClipControlCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportExclusiveScissorStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportShadingRateImageStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportStateCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportSwizzleStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPipelineViewportWScalingStateCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentId2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentIdKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentRegionKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentRegionsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentStageTimeEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentTimeGOOGLE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentTimesInfoGOOGLE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentTimingInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentTimingSurfaceCapabilitiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentTimingsInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPresentWait2InfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPrivateDataSlotCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkProtectedSubmitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPushConstantBankInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPushConstantRange.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPushConstantsInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPushDataInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetWithTemplateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueryLowLatencySupportNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueryPoolCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceQueryCreateInfoINTEL.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointProperties2NV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointPropertiesNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphOpticalFlowPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphProcessingEnginePropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphTosaPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyGlobalPriorityProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyOwnershipTransferPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyQueryResultStatusPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkQueueFamilyVideoPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineInterfaceCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRect2D.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRectLayerKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRefreshCycleDurationGOOGLE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkReleaseCapturedPipelineDataInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkReleaseSwapchainImagesInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassAttachmentBeginInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassBeginInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassCreationControlEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapOffsetEndInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassInputAttachmentAspectCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassMultiviewCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassPerformanceCountersByRegionBeginInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassSampleLocationsBeginInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassStripeBeginInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassStripeInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassStripeSubmitInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassTileShadingCreateInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderPassTransformBeginInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingAreaInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentFlagsInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentLocationInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingEndInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingFragmentDensityMapAttachmentInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingFragmentShadingRateAttachmentInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkRenderingInputAttachmentIndexInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkResolveImageInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkResolveImageModeInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkResourceDescriptorDataEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkResourceDescriptorInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSRTDataNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSampleLocationEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSampleLocationsInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerBlockMatchWindowCreateInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerBorderColorComponentMappingCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerCaptureDescriptorDataInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerCubicWeightsCreateInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorIndexCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerReductionModeCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionImageFormatProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSemaphoreCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSemaphoreGetFdInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSemaphoreSignalInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSemaphoreSubmitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSemaphoreTypeCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSemaphoreWaitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSetDescriptorBufferOffsetsInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSetLatencyMarkerInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSetPresentConfigNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSetStateFlagsIndirectCommandNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderDescriptorSetAndBindingMappingInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDataHeaderARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDescriptionARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderModuleCreateInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderModuleIdentifierEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderModuleValidationCacheCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderResourceUsageAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShaderStatisticsInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkShadingRatePaletteNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilities2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseBufferMemoryBindInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBind.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBindInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseImageOpaqueMemoryBindInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSparseMemoryBind.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSpecializationInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSpecializationMapEntry.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkStencilOpState.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRangeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRegionKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubmitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubmitInfo2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassBeginInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassDependency.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassDependency2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassDescription.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassDescription2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassDescriptionDepthStencilResolve.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassEndInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassResolvePerformanceQueryEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassSampleLocationsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubpassShadingPipelineCreateInfoHUAWEI.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubresourceHostMemcpySize.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubresourceLayout.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubresourceLayout2.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSubsampledImageFormatPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2EXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentBarrierNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentId2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentWait2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceFormat2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceFormatKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeCompatibilityKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfacePresentScalingCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSurfaceProtectedCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainCalibratedTimestampInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainCounterCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainDisplayNativeHdrCreateInfoAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainFlagsSurfaceCapabilitiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainLatencyCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainPresentBarrierCreateInfoNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainPresentFenceInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModeInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModesCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainPresentScalingCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainTimeDomainPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkSwapchainTimingPropertiesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorCaptureDescriptorDataInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorCopyARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorDependencyInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorDescriptionARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorExplicitTilingFormatPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorFormatPropertiesARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorMemoryBarrierARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorMemoryRequirementsInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorRollingBackingCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorViewCaptureDescriptorDataInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTensorViewCreateInfoARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTexelBufferDescriptorInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTextureLodGatherFormatPropertiesAMD.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkThrottleHintSubmitInfoSEC.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTileMemoryBindInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTileMemoryRequirementsQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTileMemorySizeInfoQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTilePropertiesQCOM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTimelineSemaphoreSubmitInfo.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommand2KHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommandKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkValidationCacheCreateInfoEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkValidationFeaturesEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkValidationFlagsEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription2EXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription2EXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDivisorDescription.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoBeginCodingInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoCodingControlInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1DpbSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1InlineSessionParametersInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1SessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264DpbSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264InlineSessionParametersInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersAddInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265DpbSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265InlineSessionParametersInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersAddInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeUsageInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1DpbSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1FrameSizeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1GopRemainingFrameInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QIndexKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QualityLevelPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlLayerInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeFeedback2CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264DpbSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264FrameSizeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264GopRemainingFrameInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264NaluSliceInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QpKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QualityLevelPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlLayerInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersAddInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersGetInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265CapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265DpbSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265FrameSizeKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265GopRemainingFrameInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265NaluSliceSegmentInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265PictureInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265ProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QpKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QualityLevelPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlLayerInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersAddInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersGetInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeProfileRGBConversionInfoVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapCapabilitiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeRGBConversionCapabilitiesVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlLayerInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionIntraRefreshCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersFeedbackInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersGetInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionRGBConversionCreateInfoVALVE.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEncodeUsageInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoEndCodingInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoFormatAV1QuantizationMapPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoFormatH265QuantizationMapPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoFormatPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoFormatQuantizationMapPropertiesKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoInlineQueryInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoPictureResourceInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoProfileInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoProfileListInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoReferenceIntraRefreshInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoReferenceSlotInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoSessionCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoSessionMemoryRequirementsKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersCreateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersUpdateInfoKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkViewport.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkViewportSwizzleNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkViewportWScalingNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSet.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureKHR.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetInlineUniformBlock.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetPartitionedAccelerationStructureNV.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetTensorARM.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetPipelineEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetShaderEXT.gen.cs create mode 100644 Brutal.Vulkan/Generated/Structs/VkXYColorEXT.gen.cs create mode 100644 Brutal.Vulkan/GlobalUsings.cs create mode 100644 Brutal.Vulkan/ImportResolver.cs create mode 100644 Brutal.Vulkan/LICENSES/BRUTAL-VULKAN-THIRD-PARTY-NOTICES.txt create mode 100644 Brutal.Vulkan/Manual/Classes/CommandBuffer.cs create mode 100644 Brutal.Vulkan/Manual/Classes/Device.cs create mode 100644 Brutal.Vulkan/Manual/Classes/Instance.cs create mode 100644 Brutal.Vulkan/Manual/Classes/PhysicalDevice.cs create mode 100644 Brutal.Vulkan/Manual/Classes/Queue.cs create mode 100644 Brutal.Vulkan/Manual/Classes/VkAllocator.cs create mode 100644 Brutal.Vulkan/Manual/Classes/VkResultError.cs create mode 100644 Brutal.Vulkan/Manual/Classes/VulkanHandleWrapper.cs create mode 100644 Brutal.Vulkan/Manual/Constants/VK.cs create mode 100644 Brutal.Vulkan/Manual/Interfaces/IVulkanHandle.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VK.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VkClearValue.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VkExtent2D.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VkExtent3D.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VkOffset2D.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VkOffset3D.cs create mode 100644 Brutal.Vulkan/Manual/Partials/VkRect2D.cs create mode 100644 Brutal.Vulkan/Manual/Partials/Vulkan.cs create mode 100644 Brutal.Vulkan/Manual/Structs/VkDeviceAddress.cs create mode 100644 Brutal.Vulkan/Manual/Structs/VkFlags.cs create mode 100644 Brutal.Vulkan/Manual/Structs/VkFlags64.cs create mode 100644 Brutal.Vulkan/Manual/Structs/VkRemoteAddressNV.cs create mode 100644 Brutal.Vulkan/Manual/Structs/VkSampleMask.cs create mode 100644 Brutal.Vulkan/Manual/Structs/VkTransformMatrixKHR.cs create mode 100644 Brutal.ZLib/LICENSES/BRUTAL-ZLIB-THIRD-PARTY-NOTICES.txt diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..57cc9cb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Every file is served as stored: SourceLink checks it against the checksum compiled into the PDB. +* -text diff --git a/Brutal.Box2D/B2Joint.cs b/Brutal.Box2D/B2Joint.cs new file mode 100644 index 0000000..f2f68b0 --- /dev/null +++ b/Brutal.Box2D/B2Joint.cs @@ -0,0 +1,68 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.Box2DApi; + +[NativeMarshalling(typeof(B2JointMarshaller))] +public partial class B2Joint : IBox2DObject +{ + [FieldOffset(0)] + internal ulong InteropValue; + + /// + public bool IsNull() + { + return InteropValue == 0; + } + + /// + public bool Equals(B2Joint? x, B2Joint? y) + { + if (x is null && y is null) + return true; + + if (x is null || y is null) + return false; + + return x.InteropValue == y.InteropValue; + } + + /// + public int GetHashCode(B2Joint obj) + { + if (obj.IsNull()) + return 0; + + return obj.InteropValue.GetHashCode(); + } +} + +[CustomMarshaller(typeof(B2Joint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2DistanceJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2FilterJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2MotorJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2MouseJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2PrismaticJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2RevoluteJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2WeldJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +[CustomMarshaller(typeof(B2WheelJoint), MarshalMode.Default, typeof(B2JointMarshaller))] +internal static class B2JointMarshaller + where T : B2Joint, new() +{ + internal static ulong ConvertToUnmanaged(T? managed) + { + if (managed is null) + return 0; + + return managed.InteropValue; + } + + internal static T? ConvertToManaged(ulong unmanaged) + { + if (unmanaged == 0) + return null; + + return new T { InteropValue = unmanaged }; + } +} diff --git a/Brutal.Box2D/Box2D.cs b/Brutal.Box2D/Box2D.cs new file mode 100644 index 0000000..0686b93 --- /dev/null +++ b/Brutal.Box2D/Box2D.cs @@ -0,0 +1,32 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace Brutal.Box2DApi; + +/// +/// A 2D physics engine. +/// +public static partial class Box2D +{ + private const string Dll = +#if DEBUG + "box2dd"; +#else + "box2d"; +#endif + + static Box2D() + { + // Load the GLFW native library + var glfwNative = NativeLibrary.Load(Dll, typeof(Box2D).Assembly, DllImportSearchPath.AssemblyDirectory); + + // Assign the native library to the assembly resolver + NativeLibrary.SetDllImportResolver( + typeof(Box2D).Assembly, + (libraryName, _, _) => + { + return glfwNative; + } + ); + } +} diff --git a/Brutal.Box2D/Box2D.gen.cs b/Brutal.Box2D/Box2D.gen.cs new file mode 100644 index 0000000..4d67513 --- /dev/null +++ b/Brutal.Box2D/Box2D.gen.cs @@ -0,0 +1,2459 @@ +using System.Runtime.InteropServices; +using Brutal.Numerics; + +/* + * @brief Contains generated Box2D function entry-points. + * + * @note If you want to override function behavior, you can do so in Rules.xml and Box2D.cs. + * + * @warning This file is auto-generated by Brutal.Box2D.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +namespace Brutal.Box2DApi +{ + public static partial class Box2D + { + /// This allows the user to override the allocation functions. These should be + /// set during application startup. + [LibraryImport(Dll, EntryPoint = "b2SetAllocator")] + public static unsafe partial void SetAllocator(B2AllocFcn allocFcn, B2FreeFcn freeFcn); + + /// RETURN: the total bytes allocated by Box2D + [LibraryImport(Dll, EntryPoint = "b2GetByteCount")] + public static unsafe partial int GetByteCount(); + + /// Override the default assert callback + /// a non-null assert callback + [LibraryImport(Dll, EntryPoint = "b2SetAssertFcn")] + public static unsafe partial void SetAssertFcn(B2AssertFcn assertFcn); + + /// Get the current version of Box2D + [LibraryImport(Dll, EntryPoint = "b2GetVersion")] + public static unsafe partial B2Version GetVersion(); + + /// + [LibraryImport(Dll, EntryPoint = "b2InternalAssertFcn")] + public static unsafe partial int InternalAssertFcn(byte* condition, byte* fileName, int lineNumber); + + /// Get the absolute number of system ticks. The value is platform specific. + [LibraryImport(Dll, EntryPoint = "b2GetTicks")] + public static unsafe partial ulong GetTicks(); + + /// Get the milliseconds passed from an initial tick value. + [LibraryImport(Dll, EntryPoint = "b2GetMilliseconds")] + public static unsafe partial float GetMilliseconds(ulong ticks); + + /// Get the milliseconds passed from an initial tick value. Resets the passed in + /// value to the current tick value. + [LibraryImport(Dll, EntryPoint = "b2GetMillisecondsAndReset")] + public static unsafe partial float GetMillisecondsAndReset(in ulong ticks); + + /// Yield to be used in a busy loop. + [LibraryImport(Dll, EntryPoint = "b2Yield")] + public static unsafe partial void Yield(); + + /// + [LibraryImport(Dll, EntryPoint = "b2Hash")] + public static unsafe partial uint Hash(uint hash, byte* data, int count); + + /// Is this a valid number? Not NaN or infinity. + [LibraryImport(Dll, EntryPoint = "b2IsValidFloat")] + public static unsafe partial Bool8 IsValidFloat(float a); + + /// Is this a valid vector? Not NaN or infinity. + [LibraryImport(Dll, EntryPoint = "b2IsValidVec2")] + public static unsafe partial Bool8 IsValidVec2(float2 v); + + /// Is this a valid rotation? Not NaN or infinity. Is normalized. + [LibraryImport(Dll, EntryPoint = "b2IsValidRotation")] + public static unsafe partial Bool8 IsValidRotation(B2Rot q); + + /// Is this a valid bounding box? Not Nan or infinity. Upper bound greater than or equal to lower bound. + [LibraryImport(Dll, EntryPoint = "b2IsValidAABB")] + public static unsafe partial Bool8 IsValidAabb(B2Aabb aabb); + + /// Is this a valid plane? Normal is a unit vector. Not Nan or infinity. + [LibraryImport(Dll, EntryPoint = "b2IsValidPlane")] + public static unsafe partial Bool8 IsValidPlane(B2Plane a); + + /// RETURN: the minimum of two integers + [LibraryImport(Dll, EntryPoint = "b2MinInt")] + public static unsafe partial int MinInt(int a, int b); + + /// RETURN: the maximum of two integers + [LibraryImport(Dll, EntryPoint = "b2MaxInt")] + public static unsafe partial int MaxInt(int a, int b); + + /// RETURN: the absolute value of an integer + [LibraryImport(Dll, EntryPoint = "b2AbsInt")] + public static unsafe partial int AbsInt(int a); + + /// RETURN: an integer clamped between a lower and upper bound + [LibraryImport(Dll, EntryPoint = "b2ClampInt")] + public static unsafe partial int ClampInt(int a, int lower, int upper); + + /// RETURN: the minimum of two floats + [LibraryImport(Dll, EntryPoint = "b2MinFloat")] + public static unsafe partial float MinFloat(float a, float b); + + /// RETURN: the maximum of two floats + [LibraryImport(Dll, EntryPoint = "b2MaxFloat")] + public static unsafe partial float MaxFloat(float a, float b); + + /// RETURN: the absolute value of a float + [LibraryImport(Dll, EntryPoint = "b2AbsFloat")] + public static unsafe partial float AbsFloat(float a); + + /// RETURN: a float clamped between a lower and upper bound + [LibraryImport(Dll, EntryPoint = "b2ClampFloat")] + public static unsafe partial float ClampFloat(float a, float lower, float upper); + + /// Compute an approximate arctangent in the range [-pi, pi] + /// This is hand coded for cross-platform determinism. The atan2f + /// function in the standard library is not cross-platform deterministic. + /// Accurate to around 0.0023 degrees + [LibraryImport(Dll, EntryPoint = "b2Atan2")] + public static unsafe partial float Atan2(float y, float x); + + /// Compute the cosine and sine of an angle in radians. Implemented + /// for cross-platform determinism. + [LibraryImport(Dll, EntryPoint = "b2ComputeCosSin")] + public static unsafe partial B2CosSin ComputeCosSin(float radians); + + /// Vector dot product + [LibraryImport(Dll, EntryPoint = "b2Dot")] + public static unsafe partial float Dot(float2 a, float2 b); + + /// Vector cross product. In 2D this yields a scalar. + [LibraryImport(Dll, EntryPoint = "b2Cross")] + public static unsafe partial float Cross(float2 a, float2 b); + + /// Perform the cross product on a vector and a scalar. In 2D this produces a vector. + [LibraryImport(Dll, EntryPoint = "b2CrossVS")] + public static unsafe partial float2 CrossVS(float2 v, float s); + + /// Perform the cross product on a scalar and a vector. In 2D this produces a vector. + [LibraryImport(Dll, EntryPoint = "b2CrossSV")] + public static unsafe partial float2 CrossSV(float s, float2 v); + + /// Get a left pointing perpendicular vector. Equivalent to b2CrossSV(1.0f, v) + [LibraryImport(Dll, EntryPoint = "b2LeftPerp")] + public static unsafe partial float2 LeftPerp(float2 v); + + /// Get a right pointing perpendicular vector. Equivalent to b2CrossVS(v, 1.0f) + [LibraryImport(Dll, EntryPoint = "b2RightPerp")] + public static unsafe partial float2 RightPerp(float2 v); + + /// Vector addition + [LibraryImport(Dll, EntryPoint = "b2Add")] + public static unsafe partial float2 Add(float2 a, float2 b); + + /// Vector subtraction + [LibraryImport(Dll, EntryPoint = "b2Sub")] + public static unsafe partial float2 Sub(float2 a, float2 b); + + /// Vector negation + [LibraryImport(Dll, EntryPoint = "b2Neg")] + public static unsafe partial float2 Neg(float2 a); + + /// Vector linear interpolation + /// https://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ + [LibraryImport(Dll, EntryPoint = "b2Lerp")] + public static unsafe partial float2 Lerp(float2 a, float2 b, float t); + + /// Component-wise multiplication + [LibraryImport(Dll, EntryPoint = "b2Mul")] + public static unsafe partial float2 Mul(float2 a, float2 b); + + /// Multiply a scalar and vector + [LibraryImport(Dll, EntryPoint = "b2MulSV")] + public static unsafe partial float2 MulSV(float s, float2 v); + + /// a + s * b + [LibraryImport(Dll, EntryPoint = "b2MulAdd")] + public static unsafe partial float2 MulAdd(float2 a, float s, float2 b); + + /// a - s * b + [LibraryImport(Dll, EntryPoint = "b2MulSub")] + public static unsafe partial float2 MulSub(float2 a, float s, float2 b); + + /// Component-wise absolute vector + [LibraryImport(Dll, EntryPoint = "b2Abs")] + public static unsafe partial float2 Abs(float2 a); + + /// Component-wise minimum vector + [LibraryImport(Dll, EntryPoint = "b2Min")] + public static unsafe partial float2 Min(float2 a, float2 b); + + /// Component-wise maximum vector + [LibraryImport(Dll, EntryPoint = "b2Max")] + public static unsafe partial float2 Max(float2 a, float2 b); + + /// Component-wise clamp vector v into the range [a, b] + [LibraryImport(Dll, EntryPoint = "b2Clamp")] + public static unsafe partial float2 Clamp(float2 v, float2 a, float2 b); + + /// Get the length of this vector (the norm) + [LibraryImport(Dll, EntryPoint = "b2Length")] + public static unsafe partial float Length(float2 v); + + /// Get the distance between two points + [LibraryImport(Dll, EntryPoint = "b2Distance")] + public static unsafe partial float Distance(float2 a, float2 b); + + /// Convert a vector into a unit vector if possible, otherwise returns the zero vector. + /// todo MSVC is not inlining this function in several places per warning 4710 + [LibraryImport(Dll, EntryPoint = "b2Normalize")] + public static unsafe partial float2 Normalize(float2 v); + + /// Determines if the provided vector is normalized (norm(a) == 1). + [LibraryImport(Dll, EntryPoint = "b2IsNormalized")] + public static unsafe partial Bool8 IsNormalized(float2 a); + + /// Convert a vector into a unit vector if possible, otherwise returns the zero vector. Also + /// outputs the length. + [LibraryImport(Dll, EntryPoint = "b2GetLengthAndNormalize")] + public static unsafe partial float2 GetLengthAndNormalize(in float length, float2 v); + + /// Normalize rotation + [LibraryImport(Dll, EntryPoint = "b2NormalizeRot")] + public static unsafe partial B2Rot NormalizeRot(B2Rot q); + + /// Integrate rotation from angular velocity + /// initial rotation + /// the angular displacement in radians + [LibraryImport(Dll, EntryPoint = "b2IntegrateRotation")] + public static unsafe partial B2Rot IntegrateRotation(B2Rot q1, float deltaAngle); + + /// Get the length squared of this vector + [LibraryImport(Dll, EntryPoint = "b2LengthSquared")] + public static unsafe partial float LengthSquared(float2 v); + + /// Get the distance squared between points + [LibraryImport(Dll, EntryPoint = "b2DistanceSquared")] + public static unsafe partial float DistanceSquared(float2 a, float2 b); + + /// Make a rotation using an angle in radians + [LibraryImport(Dll, EntryPoint = "b2MakeRot")] + public static unsafe partial B2Rot MakeRot(float radians); + + /// Compute the rotation between two unit vectors + [LibraryImport(Dll, EntryPoint = "b2ComputeRotationBetweenUnitVectors")] + public static unsafe partial B2Rot ComputeRotationBetweenUnitVectors(float2 v1, float2 v2); + + /// Is this rotation normalized? + [LibraryImport(Dll, EntryPoint = "b2IsNormalizedRot")] + public static unsafe partial Bool8 IsNormalizedRot(B2Rot q); + + /// Normalized linear interpolation + /// https://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ + /// https://web.archive.org/web/20170825184056/http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/ + [LibraryImport(Dll, EntryPoint = "b2NLerp")] + public static unsafe partial B2Rot NLerp(B2Rot q1, B2Rot q2, float t); + + /// Compute the angular velocity necessary to rotate between two rotations over a give time + /// initial rotation + /// final rotation + /// inverse time step + [LibraryImport(Dll, EntryPoint = "b2ComputeAngularVelocity")] + public static unsafe partial float ComputeAngularVelocity(B2Rot q1, B2Rot q2, float invH); + + /// Get the angle in radians in the range [-pi, pi] + [LibraryImport(Dll, EntryPoint = "b2Rot_GetAngle")] + internal static unsafe partial float RotGetAngle(B2Rot q); + + /// Get the x-axis + [LibraryImport(Dll, EntryPoint = "b2Rot_GetXAxis")] + internal static unsafe partial float2 RotGetXAxis(B2Rot q); + + /// Get the y-axis + [LibraryImport(Dll, EntryPoint = "b2Rot_GetYAxis")] + internal static unsafe partial float2 RotGetYAxis(B2Rot q); + + /// Multiply two rotations: q * r + [LibraryImport(Dll, EntryPoint = "b2MulRot")] + public static unsafe partial B2Rot MulRot(B2Rot q, B2Rot r); + + /// Transpose multiply two rotations: qT * r + [LibraryImport(Dll, EntryPoint = "b2InvMulRot")] + public static unsafe partial B2Rot InvMulRot(B2Rot q, B2Rot r); + + /// relative angle between b and a (rot_b * inv(rot_a)) + [LibraryImport(Dll, EntryPoint = "b2RelativeAngle")] + public static unsafe partial float RelativeAngle(B2Rot b, B2Rot a); + + /// Convert any angle into the range [-pi, pi] + [LibraryImport(Dll, EntryPoint = "b2UnwindAngle")] + public static unsafe partial float UnwindAngle(float radians); + + /// Rotate a vector + [LibraryImport(Dll, EntryPoint = "b2RotateVector")] + public static unsafe partial float2 RotateVector(B2Rot q, float2 v); + + /// Inverse rotate a vector + [LibraryImport(Dll, EntryPoint = "b2InvRotateVector")] + public static unsafe partial float2 InvRotateVector(B2Rot q, float2 v); + + /// Transform a point (e.g. local space to world space) + [LibraryImport(Dll, EntryPoint = "b2TransformPoint")] + public static unsafe partial float2 TransformPoint(B2Transform t, float2 p); + + /// Inverse transform a point (e.g. world space to local space) + [LibraryImport(Dll, EntryPoint = "b2InvTransformPoint")] + public static unsafe partial float2 InvTransformPoint(B2Transform t, float2 p); + + /// Multiply two transforms. If the result is applied to a point p local to frame B, + /// the transform would first convert p to a point local to frame A, then into a point + /// in the world frame. + /// v2 = A.q.Rot(B.q.Rot(v1) + B.p) + A.p + /// = (A.q * B.q).Rot(v1) + A.q.Rot(B.p) + A.p + [LibraryImport(Dll, EntryPoint = "b2MulTransforms")] + public static unsafe partial B2Transform MulTransforms(B2Transform a, B2Transform b); + + /// Creates a transform that converts a local point in frame B to a local point in frame A. + /// v2 = A.q' * (B.q * v1 + B.p - A.p) + /// = A.q' * B.q * v1 + A.q' * (B.p - A.p) + [LibraryImport(Dll, EntryPoint = "b2InvMulTransforms")] + public static unsafe partial B2Transform InvMulTransforms(B2Transform a, B2Transform b); + + /// Multiply a 2-by-2 matrix times a 2D vector + [LibraryImport(Dll, EntryPoint = "b2MulMV")] + public static unsafe partial float2 MulMV(float2x2 a, float2 v); + + /// Get the inverse of a 2-by-2 matrix + [LibraryImport(Dll, EntryPoint = "b2GetInverse22")] + public static unsafe partial float2x2 GetInverse22(float2x2 a); + + /// Solve A * x = b, where b is a column vector. This is more efficient + /// than computing the inverse in one-shot cases. + [LibraryImport(Dll, EntryPoint = "b2Solve22")] + public static unsafe partial float2 Solve22(float2x2 a, float2 b); + + /// Does a fully contain b + [LibraryImport(Dll, EntryPoint = "b2AABB_Contains")] + internal static unsafe partial Bool8 AabbContains(B2Aabb a, B2Aabb b); + + /// Get the center of the AABB. + [LibraryImport(Dll, EntryPoint = "b2AABB_Center")] + internal static unsafe partial float2 AabbCenter(B2Aabb a); + + /// Get the extents of the AABB (half-widths). + [LibraryImport(Dll, EntryPoint = "b2AABB_Extents")] + internal static unsafe partial float2 AabbExtents(B2Aabb a); + + /// Union of two AABBs + [LibraryImport(Dll, EntryPoint = "b2AABB_Union")] + internal static unsafe partial B2Aabb AabbUnion(B2Aabb a, B2Aabb b); + + /// Do a and b overlap + [LibraryImport(Dll, EntryPoint = "b2AABB_Overlaps")] + internal static unsafe partial Bool8 AabbOverlaps(B2Aabb a, B2Aabb b); + + /// Compute the bounding box of an array of circles + [LibraryImport(Dll, EntryPoint = "b2MakeAABB")] + public static unsafe partial B2Aabb MakeAabb(in float2 points, int count, float radius); + + /// Signed separation of a point from a plane + [LibraryImport(Dll, EntryPoint = "b2PlaneSeparation")] + public static unsafe partial float PlaneSeparation(B2Plane plane, float2 point); + + /// One-dimensional mass-spring-damper simulation. Returns the new velocity given the position and time step. + /// You can then compute the new position using: + /// position += timeStep * newVelocity + /// This drives towards a zero position. By using implicit integration we get a stable solution + /// that doesn't require transcendental functions. + [LibraryImport(Dll, EntryPoint = "b2SpringDamper")] + public static unsafe partial float SpringDamper( + float hertz, + float dampingRatio, + float position, + float velocity, + float timeStep + ); + + /// Box2D bases all length units on meters, but you may need different units for your game. + /// You can set this value to use different units. This should be done at application startup + /// and only modified once. Default value is 1. + /// For example, if your game uses pixels for units you can use pixels for all length values + /// sent to Box2D. There should be no extra cost. However, Box2D has some internal tolerances + /// and thresholds that have been tuned for meters. By calling this function, Box2D is able + /// to adjust those tolerances and thresholds to improve accuracy. + /// A good rule of thumb is to pass the height of your player character to this function. So + /// if your player character is 32 pixels high, then pass 32 to this function. Then you may + /// confidently use pixels for all the length values sent to Box2D. All length values returned + /// from Box2D will also be pixels because Box2D does not do any scaling internally. + /// However, you are now on the hook for coming up with good values for gravity, density, and + /// forces. + /// WARNING: This must be modified before any calls to Box2D + [LibraryImport(Dll, EntryPoint = "b2SetLengthUnitsPerMeter")] + public static unsafe partial void SetLengthUnitsPerMeter(float lengthUnits); + + /// Get the current length units per meter. + [LibraryImport(Dll, EntryPoint = "b2GetLengthUnitsPerMeter")] + public static unsafe partial float GetLengthUnitsPerMeter(); + + /// Validate ray cast input data (NaN, etc) + [LibraryImport(Dll, EntryPoint = "b2IsValidRay")] + public static unsafe partial Bool8 IsValidRay(in B2RayCastInput input); + + /// Make a convex polygon from a convex hull. This will assert if the hull is not valid. + /// WARNING: Do not manually fill in the hull data, it must come directly from b2ComputeHull + [LibraryImport(Dll, EntryPoint = "b2MakePolygon")] + public static unsafe partial B2Polygon MakePolygon(in B2Hull hull, float radius); + + /// Make an offset convex polygon from a convex hull. This will assert if the hull is not valid. + /// WARNING: Do not manually fill in the hull data, it must come directly from b2ComputeHull + [LibraryImport(Dll, EntryPoint = "b2MakeOffsetPolygon")] + public static unsafe partial B2Polygon MakeOffsetPolygon(in B2Hull hull, float2 position, B2Rot rotation); + + /// Make an offset convex polygon from a convex hull. This will assert if the hull is not valid. + /// WARNING: Do not manually fill in the hull data, it must come directly from b2ComputeHull + [LibraryImport(Dll, EntryPoint = "b2MakeOffsetRoundedPolygon")] + public static unsafe partial B2Polygon MakeOffsetRoundedPolygon( + in B2Hull hull, + float2 position, + B2Rot rotation, + float radius + ); + + /// Make a square polygon, bypassing the need for a convex hull. + /// the half-width + [LibraryImport(Dll, EntryPoint = "b2MakeSquare")] + public static unsafe partial B2Polygon MakeSquare(float halfWidth); + + /// Make a box (rectangle) polygon, bypassing the need for a convex hull. + /// the half-width (x-axis) + /// the half-height (y-axis) + [LibraryImport(Dll, EntryPoint = "b2MakeBox")] + public static unsafe partial B2Polygon MakeBox(float halfWidth, float halfHeight); + + /// Make a rounded box, bypassing the need for a convex hull. + /// the half-width (x-axis) + /// the half-height (y-axis) + /// the radius of the rounded extension + [LibraryImport(Dll, EntryPoint = "b2MakeRoundedBox")] + public static unsafe partial B2Polygon MakeRoundedBox(float halfWidth, float halfHeight, float radius); + + /// Make an offset box, bypassing the need for a convex hull. + /// the half-width (x-axis) + /// the half-height (y-axis) + /// the local center of the box + /// the local rotation of the box + [LibraryImport(Dll, EntryPoint = "b2MakeOffsetBox")] + public static unsafe partial B2Polygon MakeOffsetBox( + float halfWidth, + float halfHeight, + float2 center, + B2Rot rotation + ); + + /// Make an offset rounded box, bypassing the need for a convex hull. + /// the half-width (x-axis) + /// the half-height (y-axis) + /// the local center of the box + /// the local rotation of the box + /// the radius of the rounded extension + [LibraryImport(Dll, EntryPoint = "b2MakeOffsetRoundedBox")] + public static unsafe partial B2Polygon MakeOffsetRoundedBox( + float halfWidth, + float halfHeight, + float2 center, + B2Rot rotation, + float radius + ); + + /// Transform a polygon. This is useful for transferring a shape from one body to another. + [LibraryImport(Dll, EntryPoint = "b2TransformPolygon")] + public static unsafe partial B2Polygon TransformPolygon(B2Transform transform, in B2Polygon polygon); + + /// Compute mass properties of a circle + [LibraryImport(Dll, EntryPoint = "b2ComputeCircleMass")] + public static unsafe partial B2MassData ComputeCircleMass(in B2Circle shape, float density); + + /// Compute mass properties of a capsule + [LibraryImport(Dll, EntryPoint = "b2ComputeCapsuleMass")] + public static unsafe partial B2MassData ComputeCapsuleMass(in B2Capsule shape, float density); + + /// Compute mass properties of a polygon + [LibraryImport(Dll, EntryPoint = "b2ComputePolygonMass")] + public static unsafe partial B2MassData ComputePolygonMass(in B2Polygon shape, float density); + + /// Compute the bounding box of a transformed circle + [LibraryImport(Dll, EntryPoint = "b2ComputeCircleAABB")] + public static unsafe partial B2Aabb ComputeCircleAabb(in B2Circle shape, B2Transform transform); + + /// Compute the bounding box of a transformed capsule + [LibraryImport(Dll, EntryPoint = "b2ComputeCapsuleAABB")] + public static unsafe partial B2Aabb ComputeCapsuleAabb(in B2Capsule shape, B2Transform transform); + + /// Compute the bounding box of a transformed polygon + [LibraryImport(Dll, EntryPoint = "b2ComputePolygonAABB")] + public static unsafe partial B2Aabb ComputePolygonAabb(in B2Polygon shape, B2Transform transform); + + /// Compute the bounding box of a transformed line segment + [LibraryImport(Dll, EntryPoint = "b2ComputeSegmentAABB")] + public static unsafe partial B2Aabb ComputeSegmentAabb(in B2Segment shape, B2Transform transform); + + /// Test a point for overlap with a circle in local space + [LibraryImport(Dll, EntryPoint = "b2PointInCircle")] + public static unsafe partial Bool8 PointInCircle(float2 point, in B2Circle shape); + + /// Test a point for overlap with a capsule in local space + [LibraryImport(Dll, EntryPoint = "b2PointInCapsule")] + public static unsafe partial Bool8 PointInCapsule(float2 point, in B2Capsule shape); + + /// Test a point for overlap with a convex polygon in local space + [LibraryImport(Dll, EntryPoint = "b2PointInPolygon")] + public static unsafe partial Bool8 PointInPolygon(float2 point, in B2Polygon shape); + + /// Ray cast versus circle shape in local space. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2RayCastCircle")] + public static unsafe partial B2CastOutput RayCastCircle(in B2RayCastInput input, in B2Circle shape); + + /// Ray cast versus capsule shape in local space. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2RayCastCapsule")] + public static unsafe partial B2CastOutput RayCastCapsule(in B2RayCastInput input, in B2Capsule shape); + + /// Ray cast versus segment shape in local space. Optionally treat the segment as one-sided with hits from + /// the left side being treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2RayCastSegment")] + public static unsafe partial B2CastOutput RayCastSegment( + in B2RayCastInput input, + in B2Segment shape, + Bool8 oneSided + ); + + /// Ray cast versus polygon shape in local space. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2RayCastPolygon")] + public static unsafe partial B2CastOutput RayCastPolygon(in B2RayCastInput input, in B2Polygon shape); + + /// Shape cast versus a circle. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2ShapeCastCircle")] + public static unsafe partial B2CastOutput ShapeCastCircle(in B2ShapeCastInput input, in B2Circle shape); + + /// Shape cast versus a capsule. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2ShapeCastCapsule")] + public static unsafe partial B2CastOutput ShapeCastCapsule(in B2ShapeCastInput input, in B2Capsule shape); + + /// Shape cast versus a line segment. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2ShapeCastSegment")] + public static unsafe partial B2CastOutput ShapeCastSegment(in B2ShapeCastInput input, in B2Segment shape); + + /// Shape cast versus a convex polygon. Initial overlap is treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2ShapeCastPolygon")] + public static unsafe partial B2CastOutput ShapeCastPolygon(in B2ShapeCastInput input, in B2Polygon shape); + + /// Compute the convex hull of a set of points. Returns an empty hull if it fails. + /// Some failure cases: + /// - all points very close together + /// - all points on a line + /// - less than 3 points + /// - more than B2_MAX_POLYGON_VERTICES points + /// This welds close points and removes collinear points. + /// WARNING: Do not modify a hull once it has been computed + [LibraryImport(Dll, EntryPoint = "b2ComputeHull")] + public static unsafe partial B2Hull ComputeHull(ReadOnlySpan points, int count); + + /// This determines if a hull is valid. Checks for: + /// - convexity + /// - collinear points + /// This is expensive and should not be called at runtime. + [LibraryImport(Dll, EntryPoint = "b2ValidateHull")] + public static unsafe partial Bool8 ValidateHull(in B2Hull hull); + + /// Compute the distance between two line segments, clamping at the end points if needed. + [LibraryImport(Dll, EntryPoint = "b2SegmentDistance")] + public static unsafe partial B2SegmentDistanceResult SegmentDistance( + float2 p1, + float2 q1, + float2 p2, + float2 q2 + ); + + /// Compute the closest points between two shapes represented as point clouds. + /// b2SimplexCache cache is input/output. On the first call set b2SimplexCache.count to zero. + /// The underlying GJK algorithm may be debugged by passing in debug simplexes and capacity. You may pass in NULL and 0 for these. + [LibraryImport(Dll, EntryPoint = "b2ShapeDistance")] + public static unsafe partial B2DistanceOutput ShapeDistance( + in B2DistanceInput input, + in B2SimplexCache cache, + in B2Simplex simplexes, + int simplexCapacity + ); + + /// Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction. + /// Initially touching shapes are treated as a miss. + [LibraryImport(Dll, EntryPoint = "b2ShapeCast")] + public static unsafe partial B2CastOutput ShapeCast(in B2ShapeCastPairInput input); + + /// Make a proxy for use in overlap, shape cast, and related functions. This is a deep copy of the points. + [LibraryImport(Dll, EntryPoint = "b2MakeProxy")] + public static unsafe partial B2ShapeProxy MakeProxy(in float2 points, int count, float radius); + + /// Make a proxy with a transform. This is a deep copy of the points. + [LibraryImport(Dll, EntryPoint = "b2MakeOffsetProxy")] + public static unsafe partial B2ShapeProxy MakeOffsetProxy( + in float2 points, + int count, + float radius, + float2 position, + B2Rot rotation + ); + + /// Evaluate the transform sweep at a specific time. + [LibraryImport(Dll, EntryPoint = "b2GetSweepTransform")] + public static unsafe partial B2Transform GetSweepTransform(in B2Sweep sweep, float time); + + /// Compute the upper bound on time before two shapes penetrate. Time is represented as + /// a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, + /// non-tunneling collisions. If you change the time interval, you should call this function + /// again. + [LibraryImport(Dll, EntryPoint = "b2TimeOfImpact")] + public static unsafe partial B2ToiOutput TimeOfImpact(in B2ToiInput input); + + /// Compute the contact manifold between two circles + [LibraryImport(Dll, EntryPoint = "b2CollideCircles")] + public static unsafe partial B2Manifold CollideCircles( + in B2Circle circleA, + B2Transform xfA, + in B2Circle circleB, + B2Transform xfB + ); + + /// Compute the contact manifold between a capsule and circle + [LibraryImport(Dll, EntryPoint = "b2CollideCapsuleAndCircle")] + public static unsafe partial B2Manifold CollideCapsuleAndCircle( + in B2Capsule capsuleA, + B2Transform xfA, + in B2Circle circleB, + B2Transform xfB + ); + + /// Compute the contact manifold between an segment and a circle + [LibraryImport(Dll, EntryPoint = "b2CollideSegmentAndCircle")] + public static unsafe partial B2Manifold CollideSegmentAndCircle( + in B2Segment segmentA, + B2Transform xfA, + in B2Circle circleB, + B2Transform xfB + ); + + /// Compute the contact manifold between a polygon and a circle + [LibraryImport(Dll, EntryPoint = "b2CollidePolygonAndCircle")] + public static unsafe partial B2Manifold CollidePolygonAndCircle( + in B2Polygon polygonA, + B2Transform xfA, + in B2Circle circleB, + B2Transform xfB + ); + + /// Compute the contact manifold between a capsule and circle + [LibraryImport(Dll, EntryPoint = "b2CollideCapsules")] + public static unsafe partial B2Manifold CollideCapsules( + in B2Capsule capsuleA, + B2Transform xfA, + in B2Capsule capsuleB, + B2Transform xfB + ); + + /// Compute the contact manifold between an segment and a capsule + [LibraryImport(Dll, EntryPoint = "b2CollideSegmentAndCapsule")] + public static unsafe partial B2Manifold CollideSegmentAndCapsule( + in B2Segment segmentA, + B2Transform xfA, + in B2Capsule capsuleB, + B2Transform xfB + ); + + /// Compute the contact manifold between a polygon and capsule + [LibraryImport(Dll, EntryPoint = "b2CollidePolygonAndCapsule")] + public static unsafe partial B2Manifold CollidePolygonAndCapsule( + in B2Polygon polygonA, + B2Transform xfA, + in B2Capsule capsuleB, + B2Transform xfB + ); + + /// Compute the contact manifold between two polygons + [LibraryImport(Dll, EntryPoint = "b2CollidePolygons")] + public static unsafe partial B2Manifold CollidePolygons( + in B2Polygon polygonA, + B2Transform xfA, + in B2Polygon polygonB, + B2Transform xfB + ); + + /// Compute the contact manifold between an segment and a polygon + [LibraryImport(Dll, EntryPoint = "b2CollideSegmentAndPolygon")] + public static unsafe partial B2Manifold CollideSegmentAndPolygon( + in B2Segment segmentA, + B2Transform xfA, + in B2Polygon polygonB, + B2Transform xfB + ); + + /// Compute the contact manifold between a chain segment and a circle + [LibraryImport(Dll, EntryPoint = "b2CollideChainSegmentAndCircle")] + public static unsafe partial B2Manifold CollideChainSegmentAndCircle( + in B2ChainSegment segmentA, + B2Transform xfA, + in B2Circle circleB, + B2Transform xfB + ); + + /// Compute the contact manifold between a chain segment and a capsule + [LibraryImport(Dll, EntryPoint = "b2CollideChainSegmentAndCapsule")] + public static unsafe partial B2Manifold CollideChainSegmentAndCapsule( + in B2ChainSegment segmentA, + B2Transform xfA, + in B2Capsule capsuleB, + B2Transform xfB, + in B2SimplexCache cache + ); + + /// Compute the contact manifold between a chain segment and a rounded polygon + [LibraryImport(Dll, EntryPoint = "b2CollideChainSegmentAndPolygon")] + public static unsafe partial B2Manifold CollideChainSegmentAndPolygon( + in B2ChainSegment segmentA, + B2Transform xfA, + in B2Polygon polygonB, + B2Transform xfB, + in B2SimplexCache cache + ); + + /// Constructing the tree initializes the node pool. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_Create")] + internal static unsafe partial B2DynamicTree DynamicTreeCreate(); + + /// Destroy the tree, freeing the node pool. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_Destroy")] + internal static unsafe partial void DynamicTreeDestroy(in B2DynamicTree tree); + + /// Create a proxy. Provide an AABB and a userData value. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_CreateProxy")] + internal static unsafe partial int DynamicTreeCreateProxy( + in B2DynamicTree tree, + B2Aabb aabb, + ulong categoryBits, + ulong userData + ); + + /// Destroy a proxy. This asserts if the id is invalid. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_DestroyProxy")] + internal static unsafe partial void DynamicTreeDestroyProxy(in B2DynamicTree tree, int proxyId); + + /// Move a proxy to a new AABB by removing and reinserting into the tree. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_MoveProxy")] + internal static unsafe partial void DynamicTreeMoveProxy(in B2DynamicTree tree, int proxyId, B2Aabb aabb); + + /// Enlarge a proxy and enlarge ancestors as necessary. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_EnlargeProxy")] + internal static unsafe partial void DynamicTreeEnlargeProxy(in B2DynamicTree tree, int proxyId, B2Aabb aabb); + + /// Modify the category bits on a proxy. This is an expensive operation. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_SetCategoryBits")] + internal static unsafe partial void DynamicTreeSetCategoryBits( + in B2DynamicTree tree, + int proxyId, + ulong categoryBits + ); + + /// Get the category bits on a proxy. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetCategoryBits")] + internal static unsafe partial ulong DynamicTreeGetCategoryBits(in B2DynamicTree tree, int proxyId); + + /// Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB. + /// RETURN: performance data + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_Query")] + internal static unsafe partial B2TreeStats DynamicTreeQuery( + in B2DynamicTree tree, + B2Aabb aabb, + ulong maskBits, + B2TreeQueryCallbackFcn callback, + nint context + ); + + /// Ray cast against the proxies in the tree. This relies on the callback + /// to perform a exact ray cast in the case were the proxy contains a shape. + /// The callback also performs the any collision filtering. This has performance + /// roughly equal to k * log(n), where k is the number of collisions and n is the + /// number of proxies in the tree. + /// Bit-wise filtering using mask bits can greatly improve performance in some scenarios. + /// However, this filtering may be approximate, so the user should still apply filtering to results. + /// the dynamic tree to ray cast + /// the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1) + /// mask bit hint: `bool accept = (maskBits & node->categoryBits) != 0;` + /// a callback class that is called for each proxy that is hit by the ray + /// user context that is passed to the callback + /// RETURN: performance data + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_RayCast")] + internal static unsafe partial B2TreeStats DynamicTreeRayCast( + in B2DynamicTree tree, + in B2RayCastInput input, + ulong maskBits, + B2TreeRayCastCallbackFcn callback, + nint context + ); + + /// Ray cast against the proxies in the tree. This relies on the callback + /// to perform a exact ray cast in the case were the proxy contains a shape. + /// The callback also performs the any collision filtering. This has performance + /// roughly equal to k * log(n), where k is the number of collisions and n is the + /// number of proxies in the tree. + /// the dynamic tree to ray cast + /// the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). + /// filter bits: `bool accept = (maskBits & node->categoryBits) != 0;` + /// a callback class that is called for each proxy that is hit by the shape + /// user context that is passed to the callback + /// RETURN: performance data + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_ShapeCast")] + internal static unsafe partial B2TreeStats DynamicTreeShapeCast( + in B2DynamicTree tree, + in B2ShapeCastInput input, + ulong maskBits, + B2TreeShapeCastCallbackFcn callback, + nint context + ); + + /// Get the height of the binary tree. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetHeight")] + internal static unsafe partial int DynamicTreeGetHeight(in B2DynamicTree tree); + + /// Get the ratio of the sum of the node areas to the root area. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetAreaRatio")] + internal static unsafe partial float DynamicTreeGetAreaRatio(in B2DynamicTree tree); + + /// Get the bounding box that contains the entire tree + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetRootBounds")] + internal static unsafe partial B2Aabb DynamicTreeGetRootBounds(in B2DynamicTree tree); + + /// Get the number of proxies created + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetProxyCount")] + internal static unsafe partial int DynamicTreeGetProxyCount(in B2DynamicTree tree); + + /// Rebuild the tree while retaining subtrees that haven't changed. Returns the number of boxes sorted. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_Rebuild")] + internal static unsafe partial int DynamicTreeRebuild(in B2DynamicTree tree, Bool8 fullBuild); + + /// Get the number of bytes used by this tree + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetByteCount")] + internal static unsafe partial int DynamicTreeGetByteCount(in B2DynamicTree tree); + + /// Get proxy user data + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetUserData")] + internal static unsafe partial ulong DynamicTreeGetUserData(in B2DynamicTree tree, int proxyId); + + /// Get the AABB of a proxy + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_GetAABB")] + internal static unsafe partial B2Aabb DynamicTreeGetAabb(in B2DynamicTree tree, int proxyId); + + /// Validate this tree. For testing. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_Validate")] + internal static unsafe partial void DynamicTreeValidate(in B2DynamicTree tree); + + /// Validate this tree has no enlarged AABBs. For testing. + [LibraryImport(Dll, EntryPoint = "b2DynamicTree_ValidateNoEnlarged")] + internal static unsafe partial void DynamicTreeValidateNoEnlarged(in B2DynamicTree tree); + + /// Solves the position of a mover that satisfies the given collision planes. + /// the desired movement from the position used to generate the collision planes + /// the collision planes + /// the number of collision planes + [LibraryImport(Dll, EntryPoint = "b2SolvePlanes")] + public static unsafe partial B2PlaneSolverResult SolvePlanes( + float2 targetDelta, + in B2CollisionPlane planes, + int count + ); + + /// Clips the velocity against the given collision planes. Planes with zero push or clipVelocity + /// set to false are skipped. + [LibraryImport(Dll, EntryPoint = "b2ClipVector")] + public static unsafe partial float2 ClipVector(float2 vector, in B2CollisionPlane planes, int count); + + /// Use this to initialize your world definition + [LibraryImport(Dll, EntryPoint = "b2DefaultWorldDef")] + internal static unsafe partial B2WorldDef DefaultWorldDef(); + + /// Use this to initialize your body definition + [LibraryImport(Dll, EntryPoint = "b2DefaultBodyDef")] + internal static unsafe partial B2BodyDef DefaultBodyDef(); + + /// Use this to initialize your filter + [LibraryImport(Dll, EntryPoint = "b2DefaultFilter")] + internal static unsafe partial B2Filter DefaultFilter(); + + /// Use this to initialize your query filter + [LibraryImport(Dll, EntryPoint = "b2DefaultQueryFilter")] + internal static unsafe partial B2QueryFilter DefaultQueryFilter(); + + /// Use this to initialize your surface material + [LibraryImport(Dll, EntryPoint = "b2DefaultSurfaceMaterial")] + internal static unsafe partial B2SurfaceMaterial DefaultSurfaceMaterial(); + + /// Use this to initialize your shape definition + [LibraryImport(Dll, EntryPoint = "b2DefaultShapeDef")] + internal static unsafe partial B2ShapeDef DefaultShapeDef(); + + /// Use this to initialize your chain definition + [LibraryImport(Dll, EntryPoint = "b2DefaultChainDef")] + internal static unsafe partial B2ChainDef DefaultChainDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultDistanceJointDef")] + internal static unsafe partial B2DistanceJointDef DefaultDistanceJointDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultMotorJointDef")] + internal static unsafe partial B2MotorJointDef DefaultMotorJointDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultMouseJointDef")] + internal static unsafe partial B2MouseJointDef DefaultMouseJointDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultFilterJointDef")] + internal static unsafe partial B2FilterJointDef DefaultFilterJointDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultPrismaticJointDef")] + internal static unsafe partial B2PrismaticJointDef DefaultPrismaticJointDef(); + + /// Use this to initialize your joint definition. + [LibraryImport(Dll, EntryPoint = "b2DefaultRevoluteJointDef")] + internal static unsafe partial B2RevoluteJointDef DefaultRevoluteJointDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultWeldJointDef")] + internal static unsafe partial B2WeldJointDef DefaultWeldJointDef(); + + /// Use this to initialize your joint definition + [LibraryImport(Dll, EntryPoint = "b2DefaultWheelJointDef")] + internal static unsafe partial B2WheelJointDef DefaultWheelJointDef(); + + /// Use this to initialize your explosion definition + [LibraryImport(Dll, EntryPoint = "b2DefaultExplosionDef")] + internal static unsafe partial B2ExplosionDef DefaultExplosionDef(); + + /// Use this to initialize your drawing interface. This allows you to implement a sub-set + /// of the drawing functions. + [LibraryImport(Dll, EntryPoint = "b2DefaultDebugDraw")] + internal static unsafe partial B2DebugDraw DefaultDebugDraw(); + + /// Create a world for rigid body simulation. A world contains bodies, shapes, and constraints. You make create + /// up to 128 worlds. Each world is completely independent and may be simulated in parallel. + /// RETURN: the world id. + [LibraryImport(Dll, EntryPoint = "b2CreateWorld")] + public static unsafe partial B2World CreateWorld(in B2WorldDef def); + + /// Destroy a world + [LibraryImport(Dll, EntryPoint = "b2DestroyWorld")] + internal static unsafe partial void Dispose(B2World worldId); + + /// World id validation. Provides validation for up to 64K allocations. + [LibraryImport(Dll, EntryPoint = "b2World_IsValid")] + internal static unsafe partial Bool8 WorldIsValid(B2World id); + + /// Simulate a world for one time step. This performs collision detection, integration, and constraint solution. + /// The world to simulate + /// The amount of time to simulate, this should be a fixed number. Usually 1/60. + /// The number of sub-steps, increasing the sub-step count can increase accuracy. Usually 4. + [LibraryImport(Dll, EntryPoint = "b2World_Step")] + internal static unsafe partial void WorldStep(B2World worldId, float timeStep, int subStepCount); + + /// Call this to draw shapes and other debug draw data + [LibraryImport(Dll, EntryPoint = "b2World_Draw")] + internal static unsafe partial void WorldDraw(B2World worldId, in B2DebugDraw draw); + + /// Get the body events for the current time step. The event data is transient. Do not store a reference to this data. + [LibraryImport(Dll, EntryPoint = "b2World_GetBodyEvents")] + internal static unsafe partial B2BodyEvents WorldGetBodyEvents(B2World worldId); + + /// Get sensor events for the current time step. The event data is transient. Do not store a reference to this data. + [LibraryImport(Dll, EntryPoint = "b2World_GetSensorEvents")] + internal static unsafe partial B2SensorEvents WorldGetSensorEvents(B2World worldId); + + /// Get contact events for this current time step. The event data is transient. Do not store a reference to this data. + [LibraryImport(Dll, EntryPoint = "b2World_GetContactEvents")] + internal static unsafe partial B2ContactEvents WorldGetContactEvents(B2World worldId); + + /// Overlap test for all shapes that *potentially* overlap the provided AABB + [LibraryImport(Dll, EntryPoint = "b2World_OverlapAABB")] + internal static unsafe partial B2TreeStats WorldOverlapAabb( + B2World worldId, + B2Aabb aabb, + B2QueryFilter filter, + B2OverlapResultFcn fcn, + nint context + ); + + /// Overlap test for all shapes that overlap the provided shape proxy. + [LibraryImport(Dll, EntryPoint = "b2World_OverlapShape")] + internal static unsafe partial B2TreeStats WorldOverlapShape( + B2World worldId, + in B2ShapeProxy proxy, + B2QueryFilter filter, + B2OverlapResultFcn fcn, + nint context + ); + + /// Cast a ray into the world to collect shapes in the path of the ray. + /// Your callback function controls whether you get the closest point, any point, or n-points. + /// NOTE: The callback function may receive shapes in any order + /// The world to cast the ray against + /// The start point of the ray + /// The translation of the ray from the start point to the end point + /// Contains bit flags to filter unwanted shapes from the results + /// A user implemented callback function + /// A user context that is passed along to the callback function + /// RETURN: traversal performance counters + [LibraryImport(Dll, EntryPoint = "b2World_CastRay")] + internal static unsafe partial B2TreeStats WorldCastRay( + B2World worldId, + float2 origin, + float2 translation, + B2QueryFilter filter, + B2CastResultFcn fcn, + nint context + ); + + /// Cast a ray into the world to collect the closest hit. This is a convenience function. Ignores initial overlap. + /// This is less general than b2World_CastRay() and does not allow for custom filtering. + [LibraryImport(Dll, EntryPoint = "b2World_CastRayClosest")] + internal static unsafe partial B2RayResult WorldCastRayClosest( + B2World worldId, + float2 origin, + float2 translation, + B2QueryFilter filter + ); + + /// Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point. + /// SEE: b2World_CastRay + [LibraryImport(Dll, EntryPoint = "b2World_CastShape")] + internal static unsafe partial B2TreeStats WorldCastShape( + B2World worldId, + in B2ShapeProxy proxy, + float2 translation, + B2QueryFilter filter, + B2CastResultFcn fcn, + nint context + ); + + /// Cast a capsule mover through the world. This is a special shape cast that handles sliding along other shapes while reducing + /// clipping. + [LibraryImport(Dll, EntryPoint = "b2World_CastMover")] + internal static unsafe partial float WorldCastMover( + B2World worldId, + in B2Capsule mover, + float2 translation, + B2QueryFilter filter + ); + + /// Collide a capsule mover with the world, gathering collision planes that can be fed to b2SolvePlanes. Useful for + /// kinematic character movement. + [LibraryImport(Dll, EntryPoint = "b2World_CollideMover")] + internal static unsafe partial void WorldCollideMover( + B2World worldId, + in B2Capsule mover, + B2QueryFilter filter, + B2PlaneResultFcn fcn, + nint context + ); + + /// Enable/disable sleep. If your application does not need sleeping, you can gain some performance + /// by disabling sleep completely at the world level. + /// SEE: b2WorldDef + [LibraryImport(Dll, EntryPoint = "b2World_EnableSleeping")] + internal static unsafe partial void WorldEnableSleeping(B2World worldId, Bool8 flag); + + /// Is body sleeping enabled? + [LibraryImport(Dll, EntryPoint = "b2World_IsSleepingEnabled")] + internal static unsafe partial Bool8 WorldIsSleepingEnabled(B2World worldId); + + /// Enable/disable continuous collision between dynamic and static bodies. Generally you should keep continuous + /// collision enabled to prevent fast moving objects from going through static objects. The performance gain from + /// disabling continuous collision is minor. + /// SEE: b2WorldDef + [LibraryImport(Dll, EntryPoint = "b2World_EnableContinuous")] + internal static unsafe partial void WorldEnableContinuous(B2World worldId, Bool8 flag); + + /// Is continuous collision enabled? + [LibraryImport(Dll, EntryPoint = "b2World_IsContinuousEnabled")] + internal static unsafe partial Bool8 WorldIsContinuousEnabled(B2World worldId); + + /// Adjust the restitution threshold. It is recommended not to make this value very small + /// because it will prevent bodies from sleeping. Usually in meters per second. + /// SEE: b2WorldDef + [LibraryImport(Dll, EntryPoint = "b2World_SetRestitutionThreshold")] + internal static unsafe partial void WorldSetRestitutionThreshold(B2World worldId, float value); + + /// Get the the restitution speed threshold. Usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2World_GetRestitutionThreshold")] + internal static unsafe partial float WorldGetRestitutionThreshold(B2World worldId); + + /// Adjust the hit event threshold. This controls the collision speed needed to generate a b2ContactHitEvent. + /// Usually in meters per second. + /// SEE: b2WorldDef::hitEventThreshold + [LibraryImport(Dll, EntryPoint = "b2World_SetHitEventThreshold")] + internal static unsafe partial void WorldSetHitEventThreshold(B2World worldId, float value); + + /// Get the the hit event speed threshold. Usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2World_GetHitEventThreshold")] + internal static unsafe partial float WorldGetHitEventThreshold(B2World worldId); + + /// Register the custom filter callback. This is optional. + [LibraryImport(Dll, EntryPoint = "b2World_SetCustomFilterCallback")] + internal static unsafe partial void WorldSetCustomFilterCallback( + B2World worldId, + B2CustomFilterFcn fcn, + nint context + ); + + /// Register the pre-solve callback. This is optional. + [LibraryImport(Dll, EntryPoint = "b2World_SetPreSolveCallback")] + internal static unsafe partial void WorldSetPreSolveCallback(B2World worldId, B2PreSolveFcn fcn, nint context); + + /// Set the gravity vector for the entire world. Box2D has no concept of an up direction and this + /// is left as a decision for the application. Usually in m/s^2. + /// SEE: b2WorldDef + [LibraryImport(Dll, EntryPoint = "b2World_SetGravity")] + internal static unsafe partial void WorldSetGravity(B2World worldId, float2 gravity); + + /// Get the gravity vector + [LibraryImport(Dll, EntryPoint = "b2World_GetGravity")] + internal static unsafe partial float2 WorldGetGravity(B2World worldId); + + /// Apply a radial explosion + /// The world id + /// The explosion definition + [LibraryImport(Dll, EntryPoint = "b2World_Explode")] + internal static unsafe partial void WorldExplode(B2World worldId, in B2ExplosionDef explosionDef); + + /// Adjust contact tuning parameters + /// The world id + /// The contact stiffness (cycles per second) + /// The contact bounciness with 1 being critical damping (non-dimensional) + /// The maximum contact constraint push out speed (meters per second) + /// NOTE: Advanced feature + [LibraryImport(Dll, EntryPoint = "b2World_SetContactTuning")] + internal static unsafe partial void WorldSetContactTuning( + B2World worldId, + float hertz, + float dampingRatio, + float pushSpeed + ); + + /// Set the maximum linear speed. Usually in m/s. + [LibraryImport(Dll, EntryPoint = "b2World_SetMaximumLinearSpeed")] + internal static unsafe partial void WorldSetMaximumLinearSpeed(B2World worldId, float maximumLinearSpeed); + + /// Get the maximum linear speed. Usually in m/s. + [LibraryImport(Dll, EntryPoint = "b2World_GetMaximumLinearSpeed")] + internal static unsafe partial float WorldGetMaximumLinearSpeed(B2World worldId); + + /// Enable/disable constraint warm starting. Advanced feature for testing. Disabling + /// warm starting greatly reduces stability and provides no performance gain. + [LibraryImport(Dll, EntryPoint = "b2World_EnableWarmStarting")] + internal static unsafe partial void WorldEnableWarmStarting(B2World worldId, Bool8 flag); + + /// Is constraint warm starting enabled? + [LibraryImport(Dll, EntryPoint = "b2World_IsWarmStartingEnabled")] + internal static unsafe partial Bool8 WorldIsWarmStartingEnabled(B2World worldId); + + /// Get the number of awake bodies. + [LibraryImport(Dll, EntryPoint = "b2World_GetAwakeBodyCount")] + internal static unsafe partial int WorldGetAwakeBodyCount(B2World worldId); + + /// Get the current world performance profile + [LibraryImport(Dll, EntryPoint = "b2World_GetProfile")] + internal static unsafe partial B2Profile WorldGetProfile(B2World worldId); + + /// Get world counters and sizes + [LibraryImport(Dll, EntryPoint = "b2World_GetCounters")] + internal static unsafe partial B2Counters WorldGetCounters(B2World worldId); + + /// Set the user data pointer. + [LibraryImport(Dll, EntryPoint = "b2World_SetUserData")] + internal static unsafe partial void WorldSetUserData(B2World worldId, nint userData); + + /// Get the user data pointer. + [LibraryImport(Dll, EntryPoint = "b2World_GetUserData")] + internal static unsafe partial void* WorldGetUserData(B2World worldId); + + /// Set the friction callback. Passing NULL resets to default. + [LibraryImport(Dll, EntryPoint = "b2World_SetFrictionCallback")] + internal static unsafe partial void WorldSetFrictionCallback(B2World worldId, B2FrictionCallback callback); + + /// Set the restitution callback. Passing NULL resets to default. + [LibraryImport(Dll, EntryPoint = "b2World_SetRestitutionCallback")] + internal static unsafe partial void WorldSetRestitutionCallback( + B2World worldId, + B2RestitutionCallback callback + ); + + /// Dump memory stats to box2d_memory.txt + [LibraryImport(Dll, EntryPoint = "b2World_DumpMemoryStats")] + internal static unsafe partial void WorldDumpMemoryStats(B2World worldId); + + /// This is for internal testing + [LibraryImport(Dll, EntryPoint = "b2World_RebuildStaticTree")] + internal static unsafe partial void WorldRebuildStaticTree(B2World worldId); + + /// This is for internal testing + [LibraryImport(Dll, EntryPoint = "b2World_EnableSpeculative")] + internal static unsafe partial void WorldEnableSpeculative(B2World worldId, Bool8 flag); + + /// Create a rigid body given a definition. No reference to the definition is retained. So you can create the definition + /// on the stack and pass it as a pointer. + /// WARNING: This function is locked during callbacks. + [LibraryImport(Dll, EntryPoint = "b2CreateBody")] + internal static unsafe partial B2Body CreateBody(B2World worldId, in B2BodyDef def); + + /// Destroy a rigid body given an id. This destroys all shapes and joints attached to the body. + /// Do not keep references to the associated shapes and joints. + [LibraryImport(Dll, EntryPoint = "b2DestroyBody")] + internal static unsafe partial void Dispose(B2Body bodyId); + + /// Body identifier validation. Can be used to detect orphaned ids. Provides validation for up to 64K allocations. + [LibraryImport(Dll, EntryPoint = "b2Body_IsValid")] + internal static unsafe partial Bool8 BodyIsValid(B2Body id); + + /// Get the body type: static, kinematic, or dynamic + [LibraryImport(Dll, EntryPoint = "b2Body_GetType")] + internal static unsafe partial B2BodyType GetBodyType(B2Body bodyId); + + /// Change the body type. This is an expensive operation. This automatically updates the mass + /// properties regardless of the automatic mass setting. + [LibraryImport(Dll, EntryPoint = "b2Body_SetType")] + internal static unsafe partial void BodySetType(B2Body bodyId, B2BodyType type); + + /// Set the body name. Up to 31 characters excluding 0 termination. + [LibraryImport(Dll, EntryPoint = "b2Body_SetName")] + internal static unsafe partial void BodySetName(B2Body bodyId, byte* name); + + /// Get the body name. May be null. + [LibraryImport(Dll, EntryPoint = "b2Body_GetName")] + internal static unsafe partial byte* BodyGetName(B2Body bodyId); + + /// Set the user data for a body + [LibraryImport(Dll, EntryPoint = "b2Body_SetUserData")] + internal static unsafe partial void BodySetUserData(B2Body bodyId, nint userData); + + /// Get the user data stored in a body + [LibraryImport(Dll, EntryPoint = "b2Body_GetUserData")] + internal static unsafe partial void* BodyGetUserData(B2Body bodyId); + + /// Get the world position of a body. This is the location of the body origin. + [LibraryImport(Dll, EntryPoint = "b2Body_GetPosition")] + internal static unsafe partial float2 BodyGetPosition(B2Body bodyId); + + /// Get the world rotation of a body as a cosine/sine pair (complex number) + [LibraryImport(Dll, EntryPoint = "b2Body_GetRotation")] + internal static unsafe partial B2Rot BodyGetRotation(B2Body bodyId); + + /// Get the world transform of a body. + [LibraryImport(Dll, EntryPoint = "b2Body_GetTransform")] + internal static unsafe partial B2Transform BodyGetTransform(B2Body bodyId); + + /// Set the world transform of a body. This acts as a teleport and is fairly expensive. + /// NOTE: Generally you should create a body with then intended transform. + /// SEE: b2BodyDef::position and b2BodyDef::angle + [LibraryImport(Dll, EntryPoint = "b2Body_SetTransform")] + internal static unsafe partial void BodySetTransform(B2Body bodyId, float2 position, B2Rot rotation); + + /// Get a local point on a body given a world point + [LibraryImport(Dll, EntryPoint = "b2Body_GetLocalPoint")] + internal static unsafe partial float2 BodyGetLocalPoint(B2Body bodyId, float2 worldPoint); + + /// Get a world point on a body given a local point + [LibraryImport(Dll, EntryPoint = "b2Body_GetWorldPoint")] + internal static unsafe partial float2 BodyGetWorldPoint(B2Body bodyId, float2 localPoint); + + /// Get a local vector on a body given a world vector + [LibraryImport(Dll, EntryPoint = "b2Body_GetLocalVector")] + internal static unsafe partial float2 BodyGetLocalVector(B2Body bodyId, float2 worldVector); + + /// Get a world vector on a body given a local vector + [LibraryImport(Dll, EntryPoint = "b2Body_GetWorldVector")] + internal static unsafe partial float2 BodyGetWorldVector(B2Body bodyId, float2 localVector); + + /// Get the linear velocity of a body's center of mass. Usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2Body_GetLinearVelocity")] + internal static unsafe partial float2 BodyGetLinearVelocity(B2Body bodyId); + + /// Get the angular velocity of a body in radians per second + [LibraryImport(Dll, EntryPoint = "b2Body_GetAngularVelocity")] + internal static unsafe partial float BodyGetAngularVelocity(B2Body bodyId); + + /// Set the linear velocity of a body. Usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2Body_SetLinearVelocity")] + internal static unsafe partial void BodySetLinearVelocity(B2Body bodyId, float2 linearVelocity); + + /// Set the angular velocity of a body in radians per second + [LibraryImport(Dll, EntryPoint = "b2Body_SetAngularVelocity")] + internal static unsafe partial void BodySetAngularVelocity(B2Body bodyId, float angularVelocity); + + /// Set the velocity to reach the given transform after a given time step. + /// The result will be close but maybe not exact. This is meant for kinematic bodies. + /// The target is not applied if the velocity would be below the sleep threshold. + /// This will automatically wake the body if asleep. + [LibraryImport(Dll, EntryPoint = "b2Body_SetTargetTransform")] + internal static unsafe partial void BodySetTargetTransform(B2Body bodyId, B2Transform target, float timeStep); + + /// Get the linear velocity of a local point attached to a body. Usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2Body_GetLocalPointVelocity")] + internal static unsafe partial float2 BodyGetLocalPointVelocity(B2Body bodyId, float2 localPoint); + + /// Get the linear velocity of a world point attached to a body. Usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2Body_GetWorldPointVelocity")] + internal static unsafe partial float2 BodyGetWorldPointVelocity(B2Body bodyId, float2 worldPoint); + + /// Apply a force at a world point. If the force is not applied at the center of mass, + /// it will generate a torque and affect the angular velocity. This optionally wakes up the body. + /// The force is ignored if the body is not awake. + /// The body id + /// The world force vector, usually in newtons (N) + /// The world position of the point of application + /// Option to wake up the body + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyForce")] + internal static unsafe partial void BodyApplyForce(B2Body bodyId, float2 force, float2 point, Bool8 wake); + + /// Apply a force to the center of mass. This optionally wakes up the body. + /// The force is ignored if the body is not awake. + /// The body id + /// the world force vector, usually in newtons (N). + /// also wake up the body + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyForceToCenter")] + internal static unsafe partial void BodyApplyForceToCenter(B2Body bodyId, float2 force, Bool8 wake); + + /// Apply a torque. This affects the angular velocity without affecting the linear velocity. + /// This optionally wakes the body. The torque is ignored if the body is not awake. + /// The body id + /// about the z-axis (out of the screen), usually in N*m. + /// also wake up the body + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyTorque")] + internal static unsafe partial void BodyApplyTorque(B2Body bodyId, float torque, Bool8 wake); + + /// Apply an impulse at a point. This immediately modifies the velocity. + /// It also modifies the angular velocity if the point of application + /// is not at the center of mass. This optionally wakes the body. + /// The impulse is ignored if the body is not awake. + /// The body id + /// the world impulse vector, usually in N*s or kg*m/s. + /// the world position of the point of application. + /// also wake up the body + /// WARNING: This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyLinearImpulse")] + internal static unsafe partial void BodyApplyLinearImpulse( + B2Body bodyId, + float2 impulse, + float2 point, + Bool8 wake + ); + + /// Apply an impulse to the center of mass. This immediately modifies the velocity. + /// The impulse is ignored if the body is not awake. This optionally wakes the body. + /// The body id + /// the world impulse vector, usually in N*s or kg*m/s. + /// also wake up the body + /// WARNING: This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyLinearImpulseToCenter")] + internal static unsafe partial void BodyApplyLinearImpulseToCenter(B2Body bodyId, float2 impulse, Bool8 wake); + + /// Apply an angular impulse. The impulse is ignored if the body is not awake. + /// This optionally wakes the body. + /// The body id + /// the angular impulse, usually in units of kg*m*m/s + /// also wake up the body + /// WARNING: This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyAngularImpulse")] + internal static unsafe partial void BodyApplyAngularImpulse(B2Body bodyId, float impulse, Bool8 wake); + + /// Get the mass of the body, usually in kilograms + [LibraryImport(Dll, EntryPoint = "b2Body_GetMass")] + internal static unsafe partial float BodyGetMass(B2Body bodyId); + + /// Get the rotational inertia of the body, usually in kg*m^2 + [LibraryImport(Dll, EntryPoint = "b2Body_GetRotationalInertia")] + internal static unsafe partial float BodyGetRotationalInertia(B2Body bodyId); + + /// Get the center of mass position of the body in local space + [LibraryImport(Dll, EntryPoint = "b2Body_GetLocalCenterOfMass")] + internal static unsafe partial float2 BodyGetLocalCenterOfMass(B2Body bodyId); + + /// Get the center of mass position of the body in world space + [LibraryImport(Dll, EntryPoint = "b2Body_GetWorldCenterOfMass")] + internal static unsafe partial float2 BodyGetWorldCenterOfMass(B2Body bodyId); + + /// Override the body's mass properties. Normally this is computed automatically using the + /// shape geometry and density. This information is lost if a shape is added or removed or if the + /// body type changes. + [LibraryImport(Dll, EntryPoint = "b2Body_SetMassData")] + internal static unsafe partial void BodySetMassData(B2Body bodyId, B2MassData massData); + + /// Get the mass data for a body + [LibraryImport(Dll, EntryPoint = "b2Body_GetMassData")] + internal static unsafe partial B2MassData BodyGetMassData(B2Body bodyId); + + /// This update the mass properties to the sum of the mass properties of the shapes. + /// This normally does not need to be called unless you called SetMassData to override + /// the mass and you later want to reset the mass. + /// You may also use this when automatic mass computation has been disabled. + /// You should call this regardless of body type. + /// Note that sensor shapes may have mass. + [LibraryImport(Dll, EntryPoint = "b2Body_ApplyMassFromShapes")] + internal static unsafe partial void BodyApplyMassFromShapes(B2Body bodyId); + + /// Adjust the linear damping. Normally this is set in b2BodyDef before creation. + [LibraryImport(Dll, EntryPoint = "b2Body_SetLinearDamping")] + internal static unsafe partial void BodySetLinearDamping(B2Body bodyId, float linearDamping); + + /// Get the current linear damping. + [LibraryImport(Dll, EntryPoint = "b2Body_GetLinearDamping")] + internal static unsafe partial float BodyGetLinearDamping(B2Body bodyId); + + /// Adjust the angular damping. Normally this is set in b2BodyDef before creation. + [LibraryImport(Dll, EntryPoint = "b2Body_SetAngularDamping")] + internal static unsafe partial void BodySetAngularDamping(B2Body bodyId, float angularDamping); + + /// Get the current angular damping. + [LibraryImport(Dll, EntryPoint = "b2Body_GetAngularDamping")] + internal static unsafe partial float BodyGetAngularDamping(B2Body bodyId); + + /// Adjust the gravity scale. Normally this is set in b2BodyDef before creation. + /// SEE: b2BodyDef::gravityScale + [LibraryImport(Dll, EntryPoint = "b2Body_SetGravityScale")] + internal static unsafe partial void BodySetGravityScale(B2Body bodyId, float gravityScale); + + /// Get the current gravity scale + [LibraryImport(Dll, EntryPoint = "b2Body_GetGravityScale")] + internal static unsafe partial float BodyGetGravityScale(B2Body bodyId); + + /// RETURN: true if this body is awake + [LibraryImport(Dll, EntryPoint = "b2Body_IsAwake")] + internal static unsafe partial Bool8 BodyIsAwake(B2Body bodyId); + + /// Wake a body from sleep. This wakes the entire island the body is touching. + /// WARNING: Putting a body to sleep will put the entire island of bodies touching this body to sleep, which can be expensive and possibly unintuitive. + [LibraryImport(Dll, EntryPoint = "b2Body_SetAwake")] + internal static unsafe partial void BodySetAwake(B2Body bodyId, Bool8 awake); + + /// Enable or disable sleeping for this body. If sleeping is disabled the body will wake. + [LibraryImport(Dll, EntryPoint = "b2Body_EnableSleep")] + internal static unsafe partial void BodyEnableSleep(B2Body bodyId, Bool8 enableSleep); + + /// Returns true if sleeping is enabled for this body + [LibraryImport(Dll, EntryPoint = "b2Body_IsSleepEnabled")] + internal static unsafe partial Bool8 BodyIsSleepEnabled(B2Body bodyId); + + /// Set the sleep threshold, usually in meters per second + [LibraryImport(Dll, EntryPoint = "b2Body_SetSleepThreshold")] + internal static unsafe partial void BodySetSleepThreshold(B2Body bodyId, float sleepThreshold); + + /// Get the sleep threshold, usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2Body_GetSleepThreshold")] + internal static unsafe partial float BodyGetSleepThreshold(B2Body bodyId); + + /// Returns true if this body is enabled + [LibraryImport(Dll, EntryPoint = "b2Body_IsEnabled")] + internal static unsafe partial Bool8 BodyIsEnabled(B2Body bodyId); + + /// Disable a body by removing it completely from the simulation. This is expensive. + [LibraryImport(Dll, EntryPoint = "b2Body_Disable")] + internal static unsafe partial void BodyDisable(B2Body bodyId); + + /// Enable a body by adding it to the simulation. This is expensive. + [LibraryImport(Dll, EntryPoint = "b2Body_Enable")] + internal static unsafe partial void BodyEnable(B2Body bodyId); + + /// Set this body to have fixed rotation. This causes the mass to be reset in all cases. + [LibraryImport(Dll, EntryPoint = "b2Body_SetFixedRotation")] + internal static unsafe partial void BodySetFixedRotation(B2Body bodyId, Bool8 flag); + + /// Does this body have fixed rotation? + [LibraryImport(Dll, EntryPoint = "b2Body_IsFixedRotation")] + internal static unsafe partial Bool8 BodyIsFixedRotation(B2Body bodyId); + + /// Set this body to be a bullet. A bullet does continuous collision detection + /// against dynamic bodies (but not other bullets). + [LibraryImport(Dll, EntryPoint = "b2Body_SetBullet")] + internal static unsafe partial void BodySetBullet(B2Body bodyId, Bool8 flag); + + /// Is this body a bullet? + [LibraryImport(Dll, EntryPoint = "b2Body_IsBullet")] + internal static unsafe partial Bool8 BodyIsBullet(B2Body bodyId); + + /// Enable/disable contact events on all shapes. + /// SEE: b2ShapeDef::enableContactEvents + /// WARNING: changing this at runtime may cause mismatched begin/end touch events + [LibraryImport(Dll, EntryPoint = "b2Body_EnableContactEvents")] + internal static unsafe partial void BodyEnableContactEvents(B2Body bodyId, Bool8 flag); + + /// Enable/disable hit events on all shapes + /// SEE: b2ShapeDef::enableHitEvents + [LibraryImport(Dll, EntryPoint = "b2Body_EnableHitEvents")] + internal static unsafe partial void BodyEnableHitEvents(B2Body bodyId, Bool8 flag); + + /// Get the world that owns this body + [LibraryImport(Dll, EntryPoint = "b2Body_GetWorld")] + internal static unsafe partial B2World BodyGetWorld(B2Body bodyId); + + /// Get the number of shapes on this body + [LibraryImport(Dll, EntryPoint = "b2Body_GetShapeCount")] + internal static unsafe partial int BodyGetShapeCount(B2Body bodyId); + + /// Get the shape ids for all shapes on this body, up to the provided capacity. + /// RETURNS: the number of shape ids stored in the user array + [LibraryImport(Dll, EntryPoint = "b2Body_GetShapes")] + internal static unsafe partial int BodyGetShapes(B2Body bodyId, in B2Shape shapeArray, int capacity); + + /// Get the number of joints on this body + [LibraryImport(Dll, EntryPoint = "b2Body_GetJointCount")] + internal static unsafe partial int BodyGetJointCount(B2Body bodyId); + + /// Get the maximum capacity required for retrieving all the touching contacts on a body + [LibraryImport(Dll, EntryPoint = "b2Body_GetContactCapacity")] + internal static unsafe partial int BodyGetContactCapacity(B2Body bodyId); + + /// Get the touching contact data for a body. + /// NOTE: Box2D uses speculative collision so some contact points may be separated. + /// RETURNS: the number of elements filled in the provided array + /// WARNING: do not ignore the return value, it specifies the valid number of elements + [LibraryImport(Dll, EntryPoint = "b2Body_GetContactData")] + internal static unsafe partial int BodyGetContactData( + B2Body bodyId, + in B2ContactData contactData, + int capacity + ); + + /// Get the current world AABB that contains all the attached shapes. Note that this may not encompass the body origin. + /// If there are no shapes attached then the returned AABB is empty and centered on the body origin. + [LibraryImport(Dll, EntryPoint = "b2Body_ComputeAABB")] + internal static unsafe partial B2Aabb BodyComputeAabb(B2Body bodyId); + + /// Create a circle shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + [LibraryImport(Dll, EntryPoint = "b2CreateCircleShape")] + internal static unsafe partial B2Shape CreateCircleShape(B2Body bodyId, in B2ShapeDef def, in B2Circle circle); + + /// Create a line segment shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + [LibraryImport(Dll, EntryPoint = "b2CreateSegmentShape")] + internal static unsafe partial B2Shape CreateSegmentShape( + B2Body bodyId, + in B2ShapeDef def, + in B2Segment segment + ); + + /// Create a capsule shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + [LibraryImport(Dll, EntryPoint = "b2CreateCapsuleShape")] + internal static unsafe partial B2Shape CreateCapsuleShape( + B2Body bodyId, + in B2ShapeDef def, + in B2Capsule capsule + ); + + /// Create a polygon shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + [LibraryImport(Dll, EntryPoint = "b2CreatePolygonShape")] + internal static unsafe partial B2Shape CreatePolygonShape( + B2Body bodyId, + in B2ShapeDef def, + in B2Polygon polygon + ); + + /// Destroy a shape. You may defer the body mass update which can improve performance if several shapes on a + /// body are destroyed at once. + /// SEE: b2Body_ApplyMassFromShapes + [LibraryImport(Dll, EntryPoint = "b2DestroyShape")] + internal static unsafe partial void Dispose(B2Shape shapeId, Bool8 updateBodyMass); + + /// Shape identifier validation. Provides validation for up to 64K allocations. + [LibraryImport(Dll, EntryPoint = "b2Shape_IsValid")] + internal static unsafe partial Bool8 ShapeIsValid(B2Shape id); + + /// Get the type of a shape + [LibraryImport(Dll, EntryPoint = "b2Shape_GetType")] + internal static unsafe partial B2ShapeType GetShapeType(B2Shape shapeId); + + /// Get the id of the body that a shape is attached to + [LibraryImport(Dll, EntryPoint = "b2Shape_GetBody")] + internal static unsafe partial B2Body ShapeGetBody(B2Shape shapeId); + + /// Get the world that owns this shape + [LibraryImport(Dll, EntryPoint = "b2Shape_GetWorld")] + internal static unsafe partial B2World ShapeGetWorld(B2Shape shapeId); + + /// Returns true if the shape is a sensor. It is not possible to change a shape + /// from sensor to solid dynamically because this breaks the contract for + /// sensor events. + [LibraryImport(Dll, EntryPoint = "b2Shape_IsSensor")] + internal static unsafe partial Bool8 ShapeIsSensor(B2Shape shapeId); + + /// Set the user data for a shape + [LibraryImport(Dll, EntryPoint = "b2Shape_SetUserData")] + internal static unsafe partial void ShapeSetUserData(B2Shape shapeId, nint userData); + + /// Get the user data for a shape. This is useful when you get a shape id + /// from an event or query. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetUserData")] + internal static unsafe partial void* ShapeGetUserData(B2Shape shapeId); + + /// Set the mass density of a shape, usually in kg/m^2. + /// This will optionally update the mass properties on the parent body. + /// SEE: b2ShapeDef::density, b2Body_ApplyMassFromShapes + [LibraryImport(Dll, EntryPoint = "b2Shape_SetDensity")] + internal static unsafe partial void ShapeSetDensity(B2Shape shapeId, float density, Bool8 updateBodyMass); + + /// Get the density of a shape, usually in kg/m^2 + [LibraryImport(Dll, EntryPoint = "b2Shape_GetDensity")] + internal static unsafe partial float ShapeGetDensity(B2Shape shapeId); + + /// Set the friction on a shape + /// SEE: b2ShapeDef::friction + [LibraryImport(Dll, EntryPoint = "b2Shape_SetFriction")] + internal static unsafe partial void ShapeSetFriction(B2Shape shapeId, float friction); + + /// Get the friction of a shape + [LibraryImport(Dll, EntryPoint = "b2Shape_GetFriction")] + internal static unsafe partial float ShapeGetFriction(B2Shape shapeId); + + /// Set the shape restitution (bounciness) + /// SEE: b2ShapeDef::restitution + [LibraryImport(Dll, EntryPoint = "b2Shape_SetRestitution")] + internal static unsafe partial void ShapeSetRestitution(B2Shape shapeId, float restitution); + + /// Get the shape restitution + [LibraryImport(Dll, EntryPoint = "b2Shape_GetRestitution")] + internal static unsafe partial float ShapeGetRestitution(B2Shape shapeId); + + /// Set the shape material identifier + /// SEE: b2ShapeDef::material + [LibraryImport(Dll, EntryPoint = "b2Shape_SetMaterial")] + internal static unsafe partial void ShapeSetMaterial(B2Shape shapeId, int material); + + /// Get the shape material identifier + [LibraryImport(Dll, EntryPoint = "b2Shape_GetMaterial")] + internal static unsafe partial int ShapeGetMaterial(B2Shape shapeId); + + /// Set the shape surface material + [LibraryImport(Dll, EntryPoint = "b2Shape_SetSurfaceMaterial")] + internal static unsafe partial void ShapeSetSurfaceMaterial(B2Shape shapeId, B2SurfaceMaterial surfaceMaterial); + + /// Get the shape surface material + [LibraryImport(Dll, EntryPoint = "b2Shape_GetSurfaceMaterial")] + internal static unsafe partial B2SurfaceMaterial ShapeGetSurfaceMaterial(B2Shape shapeId); + + /// Get the shape filter + [LibraryImport(Dll, EntryPoint = "b2Shape_GetFilter")] + internal static unsafe partial B2Filter ShapeGetFilter(B2Shape shapeId); + + /// Set the current filter. This is almost as expensive as recreating the shape. This may cause + /// contacts to be immediately destroyed. However contacts are not created until the next world step. + /// Sensor overlap state is also not updated until the next world step. + /// SEE: b2ShapeDef::filter + [LibraryImport(Dll, EntryPoint = "b2Shape_SetFilter")] + internal static unsafe partial void ShapeSetFilter(B2Shape shapeId, B2Filter filter); + + /// Enable sensor events for this shape. + /// SEE: b2ShapeDef::enableSensorEvents + [LibraryImport(Dll, EntryPoint = "b2Shape_EnableSensorEvents")] + internal static unsafe partial void ShapeEnableSensorEvents(B2Shape shapeId, Bool8 flag); + + /// Returns true if sensor events are enabled. + [LibraryImport(Dll, EntryPoint = "b2Shape_AreSensorEventsEnabled")] + internal static unsafe partial Bool8 ShapeAreSensorEventsEnabled(B2Shape shapeId); + + /// Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. + /// SEE: b2ShapeDef::enableContactEvents + /// WARNING: changing this at run-time may lead to lost begin/end events + [LibraryImport(Dll, EntryPoint = "b2Shape_EnableContactEvents")] + internal static unsafe partial void ShapeEnableContactEvents(B2Shape shapeId, Bool8 flag); + + /// Returns true if contact events are enabled + [LibraryImport(Dll, EntryPoint = "b2Shape_AreContactEventsEnabled")] + internal static unsafe partial Bool8 ShapeAreContactEventsEnabled(B2Shape shapeId); + + /// Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive + /// and must be carefully handled due to multithreading. Ignored for sensors. + /// SEE: b2PreSolveFcn + [LibraryImport(Dll, EntryPoint = "b2Shape_EnablePreSolveEvents")] + internal static unsafe partial void ShapeEnablePreSolveEvents(B2Shape shapeId, Bool8 flag); + + /// Returns true if pre-solve events are enabled + [LibraryImport(Dll, EntryPoint = "b2Shape_ArePreSolveEventsEnabled")] + internal static unsafe partial Bool8 ShapeArePreSolveEventsEnabled(B2Shape shapeId); + + /// Enable contact hit events for this shape. Ignored for sensors. + /// SEE: b2WorldDef.hitEventThreshold + [LibraryImport(Dll, EntryPoint = "b2Shape_EnableHitEvents")] + internal static unsafe partial void ShapeEnableHitEvents(B2Shape shapeId, Bool8 flag); + + /// Returns true if hit events are enabled + [LibraryImport(Dll, EntryPoint = "b2Shape_AreHitEventsEnabled")] + internal static unsafe partial Bool8 ShapeAreHitEventsEnabled(B2Shape shapeId); + + /// Test a point for overlap with a shape + [LibraryImport(Dll, EntryPoint = "b2Shape_TestPoint")] + internal static unsafe partial Bool8 ShapeTestPoint(B2Shape shapeId, float2 point); + + /// Ray cast a shape directly + [LibraryImport(Dll, EntryPoint = "b2Shape_RayCast")] + internal static unsafe partial B2CastOutput ShapeRayCast(B2Shape shapeId, in B2RayCastInput input); + + /// Get a copy of the shape's circle. Asserts the type is correct. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetCircle")] + internal static unsafe partial B2Circle ShapeGetCircle(B2Shape shapeId); + + /// Get a copy of the shape's line segment. Asserts the type is correct. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetSegment")] + internal static unsafe partial B2Segment ShapeGetSegment(B2Shape shapeId); + + /// Get a copy of the shape's chain segment. These come from chain shapes. + /// Asserts the type is correct. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetChainSegment")] + internal static unsafe partial B2ChainSegment ShapeGetChainSegment(B2Shape shapeId); + + /// Get a copy of the shape's capsule. Asserts the type is correct. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetCapsule")] + internal static unsafe partial B2Capsule ShapeGetCapsule(B2Shape shapeId); + + /// Get a copy of the shape's convex polygon. Asserts the type is correct. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetPolygon")] + internal static unsafe partial B2Polygon ShapeGetPolygon(B2Shape shapeId); + + /// Allows you to change a shape to be a circle or update the current circle. + /// This does not modify the mass properties. + /// SEE: b2Body_ApplyMassFromShapes + [LibraryImport(Dll, EntryPoint = "b2Shape_SetCircle")] + internal static unsafe partial void ShapeSetCircle(B2Shape shapeId, in B2Circle circle); + + /// Allows you to change a shape to be a capsule or update the current capsule. + /// This does not modify the mass properties. + /// SEE: b2Body_ApplyMassFromShapes + [LibraryImport(Dll, EntryPoint = "b2Shape_SetCapsule")] + internal static unsafe partial void ShapeSetCapsule(B2Shape shapeId, in B2Capsule capsule); + + /// Allows you to change a shape to be a segment or update the current segment. + [LibraryImport(Dll, EntryPoint = "b2Shape_SetSegment")] + internal static unsafe partial void ShapeSetSegment(B2Shape shapeId, in B2Segment segment); + + /// Allows you to change a shape to be a polygon or update the current polygon. + /// This does not modify the mass properties. + /// SEE: b2Body_ApplyMassFromShapes + [LibraryImport(Dll, EntryPoint = "b2Shape_SetPolygon")] + internal static unsafe partial void ShapeSetPolygon(B2Shape shapeId, in B2Polygon polygon); + + /// Get the parent chain id if the shape type is a chain segment, otherwise + /// returns b2_nullChainId. + [LibraryImport(Dll, EntryPoint = "b2Shape_GetParentChain")] + internal static unsafe partial B2Chain ShapeGetParentChain(B2Shape shapeId); + + /// Get the maximum capacity required for retrieving all the touching contacts on a shape + [LibraryImport(Dll, EntryPoint = "b2Shape_GetContactCapacity")] + internal static unsafe partial int ShapeGetContactCapacity(B2Shape shapeId); + + /// Get the touching contact data for a shape. The provided shapeId will be either shapeIdA or shapeIdB on the contact data. + /// NOTE: Box2D uses speculative collision so some contact points may be separated. + /// RETURNS: the number of elements filled in the provided array + /// WARNING: do not ignore the return value, it specifies the valid number of elements + [LibraryImport(Dll, EntryPoint = "b2Shape_GetContactData")] + internal static unsafe partial int ShapeGetContactData( + B2Shape shapeId, + in B2ContactData contactData, + int capacity + ); + + /// Get the maximum capacity required for retrieving all the overlapped shapes on a sensor shape. + /// This returns 0 if the provided shape is not a sensor. + /// the id of a sensor shape + /// RETURNS: the required capacity to get all the overlaps in b2Shape_GetSensorOverlaps + [LibraryImport(Dll, EntryPoint = "b2Shape_GetSensorCapacity")] + internal static unsafe partial int ShapeGetSensorCapacity(B2Shape shapeId); + + /// Get the overlapped shapes for a sensor shape. + /// the id of a sensor shape + /// a user allocated array that is filled with the overlapping shapes + /// the capacity of overlappedShapes + /// RETURNS: the number of elements filled in the provided array + /// WARNING: do not ignore the return value, it specifies the valid number of elements + /// WARNING: overlaps may contain destroyed shapes so use b2Shape_IsValid to confirm each overlap + [LibraryImport(Dll, EntryPoint = "b2Shape_GetSensorOverlaps")] + internal static unsafe partial int ShapeGetSensorOverlaps(B2Shape shapeId, in B2Shape overlaps, int capacity); + + /// Get the current world AABB + [LibraryImport(Dll, EntryPoint = "b2Shape_GetAABB")] + internal static unsafe partial B2Aabb ShapeGetAabb(B2Shape shapeId); + + /// Get the mass data for a shape + [LibraryImport(Dll, EntryPoint = "b2Shape_GetMassData")] + internal static unsafe partial B2MassData ShapeGetMassData(B2Shape shapeId); + + /// Get the closest point on a shape to a target point. Target and result are in world space. + /// todo need sample + [LibraryImport(Dll, EntryPoint = "b2Shape_GetClosestPoint")] + internal static unsafe partial float2 ShapeGetClosestPoint(B2Shape shapeId, float2 target); + + /// Create a chain shape + /// SEE: b2ChainDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateChain")] + internal static unsafe partial B2Chain CreateChain(B2Body bodyId, in B2ChainDef def); + + /// Destroy a chain shape + [LibraryImport(Dll, EntryPoint = "b2DestroyChain")] + internal static unsafe partial void Dispose(B2Chain chainId); + + /// Get the world that owns this chain shape + [LibraryImport(Dll, EntryPoint = "b2Chain_GetWorld")] + internal static unsafe partial B2World ChainGetWorld(B2Chain chainId); + + /// Get the number of segments on this chain + [LibraryImport(Dll, EntryPoint = "b2Chain_GetSegmentCount")] + internal static unsafe partial int ChainGetSegmentCount(B2Chain chainId); + + /// Fill a user array with chain segment shape ids up to the specified capacity. Returns + /// the actual number of segments returned. + [LibraryImport(Dll, EntryPoint = "b2Chain_GetSegments")] + internal static unsafe partial int ChainGetSegments(B2Chain chainId, in B2Shape segmentArray, int capacity); + + /// Set the chain friction + /// SEE: b2ChainDef::friction + [LibraryImport(Dll, EntryPoint = "b2Chain_SetFriction")] + internal static unsafe partial void ChainSetFriction(B2Chain chainId, float friction); + + /// Get the chain friction + [LibraryImport(Dll, EntryPoint = "b2Chain_GetFriction")] + internal static unsafe partial float ChainGetFriction(B2Chain chainId); + + /// Set the chain restitution (bounciness) + /// SEE: b2ChainDef::restitution + [LibraryImport(Dll, EntryPoint = "b2Chain_SetRestitution")] + internal static unsafe partial void ChainSetRestitution(B2Chain chainId, float restitution); + + /// Get the chain restitution + [LibraryImport(Dll, EntryPoint = "b2Chain_GetRestitution")] + internal static unsafe partial float ChainGetRestitution(B2Chain chainId); + + /// Set the chain material + /// SEE: b2ChainDef::material + [LibraryImport(Dll, EntryPoint = "b2Chain_SetMaterial")] + internal static unsafe partial void ChainSetMaterial(B2Chain chainId, int material); + + /// Get the chain material + [LibraryImport(Dll, EntryPoint = "b2Chain_GetMaterial")] + internal static unsafe partial int ChainGetMaterial(B2Chain chainId); + + /// Chain identifier validation. Provides validation for up to 64K allocations. + [LibraryImport(Dll, EntryPoint = "b2Chain_IsValid")] + internal static unsafe partial Bool8 ChainIsValid(B2Chain id); + + /// Destroy a joint + [LibraryImport(Dll, EntryPoint = "b2DestroyJoint")] + internal static unsafe partial void Dispose(B2Joint jointId); + + /// Joint identifier validation. Provides validation for up to 64K allocations. + [LibraryImport(Dll, EntryPoint = "b2Joint_IsValid")] + internal static unsafe partial Bool8 JointIsValid(B2Joint id); + + /// Get the joint type + [LibraryImport(Dll, EntryPoint = "b2Joint_GetType")] + internal static unsafe partial B2JointType GetJointType(B2Joint jointId); + + /// Get body A id on a joint + [LibraryImport(Dll, EntryPoint = "b2Joint_GetBodyA")] + internal static unsafe partial B2Body JointGetBodyA(B2Joint jointId); + + /// Get body B id on a joint + [LibraryImport(Dll, EntryPoint = "b2Joint_GetBodyB")] + internal static unsafe partial B2Body JointGetBodyB(B2Joint jointId); + + /// Get the world that owns this joint + [LibraryImport(Dll, EntryPoint = "b2Joint_GetWorld")] + internal static unsafe partial B2World JointGetWorld(B2Joint jointId); + + /// Set the local anchor on bodyA + [LibraryImport(Dll, EntryPoint = "b2Joint_SetLocalAnchorA")] + internal static unsafe partial void JointSetLocalAnchorA(B2Joint jointId, float2 localAnchor); + + /// Get the local anchor on bodyA + [LibraryImport(Dll, EntryPoint = "b2Joint_GetLocalAnchorA")] + internal static unsafe partial float2 JointGetLocalAnchorA(B2Joint jointId); + + /// Set the local anchor on bodyB + [LibraryImport(Dll, EntryPoint = "b2Joint_SetLocalAnchorB")] + internal static unsafe partial void JointSetLocalAnchorB(B2Joint jointId, float2 localAnchor); + + /// Get the local anchor on bodyB + [LibraryImport(Dll, EntryPoint = "b2Joint_GetLocalAnchorB")] + internal static unsafe partial float2 JointGetLocalAnchorB(B2Joint jointId); + + /// Get the joint reference angle in radians (revolute, prismatic, and weld) + [LibraryImport(Dll, EntryPoint = "b2Joint_GetReferenceAngle")] + internal static unsafe partial float JointGetReferenceAngle(B2Joint jointId); + + /// Set the joint reference angle in radians, must be in [-pi,pi]. (revolute, prismatic, and weld) + [LibraryImport(Dll, EntryPoint = "b2Joint_SetReferenceAngle")] + internal static unsafe partial void JointSetReferenceAngle(B2Joint jointId, float angleInRadians); + + /// Set the local axis on bodyA (prismatic and wheel) + [LibraryImport(Dll, EntryPoint = "b2Joint_SetLocalAxisA")] + internal static unsafe partial void JointSetLocalAxisA(B2Joint jointId, float2 localAxis); + + /// Get the local axis on bodyA (prismatic and wheel) + [LibraryImport(Dll, EntryPoint = "b2Joint_GetLocalAxisA")] + internal static unsafe partial float2 JointGetLocalAxisA(B2Joint jointId); + + /// Toggle collision between connected bodies + [LibraryImport(Dll, EntryPoint = "b2Joint_SetCollideConnected")] + internal static unsafe partial void JointSetCollideConnected(B2Joint jointId, Bool8 shouldCollide); + + /// Is collision allowed between connected bodies? + [LibraryImport(Dll, EntryPoint = "b2Joint_GetCollideConnected")] + internal static unsafe partial Bool8 JointGetCollideConnected(B2Joint jointId); + + /// Set the user data on a joint + [LibraryImport(Dll, EntryPoint = "b2Joint_SetUserData")] + internal static unsafe partial void JointSetUserData(B2Joint jointId, nint userData); + + /// Get the user data on a joint + [LibraryImport(Dll, EntryPoint = "b2Joint_GetUserData")] + internal static unsafe partial void* JointGetUserData(B2Joint jointId); + + /// Wake the bodies connect to this joint + [LibraryImport(Dll, EntryPoint = "b2Joint_WakeBodies")] + internal static unsafe partial void JointWakeBodies(B2Joint jointId); + + /// Get the current constraint force for this joint. Usually in Newtons. + [LibraryImport(Dll, EntryPoint = "b2Joint_GetConstraintForce")] + internal static unsafe partial float2 JointGetConstraintForce(B2Joint jointId); + + /// Get the current constraint torque for this joint. Usually in Newton * meters. + [LibraryImport(Dll, EntryPoint = "b2Joint_GetConstraintTorque")] + internal static unsafe partial float JointGetConstraintTorque(B2Joint jointId); + + /// Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters. + [LibraryImport(Dll, EntryPoint = "b2Joint_GetLinearSeparation")] + internal static unsafe partial float JointGetLinearSeparation(B2Joint jointId); + + /// Get the current angular separation error for this joint. Does not consider admissible movement. Usually in meters. + [LibraryImport(Dll, EntryPoint = "b2Joint_GetAngularSeparation")] + internal static unsafe partial float JointGetAngularSeparation(B2Joint jointId); + + /// Get the joint constraint tuning. Advanced feature. + [LibraryImport(Dll, EntryPoint = "b2Joint_GetConstraintTuning")] + internal static unsafe partial void JointGetConstraintTuning( + B2Joint jointId, + in float hertz, + in float dampingRatio + ); + + /// Set the joint constraint tuning. Advanced feature. + /// the joint + /// the stiffness in Hertz (cycles per second) + /// the non-dimensional damping ratio (one for critical damping) + [LibraryImport(Dll, EntryPoint = "b2Joint_SetConstraintTuning")] + internal static unsafe partial void JointSetConstraintTuning(B2Joint jointId, float hertz, float dampingRatio); + + /// Create a distance joint + /// SEE: b2DistanceJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateDistanceJoint")] + internal static unsafe partial B2DistanceJoint CreateDistanceJoint(B2World worldId, in B2DistanceJointDef def); + + /// Set the rest length of a distance joint + /// The id for a distance joint + /// The new distance joint length + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_SetLength")] + internal static unsafe partial void DistanceJointSetLength(B2Joint jointId, float length); + + /// Get the rest length of a distance joint + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetLength")] + internal static unsafe partial float DistanceJointGetLength(B2Joint jointId); + + /// Enable/disable the distance joint spring. When disabled the distance joint is rigid. + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_EnableSpring")] + internal static unsafe partial void DistanceJointEnableSpring(B2Joint jointId, Bool8 enableSpring); + + /// Is the distance joint spring enabled? + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_IsSpringEnabled")] + internal static unsafe partial Bool8 DistanceJointIsSpringEnabled(B2Joint jointId); + + /// Set the spring stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_SetSpringHertz")] + internal static unsafe partial void DistanceJointSetSpringHertz(B2Joint jointId, float hertz); + + /// Set the spring damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_SetSpringDampingRatio")] + internal static unsafe partial void DistanceJointSetSpringDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the spring Hertz + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetSpringHertz")] + internal static unsafe partial float DistanceJointGetSpringHertz(B2Joint jointId); + + /// Get the spring damping ratio + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetSpringDampingRatio")] + internal static unsafe partial float DistanceJointGetSpringDampingRatio(B2Joint jointId); + + /// Enable joint limit. The limit only works if the joint spring is enabled. Otherwise the joint is rigid + /// and the limit has no effect. + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_EnableLimit")] + internal static unsafe partial void DistanceJointEnableLimit(B2Joint jointId, Bool8 enableLimit); + + /// Is the distance joint limit enabled? + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_IsLimitEnabled")] + internal static unsafe partial Bool8 DistanceJointIsLimitEnabled(B2Joint jointId); + + /// Set the minimum and maximum length parameters of a distance joint + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_SetLengthRange")] + internal static unsafe partial void DistanceJointSetLengthRange( + B2Joint jointId, + float minLength, + float maxLength + ); + + /// Get the distance joint minimum length + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetMinLength")] + internal static unsafe partial float DistanceJointGetMinLength(B2Joint jointId); + + /// Get the distance joint maximum length + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetMaxLength")] + internal static unsafe partial float DistanceJointGetMaxLength(B2Joint jointId); + + /// Get the current length of a distance joint + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetCurrentLength")] + internal static unsafe partial float DistanceJointGetCurrentLength(B2Joint jointId); + + /// Enable/disable the distance joint motor + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_EnableMotor")] + internal static unsafe partial void DistanceJointEnableMotor(B2Joint jointId, Bool8 enableMotor); + + /// Is the distance joint motor enabled? + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_IsMotorEnabled")] + internal static unsafe partial Bool8 DistanceJointIsMotorEnabled(B2Joint jointId); + + /// Set the distance joint motor speed, usually in meters per second + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_SetMotorSpeed")] + internal static unsafe partial void DistanceJointSetMotorSpeed(B2Joint jointId, float motorSpeed); + + /// Get the distance joint motor speed, usually in meters per second + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetMotorSpeed")] + internal static unsafe partial float DistanceJointGetMotorSpeed(B2Joint jointId); + + /// Set the distance joint maximum motor force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_SetMaxMotorForce")] + internal static unsafe partial void DistanceJointSetMaxMotorForce(B2Joint jointId, float force); + + /// Get the distance joint maximum motor force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetMaxMotorForce")] + internal static unsafe partial float DistanceJointGetMaxMotorForce(B2Joint jointId); + + /// Get the distance joint current motor force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2DistanceJoint_GetMotorForce")] + internal static unsafe partial float DistanceJointGetMotorForce(B2Joint jointId); + + /// Create a motor joint + /// SEE: b2MotorJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateMotorJoint")] + internal static unsafe partial B2MotorJoint CreateMotorJoint(B2World worldId, in B2MotorJointDef def); + + /// Set the motor joint linear offset target + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_SetLinearOffset")] + internal static unsafe partial void MotorJointSetLinearOffset(B2Joint jointId, float2 linearOffset); + + /// Get the motor joint linear offset target + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_GetLinearOffset")] + internal static unsafe partial float2 MotorJointGetLinearOffset(B2Joint jointId); + + /// Set the motor joint angular offset target in radians. This angle will be unwound + /// so the motor will drive along the shortest arc. + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_SetAngularOffset")] + internal static unsafe partial void MotorJointSetAngularOffset(B2Joint jointId, float angularOffset); + + /// Get the motor joint angular offset target in radians + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_GetAngularOffset")] + internal static unsafe partial float MotorJointGetAngularOffset(B2Joint jointId); + + /// Set the motor joint maximum force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_SetMaxForce")] + internal static unsafe partial void MotorJointSetMaxForce(B2Joint jointId, float maxForce); + + /// Get the motor joint maximum force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_GetMaxForce")] + internal static unsafe partial float MotorJointGetMaxForce(B2Joint jointId); + + /// Set the motor joint maximum torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_SetMaxTorque")] + internal static unsafe partial void MotorJointSetMaxTorque(B2Joint jointId, float maxTorque); + + /// Get the motor joint maximum torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_GetMaxTorque")] + internal static unsafe partial float MotorJointGetMaxTorque(B2Joint jointId); + + /// Set the motor joint correction factor, usually in [0, 1] + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_SetCorrectionFactor")] + internal static unsafe partial void MotorJointSetCorrectionFactor(B2Joint jointId, float correctionFactor); + + /// Get the motor joint correction factor, usually in [0, 1] + [LibraryImport(Dll, EntryPoint = "b2MotorJoint_GetCorrectionFactor")] + internal static unsafe partial float MotorJointGetCorrectionFactor(B2Joint jointId); + + /// Create a mouse joint + /// SEE: b2MouseJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateMouseJoint")] + internal static unsafe partial B2MouseJoint CreateMouseJoint(B2World worldId, in B2MouseJointDef def); + + /// Set the mouse joint target + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_SetTarget")] + internal static unsafe partial void MouseJointSetTarget(B2Joint jointId, float2 target); + + /// Get the mouse joint target + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_GetTarget")] + internal static unsafe partial float2 MouseJointGetTarget(B2Joint jointId); + + /// Set the mouse joint spring stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_SetSpringHertz")] + internal static unsafe partial void MouseJointSetSpringHertz(B2Joint jointId, float hertz); + + /// Get the mouse joint spring stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_GetSpringHertz")] + internal static unsafe partial float MouseJointGetSpringHertz(B2Joint jointId); + + /// Set the mouse joint spring damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_SetSpringDampingRatio")] + internal static unsafe partial void MouseJointSetSpringDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the mouse joint damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_GetSpringDampingRatio")] + internal static unsafe partial float MouseJointGetSpringDampingRatio(B2Joint jointId); + + /// Set the mouse joint maximum force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_SetMaxForce")] + internal static unsafe partial void MouseJointSetMaxForce(B2Joint jointId, float maxForce); + + /// Get the mouse joint maximum force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2MouseJoint_GetMaxForce")] + internal static unsafe partial float MouseJointGetMaxForce(B2Joint jointId); + + /// Create a filter joint. + /// SEE: b2FilterJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateFilterJoint")] + internal static unsafe partial B2FilterJoint CreateFilterJoint(B2World worldId, in B2FilterJointDef def); + + /// Create a prismatic (slider) joint. + /// SEE: b2PrismaticJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreatePrismaticJoint")] + internal static unsafe partial B2PrismaticJoint CreatePrismaticJoint( + B2World worldId, + in B2PrismaticJointDef def + ); + + /// Enable/disable the joint spring. + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_EnableSpring")] + internal static unsafe partial void PrismaticJointEnableSpring(B2Joint jointId, Bool8 enableSpring); + + /// Is the prismatic joint spring enabled or not? + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_IsSpringEnabled")] + internal static unsafe partial Bool8 PrismaticJointIsSpringEnabled(B2Joint jointId); + + /// Set the prismatic joint stiffness in Hertz. + /// This should usually be less than a quarter of the simulation rate. For example, if the simulation + /// runs at 60Hz then the joint stiffness should be 15Hz or less. + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_SetSpringHertz")] + internal static unsafe partial void PrismaticJointSetSpringHertz(B2Joint jointId, float hertz); + + /// Get the prismatic joint stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetSpringHertz")] + internal static unsafe partial float PrismaticJointGetSpringHertz(B2Joint jointId); + + /// Set the prismatic joint damping ratio (non-dimensional) + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_SetSpringDampingRatio")] + internal static unsafe partial void PrismaticJointSetSpringDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the prismatic spring damping ratio (non-dimensional) + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetSpringDampingRatio")] + internal static unsafe partial float PrismaticJointGetSpringDampingRatio(B2Joint jointId); + + /// Set the prismatic joint spring target angle, usually in meters + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_SetTargetTranslation")] + internal static unsafe partial void PrismaticJointSetTargetTranslation(B2Joint jointId, float translation); + + /// Get the prismatic joint spring target translation, usually in meters + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetTargetTranslation")] + internal static unsafe partial float PrismaticJointGetTargetTranslation(B2Joint jointId); + + /// Enable/disable a prismatic joint limit + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_EnableLimit")] + internal static unsafe partial void PrismaticJointEnableLimit(B2Joint jointId, Bool8 enableLimit); + + /// Is the prismatic joint limit enabled? + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_IsLimitEnabled")] + internal static unsafe partial Bool8 PrismaticJointIsLimitEnabled(B2Joint jointId); + + /// Get the prismatic joint lower limit + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetLowerLimit")] + internal static unsafe partial float PrismaticJointGetLowerLimit(B2Joint jointId); + + /// Get the prismatic joint upper limit + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetUpperLimit")] + internal static unsafe partial float PrismaticJointGetUpperLimit(B2Joint jointId); + + /// Set the prismatic joint limits + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_SetLimits")] + internal static unsafe partial void PrismaticJointSetLimits(B2Joint jointId, float lower, float upper); + + /// Enable/disable a prismatic joint motor + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_EnableMotor")] + internal static unsafe partial void PrismaticJointEnableMotor(B2Joint jointId, Bool8 enableMotor); + + /// Is the prismatic joint motor enabled? + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_IsMotorEnabled")] + internal static unsafe partial Bool8 PrismaticJointIsMotorEnabled(B2Joint jointId); + + /// Set the prismatic joint motor speed, usually in meters per second + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_SetMotorSpeed")] + internal static unsafe partial void PrismaticJointSetMotorSpeed(B2Joint jointId, float motorSpeed); + + /// Get the prismatic joint motor speed, usually in meters per second + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetMotorSpeed")] + internal static unsafe partial float PrismaticJointGetMotorSpeed(B2Joint jointId); + + /// Set the prismatic joint maximum motor force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_SetMaxMotorForce")] + internal static unsafe partial void PrismaticJointSetMaxMotorForce(B2Joint jointId, float force); + + /// Get the prismatic joint maximum motor force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetMaxMotorForce")] + internal static unsafe partial float PrismaticJointGetMaxMotorForce(B2Joint jointId); + + /// Get the prismatic joint current motor force, usually in newtons + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetMotorForce")] + internal static unsafe partial float PrismaticJointGetMotorForce(B2Joint jointId); + + /// Get the current joint translation, usually in meters. + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetTranslation")] + internal static unsafe partial float PrismaticJointGetTranslation(B2Joint jointId); + + /// Get the current joint translation speed, usually in meters per second. + [LibraryImport(Dll, EntryPoint = "b2PrismaticJoint_GetSpeed")] + internal static unsafe partial float PrismaticJointGetSpeed(B2Joint jointId); + + /// Create a revolute joint + /// SEE: b2RevoluteJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateRevoluteJoint")] + internal static unsafe partial B2RevoluteJoint CreateRevoluteJoint(B2World worldId, in B2RevoluteJointDef def); + + /// Enable/disable the revolute joint spring + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_EnableSpring")] + internal static unsafe partial void RevoluteJointEnableSpring(B2Joint jointId, Bool8 enableSpring); + + /// It the revolute angular spring enabled? + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_IsSpringEnabled")] + internal static unsafe partial Bool8 RevoluteJointIsSpringEnabled(B2Joint jointId); + + /// Set the revolute joint spring stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_SetSpringHertz")] + internal static unsafe partial void RevoluteJointSetSpringHertz(B2Joint jointId, float hertz); + + /// Get the revolute joint spring stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetSpringHertz")] + internal static unsafe partial float RevoluteJointGetSpringHertz(B2Joint jointId); + + /// Set the revolute joint spring damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_SetSpringDampingRatio")] + internal static unsafe partial void RevoluteJointSetSpringDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the revolute joint spring damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetSpringDampingRatio")] + internal static unsafe partial float RevoluteJointGetSpringDampingRatio(B2Joint jointId); + + /// Set the revolute joint spring target angle, radians + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_SetTargetAngle")] + internal static unsafe partial void RevoluteJointSetTargetAngle(B2Joint jointId, float angle); + + /// Get the revolute joint spring target angle, radians + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetTargetAngle")] + internal static unsafe partial float RevoluteJointGetTargetAngle(B2Joint jointId); + + /// Get the revolute joint current angle in radians relative to the reference angle + /// SEE: b2RevoluteJointDef::referenceAngle + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetAngle")] + internal static unsafe partial float RevoluteJointGetAngle(B2Joint jointId); + + /// Enable/disable the revolute joint limit + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_EnableLimit")] + internal static unsafe partial void RevoluteJointEnableLimit(B2Joint jointId, Bool8 enableLimit); + + /// Is the revolute joint limit enabled? + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_IsLimitEnabled")] + internal static unsafe partial Bool8 RevoluteJointIsLimitEnabled(B2Joint jointId); + + /// Get the revolute joint lower limit in radians + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetLowerLimit")] + internal static unsafe partial float RevoluteJointGetLowerLimit(B2Joint jointId); + + /// Get the revolute joint upper limit in radians + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetUpperLimit")] + internal static unsafe partial float RevoluteJointGetUpperLimit(B2Joint jointId); + + /// Set the revolute joint limits in radians. It is expected that lower + /// < + /// = upper + /// and that -0.99 * B2_PI + /// < + /// = lower + /// & + /// & + /// upper + /// < + /// = -0.99 * B2_PI. + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_SetLimits")] + internal static unsafe partial void RevoluteJointSetLimits(B2Joint jointId, float lower, float upper); + + /// Enable/disable a revolute joint motor + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_EnableMotor")] + internal static unsafe partial void RevoluteJointEnableMotor(B2Joint jointId, Bool8 enableMotor); + + /// Is the revolute joint motor enabled? + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_IsMotorEnabled")] + internal static unsafe partial Bool8 RevoluteJointIsMotorEnabled(B2Joint jointId); + + /// Set the revolute joint motor speed in radians per second + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_SetMotorSpeed")] + internal static unsafe partial void RevoluteJointSetMotorSpeed(B2Joint jointId, float motorSpeed); + + /// Get the revolute joint motor speed in radians per second + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetMotorSpeed")] + internal static unsafe partial float RevoluteJointGetMotorSpeed(B2Joint jointId); + + /// Get the revolute joint current motor torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetMotorTorque")] + internal static unsafe partial float RevoluteJointGetMotorTorque(B2Joint jointId); + + /// Set the revolute joint maximum motor torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_SetMaxMotorTorque")] + internal static unsafe partial void RevoluteJointSetMaxMotorTorque(B2Joint jointId, float torque); + + /// Get the revolute joint maximum motor torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2RevoluteJoint_GetMaxMotorTorque")] + internal static unsafe partial float RevoluteJointGetMaxMotorTorque(B2Joint jointId); + + /// Create a weld joint + /// SEE: b2WeldJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateWeldJoint")] + internal static unsafe partial B2WeldJoint CreateWeldJoint(B2World worldId, in B2WeldJointDef def); + + /// Set the weld joint linear stiffness in Hertz. 0 is rigid. + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_SetLinearHertz")] + internal static unsafe partial void WeldJointSetLinearHertz(B2Joint jointId, float hertz); + + /// Get the weld joint linear stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_GetLinearHertz")] + internal static unsafe partial float WeldJointGetLinearHertz(B2Joint jointId); + + /// Set the weld joint linear damping ratio (non-dimensional) + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_SetLinearDampingRatio")] + internal static unsafe partial void WeldJointSetLinearDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the weld joint linear damping ratio (non-dimensional) + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_GetLinearDampingRatio")] + internal static unsafe partial float WeldJointGetLinearDampingRatio(B2Joint jointId); + + /// Set the weld joint angular stiffness in Hertz. 0 is rigid. + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_SetAngularHertz")] + internal static unsafe partial void WeldJointSetAngularHertz(B2Joint jointId, float hertz); + + /// Get the weld joint angular stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_GetAngularHertz")] + internal static unsafe partial float WeldJointGetAngularHertz(B2Joint jointId); + + /// Set weld joint angular damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_SetAngularDampingRatio")] + internal static unsafe partial void WeldJointSetAngularDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the weld joint angular damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2WeldJoint_GetAngularDampingRatio")] + internal static unsafe partial float WeldJointGetAngularDampingRatio(B2Joint jointId); + + /// Create a wheel joint + /// SEE: b2WheelJointDef for details + [LibraryImport(Dll, EntryPoint = "b2CreateWheelJoint")] + internal static unsafe partial B2WheelJoint CreateWheelJoint(B2World worldId, in B2WheelJointDef def); + + /// Enable/disable the wheel joint spring + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_EnableSpring")] + internal static unsafe partial void WheelJointEnableSpring(B2Joint jointId, Bool8 enableSpring); + + /// Is the wheel joint spring enabled? + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_IsSpringEnabled")] + internal static unsafe partial Bool8 WheelJointIsSpringEnabled(B2Joint jointId); + + /// Set the wheel joint stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_SetSpringHertz")] + internal static unsafe partial void WheelJointSetSpringHertz(B2Joint jointId, float hertz); + + /// Get the wheel joint stiffness in Hertz + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetSpringHertz")] + internal static unsafe partial float WheelJointGetSpringHertz(B2Joint jointId); + + /// Set the wheel joint damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_SetSpringDampingRatio")] + internal static unsafe partial void WheelJointSetSpringDampingRatio(B2Joint jointId, float dampingRatio); + + /// Get the wheel joint damping ratio, non-dimensional + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetSpringDampingRatio")] + internal static unsafe partial float WheelJointGetSpringDampingRatio(B2Joint jointId); + + /// Enable/disable the wheel joint limit + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_EnableLimit")] + internal static unsafe partial void WheelJointEnableLimit(B2Joint jointId, Bool8 enableLimit); + + /// Is the wheel joint limit enabled? + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_IsLimitEnabled")] + internal static unsafe partial Bool8 WheelJointIsLimitEnabled(B2Joint jointId); + + /// Get the wheel joint lower limit + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetLowerLimit")] + internal static unsafe partial float WheelJointGetLowerLimit(B2Joint jointId); + + /// Get the wheel joint upper limit + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetUpperLimit")] + internal static unsafe partial float WheelJointGetUpperLimit(B2Joint jointId); + + /// Set the wheel joint limits + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_SetLimits")] + internal static unsafe partial void WheelJointSetLimits(B2Joint jointId, float lower, float upper); + + /// Enable/disable the wheel joint motor + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_EnableMotor")] + internal static unsafe partial void WheelJointEnableMotor(B2Joint jointId, Bool8 enableMotor); + + /// Is the wheel joint motor enabled? + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_IsMotorEnabled")] + internal static unsafe partial Bool8 WheelJointIsMotorEnabled(B2Joint jointId); + + /// Set the wheel joint motor speed in radians per second + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_SetMotorSpeed")] + internal static unsafe partial void WheelJointSetMotorSpeed(B2Joint jointId, float motorSpeed); + + /// Get the wheel joint motor speed in radians per second + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetMotorSpeed")] + internal static unsafe partial float WheelJointGetMotorSpeed(B2Joint jointId); + + /// Set the wheel joint maximum motor torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_SetMaxMotorTorque")] + internal static unsafe partial void WheelJointSetMaxMotorTorque(B2Joint jointId, float torque); + + /// Get the wheel joint maximum motor torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetMaxMotorTorque")] + internal static unsafe partial float WheelJointGetMaxMotorTorque(B2Joint jointId); + + /// Get the wheel joint current motor torque, usually in newton-meters + [LibraryImport(Dll, EntryPoint = "b2WheelJoint_GetMotorTorque")] + internal static unsafe partial float WheelJointGetMotorTorque(B2Joint jointId); + } +} diff --git a/Brutal.Box2D/Enumerations.gen.cs b/Brutal.Box2D/Enumerations.gen.cs new file mode 100644 index 0000000..3fb469f --- /dev/null +++ b/Brutal.Box2D/Enumerations.gen.cs @@ -0,0 +1,539 @@ +/* + * @brief Contains the Box2D enumerations ported to C#. + * + * @warning This file is auto-generated by Brutal.Box2D.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +namespace Brutal.Box2DApi +{ + /// Describes the TOI output + public enum B2ToiState : uint + { + /// + Unknown = 0U, + + /// + Failed = 1U, + + /// + Overlapped = 2U, + + /// + Hit = 3U, + + /// + Separated = 4U, + } + + /// The body simulation type. + /// Each body is one of these three types. The type determines how the body behaves in the simulation. + public enum B2BodyType : uint + { + /// zero mass, zero velocity, may be manually moved + Static = 0, + + /// zero mass, velocity set by user, moved by solver + Kinematic = 1, + + /// positive mass, velocity determined by forces, moved by solver + Dynamic = 2, + + /// number of body types + TypeCount = 3U, + } + + /// Shape type + public enum B2ShapeType : uint + { + /// A circle with an offset + Circle = 0U, + + /// A capsule is an extruded circle + Capsule = 1U, + + /// A line segment + Segment = 2U, + + /// A convex polygon + Polygon = 3U, + + /// A line segment owned by a chain shape + ChainSegment = 4U, + + /// The number of shape types + TypeCount = 5U, + } + + /// Joint type enumeration + /// This is useful because all joint types use b2JointId and sometimes you + /// want to get the type of a joint. + public enum B2JointType : uint + { + /// + Distance = 0U, + + /// + Filter = 1U, + + /// + Motor = 2U, + + /// + Mouse = 3U, + + /// + Prismatic = 4U, + + /// + Revolute = 5U, + + /// + Weld = 6U, + + /// + Wheel = 7U, + } + + /// These colors are used for debug draw and mostly match the named SVG colors. + /// See https://www.rapidtables.com/web/color/index.html + /// https://johndecember.com/html/spec/colorsvg.html + /// https://upload.wikimedia.org/wikipedia/commons/2/2b/SVG_Recognized_color_keyword_names.svg + public enum B2HexColor : uint + { + /// + AliceBlue = 0xF0F8FF, + + /// + AntiqueWhite = 0xFAEBD7, + + /// + Aqua = 0x00FFFF, + + /// + Aquamarine = 0x7FFFD4, + + /// + Azure = 0xF0FFFF, + + /// + Beige = 0xF5F5DC, + + /// + Bisque = 0xFFE4C4, + + /// + Black = 0x000000, + + /// + BlanchedAlmond = 0xFFEBCD, + + /// + Blue = 0x0000FF, + + /// + BlueViolet = 0x8A2BE2, + + /// + Brown = 0xA52A2A, + + /// + Burlywood = 0xDEB887, + + /// + CadetBlue = 0x5F9EA0, + + /// + Chartreuse = 0x7FFF00, + + /// + Chocolate = 0xD2691E, + + /// + Coral = 0xFF7F50, + + /// + CornflowerBlue = 0x6495ED, + + /// + Cornsilk = 0xFFF8DC, + + /// + Crimson = 0xDC143C, + + /// + Cyan = 0x00FFFF, + + /// + DarkBlue = 0x00008B, + + /// + DarkCyan = 0x008B8B, + + /// + DarkGoldenRod = 0xB8860B, + + /// + DarkGray = 0xA9A9A9, + + /// + DarkGreen = 0x006400, + + /// + DarkKhaki = 0xBDB76B, + + /// + DarkMagenta = 0x8B008B, + + /// + DarkOliveGreen = 0x556B2F, + + /// + DarkOrange = 0xFF8C00, + + /// + DarkOrchid = 0x9932CC, + + /// + DarkRed = 0x8B0000, + + /// + DarkSalmon = 0xE9967A, + + /// + DarkSeaGreen = 0x8FBC8F, + + /// + DarkSlateBlue = 0x483D8B, + + /// + DarkSlateGray = 0x2F4F4F, + + /// + DarkTurquoise = 0x00CED1, + + /// + DarkViolet = 0x9400D3, + + /// + DeepPink = 0xFF1493, + + /// + DeepSkyBlue = 0x00BFFF, + + /// + DimGray = 0x696969, + + /// + DodgerBlue = 0x1E90FF, + + /// + FireBrick = 0xB22222, + + /// + FloralWhite = 0xFFFAF0, + + /// + ForestGreen = 0x228B22, + + /// + Fuchsia = 0xFF00FF, + + /// + Gainsboro = 0xDCDCDC, + + /// + GhostWhite = 0xF8F8FF, + + /// + Gold = 0xFFD700, + + /// + GoldenRod = 0xDAA520, + + /// + Gray = 0x808080, + + /// + Green = 0x008000, + + /// + GreenYellow = 0xADFF2F, + + /// + HoneyDew = 0xF0FFF0, + + /// + HotPink = 0xFF69B4, + + /// + IndianRed = 0xCD5C5C, + + /// + Indigo = 0x4B0082, + + /// + Ivory = 0xFFFFF0, + + /// + Khaki = 0xF0E68C, + + /// + Lavender = 0xE6E6FA, + + /// + LavenderBlush = 0xFFF0F5, + + /// + LawnGreen = 0x7CFC00, + + /// + LemonChiffon = 0xFFFACD, + + /// + LightBlue = 0xADD8E6, + + /// + LightCoral = 0xF08080, + + /// + LightCyan = 0xE0FFFF, + + /// + LightGoldenRodYellow = 0xFAFAD2, + + /// + LightGray = 0xD3D3D3, + + /// + LightGreen = 0x90EE90, + + /// + LightPink = 0xFFB6C1, + + /// + LightSalmon = 0xFFA07A, + + /// + LightSeaGreen = 0x20B2AA, + + /// + LightSkyBlue = 0x87CEFA, + + /// + LightSlateGray = 0x778899, + + /// + LightSteelBlue = 0xB0C4DE, + + /// + LightYellow = 0xFFFFE0, + + /// + Lime = 0x00FF00, + + /// + LimeGreen = 0x32CD32, + + /// + Linen = 0xFAF0E6, + + /// + Magenta = 0xFF00FF, + + /// + Maroon = 0x800000, + + /// + MediumAquaMarine = 0x66CDAA, + + /// + MediumBlue = 0x0000CD, + + /// + MediumOrchid = 0xBA55D3, + + /// + MediumPurple = 0x9370DB, + + /// + MediumSeaGreen = 0x3CB371, + + /// + MediumSlateBlue = 0x7B68EE, + + /// + MediumSpringGreen = 0x00FA9A, + + /// + MediumTurquoise = 0x48D1CC, + + /// + MediumVioletRed = 0xC71585, + + /// + MidnightBlue = 0x191970, + + /// + MintCream = 0xF5FFFA, + + /// + MistyRose = 0xFFE4E1, + + /// + Moccasin = 0xFFE4B5, + + /// + NavajoWhite = 0xFFDEAD, + + /// + Navy = 0x000080, + + /// + OldLace = 0xFDF5E6, + + /// + Olive = 0x808000, + + /// + OliveDrab = 0x6B8E23, + + /// + Orange = 0xFFA500, + + /// + OrangeRed = 0xFF4500, + + /// + Orchid = 0xDA70D6, + + /// + PaleGoldenRod = 0xEEE8AA, + + /// + PaleGreen = 0x98FB98, + + /// + PaleTurquoise = 0xAFEEEE, + + /// + PaleVioletRed = 0xDB7093, + + /// + PapayaWhip = 0xFFEFD5, + + /// + PeachPuff = 0xFFDAB9, + + /// + Peru = 0xCD853F, + + /// + Pink = 0xFFC0CB, + + /// + Plum = 0xDDA0DD, + + /// + PowderBlue = 0xB0E0E6, + + /// + Purple = 0x800080, + + /// + RebeccaPurple = 0x663399, + + /// + Red = 0xFF0000, + + /// + RosyBrown = 0xBC8F8F, + + /// + RoyalBlue = 0x4169E1, + + /// + SaddleBrown = 0x8B4513, + + /// + Salmon = 0xFA8072, + + /// + SandyBrown = 0xF4A460, + + /// + SeaGreen = 0x2E8B57, + + /// + SeaShell = 0xFFF5EE, + + /// + Sienna = 0xA0522D, + + /// + Silver = 0xC0C0C0, + + /// + SkyBlue = 0x87CEEB, + + /// + SlateBlue = 0x6A5ACD, + + /// + SlateGray = 0x708090, + + /// + Snow = 0xFFFAFA, + + /// + SpringGreen = 0x00FF7F, + + /// + SteelBlue = 0x4682B4, + + /// + Tan = 0xD2B48C, + + /// + Teal = 0x008080, + + /// + Thistle = 0xD8BFD8, + + /// + Tomato = 0xFF6347, + + /// + Turquoise = 0x40E0D0, + + /// + Violet = 0xEE82EE, + + /// + Wheat = 0xF5DEB3, + + /// + White = 0xFFFFFF, + + /// + WhiteSmoke = 0xF5F5F5, + + /// + Yellow = 0xFFFF00, + + /// + YellowGreen = 0x9ACD32, + + /// + Box2DRed = 0xDC3132, + + /// + Box2DBlue = 0x30AEBF, + + /// + Box2DGreen = 0x8CC924, + + /// + Box2DYellow = 0xFFEE8C, + } +} diff --git a/Brutal.Box2D/LICENSES/BRUTAL-BOX2D-THIRD-PARTY-NOTICES.txt b/Brutal.Box2D/LICENSES/BRUTAL-BOX2D-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..0341678 --- /dev/null +++ b/Brutal.Box2D/LICENSES/BRUTAL-BOX2D-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,33 @@ +Brutal.Box2D redistributes the third-party components listed below. Each is +reproduced with the license that governs it. + +============================================================ +Box2D 3.1.1 -- MIT -- https://github.com/erincatto/box2d +Shipped as: box2d.dll / libbox2d.so / libbox2d.dylib +============================================================ + +Built from Box2D's own sources only. The upstream project also carries glad and +jsmn; both belong to its samples application, which this build does not produce, +so neither reaches the libraries shipped here. + +MIT License + +Copyright (c) 2022 Erin Catto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Brutal.Box2D/Structs.cs b/Brutal.Box2D/Structs.cs new file mode 100644 index 0000000..99f2dc8 --- /dev/null +++ b/Brutal.Box2D/Structs.cs @@ -0,0 +1,239 @@ +// ReSharper disable MemberCanBePrivate.Global + +using Brutal.Numerics; + +namespace Brutal.Box2DApi; + +/// +/// Interface for Box2D objects. +/// +public interface IBox2DObject : INullable, IEqualityComparer { } + +public partial record struct B2World : IBox2DObject +{ + /// + public bool IsNull() + { + return Index1 == 0 && Generation == 0; + } + + /// + public bool Equals(B2World x, B2World y) + { + return x.Index1 == y.Index1 && x.Generation == y.Generation; + } + + /// + public int GetHashCode(B2World obj) + { + return HashCode.Combine(obj.Index1, obj.Generation); + } +} + +public partial record struct B2Body : IBox2DObject +{ + /// + public bool IsNull() + { + return Index1 == 0 && Generation == 0; + } + + /// + public bool Equals(B2Body x, B2Body y) + { + return x.Index1 == y.Index1 && x.Generation == y.Generation; + } + + /// + public int GetHashCode(B2Body obj) + { + return HashCode.Combine(obj.Index1, obj.Generation); + } +} + +public partial record struct B2Chain : IBox2DObject +{ + /// + public bool IsNull() + { + return Index1 == 0 && Generation == 0; + } + + /// + public bool Equals(B2Chain x, B2Chain y) + { + return x.Index1 == y.Index1 && x.Generation == y.Generation; + } + + /// + public int GetHashCode(B2Chain obj) + { + return HashCode.Combine(obj.Index1, obj.Generation); + } +} + +public partial record struct B2Shape : IBox2DObject +{ + /// + public bool IsNull() + { + return Index1 == 0 && Generation == 0; + } + + /// + public bool Equals(B2Shape x, B2Shape y) + { + return x.Index1 == y.Index1 && x.Generation == y.Generation; + } + + /// + public int GetHashCode(B2Shape obj) + { + return HashCode.Combine(obj.Index1, obj.Generation); + } +} + +public partial struct B2BodyDef +{ + /// + public static readonly B2BodyDef Default = Box2D.DefaultBodyDef(); +} + +public partial struct B2ChainDef +{ + /// + public static readonly B2ChainDef Default = Box2D.DefaultChainDef(); +} + +public partial struct B2DebugDraw +{ + /// + public static readonly B2DebugDraw Default = Box2D.DefaultDebugDraw(); +} + +public partial struct B2DistanceJointDef +{ + /// + public static readonly B2DistanceJointDef Default = Box2D.DefaultDistanceJointDef(); +} + +public partial struct B2ExplosionDef +{ + /// + public static readonly B2ExplosionDef Default = Box2D.DefaultExplosionDef(); +} + +public partial struct B2Filter +{ + /// + public static readonly B2Filter Default = Box2D.DefaultFilter(); +} + +public partial struct B2FilterJointDef +{ + /// + public static readonly B2FilterJointDef Default = Box2D.DefaultFilterJointDef(); +} + +public partial struct B2MotorJointDef +{ + /// + public static readonly B2MotorJointDef Default = Box2D.DefaultMotorJointDef(); +} + +public partial struct B2MouseJointDef +{ + /// + public static readonly B2MouseJointDef Default = Box2D.DefaultMouseJointDef(); +} + +public partial struct B2PrismaticJointDef +{ + /// + public static readonly B2PrismaticJointDef Default = Box2D.DefaultPrismaticJointDef(); +} + +public partial struct B2QueryFilter +{ + /// + public static readonly B2QueryFilter Default = Box2D.DefaultQueryFilter(); +} + +public partial struct B2RevoluteJointDef +{ + /// + public static readonly B2RevoluteJointDef Default = Box2D.DefaultRevoluteJointDef(); +} + +public partial struct B2WheelJointDef +{ + /// + public static readonly B2WheelJointDef Default = Box2D.DefaultWheelJointDef(); +} + +public partial struct B2WeldJointDef +{ + /// + public static readonly B2WeldJointDef Default = Box2D.DefaultWeldJointDef(); +} + +public partial struct B2SurfaceMaterial +{ + /// + public static readonly B2SurfaceMaterial Default = Box2D.DefaultSurfaceMaterial(); +} + +public partial struct B2ShapeDef +{ + /// + public static readonly B2ShapeDef Default = Box2D.DefaultShapeDef(); +} + +public partial struct B2WorldDef +{ + /// + public static readonly B2WorldDef Default = Box2D.DefaultWorldDef(); +} + +public partial struct B2Rot +{ + /// + /// An identity rotation. + /// + public static readonly B2Rot Identity = new(0); + + /// + /// Specifies a rotation by sine and cosine values. + /// + public B2Rot(float sine, float cosine) + { + S = sine; + C = cosine; + } + + /// + /// Specifies a rotation by an angle in radians. + /// + public B2Rot(float angle) + { + S = MathF.Sin(angle); + C = MathF.Cos(angle); + } +} + +public partial struct B2Transform +{ + /// + /// An identity transformation. + /// + public static readonly B2Transform Identity = new(float2.Zero, B2Rot.Identity); + + /// + /// Specifies a transformation with a position and a rotation. + /// + public B2Transform(float2 p, B2Rot q) + { + P = p; + Q = q; + } +} diff --git a/Brutal.Box2D/Structs.gen.cs b/Brutal.Box2D/Structs.gen.cs new file mode 100644 index 0000000..99c7ecd --- /dev/null +++ b/Brutal.Box2D/Structs.gen.cs @@ -0,0 +1,4679 @@ +/* + * @brief Contains the Box2D classes, ported to unmanaged structs in C#. + * + * @warning This file is auto-generated by Brutal.Box2D.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; +using Brutal.Numerics; + +namespace Brutal.Box2DApi +{ + /// Version numbering scheme. + /// See https://semver.org/ + [StructLayout(LayoutKind.Explicit, Size = 12)] + public struct B2Version + { + /// Significant changes + [FieldOffset(0)] + public int Major; + + /// Incremental changes + [FieldOffset(4)] + public int Minor; + + /// Bug fixes + [FieldOffset(8)] + public int Revision; + } + + /// Cosine and sine pair + /// This uses a custom implementation designed for cross-platform determinism + [StructLayout(LayoutKind.Explicit, Size = 8)] + public struct B2CosSin + { + /// cosine and sine + [FieldOffset(0)] + public float Cosine; + + /// + [FieldOffset(4)] + public float Sine; + } + + /// 2D rotation + /// This is similar to using a complex number for rotation + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct B2Rot + { + /// Get the angle in radians in the range [-pi, pi] + public float GetAngle() + { + return Box2D.RotGetAngle(this); + } + + /// Get the x-axis + public float2 GetXAxis() + { + return Box2D.RotGetXAxis(this); + } + + /// Get the y-axis + public float2 GetYAxis() + { + return Box2D.RotGetYAxis(this); + } + + /// cosine and sine + [FieldOffset(0)] + public float C; + + /// cosine and sine + [FieldOffset(4)] + public float S; + } + + /// A 2D rigid transform + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct B2Transform + { + /// + [FieldOffset(0)] + public float2 P; + + /// + [FieldOffset(8)] + public B2Rot Q; + } + + /// Axis-aligned bounding box + [StructLayout(LayoutKind.Explicit, Size = 16)] + public struct B2Aabb + { + /// + [FieldOffset(0)] + public float2 LowerBound; + + /// + [FieldOffset(8)] + public float2 UpperBound; + } + + /// separation = dot(normal, point) - offset + [StructLayout(LayoutKind.Explicit, Size = 12)] + public struct B2Plane + { + /// + [FieldOffset(0)] + public float2 Normal; + + /// + [FieldOffset(8)] + public float Offset; + } + + /// Used to warm start the GJK simplex. If you call this function multiple times with nearby + /// transforms this might improve performance. Otherwise you can zero initialize this. + /// The distance cache must be initialized to zero on the first call. + /// Users should generally just zero initialize this structure for each call. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe struct B2SimplexCache + { + /// The number of stored simplex points + [FieldOffset(0)] + public ushort Count; + + /// The cached simplex indices on shape A + [FieldOffset(2)] + public fixed byte IndexA[3]; + + /// The cached simplex indices on shape B + [FieldOffset(5)] + public fixed byte IndexB[3]; + } + + /// A convex hull. Used to create convex polygons. + /// WARNING: Do not modify these values directly, instead use b2ComputeHull() + [StructLayout(LayoutKind.Explicit, Size = 68)] + public struct B2Hull + { + /// The final points of the hull + [FieldOffset(0)] + public float2_8 Points; + + /// The number of points + [FieldOffset(64)] + public int Count; + } + + /// Low level ray cast input data + [StructLayout(LayoutKind.Explicit, Size = 20)] + public struct B2RayCastInput + { + /// Start point of the ray cast + [FieldOffset(0)] + public float2 Origin; + + /// Translation of the ray cast + [FieldOffset(8)] + public float2 Translation; + + /// The maximum fraction of the translation to consider, typically 1 + [FieldOffset(16)] + public float MaxFraction; + } + + /// A distance proxy is used by the GJK algorithm. It encapsulates any shape. + /// You can provide between 1 and B2_MAX_POLYGON_VERTICES and a radius. + [StructLayout(LayoutKind.Explicit, Size = 72)] + public struct B2ShapeProxy + { + /// The point cloud + [FieldOffset(0)] + public float2_8 Points; + + /// The number of points. Must be greater than 0. + [FieldOffset(64)] + public int Count; + + /// The external radius of the point cloud. May be zero. + [FieldOffset(68)] + public float Radius; + } + + /// Low level shape cast input in generic form. This allows casting an arbitrary point + /// cloud wrap with a radius. For example, a circle is a single point with a non-zero radius. + /// A capsule is two points with a non-zero radius. A box is four points with a zero radius. + [StructLayout(LayoutKind.Explicit, Size = 88)] + public struct B2ShapeCastInput + { + /// A generic shape + [FieldOffset(0)] + public B2ShapeProxy Proxy; + + /// The translation of the shape cast + [FieldOffset(72)] + public float2 Translation; + + /// The maximum fraction of the translation to consider, typically 1 + [FieldOffset(80)] + public float MaxFraction; + + /// Allow shape cast to encroach when initially touching. This only works if the radius is greater than zero. + [FieldOffset(84)] + public Bool8 CanEncroach; + } + + /// Low level ray cast or shape-cast output data. Returns a zero fraction and normal in the case of initial overlap. + [StructLayout(LayoutKind.Explicit, Size = 28)] + public struct B2CastOutput + { + /// The surface normal at the hit point + [FieldOffset(0)] + public float2 Normal; + + /// The surface hit point + [FieldOffset(8)] + public float2 Point; + + /// The fraction of the input translation at collision + [FieldOffset(16)] + public float Fraction; + + /// The number of iterations used + [FieldOffset(20)] + public int Iterations; + + /// Did the cast hit? + [FieldOffset(24)] + public Bool8 Hit; + } + + /// This holds the mass data computed for a shape. + [StructLayout(LayoutKind.Explicit, Size = 16)] + public struct B2MassData + { + /// The mass of the shape, usually in kilograms. + [FieldOffset(0)] + public float Mass; + + /// The position of the shape's centroid relative to the shape's origin. + [FieldOffset(4)] + public float2 Center; + + /// The rotational inertia of the shape about the local origin. + [FieldOffset(12)] + public float RotationalInertia; + } + + /// A solid circle + [StructLayout(LayoutKind.Explicit, Size = 12)] + public struct B2Circle + { + /// The local center + [FieldOffset(0)] + public float2 Center; + + /// The radius + [FieldOffset(8)] + public float Radius; + } + + /// A solid capsule can be viewed as two semicircles connected + /// by a rectangle. + [StructLayout(LayoutKind.Explicit, Size = 20)] + public struct B2Capsule + { + /// Local center of the first semicircle + [FieldOffset(0)] + public float2 Center1; + + /// Local center of the second semicircle + [FieldOffset(8)] + public float2 Center2; + + /// The radius of the semicircles + [FieldOffset(16)] + public float Radius; + } + + /// A solid convex polygon. It is assumed that the interior of the polygon is to + /// the left of each edge. + /// Polygons have a maximum number of vertices equal to B2_MAX_POLYGON_VERTICES. + /// In most cases you should not need many vertices for a convex polygon. + /// WARNING: DO NOT fill this out manually, instead use a helper function like b2MakePolygon or b2MakeBox. + [StructLayout(LayoutKind.Explicit, Size = 144)] + public struct B2Polygon + { + /// The polygon vertices + [FieldOffset(0)] + public float2_8 Vertices; + + /// The outward normal vectors of the polygon sides + [FieldOffset(64)] + public float2_8 Normals; + + /// The centroid of the polygon + [FieldOffset(128)] + public float2 Centroid; + + /// The external radius for rounded polygons + [FieldOffset(136)] + public float Radius; + + /// The number of polygon vertices + [FieldOffset(140)] + public int Count; + } + + /// A line segment with two-sided collision. + [StructLayout(LayoutKind.Explicit, Size = 16)] + public struct B2Segment + { + /// The first point + [FieldOffset(0)] + public float2 Point1; + + /// The second point + [FieldOffset(8)] + public float2 Point2; + } + + /// A line segment with one-sided collision. Only collides on the right side. + /// Several of these are generated for a chain shape. + /// ghost1 -> point1 -> point2 -> ghost2 + [StructLayout(LayoutKind.Explicit, Size = 36)] + public struct B2ChainSegment + { + /// The tail ghost vertex + [FieldOffset(0)] + public float2 Ghost1; + + /// The line segment + [FieldOffset(8)] + public B2Segment Segment; + + /// The head ghost vertex + [FieldOffset(24)] + public float2 Ghost2; + + /// The owning chain shape index (internal usage only) + [FieldOffset(32)] + public int ChainId; + } + + /// Result of computing the distance between two line segments + [StructLayout(LayoutKind.Explicit, Size = 28)] + public struct B2SegmentDistanceResult + { + /// The closest point on the first segment + [FieldOffset(0)] + public float2 Closest1; + + /// The closest point on the second segment + [FieldOffset(8)] + public float2 Closest2; + + /// The barycentric coordinate on the first segment + [FieldOffset(16)] + public float Fraction1; + + /// The barycentric coordinate on the second segment + [FieldOffset(20)] + public float Fraction2; + + /// The squared distance between the closest points + [FieldOffset(24)] + public float DistanceSquared; + } + + /// Input for b2ShapeDistance + [StructLayout(LayoutKind.Explicit, Size = 180)] + public struct B2DistanceInput + { + /// The proxy for shape A + [FieldOffset(0)] + public B2ShapeProxy ProxyA; + + /// The proxy for shape B + [FieldOffset(72)] + public B2ShapeProxy ProxyB; + + /// The world transform for shape A + [FieldOffset(144)] + public B2Transform TransformA; + + /// The world transform for shape B + [FieldOffset(160)] + public B2Transform TransformB; + + /// Should the proxy radius be considered? + [FieldOffset(176)] + public Bool8 UseRadii; + } + + /// Output for b2ShapeDistance + [StructLayout(LayoutKind.Explicit, Size = 36)] + public struct B2DistanceOutput + { + /// Closest point on shapeA + [FieldOffset(0)] + public float2 PointA; + + /// Closest point on shapeB + [FieldOffset(8)] + public float2 PointB; + + /// Normal vector that points from A to B. Invalid if distance is zero. + [FieldOffset(16)] + public float2 Normal; + + /// The final distance, zero if overlapped + [FieldOffset(24)] + public float Distance; + + /// Number of GJK iterations used + [FieldOffset(28)] + public int Iterations; + + /// The number of simplexes stored in the simplex array + [FieldOffset(32)] + public int SimplexCount; + } + + /// Simplex vertex for debugging the GJK algorithm + [StructLayout(LayoutKind.Explicit, Size = 36)] + public struct B2SimplexVertex + { + /// support point in proxyA + [FieldOffset(0)] + public float2 WA; + + /// support point in proxyB + [FieldOffset(8)] + public float2 WB; + + /// wB - wA + [FieldOffset(16)] + public float2 W; + + /// barycentric coordinate for closest point + [FieldOffset(24)] + public float A; + + /// wA index + [FieldOffset(28)] + public int IndexA; + + /// wB index + [FieldOffset(32)] + public int IndexB; + } + + /// Simplex from the GJK algorithm + [StructLayout(LayoutKind.Explicit, Size = 112)] + public struct B2Simplex + { + /// vertices + [FieldOffset(0)] + public B2SimplexVertex V1; + + /// vertices + [FieldOffset(36)] + public B2SimplexVertex V2; + + /// vertices + [FieldOffset(72)] + public B2SimplexVertex V3; + + /// number of valid vertices + [FieldOffset(108)] + public int Count; + } + + /// Input parameters for b2ShapeCast + [StructLayout(LayoutKind.Explicit, Size = 192)] + public struct B2ShapeCastPairInput + { + /// The proxy for shape A + [FieldOffset(0)] + public B2ShapeProxy ProxyA; + + /// The proxy for shape B + [FieldOffset(72)] + public B2ShapeProxy ProxyB; + + /// The world transform for shape A + [FieldOffset(144)] + public B2Transform TransformA; + + /// The world transform for shape B + [FieldOffset(160)] + public B2Transform TransformB; + + /// The translation of shape B + [FieldOffset(176)] + public float2 TranslationB; + + /// The fraction of the translation to consider, typically 1 + [FieldOffset(184)] + public float MaxFraction; + + /// Allows shapes with a radius to move slightly closer if already touching + [FieldOffset(188)] + public Bool8 CanEncroach; + } + + /// This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, + /// which may not coincide with the center of mass. However, to support dynamics we must interpolate the center of mass + /// position. + [StructLayout(LayoutKind.Explicit, Size = 40)] + public struct B2Sweep + { + /// Local center of mass position + [FieldOffset(0)] + public float2 LocalCenter; + + /// Starting center of mass world position + [FieldOffset(8)] + public float2 C1; + + /// Ending center of mass world position + [FieldOffset(16)] + public float2 C2; + + /// Starting world rotation + [FieldOffset(24)] + public B2Rot Q1; + + /// Ending world rotation + [FieldOffset(32)] + public B2Rot Q2; + } + + /// Input parameters for b2TimeOfImpact + [StructLayout(LayoutKind.Explicit, Size = 228)] + public struct B2ToiInput + { + /// The proxy for shape A + [FieldOffset(0)] + public B2ShapeProxy ProxyA; + + /// The proxy for shape B + [FieldOffset(72)] + public B2ShapeProxy ProxyB; + + /// The movement of shape A + [FieldOffset(144)] + public B2Sweep SweepA; + + /// The movement of shape B + [FieldOffset(184)] + public B2Sweep SweepB; + + /// Defines the sweep interval [0, maxFraction] + [FieldOffset(224)] + public float MaxFraction; + } + + /// Output parameters for b2TimeOfImpact. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public struct B2ToiOutput + { + /// The type of result + [FieldOffset(0)] + public B2ToiState State; + + /// The sweep time of the collision + [FieldOffset(4)] + public float Fraction; + } + + /// A manifold point is a contact point belonging to a contact manifold. + /// It holds details related to the geometry and dynamics of the contact points. + /// Box2D uses speculative collision so some contact points may be separated. + /// You may use the totalNormalImpulse to determine if there was an interaction during + /// the time step. + [StructLayout(LayoutKind.Explicit, Size = 48)] + public struct B2ManifoldPoint + { + /// Location of the contact point in world space. Subject to precision loss at large coordinates. + /// NOTE: Should only be used for debugging. + [FieldOffset(0)] + public float2 Point; + + /// Location of the contact point relative to shapeA's origin in world space + /// NOTE: When used internally to the Box2D solver, this is relative to the body center of mass. + [FieldOffset(8)] + public float2 AnchorA; + + /// Location of the contact point relative to shapeB's origin in world space + /// NOTE: When used internally to the Box2D solver, this is relative to the body center of mass. + [FieldOffset(16)] + public float2 AnchorB; + + /// The separation of the contact point, negative if penetrating + [FieldOffset(24)] + public float Separation; + + /// The impulse along the manifold normal vector. + [FieldOffset(28)] + public float NormalImpulse; + + /// The friction impulse + [FieldOffset(32)] + public float TangentImpulse; + + /// The total normal impulse applied across sub-stepping and restitution. This is important + /// to identify speculative contact points that had an interaction in the time step. + [FieldOffset(36)] + public float TotalNormalImpulse; + + /// Relative normal velocity pre-solve. Used for hit events. If the normal impulse is + /// zero then there was no hit. Negative means shapes are approaching. + [FieldOffset(40)] + public float NormalVelocity; + + /// Uniquely identifies a contact point between two shapes + [FieldOffset(44)] + public ushort Id; + + /// Did this contact point exist the previous step? + [FieldOffset(46)] + public Bool8 Persisted; + } + + /// A contact manifold describes the contact points between colliding shapes. + /// NOTE: Box2D uses speculative collision so some contact points may be separated. + [StructLayout(LayoutKind.Explicit, Size = 112)] + public struct B2Manifold + { + /// The unit normal vector in world space, points from shape A to bodyB + [FieldOffset(0)] + public float2 Normal; + + /// Angular impulse applied for rolling resistance. N * m * s = kg * m^2 / s + [FieldOffset(8)] + public float RollingImpulse; + + /// The manifold points, up to two are possible in 2D + [FieldOffset(12)] + public B2ManifoldPoint_2 Points; + + /// The number of contacts points, will be 0, 1, or 2 + [FieldOffset(108)] + public int PointCount; + } + + /// The dynamic tree structure. This should be considered private data. + /// It is placed here for performance reasons. + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe struct B2DynamicTree + { + /// Destroy the tree, freeing the node pool. + public void Destroy() + { + Box2D.DynamicTreeDestroy(this); + } + + /// Create a proxy. Provide an AABB and a userData value. + public int CreateProxy(B2Aabb aabb, ulong categoryBits, ulong userData) + { + return Box2D.DynamicTreeCreateProxy(this, aabb, categoryBits, userData); + } + + /// Destroy a proxy. This asserts if the id is invalid. + public void DestroyProxy(int proxyId) + { + Box2D.DynamicTreeDestroyProxy(this, proxyId); + } + + /// Move a proxy to a new AABB by removing and reinserting into the tree. + public void MoveProxy(int proxyId, B2Aabb aabb) + { + Box2D.DynamicTreeMoveProxy(this, proxyId, aabb); + } + + /// Enlarge a proxy and enlarge ancestors as necessary. + public void EnlargeProxy(int proxyId, B2Aabb aabb) + { + Box2D.DynamicTreeEnlargeProxy(this, proxyId, aabb); + } + + /// Modify the category bits on a proxy. This is an expensive operation. + public void SetCategoryBits(int proxyId, ulong categoryBits) + { + Box2D.DynamicTreeSetCategoryBits(this, proxyId, categoryBits); + } + + /// Get the category bits on a proxy. + public ulong GetCategoryBits(int proxyId) + { + return Box2D.DynamicTreeGetCategoryBits(this, proxyId); + } + + /// Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB. + /// RETURN: performance data + public B2TreeStats Query(B2Aabb aabb, ulong maskBits, B2TreeQueryCallbackFcn callback, nint context) + { + return Box2D.DynamicTreeQuery(this, aabb, maskBits, callback, context); + } + + /// Ray cast against the proxies in the tree. This relies on the callback + /// to perform a exact ray cast in the case were the proxy contains a shape. + /// The callback also performs the any collision filtering. This has performance + /// roughly equal to k * log(n), where k is the number of collisions and n is the + /// number of proxies in the tree. + /// Bit-wise filtering using mask bits can greatly improve performance in some scenarios. + /// However, this filtering may be approximate, so the user should still apply filtering to results. + /// the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1) + /// mask bit hint: `bool accept = (maskBits & node->categoryBits) != 0;` + /// a callback class that is called for each proxy that is hit by the ray + /// user context that is passed to the callback + /// RETURN: performance data + public B2TreeStats RayCast( + in B2RayCastInput input, + ulong maskBits, + B2TreeRayCastCallbackFcn callback, + nint context + ) + { + return Box2D.DynamicTreeRayCast(this, input, maskBits, callback, context); + } + + /// Ray cast against the proxies in the tree. This relies on the callback + /// to perform a exact ray cast in the case were the proxy contains a shape. + /// The callback also performs the any collision filtering. This has performance + /// roughly equal to k * log(n), where k is the number of collisions and n is the + /// number of proxies in the tree. + /// the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). + /// filter bits: `bool accept = (maskBits & node->categoryBits) != 0;` + /// a callback class that is called for each proxy that is hit by the shape + /// user context that is passed to the callback + /// RETURN: performance data + public B2TreeStats ShapeCast( + in B2ShapeCastInput input, + ulong maskBits, + B2TreeShapeCastCallbackFcn callback, + nint context + ) + { + return Box2D.DynamicTreeShapeCast(this, input, maskBits, callback, context); + } + + /// Get the height of the binary tree. + public int GetHeight() + { + return Box2D.DynamicTreeGetHeight(this); + } + + /// Get the ratio of the sum of the node areas to the root area. + public float GetAreaRatio() + { + return Box2D.DynamicTreeGetAreaRatio(this); + } + + /// Get the bounding box that contains the entire tree + public B2Aabb GetRootBounds() + { + return Box2D.DynamicTreeGetRootBounds(this); + } + + /// Get the number of proxies created + public int GetProxyCount() + { + return Box2D.DynamicTreeGetProxyCount(this); + } + + /// Rebuild the tree while retaining subtrees that haven't changed. Returns the number of boxes sorted. + public int Rebuild(Bool8 fullBuild) + { + return Box2D.DynamicTreeRebuild(this, fullBuild); + } + + /// Get the number of bytes used by this tree + public int GetByteCount() + { + return Box2D.DynamicTreeGetByteCount(this); + } + + /// Get proxy user data + public ulong GetUserData(int proxyId) + { + return Box2D.DynamicTreeGetUserData(this, proxyId); + } + + /// Get the AABB of a proxy + public B2Aabb GetAabb(int proxyId) + { + return Box2D.DynamicTreeGetAabb(this, proxyId); + } + + /// Validate this tree. For testing. + public void Validate() + { + Box2D.DynamicTreeValidate(this); + } + + /// Validate this tree has no enlarged AABBs. For testing. + public void ValidateNoEnlarged() + { + Box2D.DynamicTreeValidateNoEnlarged(this); + } + + /// The tree nodes + [FieldOffset(0)] + public B2TreeNode* Nodes; + + /// The root index + [FieldOffset(8)] + public int Root; + + /// The number of nodes + [FieldOffset(12)] + public int NodeCount; + + /// The allocated node space + [FieldOffset(16)] + public int NodeCapacity; + + /// Node free list + [FieldOffset(20)] + public int FreeList; + + /// Number of proxies created + [FieldOffset(24)] + public int ProxyCount; + + /// Leaf indices for rebuild + [FieldOffset(32)] + public int* LeafIndices; + + /// Leaf bounding boxes for rebuild + [FieldOffset(40)] + public B2Aabb* LeafBoxes; + + /// Leaf bounding box centers for rebuild + [FieldOffset(48)] + public float2* LeafCenters; + + /// Bins for sorting during rebuild + [FieldOffset(56)] + public int* BinIndices; + + /// Allocated space for rebuilding + [FieldOffset(64)] + public int RebuildCapacity; + } + + /// + public struct B2TreeNode { } + + /// These are performance results returned by dynamic tree queries. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public struct B2TreeStats + { + /// Number of internal nodes visited during the query + [FieldOffset(0)] + public int NodeVisits; + + /// Number of leaf nodes visited during the query + [FieldOffset(4)] + public int LeafVisits; + } + + /// These are the collision planes returned from b2World_CollideMover + [StructLayout(LayoutKind.Explicit, Size = 24)] + public struct B2PlaneResult + { + /// The collision plane between the mover and a convex shape + [FieldOffset(0)] + public B2Plane Plane; + + /// The collision point on the shape. + [FieldOffset(12)] + public float2 Point; + + /// Did the collision register a hit? If not this plane should be ignored. + [FieldOffset(20)] + public Bool8 Hit; + } + + /// These are collision planes that can be fed to b2SolvePlanes. Normally + /// this is assembled by the user from plane results in b2PlaneResult + [StructLayout(LayoutKind.Explicit, Size = 24)] + public struct B2CollisionPlane + { + /// The collision plane between the mover and some shape + [FieldOffset(0)] + public B2Plane Plane; + + /// Setting this to FLT_MAX makes the plane as rigid as possible. Lower values can + /// make the plane collision soft. Usually in meters. + [FieldOffset(12)] + public float PushLimit; + + /// The push on the mover determined by b2SolvePlanes. Usually in meters. + [FieldOffset(16)] + public float Push; + + /// Indicates if b2ClipVector should clip against this plane. Should be false for soft collision. + [FieldOffset(20)] + public Bool8 ClipVelocity; + } + + /// Result returned by b2SolvePlanes + [StructLayout(LayoutKind.Explicit, Size = 12)] + public struct B2PlaneSolverResult + { + /// The translation of the mover + [FieldOffset(0)] + public float2 Translation; + + /// The number of iterations used by the plane solver. For diagnostics. + [FieldOffset(8)] + public int IterationCount; + } + + /// World id references a world instance. This should be treated as an opaque handle. + [StructLayout(LayoutKind.Explicit, Size = 4)] + public readonly partial record struct B2World : IDisposable + { + /// Destroy a world + public void Dispose() + { + Box2D.Dispose(this); + } + + /// World id validation. Provides validation for up to 64K allocations. + public Bool8 IsValid() + { + return Box2D.WorldIsValid(this); + } + + /// Simulate a world for one time step. This performs collision detection, integration, and constraint solution. + /// The amount of time to simulate, this should be a fixed number. Usually 1/60. + /// The number of sub-steps, increasing the sub-step count can increase accuracy. Usually 4. + public void Step(float timeStep, int subStepCount) + { + Box2D.WorldStep(this, timeStep, subStepCount); + } + + /// Call this to draw shapes and other debug draw data + public void Draw(in B2DebugDraw draw) + { + Box2D.WorldDraw(this, draw); + } + + /// Get the body events for the current time step. The event data is transient. Do not store a reference to this data. + public B2BodyEvents GetBodyEvents() + { + return Box2D.WorldGetBodyEvents(this); + } + + /// Get sensor events for the current time step. The event data is transient. Do not store a reference to this data. + public B2SensorEvents GetSensorEvents() + { + return Box2D.WorldGetSensorEvents(this); + } + + /// Get contact events for this current time step. The event data is transient. Do not store a reference to this data. + public B2ContactEvents GetContactEvents() + { + return Box2D.WorldGetContactEvents(this); + } + + /// Overlap test for all shapes that *potentially* overlap the provided AABB + public B2TreeStats OverlapAabb(B2Aabb aabb, B2QueryFilter filter, B2OverlapResultFcn fcn, nint context) + { + return Box2D.WorldOverlapAabb(this, aabb, filter, fcn, context); + } + + /// Overlap test for all shapes that overlap the provided shape proxy. + public B2TreeStats OverlapShape( + in B2ShapeProxy proxy, + B2QueryFilter filter, + B2OverlapResultFcn fcn, + nint context + ) + { + return Box2D.WorldOverlapShape(this, proxy, filter, fcn, context); + } + + /// Cast a ray into the world to collect shapes in the path of the ray. + /// Your callback function controls whether you get the closest point, any point, or n-points. + /// NOTE: The callback function may receive shapes in any order + /// The start point of the ray + /// The translation of the ray from the start point to the end point + /// Contains bit flags to filter unwanted shapes from the results + /// A user implemented callback function + /// A user context that is passed along to the callback function + /// RETURN: traversal performance counters + public B2TreeStats CastRay( + float2 origin, + float2 translation, + B2QueryFilter filter, + B2CastResultFcn fcn, + nint context + ) + { + return Box2D.WorldCastRay(this, origin, translation, filter, fcn, context); + } + + /// Cast a ray into the world to collect the closest hit. This is a convenience function. Ignores initial overlap. + /// This is less general than b2World_CastRay() and does not allow for custom filtering. + public B2RayResult CastRayClosest(float2 origin, float2 translation, B2QueryFilter filter) + { + return Box2D.WorldCastRayClosest(this, origin, translation, filter); + } + + /// Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point. + /// SEE: b2World_CastRay + public B2TreeStats CastShape( + in B2ShapeProxy proxy, + float2 translation, + B2QueryFilter filter, + B2CastResultFcn fcn, + nint context + ) + { + return Box2D.WorldCastShape(this, proxy, translation, filter, fcn, context); + } + + /// Cast a capsule mover through the world. This is a special shape cast that handles sliding along other shapes while reducing + /// clipping. + public float CastMover(in B2Capsule mover, float2 translation, B2QueryFilter filter) + { + return Box2D.WorldCastMover(this, mover, translation, filter); + } + + /// Collide a capsule mover with the world, gathering collision planes that can be fed to b2SolvePlanes. Useful for + /// kinematic character movement. + public void CollideMover(in B2Capsule mover, B2QueryFilter filter, B2PlaneResultFcn fcn, nint context) + { + Box2D.WorldCollideMover(this, mover, filter, fcn, context); + } + + /// Enable/disable sleep. If your application does not need sleeping, you can gain some performance + /// by disabling sleep completely at the world level. + /// SEE: b2WorldDef + public void EnableSleeping(Bool8 flag) + { + Box2D.WorldEnableSleeping(this, flag); + } + + /// Is body sleeping enabled? + public Bool8 IsSleepingEnabled() + { + return Box2D.WorldIsSleepingEnabled(this); + } + + /// Enable/disable continuous collision between dynamic and static bodies. Generally you should keep continuous + /// collision enabled to prevent fast moving objects from going through static objects. The performance gain from + /// disabling continuous collision is minor. + /// SEE: b2WorldDef + public void EnableContinuous(Bool8 flag) + { + Box2D.WorldEnableContinuous(this, flag); + } + + /// Is continuous collision enabled? + public Bool8 IsContinuousEnabled() + { + return Box2D.WorldIsContinuousEnabled(this); + } + + /// Adjust the restitution threshold. It is recommended not to make this value very small + /// because it will prevent bodies from sleeping. Usually in meters per second. + /// SEE: b2WorldDef + public void SetRestitutionThreshold(float value) + { + Box2D.WorldSetRestitutionThreshold(this, value); + } + + /// Get the the restitution speed threshold. Usually in meters per second. + public float GetRestitutionThreshold() + { + return Box2D.WorldGetRestitutionThreshold(this); + } + + /// Adjust the hit event threshold. This controls the collision speed needed to generate a b2ContactHitEvent. + /// Usually in meters per second. + /// SEE: b2WorldDef::hitEventThreshold + public void SetHitEventThreshold(float value) + { + Box2D.WorldSetHitEventThreshold(this, value); + } + + /// Get the the hit event speed threshold. Usually in meters per second. + public float GetHitEventThreshold() + { + return Box2D.WorldGetHitEventThreshold(this); + } + + /// Register the custom filter callback. This is optional. + public void SetCustomFilterCallback(B2CustomFilterFcn fcn, nint context) + { + Box2D.WorldSetCustomFilterCallback(this, fcn, context); + } + + /// Register the pre-solve callback. This is optional. + public void SetPreSolveCallback(B2PreSolveFcn fcn, nint context) + { + Box2D.WorldSetPreSolveCallback(this, fcn, context); + } + + /// Set the gravity vector for the entire world. Box2D has no concept of an up direction and this + /// is left as a decision for the application. Usually in m/s^2. + /// SEE: b2WorldDef + public void SetGravity(float2 gravity) + { + Box2D.WorldSetGravity(this, gravity); + } + + /// Get the gravity vector + public float2 GetGravity() + { + return Box2D.WorldGetGravity(this); + } + + /// Apply a radial explosion + /// The explosion definition + public void Explode(in B2ExplosionDef explosionDef) + { + Box2D.WorldExplode(this, explosionDef); + } + + /// Adjust contact tuning parameters + /// The contact stiffness (cycles per second) + /// The contact bounciness with 1 being critical damping (non-dimensional) + /// The maximum contact constraint push out speed (meters per second) + /// NOTE: Advanced feature + public void SetContactTuning(float hertz, float dampingRatio, float pushSpeed) + { + Box2D.WorldSetContactTuning(this, hertz, dampingRatio, pushSpeed); + } + + /// Set the maximum linear speed. Usually in m/s. + public void SetMaximumLinearSpeed(float maximumLinearSpeed) + { + Box2D.WorldSetMaximumLinearSpeed(this, maximumLinearSpeed); + } + + /// Get the maximum linear speed. Usually in m/s. + public float GetMaximumLinearSpeed() + { + return Box2D.WorldGetMaximumLinearSpeed(this); + } + + /// Enable/disable constraint warm starting. Advanced feature for testing. Disabling + /// warm starting greatly reduces stability and provides no performance gain. + public void EnableWarmStarting(Bool8 flag) + { + Box2D.WorldEnableWarmStarting(this, flag); + } + + /// Is constraint warm starting enabled? + public Bool8 IsWarmStartingEnabled() + { + return Box2D.WorldIsWarmStartingEnabled(this); + } + + /// Get the number of awake bodies. + public int GetAwakeBodyCount() + { + return Box2D.WorldGetAwakeBodyCount(this); + } + + /// Get the current world performance profile + public B2Profile GetProfile() + { + return Box2D.WorldGetProfile(this); + } + + /// Get world counters and sizes + public B2Counters GetCounters() + { + return Box2D.WorldGetCounters(this); + } + + /// Set the user data pointer. + public void SetUserData(nint userData) + { + Box2D.WorldSetUserData(this, userData); + } + + /// Get the user data pointer. + public unsafe void* GetUserData() + { + return Box2D.WorldGetUserData(this); + } + + /// Set the friction callback. Passing NULL resets to default. + public void SetFrictionCallback(B2FrictionCallback callback) + { + Box2D.WorldSetFrictionCallback(this, callback); + } + + /// Set the restitution callback. Passing NULL resets to default. + public void SetRestitutionCallback(B2RestitutionCallback callback) + { + Box2D.WorldSetRestitutionCallback(this, callback); + } + + /// Dump memory stats to box2d_memory.txt + public void DumpMemoryStats() + { + Box2D.WorldDumpMemoryStats(this); + } + + /// This is for internal testing + public void RebuildStaticTree() + { + Box2D.WorldRebuildStaticTree(this); + } + + /// This is for internal testing + public void EnableSpeculative(Bool8 flag) + { + Box2D.WorldEnableSpeculative(this, flag); + } + + /// Create a rigid body given a definition. No reference to the definition is retained. So you can create the definition + /// on the stack and pass it as a pointer. + /// WARNING: This function is locked during callbacks. + public B2Body CreateBody(in B2BodyDef def) + { + return Box2D.CreateBody(this, def); + } + + /// Create a distance joint + /// SEE: b2DistanceJointDef for details + public B2DistanceJoint CreateDistanceJoint(in B2DistanceJointDef def) + { + return Box2D.CreateDistanceJoint(this, def); + } + + /// Create a motor joint + /// SEE: b2MotorJointDef for details + public B2MotorJoint CreateMotorJoint(in B2MotorJointDef def) + { + return Box2D.CreateMotorJoint(this, def); + } + + /// Create a mouse joint + /// SEE: b2MouseJointDef for details + public B2MouseJoint CreateMouseJoint(in B2MouseJointDef def) + { + return Box2D.CreateMouseJoint(this, def); + } + + /// Create a filter joint. + /// SEE: b2FilterJointDef for details + public B2FilterJoint CreateFilterJoint(in B2FilterJointDef def) + { + return Box2D.CreateFilterJoint(this, def); + } + + /// Create a prismatic (slider) joint. + /// SEE: b2PrismaticJointDef for details + public B2PrismaticJoint CreatePrismaticJoint(in B2PrismaticJointDef def) + { + return Box2D.CreatePrismaticJoint(this, def); + } + + /// Create a revolute joint + /// SEE: b2RevoluteJointDef for details + public B2RevoluteJoint CreateRevoluteJoint(in B2RevoluteJointDef def) + { + return Box2D.CreateRevoluteJoint(this, def); + } + + /// Create a weld joint + /// SEE: b2WeldJointDef for details + public B2WeldJoint CreateWeldJoint(in B2WeldJointDef def) + { + return Box2D.CreateWeldJoint(this, def); + } + + /// Create a wheel joint + /// SEE: b2WheelJointDef for details + public B2WheelJoint CreateWheelJoint(in B2WheelJointDef def) + { + return Box2D.CreateWheelJoint(this, def); + } + + /// + [FieldOffset(0)] + public readonly ushort Index1; + + /// + [FieldOffset(2)] + public readonly ushort Generation; + } + + /// Body id references a body instance. This should be treated as an opaque handle. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public readonly partial record struct B2Body : IDisposable + { + /// Destroy a rigid body given an id. This destroys all shapes and joints attached to the body. + /// Do not keep references to the associated shapes and joints. + public void Dispose() + { + Box2D.Dispose(this); + } + + /// Body identifier validation. Can be used to detect orphaned ids. Provides validation for up to 64K allocations. + public Bool8 IsValid() + { + return Box2D.BodyIsValid(this); + } + + /// Get the body type: static, kinematic, or dynamic + public B2BodyType GetBodyType() + { + return Box2D.GetBodyType(this); + } + + /// Change the body type. This is an expensive operation. This automatically updates the mass + /// properties regardless of the automatic mass setting. + public void SetType(B2BodyType type) + { + Box2D.BodySetType(this, type); + } + + /// Set the body name. Up to 31 characters excluding 0 termination. + public unsafe void SetName(byte* name) + { + Box2D.BodySetName(this, name); + } + + /// Get the body name. May be null. + public unsafe byte* GetName() + { + return Box2D.BodyGetName(this); + } + + /// Set the user data for a body + public void SetUserData(nint userData) + { + Box2D.BodySetUserData(this, userData); + } + + /// Get the user data stored in a body + public unsafe void* GetUserData() + { + return Box2D.BodyGetUserData(this); + } + + /// Get the world position of a body. This is the location of the body origin. + public float2 GetPosition() + { + return Box2D.BodyGetPosition(this); + } + + /// Get the world rotation of a body as a cosine/sine pair (complex number) + public B2Rot GetRotation() + { + return Box2D.BodyGetRotation(this); + } + + /// Get the world transform of a body. + public B2Transform GetTransform() + { + return Box2D.BodyGetTransform(this); + } + + /// Set the world transform of a body. This acts as a teleport and is fairly expensive. + /// NOTE: Generally you should create a body with then intended transform. + /// SEE: b2BodyDef::position and b2BodyDef::angle + public void SetTransform(float2 position, B2Rot rotation) + { + Box2D.BodySetTransform(this, position, rotation); + } + + /// Get a local point on a body given a world point + public float2 GetLocalPoint(float2 worldPoint) + { + return Box2D.BodyGetLocalPoint(this, worldPoint); + } + + /// Get a world point on a body given a local point + public float2 GetWorldPoint(float2 localPoint) + { + return Box2D.BodyGetWorldPoint(this, localPoint); + } + + /// Get a local vector on a body given a world vector + public float2 GetLocalVector(float2 worldVector) + { + return Box2D.BodyGetLocalVector(this, worldVector); + } + + /// Get a world vector on a body given a local vector + public float2 GetWorldVector(float2 localVector) + { + return Box2D.BodyGetWorldVector(this, localVector); + } + + /// Get the linear velocity of a body's center of mass. Usually in meters per second. + public float2 GetLinearVelocity() + { + return Box2D.BodyGetLinearVelocity(this); + } + + /// Get the angular velocity of a body in radians per second + public float GetAngularVelocity() + { + return Box2D.BodyGetAngularVelocity(this); + } + + /// Set the linear velocity of a body. Usually in meters per second. + public void SetLinearVelocity(float2 linearVelocity) + { + Box2D.BodySetLinearVelocity(this, linearVelocity); + } + + /// Set the angular velocity of a body in radians per second + public void SetAngularVelocity(float angularVelocity) + { + Box2D.BodySetAngularVelocity(this, angularVelocity); + } + + /// Set the velocity to reach the given transform after a given time step. + /// The result will be close but maybe not exact. This is meant for kinematic bodies. + /// The target is not applied if the velocity would be below the sleep threshold. + /// This will automatically wake the body if asleep. + public void SetTargetTransform(B2Transform target, float timeStep) + { + Box2D.BodySetTargetTransform(this, target, timeStep); + } + + /// Get the linear velocity of a local point attached to a body. Usually in meters per second. + public float2 GetLocalPointVelocity(float2 localPoint) + { + return Box2D.BodyGetLocalPointVelocity(this, localPoint); + } + + /// Get the linear velocity of a world point attached to a body. Usually in meters per second. + public float2 GetWorldPointVelocity(float2 worldPoint) + { + return Box2D.BodyGetWorldPointVelocity(this, worldPoint); + } + + /// Apply a force at a world point. If the force is not applied at the center of mass, + /// it will generate a torque and affect the angular velocity. This optionally wakes up the body. + /// The force is ignored if the body is not awake. + /// The world force vector, usually in newtons (N) + /// The world position of the point of application + /// Option to wake up the body + public void ApplyForce(float2 force, float2 point, Bool8 wake) + { + Box2D.BodyApplyForce(this, force, point, wake); + } + + /// Apply a force to the center of mass. This optionally wakes up the body. + /// The force is ignored if the body is not awake. + /// the world force vector, usually in newtons (N). + /// also wake up the body + public void ApplyForceToCenter(float2 force, Bool8 wake) + { + Box2D.BodyApplyForceToCenter(this, force, wake); + } + + /// Apply a torque. This affects the angular velocity without affecting the linear velocity. + /// This optionally wakes the body. The torque is ignored if the body is not awake. + /// about the z-axis (out of the screen), usually in N*m. + /// also wake up the body + public void ApplyTorque(float torque, Bool8 wake) + { + Box2D.BodyApplyTorque(this, torque, wake); + } + + /// Apply an impulse at a point. This immediately modifies the velocity. + /// It also modifies the angular velocity if the point of application + /// is not at the center of mass. This optionally wakes the body. + /// The impulse is ignored if the body is not awake. + /// the world impulse vector, usually in N*s or kg*m/s. + /// the world position of the point of application. + /// also wake up the body + /// WARNING: This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. + public void ApplyLinearImpulse(float2 impulse, float2 point, Bool8 wake) + { + Box2D.BodyApplyLinearImpulse(this, impulse, point, wake); + } + + /// Apply an impulse to the center of mass. This immediately modifies the velocity. + /// The impulse is ignored if the body is not awake. This optionally wakes the body. + /// the world impulse vector, usually in N*s or kg*m/s. + /// also wake up the body + /// WARNING: This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. + public void ApplyLinearImpulseToCenter(float2 impulse, Bool8 wake) + { + Box2D.BodyApplyLinearImpulseToCenter(this, impulse, wake); + } + + /// Apply an angular impulse. The impulse is ignored if the body is not awake. + /// This optionally wakes the body. + /// the angular impulse, usually in units of kg*m*m/s + /// also wake up the body + /// WARNING: This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. + public void ApplyAngularImpulse(float impulse, Bool8 wake) + { + Box2D.BodyApplyAngularImpulse(this, impulse, wake); + } + + /// Get the mass of the body, usually in kilograms + public float GetMass() + { + return Box2D.BodyGetMass(this); + } + + /// Get the rotational inertia of the body, usually in kg*m^2 + public float GetRotationalInertia() + { + return Box2D.BodyGetRotationalInertia(this); + } + + /// Get the center of mass position of the body in local space + public float2 GetLocalCenterOfMass() + { + return Box2D.BodyGetLocalCenterOfMass(this); + } + + /// Get the center of mass position of the body in world space + public float2 GetWorldCenterOfMass() + { + return Box2D.BodyGetWorldCenterOfMass(this); + } + + /// Override the body's mass properties. Normally this is computed automatically using the + /// shape geometry and density. This information is lost if a shape is added or removed or if the + /// body type changes. + public void SetMassData(B2MassData massData) + { + Box2D.BodySetMassData(this, massData); + } + + /// Get the mass data for a body + public B2MassData GetMassData() + { + return Box2D.BodyGetMassData(this); + } + + /// This update the mass properties to the sum of the mass properties of the shapes. + /// This normally does not need to be called unless you called SetMassData to override + /// the mass and you later want to reset the mass. + /// You may also use this when automatic mass computation has been disabled. + /// You should call this regardless of body type. + /// Note that sensor shapes may have mass. + public void ApplyMassFromShapes() + { + Box2D.BodyApplyMassFromShapes(this); + } + + /// Adjust the linear damping. Normally this is set in b2BodyDef before creation. + public void SetLinearDamping(float linearDamping) + { + Box2D.BodySetLinearDamping(this, linearDamping); + } + + /// Get the current linear damping. + public float GetLinearDamping() + { + return Box2D.BodyGetLinearDamping(this); + } + + /// Adjust the angular damping. Normally this is set in b2BodyDef before creation. + public void SetAngularDamping(float angularDamping) + { + Box2D.BodySetAngularDamping(this, angularDamping); + } + + /// Get the current angular damping. + public float GetAngularDamping() + { + return Box2D.BodyGetAngularDamping(this); + } + + /// Adjust the gravity scale. Normally this is set in b2BodyDef before creation. + /// SEE: b2BodyDef::gravityScale + public void SetGravityScale(float gravityScale) + { + Box2D.BodySetGravityScale(this, gravityScale); + } + + /// Get the current gravity scale + public float GetGravityScale() + { + return Box2D.BodyGetGravityScale(this); + } + + /// RETURN: true if this body is awake + public Bool8 IsAwake() + { + return Box2D.BodyIsAwake(this); + } + + /// Wake a body from sleep. This wakes the entire island the body is touching. + /// WARNING: Putting a body to sleep will put the entire island of bodies touching this body to sleep, which can be expensive and possibly unintuitive. + public void SetAwake(Bool8 awake) + { + Box2D.BodySetAwake(this, awake); + } + + /// Enable or disable sleeping for this body. If sleeping is disabled the body will wake. + public void EnableSleep(Bool8 enableSleep) + { + Box2D.BodyEnableSleep(this, enableSleep); + } + + /// Returns true if sleeping is enabled for this body + public Bool8 IsSleepEnabled() + { + return Box2D.BodyIsSleepEnabled(this); + } + + /// Set the sleep threshold, usually in meters per second + public void SetSleepThreshold(float sleepThreshold) + { + Box2D.BodySetSleepThreshold(this, sleepThreshold); + } + + /// Get the sleep threshold, usually in meters per second. + public float GetSleepThreshold() + { + return Box2D.BodyGetSleepThreshold(this); + } + + /// Returns true if this body is enabled + public Bool8 IsEnabled() + { + return Box2D.BodyIsEnabled(this); + } + + /// Disable a body by removing it completely from the simulation. This is expensive. + public void Disable() + { + Box2D.BodyDisable(this); + } + + /// Enable a body by adding it to the simulation. This is expensive. + public void Enable() + { + Box2D.BodyEnable(this); + } + + /// Set this body to have fixed rotation. This causes the mass to be reset in all cases. + public void SetFixedRotation(Bool8 flag) + { + Box2D.BodySetFixedRotation(this, flag); + } + + /// Does this body have fixed rotation? + public Bool8 IsFixedRotation() + { + return Box2D.BodyIsFixedRotation(this); + } + + /// Set this body to be a bullet. A bullet does continuous collision detection + /// against dynamic bodies (but not other bullets). + public void SetBullet(Bool8 flag) + { + Box2D.BodySetBullet(this, flag); + } + + /// Is this body a bullet? + public Bool8 IsBullet() + { + return Box2D.BodyIsBullet(this); + } + + /// Enable/disable contact events on all shapes. + /// SEE: b2ShapeDef::enableContactEvents + /// WARNING: changing this at runtime may cause mismatched begin/end touch events + public void EnableContactEvents(Bool8 flag) + { + Box2D.BodyEnableContactEvents(this, flag); + } + + /// Enable/disable hit events on all shapes + /// SEE: b2ShapeDef::enableHitEvents + public void EnableHitEvents(Bool8 flag) + { + Box2D.BodyEnableHitEvents(this, flag); + } + + /// Get the world that owns this body + public B2World GetWorld() + { + return Box2D.BodyGetWorld(this); + } + + /// Get the number of shapes on this body + public int GetShapeCount() + { + return Box2D.BodyGetShapeCount(this); + } + + /// Get the shape ids for all shapes on this body, up to the provided capacity. + /// RETURNS: the number of shape ids stored in the user array + public int GetShapes(in B2Shape shapeArray, int capacity) + { + return Box2D.BodyGetShapes(this, shapeArray, capacity); + } + + /// Get the number of joints on this body + public int GetJointCount() + { + return Box2D.BodyGetJointCount(this); + } + + /// Get the maximum capacity required for retrieving all the touching contacts on a body + public int GetContactCapacity() + { + return Box2D.BodyGetContactCapacity(this); + } + + /// Get the touching contact data for a body. + /// NOTE: Box2D uses speculative collision so some contact points may be separated. + /// RETURNS: the number of elements filled in the provided array + /// WARNING: do not ignore the return value, it specifies the valid number of elements + public int GetContactData(in B2ContactData contactData, int capacity) + { + return Box2D.BodyGetContactData(this, contactData, capacity); + } + + /// Get the current world AABB that contains all the attached shapes. Note that this may not encompass the body origin. + /// If there are no shapes attached then the returned AABB is empty and centered on the body origin. + public B2Aabb ComputeAabb() + { + return Box2D.BodyComputeAabb(this); + } + + /// Create a circle shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + public B2Shape CreateCircleShape(in B2ShapeDef def, in B2Circle circle) + { + return Box2D.CreateCircleShape(this, def, circle); + } + + /// Create a line segment shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + public B2Shape CreateSegmentShape(in B2ShapeDef def, in B2Segment segment) + { + return Box2D.CreateSegmentShape(this, def, segment); + } + + /// Create a capsule shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + public B2Shape CreateCapsuleShape(in B2ShapeDef def, in B2Capsule capsule) + { + return Box2D.CreateCapsuleShape(this, def, capsule); + } + + /// Create a polygon shape and attach it to a body. The shape definition and geometry are fully cloned. + /// Contacts are not created until the next time step. + /// RETURN: the shape id for accessing the shape + public B2Shape CreatePolygonShape(in B2ShapeDef def, in B2Polygon polygon) + { + return Box2D.CreatePolygonShape(this, def, polygon); + } + + /// Create a chain shape + /// SEE: b2ChainDef for details + public B2Chain CreateChain(in B2ChainDef def) + { + return Box2D.CreateChain(this, def); + } + + /// + [FieldOffset(0)] + public readonly int Index1; + + /// + [FieldOffset(4)] + public readonly ushort World0; + + /// + [FieldOffset(6)] + public readonly ushort Generation; + } + + /// Shape id references a shape instance. This should be treated as an opaque handle. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public readonly partial record struct B2Shape + { + /// Destroy a shape. You may defer the body mass update which can improve performance if several shapes on a + /// body are destroyed at once. + /// SEE: b2Body_ApplyMassFromShapes + public void Dispose(Bool8 updateBodyMass) + { + Box2D.Dispose(this, updateBodyMass); + } + + /// Shape identifier validation. Provides validation for up to 64K allocations. + public Bool8 IsValid() + { + return Box2D.ShapeIsValid(this); + } + + /// Get the type of a shape + public B2ShapeType GetShapeType() + { + return Box2D.GetShapeType(this); + } + + /// Get the id of the body that a shape is attached to + public B2Body GetBody() + { + return Box2D.ShapeGetBody(this); + } + + /// Get the world that owns this shape + public B2World GetWorld() + { + return Box2D.ShapeGetWorld(this); + } + + /// Returns true if the shape is a sensor. It is not possible to change a shape + /// from sensor to solid dynamically because this breaks the contract for + /// sensor events. + public Bool8 IsSensor() + { + return Box2D.ShapeIsSensor(this); + } + + /// Set the user data for a shape + public void SetUserData(nint userData) + { + Box2D.ShapeSetUserData(this, userData); + } + + /// Get the user data for a shape. This is useful when you get a shape id + /// from an event or query. + public unsafe void* GetUserData() + { + return Box2D.ShapeGetUserData(this); + } + + /// Set the mass density of a shape, usually in kg/m^2. + /// This will optionally update the mass properties on the parent body. + /// SEE: b2ShapeDef::density, b2Body_ApplyMassFromShapes + public void SetDensity(float density, Bool8 updateBodyMass) + { + Box2D.ShapeSetDensity(this, density, updateBodyMass); + } + + /// Get the density of a shape, usually in kg/m^2 + public float GetDensity() + { + return Box2D.ShapeGetDensity(this); + } + + /// Set the friction on a shape + /// SEE: b2ShapeDef::friction + public void SetFriction(float friction) + { + Box2D.ShapeSetFriction(this, friction); + } + + /// Get the friction of a shape + public float GetFriction() + { + return Box2D.ShapeGetFriction(this); + } + + /// Set the shape restitution (bounciness) + /// SEE: b2ShapeDef::restitution + public void SetRestitution(float restitution) + { + Box2D.ShapeSetRestitution(this, restitution); + } + + /// Get the shape restitution + public float GetRestitution() + { + return Box2D.ShapeGetRestitution(this); + } + + /// Set the shape material identifier + /// SEE: b2ShapeDef::material + public void SetMaterial(int material) + { + Box2D.ShapeSetMaterial(this, material); + } + + /// Get the shape material identifier + public int GetMaterial() + { + return Box2D.ShapeGetMaterial(this); + } + + /// Set the shape surface material + public void SetSurfaceMaterial(B2SurfaceMaterial surfaceMaterial) + { + Box2D.ShapeSetSurfaceMaterial(this, surfaceMaterial); + } + + /// Get the shape surface material + public B2SurfaceMaterial GetSurfaceMaterial() + { + return Box2D.ShapeGetSurfaceMaterial(this); + } + + /// Get the shape filter + public B2Filter GetFilter() + { + return Box2D.ShapeGetFilter(this); + } + + /// Set the current filter. This is almost as expensive as recreating the shape. This may cause + /// contacts to be immediately destroyed. However contacts are not created until the next world step. + /// Sensor overlap state is also not updated until the next world step. + /// SEE: b2ShapeDef::filter + public void SetFilter(B2Filter filter) + { + Box2D.ShapeSetFilter(this, filter); + } + + /// Enable sensor events for this shape. + /// SEE: b2ShapeDef::enableSensorEvents + public void EnableSensorEvents(Bool8 flag) + { + Box2D.ShapeEnableSensorEvents(this, flag); + } + + /// Returns true if sensor events are enabled. + public Bool8 AreSensorEventsEnabled() + { + return Box2D.ShapeAreSensorEventsEnabled(this); + } + + /// Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. + /// SEE: b2ShapeDef::enableContactEvents + /// WARNING: changing this at run-time may lead to lost begin/end events + public void EnableContactEvents(Bool8 flag) + { + Box2D.ShapeEnableContactEvents(this, flag); + } + + /// Returns true if contact events are enabled + public Bool8 AreContactEventsEnabled() + { + return Box2D.ShapeAreContactEventsEnabled(this); + } + + /// Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive + /// and must be carefully handled due to multithreading. Ignored for sensors. + /// SEE: b2PreSolveFcn + public void EnablePreSolveEvents(Bool8 flag) + { + Box2D.ShapeEnablePreSolveEvents(this, flag); + } + + /// Returns true if pre-solve events are enabled + public Bool8 ArePreSolveEventsEnabled() + { + return Box2D.ShapeArePreSolveEventsEnabled(this); + } + + /// Enable contact hit events for this shape. Ignored for sensors. + /// SEE: b2WorldDef.hitEventThreshold + public void EnableHitEvents(Bool8 flag) + { + Box2D.ShapeEnableHitEvents(this, flag); + } + + /// Returns true if hit events are enabled + public Bool8 AreHitEventsEnabled() + { + return Box2D.ShapeAreHitEventsEnabled(this); + } + + /// Test a point for overlap with a shape + public Bool8 TestPoint(float2 point) + { + return Box2D.ShapeTestPoint(this, point); + } + + /// Ray cast a shape directly + public B2CastOutput RayCast(in B2RayCastInput input) + { + return Box2D.ShapeRayCast(this, input); + } + + /// Get a copy of the shape's circle. Asserts the type is correct. + public B2Circle GetCircle() + { + return Box2D.ShapeGetCircle(this); + } + + /// Get a copy of the shape's line segment. Asserts the type is correct. + public B2Segment GetSegment() + { + return Box2D.ShapeGetSegment(this); + } + + /// Get a copy of the shape's chain segment. These come from chain shapes. + /// Asserts the type is correct. + public B2ChainSegment GetChainSegment() + { + return Box2D.ShapeGetChainSegment(this); + } + + /// Get a copy of the shape's capsule. Asserts the type is correct. + public B2Capsule GetCapsule() + { + return Box2D.ShapeGetCapsule(this); + } + + /// Get a copy of the shape's convex polygon. Asserts the type is correct. + public B2Polygon GetPolygon() + { + return Box2D.ShapeGetPolygon(this); + } + + /// Allows you to change a shape to be a circle or update the current circle. + /// This does not modify the mass properties. + /// SEE: b2Body_ApplyMassFromShapes + public void SetCircle(in B2Circle circle) + { + Box2D.ShapeSetCircle(this, circle); + } + + /// Allows you to change a shape to be a capsule or update the current capsule. + /// This does not modify the mass properties. + /// SEE: b2Body_ApplyMassFromShapes + public void SetCapsule(in B2Capsule capsule) + { + Box2D.ShapeSetCapsule(this, capsule); + } + + /// Allows you to change a shape to be a segment or update the current segment. + public void SetSegment(in B2Segment segment) + { + Box2D.ShapeSetSegment(this, segment); + } + + /// Allows you to change a shape to be a polygon or update the current polygon. + /// This does not modify the mass properties. + /// SEE: b2Body_ApplyMassFromShapes + public void SetPolygon(in B2Polygon polygon) + { + Box2D.ShapeSetPolygon(this, polygon); + } + + /// Get the parent chain id if the shape type is a chain segment, otherwise + /// returns b2_nullChainId. + public B2Chain GetParentChain() + { + return Box2D.ShapeGetParentChain(this); + } + + /// Get the maximum capacity required for retrieving all the touching contacts on a shape + public int GetContactCapacity() + { + return Box2D.ShapeGetContactCapacity(this); + } + + /// Get the touching contact data for a shape. The provided shapeId will be either shapeIdA or shapeIdB on the contact data. + /// NOTE: Box2D uses speculative collision so some contact points may be separated. + /// RETURNS: the number of elements filled in the provided array + /// WARNING: do not ignore the return value, it specifies the valid number of elements + public int GetContactData(in B2ContactData contactData, int capacity) + { + return Box2D.ShapeGetContactData(this, contactData, capacity); + } + + /// Get the maximum capacity required for retrieving all the overlapped shapes on a sensor shape. + /// This returns 0 if the provided shape is not a sensor. + /// RETURNS: the required capacity to get all the overlaps in b2Shape_GetSensorOverlaps + public int GetSensorCapacity() + { + return Box2D.ShapeGetSensorCapacity(this); + } + + /// Get the overlapped shapes for a sensor shape. + /// a user allocated array that is filled with the overlapping shapes + /// the capacity of overlappedShapes + /// RETURNS: the number of elements filled in the provided array + /// WARNING: do not ignore the return value, it specifies the valid number of elements + /// WARNING: overlaps may contain destroyed shapes so use b2Shape_IsValid to confirm each overlap + public int GetSensorOverlaps(in B2Shape overlaps, int capacity) + { + return Box2D.ShapeGetSensorOverlaps(this, overlaps, capacity); + } + + /// Get the current world AABB + public B2Aabb GetAabb() + { + return Box2D.ShapeGetAabb(this); + } + + /// Get the mass data for a shape + public B2MassData GetMassData() + { + return Box2D.ShapeGetMassData(this); + } + + /// Get the closest point on a shape to a target point. Target and result are in world space. + /// todo need sample + public float2 GetClosestPoint(float2 target) + { + return Box2D.ShapeGetClosestPoint(this, target); + } + + /// + [FieldOffset(0)] + public readonly int Index1; + + /// + [FieldOffset(4)] + public readonly ushort World0; + + /// + [FieldOffset(6)] + public readonly ushort Generation; + } + + /// Chain id references a chain instances. This should be treated as an opaque handle. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public readonly partial record struct B2Chain : IDisposable + { + /// Destroy a chain shape + public void Dispose() + { + Box2D.Dispose(this); + } + + /// Get the world that owns this chain shape + public B2World GetWorld() + { + return Box2D.ChainGetWorld(this); + } + + /// Get the number of segments on this chain + public int GetSegmentCount() + { + return Box2D.ChainGetSegmentCount(this); + } + + /// Fill a user array with chain segment shape ids up to the specified capacity. Returns + /// the actual number of segments returned. + public int GetSegments(in B2Shape segmentArray, int capacity) + { + return Box2D.ChainGetSegments(this, segmentArray, capacity); + } + + /// Set the chain friction + /// SEE: b2ChainDef::friction + public void SetFriction(float friction) + { + Box2D.ChainSetFriction(this, friction); + } + + /// Get the chain friction + public float GetFriction() + { + return Box2D.ChainGetFriction(this); + } + + /// Set the chain restitution (bounciness) + /// SEE: b2ChainDef::restitution + public void SetRestitution(float restitution) + { + Box2D.ChainSetRestitution(this, restitution); + } + + /// Get the chain restitution + public float GetRestitution() + { + return Box2D.ChainGetRestitution(this); + } + + /// Set the chain material + /// SEE: b2ChainDef::material + public void SetMaterial(int material) + { + Box2D.ChainSetMaterial(this, material); + } + + /// Get the chain material + public int GetMaterial() + { + return Box2D.ChainGetMaterial(this); + } + + /// Chain identifier validation. Provides validation for up to 64K allocations. + public Bool8 IsValid() + { + return Box2D.ChainIsValid(this); + } + + /// + [FieldOffset(0)] + public readonly int Index1; + + /// + [FieldOffset(4)] + public readonly ushort World0; + + /// + [FieldOffset(6)] + public readonly ushort Generation; + } + + /// Joint id references a joint instance. This should be treated as an opaque handle. + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial class B2Joint : IDisposable + { + /// Destroy a joint + public void Dispose() + { + Box2D.Dispose(this); + } + + /// Joint identifier validation. Provides validation for up to 64K allocations. + public Bool8 IsValid() + { + return Box2D.JointIsValid(this); + } + + /// Get the joint type + public B2JointType GetJointType() + { + return Box2D.GetJointType(this); + } + + /// Get body A id on a joint + public B2Body GetBodyA() + { + return Box2D.JointGetBodyA(this); + } + + /// Get body B id on a joint + public B2Body GetBodyB() + { + return Box2D.JointGetBodyB(this); + } + + /// Get the world that owns this joint + public B2World GetWorld() + { + return Box2D.JointGetWorld(this); + } + + /// Set the local anchor on bodyA + public void SetLocalAnchorA(float2 localAnchor) + { + Box2D.JointSetLocalAnchorA(this, localAnchor); + } + + /// Get the local anchor on bodyA + public float2 GetLocalAnchorA() + { + return Box2D.JointGetLocalAnchorA(this); + } + + /// Set the local anchor on bodyB + public void SetLocalAnchorB(float2 localAnchor) + { + Box2D.JointSetLocalAnchorB(this, localAnchor); + } + + /// Get the local anchor on bodyB + public float2 GetLocalAnchorB() + { + return Box2D.JointGetLocalAnchorB(this); + } + + /// Get the joint reference angle in radians (revolute, prismatic, and weld) + public float GetReferenceAngle() + { + return Box2D.JointGetReferenceAngle(this); + } + + /// Set the joint reference angle in radians, must be in [-pi,pi]. (revolute, prismatic, and weld) + public void SetReferenceAngle(float angleInRadians) + { + Box2D.JointSetReferenceAngle(this, angleInRadians); + } + + /// Set the local axis on bodyA (prismatic and wheel) + public void SetLocalAxisA(float2 localAxis) + { + Box2D.JointSetLocalAxisA(this, localAxis); + } + + /// Get the local axis on bodyA (prismatic and wheel) + public float2 GetLocalAxisA() + { + return Box2D.JointGetLocalAxisA(this); + } + + /// Toggle collision between connected bodies + public void SetCollideConnected(Bool8 shouldCollide) + { + Box2D.JointSetCollideConnected(this, shouldCollide); + } + + /// Is collision allowed between connected bodies? + public Bool8 GetCollideConnected() + { + return Box2D.JointGetCollideConnected(this); + } + + /// Set the user data on a joint + public void SetUserData(nint userData) + { + Box2D.JointSetUserData(this, userData); + } + + /// Get the user data on a joint + public unsafe void* GetUserData() + { + return Box2D.JointGetUserData(this); + } + + /// Wake the bodies connect to this joint + public void WakeBodies() + { + Box2D.JointWakeBodies(this); + } + + /// Get the current constraint force for this joint. Usually in Newtons. + public float2 GetConstraintForce() + { + return Box2D.JointGetConstraintForce(this); + } + + /// Get the current constraint torque for this joint. Usually in Newton * meters. + public float GetConstraintTorque() + { + return Box2D.JointGetConstraintTorque(this); + } + + /// Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters. + public float GetLinearSeparation() + { + return Box2D.JointGetLinearSeparation(this); + } + + /// Get the current angular separation error for this joint. Does not consider admissible movement. Usually in meters. + public float GetAngularSeparation() + { + return Box2D.JointGetAngularSeparation(this); + } + + /// Get the joint constraint tuning. Advanced feature. + public void GetConstraintTuning(in float hertz, in float dampingRatio) + { + Box2D.JointGetConstraintTuning(this, hertz, dampingRatio); + } + + /// Set the joint constraint tuning. Advanced feature. + /// the stiffness in Hertz (cycles per second) + /// the non-dimensional damping ratio (one for critical damping) + public void SetConstraintTuning(float hertz, float dampingRatio) + { + Box2D.JointSetConstraintTuning(this, hertz, dampingRatio); + } + + /// + [FieldOffset(0)] + public int Index1; + + /// + [FieldOffset(4)] + public ushort World0; + + /// + [FieldOffset(6)] + public ushort Generation; + } + + /// Result from b2World_RayCastClosest + /// If there is initial overlap the fraction and normal will be zero while the point is an arbitrary point in the overlap region. + [StructLayout(LayoutKind.Explicit, Size = 40)] + public struct B2RayResult + { + /// + [FieldOffset(0)] + public B2Shape ShapeId; + + /// + [FieldOffset(8)] + public float2 Point; + + /// + [FieldOffset(16)] + public float2 Normal; + + /// + [FieldOffset(24)] + public float Fraction; + + /// + [FieldOffset(28)] + public int NodeVisits; + + /// + [FieldOffset(32)] + public int LeafVisits; + + /// + [FieldOffset(36)] + public Bool8 Hit; + } + + /// World definition used to create a simulation world. + /// Must be initialized using b2DefaultWorldDef(). + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct B2WorldDef + { + /// + /// Initializes a new instance of the B2WorldDef class using default values provided by Box2D. + /// + public B2WorldDef() + { + this = Default; + } + + /// Gravity vector. Box2D has no up-vector defined. + [FieldOffset(0)] + public float2 Gravity; + + /// Restitution speed threshold, usually in m/s. Collisions above this + /// speed have restitution applied (will bounce). + [FieldOffset(8)] + public float RestitutionThreshold; + + /// Threshold speed for hit events. Usually meters per second. + [FieldOffset(12)] + public float HitEventThreshold; + + /// Contact stiffness. Cycles per second. Increasing this increases the speed of overlap recovery, but can introduce jitter. + [FieldOffset(16)] + public float ContactHertz; + + /// Contact bounciness. Non-dimensional. You can speed up overlap recovery by decreasing this with + /// the trade-off that overlap resolution becomes more energetic. + [FieldOffset(20)] + public float ContactDampingRatio; + + /// This parameter controls how fast overlap is resolved and usually has units of meters per second. This only + /// puts a cap on the resolution speed. The resolution speed is increased by increasing the hertz and/or + /// decreasing the damping ratio. + [FieldOffset(24)] + public float MaxContactPushSpeed; + + /// Maximum linear speed. Usually meters per second. + [FieldOffset(28)] + public float MaximumLinearSpeed; + + [FieldOffset(32)] + private nint _frictionCallbackCallback; + + /// Optional mixing callback for friction. The default uses sqrt(frictionA * frictionB). + public B2FrictionCallback? FrictionCallbackCallback + { + set => _frictionCallbackCallback = value != null ? Marshal.GetFunctionPointerForDelegate(value) : 0; + } + + [FieldOffset(40)] + private nint _restitutionCallbackCallback; + + /// Optional mixing callback for restitution. The default uses max(restitutionA, restitutionB). + public B2RestitutionCallback? RestitutionCallbackCallback + { + set => _restitutionCallbackCallback = value != null ? Marshal.GetFunctionPointerForDelegate(value) : 0; + } + + /// Can bodies go to sleep to improve performance + [FieldOffset(48)] + public Bool8 EnableSleep; + + /// Enable continuous collision + [FieldOffset(49)] + public Bool8 EnableContinuous; + + /// Number of workers to use with the provided task system. Box2D performs best when using only + /// performance cores and accessing a single L2 cache. Efficiency cores and hyper-threading provide + /// little benefit and may even harm performance. + /// NOTE: Box2D does not create threads. This is the number of threads your applications has created that you are allocating to b2World_Step. + /// WARNING: Do not modify the default value unless you are also providing a task system and providing task callbacks (enqueueTask and finishTask). + [FieldOffset(52)] + public int WorkerCount; + + [FieldOffset(56)] + private nint _enqueueTaskCallback; + + /// Function to spawn tasks + public B2EnqueueTaskCallback? EnqueueTaskCallback + { + set => _enqueueTaskCallback = value != null ? Marshal.GetFunctionPointerForDelegate(value) : 0; + } + + [FieldOffset(64)] + private nint _finishTaskCallback; + + /// Function to finish a task + public B2FinishTaskCallback? FinishTaskCallback + { + set => _finishTaskCallback = value != null ? Marshal.GetFunctionPointerForDelegate(value) : 0; + } + + /// User context that is provided to enqueueTask and finishTask + [FieldOffset(72)] + public void* UserTaskContext; + + /// User data + [FieldOffset(80)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(88)] + public int InternalValue; + } + + /// A body definition holds all the data needed to construct a rigid body. + /// You can safely re-use body definitions. Shapes are added to a body after construction. + /// Body definitions are temporary objects used to bundle creation parameters. + /// Must be initialized using b2DefaultBodyDef(). + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct B2BodyDef + { + /// + /// Initializes a new instance of the B2BodyDef class using default values provided by Box2D. + /// + public B2BodyDef() + { + this = Default; + } + + /// The body type: static, kinematic, or dynamic. + [FieldOffset(0)] + public B2BodyType Type; + + /// The initial world position of the body. Bodies should be created with the desired position. + /// NOTE: Creating bodies at the origin and then moving them nearly doubles the cost of body creation, especially if the body is moved after shapes have been added. + [FieldOffset(4)] + public float2 Position; + + /// The initial world rotation of the body. Use b2MakeRot() if you have an angle. + [FieldOffset(12)] + public B2Rot Rotation; + + /// The initial linear velocity of the body's origin. Usually in meters per second. + [FieldOffset(20)] + public float2 LinearVelocity; + + /// The initial angular velocity of the body. Radians per second. + [FieldOffset(28)] + public float AngularVelocity; + + /// Linear damping is used to reduce the linear velocity. The damping parameter + /// can be larger than 1 but the damping effect becomes sensitive to the + /// time step when the damping parameter is large. + /// Generally linear damping is undesirable because it makes objects move slowly + /// as if they are floating. + [FieldOffset(32)] + public float LinearDamping; + + /// Angular damping is used to reduce the angular velocity. The damping parameter + /// can be larger than 1.0f but the damping effect becomes sensitive to the + /// time step when the damping parameter is large. + /// Angular damping can be use slow down rotating bodies. + [FieldOffset(36)] + public float AngularDamping; + + /// Scale the gravity applied to this body. Non-dimensional. + [FieldOffset(40)] + public float GravityScale; + + /// Sleep speed threshold, default is 0.05 meters per second + [FieldOffset(44)] + public float SleepThreshold; + + /// Optional body name for debugging. Up to 31 characters (excluding null termination) + [FieldOffset(48)] + public byte* Name; + + /// Use this to store application specific body data. + [FieldOffset(56)] + public void* UserData; + + /// Set this flag to false if this body should never fall asleep. + [FieldOffset(64)] + public Bool8 EnableSleep; + + /// Is this body initially awake or sleeping? + [FieldOffset(65)] + public Bool8 IsAwake; + + /// Should this body be prevented from rotating? Useful for characters. + [FieldOffset(66)] + public Bool8 FixedRotation; + + /// Treat this body as high speed object that performs continuous collision detection + /// against dynamic and kinematic bodies, but not other bullet bodies. + /// WARNING: Bullets should be used sparingly. They are not a solution for general dynamic-versus-dynamic continuous collision. They may interfere with joint constraints. + [FieldOffset(67)] + public Bool8 IsBullet; + + /// Used to disable a body. A disabled body does not move or collide. + [FieldOffset(68)] + public Bool8 IsEnabled; + + /// This allows this body to bypass rotational speed limits. Should only be used + /// for circular objects, like wheels. + [FieldOffset(69)] + public Bool8 AllowFastRotation; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(72)] + public int InternalValue; + } + + /// This is used to filter collision on shapes. It affects shape-vs-shape collision + /// and shape-versus-query collision (such as b2World_CastRay). + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct B2Filter + { + /// + /// Initializes a new instance of the B2Filter class using default values provided by Box2D. + /// + public B2Filter() + { + this = Default; + } + + /// The collision category bits. Normally you would just set one bit. The category bits should + /// represent your application object types. For example: + [FieldOffset(0)] + public ulong CategoryBits; + + /// The collision mask bits. This states the categories that this + /// shape would accept for collision. + /// For example, you may want your player to only collide with static objects + /// and other players. + [FieldOffset(8)] + public ulong MaskBits; + + /// Collision groups allow a certain group of objects to never collide (negative) + /// or always collide (positive). A group index of zero has no effect. Non-zero group filtering + /// always wins against the mask bits. + /// For example, you may want ragdolls to collide with other ragdolls but you don't want + /// ragdoll self-collision. In this case you would give each ragdoll a unique negative group index + /// and apply that group index to all shapes on the ragdoll. + [FieldOffset(16)] + public int GroupIndex; + } + + /// The query filter is used to filter collisions between queries and shapes. For example, + /// you may want a ray-cast representing a projectile to hit players and the static environment + /// but not debris. + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct B2QueryFilter + { + /// + /// Initializes a new instance of the B2QueryFilter class using default values provided by Box2D. + /// + public B2QueryFilter() + { + this = Default; + } + + /// The collision category bits of this query. Normally you would just set one bit. + [FieldOffset(0)] + public ulong CategoryBits; + + /// The collision mask bits. This states the shape categories that this + /// query would accept for collision. + [FieldOffset(8)] + public ulong MaskBits; + } + + /// Surface materials allow chain shapes to have per segment surface properties. + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct B2SurfaceMaterial + { + /// + /// Initializes a new instance of the B2SurfaceMaterial class using default values provided by Box2D. + /// + public B2SurfaceMaterial() + { + this = Default; + } + + /// The Coulomb (dry) friction coefficient, usually in the range [0,1]. + [FieldOffset(0)] + public float Friction; + + /// The coefficient of restitution (bounce) usually in the range [0,1]. + /// https://en.wikipedia.org/wiki/Coefficient_of_restitution + [FieldOffset(4)] + public float Restitution; + + /// The rolling resistance usually in the range [0,1]. + [FieldOffset(8)] + public float RollingResistance; + + /// The tangent speed for conveyor belts + [FieldOffset(12)] + public float TangentSpeed; + + /// User material identifier. This is passed with query results and to friction and restitution + /// combining functions. It is not used internally. + [FieldOffset(16)] + public int UserMaterialId; + + /// Custom debug draw color. + [FieldOffset(20)] + public uint CustomColor; + } + + /// Used to create a shape. + /// This is a temporary object used to bundle shape creation parameters. You may use + /// the same shape definition to create multiple shapes. + /// Must be initialized using b2DefaultShapeDef(). + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct B2ShapeDef + { + /// + /// Initializes a new instance of the B2ShapeDef class using default values provided by Box2D. + /// + public B2ShapeDef() + { + this = Default; + } + + /// Use this to store application specific shape data. + [FieldOffset(0)] + public void* UserData; + + /// The surface material for this shape. + [FieldOffset(8)] + public B2SurfaceMaterial Material; + + /// The density, usually in kg/m^2. + /// This is not part of the surface material because this is for the interior, which may have + /// other considerations, such as being hollow. For example a wood barrel may be hollow or full of water. + [FieldOffset(32)] + public float Density; + + /// Collision filtering data. + [FieldOffset(40)] + public B2Filter Filter; + + /// A sensor shape generates overlap events but never generates a collision response. + /// Sensors do not have continuous collision. Instead, use a ray or shape cast for those scenarios. + /// Sensors still contribute to the body mass if they have non-zero density. + /// NOTE: Sensor events are disabled by default. + /// SEE: enableSensorEvents + [FieldOffset(64)] + public Bool8 IsSensor; + + /// Enable sensor events for this shape. This applies to sensors and non-sensors. False by default, even for sensors. + [FieldOffset(65)] + public Bool8 EnableSensorEvents; + + /// Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default. + [FieldOffset(66)] + public Bool8 EnableContactEvents; + + /// Enable hit events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default. + [FieldOffset(67)] + public Bool8 EnableHitEvents; + + /// Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive + /// and must be carefully handled due to threading. Ignored for sensors. + [FieldOffset(68)] + public Bool8 EnablePreSolveEvents; + + /// When shapes are created they will scan the environment for collision the next time step. This can significantly slow down + /// static body creation when there are many static shapes. + /// This is flag is ignored for dynamic and kinematic shapes which always invoke contact creation. + [FieldOffset(69)] + public Bool8 InvokeContactCreation; + + /// Should the body update the mass properties when this shape is created. Default is true. + [FieldOffset(70)] + public Bool8 UpdateBodyMass; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(72)] + public int InternalValue; + } + + /// Used to create a chain of line segments. This is designed to eliminate ghost collisions with some limitations. + /// - chains are one-sided + /// - chains have no mass and should be used on static bodies + /// - chains have a counter-clockwise winding order (normal points right of segment direction) + /// - chains are either a loop or open + /// - a chain must have at least 4 points + /// - the distance between any two points must be greater than B2_LINEAR_SLOP + /// - a chain shape should not self intersect (this is not validated) + /// - an open chain shape has NO COLLISION on the first and final edge + /// - you may overlap two open chains on their first three and/or last three points to get smooth collision + /// - a chain shape creates multiple line segment shapes on the body + /// https://en.wikipedia.org/wiki/Polygonal_chain + /// Must be initialized using b2DefaultChainDef(). + /// WARNING: Do not use chain shapes unless you understand the limitations. This is an advanced feature. + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct B2ChainDef + { + /// + /// Initializes a new instance of the B2ChainDef class using default values provided by Box2D. + /// + public B2ChainDef() + { + this = Default; + } + + /// Use this to store application specific shape data. + [FieldOffset(0)] + public void* UserData; + + /// An array of at least 4 points. These are cloned and may be temporary. + [FieldOffset(8)] + public float2* Points; + + /// The point count, must be 4 or more. + [FieldOffset(16)] + public int Count; + + /// Surface materials for each segment. These are cloned. + [FieldOffset(24)] + public B2SurfaceMaterial* Materials; + + /// The material count. Must be 1 or count. This allows you to provide one + /// material for all segments or a unique material per segment. + [FieldOffset(32)] + public int MaterialCount; + + /// Contact filtering data. + [FieldOffset(40)] + public B2Filter Filter; + + /// Indicates a closed chain formed by connecting the first and last points + [FieldOffset(64)] + public Bool8 IsLoop; + + /// Enable sensors to detect this chain. False by default. + [FieldOffset(65)] + public Bool8 EnableSensorEvents; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(68)] + public int InternalValue; + } + + /// Profiling data. Times are in milliseconds. + [StructLayout(LayoutKind.Explicit, Size = 88)] + public struct B2Profile + { + /// + [FieldOffset(0)] + public float Step; + + /// + [FieldOffset(4)] + public float Pairs; + + /// + [FieldOffset(8)] + public float Collide; + + /// + [FieldOffset(12)] + public float Solve; + + /// + [FieldOffset(16)] + public float MergeIslands; + + /// + [FieldOffset(20)] + public float PrepareStages; + + /// + [FieldOffset(24)] + public float SolveConstraints; + + /// + [FieldOffset(28)] + public float PrepareConstraints; + + /// + [FieldOffset(32)] + public float IntegrateVelocities; + + /// + [FieldOffset(36)] + public float WarmStart; + + /// + [FieldOffset(40)] + public float SolveImpulses; + + /// + [FieldOffset(44)] + public float IntegratePositions; + + /// + [FieldOffset(48)] + public float RelaxImpulses; + + /// + [FieldOffset(52)] + public float ApplyRestitution; + + /// + [FieldOffset(56)] + public float StoreImpulses; + + /// + [FieldOffset(60)] + public float SplitIslands; + + /// + [FieldOffset(64)] + public float Transforms; + + /// + [FieldOffset(68)] + public float HitEvents; + + /// + [FieldOffset(72)] + public float Refit; + + /// + [FieldOffset(76)] + public float Bullets; + + /// + [FieldOffset(80)] + public float SleepIslands; + + /// + [FieldOffset(84)] + public float Sensors; + } + + /// Counters that give details of the simulation size. + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe struct B2Counters + { + /// + [FieldOffset(0)] + public int BodyCount; + + /// + [FieldOffset(4)] + public int ShapeCount; + + /// + [FieldOffset(8)] + public int ContactCount; + + /// + [FieldOffset(12)] + public int JointCount; + + /// + [FieldOffset(16)] + public int IslandCount; + + /// + [FieldOffset(20)] + public int StackUsed; + + /// + [FieldOffset(24)] + public int StaticTreeHeight; + + /// + [FieldOffset(28)] + public int TreeHeight; + + /// + [FieldOffset(32)] + public int ByteCount; + + /// + [FieldOffset(36)] + public int TaskCount; + + /// + [FieldOffset(40)] + public fixed int ColorCounts[12]; + } + + /// Distance joint definition + /// This requires defining an anchor point on both + /// bodies and the non-zero distance of the distance joint. The definition uses + /// local anchor points so that the initial configuration can violate the + /// constraint slightly. This helps when saving and loading a game. + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct B2DistanceJointDef + { + /// + /// Initializes a new instance of the B2DistanceJointDef class using default values provided by Box2D. + /// + public B2DistanceJointDef() + { + this = Default; + } + + /// The first attached body + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body + [FieldOffset(8)] + public B2Body BodyIdB; + + /// The local anchor point relative to bodyA's origin + [FieldOffset(16)] + public float2 LocalAnchorA; + + /// The local anchor point relative to bodyB's origin + [FieldOffset(24)] + public float2 LocalAnchorB; + + /// The rest length of this joint. Clamped to a stable minimum value. + [FieldOffset(32)] + public float Length; + + /// Enable the distance constraint to behave like a spring. If false + /// then the distance joint will be rigid, overriding the limit and motor. + [FieldOffset(36)] + public Bool8 EnableSpring; + + /// The spring linear stiffness Hertz, cycles per second + [FieldOffset(40)] + public float Hertz; + + /// The spring linear damping ratio, non-dimensional + [FieldOffset(44)] + public float DampingRatio; + + /// Enable/disable the joint limit + [FieldOffset(48)] + public Bool8 EnableLimit; + + /// Minimum length. Clamped to a stable minimum value. + [FieldOffset(52)] + public float MinLength; + + /// Maximum length. Must be greater than or equal to the minimum length. + [FieldOffset(56)] + public float MaxLength; + + /// Enable/disable the joint motor + [FieldOffset(60)] + public Bool8 EnableMotor; + + /// The maximum motor force, usually in newtons + [FieldOffset(64)] + public float MaxMotorForce; + + /// The desired motor speed, usually in meters per second + [FieldOffset(68)] + public float MotorSpeed; + + /// Set this flag to true if the attached bodies should collide + [FieldOffset(72)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(80)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(88)] + public int InternalValue; + } + + /// A motor joint is used to control the relative motion between two bodies + /// A typical usage is to control the movement of a dynamic body with respect to the ground. + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct B2MotorJointDef + { + /// + /// Initializes a new instance of the B2MotorJointDef class using default values provided by Box2D. + /// + public B2MotorJointDef() + { + this = Default; + } + + /// The first attached body + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body + [FieldOffset(8)] + public B2Body BodyIdB; + + /// Position of bodyB minus the position of bodyA, in bodyA's frame + [FieldOffset(16)] + public float2 LinearOffset; + + /// The bodyB angle minus bodyA angle in radians + [FieldOffset(24)] + public float AngularOffset; + + /// The maximum motor force in newtons + [FieldOffset(28)] + public float MaxForce; + + /// The maximum motor torque in newton-meters + [FieldOffset(32)] + public float MaxTorque; + + /// Position correction factor in the range [0,1] + [FieldOffset(36)] + public float CorrectionFactor; + + /// Set this flag to true if the attached bodies should collide + [FieldOffset(40)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(48)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(56)] + public int InternalValue; + } + + /// A mouse joint is used to make a point on a body track a specified world point. + /// This a soft constraint and allows the constraint to stretch without + /// applying huge forces. This also applies rotation constraint heuristic to improve control. + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct B2MouseJointDef + { + /// + /// Initializes a new instance of the B2MouseJointDef class using default values provided by Box2D. + /// + public B2MouseJointDef() + { + this = Default; + } + + /// The first attached body. This is assumed to be static. + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body. + [FieldOffset(8)] + public B2Body BodyIdB; + + /// The initial target point in world space + [FieldOffset(16)] + public float2 Target; + + /// Stiffness in hertz + [FieldOffset(24)] + public float Hertz; + + /// Damping ratio, non-dimensional + [FieldOffset(28)] + public float DampingRatio; + + /// Maximum force, typically in newtons + [FieldOffset(32)] + public float MaxForce; + + /// Set this flag to true if the attached bodies should collide. + [FieldOffset(36)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(40)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(48)] + public int InternalValue; + } + + /// A filter joint is used to disable collision between two specific bodies. + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct B2FilterJointDef + { + /// + /// Initializes a new instance of the B2FilterJointDef class using default values provided by Box2D. + /// + public B2FilterJointDef() + { + this = Default; + } + + /// The first attached body. + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body. + [FieldOffset(8)] + public B2Body BodyIdB; + + /// User data pointer + [FieldOffset(16)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(24)] + public int InternalValue; + } + + /// Prismatic joint definition + /// This requires defining a line of motion using an axis and an anchor point. + /// The definition uses local anchor points and a local axis so that the initial + /// configuration can violate the constraint slightly. The joint translation is zero + /// when the local anchor points coincide in world space. + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct B2PrismaticJointDef + { + /// + /// Initializes a new instance of the B2PrismaticJointDef class using default values provided by Box2D. + /// + public B2PrismaticJointDef() + { + this = Default; + } + + /// The first attached body + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body + [FieldOffset(8)] + public B2Body BodyIdB; + + /// The local anchor point relative to bodyA's origin + [FieldOffset(16)] + public float2 LocalAnchorA; + + /// The local anchor point relative to bodyB's origin + [FieldOffset(24)] + public float2 LocalAnchorB; + + /// The local translation unit axis in bodyA + [FieldOffset(32)] + public float2 LocalAxisA; + + /// The constrained angle between the bodies: bodyB_angle - bodyA_angle + [FieldOffset(40)] + public float ReferenceAngle; + + /// The target translation for the joint in meters. The spring-damper will drive + /// to this translation. + [FieldOffset(44)] + public float TargetTranslation; + + /// Enable a linear spring along the prismatic joint axis + [FieldOffset(48)] + public Bool8 EnableSpring; + + /// The spring stiffness Hertz, cycles per second + [FieldOffset(52)] + public float Hertz; + + /// The spring damping ratio, non-dimensional + [FieldOffset(56)] + public float DampingRatio; + + /// Enable/disable the joint limit + [FieldOffset(60)] + public Bool8 EnableLimit; + + /// The lower translation limit + [FieldOffset(64)] + public float LowerTranslation; + + /// The upper translation limit + [FieldOffset(68)] + public float UpperTranslation; + + /// Enable/disable the joint motor + [FieldOffset(72)] + public Bool8 EnableMotor; + + /// The maximum motor force, typically in newtons + [FieldOffset(76)] + public float MaxMotorForce; + + /// The desired motor speed, typically in meters per second + [FieldOffset(80)] + public float MotorSpeed; + + /// Set this flag to true if the attached bodies should collide + [FieldOffset(84)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(88)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(96)] + public int InternalValue; + } + + /// Revolute joint definition + /// This requires defining an anchor point where the bodies are joined. + /// The definition uses local anchor points so that the + /// initial configuration can violate the constraint slightly. You also need to + /// specify the initial relative angle for joint limits. This helps when saving + /// and loading a game. + /// The local anchor points are measured from the body's origin + /// rather than the center of mass because: + /// 1. you might not know where the center of mass will be + /// 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct B2RevoluteJointDef + { + /// + /// Initializes a new instance of the B2RevoluteJointDef class using default values provided by Box2D. + /// + public B2RevoluteJointDef() + { + this = Default; + } + + /// The first attached body + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body + [FieldOffset(8)] + public B2Body BodyIdB; + + /// The local anchor point relative to bodyA's origin + [FieldOffset(16)] + public float2 LocalAnchorA; + + /// The local anchor point relative to bodyB's origin + [FieldOffset(24)] + public float2 LocalAnchorB; + + /// The bodyB angle minus bodyA angle in the reference state (radians). + /// This defines the zero angle for the joint limit. + [FieldOffset(32)] + public float ReferenceAngle; + + /// The target angle for the joint in radians. The spring-damper will drive + /// to this angle. + [FieldOffset(36)] + public float TargetAngle; + + /// Enable a rotational spring on the revolute hinge axis + [FieldOffset(40)] + public Bool8 EnableSpring; + + /// The spring stiffness Hertz, cycles per second + [FieldOffset(44)] + public float Hertz; + + /// The spring damping ratio, non-dimensional + [FieldOffset(48)] + public float DampingRatio; + + /// A flag to enable joint limits + [FieldOffset(52)] + public Bool8 EnableLimit; + + /// The lower angle for the joint limit in radians. Minimum of -0.99*pi radians. + [FieldOffset(56)] + public float LowerAngle; + + /// The upper angle for the joint limit in radians. Maximum of 0.99*pi radians. + [FieldOffset(60)] + public float UpperAngle; + + /// A flag to enable the joint motor + [FieldOffset(64)] + public Bool8 EnableMotor; + + /// The maximum motor torque, typically in newton-meters + [FieldOffset(68)] + public float MaxMotorTorque; + + /// The desired motor speed in radians per second + [FieldOffset(72)] + public float MotorSpeed; + + /// Scale the debug draw + [FieldOffset(76)] + public float DrawSize; + + /// Set this flag to true if the attached bodies should collide + [FieldOffset(80)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(88)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(96)] + public int InternalValue; + } + + /// Weld joint definition + /// A weld joint connect to bodies together rigidly. This constraint provides springs to mimic + /// soft-body simulation. + /// NOTE: The approximate solver in Box2D cannot hold many bodies together rigidly + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct B2WeldJointDef + { + /// + /// Initializes a new instance of the B2WeldJointDef class using default values provided by Box2D. + /// + public B2WeldJointDef() + { + this = Default; + } + + /// The first attached body + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body + [FieldOffset(8)] + public B2Body BodyIdB; + + /// The local anchor point relative to bodyA's origin + [FieldOffset(16)] + public float2 LocalAnchorA; + + /// The local anchor point relative to bodyB's origin + [FieldOffset(24)] + public float2 LocalAnchorB; + + /// The bodyB angle minus bodyA angle in the reference state (radians) + /// todo maybe make this a b2Rot + [FieldOffset(32)] + public float ReferenceAngle; + + /// Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness. + [FieldOffset(36)] + public float LinearHertz; + + /// Angular stiffness as Hertz (cycles per second). Use zero for maximum stiffness. + [FieldOffset(40)] + public float AngularHertz; + + /// Linear damping ratio, non-dimensional. Use 1 for critical damping. + [FieldOffset(44)] + public float LinearDampingRatio; + + /// Linear damping ratio, non-dimensional. Use 1 for critical damping. + [FieldOffset(48)] + public float AngularDampingRatio; + + /// Set this flag to true if the attached bodies should collide + [FieldOffset(52)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(56)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(64)] + public int InternalValue; + } + + /// Wheel joint definition + /// This requires defining a line of motion using an axis and an anchor point. + /// The definition uses local anchor points and a local axis so that the initial + /// configuration can violate the constraint slightly. The joint translation is zero + /// when the local anchor points coincide in world space. + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct B2WheelJointDef + { + /// + /// Initializes a new instance of the B2WheelJointDef class using default values provided by Box2D. + /// + public B2WheelJointDef() + { + this = Default; + } + + /// The first attached body + [FieldOffset(0)] + public B2Body BodyIdA; + + /// The second attached body + [FieldOffset(8)] + public B2Body BodyIdB; + + /// The local anchor point relative to bodyA's origin + [FieldOffset(16)] + public float2 LocalAnchorA; + + /// The local anchor point relative to bodyB's origin + [FieldOffset(24)] + public float2 LocalAnchorB; + + /// The local translation unit axis in bodyA + [FieldOffset(32)] + public float2 LocalAxisA; + + /// Enable a linear spring along the local axis + [FieldOffset(40)] + public Bool8 EnableSpring; + + /// Spring stiffness in Hertz + [FieldOffset(44)] + public float Hertz; + + /// Spring damping ratio, non-dimensional + [FieldOffset(48)] + public float DampingRatio; + + /// Enable/disable the joint linear limit + [FieldOffset(52)] + public Bool8 EnableLimit; + + /// The lower translation limit + [FieldOffset(56)] + public float LowerTranslation; + + /// The upper translation limit + [FieldOffset(60)] + public float UpperTranslation; + + /// Enable/disable the joint rotational motor + [FieldOffset(64)] + public Bool8 EnableMotor; + + /// The maximum motor torque, typically in newton-meters + [FieldOffset(68)] + public float MaxMotorTorque; + + /// The desired motor speed in radians per second + [FieldOffset(72)] + public float MotorSpeed; + + /// Set this flag to true if the attached bodies should collide + [FieldOffset(76)] + public Bool8 CollideConnected; + + /// User data pointer + [FieldOffset(80)] + public void* UserData; + + /// Used internally to detect a valid definition. DO NOT SET. + [FieldOffset(88)] + public int InternalValue; + } + + /// The explosion definition is used to configure options for explosions. Explosions + /// consider shape geometry when computing the impulse. + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct B2ExplosionDef + { + /// + /// Initializes a new instance of the B2ExplosionDef class using default values provided by Box2D. + /// + public B2ExplosionDef() + { + this = Default; + } + + /// Mask bits to filter shapes + [FieldOffset(0)] + public ulong MaskBits; + + /// The center of the explosion in world space + [FieldOffset(8)] + public float2 Position; + + /// The radius of the explosion + [FieldOffset(16)] + public float Radius; + + /// The falloff distance beyond the radius. Impulse is reduced to zero at this distance. + [FieldOffset(20)] + public float Falloff; + + /// Impulse per unit length. This applies an impulse according to the shape perimeter that + /// is facing the explosion. Explosions only apply to circles, capsules, and polygons. This + /// may be negative for implosions. + [FieldOffset(24)] + public float ImpulsePerLength; + } + + /// A begin touch event is generated when a shape starts to overlap a sensor shape. + [StructLayout(LayoutKind.Explicit, Size = 16)] + public struct B2SensorBeginTouchEvent + { + /// The id of the sensor shape + [FieldOffset(0)] + public B2Shape SensorShapeId; + + /// The id of the dynamic shape that began touching the sensor shape + [FieldOffset(8)] + public B2Shape VisitorShapeId; + } + + /// An end touch event is generated when a shape stops overlapping a sensor shape. + /// These include things like setting the transform, destroying a body or shape, or changing + /// a filter. You will also get an end event if the sensor or visitor are destroyed. + /// Therefore you should always confirm the shape id is valid using b2Shape_IsValid. + [StructLayout(LayoutKind.Explicit, Size = 16)] + public struct B2SensorEndTouchEvent + { + /// The id of the sensor shape + /// WARNING: this shape may have been destroyed + /// SEE: b2Shape_IsValid + [FieldOffset(0)] + public B2Shape SensorShapeId; + + /// The id of the dynamic shape that stopped touching the sensor shape + /// WARNING: this shape may have been destroyed + /// SEE: b2Shape_IsValid + [FieldOffset(8)] + public B2Shape VisitorShapeId; + } + + /// Sensor events are buffered in the Box2D world and are available + /// as begin/end overlap event arrays after the time step is complete. + /// Note: these may become invalid if bodies and/or shapes are destroyed + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe struct B2SensorEvents + { + /// Array of sensor begin touch events + [FieldOffset(0)] + public B2SensorBeginTouchEvent* BeginEvents; + + /// Array of sensor end touch events + [FieldOffset(8)] + public B2SensorEndTouchEvent* EndEvents; + + /// The number of begin touch events + [FieldOffset(16)] + public int BeginCount; + + /// The number of end touch events + [FieldOffset(20)] + public int EndCount; + } + + /// A begin touch event is generated when two shapes begin touching. + [StructLayout(LayoutKind.Explicit, Size = 128)] + public struct B2ContactBeginTouchEvent + { + /// Id of the first shape + [FieldOffset(0)] + public B2Shape ShapeIdA; + + /// Id of the second shape + [FieldOffset(8)] + public B2Shape ShapeIdB; + + /// The initial contact manifold. This is recorded before the solver is called, + /// so all the impulses will be zero. + [FieldOffset(16)] + public B2Manifold Manifold; + } + + /// An end touch event is generated when two shapes stop touching. + /// You will get an end event if you do anything that destroys contacts previous to the last + /// world step. These include things like setting the transform, destroying a body + /// or shape, or changing a filter or body type. + [StructLayout(LayoutKind.Explicit, Size = 16)] + public struct B2ContactEndTouchEvent + { + /// Id of the first shape + /// WARNING: this shape may have been destroyed + /// SEE: b2Shape_IsValid + [FieldOffset(0)] + public B2Shape ShapeIdA; + + /// Id of the second shape + /// WARNING: this shape may have been destroyed + /// SEE: b2Shape_IsValid + [FieldOffset(8)] + public B2Shape ShapeIdB; + } + + /// A hit touch event is generated when two shapes collide with a speed faster than the hit speed threshold. + /// This may be reported for speculative contacts that have a confirmed impulse. + [StructLayout(LayoutKind.Explicit, Size = 36)] + public struct B2ContactHitEvent + { + /// Id of the first shape + [FieldOffset(0)] + public B2Shape ShapeIdA; + + /// Id of the second shape + [FieldOffset(8)] + public B2Shape ShapeIdB; + + /// Point where the shapes hit at the beginning of the time step. + /// This is a mid-point between the two surfaces. It could be at speculative + /// point where the two shapes were not touching at the beginning of the time step. + [FieldOffset(16)] + public float2 Point; + + /// Normal vector pointing from shape A to shape B + [FieldOffset(24)] + public float2 Normal; + + /// The speed the shapes are approaching. Always positive. Typically in meters per second. + [FieldOffset(32)] + public float ApproachSpeed; + } + + /// Contact events are buffered in the Box2D world and are available + /// as event arrays after the time step is complete. + /// Note: these may become invalid if bodies and/or shapes are destroyed + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe struct B2ContactEvents + { + /// Array of begin touch events + [FieldOffset(0)] + public B2ContactBeginTouchEvent* BeginEvents; + + /// Array of end touch events + [FieldOffset(8)] + public B2ContactEndTouchEvent* EndEvents; + + /// Array of hit events + [FieldOffset(16)] + public B2ContactHitEvent* HitEvents; + + /// Number of begin touch events + [FieldOffset(24)] + public int BeginCount; + + /// Number of end touch events + [FieldOffset(28)] + public int EndCount; + + /// Number of hit events + [FieldOffset(32)] + public int HitCount; + } + + /// Body move events triggered when a body moves. + /// Triggered when a body moves due to simulation. Not reported for bodies moved by the user. + /// This also has a flag to indicate that the body went to sleep so the application can also + /// sleep that actor/entity/object associated with the body. + /// On the other hand if the flag does not indicate the body went to sleep then the application + /// can treat the actor/entity/object associated with the body as awake. + /// This is an efficient way for an application to update game object transforms rather than + /// calling functions such as b2Body_GetTransform() because this data is delivered as a contiguous array + /// and it is only populated with bodies that have moved. + /// NOTE: If sleeping is disabled all dynamic and kinematic bodies will trigger move events. + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe struct B2BodyMoveEvent + { + /// + [FieldOffset(0)] + public B2Transform Transform; + + /// + [FieldOffset(16)] + public B2Body BodyId; + + /// + [FieldOffset(24)] + public void* UserData; + + /// + [FieldOffset(32)] + public Bool8 FellAsleep; + } + + /// Body events are buffered in the Box2D world and are available + /// as event arrays after the time step is complete. + /// Note: this data becomes invalid if bodies are destroyed + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe struct B2BodyEvents + { + /// Array of move events + [FieldOffset(0)] + public B2BodyMoveEvent* MoveEvents; + + /// Number of move events + [FieldOffset(8)] + public int MoveCount; + } + + /// The contact data for two shapes. By convention the manifold normal points + /// from shape A to shape B. + /// SEE: b2Shape_GetContactData() and b2Body_GetContactData() + [StructLayout(LayoutKind.Explicit, Size = 128)] + public struct B2ContactData + { + /// + [FieldOffset(0)] + public B2Shape ShapeIdA; + + /// + [FieldOffset(8)] + public B2Shape ShapeIdB; + + /// + [FieldOffset(16)] + public B2Manifold Manifold; + } + + /// This struct holds callbacks you can implement to draw a Box2D world. + /// This structure should be zero initialized. + [StructLayout(LayoutKind.Explicit, Size = 112)] + public unsafe partial struct B2DebugDraw + { + /// + /// Initializes a new instance of the B2DebugDraw class using default values provided by Box2D. + /// + public B2DebugDraw() + { + this = Default; + } + + /// Draw a closed polygon provided in CCW order. + [FieldOffset(0)] + public nint DrawPolygonFcn; + + /// Draw a solid closed polygon provided in CCW order. + [FieldOffset(8)] + public nint DrawSolidPolygonFcn; + + /// Draw a circle. + [FieldOffset(16)] + public nint DrawCircleFcn; + + /// Draw a solid circle. + [FieldOffset(24)] + public nint DrawSolidCircleFcn; + + /// Draw a solid capsule. + [FieldOffset(32)] + public nint DrawSolidCapsuleFcn; + + /// Draw a line segment. + [FieldOffset(40)] + public nint DrawSegmentFcn; + + /// Draw a transform. Choose your own length scale. + [FieldOffset(48)] + public nint DrawTransformFcn; + + /// Draw a point. + [FieldOffset(56)] + public nint DrawPointFcn; + + /// Draw a string in world space + [FieldOffset(64)] + public nint DrawStringFcn; + + /// Bounds to use if restricting drawing to a rectangular region + [FieldOffset(72)] + public B2Aabb DrawingBounds; + + /// Option to restrict drawing to a rectangular region. May suffer from unstable depth sorting. + [FieldOffset(88)] + public Bool8 UseDrawingBounds; + + /// Option to draw shapes + [FieldOffset(89)] + public Bool8 DrawShapes; + + /// Option to draw joints + [FieldOffset(90)] + public Bool8 DrawJoints; + + /// Option to draw additional information for joints + [FieldOffset(91)] + public Bool8 DrawJointExtras; + + /// Option to draw the bounding boxes for shapes + [FieldOffset(92)] + public Bool8 DrawBounds; + + /// Option to draw the mass and center of mass of dynamic bodies + [FieldOffset(93)] + public Bool8 DrawMass; + + /// Option to draw body names + [FieldOffset(94)] + public Bool8 DrawBodyNames; + + /// Option to draw contact points + [FieldOffset(95)] + public Bool8 DrawContacts; + + /// Option to visualize the graph coloring used for contacts and joints + [FieldOffset(96)] + public Bool8 DrawGraphColors; + + /// Option to draw contact normals + [FieldOffset(97)] + public Bool8 DrawContactNormals; + + /// Option to draw contact normal impulses + [FieldOffset(98)] + public Bool8 DrawContactImpulses; + + /// Option to draw contact feature ids + [FieldOffset(99)] + public Bool8 DrawContactFeatures; + + /// Option to draw contact friction impulses + [FieldOffset(100)] + public Bool8 DrawFrictionImpulses; + + /// Option to draw islands as bounding boxes + [FieldOffset(101)] + public Bool8 DrawIslands; + + /// User context that is passed as an argument to drawing callback functions + [FieldOffset(104)] + public void* Context; + } + + /// + /// Represents an inline array of float2 with a fixed size of 8. + /// + [InlineArray(8)] + public struct float2_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float2 Items; + } + + /// + /// Represents an inline array of B2ManifoldPoint with a fixed size of 2. + /// + [InlineArray(2)] + public struct B2ManifoldPoint_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public B2ManifoldPoint Items; + } + + /// + /// Custom class built to enable member-function access. + /// + public readonly partial struct B2Contact { } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2DistanceJoint : B2Joint + { + /// Set the rest length of a distance joint + /// The new distance joint length + public void SetLength(float length) + { + Box2D.DistanceJointSetLength(this, length); + } + + /// Get the rest length of a distance joint + public float GetLength() + { + return Box2D.DistanceJointGetLength(this); + } + + /// Enable/disable the distance joint spring. When disabled the distance joint is rigid. + public void EnableSpring(Bool8 enableSpring) + { + Box2D.DistanceJointEnableSpring(this, enableSpring); + } + + /// Is the distance joint spring enabled? + public Bool8 IsSpringEnabled() + { + return Box2D.DistanceJointIsSpringEnabled(this); + } + + /// Set the spring stiffness in Hertz + public void SetSpringHertz(float hertz) + { + Box2D.DistanceJointSetSpringHertz(this, hertz); + } + + /// Set the spring damping ratio, non-dimensional + public void SetSpringDampingRatio(float dampingRatio) + { + Box2D.DistanceJointSetSpringDampingRatio(this, dampingRatio); + } + + /// Get the spring Hertz + public float GetSpringHertz() + { + return Box2D.DistanceJointGetSpringHertz(this); + } + + /// Get the spring damping ratio + public float GetSpringDampingRatio() + { + return Box2D.DistanceJointGetSpringDampingRatio(this); + } + + /// Enable joint limit. The limit only works if the joint spring is enabled. Otherwise the joint is rigid + /// and the limit has no effect. + public void EnableLimit(Bool8 enableLimit) + { + Box2D.DistanceJointEnableLimit(this, enableLimit); + } + + /// Is the distance joint limit enabled? + public Bool8 IsLimitEnabled() + { + return Box2D.DistanceJointIsLimitEnabled(this); + } + + /// Set the minimum and maximum length parameters of a distance joint + public void SetLengthRange(float minLength, float maxLength) + { + Box2D.DistanceJointSetLengthRange(this, minLength, maxLength); + } + + /// Get the distance joint minimum length + public float GetMinLength() + { + return Box2D.DistanceJointGetMinLength(this); + } + + /// Get the distance joint maximum length + public float GetMaxLength() + { + return Box2D.DistanceJointGetMaxLength(this); + } + + /// Get the current length of a distance joint + public float GetCurrentLength() + { + return Box2D.DistanceJointGetCurrentLength(this); + } + + /// Enable/disable the distance joint motor + public void EnableMotor(Bool8 enableMotor) + { + Box2D.DistanceJointEnableMotor(this, enableMotor); + } + + /// Is the distance joint motor enabled? + public Bool8 IsMotorEnabled() + { + return Box2D.DistanceJointIsMotorEnabled(this); + } + + /// Set the distance joint motor speed, usually in meters per second + public void SetMotorSpeed(float motorSpeed) + { + Box2D.DistanceJointSetMotorSpeed(this, motorSpeed); + } + + /// Get the distance joint motor speed, usually in meters per second + public float GetMotorSpeed() + { + return Box2D.DistanceJointGetMotorSpeed(this); + } + + /// Set the distance joint maximum motor force, usually in newtons + public void SetMaxMotorForce(float force) + { + Box2D.DistanceJointSetMaxMotorForce(this, force); + } + + /// Get the distance joint maximum motor force, usually in newtons + public float GetMaxMotorForce() + { + return Box2D.DistanceJointGetMaxMotorForce(this); + } + + /// Get the distance joint current motor force, usually in newtons + public float GetMotorForce() + { + return Box2D.DistanceJointGetMotorForce(this); + } + } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2FilterJoint : B2Joint { } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2MotorJoint : B2Joint + { + /// Set the motor joint linear offset target + public void SetLinearOffset(float2 linearOffset) + { + Box2D.MotorJointSetLinearOffset(this, linearOffset); + } + + /// Get the motor joint linear offset target + public float2 GetLinearOffset() + { + return Box2D.MotorJointGetLinearOffset(this); + } + + /// Set the motor joint angular offset target in radians. This angle will be unwound + /// so the motor will drive along the shortest arc. + public void SetAngularOffset(float angularOffset) + { + Box2D.MotorJointSetAngularOffset(this, angularOffset); + } + + /// Get the motor joint angular offset target in radians + public float GetAngularOffset() + { + return Box2D.MotorJointGetAngularOffset(this); + } + + /// Set the motor joint maximum force, usually in newtons + public void SetMaxForce(float maxForce) + { + Box2D.MotorJointSetMaxForce(this, maxForce); + } + + /// Get the motor joint maximum force, usually in newtons + public float GetMaxForce() + { + return Box2D.MotorJointGetMaxForce(this); + } + + /// Set the motor joint maximum torque, usually in newton-meters + public void SetMaxTorque(float maxTorque) + { + Box2D.MotorJointSetMaxTorque(this, maxTorque); + } + + /// Get the motor joint maximum torque, usually in newton-meters + public float GetMaxTorque() + { + return Box2D.MotorJointGetMaxTorque(this); + } + + /// Set the motor joint correction factor, usually in [0, 1] + public void SetCorrectionFactor(float correctionFactor) + { + Box2D.MotorJointSetCorrectionFactor(this, correctionFactor); + } + + /// Get the motor joint correction factor, usually in [0, 1] + public float GetCorrectionFactor() + { + return Box2D.MotorJointGetCorrectionFactor(this); + } + } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2MouseJoint : B2Joint + { + /// Set the mouse joint target + public void SetTarget(float2 target) + { + Box2D.MouseJointSetTarget(this, target); + } + + /// Get the mouse joint target + public float2 GetTarget() + { + return Box2D.MouseJointGetTarget(this); + } + + /// Set the mouse joint spring stiffness in Hertz + public void SetSpringHertz(float hertz) + { + Box2D.MouseJointSetSpringHertz(this, hertz); + } + + /// Get the mouse joint spring stiffness in Hertz + public float GetSpringHertz() + { + return Box2D.MouseJointGetSpringHertz(this); + } + + /// Set the mouse joint spring damping ratio, non-dimensional + public void SetSpringDampingRatio(float dampingRatio) + { + Box2D.MouseJointSetSpringDampingRatio(this, dampingRatio); + } + + /// Get the mouse joint damping ratio, non-dimensional + public float GetSpringDampingRatio() + { + return Box2D.MouseJointGetSpringDampingRatio(this); + } + + /// Set the mouse joint maximum force, usually in newtons + public void SetMaxForce(float maxForce) + { + Box2D.MouseJointSetMaxForce(this, maxForce); + } + + /// Get the mouse joint maximum force, usually in newtons + public float GetMaxForce() + { + return Box2D.MouseJointGetMaxForce(this); + } + } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2PrismaticJoint : B2Joint + { + /// Enable/disable the joint spring. + public void EnableSpring(Bool8 enableSpring) + { + Box2D.PrismaticJointEnableSpring(this, enableSpring); + } + + /// Is the prismatic joint spring enabled or not? + public Bool8 IsSpringEnabled() + { + return Box2D.PrismaticJointIsSpringEnabled(this); + } + + /// Set the prismatic joint stiffness in Hertz. + /// This should usually be less than a quarter of the simulation rate. For example, if the simulation + /// runs at 60Hz then the joint stiffness should be 15Hz or less. + public void SetSpringHertz(float hertz) + { + Box2D.PrismaticJointSetSpringHertz(this, hertz); + } + + /// Get the prismatic joint stiffness in Hertz + public float GetSpringHertz() + { + return Box2D.PrismaticJointGetSpringHertz(this); + } + + /// Set the prismatic joint damping ratio (non-dimensional) + public void SetSpringDampingRatio(float dampingRatio) + { + Box2D.PrismaticJointSetSpringDampingRatio(this, dampingRatio); + } + + /// Get the prismatic spring damping ratio (non-dimensional) + public float GetSpringDampingRatio() + { + return Box2D.PrismaticJointGetSpringDampingRatio(this); + } + + /// Set the prismatic joint spring target angle, usually in meters + public void SetTargetTranslation(float translation) + { + Box2D.PrismaticJointSetTargetTranslation(this, translation); + } + + /// Get the prismatic joint spring target translation, usually in meters + public float GetTargetTranslation() + { + return Box2D.PrismaticJointGetTargetTranslation(this); + } + + /// Enable/disable a prismatic joint limit + public void EnableLimit(Bool8 enableLimit) + { + Box2D.PrismaticJointEnableLimit(this, enableLimit); + } + + /// Is the prismatic joint limit enabled? + public Bool8 IsLimitEnabled() + { + return Box2D.PrismaticJointIsLimitEnabled(this); + } + + /// Get the prismatic joint lower limit + public float GetLowerLimit() + { + return Box2D.PrismaticJointGetLowerLimit(this); + } + + /// Get the prismatic joint upper limit + public float GetUpperLimit() + { + return Box2D.PrismaticJointGetUpperLimit(this); + } + + /// Set the prismatic joint limits + public void SetLimits(float lower, float upper) + { + Box2D.PrismaticJointSetLimits(this, lower, upper); + } + + /// Enable/disable a prismatic joint motor + public void EnableMotor(Bool8 enableMotor) + { + Box2D.PrismaticJointEnableMotor(this, enableMotor); + } + + /// Is the prismatic joint motor enabled? + public Bool8 IsMotorEnabled() + { + return Box2D.PrismaticJointIsMotorEnabled(this); + } + + /// Set the prismatic joint motor speed, usually in meters per second + public void SetMotorSpeed(float motorSpeed) + { + Box2D.PrismaticJointSetMotorSpeed(this, motorSpeed); + } + + /// Get the prismatic joint motor speed, usually in meters per second + public float GetMotorSpeed() + { + return Box2D.PrismaticJointGetMotorSpeed(this); + } + + /// Set the prismatic joint maximum motor force, usually in newtons + public void SetMaxMotorForce(float force) + { + Box2D.PrismaticJointSetMaxMotorForce(this, force); + } + + /// Get the prismatic joint maximum motor force, usually in newtons + public float GetMaxMotorForce() + { + return Box2D.PrismaticJointGetMaxMotorForce(this); + } + + /// Get the prismatic joint current motor force, usually in newtons + public float GetMotorForce() + { + return Box2D.PrismaticJointGetMotorForce(this); + } + + /// Get the current joint translation, usually in meters. + public float GetTranslation() + { + return Box2D.PrismaticJointGetTranslation(this); + } + + /// Get the current joint translation speed, usually in meters per second. + public float GetSpeed() + { + return Box2D.PrismaticJointGetSpeed(this); + } + } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2RevoluteJoint : B2Joint + { + /// Enable/disable the revolute joint spring + public void EnableSpring(Bool8 enableSpring) + { + Box2D.RevoluteJointEnableSpring(this, enableSpring); + } + + /// It the revolute angular spring enabled? + public Bool8 IsSpringEnabled() + { + return Box2D.RevoluteJointIsSpringEnabled(this); + } + + /// Set the revolute joint spring stiffness in Hertz + public void SetSpringHertz(float hertz) + { + Box2D.RevoluteJointSetSpringHertz(this, hertz); + } + + /// Get the revolute joint spring stiffness in Hertz + public float GetSpringHertz() + { + return Box2D.RevoluteJointGetSpringHertz(this); + } + + /// Set the revolute joint spring damping ratio, non-dimensional + public void SetSpringDampingRatio(float dampingRatio) + { + Box2D.RevoluteJointSetSpringDampingRatio(this, dampingRatio); + } + + /// Get the revolute joint spring damping ratio, non-dimensional + public float GetSpringDampingRatio() + { + return Box2D.RevoluteJointGetSpringDampingRatio(this); + } + + /// Set the revolute joint spring target angle, radians + public void SetTargetAngle(float angle) + { + Box2D.RevoluteJointSetTargetAngle(this, angle); + } + + /// Get the revolute joint spring target angle, radians + public float GetTargetAngle() + { + return Box2D.RevoluteJointGetTargetAngle(this); + } + + /// Get the revolute joint current angle in radians relative to the reference angle + /// SEE: b2RevoluteJointDef::referenceAngle + public float GetAngle() + { + return Box2D.RevoluteJointGetAngle(this); + } + + /// Enable/disable the revolute joint limit + public void EnableLimit(Bool8 enableLimit) + { + Box2D.RevoluteJointEnableLimit(this, enableLimit); + } + + /// Is the revolute joint limit enabled? + public Bool8 IsLimitEnabled() + { + return Box2D.RevoluteJointIsLimitEnabled(this); + } + + /// Get the revolute joint lower limit in radians + public float GetLowerLimit() + { + return Box2D.RevoluteJointGetLowerLimit(this); + } + + /// Get the revolute joint upper limit in radians + public float GetUpperLimit() + { + return Box2D.RevoluteJointGetUpperLimit(this); + } + + /// Set the revolute joint limits in radians. It is expected that lower + /// < + /// = upper + /// and that -0.99 * B2_PI + /// < + /// = lower + /// & + /// & + /// upper + /// < + /// = -0.99 * B2_PI. + public void SetLimits(float lower, float upper) + { + Box2D.RevoluteJointSetLimits(this, lower, upper); + } + + /// Enable/disable a revolute joint motor + public void EnableMotor(Bool8 enableMotor) + { + Box2D.RevoluteJointEnableMotor(this, enableMotor); + } + + /// Is the revolute joint motor enabled? + public Bool8 IsMotorEnabled() + { + return Box2D.RevoluteJointIsMotorEnabled(this); + } + + /// Set the revolute joint motor speed in radians per second + public void SetMotorSpeed(float motorSpeed) + { + Box2D.RevoluteJointSetMotorSpeed(this, motorSpeed); + } + + /// Get the revolute joint motor speed in radians per second + public float GetMotorSpeed() + { + return Box2D.RevoluteJointGetMotorSpeed(this); + } + + /// Get the revolute joint current motor torque, usually in newton-meters + public float GetMotorTorque() + { + return Box2D.RevoluteJointGetMotorTorque(this); + } + + /// Set the revolute joint maximum motor torque, usually in newton-meters + public void SetMaxMotorTorque(float torque) + { + Box2D.RevoluteJointSetMaxMotorTorque(this, torque); + } + + /// Get the revolute joint maximum motor torque, usually in newton-meters + public float GetMaxMotorTorque() + { + return Box2D.RevoluteJointGetMaxMotorTorque(this); + } + } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2WeldJoint : B2Joint + { + /// Set the weld joint linear stiffness in Hertz. 0 is rigid. + public void SetLinearHertz(float hertz) + { + Box2D.WeldJointSetLinearHertz(this, hertz); + } + + /// Get the weld joint linear stiffness in Hertz + public float GetLinearHertz() + { + return Box2D.WeldJointGetLinearHertz(this); + } + + /// Set the weld joint linear damping ratio (non-dimensional) + public void SetLinearDampingRatio(float dampingRatio) + { + Box2D.WeldJointSetLinearDampingRatio(this, dampingRatio); + } + + /// Get the weld joint linear damping ratio (non-dimensional) + public float GetLinearDampingRatio() + { + return Box2D.WeldJointGetLinearDampingRatio(this); + } + + /// Set the weld joint angular stiffness in Hertz. 0 is rigid. + public void SetAngularHertz(float hertz) + { + Box2D.WeldJointSetAngularHertz(this, hertz); + } + + /// Get the weld joint angular stiffness in Hertz + public float GetAngularHertz() + { + return Box2D.WeldJointGetAngularHertz(this); + } + + /// Set weld joint angular damping ratio, non-dimensional + public void SetAngularDampingRatio(float dampingRatio) + { + Box2D.WeldJointSetAngularDampingRatio(this, dampingRatio); + } + + /// Get the weld joint angular damping ratio, non-dimensional + public float GetAngularDampingRatio() + { + return Box2D.WeldJointGetAngularDampingRatio(this); + } + } + + /// + /// Custom class built to enable member-function access. + /// + [NativeMarshalling(typeof(B2JointMarshaller))] + public class B2WheelJoint : B2Joint + { + /// Enable/disable the wheel joint spring + public void EnableSpring(Bool8 enableSpring) + { + Box2D.WheelJointEnableSpring(this, enableSpring); + } + + /// Is the wheel joint spring enabled? + public Bool8 IsSpringEnabled() + { + return Box2D.WheelJointIsSpringEnabled(this); + } + + /// Set the wheel joint stiffness in Hertz + public void SetSpringHertz(float hertz) + { + Box2D.WheelJointSetSpringHertz(this, hertz); + } + + /// Get the wheel joint stiffness in Hertz + public float GetSpringHertz() + { + return Box2D.WheelJointGetSpringHertz(this); + } + + /// Set the wheel joint damping ratio, non-dimensional + public void SetSpringDampingRatio(float dampingRatio) + { + Box2D.WheelJointSetSpringDampingRatio(this, dampingRatio); + } + + /// Get the wheel joint damping ratio, non-dimensional + public float GetSpringDampingRatio() + { + return Box2D.WheelJointGetSpringDampingRatio(this); + } + + /// Enable/disable the wheel joint limit + public void EnableLimit(Bool8 enableLimit) + { + Box2D.WheelJointEnableLimit(this, enableLimit); + } + + /// Is the wheel joint limit enabled? + public Bool8 IsLimitEnabled() + { + return Box2D.WheelJointIsLimitEnabled(this); + } + + /// Get the wheel joint lower limit + public float GetLowerLimit() + { + return Box2D.WheelJointGetLowerLimit(this); + } + + /// Get the wheel joint upper limit + public float GetUpperLimit() + { + return Box2D.WheelJointGetUpperLimit(this); + } + + /// Set the wheel joint limits + public void SetLimits(float lower, float upper) + { + Box2D.WheelJointSetLimits(this, lower, upper); + } + + /// Enable/disable the wheel joint motor + public void EnableMotor(Bool8 enableMotor) + { + Box2D.WheelJointEnableMotor(this, enableMotor); + } + + /// Is the wheel joint motor enabled? + public Bool8 IsMotorEnabled() + { + return Box2D.WheelJointIsMotorEnabled(this); + } + + /// Set the wheel joint motor speed in radians per second + public void SetMotorSpeed(float motorSpeed) + { + Box2D.WheelJointSetMotorSpeed(this, motorSpeed); + } + + /// Get the wheel joint motor speed in radians per second + public float GetMotorSpeed() + { + return Box2D.WheelJointGetMotorSpeed(this); + } + + /// Set the wheel joint maximum motor torque, usually in newton-meters + public void SetMaxMotorTorque(float torque) + { + Box2D.WheelJointSetMaxMotorTorque(this, torque); + } + + /// Get the wheel joint maximum motor torque, usually in newton-meters + public float GetMaxMotorTorque() + { + return Box2D.WheelJointGetMaxMotorTorque(this); + } + + /// Get the wheel joint current motor torque, usually in newton-meters + public float GetMotorTorque() + { + return Box2D.WheelJointGetMotorTorque(this); + } + } +} diff --git a/Brutal.Box2D/Typedefs.gen.cs b/Brutal.Box2D/Typedefs.gen.cs new file mode 100644 index 0000000..c82d274 --- /dev/null +++ b/Brutal.Box2D/Typedefs.gen.cs @@ -0,0 +1,177 @@ +/* + * @brief Contains the Box2D typedefs ported to C#. + * + * @warning This file is auto-generated by Brutal.Box2D.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +using System.Runtime.InteropServices; +using Brutal.Numerics; + +namespace Brutal.Box2DApi +{ + /// Prototype for user allocation function + /// the allocation size in bytes + /// the required alignment, guaranteed to be a power of 2 + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* B2AllocFcn(uint size, int alignment); + + /// Prototype for user free function + /// the memory previously allocated through `b2AllocFcn` + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void B2FreeFcn(nint mem); + + /// Prototype for the user assert callback. Return 0 to skip the debugger break. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int B2AssertFcn(byte* condition, byte* fileName, int lineNumber); + + /// This function receives proxies found in the AABB query. + /// RETURN: true if the query should continue + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Bool8 B2TreeQueryCallbackFcn(int proxyId, ulong userData, nint context); + + /// This function receives clipped ray cast input for a proxy. The function + /// returns the new ray fraction. + /// - return a value of 0 to terminate the ray cast + /// - return a value less than input->maxFraction to clip the ray + /// - return a value of input->maxFraction to continue the ray cast without clipping + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate float B2TreeRayCastCallbackFcn( + B2RayCastInput* input, + int proxyId, + ulong userData, + nint context + ); + + /// This function receives clipped ray cast input for a proxy. The function + /// returns the new ray fraction. + /// - return a value of 0 to terminate the ray cast + /// - return a value less than input->maxFraction to clip the ray + /// - return a value of input->maxFraction to continue the ray cast without clipping + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate float B2TreeShapeCastCallbackFcn( + B2ShapeCastInput* input, + int proxyId, + ulong userData, + nint context + ); + + /// Task interface + /// This is prototype for a Box2D task. Your task system is expected to invoke the Box2D task with these arguments. + /// The task spans a range of the parallel-for: [startIndex, endIndex) + /// The worker index must correctly identify each worker in the user thread pool, expected in [0, workerCount). + /// A worker must only exist on only one thread at a time and is analogous to the thread index. + /// The task context is the context pointer sent from Box2D when it is enqueued. + /// The startIndex and endIndex are expected in the range [0, itemCount) where itemCount is the argument to b2EnqueueTaskCallback + /// below. Box2D expects startIndex + /// < + /// endIndex and will execute a loop like this: + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void B2TaskCallback(int startIndex, int endIndex, uint workerIndex, nint taskContext); + + /// These functions can be provided to Box2D to invoke a task system. These are designed to work well with enkiTS. + /// Returns a pointer to the user's task object. May be nullptr. A nullptr indicates to Box2D that the work was executed + /// serially within the callback and there is no need to call b2FinishTaskCallback. + /// The itemCount is the number of Box2D work items that are to be partitioned among workers by the user's task system. + /// This is essentially a parallel-for. The minRange parameter is a suggestion of the minimum number of items to assign + /// per worker to reduce overhead. For example, suppose the task is small and that itemCount is 16. A minRange of 8 suggests + /// that your task system should split the work items among just two workers, even if you have more available. + /// In general the range [startIndex, endIndex) send to b2TaskCallback should obey: + /// endIndex - startIndex >= minRange + /// The exception of course is when itemCount + /// < + /// minRange. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* B2EnqueueTaskCallback( + nint task, + int itemCount, + int minRange, + nint taskContext, + nint userContext + ); + + /// Finishes a user task object that wraps a Box2D task. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void B2FinishTaskCallback(nint userTask, nint userContext); + + /// Optional friction mixing callback. This intentionally provides no context objects because this is called + /// from a worker thread. + /// WARNING: This function should not attempt to modify Box2D state or user application state. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate float B2FrictionCallback( + float frictionA, + int userMaterialIdA, + float frictionB, + int userMaterialIdB + ); + + /// Optional restitution mixing callback. This intentionally provides no context objects because this is called + /// from a worker thread. + /// WARNING: This function should not attempt to modify Box2D state or user application state. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate float B2RestitutionCallback( + float restitutionA, + int userMaterialIdA, + float restitutionB, + int userMaterialIdB + ); + + /// Prototype for a contact filter callback. + /// This is called when a contact pair is considered for collision. This allows you to + /// perform custom logic to prevent collision between shapes. This is only called if + /// one of the two shapes has custom filtering enabled. + /// Notes: + /// - this function must be thread-safe + /// - this is only called if one of the two shapes has enabled custom filtering + /// - this is called only for awake dynamic bodies + /// Return false if you want to disable the collision + /// SEE: b2ShapeDef + /// WARNING: Do not attempt to modify the world inside this callback + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Bool8 B2CustomFilterFcn(B2Shape shapeIdA, B2Shape shapeIdB, nint context); + + /// Prototype for a pre-solve callback. + /// This is called after a contact is updated. This allows you to inspect a + /// contact before it goes to the solver. If you are careful, you can modify the + /// contact manifold (e.g. modify the normal). + /// Notes: + /// - this function must be thread-safe + /// - this is only called if the shape has enabled pre-solve events + /// - this is called only for awake dynamic bodies + /// - this is not called for sensors + /// - the supplied manifold has impulse values from the previous step + /// Return false if you want to disable the contact this step + /// WARNING: Do not attempt to modify the world inside this callback + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Bool8 B2PreSolveFcn(B2Shape shapeIdA, B2Shape shapeIdB, B2Manifold* manifold, nint context); + + /// Prototype callback for overlap queries. + /// Called for each shape found in the query. + /// SEE: b2World_OverlapABB + /// RETURN: false to terminate the query. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Bool8 B2OverlapResultFcn(B2Shape shapeId, nint context); + + /// Prototype callback for ray and shape casts. + /// Called for each shape found in the query. You control how the ray cast + /// proceeds by returning a float: + /// return -1: ignore this shape and continue + /// return 0: terminate the ray cast + /// return fraction: clip the ray to this point + /// return 1: don't clip the ray and continue + /// A cast with initial overlap will return a zero fraction and a zero normal. + /// the shape hit by the ray + /// the point of initial intersection + /// the normal vector at the point of intersection, zero for a shape cast with initial overlap + /// the fraction along the ray at the point of intersection, zero for a shape cast with initial overlap + /// the user context + /// RETURN: -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue + /// SEE: b2World_CastRay + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate float B2CastResultFcn(B2Shape shapeId, float2 point, float2 normal, float fraction, nint context); + + /// Used to collect collision planes for character movers. + /// Return true to continue gathering planes. + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Bool8 B2PlaneResultFcn(B2Shape shapeId, B2PlaneResult* plane, nint context); +} diff --git a/Brutal.Collections/FreeList.cs b/Brutal.Collections/FreeList.cs new file mode 100644 index 0000000..e6615fe --- /dev/null +++ b/Brutal.Collections/FreeList.cs @@ -0,0 +1,145 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.Collections; + +/// +/// Interface for a free list index pool, a lightweight allocator that tracks free elements +/// See: https://en.wikipedia.org/wiki/Free_list +/// +public interface IFreeListIndexPool +{ + /// + /// Total backing capacity + /// + public int Capacity { get; set; } + + /// + /// Add element to list, returns index/key to element + /// + /// Index to element + public int Add(); + + /// + /// Check if element at index is empty + /// + public bool IsEmpty(int index); + + /// + /// Remove element at index + /// + public void Remove(int index); + + /// + /// Reset list as empty + /// + public void Clear(); +} + +/// +/// Pool/allocator of indices that tracks free elements to avoid reallocation. +/// Can be used as the allocator for a FreeList. See: https://en.wikipedia.org/wiki/Free_list +/// +public class FreeListIndexPool : IFreeListIndexPool +{ + /// + /// Empty element index not part of linked list of free elements + /// + const int OCCUPIED = -1; + + /// + /// Construct a new free list, that is empty and can grow + /// + public FreeListIndexPool() + { + _list = new(); + AllowResize = true; + } + + /// + /// Construct a new free list with a given capacity + /// + /// Initial capacity + /// If false, will throw instead of growing capacity when backing list is full + public FreeListIndexPool(int capacity, bool allowResize) + { + _list = new(capacity); + AllowResize = allowResize; + } + + private readonly List _list; + private int _firstFree = OCCUPIED; + + /// + /// If true, the list will grow when full, if false, it will throw an exception + /// + public readonly bool AllowResize; + + /// + public int Capacity + { + get => _list.Capacity; + set => _list.Capacity = value; + } + + /// + /// Access element by index + /// + public int this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => _list[index]; + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => _list[index] = value; + } + + /// + public bool IsEmpty(int index) + { + return _list[index] == OCCUPIED; + } + + public bool TryAdd(out int index) + { + if (_firstFree != OCCUPIED) + { + index = _firstFree; + _firstFree = _list[index]; + _list[index] = OCCUPIED; + } + else + { + if (!AllowResize && _list.Count == _list.Capacity) + { + index = -1; + return false; + } + + _list.Add(OCCUPIED); + index = _list.Count - 1; + } + + return true; + } + + /// + public int Add() + { + if (!TryAdd(out var index)) + throw new Exception("FreeListIndexPool is full, and is not allowed to grow"); + return index; + } + + /// + public void Remove(int index) + { + _list[index] = _firstFree; + _firstFree = index; + } + + /// + public void Clear() + { + _list.Clear(); + _firstFree = OCCUPIED; + } +} diff --git a/Brutal.Collections/Name/Name.cs b/Brutal.Collections/Name/Name.cs new file mode 100644 index 0000000..2fd2c1d --- /dev/null +++ b/Brutal.Collections/Name/Name.cs @@ -0,0 +1,102 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.Collections; + +/// +/// A pool-based (see: ) unique identifier for various entities in a system. +/// +public readonly struct Name : IEquatable> +{ + /// + /// The underlying string value of the Name. + /// + public readonly string Value; + + /// + /// Construct a Name from a string, using the shared pool for the type T. + /// + public Name(string id) + : this(id, Namespace.Shared) { } + + /// + /// Construct a Name from a string, using the given pool. + /// + public Name(string id, Namespace pool) + { + Value = pool.GetOrAdd(id); + } + + /// + /// Get the underlying string value of the Name. + /// public new string ToString() => Value; + /// + /// Checks equality with another Name, based on reference equality of the underlying string. + /// + public bool Equals(Name other) + { + return ReferenceEquals(Value, other.Value); + } + + /// + /// Checks equality with another object. + /// + public override bool Equals(object? obj) + { + return obj is Name other && Equals(other); + } + + /// + /// Calculates the hash code for the Name (based on the reference of the Value). + /// + public override int GetHashCode() + { + // Hash the reference of the Value for performance + return RuntimeHelpers.GetHashCode(Value); + } + + /// Equality operator for Name. + public static bool operator ==(Name left, Name right) + { + return left.Equals(right); + } + + /// Inequality operator for Name. + public static bool operator !=(Name left, Name right) + { + return !left.Equals(right); + } + + /// Equality operator for Name and string. + public static bool operator ==(Name left, string right) + { + return left.Value == right; + } + + /// Inequality operator for Name and string. + public static bool operator !=(Name left, string right) + { + return left.Value != right; + } + + /// Equality operator for string and Name. + public static bool operator ==(string left, Name right) + { + return left == right.Value; + } + + /// Inequality operator for string and Name. + public static bool operator !=(string left, Name right) + { + return left != right.Value; + } + + /// + /// Implicitly construct a Name from a string. + /// + public static implicit operator Name(string id) => new(id); + + /// + /// Get the underlying string value of the Name. + /// + public override string ToString() => Value; +} diff --git a/Brutal.Collections/Name/Namespace.cs b/Brutal.Collections/Name/Namespace.cs new file mode 100644 index 0000000..69d6639 --- /dev/null +++ b/Brutal.Collections/Name/Namespace.cs @@ -0,0 +1,56 @@ +using System.Diagnostics.CodeAnalysis; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.Collections; + +/// +/// A pool of unique identifiers +/// +public class Namespace +{ + private readonly Lock _lock = new(); + + /// + /// A global shared pool + /// + public static Namespace Shared { get; } = new(); + + private readonly StringPool _pool = new(); + + internal string GetOrAdd(ReadOnlySpan id) + { + lock (_lock) + { + return _pool.GetOrAdd(id); + } + } + + /// + /// Try to get an existing ID from the pool + /// + public bool TryGet(ReadOnlySpan id, [NotNullWhen(true)] out Name? existing) + { + lock (_lock) + { + if (_pool.TryGet(id, out var key)) + { + existing = new Name(key); + return true; + } + + existing = null; + return false; + } + } + + /// + /// Check if the pool contains the given ID + /// + public bool Contains(ReadOnlySpan id) + { + lock (_lock) + { + return _pool.TryGet(id, out _); + } + } +} diff --git a/Brutal.Collections/NativeList/INativeList.cs b/Brutal.Collections/NativeList/INativeList.cs new file mode 100644 index 0000000..24f036d --- /dev/null +++ b/Brutal.Collections/NativeList/INativeList.cs @@ -0,0 +1,69 @@ +using Brutal.Memory; + +namespace Brutal.Collections; + +/// +/// Base class for native-memory backed lists +/// +public interface INativeList : ISpanLike, IDisposable +{ + public ElementCount Count { get; set; } + public ElementCount Capacity { get; set; } + + /// + /// Matching C# List's Clear(), zeroes count but preserves capacity + /// + public void Clear(); + + /// + /// Set the capacity to the actual number of elements in the list, if the current + /// + public void TrimExcess(); + + /// + /// Increase the capacity of the vector (the total number of elements that the vector can hold without requiring + /// reallocation) to a value that's greater or equal to newCapacity. If new_cap is greater than the current + /// Capacity, new storage is then allocated; otherwise the function does nothing. + /// + /// The new max size + public void EnsureCapacity(ElementCount capacity); + + /// + /// Reset the array and free memory + /// + public void Free(); +} + +public interface INativeList : INativeList, ISpanLike, IEnumerable + where T : unmanaged +{ + /// + /// Get or set an element at an index + /// + public ref T this[Index index] { get; } + + /// + /// Add an element to the end of the list + /// + /// The item to add + public void Add(T item); + + /// + /// Add a range of elements to the end of the list + /// + /// The items to add + public void AddRange(ReadOnlySpan items); + + /// + /// Insert an element at an index, shifting all later elements up by one + /// + /// The index to insert at + /// The item to insert + public void Insert(ElementCount index, T item); + + /// + /// Remove an element at an index, shifting all later elements down by one + /// + /// The index to remove at + public void RemoveAt(ElementCount index); +} diff --git a/Brutal.Collections/NativeList/NativeList.cs b/Brutal.Collections/NativeList/NativeList.cs new file mode 100644 index 0000000..4956fd0 --- /dev/null +++ b/Brutal.Collections/NativeList/NativeList.cs @@ -0,0 +1,380 @@ +using System.Diagnostics; +using Brutal.Attributes; +using Brutal.Memory; +using Brutal.Pointers; +using Brutal.Pointers.Extensions; +using CommunityToolkit.HighPerformance; + +namespace Brutal.Collections; + +/// +/// A native-memory backed list with no fixed type or stride +/// +public sealed class NativeList : INativeList +{ + /// + /// The default capacity of the array (in elements) when first growing from 0 + /// + private const int DEFAULT_CAPACITY = 4; + + /// + /// The capacity of the array (in elements) we can hold without reallocating + /// + private ByteSize _byteCapacity; + + /// + /// The actual number of elements in the array + /// + private ByteSize _byteSize; + + /// + /// Free memory + /// + ~NativeList() + { + Free(); + } + + /// + public bool IsNull() + { + return Ptr.IsNull(); + } + + private void _Reallocate(ByteSize byteSize) + { + unsafe + { + if (byteSize == 0) + { + Free(); + _byteCapacity = ByteSize.Zero; + _byteSize = ByteSize.Zero; + return; + } + + void* oldMem = Ptr; + Ptr = Mem.Alloc(byteSize); + + if (oldMem != null) + { + Mem.Copy(oldMem, Ptr, _byteSize); + Mem.Free(oldMem); + } + + _byteCapacity = byteSize; + } + } + + internal void GrowInternal(ByteSize bytes) + { + Debug.Assert(_byteCapacity < bytes); + + var newCapacity = _byteCapacity == 0 ? ByteSize.Of(DEFAULT_CAPACITY) : 2 * _byteCapacity; + + // Allow the list to grow to the maximum possible capacity (~2G elements) before encountering overflow. + // Note that this check works even when _items.Length overflowed thanks to the (uint) cast + if ((uint)newCapacity > Array.MaxLength) + newCapacity = ByteSize.Of(Array.MaxLength); + + // If the computed capacity is still less than specified, set to the original argument. + // Capacities exceeding Array.MaxLength will be surfaced as OutOfMemoryException by Array.Resize. + if (newCapacity < bytes) + newCapacity = bytes; + + Capacity = newCapacity; + } + + /// + /// Reallocate the array to match the number of elements + /// + public void TrimExcess() + { + if (_byteSize != _byteCapacity) + _Reallocate(_byteSize); + } + + void INativeList.EnsureCapacity(ElementCount capacity) + { + EnsureCapacity(ByteSize.Of(capacity)); + } + + /// + /// Frees any unmanaged resources. + /// + /// + /// This function MUST not cause problems if called more than once on the same instance. + /// This class does not implement the Dispose pattern which is fine, but only because + /// Free is able to handle being called from Dispose() and then called from the finaliser. + /// + public void Free() + { + Mem.Free(Ptr); + Ptr = null; + _byteCapacity = ByteSize.Zero; + _byteSize = ByteSize.Zero; + } + + /// + /// Dispose of the resources. This function can be called multiple times safely. + /// + public void Dispose() + { + Free(); + GC.SuppressFinalize(this); + } + + /// + public Ptr Ptr { get; private set; } + + ElementCount ISpanLike.Length => ElementCount.Of(Size); + + ElementCount INativeList.Count + { + get => ElementCount.Of(_byteSize.Bytes); + set => Size = ByteSize.Of(value); + } + + ElementCount INativeList.Capacity + { + get => ElementCount.Of(_byteSize.Bytes); + set => Size = ByteSize.Of(value); + } + + /// + /// The number of elements in the list + /// + public ByteSize Size + { + get => new(_byteSize.Bytes); + set + { + if (value == Size) + return; + + if (value > Capacity) + GrowInternal(value); + + if (value > Size) + { + Mem.Fill(Ptr.Offset(Size), value - Size, 0); + } + + _byteSize = value; + } + } + + /// + /// The capacity of the array + /// + /// If the new capacity is less than Count + public ByteSize Capacity + { + get => _byteCapacity; + set + { + if (_byteCapacity == value) + return; + + if (value < Size) + { + throw new ArgumentOutOfRangeException( + nameof(value), + "Capacity must be greater than or equal to Count." + ); + } + + _byteCapacity = value; + _Reallocate(_byteCapacity); + } + } + + /// + /// Create an untyped native list with a given stride and initial capacity + /// + public NativeList(ByteSize initialCapacity = default) + { + Capacity = initialCapacity; + } + + /// + /// Constructs a new NativeList and copies the contents of the given span + /// + public unsafe NativeList(ReadOnlySpan initialData) + { + if (initialData.Length > 0) + { + _byteCapacity = ByteSize.Of(initialData.Length); + _byteSize = ByteSize.Of(initialData.Length); + Ptr = Mem.AllocAndCopy(initialData).AsPointer(); + } + } + + /// + /// Adds any unmanaged type to the list + /// + /// + /// Does not check for stride, use it with caution + /// + /// Unmanaged struct to copy over + /// Data type, size should match the list's size + public void Add(T data) + where T : unmanaged + { + var offset = Size; + var stride = ByteSize.Of(); + if (Capacity - Size < stride) + { + GrowInternal(Size == 0 ? ByteSize.Of(DEFAULT_CAPACITY) : Size * 2); + } + _byteSize = _byteSize + stride; + Ptr.Offset(offset).Cast().Value = data; + } + + ByteSize ISpanLike.Stride => ByteSize.Zero; + public bool IsEmpty => Size == 0; + + [return: Fixed] + public Span AsSpan() + where T : unmanaged + { + return Ptr.AsSpan(ElementCount.Of(Size)).Cast(); + } + + /// + /// Get an element at index as a specific unmanaged type + /// + /// + /// Does not check for stride, use it with caution + /// + /// If the index is out of range + public byte this[int index] + { + get + { + if (index < 0 || index >= (int)Size.Bytes) + throw new IndexOutOfRangeException(); + return Ptr.Offset(ByteSize.Of(index)).Cast().Value; + } + set => throw new NotImplementedException(); + } + + public void AddRange(ReadOnlySpan items) + where T : unmanaged + { + var byteSize = ByteSize.Of(items); + var newCount = Size + byteSize; + if (Capacity < newCount) + GrowInternal(newCount); + Mem.Copy(items, Ptr.Offset(Size).AsSpan(items.Length)); + _byteSize += byteSize; + } + + public void AddRange(T items) + where T : ISpanLike, allows ref struct + { + var byteSize = ByteSize.Of(items); + var newCount = Size + byteSize; + if (Capacity < newCount) + GrowInternal(newCount); + Mem.Copy(items.AsSpan(), Ptr.Offset(Size).AsSpan(ElementCount.Of(byteSize))); + _byteSize += byteSize; + } + + public void Add(byte item) + { + Add(item); + } + + public void Insert(ByteSize index, byte item) + { + if (index.Bytes < 0 || index.Bytes > Size) + throw new IndexOutOfRangeException(); + + if (Size + 1 <= Capacity) + { + Mem.Copy(Ptr.Offset(index), Ptr.Offset(index + 1), Size - index); + Ptr.Offset(index).Cast().Value = item; + } + else + { + var newPtr = Mem.Alloc(Size + 1); + Mem.Copy(Ptr, newPtr, index); + newPtr.Offset(index).Cast().Value = item; + Mem.Copy(Ptr.Offset(index), newPtr.Offset(index + 1), Size - index); + Mem.Free(Ptr); + Ptr = newPtr; + } + } + + /// + /// Insert an item at the given index, shifting all later elements up + /// + public void Insert(ByteSize index, T item) + where T : unmanaged + { + if (index > Size) + throw new IndexOutOfRangeException(); + + var stride = ByteSize.Of(); + + if (Size + stride <= Capacity) + { + Mem.Copy(Ptr.Offset(index), Ptr.Offset(index + stride), Size - index); + Ptr.Offset(index).Cast().Value = item; + } + else + { + var newPtr = Mem.Alloc(Size + stride); + Mem.Copy(Ptr, newPtr, index); + newPtr.Offset(index).Cast().Value = item; + Mem.Copy(Ptr.Offset(index), newPtr.Offset(index + stride), Size - index); + Mem.Free(Ptr); + Ptr = newPtr; + } + + _byteSize += stride; + } + + /// + /// Remove a byte at an index, shifting all later elements down + /// + public void RemoveAt(ByteSize index) + { + RemoveAt(index, ByteSize.One); + } + + /// + /// Remove a number of bytes at an index, shifting all later elements down + /// + public void RemoveAt(ByteSize index, ByteSize numBytes) + { + if (index >= Size) + throw new IndexOutOfRangeException(); + + if (index < Size - numBytes) + { + Mem.Copy(Ptr.Offset(index + numBytes), Ptr.Offset(index), Size - index - numBytes); + } + + _byteSize -= numBytes; + } + + /// + /// Clear NativeList and optionally change the element stride. + /// + /// If newStride is less than or equal to zero + public void Clear() + { + _byteSize = ByteSize.Zero; + } + + /// + /// Ensure the list has enough capacity to hold the given number of elements + /// + public void EnsureCapacity(ByteSize capacity) + { + if (_byteCapacity < capacity) + GrowInternal(capacity); + } +} diff --git a/Brutal.Collections/NativeList/NativeListEnumerator.cs b/Brutal.Collections/NativeList/NativeListEnumerator.cs new file mode 100644 index 0000000..13f23e3 --- /dev/null +++ b/Brutal.Collections/NativeList/NativeListEnumerator.cs @@ -0,0 +1,53 @@ +using System.Collections; + +namespace Brutal.Collections; + +/// +/// Enumerator class for generic NativeList +/// +public struct NativeListEnumerator : IEnumerator + where T : unmanaged +{ + private readonly NativeList _list; + private int _index; + + /// + /// Construct enumerator from the list + /// + /// Source list + public NativeListEnumerator(NativeList list) + { + _list = list; + _index = -1; + } + + /// + /// Iterate next element + /// + /// True if enumerator still running + public bool MoveNext() + { + _index++; + return _index < _list.Count; + } + + /// + /// Reset enumerator + /// + public void Reset() + { + _index = -1; + } + + /// + /// Index enumerator + /// + public T Current => _list[_index]; + + object IEnumerator.Current => Current; + + /// + /// Dispose of enumerator + /// + public void Dispose() { } +} diff --git a/Brutal.Collections/NativeList/NativeListOfT.cs b/Brutal.Collections/NativeList/NativeListOfT.cs new file mode 100644 index 0000000..8d0db43 --- /dev/null +++ b/Brutal.Collections/NativeList/NativeListOfT.cs @@ -0,0 +1,178 @@ +using System.Collections; +using Brutal.Attributes; +using Brutal.Memory; +using Brutal.Pointers; + +namespace Brutal.Collections; + +/// +/// A native-memory backed list with a fixed type +/// +/// Element type +public class NativeList : INativeList + where TValueType : unmanaged +{ + ~NativeList() + { + Dispose(); + } + + private readonly NativeStrideList _nativeList; + + public NativeList(ElementCount capacity = default) + { + _nativeList = new NativeStrideList(Stride, capacity); + } + + public NativeList(ReadOnlySpan nativeList) + { + _nativeList = NativeStrideList.FromSpan(Stride, nativeList); + } + + public void Dispose() + { + _nativeList.Dispose(); + GC.SuppressFinalize(this); + } + + public bool IsNull() + { + return _nativeList.IsNull(); + } + + public ByteSize Stride => ByteSize.Of(); + public bool IsEmpty => Count == 0; + + public ref TValueType this[Index index] + { + get + { + var actualIndex = index.GetOffset(Count); + return ref _nativeList.AsSpan()[actualIndex]; + } + } + + public void Add(TValueType item) + { + _nativeList.Add(item); + } + + public void AddRange(Span items) + { + _nativeList.AddRange(items); + } + + public void AddRange(ReadOnlySpan items) + { + _nativeList.AddRange(items); + } + + /// + /// Adds a range of bytes to the end of the list. The length of items must be a multiple of stride + /// + public void AddRange(T items) + where T : ISpanLike + { + _nativeList.AddRange(items.AsSpan()); + } + + public void Insert(ElementCount index, TValueType item) + { + _nativeList.Insert(index, item); + } + + public void RemoveAt(ElementCount index) + { + _nativeList.RemoveAt(index); + } + + public Ptr Ptr => _nativeList.Ptr.Cast(); + + Ptr ISpanLike.Ptr => Ptr; + ElementCount ISpanLike.Length => Count; + + public ElementCount Count + { + get => _nativeList.Count; + set => _nativeList.Count = value; + } + + public ElementCount Capacity + { + get => _nativeList.Capacity; + set => _nativeList.Capacity = value; + } + + public void Clear() + { + _nativeList.Clear(); + } + + public void TrimExcess() + { + _nativeList.TrimExcess(); + } + + public void EnsureCapacity(ElementCount capacity) + { + _nativeList.EnsureCapacity(capacity); + } + + public void Free() + { + _nativeList.Free(); + } + + public IEnumerator GetEnumerator() + { + for (var i = 0; i < Count; ++i) + yield return this[i]; + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public Span Slice(ElementCount start, ElementCount length) + { + return AsSpan().Slice(start, length); + } + + public Span Slice(ElementCount start) + { + return AsSpan()[(int)start..]; + } + + [Fixed] + public Span this[Range range] => AsSpan()[range]; + + [return: Fixed] + public Span AsSpan() + { + return _nativeList.AsSpan(); + } + + Span ISpanLike.AsSpan() + { + return _nativeList.AsSpan(); + } + + public NativeStrideSpan AsNativeSpan() + { + return new NativeStrideSpan(Ptr, Count, Stride); + } + + protected virtual void Dispose(bool isDisposing) + { + if (!isDisposing) + return; + + _nativeList.Dispose(); + } + + public ref TValueType GetPinnableReference() + { + return ref this[0]; + } +} diff --git a/Brutal.Collections/NativeList/NativeStrideList.cs b/Brutal.Collections/NativeList/NativeStrideList.cs new file mode 100644 index 0000000..d995257 --- /dev/null +++ b/Brutal.Collections/NativeList/NativeStrideList.cs @@ -0,0 +1,253 @@ +using Brutal.Attributes; +using Brutal.Memory; +using Brutal.Pointers; + +namespace Brutal.Collections; + +/// +/// A native-memory backed list with a fixed stride +/// +public class NativeStrideList : INativeList +{ + ~NativeStrideList() + { + Dispose(false); + } + + private readonly NativeList _nativeList; + + /// + /// The size of each element in bytes + /// + public ByteSize Stride { get; } + + public bool IsEmpty => Count == 0; + + /// + /// A raw pointer to the underlying memory + /// + public Ptr Ptr => _nativeList.Ptr; + + ElementCount ISpanLike.Length => Count; + + /// + /// The number of elements in the list + /// + public ElementCount Count + { + get => _nativeList.Size.ToElementCount(Stride); + set => _nativeList.Size = value * Stride; + } + + /// + /// The number of elements that can be stored in the list without resizing + /// + public ElementCount Capacity + { + get => _nativeList.Capacity.ToElementCount(Stride); + set => _nativeList.Capacity = value * Stride; + } + + // ReSharper disable once UnusedMember.Local + private NativeStrideList() => throw new InvalidOperationException("NativeStrideList cannot be default constructed"); + + /// + /// Constructs a new NativeStrideList with the given stride and initial capacity + /// + public NativeStrideList(ByteSize stride, ElementCount capacity = default) + { + Stride = stride; + _nativeList = new NativeList(); + + if (stride < 1) + throw new ArgumentOutOfRangeException(nameof(stride), stride, "stride must be greater than 0"); + + _nativeList.EnsureCapacity(Stride * capacity); + } + + public static NativeStrideList FromSpan(ByteSize stride, TSpanLike span) + where TSpanLike : ISpanLike, allows ref struct + { + var outList = new NativeStrideList(stride); + outList.AddRange(span.AsSpan()); + return outList; + } + + public static NativeStrideList FromSpan(TSpanLike span) + where TSpanLike : ISpanLike, allows ref struct + { + return FromSpan(span.Stride, span); + } + + public static NativeStrideList FromSpan(ByteSize stride, ReadOnlySpan span) + where TValueType : unmanaged + { + var outList = new NativeStrideList(stride); + outList.AddRange(span); + return outList; + } + + public static NativeStrideList FromSpan(ReadOnlySpan span) + where TValueType : unmanaged + { + return FromSpan(ByteSize.Of(), span); + } + + // This class does not track if it's been disposed of before, because + // _nativeList.Dispose() is idempotent. Should that or out implementation + // change, then you may need to implement the Dispose pattern in this class. + /// + /// Disposes the native memory. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Checks if the native list is null + /// + public bool IsNull() + { + return _nativeList.IsNull(); + } + + /// + /// Clears the list, setting count to 0 but preserving capacity + /// + public void Clear() + { + _nativeList.Clear(); + } + + /// + /// Trim the capacity to the actual number of elements in the list + /// + public void TrimExcess() + { + _nativeList.TrimExcess(); + } + + /// + /// Ensure the list can hold at least capacity elements without resizing + /// + public void EnsureCapacity(ElementCount capacity) + { + _nativeList.EnsureCapacity(capacity * Stride); + } + + /// + /// Frees the native memory and resets the list + /// + public void Free() + { + _nativeList.Free(); + } + + public NativeStrideSpan AsNativeSpan() + { + return new NativeStrideSpan(Ptr, Count, Stride); + } + + public void AddRange(Span items) + { + AddRange((ReadOnlySpan)items); + } + + /// + /// Adds a range of bytes to the end of the list. The length of items must be a multiple of stride + /// + public void AddRange(ReadOnlySpan items) + { + if (ByteSize.Of(items) % Stride != 0) + throw new ArgumentException("Items length must be a multiple of stride", nameof(items)); + + _nativeList.AddRange(items); + } + + /// + /// Adds a range of bytes to the end of the list. The length of items must be a multiple of stride + /// + public void AddRange(T items) + where T : ISpanLike, allows ref struct + { + if (ByteSize.Of(items) % Stride != 0) + throw new ArgumentException("Items length must be a multiple of stride", nameof(items)); + + _nativeList.AddRange(items); + } + + /// + /// Adds an item to the end of the list + /// + public void Add(T item) + where T : unmanaged + { + CheckStride(); + _nativeList.Add(item); + } + + public void AddRange(Span items) + where T : unmanaged + { + AddRange((ReadOnlySpan)items); + } + + /// + /// Adds a range of items to the end of the list + /// + public void AddRange(ReadOnlySpan items) + where T : unmanaged + { + CheckStride(); + _nativeList.AddRange(items); + } + + /// + /// Inserts an item at the given index, shifting all later items up by one + /// + public void Insert(ElementCount index, T item) + where T : unmanaged + { + CheckStride(); + _nativeList.Insert(Stride * index, item); + } + + /// + /// Removes the item at the given index, shifting all later items down by one + /// + public void RemoveAt(ElementCount index) + where T : unmanaged + { + CheckStride(); + _nativeList.RemoveAt(Stride * index, Stride); + } + + private void CheckStride() + where T : unmanaged + { + CheckStride(ByteSize.Of()); + } + + private void CheckStride(ByteSize stride) + { + if (Stride != stride) + throw new ArgumentException($"NativeStrideList expected stride: {Stride}, but got: {stride}"); + } + + [return: Fixed] + public Span AsSpan() + where T : unmanaged + { + return _nativeList.AsSpan(); + } + + protected virtual void Dispose(bool isDisposing) + { + if (!isDisposing) + return; + + _nativeList.Dispose(); + } +} diff --git a/Brutal.Collections/Span/NativeStrideSpan.cs b/Brutal.Collections/Span/NativeStrideSpan.cs new file mode 100644 index 0000000..fb4d748 --- /dev/null +++ b/Brutal.Collections/Span/NativeStrideSpan.cs @@ -0,0 +1,96 @@ +using Brutal.Attributes; +using Brutal.Memory; +using Brutal.Pointers; +using Brutal.Pointers.Extensions; + +namespace Brutal.Collections; + +/// +/// An untyped span to unsafe memory, however with a stride. +/// +public readonly ref struct NativeStrideSpan(Ptr inData, ElementCount inLength, ByteSize inStride) : ISpanLike +{ + /// + /// The pointer to the first element of the span. + /// + public Ptr Ptr => inData; + + /// + /// The length of the span. + /// + public ElementCount Length => inLength; + + /// + /// The stride of each element. + /// + public ByteSize Stride => inStride; + + public bool IsEmpty => Length == 0; + + /// + /// The total size of the span in bytes. + /// + public ByteSize ByteSize => Length * Stride; + + /// + /// Slice the span into a new raw span. + /// + public NativeStrideSpan Slice(int start, int length) + { + return new NativeStrideSpan(Ptr.Offset(start * Stride), length, Stride); + } + + /// + /// Create a new raw span with a different stride. + /// + /// + public NativeStrideSpan WithStride(ByteSize stride) + { + if (stride <= 0) + throw new ArgumentOutOfRangeException(nameof(stride)); + var prevSize = ByteSize; + return new NativeStrideSpan(Ptr, prevSize.ToElementCount(stride), stride); + } + + /// + public bool IsNull() => Ptr.IsNull(); + + /// + /// Create a new raw span from a managed span. + /// + public static unsafe NativeStrideSpan FromSpan([Fixed] ReadOnlySpan span) + where T : unmanaged + { + return new NativeStrideSpan(span.AsPointer(), span.Length, ByteSize.Of()); + } + + /// + /// Create a new raw span from a managed span. + /// + public static unsafe NativeStrideSpan FromSpan([Fixed] Span span) + where T : unmanaged + { + return new NativeStrideSpan(span.AsPointer(), span.Length, ByteSize.Of()); + } + + /// + /// Slice the span into a new raw span. + /// + public NativeStrideSpan this[int start, int end] => Slice(start, end - start); + + [return: Fixed] + public unsafe Span AsSpan() + where T : unmanaged + { + if (typeof(T) == typeof(byte)) + return new Span(Ptr.Cast(), ElementCount.Of(Length * Stride)); + + var size = ByteSize.Of(); + if (size != Stride) + throw new InvalidOperationException("Stride must be equal to the size of the type, or type must be byte."); + + return new Span(Ptr.Cast(), Length); + } + + public NativeStrideSpan this[Range start] => Slice(start.Start.Value, start.End.Value - start.Start.Value); +} diff --git a/Brutal.Collections/Span/ScratchSpan.cs b/Brutal.Collections/Span/ScratchSpan.cs new file mode 100644 index 0000000..07cf00b --- /dev/null +++ b/Brutal.Collections/Span/ScratchSpan.cs @@ -0,0 +1,53 @@ +using System.Buffers; +using System.Runtime.CompilerServices; + +namespace Brutal.Collections.Experimental; + +/// +/// Stackalloc-or-rent scratch buffer. +/// is backed by the stack buffer if it's big enough, +/// else by an array rented from . +/// returns any rented array to the pool. +/// +/// Usage: +/// using (var scratch = new ScratchSpan<T>(requiredLength, stackalloc T[256])) +/// { +/// var buf = scratch.Span; // length == required, backed by stack or pool +/// // ... +/// } +/// +public readonly ref struct ScratchSpan +{ + private readonly T[]? _rented; + + /// The scratch span of exactly requiredLength elements. + public Span Span { get; } + + public static implicit operator Span(ScratchSpan scratch) => scratch.Span; + + /// Construct a ScratchSpan, get the result in . + /// Number of elements the caller needs. + /// Stack-allocated tentative buffer to use if large enough, otherwise an array is rented. + public ScratchSpan(int requiredLength, Span stackBuffer) + { + Span = requiredLength <= stackBuffer.Length ? stackBuffer : _rented = ArrayPool.Shared.Rent(requiredLength); + Span = Span[..requiredLength]; + } + + /// Alternative form where is output directly to . + /// Number of elements the caller needs. + /// Stack-allocated tentative buffer to use if large enough, otherwise an array is rented. + /// Output span of exactly elements, backed by either or a rented array. + public ScratchSpan(int requiredLength, Span stackBuffer, out Span span) + : this(requiredLength, stackBuffer) + { + span = Span; + } + + /// Returns any rented array to the pool. No-op if the stack buffer was used. + public void Dispose() + { + if (_rented != null) + ArrayPool.Shared.Return(_rented, clearArray: RuntimeHelpers.IsReferenceOrContainsReferences()); + } +} diff --git a/Brutal.Concurrency/Jobs/IJob.cs b/Brutal.Concurrency/Jobs/IJob.cs new file mode 100644 index 0000000..aa5417f --- /dev/null +++ b/Brutal.Concurrency/Jobs/IJob.cs @@ -0,0 +1,9 @@ +namespace Brutal.Concurrency.Jobs; + +/// +/// Represents a job that can be executed by the JobScheduler. +/// +public interface IJob +{ + void Run(); +} diff --git a/Brutal.Concurrency/Jobs/JobRunner.cs b/Brutal.Concurrency/Jobs/JobRunner.cs new file mode 100644 index 0000000..7d83709 --- /dev/null +++ b/Brutal.Concurrency/Jobs/JobRunner.cs @@ -0,0 +1,371 @@ +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Brutal.Concurrency.Jobs; + +/// +/// Provides functionality for queuing, running a collection of IJob instances on a single resource. +/// At present, this resource is a single thread from the System.Threadpool. +/// +public class JobRunner +{ + public const int DEFAULT_CAPACITY = 1024; + public const ThreadPriority DEFAULT_THREAD_PRIORITY = ThreadPriority.AboveNormal; + + /// + /// A delegate that is called when a completes execution. + /// + /// This JobRunner + /// Result of job execution + /// The total time in milliseconds it took to run the jobs + public delegate void JobCompletedDelegate( + JobRunner runner, + ExecutionResult result, + double lastTickTimeMillis + ); + + /// + /// Construct a JobRunner with an optional name, thread priority, capacity and shared Lock instance. + /// + /// The shared lock is useful if you want to have your own synchronisation that you wish the JobRunner to take part in. If this parameter is null + /// then the JobRunner will fallback to using its own locking mechanism. + /// Name of the runner. Defaults to an empty string. + /// The priority to run the worker thread under. Defaults to . + /// Number of entries in the job queue to allocate space for. Defaults to . + /// An optional lock object for the JobRunner to use. + /// Thrown if capacity < 1 + public JobRunner( + string name = "", + ThreadPriority threadPriority = DEFAULT_THREAD_PRIORITY, + int capacity = DEFAULT_CAPACITY, + Lock? @lock = null + ) + { + if (capacity < 1) + throw new ArgumentOutOfRangeException(nameof(capacity), @"capacity"); + + // In DotNet 9 System.Threading.Lock was added to give a bit of performance over Monitor which was used when you went + // lock(some_object). Now you use lock(someLockInstance). + _lock = @lock ?? new Lock(); + _timer = new JobRunnerTimer(); + _state = (int)JobState.Idle; + _jobs = new List(capacity); + _nextJobIndexToExecute = -1; + _workExecutor = new WorkExecutor(this); + Name = name; + ThreadPriority = threadPriority; + + _metrics = new() + { + AverageTickTimeMillis = 0, + MaxTickTimeMillis = 0, + LastTickTimeMillis = 0, + }; + } + + /// + /// Gets or sets the threadpriority that this runner runs on. Takes effect the next time this runner runs jobs. + /// + public ThreadPriority ThreadPriority { get; set; } + + /// + /// The user-defined name of the job runner specified in the constructor. + /// + public string Name { get; set; } + + /// + /// Returns the current state of the JobRunner. + /// + public JobState State => ReadStateSynchronised(); + + /// + /// Queue a job to the JobRunner if it is currently idle. + /// + /// The job to queue + /// Thrown if the job runner is not idle. + public void Queue(IJob job) + { + lock (_lock) + { + if (ReadStateSynchronised() != JobState.Idle) + throw new InvalidOperationException("JobRunner is not idle"); + _jobs.Add(job); + } + } + + /// + /// Returns a of the currently queued jobs for a JobRunner. + /// + /// The returned is a view of the 's queued jobs at the time of the call. If more jobs are added after the call or + /// the 's jobs are executed (which clears the queue) then the ReadOnlySpan is invalidated. + /// + /// The ReadOnlySpan of the queued IJob instances. + /// Thrown if the is not idle. + public ReadOnlySpan GetQueuedJobs() + { + lock (_lock) + { + if (ReadStateSynchronised() != JobState.Idle) + throw new InvalidOperationException("JobRunner is not idle"); + return CollectionsMarshal.AsSpan(_jobs); + } + } + + /// + /// Starts execution of all queued jobs. + /// After a call to ExecuteJobs() no more jobs can be queued until the runner is idle. + /// + /// An optional callback that is invoked when the JobRunner jobs have finished or been aborted. + /// If there are no jobs to run, metrics are not updated, but the callback is still called with the last tick time being set to 0 + /// Thrown if the runner is not currently idle + public void ExecuteJobs(JobCompletedDelegate? onCompleteHandler = null) + { + // Locked (not just the state CAS in CheckedTransitionState) so that a concurrent + // Queue() call is fully ordered relative to this transition: either its Add() + // completes and is visible in the _jobs.Count read below, or it observes the + // Scheduled state and throws before ever touching _jobs. See issue #22. + lock (_lock) + { + CheckedTransitionState(JobState.Idle, JobState.Scheduled); + } + + if (_jobs.Count == 0) + { + Interlocked.Exchange(ref _state, (int)JobState.Idle); + onCompleteHandler?.Invoke(this, ExecutionResult.NoJobs, 0); + return; + } + + // With SafeStartTimer being here, we include the time to get the job thread actually up and running so we + // get a view of the start to finish time. + SafeStartTimer(); + _workExecutor.OnCompleteHandler = onCompleteHandler; + ThreadPool.UnsafeQueueUserWorkItem(_workExecutor, false); + } + + /// + /// Request aborting of jobs that have not already started executing. If the JobRunner is currently Idle or in the process of aborting, this function does nothing. + /// + ///

+ /// Jobs that are already running will not be aborted.
+ /// Metrics will not be updated.
+ ///
+ ///
+ public void RequestAbort() + { + while (true) + { + var currentState = ReadStateSynchronised(); + if (currentState is JobState.Idle or JobState.Abort) + return; + Debug.Assert(currentState is JobState.Scheduled or JobState.Running); + + if ( + Interlocked.CompareExchange(ref _state, (int)JobState.Abort, (int)currentState) + == (int)currentState + ) + return; + } + } + + /// + /// Returns the latest metrics of the JobRunner's last execution, which include AverageMillis, MaxMillis and LastMillis, in milliseconds. + /// + ///

Threadsafe and atomic. Can be called at any time from any thread to get a consistent view of the current metrics.
+ /// This function performs lightweight spin waiting around a sequence token. This does introduce a small overhead. Higher overhead comes + /// with heavier contention such as calling GetMetrics while ResetMetrics is being called from another thread, or the JobRunner is updating its metrics at the end of + /// successfully executing all of its jobs.

Call GetMetricsUnsafe() if shorn JobRunnerMetrics data (Each field itself is still atomic) is acceptable.

+ /// The metrics of the JobRunner + public JobRunnerMetrics GetMetrics() + { + lock (_lock) + { + return _metrics; + } + } + + /// + /// Returns the latest metrics of the JobRunner's last execution in a non-threadsafe manner. Includes AverageMillis, MaxMillis and LastMillis, in milliseconds.
+ ///
+ /// NOT atomic. If you call this while ResetMetrics is running or the JobRunner threads are updating their metrics you will likely get + /// shorn results. That is, results of previous metrics mixed with results of the latest. However, each individual value will be consistent and not shorn due to + /// our requirement of 64bit systems, alignment of the metrics fields and doubles being atomic on those systems if aligned. + /// The metrics of the JobRunner + public JobRunnerMetrics GetMetricsUnsafe() + { + // AKB: Do not just return _metrics, that is not an individual copy of each field and therefore you could get shorn data within each field. + // Even though this function may return inconsistent results, using per-field copies at least gives us atomic sets of each member. + var returned = new JobRunnerMetrics + { + AverageTickTimeMillis = _metrics.AverageTickTimeMillis, + MaxTickTimeMillis = _metrics.MaxTickTimeMillis, + LastTickTimeMillis = _metrics.LastTickTimeMillis, + }; + return returned; + } + + /// + /// Busy waits the current thread until the jobs have finished executing or been aborted. + /// + /// This method busy blocks and may starve a thread or core if waiting too long + public void Wait() + { + while (ReadStateSynchronised() != JobState.Idle) + { + // This code intentionally left blank + } + } + + /// + /// Clears all metrics of the JobRunner in an atomic fashion. You will not get shorn fields from the + /// case where a job wants to update the metrics at the same time as ResetMetrics is clearing them. + ///
+ ///
+ /// + /// The thread safety adds about 10 nanoseconds of overhead on a 3GHz machine.
+ ///
+ public void ResetMetrics() + { + lock (_lock) + { + ResetMetricsUnsafe(); + } + } + + /// + /// Resets all collected timing and performance metrics to their initial state without thread safety guarantees. + /// + /// This method is not thread-safe. CAlling ResetMetrics while others are accessing the (e.g. the JobRunner itself) + /// could result in inconsistent values. + public void ResetMetricsUnsafe() + { + _timer.ResetTimings(); + _metrics.AverageTickTimeMillis = 0; + _metrics.MaxTickTimeMillis = 0; + _metrics.LastTickTimeMillis = 0; + } + + #region Private + + private void SafeStartTimer() + { + lock (_lock) + { + _timer.Start(); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private JobState ReadStateSynchronised() + { + return (JobState)Volatile.Read(ref _state); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void WriteStateSynchronised(JobState newState) + { + Volatile.Write(ref _state, (int)newState); + } + + private void CheckedTransitionState(JobState fromState, JobState toState) + { + var actual = (JobState) + Interlocked.CompareExchange(ref _state, (int)toState, (int)fromState); + if (actual != fromState) + throw new InvalidOperationException( + $"Unexpected state. Expected:{fromState} Actual:{actual}" + ); + } + + private void DoWork(JobCompletedDelegate? onCompleteHandler) + { + var executionResult = ExecutionResult.Success; + try + { + Debug.Assert((JobState)_state is JobState.Scheduled or JobState.Abort); + Debug.Assert(_jobs.Count > 0); + + Thread.CurrentThread.Priority = ThreadPriority; + + // From the time we set our state to Scheduled in ExecuteJobs + // it's possible a RequestAbort came in and our state is now Abort. + // We just let the code flow as normal and the abort check below will detect this, + // however we must let this CompareExchange continue even if it doesn't return Scheduled. + // There is an assumption made that the state will never be Idle here. + Interlocked.CompareExchange(ref _state, (int)JobState.Running, (int)JobState.Scheduled); + + _nextJobIndexToExecute = 0; + while (_nextJobIndexToExecute < _jobs.Count) + { + if (ReadStateSynchronised() == JobState.Abort) + { + executionResult = ExecutionResult.Aborted; + break; + } + + var job = _jobs[_nextJobIndexToExecute++]; + job.Run(); + } + } + finally + { + var lastTickTime = StopTimerAndUpdateMetrics(executionResult); + + _jobs.Clear(); + _nextJobIndexToExecute = -1; + onCompleteHandler?.Invoke(this, executionResult, lastTickTime); + + // Inserts memory fences to ensure operations before the call are not ordered after the write. + // Release semantics will ensure other threads seeing the change, will see previous changes as well. + WriteStateSynchronised(JobState.Idle); + } + } + + private double StopTimerAndUpdateMetrics(ExecutionResult executionResult) + { + lock (_lock) + { + _timer.Stop(); + if (executionResult != ExecutionResult.Success) + return _timer.LastMillis; + + _metrics.AverageTickTimeMillis = _timer.AverageMillis; + _metrics.MaxTickTimeMillis = _timer.MaxMillis; + _metrics.LastTickTimeMillis = _timer.LastMillis; + return _timer.LastMillis; + } + } + + // Using an IThreadPoolWorkItem allows us to avoid the overhead of a closure and delegate allocation for each job execution. + private class WorkExecutor : IThreadPoolWorkItem + { + public WorkExecutor(JobRunner runner) + { + _runner = runner; + } + + public JobCompletedDelegate? OnCompleteHandler { private get; set; } + + public void Execute() + { + Debug.Assert(_runner != null); + _runner.DoWork(OnCompleteHandler); + } + + private readonly JobRunner _runner; + } + + private int _state; + private int _nextJobIndexToExecute; + private readonly List _jobs; + private readonly JobRunnerTimer _timer; + private JobRunnerMetrics _metrics; + private readonly WorkExecutor _workExecutor; + + // This can be passed in as a parameter to the constructor if you wish to share a lock + // amongst your JobRunners. + private readonly Lock _lock; + + #endregion +} diff --git a/Brutal.Concurrency/Jobs/JobRunnerMetrics.cs b/Brutal.Concurrency/Jobs/JobRunnerMetrics.cs new file mode 100644 index 0000000..9b2b189 --- /dev/null +++ b/Brutal.Concurrency/Jobs/JobRunnerMetrics.cs @@ -0,0 +1,22 @@ +namespace Brutal.Concurrency.Jobs; + +/// +/// Represents performance metrics and operational state details of a job runner. +/// +public struct JobRunnerMetrics +{ + /// + /// The average time taken in milliseconds + /// + public double AverageTickTimeMillis; + + /// + /// The largest time taken to date in milliseconds + /// + public double MaxTickTimeMillis; + + /// + /// The last execution time taken in milliseconds + /// + public double LastTickTimeMillis; +} diff --git a/Brutal.Concurrency/Jobs/JobRunnerTimer.cs b/Brutal.Concurrency/Jobs/JobRunnerTimer.cs new file mode 100644 index 0000000..316a1ea --- /dev/null +++ b/Brutal.Concurrency/Jobs/JobRunnerTimer.cs @@ -0,0 +1,42 @@ +using System.Diagnostics; +using Brutal.Concurrency.Statistics; + +namespace Brutal.Concurrency.Jobs; + +/// +/// A class that can take a series of time measurements and record return some basic stats. +/// +internal class JobRunnerTimer +{ + public void Start() + { + _workerStopwatch.Restart(); + } + + public void Stop() + { + _workerStopwatch.Stop(); + AddSample(_workerStopwatch.Elapsed.TotalMilliseconds); + } + + public void ResetTimings() + { + _sampler.Reset(); + } + + public double AverageMillis => _sampler.Average; + public double MaxMillis => _sampler.Max; + public double LastMillis => _sampler.Last; + + #region Private + + private void AddSample(double milliSeconds) + { + _sampler.Add(milliSeconds); + } + + private readonly Stopwatch _workerStopwatch = new(); + private readonly Sampler _sampler = new(); + + #endregion +} diff --git a/Brutal.Concurrency/Jobs/JobScheduler.cs b/Brutal.Concurrency/Jobs/JobScheduler.cs new file mode 100644 index 0000000..13694d4 --- /dev/null +++ b/Brutal.Concurrency/Jobs/JobScheduler.cs @@ -0,0 +1,324 @@ +using System.Diagnostics; + +namespace Brutal.Concurrency.Jobs; + +/// +/// Manages running lightweight jobs on a user-defined number of work items through the system ThreadPool. +/// +/// +/// var jobScheduler = new JobScheduler(3, "DebugName"); // Create with 3 JobRunners +/// jobScheduler.Queue(new MyJob(), 5); // Queue a job with an estimated cost of 5 +/// jobScheduler.ExecuteJobs(); // Run all queued jobs +/// jobScheduler.Wait(); // Busy wait for all jobs to finish +/// +/// +/// +public class JobScheduler +{ + /// + /// Initialises an instance of JobScheduler. + /// + /// The number of job runners this scheduler can schedule between. Must be greater than 0. This typically translates to the number + /// of threads used by the scheduler, although ultimately that is decided by the underlying ThreadPool. + /// Debug name of this scheduler. Can be retrieved with Name property. Child JobRunners owned by this JobScheduler get debugName + /// as their name appended with their index. + /// The thread priority every JobRunner owned by this JobScheduler is created with. Defaults to . + /// Use to change it for all runners afterwards. + /// Thrown if jobRunnerCount == 0 + public JobScheduler( + uint jobRunnerCount, + string debugName = "", + ThreadPriority threadPriority = JobRunner.DEFAULT_THREAD_PRIORITY + ) + { + if (jobRunnerCount == 0) + throw new ArgumentOutOfRangeException( + nameof(jobRunnerCount), + @"Minimum number of job runners is 1" + ); + + _runnerWorkloads = new int[jobRunnerCount]; + + _runners = new JobRunner[jobRunnerCount]; + for (var i = 0; i < _runners.Length; ++i) + _runners[i] = new JobRunner( + $"{debugName}{i}", + threadPriority, + JobRunner.DEFAULT_CAPACITY + ); + + _metricsCache = new JobRunnerMetrics[jobRunnerCount]; + _maxLastTickTime = 0; + Name = debugName; + + _jobCompletedDelegate = OnRunnerFinished; + } + + /// + /// Queues a job. + /// The scheduler will attempt to distribute the job to the JobRunners that will get the job done quickest. + /// + /// The job to queue + /// The time cost estimate of the job. The JobScheduler will use this value to distribute + /// jobs efficiently. Higher numbers indicate that the job will take more time to complete + /// If the system is currently running jobs + public void Queue(IJob job, int timeCostEstimate) + { + if (!IsAllRunnersIdle()) + throw new InvalidOperationException("Jobs in progress"); + + var jobRunnerToUseIndex = LeastBurdenedRunner(); + + _runnerWorkloads[jobRunnerToUseIndex] += timeCostEstimate; + _runners[jobRunnerToUseIndex].Queue(job); + } + + /// + /// Busy blocks the calling thread until all jobs have finished or been aborted. + /// + public void Wait() + { + for (var i = 0; i < _runners.Length; ++i) + _runners[i].Wait(); + } + + /// + /// Tells all job runners to start executing their jobs. + /// + /// Thrown if any job runners are already busy + public void ExecuteJobs() + { + if (!IsAllRunnersIdle()) + throw new InvalidOperationException("Jobs already in progress."); + + ResetWorkloadCosts(); + + Interlocked.Exchange(ref _maxLastTickTime, 0); + + foreach (var runner in _runners) + runner.ExecuteJobs(_jobCompletedDelegate); + } + + /// + /// Signals to all the job runners that they should abort their work. Jobs in their Run() function will not be aborted, + /// and it is technically possible some final jobs will be executed if they have been dequeued and are about to be + /// Run(). + /// + /// If true will block the current thread until all job runners are finished aborting. + public void AbortJobs(bool waitForCompletion = false) + { + foreach (var runner in _runners) + runner.RequestAbort(); + + if (waitForCompletion) + Wait(); + } + + /// + /// Copies the last metrics from each JobRunner's successful job execution into a provided span. + /// + /// + /// This function guarantees that the returned metrics for a JobRunner is a consistent, atomic, snapshot. No shorn values will be returned. + /// + /// A Span of JobRunnerMetrics where each entry represents the metrics of a specific JobRunner. + public void GetMetrics(Span targetMetrics) + { + lock (_lock) + { + _metricsCache.AsSpan().CopyTo(targetMetrics); + } + } + + /// + /// Copies the current metrics of all JobRunners into the provided span, without synchronisation. + /// + /// NOT threadsafe or atomic. Each runner's metrics are read via , + /// so results may be shorn (a mix of before/after values) if a runner is concurrently completing a job or + /// resetting its metrics. Use for a threadsafe, atomic + /// alternative. + /// A span to receive the metrics; must have at least as many entries as there are JobRunners. + public void GetMetricsUnsafe(Span targetMetrics) + { + for (var i = 0; i < _runners.Length; ++i) + targetMetrics[i] = _runners[i].GetMetricsUnsafe(); + } + + /// + /// Returns the of all JobRunnerMetrics, without synchronization. + /// + /// NOT threadsafe or atomic. Each runner's metrics are read via , + /// so results may be shorn (a mix of before/after values) if a runner is concurrently completing a job or + /// resetting its metrics. Use for a threadsafe, atomic + /// alternative. + public ReadOnlySpan GetMetricsUnsafe() + { + for (var i = 0; i < _runners.Length; ++i) + _metricsCache[i] = _runners[i].GetMetricsUnsafe(); + + return new(_metricsCache); + } + + /// + /// Returns the largest tick time from the last time the job runners were executed. + /// + /// + public double GetMaxLastTickTime() + { + return Volatile.Read(ref _maxLastTickTime); + } + + public string Name { get; set; } + + /// + /// True if any of this scheduler's JobRunners are currently scheduled, running, or aborting jobs. + /// + public bool IsExecuting => !IsAllRunnersIdle(); + + /// + /// Sets the thread priority of every JobRunner owned by this JobScheduler. Takes effect the next time + /// each runner runs jobs. + /// + /// The thread priority to apply to all owned JobRunners. + public void SetThreadPriority(ThreadPriority threadPriority) + { + foreach (var runner in _runners) + runner.ThreadPriority = threadPriority; + } + + /// + /// Resets all metrics for the job runners managed by this scheduler. + /// This does not set the MaxLastTickTime of the JobScheduler itself. + /// The JobScheduler will maintain this value until the next time jobs are run. + /// + /// + /// + public void ResetMetrics() + { + lock (_lock) + { + // Each runner is reset via its own locked ResetMetrics(), not + // ResetMetricsUnsafe() - the runners no longer share this scheduler's + // lock (see issue #29), so resetting unsynchronised here would race with + // that runner's own concurrent SafeStartTimer()/StopTimerAndUpdateMetrics(). + foreach (var runner in _runners) + runner.ResetMetrics(); + _metricsCache.AsSpan().Clear(); + } + } + + public void ResetMetricsUnsafe() + { + foreach (var runner in _runners) + runner.ResetMetricsUnsafe(); + _metricsCache.AsSpan().Clear(); + } + + /// + /// Provides access to the collection of JobRunners managed by this JobScheduler. + /// + /// Use this at your own risk in the situations where jobs + /// ReadOnlySpan of JobRunners this JobScheduler manages. + public ReadOnlySpan GetRunners() => new(_runners); + + /// + /// Gets a read-only span containing the current workloads assigned to the runner. + /// + /// A representing the workloads. The span reflects the current state of the + /// underlying data and should not be used after the containing object is modified or disposed. + public ReadOnlySpan GetWorkLoads() => new(_runnerWorkloads); + + #region Private + + private int LeastBurdenedRunner() + { + var runner = 0; + for (var i = 0; i < _runners.Length; ++i) + { + if (_runnerWorkloads[i] < _runnerWorkloads[runner]) + runner = i; + } + return runner; + } + + private void ResetWorkloadCosts() + { + Array.Clear(_runnerWorkloads, 0, _runners.Length); + } + + private bool IsAllRunnersIdle() + { + for (var i = 0; i < _runners.Length; ++i) + { + if (_runners[i].State != JobState.Idle) + return false; + } + return true; + } + + /// + /// Updates the JobScheduler's MaxLastTickTime. Ensures that the final value is the Maximum of any + /// JobRunners that might call this function concurrently. + /// + /// The JobRunner that has just completed its jobs + /// The result of the job execution + /// The time in milliseconds it took to last run the jobs. If 'result' is not ExecutionResult.Success, this value is undefined + private void OnRunnerFinished(JobRunner runner, ExecutionResult result, double jobQueueRunTime) + { + if (result != ExecutionResult.Success) + return; + + for (var i = 0; i < _runners.Length; ++i) + { + if (runner == _runners[i]) + { + lock (_lock) + { + // We can call GetMetricsUnsafe because the JobRunner has finished and we are actually running on its thread. + _metricsCache[i] = runner.GetMetricsUnsafe(); + } + break; + } + } + + // Volatile.Read, not Interlocked.Exchange(ref _maxLastTickTime, _maxLastTickTime): the read + // of the second argument and the exchange itself are two separate, non-atomic steps. If + // another thread's CompareExchange below lands in the gap between them (via true parallel + // execution or preemption), this call would silently write back our stale snapshot and + // clobber their update. + var maxLastTickTimeSnapShot = Volatile.Read(ref _maxLastTickTime); + while (true) + { + if (jobQueueRunTime <= maxLastTickTimeSnapShot) + return; + + var maxTimeBeforeChange = Interlocked.CompareExchange( + ref _maxLastTickTime, + jobQueueRunTime, + maxLastTickTimeSnapShot + ); + // ReSharper disable once CompareOfFloatsByEqualityOperator + // Disabled because we do want an exact bitwise test here, but IDEs can moan about not + // using the floating point Epsilon check. + if (maxTimeBeforeChange == maxLastTickTimeSnapShot) + return; + maxLastTickTimeSnapShot = maxTimeBeforeChange; + } + } + + // The indices of these three arrays must map to the same JobRunner. i.e. _runners[0] has its metrics in _metricsCache[0] and its workload in _runnerWorkloads[0] + private readonly JobRunner[] _runners; + private readonly int[] _runnerWorkloads; + private readonly JobRunnerMetrics[] _metricsCache; + + // I experimented with various concurrency mechanisms like sequence locks and SpinWaiter objects and in the + // end a simple lock performed basically as good as anything else and it is much simpler to grok. + private readonly Lock _lock = new(); + + // This doc: https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md#alignment + // Says that on 64 bit systems an 8 byte variable is aligned to 8 bytes. We need this requirement + // because atomicity is only guaranteed for doubles (and others) if they are aligned correctly. + private double _maxLastTickTime; + private readonly JobRunner.JobCompletedDelegate _jobCompletedDelegate; + + #endregion +} diff --git a/Brutal.Concurrency/Jobs/JobState.cs b/Brutal.Concurrency/Jobs/JobState.cs new file mode 100644 index 0000000..429ff04 --- /dev/null +++ b/Brutal.Concurrency/Jobs/JobState.cs @@ -0,0 +1,25 @@ +namespace Brutal.Concurrency.Jobs; + +/// +/// Specifies the possible states of a JobRunner within the job system. +/// +/// Idle - A JobRunner is not performing work and can have items queued to it or have it execute any queued jobs. +/// Scheduled - A JobRunner has been asked to execute jobs but they haven't started running yet. +/// Running - A JobRunner is processing its job queue and running each job. +/// Abort - A JobRunner has been asked to stop running any more jobs. +/// +/// Do not change the underlying type of JobState without looking at JobRunner's state field. It is required for correct behaviour +public enum JobState : int +{ + Idle = 0, + Scheduled = 1, + Running = 2, + Abort = 3, +} + +public enum ExecutionResult +{ + Success, // All jobs ran and completed + NoJobs, // No jobs were queued when ExecuteJobs was called + Aborted, // Jobs were aborted before completion +} diff --git a/Brutal.Concurrency/Statistics/MovingAverage.cs b/Brutal.Concurrency/Statistics/MovingAverage.cs new file mode 100644 index 0000000..e691aa0 --- /dev/null +++ b/Brutal.Concurrency/Statistics/MovingAverage.cs @@ -0,0 +1,85 @@ +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Brutal.Concurrency.Statistics; + +/// +/// Provides a moving average over a fixed window of samples. +/// +/// The underlying sample type +public class MovingAverage + where TNumber : INumber, + IDivisionOperators, + IModulusOperators +{ + /// + /// Create a moving average sampler with a fixed window size. + /// + /// The maximum number of samples to compute the average over + /// Thrown if maxWindowSampleCount <= 0 + public MovingAverage(uint maxWindowSampleCount) + { + if (maxWindowSampleCount <= 0) + throw new ArgumentOutOfRangeException( + nameof(maxWindowSampleCount), + "Must be greater than 0" + ); + + _maxWindowSampleCount = maxWindowSampleCount; + _currentWindowSampleCount = 0; + _values = new TNumber[maxWindowSampleCount]; + } + + /// + /// Clears all samples from the moving average. + /// + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + public void Reset() + { + Array.Clear(_values); + _index = 0; + _currentWindowSampleCount = 0; + _sum = TNumber.Zero; + } + + /// + /// Adds a sample to the moving average window and returns the updated average. + /// + /// + /// + public TNumber Update(TNumber sample) + { + _sum = _sum - _values[_index] + sample; + _values[_index] = sample; + _index = (_index + 1) % _maxWindowSampleCount; + _currentWindowSampleCount = Math.Min(_currentWindowSampleCount + 1, _maxWindowSampleCount); + return _sum / TNumber.CreateTruncating(_currentWindowSampleCount); + } + + /// + /// Returns the number of samples currently in the moving average window. + /// + /// + /// This is not the total number of samples added, but the number that are + /// being considered for the moving average. i.e. Up until max window sample count is reached, + /// this will be equal to the number of samples added, but once the max window sample count is reached + /// this value will be equal to the max window sample count. + /// + /// The number of samples in the moving average window. + public uint SampleCount => _currentWindowSampleCount; + + /// + /// Returns the current average of all samples, or TNumber.Zero if no samples have been added. + /// + public TNumber CurrentAverage => + _currentWindowSampleCount == 0 + ? TNumber.Zero + : _sum / TNumber.CreateTruncating(_currentWindowSampleCount); + + private readonly uint _maxWindowSampleCount; + private uint _currentWindowSampleCount; + private readonly TNumber[] _values; + private uint _index; + private TNumber _sum = TNumber.Zero; +} diff --git a/Brutal.Concurrency/Statistics/Sampler.cs b/Brutal.Concurrency/Statistics/Sampler.cs new file mode 100644 index 0000000..2d9e43f --- /dev/null +++ b/Brutal.Concurrency/Statistics/Sampler.cs @@ -0,0 +1,43 @@ +using System.Numerics; + +namespace Brutal.Concurrency.Statistics; + +/// +/// Sampler used by the Job system for its metrics. +/// +/// +public class Sampler + where TNumber : INumber, + IAdditionOperators, + ISubtractionOperators, + IMinMaxValue, + INumberBase +{ + public Sampler() + { + Average = TNumber.Zero; + Max = TNumber.MinValue; + Last = TNumber.Zero; + } + + public void Add(TNumber value) + { + Last = value; + Max = TNumber.Max(value, Max); + Average = _movingAverage.Update(value); + } + + public void Reset() + { + _movingAverage.Reset(); + Average = TNumber.Zero; + Max = TNumber.MinValue; + Last = TNumber.Zero; + } + + public TNumber Average { get; private set; } + public TNumber Max { get; private set; } + public TNumber Last { get; private set; } + + private readonly MovingAverage _movingAverage = new(50); +} diff --git a/Brutal.Core/Attributes.cs b/Brutal.Core/Attributes.cs new file mode 100644 index 0000000..672dcd6 --- /dev/null +++ b/Brutal.Core/Attributes.cs @@ -0,0 +1,6 @@ +namespace Brutal.Attributes; + +[AttributeUsage( + AttributeTargets.ReturnValue | AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property +)] +public sealed class FixedAttribute : Attribute { } diff --git a/Brutal.Core/Enums/BitMask.cs b/Brutal.Core/Enums/BitMask.cs new file mode 100644 index 0000000..cef7dc6 --- /dev/null +++ b/Brutal.Core/Enums/BitMask.cs @@ -0,0 +1,247 @@ +using System.Collections.Concurrent; +using System.Diagnostics.CodeAnalysis; +using System.Numerics; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.Enums; + +/// Represents a bit mask, ie a collection of bits that can be set/unset. +[SuppressMessage("ReSharper", "StaticMemberInGenericType")] +public struct BitMask : IEquatable>, IBitwiseOperators, BitMask, BitMask> + where T : unmanaged, IBinaryInteger, IUnsignedNumber +{ + public static readonly int BitCount = Unsafe.SizeOf() * 8; + + /// A mask with no bits set. + public static readonly BitMask Empty = default; + + /// A mask with all the bits set. + public static readonly BitMask Full = new(T.AllBitsSet); + + T _value; + public T Value => _value; + + /// Create a mask from a bit mask, ie no shifting. + public static BitMask FromMask(T mask) => new(mask); + + /// Create a mask from a bit index, ie shifting it. + public static BitMask FromBit(byte bitIndex) => new(bitIndex); + + /// Create a mask from a value, ie no shifting. + private BitMask(T mask) + { + _value = mask; + } + + /// Create a mask from a bit index, ie shifting it. + public BitMask(byte bitIndex) + { + _value = T.One << bitIndex; + } + + /// Create a mask with the given range of bit indices set. + public BitMask(Range bitRange) + { + this[bitRange] = true; + } + + /// Create a mask with the given bit indices set. + public BitMask(params ReadOnlySpan bitIndices) + { + foreach (var bitIndex in bitIndices) + _value |= T.One << bitIndex; + } + + #region this[index/range] accessors + + /// Get/set the value of a bit by its index. + public bool this[byte bitIndex] + { + get => Contains(bitIndex); + set => Set(bitIndex, value); + } + + /// Get/set the value of a bit by its index. + public bool this[Index bitIndex] + { + get => Contains((byte)bitIndex.GetOffset(BitCount)); + set => Set((byte)bitIndex.GetOffset(BitCount), value); + } + + /// Get/set the value of a range of bits. + public bool this[Range bitRange] + { + get => ContainsAll(new BitMask(bitRange)); + set + { + var (offset, length) = bitRange.GetOffsetAndLength(BitCount); + var start = (byte)offset; + var end = offset + (byte)length; + for (var i = start; i < end; i++) + this[i] = value; + } + } + + #endregion + + #region operators + + public static BitMask operator |(BitMask a, BitMask b) => FromMask(a._value | b._value); + + public static BitMask operator &(BitMask a, BitMask b) => FromMask(a._value & b._value); + + public static BitMask operator ^(BitMask a, BitMask b) => FromMask(a._value ^ b._value); + + public static BitMask operator ~(BitMask a) => FromMask(~a._value); + + #endregion + + #region Contains/Add/Remove/Set(bitIndex) + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool Contains(byte bitIndex) => ContainsAny(FromBit(bitIndex)); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public BitMask Add(byte bitIndex) => Add(FromBit(bitIndex)); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public BitMask Remove(byte bitIndex) => Remove(FromBit(bitIndex)); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public BitMask Set(byte bitIndex, bool enabled) => Set(FromBit(bitIndex), enabled); + + #endregion + + #region Contains/Add/Remove/Set(mask) + + /// + /// Does this mask entirely contain ? + /// Ie, does this mask contain all the bits in ? + ///
+ /// Similarly to , this method returns true if the set of bits + /// represented by is empty, even if the current mask is empty. + ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool ContainsAll(BitMask other) + { + return (_value & other._value) == other._value; + } + + /// Does this mask contain any of the bits in ? + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool ContainsAny(BitMask other) + { + return (_value & other._value) != T.Zero; + } + + /// Add (set) the given bits to ours. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public BitMask Add(BitMask other) + { + _value |= other._value; + return this; + } + + /// Remove (unset) the other bits from ours. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public BitMask Remove(BitMask other) + { + _value &= ~other._value; + return this; + } + + /// Add/remove (set/unset) the other bits to/from ours. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public BitMask Set(BitMask other, bool enabled) => enabled ? Add(other) : Remove(other); + + #endregion + + /// Is the mask empty? ie no bits set. + public bool IsEmpty => _value == default; + + /// Is the mask full? ie all bits set. + public bool IsFull => _value == T.AllBitsSet; + + /// Does the mask have only a single bit set? + public bool IsPow2 => T.IsPow2(_value); + + /// If the mask has only a single bit set, return its index. + public bool TryGetBitIndex(out byte index) => BitOperations.TryGetBitIndex(_value, out index); + + /// Return the inverse of this mask, ie all bits flipped. + public BitMask Inversed => new(~_value); + + #region ToString() - TODO: ISpanFormattable etc + + public static readonly string[] BitNames = ComputeBitNames(); + + static string[] ComputeBitNames() + { + var names = new string[BitCount]; + for (var i = 0; i < BitCount; i++) + { + names[i] = i.ToString(); + } + return names; + } + + static readonly ConcurrentDictionary ToStringCache = new(); + + public override string ToString() + { + // try to get string from cache + if (ToStringCache.TryGetValue(_value, out var s)) + { + return s; + } + + if (IsEmpty) + return "(empty)"; + if (IsFull) + return "(full)"; + + // compute string and cache it + using var tmpBitNames = SpanOwner.Allocate(BitCount); + var tmpBitNameCount = 0; + for (byte i = 0; i < BitCount; i++) + if (Contains(i)) + tmpBitNames.Span[tmpBitNameCount++] = BitNames[i]; + ToStringCache[_value] = s = $"({string.Join(", ", tmpBitNames.Span[..tmpBitNameCount])})"; + return s; + } + + #endregion + + #region equality members + + public bool Equals(BitMask other) + { + return _value.Equals(other._value); + } + + public override bool Equals(object? obj) + { + return obj is BitMask other && Equals(other); + } + + public override int GetHashCode() + { + return _value.GetHashCode(); + } + + public static bool operator ==(BitMask left, BitMask right) + { + return left.Equals(right); + } + + public static bool operator !=(BitMask left, BitMask right) + { + return !left.Equals(right); + } + + #endregion +} diff --git a/Brutal.Core/Enums/Enum.Info.cs b/Brutal.Core/Enums/Enum.Info.cs new file mode 100644 index 0000000..c06f354 --- /dev/null +++ b/Brutal.Core/Enums/Enum.Info.cs @@ -0,0 +1,93 @@ +using System.Diagnostics.CodeAnalysis; +using System.Reflection; + +namespace Brutal.Enums; + +/// Provides information about a given Enum type. +[SuppressMessage("ReSharper", "StaticMemberInGenericType")] +public static class Enum + where T : unmanaged, Enum +{ + public static readonly int BitCount = Unsafe.SizeOf() * 8; + public static readonly Type UnderlyingType = typeof(T).GetEnumUnderlyingType(); + + public static readonly T[] Values = (T[])Enum.GetValues(typeof(T)); + public static readonly string[] Names = Enum.GetNames(typeof(T)); + public static readonly int Count = Values.Length; + public static readonly T MinValue, + MaxValue; + + public static readonly (T value, string name)[] Pairs = new (T value, string name)[Count]; + + static Enum() + { + for (var i = 0; i < Count; i++) + { + Pairs[i] = (Values[i], Names[i]); + } + + if (Count > 0) + { + // values are already sorted + MinValue = Values[0]; + MaxValue = Values[^1]; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public static T CreateTruncating(int value) => EnumOperators.CreateTruncating(value); + + #region specific to mask / bit-field / [Flags] enums + + /// Does this enum represent a bit-field? aka [Flags] enum. + public static readonly bool IsBitMask = typeof(T).GetCustomAttribute() != null; + + /// For a bit-field enum, this a mask with all the enum's available flags/bits set. + /// Otherwise, 0 for non-bit-field enums. + public static readonly T KnownFlagsMask = ComputeKnownFlagsMask(); + + static T ComputeKnownFlagsMask() + { + if (!IsBitMask) + return default; + + var all = default(T); + foreach (var flag in Values) + all |= flag; + return all; + } + + #region single-bit values / compound values + + /// For a bit-field enum, the list of available single-bit values (compound/multi-bit values are excluded). + /// Otherwise, empty for non-bit-field enums. + public static readonly T[] BitValues = ComputeBitValues(true); + + /// For a bit-field enum, the list of available compound/multi-bit values. + /// Otherwise, empty for non-bit-field enums. + public static readonly T[] CompoundValues = ComputeBitValues(false); + + static T[] ComputeBitValues(bool bitOrCompound) + { + if (!IsBitMask) + return []; + + Span bits = stackalloc T[Count]; + var bitCount = 0; + + for (var i = 0; i < Count; i++) + { + var v = Values[i]; + if (v.IsPow2 == bitOrCompound) + { + bits[bitCount++] = v; + } + } + + return bitCount > 0 ? bits[..bitCount].ToArray() : []; + } + + #endregion + + #endregion +} diff --git a/Brutal.Core/Enums/EnumArithmetic.gen.cs b/Brutal.Core/Enums/EnumArithmetic.gen.cs new file mode 100644 index 0000000..70fe28c --- /dev/null +++ b/Brutal.Core/Enums/EnumArithmetic.gen.cs @@ -0,0 +1,380 @@ +// - edit EnumArithmetic.tt to modify +#nullable enable + +using System.Numerics; +using static System.Runtime.CompilerServices.Unsafe; + +// csharpier-ignore-start +namespace Brutal.Enums +{ +/// Extension operators for enums, allowing for generic arithmetic +public static class EnumOperators +{ + extension(T) where T : unmanaged, Enum + { + /// TEnum.Equals() boxes, avoid it like the plague. + /// And unfortunately, we can't replace the builtin Equals through an extension. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool operator ==(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast(a) == BitCast(b); + if (sizeof(T) == sizeof(ushort)) + return BitCast(a) == BitCast(b); + if (sizeof(T) == sizeof(uint)) + return BitCast(a) == BitCast(b); + if (sizeof(T) == sizeof(ulong)) + return BitCast(a) == BitCast(b); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool operator !=(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast(a) != BitCast(b); + if (sizeof(T) == sizeof(ushort)) + return BitCast(a) != BitCast(b); + if (sizeof(T) == sizeof(uint)) + return BitCast(a) != BitCast(b); + if (sizeof(T) == sizeof(ulong)) + return BitCast(a) != BitCast(b); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool operator <(T a, T b) + { + if (typeof(T).GetEnumUnderlyingType() == typeof(byte)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ushort)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(uint)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ulong)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(sbyte)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(short)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(int)) + return BitCast(a) < BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(long)) + return BitCast(a) < BitCast(b); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool operator >(T a, T b) + { + if (typeof(T).GetEnumUnderlyingType() == typeof(byte)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ushort)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(uint)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ulong)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(sbyte)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(short)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(int)) + return BitCast(a) > BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(long)) + return BitCast(a) > BitCast(b); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool operator <=(T a, T b) + { + if (typeof(T).GetEnumUnderlyingType() == typeof(byte)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ushort)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(uint)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ulong)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(sbyte)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(short)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(int)) + return BitCast(a) <= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(long)) + return BitCast(a) <= BitCast(b); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool operator >=(T a, T b) + { + if (typeof(T).GetEnumUnderlyingType() == typeof(byte)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ushort)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(uint)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(ulong)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(sbyte)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(short)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(int)) + return BitCast(a) >= BitCast(b); + if (typeof(T).GetEnumUnderlyingType() == typeof(long)) + return BitCast(a) >= BitCast(b); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator |(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) | BitCast(b))); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) | BitCast(b))); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) | BitCast(b))); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) | BitCast(b))); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator &(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) & BitCast(b))); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) & BitCast(b))); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) & BitCast(b))); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) & BitCast(b))); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator ^(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) ^ BitCast(b))); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) ^ BitCast(b))); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) ^ BitCast(b))); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) ^ BitCast(b))); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator ++(T a) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) + 1)); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) + 1)); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) + 1)); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) + 1)); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator --(T a) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) - 1)); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) - 1)); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) - 1)); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) - 1)); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator ~(T a) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)~BitCast(a)); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)~BitCast(a)); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)~BitCast(a)); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)~BitCast(a)); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + /// Convert from int to enum, unchecked: value will be truncated if out of underlying bounds + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public static unsafe T CreateTruncating(int value) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)value); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)value); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)value); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)value); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + } + + extension(T value) where T : unmanaged, Enum + { + /// Convert this enum to int, unchecked: value will be truncated if out of int bounds + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public unsafe int ToIntTruncating() + { + if (sizeof(T) == sizeof(byte)) + return (int)BitCast(value); + if (sizeof(T) == sizeof(ushort)) + return (int)BitCast(value); + if (sizeof(T) == sizeof(uint)) + return (int)BitCast(value); + if (sizeof(T) == sizeof(ulong)) + return (int)BitCast(value); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + /// Left-shift this value: 1 << value, ie return a mask containing this value. + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public unsafe T ShiftLeft() + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(1u << (byte)BitCast(value))); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(1u << (byte)BitCast(value))); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(1u << (byte)BitCast(value))); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(1ul << (byte)BitCast(value))); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + /// Does the mask have only a single bit set? + /// (Mask / bit-field / [Flags] enums only.) + public unsafe bool IsPow2 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + if (sizeof(T) == sizeof(byte)) + return BitOperations.IsPow2(BitCast(value)); + if (sizeof(T) == sizeof(ushort)) + return BitOperations.IsPow2(BitCast(value)); + if (sizeof(T) == sizeof(uint)) + return BitOperations.IsPow2(BitCast(value)); + if (sizeof(T) == sizeof(ulong)) + return BitOperations.IsPow2(BitCast(value)); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + } + + /// If the mask has only a single bit set, get its index. + /// (Mask / bit-field / [Flags] enums only.) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe bool TryGetBitIndex(out byte index) + { + if (sizeof(T) == sizeof(byte)) + return BitOperations.TryGetBitIndex(BitCast(value), out index); + if (sizeof(T) == sizeof(ushort)) + return BitOperations.TryGetBitIndex(BitCast(value), out index); + if (sizeof(T) == sizeof(uint)) + return BitOperations.TryGetBitIndex(BitCast(value), out index); + if (sizeof(T) == sizeof(ulong)) + return BitOperations.TryGetBitIndex(BitCast(value), out index); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + } +} +} + +namespace Brutal.Enums.AdditionOperators +{ +/// Extension operators for enums, allowing for generic arithmetic +public static class EnumAdditionOperators +{ + extension(T) where T : unmanaged, Enum + { + /// Binary addition operators, for writing generic code. + ///
+ /// Do not use in non-generic code, as enums normally can only operate with their underlying type, not themselves, + /// and we don't want to inadvertently inject that functionality in the language. + ///
+ /// So eg a byte enum will define TEnum + byte and byte + TEnum operators, but not a TEnum + TEnum operator. + /// We cannot define a TEnum + TUnderlying operator, as we have no way of generically accessing TUnderlying. + ///
+ /// We could define e.g. TEnum + long, but that would be misleading as long might not be the correct size. + /// TEnum + TEnum actually _is_ the correct size, if not the correct type. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator +(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) + BitCast(b))); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) + BitCast(b))); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) + BitCast(b))); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) + BitCast(b))); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + /// Binary addition operators, for writing generic code. + ///
+ /// Do not use in non-generic code, as enums normally can only operate with their underlying type, not themselves, + /// and we don't want to inadvertently inject that functionality in the language. + ///
+ /// So eg a byte enum will define TEnum + byte and byte + TEnum operators, but not a TEnum + TEnum operator. + /// We cannot define a TEnum + TUnderlying operator, as we have no way of generically accessing TUnderlying. + ///
+ /// We could define e.g. TEnum + long, but that would be misleading as long might not be the correct size. + /// TEnum + TEnum actually _is_ the correct size, if not the correct type. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe T operator -(T a, T b) + { + if (sizeof(T) == sizeof(byte)) + return BitCast((byte)(BitCast(a) - BitCast(b))); + if (sizeof(T) == sizeof(ushort)) + return BitCast((ushort)(BitCast(a) - BitCast(b))); + if (sizeof(T) == sizeof(uint)) + return BitCast((uint)(BitCast(a) - BitCast(b))); + if (sizeof(T) == sizeof(ulong)) + return BitCast((ulong)(BitCast(a) - BitCast(b))); + + throw new NotSupportedException($"unsupported type {typeof(T)} of size {sizeof(T)}"); + } + + } +} +} +// csharpier-ignore-end diff --git a/Brutal.Core/Enums/EnumExtensions.cs b/Brutal.Core/Enums/EnumExtensions.cs new file mode 100644 index 0000000..6e7550c --- /dev/null +++ b/Brutal.Core/Enums/EnumExtensions.cs @@ -0,0 +1,72 @@ +namespace Brutal.Enums; + +public static class EnumExtensions +{ + /// + /// All the methods here are only relevant for [Flags] enums + /// (except for , which is only relevant for _non_-[Flags] enums). + /// + /// Terms: + /// - A flag represents a single bit. + /// - A mask represents a combination of bits (compound enum value). + /// + extension(ref T @this) + where T : unmanaged, Enum + { + /// (Mask / bit-field / [Flags] enums only.) + /// Add (set) the other flag/mask to this mask. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T Add(T other) + { + @this |= other; + return @this; + } + + /// (Mask / bit-field / [Flags] enums only.) + /// Remove (unset) the other flag/mask from this mask. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T Remove(T other) + { + @this &= ~other; + return @this; + } + + /// (Mask / bit-field / [Flags] enums only.) + /// Add/remove (set/unset) the other flag/mask to/from this mask. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public T Set(T other, bool enabled) + { + return enabled ? @this.Add(other) : @this.Remove(other); + } + } + + extension(T @this) + where T : unmanaged, Enum + { + /// + /// (Mask / bit-field / [Flags] enums only.) + /// Does this mask entirely contain ? + /// Ie, does this mask contain all the flags in ? + ///
+ /// Similarly to , this method returns true if the set of bits + /// represented by is empty, even if the current mask is empty. + ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool ContainsAll(T other) + { + return (@this & other) == other; // same as @this.HasFlag(mask); + } + + /// (Mask / bit-field / [Flags] enums only.) + /// Does this mask contain any of the bits in ? + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool ContainsAny(T other) + { + return (@this & other) != default; + } + + /// Return an containing this value. + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public EnumMask ToMask() => new(@this); + } +} diff --git a/Brutal.Core/Enums/EnumFormatting.cs b/Brutal.Core/Enums/EnumFormatting.cs new file mode 100644 index 0000000..243398b --- /dev/null +++ b/Brutal.Core/Enums/EnumFormatting.cs @@ -0,0 +1,129 @@ +using System.Buffers; +using System.Diagnostics.CodeAnalysis; + +namespace Brutal.Enums; + +public static class EnumUtf8Ex +{ + extension(Enum) + { + /// + /// UTF8 version + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryFormat( + T value, + Span destination, + out int bytesWritten, + [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan format = default + ) + where T : unmanaged, Enum + { + return TryFormatUnconstrained(value, destination, out bytesWritten, format); + } + + /// + /// UTF8 version, unconstrained + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryFormatUnconstrained( + TEnum value, + Span destination, + out int bytesWritten, + [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan format = default + ) + { + if (!typeof(TEnum).IsEnum) + throw new ArgumentException($"Type {typeof(TEnum)} is not an enum."); + + // try with a fixed-sized span first + Span utf16 = stackalloc char[256]; + if (TryFormatUnconstrained(null, value, utf16, out var charsWritten, format)) + return TryGetBytes(utf16[..charsWritten], destination, out bytesWritten); + + // fixed-sized pass failed: check if destination has more room available + if (destination.Length > utf16.Length) + { + // try again with a bigger buffer + var array16 = ArrayPool.Shared.Rent(destination.Length); // UTF16 can't be larger than UTF8 + try + { + utf16 = array16; + if (TryFormatUnconstrained(null, value, utf16, out charsWritten, format)) + return TryGetBytes(utf16[..charsWritten], destination, out bytesWritten); + } + finally + { + ArrayPool.Shared.Return(array16); + } + } + + bytesWritten = 0; + return false; + + // copy from Brutal.Strings.Utf8.TryGetBytes, which we can't reference from Common + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool TryGetBytes(ReadOnlySpan chars, Span destination, out int bytesWritten) + { + if ( + System.Text.Unicode.Utf8.FromUtf16(chars, destination, out _, out bytesWritten) + == OperationStatus.Done + ) + return true; + bytesWritten = 0; + return false; + } + } + } + + #region UnsafeAccessor for TryFormatUnconstrained + + extension(Enum) + { + /// + /// UTF16 version, unconstrained + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryFormatUnconstrained( + TEnum value, + Span destination, + out int charsWritten, + [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan format = default + ) + { + if (!typeof(TEnum).IsEnum) + throw new ArgumentException($"Type {typeof(TEnum)} is not an enum."); + + return TryFormatUnconstrained(null, value, destination, out charsWritten, format); + } + } + + [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = nameof(TryFormatUnconstrained))] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static extern bool TryFormatUnconstrained( + Enum? _, // required by [UnsafeAccessor] type-matching + TEnum value, + Span destination, + out int charsWritten, + [StringSyntax(StringSyntaxAttribute.EnumFormat)] ReadOnlySpan format = default + ); + + #endregion +} + +public static class EnumUtf8Extensions +{ + /// + /// + /// Expose Enum.TryFormat() as a member function, to emulate for enums, + /// and simplify generic support. + /// is ignored. + public static bool TryFormat( + this T value, + Span destination, + out int bytesWritten, + ReadOnlySpan format = default, + IFormatProvider? provider = null + ) + where T : unmanaged, Enum + { + return Enum.TryFormat(value, destination, out bytesWritten, format); + } +} diff --git a/Brutal.Core/Enums/EnumMask.cs b/Brutal.Core/Enums/EnumMask.cs new file mode 100644 index 0000000..6e81060 --- /dev/null +++ b/Brutal.Core/Enums/EnumMask.cs @@ -0,0 +1,259 @@ +using System.Collections.Concurrent; +using System.Diagnostics.CodeAnalysis; +using System.Numerics; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.Enums; + +/// Represents a mask for a regular enum, ie turns a non-[Flags] enum into a [Flags] enum. +[SuppressMessage("ReSharper", "StaticMemberInGenericType")] +public struct EnumMask : IEquatable>, IBitwiseOperators, EnumMask, EnumMask> + where T : unmanaged, Enum +{ + public static readonly int BitCount = Unsafe.SizeOf() * 8; + + /// A mask with no flags set. + public static readonly EnumMask Empty = default; + + /// A mask with all the bits set. + public static readonly EnumMask Full = FromMask(~default(T)); + + /// A mask with all the known flags set. + public static readonly EnumMask KnownFlags; + + static EnumMask() + { + if (Enum.IsBitMask) + throw new NotSupportedException($"{typeof(T)} is already a [Flags] enum!"); + + if (Enum.MinValue < default(T)) + throw new NotSupportedException( + $"{typeof(T)}: unsupported enum member range, value {Enum.MinValue} ({Enum.MinValue:d}) is negative, only positive values are supported." + ); + if (Enum.MaxValue >= Enum.CreateTruncating(BitCount)) + throw new NotSupportedException( + $"{typeof(T)}: unsupported enum member range, value {Enum.MaxValue} ({Enum.MaxValue:d}) is bigger than the underlying size ({BitCount})." + ); + + // do these last in case T is non-compliant + KnownFlags = new(Enum.Values); + BitNames = ComputeBitNames(); + } + + T _value; + + /// Create a mask from a bit mask, ie no shifting. + public static EnumMask FromMask(T mask) + { + EnumMask result; + result._value = mask; + return result; + } + + /// Create a mask from a flag, ie shifting it. + public static EnumMask FromFlag(T flag) => new(flag); + + /// Create a mask from a flag, ie shifting it. + public EnumMask(T flag) + { + _value = flag.ShiftLeft(); // 1 << flag + } + + /// Create a mask with the given flags set. + public EnumMask(params ReadOnlySpan flags) + { + foreach (var flag in flags) + _value |= flag.ShiftLeft(); // 1 << flag + } + + public static implicit operator EnumMask(T flag) => new(flag); + + #region this[flag/mask] accessors + + /// Get/set the value of a flag. + public bool this[T flag] + { + get => Contains(flag); + set => Set(flag, value); + } + + /// Get/set the value of a mask. + public bool this[EnumMask mask] + { + get => ContainsAll(mask); + set => Set(mask, value); + } + + #endregion + + #region operators + + public static EnumMask operator |(EnumMask a, EnumMask b) => FromMask(a._value | b._value); + + public static EnumMask operator &(EnumMask a, EnumMask b) => FromMask(a._value & b._value); + + public static EnumMask operator ^(EnumMask a, EnumMask b) => FromMask(a._value ^ b._value); + + public static EnumMask operator ~(EnumMask a) => FromMask(~a._value); + + #endregion + + #region Contains/Add/Remove/Set(flag) + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool Contains(T flag) => _value.ContainsAny(flag.ShiftLeft()); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public EnumMask Add(T flag) + { + _value.Add(flag.ShiftLeft()); + return this; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public EnumMask Remove(T flag) + { + _value.Remove(flag.ShiftLeft()); + return this; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public EnumMask Set(T flag, bool enabled) => enabled ? Add(flag) : Remove(flag); + + #endregion + + #region Contains/Add/Remove/Set(mask) + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool ContainsAll(EnumMask mask) => _value.ContainsAll(mask._value); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining), Pure] + public bool ContainsAny(EnumMask mask) => _value.ContainsAny(mask._value); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public EnumMask Add(EnumMask mask) + { + _value.Add(mask._value); + return this; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public EnumMask Remove(EnumMask mask) + { + _value.Remove(mask._value); + return this; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public EnumMask Set(EnumMask mask, bool enabled) => enabled ? Add(mask) : Remove(mask); + + #endregion + + /// Is the mask empty? ie no bits set. + public bool IsEmpty => _value == default; + + /// Is the mask full? ie all bits set. + public bool IsFull => _value == ~default(T); + + /// Does the mask have only a single bit set? + public bool IsPow2 => _value.IsPow2; + + /// If the mask has only a single bit set, return it (ie its index). + public bool TryGetSingleFlag(out T flag) + { + var result = _value.TryGetBitIndex(out var index); + flag = Enum.CreateTruncating(index); + return result; + } + + /// Return the inverse of this mask, ie all bits flipped. + public EnumMask Inversed => FromMask(~_value); + + #region ToString() - TODO: ISpanFormattable etc + + public static readonly string[] BitNames; + + static string[] ComputeBitNames() + { + var names = new string?[BitCount]; + + // set names for known bits + foreach (var (value, name) in Enum.Pairs) + { + names[value.ToIntTruncating()] = name; + } + + // unknown bits = integer value + for (var i = 0; i < BitCount; i++) + { + names[i] ??= i.ToString(); + } + + return names!; + } + + static readonly ConcurrentDictionary ToStringCache = new(); + + public override string ToString() + { + // try to get string from cache + if (ToStringCache.TryGetValue(_value, out var s)) + { + return s; + } + + if (IsEmpty) + return "(empty)"; + if (IsFull) + return "(full)"; + + // compute string and cache it + using var tmpBitNames = SpanOwner.Allocate(BitCount); + var tmpBitNameCount = 0; + for (var i = 0; i < BitCount; i++) + if (Contains(Enum.CreateTruncating(i))) + tmpBitNames.Span[tmpBitNameCount++] = BitNames[i]; + ToStringCache[_value] = s = string.Join(", ", tmpBitNames.Span[..tmpBitNameCount]); + return s; + } + + #endregion + + #region equality members + + public bool Equals(EnumMask other) + { + return _value == other._value; // don't use Equals() as it boxes + } + + public override bool Equals(object? obj) + { + return obj is EnumMask other && Equals(other); + } + + public override int GetHashCode() + { + return _value.GetHashCode(); + } + + public static bool operator ==(EnumMask left, EnumMask right) + { + return left._value == right._value; + } + + public static bool operator !=(EnumMask left, EnumMask right) + { + return left._value != right._value; + } + + #endregion +} diff --git a/Brutal.Core/Extensions/BitOperationsEx.cs b/Brutal.Core/Extensions/BitOperationsEx.cs new file mode 100644 index 0000000..b6856a0 --- /dev/null +++ b/Brutal.Core/Extensions/BitOperationsEx.cs @@ -0,0 +1,27 @@ +namespace System.Numerics; + +public static class BitOperationsEx +{ + extension(BitOperations) + { + /// + /// If has only a single bit set, output its , otherwise return false. + /// + /// A bit-mask value that potentially only contains a single bit. + /// The index of the single bit, if true. + /// Whether contains a single bit. + public static bool TryGetBitIndex(T mask, out byte index) + where T : unmanaged, IBinaryInteger + { + if (!T.IsPow2(mask)) + { + index = 0; + return false; + } + + var tzc = T.TrailingZeroCount(mask); + index = byte.CreateTruncating(tzc); + return true; + } + } +} diff --git a/Brutal.Core/Extensions/SpanExtensions.cs b/Brutal.Core/Extensions/SpanExtensions.cs new file mode 100644 index 0000000..aebcc16 --- /dev/null +++ b/Brutal.Core/Extensions/SpanExtensions.cs @@ -0,0 +1,35 @@ +using CommunityToolkit.HighPerformance; + +namespace Brutal.Extensions; + +public static class SpanExtensions +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool Contains(this Span span, T value) + where T : unmanaged, Enum + { + return ((ReadOnlySpan)span).Contains(value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool Contains(this ReadOnlySpan span, T value) + where T : unmanaged, Enum + { + return sizeof(T) switch + { + sizeof(byte) => span.Cast().Contains(Unsafe.BitCast(value)), + sizeof(short) => span.Cast().Contains(Unsafe.BitCast(value)), + sizeof(int) => span.Cast().Contains(Unsafe.BitCast(value)), + sizeof(long) => span.Cast().Contains(Unsafe.BitCast(value)), + _ => throw new NotSupportedException($"Enum of size {sizeof(T)} is not supported."), + }; + } + + /// + public static bool TryCopyTo(this ReadOnlySpan value, Span destination, out int elementsWritten) + { + var result = value.TryCopyTo(destination); + elementsWritten = result ? value.Length : 0; + return result; + } +} diff --git a/Brutal.Core/Extensions/Utf8Ex.cs b/Brutal.Core/Extensions/Utf8Ex.cs new file mode 100644 index 0000000..b8778bf --- /dev/null +++ b/Brutal.Core/Extensions/Utf8Ex.cs @@ -0,0 +1,29 @@ +namespace System.Text.Unicode; + +public static class Utf8Ex +{ + extension(Utf8) + { + /// + public static bool TryFormat( + T value, + Span destination, + out int bytesWritten, + string? format = null, + IFormatProvider? provider = null + ) + { + // Hijack TryWriteInterpolatedStringHandler, which handles all cases, + // including some enum internals we don't have access to. + var handler = new Utf8.TryWriteInterpolatedStringHandler(0, 1, destination, provider, out _); + if (format == null) + handler.AppendFormatted(value); + else + handler.AppendFormatted(value, format); + + // handler.AppendFormatted() already returns a success bool; + // we only call TryWrite() to access bytesWritten, which is internal + return Utf8.TryWrite([], ref handler, out bytesWritten); + } + } +} diff --git a/Brutal.Core/GlobalUsings.cs b/Brutal.Core/GlobalUsings.cs new file mode 100644 index 0000000..879ac37 --- /dev/null +++ b/Brutal.Core/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using System.Diagnostics.Contracts; +global using System.Runtime.CompilerServices; diff --git a/Brutal.Core/Interfaces/INullable.cs b/Brutal.Core/Interfaces/INullable.cs new file mode 100644 index 0000000..026d49f --- /dev/null +++ b/Brutal.Core/Interfaces/INullable.cs @@ -0,0 +1,27 @@ +namespace Brutal; + +/// +/// Interface for a type that can be null +/// +public interface INullable +{ + /// + /// Returns true if the instance is null + /// + public bool IsNull(); +} + +/// +/// Extensions for INullable +/// +public static class NullableExtensions +{ + /// + /// Returns true if the instance is not null + /// + public static bool IsNotNull(this T nullable) + where T : INullable + { + return !nullable.IsNull(); + } +} diff --git a/Brutal.Core/Interfaces/ISpanLike.cs b/Brutal.Core/Interfaces/ISpanLike.cs new file mode 100644 index 0000000..abf805f --- /dev/null +++ b/Brutal.Core/Interfaces/ISpanLike.cs @@ -0,0 +1,22 @@ +using Brutal.Pointers; + +namespace Brutal; + +public interface ISpanLike : INullable +{ + public Ptr Ptr { get; } + public ElementCount Length { get; } + public ByteSize Stride { get; } + public bool IsEmpty { get; } + + public Span AsSpan() + where T : unmanaged; +} + +public interface ISpanLike : ISpanLike + where T : unmanaged +{ + public new Ptr Ptr { get; } + + public Span AsSpan(); +} diff --git a/Brutal.Core/Numerics/IAssociativeArithmeticOperators.cs b/Brutal.Core/Numerics/IAssociativeArithmeticOperators.cs new file mode 100644 index 0000000..c8a3ce3 --- /dev/null +++ b/Brutal.Core/Numerics/IAssociativeArithmeticOperators.cs @@ -0,0 +1,32 @@ +using System.Numerics; + +namespace Brutal.Numerics; + +public interface IArithmeticOperators + : IAdditionOperators, + ISubtractionOperators, + IMultiplyOperators, + IDivisionOperators + where TSelf : IArithmeticOperators?; + +public interface IAssociativeArithmeticOperators : IArithmeticOperators + where TSelf : IAssociativeArithmeticOperators? +{ + static abstract TResult operator +(TOther left, TSelf right); + + static abstract TResult operator -(TOther left, TSelf right); + + static abstract TResult operator *(TOther left, TSelf right); + + static abstract TResult operator /(TOther left, TSelf right); + +#pragma warning disable CS8604 // Possible null reference argument. + static virtual TResult operator checked +(TOther left, TSelf right) => unchecked(left + right); + + static virtual TResult operator checked -(TOther left, TSelf right) => unchecked(left - right); + + static virtual TResult operator checked *(TOther left, TSelf right) => unchecked(left * right); + + static virtual TResult operator checked /(TOther left, TSelf right) => unchecked(left / right); +#pragma warning restore CS8604 // Possible null reference argument. +} diff --git a/Brutal.Core/Platform.cs b/Brutal.Core/Platform.cs new file mode 100644 index 0000000..3d67d00 --- /dev/null +++ b/Brutal.Core/Platform.cs @@ -0,0 +1,46 @@ +namespace Brutal; + +/// +/// Utility class to determine the current platform +/// +public static class Platform +{ + /// Enum representing supported platform families /// + public enum Family + { + Windows, + Linux, + MacOS, + } + + /// The current runtime platform + public static readonly Family CurrentFamily; + + public static bool IsWindows => CurrentFamily == Family.Windows; + public static bool IsLinux => CurrentFamily == Family.Linux; + public static bool IsMacOS => CurrentFamily == Family.MacOS; + public static bool IsUnix => CurrentFamily.IsUnix(); + + static Platform() + { + if (OperatingSystem.IsWindows()) + CurrentFamily = Family.Windows; + else if (OperatingSystem.IsLinux()) + CurrentFamily = Family.Linux; + else if (OperatingSystem.IsMacOS()) + CurrentFamily = Family.MacOS; + else + throw new PlatformNotSupportedException("Unsupported platform"); + } +} + +public static class PlatformFamilyExtensions +{ + /// + /// Get the OperatingSystem instance for the given PlatformFamily + /// + public static bool IsUnix(this Platform.Family family) + { + return family is Platform.Family.Linux or Platform.Family.MacOS; + } +} diff --git a/Brutal.Core/Pointers/PointerExtensions.cs b/Brutal.Core/Pointers/PointerExtensions.cs new file mode 100644 index 0000000..ec23608 --- /dev/null +++ b/Brutal.Core/Pointers/PointerExtensions.cs @@ -0,0 +1,62 @@ +using System.Runtime.InteropServices; +using Brutal.Attributes; + +namespace Brutal.Pointers.Extensions; + +/// +/// Extensions for Span and ReadOnlySpan as pointers +/// +public static class PointerExtensions +{ + /// + /// Return the underlying pointer of span. Note this may be unsafe if the span refers to memory not allocated on the + /// native memory, as they may be relocated at any time due to generational Garbage Collections. Please review usage + /// to ensure only fixed native memory pointers are returned. + /// + /// Span of native memory + /// Unsafe pointer to block of memory + public static unsafe T* AsPointer(this Span span) + where T : unmanaged + { + return (T*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); + } + + /// + /// Return the underlying pointer of span. Note this may be unsafe if the span refers to memory not allocated on the + /// native memory, as they may be relocated at any time due to generational Garbage Collections. Please review usage + /// to ensure only fixed native memory pointers are returned. + /// + /// ReadOnlySpan of native memory + /// Unsafe pointer to block of memory + public static unsafe T* AsPointer(this ReadOnlySpan span) + where T : unmanaged + { + return (T*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); + } + + /// + /// Return the underlying pointer of span. Note this may be unsafe if the span refers to memory not allocated on the + /// native memory, as they may be relocated at any time due to generational Garbage Collections. Please review usage + /// to ensure only fixed native memory pointers are returned. + /// + /// Span of native memory + /// Unsafe pointer to block of memory + public static unsafe Ptr AsPtr(this Span span) + where T : unmanaged + { + return (T*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); + } + + /// + /// Return the underlying pointer of span. Note this may be unsafe if the span refers to memory not allocated on the + /// native memory, as they may be relocated at any time due to generational Garbage Collections. Please review usage + /// to ensure only fixed native memory pointers are returned. + /// + /// ReadOnlySpan of native memory + /// Unsafe pointer to block of memory + public static unsafe Ptr AsPtr([Fixed] this ReadOnlySpan span) + where T : unmanaged + { + return (T*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); + } +} diff --git a/Brutal.Core/Pointers/Ptr.cs b/Brutal.Core/Pointers/Ptr.cs new file mode 100644 index 0000000..010ae24 --- /dev/null +++ b/Brutal.Core/Pointers/Ptr.cs @@ -0,0 +1,103 @@ +using Brutal.Attributes; + +namespace Brutal.Pointers; + +/// +/// A wrapper for an untyped pointer. +/// +public readonly unsafe struct Ptr(void* pointer) : INullable, IEquatable +{ + /// + /// The raw void pointer. + /// + public void* Pointer => pointer; + + /// + /// Returns a new , offset by the given byte count. + /// + public Ptr Offset(ByteSize byteOffset) + { + return new Ptr((byte*)Pointer + byteOffset); + } + + /// + /// Converts the pointer to a Span of the given type and length. + /// + [return: Fixed] + public Span AsSpan(ElementCount length) + { + return new Span(Pointer, length); + } + + /// + /// Casts the pointer to a typed pointer. + /// + public Ptr Cast() + where TCastType : unmanaged + { + return new Ptr((TCastType*)Pointer); + } + + /// + public bool IsNull() + { + return Pointer == null; + } + + /// + /// Implicit conversion from void* to + /// + public static implicit operator Ptr(void* pointer) + { + return new Ptr(pointer); + } + + /// + /// Implicit conversion from to void*. + /// + public static implicit operator void*(Ptr ptr) + { + return ptr.Pointer; + } + + /// + /// Explicit conversion from nint to . + /// + public static explicit operator Ptr(nint ptr) + { + return new Ptr((void*)ptr); + } + + /// + /// Explicit cast to nint. + /// + public static explicit operator nint(Ptr ptr) + { + return (nint)ptr.Pointer; + } + + public bool Equals(Ptr other) + { + return Pointer == other.Pointer; + } + + public override bool Equals(object? obj) + { + return obj is Ptr other && Equals(other); + } + + public override int GetHashCode() + { + return ((nint)Pointer).GetHashCode(); + } + + public static bool operator ==(Ptr left, Ptr right) + { + return left.Equals(right); + } + + public static bool operator !=(Ptr left, Ptr right) + { + return !left.Equals(right); + } +} diff --git a/Brutal.Core/Pointers/PtrOfT.cs b/Brutal.Core/Pointers/PtrOfT.cs new file mode 100644 index 0000000..68e26f7 --- /dev/null +++ b/Brutal.Core/Pointers/PtrOfT.cs @@ -0,0 +1,130 @@ +using Brutal.Attributes; +using Brutal.Pointers.Extensions; + +namespace Brutal.Pointers; + +/// +/// A wrapper for a typed pointer. +/// +public readonly unsafe struct Ptr(TValueType* pointer) : INullable + where TValueType : unmanaged +{ + /// + /// The raw pointer of type . + /// + public TValueType* Pointer => pointer; + + /// + /// A reference to the first value at the pointer address. + /// + public ref TValueType Value => ref *Pointer; + + /// + /// Returns a new , offset by the given byte count. + /// + /// + /// + public Ptr Offset(ElementCount count) + { + return new Ptr(Pointer + count); + } + + /// + /// Converts the pointer to a of the given length. + /// + [return: Fixed] + public Span AsSpan(ElementCount length) + { + return new Span(Pointer, length); + } + + /// + /// Converts the pointer to an untyped . + /// + public Ptr AsPtr() + { + return new Ptr(Pointer); + } + + /// + /// Cast this pointer to a different type. + /// + /// + /// + public Ptr Cast() + where TCastType : unmanaged + { + return new Ptr((TCastType*)Pointer); + } + + /// + public bool IsNull() + { + return Pointer == null; + } + + /// + /// Gets a reference to the value at the given index. + /// + public ref TValueType this[int index] => ref Pointer[index]; + + /// + /// Implicit conversion from a to an untyped . + /// + public static implicit operator Ptr(Ptr ptr) + { + return ptr.AsPtr(); + } + + /// + /// Implicit conversion from a typed pointer to a . + /// + public static implicit operator Ptr(TValueType* pointer) + { + return new Ptr(pointer); + } + + /// + /// Implicit conversion from a to *. + /// + /// + /// + public static implicit operator TValueType*(Ptr ptr) + { + return ptr.Pointer; + } + + /// + /// Implicit conversion from a to void pointer. + /// + public static implicit operator void*(Ptr ptr) + { + return ptr.Pointer; + } + + public static implicit operator Ptr([Fixed] ReadOnlySpan span) + { + return span.AsPtr(); + } + + public static implicit operator Ptr([Fixed] Span span) + { + return span.AsPtr(); + } + + /// + /// Explicit cast from nint to Ptr. + /// + public static explicit operator Ptr(nint ptr) + { + return new Ptr((TValueType*)ptr); + } + + /// + /// Explicit cast to nint. + /// + public static explicit operator nint(Ptr ptr) + { + return (nint)ptr.Pointer; + } +} diff --git a/Brutal.Core/Pointers/PtrPtr.cs b/Brutal.Core/Pointers/PtrPtr.cs new file mode 100644 index 0000000..a6cb524 --- /dev/null +++ b/Brutal.Core/Pointers/PtrPtr.cs @@ -0,0 +1,90 @@ +using Brutal.Attributes; + +namespace Brutal.Pointers; + +/// +/// Wraps a pointer to a pointer. +/// +public readonly unsafe struct PtrPtr(void** pointerPointer) : INullable +{ + /// + /// The pointer-pointer. + /// + public void** Pointer => pointerPointer; + + /// + /// Convert the pointer to a span of pointers. + /// + [return: Fixed] + public Span AsSpan(ElementCount length) + { + // Ptr is equivalent to void*, + // So we can cast void** to Ptr*, + // Or so we will hope + return new Span((Ptr*)Pointer, length); + } + + /// + /// Convert the pointer to a span of pointers. + /// + public Span> AsSpan(ElementCount length) + where T : unmanaged + { + // Ptr is equivalent to T*, + // So we can cast void** to Ptr, + // Or so we will hope + return new Span>((Ptr*)Pointer, length); + } + + /// + public bool IsNull() + { + return Pointer == null; + } + + /// + /// Get the value of the pointer as a reference. + /// + public ref void* Value => ref *Pointer; + + /// + /// Access the pointer at the given index. + /// + public Ptr this[int index] + { + get => Pointer[index]; + set => Pointer[index] = value.Pointer; + } + + /// + /// Implicit conversion from void** to PtrPtr. + /// + public static implicit operator PtrPtr(void** address) + { + return new PtrPtr(address); + } + + /// + /// Implicit conversion from PtrPtr to void** + /// + public static implicit operator void**(PtrPtr ptr) + { + return ptr.Pointer; + } + + /// + /// Explicit conversion from nint to PtrPtr. + /// + public static explicit operator PtrPtr(nint ptr) + { + return new PtrPtr((void**)ptr); + } + + /// + /// Explicit cast to nint. + /// + public static explicit operator nint(PtrPtr ptr) + { + return (nint)ptr.Pointer; + } +} diff --git a/Brutal.Core/Pointers/PtrPtrOfT.cs b/Brutal.Core/Pointers/PtrPtrOfT.cs new file mode 100644 index 0000000..06412e8 --- /dev/null +++ b/Brutal.Core/Pointers/PtrPtrOfT.cs @@ -0,0 +1,84 @@ +namespace Brutal.Pointers; + +/// +/// Wrapper for a pointer to a pointer of type TValueType. +/// +public readonly unsafe struct PtrPtr(TValueType** address) : INullable + where TValueType : unmanaged +{ + /// + /// The pointer-pointer. + /// + public TValueType** Pointer => address; + + /// + /// Convert the pointer to a span of pointers of type TValueType. + /// + public Span> AsSpan(ElementCount length) + { + // Ptr is equivalent to TValueType*, + // So we can cast TValueType** to Ptr*, + // Or so we will hope + return new Span>((Ptr*)Pointer, length); + } + + /// + public bool IsNull() + { + return Pointer == null; + } + + /// + /// Get the value of the pointer as a reference. + /// + public ref TValueType* Value => ref *Pointer; + + /// + /// Access the pointer at the given index. + /// + public Ptr this[int index] + { + get => Pointer[index]; + set => Pointer[index] = value.Pointer; + } + + /// + /// Implicit conversion from void** to PtrPtr. + /// + public static implicit operator PtrPtr(TValueType** address) + { + return new PtrPtr(address); + } + + /// + /// Implicit conversion from PtrPtr to void**. + /// + public static implicit operator void**(PtrPtr ptr) + { + return (void**)ptr.Pointer; + } + + /// + /// Implicit conversion from PtrPtr to TValueType** + /// + public static implicit operator TValueType**(PtrPtr ptr) + { + return ptr.Pointer; + } + + /// + /// Explicit conversion from nint to PtrPtr. + /// + public static explicit operator PtrPtr(nint ptr) + { + return new PtrPtr((TValueType**)ptr); + } + + /// + /// Explicit cast to nint. + /// + public static explicit operator nint(PtrPtr ptr) + { + return (nint)ptr.Pointer; + } +} diff --git a/Brutal.Core/Types/Bool32.cs b/Brutal.Core/Types/Bool32.cs new file mode 100644 index 0000000..65732e5 --- /dev/null +++ b/Brutal.Core/Types/Bool32.cs @@ -0,0 +1,70 @@ +using Brutal.Extensions; + +namespace Brutal; + +/// +/// Represents a boolean value interoped as a 32-bit integer. +/// +public struct Bool32(bool value) : IUtf8SpanFormattable, ISpanFormattable +{ + private readonly int _value = value ? 1 : 0; + + /// + /// Implicit conversion to bool + /// + public static implicit operator bool(Bool32 b) + { + return b._value != 0; + } + + /// + /// Implicit conversion from bool + /// + public static implicit operator Bool32(bool b) + { + return new Bool32(b); + } + + #region string formatting: IUtf8SpanFormattable, ISpanFormattable, IFormattable + + private bool AsBool => _value != 0; + + /// + public override string ToString() + { + return AsBool.ToString(); // non-allocating + } + + /// + /// and are ignored. + public string ToString(string? format, IFormatProvider? formatProvider) + { + return AsBool.ToString(formatProvider); // non-allocating, ignores formatProvider / same as ToString() + } + + /// + /// and are ignored. + public bool TryFormat( + Span destination, + out int charsWritten, + ReadOnlySpan format = default, + IFormatProvider? provider = null + ) + { + return AsBool.TryFormat(destination, out charsWritten, format); + } + + /// + /// is ignored. + public bool TryFormat( + Span destination, + out int bytesWritten, + ReadOnlySpan format = default, + IFormatProvider? provider = null + ) + { + return AsBool.TryFormat(destination, out bytesWritten, format); + } + + #endregion +} diff --git a/Brutal.Core/Types/Bool8.cs b/Brutal.Core/Types/Bool8.cs new file mode 100644 index 0000000..b2c5928 --- /dev/null +++ b/Brutal.Core/Types/Bool8.cs @@ -0,0 +1,70 @@ +using Brutal.Extensions; + +namespace Brutal; + +/// +/// Represents a boolean value interoped as an 8-bit integer. +/// +public struct Bool8(bool value) : IUtf8SpanFormattable, ISpanFormattable +{ + private readonly byte _value = value ? (byte)1 : (byte)0; + + /// + /// Implicit conversion to bool + /// + public static implicit operator bool(Bool8 b) + { + return b._value != 0; + } + + /// + /// Implicit conversion from bool + /// + public static implicit operator Bool8(bool b) + { + return new Bool8(b); + } + + #region string formatting: IUtf8SpanFormattable, ISpanFormattable, IFormattable + + private bool AsBool => _value != 0; + + /// + public override string ToString() + { + return AsBool.ToString(); // non-allocating + } + + /// + /// and are ignored. + public string ToString(string? format, IFormatProvider? formatProvider) + { + return AsBool.ToString(formatProvider); // non-allocating, ignores formatProvider / same as ToString() + } + + /// + /// and are ignored. + public bool TryFormat( + Span destination, + out int charsWritten, + ReadOnlySpan format = default, + IFormatProvider? provider = null + ) + { + return AsBool.TryFormat(destination, out charsWritten, format); + } + + /// + /// is ignored. + public bool TryFormat( + Span destination, + out int bytesWritten, + ReadOnlySpan format = default, + IFormatProvider? provider = null + ) + { + return AsBool.TryFormat(destination, out bytesWritten, format); + } + + #endregion +} diff --git a/Brutal.Core/Types/BoolExtensions.cs b/Brutal.Core/Types/BoolExtensions.cs new file mode 100644 index 0000000..c82d8c9 --- /dev/null +++ b/Brutal.Core/Types/BoolExtensions.cs @@ -0,0 +1,138 @@ +using System.Buffers; +using System.Buffers.Text; + +namespace Brutal.Extensions; + +public static class BoolExtensions +{ + /// + /// + /// bool doesn't implement IUtf8SpanFormattable for some reason: this emulates it, to simplify our autogenerated code. + /// Also, this handles the G/l formats, which non-UTF8 formatting doesn't handle: + /// https://learn.microsoft.com/en-us/dotnet/api/system.buffers.text.utf8formatter.tryformat?view=net-9.0#system-buffers-text-utf8formatter-tryformat(system-boolean-system-span((system-byte))-system-int32@-system-buffers-standardformat) + /// + public static bool TryFormat( + this bool value, + Span destination, + out int bytesWritten, + ReadOnlySpan format = default + ) + { + return Utf8Formatter.TryFormat(value, destination, out bytesWritten, StandardFormat.Parse(format)); + } + + /// + public static bool TryFormat( + this bool value, + Span destination, + out int charsWritten, + ReadOnlySpan format = default + ) + { + return TryFormat(value, destination, out charsWritten, StandardFormat.Parse(format)); + } + + /// + /// + /// bool doesn't implement ISpanFormattable for some reason: this emulates it, to simplify our autogenerated code. + /// Also, this handles the G/l formats, which non-UTF8 formatting doesn't handle: + /// https://learn.microsoft.com/en-us/dotnet/api/system.buffers.text.utf8formatter.tryformat?view=net-9.0#system-buffers-text-utf8formatter-tryformat(system-boolean-system-span((system-byte))-system-int32@-system-buffers-standardformat) + /// + public static bool TryFormat( + this bool value, + Span destination, + out int charsWritten, + StandardFormat format = default + ) + { + // Copied from https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs + // and adapted from Span to Span. + + char symbol = FormattingHelpers.GetSymbolOrDefault(format, 'G'); + + if (value) + { + if (symbol == 'G') + { + if (!"True".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else if (symbol == 'l') + { + if (!"true".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else + { + goto BadFormat; + } + + charsWritten = 4; + return true; + } + else + { + if (symbol == 'G') + { + if (!"False".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else if (symbol == 'l') + { + if (!"false".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else + { + goto BadFormat; + } + + charsWritten = 5; + return true; + } + + BadFormat: + { + //ThrowHelper.ThrowFormatException_BadFormatSpecifier(); + throw new FormatException("Format specifier was invalid."); + } + + BufferTooSmall: + { + charsWritten = 0; + return false; + } + } + + // Copied from internal: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs + static class FormattingHelpers + { + /// + /// Returns the symbol contained within the standard format. If the standard format + /// has not been initialized, returns the provided fallback symbol. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static char GetSymbolOrDefault(in StandardFormat format, char defaultSymbol) + { + // This is equivalent to the line below, but it is written in such a way + // that the JIT is able to perform more optimizations. + // + // return (format.IsDefault) ? defaultSymbol : format.Symbol; + + char symbol = format.Symbol; + if (symbol == default && format.Precision == default) + { + symbol = defaultSymbol; + } + return symbol; + } + } +} diff --git a/Brutal.Core/Types/ByteSize.cs b/Brutal.Core/Types/ByteSize.cs new file mode 100644 index 0000000..2982047 --- /dev/null +++ b/Brutal.Core/Types/ByteSize.cs @@ -0,0 +1,550 @@ +using System.ComponentModel; +using System.Numerics; +using System.Runtime.InteropServices; +using Brutal.Numerics; + +namespace Brutal; + +public interface IByteSize +{ + public nuint Bytes { get; } + public nuint Kilobytes { get; } + public nuint Megabytes { get; } + public nuint Gigabytes { get; } +} + +public interface IByteSize : IByteSize, IArithmeticOperators + where TSelf : IByteSize + where TBackend : unmanaged, IUnsignedNumber +{ + public TBackend Value { get; } + + static abstract implicit operator TSelf(ByteSize value); + + static abstract explicit operator TSelf(TBackend value); + + static abstract explicit operator TSelf(int value); + + static abstract TSelf operator *(TSelf left, ElementCount right); + + static abstract TSelf operator *(ElementCount right, TSelf left); + + // IAssociativeArithmeticOperators + static abstract TSelf operator +(TSelf left, TBackend right); + + static abstract TSelf operator -(TSelf left, TBackend right); + + static abstract TSelf operator *(TSelf left, TBackend right); + + static abstract TSelf operator /(TSelf left, TBackend right); + + static abstract TSelf operator +(TBackend left, TSelf right); + + static abstract TSelf operator -(TBackend left, TSelf right); + + static abstract TSelf operator *(TBackend left, TSelf right); + + static abstract TSelf operator /(TBackend left, TSelf right); + + // IAssociativeArithmeticOperators + static abstract TSelf operator +(TSelf left, int right); + + static abstract TSelf operator -(TSelf left, int right); + + static abstract TSelf operator *(TSelf left, int right); + + static abstract TSelf operator /(TSelf left, int right); + + static abstract TSelf operator +(int left, TSelf right); + + static abstract TSelf operator -(int left, TSelf right); + + static abstract TSelf operator *(int left, TSelf right); + + static abstract TSelf operator /(int left, TSelf right); +} + +/// +/// A specialized 32-bit version of , to ensure consistency across platforms. +/// Prefer in client code where possible. +/// TODO: ByteSize32 should be demoted to a .Interop namespace to make is less discoverable. +/// +public readonly record struct ByteSize32(uint Value) + : IByteSize, + IAssociativeArithmeticOperators, + IAssociativeArithmeticOperators +{ + #region converters + + public static implicit operator ByteSize(ByteSize32 value) => new(value.Value); + + public static implicit operator ByteSize32(ByteSize value) => new(checked((uint)value.Value)); + + public static implicit operator int(ByteSize32 value) => (int)value.Value; + + public static explicit operator ByteSize32(int value) => new(checked((uint)value)); + + public static explicit operator ByteSize32(uint value) => new(value); + + #endregion + + #region arithmetic operators + + public static unsafe byte* operator +(byte* left, ByteSize32 right) => left + right.Value; + + public static ByteSize32 operator +(ByteSize32 left, ByteSize32 right) => left.Value + right; + + public static ByteSize32 operator -(ByteSize32 left, ByteSize32 right) => left.Value - right; + + public static ByteSize32 operator *(ByteSize32 left, ByteSize32 right) => left.Value * right; + + public static ByteSize32 operator /(ByteSize32 left, ByteSize32 right) => left.Value / right; + + public static ByteSize32 operator +(ByteSize32 left, uint right) => (ByteSize32)(left.Value + right); + + public static ByteSize32 operator -(ByteSize32 left, uint right) => (ByteSize32)(left.Value - right); + + public static ByteSize32 operator *(ByteSize32 left, uint right) => (ByteSize32)(left.Value * right); + + public static ByteSize32 operator /(ByteSize32 left, uint right) => (ByteSize32)(left.Value / right); + + public static ByteSize32 operator +(uint left, ByteSize32 right) => (ByteSize32)(left + right.Value); + + public static ByteSize32 operator -(uint left, ByteSize32 right) => (ByteSize32)(left - right.Value); + + public static ByteSize32 operator *(uint left, ByteSize32 right) => (ByteSize32)(left * right.Value); + + public static ByteSize32 operator /(uint left, ByteSize32 right) => (ByteSize32)(left / right.Value); + + public static ByteSize32 operator *(ByteSize32 left, ElementCount right) => left * (uint)right; + + public static ByteSize32 operator *(ElementCount left, ByteSize32 right) => (uint)left * right; + + public static ByteSize32 operator +(ByteSize32 left, int right) => left + (uint)right; + + public static ByteSize32 operator -(ByteSize32 left, int right) => left - (uint)right; + + public static ByteSize32 operator *(ByteSize32 left, int right) => left * (uint)right; + + public static ByteSize32 operator /(ByteSize32 left, int right) => left / (uint)right; + + public static ByteSize32 operator +(int left, ByteSize32 right) => (uint)left + right; + + public static ByteSize32 operator -(int left, ByteSize32 right) => (uint)left - right; + + public static ByteSize32 operator *(int left, ByteSize32 right) => (uint)left * right; + + public static ByteSize32 operator /(int left, ByteSize32 right) => (uint)left / right; + + #endregion + + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => ((ByteSize)this).ToString(); + + public nuint Bytes => Value; + public nuint Kilobytes => Bytes / ByteSize.KILOBYTES_TO_BYTES; + public nuint Megabytes => Bytes / ByteSize.MEGABYTES_TO_BYTES; + public nuint Gigabytes => Bytes / ByteSize.GIGABYTES_TO_BYTES; +} + +/// +/// A specialized 64-bit version of , to ensure consistency across platforms. +/// Prefer in client code where possible. +/// TODO: ByteSize64 should be demoted to a .Interop namespace to make is less discoverable. +/// +public readonly record struct ByteSize64(ulong Value) + : IByteSize, + IAssociativeArithmeticOperators, + IAssociativeArithmeticOperators +{ + #region converters + + public static implicit operator ByteSize(ByteSize64 value) => new(value.Bytes); + + public static implicit operator ByteSize64(ByteSize value) => new(value.Value); + + public static implicit operator int(ByteSize64 value) => (int)value.Value; + + public static explicit operator ByteSize64(int value) => new((ulong)value); + + public static explicit operator ByteSize64(ulong value) => new(value); + + #endregion + + #region arithmetic operators + + public static unsafe byte* operator +(byte* left, ByteSize64 right) => left + right.Value; + + public static ByteSize64 operator +(ByteSize64 left, ByteSize64 right) => left.Value + right; + + public static ByteSize64 operator -(ByteSize64 left, ByteSize64 right) => left.Value - right; + + public static ByteSize64 operator *(ByteSize64 left, ByteSize64 right) => left.Value * right; + + public static ByteSize64 operator /(ByteSize64 left, ByteSize64 right) => left.Value / right; + + public static ByteSize64 operator +(ByteSize64 left, ulong right) => (ByteSize64)(left.Value + right); + + public static ByteSize64 operator -(ByteSize64 left, ulong right) => (ByteSize64)(left.Value - right); + + public static ByteSize64 operator *(ByteSize64 left, ulong right) => (ByteSize64)(left.Value * right); + + public static ByteSize64 operator /(ByteSize64 left, ulong right) => (ByteSize64)(left.Value / right); + + public static ByteSize64 operator +(ulong left, ByteSize64 right) => (ByteSize64)(left + right.Value); + + public static ByteSize64 operator -(ulong left, ByteSize64 right) => (ByteSize64)(left - right.Value); + + public static ByteSize64 operator *(ulong left, ByteSize64 right) => (ByteSize64)(left * right.Value); + + public static ByteSize64 operator /(ulong left, ByteSize64 right) => (ByteSize64)(left / right.Value); + + public static ByteSize64 operator *(ByteSize64 left, ElementCount right) => left * (ulong)right; + + public static ByteSize64 operator *(ElementCount left, ByteSize64 right) => (ulong)left * right; + + public static ByteSize64 operator +(ByteSize64 left, int right) => left + (ulong)right; + + public static ByteSize64 operator -(ByteSize64 left, int right) => left - (ulong)right; + + public static ByteSize64 operator *(ByteSize64 left, int right) => left * (ulong)right; + + public static ByteSize64 operator /(ByteSize64 left, int right) => left / (ulong)right; + + public static ByteSize64 operator +(int left, ByteSize64 right) => (ulong)left + right; + + public static ByteSize64 operator -(int left, ByteSize64 right) => (ulong)left - right; + + public static ByteSize64 operator *(int left, ByteSize64 right) => (ulong)left * right; + + public static ByteSize64 operator /(int left, ByteSize64 right) => (ulong)left / right; + + #endregion + + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => ((ByteSize)this).ToString(); + + public nuint Bytes => (nuint)Value; + public nuint Kilobytes => Bytes / ByteSize.KILOBYTES_TO_BYTES; + public nuint Megabytes => Bytes / ByteSize.MEGABYTES_TO_BYTES; + public nuint Gigabytes => Bytes / ByteSize.GIGABYTES_TO_BYTES; +} + +/// +/// adapts to the target platform's natural pointer size, +/// using as a storage, +/// like size_t in C++. +/// +/// +/// Prefer using this over and , +/// which are only meant for interoping with APIs that require fixed sizes of one or the other; +/// will marshall to the correct size. +/// +public readonly record struct ByteSize(nuint Value) + : IByteSize, + IAssociativeArithmeticOperators, + IAssociativeArithmeticOperators +{ + public const nuint KILOBYTES_TO_BYTES = 1024; + public const nuint MEGABYTES_TO_BYTES = 1024 * KILOBYTES_TO_BYTES; + public const nuint GIGABYTES_TO_BYTES = 1024 * MEGABYTES_TO_BYTES; + + public static ByteSize Zero => new(0); + public static ByteSize One => new(1); + + #region converters + + public static explicit operator ByteSize(int bytes) => new((nuint)bytes); + + public static explicit operator ByteSize(uint bytes) => new(bytes); + + public static explicit operator ByteSize(ulong bytes) => new((nuint)bytes); + + public static explicit operator ByteSize(long bytes) => new((nuint)bytes); + + public static explicit operator ByteSize(nuint bytes) => new(bytes); + + public static explicit operator ByteSize(nint bytes) => new((nuint)bytes); + + public static explicit operator ByteSize(double bytes) => new((nuint)bytes); + + public static explicit operator ByteSize(float bytes) => new((nuint)bytes); + + public static explicit operator int(ByteSize byteSize) => (int)byteSize.Bytes; + + public static explicit operator uint(ByteSize byteSize) => (uint)byteSize.Bytes; + + public static explicit operator long(ByteSize byteSize) => (long)byteSize.Bytes; + + public static implicit operator ulong(ByteSize byteSize) => byteSize.Bytes; + + public static explicit operator nint(ByteSize byteSize) => (nint)byteSize.Bytes; + + public static explicit operator nuint(ByteSize byteSize) => byteSize.Bytes; + + public static explicit operator float(ByteSize byteSize) => byteSize.Bytes; + + public static explicit operator double(ByteSize byteSize) => byteSize.Bytes; + + #endregion + + #region arithmetic operators + + public static unsafe byte* operator +(byte* left, ByteSize right) => left + right.Bytes; + + public static ByteSize operator +(ByteSize left, ByteSize right) => left.Bytes + right; + + public static ByteSize operator -(ByteSize left, ByteSize right) => left.Bytes - right; + + public static ByteSize operator *(ByteSize left, ByteSize right) => left.Bytes * right; + + public static ByteSize operator /(ByteSize left, ByteSize right) => left.Bytes / right; + + public static ByteSize operator +(ByteSize left, nuint right) => (ByteSize)(left.Bytes + right); + + public static ByteSize operator -(ByteSize left, nuint right) => (ByteSize)(left.Bytes - right); + + public static ByteSize operator *(ByteSize left, nuint right) => (ByteSize)(left.Bytes * right); + + public static ByteSize operator /(ByteSize left, nuint right) => (ByteSize)(left.Bytes / right); + + public static ByteSize operator +(nuint left, ByteSize right) => (ByteSize)(left + right.Bytes); + + public static ByteSize operator -(nuint left, ByteSize right) => (ByteSize)(left - right.Bytes); + + public static ByteSize operator *(nuint left, ByteSize right) => (ByteSize)(left * right.Bytes); + + public static ByteSize operator /(nuint left, ByteSize right) => (ByteSize)(left / right.Bytes); + + public static ByteSize operator *(ByteSize left, ElementCount right) => left * (nuint)right; + + public static ByteSize operator *(ElementCount left, ByteSize right) => (nuint)left * right; + + public static ByteSize operator +(ByteSize left, int right) => left + (nuint)right; + + public static ByteSize operator -(ByteSize left, int right) => left - (nuint)right; + + public static ByteSize operator *(ByteSize left, int right) => left * (nuint)right; + + public static ByteSize operator /(ByteSize left, int right) => left / (nuint)right; + + public static ByteSize operator +(int left, ByteSize right) => (nuint)left + right; + + public static ByteSize operator -(int left, ByteSize right) => (nuint)left - right; + + public static ByteSize operator *(int left, ByteSize right) => (nuint)left * right; + + public static ByteSize operator /(int left, ByteSize right) => (nuint)left / right; + + #endregion + + public nuint Bytes => Value; + public nuint Kilobytes => Bytes / KILOBYTES_TO_BYTES; + public nuint Megabytes => Bytes / MEGABYTES_TO_BYTES; + public nuint Gigabytes => Bytes / GIGABYTES_TO_BYTES; + + private static readonly string[] Suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB"]; + + public override string ToString() + { + if (Bytes == 0) + return "0 B"; + + var order = (int)Math.Floor(Math.Log(Bytes, 1024)); + order = Math.Min(order, Suffixes.Length - 1); + + var value = Bytes / Math.Pow(1024, order); + + return $"{value:0.##} {Suffixes[order]}"; + } + + /// + /// Returns the maximum number of elements that can fit in a span of the given size + /// + public ElementCount ToElementCount(ByteSize stride) + { + return new ElementCount((int)(Bytes / stride.Bytes)); + } + + /// + /// Returns the maximum number of elements that can fit in a span of the given size + /// + public ElementCount ToElementCount() + where T : unmanaged + { + return ToElementCount(Of(Unsafe.SizeOf())); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize Of(byte value) => (ByteSize)(int)value; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize Of(int value) => (ByteSize)value; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize Of(uint value) => (ByteSize)value; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize Of(long value) => (ByteSize)value; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize Of(ulong value) => (ByteSize)value; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize OffsetOf(string fieldName) + where T : struct => (ByteSize)Marshal.OffsetOf(fieldName); + + /// Returns the alignment requirement of T, as applied by the runtime's struct layout. + public static ByteSize AlignmentOf() + where T : unmanaged + { + /* C# has no alignof; measure where the CLR places T after a single byte - sequential + layout pads exactly to T's alignment, so the offset IS the alignment. This is the + runtime truth (what C/C++ interop parity depends on), unlike Marshal.OffsetOf which + reports the marshalled layout. */ + var probe = default(AlignmentProbe); + return (ByteSize)Unsafe.ByteOffset(ref probe.Padding, ref Unsafe.As(ref probe.Value)); + } + +#pragma warning disable CS0649 // fields never assigned - only refs into the default layout are taken + private struct AlignmentProbe + where T : unmanaged + { + public byte Padding; + public T Value; + } +#pragma warning restore CS0649 + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromKilobytes(byte value) => (ByteSize)(value * KILOBYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromKilobytes(int value) => (ByteSize)((nuint)value * KILOBYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromKilobytes(uint value) => (ByteSize)(value * KILOBYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromKilobytes(long value) => (ByteSize)((nuint)value * KILOBYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromKilobytes(ulong value) => (ByteSize)((nuint)value * KILOBYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromMegabytes(byte value) => (ByteSize)(value * MEGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromMegabytes(int value) => (ByteSize)((nuint)value * MEGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromMegabytes(uint value) => (ByteSize)(value * MEGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromMegabytes(long value) => (ByteSize)((nuint)value * MEGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromMegabytes(ulong value) => (ByteSize)((nuint)value * MEGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromGigabytes(byte value) => (ByteSize)(value * GIGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromGigabytes(int value) => (ByteSize)((nuint)value * GIGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromGigabytes(uint value) => (ByteSize)(value * GIGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromGigabytes(long value) => (ByteSize)((nuint)value * GIGABYTES_TO_BYTES); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize FromGigabytes(ulong value) => (ByteSize)((nuint)value * GIGABYTES_TO_BYTES); + + /// + /// Returns the size in bytes of the type T + /// + public static ByteSize Of() + where T : unmanaged + { + return Of(ElementCount.One); + } + + /// + /// Returns the size in bytes of count elements of type T + /// + public static ByteSize Of(ElementCount count) + where T : unmanaged + { + return Of(Unsafe.SizeOf() * count.Value); + } + + /// + /// Returns the size in bytes of the array + /// + public static ByteSize Of(T[] span) + where T : unmanaged + { + return Of(span.Length); + } + + /// + /// Returns the size in bytes of the list + /// + public static ByteSize Of(List span) + where T : unmanaged + { + return Of(span.Count); + } + + /// + /// Returns the size in bytes of the span + /// + public static ByteSize Of(ReadOnlySpan span) + where T : unmanaged + { + return Of(span.Length); + } + + /// + /// Returns the size in bytes of the span + /// + public static ByteSize Of(Span span) + where T : unmanaged + { + return Of(span.Length); + } + + /// + /// Returns the size in bytes of the span + /// + public static ByteSize Of(T span) + where T : ISpanLike, allows ref struct + { + return span.Length * span.Stride; + } + + /// + /// Returns the size in bytes of the span + /// + public static ByteSize Of(T1 span) + where T1 : ISpanLike + where T2 : unmanaged + { + return Of(span.Length); + } + + public static ByteSize Max(ByteSize a, ByteSize b) => (ByteSize)nuint.Max(a.Bytes, b.Bytes); + + public static ByteSize Min(ByteSize a, ByteSize b) => (ByteSize)nuint.Min(a.Bytes, b.Bytes); +} + +public static class ByteSizeExtensions +{ + public static ByteSize AlignTo(this T1 value, T2 alignment) + where T1 : IByteSize + where T2 : IByteSize + { + var a = alignment.Bytes; + return (ByteSize)((value.Bytes + a - 1) & ~(a - 1)); + } +} diff --git a/Brutal.Core/Types/ElementCount.cs b/Brutal.Core/Types/ElementCount.cs new file mode 100644 index 0000000..6ff2095 --- /dev/null +++ b/Brutal.Core/Types/ElementCount.cs @@ -0,0 +1,74 @@ +using System.Diagnostics; + +namespace Brutal; + +[DebuggerDisplay("{Value}")] +public readonly record struct ElementCount +{ + public ElementCount(int value) => Value = value; + + public int Value { get; init; } + + public void Deconstruct(out int value) => value = Value; + + public static ElementCount Zero => 0; + public static ElementCount One => 1; + + public static implicit operator ElementCount(int elements) => new(elements); + + public static explicit operator ElementCount(uint elements) => new((int)elements); + + public static explicit operator ElementCount(ulong elements) => new((int)elements); + + public static explicit operator ElementCount(long elements) => new((int)elements); + + public static explicit operator ElementCount(nuint elements) => new((int)elements); + + public static explicit operator ElementCount(nint elements) => new((int)elements); + + public static explicit operator ElementCount(double elements) => new((int)elements); + + public static explicit operator ElementCount(float elements) => new((int)elements); + + public static implicit operator int(ElementCount elementCount) => elementCount.Value; + + public static explicit operator uint(ElementCount elementCount) => (uint)elementCount.Value; + + public static implicit operator long(ElementCount elementCount) => elementCount.Value; + + public static explicit operator ulong(ElementCount elementCount) => (nuint)elementCount.Value; + + public static implicit operator nint(ElementCount elementCount) => elementCount.Value; + + public static explicit operator nuint(ElementCount elementCount) => (nuint)elementCount.Value; + + public static implicit operator float(ElementCount elementCount) => elementCount.Value; + + public static implicit operator double(ElementCount elementCount) => elementCount.Value; + + public static ElementCount operator +(ElementCount left, ElementCount right) => left.Value + right.Value; + + public static ElementCount operator -(ElementCount left, ElementCount right) => left.Value - right.Value; + + public static ElementCount operator *(ElementCount left, ElementCount right) => left.Value * right.Value; + + public static ElementCount operator /(ElementCount left, ElementCount right) => left.Value / right.Value; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ElementCount Of(ElementCount count) => count; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ElementCount Of(byte numElements) => numElements; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ElementCount Of(int numElements) => numElements; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ElementCount Of(uint numElements) => (int)numElements; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ElementCount Of(long numElements) => (ElementCount)numElements; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ElementCount Of(ulong numElements) => (int)numElements; +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Callbacks.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Callbacks.gen.cs new file mode 100644 index 0000000..890cc56 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Callbacks.gen.cs @@ -0,0 +1,2172 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Callback for debug messages when using the logging version of FMOD. + /// + /// + /// FMOD_DEBUG_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DebugCallback(DebugFlags flags, byte* file, int line, byte* func, byte* message); + + /// + /// + /// Callback for System notifications. + /// + /// + /// FMOD_SYSTEM_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result SystemCallback( + FmodSystem system, + SystemCallbackType type, + nint commandData1, + nint commandData2, + nint userData + ); + + /// + /// + /// Callback for Channel or ChannelGroup notifications. + /// + /// + /// FMOD_CHANNELCONTROL_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result ChannelControlCallback( + ChannelControl channelControl, + ChannelControlType controlType, + ChannelControlCallbackType callbackType, + nint commandData1, + nint commandData2 + ); + + /// + /// + /// Callback for DSP notifications. + /// + /// + /// FMOD_DSP_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result DspCallback(Dsp dsp, DspCallbackType type, nint data); + + /// + /// + /// Callback to be called when a sound has finished loading, or a non blocking seek is occuring. + /// + /// + /// FMOD_SOUND_NONBLOCK_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result SoundNonBlockCallback(Sound sound, Result result); + + /// + /// + /// Read callback used for user created sounds or to intercept FMOD's decoder during a normal sound open. + /// + /// + /// FMOD_SOUND_PCMREAD_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result SoundPcmReadCallback(Sound sound, nint data, uint dataLen); + + /// + /// + /// Set position callback for user created sounds or to intercept FMOD's decoder during an API setPositon call. + /// + /// + /// FMOD_SOUND_PCMSETPOS_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result SoundPcmSetPosCallback(Sound sound, int subSound, uint position, TimeUnit posType); + + /// + /// + /// Callback for opening a file. + /// + /// + /// FMOD_FILE_OPEN_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result FileOpenCallback(byte* name, uint* fileSize, nint* handle, nint userData); + + /// + /// + /// Calback for closing a file. + /// + /// + /// FMOD_FILE_CLOSE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result FileCloseCallback(nint handle, nint userData); + + /// + /// + /// Callback for reading from a file. + /// + /// + /// FMOD_FILE_READ_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result FileReadCallback( + nint handle, + nint buffer, + uint sizeBytes, + uint* bytesRead, + nint userData + ); + + /// + /// + /// Callback for seeking within a file. + /// + /// + /// FMOD_FILE_SEEK_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result FileSeekCallback(nint handle, uint pos, nint userData); + + /// + /// + /// Callback for reading from a file asynchronously. + /// + /// + /// FMOD_FILE_ASYNCREAD_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result FileAsyncReadCallback(AsyncReadInfo* info, nint userData); + + /// + /// + /// Callback for cancelling a pending asynchronous read. + /// + /// + /// This callback is called to stop/release or shut down the resource that is holding the file, for example: + /// releasing a Sound stream. + /// + /// + /// FMOD_FILE_ASYNCCANCEL_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result FileAsyncCancelCallback(AsyncReadInfo* info, nint userData); + + /// + /// + /// Function to be called when asynchronous reading is finished. + /// + /// + /// FMOD_FILE_ASYNCDONE_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void FileAsyncDoneFunc(AsyncReadInfo* info, Result result); + + /// + /// + /// Callback to allocate a block of memory. + /// + /// + /// FMOD_MEMORY_ALLOC_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate nint MemoryAllocCallback(uint size, MemoryType type, byte* sourceStr); + + /// + /// + /// Callback to re-allocate a block of memory to a different size. + /// + /// + /// FMOD_MEMORY_REALLOC_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate nint MemoryReallocCallback(nint ptr, uint size, MemoryType type, byte* sourceStr); + + /// + /// + /// Callback to free a block of memory. + /// + /// + /// FMOD_MEMORY_FREE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void MemoryFreeCallback(nint ptr, MemoryType type, byte* sourceStr); + + /// + /// + /// Callback to allow custom calculation of distance attenuation. + /// + /// + /// FMOD_3D_ROLLOFF_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate float Rolloff3dCallback(ChannelControl channelControl, float distance); + + /// + /// + /// Codec open callback. + /// + /// + /// This callback is called to initialize a codec instance using the codec's file handle to verify if the file + /// is of the type of the codec, and to do any file reading required for initialization of the codec. + /// + /// + /// FMOD_CODEC_OPEN_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecOpenCallback( + CodecState* codecState, + Mode userMode, + CreateSoundExInfo* userExInfo + ); + + /// + /// + /// Codec close callback. + /// + /// + /// This callback is called to shut down and release memory for the codec instance. + /// + /// + /// FMOD_CODEC_CLOSE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecCloseCallback(CodecState* codecState); + + /// + /// + /// Codec read callback. + /// + /// + /// This callback is called to read PCM data from the codec instance. + /// + /// + /// FMOD_CODEC_READ_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecReadCallback( + CodecState* codecState, + nint buffer, + uint samplesIn, + uint* samplesOut + ); + + /// + /// + /// Codec get length callback. + /// + /// + /// This callback is called to retrieve the length of the audio file of this codec type. + /// + /// + /// FMOD_CODEC_GETLENGTH_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecGetLengthCallback(CodecState* codecState, uint* length, TimeUnit lengthType); + + /// + /// + /// Codec set position callback. + /// + /// + /// This callback is called to set the audible position of a codec instance. + /// + /// + /// FMOD_CODEC_SETPOSITION_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecSetPositionCallback( + CodecState* codecState, + int subSound, + uint position, + TimeUnit posType + ); + + /// + /// + /// Codec get position callback. + /// + /// + /// This callback is called to retrieve the current read position of the audio file of this codec type. + /// + /// + /// FMOD_CODEC_GETPOSITION_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecGetPositionCallback(CodecState* codecState, uint* position, TimeUnit posType); + + /// + /// + /// Codec sound create callback. + /// + /// + /// This callback is called after a Sound is created. + /// + /// + /// FMOD_CODEC_SOUNDCREATE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecSoundCreateCallback(CodecState* codecState, int subSound, Sound sound); + + /// + /// + /// Codec get wave format callback. + /// + /// + /// This callback is called to allow FMOD to retrieve the format of the file the codec instance represents. + /// + /// + /// FMOD_CODEC_GETWAVEFORMAT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecGetWaveFormatCallback( + CodecState* codecState, + int index, + CodecWaveFormat* waveFormat + ); + + /// + /// + /// Codec metadata function. + /// + /// + /// This function is to be called when a codec's metadata is updated. + /// + /// + /// FMOD_CODEC_METADATA_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecMetadataFunc( + CodecState* codecState, + TagType tagType, + byte* name, + nint data, + uint dataLen, + TagDataType dataType, + int unique + ); + + /// + /// + /// Codec allocate memory function. + /// + /// + /// FMOD_CODEC_ALLOC_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate nint CodecAllocFunc(uint size, uint align, byte* file, int line); + + /// + /// + /// Codec free memory function. + /// + /// + /// FMOD_CODEC_FREE_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void CodecFreeFunc(nint ptr, byte* file, int line); + + /// + /// + /// Codec log function. + /// + /// + /// Call this function in an codec plug-in context to utilize FMOD's debugging system. + /// + /// + /// FMOD_CODEC_LOG_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void CodecLogFunc(DebugFlags level, byte* file, int line, byte* function, byte* str); + + /// + /// + /// Codec file read function. + /// + /// + /// FMOD_CODEC_FILE_READ_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecFileReadFunc( + CodecState* codecState, + nint buffer, + uint sizeBytes, + uint* bytesRead + ); + + /// + /// + /// Codec file seek function. + /// + /// + /// FMOD_CODEC_FILE_SEEK_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecFileSeekFunc(CodecState* codecState, uint pos, CodecSeekMethod method); + + /// + /// + /// Codec file function to retrieve the current file position. + /// + /// + /// FMOD_CODEC_FILE_TELL_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecFileTellFunc(CodecState* codecState, uint* pos); + + /// + /// + /// Codec file size function. + /// + /// + /// FMOD_CODEC_FILE_SIZE_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CodecFileSizeFunc(CodecState* codecState, uint* size); + + /// + /// + /// DSP create callback. + /// + /// + /// This callback is called when you create a DSP unit instance of this type. + /// + /// + /// FMOD_DSP_CREATE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspCreateCallback(DspState* dspState); + + /// + /// + /// DSP release callback. + /// + /// + /// This callback is called when the user of the plug-in releases a DSP unit instance. + /// + /// + /// FMOD_DSP_RELEASE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspReleaseCallback(DspState* dspState); + + /// + /// + /// DSP reset callback. + /// + /// + /// This callback function is called to allow a DSP effect to reset its internal state. + /// + /// + /// FMOD_DSP_RESET_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspResetCallback(DspState* dspState); + + /// + /// + /// DSP read callback. + /// + /// + /// This callback receives an input signal and allows the user of the plug-in to filter or process the data and + /// write it to the output. + /// + /// + /// FMOD_DSP_READ_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspReadCallback( + DspState* dspState, + float* inBuffer, + float* outBuffer, + uint length, + int inChannels, + int* outChannels + ); + + /// + /// + /// Process callback. + /// + /// + /// This callback receives an input signal, and allows the user to filter or process the data and write it to + /// the output. This is an alternative to the FMOD_DSP_READ_CALLBACK and FMOD_DSP_SHOULDIPROCESS_CALLBACK. + /// + /// + /// FMOD_DSP_PROCESS_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspProcessCallback( + DspState* dspState, + uint length, + DspBufferArray* inBufferArray, + DspBufferArray* outBufferArray, + Bool32 inputSidle, + DspProcessOperation op + ); + + /// + /// + /// DSP set position callback. + /// + /// + /// This callback is called when the user of the plug-in wants to set a PCM position for a DSP. + /// + /// + /// FMOD_DSP_SETPOSITION_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSetPositionCallback(DspState* dspState, uint pos); + + /// + /// + /// DSP 'should I process?' callback. + /// + /// + /// This callback is called to allow you to tell the FMOD mixer whether the FMOD_DSP_READ_CALLBACK callback + /// should be called or not. This can be used as an optimization to reduce CPU overhead. + /// + /// + /// FMOD_DSP_SHOULDIPROCESS_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspShouldIProcessCallback( + DspState* dspState, + Bool32 inputSidle, + uint length, + ChannelMask inMask, + int inChannels, + SpeakerMode speakerMode + ); + + /// + /// + /// Set float parameter callback. + /// + /// + /// This callback is called when the user wants to set a float parameter for a DSP unit. + /// + /// + /// FMOD_DSP_SETPARAM_FLOAT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSetParamFloatCallback(DspState* dspState, int index, float value); + + /// + /// + /// Set integer parameter callback. + /// + /// + /// This callback is called when the user of the plug-in wants to set an integer parameter for a DSP unit. + /// + /// + /// FMOD_DSP_SETPARAM_INT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSetParamIntCallback(DspState* dspState, int index, int value); + + /// + /// + /// Set boolean parameter callback. + /// + /// + /// This callback is called when the user of the plug-in wants to set a boolean parameter for a DSP unit. + /// + /// + /// FMOD_DSP_SETPARAM_BOOL_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSetParamBoolCallback(DspState* dspState, int index, Bool32 value); + + /// + /// + /// Set data parameter callback. + /// + /// + /// This callback is called when the user of the plug-in wants to set a binary data parameter for a DSP unit. + /// + /// + /// FMOD_DSP_SETPARAM_DATA_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSetParamDataCallback(DspState* dspState, int index, nint data, uint length); + + /// + /// + /// Get float parameter callback. + /// + /// + /// This callback is called when the user wants to get a floating point parameter value from a DSP unit. + /// + /// + /// FMOD_DSP_GETPARAM_FLOAT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetParamFloatCallback(DspState* dspState, int index, float* value, byte* valuesTr); + + /// + /// + /// Get integer parameter callback. + /// + /// + /// This callback is called when the user wants to get an integer parameter value from a DSP unit. + /// + /// + /// FMOD_DSP_GETPARAM_INT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetParamIntCallback(DspState* dspState, int index, int* value, byte* valuesTr); + + /// + /// + /// Get boolean parameter callback. + /// + /// + /// This callback is called when the user wants to get a boolean parameter value from a DSP unit. + /// + /// + /// FMOD_DSP_GETPARAM_BOOL_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetParamBoolCallback(DspState* dspState, int index, Bool32* value, byte* valuesTr); + + /// + /// + /// Get data parameter callback. + /// + /// + /// This callback is called when the user wants to get a data parameter value from a DSP unit. + /// + /// + /// FMOD_DSP_GETPARAM_DATA_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetParamDataCallback( + DspState* dspState, + int index, + nint* data, + uint* length, + byte* valuesTr + ); + + /// + /// + /// System level DSP type registration callback. + /// + /// + /// The callback is called as a one time initialization to set up the DSP plug-in type, rather than of + /// an individual DSP instance. + /// + /// + /// FMOD_DSP_SYSTEM_REGISTER_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSystemRegisterCallback(DspState* dspState); + + /// + /// + /// System level DSP type deregister callback. + /// + /// + /// The callback is called as a one time deregistration of a DSP plug-in type, rather than of an + /// individual DSP instance. + /// + /// + /// FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSystemDeregisterCallback(DspState* dspState); + + /// + /// + /// System level DSP type mix callback. + /// + /// + /// The function can be used as a global pre/mid/post mix function for this type of DSP, rather than of + /// an individual DSP instance. + /// + /// + /// FMOD_DSP_SYSTEM_MIX_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspSystemMixCallback(DspState* dspState, int stage); + + /// FMOD_DSP_ALLOC_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate nint DspAllocFunc(uint size, MemoryType type, byte* sourceStr); + + /// FMOD_DSP_REALLOC_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate nint DspReallocFunc(nint ptr, uint size, MemoryType type, byte* sourceStr); + + /// FMOD_DSP_FREE_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void DspFreeFunc(nint ptr, MemoryType type, byte* sourceStr); + + /// FMOD_DSP_LOG_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void DspLogFunc(DebugFlags level, byte* file, int line, byte* function, byte* str); + + /// FMOD_DSP_GETSAMPLERATE_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetSampleRateFunc(DspState* dspState, int* rate); + + /// FMOD_DSP_GETBLOCKSIZE_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetBlockSizeFunc(DspState* dspState, uint* blockSize); + + /// FMOD_DSP_GETSPEAKERMODE_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetSpeakerModeFunc( + DspState* dspState, + SpeakerMode* speakerModeMixer, + SpeakerMode* speakerModeOutput + ); + + /// FMOD_DSP_GETCLOCK_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetClockFunc(DspState* dspState, ulong* clock, uint* offset, uint* length); + + /// FMOD_DSP_GETLISTENERATTRIBUTES_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetListenerAttributesFunc( + DspState* dspState, + int* numListeners, + Attributes3d* attributes + ); + + /// FMOD_DSP_GETUSERDATA_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspGetUserDataFunc(DspState* dspState, nint* userData); + + /// FMOD_DSP_DFT_FFTREAL_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspDftFftRealFunc( + DspState* dspState, + int size, + float* signal, + Complex* dft, + float* window, + int signalhop + ); + + /// FMOD_DSP_DFT_IFFTREAL_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspDftIfftrealFunc( + DspState* dspState, + int size, + Complex* dft, + float* signal, + float* window, + int signalhop + ); + + /// FMOD_DSP_PAN_SUMMONOMATRIX_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspPanSumMonoMatrixFunc( + DspState* dspState, + SpeakerMode sourceSpeakerMode, + float lowFrequencyGain, + float overallGain, + float* matrix + ); + + /// FMOD_DSP_PAN_SUMSTEREOMATRIX_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspPanSumStereoMatrixFunc( + DspState* dspState, + SpeakerMode sourceSpeakerMode, + float pan, + float lowFrequencyGain, + float overallGain, + int matrixHop, + float* matrix + ); + + /// FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspPanSumSurroundMatrixFunc( + DspState* dspState, + SpeakerMode sourceSpeakerMode, + SpeakerMode targetSpeakerMode, + float direction, + float extent, + float rotation, + float lowFrequencyGain, + float overallGain, + int matrixHop, + float* matrix, + DspPanSurroundFlags flags + ); + + /// FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspPanSumMonoToSurroundMatrixFunc( + DspState* dspState, + SpeakerMode targetSpeakerMode, + float direction, + float extent, + float lowFrequencyGain, + float overallGain, + int matrixHop, + float* matrix + ); + + /// FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspPanSumStereoToSurroundMatrixFunc( + DspState* dspState, + SpeakerMode targetSpeakerMode, + float direction, + float extent, + float rotation, + float lowFrequencyGain, + float overallGain, + int matrixHop, + float* matrix + ); + + /// FMOD_DSP_PAN_GETROLLOFFGAIN_FUNC + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result DspPanGetRolloffGainFunc( + DspState* dspState, + DspPan3dRolloffType rolloff, + float distance, + float minDistance, + float maxDistance, + float* gain + ); + + /// + /// + /// Output get number of drivers callback. + /// + /// + /// This callback is called to provide the user with the number of devices usable for the output mode. + /// + /// + /// FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputGetNumDriversCallback(OutputState* outputState, int* numDrivers); + + /// + /// + /// Output get driver info callback. + /// + /// + /// This callback is called to provide the user with information about the selected audio driver. + /// + /// + /// FMOD_OUTPUT_GETDRIVERINFO_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputGetDriverInfoCallback( + OutputState* outputState, + int id, + byte* name, + int nameLen, + Guid* guid, + int* systemRate, + SpeakerMode* speakerMode, + int* speakerModeChannels + ); + + /// + /// + /// Output initialization callback. + /// + /// + /// This callback is called to allow initialization of the output stream for mixing. + /// + /// + /// FMOD_OUTPUT_INIT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputInitCallback( + OutputState* outputState, + int selecteddriver, + InitFlags flags, + int* outputRate, + SpeakerMode* speakerMode, + int* speakerModeChannels, + SoundFormat* outputFormat, + int dspBufferLength, + int* dspNumBuffers, + int* dspNumAdditionalbuffers, + nint extraDriverData + ); + + /// + /// + /// Output start callback. + /// + /// + /// Called just before mixing should begin. This callback is called to start the output driver's audio stream. + /// + /// + /// FMOD_OUTPUT_START_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputStartCallback(OutputState* outputState); + + /// + /// + /// Output stop callback. + /// + /// + /// Called just after mixing has ended. This callback is called to stop the output driver's audio stream. + /// + /// + /// FMOD_OUTPUT_STOP_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputStopCallback(OutputState* outputState); + + /// + /// + /// Output close callback. + /// + /// + /// This callback is called to shut down and release the output driver's audio interface. + /// + /// + /// FMOD_OUTPUT_CLOSE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputCloseCallback(OutputState* outputState); + + /// + /// + /// Output update callback. + /// + /// + /// FMOD_OUTPUT_UPDATE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputUpdateCallback(OutputState* outputState); + + /// + /// + /// Output get output handle callback. + /// + /// + /// This callback is called to provide the user with a low level audio interface handle that may be used to pass + /// to other middleware. + /// + /// + /// FMOD_OUTPUT_GETHANDLE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputGetHandleCallback(OutputState* outputState, nint* handle); + + /// + /// + /// Output mixer callback. + /// + /// + /// This callback can be used to stall the FMOD mixer thread until it is ready to call the FMOD mixer directly. + /// + /// + /// FMOD_OUTPUT_MIXER_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputMixerCallback(OutputState* outputState); + + /// + /// + /// Output 3D Object get info callback. + /// + /// + /// Called from the mixer thread to provide information about the capabilities of 3D object hardware. + /// + /// + /// FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputObject3dGetInfoCallback(OutputState* outputState, int* maxHardwareobjects); + + /// + /// + /// Output 3D Object alloc callback. + /// + /// + /// This callback is called to reserve hardware resources for a single 3D object. + /// + /// + /// FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputObject3dAllocCallback(OutputState* outputState, nint* object3d); + + /// + /// + /// Output 3D Object free callback. + /// + /// + /// This callback is called to release a hardware resource previously acquired with + /// FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK. + /// + /// + /// FMOD_OUTPUT_OBJECT3DFREE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputObject3dFreeCallback(OutputState* outputState, nint object3d); + + /// + /// + /// Output 3D Object update callback. + /// + /// + /// Called from the mixer thread once for every acquired 3D object every mix to provide 3D information and + /// buffered audio. + /// + /// + /// FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputObject3dUpdateCallback( + OutputState* outputState, + nint object3d, + OutputObject3dInfo* info + ); + + /// + /// + /// Output open port callback. + /// + /// + /// FMOD_OUTPUT_OPENPORT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputOpenPortCallback( + OutputState* outputState, + PortType portType, + PortIndex portIndex, + int* portId, + int* portRate, + int* portChannels, + SoundFormat* portFormat + ); + + /// + /// + /// Output close port callback. + /// + /// + /// FMOD_OUTPUT_CLOSEPORT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputClosePortCallback(OutputState* outputState, int portId); + + /// + /// + /// Output device list change callback. + /// + /// + /// FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputDeviceListChangedCallback(OutputState* outputState); + + /// + /// + /// Output read from mixer function. + /// + /// + /// FMOD_OUTPUT_READFROMMIXER_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputReadFromMixerFunc(OutputState* outputState, nint buffer, uint length); + + /// + /// + /// Output copy port function. + /// + /// + /// Function to copy the output from the mixer for the given auxiliary port. + /// + /// + /// FMOD_OUTPUT_COPYPORT_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputCopyPortFunc(OutputState* outputState, int portId, nint buffer, uint length); + + /// + /// + /// Output request reset function. + /// + /// + /// Request the output to shut down and restart. + /// + /// + /// FMOD_OUTPUT_REQUESTRESET_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result OutputRequestResetFunc(OutputState* outputState); + + /// + /// + /// Output allocate memory function. + /// + /// + /// FMOD_OUTPUT_ALLOC_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate nint OutputAllocFunc(uint size, uint align, byte* file, int line); + + /// + /// + /// Output free memory function. + /// + /// + /// FMOD_OUTPUT_FREE_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void OutputFreeFunc(nint ptr, byte* file, int line); + + /// + /// + /// Output log function. + /// + /// + /// Call this function in an output plug-in context to utilize the FMOD Engine's debugging system. + /// + /// + /// FMOD_OUTPUT_LOG_FUNC + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void OutputLogFunc(DebugFlags level, byte* file, int line, byte* function, byte* str); + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DebugCallbackPtr(DebugCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DebugCallbackPtr(DebugCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct SystemCallbackPtr(SystemCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator SystemCallbackPtr(SystemCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct ChannelControlCallbackPtr(ChannelControlCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator ChannelControlCallbackPtr(ChannelControlCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspCallbackPtr(DspCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspCallbackPtr(DspCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct SoundNonBlockCallbackPtr(SoundNonBlockCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator SoundNonBlockCallbackPtr(SoundNonBlockCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct SoundPcmReadCallbackPtr(SoundPcmReadCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator SoundPcmReadCallbackPtr(SoundPcmReadCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct SoundPcmSetPosCallbackPtr(SoundPcmSetPosCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator SoundPcmSetPosCallbackPtr(SoundPcmSetPosCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileOpenCallbackPtr(FileOpenCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileOpenCallbackPtr(FileOpenCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileCloseCallbackPtr(FileCloseCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileCloseCallbackPtr(FileCloseCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileReadCallbackPtr(FileReadCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileReadCallbackPtr(FileReadCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileSeekCallbackPtr(FileSeekCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileSeekCallbackPtr(FileSeekCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileAsyncReadCallbackPtr(FileAsyncReadCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileAsyncReadCallbackPtr(FileAsyncReadCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileAsyncCancelCallbackPtr(FileAsyncCancelCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileAsyncCancelCallbackPtr(FileAsyncCancelCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct FileAsyncDoneFuncPtr(FileAsyncDoneFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator FileAsyncDoneFuncPtr(FileAsyncDoneFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct MemoryAllocCallbackPtr(MemoryAllocCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator MemoryAllocCallbackPtr(MemoryAllocCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct MemoryReallocCallbackPtr(MemoryReallocCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator MemoryReallocCallbackPtr(MemoryReallocCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct MemoryFreeCallbackPtr(MemoryFreeCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator MemoryFreeCallbackPtr(MemoryFreeCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct Rolloff3dCallbackPtr(Rolloff3dCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator Rolloff3dCallbackPtr(Rolloff3dCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecOpenCallbackPtr(CodecOpenCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecOpenCallbackPtr(CodecOpenCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecCloseCallbackPtr(CodecCloseCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecCloseCallbackPtr(CodecCloseCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecReadCallbackPtr(CodecReadCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecReadCallbackPtr(CodecReadCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecGetLengthCallbackPtr(CodecGetLengthCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecGetLengthCallbackPtr(CodecGetLengthCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecSetPositionCallbackPtr(CodecSetPositionCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecSetPositionCallbackPtr(CodecSetPositionCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecGetPositionCallbackPtr(CodecGetPositionCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecGetPositionCallbackPtr(CodecGetPositionCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecSoundCreateCallbackPtr(CodecSoundCreateCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecSoundCreateCallbackPtr(CodecSoundCreateCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecGetWaveFormatCallbackPtr(CodecGetWaveFormatCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecGetWaveFormatCallbackPtr(CodecGetWaveFormatCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecMetadataFuncPtr(CodecMetadataFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecMetadataFuncPtr(CodecMetadataFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecAllocFuncPtr(CodecAllocFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecAllocFuncPtr(CodecAllocFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecFreeFuncPtr(CodecFreeFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecFreeFuncPtr(CodecFreeFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecLogFuncPtr(CodecLogFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecLogFuncPtr(CodecLogFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecFileReadFuncPtr(CodecFileReadFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecFileReadFuncPtr(CodecFileReadFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecFileSeekFuncPtr(CodecFileSeekFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecFileSeekFuncPtr(CodecFileSeekFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecFileTellFuncPtr(CodecFileTellFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecFileTellFuncPtr(CodecFileTellFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CodecFileSizeFuncPtr(CodecFileSizeFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CodecFileSizeFuncPtr(CodecFileSizeFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspCreateCallbackPtr(DspCreateCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspCreateCallbackPtr(DspCreateCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspReleaseCallbackPtr(DspReleaseCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspReleaseCallbackPtr(DspReleaseCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspResetCallbackPtr(DspResetCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspResetCallbackPtr(DspResetCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspReadCallbackPtr(DspReadCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspReadCallbackPtr(DspReadCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspProcessCallbackPtr(DspProcessCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspProcessCallbackPtr(DspProcessCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSetPositionCallbackPtr(DspSetPositionCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSetPositionCallbackPtr(DspSetPositionCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspShouldIProcessCallbackPtr(DspShouldIProcessCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspShouldIProcessCallbackPtr(DspShouldIProcessCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSetParamFloatCallbackPtr(DspSetParamFloatCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSetParamFloatCallbackPtr(DspSetParamFloatCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSetParamIntCallbackPtr(DspSetParamIntCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSetParamIntCallbackPtr(DspSetParamIntCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSetParamBoolCallbackPtr(DspSetParamBoolCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSetParamBoolCallbackPtr(DspSetParamBoolCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSetParamDataCallbackPtr(DspSetParamDataCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSetParamDataCallbackPtr(DspSetParamDataCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetParamFloatCallbackPtr(DspGetParamFloatCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetParamFloatCallbackPtr(DspGetParamFloatCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetParamIntCallbackPtr(DspGetParamIntCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetParamIntCallbackPtr(DspGetParamIntCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetParamBoolCallbackPtr(DspGetParamBoolCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetParamBoolCallbackPtr(DspGetParamBoolCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetParamDataCallbackPtr(DspGetParamDataCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetParamDataCallbackPtr(DspGetParamDataCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSystemRegisterCallbackPtr(DspSystemRegisterCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSystemRegisterCallbackPtr(DspSystemRegisterCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSystemDeregisterCallbackPtr(DspSystemDeregisterCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSystemDeregisterCallbackPtr(DspSystemDeregisterCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspSystemMixCallbackPtr(DspSystemMixCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspSystemMixCallbackPtr(DspSystemMixCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspAllocFuncPtr(DspAllocFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspAllocFuncPtr(DspAllocFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspReallocFuncPtr(DspReallocFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspReallocFuncPtr(DspReallocFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspFreeFuncPtr(DspFreeFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspFreeFuncPtr(DspFreeFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspLogFuncPtr(DspLogFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspLogFuncPtr(DspLogFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetSampleRateFuncPtr(DspGetSampleRateFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetSampleRateFuncPtr(DspGetSampleRateFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetBlockSizeFuncPtr(DspGetBlockSizeFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetBlockSizeFuncPtr(DspGetBlockSizeFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetSpeakerModeFuncPtr(DspGetSpeakerModeFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetSpeakerModeFuncPtr(DspGetSpeakerModeFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetClockFuncPtr(DspGetClockFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetClockFuncPtr(DspGetClockFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetListenerAttributesFuncPtr(DspGetListenerAttributesFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetListenerAttributesFuncPtr(DspGetListenerAttributesFunc? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspGetUserDataFuncPtr(DspGetUserDataFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspGetUserDataFuncPtr(DspGetUserDataFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspDftFftRealFuncPtr(DspDftFftRealFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspDftFftRealFuncPtr(DspDftFftRealFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspDftIfftrealFuncPtr(DspDftIfftrealFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspDftIfftrealFuncPtr(DspDftIfftrealFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspPanSumMonoMatrixFuncPtr(DspPanSumMonoMatrixFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspPanSumMonoMatrixFuncPtr(DspPanSumMonoMatrixFunc? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspPanSumStereoMatrixFuncPtr(DspPanSumStereoMatrixFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspPanSumStereoMatrixFuncPtr(DspPanSumStereoMatrixFunc? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspPanSumSurroundMatrixFuncPtr(DspPanSumSurroundMatrixFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspPanSumSurroundMatrixFuncPtr(DspPanSumSurroundMatrixFunc? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspPanSumMonoToSurroundMatrixFuncPtr(DspPanSumMonoToSurroundMatrixFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspPanSumMonoToSurroundMatrixFuncPtr( + DspPanSumMonoToSurroundMatrixFunc? @delegate + ) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspPanSumStereoToSurroundMatrixFuncPtr(DspPanSumStereoToSurroundMatrixFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspPanSumStereoToSurroundMatrixFuncPtr( + DspPanSumStereoToSurroundMatrixFunc? @delegate + ) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct DspPanGetRolloffGainFuncPtr(DspPanGetRolloffGainFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator DspPanGetRolloffGainFuncPtr(DspPanGetRolloffGainFunc? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputGetNumDriversCallbackPtr(OutputGetNumDriversCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputGetNumDriversCallbackPtr(OutputGetNumDriversCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputGetDriverInfoCallbackPtr(OutputGetDriverInfoCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputGetDriverInfoCallbackPtr(OutputGetDriverInfoCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputInitCallbackPtr(OutputInitCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputInitCallbackPtr(OutputInitCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputStartCallbackPtr(OutputStartCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputStartCallbackPtr(OutputStartCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputStopCallbackPtr(OutputStopCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputStopCallbackPtr(OutputStopCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputCloseCallbackPtr(OutputCloseCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputCloseCallbackPtr(OutputCloseCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputUpdateCallbackPtr(OutputUpdateCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputUpdateCallbackPtr(OutputUpdateCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputGetHandleCallbackPtr(OutputGetHandleCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputGetHandleCallbackPtr(OutputGetHandleCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputMixerCallbackPtr(OutputMixerCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputMixerCallbackPtr(OutputMixerCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputObject3dGetInfoCallbackPtr(OutputObject3dGetInfoCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputObject3dGetInfoCallbackPtr(OutputObject3dGetInfoCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputObject3dAllocCallbackPtr(OutputObject3dAllocCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputObject3dAllocCallbackPtr(OutputObject3dAllocCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputObject3dFreeCallbackPtr(OutputObject3dFreeCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputObject3dFreeCallbackPtr(OutputObject3dFreeCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputObject3dUpdateCallbackPtr(OutputObject3dUpdateCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputObject3dUpdateCallbackPtr(OutputObject3dUpdateCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputOpenPortCallbackPtr(OutputOpenPortCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputOpenPortCallbackPtr(OutputOpenPortCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputClosePortCallbackPtr(OutputClosePortCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputClosePortCallbackPtr(OutputClosePortCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputDeviceListChangedCallbackPtr(OutputDeviceListChangedCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputDeviceListChangedCallbackPtr( + OutputDeviceListChangedCallback? @delegate + ) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputReadFromMixerFuncPtr(OutputReadFromMixerFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputReadFromMixerFuncPtr(OutputReadFromMixerFunc? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputCopyPortFuncPtr(OutputCopyPortFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputCopyPortFuncPtr(OutputCopyPortFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputRequestResetFuncPtr(OutputRequestResetFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputRequestResetFuncPtr(OutputRequestResetFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputAllocFuncPtr(OutputAllocFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputAllocFuncPtr(OutputAllocFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputFreeFuncPtr(OutputFreeFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputFreeFuncPtr(OutputFreeFunc? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct OutputLogFuncPtr(OutputLogFunc? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator OutputLogFuncPtr(OutputLogFunc? @delegate) => new(@delegate); + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlCallbackType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlCallbackType.gen.cs new file mode 100644 index 0000000..9271549 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlCallbackType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Types of callbacks called by Channels and ChannelGroups. + /// + /// + /// FMOD_CHANNELCONTROL_CALLBACK_TYPE + /// + /// + public enum ChannelControlCallbackType + { + End, + VirtualVoice, + SyncPoint, + Occlusion, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlDspIndex.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlDspIndex.gen.cs new file mode 100644 index 0000000..f2135f8 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlDspIndex.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// References to built-in DSP positions that reside in a Channel or ChannelGroup's DSP chain. + /// + /// + /// FMOD_CHANNELCONTROL_DSP_INDEX + /// + /// + public enum ChannelControlDspIndex + { + ChannelControlDspHead = -1, + ChannelControlDspFader = -2, + ChannelControlDspTail = -3, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlType.gen.cs new file mode 100644 index 0000000..fda10ff --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelControlType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Identifier used to distinguish between Channel and ChannelGroup in the ChannelControl callback. + /// + /// + /// FMOD_CHANNELCONTROL_TYPE + /// + /// + public enum ChannelControlType + { + Channel, + ChannelGroup, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelMask.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelMask.gen.cs new file mode 100644 index 0000000..1a6d915 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelMask.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Flags that describe the speakers present in a given signal. + /// + /// + /// FMOD_CHANNELMASK + /// + /// + [Flags] + public enum ChannelMask : uint + { + FrontLeft = 0x00000001, + FrontRight = 0x00000002, + FrontCenter = 0x00000004, + LowFrequency = 0x00000008, + SurroundLeft = 0x00000010, + SurroundRight = 0x00000020, + BackLeft = 0x00000040, + BackRight = 0x00000080, + BackCenter = 0x00000100, + Mono = FrontLeft, + Stereo = FrontLeft | FrontRight, + Lrc = FrontLeft | FrontRight | FrontCenter, + Quad = FrontLeft | FrontRight | SurroundLeft | SurroundRight, + Surround = FrontLeft | FrontRight | FrontCenter | SurroundLeft | SurroundRight, + _5point1 = FrontLeft | FrontRight | FrontCenter | LowFrequency | SurroundLeft | SurroundRight, + _5point1Rears = FrontLeft | FrontRight | FrontCenter | LowFrequency | BackLeft | BackRight, + _7point0 = FrontLeft | FrontRight | FrontCenter | SurroundLeft | SurroundRight | BackLeft | BackRight, + _7point1 = + FrontLeft | FrontRight | FrontCenter | LowFrequency | SurroundLeft | SurroundRight | BackLeft | BackRight, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelOrder.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelOrder.gen.cs new file mode 100644 index 0000000..c1f6997 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ChannelOrder.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Speaker ordering for multi-channel signals. + /// + /// + /// FMOD_CHANNELORDER + /// + /// + public enum ChannelOrder + { + Default, + WaveFormat, + Protools, + AllMono, + AllStereo, + Alsa, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/CodecSeekMethod.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/CodecSeekMethod.gen.cs new file mode 100644 index 0000000..1411991 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/CodecSeekMethod.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// File seek methods. + /// + /// + /// FMOD_CODEC_SEEK_METHOD + /// + /// + public enum CodecSeekMethod + { + Set = 0, + Current = 1, + End = 2, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugFlags.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugFlags.gen.cs new file mode 100644 index 0000000..a8d77f0 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugFlags.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Specify the requested information to be output when using the logging version of FMOD. + /// + /// + /// FMOD_DEBUG_FLAGS + /// + /// + [Flags] + public enum DebugFlags : uint + { + LevelNone = 0x00000000, + LevelError = 0x00000001, + LevelWarning = 0x00000002, + LevelLog = 0x00000004, + TypeMemory = 0x00000100, + TypeFile = 0x00000200, + TypeCodec = 0x00000400, + TypeTrace = 0x00000800, + DisplayTimeStamps = 0x00010000, + DisplayLineNumbers = 0x00020000, + DisplayThread = 0x00040000, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugMode.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugMode.gen.cs new file mode 100644 index 0000000..d13319c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DebugMode.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Specify the destination of log output when using the logging version of FMOD. + /// + /// + /// FMOD_DEBUG_MODE + /// + /// + public enum DebugMode + { + Tty, + File, + Callback, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DriverState.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DriverState.gen.cs new file mode 100644 index 0000000..0e30c0d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DriverState.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Flags that provide additional information about a particular driver. + /// + /// + /// FMOD_DRIVER_STATE + /// + /// + [Flags] + public enum DriverState : uint + { + Connected = 0x00000001, + Default = 0x00000002, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCallbackType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCallbackType.gen.cs new file mode 100644 index 0000000..cd78b4f --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCallbackType.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Types of callback called by a DSP. + /// + /// + /// FMOD_DSP_CALLBACK_TYPE + /// + /// + public enum DspCallbackType + { + DataParameterRelease, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMix.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMix.gen.cs new file mode 100644 index 0000000..091d36d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMix.gen.cs @@ -0,0 +1,83 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Channel Mix DSP parameter types. + /// + /// + /// FMOD_DSP_CHANNELMIX + /// + /// + public enum DspChannelMix + { + OutputGrouping, + GainCh0, + GainCh1, + GainCh2, + GainCh3, + GainCh4, + GainCh5, + GainCh6, + GainCh7, + GainCh8, + GainCh9, + GainCh10, + GainCh11, + GainCh12, + GainCh13, + GainCh14, + GainCh15, + GainCh16, + GainCh17, + GainCh18, + GainCh19, + GainCh20, + GainCh21, + GainCh22, + GainCh23, + GainCh24, + GainCh25, + GainCh26, + GainCh27, + GainCh28, + GainCh29, + GainCh30, + GainCh31, + OutputCh0, + OutputCh1, + OutputCh2, + OutputCh3, + OutputCh4, + OutputCh5, + OutputCh6, + OutputCh7, + OutputCh8, + OutputCh9, + OutputCh10, + OutputCh11, + OutputCh12, + OutputCh13, + OutputCh14, + OutputCh15, + OutputCh16, + OutputCh17, + OutputCh18, + OutputCh19, + OutputCh20, + OutputCh21, + OutputCh22, + OutputCh23, + OutputCh24, + OutputCh25, + OutputCh26, + OutputCh27, + OutputCh28, + OutputCh29, + OutputCh30, + OutputCh31, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMixOutput.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMixOutput.gen.cs new file mode 100644 index 0000000..2211349 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChannelMixOutput.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Channel mix DSP output grouping types for the FMOD_DSP_CHANNELMIX_OUTPUTGROUPING parameter. Output grouping + /// sets the output speaker format for the Channel Mix DSP. This determines the number of output channels. + /// + /// + /// FMOD_DSP_CHANNELMIX_OUTPUT + /// + /// + public enum DspChannelMixOutput + { + Default, + AllMono, + AllStereo, + AllQuad, + All5point1, + All7point1, + AllLfe, + All7point1point4, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChorus.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChorus.gen.cs new file mode 100644 index 0000000..23f1d38 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspChorus.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Chorus DSP parameter types. + /// + /// + /// FMOD_DSP_CHORUS + /// + /// + public enum DspChorus + { + Mix, + Rate, + Depth, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCompressor.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCompressor.gen.cs new file mode 100644 index 0000000..fb2cb07 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspCompressor.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Compressor DSP parameter types. + /// + /// + /// FMOD_DSP_COMPRESSOR + /// + /// + public enum DspCompressor + { + Threshold, + Ratio, + Attack, + Release, + GainMakeup, + UseSidechain, + Linked, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConnectionType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConnectionType.gen.cs new file mode 100644 index 0000000..4343269 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConnectionType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// List of connection types between two DSP units. + /// + /// + /// FMOD_DSPCONNECTION_TYPE + /// + /// + public enum DspConnectionType + { + Standard, + Sidechain, + Send, + SendSidechain, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConvolutionReverb.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConvolutionReverb.gen.cs new file mode 100644 index 0000000..42ae992 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspConvolutionReverb.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Convolution reverb DSP parameter types. + /// + /// + /// FMOD_DSP_CONVOLUTION_REVERB + /// + /// + public enum DspConvolutionReverb + { + ParamIr, + ParamWet, + ParamDry, + ParamLinked, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDelay.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDelay.gen.cs new file mode 100644 index 0000000..ba9977b --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDelay.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Delay DSP parameter types. + /// + /// + /// FMOD_DSP_DELAY + /// + /// + public enum DspDelay + { + Ch0, + Ch1, + Ch2, + Ch3, + Ch4, + Ch5, + Ch6, + Ch7, + Ch8, + Ch9, + Ch10, + Ch11, + Ch12, + Ch13, + Ch14, + Ch15, + MaxDelay, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDistortion.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDistortion.gen.cs new file mode 100644 index 0000000..9346bb4 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspDistortion.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Distortion DSP parameter types. + /// + /// + /// FMOD_DSP_DISTORTION + /// + /// + public enum DspDistortion + { + Level, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEcho.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEcho.gen.cs new file mode 100644 index 0000000..878393b --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEcho.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Echo DSP parameter types. + /// + /// + /// FMOD_DSP_ECHO + /// + /// + public enum DspEcho + { + Delay, + Feedback, + DryLevel, + WetLevel, + DelayChangeMode, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEchoDelayChangeModeType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEchoDelayChangeModeType.gen.cs new file mode 100644 index 0000000..d8b2757 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspEchoDelayChangeModeType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Options for smoothing delay changes in the echo effect. + /// + /// + /// FMOD_DSP_ECHO_DELAYCHANGEMODE_TYPE + /// + /// + public enum DspEchoDelayChangeModeType + { + Fade, + Lerp, + None, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFader.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFader.gen.cs new file mode 100644 index 0000000..ea8f90c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFader.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Fader DSP parameter types. + /// + /// + /// FMOD_DSP_FADER + /// + /// + public enum DspFader + { + Gain, + OverallGain, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFft.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFft.gen.cs new file mode 100644 index 0000000..7fbd6e6 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFft.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// FFT DSP parameter types. + /// + /// + /// FMOD_DSP_FFT + /// + /// + public enum DspFft + { + Windowsize, + Window, + BandStartFreq, + BandStopFreq, + Spectrumdata, + Rms, + SpectralCentroid, + ImmediateMode, + Downmix, + Channel, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftDownmixType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftDownmixType.gen.cs new file mode 100644 index 0000000..7343cc4 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftDownmixType.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// List of downmix modes for the FFT DSP. + /// + /// + /// FMOD_DSP_FFT_DOWNMIX_TYPE + /// + /// + public enum DspFftDownmixType + { + None, + Mono, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftWindowType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftWindowType.gen.cs new file mode 100644 index 0000000..cf243b5 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFftWindowType.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// List of windowing methods for the FFT DSP. + /// + /// + /// FMOD_DSP_FFT_WINDOW_TYPE + /// + /// + public enum DspFftWindowType + { + Rect, + Triangle, + Hamming, + Hanning, + Blackman, + Blackmanharris, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFlange.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFlange.gen.cs new file mode 100644 index 0000000..f17a89e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspFlange.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Flange DSP parameter types. + /// + /// + /// FMOD_DSP_FLANGE + /// + /// + public enum DspFlange + { + Mix, + Depth, + Rate, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPass.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPass.gen.cs new file mode 100644 index 0000000..82a1d01 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPass.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Highpass DSP parameter types. + /// + /// + /// FMOD_DSP_HIGHPASS + /// + /// + public enum DspHighPass + { + Cutoff, + Resonance, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPassSimple.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPassSimple.gen.cs new file mode 100644 index 0000000..0439c54 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspHighPassSimple.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// High pass simple DSP parameter types. + /// + /// + /// FMOD_DSP_HIGHPASS_SIMPLE + /// + /// + public enum DspHighPassSimple + { + Cutoff, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItEcho.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItEcho.gen.cs new file mode 100644 index 0000000..b7caa19 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItEcho.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// IT echo DSP parameter types. + /// + /// + /// FMOD_DSP_ITECHO + /// + /// + public enum DspItEcho + { + WetDryMix, + Feedback, + LeftDelay, + RightDelay, + Pandelay, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItLowPass.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItLowPass.gen.cs new file mode 100644 index 0000000..9fa0c25 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspItLowPass.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Lowpass DSP parameter types. + /// + /// + /// FMOD_DSP_ITLOWPASS + /// + /// + public enum DspItLowPass + { + Cutoff, + Resonance, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLimiter.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLimiter.gen.cs new file mode 100644 index 0000000..969047c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLimiter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Limiter DSP parameter types. + /// + /// + /// FMOD_DSP_LIMITER + /// + /// + public enum DspLimiter + { + ReleaseTime, + Ceiling, + MaximizerGain, + Mode, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeter.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeter.gen.cs new file mode 100644 index 0000000..32e49ae --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeter.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Loudness meter DSP parameter types. + /// + /// + /// FMOD_DSP_LOUDNESS_METER + /// + /// + public enum DspLoudnessMeter + { + State, + Weighting, + Info, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeterStateType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeterStateType.gen.cs new file mode 100644 index 0000000..2c5e058 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLoudnessMeterStateType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Loudness meter state indicating update behavior. + /// + /// + /// FMOD_DSP_LOUDNESS_METER_STATE_TYPE + /// + /// + public enum DspLoudnessMeterStateType + { + ResetIntegrated = -3, + ResetMaxPeak = -2, + ResetAll = -1, + Paused = 0, + Analyzing = 1, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPass.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPass.gen.cs new file mode 100644 index 0000000..b47597d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPass.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Low pass DSP parameter types. + /// + /// + /// FMOD_DSP_LOWPASS + /// + /// + public enum DspLowPass + { + Cutoff, + Resonance, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPassSimple.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPassSimple.gen.cs new file mode 100644 index 0000000..c65a409 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspLowPassSimple.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Low pass simple DSP parameter types. + /// + /// + /// FMOD_DSP_LOWPASS_SIMPLE + /// + /// + public enum DspLowPassSimple + { + Cutoff, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamics.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamics.gen.cs new file mode 100644 index 0000000..5b8b003 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamics.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Three-band compressor/expander effect. + /// + /// + /// FMOD_DSP_MULTIBAND_DYNAMICS + /// + /// + public enum DspMultibandDynamics + { + LowerFrequency, + UpperFrequency, + Linked, + UseSidechain, + AMode, + AGain, + AThreshold, + ARatio, + AAttack, + ARelease, + AGainMakeup, + AResponseData, + BMode, + BGain, + BThreshold, + BRatio, + BAttack, + BRelease, + BGainMakeup, + BResponseData, + CMode, + CGain, + CThreshold, + CRatio, + CAttack, + CRelease, + CGainMakeup, + CResponseData, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamicsModeType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamicsModeType.gen.cs new file mode 100644 index 0000000..2f144fd --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandDynamicsModeType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Multiband Dynamics dynamic response types. + /// + /// + /// FMOD_DSP_MULTIBAND_DYNAMICS_MODE_TYPE + /// + /// + public enum DspMultibandDynamicsModeType + { + Disabled, + CompressUp, + CompressDown, + ExpandUp, + ExpandDown, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEq.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEq.gen.cs new file mode 100644 index 0000000..70796ea --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEq.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Multiband equalizer DSP parameter types. + /// + /// + /// FMOD_DSP_MULTIBAND_EQ + /// + /// + public enum DspMultibandEq + { + AFilter, + AFrequency, + AQ, + AGain, + BFilter, + BFrequency, + BQ, + BGain, + CFilter, + CFrequency, + CQ, + CGain, + DFilter, + DFrequency, + DQ, + DGain, + EFilter, + EFrequency, + EQ, + EGain, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEqFilterType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEqFilterType.gen.cs new file mode 100644 index 0000000..1717547 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspMultibandEqFilterType.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Multiband equalizer filter types. + /// + /// + /// FMOD_DSP_MULTIBAND_EQ_FILTER_TYPE + /// + /// + public enum DspMultibandEqFilterType + { + Disabled, + LowPass12db, + LowPass24db, + LowPass48db, + HighPass12db, + HighPass24db, + HighPass48db, + LowShelf, + HighShelf, + Peaking, + Bandpass, + Notch, + AllPass, + LowPass6db, + HighPass6db, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspNormalize.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspNormalize.gen.cs new file mode 100644 index 0000000..c6ab0fe --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspNormalize.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Normalize DSP parameter types. + /// + /// + /// FMOD_DSP_NORMALIZE + /// + /// + public enum DspNormalize + { + Fadetime, + Threshold, + MaxAmp, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspObjectPan.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspObjectPan.gen.cs new file mode 100644 index 0000000..72a6266 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspObjectPan.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Object based spatializer parameters. + /// + /// + /// FMOD_DSP_OBJECTPAN + /// + /// + public enum DspObjectPan + { + _3dPosition, + _3dRolloff, + _3dMinDistance, + _3dMaxDistance, + _3dExtentMode, + _3dSoundSize, + _3dMinExtent, + OverallGain, + OutputGain, + AttenuationRange, + OverrideRange, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspOscillator.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspOscillator.gen.cs new file mode 100644 index 0000000..050f37b --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspOscillator.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Oscillator DSP parameter types. + /// + /// + /// FMOD_DSP_OSCILLATOR + /// + /// + public enum DspOscillator + { + Type, + Rate, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan.gen.cs new file mode 100644 index 0000000..2d46b57 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Pan DSP parameter types. + /// + /// + /// FMOD_DSP_PAN + /// + /// + public enum DspPan + { + Mode, + _2dStereoPosition, + _2dDirection, + _2dExtent, + _2dRotation, + _2dLfeLevel, + _2dStereoMode, + _2dStereoSeparation, + _2dStereoAxis, + EnabledSpeakers, + _3dPosition, + _3dRolloff, + _3dMinDistance, + _3dMaxDistance, + _3dExtentMode, + _3dSoundSize, + _3dMinExtent, + _3dPanBlend, + LfeUpmixEnabled, + OverallGain, + SurroundSpeakerMode, + _2dHeightBlend, + AttenuationRange, + OverrideRange, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan2dStereoModeType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan2dStereoModeType.gen.cs new file mode 100644 index 0000000..ab0dd37 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan2dStereoModeType.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// 2D stereo mode values for pan DSP. + /// + /// + /// FMOD_DSP_PAN_2D_STEREO_MODE_TYPE + /// + /// + public enum DspPan2dStereoModeType + { + Distributed, + Discrete, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dExtentModeType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dExtentModeType.gen.cs new file mode 100644 index 0000000..675c03e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dExtentModeType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// 3D extent mode values for pan DSP. + /// + /// + /// FMOD_DSP_PAN_3D_EXTENT_MODE_TYPE + /// + /// + public enum DspPan3dExtentModeType + { + Auto, + User, + Off, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dRolloffType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dRolloffType.gen.cs new file mode 100644 index 0000000..d674fe4 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPan3dRolloffType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// 3D roll-off values for pan DSP. + /// + /// + /// FMOD_DSP_PAN_3D_ROLLOFF_TYPE + /// + /// + public enum DspPan3dRolloffType + { + LinearSquared, + Linear, + Inverse, + InverseTapered, + Custom, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanModeType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanModeType.gen.cs new file mode 100644 index 0000000..2be6a5c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanModeType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Pan mode values for the pan DSP. + /// + /// + /// FMOD_DSP_PAN_MODE_TYPE + /// + /// + public enum DspPanModeType + { + Mono, + Stereo, + Surround, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanSurroundFlags.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanSurroundFlags.gen.cs new file mode 100644 index 0000000..b773693 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPanSurroundFlags.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Flags for the FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC function. + /// + /// + /// FMOD_DSP_PAN_SURROUND_FLAGS + /// + /// + public enum DspPanSurroundFlags + { + Default = 0, + RotationNotBiased = 1, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParamEq.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParamEq.gen.cs new file mode 100644 index 0000000..6fbd50c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParamEq.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Parametric EQ DSP parameter types. + /// + /// + /// FMOD_DSP_PARAMEQ + /// + /// + public enum DspParamEq + { + Center, + Bandwidth, + Gain, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterDataType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterDataType.gen.cs new file mode 100644 index 0000000..90be0dc --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterDataType.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Data parameter types. + /// + /// + /// FMOD_DSP_PARAMETER_DATA_TYPE + /// + /// + public enum DspParameterDataType + { + User = 0, + OverallGain = -1, + _3dAttributes = -2, + Sidechain = -3, + Fft = -4, + _3dAttributesMulti = -5, + AttenuationRange = -6, + DynamicResponse = -7, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterFloatMappingType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterFloatMappingType.gen.cs new file mode 100644 index 0000000..01fd9b2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterFloatMappingType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// DSP float parameter mappings. These determine how values are mapped across dials and automation curves. + /// + /// + /// FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE + /// + /// + public enum DspParameterFloatMappingType + { + Linear, + Auto, + PiecewiseLinear, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterType.gen.cs new file mode 100644 index 0000000..0c64c28 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspParameterType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// DSP parameter types. + /// + /// + /// FMOD_DSP_PARAMETER_TYPE + /// + /// + public enum DspParameterType + { + Float, + Int, + Bool, + Data, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPitchshift.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPitchshift.gen.cs new file mode 100644 index 0000000..706eadb --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspPitchshift.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Pitch shifter DSP parameter types. + /// + /// + /// FMOD_DSP_PITCHSHIFT + /// + /// + public enum DspPitchshift + { + Pitch, + FftSize, + Overlap, + MaxChannels, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspProcessOperation.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspProcessOperation.gen.cs new file mode 100644 index 0000000..7fb8911 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspProcessOperation.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Process operation type. + /// + /// + /// FMOD_DSP_PROCESS_OPERATION + /// + /// + public enum DspProcessOperation + { + DspProcessPerform, + DspProcessQuery, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspResampler.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspResampler.gen.cs new file mode 100644 index 0000000..6adc688 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspResampler.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// List of interpolation types used for resampling. + /// + /// + /// FMOD_DSP_RESAMPLER + /// + /// + public enum DspResampler + { + Default, + NoInterp, + Linear, + Cubic, + Spline, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspReturn.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspReturn.gen.cs new file mode 100644 index 0000000..26e7065 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspReturn.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Return DSP parameter types. + /// + /// + /// FMOD_DSP_RETURN + /// + /// + public enum DspReturn + { + Id, + InputSpeakerMode, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSend.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSend.gen.cs new file mode 100644 index 0000000..0e5f366 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSend.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Send DSP parameter types. + /// + /// + /// FMOD_DSP_SEND + /// + /// + public enum DspSend + { + ReturnId, + Level, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSfxReverb.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSfxReverb.gen.cs new file mode 100644 index 0000000..e16efd7 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspSfxReverb.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// SFX reverb DSP parameter types. + /// + /// + /// FMOD_DSP_SFXREVERB + /// + /// + public enum DspSfxReverb + { + DecayTime, + EarlyDelay, + LateDelay, + HfReference, + HfDecayRatio, + Diffusion, + Density, + LowShelfFrequency, + LowShelfGain, + HighCut, + EarlyLateMix, + WetLevel, + DryLevel, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEq.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEq.gen.cs new file mode 100644 index 0000000..54d90aa --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEq.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Three EQ DSP parameter types. + /// + /// + /// FMOD_DSP_THREE_EQ + /// + /// + public enum DspThreeEq + { + LowGain, + MidGain, + HighGain, + LowCrossover, + HighCrossover, + CrossoverSlope, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEqCrossoverSlopeType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEqCrossoverSlopeType.gen.cs new file mode 100644 index 0000000..cc112b2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspThreeEqCrossoverSlopeType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Crossover values for the three EQ DSP. + /// + /// + /// FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_TYPE + /// + /// + public enum DspThreeEqCrossoverSlopeType + { + _12db, + _24db, + _48db, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiver.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiver.gen.cs new file mode 100644 index 0000000..b077374 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiver.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Transceiver DSP parameter types. + /// + /// + /// FMOD_DSP_TRANSCEIVER + /// + /// + public enum DspTransceiver + { + Transmit, + Gain, + Channel, + TransmitSpeakerMode, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiverSpeakerMode.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiverSpeakerMode.gen.cs new file mode 100644 index 0000000..7f0a79e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTransceiverSpeakerMode.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Speaker mode values for the transceiver DSP. + /// + /// + /// FMOD_DSP_TRANSCEIVER_SPEAKERMODE + /// + /// + public enum DspTransceiverSpeakerMode + { + Auto = -1, + Mono = 0, + Stereo, + Surround, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTremolo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTremolo.gen.cs new file mode 100644 index 0000000..c0eb8c5 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspTremolo.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Tremolo DSP parameter types. + /// + /// + /// FMOD_DSP_TREMOLO + /// + /// + public enum DspTremolo + { + Frequency, + Depth, + Shape, + Skew, + Duty, + Square, + Phase, + Spread, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspType.gen.cs new file mode 100644 index 0000000..5ad3719 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/DspType.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// DSP types. + /// + /// + /// FMOD_DSP_TYPE + /// + /// + public enum DspType + { + Unknown, + Mixer, + Oscillator, + LowPass, + ItLowPass, + HighPass, + Echo, + Fader, + Flange, + Distortion, + Normalize, + Limiter, + ParamEq, + Pitchshift, + Chorus, + ItEcho, + Compressor, + SfxReverb, + LowPassSimple, + Delay, + Tremolo, + Send, + Return, + HighPassSimple, + Pan, + ThreeEq, + Fft, + LoudnessMeter, + ConvolutionReverb, + ChannelMix, + Transceiver, + ObjectPan, + MultibandEq, + MultibandDynamics, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ErrorCallbackInstanceType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ErrorCallbackInstanceType.gen.cs new file mode 100644 index 0000000..13620a6 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ErrorCallbackInstanceType.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Identifier used to represent the different types of instance in the error callback. + /// + /// + /// FMOD_ERRORCALLBACK_INSTANCETYPE + /// + /// + public enum ErrorCallbackInstanceType + { + None, + System, + Channel, + ChannelGroup, + ChannelControl, + Sound, + SoundGroup, + Dsp, + DspConnection, + Geometry, + Reverb3d, + StudioSystem, + StudioEventDescription, + StudioEventInstance, + StudioParameterInstance, + StudioBus, + StudioVca, + StudioBank, + StudioCommandReplay, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/InitFlags.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/InitFlags.gen.cs new file mode 100644 index 0000000..51938fb --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/InitFlags.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Configuration flags used when initializing the System object. + /// + /// + /// FMOD_INITFLAGS + /// + /// + [Flags] + public enum InitFlags : uint + { + Normal = 0x00000000, + StreamFromUpdate = 0x00000001, + MixFromUpdate = 0x00000002, + _3dRightHanded = 0x00000004, + ClipOutput = 0x00000008, + ChannelLowPass = 0x00000100, + ChannelDistanceFilter = 0x00000200, + ProfileEnable = 0x00010000, + Vol0BecomesVirtual = 0x00020000, + GeometryUseClosest = 0x00040000, + PreferDolbyDownmix = 0x00080000, + ThreadUnsafe = 0x00100000, + ProfileMeterAll = 0x00200000, + MemoryTracking = 0x00400000, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/MemoryType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/MemoryType.gen.cs new file mode 100644 index 0000000..a1c2831 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/MemoryType.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Bitfields for memory allocation type being passed into FMOD memory callbacks. + /// + /// + /// FMOD_MEMORY_TYPE + /// + /// + [Flags] + public enum MemoryType : uint + { + Normal = 0x00000000, + StreamFile = 0x00000001, + StreamDecode = 0x00000002, + SampleData = 0x00000004, + DspBuffer = 0x00000008, + Plugin = 0x00000010, + Persistent = 0x00200000, + All = 0xFFFFFFFF, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/Mode.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/Mode.gen.cs new file mode 100644 index 0000000..43ee833 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/Mode.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Sound description bitfields, bitwise OR them together for loading and describing Sounds. + /// + /// + /// FMOD_MODE + /// + /// + [Flags] + public enum Mode : uint + { + Default = 0x00000000, + LoopOff = 0x00000001, + LoopNormal = 0x00000002, + LoopBidi = 0x00000004, + _2d = 0x00000008, + _3d = 0x00000010, + CreateStream = 0x00000080, + CreateSample = 0x00000100, + CreateCompressedSample = 0x00000200, + OpenUser = 0x00000400, + OpenMemory = 0x00000800, + OpenMemoryPoint = 0x10000000, + OpenRaw = 0x00001000, + OpenOnly = 0x00002000, + AccurateTime = 0x00004000, + MpegSearch = 0x00008000, + NonBlocking = 0x00010000, + Unique = 0x00020000, + _3dHeadRelative = 0x00040000, + _3dWorldRelative = 0x00080000, + _3dInverseRolloff = 0x00100000, + _3dLinearRolloff = 0x00200000, + _3dLinearSquareRolloff = 0x00400000, + _3dInverseTaperedRolloff = 0x00800000, + _3dCustomRolloff = 0x04000000, + _3dIgnoreGeometry = 0x40000000, + IgnoreTags = 0x02000000, + LowMem = 0x08000000, + VirtualPlayFromStart = 0x80000000, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/OpenState.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/OpenState.gen.cs new file mode 100644 index 0000000..b1cd2d2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/OpenState.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// These values describe what state a sound is in after FMOD_NONBLOCKING has been used to open it. + /// + /// + /// FMOD_OPENSTATE + /// + /// + public enum OpenState + { + Ready, + Loading, + Error, + Connecting, + Buffering, + Seeking, + Playing, + SetPosition, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputMethod.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputMethod.gen.cs new file mode 100644 index 0000000..628f132 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputMethod.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Output method used to interact with the mixer. + /// + /// + /// FMOD_OUTPUT_METHOD + /// + /// + public enum OutputMethod : uint + { + MixDirect = 0, + MixBuffered = 1, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputType.gen.cs new file mode 100644 index 0000000..36f0376 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/OutputType.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Built-in output types that can be used to run the mixer. + /// + /// + /// FMOD_OUTPUTTYPE + /// + /// + public enum OutputType + { + Autodetect, + Unknown, + NoSound, + WavWriter, + NoSoundNrt, + WavWriterNrt, + Wasapi, + Asio, + Pulseaudio, + Alsa, + CoreAudio, + AudioTrack, + OpenSl, + AudioOut, + Audio3d, + Webaudio, + Nnaudio, + Winsonic, + Aaudio, + AudioWorklet, + Phase, + Ohaudio, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/PluginType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/PluginType.gen.cs new file mode 100644 index 0000000..8f1b450 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/PluginType.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Types of plug-in used to extend functionality. + /// + /// + /// FMOD_PLUGINTYPE + /// + /// + public enum PluginType + { + Output, + Codec, + Dsp, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/PortIndex.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/PortIndex.gen.cs new file mode 100644 index 0000000..837b22d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/PortIndex.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Output type specific index for when there are multiple instances or destinations for a port type. + /// + /// + /// FMOD_PORT_INDEX + /// + /// + [Flags] + public enum PortIndex : ulong + { + None = 0xFFFFFFFFFFFFFFFF, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/PortType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/PortType.gen.cs new file mode 100644 index 0000000..9b66df1 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/PortType.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Port types available for routing audio. + /// + /// + /// FMOD_PORT_TYPE + /// + /// + public enum PortType + { + Music, + CopyrightMusic, + Voice, + Controller, + Personal, + Vibration, + Aux, + Passthrough, + VrVibration, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/Result.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/Result.gen.cs new file mode 100644 index 0000000..916ad3e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/Result.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Error codes returned from every function. + /// + /// + /// FMOD_RESULT + /// + /// + public enum Result + { + Ok, + ErrBadCommand, + ErrChannelAlloc, + ErrChannelStolen, + ErrDma, + ErrDspConnection, + ErrDspDontProcess, + ErrDspFormat, + ErrDspInUse, + ErrDspNotFound, + ErrDspReserved, + ErrDspSilence, + ErrDspType, + ErrFileBad, + ErrFileCouldNotSeek, + ErrFileDiskEjected, + ErrFileEof, + ErrFileEndOfData, + ErrFileNotFound, + ErrFormat, + ErrHeaderMismatch, + ErrHttp, + ErrHttpAccess, + ErrHttpProxyAuth, + ErrHttpServerError, + ErrHttpTimeOut, + ErrInitialization, + ErrInitialized, + ErrInternal, + ErrInvalidFloat, + ErrInvalidHandle, + ErrInvalidParam, + ErrInvalidPosition, + ErrInvalidSpeaker, + ErrInvalidSyncPoint, + ErrInvalidThread, + ErrInvalidVector, + ErrMaxAudible, + ErrMemory, + ErrMemoryCantPoint, + ErrNeeds3d, + ErrNeedsHardware, + ErrNetConnect, + ErrNetSocketError, + ErrNetUrl, + ErrNetWouldBlock, + ErrNotReady, + ErrOutputAllocated, + ErrOutputCreateBuffer, + ErrOutputDriverCall, + ErrOutputFormat, + ErrOutputInit, + ErrOutputNoDrivers, + ErrPlugin, + ErrPluginMissing, + ErrPluginResource, + ErrPluginVersion, + ErrRecord, + ErrReverbChannelGroup, + ErrReverbInstance, + ErrSubSounds, + ErrSubSoundAllocated, + ErrSubSoundCantMove, + ErrTagNotFound, + ErrTooManyChannels, + ErrTruncated, + ErrUnimplemented, + ErrUninitialized, + ErrUnsupported, + ErrVersion, + ErrEventAlreadyLoaded, + ErrEventLiveUpdateBusy, + ErrEventLiveUpdateMismatch, + ErrEventLiveUpdateTimeOut, + ErrEventNotFound, + ErrStudioUninitialized, + ErrStudioNotLoaded, + ErrInvalidString, + ErrAlreadyLocked, + ErrNotLocked, + ErrRecordDisconnected, + ErrTooManySamples, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundFormat.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundFormat.gen.cs new file mode 100644 index 0000000..4700501 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundFormat.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// These definitions describe the native format of the hardware or software buffer that will be used. + /// + /// + /// FMOD_SOUND_FORMAT + /// + /// + public enum SoundFormat + { + None, + Pcm8, + Pcm16, + Pcm24, + Pcm32, + PcmFloat, + Bitstream, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundGroupBehavior.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundGroupBehavior.gen.cs new file mode 100644 index 0000000..47c5aa4 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundGroupBehavior.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Values specifying behavior when a sound group's max audible value is exceeded. + /// + /// + /// FMOD_SOUNDGROUP_BEHAVIOR + /// + /// + public enum SoundGroupBehavior + { + Fail, + Mute, + StealLowest, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundType.gen.cs new file mode 100644 index 0000000..03535ed --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SoundType.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Recognized audio formats that can be loaded into a Sound. + /// + /// + /// FMOD_SOUND_TYPE + /// + /// + public enum SoundType + { + Unknown, + Aiff, + Asf, + Dls, + Flac, + Fsb, + It, + Midi, + Mod, + Mpeg, + OggVorbis, + Playlist, + Raw, + S3m, + User, + Wav, + Xm, + Xma, + AudioQueue, + At9, + Vorbis, + MediaFoundation, + Mediacodec, + Fadpcm, + Opus, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/Speaker.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/Speaker.gen.cs new file mode 100644 index 0000000..6adeb37 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/Speaker.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Assigns an enumeration for a speaker index. + /// + /// + /// FMOD_SPEAKER + /// + /// + public enum Speaker + { + None = -1, + FrontLeft = 0, + FrontRight, + FrontCenter, + LowFrequency, + SurroundLeft, + SurroundRight, + BackLeft, + BackRight, + TopFrontLeft, + TopFrontRight, + TopBackLeft, + TopBackRight, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/SpeakerMode.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SpeakerMode.gen.cs new file mode 100644 index 0000000..fde8cea --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SpeakerMode.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Speaker mode types. + /// + /// + /// FMOD_SPEAKERMODE + /// + /// + public enum SpeakerMode + { + Default, + Raw, + Mono, + Stereo, + Quad, + Surround, + _5point1, + _7point1, + _7point1point4, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/SystemCallbackType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SystemCallbackType.gen.cs new file mode 100644 index 0000000..4cecb24 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/SystemCallbackType.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Types of callbacks called by the System. + /// + /// + /// FMOD_SYSTEM_CALLBACK_TYPE + /// + /// + [Flags] + public enum SystemCallbackType : uint + { + DeviceListChanged = 0x00000001, + DeviceLost = 0x00000002, + MemoryAllocationFailed = 0x00000004, + ThreadCreated = 0x00000008, + BadDspConnection = 0x00000010, + PreMix = 0x00000020, + PostMix = 0x00000040, + Error = 0x00000080, + ThreadDestroyed = 0x00000100, + PreUpdate = 0x00000200, + PostUpdate = 0x00000400, + RecordListChanged = 0x00000800, + BufferedNoMix = 0x00001000, + DeviceReinitialize = 0x00002000, + OutputUnderrun = 0x00004000, + RecordPositionChanged = 0x00008000, + All = 0xFFFFFFFF, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/TagDataType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/TagDataType.gen.cs new file mode 100644 index 0000000..709f2e1 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/TagDataType.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// List of tag data / metadata types. + /// + /// + /// FMOD_TAGDATATYPE + /// + /// + public enum TagDataType + { + Binary, + Int, + Float, + String, + StringUtf16, + StringUtf16be, + StringUtf8, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/TagType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/TagType.gen.cs new file mode 100644 index 0000000..65c1a44 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/TagType.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// List of tag data / metadata types that could be stored within a sound. These include id3 tags, metadata + /// from netstreams and vorbis/asf data. + /// + /// + /// FMOD_TAGTYPE + /// + /// + public enum TagType + { + Unknown, + Id3v1, + Id3v2, + VorbisComment, + Shoutcast, + Icecast, + Asf, + Midi, + Playlist, + Fmod, + User, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadAffinity.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadAffinity.gen.cs new file mode 100644 index 0000000..d845e24 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadAffinity.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Bitfield for specifying the CPU core a given thread runs on. + /// + /// + /// FMOD_THREAD_AFFINITY + /// + /// + [Flags] + public enum ThreadAffinity : long + { + GroupDefault = 0x4000000000000000, + GroupA = 0x4000000000000001, + GroupB = 0x4000000000000002, + GroupC = 0x4000000000000003, + Mixer = GroupA, + Feeder = GroupC, + Stream = GroupC, + File = GroupC, + NonBlocking = GroupC, + Record = GroupC, + Geometry = GroupC, + Profiler = GroupC, + StudioUpdate = GroupB, + StudioLoadBank = GroupC, + StudioLoadSample = GroupC, + Convolution1 = GroupC, + Convolution2 = GroupC, + CoreAll = 0, + Core0 = 1 << 0, + Core1 = 1 << 1, + Core2 = 1 << 2, + Core3 = 1 << 3, + Core4 = 1 << 4, + Core5 = 1 << 5, + Core6 = 1 << 6, + Core7 = 1 << 7, + Core8 = 1 << 8, + Core9 = 1 << 9, + Core10 = 1 << 10, + Core11 = 1 << 11, + Core12 = 1 << 12, + Core13 = 1 << 13, + Core14 = 1 << 14, + Core15 = 1 << 15, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadPriority.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadPriority.gen.cs new file mode 100644 index 0000000..3445662 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadPriority.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Scheduling priority to assign a given thread to. + /// + /// + /// FMOD_THREAD_PRIORITY + /// + /// + public enum ThreadPriority + { + PlatformMin = -32 * 1024, + PlatformMax = 32 * 1024, + Default = PlatformMin - 1, + Low = PlatformMin - 2, + Medium = PlatformMin - 3, + High = PlatformMin - 4, + VeryHigh = PlatformMin - 5, + Extreme = PlatformMin - 6, + Critical = PlatformMin - 7, + Mixer = Extreme, + Feeder = Critical, + Stream = VeryHigh, + File = High, + NonBlocking = High, + Record = High, + Geometry = Low, + Profiler = Medium, + StudioUpdate = Medium, + StudioLoadBank = Medium, + StudioLoadSample = Medium, + Convolution1 = VeryHigh, + Convolution2 = VeryHigh, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadStackSize.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadStackSize.gen.cs new file mode 100644 index 0000000..2f803ca --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadStackSize.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Stack space available to the given thread. + /// + /// + /// FMOD_THREAD_STACK_SIZE + /// + /// + public enum ThreadStackSize : uint + { + Default = 0, + Mixer = 80 * 1024, + Feeder = 16 * 1024, + Stream = 96 * 1024, + File = 64 * 1024, + NonBlocking = 112 * 1024, + Record = 16 * 1024, + Geometry = 48 * 1024, + Profiler = 128 * 1024, + StudioUpdate = 96 * 1024, + StudioLoadBank = 96 * 1024, + StudioLoadSample = 96 * 1024, + Convolution1 = 16 * 1024, + Convolution2 = 16 * 1024, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadType.gen.cs new file mode 100644 index 0000000..982160f --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/ThreadType.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Named constants for threads created at runtime. + /// + /// + /// FMOD_THREAD_TYPE + /// + /// + public enum ThreadType + { + Mixer, + Feeder, + Stream, + File, + NonBlocking, + Record, + Geometry, + Profiler, + StudioUpdate, + StudioLoadBank, + StudioLoadSample, + Convolution1, + Convolution2, + Max, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Enums/TimeUnit.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Enums/TimeUnit.gen.cs new file mode 100644 index 0000000..3bcb128 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Enums/TimeUnit.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Time types used for position or length. + /// + /// + /// FMOD_TIMEUNIT + /// + /// + [Flags] + public enum TimeUnit : uint + { + Ms = 0x00000001, + Pcm = 0x00000002, + PcmBytes = 0x00000004, + RawBytes = 0x00000008, + PcmFraction = 0x00000010, + ModOrder = 0x00000100, + ModRow = 0x00000200, + ModPattern = 0x00000400, + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Handles.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Handles.gen.cs new file mode 100644 index 0000000..07d2f4a --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Handles.gen.cs @@ -0,0 +1,105 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Handle for a FMOD_SYSTEM. + /// + /// + [InteropHandle] + public readonly unsafe partial struct FmodSystem { } + + /// + /// + /// Handle for a FMOD_SOUND. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Sound { } + + /// + /// + /// Handle for a + /// FMOD_CHANNELCONTROL. + /// + /// + [InteropHandle] + public readonly unsafe partial struct ChannelControl { } + + /// + /// + /// Handle for a FMOD_CHANNEL. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Channel { } + + /// + /// + /// Handle for a + /// FMOD_CHANNELGROUP. + /// + /// + [InteropHandle] + public readonly unsafe partial struct ChannelGroup { } + + /// + /// + /// Handle for a FMOD_SOUNDGROUP. + /// + /// + [InteropHandle] + public readonly unsafe partial struct SoundGroup { } + + /// + /// + /// Handle for a FMOD_REVERB3D. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Reverb3d { } + + /// + /// + /// Handle for a FMOD_DSP. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Dsp { } + + /// + /// + /// Handle for a + /// FMOD_DSPCONNECTION. + /// + /// + [InteropHandle] + public readonly unsafe partial struct DspConnection { } + + /// + /// + /// Handle for a FMOD_POLYGON. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Polygon { } + + /// + /// + /// Handle for a FMOD_GEOMETRY. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Geometry { } + + /// + /// + /// Handle for a FMOD_SYNCPOINT. + /// + /// + [InteropHandle] + public readonly unsafe partial struct SyncPoint { } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Channel.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Channel.gen.cs new file mode 100644 index 0000000..b334cea --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Channel.gen.cs @@ -0,0 +1,1174 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// Channel::getSystemObject + public static unsafe Result TryGetSystemObject(this Channel channel, out FmodSystem system) + { + fixed (FmodSystem* systemPtr = &system) + return PInvoke.ChannelGetSystemObject(channel, systemPtr); + } + + /// Channel::getSystemObject + public static FmodSystem GetSystemObject(this Channel channel) + { + TryGetSystemObject(channel, out var system).Check(); + return system; + } + + /// Channel::stop + public static Result TryStop(this Channel channel) => PInvoke.ChannelStop(channel); + + /// Channel::stop + public static void Stop(this Channel channel) => TryStop(channel).Check(); + + /// Channel::setPaused + public static Result TrySetPaused(this Channel channel, Bool32 paused) => + PInvoke.ChannelSetPaused(channel, paused); + + /// Channel::setPaused + public static void SetPaused(this Channel channel, Bool32 paused) => TrySetPaused(channel, paused).Check(); + + /// Channel::getPaused + public static unsafe Result TryGetPaused(this Channel channel, out Bool32 paused) + { + fixed (Bool32* pausedPtr = &paused) + return PInvoke.ChannelGetPaused(channel, pausedPtr); + } + + /// Channel::getPaused + public static Bool32 GetPaused(this Channel channel) + { + TryGetPaused(channel, out var paused).Check(); + return paused; + } + + /// Channel::setVolume + public static Result TrySetVolume(this Channel channel, float volume) => + PInvoke.ChannelSetVolume(channel, volume); + + /// Channel::setVolume + public static void SetVolume(this Channel channel, float volume) => TrySetVolume(channel, volume).Check(); + + /// Channel::getVolume + public static unsafe Result TryGetVolume(this Channel channel, out float volume) + { + fixed (float* volumePtr = &volume) + return PInvoke.ChannelGetVolume(channel, volumePtr); + } + + /// Channel::getVolume + public static float GetVolume(this Channel channel) + { + TryGetVolume(channel, out var volume).Check(); + return volume; + } + + /// Channel::setVolumeRamp + public static Result TrySetVolumeRamp(this Channel channel, Bool32 ramp) => + PInvoke.ChannelSetVolumeRamp(channel, ramp); + + /// Channel::setVolumeRamp + public static void SetVolumeRamp(this Channel channel, Bool32 ramp) => TrySetVolumeRamp(channel, ramp).Check(); + + /// Channel::getVolumeRamp + public static unsafe Result TryGetVolumeRamp(this Channel channel, out Bool32 ramp) + { + fixed (Bool32* rampPtr = &ramp) + return PInvoke.ChannelGetVolumeRamp(channel, rampPtr); + } + + /// Channel::getVolumeRamp + public static Bool32 GetVolumeRamp(this Channel channel) + { + TryGetVolumeRamp(channel, out var ramp).Check(); + return ramp; + } + + /// Channel::getAudibility + public static unsafe Result TryGetAudibility(this Channel channel, out float audibility) + { + fixed (float* audibilityPtr = &audibility) + return PInvoke.ChannelGetAudibility(channel, audibilityPtr); + } + + /// Channel::getAudibility + public static float GetAudibility(this Channel channel) + { + TryGetAudibility(channel, out var audibility).Check(); + return audibility; + } + + /// Channel::setPitch + public static Result TrySetPitch(this Channel channel, float pitch) => PInvoke.ChannelSetPitch(channel, pitch); + + /// Channel::setPitch + public static void SetPitch(this Channel channel, float pitch) => TrySetPitch(channel, pitch).Check(); + + /// Channel::getPitch + public static unsafe Result TryGetPitch(this Channel channel, out float pitch) + { + fixed (float* pitchPtr = &pitch) + return PInvoke.ChannelGetPitch(channel, pitchPtr); + } + + /// Channel::getPitch + public static float GetPitch(this Channel channel) + { + TryGetPitch(channel, out var pitch).Check(); + return pitch; + } + + /// Channel::setMute + public static Result TrySetMute(this Channel channel, Bool32 mute) => PInvoke.ChannelSetMute(channel, mute); + + /// Channel::setMute + public static void SetMute(this Channel channel, Bool32 mute) => TrySetMute(channel, mute).Check(); + + /// Channel::getMute + public static unsafe Result TryGetMute(this Channel channel, out Bool32 mute) + { + fixed (Bool32* mutePtr = &mute) + return PInvoke.ChannelGetMute(channel, mutePtr); + } + + /// Channel::getMute + public static Bool32 GetMute(this Channel channel) + { + TryGetMute(channel, out var mute).Check(); + return mute; + } + + /// Channel::setReverbProperties + public static Result TrySetReverbProperties(this Channel channel, int instance, float wet) => + PInvoke.ChannelSetReverbProperties(channel, instance, wet); + + /// Channel::setReverbProperties + public static void SetReverbProperties(this Channel channel, int instance, float wet) => + TrySetReverbProperties(channel, instance, wet).Check(); + + /// Channel::getReverbProperties + public static unsafe Result TryGetReverbProperties(this Channel channel, int instance, out float wet) + { + fixed (float* wetPtr = &wet) + return PInvoke.ChannelGetReverbProperties(channel, instance, wetPtr); + } + + /// Channel::getReverbProperties + public static float GetReverbProperties(this Channel channel, int instance) + { + TryGetReverbProperties(channel, instance, out var wet).Check(); + return wet; + } + + /// Channel::setLowPassGain + public static Result TrySetLowPassGain(this Channel channel, float gain) => + PInvoke.ChannelSetLowPassGain(channel, gain); + + /// Channel::setLowPassGain + public static void SetLowPassGain(this Channel channel, float gain) => TrySetLowPassGain(channel, gain).Check(); + + /// Channel::getLowPassGain + public static unsafe Result TryGetLowPassGain(this Channel channel, out float gain) + { + fixed (float* gainPtr = &gain) + return PInvoke.ChannelGetLowPassGain(channel, gainPtr); + } + + /// Channel::getLowPassGain + public static float GetLowPassGain(this Channel channel) + { + TryGetLowPassGain(channel, out var gain).Check(); + return gain; + } + + /// Channel::setMode + public static Result TrySetMode(this Channel channel, Mode mode) => PInvoke.ChannelSetMode(channel, mode); + + /// Channel::setMode + public static void SetMode(this Channel channel, Mode mode) => TrySetMode(channel, mode).Check(); + + /// Channel::getMode + public static unsafe Result TryGetMode(this Channel channel, out Mode mode) + { + fixed (Mode* modePtr = &mode) + return PInvoke.ChannelGetMode(channel, modePtr); + } + + /// Channel::getMode + public static Mode GetMode(this Channel channel) + { + TryGetMode(channel, out var mode).Check(); + return mode; + } + + /// Channel::setCallback + public static Result TrySetCallback(this Channel channel, ChannelControlCallbackPtr callback) => + PInvoke.ChannelSetCallback(channel, callback); + + /// Channel::setCallback + public static void SetCallback(this Channel channel, ChannelControlCallbackPtr callback) => + TrySetCallback(channel, callback).Check(); + + /// Channel::isPlaying + public static unsafe Result TryIsPlaying(this Channel channel, out Bool32 isPlaying) + { + fixed (Bool32* isPlayingPtr = &isPlaying) + return PInvoke.ChannelIsPlaying(channel, isPlayingPtr); + } + + /// Channel::isPlaying + public static Bool32 IsPlaying(this Channel channel) + { + TryIsPlaying(channel, out var isPlaying).Check(); + return isPlaying; + } + + /// Channel::setPan + public static Result TrySetPan(this Channel channel, float pan) => PInvoke.ChannelSetPan(channel, pan); + + /// Channel::setPan + public static void SetPan(this Channel channel, float pan) => TrySetPan(channel, pan).Check(); + + /// Channel::setMixLevelsOutput + public static Result TrySetMixLevelsOutput( + this Channel channel, + float frontLeft, + float frontRight, + float center, + float lfe, + float surroundLeft, + float surroundRight, + float backLeft, + float backRight + ) => + PInvoke.ChannelSetMixLevelsOutput( + channel, + frontLeft, + frontRight, + center, + lfe, + surroundLeft, + surroundRight, + backLeft, + backRight + ); + + /// Channel::setMixLevelsOutput + public static void SetMixLevelsOutput( + this Channel channel, + float frontLeft, + float frontRight, + float center, + float lfe, + float surroundLeft, + float surroundRight, + float backLeft, + float backRight + ) => + TrySetMixLevelsOutput( + channel, + frontLeft, + frontRight, + center, + lfe, + surroundLeft, + surroundRight, + backLeft, + backRight + ) + .Check(); + + /// Channel::setMixLevelsInput + public static unsafe Result TrySetMixLevelsInput(this Channel channel, float* levels, int numLevels) => + PInvoke.ChannelSetMixLevelsInput(channel, levels, numLevels); + + /// Channel::setMixLevelsInput + public static unsafe void SetMixLevelsInput(this Channel channel, float* levels, int numLevels) => + TrySetMixLevelsInput(channel, levels, numLevels).Check(); + + /// Channel::setMixMatrix + public static unsafe Result TrySetMixMatrix( + this Channel channel, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ) => PInvoke.ChannelSetMixMatrix(channel, matrix, outChannels, inChannels, inChannelHop); + + /// Channel::setMixMatrix + public static unsafe void SetMixMatrix( + this Channel channel, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ) => TrySetMixMatrix(channel, matrix, outChannels, inChannels, inChannelHop).Check(); + + /// Channel::getMixMatrix + public static unsafe Result TryGetMixMatrix( + this Channel channel, + float* matrix, + out int outChannels, + out int inChannels, + int inChannelHop + ) + { + fixed (int* outChannelsPtr = &outChannels) + fixed (int* inChannelsPtr = &inChannels) + return PInvoke.ChannelGetMixMatrix(channel, matrix, outChannelsPtr, inChannelsPtr, inChannelHop); + } + + /// Channel::getMixMatrix + public static unsafe void GetMixMatrix( + this Channel channel, + float* matrix, + out int outChannels, + out int inChannels, + int inChannelHop + ) => TryGetMixMatrix(channel, matrix, out outChannels, out inChannels, inChannelHop).Check(); + + /// Channel::getDSPClock + public static unsafe Result TryGetDspClock(this Channel channel, out ulong dspClock, out ulong parentClock) + { + fixed (ulong* dspClockPtr = &dspClock) + fixed (ulong* parentClockPtr = &parentClock) + return PInvoke.ChannelGetDspClock(channel, dspClockPtr, parentClockPtr); + } + + /// Channel::getDSPClock + public static void GetDspClock(this Channel channel, out ulong dspClock, out ulong parentClock) => + TryGetDspClock(channel, out dspClock, out parentClock).Check(); + + /// Channel::setDelay + public static Result TrySetDelay( + this Channel channel, + ulong dspClockStart, + ulong dspClockEnd, + Bool32 stopChannels + ) => PInvoke.ChannelSetDelay(channel, dspClockStart, dspClockEnd, stopChannels); + + /// Channel::setDelay + public static void SetDelay( + this Channel channel, + ulong dspClockStart, + ulong dspClockEnd, + Bool32 stopChannels + ) => TrySetDelay(channel, dspClockStart, dspClockEnd, stopChannels).Check(); + + /// Channel::getDelay + public static unsafe Result TryGetDelay( + this Channel channel, + out ulong dspClockStart, + out ulong dspClockEnd, + out Bool32 stopChannels + ) + { + fixed (ulong* dspClockStartPtr = &dspClockStart) + fixed (ulong* dspClockEndPtr = &dspClockEnd) + fixed (Bool32* stopChannelsPtr = &stopChannels) + return PInvoke.ChannelGetDelay(channel, dspClockStartPtr, dspClockEndPtr, stopChannelsPtr); + } + + /// Channel::getDelay + public static void GetDelay( + this Channel channel, + out ulong dspClockStart, + out ulong dspClockEnd, + out Bool32 stopChannels + ) => TryGetDelay(channel, out dspClockStart, out dspClockEnd, out stopChannels).Check(); + + /// Channel::addFadePoint + public static Result TryAddFadePoint(this Channel channel, ulong dspClock, float volume) => + PInvoke.ChannelAddFadePoint(channel, dspClock, volume); + + /// Channel::addFadePoint + public static void AddFadePoint(this Channel channel, ulong dspClock, float volume) => + TryAddFadePoint(channel, dspClock, volume).Check(); + + /// Channel::setFadePointRamp + public static Result TrySetFadePointRamp(this Channel channel, ulong dspClock, float volume) => + PInvoke.ChannelSetFadePointRamp(channel, dspClock, volume); + + /// Channel::setFadePointRamp + public static void SetFadePointRamp(this Channel channel, ulong dspClock, float volume) => + TrySetFadePointRamp(channel, dspClock, volume).Check(); + + /// Channel::removeFadePoints + public static Result TryRemoveFadePoints(this Channel channel, ulong dspClockStart, ulong dspClockEnd) => + PInvoke.ChannelRemoveFadePoints(channel, dspClockStart, dspClockEnd); + + /// Channel::removeFadePoints + public static void RemoveFadePoints(this Channel channel, ulong dspClockStart, ulong dspClockEnd) => + TryRemoveFadePoints(channel, dspClockStart, dspClockEnd).Check(); + + /// Channel::getFadePoints + public static unsafe Result TryGetFadePoints( + this Channel channel, + uint* numPoints, + ulong* pointDspClock, + float* pointVolume + ) => PInvoke.ChannelGetFadePoints(channel, numPoints, pointDspClock, pointVolume); + + /// Channel::getFadePoints + public static unsafe void GetFadePoints( + this Channel channel, + uint* numPoints, + ulong* pointDspClock, + float* pointVolume + ) => TryGetFadePoints(channel, numPoints, pointDspClock, pointVolume).Check(); + + /// Channel::getDSP + public static unsafe Result TryGetDsp(this Channel channel, int index, out Dsp dsp) + { + fixed (Dsp* dspPtr = &dsp) + return PInvoke.ChannelGetDsp(channel, index, dspPtr); + } + + /// Channel::getDSP + public static Dsp GetDsp(this Channel channel, int index) + { + TryGetDsp(channel, index, out var dsp).Check(); + return dsp; + } + + /// Channel::addDSP + public static Result TryAddDsp(this Channel channel, int index, Dsp dsp) => + PInvoke.ChannelAddDsp(channel, index, dsp); + + /// Channel::addDSP + public static void AddDsp(this Channel channel, int index, Dsp dsp) => TryAddDsp(channel, index, dsp).Check(); + + /// Channel::removeDSP + public static Result TryRemoveDsp(this Channel channel, Dsp dsp) => PInvoke.ChannelRemoveDsp(channel, dsp); + + /// Channel::removeDSP + public static void RemoveDsp(this Channel channel, Dsp dsp) => TryRemoveDsp(channel, dsp).Check(); + + /// Channel::getNumDSPs + public static unsafe Result TryGetNumDsps(this Channel channel, out int numDsps) + { + fixed (int* numDspsPtr = &numDsps) + return PInvoke.ChannelGetNumDsps(channel, numDspsPtr); + } + + /// Channel::getNumDSPs + public static int GetNumDsps(this Channel channel) + { + TryGetNumDsps(channel, out var numDsps).Check(); + return numDsps; + } + + /// Channel::setDSPIndex + public static Result TrySetDspIndex(this Channel channel, Dsp dsp, int index) => + PInvoke.ChannelSetDspIndex(channel, dsp, index); + + /// Channel::setDSPIndex + public static void SetDspIndex(this Channel channel, Dsp dsp, int index) => + TrySetDspIndex(channel, dsp, index).Check(); + + /// Channel::getDSPIndex + public static unsafe Result TryGetDspIndex(this Channel channel, Dsp dsp, out int index) + { + fixed (int* indexPtr = &index) + return PInvoke.ChannelGetDspIndex(channel, dsp, indexPtr); + } + + /// Channel::getDSPIndex + public static int GetDspIndex(this Channel channel, Dsp dsp) + { + TryGetDspIndex(channel, dsp, out var index).Check(); + return index; + } + + /// Channel::set3DAttributes + public static unsafe Result TrySet3dAttributes(this Channel channel, in float3 pos, in float3 vel) + { + fixed (float3* posPtr = &pos) + fixed (float3* velPtr = &vel) + return PInvoke.ChannelSet3dAttributes(channel, posPtr, velPtr); + } + + /// Channel::set3DAttributes + public static void Set3dAttributes(this Channel channel, in float3 pos, in float3 vel) => + TrySet3dAttributes(channel, pos, vel).Check(); + + /// Channel::get3DAttributes + public static unsafe Result TryGet3dAttributes(this Channel channel, out float3 pos, out float3 vel) + { + fixed (float3* posPtr = &pos) + fixed (float3* velPtr = &vel) + return PInvoke.ChannelGet3dAttributes(channel, posPtr, velPtr); + } + + /// Channel::get3DAttributes + public static void Get3dAttributes(this Channel channel, out float3 pos, out float3 vel) => + TryGet3dAttributes(channel, out pos, out vel).Check(); + + /// Channel::set3DMinMaxDistance + public static Result TrySet3dMinMaxDistance(this Channel channel, float minDistance, float maxDistance) => + PInvoke.ChannelSet3dMinMaxDistance(channel, minDistance, maxDistance); + + /// Channel::set3DMinMaxDistance + public static void Set3dMinMaxDistance(this Channel channel, float minDistance, float maxDistance) => + TrySet3dMinMaxDistance(channel, minDistance, maxDistance).Check(); + + /// Channel::get3DMinMaxDistance + public static unsafe Result TryGet3dMinMaxDistance( + this Channel channel, + out float minDistance, + out float maxDistance + ) + { + fixed (float* minDistancePtr = &minDistance) + fixed (float* maxDistancePtr = &maxDistance) + return PInvoke.ChannelGet3dMinMaxDistance(channel, minDistancePtr, maxDistancePtr); + } + + /// Channel::get3DMinMaxDistance + public static void Get3dMinMaxDistance(this Channel channel, out float minDistance, out float maxDistance) => + TryGet3dMinMaxDistance(channel, out minDistance, out maxDistance).Check(); + + /// Channel::set3DConeSettings + public static Result TrySet3dConeSettings( + this Channel channel, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ) => PInvoke.ChannelSet3dConeSettings(channel, insideConeAngle, outsideConeAngle, outsideVolume); + + /// Channel::set3DConeSettings + public static void Set3dConeSettings( + this Channel channel, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ) => TrySet3dConeSettings(channel, insideConeAngle, outsideConeAngle, outsideVolume).Check(); + + /// Channel::get3DConeSettings + public static unsafe Result TryGet3dConeSettings( + this Channel channel, + out float insideConeAngle, + out float outsideConeAngle, + out float outsideVolume + ) + { + fixed (float* insideConeAnglePtr = &insideConeAngle) + fixed (float* outsideConeAnglePtr = &outsideConeAngle) + fixed (float* outsideVolumePtr = &outsideVolume) + return PInvoke.ChannelGet3dConeSettings( + channel, + insideConeAnglePtr, + outsideConeAnglePtr, + outsideVolumePtr + ); + } + + /// Channel::get3DConeSettings + public static void Get3dConeSettings( + this Channel channel, + out float insideConeAngle, + out float outsideConeAngle, + out float outsideVolume + ) => TryGet3dConeSettings(channel, out insideConeAngle, out outsideConeAngle, out outsideVolume).Check(); + + /// Channel::set3DConeOrientation + public static unsafe Result TrySet3dConeOrientation(this Channel channel, in float3 orientation) + { + fixed (float3* orientationPtr = &orientation) + return PInvoke.ChannelSet3dConeOrientation(channel, orientationPtr); + } + + /// Channel::set3DConeOrientation + public static void Set3dConeOrientation(this Channel channel, in float3 orientation) => + TrySet3dConeOrientation(channel, orientation).Check(); + + /// Channel::get3DConeOrientation + public static unsafe Result TryGet3dConeOrientation(this Channel channel, out float3 orientation) + { + fixed (float3* orientationPtr = &orientation) + return PInvoke.ChannelGet3dConeOrientation(channel, orientationPtr); + } + + /// Channel::get3DConeOrientation + public static float3 Get3dConeOrientation(this Channel channel) + { + TryGet3dConeOrientation(channel, out var orientation).Check(); + return orientation; + } + + /// Channel::set3DCustomRolloff + public static unsafe Result TrySet3dCustomRolloff(this Channel channel, float3* points, int numPoints) => + PInvoke.ChannelSet3dCustomRolloff(channel, points, numPoints); + + /// Channel::set3DCustomRolloff + public static unsafe void Set3dCustomRolloff(this Channel channel, float3* points, int numPoints) => + TrySet3dCustomRolloff(channel, points, numPoints).Check(); + + /// Channel::get3DCustomRolloff + public static unsafe Result TryGet3dCustomRolloff(this Channel channel, out float3* points, out int numPoints) + { + fixed (float3** pointsPtr = &points) + fixed (int* numPointsPtr = &numPoints) + return PInvoke.ChannelGet3dCustomRolloff(channel, pointsPtr, numPointsPtr); + } + + /// Channel::get3DCustomRolloff + public static unsafe void Get3dCustomRolloff(this Channel channel, out float3* points, out int numPoints) => + TryGet3dCustomRolloff(channel, out points, out numPoints).Check(); + + /// Channel::set3DOcclusion + public static Result TrySet3dOcclusion(this Channel channel, float directOcclusion, float reverbOcclusion) => + PInvoke.ChannelSet3dOcclusion(channel, directOcclusion, reverbOcclusion); + + /// Channel::set3DOcclusion + public static void Set3dOcclusion(this Channel channel, float directOcclusion, float reverbOcclusion) => + TrySet3dOcclusion(channel, directOcclusion, reverbOcclusion).Check(); + + /// Channel::get3DOcclusion + public static unsafe Result TryGet3dOcclusion( + this Channel channel, + out float directOcclusion, + out float reverbOcclusion + ) + { + fixed (float* directOcclusionPtr = &directOcclusion) + fixed (float* reverbOcclusionPtr = &reverbOcclusion) + return PInvoke.ChannelGet3dOcclusion(channel, directOcclusionPtr, reverbOcclusionPtr); + } + + /// Channel::get3DOcclusion + public static void Get3dOcclusion(this Channel channel, out float directOcclusion, out float reverbOcclusion) => + TryGet3dOcclusion(channel, out directOcclusion, out reverbOcclusion).Check(); + + /// Channel::set3DSpread + public static Result TrySet3dSpread(this Channel channel, float angle) => + PInvoke.ChannelSet3dSpread(channel, angle); + + /// Channel::set3DSpread + public static void Set3dSpread(this Channel channel, float angle) => TrySet3dSpread(channel, angle).Check(); + + /// Channel::get3DSpread + public static unsafe Result TryGet3dSpread(this Channel channel, out float angle) + { + fixed (float* anglePtr = &angle) + return PInvoke.ChannelGet3dSpread(channel, anglePtr); + } + + /// Channel::get3DSpread + public static float Get3dSpread(this Channel channel) + { + TryGet3dSpread(channel, out var angle).Check(); + return angle; + } + + /// Channel::set3DLevel + public static Result TrySet3dLevel(this Channel channel, float level) => + PInvoke.ChannelSet3dLevel(channel, level); + + /// Channel::set3DLevel + public static void Set3dLevel(this Channel channel, float level) => TrySet3dLevel(channel, level).Check(); + + /// Channel::get3DLevel + public static unsafe Result TryGet3dLevel(this Channel channel, out float level) + { + fixed (float* levelPtr = &level) + return PInvoke.ChannelGet3dLevel(channel, levelPtr); + } + + /// Channel::get3DLevel + public static float Get3dLevel(this Channel channel) + { + TryGet3dLevel(channel, out var level).Check(); + return level; + } + + /// Channel::set3DDopplerLevel + public static Result TrySet3dDopplerLevel(this Channel channel, float level) => + PInvoke.ChannelSet3dDopplerLevel(channel, level); + + /// Channel::set3DDopplerLevel + public static void Set3dDopplerLevel(this Channel channel, float level) => + TrySet3dDopplerLevel(channel, level).Check(); + + /// Channel::get3DDopplerLevel + public static unsafe Result TryGet3dDopplerLevel(this Channel channel, out float level) + { + fixed (float* levelPtr = &level) + return PInvoke.ChannelGet3dDopplerLevel(channel, levelPtr); + } + + /// Channel::get3DDopplerLevel + public static float Get3dDopplerLevel(this Channel channel) + { + TryGet3dDopplerLevel(channel, out var level).Check(); + return level; + } + + /// Channel::set3DDistanceFilter + public static Result TrySet3dDistanceFilter( + this Channel channel, + Bool32 custom, + float customLevel, + float centerFreq + ) => PInvoke.ChannelSet3dDistanceFilter(channel, custom, customLevel, centerFreq); + + /// Channel::set3DDistanceFilter + public static void Set3dDistanceFilter( + this Channel channel, + Bool32 custom, + float customLevel, + float centerFreq + ) => TrySet3dDistanceFilter(channel, custom, customLevel, centerFreq).Check(); + + /// Channel::get3DDistanceFilter + public static unsafe Result TryGet3dDistanceFilter( + this Channel channel, + out Bool32 custom, + out float customLevel, + out float centerFreq + ) + { + fixed (Bool32* customPtr = &custom) + fixed (float* customLevelPtr = &customLevel) + fixed (float* centerFreqPtr = ¢erFreq) + return PInvoke.ChannelGet3dDistanceFilter(channel, customPtr, customLevelPtr, centerFreqPtr); + } + + /// Channel::get3DDistanceFilter + public static void Get3dDistanceFilter( + this Channel channel, + out Bool32 custom, + out float customLevel, + out float centerFreq + ) => TryGet3dDistanceFilter(channel, out custom, out customLevel, out centerFreq).Check(); + + /// Channel::setUserData + public static Result TrySetUserData(this Channel channel, nint userData) => + PInvoke.ChannelSetUserData(channel, userData); + + /// Channel::setUserData + public static void SetUserData(this Channel channel, nint userData) => + TrySetUserData(channel, userData).Check(); + + /// Channel::getUserData + public static unsafe Result TryGetUserData(this Channel channel, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.ChannelGetUserData(channel, userDataPtr); + } + + /// Channel::getUserData + public static nint GetUserData(this Channel channel) + { + TryGetUserData(channel, out var userData).Check(); + return userData; + } + + /// + /// + /// Sets the frequency or playback rate. + /// + /// + /// Channel::setFrequency + /// + /// + public static Result TrySetFrequency(this Channel channel, float frequency) => + PInvoke.ChannelSetFrequency(channel, frequency); + + /// + /// + /// Sets the frequency or playback rate. + /// + /// + /// Channel::setFrequency + /// + /// + public static void SetFrequency(this Channel channel, float frequency) => + TrySetFrequency(channel, frequency).Check(); + + /// + /// + /// Retrieves the playback frequency or playback rate. + /// + /// + /// Channel::getFrequency + /// + /// + public static unsafe Result TryGetFrequency(this Channel channel, out float frequency) + { + fixed (float* frequencyPtr = &frequency) + return PInvoke.ChannelGetFrequency(channel, frequencyPtr); + } + + /// + /// + /// Retrieves the playback frequency or playback rate. + /// + /// + /// Channel::getFrequency + /// + /// + public static float GetFrequency(this Channel channel) + { + TryGetFrequency(channel, out var frequency).Check(); + return frequency; + } + + /// + /// + /// Sets the priority used for virtual voice ordering. + /// + /// + /// Channel::setPriority + /// + /// + public static Result TrySetPriority(this Channel channel, int priority) => + PInvoke.ChannelSetPriority(channel, priority); + + /// + /// + /// Sets the priority used for virtual voice ordering. + /// + /// + /// Channel::setPriority + /// + /// + public static void SetPriority(this Channel channel, int priority) => TrySetPriority(channel, priority).Check(); + + /// + /// + /// Retrieves the priority used for virtual voice ordering. + /// + /// + /// Channel::getPriority + /// + /// + public static unsafe Result TryGetPriority(this Channel channel, out int priority) + { + fixed (int* priorityPtr = &priority) + return PInvoke.ChannelGetPriority(channel, priorityPtr); + } + + /// + /// + /// Retrieves the priority used for virtual voice ordering. + /// + /// + /// Channel::getPriority + /// + /// + public static int GetPriority(this Channel channel) + { + TryGetPriority(channel, out var priority).Check(); + return priority; + } + + /// + /// + /// Sets the current playback position. + /// + /// + /// Channel::setPosition + /// + /// + public static Result TrySetPosition(this Channel channel, uint position, TimeUnit posType) => + PInvoke.ChannelSetPosition(channel, position, posType); + + /// + /// + /// Sets the current playback position. + /// + /// + /// Channel::setPosition + /// + /// + public static void SetPosition(this Channel channel, uint position, TimeUnit posType) => + TrySetPosition(channel, position, posType).Check(); + + /// + /// + /// Retrieves the current playback position. + /// + /// + /// Channel::getPosition + /// + /// + public static unsafe Result TryGetPosition(this Channel channel, out uint position, TimeUnit posType) + { + fixed (uint* positionPtr = &position) + return PInvoke.ChannelGetPosition(channel, positionPtr, posType); + } + + /// + /// + /// Retrieves the current playback position. + /// + /// + /// Channel::getPosition + /// + /// + public static uint GetPosition(this Channel channel, TimeUnit posType) + { + TryGetPosition(channel, out var position, posType).Check(); + return position; + } + + /// + /// + /// Sets the ChannelGroup this object outputs to. + /// + /// + /// Channel::setChannelGroup + /// + /// + public static Result TrySetChannelGroup(this Channel channel, ChannelGroup channelGroup) => + PInvoke.ChannelSetChannelGroup(channel, channelGroup); + + /// + /// + /// Sets the ChannelGroup this object outputs to. + /// + /// + /// Channel::setChannelGroup + /// + /// + public static void SetChannelGroup(this Channel channel, ChannelGroup channelGroup) => + TrySetChannelGroup(channel, channelGroup).Check(); + + /// + /// + /// Retrieves the ChannelGroup this object outputs to. + /// + /// + /// Channel::getChannelGroup + /// + /// + public static unsafe Result TryGetChannelGroup(this Channel channel, out ChannelGroup channelGroup) + { + fixed (ChannelGroup* channelGroupPtr = &channelGroup) + return PInvoke.ChannelGetChannelGroup(channel, channelGroupPtr); + } + + /// + /// + /// Retrieves the ChannelGroup this object outputs to. + /// + /// + /// Channel::getChannelGroup + /// + /// + public static ChannelGroup GetChannelGroup(this Channel channel) + { + TryGetChannelGroup(channel, out var channelGroup).Check(); + return channelGroup; + } + + /// + /// + /// Sets the number of times to loop before stopping. + /// + /// + /// Channel::setLoopCount + /// + /// + public static Result TrySetLoopCount(this Channel channel, int loopCount) => + PInvoke.ChannelSetLoopCount(channel, loopCount); + + /// + /// + /// Sets the number of times to loop before stopping. + /// + /// + /// Channel::setLoopCount + /// + /// + public static void SetLoopCount(this Channel channel, int loopCount) => + TrySetLoopCount(channel, loopCount).Check(); + + /// + /// + /// Retrieves the number of times to loop before stopping. + /// + /// + /// Channel::getLoopCount + /// + /// + public static unsafe Result TryGetLoopCount(this Channel channel, out int loopCount) + { + fixed (int* loopCountPtr = &loopCount) + return PInvoke.ChannelGetLoopCount(channel, loopCountPtr); + } + + /// + /// + /// Retrieves the number of times to loop before stopping. + /// + /// + /// Channel::getLoopCount + /// + /// + public static int GetLoopCount(this Channel channel) + { + TryGetLoopCount(channel, out var loopCount).Check(); + return loopCount; + } + + /// + /// + /// Sets the loop start and end points. + /// + /// + /// Channel::setLoopPoints + /// + /// + public static Result TrySetLoopPoints( + this Channel channel, + uint loopStart, + TimeUnit loopStartType, + uint loopEnd, + TimeUnit loopEndType + ) => PInvoke.ChannelSetLoopPoints(channel, loopStart, loopStartType, loopEnd, loopEndType); + + /// + /// + /// Sets the loop start and end points. + /// + /// + /// Channel::setLoopPoints + /// + /// + public static void SetLoopPoints( + this Channel channel, + uint loopStart, + TimeUnit loopStartType, + uint loopEnd, + TimeUnit loopEndType + ) => TrySetLoopPoints(channel, loopStart, loopStartType, loopEnd, loopEndType).Check(); + + /// + /// + /// Retrieves the loop start and end points. + /// + /// + /// Channel::getLoopPoints + /// + /// + public static unsafe Result TryGetLoopPoints( + this Channel channel, + out uint loopStart, + TimeUnit loopStartType, + out uint loopEnd, + TimeUnit loopEndType + ) + { + fixed (uint* loopStartPtr = &loopStart) + fixed (uint* loopEndPtr = &loopEnd) + return PInvoke.ChannelGetLoopPoints(channel, loopStartPtr, loopStartType, loopEndPtr, loopEndType); + } + + /// + /// + /// Retrieves the loop start and end points. + /// + /// + /// Channel::getLoopPoints + /// + /// + public static void GetLoopPoints( + this Channel channel, + out uint loopStart, + TimeUnit loopStartType, + out uint loopEnd, + TimeUnit loopEndType + ) => TryGetLoopPoints(channel, out loopStart, loopStartType, out loopEnd, loopEndType).Check(); + + /// + /// + /// Retrieves whether the Channel is being emulated by the virtual voice system. + /// + /// + /// Channel::isVirtual + /// + /// + public static unsafe Result TryIsVirtual(this Channel channel, out Bool32 isVirtual) + { + fixed (Bool32* isVirtualPtr = &isVirtual) + return PInvoke.ChannelIsVirtual(channel, isVirtualPtr); + } + + /// + /// + /// Retrieves whether the Channel is being emulated by the virtual voice system. + /// + /// + /// Channel::isVirtual + /// + /// + public static Bool32 IsVirtual(this Channel channel) + { + TryIsVirtual(channel, out var isVirtual).Check(); + return isVirtual; + } + + /// + /// + /// Retrieves the currently playing Sound. + /// + /// + /// Channel::getCurrentSound + /// + /// + public static unsafe Result TryGetCurrentSound(this Channel channel, out Sound sound) + { + fixed (Sound* soundPtr = &sound) + return PInvoke.ChannelGetCurrentSound(channel, soundPtr); + } + + /// + /// + /// Retrieves the currently playing Sound. + /// + /// + /// Channel::getCurrentSound + /// + /// + public static Sound GetCurrentSound(this Channel channel) + { + TryGetCurrentSound(channel, out var sound).Check(); + return sound; + } + + /// + /// + /// Retrieves the index of this object in the System Channel pool. + /// + /// + /// Channel::getIndex + /// + /// + public static unsafe Result TryGetIndex(this Channel channel, out int index) + { + fixed (int* indexPtr = &index) + return PInvoke.ChannelGetIndex(channel, indexPtr); + } + + /// + /// + /// Retrieves the index of this object in the System Channel pool. + /// + /// + /// Channel::getIndex + /// + /// + public static int GetIndex(this Channel channel) + { + TryGetIndex(channel, out var index).Check(); + return index; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.ChannelGroup.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.ChannelGroup.gen.cs new file mode 100644 index 0000000..66213f7 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.ChannelGroup.gen.cs @@ -0,0 +1,1059 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// ChannelGroup::getSystemObject + public static unsafe Result TryGetSystemObject(this ChannelGroup channelGroup, out FmodSystem system) + { + fixed (FmodSystem* systemPtr = &system) + return PInvoke.ChannelGroupGetSystemObject(channelGroup, systemPtr); + } + + /// ChannelGroup::getSystemObject + public static FmodSystem GetSystemObject(this ChannelGroup channelGroup) + { + TryGetSystemObject(channelGroup, out var system).Check(); + return system; + } + + /// ChannelGroup::stop + public static Result TryStop(this ChannelGroup channelGroup) => PInvoke.ChannelGroupStop(channelGroup); + + /// ChannelGroup::stop + public static void Stop(this ChannelGroup channelGroup) => TryStop(channelGroup).Check(); + + /// ChannelGroup::setPaused + public static Result TrySetPaused(this ChannelGroup channelGroup, Bool32 paused) => + PInvoke.ChannelGroupSetPaused(channelGroup, paused); + + /// ChannelGroup::setPaused + public static void SetPaused(this ChannelGroup channelGroup, Bool32 paused) => + TrySetPaused(channelGroup, paused).Check(); + + /// ChannelGroup::getPaused + public static unsafe Result TryGetPaused(this ChannelGroup channelGroup, out Bool32 paused) + { + fixed (Bool32* pausedPtr = &paused) + return PInvoke.ChannelGroupGetPaused(channelGroup, pausedPtr); + } + + /// ChannelGroup::getPaused + public static Bool32 GetPaused(this ChannelGroup channelGroup) + { + TryGetPaused(channelGroup, out var paused).Check(); + return paused; + } + + /// ChannelGroup::setVolume + public static Result TrySetVolume(this ChannelGroup channelGroup, float volume) => + PInvoke.ChannelGroupSetVolume(channelGroup, volume); + + /// ChannelGroup::setVolume + public static void SetVolume(this ChannelGroup channelGroup, float volume) => + TrySetVolume(channelGroup, volume).Check(); + + /// ChannelGroup::getVolume + public static unsafe Result TryGetVolume(this ChannelGroup channelGroup, out float volume) + { + fixed (float* volumePtr = &volume) + return PInvoke.ChannelGroupGetVolume(channelGroup, volumePtr); + } + + /// ChannelGroup::getVolume + public static float GetVolume(this ChannelGroup channelGroup) + { + TryGetVolume(channelGroup, out var volume).Check(); + return volume; + } + + /// ChannelGroup::setVolumeRamp + public static Result TrySetVolumeRamp(this ChannelGroup channelGroup, Bool32 ramp) => + PInvoke.ChannelGroupSetVolumeRamp(channelGroup, ramp); + + /// ChannelGroup::setVolumeRamp + public static void SetVolumeRamp(this ChannelGroup channelGroup, Bool32 ramp) => + TrySetVolumeRamp(channelGroup, ramp).Check(); + + /// ChannelGroup::getVolumeRamp + public static unsafe Result TryGetVolumeRamp(this ChannelGroup channelGroup, out Bool32 ramp) + { + fixed (Bool32* rampPtr = &ramp) + return PInvoke.ChannelGroupGetVolumeRamp(channelGroup, rampPtr); + } + + /// ChannelGroup::getVolumeRamp + public static Bool32 GetVolumeRamp(this ChannelGroup channelGroup) + { + TryGetVolumeRamp(channelGroup, out var ramp).Check(); + return ramp; + } + + /// ChannelGroup::getAudibility + public static unsafe Result TryGetAudibility(this ChannelGroup channelGroup, out float audibility) + { + fixed (float* audibilityPtr = &audibility) + return PInvoke.ChannelGroupGetAudibility(channelGroup, audibilityPtr); + } + + /// ChannelGroup::getAudibility + public static float GetAudibility(this ChannelGroup channelGroup) + { + TryGetAudibility(channelGroup, out var audibility).Check(); + return audibility; + } + + /// ChannelGroup::setPitch + public static Result TrySetPitch(this ChannelGroup channelGroup, float pitch) => + PInvoke.ChannelGroupSetPitch(channelGroup, pitch); + + /// ChannelGroup::setPitch + public static void SetPitch(this ChannelGroup channelGroup, float pitch) => + TrySetPitch(channelGroup, pitch).Check(); + + /// ChannelGroup::getPitch + public static unsafe Result TryGetPitch(this ChannelGroup channelGroup, out float pitch) + { + fixed (float* pitchPtr = &pitch) + return PInvoke.ChannelGroupGetPitch(channelGroup, pitchPtr); + } + + /// ChannelGroup::getPitch + public static float GetPitch(this ChannelGroup channelGroup) + { + TryGetPitch(channelGroup, out var pitch).Check(); + return pitch; + } + + /// ChannelGroup::setMute + public static Result TrySetMute(this ChannelGroup channelGroup, Bool32 mute) => + PInvoke.ChannelGroupSetMute(channelGroup, mute); + + /// ChannelGroup::setMute + public static void SetMute(this ChannelGroup channelGroup, Bool32 mute) => + TrySetMute(channelGroup, mute).Check(); + + /// ChannelGroup::getMute + public static unsafe Result TryGetMute(this ChannelGroup channelGroup, out Bool32 mute) + { + fixed (Bool32* mutePtr = &mute) + return PInvoke.ChannelGroupGetMute(channelGroup, mutePtr); + } + + /// ChannelGroup::getMute + public static Bool32 GetMute(this ChannelGroup channelGroup) + { + TryGetMute(channelGroup, out var mute).Check(); + return mute; + } + + /// ChannelGroup::setReverbProperties + public static Result TrySetReverbProperties(this ChannelGroup channelGroup, int instance, float wet) => + PInvoke.ChannelGroupSetReverbProperties(channelGroup, instance, wet); + + /// ChannelGroup::setReverbProperties + public static void SetReverbProperties(this ChannelGroup channelGroup, int instance, float wet) => + TrySetReverbProperties(channelGroup, instance, wet).Check(); + + /// ChannelGroup::getReverbProperties + public static unsafe Result TryGetReverbProperties(this ChannelGroup channelGroup, int instance, out float wet) + { + fixed (float* wetPtr = &wet) + return PInvoke.ChannelGroupGetReverbProperties(channelGroup, instance, wetPtr); + } + + /// ChannelGroup::getReverbProperties + public static float GetReverbProperties(this ChannelGroup channelGroup, int instance) + { + TryGetReverbProperties(channelGroup, instance, out var wet).Check(); + return wet; + } + + /// ChannelGroup::setLowPassGain + public static Result TrySetLowPassGain(this ChannelGroup channelGroup, float gain) => + PInvoke.ChannelGroupSetLowPassGain(channelGroup, gain); + + /// ChannelGroup::setLowPassGain + public static void SetLowPassGain(this ChannelGroup channelGroup, float gain) => + TrySetLowPassGain(channelGroup, gain).Check(); + + /// ChannelGroup::getLowPassGain + public static unsafe Result TryGetLowPassGain(this ChannelGroup channelGroup, out float gain) + { + fixed (float* gainPtr = &gain) + return PInvoke.ChannelGroupGetLowPassGain(channelGroup, gainPtr); + } + + /// ChannelGroup::getLowPassGain + public static float GetLowPassGain(this ChannelGroup channelGroup) + { + TryGetLowPassGain(channelGroup, out var gain).Check(); + return gain; + } + + /// ChannelGroup::setMode + public static Result TrySetMode(this ChannelGroup channelGroup, Mode mode) => + PInvoke.ChannelGroupSetMode(channelGroup, mode); + + /// ChannelGroup::setMode + public static void SetMode(this ChannelGroup channelGroup, Mode mode) => TrySetMode(channelGroup, mode).Check(); + + /// ChannelGroup::getMode + public static unsafe Result TryGetMode(this ChannelGroup channelGroup, out Mode mode) + { + fixed (Mode* modePtr = &mode) + return PInvoke.ChannelGroupGetMode(channelGroup, modePtr); + } + + /// ChannelGroup::getMode + public static Mode GetMode(this ChannelGroup channelGroup) + { + TryGetMode(channelGroup, out var mode).Check(); + return mode; + } + + /// ChannelGroup::setCallback + public static Result TrySetCallback(this ChannelGroup channelGroup, ChannelControlCallbackPtr callback) => + PInvoke.ChannelGroupSetCallback(channelGroup, callback); + + /// ChannelGroup::setCallback + public static void SetCallback(this ChannelGroup channelGroup, ChannelControlCallbackPtr callback) => + TrySetCallback(channelGroup, callback).Check(); + + /// ChannelGroup::isPlaying + public static unsafe Result TryIsPlaying(this ChannelGroup channelGroup, out Bool32 isPlaying) + { + fixed (Bool32* isPlayingPtr = &isPlaying) + return PInvoke.ChannelGroupIsPlaying(channelGroup, isPlayingPtr); + } + + /// ChannelGroup::isPlaying + public static Bool32 IsPlaying(this ChannelGroup channelGroup) + { + TryIsPlaying(channelGroup, out var isPlaying).Check(); + return isPlaying; + } + + /// ChannelGroup::setPan + public static Result TrySetPan(this ChannelGroup channelGroup, float pan) => + PInvoke.ChannelGroupSetPan(channelGroup, pan); + + /// ChannelGroup::setPan + public static void SetPan(this ChannelGroup channelGroup, float pan) => TrySetPan(channelGroup, pan).Check(); + + /// ChannelGroup::setMixLevelsOutput + public static Result TrySetMixLevelsOutput( + this ChannelGroup channelGroup, + float frontLeft, + float frontRight, + float center, + float lfe, + float surroundLeft, + float surroundRight, + float backLeft, + float backRight + ) => + PInvoke.ChannelGroupSetMixLevelsOutput( + channelGroup, + frontLeft, + frontRight, + center, + lfe, + surroundLeft, + surroundRight, + backLeft, + backRight + ); + + /// ChannelGroup::setMixLevelsOutput + public static void SetMixLevelsOutput( + this ChannelGroup channelGroup, + float frontLeft, + float frontRight, + float center, + float lfe, + float surroundLeft, + float surroundRight, + float backLeft, + float backRight + ) => + TrySetMixLevelsOutput( + channelGroup, + frontLeft, + frontRight, + center, + lfe, + surroundLeft, + surroundRight, + backLeft, + backRight + ) + .Check(); + + /// ChannelGroup::setMixLevelsInput + public static unsafe Result TrySetMixLevelsInput( + this ChannelGroup channelGroup, + float* levels, + int numLevels + ) => PInvoke.ChannelGroupSetMixLevelsInput(channelGroup, levels, numLevels); + + /// ChannelGroup::setMixLevelsInput + public static unsafe void SetMixLevelsInput(this ChannelGroup channelGroup, float* levels, int numLevels) => + TrySetMixLevelsInput(channelGroup, levels, numLevels).Check(); + + /// ChannelGroup::setMixMatrix + public static unsafe Result TrySetMixMatrix( + this ChannelGroup channelGroup, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ) => PInvoke.ChannelGroupSetMixMatrix(channelGroup, matrix, outChannels, inChannels, inChannelHop); + + /// ChannelGroup::setMixMatrix + public static unsafe void SetMixMatrix( + this ChannelGroup channelGroup, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ) => TrySetMixMatrix(channelGroup, matrix, outChannels, inChannels, inChannelHop).Check(); + + /// ChannelGroup::getMixMatrix + public static unsafe Result TryGetMixMatrix( + this ChannelGroup channelGroup, + float* matrix, + out int outChannels, + out int inChannels, + int inChannelHop + ) + { + fixed (int* outChannelsPtr = &outChannels) + fixed (int* inChannelsPtr = &inChannels) + return PInvoke.ChannelGroupGetMixMatrix( + channelGroup, + matrix, + outChannelsPtr, + inChannelsPtr, + inChannelHop + ); + } + + /// ChannelGroup::getMixMatrix + public static unsafe void GetMixMatrix( + this ChannelGroup channelGroup, + float* matrix, + out int outChannels, + out int inChannels, + int inChannelHop + ) => TryGetMixMatrix(channelGroup, matrix, out outChannels, out inChannels, inChannelHop).Check(); + + /// ChannelGroup::getDSPClock + public static unsafe Result TryGetDspClock( + this ChannelGroup channelGroup, + out ulong dspClock, + out ulong parentClock + ) + { + fixed (ulong* dspClockPtr = &dspClock) + fixed (ulong* parentClockPtr = &parentClock) + return PInvoke.ChannelGroupGetDspClock(channelGroup, dspClockPtr, parentClockPtr); + } + + /// ChannelGroup::getDSPClock + public static void GetDspClock(this ChannelGroup channelGroup, out ulong dspClock, out ulong parentClock) => + TryGetDspClock(channelGroup, out dspClock, out parentClock).Check(); + + /// ChannelGroup::setDelay + public static Result TrySetDelay( + this ChannelGroup channelGroup, + ulong dspClockStart, + ulong dspClockEnd, + Bool32 stopChannels + ) => PInvoke.ChannelGroupSetDelay(channelGroup, dspClockStart, dspClockEnd, stopChannels); + + /// ChannelGroup::setDelay + public static void SetDelay( + this ChannelGroup channelGroup, + ulong dspClockStart, + ulong dspClockEnd, + Bool32 stopChannels + ) => TrySetDelay(channelGroup, dspClockStart, dspClockEnd, stopChannels).Check(); + + /// ChannelGroup::getDelay + public static unsafe Result TryGetDelay( + this ChannelGroup channelGroup, + out ulong dspClockStart, + out ulong dspClockEnd, + out Bool32 stopChannels + ) + { + fixed (ulong* dspClockStartPtr = &dspClockStart) + fixed (ulong* dspClockEndPtr = &dspClockEnd) + fixed (Bool32* stopChannelsPtr = &stopChannels) + return PInvoke.ChannelGroupGetDelay(channelGroup, dspClockStartPtr, dspClockEndPtr, stopChannelsPtr); + } + + /// ChannelGroup::getDelay + public static void GetDelay( + this ChannelGroup channelGroup, + out ulong dspClockStart, + out ulong dspClockEnd, + out Bool32 stopChannels + ) => TryGetDelay(channelGroup, out dspClockStart, out dspClockEnd, out stopChannels).Check(); + + /// ChannelGroup::addFadePoint + public static Result TryAddFadePoint(this ChannelGroup channelGroup, ulong dspClock, float volume) => + PInvoke.ChannelGroupAddFadePoint(channelGroup, dspClock, volume); + + /// ChannelGroup::addFadePoint + public static void AddFadePoint(this ChannelGroup channelGroup, ulong dspClock, float volume) => + TryAddFadePoint(channelGroup, dspClock, volume).Check(); + + /// ChannelGroup::setFadePointRamp + public static Result TrySetFadePointRamp(this ChannelGroup channelGroup, ulong dspClock, float volume) => + PInvoke.ChannelGroupSetFadePointRamp(channelGroup, dspClock, volume); + + /// ChannelGroup::setFadePointRamp + public static void SetFadePointRamp(this ChannelGroup channelGroup, ulong dspClock, float volume) => + TrySetFadePointRamp(channelGroup, dspClock, volume).Check(); + + /// ChannelGroup::removeFadePoints + public static Result TryRemoveFadePoints( + this ChannelGroup channelGroup, + ulong dspClockStart, + ulong dspClockEnd + ) => PInvoke.ChannelGroupRemoveFadePoints(channelGroup, dspClockStart, dspClockEnd); + + /// ChannelGroup::removeFadePoints + public static void RemoveFadePoints(this ChannelGroup channelGroup, ulong dspClockStart, ulong dspClockEnd) => + TryRemoveFadePoints(channelGroup, dspClockStart, dspClockEnd).Check(); + + /// ChannelGroup::getFadePoints + public static unsafe Result TryGetFadePoints( + this ChannelGroup channelGroup, + uint* numPoints, + ulong* pointDspClock, + float* pointVolume + ) => PInvoke.ChannelGroupGetFadePoints(channelGroup, numPoints, pointDspClock, pointVolume); + + /// ChannelGroup::getFadePoints + public static unsafe void GetFadePoints( + this ChannelGroup channelGroup, + uint* numPoints, + ulong* pointDspClock, + float* pointVolume + ) => TryGetFadePoints(channelGroup, numPoints, pointDspClock, pointVolume).Check(); + + /// ChannelGroup::getDSP + public static unsafe Result TryGetDsp(this ChannelGroup channelGroup, int index, out Dsp dsp) + { + fixed (Dsp* dspPtr = &dsp) + return PInvoke.ChannelGroupGetDsp(channelGroup, index, dspPtr); + } + + /// ChannelGroup::getDSP + public static Dsp GetDsp(this ChannelGroup channelGroup, int index) + { + TryGetDsp(channelGroup, index, out var dsp).Check(); + return dsp; + } + + /// ChannelGroup::addDSP + public static Result TryAddDsp(this ChannelGroup channelGroup, int index, Dsp dsp) => + PInvoke.ChannelGroupAddDsp(channelGroup, index, dsp); + + /// ChannelGroup::addDSP + public static void AddDsp(this ChannelGroup channelGroup, int index, Dsp dsp) => + TryAddDsp(channelGroup, index, dsp).Check(); + + /// ChannelGroup::removeDSP + public static Result TryRemoveDsp(this ChannelGroup channelGroup, Dsp dsp) => + PInvoke.ChannelGroupRemoveDsp(channelGroup, dsp); + + /// ChannelGroup::removeDSP + public static void RemoveDsp(this ChannelGroup channelGroup, Dsp dsp) => + TryRemoveDsp(channelGroup, dsp).Check(); + + /// ChannelGroup::getNumDSPs + public static unsafe Result TryGetNumDsps(this ChannelGroup channelGroup, out int numDsps) + { + fixed (int* numDspsPtr = &numDsps) + return PInvoke.ChannelGroupGetNumDsps(channelGroup, numDspsPtr); + } + + /// ChannelGroup::getNumDSPs + public static int GetNumDsps(this ChannelGroup channelGroup) + { + TryGetNumDsps(channelGroup, out var numDsps).Check(); + return numDsps; + } + + /// ChannelGroup::setDSPIndex + public static Result TrySetDspIndex(this ChannelGroup channelGroup, Dsp dsp, int index) => + PInvoke.ChannelGroupSetDspIndex(channelGroup, dsp, index); + + /// ChannelGroup::setDSPIndex + public static void SetDspIndex(this ChannelGroup channelGroup, Dsp dsp, int index) => + TrySetDspIndex(channelGroup, dsp, index).Check(); + + /// ChannelGroup::getDSPIndex + public static unsafe Result TryGetDspIndex(this ChannelGroup channelGroup, Dsp dsp, out int index) + { + fixed (int* indexPtr = &index) + return PInvoke.ChannelGroupGetDspIndex(channelGroup, dsp, indexPtr); + } + + /// ChannelGroup::getDSPIndex + public static int GetDspIndex(this ChannelGroup channelGroup, Dsp dsp) + { + TryGetDspIndex(channelGroup, dsp, out var index).Check(); + return index; + } + + /// ChannelGroup::set3DAttributes + public static unsafe Result TrySet3dAttributes(this ChannelGroup channelGroup, in float3 pos, in float3 vel) + { + fixed (float3* posPtr = &pos) + fixed (float3* velPtr = &vel) + return PInvoke.ChannelGroupSet3dAttributes(channelGroup, posPtr, velPtr); + } + + /// ChannelGroup::set3DAttributes + public static void Set3dAttributes(this ChannelGroup channelGroup, in float3 pos, in float3 vel) => + TrySet3dAttributes(channelGroup, pos, vel).Check(); + + /// ChannelGroup::get3DAttributes + public static unsafe Result TryGet3dAttributes(this ChannelGroup channelGroup, out float3 pos, out float3 vel) + { + fixed (float3* posPtr = &pos) + fixed (float3* velPtr = &vel) + return PInvoke.ChannelGroupGet3dAttributes(channelGroup, posPtr, velPtr); + } + + /// ChannelGroup::get3DAttributes + public static void Get3dAttributes(this ChannelGroup channelGroup, out float3 pos, out float3 vel) => + TryGet3dAttributes(channelGroup, out pos, out vel).Check(); + + /// ChannelGroup::set3DMinMaxDistance + public static Result TrySet3dMinMaxDistance( + this ChannelGroup channelGroup, + float minDistance, + float maxDistance + ) => PInvoke.ChannelGroupSet3dMinMaxDistance(channelGroup, minDistance, maxDistance); + + /// ChannelGroup::set3DMinMaxDistance + public static void Set3dMinMaxDistance(this ChannelGroup channelGroup, float minDistance, float maxDistance) => + TrySet3dMinMaxDistance(channelGroup, minDistance, maxDistance).Check(); + + /// ChannelGroup::get3DMinMaxDistance + public static unsafe Result TryGet3dMinMaxDistance( + this ChannelGroup channelGroup, + out float minDistance, + out float maxDistance + ) + { + fixed (float* minDistancePtr = &minDistance) + fixed (float* maxDistancePtr = &maxDistance) + return PInvoke.ChannelGroupGet3dMinMaxDistance(channelGroup, minDistancePtr, maxDistancePtr); + } + + /// ChannelGroup::get3DMinMaxDistance + public static void Get3dMinMaxDistance( + this ChannelGroup channelGroup, + out float minDistance, + out float maxDistance + ) => TryGet3dMinMaxDistance(channelGroup, out minDistance, out maxDistance).Check(); + + /// ChannelGroup::set3DConeSettings + public static Result TrySet3dConeSettings( + this ChannelGroup channelGroup, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ) => PInvoke.ChannelGroupSet3dConeSettings(channelGroup, insideConeAngle, outsideConeAngle, outsideVolume); + + /// ChannelGroup::set3DConeSettings + public static void Set3dConeSettings( + this ChannelGroup channelGroup, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ) => TrySet3dConeSettings(channelGroup, insideConeAngle, outsideConeAngle, outsideVolume).Check(); + + /// ChannelGroup::get3DConeSettings + public static unsafe Result TryGet3dConeSettings( + this ChannelGroup channelGroup, + out float insideConeAngle, + out float outsideConeAngle, + out float outsideVolume + ) + { + fixed (float* insideConeAnglePtr = &insideConeAngle) + fixed (float* outsideConeAnglePtr = &outsideConeAngle) + fixed (float* outsideVolumePtr = &outsideVolume) + return PInvoke.ChannelGroupGet3dConeSettings( + channelGroup, + insideConeAnglePtr, + outsideConeAnglePtr, + outsideVolumePtr + ); + } + + /// ChannelGroup::get3DConeSettings + public static void Get3dConeSettings( + this ChannelGroup channelGroup, + out float insideConeAngle, + out float outsideConeAngle, + out float outsideVolume + ) => TryGet3dConeSettings(channelGroup, out insideConeAngle, out outsideConeAngle, out outsideVolume).Check(); + + /// ChannelGroup::set3DConeOrientation + public static unsafe Result TrySet3dConeOrientation(this ChannelGroup channelGroup, in float3 orientation) + { + fixed (float3* orientationPtr = &orientation) + return PInvoke.ChannelGroupSet3dConeOrientation(channelGroup, orientationPtr); + } + + /// ChannelGroup::set3DConeOrientation + public static void Set3dConeOrientation(this ChannelGroup channelGroup, in float3 orientation) => + TrySet3dConeOrientation(channelGroup, orientation).Check(); + + /// ChannelGroup::get3DConeOrientation + public static unsafe Result TryGet3dConeOrientation(this ChannelGroup channelGroup, out float3 orientation) + { + fixed (float3* orientationPtr = &orientation) + return PInvoke.ChannelGroupGet3dConeOrientation(channelGroup, orientationPtr); + } + + /// ChannelGroup::get3DConeOrientation + public static float3 Get3dConeOrientation(this ChannelGroup channelGroup) + { + TryGet3dConeOrientation(channelGroup, out var orientation).Check(); + return orientation; + } + + /// ChannelGroup::set3DCustomRolloff + public static unsafe Result TrySet3dCustomRolloff( + this ChannelGroup channelGroup, + float3* points, + int numPoints + ) => PInvoke.ChannelGroupSet3dCustomRolloff(channelGroup, points, numPoints); + + /// ChannelGroup::set3DCustomRolloff + public static unsafe void Set3dCustomRolloff(this ChannelGroup channelGroup, float3* points, int numPoints) => + TrySet3dCustomRolloff(channelGroup, points, numPoints).Check(); + + /// ChannelGroup::get3DCustomRolloff + public static unsafe Result TryGet3dCustomRolloff( + this ChannelGroup channelGroup, + out float3* points, + out int numPoints + ) + { + fixed (float3** pointsPtr = &points) + fixed (int* numPointsPtr = &numPoints) + return PInvoke.ChannelGroupGet3dCustomRolloff(channelGroup, pointsPtr, numPointsPtr); + } + + /// ChannelGroup::get3DCustomRolloff + public static unsafe void Get3dCustomRolloff( + this ChannelGroup channelGroup, + out float3* points, + out int numPoints + ) => TryGet3dCustomRolloff(channelGroup, out points, out numPoints).Check(); + + /// ChannelGroup::set3DOcclusion + public static Result TrySet3dOcclusion( + this ChannelGroup channelGroup, + float directOcclusion, + float reverbOcclusion + ) => PInvoke.ChannelGroupSet3dOcclusion(channelGroup, directOcclusion, reverbOcclusion); + + /// ChannelGroup::set3DOcclusion + public static void Set3dOcclusion( + this ChannelGroup channelGroup, + float directOcclusion, + float reverbOcclusion + ) => TrySet3dOcclusion(channelGroup, directOcclusion, reverbOcclusion).Check(); + + /// ChannelGroup::get3DOcclusion + public static unsafe Result TryGet3dOcclusion( + this ChannelGroup channelGroup, + out float directOcclusion, + out float reverbOcclusion + ) + { + fixed (float* directOcclusionPtr = &directOcclusion) + fixed (float* reverbOcclusionPtr = &reverbOcclusion) + return PInvoke.ChannelGroupGet3dOcclusion(channelGroup, directOcclusionPtr, reverbOcclusionPtr); + } + + /// ChannelGroup::get3DOcclusion + public static void Get3dOcclusion( + this ChannelGroup channelGroup, + out float directOcclusion, + out float reverbOcclusion + ) => TryGet3dOcclusion(channelGroup, out directOcclusion, out reverbOcclusion).Check(); + + /// ChannelGroup::set3DSpread + public static Result TrySet3dSpread(this ChannelGroup channelGroup, float angle) => + PInvoke.ChannelGroupSet3dSpread(channelGroup, angle); + + /// ChannelGroup::set3DSpread + public static void Set3dSpread(this ChannelGroup channelGroup, float angle) => + TrySet3dSpread(channelGroup, angle).Check(); + + /// ChannelGroup::get3DSpread + public static unsafe Result TryGet3dSpread(this ChannelGroup channelGroup, out float angle) + { + fixed (float* anglePtr = &angle) + return PInvoke.ChannelGroupGet3dSpread(channelGroup, anglePtr); + } + + /// ChannelGroup::get3DSpread + public static float Get3dSpread(this ChannelGroup channelGroup) + { + TryGet3dSpread(channelGroup, out var angle).Check(); + return angle; + } + + /// ChannelGroup::set3DLevel + public static Result TrySet3dLevel(this ChannelGroup channelGroup, float level) => + PInvoke.ChannelGroupSet3dLevel(channelGroup, level); + + /// ChannelGroup::set3DLevel + public static void Set3dLevel(this ChannelGroup channelGroup, float level) => + TrySet3dLevel(channelGroup, level).Check(); + + /// ChannelGroup::get3DLevel + public static unsafe Result TryGet3dLevel(this ChannelGroup channelGroup, out float level) + { + fixed (float* levelPtr = &level) + return PInvoke.ChannelGroupGet3dLevel(channelGroup, levelPtr); + } + + /// ChannelGroup::get3DLevel + public static float Get3dLevel(this ChannelGroup channelGroup) + { + TryGet3dLevel(channelGroup, out var level).Check(); + return level; + } + + /// ChannelGroup::set3DDopplerLevel + public static Result TrySet3dDopplerLevel(this ChannelGroup channelGroup, float level) => + PInvoke.ChannelGroupSet3dDopplerLevel(channelGroup, level); + + /// ChannelGroup::set3DDopplerLevel + public static void Set3dDopplerLevel(this ChannelGroup channelGroup, float level) => + TrySet3dDopplerLevel(channelGroup, level).Check(); + + /// ChannelGroup::get3DDopplerLevel + public static unsafe Result TryGet3dDopplerLevel(this ChannelGroup channelGroup, out float level) + { + fixed (float* levelPtr = &level) + return PInvoke.ChannelGroupGet3dDopplerLevel(channelGroup, levelPtr); + } + + /// ChannelGroup::get3DDopplerLevel + public static float Get3dDopplerLevel(this ChannelGroup channelGroup) + { + TryGet3dDopplerLevel(channelGroup, out var level).Check(); + return level; + } + + /// ChannelGroup::set3DDistanceFilter + public static Result TrySet3dDistanceFilter( + this ChannelGroup channelGroup, + Bool32 custom, + float customLevel, + float centerFreq + ) => PInvoke.ChannelGroupSet3dDistanceFilter(channelGroup, custom, customLevel, centerFreq); + + /// ChannelGroup::set3DDistanceFilter + public static void Set3dDistanceFilter( + this ChannelGroup channelGroup, + Bool32 custom, + float customLevel, + float centerFreq + ) => TrySet3dDistanceFilter(channelGroup, custom, customLevel, centerFreq).Check(); + + /// ChannelGroup::get3DDistanceFilter + public static unsafe Result TryGet3dDistanceFilter( + this ChannelGroup channelGroup, + out Bool32 custom, + out float customLevel, + out float centerFreq + ) + { + fixed (Bool32* customPtr = &custom) + fixed (float* customLevelPtr = &customLevel) + fixed (float* centerFreqPtr = ¢erFreq) + return PInvoke.ChannelGroupGet3dDistanceFilter(channelGroup, customPtr, customLevelPtr, centerFreqPtr); + } + + /// ChannelGroup::get3DDistanceFilter + public static void Get3dDistanceFilter( + this ChannelGroup channelGroup, + out Bool32 custom, + out float customLevel, + out float centerFreq + ) => TryGet3dDistanceFilter(channelGroup, out custom, out customLevel, out centerFreq).Check(); + + /// ChannelGroup::setUserData + public static Result TrySetUserData(this ChannelGroup channelGroup, nint userData) => + PInvoke.ChannelGroupSetUserData(channelGroup, userData); + + /// ChannelGroup::setUserData + public static void SetUserData(this ChannelGroup channelGroup, nint userData) => + TrySetUserData(channelGroup, userData).Check(); + + /// ChannelGroup::getUserData + public static unsafe Result TryGetUserData(this ChannelGroup channelGroup, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.ChannelGroupGetUserData(channelGroup, userDataPtr); + } + + /// ChannelGroup::getUserData + public static nint GetUserData(this ChannelGroup channelGroup) + { + TryGetUserData(channelGroup, out var userData).Check(); + return userData; + } + + /// + /// + /// Frees the memory for the group. + /// + /// + /// Any Channels or ChannelGroups feeding into this group are moved to the master ChannelGroup. + /// + /// + /// See Also: System::createChannelGroup, System::getMasterChannelGroup + /// + /// + /// ChannelGroup::release + /// + /// + public static Result TryRelease(this ChannelGroup channelGroup) => PInvoke.ChannelGroupRelease(channelGroup); + + /// + /// + /// Frees the memory for the group. + /// + /// + /// Any Channels or ChannelGroups feeding into this group are moved to the master ChannelGroup. + /// + /// + /// See Also: System::createChannelGroup, System::getMasterChannelGroup + /// + /// + /// ChannelGroup::release + /// + /// + public static void Release(this ChannelGroup channelGroup) => TryRelease(channelGroup).Check(); + + /// + /// + /// Adds a ChannelGroup as an input to this group. + /// + /// + /// ChannelGroup::addGroup + /// + /// + public static unsafe Result TryAddGroup( + this ChannelGroup channelGroup, + ChannelGroup group, + Bool32 propagateDspClock, + out DspConnection connection + ) + { + fixed (DspConnection* connectionPtr = &connection) + return PInvoke.ChannelGroupAddGroup(channelGroup, group, propagateDspClock, connectionPtr); + } + + /// + /// + /// Adds a ChannelGroup as an input to this group. + /// + /// + /// ChannelGroup::addGroup + /// + /// + public static DspConnection AddGroup( + this ChannelGroup channelGroup, + ChannelGroup group, + Bool32 propagateDspClock + ) + { + TryAddGroup(channelGroup, group, propagateDspClock, out var connection).Check(); + return connection; + } + + /// + /// + /// Retrieves the number of ChannelGroups that feed into to this group. + /// + /// + /// ChannelGroup::getNumGroups + /// + /// + public static unsafe Result TryGetNumGroups(this ChannelGroup channelGroup, out int numGroups) + { + fixed (int* numGroupsPtr = &numGroups) + return PInvoke.ChannelGroupGetNumGroups(channelGroup, numGroupsPtr); + } + + /// + /// + /// Retrieves the number of ChannelGroups that feed into to this group. + /// + /// + /// ChannelGroup::getNumGroups + /// + /// + public static int GetNumGroups(this ChannelGroup channelGroup) + { + TryGetNumGroups(channelGroup, out var numGroups).Check(); + return numGroups; + } + + /// + /// + /// Retrieves the ChannelGroup at the specified index in the list of group inputs. + /// + /// + /// ChannelGroup::getGroup + /// + /// + public static unsafe Result TryGetGroup(this ChannelGroup channelGroup, int index, out ChannelGroup group) + { + fixed (ChannelGroup* groupPtr = &group) + return PInvoke.ChannelGroupGetGroup(channelGroup, index, groupPtr); + } + + /// + /// + /// Retrieves the ChannelGroup at the specified index in the list of group inputs. + /// + /// + /// ChannelGroup::getGroup + /// + /// + public static ChannelGroup GetGroup(this ChannelGroup channelGroup, int index) + { + TryGetGroup(channelGroup, index, out var group).Check(); + return group; + } + + /// + /// + /// Retrieves the ChannelGroup this object outputs to. + /// + /// + /// ChannelGroup::getParentGroup + /// + /// + public static unsafe Result TryGetParentGroup(this ChannelGroup channelGroup, out ChannelGroup group) + { + fixed (ChannelGroup* groupPtr = &group) + return PInvoke.ChannelGroupGetParentGroup(channelGroup, groupPtr); + } + + /// + /// + /// Retrieves the ChannelGroup this object outputs to. + /// + /// + /// ChannelGroup::getParentGroup + /// + /// + public static ChannelGroup GetParentGroup(this ChannelGroup channelGroup) + { + TryGetParentGroup(channelGroup, out var group).Check(); + return group; + } + + /// + /// + /// Retrieves the name set when the group was created. + /// + /// + /// ChannelGroup::getName + /// + /// + public static unsafe Result TryGetName(this ChannelGroup channelGroup, byte* name, int nameLen) => + PInvoke.ChannelGroupGetName(channelGroup, name, nameLen); + + /// + /// + /// Retrieves the name set when the group was created. + /// + /// + /// ChannelGroup::getName + /// + /// + public static unsafe void GetName(this ChannelGroup channelGroup, byte* name, int nameLen) => + TryGetName(channelGroup, name, nameLen).Check(); + + /// + /// + /// Retrieves the number of Channels that feed into to this group. + /// + /// + /// ChannelGroup::getNumChannels + /// + /// + public static unsafe Result TryGetNumChannels(this ChannelGroup channelGroup, out int numChannels) + { + fixed (int* numChannelsPtr = &numChannels) + return PInvoke.ChannelGroupGetNumChannels(channelGroup, numChannelsPtr); + } + + /// + /// + /// Retrieves the number of Channels that feed into to this group. + /// + /// + /// ChannelGroup::getNumChannels + /// + /// + public static int GetNumChannels(this ChannelGroup channelGroup) + { + TryGetNumChannels(channelGroup, out var numChannels).Check(); + return numChannels; + } + + /// + /// + /// Retrieves the Channel at the specified index in the list of Channel inputs. + /// + /// + /// ChannelGroup::getChannel + /// + /// + public static unsafe Result TryGetChannel(this ChannelGroup channelGroup, int index, out Channel channel) + { + fixed (Channel* channelPtr = &channel) + return PInvoke.ChannelGroupGetChannel(channelGroup, index, channelPtr); + } + + /// + /// + /// Retrieves the Channel at the specified index in the list of Channel inputs. + /// + /// + /// ChannelGroup::getChannel + /// + /// + public static Channel GetChannel(this ChannelGroup channelGroup, int index) + { + TryGetChannel(channelGroup, index, out var channel).Check(); + return channel; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Dsp.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Dsp.gen.cs new file mode 100644 index 0000000..a38f57e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Dsp.gen.cs @@ -0,0 +1,1179 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Releases a DSP unit, freeing the memory used by that object. + /// + /// + /// If DSP is not removed from the graph with ChannelControl::removeDSP after being added with + /// ChannelControl::addDSP, it will not release and will instead return FMOD_ERR_DSP_INUSE. + /// + /// + /// See Also: System::createDSP + /// + /// + /// DSP::release + /// + /// + public static Result TryRelease(this Dsp dsp) => PInvoke.DspRelease(dsp); + + /// + /// + /// Releases a DSP unit, freeing the memory used by that object. + /// + /// + /// If DSP is not removed from the graph with ChannelControl::removeDSP after being added with + /// ChannelControl::addDSP, it will not release and will instead return FMOD_ERR_DSP_INUSE. + /// + /// + /// See Also: System::createDSP + /// + /// + /// DSP::release + /// + /// + public static void Release(this Dsp dsp) => TryRelease(dsp).Check(); + + /// + /// + /// Retrieves the parent System object. + /// + /// + /// DSP::getSystemObject + /// + /// + public static unsafe Result TryGetSystemObject(this Dsp dsp, out FmodSystem system) + { + fixed (FmodSystem* systemPtr = &system) + return PInvoke.DspGetSystemObject(dsp, systemPtr); + } + + /// + /// + /// Retrieves the parent System object. + /// + /// + /// DSP::getSystemObject + /// + /// + public static FmodSystem GetSystemObject(this Dsp dsp) + { + TryGetSystemObject(dsp, out var system).Check(); + return system; + } + + /// + /// + /// Adds a DSP unit as an input to this object. + /// + /// + /// DSP::addInput + /// + /// + public static unsafe Result TryAddInput( + this Dsp dsp, + Dsp input, + out DspConnection connection, + DspConnectionType type + ) + { + fixed (DspConnection* connectionPtr = &connection) + return PInvoke.DspAddInput(dsp, input, connectionPtr, type); + } + + /// + /// + /// Adds a DSP unit as an input to this object. + /// + /// + /// DSP::addInput + /// + /// + public static DspConnection AddInput(this Dsp dsp, Dsp input, DspConnectionType type) + { + TryAddInput(dsp, input, out var connection, type).Check(); + return connection; + } + + /// + /// + /// Disconnect the specified input DSP. + /// + /// + /// DSP::disconnectFrom + /// + /// + public static Result TryDisconnectFrom(this Dsp dsp, Dsp target, DspConnection connection) => + PInvoke.DspDisconnectFrom(dsp, target, connection); + + /// + /// + /// Disconnect the specified input DSP. + /// + /// + /// DSP::disconnectFrom + /// + /// + public static void DisconnectFrom(this Dsp dsp, Dsp target, DspConnection connection) => + TryDisconnectFrom(dsp, target, connection).Check(); + + /// + /// + /// Disconnects all inputs and/or outputs. + /// + /// + /// DSP::disconnectAll + /// + /// + public static Result TryDisconnectAll(this Dsp dsp, Bool32 inputS, Bool32 outputS) => + PInvoke.DspDisconnectAll(dsp, inputS, outputS); + + /// + /// + /// Disconnects all inputs and/or outputs. + /// + /// + /// DSP::disconnectAll + /// + /// + public static void DisconnectAll(this Dsp dsp, Bool32 inputS, Bool32 outputS) => + TryDisconnectAll(dsp, inputS, outputS).Check(); + + /// + /// + /// Retrieves the number of DSP units in the input list. + /// + /// + /// DSP::getNumInputs + /// + /// + public static unsafe Result TryGetNumInputs(this Dsp dsp, out int numInputS) + { + fixed (int* numInputSPtr = &numInputS) + return PInvoke.DspGetNumInputs(dsp, numInputSPtr); + } + + /// + /// + /// Retrieves the number of DSP units in the input list. + /// + /// + /// DSP::getNumInputs + /// + /// + public static int GetNumInputs(this Dsp dsp) + { + TryGetNumInputs(dsp, out var numInputS).Check(); + return numInputS; + } + + /// + /// + /// Retrieves the number of DSP units in the output list. + /// + /// + /// DSP::getNumOutputs + /// + /// + public static unsafe Result TryGetNumOutputs(this Dsp dsp, out int numOutputS) + { + fixed (int* numOutputSPtr = &numOutputS) + return PInvoke.DspGetNumOutputs(dsp, numOutputSPtr); + } + + /// + /// + /// Retrieves the number of DSP units in the output list. + /// + /// + /// DSP::getNumOutputs + /// + /// + public static int GetNumOutputs(this Dsp dsp) + { + TryGetNumOutputs(dsp, out var numOutputS).Check(); + return numOutputS; + } + + /// + /// + /// Retrieves the DSP unit at the specified index in the input list. + /// + /// + /// DSP::getInput + /// + /// + public static unsafe Result TryGetInput( + this Dsp dsp, + int index, + out Dsp input, + out DspConnection inputConnection + ) + { + fixed (Dsp* inputPtr = &input) + fixed (DspConnection* inputConnectionPtr = &inputConnection) + return PInvoke.DspGetInput(dsp, index, inputPtr, inputConnectionPtr); + } + + /// + /// + /// Retrieves the DSP unit at the specified index in the input list. + /// + /// + /// DSP::getInput + /// + /// + public static void GetInput(this Dsp dsp, int index, out Dsp input, out DspConnection inputConnection) => + TryGetInput(dsp, index, out input, out inputConnection).Check(); + + /// + /// + /// Retrieves the DSP unit at the specified index in the output list. + /// + /// + /// DSP::getOutput + /// + /// + public static unsafe Result TryGetOutput( + this Dsp dsp, + int index, + out Dsp output, + out DspConnection outputConnection + ) + { + fixed (Dsp* outputPtr = &output) + fixed (DspConnection* outputConnectionPtr = &outputConnection) + return PInvoke.DspGetOutput(dsp, index, outputPtr, outputConnectionPtr); + } + + /// + /// + /// Retrieves the DSP unit at the specified index in the output list. + /// + /// + /// DSP::getOutput + /// + /// + public static void GetOutput(this Dsp dsp, int index, out Dsp output, out DspConnection outputConnection) => + TryGetOutput(dsp, index, out output, out outputConnection).Check(); + + /// + /// + /// Sets the processing active state. + /// + /// + /// DSP::setActive + /// + /// + public static Result TrySetActive(this Dsp dsp, Bool32 active) => PInvoke.DspSetActive(dsp, active); + + /// + /// + /// Sets the processing active state. + /// + /// + /// DSP::setActive + /// + /// + public static void SetActive(this Dsp dsp, Bool32 active) => TrySetActive(dsp, active).Check(); + + /// + /// + /// Retrieves the processing active state. + /// + /// + /// DSP::getActive + /// + /// + public static unsafe Result TryGetActive(this Dsp dsp, out Bool32 active) + { + fixed (Bool32* activePtr = &active) + return PInvoke.DspGetActive(dsp, activePtr); + } + + /// + /// + /// Retrieves the processing active state. + /// + /// + /// DSP::getActive + /// + /// + public static Bool32 GetActive(this Dsp dsp) + { + TryGetActive(dsp, out var active).Check(); + return active; + } + + /// + /// + /// Sets the processing bypass state. + /// + /// + /// DSP::setBypass + /// + /// + public static Result TrySetBypass(this Dsp dsp, Bool32 bypass) => PInvoke.DspSetBypass(dsp, bypass); + + /// + /// + /// Sets the processing bypass state. + /// + /// + /// DSP::setBypass + /// + /// + public static void SetBypass(this Dsp dsp, Bool32 bypass) => TrySetBypass(dsp, bypass).Check(); + + /// + /// + /// Retrieves the processing bypass state. + /// + /// + /// DSP::getBypass + /// + /// + public static unsafe Result TryGetBypass(this Dsp dsp, out Bool32 bypass) + { + fixed (Bool32* bypassPtr = &bypass) + return PInvoke.DspGetBypass(dsp, bypassPtr); + } + + /// + /// + /// Retrieves the processing bypass state. + /// + /// + /// DSP::getBypass + /// + /// + public static Bool32 GetBypass(this Dsp dsp) + { + TryGetBypass(dsp, out var bypass).Check(); + return bypass; + } + + /// + /// + /// Sets the scale of the wet and dry signal components. + /// + /// + /// DSP::setWetDryMix + /// + /// + public static Result TrySetWetDryMix(this Dsp dsp, float preWet, float postWet, float dry) => + PInvoke.DspSetWetDryMix(dsp, preWet, postWet, dry); + + /// + /// + /// Sets the scale of the wet and dry signal components. + /// + /// + /// DSP::setWetDryMix + /// + /// + public static void SetWetDryMix(this Dsp dsp, float preWet, float postWet, float dry) => + TrySetWetDryMix(dsp, preWet, postWet, dry).Check(); + + /// + /// + /// Retrieves the scale of the wet and dry signal components. + /// + /// + /// DSP::getWetDryMix + /// + /// + public static unsafe Result TryGetWetDryMix(this Dsp dsp, out float preWet, out float postWet, out float dry) + { + fixed (float* preWetPtr = &preWet) + fixed (float* postWetPtr = &postWet) + fixed (float* dryPtr = &dry) + return PInvoke.DspGetWetDryMix(dsp, preWetPtr, postWetPtr, dryPtr); + } + + /// + /// + /// Retrieves the scale of the wet and dry signal components. + /// + /// + /// DSP::getWetDryMix + /// + /// + public static void GetWetDryMix(this Dsp dsp, out float preWet, out float postWet, out float dry) => + TryGetWetDryMix(dsp, out preWet, out postWet, out dry).Check(); + + /// + /// + /// Sets the PCM input format this DSP is to receive when processing. + /// + /// + /// DSP::setChannelFormat + /// + /// + public static Result TrySetChannelFormat( + this Dsp dsp, + ChannelMask channelMask, + int numChannels, + SpeakerMode sourceSpeakerMode + ) => PInvoke.DspSetChannelFormat(dsp, channelMask, numChannels, sourceSpeakerMode); + + /// + /// + /// Sets the PCM input format this DSP is to receive when processing. + /// + /// + /// DSP::setChannelFormat + /// + /// + public static void SetChannelFormat( + this Dsp dsp, + ChannelMask channelMask, + int numChannels, + SpeakerMode sourceSpeakerMode + ) => TrySetChannelFormat(dsp, channelMask, numChannels, sourceSpeakerMode).Check(); + + /// + /// + /// Retrieves the PCM input format this DSP will receive when processing. + /// + /// + /// DSP::getChannelFormat + /// + /// + public static unsafe Result TryGetChannelFormat( + this Dsp dsp, + out ChannelMask channelMask, + out int numChannels, + out SpeakerMode sourceSpeakerMode + ) + { + fixed (ChannelMask* channelMaskPtr = &channelMask) + fixed (int* numChannelsPtr = &numChannels) + fixed (SpeakerMode* sourceSpeakerModePtr = &sourceSpeakerMode) + return PInvoke.DspGetChannelFormat(dsp, channelMaskPtr, numChannelsPtr, sourceSpeakerModePtr); + } + + /// + /// + /// Retrieves the PCM input format this DSP will receive when processing. + /// + /// + /// DSP::getChannelFormat + /// + /// + public static void GetChannelFormat( + this Dsp dsp, + out ChannelMask channelMask, + out int numChannels, + out SpeakerMode sourceSpeakerMode + ) => TryGetChannelFormat(dsp, out channelMask, out numChannels, out sourceSpeakerMode).Check(); + + /// + /// + /// Retrieves the output format this DSP produces when processing based on the input specified. + /// + /// + /// DSP::getOutputChannelFormat + /// + /// + public static unsafe Result TryGetOutputChannelFormat( + this Dsp dsp, + ChannelMask inMask, + int inChannels, + SpeakerMode inSpeakerMode, + out ChannelMask outMask, + out int outChannels, + out SpeakerMode outSpeakerMode + ) + { + fixed (ChannelMask* outMaskPtr = &outMask) + fixed (int* outChannelsPtr = &outChannels) + fixed (SpeakerMode* outSpeakerModePtr = &outSpeakerMode) + return PInvoke.DspGetOutputChannelFormat( + dsp, + inMask, + inChannels, + inSpeakerMode, + outMaskPtr, + outChannelsPtr, + outSpeakerModePtr + ); + } + + /// + /// + /// Retrieves the output format this DSP produces when processing based on the input specified. + /// + /// + /// DSP::getOutputChannelFormat + /// + /// + public static void GetOutputChannelFormat( + this Dsp dsp, + ChannelMask inMask, + int inChannels, + SpeakerMode inSpeakerMode, + out ChannelMask outMask, + out int outChannels, + out SpeakerMode outSpeakerMode + ) => + TryGetOutputChannelFormat( + dsp, + inMask, + inChannels, + inSpeakerMode, + out outMask, + out outChannels, + out outSpeakerMode + ) + .Check(); + + /// + /// + /// Reset a DSP's internal state, making it ready for a new input signal. + /// + /// + /// This will clear all internal state derived from input signal while retaining any set parameter values. + /// The intended use of the function is to avoid audible artifacts if moving the DSP from one part of the + /// DSP graph to another. + /// + /// + /// DSP::reset + /// + /// + public static Result TryReset(this Dsp dsp) => PInvoke.DspReset(dsp); + + /// + /// + /// Reset a DSP's internal state, making it ready for a new input signal. + /// + /// + /// This will clear all internal state derived from input signal while retaining any set parameter values. + /// The intended use of the function is to avoid audible artifacts if moving the DSP from one part of the + /// DSP graph to another. + /// + /// + /// DSP::reset + /// + /// + public static void Reset(this Dsp dsp) => TryReset(dsp).Check(); + + /// + /// + /// Sets the callback for DSP notifications. + /// + /// + /// DSP::setCallback + /// + /// + public static Result TrySetCallback(this Dsp dsp, DspCallbackPtr callback) => + PInvoke.DspSetCallback(dsp, callback); + + /// + /// + /// Sets the callback for DSP notifications. + /// + /// + /// DSP::setCallback + /// + /// + public static void SetCallback(this Dsp dsp, DspCallbackPtr callback) => TrySetCallback(dsp, callback).Check(); + + /// + /// + /// Sets a floating point parameter by index. + /// + /// + /// DSP::setParameterFloat + /// + /// + public static Result TrySetParameterFloat(this Dsp dsp, int index, float value) => + PInvoke.DspSetParameterFloat(dsp, index, value); + + /// + /// + /// Sets a floating point parameter by index. + /// + /// + /// DSP::setParameterFloat + /// + /// + public static void SetParameterFloat(this Dsp dsp, int index, float value) => + TrySetParameterFloat(dsp, index, value).Check(); + + /// + /// + /// Sets an integer parameter by index. + /// + /// + /// DSP::setParameterInt + /// + /// + public static Result TrySetParameterInt(this Dsp dsp, int index, int value) => + PInvoke.DspSetParameterInt(dsp, index, value); + + /// + /// + /// Sets an integer parameter by index. + /// + /// + /// DSP::setParameterInt + /// + /// + public static void SetParameterInt(this Dsp dsp, int index, int value) => + TrySetParameterInt(dsp, index, value).Check(); + + /// + /// + /// Sets a boolean parameter by index. + /// + /// + /// DSP::setParameterBool + /// + /// + public static Result TrySetParameterBool(this Dsp dsp, int index, Bool32 value) => + PInvoke.DspSetParameterBool(dsp, index, value); + + /// + /// + /// Sets a boolean parameter by index. + /// + /// + /// DSP::setParameterBool + /// + /// + public static void SetParameterBool(this Dsp dsp, int index, Bool32 value) => + TrySetParameterBool(dsp, index, value).Check(); + + /// + /// + /// Sets a binary data parameter by index. + /// + /// + /// DSP::setParameterData + /// + /// + public static Result TrySetParameterData(this Dsp dsp, int index, nint data, uint length) => + PInvoke.DspSetParameterData(dsp, index, data, length); + + /// + /// + /// Sets a binary data parameter by index. + /// + /// + /// DSP::setParameterData + /// + /// + public static void SetParameterData(this Dsp dsp, int index, nint data, uint length) => + TrySetParameterData(dsp, index, data, length).Check(); + + /// + /// + /// Retrieves a floating point parameter by index. + /// + /// + /// DSP::getParameterFloat + /// + /// + public static unsafe Result TryGetParameterFloat( + this Dsp dsp, + int index, + out float value, + byte* valuesTr, + int valuesTrlen + ) + { + fixed (float* valuePtr = &value) + return PInvoke.DspGetParameterFloat(dsp, index, valuePtr, valuesTr, valuesTrlen); + } + + /// + /// + /// Retrieves a floating point parameter by index. + /// + /// + /// DSP::getParameterFloat + /// + /// + public static unsafe float GetParameterFloat(this Dsp dsp, int index, byte* valuesTr, int valuesTrlen) + { + TryGetParameterFloat(dsp, index, out var value, valuesTr, valuesTrlen).Check(); + return value; + } + + /// + /// + /// Retrieves an integer parameter by index. + /// + /// + /// DSP::getParameterInt + /// + /// + public static unsafe Result TryGetParameterInt( + this Dsp dsp, + int index, + out int value, + byte* valuesTr, + int valuesTrlen + ) + { + fixed (int* valuePtr = &value) + return PInvoke.DspGetParameterInt(dsp, index, valuePtr, valuesTr, valuesTrlen); + } + + /// + /// + /// Retrieves an integer parameter by index. + /// + /// + /// DSP::getParameterInt + /// + /// + public static unsafe int GetParameterInt(this Dsp dsp, int index, byte* valuesTr, int valuesTrlen) + { + TryGetParameterInt(dsp, index, out var value, valuesTr, valuesTrlen).Check(); + return value; + } + + /// + /// + /// Retrieves a boolean parameter by index. + /// + /// + /// DSP::getParameterBool + /// + /// + public static unsafe Result TryGetParameterBool( + this Dsp dsp, + int index, + out Bool32 value, + byte* valuesTr, + int valuesTrlen + ) + { + fixed (Bool32* valuePtr = &value) + return PInvoke.DspGetParameterBool(dsp, index, valuePtr, valuesTr, valuesTrlen); + } + + /// + /// + /// Retrieves a boolean parameter by index. + /// + /// + /// DSP::getParameterBool + /// + /// + public static unsafe Bool32 GetParameterBool(this Dsp dsp, int index, byte* valuesTr, int valuesTrlen) + { + TryGetParameterBool(dsp, index, out var value, valuesTr, valuesTrlen).Check(); + return value; + } + + /// + /// + /// Retrieves a binary data parameter by index. + /// + /// + /// DSP::getParameterData + /// + /// + public static unsafe Result TryGetParameterData( + this Dsp dsp, + int index, + out nint data, + out uint length, + byte* valuesTr, + int valuesTrlen + ) + { + fixed (nint* dataPtr = &data) + fixed (uint* lengthPtr = &length) + return PInvoke.DspGetParameterData(dsp, index, dataPtr, lengthPtr, valuesTr, valuesTrlen); + } + + /// + /// + /// Retrieves a binary data parameter by index. + /// + /// + /// DSP::getParameterData + /// + /// + public static unsafe void GetParameterData( + this Dsp dsp, + int index, + out nint data, + out uint length, + byte* valuesTr, + int valuesTrlen + ) => TryGetParameterData(dsp, index, out data, out length, valuesTr, valuesTrlen).Check(); + + /// + /// + /// Retrieves the number of parameters exposed by this unit. + /// + /// + /// DSP::getNumParameters + /// + /// + public static unsafe Result TryGetNumParameters(this Dsp dsp, out int numParams) + { + fixed (int* numParamsPtr = &numParams) + return PInvoke.DspGetNumParameters(dsp, numParamsPtr); + } + + /// + /// + /// Retrieves the number of parameters exposed by this unit. + /// + /// + /// DSP::getNumParameters + /// + /// + public static int GetNumParameters(this Dsp dsp) + { + TryGetNumParameters(dsp, out var numParams).Check(); + return numParams; + } + + /// + /// + /// Retrieve information about a specified parameter. + /// + /// + /// DSP::getParameterInfo + /// + /// + public static unsafe Result TryGetParameterInfo(this Dsp dsp, int index, out DspParameterDesc* desc) + { + fixed (DspParameterDesc** descPtr = &desc) + return PInvoke.DspGetParameterInfo(dsp, index, descPtr); + } + + /// + /// + /// Retrieve information about a specified parameter. + /// + /// + /// DSP::getParameterInfo + /// + /// + public static unsafe DspParameterDesc* GetParameterInfo(this Dsp dsp, int index) + { + TryGetParameterInfo(dsp, index, out var desc).Check(); + return desc; + } + + /// + /// + /// Retrieve the index of the first data parameter of a particular data type. + /// + /// + /// DSP::getDataParameterIndex + /// + /// + public static unsafe Result TryGetDataParameterIndex(this Dsp dsp, int dataType, out int index) + { + fixed (int* indexPtr = &index) + return PInvoke.DspGetDataParameterIndex(dsp, dataType, indexPtr); + } + + /// + /// + /// Retrieve the index of the first data parameter of a particular data type. + /// + /// + /// DSP::getDataParameterIndex + /// + /// + public static int GetDataParameterIndex(this Dsp dsp, int dataType) + { + TryGetDataParameterIndex(dsp, dataType, out var index).Check(); + return index; + } + + /// + /// + /// Display or hide a DSP unit configuration dialog box inside the target window. + /// + /// + /// DSP::showConfigDialog + /// + /// + public static Result TryShowConfigDialog(this Dsp dsp, nint hwnd, Bool32 show) => + PInvoke.DspShowConfigDialog(dsp, hwnd, show); + + /// + /// + /// Display or hide a DSP unit configuration dialog box inside the target window. + /// + /// + /// DSP::showConfigDialog + /// + /// + public static void ShowConfigDialog(this Dsp dsp, nint hwnd, Bool32 show) => + TryShowConfigDialog(dsp, hwnd, show).Check(); + + /// + /// + /// Retrieves information about this DSP unit. + /// + /// + /// DSP::getInfo + /// + /// + public static unsafe Result TryGetInfo( + this Dsp dsp, + byte* name, + out uint version, + out int channels, + out int configWidth, + out int configHeight + ) + { + fixed (uint* versionPtr = &version) + fixed (int* channelsPtr = &channels) + fixed (int* configWidthPtr = &configWidth) + fixed (int* configHeightPtr = &configHeight) + return PInvoke.DspGetInfo(dsp, name, versionPtr, channelsPtr, configWidthPtr, configHeightPtr); + } + + /// + /// + /// Retrieves information about this DSP unit. + /// + /// + /// DSP::getInfo + /// + /// + public static unsafe void GetInfo( + this Dsp dsp, + byte* name, + out uint version, + out int channels, + out int configWidth, + out int configHeight + ) => TryGetInfo(dsp, name, out version, out channels, out configWidth, out configHeight).Check(); + + /// + /// + /// Retrieves the pre-defined type of a FMOD registered DSP unit. + /// + /// + /// DSP::getType + /// + /// + public static unsafe Result TryGetType(this Dsp dsp, out DspType type) + { + fixed (DspType* typePtr = &type) + return PInvoke.DspGetType(dsp, typePtr); + } + + /// + /// + /// Retrieves the pre-defined type of a FMOD registered DSP unit. + /// + /// + /// DSP::getType + /// + /// + public static DspType GetType(this Dsp dsp) + { + TryGetType(dsp, out var type).Check(); + return type; + } + + /// + /// + /// Retrieves the idle state. + /// + /// + /// DSP::getIdle + /// + /// + public static unsafe Result TryGetIdle(this Dsp dsp, out Bool32 idle) + { + fixed (Bool32* idlePtr = &idle) + return PInvoke.DspGetIdle(dsp, idlePtr); + } + + /// + /// + /// Retrieves the idle state. + /// + /// + /// DSP::getIdle + /// + /// + public static Bool32 GetIdle(this Dsp dsp) + { + TryGetIdle(dsp, out var idle).Check(); + return idle; + } + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// DSP::setUserData + /// + /// + public static Result TrySetUserData(this Dsp dsp, nint userData) => PInvoke.DspSetUserData(dsp, userData); + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// DSP::setUserData + /// + /// + public static void SetUserData(this Dsp dsp, nint userData) => TrySetUserData(dsp, userData).Check(); + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// DSP::getUserData + /// + /// + public static unsafe Result TryGetUserData(this Dsp dsp, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.DspGetUserData(dsp, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// DSP::getUserData + /// + /// + public static nint GetUserData(this Dsp dsp) + { + TryGetUserData(dsp, out var userData).Check(); + return userData; + } + + /// + /// + /// Sets the input and output signal metering enabled states. + /// + /// + /// DSP::setMeteringEnabled + /// + /// + public static Result TrySetMeteringEnabled(this Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled) => + PInvoke.DspSetMeteringEnabled(dsp, inputEnabled, outputEnabled); + + /// + /// + /// Sets the input and output signal metering enabled states. + /// + /// + /// DSP::setMeteringEnabled + /// + /// + public static void SetMeteringEnabled(this Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled) => + TrySetMeteringEnabled(dsp, inputEnabled, outputEnabled).Check(); + + /// + /// + /// Retrieves the input and output signal metering enabled states. + /// + /// + /// DSP::getMeteringEnabled + /// + /// + public static unsafe Result TryGetMeteringEnabled( + this Dsp dsp, + out Bool32 inputEnabled, + out Bool32 outputEnabled + ) + { + fixed (Bool32* inputEnabledPtr = &inputEnabled) + fixed (Bool32* outputEnabledPtr = &outputEnabled) + return PInvoke.DspGetMeteringEnabled(dsp, inputEnabledPtr, outputEnabledPtr); + } + + /// + /// + /// Retrieves the input and output signal metering enabled states. + /// + /// + /// DSP::getMeteringEnabled + /// + /// + public static void GetMeteringEnabled(this Dsp dsp, out Bool32 inputEnabled, out Bool32 outputEnabled) => + TryGetMeteringEnabled(dsp, out inputEnabled, out outputEnabled).Check(); + + /// + /// + /// Retrieve the signal metering enabled metering information. + /// + /// + /// DSP::getMeteringInfo + /// + /// + public static unsafe Result TryGetMeteringInfo( + this Dsp dsp, + out DspMeteringInfo inputInfo, + out DspMeteringInfo outputInfo + ) + { + fixed (DspMeteringInfo* inputInfoPtr = &inputInfo) + fixed (DspMeteringInfo* outputInfoPtr = &outputInfo) + return PInvoke.DspGetMeteringInfo(dsp, inputInfoPtr, outputInfoPtr); + } + + /// + /// + /// Retrieve the signal metering enabled metering information. + /// + /// + /// DSP::getMeteringInfo + /// + /// + public static void GetMeteringInfo( + this Dsp dsp, + out DspMeteringInfo inputInfo, + out DspMeteringInfo outputInfo + ) => TryGetMeteringInfo(dsp, out inputInfo, out outputInfo).Check(); + + /// + /// + /// Retrieves statistics on the mixer thread CPU usage for this unit. + /// + /// + /// DSP::getCPUUsage + /// + /// + public static unsafe Result TryGetCpuUsage(this Dsp dsp, out uint exclusive, out uint inclusive) + { + fixed (uint* exclusivePtr = &exclusive) + fixed (uint* inclusivePtr = &inclusive) + return PInvoke.DspGetCpuUsage(dsp, exclusivePtr, inclusivePtr); + } + + /// + /// + /// Retrieves statistics on the mixer thread CPU usage for this unit. + /// + /// + /// DSP::getCPUUsage + /// + /// + public static void GetCpuUsage(this Dsp dsp, out uint exclusive, out uint inclusive) => + TryGetCpuUsage(dsp, out exclusive, out inclusive).Check(); + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.DspConnection.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.DspConnection.gen.cs new file mode 100644 index 0000000..6b95939 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.DspConnection.gen.cs @@ -0,0 +1,272 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Retrieves the connection's input DSP unit. + /// + /// + /// DSPConnection::getInput + /// + /// + public static unsafe Result TryGetInput(this DspConnection dspConnection, out Dsp input) + { + fixed (Dsp* inputPtr = &input) + return PInvoke.DspConnectionGetInput(dspConnection, inputPtr); + } + + /// + /// + /// Retrieves the connection's input DSP unit. + /// + /// + /// DSPConnection::getInput + /// + /// + public static Dsp GetInput(this DspConnection dspConnection) + { + TryGetInput(dspConnection, out var input).Check(); + return input; + } + + /// + /// + /// Retrieves the connection's output DSP unit. + /// + /// + /// DSPConnection::getOutput + /// + /// + public static unsafe Result TryGetOutput(this DspConnection dspConnection, out Dsp output) + { + fixed (Dsp* outputPtr = &output) + return PInvoke.DspConnectionGetOutput(dspConnection, outputPtr); + } + + /// + /// + /// Retrieves the connection's output DSP unit. + /// + /// + /// DSPConnection::getOutput + /// + /// + public static Dsp GetOutput(this DspConnection dspConnection) + { + TryGetOutput(dspConnection, out var output).Check(); + return output; + } + + /// + /// + /// Sets the connection's volume scale. + /// + /// + /// DSPConnection::setMix + /// + /// + public static Result TrySetMix(this DspConnection dspConnection, float volume) => + PInvoke.DspConnectionSetMix(dspConnection, volume); + + /// + /// + /// Sets the connection's volume scale. + /// + /// + /// DSPConnection::setMix + /// + /// + public static void SetMix(this DspConnection dspConnection, float volume) => + TrySetMix(dspConnection, volume).Check(); + + /// + /// + /// Retrieves the connection's volume scale. + /// + /// + /// DSPConnection::getMix + /// + /// + public static unsafe Result TryGetMix(this DspConnection dspConnection, out float volume) + { + fixed (float* volumePtr = &volume) + return PInvoke.DspConnectionGetMix(dspConnection, volumePtr); + } + + /// + /// + /// Retrieves the connection's volume scale. + /// + /// + /// DSPConnection::getMix + /// + /// + public static float GetMix(this DspConnection dspConnection) + { + TryGetMix(dspConnection, out var volume).Check(); + return volume; + } + + /// + /// + /// Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers + /// (rows). + /// + /// + /// DSPConnection::setMixMatrix + /// + /// + public static unsafe Result TrySetMixMatrix( + this DspConnection dspConnection, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ) => PInvoke.DspConnectionSetMixMatrix(dspConnection, matrix, outChannels, inChannels, inChannelHop); + + /// + /// + /// Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers + /// (rows). + /// + /// + /// DSPConnection::setMixMatrix + /// + /// + public static unsafe void SetMixMatrix( + this DspConnection dspConnection, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ) => TrySetMixMatrix(dspConnection, matrix, outChannels, inChannels, inChannelHop).Check(); + + /// + /// + /// Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output + /// speakers (rows). + /// + /// + /// DSPConnection::getMixMatrix + /// + /// + public static unsafe Result TryGetMixMatrix( + this DspConnection dspConnection, + float* matrix, + out int outChannels, + out int inChannels, + int inChannelHop + ) + { + fixed (int* outChannelsPtr = &outChannels) + fixed (int* inChannelsPtr = &inChannels) + return PInvoke.DspConnectionGetMixMatrix( + dspConnection, + matrix, + outChannelsPtr, + inChannelsPtr, + inChannelHop + ); + } + + /// + /// + /// Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output + /// speakers (rows). + /// + /// + /// DSPConnection::getMixMatrix + /// + /// + public static unsafe void GetMixMatrix( + this DspConnection dspConnection, + float* matrix, + out int outChannels, + out int inChannels, + int inChannelHop + ) => TryGetMixMatrix(dspConnection, matrix, out outChannels, out inChannels, inChannelHop).Check(); + + /// + /// + /// Retrieves the type of the connection between two DSP units. + /// + /// + /// DSPConnection::getType + /// + /// + public static unsafe Result TryGetType(this DspConnection dspConnection, out DspConnectionType type) + { + fixed (DspConnectionType* typePtr = &type) + return PInvoke.DspConnectionGetType(dspConnection, typePtr); + } + + /// + /// + /// Retrieves the type of the connection between two DSP units. + /// + /// + /// DSPConnection::getType + /// + /// + public static DspConnectionType GetType(this DspConnection dspConnection) + { + TryGetType(dspConnection, out var type).Check(); + return type; + } + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// DSPConnection::setUserData + /// + /// + public static Result TrySetUserData(this DspConnection dspConnection, nint userData) => + PInvoke.DspConnectionSetUserData(dspConnection, userData); + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// DSPConnection::setUserData + /// + /// + public static void SetUserData(this DspConnection dspConnection, nint userData) => + TrySetUserData(dspConnection, userData).Check(); + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// DSPConnection::getUserData + /// + /// + public static unsafe Result TryGetUserData(this DspConnection dspConnection, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.DspConnectionGetUserData(dspConnection, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// DSPConnection::getUserData + /// + /// + public static nint GetUserData(this DspConnection dspConnection) + { + TryGetUserData(dspConnection, out var userData).Check(); + return userData; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.FmodSystem.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.FmodSystem.gen.cs new file mode 100644 index 0000000..b0089f1 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.FmodSystem.gen.cs @@ -0,0 +1,2959 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Closes and frees this object and its resources. + /// + /// + /// This will internally call System::close, so calling System::close before this function is not necessary. + /// + /// + /// See Also: System::init + /// + /// + /// System::release + /// + /// + public static Result TryRelease(this FmodSystem system) => PInvoke.SystemRelease(system); + + /// + /// + /// Closes and frees this object and its resources. + /// + /// + /// This will internally call System::close, so calling System::close before this function is not necessary. + /// + /// + /// See Also: System::init + /// + /// + /// System::release + /// + /// + public static void Release(this FmodSystem system) => TryRelease(system).Check(); + + /// + /// + /// Sets the type of output interface used to run the mixer. + /// + /// + /// System::setOutput + /// + /// + public static Result TrySetOutput(this FmodSystem system, OutputType output) => + PInvoke.SystemSetOutput(system, output); + + /// + /// + /// Sets the type of output interface used to run the mixer. + /// + /// + /// System::setOutput + /// + /// + public static void SetOutput(this FmodSystem system, OutputType output) => TrySetOutput(system, output).Check(); + + /// + /// + /// Retrieves the type of output interface used to run the mixer. + /// + /// + /// System::getOutput + /// + /// + public static unsafe Result TryGetOutput(this FmodSystem system, out OutputType output) + { + fixed (OutputType* outputPtr = &output) + return PInvoke.SystemGetOutput(system, outputPtr); + } + + /// + /// + /// Retrieves the type of output interface used to run the mixer. + /// + /// + /// System::getOutput + /// + /// + public static OutputType GetOutput(this FmodSystem system) + { + TryGetOutput(system, out var output).Check(); + return output; + } + + /// + /// + /// Retrieves the number of output drivers available for the selected output type. + /// + /// + /// System::getNumDrivers + /// + /// + public static unsafe Result TryGetNumDrivers(this FmodSystem system, out int numDrivers) + { + fixed (int* numDriversPtr = &numDrivers) + return PInvoke.SystemGetNumDrivers(system, numDriversPtr); + } + + /// + /// + /// Retrieves the number of output drivers available for the selected output type. + /// + /// + /// System::getNumDrivers + /// + /// + public static int GetNumDrivers(this FmodSystem system) + { + TryGetNumDrivers(system, out var numDrivers).Check(); + return numDrivers; + } + + /// + /// + /// Retrieves identification information about a sound device specified by its index, and specific to the + /// selected output mode. + /// + /// + /// System::getDriverInfo + /// + /// + public static unsafe Result TryGetDriverInfo( + this FmodSystem system, + int id, + byte* name, + int nameLen, + out Guid guid, + out int systemRate, + out SpeakerMode speakerMode, + out int speakerModeChannels + ) + { + fixed (Guid* guidPtr = &guid) + fixed (int* systemRatePtr = &systemRate) + fixed (SpeakerMode* speakerModePtr = &speakerMode) + fixed (int* speakerModeChannelsPtr = &speakerModeChannels) + return PInvoke.SystemGetDriverInfo( + system, + id, + name, + nameLen, + guidPtr, + systemRatePtr, + speakerModePtr, + speakerModeChannelsPtr + ); + } + + /// + /// + /// Retrieves identification information about a sound device specified by its index, and specific to the + /// selected output mode. + /// + /// + /// System::getDriverInfo + /// + /// + public static unsafe void GetDriverInfo( + this FmodSystem system, + int id, + byte* name, + int nameLen, + out Guid guid, + out int systemRate, + out SpeakerMode speakerMode, + out int speakerModeChannels + ) => + TryGetDriverInfo( + system, + id, + name, + nameLen, + out guid, + out systemRate, + out speakerMode, + out speakerModeChannels + ) + .Check(); + + /// + /// + /// Sets the output driver for the selected output type. + /// + /// + /// System::setDriver + /// + /// + public static Result TrySetDriver(this FmodSystem system, int driver) => + PInvoke.SystemSetDriver(system, driver); + + /// + /// + /// Sets the output driver for the selected output type. + /// + /// + /// System::setDriver + /// + /// + public static void SetDriver(this FmodSystem system, int driver) => TrySetDriver(system, driver).Check(); + + /// + /// + /// Retrieves the output driver for the selected output type. + /// + /// + /// System::getDriver + /// + /// + public static unsafe Result TryGetDriver(this FmodSystem system, out int driver) + { + fixed (int* driverPtr = &driver) + return PInvoke.SystemGetDriver(system, driverPtr); + } + + /// + /// + /// Retrieves the output driver for the selected output type. + /// + /// + /// System::getDriver + /// + /// + public static int GetDriver(this FmodSystem system) + { + TryGetDriver(system, out var driver).Check(); + return driver; + } + + /// + /// + /// Sets the maximum number of software mixed Channels possible. + /// + /// + /// System::setSoftwareChannels + /// + /// + public static Result TrySetSoftwareChannels(this FmodSystem system, int numSoftwareChannels) => + PInvoke.SystemSetSoftwareChannels(system, numSoftwareChannels); + + /// + /// + /// Sets the maximum number of software mixed Channels possible. + /// + /// + /// System::setSoftwareChannels + /// + /// + public static void SetSoftwareChannels(this FmodSystem system, int numSoftwareChannels) => + TrySetSoftwareChannels(system, numSoftwareChannels).Check(); + + /// + /// + /// Retrieves the maximum number of software mixed Channels possible. + /// + /// + /// System::getSoftwareChannels + /// + /// + public static unsafe Result TryGetSoftwareChannels(this FmodSystem system, out int numSoftwareChannels) + { + fixed (int* numSoftwareChannelsPtr = &numSoftwareChannels) + return PInvoke.SystemGetSoftwareChannels(system, numSoftwareChannelsPtr); + } + + /// + /// + /// Retrieves the maximum number of software mixed Channels possible. + /// + /// + /// System::getSoftwareChannels + /// + /// + public static int GetSoftwareChannels(this FmodSystem system) + { + TryGetSoftwareChannels(system, out var numSoftwareChannels).Check(); + return numSoftwareChannels; + } + + /// + /// + /// Sets the output format for the software mixer. + /// + /// + /// System::setSoftwareFormat + /// + /// + public static Result TrySetSoftwareFormat( + this FmodSystem system, + int sampleRate, + SpeakerMode speakerMode, + int numRawSpeakers + ) => PInvoke.SystemSetSoftwareFormat(system, sampleRate, speakerMode, numRawSpeakers); + + /// + /// + /// Sets the output format for the software mixer. + /// + /// + /// System::setSoftwareFormat + /// + /// + public static void SetSoftwareFormat( + this FmodSystem system, + int sampleRate, + SpeakerMode speakerMode, + int numRawSpeakers + ) => TrySetSoftwareFormat(system, sampleRate, speakerMode, numRawSpeakers).Check(); + + /// + /// + /// Retrieves the output format for the software mixer. + /// + /// + /// System::getSoftwareFormat + /// + /// + public static unsafe Result TryGetSoftwareFormat( + this FmodSystem system, + out int sampleRate, + out SpeakerMode speakerMode, + out int numRawSpeakers + ) + { + fixed (int* sampleRatePtr = &sampleRate) + fixed (SpeakerMode* speakerModePtr = &speakerMode) + fixed (int* numRawSpeakersPtr = &numRawSpeakers) + return PInvoke.SystemGetSoftwareFormat(system, sampleRatePtr, speakerModePtr, numRawSpeakersPtr); + } + + /// + /// + /// Retrieves the output format for the software mixer. + /// + /// + /// System::getSoftwareFormat + /// + /// + public static void GetSoftwareFormat( + this FmodSystem system, + out int sampleRate, + out SpeakerMode speakerMode, + out int numRawSpeakers + ) => TryGetSoftwareFormat(system, out sampleRate, out speakerMode, out numRawSpeakers).Check(); + + /// + /// + /// Sets the buffer size for the FMOD software mixing engine. + /// + /// + /// This function is used if you need to control mixer latency or granularity. Smaller buffersizes lead to + /// smaller latency, but can lead to stuttering/skipping/unstable sound on slower machines or soundcards + /// with bad drivers. + /// + /// + /// System::setDSPBufferSize + /// + /// + public static Result TrySetDspBufferSize(this FmodSystem system, uint bufferLength, int numBuffers) => + PInvoke.SystemSetDspBufferSize(system, bufferLength, numBuffers); + + /// + /// + /// Sets the buffer size for the FMOD software mixing engine. + /// + /// + /// This function is used if you need to control mixer latency or granularity. Smaller buffersizes lead to + /// smaller latency, but can lead to stuttering/skipping/unstable sound on slower machines or soundcards + /// with bad drivers. + /// + /// + /// System::setDSPBufferSize + /// + /// + public static void SetDspBufferSize(this FmodSystem system, uint bufferLength, int numBuffers) => + TrySetDspBufferSize(system, bufferLength, numBuffers).Check(); + + /// + /// + /// Retrieves the buffer size settings for the FMOD software mixing engine. + /// + /// + /// System::getDSPBufferSize + /// + /// + public static unsafe Result TryGetDspBufferSize( + this FmodSystem system, + out uint bufferLength, + out int numBuffers + ) + { + fixed (uint* bufferLengthPtr = &bufferLength) + fixed (int* numBuffersPtr = &numBuffers) + return PInvoke.SystemGetDspBufferSize(system, bufferLengthPtr, numBuffersPtr); + } + + /// + /// + /// Retrieves the buffer size settings for the FMOD software mixing engine. + /// + /// + /// System::getDSPBufferSize + /// + /// + public static void GetDspBufferSize(this FmodSystem system, out uint bufferLength, out int numBuffers) => + TryGetDspBufferSize(system, out bufferLength, out numBuffers).Check(); + + /// + /// + /// Set callbacks to implement all file I/O instead of using the platform native method. + /// + /// + /// System::setFileSystem + /// + /// + public static Result TrySetFileSystem( + this FmodSystem system, + FileOpenCallbackPtr userOpen, + FileCloseCallbackPtr userClose, + FileReadCallbackPtr userRead, + FileSeekCallbackPtr userSeek, + FileAsyncReadCallbackPtr userAsyncRead, + FileAsyncCancelCallbackPtr userAsyncCancel, + int blockAlign + ) => + PInvoke.SystemSetFileSystem( + system, + userOpen, + userClose, + userRead, + userSeek, + userAsyncRead, + userAsyncCancel, + blockAlign + ); + + /// + /// + /// Set callbacks to implement all file I/O instead of using the platform native method. + /// + /// + /// System::setFileSystem + /// + /// + public static void SetFileSystem( + this FmodSystem system, + FileOpenCallbackPtr userOpen, + FileCloseCallbackPtr userClose, + FileReadCallbackPtr userRead, + FileSeekCallbackPtr userSeek, + FileAsyncReadCallbackPtr userAsyncRead, + FileAsyncCancelCallbackPtr userAsyncCancel, + int blockAlign + ) => + TrySetFileSystem( + system, + userOpen, + userClose, + userRead, + userSeek, + userAsyncRead, + userAsyncCancel, + blockAlign + ) + .Check(); + + /// + /// + /// 'Piggyback' on FMOD file reading routines to capture data as it's read. + /// + /// + /// This allows users to capture data as FMOD reads it, which may be useful for extracting the raw data that + /// FMOD reads for hard to support sources (for example internet streams). + /// + /// + /// System::attachFileSystem + /// + /// + public static Result TryAttachFileSystem( + this FmodSystem system, + FileOpenCallbackPtr userOpen, + FileCloseCallbackPtr userClose, + FileReadCallbackPtr userRead, + FileSeekCallbackPtr userSeek + ) => PInvoke.SystemAttachFileSystem(system, userOpen, userClose, userRead, userSeek); + + /// + /// + /// 'Piggyback' on FMOD file reading routines to capture data as it's read. + /// + /// + /// This allows users to capture data as FMOD reads it, which may be useful for extracting the raw data that + /// FMOD reads for hard to support sources (for example internet streams). + /// + /// + /// System::attachFileSystem + /// + /// + public static void AttachFileSystem( + this FmodSystem system, + FileOpenCallbackPtr userOpen, + FileCloseCallbackPtr userClose, + FileReadCallbackPtr userRead, + FileSeekCallbackPtr userSeek + ) => TryAttachFileSystem(system, userOpen, userClose, userRead, userSeek).Check(); + + /// + /// + /// Sets advanced settings for the system object, typically to allow adjusting of settings related to + /// resource usage or audio quality. + /// + /// + /// System::setAdvancedSettings + /// + /// + public static unsafe Result TrySetAdvancedSettings(this FmodSystem system, in AdvancedSettings settings) + { + fixed (AdvancedSettings* settingsPtr = &settings) + return PInvoke.SystemSetAdvancedSettings(system, settingsPtr); + } + + /// + /// + /// Sets advanced settings for the system object, typically to allow adjusting of settings related to + /// resource usage or audio quality. + /// + /// + /// System::setAdvancedSettings + /// + /// + public static void SetAdvancedSettings(this FmodSystem system, in AdvancedSettings settings) => + TrySetAdvancedSettings(system, settings).Check(); + + /// + /// + /// Retrieves the advanced settings for the system object. + /// + /// + /// System::getAdvancedSettings + /// + /// + public static unsafe Result TryGetAdvancedSettings(this FmodSystem system, out AdvancedSettings settings) + { + fixed (AdvancedSettings* settingsPtr = &settings) + return PInvoke.SystemGetAdvancedSettings(system, settingsPtr); + } + + /// + /// + /// Retrieves the advanced settings for the system object. + /// + /// + /// System::getAdvancedSettings + /// + /// + public static AdvancedSettings GetAdvancedSettings(this FmodSystem system) + { + TryGetAdvancedSettings(system, out var settings).Check(); + return settings; + } + + /// + /// + /// Sets the callback for System level notifications. + /// + /// + /// System::setCallback + /// + /// + public static Result TrySetCallback( + this FmodSystem system, + SystemCallbackPtr callback, + SystemCallbackType callbackMask + ) => PInvoke.SystemSetCallback(system, callback, callbackMask); + + /// + /// + /// Sets the callback for System level notifications. + /// + /// + /// System::setCallback + /// + /// + public static void SetCallback( + this FmodSystem system, + SystemCallbackPtr callback, + SystemCallbackType callbackMask + ) => TrySetCallback(system, callback, callbackMask).Check(); + + /// + /// + /// Specify a base search path for plug-ins so they can be placed somewhere else than the directory of the + /// main executable. + /// + /// + /// System::setPluginPath + /// + /// + public static unsafe Result TrySetPluginPath(this FmodSystem system, RefString8 path) + { + fixed (byte* pathPtr = path) + return PInvoke.SystemSetPluginPath(system, pathPtr); + } + + /// + /// + /// Specify a base search path for plug-ins so they can be placed somewhere else than the directory of the + /// main executable. + /// + /// + /// System::setPluginPath + /// + /// + public static void SetPluginPath(this FmodSystem system, RefString8 path) => + TrySetPluginPath(system, path).Check(); + + /// + /// + /// Loads an FMOD plug-in (DSP, output or codec) from a file. + /// + /// + /// System::loadPlugin + /// + /// + public static unsafe Result TryLoadPlugin( + this FmodSystem system, + RefString8 fileName, + out uint handle, + uint priority + ) + { + fixed (byte* fileNamePtr = fileName) + fixed (uint* handlePtr = &handle) + return PInvoke.SystemLoadPlugin(system, fileNamePtr, handlePtr, priority); + } + + /// + /// + /// Loads an FMOD plug-in (DSP, output or codec) from a file. + /// + /// + /// System::loadPlugin + /// + /// + public static uint LoadPlugin(this FmodSystem system, RefString8 fileName, uint priority) + { + TryLoadPlugin(system, fileName, out var handle, priority).Check(); + return handle; + } + + /// + /// + /// Unloads an FMOD (DSP, Output or Codec) plug-in. + /// + /// + /// System::unloadPlugin + /// + /// + public static Result TryUnloadPlugin(this FmodSystem system, uint handle) => + PInvoke.SystemUnloadPlugin(system, handle); + + /// + /// + /// Unloads an FMOD (DSP, Output or Codec) plug-in. + /// + /// + /// System::unloadPlugin + /// + /// + public static void UnloadPlugin(this FmodSystem system, uint handle) => TryUnloadPlugin(system, handle).Check(); + + /// + /// + /// Retrieves the number of nested plug-ins from the selected plug-in. + /// + /// + /// System::getNumNestedPlugins + /// + /// + public static unsafe Result TryGetNumNestedPlugins(this FmodSystem system, uint handle, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.SystemGetNumNestedPlugins(system, handle, countPtr); + } + + /// + /// + /// Retrieves the number of nested plug-ins from the selected plug-in. + /// + /// + /// System::getNumNestedPlugins + /// + /// + public static int GetNumNestedPlugins(this FmodSystem system, uint handle) + { + TryGetNumNestedPlugins(system, handle, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves the handle of a nested plug-in. + /// + /// + /// System::getNestedPlugin + /// + /// + public static unsafe Result TryGetNestedPlugin( + this FmodSystem system, + uint handle, + int index, + out uint nestedHandle + ) + { + fixed (uint* nestedHandlePtr = &nestedHandle) + return PInvoke.SystemGetNestedPlugin(system, handle, index, nestedHandlePtr); + } + + /// + /// + /// Retrieves the handle of a nested plug-in. + /// + /// + /// System::getNestedPlugin + /// + /// + public static uint GetNestedPlugin(this FmodSystem system, uint handle, int index) + { + TryGetNestedPlugin(system, handle, index, out var nestedHandle).Check(); + return nestedHandle; + } + + /// + /// + /// Retrieves the number of loaded plug-ins. + /// + /// + /// System::getNumPlugins + /// + /// + public static unsafe Result TryGetNumPlugins(this FmodSystem system, PluginType pluginType, out int numPlugins) + { + fixed (int* numPluginsPtr = &numPlugins) + return PInvoke.SystemGetNumPlugins(system, pluginType, numPluginsPtr); + } + + /// + /// + /// Retrieves the number of loaded plug-ins. + /// + /// + /// System::getNumPlugins + /// + /// + public static int GetNumPlugins(this FmodSystem system, PluginType pluginType) + { + TryGetNumPlugins(system, pluginType, out var numPlugins).Check(); + return numPlugins; + } + + /// + /// + /// Retrieves the handle of a plug-in based on its type and relative index. + /// + /// + /// System::getPluginHandle + /// + /// + public static unsafe Result TryGetPluginHandle( + this FmodSystem system, + PluginType pluginType, + int index, + out uint handle + ) + { + fixed (uint* handlePtr = &handle) + return PInvoke.SystemGetPluginHandle(system, pluginType, index, handlePtr); + } + + /// + /// + /// Retrieves the handle of a plug-in based on its type and relative index. + /// + /// + /// System::getPluginHandle + /// + /// + public static uint GetPluginHandle(this FmodSystem system, PluginType pluginType, int index) + { + TryGetPluginHandle(system, pluginType, index, out var handle).Check(); + return handle; + } + + /// + /// + /// Retrieves information for the selected plug-in. + /// + /// + /// System::getPluginInfo + /// + /// + public static unsafe Result TryGetPluginInfo( + this FmodSystem system, + uint handle, + out PluginType pluginType, + byte* name, + int nameLen, + out uint version + ) + { + fixed (PluginType* pluginTypePtr = &pluginType) + fixed (uint* versionPtr = &version) + return PInvoke.SystemGetPluginInfo(system, handle, pluginTypePtr, name, nameLen, versionPtr); + } + + /// + /// + /// Retrieves information for the selected plug-in. + /// + /// + /// System::getPluginInfo + /// + /// + public static unsafe void GetPluginInfo( + this FmodSystem system, + uint handle, + out PluginType pluginType, + byte* name, + int nameLen, + out uint version + ) => TryGetPluginInfo(system, handle, out pluginType, name, nameLen, out version).Check(); + + /// + /// + /// Selects an output type given a plug-in handle. + /// + /// + /// System::setOutputByPlugin + /// + /// + public static Result TrySetOutputByPlugin(this FmodSystem system, uint handle) => + PInvoke.SystemSetOutputByPlugin(system, handle); + + /// + /// + /// Selects an output type given a plug-in handle. + /// + /// + /// System::setOutputByPlugin + /// + /// + public static void SetOutputByPlugin(this FmodSystem system, uint handle) => + TrySetOutputByPlugin(system, handle).Check(); + + /// + /// + /// Retrieves the plug-in handle for the currently selected output type. + /// + /// + /// System::getOutputByPlugin + /// + /// + public static unsafe Result TryGetOutputByPlugin(this FmodSystem system, out uint handle) + { + fixed (uint* handlePtr = &handle) + return PInvoke.SystemGetOutputByPlugin(system, handlePtr); + } + + /// + /// + /// Retrieves the plug-in handle for the currently selected output type. + /// + /// + /// System::getOutputByPlugin + /// + /// + public static uint GetOutputByPlugin(this FmodSystem system) + { + TryGetOutputByPlugin(system, out var handle).Check(); + return handle; + } + + /// + /// + /// Create a DSP unit with a specified plug-in handle. + /// + /// + /// System::createDSPByPlugin + /// + /// + public static unsafe Result TryCreateDspByPlugin(this FmodSystem system, uint handle, out Dsp dsp) + { + fixed (Dsp* dspPtr = &dsp) + return PInvoke.SystemCreateDspByPlugin(system, handle, dspPtr); + } + + /// + /// + /// Create a DSP unit with a specified plug-in handle. + /// + /// + /// System::createDSPByPlugin + /// + /// + public static Dsp CreateDspByPlugin(this FmodSystem system, uint handle) + { + TryCreateDspByPlugin(system, handle, out var dsp).Check(); + return dsp; + } + + /// + /// + /// Retrieve the description structure for a pre-existing DSP plug-in. + /// + /// + /// System::getDSPInfoByPlugin + /// + /// + public static unsafe Result TryGetDspInfoByPlugin( + this FmodSystem system, + uint handle, + out DspDescription* description + ) + { + fixed (DspDescription** descriptionPtr = &description) + return PInvoke.SystemGetDspInfoByPlugin(system, handle, descriptionPtr); + } + + /// + /// + /// Retrieve the description structure for a pre-existing DSP plug-in. + /// + /// + /// System::getDSPInfoByPlugin + /// + /// + public static unsafe DspDescription* GetDspInfoByPlugin(this FmodSystem system, uint handle) + { + TryGetDspInfoByPlugin(system, handle, out var description).Check(); + return description; + } + + /// + /// + /// Register a Codec plug-in description structure for later use. + /// + /// + /// System::registerCodec + /// + /// + public static unsafe Result TryRegisterCodec( + this FmodSystem system, + out CodecDescription description, + out uint handle, + uint priority + ) + { + fixed (CodecDescription* descriptionPtr = &description) + fixed (uint* handlePtr = &handle) + return PInvoke.SystemRegisterCodec(system, descriptionPtr, handlePtr, priority); + } + + /// + /// + /// Register a Codec plug-in description structure for later use. + /// + /// + /// System::registerCodec + /// + /// + public static void RegisterCodec( + this FmodSystem system, + out CodecDescription description, + out uint handle, + uint priority + ) => TryRegisterCodec(system, out description, out handle, priority).Check(); + + /// + /// + /// Register a DSP plug-in description structure for later use. + /// + /// + /// System::registerDSP + /// + /// + public static unsafe Result TryRegisterDsp( + this FmodSystem system, + in DspDescription description, + out uint handle + ) + { + fixed (DspDescription* descriptionPtr = &description) + fixed (uint* handlePtr = &handle) + return PInvoke.SystemRegisterDsp(system, descriptionPtr, handlePtr); + } + + /// + /// + /// Register a DSP plug-in description structure for later use. + /// + /// + /// System::registerDSP + /// + /// + public static uint RegisterDsp(this FmodSystem system, in DspDescription description) + { + TryRegisterDsp(system, description, out var handle).Check(); + return handle; + } + + /// + /// + /// Register an Output plug-in description structure for later use. + /// + /// + /// System::registerOutput + /// + /// + public static unsafe Result TryRegisterOutput( + this FmodSystem system, + in OutputDescription description, + out uint handle + ) + { + fixed (OutputDescription* descriptionPtr = &description) + fixed (uint* handlePtr = &handle) + return PInvoke.SystemRegisterOutput(system, descriptionPtr, handlePtr); + } + + /// + /// + /// Register an Output plug-in description structure for later use. + /// + /// + /// System::registerOutput + /// + /// + public static uint RegisterOutput(this FmodSystem system, in OutputDescription description) + { + TryRegisterOutput(system, description, out var handle).Check(); + return handle; + } + + /// + /// + /// Initialize the system object and prepare FMOD for playback. + /// + /// + /// System::init + /// + /// + public static Result TryInit(this FmodSystem system, int maxChannels, InitFlags flags, nint extraDriverData) => + PInvoke.SystemInit(system, maxChannels, flags, extraDriverData); + + /// + /// + /// Initialize the system object and prepare FMOD for playback. + /// + /// + /// System::init + /// + /// + public static void Init(this FmodSystem system, int maxChannels, InitFlags flags, nint extraDriverData) => + TryInit(system, maxChannels, flags, extraDriverData).Check(); + + /// + /// + /// Close the connection to the output and return to an uninitialized state without releasing the object. + /// + /// + /// Closing renders objects created with this System invalid. Make sure any Sound, ChannelGroup, Geometry + /// and DSP objects are released before calling this. + /// + /// + /// All pre-initialize configuration settings will remain and the System can be reinitialized as needed. + /// + /// + /// See Also: System::init, System::release + /// + /// + /// System::close + /// + /// + public static Result TryClose(this FmodSystem system) => PInvoke.SystemClose(system); + + /// + /// + /// Close the connection to the output and return to an uninitialized state without releasing the object. + /// + /// + /// Closing renders objects created with this System invalid. Make sure any Sound, ChannelGroup, Geometry + /// and DSP objects are released before calling this. + /// + /// + /// All pre-initialize configuration settings will remain and the System can be reinitialized as needed. + /// + /// + /// See Also: System::init, System::release + /// + /// + /// System::close + /// + /// + public static void Close(this FmodSystem system) => TryClose(system).Check(); + + /// + /// + /// Updates the FMOD system. + /// + /// + /// Should be called once per 'game' tick, or once per frame in your application to perform actions such as: + /// + /// + /// If FMOD_OUTPUTTYPE_NOSOUND_NRT or FMOD_OUTPUTTYPE_WAVWRITER_NRT output modes are used, this function + /// also drives the software / DSP engine, instead of it running asynchronously in a thread as is the + /// default behavior.This can be used for faster than realtime updates to the decoding or DSP engine which + /// might be useful if the output is the wav writer for example. + /// + /// + /// If FMOD_INIT_STREAM_FROM_UPDATE is used, this function will update the stream engine. Combining this + /// with the non realtime output will mean smoother captured output. + /// + /// + /// See Also: System::init, FMOD_INITFLAGS, FMOD_OUTPUTTYPE, FMOD_MODE + /// + /// + /// System::update + /// + /// + public static Result TryUpdate(this FmodSystem system) => PInvoke.SystemUpdate(system); + + /// + /// + /// Updates the FMOD system. + /// + /// + /// Should be called once per 'game' tick, or once per frame in your application to perform actions such as: + /// + /// + /// If FMOD_OUTPUTTYPE_NOSOUND_NRT or FMOD_OUTPUTTYPE_WAVWRITER_NRT output modes are used, this function + /// also drives the software / DSP engine, instead of it running asynchronously in a thread as is the + /// default behavior.This can be used for faster than realtime updates to the decoding or DSP engine which + /// might be useful if the output is the wav writer for example. + /// + /// + /// If FMOD_INIT_STREAM_FROM_UPDATE is used, this function will update the stream engine. Combining this + /// with the non realtime output will mean smoother captured output. + /// + /// + /// See Also: System::init, FMOD_INITFLAGS, FMOD_OUTPUTTYPE, FMOD_MODE + /// + /// + /// System::update + /// + /// + public static void Update(this FmodSystem system) => TryUpdate(system).Check(); + + /// + /// + /// Sets the position of the specified speaker for the current speaker mode. + /// + /// + /// This function allows the user to specify the position of their speaker to account for non standard + /// setups.It also allows the user to disable speakers from 3D consideration in a game. + /// + /// + /// System::setSpeakerPosition + /// + /// + public static Result TrySetSpeakerPosition( + this FmodSystem system, + Speaker speaker, + float x, + float y, + Bool32 active + ) => PInvoke.SystemSetSpeakerPosition(system, speaker, x, y, active); + + /// + /// + /// Sets the position of the specified speaker for the current speaker mode. + /// + /// + /// This function allows the user to specify the position of their speaker to account for non standard + /// setups.It also allows the user to disable speakers from 3D consideration in a game. + /// + /// + /// System::setSpeakerPosition + /// + /// + public static void SetSpeakerPosition( + this FmodSystem system, + Speaker speaker, + float x, + float y, + Bool32 active + ) => TrySetSpeakerPosition(system, speaker, x, y, active).Check(); + + /// + /// + /// Retrieves the position of the specified speaker for the current speaker mode. + /// + /// + /// System::getSpeakerPosition + /// + /// + public static unsafe Result TryGetSpeakerPosition( + this FmodSystem system, + Speaker speaker, + out float x, + out float y, + out Bool32 active + ) + { + fixed (float* xPtr = &x) + fixed (float* yPtr = &y) + fixed (Bool32* activePtr = &active) + return PInvoke.SystemGetSpeakerPosition(system, speaker, xPtr, yPtr, activePtr); + } + + /// + /// + /// Retrieves the position of the specified speaker for the current speaker mode. + /// + /// + /// System::getSpeakerPosition + /// + /// + public static void GetSpeakerPosition( + this FmodSystem system, + Speaker speaker, + out float x, + out float y, + out Bool32 active + ) => TryGetSpeakerPosition(system, speaker, out x, out y, out active).Check(); + + /// + /// + /// Sets the default file buffer size for newly opened streams. + /// + /// + /// System::setStreamBufferSize + /// + /// + public static Result TrySetStreamBufferSize( + this FmodSystem system, + uint fileBufferSize, + TimeUnit fileBufferSizeType + ) => PInvoke.SystemSetStreamBufferSize(system, fileBufferSize, fileBufferSizeType); + + /// + /// + /// Sets the default file buffer size for newly opened streams. + /// + /// + /// System::setStreamBufferSize + /// + /// + public static void SetStreamBufferSize( + this FmodSystem system, + uint fileBufferSize, + TimeUnit fileBufferSizeType + ) => TrySetStreamBufferSize(system, fileBufferSize, fileBufferSizeType).Check(); + + /// + /// + /// Retrieves the default file buffer size for newly opened streams. + /// + /// + /// System::getStreamBufferSize + /// + /// + public static unsafe Result TryGetStreamBufferSize( + this FmodSystem system, + out uint fileBufferSize, + out TimeUnit fileBufferSizeType + ) + { + fixed (uint* fileBufferSizePtr = &fileBufferSize) + fixed (TimeUnit* fileBufferSizeTypePtr = &fileBufferSizeType) + return PInvoke.SystemGetStreamBufferSize(system, fileBufferSizePtr, fileBufferSizeTypePtr); + } + + /// + /// + /// Retrieves the default file buffer size for newly opened streams. + /// + /// + /// System::getStreamBufferSize + /// + /// + public static void GetStreamBufferSize( + this FmodSystem system, + out uint fileBufferSize, + out TimeUnit fileBufferSizeType + ) => TryGetStreamBufferSize(system, out fileBufferSize, out fileBufferSizeType).Check(); + + /// + /// + /// Sets the global doppler scale, distance factor and log roll-off scale for all 3D sound in FMOD. + /// + /// + /// System::set3DSettings + /// + /// + public static Result TrySet3dSettings( + this FmodSystem system, + float dopplerScale, + float distanceFactor, + float rolloffScale + ) => PInvoke.SystemSet3dSettings(system, dopplerScale, distanceFactor, rolloffScale); + + /// + /// + /// Sets the global doppler scale, distance factor and log roll-off scale for all 3D sound in FMOD. + /// + /// + /// System::set3DSettings + /// + /// + public static void Set3dSettings( + this FmodSystem system, + float dopplerScale, + float distanceFactor, + float rolloffScale + ) => TrySet3dSettings(system, dopplerScale, distanceFactor, rolloffScale).Check(); + + /// + /// + /// Retrieves the global doppler scale, distance factor and roll-off scale for all 3D sounds. + /// + /// + /// System::get3DSettings + /// + /// + public static unsafe Result TryGet3dSettings( + this FmodSystem system, + out float dopplerScale, + out float distanceFactor, + out float rolloffScale + ) + { + fixed (float* dopplerScalePtr = &dopplerScale) + fixed (float* distanceFactorPtr = &distanceFactor) + fixed (float* rolloffScalePtr = &rolloffScale) + return PInvoke.SystemGet3dSettings(system, dopplerScalePtr, distanceFactorPtr, rolloffScalePtr); + } + + /// + /// + /// Retrieves the global doppler scale, distance factor and roll-off scale for all 3D sounds. + /// + /// + /// System::get3DSettings + /// + /// + public static void Get3dSettings( + this FmodSystem system, + out float dopplerScale, + out float distanceFactor, + out float rolloffScale + ) => TryGet3dSettings(system, out dopplerScale, out distanceFactor, out rolloffScale).Check(); + + /// + /// + /// Sets the number of 3D 'listeners' in the 3D sound scene. + /// + /// + /// System::set3DNumListeners + /// + /// + public static Result TrySet3dNumListeners(this FmodSystem system, int numListeners) => + PInvoke.SystemSet3dNumListeners(system, numListeners); + + /// + /// + /// Sets the number of 3D 'listeners' in the 3D sound scene. + /// + /// + /// System::set3DNumListeners + /// + /// + public static void Set3dNumListeners(this FmodSystem system, int numListeners) => + TrySet3dNumListeners(system, numListeners).Check(); + + /// + /// + /// Retrieves the number of 3D listeners. + /// + /// + /// System::get3DNumListeners + /// + /// + public static unsafe Result TryGet3dNumListeners(this FmodSystem system, out int numListeners) + { + fixed (int* numListenersPtr = &numListeners) + return PInvoke.SystemGet3dNumListeners(system, numListenersPtr); + } + + /// + /// + /// Retrieves the number of 3D listeners. + /// + /// + /// System::get3DNumListeners + /// + /// + public static int Get3dNumListeners(this FmodSystem system) + { + TryGet3dNumListeners(system, out var numListeners).Check(); + return numListeners; + } + + /// + /// + /// Sets the position, velocity and orientation of the specified 3D sound listener. + /// + /// + /// System::set3DListenerAttributes + /// + /// + public static unsafe Result TrySet3dListenerAttributes( + this FmodSystem system, + int listener, + in float3 pos, + in float3 vel, + in float3 forward, + in float3 up + ) + { + fixed (float3* posPtr = &pos) + fixed (float3* velPtr = &vel) + fixed (float3* forwardPtr = &forward) + fixed (float3* upPtr = &up) + return PInvoke.SystemSet3dListenerAttributes(system, listener, posPtr, velPtr, forwardPtr, upPtr); + } + + /// + /// + /// Sets the position, velocity and orientation of the specified 3D sound listener. + /// + /// + /// System::set3DListenerAttributes + /// + /// + public static void Set3dListenerAttributes( + this FmodSystem system, + int listener, + in float3 pos, + in float3 vel, + in float3 forward, + in float3 up + ) => TrySet3dListenerAttributes(system, listener, pos, vel, forward, up).Check(); + + /// + /// + /// Retrieves the position, velocity and orientation of the specified 3D sound listener. + /// + /// + /// System::get3DListenerAttributes + /// + /// + public static unsafe Result TryGet3dListenerAttributes( + this FmodSystem system, + int listener, + out float3 pos, + out float3 vel, + out float3 forward, + out float3 up + ) + { + fixed (float3* posPtr = &pos) + fixed (float3* velPtr = &vel) + fixed (float3* forwardPtr = &forward) + fixed (float3* upPtr = &up) + return PInvoke.SystemGet3dListenerAttributes(system, listener, posPtr, velPtr, forwardPtr, upPtr); + } + + /// + /// + /// Retrieves the position, velocity and orientation of the specified 3D sound listener. + /// + /// + /// System::get3DListenerAttributes + /// + /// + public static void Get3dListenerAttributes( + this FmodSystem system, + int listener, + out float3 pos, + out float3 vel, + out float3 forward, + out float3 up + ) => TryGet3dListenerAttributes(system, listener, out pos, out vel, out forward, out up).Check(); + + /// + /// + /// Sets a callback to allow custom calculation of distance attenuation. + /// + /// + /// System::set3DRolloffCallback + /// + /// + public static Result TrySet3dRolloffCallback(this FmodSystem system, Rolloff3dCallbackPtr callback) => + PInvoke.SystemSet3dRolloffCallback(system, callback); + + /// + /// + /// Sets a callback to allow custom calculation of distance attenuation. + /// + /// + /// System::set3DRolloffCallback + /// + /// + public static void Set3dRolloffCallback(this FmodSystem system, Rolloff3dCallbackPtr callback) => + TrySet3dRolloffCallback(system, callback).Check(); + + /// + /// + /// Suspend mixer thread and relinquish usage of audio hardware while maintaining internal state. + /// + /// + /// Used on mobile platforms when entering a backgrounded state to reduce CPU to 0%. + /// + /// + /// All internal state will be maintained, i.e. created Sound and Channels will stay available in memory. + /// + /// + /// See Also: System::mixerResume + /// + /// + /// System::mixerSuspend + /// + /// + public static Result TryMixerSuspend(this FmodSystem system) => PInvoke.SystemMixerSuspend(system); + + /// + /// + /// Suspend mixer thread and relinquish usage of audio hardware while maintaining internal state. + /// + /// + /// Used on mobile platforms when entering a backgrounded state to reduce CPU to 0%. + /// + /// + /// All internal state will be maintained, i.e. created Sound and Channels will stay available in memory. + /// + /// + /// See Also: System::mixerResume + /// + /// + /// System::mixerSuspend + /// + /// + public static void MixerSuspend(this FmodSystem system) => TryMixerSuspend(system).Check(); + + /// + /// + /// Resume mixer thread and reacquire access to audio hardware. + /// + /// + /// Used on mobile platforms when entering the foreground after being suspended. + /// + /// + /// All internal state will resume, i.e. created Sound and Channels are still valid and playback will + /// continue. + /// + /// + /// Android specific: Must be called on the same thread as System::mixerSuspend. + /// + /// + /// HTML5 specific: Used to start audio from a user interaction event, like a mouse click or screen touch + /// event. Without this call audio may not start on some browsers. + /// + /// + /// See Also: System::mixerSuspend + /// + /// + /// System::mixerResume + /// + /// + public static Result TryMixerResume(this FmodSystem system) => PInvoke.SystemMixerResume(system); + + /// + /// + /// Resume mixer thread and reacquire access to audio hardware. + /// + /// + /// Used on mobile platforms when entering the foreground after being suspended. + /// + /// + /// All internal state will resume, i.e. created Sound and Channels are still valid and playback will + /// continue. + /// + /// + /// Android specific: Must be called on the same thread as System::mixerSuspend. + /// + /// + /// HTML5 specific: Used to start audio from a user interaction event, like a mouse click or screen touch + /// event. Without this call audio may not start on some browsers. + /// + /// + /// See Also: System::mixerSuspend + /// + /// + /// System::mixerResume + /// + /// + public static void MixerResume(this FmodSystem system) => TryMixerResume(system).Check(); + + /// + /// + /// Retrieves the default matrix used to convert from one speaker mode to another. + /// + /// + /// System::getDefaultMixMatrix + /// + /// + public static unsafe Result TryGetDefaultMixMatrix( + this FmodSystem system, + SpeakerMode sourceSpeakerMode, + SpeakerMode targetSpeakerMode, + float* matrix, + int matrixHop + ) => PInvoke.SystemGetDefaultMixMatrix(system, sourceSpeakerMode, targetSpeakerMode, matrix, matrixHop); + + /// + /// + /// Retrieves the default matrix used to convert from one speaker mode to another. + /// + /// + /// System::getDefaultMixMatrix + /// + /// + public static unsafe void GetDefaultMixMatrix( + this FmodSystem system, + SpeakerMode sourceSpeakerMode, + SpeakerMode targetSpeakerMode, + float* matrix, + int matrixHop + ) => TryGetDefaultMixMatrix(system, sourceSpeakerMode, targetSpeakerMode, matrix, matrixHop).Check(); + + /// + /// + /// Retrieves the channel count for a given speaker mode. + /// + /// + /// System::getSpeakerModeChannels + /// + /// + public static unsafe Result TryGetSpeakerModeChannels( + this FmodSystem system, + SpeakerMode mode, + out int channels + ) + { + fixed (int* channelsPtr = &channels) + return PInvoke.SystemGetSpeakerModeChannels(system, mode, channelsPtr); + } + + /// + /// + /// Retrieves the channel count for a given speaker mode. + /// + /// + /// System::getSpeakerModeChannels + /// + /// + public static int GetSpeakerModeChannels(this FmodSystem system, SpeakerMode mode) + { + TryGetSpeakerModeChannels(system, mode, out var channels).Check(); + return channels; + } + + /// + /// + /// Retrieves the FMOD version and build number. + /// + /// + /// System::getVersion + /// + /// + public static unsafe Result TryGetVersion(this FmodSystem system, out uint version, out uint buildnumber) + { + fixed (uint* versionPtr = &version) + fixed (uint* buildnumberPtr = &buildnumber) + return PInvoke.SystemGetVersion(system, versionPtr, buildnumberPtr); + } + + /// + /// + /// Retrieves the FMOD version and build number. + /// + /// + /// System::getVersion + /// + /// + public static void GetVersion(this FmodSystem system, out uint version, out uint buildnumber) => + TryGetVersion(system, out version, out buildnumber).Check(); + + /// + /// + /// Retrieves an output type specific internal native interface. + /// + /// + /// System::getOutputHandle + /// + /// + public static unsafe Result TryGetOutputHandle(this FmodSystem system, out nint handle) + { + fixed (nint* handlePtr = &handle) + return PInvoke.SystemGetOutputHandle(system, handlePtr); + } + + /// + /// + /// Retrieves an output type specific internal native interface. + /// + /// + /// System::getOutputHandle + /// + /// + public static nint GetOutputHandle(this FmodSystem system) + { + TryGetOutputHandle(system, out var handle).Check(); + return handle; + } + + /// + /// + /// Retrieves the number of currently playing Channels. + /// + /// + /// System::getChannelsPlaying + /// + /// + public static unsafe Result TryGetChannelsPlaying( + this FmodSystem system, + out int channels, + out int realChannels + ) + { + fixed (int* channelsPtr = &channels) + fixed (int* realChannelsPtr = &realChannels) + return PInvoke.SystemGetChannelsPlaying(system, channelsPtr, realChannelsPtr); + } + + /// + /// + /// Retrieves the number of currently playing Channels. + /// + /// + /// System::getChannelsPlaying + /// + /// + public static void GetChannelsPlaying(this FmodSystem system, out int channels, out int realChannels) => + TryGetChannelsPlaying(system, out channels, out realChannels).Check(); + + /// + /// + /// Retrieves the amount of CPU used for different parts of the Core API. + /// + /// + /// System::getCPUUsage + /// + /// + public static unsafe Result TryGetCpuUsage(this FmodSystem system, out CpuUsage usage) + { + fixed (CpuUsage* usagePtr = &usage) + return PInvoke.SystemGetCpuUsage(system, usagePtr); + } + + /// + /// + /// Retrieves the amount of CPU used for different parts of the Core API. + /// + /// + /// System::getCPUUsage + /// + /// + public static CpuUsage GetCpuUsage(this FmodSystem system) + { + TryGetCpuUsage(system, out var usage).Check(); + return usage; + } + + /// + /// + /// Retrieves information about file reads. + /// + /// + /// System::getFileUsage + /// + /// + public static unsafe Result TryGetFileUsage( + this FmodSystem system, + out long sampleBytesRead, + out long streamBytesRead, + out long otherBytesRead + ) + { + fixed (long* sampleBytesReadPtr = &sampleBytesRead) + fixed (long* streamBytesReadPtr = &streamBytesRead) + fixed (long* otherBytesReadPtr = &otherBytesRead) + return PInvoke.SystemGetFileUsage(system, sampleBytesReadPtr, streamBytesReadPtr, otherBytesReadPtr); + } + + /// + /// + /// Retrieves information about file reads. + /// + /// + /// System::getFileUsage + /// + /// + public static void GetFileUsage( + this FmodSystem system, + out long sampleBytesRead, + out long streamBytesRead, + out long otherBytesRead + ) => TryGetFileUsage(system, out sampleBytesRead, out streamBytesRead, out otherBytesRead).Check(); + + /// + /// + /// Loads a sound into memory, opens it for streaming or sets it up for callback based sounds. + /// + /// + /// System::createSound + /// + /// + public static unsafe Result TryCreateSound( + this FmodSystem system, + RefString8 nameOrData, + Mode mode, + in CreateSoundExInfo exInfo, + out Sound sound + ) + { + fixed (byte* nameOrDataPtr = nameOrData) + fixed (CreateSoundExInfo* exInfoPtr = &exInfo) + fixed (Sound* soundPtr = &sound) + return PInvoke.SystemCreateSound(system, nameOrDataPtr, mode, exInfoPtr, soundPtr); + } + + /// + /// + /// Loads a sound into memory, opens it for streaming or sets it up for callback based sounds. + /// + /// + /// System::createSound + /// + /// + public static Sound CreateSound( + this FmodSystem system, + RefString8 nameOrData, + Mode mode, + in CreateSoundExInfo exInfo + ) + { + TryCreateSound(system, nameOrData, mode, exInfo, out var sound).Check(); + return sound; + } + + /// + /// + /// Opens a sound for streaming. + /// + /// + /// System::createStream + /// + /// + public static unsafe Result TryCreateStream( + this FmodSystem system, + RefString8 nameOrData, + Mode mode, + in CreateSoundExInfo exInfo, + out Sound sound + ) + { + fixed (byte* nameOrDataPtr = nameOrData) + fixed (CreateSoundExInfo* exInfoPtr = &exInfo) + fixed (Sound* soundPtr = &sound) + return PInvoke.SystemCreateStream(system, nameOrDataPtr, mode, exInfoPtr, soundPtr); + } + + /// + /// + /// Opens a sound for streaming. + /// + /// + /// System::createStream + /// + /// + public static Sound CreateStream( + this FmodSystem system, + RefString8 nameOrData, + Mode mode, + in CreateSoundExInfo exInfo + ) + { + TryCreateStream(system, nameOrData, mode, exInfo, out var sound).Check(); + return sound; + } + + /// + /// + /// Create a DSP unit given a plug-in description structure. + /// + /// + /// System::createDSP + /// + /// + public static unsafe Result TryCreateDsp(this FmodSystem system, in DspDescription description, out Dsp dsp) + { + fixed (DspDescription* descriptionPtr = &description) + fixed (Dsp* dspPtr = &dsp) + return PInvoke.SystemCreateDsp(system, descriptionPtr, dspPtr); + } + + /// + /// + /// Create a DSP unit given a plug-in description structure. + /// + /// + /// System::createDSP + /// + /// + public static Dsp CreateDsp(this FmodSystem system, in DspDescription description) + { + TryCreateDsp(system, description, out var dsp).Check(); + return dsp; + } + + /// + /// + /// Create a DSP unit with a specified built-in type index. + /// + /// + /// System::createDSPByType + /// + /// + public static unsafe Result TryCreateDspByType(this FmodSystem system, DspType type, out Dsp dsp) + { + fixed (Dsp* dspPtr = &dsp) + return PInvoke.SystemCreateDspByType(system, type, dspPtr); + } + + /// + /// + /// Create a DSP unit with a specified built-in type index. + /// + /// + /// System::createDSPByType + /// + /// + public static Dsp CreateDspByType(this FmodSystem system, DspType type) + { + TryCreateDspByType(system, type, out var dsp).Check(); + return dsp; + } + + /// + /// + /// Create a ChannelGroup object. + /// + /// + /// System::createChannelGroup + /// + /// + public static unsafe Result TryCreateChannelGroup( + this FmodSystem system, + RefString8 name, + out ChannelGroup channelGroup + ) + { + fixed (byte* namePtr = name) + fixed (ChannelGroup* channelGroupPtr = &channelGroup) + return PInvoke.SystemCreateChannelGroup(system, namePtr, channelGroupPtr); + } + + /// + /// + /// Create a ChannelGroup object. + /// + /// + /// System::createChannelGroup + /// + /// + public static ChannelGroup CreateChannelGroup(this FmodSystem system, RefString8 name) + { + TryCreateChannelGroup(system, name, out var channelGroup).Check(); + return channelGroup; + } + + /// + /// + /// Creates a SoundGroup object. + /// + /// + /// System::createSoundGroup + /// + /// + public static unsafe Result TryCreateSoundGroup( + this FmodSystem system, + RefString8 name, + out SoundGroup soundGroup + ) + { + fixed (byte* namePtr = name) + fixed (SoundGroup* soundGroupPtr = &soundGroup) + return PInvoke.SystemCreateSoundGroup(system, namePtr, soundGroupPtr); + } + + /// + /// + /// Creates a SoundGroup object. + /// + /// + /// System::createSoundGroup + /// + /// + public static SoundGroup CreateSoundGroup(this FmodSystem system, RefString8 name) + { + TryCreateSoundGroup(system, name, out var soundGroup).Check(); + return soundGroup; + } + + /// + /// + /// Creates a 'virtual reverb' object. This object reacts to 3D location and morphs the reverb environment + /// based on how close it is to the reverb object's center. + /// + /// + /// Multiple reverb objects can be created to achieve a multi-reverb environment. 1 reverb object is used + /// for all 3D reverb objects (slot 0 by default). + /// + /// + /// System::createReverb3D + /// + /// + public static unsafe Result TryCreateReverb3d(this FmodSystem system, out Reverb3d reverb) + { + fixed (Reverb3d* reverbPtr = &reverb) + return PInvoke.SystemCreateReverb3d(system, reverbPtr); + } + + /// + /// + /// Creates a 'virtual reverb' object. This object reacts to 3D location and morphs the reverb environment + /// based on how close it is to the reverb object's center. + /// + /// + /// Multiple reverb objects can be created to achieve a multi-reverb environment. 1 reverb object is used + /// for all 3D reverb objects (slot 0 by default). + /// + /// + /// System::createReverb3D + /// + /// + public static Reverb3d CreateReverb3d(this FmodSystem system) + { + TryCreateReverb3d(system, out var reverb).Check(); + return reverb; + } + + /// + /// + /// Plays a Sound on a Channel. + /// + /// + /// System::playSound + /// + /// + public static unsafe Result TryPlaySound( + this FmodSystem system, + Sound sound, + ChannelGroup channelGroup, + Bool32 paused, + out Channel channel + ) + { + fixed (Channel* channelPtr = &channel) + return PInvoke.SystemPlaySound(system, sound, channelGroup, paused, channelPtr); + } + + /// + /// + /// Plays a Sound on a Channel. + /// + /// + /// System::playSound + /// + /// + public static Channel PlaySound(this FmodSystem system, Sound sound, ChannelGroup channelGroup, Bool32 paused) + { + TryPlaySound(system, sound, channelGroup, paused, out var channel).Check(); + return channel; + } + + /// + /// + /// Plays a DSP along with any of its inputs on a Channel. + /// + /// + /// System::playDSP + /// + /// + public static unsafe Result TryPlayDsp( + this FmodSystem system, + Dsp dsp, + ChannelGroup channelGroup, + Bool32 paused, + out Channel channel + ) + { + fixed (Channel* channelPtr = &channel) + return PInvoke.SystemPlayDsp(system, dsp, channelGroup, paused, channelPtr); + } + + /// + /// + /// Plays a DSP along with any of its inputs on a Channel. + /// + /// + /// System::playDSP + /// + /// + public static Channel PlayDsp(this FmodSystem system, Dsp dsp, ChannelGroup channelGroup, Bool32 paused) + { + TryPlayDsp(system, dsp, channelGroup, paused, out var channel).Check(); + return channel; + } + + /// + /// + /// Retrieves a handle to a Channel by ID. + /// + /// + /// System::getChannel + /// + /// + public static unsafe Result TryGetChannel(this FmodSystem system, int channelId, out Channel channel) + { + fixed (Channel* channelPtr = &channel) + return PInvoke.SystemGetChannel(system, channelId, channelPtr); + } + + /// + /// + /// Retrieves a handle to a Channel by ID. + /// + /// + /// System::getChannel + /// + /// + public static Channel GetChannel(this FmodSystem system, int channelId) + { + TryGetChannel(system, channelId, out var channel).Check(); + return channel; + } + + /// + /// + /// Retrieve the description structure for a built-in DSP plug-in. + /// + /// + /// System::getDSPInfoByType + /// + /// + public static unsafe Result TryGetDspInfoByType( + this FmodSystem system, + DspType type, + out DspDescription* description + ) + { + fixed (DspDescription** descriptionPtr = &description) + return PInvoke.SystemGetDspInfoByType(system, type, descriptionPtr); + } + + /// + /// + /// Retrieve the description structure for a built-in DSP plug-in. + /// + /// + /// System::getDSPInfoByType + /// + /// + public static unsafe DspDescription* GetDspInfoByType(this FmodSystem system, DspType type) + { + TryGetDspInfoByType(system, type, out var description).Check(); + return description; + } + + /// + /// + /// Retrieves the master ChannelGroup that all sounds ultimately route to. + /// + /// + /// System::getMasterChannelGroup + /// + /// + public static unsafe Result TryGetMasterChannelGroup(this FmodSystem system, out ChannelGroup channelGroup) + { + fixed (ChannelGroup* channelGroupPtr = &channelGroup) + return PInvoke.SystemGetMasterChannelGroup(system, channelGroupPtr); + } + + /// + /// + /// Retrieves the master ChannelGroup that all sounds ultimately route to. + /// + /// + /// System::getMasterChannelGroup + /// + /// + public static ChannelGroup GetMasterChannelGroup(this FmodSystem system) + { + TryGetMasterChannelGroup(system, out var channelGroup).Check(); + return channelGroup; + } + + /// + /// + /// Retrieves the default SoundGroup, where all sounds are placed when they are created. + /// + /// + /// System::getMasterSoundGroup + /// + /// + public static unsafe Result TryGetMasterSoundGroup(this FmodSystem system, out SoundGroup soundGroup) + { + fixed (SoundGroup* soundGroupPtr = &soundGroup) + return PInvoke.SystemGetMasterSoundGroup(system, soundGroupPtr); + } + + /// + /// + /// Retrieves the default SoundGroup, where all sounds are placed when they are created. + /// + /// + /// System::getMasterSoundGroup + /// + /// + public static SoundGroup GetMasterSoundGroup(this FmodSystem system) + { + TryGetMasterSoundGroup(system, out var soundGroup).Check(); + return soundGroup; + } + + /// + /// + /// Connect the output of the specified ChannelGroup to an audio port on the output driver. + /// + /// + /// System::attachChannelGroupToPort + /// + /// + public static Result TryAttachChannelGroupToPort( + this FmodSystem system, + PortType portType, + PortIndex portIndex, + ChannelGroup channelGroup, + Bool32 passThru + ) => PInvoke.SystemAttachChannelGroupToPort(system, portType, portIndex, channelGroup, passThru); + + /// + /// + /// Connect the output of the specified ChannelGroup to an audio port on the output driver. + /// + /// + /// System::attachChannelGroupToPort + /// + /// + public static void AttachChannelGroupToPort( + this FmodSystem system, + PortType portType, + PortIndex portIndex, + ChannelGroup channelGroup, + Bool32 passThru + ) => TryAttachChannelGroupToPort(system, portType, portIndex, channelGroup, passThru).Check(); + + /// + /// + /// Disconnect the output of the specified ChannelGroup from an audio port on the output driver. + /// + /// + /// System::detachChannelGroupFromPort + /// + /// + public static Result TryDetachChannelGroupFromPort(this FmodSystem system, ChannelGroup channelGroup) => + PInvoke.SystemDetachChannelGroupFromPort(system, channelGroup); + + /// + /// + /// Disconnect the output of the specified ChannelGroup from an audio port on the output driver. + /// + /// + /// System::detachChannelGroupFromPort + /// + /// + public static void DetachChannelGroupFromPort(this FmodSystem system, ChannelGroup channelGroup) => + TryDetachChannelGroupFromPort(system, channelGroup).Check(); + + /// + /// + /// Sets parameters for the global reverb environment. + /// + /// + /// System::setReverbProperties + /// + /// + public static unsafe Result TrySetReverbProperties( + this FmodSystem system, + int instance, + in ReverbProperties prop + ) + { + fixed (ReverbProperties* propPtr = &prop) + return PInvoke.SystemSetReverbProperties(system, instance, propPtr); + } + + /// + /// + /// Sets parameters for the global reverb environment. + /// + /// + /// System::setReverbProperties + /// + /// + public static void SetReverbProperties(this FmodSystem system, int instance, in ReverbProperties prop) => + TrySetReverbProperties(system, instance, prop).Check(); + + /// + /// + /// Retrieves the current reverb environment for the specified reverb instance. + /// + /// + /// System::getReverbProperties + /// + /// + public static unsafe Result TryGetReverbProperties( + this FmodSystem system, + int instance, + out ReverbProperties prop + ) + { + fixed (ReverbProperties* propPtr = &prop) + return PInvoke.SystemGetReverbProperties(system, instance, propPtr); + } + + /// + /// + /// Retrieves the current reverb environment for the specified reverb instance. + /// + /// + /// System::getReverbProperties + /// + /// + public static ReverbProperties GetReverbProperties(this FmodSystem system, int instance) + { + TryGetReverbProperties(system, instance, out var prop).Check(); + return prop; + } + + /// + /// + /// Mutual exclusion function to lock the DSP engine (which runs asynchronously in another thread), so that + /// it will not execute. + /// + /// + /// If the DSP engine is already executing, this function is blocked until it has completed. + /// + /// + /// The function may be used to synchronize DSP graph operations carried out by your code. For example, you + /// could use this to construct a DSP sub-graph without the DSP engine executing in the background while the + /// sub-graph is still under construction. + /// + /// + /// Once you no longer need the DSP engine to be locked, it can be unlocked with System::unlockDSP. + /// + /// + /// Note that if the DSP engine is locked for a significant amount of time, it may result in audible + /// skipping or stuttering. + /// + /// + /// System::lockDSP + /// + /// + public static Result TryLockDsp(this FmodSystem system) => PInvoke.SystemLockDsp(system); + + /// + /// + /// Mutual exclusion function to lock the DSP engine (which runs asynchronously in another thread), so that + /// it will not execute. + /// + /// + /// If the DSP engine is already executing, this function is blocked until it has completed. + /// + /// + /// The function may be used to synchronize DSP graph operations carried out by your code. For example, you + /// could use this to construct a DSP sub-graph without the DSP engine executing in the background while the + /// sub-graph is still under construction. + /// + /// + /// Once you no longer need the DSP engine to be locked, it can be unlocked with System::unlockDSP. + /// + /// + /// Note that if the DSP engine is locked for a significant amount of time, it may result in audible + /// skipping or stuttering. + /// + /// + /// System::lockDSP + /// + /// + public static void LockDsp(this FmodSystem system) => TryLockDsp(system).Check(); + + /// + /// + /// Mutual exclusion function to unlock the DSP engine (which runs asynchronously in another thread) and let + /// it continue executing. + /// + /// + /// The DSP engine must be locked with System::lockDSP before this function is called. + /// + /// + /// System::unlockDSP + /// + /// + public static Result TryUnlockDsp(this FmodSystem system) => PInvoke.SystemUnlockDsp(system); + + /// + /// + /// Mutual exclusion function to unlock the DSP engine (which runs asynchronously in another thread) and let + /// it continue executing. + /// + /// + /// The DSP engine must be locked with System::lockDSP before this function is called. + /// + /// + /// System::unlockDSP + /// + /// + public static void UnlockDsp(this FmodSystem system) => TryUnlockDsp(system).Check(); + + /// + /// + /// Retrieves the number of recording devices available for this output mode. Use this to enumerate all + /// recording devices possible so that the user can select one. + /// + /// + /// System::getRecordNumDrivers + /// + /// + public static unsafe Result TryGetRecordNumDrivers( + this FmodSystem system, + out int numDrivers, + out int numConnected + ) + { + fixed (int* numDriversPtr = &numDrivers) + fixed (int* numConnectedPtr = &numConnected) + return PInvoke.SystemGetRecordNumDrivers(system, numDriversPtr, numConnectedPtr); + } + + /// + /// + /// Retrieves the number of recording devices available for this output mode. Use this to enumerate all + /// recording devices possible so that the user can select one. + /// + /// + /// System::getRecordNumDrivers + /// + /// + public static void GetRecordNumDrivers(this FmodSystem system, out int numDrivers, out int numConnected) => + TryGetRecordNumDrivers(system, out numDrivers, out numConnected).Check(); + + /// + /// + /// Retrieves identification information about an audio device specified by its index, and specific to the + /// output mode. + /// + /// + /// System::getRecordDriverInfo + /// + /// + public static unsafe Result TryGetRecordDriverInfo( + this FmodSystem system, + int id, + byte* name, + int nameLen, + out Guid guid, + out int systemRate, + out SpeakerMode speakerMode, + out int speakerModeChannels, + out DriverState state + ) + { + fixed (Guid* guidPtr = &guid) + fixed (int* systemRatePtr = &systemRate) + fixed (SpeakerMode* speakerModePtr = &speakerMode) + fixed (int* speakerModeChannelsPtr = &speakerModeChannels) + fixed (DriverState* statePtr = &state) + return PInvoke.SystemGetRecordDriverInfo( + system, + id, + name, + nameLen, + guidPtr, + systemRatePtr, + speakerModePtr, + speakerModeChannelsPtr, + statePtr + ); + } + + /// + /// + /// Retrieves identification information about an audio device specified by its index, and specific to the + /// output mode. + /// + /// + /// System::getRecordDriverInfo + /// + /// + public static unsafe void GetRecordDriverInfo( + this FmodSystem system, + int id, + byte* name, + int nameLen, + out Guid guid, + out int systemRate, + out SpeakerMode speakerMode, + out int speakerModeChannels, + out DriverState state + ) => + TryGetRecordDriverInfo( + system, + id, + name, + nameLen, + out guid, + out systemRate, + out speakerMode, + out speakerModeChannels, + out state + ) + .Check(); + + /// + /// + /// Retrieves the current recording position of the record buffer in PCM samples. + /// + /// + /// System::getRecordPosition + /// + /// + public static unsafe Result TryGetRecordPosition(this FmodSystem system, int id, out uint position) + { + fixed (uint* positionPtr = &position) + return PInvoke.SystemGetRecordPosition(system, id, positionPtr); + } + + /// + /// + /// Retrieves the current recording position of the record buffer in PCM samples. + /// + /// + /// System::getRecordPosition + /// + /// + public static uint GetRecordPosition(this FmodSystem system, int id) + { + TryGetRecordPosition(system, id, out var position).Check(); + return position; + } + + /// + /// + /// Starts the recording engine recording to a pre-created Sound object. + /// + /// + /// System::recordStart + /// + /// + public static Result TryRecordStart(this FmodSystem system, int id, Sound sound, Bool32 loop) => + PInvoke.SystemRecordStart(system, id, sound, loop); + + /// + /// + /// Starts the recording engine recording to a pre-created Sound object. + /// + /// + /// System::recordStart + /// + /// + public static void RecordStart(this FmodSystem system, int id, Sound sound, Bool32 loop) => + TryRecordStart(system, id, sound, loop).Check(); + + /// + /// + /// Stops the recording engine from recording to a pre-created Sound object. + /// + /// + /// System::recordStop + /// + /// + public static Result TryRecordStop(this FmodSystem system, int id) => PInvoke.SystemRecordStop(system, id); + + /// + /// + /// Stops the recording engine from recording to a pre-created Sound object. + /// + /// + /// System::recordStop + /// + /// + public static void RecordStop(this FmodSystem system, int id) => TryRecordStop(system, id).Check(); + + /// + /// + /// Retrieves the state of the FMOD recording API, ie if it is currently recording or not. + /// + /// + /// System::isRecording + /// + /// + public static unsafe Result TryIsRecording(this FmodSystem system, int id, out Bool32 recording) + { + fixed (Bool32* recordingPtr = &recording) + return PInvoke.SystemIsRecording(system, id, recordingPtr); + } + + /// + /// + /// Retrieves the state of the FMOD recording API, ie if it is currently recording or not. + /// + /// + /// System::isRecording + /// + /// + public static Bool32 IsRecording(this FmodSystem system, int id) + { + TryIsRecording(system, id, out var recording).Check(); + return recording; + } + + /// + /// + /// Geometry creation function. This function will create a base geometry object which can then have + /// polygons added to it. + /// + /// + /// System::createGeometry + /// + /// + public static unsafe Result TryCreateGeometry( + this FmodSystem system, + int maxPolygons, + int maxVertices, + out Geometry geometry + ) + { + fixed (Geometry* geometryPtr = &geometry) + return PInvoke.SystemCreateGeometry(system, maxPolygons, maxVertices, geometryPtr); + } + + /// + /// + /// Geometry creation function. This function will create a base geometry object which can then have + /// polygons added to it. + /// + /// + /// System::createGeometry + /// + /// + public static Geometry CreateGeometry(this FmodSystem system, int maxPolygons, int maxVertices) + { + TryCreateGeometry(system, maxPolygons, maxVertices, out var geometry).Check(); + return geometry; + } + + /// + /// + /// Sets the maximum world size for the geometry engine for performance / precision reasons. + /// + /// + /// System::setGeometrySettings + /// + /// + public static Result TrySetGeometrySettings(this FmodSystem system, float maxWorldSize) => + PInvoke.SystemSetGeometrySettings(system, maxWorldSize); + + /// + /// + /// Sets the maximum world size for the geometry engine for performance / precision reasons. + /// + /// + /// System::setGeometrySettings + /// + /// + public static void SetGeometrySettings(this FmodSystem system, float maxWorldSize) => + TrySetGeometrySettings(system, maxWorldSize).Check(); + + /// + /// + /// Retrieves the maximum world size for the geometry engine. + /// + /// + /// System::getGeometrySettings + /// + /// + public static unsafe Result TryGetGeometrySettings(this FmodSystem system, out float maxWorldSize) + { + fixed (float* maxWorldSizePtr = &maxWorldSize) + return PInvoke.SystemGetGeometrySettings(system, maxWorldSizePtr); + } + + /// + /// + /// Retrieves the maximum world size for the geometry engine. + /// + /// + /// System::getGeometrySettings + /// + /// + public static float GetGeometrySettings(this FmodSystem system) + { + TryGetGeometrySettings(system, out var maxWorldSize).Check(); + return maxWorldSize; + } + + /// + /// + /// Creates a geometry object from a block of memory which contains pre-saved geometry data. + /// + /// + /// This function avoids the need to manually create and add geometry for faster start time. + /// + /// + /// System::loadGeometry + /// + /// + public static unsafe Result TryLoadGeometry( + this FmodSystem system, + void* data, + int dataSize, + out Geometry geometry + ) + { + fixed (Geometry* geometryPtr = &geometry) + return PInvoke.SystemLoadGeometry(system, data, dataSize, geometryPtr); + } + + /// + /// + /// Creates a geometry object from a block of memory which contains pre-saved geometry data. + /// + /// + /// This function avoids the need to manually create and add geometry for faster start time. + /// + /// + /// System::loadGeometry + /// + /// + public static unsafe Geometry LoadGeometry(this FmodSystem system, void* data, int dataSize) + { + TryLoadGeometry(system, data, dataSize, out var geometry).Check(); + return geometry; + } + + /// + /// + /// Calculates geometry occlusion between a listener and a sound source. + /// + /// + /// System::getGeometryOcclusion + /// + /// + public static unsafe Result TryGetGeometryOcclusion( + this FmodSystem system, + in float3 listener, + in float3 source, + out float direct, + out float reverb + ) + { + fixed (float3* listenerPtr = &listener) + fixed (float3* sourcePtr = &source) + fixed (float* directPtr = &direct) + fixed (float* reverbPtr = &reverb) + return PInvoke.SystemGetGeometryOcclusion(system, listenerPtr, sourcePtr, directPtr, reverbPtr); + } + + /// + /// + /// Calculates geometry occlusion between a listener and a sound source. + /// + /// + /// System::getGeometryOcclusion + /// + /// + public static void GetGeometryOcclusion( + this FmodSystem system, + in float3 listener, + in float3 source, + out float direct, + out float reverb + ) => TryGetGeometryOcclusion(system, listener, source, out direct, out reverb).Check(); + + /// + /// + /// Set a proxy server to use for all subsequent internet connections. + /// + /// + /// System::setNetworkProxy + /// + /// + public static unsafe Result TrySetNetworkProxy(this FmodSystem system, RefString8 proxy) + { + fixed (byte* proxyPtr = proxy) + return PInvoke.SystemSetNetworkProxy(system, proxyPtr); + } + + /// + /// + /// Set a proxy server to use for all subsequent internet connections. + /// + /// + /// System::setNetworkProxy + /// + /// + public static void SetNetworkProxy(this FmodSystem system, RefString8 proxy) => + TrySetNetworkProxy(system, proxy).Check(); + + /// + /// + /// Retrieves the URL of the proxy server used in internet streaming. + /// + /// + /// System::getNetworkProxy + /// + /// + public static unsafe Result TryGetNetworkProxy(this FmodSystem system, byte* proxy, int proxyLen) => + PInvoke.SystemGetNetworkProxy(system, proxy, proxyLen); + + /// + /// + /// Retrieves the URL of the proxy server used in internet streaming. + /// + /// + /// System::getNetworkProxy + /// + /// + public static unsafe void GetNetworkProxy(this FmodSystem system, byte* proxy, int proxyLen) => + TryGetNetworkProxy(system, proxy, proxyLen).Check(); + + /// + /// + /// Set the timeout for network streams. + /// + /// + /// System::setNetworkTimeout + /// + /// + public static Result TrySetNetworkTimeout(this FmodSystem system, int timeOut) => + PInvoke.SystemSetNetworkTimeout(system, timeOut); + + /// + /// + /// Set the timeout for network streams. + /// + /// + /// System::setNetworkTimeout + /// + /// + public static void SetNetworkTimeout(this FmodSystem system, int timeOut) => + TrySetNetworkTimeout(system, timeOut).Check(); + + /// + /// + /// Retrieve the timeout value for network streams. + /// + /// + /// System::getNetworkTimeout + /// + /// + public static unsafe Result TryGetNetworkTimeout(this FmodSystem system, out int timeOut) + { + fixed (int* timeOutPtr = &timeOut) + return PInvoke.SystemGetNetworkTimeout(system, timeOutPtr); + } + + /// + /// + /// Retrieve the timeout value for network streams. + /// + /// + /// System::getNetworkTimeout + /// + /// + public static int GetNetworkTimeout(this FmodSystem system) + { + TryGetNetworkTimeout(system, out var timeOut).Check(); + return timeOut; + } + + /// + /// + /// Sets a user value associated with a System object. + /// + /// + /// System::setUserData + /// + /// + public static Result TrySetUserData(this FmodSystem system, nint userData) => + PInvoke.SystemSetUserData(system, userData); + + /// + /// + /// Sets a user value associated with a System object. + /// + /// + /// System::setUserData + /// + /// + public static void SetUserData(this FmodSystem system, nint userData) => + TrySetUserData(system, userData).Check(); + + /// + /// + /// Retrieves a user value associated with a System object. + /// + /// + /// System::getUserData + /// + /// + public static unsafe Result TryGetUserData(this FmodSystem system, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.SystemGetUserData(system, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with a System object. + /// + /// + /// System::getUserData + /// + /// + public static nint GetUserData(this FmodSystem system) + { + TryGetUserData(system, out var userData).Check(); + return userData; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Geometry.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Geometry.gen.cs new file mode 100644 index 0000000..ea1b0d6 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Geometry.gen.cs @@ -0,0 +1,596 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Frees a geometry object and releases its memory. + /// + /// + /// Geometry::release + /// + /// + public static Result TryRelease(this Geometry geometry) => PInvoke.GeometryRelease(geometry); + + /// + /// + /// Frees a geometry object and releases its memory. + /// + /// + /// Geometry::release + /// + /// + public static void Release(this Geometry geometry) => TryRelease(geometry).Check(); + + /// + /// + /// Adds a polygon. + /// + /// + /// Geometry::addPolygon + /// + /// + public static unsafe Result TryAddPolygon( + this Geometry geometry, + float directOcclusion, + float reverbOcclusion, + Bool32 doubleSided, + int numVertices, + in float3 vertices, + out int polygonIndex + ) + { + fixed (float3* verticesPtr = &vertices) + fixed (int* polygonIndexPtr = &polygonIndex) + return PInvoke.GeometryAddPolygon( + geometry, + directOcclusion, + reverbOcclusion, + doubleSided, + numVertices, + verticesPtr, + polygonIndexPtr + ); + } + + /// + /// + /// Adds a polygon. + /// + /// + /// Geometry::addPolygon + /// + /// + public static int AddPolygon( + this Geometry geometry, + float directOcclusion, + float reverbOcclusion, + Bool32 doubleSided, + int numVertices, + in float3 vertices + ) + { + TryAddPolygon( + geometry, + directOcclusion, + reverbOcclusion, + doubleSided, + numVertices, + vertices, + out var polygonIndex + ) + .Check(); + return polygonIndex; + } + + /// + /// + /// Retrieves the number of polygons in this object. + /// + /// + /// Geometry::getNumPolygons + /// + /// + public static unsafe Result TryGetNumPolygons(this Geometry geometry, out int numPolygons) + { + fixed (int* numPolygonsPtr = &numPolygons) + return PInvoke.GeometryGetNumPolygons(geometry, numPolygonsPtr); + } + + /// + /// + /// Retrieves the number of polygons in this object. + /// + /// + /// Geometry::getNumPolygons + /// + /// + public static int GetNumPolygons(this Geometry geometry) + { + TryGetNumPolygons(geometry, out var numPolygons).Check(); + return numPolygons; + } + + /// + /// + /// Retrieves the maximum number of polygons and vertices allocatable for this object. + /// + /// + /// Geometry::getMaxPolygons + /// + /// + public static unsafe Result TryGetMaxPolygons(this Geometry geometry, out int maxPolygons, out int maxVertices) + { + fixed (int* maxPolygonsPtr = &maxPolygons) + fixed (int* maxVerticesPtr = &maxVertices) + return PInvoke.GeometryGetMaxPolygons(geometry, maxPolygonsPtr, maxVerticesPtr); + } + + /// + /// + /// Retrieves the maximum number of polygons and vertices allocatable for this object. + /// + /// + /// Geometry::getMaxPolygons + /// + /// + public static void GetMaxPolygons(this Geometry geometry, out int maxPolygons, out int maxVertices) => + TryGetMaxPolygons(geometry, out maxPolygons, out maxVertices).Check(); + + /// + /// + /// Gets the number of vertices in a polygon. + /// + /// + /// Geometry::getPolygonNumVertices + /// + /// + public static unsafe Result TryGetPolygonNumVertices(this Geometry geometry, int index, out int numVertices) + { + fixed (int* numVerticesPtr = &numVertices) + return PInvoke.GeometryGetPolygonNumVertices(geometry, index, numVerticesPtr); + } + + /// + /// + /// Gets the number of vertices in a polygon. + /// + /// + /// Geometry::getPolygonNumVertices + /// + /// + public static int GetPolygonNumVertices(this Geometry geometry, int index) + { + TryGetPolygonNumVertices(geometry, index, out var numVertices).Check(); + return numVertices; + } + + /// + /// + /// Alters the position of a polygon's vertex inside a geometry object. + /// + /// + /// Geometry::setPolygonVertex + /// + /// + public static unsafe Result TrySetPolygonVertex( + this Geometry geometry, + int index, + int vertexIndex, + in float3 vertex + ) + { + fixed (float3* vertexPtr = &vertex) + return PInvoke.GeometrySetPolygonVertex(geometry, index, vertexIndex, vertexPtr); + } + + /// + /// + /// Alters the position of a polygon's vertex inside a geometry object. + /// + /// + /// Geometry::setPolygonVertex + /// + /// + public static void SetPolygonVertex(this Geometry geometry, int index, int vertexIndex, in float3 vertex) => + TrySetPolygonVertex(geometry, index, vertexIndex, vertex).Check(); + + /// + /// + /// Retrieves the position of a vertex. + /// + /// + /// Geometry::getPolygonVertex + /// + /// + public static unsafe Result TryGetPolygonVertex( + this Geometry geometry, + int index, + int vertexIndex, + out float3 vertex + ) + { + fixed (float3* vertexPtr = &vertex) + return PInvoke.GeometryGetPolygonVertex(geometry, index, vertexIndex, vertexPtr); + } + + /// + /// + /// Retrieves the position of a vertex. + /// + /// + /// Geometry::getPolygonVertex + /// + /// + public static float3 GetPolygonVertex(this Geometry geometry, int index, int vertexIndex) + { + TryGetPolygonVertex(geometry, index, vertexIndex, out var vertex).Check(); + return vertex; + } + + /// + /// + /// Sets individual attributes for a polygon inside a geometry object. + /// + /// + /// Geometry::setPolygonAttributes + /// + /// + public static Result TrySetPolygonAttributes( + this Geometry geometry, + int index, + float directOcclusion, + float reverbOcclusion, + Bool32 doubleSided + ) => PInvoke.GeometrySetPolygonAttributes(geometry, index, directOcclusion, reverbOcclusion, doubleSided); + + /// + /// + /// Sets individual attributes for a polygon inside a geometry object. + /// + /// + /// Geometry::setPolygonAttributes + /// + /// + public static void SetPolygonAttributes( + this Geometry geometry, + int index, + float directOcclusion, + float reverbOcclusion, + Bool32 doubleSided + ) => TrySetPolygonAttributes(geometry, index, directOcclusion, reverbOcclusion, doubleSided).Check(); + + /// + /// + /// Retrieves the attributes for a polygon. + /// + /// + /// Geometry::getPolygonAttributes + /// + /// + public static unsafe Result TryGetPolygonAttributes( + this Geometry geometry, + int index, + out float directOcclusion, + out float reverbOcclusion, + out Bool32 doubleSided + ) + { + fixed (float* directOcclusionPtr = &directOcclusion) + fixed (float* reverbOcclusionPtr = &reverbOcclusion) + fixed (Bool32* doubleSidedPtr = &doubleSided) + return PInvoke.GeometryGetPolygonAttributes( + geometry, + index, + directOcclusionPtr, + reverbOcclusionPtr, + doubleSidedPtr + ); + } + + /// + /// + /// Retrieves the attributes for a polygon. + /// + /// + /// Geometry::getPolygonAttributes + /// + /// + public static void GetPolygonAttributes( + this Geometry geometry, + int index, + out float directOcclusion, + out float reverbOcclusion, + out Bool32 doubleSided + ) => + TryGetPolygonAttributes(geometry, index, out directOcclusion, out reverbOcclusion, out doubleSided).Check(); + + /// + /// + /// Sets whether an object is processed by the geometry engine. + /// + /// + /// Geometry::setActive + /// + /// + public static Result TrySetActive(this Geometry geometry, Bool32 active) => + PInvoke.GeometrySetActive(geometry, active); + + /// + /// + /// Sets whether an object is processed by the geometry engine. + /// + /// + /// Geometry::setActive + /// + /// + public static void SetActive(this Geometry geometry, Bool32 active) => TrySetActive(geometry, active).Check(); + + /// + /// + /// Retrieves whether an object is processed by the geometry engine. + /// + /// + /// Geometry::getActive + /// + /// + public static unsafe Result TryGetActive(this Geometry geometry, out Bool32 active) + { + fixed (Bool32* activePtr = &active) + return PInvoke.GeometryGetActive(geometry, activePtr); + } + + /// + /// + /// Retrieves whether an object is processed by the geometry engine. + /// + /// + /// Geometry::getActive + /// + /// + public static Bool32 GetActive(this Geometry geometry) + { + TryGetActive(geometry, out var active).Check(); + return active; + } + + /// + /// + /// Sets the 3D orientation of the object. + /// + /// + /// Geometry::setRotation + /// + /// + public static unsafe Result TrySetRotation(this Geometry geometry, in float3 forward, in float3 up) + { + fixed (float3* forwardPtr = &forward) + fixed (float3* upPtr = &up) + return PInvoke.GeometrySetRotation(geometry, forwardPtr, upPtr); + } + + /// + /// + /// Sets the 3D orientation of the object. + /// + /// + /// Geometry::setRotation + /// + /// + public static void SetRotation(this Geometry geometry, in float3 forward, in float3 up) => + TrySetRotation(geometry, forward, up).Check(); + + /// + /// + /// Retrieves the 3D orientation of the object. + /// + /// + /// Geometry::getRotation + /// + /// + public static unsafe Result TryGetRotation(this Geometry geometry, out float3 forward, out float3 up) + { + fixed (float3* forwardPtr = &forward) + fixed (float3* upPtr = &up) + return PInvoke.GeometryGetRotation(geometry, forwardPtr, upPtr); + } + + /// + /// + /// Retrieves the 3D orientation of the object. + /// + /// + /// Geometry::getRotation + /// + /// + public static void GetRotation(this Geometry geometry, out float3 forward, out float3 up) => + TryGetRotation(geometry, out forward, out up).Check(); + + /// + /// + /// Sets the 3D position of the object. + /// + /// + /// Geometry::setPosition + /// + /// + public static unsafe Result TrySetPosition(this Geometry geometry, in float3 position) + { + fixed (float3* positionPtr = &position) + return PInvoke.GeometrySetPosition(geometry, positionPtr); + } + + /// + /// + /// Sets the 3D position of the object. + /// + /// + /// Geometry::setPosition + /// + /// + public static void SetPosition(this Geometry geometry, in float3 position) => + TrySetPosition(geometry, position).Check(); + + /// + /// + /// Retrieves the 3D position of the object. + /// + /// + /// Geometry::getPosition + /// + /// + public static unsafe Result TryGetPosition(this Geometry geometry, out float3 position) + { + fixed (float3* positionPtr = &position) + return PInvoke.GeometryGetPosition(geometry, positionPtr); + } + + /// + /// + /// Retrieves the 3D position of the object. + /// + /// + /// Geometry::getPosition + /// + /// + public static float3 GetPosition(this Geometry geometry) + { + TryGetPosition(geometry, out var position).Check(); + return position; + } + + /// + /// + /// Sets the 3D scale of the object. + /// + /// + /// Geometry::setScale + /// + /// + public static unsafe Result TrySetScale(this Geometry geometry, in float3 scale) + { + fixed (float3* scalePtr = &scale) + return PInvoke.GeometrySetScale(geometry, scalePtr); + } + + /// + /// + /// Sets the 3D scale of the object. + /// + /// + /// Geometry::setScale + /// + /// + public static void SetScale(this Geometry geometry, in float3 scale) => TrySetScale(geometry, scale).Check(); + + /// + /// + /// Retrieves the 3D scale of the object. + /// + /// + /// Geometry::getScale + /// + /// + public static unsafe Result TryGetScale(this Geometry geometry, out float3 scale) + { + fixed (float3* scalePtr = &scale) + return PInvoke.GeometryGetScale(geometry, scalePtr); + } + + /// + /// + /// Retrieves the 3D scale of the object. + /// + /// + /// Geometry::getScale + /// + /// + public static float3 GetScale(this Geometry geometry) + { + TryGetScale(geometry, out var scale).Check(); + return scale; + } + + /// + /// + /// Saves the geometry object as a serialized binary block to a user memory buffer. + /// + /// + /// Geometry::save + /// + /// + public static unsafe Result TrySave(this Geometry geometry, nint data, out int dataSize) + { + fixed (int* dataSizePtr = &dataSize) + return PInvoke.GeometrySave(geometry, data, dataSizePtr); + } + + /// + /// + /// Saves the geometry object as a serialized binary block to a user memory buffer. + /// + /// + /// Geometry::save + /// + /// + public static int Save(this Geometry geometry, nint data) + { + TrySave(geometry, data, out var dataSize).Check(); + return dataSize; + } + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// Geometry::setUserData + /// + /// + public static Result TrySetUserData(this Geometry geometry, nint userData) => + PInvoke.GeometrySetUserData(geometry, userData); + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// Geometry::setUserData + /// + /// + public static void SetUserData(this Geometry geometry, nint userData) => + TrySetUserData(geometry, userData).Check(); + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// Geometry::getUserData + /// + /// + public static unsafe Result TryGetUserData(this Geometry geometry, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.GeometryGetUserData(geometry, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// Geometry::getUserData + /// + /// + public static nint GetUserData(this Geometry geometry) + { + TryGetUserData(geometry, out var userData).Check(); + return userData; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Reverb3d.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Reverb3d.gen.cs new file mode 100644 index 0000000..356a84c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Reverb3d.gen.cs @@ -0,0 +1,265 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Releases the memory for a reverb object and makes it inactive. + /// + /// + /// If you release all Reverb3D objects and have not added a new Reverb3D object, + /// System::setReverbProperties should be called to reset the reverb properties. + /// + /// + /// See Also: System::createReverb3D + /// + /// + /// Reverb3D::release + /// + /// + public static Result TryRelease(this Reverb3d reverb3d) => PInvoke.Reverb3dRelease(reverb3d); + + /// + /// + /// Releases the memory for a reverb object and makes it inactive. + /// + /// + /// If you release all Reverb3D objects and have not added a new Reverb3D object, + /// System::setReverbProperties should be called to reset the reverb properties. + /// + /// + /// See Also: System::createReverb3D + /// + /// + /// Reverb3D::release + /// + /// + public static void Release(this Reverb3d reverb3d) => TryRelease(reverb3d).Check(); + + /// + /// + /// Sets the 3D attributes of a reverb sphere. + /// + /// + /// Reverb3D::set3DAttributes + /// + /// + public static unsafe Result TrySet3dAttributes( + this Reverb3d reverb3d, + in float3 position, + float minDistance, + float maxDistance + ) + { + fixed (float3* positionPtr = &position) + return PInvoke.Reverb3dSet3dAttributes(reverb3d, positionPtr, minDistance, maxDistance); + } + + /// + /// + /// Sets the 3D attributes of a reverb sphere. + /// + /// + /// Reverb3D::set3DAttributes + /// + /// + public static void Set3dAttributes( + this Reverb3d reverb3d, + in float3 position, + float minDistance, + float maxDistance + ) => TrySet3dAttributes(reverb3d, position, minDistance, maxDistance).Check(); + + /// + /// + /// Retrieves the 3D attributes of a reverb sphere. + /// + /// + /// Reverb3D::get3DAttributes + /// + /// + public static unsafe Result TryGet3dAttributes( + this Reverb3d reverb3d, + out float3 position, + out float minDistance, + out float maxDistance + ) + { + fixed (float3* positionPtr = &position) + fixed (float* minDistancePtr = &minDistance) + fixed (float* maxDistancePtr = &maxDistance) + return PInvoke.Reverb3dGet3dAttributes(reverb3d, positionPtr, minDistancePtr, maxDistancePtr); + } + + /// + /// + /// Retrieves the 3D attributes of a reverb sphere. + /// + /// + /// Reverb3D::get3DAttributes + /// + /// + public static void Get3dAttributes( + this Reverb3d reverb3d, + out float3 position, + out float minDistance, + out float maxDistance + ) => TryGet3dAttributes(reverb3d, out position, out minDistance, out maxDistance).Check(); + + /// + /// + /// Sets the environmental properties of a reverb sphere. + /// + /// + /// Reverb3D::setProperties + /// + /// + public static unsafe Result TrySetProperties(this Reverb3d reverb3d, in ReverbProperties properties) + { + fixed (ReverbProperties* propertiesPtr = &properties) + return PInvoke.Reverb3dSetProperties(reverb3d, propertiesPtr); + } + + /// + /// + /// Sets the environmental properties of a reverb sphere. + /// + /// + /// Reverb3D::setProperties + /// + /// + public static void SetProperties(this Reverb3d reverb3d, in ReverbProperties properties) => + TrySetProperties(reverb3d, properties).Check(); + + /// + /// + /// Retrieves the environmental properties of a reverb sphere. + /// + /// + /// Reverb3D::getProperties + /// + /// + public static unsafe Result TryGetProperties(this Reverb3d reverb3d, out ReverbProperties properties) + { + fixed (ReverbProperties* propertiesPtr = &properties) + return PInvoke.Reverb3dGetProperties(reverb3d, propertiesPtr); + } + + /// + /// + /// Retrieves the environmental properties of a reverb sphere. + /// + /// + /// Reverb3D::getProperties + /// + /// + public static ReverbProperties GetProperties(this Reverb3d reverb3d) + { + TryGetProperties(reverb3d, out var properties).Check(); + return properties; + } + + /// + /// + /// Sets the active state. + /// + /// + /// Reverb3D::setActive + /// + /// + public static Result TrySetActive(this Reverb3d reverb3d, Bool32 active) => + PInvoke.Reverb3dSetActive(reverb3d, active); + + /// + /// + /// Sets the active state. + /// + /// + /// Reverb3D::setActive + /// + /// + public static void SetActive(this Reverb3d reverb3d, Bool32 active) => TrySetActive(reverb3d, active).Check(); + + /// + /// + /// Retrieves the active state. + /// + /// + /// Reverb3D::getActive + /// + /// + public static unsafe Result TryGetActive(this Reverb3d reverb3d, out Bool32 active) + { + fixed (Bool32* activePtr = &active) + return PInvoke.Reverb3dGetActive(reverb3d, activePtr); + } + + /// + /// + /// Retrieves the active state. + /// + /// + /// Reverb3D::getActive + /// + /// + public static Bool32 GetActive(this Reverb3d reverb3d) + { + TryGetActive(reverb3d, out var active).Check(); + return active; + } + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// Reverb3D::setUserData + /// + /// + public static Result TrySetUserData(this Reverb3d reverb3d, nint userData) => + PInvoke.Reverb3dSetUserData(reverb3d, userData); + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// Reverb3D::setUserData + /// + /// + public static void SetUserData(this Reverb3d reverb3d, nint userData) => + TrySetUserData(reverb3d, userData).Check(); + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// Reverb3D::getUserData + /// + /// + public static unsafe Result TryGetUserData(this Reverb3d reverb3d, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.Reverb3dGetUserData(reverb3d, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// Reverb3D::getUserData + /// + /// + public static nint GetUserData(this Reverb3d reverb3d) + { + TryGetUserData(reverb3d, out var userData).Check(); + return userData; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Sound.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Sound.gen.cs new file mode 100644 index 0000000..e11a410 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.Sound.gen.cs @@ -0,0 +1,1233 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Frees a sound object. + /// + /// + /// This will stop any instances of this sound, and free the sound object and its children if it is a + /// multi-sound object. + /// + /// + /// If the sound was opened with FMOD_NONBLOCKING and hasn't finished opening yet, it will block. + /// Additionally, if the sound is still playing or has recently been stopped, the release may stall, as the + /// mixer may still be using the sound. Using Sound::getOpenState and checking the open state for + /// FMOD_OPENSTATE_READY and FMOD_OPENSTATE_ERROR is a good way to avoid stalls. + /// + /// + /// See Also: System::createSound, Sound::getSubSound + /// + /// + /// Sound::release + /// + /// + public static Result TryRelease(this Sound sound) => PInvoke.SoundRelease(sound); + + /// + /// + /// Frees a sound object. + /// + /// + /// This will stop any instances of this sound, and free the sound object and its children if it is a + /// multi-sound object. + /// + /// + /// If the sound was opened with FMOD_NONBLOCKING and hasn't finished opening yet, it will block. + /// Additionally, if the sound is still playing or has recently been stopped, the release may stall, as the + /// mixer may still be using the sound. Using Sound::getOpenState and checking the open state for + /// FMOD_OPENSTATE_READY and FMOD_OPENSTATE_ERROR is a good way to avoid stalls. + /// + /// + /// See Also: System::createSound, Sound::getSubSound + /// + /// + /// Sound::release + /// + /// + public static void Release(this Sound sound) => TryRelease(sound).Check(); + + /// + /// + /// Retrieves the parent System object. + /// + /// + /// Sound::getSystemObject + /// + /// + public static unsafe Result TryGetSystemObject(this Sound sound, out FmodSystem system) + { + fixed (FmodSystem* systemPtr = &system) + return PInvoke.SoundGetSystemObject(sound, systemPtr); + } + + /// + /// + /// Retrieves the parent System object. + /// + /// + /// Sound::getSystemObject + /// + /// + public static FmodSystem GetSystemObject(this Sound sound) + { + TryGetSystemObject(sound, out var system).Check(); + return system; + } + + /// + /// + /// Gives access to a portion or all the sample data of a sound for direct manipulation. + /// + /// + /// Sound::lock + /// + /// + public static unsafe Result TryLock( + this Sound sound, + uint offset, + uint length, + out nint ptr1, + out nint ptr2, + out uint len1, + out uint len2 + ) + { + fixed (nint* ptr1Ptr = &ptr1) + fixed (nint* ptr2Ptr = &ptr2) + fixed (uint* len1Ptr = &len1) + fixed (uint* len2Ptr = &len2) + return PInvoke.SoundLock(sound, offset, length, ptr1Ptr, ptr2Ptr, len1Ptr, len2Ptr); + } + + /// + /// + /// Gives access to a portion or all the sample data of a sound for direct manipulation. + /// + /// + /// Sound::lock + /// + /// + public static void Lock( + this Sound sound, + uint offset, + uint length, + out nint ptr1, + out nint ptr2, + out uint len1, + out uint len2 + ) => TryLock(sound, offset, length, out ptr1, out ptr2, out len1, out len2).Check(); + + /// + /// + /// Finalizes a previous sample data lock and submits it back to the Sound object. + /// + /// + /// Sound::unlock + /// + /// + public static Result TryUnlock(this Sound sound, nint ptr1, nint ptr2, uint len1, uint len2) => + PInvoke.SoundUnlock(sound, ptr1, ptr2, len1, len2); + + /// + /// + /// Finalizes a previous sample data lock and submits it back to the Sound object. + /// + /// + /// Sound::unlock + /// + /// + public static void Unlock(this Sound sound, nint ptr1, nint ptr2, uint len1, uint len2) => + TryUnlock(sound, ptr1, ptr2, len1, len2).Check(); + + /// + /// + /// Sets a sound's default playback attributes. + /// + /// + /// When the Sound is played it will use these values without having to specify them later on a per Channel + /// basis. + /// + /// + /// Sound::setDefaults + /// + /// + public static Result TrySetDefaults(this Sound sound, float frequency, int priority) => + PInvoke.SoundSetDefaults(sound, frequency, priority); + + /// + /// + /// Sets a sound's default playback attributes. + /// + /// + /// When the Sound is played it will use these values without having to specify them later on a per Channel + /// basis. + /// + /// + /// Sound::setDefaults + /// + /// + public static void SetDefaults(this Sound sound, float frequency, int priority) => + TrySetDefaults(sound, frequency, priority).Check(); + + /// + /// + /// Retrieves a sound's default playback attributes. + /// + /// + /// Sound::getDefaults + /// + /// + public static unsafe Result TryGetDefaults(this Sound sound, out float frequency, out int priority) + { + fixed (float* frequencyPtr = &frequency) + fixed (int* priorityPtr = &priority) + return PInvoke.SoundGetDefaults(sound, frequencyPtr, priorityPtr); + } + + /// + /// + /// Retrieves a sound's default playback attributes. + /// + /// + /// Sound::getDefaults + /// + /// + public static void GetDefaults(this Sound sound, out float frequency, out int priority) => + TryGetDefaults(sound, out frequency, out priority).Check(); + + /// + /// + /// Sets the minimum and maximum audible distance for a 3D sound. + /// + /// + /// Sound::set3DMinMaxDistance + /// + /// + public static Result TrySet3dMinMaxDistance(this Sound sound, float min, float max) => + PInvoke.SoundSet3dMinMaxDistance(sound, min, max); + + /// + /// + /// Sets the minimum and maximum audible distance for a 3D sound. + /// + /// + /// Sound::set3DMinMaxDistance + /// + /// + public static void Set3dMinMaxDistance(this Sound sound, float min, float max) => + TrySet3dMinMaxDistance(sound, min, max).Check(); + + /// + /// + /// Retrieve the minimum and maximum audible distance for a 3D sound. + /// + /// + /// Sound::get3DMinMaxDistance + /// + /// + public static unsafe Result TryGet3dMinMaxDistance(this Sound sound, out float min, out float max) + { + fixed (float* minPtr = &min) + fixed (float* maxPtr = &max) + return PInvoke.SoundGet3dMinMaxDistance(sound, minPtr, maxPtr); + } + + /// + /// + /// Retrieve the minimum and maximum audible distance for a 3D sound. + /// + /// + /// Sound::get3DMinMaxDistance + /// + /// + public static void Get3dMinMaxDistance(this Sound sound, out float min, out float max) => + TryGet3dMinMaxDistance(sound, out min, out max).Check(); + + /// + /// + /// Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on + /// direction. + /// + /// + /// Sound::set3DConeSettings + /// + /// + public static Result TrySet3dConeSettings( + this Sound sound, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ) => PInvoke.SoundSet3dConeSettings(sound, insideConeAngle, outsideConeAngle, outsideVolume); + + /// + /// + /// Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on + /// direction. + /// + /// + /// Sound::set3DConeSettings + /// + /// + public static void Set3dConeSettings( + this Sound sound, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ) => TrySet3dConeSettings(sound, insideConeAngle, outsideConeAngle, outsideVolume).Check(); + + /// + /// + /// Retrieves the inside and outside angles of the 3D projection cone and the outside volume. + /// + /// + /// Sound::get3DConeSettings + /// + /// + public static unsafe Result TryGet3dConeSettings( + this Sound sound, + out float insideConeAngle, + out float outsideConeAngle, + out float outsideVolume + ) + { + fixed (float* insideConeAnglePtr = &insideConeAngle) + fixed (float* outsideConeAnglePtr = &outsideConeAngle) + fixed (float* outsideVolumePtr = &outsideVolume) + return PInvoke.SoundGet3dConeSettings(sound, insideConeAnglePtr, outsideConeAnglePtr, outsideVolumePtr); + } + + /// + /// + /// Retrieves the inside and outside angles of the 3D projection cone and the outside volume. + /// + /// + /// Sound::get3DConeSettings + /// + /// + public static void Get3dConeSettings( + this Sound sound, + out float insideConeAngle, + out float outsideConeAngle, + out float outsideVolume + ) => TryGet3dConeSettings(sound, out insideConeAngle, out outsideConeAngle, out outsideVolume).Check(); + + /// + /// + /// Sets a custom roll-off shape for 3D distance attenuation. + /// + /// + /// Sound::set3DCustomRolloff + /// + /// + public static unsafe Result TrySet3dCustomRolloff(this Sound sound, float3* points, int numPoints) => + PInvoke.SoundSet3dCustomRolloff(sound, points, numPoints); + + /// + /// + /// Sets a custom roll-off shape for 3D distance attenuation. + /// + /// + /// Sound::set3DCustomRolloff + /// + /// + public static unsafe void Set3dCustomRolloff(this Sound sound, float3* points, int numPoints) => + TrySet3dCustomRolloff(sound, points, numPoints).Check(); + + /// + /// + /// Retrieves the current custom roll-off shape for 3D distance attenuation. + /// + /// + /// Sound::get3DCustomRolloff + /// + /// + public static unsafe Result TryGet3dCustomRolloff(this Sound sound, out float3* points, out int numPoints) + { + fixed (float3** pointsPtr = &points) + fixed (int* numPointsPtr = &numPoints) + return PInvoke.SoundGet3dCustomRolloff(sound, pointsPtr, numPointsPtr); + } + + /// + /// + /// Retrieves the current custom roll-off shape for 3D distance attenuation. + /// + /// + /// Sound::get3DCustomRolloff + /// + /// + public static unsafe void Get3dCustomRolloff(this Sound sound, out float3* points, out int numPoints) => + TryGet3dCustomRolloff(sound, out points, out numPoints).Check(); + + /// + /// + /// Retrieves a handle to a Sound object that is contained within the parent sound. + /// + /// + /// Sound::getSubSound + /// + /// + public static unsafe Result TryGetSubSound(this Sound sound, int index, out Sound subSound) + { + fixed (Sound* subSoundPtr = &subSound) + return PInvoke.SoundGetSubSound(sound, index, subSoundPtr); + } + + /// + /// + /// Retrieves a handle to a Sound object that is contained within the parent sound. + /// + /// + /// Sound::getSubSound + /// + /// + public static Sound GetSubSound(this Sound sound, int index) + { + TryGetSubSound(sound, index, out var subSound).Check(); + return subSound; + } + + /// + /// + /// Retrieves the parent Sound object that contains this subsound. + /// + /// + /// Sound::getSubSoundParent + /// + /// + public static unsafe Result TryGetSubSoundParent(this Sound sound, out Sound parentSound) + { + fixed (Sound* parentSoundPtr = &parentSound) + return PInvoke.SoundGetSubSoundParent(sound, parentSoundPtr); + } + + /// + /// + /// Retrieves the parent Sound object that contains this subsound. + /// + /// + /// Sound::getSubSoundParent + /// + /// + public static Sound GetSubSoundParent(this Sound sound) + { + TryGetSubSoundParent(sound, out var parentSound).Check(); + return parentSound; + } + + /// + /// + /// Retrieves the name of a sound. + /// + /// + /// Sound::getName + /// + /// + public static unsafe Result TryGetName(this Sound sound, byte* name, int nameLen) => + PInvoke.SoundGetName(sound, name, nameLen); + + /// + /// + /// Retrieves the name of a sound. + /// + /// + /// Sound::getName + /// + /// + public static unsafe void GetName(this Sound sound, byte* name, int nameLen) => + TryGetName(sound, name, nameLen).Check(); + + /// + /// + /// Retrieves the length using the specified time unit. + /// + /// + /// Sound::getLength + /// + /// + public static unsafe Result TryGetLength(this Sound sound, out uint length, TimeUnit lengthType) + { + fixed (uint* lengthPtr = &length) + return PInvoke.SoundGetLength(sound, lengthPtr, lengthType); + } + + /// + /// + /// Retrieves the length using the specified time unit. + /// + /// + /// Sound::getLength + /// + /// + public static uint GetLength(this Sound sound, TimeUnit lengthType) + { + TryGetLength(sound, out var length, lengthType).Check(); + return length; + } + + /// + /// + /// Returns format information about the sound. + /// + /// + /// Sound::getFormat + /// + /// + public static unsafe Result TryGetFormat( + this Sound sound, + out SoundType type, + out SoundFormat format, + out int channels, + out int bits + ) + { + fixed (SoundType* typePtr = &type) + fixed (SoundFormat* formatPtr = &format) + fixed (int* channelsPtr = &channels) + fixed (int* bitsPtr = &bits) + return PInvoke.SoundGetFormat(sound, typePtr, formatPtr, channelsPtr, bitsPtr); + } + + /// + /// + /// Returns format information about the sound. + /// + /// + /// Sound::getFormat + /// + /// + public static void GetFormat( + this Sound sound, + out SoundType type, + out SoundFormat format, + out int channels, + out int bits + ) => TryGetFormat(sound, out type, out format, out channels, out bits).Check(); + + /// + /// + /// Retrieves the number of subsounds stored within a sound. + /// + /// + /// Sound::getNumSubSounds + /// + /// + public static unsafe Result TryGetNumSubSounds(this Sound sound, out int numSubSounds) + { + fixed (int* numSubSoundsPtr = &numSubSounds) + return PInvoke.SoundGetNumSubSounds(sound, numSubSoundsPtr); + } + + /// + /// + /// Retrieves the number of subsounds stored within a sound. + /// + /// + /// Sound::getNumSubSounds + /// + /// + public static int GetNumSubSounds(this Sound sound) + { + TryGetNumSubSounds(sound, out var numSubSounds).Check(); + return numSubSounds; + } + + /// + /// + /// Retrieves the number of metadata tags. + /// + /// + /// Sound::getNumTags + /// + /// + public static unsafe Result TryGetNumTags(this Sound sound, out int numTags, out int numTagsUpdated) + { + fixed (int* numTagsPtr = &numTags) + fixed (int* numTagsUpdatedPtr = &numTagsUpdated) + return PInvoke.SoundGetNumTags(sound, numTagsPtr, numTagsUpdatedPtr); + } + + /// + /// + /// Retrieves the number of metadata tags. + /// + /// + /// Sound::getNumTags + /// + /// + public static void GetNumTags(this Sound sound, out int numTags, out int numTagsUpdated) => + TryGetNumTags(sound, out numTags, out numTagsUpdated).Check(); + + /// + /// + /// Retrieves a metadata tag. + /// + /// + /// Sound::getTag + /// + /// + public static unsafe Result TryGetTag(this Sound sound, RefString8 name, int index, out Tag tag) + { + fixed (byte* namePtr = name) + fixed (Tag* tagPtr = &tag) + return PInvoke.SoundGetTag(sound, namePtr, index, tagPtr); + } + + /// + /// + /// Retrieves a metadata tag. + /// + /// + /// Sound::getTag + /// + /// + public static Tag GetTag(this Sound sound, RefString8 name, int index) + { + TryGetTag(sound, name, index, out var tag).Check(); + return tag; + } + + /// + /// + /// Retrieves the state a sound is in after being opened with the non blocking flag, or the current state of + /// the streaming buffer. + /// + /// + /// Sound::getOpenState + /// + /// + public static unsafe Result TryGetOpenState( + this Sound sound, + out OpenState openState, + out uint percentBuffered, + out Bool32 starving, + out Bool32 diskBusy + ) + { + fixed (OpenState* openStatePtr = &openState) + fixed (uint* percentBufferedPtr = &percentBuffered) + fixed (Bool32* starvingPtr = &starving) + fixed (Bool32* diskBusyPtr = &diskBusy) + return PInvoke.SoundGetOpenState(sound, openStatePtr, percentBufferedPtr, starvingPtr, diskBusyPtr); + } + + /// + /// + /// Retrieves the state a sound is in after being opened with the non blocking flag, or the current state of + /// the streaming buffer. + /// + /// + /// Sound::getOpenState + /// + /// + public static void GetOpenState( + this Sound sound, + out OpenState openState, + out uint percentBuffered, + out Bool32 starving, + out Bool32 diskBusy + ) => TryGetOpenState(sound, out openState, out percentBuffered, out starving, out diskBusy).Check(); + + /// + /// + /// Reads data from an opened sound to a specified buffer, using FMOD's internal codecs. + /// + /// + /// Sound::readData + /// + /// + public static unsafe Result TryReadData(this Sound sound, nint buffer, uint length, out uint read) + { + fixed (uint* readPtr = &read) + return PInvoke.SoundReadData(sound, buffer, length, readPtr); + } + + /// + /// + /// Reads data from an opened sound to a specified buffer, using FMOD's internal codecs. + /// + /// + /// Sound::readData + /// + /// + public static uint ReadData(this Sound sound, nint buffer, uint length) + { + TryReadData(sound, buffer, length, out var read).Check(); + return read; + } + + /// + /// + /// Seeks a sound for use with data reading, using FMOD's internal codecs. + /// + /// + /// Sound::seekData + /// + /// + public static Result TrySeekData(this Sound sound, uint pcm) => PInvoke.SoundSeekData(sound, pcm); + + /// + /// + /// Seeks a sound for use with data reading, using FMOD's internal codecs. + /// + /// + /// Sound::seekData + /// + /// + public static void SeekData(this Sound sound, uint pcm) => TrySeekData(sound, pcm).Check(); + + /// + /// + /// Moves the sound from its existing SoundGroup to the specified sound group. + /// + /// + /// Sound::setSoundGroup + /// + /// + public static Result TrySetSoundGroup(this Sound sound, SoundGroup soundGroup) => + PInvoke.SoundSetSoundGroup(sound, soundGroup); + + /// + /// + /// Moves the sound from its existing SoundGroup to the specified sound group. + /// + /// + /// Sound::setSoundGroup + /// + /// + public static void SetSoundGroup(this Sound sound, SoundGroup soundGroup) => + TrySetSoundGroup(sound, soundGroup).Check(); + + /// + /// + /// Retrieves the sound's current sound group. + /// + /// + /// Sound::getSoundGroup + /// + /// + public static unsafe Result TryGetSoundGroup(this Sound sound, out SoundGroup soundGroup) + { + fixed (SoundGroup* soundGroupPtr = &soundGroup) + return PInvoke.SoundGetSoundGroup(sound, soundGroupPtr); + } + + /// + /// + /// Retrieves the sound's current sound group. + /// + /// + /// Sound::getSoundGroup + /// + /// + public static SoundGroup GetSoundGroup(this Sound sound) + { + TryGetSoundGroup(sound, out var soundGroup).Check(); + return soundGroup; + } + + /// + /// + /// Retrieves the number of sync points stored within a sound. + /// + /// + /// Sound::getNumSyncPoints + /// + /// + public static unsafe Result TryGetNumSyncPoints(this Sound sound, out int numSyncPoints) + { + fixed (int* numSyncPointsPtr = &numSyncPoints) + return PInvoke.SoundGetNumSyncPoints(sound, numSyncPointsPtr); + } + + /// + /// + /// Retrieves the number of sync points stored within a sound. + /// + /// + /// Sound::getNumSyncPoints + /// + /// + public static int GetNumSyncPoints(this Sound sound) + { + TryGetNumSyncPoints(sound, out var numSyncPoints).Check(); + return numSyncPoints; + } + + /// + /// + /// Retrieve a sync point. + /// + /// + /// Sound::getSyncPoint + /// + /// + public static unsafe Result TryGetSyncPoint(this Sound sound, int index, out SyncPoint point) + { + fixed (SyncPoint* pointPtr = &point) + return PInvoke.SoundGetSyncPoint(sound, index, pointPtr); + } + + /// + /// + /// Retrieve a sync point. + /// + /// + /// Sound::getSyncPoint + /// + /// + public static SyncPoint GetSyncPoint(this Sound sound, int index) + { + TryGetSyncPoint(sound, index, out var point).Check(); + return point; + } + + /// + /// + /// Retrieves information on an embedded sync point. + /// + /// + /// Sound::getSyncPointInfo + /// + /// + public static unsafe Result TryGetSyncPointInfo( + this Sound sound, + SyncPoint point, + byte* name, + int nameLen, + out uint offset, + TimeUnit offsetType + ) + { + fixed (uint* offsetPtr = &offset) + return PInvoke.SoundGetSyncPointInfo(sound, point, name, nameLen, offsetPtr, offsetType); + } + + /// + /// + /// Retrieves information on an embedded sync point. + /// + /// + /// Sound::getSyncPointInfo + /// + /// + public static unsafe uint GetSyncPointInfo( + this Sound sound, + SyncPoint point, + byte* name, + int nameLen, + TimeUnit offsetType + ) + { + TryGetSyncPointInfo(sound, point, name, nameLen, out var offset, offsetType).Check(); + return offset; + } + + /// + /// + /// Adds a sync point at a specific time within the sound. + /// + /// + /// Sound::addSyncPoint + /// + /// + public static unsafe Result TryAddSyncPoint( + this Sound sound, + uint offset, + TimeUnit offsetType, + RefString8 name, + out SyncPoint point + ) + { + fixed (byte* namePtr = name) + fixed (SyncPoint* pointPtr = &point) + return PInvoke.SoundAddSyncPoint(sound, offset, offsetType, namePtr, pointPtr); + } + + /// + /// + /// Adds a sync point at a specific time within the sound. + /// + /// + /// Sound::addSyncPoint + /// + /// + public static SyncPoint AddSyncPoint(this Sound sound, uint offset, TimeUnit offsetType, RefString8 name) + { + TryAddSyncPoint(sound, offset, offsetType, name, out var point).Check(); + return point; + } + + /// + /// + /// Deletes a sync point within the sound. + /// + /// + /// Sound::deleteSyncPoint + /// + /// + public static Result TryDeleteSyncPoint(this Sound sound, SyncPoint point) => + PInvoke.SoundDeleteSyncPoint(sound, point); + + /// + /// + /// Deletes a sync point within the sound. + /// + /// + /// Sound::deleteSyncPoint + /// + /// + public static void DeleteSyncPoint(this Sound sound, SyncPoint point) => + TryDeleteSyncPoint(sound, point).Check(); + + /// + /// + /// Sets or alters the mode of a sound. + /// + /// + /// Sound::setMode + /// + /// + public static Result TrySetMode(this Sound sound, Mode mode) => PInvoke.SoundSetMode(sound, mode); + + /// + /// + /// Sets or alters the mode of a sound. + /// + /// + /// Sound::setMode + /// + /// + public static void SetMode(this Sound sound, Mode mode) => TrySetMode(sound, mode).Check(); + + /// + /// + /// Retrieves the mode of a sound. + /// + /// + /// Sound::getMode + /// + /// + public static unsafe Result TryGetMode(this Sound sound, out Mode mode) + { + fixed (Mode* modePtr = &mode) + return PInvoke.SoundGetMode(sound, modePtr); + } + + /// + /// + /// Retrieves the mode of a sound. + /// + /// + /// Sound::getMode + /// + /// + public static Mode GetMode(this Sound sound) + { + TryGetMode(sound, out var mode).Check(); + return mode; + } + + /// + /// + /// Sets the sound to loop a specified number of times before stopping if the playback mode is set to + /// looping. + /// + /// + /// Sound::setLoopCount + /// + /// + public static Result TrySetLoopCount(this Sound sound, int loopCount) => + PInvoke.SoundSetLoopCount(sound, loopCount); + + /// + /// + /// Sets the sound to loop a specified number of times before stopping if the playback mode is set to + /// looping. + /// + /// + /// Sound::setLoopCount + /// + /// + public static void SetLoopCount(this Sound sound, int loopCount) => TrySetLoopCount(sound, loopCount).Check(); + + /// + /// + /// Retrieves the sound's loop count. + /// + /// + /// Sound::getLoopCount + /// + /// + public static unsafe Result TryGetLoopCount(this Sound sound, out int loopCount) + { + fixed (int* loopCountPtr = &loopCount) + return PInvoke.SoundGetLoopCount(sound, loopCountPtr); + } + + /// + /// + /// Retrieves the sound's loop count. + /// + /// + /// Sound::getLoopCount + /// + /// + public static int GetLoopCount(this Sound sound) + { + TryGetLoopCount(sound, out var loopCount).Check(); + return loopCount; + } + + /// + /// + /// Sets the loop points within a sound. + /// + /// + /// Sound::setLoopPoints + /// + /// + public static Result TrySetLoopPoints( + this Sound sound, + uint loopStart, + TimeUnit loopStartType, + uint loopEnd, + TimeUnit loopEndType + ) => PInvoke.SoundSetLoopPoints(sound, loopStart, loopStartType, loopEnd, loopEndType); + + /// + /// + /// Sets the loop points within a sound. + /// + /// + /// Sound::setLoopPoints + /// + /// + public static void SetLoopPoints( + this Sound sound, + uint loopStart, + TimeUnit loopStartType, + uint loopEnd, + TimeUnit loopEndType + ) => TrySetLoopPoints(sound, loopStart, loopStartType, loopEnd, loopEndType).Check(); + + /// + /// + /// Retrieves the loop points for a sound. + /// + /// + /// Sound::getLoopPoints + /// + /// + public static unsafe Result TryGetLoopPoints( + this Sound sound, + out uint loopStart, + TimeUnit loopStartType, + out uint loopEnd, + TimeUnit loopEndType + ) + { + fixed (uint* loopStartPtr = &loopStart) + fixed (uint* loopEndPtr = &loopEnd) + return PInvoke.SoundGetLoopPoints(sound, loopStartPtr, loopStartType, loopEndPtr, loopEndType); + } + + /// + /// + /// Retrieves the loop points for a sound. + /// + /// + /// Sound::getLoopPoints + /// + /// + public static void GetLoopPoints( + this Sound sound, + out uint loopStart, + TimeUnit loopStartType, + out uint loopEnd, + TimeUnit loopEndType + ) => TryGetLoopPoints(sound, out loopStart, loopStartType, out loopEnd, loopEndType).Check(); + + /// + /// + /// Gets the number of music channels inside a MOD/S3M/XM/IT/MIDI file. + /// + /// + /// Sound::getMusicNumChannels + /// + /// + public static unsafe Result TryGetMusicNumChannels(this Sound sound, out int numChannels) + { + fixed (int* numChannelsPtr = &numChannels) + return PInvoke.SoundGetMusicNumChannels(sound, numChannelsPtr); + } + + /// + /// + /// Gets the number of music channels inside a MOD/S3M/XM/IT/MIDI file. + /// + /// + /// Sound::getMusicNumChannels + /// + /// + public static int GetMusicNumChannels(this Sound sound) + { + TryGetMusicNumChannels(sound, out var numChannels).Check(); + return numChannels; + } + + /// + /// + /// Sets the volume of a MOD/S3M/XM/IT/MIDI music channel volume. + /// + /// + /// Sound::setMusicChannelVolume + /// + /// + public static Result TrySetMusicChannelVolume(this Sound sound, int channel, float volume) => + PInvoke.SoundSetMusicChannelVolume(sound, channel, volume); + + /// + /// + /// Sets the volume of a MOD/S3M/XM/IT/MIDI music channel volume. + /// + /// + /// Sound::setMusicChannelVolume + /// + /// + public static void SetMusicChannelVolume(this Sound sound, int channel, float volume) => + TrySetMusicChannelVolume(sound, channel, volume).Check(); + + /// + /// + /// Retrieves the volume of a MOD/S3M/XM/IT/MIDI music channel volume. + /// + /// + /// Sound::getMusicChannelVolume + /// + /// + public static unsafe Result TryGetMusicChannelVolume(this Sound sound, int channel, out float volume) + { + fixed (float* volumePtr = &volume) + return PInvoke.SoundGetMusicChannelVolume(sound, channel, volumePtr); + } + + /// + /// + /// Retrieves the volume of a MOD/S3M/XM/IT/MIDI music channel volume. + /// + /// + /// Sound::getMusicChannelVolume + /// + /// + public static float GetMusicChannelVolume(this Sound sound, int channel) + { + TryGetMusicChannelVolume(sound, channel, out var volume).Check(); + return volume; + } + + /// + /// + /// Sets the relative speed of MOD/S3M/XM/IT/MIDI music. + /// + /// + /// Sound::setMusicSpeed + /// + /// + public static Result TrySetMusicSpeed(this Sound sound, float speed) => + PInvoke.SoundSetMusicSpeed(sound, speed); + + /// + /// + /// Sets the relative speed of MOD/S3M/XM/IT/MIDI music. + /// + /// + /// Sound::setMusicSpeed + /// + /// + public static void SetMusicSpeed(this Sound sound, float speed) => TrySetMusicSpeed(sound, speed).Check(); + + /// + /// + /// Gets the relative speed of MOD/S3M/XM/IT/MIDI music. + /// + /// + /// Sound::getMusicSpeed + /// + /// + public static unsafe Result TryGetMusicSpeed(this Sound sound, out float speed) + { + fixed (float* speedPtr = &speed) + return PInvoke.SoundGetMusicSpeed(sound, speedPtr); + } + + /// + /// + /// Gets the relative speed of MOD/S3M/XM/IT/MIDI music. + /// + /// + /// Sound::getMusicSpeed + /// + /// + public static float GetMusicSpeed(this Sound sound) + { + TryGetMusicSpeed(sound, out var speed).Check(); + return speed; + } + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// Sound::setUserData + /// + /// + public static Result TrySetUserData(this Sound sound, nint userData) => + PInvoke.SoundSetUserData(sound, userData); + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// Sound::setUserData + /// + /// + public static void SetUserData(this Sound sound, nint userData) => TrySetUserData(sound, userData).Check(); + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// Sound::getUserData + /// + /// + public static unsafe Result TryGetUserData(this Sound sound, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.SoundGetUserData(sound, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// Sound::getUserData + /// + /// + public static nint GetUserData(this Sound sound) + { + TryGetUserData(sound, out var userData).Check(); + return userData; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.SoundGroup.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.SoundGroup.gen.cs new file mode 100644 index 0000000..f38816d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.SoundGroup.gen.cs @@ -0,0 +1,456 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// + /// + /// Releases a soundgroup object and returns all sounds back to the master sound group. + /// + /// + /// You cannot release the master SoundGroup. + /// + /// + /// See Also: System::createSoundGroup, System::getMasterSoundGroup + /// + /// + /// SoundGroup::release + /// + /// + public static Result TryRelease(this SoundGroup soundGroup) => PInvoke.SoundGroupRelease(soundGroup); + + /// + /// + /// Releases a soundgroup object and returns all sounds back to the master sound group. + /// + /// + /// You cannot release the master SoundGroup. + /// + /// + /// See Also: System::createSoundGroup, System::getMasterSoundGroup + /// + /// + /// SoundGroup::release + /// + /// + public static void Release(this SoundGroup soundGroup) => TryRelease(soundGroup).Check(); + + /// + /// + /// Retrieves the parent System object. + /// + /// + /// SoundGroup::getSystemObject + /// + /// + public static unsafe Result TryGetSystemObject(this SoundGroup soundGroup, out FmodSystem system) + { + fixed (FmodSystem* systemPtr = &system) + return PInvoke.SoundGroupGetSystemObject(soundGroup, systemPtr); + } + + /// + /// + /// Retrieves the parent System object. + /// + /// + /// SoundGroup::getSystemObject + /// + /// + public static FmodSystem GetSystemObject(this SoundGroup soundGroup) + { + TryGetSystemObject(soundGroup, out var system).Check(); + return system; + } + + /// + /// + /// Sets the maximum number of playbacks to be audible at once in a sound group. + /// + /// + /// SoundGroup::setMaxAudible + /// + /// + public static Result TrySetMaxAudible(this SoundGroup soundGroup, int maxAudible) => + PInvoke.SoundGroupSetMaxAudible(soundGroup, maxAudible); + + /// + /// + /// Sets the maximum number of playbacks to be audible at once in a sound group. + /// + /// + /// SoundGroup::setMaxAudible + /// + /// + public static void SetMaxAudible(this SoundGroup soundGroup, int maxAudible) => + TrySetMaxAudible(soundGroup, maxAudible).Check(); + + /// + /// + /// Retrieves the maximum number of playbacks to be audible at once in a sound group. + /// + /// + /// SoundGroup::getMaxAudible + /// + /// + public static unsafe Result TryGetMaxAudible(this SoundGroup soundGroup, out int maxAudible) + { + fixed (int* maxAudiblePtr = &maxAudible) + return PInvoke.SoundGroupGetMaxAudible(soundGroup, maxAudiblePtr); + } + + /// + /// + /// Retrieves the maximum number of playbacks to be audible at once in a sound group. + /// + /// + /// SoundGroup::getMaxAudible + /// + /// + public static int GetMaxAudible(this SoundGroup soundGroup) + { + TryGetMaxAudible(soundGroup, out var maxAudible).Check(); + return maxAudible; + } + + /// + /// + /// This function changes the way the sound playback behaves when too many sounds are playing in a + /// soundgroup. + /// + /// + /// SoundGroup::setMaxAudibleBehavior + /// + /// + public static Result TrySetMaxAudibleBehavior(this SoundGroup soundGroup, SoundGroupBehavior behavior) => + PInvoke.SoundGroupSetMaxAudibleBehavior(soundGroup, behavior); + + /// + /// + /// This function changes the way the sound playback behaves when too many sounds are playing in a + /// soundgroup. + /// + /// + /// SoundGroup::setMaxAudibleBehavior + /// + /// + public static void SetMaxAudibleBehavior(this SoundGroup soundGroup, SoundGroupBehavior behavior) => + TrySetMaxAudibleBehavior(soundGroup, behavior).Check(); + + /// + /// + /// Retrieves the current max audible behavior. + /// + /// + /// SoundGroup::getMaxAudibleBehavior + /// + /// + public static unsafe Result TryGetMaxAudibleBehavior( + this SoundGroup soundGroup, + out SoundGroupBehavior behavior + ) + { + fixed (SoundGroupBehavior* behaviorPtr = &behavior) + return PInvoke.SoundGroupGetMaxAudibleBehavior(soundGroup, behaviorPtr); + } + + /// + /// + /// Retrieves the current max audible behavior. + /// + /// + /// SoundGroup::getMaxAudibleBehavior + /// + /// + public static SoundGroupBehavior GetMaxAudibleBehavior(this SoundGroup soundGroup) + { + TryGetMaxAudibleBehavior(soundGroup, out var behavior).Check(); + return behavior; + } + + /// + /// + /// Sets a mute fade time. + /// + /// + /// SoundGroup::setMuteFadeSpeed + /// + /// + public static Result TrySetMuteFadeSpeed(this SoundGroup soundGroup, float speed) => + PInvoke.SoundGroupSetMuteFadeSpeed(soundGroup, speed); + + /// + /// + /// Sets a mute fade time. + /// + /// + /// SoundGroup::setMuteFadeSpeed + /// + /// + public static void SetMuteFadeSpeed(this SoundGroup soundGroup, float speed) => + TrySetMuteFadeSpeed(soundGroup, speed).Check(); + + /// + /// + /// Retrieves the current mute fade time. + /// + /// + /// SoundGroup::getMuteFadeSpeed + /// + /// + public static unsafe Result TryGetMuteFadeSpeed(this SoundGroup soundGroup, out float speed) + { + fixed (float* speedPtr = &speed) + return PInvoke.SoundGroupGetMuteFadeSpeed(soundGroup, speedPtr); + } + + /// + /// + /// Retrieves the current mute fade time. + /// + /// + /// SoundGroup::getMuteFadeSpeed + /// + /// + public static float GetMuteFadeSpeed(this SoundGroup soundGroup) + { + TryGetMuteFadeSpeed(soundGroup, out var speed).Check(); + return speed; + } + + /// + /// + /// Sets the volume of the sound group. + /// + /// + /// SoundGroup::setVolume + /// + /// + public static Result TrySetVolume(this SoundGroup soundGroup, float volume) => + PInvoke.SoundGroupSetVolume(soundGroup, volume); + + /// + /// + /// Sets the volume of the sound group. + /// + /// + /// SoundGroup::setVolume + /// + /// + public static void SetVolume(this SoundGroup soundGroup, float volume) => + TrySetVolume(soundGroup, volume).Check(); + + /// + /// + /// Retrieves the volume of the sound group. + /// + /// + /// SoundGroup::getVolume + /// + /// + public static unsafe Result TryGetVolume(this SoundGroup soundGroup, out float volume) + { + fixed (float* volumePtr = &volume) + return PInvoke.SoundGroupGetVolume(soundGroup, volumePtr); + } + + /// + /// + /// Retrieves the volume of the sound group. + /// + /// + /// SoundGroup::getVolume + /// + /// + public static float GetVolume(this SoundGroup soundGroup) + { + TryGetVolume(soundGroup, out var volume).Check(); + return volume; + } + + /// + /// + /// Stops all sounds within this soundgroup. + /// + /// + /// See Also: System::playSound + /// + /// + /// SoundGroup::stop + /// + /// + public static Result TryStop(this SoundGroup soundGroup) => PInvoke.SoundGroupStop(soundGroup); + + /// + /// + /// Stops all sounds within this soundgroup. + /// + /// + /// See Also: System::playSound + /// + /// + /// SoundGroup::stop + /// + /// + public static void Stop(this SoundGroup soundGroup) => TryStop(soundGroup).Check(); + + /// + /// + /// Retrieves the name of the sound group. + /// + /// + /// SoundGroup::getName + /// + /// + public static unsafe Result TryGetName(this SoundGroup soundGroup, byte* name, int nameLen) => + PInvoke.SoundGroupGetName(soundGroup, name, nameLen); + + /// + /// + /// Retrieves the name of the sound group. + /// + /// + /// SoundGroup::getName + /// + /// + public static unsafe void GetName(this SoundGroup soundGroup, byte* name, int nameLen) => + TryGetName(soundGroup, name, nameLen).Check(); + + /// + /// + /// Retrieves the current number of sounds in this sound group. + /// + /// + /// SoundGroup::getNumSounds + /// + /// + public static unsafe Result TryGetNumSounds(this SoundGroup soundGroup, out int numSounds) + { + fixed (int* numSoundsPtr = &numSounds) + return PInvoke.SoundGroupGetNumSounds(soundGroup, numSoundsPtr); + } + + /// + /// + /// Retrieves the current number of sounds in this sound group. + /// + /// + /// SoundGroup::getNumSounds + /// + /// + public static int GetNumSounds(this SoundGroup soundGroup) + { + TryGetNumSounds(soundGroup, out var numSounds).Check(); + return numSounds; + } + + /// + /// + /// Retrieves a sound. + /// + /// + /// SoundGroup::getSound + /// + /// + public static unsafe Result TryGetSound(this SoundGroup soundGroup, int index, out Sound sound) + { + fixed (Sound* soundPtr = &sound) + return PInvoke.SoundGroupGetSound(soundGroup, index, soundPtr); + } + + /// + /// + /// Retrieves a sound. + /// + /// + /// SoundGroup::getSound + /// + /// + public static Sound GetSound(this SoundGroup soundGroup, int index) + { + TryGetSound(soundGroup, index, out var sound).Check(); + return sound; + } + + /// + /// + /// Retrieves the number of currently playing Channels for the SoundGroup. + /// + /// + /// SoundGroup::getNumPlaying + /// + /// + public static unsafe Result TryGetNumPlaying(this SoundGroup soundGroup, out int numPlaying) + { + fixed (int* numPlayingPtr = &numPlaying) + return PInvoke.SoundGroupGetNumPlaying(soundGroup, numPlayingPtr); + } + + /// + /// + /// Retrieves the number of currently playing Channels for the SoundGroup. + /// + /// + /// SoundGroup::getNumPlaying + /// + /// + public static int GetNumPlaying(this SoundGroup soundGroup) + { + TryGetNumPlaying(soundGroup, out var numPlaying).Check(); + return numPlaying; + } + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// SoundGroup::setUserData + /// + /// + public static Result TrySetUserData(this SoundGroup soundGroup, nint userData) => + PInvoke.SoundGroupSetUserData(soundGroup, userData); + + /// + /// + /// Sets a user value associated with this object. + /// + /// + /// SoundGroup::setUserData + /// + /// + public static void SetUserData(this SoundGroup soundGroup, nint userData) => + TrySetUserData(soundGroup, userData).Check(); + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// SoundGroup::getUserData + /// + /// + public static unsafe Result TryGetUserData(this SoundGroup soundGroup, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.SoundGroupGetUserData(soundGroup, userDataPtr); + } + + /// + /// + /// Retrieves a user value associated with this object. + /// + /// + /// SoundGroup::getUserData + /// + /// + public static nint GetUserData(this SoundGroup soundGroup) + { + TryGetUserData(soundGroup, out var userData).Check(); + return userData; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.gen.cs new file mode 100644 index 0000000..a7ebebb --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Libraries/Fmod.gen.cs @@ -0,0 +1,111 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + /// Memory::initialize + public static Result TryMemoryInitialize( + nint poolMem, + int poolLen, + MemoryAllocCallbackPtr userAlloc, + MemoryReallocCallbackPtr userRealloc, + MemoryFreeCallbackPtr userFree, + MemoryType memTypeFlags + ) => PInvoke.MemoryInitialize(poolMem, poolLen, userAlloc, userRealloc, userFree, memTypeFlags); + + /// Memory::initialize + public static void MemoryInitialize( + nint poolMem, + int poolLen, + MemoryAllocCallbackPtr userAlloc, + MemoryReallocCallbackPtr userRealloc, + MemoryFreeCallbackPtr userFree, + MemoryType memTypeFlags + ) => TryMemoryInitialize(poolMem, poolLen, userAlloc, userRealloc, userFree, memTypeFlags).Check(); + + /// Memory::getStats + public static unsafe Result TryMemoryGetStats(out int currentAlloced, out int maxAlloced, Bool32 blocking) + { + fixed (int* currentAllocedPtr = ¤tAlloced) + fixed (int* maxAllocedPtr = &maxAlloced) + return PInvoke.MemoryGetStats(currentAllocedPtr, maxAllocedPtr, blocking); + } + + /// Memory::getStats + public static void MemoryGetStats(out int currentAlloced, out int maxAlloced, Bool32 blocking) => + TryMemoryGetStats(out currentAlloced, out maxAlloced, blocking).Check(); + + /// Debug::initialize + public static unsafe Result TryDebugInitialize( + DebugFlags flags, + DebugMode mode, + DebugCallbackPtr callback, + RefString8 fileName + ) + { + fixed (byte* fileNamePtr = fileName) + return PInvoke.DebugInitialize(flags, mode, callback, fileNamePtr); + } + + /// Debug::initialize + public static void DebugInitialize( + DebugFlags flags, + DebugMode mode, + DebugCallbackPtr callback, + RefString8 fileName + ) => TryDebugInitialize(flags, mode, callback, fileName).Check(); + + /// File::setDiskBusy + public static Result TryFileSetDiskBusy(int busy) => PInvoke.FileSetDiskBusy(busy); + + /// File::setDiskBusy + public static void FileSetDiskBusy(int busy) => TryFileSetDiskBusy(busy).Check(); + + /// File::getDiskBusy + public static unsafe Result TryFileGetDiskBusy(out int busy) + { + fixed (int* busyPtr = &busy) + return PInvoke.FileGetDiskBusy(busyPtr); + } + + /// File::getDiskBusy + public static int FileGetDiskBusy() + { + TryFileGetDiskBusy(out var busy).Check(); + return busy; + } + + /// Thread::setAttributes + public static Result TryThreadSetAttributes( + ThreadType type, + ThreadAffinity affinity, + ThreadPriority priority, + ThreadStackSize stackSize + ) => PInvoke.ThreadSetAttributes(type, affinity, priority, stackSize); + + /// Thread::setAttributes + public static void ThreadSetAttributes( + ThreadType type, + ThreadAffinity affinity, + ThreadPriority priority, + ThreadStackSize stackSize + ) => TryThreadSetAttributes(type, affinity, priority, stackSize).Check(); + + /// System::create + public static unsafe Result TrySystemCreate(out FmodSystem system, uint headerVersion) + { + fixed (FmodSystem* systemPtr = &system) + return PInvoke.SystemCreate(systemPtr, headerVersion); + } + + /// System::create + public static FmodSystem SystemCreate(uint headerVersion) + { + TrySystemCreate(out var system, headerVersion).Check(); + return system; + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/PInvokes.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/PInvokes.gen.cs new file mode 100644 index 0000000..0e4155e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/PInvokes.gen.cs @@ -0,0 +1,1791 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class Fmod + { + public static unsafe partial class PInvoke + { + [LibraryImport("fmod", EntryPoint = "FMOD5_Memory_Initialize")] + public static partial Result MemoryInitialize( + nint poolMem, + int poolLen, + MemoryAllocCallbackPtr userAlloc, + MemoryReallocCallbackPtr userRealloc, + MemoryFreeCallbackPtr userFree, + MemoryType memTypeFlags + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Memory_GetStats")] + public static partial Result MemoryGetStats(int* currentAlloced, int* maxAlloced, Bool32 blocking); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Debug_Initialize")] + public static partial Result DebugInitialize( + DebugFlags flags, + DebugMode mode, + DebugCallbackPtr callback, + byte* fileName + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_File_SetDiskBusy")] + public static partial Result FileSetDiskBusy(int busy); + + [LibraryImport("fmod", EntryPoint = "FMOD5_File_GetDiskBusy")] + public static partial Result FileGetDiskBusy(int* busy); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Thread_SetAttributes")] + public static partial Result ThreadSetAttributes( + ThreadType type, + ThreadAffinity affinity, + ThreadPriority priority, + ThreadStackSize stackSize + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Create")] + public static partial Result SystemCreate(FmodSystem* system, uint headerVersion); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Release")] + public static partial Result SystemRelease(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetOutput")] + public static partial Result SystemSetOutput(FmodSystem system, OutputType output); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetOutput")] + public static partial Result SystemGetOutput(FmodSystem system, OutputType* output); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetNumDrivers")] + public static partial Result SystemGetNumDrivers(FmodSystem system, int* numDrivers); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetDriverInfo")] + public static partial Result SystemGetDriverInfo( + FmodSystem system, + int id, + byte* name, + int nameLen, + Guid* guid, + int* systemRate, + SpeakerMode* speakerMode, + int* speakerModeChannels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetDriver")] + public static partial Result SystemSetDriver(FmodSystem system, int driver); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetDriver")] + public static partial Result SystemGetDriver(FmodSystem system, int* driver); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetSoftwareChannels")] + public static partial Result SystemSetSoftwareChannels(FmodSystem system, int numSoftwareChannels); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetSoftwareChannels")] + public static partial Result SystemGetSoftwareChannels(FmodSystem system, int* numSoftwareChannels); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetSoftwareFormat")] + public static partial Result SystemSetSoftwareFormat( + FmodSystem system, + int sampleRate, + SpeakerMode speakerMode, + int numRawSpeakers + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetSoftwareFormat")] + public static partial Result SystemGetSoftwareFormat( + FmodSystem system, + int* sampleRate, + SpeakerMode* speakerMode, + int* numRawSpeakers + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetDSPBufferSize")] + public static partial Result SystemSetDspBufferSize(FmodSystem system, uint bufferLength, int numBuffers); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetDSPBufferSize")] + public static partial Result SystemGetDspBufferSize(FmodSystem system, uint* bufferLength, int* numBuffers); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetFileSystem")] + public static partial Result SystemSetFileSystem( + FmodSystem system, + FileOpenCallbackPtr userOpen, + FileCloseCallbackPtr userClose, + FileReadCallbackPtr userRead, + FileSeekCallbackPtr userSeek, + FileAsyncReadCallbackPtr userAsyncRead, + FileAsyncCancelCallbackPtr userAsyncCancel, + int blockAlign + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_AttachFileSystem")] + public static partial Result SystemAttachFileSystem( + FmodSystem system, + FileOpenCallbackPtr userOpen, + FileCloseCallbackPtr userClose, + FileReadCallbackPtr userRead, + FileSeekCallbackPtr userSeek + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetAdvancedSettings")] + public static partial Result SystemSetAdvancedSettings(FmodSystem system, AdvancedSettings* settings); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetAdvancedSettings")] + public static partial Result SystemGetAdvancedSettings(FmodSystem system, AdvancedSettings* settings); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetCallback")] + public static partial Result SystemSetCallback( + FmodSystem system, + SystemCallbackPtr callback, + SystemCallbackType callbackMask + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetPluginPath")] + public static partial Result SystemSetPluginPath(FmodSystem system, byte* path); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_LoadPlugin")] + public static partial Result SystemLoadPlugin( + FmodSystem system, + byte* fileName, + uint* handle, + uint priority + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_UnloadPlugin")] + public static partial Result SystemUnloadPlugin(FmodSystem system, uint handle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetNumNestedPlugins")] + public static partial Result SystemGetNumNestedPlugins(FmodSystem system, uint handle, int* count); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetNestedPlugin")] + public static partial Result SystemGetNestedPlugin( + FmodSystem system, + uint handle, + int index, + uint* nestedHandle + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetNumPlugins")] + public static partial Result SystemGetNumPlugins(FmodSystem system, PluginType pluginType, int* numPlugins); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetPluginHandle")] + public static partial Result SystemGetPluginHandle( + FmodSystem system, + PluginType pluginType, + int index, + uint* handle + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetPluginInfo")] + public static partial Result SystemGetPluginInfo( + FmodSystem system, + uint handle, + PluginType* pluginType, + byte* name, + int nameLen, + uint* version + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetOutputByPlugin")] + public static partial Result SystemSetOutputByPlugin(FmodSystem system, uint handle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetOutputByPlugin")] + public static partial Result SystemGetOutputByPlugin(FmodSystem system, uint* handle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateDSPByPlugin")] + public static partial Result SystemCreateDspByPlugin(FmodSystem system, uint handle, Dsp* dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetDSPInfoByPlugin")] + public static partial Result SystemGetDspInfoByPlugin( + FmodSystem system, + uint handle, + DspDescription** description + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_RegisterCodec")] + public static partial Result SystemRegisterCodec( + FmodSystem system, + CodecDescription* description, + uint* handle, + uint priority + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_RegisterDSP")] + public static partial Result SystemRegisterDsp( + FmodSystem system, + DspDescription* description, + uint* handle + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_RegisterOutput")] + public static partial Result SystemRegisterOutput( + FmodSystem system, + OutputDescription* description, + uint* handle + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Init")] + public static partial Result SystemInit( + FmodSystem system, + int maxChannels, + InitFlags flags, + nint extraDriverData + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Close")] + public static partial Result SystemClose(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Update")] + public static partial Result SystemUpdate(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetSpeakerPosition")] + public static partial Result SystemSetSpeakerPosition( + FmodSystem system, + Speaker speaker, + float x, + float y, + Bool32 active + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetSpeakerPosition")] + public static partial Result SystemGetSpeakerPosition( + FmodSystem system, + Speaker speaker, + float* x, + float* y, + Bool32* active + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetStreamBufferSize")] + public static partial Result SystemSetStreamBufferSize( + FmodSystem system, + uint fileBufferSize, + TimeUnit fileBufferSizeType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetStreamBufferSize")] + public static partial Result SystemGetStreamBufferSize( + FmodSystem system, + uint* fileBufferSize, + TimeUnit* fileBufferSizeType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Set3DSettings")] + public static partial Result SystemSet3dSettings( + FmodSystem system, + float dopplerScale, + float distanceFactor, + float rolloffScale + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Get3DSettings")] + public static partial Result SystemGet3dSettings( + FmodSystem system, + float* dopplerScale, + float* distanceFactor, + float* rolloffScale + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Set3DNumListeners")] + public static partial Result SystemSet3dNumListeners(FmodSystem system, int numListeners); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Get3DNumListeners")] + public static partial Result SystemGet3dNumListeners(FmodSystem system, int* numListeners); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Set3DListenerAttributes")] + public static partial Result SystemSet3dListenerAttributes( + FmodSystem system, + int listener, + float3* pos, + float3* vel, + float3* forward, + float3* up + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Get3DListenerAttributes")] + public static partial Result SystemGet3dListenerAttributes( + FmodSystem system, + int listener, + float3* pos, + float3* vel, + float3* forward, + float3* up + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_Set3DRolloffCallback")] + public static partial Result SystemSet3dRolloffCallback(FmodSystem system, Rolloff3dCallbackPtr callback); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_MixerSuspend")] + public static partial Result SystemMixerSuspend(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_MixerResume")] + public static partial Result SystemMixerResume(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetDefaultMixMatrix")] + public static partial Result SystemGetDefaultMixMatrix( + FmodSystem system, + SpeakerMode sourceSpeakerMode, + SpeakerMode targetSpeakerMode, + float* matrix, + int matrixHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetSpeakerModeChannels")] + public static partial Result SystemGetSpeakerModeChannels( + FmodSystem system, + SpeakerMode mode, + int* channels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetVersion")] + public static partial Result SystemGetVersion(FmodSystem system, uint* version, uint* buildnumber); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetOutputHandle")] + public static partial Result SystemGetOutputHandle(FmodSystem system, nint* handle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetChannelsPlaying")] + public static partial Result SystemGetChannelsPlaying(FmodSystem system, int* channels, int* realChannels); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetCPUUsage")] + public static partial Result SystemGetCpuUsage(FmodSystem system, CpuUsage* usage); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetFileUsage")] + public static partial Result SystemGetFileUsage( + FmodSystem system, + long* sampleBytesRead, + long* streamBytesRead, + long* otherBytesRead + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateSound")] + public static partial Result SystemCreateSound( + FmodSystem system, + byte* nameOrData, + Mode mode, + CreateSoundExInfo* exInfo, + Sound* sound + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateStream")] + public static partial Result SystemCreateStream( + FmodSystem system, + byte* nameOrData, + Mode mode, + CreateSoundExInfo* exInfo, + Sound* sound + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateDSP")] + public static partial Result SystemCreateDsp(FmodSystem system, DspDescription* description, Dsp* dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateDSPByType")] + public static partial Result SystemCreateDspByType(FmodSystem system, DspType type, Dsp* dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateChannelGroup")] + public static partial Result SystemCreateChannelGroup( + FmodSystem system, + byte* name, + ChannelGroup* channelGroup + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateSoundGroup")] + public static partial Result SystemCreateSoundGroup(FmodSystem system, byte* name, SoundGroup* soundGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateReverb3D")] + public static partial Result SystemCreateReverb3d(FmodSystem system, Reverb3d* reverb); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_PlaySound")] + public static partial Result SystemPlaySound( + FmodSystem system, + Sound sound, + ChannelGroup channelGroup, + Bool32 paused, + Channel* channel + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_PlayDSP")] + public static partial Result SystemPlayDsp( + FmodSystem system, + Dsp dsp, + ChannelGroup channelGroup, + Bool32 paused, + Channel* channel + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetChannel")] + public static partial Result SystemGetChannel(FmodSystem system, int channelId, Channel* channel); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetDSPInfoByType")] + public static partial Result SystemGetDspInfoByType( + FmodSystem system, + DspType type, + DspDescription** description + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetMasterChannelGroup")] + public static partial Result SystemGetMasterChannelGroup(FmodSystem system, ChannelGroup* channelGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetMasterSoundGroup")] + public static partial Result SystemGetMasterSoundGroup(FmodSystem system, SoundGroup* soundGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_AttachChannelGroupToPort")] + public static partial Result SystemAttachChannelGroupToPort( + FmodSystem system, + PortType portType, + PortIndex portIndex, + ChannelGroup channelGroup, + Bool32 passThru + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_DetachChannelGroupFromPort")] + public static partial Result SystemDetachChannelGroupFromPort(FmodSystem system, ChannelGroup channelGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetReverbProperties")] + public static partial Result SystemSetReverbProperties( + FmodSystem system, + int instance, + ReverbProperties* prop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetReverbProperties")] + public static partial Result SystemGetReverbProperties( + FmodSystem system, + int instance, + ReverbProperties* prop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_LockDSP")] + public static partial Result SystemLockDsp(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_UnlockDSP")] + public static partial Result SystemUnlockDsp(FmodSystem system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetRecordNumDrivers")] + public static partial Result SystemGetRecordNumDrivers( + FmodSystem system, + int* numDrivers, + int* numConnected + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetRecordDriverInfo")] + public static partial Result SystemGetRecordDriverInfo( + FmodSystem system, + int id, + byte* name, + int nameLen, + Guid* guid, + int* systemRate, + SpeakerMode* speakerMode, + int* speakerModeChannels, + DriverState* state + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetRecordPosition")] + public static partial Result SystemGetRecordPosition(FmodSystem system, int id, uint* position); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_RecordStart")] + public static partial Result SystemRecordStart(FmodSystem system, int id, Sound sound, Bool32 loop); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_RecordStop")] + public static partial Result SystemRecordStop(FmodSystem system, int id); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_IsRecording")] + public static partial Result SystemIsRecording(FmodSystem system, int id, Bool32* recording); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_CreateGeometry")] + public static partial Result SystemCreateGeometry( + FmodSystem system, + int maxPolygons, + int maxVertices, + Geometry* geometry + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetGeometrySettings")] + public static partial Result SystemSetGeometrySettings(FmodSystem system, float maxWorldSize); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetGeometrySettings")] + public static partial Result SystemGetGeometrySettings(FmodSystem system, float* maxWorldSize); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_LoadGeometry")] + public static partial Result SystemLoadGeometry( + FmodSystem system, + void* data, + int dataSize, + Geometry* geometry + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetGeometryOcclusion")] + public static partial Result SystemGetGeometryOcclusion( + FmodSystem system, + float3* listener, + float3* source, + float* direct, + float* reverb + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetNetworkProxy")] + public static partial Result SystemSetNetworkProxy(FmodSystem system, byte* proxy); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetNetworkProxy")] + public static partial Result SystemGetNetworkProxy(FmodSystem system, byte* proxy, int proxyLen); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetNetworkTimeout")] + public static partial Result SystemSetNetworkTimeout(FmodSystem system, int timeOut); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetNetworkTimeout")] + public static partial Result SystemGetNetworkTimeout(FmodSystem system, int* timeOut); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_SetUserData")] + public static partial Result SystemSetUserData(FmodSystem system, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_System_GetUserData")] + public static partial Result SystemGetUserData(FmodSystem system, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Release")] + public static partial Result SoundRelease(Sound sound); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetSystemObject")] + public static partial Result SoundGetSystemObject(Sound sound, FmodSystem* system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Lock")] + public static partial Result SoundLock( + Sound sound, + uint offset, + uint length, + nint* ptr1, + nint* ptr2, + uint* len1, + uint* len2 + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Unlock")] + public static partial Result SoundUnlock(Sound sound, nint ptr1, nint ptr2, uint len1, uint len2); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetDefaults")] + public static partial Result SoundSetDefaults(Sound sound, float frequency, int priority); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetDefaults")] + public static partial Result SoundGetDefaults(Sound sound, float* frequency, int* priority); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Set3DMinMaxDistance")] + public static partial Result SoundSet3dMinMaxDistance(Sound sound, float min, float max); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Get3DMinMaxDistance")] + public static partial Result SoundGet3dMinMaxDistance(Sound sound, float* min, float* max); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Set3DConeSettings")] + public static partial Result SoundSet3dConeSettings( + Sound sound, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Get3DConeSettings")] + public static partial Result SoundGet3dConeSettings( + Sound sound, + float* insideConeAngle, + float* outsideConeAngle, + float* outsideVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Set3DCustomRolloff")] + public static partial Result SoundSet3dCustomRolloff(Sound sound, float3* points, int numPoints); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_Get3DCustomRolloff")] + public static partial Result SoundGet3dCustomRolloff(Sound sound, float3** points, int* numPoints); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetSubSound")] + public static partial Result SoundGetSubSound(Sound sound, int index, Sound* subSound); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetSubSoundParent")] + public static partial Result SoundGetSubSoundParent(Sound sound, Sound* parentSound); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetName")] + public static partial Result SoundGetName(Sound sound, byte* name, int nameLen); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetLength")] + public static partial Result SoundGetLength(Sound sound, uint* length, TimeUnit lengthType); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetFormat")] + public static partial Result SoundGetFormat( + Sound sound, + SoundType* type, + SoundFormat* format, + int* channels, + int* bits + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetNumSubSounds")] + public static partial Result SoundGetNumSubSounds(Sound sound, int* numSubSounds); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetNumTags")] + public static partial Result SoundGetNumTags(Sound sound, int* numTags, int* numTagsUpdated); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetTag")] + public static partial Result SoundGetTag(Sound sound, byte* name, int index, Tag* tag); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetOpenState")] + public static partial Result SoundGetOpenState( + Sound sound, + OpenState* openState, + uint* percentBuffered, + Bool32* starving, + Bool32* diskBusy + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_ReadData")] + public static partial Result SoundReadData(Sound sound, nint buffer, uint length, uint* read); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SeekData")] + public static partial Result SoundSeekData(Sound sound, uint pcm); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetSoundGroup")] + public static partial Result SoundSetSoundGroup(Sound sound, SoundGroup soundGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetSoundGroup")] + public static partial Result SoundGetSoundGroup(Sound sound, SoundGroup* soundGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetNumSyncPoints")] + public static partial Result SoundGetNumSyncPoints(Sound sound, int* numSyncPoints); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetSyncPoint")] + public static partial Result SoundGetSyncPoint(Sound sound, int index, SyncPoint* point); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetSyncPointInfo")] + public static partial Result SoundGetSyncPointInfo( + Sound sound, + SyncPoint point, + byte* name, + int nameLen, + uint* offset, + TimeUnit offsetType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_AddSyncPoint")] + public static partial Result SoundAddSyncPoint( + Sound sound, + uint offset, + TimeUnit offsetType, + byte* name, + SyncPoint* point + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_DeleteSyncPoint")] + public static partial Result SoundDeleteSyncPoint(Sound sound, SyncPoint point); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetMode")] + public static partial Result SoundSetMode(Sound sound, Mode mode); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetMode")] + public static partial Result SoundGetMode(Sound sound, Mode* mode); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetLoopCount")] + public static partial Result SoundSetLoopCount(Sound sound, int loopCount); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetLoopCount")] + public static partial Result SoundGetLoopCount(Sound sound, int* loopCount); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetLoopPoints")] + public static partial Result SoundSetLoopPoints( + Sound sound, + uint loopStart, + TimeUnit loopStartType, + uint loopEnd, + TimeUnit loopEndType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetLoopPoints")] + public static partial Result SoundGetLoopPoints( + Sound sound, + uint* loopStart, + TimeUnit loopStartType, + uint* loopEnd, + TimeUnit loopEndType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetMusicNumChannels")] + public static partial Result SoundGetMusicNumChannels(Sound sound, int* numChannels); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetMusicChannelVolume")] + public static partial Result SoundSetMusicChannelVolume(Sound sound, int channel, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetMusicChannelVolume")] + public static partial Result SoundGetMusicChannelVolume(Sound sound, int channel, float* volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetMusicSpeed")] + public static partial Result SoundSetMusicSpeed(Sound sound, float speed); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetMusicSpeed")] + public static partial Result SoundGetMusicSpeed(Sound sound, float* speed); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_SetUserData")] + public static partial Result SoundSetUserData(Sound sound, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Sound_GetUserData")] + public static partial Result SoundGetUserData(Sound sound, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetSystemObject")] + public static partial Result ChannelGetSystemObject(Channel channel, FmodSystem* system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Stop")] + public static partial Result ChannelStop(Channel channel); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetPaused")] + public static partial Result ChannelSetPaused(Channel channel, Bool32 paused); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetPaused")] + public static partial Result ChannelGetPaused(Channel channel, Bool32* paused); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetVolume")] + public static partial Result ChannelSetVolume(Channel channel, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetVolume")] + public static partial Result ChannelGetVolume(Channel channel, float* volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetVolumeRamp")] + public static partial Result ChannelSetVolumeRamp(Channel channel, Bool32 ramp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetVolumeRamp")] + public static partial Result ChannelGetVolumeRamp(Channel channel, Bool32* ramp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetAudibility")] + public static partial Result ChannelGetAudibility(Channel channel, float* audibility); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetPitch")] + public static partial Result ChannelSetPitch(Channel channel, float pitch); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetPitch")] + public static partial Result ChannelGetPitch(Channel channel, float* pitch); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetMute")] + public static partial Result ChannelSetMute(Channel channel, Bool32 mute); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetMute")] + public static partial Result ChannelGetMute(Channel channel, Bool32* mute); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetReverbProperties")] + public static partial Result ChannelSetReverbProperties(Channel channel, int instance, float wet); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetReverbProperties")] + public static partial Result ChannelGetReverbProperties(Channel channel, int instance, float* wet); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetLowPassGain")] + public static partial Result ChannelSetLowPassGain(Channel channel, float gain); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetLowPassGain")] + public static partial Result ChannelGetLowPassGain(Channel channel, float* gain); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetMode")] + public static partial Result ChannelSetMode(Channel channel, Mode mode); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetMode")] + public static partial Result ChannelGetMode(Channel channel, Mode* mode); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetCallback")] + public static partial Result ChannelSetCallback(Channel channel, ChannelControlCallbackPtr callback); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_IsPlaying")] + public static partial Result ChannelIsPlaying(Channel channel, Bool32* isPlaying); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetPan")] + public static partial Result ChannelSetPan(Channel channel, float pan); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetMixLevelsOutput")] + public static partial Result ChannelSetMixLevelsOutput( + Channel channel, + float frontLeft, + float frontRight, + float center, + float lfe, + float surroundLeft, + float surroundRight, + float backLeft, + float backRight + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetMixLevelsInput")] + public static partial Result ChannelSetMixLevelsInput(Channel channel, float* levels, int numLevels); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetMixMatrix")] + public static partial Result ChannelSetMixMatrix( + Channel channel, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetMixMatrix")] + public static partial Result ChannelGetMixMatrix( + Channel channel, + float* matrix, + int* outChannels, + int* inChannels, + int inChannelHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetDSPClock")] + public static partial Result ChannelGetDspClock(Channel channel, ulong* dspClock, ulong* parentClock); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetDelay")] + public static partial Result ChannelSetDelay( + Channel channel, + ulong dspClockStart, + ulong dspClockEnd, + Bool32 stopChannels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetDelay")] + public static partial Result ChannelGetDelay( + Channel channel, + ulong* dspClockStart, + ulong* dspClockEnd, + Bool32* stopChannels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_AddFadePoint")] + public static partial Result ChannelAddFadePoint(Channel channel, ulong dspClock, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetFadePointRamp")] + public static partial Result ChannelSetFadePointRamp(Channel channel, ulong dspClock, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_RemoveFadePoints")] + public static partial Result ChannelRemoveFadePoints( + Channel channel, + ulong dspClockStart, + ulong dspClockEnd + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetFadePoints")] + public static partial Result ChannelGetFadePoints( + Channel channel, + uint* numPoints, + ulong* pointDspClock, + float* pointVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetDSP")] + public static partial Result ChannelGetDsp(Channel channel, int index, Dsp* dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_AddDSP")] + public static partial Result ChannelAddDsp(Channel channel, int index, Dsp dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_RemoveDSP")] + public static partial Result ChannelRemoveDsp(Channel channel, Dsp dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetNumDSPs")] + public static partial Result ChannelGetNumDsps(Channel channel, int* numDsps); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetDSPIndex")] + public static partial Result ChannelSetDspIndex(Channel channel, Dsp dsp, int index); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetDSPIndex")] + public static partial Result ChannelGetDspIndex(Channel channel, Dsp dsp, int* index); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DAttributes")] + public static partial Result ChannelSet3dAttributes(Channel channel, float3* pos, float3* vel); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DAttributes")] + public static partial Result ChannelGet3dAttributes(Channel channel, float3* pos, float3* vel); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DMinMaxDistance")] + public static partial Result ChannelSet3dMinMaxDistance( + Channel channel, + float minDistance, + float maxDistance + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DMinMaxDistance")] + public static partial Result ChannelGet3dMinMaxDistance( + Channel channel, + float* minDistance, + float* maxDistance + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DConeSettings")] + public static partial Result ChannelSet3dConeSettings( + Channel channel, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DConeSettings")] + public static partial Result ChannelGet3dConeSettings( + Channel channel, + float* insideConeAngle, + float* outsideConeAngle, + float* outsideVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DConeOrientation")] + public static partial Result ChannelSet3dConeOrientation(Channel channel, float3* orientation); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DConeOrientation")] + public static partial Result ChannelGet3dConeOrientation(Channel channel, float3* orientation); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DCustomRolloff")] + public static partial Result ChannelSet3dCustomRolloff(Channel channel, float3* points, int numPoints); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DCustomRolloff")] + public static partial Result ChannelGet3dCustomRolloff(Channel channel, float3** points, int* numPoints); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DOcclusion")] + public static partial Result ChannelSet3dOcclusion( + Channel channel, + float directOcclusion, + float reverbOcclusion + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DOcclusion")] + public static partial Result ChannelGet3dOcclusion( + Channel channel, + float* directOcclusion, + float* reverbOcclusion + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DSpread")] + public static partial Result ChannelSet3dSpread(Channel channel, float angle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DSpread")] + public static partial Result ChannelGet3dSpread(Channel channel, float* angle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DLevel")] + public static partial Result ChannelSet3dLevel(Channel channel, float level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DLevel")] + public static partial Result ChannelGet3dLevel(Channel channel, float* level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DDopplerLevel")] + public static partial Result ChannelSet3dDopplerLevel(Channel channel, float level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DDopplerLevel")] + public static partial Result ChannelGet3dDopplerLevel(Channel channel, float* level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Set3DDistanceFilter")] + public static partial Result ChannelSet3dDistanceFilter( + Channel channel, + Bool32 custom, + float customLevel, + float centerFreq + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_Get3DDistanceFilter")] + public static partial Result ChannelGet3dDistanceFilter( + Channel channel, + Bool32* custom, + float* customLevel, + float* centerFreq + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetUserData")] + public static partial Result ChannelSetUserData(Channel channel, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetUserData")] + public static partial Result ChannelGetUserData(Channel channel, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetFrequency")] + public static partial Result ChannelSetFrequency(Channel channel, float frequency); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetFrequency")] + public static partial Result ChannelGetFrequency(Channel channel, float* frequency); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetPriority")] + public static partial Result ChannelSetPriority(Channel channel, int priority); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetPriority")] + public static partial Result ChannelGetPriority(Channel channel, int* priority); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetPosition")] + public static partial Result ChannelSetPosition(Channel channel, uint position, TimeUnit posType); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetPosition")] + public static partial Result ChannelGetPosition(Channel channel, uint* position, TimeUnit posType); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetChannelGroup")] + public static partial Result ChannelSetChannelGroup(Channel channel, ChannelGroup channelGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetChannelGroup")] + public static partial Result ChannelGetChannelGroup(Channel channel, ChannelGroup* channelGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetLoopCount")] + public static partial Result ChannelSetLoopCount(Channel channel, int loopCount); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetLoopCount")] + public static partial Result ChannelGetLoopCount(Channel channel, int* loopCount); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_SetLoopPoints")] + public static partial Result ChannelSetLoopPoints( + Channel channel, + uint loopStart, + TimeUnit loopStartType, + uint loopEnd, + TimeUnit loopEndType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetLoopPoints")] + public static partial Result ChannelGetLoopPoints( + Channel channel, + uint* loopStart, + TimeUnit loopStartType, + uint* loopEnd, + TimeUnit loopEndType + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_IsVirtual")] + public static partial Result ChannelIsVirtual(Channel channel, Bool32* isVirtual); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetCurrentSound")] + public static partial Result ChannelGetCurrentSound(Channel channel, Sound* sound); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Channel_GetIndex")] + public static partial Result ChannelGetIndex(Channel channel, int* index); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetSystemObject")] + public static partial Result ChannelGroupGetSystemObject(ChannelGroup channelGroup, FmodSystem* system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Stop")] + public static partial Result ChannelGroupStop(ChannelGroup channelGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetPaused")] + public static partial Result ChannelGroupSetPaused(ChannelGroup channelGroup, Bool32 paused); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetPaused")] + public static partial Result ChannelGroupGetPaused(ChannelGroup channelGroup, Bool32* paused); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetVolume")] + public static partial Result ChannelGroupSetVolume(ChannelGroup channelGroup, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetVolume")] + public static partial Result ChannelGroupGetVolume(ChannelGroup channelGroup, float* volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetVolumeRamp")] + public static partial Result ChannelGroupSetVolumeRamp(ChannelGroup channelGroup, Bool32 ramp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetVolumeRamp")] + public static partial Result ChannelGroupGetVolumeRamp(ChannelGroup channelGroup, Bool32* ramp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetAudibility")] + public static partial Result ChannelGroupGetAudibility(ChannelGroup channelGroup, float* audibility); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetPitch")] + public static partial Result ChannelGroupSetPitch(ChannelGroup channelGroup, float pitch); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetPitch")] + public static partial Result ChannelGroupGetPitch(ChannelGroup channelGroup, float* pitch); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetMute")] + public static partial Result ChannelGroupSetMute(ChannelGroup channelGroup, Bool32 mute); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetMute")] + public static partial Result ChannelGroupGetMute(ChannelGroup channelGroup, Bool32* mute); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetReverbProperties")] + public static partial Result ChannelGroupSetReverbProperties( + ChannelGroup channelGroup, + int instance, + float wet + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetReverbProperties")] + public static partial Result ChannelGroupGetReverbProperties( + ChannelGroup channelGroup, + int instance, + float* wet + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetLowPassGain")] + public static partial Result ChannelGroupSetLowPassGain(ChannelGroup channelGroup, float gain); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetLowPassGain")] + public static partial Result ChannelGroupGetLowPassGain(ChannelGroup channelGroup, float* gain); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetMode")] + public static partial Result ChannelGroupSetMode(ChannelGroup channelGroup, Mode mode); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetMode")] + public static partial Result ChannelGroupGetMode(ChannelGroup channelGroup, Mode* mode); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetCallback")] + public static partial Result ChannelGroupSetCallback( + ChannelGroup channelGroup, + ChannelControlCallbackPtr callback + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_IsPlaying")] + public static partial Result ChannelGroupIsPlaying(ChannelGroup channelGroup, Bool32* isPlaying); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetPan")] + public static partial Result ChannelGroupSetPan(ChannelGroup channelGroup, float pan); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetMixLevelsOutput")] + public static partial Result ChannelGroupSetMixLevelsOutput( + ChannelGroup channelGroup, + float frontLeft, + float frontRight, + float center, + float lfe, + float surroundLeft, + float surroundRight, + float backLeft, + float backRight + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetMixLevelsInput")] + public static partial Result ChannelGroupSetMixLevelsInput( + ChannelGroup channelGroup, + float* levels, + int numLevels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetMixMatrix")] + public static partial Result ChannelGroupSetMixMatrix( + ChannelGroup channelGroup, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetMixMatrix")] + public static partial Result ChannelGroupGetMixMatrix( + ChannelGroup channelGroup, + float* matrix, + int* outChannels, + int* inChannels, + int inChannelHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetDSPClock")] + public static partial Result ChannelGroupGetDspClock( + ChannelGroup channelGroup, + ulong* dspClock, + ulong* parentClock + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetDelay")] + public static partial Result ChannelGroupSetDelay( + ChannelGroup channelGroup, + ulong dspClockStart, + ulong dspClockEnd, + Bool32 stopChannels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetDelay")] + public static partial Result ChannelGroupGetDelay( + ChannelGroup channelGroup, + ulong* dspClockStart, + ulong* dspClockEnd, + Bool32* stopChannels + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_AddFadePoint")] + public static partial Result ChannelGroupAddFadePoint( + ChannelGroup channelGroup, + ulong dspClock, + float volume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetFadePointRamp")] + public static partial Result ChannelGroupSetFadePointRamp( + ChannelGroup channelGroup, + ulong dspClock, + float volume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_RemoveFadePoints")] + public static partial Result ChannelGroupRemoveFadePoints( + ChannelGroup channelGroup, + ulong dspClockStart, + ulong dspClockEnd + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetFadePoints")] + public static partial Result ChannelGroupGetFadePoints( + ChannelGroup channelGroup, + uint* numPoints, + ulong* pointDspClock, + float* pointVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetDSP")] + public static partial Result ChannelGroupGetDsp(ChannelGroup channelGroup, int index, Dsp* dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_AddDSP")] + public static partial Result ChannelGroupAddDsp(ChannelGroup channelGroup, int index, Dsp dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_RemoveDSP")] + public static partial Result ChannelGroupRemoveDsp(ChannelGroup channelGroup, Dsp dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetNumDSPs")] + public static partial Result ChannelGroupGetNumDsps(ChannelGroup channelGroup, int* numDsps); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetDSPIndex")] + public static partial Result ChannelGroupSetDspIndex(ChannelGroup channelGroup, Dsp dsp, int index); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetDSPIndex")] + public static partial Result ChannelGroupGetDspIndex(ChannelGroup channelGroup, Dsp dsp, int* index); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DAttributes")] + public static partial Result ChannelGroupSet3dAttributes( + ChannelGroup channelGroup, + float3* pos, + float3* vel + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DAttributes")] + public static partial Result ChannelGroupGet3dAttributes( + ChannelGroup channelGroup, + float3* pos, + float3* vel + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DMinMaxDistance")] + public static partial Result ChannelGroupSet3dMinMaxDistance( + ChannelGroup channelGroup, + float minDistance, + float maxDistance + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DMinMaxDistance")] + public static partial Result ChannelGroupGet3dMinMaxDistance( + ChannelGroup channelGroup, + float* minDistance, + float* maxDistance + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DConeSettings")] + public static partial Result ChannelGroupSet3dConeSettings( + ChannelGroup channelGroup, + float insideConeAngle, + float outsideConeAngle, + float outsideVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DConeSettings")] + public static partial Result ChannelGroupGet3dConeSettings( + ChannelGroup channelGroup, + float* insideConeAngle, + float* outsideConeAngle, + float* outsideVolume + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DConeOrientation")] + public static partial Result ChannelGroupSet3dConeOrientation( + ChannelGroup channelGroup, + float3* orientation + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DConeOrientation")] + public static partial Result ChannelGroupGet3dConeOrientation( + ChannelGroup channelGroup, + float3* orientation + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DCustomRolloff")] + public static partial Result ChannelGroupSet3dCustomRolloff( + ChannelGroup channelGroup, + float3* points, + int numPoints + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DCustomRolloff")] + public static partial Result ChannelGroupGet3dCustomRolloff( + ChannelGroup channelGroup, + float3** points, + int* numPoints + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DOcclusion")] + public static partial Result ChannelGroupSet3dOcclusion( + ChannelGroup channelGroup, + float directOcclusion, + float reverbOcclusion + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DOcclusion")] + public static partial Result ChannelGroupGet3dOcclusion( + ChannelGroup channelGroup, + float* directOcclusion, + float* reverbOcclusion + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DSpread")] + public static partial Result ChannelGroupSet3dSpread(ChannelGroup channelGroup, float angle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DSpread")] + public static partial Result ChannelGroupGet3dSpread(ChannelGroup channelGroup, float* angle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DLevel")] + public static partial Result ChannelGroupSet3dLevel(ChannelGroup channelGroup, float level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DLevel")] + public static partial Result ChannelGroupGet3dLevel(ChannelGroup channelGroup, float* level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DDopplerLevel")] + public static partial Result ChannelGroupSet3dDopplerLevel(ChannelGroup channelGroup, float level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DDopplerLevel")] + public static partial Result ChannelGroupGet3dDopplerLevel(ChannelGroup channelGroup, float* level); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Set3DDistanceFilter")] + public static partial Result ChannelGroupSet3dDistanceFilter( + ChannelGroup channelGroup, + Bool32 custom, + float customLevel, + float centerFreq + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Get3DDistanceFilter")] + public static partial Result ChannelGroupGet3dDistanceFilter( + ChannelGroup channelGroup, + Bool32* custom, + float* customLevel, + float* centerFreq + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_SetUserData")] + public static partial Result ChannelGroupSetUserData(ChannelGroup channelGroup, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetUserData")] + public static partial Result ChannelGroupGetUserData(ChannelGroup channelGroup, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_Release")] + public static partial Result ChannelGroupRelease(ChannelGroup channelGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_AddGroup")] + public static partial Result ChannelGroupAddGroup( + ChannelGroup channelGroup, + ChannelGroup group, + Bool32 propagateDspClock, + DspConnection* connection + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetNumGroups")] + public static partial Result ChannelGroupGetNumGroups(ChannelGroup channelGroup, int* numGroups); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetGroup")] + public static partial Result ChannelGroupGetGroup( + ChannelGroup channelGroup, + int index, + ChannelGroup* group + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetParentGroup")] + public static partial Result ChannelGroupGetParentGroup(ChannelGroup channelGroup, ChannelGroup* group); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetName")] + public static partial Result ChannelGroupGetName(ChannelGroup channelGroup, byte* name, int nameLen); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetNumChannels")] + public static partial Result ChannelGroupGetNumChannels(ChannelGroup channelGroup, int* numChannels); + + [LibraryImport("fmod", EntryPoint = "FMOD5_ChannelGroup_GetChannel")] + public static partial Result ChannelGroupGetChannel(ChannelGroup channelGroup, int index, Channel* channel); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_Release")] + public static partial Result SoundGroupRelease(SoundGroup soundGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetSystemObject")] + public static partial Result SoundGroupGetSystemObject(SoundGroup soundGroup, FmodSystem* system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_SetMaxAudible")] + public static partial Result SoundGroupSetMaxAudible(SoundGroup soundGroup, int maxAudible); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetMaxAudible")] + public static partial Result SoundGroupGetMaxAudible(SoundGroup soundGroup, int* maxAudible); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_SetMaxAudibleBehavior")] + public static partial Result SoundGroupSetMaxAudibleBehavior( + SoundGroup soundGroup, + SoundGroupBehavior behavior + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetMaxAudibleBehavior")] + public static partial Result SoundGroupGetMaxAudibleBehavior( + SoundGroup soundGroup, + SoundGroupBehavior* behavior + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_SetMuteFadeSpeed")] + public static partial Result SoundGroupSetMuteFadeSpeed(SoundGroup soundGroup, float speed); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetMuteFadeSpeed")] + public static partial Result SoundGroupGetMuteFadeSpeed(SoundGroup soundGroup, float* speed); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_SetVolume")] + public static partial Result SoundGroupSetVolume(SoundGroup soundGroup, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetVolume")] + public static partial Result SoundGroupGetVolume(SoundGroup soundGroup, float* volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_Stop")] + public static partial Result SoundGroupStop(SoundGroup soundGroup); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetName")] + public static partial Result SoundGroupGetName(SoundGroup soundGroup, byte* name, int nameLen); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetNumSounds")] + public static partial Result SoundGroupGetNumSounds(SoundGroup soundGroup, int* numSounds); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetSound")] + public static partial Result SoundGroupGetSound(SoundGroup soundGroup, int index, Sound* sound); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetNumPlaying")] + public static partial Result SoundGroupGetNumPlaying(SoundGroup soundGroup, int* numPlaying); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_SetUserData")] + public static partial Result SoundGroupSetUserData(SoundGroup soundGroup, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_SoundGroup_GetUserData")] + public static partial Result SoundGroupGetUserData(SoundGroup soundGroup, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_Release")] + public static partial Result DspRelease(Dsp dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetSystemObject")] + public static partial Result DspGetSystemObject(Dsp dsp, FmodSystem* system); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_AddInput")] + public static partial Result DspAddInput( + Dsp dsp, + Dsp input, + DspConnection* connection, + DspConnectionType type + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_DisconnectFrom")] + public static partial Result DspDisconnectFrom(Dsp dsp, Dsp target, DspConnection connection); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_DisconnectAll")] + public static partial Result DspDisconnectAll(Dsp dsp, Bool32 inputS, Bool32 outputS); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetNumInputs")] + public static partial Result DspGetNumInputs(Dsp dsp, int* numInputS); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetNumOutputs")] + public static partial Result DspGetNumOutputs(Dsp dsp, int* numOutputS); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetInput")] + public static partial Result DspGetInput(Dsp dsp, int index, Dsp* input, DspConnection* inputConnection); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetOutput")] + public static partial Result DspGetOutput(Dsp dsp, int index, Dsp* output, DspConnection* outputConnection); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetActive")] + public static partial Result DspSetActive(Dsp dsp, Bool32 active); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetActive")] + public static partial Result DspGetActive(Dsp dsp, Bool32* active); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetBypass")] + public static partial Result DspSetBypass(Dsp dsp, Bool32 bypass); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetBypass")] + public static partial Result DspGetBypass(Dsp dsp, Bool32* bypass); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetWetDryMix")] + public static partial Result DspSetWetDryMix(Dsp dsp, float preWet, float postWet, float dry); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetWetDryMix")] + public static partial Result DspGetWetDryMix(Dsp dsp, float* preWet, float* postWet, float* dry); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetChannelFormat")] + public static partial Result DspSetChannelFormat( + Dsp dsp, + ChannelMask channelMask, + int numChannels, + SpeakerMode sourceSpeakerMode + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetChannelFormat")] + public static partial Result DspGetChannelFormat( + Dsp dsp, + ChannelMask* channelMask, + int* numChannels, + SpeakerMode* sourceSpeakerMode + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetOutputChannelFormat")] + public static partial Result DspGetOutputChannelFormat( + Dsp dsp, + ChannelMask inMask, + int inChannels, + SpeakerMode inSpeakerMode, + ChannelMask* outMask, + int* outChannels, + SpeakerMode* outSpeakerMode + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_Reset")] + public static partial Result DspReset(Dsp dsp); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetCallback")] + public static partial Result DspSetCallback(Dsp dsp, DspCallbackPtr callback); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetParameterFloat")] + public static partial Result DspSetParameterFloat(Dsp dsp, int index, float value); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetParameterInt")] + public static partial Result DspSetParameterInt(Dsp dsp, int index, int value); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetParameterBool")] + public static partial Result DspSetParameterBool(Dsp dsp, int index, Bool32 value); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetParameterData")] + public static partial Result DspSetParameterData(Dsp dsp, int index, nint data, uint length); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetParameterFloat")] + public static partial Result DspGetParameterFloat( + Dsp dsp, + int index, + float* value, + byte* valuesTr, + int valuesTrlen + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetParameterInt")] + public static partial Result DspGetParameterInt( + Dsp dsp, + int index, + int* value, + byte* valuesTr, + int valuesTrlen + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetParameterBool")] + public static partial Result DspGetParameterBool( + Dsp dsp, + int index, + Bool32* value, + byte* valuesTr, + int valuesTrlen + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetParameterData")] + public static partial Result DspGetParameterData( + Dsp dsp, + int index, + nint* data, + uint* length, + byte* valuesTr, + int valuesTrlen + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetNumParameters")] + public static partial Result DspGetNumParameters(Dsp dsp, int* numParams); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetParameterInfo")] + public static partial Result DspGetParameterInfo(Dsp dsp, int index, DspParameterDesc** desc); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetDataParameterIndex")] + public static partial Result DspGetDataParameterIndex(Dsp dsp, int dataType, int* index); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_ShowConfigDialog")] + public static partial Result DspShowConfigDialog(Dsp dsp, nint hwnd, Bool32 show); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetInfo")] + public static partial Result DspGetInfo( + Dsp dsp, + byte* name, + uint* version, + int* channels, + int* configWidth, + int* configHeight + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetType")] + public static partial Result DspGetType(Dsp dsp, DspType* type); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetIdle")] + public static partial Result DspGetIdle(Dsp dsp, Bool32* idle); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetUserData")] + public static partial Result DspSetUserData(Dsp dsp, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetUserData")] + public static partial Result DspGetUserData(Dsp dsp, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_SetMeteringEnabled")] + public static partial Result DspSetMeteringEnabled(Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetMeteringEnabled")] + public static partial Result DspGetMeteringEnabled(Dsp dsp, Bool32* inputEnabled, Bool32* outputEnabled); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetMeteringInfo")] + public static partial Result DspGetMeteringInfo( + Dsp dsp, + DspMeteringInfo* inputInfo, + DspMeteringInfo* outputInfo + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSP_GetCPUUsage")] + public static partial Result DspGetCpuUsage(Dsp dsp, uint* exclusive, uint* inclusive); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_GetInput")] + public static partial Result DspConnectionGetInput(DspConnection dspConnection, Dsp* input); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_GetOutput")] + public static partial Result DspConnectionGetOutput(DspConnection dspConnection, Dsp* output); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_SetMix")] + public static partial Result DspConnectionSetMix(DspConnection dspConnection, float volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_GetMix")] + public static partial Result DspConnectionGetMix(DspConnection dspConnection, float* volume); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_SetMixMatrix")] + public static partial Result DspConnectionSetMixMatrix( + DspConnection dspConnection, + float* matrix, + int outChannels, + int inChannels, + int inChannelHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_GetMixMatrix")] + public static partial Result DspConnectionGetMixMatrix( + DspConnection dspConnection, + float* matrix, + int* outChannels, + int* inChannels, + int inChannelHop + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_GetType")] + public static partial Result DspConnectionGetType(DspConnection dspConnection, DspConnectionType* type); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_SetUserData")] + public static partial Result DspConnectionSetUserData(DspConnection dspConnection, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_DSPConnection_GetUserData")] + public static partial Result DspConnectionGetUserData(DspConnection dspConnection, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_Release")] + public static partial Result GeometryRelease(Geometry geometry); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_AddPolygon")] + public static partial Result GeometryAddPolygon( + Geometry geometry, + float directOcclusion, + float reverbOcclusion, + Bool32 doubleSided, + int numVertices, + float3* vertices, + int* polygonIndex + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetNumPolygons")] + public static partial Result GeometryGetNumPolygons(Geometry geometry, int* numPolygons); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetMaxPolygons")] + public static partial Result GeometryGetMaxPolygons(Geometry geometry, int* maxPolygons, int* maxVertices); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetPolygonNumVertices")] + public static partial Result GeometryGetPolygonNumVertices(Geometry geometry, int index, int* numVertices); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetPolygonVertex")] + public static partial Result GeometrySetPolygonVertex( + Geometry geometry, + int index, + int vertexIndex, + float3* vertex + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetPolygonVertex")] + public static partial Result GeometryGetPolygonVertex( + Geometry geometry, + int index, + int vertexIndex, + float3* vertex + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetPolygonAttributes")] + public static partial Result GeometrySetPolygonAttributes( + Geometry geometry, + int index, + float directOcclusion, + float reverbOcclusion, + Bool32 doubleSided + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetPolygonAttributes")] + public static partial Result GeometryGetPolygonAttributes( + Geometry geometry, + int index, + float* directOcclusion, + float* reverbOcclusion, + Bool32* doubleSided + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetActive")] + public static partial Result GeometrySetActive(Geometry geometry, Bool32 active); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetActive")] + public static partial Result GeometryGetActive(Geometry geometry, Bool32* active); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetRotation")] + public static partial Result GeometrySetRotation(Geometry geometry, float3* forward, float3* up); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetRotation")] + public static partial Result GeometryGetRotation(Geometry geometry, float3* forward, float3* up); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetPosition")] + public static partial Result GeometrySetPosition(Geometry geometry, float3* position); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetPosition")] + public static partial Result GeometryGetPosition(Geometry geometry, float3* position); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetScale")] + public static partial Result GeometrySetScale(Geometry geometry, float3* scale); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetScale")] + public static partial Result GeometryGetScale(Geometry geometry, float3* scale); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_Save")] + public static partial Result GeometrySave(Geometry geometry, nint data, int* dataSize); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_SetUserData")] + public static partial Result GeometrySetUserData(Geometry geometry, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Geometry_GetUserData")] + public static partial Result GeometryGetUserData(Geometry geometry, nint* userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_Release")] + public static partial Result Reverb3dRelease(Reverb3d reverb3d); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_Set3DAttributes")] + public static partial Result Reverb3dSet3dAttributes( + Reverb3d reverb3d, + float3* position, + float minDistance, + float maxDistance + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_Get3DAttributes")] + public static partial Result Reverb3dGet3dAttributes( + Reverb3d reverb3d, + float3* position, + float* minDistance, + float* maxDistance + ); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_SetProperties")] + public static partial Result Reverb3dSetProperties(Reverb3d reverb3d, ReverbProperties* properties); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_GetProperties")] + public static partial Result Reverb3dGetProperties(Reverb3d reverb3d, ReverbProperties* properties); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_SetActive")] + public static partial Result Reverb3dSetActive(Reverb3d reverb3d, Bool32 active); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_GetActive")] + public static partial Result Reverb3dGetActive(Reverb3d reverb3d, Bool32* active); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_SetUserData")] + public static partial Result Reverb3dSetUserData(Reverb3d reverb3d, nint userData); + + [LibraryImport("fmod", EntryPoint = "FMOD5_Reverb3D_GetUserData")] + public static partial Result Reverb3dGetUserData(Reverb3d reverb3d, nint* userData); + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/ResultExtensions.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/ResultExtensions.gen.cs new file mode 100644 index 0000000..5ceb1cb --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/ResultExtensions.gen.cs @@ -0,0 +1,133 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + public static partial class ResultExtensions + { + /// + /// + /// Returns the description of a Result error code, as defined by fmod_errors.h in the FMOD SDK. + /// + /// + public static string GetErrorString(this Result result) => + result switch + { + Result.Ok => "No errors.", + Result.ErrBadCommand => + "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound.Lock on a streaming sound).", + Result.ErrChannelAlloc => "Error trying to allocate a channel.", + Result.ErrChannelStolen => "The specified channel has been reused to play another sound.", + Result.ErrDma => "DMA Failure. See debug output for more information.", + Result.ErrDspConnection => + "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts.", + Result.ErrDspDontProcess => + "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph.", + Result.ErrDspFormat => + "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.", + Result.ErrDspInUse => + "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released.", + Result.ErrDspNotFound => "DSP connection error. Couldn't find the DSP unit specified.", + Result.ErrDspReserved => + "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.", + Result.ErrDspSilence => + "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph.", + Result.ErrDspType => "DSP operation cannot be performed on a DSP of this type.", + Result.ErrFileBad => "Error loading file.", + Result.ErrFileCouldNotSeek => + "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.", + Result.ErrFileDiskEjected => "Media was ejected while reading.", + Result.ErrFileEof => + "End of file unexpectedly reached while trying to read essential data (truncated?).", + Result.ErrFileEndOfData => "End of current chunk reached while trying to read data.", + Result.ErrFileNotFound => "File not found.", + Result.ErrFormat => "Unsupported file or audio format.", + Result.ErrHeaderMismatch => + "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library.", + Result.ErrHttp => "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.", + Result.ErrHttpAccess => "The specified resource requires authentication or is forbidden.", + Result.ErrHttpProxyAuth => "Proxy authentication is required to access the specified resource.", + Result.ErrHttpServerError => "A HTTP server error occurred.", + Result.ErrHttpTimeOut => "The HTTP request timed out.", + Result.ErrInitialization => "FMOD was not initialized correctly to support this function.", + Result.ErrInitialized => "Cannot call this command after FmodSystem.Init.", + Result.ErrInternal => + "An error occured in the FMOD system. Use the logging version of FMOD for more information.", + Result.ErrInvalidFloat => "Value passed in was a NaN, Inf or denormalized float.", + Result.ErrInvalidHandle => "An invalid object handle was used.", + Result.ErrInvalidParam => "An invalid parameter was passed to this function.", + Result.ErrInvalidPosition => "An invalid seek position was passed to this function.", + Result.ErrInvalidSpeaker => + "An invalid speaker was passed to this function based on the current speaker mode.", + Result.ErrInvalidSyncPoint => "The syncpoint did not come from this sound handle.", + Result.ErrInvalidThread => "Tried to call a function on a thread that is not supported.", + Result.ErrInvalidVector => "The vectors passed in are not unit length, or perpendicular.", + Result.ErrMaxAudible => "Reached maximum audible playback count for this sound's soundgroup.", + Result.ErrMemory => "Not enough memory or resources.", + Result.ErrMemoryCantPoint => + "Can't use Mode.OpenMemoryPoint on non PCM source data, or non mp3/xma/adpcm data if Mode.CreateCompressedSample was used.", + Result.ErrNeeds3d => "Tried to call a command on a 2d sound when the command was meant for 3d sound.", + Result.ErrNeedsHardware => "Tried to use a feature that requires hardware support.", + Result.ErrNetConnect => "Couldn't connect to the specified host.", + Result.ErrNetSocketError => + "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.", + Result.ErrNetUrl => "The specified URL couldn't be resolved.", + Result.ErrNetWouldBlock => "Operation on a non-blocking socket could not complete immediately.", + Result.ErrNotReady => + "Operation could not be performed because specified sound/DSP connection is not ready.", + Result.ErrOutputAllocated => + "Error initializing output device, but more specifically, the output device is already in use and cannot be reused.", + Result.ErrOutputCreateBuffer => "Error creating hardware sound buffer.", + Result.ErrOutputDriverCall => + "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.", + Result.ErrOutputFormat => "Soundcard does not support the specified format.", + Result.ErrOutputInit => "Error initializing output device.", + Result.ErrOutputNoDrivers => + "The output device has no drivers installed. If pre-init, OutputType.NoSound is selected as the output mode. If post-init, the function just fails.", + Result.ErrPlugin => "An unspecified error has been returned from a plugin.", + Result.ErrPluginMissing => "A requested output, dsp unit type or codec was not available.", + Result.ErrPluginResource => + "A resource that the plugin requires cannot be allocated or found. (ie the DLS file for MIDI playback)", + Result.ErrPluginVersion => "A plugin was built with an unsupported SDK version.", + Result.ErrRecord => "An error occurred trying to initialize the recording device.", + Result.ErrReverbChannelGroup => + "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection.", + Result.ErrReverbInstance => + "Specified instance in ReverbProperties couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist.", + Result.ErrSubSounds => + "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound.", + Result.ErrSubSoundAllocated => + "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first.", + Result.ErrSubSoundCantMove => + "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.", + Result.ErrTagNotFound => "The specified tag could not be found or there are no tags.", + Result.ErrTooManyChannels => + "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in FmodSystem.SetSoftwareFormat.", + Result.ErrTruncated => + "The retrieved string is too long to fit in the supplied buffer and has been truncated.", + Result.ErrUnimplemented => + "Something in FMOD hasn't been implemented when it should be. Contact support.", + Result.ErrUninitialized => + "This command failed because FmodSystem.Init or FmodSystem.SetDriver was not called.", + Result.ErrUnsupported => + "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.", + Result.ErrVersion => "The version number of this file format is not supported.", + Result.ErrEventAlreadyLoaded => "The specified bank has already been loaded.", + Result.ErrEventLiveUpdateBusy => + "The live update connection failed due to the game already being connected.", + Result.ErrEventLiveUpdateMismatch => + "The live update connection failed due to the game data being out of sync with the tool.", + Result.ErrEventLiveUpdateTimeOut => "The live update connection timed out.", + Result.ErrEventNotFound => "The requested event, parameter, bus or vca could not be found.", + Result.ErrStudioUninitialized => "The FmodStudioSystem object is not yet initialized.", + Result.ErrStudioNotLoaded => "The specified resource is not loaded, so it can't be unloaded.", + Result.ErrInvalidString => "An invalid string was passed to this function.", + Result.ErrAlreadyLocked => "The specified resource is already locked.", + Result.ErrNotLocked => "The specified resource is not locked, so it can't be unlocked.", + Result.ErrRecordDisconnected => "The specified recording driver has been disconnected.", + Result.ErrTooManySamples => "The length provided exceeds the allowable limit.", + _ => "Unknown error.", + }; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/AdvancedSettings.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/AdvancedSettings.gen.cs new file mode 100644 index 0000000..62fd89d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/AdvancedSettings.gen.cs @@ -0,0 +1,88 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Advanced configuration settings. + /// + /// + /// Structure to allow configuration of lesser used system level settings. These tweaks generally allow the user + /// to set resource limits and customize settings to better fit their application. + /// + /// + /// FMOD_ADVANCEDSETTINGS + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct AdvancedSettings + { + [FieldOffset(0)] + public int CbSize; + + [FieldOffset(4)] + public int MaxMpegCodecs; + + [FieldOffset(8)] + public int MaxAdpcmCodecs; + + [FieldOffset(12)] + public int MaxXmaCodecs; + + [FieldOffset(16)] + public int MaxVorbisCodecs; + + [FieldOffset(20)] + public int MaxAt9Codecs; + + [FieldOffset(24)] + public int MaxFadpcmCodecs; + + [FieldOffset(28)] + public int MaxOpusCodecs; + + [FieldOffset(32)] + public int AsioNumChannels; + + [FieldOffset(40)] + public byte** AsioChannelList; + + [FieldOffset(48)] + public Speaker* AsioSpeakerList; + + [FieldOffset(56)] + public float Vol0VirtualVol; + + [FieldOffset(60)] + public uint DefaultDecodeBufferSize; + + [FieldOffset(64)] + public ushort ProfilePort; + + [FieldOffset(68)] + public uint GeometryMaxFadeTime; + + [FieldOffset(72)] + public float DistanceFilterCenterFreq; + + [FieldOffset(76)] + public int Reverb3dinstance; + + [FieldOffset(80)] + public int DspBufferPoolSize; + + [FieldOffset(84)] + public DspResampler ResamplerMethod; + + [FieldOffset(88)] + public uint RandomSeed; + + [FieldOffset(92)] + public int MaxConvolutionThreads; + + [FieldOffset(96)] + public int MaxSpatialObjects; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/AsyncReadInfo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/AsyncReadInfo.gen.cs new file mode 100644 index 0000000..48adf89 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/AsyncReadInfo.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Information about a single asynchronous file operation. + /// + /// + /// FMOD_ASYNCREADINFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct AsyncReadInfo + { + [FieldOffset(0)] + public nint Handle; + + [FieldOffset(8)] + public uint Offset; + + [FieldOffset(12)] + public uint SizeBytes; + + [FieldOffset(16)] + public int Priority; + + [FieldOffset(24)] + public nint UserData; + + [FieldOffset(32)] + public nint Buffer; + + [FieldOffset(40)] + public uint BytesRead; + + [FieldOffset(48)] + public FileAsyncDoneFuncPtr Done; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/Attributes3d.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/Attributes3d.gen.cs new file mode 100644 index 0000000..a16ac41 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/Attributes3d.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Structure describing a position, velocity and orientation. + /// + /// + /// FMOD_3D_ATTRIBUTES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct Attributes3d + { + [FieldOffset(0)] + public float3 Position; + + [FieldOffset(12)] + public float3 Velocity; + + [FieldOffset(24)] + public float3 Forward; + + [FieldOffset(36)] + public float3 Up; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecDescription.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecDescription.gen.cs new file mode 100644 index 0000000..4943131 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecDescription.gen.cs @@ -0,0 +1,61 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Codec description. + /// + /// + /// This description structure allows the plug-in writer to define all functionality required for a user-defined + /// codec. + /// + /// + /// FMOD_CODEC_DESCRIPTION + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct CodecDescription + { + [FieldOffset(0)] + public uint ApiVersion; + + [FieldOffset(8)] + public byte* Name; + + [FieldOffset(16)] + public uint Version; + + [FieldOffset(20)] + public int DefaultAsstream; + + [FieldOffset(24)] + public TimeUnit TimeUnits; + + [FieldOffset(32)] + public CodecOpenCallbackPtr Open; + + [FieldOffset(40)] + public CodecCloseCallbackPtr Close; + + [FieldOffset(48)] + public CodecReadCallbackPtr Read; + + [FieldOffset(56)] + public CodecGetLengthCallbackPtr GetLength; + + [FieldOffset(64)] + public CodecSetPositionCallbackPtr SetPosition; + + [FieldOffset(72)] + public CodecGetPositionCallbackPtr GetPosition; + + [FieldOffset(80)] + public CodecSoundCreateCallbackPtr SoundCreate; + + [FieldOffset(88)] + public CodecGetWaveFormatCallbackPtr GetWaveFormat; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecState.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecState.gen.cs new file mode 100644 index 0000000..2373aba --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecState.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Codec state structure that is passed into each callback. + /// + /// + /// FMOD_CODEC_STATE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct CodecState + { + [FieldOffset(0)] + public nint PluginData; + + [FieldOffset(8)] + public CodecWaveFormat* WaveFormat; + + [FieldOffset(16)] + public CodecStateFunctions* Functions; + + [FieldOffset(24)] + public int NumSubSounds; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecStateFunctions.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecStateFunctions.gen.cs new file mode 100644 index 0000000..b376bc3 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecStateFunctions.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Struct containing functions to give plug-in developers the ability to query system state and access system + /// level functionality and helpers. + /// + /// + /// FMOD_CODEC_STATE_FUNCTIONS + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct CodecStateFunctions + { + [FieldOffset(0)] + public CodecMetadataFuncPtr Metadata; + + [FieldOffset(8)] + public CodecAllocFuncPtr Alloc; + + [FieldOffset(16)] + public CodecFreeFuncPtr Free; + + [FieldOffset(24)] + public CodecLogFuncPtr Log; + + [FieldOffset(32)] + public CodecFileReadFuncPtr Read; + + [FieldOffset(40)] + public CodecFileSeekFuncPtr Seek; + + [FieldOffset(48)] + public CodecFileTellFuncPtr Tell; + + [FieldOffset(56)] + public CodecFileSizeFuncPtr Size; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecWaveFormat.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecWaveFormat.gen.cs new file mode 100644 index 0000000..c574bf2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CodecWaveFormat.gen.cs @@ -0,0 +1,61 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Codec wave format. + /// + /// + /// This structure defines the attributes of a sound, and determines the format of the Sound object when it is + /// created with System::createSound or System::createStream + /// + /// + /// FMOD_CODEC_WAVEFORMAT + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct CodecWaveFormat + { + [FieldOffset(0)] + public byte* Name; + + [FieldOffset(8)] + public SoundFormat Format; + + [FieldOffset(12)] + public int Channels; + + [FieldOffset(16)] + public int Frequency; + + [FieldOffset(20)] + public uint LengthBytes; + + [FieldOffset(24)] + public uint LengthPcm; + + [FieldOffset(28)] + public uint PcmBlockSize; + + [FieldOffset(32)] + public int LoopStart; + + [FieldOffset(36)] + public int LoopEnd; + + [FieldOffset(40)] + public Mode Mode; + + [FieldOffset(44)] + public ChannelMask ChannelMask; + + [FieldOffset(48)] + public ChannelOrder ChannelOrder; + + [FieldOffset(52)] + public float PeakVolume; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/Complex.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/Complex.gen.cs new file mode 100644 index 0000000..f257786 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/Complex.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Complex number structure. + /// + /// + /// FMOD_COMPLEX + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct Complex + { + [FieldOffset(0)] + public float Real; + + [FieldOffset(4)] + public float Imag; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/CpuUsage.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CpuUsage.gen.cs new file mode 100644 index 0000000..6a1cb3c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CpuUsage.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Performance information for Core API functionality. + /// + /// + /// FMOD_CPU_USAGE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct CpuUsage + { + [FieldOffset(0)] + public float Dsp; + + [FieldOffset(4)] + public float Stream; + + [FieldOffset(8)] + public float Geometry; + + [FieldOffset(12)] + public float Update; + + [FieldOffset(16)] + public float Convolution1; + + [FieldOffset(20)] + public float Convolution2; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/CreateSoundExInfo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CreateSoundExInfo.gen.cs new file mode 100644 index 0000000..124cd7e --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/CreateSoundExInfo.gen.cs @@ -0,0 +1,126 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Additional options for creating a Sound. + /// + /// + /// FMOD_CREATESOUNDEXINFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 224)] + public unsafe partial struct CreateSoundExInfo + { + [FieldOffset(0)] + public int CbSize; + + [FieldOffset(4)] + public uint Length; + + [FieldOffset(8)] + public uint FileOffset; + + [FieldOffset(12)] + public int NumChannels; + + [FieldOffset(16)] + public int DefaultFrequency; + + [FieldOffset(20)] + public SoundFormat Format; + + [FieldOffset(24)] + public uint DecodeBufferSize; + + [FieldOffset(28)] + public int InitialSubSound; + + [FieldOffset(32)] + public int NumSubSounds; + + [FieldOffset(40)] + public int* InclusionList; + + [FieldOffset(48)] + public int InclusionListNum; + + [FieldOffset(56)] + public SoundPcmReadCallbackPtr PcmReadCallback; + + [FieldOffset(64)] + public SoundPcmSetPosCallbackPtr PcmSetPosCallback; + + [FieldOffset(72)] + public SoundNonBlockCallbackPtr NonBlockCallback; + + [FieldOffset(80)] + public byte* DlsName; + + [FieldOffset(88)] + public byte* EncryptionKey; + + [FieldOffset(96)] + public int MaxPolyphony; + + [FieldOffset(104)] + public nint UserData; + + [FieldOffset(112)] + public SoundType SuggestedSoundType; + + [FieldOffset(120)] + public FileOpenCallbackPtr FileUserOpen; + + [FieldOffset(128)] + public FileCloseCallbackPtr FileUserClose; + + [FieldOffset(136)] + public FileReadCallbackPtr FileUserRead; + + [FieldOffset(144)] + public FileSeekCallbackPtr FileUserSeek; + + [FieldOffset(152)] + public FileAsyncReadCallbackPtr FileUserAsyncRead; + + [FieldOffset(160)] + public FileAsyncCancelCallbackPtr FileUserAsyncCancel; + + [FieldOffset(168)] + public nint FileUserData; + + [FieldOffset(176)] + public int FileBufferSize; + + [FieldOffset(180)] + public ChannelOrder ChannelOrder; + + [FieldOffset(184)] + public SoundGroup InitialSoundGroup; + + [FieldOffset(192)] + public uint InitialSeekPosition; + + [FieldOffset(196)] + public TimeUnit InitialSeekPosType; + + [FieldOffset(200)] + public int IgnoreSetFileSystem; + + [FieldOffset(204)] + public uint AudioQueuePolicy; + + [FieldOffset(208)] + public uint MinMidiGranularity; + + [FieldOffset(212)] + public int NonBlockThreadId; + + [FieldOffset(216)] + public Guid* FsbGuid; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspBufferArray.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspBufferArray.gen.cs new file mode 100644 index 0000000..da28f4c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspBufferArray.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Structure for input and output buffers. + /// + /// + /// FMOD_DSP_BUFFER_ARRAY + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct DspBufferArray + { + [FieldOffset(0)] + public int NumBuffers; + + [FieldOffset(8)] + public int* BufferNumChannels; + + [FieldOffset(16)] + public ChannelMask* BufferChannelMask; + + [FieldOffset(24)] + public float** Buffers; + + [FieldOffset(32)] + public SpeakerMode SpeakerMode; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDataParameterInfo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDataParameterInfo.gen.cs new file mode 100644 index 0000000..703b1a2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDataParameterInfo.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Describes the value of a DSP's data parameter. + /// + /// + /// FMOD_DSP_DATA_PARAMETER_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct DspDataParameterInfo + { + [FieldOffset(0)] + public nint Data; + + [FieldOffset(8)] + public uint Length; + + [FieldOffset(12)] + public int Index; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDescription.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDescription.gen.cs new file mode 100644 index 0000000..b2536be --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspDescription.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// DSP description. + /// + /// + /// This description structure allows you to define all functionality required for a DSP unit when writing a DSP + /// plug-in. + /// + /// + /// FMOD_DSP_DESCRIPTION + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 216)] + public unsafe partial struct DspDescription + { + [FieldOffset(0)] + public uint PluginSdkVersion; + + [FieldOffset(4)] + public fixed byte Name[32]; + + [FieldOffset(36)] + public uint Version; + + [FieldOffset(40)] + public int NumInputBuffers; + + [FieldOffset(44)] + public int NumOutputBuffers; + + [FieldOffset(48)] + public DspCreateCallbackPtr Create; + + [FieldOffset(56)] + public DspReleaseCallbackPtr Release; + + [FieldOffset(64)] + public DspResetCallbackPtr Reset; + + [FieldOffset(72)] + public DspReadCallbackPtr Read; + + [FieldOffset(80)] + public DspProcessCallbackPtr Process; + + [FieldOffset(88)] + public DspSetPositionCallbackPtr SetPosition; + + [FieldOffset(96)] + public int NumParameters; + + [FieldOffset(104)] + public DspParameterDesc** ParamDesc; + + [FieldOffset(112)] + public DspSetParamFloatCallbackPtr SetParameterFloat; + + [FieldOffset(120)] + public DspSetParamIntCallbackPtr SetParameterInt; + + [FieldOffset(128)] + public DspSetParamBoolCallbackPtr SetParameterBool; + + [FieldOffset(136)] + public DspSetParamDataCallbackPtr SetParameterData; + + [FieldOffset(144)] + public DspGetParamFloatCallbackPtr GetParameterFloat; + + [FieldOffset(152)] + public DspGetParamIntCallbackPtr GetParameterInt; + + [FieldOffset(160)] + public DspGetParamBoolCallbackPtr GetParameterBool; + + [FieldOffset(168)] + public DspGetParamDataCallbackPtr GetParameterData; + + [FieldOffset(176)] + public DspShouldIProcessCallbackPtr ShouldIProcess; + + [FieldOffset(184)] + public nint UserData; + + [FieldOffset(192)] + public DspSystemRegisterCallbackPtr SysRegister; + + [FieldOffset(200)] + public DspSystemDeregisterCallbackPtr SysDeregister; + + [FieldOffset(208)] + public DspSystemMixCallbackPtr SysMix; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterInfoType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterInfoType.gen.cs new file mode 100644 index 0000000..0e6c24f --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterInfoType.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Loudness meter information data structure. + /// + /// + /// FMOD_DSP_LOUDNESS_METER_INFO_TYPE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 292)] + public unsafe partial struct DspLoudnessMeterInfoType + { + [FieldOffset(0)] + public float MomentaryLoudness; + + [FieldOffset(4)] + public float ShortTermLoudness; + + [FieldOffset(8)] + public float IntegratedLoudness; + + [FieldOffset(12)] + public float Loudness10thPercentile; + + [FieldOffset(16)] + public float Loudness95thPercentile; + + [FieldOffset(20)] + public fixed float LoudnessHistogram[66]; + + [FieldOffset(284)] + public float MaxTruePeak; + + [FieldOffset(288)] + public float MaxMomentaryLoudness; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterWeightingType.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterWeightingType.gen.cs new file mode 100644 index 0000000..afbdc93 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspLoudnessMeterWeightingType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Loudness meter channel weighting. + /// + /// + /// FMOD_DSP_LOUDNESS_METER_WEIGHTING_TYPE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 128)] + public unsafe partial struct DspLoudnessMeterWeightingType + { + [FieldOffset(0)] + public fixed float ChannelWeight[32]; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspMeteringInfo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspMeteringInfo.gen.cs new file mode 100644 index 0000000..82dabdf --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspMeteringInfo.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// DSP metering info. + /// + /// + /// FMOD_DSP_METERING_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 264)] + public unsafe partial struct DspMeteringInfo + { + [FieldOffset(0)] + public int NumSamples; + + [FieldOffset(4)] + public fixed float PeakLevel[32]; + + [FieldOffset(132)] + public fixed float RmsLevel[32]; + + [FieldOffset(260)] + public short NumChannels; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameter3dAttributes.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameter3dAttributes.gen.cs new file mode 100644 index 0000000..7fa113f --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameter3dAttributes.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// 3D attributes data structure. + /// + /// + /// FMOD_DSP_PARAMETER_3DATTRIBUTES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct DspParameter3dAttributes + { + [FieldOffset(0)] + public Attributes3d Relative; + + [FieldOffset(48)] + public Attributes3d Absolute; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterAttenuationRange.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterAttenuationRange.gen.cs new file mode 100644 index 0000000..51d6cef --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterAttenuationRange.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Attenuation range parameter data structure. + /// + /// + /// FMOD_DSP_PARAMETER_ATTENUATION_RANGE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct DspParameterAttenuationRange + { + [FieldOffset(0)] + public float Min; + + [FieldOffset(4)] + public float Max; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescBool.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescBool.gen.cs new file mode 100644 index 0000000..4c2e69f --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescBool.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Boolean parameter description. + /// + /// + /// FMOD_DSP_PARAMETER_DESC_BOOL + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct DspParameterDescBool + { + [FieldOffset(0)] + public Bool32 DefaultVal; + + [FieldOffset(8)] + public byte** ValueNames; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescData.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescData.gen.cs new file mode 100644 index 0000000..b13c8a4 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescData.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Data parameter description. + /// + /// + /// FMOD_DSP_PARAMETER_DESC_DATA + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct DspParameterDescData + { + [FieldOffset(0)] + public int DataType; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescFloat.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescFloat.gen.cs new file mode 100644 index 0000000..1d2bb2c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescFloat.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Float parameter description. + /// + /// + /// FMOD_DSP_PARAMETER_DESC_FLOAT + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct DspParameterDescFloat + { + [FieldOffset(0)] + public float Min; + + [FieldOffset(4)] + public float Max; + + [FieldOffset(8)] + public float DefaultVal; + + [FieldOffset(16)] + public DspParameterFloatMapping Mapping; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescInt.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescInt.gen.cs new file mode 100644 index 0000000..da9c726 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDescInt.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Integer parameter description. + /// + /// + /// FMOD_DSP_PARAMETER_DESC_INT + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct DspParameterDescInt + { + [FieldOffset(0)] + public int Min; + + [FieldOffset(4)] + public int Max; + + [FieldOffset(8)] + public int DefaultVal; + + [FieldOffset(12)] + public Bool32 GoesToInf; + + [FieldOffset(16)] + public byte** ValueNames; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDynamicResponse.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDynamicResponse.gen.cs new file mode 100644 index 0000000..5693eda --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterDynamicResponse.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Dynamic response data structure. + /// + /// + /// FMOD_DSP_PARAMETER_DYNAMIC_RESPONSE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 132)] + public unsafe partial struct DspParameterDynamicResponse + { + [FieldOffset(0)] + public int NumChannels; + + [FieldOffset(4)] + public fixed float Rms[32]; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMapping.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMapping.gen.cs new file mode 100644 index 0000000..03a4b3c --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMapping.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Structure to define a mapping for a DSP unit's float parameter. + /// + /// + /// FMOD_DSP_PARAMETER_FLOAT_MAPPING + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct DspParameterFloatMapping + { + [FieldOffset(0)] + public DspParameterFloatMappingType Type; + + [FieldOffset(8)] + public DspParameterFloatMappingPiecewiseLinear PiecewiseLinearMapping; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMappingPiecewiseLinear.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMappingPiecewiseLinear.gen.cs new file mode 100644 index 0000000..c1f7d29 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterFloatMappingPiecewiseLinear.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Structure to define a piecewise linear mapping. + /// + /// + /// FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct DspParameterFloatMappingPiecewiseLinear + { + [FieldOffset(0)] + public int NumPoints; + + [FieldOffset(8)] + public float* PointParamValues; + + [FieldOffset(16)] + public float* PointPositions; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterOverallGain.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterOverallGain.gen.cs new file mode 100644 index 0000000..a017fa2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterOverallGain.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Overall gain parameter data structure. + /// + /// + /// FMOD_DSP_PARAMETER_OVERALLGAIN + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct DspParameterOverallGain + { + [FieldOffset(0)] + public float LinearGain; + + [FieldOffset(4)] + public float LinearGainAdditive; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterSidechain.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterSidechain.gen.cs new file mode 100644 index 0000000..d321843 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspParameterSidechain.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Side chain parameter data structure. + /// + /// + /// FMOD_DSP_PARAMETER_SIDECHAIN + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct DspParameterSidechain + { + [FieldOffset(0)] + public Bool32 SidechainEnable; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspState.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspState.gen.cs new file mode 100644 index 0000000..e1187e6 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspState.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// DSP plug-in structure that is passed into each callback. + /// + /// + /// FMOD_DSP_STATE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct DspState + { + [FieldOffset(0)] + public nint Instance; + + [FieldOffset(8)] + public nint PluginData; + + [FieldOffset(16)] + public ChannelMask ChannelMask; + + [FieldOffset(20)] + public SpeakerMode SourceSpeakerMode; + + [FieldOffset(24)] + public float* SidechainData; + + [FieldOffset(32)] + public int SidechainChannels; + + [FieldOffset(40)] + public DspStateFunctions* Functions; + + [FieldOffset(48)] + public int SystemObject; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateDftFunctions.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateDftFunctions.gen.cs new file mode 100644 index 0000000..85202c0 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateDftFunctions.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Struct containing DFT functions to enable a plug-in to perform optimized time-frequency domain conversion. + /// + /// + /// FMOD_DSP_STATE_DFT_FUNCTIONS + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct DspStateDftFunctions + { + [FieldOffset(0)] + public DspDftFftRealFuncPtr FftReal; + + [FieldOffset(8)] + public DspDftIfftrealFuncPtr InverseFftReal; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateFunctions.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateFunctions.gen.cs new file mode 100644 index 0000000..c4c6724 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStateFunctions.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Struct containing functions to give plug-in developers the ability to query system state and access system + /// level functionality and helpers. + /// + /// + /// FMOD_DSP_STATE_FUNCTIONS + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct DspStateFunctions + { + [FieldOffset(0)] + public DspAllocFuncPtr Alloc; + + [FieldOffset(8)] + public DspReallocFuncPtr Realloc; + + [FieldOffset(16)] + public DspFreeFuncPtr Free; + + [FieldOffset(24)] + public DspGetSampleRateFuncPtr GetSampleRate; + + [FieldOffset(32)] + public DspGetBlockSizeFuncPtr GetBlockSize; + + [FieldOffset(40)] + public DspStateDftFunctions* Dft; + + [FieldOffset(48)] + public DspStatePanFunctions* Pan; + + [FieldOffset(56)] + public DspGetSpeakerModeFuncPtr GetSpeakerMode; + + [FieldOffset(64)] + public DspGetClockFuncPtr GetClock; + + [FieldOffset(72)] + public DspGetListenerAttributesFuncPtr GetListenerAttributes; + + [FieldOffset(80)] + public DspLogFuncPtr Log; + + [FieldOffset(88)] + public DspGetUserDataFuncPtr GetUserData; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStatePanFunctions.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStatePanFunctions.gen.cs new file mode 100644 index 0000000..86123b2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/DspStatePanFunctions.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Struct containing panning helper functions for spatialization plug-ins. + /// + /// + /// FMOD_DSP_STATE_PAN_FUNCTIONS + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct DspStatePanFunctions + { + [FieldOffset(0)] + public DspPanSumMonoMatrixFuncPtr SumMonoMatrix; + + [FieldOffset(8)] + public DspPanSumStereoMatrixFuncPtr SumStereoMatrix; + + [FieldOffset(16)] + public DspPanSumSurroundMatrixFuncPtr SumSurroundMatrix; + + [FieldOffset(24)] + public DspPanSumMonoToSurroundMatrixFuncPtr SumMonoToSurroundMatrix; + + [FieldOffset(32)] + public DspPanSumStereoToSurroundMatrixFuncPtr SumStereoToSurroundMatrix; + + [FieldOffset(40)] + public DspPanGetRolloffGainFuncPtr GetRolloffGain; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/ErrorCallbackInfo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/ErrorCallbackInfo.gen.cs new file mode 100644 index 0000000..568d695 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/ErrorCallbackInfo.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Information describing an error that has occurred. + /// + /// + /// FMOD_ERRORCALLBACK_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct ErrorCallbackInfo + { + [FieldOffset(0)] + public Result Result; + + [FieldOffset(4)] + public ErrorCallbackInstanceType InstanceType; + + [FieldOffset(8)] + public nint Instance; + + [FieldOffset(16)] + public byte* FunctionName; + + [FieldOffset(24)] + public byte* FunctionParams; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputDescription.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputDescription.gen.cs new file mode 100644 index 0000000..ef38ba7 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputDescription.gen.cs @@ -0,0 +1,82 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Output description. + /// + /// + /// This description structure allows the plug-in writer to define all functionality required for a user-defined + /// output device. + /// + /// + /// FMOD_OUTPUT_DESCRIPTION + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public unsafe partial struct OutputDescription + { + [FieldOffset(0)] + public uint ApiVersion; + + [FieldOffset(8)] + public byte* Name; + + [FieldOffset(16)] + public uint Version; + + [FieldOffset(20)] + public OutputMethod Method; + + [FieldOffset(24)] + public OutputGetNumDriversCallbackPtr GetNumDrivers; + + [FieldOffset(32)] + public OutputGetDriverInfoCallbackPtr GetDriverInfo; + + [FieldOffset(40)] + public OutputInitCallbackPtr Init; + + [FieldOffset(48)] + public OutputStartCallbackPtr Start; + + [FieldOffset(56)] + public OutputStopCallbackPtr Stop; + + [FieldOffset(64)] + public OutputCloseCallbackPtr Close; + + [FieldOffset(72)] + public OutputUpdateCallbackPtr Update; + + [FieldOffset(80)] + public OutputGetHandleCallbackPtr GetHandle; + + [FieldOffset(88)] + public OutputMixerCallbackPtr Mixer; + + [FieldOffset(96)] + public OutputObject3dGetInfoCallbackPtr Object3dGetInfo; + + [FieldOffset(104)] + public OutputObject3dAllocCallbackPtr Object3dAlloc; + + [FieldOffset(112)] + public OutputObject3dFreeCallbackPtr Object3dFree; + + [FieldOffset(120)] + public OutputObject3dUpdateCallbackPtr Object3dUpdate; + + [FieldOffset(128)] + public OutputOpenPortCallbackPtr OpenPort; + + [FieldOffset(136)] + public OutputClosePortCallbackPtr ClosePort; + + [FieldOffset(144)] + public OutputDeviceListChangedCallbackPtr DeviceListChanged; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputObject3dInfo.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputObject3dInfo.gen.cs new file mode 100644 index 0000000..78cbcef --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputObject3dInfo.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Output 3D Object Info. + /// + /// + /// FMOD_OUTPUT_OBJECT3DINFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct OutputObject3dInfo + { + [FieldOffset(0)] + public float* Buffer; + + [FieldOffset(8)] + public uint BufferLength; + + [FieldOffset(12)] + public float3 Position; + + [FieldOffset(24)] + public float Gain; + + [FieldOffset(28)] + public float Spread; + + [FieldOffset(32)] + public float Priority; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputState.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputState.gen.cs new file mode 100644 index 0000000..c9550d0 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/OutputState.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Output object state passed into every callback provides access to plug-in developers data and system + /// functionality. + /// + /// + /// FMOD_OUTPUT_STATE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct OutputState + { + [FieldOffset(0)] + public nint PluginData; + + [FieldOffset(8)] + public OutputReadFromMixerFuncPtr ReadFromMixer; + + [FieldOffset(16)] + public OutputAllocFuncPtr Alloc; + + [FieldOffset(24)] + public OutputFreeFuncPtr Free; + + [FieldOffset(32)] + public OutputLogFuncPtr Log; + + [FieldOffset(40)] + public OutputCopyPortFuncPtr CopyPort; + + [FieldOffset(48)] + public OutputRequestResetFuncPtr RequestReset; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/PluginList.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/PluginList.gen.cs new file mode 100644 index 0000000..1430111 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/PluginList.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Used to support lists of plug-ins within the one dynamic library. + /// + /// + /// FMOD_PLUGINLIST + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct PluginList + { + [FieldOffset(0)] + public PluginType Type; + + [FieldOffset(8)] + public nint Description; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/ReverbProperties.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/ReverbProperties.gen.cs new file mode 100644 index 0000000..3e028bb --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/ReverbProperties.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Structure defining a reverb environment. + /// + /// + /// FMOD_REVERB_PROPERTIES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct ReverbProperties + { + [FieldOffset(0)] + public float DecayTime; + + [FieldOffset(4)] + public float EarlyDelay; + + [FieldOffset(8)] + public float LateDelay; + + [FieldOffset(12)] + public float HfReference; + + [FieldOffset(16)] + public float HfDecayRatio; + + [FieldOffset(20)] + public float Diffusion; + + [FieldOffset(24)] + public float Density; + + [FieldOffset(28)] + public float LowShelfFrequency; + + [FieldOffset(32)] + public float LowShelfGain; + + [FieldOffset(36)] + public float HighCut; + + [FieldOffset(40)] + public float EarlyLateMix; + + [FieldOffset(44)] + public float WetLevel; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Generated/Structs/Tag.gen.cs b/Brutal.Fmod/FmodCoreApi/Generated/Structs/Tag.gen.cs new file mode 100644 index 0000000..6aa12b2 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Generated/Structs/Tag.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi +{ + /// + /// + /// Tag data / metadata description. + /// + /// + /// FMOD_TAG + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct Tag + { + [FieldOffset(0)] + public TagType Type; + + [FieldOffset(4)] + public TagDataType DataType; + + [FieldOffset(8)] + public byte* Name; + + [FieldOffset(16)] + public nint Data; + + [FieldOffset(24)] + public uint DataLen; + + [FieldOffset(28)] + public Bool32 Updated; + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/CallbackExtensions.cs b/Brutal.Fmod/FmodCoreApi/Manual/CallbackExtensions.cs new file mode 100644 index 0000000..a19778d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/CallbackExtensions.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi; + +public partial struct FileAsyncDoneFuncPtr +{ + public unsafe void Invoke(AsyncReadInfo* info, Result result) + { + if (_ptr == IntPtr.Zero) + return; + + var func = Marshal.GetDelegateForFunctionPointer(_ptr); + func(info, result); + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs b/Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs new file mode 100644 index 0000000..0c3be73 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs @@ -0,0 +1,9 @@ +namespace Brutal.FmodApi; + +public static partial class Fmod +{ + /// + /// The header version for this release of FMOD + /// + public const int VERSION = 0x00020308; /* 0xaaaabbcc -> aaaa = product version, bb = major version, cc = minor version.*/ +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/ResultExtensions.cs b/Brutal.Fmod/FmodCoreApi/Manual/ResultExtensions.cs new file mode 100644 index 0000000..7a4e5ca --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/ResultExtensions.cs @@ -0,0 +1,36 @@ +using System; + +namespace Brutal.FmodApi; + +/// +/// An exception thrown by a failed result assertion +/// +public class FmodResultException : Exception +{ + /// + /// Creates an exception for a failed result assertion + /// + /// The message that describes the failed result + public FmodResultException(string? message) + : base(message) { } +} + +/// +/// An extension library for the Result enum +/// +public static partial class ResultExtensions +{ + /// + /// Throws an exception if the Result does not equal Result.Ok + /// + /// The result code to check + /// + public static void Check(this Result result) + { + if (result != Result.Ok) + { + throw new FmodResultException($"{result.ToString()}: { + result.GetErrorString()}"); + } + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Structs/AdvancedSettings.cs b/Brutal.Fmod/FmodCoreApi/Manual/Structs/AdvancedSettings.cs new file mode 100644 index 0000000..356eb8d --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Structs/AdvancedSettings.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi; + +public partial struct AdvancedSettings +{ + /// + /// + /// + public unsafe AdvancedSettings() + { + CbSize = sizeof(AdvancedSettings); + } +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Structs/CreateSoundExInfo.cs b/Brutal.Fmod/FmodCoreApi/Manual/Structs/CreateSoundExInfo.cs new file mode 100644 index 0000000..73832bc --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Structs/CreateSoundExInfo.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi; + +public partial struct CreateSoundExInfo +{ + /// + /// + /// + public unsafe CreateSoundExInfo() + { + CbSize = sizeof(CreateSoundExInfo); + } + + public static CreateSoundExInfo Default => new(); +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameter3dAttributesMulti.cs b/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameter3dAttributesMulti.cs new file mode 100644 index 0000000..8878590 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameter3dAttributesMulti.cs @@ -0,0 +1,29 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi; + +public static partial class InlineArray +{ + [InlineArray(8)] + public struct Attributes3d8 + { + public Attributes3d Value; + } +} + +[StructLayout(LayoutKind.Explicit, Size = 468)] +public unsafe partial struct DspParameter3dAttributesMulti +{ + [FieldOffset(0)] + public int NumListeners; + + [FieldOffset(4)] + public InlineArray.Attributes3d8 Relative; + + [FieldOffset(388)] + public fixed float Weight[8]; + + [FieldOffset(420)] + public Attributes3d Absolute; +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterDesc.cs b/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterDesc.cs new file mode 100644 index 0000000..f7e2276 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterDesc.cs @@ -0,0 +1,31 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi; + +[StructLayout(LayoutKind.Explicit, Size = 96)] +public unsafe partial struct DspParameterDesc +{ + [FieldOffset(0)] + public DspParameterType Type; + + [FieldOffset(4)] + public fixed byte Name[16]; + + [FieldOffset(20)] + public fixed byte Label[16]; + + [FieldOffset(40)] + public byte* Description; + + [FieldOffset(48)] + public DspParameterDescFloat FloatDesc; + + [FieldOffset(48)] + public DspParameterDescInt IntDesc; + + [FieldOffset(48)] + public DspParameterDescBool BoolDesc; + + [FieldOffset(48)] + public DspParameterDescData DataDesc; +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterFft.cs b/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterFft.cs new file mode 100644 index 0000000..68fb0d0 --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Structs/DspParameterFft.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi; + +[StructLayout(LayoutKind.Explicit, Size = 264)] +public unsafe partial struct DspParameterFft +{ + [FieldOffset(0)] + public int Length; + + [FieldOffset(4)] + public int NumChannels; + + [FieldOffset(8)] + public fixed ulong Spectrum[32]; +} diff --git a/Brutal.Fmod/FmodCoreApi/Manual/Structs/ReverbProperties.cs b/Brutal.Fmod/FmodCoreApi/Manual/Structs/ReverbProperties.cs new file mode 100644 index 0000000..71a2dea --- /dev/null +++ b/Brutal.Fmod/FmodCoreApi/Manual/Structs/ReverbProperties.cs @@ -0,0 +1,485 @@ +namespace Brutal.FmodApi; + +public partial struct ReverbProperties +{ + /// + /// + /// + public static readonly ReverbProperties Off = new() + { + DecayTime = 1000, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 100, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 20, + EarlyLateMix = 96, + WetLevel = -80.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties Generic = new() + { + DecayTime = 1500, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 83, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 14500, + EarlyLateMix = 96, + WetLevel = -8.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties PaddedCell = new() + { + DecayTime = 170, + EarlyDelay = 1, + LateDelay = 2, + HfReference = 5000, + HfDecayRatio = 10, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 160, + EarlyLateMix = 84, + WetLevel = -7.8f, + }; + + /// + /// + /// + public static readonly ReverbProperties Room = new() + { + DecayTime = 400, + EarlyDelay = 2, + LateDelay = 3, + HfReference = 5000, + HfDecayRatio = 83, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 6050, + EarlyLateMix = 88, + WetLevel = -9.4f, + }; + + /// + /// + /// + public static readonly ReverbProperties Bathroom = new() + { + DecayTime = 1500, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 54, + Diffusion = 100, + Density = 60, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 2900, + EarlyLateMix = 83, + WetLevel = 0.5f, + }; + + /// + /// + /// + public static readonly ReverbProperties LivingRoom = new() + { + DecayTime = 500, + EarlyDelay = 3, + LateDelay = 4, + HfReference = 5000, + HfDecayRatio = 10, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 160, + EarlyLateMix = 58, + WetLevel = -19.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties StoneRoom = new() + { + DecayTime = 2300, + EarlyDelay = 12, + LateDelay = 17, + HfReference = 5000, + HfDecayRatio = 64, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 7800, + EarlyLateMix = 71, + WetLevel = -8.5f, + }; + + /// + /// + /// + public static readonly ReverbProperties Auditorium = new() + { + DecayTime = 4300, + EarlyDelay = 20, + LateDelay = 30, + HfReference = 5000, + HfDecayRatio = 59, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 5850, + EarlyLateMix = 64, + WetLevel = -11.7f, + }; + + /// + /// + /// + public static readonly ReverbProperties ConcertHall = new() + { + DecayTime = 3900, + EarlyDelay = 20, + LateDelay = 29, + HfReference = 5000, + HfDecayRatio = 70, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 5650, + EarlyLateMix = 80, + WetLevel = -9.8f, + }; + + /// + /// + /// + public static readonly ReverbProperties Cave = new() + { + DecayTime = 2900, + EarlyDelay = 15, + LateDelay = 22, + HfReference = 5000, + HfDecayRatio = 100, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 20000, + EarlyLateMix = 59, + WetLevel = -11.3f, + }; + + /// + /// + /// + public static readonly ReverbProperties Arena = new() + { + DecayTime = 7200, + EarlyDelay = 20, + LateDelay = 30, + HfReference = 5000, + HfDecayRatio = 33, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 4500, + EarlyLateMix = 80, + WetLevel = -9.6f, + }; + + /// + /// + /// + public static readonly ReverbProperties Hangar = new() + { + DecayTime = 10000, + EarlyDelay = 20, + LateDelay = 30, + HfReference = 5000, + HfDecayRatio = 23, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 3400, + EarlyLateMix = 72, + WetLevel = -7.4f, + }; + + /// + /// + /// + public static readonly ReverbProperties CarpettedHallway = new() + { + DecayTime = 300, + EarlyDelay = 2, + LateDelay = 30, + HfReference = 5000, + HfDecayRatio = 10, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 500, + EarlyLateMix = 56, + WetLevel = -24.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties Hallway = new() + { + DecayTime = 1500, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 59, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 7800, + EarlyLateMix = 87, + WetLevel = -5.5f, + }; + + /// + /// + /// + public static readonly ReverbProperties StoneCorridor = new() + { + DecayTime = 270, + EarlyDelay = 13, + LateDelay = 20, + HfReference = 5000, + HfDecayRatio = 79, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 9000, + EarlyLateMix = 86, + WetLevel = -6.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties Alley = new() + { + DecayTime = 1500, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 86, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 8300, + EarlyLateMix = 80, + WetLevel = -9.8f, + }; + + /// + /// + /// + public static readonly ReverbProperties Forest = new() + { + DecayTime = 1500, + EarlyDelay = 162, + LateDelay = 88, + HfReference = 5000, + HfDecayRatio = 54, + Diffusion = 79, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 760, + EarlyLateMix = 94, + WetLevel = -12.3f, + }; + + /// + /// + /// + public static readonly ReverbProperties City = new() + { + DecayTime = 1500, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 67, + Diffusion = 50, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 4050, + EarlyLateMix = 66, + WetLevel = -26.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties Mountains = new() + { + DecayTime = 1500, + EarlyDelay = 300, + LateDelay = 100, + HfReference = 5000, + HfDecayRatio = 21, + Diffusion = 27, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 1220, + EarlyLateMix = 82, + WetLevel = -24.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties Quarry = new() + { + DecayTime = 1500, + EarlyDelay = 61, + LateDelay = 25, + HfReference = 5000, + HfDecayRatio = 83, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 3400, + EarlyLateMix = 100, + WetLevel = -5.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties Plain = new() + { + DecayTime = 1500, + EarlyDelay = 179, + LateDelay = 100, + HfReference = 5000, + HfDecayRatio = 50, + Diffusion = 21, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 1670, + EarlyLateMix = 65, + WetLevel = -28.0f, + }; + + /// + /// + /// + public static readonly ReverbProperties ParkingLot = new() + { + DecayTime = 1700, + EarlyDelay = 8, + LateDelay = 12, + HfReference = 5000, + HfDecayRatio = 100, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 20000, + EarlyLateMix = 56, + WetLevel = -19.5f, + }; + + /// + /// + /// + public static readonly ReverbProperties SewerPipe = new() + { + DecayTime = 2800, + EarlyDelay = 14, + LateDelay = 21, + HfReference = 5000, + HfDecayRatio = 14, + Diffusion = 80, + Density = 60, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 3400, + EarlyLateMix = 66, + WetLevel = 1.2f, + }; + + /// + /// + /// + public static readonly ReverbProperties Underwater = new() + { + DecayTime = 1500, + EarlyDelay = 7, + LateDelay = 11, + HfReference = 5000, + HfDecayRatio = 10, + Diffusion = 100, + Density = 100, + LowShelfFrequency = 250, + LowShelfGain = 0, + HighCut = 500, + EarlyLateMix = 92, + WetLevel = 7.0f, + }; +} + +// #define FMOD_PRESET_OFF { 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f } +// #define FMOD_PRESET_GENERIC { 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f } +// #define FMOD_PRESET_PADDEDCELL { 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f } +// #define FMOD_PRESET_ROOM { 400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f } +// #define FMOD_PRESET_BATHROOM { 1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f } +// #define FMOD_PRESET_LIVINGROOM { 500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f } +// #define FMOD_PRESET_STONEROOM { 2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f } +// #define FMOD_PRESET_AUDITORIUM { 4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f } +// #define FMOD_PRESET_CONCERTHALL { 3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f } +// #define FMOD_PRESET_CAVE { 2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f } +// #define FMOD_PRESET_ARENA { 7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f } +// #define FMOD_PRESET_HANGAR { 10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f } +// #define FMOD_PRESET_CARPETTEDHALLWAY { 300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f } +// #define FMOD_PRESET_HALLWAY { 1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f } +// #define FMOD_PRESET_STONECORRIDOR { 270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f } +// #define FMOD_PRESET_ALLEY { 1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f } +// #define FMOD_PRESET_FOREST { 1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f } +// #define FMOD_PRESET_CITY { 1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f } +// #define FMOD_PRESET_MOUNTAINS { 1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f } +// #define FMOD_PRESET_QUARRY { 1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f } +// #define FMOD_PRESET_PLAIN { 1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f } +// #define FMOD_PRESET_PARKINGLOT { 1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f } +// #define FMOD_PRESET_SEWERPIPE { 2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f } +// #define FMOD_PRESET_UNDERWATER { 1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f } diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Callbacks.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Callbacks.gen.cs new file mode 100644 index 0000000..3d5c0b9 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Callbacks.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Callback for Studio system events. + /// + /// + /// FMOD_STUDIO_SYSTEM_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result StudioSystemCallback( + FmodStudioSystem system, + StudioSystemCallbackType type, + nint commandData, + nint userData + ); + + /// + /// + /// Callback that is fired when a Studio::EventInstance changes state. + /// + /// + /// FMOD_STUDIO_EVENT_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result EventCallback(EventCallbackType type, EventInstance eventDescription, nint parameters); + + /// + /// + /// Callback for when the command replay goes to the next frame. + /// + /// + /// FMOD_STUDIO_COMMANDREPLAY_FRAME_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate Result CommandReplayFrameCallback( + CommandReplay replay, + int commandIndex, + float currentTime, + nint userData + ); + + /// + /// + /// Callback for command replay bank loading. + /// + /// + /// FMOD_STUDIO_COMMANDREPLAY_LOAD_BANK_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CommandReplayLoadBankCallback( + CommandReplay replay, + int commandIndex, + Guid* bankGuid, + byte* bankFileName, + LoadBankFlags flags, + Bank* bank, + nint userData + ); + + /// + /// + /// Callback for command replay event instance creation. + /// + /// + /// FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate Result CommandReplayCreateInstanceCallback( + CommandReplay replay, + int commandIndex, + EventDescription eventDescription, + EventInstance* instance, + nint userData + ); + + /// + /// A wrapper for a function pointer to . + /// + public partial struct StudioSystemCallbackPtr(StudioSystemCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator StudioSystemCallbackPtr(StudioSystemCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct EventCallbackPtr(EventCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator EventCallbackPtr(EventCallback? @delegate) => new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CommandReplayFrameCallbackPtr(CommandReplayFrameCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CommandReplayFrameCallbackPtr(CommandReplayFrameCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CommandReplayLoadBankCallbackPtr(CommandReplayLoadBankCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CommandReplayLoadBankCallbackPtr(CommandReplayLoadBankCallback? @delegate) => + new(@delegate); + } + + /// + /// A wrapper for a function pointer to . + /// + public partial struct CommandReplayCreateInstanceCallbackPtr(CommandReplayCreateInstanceCallback? @delegate) + { + private nint _ptr = @delegate is null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(@delegate); + + public static implicit operator CommandReplayCreateInstanceCallbackPtr( + CommandReplayCreateInstanceCallback? @delegate + ) => new(@delegate); + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandCaptureFlags.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandCaptureFlags.gen.cs new file mode 100644 index 0000000..02e9ff0 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandCaptureFlags.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Flags controling command capture. + /// + /// + /// FMOD_STUDIO_COMMANDCAPTURE_FLAGS + /// + /// + [Flags] + public enum CommandCaptureFlags : uint + { + Normal = 0x00000000, + FileFlush = 0x00000001, + SkipInitialState = 0x00000002, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandReplayFlags.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandReplayFlags.gen.cs new file mode 100644 index 0000000..3b7b76d --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/CommandReplayFlags.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Flags controlling command replay. + /// + /// + /// FMOD_STUDIO_COMMANDREPLAY_FLAGS + /// + /// + [Flags] + public enum CommandReplayFlags : uint + { + Normal = 0x00000000, + SkipCleanup = 0x00000001, + FastForward = 0x00000002, + SkipBankLoad = 0x00000004, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/EventCallbackType.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/EventCallbackType.gen.cs new file mode 100644 index 0000000..bdb7146 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/EventCallbackType.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Studio event callback types. + /// + /// + /// FMOD_STUDIO_EVENT_CALLBACK_TYPE + /// + /// + [Flags] + public enum EventCallbackType : uint + { + Created = 0x00000001, + Destroyed = 0x00000002, + Starting = 0x00000004, + Started = 0x00000008, + Restarted = 0x00000010, + Stopped = 0x00000020, + StartFailed = 0x00000040, + CreateProgrammerSound = 0x00000080, + DestroyProgrammerSound = 0x00000100, + PluginCreated = 0x00000200, + PluginDestroyed = 0x00000400, + TimelineMarker = 0x00000800, + TimelineBeat = 0x00001000, + SoundPlayed = 0x00002000, + SoundStopped = 0x00004000, + RealToVirtual = 0x00008000, + VirtualToReal = 0x00010000, + StartEventCommand = 0x00020000, + NestedTimelineBeat = 0x00040000, + All = 0xFFFFFFFF, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/EventProperty.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/EventProperty.gen.cs new file mode 100644 index 0000000..89a7616 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/EventProperty.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// These definitions describe built-in event properties. + /// + /// + /// FMOD_STUDIO_EVENT_PROPERTY + /// + /// + public enum EventProperty + { + ChannelPriority, + ScheduleDelay, + ScheduleLookahead, + MinimumDistance, + MaximumDistance, + Cooldown, + Max, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/InstanceType.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/InstanceType.gen.cs new file mode 100644 index 0000000..9826efa --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/InstanceType.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Command replay command instance handle types. + /// + /// + /// FMOD_STUDIO_INSTANCETYPE + /// + /// + public enum InstanceType + { + None, + System, + EventDescription, + EventInstance, + ParameterInstance, + Bus, + Vca, + Bank, + CommandReplay, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadBankFlags.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadBankFlags.gen.cs new file mode 100644 index 0000000..1f043dd --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadBankFlags.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Flags for controlling bank loading. + /// + /// + /// FMOD_STUDIO_LOAD_BANK_FLAGS + /// + /// + [Flags] + public enum LoadBankFlags : uint + { + Normal = 0x00000000, + NonBlocking = 0x00000001, + DecompressSamples = 0x00000002, + Unencrypted = 0x00000004, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadMemoryMode.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadMemoryMode.gen.cs new file mode 100644 index 0000000..ebfbbfd --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadMemoryMode.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Specifies how to use the memory buffer passed to Studio::System::loadBankMemory. + /// + /// + /// FMOD_STUDIO_LOAD_MEMORY_MODE + /// + /// + public enum LoadMemoryMode + { + LoadMemory, + LoadMemoryPoint, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadingState.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadingState.gen.cs new file mode 100644 index 0000000..ea072aa --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/LoadingState.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Loading state of various objects. + /// + /// + /// FMOD_STUDIO_LOADING_STATE + /// + /// + public enum LoadingState + { + Unloading, + Unloaded, + Loading, + Loaded, + Error, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterFlags.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterFlags.gen.cs new file mode 100644 index 0000000..754823f --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterFlags.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Flags describing the behavior of a parameter. + /// + /// + /// FMOD_STUDIO_PARAMETER_FLAGS + /// + /// + [Flags] + public enum ParameterFlags : uint + { + ReadOnly = 0x00000001, + Automatic = 0x00000002, + Global = 0x00000004, + Discrete = 0x00000008, + Labeled = 0x00000010, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterType.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterType.gen.cs new file mode 100644 index 0000000..a8d955a --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/ParameterType.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Event parameter types. + /// + /// + /// FMOD_STUDIO_PARAMETER_TYPE + /// + /// + public enum ParameterType + { + GameControlled, + AutomaticDistance, + AutomaticEventConeAngle, + AutomaticEventOrientation, + AutomaticDirection, + AutomaticElevation, + AutomaticListenerOrientation, + AutomaticSpeed, + AutomaticSpeedAbsolute, + AutomaticDistanceNormalized, + Max, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/PlaybackState.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/PlaybackState.gen.cs new file mode 100644 index 0000000..7ba6241 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/PlaybackState.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Playback state of various objects. + /// + /// + /// FMOD_STUDIO_PLAYBACK_STATE + /// + /// + public enum PlaybackState + { + Playing, + Sustaining, + Stopped, + Starting, + Stopping, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/StopMode.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/StopMode.gen.cs new file mode 100644 index 0000000..6118ca7 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/StopMode.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Stop modes. + /// + /// + /// FMOD_STUDIO_STOP_MODE + /// + /// + public enum StopMode + { + AllowFadeout, + Immediate, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioInitFlags.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioInitFlags.gen.cs new file mode 100644 index 0000000..acc8c48 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioInitFlags.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Studio System initialization flags. + /// + /// + /// FMOD_STUDIO_INITFLAGS + /// + /// + [Flags] + public enum StudioInitFlags : uint + { + InitNormal = 0x00000000, + InitLiveUpdate = 0x00000001, + InitAllowMissingPlugins = 0x00000002, + InitSynchronousUpdate = 0x00000004, + InitDeferredCallbacks = 0x00000008, + InitLoadFromUpdate = 0x00000010, + InitMemoryTracking = 0x00000020, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioSystemCallbackType.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioSystemCallbackType.gen.cs new file mode 100644 index 0000000..382e86c --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/StudioSystemCallbackType.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Callback types for the Studio System callback. + /// + /// + /// FMOD_STUDIO_SYSTEM_CALLBACK_TYPE + /// + /// + [Flags] + public enum StudioSystemCallbackType : uint + { + SystemCallbackPreUpdate = 0x00000001, + SystemCallbackPostUpdate = 0x00000002, + SystemCallbackBankUnload = 0x00000004, + SystemCallbackLiveUpdateConnected = 0x00000008, + SystemCallbackLiveUpdateDisconnected = 0x00000010, + SystemCallbackAll = 0xFFFFFFFF, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Enums/UserPropertyType.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Enums/UserPropertyType.gen.cs new file mode 100644 index 0000000..d189f82 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Enums/UserPropertyType.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// User property types. + /// + /// + /// FMOD_STUDIO_USER_PROPERTY_TYPE + /// + /// + public enum UserPropertyType + { + Integer, + Boolean, + Float, + String, + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Handles.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Handles.gen.cs new file mode 100644 index 0000000..0527d05 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Handles.gen.cs @@ -0,0 +1,68 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Handle for a FMOD_STUDIO_SYSTEM. + /// + /// + [InteropHandle] + public readonly unsafe partial struct FmodStudioSystem { } + + /// + /// + /// Handle for a + /// FMOD_STUDIO_EVENTDESCRIPTION + /// . + /// + /// + [InteropHandle] + public readonly unsafe partial struct EventDescription { } + + /// + /// + /// Handle for a + /// FMOD_STUDIO_EVENTINSTANCE + /// . + /// + /// + [InteropHandle] + public readonly unsafe partial struct EventInstance { } + + /// + /// + /// Handle for a FMOD_STUDIO_BUS. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Bus { } + + /// + /// + /// Handle for a FMOD_STUDIO_VCA. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Vca { } + + /// + /// + /// Handle for a FMOD_STUDIO_BANK. + /// + /// + [InteropHandle] + public readonly unsafe partial struct Bank { } + + /// + /// + /// Handle for a + /// FMOD_STUDIO_COMMANDREPLAY + /// . + /// + /// + [InteropHandle] + public readonly unsafe partial struct CommandReplay { } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bank.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bank.gen.cs new file mode 100644 index 0000000..9fc07d0 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bank.gen.cs @@ -0,0 +1,549 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the bank reference is valid. + /// + /// + /// Studio::Bank::isValid + /// + /// + public static Bool32 IsValid(this Bank bank) => PInvoke.BankIsValid(bank); + + /// + /// + /// Retrieves the bank's GUID. + /// + /// + /// Studio::Bank::getID + /// + /// + public static unsafe Result TryGetId(this Bank bank, out Guid id) + { + fixed (Guid* idPtr = &id) + return PInvoke.BankGetId(bank, idPtr); + } + + /// + /// + /// Retrieves the bank's GUID. + /// + /// + /// Studio::Bank::getID + /// + /// + public static Guid GetId(this Bank bank) + { + TryGetId(bank, out var id).Check(); + return id; + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::Bank::getPath + /// + /// + public static unsafe Result TryGetPath(this Bank bank, byte* path, int size, out int retrieved) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.BankGetPath(bank, path, size, retrievedPtr); + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::Bank::getPath + /// + /// + public static unsafe int GetPath(this Bank bank, byte* path, int size) + { + TryGetPath(bank, path, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Unloads the bank. + /// + /// + /// This will destroy all objects created from the bank, unload all sample data inside the bank, and + /// invalidate all API handles referring to the bank. + /// + /// + /// If the bank was loaded from user-managed memory, e.g. by Studio::System::loadBankMemory with the + /// FMOD_STUDIO_LOAD_MEMORY_POINT mode, then the memory must not be freed until the unload has completed. + /// Poll the loading state using Studio::Bank::getLoadingState or use the + /// FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD system callback to determine when it is safe to free the memory. + /// + /// + /// See Also: Studio::System::loadBankFile, Studio::System::loadBankCustom, + /// Studio::System::setCallback + /// + /// + /// Studio::Bank::unload + /// + /// + public static Result TryUnload(this Bank bank) => PInvoke.BankUnload(bank); + + /// + /// + /// Unloads the bank. + /// + /// + /// This will destroy all objects created from the bank, unload all sample data inside the bank, and + /// invalidate all API handles referring to the bank. + /// + /// + /// If the bank was loaded from user-managed memory, e.g. by Studio::System::loadBankMemory with the + /// FMOD_STUDIO_LOAD_MEMORY_POINT mode, then the memory must not be freed until the unload has completed. + /// Poll the loading state using Studio::Bank::getLoadingState or use the + /// FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD system callback to determine when it is safe to free the memory. + /// + /// + /// See Also: Studio::System::loadBankFile, Studio::System::loadBankCustom, + /// Studio::System::setCallback + /// + /// + /// Studio::Bank::unload + /// + /// + public static void Unload(this Bank bank) => TryUnload(bank).Check(); + + /// + /// + /// Loads non-streaming sample data for all events in the bank. + /// + /// + /// Use this function to preload sample data ahead of time so that the events in the bank can play + /// immediately when started. + /// + /// + /// This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the + /// bank, including referenced events. + /// + /// + /// See Also: Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data + /// Loading + /// + /// + /// Studio::Bank::loadSampleData + /// + /// + public static Result TryLoadSampleData(this Bank bank) => PInvoke.BankLoadSampleData(bank); + + /// + /// + /// Loads non-streaming sample data for all events in the bank. + /// + /// + /// Use this function to preload sample data ahead of time so that the events in the bank can play + /// immediately when started. + /// + /// + /// This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the + /// bank, including referenced events. + /// + /// + /// See Also: Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data + /// Loading + /// + /// + /// Studio::Bank::loadSampleData + /// + /// + public static void LoadSampleData(this Bank bank) => TryLoadSampleData(bank).Check(); + + /// + /// + /// Unloads non-streaming sample data for all events in the bank. + /// + /// + /// Sample data loading is reference counted and the sample data will remain loaded until unload requests + /// corresponding to all load requests are made, or until the bank is unloaded. For more details see Sample + /// Data Loading. + /// + /// + /// See Also: Studio::Bank::loadSampleData + /// + /// + /// Studio::Bank::unloadSampleData + /// + /// + public static Result TryUnloadSampleData(this Bank bank) => PInvoke.BankUnloadSampleData(bank); + + /// + /// + /// Unloads non-streaming sample data for all events in the bank. + /// + /// + /// Sample data loading is reference counted and the sample data will remain loaded until unload requests + /// corresponding to all load requests are made, or until the bank is unloaded. For more details see Sample + /// Data Loading. + /// + /// + /// See Also: Studio::Bank::loadSampleData + /// + /// + /// Studio::Bank::unloadSampleData + /// + /// + public static void UnloadSampleData(this Bank bank) => TryUnloadSampleData(bank).Check(); + + /// + /// + /// Retrieves the loading state. + /// + /// + /// Studio::Bank::getLoadingState + /// + /// + public static unsafe Result TryGetLoadingState(this Bank bank, out LoadingState state) + { + fixed (LoadingState* statePtr = &state) + return PInvoke.BankGetLoadingState(bank, statePtr); + } + + /// + /// + /// Retrieves the loading state. + /// + /// + /// Studio::Bank::getLoadingState + /// + /// + public static LoadingState GetLoadingState(this Bank bank) + { + TryGetLoadingState(bank, out var state).Check(); + return state; + } + + /// + /// + /// Retrieves the loading state of the samples in the bank. + /// + /// + /// Studio::Bank::getSampleLoadingState + /// + /// + public static unsafe Result TryGetSampleLoadingState(this Bank bank, out LoadingState state) + { + fixed (LoadingState* statePtr = &state) + return PInvoke.BankGetSampleLoadingState(bank, statePtr); + } + + /// + /// + /// Retrieves the loading state of the samples in the bank. + /// + /// + /// Studio::Bank::getSampleLoadingState + /// + /// + public static LoadingState GetSampleLoadingState(this Bank bank) + { + TryGetSampleLoadingState(bank, out var state).Check(); + return state; + } + + /// + /// + /// Retrieves the number of string table entries in the bank. This is only relevant for studio string banks, + /// as other banks do not contain string tables. + /// + /// + /// Studio::Bank::getStringCount + /// + /// + public static unsafe Result TryGetStringCount(this Bank bank, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.BankGetStringCount(bank, countPtr); + } + + /// + /// + /// Retrieves the number of string table entries in the bank. This is only relevant for studio string banks, + /// as other banks do not contain string tables. + /// + /// + /// Studio::Bank::getStringCount + /// + /// + public static int GetStringCount(this Bank bank) + { + TryGetStringCount(bank, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not + /// contain string tables. + /// + /// + /// Studio::Bank::getStringInfo + /// + /// + public static unsafe Result TryGetStringInfo( + this Bank bank, + int index, + out Guid id, + byte* path, + int size, + out int retrieved + ) + { + fixed (Guid* idPtr = &id) + fixed (int* retrievedPtr = &retrieved) + return PInvoke.BankGetStringInfo(bank, index, idPtr, path, size, retrievedPtr); + } + + /// + /// + /// Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not + /// contain string tables. + /// + /// + /// Studio::Bank::getStringInfo + /// + /// + public static unsafe void GetStringInfo( + this Bank bank, + int index, + out Guid id, + byte* path, + int size, + out int retrieved + ) => TryGetStringInfo(bank, index, out id, path, size, out retrieved).Check(); + + /// + /// + /// Retrieves the number of event descriptions in the bank. + /// + /// + /// Studio::Bank::getEventCount + /// + /// + public static unsafe Result TryGetEventCount(this Bank bank, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.BankGetEventCount(bank, countPtr); + } + + /// + /// + /// Retrieves the number of event descriptions in the bank. + /// + /// + /// Studio::Bank::getEventCount + /// + /// + public static int GetEventCount(this Bank bank) + { + TryGetEventCount(bank, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a list of the event descriptions in the bank. + /// + /// + /// Studio::Bank::getEventList + /// + /// + public static unsafe Result TryGetEventList( + this Bank bank, + out EventDescription array, + int capacity, + out int count + ) + { + fixed (EventDescription* arrayPtr = &array) + fixed (int* countPtr = &count) + return PInvoke.BankGetEventList(bank, arrayPtr, capacity, countPtr); + } + + /// + /// + /// Retrieves a list of the event descriptions in the bank. + /// + /// + /// Studio::Bank::getEventList + /// + /// + public static void GetEventList(this Bank bank, out EventDescription array, int capacity, out int count) => + TryGetEventList(bank, out array, capacity, out count).Check(); + + /// + /// + /// Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not + /// contain buses. + /// + /// + /// Studio::Bank::getBusCount + /// + /// + public static unsafe Result TryGetBusCount(this Bank bank, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.BankGetBusCount(bank, countPtr); + } + + /// + /// + /// Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not + /// contain buses. + /// + /// + /// Studio::Bank::getBusCount + /// + /// + public static int GetBusCount(this Bank bank) + { + TryGetBusCount(bank, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not + /// contain buses. + /// + /// + /// Studio::Bank::getBusList + /// + /// + public static unsafe Result TryGetBusList(this Bank bank, out Bus array, int capacity, out int count) + { + fixed (Bus* arrayPtr = &array) + fixed (int* countPtr = &count) + return PInvoke.BankGetBusList(bank, arrayPtr, capacity, countPtr); + } + + /// + /// + /// Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not + /// contain buses. + /// + /// + /// Studio::Bank::getBusList + /// + /// + public static void GetBusList(this Bank bank, out Bus array, int capacity, out int count) => + TryGetBusList(bank, out array, capacity, out count).Check(); + + /// + /// + /// Retrieves the number of VCAs in the bank. + /// + /// + /// Studio::Bank::getVCACount + /// + /// + public static unsafe Result TryGetVcaCount(this Bank bank, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.BankGetVcaCount(bank, countPtr); + } + + /// + /// + /// Retrieves the number of VCAs in the bank. + /// + /// + /// Studio::Bank::getVCACount + /// + /// + public static int GetVcaCount(this Bank bank) + { + TryGetVcaCount(bank, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a list of the VCAs in the bank. + /// + /// + /// Studio::Bank::getVCAList + /// + /// + public static unsafe Result TryGetVcaList(this Bank bank, out Vca array, int capacity, out int count) + { + fixed (Vca* arrayPtr = &array) + fixed (int* countPtr = &count) + return PInvoke.BankGetVcaList(bank, arrayPtr, capacity, countPtr); + } + + /// + /// + /// Retrieves a list of the VCAs in the bank. + /// + /// + /// Studio::Bank::getVCAList + /// + /// + public static void GetVcaList(this Bank bank, out Vca array, int capacity, out int count) => + TryGetVcaList(bank, out array, capacity, out count).Check(); + + /// + /// + /// Retrieves the bank's user data. + /// + /// + /// Studio::Bank::getUserData + /// + /// + public static unsafe Result TryGetUserData(this Bank bank, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.BankGetUserData(bank, userDataPtr); + } + + /// + /// + /// Retrieves the bank's user data. + /// + /// + /// Studio::Bank::getUserData + /// + /// + public static nint GetUserData(this Bank bank) + { + TryGetUserData(bank, out var userData).Check(); + return userData; + } + + /// + /// + /// Sets the bank's user data. + /// + /// + /// Studio::Bank::setUserData + /// + /// + public static Result TrySetUserData(this Bank bank, nint userData) => PInvoke.BankSetUserData(bank, userData); + + /// + /// + /// Sets the bank's user data. + /// + /// + /// Studio::Bank::setUserData + /// + /// + public static void SetUserData(this Bank bank, nint userData) => TrySetUserData(bank, userData).Check(); + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bus.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bus.gen.cs new file mode 100644 index 0000000..2b452f7 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Bus.gen.cs @@ -0,0 +1,429 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the Bus reference is valid. + /// + /// + /// Studio::Bus::isValid + /// + /// + public static Bool32 IsValid(this Bus bus) => PInvoke.BusIsValid(bus); + + /// + /// + /// Retrieves the GUID. + /// + /// + /// Studio::Bus::getID + /// + /// + public static unsafe Result TryGetId(this Bus bus, out Guid id) + { + fixed (Guid* idPtr = &id) + return PInvoke.BusGetId(bus, idPtr); + } + + /// + /// + /// Retrieves the GUID. + /// + /// + /// Studio::Bus::getID + /// + /// + public static Guid GetId(this Bus bus) + { + TryGetId(bus, out var id).Check(); + return id; + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::Bus::getPath + /// + /// + public static unsafe Result TryGetPath(this Bus bus, byte* path, int size, out int retrieved) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.BusGetPath(bus, path, size, retrievedPtr); + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::Bus::getPath + /// + /// + public static unsafe int GetPath(this Bus bus, byte* path, int size) + { + TryGetPath(bus, path, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves the volume level. + /// + /// + /// Studio::Bus::getVolume + /// + /// + public static unsafe Result TryGetVolume(this Bus bus, out float volume, out float finalVolume) + { + fixed (float* volumePtr = &volume) + fixed (float* finalVolumePtr = &finalVolume) + return PInvoke.BusGetVolume(bus, volumePtr, finalVolumePtr); + } + + /// + /// + /// Retrieves the volume level. + /// + /// + /// Studio::Bus::getVolume + /// + /// + public static void GetVolume(this Bus bus, out float volume, out float finalVolume) => + TryGetVolume(bus, out volume, out finalVolume).Check(); + + /// + /// + /// Sets the volume level. + /// + /// + /// Studio::Bus::setVolume + /// + /// + public static Result TrySetVolume(this Bus bus, float volume) => PInvoke.BusSetVolume(bus, volume); + + /// + /// + /// Sets the volume level. + /// + /// + /// Studio::Bus::setVolume + /// + /// + public static void SetVolume(this Bus bus, float volume) => TrySetVolume(bus, volume).Check(); + + /// + /// + /// Retrieves the pause state. + /// + /// + /// Studio::Bus::getPaused + /// + /// + public static unsafe Result TryGetPaused(this Bus bus, out Bool32 paused) + { + fixed (Bool32* pausedPtr = &paused) + return PInvoke.BusGetPaused(bus, pausedPtr); + } + + /// + /// + /// Retrieves the pause state. + /// + /// + /// Studio::Bus::getPaused + /// + /// + public static Bool32 GetPaused(this Bus bus) + { + TryGetPaused(bus, out var paused).Check(); + return paused; + } + + /// + /// + /// Sets the pause state. + /// + /// + /// Studio::Bus::setPaused + /// + /// + public static Result TrySetPaused(this Bus bus, Bool32 paused) => PInvoke.BusSetPaused(bus, paused); + + /// + /// + /// Sets the pause state. + /// + /// + /// Studio::Bus::setPaused + /// + /// + public static void SetPaused(this Bus bus, Bool32 paused) => TrySetPaused(bus, paused).Check(); + + /// + /// + /// Retrieves the mute state. + /// + /// + /// Studio::Bus::getMute + /// + /// + public static unsafe Result TryGetMute(this Bus bus, out Bool32 mute) + { + fixed (Bool32* mutePtr = &mute) + return PInvoke.BusGetMute(bus, mutePtr); + } + + /// + /// + /// Retrieves the mute state. + /// + /// + /// Studio::Bus::getMute + /// + /// + public static Bool32 GetMute(this Bus bus) + { + TryGetMute(bus, out var mute).Check(); + return mute; + } + + /// + /// + /// Sets the mute state. + /// + /// + /// Studio::Bus::setMute + /// + /// + public static Result TrySetMute(this Bus bus, Bool32 mute) => PInvoke.BusSetMute(bus, mute); + + /// + /// + /// Sets the mute state. + /// + /// + /// Studio::Bus::setMute + /// + /// + public static void SetMute(this Bus bus, Bool32 mute) => TrySetMute(bus, mute).Check(); + + /// + /// + /// Stops all event instances that are routed into the bus. + /// + /// + /// Studio::Bus::stopAllEvents + /// + /// + public static Result TryStopAllEvents(this Bus bus, StopMode mode) => PInvoke.BusStopAllEvents(bus, mode); + + /// + /// + /// Stops all event instances that are routed into the bus. + /// + /// + /// Studio::Bus::stopAllEvents + /// + /// + public static void StopAllEvents(this Bus bus, StopMode mode) => TryStopAllEvents(bus, mode).Check(); + + /// + /// + /// Retrieves the port index assigned to the bus. + /// + /// + /// Studio::Bus::getPortIndex + /// + /// + public static unsafe Result TryGetPortIndex(this Bus bus, out PortIndex index) + { + fixed (PortIndex* indexPtr = &index) + return PInvoke.BusGetPortIndex(bus, indexPtr); + } + + /// + /// + /// Retrieves the port index assigned to the bus. + /// + /// + /// Studio::Bus::getPortIndex + /// + /// + public static PortIndex GetPortIndex(this Bus bus) + { + TryGetPortIndex(bus, out var index).Check(); + return index; + } + + /// + /// + /// Sets the port index to use when attaching to an output port. + /// + /// + /// Studio::Bus::setPortIndex + /// + /// + public static Result TrySetPortIndex(this Bus bus, PortIndex index) => PInvoke.BusSetPortIndex(bus, index); + + /// + /// + /// Sets the port index to use when attaching to an output port. + /// + /// + /// Studio::Bus::setPortIndex + /// + /// + public static void SetPortIndex(this Bus bus, PortIndex index) => TrySetPortIndex(bus, index).Check(); + + /// + /// + /// Locks the core ChannelGroup. + /// + /// + /// This function forces the system to create the ChannelGroup and keep it available until + /// Studio::Bus::unlockChannelGroup is called. See Signal Paths for details. + /// + /// + /// Studio::Bus::lockChannelGroup + /// + /// + public static Result TryLockChannelGroup(this Bus bus) => PInvoke.BusLockChannelGroup(bus); + + /// + /// + /// Locks the core ChannelGroup. + /// + /// + /// This function forces the system to create the ChannelGroup and keep it available until + /// Studio::Bus::unlockChannelGroup is called. See Signal Paths for details. + /// + /// + /// Studio::Bus::lockChannelGroup + /// + /// + public static void LockChannelGroup(this Bus bus) => TryLockChannelGroup(bus).Check(); + + /// + /// + /// Unlocks the core ChannelGroup. + /// + /// + /// This function allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for + /// details. + /// + /// + /// See Also: Studio::Bus::lockChannelGroup + /// + /// + /// Studio::Bus::unlockChannelGroup + /// + /// + public static Result TryUnlockChannelGroup(this Bus bus) => PInvoke.BusUnlockChannelGroup(bus); + + /// + /// + /// Unlocks the core ChannelGroup. + /// + /// + /// This function allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for + /// details. + /// + /// + /// See Also: Studio::Bus::lockChannelGroup + /// + /// + /// Studio::Bus::unlockChannelGroup + /// + /// + public static void UnlockChannelGroup(this Bus bus) => TryUnlockChannelGroup(bus).Check(); + + /// + /// + /// Retrieves the core ChannelGroup. + /// + /// + /// Studio::Bus::getChannelGroup + /// + /// + public static unsafe Result TryGetChannelGroup(this Bus bus, out ChannelGroup group) + { + fixed (ChannelGroup* groupPtr = &group) + return PInvoke.BusGetChannelGroup(bus, groupPtr); + } + + /// + /// + /// Retrieves the core ChannelGroup. + /// + /// + /// Studio::Bus::getChannelGroup + /// + /// + public static ChannelGroup GetChannelGroup(this Bus bus) + { + TryGetChannelGroup(bus, out var group).Check(); + return group; + } + + /// + /// + /// Retrieves the bus CPU usage data. + /// + /// + /// Studio::Bus::getCPUUsage + /// + /// + public static unsafe Result TryGetCpuUsage(this Bus bus, out uint exclusive, out uint inclusive) + { + fixed (uint* exclusivePtr = &exclusive) + fixed (uint* inclusivePtr = &inclusive) + return PInvoke.BusGetCpuUsage(bus, exclusivePtr, inclusivePtr); + } + + /// + /// + /// Retrieves the bus CPU usage data. + /// + /// + /// Studio::Bus::getCPUUsage + /// + /// + public static void GetCpuUsage(this Bus bus, out uint exclusive, out uint inclusive) => + TryGetCpuUsage(bus, out exclusive, out inclusive).Check(); + + /// + /// + /// Retrieves memory usage statistics. + /// + /// + /// Studio::Bus::getMemoryUsage + /// + /// + public static unsafe Result TryGetMemoryUsage(this Bus bus, out MemoryUsage memoryUsage) + { + fixed (MemoryUsage* memoryUsagePtr = &memoryUsage) + return PInvoke.BusGetMemoryUsage(bus, memoryUsagePtr); + } + + /// + /// + /// Retrieves memory usage statistics. + /// + /// + /// Studio::Bus::getMemoryUsage + /// + /// + public static MemoryUsage GetMemoryUsage(this Bus bus) + { + TryGetMemoryUsage(bus, out var memoryUsage).Check(); + return memoryUsage; + } + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.CommandReplay.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.CommandReplay.gen.cs new file mode 100644 index 0000000..68a454d --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.CommandReplay.gen.cs @@ -0,0 +1,576 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the CommandReplay reference is valid. + /// + /// + /// Studio::CommandReplay::isValid + /// + /// + public static Bool32 IsValid(this CommandReplay replay) => PInvoke.CommandReplayIsValid(replay); + + /// + /// + /// Retrieves the Studio System object associated with this replay object. + /// + /// + /// Studio::CommandReplay::getSystem + /// + /// + public static unsafe Result TryGetSystem(this CommandReplay replay, out FmodStudioSystem system) + { + fixed (FmodStudioSystem* systemPtr = &system) + return PInvoke.CommandReplayGetSystem(replay, systemPtr); + } + + /// + /// + /// Retrieves the Studio System object associated with this replay object. + /// + /// + /// Studio::CommandReplay::getSystem + /// + /// + public static FmodStudioSystem GetSystem(this CommandReplay replay) + { + TryGetSystem(replay, out var system).Check(); + return system; + } + + /// + /// + /// Retrieves the total playback time. + /// + /// + /// Studio::CommandReplay::getLength + /// + /// + public static unsafe Result TryGetLength(this CommandReplay replay, out float length) + { + fixed (float* lengthPtr = &length) + return PInvoke.CommandReplayGetLength(replay, lengthPtr); + } + + /// + /// + /// Retrieves the total playback time. + /// + /// + /// Studio::CommandReplay::getLength + /// + /// + public static float GetLength(this CommandReplay replay) + { + TryGetLength(replay, out var length).Check(); + return length; + } + + /// + /// + /// Retrieves the number of commands in the replay. + /// + /// + /// Studio::CommandReplay::getCommandCount + /// + /// + public static unsafe Result TryGetCommandCount(this CommandReplay replay, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.CommandReplayGetCommandCount(replay, countPtr); + } + + /// + /// + /// Retrieves the number of commands in the replay. + /// + /// + /// Studio::CommandReplay::getCommandCount + /// + /// + public static int GetCommandCount(this CommandReplay replay) + { + TryGetCommandCount(replay, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves command information. + /// + /// + /// Studio::CommandReplay::getCommandInfo + /// + /// + public static unsafe Result TryGetCommandInfo(this CommandReplay replay, int commandIndex, out CommandInfo info) + { + fixed (CommandInfo* infoPtr = &info) + return PInvoke.CommandReplayGetCommandInfo(replay, commandIndex, infoPtr); + } + + /// + /// + /// Retrieves command information. + /// + /// + /// Studio::CommandReplay::getCommandInfo + /// + /// + public static CommandInfo GetCommandInfo(this CommandReplay replay, int commandIndex) + { + TryGetCommandInfo(replay, commandIndex, out var info).Check(); + return info; + } + + /// + /// + /// Retrieves the string representation of a command. + /// + /// + /// Studio::CommandReplay::getCommandString + /// + /// + public static unsafe Result TryGetCommandString( + this CommandReplay replay, + int commandIndex, + byte* buffer, + int length + ) => PInvoke.CommandReplayGetCommandString(replay, commandIndex, buffer, length); + + /// + /// + /// Retrieves the string representation of a command. + /// + /// + /// Studio::CommandReplay::getCommandString + /// + /// + public static unsafe void GetCommandString( + this CommandReplay replay, + int commandIndex, + byte* buffer, + int length + ) => TryGetCommandString(replay, commandIndex, buffer, length).Check(); + + /// + /// + /// Retrieves the command index corresponding to the given playback time. + /// + /// + /// Studio::CommandReplay::getCommandAtTime + /// + /// + public static unsafe Result TryGetCommandAtTime(this CommandReplay replay, float time, out int commandIndex) + { + fixed (int* commandIndexPtr = &commandIndex) + return PInvoke.CommandReplayGetCommandAtTime(replay, time, commandIndexPtr); + } + + /// + /// + /// Retrieves the command index corresponding to the given playback time. + /// + /// + /// Studio::CommandReplay::getCommandAtTime + /// + /// + public static int GetCommandAtTime(this CommandReplay replay, float time) + { + TryGetCommandAtTime(replay, time, out var commandIndex).Check(); + return commandIndex; + } + + /// + /// + /// Sets a path substition that will be used when loading banks with this replay. + /// + /// + /// Studio::CommandReplay::setBankPath + /// + /// + public static unsafe Result TrySetBankPath(this CommandReplay replay, RefString8 bankPath) + { + fixed (byte* bankPathPtr = bankPath) + return PInvoke.CommandReplaySetBankPath(replay, bankPathPtr); + } + + /// + /// + /// Sets a path substition that will be used when loading banks with this replay. + /// + /// + /// Studio::CommandReplay::setBankPath + /// + /// + public static void SetBankPath(this CommandReplay replay, RefString8 bankPath) => + TrySetBankPath(replay, bankPath).Check(); + + /// + /// + /// Begins playback. + /// + /// + /// If the replay is already running then calling this function will restart replay from the beginning. + /// + /// + /// See Also: Studio::CommandReplay::stop, Studio::CommandReplay::getPlaybackState + /// + /// + /// Studio::CommandReplay::start + /// + /// + public static Result TryStart(this CommandReplay replay) => PInvoke.CommandReplayStart(replay); + + /// + /// + /// Begins playback. + /// + /// + /// If the replay is already running then calling this function will restart replay from the beginning. + /// + /// + /// See Also: Studio::CommandReplay::stop, Studio::CommandReplay::getPlaybackState + /// + /// + /// Studio::CommandReplay::start + /// + /// + public static void Start(this CommandReplay replay) => TryStart(replay).Check(); + + /// + /// + /// Stops playback. + /// + /// + /// If the FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP flag has been used then the system state is left as it was + /// at the end of the playback, otherwise all resources that were created as part of the replay will be + /// cleaned up. + /// + /// + /// See Also: Studio::CommandReplay::start, Studio::CommandReplay::getPlaybackState, + /// Studio::System::loadCommandReplay + /// + /// + /// Studio::CommandReplay::stop + /// + /// + public static Result TryStop(this CommandReplay replay) => PInvoke.CommandReplayStop(replay); + + /// + /// + /// Stops playback. + /// + /// + /// If the FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP flag has been used then the system state is left as it was + /// at the end of the playback, otherwise all resources that were created as part of the replay will be + /// cleaned up. + /// + /// + /// See Also: Studio::CommandReplay::start, Studio::CommandReplay::getPlaybackState, + /// Studio::System::loadCommandReplay + /// + /// + /// Studio::CommandReplay::stop + /// + /// + public static void Stop(this CommandReplay replay) => TryStop(replay).Check(); + + /// + /// + /// Seeks the playback position to a time. + /// + /// + /// Studio::CommandReplay::seekToTime + /// + /// + public static Result TrySeekToTime(this CommandReplay replay, float time) => + PInvoke.CommandReplaySeekToTime(replay, time); + + /// + /// + /// Seeks the playback position to a time. + /// + /// + /// Studio::CommandReplay::seekToTime + /// + /// + public static void SeekToTime(this CommandReplay replay, float time) => TrySeekToTime(replay, time).Check(); + + /// + /// + /// Seeks the playback position to a command. + /// + /// + /// Studio::CommandReplay::seekToCommand + /// + /// + public static Result TrySeekToCommand(this CommandReplay replay, int commandIndex) => + PInvoke.CommandReplaySeekToCommand(replay, commandIndex); + + /// + /// + /// Seeks the playback position to a command. + /// + /// + /// Studio::CommandReplay::seekToCommand + /// + /// + public static void SeekToCommand(this CommandReplay replay, int commandIndex) => + TrySeekToCommand(replay, commandIndex).Check(); + + /// + /// + /// Retrieves the paused state. + /// + /// + /// Studio::CommandReplay::getPaused + /// + /// + public static unsafe Result TryGetPaused(this CommandReplay replay, out Bool32 paused) + { + fixed (Bool32* pausedPtr = &paused) + return PInvoke.CommandReplayGetPaused(replay, pausedPtr); + } + + /// + /// + /// Retrieves the paused state. + /// + /// + /// Studio::CommandReplay::getPaused + /// + /// + public static Bool32 GetPaused(this CommandReplay replay) + { + TryGetPaused(replay, out var paused).Check(); + return paused; + } + + /// + /// + /// Sets the paused state. + /// + /// + /// Studio::CommandReplay::setPaused + /// + /// + public static Result TrySetPaused(this CommandReplay replay, Bool32 paused) => + PInvoke.CommandReplaySetPaused(replay, paused); + + /// + /// + /// Sets the paused state. + /// + /// + /// Studio::CommandReplay::setPaused + /// + /// + public static void SetPaused(this CommandReplay replay, Bool32 paused) => TrySetPaused(replay, paused).Check(); + + /// + /// + /// Retrieves the playback state. + /// + /// + /// Studio::CommandReplay::getPlaybackState + /// + /// + public static unsafe Result TryGetPlaybackState(this CommandReplay replay, out PlaybackState state) + { + fixed (PlaybackState* statePtr = &state) + return PInvoke.CommandReplayGetPlaybackState(replay, statePtr); + } + + /// + /// + /// Retrieves the playback state. + /// + /// + /// Studio::CommandReplay::getPlaybackState + /// + /// + public static PlaybackState GetPlaybackState(this CommandReplay replay) + { + TryGetPlaybackState(replay, out var state).Check(); + return state; + } + + /// + /// + /// Retrieves the progress through the command replay. + /// + /// + /// Studio::CommandReplay::getCurrentCommand + /// + /// + public static unsafe Result TryGetCurrentCommand( + this CommandReplay replay, + out int commandIndex, + out float currentTime + ) + { + fixed (int* commandIndexPtr = &commandIndex) + fixed (float* currentTimePtr = ¤tTime) + return PInvoke.CommandReplayGetCurrentCommand(replay, commandIndexPtr, currentTimePtr); + } + + /// + /// + /// Retrieves the progress through the command replay. + /// + /// + /// Studio::CommandReplay::getCurrentCommand + /// + /// + public static void GetCurrentCommand(this CommandReplay replay, out int commandIndex, out float currentTime) => + TryGetCurrentCommand(replay, out commandIndex, out currentTime).Check(); + + /// + /// + /// Releases the command replay. + /// + /// + /// Studio::CommandReplay::release + /// + /// + public static Result TryRelease(this CommandReplay replay) => PInvoke.CommandReplayRelease(replay); + + /// + /// + /// Releases the command replay. + /// + /// + /// Studio::CommandReplay::release + /// + /// + public static void Release(this CommandReplay replay) => TryRelease(replay).Check(); + + /// + /// + /// Sets a callback that is issued each time the replay reaches a new frame. + /// + /// + /// Studio::CommandReplay::setFrameCallback + /// + /// + public static Result TrySetFrameCallback(this CommandReplay replay, CommandReplayFrameCallbackPtr callback) => + PInvoke.CommandReplaySetFrameCallback(replay, callback); + + /// + /// + /// Sets a callback that is issued each time the replay reaches a new frame. + /// + /// + /// Studio::CommandReplay::setFrameCallback + /// + /// + public static void SetFrameCallback(this CommandReplay replay, CommandReplayFrameCallbackPtr callback) => + TrySetFrameCallback(replay, callback).Check(); + + /// + /// + /// Sets the bank loading callback. + /// + /// + /// Studio::CommandReplay::setLoadBankCallback + /// + /// + public static Result TrySetLoadBankCallback( + this CommandReplay replay, + CommandReplayLoadBankCallbackPtr callback + ) => PInvoke.CommandReplaySetLoadBankCallback(replay, callback); + + /// + /// + /// Sets the bank loading callback. + /// + /// + /// Studio::CommandReplay::setLoadBankCallback + /// + /// + public static void SetLoadBankCallback(this CommandReplay replay, CommandReplayLoadBankCallbackPtr callback) => + TrySetLoadBankCallback(replay, callback).Check(); + + /// + /// + /// Sets the create event instance callback. + /// + /// + /// Studio::CommandReplay::setCreateInstanceCallback + /// + /// + public static Result TrySetCreateInstanceCallback( + this CommandReplay replay, + CommandReplayCreateInstanceCallbackPtr callback + ) => PInvoke.CommandReplaySetCreateInstanceCallback(replay, callback); + + /// + /// + /// Sets the create event instance callback. + /// + /// + /// Studio::CommandReplay::setCreateInstanceCallback + /// + /// + public static void SetCreateInstanceCallback( + this CommandReplay replay, + CommandReplayCreateInstanceCallbackPtr callback + ) => TrySetCreateInstanceCallback(replay, callback).Check(); + + /// + /// + /// Retrieves user data. + /// + /// + /// Studio::CommandReplay::getUserData + /// + /// + public static unsafe Result TryGetUserData(this CommandReplay replay, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.CommandReplayGetUserData(replay, userDataPtr); + } + + /// + /// + /// Retrieves user data. + /// + /// + /// Studio::CommandReplay::getUserData + /// + /// + public static nint GetUserData(this CommandReplay replay) + { + TryGetUserData(replay, out var userData).Check(); + return userData; + } + + /// + /// + /// Sets user data. + /// + /// + /// Studio::CommandReplay::setUserData + /// + /// + public static Result TrySetUserData(this CommandReplay replay, nint userData) => + PInvoke.CommandReplaySetUserData(replay, userData); + + /// + /// + /// Sets user data. + /// + /// + /// Studio::CommandReplay::setUserData + /// + /// + public static void SetUserData(this CommandReplay replay, nint userData) => + TrySetUserData(replay, userData).Check(); + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventDescription.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventDescription.gen.cs new file mode 100644 index 0000000..d6f82ca --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventDescription.gen.cs @@ -0,0 +1,1023 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the EventDescription reference is valid. + /// + /// + /// Studio::EventDescription::isValid + /// + /// + public static Bool32 IsValid(this EventDescription eventDescription) => + PInvoke.EventDescriptionIsValid(eventDescription); + + /// + /// + /// Retrieves the GUID associated with the event. + /// + /// + /// Studio::EventDescription::getID + /// + /// + public static unsafe Result TryGetId(this EventDescription eventDescription, out Guid id) + { + fixed (Guid* idPtr = &id) + return PInvoke.EventDescriptionGetId(eventDescription, idPtr); + } + + /// + /// + /// Retrieves the GUID associated with the event. + /// + /// + /// Studio::EventDescription::getID + /// + /// + public static Guid GetId(this EventDescription eventDescription) + { + TryGetId(eventDescription, out var id).Check(); + return id; + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::EventDescription::getPath + /// + /// + public static unsafe Result TryGetPath( + this EventDescription eventDescription, + byte* path, + int size, + out int retrieved + ) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.EventDescriptionGetPath(eventDescription, path, size, retrievedPtr); + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::EventDescription::getPath + /// + /// + public static unsafe int GetPath(this EventDescription eventDescription, byte* path, int size) + { + TryGetPath(eventDescription, path, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves the number of parameters in the event. + /// + /// + /// Studio::EventDescription::getParameterDescriptionCount + /// + /// + public static unsafe Result TryGetParameterDescriptionCount( + this EventDescription eventDescription, + out int count + ) + { + fixed (int* countPtr = &count) + return PInvoke.EventDescriptionGetParameterDescriptionCount(eventDescription, countPtr); + } + + /// + /// + /// Retrieves the number of parameters in the event. + /// + /// + /// Studio::EventDescription::getParameterDescriptionCount + /// + /// + public static int GetParameterDescriptionCount(this EventDescription eventDescription) + { + TryGetParameterDescriptionCount(eventDescription, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves an event parameter description by index. + /// + /// + /// Studio::EventDescription::getParameterDescriptionByIndex + /// + /// + public static unsafe Result TryGetParameterDescriptionByIndex( + this EventDescription eventDescription, + int index, + out ParameterDescription parameter + ) + { + fixed (ParameterDescription* parameterPtr = ¶meter) + return PInvoke.EventDescriptionGetParameterDescriptionByIndex(eventDescription, index, parameterPtr); + } + + /// + /// + /// Retrieves an event parameter description by index. + /// + /// + /// Studio::EventDescription::getParameterDescriptionByIndex + /// + /// + public static ParameterDescription GetParameterDescriptionByIndex( + this EventDescription eventDescription, + int index + ) + { + TryGetParameterDescriptionByIndex(eventDescription, index, out var parameter).Check(); + return parameter; + } + + /// + /// + /// Retrieves an event parameter description by name, including the path if needed. + /// + /// + /// Studio::EventDescription::getParameterDescriptionByName + /// + /// + public static unsafe Result TryGetParameterDescriptionByName( + this EventDescription eventDescription, + RefString8 name, + out ParameterDescription parameter + ) + { + fixed (byte* namePtr = name) + fixed (ParameterDescription* parameterPtr = ¶meter) + return PInvoke.EventDescriptionGetParameterDescriptionByName(eventDescription, namePtr, parameterPtr); + } + + /// + /// + /// Retrieves an event parameter description by name, including the path if needed. + /// + /// + /// Studio::EventDescription::getParameterDescriptionByName + /// + /// + public static ParameterDescription GetParameterDescriptionByName( + this EventDescription eventDescription, + RefString8 name + ) + { + TryGetParameterDescriptionByName(eventDescription, name, out var parameter).Check(); + return parameter; + } + + /// + /// + /// Retrieves an event parameter description by id. + /// + /// + /// Studio::EventDescription::getParameterDescriptionByID + /// + /// + public static unsafe Result TryGetParameterDescriptionById( + this EventDescription eventDescription, + ParameterId id, + out ParameterDescription parameter + ) + { + fixed (ParameterDescription* parameterPtr = ¶meter) + return PInvoke.EventDescriptionGetParameterDescriptionById(eventDescription, id, parameterPtr); + } + + /// + /// + /// Retrieves an event parameter description by id. + /// + /// + /// Studio::EventDescription::getParameterDescriptionByID + /// + /// + public static ParameterDescription GetParameterDescriptionById( + this EventDescription eventDescription, + ParameterId id + ) + { + TryGetParameterDescriptionById(eventDescription, id, out var parameter).Check(); + return parameter; + } + + /// + /// + /// Retrieves an event parameter label by index. + /// + /// + /// Studio::EventDescription::getParameterLabelByIndex + /// + /// + public static unsafe Result TryGetParameterLabelByIndex( + this EventDescription eventDescription, + int index, + int labelIndex, + byte* label, + int size, + out int retrieved + ) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.EventDescriptionGetParameterLabelByIndex( + eventDescription, + index, + labelIndex, + label, + size, + retrievedPtr + ); + } + + /// + /// + /// Retrieves an event parameter label by index. + /// + /// + /// Studio::EventDescription::getParameterLabelByIndex + /// + /// + public static unsafe int GetParameterLabelByIndex( + this EventDescription eventDescription, + int index, + int labelIndex, + byte* label, + int size + ) + { + TryGetParameterLabelByIndex(eventDescription, index, labelIndex, label, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves an event parameter label by name, including the path if needed. + /// + /// + /// Studio::EventDescription::getParameterLabelByName + /// + /// + public static unsafe Result TryGetParameterLabelByName( + this EventDescription eventDescription, + RefString8 name, + int labelIndex, + byte* label, + int size, + out int retrieved + ) + { + fixed (byte* namePtr = name) + fixed (int* retrievedPtr = &retrieved) + return PInvoke.EventDescriptionGetParameterLabelByName( + eventDescription, + namePtr, + labelIndex, + label, + size, + retrievedPtr + ); + } + + /// + /// + /// Retrieves an event parameter label by name, including the path if needed. + /// + /// + /// Studio::EventDescription::getParameterLabelByName + /// + /// + public static unsafe int GetParameterLabelByName( + this EventDescription eventDescription, + RefString8 name, + int labelIndex, + byte* label, + int size + ) + { + TryGetParameterLabelByName(eventDescription, name, labelIndex, label, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves an event parameter label by ID. + /// + /// + /// Studio::EventDescription::getParameterLabelByID + /// + /// + public static unsafe Result TryGetParameterLabelById( + this EventDescription eventDescription, + ParameterId id, + int labelIndex, + byte* label, + int size, + out int retrieved + ) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.EventDescriptionGetParameterLabelById( + eventDescription, + id, + labelIndex, + label, + size, + retrievedPtr + ); + } + + /// + /// + /// Retrieves an event parameter label by ID. + /// + /// + /// Studio::EventDescription::getParameterLabelByID + /// + /// + public static unsafe int GetParameterLabelById( + this EventDescription eventDescription, + ParameterId id, + int labelIndex, + byte* label, + int size + ) + { + TryGetParameterLabelById(eventDescription, id, labelIndex, label, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves the number of user properties attached to the event. + /// + /// + /// Studio::EventDescription::getUserPropertyCount + /// + /// + public static unsafe Result TryGetUserPropertyCount(this EventDescription eventDescription, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.EventDescriptionGetUserPropertyCount(eventDescription, countPtr); + } + + /// + /// + /// Retrieves the number of user properties attached to the event. + /// + /// + /// Studio::EventDescription::getUserPropertyCount + /// + /// + public static int GetUserPropertyCount(this EventDescription eventDescription) + { + TryGetUserPropertyCount(eventDescription, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a user property by index. + /// + /// + /// Studio::EventDescription::getUserPropertyByIndex + /// + /// + public static unsafe Result TryGetUserPropertyByIndex( + this EventDescription eventDescription, + int index, + out UserProperty property + ) + { + fixed (UserProperty* propertyPtr = &property) + return PInvoke.EventDescriptionGetUserPropertyByIndex(eventDescription, index, propertyPtr); + } + + /// + /// + /// Retrieves a user property by index. + /// + /// + /// Studio::EventDescription::getUserPropertyByIndex + /// + /// + public static UserProperty GetUserPropertyByIndex(this EventDescription eventDescription, int index) + { + TryGetUserPropertyByIndex(eventDescription, index, out var property).Check(); + return property; + } + + /// + /// + /// Retrieves a user property by name. + /// + /// + /// Studio::EventDescription::getUserProperty + /// + /// + public static unsafe Result TryGetUserProperty( + this EventDescription eventDescription, + RefString8 name, + out UserProperty property + ) + { + fixed (byte* namePtr = name) + fixed (UserProperty* propertyPtr = &property) + return PInvoke.EventDescriptionGetUserProperty(eventDescription, namePtr, propertyPtr); + } + + /// + /// + /// Retrieves a user property by name. + /// + /// + /// Studio::EventDescription::getUserProperty + /// + /// + public static UserProperty GetUserProperty(this EventDescription eventDescription, RefString8 name) + { + TryGetUserProperty(eventDescription, name, out var property).Check(); + return property; + } + + /// + /// + /// Retrieves the length of the timeline. + /// + /// + /// Studio::EventDescription::getLength + /// + /// + public static unsafe Result TryGetLength(this EventDescription eventDescription, out int length) + { + fixed (int* lengthPtr = &length) + return PInvoke.EventDescriptionGetLength(eventDescription, lengthPtr); + } + + /// + /// + /// Retrieves the length of the timeline. + /// + /// + /// Studio::EventDescription::getLength + /// + /// + public static int GetLength(this EventDescription eventDescription) + { + TryGetLength(eventDescription, out var length).Check(); + return length; + } + + /// + /// + /// Retrieves the minimum and maximum distances for 3D attenuation. + /// + /// + /// Studio::EventDescription::getMinMaxDistance + /// + /// + public static unsafe Result TryGetMinMaxDistance( + this EventDescription eventDescription, + out float min, + out float max + ) + { + fixed (float* minPtr = &min) + fixed (float* maxPtr = &max) + return PInvoke.EventDescriptionGetMinMaxDistance(eventDescription, minPtr, maxPtr); + } + + /// + /// + /// Retrieves the minimum and maximum distances for 3D attenuation. + /// + /// + /// Studio::EventDescription::getMinMaxDistance + /// + /// + public static void GetMinMaxDistance(this EventDescription eventDescription, out float min, out float max) => + TryGetMinMaxDistance(eventDescription, out min, out max).Check(); + + /// + /// + /// Retrieves the sound size for 3D panning. + /// + /// + /// Studio::EventDescription::getSoundSize + /// + /// + public static unsafe Result TryGetSoundSize(this EventDescription eventDescription, out float size) + { + fixed (float* sizePtr = &size) + return PInvoke.EventDescriptionGetSoundSize(eventDescription, sizePtr); + } + + /// + /// + /// Retrieves the sound size for 3D panning. + /// + /// + /// Studio::EventDescription::getSoundSize + /// + /// + public static float GetSoundSize(this EventDescription eventDescription) + { + TryGetSoundSize(eventDescription, out var size).Check(); + return size; + } + + /// + /// + /// Retrieves the event's snapshot status. + /// + /// + /// Studio::EventDescription::isSnapshot + /// + /// + public static unsafe Result TryIsSnapshot(this EventDescription eventDescription, out Bool32 snapshot) + { + fixed (Bool32* snapshotPtr = &snapshot) + return PInvoke.EventDescriptionIsSnapshot(eventDescription, snapshotPtr); + } + + /// + /// + /// Retrieves the event's snapshot status. + /// + /// + /// Studio::EventDescription::isSnapshot + /// + /// + public static Bool32 IsSnapshot(this EventDescription eventDescription) + { + TryIsSnapshot(eventDescription, out var snapshot).Check(); + return snapshot; + } + + /// + /// + /// Retrieves the event's oneshot status. + /// + /// + /// Studio::EventDescription::isOneshot + /// + /// + public static unsafe Result TryIsOneshot(this EventDescription eventDescription, out Bool32 oneshot) + { + fixed (Bool32* oneshotPtr = &oneshot) + return PInvoke.EventDescriptionIsOneshot(eventDescription, oneshotPtr); + } + + /// + /// + /// Retrieves the event's oneshot status. + /// + /// + /// Studio::EventDescription::isOneshot + /// + /// + public static Bool32 IsOneshot(this EventDescription eventDescription) + { + TryIsOneshot(eventDescription, out var oneshot).Check(); + return oneshot; + } + + /// + /// + /// Retrieves the event's stream status. + /// + /// + /// Studio::EventDescription::isStream + /// + /// + public static unsafe Result TryIsStream(this EventDescription eventDescription, out Bool32 isStream) + { + fixed (Bool32* isStreamPtr = &isStream) + return PInvoke.EventDescriptionIsStream(eventDescription, isStreamPtr); + } + + /// + /// + /// Retrieves the event's stream status. + /// + /// + /// Studio::EventDescription::isStream + /// + /// + public static Bool32 IsStream(this EventDescription eventDescription) + { + TryIsStream(eventDescription, out var isStream).Check(); + return isStream; + } + + /// + /// + /// Retrieves the event's 3D status. + /// + /// + /// Studio::EventDescription::is3D + /// + /// + public static unsafe Result TryIs3d(this EventDescription eventDescription, out Bool32 is3d) + { + fixed (Bool32* is3dPtr = &is3d) + return PInvoke.EventDescriptionIs3d(eventDescription, is3dPtr); + } + + /// + /// + /// Retrieves the event's 3D status. + /// + /// + /// Studio::EventDescription::is3D + /// + /// + public static Bool32 Is3d(this EventDescription eventDescription) + { + TryIs3d(eventDescription, out var is3d).Check(); + return is3d; + } + + /// + /// + /// Retrieves the event's doppler status. + /// + /// + /// Studio::EventDescription::isDopplerEnabled + /// + /// + public static unsafe Result TryIsDopplerEnabled(this EventDescription eventDescription, out Bool32 doppler) + { + fixed (Bool32* dopplerPtr = &doppler) + return PInvoke.EventDescriptionIsDopplerEnabled(eventDescription, dopplerPtr); + } + + /// + /// + /// Retrieves the event's doppler status. + /// + /// + /// Studio::EventDescription::isDopplerEnabled + /// + /// + public static Bool32 IsDopplerEnabled(this EventDescription eventDescription) + { + TryIsDopplerEnabled(eventDescription, out var doppler).Check(); + return doppler; + } + + /// + /// + /// Retrieves whether the event has any sustain points. + /// + /// + /// Studio::EventDescription::hasSustainPoint + /// + /// + public static unsafe Result TryHasSustainPoint(this EventDescription eventDescription, out Bool32 sustainPoint) + { + fixed (Bool32* sustainPointPtr = &sustainPoint) + return PInvoke.EventDescriptionHasSustainPoint(eventDescription, sustainPointPtr); + } + + /// + /// + /// Retrieves whether the event has any sustain points. + /// + /// + /// Studio::EventDescription::hasSustainPoint + /// + /// + public static Bool32 HasSustainPoint(this EventDescription eventDescription) + { + TryHasSustainPoint(eventDescription, out var sustainPoint).Check(); + return sustainPoint; + } + + /// + /// + /// Creates a playable instance. + /// + /// + /// Studio::EventDescription::createInstance + /// + /// + public static unsafe Result TryCreateInstance( + this EventDescription eventDescription, + out EventInstance instance + ) + { + fixed (EventInstance* instancePtr = &instance) + return PInvoke.EventDescriptionCreateInstance(eventDescription, instancePtr); + } + + /// + /// + /// Creates a playable instance. + /// + /// + /// Studio::EventDescription::createInstance + /// + /// + public static EventInstance CreateInstance(this EventDescription eventDescription) + { + TryCreateInstance(eventDescription, out var instance).Check(); + return instance; + } + + /// + /// + /// Retrieves the number of instances. + /// + /// + /// Studio::EventDescription::getInstanceCount + /// + /// + public static unsafe Result TryGetInstanceCount(this EventDescription eventDescription, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.EventDescriptionGetInstanceCount(eventDescription, countPtr); + } + + /// + /// + /// Retrieves the number of instances. + /// + /// + /// Studio::EventDescription::getInstanceCount + /// + /// + public static int GetInstanceCount(this EventDescription eventDescription) + { + TryGetInstanceCount(eventDescription, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a list of the instances. + /// + /// + /// Studio::EventDescription::getInstanceList + /// + /// + public static unsafe Result TryGetInstanceList( + this EventDescription eventDescription, + out EventInstance array, + int capacity, + out int count + ) + { + fixed (EventInstance* arrayPtr = &array) + fixed (int* countPtr = &count) + return PInvoke.EventDescriptionGetInstanceList(eventDescription, arrayPtr, capacity, countPtr); + } + + /// + /// + /// Retrieves a list of the instances. + /// + /// + /// Studio::EventDescription::getInstanceList + /// + /// + public static void GetInstanceList( + this EventDescription eventDescription, + out EventInstance array, + int capacity, + out int count + ) => TryGetInstanceList(eventDescription, out array, capacity, out count).Check(); + + /// + /// + /// Loads non-streaming sample data used by the event. + /// + /// + /// This function will load all non-streaming sample data required by the event and any referenced events. + /// + /// + /// Sample data is loaded asynchronously, Studio::EventDescription::getSampleLoadingState may be used to + /// poll the loading state. + /// + /// + /// See Also: Studio::EventDescription::unloadSampleData, Sample Data Loading + /// + /// + /// Studio::EventDescription::loadSampleData + /// + /// + public static Result TryLoadSampleData(this EventDescription eventDescription) => + PInvoke.EventDescriptionLoadSampleData(eventDescription); + + /// + /// + /// Loads non-streaming sample data used by the event. + /// + /// + /// This function will load all non-streaming sample data required by the event and any referenced events. + /// + /// + /// Sample data is loaded asynchronously, Studio::EventDescription::getSampleLoadingState may be used to + /// poll the loading state. + /// + /// + /// See Also: Studio::EventDescription::unloadSampleData, Sample Data Loading + /// + /// + /// Studio::EventDescription::loadSampleData + /// + /// + public static void LoadSampleData(this EventDescription eventDescription) => + TryLoadSampleData(eventDescription).Check(); + + /// + /// + /// Unloads all non-streaming sample data. + /// + /// + /// Sample data will not be unloaded until all instances of the event are released. + /// + /// + /// See Also: Studio::EventDescription::loadSampleData, Sample Data Loading + /// + /// + /// Studio::EventDescription::unloadSampleData + /// + /// + public static Result TryUnloadSampleData(this EventDescription eventDescription) => + PInvoke.EventDescriptionUnloadSampleData(eventDescription); + + /// + /// + /// Unloads all non-streaming sample data. + /// + /// + /// Sample data will not be unloaded until all instances of the event are released. + /// + /// + /// See Also: Studio::EventDescription::loadSampleData, Sample Data Loading + /// + /// + /// Studio::EventDescription::unloadSampleData + /// + /// + public static void UnloadSampleData(this EventDescription eventDescription) => + TryUnloadSampleData(eventDescription).Check(); + + /// + /// + /// Retrieves the sample data loading state. + /// + /// + /// Studio::EventDescription::getSampleLoadingState + /// + /// + public static unsafe Result TryGetSampleLoadingState( + this EventDescription eventDescription, + out LoadingState state + ) + { + fixed (LoadingState* statePtr = &state) + return PInvoke.EventDescriptionGetSampleLoadingState(eventDescription, statePtr); + } + + /// + /// + /// Retrieves the sample data loading state. + /// + /// + /// Studio::EventDescription::getSampleLoadingState + /// + /// + public static LoadingState GetSampleLoadingState(this EventDescription eventDescription) + { + TryGetSampleLoadingState(eventDescription, out var state).Check(); + return state; + } + + /// + /// + /// Releases all instances. + /// + /// + /// This function immediately stops and releases all instances of the event. + /// + /// + /// See Also: Studio::EventInstance::release + /// + /// + /// Studio::EventDescription::releaseAllInstances + /// + /// + public static Result TryReleaseAllInstances(this EventDescription eventDescription) => + PInvoke.EventDescriptionReleaseAllInstances(eventDescription); + + /// + /// + /// Releases all instances. + /// + /// + /// This function immediately stops and releases all instances of the event. + /// + /// + /// See Also: Studio::EventInstance::release + /// + /// + /// Studio::EventDescription::releaseAllInstances + /// + /// + public static void ReleaseAllInstances(this EventDescription eventDescription) => + TryReleaseAllInstances(eventDescription).Check(); + + /// + /// + /// Sets the user callback. + /// + /// + /// Studio::EventDescription::setCallback + /// + /// + public static Result TrySetCallback( + this EventDescription eventDescription, + EventCallbackPtr callback, + EventCallbackType callbackMask + ) => PInvoke.EventDescriptionSetCallback(eventDescription, callback, callbackMask); + + /// + /// + /// Sets the user callback. + /// + /// + /// Studio::EventDescription::setCallback + /// + /// + public static void SetCallback( + this EventDescription eventDescription, + EventCallbackPtr callback, + EventCallbackType callbackMask + ) => TrySetCallback(eventDescription, callback, callbackMask).Check(); + + /// + /// + /// Retrieves the event user data. + /// + /// + /// Studio::EventDescription::getUserData + /// + /// + public static unsafe Result TryGetUserData(this EventDescription eventDescription, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.EventDescriptionGetUserData(eventDescription, userDataPtr); + } + + /// + /// + /// Retrieves the event user data. + /// + /// + /// Studio::EventDescription::getUserData + /// + /// + public static nint GetUserData(this EventDescription eventDescription) + { + TryGetUserData(eventDescription, out var userData).Check(); + return userData; + } + + /// + /// + /// Sets the event user data. + /// + /// + /// Studio::EventDescription::setUserData + /// + /// + public static Result TrySetUserData(this EventDescription eventDescription, nint userData) => + PInvoke.EventDescriptionSetUserData(eventDescription, userData); + + /// + /// + /// Sets the event user data. + /// + /// + /// Studio::EventDescription::setUserData + /// + /// + public static void SetUserData(this EventDescription eventDescription, nint userData) => + TrySetUserData(eventDescription, userData).Check(); + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventInstance.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventInstance.gen.cs new file mode 100644 index 0000000..b42a6a0 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.EventInstance.gen.cs @@ -0,0 +1,1123 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the EventInstance reference is valid. + /// + /// + /// Studio::EventInstance::isValid + /// + /// + public static Bool32 IsValid(this EventInstance eventInstance) => PInvoke.EventInstanceIsValid(eventInstance); + + /// + /// + /// Retrieves the event description. + /// + /// + /// Studio::EventInstance::getDescription + /// + /// + public static unsafe Result TryGetDescription( + this EventInstance eventInstance, + out EventDescription description + ) + { + fixed (EventDescription* descriptionPtr = &description) + return PInvoke.EventInstanceGetDescription(eventInstance, descriptionPtr); + } + + /// + /// + /// Retrieves the event description. + /// + /// + /// Studio::EventInstance::getDescription + /// + /// + public static EventDescription GetDescription(this EventInstance eventInstance) + { + TryGetDescription(eventInstance, out var description).Check(); + return description; + } + + /// + /// + /// Retrieves the FMOD Studio System. + /// + /// + /// Studio::EventInstance::getSystem + /// + /// + public static unsafe Result TryGetSystem(this EventInstance eventInstance, out FmodStudioSystem system) + { + fixed (FmodStudioSystem* systemPtr = &system) + return PInvoke.EventInstanceGetSystem(eventInstance, systemPtr); + } + + /// + /// + /// Retrieves the FMOD Studio System. + /// + /// + /// Studio::EventInstance::getSystem + /// + /// + public static FmodStudioSystem GetSystem(this EventInstance eventInstance) + { + TryGetSystem(eventInstance, out var system).Check(); + return system; + } + + /// + /// + /// Retrieves the volume level. + /// + /// + /// Studio::EventInstance::getVolume + /// + /// + public static unsafe Result TryGetVolume( + this EventInstance eventInstance, + out float volume, + out float finalVolume + ) + { + fixed (float* volumePtr = &volume) + fixed (float* finalVolumePtr = &finalVolume) + return PInvoke.EventInstanceGetVolume(eventInstance, volumePtr, finalVolumePtr); + } + + /// + /// + /// Retrieves the volume level. + /// + /// + /// Studio::EventInstance::getVolume + /// + /// + public static void GetVolume(this EventInstance eventInstance, out float volume, out float finalVolume) => + TryGetVolume(eventInstance, out volume, out finalVolume).Check(); + + /// + /// + /// Sets the volume level. + /// + /// + /// Studio::EventInstance::setVolume + /// + /// + public static Result TrySetVolume(this EventInstance eventInstance, float volume) => + PInvoke.EventInstanceSetVolume(eventInstance, volume); + + /// + /// + /// Sets the volume level. + /// + /// + /// Studio::EventInstance::setVolume + /// + /// + public static void SetVolume(this EventInstance eventInstance, float volume) => + TrySetVolume(eventInstance, volume).Check(); + + /// + /// + /// Retrieves the pitch multiplier. + /// + /// + /// Studio::EventInstance::getPitch + /// + /// + public static unsafe Result TryGetPitch(this EventInstance eventInstance, out float pitch, out float finalPitch) + { + fixed (float* pitchPtr = &pitch) + fixed (float* finalPitchPtr = &finalPitch) + return PInvoke.EventInstanceGetPitch(eventInstance, pitchPtr, finalPitchPtr); + } + + /// + /// + /// Retrieves the pitch multiplier. + /// + /// + /// Studio::EventInstance::getPitch + /// + /// + public static void GetPitch(this EventInstance eventInstance, out float pitch, out float finalPitch) => + TryGetPitch(eventInstance, out pitch, out finalPitch).Check(); + + /// + /// + /// Sets the pitch multiplier. + /// + /// + /// Studio::EventInstance::setPitch + /// + /// + public static Result TrySetPitch(this EventInstance eventInstance, float pitch) => + PInvoke.EventInstanceSetPitch(eventInstance, pitch); + + /// + /// + /// Sets the pitch multiplier. + /// + /// + /// Studio::EventInstance::setPitch + /// + /// + public static void SetPitch(this EventInstance eventInstance, float pitch) => + TrySetPitch(eventInstance, pitch).Check(); + + /// + /// + /// Retrieves the 3D attributes. + /// + /// + /// Studio::EventInstance::get3DAttributes + /// + /// + public static unsafe Result TryGet3dAttributes(this EventInstance eventInstance, out Attributes3d attributes) + { + fixed (Attributes3d* attributesPtr = &attributes) + return PInvoke.EventInstanceGet3dAttributes(eventInstance, attributesPtr); + } + + /// + /// + /// Retrieves the 3D attributes. + /// + /// + /// Studio::EventInstance::get3DAttributes + /// + /// + public static Attributes3d Get3dAttributes(this EventInstance eventInstance) + { + TryGet3dAttributes(eventInstance, out var attributes).Check(); + return attributes; + } + + /// + /// + /// Sets the 3D attributes. + /// + /// + /// Studio::EventInstance::set3DAttributes + /// + /// + public static unsafe Result TrySet3dAttributes(this EventInstance eventInstance, in Attributes3d attributes) + { + fixed (Attributes3d* attributesPtr = &attributes) + return PInvoke.EventInstanceSet3dAttributes(eventInstance, attributesPtr); + } + + /// + /// + /// Sets the 3D attributes. + /// + /// + /// Studio::EventInstance::set3DAttributes + /// + /// + public static void Set3dAttributes(this EventInstance eventInstance, in Attributes3d attributes) => + TrySet3dAttributes(eventInstance, attributes).Check(); + + /// + /// + /// Retrieves the listener mask. + /// + /// + /// Studio::EventInstance::getListenerMask + /// + /// + public static unsafe Result TryGetListenerMask(this EventInstance eventInstance, out uint mask) + { + fixed (uint* maskPtr = &mask) + return PInvoke.EventInstanceGetListenerMask(eventInstance, maskPtr); + } + + /// + /// + /// Retrieves the listener mask. + /// + /// + /// Studio::EventInstance::getListenerMask + /// + /// + public static uint GetListenerMask(this EventInstance eventInstance) + { + TryGetListenerMask(eventInstance, out var mask).Check(); + return mask; + } + + /// + /// + /// Sets the listener mask. + /// + /// + /// Studio::EventInstance::setListenerMask + /// + /// + public static Result TrySetListenerMask(this EventInstance eventInstance, uint mask) => + PInvoke.EventInstanceSetListenerMask(eventInstance, mask); + + /// + /// + /// Sets the listener mask. + /// + /// + /// Studio::EventInstance::setListenerMask + /// + /// + public static void SetListenerMask(this EventInstance eventInstance, uint mask) => + TrySetListenerMask(eventInstance, mask).Check(); + + /// + /// + /// Retrieves the value of a built-in property. + /// + /// + /// Studio::EventInstance::getProperty + /// + /// + public static unsafe Result TryGetProperty( + this EventInstance eventInstance, + EventProperty index, + out float value + ) + { + fixed (float* valuePtr = &value) + return PInvoke.EventInstanceGetProperty(eventInstance, index, valuePtr); + } + + /// + /// + /// Retrieves the value of a built-in property. + /// + /// + /// Studio::EventInstance::getProperty + /// + /// + public static float GetProperty(this EventInstance eventInstance, EventProperty index) + { + TryGetProperty(eventInstance, index, out var value).Check(); + return value; + } + + /// + /// + /// Sets the value of a built-in property. + /// + /// + /// Studio::EventInstance::setProperty + /// + /// + public static Result TrySetProperty(this EventInstance eventInstance, EventProperty index, float value) => + PInvoke.EventInstanceSetProperty(eventInstance, index, value); + + /// + /// + /// Sets the value of a built-in property. + /// + /// + /// Studio::EventInstance::setProperty + /// + /// + public static void SetProperty(this EventInstance eventInstance, EventProperty index, float value) => + TrySetProperty(eventInstance, index, value).Check(); + + /// + /// + /// Retrieves the core reverb send level. + /// + /// + /// Studio::EventInstance::getReverbLevel + /// + /// + public static unsafe Result TryGetReverbLevel(this EventInstance eventInstance, int index, out float level) + { + fixed (float* levelPtr = &level) + return PInvoke.EventInstanceGetReverbLevel(eventInstance, index, levelPtr); + } + + /// + /// + /// Retrieves the core reverb send level. + /// + /// + /// Studio::EventInstance::getReverbLevel + /// + /// + public static float GetReverbLevel(this EventInstance eventInstance, int index) + { + TryGetReverbLevel(eventInstance, index, out var level).Check(); + return level; + } + + /// + /// + /// Sets the core reverb send level. + /// + /// + /// Studio::EventInstance::setReverbLevel + /// + /// + public static Result TrySetReverbLevel(this EventInstance eventInstance, int index, float level) => + PInvoke.EventInstanceSetReverbLevel(eventInstance, index, level); + + /// + /// + /// Sets the core reverb send level. + /// + /// + /// Studio::EventInstance::setReverbLevel + /// + /// + public static void SetReverbLevel(this EventInstance eventInstance, int index, float level) => + TrySetReverbLevel(eventInstance, index, level).Check(); + + /// + /// + /// Retrieves the pause state. + /// + /// + /// Studio::EventInstance::getPaused + /// + /// + public static unsafe Result TryGetPaused(this EventInstance eventInstance, out Bool32 paused) + { + fixed (Bool32* pausedPtr = &paused) + return PInvoke.EventInstanceGetPaused(eventInstance, pausedPtr); + } + + /// + /// + /// Retrieves the pause state. + /// + /// + /// Studio::EventInstance::getPaused + /// + /// + public static Bool32 GetPaused(this EventInstance eventInstance) + { + TryGetPaused(eventInstance, out var paused).Check(); + return paused; + } + + /// + /// + /// Sets the pause state. + /// + /// + /// Studio::EventInstance::setPaused + /// + /// + public static Result TrySetPaused(this EventInstance eventInstance, Bool32 paused) => + PInvoke.EventInstanceSetPaused(eventInstance, paused); + + /// + /// + /// Sets the pause state. + /// + /// + /// Studio::EventInstance::setPaused + /// + /// + public static void SetPaused(this EventInstance eventInstance, Bool32 paused) => + TrySetPaused(eventInstance, paused).Check(); + + /// + /// + /// Starts playback. + /// + /// + /// If the instance was already playing then calling this function will restart the event. + /// + /// + /// Generally it is a best practice to call Studio::EventInstance::release on event instances immediately + /// after starting them, unless you want to play the event instance multiple times or explicitly stop it and + /// start it again later. + /// + /// + /// See Also: Studio::EventInstance::stop, Sample Data Loading + /// + /// + /// Studio::EventInstance::start + /// + /// + public static Result TryStart(this EventInstance eventInstance) => PInvoke.EventInstanceStart(eventInstance); + + /// + /// + /// Starts playback. + /// + /// + /// If the instance was already playing then calling this function will restart the event. + /// + /// + /// Generally it is a best practice to call Studio::EventInstance::release on event instances immediately + /// after starting them, unless you want to play the event instance multiple times or explicitly stop it and + /// start it again later. + /// + /// + /// See Also: Studio::EventInstance::stop, Sample Data Loading + /// + /// + /// Studio::EventInstance::start + /// + /// + public static void Start(this EventInstance eventInstance) => TryStart(eventInstance).Check(); + + /// + /// + /// Stops playback. + /// + /// + /// Studio::EventInstance::stop + /// + /// + public static Result TryStop(this EventInstance eventInstance, StopMode mode) => + PInvoke.EventInstanceStop(eventInstance, mode); + + /// + /// + /// Stops playback. + /// + /// + /// Studio::EventInstance::stop + /// + /// + public static void Stop(this EventInstance eventInstance, StopMode mode) => + TryStop(eventInstance, mode).Check(); + + /// + /// + /// Retrieves the timeline cursor position. + /// + /// + /// Studio::EventInstance::getTimelinePosition + /// + /// + public static unsafe Result TryGetTimelinePosition(this EventInstance eventInstance, out int position) + { + fixed (int* positionPtr = &position) + return PInvoke.EventInstanceGetTimelinePosition(eventInstance, positionPtr); + } + + /// + /// + /// Retrieves the timeline cursor position. + /// + /// + /// Studio::EventInstance::getTimelinePosition + /// + /// + public static int GetTimelinePosition(this EventInstance eventInstance) + { + TryGetTimelinePosition(eventInstance, out var position).Check(); + return position; + } + + /// + /// + /// Sets the timeline cursor position. + /// + /// + /// Studio::EventInstance::setTimelinePosition + /// + /// + public static Result TrySetTimelinePosition(this EventInstance eventInstance, int position) => + PInvoke.EventInstanceSetTimelinePosition(eventInstance, position); + + /// + /// + /// Sets the timeline cursor position. + /// + /// + /// Studio::EventInstance::setTimelinePosition + /// + /// + public static void SetTimelinePosition(this EventInstance eventInstance, int position) => + TrySetTimelinePosition(eventInstance, position).Check(); + + /// + /// + /// Retrieves the playback state. + /// + /// + /// Studio::EventInstance::getPlaybackState + /// + /// + public static unsafe Result TryGetPlaybackState(this EventInstance eventInstance, out PlaybackState state) + { + fixed (PlaybackState* statePtr = &state) + return PInvoke.EventInstanceGetPlaybackState(eventInstance, statePtr); + } + + /// + /// + /// Retrieves the playback state. + /// + /// + /// Studio::EventInstance::getPlaybackState + /// + /// + public static PlaybackState GetPlaybackState(this EventInstance eventInstance) + { + TryGetPlaybackState(eventInstance, out var state).Check(); + return state; + } + + /// + /// + /// Retrieves the core ChannelGroup. + /// + /// + /// Studio::EventInstance::getChannelGroup + /// + /// + public static unsafe Result TryGetChannelGroup(this EventInstance eventInstance, out ChannelGroup group) + { + fixed (ChannelGroup* groupPtr = &group) + return PInvoke.EventInstanceGetChannelGroup(eventInstance, groupPtr); + } + + /// + /// + /// Retrieves the core ChannelGroup. + /// + /// + /// Studio::EventInstance::getChannelGroup + /// + /// + public static ChannelGroup GetChannelGroup(this EventInstance eventInstance) + { + TryGetChannelGroup(eventInstance, out var group).Check(); + return group; + } + + /// + /// + /// Retrieves the minimum and maximum distances for 3D attenuation. + /// + /// + /// Studio::EventInstance::getMinMaxDistance + /// + /// + public static unsafe Result TryGetMinMaxDistance(this EventInstance eventInstance, out float min, out float max) + { + fixed (float* minPtr = &min) + fixed (float* maxPtr = &max) + return PInvoke.EventInstanceGetMinMaxDistance(eventInstance, minPtr, maxPtr); + } + + /// + /// + /// Retrieves the minimum and maximum distances for 3D attenuation. + /// + /// + /// Studio::EventInstance::getMinMaxDistance + /// + /// + public static void GetMinMaxDistance(this EventInstance eventInstance, out float min, out float max) => + TryGetMinMaxDistance(eventInstance, out min, out max).Check(); + + /// + /// + /// Marks the event instance for release. + /// + /// + /// This function marks the event instance to be released. Event instances marked for release are destroyed + /// by the asynchronous update when they are in the stopped state (FMOD_STUDIO_PLAYBACK_STOPPED). + /// + /// + /// Generally it is a best practice to release event instances immediately after calling + /// Studio::EventInstance::start, unless you want to play the event instance multiple times or explicitly + /// stop it and start it again later. It is possible to interact with the instance after falling + /// release(), however if the sound has stopped ERR_INVALID_HANDLE will be returned. + /// + /// + /// See Also: Studio::EventInstance::stop, Studio::EventInstance::getPlaybackState + /// + /// + /// Studio::EventInstance::release + /// + /// + public static Result TryRelease(this EventInstance eventInstance) => + PInvoke.EventInstanceRelease(eventInstance); + + /// + /// + /// Marks the event instance for release. + /// + /// + /// This function marks the event instance to be released. Event instances marked for release are destroyed + /// by the asynchronous update when they are in the stopped state (FMOD_STUDIO_PLAYBACK_STOPPED). + /// + /// + /// Generally it is a best practice to release event instances immediately after calling + /// Studio::EventInstance::start, unless you want to play the event instance multiple times or explicitly + /// stop it and start it again later. It is possible to interact with the instance after falling + /// release(), however if the sound has stopped ERR_INVALID_HANDLE will be returned. + /// + /// + /// See Also: Studio::EventInstance::stop, Studio::EventInstance::getPlaybackState + /// + /// + /// Studio::EventInstance::release + /// + /// + public static void Release(this EventInstance eventInstance) => TryRelease(eventInstance).Check(); + + /// + /// + /// Retrieves the virtualization state. + /// + /// + /// Studio::EventInstance::isVirtual + /// + /// + public static unsafe Result TryIsVirtual(this EventInstance eventInstance, out Bool32 virtualState) + { + fixed (Bool32* virtualStatePtr = &virtualState) + return PInvoke.EventInstanceIsVirtual(eventInstance, virtualStatePtr); + } + + /// + /// + /// Retrieves the virtualization state. + /// + /// + /// Studio::EventInstance::isVirtual + /// + /// + public static Bool32 IsVirtual(this EventInstance eventInstance) + { + TryIsVirtual(eventInstance, out var virtualState).Check(); + return virtualState; + } + + /// + /// + /// Retrieves a parameter value by name, including the path if needed. + /// + /// + /// Studio::EventInstance::getParameterByName + /// + /// + public static unsafe Result TryGetParameterByName( + this EventInstance eventInstance, + RefString8 name, + out float value, + out float finalValue + ) + { + fixed (byte* namePtr = name) + fixed (float* valuePtr = &value) + fixed (float* finalValuePtr = &finalValue) + return PInvoke.EventInstanceGetParameterByName(eventInstance, namePtr, valuePtr, finalValuePtr); + } + + /// + /// + /// Retrieves a parameter value by name, including the path if needed. + /// + /// + /// Studio::EventInstance::getParameterByName + /// + /// + public static void GetParameterByName( + this EventInstance eventInstance, + RefString8 name, + out float value, + out float finalValue + ) => TryGetParameterByName(eventInstance, name, out value, out finalValue).Check(); + + /// + /// + /// Sets a parameter value by name, including the path if needed. + /// + /// + /// Studio::EventInstance::setParameterByName + /// + /// + public static unsafe Result TrySetParameterByName( + this EventInstance eventInstance, + RefString8 name, + float value, + Bool32 ignoreSeekSpeed + ) + { + fixed (byte* namePtr = name) + return PInvoke.EventInstanceSetParameterByName(eventInstance, namePtr, value, ignoreSeekSpeed); + } + + /// + /// + /// Sets a parameter value by name, including the path if needed. + /// + /// + /// Studio::EventInstance::setParameterByName + /// + /// + public static void SetParameterByName( + this EventInstance eventInstance, + RefString8 name, + float value, + Bool32 ignoreSeekSpeed + ) => TrySetParameterByName(eventInstance, name, value, ignoreSeekSpeed).Check(); + + /// + /// + /// Sets a parameter value by name, including the path if needed, looking up the value label. + /// + /// + /// Studio::EventInstance::setParameterByNameWithLabel + /// + /// + public static unsafe Result TrySetParameterByNameWithLabel( + this EventInstance eventInstance, + RefString8 name, + RefString8 label, + Bool32 ignoreSeekSpeed + ) + { + fixed (byte* namePtr = name) + fixed (byte* labelPtr = label) + return PInvoke.EventInstanceSetParameterByNameWithLabel( + eventInstance, + namePtr, + labelPtr, + ignoreSeekSpeed + ); + } + + /// + /// + /// Sets a parameter value by name, including the path if needed, looking up the value label. + /// + /// + /// Studio::EventInstance::setParameterByNameWithLabel + /// + /// + public static void SetParameterByNameWithLabel( + this EventInstance eventInstance, + RefString8 name, + RefString8 label, + Bool32 ignoreSeekSpeed + ) => TrySetParameterByNameWithLabel(eventInstance, name, label, ignoreSeekSpeed).Check(); + + /// + /// + /// Retrieves a parameter value by unique identifier. + /// + /// + /// Studio::EventInstance::getParameterByID + /// + /// + public static unsafe Result TryGetParameterById( + this EventInstance eventInstance, + ParameterId id, + out float value, + out float finalValue + ) + { + fixed (float* valuePtr = &value) + fixed (float* finalValuePtr = &finalValue) + return PInvoke.EventInstanceGetParameterById(eventInstance, id, valuePtr, finalValuePtr); + } + + /// + /// + /// Retrieves a parameter value by unique identifier. + /// + /// + /// Studio::EventInstance::getParameterByID + /// + /// + public static void GetParameterById( + this EventInstance eventInstance, + ParameterId id, + out float value, + out float finalValue + ) => TryGetParameterById(eventInstance, id, out value, out finalValue).Check(); + + /// + /// + /// Sets a parameter value by unique identifier. + /// + /// + /// Studio::EventInstance::setParameterByID + /// + /// + public static Result TrySetParameterById( + this EventInstance eventInstance, + ParameterId id, + float value, + Bool32 ignoreSeekSpeed + ) => PInvoke.EventInstanceSetParameterById(eventInstance, id, value, ignoreSeekSpeed); + + /// + /// + /// Sets a parameter value by unique identifier. + /// + /// + /// Studio::EventInstance::setParameterByID + /// + /// + public static void SetParameterById( + this EventInstance eventInstance, + ParameterId id, + float value, + Bool32 ignoreSeekSpeed + ) => TrySetParameterById(eventInstance, id, value, ignoreSeekSpeed).Check(); + + /// + /// + /// Sets a parameter value by unique identifier, looking up the value label. + /// + /// + /// Studio::EventInstance::setParameterByIDWithLabel + /// + /// + public static unsafe Result TrySetParameterByIdWithLabel( + this EventInstance eventInstance, + ParameterId id, + RefString8 label, + Bool32 ignoreSeekSpeed + ) + { + fixed (byte* labelPtr = label) + return PInvoke.EventInstanceSetParameterByIdWithLabel(eventInstance, id, labelPtr, ignoreSeekSpeed); + } + + /// + /// + /// Sets a parameter value by unique identifier, looking up the value label. + /// + /// + /// Studio::EventInstance::setParameterByIDWithLabel + /// + /// + public static void SetParameterByIdWithLabel( + this EventInstance eventInstance, + ParameterId id, + RefString8 label, + Bool32 ignoreSeekSpeed + ) => TrySetParameterByIdWithLabel(eventInstance, id, label, ignoreSeekSpeed).Check(); + + /// + /// + /// Sets multiple parameter values by unique identifier. + /// + /// + /// Studio::EventInstance::setParametersByIDs + /// + /// + public static unsafe Result TrySetParametersByIDs( + this EventInstance eventInstance, + ParameterId* ids, + float* values, + int count, + Bool32 ignoreSeekSpeed + ) => PInvoke.EventInstanceSetParametersByIDs(eventInstance, ids, values, count, ignoreSeekSpeed); + + /// + /// + /// Sets multiple parameter values by unique identifier. + /// + /// + /// Studio::EventInstance::setParametersByIDs + /// + /// + public static unsafe void SetParametersByIDs( + this EventInstance eventInstance, + ParameterId* ids, + float* values, + int count, + Bool32 ignoreSeekSpeed + ) => TrySetParametersByIDs(eventInstance, ids, values, count, ignoreSeekSpeed).Check(); + + /// + /// + /// Allow an event to continue past a sustain point. + /// + /// + /// Multiple sustain points may be bypassed ahead of time and the key off count will be decremented each + /// time the timeline cursor passes a sustain point. + /// + /// + /// This function returns FMOD_ERR_EVENT_NOTFOUND if the event has no sustain points. + /// + /// + /// See Also: Studio::EventDescription::hasSustainPoint + /// + /// + /// Studio::EventInstance::keyOff + /// + /// + public static Result TryKeyOff(this EventInstance eventInstance) => PInvoke.EventInstanceKeyOff(eventInstance); + + /// + /// + /// Allow an event to continue past a sustain point. + /// + /// + /// Multiple sustain points may be bypassed ahead of time and the key off count will be decremented each + /// time the timeline cursor passes a sustain point. + /// + /// + /// This function returns FMOD_ERR_EVENT_NOTFOUND if the event has no sustain points. + /// + /// + /// See Also: Studio::EventDescription::hasSustainPoint + /// + /// + /// Studio::EventInstance::keyOff + /// + /// + public static void KeyOff(this EventInstance eventInstance) => TryKeyOff(eventInstance).Check(); + + /// + /// + /// Sets the user callback. + /// + /// + /// Studio::EventInstance::setCallback + /// + /// + public static Result TrySetCallback( + this EventInstance eventInstance, + EventCallbackPtr callback, + EventCallbackType callbackMask + ) => PInvoke.EventInstanceSetCallback(eventInstance, callback, callbackMask); + + /// + /// + /// Sets the user callback. + /// + /// + /// Studio::EventInstance::setCallback + /// + /// + public static void SetCallback( + this EventInstance eventInstance, + EventCallbackPtr callback, + EventCallbackType callbackMask + ) => TrySetCallback(eventInstance, callback, callbackMask).Check(); + + /// + /// + /// Retrieves the event instance user data. + /// + /// + /// Studio::EventInstance::getUserData + /// + /// + public static unsafe Result TryGetUserData(this EventInstance eventInstance, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.EventInstanceGetUserData(eventInstance, userDataPtr); + } + + /// + /// + /// Retrieves the event instance user data. + /// + /// + /// Studio::EventInstance::getUserData + /// + /// + public static nint GetUserData(this EventInstance eventInstance) + { + TryGetUserData(eventInstance, out var userData).Check(); + return userData; + } + + /// + /// + /// Sets the event instance user data. + /// + /// + /// Studio::EventInstance::setUserData + /// + /// + public static Result TrySetUserData(this EventInstance eventInstance, nint userData) => + PInvoke.EventInstanceSetUserData(eventInstance, userData); + + /// + /// + /// Sets the event instance user data. + /// + /// + /// Studio::EventInstance::setUserData + /// + /// + public static void SetUserData(this EventInstance eventInstance, nint userData) => + TrySetUserData(eventInstance, userData).Check(); + + /// + /// + /// Retrieves the event CPU usage data. + /// + /// + /// Studio::EventInstance::getCPUUsage + /// + /// + public static unsafe Result TryGetCpuUsage( + this EventInstance eventInstance, + out uint exclusive, + out uint inclusive + ) + { + fixed (uint* exclusivePtr = &exclusive) + fixed (uint* inclusivePtr = &inclusive) + return PInvoke.EventInstanceGetCpuUsage(eventInstance, exclusivePtr, inclusivePtr); + } + + /// + /// + /// Retrieves the event CPU usage data. + /// + /// + /// Studio::EventInstance::getCPUUsage + /// + /// + public static void GetCpuUsage(this EventInstance eventInstance, out uint exclusive, out uint inclusive) => + TryGetCpuUsage(eventInstance, out exclusive, out inclusive).Check(); + + /// + /// + /// Retrieves memory usage statistics. + /// + /// + /// Studio::EventInstance::getMemoryUsage + /// + /// + public static unsafe Result TryGetMemoryUsage(this EventInstance eventInstance, out MemoryUsage memoryUsage) + { + fixed (MemoryUsage* memoryUsagePtr = &memoryUsage) + return PInvoke.EventInstanceGetMemoryUsage(eventInstance, memoryUsagePtr); + } + + /// + /// + /// Retrieves memory usage statistics. + /// + /// + /// Studio::EventInstance::getMemoryUsage + /// + /// + public static MemoryUsage GetMemoryUsage(this EventInstance eventInstance) + { + TryGetMemoryUsage(eventInstance, out var memoryUsage).Check(); + return memoryUsage; + } + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.FmodStudioSystem.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.FmodStudioSystem.gen.cs new file mode 100644 index 0000000..95d06e1 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.FmodStudioSystem.gen.cs @@ -0,0 +1,1813 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the System reference is valid and has been initialized. + /// + /// + /// Studio::System::isValid + /// + /// + public static Bool32 IsValid(this FmodStudioSystem system) => PInvoke.SystemIsValid(system); + + /// + /// + /// Sets advanced settings. + /// + /// + /// Studio::System::setAdvancedSettings + /// + /// + public static unsafe Result TrySetAdvancedSettings( + this FmodStudioSystem system, + in StudioAdvancedSettings settings + ) + { + fixed (StudioAdvancedSettings* settingsPtr = &settings) + return PInvoke.SystemSetAdvancedSettings(system, settingsPtr); + } + + /// + /// + /// Sets advanced settings. + /// + /// + /// Studio::System::setAdvancedSettings + /// + /// + public static void SetAdvancedSettings(this FmodStudioSystem system, in StudioAdvancedSettings settings) => + TrySetAdvancedSettings(system, settings).Check(); + + /// + /// + /// Retrieves advanced settings. + /// + /// + /// Studio::System::getAdvancedSettings + /// + /// + public static unsafe Result TryGetAdvancedSettings( + this FmodStudioSystem system, + out StudioAdvancedSettings settings + ) + { + fixed (StudioAdvancedSettings* settingsPtr = &settings) + return PInvoke.SystemGetAdvancedSettings(system, settingsPtr); + } + + /// + /// + /// Retrieves advanced settings. + /// + /// + /// Studio::System::getAdvancedSettings + /// + /// + public static StudioAdvancedSettings GetAdvancedSettings(this FmodStudioSystem system) + { + TryGetAdvancedSettings(system, out var settings).Check(); + return settings; + } + + /// + /// + /// Initializes the Studio System. + /// + /// + /// Studio::System::initialize + /// + /// + public static Result TryInitialize( + this FmodStudioSystem system, + int maxChannels, + StudioInitFlags studioFlags, + InitFlags flags, + nint extraDriverData + ) => PInvoke.SystemInitialize(system, maxChannels, studioFlags, flags, extraDriverData); + + /// + /// + /// Initializes the Studio System. + /// + /// + /// Studio::System::initialize + /// + /// + public static void Initialize( + this FmodStudioSystem system, + int maxChannels, + StudioInitFlags studioFlags, + InitFlags flags, + nint extraDriverData + ) => TryInitialize(system, maxChannels, studioFlags, flags, extraDriverData).Check(); + + /// + /// + /// Shut down and free the Studio System object. + /// + /// + /// This function will free the memory used by the Studio System object and everything created under it. + /// + /// + /// Studio::System::create and Studio::System::release are not thread-safe. Calling either of these + /// functions concurrently with any Studio API function (including these two functions) may cause undefined + /// behavior. External synchronization must be used if calls to Studio::System::create or + /// Studio::System::release could overlap other Studio API calls. All other Studio API functions are thread + /// safe and may be called freely from any thread unless otherwise documented. + /// + /// + /// All handles or pointers to objects associated with a Studio System object become invalid when the Studio + /// System object is released. The Studio API attempts to protect against stale handles and pointers being + /// used with a different Studio System object but this protection cannot be guaranteed and attempting to + /// use stale handles or pointers may cause undefined behavior. + /// + /// + /// See Also: Creating the Studio System + /// + /// + /// Studio::System::release + /// + /// + public static Result TryRelease(this FmodStudioSystem system) => PInvoke.SystemRelease(system); + + /// + /// + /// Shut down and free the Studio System object. + /// + /// + /// This function will free the memory used by the Studio System object and everything created under it. + /// + /// + /// Studio::System::create and Studio::System::release are not thread-safe. Calling either of these + /// functions concurrently with any Studio API function (including these two functions) may cause undefined + /// behavior. External synchronization must be used if calls to Studio::System::create or + /// Studio::System::release could overlap other Studio API calls. All other Studio API functions are thread + /// safe and may be called freely from any thread unless otherwise documented. + /// + /// + /// All handles or pointers to objects associated with a Studio System object become invalid when the Studio + /// System object is released. The Studio API attempts to protect against stale handles and pointers being + /// used with a different Studio System object but this protection cannot be guaranteed and attempting to + /// use stale handles or pointers may cause undefined behavior. + /// + /// + /// See Also: Creating the Studio System + /// + /// + /// Studio::System::release + /// + /// + public static void Release(this FmodStudioSystem system) => TryRelease(system).Check(); + + /// + /// + /// Update the studio system. + /// + /// + /// When Studio is initialized in the default asynchronous processing mode this function submits all + /// buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast + /// operation since the commands are not processed on the calling thread. If Studio is initialized with + /// FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates + /// since the last call to this function will be called. If an error occurred during any asynchronous + /// updates since the last call to this function then this function will return the error result. + /// + /// + /// When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed + /// immediately when calling this function, the scheduling and update logic for the Studio system are + /// executed and all callbacks are fired. This may block the calling thread for a substantial amount of + /// time. + /// + /// + /// See Also: Studio System Processing + /// + /// + /// Studio::System::update + /// + /// + public static Result TryUpdate(this FmodStudioSystem system) => PInvoke.SystemUpdate(system); + + /// + /// + /// Update the studio system. + /// + /// + /// When Studio is initialized in the default asynchronous processing mode this function submits all + /// buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast + /// operation since the commands are not processed on the calling thread. If Studio is initialized with + /// FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates + /// since the last call to this function will be called. If an error occurred during any asynchronous + /// updates since the last call to this function then this function will return the error result. + /// + /// + /// When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed + /// immediately when calling this function, the scheduling and update logic for the Studio system are + /// executed and all callbacks are fired. This may block the calling thread for a substantial amount of + /// time. + /// + /// + /// See Also: Studio System Processing + /// + /// + /// Studio::System::update + /// + /// + public static void Update(this FmodStudioSystem system) => TryUpdate(system).Check(); + + /// + /// + /// Retrieves the Core System. + /// + /// + /// Studio::System::getCoreSystem + /// + /// + public static unsafe Result TryGetCoreSystem(this FmodStudioSystem system, out FmodSystem coreSystem) + { + fixed (FmodSystem* coreSystemPtr = &coreSystem) + return PInvoke.SystemGetCoreSystem(system, coreSystemPtr); + } + + /// + /// + /// Retrieves the Core System. + /// + /// + /// Studio::System::getCoreSystem + /// + /// + public static FmodSystem GetCoreSystem(this FmodStudioSystem system) + { + TryGetCoreSystem(system, out var coreSystem).Check(); + return coreSystem; + } + + /// + /// + /// Retrieves an EventDescription of an event or snapshot with the specified file path. + /// + /// + /// Studio::System::getEvent + /// + /// + public static unsafe Result TryGetEvent( + this FmodStudioSystem system, + RefString8 pathOrId, + out EventDescription eventDescription + ) + { + fixed (byte* pathOrIdPtr = pathOrId) + fixed (EventDescription* eventDescriptionPtr = &eventDescription) + return PInvoke.SystemGetEvent(system, pathOrIdPtr, eventDescriptionPtr); + } + + /// + /// + /// Retrieves an EventDescription of an event or snapshot with the specified file path. + /// + /// + /// Studio::System::getEvent + /// + /// + public static EventDescription GetEvent(this FmodStudioSystem system, RefString8 pathOrId) + { + TryGetEvent(system, pathOrId, out var eventDescription).Check(); + return eventDescription; + } + + /// + /// + /// Retrieves a loaded bus. + /// + /// + /// Studio::System::getBus + /// + /// + public static unsafe Result TryGetBus(this FmodStudioSystem system, RefString8 pathOrId, out Bus bus) + { + fixed (byte* pathOrIdPtr = pathOrId) + fixed (Bus* busPtr = &bus) + return PInvoke.SystemGetBus(system, pathOrIdPtr, busPtr); + } + + /// + /// + /// Retrieves a loaded bus. + /// + /// + /// Studio::System::getBus + /// + /// + public static Bus GetBus(this FmodStudioSystem system, RefString8 pathOrId) + { + TryGetBus(system, pathOrId, out var bus).Check(); + return bus; + } + + /// + /// + /// Retrieves a loaded VCA. + /// + /// + /// Studio::System::getVCA + /// + /// + public static unsafe Result TryGetVca(this FmodStudioSystem system, RefString8 pathOrId, out Vca vca) + { + fixed (byte* pathOrIdPtr = pathOrId) + fixed (Vca* vcaPtr = &vca) + return PInvoke.SystemGetVca(system, pathOrIdPtr, vcaPtr); + } + + /// + /// + /// Retrieves a loaded VCA. + /// + /// + /// Studio::System::getVCA + /// + /// + public static Vca GetVca(this FmodStudioSystem system, RefString8 pathOrId) + { + TryGetVca(system, pathOrId, out var vca).Check(); + return vca; + } + + /// + /// + /// Retrieves a loaded bank with the specified file path. + /// + /// + /// Studio::System::getBank + /// + /// + public static unsafe Result TryGetBank(this FmodStudioSystem system, RefString8 pathOrId, out Bank bank) + { + fixed (byte* pathOrIdPtr = pathOrId) + fixed (Bank* bankPtr = &bank) + return PInvoke.SystemGetBank(system, pathOrIdPtr, bankPtr); + } + + /// + /// + /// Retrieves a loaded bank with the specified file path. + /// + /// + /// Studio::System::getBank + /// + /// + public static Bank GetBank(this FmodStudioSystem system, RefString8 pathOrId) + { + TryGetBank(system, pathOrId, out var bank).Check(); + return bank; + } + + /// + /// + /// Retrieves an EventDescription. + /// + /// + /// Studio::System::getEventByID + /// + /// + public static unsafe Result TryGetEventById( + this FmodStudioSystem system, + in Guid id, + out EventDescription eventDescription + ) + { + fixed (Guid* idPtr = &id) + fixed (EventDescription* eventDescriptionPtr = &eventDescription) + return PInvoke.SystemGetEventById(system, idPtr, eventDescriptionPtr); + } + + /// + /// + /// Retrieves an EventDescription. + /// + /// + /// Studio::System::getEventByID + /// + /// + public static EventDescription GetEventById(this FmodStudioSystem system, in Guid id) + { + TryGetEventById(system, id, out var eventDescription).Check(); + return eventDescription; + } + + /// + /// + /// Retrieves a loaded bus. + /// + /// + /// Studio::System::getBusByID + /// + /// + public static unsafe Result TryGetBusById(this FmodStudioSystem system, in Guid id, out Bus bus) + { + fixed (Guid* idPtr = &id) + fixed (Bus* busPtr = &bus) + return PInvoke.SystemGetBusById(system, idPtr, busPtr); + } + + /// + /// + /// Retrieves a loaded bus. + /// + /// + /// Studio::System::getBusByID + /// + /// + public static Bus GetBusById(this FmodStudioSystem system, in Guid id) + { + TryGetBusById(system, id, out var bus).Check(); + return bus; + } + + /// + /// + /// Retrieves a loaded VCA. + /// + /// + /// Studio::System::getVCAByID + /// + /// + public static unsafe Result TryGetVcaById(this FmodStudioSystem system, in Guid id, out Vca vca) + { + fixed (Guid* idPtr = &id) + fixed (Vca* vcaPtr = &vca) + return PInvoke.SystemGetVcaById(system, idPtr, vcaPtr); + } + + /// + /// + /// Retrieves a loaded VCA. + /// + /// + /// Studio::System::getVCAByID + /// + /// + public static Vca GetVcaById(this FmodStudioSystem system, in Guid id) + { + TryGetVcaById(system, id, out var vca).Check(); + return vca; + } + + /// + /// + /// Retrieves a loaded bank with the specified ID. + /// + /// + /// Studio::System::getBankByID + /// + /// + public static unsafe Result TryGetBankById(this FmodStudioSystem system, in Guid id, out Bank bank) + { + fixed (Guid* idPtr = &id) + fixed (Bank* bankPtr = &bank) + return PInvoke.SystemGetBankById(system, idPtr, bankPtr); + } + + /// + /// + /// Retrieves a loaded bank with the specified ID. + /// + /// + /// Studio::System::getBankByID + /// + /// + public static Bank GetBankById(this FmodStudioSystem system, in Guid id) + { + TryGetBankById(system, id, out var bank).Check(); + return bank; + } + + /// + /// + /// Retrieves information for loading a sound from the audio table. + /// + /// + /// Studio::System::getSoundInfo + /// + /// + public static unsafe Result TryGetSoundInfo(this FmodStudioSystem system, RefString8 key, out SoundInfo info) + { + fixed (byte* keyPtr = key) + fixed (SoundInfo* infoPtr = &info) + return PInvoke.SystemGetSoundInfo(system, keyPtr, infoPtr); + } + + /// + /// + /// Retrieves information for loading a sound from the audio table. + /// + /// + /// Studio::System::getSoundInfo + /// + /// + public static SoundInfo GetSoundInfo(this FmodStudioSystem system, RefString8 key) + { + TryGetSoundInfo(system, key, out var info).Check(); + return info; + } + + /// + /// + /// Retrieves a global parameter by name, including the path if needed. + /// + /// + /// Studio::System::getParameterDescriptionByName + /// + /// + public static unsafe Result TryGetParameterDescriptionByName( + this FmodStudioSystem system, + RefString8 name, + out ParameterDescription parameter + ) + { + fixed (byte* namePtr = name) + fixed (ParameterDescription* parameterPtr = ¶meter) + return PInvoke.SystemGetParameterDescriptionByName(system, namePtr, parameterPtr); + } + + /// + /// + /// Retrieves a global parameter by name, including the path if needed. + /// + /// + /// Studio::System::getParameterDescriptionByName + /// + /// + public static ParameterDescription GetParameterDescriptionByName(this FmodStudioSystem system, RefString8 name) + { + TryGetParameterDescriptionByName(system, name, out var parameter).Check(); + return parameter; + } + + /// + /// + /// Retrieves a global parameter by ID. + /// + /// + /// Studio::System::getParameterDescriptionByID + /// + /// + public static unsafe Result TryGetParameterDescriptionById( + this FmodStudioSystem system, + ParameterId id, + out ParameterDescription parameter + ) + { + fixed (ParameterDescription* parameterPtr = ¶meter) + return PInvoke.SystemGetParameterDescriptionById(system, id, parameterPtr); + } + + /// + /// + /// Retrieves a global parameter by ID. + /// + /// + /// Studio::System::getParameterDescriptionByID + /// + /// + public static ParameterDescription GetParameterDescriptionById(this FmodStudioSystem system, ParameterId id) + { + TryGetParameterDescriptionById(system, id, out var parameter).Check(); + return parameter; + } + + /// + /// + /// Retrieves a global parameter label by name, including the path if needed. + /// + /// + /// Studio::System::getParameterLabelByName + /// + /// + public static unsafe Result TryGetParameterLabelByName( + this FmodStudioSystem system, + RefString8 name, + int labelIndex, + byte* label, + int size, + out int retrieved + ) + { + fixed (byte* namePtr = name) + fixed (int* retrievedPtr = &retrieved) + return PInvoke.SystemGetParameterLabelByName(system, namePtr, labelIndex, label, size, retrievedPtr); + } + + /// + /// + /// Retrieves a global parameter label by name, including the path if needed. + /// + /// + /// Studio::System::getParameterLabelByName + /// + /// + public static unsafe int GetParameterLabelByName( + this FmodStudioSystem system, + RefString8 name, + int labelIndex, + byte* label, + int size + ) + { + TryGetParameterLabelByName(system, name, labelIndex, label, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves a global parameter label by ID. + /// + /// + /// Studio::System::getParameterLabelByID + /// + /// + public static unsafe Result TryGetParameterLabelById( + this FmodStudioSystem system, + ParameterId id, + int labelIndex, + byte* label, + int size, + out int retrieved + ) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.SystemGetParameterLabelById(system, id, labelIndex, label, size, retrievedPtr); + } + + /// + /// + /// Retrieves a global parameter label by ID. + /// + /// + /// Studio::System::getParameterLabelByID + /// + /// + public static unsafe int GetParameterLabelById( + this FmodStudioSystem system, + ParameterId id, + int labelIndex, + byte* label, + int size + ) + { + TryGetParameterLabelById(system, id, labelIndex, label, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves a global parameter value by unique identifier. + /// + /// + /// Studio::System::getParameterByID + /// + /// + public static unsafe Result TryGetParameterById( + this FmodStudioSystem system, + ParameterId id, + out float value, + out float finalValue + ) + { + fixed (float* valuePtr = &value) + fixed (float* finalValuePtr = &finalValue) + return PInvoke.SystemGetParameterById(system, id, valuePtr, finalValuePtr); + } + + /// + /// + /// Retrieves a global parameter value by unique identifier. + /// + /// + /// Studio::System::getParameterByID + /// + /// + public static void GetParameterById( + this FmodStudioSystem system, + ParameterId id, + out float value, + out float finalValue + ) => TryGetParameterById(system, id, out value, out finalValue).Check(); + + /// + /// + /// Sets a global parameter value by unique identifier. + /// + /// + /// Studio::System::setParameterByID + /// + /// + public static Result TrySetParameterById( + this FmodStudioSystem system, + ParameterId id, + float value, + Bool32 ignoreSeekSpeed + ) => PInvoke.SystemSetParameterById(system, id, value, ignoreSeekSpeed); + + /// + /// + /// Sets a global parameter value by unique identifier. + /// + /// + /// Studio::System::setParameterByID + /// + /// + public static void SetParameterById( + this FmodStudioSystem system, + ParameterId id, + float value, + Bool32 ignoreSeekSpeed + ) => TrySetParameterById(system, id, value, ignoreSeekSpeed).Check(); + + /// + /// + /// Sets a global parameter value by unique identifier, looking up the value label. + /// + /// + /// Studio::System::setParameterByIDWithLabel + /// + /// + public static unsafe Result TrySetParameterByIdWithLabel( + this FmodStudioSystem system, + ParameterId id, + RefString8 label, + Bool32 ignoreSeekSpeed + ) + { + fixed (byte* labelPtr = label) + return PInvoke.SystemSetParameterByIdWithLabel(system, id, labelPtr, ignoreSeekSpeed); + } + + /// + /// + /// Sets a global parameter value by unique identifier, looking up the value label. + /// + /// + /// Studio::System::setParameterByIDWithLabel + /// + /// + public static void SetParameterByIdWithLabel( + this FmodStudioSystem system, + ParameterId id, + RefString8 label, + Bool32 ignoreSeekSpeed + ) => TrySetParameterByIdWithLabel(system, id, label, ignoreSeekSpeed).Check(); + + /// + /// + /// Sets multiple global parameter values by unique identifier. + /// + /// + /// Studio::System::setParametersByIDs + /// + /// + public static unsafe Result TrySetParametersByIDs( + this FmodStudioSystem system, + ParameterId* ids, + float* values, + int count, + Bool32 ignoreSeekSpeed + ) => PInvoke.SystemSetParametersByIDs(system, ids, values, count, ignoreSeekSpeed); + + /// + /// + /// Sets multiple global parameter values by unique identifier. + /// + /// + /// Studio::System::setParametersByIDs + /// + /// + public static unsafe void SetParametersByIDs( + this FmodStudioSystem system, + ParameterId* ids, + float* values, + int count, + Bool32 ignoreSeekSpeed + ) => TrySetParametersByIDs(system, ids, values, count, ignoreSeekSpeed).Check(); + + /// + /// + /// Retrieves a global parameter value by name, including the path if needed. + /// + /// + /// Studio::System::getParameterByName + /// + /// + public static unsafe Result TryGetParameterByName( + this FmodStudioSystem system, + RefString8 name, + out float value, + out float finalValue + ) + { + fixed (byte* namePtr = name) + fixed (float* valuePtr = &value) + fixed (float* finalValuePtr = &finalValue) + return PInvoke.SystemGetParameterByName(system, namePtr, valuePtr, finalValuePtr); + } + + /// + /// + /// Retrieves a global parameter value by name, including the path if needed. + /// + /// + /// Studio::System::getParameterByName + /// + /// + public static void GetParameterByName( + this FmodStudioSystem system, + RefString8 name, + out float value, + out float finalValue + ) => TryGetParameterByName(system, name, out value, out finalValue).Check(); + + /// + /// + /// Sets a global parameter value by name, including the path if needed. + /// + /// + /// Studio::System::setParameterByName + /// + /// + public static unsafe Result TrySetParameterByName( + this FmodStudioSystem system, + RefString8 name, + float value, + Bool32 ignoreSeekSpeed + ) + { + fixed (byte* namePtr = name) + return PInvoke.SystemSetParameterByName(system, namePtr, value, ignoreSeekSpeed); + } + + /// + /// + /// Sets a global parameter value by name, including the path if needed. + /// + /// + /// Studio::System::setParameterByName + /// + /// + public static void SetParameterByName( + this FmodStudioSystem system, + RefString8 name, + float value, + Bool32 ignoreSeekSpeed + ) => TrySetParameterByName(system, name, value, ignoreSeekSpeed).Check(); + + /// + /// + /// Sets a global parameter value by name, including the path if needed, looking up the value label. + /// + /// + /// Studio::System::setParameterByNameWithLabel + /// + /// + public static unsafe Result TrySetParameterByNameWithLabel( + this FmodStudioSystem system, + RefString8 name, + RefString8 label, + Bool32 ignoreSeekSpeed + ) + { + fixed (byte* namePtr = name) + fixed (byte* labelPtr = label) + return PInvoke.SystemSetParameterByNameWithLabel(system, namePtr, labelPtr, ignoreSeekSpeed); + } + + /// + /// + /// Sets a global parameter value by name, including the path if needed, looking up the value label. + /// + /// + /// Studio::System::setParameterByNameWithLabel + /// + /// + public static void SetParameterByNameWithLabel( + this FmodStudioSystem system, + RefString8 name, + RefString8 label, + Bool32 ignoreSeekSpeed + ) => TrySetParameterByNameWithLabel(system, name, label, ignoreSeekSpeed).Check(); + + /// + /// + /// Retrieves the ID for a bank, event, snapshot, bus or VCA. + /// + /// + /// Studio::System::lookupID + /// + /// + public static unsafe Result TryLookupId(this FmodStudioSystem system, RefString8 path, out Guid id) + { + fixed (byte* pathPtr = path) + fixed (Guid* idPtr = &id) + return PInvoke.SystemLookupId(system, pathPtr, idPtr); + } + + /// + /// + /// Retrieves the ID for a bank, event, snapshot, bus or VCA. + /// + /// + /// Studio::System::lookupID + /// + /// + public static Guid LookupId(this FmodStudioSystem system, RefString8 path) + { + TryLookupId(system, path, out var id).Check(); + return id; + } + + /// + /// + /// Retrieves the path for a bank, event, snapshot, bus or VCA. + /// + /// + /// Studio::System::lookupPath + /// + /// + public static unsafe Result TryLookupPath( + this FmodStudioSystem system, + in Guid id, + byte* path, + int size, + out int retrieved + ) + { + fixed (Guid* idPtr = &id) + fixed (int* retrievedPtr = &retrieved) + return PInvoke.SystemLookupPath(system, idPtr, path, size, retrievedPtr); + } + + /// + /// + /// Retrieves the path for a bank, event, snapshot, bus or VCA. + /// + /// + /// Studio::System::lookupPath + /// + /// + public static unsafe int LookupPath(this FmodStudioSystem system, in Guid id, byte* path, int size) + { + TryLookupPath(system, id, path, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves the number of listeners. + /// + /// + /// Studio::System::getNumListeners + /// + /// + public static unsafe Result TryGetNumListeners(this FmodStudioSystem system, out int numListeners) + { + fixed (int* numListenersPtr = &numListeners) + return PInvoke.SystemGetNumListeners(system, numListenersPtr); + } + + /// + /// + /// Retrieves the number of listeners. + /// + /// + /// Studio::System::getNumListeners + /// + /// + public static int GetNumListeners(this FmodStudioSystem system) + { + TryGetNumListeners(system, out var numListeners).Check(); + return numListeners; + } + + /// + /// + /// Sets the number of listeners in the 3D sound scene. + /// + /// + /// Studio::System::setNumListeners + /// + /// + public static Result TrySetNumListeners(this FmodStudioSystem system, int numListeners) => + PInvoke.SystemSetNumListeners(system, numListeners); + + /// + /// + /// Sets the number of listeners in the 3D sound scene. + /// + /// + /// Studio::System::setNumListeners + /// + /// + public static void SetNumListeners(this FmodStudioSystem system, int numListeners) => + TrySetNumListeners(system, numListeners).Check(); + + /// + /// + /// Retrieves listener 3D attributes. + /// + /// + /// Studio::System::getListenerAttributes + /// + /// + public static unsafe Result TryGetListenerAttributes( + this FmodStudioSystem system, + int index, + out Attributes3d attributes, + out float3 attenuationPosition + ) + { + fixed (Attributes3d* attributesPtr = &attributes) + fixed (float3* attenuationPositionPtr = &attenuationPosition) + return PInvoke.SystemGetListenerAttributes(system, index, attributesPtr, attenuationPositionPtr); + } + + /// + /// + /// Retrieves listener 3D attributes. + /// + /// + /// Studio::System::getListenerAttributes + /// + /// + public static void GetListenerAttributes( + this FmodStudioSystem system, + int index, + out Attributes3d attributes, + out float3 attenuationPosition + ) => TryGetListenerAttributes(system, index, out attributes, out attenuationPosition).Check(); + + /// + /// + /// Sets the 3D attributes of the listener. + /// + /// + /// Studio::System::setListenerAttributes + /// + /// + public static unsafe Result TrySetListenerAttributes( + this FmodStudioSystem system, + int index, + in Attributes3d attributes, + in float3 attenuationPosition + ) + { + fixed (Attributes3d* attributesPtr = &attributes) + fixed (float3* attenuationPositionPtr = &attenuationPosition) + return PInvoke.SystemSetListenerAttributes(system, index, attributesPtr, attenuationPositionPtr); + } + + /// + /// + /// Sets the 3D attributes of the listener. + /// + /// + /// Studio::System::setListenerAttributes + /// + /// + public static void SetListenerAttributes( + this FmodStudioSystem system, + int index, + in Attributes3d attributes, + in float3 attenuationPosition + ) => TrySetListenerAttributes(system, index, attributes, attenuationPosition).Check(); + + /// + /// + /// Retrieves listener weighting. + /// + /// + /// Studio::System::getListenerWeight + /// + /// + public static unsafe Result TryGetListenerWeight(this FmodStudioSystem system, int index, out float weight) + { + fixed (float* weightPtr = &weight) + return PInvoke.SystemGetListenerWeight(system, index, weightPtr); + } + + /// + /// + /// Retrieves listener weighting. + /// + /// + /// Studio::System::getListenerWeight + /// + /// + public static float GetListenerWeight(this FmodStudioSystem system, int index) + { + TryGetListenerWeight(system, index, out var weight).Check(); + return weight; + } + + /// + /// + /// Sets the listener weighting. + /// + /// + /// Studio::System::setListenerWeight + /// + /// + public static Result TrySetListenerWeight(this FmodStudioSystem system, int index, float weight) => + PInvoke.SystemSetListenerWeight(system, index, weight); + + /// + /// + /// Sets the listener weighting. + /// + /// + /// Studio::System::setListenerWeight + /// + /// + public static void SetListenerWeight(this FmodStudioSystem system, int index, float weight) => + TrySetListenerWeight(system, index, weight).Check(); + + /// + /// + /// Loads the metadata of a bank. This does not load the bank's sample data. + /// + /// + /// Studio::System::loadBankFile + /// + /// + public static unsafe Result TryLoadBankFile( + this FmodStudioSystem system, + RefString8 fileName, + LoadBankFlags flags, + out Bank bank + ) + { + fixed (byte* fileNamePtr = fileName) + fixed (Bank* bankPtr = &bank) + return PInvoke.SystemLoadBankFile(system, fileNamePtr, flags, bankPtr); + } + + /// + /// + /// Loads the metadata of a bank. This does not load the bank's sample data. + /// + /// + /// Studio::System::loadBankFile + /// + /// + public static Bank LoadBankFile(this FmodStudioSystem system, RefString8 fileName, LoadBankFlags flags) + { + TryLoadBankFile(system, fileName, flags, out var bank).Check(); + return bank; + } + + /// + /// + /// Loads the metadata of a bank from memory. Does not load the bank's sample data. + /// + /// + /// Studio::System::loadBankMemory + /// + /// + public static unsafe Result TryLoadBankMemory( + this FmodStudioSystem system, + RefString8 buffer, + int length, + LoadMemoryMode mode, + LoadBankFlags flags, + out Bank bank + ) + { + fixed (byte* bufferPtr = buffer) + fixed (Bank* bankPtr = &bank) + return PInvoke.SystemLoadBankMemory(system, bufferPtr, length, mode, flags, bankPtr); + } + + /// + /// + /// Loads the metadata of a bank from memory. Does not load the bank's sample data. + /// + /// + /// Studio::System::loadBankMemory + /// + /// + public static Bank LoadBankMemory( + this FmodStudioSystem system, + RefString8 buffer, + int length, + LoadMemoryMode mode, + LoadBankFlags flags + ) + { + TryLoadBankMemory(system, buffer, length, mode, flags, out var bank).Check(); + return bank; + } + + /// + /// + /// Loads the metadata of a bank using custom read callbacks. + /// + /// + /// Studio::System::loadBankCustom + /// + /// + public static unsafe Result TryLoadBankCustom( + this FmodStudioSystem system, + in BankInfo info, + LoadBankFlags flags, + out Bank bank + ) + { + fixed (BankInfo* infoPtr = &info) + fixed (Bank* bankPtr = &bank) + return PInvoke.SystemLoadBankCustom(system, infoPtr, flags, bankPtr); + } + + /// + /// + /// Loads the metadata of a bank using custom read callbacks. + /// + /// + /// Studio::System::loadBankCustom + /// + /// + public static Bank LoadBankCustom(this FmodStudioSystem system, in BankInfo info, LoadBankFlags flags) + { + TryLoadBankCustom(system, info, flags, out var bank).Check(); + return bank; + } + + /// + /// + /// Registers a DSP plug-in. + /// + /// + /// Studio::System::registerPlugin + /// + /// + public static unsafe Result TryRegisterPlugin(this FmodStudioSystem system, in DspDescription description) + { + fixed (DspDescription* descriptionPtr = &description) + return PInvoke.SystemRegisterPlugin(system, descriptionPtr); + } + + /// + /// + /// Registers a DSP plug-in. + /// + /// + /// Studio::System::registerPlugin + /// + /// + public static void RegisterPlugin(this FmodStudioSystem system, in DspDescription description) => + TryRegisterPlugin(system, description).Check(); + + /// + /// + /// Unregisters a DSP plug-in. + /// + /// + /// Studio::System::unregisterPlugin + /// + /// + public static unsafe Result TryUnregisterPlugin(this FmodStudioSystem system, RefString8 name) + { + fixed (byte* namePtr = name) + return PInvoke.SystemUnregisterPlugin(system, namePtr); + } + + /// + /// + /// Unregisters a DSP plug-in. + /// + /// + /// Studio::System::unregisterPlugin + /// + /// + public static void UnregisterPlugin(this FmodStudioSystem system, RefString8 name) => + TryUnregisterPlugin(system, name).Check(); + + /// + /// + /// Unloads all currently loaded banks. + /// + /// + /// See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, + /// Studio::System::loadBankCustom + /// + /// + /// Studio::System::unloadAll + /// + /// + public static Result TryUnloadAll(this FmodStudioSystem system) => PInvoke.SystemUnloadAll(system); + + /// + /// + /// Unloads all currently loaded banks. + /// + /// + /// See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, + /// Studio::System::loadBankCustom + /// + /// + /// Studio::System::unloadAll + /// + /// + public static void UnloadAll(this FmodStudioSystem system) => TryUnloadAll(system).Check(); + + /// + /// + /// Block until all pending commands have been executed. + /// + /// + /// This function blocks the calling thread until all pending commands have been executed and all + /// non-blocking bank loads have been completed. + /// + /// + /// This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has + /// finished executing all pending commands. + /// + /// + /// See Also: Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading + /// + /// + /// Studio::System::flushCommands + /// + /// + public static Result TryFlushCommands(this FmodStudioSystem system) => PInvoke.SystemFlushCommands(system); + + /// + /// + /// Block until all pending commands have been executed. + /// + /// + /// This function blocks the calling thread until all pending commands have been executed and all + /// non-blocking bank loads have been completed. + /// + /// + /// This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has + /// finished executing all pending commands. + /// + /// + /// See Also: Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading + /// + /// + /// Studio::System::flushCommands + /// + /// + public static void FlushCommands(this FmodStudioSystem system) => TryFlushCommands(system).Check(); + + /// + /// + /// Block until all sample loading and unloading has completed. + /// + /// + /// See Also: Studio::System::flushCommands, Sample Data Loading + /// + /// + /// Studio::System::flushSampleLoading + /// + /// + public static Result TryFlushSampleLoading(this FmodStudioSystem system) => + PInvoke.SystemFlushSampleLoading(system); + + /// + /// + /// Block until all sample loading and unloading has completed. + /// + /// + /// See Also: Studio::System::flushCommands, Sample Data Loading + /// + /// + /// Studio::System::flushSampleLoading + /// + /// + public static void FlushSampleLoading(this FmodStudioSystem system) => TryFlushSampleLoading(system).Check(); + + /// + /// + /// Start recording Studio API commands to a file. + /// + /// + /// Studio::System::startCommandCapture + /// + /// + public static unsafe Result TryStartCommandCapture( + this FmodStudioSystem system, + RefString8 fileName, + CommandCaptureFlags flags + ) + { + fixed (byte* fileNamePtr = fileName) + return PInvoke.SystemStartCommandCapture(system, fileNamePtr, flags); + } + + /// + /// + /// Start recording Studio API commands to a file. + /// + /// + /// Studio::System::startCommandCapture + /// + /// + public static void StartCommandCapture( + this FmodStudioSystem system, + RefString8 fileName, + CommandCaptureFlags flags + ) => TryStartCommandCapture(system, fileName, flags).Check(); + + /// + /// + /// Stop recording Studio API commands. + /// + /// + /// See Also: Studio::System::startCommandCapture, Studio::System::loadCommandReplay + /// + /// + /// Studio::System::stopCommandCapture + /// + /// + public static Result TryStopCommandCapture(this FmodStudioSystem system) => + PInvoke.SystemStopCommandCapture(system); + + /// + /// + /// Stop recording Studio API commands. + /// + /// + /// See Also: Studio::System::startCommandCapture, Studio::System::loadCommandReplay + /// + /// + /// Studio::System::stopCommandCapture + /// + /// + public static void StopCommandCapture(this FmodStudioSystem system) => TryStopCommandCapture(system).Check(); + + /// + /// + /// Load a command replay. + /// + /// + /// Studio::System::loadCommandReplay + /// + /// + public static unsafe Result TryLoadCommandReplay( + this FmodStudioSystem system, + RefString8 fileName, + CommandReplayFlags flags, + out CommandReplay replay + ) + { + fixed (byte* fileNamePtr = fileName) + fixed (CommandReplay* replayPtr = &replay) + return PInvoke.SystemLoadCommandReplay(system, fileNamePtr, flags, replayPtr); + } + + /// + /// + /// Load a command replay. + /// + /// + /// Studio::System::loadCommandReplay + /// + /// + public static CommandReplay LoadCommandReplay( + this FmodStudioSystem system, + RefString8 fileName, + CommandReplayFlags flags + ) + { + TryLoadCommandReplay(system, fileName, flags, out var replay).Check(); + return replay; + } + + /// + /// + /// Retrieves the number of currently-loaded banks. + /// + /// + /// Studio::System::getBankCount + /// + /// + public static unsafe Result TryGetBankCount(this FmodStudioSystem system, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.SystemGetBankCount(system, countPtr); + } + + /// + /// + /// Retrieves the number of currently-loaded banks. + /// + /// + /// Studio::System::getBankCount + /// + /// + public static int GetBankCount(this FmodStudioSystem system) + { + TryGetBankCount(system, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a list of the currently-loaded banks. + /// + /// + /// Studio::System::getBankList + /// + /// + public static unsafe Result TryGetBankList( + this FmodStudioSystem system, + out Bank array, + int capacity, + out int count + ) + { + fixed (Bank* arrayPtr = &array) + fixed (int* countPtr = &count) + return PInvoke.SystemGetBankList(system, arrayPtr, capacity, countPtr); + } + + /// + /// + /// Retrieves a list of the currently-loaded banks. + /// + /// + /// Studio::System::getBankList + /// + /// + public static void GetBankList(this FmodStudioSystem system, out Bank array, int capacity, out int count) => + TryGetBankList(system, out array, capacity, out count).Check(); + + /// + /// + /// Retrieves the number of global parameters. + /// + /// + /// Studio::System::getParameterDescriptionCount + /// + /// + public static unsafe Result TryGetParameterDescriptionCount(this FmodStudioSystem system, out int count) + { + fixed (int* countPtr = &count) + return PInvoke.SystemGetParameterDescriptionCount(system, countPtr); + } + + /// + /// + /// Retrieves the number of global parameters. + /// + /// + /// Studio::System::getParameterDescriptionCount + /// + /// + public static int GetParameterDescriptionCount(this FmodStudioSystem system) + { + TryGetParameterDescriptionCount(system, out var count).Check(); + return count; + } + + /// + /// + /// Retrieves a list of global parameters. + /// + /// + /// Studio::System::getParameterDescriptionList + /// + /// + public static unsafe Result TryGetParameterDescriptionList( + this FmodStudioSystem system, + out ParameterDescription array, + int capacity, + out int count + ) + { + fixed (ParameterDescription* arrayPtr = &array) + fixed (int* countPtr = &count) + return PInvoke.SystemGetParameterDescriptionList(system, arrayPtr, capacity, countPtr); + } + + /// + /// + /// Retrieves a list of global parameters. + /// + /// + /// Studio::System::getParameterDescriptionList + /// + /// + public static void GetParameterDescriptionList( + this FmodStudioSystem system, + out ParameterDescription array, + int capacity, + out int count + ) => TryGetParameterDescriptionList(system, out array, capacity, out count).Check(); + + /// + /// + /// Retrieves the amount of CPU used for different parts of the FMOD Engine. + /// + /// + /// Studio::System::getCPUUsage + /// + /// + public static unsafe Result TryGetCpuUsage( + this FmodStudioSystem system, + out StudioCpuUsage usage, + out CpuUsage usageCore + ) + { + fixed (StudioCpuUsage* usagePtr = &usage) + fixed (CpuUsage* usageCorePtr = &usageCore) + return PInvoke.SystemGetCpuUsage(system, usagePtr, usageCorePtr); + } + + /// + /// + /// Retrieves the amount of CPU used for different parts of the FMOD Engine. + /// + /// + /// Studio::System::getCPUUsage + /// + /// + public static void GetCpuUsage( + this FmodStudioSystem system, + out StudioCpuUsage usage, + out CpuUsage usageCore + ) => TryGetCpuUsage(system, out usage, out usageCore).Check(); + + /// + /// + /// Retrieves buffer usage information. + /// + /// + /// Studio::System::getBufferUsage + /// + /// + public static unsafe Result TryGetBufferUsage(this FmodStudioSystem system, out BufferUsage usage) + { + fixed (BufferUsage* usagePtr = &usage) + return PInvoke.SystemGetBufferUsage(system, usagePtr); + } + + /// + /// + /// Retrieves buffer usage information. + /// + /// + /// Studio::System::getBufferUsage + /// + /// + public static BufferUsage GetBufferUsage(this FmodStudioSystem system) + { + TryGetBufferUsage(system, out var usage).Check(); + return usage; + } + + /// + /// + /// Resets memory buffer usage statistics. + /// + /// + /// This function resets the buffer usage data tracked by the Studio system. + /// + /// + /// See Also: FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage + /// + /// + /// Studio::System::resetBufferUsage + /// + /// + public static Result TryResetBufferUsage(this FmodStudioSystem system) => + PInvoke.SystemResetBufferUsage(system); + + /// + /// + /// Resets memory buffer usage statistics. + /// + /// + /// This function resets the buffer usage data tracked by the Studio system. + /// + /// + /// See Also: FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage + /// + /// + /// Studio::System::resetBufferUsage + /// + /// + public static void ResetBufferUsage(this FmodStudioSystem system) => TryResetBufferUsage(system).Check(); + + /// + /// + /// Sets a callback for the Studio System. + /// + /// + /// Studio::System::setCallback + /// + /// + public static Result TrySetCallback( + this FmodStudioSystem system, + StudioSystemCallbackPtr callback, + StudioSystemCallbackType callbackMask + ) => PInvoke.SystemSetCallback(system, callback, callbackMask); + + /// + /// + /// Sets a callback for the Studio System. + /// + /// + /// Studio::System::setCallback + /// + /// + public static void SetCallback( + this FmodStudioSystem system, + StudioSystemCallbackPtr callback, + StudioSystemCallbackType callbackMask + ) => TrySetCallback(system, callback, callbackMask).Check(); + + /// + /// + /// Sets the user data. + /// + /// + /// Studio::System::setUserData + /// + /// + public static Result TrySetUserData(this FmodStudioSystem system, nint userData) => + PInvoke.SystemSetUserData(system, userData); + + /// + /// + /// Sets the user data. + /// + /// + /// Studio::System::setUserData + /// + /// + public static void SetUserData(this FmodStudioSystem system, nint userData) => + TrySetUserData(system, userData).Check(); + + /// + /// + /// Retrieves the user data. + /// + /// + /// Studio::System::getUserData + /// + /// + public static unsafe Result TryGetUserData(this FmodStudioSystem system, out nint userData) + { + fixed (nint* userDataPtr = &userData) + return PInvoke.SystemGetUserData(system, userDataPtr); + } + + /// + /// + /// Retrieves the user data. + /// + /// + /// Studio::System::getUserData + /// + /// + public static nint GetUserData(this FmodStudioSystem system) + { + TryGetUserData(system, out var userData).Check(); + return userData; + } + + /// + /// + /// Retrieves memory usage statistics. + /// + /// + /// Studio::System::getMemoryUsage + /// + /// + public static unsafe Result TryGetMemoryUsage(this FmodStudioSystem system, out MemoryUsage memoryUsage) + { + fixed (MemoryUsage* memoryUsagePtr = &memoryUsage) + return PInvoke.SystemGetMemoryUsage(system, memoryUsagePtr); + } + + /// + /// + /// Retrieves memory usage statistics. + /// + /// + /// Studio::System::getMemoryUsage + /// + /// + public static MemoryUsage GetMemoryUsage(this FmodStudioSystem system) + { + TryGetMemoryUsage(system, out var memoryUsage).Check(); + return memoryUsage; + } + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Vca.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Vca.gen.cs new file mode 100644 index 0000000..a65eb2e --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.Vca.gen.cs @@ -0,0 +1,121 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Checks that the VCA reference is valid. + /// + /// + /// Studio::VCA::isValid + /// + /// + public static Bool32 IsValid(this Vca vca) => PInvoke.VcaIsValid(vca); + + /// + /// + /// Retrieves the VCA's GUID. + /// + /// + /// Studio::VCA::getID + /// + /// + public static unsafe Result TryGetId(this Vca vca, out Guid id) + { + fixed (Guid* idPtr = &id) + return PInvoke.VcaGetId(vca, idPtr); + } + + /// + /// + /// Retrieves the VCA's GUID. + /// + /// + /// Studio::VCA::getID + /// + /// + public static Guid GetId(this Vca vca) + { + TryGetId(vca, out var id).Check(); + return id; + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::VCA::getPath + /// + /// + public static unsafe Result TryGetPath(this Vca vca, byte* path, int size, out int retrieved) + { + fixed (int* retrievedPtr = &retrieved) + return PInvoke.VcaGetPath(vca, path, size, retrievedPtr); + } + + /// + /// + /// Retrieves the path. + /// + /// + /// Studio::VCA::getPath + /// + /// + public static unsafe int GetPath(this Vca vca, byte* path, int size) + { + TryGetPath(vca, path, size, out var retrieved).Check(); + return retrieved; + } + + /// + /// + /// Retrieves the volume level. + /// + /// + /// Studio::VCA::getVolume + /// + /// + public static unsafe Result TryGetVolume(this Vca vca, out float volume, out float finalVolume) + { + fixed (float* volumePtr = &volume) + fixed (float* finalVolumePtr = &finalVolume) + return PInvoke.VcaGetVolume(vca, volumePtr, finalVolumePtr); + } + + /// + /// + /// Retrieves the volume level. + /// + /// + /// Studio::VCA::getVolume + /// + /// + public static void GetVolume(this Vca vca, out float volume, out float finalVolume) => + TryGetVolume(vca, out volume, out finalVolume).Check(); + + /// + /// + /// Sets the volume level. + /// + /// + /// Studio::VCA::setVolume + /// + /// + public static Result TrySetVolume(this Vca vca, float volume) => PInvoke.VcaSetVolume(vca, volume); + + /// + /// + /// Sets the volume level. + /// + /// + /// Studio::VCA::setVolume + /// + /// + public static void SetVolume(this Vca vca, float volume) => TrySetVolume(vca, volume).Check(); + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.gen.cs new file mode 100644 index 0000000..2a250d7 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.gen.cs @@ -0,0 +1,66 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + /// + /// + /// Parses a GUID from a string. + /// + /// + /// Studio::parseID + /// + /// + public static unsafe Result TryParseId(RefString8 idString, out Guid id) + { + fixed (byte* idStringPtr = idString) + fixed (Guid* idPtr = &id) + return PInvoke.ParseId(idStringPtr, idPtr); + } + + /// + /// + /// Parses a GUID from a string. + /// + /// + /// Studio::parseID + /// + /// + public static Guid ParseId(RefString8 idString) + { + TryParseId(idString, out var id).Check(); + return id; + } + + /// + /// + /// This function creates the studio system. + /// + /// + /// Studio::System::create + /// + /// + public static unsafe Result TrySystemCreate(out FmodStudioSystem system, uint headerVersion) + { + fixed (FmodStudioSystem* systemPtr = &system) + return PInvoke.SystemCreate(systemPtr, headerVersion); + } + + /// + /// + /// This function creates the studio system. + /// + /// + /// Studio::System::create + /// + /// + public static FmodStudioSystem SystemCreate(uint headerVersion) + { + TrySystemCreate(out var system, headerVersion).Check(); + return system; + } + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/PInvokes.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/PInvokes.gen.cs new file mode 100644 index 0000000..c8d8dc0 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/PInvokes.gen.cs @@ -0,0 +1,929 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + public static partial class FmodStudio + { + public static unsafe partial class PInvoke + { + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_ParseID")] + public static partial Result ParseId(byte* idString, Guid* id); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_Create")] + public static partial Result SystemCreate(FmodStudioSystem* system, uint headerVersion); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_IsValid")] + public static partial Bool32 SystemIsValid(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetAdvancedSettings")] + public static partial Result SystemSetAdvancedSettings( + FmodStudioSystem system, + StudioAdvancedSettings* settings + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetAdvancedSettings")] + public static partial Result SystemGetAdvancedSettings( + FmodStudioSystem system, + StudioAdvancedSettings* settings + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_Initialize")] + public static partial Result SystemInitialize( + FmodStudioSystem system, + int maxChannels, + StudioInitFlags studioFlags, + InitFlags flags, + nint extraDriverData + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_Release")] + public static partial Result SystemRelease(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_Update")] + public static partial Result SystemUpdate(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetCoreSystem")] + public static partial Result SystemGetCoreSystem(FmodStudioSystem system, FmodSystem* coreSystem); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetEvent")] + public static partial Result SystemGetEvent( + FmodStudioSystem system, + byte* pathOrId, + EventDescription* eventDescription + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBus")] + public static partial Result SystemGetBus(FmodStudioSystem system, byte* pathOrId, Bus* bus); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetVCA")] + public static partial Result SystemGetVca(FmodStudioSystem system, byte* pathOrId, Vca* vca); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBank")] + public static partial Result SystemGetBank(FmodStudioSystem system, byte* pathOrId, Bank* bank); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetEventByID")] + public static partial Result SystemGetEventById( + FmodStudioSystem system, + Guid* id, + EventDescription* eventDescription + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBusByID")] + public static partial Result SystemGetBusById(FmodStudioSystem system, Guid* id, Bus* bus); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetVCAByID")] + public static partial Result SystemGetVcaById(FmodStudioSystem system, Guid* id, Vca* vca); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBankByID")] + public static partial Result SystemGetBankById(FmodStudioSystem system, Guid* id, Bank* bank); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetSoundInfo")] + public static partial Result SystemGetSoundInfo(FmodStudioSystem system, byte* key, SoundInfo* info); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterDescriptionByName")] + public static partial Result SystemGetParameterDescriptionByName( + FmodStudioSystem system, + byte* name, + ParameterDescription* parameter + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterDescriptionByID")] + public static partial Result SystemGetParameterDescriptionById( + FmodStudioSystem system, + ParameterId id, + ParameterDescription* parameter + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterLabelByName")] + public static partial Result SystemGetParameterLabelByName( + FmodStudioSystem system, + byte* name, + int labelIndex, + byte* label, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterLabelByID")] + public static partial Result SystemGetParameterLabelById( + FmodStudioSystem system, + ParameterId id, + int labelIndex, + byte* label, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterByID")] + public static partial Result SystemGetParameterById( + FmodStudioSystem system, + ParameterId id, + float* value, + float* finalValue + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetParameterByID")] + public static partial Result SystemSetParameterById( + FmodStudioSystem system, + ParameterId id, + float value, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetParameterByIDWithLabel")] + public static partial Result SystemSetParameterByIdWithLabel( + FmodStudioSystem system, + ParameterId id, + byte* label, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetParametersByIDs")] + public static partial Result SystemSetParametersByIDs( + FmodStudioSystem system, + ParameterId* ids, + float* values, + int count, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterByName")] + public static partial Result SystemGetParameterByName( + FmodStudioSystem system, + byte* name, + float* value, + float* finalValue + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetParameterByName")] + public static partial Result SystemSetParameterByName( + FmodStudioSystem system, + byte* name, + float value, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetParameterByNameWithLabel")] + public static partial Result SystemSetParameterByNameWithLabel( + FmodStudioSystem system, + byte* name, + byte* label, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_LookupID")] + public static partial Result SystemLookupId(FmodStudioSystem system, byte* path, Guid* id); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_LookupPath")] + public static partial Result SystemLookupPath( + FmodStudioSystem system, + Guid* id, + byte* path, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetNumListeners")] + public static partial Result SystemGetNumListeners(FmodStudioSystem system, int* numListeners); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetNumListeners")] + public static partial Result SystemSetNumListeners(FmodStudioSystem system, int numListeners); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetListenerAttributes")] + public static partial Result SystemGetListenerAttributes( + FmodStudioSystem system, + int index, + Attributes3d* attributes, + float3* attenuationPosition + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetListenerAttributes")] + public static partial Result SystemSetListenerAttributes( + FmodStudioSystem system, + int index, + Attributes3d* attributes, + float3* attenuationPosition + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetListenerWeight")] + public static partial Result SystemGetListenerWeight(FmodStudioSystem system, int index, float* weight); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetListenerWeight")] + public static partial Result SystemSetListenerWeight(FmodStudioSystem system, int index, float weight); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_LoadBankFile")] + public static partial Result SystemLoadBankFile( + FmodStudioSystem system, + byte* fileName, + LoadBankFlags flags, + Bank* bank + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_LoadBankMemory")] + public static partial Result SystemLoadBankMemory( + FmodStudioSystem system, + byte* buffer, + int length, + LoadMemoryMode mode, + LoadBankFlags flags, + Bank* bank + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_LoadBankCustom")] + public static partial Result SystemLoadBankCustom( + FmodStudioSystem system, + BankInfo* info, + LoadBankFlags flags, + Bank* bank + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_RegisterPlugin")] + public static partial Result SystemRegisterPlugin(FmodStudioSystem system, DspDescription* description); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_UnregisterPlugin")] + public static partial Result SystemUnregisterPlugin(FmodStudioSystem system, byte* name); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_UnloadAll")] + public static partial Result SystemUnloadAll(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_FlushCommands")] + public static partial Result SystemFlushCommands(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_FlushSampleLoading")] + public static partial Result SystemFlushSampleLoading(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_StartCommandCapture")] + public static partial Result SystemStartCommandCapture( + FmodStudioSystem system, + byte* fileName, + CommandCaptureFlags flags + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_StopCommandCapture")] + public static partial Result SystemStopCommandCapture(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_LoadCommandReplay")] + public static partial Result SystemLoadCommandReplay( + FmodStudioSystem system, + byte* fileName, + CommandReplayFlags flags, + CommandReplay* replay + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBankCount")] + public static partial Result SystemGetBankCount(FmodStudioSystem system, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBankList")] + public static partial Result SystemGetBankList( + FmodStudioSystem system, + Bank* array, + int capacity, + int* count + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterDescriptionCount")] + public static partial Result SystemGetParameterDescriptionCount(FmodStudioSystem system, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetParameterDescriptionList")] + public static partial Result SystemGetParameterDescriptionList( + FmodStudioSystem system, + ParameterDescription* array, + int capacity, + int* count + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetCPUUsage")] + public static partial Result SystemGetCpuUsage( + FmodStudioSystem system, + StudioCpuUsage* usage, + CpuUsage* usageCore + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetBufferUsage")] + public static partial Result SystemGetBufferUsage(FmodStudioSystem system, BufferUsage* usage); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_ResetBufferUsage")] + public static partial Result SystemResetBufferUsage(FmodStudioSystem system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetCallback")] + public static partial Result SystemSetCallback( + FmodStudioSystem system, + StudioSystemCallbackPtr callback, + StudioSystemCallbackType callbackMask + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_SetUserData")] + public static partial Result SystemSetUserData(FmodStudioSystem system, nint userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetUserData")] + public static partial Result SystemGetUserData(FmodStudioSystem system, nint* userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_System_GetMemoryUsage")] + public static partial Result SystemGetMemoryUsage(FmodStudioSystem system, MemoryUsage* memoryUsage); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_IsValid")] + public static partial Bool32 EventDescriptionIsValid(EventDescription eventDescription); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetID")] + public static partial Result EventDescriptionGetId(EventDescription eventDescription, Guid* id); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetPath")] + public static partial Result EventDescriptionGetPath( + EventDescription eventDescription, + byte* path, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterDescriptionCount")] + public static partial Result EventDescriptionGetParameterDescriptionCount( + EventDescription eventDescription, + int* count + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterDescriptionByIndex")] + public static partial Result EventDescriptionGetParameterDescriptionByIndex( + EventDescription eventDescription, + int index, + ParameterDescription* parameter + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterDescriptionByName")] + public static partial Result EventDescriptionGetParameterDescriptionByName( + EventDescription eventDescription, + byte* name, + ParameterDescription* parameter + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterDescriptionByID")] + public static partial Result EventDescriptionGetParameterDescriptionById( + EventDescription eventDescription, + ParameterId id, + ParameterDescription* parameter + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterLabelByIndex")] + public static partial Result EventDescriptionGetParameterLabelByIndex( + EventDescription eventDescription, + int index, + int labelIndex, + byte* label, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterLabelByName")] + public static partial Result EventDescriptionGetParameterLabelByName( + EventDescription eventDescription, + byte* name, + int labelIndex, + byte* label, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetParameterLabelByID")] + public static partial Result EventDescriptionGetParameterLabelById( + EventDescription eventDescription, + ParameterId id, + int labelIndex, + byte* label, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetUserPropertyCount")] + public static partial Result EventDescriptionGetUserPropertyCount( + EventDescription eventDescription, + int* count + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetUserPropertyByIndex")] + public static partial Result EventDescriptionGetUserPropertyByIndex( + EventDescription eventDescription, + int index, + UserProperty* property + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetUserProperty")] + public static partial Result EventDescriptionGetUserProperty( + EventDescription eventDescription, + byte* name, + UserProperty* property + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetLength")] + public static partial Result EventDescriptionGetLength(EventDescription eventDescription, int* length); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetMinMaxDistance")] + public static partial Result EventDescriptionGetMinMaxDistance( + EventDescription eventDescription, + float* min, + float* max + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetSoundSize")] + public static partial Result EventDescriptionGetSoundSize(EventDescription eventDescription, float* size); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_IsSnapshot")] + public static partial Result EventDescriptionIsSnapshot( + EventDescription eventDescription, + Bool32* snapshot + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_IsOneshot")] + public static partial Result EventDescriptionIsOneshot(EventDescription eventDescription, Bool32* oneshot); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_IsStream")] + public static partial Result EventDescriptionIsStream(EventDescription eventDescription, Bool32* isStream); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_Is3D")] + public static partial Result EventDescriptionIs3d(EventDescription eventDescription, Bool32* is3d); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_IsDopplerEnabled")] + public static partial Result EventDescriptionIsDopplerEnabled( + EventDescription eventDescription, + Bool32* doppler + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_HasSustainPoint")] + public static partial Result EventDescriptionHasSustainPoint( + EventDescription eventDescription, + Bool32* sustainPoint + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_CreateInstance")] + public static partial Result EventDescriptionCreateInstance( + EventDescription eventDescription, + EventInstance* instance + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetInstanceCount")] + public static partial Result EventDescriptionGetInstanceCount( + EventDescription eventDescription, + int* count + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetInstanceList")] + public static partial Result EventDescriptionGetInstanceList( + EventDescription eventDescription, + EventInstance* array, + int capacity, + int* count + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_LoadSampleData")] + public static partial Result EventDescriptionLoadSampleData(EventDescription eventDescription); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_UnloadSampleData")] + public static partial Result EventDescriptionUnloadSampleData(EventDescription eventDescription); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetSampleLoadingState")] + public static partial Result EventDescriptionGetSampleLoadingState( + EventDescription eventDescription, + LoadingState* state + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_ReleaseAllInstances")] + public static partial Result EventDescriptionReleaseAllInstances(EventDescription eventDescription); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_SetCallback")] + public static partial Result EventDescriptionSetCallback( + EventDescription eventDescription, + EventCallbackPtr callback, + EventCallbackType callbackMask + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_GetUserData")] + public static partial Result EventDescriptionGetUserData(EventDescription eventDescription, nint* userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventDescription_SetUserData")] + public static partial Result EventDescriptionSetUserData(EventDescription eventDescription, nint userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_IsValid")] + public static partial Bool32 EventInstanceIsValid(EventInstance eventInstance); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetDescription")] + public static partial Result EventInstanceGetDescription( + EventInstance eventInstance, + EventDescription* description + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetSystem")] + public static partial Result EventInstanceGetSystem(EventInstance eventInstance, FmodStudioSystem* system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetVolume")] + public static partial Result EventInstanceGetVolume( + EventInstance eventInstance, + float* volume, + float* finalVolume + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetVolume")] + public static partial Result EventInstanceSetVolume(EventInstance eventInstance, float volume); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetPitch")] + public static partial Result EventInstanceGetPitch( + EventInstance eventInstance, + float* pitch, + float* finalPitch + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetPitch")] + public static partial Result EventInstanceSetPitch(EventInstance eventInstance, float pitch); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_Get3DAttributes")] + public static partial Result EventInstanceGet3dAttributes( + EventInstance eventInstance, + Attributes3d* attributes + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_Set3DAttributes")] + public static partial Result EventInstanceSet3dAttributes( + EventInstance eventInstance, + Attributes3d* attributes + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetListenerMask")] + public static partial Result EventInstanceGetListenerMask(EventInstance eventInstance, uint* mask); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetListenerMask")] + public static partial Result EventInstanceSetListenerMask(EventInstance eventInstance, uint mask); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetProperty")] + public static partial Result EventInstanceGetProperty( + EventInstance eventInstance, + EventProperty index, + float* value + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetProperty")] + public static partial Result EventInstanceSetProperty( + EventInstance eventInstance, + EventProperty index, + float value + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetReverbLevel")] + public static partial Result EventInstanceGetReverbLevel( + EventInstance eventInstance, + int index, + float* level + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetReverbLevel")] + public static partial Result EventInstanceSetReverbLevel( + EventInstance eventInstance, + int index, + float level + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetPaused")] + public static partial Result EventInstanceGetPaused(EventInstance eventInstance, Bool32* paused); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetPaused")] + public static partial Result EventInstanceSetPaused(EventInstance eventInstance, Bool32 paused); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_Start")] + public static partial Result EventInstanceStart(EventInstance eventInstance); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_Stop")] + public static partial Result EventInstanceStop(EventInstance eventInstance, StopMode mode); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetTimelinePosition")] + public static partial Result EventInstanceGetTimelinePosition(EventInstance eventInstance, int* position); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetTimelinePosition")] + public static partial Result EventInstanceSetTimelinePosition(EventInstance eventInstance, int position); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetPlaybackState")] + public static partial Result EventInstanceGetPlaybackState( + EventInstance eventInstance, + PlaybackState* state + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetChannelGroup")] + public static partial Result EventInstanceGetChannelGroup(EventInstance eventInstance, ChannelGroup* group); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetMinMaxDistance")] + public static partial Result EventInstanceGetMinMaxDistance( + EventInstance eventInstance, + float* min, + float* max + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_Release")] + public static partial Result EventInstanceRelease(EventInstance eventInstance); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_IsVirtual")] + public static partial Result EventInstanceIsVirtual(EventInstance eventInstance, Bool32* virtualState); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetParameterByName")] + public static partial Result EventInstanceGetParameterByName( + EventInstance eventInstance, + byte* name, + float* value, + float* finalValue + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetParameterByName")] + public static partial Result EventInstanceSetParameterByName( + EventInstance eventInstance, + byte* name, + float value, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetParameterByNameWithLabel")] + public static partial Result EventInstanceSetParameterByNameWithLabel( + EventInstance eventInstance, + byte* name, + byte* label, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetParameterByID")] + public static partial Result EventInstanceGetParameterById( + EventInstance eventInstance, + ParameterId id, + float* value, + float* finalValue + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetParameterByID")] + public static partial Result EventInstanceSetParameterById( + EventInstance eventInstance, + ParameterId id, + float value, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetParameterByIDWithLabel")] + public static partial Result EventInstanceSetParameterByIdWithLabel( + EventInstance eventInstance, + ParameterId id, + byte* label, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetParametersByIDs")] + public static partial Result EventInstanceSetParametersByIDs( + EventInstance eventInstance, + ParameterId* ids, + float* values, + int count, + Bool32 ignoreSeekSpeed + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_KeyOff")] + public static partial Result EventInstanceKeyOff(EventInstance eventInstance); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetCallback")] + public static partial Result EventInstanceSetCallback( + EventInstance eventInstance, + EventCallbackPtr callback, + EventCallbackType callbackMask + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetUserData")] + public static partial Result EventInstanceGetUserData(EventInstance eventInstance, nint* userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_SetUserData")] + public static partial Result EventInstanceSetUserData(EventInstance eventInstance, nint userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetCPUUsage")] + public static partial Result EventInstanceGetCpuUsage( + EventInstance eventInstance, + uint* exclusive, + uint* inclusive + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_EventInstance_GetMemoryUsage")] + public static partial Result EventInstanceGetMemoryUsage( + EventInstance eventInstance, + MemoryUsage* memoryUsage + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_IsValid")] + public static partial Bool32 BusIsValid(Bus bus); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetID")] + public static partial Result BusGetId(Bus bus, Guid* id); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetPath")] + public static partial Result BusGetPath(Bus bus, byte* path, int size, int* retrieved); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetVolume")] + public static partial Result BusGetVolume(Bus bus, float* volume, float* finalVolume); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_SetVolume")] + public static partial Result BusSetVolume(Bus bus, float volume); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetPaused")] + public static partial Result BusGetPaused(Bus bus, Bool32* paused); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_SetPaused")] + public static partial Result BusSetPaused(Bus bus, Bool32 paused); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetMute")] + public static partial Result BusGetMute(Bus bus, Bool32* mute); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_SetMute")] + public static partial Result BusSetMute(Bus bus, Bool32 mute); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_StopAllEvents")] + public static partial Result BusStopAllEvents(Bus bus, StopMode mode); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetPortIndex")] + public static partial Result BusGetPortIndex(Bus bus, PortIndex* index); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_SetPortIndex")] + public static partial Result BusSetPortIndex(Bus bus, PortIndex index); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_LockChannelGroup")] + public static partial Result BusLockChannelGroup(Bus bus); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_UnlockChannelGroup")] + public static partial Result BusUnlockChannelGroup(Bus bus); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetChannelGroup")] + public static partial Result BusGetChannelGroup(Bus bus, ChannelGroup* group); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetCPUUsage")] + public static partial Result BusGetCpuUsage(Bus bus, uint* exclusive, uint* inclusive); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bus_GetMemoryUsage")] + public static partial Result BusGetMemoryUsage(Bus bus, MemoryUsage* memoryUsage); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_VCA_IsValid")] + public static partial Bool32 VcaIsValid(Vca vca); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_VCA_GetID")] + public static partial Result VcaGetId(Vca vca, Guid* id); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_VCA_GetPath")] + public static partial Result VcaGetPath(Vca vca, byte* path, int size, int* retrieved); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_VCA_GetVolume")] + public static partial Result VcaGetVolume(Vca vca, float* volume, float* finalVolume); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_VCA_SetVolume")] + public static partial Result VcaSetVolume(Vca vca, float volume); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_IsValid")] + public static partial Bool32 BankIsValid(Bank bank); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetID")] + public static partial Result BankGetId(Bank bank, Guid* id); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetPath")] + public static partial Result BankGetPath(Bank bank, byte* path, int size, int* retrieved); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_Unload")] + public static partial Result BankUnload(Bank bank); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_LoadSampleData")] + public static partial Result BankLoadSampleData(Bank bank); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_UnloadSampleData")] + public static partial Result BankUnloadSampleData(Bank bank); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetLoadingState")] + public static partial Result BankGetLoadingState(Bank bank, LoadingState* state); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetSampleLoadingState")] + public static partial Result BankGetSampleLoadingState(Bank bank, LoadingState* state); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetStringCount")] + public static partial Result BankGetStringCount(Bank bank, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetStringInfo")] + public static partial Result BankGetStringInfo( + Bank bank, + int index, + Guid* id, + byte* path, + int size, + int* retrieved + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetEventCount")] + public static partial Result BankGetEventCount(Bank bank, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetEventList")] + public static partial Result BankGetEventList(Bank bank, EventDescription* array, int capacity, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetBusCount")] + public static partial Result BankGetBusCount(Bank bank, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetBusList")] + public static partial Result BankGetBusList(Bank bank, Bus* array, int capacity, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetVCACount")] + public static partial Result BankGetVcaCount(Bank bank, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetVCAList")] + public static partial Result BankGetVcaList(Bank bank, Vca* array, int capacity, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_GetUserData")] + public static partial Result BankGetUserData(Bank bank, nint* userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_Bank_SetUserData")] + public static partial Result BankSetUserData(Bank bank, nint userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_IsValid")] + public static partial Bool32 CommandReplayIsValid(CommandReplay replay); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetSystem")] + public static partial Result CommandReplayGetSystem(CommandReplay replay, FmodStudioSystem* system); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetLength")] + public static partial Result CommandReplayGetLength(CommandReplay replay, float* length); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetCommandCount")] + public static partial Result CommandReplayGetCommandCount(CommandReplay replay, int* count); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetCommandInfo")] + public static partial Result CommandReplayGetCommandInfo( + CommandReplay replay, + int commandIndex, + CommandInfo* info + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetCommandString")] + public static partial Result CommandReplayGetCommandString( + CommandReplay replay, + int commandIndex, + byte* buffer, + int length + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetCommandAtTime")] + public static partial Result CommandReplayGetCommandAtTime( + CommandReplay replay, + float time, + int* commandIndex + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SetBankPath")] + public static partial Result CommandReplaySetBankPath(CommandReplay replay, byte* bankPath); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_Start")] + public static partial Result CommandReplayStart(CommandReplay replay); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_Stop")] + public static partial Result CommandReplayStop(CommandReplay replay); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SeekToTime")] + public static partial Result CommandReplaySeekToTime(CommandReplay replay, float time); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SeekToCommand")] + public static partial Result CommandReplaySeekToCommand(CommandReplay replay, int commandIndex); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetPaused")] + public static partial Result CommandReplayGetPaused(CommandReplay replay, Bool32* paused); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SetPaused")] + public static partial Result CommandReplaySetPaused(CommandReplay replay, Bool32 paused); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetPlaybackState")] + public static partial Result CommandReplayGetPlaybackState(CommandReplay replay, PlaybackState* state); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetCurrentCommand")] + public static partial Result CommandReplayGetCurrentCommand( + CommandReplay replay, + int* commandIndex, + float* currentTime + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_Release")] + public static partial Result CommandReplayRelease(CommandReplay replay); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SetFrameCallback")] + public static partial Result CommandReplaySetFrameCallback( + CommandReplay replay, + CommandReplayFrameCallbackPtr callback + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SetLoadBankCallback")] + public static partial Result CommandReplaySetLoadBankCallback( + CommandReplay replay, + CommandReplayLoadBankCallbackPtr callback + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SetCreateInstanceCallback")] + public static partial Result CommandReplaySetCreateInstanceCallback( + CommandReplay replay, + CommandReplayCreateInstanceCallbackPtr callback + ); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_GetUserData")] + public static partial Result CommandReplayGetUserData(CommandReplay replay, nint* userData); + + [LibraryImport("fmodstudio", EntryPoint = "FMOD_Studio_CommandReplay_SetUserData")] + public static partial Result CommandReplaySetUserData(CommandReplay replay, nint userData); + } + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/BankInfo.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/BankInfo.gen.cs new file mode 100644 index 0000000..8202946 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/BankInfo.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Information for loading a bank using user callbacks. + /// + /// + /// FMOD_STUDIO_BANK_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct BankInfo + { + [FieldOffset(0)] + public int Size; + + [FieldOffset(8)] + public nint UserData; + + [FieldOffset(16)] + public int UserDataLength; + + [FieldOffset(24)] + public FileOpenCallbackPtr OpenCallback; + + [FieldOffset(32)] + public FileCloseCallbackPtr CloseCallback; + + [FieldOffset(40)] + public FileReadCallbackPtr ReadCallback; + + [FieldOffset(48)] + public FileSeekCallbackPtr SeekCallback; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferInfo.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferInfo.gen.cs new file mode 100644 index 0000000..a28b6c5 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferInfo.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Information for a single buffer in FMOD Studio. + /// + /// + /// FMOD_STUDIO_BUFFER_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct BufferInfo + { + [FieldOffset(0)] + public int CurrentUsage; + + [FieldOffset(4)] + public int PeakUsage; + + [FieldOffset(8)] + public int Capacity; + + [FieldOffset(12)] + public int StallCount; + + [FieldOffset(16)] + public float StallTime; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferUsage.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferUsage.gen.cs new file mode 100644 index 0000000..52a045b --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/BufferUsage.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Information for FMOD Studio buffer usage. + /// + /// + /// FMOD_STUDIO_BUFFER_USAGE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct BufferUsage + { + [FieldOffset(0)] + public BufferInfo StudioCommandQueue; + + [FieldOffset(20)] + public BufferInfo StudioHandle; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/CommandInfo.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/CommandInfo.gen.cs new file mode 100644 index 0000000..4dbc830 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/CommandInfo.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a command replay command. + /// + /// + /// FMOD_STUDIO_COMMAND_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct CommandInfo + { + [FieldOffset(0)] + public byte* CommandName; + + [FieldOffset(8)] + public int ParentCommandIndex; + + [FieldOffset(12)] + public int FrameNumber; + + [FieldOffset(16)] + public float FrameTime; + + [FieldOffset(20)] + public InstanceType InstanceType; + + [FieldOffset(24)] + public InstanceType OutputType; + + [FieldOffset(28)] + public uint InstanceHandle; + + [FieldOffset(32)] + public uint OutputHandle; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/MemoryUsage.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/MemoryUsage.gen.cs new file mode 100644 index 0000000..cadad10 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/MemoryUsage.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Memory usage statistics. + /// + /// + /// FMOD_STUDIO_MEMORY_USAGE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct MemoryUsage + { + [FieldOffset(0)] + public int Exclusive; + + [FieldOffset(4)] + public int Inclusive; + + [FieldOffset(8)] + public int SampleData; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterDescription.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterDescription.gen.cs new file mode 100644 index 0000000..e6dc2d2 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterDescription.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes an event parameter. + /// + /// + /// FMOD_STUDIO_PARAMETER_DESCRIPTION + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct ParameterDescription + { + [FieldOffset(0)] + public byte* Name; + + [FieldOffset(8)] + public ParameterId Id; + + [FieldOffset(16)] + public float Minimum; + + [FieldOffset(20)] + public float Maximum; + + [FieldOffset(24)] + public float DefaultValue; + + [FieldOffset(28)] + public ParameterType Type; + + [FieldOffset(32)] + public ParameterFlags Flags; + + [FieldOffset(36)] + public Guid Guid; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterId.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterId.gen.cs new file mode 100644 index 0000000..7a1f149 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/ParameterId.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes an event parameter identifier. + /// + /// + /// FMOD_STUDIO_PARAMETER_ID + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ParameterId + { + [FieldOffset(0)] + public uint Data1; + + [FieldOffset(4)] + public uint Data2; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/PluginInstanceProperties.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/PluginInstanceProperties.gen.cs new file mode 100644 index 0000000..62fd26a --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/PluginInstanceProperties.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a DSP plug-in instance. + /// + /// + /// FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct PluginInstanceProperties + { + [FieldOffset(0)] + public byte* Name; + + [FieldOffset(8)] + public Dsp Dsp; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/ProgrammerSoundProperties.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/ProgrammerSoundProperties.gen.cs new file mode 100644 index 0000000..a0d7c0b --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/ProgrammerSoundProperties.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a programmer sound. + /// + /// + /// FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct ProgrammerSoundProperties + { + [FieldOffset(0)] + public byte* Name; + + [FieldOffset(8)] + public Sound Sound; + + [FieldOffset(16)] + public int SubsoundIndex; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/SoundInfo.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/SoundInfo.gen.cs new file mode 100644 index 0000000..b053293 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/SoundInfo.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a sound in the audio table. + /// + /// + /// FMOD_STUDIO_SOUND_INFO + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 248)] + public unsafe partial struct SoundInfo + { + [FieldOffset(0)] + public byte* NameOrData; + + [FieldOffset(8)] + public Mode Mode; + + [FieldOffset(16)] + public CreateSoundExInfo ExInfo; + + [FieldOffset(240)] + public int SubSoundIndex; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioAdvancedSettings.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioAdvancedSettings.gen.cs new file mode 100644 index 0000000..46e7d49 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioAdvancedSettings.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Settings for advanced features like configuring memory and cpu usage. + /// + /// + /// FMOD_STUDIO_ADVANCEDSETTINGS + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct StudioAdvancedSettings + { + [FieldOffset(0)] + public int CbSize; + + [FieldOffset(4)] + public uint CommandQueueSize; + + [FieldOffset(8)] + public uint HandleInitialSize; + + [FieldOffset(12)] + public int StudioUpdatePeriod; + + [FieldOffset(16)] + public int IdleSampleDataPoolSize; + + [FieldOffset(20)] + public uint StreamingScheduleDelay; + + [FieldOffset(24)] + public byte* EncryptionKey; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioCpuUsage.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioCpuUsage.gen.cs new file mode 100644 index 0000000..6e1b0db --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/StudioCpuUsage.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Performance information for Studio API functionality. + /// + /// + /// FMOD_STUDIO_CPU_USAGE + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StudioCpuUsage + { + [FieldOffset(0)] + public float Update; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineBeatProperties.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineBeatProperties.gen.cs new file mode 100644 index 0000000..064ea75 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineBeatProperties.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a beat on the timeline. + /// + /// + /// FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct TimelineBeatProperties + { + [FieldOffset(0)] + public int Bar; + + [FieldOffset(4)] + public int Beat; + + [FieldOffset(8)] + public int Position; + + [FieldOffset(12)] + public float Tempo; + + [FieldOffset(16)] + public int TimeSignatureUpper; + + [FieldOffset(20)] + public int TimeSignatureLower; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineMarkerProperties.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineMarkerProperties.gen.cs new file mode 100644 index 0000000..91b58ce --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineMarkerProperties.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a marker on the timeline. + /// + /// + /// FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct TimelineMarkerProperties + { + [FieldOffset(0)] + public byte* Name; + + [FieldOffset(8)] + public int Position; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineNestedBeatProperties.gen.cs b/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineNestedBeatProperties.gen.cs new file mode 100644 index 0000000..519214d --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Generated/Structs/TimelineNestedBeatProperties.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.FmodApi.Studio +{ + /// + /// + /// Describes a beat on the timeline from a nested event. + /// + /// + /// FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct TimelineNestedBeatProperties + { + [FieldOffset(0)] + public Guid EventId; + + [FieldOffset(16)] + public TimelineBeatProperties Properties; + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Manual/FmodStudio.cs b/Brutal.Fmod/FmodStudioApi/Manual/FmodStudio.cs new file mode 100644 index 0000000..fa8bb93 --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Manual/FmodStudio.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi.Studio; + +public static partial class FmodStudio +{ + static FmodStudio() + { + // Load required dependency on fmod core lib prior to any studio LibraryImport + NativeLibrary.Load("fmod", typeof(FmodStudio).Assembly, DllImportSearchPath.AssemblyDirectory); + } +} diff --git a/Brutal.Fmod/FmodStudioApi/Manual/Structs/UserProperty.cs b/Brutal.Fmod/FmodStudioApi/Manual/Structs/UserProperty.cs new file mode 100644 index 0000000..41df22b --- /dev/null +++ b/Brutal.Fmod/FmodStudioApi/Manual/Structs/UserProperty.cs @@ -0,0 +1,50 @@ +using System.Runtime.InteropServices; + +namespace Brutal.FmodApi.Studio; + +/// +/// UserProperty struct. The Value field is a union of different types at the same address, only +/// one should be set at a time. +/// +[StructLayout(LayoutKind.Explicit)] +public unsafe struct UserProperty +{ + /// + /// + /// + [FieldOffset(0)] + public byte* Name; + + /// + /// + /// + [FieldOffset(8)] + public UserPropertyType Type; + + // Explicit alignment of each Value field in the 'union' to the same address + // Union aligned to the next 8 byte increment due to C++ alignment of its largest type (pointer) + + /// + /// + /// + [FieldOffset(16)] + public int IntValue; + + /// + /// + /// + [FieldOffset(16)] + public bool BoolValue; + + /// + /// + /// + [FieldOffset(16)] + public float FloatValue; + + /// + /// + /// + [FieldOffset(16)] + public byte* StringValue; +} diff --git a/Brutal.Fmod/GlobalUsings.gen.cs b/Brutal.Fmod/GlobalUsings.gen.cs new file mode 100644 index 0000000..961422d --- /dev/null +++ b/Brutal.Fmod/GlobalUsings.gen.cs @@ -0,0 +1,8 @@ +// +// Generated by Brutal.Fmod.Generate; do not edit by hand. +#nullable enable + +global using System.Runtime.InteropServices; +global using Brutal.Interop; +global using Brutal.Numerics; +global using Brutal.Strings; diff --git a/Brutal.Fmod/LICENSES/BRUTAL-FMOD-THIRD-PARTY-NOTICES.txt b/Brutal.Fmod/LICENSES/BRUTAL-FMOD-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..20198c5 --- /dev/null +++ b/Brutal.Fmod/LICENSES/BRUTAL-FMOD-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,8 @@ +FMOD is a trademark of Firelight Technologies Pty Ltd. The FMOD Engine, its API +and its documentation are Copyright (c) Firelight Technologies Pty Ltd. This +package contains C# bindings generated from the FMOD Engine headers and API +documentation. It is not affiliated with or endorsed by Firelight Technologies. + +Use of FMOD is subject to the FMOD End User Licence Agreement. Commercial use +may require a separate license from Firelight Technologies; see +https://www.fmod.com/licensing. \ No newline at end of file diff --git a/Brutal.FreeType/LICENSES/BRUTAL-FREETYPE-THIRD-PARTY-NOTICES.txt b/Brutal.FreeType/LICENSES/BRUTAL-FREETYPE-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..dd5a06f --- /dev/null +++ b/Brutal.FreeType/LICENSES/BRUTAL-FREETYPE-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,364 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.FreeType + +This package redistributes the third-party components listed below, each reproduced +with the license that governs it. + + Two native libraries, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + FreeType 2.14.3 freetype.dll / libfreetype.so / libfreetype.dylib + libpng 1.8.0.git png18.dll / libpng18.so / libpng18.dylib + + It also redistributes the FreeType public C headers in source form, so that other + native packages can compile against FreeType. + + FreeType's code is governed by three licenses, one per section below: the FreeType + License for the library, and a separate X11-style license for each of the contributed + BDF and PCF drivers, which are compiled into the shipped binaries. + + zlib is not contained in this package. It is supplied by RocketWerkz.Brutal.ZLib, + on which this package depends, and is covered by that package's own notices. + + FreeType's own LICENSE.TXT distributes it "under two mutually exclusive open-source + licenses" - the FreeType License (FTL) and the GNU General Public License version 2 - + and states that "*you* must choose *one* of the two licenses ... then obey all its + terms and conditions". This distribution is made under the FreeType License, + reproduced in full below. The GPL v2 text is not reproduced. + + FTL.txt ships in this same folder, byte-for-byte identical to the copy in the + FreeType release this package was built from, and its text is reproduced in the + FreeType section below. + + The FreeType Project's credit and disclaimer: + + Portions of this software are copyright © 2026 The FreeType Project + (https://freetype.org). All rights reserved. + + This software is based in part of the work of the FreeType Team. + + Where an upstream license file covers more code than this package ships, only the + blocks governing the code actually contained here are reproduced. Each such omission + is named where it occurs, so that nothing below should be read as truncated. + + +============================================================================== +FreeType +============================================================================== + + Name FreeType + Version 2.14.3 (built from VER-2-14-3-55-g7e0e56f84) + Upstream https://freetype.org -- https://github.com/freetype/freetype + SPDX FTL + Shipped as freetype.dll, libfreetype.so, libfreetype.dylib, and the FreeType + public C headers + + The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © The FreeType + Project (https://freetype.org). All rights reserved. + """ + + Please replace with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + https://freetype.org + + +--- end of FTL.TXT --- + + +============================================================================== +FreeType -- BDF driver +============================================================================== + + Name BDF font driver, a contributed component of FreeType + Version as contained in FreeType 2.14.3 + Upstream https://github.com/freetype/freetype + SPDX MIT + Shipped as compiled into the FreeType binaries above; FreeType's own LICENSE.TXT + places this driver, and the header internal/fthash.h which this package + also redistributes in source form, under the license below rather than + under the FreeType License + +Copyright (C) 2001-2002 by Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*** Portions of the driver (that is, bdflib.c and bdf.h): + +Copyright 2000 Computing Research Labs, New Mexico State University +Copyright 2001-2002, 2011 Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +============================================================================== +FreeType -- PCF driver +============================================================================== + + Name PCF font driver, a contributed component of FreeType + Version as contained in FreeType 2.14.3 + Upstream https://github.com/freetype/freetype + SPDX MIT + Shipped as compiled into the FreeType binaries above + +Copyright (C) 2000 by Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +============================================================================== +libpng +============================================================================== + + Name libpng, the PNG Reference Library + Version 1.8.0.git (pre-release; built from commit 92c853c34, v1.6.58-132) + Upstream http://www.libpng.org/pub/png/libpng.html + https://github.com/pnggroup/libpng + SPDX libpng-2.0 + Shipped as png18.dll, libpng18.so, libpng18.dylib + + Upstream's license file also carries PNG Reference Library License version 1, which + by its own terms applies to "libpng 0.5 through 1.6.35". The version shipped here is + 1.8.0.git. Version 1 is not reproduced. + +PNG Reference Library License version 2 +--------------------------------------- + + * Copyright (c) 1995-2026 The PNG Reference Library Authors. + * Copyright (c) 2018-2026 Cosmin Truta. + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * Copyright (c) 1996-1997 Andreas Dilger. + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +The software is supplied "as is", without warranty of any kind, +express or implied, including, without limitation, the warranties +of merchantability, fitness for a particular purpose, title, and +non-infringement. In no event shall the Copyright owners, or +anyone distributing the software, be liable for any damages or +other liability, whether in contract, tort or otherwise, arising +from, out of, or in connection with the software, or the use or +other dealings in the software, even if advised of the possibility +of such damage. + +Permission is hereby granted to use, copy, modify, and distribute +this software, or portions hereof, for any purpose, without fee, +subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the product + documentation would be appreciated, but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. diff --git a/Brutal.FreeType/LICENSES/FTL.txt b/Brutal.FreeType/LICENSES/FTL.txt new file mode 100644 index 0000000..b9e8cbd --- /dev/null +++ b/Brutal.FreeType/LICENSES/FTL.txt @@ -0,0 +1,169 @@ + The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © The FreeType + Project (https://freetype.org). All rights reserved. + """ + + Please replace with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + https://freetype.org + + +--- end of FTL.TXT --- diff --git a/Brutal.Glfw/CustomStringMarshaller.cs b/Brutal.Glfw/CustomStringMarshaller.cs new file mode 100644 index 0000000..0a67e38 --- /dev/null +++ b/Brutal.Glfw/CustomStringMarshaller.cs @@ -0,0 +1,180 @@ +using System.Runtime.InteropServices.Marshalling; +using System.Text; + +namespace Brutal.GlfwApi; + +/// +/// Marshaller for UTF-8 strings. +/// +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedIn, typeof(ManagedToUnmanagedIn))] // string parameter +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedOut, typeof(ManagedToUnmanagedOut))] // return string +//[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedRef, typeof(ManagedToUnmanagedRef))] +//[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedIn, typeof(UnmanagedToManagedIn))] +//[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedRef, typeof(UnmanagedToManagedRef))] +//[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedOut, typeof(UnmanagedToManagedOut))] +//[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedIn, typeof(ManagedToUnmanagedIn))] +public static unsafe class CustomStringMarshaller +{ + /// + /// Custom marshaller to marshal a managed string as a UTF-8 unmanaged string. + /// + public ref struct ManagedToUnmanagedIn + { + /// + /// Gets the requested buffer size for optimized marshalling. + /// + public static int BufferSize => 0x100; + + private byte* _unmanagedValue; + private bool _allocated; + + /// + /// Initializes the marshaller with a managed string and requested buffer. + /// + /// The managed string with which to initialize the marshaller. + /// The request buffer whose size is at least . + public void FromManaged(string? managed, Span buffer) + { + _allocated = false; + + if (managed is null) + { + _unmanagedValue = null; + return; + } + + const int MaxUtf8BytesPerChar = 3; + + // >= for null terminator + // Use the cast to long to avoid the checked operation + if ((long)MaxUtf8BytesPerChar * managed.Length >= buffer.Length) + { + // Calculate accurate byte count when the provided stack-allocated buffer is not sufficient + int exactByteCount = checked(Encoding.UTF8.GetByteCount(managed) + 1); // + 1 for null terminator + if (exactByteCount > buffer.Length) + { + buffer = new Span((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount); + _allocated = true; + } + } + + // Unsafe.AsPointer is safe since buffer must be pinned + _unmanagedValue = (byte*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(buffer)); + + int byteCount = Encoding.UTF8.GetBytes(managed, buffer); + buffer[byteCount] = 0; // null-terminate + } + + /// + /// Converts the current managed string to an unmanaged string. + /// + /// An unmanaged string. + public byte* ToUnmanaged() => _unmanagedValue; + + /// + /// Frees any allocated unmanaged memory. + /// + public void Free() + { + if (_allocated) + NativeMemory.Free(_unmanagedValue); + } + } + + public static class ManagedToUnmanagedOut + { + /// + /// Converts an unmanaged UTF-8 string to a managed string, preserving a NULL pointer as + /// . + /// + /// + /// Several GLFW functions return NULL to signal failure - e.g. glfwGetClipboardString + /// returns NULL on FormatUnavailable. Collapsing NULL to an empty string would make a + /// failed call indistinguishable from a legitimately empty result, so the NULL signal is + /// preserved and the return type is nullable. + /// + /// The unmanaged UTF-8 string, or NULL. + /// The managed string, or if is NULL. + public static string? ConvertToManaged(byte* unmanaged) + { + if (unmanaged == null) + return null; + + return Marshal.PtrToStringUTF8((IntPtr)unmanaged); + } + } + + /* + public ref struct ManagedToUnmanagedRef + { + public void FromManaged(string managed) { } + + public void FromUnmanaged(byte* unmanaged) + { + } + + public string ToManaged() + { + return ""; + } + + public byte* ToUnmanaged() + { + return null; + } + + public void Free() { } + } + + + public ref struct UnmanagedToManagedOut + { + public void FromManaged(string managed) { } + + public byte* ToUnmanaged() + { + return null; + } + + public void Free() { } + } + + public ref struct UnmanagedToManagedRef + { + public void FromManaged(string managed) { } + + public void FromUnmanaged(byte* unmanaged) + { + } + + public string ToManaged() + { + return ""; + } + + public byte* ToUnmanaged() + { + return null; + } + + public void Free() { } + } + + public ref struct UnmanagedToManagedIn + { + private byte* _unmanagedValue; + + public void FromUnmanaged(byte* unmanaged) + { + _unmanagedValue = unmanaged; + } + + public string ToManaged() + { + return ""; + } + + public void Free() { } + } + */ +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwButtonAction.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwButtonAction.gen.cs new file mode 100644 index 0000000..bd4a7a1 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwButtonAction.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwButtonAction + { + Release = GLFW_RELEASE, + Press = GLFW_PRESS, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwContextAttribute.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwContextAttribute.gen.cs new file mode 100644 index 0000000..f6e7e23 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwContextAttribute.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwContextAttribute + { + ClientApi = GLFW_CLIENT_API, + CreationApi = GLFW_CONTEXT_CREATION_API, + NoError = GLFW_CONTEXT_NO_ERROR, + ReleaseBehavior = GLFW_CONTEXT_RELEASE_BEHAVIOR, + Revision = GLFW_CONTEXT_REVISION, + Robustness = GLFW_CONTEXT_ROBUSTNESS, + VersionMajor = GLFW_CONTEXT_VERSION_MAJOR, + VersionMinor = GLFW_CONTEXT_VERSION_MINOR, + OpenGlDebugContext = GLFW_OPENGL_DEBUG_CONTEXT, + OpenGlForwardCompat = GLFW_OPENGL_FORWARD_COMPAT, + OpenGlProfile = GLFW_OPENGL_PROFILE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwCursorMode.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwCursorMode.gen.cs new file mode 100644 index 0000000..cad237e --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwCursorMode.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwCursorMode + { + Normal = GLFW_CURSOR_NORMAL, + Hidden = GLFW_CURSOR_HIDDEN, + Disabled = GLFW_CURSOR_DISABLED, + Captured = GLFW_CURSOR_CAPTURED, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwErrorCode.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwErrorCode.gen.cs new file mode 100644 index 0000000..f5d6976 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwErrorCode.gen.cs @@ -0,0 +1,97 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + /// + /// More detailed documentation at: Error Codes (glfw.org). + /// + /// Error Codes + public enum GlfwErrorCode + { + /// + /// No error has occurred. + /// + NoError = GLFW_NO_ERROR, + + /// + /// This occurs if a GLFW function was called that must not be called unless the library is initialized. + /// + NotInitialized = GLFW_NOT_INITIALIZED, + + /// + /// This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES + /// context but no context is current on the calling thread. One such function is Glfw.GetCurrentContext. + /// + NoCurrentContext = GLFW_NO_CURRENT_CONTEXT, + + /// + /// One of the arguments to the function was an invalid enum value. + /// + InvalidEnum = GLFW_INVALID_ENUM, + + /// + /// One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or + /// OpenGL ES version. + /// + InvalidValue = GLFW_INVALID_VALUE, + + /// + /// A memory allocation failed. + /// + OutOfMemory = GLFW_OUT_OF_MEMORY, + + /// + /// GLFW could not find support for the requested API on the system. + /// + ApiUnavailable = GLFW_API_UNAVAILABLE, + + /// + /// The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not + /// available on this machine. + /// + VersionUnavailable = GLFW_VERSION_UNAVAILABLE, + + /// + /// A platform-specific error occurred that does not match any of the more specific categories. + /// + PlatformError = GLFW_PLATFORM_ERROR, + + /// + /// If emitted during window creation, the requested pixel format is not supported. If emitted when querying + /// the clipboard, the contents of the clipboard could not be converted to the requested format. + /// + FormatUnavailable = GLFW_FORMAT_UNAVAILABLE, + + /// + /// A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to + /// have one. + /// + NoWindowContext = GLFW_NO_WINDOW_CONTEXT, + + /// + /// The specified standard cursor shape is not available, either because the current platform cursor theme + /// does not provide it or because it is not available on the platform. + /// + CursorUnavailable = GLFW_CURSOR_UNAVAILABLE, + + /// + /// The requested feature is not provided by the platform, so GLFW is unable to implement it. The + /// documentation for each function notes if it could emit this error. + /// + FeatureUnavailable = GLFW_FEATURE_UNAVAILABLE, + + /// + /// The requested feature has not yet been implemented in GLFW for this platform. + /// + FeatureUnimplemented = GLFW_FEATURE_UNIMPLEMENTED, + + /// + /// The requested platform-specific functionality is not available on the current platform. Most commonly + /// emitted by a native-access function whose backend (Cocoa, Win32, X11, Wayland, WGL, NSGL, GLX, EGL, + /// OSMesa) is not the one GLFW was initialized for. + /// + PlatformUnavailable = GLFW_PLATFORM_UNAVAILABLE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwFocusEvent.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwFocusEvent.gen.cs new file mode 100644 index 0000000..fa914a4 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwFocusEvent.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwFocusEvent + { + LostFocus = GLFW_FALSE, + GainFocus = GLFW_TRUE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwGamepadAxis.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwGamepadAxis.gen.cs new file mode 100644 index 0000000..ccb4456 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwGamepadAxis.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwGamepadAxis + { + LeftX = GLFW_GAMEPAD_AXIS_LEFT_X, + LeftY = GLFW_GAMEPAD_AXIS_LEFT_Y, + RightX = GLFW_GAMEPAD_AXIS_RIGHT_X, + RightY = GLFW_GAMEPAD_AXIS_RIGHT_Y, + LeftTrigger = GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, + RightTrigger = GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, + Last = GLFW_GAMEPAD_AXIS_LAST, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwGamepadButton.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwGamepadButton.gen.cs new file mode 100644 index 0000000..5a5a399 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwGamepadButton.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwGamepadButton + { + A = GLFW_GAMEPAD_BUTTON_A, + B = GLFW_GAMEPAD_BUTTON_B, + X = GLFW_GAMEPAD_BUTTON_X, + Y = GLFW_GAMEPAD_BUTTON_Y, + LeftBumper = GLFW_GAMEPAD_BUTTON_LEFT_BUMPER, + RightBumper = GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER, + Back = GLFW_GAMEPAD_BUTTON_BACK, + Start = GLFW_GAMEPAD_BUTTON_START, + Guide = GLFW_GAMEPAD_BUTTON_GUIDE, + LeftThumb = GLFW_GAMEPAD_BUTTON_LEFT_THUMB, + RightThumb = GLFW_GAMEPAD_BUTTON_RIGHT_THUMB, + DpadUp = GLFW_GAMEPAD_BUTTON_DPAD_UP, + DpadRight = GLFW_GAMEPAD_BUTTON_DPAD_RIGHT, + DpadDown = GLFW_GAMEPAD_BUTTON_DPAD_DOWN, + DpadLeft = GLFW_GAMEPAD_BUTTON_DPAD_LEFT, + Last = GLFW_GAMEPAD_BUTTON_LAST, + Cross = GLFW_GAMEPAD_BUTTON_CROSS, + Circle = GLFW_GAMEPAD_BUTTON_CIRCLE, + Square = GLFW_GAMEPAD_BUTTON_SQUARE, + Triangle = GLFW_GAMEPAD_BUTTON_TRIANGLE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwIconifyEvent.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwIconifyEvent.gen.cs new file mode 100644 index 0000000..f2c5a40 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwIconifyEvent.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwIconifyEvent + { + Restored = GLFW_FALSE, + Iconified = GLFW_TRUE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwInitHint.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwInitHint.gen.cs new file mode 100644 index 0000000..d68a2bb --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwInitHint.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwInitHint + { + Platform = GLFW_PLATFORM, + JoystickHatButtons = GLFW_JOYSTICK_HAT_BUTTONS, + CocoaChdirResources = GLFW_COCOA_CHDIR_RESOURCES, + CocoaMenubar = GLFW_COCOA_MENUBAR, + WaylandLibdecor = GLFW_WAYLAND_LIBDECOR, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwInputMode.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwInputMode.gen.cs new file mode 100644 index 0000000..b6d28dd --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwInputMode.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwInputMode + { + Cursor = GLFW_CURSOR, + StickyKeys = GLFW_STICKY_KEYS, + StickyMouseButtons = GLFW_STICKY_MOUSE_BUTTONS, + LockKeyMods = GLFW_LOCK_KEY_MODS, + RawMouseMotion = GLFW_RAW_MOUSE_MOTION, + UnlimitedMouseButtons = GLFW_UNLIMITED_MOUSE_BUTTONS, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwJoystickEvent.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwJoystickEvent.gen.cs new file mode 100644 index 0000000..0bc095a --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwJoystickEvent.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwJoystickEvent + { + Connected = GLFW_CONNECTED, + Disconnected = GLFW_DISCONNECTED, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwJoystickHat.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwJoystickHat.gen.cs new file mode 100644 index 0000000..b097a43 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwJoystickHat.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + [Flags] + public enum GlfwJoystickHat : byte + { + Centered = GLFW_HAT_CENTERED, + Up = GLFW_HAT_UP, + Right = GLFW_HAT_RIGHT, + Down = GLFW_HAT_DOWN, + Left = GLFW_HAT_LEFT, + RightUp = GLFW_HAT_RIGHT_UP, + RightDown = GLFW_HAT_RIGHT_DOWN, + LeftUp = GLFW_HAT_LEFT_UP, + LeftDown = GLFW_HAT_LEFT_DOWN, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwKey.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwKey.gen.cs new file mode 100644 index 0000000..a0c7843 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwKey.gen.cs @@ -0,0 +1,132 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwKey + { + Unknown = GLFW_KEY_UNKNOWN, + Space = GLFW_KEY_SPACE, + Apostrophe = GLFW_KEY_APOSTROPHE, + Comma = GLFW_KEY_COMMA, + Minus = GLFW_KEY_MINUS, + Period = GLFW_KEY_PERIOD, + Slash = GLFW_KEY_SLASH, + Number0 = GLFW_KEY_0, + Number1 = GLFW_KEY_1, + Number2 = GLFW_KEY_2, + Number3 = GLFW_KEY_3, + Number4 = GLFW_KEY_4, + Number5 = GLFW_KEY_5, + Number6 = GLFW_KEY_6, + Number7 = GLFW_KEY_7, + Number8 = GLFW_KEY_8, + Number9 = GLFW_KEY_9, + Semicolon = GLFW_KEY_SEMICOLON, + Equal = GLFW_KEY_EQUAL, + A = GLFW_KEY_A, + B = GLFW_KEY_B, + C = GLFW_KEY_C, + D = GLFW_KEY_D, + E = GLFW_KEY_E, + F = GLFW_KEY_F, + G = GLFW_KEY_G, + H = GLFW_KEY_H, + I = GLFW_KEY_I, + J = GLFW_KEY_J, + K = GLFW_KEY_K, + L = GLFW_KEY_L, + M = GLFW_KEY_M, + N = GLFW_KEY_N, + O = GLFW_KEY_O, + P = GLFW_KEY_P, + Q = GLFW_KEY_Q, + R = GLFW_KEY_R, + S = GLFW_KEY_S, + T = GLFW_KEY_T, + U = GLFW_KEY_U, + V = GLFW_KEY_V, + W = GLFW_KEY_W, + X = GLFW_KEY_X, + Y = GLFW_KEY_Y, + Z = GLFW_KEY_Z, + LeftBracket = GLFW_KEY_LEFT_BRACKET, + Backslash = GLFW_KEY_BACKSLASH, + RightBracket = GLFW_KEY_RIGHT_BRACKET, + GraveAccent = GLFW_KEY_GRAVE_ACCENT, + World1 = GLFW_KEY_WORLD_1, + World2 = GLFW_KEY_WORLD_2, + Escape = GLFW_KEY_ESCAPE, + Enter = GLFW_KEY_ENTER, + Tab = GLFW_KEY_TAB, + Backspace = GLFW_KEY_BACKSPACE, + Insert = GLFW_KEY_INSERT, + Delete = GLFW_KEY_DELETE, + Right = GLFW_KEY_RIGHT, + Left = GLFW_KEY_LEFT, + Down = GLFW_KEY_DOWN, + Up = GLFW_KEY_UP, + PageUp = GLFW_KEY_PAGE_UP, + PageDown = GLFW_KEY_PAGE_DOWN, + Home = GLFW_KEY_HOME, + End = GLFW_KEY_END, + CapsLock = GLFW_KEY_CAPS_LOCK, + ScrollLock = GLFW_KEY_SCROLL_LOCK, + NumLock = GLFW_KEY_NUM_LOCK, + PrintScreen = GLFW_KEY_PRINT_SCREEN, + Pause = GLFW_KEY_PAUSE, + F1 = GLFW_KEY_F1, + F2 = GLFW_KEY_F2, + F3 = GLFW_KEY_F3, + F4 = GLFW_KEY_F4, + F5 = GLFW_KEY_F5, + F6 = GLFW_KEY_F6, + F7 = GLFW_KEY_F7, + F8 = GLFW_KEY_F8, + F9 = GLFW_KEY_F9, + F10 = GLFW_KEY_F10, + F11 = GLFW_KEY_F11, + F12 = GLFW_KEY_F12, + F13 = GLFW_KEY_F13, + F14 = GLFW_KEY_F14, + F15 = GLFW_KEY_F15, + F16 = GLFW_KEY_F16, + F17 = GLFW_KEY_F17, + F18 = GLFW_KEY_F18, + F19 = GLFW_KEY_F19, + F20 = GLFW_KEY_F20, + F21 = GLFW_KEY_F21, + F22 = GLFW_KEY_F22, + F23 = GLFW_KEY_F23, + F24 = GLFW_KEY_F24, + F25 = GLFW_KEY_F25, + Kp0 = GLFW_KEY_KP_0, + Kp1 = GLFW_KEY_KP_1, + Kp2 = GLFW_KEY_KP_2, + Kp3 = GLFW_KEY_KP_3, + Kp4 = GLFW_KEY_KP_4, + Kp5 = GLFW_KEY_KP_5, + Kp6 = GLFW_KEY_KP_6, + Kp7 = GLFW_KEY_KP_7, + Kp8 = GLFW_KEY_KP_8, + Kp9 = GLFW_KEY_KP_9, + KpDecimal = GLFW_KEY_KP_DECIMAL, + KpDivide = GLFW_KEY_KP_DIVIDE, + KpMultiply = GLFW_KEY_KP_MULTIPLY, + KpSubtract = GLFW_KEY_KP_SUBTRACT, + KpAdd = GLFW_KEY_KP_ADD, + KpEnter = GLFW_KEY_KP_ENTER, + KpEqual = GLFW_KEY_KP_EQUAL, + LeftShift = GLFW_KEY_LEFT_SHIFT, + LeftControl = GLFW_KEY_LEFT_CONTROL, + LeftAlt = GLFW_KEY_LEFT_ALT, + LeftSuper = GLFW_KEY_LEFT_SUPER, + RightShift = GLFW_KEY_RIGHT_SHIFT, + RightControl = GLFW_KEY_RIGHT_CONTROL, + RightAlt = GLFW_KEY_RIGHT_ALT, + RightSuper = GLFW_KEY_RIGHT_SUPER, + Menu = GLFW_KEY_MENU, + Last = GLFW_KEY_LAST, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwKeyAction.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwKeyAction.gen.cs new file mode 100644 index 0000000..a864fcf --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwKeyAction.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwKeyAction + { + Release = GLFW_RELEASE, + Press = GLFW_PRESS, + Repeat = GLFW_REPEAT, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwMaximizeEvent.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwMaximizeEvent.gen.cs new file mode 100644 index 0000000..5bb8252 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwMaximizeEvent.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwMaximizeEvent + { + Restored = GLFW_FALSE, + Maximised = GLFW_TRUE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwModifier.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwModifier.gen.cs new file mode 100644 index 0000000..8f3b40d --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwModifier.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + [Flags] + public enum GlfwModifier + { + Shift = GLFW_MOD_SHIFT, + Control = GLFW_MOD_CONTROL, + Alt = GLFW_MOD_ALT, + Super = GLFW_MOD_SUPER, + CapsLock = GLFW_MOD_CAPS_LOCK, + NumLock = GLFW_MOD_NUM_LOCK, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwMonitorEvent.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwMonitorEvent.gen.cs new file mode 100644 index 0000000..041d6d5 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwMonitorEvent.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwMonitorEvent + { + Connected = GLFW_CONNECTED, + Disconnected = GLFW_DISCONNECTED, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwMouseButton.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwMouseButton.gen.cs new file mode 100644 index 0000000..28fccd1 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwMouseButton.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwMouseButton + { + Number1 = GLFW_MOUSE_BUTTON_1, + Number2 = GLFW_MOUSE_BUTTON_2, + Number3 = GLFW_MOUSE_BUTTON_3, + Number4 = GLFW_MOUSE_BUTTON_4, + Number5 = GLFW_MOUSE_BUTTON_5, + Number6 = GLFW_MOUSE_BUTTON_6, + Number7 = GLFW_MOUSE_BUTTON_7, + Number8 = GLFW_MOUSE_BUTTON_8, + Last = GLFW_MOUSE_BUTTON_LAST, + Left = GLFW_MOUSE_BUTTON_LEFT, + Right = GLFW_MOUSE_BUTTON_RIGHT, + Middle = GLFW_MOUSE_BUTTON_MIDDLE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwPlatform.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwPlatform.gen.cs new file mode 100644 index 0000000..702634e --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwPlatform.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + /// + /// The platform GLFW was initialized for. + /// + /// Runtime platform selection + public enum GlfwPlatform + { + /// + /// The Win32 platform. + /// + Win32 = GLFW_PLATFORM_WIN32, + + /// + /// The Cocoa platform (macOS). + /// + Cocoa = GLFW_PLATFORM_COCOA, + + /// + /// The Wayland platform (Linux/BSD). + /// + Wayland = GLFW_PLATFORM_WAYLAND, + + /// + /// The X11 platform (Linux/BSD). + /// + X11 = GLFW_PLATFORM_X11, + + /// + /// The Null platform — useful for headless / testing builds. + /// + Null = GLFW_PLATFORM_NULL, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwScrollFlags.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwScrollFlags.gen.cs new file mode 100644 index 0000000..2f168d9 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwScrollFlags.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + [Flags] + public enum GlfwScrollFlags + { + Precise = GLFW_SCROLL_PRECISE, + Begin = GLFW_SCROLL_BEGIN, + End = GLFW_SCROLL_END, + Momentum = GLFW_SCROLL_MOMENTUM, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwStandardCursor.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwStandardCursor.gen.cs new file mode 100644 index 0000000..9125c2a --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwStandardCursor.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwStandardCursor + { + Arrow = GLFW_ARROW_CURSOR, + IBeam = GLFW_IBEAM_CURSOR, + Crosshair = GLFW_CROSSHAIR_CURSOR, + PointingHand = GLFW_POINTING_HAND_CURSOR, + ResizeEw = GLFW_RESIZE_EW_CURSOR, + ResizeNs = GLFW_RESIZE_NS_CURSOR, + ResizeNwse = GLFW_RESIZE_NWSE_CURSOR, + ResizeNesw = GLFW_RESIZE_NESW_CURSOR, + ResizeAll = GLFW_RESIZE_ALL_CURSOR, + NotAllowed = GLFW_NOT_ALLOWED_CURSOR, + HResize = GLFW_HRESIZE_CURSOR, + VResize = GLFW_VRESIZE_CURSOR, + Hand = GLFW_HAND_CURSOR, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwWindowAttribute.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwWindowAttribute.gen.cs new file mode 100644 index 0000000..232c947 --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwWindowAttribute.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwWindowAttribute + { + AutoIconify = GLFW_AUTO_ICONIFY, + Decorated = GLFW_DECORATED, + Floating = GLFW_FLOATING, + FocusOnShow = GLFW_FOCUS_ON_SHOW, + Focused = GLFW_FOCUSED, + Hovered = GLFW_HOVERED, + Iconified = GLFW_ICONIFIED, + Maximized = GLFW_MAXIMIZED, + MousePassthrough = GLFW_MOUSE_PASSTHROUGH, + Resizable = GLFW_RESIZABLE, + TransparentFramebuffer = GLFW_TRANSPARENT_FRAMEBUFFER, + Visible = GLFW_VISIBLE, + } +} diff --git a/Brutal.Glfw/Generated/Enums/GlfwWindowHint.gen.cs b/Brutal.Glfw/Generated/Enums/GlfwWindowHint.gen.cs new file mode 100644 index 0000000..7f54e4b --- /dev/null +++ b/Brutal.Glfw/Generated/Enums/GlfwWindowHint.gen.cs @@ -0,0 +1,56 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public enum GlfwWindowHint + { + Focused = GLFW_FOCUSED, + Resizable = GLFW_RESIZABLE, + Visible = GLFW_VISIBLE, + Decorated = GLFW_DECORATED, + AutoIconify = GLFW_AUTO_ICONIFY, + Floating = GLFW_FLOATING, + Maximized = GLFW_MAXIMIZED, + CenterCursor = GLFW_CENTER_CURSOR, + TransparentFramebuffer = GLFW_TRANSPARENT_FRAMEBUFFER, + FocusOnShow = GLFW_FOCUS_ON_SHOW, + MousePassthrough = GLFW_MOUSE_PASSTHROUGH, + PositionX = GLFW_POSITION_X, + PositionY = GLFW_POSITION_Y, + ScaleFramebuffer = GLFW_SCALE_FRAMEBUFFER, + RedBits = GLFW_RED_BITS, + GreenBits = GLFW_GREEN_BITS, + BlueBits = GLFW_BLUE_BITS, + AlphaBits = GLFW_ALPHA_BITS, + DepthBits = GLFW_DEPTH_BITS, + StencilBits = GLFW_STENCIL_BITS, + AccumRedBits = GLFW_ACCUM_RED_BITS, + AccumGreenBits = GLFW_ACCUM_GREEN_BITS, + AccumBlueBits = GLFW_ACCUM_BLUE_BITS, + AccumAlphaBits = GLFW_ACCUM_ALPHA_BITS, + AuxBuffers = GLFW_AUX_BUFFERS, + Stereo = GLFW_STEREO, + Samples = GLFW_SAMPLES, + SrgbCapable = GLFW_SRGB_CAPABLE, + RefreshRate = GLFW_REFRESH_RATE, + Doublebuffer = GLFW_DOUBLEBUFFER, + ClientApi = GLFW_CLIENT_API, + ContextVersionMajor = GLFW_CONTEXT_VERSION_MAJOR, + ContextVersionMinor = GLFW_CONTEXT_VERSION_MINOR, + ContextRobustness = GLFW_CONTEXT_ROBUSTNESS, + ContextReleaseBehavior = GLFW_CONTEXT_RELEASE_BEHAVIOR, + ContextNoError = GLFW_CONTEXT_NO_ERROR, + ContextCreationApi = GLFW_CONTEXT_CREATION_API, + ScaleToMonitor = GLFW_SCALE_TO_MONITOR, + CocoaRetinaFramebuffer = GLFW_COCOA_RETINA_FRAMEBUFFER, + CocoaFrameName = GLFW_COCOA_FRAME_NAME, + CocoaGraphicsSwitching = GLFW_COCOA_GRAPHICS_SWITCHING, + X11ClassName = GLFW_X11_CLASS_NAME, + X11InstanceName = GLFW_X11_INSTANCE_NAME, + OpenGlForwardCompat = GLFW_OPENGL_FORWARD_COMPAT, + OpenGlDebugContext = GLFW_OPENGL_DEBUG_CONTEXT, + OpenGlProfile = GLFW_OPENGL_PROFILE, + } +} diff --git a/Brutal.Glfw/Generated/Glfw.Constants.gen.cs b/Brutal.Glfw/Generated/Glfw.Constants.gen.cs new file mode 100644 index 0000000..1c250d3 --- /dev/null +++ b/Brutal.Glfw/Generated/Glfw.Constants.gen.cs @@ -0,0 +1,351 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + public static class Constants + { + public const int GLFW_INCLUDE_NONE = unchecked((int)1); + public const int GLFW_VERSION_MAJOR = unchecked((int)3); + public const int GLFW_VERSION_MINOR = unchecked((int)5); + public const int GLFW_VERSION_REVISION = unchecked((int)1); + public const int GLFW_TRUE = unchecked((int)1); + public const int GLFW_FALSE = unchecked((int)0); + public const int GLFW_RELEASE = unchecked((int)0); + public const int GLFW_PRESS = unchecked((int)1); + public const int GLFW_REPEAT = unchecked((int)2); + public const int GLFW_HAT_CENTERED = unchecked((int)0); + public const int GLFW_HAT_UP = unchecked((int)1); + public const int GLFW_HAT_RIGHT = unchecked((int)2); + public const int GLFW_HAT_DOWN = unchecked((int)4); + public const int GLFW_HAT_LEFT = unchecked((int)8); + public const int GLFW_HAT_RIGHT_UP = unchecked((int)(GLFW_HAT_RIGHT | GLFW_HAT_UP)); + public const int GLFW_HAT_RIGHT_DOWN = unchecked((int)(GLFW_HAT_RIGHT | GLFW_HAT_DOWN)); + public const int GLFW_HAT_LEFT_UP = unchecked((int)(GLFW_HAT_LEFT | GLFW_HAT_UP)); + public const int GLFW_HAT_LEFT_DOWN = unchecked((int)(GLFW_HAT_LEFT | GLFW_HAT_DOWN)); + public const int GLFW_KEY_UNKNOWN = unchecked((int)-1); + public const int GLFW_KEY_SPACE = unchecked((int)32); + public const int GLFW_KEY_APOSTROPHE = unchecked((int)39); + public const int GLFW_KEY_COMMA = unchecked((int)44); + public const int GLFW_KEY_MINUS = unchecked((int)45); + public const int GLFW_KEY_PERIOD = unchecked((int)46); + public const int GLFW_KEY_SLASH = unchecked((int)47); + public const int GLFW_KEY_0 = unchecked((int)48); + public const int GLFW_KEY_1 = unchecked((int)49); + public const int GLFW_KEY_2 = unchecked((int)50); + public const int GLFW_KEY_3 = unchecked((int)51); + public const int GLFW_KEY_4 = unchecked((int)52); + public const int GLFW_KEY_5 = unchecked((int)53); + public const int GLFW_KEY_6 = unchecked((int)54); + public const int GLFW_KEY_7 = unchecked((int)55); + public const int GLFW_KEY_8 = unchecked((int)56); + public const int GLFW_KEY_9 = unchecked((int)57); + public const int GLFW_KEY_SEMICOLON = unchecked((int)59); + public const int GLFW_KEY_EQUAL = unchecked((int)61); + public const int GLFW_KEY_A = unchecked((int)65); + public const int GLFW_KEY_B = unchecked((int)66); + public const int GLFW_KEY_C = unchecked((int)67); + public const int GLFW_KEY_D = unchecked((int)68); + public const int GLFW_KEY_E = unchecked((int)69); + public const int GLFW_KEY_F = unchecked((int)70); + public const int GLFW_KEY_G = unchecked((int)71); + public const int GLFW_KEY_H = unchecked((int)72); + public const int GLFW_KEY_I = unchecked((int)73); + public const int GLFW_KEY_J = unchecked((int)74); + public const int GLFW_KEY_K = unchecked((int)75); + public const int GLFW_KEY_L = unchecked((int)76); + public const int GLFW_KEY_M = unchecked((int)77); + public const int GLFW_KEY_N = unchecked((int)78); + public const int GLFW_KEY_O = unchecked((int)79); + public const int GLFW_KEY_P = unchecked((int)80); + public const int GLFW_KEY_Q = unchecked((int)81); + public const int GLFW_KEY_R = unchecked((int)82); + public const int GLFW_KEY_S = unchecked((int)83); + public const int GLFW_KEY_T = unchecked((int)84); + public const int GLFW_KEY_U = unchecked((int)85); + public const int GLFW_KEY_V = unchecked((int)86); + public const int GLFW_KEY_W = unchecked((int)87); + public const int GLFW_KEY_X = unchecked((int)88); + public const int GLFW_KEY_Y = unchecked((int)89); + public const int GLFW_KEY_Z = unchecked((int)90); + public const int GLFW_KEY_LEFT_BRACKET = unchecked((int)91); + public const int GLFW_KEY_BACKSLASH = unchecked((int)92); + public const int GLFW_KEY_RIGHT_BRACKET = unchecked((int)93); + public const int GLFW_KEY_GRAVE_ACCENT = unchecked((int)96); + public const int GLFW_KEY_WORLD_1 = unchecked((int)161); + public const int GLFW_KEY_WORLD_2 = unchecked((int)162); + public const int GLFW_KEY_ESCAPE = unchecked((int)256); + public const int GLFW_KEY_ENTER = unchecked((int)257); + public const int GLFW_KEY_TAB = unchecked((int)258); + public const int GLFW_KEY_BACKSPACE = unchecked((int)259); + public const int GLFW_KEY_INSERT = unchecked((int)260); + public const int GLFW_KEY_DELETE = unchecked((int)261); + public const int GLFW_KEY_RIGHT = unchecked((int)262); + public const int GLFW_KEY_LEFT = unchecked((int)263); + public const int GLFW_KEY_DOWN = unchecked((int)264); + public const int GLFW_KEY_UP = unchecked((int)265); + public const int GLFW_KEY_PAGE_UP = unchecked((int)266); + public const int GLFW_KEY_PAGE_DOWN = unchecked((int)267); + public const int GLFW_KEY_HOME = unchecked((int)268); + public const int GLFW_KEY_END = unchecked((int)269); + public const int GLFW_KEY_CAPS_LOCK = unchecked((int)280); + public const int GLFW_KEY_SCROLL_LOCK = unchecked((int)281); + public const int GLFW_KEY_NUM_LOCK = unchecked((int)282); + public const int GLFW_KEY_PRINT_SCREEN = unchecked((int)283); + public const int GLFW_KEY_PAUSE = unchecked((int)284); + public const int GLFW_KEY_F1 = unchecked((int)290); + public const int GLFW_KEY_F2 = unchecked((int)291); + public const int GLFW_KEY_F3 = unchecked((int)292); + public const int GLFW_KEY_F4 = unchecked((int)293); + public const int GLFW_KEY_F5 = unchecked((int)294); + public const int GLFW_KEY_F6 = unchecked((int)295); + public const int GLFW_KEY_F7 = unchecked((int)296); + public const int GLFW_KEY_F8 = unchecked((int)297); + public const int GLFW_KEY_F9 = unchecked((int)298); + public const int GLFW_KEY_F10 = unchecked((int)299); + public const int GLFW_KEY_F11 = unchecked((int)300); + public const int GLFW_KEY_F12 = unchecked((int)301); + public const int GLFW_KEY_F13 = unchecked((int)302); + public const int GLFW_KEY_F14 = unchecked((int)303); + public const int GLFW_KEY_F15 = unchecked((int)304); + public const int GLFW_KEY_F16 = unchecked((int)305); + public const int GLFW_KEY_F17 = unchecked((int)306); + public const int GLFW_KEY_F18 = unchecked((int)307); + public const int GLFW_KEY_F19 = unchecked((int)308); + public const int GLFW_KEY_F20 = unchecked((int)309); + public const int GLFW_KEY_F21 = unchecked((int)310); + public const int GLFW_KEY_F22 = unchecked((int)311); + public const int GLFW_KEY_F23 = unchecked((int)312); + public const int GLFW_KEY_F24 = unchecked((int)313); + public const int GLFW_KEY_F25 = unchecked((int)314); + public const int GLFW_KEY_KP_0 = unchecked((int)320); + public const int GLFW_KEY_KP_1 = unchecked((int)321); + public const int GLFW_KEY_KP_2 = unchecked((int)322); + public const int GLFW_KEY_KP_3 = unchecked((int)323); + public const int GLFW_KEY_KP_4 = unchecked((int)324); + public const int GLFW_KEY_KP_5 = unchecked((int)325); + public const int GLFW_KEY_KP_6 = unchecked((int)326); + public const int GLFW_KEY_KP_7 = unchecked((int)327); + public const int GLFW_KEY_KP_8 = unchecked((int)328); + public const int GLFW_KEY_KP_9 = unchecked((int)329); + public const int GLFW_KEY_KP_DECIMAL = unchecked((int)330); + public const int GLFW_KEY_KP_DIVIDE = unchecked((int)331); + public const int GLFW_KEY_KP_MULTIPLY = unchecked((int)332); + public const int GLFW_KEY_KP_SUBTRACT = unchecked((int)333); + public const int GLFW_KEY_KP_ADD = unchecked((int)334); + public const int GLFW_KEY_KP_ENTER = unchecked((int)335); + public const int GLFW_KEY_KP_EQUAL = unchecked((int)336); + public const int GLFW_KEY_LEFT_SHIFT = unchecked((int)340); + public const int GLFW_KEY_LEFT_CONTROL = unchecked((int)341); + public const int GLFW_KEY_LEFT_ALT = unchecked((int)342); + public const int GLFW_KEY_LEFT_SUPER = unchecked((int)343); + public const int GLFW_KEY_RIGHT_SHIFT = unchecked((int)344); + public const int GLFW_KEY_RIGHT_CONTROL = unchecked((int)345); + public const int GLFW_KEY_RIGHT_ALT = unchecked((int)346); + public const int GLFW_KEY_RIGHT_SUPER = unchecked((int)347); + public const int GLFW_KEY_MENU = unchecked((int)348); + public const int GLFW_KEY_LAST = unchecked((int)GLFW_KEY_MENU); + public const int GLFW_MOD_SHIFT = unchecked((int)0x0001); + public const int GLFW_MOD_CONTROL = unchecked((int)0x0002); + public const int GLFW_MOD_ALT = unchecked((int)0x0004); + public const int GLFW_MOD_SUPER = unchecked((int)0x0008); + public const int GLFW_MOD_CAPS_LOCK = unchecked((int)0x0010); + public const int GLFW_MOD_NUM_LOCK = unchecked((int)0x0020); + public const int GLFW_SCROLL_PRECISE = unchecked((int)0x0001); + public const int GLFW_SCROLL_BEGIN = unchecked((int)0x0002); + public const int GLFW_SCROLL_END = unchecked((int)0x0004); + public const int GLFW_SCROLL_MOMENTUM = unchecked((int)0x0008); + public const int GLFW_MOUSE_BUTTON_1 = unchecked((int)0); + public const int GLFW_MOUSE_BUTTON_2 = unchecked((int)1); + public const int GLFW_MOUSE_BUTTON_3 = unchecked((int)2); + public const int GLFW_MOUSE_BUTTON_4 = unchecked((int)3); + public const int GLFW_MOUSE_BUTTON_5 = unchecked((int)4); + public const int GLFW_MOUSE_BUTTON_6 = unchecked((int)5); + public const int GLFW_MOUSE_BUTTON_7 = unchecked((int)6); + public const int GLFW_MOUSE_BUTTON_8 = unchecked((int)7); + public const int GLFW_MOUSE_BUTTON_LAST = unchecked((int)GLFW_MOUSE_BUTTON_8); + public const int GLFW_MOUSE_BUTTON_LEFT = unchecked((int)GLFW_MOUSE_BUTTON_1); + public const int GLFW_MOUSE_BUTTON_RIGHT = unchecked((int)GLFW_MOUSE_BUTTON_2); + public const int GLFW_MOUSE_BUTTON_MIDDLE = unchecked((int)GLFW_MOUSE_BUTTON_3); + public const int GLFW_JOYSTICK_1 = unchecked((int)0); + public const int GLFW_JOYSTICK_2 = unchecked((int)1); + public const int GLFW_JOYSTICK_3 = unchecked((int)2); + public const int GLFW_JOYSTICK_4 = unchecked((int)3); + public const int GLFW_JOYSTICK_5 = unchecked((int)4); + public const int GLFW_JOYSTICK_6 = unchecked((int)5); + public const int GLFW_JOYSTICK_7 = unchecked((int)6); + public const int GLFW_JOYSTICK_8 = unchecked((int)7); + public const int GLFW_JOYSTICK_9 = unchecked((int)8); + public const int GLFW_JOYSTICK_10 = unchecked((int)9); + public const int GLFW_JOYSTICK_11 = unchecked((int)10); + public const int GLFW_JOYSTICK_12 = unchecked((int)11); + public const int GLFW_JOYSTICK_13 = unchecked((int)12); + public const int GLFW_JOYSTICK_14 = unchecked((int)13); + public const int GLFW_JOYSTICK_15 = unchecked((int)14); + public const int GLFW_JOYSTICK_16 = unchecked((int)15); + public const int GLFW_JOYSTICK_LAST = unchecked((int)GLFW_JOYSTICK_16); + public const int GLFW_GAMEPAD_BUTTON_A = unchecked((int)0); + public const int GLFW_GAMEPAD_BUTTON_B = unchecked((int)1); + public const int GLFW_GAMEPAD_BUTTON_X = unchecked((int)2); + public const int GLFW_GAMEPAD_BUTTON_Y = unchecked((int)3); + public const int GLFW_GAMEPAD_BUTTON_LEFT_BUMPER = unchecked((int)4); + public const int GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER = unchecked((int)5); + public const int GLFW_GAMEPAD_BUTTON_BACK = unchecked((int)6); + public const int GLFW_GAMEPAD_BUTTON_START = unchecked((int)7); + public const int GLFW_GAMEPAD_BUTTON_GUIDE = unchecked((int)8); + public const int GLFW_GAMEPAD_BUTTON_LEFT_THUMB = unchecked((int)9); + public const int GLFW_GAMEPAD_BUTTON_RIGHT_THUMB = unchecked((int)10); + public const int GLFW_GAMEPAD_BUTTON_DPAD_UP = unchecked((int)11); + public const int GLFW_GAMEPAD_BUTTON_DPAD_RIGHT = unchecked((int)12); + public const int GLFW_GAMEPAD_BUTTON_DPAD_DOWN = unchecked((int)13); + public const int GLFW_GAMEPAD_BUTTON_DPAD_LEFT = unchecked((int)14); + public const int GLFW_GAMEPAD_BUTTON_LAST = unchecked((int)GLFW_GAMEPAD_BUTTON_DPAD_LEFT); + public const int GLFW_GAMEPAD_BUTTON_CROSS = unchecked((int)GLFW_GAMEPAD_BUTTON_A); + public const int GLFW_GAMEPAD_BUTTON_CIRCLE = unchecked((int)GLFW_GAMEPAD_BUTTON_B); + public const int GLFW_GAMEPAD_BUTTON_SQUARE = unchecked((int)GLFW_GAMEPAD_BUTTON_X); + public const int GLFW_GAMEPAD_BUTTON_TRIANGLE = unchecked((int)GLFW_GAMEPAD_BUTTON_Y); + public const int GLFW_GAMEPAD_AXIS_LEFT_X = unchecked((int)0); + public const int GLFW_GAMEPAD_AXIS_LEFT_Y = unchecked((int)1); + public const int GLFW_GAMEPAD_AXIS_RIGHT_X = unchecked((int)2); + public const int GLFW_GAMEPAD_AXIS_RIGHT_Y = unchecked((int)3); + public const int GLFW_GAMEPAD_AXIS_LEFT_TRIGGER = unchecked((int)4); + public const int GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER = unchecked((int)5); + public const int GLFW_GAMEPAD_AXIS_LAST = unchecked((int)GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER); + public const int GLFW_NO_ERROR = unchecked((int)0); + public const int GLFW_NOT_INITIALIZED = unchecked((int)0x00010001); + public const int GLFW_NO_CURRENT_CONTEXT = unchecked((int)0x00010002); + public const int GLFW_INVALID_ENUM = unchecked((int)0x00010003); + public const int GLFW_INVALID_VALUE = unchecked((int)0x00010004); + public const int GLFW_OUT_OF_MEMORY = unchecked((int)0x00010005); + public const int GLFW_API_UNAVAILABLE = unchecked((int)0x00010006); + public const int GLFW_VERSION_UNAVAILABLE = unchecked((int)0x00010007); + public const int GLFW_PLATFORM_ERROR = unchecked((int)0x00010008); + public const int GLFW_FORMAT_UNAVAILABLE = unchecked((int)0x00010009); + public const int GLFW_NO_WINDOW_CONTEXT = unchecked((int)0x0001000A); + public const int GLFW_CURSOR_UNAVAILABLE = unchecked((int)0x0001000B); + public const int GLFW_FEATURE_UNAVAILABLE = unchecked((int)0x0001000C); + public const int GLFW_FEATURE_UNIMPLEMENTED = unchecked((int)0x0001000D); + public const int GLFW_PLATFORM_UNAVAILABLE = unchecked((int)0x0001000E); + public const int GLFW_FOCUSED = unchecked((int)0x00020001); + public const int GLFW_ICONIFIED = unchecked((int)0x00020002); + public const int GLFW_RESIZABLE = unchecked((int)0x00020003); + public const int GLFW_VISIBLE = unchecked((int)0x00020004); + public const int GLFW_DECORATED = unchecked((int)0x00020005); + public const int GLFW_AUTO_ICONIFY = unchecked((int)0x00020006); + public const int GLFW_FLOATING = unchecked((int)0x00020007); + public const int GLFW_MAXIMIZED = unchecked((int)0x00020008); + public const int GLFW_CENTER_CURSOR = unchecked((int)0x00020009); + public const int GLFW_TRANSPARENT_FRAMEBUFFER = unchecked((int)0x0002000A); + public const int GLFW_HOVERED = unchecked((int)0x0002000B); + public const int GLFW_FOCUS_ON_SHOW = unchecked((int)0x0002000C); + public const int GLFW_MOUSE_PASSTHROUGH = unchecked((int)0x0002000D); + public const int GLFW_POSITION_X = unchecked((int)0x0002000E); + public const int GLFW_POSITION_Y = unchecked((int)0x0002000F); + public const int GLFW_RED_BITS = unchecked((int)0x00021001); + public const int GLFW_GREEN_BITS = unchecked((int)0x00021002); + public const int GLFW_BLUE_BITS = unchecked((int)0x00021003); + public const int GLFW_ALPHA_BITS = unchecked((int)0x00021004); + public const int GLFW_DEPTH_BITS = unchecked((int)0x00021005); + public const int GLFW_STENCIL_BITS = unchecked((int)0x00021006); + public const int GLFW_ACCUM_RED_BITS = unchecked((int)0x00021007); + public const int GLFW_ACCUM_GREEN_BITS = unchecked((int)0x00021008); + public const int GLFW_ACCUM_BLUE_BITS = unchecked((int)0x00021009); + public const int GLFW_ACCUM_ALPHA_BITS = unchecked((int)0x0002100A); + public const int GLFW_AUX_BUFFERS = unchecked((int)0x0002100B); + public const int GLFW_STEREO = unchecked((int)0x0002100C); + public const int GLFW_SAMPLES = unchecked((int)0x0002100D); + public const int GLFW_SRGB_CAPABLE = unchecked((int)0x0002100E); + public const int GLFW_REFRESH_RATE = unchecked((int)0x0002100F); + public const int GLFW_DOUBLEBUFFER = unchecked((int)0x00021010); + public const int GLFW_CLIENT_API = unchecked((int)0x00022001); + public const int GLFW_CONTEXT_VERSION_MAJOR = unchecked((int)0x00022002); + public const int GLFW_CONTEXT_VERSION_MINOR = unchecked((int)0x00022003); + public const int GLFW_CONTEXT_REVISION = unchecked((int)0x00022004); + public const int GLFW_CONTEXT_ROBUSTNESS = unchecked((int)0x00022005); + public const int GLFW_OPENGL_FORWARD_COMPAT = unchecked((int)0x00022006); + public const int GLFW_CONTEXT_DEBUG = unchecked((int)0x00022007); + public const int GLFW_OPENGL_DEBUG_CONTEXT = unchecked((int)GLFW_CONTEXT_DEBUG); + public const int GLFW_OPENGL_PROFILE = unchecked((int)0x00022008); + public const int GLFW_CONTEXT_RELEASE_BEHAVIOR = unchecked((int)0x00022009); + public const int GLFW_CONTEXT_NO_ERROR = unchecked((int)0x0002200A); + public const int GLFW_CONTEXT_CREATION_API = unchecked((int)0x0002200B); + public const int GLFW_SCALE_TO_MONITOR = unchecked((int)0x0002200C); + public const int GLFW_SCALE_FRAMEBUFFER = unchecked((int)0x0002200D); + public const int GLFW_COCOA_RETINA_FRAMEBUFFER = unchecked((int)0x00023001); + public const int GLFW_COCOA_FRAME_NAME = unchecked((int)0x00023002); + public const int GLFW_COCOA_GRAPHICS_SWITCHING = unchecked((int)0x00023003); + public const int GLFW_X11_CLASS_NAME = unchecked((int)0x00024001); + public const int GLFW_X11_INSTANCE_NAME = unchecked((int)0x00024002); + public const int GLFW_WIN32_KEYBOARD_MENU = unchecked((int)0x00025001); + public const int GLFW_WIN32_SHOWDEFAULT = unchecked((int)0x00025002); + public const int GLFW_WAYLAND_APP_ID = unchecked((int)0x00026001); + public const int GLFW_NO_API = unchecked((int)0); + public const int GLFW_OPENGL_API = unchecked((int)0x00030001); + public const int GLFW_OPENGL_ES_API = unchecked((int)0x00030002); + public const int GLFW_NO_ROBUSTNESS = unchecked((int)0); + public const int GLFW_NO_RESET_NOTIFICATION = unchecked((int)0x00031001); + public const int GLFW_LOSE_CONTEXT_ON_RESET = unchecked((int)0x00031002); + public const int GLFW_OPENGL_ANY_PROFILE = unchecked((int)0); + public const int GLFW_OPENGL_CORE_PROFILE = unchecked((int)0x00032001); + public const int GLFW_OPENGL_COMPAT_PROFILE = unchecked((int)0x00032002); + public const int GLFW_CURSOR = unchecked((int)0x00033001); + public const int GLFW_STICKY_KEYS = unchecked((int)0x00033002); + public const int GLFW_STICKY_MOUSE_BUTTONS = unchecked((int)0x00033003); + public const int GLFW_LOCK_KEY_MODS = unchecked((int)0x00033004); + public const int GLFW_RAW_MOUSE_MOTION = unchecked((int)0x00033005); + public const int GLFW_UNLIMITED_MOUSE_BUTTONS = unchecked((int)0x00033006); + public const int GLFW_CURSOR_NORMAL = unchecked((int)0x00034001); + public const int GLFW_CURSOR_HIDDEN = unchecked((int)0x00034002); + public const int GLFW_CURSOR_DISABLED = unchecked((int)0x00034003); + public const int GLFW_CURSOR_CAPTURED = unchecked((int)0x00034004); + public const int GLFW_ANY_RELEASE_BEHAVIOR = unchecked((int)0); + public const int GLFW_RELEASE_BEHAVIOR_FLUSH = unchecked((int)0x00035001); + public const int GLFW_RELEASE_BEHAVIOR_NONE = unchecked((int)0x00035002); + public const int GLFW_NATIVE_CONTEXT_API = unchecked((int)0x00036001); + public const int GLFW_EGL_CONTEXT_API = unchecked((int)0x00036002); + public const int GLFW_OSMESA_CONTEXT_API = unchecked((int)0x00036003); + public const int GLFW_ANGLE_PLATFORM_TYPE_NONE = unchecked((int)0x00037001); + public const int GLFW_ANGLE_PLATFORM_TYPE_OPENGL = unchecked((int)0x00037002); + public const int GLFW_ANGLE_PLATFORM_TYPE_OPENGLES = unchecked((int)0x00037003); + public const int GLFW_ANGLE_PLATFORM_TYPE_D3D9 = unchecked((int)0x00037004); + public const int GLFW_ANGLE_PLATFORM_TYPE_D3D11 = unchecked((int)0x00037005); + public const int GLFW_ANGLE_PLATFORM_TYPE_VULKAN = unchecked((int)0x00037007); + public const int GLFW_ANGLE_PLATFORM_TYPE_METAL = unchecked((int)0x00037008); + public const int GLFW_WAYLAND_PREFER_LIBDECOR = unchecked((int)0x00038001); + public const int GLFW_WAYLAND_DISABLE_LIBDECOR = unchecked((int)0x00038002); + public const int GLFW_ANY_POSITION = unchecked((int)0x80000000); + public const int GLFW_ARROW_CURSOR = unchecked((int)0x00036001); + public const int GLFW_IBEAM_CURSOR = unchecked((int)0x00036002); + public const int GLFW_CROSSHAIR_CURSOR = unchecked((int)0x00036003); + public const int GLFW_POINTING_HAND_CURSOR = unchecked((int)0x00036004); + public const int GLFW_RESIZE_EW_CURSOR = unchecked((int)0x00036005); + public const int GLFW_RESIZE_NS_CURSOR = unchecked((int)0x00036006); + public const int GLFW_RESIZE_NWSE_CURSOR = unchecked((int)0x00036007); + public const int GLFW_RESIZE_NESW_CURSOR = unchecked((int)0x00036008); + public const int GLFW_RESIZE_ALL_CURSOR = unchecked((int)0x00036009); + public const int GLFW_NOT_ALLOWED_CURSOR = unchecked((int)0x0003600A); + public const int GLFW_HRESIZE_CURSOR = unchecked((int)GLFW_RESIZE_EW_CURSOR); + public const int GLFW_VRESIZE_CURSOR = unchecked((int)GLFW_RESIZE_NS_CURSOR); + public const int GLFW_HAND_CURSOR = unchecked((int)GLFW_POINTING_HAND_CURSOR); + public const int GLFW_CONNECTED = unchecked((int)0x00040001); + public const int GLFW_DISCONNECTED = unchecked((int)0x00040002); + public const int GLFW_JOYSTICK_HAT_BUTTONS = unchecked((int)0x00050001); + public const int GLFW_ANGLE_PLATFORM_TYPE = unchecked((int)0x00050002); + public const int GLFW_PLATFORM = unchecked((int)0x00050003); + public const int GLFW_COCOA_CHDIR_RESOURCES = unchecked((int)0x00051001); + public const int GLFW_COCOA_MENUBAR = unchecked((int)0x00051002); + public const int GLFW_X11_XCB_VULKAN_SURFACE = unchecked((int)0x00052001); + public const int GLFW_WAYLAND_LIBDECOR = unchecked((int)0x00053001); + public const int GLFW_ANY_PLATFORM = unchecked((int)0x00060000); + public const int GLFW_PLATFORM_WIN32 = unchecked((int)0x00060001); + public const int GLFW_PLATFORM_COCOA = unchecked((int)0x00060002); + public const int GLFW_PLATFORM_WAYLAND = unchecked((int)0x00060003); + public const int GLFW_PLATFORM_X11 = unchecked((int)0x00060004); + public const int GLFW_PLATFORM_NULL = unchecked((int)0x00060005); + public const int GLFW_DONT_CARE = unchecked((int)-1); + } + } +} diff --git a/Brutal.Glfw/Generated/Glfw.Delegates.gen.cs b/Brutal.Glfw/Generated/Glfw.Delegates.gen.cs new file mode 100644 index 0000000..7ca43a0 --- /dev/null +++ b/Brutal.Glfw/Generated/Glfw.Delegates.gen.cs @@ -0,0 +1,104 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* GlfwAllocateUnmanagedCallback(ulong size, void* user); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* GlfwReallocateUnmanagedCallback(void* block, ulong size, void* user); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwDeallocateUnmanagedCallback(void* block, void* user); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwErrorUnmanagedCallback(int errorCode, byte* description); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowPosUnmanagedCallback(GlfwWindowHandle* window, int xPos, int yPos); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowSizeUnmanagedCallback(GlfwWindowHandle* window, int width, int height); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowCloseUnmanagedCallback(GlfwWindowHandle* window); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowRefreshUnmanagedCallback(GlfwWindowHandle* window); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowFocusUnmanagedCallback(GlfwWindowHandle* window, int focused); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowIconifyUnmanagedCallback(GlfwWindowHandle* window, int iconified); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowMaximizeUnmanagedCallback(GlfwWindowHandle* window, int maximized); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwFramebufferSizeUnmanagedCallback(GlfwWindowHandle* window, int width, int height); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwWindowContentScaleUnmanagedCallback( + GlfwWindowHandle* window, + float xScale, + float yScale + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwMouseButtonUnmanagedCallback( + GlfwWindowHandle* window, + int button, + int action, + int mods + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwCursorPosUnmanagedCallback(GlfwWindowHandle* window, double xPos, double yPos); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwCursorEnterUnmanagedCallback(GlfwWindowHandle* window, int entered); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwScrollUnmanagedCallback(GlfwWindowHandle* window, double xOffset, double yOffset); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwScrollDetailUnmanagedCallback( + GlfwWindowHandle* window, + double xOffset, + double yOffset, + int flags + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwTrackpadZoomUnmanagedCallback(GlfwWindowHandle* window, double scale); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwTrackpadRotateUnmanagedCallback(GlfwWindowHandle* window, double angle); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwKeyUnmanagedCallback( + GlfwWindowHandle* window, + int key, + int scancode, + int action, + int mods + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwCharUnmanagedCallback(GlfwWindowHandle* window, uint codePoint); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwCharModsUnmanagedCallback(GlfwWindowHandle* window, uint codePoint, int mods); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwDropUnmanagedCallback(GlfwWindowHandle* window, int pathCount, byte** paths); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void GlfwMonitorUnmanagedCallback(GlfwMonitorHandle* monitor, int @event); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void GlfwJoystickUnmanagedCallback(int joystickId, int @event); +} diff --git a/Brutal.Glfw/Generated/Glfw.PInvoke.gen.cs b/Brutal.Glfw/Generated/Glfw.PInvoke.gen.cs new file mode 100644 index 0000000..92611f0 --- /dev/null +++ b/Brutal.Glfw/Generated/Glfw.PInvoke.gen.cs @@ -0,0 +1,1795 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "glfwInit")] + private static partial int _Init(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Init() + { + Log.Trace(); + return _Init(); + } + + [LibraryImport(Dll, EntryPoint = "glfwTerminate")] + private static partial void _Terminate(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Terminate() + { + Log.Trace(); + _Terminate(); + } + + [LibraryImport(Dll, EntryPoint = "glfwInitHint")] + private static partial void _InitHint(int hint, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void InitHint(int hint, int value) + { + Log.Trace(); + _InitHint(hint, value); + } + + [LibraryImport(Dll, EntryPoint = "glfwInitAllocator")] + private static partial void _InitAllocator(GlfwAllocator* allocator); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void InitAllocator(GlfwAllocator* allocator) + { + Log.Trace(); + _InitAllocator(allocator); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetVersion")] + private static partial void _GetVersion(out int major, out int minor, out int revision); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetVersion(out int major, out int minor, out int revision) + { + Log.Trace(); + _GetVersion(out major, out minor, out revision); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetVersionString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetVersionString(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetVersionString() + { + Log.Trace(); + return _GetVersionString(); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetError", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _GetError(out string? description); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetError(out string? description) + { + Log.Trace(); + return _GetError(out description); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetErrorCallback")] + private static partial GlfwErrorUnmanagedCallback _SetErrorCallback(GlfwErrorUnmanagedCallback callback); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwErrorUnmanagedCallback SetErrorCallback(GlfwErrorUnmanagedCallback callback) + { + Log.Trace(); + return _SetErrorCallback(callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetPlatform")] + private static partial int _GetPlatform(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetPlatform() + { + Log.Trace(); + return _GetPlatform(); + } + + [LibraryImport(Dll, EntryPoint = "glfwPlatformSupported")] + private static partial int _PlatformSupported(int platform); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int PlatformSupported(int platform) + { + Log.Trace(); + return _PlatformSupported(platform); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMonitors")] + private static partial GlfwMonitor* _GetMonitors(out int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwMonitor* GetMonitors(out int count) + { + Log.Trace(); + return _GetMonitors(out count); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetPrimaryMonitor")] + private static partial GlfwMonitor _GetPrimaryMonitor(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwMonitor GetPrimaryMonitor() + { + Log.Trace(); + return _GetPrimaryMonitor(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMonitorPos")] + private static partial void _GetMonitorPos(GlfwMonitor monitor, out int xPos, out int yPos); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetMonitorPos(GlfwMonitor monitor, out int xPos, out int yPos) + { + Log.Trace(); + _GetMonitorPos(monitor, out xPos, out yPos); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMonitorWorkarea")] + private static partial void _GetMonitorWorkArea( + GlfwMonitor monitor, + out int xPos, + out int yPos, + out int width, + out int height + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetMonitorWorkArea( + GlfwMonitor monitor, + out int xPos, + out int yPos, + out int width, + out int height + ) + { + Log.Trace(); + _GetMonitorWorkArea(monitor, out xPos, out yPos, out width, out height); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMonitorPhysicalSize")] + private static partial void _GetMonitorPhysicalSize( + GlfwMonitor monitor, + out int widthMillimeters, + out int heightMillimeters + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetMonitorPhysicalSize( + GlfwMonitor monitor, + out int widthMillimeters, + out int heightMillimeters + ) + { + Log.Trace(); + _GetMonitorPhysicalSize(monitor, out widthMillimeters, out heightMillimeters); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMonitorContentScale")] + private static partial void _GetMonitorContentScale( + GlfwMonitor monitor, + out float xScale, + out float yScale + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetMonitorContentScale(GlfwMonitor monitor, out float xScale, out float yScale) + { + Log.Trace(); + _GetMonitorContentScale(monitor, out xScale, out yScale); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetMonitorName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetMonitorName(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetMonitorName(GlfwMonitor monitor) + { + Log.Trace(); + return _GetMonitorName(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetMonitorUserPointer")] + private static partial void _SetMonitorUserPointer(GlfwMonitor monitor, void* pointer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetMonitorUserPointer(GlfwMonitor monitor, void* pointer) + { + Log.Trace(); + _SetMonitorUserPointer(monitor, pointer); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMonitorUserPointer")] + private static partial void* _GetMonitorUserPointer(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetMonitorUserPointer(GlfwMonitor monitor) + { + Log.Trace(); + return _GetMonitorUserPointer(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetMonitorCallback")] + private static partial GlfwMonitorUnmanagedCallback _SetMonitorCallback( + GlfwMonitorUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwMonitorUnmanagedCallback SetMonitorCallback(GlfwMonitorUnmanagedCallback callback) + { + Log.Trace(); + return _SetMonitorCallback(callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetVideoModes")] + private static partial GlfwVidMode* _GetVideoModes(GlfwMonitor monitor, out int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwVidMode* GetVideoModes(GlfwMonitor monitor, out int count) + { + Log.Trace(); + return _GetVideoModes(monitor, out count); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetVideoMode")] + private static partial GlfwVidMode* _GetVideoMode(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwVidMode* GetVideoMode(GlfwMonitor monitor) + { + Log.Trace(); + return _GetVideoMode(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetGamma")] + private static partial void _SetGamma(GlfwMonitor monitor, float gamma); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGamma(GlfwMonitor monitor, float gamma) + { + Log.Trace(); + _SetGamma(monitor, gamma); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetGammaRamp")] + private static partial GlfwGammaRamp* _GetGammaRamp(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwGammaRamp* GetGammaRamp(GlfwMonitor monitor) + { + Log.Trace(); + return _GetGammaRamp(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetGammaRamp")] + private static partial void _SetGammaRamp(GlfwMonitor monitor, GlfwGammaRamp* ramp); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGammaRamp(GlfwMonitor monitor, GlfwGammaRamp* ramp) + { + Log.Trace(); + _SetGammaRamp(monitor, ramp); + } + + [LibraryImport(Dll, EntryPoint = "glfwDefaultWindowHints")] + private static partial void _DefaultWindowHints(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DefaultWindowHints() + { + Log.Trace(); + _DefaultWindowHints(); + } + + [LibraryImport(Dll, EntryPoint = "glfwWindowHint")] + private static partial void _WindowHint(int hint, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WindowHint(int hint, int value) + { + Log.Trace(); + _WindowHint(hint, value); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwWindowHintString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _WindowHintString(int hint, string value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WindowHintString(int hint, string value) + { + Log.Trace(); + _WindowHintString(hint, value); + } + + [LibraryImport(Dll, EntryPoint = "glfwDestroyWindow")] + private static partial void _DestroyWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyWindow(GlfwWindow window) + { + Log.Trace(); + _DestroyWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwWindowShouldClose")] + private static partial int _WindowShouldClose(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int WindowShouldClose(GlfwWindow window) + { + Log.Trace(); + return _WindowShouldClose(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowShouldClose")] + private static partial void _SetWindowShouldClose(GlfwWindow window, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowShouldClose(GlfwWindow window, int value) + { + Log.Trace(); + _SetWindowShouldClose(window, value); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetWindowTitle", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetWindowTitle(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetWindowTitle(GlfwWindow window) + { + Log.Trace(); + return _GetWindowTitle(window); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwSetWindowTitle", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _SetWindowTitle(GlfwWindow window, string title); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowTitle(GlfwWindow window, string title) + { + Log.Trace(); + _SetWindowTitle(window, title); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowIcon")] + private static partial void _SetWindowIcon(GlfwWindow window, int count, GlfwImage* images); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowIcon(GlfwWindow window, int count, GlfwImage* images) + { + Log.Trace(); + _SetWindowIcon(window, count, images); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowPos")] + private static partial void _GetWindowPos(GlfwWindow window, out int xPos, out int yPos); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetWindowPos(GlfwWindow window, out int xPos, out int yPos) + { + Log.Trace(); + _GetWindowPos(window, out xPos, out yPos); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowPos")] + private static partial void _SetWindowPos(GlfwWindow window, int xPos, int yPos); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowPos(GlfwWindow window, int xPos, int yPos) + { + Log.Trace(); + _SetWindowPos(window, xPos, yPos); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowSize")] + private static partial void _GetWindowSize(GlfwWindow window, out int width, out int height); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetWindowSize(GlfwWindow window, out int width, out int height) + { + Log.Trace(); + _GetWindowSize(window, out width, out height); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowSizeLimits")] + private static partial void _SetWindowSizeLimits( + GlfwWindow window, + int minWidth, + int minHeight, + int maxWidth, + int maxHeight + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowSizeLimits( + GlfwWindow window, + int minWidth, + int minHeight, + int maxWidth, + int maxHeight + ) + { + Log.Trace(); + _SetWindowSizeLimits(window, minWidth, minHeight, maxWidth, maxHeight); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowAspectRatio")] + private static partial void _SetWindowAspectRatio(GlfwWindow window, int numerator, int denominator); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowAspectRatio(GlfwWindow window, int numerator, int denominator) + { + Log.Trace(); + _SetWindowAspectRatio(window, numerator, denominator); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowSize")] + private static partial void _SetWindowSize(GlfwWindow window, int width, int height); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowSize(GlfwWindow window, int width, int height) + { + Log.Trace(); + _SetWindowSize(window, width, height); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetFramebufferSize")] + private static partial void _GetFramebufferSize(GlfwWindow window, out int width, out int height); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetFramebufferSize(GlfwWindow window, out int width, out int height) + { + Log.Trace(); + _GetFramebufferSize(window, out width, out height); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowFrameSize")] + private static partial void _GetWindowFrameSize( + GlfwWindow window, + out int left, + out int top, + out int right, + out int bottom + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetWindowFrameSize( + GlfwWindow window, + out int left, + out int top, + out int right, + out int bottom + ) + { + Log.Trace(); + _GetWindowFrameSize(window, out left, out top, out right, out bottom); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowContentScale")] + private static partial void _GetWindowContentScale(GlfwWindow window, out float xScale, out float yScale); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetWindowContentScale(GlfwWindow window, out float xScale, out float yScale) + { + Log.Trace(); + _GetWindowContentScale(window, out xScale, out yScale); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowOpacity")] + private static partial float _GetWindowOpacity(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetWindowOpacity(GlfwWindow window) + { + Log.Trace(); + return _GetWindowOpacity(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowOpacity")] + private static partial void _SetWindowOpacity(GlfwWindow window, float opacity); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowOpacity(GlfwWindow window, float opacity) + { + Log.Trace(); + _SetWindowOpacity(window, opacity); + } + + [LibraryImport(Dll, EntryPoint = "glfwIconifyWindow")] + private static partial void _IconifyWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void IconifyWindow(GlfwWindow window) + { + Log.Trace(); + _IconifyWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwRestoreWindow")] + private static partial void _RestoreWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RestoreWindow(GlfwWindow window) + { + Log.Trace(); + _RestoreWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwMaximizeWindow")] + private static partial void _MaximizeWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void MaximizeWindow(GlfwWindow window) + { + Log.Trace(); + _MaximizeWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwShowWindow")] + private static partial void _ShowWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ShowWindow(GlfwWindow window) + { + Log.Trace(); + _ShowWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwHideWindow")] + private static partial void _HideWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void HideWindow(GlfwWindow window) + { + Log.Trace(); + _HideWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwFocusWindow")] + private static partial void _FocusWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void FocusWindow(GlfwWindow window) + { + Log.Trace(); + _FocusWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwRequestWindowAttention")] + private static partial void _RequestWindowAttention(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RequestWindowAttention(GlfwWindow window) + { + Log.Trace(); + _RequestWindowAttention(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowMonitor")] + private static partial GlfwMonitor _GetWindowMonitor(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwMonitor GetWindowMonitor(GlfwWindow window) + { + Log.Trace(); + return _GetWindowMonitor(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowMonitor")] + private static partial void _SetWindowMonitor( + GlfwWindow window, + GlfwMonitor monitor, + int xPos, + int yPos, + int width, + int height, + int refreshRate + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowMonitor( + GlfwWindow window, + GlfwMonitor monitor, + int xPos, + int yPos, + int width, + int height, + int refreshRate + ) + { + Log.Trace(); + _SetWindowMonitor(window, monitor, xPos, yPos, width, height, refreshRate); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowAttrib")] + private static partial int _GetWindowAttrib(GlfwWindow window, int attrib); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetWindowAttrib(GlfwWindow window, int attrib) + { + Log.Trace(); + return _GetWindowAttrib(window, attrib); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowAttrib")] + private static partial void _SetWindowAttrib(GlfwWindow window, int attrib, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowAttrib(GlfwWindow window, int attrib, int value) + { + Log.Trace(); + _SetWindowAttrib(window, attrib, value); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowUserPointer")] + private static partial void _SetWindowUserPointer(GlfwWindow window, void* pointer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetWindowUserPointer(GlfwWindow window, void* pointer) + { + Log.Trace(); + _SetWindowUserPointer(window, pointer); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWindowUserPointer")] + private static partial void* _GetWindowUserPointer(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetWindowUserPointer(GlfwWindow window) + { + Log.Trace(); + return _GetWindowUserPointer(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowPosCallback")] + private static partial GlfwWindowPosUnmanagedCallback _SetWindowPosCallback( + GlfwWindow window, + GlfwWindowPosUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowPosUnmanagedCallback SetWindowPosCallback( + GlfwWindow window, + GlfwWindowPosUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowPosCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowSizeCallback")] + private static partial GlfwWindowSizeUnmanagedCallback _SetWindowSizeCallback( + GlfwWindow window, + GlfwWindowSizeUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowSizeUnmanagedCallback SetWindowSizeCallback( + GlfwWindow window, + GlfwWindowSizeUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowSizeCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowCloseCallback")] + private static partial GlfwWindowCloseUnmanagedCallback _SetWindowCloseCallback( + GlfwWindow window, + GlfwWindowCloseUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowCloseUnmanagedCallback SetWindowCloseCallback( + GlfwWindow window, + GlfwWindowCloseUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowCloseCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowRefreshCallback")] + private static partial GlfwWindowRefreshUnmanagedCallback _SetWindowRefreshCallback( + GlfwWindow window, + GlfwWindowRefreshUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowRefreshUnmanagedCallback SetWindowRefreshCallback( + GlfwWindow window, + GlfwWindowRefreshUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowRefreshCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowFocusCallback")] + private static partial GlfwWindowFocusUnmanagedCallback _SetWindowFocusCallback( + GlfwWindow window, + GlfwWindowFocusUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowFocusUnmanagedCallback SetWindowFocusCallback( + GlfwWindow window, + GlfwWindowFocusUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowFocusCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowIconifyCallback")] + private static partial GlfwWindowIconifyUnmanagedCallback _SetWindowIconifyCallback( + GlfwWindow window, + GlfwWindowIconifyUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowIconifyUnmanagedCallback SetWindowIconifyCallback( + GlfwWindow window, + GlfwWindowIconifyUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowIconifyCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowMaximizeCallback")] + private static partial GlfwWindowMaximizeUnmanagedCallback _SetWindowMaximizeCallback( + GlfwWindow window, + GlfwWindowMaximizeUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowMaximizeUnmanagedCallback SetWindowMaximizeCallback( + GlfwWindow window, + GlfwWindowMaximizeUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowMaximizeCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetFramebufferSizeCallback")] + private static partial GlfwFramebufferSizeUnmanagedCallback _SetFramebufferSizeCallback( + GlfwWindow window, + GlfwFramebufferSizeUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwFramebufferSizeUnmanagedCallback SetFramebufferSizeCallback( + GlfwWindow window, + GlfwFramebufferSizeUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetFramebufferSizeCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetWindowContentScaleCallback")] + private static partial GlfwWindowContentScaleUnmanagedCallback _SetWindowContentScaleCallback( + GlfwWindow window, + GlfwWindowContentScaleUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowContentScaleUnmanagedCallback SetWindowContentScaleCallback( + GlfwWindow window, + GlfwWindowContentScaleUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetWindowContentScaleCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwPollEvents")] + private static partial void _PollEvents(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PollEvents() + { + Log.Trace(); + _PollEvents(); + } + + [LibraryImport(Dll, EntryPoint = "glfwWaitEvents")] + private static partial void _WaitEvents(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WaitEvents() + { + Log.Trace(); + _WaitEvents(); + } + + [LibraryImport(Dll, EntryPoint = "glfwWaitEventsTimeout")] + private static partial void _WaitEventsTimeout(double timeout); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WaitEventsTimeout(double timeout) + { + Log.Trace(); + _WaitEventsTimeout(timeout); + } + + [LibraryImport(Dll, EntryPoint = "glfwPostEmptyEvent")] + private static partial void _PostEmptyEvent(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PostEmptyEvent() + { + Log.Trace(); + _PostEmptyEvent(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetInputMode")] + private static partial int _GetInputMode(GlfwWindow window, int mode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetInputMode(GlfwWindow window, int mode) + { + Log.Trace(); + return _GetInputMode(window, mode); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetInputMode")] + private static partial void _SetInputMode(GlfwWindow window, int mode, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetInputMode(GlfwWindow window, int mode, int value) + { + Log.Trace(); + _SetInputMode(window, mode, value); + } + + [LibraryImport(Dll, EntryPoint = "glfwRawMouseMotionSupported")] + private static partial int _RawMouseMotionSupported(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int RawMouseMotionSupported() + { + Log.Trace(); + return _RawMouseMotionSupported(); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetKeyName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetKeyName(int key, int scancode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetKeyName(int key, int scancode) + { + Log.Trace(); + return _GetKeyName(key, scancode); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetKeyScancode")] + private static partial int _GetKeyScanCode(int key); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetKeyScanCode(int key) + { + Log.Trace(); + return _GetKeyScanCode(key); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetKey")] + private static partial int _GetKey(GlfwWindow window, int key); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetKey(GlfwWindow window, int key) + { + Log.Trace(); + return _GetKey(window, key); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetMouseButton")] + private static partial int _GetMouseButton(GlfwWindow window, int button); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetMouseButton(GlfwWindow window, int button) + { + Log.Trace(); + return _GetMouseButton(window, button); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetCursorPos")] + private static partial void _GetCursorPos(GlfwWindow window, out double xPos, out double yPos); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetCursorPos(GlfwWindow window, out double xPos, out double yPos) + { + Log.Trace(); + _GetCursorPos(window, out xPos, out yPos); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetCursorPos")] + private static partial void _SetCursorPos(GlfwWindow window, double xPos, double yPos); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCursorPos(GlfwWindow window, double xPos, double yPos) + { + Log.Trace(); + _SetCursorPos(window, xPos, yPos); + } + + [LibraryImport(Dll, EntryPoint = "glfwCreateCursor")] + private static partial GlfwCursor _CreateCursor(GlfwImage* image, int xHot, int yHot); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwCursor CreateCursor(GlfwImage* image, int xHot, int yHot) + { + Log.Trace(); + return _CreateCursor(image, xHot, yHot); + } + + [LibraryImport(Dll, EntryPoint = "glfwCreateStandardCursor")] + private static partial GlfwCursor _CreateStandardCursor(int shape); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwCursor CreateStandardCursor(int shape) + { + Log.Trace(); + return _CreateStandardCursor(shape); + } + + [LibraryImport(Dll, EntryPoint = "glfwDestroyCursor")] + private static partial void _DestroyCursor(GlfwCursor cursor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyCursor(GlfwCursor cursor) + { + Log.Trace(); + _DestroyCursor(cursor); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetCursor")] + private static partial void _SetCursor(GlfwWindow window, GlfwCursor cursor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCursor(GlfwWindow window, GlfwCursor cursor) + { + Log.Trace(); + _SetCursor(window, cursor); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetKeyCallback")] + private static partial GlfwKeyUnmanagedCallback _SetKeyCallback( + GlfwWindow window, + GlfwKeyUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwKeyUnmanagedCallback SetKeyCallback(GlfwWindow window, GlfwKeyUnmanagedCallback callback) + { + Log.Trace(); + return _SetKeyCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetCharCallback")] + private static partial GlfwCharUnmanagedCallback _SetCharCallback( + GlfwWindow window, + GlfwCharUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwCharUnmanagedCallback SetCharCallback( + GlfwWindow window, + GlfwCharUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetCharCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetCharModsCallback")] + private static partial GlfwCharModsUnmanagedCallback _SetCharModsCallback( + GlfwWindow window, + GlfwCharModsUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwCharModsUnmanagedCallback SetCharModsCallback( + GlfwWindow window, + GlfwCharModsUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetCharModsCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetMouseButtonCallback")] + private static partial GlfwMouseButtonUnmanagedCallback _SetMouseButtonCallback( + GlfwWindow window, + GlfwMouseButtonUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwMouseButtonUnmanagedCallback SetMouseButtonCallback( + GlfwWindow window, + GlfwMouseButtonUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetMouseButtonCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetCursorPosCallback")] + private static partial GlfwCursorPosUnmanagedCallback _SetCursorPosCallback( + GlfwWindow window, + GlfwCursorPosUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwCursorPosUnmanagedCallback SetCursorPosCallback( + GlfwWindow window, + GlfwCursorPosUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetCursorPosCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetCursorEnterCallback")] + private static partial GlfwCursorEnterUnmanagedCallback _SetCursorEnterCallback( + GlfwWindow window, + GlfwCursorEnterUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwCursorEnterUnmanagedCallback SetCursorEnterCallback( + GlfwWindow window, + GlfwCursorEnterUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetCursorEnterCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetScrollCallback")] + private static partial GlfwScrollUnmanagedCallback _SetScrollCallback( + GlfwWindow window, + GlfwScrollUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwScrollUnmanagedCallback SetScrollCallback( + GlfwWindow window, + GlfwScrollUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetScrollCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetScrollDetailCallback")] + private static partial GlfwScrollDetailUnmanagedCallback _SetScrollDetailCallback( + GlfwWindow window, + GlfwScrollDetailUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwScrollDetailUnmanagedCallback SetScrollDetailCallback( + GlfwWindow window, + GlfwScrollDetailUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetScrollDetailCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetTrackpadZoomCallback")] + private static partial GlfwTrackpadZoomUnmanagedCallback _SetTrackpadZoomCallback( + GlfwWindow window, + GlfwTrackpadZoomUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwTrackpadZoomUnmanagedCallback SetTrackpadZoomCallback( + GlfwWindow window, + GlfwTrackpadZoomUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetTrackpadZoomCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetTrackpadRotateCallback")] + private static partial GlfwTrackpadRotateUnmanagedCallback _SetTrackpadRotateCallback( + GlfwWindow window, + GlfwTrackpadRotateUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwTrackpadRotateUnmanagedCallback SetTrackpadRotateCallback( + GlfwWindow window, + GlfwTrackpadRotateUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetTrackpadRotateCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetDropCallback")] + private static partial GlfwDropUnmanagedCallback _SetDropCallback( + GlfwWindow window, + GlfwDropUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwDropUnmanagedCallback SetDropCallback( + GlfwWindow window, + GlfwDropUnmanagedCallback callback + ) + { + Log.Trace(); + return _SetDropCallback(window, callback); + } + + [LibraryImport(Dll, EntryPoint = "glfwJoystickPresent")] + private static partial int _JoystickPresent(int joystickId); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int JoystickPresent(int joystickId) + { + Log.Trace(); + return _JoystickPresent(joystickId); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetJoystickAxes")] + private static partial float* _GetJoystickAxes(int joystickId, out int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float* GetJoystickAxes(int joystickId, out int count) + { + Log.Trace(); + return _GetJoystickAxes(joystickId, out count); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetJoystickButtons")] + private static partial byte* _GetJoystickButtons(int joystickId, out int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetJoystickButtons(int joystickId, out int count) + { + Log.Trace(); + return _GetJoystickButtons(joystickId, out count); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetJoystickHats")] + private static partial byte* _GetJoystickHats(int joystickId, out int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetJoystickHats(int joystickId, out int count) + { + Log.Trace(); + return _GetJoystickHats(joystickId, out count); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetJoystickName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickName(int joystickId); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickName(int joystickId) + { + Log.Trace(); + return _GetJoystickName(joystickId); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetJoystickGUID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickGuid(int joystickId); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickGuid(int joystickId) + { + Log.Trace(); + return _GetJoystickGuid(joystickId); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetJoystickUserPointer")] + private static partial void _SetJoystickUserPointer(int joystickId, void* pointer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetJoystickUserPointer(int joystickId, void* pointer) + { + Log.Trace(); + _SetJoystickUserPointer(joystickId, pointer); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetJoystickUserPointer")] + private static partial void* _GetJoystickUserPointer(int joystickId); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetJoystickUserPointer(int joystickId) + { + Log.Trace(); + return _GetJoystickUserPointer(joystickId); + } + + [LibraryImport(Dll, EntryPoint = "glfwJoystickIsGamepad")] + private static partial int _JoystickIsGamepad(int joystickId); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int JoystickIsGamepad(int joystickId) + { + Log.Trace(); + return _JoystickIsGamepad(joystickId); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetJoystickCallback")] + private static partial GlfwJoystickUnmanagedCallback _SetJoystickCallback( + GlfwJoystickUnmanagedCallback callback + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwJoystickUnmanagedCallback SetJoystickCallback(GlfwJoystickUnmanagedCallback callback) + { + Log.Trace(); + return _SetJoystickCallback(callback); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwUpdateGamepadMappings", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _UpdateGamepadMappings(string @string); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int UpdateGamepadMappings(string @string) + { + Log.Trace(); + return _UpdateGamepadMappings(@string); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetGamepadName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadName(int joystickId); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadName(int joystickId) + { + Log.Trace(); + return _GetGamepadName(joystickId); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetGamepadState")] + private static partial int _GetGamepadState(int joystickId, out GlfwGamepadState state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetGamepadState(int joystickId, out GlfwGamepadState state) + { + Log.Trace(); + return _GetGamepadState(joystickId, out state); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetTime")] + private static partial double _GetTime(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double GetTime() + { + Log.Trace(); + return _GetTime(); + } + + [LibraryImport(Dll, EntryPoint = "glfwSetTime")] + private static partial void _SetTime(double time); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTime(double time) + { + Log.Trace(); + _SetTime(time); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetTimerValue")] + private static partial ulong _GetTimerValue(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetTimerValue() + { + Log.Trace(); + return _GetTimerValue(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetTimerFrequency")] + private static partial ulong _GetTimerFrequency(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetTimerFrequency() + { + Log.Trace(); + return _GetTimerFrequency(); + } + + [LibraryImport(Dll, EntryPoint = "glfwMakeContextCurrent")] + private static partial void _MakeContextCurrent(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void MakeContextCurrent(GlfwWindow window) + { + Log.Trace(); + _MakeContextCurrent(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwSwapBuffers")] + private static partial void _SwapBuffers(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SwapBuffers(GlfwWindow window) + { + Log.Trace(); + _SwapBuffers(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwSwapInterval")] + private static partial void _SwapInterval(int interval); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SwapInterval(int interval) + { + Log.Trace(); + _SwapInterval(interval); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwExtensionSupported", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _ExtensionSupported(string extension); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ExtensionSupported(string extension) + { + Log.Trace(); + return _ExtensionSupported(extension); + } + + [LibraryImport(Dll, EntryPoint = "glfwVulkanSupported")] + private static partial int _VulkanSupported(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int VulkanSupported() + { + Log.Trace(); + return _VulkanSupported(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetRequiredInstanceExtensions")] + private static partial byte** _GetRequiredInstanceExtensions(out uint count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GetRequiredInstanceExtensions(out uint count) + { + Log.Trace(); + return _GetRequiredInstanceExtensions(out count); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetInstanceProcAddress", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _GetInstanceProcAddress(nint instance, string procName); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetInstanceProcAddress(nint instance, string procName) + { + Log.Trace(); + return _GetInstanceProcAddress(instance, procName); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetPhysicalDevicePresentationSupport")] + private static partial int _GetPhysicalDevicePresentationSupport( + nint instance, + nint device, + uint queuefamily + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetPhysicalDevicePresentationSupport(nint instance, nint device, uint queuefamily) + { + Log.Trace(); + return _GetPhysicalDevicePresentationSupport(instance, device, queuefamily); + } + + [LibraryImport(Dll, EntryPoint = "glfwCreateWindowSurface")] + private static partial int _CreateWindowSurface( + nint instance, + GlfwWindow window, + void* allocator, + ulong* surface + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int CreateWindowSurface(nint instance, GlfwWindow window, void* allocator, ulong* surface) + { + Log.Trace(); + return _CreateWindowSurface(instance, window, allocator, surface); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetWin32Adapter", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetWin32Adapter(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetWin32Adapter(GlfwMonitor monitor) + { + Log.Trace(); + return _GetWin32Adapter(monitor); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetWin32Monitor", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetWin32Monitor(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetWin32Monitor(GlfwMonitor monitor) + { + Log.Trace(); + return _GetWin32Monitor(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWin32Window")] + private static partial nint _GetWin32Window(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetWin32Window(GlfwWindow window) + { + Log.Trace(); + return _GetWin32Window(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWGLContext")] + private static partial nint _GetWGLContext(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetWGLContext(GlfwWindow window) + { + Log.Trace(); + return _GetWGLContext(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetCocoaMonitor")] + private static partial uint _GetCocoaMonitor(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetCocoaMonitor(GlfwMonitor monitor) + { + Log.Trace(); + return _GetCocoaMonitor(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetCocoaWindow")] + private static partial nint _GetCocoaWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetCocoaWindow(GlfwWindow window) + { + Log.Trace(); + return _GetCocoaWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetCocoaView")] + private static partial nint _GetCocoaView(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetCocoaView(GlfwWindow window) + { + Log.Trace(); + return _GetCocoaView(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetNSGLContext")] + private static partial nint _GetNSGLContext(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetNSGLContext(GlfwWindow window) + { + Log.Trace(); + return _GetNSGLContext(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetX11Display")] + private static partial nint _GetX11Display(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetX11Display() + { + Log.Trace(); + return _GetX11Display(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetX11Adapter")] + private static partial ulong _GetX11Adapter(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetX11Adapter(GlfwMonitor monitor) + { + Log.Trace(); + return _GetX11Adapter(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetX11Monitor")] + private static partial ulong _GetX11Monitor(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetX11Monitor(GlfwMonitor monitor) + { + Log.Trace(); + return _GetX11Monitor(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetX11Window")] + private static partial ulong _GetX11Window(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetX11Window(GlfwWindow window) + { + Log.Trace(); + return _GetX11Window(window); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwSetX11SelectionString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _SetX11SelectionString(string @string); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetX11SelectionString(string @string) + { + Log.Trace(); + _SetX11SelectionString(@string); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetX11SelectionString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetX11SelectionString(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetX11SelectionString() + { + Log.Trace(); + return _GetX11SelectionString(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetGLXContext")] + private static partial nint _GetGLXContext(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetGLXContext(GlfwWindow window) + { + Log.Trace(); + return _GetGLXContext(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetGLXWindow")] + private static partial ulong _GetGLXWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetGLXWindow(GlfwWindow window) + { + Log.Trace(); + return _GetGLXWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetGLXFBConfig")] + private static partial int _GetGLXFBConfig(GlfwWindow window, out nint config); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetGLXFBConfig(GlfwWindow window, out nint config) + { + Log.Trace(); + return _GetGLXFBConfig(window, out config); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWaylandDisplay")] + private static partial nint _GetWaylandDisplay(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetWaylandDisplay() + { + Log.Trace(); + return _GetWaylandDisplay(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWaylandMonitor")] + private static partial nint _GetWaylandMonitor(GlfwMonitor monitor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetWaylandMonitor(GlfwMonitor monitor) + { + Log.Trace(); + return _GetWaylandMonitor(monitor); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetWaylandWindow")] + private static partial nint _GetWaylandWindow(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetWaylandWindow(GlfwWindow window) + { + Log.Trace(); + return _GetWaylandWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetEGLDisplay")] + private static partial nint _GetEGLDisplay(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetEGLDisplay() + { + Log.Trace(); + return _GetEGLDisplay(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetEGLContext")] + private static partial nint _GetEGLContext(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetEGLContext(GlfwWindow window) + { + Log.Trace(); + return _GetEGLContext(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetEGLSurface")] + private static partial nint _GetEGLSurface(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetEGLSurface(GlfwWindow window) + { + Log.Trace(); + return _GetEGLSurface(window); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetEGLConfig")] + private static partial int _GetEGLConfig(GlfwWindow window, out nint config); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetEGLConfig(GlfwWindow window, out nint config) + { + Log.Trace(); + return _GetEGLConfig(window, out config); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetOSMesaColorBuffer")] + private static partial int _GetOSMesaColorBuffer( + GlfwWindow window, + out int width, + out int height, + out int format, + out void* buffer + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetOSMesaColorBuffer( + GlfwWindow window, + out int width, + out int height, + out int format, + out void* buffer + ) + { + Log.Trace(); + return _GetOSMesaColorBuffer(window, out width, out height, out format, out buffer); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetOSMesaDepthBuffer")] + private static partial int _GetOSMesaDepthBuffer( + GlfwWindow window, + out int width, + out int height, + out int bytesPerValue, + out void* buffer + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetOSMesaDepthBuffer( + GlfwWindow window, + out int width, + out int height, + out int bytesPerValue, + out void* buffer + ) + { + Log.Trace(); + return _GetOSMesaDepthBuffer(window, out width, out height, out bytesPerValue, out buffer); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetOSMesaContext")] + private static partial nint _GetOSMesaContext(GlfwWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetOSMesaContext(GlfwWindow window) + { + Log.Trace(); + return _GetOSMesaContext(window); + } + } + } +} diff --git a/Brutal.Glfw/Generated/Glfw.Structs.gen.cs b/Brutal.Glfw/Generated/Glfw.Structs.gen.cs new file mode 100644 index 0000000..60277ef --- /dev/null +++ b/Brutal.Glfw/Generated/Glfw.Structs.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + [StructLayout(LayoutKind.Sequential)] + public struct GlfwMonitorHandle { } + + [StructLayout(LayoutKind.Sequential)] + public struct GlfwWindowHandle { } + + [StructLayout(LayoutKind.Sequential)] + public struct GlfwCursorHandle { } + + [StructLayout(LayoutKind.Sequential)] + public struct GlfwVidMode + { + public int Width; + public int Height; + public int RedBits; + public int GreenBits; + public int BlueBits; + public int RefreshRate; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe struct GlfwGammaRamp + { + public unsafe ushort* Red; + public unsafe ushort* Green; + public unsafe ushort* Blue; + public uint Size; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe struct GlfwImage + { + public int Width; + public int Height; + public unsafe byte* Pixels; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe struct GlfwGamepadState + { + public fixed byte Buttons[15]; + public fixed float Axes[6]; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe struct GlfwAllocator + { + public nint AllocateCallback; + public nint ReallocateCallback; + public nint DeallocateCallback; + public unsafe void* User; + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Context.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Context.gen.cs new file mode 100644 index 0000000..c2b8d10 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Context.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Sets the swap interval for the current context. + /// + /// The minimum number of screen updates to wait for until the buffers are + /// swapped by . + /// + /// This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of + /// screen updates to wait from the time was called before swapping the + /// buffers and returning. This is sometimes called vertical synchronization, vertical retrace synchronization + /// or just vsync. + /// + /// A context that supports either of the WGL_EXT_swap_control_tear and + /// GLX_EXT_swap_control_tear extensions also accepts negative swap intervals, which allows the + /// driver to swap immediately even if a frame arrives a little bit late. You can check for these extensions + /// with glfwExtensionSupported. + /// + /// + /// A context must be current on the calling thread. Calling this function without a current context will + /// cause a error. + /// + /// + /// This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your + /// swapchain instead. + /// + /// + /// This function is not called during context creation, leaving the swap interval set to whatever is the + /// default on that platform. This is done because some swap interval extensions used by GLFW do not allow + /// the swap interval to be reset to zero once it has been set to a non-zero value. + /// + /// + /// Some GPU drivers do not honor the requested swap interval, either because of a user setting that + /// overrides the application's request or due to bugs in the driver. + /// + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. + /// + /// Buffer swapping + public static void SwapInterval(int interval) => PInvoke.SwapInterval(interval); + + /// + /// Returns whether the specified extension is available. + /// + /// + /// This function returns whether the specified API extension is supported by the current OpenGL or OpenGL ES + /// context. It searches both for client API extension and context creation API extensions. + /// + /// A context must be current on the calling thread. Calling this function without a current context will + /// cause a error. + /// + /// + /// As this functions retrieves and searches one or more extension strings each call, it is recommended that + /// you cache its results if it is going to be used frequently. The extension strings will not change during + /// the lifetime of a context, so there is no danger in doing this. + /// + /// + /// This function does not apply to Vulkan. If you are using Vulkan, see + /// , + /// and instead. + /// + /// + /// + /// , , + /// , + /// + /// + /// This function may be called from any thread. + /// + /// OpenGL and + /// OpenGL ES extensions + public static bool ExtensionSupported(string extension) => PInvoke.ExtensionSupported(extension) == GLFW_TRUE; + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Cursor.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Cursor.gen.cs new file mode 100644 index 0000000..05352e4 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Cursor.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Creates a cursor with a standard shape. + /// + /// One of the + /// standard shapes. + /// A new cursor ready to use or null if an error occurred. + /// + /// Returns a cursor with a + /// standard shape, that can be set for + /// a window with . + /// + /// + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// Cursor objects + public static GlfwCursor CreateCursor(GlfwStandardCursor shape) => PInvoke.CreateStandardCursor((int)shape); + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Initialization.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Initialization.gen.cs new file mode 100644 index 0000000..94161d4 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Initialization.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Sets the specified initialization hint to the desired value. + /// + /// + /// This function sets hints for the next initialization of GLFW. + /// + /// The values you set hints to are never reset by GLFW, but they only take effect during initialization. + /// Once GLFW has been initialized, any values you set will be ignored until the library is terminated and + /// initialized again. + /// + /// + /// Some hints are platform specific. These may be set on any platform but they will only affect their + /// specific platform. Other platforms will ignore them. Setting these hints requires no platform specific + /// headers or functions. + /// + /// + /// + /// The contexts of any remaining windows must not be current on any other thread when this function is + /// called. + /// + /// + /// , + /// + /// + /// This function must only be called from the main thread. + /// + /// Initialization and + /// termination + public static void SetInitHint(GlfwInitHint hint, int value) => PInvoke.InitHint((int)hint, value); + + /// + /// Returns and clears the of the last error for the calling thread. + /// + /// + /// This function returns and clears the of the last error that occurred on the + /// calling thread, and optionally a human-readable description of it. if no error has occurred since the last + /// call, it returns (zero) and the description string will be empty. + /// + /// This function may be called before . + /// + /// + /// + /// This function may be called from any thread. + /// + /// Error handling + public static GlfwErrorCode GetError(out string? description) => + (GlfwErrorCode)PInvoke.GetError(out description); + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Input.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Input.gen.cs new file mode 100644 index 0000000..b6b6117 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Input.gen.cs @@ -0,0 +1,458 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Returns whether raw mouse motion is supported. + /// + /// + /// This function returns whether raw mouse motion is supported on the current system. This status does not + /// change after GLFW has been initialized so you only need to check this once. If you attempt to enable raw + /// motion on a system that does not support it, a will be emitted. + /// + /// Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the + /// scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a + /// cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse + /// motion is only provided when the cursor is disabled. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// GlfwWindow.SetInputMode + /// Raw mouse + /// motion + public static bool RawMotionSupported() => PInvoke.RawMouseMotionSupported() == GLFW_TRUE; + + /// + /// Returns the layout-specific name of the specified printable key. + /// + /// The key to query, or . + /// The scancode of the key to query. + /// The layout-specific name of the specified key, or null if the key is non-printable. + /// + /// This function returns the name of the specified printable key, encoded as UTF-8. This is typically the + /// character that key would produce without any modifier keys, intended for displaying key bindings to the + /// user. For dead keys, it is typically the diacritic it would add to a character. + /// + /// Do not use this function for + /// text input. You will + /// break text input for many languages even if it happens to work for yours. + /// + /// + /// If the key is , the scancode is used to identify the key, otherwise the + /// scancode is ignored. If you specify a non-printable key, or and a scancode + /// that maps to a non-printable key, this function returns null but does not emit an error. + /// + /// + /// This behavior allows you to always pass in the arguments in the + /// key callback without + /// modification. + /// + /// + /// Names for printable keys depend on a keyboard layout, while names for non-printable keys are the same + /// across layouts but depend on the application language and should be localized along with other user + /// interface text. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Key names + public static string? GetKeyName(GlfwKey key, int scanCode) => PInvoke.GetKeyName((int)key, scanCode); + + /// + /// Returns the platform-specific scancode of the specified key. + /// + /// Any key token. + /// The platform-specific scancode of the specified key, or -1 if the key is not + /// supported on the current platform or an error occurred. + /// + /// This function returns the platform-specified scancode of the specified key. + /// + /// If the specified key token + /// corresponds to a physical key not supported on the current platform then this method will return + /// -1. Calling this function with anything other than a key token will return -1. and + /// generate a error. + /// + /// + /// + /// This function may be called from any thread. + /// + /// + /// + /// + /// Key input + public static int GetKeyScanCode(int key) => PInvoke.GetKeyScanCode(key); + + /// + /// Returns whether the specified joystick is present. + /// + /// The joystick ID to query. + /// + /// This function returns whether the specified joystick is present. + /// + /// There is no need to call this function before other functions that accept a joystick ID, as they all + /// check for presence before performing any other work. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Joystick input + public static bool JoystickPresent(int joystickId) => PInvoke.JoystickPresent(joystickId) == GLFW_TRUE; + + /// + /// Returns the values of all axes of the specified joystick. + /// + /// The joystick ID to query. + /// An array of axis values, or null if the joystick is not present or an error + /// occurred. + /// + /// This function returns the values of all axes of the specified joystick. Each element in the array is a + /// value between -1.0 and 1.0. + /// + /// If the specified joystick is not present this function will return null but will not generate an + /// error. This can be used instead of first calling + /// Glfw.JoystickPresent. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Joystick axis + /// states + public static ReadOnlySpan GetJoystickAxes(int joystickId) + { + int count; + return new ReadOnlySpan(PInvoke.GetJoystickAxes(joystickId, out count), count); + } + + /// + /// Returns the state of all buttons of the specified joystick. + /// + /// The joystick ID to query. + /// An array of button states, or null if the joystick is not present or an error + /// occurred. + /// + /// This function returns the state of all buttons of the specified joystick. Each element in the array is + /// either or . + /// + /// For backward compatibility with earlier versions that did not have , the + /// button array also includes all hats, each represented as four buttons. The hats are in the same order as + /// returned by GetJoystickHats and are in the order up, right, down and + /// left. To disable these extra buttons, set the + /// init hint before initialization. + /// + /// + /// If the specified joystick is not present this function will return null but will not generate an + /// error. This can be used instead of first calling + /// Glfw.JoystickPresent. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Joystick button + /// states + public static ReadOnlySpan GetJoystickButtons(int joystickId) + { + int count; + return new ReadOnlySpan(PInvoke.GetJoystickButtons(joystickId, out count), count); + } + + /// + /// Returns the name of the specified joystick. + /// + /// The joystick ID to query. + /// The name of the joystick, or null if the joystick is not present or an error occurred. + /// + /// This function returns the name, encoded as UTF-8, of the specified joystick. The returned string is + /// allocated and freed by GLFW. You should not free it yourself. + /// + /// If the specified joystick is not present this function will return null but will not generate an + /// error. This can be used instead of first calling + /// Glfw.JoystickPresent. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Joystick name + public static string? GetJoystickName(int joystickId) => PInvoke.GetJoystickName(joystickId); + + /// + /// Returns the SDL compatible GUID of the specified joystick. + /// + /// The joystick ID to query. + /// The GUID of the joystick, or null if the joystick is not present or an error occurred. + /// + /// This function returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified + /// joystick. The returned string is allocated and freed by GLFW. You should not free it yourself. + /// + /// The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID + /// even if there is no gamepad mapping assigned to it. + /// + /// + /// If the specified joystick is not present this function will return null but will not generate an error. + /// This can be used instead of first calling Glfw.JoystickPresent. + /// + /// + /// The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and + /// model of a joystick but does not identify a specific unit, e.g. all wired Xbox 360 controllers will have + /// the same GUID on that platform. The GUID for a unit may vary between platforms depending on what + /// hardware information the platform specific APIs provide. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Gamepad input + public static string? GetJoystickGuid(int joystickId) => PInvoke.GetJoystickGuid(joystickId); + + /// + /// Sets the user pointer of the specified joystick. + /// + /// The joystick whose user pointer to set. + /// The new user pointer value. + /// + /// This function sets the user-defined pointer of the specified joystick. The current value is retained until + /// the joystick is disconnected. The initial value is null. + /// + /// This function may be called from the joystick callback, even for a joystick that is being disconnected. + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// + /// + /// + /// GetJoystickUserPointer + /// Joystick user + /// pointer + public static void SetJoystickUserPointer(int joystickId, void* handle) => + PInvoke.SetJoystickUserPointer(joystickId, handle); + + /// + /// Returns the user pointer of the specified joystick. + /// + /// The joystick whose user pointer to return. + /// + /// This function returns the current value of the user-defined pointer of the specified joystick. The initial + /// value is null. + /// + /// This function may be called from the joystick callback, even for a joystick that is being disconnected. + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// + /// + /// + /// SetJoystickUserPointer + /// Joystick user + /// pointer + public static void* GetJoystickUserPointer(int joystickId) => PInvoke.GetJoystickUserPointer(joystickId); + + /// + /// Returns whether the specified joystick has a gamepad mapping + /// + /// The joystick ID to query. + /// true if the joystick is both present and has a gamepad mapping, otherwise + /// false. + /// + /// This function returns whether the specified joystick is both present and has a gamepad mapping. + /// + /// If the specified joystick is present but does not have a gamepad mapping this function will return + /// false but will not generate an error. Call + /// Glfw.JoystickPresent to check if a joystick is present regardless + /// of whether it has a mapping. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Gamepad input + public static bool JoystickIsGamepad(int joystickId) => PInvoke.JoystickIsGamepad(joystickId) == GLFW_TRUE; + + /// + /// Adds the specified SDL_GameControllerDB gamepad mappings + /// + /// The string containing the gamepad mappings. + /// true if successful, or false if an error occurred. + /// + /// This function parses the specified ASCII encoded string and updates the internal list with any gamepad + /// mappings it finds. This string may contain either a single gamepad mapping or many mappings separated by + /// newlines. The parser supports the full format of the gamecontrollerdb.txt source file including + /// empty lines and comments. + /// + /// See Gamepad mappings + /// for a description of the format. + /// + /// + /// If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the + /// one passed to this function. If the library is terminated and re-initialized the internal list will + /// revert to the built-in default. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// + /// Gamepad input + public static bool UpdateGamepadMappings(string mappings) => + PInvoke.UpdateGamepadMappings(mappings) == GLFW_TRUE; + + /// + /// Returns the human-readable gamepad name for the specified joystick. + /// + /// The joystick ID to query. + /// The name of the gamepad, or null if the joystick is not present, or does not have a + /// gamepad mapping or an error occurred. + /// + /// This function returns the human-readable name of the gamepad from the gamepad mapping assigned to the + /// specified joystick. If the specified joystick is not present or does not have a gamepad mapping this + /// function will return null but will not generate an error. Call to check + /// whether it is present regardless of whether it has a mapping. + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// Gamepad input + public static string? GetGamepadName(int gamepadId) => PInvoke.GetGamepadName(gamepadId); + + /// + /// Retrieves the state of the specified joystick remapped as a gamepad. + /// + /// The joystick ID to query. + /// The gamepad state to fill. + /// true if successful, or false if the joystick is not present, it does not + /// have a gamepad mapping or an error occurred. + /// + /// This function retrieves the state of the specified joystick remapped to an Xbox-like gamepad. + /// + /// If the specified joystick is not present or does not have a gamepad mapping this function will return + /// false but will not generate an error. Call to check whether it is + /// present regardless of whether it has a mapping. + /// + /// + /// The Guide button may not be available for input as it is often hooked by the system or the Steam client. + /// + /// + /// Not all devices have all the buttons or axes provided by . Unavailable + /// buttons and axes will always report and 0.0 respectively. + /// + /// + /// + /// + /// + /// + /// + /// Gamepad input + public static bool GetGamepadState(int gamepadId, out GlfwGamepadState state) + { + state = default; + return PInvoke.GetGamepadState(gamepadId, out state) == GLFW_TRUE; + } + + /// + /// Sets the GLFW time. + /// + /// + /// This function sets the current GLFW time, in seconds. The value must be a positive finite number less than + /// or equal to 18446744073.0, which is approximately 584.5 years. + /// + /// This function and are helper functions on top of and + /// . + /// + /// + /// + /// This function may be called from any thread. Reading and writing of the internal base time is not atomic, + /// so it needs to be externally synchronized with calls to . + /// + /// + /// + /// + /// Time input + public static void SetTime(double time) => PInvoke.SetTime(time); + + /// + /// Returns the current value of the raw timer. + /// + /// The value of the timer, or zero if an error occurred. + /// + /// This function returns the current value of the raw timer, measured in 1 / frequency seconds. To get the + /// frequency, call . + /// + /// + /// This function may be called from any thread. + /// + /// + /// + /// + /// Time input + public static ulong GetTimerValue() => PInvoke.GetTimerValue(); + + /// + /// Returns the frequency, in Hz, of the raw timer. + /// + /// The frequency of the timer, in Hz, or zero if an error occurred. + /// + /// This function returns the frequency, in Hz, of the raw timer. + /// + /// + /// This function may be called from any thread. + /// + /// + /// + /// + /// + /// Time input + public static ulong GetTimerFrequency() => PInvoke.GetTimerFrequency(); + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Monitor.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Monitor.gen.cs new file mode 100644 index 0000000..0a82ebe --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Monitor.gen.cs @@ -0,0 +1,253 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Returns the primary monitor. + /// + /// The primary monitor, or if no monitors were found or if an + /// error occurred. + /// + /// This function returns the primary monitor. This is usually the monitor where elements like the task bar or + /// global menu bar are located. + /// + /// The primary monitor is always first in the array returned by . + /// + /// + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// Retrieving + /// monitors + public static GlfwMonitor PrimaryMonitor + { + get => PInvoke.GetPrimaryMonitor(); + } + + /// + /// Returns the currently connected monitors. + /// + /// An array of monitor handles, or null if no monitors were found or if an error + /// occurred. + /// + /// This function returns an array of handles for all currently connected monitors. The primary monitor is + /// always first in the returned array. If no monitors were found, this function returns null. + /// + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// Retrieving + /// monitors + /// Monitor + /// configuration changes + public static ReadOnlySpan GetMonitors() + { + int count; + return new ReadOnlySpan(PInvoke.GetMonitors(out count), count); + } + } + + public readonly unsafe partial struct GlfwMonitor + { + /// + /// Returns the name of the monitor. + /// + /// The name of the monitor, or null if an error occurred. + /// + /// This function returns a human-readable name of the monitor. The name typically reflects the make and model + /// of the monitor and is not guaranteed to be unique among the connected monitors. + /// + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// Monitor + /// properties + public string? Name + { + get => Glfw.PInvoke.GetMonitorName(this); + } + + /// + /// Gets/Sets the user pointer of the monitor. + /// + /// + /// This function sets the user-defined pointer of the monitor. The current value is retained until the + /// monitor is disconnected. The initial value is null. + /// + /// This function may be called from the monitor callback, even for a monitor that is being disconnected. + /// + /// + /// + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// User pointer + public void* UserPointer + { + get => Glfw.PInvoke.GetMonitorUserPointer(this); + set => Glfw.PInvoke.SetMonitorUserPointer(this, value); + } + + /// + /// Returns the position of the monitor's viewport on the virtual screen. + /// + /// + /// This function returns the position, in screen coordinates, of the upper-left corner of the monitor. + /// + /// If an error occurs, the position is set to (0, 0). + /// + /// + /// + /// , + /// + /// + /// This function must only be called from the main thread. + /// + /// Monitor + /// properties + public int2 Position + { + get + { + int xPos; + int yPos; + Glfw.PInvoke.GetMonitorPos(this, out xPos, out yPos); + return new int2(xPos, yPos); + } + } + + /// + /// Returns the physical size of the monitor. + /// + /// + /// This function returns the size, in millimetres, of the display area of the monitor. + /// + /// Some systems do not provide accurate monitor size information, either because the monitor EDID data is + /// incorrect or because the driver does not report it accurately. + /// + /// + /// Any or all of the size arguments may be null. If an error occurs, all values will be set to zero. + /// + /// + /// + /// , + /// + /// + /// This function must only be called from the main thread. + /// + /// Monitor + /// properties + public int2 PhysicalSize + { + get + { + int widthMillimeters; + int heightMillimeters; + Glfw.PInvoke.GetMonitorPhysicalSize(this, out widthMillimeters, out heightMillimeters); + return new int2(widthMillimeters, heightMillimeters); + } + } + + /// + /// Retrieves the content scale for the monitor. + /// + /// + /// This function retrieves the content scale for the monitor. The content scale is the ratio between the + /// current DPI and the platform's default DPI. This is especially important for text and any UI elements. If + /// the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a + /// reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system + /// DPI and scaling settings being somewhat correct. + /// + /// The content scale may depend on both the monitor resolution and pixel density and on user settings. It + /// may be very different from the raw DPI calculated from the physical size and current resolution. + /// + /// + /// + /// , + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// Content scale + public float2 ContentScale + { + get + { + float xScale; + float yScale; + Glfw.PInvoke.GetMonitorContentScale(this, out xScale, out yScale); + return new float2(xScale, yScale); + } + } + + /// + /// Returns the available video modes for the monitor. + /// + /// + /// This function returns an array of all video modes supported by the monitor. The returned array is sorted + /// in ascending order, first by color bit depth (the sum of all channel depths), then by resolution area (the + /// product of width and height), then resolution width and finally by refresh rate. + /// + /// On macOS the array holds the non-HiDPI modes plus the desktop mode at the time the array was created, + /// which is usually a HiDPI mode. A request matching the mode in place before GLFW changed it restores that + /// exact mode; otherwise a request matching the current mode with an explicit refresh rate keeps it. + /// + /// + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// VideoMode + /// Video modes + public ReadOnlySpan VideoModes + { + get + { + int count; + return new ReadOnlySpan(Glfw.PInvoke.GetVideoModes(this, out count), count); + } + } + + /// + /// Generates a gamma ramp and sets it for the monitor. + /// + /// + /// This function generates an appropriately sized gamma ramp from the specified exponent and then calls + /// glfwSetGammaRamp with it. The value must be a finite number greater than zero. + /// + /// The software controlled gamma ramp is applied in addition to the hardware gamma correction, which today + /// is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma + /// 1.0, will produce the default (usually sRGB-like) behavior. + /// + /// + /// For gamma correct rendering with OpenGL or OpenGL ES, see the GLFW_SRGB_CAPABLE hint. + /// + /// + /// + /// + /// + /// + /// Gamma ramp + public void SetGamma(float gamma) => Glfw.PInvoke.SetGamma(this, gamma); + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Native.Cocoa.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Cocoa.gen.cs new file mode 100644 index 0000000..75c96b5 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Cocoa.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi.Cocoa +{ + /// + /// Native handle accessors for the Cocoa (macOS) and NSGL backends. Add using Brutal.GlfwApi.Cocoa; to + /// call these extension methods on / . + /// + public static class CocoaExtensions + { + extension(GlfwMonitor monitor) + { + /// + /// Returns the CGDirectDisplayID of the specified monitor. + /// + /// The CGDirectDisplayID of the specified monitor, or kCGNullDirectDisplay + /// (0) if an error occurred. + /// + /// This function is only available on the macOS native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetCocoaMonitor + public uint GetCocoaMonitor() => Glfw.PInvoke.GetCocoaMonitor(monitor); + } + extension(GlfwWindow window) + { + /// + /// Returns the NSWindow of the specified window. + /// + /// The NSWindow handle of the specified window, or 0 if an error occurred. + /// + /// This function is only available on the macOS native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetCocoaWindow + public nint GetCocoaWindow() => Glfw.PInvoke.GetCocoaWindow(window); + + /// + /// Returns the NSView of the specified window. + /// + /// The NSView handle of the specified window, or 0 if an error occurred. + /// + /// This function is only available on the macOS native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetCocoaView + public nint GetCocoaView() => Glfw.PInvoke.GetCocoaView(window); + + /// + /// Returns the NSOpenGLContext of the specified window. + /// + /// The NSOpenGLContext handle of the specified window, or 0 if an error + /// occurred. + /// + /// This function is only available on the macOS native build with NSGL context support. Calling it on any + /// other platform will result in an . + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetNSGLContext + public nint GetNSGLContext() => Glfw.PInvoke.GetNSGLContext(window); + } + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Native.Egl.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Egl.gen.cs new file mode 100644 index 0000000..29ad722 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Egl.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi.Egl +{ + /// + /// Native handle accessors for the EGL context backend (cross-platform). Add using Brutal.GlfwApi.Egl; to + /// call these extension methods on . + /// + public static class EglExtensions + { + /// + /// Returns the EGLDisplay used by GLFW. + /// + /// The EGLDisplay used by GLFW, or EGL_NO_DISPLAY (0) if an error occurred. + /// + /// This function is only available when GLFW was built with EGL context support. Calling it otherwise will + /// result in an . + /// + /// Because EGL is initialized on demand, this method will return EGL_NO_DISPLAY (0) until the first + /// context has been created via EGL. + /// + /// + /// + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetEGLDisplay + public static nint GetEGLDisplay() => Glfw.PInvoke.GetEGLDisplay(); + + extension(GlfwWindow window) + { + /// + /// Returns the EGLContext of the specified window. + /// + /// The EGLContext of the specified window, or EGL_NO_CONTEXT (0) if an + /// error occurred. + /// + /// This function is only available when GLFW was built with EGL context support. Calling it otherwise + /// will result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetEGLContext + public nint GetEGLContext() => Glfw.PInvoke.GetEGLContext(window); + + /// + /// Returns the EGLSurface of the specified window. + /// + /// The EGLSurface of the specified window, or EGL_NO_SURFACE (0) if an + /// error occurred. + /// + /// This function is only available when GLFW was built with EGL context support. Calling it otherwise + /// will result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetEGLSurface + public nint GetEGLSurface() => Glfw.PInvoke.GetEGLSurface(window); + + /// + /// Retrieves the EGLConfig of the specified window's EGLSurface. + /// + /// Receives the EGLConfig of the window's EGLSurface, if + /// available. + /// true if successful, or false if an error occurred. + /// + /// This function is only available when GLFW was built with EGL context support. Calling it otherwise + /// will result in an . + /// + /// EGLConfig is an opaque handle. GLFW leaves it unwritten on error, as core EGL defines no + /// invalid value, so config is set to 0 before the call. + /// + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetEGLConfig + public bool GetEGLConfig(out nint config) + { + config = default; + return Glfw.PInvoke.GetEGLConfig(window, out config) == GLFW_TRUE; + } + } + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Native.OSMesa.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Native.OSMesa.gen.cs new file mode 100644 index 0000000..5abbeed --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Native.OSMesa.gen.cs @@ -0,0 +1,78 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi.OSMesa +{ + /// + /// Native handle accessors for the OSMesa software context backend. Add using Brutal.GlfwApi.OSMesa; to + /// call these extension methods on . + /// + public static unsafe class OSMesaExtensions + { + extension(GlfwWindow window) + { + /// + /// Retrieves the color buffer associated with the specified window. + /// + /// Receives the width of the color buffer. + /// Receives the height of the color buffer. + /// Receives the OSMesa pixel format of the color buffer. + /// Receives the address of the color buffer. + /// true if successful, or false if an error occurred. + /// + /// This function is only available when GLFW was built with OSMesa context support. Calling it otherwise + /// will result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetOSMesaColorBuffer + public bool GetOSMesaColorBuffer(out int width, out int height, out int format, out void* buffer) => + Glfw.PInvoke.GetOSMesaColorBuffer(window, out width, out height, out format, out buffer) == GLFW_TRUE; + + /// + /// Retrieves the depth buffer associated with the specified window. + /// + /// Receives the width of the depth buffer. + /// Receives the height of the depth buffer. + /// Receives the number of bytes per depth buffer element. + /// Receives the address of the depth buffer. + /// true if successful, or false if an error occurred. + /// + /// This function is only available when GLFW was built with OSMesa context support. Calling it otherwise + /// will result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetOSMesaDepthBuffer + public bool GetOSMesaDepthBuffer(out int width, out int height, out int bytesPerValue, out void* buffer) => + Glfw.PInvoke.GetOSMesaDepthBuffer(window, out width, out height, out bytesPerValue, out buffer) + == GLFW_TRUE; + + /// + /// Returns the OSMesaContext of the specified window. + /// + /// The OSMesaContext of the specified window, or 0 if an error occurred. + /// + /// This function is only available when GLFW was built with OSMesa context support. Calling it otherwise + /// will result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetOSMesaContext + public nint GetOSMesaContext() => Glfw.PInvoke.GetOSMesaContext(window); + } + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Native.Wayland.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Wayland.gen.cs new file mode 100644 index 0000000..2c96062 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Wayland.gen.cs @@ -0,0 +1,70 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi.Wayland +{ + /// + /// Native handle accessors for the Wayland (Linux/BSD) backend. Add using Brutal.GlfwApi.Wayland; to call + /// these extension methods on / . + /// + public static class WaylandExtensions + { + /// + /// Returns the wl_display* used by GLFW. + /// + /// The wl_display* used by GLFW, or 0 if an error occurred. + /// + /// This function is only available on the Wayland native build. Calling it on any other platform will result + /// in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWaylandDisplay + public static nint GetWaylandDisplay() => Glfw.PInvoke.GetWaylandDisplay(); + + extension(GlfwMonitor monitor) + { + /// + /// Returns the wl_output* of the specified monitor. + /// + /// The wl_output* of the specified monitor, or 0 if an error occurred. + /// + /// This function is only available on the Wayland native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWaylandMonitor + public nint GetWaylandMonitor() => Glfw.PInvoke.GetWaylandMonitor(monitor); + } + extension(GlfwWindow window) + { + /// + /// Returns the main wl_surface* of the specified window. + /// + /// The main wl_surface* of the specified window, or 0 if an error + /// occurred. + /// + /// This function is only available on the Wayland native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWaylandWindow + public nint GetWaylandWindow() => Glfw.PInvoke.GetWaylandWindow(window); + } + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Native.Win32.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Win32.gen.cs new file mode 100644 index 0000000..e863790 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Native.Win32.gen.cs @@ -0,0 +1,93 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi.Win32 +{ + /// + /// Native handle accessors for the Win32 (Windows) and WGL backends. Add using Brutal.GlfwApi.Win32; to + /// call these extension methods on / . + /// + public static class Win32Extensions + { + extension(GlfwMonitor monitor) + { + /// + /// Returns the adapter device name of the specified monitor. + /// + /// The UTF-8 encoded adapter device name (for example \\.\DISPLAY1) of the + /// specified monitor, or null if an error occurred. + /// + /// This function is only available on the Windows native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWin32Adapter + public string? GetWin32Adapter() => Glfw.PInvoke.GetWin32Adapter(monitor); + + /// + /// Returns the display device name of the specified monitor. + /// + /// The UTF-8 encoded display device name (for example \\.\DISPLAY1\Monitor0) of + /// the specified monitor, or null if an error occurred. + /// + /// This function is only available on the Windows native build. Calling it on any other platform will + /// result in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWin32Monitor + public string? GetWin32Monitor() => Glfw.PInvoke.GetWin32Monitor(monitor); + } + extension(GlfwWindow window) + { + /// + /// Returns the HWND of the specified window. + /// + /// The HWND of the specified window, or 0 if an error occurred. + /// + /// This function is only available on the Windows native build. Calling it on any other platform will + /// result in an . + /// + /// The HDC associated with the window can be obtained by passing the returned HWND to the + /// Win32 GetDC function. The returned DC is private and does not need to be released. + /// + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWin32Window + public nint GetWin32Window() => Glfw.PInvoke.GetWin32Window(window); + + /// + /// Returns the HGLRC of the specified window. + /// + /// The HGLRC of the specified window, or 0 if an error occurred. + /// + /// This function is only available on the Windows native build with WGL context support. Calling it on + /// any other platform will result in an . + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetWGLContext + public nint GetWGLContext() => Glfw.PInvoke.GetWGLContext(window); + } + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Native.X11.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Native.X11.gen.cs new file mode 100644 index 0000000..0e3e6ed --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Native.X11.gen.cs @@ -0,0 +1,192 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi.X11 +{ + /// + /// Native handle accessors for the X11 (Linux/BSD) and GLX backends. Add using Brutal.GlfwApi.X11; to call + /// these extension methods on / . + /// + public static class X11Extensions + { + /// + /// Returns the X11 Display used by GLFW. + /// + /// The Display pointer used by GLFW, or 0 if an error occurred. + /// + /// This function is only available on the X11 native build. Calling it on any other platform will result in + /// an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetX11Display + public static nint GetX11Display() => Glfw.PInvoke.GetX11Display(); + + /// + /// Returns the contents of the current X11 primary selection as a string. + /// + /// The contents of the selection as a UTF-8 encoded string, or null if an error occurred. + /// + /// This function is only available on the X11 native build. Calling it on any other platform will result in + /// an . + /// + /// If the selection is empty or its contents cannot be converted, null is returned and a + /// error is generated. + /// + /// + /// + /// , , + /// , + /// + /// + /// This function must only be called from the main thread. + /// + /// glfwGetX11SelectionString + public static string? GetX11SelectionString() => Glfw.PInvoke.GetX11SelectionString(); + + extension(GlfwMonitor monitor) + { + /// + /// Returns the RRCrtc of the specified monitor. + /// + /// The RRCrtc of the specified monitor, or None (0) if an error occurred. + /// + /// This function is only available on the X11 native build. Calling it on any other platform will result + /// in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetX11Adapter + public ulong GetX11Adapter() => Glfw.PInvoke.GetX11Adapter(monitor); + + /// + /// Returns the RROutput of the specified monitor. + /// + /// The RROutput of the specified monitor, or None (0) if an error + /// occurred. + /// + /// This function is only available on the X11 native build. Calling it on any other platform will result + /// in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetX11Monitor + public ulong GetX11Monitor() => Glfw.PInvoke.GetX11Monitor(monitor); + } + extension(GlfwWindow window) + { + /// + /// Returns the X11 Window XID of the specified window. + /// + /// The X11 Window of the specified window, or None (0) if an error + /// occurred. + /// + /// This function is only available on the X11 native build. Calling it on any other platform will result + /// in an . + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetX11Window + public ulong GetX11Window() => Glfw.PInvoke.GetX11Window(window); + + /// + /// Returns the GLXContext of the specified window. + /// + /// The GLXContext of the specified window, or 0 if an error occurred. + /// + /// This function is only available on the X11 native build with GLX context support. Calling it on any + /// other platform will result in an . + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetGLXContext + public nint GetGLXContext() => Glfw.PInvoke.GetGLXContext(window); + + /// + /// Returns the GLXWindow of the specified window. + /// + /// The GLXWindow of the specified window, or None (0) if an error + /// occurred. + /// + /// This function is only available on the X11 native build with GLX context support. Calling it on any + /// other platform will result in an . + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetGLXWindow + public ulong GetGLXWindow() => Glfw.PInvoke.GetGLXWindow(window); + + /// + /// Retrieves the GLXFBConfig of the specified window's GLXWindow. + /// + /// Receives the GLXFBConfig of the window's GLXWindow, if + /// available. + /// true if successful, or false if an error occurred. + /// + /// This function is only available when GLFW was built with GLX context support. Calling it otherwise + /// will result in an . + /// + /// GLXFBConfig is an opaque handle. GLFW leaves it unwritten on error, as core GLX defines no + /// invalid value, so config is set to 0 before the call. + /// + /// + /// + /// , + /// + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// glfwGetGLXFBConfig + public bool GetGLXFBConfig(out nint config) + { + config = default; + return Glfw.PInvoke.GetGLXFBConfig(window, out config) == GLFW_TRUE; + } + } + + /// + /// Sets the current X11 primary selection to the specified string. + /// + /// A UTF-8 encoded string. Copied before this method returns. + /// + /// This function is only available on the X11 native build. Calling it on any other platform will result in + /// an . + /// + /// + /// , , + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// glfwSetX11SelectionString + public static void SetX11SelectionString(string @string) => Glfw.PInvoke.SetX11SelectionString(@string); + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Platform.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Platform.gen.cs new file mode 100644 index 0000000..886d3ed --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Platform.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Returns the platform GLFW was initialized for. + /// + /// One of . + /// + /// must succeed before this method is called. If GLFW has not been initialized the + /// returned value is undefined; check via + /// . + /// + /// + /// + /// + /// + /// This function may be called from any thread. + /// + /// + /// Runtime platform + /// selection + public static GlfwPlatform GetPlatform() => (GlfwPlatform)PInvoke.GetPlatform(); + + /// + /// Returns whether the library includes support for the specified platform. + /// + /// The platform to query. + /// true if the platform is supported, false otherwise. + /// + /// The result depends on which backends were enabled when the GLFW native library was compiled. May be called + /// before . + /// + /// + /// + /// + /// + /// This function may be called from any thread. + /// + /// + /// Runtime platform + /// selection + public static bool IsPlatformSupported(GlfwPlatform platform) => + PInvoke.PlatformSupported((int)platform) == GLFW_TRUE; + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Vulkan.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Vulkan.gen.cs new file mode 100644 index 0000000..8cd9d67 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Vulkan.gen.cs @@ -0,0 +1,148 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Returns whether the Vulkan loader and an ICD have been found. + /// + /// true if Vulkan is minimally available, or false otherwise. + /// + /// This function returns whether the Vulkan loader and any minimally functional ICD have been found. + /// + /// The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation + /// or even instance creation is possible. Call + /// GetRequiredInstanceExtensions to check whether the + /// extensions necessary for Vulkan surface creation are available and + /// GetPhysicalDevicePresentationSupport to check + /// whether a queue family of a physical device supports image presentation. + /// + /// + /// + /// + /// + /// + /// This function may be called from any thread. + /// + /// Querying for + /// Vulkan support + public static bool VulkanSupported() => PInvoke.VulkanSupported() == GLFW_TRUE; + + /// + /// Returns the Vulkan instance extensions required by GLFW. + /// + /// An array of ASCII encoded extension names, or null if an error occurred. + /// + /// This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan + /// surfaces for GLFW windows. If successful, the list will always contain VK_KHR_surface, so if you + /// don't require any additional extensions you can pass this list directly to the VkInstanceCreateInfo + /// struct. + /// + /// If Vulkan is not available on the machine, this function returns null and generates a + /// error. Call + /// Glfw.VulkanSupported to check whether Vulkan is at least minimally + /// available. + /// + /// + /// If Vulkan is available but no set of extensions allowing window surface creation was found, this + /// function returns null. You may still use Vulkan for off-screen rendering and compute work. + /// + /// + /// Additional extensions may be required by future versions of GLFW. You should check if any extensions you + /// wish to enable are already in the returned array, as it is an error to specify an extension more than + /// once in the VkInstanceCreateInfo struct. + /// + /// + /// + /// , + /// + /// + /// The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be + /// valid only until the library is terminated. + /// + /// + /// This function may be called from any thread. + /// + /// Querying required + /// Vulkan extensions + public static byte** GetRequiredInstanceExtensions(out uint count) => + PInvoke.GetRequiredInstanceExtensions(out count); + + /// + /// Returns the address of the specified Vulkan instance function. + /// + /// The address of the function, or null if an error occurred. + /// + /// This function returns the address of the specified Vulkan core or extension function for the specified + /// instance. If instance is set to null it can return any function exported from the Vulkan loader, + /// including at least the following functions: + /// + /// vkEnumerateInstanceExtensionProperties + /// vkEnumerateInstanceLayerProperties + /// vkCreateInstance + /// vkGetInstanceProcAddr + /// + /// + /// If Vulkan is not available on the machine, this function returns null and generates a + /// error. Call + /// Glfw.VulkanSupported to check whether Vulkan is at least minimally + /// available. + /// + /// + /// This function is equivalent to calling vkGetInstanceProcAddr with a platform-specific query of + /// the Vulkan loader as a fallback. + /// + /// + /// + /// , + /// + /// + /// The returned pointer is valid until the library is terminated. + /// + /// + /// This function may be called from any thread. + /// + /// Querying Vulkan + /// function pointers + public static nint GetInstanceProcAddress(nint instance, string procName) => + PInvoke.GetInstanceProcAddress(instance, procName); + + /// + /// Returns whether the specified queue family can present images. + /// + /// + /// This function returns whether the specified queue family of the specified physical device supports + /// presentation to the specified platform GLFW was built for. + /// + /// If Vulkan or the required window surface creation instance extensions are not available on the machine, + /// or if the specified instance was not created with the required extensions, this function returns + /// false and generates a error. Call + /// Glfw.VulkanSupported to check whether Vulkan is at least minimally + /// available and GetRequiredInstanceExtensions to check + /// what instance extensions are required. + /// + /// + /// + /// This function currently always returns true, as the VK_MVK_macos_surface and + /// VK_EXT_metal_surface extensions do not provide a function to query this. + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. + /// + /// Querying for + /// Vulkan presentation support + public static bool GetPhysicalDevicePresentationSupport( + nint instance, + nint physicalDevice, + int queueFamilyIndex + ) => + PInvoke.GetPhysicalDevicePresentationSupport(instance, physicalDevice, (uint)queueFamilyIndex) == GLFW_TRUE; + } +} diff --git a/Brutal.Glfw/Generated/Libraries/Glfw.Window.gen.cs b/Brutal.Glfw/Generated/Libraries/Glfw.Window.gen.cs new file mode 100644 index 0000000..469f2b0 --- /dev/null +++ b/Brutal.Glfw/Generated/Libraries/Glfw.Window.gen.cs @@ -0,0 +1,587 @@ +// +// Generated by Brutal.Glfw.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.GlfwApi +{ + public static unsafe partial class Glfw + { + /// + /// Resets all window hints to their default values. + /// + /// + /// This function resets all window hints to their default values. + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// + /// Window creation + /// hints + public static void DefaultWindowHints() => PInvoke.DefaultWindowHints(); + + /// + /// Sets the specified window hint to the desired value. + /// + /// + /// This function sets hints for the creation of a . The hints, once set, retain their + /// values until changed by a call to this function or , or until the library + /// is terminated. + /// + /// This function does not check whether the specified hint values are valid. If you set hints to invalid + /// values this will instead be reported by the next creation of a + /// + /// + /// Some hints are platform specific. These may be set on any platform but they will only affect their + /// specific platform. Other platforms will ignore them. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// Glfw.DefaultWindowHints + /// + /// Window creation + /// hints + public static void WindowHint(GlfwWindowHint hint, int value) => PInvoke.WindowHint((int)hint, value); + + /// + /// + public static void WindowHint(GlfwWindowHint hint, string value) => PInvoke.WindowHintString((int)hint, value); + + /// + /// Waits until events are queued and processes them. + /// + /// + /// This function puts the calling thread to sleep until at least one event is available in the event queue. + /// Once one or more events are available, it behaves exactly like , i.e. the events + /// in the queue are processed and the function then returns immediately. Processing events will cause the + /// window and input callbacks associated with those events to be called. + /// + /// Since not all events are associated with callbacks, this function may return without a callback having + /// been called event if you are monitoring all callbacks. + /// + /// + /// On some platforms, a window move, resize or menu operation will cause event processing to block. This is + /// due to how event processing is designed on those platforms. You can use the + /// window refresh callback + /// to redraw the contents of your window when necessary during such operations. + /// + /// + /// Do not assume that callbacks you set will only be called in response to event processing + /// functions like this one. While it is necessary to poll for events, window systems that require GLFW to + /// register callbacks of its own can pass events to GLFW in response to many window system function calls. + /// GLFW will pass those events on to the application callbacks before returning. + /// + /// + /// Event processing is not required for joystick input to work. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// This function must not be called from a callback. + /// + /// + /// , + /// + /// Glfw.PollEvents + /// Glfw.WaitEventsTimeout + /// Event processing + public static void WaitEvents() => PInvoke.WaitEvents(); + + /// + /// Waits with timeout until events are queued and processes them. + /// + /// + /// This function puts the calling thread to sleep until at least one event is available in the event queue, + /// or until the specified timeout is reached. If one or more events is available, it behaves exactly like + /// , i.e. the events in the queue are processed and the function then returns + /// immediately. Processing events will cause the window and input callbacks associated with those events to + /// be called. + /// + /// The timeout value must be a positive finite number. + /// + /// + /// Since not all events are associated with callbacks, this function may return without a callback having + /// been called even if you are monitoring all callbacks. + /// + /// + /// On some platforms, a window move, resize or menu operation will cause event processing to block. This is + /// due to how event processing is designed on those platforms. You can use the + /// window refresh callback + /// to redraw the contents of your window when necessary during such operations. + /// + /// + /// Do not assume that callbacks you set will only be called in response to event processing + /// functions like this one. While it is necessary to poll for events, window systems that require GLFW to + /// register callbacks of its own can pass events to GLFW in response to many window system function calls. + /// GLFW will pass those events on to the application callbacks before returning. + /// + /// + /// Event processing is not required for joystick input to work. + /// + /// + /// + /// This function must not be called from a callback. + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , , + /// + /// + /// Glfw.PollEvents + /// Glfw.WaitEvents + /// Event processing + public static void WaitEventsTimeout(double timeout) => PInvoke.WaitEventsTimeout(timeout); + + /// + /// Posts an empty event to the event queue. + /// + /// + /// This function posts an empty event from the current thread to the event queue, causing + /// or to return. + /// + /// + /// This function may be called from any thread. + /// + /// + /// , + /// + /// Glfw.WaitEvents + /// Glfw.WaitEventsTimeout + /// Event processing + public static void PostEmptyEvent() => PInvoke.PostEmptyEvent(); + } + + public sealed partial class GlfwWindow + { + /// + /// Retrieves the size of the frame of the window + /// + /// + /// This function retrieves the size, in screen coordinates, of each edge of the frame of the window. This + /// size includes the title bar, if the window has one. The size of the frame may vary depending on the + /// window-related hints + /// used to create it. + /// + /// Because this function retrieves the size of each window frame edge and not the offset along a particular + /// coordinate axis, the retrieved values will always be zero or positive. + /// + /// + /// Any or all of the size arguments may be null. If an error occurs, all arguments will be set to + /// zero. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// Window size + public void GetWindowFrameSize(out int left, out int top, out int right, out int bottom) => + Glfw.PInvoke.GetWindowFrameSize(this, out left, out top, out right, out bottom); + + /// + /// Iconifies the window + /// + /// + /// This function iconifies (minimizes) the window if it was previously restored. If the window is already + /// iconified, this function does nothing. + /// + /// If the window is a full screen window, GLFW restores the original video mode of the monitor. The + /// window's desired video mode is set again when the window is restored. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// GlfwWindow.Restore + /// GlfwWindow.Maximize + /// Window + /// iconification + public void Iconify() => Glfw.PInvoke.IconifyWindow(this); + + /// + /// Restores the window + /// + /// + /// This function restores the window if it was previously iconified (minimized) or maximized. If the window + /// is restored, this function does nothing. + /// + /// If the window is an iconified full screen window, its desired video mode is set again for its monitor + /// when the window is restored. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// GlfwWindow.Iconify + /// GlfwWindow.Maximize + /// Window + /// iconification + public void Restore() => Glfw.PInvoke.RestoreWindow(this); + + /// + /// Maximizes the window + /// + /// + /// This function maximizes the window if it was previously not maximized. If the window is already maximized, + /// this function does nothing. + /// + /// If the window is a full screen window, this function does nothing. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// GlfwWindow.Iconify + /// GlfwWindow.Restore + /// Window + /// iconification + public void Maximize() => Glfw.PInvoke.MaximizeWindow(this); + + /// + /// Brings the window to front and sets input focus + /// + /// + /// This function brings the window to front and sets input focus. The window should already be visible and + /// not iconified. + /// + /// By default, both windowed and full screen mode windows are focused when initially created. Set the + /// to disable this behaviour. + /// + /// + /// Do not use this function to steal focus from other applications unless you are certain that is + /// what the user wants. Focus stealing can be extremely disruptive. + /// + /// + /// For a less disruptive way of getting the user's attention, use + /// attention requests + /// . + /// + /// + /// + /// It is not possible for an application to bring its windows to front, this function will always emit + /// . + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// Window input focus + /// Window + /// attention request + public void Focus() => Glfw.PInvoke.FocusWindow(this); + + /// + /// Requests user attention to the window + /// + /// + /// This function requests user attention to the window. On platforms where this is not supported, attention + /// is requested to the application as a whole. + /// + /// Once the user has given attention, usually by focusing the window or application, the system will end + /// the request automatically. + /// + /// + /// + /// Attention is requested to the application as a whole, not the specific + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , + /// + /// Window + /// attention request + public void RequestAttention() => Glfw.PInvoke.RequestWindowAttention(this); + + /// + /// Sets an attribute of the window + /// + /// + /// This function sets the value of an attribute of the window + /// + /// The supported attributes are: + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Some of these attributes are ignored for full screen windows. The new value will take effect if the + /// window is later made windowed. + /// + /// + /// Some of these attributes are ignored for windowed mode windows. The new value will take effect if the + /// window is later made full screen. + /// + /// + /// Calling GlfwWindow.GetAttribute will + /// always return the latest value, even if hat value is ignored by the current mode of the + /// + /// + /// + /// The window attribute is not supported. Setting this will emit + /// . + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// , , + /// , + /// + /// GlfwWindow.GetAttribute + /// Window + /// attributes + public void SetAttribute(GlfwWindowAttribute attrib, int value) => + Glfw.PInvoke.SetWindowAttrib(this, (int)attrib, value); + + /// + /// Returns the value of an input option for the specified window. + /// + /// The input mode whose value to query. + /// + /// + /// + /// GlfwWindow.SetInputMode + public int GetInputMode(GlfwInputMode mode) => Glfw.PInvoke.GetInputMode(this, (int)mode); + + /// + /// Sets an input option for the specified window. + /// + /// The input mode to set. + /// The new value of the specified input mode. + /// + /// This function sets the value of an input option for the specified window. + /// + /// If the mode is , the value must be one of the following cursor modes: + /// + /// + /// makes the cursor visible and behave normally + /// makes the cursor invisible when it is over the content + /// area of the window.Handle but does not restrict the cursor from leaving. + /// hides and grabs the cursor, providing virtual and + /// unlimited cursor movement. This is useful for implementing for example 3D camera controls + /// + /// + /// If the mode is , the value must be either + /// to enable stick keys, or to disable it. If sticky keys are enabled, a key press + /// will ensure that GlfwWindow.GetKey returns + /// the next time it is called even if the key had been released before + /// the call. This is useful when you are only interested in whether keys have been pressed but not when or + /// in which order. + /// + /// + /// If the mode is , the value must be either + /// to enable stick mouse buttons, or to disable it. If + /// sticky mouse buttons are enabled, a key press will ensure that + /// GlfwWindow.GetKey returns the next + /// time it is called even if the mouse button had been released before the call. This is useful when you + /// are only interested in whether mouse buttons have been pressed but not when or in which order. + /// + /// + /// If the mode is , the value must be either + /// to enable lock key modifier bits, or to disable them. If enabled, callbacks + /// that receive modifier bits will also have the bit set when the event + /// was generated with Caps Lock on, and the bit when Num Lock was on. + /// + /// + /// If the mode is , the value must be either + /// to enable raw (unscaled and unaccelerated) mouse motion when the cursor is + /// disabled, or to disable it. If raw motion is not supported, attempting to set + /// this will emit a . Call + /// to check for support. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// + /// GlfwWindow.GetInputMode + public void SetInputMode(GlfwInputMode mode, int value) => Glfw.PInvoke.SetInputMode(this, (int)mode, value); + + /// + /// Returns the last reported state of a keyboard key for the specified window. + /// + /// The desired keyboard key. is not a valid key for + /// this function. + /// One of or . + /// + /// This function returns the last state reported for the specified key to the specified window. The returned + /// state is one of or . The action + /// is only reported to the key callback. + /// + /// If the input mode is enabled, this function returns + /// the first time you call it for a key that was pressed, even if that + /// key has already been released. + /// + /// + /// The key functions deal with physical keys, with + /// key tokens named after their use on + /// the standard US keyboard layout. If you want to input text, use the Unicode character callback instead. + /// + /// + /// The modifier key bit masks are not + /// key tokens and cannot be used with this function. + /// + /// + /// Do not use this function to implement + /// text input. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// Key input + public GlfwKeyAction GetKey(GlfwKey key) => (GlfwKeyAction)Glfw.PInvoke.GetKey(this, (int)key); + + /// + /// Returns the last reported state of a mouse button for the specified window. + /// + /// The desired mouse button. + /// + /// This function returns the last state reported for the specified mouse button to the specified window. The + /// returned state is one of or . + /// + /// If the input mode is enabled, this function returns + /// the first time you call it for a mouse button that was pressed, + /// even if that mouse button has already been released. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// Mouse button + /// input + public GlfwButtonAction GetMouseButton(GlfwMouseButton button) => + (GlfwButtonAction)Glfw.PInvoke.GetMouseButton(this, (int)button); + + /// + /// Sets the cursor for the window + /// + /// The cursor to set, or null to revert to the default cursor. + /// + /// This function sets the cursor image to be used when the cursor is over the content area of the specified + /// window. The set cursor will only be visible when the + /// cursor mode is + /// . + /// + /// On some platforms, the set cursor may not be visible unless the window also has input focus. + /// + /// + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// + /// Cursor objects + public void SetCursor(GlfwCursor cursor) => Glfw.PInvoke.SetCursor(this, cursor); + + /// + /// Makes the context of the specified window current for the calling thread. + /// + /// + /// This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. + /// It can also detach the current context from the calling thread without making a new one current by passing + /// in null. + /// + /// A context must only be made current on a single thread at a time and each thread can have only a single + /// current context at a time. Making a context current detaches any previously current context on the + /// calling thread. + /// + /// + /// When moving a context between threads, you must detach it (make it non-current) on the old thread before + /// making it current on the new one. + /// + /// + /// By default, making a context non-current implicitly forces a pipeline flush. On machines that support + /// GL_KHR_context_flush_control, you can control whether a context performs this flush by setting + /// the GLFW_CONTEXT_RELEASE_BEHAVIOR hint. + /// + /// + /// The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context + /// will generate a error. + /// + /// + /// If the previously current context was created via a different context creation API than the one passed + /// to this function, GLFW will still detach the previous one from its API before making the new one + /// current. + /// + /// + /// + /// , , + /// + /// + /// + /// This function may be called from any thread. + /// + /// Current + /// context + public void MakeContextCurrent() => Glfw.PInvoke.MakeContextCurrent(this); + + /// + /// Swaps the front and back buffers of the window + /// + /// + /// This function swaps the front and back buffers of the window when rendering with OpenGL or OpenGL ES. If + /// the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before + /// swapping the buffers. + /// + /// The window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate + /// a error. + /// + /// + /// This function does not apply to Vulkan. + /// + /// + /// + /// This function may be called from any thread. + /// + /// + /// , , + /// + /// + /// GlfwWindow.SwapInterval + /// Buffer swapping + public void SwapBuffers() => Glfw.PInvoke.SwapBuffers(this); + } +} diff --git a/Brutal.Glfw/Glfw.cs b/Brutal.Glfw/Glfw.cs new file mode 100644 index 0000000..ca5d46a --- /dev/null +++ b/Brutal.Glfw/Glfw.cs @@ -0,0 +1,60 @@ +using Brutal.Logging; + +namespace Brutal.GlfwApi; + +/// +/// Handles exceptions that occur during GLFW event processing. +/// +public class ExceptionAggregator +{ + private readonly List _exceptions = []; + private readonly Lock _lock = new(); + + /// + /// Push an exception to the aggregator. + /// + /// + /// + public void Push(string message, Exception? innerException = null) + { + lock (_lock) + { + _exceptions.Add(new Exception(message, innerException)); + } + } + + /// + /// Checks if there are any exceptions that have been thrown during event processing. + /// + /// + /// + public void CheckExceptions() + { + Exception exception; + lock (_lock) + { + if (_exceptions.Count == 0) + return; + + exception = _exceptions.Count == 1 ? _exceptions[0] : new AggregateException(_exceptions.ToArray()); + _exceptions.Clear(); + } + + throw exception; + } +} + +/// +/// Provides access to the GLFW library. +/// +public static partial class Glfw +{ + private const string Dll = "glfw"; + + /// + /// The logging category for all GLFW-related logs. + /// + public static readonly LogCategory Log = LogCategory.Make("Glfw"); + + internal static readonly ExceptionAggregator ExceptionAggregator = new(); +} diff --git a/Brutal.Glfw/GlobalUsings.cs b/Brutal.Glfw/GlobalUsings.cs new file mode 100644 index 0000000..5cd90e1 --- /dev/null +++ b/Brutal.Glfw/GlobalUsings.cs @@ -0,0 +1,5 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using static Brutal.GlfwApi.Glfw.Constants; +global using Brutal.Numerics; +global using CommunityToolkit.HighPerformance; diff --git a/Brutal.Glfw/LICENSES/BRUTAL-GLFW-THIRD-PARTY-NOTICES.txt b/Brutal.Glfw/LICENSES/BRUTAL-GLFW-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..f7bab84 --- /dev/null +++ b/Brutal.Glfw/LICENSES/BRUTAL-GLFW-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,198 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Glfw + +Brutal.Glfw redistributes the third-party components named below, as native libraries. +Each is reproduced with the license that governs it. +On linux-x64 and osx-arm64 the library ships three times under its soname aliases; those +copies are byte-identical. + +============================================================================== +GLFW +============================================================================== + + Name GLFW, a library for OpenGL context, window and input handling + Version 3.5.1 + built from the RocketWerkz fork, branch rocketwerkz: upstream + 3.5.1 with trackpad gesture, scroll detail and macOS desktop + video mode patches, listed in the fork's ROCKETWERKZ.md + Upstream https://www.glfw.org -- https://github.com/glfw/glfw + fork: https://github.com/RocketWerkz/glfw + SPDX Zlib + Shipped as glfw3.dll (win-x64) + libglfw.so, libglfw.so.3, libglfw.so.3.5 (linux-x64) + libglfw.dylib, libglfw.3.dylib, libglfw.3.5.dylib (osx-arm64) + +Copyright (c) 2002-2006 Marcus Geelnard + +Copyright (c) 2006-2019 Camilla Löwy + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. + +============================================================================== +SDL_GameControllerDB +============================================================================== + + Name SDL_GameControllerDB, the community gamepad mapping database + Version as vendored by GLFW 3.5.1; the database carries no version of + its own + Upstream https://github.com/gabomdq/SDL_GameControllerDB + https://github.com/libsdl-org/SDL + SPDX Zlib + Shipped as glfw3.dll (win-x64) + libglfw.so, libglfw.so.3, libglfw.so.3.5 (linux-x64) + libglfw.dylib, libglfw.3.dylib, libglfw.3.5.dylib (osx-arm64) + + The mappings are compiled into each library as string data. Each library carries the + entries for its own platform, so the three do not hold the same set. + + GLFW states below which of the entries came from the database and on what terms. That + statement is reproduced as GLFW wrote it, together with the notice it introduces. + +All gamepad mappings not labeled GLFW are copied from the +SDL_GameControllerDB project under the following license: + +Simple DirectMedia Layer +Copyright (C) 1997-2013 Sam Lantinga + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the +use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would + be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + +============================================================================== +Wayland protocol descriptions +============================================================================== + + Name 10 Wayland protocol descriptions, compiled to C by wayland-scanner + and linked into the library + Version as vendored by GLFW 3.5.1; the descriptions are not individually + versioned + Upstream https://gitlab.freedesktop.org/wayland/wayland + https://gitlab.freedesktop.org/wayland/wayland-protocols + SPDX MIT, except pointer-gestures-unstable-v1: HPND-sell-variant + Shipped as libglfw.so, libglfw.so.3, libglfw.so.3.5 (linux-x64) only + + The Wayland protocol code is present in the linux-x64 library alone. The win-x64 and + osx-arm64 libraries use their platform's own windowing interfaces and contain none of + it. + + Each description states its own copyright holders, listed here as each states them, + followed by the permission notice all but one of them share; + pointer-gestures-unstable-v1 states a different notice, reproduced after the shared + one. + The descriptions wrap this notice at more than one column. It is reproduced here in + the form used by the majority; the others differ in line breaks only. + + fractional-scale-v1 + Copyright © 2022 Kenny Levinsen + + idle-inhibit-unstable-v1 + Copyright © 2015 Samsung Electronics Co., Ltd + + pointer-constraints-unstable-v1 + Copyright © 2014 Jonas Ådahl + Copyright © 2015 Red Hat Inc. + + pointer-gestures-unstable-v1 + Copyright © 2015, 2021 Red Hat Inc. + + relative-pointer-unstable-v1 + Copyright © 2014 Jonas Ådahl + Copyright © 2015 Red Hat Inc. + + viewporter + Copyright © 2013-2016 Collabora, Ltd. + + wayland + Copyright © 2008-2011 Kristian Høgsberg + Copyright © 2010-2011 Intel Corporation + Copyright © 2012-2013 Collabora, Ltd. + + xdg-activation-v1 + Copyright © 2020 Aleix Pol Gonzalez + Copyright © 2020 Carlos Garnacho + + xdg-decoration-unstable-v1 + Copyright © 2018 Simon Ser + + xdg-shell + Copyright © 2008-2013 Kristian Høgsberg + Copyright © 2013 Rafael Antognolli + Copyright © 2013 Jasper St. Pierre + Copyright © 2010-2013 Intel Corporation + Copyright © 2015-2017 Samsung Electronics Co., Ltd + Copyright © 2015-2017 Red Hat Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +pointer-gestures-unstable-v1 is distributed under its own notice: + +Copyright © 2015, 2021 Red Hat Inc. + +Permission to use, copy, modify, distribute, and sell this +software and its documentation for any purpose is hereby granted +without fee, provided that the above copyright notice appear in +all copies and that both that copyright notice and this permission +notice appear in supporting documentation, and that the name of +the copyright holders not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no +representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied +warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/Brutal.Glfw/Manual/Glfw.PInvoke.cs b/Brutal.Glfw/Manual/Glfw.PInvoke.cs new file mode 100644 index 0000000..96babd3 --- /dev/null +++ b/Brutal.Glfw/Manual/Glfw.PInvoke.cs @@ -0,0 +1,100 @@ +namespace Brutal.GlfwApi; + +public static unsafe partial class Glfw +{ + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "glfwGetCurrentContext")] + private static partial GlfwWindowHandle* _GetCurrentContext(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowHandle* GetCurrentContext() + { + Log.Trace(); + return _GetCurrentContext(); + } + + [LibraryImport(Dll, EntryPoint = "glfwGetProcAddress")] + private static partial nint _GetProcAddress(byte* procName); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetProcAddress(byte* procName) + { + Log.Trace(); + return _GetProcAddress(procName); + } + + // PFN_vkGetInstanceProcAddr is a function pointer value; the generator emits `nint*` + // for typedef'd function pointers, which is incorrect for a by-value parameter. + [LibraryImport(Dll, EntryPoint = "glfwInitVulkanLoader")] + private static partial void _InitVulkanLoader(nint loader); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void InitVulkanLoader(nint loader) + { + Log.Trace(); + _InitVulkanLoader(loader); + } + + // This one is implemented manually to avoid the need for difficult marshaling + [LibraryImport( + Dll, + EntryPoint = "glfwCreateWindow", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static unsafe partial GlfwWindowHandle* _CreateWindow( + int width, + int height, + string title, + GlfwMonitor monitor, + GlfwWindowHandle* share + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GlfwWindowHandle* CreateWindow( + int width, + int height, + string title, + GlfwMonitor monitor, + GlfwWindowHandle* share + ) + { + Log.Trace(); + return _CreateWindow(width, height, title, monitor, share); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwSetClipboardString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static unsafe partial void _SetClipboardString(GlfwWindowHandle* window, string @string); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetClipboardString(GlfwWindowHandle* window, string @string) + { + Log.Trace(); + _SetClipboardString(window, @string); + } + + [LibraryImport( + Dll, + EntryPoint = "glfwGetClipboardString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static unsafe partial string? _GetClipboardString(GlfwWindowHandle* window); + + // Returns null when the clipboard is empty or its contents cannot be converted to UTF-8 + // (GlfwErrorCode.FormatUnavailable) - the CustomStringMarshaller preserves GLFW's NULL + // failure sentinel rather than collapsing it to an empty string. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetClipboardString(GlfwWindowHandle* window) + { + Log.Trace(); + return _GetClipboardString(window); + } + } +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Context.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Context.cs new file mode 100644 index 0000000..63b2123 --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Context.cs @@ -0,0 +1,60 @@ +// Context reference +// https://www.glfw.org/docs/latest/group__context.html + +// Hand-written members of the Context library. GetCurrentContext and GetProcAddress are in the +// generator's ManualMethods set (no P/Invoke is generated for them - see Manual/Glfw.PInvoke.cs), +// so they cannot be generated and live here. The rest of the Context library is generated into +// Generated/Libraries/Glfw.Context.gen.cs and merges into this same partial class. + +namespace Brutal.GlfwApi; + +public static unsafe partial class Glfw +{ + /// Returns the window whose context is current on the calling thread. + /// + /// This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread. + /// + /// The window whose context is current, or null if no window's context is current. + /// + /// + /// + /// This function may be called from any thread. + /// Current context + public static nint GetCurrentContext() + { + return (nint)PInvoke.GetCurrentContext(); + } + + /// Returns the address of the specified function for the current context. + /// + /// This function returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is + /// supported by the current context. + /// + /// A context must be current on the calling thread. Calling this function without a current context will cause a + /// error. + /// + /// This function does not apply to Vulkan. If you are rendering with Vulkan, see + /// GetInstanceProcAddress, + /// InstanceLibrary.GetProcAddr and + /// DeviceLibrary.GetProcAddr instead. + /// + /// The address of a given function is not guaranteed to be the same between contexts. + /// + /// This function may return a non-null address despite the associated version or extension not being available. + /// Always check the context version or extension string first. + /// + /// The address of the function, or null if an error occurred. + /// + /// , + /// , + /// + /// + /// The returned function pointer is valid until the context is destroyed or the library is terminated. + /// This function may be called from any thread. + /// OpenGL and OpenGL ES extensions + public static nint GetProcAddress(ReadOnlySpan procName) + { + fixed (byte* pProcName = procName) + return PInvoke.GetProcAddress(pProcName); + } +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Cursor.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Cursor.cs new file mode 100644 index 0000000..c988dce --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Cursor.cs @@ -0,0 +1,120 @@ +using System.Runtime.InteropServices.Marshalling; + +// Hand-written members of the Cursor library: the GlfwCursor handle type, its custom marshaller, +// and the custom-image CreateCursor factory (which bundles a CreateInfo struct and fixed-pins the +// image - not mechanically derivable). The standard-shape CreateCursor overload is generated into +// Generated/Libraries/Glfw.Cursor.gen.cs and merges into this same partial class. + +namespace Brutal.GlfwApi; + +public static unsafe partial class Glfw +{ + /// Creates a custom cursor. + /// + /// Creates a new custom cursor image that can be set for a window with GlfwWindow.SetCursor + /// . The cursor can be destroyed with GlfwCursor.Dispose. Any remaining cursors are destroyed by + /// . + /// + /// The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel + /// first. They are arranged canonically as packed sequential rows, starting from the top-left corner. + /// + /// The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other + /// coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down. + /// + /// The handle of the new cursor, or null if an error occurred. + /// This function must only be called from the main thread. + /// GlfwCursor.Dispose + /// + /// Cursor objects + /// + /// + /// + /// + /// + public static GlfwCursor CreateCursor(in GlfwCursor.CreateInfo info) + { + fixed (GlfwImage* imagePtr = &info.Image) + { + return PInvoke.CreateCursor(imagePtr, info.Hot.X, info.Hot.Y); + } + } +} + +/// +/// Wrapper around a * +/// +[NativeMarshalling(typeof(GlfwCursorMarshaller))] +public unsafe struct GlfwCursor : IDisposable, INullable +{ + /// + /// Information required to create a custom cursor. + /// + public struct CreateInfo + { + /// + /// The image to use for the cursor. + /// + public GlfwImage Image; + + /// + /// The position of the cursor hotspot, relative to the upper-left corner of the image. + /// + public int2 Hot; + } + + internal GlfwCursor(GlfwCursorHandle* inPointer) + { + Pointer = inPointer; + } + + internal GlfwCursorHandle* Pointer { get; private set; } + + /// + /// Gets the native Glfw handle for this cursor + /// + public nint NativeHandle => (nint)Pointer; + + /// Destroys a cursor. + /// + /// This function destroys a cursor previously created with or + /// . Any remaining cursors are destroyed by . + /// + /// If the specified cursor is current for any window, that window will be reverted to the default cursor. This does + /// not affect the cursor mode. + /// + /// This function must not be called from a callback. + /// This function must only be called from the main thread. + /// + /// Cursor objects + /// + /// + /// + /// + public void Dispose() + { + if (Pointer != null) + { + Glfw.PInvoke.DestroyCursor(this); + Pointer = null; + } + } + + /// Returns whether this cursor handle is null (uninitialised or already destroyed). + /// true if the underlying native handle is null; otherwise false. + public bool IsNull() + { + return Pointer == null; + } +} + +[CustomMarshaller( + managedType: typeof(GlfwCursor), + marshalMode: MarshalMode.Default, + marshallerType: typeof(GlfwCursorMarshaller) +)] +internal static unsafe class GlfwCursorMarshaller +{ + internal static GlfwCursorHandle* ConvertToUnmanaged(GlfwCursor managed) => managed.Pointer; + + internal static GlfwCursor ConvertToManaged(GlfwCursorHandle* unmanaged) => new(unmanaged); +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Initialization.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Initialization.cs new file mode 100644 index 0000000..df9a396 --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Initialization.cs @@ -0,0 +1,264 @@ +// Initialization, version and error reference +// https://www.glfw.org/docs/latest/group__init.html + +// Hand-written members of the Initialization library: the static constructor (native library load, +// DllImportResolver, callback closure wiring), the Initialized state, the error callback wiring, +// Init/Terminate (guarded lifecycle), InitAllocator (delegate rooting), and the version accessors +// (VersionInfo struct packing + property forms). The mechanical SetInitHint and GetError wrappers +// are generated into Generated/Libraries/Glfw.Initialization.gen.cs and merge into this same +// partial class. + +using System.Diagnostics; + +namespace Brutal.GlfwApi; + +/// The function pointer type for error callbacks. +public delegate void GlfwErrorCallback(GlfwErrorCode inError, string inDescription); + +public static unsafe partial class Glfw +{ + internal static bool Initialized { get; private set; } + + // GLFW holds the function pointers marshalled from these delegates for the lifetime of the + // process, so the delegates must stay rooted or the pointers dangle. A static strong + // reference is sufficient for that: the three permanent callbacks live in static readonly + // fields, and allocator callbacks are appended to AllocatorCallbacks. Entries are never + // removed from the list: an allocator installed while the library is initialized keeps + // servicing that init cycle until Terminate, so dropping the previous set on replacement + // would reintroduce the dangling-pointer bug the list exists to prevent. Installing an + // allocator is a once-per-process event in practice, so the retained set stays bounded. + private static readonly GlfwMonitorUnmanagedCallback MonitorUnmanagedCallback; + private static readonly GlfwJoystickUnmanagedCallback JoystickUnmanagedCallback; + private static readonly GlfwErrorUnmanagedCallback ErrorUnmanagedCallback; + private static readonly List AllocatorCallbacks = []; + + static Glfw() + { + // Load the GLFW native library + var glfwNative = NativeLibrary.Load( + OperatingSystem.IsWindows() ? "glfw3" : "glfw", + typeof(Glfw).Assembly, + DllImportSearchPath.AssemblyDirectory + ); + + // Assign the native library to the assembly resolver + NativeLibrary.SetDllImportResolver( + typeof(Glfw).Assembly, + (libraryName, _, _) => + { + // We should only be resolving the GLFW library, any other name is unexpected + Debug.Assert(libraryName == "glfw", "Unexpected library name requested for resolution."); + + return glfwNative; + } + ); + + MonitorUnmanagedCallback = (GlfwMonitorUnmanagedCallback)( + (monitor, eventType) => + { + try + { + MonitorCallback?.Invoke(new GlfwMonitor(monitor), (GlfwMonitorEvent)eventType); + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in the monitor callback.", ex); + } + } + ); + + JoystickUnmanagedCallback = (GlfwJoystickUnmanagedCallback)( + (joystick, eventType) => + { + try + { + JoystickCallback?.Invoke(joystick, (GlfwJoystickEvent)eventType); + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in the joystick callback.", ex); + } + } + ); + + ErrorUnmanagedCallback = (GlfwErrorUnmanagedCallback)( + (error, description) => + { + try + { + if (ErrorCallback != null) + { + var desc = Marshal.PtrToStringUTF8((nint)description) ?? string.Empty; + ErrorCallback.Invoke((GlfwErrorCode)error, desc); + } + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in the error callback.", ex); + } + } + ); + + PInvoke.SetErrorCallback(ErrorUnmanagedCallback); + } + + /// Sets the error callback. + /// + /// This function sets the error callback, which is called with an error code and a human-readable description + /// each time a GLFW error occurs. + /// + /// The error code is set before the callback is called. Calling from the error + /// callback will return the same value as the error code argument. + /// + /// The error callback is called on the thread where the error occurred. If you are using GLFW from multiple + /// threads, your error callback needs to be written accordingly. + /// + /// Once set, the error callback remains set even after the library has been terminated. + /// + /// This function may be called before . + /// + /// This function must only be called from the main thread. + /// Error handling + public static event GlfwErrorCallback? ErrorCallback; + + /// Sets the init allocator to the desired value. + /// + /// This function sets the memory allocator that GLFW uses for all internal allocations. The allocator is picked + /// up at the beginning of initialization, i.e. by the next call to , and stays in use until + /// that init cycle is ended by . + /// + /// GLFW copies the callback pointers before this function returns; the wrapper keeps the managed delegates + /// rooted for the remaining lifetime of the process, so the caller does not need to hold references to them. + /// + /// This function may be called before . + /// + /// The memory allocation callback. Must return a valid pointer or null to signal failure. + /// The memory reallocation callback. + /// The memory deallocation callback. + /// An opaque pointer passed back to every callback invocation. + /// Any of the three callbacks is null. + /// This function must only be called from the main thread. + /// Custom heap memory allocator + public static void InitAllocator( + GlfwAllocateUnmanagedCallback allocate, + GlfwReallocateUnmanagedCallback reallocate, + GlfwDeallocateUnmanagedCallback deallocate, + void* user = null + ) + { + ArgumentNullException.ThrowIfNull(allocate); + ArgumentNullException.ThrowIfNull(reallocate); + ArgumentNullException.ThrowIfNull(deallocate); + + AllocatorCallbacks.Add(allocate); + AllocatorCallbacks.Add(reallocate); + AllocatorCallbacks.Add(deallocate); + + var allocator = new GlfwAllocator + { + AllocateCallback = Marshal.GetFunctionPointerForDelegate(allocate), + ReallocateCallback = Marshal.GetFunctionPointerForDelegate(reallocate), + DeallocateCallback = Marshal.GetFunctionPointerForDelegate(deallocate), + User = user, + }; + + PInvoke.InitAllocator(&allocator); + } + + /// Initializes the GLFW library. + /// + /// This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, + /// and before an application terminates GLFW should be terminated in order to free any resources allocated during + /// or after initialization. + /// + /// If this function fails, it calls before returning. If it succeeds, you should call + /// before the application exits. + /// + /// Additional calls to this function after successful initialization but before termination will return + /// true immediately. + /// + /// true if successful, or false if an error occurred. + /// + /// + /// + /// This function must only be called from the main thread. + /// Initialization and termination + public static bool Init() + { + if (Initialized) + return true; + + Initialized = PInvoke.Init() == Constants.GLFW_TRUE; + if (Initialized) + { + PInvoke.SetMonitorCallback(MonitorUnmanagedCallback); + PInvoke.SetJoystickCallback(JoystickUnmanagedCallback); + } + + return Initialized; + } + + /// Terminates the GLFW library. + /// + /// This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any + /// other allocated resources. Once this function is called, you must again call successfully + /// before you will be able to use most GLFW functions. + /// + /// If GLFW has been successfully initialized, this function should be called before the application exits. + /// If initialization fails, there is no need to call this function, as it is called by before + /// it returns failure + /// + /// This function has no effect if GLFW is not initialized. + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// Initialization and termination + public static void Terminate() + { + if (Initialized) + { + PInvoke.Terminate(); + Initialized = false; + } + } + + public struct VersionInfo + { + public int Major; + public int Minor; + public int Revision; + } + + /// Retrieves the version of the GLFW library. + /// + /// This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you + /// are using GLFW as a shared library and want to ensure that you are using the minimum required version. + /// + /// This function may be called before + /// + /// Major, Minor, Revision. + /// Version management + /// This function may be called from any thread. + public static VersionInfo Version + { + get + { + PInvoke.GetVersion(out var major, out var minor, out var rev); + return new VersionInfo + { + Major = major, + Minor = minor, + Revision = rev, + }; + } + } + + /// Returns a string describing the compile-time configuration. + /// This function may be called from any thread. + /// Version management + // glfwGetVersionString always returns a valid static string, so the null-preserving marshaller's + // nullable return can be safely forgiven here. + public static string VersionString => PInvoke.GetVersionString()!; +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Input.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Input.cs new file mode 100644 index 0000000..d1aad56 --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Input.cs @@ -0,0 +1,239 @@ +// Input reference +// https://www.glfw.org/docs/latest/group__input.html + +// Hand-written members of the Input library: the managed callback delegate types, the +// JoystickCallback event, GetJoystickHats (ptr+count -> ReadOnlySpan with a Span.Cast to enum, +// not yet a generator transform), the clipboard accessors (glfwGet/SetClipboardString are in +// ManualMethods and hardcode a null window), and the Time property (Get/Set pairing -> property, +// not yet a generator transform). The mechanical wrappers - including the non-cast span returns +// GetJoystickAxes/GetJoystickButtons - are generated into Generated/Libraries/Glfw.Input.gen.cs +// and merge into this same partial class. + +namespace Brutal.GlfwApi; + +/// The function pointer type for mouse button callbacks. +/// GlfwWindow.OnMouseButton +/// Mouse button input +/// The window that received the event. +/// The mouse button that was pressed or released. +/// One of or . +/// Bit field describing which modifier keys were held down. +public delegate void GlfwMouseButtonCallback( + GlfwWindow window, + GlfwMouseButton button, + GlfwButtonAction action, + GlfwModifier mods +); + +/// The function pointer type for cursor position callbacks. +/// GlfwWindow.OnCursorPos +/// Cursor position +/// The window that received the event. +/// The new cursor coordinates, relative to the left edge of the content area. +public delegate void GlfwCursorPosCallback(GlfwWindow window, double2 pos); + +/// The function pointer type for cursor enter/leave callbacks. +/// GlfwWindow.OnCursorEnter +/// Cursor enter/leave events +/// The window that received the event. +/// +/// if the cursor entered the window's content area, or +/// if it left it. +/// +public delegate void GlfwCursorEnterCallback(GlfwWindow window, bool entered); + +/// The function pointer type for scroll callbacks. +/// GlfwWindow.OnScroll +/// Scroll input +/// The window that received the event. +/// The scroll offset. +public delegate void GlfwScrollCallback(GlfwWindow window, double2 offset); + +/// The function pointer type for scroll detail callbacks. +/// GlfwWindow.OnScrollDetail +/// Scroll input +/// The window that received the event. +/// The scroll offset, zero when the event only marks a gesture boundary. +/// Where the offset came from and which gesture phase it belongs to. +public delegate void GlfwScrollDetailCallback(GlfwWindow window, double2 offset, GlfwScrollFlags flags); + +/// The function pointer type for trackpad zoom callbacks. +/// GlfwWindow.OnTrackpadZoom +/// The window that received the event. +/// The zoom since the previous event, as a factor to multiply the current scale by. +public delegate void GlfwTrackpadZoomCallback(GlfwWindow window, double scale); + +/// The function pointer type for trackpad rotate callbacks. +/// GlfwWindow.OnTrackpadRotate +/// The window that received the event. +/// The rotation since the previous event, in degrees, positive counter-clockwise. +public delegate void GlfwTrackpadRotateCallback(GlfwWindow window, double angle); + +/// The function pointer type for keyboard key callbacks. +/// GlfwWindow.OnKey +/// Key input +/// The window that received the event. +/// The keyboard key that was pressed or released. +/// The system-specific scancode of the key. +/// +/// , or +/// . Future releases may add more actions. +/// +/// Bit field describing which modifier keys were held down. +public delegate void GlfwKeyCallback( + GlfwWindow window, + GlfwKey key, + int scancode, + GlfwKeyAction action, + GlfwModifier mods +); + +/// The function pointer type for Unicode character callbacks. +/// GlfwWindow.OnChar +/// Text input +/// The window that received the event. +/// The Unicode code point of the character. +public delegate void GlfwCharCallback(GlfwWindow window, uint codepoint); + +/// The function pointer type for Unicode character with modifiers callbacks. +/// GlfwWindow.OnCharMods +/// Text input +/// The window that received the event. +/// The Unicode code point of the character. +/// Bit field describing which modifier keys were held down. +public delegate void GlfwCharModsCallback(GlfwWindow window, uint codepoint, GlfwModifier mods); + +/// The function pointer type for path drop callbacks. +/// GlfwWindow.OnDrop +/// Path drop input +/// The window that received the event. +/// The number of dropped paths. +/// An array of UTF-8 encoded file and directory path names. +public delegate void GlfwDropCallback(GlfwWindow window, int count, string[] paths); + +/// The function pointer type for joystick configuration callbacks. +/// Glfw.JoystickCallback +/// Joystick configuration changes +/// The joystick that was connected or disconnected. +/// +/// One of or +/// . Future releases may add more events. +/// +public delegate void GlfwJoystickCallback(int inJoystickId, GlfwJoystickEvent inEvent); + +public static unsafe partial class Glfw +{ + /// Sets the joystick configuration callback. + /// + /// This function sets the joystick configuration callback, or removes the currently set callback. This is called when + /// a joystick is connected to or disconnected from the system. + /// + /// For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the + /// event processing functions. Joystick + /// disconnection may also be detected and the callback called by joystick functions. The function will then return + /// whatever it returns if the joystick is not present. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Joystick configuration changes + /// + /// + /// + public static event GlfwJoystickCallback? JoystickCallback; + + /// Returns the state of all hats of the specified joystick. + /// + /// This function returns the state of all hats of the specified joystick. + /// + /// The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can + /// test for these individually by ANDing it with the corresponding direction. + /// + /// If the specified joystick is not present this function will return null but will not generate an error. This + /// can be used instead of first calling Glfw.JoystickPresent. + /// + /// The joystick ID to query. + /// An array of hat states, or null if the joystick is not present or an error occurred. + /// Joystick hat states + /// + /// + /// + /// + /// + public static ReadOnlySpan GetJoystickHats(int joystickId) + { + return new ReadOnlySpan(PInvoke.GetJoystickHats(joystickId, out var count), count).Cast< + byte, + GlfwJoystickHat + >(); + } + + /// Sets the clipboard to the specified string. + /// + /// This function sets the system clipboard to the specified, UTF-8 encoded string. + /// + /// The string to set the clipboard to. + /// + /// Clipboard input and output + /// + /// + /// + /// + public static void SetClipboard(string @string) + { + PInvoke.SetClipboardString(null, @string); + } + + /// Returns the contents of the clipboard as a string. + /// + /// This function returns the contents of the system clipboard, if it contains or is convertible to a UTF-8 encoded + /// string. If the clipboard is empty or if its contents cannot be converted, is returned and + /// a error is generated. + /// + /// + /// The contents of the clipboard, or if the clipboard is empty, its contents cannot be + /// converted, or an error occurred. + /// + /// This function must only be called from the main thread. + /// + /// Clipboard input and output + /// + /// + /// + /// + /// + public static string? Clipboard + { + get => PInvoke.GetClipboardString(null); + set + { + ArgumentNullException.ThrowIfNull(value); + PInvoke.SetClipboardString(null, value); + } + } + + /// Returns the GLFW time. + /// + /// This function returns the current GLFW time, in seconds. Unless the time has been set using + /// it measures time elapsed since GLFW was initialized. + /// + /// This function and are helper functions on top of and + /// . + /// + /// The resolution of the timer is system dependent, but is usually on the order of a few micro- or nanoseconds. It + /// uses the highest-resolution monotonic time source on each supported platform. + /// + /// The current time, in seconds, or zero if an error occurred. + /// + /// This function may be called from any thread. Reading and writing of the internal base time is not atomic, + /// so it needs to be externally synchronized with calls to . + /// + /// Time input + /// + /// + /// + public static double Time + { + get => PInvoke.GetTime(); + set => PInvoke.SetTime(value); + } +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Monitor.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Monitor.cs new file mode 100644 index 0000000..b86b953 --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Monitor.cs @@ -0,0 +1,228 @@ +// Monitor reference +// https://www.glfw.org/docs/latest/group__monitor.html + +// Hand-written members of the Monitor library: the GlfwMonitor handle struct scaffolding + its +// marshaller, the monitor-configuration callback delegate/event, GetMonitors (span - deferred), +// and the instance members not yet covered by a generator transform: Position/PhysicalSize/ +// ContentScale (out-params -> vector), GetMonitorWorkArea (4 outs -> 2 vectors), Size (computed), +// VideoModes (span), VideoMode (pointer deref), and GammaRamp (GlfwGammaRampView get/set). The +// basic members - PrimaryMonitor, Name, UserPointer, SetGamma - are generated into +// Generated/Libraries/Glfw.Monitor.gen.cs and merge into these same partial declarations. + +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.GlfwApi; + +/// The function pointer type for monitor configuration callbacks. +/// The monitor that was connected or disconnected. +/// +/// One of or +/// . +/// +/// +/// Monitor configuration changes +public delegate void GlfwMonitorCallback(GlfwMonitor monitor, GlfwMonitorEvent eventType); + +public static unsafe partial class Glfw +{ + /// Sets the monitor configuration function. + /// + /// This function sets the monitor configuration callback, or removes the currently set callback. This is called when a + /// monitor is connected to or disconnected from the system. + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// Monitor configuration changes + public static event GlfwMonitorCallback? MonitorCallback; +} + +/// +/// Wrapper around a * +/// +[NativeMarshalling(typeof(GlfwMonitorMarshaller))] +public readonly unsafe partial struct GlfwMonitor : INullable +{ + public static readonly GlfwMonitor Null = new(null); + + internal GlfwMonitor(GlfwMonitorHandle* inPointer) + { + Pointer = inPointer; + } + + internal GlfwMonitorHandle* Pointer { get; } + + /// + /// Gets the native Glfw handle for this monitor + /// + public nint NativeHandle => (nint)Pointer; + + public bool IsNull() + { + return Pointer == null; + } + + /// Retrieves the work area of the monitor. + /// + /// This function returns the position, in screen coordinates, of the upper-left corner of the work area of the + /// monitor along with the work area size in screen coordinates. The work area is defined as the area + /// of the monitor not occluded by the operating system task bar where present. If no task bar exists then the + /// work area is the monitor resolution in screen coordinates. + /// + /// If an error occurs, all values are set to zero. + /// + /// + /// , + /// + /// + /// This function must only be called from the main thread. + /// Work area + public void GetMonitorWorkArea(out int2 pos, out int2 size) + { + Glfw.PInvoke.GetMonitorWorkArea(this, out var x, out var y, out var w, out var h); + pos = new int2(x, y); + size = new int2(w, h); + } + + public int2 Size + { + get + { + var videoMode = VideoMode; + return new int2(videoMode.Width, videoMode.Height); + } + } + + /// Returns the current mode of the monitor. + /// + /// This function returns the current video mode of the monitor. If you have created a full screen window for + /// that monitor, the return value will depend on whether that window is iconified. + /// + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// VideoModes + /// Video modes + public GlfwVidMode VideoMode + { + get + { + var videoMode = Glfw.PInvoke.GetVideoMode(this); + return videoMode != null ? *videoMode : default; + } + } + + /// Gets/Sets the current gamma ramp for the monitor. + /// + /// The getter returns the current gamma ramp of the monitor, or an empty view if an error occurred. The view + /// is valid until the monitor is disconnected, the gamma ramp is read again for that monitor or the library + /// is terminated. + /// + /// The setter sets the current gamma ramp for the monitor. The original gamma ramp for that monitor is + /// saved by GLFW the first time the ramp is set and is restored by glfwTerminate. The specified gamma ramp + /// is copied before the setter returns. + /// + /// The software controlled gamma ramp is applied in addition to the hardware gamma correction, which today is usually + /// an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the + /// default (usually sRGB-like) behavior. + /// + /// For gamma correct rendering with OpenGL or OpenGL ES, see the GLFW_SRGB_CAPABLE hint. + /// + /// The setter was given an empty ramp. + /// + /// + /// + /// + /// This function must only be called from the main thread. + /// Gamma ramp + public GlfwGammaRampView GammaRamp + { + get + { + var ramp = Glfw.PInvoke.GetGammaRamp(this); + if (ramp == null) + return default; + + var size = (int)ramp->Size; + return new GlfwGammaRampView( + new ReadOnlySpan(ramp->Red, size), + new ReadOnlySpan(ramp->Green, size), + new ReadOnlySpan(ramp->Blue, size) + ); + } + set + { + if (value.IsEmpty) + throw new ArgumentException("Cannot set an empty gamma ramp.", nameof(value)); + + fixed (ushort* red = value.Red) + fixed (ushort* green = value.Green) + fixed (ushort* blue = value.Blue) + { + var ramp = new GlfwGammaRamp + { + Red = red, + Green = green, + Blue = blue, + Size = (uint)value.Size, + }; + Glfw.PInvoke.SetGammaRamp(this, &ramp); + } + } + } +} + +/// Describes the gamma ramp for a monitor. +/// +/// Views returned by borrow memory owned by GLFW; see that +/// property for the lifetime rules. +/// +/// +/// Gamma ramp +public readonly ref struct GlfwGammaRampView +{ + /// Creates a gamma ramp view over three equal-length channel buffers. + /// The response of the red channel. + /// The response of the green channel. + /// The response of the blue channel. + /// The channels are not all the same length. + public GlfwGammaRampView(ReadOnlySpan red, ReadOnlySpan green, ReadOnlySpan blue) + { + if (red.Length != green.Length || red.Length != blue.Length) + throw new ArgumentException("Gamma ramp channels must all be the same length."); + + Red = red; + Green = green; + Blue = blue; + } + + /// The response of the red channel. + public ReadOnlySpan Red { get; } + + /// The response of the green channel. + public ReadOnlySpan Green { get; } + + /// The response of the blue channel. + public ReadOnlySpan Blue { get; } + + /// The number of elements in each channel. + public int Size => Red.Length; + + /// Whether the view holds no data. + public bool IsEmpty => Red.IsEmpty; +} + +[CustomMarshaller( + managedType: typeof(GlfwMonitor), + marshalMode: MarshalMode.Default, + marshallerType: typeof(GlfwMonitorMarshaller) +)] +internal static unsafe class GlfwMonitorMarshaller +{ + internal static GlfwMonitorHandle* ConvertToUnmanaged(GlfwMonitor managed) => managed.Pointer; + + internal static GlfwMonitor ConvertToManaged(GlfwMonitorHandle* unmanaged) => new(unmanaged); +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Vulkan.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Vulkan.cs new file mode 100644 index 0000000..ee3a8d7 --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Vulkan.cs @@ -0,0 +1,63 @@ +// Vulkan support reference +// https://www.glfw.org/docs/latest/group__vulkan.html + +// Hand-written member of the Vulkan library. CreateWindowSurface fixed-pins the out-parameter into +// a pointer and hardcodes a null allocator - not mechanically derivable - so it stays here. The +// rest of the Vulkan library is generated into Generated/Libraries/Glfw.Vulkan.gen.cs and merges +// into this same partial class. + +namespace Brutal.GlfwApi; + +public static unsafe partial class Glfw +{ + /// Creates a Vulkan surface for the specified window. + /// + /// This function creates a Vulkan surface for the specified window. + /// + /// If the Vulkan loader or at least one minimally functional ICD were not found, this function returns + /// VK_ERROR_INITIALIZATION_FAILED and generates a error. Call + /// Glfw.VulkanSupported to check whether Vulkan is at least minimally available. + /// + /// If the required window surface creation instance extensions are not available or the specified instance was not + /// created with these extensions enabled, + /// this function returns VK_ERROR_EXTENSION_NOT_PRESENT and generates a error. Call + /// GetRequiredInstanceExtensions to check what instance extensions + /// are required. + /// + /// The window surface cannot be shared with another API so the window must have been created with the + /// hint set to otherwise it + /// generates a error and returns VK_ERROR_NATIVE_WINDOW_IN_USE_KHR. + /// + /// The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the + /// caller to destroy the window surface. GLFW does not destroy it for you. + /// Call vkGetInstanceProcAddr on the surface to destroy it. + /// + /// If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for + /// the error. Appropriate use of Glfw.VulkanSupported and + /// GetRequiredInstanceExtensions should eliminate + /// almost all occurrences of this error. + /// + /// macOS: GLFW prefers the VK_EXT_metal_surface extension, with the VK_MVK_macos_surface extension + /// as a fallback. The VK_EXT_metal_surface extension is the preferred extension for macOS and is the only + /// one that supports Metal. + /// + /// macOS: This function creates and sets a CAMetalLayer instance for the window content view, which is + /// required for MoltenVK to function. + /// + /// + /// , + /// , + /// , + /// + /// + /// This function may be called from any thread. + /// Creating a Vulkan window surface + public static int CreateWindowSurface(nint instance, GlfwWindow window, out ulong surface) + { + fixed (ulong* surfacePtr = &surface) + { + // Call the internal function to create the window surface + return PInvoke.CreateWindowSurface(instance, window, null, surfacePtr); + } + } +} diff --git a/Brutal.Glfw/Manual/Libraries/Glfw.Window.cs b/Brutal.Glfw/Manual/Libraries/Glfw.Window.cs new file mode 100644 index 0000000..aa01247 --- /dev/null +++ b/Brutal.Glfw/Manual/Libraries/Glfw.Window.cs @@ -0,0 +1,1721 @@ +// Window reference +// https://www.glfw.org/docs/latest/group__window.html + +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.GlfwApi; + +/// The function pointer type for window position callbacks +/// The window that was moved. +/// +/// The new coordinates, in screen coordinates, of the upper-left corner of the client area of the +/// window. +/// +/// +/// Window position +public delegate void GlfwWindowPosCallback(GlfwWindow window, int2 pos); + +/// The function pointer type for window size callbacks +/// The window that was resized. +/// The new size, in screen coordinates, of the window. +/// +/// Window size +public delegate void GlfwWindowSizeCallback(GlfwWindow window, int2 size); + +/// The function pointer type for window close callbacks +/// The window that the user attempted to close. +/// +/// Window closing and close flag +public delegate void GlfwWindowCloseCallback(GlfwWindow window); + +/// The function pointer type for window content refresh callbacks +/// The window whose content needs to be refreshed. +/// +/// Window damage and refresh +public delegate void GlfwWindowRefreshCallback(GlfwWindow window); + +/// The function pointer type for window focus callbacks +/// The window that gained or lost input focus. +/// Enumerator describing the focus event. +/// +/// Window input focus +public delegate void GlfwWindowFocusCallback(GlfwWindow window, GlfwFocusEvent focusEvent); + +/// The function pointer type for window iconify callbacks +/// The window that was iconified or restored. +/// Enumerator describing the iconify event. +/// +/// Window iconification +public delegate void GlfwWindowIconifyCallback(GlfwWindow window, GlfwIconifyEvent iconifyEvent); + +/// The function pointer type for window maximize callbacks +/// The window that was maximized or restored. +/// Enumerator describing the maximize event. +/// +/// Window maximization +public delegate void GlfwWindowMaximizeCallback(GlfwWindow window, GlfwMaximizeEvent maximizeEvent); + +/// The function pointer type for framebuffer size callbacks +/// The window whose framebuffer was resized. +/// The new size, in pixels, of the framebuffer. +/// +/// Framebuffer size +public delegate void GlfwFramebufferSizeCallback(GlfwWindow window, int2 size); + +/// The function pointer type for window content scale callbacks +/// The window whose content scale changed. +/// The new content scale of the window. +/// +/// Window content scale +public delegate void GlfwWindowContentScaleCallback(GlfwWindow window, float2 scale); + +public static partial class Glfw +{ + /// Creates a window and its associated context. + /// The handle of the created window, or null if an error occurred. + /// + /// This function creates a window and its associated OpenGL or OpenGL ES context. Most of the options controlling + /// how the window and its context should be created are specified with + /// window hints. + /// + /// Successful creation does not change which context is current. Before you can use the nely created context, you need + /// to make it current. For + /// information about the share parameter, see + /// Context object sharing. + /// + /// The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are + /// hard constraints. This includes + /// the + /// size of the window, especially for full screen windows. To query the actual attributes of the created window, + /// framebuffer + /// and context, see GlfwWindow.GetAttribute, + /// GlfwWindow.Size and GlfwWindow.FramebufferSize. + /// + /// To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, + /// the window will be windowed mode. Unless you have a way for the user to choose a specific monitor, it is + /// recommended + /// you pick the primary monitor. For more information on how to query connected monitors, see + /// Retrieving monitors. + /// + /// For full screen windows, the specified size becomes the resolution of the window's desired video mode. As + /// long as the full screen window is not iconified, the supported video mode most closely matching the desired video + /// mode + /// is set for the specified monitor. For more information about full screen windows, including the creation of so + /// called + /// windowed full screen or borderless full screen windows, see + /// + /// "Windowed full screen" + /// windows + /// + /// . + /// + /// Once you have created the window, you can switch it between windowed and full screen mode with + /// GlfwWindow.SetWindowed + /// and GlfwWindow.SetFullscreen. This will not affect its OpenGL or OpenGL ES context. + /// + /// By default, newly created windows uses the placement recommended by the window system. To create the window at a + /// specified position, make it initially invisible using the window hint, set + /// its position and then + /// show it. + /// + /// As long as at least once full screen window is not iconified, the screensaver is prohibited from starting. + /// + /// Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the + /// window + /// system on creation. Check the actual + /// size + /// after creation. + /// + /// The swap interval is not set during + /// window creation and the initial value may vary depending on driver settings and defaults. + /// + /// + /// + /// Window creation will fail if the Microsoft GDI software OpenGL implementation is the only one available. + /// + /// If the executable has an icon resource named GLFW_ICON, it will be set as the initial icon for the + /// window. + /// If no such icon is present, the IDE_APPLICATION icon will be used instead. To set a different icon, + /// see + /// GlfwWindow.SetIcon. + /// + /// The context to share resources must not be current on any other thread. + /// + /// + /// + /// + /// + /// The OS only supports forward-compatible core profile contexts for OpenGL versions 3.2 and later. Before + /// creating an OpenGL context of version 3.2 or later you must set the + /// + /// and hints accordingly. OpenGL 3.0 and 3.1 contexts are + /// not supported + /// at all on macOS. + /// + /// + /// The GLFW window has no icon, as it is not a document window, but the dock icon will be the same as the + /// application bundle's icon. For more information on bundles, see the + /// + /// Bundle + /// Programming Guide + /// + /// in the Mac Developer Library. + /// + /// + /// The first time a window is created the menu bar is created. If GLFW finds a MainMenu.nib it is + /// loaded and assumed to contain a menu bar. Otherwise a minimal menu bar is created manually with common + /// commands like + /// Hide, Quit and About. The About entry opens a minimal about dialog with information from the application's + /// bundle. + /// Menu bar creation can be disabled entirely with the init hint. + /// + /// + /// On OS X 10.10 and later the window frame will not be rendered at full resolution on Retina displays + /// unless the hint is true and the + /// NSHighResolutionCapable + /// key is enabled in the application bundle's Info.plist. For more information, see + /// + /// High + /// Resolution Guidelines for OS X + /// + /// in the Mac Developer Library. The GLFW test and example programs use a custom Info.plist template + /// for this, + /// which can be found as CMake/MacOSXBundleInfo.plist.in in the source tree. + /// + /// + /// When activating frame autosaving with , the specified window + /// size and position may be overridden by previously saved values. + /// + /// + /// + /// + /// + /// Some window managers will not respect the placement of initially hidden windows. + /// + /// Due to the asynchronous nature of X1, it may take a moment for a window to reach its requested + /// state. This means you may not be able to query the final size, position or other attributes directly after + /// window creation. + /// + /// + /// The class part of the WM_CLASS window property will by default be set to the window title + /// passed to this function. The instance part will use the contents of the RESOURCE_NAME environment + /// variable, + /// if present and not empty, or fall back to the window title. Set the + /// + /// and window hints to override this. + /// + /// + /// + /// + /// + /// + /// Compositors should implement the xdg-decoration protocol for GLFW to decorate the window properly. + /// If this protocol isn't supported, or if the compositor prefers client-side decorations, a very simple + /// fallback + /// frame will be drawn using the wp_viewporter protocol. A compositor can still emit close, maximize or + /// fullscreen events, using + /// for instance a keybind mechanism. + /// + /// + /// A full screen window will not attempt to change the mode, no matter what the requested size or + /// refresh rate. + /// + /// Screensaver inhibition requires the idle-inhibit protocol to be implemented in the user's compositor. + /// + /// + /// This function must only be called from the main thread. + /// + /// , + /// , + /// , + /// , + /// , + /// , + /// , + /// + /// + /// GlfwWindow.Dispose + /// Window creation + public static GlfwWindow CreateWindow(in GlfwWindow.CreateInfo info) + { + return new GlfwWindow(info); + } + + /// Processes all pending events. + /// + /// This function processes only those events that are already in the event queue and then returns immediately. + /// Processing events will cause the window and input callbacks associated with those events to be called. + /// + /// On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to + /// how event processing is designed on those platforms. You can use the + /// window refresh callback to + /// redraw the contents of your window when necessary during such operations. + /// + /// Do not assume that callbacks you set will only be called in response to event processing functions like this + /// one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own + /// can + /// pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the + /// application + /// callbacks before returning. + /// + /// Event processing is not required for joystick input to work. + /// + /// This function must not be called from a callback. + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// Glfw.WaitEvents + /// Glfw.WaitEventsTimeout + /// Event processing + public static void PollEvents() + { + PInvoke.PollEvents(); + ExceptionAggregator.CheckExceptions(); + } +} + +/// +/// A window created by the GLFW library. +/// +[NativeMarshalling(typeof(GlfwWindowMarshaller))] +public sealed unsafe partial class GlfwWindow : IDisposable, INullable +{ + /// + /// Details for creating a . + /// + public struct CreateInfo + { + /// + /// The title of the window. + /// + public required string Title; + + /// + /// The size of the window in pixels. + /// + public required int2 Size; + + /// + /// The monitor to use for full screen windows. + /// + public GlfwMonitor Monitor; + + /// + /// A window to share resources with. + /// + public GlfwWindow? Share; + } + + internal GlfwWindowHandle* Pointer { get; private set; } + private readonly GCHandle[] _callbackHandles; + + internal GlfwWindow(CreateInfo info) + { + Pointer = Glfw.PInvoke.CreateWindow( + info.Size.X, + info.Size.Y, + info.Title, + info.Monitor, + info.Share is null ? null : info.Share.Pointer + ); + + if (Pointer is null) + { + var errorCode = Glfw.GetError(out var errorDescription); + var message = + errorCode == GlfwErrorCode.NoError + ? "Failed to create window." + : $"Failed to create window: {errorCode} ({errorDescription})."; + throw new InvalidOperationException(message); + } + + _title = info.Title; + _size = info.Size; + _monitor = info.Monitor; + + GlfwWindowSizeUnmanagedCallback onWindowSize = (_, width, height) => + { + try + { + _size = new int2(width, height); + OnSize?.Invoke(this, _size); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnSize callback", ex); + } + }; + GlfwWindowRefreshUnmanagedCallback onRefresh = _ => + { + try + { + Refresh(); + OnRefresh?.Invoke(this); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnRefresh callback", ex); + } + }; + GlfwWindowPosUnmanagedCallback onPosition = (_, xPos, yPos) => + { + try + { + _position = new int2(xPos, yPos); + OnPosition?.Invoke(this, _position); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnPosition", ex); + } + }; + GlfwWindowMaximizeUnmanagedCallback onMaximize = (_, maximizedEvent) => + { + try + { + _isMaximised = maximizedEvent != GLFW_FALSE; + OnMaximize?.Invoke(this, (GlfwMaximizeEvent)maximizedEvent); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnMaximize callback", ex); + } + }; + GlfwWindowIconifyUnmanagedCallback onIconify = (_, iconifiedEvent) => + { + try + { + _isIconified = iconifiedEvent != GLFW_FALSE; + OnIconify?.Invoke(this, (GlfwIconifyEvent)iconifiedEvent); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnIconify callback", ex); + } + }; + GlfwWindowFocusUnmanagedCallback onFocus = (_, focusEvent) => + { + try + { + _isFocused = focusEvent != GLFW_FALSE; + OnFocus?.Invoke(this, (GlfwFocusEvent)focusEvent); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnFocus callback", ex); + } + }; + GlfwWindowContentScaleUnmanagedCallback onContentScale = (_, xScale, yScale) => + { + try + { + _contentScale = new float2(xScale, yScale); + OnContentScale?.Invoke(this, _contentScale); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnContentScale callback", ex); + } + }; + GlfwWindowCloseUnmanagedCallback onClose = _ => + { + try + { + _shouldClose = true; + OnClose?.Invoke(this); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnClose callback", ex); + } + }; + GlfwScrollUnmanagedCallback onScroll = (_, xOffset, yOffset) => + { + try + { + OnScroll?.Invoke(this, new double2(xOffset, yOffset)); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnScroll callback", ex); + } + }; + GlfwScrollDetailUnmanagedCallback onScrollDetail = (_, xOffset, yOffset, flags) => + { + try + { + OnScrollDetail?.Invoke(this, new double2(xOffset, yOffset), (GlfwScrollFlags)flags); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnScrollDetail callback", ex); + } + }; + GlfwTrackpadZoomUnmanagedCallback onTrackpadZoom = (_, scale) => + { + try + { + OnTrackpadZoom?.Invoke(this, scale); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnTrackpadZoom callback", ex); + } + }; + GlfwTrackpadRotateUnmanagedCallback onTrackpadRotate = (_, angle) => + { + try + { + OnTrackpadRotate?.Invoke(this, angle); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnTrackpadRotate callback", ex); + } + }; + GlfwMouseButtonUnmanagedCallback onMouseButton = (_, button, action, mods) => + { + try + { + OnMouseButton?.Invoke(this, (GlfwMouseButton)button, (GlfwButtonAction)action, (GlfwModifier)mods); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnMouseButton callback", ex); + } + }; + GlfwKeyUnmanagedCallback onKey = (_, key, scanCode, action, mods) => + { + try + { + OnKey?.Invoke(this, (GlfwKey)key, scanCode, (GlfwKeyAction)action, (GlfwModifier)mods); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnKey callback", ex); + } + }; + GlfwFramebufferSizeUnmanagedCallback onFramebufferSize = (_, width, height) => + { + try + { + _framebufferSize = new int2(width, height); + OnFramebufferSize?.Invoke(this, _framebufferSize); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnFramebufferSize callback", ex); + } + }; + GlfwCursorPosUnmanagedCallback onCursorPos = (_, xPos, yPos) => + { + try + { + _cursorPos = new double2(xPos, yPos); + OnCursorPos?.Invoke(this, _cursorPos); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnCursorPos callback", ex); + } + }; + GlfwCursorEnterUnmanagedCallback onCursorEnter = (_, enteredEvent) => + { + try + { + OnCursorEnter?.Invoke(this, enteredEvent != GLFW_FALSE); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnCursorEnter callback", ex); + } + }; + GlfwDropUnmanagedCallback onDrop = (_, count, paths) => + { + try + { + if (OnDrop == null) + return; + var pathArray = new string[count]; + for (var i = 0; i < count; i++) + pathArray[i] = Marshal.PtrToStringUTF8((nint)paths[i]) ?? string.Empty; + OnDrop.Invoke(this, count, pathArray); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnDrop callback", ex); + } + }; + GlfwCharUnmanagedCallback onChar = (_, point) => + { + try + { + OnChar?.Invoke(this, (char)point); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnChar callback", ex); + } + }; + GlfwCharModsUnmanagedCallback onCharMods = (_, point, mods) => + { + try + { + OnCharMods?.Invoke(this, (char)point, (GlfwModifier)mods); + } + catch (Exception ex) + { + Glfw.ExceptionAggregator.Push("Error in Window.OnCharMods callback", ex); + } + }; + + // pinning the callbacks to prevent them from being garbage collected + _callbackHandles = + [ + GCHandle.Alloc(onWindowSize), + GCHandle.Alloc(onRefresh), + GCHandle.Alloc(onPosition), + GCHandle.Alloc(onMaximize), + GCHandle.Alloc(onIconify), + GCHandle.Alloc(onFocus), + GCHandle.Alloc(onContentScale), + GCHandle.Alloc(onClose), + GCHandle.Alloc(onScroll), + GCHandle.Alloc(onScrollDetail), + GCHandle.Alloc(onTrackpadZoom), + GCHandle.Alloc(onTrackpadRotate), + GCHandle.Alloc(onMouseButton), + GCHandle.Alloc(onKey), + GCHandle.Alloc(onFramebufferSize), + GCHandle.Alloc(onCursorPos), + GCHandle.Alloc(onCursorEnter), + GCHandle.Alloc(onDrop), + GCHandle.Alloc(onChar), + GCHandle.Alloc(onCharMods), + ]; + + Glfw.PInvoke.SetWindowSizeCallback(this, onWindowSize); + Glfw.PInvoke.SetWindowRefreshCallback(this, onRefresh); + Glfw.PInvoke.SetWindowPosCallback(this, onPosition); + Glfw.PInvoke.SetWindowMaximizeCallback(this, onMaximize); + Glfw.PInvoke.SetWindowIconifyCallback(this, onIconify); + Glfw.PInvoke.SetWindowFocusCallback(this, onFocus); + Glfw.PInvoke.SetWindowContentScaleCallback(this, onContentScale); + Glfw.PInvoke.SetWindowCloseCallback(this, onClose); + Glfw.PInvoke.SetScrollCallback(this, onScroll); + Glfw.PInvoke.SetScrollDetailCallback(this, onScrollDetail); + Glfw.PInvoke.SetTrackpadZoomCallback(this, onTrackpadZoom); + Glfw.PInvoke.SetTrackpadRotateCallback(this, onTrackpadRotate); + Glfw.PInvoke.SetMouseButtonCallback(this, onMouseButton); + Glfw.PInvoke.SetKeyCallback(this, onKey); + Glfw.PInvoke.SetFramebufferSizeCallback(this, onFramebufferSize); + Glfw.PInvoke.SetCursorPosCallback(this, onCursorPos); + Glfw.PInvoke.SetCursorEnterCallback(this, onCursorEnter); + Glfw.PInvoke.SetDropCallback(this, onDrop); + Glfw.PInvoke.SetCharCallback(this, onChar); + Glfw.PInvoke.SetCharModsCallback(this, onCharMods); + + Refresh(); + } + + /// + /// Gets the native Glfw handle for this window + /// + public nint NativeHandle => (nint)Pointer; + + /// Sets/gets the title of the window + /// + /// This property gets/ssets the window title, encoded as UTF-8, of the window. + /// + /// This property must only be invoked from the main thread. + /// + /// , + /// + /// + /// Window title + public string Title + { + get => _title; + set + { + Glfw.PInvoke.SetWindowTitle(this, value); + RefreshTitle(); + } + } + + /// Gets/sets the position of the content area of the window + /// + /// This property gets/sets the position, in screen coordinates, of the upper-left corner of the content area of the + /// windowed mode window. If the window is a full screen window, this property does nothing. + /// + /// Do not use this property to move an already visible window unless you have very good reasons for doing so, + /// as it will confuse and annoy the user. + /// + /// The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits. + /// + /// + /// There is no way for an application to get/set the global position of its windows, this property will always emit + /// . + /// + /// This property must only be invoked from the main thread. + /// + /// , + /// + /// + /// Window position + public int2 Position + { + get => _position; + set + { + if (value == _position) + return; + Glfw.PInvoke.SetWindowPos(this, value.X, value.Y); + } + } + + /// The X coordinate of the window's top-left corner, in screen coordinates. + public int X + { + get => _position.X; + set => Position = new int2(value, Y); + } + + /// The Y coordinate of the window's top-left corner, in screen coordinates. + public int Y + { + get => _position.Y; + set => Position = new int2(X, value); + } + + /// Retrieves the size of the content area of the window + /// + /// This function gets/sets the size, in screen coordinates, of the content area of the window. If you wish + /// to retrieve the size of the framebuffer of the window in pixels, see GlfwWindow.FramebufferSize. + /// + /// For full screen windows, this function updates the resolution of its desired video mode and switches to the video + /// mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the + /// framebuffer remain unchanged. + /// + /// If you wish to update the refresh rate of the desired video mode in addition to its resolution, see + /// GlfwWindow.SetFullscreen. + /// + /// The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits. + /// + /// + /// A full screen window will not attempt to change the mode, no matter what the requested size. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// GlfwWindow.Size + /// Window size + /// Sets the size of the content area of the window + public int2 Size + { + get => _size; + set + { + if (value == _size) + return; + Glfw.PInvoke.SetWindowSize(this, value.X, value.Y); + } + } + + /// The width of the window's content area, in screen coordinates. + public int Width + { + get => _size.X; + set => Size = new int2(value, Height); + } + + /// The height of the window's content area, in screen coordinates. + public int Height + { + get => _size.Y; + set => Size = new int2(Width, value); + } + + /// Retrieves the size of the framebuffer of the window + /// + /// This function retrieves the size, in pixels, of the framebuffer of the window. If you wish to retrieve + /// the size of the window in screen coordinates, see GlfwWindow.Size. + /// + /// Any or all of the size arguments may be null. If an error occurs, the values of the size arguments will + /// be set to zero. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// Framebuffer size + public int2 FramebufferSize => _framebufferSize; + + /// Gets/sets the aspect ratio of the window + /// + /// This function sets the required aspect ratio of the content area of the window. If the window is full + /// screen, the aspect ratio only takes effect once it is made windowed. If the window is not resizable, this function + /// does nothing. + /// + /// The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For + /// example, the common 16:9 aspect ratio is specified as 16 and 9, respectively. + /// + /// If the numerator and denominator is set to then the aspect ratio limit is + /// disabled. + /// + /// The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized. + /// + /// If you set size limits and an aspect ratio that conflict, the results are undefined. + /// + /// + /// The aspect ratio will not be applied until the window is actually resized, either by the user or by the compositor. + /// + /// This function must only be called from the main thread. + /// + /// , + /// , + /// + /// + /// GlfwWindow.SetSizeLimits + /// Window size limits + public float AspectRatio + { + get => _framebufferSize.Y == 0 ? 0f : _framebufferSize.X / (float)_framebufferSize.Y; + set + { + var numerator = (int)(_framebufferSize.Y * value); + var denominator = _framebufferSize.Y; + Glfw.PInvoke.SetWindowAspectRatio(this, numerator, denominator); + } + } + + /// Gets the content scale + /// + /// This function retrieves the content scale for the window. The content scale is the ratio between the + /// current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the + /// pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable + /// size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling + /// settings being somewhat correct. + /// + /// ON systems where each monitors can have its own content scale, the window content scale will depend on which + /// monitor + /// the system considers the window to be on. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// GlfwMonitor.ContentScale + /// Window content scale + public float2 ContentScale => _contentScale; + + /// Gets/sets the position of the cursor relative to the content area of the window. + /// + /// This function sets/gets the position of the cursor, in screen coordinates, relative to the upper-left corner of the + /// content area of the specified window. + /// + /// The window must have input focus when setting this property. If the window does not have input focus + /// when this function is called, it fails silently. + /// + /// If the cursor is then the cursor position is unbounded and limited only by + /// the minimum and maximum values of a double. + /// + /// The coordinate can be converted to their integer equivalents with the floor function. Casting directly to an + /// integer type works for positive coordinates, but fails for negative ones. + /// + /// If an error occurs, the returned position will be 0, 0. + /// + /// Do not use this function to implement things like camera controls. GLFW already provides the + /// cursor mode that hides the cursor, transparently re-centers it and provides + /// unconstrained cursor motion. See GlfwWindow.SetInputMode for more information. + /// + /// If the cursor mode is then the cursor position is unconstrained and limited + /// only by the minimum and maximum values of a double. + /// + /// The desired position of the cursor, relative to the top-left edge of the content area. + /// + /// This function will only work when the cursor mode is , otherwise it will + /// do nothing. + /// + /// This function must only be called from the main thread. + /// Cursor position + /// + /// + /// + /// + public double2 CursorPos + { + get => _cursorPos; + set + { + if (value == _cursorPos) + return; + Glfw.PInvoke.SetCursorPos(this, value.X, value.Y); + } + } + + /// The X coordinate of the cursor, relative to the top-left of the window's content area. + public double CursorX + { + get => _cursorPos.X; + set => CursorPos = new double2(value, CursorY); + } + + /// The Y coordinate of the cursor, relative to the top-left of the window's content area. + public double CursorY + { + get => _cursorPos.Y; + set => CursorPos = new double2(CursorX, value); + } + + /// Gets/sets the opacity of the whole window + /// + /// This function gets/sets the opacity of the window, including any decorations. + /// + /// The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and + /// one is fully opaque. If the system does not support whole window transparency, this function always returns one. + /// + /// The initial opacity value for newly created windows is one. + /// + /// The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent + /// and one is fully opaque. If the system does not support whole window transparency, this function always returns + /// one. + /// + /// A window created with framebuffer transparency may not use whole window transparency. The results of doing this + /// are undefined. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// GlfwWindow.Opacity + /// Window transparency + public float Opacity + { + get => _opacity; + set + { + if (Math.Abs(value - _opacity) < 0.00001f) + return; + Glfw.PInvoke.SetWindowOpacity(this, value); + RefreshOpacity(); + } + } + + /// Returns the monitor that the window uses for full screen mode + /// + /// This function returns the handle of the monitor that the window is in full screen on. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// GlfwWindow.SetFullscreen + /// GlfwWindow.SetWindowed + /// Window monitor + public GlfwMonitor Monitor + { + get => _monitor; + set + { + if (value.Pointer == _monitor.Pointer) + return; + + if (value.IsNull()) + { + SetWindowed(Position, Size); + } + else + { + SetFullscreen(value, Size, GLFW_DONT_CARE); + } + } + } + + private GlfwMonitor _monitor; + + /// True if the window is currently maximised to fill the available screen area. + public bool IsMaximised => _isMaximised; + + /// True if the window is currently iconified (minimised) to the taskbar or dock. + public bool IsIconified => _isIconified; + + /// True if the window currently has input focus. + public bool IsFocused => _isFocused; + + /// True if the window is currently in full screen mode on a monitor. + public bool IsFullscreen => Monitor.IsNotNull(); + + /// True if the window is currently in windowed (non-full-screen) mode. + public bool IsWindowed => !IsFullscreen; + + /// Checks/sets the close flag of the window + /// + /// Setting this can be used to override the user's attempt to close the window, or to signal that it should be closed. + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// + /// + /// Window closing and close flag + public bool ShouldClose + { + get => _shouldClose; + set + { + if (value == _shouldClose) + return; + Glfw.PInvoke.SetWindowShouldClose(this, value ? GLFW_TRUE : GLFW_FALSE); + _shouldClose = Glfw.PInvoke.WindowShouldClose(this) != GLFW_FALSE; + } + } + + /// Gets/sets the user pointer of the window + /// + /// This function returns the current value of the user-defined pointer of the window. The initial value is + /// null. + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// + /// + /// Window user pointer + /// Sets the user pointer of the window + /// + /// This function sets the user-defined pointer of the window. The current value is retained until the window + /// is destroyed. The initial value is null. + /// + /// This function may be called from any thread. Access is not synchronized. + /// + /// + /// + /// Window user pointer + public void* UserPointer + { + get => _userPointer; + set + { + if (_userPointer == value) + return; + Glfw.PInvoke.SetWindowUserPointer(this, value); + RefreshUserPointer(); + } + } + + /// Makes the window visible/hidden + /// + /// This function makes the window visible/hidden if it was previously hidden/visible. If the window is already hidden/visible, + /// or is in full screen mode, this function does nothing. + /// + /// By default, windowed mode windows are focused when shown. Set the window + /// hint to change this behaviour for all newly created windows, or change the behaviour for an existing window with + /// GlfwWindow.SetAttribute. + /// + /// + /// Because Wayland wants every frame of the desktop to be complete, this function does not immediately make the + /// window visible. Instead it will become visible the next time the window framebuffer is updated after this call. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// Window visibility + public bool Visible + { + get => _isVisible; + set + { + if (Visible == value) + return; + + if (value) + Glfw.PInvoke.ShowWindow(this); + else + Glfw.PInvoke.HideWindow(this); + RefreshVisible(); + } + } + + private string _title; + private int2 _position; + private int2 _size; + private double2 _cursorPos; + private int2 _framebufferSize; + private float2 _contentScale; + private bool _shouldClose; + private bool _isMaximised; + private bool _isIconified; + private bool _isFocused; + private bool _isVisible; + private float _opacity; + private void* _userPointer; + + /// Destroy the window and its context + /// + /// This function destroys the window and its context. On calling this function, no further callbacks will + /// be called for that + /// + /// If the context of the window is current on the main thread, it is detached before being destroyed. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// GlfwWindow.GlfwWindow + /// Window creation + public void Dispose() + { + if (Pointer != null) + { + Glfw.PInvoke.DestroyWindow(this); + Pointer = null; + } + + foreach (var handle in _callbackHandles) + { + if (handle.IsAllocated) + handle.Free(); + } + } + + /// Returns whether this window handle is null (uninitialised or already destroyed). + /// true if the underlying native handle is null; otherwise false. + public bool IsNull() + { + return Pointer == null; + } + + /// Sets the icon + /// + /// This function sets the icon of the window. If passed an array of candidate images, those of or closest + /// to the sizes desired by the system are selected. If no images are specified, the window reverts to its default + /// icon. + /// + /// The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel + /// first. + /// They are arranged canonically as packed sequential rows, starting from the top-left corner. + /// + /// The desired image sizes varies depending on platform and system settings. The selected images will be rescaled as + /// needed. Good sizes include 16x16, 32x32, and 48x48. + /// + /// + /// The GLFW window has no icon, as it is a document window, so this function does nothing. The dock icon will be the + /// same as the application bundle's icon. For more information on bundles, see the + /// + /// Bundle + /// Programming Guide + /// + /// in the Mac Developer Library. + /// + /// + /// There is no existing protocol to change an icon, the window will thus inherit the one defined in the application's + /// desktop file. This function always emits . + /// + /// This function must only be called from the main thread. + /// + /// , + /// , + /// + /// + /// Window icon + public void SetIcon(int count, GlfwImage image) + { + Glfw.PInvoke.SetWindowIcon(this, count, &image); + } + + /// Set the size limits of the window + /// + /// This function sets the size limits of the content area of the window. If the window is full screen, the + /// size limits only take effect once it is made windowed. If the window is not resizable, this function does nothing. + /// + /// The size limits are applied immediately to a windowed mode window and may cause it to be resized. + /// + /// The maximum dimensions must be greater than or equal to the minimum dimensions and all must be greater than or + /// equal to zero. + /// + /// If you set size limits and an aspect ratio that conflict, the results are undefined. + /// + /// The size limits will not be applied until the window is actually resized, either by the user or by the + /// compositor. + /// + /// + /// This function must only be called from the main thread. + /// + /// , + /// , + /// + /// + /// GlfwWindow.AspectRatio + /// Window size limits + public void SetSizeLimits(int2 minSize, int2 maxSize) + { + Glfw.PInvoke.SetWindowSizeLimits(this, minSize.X, minSize.Y, maxSize.X, maxSize.Y); + } + + /// Sets a window into full-screen mode + /// + /// This function sets the monitor that the window uses for full screen mode. + /// + /// This function updates the width, height and refresh rate of the desired video mode and switches to the video mode + /// closest to it. + /// + /// If you only wish to update the resolution of a full screen window, see GlfwWindow.Size. + /// + /// + /// + /// The OpenGL or OpenGL ES context will not be destroyed or otherwise affected by any resizing or mode switching, + /// although you may need to update your viewport if the framebuffer size has changed. + /// + /// + /// Setting the window to full screen will not attempt to change the mode, no matter what the requested size or + /// refresh rate. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// GlfwWindow.SetWindowed + /// GlfwWindow.Monitor + /// GlfwWindow.Size + /// Window monitor + /// Full screen windows + public void SetFullscreen(GlfwMonitor monitor, int2 size, int refreshRate) + { + if (monitor.IsNull()) + throw new ArgumentNullException(nameof(monitor)); + + Glfw.PInvoke.SetWindowMonitor(this, monitor, 0, 0, size.X, size.Y, refreshRate); + RefreshMonitor(); + } + + /// Sets the window into windowed mode + /// + /// This function sets the window into windowed mode. + /// + /// The position, width and height are used to place the window content area. + /// + /// If you only wish to update the size of a windowed window, see GlfwWindow.Size. + /// + /// When a window transitions from full screen to windowed mode, this function restores any previous window settings + /// such as whether it is decorated ,floating, resizable, has size or aspect ratio limits, etc. + /// + /// + /// The OpenGL or OpenGL ES context will not be destroyed or otherwise affected by any resizing or mode switching, + /// although you may need to update your viewport if the framebuffer size has changed. + /// + /// + /// The desired window position is ignored, as there is no way for an application to set this properly. + /// + /// This function must only be called from the main thread. + /// + /// , + /// + /// + /// GlfwWindow.SetFullscreen + /// GlfwWindow.GetMonitor + /// GlfwWindow.Size + public void SetWindowed(int2 pos, int2 size) + { + Glfw.PInvoke.SetWindowMonitor(this, default, pos.X, pos.Y, size.X, size.Y, 0); + RefreshMonitor(); + } + + /// Returns an attribute of the window + /// + /// This function returns the value of an attribute of the window + /// + /// Framebuffer related hints are not window attributes. See + /// Framebuffer related attributes + /// for more information. + /// + /// Zero is a valid value for many windows related attributes so you cannot use a return value of zero as + /// indication of errors. However, this function should not fail as long as it passed valid arguments and the library + /// has been initialized. + /// + /// + /// The Wayland protocol provides no way to check whether a window is iconified, so + /// + /// will always return zero. + /// + /// This function must only be called from the main thread. + /// + /// , + /// , + /// + /// + /// GlfwWindow.SetAttribute + /// Window attributes + public int GetAttribute(GlfwWindowAttribute attribute) + { + return Glfw.PInvoke.GetWindowAttrib(this, (int)attribute); + } + + /// Returns an attribute of the window's context + /// + /// This function returns the value of an attribute of the window's OpenGL or OpenGL ES context. + /// + /// Framebuffer related hints are not window attributes. See + /// Framebuffer related attributes + /// for more information. + /// + /// Zero is a valid value for many context related attributes so you cannot use a return value of zero as + /// indication of errors. However, this function should not fail as long as it passed valid arguments and the library + /// has been initialized. + /// + /// This function must only be called from the main thread. + /// + /// , + /// , + /// + /// + /// GlfwWindow.SetAttribute + /// Window attributes + public int GetAttribute(GlfwContextAttribute attribute) + { + return Glfw.PInvoke.GetWindowAttrib(this, (int)attribute); + } + + /// + /// Blocks the calling thread, pumping events, until the window's framebuffer has a non-zero size. + /// Useful for waiting out an iconified (minimised) state before resuming rendering. + /// + public void WaitForWindow() + { + while (true) + { + Glfw.PInvoke.WaitEvents(); + if (FramebufferSize is { X: > 0, Y: > 0 }) + break; + } + } + + /// + /// Centers the window to the specified monitor. + /// + public void CenterToMonitor(GlfwMonitor monitor) + { + var monitorSize = monitor.Size; + var monitorPos = monitor.Position; + + Position = new int2(monitorPos.X + (monitorSize.X - Size.X) / 2, monitorPos.Y + (monitorSize.Y - Size.Y) / 2); + } + + /// Sets the Unicode character callbacks + /// + /// This function sets the character callback of the window, which is called when a Unicode character is + /// input. + /// + /// The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout + /// dependent, whereas the key callback is not. Characters do not map 1:1 to physical + /// keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was + /// pressed or released, see the key callback instead. + /// + /// The character callback behaves as system text input normally does and will not be called if modifier keys are held + /// down that would prevent normal text input on that platform, for example a Super (Command) key on macOS or Alt key + /// on Windows. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Text input + /// + /// + /// + public event GlfwCharCallback? OnChar; + + /// Sets the Unicode character with modifiers callbacks + /// + /// This function sets the character with modifiers callback of the window, which is called when a Unicode + /// character is input regardless of what modifier keys are used. + /// + /// The character with modifiers callback is intended for implementing custom Unicode character input. For regular + /// Unicode text input, see the character callback. Like the character callback, the + /// character with modifiers callback deals with characters and is keyboard layout dependent. Characters do not map 1:1 + /// to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific + /// physical key was pressed or released, see the key callback instead. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Text input + /// + /// + /// + public event GlfwCharModsCallback? OnCharMods; + + /// Sets the cursor enter/leave callback + /// + /// This function sets the cursor boundary crossing callback of the window, which is called when the cursor + /// enters or leaves the content area of the + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Cursor enter/leave events + /// + /// + /// + public event GlfwCursorEnterCallback? OnCursorEnter; + + /// Sets the cursor position callback + /// + /// This function sets the cursor position callback of the window, which is called when the cursor is moved. + /// The callback is provided with the position, in screen coordinates, relative to the upper-left corner of the content + /// area of the + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Cursor position + /// + /// + /// + public event GlfwCursorPosCallback? OnCursorPos; + + /// Sets the path drop callback + /// + /// This function sets the path drop callback of the window, which is called when one or more dragged paths + /// are dropped on the window. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// File drop is currently unimplemented. + /// This function must only be called from the main thread. + /// Path drop input + /// + /// + /// + public event GlfwDropCallback? OnDrop; + + /// Sets the framebuffer resize callback + /// + /// This function sets the framebuffer resize callback of the window, which is called when the framebuffer + /// of the window is resized. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Framebuffer size + public event GlfwFramebufferSizeCallback? OnFramebufferSize; + + /// Sets the key callback + /// + /// This function sets the key callback of the window, which is called when a key is pressed, repeated or + /// released. + /// + /// The key functions deal with physical keys, with layout independent + /// key tokens named after their values in the + /// standard US keyboard layout. If you want to input text, use the + /// character callback instead. + /// + /// When a window loses input focus, it will generate synthetic key release events for all pressed keys with associated + /// key tokens. You can tell these events from user-generated events by the fact that the synthetic ones are generated + /// after the focus loss event has been processed, i.e. after the + /// window focus callback has been called. + /// + /// The scancode of a key is specific to that platform or sometimes even to that machine. Scancodes are intended to + /// allow users to bind keys that don't have a GLFW key token. Such keys have key set to + /// , their state is not saved and so it cannot be queried with GlfwWindow.GetKey. + /// + /// Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Key input + /// + /// + /// + public event GlfwKeyCallback? OnKey; + + /// Sets the mouse button callback + /// + /// This function sets the mouse button callback of the window, which is called when a mouse button is + /// pressed or released. + /// + /// When a window loses input focus, it will generate synthetic mouse button release events for all pressed mouse + /// buttons. You can tell these events from user-generated events by the fact that the synthetic ones are generated + /// after the focus loss event has been processed, i.e. after the + /// window focus callback has been called. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Mouse button input + /// + /// + /// + public event GlfwMouseButtonCallback? OnMouseButton; + + /// Sets the scroll callback + /// + /// This function sets the scroll callback of the window, which is called when a scrolling device is used, + /// such as a mouse wheel or scrolling area of a touchpad. + /// + /// The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area. + /// + /// The previously set callback, or null if no callback was set or the library had not been initialized. + /// This function must only be called from the main thread. + /// Scroll input + /// + /// + /// + public event GlfwScrollCallback? OnScroll; + + /// Sets the scroll detail callback + /// + /// This event receives the same scrolling input as , together with flags describing + /// whether the offset came from a trackpad and which gesture phase it belongs to. + /// + /// When a gesture begins or ends, the event may also be raised with a zero offset so that the gesture + /// boundary is reported; is not raised for these. An end may arrive without a + /// matching begin when a gesture is cancelled before it starts. + /// + /// Only macOS reports flags. Other platforms raise this event with the same offsets as + /// and no flags set. + /// + /// This function must only be called from the main thread. + /// Scroll input + /// + /// + /// + public event GlfwScrollDetailCallback? OnScrollDetail; + + /// Sets the trackpad zoom callback + /// + /// This event is raised when a pinch gesture is made on a trackpad. The scale is a factor to multiply the + /// current zoom by. It is reported on macOS and Wayland. + /// + /// This function must only be called from the main thread. + /// + /// + /// + public event GlfwTrackpadZoomCallback? OnTrackpadZoom; + + /// Sets the trackpad rotate callback + /// + /// This event is raised when a two-finger rotate gesture is made on a trackpad. The angle is in degrees since + /// the previous event, positive counter-clockwise. It is reported on macOS and Wayland. + /// + /// This function must only be called from the main thread. + /// + /// + /// + public event GlfwTrackpadRotateCallback? OnTrackpadRotate; + + /// Sets the close callback + /// + /// This function sets the close callback of the window, which is called when the user attempts to close the + /// window, for example by clicking the close widget in the title bar. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window closing and close flag + public event GlfwWindowCloseCallback? OnClose; + + /// Sets the window content scale callback + /// + /// This function sets the window content scale callback of the window, which is called when the content + /// scale of the window changes. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window content scale + public event GlfwWindowContentScaleCallback? OnContentScale; + + /// Sets the focus callback + /// + /// This function sets the focus callback of the window, which is called when the window gains or loses input + /// focus. + /// + /// After the focus callback is called for a window that lost input focus, synthetic key and mouse button release + /// events + /// will be generated for all such that had been pressed. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window input focus + public event GlfwWindowFocusCallback? OnFocus; + + /// Sets the iconify callback + /// + /// This function sets the iconification callback of the window, which is called when the window is iconified + /// or restored. + /// + /// + /// The XDG-shell protocol has no event for iconification, so this callback will never be called. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window iconification + public event GlfwWindowIconifyCallback? OnIconify; + + /// Sets the maximize callback + /// + /// This function sets the maximization callback of the window, which is called when the window is maximized + /// or restored. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window maximization + public event GlfwWindowMaximizeCallback? OnMaximize; + + /// Sets the position callback + /// + /// This function sets the position callback of the window, which is called when the window is moved. The + /// callback is provided with the position, in screen coordinates, of the upper-left corner of the content area of + /// the + /// + /// + /// This callback will never be called, as there is no way for an application to know its global position. + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window position + public event GlfwWindowPosCallback? OnPosition; + + /// Sets the refresh callback + /// + /// This function sets the refresh callback of the window, which is called when the content area of the + /// window needs to be redrawn, for example if the window has been exposed after being covered by another + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window damage and refresh + public event GlfwWindowRefreshCallback? OnRefresh; + + /// Sets the size callback + /// + /// This function sets the size callback of the window, which is called when the window is resized. The + /// callback + /// is provided with the size, in screen coordinates, of the content area of the + /// + /// This function must only be called from the main thread. + /// + /// + /// + /// Window size + public event GlfwWindowSizeCallback? OnSize; + + private void RefreshPosition() + { + Glfw.PInvoke.GetWindowPos(this, out var posX, out var posY); + _position = new int2(posX, posY); + } + + private void RefreshTitle() + { + // A window always has a title (required at creation, always set via the Title setter), so + // glfwGetWindowTitle reads back a non-null value; forgive the null-preserving marshaller here. + _title = Glfw.PInvoke.GetWindowTitle(this)!; + } + + private void RefreshMonitor() + { + _monitor = Glfw.PInvoke.GetWindowMonitor(this); + } + + private void RefreshSize() + { + RefreshMonitor(); + Glfw.PInvoke.GetWindowSize(this, out var width, out var height); + _size = new int2(width, height); + Glfw.PInvoke.GetFramebufferSize(this, out var fbWidth, out var fbHeight); + _framebufferSize = new int2(fbWidth, fbHeight); + Glfw.PInvoke.GetWindowContentScale(this, out var scaleX, out var scaleY); + _contentScale = new float2(scaleX, scaleY); + } + + private void RefreshCursorPos() + { + Glfw.PInvoke.GetCursorPos(this, out var cursorX, out var cursorY); + _cursorPos = new double2(cursorX, cursorY); + } + + private void RefreshShouldClose() + { + _shouldClose = Glfw.PInvoke.WindowShouldClose(this) == GLFW_TRUE; + } + + private void RefreshVisible() + { + _isVisible = GetAttribute(GlfwWindowAttribute.Visible) == GLFW_TRUE; + } + + private void RefreshMaximised() + { + _isMaximised = GetAttribute(GlfwWindowAttribute.Maximized) == GLFW_TRUE; + } + + private void RefreshIconified() + { + _isIconified = GetAttribute(GlfwWindowAttribute.Iconified) == GLFW_TRUE; + } + + private void RefreshFocused() + { + _isFocused = GetAttribute(GlfwWindowAttribute.Focused) == GLFW_TRUE; + } + + private void RefreshOpacity() + { + _opacity = Glfw.PInvoke.GetWindowOpacity(this); + } + + private void RefreshUserPointer() + { + _userPointer = Glfw.PInvoke.GetWindowUserPointer(this); + } + + /// + /// Refresh all cached properties of the window from the native implementation. + /// + public void Refresh() + { + RefreshPosition(); + RefreshTitle(); + RefreshSize(); + RefreshCursorPos(); + RefreshShouldClose(); + RefreshVisible(); + RefreshMaximised(); + RefreshIconified(); + RefreshFocused(); + RefreshOpacity(); + RefreshUserPointer(); + } +} + +[CustomMarshaller( + managedType: typeof(GlfwWindow), + marshalMode: MarshalMode.ManagedToUnmanagedIn, + marshallerType: typeof(GlfwWindowMarshaller) +)] +internal static unsafe class GlfwWindowMarshaller +{ + internal static GlfwWindowHandle* ConvertToUnmanaged(GlfwWindow? managed) + { + return managed != null ? managed.Pointer : null; + } +} diff --git a/Brutal.Gli/Gli.cs b/Brutal.Gli/Gli.cs new file mode 100644 index 0000000..3a689ae --- /dev/null +++ b/Brutal.Gli/Gli.cs @@ -0,0 +1,379 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; +using Brutal.Numerics; + +#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value + +namespace Brutal.GliApi; + +/// +/// A library providing interop for basic functionality of the Gli texture library +/// +public static partial class Gli +{ + /// + /// Representation of a native gli::texture* + /// + [NativeMarshalling(typeof(NativeTextureMarshaller))] + public sealed unsafe class Texture : INullable, IDisposable + { + internal Texture(nint impl) + { + Impl = impl; + // A null handle means the native load/create failed. Accessing Levels here would + // dereference the null native pointer, so leave the row-pitch cache empty and let + // callers detect the failure via IsNull(). + _rowPitch = impl != 0 ? new long[Levels] : []; + } + + ~Texture() + { + Release(); + } + + /// + /// Create an empty texture + /// + /// The created native texture + public Texture() + : this(PInvoke.createEmpty()) { } + + /// + /// Load a texture from a file. Returns an empty handle in case of failure. + /// + public Texture(string filePath) + : this(PInvoke.load(filePath)) { } + + /// + /// Load a texture from memory. Returns an empty handle in case of failure. + /// + public Texture(ReadOnlySpan data) + : this(PInvoke.loadFromMemory(data, data.Length)) { } + + /// + /// Create a texture object and allocate a texture storage for it + /// + /// Type/Shape of the texture storage_linear + /// Texel format + /// Size of the texture: width, height and depth. + /// Number of one-dimensional or two-dimensional images of identical size and format + /// 6 for cube map textures otherwise 1. + /// Number of images in the texture mipmap chain. + /// A mechanism to swizzle the components of a texture before they are applied according to the texture environment. + /// The created native texture + public Texture( + Target target, + Format format, + int3 extent, + long layers, + long faces, + long levels, + Swizzles swizzles + ) + : this(PInvoke.create(target, format, extent, layers, faces, levels, swizzles)) { } + + /// + /// Create a texture object by sharing an existing texture storage_type from another texture instance. + /// + /// + /// This texture object is effectively a texture view where the layer, the face and the level allows identifying + /// a specific subset of the texture storage_linear source, and where the target and format can be reinterpreted + /// with a different compatible texture target and texture format. + /// + /// The texture to share the storage_type from + /// Type/Shape of the texture storage_linear + /// Texel format + /// The base layer of the texture instance + /// The max layer of the texture instance + /// The base face of the texture instance + /// The max face of the texture instance + /// The base level of the texture instance + /// The max level of the texture instance + /// A mechanism to swizzle the components of a texture before they are applied according to the texture environment. + /// The created native texture + public Texture( + Texture texture, + Target target, + Format format, + long baseLayer, + long maxLayer, + long baseFace, + long maxFace, + long baseLevel, + long maxLevel, + Swizzles swizzles + ) + : this( + PInvoke.createFromExistingSubset( + texture, + target, + format, + baseLayer, + maxLayer, + baseFace, + maxFace, + baseLevel, + maxLevel, + swizzles + ) + ) { } + + /// + /// Create a texture object by sharing an existing texture storage_type from another texture instance. + /// + /// + /// This texture object is effectively a texture view where the target and format can be reinterpreted + /// with a different compatible texture target and texture format. + /// + /// The texture to share the storage from + /// Type/Shape of the texture storage + /// Texel format + /// A mechanism to swizzle the components of a texture before they are applied according to the texture environment. + /// The created native texture + public Texture(Texture texture, Target target, Format format, Swizzles swizzles) + : this(PInvoke.createFromExisting(texture, target, format, swizzles)) { } + + public bool IsNull() => Impl == 0; + + public void Dispose() + { + Release(); + GC.SuppressFinalize(this); + } + + private void Release() + { + // Atomically claim the handle so that only one caller (a racing Dispose or the + // finalizer) can ever hand it to native release, preventing a double-free. + var impl = Interlocked.Exchange(ref Impl, 0); + if (impl != 0) + PInvoke.release(impl); + } + + internal nint Impl; + private byte* _data; + private long _size; + private int3 _extent; + private Format _format; + private long _layers; + private long _levels; + private long _faces; + private Target _target; + private int3 _blockExtent; + private bool? _isCompressed; + private long _blockSize; + private readonly long[] _rowPitch; + + /// + /// Returns a pointer to the beginning of the texture instance data. + /// + public byte* Data => _data = _data != null ? _data : PInvoke.data(this); + + /// + /// Returns the memory size of the instance data in bytes. + /// + public long Size => _size = _size != 0 ? _size : PInvoke.size(this); + + /// + /// Returns pointer to the image data for a single level, layer and face. + /// + /// Level to retrieve data for + /// Layer to retrieve data for + /// Face to retrieve data for + /// + public byte* ImageData(int level, int layer = 0, int face = 0) => PInvoke.imagedata(this, level, layer, face); + + /// + /// Returns the size in bytes of a specified mip level of the texture + /// + /// The level whose size you require + /// The size in bytes of the level + public long ImageSize(int level) => PInvoke.levelsize(this, level); + + /// + /// Return the size of a texture instance: width, height and depth. + /// + public int3 Extent => _extent = _extent != default ? _extent : PInvoke.extent(this); + + /// + /// Return the extent of a specified mip level. The value is in texels. + /// + /// mip level of extent to return + /// The extent + public int3 ImageExtent(int level) => PInvoke.extent(this, level); + + /// + /// Gets the row pitch for a mip level + /// + /// Level to get + /// Row pitch in bytes + public long ImageRowPitch(int level) => + _rowPitch[level] = _rowPitch[level] != 0 ? _rowPitch[level] : PInvoke.rowpitch(this, level); + + /// + /// Returns the size of a "block" in bytes. Block can be a compressed block or texel. + /// + public long BlockSize => _blockSize = _blockSize != 0 ? _blockSize : PInvoke.blocksize(this); + + /// + /// Returns whether this texture is in a compressed format. + /// + public bool IsCompressed => _isCompressed ??= PInvoke.iscompressed(this); + + /// + /// Returns the size of a block in texels. + /// + public int3 BlockExtent => _blockExtent = _blockExtent != default ? _blockExtent : PInvoke.blockextent(this); + + /// + /// Returns the texture instance format. + /// + public Format Format => _format = _format != 0 ? _format : PInvoke.format(this); + + /// + /// Returns the number of layers in a texture instance + /// + public long Layers => _layers = _layers != 0 ? _layers : PInvoke.layers(this); + + /// + /// Returns the number of levels in a texture instance + /// + public long Levels => _levels = _levels != 0 ? _levels : PInvoke.levels(this); + + /// + /// Returns the number of faces in a texture instance + /// + public long Faces => _faces = _faces != 0 ? _faces : PInvoke.faces(this); + + /// + /// Returns the target of a texture instance. + /// + public Target Target => _target = _target != 0 ? _target : PInvoke.target(this); + + /// + /// Save a texture storage_linear to a file. + /// + /// Path for where to save the file. It must include the filename and filename extension. + /// + /// The function uses the filename extension included in the path to figure out the file container to use. + /// + /// False if the function fails to save the file. + public bool Save(string filePath) + { + return PInvoke.save(this, filePath); + } + } + + [SuppressMessage("ReSharper", "InconsistentNaming")] + internal static partial class PInvoke + { + [LibraryImport("gli")] + public static unsafe partial nint createEmpty(); + + [LibraryImport("gli")] + public static unsafe partial nint create( + Target target, + Format format, + int3 extent, + long layers, + long faces, + long levels, + Swizzles swizzles + ); + + [LibraryImport("gli")] + public static unsafe partial nint createFromExistingSubset( + Texture texture, + Target target, + Format format, + long baseLayer, + long maxLayer, + long baseFace, + long maxFace, + long baseLevel, + long maxLevel, + Swizzles swizzles + ); + + [LibraryImport("gli")] + public static unsafe partial nint createFromExisting( + Texture texture, + Target target, + Format format, + Swizzles swizzles + ); + + [LibraryImport("gli", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool8 save(Texture texture, string filePath); + + [LibraryImport("gli")] + public static unsafe partial void release(nint texture); + + [LibraryImport("gli", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial nint load(string fileName); + + [LibraryImport("gli")] + public static unsafe partial nint loadFromMemory(ReadOnlySpan data, long size); + + [LibraryImport("gli")] + public static unsafe partial byte* data(Texture texture); + + [LibraryImport("gli")] + public static unsafe partial byte* imagedata(Texture texture, long level, long layer = 0, long face = 0); + + [LibraryImport("gli")] + public static partial long size(Texture texture); + + [LibraryImport("gli")] + public static partial long levelsize(Texture texture, long level = 0); + + [LibraryImport("gli")] + public static partial int3 extent(Texture texture, long level = 0); + + [LibraryImport("gli")] + public static partial Format format(Texture texture); + + [LibraryImport("gli")] + public static partial long layers(Texture texture); + + [LibraryImport("gli")] + public static partial long levels(Texture texture); + + [LibraryImport("gli")] + public static partial long faces(Texture texture); + + [LibraryImport("gli")] + public static partial Target target(Texture texture); + + [LibraryImport("gli")] + public static partial long rowpitch(Texture texture, long level = 0); + + [LibraryImport("gli")] + public static partial long blocksize(Texture texture); + + [LibraryImport("gli")] + public static partial int3 blockextent(Texture texture); + + [LibraryImport("gli")] + public static partial Bool8 iscompressed(Texture texture); + } + + [CustomMarshaller( + managedType: typeof(Texture), + marshalMode: MarshalMode.Default, + marshallerType: typeof(NativeTextureMarshaller) + )] + internal static class NativeTextureMarshaller + { + internal static nint ConvertToUnmanaged(Texture? managed) + { + return managed?.Impl ?? 0; + } + + internal static Texture ConvertToManaged(nint unmanaged) + { + return new Texture(unmanaged); + } + } +} diff --git a/Brutal.Gli/LICENSES/BRUTAL-GLI-THIRD-PARTY-NOTICES.txt b/Brutal.Gli/LICENSES/BRUTAL-GLI-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..ae690f0 --- /dev/null +++ b/Brutal.Gli/LICENSES/BRUTAL-GLI-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,131 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Gli + +Brutal.Gli redistributes the third-party components named below, as native libraries. +Each is reproduced with the license that governs it. + +============================================================================== +GLI +============================================================================== + + Name GLI, an image library for texture loading and format conversion + Version 0.8.3 + built from upstream 0.8.2.0-108-g779b99ac + Upstream https://github.com/g-truc/gli + SPDX MIT -- upstream offers two licenses and both are reproduced below + Shipped as gli.dll (win-x64), libgli.so (linux-x64), libgli.dylib (osx-arm64) + + Upstream offers this component under either of the two licenses below. Both are + reproduced as upstream states them. + +Copyright (c) 2010 - 2020 G-Truc Creation + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +Restrictions: By making use of the Software for military purposes, you +choose to make a Bunny unhappy. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Copyright (c) 2010 - 2020 G-Truc Creation + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================== +OpenGL Mathematics (GLM) +============================================================================== + + Name OpenGL Mathematics, a header-only mathematics library + Version 0.9.9.9 + Upstream https://github.com/g-truc/glm + Shipped as compiled into gli.dll, libgli.so and libgli.dylib + + GLI is built against this component and its templates are instantiated into the + libraries shipped here, so it is redistributed with them rather than beside them. + +================================================================================ +OpenGL Mathematics (GLM) +-------------------------------------------------------------------------------- +GLM is licensed under The Happy Bunny License or MIT License + +================================================================================ +The Happy Bunny License (Modified MIT License) +-------------------------------------------------------------------------------- +Copyright (c) 2005 - G-Truc Creation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +Restrictions: + By making use of the Software for military purposes, you choose to make a + Bunny unhappy. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +================================================================================ +The MIT License +-------------------------------------------------------------------------------- +Copyright (c) 2005 - G-Truc Creation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Brutal.Gli/Types/Format.cs b/Brutal.Gli/Types/Format.cs new file mode 100644 index 0000000..cee9334 --- /dev/null +++ b/Brutal.Gli/Types/Format.cs @@ -0,0 +1,255 @@ +namespace Brutal.GliApi; + +public static partial class Gli +{ + /// + /// GLI's internal format definition + /// + public enum Format + { + Undefined = 0, + + RG4_UNorm_Pack8, + First = RG4_UNorm_Pack8, + RGBA4_UNorm_Pack16, + BGRA4_UNorm_Pack16, + R5G6B5_UNorm_Pack16, + B5G6R5_UNorm_Pack16, + RGB5A1_UNorm_Pack16, + BGR5A1_UNorm_Pack16, + A1RGB5_UNorm_Pack16, + + R8_UNorm_Pack8, + R8_SNorm_Pack8, + R8_UScaled_Pack8, + R8_SScaled_Pack8, + R8_UInt_Pack8, + R8_SInt_Pack8, + R8_SRGB_Pack8, + + RG8_UNorm_Pack8, + RG8_SNorm_Pack8, + RG8_UScaled_Pack8, + RG8_SScaled_Pack8, + RG8_UInt_Pack8, + RG8_SInt_Pack8, + RG8_SRGB_Pack8, + + RGB8_UNorm_Pack8, + RGB8_SNorm_Pack8, + RGB8_UScaled_Pack8, + RGB8_SScaled_Pack8, + RGB8_UInt_Pack8, + RGB8_SInt_Pack8, + RGB8_SRGB_Pack8, + + BGR8_UNorm_Pack8, + BGR8_SNorm_Pack8, + BGR8_UScaled_Pack8, + BGR8_SScaled_Pack8, + BGR8_UInt_Pack8, + BGR8_SInt_Pack8, + BGR8_SRGB_Pack8, + + RGBA8_UNorm_Pack8, + RGBA8_SNorm_Pack8, + RGBA8_UScaled_Pack8, + RGBA8_SScaled_Pack8, + RGBA8_UInt_Pack8, + RGBA8_SInt_Pack8, + RGBA8_SRGB_Pack8, + + BGRA8_UNorm_Pack8, + BGRA8_SNorm_Pack8, + BGRA8_UScaled_Pack8, + BGRA8_SScaled_Pack8, + BGRA8_UInt_Pack8, + BGRA8_SInt_Pack8, + BGRA8_SRGB_Pack8, + + RGBA8_UNorm_Pack32, + RGBA8_SNorm_Pack32, + RGBA8_UScaled_Pack32, + RGBA8_SScaled_Pack32, + RGBA8_UInt_Pack32, + RGBA8_SInt_Pack32, + RGBA8_SRGB_Pack32, + + RGB10A2_UNorm_Pack32, + RGB10A2_SNorm_Pack32, + RGB10A2_UScaled_Pack32, + RGB10A2_SScaled_Pack32, + RGB10A2_UInt_Pack32, + RGB10A2_SInt_Pack32, + + BGR10A2_UNorm_Pack32, + BGR10A2_SNorm_Pack32, + BGR10A2_UScaled_Pack32, + BGR10A2_SScaled_Pack32, + BGR10A2_UInt_Pack32, + BGR10A2_SInt_Pack32, + + R16_UNorm_Pack16, + R16_SNorm_Pack16, + R16_UScaled_Pack16, + R16_SScaled_Pack16, + R16_UInt_Pack16, + R16_SInt_Pack16, + R16_SFloat_Pack16, + + RG16_UNorm_Pack16, + RG16_SNorm_Pack16, + RG16_UScaled_Pack16, + RG16_SScaled_Pack16, + RG16_UInt_Pack16, + RG16_SInt_Pack16, + RG16_SFloat_Pack16, + + RGB16_UNorm_Pack16, + RGB16_SNorm_Pack16, + RGB16_UScaled_Pack16, + RGB16_SScaled_Pack16, + RGB16_UInt_Pack16, + RGB16_SInt_Pack16, + RGB16_SFloat_Pack16, + + RGBA16_UNorm_Pack16, + RGBA16_SNorm_Pack16, + RGBA16_UScaled_Pack16, + RGBA16_SScaled_Pack16, + RGBA16_UInt_Pack16, + RGBA16_SInt_Pack16, + RGBA16_SFloat_Pack16, + + R32_UInt_Pack32, + R32_SInt_Pack32, + R32_SFloat_Pack32, + + RG32_UInt_Pack32, + RG32_SInt_Pack32, + RG32_SFloat_Pack32, + + RGB32_UInt_Pack32, + RGB32_SInt_Pack32, + RGB32_SFloat_Pack32, + + RGBA32_UInt_Pack32, + RGBA32_SInt_Pack32, + RGBA32_SFloat_Pack32, + + R64_UInt_Pack64, + R64_SInt_Pack64, + R64_SFloat_Pack64, + + RG64_UInt_Pack64, + RG64_SInt_Pack64, + RG64_SFloat_Pack64, + + RGB64_UInt_Pack64, + RGB64_SInt_Pack64, + RGB64_SFloat_Pack64, + + RGBA64_UInt_Pack64, + RGBA64_SInt_Pack64, + RGBA64_SFloat_Pack64, + + RG11B10_UFloat_Pack32, + RGB9E5_UFloat_Pack32, + + D16_UNorm_Pack16, + D24_UNorm_Pack32, + D32_SFloat_Pack32, + S8_UInt_Pack8, + D16_UNorm_S8_UInt_Pack32, + D24_UNorm_S8_UInt_Pack32, + D32_SFloat_S8_UInt_Pack64, + + RGB_DXT1_UNorm_Block8, + RGB_DXT1_SRGB_Block8, + RGBA_DXT1_UNorm_Block8, + RGBA_DXT1_SRGB_Block8, + RGBA_DXT3_UNorm_Block16, + RGBA_DXT3_SRGB_Block16, + RGBA_DXT5_UNorm_Block16, + RGBA_DXT5_SRGB_Block16, + R_ATI1N_UNorm_Block8, + R_ATI1N_SNorm_Block8, + RG_ATI2N_UNorm_Block16, + RG_ATI2N_SNorm_Block16, + RGB_BP_UFloat_Block16, + RGB_BP_SFloat_Block16, + RGBA_BP_UNorm_Block16, + RGBA_BP_SRGB_Block16, + + RGB_ETC2_UNorm_Block8, + RGB_ETC2_SRGB_Block8, + RGBA_ETC2_UNorm_Block8, + RGBA_ETC2_SRGB_Block8, + RGBA_ETC2_UNorm_Block16, + RGBA_ETC2_SRGB_Block16, + R_EAC_UNorm_Block8, + R_EAC_SNorm_Block8, + RG_EAC_UNorm_Block16, + RG_EAC_SNorm_Block16, + + RGBA_ASTC_4X4_UNorm_Block16, + RGBA_ASTC_4X4_SRGB_Block16, + RGBA_ASTC_5X4_UNorm_Block16, + RGBA_ASTC_5X4_SRGB_Block16, + RGBA_ASTC_5X5_UNorm_Block16, + RGBA_ASTC_5X5_SRGB_Block16, + RGBA_ASTC_6X5_UNorm_Block16, + RGBA_ASTC_6X5_SRGB_Block16, + RGBA_ASTC_6X6_UNorm_Block16, + RGBA_ASTC_6X6_SRGB_Block16, + RGBA_ASTC_8X5_UNorm_Block16, + RGBA_ASTC_8X5_SRGB_Block16, + RGBA_ASTC_8X6_UNorm_Block16, + RGBA_ASTC_8X6_SRGB_Block16, + RGBA_ASTC_8X8_UNorm_Block16, + RGBA_ASTC_8X8_SRGB_Block16, + RGBA_ASTC_10X5_UNorm_Block16, + RGBA_ASTC_10X5_SRGB_Block16, + RGBA_ASTC_10X6_UNorm_Block16, + RGBA_ASTC_10X6_SRGB_Block16, + RGBA_ASTC_10X8_UNorm_Block16, + RGBA_ASTC_10X8_SRGB_Block16, + RGBA_ASTC_10X10_UNorm_Block16, + RGBA_ASTC_10X10_SRGB_Block16, + RGBA_ASTC_12X10_UNorm_Block16, + RGBA_ASTC_12X10_SRGB_Block16, + RGBA_ASTC_12X12_UNorm_Block16, + RGBA_ASTC_12X12_SRGB_Block16, + + RGB_PVRTC1_8X8_UNorm_Block32, + RGB_PVRTC1_8X8_SRGB_Block32, + RGB_PVRTC1_16X8_UNorm_Block32, + RGB_PVRTC1_16X8_SRGB_Block32, + RGBA_PVRTC1_8X8_UNorm_Block32, + RGBA_PVRTC1_8X8_SRGB_Block32, + RGBA_PVRTC1_16X8_UNorm_Block32, + RGBA_PVRTC1_16X8_SRGB_Block32, + RGBA_PVRTC2_4X4_UNorm_Block8, + RGBA_PVRTC2_4X4_SRGB_Block8, + RGBA_PVRTC2_8X4_UNorm_Block8, + RGBA_PVRTC2_8X4_SRGB_Block8, + + RGB_ETC_UNorm_Block8, + RGB_ATC_UNorm_Block8, + RGBA_ATCA_UNorm_Block16, + RGBA_ATCI_UNorm_Block16, + + L8_UNorm_Pack8, + A8_UNorm_Pack8, + LA8_UNorm_Pack8, + L16_UNorm_Pack16, + A16_UNorm_Pack16, + LA16_UNorm_Pack16, + + BGR8_UNorm_Pack32, + BGR8_SRGB_Pack32, + + RG3B2_UNorm_Pack8, + Last = RG3B2_UNorm_Pack8, + } +} diff --git a/Brutal.Gli/Types/Swizzle.cs b/Brutal.Gli/Types/Swizzle.cs new file mode 100644 index 0000000..6b16075 --- /dev/null +++ b/Brutal.Gli/Types/Swizzle.cs @@ -0,0 +1,55 @@ +using System.Runtime.InteropServices; + +namespace Brutal.GliApi; + +public static partial class Gli +{ + /// + /// Represent the source of a channel + /// + public enum Swizzle + { + Red, + Green, + Blue, + Alpha, + Zero, + One, + First = Red, + ChannelFirst = Red, + ChannelLast = Alpha, + Last = One, + } + + /// + /// Implementation of the Gli swizzles + /// + [StructLayout(LayoutKind.Sequential)] + public struct Swizzles() + { + /// + /// The R channel swizzle + /// + public Swizzle R = Swizzle.Red; + + /// + /// The G channel swizzle + /// + public Swizzle G = Swizzle.Green; + + /// + /// The B channel swizzle + /// + public Swizzle B = Swizzle.Blue; + + /// + /// The A channel swizzle + /// + public Swizzle A = Swizzle.Alpha; + + /// + /// + /// + public static Swizzles Identity => new Swizzles(); + } +} diff --git a/Brutal.Gli/Types/Target.cs b/Brutal.Gli/Types/Target.cs new file mode 100644 index 0000000..34f1bed --- /dev/null +++ b/Brutal.Gli/Types/Target.cs @@ -0,0 +1,56 @@ +namespace Brutal.GliApi; + +public static partial class Gli +{ + /// + /// Texture target: type/shape of the texture data + /// + public enum Target + { + _1D, + _1DArray, + _2D, + _2DArray, + _3D, + Rect, + RectArray, + Cube, + CubeArray, + } +} + +public static class GliTargetExtensions +{ + public static int DimensionCount(this Gli.Target target) => + target.Is1d() ? 1 : (target.Is2d() ? 2 : (target.Is3d() ? 3 : 2)); + + public static bool Is1d(this Gli.Target target) + { + return target is Gli.Target._1D or Gli.Target._1DArray; + } + + public static bool Is2d(this Gli.Target target) + { + return target is Gli.Target._2D or Gli.Target._2DArray or Gli.Target.Rect or Gli.Target.RectArray; + } + + public static bool Is3d(this Gli.Target target) + { + return target is Gli.Target._3D; + } + + public static bool IsArray(this Gli.Target target) + { + return target is Gli.Target._1DArray or Gli.Target._2DArray or Gli.Target.CubeArray; + } + + public static bool IsCube(this Gli.Target target) + { + return target is Gli.Target.Cube or Gli.Target.CubeArray; + } + + public static bool IsRect(this Gli.Target target) + { + return target is Gli.Target.Rect or Gli.Target.RectArray; + } +} diff --git a/Brutal.Gltf/GlobalUsings.cs b/Brutal.Gltf/GlobalUsings.cs new file mode 100644 index 0000000..55ca2c2 --- /dev/null +++ b/Brutal.Gltf/GlobalUsings.cs @@ -0,0 +1 @@ +global using Brutal.Numerics; diff --git a/Brutal.Gltf/GltfApi/Accessor.cs b/Brutal.Gltf/GltfApi/Accessor.cs new file mode 100644 index 0000000..8fe02bd --- /dev/null +++ b/Brutal.Gltf/GltfApi/Accessor.cs @@ -0,0 +1,55 @@ +namespace Brutal.GltfApi; + +public partial class Accessor +{ + /// + /// Gets the size in bytes of a single element of this accessor + /// + /// Size in bytes of accessor element, accounting for component type, and it's vector element count + /// Unsupported type + /// + /// Matrix accessor whose columns are not naturally 4-byte aligned (Mat2/byte, Mat3/byte, Mat3/short). + /// The glTF spec requires such columns to be padded to 4-byte boundaries, which this library does not implement. + /// + public ByteSize ElementSize() + { + var componentSize = ComponentType switch + { + ComponentTypeEnum.Byte => 1, + ComponentTypeEnum.UnsignedByte => 1, + ComponentTypeEnum.Short => 2, + ComponentTypeEnum.UnsignedShort => 2, + ComponentTypeEnum.UnsignedInt => 4, + ComponentTypeEnum.Float => 4, + _ => throw new InvalidOperationException($"Unsupported component type {ComponentType}"), + }; + var typeCount = Type switch + { + TypeEnum.Scalar => 1, + TypeEnum.Vec2 => 2, + TypeEnum.Vec3 => 3, + TypeEnum.Vec4 => 4, + TypeEnum.Mat2 => 4, + TypeEnum.Mat3 => 9, + TypeEnum.Mat4 => 16, + _ => throw new InvalidOperationException($"Unsupported accessor type {Type}"), + }; + + // glTF requires each matrix column to start on a 4-byte boundary. All float matrices (and + // Mat2/short, Mat4/any) are naturally aligned; the remaining combinations would need per-column + // padding that componentSize * typeCount does not account for, so reject them outright. + var matrixRows = Type switch + { + TypeEnum.Mat2 => 2, + TypeEnum.Mat3 => 3, + TypeEnum.Mat4 => 4, + _ => 0, + }; + if (matrixRows != 0 && (matrixRows * componentSize) % 4 != 0) + throw new NotSupportedException( + $"Matrix accessor {Type}/{ComponentType} requires column padding, which is not supported" + ); + + return ByteSize.Of(componentSize * typeCount); + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Accessor.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Accessor.gen.cs new file mode 100644 index 0000000..8ffaa4b --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Accessor.gen.cs @@ -0,0 +1,383 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A typed view into a buffer view that contains raw binary data. + /// + public partial class Accessor { + + /// + /// Backing field for BufferView. + /// + private System.Nullable m_bufferView; + + /// + /// Backing field for ByteOffset. + /// + private int m_byteOffset = 0; + + /// + /// Backing field for ComponentType. + /// + private ComponentTypeEnum m_componentType; + + /// + /// Backing field for Normalized. + /// + private bool m_normalized = false; + + /// + /// Backing field for Count. + /// + private int m_count; + + /// + /// Backing field for Type. + /// + private TypeEnum m_type; + + /// + /// Backing field for Max. + /// + private float[] m_max; + + /// + /// Backing field for Min. + /// + private float[] m_min; + + /// + /// Backing field for Sparse. + /// + private AccessorSparse m_sparse; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the bufferView. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")] + public System.Nullable BufferView { + get { + return this.m_bufferView; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0"); + } + this.m_bufferView = value; + } + } + + /// + /// The offset relative to the start of the buffer view in bytes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteOffset")] + public int ByteOffset { + get { + return this.m_byteOffset; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("ByteOffset", value, "Expected value to be greater than or equal to 0"); + } + this.m_byteOffset = value; + } + } + + /// + /// The datatype of the accessor's components. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("componentType")] + public ComponentTypeEnum ComponentType { + get { + return this.m_componentType; + } + set { + this.m_componentType = value; + } + } + + /// + /// Specifies whether integer data values are normalized before usage. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("normalized")] + public bool Normalized { + get { + return this.m_normalized; + } + set { + this.m_normalized = value; + } + } + + /// + /// The number of elements referenced by this accessor. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("count")] + public int Count { + get { + return this.m_count; + } + set { + if ((value < 1)) { + throw new System.ArgumentOutOfRangeException("Count", value, "Expected value to be greater than or equal to 1"); + } + this.m_count = value; + } + } + + /// + /// Specifies if the accessor's elements are scalars, vectors, or matrices. + /// + [System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("type")] + public TypeEnum Type { + get { + return this.m_type; + } + set { + this.m_type = value; + } + } + + /// + /// Maximum value of each component in this accessor. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("max")] + public float[] Max { + get { + return this.m_max; + } + set { + if ((value == null)) { + this.m_max = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + if ((value.Length > 16u)) { + throw new System.ArgumentException("Array too long"); + } + this.m_max = value; + } + } + + /// + /// Minimum value of each component in this accessor. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("min")] + public float[] Min { + get { + return this.m_min; + } + set { + if ((value == null)) { + this.m_min = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + if ((value.Length > 16u)) { + throw new System.ArgumentException("Array too long"); + } + this.m_min = value; + } + } + + /// + /// Sparse storage of elements that deviate from their initialization value. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sparse")] + public AccessorSparse Sparse { + get { + return this.m_sparse; + } + set { + this.m_sparse = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the BufferView property should be serialized. + /// + public bool ShouldSerializeBufferView() { + return ((m_bufferView == null) + == false); + } + + /// + /// This method is used to determine if the ByteOffset property should be serialized. + /// + public bool ShouldSerializeByteOffset() { + return ((m_byteOffset == 0) + == false); + } + + /// + /// This method is used to determine if the Normalized property should be serialized. + /// + public bool ShouldSerializeNormalized() { + return ((m_normalized == false) + == false); + } + + /// + /// This method is used to determine if the Max property should be serialized. + /// + public bool ShouldSerializeMax() { + return ((m_max == null) + == false); + } + + /// + /// This method is used to determine if the Min property should be serialized. + /// + public bool ShouldSerializeMin() { + return ((m_min == null) + == false); + } + + /// + /// This method is used to determine if the Sparse property should be serialized. + /// + public bool ShouldSerializeSparse() { + return ((m_sparse == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// The datatype of the accessor's components. + /// + public enum ComponentTypeEnum { + + Byte = 5120, + + UnsignedByte = 5121, + + Short = 5122, + + UnsignedShort = 5123, + + UnsignedInt = 5125, + + Float = 5126, + } + + /// + /// Enum part of the GLTF file schema + /// Specifies if the accessor's elements are scalars, vectors, or matrices. + /// + public enum TypeEnum { + + Scalar, + + Vec2, + + Vec3, + + Vec4, + + Mat2, + + Mat3, + + Mat4, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparse.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparse.gen.cs new file mode 100644 index 0000000..95a9f7e --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparse.gen.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Sparse storage of accessor values that deviate from their initialization value. + /// + public partial class AccessorSparse { + + /// + /// Backing field for Count. + /// + private int m_count; + + /// + /// Backing field for Indices. + /// + private AccessorSparseIndices m_indices; + + /// + /// Backing field for Values. + /// + private AccessorSparseValues m_values; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Number of deviating accessor values stored in the sparse array. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("count")] + public int Count { + get { + return this.m_count; + } + set { + if ((value < 1)) { + throw new System.ArgumentOutOfRangeException("Count", value, "Expected value to be greater than or equal to 1"); + } + this.m_count = value; + } + } + + /// + /// An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to `count`. Indices **MUST** strictly increase. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("indices")] + public AccessorSparseIndices Indices { + get { + return this.m_indices; + } + set { + this.m_indices = value; + } + } + + /// + /// An object pointing to a buffer view containing the deviating accessor values. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("values")] + public AccessorSparseValues Values { + get { + return this.m_values; + } + set { + this.m_values = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Indices property should be serialized. + /// + public bool ShouldSerializeIndices() { + return ((m_indices == null) + == false); + } + + /// + /// This method is used to determine if the Values property should be serialized. + /// + public bool ShouldSerializeValues() { + return ((m_values == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseIndices.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseIndices.gen.cs new file mode 100644 index 0000000..4c8a05a --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseIndices.gen.cs @@ -0,0 +1,157 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to `accessor.sparse.count`. Indices **MUST** strictly increase. + /// + public partial class AccessorSparseIndices { + + /// + /// Backing field for BufferView. + /// + private int m_bufferView; + + /// + /// Backing field for ByteOffset. + /// + private int m_byteOffset = 0; + + /// + /// Backing field for ComponentType. + /// + private ComponentTypeEnum m_componentType; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the buffer view with sparse indices. The referenced buffer view **MUST NOT** have its `target` or `byteStride` properties defined. The buffer view and the optional `byteOffset` **MUST** be aligned to the `componentType` byte length. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")] + public int BufferView { + get { + return this.m_bufferView; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0"); + } + this.m_bufferView = value; + } + } + + /// + /// The offset relative to the start of the buffer view in bytes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteOffset")] + public int ByteOffset { + get { + return this.m_byteOffset; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("ByteOffset", value, "Expected value to be greater than or equal to 0"); + } + this.m_byteOffset = value; + } + } + + /// + /// The indices data type. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("componentType")] + public ComponentTypeEnum ComponentType { + get { + return this.m_componentType; + } + set { + this.m_componentType = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the ByteOffset property should be serialized. + /// + public bool ShouldSerializeByteOffset() { + return ((m_byteOffset == 0) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// The indices data type. + /// + public enum ComponentTypeEnum { + + UnsignedByte = 5121, + + UnsignedShort = 5123, + + UnsignedInt = 5125, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseValues.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseValues.gen.cs new file mode 100644 index 0000000..525aa42 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/AccessorSparseValues.gen.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// An object pointing to a buffer view containing the deviating accessor values. The number of elements is equal to `accessor.sparse.count` times number of components. The elements have the same component type as the base accessor. The elements are tightly packed. Data **MUST** be aligned following the same rules as the base accessor. + /// + public partial class AccessorSparseValues { + + /// + /// Backing field for BufferView. + /// + private int m_bufferView; + + /// + /// Backing field for ByteOffset. + /// + private int m_byteOffset = 0; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the bufferView with sparse values. The referenced buffer view **MUST NOT** have its `target` or `byteStride` properties defined. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")] + public int BufferView { + get { + return this.m_bufferView; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0"); + } + this.m_bufferView = value; + } + } + + /// + /// The offset relative to the start of the bufferView in bytes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteOffset")] + public int ByteOffset { + get { + return this.m_byteOffset; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("ByteOffset", value, "Expected value to be greater than or equal to 0"); + } + this.m_byteOffset = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the ByteOffset property should be serialized. + /// + public bool ShouldSerializeByteOffset() { + return ((m_byteOffset == 0) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Animation.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Animation.gen.cs new file mode 100644 index 0000000..633b40e --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Animation.gen.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A keyframe animation. + /// + public partial class Animation { + + /// + /// Backing field for Channels. + /// + private AnimationChannel[] m_channels; + + /// + /// Backing field for Samplers. + /// + private AnimationSampler[] m_samplers; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// An array of animation channels. An animation channel combines an animation sampler with a target property being animated. Different channels of the same animation **MUST NOT** have the same targets. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("channels")] + public AnimationChannel[] Channels { + get { + return this.m_channels; + } + set { + if ((value == null)) { + this.m_channels = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_channels = value; + } + } + + /// + /// An array of animation samplers. An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("samplers")] + public AnimationSampler[] Samplers { + get { + return this.m_samplers; + } + set { + if ((value == null)) { + this.m_samplers = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_samplers = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Channels property should be serialized. + /// + public bool ShouldSerializeChannels() { + return ((m_channels == null) + == false); + } + + /// + /// This method is used to determine if the Samplers property should be serialized. + /// + public bool ShouldSerializeSamplers() { + return ((m_samplers == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannel.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannel.gen.cs new file mode 100644 index 0000000..20713eb --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannel.gen.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// An animation channel combines an animation sampler with a target property being animated. + /// + public partial class AnimationChannel { + + /// + /// Backing field for Sampler. + /// + private int m_sampler; + + /// + /// Backing field for Target. + /// + private AnimationChannelTarget m_target; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of a sampler in this animation used to compute the value for the target. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sampler")] + public int Sampler { + get { + return this.m_sampler; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Sampler", value, "Expected value to be greater than or equal to 0"); + } + this.m_sampler = value; + } + } + + /// + /// The descriptor of the animated property. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("target")] + public AnimationChannelTarget Target { + get { + return this.m_target; + } + set { + this.m_target = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Target property should be serialized. + /// + public bool ShouldSerializeTarget() { + return ((m_target == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannelTarget.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannelTarget.gen.cs new file mode 100644 index 0000000..b1b3e14 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationChannelTarget.gen.cs @@ -0,0 +1,138 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// The descriptor of the animated property. + /// + public partial class AnimationChannelTarget { + + /// + /// Backing field for Node. + /// + private System.Nullable m_node; + + /// + /// Backing field for Path. + /// + private PathEnum m_path; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the node to animate. When undefined, the animated object **MAY** be defined by an extension. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("node")] + public System.Nullable Node { + get { + return this.m_node; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Node", value, "Expected value to be greater than or equal to 0"); + } + this.m_node = value; + } + } + + /// + /// The name of the node's TRS property to animate, or the `"weights"` of the Morph Targets it instantiates. For the `"translation"` property, the values that are provided by the sampler are the translation along the X, Y, and Z axes. For the `"rotation"` property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the `"scale"` property, the values are the scaling factors along the X, Y, and Z axes. + /// + [System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("path")] + public PathEnum Path { + get { + return this.m_path; + } + set { + this.m_path = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Node property should be serialized. + /// + public bool ShouldSerializeNode() { + return ((m_node == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// The name of the node's TRS property to animate, or the `"weights"` of the Morph Targets it instantiates. For the `"translation"` property, the values that are provided by the sampler are the translation along the X, Y, and Z axes. For the `"rotation"` property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the `"scale"` property, the values are the scaling factors along the X, Y, and Z axes. + /// + public enum PathEnum { + + Translation, + + Rotation, + + Scale, + + Weights, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationSampler.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationSampler.gen.cs new file mode 100644 index 0000000..d19cefe --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/AnimationSampler.gen.cs @@ -0,0 +1,158 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm. + /// + public partial class AnimationSampler { + + /// + /// Backing field for Input. + /// + private int m_input; + + /// + /// Backing field for Interpolation. + /// + private InterpolationEnum m_interpolation = InterpolationEnum.Linear; + + /// + /// Backing field for Output. + /// + private int m_output; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of an accessor containing keyframe timestamps. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("input")] + public int Input { + get { + return this.m_input; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Input", value, "Expected value to be greater than or equal to 0"); + } + this.m_input = value; + } + } + + /// + /// Interpolation algorithm. + /// + [System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("interpolation")] + public InterpolationEnum Interpolation { + get { + return this.m_interpolation; + } + set { + this.m_interpolation = value; + } + } + + /// + /// The index of an accessor, containing keyframe output values. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("output")] + public int Output { + get { + return this.m_output; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Output", value, "Expected value to be greater than or equal to 0"); + } + this.m_output = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Interpolation property should be serialized. + /// + public bool ShouldSerializeInterpolation() { + return ((m_interpolation == InterpolationEnum.Linear) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// Interpolation algorithm. + /// + public enum InterpolationEnum { + + Linear, + + Step, + + Cubicspline, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Asset.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Asset.gen.cs new file mode 100644 index 0000000..9cbd2ef --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Asset.gen.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Metadata about the glTF asset. + /// + public partial class Asset { + + /// + /// Backing field for Copyright. + /// + private string m_copyright; + + /// + /// Backing field for Generator. + /// + private string m_generator; + + /// + /// Backing field for Version. + /// + private string m_version; + + /// + /// Backing field for MinVersion. + /// + private string m_minVersion; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// A copyright message suitable for display to credit the content creator. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("copyright")] + public string Copyright { + get { + return this.m_copyright; + } + set { + this.m_copyright = value; + } + } + + /// + /// Tool that generated this glTF model. Useful for debugging. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("generator")] + public string Generator { + get { + return this.m_generator; + } + set { + this.m_generator = value; + } + } + + /// + /// The glTF version in the form of `<major>.<minor>` that this asset targets. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("version")] + public string Version { + get { + return this.m_version; + } + set { + this.m_version = value; + } + } + + /// + /// The minimum glTF version in the form of `<major>.<minor>` that this asset targets. This property **MUST NOT** be greater than the asset version. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("minVersion")] + public string MinVersion { + get { + return this.m_minVersion; + } + set { + this.m_minVersion = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Copyright property should be serialized. + /// + public bool ShouldSerializeCopyright() { + return ((m_copyright == null) + == false); + } + + /// + /// This method is used to determine if the Generator property should be serialized. + /// + public bool ShouldSerializeGenerator() { + return ((m_generator == null) + == false); + } + + /// + /// This method is used to determine if the Version property should be serialized. + /// + public bool ShouldSerializeVersion() { + return ((m_version == null) + == false); + } + + /// + /// This method is used to determine if the MinVersion property should be serialized. + /// + public bool ShouldSerializeMinVersion() { + return ((m_minVersion == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Buffer.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Buffer.gen.cs new file mode 100644 index 0000000..4b0c840 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Buffer.gen.cs @@ -0,0 +1,148 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A buffer points to binary geometry, animation, or skins. + /// + public partial class Buffer { + + /// + /// Backing field for Uri. + /// + private string m_uri; + + /// + /// Backing field for ByteLength. + /// + private int m_byteLength; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The URI (or IRI) of the buffer. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("uri")] + public string Uri { + get { + return this.m_uri; + } + set { + this.m_uri = value; + } + } + + /// + /// The length of the buffer in bytes. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteLength")] + public int ByteLength { + get { + return this.m_byteLength; + } + set { + if ((value < 1)) { + throw new System.ArgumentOutOfRangeException("ByteLength", value, "Expected value to be greater than or equal to 1"); + } + this.m_byteLength = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Uri property should be serialized. + /// + public bool ShouldSerializeUri() { + return ((m_uri == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/BufferView.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/BufferView.gen.cs new file mode 100644 index 0000000..045f3c5 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/BufferView.gen.cs @@ -0,0 +1,242 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A view into a buffer generally representing a subset of the buffer. + /// + public partial class BufferView { + + /// + /// Backing field for Buffer. + /// + private int m_buffer; + + /// + /// Backing field for ByteOffset. + /// + private int m_byteOffset = 0; + + /// + /// Backing field for ByteLength. + /// + private int m_byteLength; + + /// + /// Backing field for ByteStride. + /// + private System.Nullable m_byteStride; + + /// + /// Backing field for Target. + /// + private System.Nullable m_target; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the buffer. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("buffer")] + public int Buffer { + get { + return this.m_buffer; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Buffer", value, "Expected value to be greater than or equal to 0"); + } + this.m_buffer = value; + } + } + + /// + /// The offset into the buffer in bytes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteOffset")] + public int ByteOffset { + get { + return this.m_byteOffset; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("ByteOffset", value, "Expected value to be greater than or equal to 0"); + } + this.m_byteOffset = value; + } + } + + /// + /// The length of the bufferView in bytes. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteLength")] + public int ByteLength { + get { + return this.m_byteLength; + } + set { + if ((value < 1)) { + throw new System.ArgumentOutOfRangeException("ByteLength", value, "Expected value to be greater than or equal to 1"); + } + this.m_byteLength = value; + } + } + + /// + /// The stride, in bytes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteStride")] + public System.Nullable ByteStride { + get { + return this.m_byteStride; + } + set { + if ((value < 4)) { + throw new System.ArgumentOutOfRangeException("ByteStride", value, "Expected value to be greater than or equal to 4"); + } + if ((value > 252)) { + throw new System.ArgumentOutOfRangeException("ByteStride", value, "Expected value to be less than or equal to 252"); + } + this.m_byteStride = value; + } + } + + /// + /// The hint representing the intended GPU buffer type to use with this buffer view. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("target")] + public System.Nullable Target { + get { + return this.m_target; + } + set { + this.m_target = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the ByteOffset property should be serialized. + /// + public bool ShouldSerializeByteOffset() { + return ((m_byteOffset == 0) + == false); + } + + /// + /// This method is used to determine if the ByteStride property should be serialized. + /// + public bool ShouldSerializeByteStride() { + return ((m_byteStride == null) + == false); + } + + /// + /// This method is used to determine if the Target property should be serialized. + /// + public bool ShouldSerializeTarget() { + return ((m_target == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// The hint representing the intended GPU buffer type to use with this buffer view. + /// + public enum TargetEnum { + + ArrayBuffer = 34962, + + ElementArrayBuffer = 34963, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Camera.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Camera.gen.cs new file mode 100644 index 0000000..487635d --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Camera.gen.cs @@ -0,0 +1,183 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A camera's projection. A node **MAY** reference a camera to apply a transform to place the camera in the scene. + /// + public partial class Camera { + + /// + /// Backing field for Orthographic. + /// + private CameraOrthographic m_orthographic; + + /// + /// Backing field for Perspective. + /// + private CameraPerspective m_perspective; + + /// + /// Backing field for Type. + /// + private TypeEnum m_type; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// An orthographic camera containing properties to create an orthographic projection matrix. This property **MUST NOT** be defined when `perspective` is defined. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("orthographic")] + public CameraOrthographic Orthographic { + get { + return this.m_orthographic; + } + set { + this.m_orthographic = value; + } + } + + /// + /// A perspective camera containing properties to create a perspective projection matrix. This property **MUST NOT** be defined when `orthographic` is defined. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("perspective")] + public CameraPerspective Perspective { + get { + return this.m_perspective; + } + set { + this.m_perspective = value; + } + } + + /// + /// Specifies if the camera uses a perspective or orthographic projection. + /// + [System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("type")] + public TypeEnum Type { + get { + return this.m_type; + } + set { + this.m_type = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Orthographic property should be serialized. + /// + public bool ShouldSerializeOrthographic() { + return ((m_orthographic == null) + == false); + } + + /// + /// This method is used to determine if the Perspective property should be serialized. + /// + public bool ShouldSerializePerspective() { + return ((m_perspective == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// Specifies if the camera uses a perspective or orthographic projection. + /// + public enum TypeEnum { + + Perspective, + + Orthographic, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/CameraOrthographic.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/CameraOrthographic.gen.cs new file mode 100644 index 0000000..902e393 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/CameraOrthographic.gen.cs @@ -0,0 +1,156 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// An orthographic camera containing properties to create an orthographic projection matrix. + /// + public partial class CameraOrthographic { + + /// + /// Backing field for Xmag. + /// + private float m_xmag; + + /// + /// Backing field for Ymag. + /// + private float m_ymag; + + /// + /// Backing field for Zfar. + /// + private float m_zfar; + + /// + /// Backing field for Znear. + /// + private float m_znear; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The floating-point horizontal magnification of the view. This value **MUST NOT** be equal to zero. This value **SHOULD NOT** be negative. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("xmag")] + public float Xmag { + get { + return this.m_xmag; + } + set { + this.m_xmag = value; + } + } + + /// + /// The floating-point vertical magnification of the view. This value **MUST NOT** be equal to zero. This value **SHOULD NOT** be negative. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("ymag")] + public float Ymag { + get { + return this.m_ymag; + } + set { + this.m_ymag = value; + } + } + + /// + /// The floating-point distance to the far clipping plane. This value **MUST NOT** be equal to zero. `zfar` **MUST** be greater than `znear`. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("zfar")] + public float Zfar { + get { + return this.m_zfar; + } + set { + if ((value <= 0D)) { + throw new System.ArgumentOutOfRangeException("Zfar", value, "Expected value to be greater than 0"); + } + this.m_zfar = value; + } + } + + /// + /// The floating-point distance to the near clipping plane. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("znear")] + public float Znear { + get { + return this.m_znear; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("Znear", value, "Expected value to be greater than or equal to 0"); + } + this.m_znear = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/CameraPerspective.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/CameraPerspective.gen.cs new file mode 100644 index 0000000..5898567 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/CameraPerspective.gen.cs @@ -0,0 +1,176 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A perspective camera containing properties to create a perspective projection matrix. + /// + public partial class CameraPerspective { + + /// + /// Backing field for AspectRatio. + /// + private System.Nullable m_aspectRatio; + + /// + /// Backing field for Yfov. + /// + private float m_yfov; + + /// + /// Backing field for Zfar. + /// + private System.Nullable m_zfar; + + /// + /// Backing field for Znear. + /// + private float m_znear; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The floating-point aspect ratio of the field of view. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("aspectRatio")] + public System.Nullable AspectRatio { + get { + return this.m_aspectRatio; + } + set { + if ((value <= 0D)) { + throw new System.ArgumentOutOfRangeException("AspectRatio", value, "Expected value to be greater than 0"); + } + this.m_aspectRatio = value; + } + } + + /// + /// The floating-point vertical field of view in radians. This value **SHOULD** be less than π. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("yfov")] + public float Yfov { + get { + return this.m_yfov; + } + set { + if ((value <= 0D)) { + throw new System.ArgumentOutOfRangeException("Yfov", value, "Expected value to be greater than 0"); + } + this.m_yfov = value; + } + } + + /// + /// The floating-point distance to the far clipping plane. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("zfar")] + public System.Nullable Zfar { + get { + return this.m_zfar; + } + set { + if ((value <= 0D)) { + throw new System.ArgumentOutOfRangeException("Zfar", value, "Expected value to be greater than 0"); + } + this.m_zfar = value; + } + } + + /// + /// The floating-point distance to the near clipping plane. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("znear")] + public float Znear { + get { + return this.m_znear; + } + set { + if ((value <= 0D)) { + throw new System.ArgumentOutOfRangeException("Znear", value, "Expected value to be greater than 0"); + } + this.m_znear = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the AspectRatio property should be serialized. + /// + public bool ShouldSerializeAspectRatio() { + return ((m_aspectRatio == null) + == false); + } + + /// + /// This method is used to determine if the Zfar property should be serialized. + /// + public bool ShouldSerializeZfar() { + return ((m_zfar == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/DracoMeshCompressionGltfMeshPrimitiveExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/DracoMeshCompressionGltfMeshPrimitiveExtension.gen.cs new file mode 100644 index 0000000..7af10e3 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/DracoMeshCompressionGltfMeshPrimitiveExtension.gen.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Sourced from the 'KHR_draco_mesh_compression' extension + /// + public partial class DracoMeshCompressionGltfMeshPrimitiveExtension { + + /// + /// Backing field for BufferView. + /// + private int m_bufferView; + + /// + /// Backing field for Attributes. + /// + private System.Collections.Generic.Dictionary m_attributes; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the bufferView. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")] + public int BufferView { + get { + return this.m_bufferView; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0"); + } + this.m_bufferView = value; + } + } + + /// + /// A dictionary object, where each key corresponds to an attribute and its unique attribute id stored in the compressed geometry. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("attributes")] + public System.Collections.Generic.Dictionary Attributes { + get { + return this.m_attributes; + } + set { + this.m_attributes = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Attributes property should be serialized. + /// + public bool ShouldSerializeAttributes() { + return ((m_attributes == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Extension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Extension.gen.cs new file mode 100644 index 0000000..49bf947 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Extension.gen.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// JSON object with extension-specific objects. + /// + public partial class Extension { + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Extras.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Extras.gen.cs new file mode 100644 index 0000000..f65c514 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Extras.gen.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Application-specific data. + /// + public partial class Extras { + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Gltf.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Gltf.gen.cs new file mode 100644 index 0000000..d4d8c1f --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Gltf.gen.cs @@ -0,0 +1,625 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// The root object for a glTF asset. + /// + public partial class Gltf { + + /// + /// Backing field for ExtensionsUsed. + /// + private string[] m_extensionsUsed; + + /// + /// Backing field for ExtensionsRequired. + /// + private string[] m_extensionsRequired; + + /// + /// Backing field for Accessors. + /// + private Accessor[] m_accessors; + + /// + /// Backing field for Animations. + /// + private Animation[] m_animations; + + /// + /// Backing field for Asset. + /// + private Asset m_asset; + + /// + /// Backing field for Buffers. + /// + private Buffer[] m_buffers; + + /// + /// Backing field for BufferViews. + /// + private BufferView[] m_bufferViews; + + /// + /// Backing field for Cameras. + /// + private Camera[] m_cameras; + + /// + /// Backing field for Images. + /// + private Image[] m_images; + + /// + /// Backing field for Materials. + /// + private Material[] m_materials; + + /// + /// Backing field for Meshes. + /// + private Mesh[] m_meshes; + + /// + /// Backing field for Nodes. + /// + private Node[] m_nodes; + + /// + /// Backing field for Samplers. + /// + private Sampler[] m_samplers; + + /// + /// Backing field for Scene. + /// + private System.Nullable m_scene; + + /// + /// Backing field for Scenes. + /// + private Scene[] m_scenes; + + /// + /// Backing field for Skins. + /// + private Skin[] m_skins; + + /// + /// Backing field for Textures. + /// + private Texture[] m_textures; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Names of glTF extensions used in this asset. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensionsUsed")] + public string[] ExtensionsUsed { + get { + return this.m_extensionsUsed; + } + set { + if ((value == null)) { + this.m_extensionsUsed = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_extensionsUsed = value; + } + } + + /// + /// Names of glTF extensions required to properly load this asset. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensionsRequired")] + public string[] ExtensionsRequired { + get { + return this.m_extensionsRequired; + } + set { + if ((value == null)) { + this.m_extensionsRequired = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_extensionsRequired = value; + } + } + + /// + /// An array of accessors. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("accessors")] + public Accessor[] Accessors { + get { + return this.m_accessors; + } + set { + if ((value == null)) { + this.m_accessors = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_accessors = value; + } + } + + /// + /// An array of keyframe animations. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("animations")] + public Animation[] Animations { + get { + return this.m_animations; + } + set { + if ((value == null)) { + this.m_animations = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_animations = value; + } + } + + /// + /// Metadata about the glTF asset. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("asset")] + public Asset Asset { + get { + return this.m_asset; + } + set { + this.m_asset = value; + } + } + + /// + /// An array of buffers. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("buffers")] + public Buffer[] Buffers { + get { + return this.m_buffers; + } + set { + if ((value == null)) { + this.m_buffers = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_buffers = value; + } + } + + /// + /// An array of bufferViews. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferViews")] + public BufferView[] BufferViews { + get { + return this.m_bufferViews; + } + set { + if ((value == null)) { + this.m_bufferViews = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_bufferViews = value; + } + } + + /// + /// An array of cameras. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("cameras")] + public Camera[] Cameras { + get { + return this.m_cameras; + } + set { + if ((value == null)) { + this.m_cameras = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_cameras = value; + } + } + + /// + /// An array of images. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("images")] + public Image[] Images { + get { + return this.m_images; + } + set { + if ((value == null)) { + this.m_images = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_images = value; + } + } + + /// + /// An array of materials. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("materials")] + public Material[] Materials { + get { + return this.m_materials; + } + set { + if ((value == null)) { + this.m_materials = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_materials = value; + } + } + + /// + /// An array of meshes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("meshes")] + public Mesh[] Meshes { + get { + return this.m_meshes; + } + set { + if ((value == null)) { + this.m_meshes = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_meshes = value; + } + } + + /// + /// An array of nodes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("nodes")] + public Node[] Nodes { + get { + return this.m_nodes; + } + set { + if ((value == null)) { + this.m_nodes = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_nodes = value; + } + } + + /// + /// An array of samplers. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("samplers")] + public Sampler[] Samplers { + get { + return this.m_samplers; + } + set { + if ((value == null)) { + this.m_samplers = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_samplers = value; + } + } + + /// + /// The index of the default scene. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("scene")] + public System.Nullable Scene { + get { + return this.m_scene; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Scene", value, "Expected value to be greater than or equal to 0"); + } + this.m_scene = value; + } + } + + /// + /// An array of scenes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("scenes")] + public Scene[] Scenes { + get { + return this.m_scenes; + } + set { + if ((value == null)) { + this.m_scenes = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_scenes = value; + } + } + + /// + /// An array of skins. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("skins")] + public Skin[] Skins { + get { + return this.m_skins; + } + set { + if ((value == null)) { + this.m_skins = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_skins = value; + } + } + + /// + /// An array of textures. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("textures")] + public Texture[] Textures { + get { + return this.m_textures; + } + set { + if ((value == null)) { + this.m_textures = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_textures = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the ExtensionsUsed property should be serialized. + /// + public bool ShouldSerializeExtensionsUsed() { + return ((m_extensionsUsed == null) + == false); + } + + /// + /// This method is used to determine if the ExtensionsRequired property should be serialized. + /// + public bool ShouldSerializeExtensionsRequired() { + return ((m_extensionsRequired == null) + == false); + } + + /// + /// This method is used to determine if the Accessors property should be serialized. + /// + public bool ShouldSerializeAccessors() { + return ((m_accessors == null) + == false); + } + + /// + /// This method is used to determine if the Animations property should be serialized. + /// + public bool ShouldSerializeAnimations() { + return ((m_animations == null) + == false); + } + + /// + /// This method is used to determine if the Asset property should be serialized. + /// + public bool ShouldSerializeAsset() { + return ((m_asset == null) + == false); + } + + /// + /// This method is used to determine if the Buffers property should be serialized. + /// + public bool ShouldSerializeBuffers() { + return ((m_buffers == null) + == false); + } + + /// + /// This method is used to determine if the BufferViews property should be serialized. + /// + public bool ShouldSerializeBufferViews() { + return ((m_bufferViews == null) + == false); + } + + /// + /// This method is used to determine if the Cameras property should be serialized. + /// + public bool ShouldSerializeCameras() { + return ((m_cameras == null) + == false); + } + + /// + /// This method is used to determine if the Images property should be serialized. + /// + public bool ShouldSerializeImages() { + return ((m_images == null) + == false); + } + + /// + /// This method is used to determine if the Materials property should be serialized. + /// + public bool ShouldSerializeMaterials() { + return ((m_materials == null) + == false); + } + + /// + /// This method is used to determine if the Meshes property should be serialized. + /// + public bool ShouldSerializeMeshes() { + return ((m_meshes == null) + == false); + } + + /// + /// This method is used to determine if the Nodes property should be serialized. + /// + public bool ShouldSerializeNodes() { + return ((m_nodes == null) + == false); + } + + /// + /// This method is used to determine if the Samplers property should be serialized. + /// + public bool ShouldSerializeSamplers() { + return ((m_samplers == null) + == false); + } + + /// + /// This method is used to determine if the Scene property should be serialized. + /// + public bool ShouldSerializeScene() { + return ((m_scene == null) + == false); + } + + /// + /// This method is used to determine if the Scenes property should be serialized. + /// + public bool ShouldSerializeScenes() { + return ((m_scenes == null) + == false); + } + + /// + /// This method is used to determine if the Skins property should be serialized. + /// + public bool ShouldSerializeSkins() { + return ((m_skins == null) + == false); + } + + /// + /// This method is used to determine if the Textures property should be serialized. + /// + public bool ShouldSerializeTextures() { + return ((m_textures == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/GltfChildOfRootProperty.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/GltfChildOfRootProperty.gen.cs new file mode 100644 index 0000000..07e3ac1 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/GltfChildOfRootProperty.gen.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// + public partial class GltfChildOfRootProperty { + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/GltfProperty.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/GltfProperty.gen.cs new file mode 100644 index 0000000..40c41a0 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/GltfProperty.gen.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// + public partial class GltfProperty { + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Image.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Image.gen.cs new file mode 100644 index 0000000..56eaf19 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Image.gen.cs @@ -0,0 +1,181 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Image data used to create a texture. Image **MAY** be referenced by an URI (or IRI) or a buffer view index. + /// + public partial class Image { + + /// + /// Backing field for Uri. + /// + private string m_uri; + + /// + /// Backing field for MimeType. + /// + private string m_mimeType; + + /// + /// Backing field for BufferView. + /// + private System.Nullable m_bufferView; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The URI (or IRI) of the image. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("uri")] + public string Uri { + get { + return this.m_uri; + } + set { + this.m_uri = value; + } + } + + /// + /// The image's media type. This field **MUST** be defined when `bufferView` is defined. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("mimeType")] + public string MimeType { + get { + return this.m_mimeType; + } + set { + this.m_mimeType = value; + } + } + + /// + /// The index of the bufferView that contains the image. This field **MUST NOT** be defined when `uri` is defined. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")] + public System.Nullable BufferView { + get { + return this.m_bufferView; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0"); + } + this.m_bufferView = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Uri property should be serialized. + /// + public bool ShouldSerializeUri() { + return ((m_uri == null) + == false); + } + + /// + /// This method is used to determine if the MimeType property should be serialized. + /// + public bool ShouldSerializeMimeType() { + return ((m_mimeType == null) + == false); + } + + /// + /// This method is used to determine if the BufferView property should be serialized. + /// + public bool ShouldSerializeBufferView() { + return ((m_bufferView == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualGltfDocumentExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualGltfDocumentExtension.gen.cs new file mode 100644 index 0000000..203f261 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualGltfDocumentExtension.gen.cs @@ -0,0 +1,108 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Sourced from the 'KHR_lights_punctual' extension + /// + public partial class LightsPunctualGltfDocumentExtension { + + /// + /// Backing field for Lights. + /// + private LightsPunctualLightProperties[] m_lights; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("lights")] + public LightsPunctualLightProperties[] Lights { + get { + return this.m_lights; + } + set { + if ((value == null)) { + this.m_lights = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_lights = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Lights property should be serialized. + /// + public bool ShouldSerializeLights() { + return ((m_lights == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightProperties.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightProperties.gen.cs new file mode 100644 index 0000000..522188b --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightProperties.gen.cs @@ -0,0 +1,260 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A directional, point, or spot light. + /// Sourced from the 'KHR_lights_punctual' extension + /// + public partial class LightsPunctualLightProperties { + + /// + /// Backing field for Color. + /// + private float[] m_color = new float[] { + 1F, + 1F, + 1F}; + + /// + /// Backing field for Intensity. + /// + private float m_intensity = 1F; + + /// + /// Backing field for Spot. + /// + private LightsPunctualLightSpotProperties m_spot; + + /// + /// Backing field for Type. + /// + private string m_type; + + /// + /// Backing field for Range. + /// + private System.Nullable m_range; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Color of the light source. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("color")] + public float[] Color { + get { + return this.m_color; + } + set { + if ((value.Length < 3u)) { + throw new System.ArgumentException("Array not long enough"); + } + if ((value.Length > 3u)) { + throw new System.ArgumentException("Array too long"); + } + int index = 0; + for (index = 0; (index < value.Length); index = (index + 1)) { + if ((value[index] < 0D)) { + throw new System.ArgumentOutOfRangeException(); + } + } + for (index = 0; (index < value.Length); index = (index + 1)) { + if ((value[index] > 1D)) { + throw new System.ArgumentOutOfRangeException(); + } + } + this.m_color = value; + } + } + + /// + /// Intensity of the light source. `point` and `spot` lights use luminous intensity in candela (lm/sr) while `directional` lights use illuminance in lux (lm/m^2) + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("intensity")] + public float Intensity { + get { + return this.m_intensity; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Intensity", value, "Expected value to be greater than or equal to 0"); + } + this.m_intensity = value; + } + } + + /// + /// + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("spot")] + public LightsPunctualLightSpotProperties Spot { + get { + return this.m_spot; + } + set { + this.m_spot = value; + } + } + + /// + /// Specifies the light type. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("type")] + public string Type { + get { + return this.m_type; + } + set { + this.m_type = value; + } + } + + /// + /// A distance cutoff at which the light's intensity may be considered to have reached zero. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("range")] + public System.Nullable Range { + get { + return this.m_range; + } + set { + if ((value <= 0)) { + throw new System.ArgumentOutOfRangeException("Range", value, "Expected value to be greater than 0"); + } + this.m_range = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Color property should be serialized. + /// + public bool ShouldSerializeColor() { + return (m_color.SequenceEqual(new float[] { + 1F, + 1F, + 1F}) == false); + } + + /// + /// This method is used to determine if the Intensity property should be serialized. + /// + public bool ShouldSerializeIntensity() { + return ((m_intensity == 1F) + == false); + } + + /// + /// This method is used to determine if the Spot property should be serialized. + /// + public bool ShouldSerializeSpot() { + return ((m_spot == null) + == false); + } + + /// + /// This method is used to determine if the Type property should be serialized. + /// + public bool ShouldSerializeType() { + return ((m_type == null) + == false); + } + + /// + /// This method is used to determine if the Range property should be serialized. + /// + public bool ShouldSerializeRange() { + return ((m_range == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightSpotProperties.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightSpotProperties.gen.cs new file mode 100644 index 0000000..8a16110 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/LightsPunctualLightSpotProperties.gen.cs @@ -0,0 +1,138 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Sourced from the 'KHR_lights_punctual' extension + /// + public partial class LightsPunctualLightSpotProperties { + + /// + /// Backing field for InnerConeAngle. + /// + private float m_innerConeAngle = 0F; + + /// + /// Backing field for OuterConeAngle. + /// + private float m_outerConeAngle = 0.7853982F; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Angle in radians from centre of spotlight where falloff begins. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("innerConeAngle")] + public float InnerConeAngle { + get { + return this.m_innerConeAngle; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("InnerConeAngle", value, "Expected value to be greater than or equal to 0"); + } + if ((value >= 1.5707963267948966D)) { + throw new System.ArgumentOutOfRangeException("InnerConeAngle", value, "Expected value to be less than 1.5707963267948966"); + } + this.m_innerConeAngle = value; + } + } + + /// + /// Angle in radians from centre of spotlight where falloff ends. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("outerConeAngle")] + public float OuterConeAngle { + get { + return this.m_outerConeAngle; + } + set { + if ((value <= 0)) { + throw new System.ArgumentOutOfRangeException("OuterConeAngle", value, "Expected value to be greater than 0"); + } + if ((value > 1.5707963267948966D)) { + throw new System.ArgumentOutOfRangeException("OuterConeAngle", value, "Expected value to be less than or equal to 1.5707963267948966"); + } + this.m_outerConeAngle = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the InnerConeAngle property should be serialized. + /// + public bool ShouldSerializeInnerConeAngle() { + return ((m_innerConeAngle == 0F) + == false); + } + + /// + /// This method is used to determine if the OuterConeAngle property should be serialized. + /// + public bool ShouldSerializeOuterConeAngle() { + return ((m_outerConeAngle == 0.7853982F) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Material.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Material.gen.cs new file mode 100644 index 0000000..57b0c6d --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Material.gen.cs @@ -0,0 +1,325 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// The material appearance of a primitive. + /// + public partial class Material { + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Backing field for PbrMetallicRoughness. + /// + private MaterialPbrMetallicRoughness m_pbrMetallicRoughness; + + /// + /// Backing field for NormalTexture. + /// + private MaterialNormalTextureInfo m_normalTexture; + + /// + /// Backing field for OcclusionTexture. + /// + private MaterialOcclusionTextureInfo m_occlusionTexture; + + /// + /// Backing field for EmissiveTexture. + /// + private TextureInfo m_emissiveTexture; + + /// + /// Backing field for EmissiveFactor. + /// + private Brutal.Numerics.float3 m_emissiveFactor = new Brutal.Numerics.float3(0F, 0F, 0F); + + /// + /// Backing field for AlphaMode. + /// + private AlphaModeEnum m_alphaMode = AlphaModeEnum.Opaque; + + /// + /// Backing field for AlphaCutoff. + /// + private float m_alphaCutoff = 0.5F; + + /// + /// Backing field for DoubleSided. + /// + private bool m_doubleSided = false; + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// A set of parameter values that are used to define the metallic-roughness material model from Physically Based Rendering (PBR) methodology. When undefined, all the default values of `pbrMetallicRoughness` **MUST** apply. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("pbrMetallicRoughness")] + public MaterialPbrMetallicRoughness PbrMetallicRoughness { + get { + return this.m_pbrMetallicRoughness; + } + set { + this.m_pbrMetallicRoughness = value; + } + } + + /// + /// The tangent space normal texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("normalTexture")] + public MaterialNormalTextureInfo NormalTexture { + get { + return this.m_normalTexture; + } + set { + this.m_normalTexture = value; + } + } + + /// + /// The occlusion texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("occlusionTexture")] + public MaterialOcclusionTextureInfo OcclusionTexture { + get { + return this.m_occlusionTexture; + } + set { + this.m_occlusionTexture = value; + } + } + + /// + /// The emissive texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("emissiveTexture")] + public TextureInfo EmissiveTexture { + get { + return this.m_emissiveTexture; + } + set { + this.m_emissiveTexture = value; + } + } + + /// + /// The factors for the emissive color of the material. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("emissiveFactor")] + public Brutal.Numerics.float3 EmissiveFactor { + get { + return this.m_emissiveFactor; + } + set { + this.m_emissiveFactor = value; + } + } + + /// + /// The alpha rendering mode of the material. + /// + [System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("alphaMode")] + public AlphaModeEnum AlphaMode { + get { + return this.m_alphaMode; + } + set { + this.m_alphaMode = value; + } + } + + /// + /// The alpha cutoff value of the material. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("alphaCutoff")] + public float AlphaCutoff { + get { + return this.m_alphaCutoff; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("AlphaCutoff", value, "Expected value to be greater than or equal to 0"); + } + this.m_alphaCutoff = value; + } + } + + /// + /// Specifies whether the material is double sided. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("doubleSided")] + public bool DoubleSided { + get { + return this.m_doubleSided; + } + set { + this.m_doubleSided = value; + } + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// This method is used to determine if the PbrMetallicRoughness property should be serialized. + /// + public bool ShouldSerializePbrMetallicRoughness() { + return ((m_pbrMetallicRoughness == null) + == false); + } + + /// + /// This method is used to determine if the NormalTexture property should be serialized. + /// + public bool ShouldSerializeNormalTexture() { + return ((m_normalTexture == null) + == false); + } + + /// + /// This method is used to determine if the OcclusionTexture property should be serialized. + /// + public bool ShouldSerializeOcclusionTexture() { + return ((m_occlusionTexture == null) + == false); + } + + /// + /// This method is used to determine if the EmissiveTexture property should be serialized. + /// + public bool ShouldSerializeEmissiveTexture() { + return ((m_emissiveTexture == null) + == false); + } + + /// + /// This method is used to determine if the EmissiveFactor property should be serialized. + /// + public bool ShouldSerializeEmissiveFactor() { + return ((m_emissiveFactor == new Brutal.Numerics.float3(0F, 0F, 0F)) + == false); + } + + /// + /// This method is used to determine if the AlphaMode property should be serialized. + /// + public bool ShouldSerializeAlphaMode() { + return ((m_alphaMode == AlphaModeEnum.Opaque) + == false); + } + + /// + /// This method is used to determine if the AlphaCutoff property should be serialized. + /// + public bool ShouldSerializeAlphaCutoff() { + return ((m_alphaCutoff == 0.5F) + == false); + } + + /// + /// This method is used to determine if the DoubleSided property should be serialized. + /// + public bool ShouldSerializeDoubleSided() { + return ((m_doubleSided == false) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// The alpha rendering mode of the material. + /// + public enum AlphaModeEnum { + + Opaque, + + Mask, + + Blend, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialNormalTextureInfo.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialNormalTextureInfo.gen.cs new file mode 100644 index 0000000..7d944f1 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialNormalTextureInfo.gen.cs @@ -0,0 +1,151 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Reference to a texture. + /// + public partial class MaterialNormalTextureInfo { + + /// + /// Backing field for Index. + /// + private int m_index; + + /// + /// Backing field for TexCoord. + /// + private int m_texCoord = 0; + + /// + /// Backing field for Scale. + /// + private float m_scale = 1F; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the texture. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("index")] + public int Index { + get { + return this.m_index; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Index", value, "Expected value to be greater than or equal to 0"); + } + this.m_index = value; + } + } + + /// + /// The set index of texture's TEXCOORD attribute used for texture coordinate mapping. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("texCoord")] + public int TexCoord { + get { + return this.m_texCoord; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("TexCoord", value, "Expected value to be greater than or equal to 0"); + } + this.m_texCoord = value; + } + } + + /// + /// The scalar parameter applied to each normal vector of the normal texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("scale")] + public float Scale { + get { + return this.m_scale; + } + set { + this.m_scale = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the TexCoord property should be serialized. + /// + public bool ShouldSerializeTexCoord() { + return ((m_texCoord == 0) + == false); + } + + /// + /// This method is used to determine if the Scale property should be serialized. + /// + public bool ShouldSerializeScale() { + return ((m_scale == 1F) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialOcclusionTextureInfo.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialOcclusionTextureInfo.gen.cs new file mode 100644 index 0000000..0627275 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialOcclusionTextureInfo.gen.cs @@ -0,0 +1,157 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Reference to a texture. + /// + public partial class MaterialOcclusionTextureInfo { + + /// + /// Backing field for Index. + /// + private int m_index; + + /// + /// Backing field for TexCoord. + /// + private int m_texCoord = 0; + + /// + /// Backing field for Strength. + /// + private float m_strength = 1F; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the texture. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("index")] + public int Index { + get { + return this.m_index; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Index", value, "Expected value to be greater than or equal to 0"); + } + this.m_index = value; + } + } + + /// + /// The set index of texture's TEXCOORD attribute used for texture coordinate mapping. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("texCoord")] + public int TexCoord { + get { + return this.m_texCoord; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("TexCoord", value, "Expected value to be greater than or equal to 0"); + } + this.m_texCoord = value; + } + } + + /// + /// A scalar multiplier controlling the amount of occlusion applied. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("strength")] + public float Strength { + get { + return this.m_strength; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("Strength", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("Strength", value, "Expected value to be less than or equal to 1"); + } + this.m_strength = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the TexCoord property should be serialized. + /// + public bool ShouldSerializeTexCoord() { + return ((m_texCoord == 0) + == false); + } + + /// + /// This method is used to determine if the Strength property should be serialized. + /// + public bool ShouldSerializeStrength() { + return ((m_strength == 1F) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialPbrMetallicRoughness.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialPbrMetallicRoughness.gen.cs new file mode 100644 index 0000000..b18fdcd --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialPbrMetallicRoughness.gen.cs @@ -0,0 +1,216 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. + /// + public partial class MaterialPbrMetallicRoughness { + + /// + /// Backing field for BaseColorFactor. + /// + private Brutal.Numerics.float4 m_baseColorFactor = new Brutal.Numerics.float4(1F, 1F, 1F, 1F); + + /// + /// Backing field for BaseColorTexture. + /// + private TextureInfo m_baseColorTexture; + + /// + /// Backing field for MetallicFactor. + /// + private float m_metallicFactor = 1F; + + /// + /// Backing field for RoughnessFactor. + /// + private float m_roughnessFactor = 1F; + + /// + /// Backing field for MetallicRoughnessTexture. + /// + private TextureInfo m_metallicRoughnessTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The factors for the base color of the material. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("baseColorFactor")] + public Brutal.Numerics.float4 BaseColorFactor { + get { + return this.m_baseColorFactor; + } + set { + this.m_baseColorFactor = value; + } + } + + /// + /// The base color texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("baseColorTexture")] + public TextureInfo BaseColorTexture { + get { + return this.m_baseColorTexture; + } + set { + this.m_baseColorTexture = value; + } + } + + /// + /// The factor for the metalness of the material. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("metallicFactor")] + public float MetallicFactor { + get { + return this.m_metallicFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("MetallicFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("MetallicFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_metallicFactor = value; + } + } + + /// + /// The factor for the roughness of the material. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("roughnessFactor")] + public float RoughnessFactor { + get { + return this.m_roughnessFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("RoughnessFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("RoughnessFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_roughnessFactor = value; + } + } + + /// + /// The metallic-roughness texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("metallicRoughnessTexture")] + public TextureInfo MetallicRoughnessTexture { + get { + return this.m_metallicRoughnessTexture; + } + set { + this.m_metallicRoughnessTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the BaseColorFactor property should be serialized. + /// + public bool ShouldSerializeBaseColorFactor() { + return ((m_baseColorFactor == new Brutal.Numerics.float4(1F, 1F, 1F, 1F)) + == false); + } + + /// + /// This method is used to determine if the BaseColorTexture property should be serialized. + /// + public bool ShouldSerializeBaseColorTexture() { + return ((m_baseColorTexture == null) + == false); + } + + /// + /// This method is used to determine if the MetallicFactor property should be serialized. + /// + public bool ShouldSerializeMetallicFactor() { + return ((m_metallicFactor == 1F) + == false); + } + + /// + /// This method is used to determine if the RoughnessFactor property should be serialized. + /// + public bool ShouldSerializeRoughnessFactor() { + return ((m_roughnessFactor == 1F) + == false); + } + + /// + /// This method is used to determine if the MetallicRoughnessTexture property should be serialized. + /// + public bool ShouldSerializeMetallicRoughnessTexture() { + return ((m_metallicRoughnessTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsAnisotropyGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsAnisotropyGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..020a5ca --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsAnisotropyGltfMaterialExtension.gen.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines anisotropy. + /// Sourced from the 'KHR_materials_anisotropy' extension + /// + public partial class MaterialsAnisotropyGltfMaterialExtension { + + /// + /// Backing field for AnisotropyStrength. + /// + private float m_anisotropyStrength = 0F; + + /// + /// Backing field for AnisotropyRotation. + /// + private float m_anisotropyRotation = 0F; + + /// + /// Backing field for AnisotropyTexture. + /// + private TextureInfo m_anisotropyTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The anisotropy strength. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("anisotropyStrength")] + public float AnisotropyStrength { + get { + return this.m_anisotropyStrength; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("AnisotropyStrength", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("AnisotropyStrength", value, "Expected value to be less than or equal to 1"); + } + this.m_anisotropyStrength = value; + } + } + + /// + /// The rotation of the anisotropy. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("anisotropyRotation")] + public float AnisotropyRotation { + get { + return this.m_anisotropyRotation; + } + set { + this.m_anisotropyRotation = value; + } + } + + /// + /// The anisotropy texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("anisotropyTexture")] + public TextureInfo AnisotropyTexture { + get { + return this.m_anisotropyTexture; + } + set { + this.m_anisotropyTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the AnisotropyStrength property should be serialized. + /// + public bool ShouldSerializeAnisotropyStrength() { + return ((m_anisotropyStrength == 0F) + == false); + } + + /// + /// This method is used to determine if the AnisotropyRotation property should be serialized. + /// + public bool ShouldSerializeAnisotropyRotation() { + return ((m_anisotropyRotation == 0F) + == false); + } + + /// + /// This method is used to determine if the AnisotropyTexture property should be serialized. + /// + public bool ShouldSerializeAnisotropyTexture() { + return ((m_anisotropyTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsClearcoatGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsClearcoatGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..fa497ae --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsClearcoatGltfMaterialExtension.gen.cs @@ -0,0 +1,217 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines the clearcoat material layer. + /// Sourced from the 'KHR_materials_clearcoat' extension + /// + public partial class MaterialsClearcoatGltfMaterialExtension { + + /// + /// Backing field for ClearcoatFactor. + /// + private float m_clearcoatFactor = 0F; + + /// + /// Backing field for ClearcoatTexture. + /// + private TextureInfo m_clearcoatTexture; + + /// + /// Backing field for ClearcoatRoughnessFactor. + /// + private float m_clearcoatRoughnessFactor = 0F; + + /// + /// Backing field for ClearcoatRoughnessTexture. + /// + private TextureInfo m_clearcoatRoughnessTexture; + + /// + /// Backing field for ClearcoatNormalTexture. + /// + private MaterialNormalTextureInfo m_clearcoatNormalTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The clearcoat layer intensity. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatFactor")] + public float ClearcoatFactor { + get { + return this.m_clearcoatFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("ClearcoatFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("ClearcoatFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_clearcoatFactor = value; + } + } + + /// + /// The clearcoat layer intensity texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatTexture")] + public TextureInfo ClearcoatTexture { + get { + return this.m_clearcoatTexture; + } + set { + this.m_clearcoatTexture = value; + } + } + + /// + /// The clearcoat layer roughness. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatRoughnessFactor")] + public float ClearcoatRoughnessFactor { + get { + return this.m_clearcoatRoughnessFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("ClearcoatRoughnessFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("ClearcoatRoughnessFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_clearcoatRoughnessFactor = value; + } + } + + /// + /// The clearcoat layer roughness texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatRoughnessTexture")] + public TextureInfo ClearcoatRoughnessTexture { + get { + return this.m_clearcoatRoughnessTexture; + } + set { + this.m_clearcoatRoughnessTexture = value; + } + } + + /// + /// The clearcoat normal map texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatNormalTexture")] + public MaterialNormalTextureInfo ClearcoatNormalTexture { + get { + return this.m_clearcoatNormalTexture; + } + set { + this.m_clearcoatNormalTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the ClearcoatFactor property should be serialized. + /// + public bool ShouldSerializeClearcoatFactor() { + return ((m_clearcoatFactor == 0F) + == false); + } + + /// + /// This method is used to determine if the ClearcoatTexture property should be serialized. + /// + public bool ShouldSerializeClearcoatTexture() { + return ((m_clearcoatTexture == null) + == false); + } + + /// + /// This method is used to determine if the ClearcoatRoughnessFactor property should be serialized. + /// + public bool ShouldSerializeClearcoatRoughnessFactor() { + return ((m_clearcoatRoughnessFactor == 0F) + == false); + } + + /// + /// This method is used to determine if the ClearcoatRoughnessTexture property should be serialized. + /// + public bool ShouldSerializeClearcoatRoughnessTexture() { + return ((m_clearcoatRoughnessTexture == null) + == false); + } + + /// + /// This method is used to determine if the ClearcoatNormalTexture property should be serialized. + /// + public bool ShouldSerializeClearcoatNormalTexture() { + return ((m_clearcoatNormalTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsEmissiveStrengthGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsEmissiveStrengthGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..fe1f8c2 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsEmissiveStrengthGltfMaterialExtension.gen.cs @@ -0,0 +1,104 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that adjusts the strength of emissive material properties. + /// Sourced from the 'KHR_materials_emissive_strength' extension + /// + public partial class MaterialsEmissiveStrengthGltfMaterialExtension { + + /// + /// Backing field for EmissiveStrength. + /// + private float m_emissiveStrength = 1F; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The strength adjustment to be multiplied with the material's emissive value. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("emissiveStrength")] + public float EmissiveStrength { + get { + return this.m_emissiveStrength; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("EmissiveStrength", value, "Expected value to be greater than or equal to 0"); + } + this.m_emissiveStrength = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the EmissiveStrength property should be serialized. + /// + public bool ShouldSerializeEmissiveStrength() { + return ((m_emissiveStrength == 1F) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsIridescenceGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsIridescenceGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..24aecc1 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsIridescenceGltfMaterialExtension.gen.cs @@ -0,0 +1,246 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines an iridescence effect. + /// Sourced from the 'KHR_materials_iridescence' extension + /// + public partial class MaterialsIridescenceGltfMaterialExtension { + + /// + /// Backing field for IridescenceFactor. + /// + private float m_iridescenceFactor = 0F; + + /// + /// Backing field for IridescenceTexture. + /// + private TextureInfo m_iridescenceTexture; + + /// + /// Backing field for IridescenceIor. + /// + private float m_iridescenceIor = 1.3F; + + /// + /// Backing field for IridescenceThicknessMinimum. + /// + private float m_iridescenceThicknessMinimum = 100F; + + /// + /// Backing field for IridescenceThicknessMaximum. + /// + private float m_iridescenceThicknessMaximum = 400F; + + /// + /// Backing field for IridescenceThicknessTexture. + /// + private TextureInfo m_iridescenceThicknessTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The iridescence intensity factor. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceFactor")] + public float IridescenceFactor { + get { + return this.m_iridescenceFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("IridescenceFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("IridescenceFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_iridescenceFactor = value; + } + } + + /// + /// The iridescence intensity texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceTexture")] + public TextureInfo IridescenceTexture { + get { + return this.m_iridescenceTexture; + } + set { + this.m_iridescenceTexture = value; + } + } + + /// + /// The index of refraction of the dielectric thin-film layer. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceIor")] + public float IridescenceIor { + get { + return this.m_iridescenceIor; + } + set { + if ((value < 1D)) { + throw new System.ArgumentOutOfRangeException("IridescenceIor", value, "Expected value to be greater than or equal to 1"); + } + this.m_iridescenceIor = value; + } + } + + /// + /// The minimum thickness of the thin-film layer given in nanometers. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceThicknessMinimum")] + public float IridescenceThicknessMinimum { + get { + return this.m_iridescenceThicknessMinimum; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("IridescenceThicknessMinimum", value, "Expected value to be greater than or equal to 0"); + } + this.m_iridescenceThicknessMinimum = value; + } + } + + /// + /// The maximum thickness of the thin-film layer given in nanometers. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceThicknessMaximum")] + public float IridescenceThicknessMaximum { + get { + return this.m_iridescenceThicknessMaximum; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("IridescenceThicknessMaximum", value, "Expected value to be greater than or equal to 0"); + } + this.m_iridescenceThicknessMaximum = value; + } + } + + /// + /// The thickness texture of the thin-film layer. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceThicknessTexture")] + public TextureInfo IridescenceThicknessTexture { + get { + return this.m_iridescenceThicknessTexture; + } + set { + this.m_iridescenceThicknessTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the IridescenceFactor property should be serialized. + /// + public bool ShouldSerializeIridescenceFactor() { + return ((m_iridescenceFactor == 0F) + == false); + } + + /// + /// This method is used to determine if the IridescenceTexture property should be serialized. + /// + public bool ShouldSerializeIridescenceTexture() { + return ((m_iridescenceTexture == null) + == false); + } + + /// + /// This method is used to determine if the IridescenceIor property should be serialized. + /// + public bool ShouldSerializeIridescenceIor() { + return ((m_iridescenceIor == 1.3F) + == false); + } + + /// + /// This method is used to determine if the IridescenceThicknessMinimum property should be serialized. + /// + public bool ShouldSerializeIridescenceThicknessMinimum() { + return ((m_iridescenceThicknessMinimum == 100F) + == false); + } + + /// + /// This method is used to determine if the IridescenceThicknessMaximum property should be serialized. + /// + public bool ShouldSerializeIridescenceThicknessMaximum() { + return ((m_iridescenceThicknessMaximum == 400F) + == false); + } + + /// + /// This method is used to determine if the IridescenceThicknessTexture property should be serialized. + /// + public bool ShouldSerializeIridescenceThicknessTexture() { + return ((m_iridescenceThicknessTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSheenGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSheenGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..87376a6 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSheenGltfMaterialExtension.gen.cs @@ -0,0 +1,185 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines the sheen material model. + /// Sourced from the 'KHR_materials_sheen' extension + /// + public partial class MaterialsSheenGltfMaterialExtension { + + /// + /// Backing field for SheenColorFactor. + /// + private Brutal.Numerics.float3 m_sheenColorFactor = new Brutal.Numerics.float3(0F, 0F, 0F); + + /// + /// Backing field for SheenColorTexture. + /// + private TextureInfo m_sheenColorTexture; + + /// + /// Backing field for SheenRoughnessFactor. + /// + private float m_sheenRoughnessFactor = 0F; + + /// + /// Backing field for SheenRoughnessTexture. + /// + private TextureInfo m_sheenRoughnessTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Color of the sheen layer (in linear space). + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sheenColorFactor")] + public Brutal.Numerics.float3 SheenColorFactor { + get { + return this.m_sheenColorFactor; + } + set { + this.m_sheenColorFactor = value; + } + } + + /// + /// The sheen color (RGB) texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sheenColorTexture")] + public TextureInfo SheenColorTexture { + get { + return this.m_sheenColorTexture; + } + set { + this.m_sheenColorTexture = value; + } + } + + /// + /// The sheen layer roughness. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sheenRoughnessFactor")] + public float SheenRoughnessFactor { + get { + return this.m_sheenRoughnessFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("SheenRoughnessFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("SheenRoughnessFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_sheenRoughnessFactor = value; + } + } + + /// + /// The sheen roughness (Alpha) texture. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sheenRoughnessTexture")] + public TextureInfo SheenRoughnessTexture { + get { + return this.m_sheenRoughnessTexture; + } + set { + this.m_sheenRoughnessTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the SheenColorFactor property should be serialized. + /// + public bool ShouldSerializeSheenColorFactor() { + return ((m_sheenColorFactor == new Brutal.Numerics.float3(0F, 0F, 0F)) + == false); + } + + /// + /// This method is used to determine if the SheenColorTexture property should be serialized. + /// + public bool ShouldSerializeSheenColorTexture() { + return ((m_sheenColorTexture == null) + == false); + } + + /// + /// This method is used to determine if the SheenRoughnessFactor property should be serialized. + /// + public bool ShouldSerializeSheenRoughnessFactor() { + return ((m_sheenRoughnessFactor == 0F) + == false); + } + + /// + /// This method is used to determine if the SheenRoughnessTexture property should be serialized. + /// + public bool ShouldSerializeSheenRoughnessTexture() { + return ((m_sheenRoughnessTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSpecularGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSpecularGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..78425cd --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsSpecularGltfMaterialExtension.gen.cs @@ -0,0 +1,185 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines the strength of the specular reflection. + /// Sourced from the 'KHR_materials_specular' extension + /// + public partial class MaterialsSpecularGltfMaterialExtension { + + /// + /// Backing field for SpecularFactor. + /// + private float m_specularFactor = 1F; + + /// + /// Backing field for SpecularTexture. + /// + private TextureInfo m_specularTexture; + + /// + /// Backing field for SpecularColorFactor. + /// + private Brutal.Numerics.float3 m_specularColorFactor = new Brutal.Numerics.float3(1F, 1F, 1F); + + /// + /// Backing field for SpecularColorTexture. + /// + private TextureInfo m_specularColorTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The strength of the specular reflection. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularFactor")] + public float SpecularFactor { + get { + return this.m_specularFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("SpecularFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("SpecularFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_specularFactor = value; + } + } + + /// + /// A texture that defines the specular factor in the alpha channel. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularTexture")] + public TextureInfo SpecularTexture { + get { + return this.m_specularTexture; + } + set { + this.m_specularTexture = value; + } + } + + /// + /// The F0 RGB color of the specular reflection. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularColorFactor")] + public Brutal.Numerics.float3 SpecularColorFactor { + get { + return this.m_specularColorFactor; + } + set { + this.m_specularColorFactor = value; + } + } + + /// + /// A texture that defines the F0 color of the specular reflection. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularColorTexture")] + public TextureInfo SpecularColorTexture { + get { + return this.m_specularColorTexture; + } + set { + this.m_specularColorTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the SpecularFactor property should be serialized. + /// + public bool ShouldSerializeSpecularFactor() { + return ((m_specularFactor == 1F) + == false); + } + + /// + /// This method is used to determine if the SpecularTexture property should be serialized. + /// + public bool ShouldSerializeSpecularTexture() { + return ((m_specularTexture == null) + == false); + } + + /// + /// This method is used to determine if the SpecularColorFactor property should be serialized. + /// + public bool ShouldSerializeSpecularColorFactor() { + return ((m_specularColorFactor == new Brutal.Numerics.float3(1F, 1F, 1F)) + == false); + } + + /// + /// This method is used to determine if the SpecularColorTexture property should be serialized. + /// + public bool ShouldSerializeSpecularColorTexture() { + return ((m_specularColorTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsTransmissionGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsTransmissionGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..c202f71 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsTransmissionGltfMaterialExtension.gen.cs @@ -0,0 +1,133 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines the optical transmission of a material. + /// Sourced from the 'KHR_materials_transmission' extension + /// + public partial class MaterialsTransmissionGltfMaterialExtension { + + /// + /// Backing field for TransmissionFactor. + /// + private float m_transmissionFactor = 0F; + + /// + /// Backing field for TransmissionTexture. + /// + private TextureInfo m_transmissionTexture; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The base percentage of light transmitted through the surface. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("transmissionFactor")] + public float TransmissionFactor { + get { + return this.m_transmissionFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("TransmissionFactor", value, "Expected value to be greater than or equal to 0"); + } + if ((value > 1D)) { + throw new System.ArgumentOutOfRangeException("TransmissionFactor", value, "Expected value to be less than or equal to 1"); + } + this.m_transmissionFactor = value; + } + } + + /// + /// A texture that defines the transmission percentage of the surface, sampled from the R channel. These values are linear, and will be multiplied by transmissionFactor. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("transmissionTexture")] + public TextureInfo TransmissionTexture { + get { + return this.m_transmissionTexture; + } + set { + this.m_transmissionTexture = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the TransmissionFactor property should be serialized. + /// + public bool ShouldSerializeTransmissionFactor() { + return ((m_transmissionFactor == 0F) + == false); + } + + /// + /// This method is used to determine if the TransmissionTexture property should be serialized. + /// + public bool ShouldSerializeTransmissionTexture() { + return ((m_transmissionTexture == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsUnlitGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsUnlitGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..0c1f5f4 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsUnlitGltfMaterialExtension.gen.cs @@ -0,0 +1,75 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines the unlit material model. + /// Sourced from the 'KHR_materials_unlit' extension + /// + public partial class MaterialsUnlitGltfMaterialExtension { + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsVolumeGltfMaterialExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsVolumeGltfMaterialExtension.gen.cs new file mode 100644 index 0000000..336e343 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MaterialsVolumeGltfMaterialExtension.gen.cs @@ -0,0 +1,185 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that defines the parameters for the volume of a material. + /// Sourced from the 'KHR_materials_volume' extension + /// + public partial class MaterialsVolumeGltfMaterialExtension { + + /// + /// Backing field for ThicknessFactor. + /// + private float m_thicknessFactor = 0F; + + /// + /// Backing field for ThicknessTexture. + /// + private TextureInfo m_thicknessTexture; + + /// + /// Backing field for AttenuationDistance. + /// + private System.Nullable m_attenuationDistance; + + /// + /// Backing field for AttenuationColor. + /// + private Brutal.Numerics.float3 m_attenuationColor = new Brutal.Numerics.float3(1F, 1F, 1F); + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Thickness of the volume. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("thicknessFactor")] + public float ThicknessFactor { + get { + return this.m_thicknessFactor; + } + set { + if ((value < 0D)) { + throw new System.ArgumentOutOfRangeException("ThicknessFactor", value, "Expected value to be greater than or equal to 0"); + } + this.m_thicknessFactor = value; + } + } + + /// + /// Texture that defines the thickness of the volume, stored in the G channel. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("thicknessTexture")] + public TextureInfo ThicknessTexture { + get { + return this.m_thicknessTexture; + } + set { + this.m_thicknessTexture = value; + } + } + + /// + /// Average distance that light travels in the medium before interacting with a particle. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("attenuationDistance")] + public System.Nullable AttenuationDistance { + get { + return this.m_attenuationDistance; + } + set { + if ((value <= 0D)) { + throw new System.ArgumentOutOfRangeException("AttenuationDistance", value, "Expected value to be greater than 0"); + } + this.m_attenuationDistance = value; + } + } + + /// + /// Color that white light turns into due to absorption when reaching the attenuation distance. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("attenuationColor")] + public Brutal.Numerics.float3 AttenuationColor { + get { + return this.m_attenuationColor; + } + set { + this.m_attenuationColor = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the ThicknessFactor property should be serialized. + /// + public bool ShouldSerializeThicknessFactor() { + return ((m_thicknessFactor == 0F) + == false); + } + + /// + /// This method is used to determine if the ThicknessTexture property should be serialized. + /// + public bool ShouldSerializeThicknessTexture() { + return ((m_thicknessTexture == null) + == false); + } + + /// + /// This method is used to determine if the AttenuationDistance property should be serialized. + /// + public bool ShouldSerializeAttenuationDistance() { + return ((m_attenuationDistance == null) + == false); + } + + /// + /// This method is used to determine if the AttenuationColor property should be serialized. + /// + public bool ShouldSerializeAttenuationColor() { + return ((m_attenuationColor == new Brutal.Numerics.float3(1F, 1F, 1F)) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Mesh.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Mesh.gen.cs new file mode 100644 index 0000000..b381b70 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Mesh.gen.cs @@ -0,0 +1,167 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A set of primitives to be rendered. Its global transform is defined by a node that references it. + /// + public partial class Mesh { + + /// + /// Backing field for Primitives. + /// + private MeshPrimitive[] m_primitives; + + /// + /// Backing field for Weights. + /// + private float[] m_weights; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// An array of primitives, each defining geometry to be rendered. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("primitives")] + public MeshPrimitive[] Primitives { + get { + return this.m_primitives; + } + set { + if ((value == null)) { + this.m_primitives = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_primitives = value; + } + } + + /// + /// Array of weights to be applied to the morph targets. The number of array elements **MUST** match the number of morph targets. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("weights")] + public float[] Weights { + get { + return this.m_weights; + } + set { + if ((value == null)) { + this.m_weights = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_weights = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Primitives property should be serialized. + /// + public bool ShouldSerializePrimitives() { + return ((m_primitives == null) + == false); + } + + /// + /// This method is used to determine if the Weights property should be serialized. + /// + public bool ShouldSerializeWeights() { + return ((m_weights == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/MeshPrimitive.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/MeshPrimitive.gen.cs new file mode 100644 index 0000000..b80bb9e --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/MeshPrimitive.gen.cs @@ -0,0 +1,239 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Geometry to be rendered with the given material. + /// + public partial class MeshPrimitive { + + /// + /// Backing field for Attributes. + /// + private System.Collections.Generic.Dictionary m_attributes; + + /// + /// Backing field for Indices. + /// + private System.Nullable m_indices; + + /// + /// Backing field for Material. + /// + private System.Nullable m_material; + + /// + /// Backing field for Mode. + /// + private ModeEnum m_mode = ModeEnum.Triangles; + + /// + /// Backing field for Targets. + /// + private System.Collections.Generic.Dictionary[] m_targets; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// A plain JSON object, where each key corresponds to a mesh attribute semantic and each value is the index of the accessor containing attribute's data. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("attributes")] + public System.Collections.Generic.Dictionary Attributes { + get { + return this.m_attributes; + } + set { + this.m_attributes = value; + } + } + + /// + /// The index of the accessor that contains the vertex indices. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("indices")] + public System.Nullable Indices { + get { + return this.m_indices; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Indices", value, "Expected value to be greater than or equal to 0"); + } + this.m_indices = value; + } + } + + /// + /// The index of the material to apply to this primitive when rendering. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("material")] + public System.Nullable Material { + get { + return this.m_material; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Material", value, "Expected value to be greater than or equal to 0"); + } + this.m_material = value; + } + } + + /// + /// The topology type of primitives to render. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("mode")] + public ModeEnum Mode { + get { + return this.m_mode; + } + set { + this.m_mode = value; + } + } + + /// + /// An array of morph targets. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("targets")] + public System.Collections.Generic.Dictionary[] Targets { + get { + return this.m_targets; + } + set { + if ((value == null)) { + this.m_targets = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_targets = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Attributes property should be serialized. + /// + public bool ShouldSerializeAttributes() { + return ((m_attributes == null) + == false); + } + + /// + /// This method is used to determine if the Indices property should be serialized. + /// + public bool ShouldSerializeIndices() { + return ((m_indices == null) + == false); + } + + /// + /// This method is used to determine if the Material property should be serialized. + /// + public bool ShouldSerializeMaterial() { + return ((m_material == null) + == false); + } + + /// + /// This method is used to determine if the Mode property should be serialized. + /// + public bool ShouldSerializeMode() { + return ((m_mode == ModeEnum.Triangles) + == false); + } + + /// + /// This method is used to determine if the Targets property should be serialized. + /// + public bool ShouldSerializeTargets() { + return ((m_targets == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// The topology type of primitives to render. + /// + public enum ModeEnum { + + Points = 0, + + Lines = 1, + + LineLoop = 2, + + LineStrip = 3, + + Triangles = 4, + + TriangleStrip = 5, + + TriangleFan = 6, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Node.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Node.gen.cs new file mode 100644 index 0000000..d05001b --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Node.gen.cs @@ -0,0 +1,363 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` **MUST** contain `JOINTS_0` and `WEIGHTS_0` attributes. A node **MAY** have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), `matrix` **MUST NOT** be present. + /// + public partial class Node { + + /// + /// Backing field for Camera. + /// + private System.Nullable m_camera; + + /// + /// Backing field for Children. + /// + private int[] m_children; + + /// + /// Backing field for Skin. + /// + private System.Nullable m_skin; + + /// + /// Backing field for Matrix. + /// + private Brutal.Numerics.float4x4 m_matrix = new Brutal.Numerics.float4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 1F); + + /// + /// Backing field for Mesh. + /// + private System.Nullable m_mesh; + + /// + /// Backing field for Rotation. + /// + private Brutal.Numerics.floatQuat m_rotation = new Brutal.Numerics.floatQuat(0F, 0F, 0F, 1F); + + /// + /// Backing field for Scale. + /// + private Brutal.Numerics.float3 m_scale = new Brutal.Numerics.float3(1F, 1F, 1F); + + /// + /// Backing field for Translation. + /// + private Brutal.Numerics.float3 m_translation = new Brutal.Numerics.float3(0F, 0F, 0F); + + /// + /// Backing field for Weights. + /// + private float[] m_weights; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the camera referenced by this node. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("camera")] + public System.Nullable Camera { + get { + return this.m_camera; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Camera", value, "Expected value to be greater than or equal to 0"); + } + this.m_camera = value; + } + } + + /// + /// The indices of this node's children. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("children")] + public int[] Children { + get { + return this.m_children; + } + set { + if ((value == null)) { + this.m_children = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + int index = 0; + for (index = 0; (index < value.Length); index = (index + 1)) { + if ((value[index] < 0)) { + throw new System.ArgumentOutOfRangeException(); + } + } + this.m_children = value; + } + } + + /// + /// The index of the skin referenced by this node. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("skin")] + public System.Nullable Skin { + get { + return this.m_skin; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Skin", value, "Expected value to be greater than or equal to 0"); + } + this.m_skin = value; + } + } + + /// + /// A floating-point 4x4 transformation matrix stored in column-major order. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("matrix")] + public Brutal.Numerics.float4x4 Matrix { + get { + return this.m_matrix; + } + set { + this.m_matrix = value; + } + } + + /// + /// The index of the mesh in this node. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("mesh")] + public System.Nullable Mesh { + get { + return this.m_mesh; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Mesh", value, "Expected value to be greater than or equal to 0"); + } + this.m_mesh = value; + } + } + + /// + /// The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("rotation")] + public Brutal.Numerics.floatQuat Rotation { + get { + return this.m_rotation; + } + set { + this.m_rotation = value; + } + } + + /// + /// The node's non-uniform scale, given as the scaling factors along the x, y, and z axes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("scale")] + public Brutal.Numerics.float3 Scale { + get { + return this.m_scale; + } + set { + this.m_scale = value; + } + } + + /// + /// The node's translation along the x, y, and z axes. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("translation")] + public Brutal.Numerics.float3 Translation { + get { + return this.m_translation; + } + set { + this.m_translation = value; + } + } + + /// + /// The weights of the instantiated morph target. The number of array elements **MUST** match the number of morph targets of the referenced mesh. When defined, `mesh` **MUST** also be defined. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("weights")] + public float[] Weights { + get { + return this.m_weights; + } + set { + if ((value == null)) { + this.m_weights = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + this.m_weights = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Camera property should be serialized. + /// + public bool ShouldSerializeCamera() { + return ((m_camera == null) + == false); + } + + /// + /// This method is used to determine if the Children property should be serialized. + /// + public bool ShouldSerializeChildren() { + return ((m_children == null) + == false); + } + + /// + /// This method is used to determine if the Skin property should be serialized. + /// + public bool ShouldSerializeSkin() { + return ((m_skin == null) + == false); + } + + /// + /// This method is used to determine if the Matrix property should be serialized. + /// + public bool ShouldSerializeMatrix() { + return ((m_matrix == new Brutal.Numerics.float4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 1F)) + == false); + } + + /// + /// This method is used to determine if the Mesh property should be serialized. + /// + public bool ShouldSerializeMesh() { + return ((m_mesh == null) + == false); + } + + /// + /// This method is used to determine if the Rotation property should be serialized. + /// + public bool ShouldSerializeRotation() { + return ((m_rotation == new Brutal.Numerics.floatQuat(0F, 0F, 0F, 1F)) + == false); + } + + /// + /// This method is used to determine if the Scale property should be serialized. + /// + public bool ShouldSerializeScale() { + return ((m_scale == new Brutal.Numerics.float3(1F, 1F, 1F)) + == false); + } + + /// + /// This method is used to determine if the Translation property should be serialized. + /// + public bool ShouldSerializeTranslation() { + return ((m_translation == new Brutal.Numerics.float3(0F, 0F, 0F)) + == false); + } + + /// + /// This method is used to determine if the Weights property should be serialized. + /// + public bool ShouldSerializeWeights() { + return ((m_weights == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Sampler.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Sampler.gen.cs new file mode 100644 index 0000000..4d1c20a --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Sampler.gen.cs @@ -0,0 +1,260 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Texture sampler properties for filtering and wrapping modes. + /// + public partial class Sampler { + + /// + /// Backing field for MagFilter. + /// + private System.Nullable m_magFilter; + + /// + /// Backing field for MinFilter. + /// + private System.Nullable m_minFilter; + + /// + /// Backing field for WrapS. + /// + private WrapSEnum m_wrapS = WrapSEnum.Repeat; + + /// + /// Backing field for WrapT. + /// + private WrapTEnum m_wrapT = WrapTEnum.Repeat; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// Magnification filter. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("magFilter")] + public System.Nullable MagFilter { + get { + return this.m_magFilter; + } + set { + this.m_magFilter = value; + } + } + + /// + /// Minification filter. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("minFilter")] + public System.Nullable MinFilter { + get { + return this.m_minFilter; + } + set { + this.m_minFilter = value; + } + } + + /// + /// S (U) wrapping mode. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("wrapS")] + public WrapSEnum WrapS { + get { + return this.m_wrapS; + } + set { + this.m_wrapS = value; + } + } + + /// + /// T (V) wrapping mode. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("wrapT")] + public WrapTEnum WrapT { + get { + return this.m_wrapT; + } + set { + this.m_wrapT = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the MagFilter property should be serialized. + /// + public bool ShouldSerializeMagFilter() { + return ((m_magFilter == null) + == false); + } + + /// + /// This method is used to determine if the MinFilter property should be serialized. + /// + public bool ShouldSerializeMinFilter() { + return ((m_minFilter == null) + == false); + } + + /// + /// This method is used to determine if the WrapS property should be serialized. + /// + public bool ShouldSerializeWrapS() { + return ((m_wrapS == WrapSEnum.Repeat) + == false); + } + + /// + /// This method is used to determine if the WrapT property should be serialized. + /// + public bool ShouldSerializeWrapT() { + return ((m_wrapT == WrapTEnum.Repeat) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + + /// + /// Enum part of the GLTF file schema + /// Magnification filter. + /// + public enum MagFilterEnum { + + Nearest = 9728, + + Linear = 9729, + } + + /// + /// Enum part of the GLTF file schema + /// Minification filter. + /// + public enum MinFilterEnum { + + Nearest = 9728, + + Linear = 9729, + + NearestMipmapNearest = 9984, + + LinearMipmapNearest = 9985, + + NearestMipmapLinear = 9986, + + LinearMipmapLinear = 9987, + } + + /// + /// Enum part of the GLTF file schema + /// S (U) wrapping mode. + /// + public enum WrapSEnum { + + ClampToEdge = 33071, + + MirroredRepeat = 33648, + + Repeat = 10497, + } + + /// + /// Enum part of the GLTF file schema + /// T (V) wrapping mode. + /// + public enum WrapTEnum { + + ClampToEdge = 33071, + + MirroredRepeat = 33648, + + Repeat = 10497, + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Scene.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Scene.gen.cs new file mode 100644 index 0000000..dd01499 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Scene.gen.cs @@ -0,0 +1,139 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// The root nodes of a scene. + /// + public partial class Scene { + + /// + /// Backing field for Nodes. + /// + private int[] m_nodes; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The indices of each root node. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("nodes")] + public int[] Nodes { + get { + return this.m_nodes; + } + set { + if ((value == null)) { + this.m_nodes = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + int index = 0; + for (index = 0; (index < value.Length); index = (index + 1)) { + if ((value[index] < 0)) { + throw new System.ArgumentOutOfRangeException(); + } + } + this.m_nodes = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Nodes property should be serialized. + /// + public bool ShouldSerializeNodes() { + return ((m_nodes == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Skin.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Skin.gen.cs new file mode 100644 index 0000000..a5185ad --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Skin.gen.cs @@ -0,0 +1,198 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Joints and matrices defining a skin. + /// + public partial class Skin { + + /// + /// Backing field for InverseBindMatrices. + /// + private System.Nullable m_inverseBindMatrices; + + /// + /// Backing field for Skeleton. + /// + private System.Nullable m_skeleton; + + /// + /// Backing field for Joints. + /// + private int[] m_joints; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the accessor containing the floating-point 4x4 inverse-bind matrices. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("inverseBindMatrices")] + public System.Nullable InverseBindMatrices { + get { + return this.m_inverseBindMatrices; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("InverseBindMatrices", value, "Expected value to be greater than or equal to 0"); + } + this.m_inverseBindMatrices = value; + } + } + + /// + /// The index of the node used as a skeleton root. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("skeleton")] + public System.Nullable Skeleton { + get { + return this.m_skeleton; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Skeleton", value, "Expected value to be greater than or equal to 0"); + } + this.m_skeleton = value; + } + } + + /// + /// Indices of skeleton nodes, used as joints in this skin. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("joints")] + public int[] Joints { + get { + return this.m_joints; + } + set { + if ((value == null)) { + this.m_joints = value; + return; + } + if ((value.Length < 1u)) { + throw new System.ArgumentException("Array not long enough"); + } + int index = 0; + for (index = 0; (index < value.Length); index = (index + 1)) { + if ((value[index] < 0)) { + throw new System.ArgumentOutOfRangeException(); + } + } + this.m_joints = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the InverseBindMatrices property should be serialized. + /// + public bool ShouldSerializeInverseBindMatrices() { + return ((m_inverseBindMatrices == null) + == false); + } + + /// + /// This method is used to determine if the Skeleton property should be serialized. + /// + public bool ShouldSerializeSkeleton() { + return ((m_skeleton == null) + == false); + } + + /// + /// This method is used to determine if the Joints property should be serialized. + /// + public bool ShouldSerializeJoints() { + return ((m_joints == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/Texture.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/Texture.gen.cs new file mode 100644 index 0000000..0731844 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/Texture.gen.cs @@ -0,0 +1,158 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// A texture and its sampler. + /// + public partial class Texture { + + /// + /// Backing field for Sampler. + /// + private System.Nullable m_sampler; + + /// + /// Backing field for Source. + /// + private System.Nullable m_source; + + /// + /// Backing field for Name. + /// + private string m_name; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering **SHOULD** be used. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("sampler")] + public System.Nullable Sampler { + get { + return this.m_sampler; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Sampler", value, "Expected value to be greater than or equal to 0"); + } + this.m_sampler = value; + } + } + + /// + /// The index of the image used by this texture. When undefined, an extension or other mechanism **SHOULD** supply an alternate texture source, otherwise behavior is undefined. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("source")] + public System.Nullable Source { + get { + return this.m_source; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Source", value, "Expected value to be greater than or equal to 0"); + } + this.m_source = value; + } + } + + /// + /// The user-defined name of this object. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] + public string Name { + get { + return this.m_name; + } + set { + this.m_name = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Sampler property should be serialized. + /// + public bool ShouldSerializeSampler() { + return ((m_sampler == null) + == false); + } + + /// + /// This method is used to determine if the Source property should be serialized. + /// + public bool ShouldSerializeSource() { + return ((m_source == null) + == false); + } + + /// + /// This method is used to determine if the Name property should be serialized. + /// + public bool ShouldSerializeName() { + return ((m_name == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/TextureBasisuGltfTextureExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/TextureBasisuGltfTextureExtension.gen.cs new file mode 100644 index 0000000..804681b --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/TextureBasisuGltfTextureExtension.gen.cs @@ -0,0 +1,104 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension to specify textures using the KTX v2 images with Basis Universal supercompression. + /// Sourced from the 'KHR_texture_basisu' extension + /// + public partial class TextureBasisuGltfTextureExtension { + + /// + /// Backing field for Source. + /// + private System.Nullable m_source; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the image which points to a KTX v2 resource with Basis Universal supercompression. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("source")] + public System.Nullable Source { + get { + return this.m_source; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Source", value, "Expected value to be greater than or equal to 0"); + } + this.m_source = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Source property should be serialized. + /// + public bool ShouldSerializeSource() { + return ((m_source == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/TextureInfo.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/TextureInfo.gen.cs new file mode 100644 index 0000000..14df79f --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/TextureInfo.gen.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// Reference to a texture. + /// + public partial class TextureInfo { + + /// + /// Backing field for Index. + /// + private int m_index; + + /// + /// Backing field for TexCoord. + /// + private int m_texCoord = 0; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The index of the texture. + /// + [System.Text.Json.Serialization.JsonRequiredAttribute()] + [System.Text.Json.Serialization.JsonPropertyNameAttribute("index")] + public int Index { + get { + return this.m_index; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("Index", value, "Expected value to be greater than or equal to 0"); + } + this.m_index = value; + } + } + + /// + /// The set index of texture's TEXCOORD attribute used for texture coordinate mapping. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("texCoord")] + public int TexCoord { + get { + return this.m_texCoord; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("TexCoord", value, "Expected value to be greater than or equal to 0"); + } + this.m_texCoord = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the TexCoord property should be serialized. + /// + public bool ShouldSerializeTexCoord() { + return ((m_texCoord == 0) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/GeneratedSchema/TextureTransformGltfTextureinfoExtension.gen.cs b/Brutal.Gltf/GltfApi/GeneratedSchema/TextureTransformGltfTextureinfoExtension.gen.cs new file mode 100644 index 0000000..b8bb543 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GeneratedSchema/TextureTransformGltfTextureinfoExtension.gen.cs @@ -0,0 +1,182 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Brutal.GltfApi { + using System.Linq; + using System.Runtime.Serialization; + using System.Text.Json.Serialization; + + + /// + /// Object part of the GLTF file schema + /// glTF extension that enables shifting and scaling UV coordinates on a per-texture basis + /// Sourced from the 'KHR_texture_transform' extension + /// + public partial class TextureTransformGltfTextureinfoExtension { + + /// + /// Backing field for Offset. + /// + private Brutal.Numerics.float2 m_offset = new Brutal.Numerics.float2(0F, 0F); + + /// + /// Backing field for Rotation. + /// + private float m_rotation = 0F; + + /// + /// Backing field for Scale. + /// + private Brutal.Numerics.float2 m_scale = new Brutal.Numerics.float2(1F, 1F); + + /// + /// Backing field for TexCoord. + /// + private System.Nullable m_texCoord; + + /// + /// Backing field for Extensions. + /// + private System.Collections.Generic.Dictionary m_extensions; + + /// + /// Backing field for Extras. + /// + private Extras m_extras; + + /// + /// The offset of the UV coordinate origin as a factor of the texture dimensions. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("offset")] + public Brutal.Numerics.float2 Offset { + get { + return this.m_offset; + } + set { + this.m_offset = value; + } + } + + /// + /// Rotate the UVs by this many radians counter-clockwise around the origin. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("rotation")] + public float Rotation { + get { + return this.m_rotation; + } + set { + this.m_rotation = value; + } + } + + /// + /// The scale factor applied to the components of the UV coordinates. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("scale")] + public Brutal.Numerics.float2 Scale { + get { + return this.m_scale; + } + set { + this.m_scale = value; + } + } + + /// + /// Overrides the textureInfo texCoord value if supplied, and if this extension is supported. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("texCoord")] + public System.Nullable TexCoord { + get { + return this.m_texCoord; + } + set { + if ((value < 0)) { + throw new System.ArgumentOutOfRangeException("TexCoord", value, "Expected value to be greater than or equal to 0"); + } + this.m_texCoord = value; + } + } + + /// + /// JSON object with extension-specific objects. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] + public System.Collections.Generic.Dictionary Extensions { + get { + return this.m_extensions; + } + set { + this.m_extensions = value; + } + } + + /// + /// Application-specific data. + /// + [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] + public Extras Extras { + get { + return this.m_extras; + } + set { + this.m_extras = value; + } + } + + /// + /// This method is used to determine if the Offset property should be serialized. + /// + public bool ShouldSerializeOffset() { + return ((m_offset == new Brutal.Numerics.float2(0F, 0F)) + == false); + } + + /// + /// This method is used to determine if the Rotation property should be serialized. + /// + public bool ShouldSerializeRotation() { + return ((m_rotation == 0F) + == false); + } + + /// + /// This method is used to determine if the Scale property should be serialized. + /// + public bool ShouldSerializeScale() { + return ((m_scale == new Brutal.Numerics.float2(1F, 1F)) + == false); + } + + /// + /// This method is used to determine if the TexCoord property should be serialized. + /// + public bool ShouldSerializeTexCoord() { + return ((m_texCoord == null) + == false); + } + + /// + /// This method is used to determine if the Extensions property should be serialized. + /// + public bool ShouldSerializeExtensions() { + return ((m_extensions == null) + == false); + } + + /// + /// This method is used to determine if the Extras property should be serialized. + /// + public bool ShouldSerializeExtras() { + return ((m_extras == null) + == false); + } + } +} diff --git a/Brutal.Gltf/GltfApi/Gltf.cs b/Brutal.Gltf/GltfApi/Gltf.cs new file mode 100644 index 0000000..10a1e57 --- /dev/null +++ b/Brutal.Gltf/GltfApi/Gltf.cs @@ -0,0 +1,24 @@ +namespace Brutal.GltfApi; + +public partial class Gltf : IExtensionGltfObject +{ + /// + /// Wraps light data for the KHR_lights_punctual extension. + /// + private LightsPunctualGltfDocumentExtension? m_lightData; + + /// + /// Gets the extension data for KHR_lights_punctual if it exists. + /// This extension contains information about punctual lights in the scene. + /// If the extension is not present, this property returns null. + /// + public LightsPunctualGltfDocumentExtension? LightData + { + get + { + if (m_lightData == null) + m_lightData = this.GetExtension("KHR_lights_punctual"); + return m_lightData; + } + } +} diff --git a/Brutal.Gltf/GltfApi/GltfLoader.Transform.cs b/Brutal.Gltf/GltfApi/GltfLoader.Transform.cs new file mode 100644 index 0000000..bf601ca --- /dev/null +++ b/Brutal.Gltf/GltfApi/GltfLoader.Transform.cs @@ -0,0 +1,621 @@ +using System.Buffers; +using System.Runtime.InteropServices; + +namespace Brutal.GltfApi; + +public static partial class GltfLoaderExtensions +{ + // Byte offsets within a float element for each component + private const int OffX = 0; + private const int OffY = 4; + private const int OffZ = 8; + private const int OffW = 12; + + // Per-element strides for common GLTF accessor types + private const int StrideFloat3 = 12; // vec3 + private const int StrideFloat4 = 16; // vec4 / quaternion + private const int StrideMatrix = 64; // mat4 + + // Byte offsets of each Mij within a row-major float4x4 (System.Numerics layout) + // Row 1: M11= 0 M12= 4 M13= 8 M14=12 + // Row 2: M21=16 M22=20 M23=24 M24=28 + // Row 3: M31=32 M32=36 M33=40 M34=44 + // Row 4: M41=48 M42=52 M43=56 M44=60 + private const int M11 = 0; + private const int M12 = 4; + private const int M13 = 8; + private const int M14 = 12; + private const int M21 = 16; + private const int M22 = 20; + private const int M23 = 24; + private const int M24 = 28; + private const int M31 = 32; + private const int M32 = 36; + private const int M33 = 40; + private const int M34 = 44; + private const int M41 = 48; + private const int M42 = 52; + private const int M43 = 56; + + /// + /// Flips all loaded GLTF data from right-handed (GLTF standard) to left-handed coordinates + /// by negating the Z axis. Call immediately after loading, before extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (Z negated) and rotations (X, Y components negated) + /// Node explicit matrix transforms (Z row and Z column negated) + /// Mesh vertex positions and normals (Z negated) + /// Mesh tangents (Z negated, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (Z row and Z column negated) + /// Animation translation tracks (Z negated) + /// Animation rotation tracks (X, Y components negated) + /// + /// + /// + public static void FlipHandedness(this GltfLoader loader) => FlipZAxis(loader); + + /// + /// Flips all loaded GLTF data from right-handed (GLTF standard) to left-handed coordinates + /// by negating the Z axis. Call immediately after loading, before extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (Z negated) and rotations (X, Y components negated) + /// Node explicit matrix transforms (Z row and Z column negated) + /// Mesh vertex positions and normals (Z negated) + /// Mesh tangents (Z negated, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (Z row and Z column negated) + /// Animation translation tracks (Z negated) + /// Animation rotation tracks (X, Y components negated) + /// + /// + /// + public static void FlipZAxis(this GltfLoader loader) => + FlipAxisImpl(loader, OffZ, OffX, OffY, [M31, M32, M34, M13, M23, M43]); + + /// + /// Inverts the X axis of all loaded GLTF data. Call immediately after loading, before + /// extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (X negated) and rotations (Y, Z components negated) + /// Node explicit matrix transforms (X row and X column negated) + /// Mesh vertex positions and normals (X negated) + /// Mesh tangents (X negated, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (X row and X column negated) + /// Animation translation tracks (X negated) + /// Animation rotation tracks (Y, Z components negated) + /// + /// + /// + public static void FlipXAxis(this GltfLoader loader) => + FlipAxisImpl(loader, OffX, OffY, OffZ, [M12, M13, M14, M21, M31, M41]); + + /// + /// Inverts the Y axis of all loaded GLTF data. Call immediately after loading, before + /// extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (Y negated) and rotations (X, Z components negated) + /// Node explicit matrix transforms (Y row and Y column negated) + /// Mesh vertex positions and normals (Y negated) + /// Mesh tangents (Y negated, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (Y row and Y column negated) + /// Animation translation tracks (Y negated) + /// Animation rotation tracks (X, Z components negated) + /// + /// + /// + public static void FlipYAxis(this GltfLoader loader) => + FlipAxisImpl(loader, OffY, OffX, OffZ, [M21, M23, M24, M12, M32, M42]); + + /// + /// Swaps the Y and Z axes of all loaded GLTF data. Call immediately after loading, before + /// extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (Y and Z swapped) and rotations (Y and Z components swapped, W negated) + /// Node explicit matrix transforms (Y and Z rows and columns swapped) + /// Mesh vertex positions and normals (Y and Z swapped) + /// Mesh tangents (Y and Z swapped, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (Y and Z rows and columns swapped) + /// Animation translation tracks (Y and Z swapped) + /// Animation rotation tracks (Y and Z components swapped, W negated) + /// + /// + /// + public static void SwapYZAxes(this GltfLoader loader) => + SwapAxesImpl(loader, OffY, OffZ, [M12, M13, M21, M31, M22, M33, M23, M32, M24, M34, M42, M43]); + + /// + /// Swaps the X and Y axes of all loaded GLTF data. Call immediately after loading, before + /// extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (X and Y swapped) and rotations (X and Y components swapped, W negated) + /// Node explicit matrix transforms (X and Y rows and columns swapped) + /// Mesh vertex positions and normals (X and Y swapped) + /// Mesh tangents (X and Y swapped, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (X and Y rows and columns swapped) + /// Animation translation tracks (X and Y swapped) + /// Animation rotation tracks (X and Y components swapped, W negated) + /// + /// + /// + public static void SwapXYAxes(this GltfLoader loader) => + SwapAxesImpl(loader, OffX, OffY, [M11, M22, M12, M21, M13, M23, M14, M24, M31, M32, M41, M42]); + + /// + /// Swaps the X and Z axes of all loaded GLTF data. Call immediately after loading, before + /// extracting any assets. + /// + /// Affects: + /// + /// Node TRS translations (X and Z swapped) and rotations (X and Z components swapped, W negated) + /// Node explicit matrix transforms (X and Z rows and columns swapped) + /// Mesh vertex positions and normals (X and Z swapped) + /// Mesh tangents (X and Z swapped, handedness sign W negated) + /// Index buffers (triangle winding reversed) + /// Skin inverse bind matrices (X and Z rows and columns swapped) + /// Animation translation tracks (X and Z swapped) + /// Animation rotation tracks (X and Z components swapped, W negated) + /// + /// + /// + public static void SwapXZAxes(this GltfLoader loader) => + SwapAxesImpl(loader, OffX, OffZ, [M11, M33, M12, M32, M13, M31, M14, M34, M21, M23, M41, M43]); + + /// + /// Uniformly scales all loaded GLTF positional data by . Call immediately + /// after loading, before extracting any assets. + /// + /// Rotations, local TRS scale values, normals, and tangents are left unchanged. They are + /// dimensionless direction vectors unaffected by a unit change. + /// + /// + /// Affects: + /// + /// Node TRS translations (multiplied by scale) + /// Node explicit matrix transforms (translation row multiplied by scale) + /// Mesh vertex positions (multiplied by scale) + /// Skin inverse bind matrices (translation row multiplied by scale) + /// Animation translation tracks (multiplied by scale) + /// + /// + /// + public static void Scale(this GltfLoader loader, float scale) + { + var gltf = loader.GltfJson; + var processedAccessors = ArrayPool.Shared.Rent(gltf.Accessors.Length); + Array.Clear(processedAccessors, 0, gltf.Accessors.Length); + + // Nodes: scale TRS translation and explicit matrix translation row + foreach (var node in gltf.Nodes) + { + var t = node.Translation; + node.Translation = new float3(t.X * scale, t.Y * scale, t.Z * scale); + node.Matrix = ScaleMatrixTranslation(node.Matrix, scale); + } + + // Mesh accessor data: positions only (normals and tangents are direction vectors) + foreach (var mesh in gltf.Meshes) + foreach (var prim in mesh.Primitives) + { + if (prim == null) + continue; + + if (prim.Attributes.TryGetValue("POSITION", out var posIdx) && AddToSet(processedAccessors, posIdx)) + { + var span = loader.GetAccessorBufferSpan(posIdx); + ScaleComponent(span, StrideFloat3, OffX, scale); + ScaleComponent(span, StrideFloat3, OffY, scale); + ScaleComponent(span, StrideFloat3, OffZ, scale); + } + } + + // Skin inverse bind matrices: translation row only + if (gltf.Skins != null) + foreach (var skin in gltf.Skins) + if (skin.InverseBindMatrices.HasValue && AddToSet(processedAccessors, skin.InverseBindMatrices.Value)) + ScaleMatrixTranslationArray(loader.GetAccessorBufferSpan(skin.InverseBindMatrices.Value), scale); + + // Animation translation tracks + if (gltf.Animations != null) + foreach (var anim in gltf.Animations) + foreach (var channel in anim.Channels) + { + if (channel.Target.Node == null) + continue; + var sampler = anim.Samplers[channel.Sampler]; + if ( + channel.Target.Path == AnimationChannelTarget.PathEnum.Translation + && AddToSet(processedAccessors, sampler.Output) + ) + { + var span = loader.GetAccessorBufferSpan(sampler.Output); + ScaleComponent(span, StrideFloat3, OffX, scale); + ScaleComponent(span, StrideFloat3, OffY, scale); + ScaleComponent(span, StrideFloat3, OffZ, scale); + } + } + + ArrayPool.Shared.Return(processedAccessors); + } + + #region Private helpers + + /// + /// Iterates over a raw accessor buffer treating it as an array of fixed-size elements and + /// negates one float at within each element. + /// Works for any element size and any float component inside it. + /// + private static unsafe void NegateComponent( + ReadOnlySpan buffer, + int elementByteStride, + int componentByteOffset + ) + { + fixed (byte* basePtr = &MemoryMarshal.GetReference(buffer)) + { + var ptr = basePtr + componentByteOffset; + var end = basePtr + buffer.Length; + while (ptr < end) + { + *(float*)ptr = -*(float*)ptr; + ptr += elementByteStride; + } + } + } + + /// + /// Iterates over a raw accessor buffer and swaps two float components within each element. + /// + private static unsafe void SwapComponents( + ReadOnlySpan buffer, + int elementByteStride, + int componentByteOffsetA, + int componentByteOffsetB + ) + { + fixed (byte* basePtr = &MemoryMarshal.GetReference(buffer)) + { + var ptrA = basePtr + componentByteOffsetA; + var ptrB = basePtr + componentByteOffsetB; + var end = basePtr + buffer.Length; + while (ptrA < end) + { + (*(float*)ptrA, *(float*)ptrB) = (*(float*)ptrB, *(float*)ptrA); + ptrA += elementByteStride; + ptrB += elementByteStride; + } + } + } + + private static unsafe void ScaleComponent( + ReadOnlySpan buffer, + int elementByteStride, + int componentByteOffset, + float scale + ) + { + fixed (byte* basePtr = &MemoryMarshal.GetReference(buffer)) + { + var ptr = basePtr + componentByteOffset; + var end = basePtr + buffer.Length; + while (ptr < end) + { + *(float*)ptr *= scale; + ptr += elementByteStride; + } + } + } + + private static float4x4 ScaleMatrixTranslation(float4x4 m, float scale) + { + m.M41 *= scale; + m.M42 *= scale; + m.M43 *= scale; + return m; + } + + private static void ScaleMatrixTranslationArray(ReadOnlySpan buffer, float scale) + { + ScaleComponent(buffer, StrideMatrix, M41, scale); + ScaleComponent(buffer, StrideMatrix, M42, scale); + ScaleComponent(buffer, StrideMatrix, M43, scale); + } + + // Shared implementation for FlipXAxis / FlipYAxis / FlipZAxis. + // vecOff : byte offset of the vector component to negate (OffX / OffY / OffZ) + // quatOffA/B : byte offsets of the two OTHER quat imaginary components to negate + // matOffsets : 6 matrix byte offsets: 3 off-diagonal row elements + 3 off-diagonal + // col elements for the negated axis (diagonal is double-negated → +ve) + private static void FlipAxisImpl( + GltfLoader loader, + int vecOff, + int quatOffA, + int quatOffB, + ReadOnlySpan matOffsets + ) + { + var gltf = loader.GltfJson; + var processedAccessors = ArrayPool.Shared.Rent(gltf.Accessors.Length); + Array.Clear(processedAccessors, 0, gltf.Accessors.Length); + + // Nodes: negate the relevant TRS translation component, rotate quaternion, flip matrix + foreach (var node in gltf.Nodes) + { + node.Translation = NegateFloat3Component(node.Translation, vecOff); + node.Rotation = NegateQuatComponents(node.Rotation, quatOffA, quatOffB); + node.Matrix = NegateMatrixElements(node.Matrix, matOffsets); + } + + // Mesh accessor data: positions, normals, tangents, index winding + foreach (var mesh in gltf.Meshes) + foreach (var prim in mesh.Primitives) + { + if (prim == null) + continue; + + if (prim.Attributes.TryGetValue("POSITION", out var posIdx) && AddToSet(processedAccessors, posIdx)) + NegateComponent(loader.GetAccessorBufferSpan(posIdx), StrideFloat3, vecOff); + + if (prim.Attributes.TryGetValue("NORMAL", out var normIdx) && AddToSet(processedAccessors, normIdx)) + NegateComponent(loader.GetAccessorBufferSpan(normIdx), StrideFloat3, vecOff); + + if (prim.Attributes.TryGetValue("TANGENT", out var tangIdx) && AddToSet(processedAccessors, tangIdx)) + { + // Negate the axis component and the handedness sign W: reflecting one axis flips + // the tangent frame orientation + NegateComponent(loader.GetAccessorBufferSpan(tangIdx), StrideFloat4, vecOff); + NegateComponent(loader.GetAccessorBufferSpan(tangIdx), StrideFloat4, OffW); + } + + if (prim.Indices.HasValue && AddToSet(processedAccessors, prim.Indices.Value)) + FlipTriangleWinding( + loader.GetAccessorBufferSpan(prim.Indices.Value), + gltf.Accessors[prim.Indices.Value].ComponentType + ); + } + + // Skin inverse bind matrices + if (gltf.Skins != null) + foreach (var skin in gltf.Skins) + if (skin.InverseBindMatrices.HasValue && AddToSet(processedAccessors, skin.InverseBindMatrices.Value)) + NegateMatrixElementsArray(loader.GetAccessorBufferSpan(skin.InverseBindMatrices.Value), matOffsets); + + // Animation translation and rotation tracks + if (gltf.Animations != null) + foreach (var anim in gltf.Animations) + foreach (var channel in anim.Channels) + { + if (channel.Target.Node == null) + continue; + var sampler = anim.Samplers[channel.Sampler]; + if ( + channel.Target.Path == AnimationChannelTarget.PathEnum.Translation + && AddToSet(processedAccessors, sampler.Output) + ) + NegateComponent(loader.GetAccessorBufferSpan(sampler.Output), StrideFloat3, vecOff); + else if ( + channel.Target.Path == AnimationChannelTarget.PathEnum.Rotation + && AddToSet(processedAccessors, sampler.Output) + ) + { + NegateComponent(loader.GetAccessorBufferSpan(sampler.Output), StrideFloat4, quatOffA); + NegateComponent(loader.GetAccessorBufferSpan(sampler.Output), StrideFloat4, quatOffB); + } + } + + ArrayPool.Shared.Return(processedAccessors); + } + + // Negates the float3 component at the given byte offset (OffX / OffY / OffZ). + private static float3 NegateFloat3Component(float3 v, int off) => + off switch + { + OffX => new float3(-v.X, v.Y, v.Z), + OffY => new float3(v.X, -v.Y, v.Z), + _ => new float3(v.X, v.Y, -v.Z), + }; + + // Negates the two imaginary quaternion components at offA and offB. + // Used when reflecting through an axis: the other two imaginaries are negated, W is unchanged. + private static floatQuat NegateQuatComponents(floatQuat r, int offA, int offB) => + new floatQuat( + offA == OffX || offB == OffX ? -r.X : r.X, + offA == OffY || offB == OffY ? -r.Y : r.Y, + offA == OffZ || offB == OffZ ? -r.Z : r.Z, + r.W + ); + + // Negates the 6 float4x4 elements at the given byte offsets (row + column of the flipped axis, + // excluding the diagonal which is double-negated back to positive). + private static unsafe float4x4 NegateMatrixElements(float4x4 m, ReadOnlySpan byteOffsets) + { + var mPtr = (byte*)&m; + foreach (var off in byteOffsets) + *(float*)(mPtr + off) = -*(float*)(mPtr + off); + return m; + } + + private static void NegateMatrixElementsArray(ReadOnlySpan buffer, ReadOnlySpan byteOffsets) + { + foreach (var off in byteOffsets) + NegateComponent(buffer, StrideMatrix, off); + } + + // Shared implementation for SwapXYAxes / SwapXZAxes / SwapYZAxes. + // vecOffA / vecOffB : byte offsets of the two vector components to swap (OffX/OffY/OffZ) + // matSwapPairs : interleaved pairs of matrix byte offsets to swap: + // elements at index 2i and 2i+1 form one swap pair. + // Encodes P*mat*P for the corresponding axis permutation P. + private static void SwapAxesImpl(GltfLoader loader, int vecOffA, int vecOffB, ReadOnlySpan matSwapPairs) + { + var gltf = loader.GltfJson; + var processedAccessors = ArrayPool.Shared.Rent(gltf.Accessors.Length); + Array.Clear(processedAccessors, 0, gltf.Accessors.Length); + + // Nodes: swap the relevant TRS translation components, rotate quaternion, permute matrix + foreach (var node in gltf.Nodes) + { + node.Translation = SwapFloat3Components(node.Translation, vecOffA, vecOffB); + node.Rotation = SwapQuatComponentsNegateW(node.Rotation, vecOffA, vecOffB); + node.Matrix = SwapMatrixElements(node.Matrix, matSwapPairs); + } + + // Mesh accessor data: positions, normals, tangents, index winding + foreach (var mesh in gltf.Meshes) + foreach (var prim in mesh.Primitives) + { + if (prim == null) + continue; + + if (prim.Attributes.TryGetValue("POSITION", out var posIdx) && AddToSet(processedAccessors, posIdx)) + SwapComponents(loader.GetAccessorBufferSpan(posIdx), StrideFloat3, vecOffA, vecOffB); + + if (prim.Attributes.TryGetValue("NORMAL", out var normIdx) && AddToSet(processedAccessors, normIdx)) + SwapComponents(loader.GetAccessorBufferSpan(normIdx), StrideFloat3, vecOffA, vecOffB); + + if (prim.Attributes.TryGetValue("TANGENT", out var tangIdx) && AddToSet(processedAccessors, tangIdx)) + { + // Swap the two axis components; negate handedness sign W because any axis swap + // is a reflection (det = -1), which flips the tangent frame orientation + SwapComponents(loader.GetAccessorBufferSpan(tangIdx), StrideFloat4, vecOffA, vecOffB); + NegateComponent(loader.GetAccessorBufferSpan(tangIdx), StrideFloat4, OffW); + } + + if (prim.Indices.HasValue && AddToSet(processedAccessors, prim.Indices.Value)) + FlipTriangleWinding( + loader.GetAccessorBufferSpan(prim.Indices.Value), + gltf.Accessors[prim.Indices.Value].ComponentType + ); + } + + // Skin inverse bind matrices + if (gltf.Skins != null) + foreach (var skin in gltf.Skins) + if (skin.InverseBindMatrices.HasValue && AddToSet(processedAccessors, skin.InverseBindMatrices.Value)) + SwapMatrixElementsArray(loader.GetAccessorBufferSpan(skin.InverseBindMatrices.Value), matSwapPairs); + + // Animation translation and rotation tracks + if (gltf.Animations != null) + foreach (var anim in gltf.Animations) + foreach (var channel in anim.Channels) + { + if (channel.Target.Node == null) + continue; + var sampler = anim.Samplers[channel.Sampler]; + if ( + channel.Target.Path == AnimationChannelTarget.PathEnum.Translation + && AddToSet(processedAccessors, sampler.Output) + ) + SwapComponents(loader.GetAccessorBufferSpan(sampler.Output), StrideFloat3, vecOffA, vecOffB); + else if ( + channel.Target.Path == AnimationChannelTarget.PathEnum.Rotation + && AddToSet(processedAccessors, sampler.Output) + ) + { + // GLTF stores quaternions as float4(X, Y, Z, W): swap the two imaginary + // components and negate W (same reflection logic as the tangent handedness) + SwapComponents(loader.GetAccessorBufferSpan(sampler.Output), StrideFloat4, vecOffA, vecOffB); + NegateComponent(loader.GetAccessorBufferSpan(sampler.Output), StrideFloat4, OffW); + } + } + + ArrayPool.Shared.Return(processedAccessors); + } + + // Swaps the two float3 components at the given byte offsets (OffX / OffY / OffZ). + private static float3 SwapFloat3Components(float3 v, int offA, int offB) => + (offA, offB) switch + { + (OffX, OffY) or (OffY, OffX) => new float3(v.Y, v.X, v.Z), + (OffX, OffZ) or (OffZ, OffX) => new float3(v.Z, v.Y, v.X), + _ => new float3(v.X, v.Z, v.Y), // Y↔Z + }; + + // Swaps two imaginary quaternion components at offA / offB and negates W. + // Used for axis swaps: any swap of two axes is a reflection (det = -1), which requires + // swapping the corresponding imaginary parts and reversing the rotation sense via -W. + private static floatQuat SwapQuatComponentsNegateW(floatQuat r, int offA, int offB) => + (offA, offB) switch + { + (OffX, OffY) or (OffY, OffX) => new floatQuat(r.Y, r.X, r.Z, -r.W), + (OffX, OffZ) or (OffZ, OffX) => new floatQuat(r.Z, r.Y, r.X, -r.W), + _ => new floatQuat(r.X, r.Z, r.Y, -r.W), // Y↔Z + }; + + // Swaps float4x4 element pairs at the given interleaved byte offsets (pair i = [2i], [2i+1]). + // Encodes the P*mat*P permutation for whichever axis pair is being swapped. + private static unsafe float4x4 SwapMatrixElements(float4x4 m, ReadOnlySpan swapPairs) + { + var mPtr = (byte*)&m; + for (var i = 0; i < swapPairs.Length; i += 2) + { + var a = (float*)(mPtr + swapPairs[i]); + var b = (float*)(mPtr + swapPairs[i + 1]); + (*a, *b) = (*b, *a); + } + return m; + } + + private static void SwapMatrixElementsArray(ReadOnlySpan buffer, ReadOnlySpan swapPairs) + { + for (var i = 0; i < swapPairs.Length; i += 2) + SwapComponents(buffer, StrideMatrix, swapPairs[i], swapPairs[i + 1]); + } + + /// Reverse triangle winding by swapping the second and third index of every triple. + private static unsafe void FlipTriangleWinding(ReadOnlySpan buffer, Accessor.ComponentTypeEnum componentType) + { + fixed (byte* ptr = &MemoryMarshal.GetReference(buffer)) + { + switch (componentType) + { + case Accessor.ComponentTypeEnum.UnsignedInt: + { + var span = new Span(ptr, buffer.Length / sizeof(uint)); + for (var i = 0; i + 2 < span.Length; i += 3) + (span[i + 1], span[i + 2]) = (span[i + 2], span[i + 1]); + break; + } + case Accessor.ComponentTypeEnum.UnsignedShort: + { + var span = new Span(ptr, buffer.Length / sizeof(ushort)); + for (var i = 0; i + 2 < span.Length; i += 3) + (span[i + 1], span[i + 2]) = (span[i + 2], span[i + 1]); + break; + } + case Accessor.ComponentTypeEnum.UnsignedByte: + { + var span = new Span(ptr, buffer.Length); + for (var i = 0; i + 2 < span.Length; i += 3) + (span[i + 1], span[i + 2]) = (span[i + 2], span[i + 1]); + break; + } + } + } + } + + private static bool AddToSet(Span set, int index) + { + if (set[index]) + return false; + set[index] = true; + return true; + } + + #endregion +} diff --git a/Brutal.Gltf/GltfApi/GltfLoader.cs b/Brutal.Gltf/GltfApi/GltfLoader.cs new file mode 100644 index 0000000..170f042 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GltfLoader.cs @@ -0,0 +1,328 @@ +using Brutal.TextureApi; + +namespace Brutal.GltfApi; + +/// +/// Interface for a glTF loader +/// +public interface IGltfLoader +{ + /// + /// Gltf Json object + /// + public Gltf GltfJson { get; } + + /// + /// Gets a span of bytes for a specific buffer view + /// + /// Index of buffer view + /// Buffer view as byte span + public ReadOnlySpan GetBufferView(int bufferViewIndex); +} + +/// +/// Interface for a glTF loader that caches loaded data +/// +public interface IGltfCachedLoader : IGltfLoader +{ + /// + /// Gets a cached buffer or loads it from the glTF file if not already loaded. + /// + /// Index of buffer + /// Buffer's contents as byte span + public ReadOnlySpan GetOrLoadBuffer(int bufferIndex); + + /// + /// Gets a cached image or loads it from the glTF file if not already loaded. + /// + /// Index of image + /// Optional texture load info + /// Image loaded as ITexture + public ITexture GetOrLoadImage(int imageIndex, TextureLoadSettings? loadInfo = null); +} + +/// +/// Helper class for loading glTF files +/// This class caches loaded glTF json and binary buffers +/// +public class GltfLoader : IGltfCachedLoader, IDisposable +{ + /// + /// Source path of the glTF file, if loaded from a file + /// + public string FilePath { get; set; } = string.Empty; + + /// + /// Optional function to resolve image data externally + /// This can be used to load images from a custom source, such as a network or + /// a custom image format. + /// If empty, the loader will attempt to load images as files relative to the glTF file path + /// + public Func? ExternalResolveImage { get; set; } + + /// + /// Optional function to resolve binary buffer data externally + /// This can be used to load binary buffers from a custom source + /// If empty, the loader will attempt to load buffers as files relative to the glTF file path + /// This is useful for cases where the glTF file references external binary buffers. + /// + public Func? ExternalResolveBuffer { get; set; } + + /// + /// Parsed Gltf Json object + /// This contains all the metadata about the glTF file, such as meshes, materials, + /// textures, and animations. + /// + public Gltf GltfJson { get; } + + /// + /// Array of loaded binary buffers, cached as byte arrays when needed + /// Each buffer corresponds to a buffer in the glTF file. + /// If a buffer is not loaded, it will be null in the array. + /// This is used to avoid reloading buffers multiple times during a load operation. + /// + public byte[]?[] LoadedBuffers { get; } + + /// + /// Array of loaded images, cached as ITexture objects + /// Each image corresponds to a texture in the glTF file. + /// This is used to avoid reloading images multiple times during a load operation. + /// If an image is not loaded, it will be null in the array. + /// + public ITexture?[] LoadedImages { get; } + + /// + /// Constructor for GltfLoader + /// Initializes the GltfJson object by loading the glTF file from the specified file path + /// and initializes the LoadedBuffers and LoadedImages arrays. + /// + /// Path to glTF file + public GltfLoader(string filePath) + { + GltfJson = GltfUtility.LoadModel(filePath); + LoadedBuffers = new byte[GltfJson.Buffers?.Length ?? 0][]; + LoadedImages = new ITexture[GltfJson.Images?.Length ?? 0]; + FilePath = filePath; + } + + /// + public void Dispose() + { + for (var index = 0; index < LoadedImages.Length; index++) + { + var image = LoadedImages[index]; + if (image is not null) + TextureApi.TextureLoader.Unload(image); + LoadedImages[index] = null; + } + } + + /// + /// Accesses cached loaded buffer or loads it from the glTF file if not already loaded. + /// + /// Buffer index + /// Span of bytes encompassing entire buffer + /// + /// + public ReadOnlySpan GetOrLoadBuffer(int bufferIndex) + { + if (bufferIndex < 0 || bufferIndex >= LoadedBuffers.Length) + throw new IndexOutOfRangeException($"Buffer index {bufferIndex} is out of range."); + + var buffer = LoadedBuffers[bufferIndex]; + if (buffer == null) + { + // Load the buffer from the glTF file + if (ExternalResolveBuffer is null) + buffer = GltfJson.LoadBinaryBuffer(bufferIndex, FilePath); + else + buffer = GltfJson.LoadBinaryBuffer(bufferIndex, ExternalResolveBuffer); + // Cache the loaded buffer + LoadedBuffers[bufferIndex] = + buffer ?? throw new InvalidOperationException($"Failed to load buffer at index {bufferIndex}."); + } + + return new ReadOnlySpan(buffer); + } + + /// + /// Accesses a span of buffer memory for a specific buffer view. + /// This method retrieves the buffer view from the glTF JSON and returns a span of bytes + /// Buffers are loaded on demand and cached for future access. + /// + /// Index of buffer view + /// Span of bytes matching buffer view + /// + public ReadOnlySpan GetBufferView(int bufferViewIndex) + { + if (bufferViewIndex < 0 || bufferViewIndex >= GltfJson.BufferViews.Length) + throw new IndexOutOfRangeException($"Buffer view index {bufferViewIndex} is out of range."); + + // Get the buffer view from the glTF JSON + var bufferIndex = GltfJson.BufferViews[bufferViewIndex].Buffer; + var bufferSpan = GetOrLoadBuffer(bufferIndex); + return bufferSpan.Slice( + GltfJson.BufferViews[bufferViewIndex].ByteOffset, + GltfJson.BufferViews[bufferViewIndex].ByteLength + ); + } + + /// + /// Load image with different strategies based on how it is embedded in the glTF file. + /// + /// + /// + /// + /// + protected ITexture LoadImage(int imageIndex, TextureLoadSettings? loadInfo) + { + var image = GltfJson.Images[imageIndex]; + // If texture embedded in buffer, extract it here + if (image.BufferView.HasValue) + { + var bufferViewSpan = GetBufferView(image.BufferView.Value); + if (image.MimeType is null) + throw new InvalidOperationException( + $"Image at index {imageIndex} is embedded in a buffer view but has no mime type." + ); + return TextureLoader.LoadFromMemory( + bufferViewSpan, + image.MimeType switch + { + Image.MimeTypeJpeg => TextureLoader.FormatType.Jpg, + Image.MimeTypePng => TextureLoader.FormatType.Png, + _ => throw new NotSupportedException( + $"Image at index {imageIndex} has MIME type '{image.MimeType}', which this loader cannot decode." + ), + }, + loadInfo + ); + } + // If texture embedded in URI, load it from the embedded data + if (image.IsEmbedded()) + { + var embedded = image.OpenEmbeddedImage(out var extension); + if (string.IsNullOrEmpty(extension)) + throw new InvalidOperationException($"Image at index {imageIndex} is embedded but has no extension."); + if (extension[0] != '.') + extension = "." + extension; + return TextureLoader.LoadFromMemory(embedded, TextureLoader.GetFormatType(extension), loadInfo); + } + if (string.IsNullOrEmpty(image.Uri)) + throw new InvalidOperationException($"Image at index {imageIndex} has no URI or buffer view."); + // If image is not embedded, load it from file or external source + if (ExternalResolveImage is not null) + { + // Use external resolver if provided + var imageData = ExternalResolveImage(image.Uri); + if (imageData is not { Length: > 0 }) + throw new InvalidOperationException( + $"Failed to resolve image at index {imageIndex} using external resolver." + ); + return TextureLoader.LoadFromMemory(imageData, TextureLoader.GetFormatType(image.Uri), loadInfo); + } + return TextureLoader.LoadFromFile( + Path.Combine(Path.GetDirectoryName(FilePath) ?? string.Empty, image.Uri), + loadInfo + ); + } + + /// + /// Gets an image by index: loads it if not already loaded. + /// This method retrieves an image from the cache or loads it from the glTF file if it has not been loaded yet. + /// The image is cached in the LoadedImages array to avoid reloading it multiple times. + /// + /// Index of image + /// + /// Image loaded as ITexture + /// + public ITexture GetOrLoadImage(int imageIndex, TextureLoadSettings? loadInfo = null) + { + if (imageIndex < 0 || imageIndex >= LoadedImages.Length) + throw new IndexOutOfRangeException($"Image index {imageIndex} is out of range."); + + var image = LoadedImages[imageIndex]; + if (image is null) + { + image = LoadImage(imageIndex, loadInfo); + LoadedImages[imageIndex] = image; + } + return image; + } + + /// + /// Save GLTF data to a packed .GLB file + /// + /// File path to save .glb + /// + /// + public void SaveAsGlb(string outputFilePath) + { + using var stream = File.Create(outputFilePath); + SaveAsGlb(stream); + } + + /// + /// Save as GLB file to an output stream + /// + /// Stream to write .glb + public void SaveAsGlb(Stream outputStream) + { + // Deep copy so that PackBufferData's in-place remapping of BufferViews/Buffers/Images + // does not corrupt the cached GltfJson state for subsequent use of this loader. + var workingCopy = GltfUtility.DeserializeModelJson(GltfJson.SerializeModelJson()); + + // Ensure all buffers are loaded, then coerce byte[]?[] → byte[][] (all non-null after load) + for (int i = 0; i < LoadedBuffers.Length; i++) + GetOrLoadBuffer(i); + var buffers = Array.ConvertAll(LoadedBuffers, b => b!); + + using var wb = new BinaryWriter(outputStream); + if (ExternalResolveImage is not null) + workingCopy.SaveBinaryModelPacked(wb, buffers, ExternalResolveImage); + else + workingCopy.SaveBinaryModelPacked(wb, buffers, FilePath); + } +} + +/// +/// Extension methods for IGltfLoader +/// +public static partial class GltfLoaderExtensions +{ + /// + /// Gets a span of bytes for a specific glTF accessor. + /// This method retrieves the buffer view associated with the accessor and returns a span of bytes + /// corresponding to the accessor's data. + /// Note: Sparse accessors are not supported in this implementation. + /// + /// Gltf loader + /// Accessor index + /// Span of bytes accessor want to access + /// + public static ReadOnlySpan GetAccessorBufferSpan(this IGltfLoader loader, int accessorIndex) + { + var accessor = loader.GltfJson.Accessors[accessorIndex]; + if (accessor.BufferView is null) + throw new Exception("No bufferview assigned to accessor! Sparse accessors not supported"); + var bufferView = loader.GltfJson.BufferViews[accessor.BufferView.Value]; + var bufferViewSpan = loader.GetBufferView(accessor.BufferView.Value); + + var stride = bufferView.ByteStride ?? (int)accessor.ElementSize(); + return bufferViewSpan.Slice(accessor.ByteOffset, accessor.Count * stride); + } + + /// + /// Saves gltf data as a .gltf file + /// + /// Gltf loader + /// Target file + public static void SaveAsGltf(this IGltfLoader loader, string filePath) => loader.GltfJson.SaveModel(filePath); + + /// + /// Saves gltf data to stream + /// + /// Gltf loader + /// Output stream + public static void SaveAsGltf(this IGltfLoader loader, Stream stream) => loader.GltfJson.SaveModel(stream); +} diff --git a/Brutal.Gltf/GltfApi/GltfUtility.cs b/Brutal.Gltf/GltfApi/GltfUtility.cs new file mode 100644 index 0000000..cc08e93 --- /dev/null +++ b/Brutal.Gltf/GltfApi/GltfUtility.cs @@ -0,0 +1,1074 @@ +using System.Text; +using System.Text.Json; + +namespace Brutal.GltfApi; + +/// +/// Helper functions for loading and parsing glTF models +/// +public static class GltfUtility +{ + const uint GLTFHEADER = 0x46546C67; + const uint GLTFVERSION2 = 2; + const uint CHUNKJSON = 0x4E4F534A; + const uint CHUNKBIN = 0x004E4942; + + static string EmbeddedBase64 => ";base64,"; + static readonly string EmbeddedImagePrefix = "data:image/"; + static readonly string EmbeddedOctetStream = "data:application/octet-stream;base64,"; + static readonly string EmbeddedGltfBuffer = "data:application/gltf-buffer;base64,"; + + // Core glTF 2.0 images are PNG or JPEG; KTX2 is sanctioned via the KHR_texture_basisu extension. + // Formats with no sanctioned glTF path (gif, bmp, dds, ...) are deliberately not supported. + static readonly string[] EmbeddedImageExtensions = ["png", "jpg", "jpeg", "ktx2"]; + + private static readonly string[] EmbeddedImageExtensionPrefixes = Array.ConvertAll( + EmbeddedImageExtensions, + ext => $"{EmbeddedImagePrefix}{ext}{EmbeddedBase64}" + ); + + private static readonly Encoding DefaultStreamWriterEncoding = new UTF8Encoding( + encoderShouldEmitUTF8Identifier: false, + throwOnInvalidBytes: true + ); + private const int DefaultStreamWriterBufferSize = 1024; + + /// + /// Loads a Schema.Gltf model from a file + /// + /// Source file path to a gltf/glb model + /// Schema.Gltf model + public static Gltf LoadModel(string filePath) + { + using (Stream stream = File.OpenRead(filePath)) + { + return LoadModel(stream); + } + } + + /// + /// Reads a Schema.Gltf model from a stream + /// + /// Readable stream to a gltf/glb model + /// Schema.Gltf model + public static Gltf LoadModel(Stream stream) + { + var binaryFile = false; + + uint magic = 0; + magic |= (uint)stream.ReadByte(); + magic |= (uint)stream.ReadByte() << 8; + magic |= (uint)stream.ReadByte() << 16; + magic |= (uint)stream.ReadByte() << 24; + + if (magic == GLTFHEADER) + binaryFile = true; + + stream.Position = 0; // restart read position + + string fileData; + if (binaryFile) + { + fileData = ParseBinary(stream); + } + else + { + fileData = ParseText(stream); + } + + return DeserializeModelJson(fileData); + } + + private static string ParseText(Stream stream) + { + using (var streamReader = new StreamReader(stream)) + { + return streamReader.ReadToEnd(); + } + } + + private static string ParseBinary(Stream stream) + { + using (var binaryReader = new BinaryReader(stream)) + { + ReadBinaryHeader(binaryReader); + + var data = ReadBinaryChunk(binaryReader, CHUNKJSON); + + return Encoding.UTF8.GetString(data); + } + } + + private static byte[] ReadBinaryChunk(BinaryReader binaryReader, uint format) + { + var stream = binaryReader.BaseStream; + while (stream.Length - stream.Position >= 8) // chunk header is length (4) + format (4) + { + var chunkLength = binaryReader.ReadUInt32(); + if ((chunkLength & 3) != 0) + { + throw new InvalidDataException($"The chunk must be padded to 4 bytes: {chunkLength}"); + } + if (chunkLength > stream.Length - stream.Position - 4) + { + throw new InvalidDataException($"Chunk length {chunkLength} exceeds the remaining size of the file"); + } + + var chunkFormat = binaryReader.ReadUInt32(); + + var data = binaryReader.ReadBytes((int)chunkLength); + + if (chunkFormat == format) + return data; + } + + throw new InvalidDataException($"GLB chunk 0x{format:X8} not found"); + } + + private static void ReadBinaryHeader(BinaryReader binaryReader) + { + var magic = binaryReader.ReadUInt32(); + if (magic != GLTFHEADER) + { + throw new InvalidDataException($"Unexpected magic number: {magic}"); + } + + var version = binaryReader.ReadUInt32(); + if (version != GLTFVERSION2) + { + throw new InvalidDataException($"Unknown version number: {version}"); + } + + var length = binaryReader.ReadUInt32(); + var fileLength = binaryReader.BaseStream.Length; + if (length != fileLength) + { + throw new InvalidDataException( + $"The specified length of the file ({length}) is not equal to the actual length of the file ({fileLength})." + ); + } + } + + private static JsonSerializerOptions CreateSerializerOptions() + { + var options = new JsonSerializerOptions(); + // glTF has no concept of an explicit JSON null; absent optional properties must be + // omitted entirely or strict validators reject the asset (e.g. "uri": null in GLB). + options.DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull; + options.Converters.Add(new JsonHelpers.Float3JsonConverter()); + options.Converters.Add(new JsonHelpers.Float4JsonConverter()); + options.Converters.Add(new JsonHelpers.FloatQuatJsonConverter()); + options.Converters.Add(new JsonHelpers.Float4X4JsonConverter()); + return options; + } + + internal static readonly JsonSerializerOptions JsonOptions = CreateSerializerOptions(); + + /// + /// Parses a JSON formatted text content + /// + /// JSON text content + /// Schema.Gltf model + public static Gltf DeserializeModelJson(string fileData) + { + return JsonSerializer.Deserialize(fileData, JsonOptions) ?? throw new NullReferenceException(); + } + + /// + /// Serializes a Schema.Gltf model to text + /// + /// Schema.Gltf model + /// JSON formatted text + public static string SerializeModelJson(this Gltf model) + { + return JsonSerializer.Serialize(model, JsonOptions); + } + + private static byte[]? TryLoadBase64BinaryBufferUnchecked(Buffer buffer, string prefix) + { + return buffer.Uri == null || !buffer.Uri.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) + ? null + : Convert.FromBase64String(buffer.Uri.Substring(prefix.Length)); + } + + private static byte[] LoadBinaryBufferUnchecked(Buffer buffer, Func externalReferenceSolver) + { + return TryLoadBase64BinaryBufferUnchecked(buffer, EmbeddedGltfBuffer) + ?? TryLoadBase64BinaryBufferUnchecked(buffer, EmbeddedOctetStream) + ?? externalReferenceSolver(buffer.Uri); + } + + private static byte[] LoadExternalFileReference(string baseFilePath, string uri) + { + // Load embedded glb + if (string.IsNullOrEmpty(uri)) + { + using (Stream stream = File.OpenRead(baseFilePath)) + using (BinaryReader binaryReader = new BinaryReader(stream)) + { + ReadBinaryHeader(binaryReader); + return ReadBinaryChunk(binaryReader, CHUNKBIN); + } + } + // Load external reference + return File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(baseFilePath) ?? "", uri)); + } + + private static byte[] LoadBinaryBufferUnchecked(Buffer buffer, string baseFilePath) + { + return TryLoadBase64BinaryBufferUnchecked(buffer, EmbeddedGltfBuffer) + ?? TryLoadBase64BinaryBufferUnchecked(buffer, EmbeddedOctetStream) + ?? LoadExternalFileReference(baseFilePath, buffer.Uri); + } + + /// + /// Attempts to parse and load an embedded image from a glTF model. + /// + /// Image with embedded data + /// Extension format of embedded image file + /// Byte array of image data + /// Invalid image format + public static byte[] OpenEmbeddedImage(this Image image, out string? extension) + { + string? s = null; + extension = null; + for (var i = 0; i < EmbeddedImageExtensionPrefixes.Length; ++i) + { + if (image.Uri.StartsWith(EmbeddedImageExtensionPrefixes[i], StringComparison.OrdinalIgnoreCase)) + { + s = image.Uri.Substring(EmbeddedImageExtensionPrefixes[i].Length); + extension = EmbeddedImageExtensions[i]; + break; + } + } + if (s is null) + throw new ArgumentException($"Image URI '{image.Uri}' is not a valid embedded image format."); + return Convert.FromBase64String(s); + } + + /// + /// Load a buffer from a glTF model by its index. + /// This method will read the buffer data from the model's binary data or through an external reference solver. + /// + /// glTF model + /// Index of buffer in glTF + /// Function to handle a reference for an external buffer + /// Buffer loaded as byte array + /// + /// + public static byte[] LoadBinaryBuffer( + this Gltf model, + int bufferIndex, + Func externalReferenceSolver + ) + { + var buffer = model.Buffers[bufferIndex]; + if (buffer == null) + throw new ArgumentException($"Buffer with index {bufferIndex} does not exist in the model."); + var numArray = LoadBinaryBufferUnchecked(buffer, externalReferenceSolver); + if (numArray.Length < buffer.ByteLength || numArray.Length - buffer.ByteLength > 3) + throw new InvalidDataException($"The buffer length is {numArray.Length}, expected {buffer.ByteLength}"); + return numArray; + } + + /// + /// Load a buffer from a glTF model by its index. + /// This method reads the buffer data from the model's binary data or external file reference. + /// + /// glTF Model + /// Index of buffer + /// Path of source gltf file itself, or directory URIs are assumed to be relative to + /// Buffer loaded as byte array + /// + /// + public static byte[] LoadBinaryBuffer(this Gltf model, int bufferIndex, string baseFilePath) + { + var buffer = model.Buffers[bufferIndex]; + if (buffer == null) + throw new ArgumentException($"Buffer with index {bufferIndex} does not exist in the model."); + var numArray = LoadBinaryBufferUnchecked(buffer, baseFilePath); + if (numArray.Length < buffer.ByteLength || numArray.Length - buffer.ByteLength > 3) + throw new InvalidDataException($"The buffer length is {numArray.Length}, expected {buffer.ByteLength}"); + return numArray; + } + + /// + /// Open an image file from a glTF model. + /// + /// glTF model + /// Index of image to load + /// Function to handle an external reference + /// Stream for image file + /// + /// Stateless by design: for images stored in a buffer view, each call reloads the entire + /// underlying buffer. Use for cached buffer/image access. + /// + public static Stream OpenImageFile(this Gltf model, int imageIndex, Func externalReferenceSolver) + { + var image = model.Images[imageIndex]; + if (image.BufferView.HasValue) + { + var bufferView = model.BufferViews[image.BufferView.Value]; + return new MemoryStream( + model.LoadBinaryBuffer(bufferView.Buffer, externalReferenceSolver), + bufferView.ByteOffset, + bufferView.ByteLength + ); + } + return image.IsEmbedded() + ? new MemoryStream(image.OpenEmbeddedImage(out _)) + : new MemoryStream(externalReferenceSolver(image.Uri)); + } + + /// + /// Open an image file from a glTF model. + /// + /// glTF model + /// Index of image to load + /// Function to handle an external reference + /// Stream for image file + /// + /// Stateless by design: for images stored in a buffer view, each call reloads the entire + /// underlying buffer. Use for cached buffer/image access. + /// + public static Stream OpenImageFile(this Gltf model, int imageIndex, string baseFilePath) + { + var image = model.Images[imageIndex]; + if (image.BufferView.HasValue) + { + var bufferView = model.BufferViews[image.BufferView.Value]; + return new MemoryStream( + model.LoadBinaryBuffer(bufferView.Buffer, baseFilePath), + bufferView.ByteOffset, + bufferView.ByteLength + ); + } + return image.IsEmbedded() + ? new MemoryStream(image.OpenEmbeddedImage(out _)) + : new MemoryStream(LoadExternalFileReference(baseFilePath, image.Uri)); + } + + /// + /// Checks if an image contains embedded data in it's URI + /// + /// Image to check for embedded data + /// True if embedded data present + public static bool IsEmbedded(this Image image) + { + return image.Uri.StartsWith(EmbeddedImagePrefix); + } + + #region saving + + /// + /// Saves a Schema.Gltf model to a gltf file + /// + /// Schema.Gltf model + /// Destination file path + public static void SaveModel(this Gltf model, string path) + { + using (Stream stream = File.Create(path)) + { + SaveModel(model, stream); + } + } + + /// + /// Writes a Schema.Gltf model to a writable stream + /// + /// Schema.Gltf model + /// Writable stream + public static void SaveModel(this Gltf model, Stream stream) + { + string fileData = SerializeModelJson(model); + + using ( + var ts = new StreamWriter( + stream, + DefaultStreamWriterEncoding, + DefaultStreamWriterBufferSize, + leaveOpen: true + ) + ) + { + ts.Write(fileData); + } + } + + /// + /// Saves a Schema.Gltf model to a glb file + /// + /// Schema.Gltf model + /// Binary buffer to embed in the file, or null + /// Destination file path + public static void SaveBinaryModel(this Gltf model, byte[] buffer, string filePath) + { + using (Stream stream = File.Create(filePath)) + { + SaveBinaryModel(model, buffer, stream); + } + } + + /// + /// Writes a Schema.Gltf model to a writable stream + /// + /// Schema.Gltf model + /// Binary buffer to embed in the file, or null + /// Writable stream + public static void SaveBinaryModel(this Gltf model, byte[] buffer, Stream stream) + { + using (var wb = new BinaryWriter(stream)) + { + SaveBinaryModel(model, buffer, wb); + } + } + + /// + /// Writes a Schema.Gltf model to a writable binary writer + /// + /// Schema.Gltf model + /// Binary buffer to embed in the file, or null + /// Binary Writer + public static void SaveBinaryModel(this Gltf model, byte[]? buffer, BinaryWriter binaryWriter) + { + if (model == null) + throw new ArgumentNullException(nameof(model)); + + var brefcount = model.Buffers?.Count(item => item.Uri == null) ?? 0; + + if (brefcount > 1) + throw new ArgumentException( + "Model has multiple buffers with a null uri; at most one GLB-stored buffer is allowed", + nameof(model) + ); + + if (brefcount == 1) + { + if (buffer == null) + throw new ArgumentNullException(nameof(buffer), "Model has a GLB-stored buffer (null uri)"); + + // https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#glb-stored-buffer + // The GLB-stored buffer must have a null uri and be the first element of the buffers array. + var b = model.Buffers![0]; + if (b.Uri != null) + throw new ArgumentException( + "The GLB-stored buffer (null uri) must be the first element of the buffers array", + nameof(model) + ); + + if (b.ByteLength > buffer.Length) + throw new ArgumentException("Buffer byte size is smaller than declared", nameof(buffer)); + if ((buffer.Length - b.ByteLength) > 3) + throw new ArgumentException("Buffer byte size is larger than declared", nameof(buffer)); + } + + if (brefcount == 0 && buffer != null) + throw new ArgumentException( + "Buffer must be null when the model has no GLB-stored buffer (null uri)", + nameof(buffer) + ); + + var jsonText = SerializeModelJson(model); + var jsonChunk = Encoding.UTF8.GetBytes(jsonText); + var jsonPadding = jsonChunk.Length & 3; + if (jsonPadding != 0) + jsonPadding = 4 - jsonPadding; + + if (buffer != null && buffer.Length == 0) + buffer = null; + var binPadding = buffer == null ? 0 : buffer.Length & 3; + if (binPadding != 0) + binPadding = 4 - binPadding; + + int fullLength = 4 + 4 + 4; + + fullLength += 8 + jsonChunk.Length + jsonPadding; + if (buffer != null) + fullLength += 8 + buffer.Length + binPadding; + + binaryWriter.Write(GLTFHEADER); + binaryWriter.Write(GLTFVERSION2); + binaryWriter.Write(fullLength); + + binaryWriter.Write(jsonChunk.Length + jsonPadding); + binaryWriter.Write(CHUNKJSON); + binaryWriter.Write(jsonChunk); + for (int i = 0; i < jsonPadding; ++i) + binaryWriter.Write((Byte)0x20); + + if (buffer != null) + { + binaryWriter.Write(buffer.Length + binPadding); + binaryWriter.Write(CHUNKBIN); + binaryWriter.Write(buffer); + for (int i = 0; i < binPadding; ++i) + binaryWriter.Write((Byte)0); + } + } + + /// + /// Combines multiple buffers into a single buffer, remapping all BufferView byte offsets in the model. + /// + /// glTF model whose BufferViews will be remapped to the merged buffer + /// Buffer data arrays, one entry per element in model.Buffers + /// Combined buffer data with all BufferViews remapped to buffer index 0 + public static byte[] MergeBuffers(this Gltf model, byte[][] buffers) + { + if (buffers == null) + throw new ArgumentNullException(nameof(buffers)); + if (model.Buffers == null || model.Buffers.Length == 0) + return Array.Empty(); + if (buffers.Length != model.Buffers.Length) + throw new ArgumentException( + $"Expected {model.Buffers.Length} buffer(s), got {buffers.Length}.", + nameof(buffers) + ); + + if (buffers.Length == 1) + { + model.Buffers = new[] { new Buffer { ByteLength = buffers[0].Length } }; + return buffers[0]; + } + + using var ms = new MemoryStream(); + var startOffsets = new int[buffers.Length]; + + for (int i = 0; i < buffers.Length; i++) + { + ms.Align(4); + startOffsets[i] = (int)ms.Position; + ms.Write(buffers[i], 0, buffers[i].Length); + } + + if (model.BufferViews != null) + { + foreach (var bv in model.BufferViews) + { + bv.ByteOffset += startOffsets[bv.Buffer]; + bv.Buffer = 0; + } + } + + var combined = ms.ToArray(); + model.Buffers = new[] { new Buffer { ByteLength = combined.Length } }; + return combined; + } + + /// + /// Writes a Schema.Gltf model to a writable binary writer and pack all data into the model + /// + /// Schema.Gltf model + /// GLB output file path + /// Source file path used to load the model + /// optional GLB-stored Buffer (BIN data file). If null, then the first buffer Uri must point to a BIN file. + public static void SaveBinaryModelPacked( + this Gltf model, + string outputFile, + string gltfFilePath, + byte[]? glbBinChunk = null + ) + { + using (Stream stream = File.Create(outputFile)) + using (var wb = new BinaryWriter(stream)) + { + SaveBinaryModelPacked(model, wb, gltfFilePath, glbBinChunk); + } + } + + /// + /// Writes a Schema.Gltf model to a file as a self-contained GLB, packing all resources + /// from the provided pre-loaded buffer data. External image URIs are resolved relative to + /// when supplied; otherwise only buffer-view and embedded images are supported. + /// + /// Schema.Gltf model + /// GLB output file path + /// Pre-loaded buffer data, one entry per element in model.Buffers + /// Optional source file path used to resolve external image URIs + public static void SaveBinaryModelPacked( + this Gltf model, + string outputFile, + byte[][] buffers, + string? gltfFilePath = null + ) + { + using (Stream stream = File.Create(outputFile)) + using (var wb = new BinaryWriter(stream)) + { + SaveBinaryModelPacked(model, wb, buffers, gltfFilePath); + } + } + + /// + /// Writes a Schema.Gltf model to a writable binary writer and pack all data into the model + /// + /// Schema.Gltf model + /// Binary Writer + /// Source file path used to load the model + /// optional GLB-stored Buffer (BIN data file). If null, then the first buffer Uri must point to a BIN file. + public static void SaveBinaryModelPacked( + this Gltf model, + BinaryWriter binaryWriter, + string gltfFilePath, + byte[]? glbBinChunk = null + ) + { + if (model == null) + throw new ArgumentNullException(nameof(model)); + + // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#glb-stored-buffer + // "glTF Buffer referring to GLB-stored BIN chunk, must have buffer.uri property undefined, + // and it must be the first element of buffers array" + var binData = PackBufferData( + model, + bufferIndex => + bufferIndex == 0 && glbBinChunk != null + ? glbBinChunk + : model.LoadBinaryBuffer(bufferIndex, gltfFilePath), + imageIndex => model.OpenImageFile(imageIndex, gltfFilePath) + ); + + SaveBinaryModel(model, binData, binaryWriter); + } + + /// + /// Writes a Schema.Gltf model to a writable binary writer as a self-contained GLB, packing + /// all resources from the provided pre-loaded buffer data. External image URIs are resolved relative to + /// when supplied; otherwise only buffer-view and embedded images are supported. + /// + /// Schema.Gltf model + /// Binary Writer + /// Pre-loaded buffer data, one entry per element in model.Buffers + /// Optional source file path used to resolve external image URIs + public static void SaveBinaryModelPacked( + this Gltf model, + BinaryWriter binaryWriter, + byte[][] buffers, + string? gltfFilePath = null + ) + { + if (model == null) + throw new ArgumentNullException(nameof(model)); + if (buffers == null) + throw new ArgumentNullException(nameof(buffers)); + if (model.Buffers != null && buffers.Length != model.Buffers.Length) + throw new ArgumentException( + $"Expected {model.Buffers.Length} buffer(s), got {buffers.Length}.", + nameof(buffers) + ); + + var binData = PackBufferData( + model, + bufferIndex => buffers[bufferIndex], + imageIndex => + { + var image = model.Images[imageIndex]; + if (image.IsEmbedded()) + return new MemoryStream(image.OpenEmbeddedImage(out _)); + if (gltfFilePath != null) + return model.OpenImageFile(imageIndex, gltfFilePath); + throw new InvalidOperationException( + $"Cannot load external image '{image.Uri}' without a gltfFilePath." + ); + } + ); + + SaveBinaryModel(model, binData, binaryWriter); + } + + /// + /// Writes a Schema.Gltf model to a file as a self-contained GLB, packing all resources + /// from the provided pre-loaded buffer data, using a custom function to resolve external image URIs. + /// + /// Schema.Gltf model + /// GLB output file path + /// Pre-loaded buffer data, one entry per element in model.Buffers + /// Function to load raw image bytes by URI for non-embedded images + public static void SaveBinaryModelPacked( + this Gltf model, + string outputFile, + byte[][] buffers, + Func externalResolveImage + ) + { + using (Stream stream = File.Create(outputFile)) + using (var wb = new BinaryWriter(stream)) + { + SaveBinaryModelPacked(model, wb, buffers, externalResolveImage); + } + } + + /// + /// Writes a Schema.Gltf model to a writable binary writer as a self-contained GLB, packing + /// all resources from the provided pre-loaded buffer data, using a custom function to resolve external image URIs. + /// + /// Schema.Gltf model + /// Binary Writer + /// Pre-loaded buffer data, one entry per element in model.Buffers + /// Function to load raw image bytes by URI for non-embedded images + public static void SaveBinaryModelPacked( + this Gltf model, + BinaryWriter binaryWriter, + byte[][] buffers, + Func externalResolveImage + ) + { + if (model == null) + throw new ArgumentNullException(nameof(model)); + if (buffers == null) + throw new ArgumentNullException(nameof(buffers)); + if (externalResolveImage == null) + throw new ArgumentNullException(nameof(externalResolveImage)); + if (model.Buffers != null && buffers.Length != model.Buffers.Length) + throw new ArgumentException( + $"Expected {model.Buffers.Length} buffer(s), got {buffers.Length}.", + nameof(buffers) + ); + + var binData = PackBufferData( + model, + bufferIndex => buffers[bufferIndex], + imageIndex => + { + var image = model.Images[imageIndex]; + if (image.IsEmbedded()) + return new MemoryStream(image.OpenEmbeddedImage(out _)); + return new MemoryStream(externalResolveImage(image.Uri)); + } + ); + + SaveBinaryModel(model, binData, binaryWriter); + } + + private static byte[]? PackBufferData(Gltf model, Func bufferLoader, Func imageLoader) + { + using var ms = new MemoryStream(); + var bufferViews = new List(); + var loadedBuffers = new Dictionary(); + + if (model.BufferViews != null) + { + foreach (var bv in model.BufferViews) + { + ms.Align(4); + var byteOffset = ms.Position; + + if (!loadedBuffers.TryGetValue(bv.Buffer, out var data)) + { + data = bufferLoader(bv.Buffer); + loadedBuffers[bv.Buffer] = data; + } + + ms.Write(data, bv.ByteOffset, bv.ByteLength); + bv.Buffer = 0; + bv.ByteOffset = (int)byteOffset; + bufferViews.Add(bv); + } + } + + if (model.Images != null) + { + for (int i = 0; i < model.Images.Length; i++) + { + var image = model.Images[i]; + + // Images already in a BufferView were packed above; skip them. + if (image.BufferView.HasValue) + continue; + + ms.Align(4); + var byteOffset = ms.Position; + + using (var imageStream = imageLoader(i)) + imageStream.CopyTo(ms); + + // Preserve existing MimeType for images that have one (e.g. previously buffer-view images); + // otherwise derive it from the URI. + image.MimeType = GetMimeType(image.Uri) ?? image.MimeType; + image.BufferView = bufferViews.Count; + image.Uri = null; + + bufferViews.Add( + new BufferView + { + Buffer = 0, + ByteOffset = (int)byteOffset, + ByteLength = (int)(ms.Position - byteOffset), + } + ); + } + } + + if (!bufferViews.Any()) + return null; + + model.BufferViews = bufferViews.ToArray(); + model.Buffers = new[] { new Buffer { ByteLength = (int)ms.Length } }; + return ms.ToArray(); + } + + /// + /// Converts self contained GLB to glTF file and associated textures and data + /// + /// glTF binary file (.glb) to unpack + /// Directory where the files will be extracted + public static void Unpack(string inputFilePath, string outputDirectoryPath) + { + ArgumentNullException.ThrowIfNull(outputDirectoryPath); + ArgumentNullException.ThrowIfNull(inputFilePath); + + if (!File.Exists(inputFilePath)) + throw new ArgumentException("Input file does not exists"); + if (!Directory.Exists(outputDirectoryPath)) + throw new ArgumentException("Output directory does not exists"); + + string inputFileName = Path.GetFileNameWithoutExtension(inputFilePath); + string inputDirectoryPath = Path.GetDirectoryName(inputFilePath) ?? throw new InvalidOperationException(); + + var model = LoadModel(inputFilePath); + Buffer? binBuffer = null; + byte[]? binBufferData = null; + if (model.Buffers != null && string.IsNullOrEmpty(model.Buffers[0].Uri)) + { + binBuffer = model.Buffers[0]; + binBufferData = model.LoadBinaryBuffer(0, inputFilePath); + } + + var imageBufferViewIndices = new List(); + + if (model.Images != null) + { + for (var index = 0; index < model.Images.Length; index++) + { + var image = model.Images[index]; + + if (!string.IsNullOrEmpty(image.Uri)) + { + if (!image.Uri.StartsWith("data:")) + { + var sourceFilePath = Path.Combine(inputDirectoryPath, image.Uri); + var fileName = $"{inputFilePath}_image{index}.bin"; + + if (File.Exists(sourceFilePath)) + { + var destinationFilePath = Path.Combine(outputDirectoryPath, fileName); + File.Copy(sourceFilePath, destinationFilePath, true); + } + + image.Uri = fileName; + } + } + else if (image.BufferView.HasValue) + { + var bufferView = model.BufferViews[image.BufferView.Value]; + if (bufferView.Buffer == 0) + { + imageBufferViewIndices.Add(image.BufferView.Value); + + var fileExtension = image.MimeType switch + { + Image.MimeTypeJpeg => "jpg", + Image.MimeTypeKtx2 => "ktx2", + _ => "png", + }; + var fileName = $"{inputFileName}_image{index}.{fileExtension}"; + + using (var fileStream = File.Create(Path.Combine(outputDirectoryPath, fileName))) + { + fileStream.Write(binBufferData!, bufferView.ByteOffset, bufferView.ByteLength); + } + + image.BufferView = null; + image.MimeType = null; + image.Uri = fileName; + } + } + } + } + + if (model.BufferViews != null) + { + var binFileName = $"{inputFileName}.bin"; + var binFilePath = Path.Combine(outputDirectoryPath, binFileName); + var binByteLength = 0; + + var indexMap = new Dictionary(); + var bufferViews = new List(); + using (var fileStream = File.Create(binFilePath)) + { + for (var index = 0; index < model.BufferViews.Length; index++) + { + if (!imageBufferViewIndices.Any(imageIndex => imageIndex == index)) + { + var bufferView = model.BufferViews[index]; + if (bufferView.Buffer == 0) + { + fileStream.Align(4); + var fileStreamPosition = fileStream.Position; + fileStream.Write(binBufferData!, bufferView.ByteOffset, bufferView.ByteLength); + bufferView.ByteOffset = (int)fileStreamPosition; + } + + var newIndex = bufferViews.Count; + if (index != newIndex) + { + indexMap.Add(index, newIndex); + } + + bufferViews.Add(bufferView); + } + } + + binByteLength = (int)fileStream.Length; + } + + model.BufferViews = bufferViews.ToArray(); + + if (binByteLength == 0) + { + File.Delete(binFilePath); + if (binBuffer != null) + { + model.Buffers = model.Buffers!.Skip(1).ToArray(); + foreach (var bufferView in model.BufferViews) + { + bufferView.Buffer--; + } + } + } + else + { + binBuffer?.Uri = binFileName; + binBuffer?.ByteLength = binByteLength; + } + + // Remap every structure that references buffer views by index. Buffer view references + // inside opaque extension objects (e.g. KHR_draco_mesh_compression, EXT_meshopt_compression) + // cannot be remapped here and are a known limitation. + if (model.Accessors != null) + { + foreach (var accessor in model.Accessors) + { + if (accessor.BufferView.HasValue) + { + if (indexMap.TryGetValue(accessor.BufferView.Value, out int newIndex)) + { + accessor.BufferView = newIndex; + } + } + + if (accessor.Sparse != null) + { + if (indexMap.TryGetValue(accessor.Sparse.Indices.BufferView, out int newSparseIndices)) + { + accessor.Sparse.Indices.BufferView = newSparseIndices; + } + if (indexMap.TryGetValue(accessor.Sparse.Values.BufferView, out int newSparseValues)) + { + accessor.Sparse.Values.BufferView = newSparseValues; + } + } + } + } + + if (model.Images != null) + { + // Images extracted to files above already had BufferView set to null; any image still + // referencing a buffer view (e.g. on a non-GLB buffer) must be remapped like accessors. + foreach (var image in model.Images) + { + if (image.BufferView.HasValue) + { + if (indexMap.TryGetValue(image.BufferView.Value, out int newIndex)) + { + image.BufferView = newIndex; + } + } + } + } + } + + if (model.Buffers != null) + { + for (var index = 1; index < model.Buffers.Length; index++) + { + var buffer = model.Buffers[index]; + if (!buffer.Uri.StartsWith("data:")) + { + var sourceFilePath = Path.Combine(inputDirectoryPath, buffer.Uri); + var fileName = $"{inputFileName}{index}.bin"; + + if (File.Exists(sourceFilePath)) + { + var destinationFilePath = Path.Combine(outputDirectoryPath, fileName); + File.Copy(sourceFilePath, destinationFilePath, true); + } + + buffer.Uri = fileName; + } + } + } + + SaveModel(model, Path.Combine(outputDirectoryPath, $"{inputFileName}.gltf")); + } + + /// + /// Converts a glTF file and its associated resources to a packed GLB binary file + /// + /// glTF file (.gltf) to pack + /// Path where the GLB file should be generated + public static void Pack(string inputGltfFilePath, string outputGlbFile) + { + if (!File.Exists(inputGltfFilePath)) + throw new ArgumentException("glTF file does not exists.", nameof(inputGltfFilePath)); + + Gltf model = LoadModel(inputGltfFilePath); + + SaveBinaryModelPacked(model, outputGlbFile, inputGltfFilePath); + } + + private static void Align(this Stream stream, int size, byte fillByte = 0) + { + var mod = stream.Position % size; + if (mod == 0) + { + return; + } + + for (var i = 0; i < size - mod; i++) + { + stream.WriteByte(fillByte); + } + } + + private static string? GetMimeType(string uri) + { + if (String.IsNullOrEmpty(uri)) + { + return null; + } + if (uri.StartsWith("data:image/png;base64,") || uri.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) + { + return Image.MimeTypePng; + } + if ( + uri.StartsWith("data:image/jpeg;base64,") + || uri.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) + || uri.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase) + ) + { + return Image.MimeTypeJpeg; + } + // Note: a packed KTX2 image is only spec-conformant if the asset declares KHR_texture_basisu. + if (uri.StartsWith("data:image/ktx2;base64,") || uri.EndsWith(".ktx2", StringComparison.OrdinalIgnoreCase)) + { + return Image.MimeTypeKtx2; + } + throw new NotSupportedException( + $"Unable to determine image MIME type from uri '{uri}'. Core glTF 2.0 allows only PNG and JPEG " + + "images; KTX2 is supported via the KHR_texture_basisu extension. Other formats have no " + + "sanctioned glTF path and cannot be packed." + ); + } + + #endregion +} diff --git a/Brutal.Gltf/GltfApi/IExtensionGltfObject.cs b/Brutal.Gltf/GltfApi/IExtensionGltfObject.cs new file mode 100644 index 0000000..0255f56 --- /dev/null +++ b/Brutal.Gltf/GltfApi/IExtensionGltfObject.cs @@ -0,0 +1,28 @@ +using System.Text.Json; + +namespace Brutal.GltfApi; + +public interface IExtensionGltfObject +{ + public Dictionary? Extensions { get; } +} + +public static class GltfExtensions +{ + public static T? GetExtension(this IExtensionGltfObject obj, string extensionName) + where T : class + { + var extensionMap = obj.Extensions; + if (extensionMap == null || !extensionMap.TryGetValue(extensionName, out var extObj)) + return null; + // Extensions assigned programmatically hold the typed object directly; extensions coming + // from deserialization hold the raw JsonElement. + if (extObj is T typed) + return typed; + if (extObj is JsonElement je) + return je.Deserialize(GltfUtility.JsonOptions); + throw new InvalidCastException( + $"Extension '{extensionName}' holds a {extObj.GetType()}, expected {typeof(T)} or JsonElement" + ); + } +} diff --git a/Brutal.Gltf/GltfApi/Image.cs b/Brutal.Gltf/GltfApi/Image.cs new file mode 100644 index 0000000..4531f6c --- /dev/null +++ b/Brutal.Gltf/GltfApi/Image.cs @@ -0,0 +1,20 @@ +namespace Brutal.GltfApi; + +public partial class Image +{ + /// + /// PNG MIME type. One of the two image formats sanctioned by core glTF 2.0. + /// + public const string MimeTypePng = "image/png"; + + /// + /// JPEG MIME type. One of the two image formats sanctioned by core glTF 2.0. + /// + public const string MimeTypeJpeg = "image/jpeg"; + + /// + /// KTX2 MIME type. Sanctioned by the KHR_texture_basisu extension; assets using it + /// must declare that extension in extensionsUsed to be spec-conformant. + /// + public const string MimeTypeKtx2 = "image/ktx2"; +} diff --git a/Brutal.Gltf/GltfApi/JsonHelpers.cs b/Brutal.Gltf/GltfApi/JsonHelpers.cs new file mode 100644 index 0000000..a1c0415 --- /dev/null +++ b/Brutal.Gltf/GltfApi/JsonHelpers.cs @@ -0,0 +1,249 @@ +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Brutal.GltfApi; + +/// +/// Helpers for JSON serialization and deserialization of common types used in GLTF. +/// This includes converters for float3, float4, floatQuat, and float4x4 +/// +public static class JsonHelpers +{ + /// + /// Converter for to/from JSON. + /// + public class Float3JsonConverter : JsonConverter + { + /// + public override float3 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartArray) + { + throw new JsonException("Expected start of array for Vec3."); + } + + // Read X + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for X component of Vec3."); + } + var x = reader.GetSingle(); + + // Read Y + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for Y component of Vec3."); + } + var y = reader.GetSingle(); + + // Read Z + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for Z component of Vec3."); + } + var z = reader.GetSingle(); + + // Ensure end of array + reader.Read(); + if (reader.TokenType != JsonTokenType.EndArray) + { + throw new JsonException("Expected end of array for Vec3."); + } + + return new float3(x, y, z); + } + + /// + public override void Write(Utf8JsonWriter writer, float3 value, JsonSerializerOptions options) + { + writer.WriteStartArray(); + writer.WriteNumberValue(value.X); + writer.WriteNumberValue(value.Y); + writer.WriteNumberValue(value.Z); + writer.WriteEndArray(); + } + } + + /// + /// Converter for to/from JSON. + /// + public class Float4JsonConverter : JsonConverter + { + /// + public override float4 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartArray) + { + throw new JsonException("Expected start of array for Vec4."); + } + + // Read X + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for X component of Vec4."); + } + var x = reader.GetSingle(); + + // Read Y + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for Y component of Vec4."); + } + var y = reader.GetSingle(); + + // Read Z + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for Z component of Vec4."); + } + var z = reader.GetSingle(); + + // Read W + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for W component of Vec4."); + } + var w = reader.GetSingle(); + + // Ensure end of array + reader.Read(); + if (reader.TokenType != JsonTokenType.EndArray) + { + throw new JsonException("Expected end of array for Vec4."); + } + + return new float4(x, y, z, w); + } + + /// + public override void Write(Utf8JsonWriter writer, float4 value, JsonSerializerOptions options) + { + writer.WriteStartArray(); + writer.WriteNumberValue(value.X); + writer.WriteNumberValue(value.Y); + writer.WriteNumberValue(value.Z); + writer.WriteNumberValue(value.W); + writer.WriteEndArray(); + } + } + + /// + /// Converter for to/from JSON. + /// + public class FloatQuatJsonConverter : JsonConverter + { + /// + public override floatQuat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartArray) + { + throw new JsonException("Expected start of array for Quaternion."); + } + + // Read X + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for X component of Quaternion."); + } + var x = reader.GetSingle(); + + // Read Y + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for Y component of Quaternion."); + } + var y = reader.GetSingle(); + + // Read Z + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for Z component of Quaternion."); + } + var z = reader.GetSingle(); + + // Read W + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException("Expected number for W component of Quaternion."); + } + var w = reader.GetSingle(); + + // Ensure end of array + reader.Read(); + if (reader.TokenType != JsonTokenType.EndArray) + { + throw new JsonException("Expected end of array for Quaternion."); + } + + return new floatQuat(x, y, z, w); + } + + /// + public override void Write(Utf8JsonWriter writer, floatQuat value, JsonSerializerOptions options) + { + writer.WriteStartArray(); + writer.WriteNumberValue(value.X); + writer.WriteNumberValue(value.Y); + writer.WriteNumberValue(value.Z); + writer.WriteNumberValue(value.W); + writer.WriteEndArray(); + } + } + + /// + /// Converter for to/from JSON. + /// + public class Float4X4JsonConverter : JsonConverter + { + /// + public override float4x4 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartArray) + { + throw new JsonException("Expected start of array for Float4x4."); + } + + Span components = stackalloc float[16]; + for (var i = 0; i < 16; i++) + { + // Read each component + reader.Read(); + if (reader.TokenType != JsonTokenType.Number) + { + throw new JsonException($"Expected number for component {i} of Float4x4."); + } + components[i] = reader.GetSingle(); + } + // Ensure end of array + reader.Read(); + if (reader.TokenType != JsonTokenType.EndArray) + { + throw new JsonException("Expected end of array for Float4x4."); + } + return new float4x4(components); + } + + /// + public override void Write(Utf8JsonWriter writer, float4x4 value, JsonSerializerOptions options) + { + writer.WriteStartArray(); + var span = value.AsSpan(); + for (var i = 0; i < 16; i++) + { + writer.WriteNumberValue(span[i]); + } + writer.WriteEndArray(); + } + } +} diff --git a/Brutal.Gltf/GltfApi/Material.cs b/Brutal.Gltf/GltfApi/Material.cs new file mode 100644 index 0000000..846e36f --- /dev/null +++ b/Brutal.Gltf/GltfApi/Material.cs @@ -0,0 +1,3 @@ +namespace Brutal.GltfApi; + +public partial class Material : IExtensionGltfObject { } diff --git a/Brutal.Gltf/GltfApi/Node.cs b/Brutal.Gltf/GltfApi/Node.cs new file mode 100644 index 0000000..cb6452a --- /dev/null +++ b/Brutal.Gltf/GltfApi/Node.cs @@ -0,0 +1,25 @@ +using System.Text.Json; + +namespace Brutal.GltfApi; + +public partial class Node : IExtensionGltfObject +{ + /// + /// Gets a light index if the node is associated with a light source. + /// This is used when the "KHR_lights_punctual" extension is present. + /// If the extension is not present or the light index is not defined, returns null. + /// + public int? LightIndex + { + get + { + if (Extensions == null || !Extensions.TryGetValue("KHR_lights_punctual", out var ext)) + return null; + if (ext is JsonElement extElement && extElement.TryGetProperty("light"u8, out var lightIndex)) + { + return lightIndex.GetInt32(); + } + return null; + } + } +} diff --git a/Brutal.Gltf/LICENSES/BRUTAL-GLTF-THIRD-PARTY-NOTICES.txt b/Brutal.Gltf/LICENSES/BRUTAL-GLTF-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..cfe2353 --- /dev/null +++ b/Brutal.Gltf/LICENSES/BRUTAL-GLTF-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,139 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Gltf + +This package contains no third-party library. Its glTF type definitions are generated +from The Khronos Group's glTF 2.0 JSON schemas, and the descriptive text of those +schemas is reproduced as the API documentation in Brutal.Gltf.xml. The license Khronos +applies to those schemas is reproduced in full below. + + +============================================================================== +glTF 2.0 specification schemas +============================================================================== + + Name The glTF 2.0 specification JSON schemas, The Khronos Group Inc. + Version glTF 2.0 + schemas taken from upstream commit 082d5a98f479c37dff18767982d1431fc6c014fd + (v1.0-draft2-2373-g082d5a98) + Upstream https://github.com/KhronosGroup/glTF + https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html + SPDX LicenseRef-KhronosSpecCopyright + Shipped as C# type definitions generated from the schemas and compiled into + Brutal.Gltf.dll, and the schemas' own description text reproduced + as XML documentation comments in Brutal.Gltf.xml + + The schemas used are those under upstream's specification/2.0/schema directory, + together with the Khronos extension schemas for: + + KHR_draco_mesh_compression + KHR_lights_punctual + KHR_materials_anisotropy + KHR_materials_clearcoat + KHR_materials_emissive_strength + KHR_materials_iridescence + KHR_materials_sheen + KHR_materials_specular + KHR_materials_transmission + KHR_materials_unlit + KHR_materials_volume + KHR_texture_basisu + KHR_texture_transform + + No vendor (non-Khronos) extension schemas are used. Upstream places those under a + separate license identifier, LicenseRef-TBD. + + Copyright 2012-2021 The Khronos Group Inc. + + The copyright line above is the one upstream records for the schema files in its + REUSE metadata. The license text below carries its own, different, copyright line; + both are reproduced as upstream states them. + + The text below is the shared Khronos specification copyright applied across Khronos + projects, reproduced verbatim from the upstream file named above. Its references to + other Khronos specifications and its unrendered AsciiDoc conditionals are upstream's + own. + + Copyright 2014-2021 The Khronos Group Inc. + + This Specification is protected by copyright laws and contains material + proprietary to Khronos. Except as described by these terms, it or any + components may not be reproduced, republished, distributed, transmitted, + displayed, broadcast or otherwise exploited in any manner without the + express prior written permission of Khronos. + Khronos grants a conditional copyright license to use and reproduce the + unmodified Specification for any purpose, without fee or royalty, EXCEPT no + licenses to any patent, trademark or other intellectual property rights are + granted under these terms. + + Khronos makes no, and expressly disclaims any, representations or + warranties, express or implied, regarding this Specification, including, + without limitation: merchantability, fitness for a particular purpose, + non-infringement of any intellectual property, correctness, accuracy, + completeness, timeliness, and reliability. + Under no circumstances will Khronos, or any of its Promoters, Contributors + or Members, or their respective partners, officers, directors, employees, + agents or representatives be liable for any damages, whether direct, + indirect, special or consequential damages for lost revenues, lost profits, + or otherwise, arising from or in connection with these materials. + + This Specification has been created under the Khronos Intellectual Property + Rights Policy, which is Attachment A of the Khronos Group Membership + Agreement available at https://www.khronos.org/files/member_agreement.pdf, and which + defines the terms 'Scope', 'Compliant Portion', and 'Necessary Patent Claims'. + Parties desiring to implement the Specification and make use of Khronos trademarks + in relation to that implementation, and receive reciprocal patent license protection + under the Khronos Intellectual Property Rights Policy must become Adopters and + confirm the implementation as conformant under the process defined by Khronos for + this Specification; see https://www.khronos.org/adopters. + + This Specification contains substantially unmodified functionality from, and is a + successor to, Khronos specifications including OpenGL, OpenGL ES and OpenCL. + + Some parts of this Specification are purely informative and so are EXCLUDED from + the Scope of this Specification. The <> section of the + <> defines how these parts of the Specification are identified. + + Where this Specification uses <>, defined in the <> or otherwise, that refer to + enabling technologies that are not expressly set forth in this + Specification, those enabling technologies are EXCLUDED from the Scope of + this Specification. + For clarity, enabling technologies not disclosed with particularity in this + Specification (e.g. semiconductor manufacturing technology, hardware + architecture, processor architecture or microarchitecture, memory + architecture, compiler technology, object oriented technology, basic + operating system technology, compression technology, algorithms, and so on) + are NOT to be considered expressly set forth; only those application program + interfaces and data structures disclosed with particularity are included in + the Scope of this Specification. + + For purposes of the Khronos Intellectual Property Rights Policy as it relates + to the definition of Necessary Patent Claims, all recommended or optional + features, behaviors and functionality set forth in this Specification, if + implemented, are considered to be included as Compliant Portions. + + Where this Specification includes <>, only the specifically + identified sections of those external documents are INCLUDED in the Scope of + this Specification. If not created by Khronos, those external documents may + contain contributions from non-members of Khronos not covered by the Khronos + Intellectual Property Rights Policy. + + ifndef::ratified_core_spec[] + This document contains extensions which are not ratified by Khronos, and as + such is not a ratified Specification, though it contains text from (and is a + superset of) the ratified Vulkan Specification. The ratified versions of the + Vulkan Specification can be found at + https://www.khronos.org/registry/vulkan/specs/1.2/html/vkspec.html (core + only) and + https://www.khronos.org/registry/vulkan/specs/1.2-khr-extensions/html/vkspec.html + (core with KHR extensions). + endif::ratified_core_spec[] + + Vulkan and Khronos are registered trademarks of The Khronos Group Inc. + ASTC is a trademark of ARM Holdings PLC; OpenCL is a trademark of Apple + Inc.; and OpenGL and OpenGL ES are registered trademarks of Hewlett Packard + Enterprise, all used under license by Khronos. All other product names, + trademarks, and/or company names are used solely for identification and + belong to their respective owners. + diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleColor.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleColor.cs new file mode 100644 index 0000000..57842c7 --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleColor.cs @@ -0,0 +1,78 @@ +namespace Brutal.ImGuiApi.Abstractions; + +public static class ConsoleColor +{ + public static class Float4 + { + public static readonly float4 Grey = float4.Rgb(0.4f, 0.4f, 0.4f); + public static readonly float4 DarkGrey = float4.Rgb(0.1f, 0.1f, 0.1f); + public static readonly float4 Orange = float4.Rgb(1f, 0.4f, 0f); + public static readonly float4 Red = float4.Rgb(1f, 0f, 0f); + public static readonly float4 RedTransparent = float4.Rgba(1f, 0f, 0f, 0.4f); + public static readonly float4 DarkRed = float4.Rgb(0.6f, 0f, 0f); + public static readonly float4 Black = float4.Rgb(0f, 0f, 0f); + public static readonly float4 Yellow = float4.Rgb(1f, 0.7f, 0f); + public static readonly float4 YellowTransparent = float4.Rgba(1f, 0.5f, 0f, 0.4f); + public static readonly float4 Blue = float4.Rgb(0f, 0.3f, 1f); + public static readonly float4 BlueTransparent = float4.Rgba(0f, 0.3f, 1f, 0.4f); + public static readonly float4 Green = float4.Rgb(0f, 1f, 0f); + public static readonly float4 GreenTransparent = float4.Rgba(0f, 1f, 0f, 0.4f); + public static readonly float4 GreenGrey = float4.Rgb(0.1f, 0.5f, 0.1f); + public static readonly float4 HalfTransparent = float4.Rgba(1f, 1f, 1f, 0.5f); + public static readonly float4 Transparent = float4.Rgba(0f, 0f, 0f, 0f); + public static readonly float4 Cyan = float4.Rgb(0f, 1f, 1f); + public static readonly float4 Magenta = float4.Rgb(1f, 0f, 1); + public static readonly float4 White = float4.Rgb(1f, 1f, 1); + public static readonly float4 WhiteTransparent = float4.Rgba(1f, 1f, 1, 0.4f); + public static readonly float4 DarkGreyTransparent = float4.Rgba(0.1f, 0.1f, 0.1f, 0.4f); + public static readonly float4 LightBlue = float4.Unpack(byte4.Rgb(66, 200, 245), Unpack.Float.Normalize); + public static readonly float4 GreyTransparent = float4.Rgba(0.4f, 0.4f, 0.4f, 0.4f); + //public static float4 Border => ImGui.GetStyle().Colors[(int)ImGuiCol.Border]; + //public static float4 TabHovered => ImGui.GetStyle().Colors[(int)ImGuiCol.TabHovered]; + //public static float4 PlotHistogramHovered => ImGui.GetStyle().Colors[(int)ImGuiCol.PlotHistogramHovered]; + } + + public static uint ColorConvertFloat4ToU32(float4 inVector) + { + uint outColor = 0; + + var r = inVector.X; + var g = inVector.Y; + var b = inVector.Z; + var a = inVector.W; + + outColor += (uint)(255 * r / 1.0f) << 0; + outColor += (uint)(255 * g / 1.0f) << 8; + outColor += (uint)(255 * b / 1.0f) << 16; + outColor += (uint)(255 * a / 1.0f) << 24; + + return outColor; + } + + public static class Integer + { + public static readonly uint White = ColorConvertFloat4ToU32(Float4.White); + public static readonly uint WhiteTransparent = ColorConvertFloat4ToU32(Float4.WhiteTransparent); + public static readonly uint Black = ColorConvertFloat4ToU32(Float4.Black); + public static readonly uint Grey = ColorConvertFloat4ToU32(Float4.Grey); + public static readonly uint DarkGrey = ColorConvertFloat4ToU32(Float4.DarkGrey); + public static readonly uint Yellow = ColorConvertFloat4ToU32(Float4.Yellow); + public static readonly uint YellowTransparent = ColorConvertFloat4ToU32(Float4.YellowTransparent); + public static readonly uint GreenTransparent = ColorConvertFloat4ToU32(Float4.GreenTransparent); + public static readonly uint Orange = ColorConvertFloat4ToU32(Float4.Orange); + public static readonly uint Red = ColorConvertFloat4ToU32(Float4.Red); + public static readonly uint RedTransparent = ColorConvertFloat4ToU32(Float4.RedTransparent); + public static readonly uint Green = ColorConvertFloat4ToU32(Float4.Green); + public static readonly uint GreenGrey = ColorConvertFloat4ToU32(Float4.GreenGrey); + public static readonly uint Blue = ColorConvertFloat4ToU32(Float4.Blue); + public static readonly uint LightBlue = ColorConvertFloat4ToU32(Float4.LightBlue); + public static readonly uint BlueTransparent = ColorConvertFloat4ToU32(Float4.BlueTransparent); + + //public static readonly uint TabHovered = ColorConvertFloat4ToU32(Float4.TabHovered); + //public static readonly uint Border = ColorConvertFloat4ToU32(Float4.Border); + public static readonly uint HalfTransparent = ColorConvertFloat4ToU32(Float4.HalfTransparent); + public static readonly uint Transparent = ColorConvertFloat4ToU32(Float4.Transparent); + public static readonly uint DarkGreyTransparent = ColorConvertFloat4ToU32(Float4.DarkGreyTransparent); + public static readonly uint GreyTransparent = ColorConvertFloat4ToU32(Float4.GreyTransparent); + } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleLogEntry.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleLogEntry.cs new file mode 100644 index 0000000..a5c556d --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleLogEntry.cs @@ -0,0 +1,17 @@ +namespace Brutal.ImGuiApi.Abstractions; + +public static class ConsoleLineColors +{ + public static readonly ImColor8 Default = new(178, 178, 178, 255); +} + +public struct ConsoleLogEntry() +{ + public ImColor8 Color = ConsoleLineColors.Default; + + public bool IsEmpty => TextSpanHandle.Length == 0; + public ConsoleWindow.RingBuffer.SpanHandle TextSpanHandle = new(); + public ConsoleWindow.RingBuffer.SpanHandle TimeSpanHandle = new(); + + public float ActiveTime; +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleWindow.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleWindow.cs new file mode 100644 index 0000000..d7dacc7 --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/ConsoleWindow.cs @@ -0,0 +1,889 @@ +using System.Buffers; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; +using Brutal.ImGuiApi.Internal; +using Brutal.Strings; +using Microsoft.Extensions.Logging; + +namespace Brutal.ImGuiApi.Abstractions; + +/// +/// This logger receives log messages, formats them and sends them to the ConsoleWindow +/// +public class ConsoleWindowLogger : ILogger, IDisposable +{ + private readonly ConsoleWindow _consoleWindow; + private readonly string _categoryName; + + /// + /// Log formatter function - users can override this, but we provide a default + /// LogLevel: The log level + /// string: The category name + /// string: The log message + /// Returns the formatted log string + /// + public static Func? LogFormatter { get; set; } + + public ConsoleWindowLogger(ConsoleWindow consoleWindow, string categoryName) + { + _categoryName = categoryName; + _consoleWindow = consoleWindow; + } + + public void Dispose() { } + + /// + /// Receive a log message, format it and send it to the ConsoleWindow + /// + public void Log( + LogLevel logLevel, + EventId eventId, + TState state, + Exception? exception, + Func formatter + ) + { + var formattedMessage = formatter(state, exception); + var message = LogFormatter != null ? LogFormatter(logLevel, _categoryName, formattedMessage) : formattedMessage; + + _consoleWindow.OnLog(_categoryName, logLevel, message); + } + + public bool IsEnabled(LogLevel logLevel) + { + return true; + } + + public IDisposable? BeginScope(TState state) + where TState : notnull + { + return null; + } +} + +public class ConsoleWindow : ILoggerProvider +{ + public const int DEFAULT_LOG_TIME = 5; + public const int INITIAL_BUFFER_CAPACITY = 128; + + private readonly struct PendingMessage + { + public readonly int TextOffset; + public readonly int TextLength; // -1 signals a Clear + public readonly DateTime Timestamp; + public readonly ImColor8 Color; + public readonly int TimeToShow; + + public PendingMessage(int textOffset, int textLength, ImColor8 color, int timeToShow) + { + TextOffset = textOffset; + TextLength = textLength; + Timestamp = DateTime.Now; + Color = color; + TimeToShow = timeToShow; + } + } + + private readonly Lock _pendingLock = new(); + private bool _pendingClear; + + private const int BUFFER_COUNT = 2; + private const int PENDING_TEXT_BUFFER_SIZE = 1024 * 1024; // 1MB pre-allocated for the pending text per-buffer for now, should be enough + private int _currentActiveBuffer = 0; + private readonly List[] _pendingMessages = new List[BUFFER_COUNT] { new(), new() }; + private readonly byte[][] _pendingText = [new byte[PENDING_TEXT_BUFFER_SIZE], new byte[PENDING_TEXT_BUFFER_SIZE]]; + private readonly int[] _pendingTextPos = new int[BUFFER_COUNT]; + + private class GrowingRingBuffer(int initialCapacity) + { + private T[] _backingArray = new T[initialCapacity]; + + public int Begin; + public int End; + public int Capacity => _backingArray.Length; + public int Count => End >= Begin ? End - Begin : Capacity - Begin + End; + + public ref T this[int index] => ref _backingArray[(Begin + index) % Capacity]; + + public static implicit operator Span(GrowingRingBuffer array) => array._backingArray; + + public void Reset(int newCapacity) + { + if (newCapacity != Capacity) + _backingArray = new T[newCapacity]; + Begin = 0; + End = 0; + } + + public void Resize(int newCapacity) + { + var oldCount = Count; + var newArray = new T[newCapacity]; + if (End > Begin) + { + // |--BbbeeE--| |BbbeeE--------------| + Array.Copy(_backingArray, Begin, newArray, 0, End - Begin); + } + else + { + // |eeE----Bbb| |BbbeeE--------------| + Array.Copy(_backingArray, Begin, newArray, 0, Capacity - Begin); + Array.Copy(_backingArray, 0, newArray, Capacity - Begin, End); + } + + _backingArray = newArray; + Begin = 0; + End = oldCount; + + Debug.Assert(End != Begin); + Debug.Assert(End < Capacity); + } + + public void Push(T newItem) + { + if ((End + 1) % Capacity == Begin) + Resize(Capacity * 2); + + _backingArray[End] = newItem; + End = (End + 1) % Capacity; + + Debug.Assert(End != Begin); + } + } + + private readonly GrowingRingBuffer _consoleBuffer = new(INITIAL_BUFFER_CAPACITY); + + public void DrawStats() + { + ImGui.Text($"Capacity: {_consoleBuffer.Capacity}"); + ImGui.Text($"Count: {_consoleBuffer.Count}"); + ImGui.Text($"Begin: {_consoleBuffer.Begin}"); + ImGui.Text($"End: {_consoleBuffer.End}"); + + var units = Math.Min(20, _consoleBuffer.Capacity); + + var region1Units = 0; + var region2Units = 0; + var region3Units = 0; + var region1Char = '?'; + var region2Char = '?'; + var region3Char = '?'; + var region1Color = ConsoleColor.Float4.Magenta; + var region2Color = ConsoleColor.Float4.Magenta; + var region3Color = ConsoleColor.Float4.Magenta; + + if (_consoleBuffer.Begin > _consoleBuffer.End) + { + region1Units = (int)((float)_consoleBuffer.End / _consoleBuffer.Capacity * units); + region2Units = (int)((float)(_consoleBuffer.Begin - _consoleBuffer.End) / _consoleBuffer.Capacity * units); + + region1Char = 'x'; + region2Char = '-'; + region3Char = 'x'; + region1Color = ConsoleColor.Float4.Green; + region2Color = ConsoleColor.Float4.Grey; + region3Color = ConsoleColor.Float4.Green; + } + else + { + region1Units = (int)(((float)_consoleBuffer.Begin / _consoleBuffer.Capacity) * units); + + var num = _consoleBuffer.End - _consoleBuffer.Begin; + region2Units = (int)((float)num / _consoleBuffer.Capacity * units); + if (region2Units == 0 && num != 0) + region2Units = 1; + + region1Char = '-'; + region2Char = 'x'; + region3Char = '-'; + region1Color = ConsoleColor.Float4.Grey; + region2Color = ConsoleColor.Float4.Green; + region3Color = ConsoleColor.Float4.Grey; + } + + region3Units = units - region1Units - region2Units; + + ImGui.Text("Buffer: |"u8); + ImGui.SameLine(); + ImGui.TextColored(region1Color, new string(region1Char, region1Units)); + ImGui.SameLine(); + ImGui.TextColored(region2Color, new string(region2Char, region2Units)); + ImGui.SameLine(); + ImGui.TextColored(region3Color, new string(region3Char, region3Units)); + ImGui.SameLine(); + ImGui.Text("|"u8); + } + + public TerminalInterface Terminal; + + private bool _show; + private bool _setFocus; + private bool _overwrite; + private bool _scrollToBottom; + private bool _autoScroll = false; + private bool _fadeMessages = true; + + private readonly ImInputString _consoleInput = new(512, []); + public readonly RingBuffer Storage; + private bool _clearConsoleInput; + + public bool IsOpen => _show; + + // #TODO-batchmode: Implement BatchMode() + + private float2 _inputSize; + private bool _inputLastActive; + + private readonly string[] _commandBuffer = new string[8]; + private int _commandBufferIndex; + private int _headIndex; + private int _tailIndex; + + private static readonly ImColor8 DefaultColor = ConsoleColor.ColorConvertFloat4ToU32( + new float4(0.7f, 0.7f, 0.7f, 1f) + ); + public static ImColor8 InfoColor = DefaultColor; + public static ImColor8 DebugColor = ConsoleColor.Integer.Yellow; + public static ImColor8 WarningColor = ConsoleColor.Integer.Orange; + public static ImColor8 ErrorColor = ConsoleColor.Integer.Red; + public static ImColor8 CriticalColor = ConsoleColor.Integer.Red; + public static ImColor8 TraceColor = ConsoleColor.Integer.GreenGrey; + + /// + /// Scale of the font in the console window. + /// Use as a field so it can be referenced in an ImGui slider etc. + /// + public float FontScale = 1f; + + /// + /// Font Pointer for rendering texting to console window + /// + /// This shouldn't really be changed. Only used for more easily testing fonts for ConsoleWindow. + /// For the sake of consistency between games. Leave this value as is. + /// + public ImFontPtr FontPtr; + + public ConsoleWindow() + : this(ByteSize.FromMegabytes(2)) { } + + public ConsoleWindow(ByteSize bufferSize) + { + Storage = new RingBuffer(bufferSize); + Terminal = new(this); + } + + /// + /// Retrieves the default font for the console window. + /// If no fonts are available in the font atlas, a default font is added and returned. + /// Otherwise, the first font in the font atlas is returned. + /// + /// The pointer to the default font in the font atlas. + public ImFontPtr GetDefaultFont() + { + var fontAtlas = ImGui.GetIO().Fonts; + var fonts = fontAtlas.Fonts; + return fonts.Count == 0 ? fontAtlas.AddFontDefault() : fonts[0]; + } + + public ILogger CreateLogger(string categoryName) + { + return new ConsoleWindowLogger(this, categoryName); + } + + public void OnLog(string categoryName, LogLevel logLevel, string message) + { + // Otherwise just sort by log level + switch (logLevel) + { + case LogLevel.None: + case LogLevel.Information: + Print(message, InfoColor); + break; + case LogLevel.Trace: + Print(message, TraceColor); + break; + case LogLevel.Debug: + Print(message, DebugColor); + break; + case LogLevel.Warning: + Print(message, WarningColor); + break; + case LogLevel.Error: + Print(message, ErrorColor); + break; + case LogLevel.Critical: + Print(message, CriticalColor); + break; + default: + throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null); + } + } + + public void Show() + { + _show = true; + _setFocus = true; + _inputLastActive = true; + } + + public void Hide() + { + _show = false; + _inputLastActive = false; + } + + public void EnableMessageFading() + { + _fadeMessages = true; + } + + public void DisableMessageFading() + { + _fadeMessages = false; + } + + private void DrawLog(float unscaledDeltaTime, bool noFade = false) + { + _inputSize = ImGui.GetStyle().WindowPadding; + + for (var i = 0; i < _consoleBuffer.Count; ++i) + Draw(ref _consoleBuffer[i], ref _inputSize, _show, unscaledDeltaTime, noFade); + } + + /// + /// Draws the ConsoleWindow to the screen using the position and size of the current viewport + /// + /// + /// + /// + /// + public void Draw(float2 viewportPosition, float2 viewportSize, float unscaledDeltaTime, bool noFade = false) + { + // Swap the buffers before to resolve all the "pending messages" + SwapBuffers(); + + if (FontPtr.IsNull()) + FontPtr = GetDefaultFont(); + + ImGui.PushFont(FontPtr, ImGui.GetStyle().FontSizeBase * FontScale); + + // PREPARE WINDOW FLAGS + var flags = + ImGuiWindowFlags.NoCollapse + | ImGuiWindowFlags.NoSavedSettings + | ImGuiWindowFlags.NoTitleBar + | ImGuiWindowFlags.NoMove + | ImGuiWindowFlags.NoResize + | ImGuiWindowFlags.NoScrollbar + | ImGuiWindowFlags.NoMouseInputs; + if (!_show) + flags |= ImGuiWindowFlags.NoBackground; + + // CREATE WINDOW SIZE + var scalingSize = _inputSize.Y + ImGui.GetItemRectSize().Y; + var ySize = _show ? Math.Min(scalingSize, viewportSize.Y / 3) : _inputSize.Y; + ImGui.SetNextWindowSize(viewportSize with { Y = ySize }, ImGuiCond.Always); + ImGui.SetNextWindowPos(viewportPosition + new float2(0, viewportSize.Y - ySize), ImGuiCond.Always); + + // SET STYLES FOR WINDOW + ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 0f); + ImGui.PushStyleColor(ImGuiCol.WindowBg, ConsoleColor.Integer.Black); + ImGui.PushStyleColor(ImGuiCol.Border, ConsoleColor.Integer.DarkGrey); + + // BEGIN THE DRAW PHASE + if (ImGui.Begin("ConsoleWindow"u8, ref _show, flags)) + { + //POP THE BORDER AND BG STYLES + ImGui.PopStyleColor(2); + ImGui.PopStyleVar(); + + // IF CONSOLE IS OPEN + if (_show) + { + // DRAW A SCROLL AREA FOR HISTORY + var footerSize = ImGui.GetFrameHeightWithSpacing(); + if (ImGui.BeginChild("ScrollingRegion"u8, new float2(0, -footerSize))) + { + DrawLog(unscaledDeltaTime, noFade); + if (_scrollToBottom || (_autoScroll && ImGui.GetScrollY() >= ImGui.GetScrollMaxY())) + ImGui.SetScrollHereY(1.0f); + _scrollToBottom = false; + ImGui.EndChild(); + } + + //ImGui.Separator(); + + // PREPARE INPUT FIELD + ImGui.Text(">"u8); + ImGui.SameLine(); + ImGui.PushItemWidth(ImGui.GetContentRegionAvail().X); + ImGui.PushStyleColor(ImGuiCol.Border, ConsoleColor.Integer.Transparent); + ImGui.PushStyleColor(ImGuiCol.FrameBg, ConsoleColor.Integer.Transparent); + + // DRAW INPUT FIELD + var id = "###ConsoleInput"u8; + if (_overwrite) + { + _overwrite = false; + ImGui.Internal.GetInputTextState(ImGui.GetID(id)).ReloadUserBufAndMoveToEnd(); + } + + ImGui.InputText(id, _consoleInput); + _inputLastActive = ImGui.IsItemActive(); + + // SET FOCUS ON INPUT FIELD + ImGuiUtils.SetLastFocusOnAppearing(true); + _inputSize += ImGui.GetItemRectSize(); + ImGui.PopStyleColor(2); + ImGui.PopItemWidth(); + + if (ImGui.IsItemVisible()) + { + if (_setFocus) + { + ImGui.SetWindowFocus(); + ImGui.SetKeyboardFocusHere(); + _setFocus = false; + _scrollToBottom = true; + } + else if (!ImGui.IsWindowFocused()) + { + _show = false; + _scrollToBottom = true; + } + } + } + // IF CONSOLE IS CLOSED + else + { + // DRAW FADING CRITICAL LOG HISTORY SUCH AS ACTIONS OR ERRORS + DrawLog(unscaledDeltaTime, noFade); + } + + // CLEAR THE INPUT FIELD + if (_clearConsoleInput) + { + _clearConsoleInput = false; + _consoleInput.Clear(); + _scrollToBottom = true; + } + } + + //END THE DRAW PHASE + ImGui.End(); + ImGui.PopFont(); + } + + public void Submit(string input) + { + _consoleInput.Value16 = input; + Submit(); + } + + private void Submit() + { + if (_consoleInput.IsEmpty) + { + Hide(); + return; + } + + Terminal.Execute(_consoleInput.ToString()); + + _clearConsoleInput = true; + _setFocus = true; + _scrollToBottom = true; + } + + public void ClearConsole() + { + // #TODO-batchmode Implement clear console for batch mode + lock (_pendingLock) + { + var buf = _currentActiveBuffer; + _pendingMessages[buf].Clear(); + _pendingTextPos[buf] = 0; + _pendingClear = true; + } + } + + public void PrintMessage(string message) => Print(message, ConsoleColor.Integer.LightBlue); + + // Default colour + public void Print(string text, int timeToShow = DEFAULT_LOG_TIME) => Print(text, DefaultColor, timeToShow); + + public void Print(ImString text, int timeToShow = DEFAULT_LOG_TIME) => + Print((ReadOnlySpan)text, DefaultColor, timeToShow); + + public void Print(ReadOnlySpan text, int timeToShow = DEFAULT_LOG_TIME) => + Print(text, DefaultColor, timeToShow); + + public void Print(ReadOnlySpan text, int timeToShow = DEFAULT_LOG_TIME) => + Print(text, DefaultColor, timeToShow); + + // With colour + public void Print(ImString text, ImColor8 color, int timeToShow = DEFAULT_LOG_TIME) => + AddPendingMessage((ReadOnlySpan)text, color, timeToShow); + + public void Print(ReadOnlySpan text, ImColor8 color, int timeToShow = DEFAULT_LOG_TIME) => + AddPendingMessage(text, color, timeToShow); + + public void Print(ReadOnlySpan text, ImColor8 color, int timeToShow = DEFAULT_LOG_TIME) => + AddPendingMessage(text, color, timeToShow); + + private void AddPendingMessage(ReadOnlySpan text, ImColor8 color, int timeToShow) + { + // Don't show the message in the fading list if it's disabled + if (!_fadeMessages) + timeToShow = 0; + lock (_pendingLock) + { + var bufIdx = _currentActiveBuffer; + var offset = _pendingTextPos[bufIdx]; + Debug.Assert( + offset + text.Length <= PENDING_TEXT_BUFFER_SIZE, + "Pending text buffer overflow: increase PENDING_TEXT_BUFFER_SIZE" + ); + if (offset + text.Length > PENDING_TEXT_BUFFER_SIZE) + return; + text.CopyTo(_pendingText[bufIdx].AsSpan(offset)); + _pendingTextPos[bufIdx] += text.Length; + _pendingMessages[bufIdx].Add(new PendingMessage(offset, text.Length, color, timeToShow)); + } + } + + private void AddPendingMessage(ReadOnlySpan text, ImColor8 color, int timeToShow) + { + // Don't show the message in the fading list if it's disabled + if (!_fadeMessages) + timeToShow = 0; + var byteCount = Utf8.GetByteCount(text); + lock (_pendingLock) + { + var bufIdx = _currentActiveBuffer; + var offset = _pendingTextPos[bufIdx]; + Debug.Assert( + offset + byteCount <= PENDING_TEXT_BUFFER_SIZE, + "Pending text buffer overflow: increase PENDING_TEXT_BUFFER_SIZE" + ); + if (offset + byteCount > PENDING_TEXT_BUFFER_SIZE) + return; + var status = Utf8.FromUtf16(text, _pendingText[bufIdx].AsSpan(offset), out _, out var bytesWritten); + if (status != OperationStatus.Done) + throw new InvalidOperationException($"Failed to convert UTF-16 to UTF-8: {status}"); + _pendingTextPos[bufIdx] += bytesWritten; + _pendingMessages[bufIdx].Add(new PendingMessage(offset, bytesWritten, color, timeToShow)); + } + } + + public void SwapBuffers() + { + int active; + bool clear; + lock (_pendingLock) + { + active = _currentActiveBuffer; + _currentActiveBuffer = (active + 1) % BUFFER_COUNT; + clear = _pendingClear; + _pendingClear = false; + } + + if (clear) + { + Storage.Reset(); + _consoleBuffer.Reset(INITIAL_BUFFER_CAPACITY); + } + + var messages = CollectionsMarshal.AsSpan(_pendingMessages[active]); + var pendingText = _pendingText[active].AsSpan(0, _pendingTextPos[active]); + for (var i = 0; i < messages.Length; ++i) + { + ref readonly var msg = ref messages[i]; + Apply(in msg, pendingText.Slice(msg.TextOffset, msg.TextLength)); + } + + _pendingMessages[active].Clear(); + _pendingTextPos[active] = 0; + } + + private void Apply(in PendingMessage pending, ReadOnlySpan text) + { + var textHandle = Storage.Append(text); + + Span timeBytes = stackalloc byte[8]; // "HH:mm:ss" is always 8 bytes + pending.Timestamp.TryFormat(timeBytes, out var timeBytesWritten, "HH:mm:ss", CultureInfo.InvariantCulture); + + _consoleBuffer.Push( + new ConsoleLogEntry + { + TextSpanHandle = textHandle, + Color = pending.Color, + TimeSpanHandle = Storage.Append(timeBytes[..timeBytesWritten]), + ActiveTime = pending.TimeToShow, + } + ); + + // push the begin pointer until we find the next valid message + while (Storage.TokenIsStale(_consoleBuffer[0].TextSpanHandle)) + _consoleBuffer.Begin = (_consoleBuffer.Begin + 1) % _consoleBuffer.Capacity; + } + + public enum Actions + { + Up, + Down, + Submit, + Toggle, + } + + /// + /// Callback for handling input actions. + /// + /// One of the supported actions. + /// True if the action was handled, false otherwise. + public bool HandleInputAction(Actions action) + { + if (_inputLastActive) + { + if (action is Actions.Up or Actions.Down) + { + // save the current input if it is not already saved + if (_commandBufferIndex == _headIndex) + _commandBuffer[_headIndex] = _consoleInput.ToString(); + + if (action is Actions.Up) + { + var next = _commandBufferIndex == 0 ? _commandBuffer.Length - 1 : _commandBufferIndex - 1; + if (_commandBufferIndex != _tailIndex) + { + _commandBufferIndex = next; + _consoleInput.Value16 = _commandBuffer[_commandBufferIndex]; + _overwrite = true; + } + } + else + { + // key is down + if (_commandBufferIndex != _headIndex) + { + _commandBufferIndex = (_commandBufferIndex + 1) % _commandBuffer.Length; + _consoleInput.Value16 = _commandBuffer[_commandBufferIndex]; + _overwrite = true; + } + } + + return true; + } + } + + if (!_show && action == Actions.Toggle) + { + Show(); + return true; + } + + if (!_show) + return false; + + if (action == Actions.Toggle) + { + Hide(); + return true; + } + + if (action is Actions.Submit) + { + Submit(); + if (!_consoleInput.IsEmpty) + { + var inputString = _consoleInput.ToString(); + if (_commandBufferIndex == _headIndex) + { + // we wrote to the head, so we need to move the head + _commandBuffer[_commandBufferIndex] = inputString; + _headIndex = (_commandBufferIndex + 1) % _commandBuffer.Length; + } + else + { + if (inputString != _commandBuffer[_commandBufferIndex]) + { + // we have edited an old command, so we need to move the head and write to the head + _commandBuffer[_headIndex] = inputString; + _headIndex = (_headIndex + 1) % _commandBuffer.Length; + } + } + + _commandBufferIndex = _headIndex; + + // if the head is at the tail, we need to move the tail + if (_headIndex == _tailIndex) + _tailIndex = (_tailIndex + 1) % _commandBuffer.Length; + + _consoleInput.Clear(); + _overwrite = true; + } + + return true; + } + + return false; + } + + public void Draw( + ref ConsoleLogEntry line, + ref float2 inputSize, + bool isShown, + float unscaledDeltaTime, + bool noFade = false + ) + { + Debug.Assert(!Storage.TokenIsStale(line.TimeSpanHandle)); + + if (line.IsEmpty || !isShown && line.ActiveTime <= 0f) + return; + + var isShowing = !isShown & line.ActiveTime <= 1f; + + if (isShowing) + { + float alpha; + if (noFade) + alpha = line.ActiveTime > 0f ? 1f : 0f; + else + alpha = float.Lerp(0f, 1f, line.ActiveTime); + + ImGui.PushStyleVar(ImGuiStyleVar.Alpha, alpha); + } + + DrawTime(line, isShown); + ImGui.SameLine(); + + var textString = Storage.GetSpan(line.TextSpanHandle); + + if (!isShown) + { + ImGuiUtils.TextShadow(textString, line.Color); + } + else + { + ImGui.PushStyleColor(ImGuiCol.Text, line.Color); + ImGui.TextWrapped(textString); + ImGui.PopStyleColor(); + } + + inputSize += ImGui.GetItemRectSize() + ImGui.GetStyle().ItemSpacing; + + if (isShowing) + ImGui.PopStyleVar(); + if (line.ActiveTime > 0) + line.ActiveTime -= unscaledDeltaTime; + } + + private void DrawTime(ConsoleLogEntry line, bool isShown) + { + var timeString = Storage.GetSpan(line.TimeSpanHandle); + + if (!isShown) + { + ImGuiUtils.TextShadow(timeString, ConsoleColor.Integer.Grey); + } + else + { + ImGui.PushStyleColor(ImGuiCol.Text, ConsoleColor.Integer.Grey); + ImGui.Text(timeString); + ImGui.PopStyleColor(); + } + } + + public void Dispose() { } + + public class RingBuffer(ByteSize capacity) + { + public readonly record struct SpanHandle(int Offset, int Length, uint Generation); + + private readonly byte[] _array = new byte[capacity.Bytes]; + internal int Position; + private int Remaining => _array.Length - Position; + public int CurrentPosition => Position; + public uint Generation { get; private set; } + + public Span Destination => _array.AsSpan(Position); + + private SpanHandle Advance(int bytesWritten) => Advance(bytesWritten, true, Position); + + public SpanHandle Advance(int bytesWritten, bool nullTerminate, int start) + { + Position += bytesWritten; + var length = Position - start; // don't include the null terminator + if (nullTerminate) + _array[Position++] = 0; + return new SpanHandle(start, length, Generation); + } + + public void EnsureCapacity(int requiredBytes) + { + if (requiredBytes > _array.Length) + throw new OutOfMemoryException( + $"Required bytes {requiredBytes} exceed buffer capacity {_array.Length}" + ); + + if (Remaining < requiredBytes) + { + Position = 0; // reset position to the beginning of the buffer if we exceed capacity + ++Generation; // Increment the generation when we reset the position to track stale Tokens + } + } + + public SpanHandle Append(ReadOnlySpan value) + { + EnsureCapacity(value.Length + 1); // +1 for null terminator added by Advance + value.CopyTo(_array.AsSpan(Position)); + return Advance(value.Length); + } + + public ReadOnlySpan AppendToSpan(ReadOnlySpan value) + { + return GetSpan(Append(value)); + } + + private SpanHandle Append(ReadOnlySpan value, int requiredBytes) + { + EnsureCapacity(requiredBytes + 1); // +1 for null terminator added by Advance + var status = Utf8.FromUtf16(value, _array.AsSpan(Position), out _, out var bytesWritten); + if (status != OperationStatus.Done) + throw new InvalidOperationException($"Failed to convert UTF-16 to UTF-8: {status}"); + return Advance(bytesWritten); + } + + public SpanHandle Append(ReadOnlySpan value) + { + return Append(value, Utf8.GetByteCount(value)); + } + + public ReadOnlySpan AppendToSpan(ReadOnlySpan value) + { + return GetSpan(Append(value)); + } + + public void Reset() + { + Position = 0; + ++Generation; + } + + public bool TokenIsStale(SpanHandle spanHandle) + { + if (spanHandle.Generation == Generation) + return false; // we are the current generation + if (spanHandle.Generation == Generation - 1) + return Position > spanHandle.Offset; + return true; // any older generations are always stale + } + + public ReadOnlySpan GetSpan(SpanHandle spanHandle) + { + return _array.AsSpan(spanHandle.Offset, spanHandle.Length); + } + } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/TableString.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/TableString.cs new file mode 100644 index 0000000..511fe68 --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/TableString.cs @@ -0,0 +1,76 @@ +using System.Text; + +namespace Brutal.ImGuiApi.Abstractions; + +public class TableString +{ + private readonly List _rows = new(); + + private readonly List _columnWidths = new(); + + public readonly struct Row + { + public readonly String[] Values; + + public Row(string[] values) + { + Values = values; + } + + public static Row Create(params string[] values) => new(values); + + public void ToConsole(ConsoleWindow console) + { + foreach (var value in Values) + console.Print(value); + } + } + + public void AddRow(params string[] values) => _rows.Add(new Row(values)); + + public void ToConsole(ConsoleWindow console) + { + // populate column widths + foreach (var row in _rows) + { + for (var i = 0; i < row.Values.Length; i++) + { + if (i >= _columnWidths.Count) + _columnWidths.Add(0); + var rowColumnValue = row.Values[i].Length + 1; + if (rowColumnValue > _columnWidths[i]) + _columnWidths[i] = rowColumnValue; + } + } + + foreach (var row in _rows) + { + var sb = new StringBuilder(); + for (var i = 0; i < row.Values.Length; i++) + { + var value = row.Values[i]; + switch (i) + { + case > 0: + sb.Append(' '); + break; + case 0: + sb.Append("| "); + break; + } + + sb.Append(value.PadRight(_columnWidths[i])); + sb.Append(" |"); + } + console.Print(sb.ToString()); + } + } + + public void AddRow(Row toRow) => _rows.Add(toRow); + + public void Sort() + { + // sort rows by first column + _rows.Sort((a, b) => string.Compare(a.Values[0], b.Values[0], StringComparison.Ordinal)); + } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCallbackAttribute.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCallbackAttribute.cs new file mode 100644 index 0000000..0e6476a --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCallbackAttribute.cs @@ -0,0 +1,53 @@ +namespace Brutal.ImGuiApi.Abstractions; + +/// +/// Defines how a terminal action should be parsed +/// +public enum ArgParseMode +{ + /// + /// Parse the command string args into individual tokens, considering whitespace and quotes + /// + Default, + + /// + /// Output the raw unparsed command arg string + /// + Unparsed, +} + +/// +/// An attribute which is used to define methods that can be registered as callback through a TerminalInterface +/// +[AttributeUsage(AttributeTargets.Method)] +public class TerminalActionAttribute : Attribute +{ + /// The command name + /// A description of the command + /// The type of parsing which should be used on the command + public TerminalActionAttribute( + string commandName, + string description = "", + ArgParseMode parsingMode = ArgParseMode.Default + ) + { + CommandName = commandName.ToLower(); + Description = description; + ParsingMode = parsingMode; + } + + /// + /// The name of the command + /// + public string CommandName { get; } + + /// + /// A description of the command + /// + public string Description { get; } + + /// + /// The parsing mode of the command + /// + public ArgParseMode ParsingMode { get; } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCommand.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCommand.cs new file mode 100644 index 0000000..ba7c9f6 --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalCommand.cs @@ -0,0 +1,197 @@ +namespace Brutal.ImGuiApi.Abstractions; + +/// +/// Defines the arguments which a command takes +/// +public struct ArgDefinition +{ + /// + /// The name of the arg + /// + public string Name; + + /// + /// The type of the arg + /// + public Type Type; + + /// + /// Whether or not this arg has a default value + /// + public bool HasDefault; + + /// + /// ToString() helper + /// + public override string ToString() + { + return Name; + } +} + +/// +/// A struct which represents a command which can be called through the terminal interface +/// +public readonly struct Command +{ + private readonly List _argDefinitions; + private readonly Delegate _callback; + + /// + /// A description of the command + /// + public string Description { get; } + + /// + /// The parsing mode which should be used for this command + /// + public ArgParseMode ParsingMode { get; } + + /// + /// Constructor, which takes a callback function and uses its parameters to define argument definitions + /// + /// + /// + /// + public Command(Delegate callback, string description, ArgParseMode parsingMode) + { + _argDefinitions = new List(); + _callback = callback; + Description = description; + ParsingMode = parsingMode; + CreateArgDefinitions(); + } + + /// + /// Call to issue this command + /// + /// The args to call the command with + public void Issue(string[]? args) + { + ParseArgs(args, out var parsedArgs); + _callback.Method.Invoke(_callback.Target, parsedArgs); + } + + /// + /// Returns a readonly list of the arg definitions for this command + /// + public IReadOnlyList GetDefinitions => _argDefinitions; + + private void ParseArgs(string[]? args, out object[]? outParsedArgs) + { + if (args?.Length > _argDefinitions.Count) + throw new TerminalInterfaceException( + "Command parsing failed," + + $" too many arguments for command: {_callback.Method.Name}." + + $" Expected: {_argDefinitions.Count}, got: {args.Length}." + ); + + if (_argDefinitions.Count == 0) + { + outParsedArgs = null; + return; + } + + outParsedArgs = new object[_argDefinitions.Count]; + + // Iterate through our defined definitions and try to parse the args into the correct types + for (var i = 0; i < _argDefinitions.Count; i++) + { + var definition = _argDefinitions[i]; + ref var outArg = ref outParsedArgs[i]; + + if (args is null || args.Length <= i) + { + // If an arg is optional pass Type.Missing to use the function's defined default + if (definition.HasDefault) + { + outArg = Type.Missing; + continue; + } + + throw new TerminalInterfaceException( + "Command parsing failed," + + $" missing required argument: {definition.Name}" + + $" of type: {definition.Type.Name}" + ); + } + + var arg = args[i]; + + TryParse(arg, definition.Type, out outArg); + } + } + + private static void TryParse(string arg, Type type, out object value) + { + // TODO: Add specific cases that we want to handle with our own parsing logic - e.g. vectors + + try + { + value = Convert.ChangeType(arg, type); + } + catch + { + throw new TerminalInterfaceException($"Failed to parse command argument: {arg} to type: {type.Name}."); + } + } + + private void CreateArgDefinitions() + { + var parameters = _callback.Method.GetParameters(); + + // Validation of single string parsing mode + if (ParsingMode == ArgParseMode.Unparsed) + { + if (parameters.Length != 1) + throw new TerminalInterfaceException( + "Failed to parse delegate parameters into argument types," + + " single string parsing mode requires exactly one parameter" + + $" in callback: {_callback.Method.Name}" + ); + + if (parameters[0].ParameterType != typeof(string)) + throw new TerminalInterfaceException( + "Failed to parse delegate parameters into argument types," + + " single string parsing mode requires a string parameter" + + $" in callback: {_callback.Method.Name}" + ); + } + + foreach (var parameter in parameters) + { + if (!TypeIsSupported(parameter.ParameterType)) + throw new TerminalInterfaceException( + "Failed to parse delegate parameters into argument types," + + $" unsupported argument type: {parameter.ParameterType.Name}" + + $" in callback: {_callback.Method.Name}" + ); + + var definition = new ArgDefinition + { + Name = parameter.Name ?? $"param_{parameter.Position}", + Type = parameter.ParameterType, + HasDefault = parameter.HasDefaultValue, + }; + + _argDefinitions.Add(definition); + } + } + + private static bool TypeIsSupported(Type type) + { + // Convert.ChangeType() supports primitives, strings, and DateTime + if (type.IsPrimitive) + return true; + + if (type == typeof(string)) + return true; + + if (type == typeof(DateTime)) + return true; + + // TODO: add any types for which we offer custom parsing logic + + return false; + } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterface.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterface.cs new file mode 100644 index 0000000..7e3261c --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterface.cs @@ -0,0 +1,272 @@ +using System.Linq.Expressions; +using System.Reflection; +using System.Text; +using Brutal.Logging; + +namespace Brutal.ImGuiApi.Abstractions; + +/// +/// The type of message the terminal interface is outputting +/// +public enum TerminalInterfaceOutputType +{ + /// + /// An informative message + /// + Message, + + /// + /// An error with the processing of a command + /// + Error, +} + +/// +/// Provides an interface which can be used to register terminal commands and handle terminal input. +/// +public class TerminalInterface +{ + public static LogCategory Log = LogCategory.Make("TerminalInterface"); + + private readonly Dictionary> CommandLibrary = new(); + private readonly Dictionary StaticCommandLibrary = new(); + private readonly ConsoleWindow _consoleWindow; + + /// + /// Invoked with a message when the terminal interface wants to output something + /// + public event Action? OnOutput; + + /// + /// Constructor + /// + public TerminalInterface(ConsoleWindow consoleWindow) + { + _consoleWindow = consoleWindow; + RegisterCommand(ListCommands); + RegisterCommand(ClearConsole); + } + + /// + /// Executes a batch of terminal input commands. + /// + /// A collection of terminal input strings. + public void Execute(params ReadOnlySpan inInput) + { + foreach (var commandLine in inInput) + Execute(commandLine); + } + + /// + /// Parses terminal input and processes it as commands. + /// + /// The input string from the terminal + public bool Execute(string inInput) + { + // Split full input into individual command statements + foreach (var commandString in Parser.SplitToCommands(inInput)) + try + { + ProcessCommand(commandString); + } + catch (TerminalInterfaceException e) + { + OutputProcessCommandError(commandString, e.Message); + return false; + } + + return true; + } + + private static Type? GetDelegateTypeForMethod(MethodBase inMethodInfo) + { + var parameterTypes = Array.ConvertAll(inMethodInfo.GetParameters(), p => p.ParameterType); + // Direct lookup of the right Action arity. Returns false when no Action can represent the + // signature: more than 16 parameters, or ByRef/pointer parameter types. + return Expression.TryGetActionType(parameterTypes, out var delegateType) ? delegateType : null; + } + + /// + /// Register an object with TerminalAction methods + /// + /// The object we want to register commands from + /// + public void RegisterObject(object inObject) + { + var methods = GetMethodInfos(inObject); + + foreach (var method in methods) + { + var delegateType = GetDelegateTypeForMethod(method); + + if (delegateType != null) + { + if (method.IsStatic) + RegisterCommand(Delegate.CreateDelegate(delegateType, method), inObject); + else + RegisterCommand(Delegate.CreateDelegate(delegateType, inObject, method), inObject); + } + else + { + throw new TerminalInterfaceException( + $"Error registering command: callback {method.Name} has an unsupported signature" + ); + } + } + } + + private IEnumerable GetMethodInfos(object inObject) + { + const BindingFlags flags = + BindingFlags.Instance + | BindingFlags.Public + | BindingFlags.NonPublic + | BindingFlags.FlattenHierarchy + | BindingFlags.Static; + + var objectType = inObject.GetType(); + var allMethods = objectType.GetMethods(flags); + return allMethods.Where(m => m.GetCustomAttribute() != null); + } + + public void UnregisterObject(object inObject) + { + if (CommandLibrary.ContainsKey(inObject)) + CommandLibrary.Remove(inObject); + } + + /// + /// Registers commands which can be called from the terminal. + /// + /// The function which the command will call + /// Object to which the command delegate is bound to. Null for methods + public void RegisterCommand(Delegate inCallback, object? inObject = null) + { + var attribute = inCallback.Method.GetCustomAttribute(); + + if (attribute is null) + throw new TerminalInterfaceException( + $"Error registering command:" + $" callback {inCallback.Method.Name} has no TerminalActionAttribute" + ); + + if (inObject is not null) + { + if (!CommandLibrary.ContainsKey(inObject)) + CommandLibrary[inObject] = new Dictionary(); + + CommandLibrary[inObject][attribute.CommandName] = new Command( + inCallback, + attribute.Description, + attribute.ParsingMode + ); + } + else + { + StaticCommandLibrary[attribute.CommandName] = new Command( + inCallback, + attribute.Description, + attribute.ParsingMode + ); + } + } + + private void ProcessCommand(string inCommandString) + { + // Split command into command name and arguments + Parser.SplitCommand(inCommandString, out var commandName, out var argsString); + + if (StaticCommandLibrary.ContainsKey(commandName)) + { + var args = Parser.SplitToArgs(argsString, StaticCommandLibrary[commandName].ParsingMode); + + // Issue the command + StaticCommandLibrary[commandName].Issue(args); + return; + } + + foreach (var (_, commands) in CommandLibrary) + { + if (commands.ContainsKey(commandName)) + { + var args = Parser.SplitToArgs(argsString, commands[commandName].ParsingMode); + + // Issue the command + commands[commandName].Issue(args); + return; + } + } + Log.Error($"unknown command {commandName}, use 'help' for a list of commands"); + } + + [TerminalAction("clear", "Clears the console output")] + private void ClearConsole() => _consoleWindow.ClearConsole(); + + [TerminalAction("help", "Lists all registered commands and their descriptions")] + private void ListCommands() + { + var commandCount = 0; + var tableString = new TableString(); + + var cmds = new Dictionary(); + + // commands + foreach (var (command, args) in StaticCommandLibrary) + cmds.Add(command, args); + + // instanced commands + foreach (var (_, commands) in CommandLibrary) + foreach (var (command, args) in commands) + cmds.Add(command, args); + + foreach (var cmd in cmds) + PrintHelpLine(cmd.Key, cmd.Value); + + _consoleWindow.Print($"listing {commandCount} commands"); + _consoleWindow.Print( + "Multiple commands can be called in a single statement by separating them with a ';' semicolon" + ); + tableString.Sort(); + tableString.ToConsole(_consoleWindow); + OnOutput?.Invoke(string.Empty, TerminalInterfaceOutputType.Message); + return; + + void PrintHelpLine(string command, Command args) + { + commandCount++; + + var definitions = args.GetDefinitions; + if (definitions.Count == 0) + { + tableString.AddRow(command, args.Description); + return; + } + + var argSb = new StringBuilder(); + for (var i = 0; i < definitions.Count; i++) + { + if (i > 0) + argSb.Append(", "); + var definition = args.GetDefinitions[i]; + argSb.Append('<'); + var type = definition.Type.ToString(); + // remove "System." from the type name + if (type.StartsWith("System.")) + type = type[7..]; + type = type.ToLowerInvariant(); + argSb.Append(type); + argSb.Append('>'); + if (definition.HasDefault) + argSb.Append('?'); + argSb.Append(' '); + argSb.Append(definition.Name); + } + tableString.AddRow(command, args.Description, argSb.ToString()); + } + } + + private void OutputProcessCommandError(string inCommand, string inErrorMessage) + { + var message = $"Terminal interface failed to process command: {inCommand}, error: {inErrorMessage}"; + OnOutput?.Invoke(message, TerminalInterfaceOutputType.Error); + } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterfaceException.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterfaceException.cs new file mode 100644 index 0000000..5379b8c --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalInterfaceException.cs @@ -0,0 +1,14 @@ +namespace Brutal.ImGuiApi.Abstractions; + +/// +/// An exception which is thrown when a terminal command fails to issue +/// +public class TerminalInterfaceException : Exception +{ + /// + /// Constructor + /// + /// + public TerminalInterfaceException(string message) + : base(message) { } +} diff --git a/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalParser.cs b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalParser.cs new file mode 100644 index 0000000..fb565f6 --- /dev/null +++ b/Brutal.ImGui.Abstractions/ConsoleWindow/Terminal/TerminalParser.cs @@ -0,0 +1,90 @@ +using System.CommandLine.Parsing; + +namespace Brutal.ImGuiApi.Abstractions; + +/// +/// A parsing utility class for the terminal interface +/// +internal static class Parser +{ + private const char CommandDelimiter = ';'; + + /// + /// Splits an input string into individual command strings + /// + /// The raw string from terminal input + /// A list of individual command strings + public static List SplitToCommands(string inInput) + { + var commands = new List(); + var withinQuotes = false; + var startIndex = 0; + + void TryAddCommand(string command) + { + var trimmedCommand = command.Trim(); + if (trimmedCommand.Length > 0) + commands.Add(trimmedCommand); + } + + // Ignore our delimiter if it's part of a quoted string + for (var i = 0; i < inInput.Length; i++) + if (inInput[i] == '\"') + { + withinQuotes = !withinQuotes; + } + else if (inInput[i] == CommandDelimiter && !withinQuotes) + { + // Split input into individual commands by delimiter + TryAddCommand(inInput.Substring(startIndex, i - startIndex)); + startIndex = i + 1; + } + + // Add the last command if there is one + if (startIndex < inInput.Length) + TryAddCommand(inInput.Substring(startIndex).Trim()); + + return commands; + } + + /// + /// Splits a command string into a command name and args string + /// + /// The command string to split + /// The command name part of the input string + /// The args part of the input string + public static void SplitCommand(string inCommandString, out string inCommandName, out string inArgsString) + { + const StringSplitOptions flags = StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries; + + // Split at first whitespace + var split = inCommandString.Split(Array.Empty(), 2, flags); + + if (split.Length == 0) + throw new TerminalInterfaceException("Command parsing failed, command string was empty."); + + inCommandName = split[0].ToLower(); + inArgsString = split.Length > 1 ? split[1] : ""; + } + + /// + /// Splits an arg string into individual args according to the parsing mode + /// + /// The string to split + /// The parsing mode to use + /// An array of arg strings, or null if the args string was empty + public static string[]? SplitToArgs(string inArgsString, ArgParseMode inArgParseMode) + { + // If we're using single string parsing mode, return the args as a single string + if (inArgParseMode == ArgParseMode.Unparsed) + // Remove outer whitespace and quotes if they exist + return new[] { inArgsString }; + + // If there are no args, return null + if (string.IsNullOrEmpty(inArgsString)) + return null; + + // If we're using default parsing mode, split the args into individual strings + return CommandLineParser.SplitCommandLine(inArgsString).ToArray(); + } +} diff --git a/Brutal.ImGui.Abstractions/GlobalUsings.cs b/Brutal.ImGui.Abstractions/GlobalUsings.cs new file mode 100644 index 0000000..3b6533d --- /dev/null +++ b/Brutal.ImGui.Abstractions/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using Brutal.ImGuiApi.Extensions; +global using Brutal.Numerics; +global using Brutal.Pointers; diff --git a/Brutal.ImGui.Abstractions/ImGuiUtils.cs b/Brutal.ImGui.Abstractions/ImGuiUtils.cs new file mode 100644 index 0000000..afa502c --- /dev/null +++ b/Brutal.ImGui.Abstractions/ImGuiUtils.cs @@ -0,0 +1,32 @@ +using Brutal.ImGuiApi; + +namespace Brutal.ImGuiApi.Abstractions; + +public static class ImGuiUtils +{ + public static void SetLastFocusOnAppearing(bool force = false) + { + if ( + force + || ImGui.IsItemHovered() + || (ImGui.IsAnyItemFocused() && !ImGui.IsAnyItemActive() && !ImGui.IsMouseClicked(0)) + ) + ImGui.SetKeyboardFocusHere(-1); // Auto focus + } + + public static void TextShadow(ImString text, ImColor8 color) + { + if (text.IsEmpty) + return; + + var cursorPos = ImGui.GetCursorPos(); + ImGui.SetCursorPos(cursorPos - new float2(-1, -1)); + ImGui.PushStyleColor(ImGuiCol.Text, 0); + ImGui.Text(text); + ImGui.PopStyleColor(); + ImGui.SetCursorPos(cursorPos); + ImGui.PushStyleColor(ImGuiCol.Text, color); + ImGui.Text(text); + ImGui.PopStyleColor(); + } +} diff --git a/Brutal.ImGui.Backends/Interfaces/IPlatformBackend.cs b/Brutal.ImGui.Backends/Interfaces/IPlatformBackend.cs new file mode 100644 index 0000000..ab472c3 --- /dev/null +++ b/Brutal.ImGui.Backends/Interfaces/IPlatformBackend.cs @@ -0,0 +1,6 @@ +namespace Brutal.ImGuiApi.Backends; + +public interface IPlatformBackend : IDisposable +{ + public void NewFrame(); +} diff --git a/Brutal.ImGui.Backends/Interfaces/IRendererBackend.cs b/Brutal.ImGui.Backends/Interfaces/IRendererBackend.cs new file mode 100644 index 0000000..ee45edd --- /dev/null +++ b/Brutal.ImGui.Backends/Interfaces/IRendererBackend.cs @@ -0,0 +1,6 @@ +namespace Brutal.ImGuiApi.Backends; + +public interface IRendererBackend : IDisposable +{ + public void NewFrame(); +} diff --git a/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.GlfwInterop.cs b/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.GlfwInterop.cs new file mode 100644 index 0000000..ad03e1e --- /dev/null +++ b/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.GlfwInterop.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi.Backends; + +public partial class GlfwBackend +{ + private static partial class GlfwInterop + { + private const string MacOSLibraryName = "glfw"; + private const string WindowsLibraryName = "glfw3"; + + [LibraryImport(MacOSLibraryName, EntryPoint = "glfwGetCocoaWindow")] + public static partial nint GetCocoaWindow(nint glfwWindow); + + [LibraryImport(WindowsLibraryName, EntryPoint = "glfwGetWin32Window")] + public static partial nint GetWin32Window(nint glfwWindow); + } +} diff --git a/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.WindowsNative.cs b/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.WindowsNative.cs new file mode 100644 index 0000000..97ff8a0 --- /dev/null +++ b/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.WindowsNative.cs @@ -0,0 +1,136 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi.Backends; + +using BOOL = int; +using LONG = int; +using UINT = uint; +using HANDLE = nint; +using HWND = nint; +using LONG_PTR = nint; +using LPARAM = nint; +using LPCSTR = ReadOnlySpan; +using LRESULT = nint; +using WNDPROC = nint; +using WPARAM = nuint; + +public partial class GlfwBackend +{ + private static partial class WindowsNative + { + [LibraryImport("user32.dll")] + public static partial LONG_PTR GetWindowLongPtrW(HWND hWnd, int nIndex); + + [LibraryImport("user32.dll")] + public static partial LONG_PTR SetWindowLongPtrW(HWND hWnd, int nIndex, LONG_PTR dwNewLong); + + [LibraryImport("user32.dll", EntryPoint = "GetWindowLongW")] + public static partial LONG GetWindowLong(HWND hWnd, int nIndex); + + [LibraryImport("user32.dll", EntryPoint = "SetWindowLongW")] + public static partial LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong); + + [LibraryImport("user32.dll")] + public static partial BOOL SetPropA(HWND hWnd, LPCSTR lpString, LONG_PTR lParam); + + [LibraryImport("user32.dll")] + public static partial HANDLE GetPropA(HWND hWnd, LPCSTR lpString); + + [LibraryImport("user32.dll")] + public static partial LPARAM GetMessageExtraInfo(); + + [LibraryImport("user32.dll")] + public static partial LRESULT CallWindowProcW( + WNDPROC lpPrevWndFunc, + HWND hWnd, + UINT msg, + WPARAM wParam, + LPARAM lParam + ); + + [LibraryImport("user32.dll")] + public static partial LRESULT DefWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + + public static class Constants + { + public const int GWL_EXSTYLE = -20; + public const int GWLP_WNDPROC = -4; + public const int WS_EX_APPWINDOW = 0x00040000; + public const int WS_EX_TOOLWINDOW = 0x00000080; + + public const int WM_MOUSEMOVE = 0x0200; + public const int WM_NCMOUSEMOVE = 0x00A0; + public const int WM_LBUTTONDOWN = 0x0201; + public const int WM_LBUTTONDBLCLK = 0x0203; + public const int WM_LBUTTONUP = 0x0202; + public const int WM_RBUTTONDOWN = 0x0204; + public const int WM_RBUTTONDBLCLK = 0x0206; + public const int WM_RBUTTONUP = 0x0205; + public const int WM_MBUTTONDOWN = 0x0207; + public const int WM_MBUTTONDBLCLK = 0x0209; + public const int WM_MBUTTONUP = 0x0208; + public const int WM_XBUTTONDOWN = 0x020B; + public const int WM_XBUTTONDBLCLK = 0x020D; + public const int WM_XBUTTONUP = 0x020C; + } + + public static unsafe delegate* unmanaged[Cdecl] WndProcDelegate = &WndProc; + + // WndProc hook + public static ImGuiMouseSource GetMouseSourceFromMessageExtraInfo() + { + LPARAM extra_info = GetMessageExtraInfo(); + if ((extra_info & 0xFFFFFF80) == 0xFF515700) + return ImGuiMouseSource.Pen; + if ((extra_info & 0xFFFFFF80) == 0xFF515780) + return ImGuiMouseSource.TouchScreen; + return ImGuiMouseSource.Mouse; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe LRESULT WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + var backendHandle = GetPropA(hWnd, "IMGUI_BACKEND_DATA"u8); + if (GCHandle.FromIntPtr(backendHandle).Target is not GlfwBackend backend) + throw new Exception("Failed to retrieve backend"); + + var io = GetIO(backend._context); + + var prevWndProc = backend._prevWndProc; + var viewport = (ImGuiViewport*)GetPropA(hWnd, "IMGUI_VIEWPORT"u8); + if (viewport is not null) + { + var viewportData = (ViewportData*)viewport->PlatformUserData; + if (viewportData is not null) + prevWndProc = viewportData->PrevWndProc; + } + + switch (msg) + { + // GLFW doesn't allow to distinguish Mouse vs TouchScreen vs Pen. + // Add support for Win32 (based on imgui_impl_win32), because we rely on _TouchScreen info to trickle inputs differently. + case Constants.WM_MOUSEMOVE: + case Constants.WM_NCMOUSEMOVE: + case Constants.WM_LBUTTONDOWN: + case Constants.WM_LBUTTONDBLCLK: + case Constants.WM_LBUTTONUP: + case Constants.WM_RBUTTONDOWN: + case Constants.WM_RBUTTONDBLCLK: + case Constants.WM_RBUTTONUP: + case Constants.WM_MBUTTONDOWN: + case Constants.WM_MBUTTONDBLCLK: + case Constants.WM_MBUTTONUP: + case Constants.WM_XBUTTONDOWN: + case Constants.WM_XBUTTONDBLCLK: + case Constants.WM_XBUTTONUP: + io.AddMouseSourceEvent(GetMouseSourceFromMessageExtraInfo()); + break; + default: + break; + } + + return CallWindowProcW(prevWndProc, hWnd, msg, wParam, lParam); + } + } +} diff --git a/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs b/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs new file mode 100644 index 0000000..e5e3032 --- /dev/null +++ b/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs @@ -0,0 +1,1227 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Collections; +using Brutal.GlfwApi; +using Brutal.Memory; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; + +namespace Brutal.ImGuiApi.Backends; + +public partial class GlfwBackend : IPlatformBackend +{ + private readonly GlfwWindow _window; + private readonly ImGuiContextPtr _context; + + private readonly GlfwMouseButtonCallback _mouseButtonCallback; + private readonly GlfwScrollCallback _scrollCallback; + private readonly GlfwCursorPosCallback _cursorPosCallback; + private readonly GlfwCursorEnterCallback _cursorEnterCallback; + private readonly GlfwKeyCallback _keyCallback; + private readonly GlfwCharCallback _charCallback; + private readonly GlfwWindowFocusCallback _focusCallback; + private readonly GlfwWindowCloseCallback _closeCallback; + private readonly GlfwWindowPosCallback _posCallback; + private readonly GlfwWindowSizeCallback _sizeCallback; + + // ReSharper disable PrivateFieldCanBeConvertedToLocalVariable + private readonly ImGuiPlatformIO.GetClipboardTextFnDelegate _getClipboardTextFunction; + private readonly ImGuiPlatformIO.SetClipboardTextFnDelegate _setClipboardTextFunction; + + private double _lastTime; + private double2 _lastValidMousePos; + + private bool _mouseIgnoreButtonUp; + private bool _mouseIgnoreButtonUpWaitForFocusLoss; + private nint _prevWndProc; + private readonly WeakReference _mouseWindow = new(null); + + // Our Glfw.Clipboard returns a managed string, which can't be passed back to ImGui, so + // need to cache a stable version here from which we can hand ImGui a byte* + private readonly NativeList _cachedClipboardText = []; + + private readonly GlfwCursor[] _mouseCursors = new GlfwCursor[(int)ImGuiMouseCursor.COUNT]; + + private readonly NativeList _backendName; + + public enum ClientApi + { + Unknown, + OpenGL, + Vulkan, + } + + private readonly ClientApi _clientApi; + + private class WindowData + { + public readonly HashSet OwnedKeys = []; + public required nint PlatformHandle; + } + + private readonly ConditionalWeakTable _windowData = []; + + public GlfwBackend(GlfwWindow window, ClientApi clientApi) + { + _window = window; + _context = ImGui.GetCurrentContext(); + + var backendName = $"Brutal.ImGui.GlfwBackend - GlfwVersion: {Glfw.VersionString}"; + _backendName = new NativeList(Utf8.GetByteCount(backendName) + 1); + Utf8.FromUtf16(backendName, _backendName.AsSpan(), out _, out _); + + var io = ImGui.GetIO(); + + if (io.BackendPlatformUserData is not 0) + throw new InvalidOperationException("ImGui backend already initialized"); + io.BackendPlatformUserData = (nint)GCHandle.Alloc(this); + + io.BackendPlatformName = _backendName.Ptr; + + io.BackendFlags |= ImGuiBackendFlags.HasMouseCursors; // We can honor GetMouseCursor() values (optional) + io.BackendFlags |= ImGuiBackendFlags.HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used) + io.BackendFlags |= ImGuiBackendFlags.PlatformHasViewports; // We can create multi-viewports on the Platform side (optional) + io.BackendFlags |= ImGuiBackendFlags.HasMouseHoveredViewport; // We can call io.AddMouseViewportEvent() with correct data (optional) + + unsafe + { + _getClipboardTextFunction = GetClipboardText; + _setClipboardTextFunction = SetClipboardText; + + var platformIo = ImGui.GetPlatformIO(); + platformIo.Platform_GetClipboardTextFn = Marshal.GetFunctionPointerForDelegate(_getClipboardTextFunction); + platformIo.Platform_SetClipboardTextFn = Marshal.GetFunctionPointerForDelegate(_setClipboardTextFunction); + } + + InitMouseCursors(); + + _mouseButtonCallback = OnMouseButton; + _scrollCallback = OnScroll; + _cursorPosCallback = OnCursorPos; + _cursorEnterCallback = OnCursorEnter; + _keyCallback = OnKey; + _charCallback = OnChar; + _focusCallback = OnFocus; + + _closeCallback = WindowCloseCallback; + _posCallback = WindowPosCallback; + _sizeCallback = WindowSizeCallback; + + _window.OnMouseButton += _mouseButtonCallback; + _window.OnScroll += _scrollCallback; + _window.OnCursorPos += _cursorPosCallback; + _window.OnCursorEnter += _cursorEnterCallback; + _window.OnKey += _keyCallback; + _window.OnChar += _charCallback; + _window.OnFocus += _focusCallback; + + // Update monitor a first time during init + UpdateMonitors(); + + // Set platform dependent data in viewport + var mainViewport = ImGui.GetMainViewport(); + mainViewport.PlatformHandle = (nint)GCHandle.Alloc(window); + _windowData.Add(window, new WindowData { PlatformHandle = mainViewport.PlatformHandle }); + + if (OperatingSystem.IsWindows()) + { + mainViewport.PlatformHandleRaw = GlfwInterop.GetWin32Window(_window.NativeHandle); + } + else if (OperatingSystem.IsMacOS()) + { + mainViewport.PlatformHandleRaw = GlfwInterop.GetCocoaWindow(_window.NativeHandle); + } + + InitMultiViewportSupport(); + + // Windows: register a WndProc hook so we can intercept some messages. + if (OperatingSystem.IsWindows()) + { + var handle = GCHandle.Alloc(this); + WindowsNative.SetPropA(mainViewport.PlatformHandleRaw, "IMGUI_BACKEND_DATA"u8, (nint)handle); + _prevWndProc = WindowsNative.GetWindowLongPtrW( + mainViewport.PlatformHandleRaw, + WindowsNative.Constants.GWLP_WNDPROC + ); + + if (_prevWndProc == 0) + throw new InvalidOperationException("Failed to get previous WndProc"); + + unsafe + { + WindowsNative.SetWindowLongPtrW( + mainViewport.PlatformHandleRaw, + WindowsNative.Constants.GWLP_WNDPROC, + (nint)WindowsNative.WndProcDelegate + ); + } + } + + _clientApi = clientApi; + } + + public void NewFrame() + { + var io = GetIO(_context); + + // Setup main viewport size (every frame to accommodate for window resizing). + // DisplayFramebufferScale is the framebuffer/window ratio, matching the C++ reference and + // the viewport render path. + io.DisplaySize = float2.Unpack(_window.Size); + io.DisplayFramebufferScale = GetFramebufferScale(_window); + + UpdateMonitors(); + + // Setup time step + // (Accept glfwGetTime() not returning a monotonically increasing value. Seems to happens on disconnecting peripherals and probably on VMs and Emscripten, see #6491, #6189, #6114, #3644) + var time = Glfw.Time; + if (time <= _lastTime) + time = _lastTime + 0.00001f; + io.DeltaTime = _lastTime > 0.0d ? (float)(time - _lastTime) : 1.0f / 60.0f; + _lastTime = time; + + _mouseIgnoreButtonUp = false; + + UpdateMouseData(); + UpdateMouseCursor(); + UpdateGamepads(); + } + + public void Dispose() + { + var mainViewport = ImGui.GetMainViewport(); + if (mainViewport.PlatformHandle is not 0) + { + GCHandle.FromIntPtr(mainViewport.PlatformHandle).Free(); + mainViewport.PlatformHandle = 0; + } + + ImGui.DestroyPlatformWindows(); + + _window.OnMouseButton -= _mouseButtonCallback; + _window.OnScroll -= _scrollCallback; + _window.OnCursorPos -= _cursorPosCallback; + _window.OnKey -= _keyCallback; + _window.OnChar -= _charCallback; + _window.OnFocus -= _focusCallback; + _window.OnCursorEnter -= _cursorEnterCallback; + + foreach (var cursor in _mouseCursors) + cursor.Dispose(); + + mainViewport = ImGui.GetMainViewport(); + + // Windows: restore our WndProc hook + if (OperatingSystem.IsWindows()) + { + WindowsNative.SetPropA(mainViewport.PlatformHandleRaw, "IMGUI_BACKEND_DATA"u8, 0); + var backend = GetBackend(); + WindowsNative.SetWindowLongPtrW( + mainViewport.PlatformHandleRaw, + WindowsNative.Constants.GWLP_WNDPROC, + backend._prevWndProc + ); + backend._prevWndProc = 0; + } + + var io = ImGui.GetIO(); + unsafe + { + io.BackendPlatformName = null; + } + + io.BackendFlags &= ~( + ImGuiBackendFlags.HasMouseCursors + | ImGuiBackendFlags.HasSetMousePos + | ImGuiBackendFlags.HasGamepad + | ImGuiBackendFlags.PlatformHasViewports + | ImGuiBackendFlags.HasMouseHoveredViewport + ); + + io.BackendPlatformUserData = 0; + } + + private void InitMouseCursors() + { + void SetCursor(ImGuiMouseCursor imGuiCursor, GlfwStandardCursor glfwCursor) + { + _mouseCursors[(int)imGuiCursor] = Glfw.CreateCursor(glfwCursor); + } + + SetCursor(ImGuiMouseCursor.Arrow, GlfwStandardCursor.Arrow); + SetCursor(ImGuiMouseCursor.TextInput, GlfwStandardCursor.IBeam); + SetCursor(ImGuiMouseCursor.ResizeNS, GlfwStandardCursor.VResize); + SetCursor(ImGuiMouseCursor.ResizeEW, GlfwStandardCursor.HResize); + SetCursor(ImGuiMouseCursor.Hand, GlfwStandardCursor.Hand); + SetCursor(ImGuiMouseCursor.ResizeAll, GlfwStandardCursor.ResizeAll); + SetCursor(ImGuiMouseCursor.ResizeNESW, GlfwStandardCursor.ResizeNesw); + SetCursor(ImGuiMouseCursor.ResizeNWSE, GlfwStandardCursor.ResizeNwse); + SetCursor(ImGuiMouseCursor.NotAllowed, GlfwStandardCursor.NotAllowed); + } + + // ReSharper disable once UnusedParameter.Local + private static ImGuiIOPtr GetIO(ImGuiContextPtr context) + { + // If we expose imgui_internal this should wrap the function overload GetIO(ImGuiContext* context) + return ImGui.GetIO(); + } + + private unsafe void SetClipboardText(ImGuiContextPtr context, byte* text) + { + var span = Utf8.GetNullTerminatedSpan(text); + Glfw.SetClipboard(Utf8.GetString(span)); + } + + private unsafe byte* GetClipboardText(ImGuiContextPtr context) + { + var str = Glfw.Clipboard; + var byteCount = Utf8.GetByteCount(str); + _cachedClipboardText.Count = byteCount + 1; + Utf8.FromUtf16(str, _cachedClipboardText.AsSpan(), out _, out _); + _cachedClipboardText[byteCount] = 0; // Add null terminator + return _cachedClipboardText.Ptr; + } + + private void OnMouseButton(GlfwWindow window, GlfwMouseButton button, GlfwButtonAction action, GlfwModifier mods) + { + // Workaround for Linux: ignore mouse up events which are following an focus loss following a viewport creation + if (_mouseIgnoreButtonUp && action is GlfwButtonAction.Release) + return; + + var io = GetIO(_context); + UpdateKeyModifiers(io, window); + + var buttonValue = (int)button; + if (buttonValue is >= 0 and < (int)ImGuiMouseButton.COUNT) + io.AddMouseButtonEvent(buttonValue, action is GlfwButtonAction.Press); + } + + private void OnScroll(GlfwWindow glfwWindow, double2 offset) + { + GetIO(_context).AddMouseWheelEvent((float)offset.X, (float)offset.Y); + } + + private void OnCursorPos(GlfwWindow window, double2 pos) + { + var io = GetIO(_context); + if (io.ConfigFlags.HasFlag(ImGuiConfigFlags.ViewportsEnable)) + { + pos.X += window.X; + pos.Y += window.Y; + } + io.AddMousePosEvent((float)pos.X, (float)pos.Y); + _lastValidMousePos = pos; + } + + private void OnCursorEnter(GlfwWindow window, bool entered) + { + var io = GetIO(_context); + if (entered) + { + _mouseWindow.SetTarget(window); + io.AddMousePosEvent((float)_lastValidMousePos.X, (float)_lastValidMousePos.Y); + } + else if (!entered && _mouseWindow.TryGetTarget(out var mouseWindow) && mouseWindow == window) + { + _lastValidMousePos = new double2(io.MousePos.X, io.MousePos.Y); + _mouseWindow.SetTarget(null); + io.AddMousePosEvent(-float.MaxValue, -float.MaxValue); + } + } + + private void OnKey(GlfwWindow window, GlfwKey key, int scancode, GlfwKeyAction action, GlfwModifier mods) + { + if (action is not GlfwKeyAction.Press and not GlfwKeyAction.Release) + return; + + var io = GetIO(_context); + UpdateKeyModifiers(io, window); + + if ((int)key is >= 0 and <= (int)GlfwKey.Last) + { + if (_windowData.TryGetValue(window, out var data)) + { + if (action is GlfwKeyAction.Press) + data.OwnedKeys.Add(key); + else + data.OwnedKeys.Remove(key); + } + } + + key = TranslateUntranslatedKey(key, scancode); + + io.AddKeyEvent(Convert(key), action is GlfwKeyAction.Press); + } + + private void OnChar(GlfwWindow window, uint codepoint) + { + GetIO(_context).AddInputCharacter(codepoint); + } + + private void OnFocus(GlfwWindow window, GlfwFocusEvent focusEvent) + { + // Workaround for Linux: when losing focus with MouseIgnoreButtonUpWaitForFocusLoss set, we will temporarily ignore subsequent Mouse Up events + _mouseIgnoreButtonUp = _mouseIgnoreButtonUpWaitForFocusLoss && focusEvent is GlfwFocusEvent.LostFocus; + _mouseIgnoreButtonUpWaitForFocusLoss = false; + + GetIO(_context).AddFocusEvent(focusEvent is GlfwFocusEvent.GainFocus); + } + + private static void UpdateMonitors() + { + var platformIO = ImGui.GetPlatformIO(); + var monitors = Glfw.GetMonitors(); + if (monitors.Length == 0) // Preserve existing monitor list if there are none. Happens on macOS sleeping (#5683) + return; + + platformIO.Monitors.Count = 0; + + foreach (var monitor in monitors) + { + var pos = monitor.Position; + var vidMode = monitor.VideoMode; + if (vidMode.IsNull()) + continue; // Failed to get Video mode (e.g. Emscripten does not support this function) + + var floatPos = float2.Unpack(pos); + var size = new float2(vidMode.Width, vidMode.Height); + var imGuiMonitor = new ImGuiPlatformMonitor + { + MainPos = floatPos, + WorkPos = floatPos, + MainSize = size, + WorkSize = size, + }; + + monitor.GetMonitorWorkArea(out var workAreaPos, out var workAreaSize); + + if (workAreaSize is { X: > 0, Y: > 0 }) // Workaround a small GLFW issue reporting zero on monitor changes: https://github.com/glfw/glfw/pull/1761 + { + imGuiMonitor.WorkPos = float2.Unpack(workAreaPos); + imGuiMonitor.WorkSize = float2.Unpack(workAreaSize); + } + + var scale = GetContentScaleForMonitor(monitor); + + if (scale == 0.0f) + continue; // Some accessibility applications are declaring virtual monitors with a DPI of 0, see #7902. + + imGuiMonitor.DpiScale = scale; + imGuiMonitor.PlatformHandle = monitor.NativeHandle; // [...] GLFW doc states: "guaranteed to be valid only until the monitor configuration changes" + platformIO.Monitors.Add(imGuiMonitor); + } + } + + private static void UpdateKeyModifiers(ImGuiIOPtr io, GlfwWindow window) + { + io.AddKeyEvent( + ImGuiKey.Mod_Ctrl, + window.GetKey(GlfwKey.LeftControl) is GlfwKeyAction.Press + || window.GetKey(GlfwKey.RightControl) is GlfwKeyAction.Press + ); + io.AddKeyEvent( + ImGuiKey.Mod_Shift, + window.GetKey(GlfwKey.LeftShift) is GlfwKeyAction.Press + || window.GetKey(GlfwKey.RightShift) is GlfwKeyAction.Press + ); + io.AddKeyEvent( + ImGuiKey.Mod_Alt, + window.GetKey(GlfwKey.LeftAlt) is GlfwKeyAction.Press + || window.GetKey(GlfwKey.RightAlt) is GlfwKeyAction.Press + ); + io.AddKeyEvent( + ImGuiKey.Mod_Super, + window.GetKey(GlfwKey.LeftSuper) is GlfwKeyAction.Press + || window.GetKey(GlfwKey.RightSuper) is GlfwKeyAction.Press + ); + } + + private void UpdateMouseData() + { + var io = ImGui.GetIO(); + var platformIo = ImGui.GetPlatformIO(); + + ImGuiID mouseViewportId = 0; + var mousePosPrev = io.MousePos; + foreach (var viewport in platformIo.Viewports) + { + if (viewport.PlatformHandle is 0) + continue; + + var window = viewport.GetWindow(); + + var isWindowFocused = window.GetAttribute(GlfwWindowAttribute.Focused) != 0; + if (isWindowFocused) + { + // (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when io.ConfigNavMoveSetMousePos is enabled by user) + // When multi-viewports are enabled, all Dear ImGui positions are same as OS positions. + if (io.WantSetMousePos) + window.CursorPos = new double2(mousePosPrev.X - viewport.Pos.X, mousePosPrev.Y - viewport.Pos.Y); + + // (Optional) Fallback to provide mouse position when focused (ImGui_ImplGlfw_CursorPosCallback already provides this when hovered or captured) + if (!_mouseWindow.TryGetTarget(out _)) + { + var mousePos = window.CursorPos; + if (io.ConfigFlags.HasFlag(ImGuiConfigFlags.ViewportsEnable)) + { + // Single viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window) + // Multi-viewport mode: mouse position in OS absolute coordinates (io.MousePos is (0,0) when the mouse is on the upper-left of the primary monitor) + mousePos += double2.Unpack(window.Position); + } + _lastValidMousePos = mousePos; + io.AddMousePosEvent((float)mousePos.X, (float)mousePos.Y); + } + } + + // (Optional) When using multiple viewports: call io.AddMouseViewportEvent() with the viewport the OS mouse cursor is hovering. + // If ImGuiBackendFlags_HasMouseHoveredViewport is not set by the backend, Dear imGui will ignore this field and infer the information using its flawed heuristic. + // - [X] GLFW >= 3.3 backend ON WINDOWS ONLY does correctly ignore viewports with the _NoInputs flag (since we implement hit via our WndProc hook) + // On other platforms we rely on the library fallbacking to its own search when reporting a viewport with _NoInputs flag. + // - [!] GLFW <= 3.2 backend CANNOT correctly ignore viewports with the _NoInputs flag, and CANNOT reported Hovered Viewport because of mouse capture. + // Some backend are not able to handle that correctly. If a backend report an hovered viewport that has the _NoInputs flag (e.g. when dragging a window + // for docking, the viewport has the _NoInputs flag in order to allow us to find the viewport under), then Dear ImGui is forced to ignore the value reported + // by the backend, and use its flawed heuristic to guess the viewport behind. + // - [X] GLFW backend correctly reports this regardless of another viewport behind focused and dragged from (we need this to find a useful drag and drop target). + // FIXME: This is currently only correct on Win32. See what we do below with the WM_NCHITTEST, missing an equivalent for other systems. + // See https://github.com/glfw/glfw/issues/1236 if you want to help in making this a GLFW feature. + var windowNoInput = viewport.Flags.HasFlag(ImGuiViewportFlags.NoInputs); + window.SetAttribute(GlfwWindowAttribute.MousePassthrough, windowNoInput ? 1 : 0); + if (window.GetAttribute(GlfwWindowAttribute.Hovered) is 1) + mouseViewportId = viewport.ID; + } + + if (io.BackendFlags.HasFlag(ImGuiBackendFlags.HasMouseHoveredViewport)) + io.AddMouseViewportEvent(mouseViewportId); + } + + private void UpdateMouseCursor() + { + var io = GetIO(_context); + if ( + io.ConfigFlags.HasFlag(ImGuiConfigFlags.NoMouseCursorChange) + || _window.GetInputMode(GlfwInputMode.Cursor) is (int)GlfwCursorMode.Disabled + ) + return; + + var cursor = ImGui.GetMouseCursor(); + var platformIO = ImGui.GetPlatformIO(); + + foreach (var viewport in platformIO.Viewports) + { + if (viewport.PlatformHandle is not 0) + { + var window = viewport.GetWindow(); + if (cursor is ImGuiMouseCursor.None || io.MouseDrawCursor) + { + // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor + window.SetInputMode(GlfwInputMode.Cursor, (int)GlfwCursorMode.Hidden); + } + else + { + // Fall back to Arrow for any slot we don't initialize (Wait/Progress), matching + // the reference backend. + var glfwCursor = _mouseCursors[(int)cursor]; + if (glfwCursor.IsNull()) + glfwCursor = _mouseCursors[(int)ImGuiMouseCursor.Arrow]; + + // Show OS mouse cursor + window.SetCursor(glfwCursor); + window.SetInputMode(GlfwInputMode.Cursor, (int)GlfwCursorMode.Normal); + } + } + } + } + + private static void UpdateGamepads() + { + var io = ImGui.GetIO(); + + if (!io.ConfigFlags.HasFlag(ImGuiConfigFlags.NavEnableGamepad)) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs, but see #8075 + return; + + io.BackendFlags &= ~ImGuiBackendFlags.HasGamepad; + + if (!Glfw.GetGamepadState(Glfw.Constants.GLFW_JOYSTICK_1, out var gamepad)) + return; + + io.BackendFlags |= ImGuiBackendFlags.HasGamepad; + + void MapButton(ImGuiKey key, GlfwGamepadButton button) + { + io.AddKeyEvent(key, gamepad.IsButtonPressed(button)); + } + + void MapAnalog(ImGuiKey key, GlfwGamepadAxis axis, float v0, float v1) + { + var v = gamepad.GetAxis(axis); + v = (v - v0) / (v1 - v0); + v = float.Clamp(v, 0.0f, 1.0f); + io.AddKeyAnalogEvent(key, v > 0.1f, v); + } + + MapButton(ImGuiKey.GamepadStart, GlfwGamepadButton.Start); + MapButton(ImGuiKey.GamepadBack, GlfwGamepadButton.Back); + MapButton(ImGuiKey.GamepadFaceLeft, GlfwGamepadButton.X); // Xbox X, PS Square + MapButton(ImGuiKey.GamepadFaceRight, GlfwGamepadButton.B); // Xbox B, PS Circle + MapButton(ImGuiKey.GamepadFaceUp, GlfwGamepadButton.Y); // Xbox Y, PS Triangle + MapButton(ImGuiKey.GamepadFaceDown, GlfwGamepadButton.A); // Xbox A, PS Cross + MapButton(ImGuiKey.GamepadDpadLeft, GlfwGamepadButton.DpadLeft); + MapButton(ImGuiKey.GamepadDpadRight, GlfwGamepadButton.DpadRight); + MapButton(ImGuiKey.GamepadDpadUp, GlfwGamepadButton.DpadUp); + MapButton(ImGuiKey.GamepadDpadDown, GlfwGamepadButton.DpadDown); + MapButton(ImGuiKey.GamepadL1, GlfwGamepadButton.LeftBumper); + MapButton(ImGuiKey.GamepadR1, GlfwGamepadButton.RightBumper); + MapAnalog(ImGuiKey.GamepadL2, GlfwGamepadAxis.LeftTrigger, -0.75f, +1.0f); + MapAnalog(ImGuiKey.GamepadR2, GlfwGamepadAxis.RightTrigger, -0.75f, +1.0f); + MapButton(ImGuiKey.GamepadL3, GlfwGamepadButton.LeftThumb); + MapButton(ImGuiKey.GamepadR3, GlfwGamepadButton.RightThumb); + MapAnalog(ImGuiKey.GamepadLStickLeft, GlfwGamepadAxis.LeftX, -0.25f, -1.0f); + MapAnalog(ImGuiKey.GamepadLStickRight, GlfwGamepadAxis.LeftX, +0.25f, +1.0f); + MapAnalog(ImGuiKey.GamepadLStickUp, GlfwGamepadAxis.LeftY, -0.25f, -1.0f); + MapAnalog(ImGuiKey.GamepadLStickDown, GlfwGamepadAxis.LeftY, +0.25f, +1.0f); + MapAnalog(ImGuiKey.GamepadRStickLeft, GlfwGamepadAxis.RightX, -0.25f, -1.0f); + MapAnalog(ImGuiKey.GamepadRStickRight, GlfwGamepadAxis.RightX, +0.25f, +1.0f); + MapAnalog(ImGuiKey.GamepadRStickUp, GlfwGamepadAxis.RightY, -0.25f, -1.0f); + MapAnalog(ImGuiKey.GamepadRStickDown, GlfwGamepadAxis.RightY, +0.25f, +1.0f); + } + + private static float2 GetFramebufferScale(GlfwWindow window) + { + var size = window.Size; + if (size.X is 0 || size.Y is 0) + return float2.One; + + var framebufferSize = window.FramebufferSize; + return float2.Unpack(framebufferSize) / float2.Unpack(window.Size); + } + + private static float GetContentScaleForMonitor(GlfwMonitor monitor) + { + if (OperatingSystem.IsMacOS()) + { + return 1.0f; + } + + return monitor.ContentScale.X; + } + + private static ImGuiKey Convert(GlfwKey key) + { + return key switch + { + GlfwKey.Tab => ImGuiKey.Tab, + GlfwKey.Left => ImGuiKey.LeftArrow, + GlfwKey.Right => ImGuiKey.RightArrow, + GlfwKey.Up => ImGuiKey.UpArrow, + GlfwKey.Down => ImGuiKey.DownArrow, + GlfwKey.PageUp => ImGuiKey.PageUp, + GlfwKey.PageDown => ImGuiKey.PageDown, + GlfwKey.Home => ImGuiKey.Home, + GlfwKey.End => ImGuiKey.End, + GlfwKey.Insert => ImGuiKey.Insert, + GlfwKey.Delete => ImGuiKey.Delete, + GlfwKey.Backspace => ImGuiKey.Backspace, + GlfwKey.Space => ImGuiKey.Space, + GlfwKey.Enter => ImGuiKey.Enter, + GlfwKey.Escape => ImGuiKey.Escape, + GlfwKey.Apostrophe => ImGuiKey.Apostrophe, + GlfwKey.Comma => ImGuiKey.Comma, + GlfwKey.Minus => ImGuiKey.Minus, + GlfwKey.Period => ImGuiKey.Period, + GlfwKey.Slash => ImGuiKey.Slash, + GlfwKey.Semicolon => ImGuiKey.Semicolon, + GlfwKey.Equal => ImGuiKey.Equal, + GlfwKey.LeftBracket => ImGuiKey.LeftBracket, + GlfwKey.Backslash => ImGuiKey.Backslash, + GlfwKey.World1 => ImGuiKey.Oem102, + GlfwKey.World2 => ImGuiKey.Oem102, + GlfwKey.RightBracket => ImGuiKey.RightBracket, + GlfwKey.GraveAccent => ImGuiKey.GraveAccent, + GlfwKey.CapsLock => ImGuiKey.CapsLock, + GlfwKey.ScrollLock => ImGuiKey.ScrollLock, + GlfwKey.NumLock => ImGuiKey.NumLock, + GlfwKey.PrintScreen => ImGuiKey.PrintScreen, + GlfwKey.Pause => ImGuiKey.Pause, + GlfwKey.Kp0 => ImGuiKey.Keypad0, + GlfwKey.Kp1 => ImGuiKey.Keypad1, + GlfwKey.Kp2 => ImGuiKey.Keypad2, + GlfwKey.Kp3 => ImGuiKey.Keypad3, + GlfwKey.Kp4 => ImGuiKey.Keypad4, + GlfwKey.Kp5 => ImGuiKey.Keypad5, + GlfwKey.Kp6 => ImGuiKey.Keypad6, + GlfwKey.Kp7 => ImGuiKey.Keypad7, + GlfwKey.Kp8 => ImGuiKey.Keypad8, + GlfwKey.Kp9 => ImGuiKey.Keypad9, + GlfwKey.KpDecimal => ImGuiKey.KeypadDecimal, + GlfwKey.KpDivide => ImGuiKey.KeypadDivide, + GlfwKey.KpMultiply => ImGuiKey.KeypadMultiply, + GlfwKey.KpSubtract => ImGuiKey.KeypadSubtract, + GlfwKey.KpAdd => ImGuiKey.KeypadAdd, + GlfwKey.KpEnter => ImGuiKey.KeypadEnter, + GlfwKey.KpEqual => ImGuiKey.KeypadEqual, + GlfwKey.LeftShift => ImGuiKey.LeftShift, + GlfwKey.LeftControl => ImGuiKey.LeftCtrl, + GlfwKey.LeftAlt => ImGuiKey.LeftAlt, + GlfwKey.LeftSuper => ImGuiKey.LeftSuper, + GlfwKey.RightShift => ImGuiKey.RightShift, + GlfwKey.RightControl => ImGuiKey.RightCtrl, + GlfwKey.RightAlt => ImGuiKey.RightAlt, + GlfwKey.RightSuper => ImGuiKey.RightSuper, + GlfwKey.Menu => ImGuiKey.Menu, + GlfwKey.Number0 => ImGuiKey._0, + GlfwKey.Number1 => ImGuiKey._1, + GlfwKey.Number2 => ImGuiKey._2, + GlfwKey.Number3 => ImGuiKey._3, + GlfwKey.Number4 => ImGuiKey._4, + GlfwKey.Number5 => ImGuiKey._5, + GlfwKey.Number6 => ImGuiKey._6, + GlfwKey.Number7 => ImGuiKey._7, + GlfwKey.Number8 => ImGuiKey._8, + GlfwKey.Number9 => ImGuiKey._9, + GlfwKey.A => ImGuiKey.A, + GlfwKey.B => ImGuiKey.B, + GlfwKey.C => ImGuiKey.C, + GlfwKey.D => ImGuiKey.D, + GlfwKey.E => ImGuiKey.E, + GlfwKey.F => ImGuiKey.F, + GlfwKey.G => ImGuiKey.G, + GlfwKey.H => ImGuiKey.H, + GlfwKey.I => ImGuiKey.I, + GlfwKey.J => ImGuiKey.J, + GlfwKey.K => ImGuiKey.K, + GlfwKey.L => ImGuiKey.L, + GlfwKey.M => ImGuiKey.M, + GlfwKey.N => ImGuiKey.N, + GlfwKey.O => ImGuiKey.O, + GlfwKey.P => ImGuiKey.P, + GlfwKey.Q => ImGuiKey.Q, + GlfwKey.R => ImGuiKey.R, + GlfwKey.S => ImGuiKey.S, + GlfwKey.T => ImGuiKey.T, + GlfwKey.U => ImGuiKey.U, + GlfwKey.V => ImGuiKey.V, + GlfwKey.W => ImGuiKey.W, + GlfwKey.X => ImGuiKey.X, + GlfwKey.Y => ImGuiKey.Y, + GlfwKey.Z => ImGuiKey.Z, + GlfwKey.F1 => ImGuiKey.F1, + GlfwKey.F2 => ImGuiKey.F2, + GlfwKey.F3 => ImGuiKey.F3, + GlfwKey.F4 => ImGuiKey.F4, + GlfwKey.F5 => ImGuiKey.F5, + GlfwKey.F6 => ImGuiKey.F6, + GlfwKey.F7 => ImGuiKey.F7, + GlfwKey.F8 => ImGuiKey.F8, + GlfwKey.F9 => ImGuiKey.F9, + GlfwKey.F10 => ImGuiKey.F10, + GlfwKey.F11 => ImGuiKey.F11, + GlfwKey.F12 => ImGuiKey.F12, + GlfwKey.F13 => ImGuiKey.F13, + GlfwKey.F14 => ImGuiKey.F14, + GlfwKey.F15 => ImGuiKey.F15, + GlfwKey.F16 => ImGuiKey.F16, + GlfwKey.F17 => ImGuiKey.F17, + GlfwKey.F18 => ImGuiKey.F18, + GlfwKey.F19 => ImGuiKey.F19, + GlfwKey.F20 => ImGuiKey.F20, + GlfwKey.F21 => ImGuiKey.F21, + GlfwKey.F22 => ImGuiKey.F22, + GlfwKey.F23 => ImGuiKey.F23, + GlfwKey.F24 => ImGuiKey.F24, + _ => ImGuiKey.None, + }; + } + +#if FALSE + private const string CharNames = "`-=[]\\,;\'./"; + private static readonly GlfwKey[] CharKeys = + [ + GlfwKey.GraveAccent, + GlfwKey.Minus, + GlfwKey.Equal, + GlfwKey.LeftBracket, + GlfwKey.RightBracket, + GlfwKey.Backslash, + GlfwKey.Comma, + GlfwKey.Semicolon, + GlfwKey.Apostrophe, + GlfwKey.Period, + GlfwKey.Slash, + 0, + ]; +#endif + + private static GlfwKey TranslateUntranslatedKey(GlfwKey key, int scancode) + { +#if FALSE + // TODO: With our current Glfw C# wrapper we can't perform this conversion without undue heap allocation. Consider whether we want to support this translation and reimplement as required. + // GLFW 3.1+ attempts to "untranslate" keys, which goes the opposite of what every other framework does, making using lettered shortcuts difficult. + // (It had reasons to do so: namely GLFW is/was more likely to be used for WASD-type game controls rather than lettered shortcuts, but IHMO the 3.1 change could have been done differently) + // See https://github.com/glfw/glfw/issues/1502 for details. + // Adding a workaround to undo this (so our keys are translated->untranslated->translated, likely a lossy process). + // This won't cover edge cases but this is at least going to cover common cases. + if (key is >= GlfwKey.Kp0 and <= GlfwKey.KpEqual) + return key; + + // TODO: We can't currently 'temporarily suppress then eat' Glfw errors like this + // var prevErrorCallback = glfwSetErrorCallback(nullptr); + var keyName = Glfw.GetKeyName(key, scancode); // TODO: Returns string, not appropriate here + // glfwSetErrorCallback(prev_error_callback); + // (void)glfwGetError(nullptr); + + if (keyName.Length is 1) + { + var keyChar = keyName[0]; + if (keyChar is >= '0' and <= '9') + { + key = GlfwKey.Number0 + (keyChar - '0'); + } + else if (keyChar is >= 'A' and <= 'Z') + { + key = GlfwKey.A + (keyChar - 'A'); + } + else if (keyChar is >= 'a' and <= 'z') + { + key = GlfwKey.A + (keyChar - 'a'); + } + else + { + var index = CharNames.IndexOf(keyChar); + if (index is not -1) + key = CharKeys[index]; + } + } +#endif + + return key; + } + + #region MultiViewport + + // Helper structure we store in the void* PlatformUserData field of each ImGuiViewport to easily retrieve our backend data. + internal struct ViewportData + { + public nint Window; + public bool WindowOwned; + public int IgnoreWindowPosEventFrame; + public int IgnoreWindowSizeEventFrame; + public nint PrevWndProc; + + public GlfwWindow GetWindow() + { + return GCHandle.FromIntPtr(Window).Target as GlfwWindow + ?? throw new InvalidOperationException("Invalid window handle"); + } + } + + private static GlfwBackend GetBackend() + { + var handle = GCHandle.FromIntPtr(ImGui.GetIO().BackendPlatformUserData); + if (handle.Target is not GlfwBackend backend) + throw new Exception("ImGui platform backend is not a GlfwBackend."); + return backend; + } + + private unsafe void InitMultiViewportSupport() + { + // Register platform interface (will be coupled with a renderer interface) + var platformIo = ImGui.GetPlatformIO(); + platformIo.Platform_CreateWindow = (nint)(delegate* unmanaged[Cdecl])&CreateWindow; + platformIo.Platform_DestroyWindow = (nint)(delegate* unmanaged[Cdecl])&DestroyWindow; + platformIo.Platform_ShowWindow = (nint)(delegate* unmanaged[Cdecl])&ShowWindow; + platformIo.Platform_SetWindowPos = (nint) + (delegate* unmanaged[Cdecl])&SetWindowPos; + platformIo.Platform_GetWindowPos = Interop.CreateTrampoline(&GetWindowPos, "GetWindowPos"); + platformIo.Platform_SetWindowSize = (nint) + (delegate* unmanaged[Cdecl])&SetWindowSize; + platformIo.Platform_GetWindowSize = Interop.CreateTrampoline(&GetWindowSize, "GetWindowSize"); + platformIo.Platform_GetWindowFramebufferScale = Interop.CreateTrampoline( + &GetWindowFramebufferScale, + "GetWindowFramebufferScale" + ); + platformIo.Platform_SetWindowFocus = (nint)(delegate* unmanaged[Cdecl])&SetWindowFocus; + platformIo.Platform_GetWindowFocus = (nint)(delegate* unmanaged[Cdecl])&GetWindowFocus; + platformIo.Platform_GetWindowMinimized = (nint) + (delegate* unmanaged[Cdecl])&GetWindowMinimized; + platformIo.Platform_SetWindowTitle = (nint) + (delegate* unmanaged[Cdecl])&SetWindowTitle; + platformIo.Platform_RenderWindow = (nint) + (delegate* unmanaged[Cdecl])&RenderWindow; + platformIo.Platform_SwapBuffers = (nint)(delegate* unmanaged[Cdecl])&SwapBuffers; + platformIo.Platform_SetWindowAlpha = (nint) + (delegate* unmanaged[Cdecl])&SetWindowAlpha; + platformIo.Platform_CreateVkSurface = (nint) + (delegate* unmanaged[Cdecl])&CreateVkSurface; + + // Register main window handle (which is owned by the main application, not by us) + // This is mostly for simplicity and consistency, so that our code (e.g. mouse handling etc.) can use same logic for main and secondary viewports. + var mainViewport = ImGui.GetMainViewport(); + + var windowHandle = GCHandle.Alloc(_window); + var viewportData = Mem.AllocAndCopy( + new ViewportData + { + Window = (nint)windowHandle, + WindowOwned = false, + IgnoreWindowPosEventFrame = -1, + IgnoreWindowSizeEventFrame = -1, + } + ); + mainViewport.PlatformUserData = (nint)viewportData; + } + + private unsafe ImGuiViewportPtr GetViewport(GlfwWindow window) + { + return _windowData.TryGetValue(window, out var handle) + ? ImGui.FindViewportByPlatformHandle((void*)handle.PlatformHandle) + : null; + } + + private void WindowCloseCallback(GlfwWindow window) + { + var viewport = GetViewport(window); + if (viewport.IsNotNull()) + viewport.PlatformRequestClose = true; + } + + // GLFW may dispatch window pos/size events after calling glfwSetWindowPos()/glfwSetWindowSize(). + // However: depending on the platform the callback may be invoked at different time: + // - on Windows it appears to be called within the glfwSetWindowPos()/glfwSetWindowSize() call + // - on Linux it is queued and invoked during glfwPollEvents() + // Because the event doesn't always fire on glfwSetWindowXXX() we use a frame counter tag to only + // ignore recent glfwSetWindowXXX() calls. + private unsafe void WindowPosCallback(GlfwWindow window, int2 pos) + { + var viewport = GetViewport(window); + if (viewport.IsNotNull()) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + if (viewportData is not null) + { + var ignoreEvent = ImGui.GetFrameCount() <= viewportData->IgnoreWindowPosEventFrame + 1; + if (ignoreEvent) + return; + } + viewport.PlatformRequestMove = true; + } + } + + private unsafe void WindowSizeCallback(GlfwWindow window, int2 size) + { + var viewport = GetViewport(window); + if (viewport.IsNotNull()) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + if (viewportData is not null) + { + var ignoreEvent = ImGui.GetFrameCount() <= viewportData->IgnoreWindowSizeEventFrame + 1; + if (ignoreEvent) + return; + } + viewport.PlatformRequestResize = true; + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void CreateWindow(ImGuiViewportPtr viewport) + { + var backend = GetBackend(); + // Zero the allocation, then set the ignore-event counters to -1, the "nothing to ignore" + // sentinel used by the reference backend; 0 would swallow real move/resize events on the + // first frames (the ignore test is GetFrameCount() <= counter + 1). + var viewportData = Mem.AllocZeroed(); + viewportData.Value.IgnoreWindowPosEventFrame = -1; + viewportData.Value.IgnoreWindowSizeEventFrame = -1; + viewport.PlatformUserData = (nint)viewportData; + + // GLFW 3.2 unfortunately always set focus on glfwCreateWindow() if GLFW_VISIBLE is set, regardless of GLFW_FOCUSED + // With GLFW 3.3, the hint GLFW_FOCUS_ON_SHOW fixes this problem + Glfw.WindowHint(GlfwWindowHint.Visible, 0); + Glfw.WindowHint(GlfwWindowHint.Focused, 0); + Glfw.WindowHint(GlfwWindowHint.FocusOnShow, 0); + Glfw.WindowHint(GlfwWindowHint.Decorated, viewport.Flags.HasFlag(ImGuiViewportFlags.NoDecoration) ? 0 : 1); + Glfw.WindowHint(GlfwWindowHint.Floating, viewport.Flags.HasFlag(ImGuiViewportFlags.TopMost) ? 1 : 0); + var shareWindow = backend._clientApi is ClientApi.OpenGL ? backend._window : null; + var window = Glfw.CreateWindow( + new GlfwWindow.CreateInfo + { + Size = new int2((int)viewport.Size.X, (int)viewport.Size.Y), + Title = "", + Share = shareWindow, + } + ); + + viewportData.Value.Window = (nint)GCHandle.Alloc(window); + viewportData.Value.WindowOwned = true; + viewport.PlatformHandle = (nint)GCHandle.Alloc(window); + backend._windowData.Add(window, new WindowData { PlatformHandle = viewport.PlatformHandle }); + + if (OperatingSystem.IsWindows()) + { + viewport.PlatformHandleRaw = GlfwInterop.GetWin32Window(window.NativeHandle); + WindowsNative.SetPropA( + viewport.PlatformHandleRaw, + "IMGUI_BACKEND_DATA"u8, + ImGui.GetIO().BackendPlatformUserData + ); + } + else if (OperatingSystem.IsMacOS()) + { + viewport.PlatformHandleRaw = GlfwInterop.GetCocoaWindow(window.NativeHandle); + } + + window.Position = new int2((int)viewport.Pos.X, (int)viewport.Pos.Y); + + // Install GLFW callbacks for secondary viewports + window.OnFocus += backend._focusCallback; + window.OnCursorEnter += backend._cursorEnterCallback; + window.OnCursorPos += backend._cursorPosCallback; + window.OnMouseButton += backend._mouseButtonCallback; + window.OnScroll += backend._scrollCallback; + window.OnKey += backend._keyCallback; + window.OnChar += backend._charCallback; + + window.OnClose += backend._closeCallback; + window.OnPosition += backend._posCallback; + window.OnSize += backend._sizeCallback; + + if (backend._clientApi is ClientApi.OpenGL) + { + window.MakeContextCurrent(); + Glfw.SwapInterval(0); + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void DestroyWindow(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + if (viewportData is not null) + { + if (viewportData->WindowOwned) + { + var window = viewportData->GetWindow(); + + // Release any keys that were pressed in the window being destroyed and are still held down, + // because we will not receive any release events after window is destroyed. + var backend = GetBackend(); + if (backend._windowData.TryGetValue(window, out var data)) + { + foreach (var key in data.OwnedKeys) + { + backend.OnKey(window, key, 0, GlfwKeyAction.Release, 0); // Later params are only used for main viewport, on which this function is never called. + } + } + + // Remove callbacks + window.OnFocus -= backend._focusCallback; + window.OnCursorEnter -= backend._cursorEnterCallback; + window.OnCursorPos -= backend._cursorPosCallback; + window.OnMouseButton -= backend._mouseButtonCallback; + window.OnScroll -= backend._scrollCallback; + window.OnKey -= backend._keyCallback; + window.OnChar -= backend._charCallback; + window.OnClose -= backend._closeCallback; + window.OnPosition -= backend._posCallback; + window.OnSize -= backend._sizeCallback; + + window.Dispose(); + + GCHandle.FromIntPtr(viewportData->Window).Free(); + } + Mem.Free(viewportData); + } + + if (viewport.PlatformHandle is not 0) + { + GCHandle.FromIntPtr(viewport.PlatformHandle).Free(); + } + + viewport.PlatformUserData = viewport.PlatformHandle = 0; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void ShowWindow(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + + if (OperatingSystem.IsWindows()) + { + // GLFW hack: Hide icon from task bar + var hwnd = viewport.PlatformHandleRaw; + if (viewport.Flags.HasFlag(ImGuiViewportFlags.NoTaskBarIcon)) + { + var exStyle = WindowsNative.GetWindowLong(hwnd, WindowsNative.Constants.GWL_EXSTYLE); + exStyle &= ~WindowsNative.Constants.WS_EX_APPWINDOW; + exStyle |= WindowsNative.Constants.WS_EX_TOOLWINDOW; + var windowLong = WindowsNative.SetWindowLong(hwnd, WindowsNative.Constants.GWL_EXSTYLE, exStyle); + } + + // GLFW hack: install WndProc for mouse source event and WM_NCHITTEST message handler. + WindowsNative.SetPropA(hwnd, "IMGUI_VIEWPORT"u8, (nint)viewport.Ptr); + viewportData->PrevWndProc = WindowsNative.GetWindowLongPtrW(hwnd, WindowsNative.Constants.GWLP_WNDPROC); + WindowsNative.SetWindowLongPtrW( + hwnd, + WindowsNative.Constants.GWLP_WNDPROC, + (nint)WindowsNative.WndProcDelegate + ); + } + + viewportData->GetWindow().Visible = true; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe float2 GetWindowPos(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + var pos = viewportData->GetWindow().Position; + return new float2(pos.X, pos.Y); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SetWindowPos(ImGuiViewportPtr viewport, float2 pos) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + var window = viewportData->GetWindow(); + viewportData->IgnoreWindowPosEventFrame = ImGui.GetFrameCount(); + window.Position = new int2((int)pos.X, (int)pos.Y); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe float2 GetWindowSize(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + var window = viewportData->GetWindow(); + return new float2(window.Size.X, window.Size.Y); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SetWindowSize(ImGuiViewportPtr viewport, float2 size) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + viewportData->IgnoreWindowSizeEventFrame = ImGui.GetFrameCount(); + var window = viewportData->GetWindow(); + window.Size = new int2((int)size.X, (int)size.Y); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe float2 GetWindowFramebufferScale(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + var window = viewportData->GetWindow(); + return GetFramebufferScale(window); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SetWindowTitle(ImGuiViewportPtr viewport, byte* title) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + var window = viewportData->GetWindow(); + window.Title = Utf8.GetString(title); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SetWindowFocus(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + viewportData->GetWindow().Focus(); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe Bool8 GetWindowFocus(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + return viewportData->GetWindow().GetAttribute(GlfwWindowAttribute.Focused) is not 0; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe Bool8 GetWindowMinimized(ImGuiViewportPtr viewport) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + return viewportData->GetWindow().GetAttribute(GlfwWindowAttribute.Iconified) is not 0; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SetWindowAlpha(ImGuiViewportPtr viewport, float alpha) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + viewportData->GetWindow().Opacity = alpha; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void RenderWindow(ImGuiViewportPtr viewport, void* _) + { + var backend = GetBackend(); + var viewportData = (ViewportData*)viewport.PlatformUserData; + if (backend._clientApi is ClientApi.OpenGL) + viewportData->GetWindow().MakeContextCurrent(); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SwapBuffers(ImGuiViewportPtr viewport, void* _) + { + var backend = GetBackend(); + var viewportData = (ViewportData*)viewport.PlatformUserData; + if (backend._clientApi is ClientApi.OpenGL) + { + var window = viewportData->GetWindow(); + window.MakeContextCurrent(); + window.SwapBuffers(); + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe int CreateVkSurface( + ImGuiViewportPtr viewport, + nint vkInstance, + nint allocator, + nint* outVkSurface + ) + { + var viewportData = (ViewportData*)viewport.PlatformUserData; + + var handle = GCHandle.FromIntPtr(viewportData->Window); + if (handle.Target is not GlfwWindow window) + throw new Exception("Window handle is not a GlfwWindow"); + + var result = Glfw.CreateWindowSurface(vkInstance, window, out var surface); + *outVkSurface = (nint)surface; + return result; + } + + #endregion +} + +internal static class GlfwExtensions +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe bool IsButtonPressed(this GlfwGamepadState state, GlfwGamepadButton button) + { + return state.Buttons[(int)button] is (byte)GlfwButtonAction.Press; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe float GetAxis(this GlfwGamepadState state, GlfwGamepadAxis axis) + { + return state.Axes[(int)axis]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsNull(this GlfwVidMode vidMode) + { + return vidMode.Width is 0 + && vidMode.Height is 0 + && vidMode.RedBits is 0 + && vidMode.GreenBits is 0 + && vidMode.BlueBits is 0 + && vidMode.RefreshRate is 0; + } + + internal static GlfwWindow GetWindow(this ImGuiViewportPtr viewport) + { + var handle = GCHandle.FromIntPtr(viewport.PlatformHandle); + return handle.Target as GlfwWindow ?? throw new InvalidOperationException("Invalid window handle"); + } +} diff --git a/Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.Helpers.cs b/Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.Helpers.cs new file mode 100644 index 0000000..06b87a7 --- /dev/null +++ b/Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.Helpers.cs @@ -0,0 +1,16 @@ +using Brutal.OpenGlApi; + +namespace Brutal.ImGuiApi.Backends; + +public partial class OpenGlBackend +{ + internal static class Helpers + { + public static unsafe int GetIntegerv(GlEnum name) + { + var value = 0; + OpenGl.GetIntegerv(name, new Span(&value, 1)); + return value; + } + } +} diff --git a/Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.cs b/Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.cs new file mode 100644 index 0000000..82dd3c9 --- /dev/null +++ b/Brutal.ImGui.Backends/RendererBackends/OpenGlBackend.cs @@ -0,0 +1,605 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Numerics; +using Brutal.OpenGlApi; +using Brutal.Pointers; +using Brutal.Strings; + +namespace Brutal.ImGuiApi.Backends; + +using static OpenGlBackend.Helpers; + +/** + * Brutal port based on the default imgui_impl_opengl3 C++ code + * Key variations: + * - Assumes version 4.1+ + * - Haven't added multi-context support, assumes we can just GetContext() + * - Doesn't support forward compatibility using GL_CONTEXT_COMPATIBILITY_PROFILE_BIT + */ + +public partial class OpenGlBackend : IRendererBackend +{ + private static readonly Ptr Name = "Brutal.ImGuiApi.OpenGlBackend"u8; + + public unsafe OpenGlBackend() + { + var io = ImGui.GetIO(); + + io.BackendRendererUserData = (nint)GCHandle.Alloc(this); + io.BackendRendererName = Name; + + io.BackendFlags |= ImGuiBackendFlags.RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes. + io.BackendFlags |= ImGuiBackendFlags.RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render. + io.BackendFlags |= ImGuiBackendFlags.RendererHasViewports; // We can create multi-viewports on the Renderer side (optional) + + var versionMaj = GetIntegerv(OpenGl.GL_MAJOR_VERSION); + var versionMin = GetIntegerv(OpenGl.GL_MINOR_VERSION); + _glVersion = versionMaj * 100 + versionMin; + + _hasClipOrigin = _glVersion >= 450; + + if (!_hasClipOrigin) + { + var numExtensions = GetIntegerv(OpenGl.GL_NUM_EXTENSIONS); + + for (uint i = 0; i < numExtensions; i++) + { + var extension = OpenGl.GetStringi(OpenGl.GL_EXTENSIONS, i); + + if (extension is not null) + { + var utf8String = Utf8.GetNullTerminatedSpan(extension); + if (utf8String.SequenceEqual("GL_ARB_clip_control"u8)) + _hasClipOrigin = true; + } + } + } + + InitMultiViewportSupport(); + + // Note: original C++ code does this on NewFrame if not already loaded, couldn't see a good reason to wait though + CreateDeviceObjects(out _shader, out _vertexBuffer, out _indexBuffer); + } + + public void NewFrame() { } + + public unsafe void RenderDrawData(ImDrawDataPtr drawData) + { + var width = (int)(drawData.DisplaySize.X * drawData.FramebufferScale.X); + var height = (int)(drawData.DisplaySize.Y * drawData.FramebufferScale.Y); + if (width <= 0 || height <= 0) + return; + + if (drawData.Textures.IsNotNull()) + { + for (var i = 0; i < drawData.Textures.Value.Count; i++) + { + var tex = drawData.Textures.Value[i]; + if (tex.Status != ImTextureStatus.OK) + UpdateTexture(tex); + } + } + + using var backupState = new GlStateBackup(); + + var vertexArrayObject = OpenGl.GenVertexArray(); + SetupRenderState(drawData, width, height, vertexArrayObject); + + // Will project scissor/clipping rectangles into framebuffer space + var clipOff = drawData.DisplayPos; // (0,0) unless using multi-viewports + var clipScale = drawData.FramebufferScale; // (1,1) unless using retina display which are often (2,2) + + // Render command lists + for (var n = 0; n < drawData.CmdListsCount; n++) + { + var drawList = drawData.CmdLists[n]; + + OpenGl.BufferData( + GlBindTarget.ArrayBuffer, + new Span(drawList.VtxBuffer.Data, drawList.VtxBuffer.Count), + GlBufferUsage.StreamDraw + ); + + OpenGl.BufferData( + GlBindTarget.ElementArrayBuffer, + new Span(drawList.IdxBuffer.Data, drawList.IdxBuffer.Count), + GlBufferUsage.StreamDraw + ); + + for (var i = 0; i < drawList.CmdBuffer.Count; i++) + { + var command = drawList.CmdBuffer[i]; + + // Project scissor/clipping rectangles into framebuffer space + var clipMin = new float2( + (command.ClipRect.X - clipOff.X) * clipScale.X, + (command.ClipRect.Y - clipOff.Y) * clipScale.Y + ); + var clipMax = new float2( + (command.ClipRect.Z - clipOff.X) * clipScale.X, + (command.ClipRect.W - clipOff.Y) * clipScale.Y + ); + if (clipMax.X <= clipMin.X || clipMax.Y <= clipMin.Y) + continue; + + // Apply scissor/clipping rectangle (Y is inverted in OpenGL) + OpenGl.Scissor( + (int)clipMin.X, + (int)(height - clipMax.Y), + (int)(clipMax.X - clipMin.X), + (int)(clipMax.Y - clipMin.Y) + ); + + // Bind texture, Draw + OpenGl.BindTexture(OpenGl.GL_TEXTURE_2D, (uint)command.GetTexID().Value); + OpenGl.DrawIndexed( + GlTopology.Triangles, + GlIndexType.UShort, + indexCount: (int)command.ElemCount, + instanceCount: 1, + firstIndex: (int)command.IdxOffset * sizeof(ushort), + vertexOffset: (int)command.VtxOffset, + firstInstance: 0 + ); + + OpenGl.Scissor(0, 0, width, height); // Reset scissor to full viewport; + } + } + + OpenGl.DeleteVertexArrays([vertexArrayObject]); + } + + private unsafe void SetupRenderState(ImDrawDataPtr drawData, int width, int height, GlVertexArray vertexArrayObject) + { + OpenGl.Enable(GlCapability.Blend); + OpenGl.BlendEquation(OpenGl.GL_FUNC_ADD); + OpenGl.BlendFuncSeparate( + OpenGl.GL_SRC_ALPHA, + OpenGl.GL_ONE_MINUS_SRC_ALPHA, + OpenGl.GL_ONE, + OpenGl.GL_ONE_MINUS_SRC_ALPHA + ); + OpenGl.Disable(GlCapability.CullFace); + OpenGl.Disable(GlCapability.DepthTest); + OpenGl.Disable(GlCapability.StencilTest); + OpenGl.Enable(GlCapability.ScissorTest); + + OpenGl.Disable(GlCapability.PrimitiveRestart); + OpenGl.PolygonMode(GlFace.FrontAndBack, OpenGl.GL_FILL); + + var clipOriginLowerLeft = true; + if (_hasClipOrigin) + { + if (GetIntegerv(OpenGl.GL_CLIP_ORIGIN) == OpenGl.GL_UPPER_LEFT) + clipOriginLowerLeft = false; + } + + // Setup viewport, orthographic projection matrix + // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). + // DisplayPos is (0,0) for single viewport apps. + OpenGl.Viewport(0, 0, width, height); + + var left = drawData.DisplayPos.X; + var right = drawData.DisplayPos.X + drawData.DisplaySize.X; + var top = drawData.DisplayPos.Y; + var bottom = drawData.DisplayPos.Y + drawData.DisplaySize.Y; + + // Swap top and bottom if origin is upper left + if (!clipOriginLowerLeft) + { + (top, bottom) = (bottom, top); + } + + _shader.Use(); + OpenGl.Uniform(_shader.Locations.Tex, 0); + OpenGl.Uniform( + _shader.Locations.Projection, + float4x4.CreateOrthographicOffCenter(left, right, bottom, top, 0.0f, 1.0f) + ); + + // We use combined texture/sampler state. Applications using GL 3.3 and GL ES 3.0 may set that otherwise. + OpenGl.BindSampler(0, default); + + // Bind vertex/index buffers and setup attributes for ImDrawVert + vertexArrayObject.Bind(); + _vertexBuffer.Bind(GlBindTarget.ArrayBuffer); + _indexBuffer.Bind(GlBindTarget.ElementArrayBuffer); + + OpenGl.EnableVertexAttribArray((uint)_shader.Locations.Position); + OpenGl.EnableVertexAttribArray((uint)_shader.Locations.Uv); + OpenGl.EnableVertexAttribArray((uint)_shader.Locations.Color); + + OpenGl.VertexAttribute( + new GlAttribute( + (uint)_shader.Locations.Position, + 2, + OpenGl.GL_FLOAT, + OpenGl.GL_FALSE, + sizeof(ImDrawVert), + 0 // Offset of pos + ) + ); + OpenGl.VertexAttribute( + new GlAttribute( + (uint)_shader.Locations.Uv, + 2, + OpenGl.GL_FLOAT, + OpenGl.GL_FALSE, + sizeof(ImDrawVert), + 8 // Offset of uv + ) + ); + OpenGl.VertexAttribute( + new GlAttribute( + (uint)_shader.Locations.Color, + 4, + OpenGl.GL_UNSIGNED_BYTE, + GlScaling.Normalized, // TODO: This is supposed to be true but API seems wrong... + sizeof(ImDrawVert), + 16 // Offset of color + ) + ); + } + + public unsafe void Dispose() + { + var io = ImGui.GetIO(); + + GCHandle.FromIntPtr(io.BackendRendererUserData).Free(); + io.BackendRendererUserData = IntPtr.Zero; + io.BackendRendererName = null; + io.BackendFlags &= ~( + ImGuiBackendFlags.RendererHasVtxOffset + | ImGuiBackendFlags.RendererHasTextures + | ImGuiBackendFlags.RendererHasViewports + ); + + ShutdownMultiViewportSupport(); + DestroyDeviceObjects(); + } + + private static unsafe void UpdateTexture(ImTextureDataPtr tex) + { + if (tex.Status is ImTextureStatus.WantCreate or ImTextureStatus.WantUpdates) + { + OpenGl.PixelStorei(OpenGl.GL_UNPACK_ROW_LENGTH, 0); + OpenGl.PixelStorei(OpenGl.GL_UNPACK_ALIGNMENT, 1); + } + + if (tex.Status is ImTextureStatus.WantCreate) + { + // Create and upload new texture to graphics system + ImGui.Assert(tex.TexID.Value == 0 && tex.BackendUserData is 0); + ImGui.Assert(tex.Format is ImTextureFormat.RGBA32); + var pixels = tex.GetPixels(); + + // Upload texture to graphics system + // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling) + GlTexture glTextureId = default; + var lastGlTextureId = GetIntegerv(OpenGl.GL_TEXTURE_BINDING_2D); + OpenGl.GenTextures(new ReadOnlySpan(&glTextureId, 1)); + OpenGl.BindTexture(OpenGl.GL_TEXTURE_2D, glTextureId.Id); + OpenGl.TexParameterInt(OpenGl.GL_TEXTURE_2D, OpenGl.GL_TEXTURE_MIN_FILTER, [(int)OpenGl.GL_LINEAR]); + OpenGl.TexParameterInt(OpenGl.GL_TEXTURE_2D, OpenGl.GL_TEXTURE_MAG_FILTER, [(int)OpenGl.GL_LINEAR]); + OpenGl.TexParameterInt(OpenGl.GL_TEXTURE_2D, OpenGl.GL_TEXTURE_WRAP_S, [(int)OpenGl.GL_CLAMP_TO_EDGE]); + OpenGl.TexParameterInt(OpenGl.GL_TEXTURE_2D, OpenGl.GL_TEXTURE_WRAP_T, [(int)OpenGl.GL_CLAMP_TO_EDGE]); + OpenGl.TexImage2D( + OpenGl.GL_TEXTURE_2D, + 0, + (int)OpenGl.GL_RGBA, + tex.Width, + tex.Height, + 0, + OpenGl.GL_RGBA, + OpenGl.GL_UNSIGNED_BYTE, + (void*)pixels + ); + + // Store identifiers + tex.SetTexID(new ImTextureID((nint)glTextureId.Id)); + tex.SetStatus(ImTextureStatus.OK); + + // Restore state + OpenGl.BindTexture(OpenGl.GL_TEXTURE_2D, (uint)lastGlTextureId); + } + else if (tex.Status == ImTextureStatus.WantUpdates) + { + // Update selected blocks. We only ever write to textures regions which have never been used before! + // This backend choose to use tex.Updates[] but you can use tex.UpdateRect to upload a single region. + var lastGlTextureId = GetIntegerv(OpenGl.GL_TEXTURE_BINDING_2D); + + OpenGl.BindTexture(OpenGl.GL_TEXTURE_2D, (uint)tex.TexID.Value); + OpenGl.PixelStorei(OpenGl.GL_UNPACK_ROW_LENGTH, tex.Width); + for (var i = 0; i < tex.Updates.Count; i++) + { + var r = tex.Updates[i]; + OpenGl.TexSubImage2D( + OpenGl.GL_TEXTURE_2D, + 0, + r.x, + r.y, + r.w, + r.h, + (int)OpenGl.GL_RGBA, + OpenGl.GL_UNSIGNED_BYTE, + (void*)tex.GetPixelsAt(r.x, r.y) + ); + } + OpenGl.PixelStorei(OpenGl.GL_UNPACK_ROW_LENGTH, 0); + tex.SetStatus(ImTextureStatus.OK); + + OpenGl.BindTexture(OpenGl.GL_TEXTURE_2D, (uint)lastGlTextureId); // Restore state + } + else if (tex is { Status: ImTextureStatus.WantDestroy, UnusedFrames: > 0 }) + DestroyTexture(tex); + } + + private void CreateDeviceObjects(out Shader shader, out GlBuffer vertexBuffer, out GlBuffer indexBuffer) + { + // Note: at this point the C++ backend does some gl state backup/restore. + // It didn't appear that any of it was actually required, so skipped here... + + shader = new Shader(); + + ReadOnlySpan buffers = stackalloc GlBuffer[2]; + OpenGl.GenBuffers(buffers); + + vertexBuffer = buffers[0]; + indexBuffer = buffers[1]; + } + + private void DestroyDeviceObjects() + { + _shader.Dispose(); + OpenGl.DeleteBuffers([_vertexBuffer, _indexBuffer]); + + // Destroy all textures + var textures = ImGui.GetPlatformIO().Textures; + foreach (var tex in textures) + { + if (tex.RefCount is 1) + DestroyTexture(tex); + } + } + + private static void DestroyTexture(ImTextureDataPtr tex) + { + var glTextureId = new GlTexture { Id = (uint)tex.TexID.Value }; + OpenGl.DeleteTextures([glTextureId]); + + // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running) + tex.SetTexID(ImTextureID.Invalid); + tex.SetStatus(ImTextureStatus.Destroyed); + } + + private Shader _shader; + private readonly GlBuffer _vertexBuffer; + private readonly GlBuffer _indexBuffer; + + private int _glVersion; + private bool _hasClipOrigin; + + private unsafe struct GlStateBackup : IDisposable + { + private readonly int _lastActiveTexture; + private readonly uint _lastProgram; + private readonly uint _lastTexture; + private readonly uint _lastSampler; + private readonly uint _lastArrayBuffer; + private readonly uint _lastVertexArrayObject; + private fixed int _lastPolygonMode[2]; + private fixed int _lastViewport[4]; + private fixed int _lastScissorBox[4]; + private readonly int _lastBlendSrcRgb; + private readonly int _lastBlendDstRgb; + private readonly int _lastBlendSrcAlpha; + private readonly int _lastBlendDstAlpha; + private readonly int _lastBlendEquationRgb; + private readonly int _lastBlendEquationAlpha; + private readonly bool _lastEnableBlend; + private readonly bool _lastEnableCullFace; + private readonly bool _lastEnableDepthTest; + private readonly bool _lastEnableStencilTest; + private readonly bool _lastEnableScissorTest; + private readonly bool _lastEnablePrimitiveRestart; + + public GlStateBackup() + { + // Backup GL state + _lastActiveTexture = GetIntegerv(OpenGl.GL_ACTIVE_TEXTURE); + OpenGl.ActiveTexture(OpenGl.GL_TEXTURE0); + _lastProgram = (uint)GetIntegerv(OpenGl.GL_CURRENT_PROGRAM); + _lastTexture = (uint)GetIntegerv(OpenGl.GL_TEXTURE_BINDING_2D); + _lastSampler = (uint)GetIntegerv(OpenGl.GL_SAMPLER_BINDING); + _lastArrayBuffer = (uint)GetIntegerv(OpenGl.GL_ARRAY_BUFFER_BINDING); + _lastVertexArrayObject = (uint)GetIntegerv(OpenGl.GL_VERTEX_ARRAY_BINDING); + fixed (int* lastPolygonMode = _lastPolygonMode) + OpenGl.GetIntegerv(OpenGl.GL_POLYGON_MODE, new ReadOnlySpan(lastPolygonMode, 2)); + fixed (int* lastViewport = _lastViewport) + OpenGl.GetIntegerv(OpenGl.GL_VIEWPORT, new ReadOnlySpan(lastViewport, 4)); + fixed (int* lastScissorBox = _lastScissorBox) + OpenGl.GetIntegerv(OpenGl.GL_SCISSOR_BOX, new ReadOnlySpan(lastScissorBox, 4)); + _lastBlendSrcRgb = GetIntegerv(OpenGl.GL_BLEND_SRC_RGB); + _lastBlendDstRgb = GetIntegerv(OpenGl.GL_BLEND_DST_RGB); + _lastBlendSrcAlpha = GetIntegerv(OpenGl.GL_BLEND_SRC_ALPHA); + _lastBlendDstAlpha = GetIntegerv(OpenGl.GL_BLEND_DST_ALPHA); + _lastBlendEquationRgb = GetIntegerv(OpenGl.GL_BLEND_EQUATION_RGB); + _lastBlendEquationAlpha = GetIntegerv(OpenGl.GL_BLEND_EQUATION_ALPHA); + _lastEnableBlend = OpenGl.IsEnabled(OpenGl.GL_BLEND); + _lastEnableCullFace = OpenGl.IsEnabled(OpenGl.GL_CULL_FACE); + _lastEnableDepthTest = OpenGl.IsEnabled(OpenGl.GL_DEPTH_TEST); + _lastEnableStencilTest = OpenGl.IsEnabled(OpenGl.GL_STENCIL_TEST); + _lastEnableScissorTest = OpenGl.IsEnabled(OpenGl.GL_SCISSOR_TEST); + _lastEnablePrimitiveRestart = OpenGl.IsEnabled(OpenGl.GL_PRIMITIVE_RESTART); + } + + public void Dispose() + { + // Restore modified GL state + // This "glIsProgram()" check is required because if the program is "pending deletion" at the time of binding backup, it will have been deleted by now and will cause an OpenGL error. See #6220. + if (_lastProgram is 0 || OpenGl.IsProgram(new GlProgram(_lastProgram))) + new GlProgram(_lastProgram).Use(); + OpenGl.BindTexture(OpenGl.GL_TEXTURE_2D, _lastTexture); + OpenGl.BindSampler(0, new GlSampler(_lastSampler)); + OpenGl.ActiveTexture((uint)_lastActiveTexture); + new GlVertexArray(_lastVertexArrayObject).Bind(); + new GlBuffer(_lastArrayBuffer).Bind(GlBindTarget.ArrayBuffer); + OpenGl.BlendEquationSeparate((uint)_lastBlendEquationRgb, (uint)_lastBlendEquationAlpha); + OpenGl.BlendFuncSeparate( + (uint)_lastBlendSrcRgb, + (uint)_lastBlendDstRgb, + (uint)_lastBlendSrcAlpha, + (uint)_lastBlendDstAlpha + ); + if (_lastEnableBlend) + OpenGl.Enable(GlCapability.Blend); + else + OpenGl.Disable(GlCapability.Blend); + if (_lastEnableCullFace) + OpenGl.Enable(GlCapability.CullFace); + else + OpenGl.Disable(GlCapability.CullFace); + if (_lastEnableDepthTest) + OpenGl.Enable(GlCapability.DepthTest); + else + OpenGl.Disable(GlCapability.DepthTest); + if (_lastEnableStencilTest) + OpenGl.Enable(GlCapability.StencilTest); + else + OpenGl.Disable(GlCapability.StencilTest); + if (_lastEnableScissorTest) + OpenGl.Enable(GlCapability.ScissorTest); + else + OpenGl.Disable(GlCapability.ScissorTest); + if (_lastEnablePrimitiveRestart) + OpenGl.Enable(GlCapability.PrimitiveRestart); + else + OpenGl.Disable(GlCapability.PrimitiveRestart); + + OpenGl.PolygonMode(GlFace.FrontAndBack, (uint)_lastPolygonMode[0]); + + OpenGl.Viewport(_lastViewport[0], _lastViewport[1], _lastViewport[2], _lastViewport[3]); + OpenGl.Scissor(_lastScissorBox[0], _lastScissorBox[1], _lastScissorBox[2], _lastScissorBox[3]); + } + } + + private struct Shader : IDisposable + { + public Shader() + { + Program = BuildProgram(); + Locations.Tex = Program.GetUniformLocation("Texture"u8); + Locations.Projection = Program.GetUniformLocation("Projection"u8); + Locations.Position = OpenGl.GetAttribLocation(Program, "Position"u8); + Locations.Uv = OpenGl.GetAttribLocation(Program, "UV"u8); + Locations.Color = OpenGl.GetAttribLocation(Program, "Color"u8); + } + + public void Use() + { + Program.Use(); + } + + public readonly GlProgram Program; + public readonly AttributeLocations Locations; + + public struct AttributeLocations + { + public int Tex; + public int Projection; + public int Position; + public int Uv; + public int Color; + } + + private static GlProgram BuildProgram() + { + using var vertShaderHandle = OpenGl + .CreateShader(GlShaderType.Vertex) + .SetSource(ShaderSource.Vert) + .Compile(); + + using var fragShaderHandle = OpenGl + .CreateShader(GlShaderType.Fragment) + .SetSource(ShaderSource.Frag) + .Compile(); + + var shaderHandle = OpenGl.CreateProgram().Attach(vertShaderHandle, fragShaderHandle).Link(); + + OpenGl.DetachShader(shaderHandle, vertShaderHandle); + OpenGl.DetachShader(shaderHandle, fragShaderHandle); + + return shaderHandle; + } + + public void Dispose() + { + Program.Dispose(); + } + } + + private static class ShaderSource + { + public const string Vert = """ + #version 410 core + layout (location = 0) in vec2 Position; + layout (location = 1) in vec2 UV; + layout (location = 2) in vec4 Color; + uniform mat4 Projection; + out vec2 Frag_UV; + out vec4 Frag_Color; + void main() + { + Frag_UV = UV; + Frag_Color = Color; + gl_Position = Projection * vec4(Position.xy,0,1); + } + """; + + public const string Frag = """ + #version 410 core + in vec2 Frag_UV; + in vec4 Frag_Color; + uniform sampler2D Texture; + layout (location = 0) out vec4 Out_Color; + void main() + { + Out_Color = Frag_Color * texture(Texture, Frag_UV.st); + } + """; + } + + //-------------------------------------------------------------------------------------------------------- + // MULTI-VIEWPORT / PLATFORM INTERFACE SUPPORT + // This is an _advanced_ and _optional_ feature, allowing the backend to create and handle multiple viewports simultaneously. + // If you are new to dear imgui or creating a new binding for dear imgui, it is recommended that you completely ignore this section first.. + //-------------------------------------------------------------------------------------------------------- + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void RenderWindow(ImGuiViewport* viewport) + { + if (!viewport->Flags.HasFlag(ImGuiViewportFlags.NoRendererClear)) + { + OpenGl.ClearColor(new float4(float3.Zero, 1.0f)); + OpenGl.Clear(GlClearBit.Color); + } + + var handle = GCHandle.FromIntPtr(ImGui.GetIO().BackendRendererUserData); + if (handle.Target is not OpenGlBackend backend) + throw new Exception("Failed to retrieve OpenGL backend"); + + backend.RenderDrawData(viewport->DrawData); + } + + private static unsafe void InitMultiViewportSupport() + { + var platformIo = ImGui.GetPlatformIO(); + delegate* unmanaged[Cdecl] renderWindowFunction = &RenderWindow; + platformIo.Renderer_RenderWindow = (nint)renderWindowFunction; + } + + private static void ShutdownMultiViewportSupport() + { + ImGui.DestroyPlatformWindows(); + } +} diff --git a/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.Helpers.cs b/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.Helpers.cs new file mode 100644 index 0000000..2d26b5c --- /dev/null +++ b/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.Helpers.cs @@ -0,0 +1,424 @@ +using Brutal.VulkanApi; +using Brutal.VulkanApi.Abstractions; + +namespace Brutal.ImGuiApi.Backends; + +public partial class VulkanBackend +{ + private static class Helpers + { + public static unsafe VkSurfaceFormatKHR SelectSurfaceFormat( + PhysicalDevice physicalDevice, + VkSurfaceKHR surface, + ReadOnlySpan requestFormats, + VkColorSpaceKHR requestColorSpace + ) + { + Assert(!requestFormats.IsEmpty); + + // Per Spec Format and View Format are expected to be the same unless VK_IMAGE_CREATE_MUTABLE_BIT was set at image creation + // Assuming that the default behavior is without setting this bit, there is no need for separate Swapchain image and image view format + // Additionally several new color spaces were introduced with Vulkan Spec v1.0.40, + // hence we must make sure that a format with the mostly available color space, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, is found and used. + var surfaceFormatCount = physicalDevice.GetSurfaceFormatsKHR_Count(surface); + Span formats = stackalloc VkSurfaceFormatKHR[surfaceFormatCount]; + physicalDevice.GetSurfaceFormatsKHR_Write(surface, formats); + + // First check if only one format, VK_FORMAT_UNDEFINED, is available, which would imply that any format is available + if (formats.Length is 1) + { + if (formats[0].Format is VkFormat.Undefined) + return new VkSurfaceFormatKHR { Format = requestFormats[0], ColorSpace = requestColorSpace }; + + // No point in searching another format + return formats[0]; + } + + // Request several formats, the first found will be used + foreach (var t in requestFormats) + foreach (var format in formats) + if (format.Format == t && format.ColorSpace == requestColorSpace) + return format; + + // If none of the requested image formats could be found, use the first available + return formats[0]; + } + + public static unsafe VkPresentModeKHR SelectPresentMode( + PhysicalDevice physicalDevice, + VkSurfaceKHR surface, + ReadOnlySpan requestModes + ) + { + Assert(!requestModes.IsEmpty); + + // Request a certain mode and confirm that it is available. If not use VK_PRESENT_MODE_FIFO_KHR which is mandatory + var numModes = physicalDevice.GetSurfacePresentModesKHR_Count(surface); + Span modes = stackalloc VkPresentModeKHR[numModes]; + physicalDevice.GetSurfacePresentModesKHR_Write(surface, modes); + + foreach (var requestMode in requestModes) + foreach (var mode in modes) + if (requestMode == mode) + return requestMode; + + return VkPresentModeKHR.FifoKHR; // Always available + } + + // TODO: Can we pass command pool? + public static unsafe void CreateOrResizeWindow( + PhysicalDevice physicalDevice, + Device device, + WindowImpl* window, + Queue queue, + int queueFamily, + int width, + int height, + int minImageCount + ) + { + CreateWindowSwapChain(physicalDevice, device, window, width, height, minImageCount); + CreateWindowCommandBuffers(physicalDevice, device, window, queueFamily); + + // FIXME: to submit the command buffer, we need a queue. In the examples folder, the ImGui_ImplVulkanH_CreateOrResizeWindow function is called + // before the ImGui_ImplVulkan_Init function, so we don't have access to the queue yet. Here we have the queue_family that we can use to grab + // a queue from the device and submit the command buffer. It would be better to have access to the queue as suggested in the FIXME below. + var commandPool = device.CreateCommandPool( + new VkCommandPoolCreateInfo + { + QueueFamilyIndex = queueFamily, + Flags = VkCommandPoolCreateFlags.ResetCommandBufferBit, + }, + null + ); + + var fence = device.CreateFence(new VkFenceCreateInfo { Flags = 0 }, null); + + var commandBuffer = device.AllocateCommandBuffer( + new VkCommandBufferAllocateInfo { CommandPool = commandPool, Level = VkCommandBufferLevel.Primary } + ); + + commandBuffer.Begin(new VkCommandBufferBeginInfo { Flags = VkCommandBufferUsageFlags.OneTimeSubmitBit }); + + // Transition the images to the correct layout for rendering + for (var i = 0; i < window->ImageCount; i++) + { + var barrier = new VkImageMemoryBarrier + { + Image = window->Frames[i].Backbuffer, + OldLayout = VkImageLayout.Undefined, + NewLayout = VkImageLayout.PresentSrcKHR, + SrcQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + DstQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + SubresourceRange = new VkImageSubresourceRange + { + AspectMask = VkImageAspectFlags.ColorBit, + LevelCount = 1, + LayerCount = 1, + }, + }; + commandBuffer.PipelineBarrier( + VkPipelineStageFlags.BottomOfPipeBit, + VkPipelineStageFlags.ColorAttachmentOutputBit, + VkDependencyFlags.None, + [], + [], + [barrier] + ); + } + + commandBuffer.End(); + + queue.Submit([], [], [commandBuffer], [], fence); + device.WaitForFences([fence], true, -1); + + // Destroy command buffer and fence and command pool + device.DestroyCommandPool(commandPool, null); + device.DestroyFence(fence, null); + } + + public static unsafe void DestroyWindow(Instance instance, Device device, WindowImpl* window) + { + // TODO: ??? + device.WaitIdle(); // FIXME: We could wait on the Queue if we had the queue in wd-> (otherwise VulkanH functions can't use globals) + //vkQueueWaitIdle(bd->Queue); + + for (var i = 0; i < window->ImageCount; i++) + DestroyFrame(device, &window->Frames.DataRaw[i]); + for (var i = 0; i < window->SemaphoreCount; i++) + DestroyFrameSemaphores(device, &window->FrameSemaphores.DataRaw[i]); + window->Frames.Clear(); + window->FrameSemaphores.Clear(); + device.DestroyRenderPass(window->RenderPass, null); + device.DestroySwapchainKHR(window->Swapchain, null); + instance.DestroySurfaceKHR(window->Surface, null); + + *window = default; + } + + // Also destroy old swap chain and in-flight frames data, if any. + private static unsafe void CreateWindowSwapChain( + PhysicalDevice physicalDevice, + Device device, + WindowImpl* window, + int width, + int height, + int minImageCount + ) + { + var oldSwapchain = window->Swapchain; + window->Swapchain = default; + // TODO: NOOOOOOO + device.WaitIdle(); + + // We don't use ImGui_ImplVulkanH_DestroyWindow() because we want to preserve the old swapchain to create the new one. + // Destroy old Framebuffer + for (var i = 0; i < window->ImageCount; i++) + DestroyFrame(device, &window->Frames.DataRaw[i]); + for (var i = 0; i < window->SemaphoreCount; i++) + DestroyFrameSemaphores(device, &window->FrameSemaphores.DataRaw[i]); + window->Frames.Clear(); + window->FrameSemaphores.Clear(); + window->ImageCount = 0; + if (window->RenderPass.IsNotNull()) + device.DestroyRenderPass(window->RenderPass, null); + + // If min image count was not specified, request different count of images dependent on selected present mode + if (minImageCount is 0) + minImageCount = GetMinImageCountFromPresentMode(window->PresentMode); + + // Create Swapchain + { + var cap = physicalDevice.GetSurfaceCapabilitiesKHR(window->Surface); + + var info = new VkSwapchainCreateInfoKHR + { + Surface = window->Surface, + MinImageCount = minImageCount, + ImageFormat = window->SurfaceFormat.Format, + ImageColorSpace = window->SurfaceFormat.ColorSpace, + ImageArrayLayers = 1, + ImageUsage = VkImageUsageFlags.ColorAttachmentBit, + ImageSharingMode = VkSharingMode.Exclusive, // Assume that graphics family == present family + PreTransform = cap.SupportedTransforms.HasFlag(VkSurfaceTransformFlagsKHR.IdentityBitKHR) + ? VkSurfaceTransformFlagsKHR.IdentityBitKHR + : cap.CurrentTransform, + CompositeAlpha = VkCompositeAlphaFlagsKHR.OpaqueBitKHR, + PresentMode = window->PresentMode, + Clipped = true, + OldSwapchain = oldSwapchain, + }; + if (info.MinImageCount < cap.MinImageCount) + info.MinImageCount = cap.MinImageCount; + else if (cap.MaxImageCount != 0 && info.MinImageCount > cap.MaxImageCount) + info.MinImageCount = cap.MaxImageCount; + if (cap.CurrentExtent.Width == -1) + { + window->Width = width; + window->Height = height; + info.ImageExtent.Width = width; + info.ImageExtent.Height = height; + } + else + { + window->Width = cap.CurrentExtent.Width; + window->Height = cap.CurrentExtent.Height; + info.ImageExtent.Width = cap.CurrentExtent.Width; + info.ImageExtent.Height = cap.CurrentExtent.Height; + } + window->Swapchain = device.CreateSwapchainKHR(info, null); + window->ImageCount = device.GetSwapchainImagesKHR_Count(window->Swapchain); + Span backBuffers = stackalloc VkImage[window->ImageCount]; + Assert(window->ImageCount >= minImageCount); + device.GetSwapchainImagesKHR_Write(window->Swapchain, backBuffers); + + window->SemaphoreCount = window->ImageCount + 1; + window->Frames.Count = window->ImageCount; + window->FrameSemaphores.Count = window->SemaphoreCount; + // TODO: Do we need to zero out this memory? + // memset(window->Frames.Data, 0, window->Frames.size_in_bytes()); + // memset(window->FrameSemaphores.Data, 0, window->FrameSemaphores.size_in_bytes()); + for (var i = 0; i < window->ImageCount; i++) + window->Frames.Data[i].Backbuffer = backBuffers[i]; + } + if (oldSwapchain.IsNotNull()) + device.DestroySwapchainKHR(oldSwapchain, null); + + // Create the Render Pass + { + var attachment = new VkAttachmentDescription + { + Format = window->SurfaceFormat.Format, + Samples = VkSampleCountFlags._1Bit, + LoadOp = window->ClearEnable ? VkAttachmentLoadOp.Clear : VkAttachmentLoadOp.DontCare, + StoreOp = VkAttachmentStoreOp.Store, + StencilLoadOp = VkAttachmentLoadOp.DontCare, + StencilStoreOp = VkAttachmentStoreOp.DontCare, + InitialLayout = VkImageLayout.Undefined, + FinalLayout = VkImageLayout.PresentSrcKHR, + }; + var colorAttachment = new VkAttachmentReference + { + Attachment = 0, + Layout = VkImageLayout.ColorAttachmentOptimal, + }; + var subPass = new VkSubpassDescription + { + PipelineBindPoint = VkPipelineBindPoint.Graphics, + ColorAttachmentCount = 1, + ColorAttachments = &colorAttachment, + }; + var dependency = new VkSubpassDependency + { + SrcSubpass = VK.SUBPASS_EXTERNAL, + DstSubpass = 0, + SrcStageMask = VkPipelineStageFlags.ColorAttachmentOutputBit, + DstStageMask = VkPipelineStageFlags.ColorAttachmentOutputBit, + SrcAccessMask = 0, + DstAccessMask = VkAccessFlags.ColorAttachmentWriteBit, + }; + + window->RenderPass = device.CreateRenderPass( + new VkRenderPassCreateInfo + { + AttachmentCount = 1, + Attachments = &attachment, + SubpassCount = 1, + Subpasses = &subPass, + DependencyCount = 1, + Dependencies = &dependency, + }, + null + ); + + // We do not create a pipeline by default as this is also used by examples' main.cpp, + // but secondary viewport in multi-viewport mode may want to create one with: + //ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, window->RenderPass, VK_SAMPLE_COUNT_1_BIT, &window->Pipeline, v->Subpass); + } + + // Create The Image Views + { + var info = new VkImageViewCreateInfo + { + ViewType = VkImageViewType._2D, + Format = window->SurfaceFormat.Format, + Components = new VkComponentMapping + { + R = VkComponentSwizzle.R, + G = VkComponentSwizzle.G, + B = VkComponentSwizzle.B, + A = VkComponentSwizzle.A, + }, + SubresourceRange = new VkImageSubresourceRange + { + AspectMask = VkImageAspectFlags.ColorBit, + LevelCount = 1, + LayerCount = 1, + }, + }; + for (var i = 0; i < window->ImageCount; i++) + { + var frame = &window->Frames.DataRaw[i]; + info.Image = frame->Backbuffer; + frame->BackbufferView = device.CreateImageView(info, null); + } + } + + // Create Framebuffer + { + VkImageView attachment; + var info = new VkFramebufferCreateInfo + { + RenderPass = window->RenderPass, + AttachmentCount = 1, + Attachments = &attachment, + Width = window->Width, + Height = window->Height, + Layers = 1, + }; + for (var i = 0; i < window->ImageCount; i++) + { + var frame = &window->Frames.DataRaw[i]; + attachment = frame->BackbufferView; + frame->Framebuffer = device.CreateFramebuffer(info, null); + } + } + } + + private static int GetMinImageCountFromPresentMode(VkPresentModeKHR presentMode) + { + return presentMode switch + { + VkPresentModeKHR.MailboxKHR => 3, + VkPresentModeKHR.FifoKHR => 2, + VkPresentModeKHR.FifoRelaxedKHR => 2, + VkPresentModeKHR.ImmediateKHR => 1, + _ => 1, + }; + } + + private static unsafe void CreateWindowCommandBuffers( + PhysicalDevice physicalDevice, + Device device, + WindowImpl* window, + int queueFamily + ) + { + Assert(physicalDevice.IsNotNull() && device.IsNotNull()); + + // Create Command Buffers + for (var i = 0; i < window->ImageCount; i++) + { + var frame = &window->Frames.DataRaw[i]; + + // TODO: Seriously, each frame has its own command pool? + frame->CommandPool = device.CreateCommandPool( + new VkCommandPoolCreateInfo { QueueFamilyIndex = queueFamily }, + null + ); + + frame->CommandBuffer = device.AllocateCommandBuffer( + new VkCommandBufferAllocateInfo + { + CommandPool = frame->CommandPool, + Level = VkCommandBufferLevel.Primary, + } + ); + + frame->Fence = device.CreateFence( + new VkFenceCreateInfo { Flags = VkFenceCreateFlags.SignaledBit }, + null + ); + } + + for (var i = 0; i < window->SemaphoreCount; i++) + { + var semaphores = &window->FrameSemaphores.DataRaw[i]; + { + var createInfo = new VkSemaphoreCreateInfo(); + semaphores->ImageAcquiredSemaphore = device.CreateSemaphore(createInfo, null); + semaphores->RenderCompleteSemaphore = device.CreateSemaphore(createInfo, null); + } + } + } + + private static unsafe void DestroyFrame(Device device, Frame* frame) + { + device.DestroyFence(frame->Fence, null); + device.DestroyCommandPool(frame->CommandPool, null); + frame->Fence = default; + frame->CommandBuffer = default; + frame->CommandPool = default; + + device.DestroyImageView(frame->BackbufferView, null); + device.DestroyFramebuffer(frame->Framebuffer, null); + } + + private static unsafe void DestroyFrameSemaphores(Device device, FrameSemaphores* semaphores) + { + device.DestroySemaphore(semaphores->ImageAcquiredSemaphore, null); + device.DestroySemaphore(semaphores->RenderCompleteSemaphore, null); + semaphores->ImageAcquiredSemaphore = semaphores->RenderCompleteSemaphore = default; + } + } +} diff --git a/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs b/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs new file mode 100644 index 0000000..f812479 --- /dev/null +++ b/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs @@ -0,0 +1,1590 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Memory; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Pointers.Extensions; +using Brutal.VulkanApi; +using Brutal.VulkanApi.Abstractions; +using CommunityToolkit.HighPerformance; + +namespace Brutal.ImGuiApi.Backends; + +/** + * Brutal port based on the default imgui_impl_vulkan C++ code + * Key variations: + * - Ignored dynamic rendering path for simplicity + * - Always create a local DescriptorPool + * - Not attempting to support multi-context. Use instance members instead of all static where possible. + */ + +public partial class VulkanBackend : IRendererBackend +{ + public struct CreateInfo + { + public required DeviceEx Device; + public required Queue GraphicsQueue; + public required VkRenderPass RenderPass; + public int SubPass; + public required int MinImageCount; + public required int ImageCount; + public required VkSampleCountFlags SampleCount; + public required int DescriptorPoolSize; + public ByteSize MinAllocationSize; // Minimum allocation size. Set to 1024*1024 to satisfy zealous best practices validation layer and waste a little memory. + } + + private static readonly Ptr Name = "Brutal.ImGuiApi.VulkanBackend"u8; + + // Backend uses a small number of descriptors per font atlas + as many as additional calls done to ImGui_ImplVulkan_AddTexture(). + private const int MINIMUM_IMAGE_SAMPLER_POOL_SIZE = 8; // Minimum per atlas + + public unsafe VulkanBackend(in CreateInfo info) + { + Device = info.Device; + GraphicsQueue = info.GraphicsQueue; + RenderPass = info.RenderPass; + SubPass = info.SubPass; + ImageCount = info.ImageCount; + MinImageCount = info.MinImageCount; + SampleCount = info.SampleCount; + DescriptorPoolSize = info.DescriptorPoolSize; + MinAllocationSize = info.MinAllocationSize; + + var io = ImGui.GetIO(); + Assert(io.BackendRendererUserData is 0, "ImGui backend renderer already set"); + + io.BackendRendererUserData = (nint)GCHandle.Alloc(this); + io.BackendRendererName = Name; + io.BackendFlags |= ImGuiBackendFlags.RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes. + io.BackendFlags |= ImGuiBackendFlags.RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render. + io.BackendFlags |= ImGuiBackendFlags.RendererHasViewports; // We can create multi-viewports on the Renderer side (optional) + + Assert(info.Device.IsNotNull()); + Assert(info.GraphicsQueue.IsNotNull()); + Assert(info.DescriptorPoolSize > 0); + Assert(info.MinImageCount >= 2); + Assert(info.ImageCount >= info.MinImageCount); + + // TODO: Verify this is actually required + var properties = info.Device.PhysicalDevice.GetProperties(); + _nonCoherentAtomSize = properties.Limits.NonCoherentAtomSize; + + // Create device objects + _texSampler = CreateSampler(); + CreateDescriptorPool(out _descriptorSetLayout, out _descriptorPool); + _pipelineLayout = CreatePipelineLayout(); + CreateShaderModules(out _shaderModuleVert, out _shaderModuleFrag); + _pipeline = CreatePipeline(); + CreateCommandBuffer(out _texCommandPool, out _texCommandBuffer); + + // Our render function expect RendererUserData to be storing the window render buffer we need (for the main viewport we won't use ->Window) + var mainViewport = ImGui.GetMainViewport(); + + mainViewport.RendererUserData = (nint)Mem.AllocZeroed(); + + InitMultiViewportSupport(); + } + + public void NewFrame() { } + + public void RenderDrawData(ImDrawDataPtr drawData, CommandBuffer commandBuffer) + { + RenderDrawData(drawData, commandBuffer, _pipeline); + } + + private unsafe void RenderDrawData(ImDrawDataPtr drawData, CommandBuffer commandBuffer, VkPipeline pipeline) + { + // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates) + var width = (int)(drawData.DisplaySize.X * drawData.FramebufferScale.X); + var height = (int)(drawData.DisplaySize.Y * drawData.FramebufferScale.Y); + if (width <= 0 || height <= 0) + return; + + // Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do. + // (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates). + if (drawData.Textures.IsNotNull()) + { + foreach (var tex in drawData.Textures.Value) + if (tex.Status != ImTextureStatus.OK) + UpdateTexture(tex); + } + + // Allocate array to store enough vertex/index buffers. Each unique viewport gets its own storage. + var viewportRendererData = (ViewportData*)drawData.OwnerViewport.RendererUserData; + Assert(viewportRendererData is not null); + var windowRenderBuffers = &viewportRendererData->RenderBuffers; + if (windowRenderBuffers->FrameRenderBuffers.Count is 0) + { + windowRenderBuffers->Index = 0; + windowRenderBuffers->Count = (uint)ImageCount; + windowRenderBuffers->FrameRenderBuffers.Count = ImageCount; + } + Assert(windowRenderBuffers->Count == ImageCount); + windowRenderBuffers->Index = (windowRenderBuffers->Index + 1) % windowRenderBuffers->Count; + var renderBuffers = &windowRenderBuffers->FrameRenderBuffers.DataRaw[(int)windowRenderBuffers->Index]; + + if (drawData.TotalVtxCount > 0) + { + // Create or resize the vertex/index buffers + var vertexSize = ByteSize.Of(drawData.TotalVtxCount).AlignTo(_bufferMemoryAlignment); + var indexSize = ByteSize.Of(drawData.TotalIdxCount).AlignTo(_bufferMemoryAlignment); + if (renderBuffers->VertexBuffer.IsNull() || renderBuffers->VertexBufferSize.Bytes < vertexSize.Bytes) + CreateOrResizeBuffer( + ref renderBuffers->VertexBuffer, + ref renderBuffers->VertexBufferMemory, + out renderBuffers->VertexBufferSize, + vertexSize, + VkBufferUsageFlags.VertexBufferBit + ); + if (renderBuffers->IndexBuffer.IsNull() || renderBuffers->IndexBufferSize.Bytes < indexSize.Bytes) + CreateOrResizeBuffer( + ref renderBuffers->IndexBuffer, + ref renderBuffers->IndexBufferMemory, + out renderBuffers->IndexBufferSize, + indexSize, + VkBufferUsageFlags.IndexBufferBit + ); + + // Upload vertex/index data into a single contiguous GPU buffer + var vtxDst = Device.MapMemory(renderBuffers->VertexBufferMemory); + + var idxDst = Device.MapMemory(renderBuffers->IndexBufferMemory); + + foreach (var drawList in drawData.CmdLists) + { + Mem.Copy(drawList.VtxBuffer.Data, vtxDst, drawList.VtxBuffer.Count); + Mem.Copy(drawList.IdxBuffer.Data, idxDst, drawList.IdxBuffer.Count); + vtxDst = vtxDst.Offset(drawList.VtxBuffer.Count); + idxDst = idxDst.Offset(drawList.IdxBuffer.Count); + } + + Span range = + [ + new() { Memory = renderBuffers->VertexBufferMemory, Size = VK.WHOLE_SIZE }, + new() { Memory = renderBuffers->IndexBufferMemory, Size = VK.WHOLE_SIZE }, + ]; + + Device.FlushMappedMemoryRanges(range); + Device.UnmapMemory(renderBuffers->VertexBufferMemory); + Device.UnmapMemory(renderBuffers->IndexBufferMemory); + } + + // Setup desired Vulkan state + SetupRenderState(drawData, pipeline, commandBuffer, renderBuffers, new float2(width, height)); + + // Setup render state structure (for callbacks and custom texture bindings) + var platformIo = ImGui.GetPlatformIO(); + var renderState = new RenderState + { + CommandBuffer = commandBuffer, + Pipeline = pipeline, + PipelineLayout = _pipelineLayout, + }; + platformIo.Renderer_RenderState = (nint)(&renderState); // TODO: Why like this? + + // Will project scissor/clipping rectangles into framebuffer space + var clipOffset = drawData.DisplayPos; // (0,0) unless using multi-viewports + var clipScale = drawData.FramebufferScale; // (1,1) unless using retina display which are often (2,2) + + // Render command lists + // (Because we merged all buffers into a single one, we maintain our own offset into them) + VkDescriptorSet last_desc_set = default; + var vtxOffset = 0; + var idxOffset = 0; + foreach (var drawList in drawData.CmdLists) + { + for (var i = 0; i < drawList.CmdBuffer.Count; i++) + { + var pcmd = drawList.CmdBuffer[i]; + if (pcmd.UserCallback is not 0) + { + // TODO: Implement + // // User callback, registered via ImDrawList::AddCallback() + // // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.) + // if (pcmd.UserCallback == ImDrawCallback_ResetRenderState) + // SetupRenderState( + // drawData, + // pipeline, + // commandBuffer, + // renderBuffer, + // new float2(width, height) + // ); + // else + // pcmd.UserCallback(draw_list, pcmd); + // last_desc_set = default; + } + else + { + // Project scissor/clipping rectangles into framebuffer space + var clipMin = new float2( + (pcmd.ClipRect.X - clipOffset.X) * clipScale.X, + (pcmd.ClipRect.Y - clipOffset.Y) * clipScale.Y + ); + var clipMax = new float2( + (pcmd.ClipRect.Z - clipOffset.X) * clipScale.X, + (pcmd.ClipRect.W - clipOffset.Y) * clipScale.Y + ); + + // Clamp to viewport as vkCmdSetScissor() won't accept values that are off bounds + clipMin = float2.Max(clipMin, float2.Zero); + clipMax = float2.Min(clipMax, new float2(width, height)); + + if (clipMax.X <= clipMin.X || clipMax.Y <= clipMin.Y) + continue; + + // Apply scissor/clipping rectangle + Span scissor = + [ + new() + { + Offset = new VkOffset2D { X = (int)clipMin.X, Y = (int)clipMin.Y }, + Extent = new VkExtent2D + { + Width = (int)(clipMax.X - clipMin.X), + Height = (int)(clipMax.Y - clipMin.Y), + }, + }, + ]; + commandBuffer.SetScissor(firstScissor: 0, scissor); + + // Bind DescriptorSet with font or user texture + Span descSet = [new(pcmd.GetTexID())]; + if (descSet[0].VkHandle != last_desc_set.VkHandle) + commandBuffer.BindDescriptorSets(VkPipelineBindPoint.Graphics, _pipelineLayout, 0, descSet, []); + last_desc_set = descSet[0]; + + // Draw + commandBuffer.DrawIndexed( + (int)pcmd.ElemCount, + instanceCount: 1, + firstIndex: (int)pcmd.IdxOffset + idxOffset, + vertexOffset: (int)pcmd.VtxOffset + vtxOffset, + firstInstance: 0 + ); + } + } + idxOffset += drawList.IdxBuffer.Count; + vtxOffset += drawList.VtxBuffer.Count; + } + + platformIo.Renderer_RenderState = 0; + + // Note: C++ backend attempted to 'reset' scissor at this point, but I don't believe this tidyup is necessary + // - if someone is using dynamic state they should set it each draw call themselves + } + + private unsafe void SetupRenderState( + ImDrawDataPtr drawData, + VkPipeline pipeline, + CommandBuffer commandBuffer, + FrameRenderBuffers* renderBuffers, + float2 framebufferSize + ) + { + // Bind pipeline: + { + commandBuffer.BindPipeline(VkPipelineBindPoint.Graphics, pipeline); + } + + // Bind Vertex And Index Buffer: + if (drawData.TotalVtxCount > 0) + { + commandBuffer.BindVertexBuffer(0, renderBuffers->VertexBuffer); + commandBuffer.BindIndexBuffer(renderBuffers->IndexBuffer, offset: ByteSize.Zero, VkIndexType.UInt16); + } + + // Setup viewport: + { + commandBuffer.SetViewport( + firstViewport: 0, + [ + new VkViewport + { + Width = framebufferSize.X, + Height = framebufferSize.Y, + MinDepth = 0.0f, + MaxDepth = 1.0f, + }, + ] + ); + } + + // Setup scale and translation: + // Our visible imgui space lies from draw_data->DisplayPps (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps. + { + Span scale = [2.0f / drawData.DisplaySize.X, 2.0f / drawData.DisplaySize.Y]; + Span translate = + [ + -1.0f - drawData.DisplayPos.X * scale[0], + -1.0f - drawData.DisplayPos.Y * scale[1], + ]; + + commandBuffer.PushConstants( + _pipelineLayout, + VkShaderStageFlags.VertexBit, + offset: 0, + scale.Cast() + ); + commandBuffer.PushConstants( + _pipelineLayout, + VkShaderStageFlags.VertexBit, + offset: sizeof(float) * 2, + translate.Cast() + ); + } + } + + private void CreateOrResizeBuffer( + ref VkBuffer buffer, + ref VkDeviceMemory bufferMemory, + out ByteSize bufferSize, + ByteSize newSize, + VkBufferUsageFlags usage + ) + { + if (buffer.IsNotNull()) + Device.DestroyBuffer(buffer, null); + if (bufferMemory.IsNotNull()) + Device.FreeMemory(bufferMemory, null); + + var bytes = ByteSize.Max(MinAllocationSize, newSize); + var bufferSizeAligned = bytes.AlignTo(_bufferMemoryAlignment); + + buffer = Device.CreateBuffer( + new VkBufferCreateInfo + { + Size = bufferSizeAligned, + Usage = usage, + SharingMode = VkSharingMode.Exclusive, + }, + null + ); + + var req = Device.GetBufferMemoryRequirements(buffer); + _bufferMemoryAlignment = ByteSize.Max(_bufferMemoryAlignment, req.Alignment); + + bufferMemory = Device.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = req.Size, + MemoryTypeIndex = MemoryType(VkMemoryPropertyFlags.HostVisibleBit, req.MemoryTypeBits), + }, + null + ); + + Device.BindBufferMemory(buffer, bufferMemory, memoryOffset: ByteSize.Zero); + + bufferSize = bufferSizeAligned; + } + + private int MemoryType(VkMemoryPropertyFlags properties, int typeBits) + { + var prop = PhysicalDevice.GetMemoryProperties(); + for (var i = 0; i < prop.MemoryTypeCount; i++) + if ((prop.MemoryTypes[i].PropertyFlags & properties) == properties && (typeBits & (1 << i)) is not 0) + return i; + + // No usable memory type, matching the assert/throw behaviour of the C++ reference backend. + throw new InvalidOperationException( + $"No suitable Vulkan memory type found for properties {properties} and type bits 0x{typeBits:X}." + ); + } + + private unsafe void UpdateTexture(ImTextureDataPtr tex) + { + if (tex.Status is ImTextureStatus.OK) + return; + + if (tex.Status is ImTextureStatus.WantCreate) + { + // Create and upload new texture to graphics system + Assert(tex.TexID == ImTextureID.Invalid && tex.BackendUserData is 0); + Assert(tex.Format is ImTextureFormat.RGBA32); + var backendTex = Mem.Alloc(); + + // Create the Image: + { + backendTex.Value.Image = Device.CreateImage( + new VkImageCreateInfo + { + ImageType = VkImageType._2D, + Format = VkFormat.R8G8B8A8UNorm, + Extent = new VkExtent3D + { + Width = tex.Width, + Height = tex.Height, + Depth = 1, + }, + MipLevels = 1, + ArrayLayers = 1, + Samples = VkSampleCountFlags._1Bit, + Tiling = VkImageTiling.Optimal, + Usage = VkImageUsageFlags.SampledBit | VkImageUsageFlags.TransferDstBit, + SharingMode = VkSharingMode.Exclusive, + InitialLayout = VkImageLayout.Undefined, + }, + null + ); + + var req = Device.GetImageMemoryRequirements(backendTex.Value.Image); + + backendTex.Value.Memory = Device.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = ByteSize.Max(MinAllocationSize, req.Size), + MemoryTypeIndex = MemoryType(VkMemoryPropertyFlags.DeviceLocalBit, req.MemoryTypeBits), + }, + null + ); + Device.BindImageMemory(backendTex.Value.Image, backendTex.Value.Memory, memoryOffset: ByteSize.Zero); + } + + // Create the Image View: + { + backendTex.Value.ImageView = Device.CreateImageView( + new VkImageViewCreateInfo + { + Image = backendTex.Value.Image, + ViewType = VkImageViewType._2D, + Format = VkFormat.R8G8B8A8UNorm, + SubresourceRange = new VkImageSubresourceRange + { + AspectMask = VkImageAspectFlags.ColorBit, + LevelCount = 1, + LayerCount = 1, + }, + }, + null + ); + } + + // Create the Descriptor Set + backendTex.Value.DescriptorSet = AddTextureImpl( + _texSampler, + backendTex.Value.ImageView, + VkImageLayout.ShaderReadOnlyOptimal + ); + + // Store identifiers + tex.SetTexID(new ImTextureID(backendTex.Value.DescriptorSet.VkHandle)); + tex.BackendUserData = (nint)backendTex; + } + + if (tex.Status is ImTextureStatus.WantCreate or ImTextureStatus.WantUpdates) + { + var backendTex = (Texture*)tex.BackendUserData; + + // Update full texture or selected blocks. We only ever write to textures regions which have never been used before! + // This backend choose to use tex.UpdateRect but you can use tex.Updates[] to upload individual regions. + // We could use the smaller rect on _WantCreate but using the full rect allows us to clear the texture. + var uploadX = tex.Status is ImTextureStatus.WantCreate ? 0 : tex.UpdateRect.x; + var uploadY = tex.Status is ImTextureStatus.WantCreate ? 0 : tex.UpdateRect.y; + var uploadW = tex.Status is ImTextureStatus.WantCreate ? tex.Width : tex.UpdateRect.w; + var uploadH = tex.Status is ImTextureStatus.WantCreate ? tex.Height : tex.UpdateRect.h; + + // Create the Upload Buffer: + VkDeviceMemory uploadBufferMemory; + + VkBuffer uploadBuffer; + var uploadPitch = ByteSize.Of(uploadW * tex.BytesPerPixel); + var uploadSize = ByteSize.Of((ulong)(uploadH * uploadPitch)).AlignTo(_nonCoherentAtomSize); + { + uploadBuffer = Device.CreateBuffer( + new VkBufferCreateInfo + { + Size = uploadSize, + Usage = VkBufferUsageFlags.TransferSrcBit, + SharingMode = VkSharingMode.Exclusive, + }, + null + ); + + var req = Device.GetBufferMemoryRequirements(uploadBuffer); + + _bufferMemoryAlignment = ByteSize.Max(_bufferMemoryAlignment, req.Alignment); + + uploadBufferMemory = Device.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = ByteSize.Max(MinAllocationSize, req.Size), + MemoryTypeIndex = MemoryType(VkMemoryPropertyFlags.HostVisibleBit, req.MemoryTypeBits), + }, + null + ); + + Device.BindBufferMemory(uploadBuffer, uploadBufferMemory, memoryOffset: ByteSize.Zero); + } + + // Upload to Buffer: + { + var map = Device.MapMemory( + new MapInfo(uploadBufferMemory) { Region = new MapRegion { Size = uploadSize } } + ); + + for (var y = 0; y < uploadH; y++) + Mem.Copy((byte*)tex.GetPixelsAt(uploadX, uploadY + y), map.Offset(uploadPitch * y), uploadPitch); + + Device.FlushMappedMemoryRanges( + [new VkMappedMemoryRange { Memory = uploadBufferMemory, Size = uploadSize }] + ); + + Device.UnmapMemory(uploadBufferMemory); + } + + // Start command buffer + { + Device.ResetCommandPool(_texCommandPool, VkCommandPoolResetFlags.None); + + _texCommandBuffer.Begin( + new VkCommandBufferBeginInfo { Flags = VkCommandBufferUsageFlags.OneTimeSubmitBit } + ); + } + + // Copy to Image: + { + _texCommandBuffer.PipelineBarrier( + VkPipelineStageFlags.FragmentShaderBit | VkPipelineStageFlags.HostBit, + VkPipelineStageFlags.TransferBit, + dependencyFlags: VkDependencyFlags.None, + [], + [ + new VkBufferMemoryBarrier + { + SrcAccessMask = VkAccessFlags.HostWriteBit, + DstAccessMask = VkAccessFlags.TransferReadBit, + SrcQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + DstQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + Buffer = uploadBuffer, + Offset = ByteSize.Zero, + Size = uploadSize, + }, + ], + [ + new VkImageMemoryBarrier + { + DstAccessMask = VkAccessFlags.TransferWriteBit, + OldLayout = + tex.Status is ImTextureStatus.WantCreate + ? VkImageLayout.Undefined + : VkImageLayout.ShaderReadOnlyOptimal, + NewLayout = VkImageLayout.TransferDstOptimal, + SrcQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + DstQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + Image = backendTex->Image, + SubresourceRange = new VkImageSubresourceRange + { + AspectMask = VkImageAspectFlags.ColorBit, + LevelCount = 1, + LayerCount = 1, + }, + }, + ] + ); + + _texCommandBuffer.CopyBufferToImage( + uploadBuffer, + backendTex->Image, + VkImageLayout.TransferDstOptimal, + [ + new VkBufferImageCopy + { + ImageSubresource = new VkImageSubresourceLayers + { + AspectMask = VkImageAspectFlags.ColorBit, + LayerCount = 1, + }, + ImageExtent = new VkExtent3D + { + Width = uploadW, + Height = uploadH, + Depth = 1, + }, + ImageOffset = new VkOffset3D + { + X = uploadX, + Y = uploadY, + Z = 0, + }, + }, + ] + ); + + _texCommandBuffer.PipelineBarrier( + VkPipelineStageFlags.TransferBit, + VkPipelineStageFlags.FragmentShaderBit, + VkDependencyFlags.None, + [], + [], + [ + new VkImageMemoryBarrier + { + SrcAccessMask = VkAccessFlags.TransferWriteBit, + DstAccessMask = VkAccessFlags.ShaderReadBit, + OldLayout = VkImageLayout.TransferDstOptimal, + NewLayout = VkImageLayout.ShaderReadOnlyOptimal, + SrcQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + DstQueueFamilyIndex = VK.QUEUE_FAMILY_IGNORED, + Image = backendTex->Image, + SubresourceRange = new VkImageSubresourceRange + { + AspectMask = VkImageAspectFlags.ColorBit, + LevelCount = 1, + LayerCount = 1, + }, + }, + ] + ); + } + + // End command buffer + var fence = Device.CreateFence(VkFenceCreateFlags.None, null); + _texCommandBuffer.End(); + GraphicsQueue.Submit([], [], [_texCommandBuffer], [], fence); + Device.WaitForFence(fence, -1); + + Device.DestroyFence(fence, null); + Device.DestroyBuffer(uploadBuffer, null); + Device.FreeMemory(uploadBufferMemory, null); + + tex.SetStatus(ImTextureStatus.OK); + } + + if (tex.Status is ImTextureStatus.WantDestroy && tex.UnusedFrames >= ImageCount) + DestroyTexture(tex); + } + + private unsafe void DestroyTexture(ImTextureDataPtr tex) + { + var backendTex = (Texture*)tex.BackendUserData; + if (backendTex is null) + return; + + Assert(backendTex->DescriptorSet.VkHandle == tex.TexID.Value); + RemoveTextureImpl(backendTex->DescriptorSet); + Device.DestroyImageView(backendTex->ImageView, null); + Device.DestroyImage(backendTex->Image, null); + Device.FreeMemory(backendTex->Memory, null); + Mem.Free(backendTex); + + // Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running) + tex.SetTexID(ImTextureID.Invalid); + tex.SetStatus(ImTextureStatus.Destroyed); + tex.BackendUserData = 0; + } + + public ImTextureRef AddTexture(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout) + { + var descriptorSet = AddTextureImpl(sampler, imageView, imageLayout); + return new ImTextureRef { _TexID = (ImTextureID)descriptorSet.VkHandle }; + } + + public void RemoveTexture(ImTextureRef texture) + { + RemoveTextureImpl(new VkDescriptorSet(texture._TexID)); + } + + // Register a texture by creating a descriptor + // FIXME: This is experimental in the sense that we are unsure how to best design/tackle this problem, please post to https://github.com/ocornut/imgui/pull/914 if you have suggestions. + private unsafe VkDescriptorSet AddTextureImpl(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout) + { + // Create Descriptor Set: + var descriptorSet = Device.AllocateDescriptorSet(_descriptorPool, _descriptorSetLayout); + + // Update the Descriptor Set: + { + var imageInfo = new VkDescriptorImageInfo + { + Sampler = sampler, + ImageView = imageView, + ImageLayout = imageLayout, + }; + Device.UpdateDescriptorSets( + [ + new VkWriteDescriptorSet + { + DstSet = descriptorSet, + DescriptorCount = 1, + DescriptorType = VkDescriptorType.CombinedImageSampler, + ImageInfo = &imageInfo, + }, + ], + [] + ); + } + return descriptorSet; + } + + private void RemoveTextureImpl(VkDescriptorSet descriptorSet) + { + Device.FreeDescriptorSets(_descriptorPool, [descriptorSet]); + } + + private unsafe void DestroyFrameRenderBuffers(FrameRenderBuffers* buffers) + { + if (buffers->VertexBuffer.IsNotNull()) + { + Device.DestroyBuffer(buffers->VertexBuffer, null); + buffers->VertexBuffer = default; + } + if (buffers->VertexBufferMemory.IsNotNull()) + { + Device.FreeMemory(buffers->VertexBufferMemory, null); + buffers->VertexBufferMemory = default; + } + if (buffers->IndexBuffer.IsNotNull()) + { + Device.DestroyBuffer(buffers->IndexBuffer, null); + buffers->IndexBuffer = default; + } + if (buffers->IndexBufferMemory.IsNotNull()) + { + Device.FreeMemory(buffers->IndexBufferMemory, null); + buffers->IndexBufferMemory = default; + } + buffers->VertexBufferSize = ByteSize.Zero; + buffers->IndexBufferSize = ByteSize.Zero; + } + + private unsafe void DestroyWindowRenderBuffers(WindowRenderBuffers* buffers) + { + for (var n = 0; n < buffers->Count; n++) + DestroyFrameRenderBuffers(&buffers->FrameRenderBuffers.DataRaw[n]); + buffers->FrameRenderBuffers.Clear(); + buffers->Index = 0; + buffers->Count = 0; + } + + private unsafe void DestroyDeviceObjects() + { + // Destroy all viewports render buffers + var platformIo = ImGui.GetPlatformIO(); + foreach (var viewport in platformIo.Viewports) + { + var viewportData = (ViewportData*)viewport.RendererUserData; + if (viewportData is not null) + DestroyWindowRenderBuffers(&viewportData->RenderBuffers); + } + + // Destroy all textures + foreach (var tex in platformIo.Textures) + if (tex.RefCount == 1) + DestroyTexture(tex); + + Device.FreeCommandBuffers(_texCommandPool, [_texCommandBuffer]); + Device.DestroyCommandPool(_texCommandPool, null); + Device.DestroySampler(_texSampler, null); + Device.DestroyShaderModule(_shaderModuleVert, null); + Device.DestroyShaderModule(_shaderModuleFrag, null); + Device.DestroyDescriptorSetLayout(_descriptorSetLayout, null); + Device.DestroyPipelineLayout(_pipelineLayout, null); + Device.DestroyPipeline(_pipeline, null); + Device.DestroyPipeline(_pipelineForViewports, null); + Device.DestroyDescriptorPool(_descriptorPool, null); + } + + public unsafe void Dispose() + { + var io = ImGui.GetIO(); + + // First destroy objects in all viewports + DestroyDeviceObjects(); + + // Manually delete main viewport render data in-case we haven't initialized for viewports + var mainViewport = ImGui.GetMainViewport(); + var viewportData = mainViewport.RendererUserData; + if (viewportData is not 0) + Mem.Free(new Ptr((void*)viewportData)); // TODO: fix this?? + mainViewport.RendererUserData = 0; + + // Clean up windows + ShutdownMultiViewportSupport(); + + io.BackendRendererName = null; + io.BackendRendererUserData = 0; + io.BackendFlags &= ~( + ImGuiBackendFlags.RendererHasVtxOffset + | ImGuiBackendFlags.RendererHasTextures + | ImGuiBackendFlags.RendererHasViewports + ); + } + + // TODO: Replace with something generic + private static void Assert(bool condition, string message = "") + { + if (!condition) + throw new Exception(message); + } + + private VkSampler CreateSampler() + { + return Device.CreateSampler( + new VkSamplerCreateInfo + { + MagFilter = VkFilter.Linear, + MinFilter = VkFilter.Linear, + MipmapMode = VkSamplerMipmapMode.Linear, + AddressModeU = VkSamplerAddressMode.ClampToEdge, + AddressModeV = VkSamplerAddressMode.ClampToEdge, + AddressModeW = VkSamplerAddressMode.ClampToEdge, + MinLod = -1000, + MaxLod = 1000, + MaxAnisotropy = 1.0f, + }, + null + ); + } + + private void CreateDescriptorPool( + out DescriptorSetLayoutEx descriptorSetLayout, + out DescriptorPoolEx descriptorPool + ) + { + // Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling. + var descriptorSetLayoutBinding = new VkDescriptorSetLayoutBinding + { + DescriptorType = VkDescriptorType.CombinedImageSampler, + DescriptorCount = 1, + StageFlags = VkShaderStageFlags.FragmentBit, + }; + + descriptorSetLayout = Device.CreateDescriptorSetLayout( + new DescriptorSetLayoutEx.CreateInfo { Bindings = [descriptorSetLayoutBinding] }, + null + ); + + Assert( + DescriptorPoolSize >= MINIMUM_IMAGE_SAMPLER_POOL_SIZE, + $"VulkanBackend pool size needs to be at least {MINIMUM_IMAGE_SAMPLER_POOL_SIZE}." + ); + + var descriptorPoolSize = new VkDescriptorPoolSize + { + Type = VkDescriptorType.CombinedImageSampler, + DescriptorCount = DescriptorPoolSize, + }; + + descriptorPool = Device.CreateDescriptorPool( + new DescriptorPoolEx.CreateInfo + { + Flags = VkDescriptorPoolCreateFlags.FreeDescriptorSetBit, + MaxSets = DescriptorPoolSize, + PoolSizes = [descriptorPoolSize], + }, + null + ); + } + + private VkPipelineLayout CreatePipelineLayout() + { + // Constants: we are using 'vec2 offset' and 'vec2 scale' instead of a full 3d projection matrix + var pushConstants = new VkPushConstantRange + { + StageFlags = VkShaderStageFlags.VertexBit, + Offset = ByteSize.Zero, + Size = ByteSize.Of(4), + }; + + return Device.CreatePipelineLayout([_descriptorSetLayout], [pushConstants], null); + } + + private void CreateCommandBuffer(out VkCommandPool texCommandPool, out CommandBuffer texCommandBuffer) + { + // Create command pool/buffer for texture upload + texCommandPool = Device.CreateCommandPool( + new VkCommandPoolCreateInfo { QueueFamilyIndex = GraphicsQueue.Family }, + null + ); + + texCommandBuffer = Device.AllocateCommandBuffer( + new VkCommandBufferAllocateInfo { CommandPool = texCommandPool, Level = VkCommandBufferLevel.Primary } + ); + } + + private VkPipeline CreatePipeline() + { + return CreatePipeline(RenderPass, SubPass, SampleCount); + } + + private unsafe VkPipeline CreatePipeline(VkRenderPass renderPass, int subPass, VkSampleCountFlags sampleCount) + { + var shaderName = "main"u8; + + Span stages = + [ + new() + { + Stage = VkShaderStageFlags.VertexBit, + Module = _shaderModuleVert, + Name = shaderName.AsPointer(), + }, + new() + { + Stage = VkShaderStageFlags.FragmentBit, + Module = _shaderModuleFrag, + Name = shaderName.AsPointer(), + }, + ]; + + var bindingDesc = new VkVertexInputBindingDescription + { + Stride = ByteSize.Of(), + InputRate = VkVertexInputRate.Vertex, + }; + + Span attributeDesc = + [ + new() + { + Location = 0, + Binding = bindingDesc.Binding, + Format = VkFormat.R32G32SFloat, + Offset = ByteSize.OffsetOf(nameof(ImDrawVert.pos)), + }, + new() + { + Location = 1, + Binding = bindingDesc.Binding, + Format = VkFormat.R32G32SFloat, + Offset = ByteSize.OffsetOf(nameof(ImDrawVert.uv)), + }, + new() + { + Location = 2, + Binding = bindingDesc.Binding, + Format = VkFormat.R8G8B8A8UNorm, + Offset = ByteSize.OffsetOf(nameof(ImDrawVert.col)), + }, + ]; + + var vertexInfo = new VkPipelineVertexInputStateCreateInfo + { + VertexBindingDescriptionCount = 1, + VertexBindingDescriptions = &bindingDesc, + VertexAttributeDescriptionCount = 3, + VertexAttributeDescriptions = attributeDesc.AsPointer(), + }; + + var inputAssemblyStateCreateInfo = new VkPipelineInputAssemblyStateCreateInfo + { + Topology = VkPrimitiveTopology.TriangleList, + }; + + var viewportInfo = new VkPipelineViewportStateCreateInfo { ViewportCount = 1, ScissorCount = 1 }; + + var rasterInfo = new VkPipelineRasterizationStateCreateInfo + { + PolygonMode = VkPolygonMode.Fill, + CullMode = VkCullModeFlags.None, + FrontFace = VkFrontFace.CounterClockwise, + LineWidth = 1.0f, + }; + + var multisampleInfo = new VkPipelineMultisampleStateCreateInfo { RasterizationSamples = sampleCount }; + + var colorAttachment = new VkPipelineColorBlendAttachmentState + { + BlendEnable = true, + SrcColorBlendFactor = VkBlendFactor.SrcAlpha, + DstColorBlendFactor = VkBlendFactor.OneMinusSrcAlpha, + ColorBlendOp = VkBlendOp.Add, + SrcAlphaBlendFactor = VkBlendFactor.One, + DstAlphaBlendFactor = VkBlendFactor.OneMinusSrcAlpha, + AlphaBlendOp = VkBlendOp.Add, + ColorWriteMask = + VkColorComponentFlags.RBit + | VkColorComponentFlags.GBit + | VkColorComponentFlags.BBit + | VkColorComponentFlags.ABit, + }; + + var depthInfo = new VkPipelineDepthStencilStateCreateInfo(); + + var blendInfo = new VkPipelineColorBlendStateCreateInfo { AttachmentCount = 1, Attachments = &colorAttachment }; + + Span dynamicStates = [VkDynamicState.Viewport, VkDynamicState.Scissor]; + + var dynamicState = new VkPipelineDynamicStateCreateInfo + { + DynamicStateCount = dynamicStates.Length, + DynamicStates = dynamicStates.AsPointer(), + }; + + VkPipeline pipeline; + Device.CreateGraphicsPipelines( + default, + [ + new VkGraphicsPipelineCreateInfo + { + Flags = VkPipelineCreateFlags.None, + StageCount = 2, + Stages = stages.AsPointer(), + VertexInputState = &vertexInfo, + InputAssemblyState = &inputAssemblyStateCreateInfo, + ViewportState = &viewportInfo, + RasterizationState = &rasterInfo, + MultisampleState = &multisampleInfo, + DepthStencilState = &depthInfo, + ColorBlendState = &blendInfo, + DynamicState = &dynamicState, + Layout = _pipelineLayout, + RenderPass = renderPass, + Subpass = subPass, + }, + ], + default, + new ReadOnlySpan(&pipeline, 1) + ); + return pipeline; + } + + private unsafe void CreateShaderModules(out VkShaderModule vert, out VkShaderModule frag) + { + // Create the shader modules + fixed (uint* vertSourcePtr = ShaderSource.Vert) + vert = Device.CreateShaderModule( + new VkShaderModuleCreateInfo { CodeSize = ByteSize.Of(ShaderSource.Vert), Code = (int*)vertSourcePtr }, + null + ); + + fixed (uint* fragSourcePtr = ShaderSource.Frag) + frag = Device.CreateShaderModule( + new VkShaderModuleCreateInfo { CodeSize = ByteSize.Of(ShaderSource.Frag), Code = (int*)fragSourcePtr }, + null + ); + } + + #region MultiViewport + private unsafe void InitMultiViewportSupport() + { + var platformIo = ImGui.GetPlatformIO(); + if (ImGui.GetIO().BackendFlags.HasFlag(ImGuiBackendFlags.PlatformHasViewports)) + Assert( + platformIo.Platform_CreateVkSurface is not 0, + "Platform needs to setup the CreateVkSurface handler." + ); + platformIo.Renderer_CreateWindow = (nint)(delegate* unmanaged[Cdecl])&CreateWindow; + platformIo.Renderer_DestroyWindow = (nint)(delegate* unmanaged[Cdecl])&DestroyWindow; + platformIo.Renderer_SetWindowSize = (nint) + (delegate* unmanaged[Cdecl])&SetWindowSize; + platformIo.Renderer_RenderWindow = (nint) + (delegate* unmanaged[Cdecl])&RenderWindow; + platformIo.Renderer_SwapBuffers = (nint)(delegate* unmanaged[Cdecl])&SwapBuffers; + } + + private void ShutdownMultiViewportSupport() + { + ImGui.DestroyPlatformWindows(); + } + + private static VulkanBackend GetBackend() + { + var handle = GCHandle.FromIntPtr(ImGui.GetIO().BackendRendererUserData); + // TODO: Buffer exceptions rather than throw, since this will be from native calls + if (handle.Target is not VulkanBackend backend) + throw new Exception("ImGui backend is not a VulkanBackend."); + return backend; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void CreateWindow(ImGuiViewportPtr viewport) + { + var backend = GetBackend(); + var viewportData = Mem.AllocZeroed(); + viewport.RendererUserData = (nint)viewportData; + ref var window = ref viewportData.Value.Window; + + // Create surface + var platformIo = ImGui.GetPlatformIO(); + var createSurfaceFunc = (delegate* unmanaged[Cdecl]< + ImGuiViewportPtr, + VkInstance, + nint, + VkSurfaceKHR*, + VkResult>) + platformIo.Platform_CreateVkSurface; + + fixed (VkSurfaceKHR* surfacePtr = &window.Surface) + createSurfaceFunc(viewport, backend.Instance, 0, surfacePtr); + + // Check for WSI support + var res = backend.PhysicalDevice.GetSurfaceSupportKHR(backend.GraphicsQueue.Family, window.Surface); + if (!res) + throw new Exception("VulkanBackend: No WSI support."); + + // Select Surface Format + ReadOnlySpan requestSurfaceImageFormats = + [ + VkFormat.B8G8R8A8UNorm, + VkFormat.R8G8B8A8UNorm, + VkFormat.B8G8R8UNorm, + VkFormat.R8G8B8UNorm, + ]; + + window.SurfaceFormat = Helpers.SelectSurfaceFormat( + backend.PhysicalDevice, + window.Surface, + requestSurfaceImageFormats, + VkColorSpaceKHR.SRGBNonlinearKHR + ); + + // Select Present Mode + // FIXME-VULKAN: Even thought mailbox seems to get us maximum framerate with a single window, it halves framerate with a second window etc. (w/ Nvidia and SDK 1.82.1) + // TODO: Do we want these present mode options? + ReadOnlySpan presentModes = + [ + VkPresentModeKHR.MailboxKHR, + VkPresentModeKHR.ImmediateKHR, + VkPresentModeKHR.FifoKHR, + ]; + window.PresentMode = Helpers.SelectPresentMode(backend.PhysicalDevice, window.Surface, presentModes); + + // Create SwapChain, RenderPass, Framebuffer, etc. + window.ClearEnable = !viewport.Flags.HasFlag(ImGuiViewportFlags.NoRendererClear); + + fixed (WindowImpl* windowPtr = &window) + Helpers.CreateOrResizeWindow( + backend.PhysicalDevice, + backend.Device, + windowPtr, + backend.GraphicsQueue, + backend.GraphicsQueue.Family, + (int)viewport.Size.X, + (int)viewport.Size.Y, + backend.MinImageCount + ); + viewportData.Value.WindowOwned = true; + + // Create pipeline (shared by all secondary viewports) + if (backend._pipelineForViewports.IsNull()) + backend._pipelineForViewports = backend.CreatePipeline( + window.RenderPass, + subPass: 0, + VkSampleCountFlags._1Bit + ); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void DestroyWindow(ImGuiViewportPtr viewport) + { + // If backend is null we assumed that it has already been shut down + + // The main viewport (owned by the application) will always have RendererUserData == 0 since we didn't create the data for it. + var viewportData = (ViewportData*)viewport.RendererUserData; + if (viewportData is not null) + { + var backend = GetBackend(); + + if (viewportData->WindowOwned) + Helpers.DestroyWindow(backend.Instance, backend.Device, &viewportData->Window); + backend.DestroyWindowRenderBuffers(&viewportData->RenderBuffers); + Mem.Free(viewportData); + } + viewport.RendererUserData = 0; + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SetWindowSize(ImGuiViewportPtr viewport, float2 size) + { + var viewportData = (ViewportData*)viewport.RendererUserData; + if (viewportData == null) // This is nullptr for the main viewport (which is left to the user/app to handle) + return; + viewportData->Window.ClearEnable = !viewport.Flags.HasFlag(ImGuiViewportFlags.NoRendererClear); + var backend = GetBackend(); + Helpers.CreateOrResizeWindow( + backend.PhysicalDevice, + backend.Device, + &viewportData->Window, + backend.GraphicsQueue, + backend.GraphicsQueue.Family, + (int)size.X, + (int)size.Y, + backend.MinImageCount + ); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void RenderWindow(ImGuiViewportPtr viewport, void* _) + { + var backend = GetBackend(); + var viewportData = (ViewportData*)viewport.RendererUserData; + var windowData = &viewportData->Window; + + if (viewportData->SwapChainNeedRebuild || viewportData->SwapChainSuboptimal) + { + Helpers.CreateOrResizeWindow( + backend.PhysicalDevice, + backend.Device, + windowData, + backend.GraphicsQueue, + backend.GraphicsQueue.Family, + (int)viewport.Size.X, + (int)viewport.Size.Y, + backend.MinImageCount + ); + viewportData->SwapChainNeedRebuild = viewportData->SwapChainSuboptimal = false; + } + + var frameSemaphoresData = &windowData->FrameSemaphores.DataRaw[windowData->SemaphoreIndex]; + var result = backend.Device.AcquireNextImageKHR( + windowData->Swapchain, + -1, + frameSemaphoresData->ImageAcquiredSemaphore, + default, + out windowData->FrameIndex + ); + + if (result == VkResult.ErrorOutOfDateKHR) + { + viewportData->SwapChainNeedRebuild = true; // Since we are not going to swap this frame anyway, it's ok that recreation happens on next frame. + return; + } + + if (result == VkResult.SuboptimalKHR) + { + viewportData->SwapChainSuboptimal = true; + } + else if (result != VkResult.Success) + { + throw new Exception("VulkanBackend: Failed to acquire next image."); + } + + var frameData = &windowData->Frames.DataRaw[windowData->FrameIndex]; + + // TODO: Seems a little dubious... + for (; ; ) + { + result = backend.Device.WaitForFences([frameData->Fence], true, timeout: 100); + if (result is VkResult.Success) + break; + if (result is VkResult.Timeout) + continue; + throw new Exception("VulkanBackend: Failed to wait for fence."); + } + backend.Device.ResetCommandPool(frameData->CommandPool, VkCommandPoolResetFlags.None); + + var cb = frameData->CommandBuffer; + + cb.Begin(new VkCommandBufferBeginInfo { Flags = VkCommandBufferUsageFlags.OneTimeSubmitBit }); + windowData->ClearValue = new VkClearColorValue { Float32 = new float4(0.0f, 0.0f, 0.0f, 1.0f) }; + cb.BeginRenderPass( + new VkRenderPassBeginInfo + { + RenderPass = windowData->RenderPass, + Framebuffer = frameData->Framebuffer, + RenderArea = new VkRect2D + { + Extent = new VkExtent2D { Width = windowData->Width, Height = windowData->Height }, + }, + ClearValueCount = viewport.Flags.HasFlag(ImGuiViewportFlags.NoRendererClear) ? 0 : 1, + ClearValues = viewport.Flags.HasFlag(ImGuiViewportFlags.NoRendererClear) + ? null + : &windowData->ClearValue, + }, + VkSubpassContents.Inline + ); + + backend.RenderDrawData(viewport.DrawData, cb, backend._pipelineForViewports); + + cb.EndRenderPass(); + + var waitStage = VkPipelineStageFlags.ColorAttachmentOutputBit; + + cb.End(); + + var vkcb = cb.Handle; + + backend.Device.ResetFences([frameData->Fence]); + backend.GraphicsQueue.Submit( + [ + new VkSubmitInfo + { + WaitSemaphoreCount = 1, + WaitSemaphores = &frameSemaphoresData->ImageAcquiredSemaphore, + WaitDstStageMask = &waitStage, + CommandBufferCount = 1, + CommandBuffers = &vkcb, + SignalSemaphoreCount = 1, + SignalSemaphores = &frameSemaphoresData->RenderCompleteSemaphore, + }, + ], + frameData->Fence + ); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static unsafe void SwapBuffers(ImGuiViewportPtr viewport, void* _) + { + var backend = GetBackend(); + var viewportData = (ViewportData*)viewport.RendererUserData; + var windowData = &viewportData->Window; + + if (viewportData->SwapChainNeedRebuild) // Frame data became invalid in the middle of rendering + return; + + var presentIndex = windowData->FrameIndex; + + var frameSemaphoresData = &windowData->FrameSemaphores.DataRaw[windowData->SemaphoreIndex]; + var result = backend.GraphicsQueue.PresentKHR( + new VkPresentInfoKHR + { + WaitSemaphoreCount = 1, + WaitSemaphores = &frameSemaphoresData->RenderCompleteSemaphore, + SwapchainCount = 1, + Swapchains = &windowData->Swapchain, + ImageIndices = &presentIndex, + } + ); + if (result is VkResult.ErrorOutOfDateKHR) + { + viewportData->SwapChainNeedRebuild = true; + return; + } + + if (result is VkResult.SuboptimalKHR) + { + viewportData->SwapChainSuboptimal = true; + } + else if (result != VkResult.Success) + { + throw new Exception("VulkanBackend: Failed to present."); + } + + windowData->SemaphoreIndex = (windowData->SemaphoreIndex + 1) % windowData->SemaphoreCount; // Now we can use the next set of semaphores + } + + #endregion + + private DeviceEx Device { get; } + private PhysicalDevice PhysicalDevice => Device.PhysicalDevice; + private Instance Instance => PhysicalDevice.Instance; + private Queue GraphicsQueue { get; } + private VkRenderPass RenderPass { get; } + private int SubPass { get; } + private int MinImageCount { get; } + private int ImageCount { get; } + private VkSampleCountFlags SampleCount { get; } + private int DescriptorPoolSize { get; } + private ByteSize MinAllocationSize { get; } // Minimum allocation size. Set to 1024*1024 to satisfy zealous best practices validation layer and waste a little memory. + + private ByteSize _bufferMemoryAlignment = ByteSize.Of(256); + private readonly ByteSize _nonCoherentAtomSize; + private DescriptorSetLayoutEx _descriptorSetLayout; + private readonly VkPipelineLayout _pipelineLayout; + private readonly VkPipeline _pipeline; // pipeline for main render pass (created by app) + private VkPipeline _pipelineForViewports; // pipeline for secondary viewports (created by backend) + private readonly VkShaderModule _shaderModuleVert; + private readonly VkShaderModule _shaderModuleFrag; + private readonly DescriptorPoolEx _descriptorPool; + + // Texture management + private readonly VkSampler _texSampler; + private readonly VkCommandPool _texCommandPool; + private CommandBuffer _texCommandBuffer; + + // For multi-viewport support: + // Helper structure we store in the void* RendererUserData field of each ImGuiViewport to easily retrieve our backend data. + [StructLayout(LayoutKind.Sequential)] + private struct ViewportData + { + public WindowImpl Window; // Used by secondary viewports only + public WindowRenderBuffers RenderBuffers; // Used by all viewports + public bool WindowOwned; + public bool SwapChainNeedRebuild; // Flag when viewport swapchain resized in the middle of processing a frame + public bool SwapChainSuboptimal; // Flag when VK_SUBOPTIMAL_KHR was returned. + } + + [StructLayout(LayoutKind.Sequential)] + private struct Texture + { + public VkDeviceMemory Memory; + public VkImage Image; + public VkImageView ImageView; + public VkDescriptorSet DescriptorSet; + } + + // Reusable buffers used for rendering 1 current in-flight frame, for ImGui_ImplVulkan_RenderDrawData() + [StructLayout(LayoutKind.Sequential)] + private struct FrameRenderBuffers + { + public VkDeviceMemory VertexBufferMemory; + public VkDeviceMemory IndexBufferMemory; + public ByteSize VertexBufferSize; + public ByteSize IndexBufferSize; + public VkBuffer VertexBuffer; + public VkBuffer IndexBuffer; + } + + // Each viewport will hold 1 ImGui_ImplVulkanH_WindowRenderBuffers + [StructLayout(LayoutKind.Sequential)] + private struct WindowRenderBuffers + { + public uint Index; + public uint Count; + + // TODO: Does this need to be initialized in any particular way? + public ImVector FrameRenderBuffers; + } + + // [BETA] Selected render state data shared with callbacks. + // This is temporarily stored in GetPlatformIO().Renderer_RenderState during the ImGui_ImplVulkan_RenderDrawData() call. + // (Please open an issue if you feel you need access to more data) + [StructLayout(LayoutKind.Sequential)] + private struct RenderState + { + public CommandBuffer CommandBuffer; + public VkPipeline Pipeline; + public VkPipelineLayout PipelineLayout; + } + + // Helper structure to hold the data needed by one rendering frame + // (Used by example's main.cpp. Used by multi-viewport features. Probably NOT used by your own engine/app.) + [StructLayout(LayoutKind.Sequential)] + private struct Frame + { + public VkCommandPool CommandPool; + public CommandBuffer CommandBuffer; + public VkFence Fence; + public VkImage Backbuffer; + public VkImageView BackbufferView; + public VkFramebuffer Framebuffer; + }; + + [StructLayout(LayoutKind.Sequential)] + private struct FrameSemaphores + { + public VkSemaphore ImageAcquiredSemaphore; + public VkSemaphore RenderCompleteSemaphore; + }; + + // Helper structure to hold the data needed by one rendering context into one OS window + // (Used by example's main.cpp. Used by multi-viewport features. Probably NOT used by your own engine/app.) + [StructLayout(LayoutKind.Sequential)] + private struct WindowImpl() + { + public int Width; + public int Height; + public VkSwapchainKHR Swapchain; + public VkSurfaceKHR Surface; + public VkSurfaceFormatKHR SurfaceFormat; + public required VkPresentModeKHR PresentMode; + public VkRenderPass RenderPass; + + // public bool UseDynamicRendering; + public bool ClearEnable = true; + public VkClearValue ClearValue; + public int FrameIndex; // Current frame being rendered to (0 <= FrameIndex < FrameInFlightCount) + public int ImageCount; // Number of simultaneous in-flight frames (returned by vkGetSwapchainImagesKHR, usually derived from min_image_count) + public int SemaphoreCount; // Number of simultaneous in-flight frames + 1, to be able to use it in vkAcquireNextImageKHR + public int SemaphoreIndex; // Current set of swapchain wait semaphores we're using (needs to be distinct from per frame data) + public ImVector Frames; + public ImVector FrameSemaphores; + }; + + private static class ShaderSource + { + /* + #version 450 core + layout(location = 0) in vec2 aPos; + layout(location = 1) in vec2 aUV; + layout(location = 2) in vec4 aColor; + layout(push_constant) uniform uPushConstant { vec2 uScale; vec2 uTranslate; } pc; + + out gl_PerVertex { vec4 gl_Position; }; + layout(location = 0) out struct { vec4 Color; vec2 UV; } Out; + + void main() + { + Out.Color = aColor; + Out.UV = aUV; + gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); + } + */ + + // csharpier-ignore + public static readonly uint[] Vert = + [ + 0x07230203,0x00010000,0x00080001,0x0000002e,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x000a000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000000b,0x0000000f,0x00000015, + 0x0000001b,0x0000001c,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d, + 0x00000000,0x00030005,0x00000009,0x00000000,0x00050006,0x00000009,0x00000000,0x6f6c6f43, + 0x00000072,0x00040006,0x00000009,0x00000001,0x00005655,0x00030005,0x0000000b,0x0074754f, + 0x00040005,0x0000000f,0x6c6f4361,0x0000726f,0x00030005,0x00000015,0x00565561,0x00060005, + 0x00000019,0x505f6c67,0x65567265,0x78657472,0x00000000,0x00060006,0x00000019,0x00000000, + 0x505f6c67,0x7469736f,0x006e6f69,0x00030005,0x0000001b,0x00000000,0x00040005,0x0000001c, + 0x736f5061,0x00000000,0x00060005,0x0000001e,0x73755075,0x6e6f4368,0x6e617473,0x00000074, + 0x00050006,0x0000001e,0x00000000,0x61635375,0x0000656c,0x00060006,0x0000001e,0x00000001, + 0x61725475,0x616c736e,0x00006574,0x00030005,0x00000020,0x00006370,0x00040047,0x0000000b, + 0x0000001e,0x00000000,0x00040047,0x0000000f,0x0000001e,0x00000002,0x00040047,0x00000015, + 0x0000001e,0x00000001,0x00050048,0x00000019,0x00000000,0x0000000b,0x00000000,0x00030047, + 0x00000019,0x00000002,0x00040047,0x0000001c,0x0000001e,0x00000000,0x00050048,0x0000001e, + 0x00000000,0x00000023,0x00000000,0x00050048,0x0000001e,0x00000001,0x00000023,0x00000008, + 0x00030047,0x0000001e,0x00000002,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002, + 0x00030016,0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040017, + 0x00000008,0x00000006,0x00000002,0x0004001e,0x00000009,0x00000007,0x00000008,0x00040020, + 0x0000000a,0x00000003,0x00000009,0x0004003b,0x0000000a,0x0000000b,0x00000003,0x00040015, + 0x0000000c,0x00000020,0x00000001,0x0004002b,0x0000000c,0x0000000d,0x00000000,0x00040020, + 0x0000000e,0x00000001,0x00000007,0x0004003b,0x0000000e,0x0000000f,0x00000001,0x00040020, + 0x00000011,0x00000003,0x00000007,0x0004002b,0x0000000c,0x00000013,0x00000001,0x00040020, + 0x00000014,0x00000001,0x00000008,0x0004003b,0x00000014,0x00000015,0x00000001,0x00040020, + 0x00000017,0x00000003,0x00000008,0x0003001e,0x00000019,0x00000007,0x00040020,0x0000001a, + 0x00000003,0x00000019,0x0004003b,0x0000001a,0x0000001b,0x00000003,0x0004003b,0x00000014, + 0x0000001c,0x00000001,0x0004001e,0x0000001e,0x00000008,0x00000008,0x00040020,0x0000001f, + 0x00000009,0x0000001e,0x0004003b,0x0000001f,0x00000020,0x00000009,0x00040020,0x00000021, + 0x00000009,0x00000008,0x0004002b,0x00000006,0x00000028,0x00000000,0x0004002b,0x00000006, + 0x00000029,0x3f800000,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8, + 0x00000005,0x0004003d,0x00000007,0x00000010,0x0000000f,0x00050041,0x00000011,0x00000012, + 0x0000000b,0x0000000d,0x0003003e,0x00000012,0x00000010,0x0004003d,0x00000008,0x00000016, + 0x00000015,0x00050041,0x00000017,0x00000018,0x0000000b,0x00000013,0x0003003e,0x00000018, + 0x00000016,0x0004003d,0x00000008,0x0000001d,0x0000001c,0x00050041,0x00000021,0x00000022, + 0x00000020,0x0000000d,0x0004003d,0x00000008,0x00000023,0x00000022,0x00050085,0x00000008, + 0x00000024,0x0000001d,0x00000023,0x00050041,0x00000021,0x00000025,0x00000020,0x00000013, + 0x0004003d,0x00000008,0x00000026,0x00000025,0x00050081,0x00000008,0x00000027,0x00000024, + 0x00000026,0x00050051,0x00000006,0x0000002a,0x00000027,0x00000000,0x00050051,0x00000006, + 0x0000002b,0x00000027,0x00000001,0x00070050,0x00000007,0x0000002c,0x0000002a,0x0000002b, + 0x00000028,0x00000029,0x00050041,0x00000011,0x0000002d,0x0000001b,0x0000000d,0x0003003e, + 0x0000002d,0x0000002c,0x000100fd,0x00010038 + ]; + + /* + #version 450 core + layout(location = 0) out vec4 fColor; + layout(set=0, binding=0) uniform sampler2D sTexture; + layout(location = 0) in struct { vec4 Color; vec2 UV; } In; + void main() + { + fColor = In.Color * texture(sTexture, In.UV.st); + } + */ + + // csharpier-ignore + public static readonly uint[] Frag = + [ + 0x07230203,0x00010000,0x00080001,0x0000001e,0x00000000,0x00020011,0x00000001,0x0006000b, + 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, + 0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000009,0x0000000d,0x00030010, + 0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d, + 0x00000000,0x00040005,0x00000009,0x6c6f4366,0x0000726f,0x00030005,0x0000000b,0x00000000, + 0x00050006,0x0000000b,0x00000000,0x6f6c6f43,0x00000072,0x00040006,0x0000000b,0x00000001, + 0x00005655,0x00030005,0x0000000d,0x00006e49,0x00050005,0x00000016,0x78655473,0x65727574, + 0x00000000,0x00040047,0x00000009,0x0000001e,0x00000000,0x00040047,0x0000000d,0x0000001e, + 0x00000000,0x00040047,0x00000016,0x00000022,0x00000000,0x00040047,0x00000016,0x00000021, + 0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006, + 0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040020,0x00000008,0x00000003, + 0x00000007,0x0004003b,0x00000008,0x00000009,0x00000003,0x00040017,0x0000000a,0x00000006, + 0x00000002,0x0004001e,0x0000000b,0x00000007,0x0000000a,0x00040020,0x0000000c,0x00000001, + 0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,0x00040015,0x0000000e,0x00000020, + 0x00000001,0x0004002b,0x0000000e,0x0000000f,0x00000000,0x00040020,0x00000010,0x00000001, + 0x00000007,0x00090019,0x00000013,0x00000006,0x00000001,0x00000000,0x00000000,0x00000000, + 0x00000001,0x00000000,0x0003001b,0x00000014,0x00000013,0x00040020,0x00000015,0x00000000, + 0x00000014,0x0004003b,0x00000015,0x00000016,0x00000000,0x0004002b,0x0000000e,0x00000018, + 0x00000001,0x00040020,0x00000019,0x00000001,0x0000000a,0x00050036,0x00000002,0x00000004, + 0x00000000,0x00000003,0x000200f8,0x00000005,0x00050041,0x00000010,0x00000011,0x0000000d, + 0x0000000f,0x0004003d,0x00000007,0x00000012,0x00000011,0x0004003d,0x00000014,0x00000017, + 0x00000016,0x00050041,0x00000019,0x0000001a,0x0000000d,0x00000018,0x0004003d,0x0000000a, + 0x0000001b,0x0000001a,0x00050057,0x00000007,0x0000001c,0x00000017,0x0000001b,0x00050085, + 0x00000007,0x0000001d,0x00000012,0x0000001c,0x0003003e,0x00000009,0x0000001d,0x000100fd, + 0x00010038 + ]; + } +} diff --git a/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Internals.cs b/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Internals.cs new file mode 100644 index 0000000..d4d19de --- /dev/null +++ b/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Internals.cs @@ -0,0 +1,9 @@ +using Brutal.ImGuiApi.Internal; + +namespace Brutal.ImGuiApi.Extensions; + +public partial class ImGuiCompatibilityEx +{ + [Obsolete("Use Brutal.ImGuiApi.Internal.ImGui.GetCurrentWindow()", error: false)] + public static ImGuiWindowPtr GetCurrentWindow() => Internal.GetCurrentWindow(); +} diff --git a/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Obsolete.cs b/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Obsolete.cs new file mode 100644 index 0000000..00f9656 --- /dev/null +++ b/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.Obsolete.cs @@ -0,0 +1,32 @@ +namespace Brutal.ImGuiApi.Extensions; + +public partial class ImGuiCompatibilityEx +{ + [Obsolete("use ImGui.Text() instead.", error: false)] + public static void TextUnformatted(ImString text) => ImGui.Text(text); + + /// + [Obsolete("use ImageWithBg(ImTextureRef, tintColor: color)", error: false)] + public static void Image(ImTextureID user_texture_id, float2 image_size, float4? tint_col = default) => + ImGui.ImageWithBg(new ImTextureRef { _TexID = user_texture_id }, image_size, tintCol: tint_col); + + /// + [Obsolete("use ImTextureRef overload", error: false)] + public static void Image(ImTextureID user_texture_id, float2 image_size, float2 uv0, float2 uv1) => + ImGui.Image(new ImTextureRef { _TexID = user_texture_id }, image_size, uv0, uv1); + + /// + [Obsolete( + "PushFont() API now has a REQUIRED size parameter", + error: false, + UrlFormat = "https://github.com/ocornut/imgui/releases/tag/v1.92.0#:~:text=PushFont()%20API%20now%20has%20a%20REQUIRED%20size%20parameter" + )] + public static void PushFont(ImFontPtr font) => ImGui.PushFont(font, font.LegacySize); + + [Obsolete( + "Prefer using PushFont(null, style.FontSizeBase * factor) or use style.FontScaleMain to scale all windows.", + error: false, + UrlFormat = "https://github.com/ocornut/imgui/blob/v1.92.2-docking/imgui.h#L4233" + )] + public static void SetWindowFontScale(float scale) => throw new NotImplementedException(); +} diff --git a/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.cs b/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.cs new file mode 100644 index 0000000..f0d4a15 --- /dev/null +++ b/Brutal.ImGui.Extensions/Compatibility/ImGui.Compatibility.cs @@ -0,0 +1,47 @@ +namespace Brutal.ImGuiApi.Extensions; + +public abstract partial class ImGuiCompatibilityEx : ImGui +{ + #region overloads / permutations + + /// + [Obsolete("InputText(ref string) is obsolete, use the ImInputString overload instead.", error: false)] + public static bool InputText( + ImString label, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags = ImGuiInputTextFlags.None, + ImGuiInputTextCallback? callback = null, + IntPtr userData = 0 + ) + { + // HACK: this allocates, remove when conversion is done + var tmpInput = new ImInputString((int)maxLength, input); + var changed = ImGui.InputText(label, tmpInput, flags, callback, userData); + if (changed) + input = tmpInput.ToString(); + return changed; + } + + /// + [Obsolete("use the MenuItem(\"label\", selected: selected) syntax instead.", error: false)] + public static bool MenuItem(ImString label, bool selected_obsolete) => + ImGui.MenuItem(label, selected: selected_obsolete); + + /// + [Obsolete("use the MenuItem(\"label\", selected: selected, enabled: enabled) syntax instead.", error: false)] + public static bool MenuItem(ImString label, bool selected_obsolete, bool enabled_obsolete) => + ImGui.MenuItem(label, selected: selected_obsolete, enabled: enabled_obsolete); + + /// + [Obsolete("use the BeginChild(\"id\", childFlags: childFlags) syntax instead.", error: false)] + public static bool BeginChild(ImString strId, ImGuiChildFlags childFlags_obsolete) => + ImGui.BeginChild(strId, childFlags: childFlags_obsolete); + + /// + [Obsolete("use the BeginChild(\"id\", windowFlags: windowFlags) syntax instead.", error: false)] + public static bool BeginChild(ImString strId, float2? size, ImGuiWindowFlags windowFlags_obsolete) => + ImGui.BeginChild(strId, size, windowFlags: windowFlags_obsolete); + + #endregion +} diff --git a/Brutal.ImGui.Extensions/GlobalUsings.cs b/Brutal.ImGui.Extensions/GlobalUsings.cs new file mode 100644 index 0000000..592fac1 --- /dev/null +++ b/Brutal.ImGui.Extensions/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using Brutal.Numerics; +global using Brutal.Pointers; diff --git a/Brutal.ImGui.Extensions/ImGui.extensions.cs b/Brutal.ImGui.Extensions/ImGui.extensions.cs new file mode 100644 index 0000000..11fb15a --- /dev/null +++ b/Brutal.ImGui.Extensions/ImGui.extensions.cs @@ -0,0 +1,315 @@ +using System.Runtime.CompilerServices; +using Brutal.Strings; + +namespace Brutal.ImGuiApi.Extensions; + +using static ImGui; + +public static partial class ImGuiEx +{ + public static bool CheckboxFlags(ImString label, ref T flags, T flagsValue) + where T : Enum + { + CheckEnumIsIntSized(); + return ImGui.CheckboxFlags(label, ref Unsafe.As(ref flags), Unsafe.As(ref flagsValue)); + } + + public static bool Combo( + ImString label, + ref T currentItem, + ReadOnlySpan> items, + int popupMaxHeightInItems = -1 + ) + where T : Enum + { + CheckEnumIsIntSized(); + return ImGui.Combo(label, ref Unsafe.As(ref currentItem), items, popupMaxHeightInItems); + } + + public static bool Combo( + ImString label, + ref T currentItem, + scoped RefString8Array items, + int popupMaxHeightInItems = -1 + ) + where T : Enum + { + CheckEnumIsIntSized(); + return ImGui.Combo(label, ref Unsafe.As(ref currentItem), items, popupMaxHeightInItems); + } + + public static bool Combo( + ImString label, + ref T currentItem, + ImString itemsSeparatedByZeros, + int popupMaxHeightInItems = -1 + ) + where T : Enum + { + CheckEnumIsIntSized(); + return ImGui.Combo(label, ref Unsafe.As(ref currentItem), itemsSeparatedByZeros, popupMaxHeightInItems); + } + + public static bool Combo( + ImString label, + ref T currentItem, + ComboGetter getter, + nint userData, + int itemsCount, + int popupMaxHeightInItems = -1 + ) + where T : Enum + { + CheckEnumIsIntSized(); + return ImGui.Combo( + label, + ref Unsafe.As(ref currentItem), + getter, + userData, + itemsCount, + popupMaxHeightInItems + ); + } + + public static bool RadioButton(ImString label, ref T v, T vButton) + where T : Enum + { + CheckEnumIsIntSized(); + return ImGui.RadioButton(label, ref Unsafe.As(ref v), Unsafe.As(ref vButton)); + } + + private static void CheckEnumIsIntSized() + where T : Enum + { + if (Unsafe.SizeOf() != sizeof(int)) + throw new ArgumentException("Enum must be int sized to be used in this function"); + } + + /// + /// Implementation automatically applies the NoAlpha flag, so col.A is ignored + /// + public static bool ColorPicker3(ImString label, ref float4 col, ImGuiColorEditFlags flags = default) + { + unsafe + { + fixed (float4* col_fixed = &col) + fixed (byte* label_fixed = label) + { + return PInvoke.ColorPicker3(label_fixed, (float3*)col_fixed, flags); + } + } + } + + /// + /// Implementation automatically applies the NoAlpha flag, so col.A is ignored + /// + public static bool ColorEdit3(ImString label, ref float4 col, ImGuiColorEditFlags flags = default) + { + unsafe + { + fixed (float4* col_fixed = &col) + fixed (byte* label_fixed = label) + { + return PInvoke.ColorEdit3(label_fixed, (float3*)col_fixed, flags); + } + } + } + + public static bool DragScalar( + ImString label, + ImGuiDataType dataType, + ref T pData, + float vSpeed = 1f, + T? pMin = null, + T? pMax = null, + ImString format = default, + ImGuiSliderFlags flags = default + ) + where T : unmanaged + { + unsafe + { + var pMin_ptr = pMin is { } min_value ? &min_value : null; + var pMax_ptr = pMax is { } max_value ? &max_value : null; + + fixed (T* pData_fixed = &pData) + fixed (byte* format_fixed = format) + fixed (byte* label_fixed = label) + { + return PInvoke.DragScalar( + label_fixed, + dataType, + pData_fixed, + vSpeed, + pMin_ptr, + pMax_ptr, + format_fixed, + flags + ); + } + } + } + + public static bool SliderScalar( + ImString label, + ImGuiDataType dataType, + ref T pData, + T pMin, + T pMax, + ImString format = default, + ImGuiSliderFlags flags = default + ) + where T : unmanaged + { + unsafe + { + fixed (byte* format_fixed = format) + fixed (T* pData_fixed = &pData) + fixed (byte* label_fixed = label) + { + return PInvoke.SliderScalar(label_fixed, dataType, pData_fixed, &pMin, &pMax, format_fixed, flags); + } + } + } + + public static bool InputScalar( + ImString label, + ImGuiDataType dataType, + ref T pData, + T? pStep = null, + T? pStepFast = null, + ImString format = default, + ImGuiInputTextFlags flags = default + ) + where T : unmanaged + { + unsafe + { + var pStep_ptr = pStep is { } step_value ? &step_value : null; + var pStepFast_ptr = pStepFast is { } stepFast_value ? &stepFast_value : null; + + fixed (byte* format_fixed = format) + fixed (T* pData_fixed = &pData) + fixed (byte* label_fixed = label) + { + return PInvoke.InputScalar( + label_fixed, + dataType, + pData_fixed, + pStep_ptr, + pStepFast_ptr, + format_fixed, + flags + ); + } + } + } + + public static bool DragScalarN( + ImString label, + ImGuiDataType dataType, + Span pData, + float vSpeed = 1f, + T? pMin = null, + T? pMax = null, + ImString format = default, + ImGuiSliderFlags flags = default + ) + where T : unmanaged + { + unsafe + { + var pMin_ptr = pMin is { } min_value ? &min_value : null; + var pMax_ptr = pMax is { } max_value ? &max_value : null; + + fixed (T* pData_fixed = pData) + fixed (byte* format_fixed = format) + fixed (byte* label_fixed = label) + { + return PInvoke.DragScalarN( + label_fixed, + dataType, + pData_fixed, + pData.Length, + vSpeed, + pMin_ptr, + pMax_ptr, + format_fixed, + flags + ); + } + } + } + + public static bool SliderScalar( + ImString label, + ImGuiDataType dataType, + Span pData, + T pMin, + T pMax, + ImString format = default, + ImGuiSliderFlags flags = default + ) + where T : unmanaged + { + unsafe + { + fixed (byte* format_fixed = format) + fixed (T* pData_fixed = pData) + fixed (byte* label_fixed = label) + { + return PInvoke.SliderScalarN( + label_fixed, + dataType, + pData_fixed, + pData.Length, + &pMin, + &pMax, + format_fixed, + flags + ); + } + } + } + + public static bool InputScalar( + ImString label, + ImGuiDataType dataType, + Span pData, + T? pStep = null, + T? pStepFast = null, + ImString format = default, + ImGuiInputTextFlags flags = default + ) + where T : unmanaged + { + unsafe + { + var pStep_ptr = pStep is { } step_value ? &step_value : null; + var pStepFast_ptr = pStepFast is { } stepFast_value ? &stepFast_value : null; + + fixed (byte* format_fixed = format) + fixed (T* pData_fixed = pData) + fixed (byte* label_fixed = label) + { + return PInvoke.InputScalarN( + label_fixed, + dataType, + pData_fixed, + pData.Length, + pStep_ptr, + pStepFast_ptr, + format_fixed, + flags + ); + } + } + } + + public static float4 ColorConvertHSVtoRGB(float4 hsv) + { + var rgba = new float4 { A = hsv.A }; + ImGui.ColorConvertHSVtoRGB(hsv.X, hsv.Y, hsv.Z, out rgba.X, out rgba.Y, out rgba.Z); + return rgba; + } +} diff --git a/Brutal.ImGui.FreeType/Generated/Enums/ImGuiFreeTypeLoaderFlags.gen.cs b/Brutal.ImGui.FreeType/Generated/Enums/ImGuiFreeTypeLoaderFlags.gen.cs new file mode 100644 index 0000000..8dc29f3 --- /dev/null +++ b/Brutal.ImGui.FreeType/Generated/Enums/ImGuiFreeTypeLoaderFlags.gen.cs @@ -0,0 +1,265 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.FreeType +{ + /// + /// + /// C++: + /// imgui_freetype.h:29 + ///
enum ImGuiFreeTypeLoaderFlags_ + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + [Flags] + public enum ImGuiFreeTypeLoaderFlags : int + { + /// No flags set. + None = 0, + + /// + /// + /// Disable hinting. This generally generates 'blurrier' bitmap glyphs when the glyph are rendered in any of + /// the anti-aliased modes. + /// + /// + /// C++: + /// imgui_freetype.h:31 + ///
ImGuiFreeTypeLoaderFlags_NoHinting = 1 << 0 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + NoHinting = 1 << 0, + + /// + /// + /// Disable auto-hinter. + /// + /// + /// C++: + /// imgui_freetype.h:32 + ///
ImGuiFreeTypeLoaderFlags_NoAutoHint = 1 << 1 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + NoAutoHint = 1 << 1, + + /// + /// + /// Indicates that the auto-hinter is preferred over the font's native hinter. + /// + /// + /// C++: + /// imgui_freetype.h:33 + ///
ImGuiFreeTypeLoaderFlags_ForceAutoHint = 1 << 2 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + ForceAutoHint = 1 << 2, + + /// + /// + /// A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble + /// their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as + /// is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph + /// spacing in horizontal text. + /// + /// + /// C++: + /// imgui_freetype.h:34 + ///
ImGuiFreeTypeLoaderFlags_LightHinting = 1 << 3 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + LightHinting = 1 << 3, + + /// + /// + /// Strong hinting algorithm that should only be used for monochrome output. + /// + /// + /// C++: + /// imgui_freetype.h:35 + ///
ImGuiFreeTypeLoaderFlags_MonoHinting = 1 << 4 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + MonoHinting = 1 << 4, + + /// + /// + /// Styling: Should we artificially embolden the font? + /// + /// + /// C++: + /// imgui_freetype.h:36 + ///
ImGuiFreeTypeLoaderFlags_Bold = 1 << 5 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + Bold = 1 << 5, + + /// + /// + /// Styling: Should we slant the font, emulating italic style? + /// + /// + /// C++: + /// imgui_freetype.h:37 + ///
ImGuiFreeTypeLoaderFlags_Oblique = 1 << 6 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + Oblique = 1 << 6, + + /// + /// + /// Disable anti-aliasing. Combine this with MonoHinting for best results! + /// + /// + /// C++: + /// imgui_freetype.h:38 + ///
ImGuiFreeTypeLoaderFlags_Monochrome = 1 << 7 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + Monochrome = 1 << 7, + + /// + /// + /// Enable FreeType color-layered glyphs + /// + /// + /// C++: + /// imgui_freetype.h:39 + ///
ImGuiFreeTypeLoaderFlags_LoadColor = 1 << 8 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + LoadColor = 1 << 8, + + /// + /// + /// Enable FreeType bitmap glyphs + /// + /// + /// C++: + /// imgui_freetype.h:40 + ///
ImGuiFreeTypeLoaderFlags_Bitmap = 1 << 9 + ///
+ ///
+ /// + /// + /// Hinting greatly impacts visuals (and glyph sizes). + /// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. + /// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h + /// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way. + /// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. + /// You can set those flags globally in ImFontAtlas::FontLoaderFlags + /// You can set those flags on a per font basis in ImFontConfig::FontLoaderFlags + /// + /// + Bitmap = 1 << 9, + } +} diff --git a/Brutal.ImGui.FreeType/Generated/Functions/ImGuiFreeType.gen.cs b/Brutal.ImGui.FreeType/Generated/Functions/ImGuiFreeType.gen.cs new file mode 100644 index 0000000..0e1186b --- /dev/null +++ b/Brutal.ImGui.FreeType/Generated/Functions/ImGuiFreeType.gen.cs @@ -0,0 +1,94 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.FreeType +{ + public partial class ImGuiFreeType + { + /// + /// + /// C++: + /// imgui_freetype.h:67 + /// , + /// imgui.cpp:21595 + ///
const ImFontLoader* GetFontLoader() + ///
+ ///
+ /// + /// + /// This is automatically assigned when using '#define IMGUI_ENABLE_FREETYPE'. + /// If you need to dynamically select between multiple builders: + /// - you can manually assign this builder with 'atlas->SetFontLoader(ImGuiFreeType::GetFontLoader())' + /// - prefer deep-copying this into your own ImFontLoader instance if you use hot-reloading that messes up static data. + /// + /// + public static unsafe ImFontLoaderPtr GetFontLoader() => PInvoke.GetFontLoader(); + + /// + /// + /// C++: + /// imgui_freetype.h:71 + ///
+ /// void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = nullptr) + ///
+ ///
+ /// + /// + /// Override allocators. By default ImGuiFreeType will use IM_ALLOC()/IM_FREE() + /// However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired. + /// + /// + public static unsafe void SetAllocatorFunctions( + ImGuiMemAllocFunc allocFunc, + ImGuiMemFreeFunc freeFunc, + Ptr userData = default + ) => + PInvoke.SetAllocatorFunctions( + Marshal.GetFunctionPointerForDelegate(allocFunc), + Marshal.GetFunctionPointerForDelegate(freeFunc), + userData + ); + + /// + /// + /// C++: + /// imgui_freetype.h:71 + ///
+ /// void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = nullptr) + ///
+ ///
+ /// + /// + /// Override allocators. By default ImGuiFreeType will use IM_ALLOC()/IM_FREE() + /// However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired. + /// + /// + public static unsafe void SetAllocatorFunctions( + delegate* unmanaged[Cdecl] allocFunc, + delegate* unmanaged[Cdecl] freeFunc, + Ptr userData = default + ) => PInvoke.SetAllocatorFunctions((nint)allocFunc, (nint)freeFunc, userData); + + /// + /// + /// C++: + /// imgui_freetype.h:74 + ///
bool DebugEditFontLoaderFlags(ImGuiFreeTypeLoaderFlags* p_font_loader_flags) + ///
+ ///
+ /// + /// + /// Display UI to edit ImFontAtlas::FontLoaderFlags (shared) or ImFontConfig::FontLoaderFlags (single + /// source) + /// + /// + public static unsafe bool DebugEditFontLoaderFlags(ref ImGuiFreeTypeLoaderFlags pFontLoaderFlags) + { + fixed (ImGuiFreeTypeLoaderFlags* pFontLoaderFlags_fixed = &pFontLoaderFlags) + { + return PInvoke.DebugEditFontLoaderFlags(pFontLoaderFlags_fixed); + } + } + } +} diff --git a/Brutal.ImGui.FreeType/Generated/PInvoke/DebugEditFontLoaderFlags.gen.cs b/Brutal.ImGui.FreeType/Generated/PInvoke/DebugEditFontLoaderFlags.gen.cs new file mode 100644 index 0000000..930ffa1 --- /dev/null +++ b/Brutal.ImGui.FreeType/Generated/PInvoke/DebugEditFontLoaderFlags.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.FreeType +{ + public partial class ImGuiFreeType + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_freetype.h:74 + ///
bool DebugEditFontLoaderFlags(ImGuiFreeTypeLoaderFlags* p_font_loader_flags) + ///
+ ///
+ /// + /// + /// Display UI to edit ImFontAtlas::FontLoaderFlags (shared) or ImFontConfig::FontLoaderFlags (single + /// source) + /// + /// + [LibraryImport("imgui_freetype")] + public static unsafe partial Bool8 DebugEditFontLoaderFlags(ImGuiFreeTypeLoaderFlags* p_font_loader_flags); + } + } +} diff --git a/Brutal.ImGui.FreeType/Generated/PInvoke/GetFontLoader.gen.cs b/Brutal.ImGui.FreeType/Generated/PInvoke/GetFontLoader.gen.cs new file mode 100644 index 0000000..ffdf4bd --- /dev/null +++ b/Brutal.ImGui.FreeType/Generated/PInvoke/GetFontLoader.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.FreeType +{ + public partial class ImGuiFreeType + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_freetype.h:67 + /// , + /// imgui.cpp:21595 + ///
const ImFontLoader* GetFontLoader() + ///
+ ///
+ /// + /// + /// This is automatically assigned when using '#define IMGUI_ENABLE_FREETYPE'. + /// If you need to dynamically select between multiple builders: + /// - you can manually assign this builder with 'atlas->SetFontLoader(ImGuiFreeType::GetFontLoader())' + /// - prefer deep-copying this into your own ImFontLoader instance if you use hot-reloading that messes up static data. + /// + /// + [LibraryImport("imgui_freetype")] + public static unsafe partial ImFontLoader* GetFontLoader(); + } + } +} diff --git a/Brutal.ImGui.FreeType/Generated/PInvoke/SetAllocatorFunctions.gen.cs b/Brutal.ImGui.FreeType/Generated/PInvoke/SetAllocatorFunctions.gen.cs new file mode 100644 index 0000000..dfc6790 --- /dev/null +++ b/Brutal.ImGui.FreeType/Generated/PInvoke/SetAllocatorFunctions.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.FreeType +{ + public partial class ImGuiFreeType + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_freetype.h:71 + ///
+ /// void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = nullptr) + ///
+ ///
+ /// + /// + /// Override allocators. By default ImGuiFreeType will use IM_ALLOC()/IM_FREE() + /// However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired. + /// + /// + [LibraryImport("imgui_freetype")] + public static unsafe partial void SetAllocatorFunctions(nint alloc_func, nint free_func, void* user_data); + } + } +} diff --git a/Brutal.ImGui.FreeType/GlobalUsings.cs b/Brutal.ImGui.FreeType/GlobalUsings.cs new file mode 100644 index 0000000..9c11222 --- /dev/null +++ b/Brutal.ImGui.FreeType/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using System.Runtime.InteropServices; +global using Brutal.ImGuiApi; +global using Brutal.Pointers; diff --git a/Brutal.ImGui/Core/VaList.cs b/Brutal.ImGui/Core/VaList.cs new file mode 100644 index 0000000..1e53dcd --- /dev/null +++ b/Brutal.ImGui/Core/VaList.cs @@ -0,0 +1,245 @@ +using System.Globalization; +using CommunityToolkit.HighPerformance; +using Backend32 = System.Int32; +using Backend64 = System.Int64; +using Backend8 = System.Byte; + +namespace Brutal; + +/// An argument meant to be passed to a C++ variadic function, +/// in va_list flavor, eg vprintf. +public readonly struct VariadicArgument +{ + public readonly TypeCode Type; + public readonly Backend64 Value64; + public readonly string? ValueString; + + private VariadicArgument(TypeCode type, Backend64 value) + { + Type = type; + Value64 = value; + } + + public VariadicArgument(string? value) + { + Type = TypeCode.String; + ValueString = value; + } + + public static implicit operator VariadicArgument(Char16 value) => new(TypeCode.Char, (Char8)value); + + public static implicit operator VariadicArgument(int value) => new(TypeCode.Int32, As(value)); + + public static implicit operator VariadicArgument(uint value) => new(TypeCode.UInt32, As(value)); + + public static implicit operator VariadicArgument(long value) => new(TypeCode.Int64, As(value)); + + public static implicit operator VariadicArgument(ulong value) => new(TypeCode.UInt64, As(value)); + + public static implicit operator VariadicArgument(float value) => new(TypeCode.Single, As(value)); + + public static implicit operator VariadicArgument(double value) => + new(TypeCode.Double, As(value)); + + public static implicit operator VariadicArgument(string? arg) => new(arg); + + public static VariadicArgument Convert(object o) => + o switch + { + Char16 v => v, + int v => v, + uint v => v, + long v => v, + ulong v => v, + float v => v, + double v => v, + string v => v, + _ => throw new ArgumentException($"type {o.GetType()} not supported"), + }; + + #region debugging + + Backend8 Value8 => (Backend8)Value64; + Backend32 Value32 => (Backend32)Value64; + + public Char16 AsChar16 => (Char16)Value8; + public int AsInt => As(Value32); + public uint AsUint => As(Value32); + public long AsLong => As(Value64); + public ulong AsUlong => As(Value64); + public float AsFloat => (float)As(Value64); + public double AsDouble => As(Value64); + public string? AsString => ValueString; + + int BackendSize => + Type switch + { + TypeCode.Char => sizeof(Backend8), + + TypeCode.Int32 => sizeof(Backend32), + TypeCode.UInt32 => sizeof(Backend32), + + TypeCode.Int64 => sizeof(Backend64), + TypeCode.UInt64 => sizeof(Backend64), + TypeCode.Single => sizeof(Backend64), + TypeCode.Double => sizeof(Backend64), + + TypeCode.String => sizeof(Backend64), + + _ => throw new ArgumentOutOfRangeException(), + }; + + private int StringSize => ValueString != null ? Utf8.GetByteCount(ValueString) + 1 : 0; + + public int Size => sizeof(Backend64) + StringSize; + + public string ValueToString => + Type switch + { + TypeCode.Char => AsChar16.ToString(), + TypeCode.Int32 => AsInt.ToString(), + TypeCode.UInt32 => AsUint.ToString(), + TypeCode.Int64 => AsLong.ToString(), + TypeCode.UInt64 => AsUlong.ToString(), + TypeCode.Single => AsFloat.ToString(CultureInfo.InvariantCulture), + TypeCode.Double => AsDouble.ToString(CultureInfo.InvariantCulture), + TypeCode.String => AsString ?? "", + _ => throw new ArgumentOutOfRangeException(), + }; + + public override string ToString() + { + return $"{Type} ({BackendSize}): {ValueToString}"; + } + + #endregion + + public void CopyTo(ref Backend64 vaList, ref Span stringBuffer) + { + switch (Type) + { + case TypeCode.Char: + case TypeCode.Int32: + case TypeCode.UInt32: + case TypeCode.Int64: + case TypeCode.UInt64: + case TypeCode.Single: + case TypeCode.Double: + { + vaList = Value64; + return; + } + case TypeCode.String: + { + if (ValueString == null) + return; + + // add the pointer to the string buffer + vaList = (Backend64)stringBuffer.AsPtr(); + + // add the string + var stringSize = Utf8.GetBytes(ValueString, stringBuffer); + stringBuffer[stringSize] = 0; // null-terminator + stringBuffer = stringBuffer[(stringSize + 1)..]; + return; + } + default: + throw new ArgumentOutOfRangeException(nameof(Type), Type, null); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static TTo As(TFrom source) + where TFrom : allows ref struct + where TTo : allows ref struct + { + return Unsafe.As(ref source); + } +} + +/// Utility to interop variadic arguments to a C++ va_list, eg vprintf. +/// Usage: GetSize(), stackalloc, Pack(). +public static class VaList +{ + /* + * va_list ABI layout: + * - [VaListHeader, if Linux / System V ABI] + * (contains a pointer to the argument list below) + * - 64 bits-aligned span of arguments (ints, floats, string pointers, ...) + * (this is the old school C ABI format) + * - [string buffers (if any), each null-terminated] + */ + + private static readonly int headerSize = Platform.IsLinux ? Unsafe.SizeOf() : 0; + + /// Compute the size of a va_list for this set of arguments. + /// stackalloc a byte array of the returned size, and pass it to . + /// The arguments to interop / compute size for. + public static int GetSize(ReadOnlySpan args) + { + var argsSize = headerSize; + foreach (var arg in args) + argsSize += arg.Size; + return argsSize; + } + + /// Pack the given arguments to a va_list that can be interop'd to C++. + /// A buffer you stackalloc'd use the size returned by + /// The arguments to interop / pack. + /// The buffer you passed in, with arguments packed in. + public static Span Pack(Span buffer, ReadOnlySpan args) + { + // argument buffer, 64-bits aligned + var vaListSize = args.Length * sizeof(Backend64); + var vaList = buffer.Slice(headerSize, vaListSize).Cast(); + + // string buffers, if any + var stringBuffer = buffer[(headerSize + vaListSize)..]; + + if (headerSize > 0) + { + unsafe + { + // va_list header, if the platform ABI requires it + ref var header = ref buffer.Cast()[0]; + header = new VaListHeader(vaList.AsPointer()); + } + } + + for (var i = 0; i < args.Length; i++) + { + args[i].CopyTo(ref vaList[i], ref stringBuffer); + } + + return buffer; + } + + /// The va_list structure of System V ABI (Linux x64). + [StructLayout(LayoutKind.Sequential, Pack = 4)] + private readonly unsafe struct VaListHeader + { + private readonly uint gp_offset; + private readonly uint fp_offset; + private readonly void* overflow_arg_area; + private readonly void* reg_save_area; + + /// Wrap the given arguments in a header structure. + /// A pointer to the arguments already packed in C ABI format. + public VaListHeader(void* va_list) + { + /* + * This ABI tries to put arguments in registers if any are left, then pushes the rest on the stack. + * We bypass the register mechanism by maxing out the offsets, then put everything in the overflow area. + * + * Source: https://stackoverflow.com/questions/11695237/creating-va-list-dynamically-in-gcc-can-it-be-done/30632712#30632712 + * The va_args() macro will read from the overflow area: + * - if the gp_offset is greater than or equal to 48 (6 gp registers * 8 bytes/register) + * - and the fp_offset is greater than or equal to 304 (gp_offset +16 fp registers * 16 bytes/register) + */ + gp_offset = 48; + fp_offset = 304; + reg_save_area = null; + overflow_arg_area = va_list; + } + } +} diff --git a/Brutal.ImGui/Generated-Internal/Delegates/ImGuiContextHookCallback.gen.cs b/Brutal.ImGui/Generated-Internal/Delegates/ImGuiContextHookCallback.gen.cs new file mode 100644 index 0000000..2b60765 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Delegates/ImGuiContextHookCallback.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2314 + ///
typedef void (*ImGuiContextHookCallback)(ImGuiContext* ctx, ImGuiContextHook* hook) + ///
+ ///
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void ImGuiContextHookCallback(ImGuiContext* ctx, ImGuiContextHook* hook); +} diff --git a/Brutal.ImGui/Generated-Internal/Delegates/ImGuiErrorCallback.gen.cs b/Brutal.ImGui/Generated-Internal/Delegates/ImGuiErrorCallback.gen.cs new file mode 100644 index 0000000..7b33156 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Delegates/ImGuiErrorCallback.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Function signature for g.ErrorCallback + /// + /// + /// C++: + /// imgui_internal.h:2220 + ///
typedef void (*ImGuiErrorCallback)(ImGuiContext* ctx, void* user_data, const char* msg) + ///
+ ///
+ /// + /// + /// The error callback is currently not public, as it is expected that only advanced users will rely on it. + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void ImGuiErrorCallback(ImGuiContext* ctx, void* user_data, byte* msg); +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiActivateFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiActivateFlags.gen.cs new file mode 100644 index 0000000..2e150b6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiActivateFlags.gen.cs @@ -0,0 +1,87 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1669 + ///
enum ImGuiActivateFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiActivateFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1671 + ///
ImGuiActivateFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// Favor activation that requires keyboard text input (e.g. for Slider/Drag). Default for Enter key. + /// + /// + /// C++: + /// imgui_internal.h:1672 + ///
ImGuiActivateFlags_PreferInput = 1 << 0 + ///
+ ///
+ PreferInput = 1 << 0, + + /// + /// + /// Favor activation for tweaking with arrows or gamepad (e.g. for Slider/Drag). Default for Space key and + /// if keyboard is not used. + /// + /// + /// C++: + /// imgui_internal.h:1673 + ///
ImGuiActivateFlags_PreferTweak = 1 << 1 + ///
+ ///
+ PreferTweak = 1 << 1, + + /// + /// + /// Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection) + /// + /// + /// C++: + /// imgui_internal.h:1674 + ///
ImGuiActivateFlags_TryToPreserveState = 1 << 2 + ///
+ ///
+ TryToPreserveState = 1 << 2, + + /// + /// + /// Activation requested by a tabbing request + /// + /// + /// C++: + /// imgui_internal.h:1675 + ///
ImGuiActivateFlags_FromTabbing = 1 << 3 + ///
+ ///
+ FromTabbing = 1 << 3, + + /// + /// + /// Activation requested by an item shortcut via SetNextItemShortcut() function. + /// + /// + /// C++: + /// imgui_internal.h:1676 + ///
ImGuiActivateFlags_FromShortcut = 1 << 4 + ///
+ ///
+ FromShortcut = 1 << 4, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiAxis.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiAxis.gen.cs new file mode 100644 index 0000000..d46a175 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiAxis.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1134 + ///
enum ImGuiAxis + ///
+ ///
+ /// + /// + /// X/Y enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + public enum ImGuiAxis : int + { + /// + /// + /// C++: + /// imgui_internal.h:1136 + ///
ImGuiAxis_None = -1 + ///
+ ///
+ /// + /// + /// X/Y enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + None = -1, + + /// + /// + /// C++: + /// imgui_internal.h:1137 + ///
ImGuiAxis_X = 0 + ///
+ ///
+ /// + /// + /// X/Y enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + X = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1138 + ///
ImGuiAxis_Y = 1 + ///
+ ///
+ /// + /// + /// X/Y enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + Y = 1, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiButtonFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiButtonFlagsPrivate.gen.cs new file mode 100644 index 0000000..f3d8d32 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiButtonFlagsPrivate.gen.cs @@ -0,0 +1,435 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1020 + ///
enum ImGuiButtonFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + public enum ImGuiButtonFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1916 + ///
ImGuiButtonFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + None = ImGuiButtonFlags.None, + + /// + /// + /// React on left mouse button (default) + /// + /// + /// C++: + /// imgui.h:1917 + ///
ImGuiButtonFlags_MouseButtonLeft = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonLeft = ImGuiButtonFlags.MouseButtonLeft, + + /// + /// + /// React on right mouse button + /// + /// + /// C++: + /// imgui.h:1918 + ///
ImGuiButtonFlags_MouseButtonRight = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonRight = ImGuiButtonFlags.MouseButtonRight, + + /// + /// + /// React on center mouse button + /// + /// + /// C++: + /// imgui.h:1919 + ///
ImGuiButtonFlags_MouseButtonMiddle = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonMiddle = ImGuiButtonFlags.MouseButtonMiddle, + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:1920 + ///
+ /// ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonMask = ImGuiButtonFlags.MouseButtonMask, + + /// + /// + /// InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default. + /// + /// + /// C++: + /// imgui.h:1921 + ///
ImGuiButtonFlags_EnableNav = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + EnableNav = ImGuiButtonFlags.EnableNav, + + /// + /// + /// return true on click (mouse down event) + /// + /// + /// C++: + /// imgui_internal.h:1022 + ///
ImGuiButtonFlags_PressedOnClick = 1 << 4 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnClick = 1 << 4, + + /// + /// + /// [Default] return true on click + release on same item <-- this is what the majority of Button are + /// using + /// + /// + /// C++: + /// imgui_internal.h:1023 + ///
ImGuiButtonFlags_PressedOnClickRelease = 1 << 5 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnClickRelease = 1 << 5, + + /// + /// + /// return true on click + release even if the release event is not done while hovering the item + /// + /// + /// C++: + /// imgui_internal.h:1024 + ///
ImGuiButtonFlags_PressedOnClickReleaseAnywhere = 1 << 6 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnClickReleaseAnywhere = 1 << 6, + + /// + /// + /// return true on release (default requires click+release) + /// + /// + /// C++: + /// imgui_internal.h:1025 + ///
ImGuiButtonFlags_PressedOnRelease = 1 << 7 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnRelease = 1 << 7, + + /// + /// + /// return true on double-click (default requires click+release) + /// + /// + /// C++: + /// imgui_internal.h:1026 + ///
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 8 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnDoubleClick = 1 << 8, + + /// + /// + /// return true when held into while we are drag and dropping another item (used by e.g. tree nodes, + /// collapsing headers) + /// + /// + /// C++: + /// imgui_internal.h:1027 + ///
ImGuiButtonFlags_PressedOnDragDropHold = 1 << 9 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnDragDropHold = 1 << 9, + + /// + /// + /// allow interactions even if a child window is overlapping + /// + /// + /// C++: + /// imgui_internal.h:1029 + ///
ImGuiButtonFlags_FlattenChildren = 1 << 11 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + FlattenChildren = 1 << 11, + + /// + /// + /// require previous frame HoveredId to either match id or be null before being usable. + /// + /// + /// C++: + /// imgui_internal.h:1030 + ///
ImGuiButtonFlags_AllowOverlap = 1 << 12 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + AllowOverlap = 1 << 12, + + /// + /// + /// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled + /// by SmallButton(), not possible currently because of DC.CursorPosPrevLine + /// + /// + /// C++: + /// imgui_internal.h:1033 + ///
ImGuiButtonFlags_AlignTextBaseLine = 1 << 15 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + AlignTextBaseLine = 1 << 15, + + /// + /// + /// disable mouse interaction if a key modifier is held + /// + /// + /// C++: + /// imgui_internal.h:1034 + ///
ImGuiButtonFlags_NoKeyModsAllowed = 1 << 16 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoKeyModsAllowed = 1 << 16, + + /// + /// + /// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only) + /// + /// + /// C++: + /// imgui_internal.h:1035 + ///
ImGuiButtonFlags_NoHoldingActiveId = 1 << 17 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoHoldingActiveId = 1 << 17, + + /// + /// + /// don't override navigation focus when activated (FIXME: this is essentially used every time an item uses + /// ImGuiItemFlags_NoNav, but because legacy specs don't requires LastItemData to be set ButtonBehavior(), + /// we can't poll g.LastItemData.ItemFlags) + /// + /// + /// C++: + /// imgui_internal.h:1036 + ///
ImGuiButtonFlags_NoNavFocus = 1 << 18 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoNavFocus = 1 << 18, + + /// + /// + /// don't report as hovered when nav focus is on this item + /// + /// + /// C++: + /// imgui_internal.h:1037 + ///
ImGuiButtonFlags_NoHoveredOnFocus = 1 << 19 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoHoveredOnFocus = 1 << 19, + + /// + /// + /// don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question + /// will be ImGuiKey_MouseLeft!) + /// + /// + /// C++: + /// imgui_internal.h:1038 + ///
ImGuiButtonFlags_NoSetKeyOwner = 1 << 20 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoSetKeyOwner = 1 << 20, + + /// + /// + /// don't test key/input owner when polling the key (note: mouse buttons are keys! often, the key in + /// question will be ImGuiKey_MouseLeft!) + /// + /// + /// C++: + /// imgui_internal.h:1039 + ///
ImGuiButtonFlags_NoTestKeyOwner = 1 << 21 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoTestKeyOwner = 1 << 21, + + /// + /// + /// [EXPERIMENTAL: Not very well specced]. Don't focus parent window when clicking. + /// + /// + /// C++: + /// imgui_internal.h:1040 + ///
ImGuiButtonFlags_NoFocus = 1 << 22 + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + NoFocus = 1 << 22, + + /// + /// + /// C++: + /// imgui_internal.h:1041 + ///
+ /// ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnMask = + PressedOnClick + | PressedOnClickRelease + | PressedOnClickReleaseAnywhere + | PressedOnRelease + | PressedOnDoubleClick + | PressedOnDragDropHold, + + /// + /// + /// C++: + /// imgui_internal.h:1042 + ///
ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease + ///
+ ///
+ /// + /// + /// Extend ImGuiButtonFlags_ + /// + /// + PressedOnDefault = PressedOnClickRelease, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiComboFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiComboFlagsPrivate.gen.cs new file mode 100644 index 0000000..4d2c59b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiComboFlagsPrivate.gen.cs @@ -0,0 +1,204 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1047 + ///
enum ImGuiComboFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiComboFlags_ + /// + /// + public enum ImGuiComboFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1396 + ///
ImGuiComboFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + None = ImGuiComboFlags.None, + + /// + /// + /// Align the popup toward the left by default + /// + /// + /// C++: + /// imgui.h:1397 + ///
ImGuiComboFlags_PopupAlignLeft = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + PopupAlignLeft = ImGuiComboFlags.PopupAlignLeft, + + /// + /// + /// Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use + /// SetNextWindowSizeConstraints() prior to calling BeginCombo() + /// + /// + /// C++: + /// imgui.h:1398 + ///
ImGuiComboFlags_HeightSmall = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightSmall = ImGuiComboFlags.HeightSmall, + + /// + /// + /// Max ~8 items visible (default) + /// + /// + /// C++: + /// imgui.h:1399 + ///
ImGuiComboFlags_HeightRegular = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightRegular = ImGuiComboFlags.HeightRegular, + + /// + /// + /// Max ~20 items visible + /// + /// + /// C++: + /// imgui.h:1400 + ///
ImGuiComboFlags_HeightLarge = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightLarge = ImGuiComboFlags.HeightLarge, + + /// + /// + /// As many fitting items as possible + /// + /// + /// C++: + /// imgui.h:1401 + ///
ImGuiComboFlags_HeightLargest = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightLargest = ImGuiComboFlags.HeightLargest, + + /// + /// + /// Display on the preview box without the square arrow button + /// + /// + /// C++: + /// imgui.h:1402 + ///
ImGuiComboFlags_NoArrowButton = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + NoArrowButton = ImGuiComboFlags.NoArrowButton, + + /// + /// + /// Display only a square arrow button + /// + /// + /// C++: + /// imgui.h:1403 + ///
ImGuiComboFlags_NoPreview = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + NoPreview = ImGuiComboFlags.NoPreview, + + /// + /// + /// Width dynamically calculated from preview contents + /// + /// + /// C++: + /// imgui.h:1404 + ///
ImGuiComboFlags_WidthFitPreview = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + WidthFitPreview = ImGuiComboFlags.WidthFitPreview, + + /// + /// + /// C++: + /// imgui.h:1405 + ///
+ /// ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightMask = ImGuiComboFlags.HeightMask, + + /// + /// + /// enable BeginComboPreview() + /// + /// + /// C++: + /// imgui_internal.h:1049 + ///
ImGuiComboFlags_CustomPreview = 1 << 20 + ///
+ ///
+ /// + /// + /// Extend ImGuiComboFlags_ + /// + /// + CustomPreview = 1 << 20, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiContextHookType.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiContextHookType.gen.cs new file mode 100644 index 0000000..74b6e02 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiContextHookType.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
+ /// enum ImGuiContextHookType { ImGuiContextHookType_NewFramePre, ImGuiContextHookType_NewFramePost, ImGuiContextHookType_EndFramePre, ImGuiContextHookType_EndFramePost, ImGuiContextHookType_RenderPre, ImGuiContextHookType_RenderPost, ImGuiContextHookType_Shutdown, ImGuiContextHookType_PendingRemoval_ } + ///
+ ///
+ public enum ImGuiContextHookType : int + { + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_NewFramePre + ///
+ ///
+ NewFramePre, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_NewFramePost + ///
+ ///
+ NewFramePost, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_EndFramePre + ///
+ ///
+ EndFramePre, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_EndFramePost + ///
+ ///
+ EndFramePost, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_RenderPre + ///
+ ///
+ RenderPre, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_RenderPost + ///
+ ///
+ RenderPost, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_Shutdown + ///
+ ///
+ Shutdown, + + /// + /// + /// C++: + /// imgui_internal.h:2315 + ///
ImGuiContextHookType_PendingRemoval_ + ///
+ ///
+ PendingRemoval, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiDataAuthority.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDataAuthority.gen.cs new file mode 100644 index 0000000..0afa68c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDataAuthority.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1972 + ///
enum ImGuiDataAuthority_ + ///
+ ///
+ /// + /// + /// Store the source authority (dock node vs window) of a field + /// + /// + public enum ImGuiDataAuthority : int + { + /// + /// + /// C++: + /// imgui_internal.h:1974 + ///
ImGuiDataAuthority_Auto + ///
+ ///
+ /// + /// + /// Store the source authority (dock node vs window) of a field + /// + /// + Auto, + + /// + /// + /// C++: + /// imgui_internal.h:1975 + ///
ImGuiDataAuthority_DockNode + ///
+ ///
+ /// + /// + /// Store the source authority (dock node vs window) of a field + /// + /// + DockNode, + + /// + /// + /// C++: + /// imgui_internal.h:1976 + ///
ImGuiDataAuthority_Window + ///
+ ///
+ /// + /// + /// Store the source authority (dock node vs window) of a field + /// + /// + Window, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiDataTypePrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDataTypePrivate.gen.cs new file mode 100644 index 0000000..f3a0741 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDataTypePrivate.gen.cs @@ -0,0 +1,267 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:938 + ///
enum ImGuiDataTypePrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiDataType_ + /// + /// + public enum ImGuiDataTypePrivate : int + { + /// + /// + /// signed char / char (with sensible compilers) + /// + /// + /// C++: + /// imgui.h:1551 + ///
ImGuiDataType_S8 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S8 = ImGuiDataType.S8, + + /// + /// + /// unsigned char + /// + /// + /// C++: + /// imgui.h:1552 + ///
ImGuiDataType_U8 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U8 = ImGuiDataType.U8, + + /// + /// + /// short + /// + /// + /// C++: + /// imgui.h:1553 + ///
ImGuiDataType_S16 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S16 = ImGuiDataType.S16, + + /// + /// + /// unsigned short + /// + /// + /// C++: + /// imgui.h:1554 + ///
ImGuiDataType_U16 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U16 = ImGuiDataType.U16, + + /// + /// + /// int + /// + /// + /// C++: + /// imgui.h:1555 + ///
ImGuiDataType_S32 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S32 = ImGuiDataType.S32, + + /// + /// + /// unsigned int + /// + /// + /// C++: + /// imgui.h:1556 + ///
ImGuiDataType_U32 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U32 = ImGuiDataType.U32, + + /// + /// + /// long long / __int64 + /// + /// + /// C++: + /// imgui.h:1557 + ///
ImGuiDataType_S64 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S64 = ImGuiDataType.S64, + + /// + /// + /// unsigned long long / unsigned __int64 + /// + /// + /// C++: + /// imgui.h:1558 + ///
ImGuiDataType_U64 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U64 = ImGuiDataType.U64, + + /// + /// + /// float + /// + /// + /// C++: + /// imgui.h:1559 + ///
ImGuiDataType_Float + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + Float = ImGuiDataType.Float, + + /// + /// + /// double + /// + /// + /// C++: + /// imgui.h:1560 + ///
ImGuiDataType_Double + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + Double = ImGuiDataType.Double, + + /// + /// + /// bool (provided for user convenience, not supported by scalar widgets) + /// + /// + /// C++: + /// imgui.h:1561 + ///
ImGuiDataType_Bool + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + Bool = ImGuiDataType.Bool, + + /// + /// + /// char* (provided for user convenience, not supported by scalar widgets) + /// + /// + /// C++: + /// imgui.h:1562 + ///
ImGuiDataType_String + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + String = ImGuiDataType.String, + + /// + /// + /// C++: + /// imgui.h:1563 + ///
ImGuiDataType_COUNT + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + COUNT = ImGuiDataType.COUNT, + + /// + /// + /// C++: + /// imgui_internal.h:940 + ///
ImGuiDataType_Pointer = ImGuiDataType_COUNT + ///
+ ///
+ /// + /// + /// Extend ImGuiDataType_ + /// + /// + Pointer = ImGuiDataType.COUNT, + + /// + /// + /// C++: + /// imgui_internal.h:941 + ///
ImGuiDataType_ID + ///
+ ///
+ /// + /// + /// Extend ImGuiDataType_ + /// + /// + ID, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiDebugLogFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDebugLogFlags.gen.cs new file mode 100644 index 0000000..dae426e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDebugLogFlags.gen.cs @@ -0,0 +1,253 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2227 + ///
enum ImGuiDebugLogFlags_ + ///
+ ///
+ /// + /// + /// See IMGUI_DEBUG_LOG() and IMGUI_DEBUG_LOG_XXX() macros. + /// + /// + [Flags] + public enum ImGuiDebugLogFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:2230 + ///
ImGuiDebugLogFlags_None = 0 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + None = 0, + + /// + /// + /// Error submitted by IM_ASSERT_USER_ERROR() + /// + /// + /// C++: + /// imgui_internal.h:2231 + ///
ImGuiDebugLogFlags_EventError = 1 << 0 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventError = 1 << 0, + + /// + /// + /// C++: + /// imgui_internal.h:2232 + ///
ImGuiDebugLogFlags_EventActiveId = 1 << 1 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventActiveId = 1 << 1, + + /// + /// + /// C++: + /// imgui_internal.h:2233 + ///
ImGuiDebugLogFlags_EventFocus = 1 << 2 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventFocus = 1 << 2, + + /// + /// + /// C++: + /// imgui_internal.h:2234 + ///
ImGuiDebugLogFlags_EventPopup = 1 << 3 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventPopup = 1 << 3, + + /// + /// + /// C++: + /// imgui_internal.h:2235 + ///
ImGuiDebugLogFlags_EventNav = 1 << 4 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventNav = 1 << 4, + + /// + /// + /// C++: + /// imgui_internal.h:2236 + ///
ImGuiDebugLogFlags_EventClipper = 1 << 5 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventClipper = 1 << 5, + + /// + /// + /// C++: + /// imgui_internal.h:2237 + ///
ImGuiDebugLogFlags_EventSelection = 1 << 6 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventSelection = 1 << 6, + + /// + /// + /// C++: + /// imgui_internal.h:2238 + ///
ImGuiDebugLogFlags_EventIO = 1 << 7 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventIO = 1 << 7, + + /// + /// + /// C++: + /// imgui_internal.h:2239 + ///
ImGuiDebugLogFlags_EventFont = 1 << 8 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventFont = 1 << 8, + + /// + /// + /// C++: + /// imgui_internal.h:2240 + ///
ImGuiDebugLogFlags_EventInputRouting = 1 << 9 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventInputRouting = 1 << 9, + + /// + /// + /// C++: + /// imgui_internal.h:2241 + ///
ImGuiDebugLogFlags_EventDocking = 1 << 10 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventDocking = 1 << 10, + + /// + /// + /// C++: + /// imgui_internal.h:2242 + ///
ImGuiDebugLogFlags_EventViewport = 1 << 11 + ///
+ ///
+ /// + /// + /// Event types + /// + /// + EventViewport = 1 << 11, + + /// + /// + /// C++: + /// imgui_internal.h:2244 + ///
+ /// ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventError | ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventFont | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport + ///
+ ///
+ EventMask = + EventError + | EventActiveId + | EventFocus + | EventPopup + | EventNav + | EventClipper + | EventSelection + | EventIO + | EventFont + | EventInputRouting + | EventDocking + | EventViewport, + + /// + /// + /// Also send output to TTY + /// + /// + /// C++: + /// imgui_internal.h:2245 + ///
ImGuiDebugLogFlags_OutputToTTY = 1 << 20 + ///
+ ///
+ OutputToTTY = 1 << 20, + + /// + /// + /// Also send output to Test Engine + /// + /// + /// C++: + /// imgui_internal.h:2246 + ///
ImGuiDebugLogFlags_OutputToTestEngine = 1 << 21 + ///
+ ///
+ OutputToTestEngine = 1 << 21, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeFlagsPrivate.gen.cs new file mode 100644 index 0000000..35ff0eb --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeFlagsPrivate.gen.cs @@ -0,0 +1,498 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1940 + ///
enum ImGuiDockNodeFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiDockNodeFlags_ + /// + /// + public enum ImGuiDockNodeFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1504 + ///
ImGuiDockNodeFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + None = ImGuiDockNodeFlags.None, + + /// + /// + /// // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be + /// undocked. + /// + /// + /// C++: + /// imgui.h:1505 + ///
ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + KeepAliveOnly = ImGuiDockNodeFlags.KeepAliveOnly, + + /// + /// + /// // Disable docking over the Central Node, which will be always kept empty. + /// + /// + /// C++: + /// imgui.h:1507 + ///
ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoDockingOverCentralNode = ImGuiDockNodeFlags.NoDockingOverCentralNode, + + /// + /// + /// // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering + /// everything excepted the Central Node when empty. Meaning the host window should probably use + /// SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs + /// pass-through + won't display a DockingEmptyBg background. See demo for details. + /// + /// + /// C++: + /// imgui.h:1508 + ///
ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + PassthruCentralNode = ImGuiDockNodeFlags.PassthruCentralNode, + + /// + /// + /// // Disable other windows/nodes from splitting this node. + /// + /// + /// C++: + /// imgui.h:1509 + ///
ImGuiDockNodeFlags_NoDockingSplit = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoDockingSplit = ImGuiDockNodeFlags.NoDockingSplit, + + /// + /// + /// Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup + /// dockspaces. + /// + /// + /// C++: + /// imgui.h:1510 + ///
ImGuiDockNodeFlags_NoResize = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoResize = ImGuiDockNodeFlags.NoResize, + + /// + /// + /// // Tab bar will automatically hide when there is a single window in the dock node. + /// + /// + /// C++: + /// imgui.h:1511 + ///
ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + AutoHideTabBar = ImGuiDockNodeFlags.AutoHideTabBar, + + /// + /// + /// // Disable undocking this node. + /// + /// + /// C++: + /// imgui.h:1512 + ///
ImGuiDockNodeFlags_NoUndocking = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoUndocking = ImGuiDockNodeFlags.NoUndocking, + + /// + /// + /// Saved // A dockspace is a node that occupy space within an existing user window. Otherwise the node is + /// floating and create its own window. + /// + /// + /// C++: + /// imgui_internal.h:1943 + ///
ImGuiDockNodeFlags_DockSpace = 1 << 10 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + DockSpace = 1 << 10, + + /// + /// + /// Saved // The central node has 2 main properties: stay visible when empty, only use "remaining" spaces + /// from its neighbor. + /// + /// + /// C++: + /// imgui_internal.h:1944 + ///
ImGuiDockNodeFlags_CentralNode = 1 << 11 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + CentralNode = 1 << 11, + + /// + /// + /// Saved // Tab bar is completely unavailable. No triangle in the corner to enable it back. + /// + /// + /// C++: + /// imgui_internal.h:1945 + ///
ImGuiDockNodeFlags_NoTabBar = 1 << 12 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + NoTabBar = 1 << 12, + + /// + /// + /// Saved // Tab bar is hidden, with a triangle in the corner to show it again (NB: actual tab-bar instance + /// may be destroyed as this is only used for single-window tab bar) + /// + /// + /// C++: + /// imgui_internal.h:1946 + ///
ImGuiDockNodeFlags_HiddenTabBar = 1 << 13 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + HiddenTabBar = 1 << 13, + + /// + /// + /// Saved // Disable window/docking menu (that one that appears instead of the collapse button) + /// + /// + /// C++: + /// imgui_internal.h:1947 + ///
ImGuiDockNodeFlags_NoWindowMenuButton = 1 << 14 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + NoWindowMenuButton = 1 << 14, + + /// + /// + /// Saved // Disable close button + /// + /// + /// C++: + /// imgui_internal.h:1948 + ///
ImGuiDockNodeFlags_NoCloseButton = 1 << 15 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + NoCloseButton = 1 << 15, + + /// + /// + /// // + /// + /// + /// C++: + /// imgui_internal.h:1949 + ///
ImGuiDockNodeFlags_NoResizeX = 1 << 16 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + NoResizeX = 1 << 16, + + /// + /// + /// // + /// + /// + /// C++: + /// imgui_internal.h:1950 + ///
ImGuiDockNodeFlags_NoResizeY = 1 << 17 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + NoResizeY = 1 << 17, + + /// + /// + /// // Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute + /// set to this) so Shortcut() in this window can run when any docked window is focused. + /// + /// + /// C++: + /// imgui_internal.h:1951 + ///
ImGuiDockNodeFlags_DockedWindowsInFocusRoute= 1 << 18 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + DockedWindowsInFocusRoute = 1 << 18, + + /// + /// + /// // Disable this node from splitting other windows/nodes. + /// + /// + /// C++: + /// imgui_internal.h:1956 + ///
ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 19 + ///
+ ///
+ /// + /// + /// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) + /// Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. + /// The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. + /// + /// + NoDockingSplitOther = 1 << 19, + + /// + /// + /// // Disable other windows/nodes from being docked over this node. + /// + /// + /// C++: + /// imgui_internal.h:1957 + ///
ImGuiDockNodeFlags_NoDockingOverMe = 1 << 20 + ///
+ ///
+ /// + /// + /// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) + /// Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. + /// The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. + /// + /// + NoDockingOverMe = 1 << 20, + + /// + /// + /// // Disable this node from being docked over another window or non-empty node. + /// + /// + /// C++: + /// imgui_internal.h:1958 + ///
ImGuiDockNodeFlags_NoDockingOverOther = 1 << 21 + ///
+ ///
+ /// + /// + /// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) + /// Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. + /// The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. + /// + /// + NoDockingOverOther = 1 << 21, + + /// + /// + /// // Disable this node from being docked over an empty node (e.g. DockSpace with no other windows) + /// + /// + /// C++: + /// imgui_internal.h:1959 + ///
ImGuiDockNodeFlags_NoDockingOverEmpty = 1 << 22 + ///
+ ///
+ /// + /// + /// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) + /// Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. + /// The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. + /// + /// + NoDockingOverEmpty = 1 << 22, + + /// + /// + /// C++: + /// imgui_internal.h:1960 + ///
+ /// ImGuiDockNodeFlags_NoDocking = ImGuiDockNodeFlags_NoDockingOverMe | ImGuiDockNodeFlags_NoDockingOverOther | ImGuiDockNodeFlags_NoDockingOverEmpty | ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoDockingSplitOther + ///
+ ///
+ /// + /// + /// Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) + /// Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. + /// The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. + /// + /// + NoDocking = + NoDockingOverMe + | NoDockingOverOther + | NoDockingOverEmpty + | ImGuiDockNodeFlags.NoDockingSplit + | NoDockingSplitOther, + + /// + /// + /// C++: + /// imgui_internal.h:1963 + ///
ImGuiDockNodeFlags_SharedFlagsInheritMask_ = ~0 + ///
+ ///
+ /// + /// + /// Masks + /// + /// + SharedFlagsInheritMask = ~0, + + /// + /// + /// C++: + /// imgui_internal.h:1964 + ///
+ /// ImGuiDockNodeFlags_NoResizeFlagsMask_ = (int)ImGuiDockNodeFlags_NoResize | ImGuiDockNodeFlags_NoResizeX | ImGuiDockNodeFlags_NoResizeY + ///
+ ///
+ /// + /// + /// Masks + /// + /// + NoResizeFlagsMask = ImGuiDockNodeFlags.NoResize | NoResizeX | NoResizeY, + + /// + /// + /// C++: + /// imgui_internal.h:1967 + ///
+ /// ImGuiDockNodeFlags_LocalFlagsTransferMask_ = (int)ImGuiDockNodeFlags_NoDockingSplit | ImGuiDockNodeFlags_NoResizeFlagsMask_ | (int)ImGuiDockNodeFlags_AutoHideTabBar | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton + ///
+ ///
+ /// + /// + /// When splitting, those local flags are moved to the inheriting child, never duplicated + /// + /// + LocalFlagsTransferMask = + ImGuiDockNodeFlags.NoDockingSplit + | NoResizeFlagsMask + | ImGuiDockNodeFlags.AutoHideTabBar + | CentralNode + | NoTabBar + | HiddenTabBar + | NoWindowMenuButton + | NoCloseButton, + + /// + /// + /// C++: + /// imgui_internal.h:1968 + ///
+ /// ImGuiDockNodeFlags_SavedFlagsMask_ = ImGuiDockNodeFlags_NoResizeFlagsMask_ | ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_CentralNode | ImGuiDockNodeFlags_NoTabBar | ImGuiDockNodeFlags_HiddenTabBar | ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton + ///
+ ///
+ /// + /// + /// When splitting, those local flags are moved to the inheriting child, never duplicated + /// + /// + SavedFlagsMask = + NoResizeFlagsMask | DockSpace | CentralNode | NoTabBar | HiddenTabBar | NoWindowMenuButton | NoCloseButton, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeState.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeState.gen.cs new file mode 100644 index 0000000..214fb39 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiDockNodeState.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1979 + ///
enum ImGuiDockNodeState + ///
+ ///
+ public enum ImGuiDockNodeState : int + { + /// + /// + /// C++: + /// imgui_internal.h:1981 + ///
ImGuiDockNodeState_Unknown + ///
+ ///
+ Unknown, + + /// + /// + /// C++: + /// imgui_internal.h:1982 + ///
ImGuiDockNodeState_HostWindowHiddenBecauseSingleWindow + ///
+ ///
+ HostWindowHiddenBecauseSingleWindow, + + /// + /// + /// C++: + /// imgui_internal.h:1983 + ///
ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing + ///
+ ///
+ HostWindowHiddenBecauseWindowsAreResizing, + + /// + /// + /// C++: + /// imgui_internal.h:1984 + ///
ImGuiDockNodeState_HostWindowVisible + ///
+ ///
+ HostWindowVisible, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiFocusRequestFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiFocusRequestFlags.gen.cs new file mode 100644 index 0000000..2f8db27 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiFocusRequestFlags.gen.cs @@ -0,0 +1,78 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1094 + ///
enum ImGuiFocusRequestFlags_ + ///
+ ///
+ /// + /// + /// Flags for FocusWindow(). This is not called ImGuiFocusFlags to avoid confusion with public-facing ImGuiFocusedFlags. + /// FIXME: Once we finishing replacing more uses of GetTopMostPopupModal()+IsWindowWithinBeginStackOf() + /// and FindBlockingModal() with this, we may want to change the flag to be opt-out instead of opt-in. + /// + /// + [Flags] + public enum ImGuiFocusRequestFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1096 + ///
ImGuiFocusRequestFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for FocusWindow(). This is not called ImGuiFocusFlags to avoid confusion with public-facing ImGuiFocusedFlags. + /// FIXME: Once we finishing replacing more uses of GetTopMostPopupModal()+IsWindowWithinBeginStackOf() + /// and FindBlockingModal() with this, we may want to change the flag to be opt-out instead of opt-in. + /// + /// + None = 0, + + /// + /// + /// Find last focused child (if any) and focus it instead. + /// + /// + /// C++: + /// imgui_internal.h:1097 + ///
ImGuiFocusRequestFlags_RestoreFocusedChild = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for FocusWindow(). This is not called ImGuiFocusFlags to avoid confusion with public-facing ImGuiFocusedFlags. + /// FIXME: Once we finishing replacing more uses of GetTopMostPopupModal()+IsWindowWithinBeginStackOf() + /// and FindBlockingModal() with this, we may want to change the flag to be opt-out instead of opt-in. + /// + /// + RestoreFocusedChild = 1 << 0, + + /// + /// + /// Do not set focus if the window is below a modal. + /// + /// + /// C++: + /// imgui_internal.h:1098 + ///
ImGuiFocusRequestFlags_UnlessBelowModal = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for FocusWindow(). This is not called ImGuiFocusFlags to avoid confusion with public-facing ImGuiFocusedFlags. + /// FIXME: Once we finishing replacing more uses of GetTopMostPopupModal()+IsWindowWithinBeginStackOf() + /// and FindBlockingModal() with this, we may want to change the flag to be opt-out instead of opt-in. + /// + /// + UnlessBelowModal = 1 << 1, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiHoveredFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiHoveredFlagsPrivate.gen.cs new file mode 100644 index 0000000..a76e7b7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiHoveredFlagsPrivate.gen.cs @@ -0,0 +1,494 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1003 + ///
enum ImGuiHoveredFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiHoveredFlags_ + /// + /// + public enum ImGuiHoveredFlagsPrivate : int + { + /// + /// + /// Return true if directly over the item/window, not obstructed by another window, not obstructed by an + /// active popup or modal blocking inputs under them. + /// + /// + /// C++: + /// imgui.h:1464 + ///
ImGuiHoveredFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + None = ImGuiHoveredFlags.None, + + /// + /// + /// IsWindowHovered() only: Return true if any children of the window is hovered + /// + /// + /// C++: + /// imgui.h:1465 + ///
ImGuiHoveredFlags_ChildWindows = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + ChildWindows = ImGuiHoveredFlags.ChildWindows, + + /// + /// + /// IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) + /// + /// + /// C++: + /// imgui.h:1466 + ///
ImGuiHoveredFlags_RootWindow = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + RootWindow = ImGuiHoveredFlags.RootWindow, + + /// + /// + /// IsWindowHovered() only: Return true if any window is hovered + /// + /// + /// C++: + /// imgui.h:1467 + ///
ImGuiHoveredFlags_AnyWindow = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AnyWindow = ImGuiHoveredFlags.AnyWindow, + + /// + /// + /// IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) + /// (when used with _ChildWindows or _RootWindow) + /// + /// + /// C++: + /// imgui.h:1468 + ///
ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + NoPopupHierarchy = ImGuiHoveredFlags.NoPopupHierarchy, + + /// + /// + /// IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) + /// (when used with _ChildWindows or _RootWindow) + /// + /// + /// C++: + /// imgui.h:1469 + ///
ImGuiHoveredFlags_DockHierarchy = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + DockHierarchy = ImGuiHoveredFlags.DockHierarchy, + + /// + /// + /// Return true even if a popup window is normally blocking access to this item/window + /// + /// + /// C++: + /// imgui.h:1470 + ///
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenBlockedByPopup = ImGuiHoveredFlags.AllowWhenBlockedByPopup, + + /// + /// + /// Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop + /// patterns. + /// + /// + /// C++: + /// imgui.h:1472 + ///
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenBlockedByActiveItem = ImGuiHoveredFlags.AllowWhenBlockedByActiveItem, + + /// + /// + /// IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another + /// hoverable item. + /// + /// + /// C++: + /// imgui.h:1473 + ///
ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenOverlappedByItem = ImGuiHoveredFlags.AllowWhenOverlappedByItem, + + /// + /// + /// IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window. + /// + /// + /// C++: + /// imgui.h:1474 + ///
ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenOverlappedByWindow = ImGuiHoveredFlags.AllowWhenOverlappedByWindow, + + /// + /// + /// IsItemHovered() only: Return true even if the item is disabled + /// + /// + /// C++: + /// imgui.h:1475 + ///
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenDisabled = ImGuiHoveredFlags.AllowWhenDisabled, + + /// + /// + /// IsItemHovered() only: Disable using keyboard/gamepad navigation state when active, always query mouse + /// + /// + /// C++: + /// imgui.h:1476 + ///
ImGuiHoveredFlags_NoNavOverride = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + NoNavOverride = ImGuiHoveredFlags.NoNavOverride, + + /// + /// + /// C++: + /// imgui.h:1477 + ///
+ /// ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenOverlapped = ImGuiHoveredFlags.AllowWhenOverlapped, + + /// + /// + /// C++: + /// imgui.h:1478 + ///
+ /// ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + RectOnly = ImGuiHoveredFlags.RectOnly, + + /// + /// + /// C++: + /// imgui.h:1479 + ///
+ /// ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + RootAndChildWindows = ImGuiHoveredFlags.RootAndChildWindows, + + /// + /// + /// Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence. + /// + /// + /// C++: + /// imgui.h:1487 + ///
ImGuiHoveredFlags_ForTooltip = 1 << 12 + ///
+ ///
+ /// + /// + /// Tooltips mode + /// - typically used in IsItemHovered() + SetTooltip() sequence. + /// - this is a shortcut to pull flags from 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' where you can reconfigure desired behavior. + /// e.g. 'TooltipHoveredFlagsForMouse' defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + /// - for frequently actioned or hovered items providing a tooltip, you want may to use ImGuiHoveredFlags_ForTooltip (stationary + delay) so the tooltip doesn't show too often. + /// - for items which main purpose is to be hovered, or items with low affordance, or in less consistent apps, prefer no delay or shorter delay. + /// + /// + ForTooltip = ImGuiHoveredFlags.ForTooltip, + + /// + /// + /// Require mouse to be stationary for style.HoverStationaryDelay (~0.15 sec) _at least one time_. After + /// this, can move on same item/window. Using the stationary test tends to reduces the need for a long + /// delay. + /// + /// + /// C++: + /// imgui.h:1492 + ///
ImGuiHoveredFlags_Stationary = 1 << 13 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + Stationary = ImGuiHoveredFlags.Stationary, + + /// + /// + /// IsItemHovered() only: Return true immediately (default). As this is the default you generally ignore + /// this. + /// + /// + /// C++: + /// imgui.h:1493 + ///
ImGuiHoveredFlags_DelayNone = 1 << 14 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + DelayNone = ImGuiHoveredFlags.DelayNone, + + /// + /// + /// IsItemHovered() only: Return true after style.HoverDelayShort elapsed (~0.15 sec) (shared between items) + /// + requires mouse to be stationary for style.HoverStationaryDelay (once per item). + /// + /// + /// C++: + /// imgui.h:1494 + ///
ImGuiHoveredFlags_DelayShort = 1 << 15 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + DelayShort = ImGuiHoveredFlags.DelayShort, + + /// + /// + /// IsItemHovered() only: Return true after style.HoverDelayNormal elapsed (~0.40 sec) (shared between + /// items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item). + /// + /// + /// C++: + /// imgui.h:1495 + ///
ImGuiHoveredFlags_DelayNormal = 1 << 16 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + DelayNormal = ImGuiHoveredFlags.DelayNormal, + + /// + /// + /// IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the + /// previous timer for a short time (standard for tooltips with long delays) + /// + /// + /// C++: + /// imgui.h:1496 + ///
ImGuiHoveredFlags_NoSharedDelay = 1 << 17 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + NoSharedDelay = ImGuiHoveredFlags.NoSharedDelay, + + /// + /// + /// C++: + /// imgui_internal.h:1005 + ///
+ /// ImGuiHoveredFlags_DelayMask_ = ImGuiHoveredFlags_DelayNone | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_DelayNormal | ImGuiHoveredFlags_NoSharedDelay + ///
+ ///
+ /// + /// + /// Extend ImGuiHoveredFlags_ + /// + /// + DelayMask = + ImGuiHoveredFlags.DelayNone + | ImGuiHoveredFlags.DelayShort + | ImGuiHoveredFlags.DelayNormal + | ImGuiHoveredFlags.NoSharedDelay, + + /// + /// + /// C++: + /// imgui_internal.h:1006 + ///
+ /// ImGuiHoveredFlags_AllowedMaskForIsWindowHovered = ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_AnyWindow | ImGuiHoveredFlags_NoPopupHierarchy | ImGuiHoveredFlags_DockHierarchy | ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary + ///
+ ///
+ /// + /// + /// Extend ImGuiHoveredFlags_ + /// + /// + AllowedMaskForIsWindowHovered = + ImGuiHoveredFlags.ChildWindows + | ImGuiHoveredFlags.RootWindow + | ImGuiHoveredFlags.AnyWindow + | ImGuiHoveredFlags.NoPopupHierarchy + | ImGuiHoveredFlags.DockHierarchy + | ImGuiHoveredFlags.AllowWhenBlockedByPopup + | ImGuiHoveredFlags.AllowWhenBlockedByActiveItem + | ImGuiHoveredFlags.ForTooltip + | ImGuiHoveredFlags.Stationary, + + /// + /// + /// C++: + /// imgui_internal.h:1007 + ///
+ /// ImGuiHoveredFlags_AllowedMaskForIsItemHovered = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped | ImGuiHoveredFlags_AllowWhenDisabled | ImGuiHoveredFlags_NoNavOverride | ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayMask_ + ///
+ ///
+ /// + /// + /// Extend ImGuiHoveredFlags_ + /// + /// + AllowedMaskForIsItemHovered = + ImGuiHoveredFlags.AllowWhenBlockedByPopup + | ImGuiHoveredFlags.AllowWhenBlockedByActiveItem + | ImGuiHoveredFlags.AllowWhenOverlapped + | ImGuiHoveredFlags.AllowWhenDisabled + | ImGuiHoveredFlags.NoNavOverride + | ImGuiHoveredFlags.ForTooltip + | ImGuiHoveredFlags.Stationary + | DelayMask, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputEventType.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputEventType.gen.cs new file mode 100644 index 0000000..4ee458d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputEventType.gen.cs @@ -0,0 +1,97 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1497 + ///
enum ImGuiInputEventType + ///
+ ///
+ public enum ImGuiInputEventType : int + { + /// + /// + /// C++: + /// imgui_internal.h:1499 + ///
ImGuiInputEventType_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1500 + ///
ImGuiInputEventType_MousePos + ///
+ ///
+ MousePos, + + /// + /// + /// C++: + /// imgui_internal.h:1501 + ///
ImGuiInputEventType_MouseWheel + ///
+ ///
+ MouseWheel, + + /// + /// + /// C++: + /// imgui_internal.h:1502 + ///
ImGuiInputEventType_MouseButton + ///
+ ///
+ MouseButton, + + /// + /// + /// C++: + /// imgui_internal.h:1503 + ///
ImGuiInputEventType_MouseViewport + ///
+ ///
+ MouseViewport, + + /// + /// + /// C++: + /// imgui_internal.h:1504 + ///
ImGuiInputEventType_Key + ///
+ ///
+ Key, + + /// + /// + /// C++: + /// imgui_internal.h:1505 + ///
ImGuiInputEventType_Text + ///
+ ///
+ Text, + + /// + /// + /// C++: + /// imgui_internal.h:1506 + ///
ImGuiInputEventType_Focus + ///
+ ///
+ Focus, + + /// + /// + /// C++: + /// imgui_internal.h:1507 + ///
ImGuiInputEventType_COUNT + ///
+ ///
+ COUNT, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputFlagsPrivate.gen.cs new file mode 100644 index 0000000..bb4efb6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputFlagsPrivate.gen.cs @@ -0,0 +1,624 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1596 + ///
enum ImGuiInputFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiInputFlags_ + /// Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() + /// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) + /// + /// + public enum ImGuiInputFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1722 + ///
ImGuiInputFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut(), + /// (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h) + /// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) + /// + /// + None = ImGuiInputFlags.None, + + /// + /// + /// Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for + /// legacy IsMouseClicked(). MUST BE == 1. + /// + /// + /// C++: + /// imgui.h:1723 + ///
ImGuiInputFlags_Repeat = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut(), + /// (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h) + /// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) + /// + /// + Repeat = ImGuiInputFlags.Repeat, + + /// + /// + /// Route to active item only. + /// + /// + /// C++: + /// imgui.h:1728 + ///
ImGuiInputFlags_RouteActive = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteActive = ImGuiInputFlags.RouteActive, + + /// + /// + /// Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes + /// inputs over deep-most focused window. + /// + /// + /// C++: + /// imgui.h:1729 + ///
ImGuiInputFlags_RouteFocused = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteFocused = ImGuiInputFlags.RouteFocused, + + /// + /// + /// Global route (unless a focused window or active item registered the route). + /// + /// + /// C++: + /// imgui.h:1730 + ///
ImGuiInputFlags_RouteGlobal = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteGlobal = ImGuiInputFlags.RouteGlobal, + + /// + /// + /// Do not register route, poll keys directly. + /// + /// + /// C++: + /// imgui.h:1731 + ///
ImGuiInputFlags_RouteAlways = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteAlways = ImGuiInputFlags.RouteAlways, + + /// + /// + /// Option: global route: higher priority than focused route (unless active item in focused route). + /// + /// + /// C++: + /// imgui.h:1733 + ///
ImGuiInputFlags_RouteOverFocused = 1 << 14 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteOverFocused = ImGuiInputFlags.RouteOverFocused, + + /// + /// + /// Option: global route: higher priority than active item. Unlikely you need to use that: will interfere + /// with every active items, e.g. CTRL+A registered by InputText will be overridden by this. May not be + /// fully honored as user/internal code is likely to always assume they can access keys when active. + /// + /// + /// C++: + /// imgui.h:1734 + ///
ImGuiInputFlags_RouteOverActive = 1 << 15 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteOverActive = ImGuiInputFlags.RouteOverActive, + + /// + /// + /// Option: global route: will not be applied if underlying background/void is focused (== no Dear ImGui + /// windows are focused). Useful for overlay applications. + /// + /// + /// C++: + /// imgui.h:1735 + ///
ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteUnlessBgFocused = ImGuiInputFlags.RouteUnlessBgFocused, + + /// + /// + /// Option: route evaluated from the point of view of root window rather than current window. + /// + /// + /// C++: + /// imgui.h:1736 + ///
ImGuiInputFlags_RouteFromRootWindow = 1 << 17 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteFromRootWindow = ImGuiInputFlags.RouteFromRootWindow, + + /// + /// + /// Automatically display a tooltip when hovering item [BETA] Unsure of right api (opt-in/opt-out) + /// + /// + /// C++: + /// imgui.h:1739 + ///
ImGuiInputFlags_Tooltip = 1 << 18 + ///
+ ///
+ /// + /// + /// Flags for SetNextItemShortcut() + /// + /// + Tooltip = ImGuiInputFlags.Tooltip, + + /// + /// + /// Repeat rate: Regular (default) + /// + /// + /// C++: + /// imgui_internal.h:1600 + ///
ImGuiInputFlags_RepeatRateDefault = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked(), Shortcut() + /// - Repeat mode: Repeat rate selection + /// + /// + RepeatRateDefault = 1 << 1, + + /// + /// + /// Repeat rate: Fast + /// + /// + /// C++: + /// imgui_internal.h:1601 + ///
ImGuiInputFlags_RepeatRateNavMove = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked(), Shortcut() + /// - Repeat mode: Repeat rate selection + /// + /// + RepeatRateNavMove = 1 << 2, + + /// + /// + /// Repeat rate: Faster + /// + /// + /// C++: + /// imgui_internal.h:1602 + ///
ImGuiInputFlags_RepeatRateNavTweak = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked(), Shortcut() + /// - Repeat mode: Repeat rate selection + /// + /// + RepeatRateNavTweak = 1 << 3, + + /// + /// + /// Stop repeating when released (default for all functions except Shortcut). This only exists to allow + /// overriding Shortcut() default behavior. + /// + /// + /// C++: + /// imgui_internal.h:1605 + ///
ImGuiInputFlags_RepeatUntilRelease = 1 << 4 + ///
+ ///
+ /// + /// + /// - Repeat mode: Specify when repeating key pressed can be interrupted. + /// - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in. + /// + /// + RepeatUntilRelease = 1 << 4, + + /// + /// + /// Stop repeating when released OR if keyboard mods are changed (default for Shortcut) + /// + /// + /// C++: + /// imgui_internal.h:1606 + ///
ImGuiInputFlags_RepeatUntilKeyModsChange = 1 << 5 + ///
+ ///
+ /// + /// + /// - Repeat mode: Specify when repeating key pressed can be interrupted. + /// - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in. + /// + /// + RepeatUntilKeyModsChange = 1 << 5, + + /// + /// + /// Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key + /// to Key by releasing Mod. + /// + /// + /// C++: + /// imgui_internal.h:1607 + ///
ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone = 1 << 6 + ///
+ ///
+ /// + /// + /// - Repeat mode: Specify when repeating key pressed can be interrupted. + /// - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in. + /// + /// + RepeatUntilKeyModsChangeFromNone = 1 << 6, + + /// + /// + /// Stop repeating when released OR if any other keyboard key is pressed during the repeat + /// + /// + /// C++: + /// imgui_internal.h:1608 + ///
ImGuiInputFlags_RepeatUntilOtherKeyPress = 1 << 7 + ///
+ ///
+ /// + /// + /// - Repeat mode: Specify when repeating key pressed can be interrupted. + /// - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in. + /// + /// + RepeatUntilOtherKeyPress = 1 << 7, + + /// + /// + /// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for + /// polling). Cleared at end of frame. + /// + /// + /// C++: + /// imgui_internal.h:1612 + ///
ImGuiInputFlags_LockThisFrame = 1 << 20 + ///
+ ///
+ /// + /// + /// Flags for SetKeyOwner(), SetItemKeyOwner() + /// - Locking key away from non-input aware code. Locking is useful to make input-owner-aware code steal keys from non-input-owner-aware code. If all code is input-owner-aware locking would never be necessary. + /// + /// + LockThisFrame = 1 << 20, + + /// + /// + /// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for + /// polling). Cleared when the key is released or at end of each frame if key is released. + /// + /// + /// C++: + /// imgui_internal.h:1613 + ///
ImGuiInputFlags_LockUntilRelease = 1 << 21 + ///
+ ///
+ /// + /// + /// Flags for SetKeyOwner(), SetItemKeyOwner() + /// - Locking key away from non-input aware code. Locking is useful to make input-owner-aware code steal keys from non-input-owner-aware code. If all code is input-owner-aware locking would never be necessary. + /// + /// + LockUntilRelease = 1 << 21, + + /// + /// + /// Only set if item is hovered (default to both) + /// + /// + /// C++: + /// imgui_internal.h:1616 + ///
ImGuiInputFlags_CondHovered = 1 << 22 + ///
+ ///
+ /// + /// + /// - Condition for SetItemKeyOwner() + /// + /// + CondHovered = 1 << 22, + + /// + /// + /// Only set if item is active (default to both) + /// + /// + /// C++: + /// imgui_internal.h:1617 + ///
ImGuiInputFlags_CondActive = 1 << 23 + ///
+ ///
+ /// + /// + /// - Condition for SetItemKeyOwner() + /// + /// + CondActive = 1 << 23, + + /// + /// + /// C++: + /// imgui_internal.h:1618 + ///
ImGuiInputFlags_CondDefault_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive + ///
+ ///
+ /// + /// + /// - Condition for SetItemKeyOwner() + /// + /// + CondDefault = CondHovered | CondActive, + + /// + /// + /// C++: + /// imgui_internal.h:1621 + ///
+ /// ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + RepeatRateMask = RepeatRateDefault | RepeatRateNavMove | RepeatRateNavTweak, + + /// + /// + /// C++: + /// imgui_internal.h:1622 + ///
+ /// ImGuiInputFlags_RepeatUntilMask_ = ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPress + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + RepeatUntilMask = + RepeatUntilRelease | RepeatUntilKeyModsChange | RepeatUntilKeyModsChangeFromNone | RepeatUntilOtherKeyPress, + + /// + /// + /// C++: + /// imgui_internal.h:1623 + ///
+ /// ImGuiInputFlags_RepeatMask_ = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_ + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + RepeatMask = ImGuiInputFlags.Repeat | RepeatRateMask | RepeatUntilMask, + + /// + /// + /// C++: + /// imgui_internal.h:1624 + ///
ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + CondMask = CondHovered | CondActive, + + /// + /// + /// C++: + /// imgui_internal.h:1625 + ///
+ /// ImGuiInputFlags_RouteTypeMask_ = ImGuiInputFlags_RouteActive | ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteAlways + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + RouteTypeMask = + ImGuiInputFlags.RouteActive + | ImGuiInputFlags.RouteFocused + | ImGuiInputFlags.RouteGlobal + | ImGuiInputFlags.RouteAlways, + + /// + /// + /// C++: + /// imgui_internal.h:1626 + ///
+ /// ImGuiInputFlags_RouteOptionsMask_ = ImGuiInputFlags_RouteOverFocused | ImGuiInputFlags_RouteOverActive | ImGuiInputFlags_RouteUnlessBgFocused | ImGuiInputFlags_RouteFromRootWindow + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + RouteOptionsMask = + ImGuiInputFlags.RouteOverFocused + | ImGuiInputFlags.RouteOverActive + | ImGuiInputFlags.RouteUnlessBgFocused + | ImGuiInputFlags.RouteFromRootWindow, + + /// + /// + /// C++: + /// imgui_internal.h:1627 + ///
ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_RepeatMask_ + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + SupportedByIsKeyPressed = RepeatMask, + + /// + /// + /// C++: + /// imgui_internal.h:1628 + ///
ImGuiInputFlags_SupportedByIsMouseClicked = ImGuiInputFlags_Repeat + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + SupportedByIsMouseClicked = ImGuiInputFlags.Repeat, + + /// + /// + /// C++: + /// imgui_internal.h:1629 + ///
+ /// ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_ + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + SupportedByShortcut = RepeatMask | RouteTypeMask | RouteOptionsMask, + + /// + /// + /// C++: + /// imgui_internal.h:1630 + ///
+ /// ImGuiInputFlags_SupportedBySetNextItemShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteTypeMask_ | ImGuiInputFlags_RouteOptionsMask_ | ImGuiInputFlags_Tooltip + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + SupportedBySetNextItemShortcut = RepeatMask | RouteTypeMask | RouteOptionsMask | ImGuiInputFlags.Tooltip, + + /// + /// + /// C++: + /// imgui_internal.h:1631 + ///
+ /// ImGuiInputFlags_SupportedBySetKeyOwner = ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + SupportedBySetKeyOwner = LockThisFrame | LockUntilRelease, + + /// + /// + /// C++: + /// imgui_internal.h:1632 + ///
+ /// ImGuiInputFlags_SupportedBySetItemKeyOwner = ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_ + ///
+ ///
+ /// + /// + /// [Internal] Mask of which function support which flags + /// + /// + SupportedBySetItemKeyOwner = SupportedBySetKeyOwner | CondMask, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputSource.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputSource.gen.cs new file mode 100644 index 0000000..b4aa72b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputSource.gen.cs @@ -0,0 +1,64 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1510 + ///
enum ImGuiInputSource + ///
+ ///
+ public enum ImGuiInputSource : int + { + /// + /// + /// C++: + /// imgui_internal.h:1512 + ///
ImGuiInputSource_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// Note: may be Mouse or TouchScreen or Pen. See io.MouseSource to distinguish them. + /// + /// + /// C++: + /// imgui_internal.h:1513 + ///
ImGuiInputSource_Mouse + ///
+ ///
+ Mouse, + + /// + /// + /// C++: + /// imgui_internal.h:1514 + ///
ImGuiInputSource_Keyboard + ///
+ ///
+ Keyboard, + + /// + /// + /// C++: + /// imgui_internal.h:1515 + ///
ImGuiInputSource_Gamepad + ///
+ ///
+ Gamepad, + + /// + /// + /// C++: + /// imgui_internal.h:1516 + ///
ImGuiInputSource_COUNT + ///
+ ///
+ COUNT, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputTextFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputTextFlagsPrivate.gen.cs new file mode 100644 index 0000000..08ee613 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiInputTextFlagsPrivate.gen.cs @@ -0,0 +1,506 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1011 + ///
enum ImGuiInputTextFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiInputTextFlags_ + /// + /// + public enum ImGuiInputTextFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1276 + ///
ImGuiInputTextFlags_None = 0 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + None = ImGuiInputTextFlags.None, + + /// + /// + /// Allow 0123456789.+-*/ + /// + /// + /// C++: + /// imgui.h:1277 + ///
ImGuiInputTextFlags_CharsDecimal = 1 << 0 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsDecimal = ImGuiInputTextFlags.CharsDecimal, + + /// + /// + /// Allow 0123456789ABCDEFabcdef + /// + /// + /// C++: + /// imgui.h:1278 + ///
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsHexadecimal = ImGuiInputTextFlags.CharsHexadecimal, + + /// + /// + /// Allow 0123456789.+-*/eE (Scientific notation input) + /// + /// + /// C++: + /// imgui.h:1279 + ///
ImGuiInputTextFlags_CharsScientific = 1 << 2 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsScientific = ImGuiInputTextFlags.CharsScientific, + + /// + /// + /// Turn a..z into A..Z + /// + /// + /// C++: + /// imgui.h:1280 + ///
ImGuiInputTextFlags_CharsUppercase = 1 << 3 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsUppercase = ImGuiInputTextFlags.CharsUppercase, + + /// + /// + /// Filter out spaces, tabs + /// + /// + /// C++: + /// imgui.h:1281 + ///
ImGuiInputTextFlags_CharsNoBlank = 1 << 4 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsNoBlank = ImGuiInputTextFlags.CharsNoBlank, + + /// + /// + /// Pressing TAB input a '\t' character into the text field + /// + /// + /// C++: + /// imgui.h:1284 + ///
ImGuiInputTextFlags_AllowTabInput = 1 << 5 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + AllowTabInput = ImGuiInputTextFlags.AllowTabInput, + + /// + /// + /// Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider using + /// IsItemDeactivatedAfterEdit() instead! + /// + /// + /// C++: + /// imgui.h:1285 + ///
ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + EnterReturnsTrue = ImGuiInputTextFlags.EnterReturnsTrue, + + /// + /// + /// Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape + /// to revert) + /// + /// + /// C++: + /// imgui.h:1286 + ///
ImGuiInputTextFlags_EscapeClearsAll = 1 << 7 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + EscapeClearsAll = ImGuiInputTextFlags.EscapeClearsAll, + + /// + /// + /// In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate + /// with Ctrl+Enter, add line with Enter). + /// + /// + /// C++: + /// imgui.h:1287 + ///
ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + CtrlEnterForNewLine = ImGuiInputTextFlags.CtrlEnterForNewLine, + + /// + /// + /// Read-only mode + /// + /// + /// C++: + /// imgui.h:1290 + ///
ImGuiInputTextFlags_ReadOnly = 1 << 9 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + ReadOnly = ImGuiInputTextFlags.ReadOnly, + + /// + /// + /// Password mode, display all characters as '*', disable copy + /// + /// + /// C++: + /// imgui.h:1291 + ///
ImGuiInputTextFlags_Password = 1 << 10 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + Password = ImGuiInputTextFlags.Password, + + /// + /// + /// Overwrite mode + /// + /// + /// C++: + /// imgui.h:1292 + ///
ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + AlwaysOverwrite = ImGuiInputTextFlags.AlwaysOverwrite, + + /// + /// + /// Select entire text when first taking mouse focus + /// + /// + /// C++: + /// imgui.h:1293 + ///
ImGuiInputTextFlags_AutoSelectAll = 1 << 12 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + AutoSelectAll = ImGuiInputTextFlags.AutoSelectAll, + + /// + /// + /// InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value. + /// + /// + /// C++: + /// imgui.h:1294 + ///
ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + ParseEmptyRefVal = ImGuiInputTextFlags.ParseEmptyRefVal, + + /// + /// + /// InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used + /// with ImGuiInputTextFlags_ParseEmptyRefVal. + /// + /// + /// C++: + /// imgui.h:1295 + ///
ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + DisplayEmptyRefVal = ImGuiInputTextFlags.DisplayEmptyRefVal, + + /// + /// + /// Disable following the cursor horizontally + /// + /// + /// C++: + /// imgui.h:1296 + ///
ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + NoHorizontalScroll = ImGuiInputTextFlags.NoHorizontalScroll, + + /// + /// + /// Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own + /// undo/redo stack you need e.g. to call ClearActiveID(). + /// + /// + /// C++: + /// imgui.h:1297 + ///
ImGuiInputTextFlags_NoUndoRedo = 1 << 16 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + NoUndoRedo = ImGuiInputTextFlags.NoUndoRedo, + + /// + /// + /// When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. + /// Single-line only! + /// + /// + /// C++: + /// imgui.h:1300 + ///
ImGuiInputTextFlags_ElideLeft = 1 << 17 + ///
+ ///
+ /// + /// + /// Elide display / Alignment + /// + /// + ElideLeft = ImGuiInputTextFlags.ElideLeft, + + /// + /// + /// Callback on pressing TAB (for completion handling) + /// + /// + /// C++: + /// imgui.h:1303 + ///
ImGuiInputTextFlags_CallbackCompletion = 1 << 18 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackCompletion = ImGuiInputTextFlags.CallbackCompletion, + + /// + /// + /// Callback on pressing Up/Down arrows (for history handling) + /// + /// + /// C++: + /// imgui.h:1304 + ///
ImGuiInputTextFlags_CallbackHistory = 1 << 19 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackHistory = ImGuiInputTextFlags.CallbackHistory, + + /// + /// + /// Callback on each iteration. User code may query cursor position, modify text buffer. + /// + /// + /// C++: + /// imgui.h:1305 + ///
ImGuiInputTextFlags_CallbackAlways = 1 << 20 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackAlways = ImGuiInputTextFlags.CallbackAlways, + + /// + /// + /// Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or + /// return 1 in callback to discard. + /// + /// + /// C++: + /// imgui.h:1306 + ///
ImGuiInputTextFlags_CallbackCharFilter = 1 << 21 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackCharFilter = ImGuiInputTextFlags.CallbackCharFilter, + + /// + /// + /// Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to + /// grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). + /// You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h + /// for an example of using this) + /// + /// + /// C++: + /// imgui.h:1307 + ///
ImGuiInputTextFlags_CallbackResize = 1 << 22 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackResize = ImGuiInputTextFlags.CallbackResize, + + /// + /// + /// Callback on any edit. Note that InputText() already returns true on edit + you can always use + /// IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// + /// + /// C++: + /// imgui.h:1308 + ///
ImGuiInputTextFlags_CallbackEdit = 1 << 23 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackEdit = ImGuiInputTextFlags.CallbackEdit, + + /// + /// + /// For internal use by InputTextMultiline() + /// + /// + /// C++: + /// imgui_internal.h:1014 + ///
ImGuiInputTextFlags_Multiline = 1 << 26 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + Multiline = 1 << 26, + + /// + /// + /// For internal use by TempInputText(), will skip calling ItemAdd(). Require bounding-box to strictly + /// match. + /// + /// + /// C++: + /// imgui_internal.h:1015 + ///
ImGuiInputTextFlags_MergedItem = 1 << 27 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + MergedItem = 1 << 27, + + /// + /// + /// For internal use by InputScalar() and TempInputScalar() + /// + /// + /// C++: + /// imgui_internal.h:1016 + ///
ImGuiInputTextFlags_LocalizeDecimalPoint= 1 << 28 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + LocalizeDecimalPoint = 1 << 28, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiItemFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiItemFlagsPrivate.gen.cs new file mode 100644 index 0000000..31587a2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiItemFlagsPrivate.gen.cs @@ -0,0 +1,358 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:951 + ///
enum ImGuiItemFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiItemFlags + /// - input: PushItemFlag() manipulates g.CurrentItemFlags, g.NextItemData.ItemFlags, ItemAdd() calls may add extra flags too. + /// - output: stored in g.LastItemData.ItemFlags + /// + /// + public enum ImGuiItemFlagsPrivate : int + { + /// + /// + /// (Default) + /// + /// + /// C++: + /// imgui.h:1262 + ///
ImGuiItemFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + None = ImGuiItemFlags.None, + + /// + /// + /// false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav. + /// + /// + /// C++: + /// imgui.h:1263 + ///
ImGuiItemFlags_NoTabStop = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + NoTabStop = ImGuiItemFlags.NoTabStop, + + /// + /// + /// false // Disable any form of focusing (keyboard/gamepad directional navigation and + /// SetKeyboardFocusHere() calls). + /// + /// + /// C++: + /// imgui.h:1264 + ///
ImGuiItemFlags_NoNav = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + NoNav = ImGuiItemFlags.NoNav, + + /// + /// + /// false // Disable item being a candidate for default focus (e.g. used by title bar items). + /// + /// + /// C++: + /// imgui.h:1265 + ///
ImGuiItemFlags_NoNavDefaultFocus = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + NoNavDefaultFocus = ImGuiItemFlags.NoNavDefaultFocus, + + /// + /// + /// false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and + /// io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is + /// being held. + /// + /// + /// C++: + /// imgui.h:1266 + ///
ImGuiItemFlags_ButtonRepeat = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + ButtonRepeat = ImGuiItemFlags.ButtonRepeat, + + /// + /// + /// true // MenuItem()/Selectable() automatically close their parent popup window. + /// + /// + /// C++: + /// imgui.h:1267 + ///
ImGuiItemFlags_AutoClosePopups = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + AutoClosePopups = ImGuiItemFlags.AutoClosePopups, + + /// + /// + /// false // Allow submitting an item with the same identifier as an item already submitted this frame + /// without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set. + /// + /// + /// C++: + /// imgui.h:1268 + ///
ImGuiItemFlags_AllowDuplicateId = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + AllowDuplicateId = ImGuiItemFlags.AllowDuplicateId, + + /// + /// + /// false // Disable interactions (DOES NOT affect visuals. DO NOT mix direct use of this with + /// BeginDisabled(). See BeginDisabled()/EndDisabled() for full disable feature, and github #211). + /// + /// + /// C++: + /// imgui_internal.h:954 + ///
ImGuiItemFlags_Disabled = 1 << 10 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + Disabled = 1 << 10, + + /// + /// + /// false // [ALPHA] Allow hovering interactions but underlying value is not changed. + /// + /// + /// C++: + /// imgui_internal.h:955 + ///
ImGuiItemFlags_ReadOnly = 1 << 11 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + ReadOnly = 1 << 11, + + /// + /// + /// false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values + /// differ. Currently only supported by Checkbox() (later should support all sorts of widgets) + /// + /// + /// C++: + /// imgui_internal.h:956 + ///
ImGuiItemFlags_MixedValue = 1 << 12 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + MixedValue = 1 << 12, + + /// + /// + /// false // Disable hoverable check in ItemHoverable() + /// + /// + /// C++: + /// imgui_internal.h:957 + ///
ImGuiItemFlags_NoWindowHoverableCheck = 1 << 13 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + NoWindowHoverableCheck = 1 << 13, + + /// + /// + /// false // Allow being overlapped by another widget. Not-hovered to Hovered transition deferred by a + /// frame. + /// + /// + /// C++: + /// imgui_internal.h:958 + ///
ImGuiItemFlags_AllowOverlap = 1 << 14 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + AllowOverlap = 1 << 14, + + /// + /// + /// false // Nav keyboard/gamepad mode doesn't disable hover highlight (behave as if + /// NavHighlightItemUnderNav==false). + /// + /// + /// C++: + /// imgui_internal.h:959 + ///
ImGuiItemFlags_NoNavDisableMouseHover = 1 << 15 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + NoNavDisableMouseHover = 1 << 15, + + /// + /// + /// false // Skip calling MarkItemEdited() + /// + /// + /// C++: + /// imgui_internal.h:960 + ///
ImGuiItemFlags_NoMarkEdited = 1 << 16 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + NoMarkEdited = 1 << 16, + + /// + /// + /// false // [EXPERIMENTAL: Not very well specced] Clicking doesn't take focus. Automatically sets + /// ImGuiButtonFlags_NoFocus + ImGuiButtonFlags_NoNavFocus in ButtonBehavior(). + /// + /// + /// C++: + /// imgui_internal.h:961 + ///
ImGuiItemFlags_NoFocus = 1 << 17 + ///
+ ///
+ /// + /// + /// Controlled by user + /// + /// + NoFocus = 1 << 17, + + /// + /// + /// false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few + /// items before it becomes a generic feature. + /// + /// + /// C++: + /// imgui_internal.h:964 + ///
ImGuiItemFlags_Inputable = 1 << 20 + ///
+ ///
+ /// + /// + /// Controlled by widget code + /// + /// + Inputable = 1 << 20, + + /// + /// + /// false // Set by SetNextItemSelectionUserData() + /// + /// + /// C++: + /// imgui_internal.h:965 + ///
ImGuiItemFlags_HasSelectionUserData = 1 << 21 + ///
+ ///
+ /// + /// + /// Controlled by widget code + /// + /// + HasSelectionUserData = 1 << 21, + + /// + /// + /// false // Set by SetNextItemSelectionUserData() + /// + /// + /// C++: + /// imgui_internal.h:966 + ///
ImGuiItemFlags_IsMultiSelect = 1 << 22 + ///
+ ///
+ /// + /// + /// Controlled by widget code + /// + /// + IsMultiSelect = 1 << 22, + + /// + /// + /// Please don't change, use PushItemFlag() instead. + /// + /// + /// C++: + /// imgui_internal.h:968 + ///
ImGuiItemFlags_Default_ = ImGuiItemFlags_AutoClosePopups + ///
+ ///
+ Default = ImGuiItemFlags.AutoClosePopups, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiItemStatusFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiItemStatusFlags.gen.cs new file mode 100644 index 0000000..a45595b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiItemStatusFlags.gen.cs @@ -0,0 +1,240 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:976 + ///
enum ImGuiItemStatusFlags_ + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + [Flags] + public enum ImGuiItemStatusFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:978 + ///
ImGuiItemStatusFlags_None = 0 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + None = 0, + + /// + /// + /// Mouse position is within item rectangle (does NOT mean that the window is in correct z-order and can be + /// hovered!, this is only one part of the most-common IsItemHovered test) + /// + /// + /// C++: + /// imgui_internal.h:979 + ///
ImGuiItemStatusFlags_HoveredRect = 1 << 0 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + HoveredRect = 1 << 0, + + /// + /// + /// g.LastItemData.DisplayRect is valid + /// + /// + /// C++: + /// imgui_internal.h:980 + ///
ImGuiItemStatusFlags_HasDisplayRect = 1 << 1 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + HasDisplayRect = 1 << 1, + + /// + /// + /// Value exposed by item was edited in the current frame (should match the bool return value of most + /// widgets) + /// + /// + /// C++: + /// imgui_internal.h:981 + ///
ImGuiItemStatusFlags_Edited = 1 << 2 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + Edited = 1 << 2, + + /// + /// + /// Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected", only state + /// changes, in order to easily handle clipping with less issues. + /// + /// + /// C++: + /// imgui_internal.h:982 + ///
ImGuiItemStatusFlags_ToggledSelection = 1 << 3 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + ToggledSelection = 1 << 3, + + /// + /// + /// Set when TreeNode() reports toggling their open state. + /// + /// + /// C++: + /// imgui_internal.h:983 + ///
ImGuiItemStatusFlags_ToggledOpen = 1 << 4 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + ToggledOpen = 1 << 4, + + /// + /// + /// Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag. + /// + /// + /// C++: + /// imgui_internal.h:984 + ///
ImGuiItemStatusFlags_HasDeactivated = 1 << 5 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + HasDeactivated = 1 << 5, + + /// + /// + /// Only valid if ImGuiItemStatusFlags_HasDeactivated is set. + /// + /// + /// C++: + /// imgui_internal.h:985 + ///
ImGuiItemStatusFlags_Deactivated = 1 << 6 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + Deactivated = 1 << 6, + + /// + /// + /// Override the HoveredWindow test to allow cross-window hover testing. + /// + /// + /// C++: + /// imgui_internal.h:986 + ///
ImGuiItemStatusFlags_HoveredWindow = 1 << 7 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + HoveredWindow = 1 << 7, + + /// + /// + /// [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use + /// yet: API/system will change as we refactor Itemadd()). + /// + /// + /// C++: + /// imgui_internal.h:987 + ///
ImGuiItemStatusFlags_Visible = 1 << 8 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + Visible = 1 << 8, + + /// + /// + /// g.LastItemData.ClipRect is valid. + /// + /// + /// C++: + /// imgui_internal.h:988 + ///
ImGuiItemStatusFlags_HasClipRect = 1 << 9 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + HasClipRect = 1 << 9, + + /// + /// + /// g.LastItemData.Shortcut valid. Set by SetNextItemShortcut() -> ItemAdd(). + /// + /// + /// C++: + /// imgui_internal.h:989 + ///
ImGuiItemStatusFlags_HasShortcut = 1 << 10 + ///
+ ///
+ /// + /// + /// Status flags for an already submitted item + /// - output: stored in g.LastItemData.StatusFlags + /// + /// + HasShortcut = 1 << 10, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiLayoutType.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiLayoutType.gen.cs new file mode 100644 index 0000000..5664dcd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiLayoutType.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1115 + ///
enum ImGuiLayoutType_ + ///
+ ///
+ /// + /// + /// FIXME: this is in development, not exposed/functional as a generic feature yet. + /// Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + public enum ImGuiLayoutType : int + { + /// + /// + /// C++: + /// imgui_internal.h:1117 + ///
ImGuiLayoutType_Horizontal = 0 + ///
+ ///
+ /// + /// + /// FIXME: this is in development, not exposed/functional as a generic feature yet. + /// Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + Horizontal = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1118 + ///
ImGuiLayoutType_Vertical = 1 + ///
+ ///
+ /// + /// + /// FIXME: this is in development, not exposed/functional as a generic feature yet. + /// Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2 + /// + /// + Vertical = 1, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiLocKey.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiLocKey.gen.cs new file mode 100644 index 0000000..4f3cf36 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiLocKey.gen.cs @@ -0,0 +1,235 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// -> enum ImGuiLocKey // Enum: a localization entry for translation. + /// + /// + /// C++: + /// imgui_internal.h:197 + ///
enum ImGuiLocKey : int + ///
+ ///
+ /// + /// + /// Enumerations + /// Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists. + /// + /// + public enum ImGuiLocKey : int + { + /// + /// + /// C++: + /// imgui_internal.h:2184 + ///
ImGuiLocKey_VersionStr + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + VersionStr, + + /// + /// + /// C++: + /// imgui_internal.h:2185 + ///
ImGuiLocKey_TableSizeOne + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + TableSizeOne, + + /// + /// + /// C++: + /// imgui_internal.h:2186 + ///
ImGuiLocKey_TableSizeAllFit + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + TableSizeAllFit, + + /// + /// + /// C++: + /// imgui_internal.h:2187 + ///
ImGuiLocKey_TableSizeAllDefault + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + TableSizeAllDefault, + + /// + /// + /// C++: + /// imgui_internal.h:2188 + ///
ImGuiLocKey_TableResetOrder + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + TableResetOrder, + + /// + /// + /// C++: + /// imgui_internal.h:2189 + ///
ImGuiLocKey_WindowingMainMenuBar + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + WindowingMainMenuBar, + + /// + /// + /// C++: + /// imgui_internal.h:2190 + ///
ImGuiLocKey_WindowingPopup + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + WindowingPopup, + + /// + /// + /// C++: + /// imgui_internal.h:2191 + ///
ImGuiLocKey_WindowingUntitled + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + WindowingUntitled, + + /// + /// + /// C++: + /// imgui_internal.h:2192 + ///
ImGuiLocKey_OpenLink_s + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + OpenLink_s, + + /// + /// + /// C++: + /// imgui_internal.h:2193 + ///
ImGuiLocKey_CopyLink + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + CopyLink, + + /// + /// + /// C++: + /// imgui_internal.h:2194 + ///
ImGuiLocKey_DockingHideTabBar + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + DockingHideTabBar, + + /// + /// + /// C++: + /// imgui_internal.h:2195 + ///
ImGuiLocKey_DockingHoldShiftToDock + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + DockingHoldShiftToDock, + + /// + /// + /// C++: + /// imgui_internal.h:2196 + ///
ImGuiLocKey_DockingDragToUndockOrMoveNode + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + DockingDragToUndockOrMoveNode, + + /// + /// + /// C++: + /// imgui_internal.h:2197 + ///
ImGuiLocKey_COUNT + ///
+ ///
+ /// + /// + /// This is experimental and not officially supported, it'll probably fall short of features, if/when it + /// does we may backtrack. + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiLogFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiLogFlags.gen.cs new file mode 100644 index 0000000..002a310 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiLogFlags.gen.cs @@ -0,0 +1,82 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1122 + ///
enum ImGuiLogFlags_ + ///
+ ///
+ /// + /// + /// Flags for LogBegin() text capturing function + /// + /// + [Flags] + public enum ImGuiLogFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1124 + ///
ImGuiLogFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for LogBegin() text capturing function + /// + /// + None = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1126 + ///
ImGuiLogFlags_OutputTTY = 1 << 0 + ///
+ ///
+ OutputTTY = 1 << 0, + + /// + /// + /// C++: + /// imgui_internal.h:1127 + ///
ImGuiLogFlags_OutputFile = 1 << 1 + ///
+ ///
+ OutputFile = 1 << 1, + + /// + /// + /// C++: + /// imgui_internal.h:1128 + ///
ImGuiLogFlags_OutputBuffer = 1 << 2 + ///
+ ///
+ OutputBuffer = 1 << 2, + + /// + /// + /// C++: + /// imgui_internal.h:1129 + ///
ImGuiLogFlags_OutputClipboard = 1 << 3 + ///
+ ///
+ OutputClipboard = 1 << 3, + + /// + /// + /// C++: + /// imgui_internal.h:1130 + ///
+ /// ImGuiLogFlags_OutputMask_ = ImGuiLogFlags_OutputTTY | ImGuiLogFlags_OutputFile | ImGuiLogFlags_OutputBuffer | ImGuiLogFlags_OutputClipboard + ///
+ ///
+ OutputMask = OutputTTY | OutputFile | OutputBuffer | OutputClipboard, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavLayer.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavLayer.gen.cs new file mode 100644 index 0000000..9fe903f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavLayer.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1731 + ///
enum ImGuiNavLayer + ///
+ ///
+ public enum ImGuiNavLayer : int + { + /// + /// + /// Main scrolling layer + /// + /// + /// C++: + /// imgui_internal.h:1733 + ///
ImGuiNavLayer_Main = 0 + ///
+ ///
+ Main = 0, + + /// + /// + /// Menu layer (access with Alt) + /// + /// + /// C++: + /// imgui_internal.h:1734 + ///
ImGuiNavLayer_Menu = 1 + ///
+ ///
+ Menu = 1, + + /// + /// + /// C++: + /// imgui_internal.h:1735 + ///
ImGuiNavLayer_COUNT + ///
+ ///
+ COUNT, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavMoveFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavMoveFlags.gen.cs new file mode 100644 index 0000000..269ac3d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavMoveFlags.gen.cs @@ -0,0 +1,228 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1709 + ///
enum ImGuiNavMoveFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiNavMoveFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1711 + ///
ImGuiNavMoveFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// On failed request, restart from opposite side + /// + /// + /// C++: + /// imgui_internal.h:1712 + ///
ImGuiNavMoveFlags_LoopX = 1 << 0 + ///
+ ///
+ LoopX = 1 << 0, + + /// + /// + /// C++: + /// imgui_internal.h:1713 + ///
ImGuiNavMoveFlags_LoopY = 1 << 1 + ///
+ ///
+ LoopY = 1 << 1, + + /// + /// + /// On failed request, request from opposite side one line down (when NavDir==right) or one line up (when + /// NavDir==left) + /// + /// + /// C++: + /// imgui_internal.h:1714 + ///
ImGuiNavMoveFlags_WrapX = 1 << 2 + ///
+ ///
+ WrapX = 1 << 2, + + /// + /// + /// This is not super useful but provided for completeness + /// + /// + /// C++: + /// imgui_internal.h:1715 + ///
ImGuiNavMoveFlags_WrapY = 1 << 3 + ///
+ ///
+ WrapY = 1 << 3, + + /// + /// + /// C++: + /// imgui_internal.h:1716 + ///
+ /// ImGuiNavMoveFlags_WrapMask_ = ImGuiNavMoveFlags_LoopX | ImGuiNavMoveFlags_LoopY | ImGuiNavMoveFlags_WrapX | ImGuiNavMoveFlags_WrapY + ///
+ ///
+ WrapMask = LoopX | LoopY | WrapX | WrapY, + + /// + /// + /// Allow scoring and considering the current NavId as a move target candidate. This is used when the move + /// source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing + /// PageDown from the bottom-most item we need to stay in place) + /// + /// + /// C++: + /// imgui_internal.h:1717 + ///
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4 + ///
+ ///
+ AllowCurrentNavId = 1 << 4, + + /// + /// + /// Store alternate result in NavMoveResultLocalVisible that only comprise elements that are already fully + /// visible (used by PageUp/PageDown) + /// + /// + /// C++: + /// imgui_internal.h:1718 + ///
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5 + ///
+ ///
+ AlsoScoreVisibleSet = 1 << 5, + + /// + /// + /// Force scrolling to min/max (used by Home/End) // FIXME-NAV: Aim to remove or reword, probably + /// unnecessary + /// + /// + /// C++: + /// imgui_internal.h:1719 + ///
ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6 + ///
+ ///
+ ScrollToEdgeY = 1 << 6, + + /// + /// + /// C++: + /// imgui_internal.h:1720 + ///
ImGuiNavMoveFlags_Forwarded = 1 << 7 + ///
+ ///
+ Forwarded = 1 << 7, + + /// + /// + /// Dummy scoring for debug purpose, don't apply result + /// + /// + /// C++: + /// imgui_internal.h:1721 + ///
ImGuiNavMoveFlags_DebugNoResult = 1 << 8 + ///
+ ///
+ DebugNoResult = 1 << 8, + + /// + /// + /// Requests from focus API can land/focus/activate items even if they are marked with _NoTabStop (see + /// NavProcessItemForTabbingRequest() for details) + /// + /// + /// C++: + /// imgui_internal.h:1722 + ///
ImGuiNavMoveFlags_FocusApi = 1 << 9 + ///
+ ///
+ FocusApi = 1 << 9, + + /// + /// + /// == Focus + Activate if item is Inputable + DontChangeNavHighlight + /// + /// + /// C++: + /// imgui_internal.h:1723 + ///
ImGuiNavMoveFlags_IsTabbing = 1 << 10 + ///
+ ///
+ IsTabbing = 1 << 10, + + /// + /// + /// Identify a PageDown/PageUp request. + /// + /// + /// C++: + /// imgui_internal.h:1724 + ///
ImGuiNavMoveFlags_IsPageMove = 1 << 11 + ///
+ ///
+ IsPageMove = 1 << 11, + + /// + /// + /// Activate/select target item. + /// + /// + /// C++: + /// imgui_internal.h:1725 + ///
ImGuiNavMoveFlags_Activate = 1 << 12 + ///
+ ///
+ Activate = 1 << 12, + + /// + /// + /// Don't trigger selection by not setting g.NavJustMovedTo + /// + /// + /// C++: + /// imgui_internal.h:1726 + ///
ImGuiNavMoveFlags_NoSelect = 1 << 13 + ///
+ ///
+ NoSelect = 1 << 13, + + /// + /// + /// Do not alter the nav cursor visible state + /// + /// + /// C++: + /// imgui_internal.h:1727 + ///
ImGuiNavMoveFlags_NoSetNavCursorVisible = 1 << 14 + ///
+ ///
+ NoSetNavCursorVisible = 1 << 14, + + /// + /// + /// (Experimental) Do not clear active id when applying move result + /// + /// + /// C++: + /// imgui_internal.h:1728 + ///
ImGuiNavMoveFlags_NoClearActiveId = 1 << 15 + ///
+ ///
+ NoClearActiveId = 1 << 15, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavRenderCursorFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavRenderCursorFlags.gen.cs new file mode 100644 index 0000000..243684e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNavRenderCursorFlags.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1694 + ///
enum ImGuiNavRenderCursorFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiNavRenderCursorFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1696 + ///
ImGuiNavRenderCursorFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// Compact highlight, no padding/distance from focused item + /// + /// + /// C++: + /// imgui_internal.h:1697 + ///
ImGuiNavRenderCursorFlags_Compact = 1 << 1 + ///
+ ///
+ Compact = 1 << 1, + + /// + /// + /// Draw rectangular highlight if (g.NavId == id) even when g.NavCursorVisible == false, aka even when using + /// the mouse. + /// + /// + /// C++: + /// imgui_internal.h:1698 + ///
ImGuiNavRenderCursorFlags_AlwaysDraw = 1 << 2 + ///
+ ///
+ AlwaysDraw = 1 << 2, + + /// + /// + /// C++: + /// imgui_internal.h:1699 + ///
ImGuiNavRenderCursorFlags_NoRounding = 1 << 3 + ///
+ ///
+ NoRounding = 1 << 3, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiNextItemDataFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNextItemDataFlags.gen.cs new file mode 100644 index 0000000..1aed813 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNextItemDataFlags.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1328 + ///
enum ImGuiNextItemDataFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiNextItemDataFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1330 + ///
ImGuiNextItemDataFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1331 + ///
ImGuiNextItemDataFlags_HasWidth = 1 << 0 + ///
+ ///
+ HasWidth = 1 << 0, + + /// + /// + /// C++: + /// imgui_internal.h:1332 + ///
ImGuiNextItemDataFlags_HasOpen = 1 << 1 + ///
+ ///
+ HasOpen = 1 << 1, + + /// + /// + /// C++: + /// imgui_internal.h:1333 + ///
ImGuiNextItemDataFlags_HasShortcut = 1 << 2 + ///
+ ///
+ HasShortcut = 1 << 2, + + /// + /// + /// C++: + /// imgui_internal.h:1334 + ///
ImGuiNextItemDataFlags_HasRefVal = 1 << 3 + ///
+ ///
+ HasRefVal = 1 << 3, + + /// + /// + /// C++: + /// imgui_internal.h:1335 + ///
ImGuiNextItemDataFlags_HasStorageID = 1 << 4 + ///
+ ///
+ HasStorageID = 1 << 4, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiNextWindowDataFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNextWindowDataFlags.gen.cs new file mode 100644 index 0000000..3f1e0d5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiNextWindowDataFlags.gen.cs @@ -0,0 +1,152 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1276 + ///
enum ImGuiNextWindowDataFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiNextWindowDataFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1278 + ///
ImGuiNextWindowDataFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1279 + ///
ImGuiNextWindowDataFlags_HasPos = 1 << 0 + ///
+ ///
+ HasPos = 1 << 0, + + /// + /// + /// C++: + /// imgui_internal.h:1280 + ///
ImGuiNextWindowDataFlags_HasSize = 1 << 1 + ///
+ ///
+ HasSize = 1 << 1, + + /// + /// + /// C++: + /// imgui_internal.h:1281 + ///
ImGuiNextWindowDataFlags_HasContentSize = 1 << 2 + ///
+ ///
+ HasContentSize = 1 << 2, + + /// + /// + /// C++: + /// imgui_internal.h:1282 + ///
ImGuiNextWindowDataFlags_HasCollapsed = 1 << 3 + ///
+ ///
+ HasCollapsed = 1 << 3, + + /// + /// + /// C++: + /// imgui_internal.h:1283 + ///
ImGuiNextWindowDataFlags_HasSizeConstraint = 1 << 4 + ///
+ ///
+ HasSizeConstraint = 1 << 4, + + /// + /// + /// C++: + /// imgui_internal.h:1284 + ///
ImGuiNextWindowDataFlags_HasFocus = 1 << 5 + ///
+ ///
+ HasFocus = 1 << 5, + + /// + /// + /// C++: + /// imgui_internal.h:1285 + ///
ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 6 + ///
+ ///
+ HasBgAlpha = 1 << 6, + + /// + /// + /// C++: + /// imgui_internal.h:1286 + ///
ImGuiNextWindowDataFlags_HasScroll = 1 << 7 + ///
+ ///
+ HasScroll = 1 << 7, + + /// + /// + /// C++: + /// imgui_internal.h:1287 + ///
ImGuiNextWindowDataFlags_HasWindowFlags = 1 << 8 + ///
+ ///
+ HasWindowFlags = 1 << 8, + + /// + /// + /// C++: + /// imgui_internal.h:1288 + ///
ImGuiNextWindowDataFlags_HasChildFlags = 1 << 9 + ///
+ ///
+ HasChildFlags = 1 << 9, + + /// + /// + /// C++: + /// imgui_internal.h:1289 + ///
ImGuiNextWindowDataFlags_HasRefreshPolicy = 1 << 10 + ///
+ ///
+ HasRefreshPolicy = 1 << 10, + + /// + /// + /// C++: + /// imgui_internal.h:1290 + ///
ImGuiNextWindowDataFlags_HasViewport = 1 << 11 + ///
+ ///
+ HasViewport = 1 << 11, + + /// + /// + /// C++: + /// imgui_internal.h:1291 + ///
ImGuiNextWindowDataFlags_HasDock = 1 << 12 + ///
+ ///
+ HasDock = 1 << 12, + + /// + /// + /// C++: + /// imgui_internal.h:1292 + ///
ImGuiNextWindowDataFlags_HasWindowClass = 1 << 13 + ///
+ ///
+ HasWindowClass = 1 << 13, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiOldColumnFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiOldColumnFlags.gen.cs new file mode 100644 index 0000000..95b10ea --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiOldColumnFlags.gen.cs @@ -0,0 +1,122 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1804 + ///
enum ImGuiOldColumnFlags_ + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + [Flags] + public enum ImGuiOldColumnFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1806 + ///
ImGuiOldColumnFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + None = 0, + + /// + /// + /// Disable column dividers + /// + /// + /// C++: + /// imgui_internal.h:1807 + ///
ImGuiOldColumnFlags_NoBorder = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + NoBorder = 1 << 0, + + /// + /// + /// Disable resizing columns when clicking on the dividers + /// + /// + /// C++: + /// imgui_internal.h:1808 + ///
ImGuiOldColumnFlags_NoResize = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + NoResize = 1 << 1, + + /// + /// + /// Disable column width preservation when adjusting columns + /// + /// + /// C++: + /// imgui_internal.h:1809 + ///
ImGuiOldColumnFlags_NoPreserveWidths = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + NoPreserveWidths = 1 << 2, + + /// + /// + /// Disable forcing columns to fit within window + /// + /// + /// C++: + /// imgui_internal.h:1810 + ///
ImGuiOldColumnFlags_NoForceWithinWindow = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + NoForceWithinWindow = 1 << 3, + + /// + /// + /// Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the + /// columns width at all_. Will eventually remove. + /// + /// + /// C++: + /// imgui_internal.h:1811 + ///
ImGuiOldColumnFlags_GrowParentContentsSize = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! + /// + /// + GrowParentContentsSize = 1 << 4, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiPlotType.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiPlotType.gen.cs new file mode 100644 index 0000000..db0c9e2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiPlotType.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1141 + ///
enum ImGuiPlotType + ///
+ ///
+ public enum ImGuiPlotType : int + { + /// + /// + /// C++: + /// imgui_internal.h:1143 + ///
ImGuiPlotType_Lines + ///
+ ///
+ Lines, + + /// + /// + /// C++: + /// imgui_internal.h:1144 + ///
ImGuiPlotType_Histogram + ///
+ ///
+ Histogram, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiPopupPositionPolicy.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiPopupPositionPolicy.gen.cs new file mode 100644 index 0000000..0f8e7b9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiPopupPositionPolicy.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1446 + ///
enum ImGuiPopupPositionPolicy + ///
+ ///
+ public enum ImGuiPopupPositionPolicy : int + { + /// + /// + /// C++: + /// imgui_internal.h:1448 + ///
ImGuiPopupPositionPolicy_Default + ///
+ ///
+ Default, + + /// + /// + /// C++: + /// imgui_internal.h:1449 + ///
ImGuiPopupPositionPolicy_ComboBox + ///
+ ///
+ ComboBox, + + /// + /// + /// C++: + /// imgui_internal.h:1450 + ///
ImGuiPopupPositionPolicy_Tooltip + ///
+ ///
+ Tooltip, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiScrollFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiScrollFlags.gen.cs new file mode 100644 index 0000000..f8dea13 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiScrollFlags.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1680 + ///
enum ImGuiScrollFlags_ + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + [Flags] + public enum ImGuiScrollFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1682 + ///
ImGuiScrollFlags_None = 0 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + None = 0, + + /// + /// + /// If item is not visible: scroll as little as possible on X axis to bring item back into view [default for + /// X axis] + /// + /// + /// C++: + /// imgui_internal.h:1683 + ///
ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + KeepVisibleEdgeX = 1 << 0, + + /// + /// + /// If item is not visible: scroll as little as possible on Y axis to bring item back into view [default for + /// Y axis for windows that are already visible] + /// + /// + /// C++: + /// imgui_internal.h:1684 + ///
ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + KeepVisibleEdgeY = 1 << 1, + + /// + /// + /// If item is not visible: scroll to make the item centered on X axis [rarely used] + /// + /// + /// C++: + /// imgui_internal.h:1685 + ///
ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + KeepVisibleCenterX = 1 << 2, + + /// + /// + /// If item is not visible: scroll to make the item centered on Y axis + /// + /// + /// C++: + /// imgui_internal.h:1686 + ///
ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + KeepVisibleCenterY = 1 << 3, + + /// + /// + /// Always center the result item on X axis [rarely used] + /// + /// + /// C++: + /// imgui_internal.h:1687 + ///
ImGuiScrollFlags_AlwaysCenterX = 1 << 4 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + AlwaysCenterX = 1 << 4, + + /// + /// + /// Always center the result item on Y axis [default for Y axis for appearing window) + /// + /// + /// C++: + /// imgui_internal.h:1688 + ///
ImGuiScrollFlags_AlwaysCenterY = 1 << 5 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + AlwaysCenterY = 1 << 5, + + /// + /// + /// Disable forwarding scrolling to parent window if required to keep item/rect visible (only scroll window + /// the function was applied to). + /// + /// + /// C++: + /// imgui_internal.h:1689 + ///
ImGuiScrollFlags_NoScrollParent = 1 << 6 + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + NoScrollParent = 1 << 6, + + /// + /// + /// C++: + /// imgui_internal.h:1690 + ///
+ /// ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterX + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + MaskX = KeepVisibleEdgeX | KeepVisibleCenterX | AlwaysCenterX, + + /// + /// + /// C++: + /// imgui_internal.h:1691 + ///
+ /// ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY + ///
+ ///
+ /// + /// + /// Early work-in-progress API for ScrollToItem() + /// + /// + MaskY = KeepVisibleEdgeY | KeepVisibleCenterY | AlwaysCenterY, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiSelectableFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiSelectableFlagsPrivate.gen.cs new file mode 100644 index 0000000..e99ae0d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiSelectableFlagsPrivate.gen.cs @@ -0,0 +1,274 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1060 + ///
enum ImGuiSelectableFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiSelectableFlags_ + /// + /// + public enum ImGuiSelectableFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1379 + ///
ImGuiSelectableFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + None = ImGuiSelectableFlags.None, + + /// + /// + /// Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups) + /// + /// + /// C++: + /// imgui.h:1380 + ///
ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + NoAutoClosePopups = ImGuiSelectableFlags.NoAutoClosePopups, + + /// + /// + /// Frame will span all columns of its container table (text will still fit in current column) + /// + /// + /// C++: + /// imgui.h:1381 + ///
ImGuiSelectableFlags_SpanAllColumns = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + SpanAllColumns = ImGuiSelectableFlags.SpanAllColumns, + + /// + /// + /// Generate press events on double clicks too + /// + /// + /// C++: + /// imgui.h:1382 + ///
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + AllowDoubleClick = ImGuiSelectableFlags.AllowDoubleClick, + + /// + /// + /// Cannot be selected, display grayed out text + /// + /// + /// C++: + /// imgui.h:1383 + ///
ImGuiSelectableFlags_Disabled = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + Disabled = ImGuiSelectableFlags.Disabled, + + /// + /// + /// (WIP) Hit testing to allow subsequent widgets to overlap this one + /// + /// + /// C++: + /// imgui.h:1384 + ///
ImGuiSelectableFlags_AllowOverlap = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + AllowOverlap = ImGuiSelectableFlags.AllowOverlap, + + /// + /// + /// Make the item be displayed as if it is hovered + /// + /// + /// C++: + /// imgui.h:1385 + ///
ImGuiSelectableFlags_Highlight = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + Highlight = ImGuiSelectableFlags.Highlight, + + /// + /// + /// C++: + /// imgui_internal.h:1063 + ///
ImGuiSelectableFlags_NoHoldingActiveID = 1 << 20 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + NoHoldingActiveID = 1 << 20, + + /// + /// + /// (WIP) Auto-select when moved into. This is not exposed in public API as to handle multi-select and + /// modifiers we will need user to explicitly control focus scope. May be replaced with a BeginSelection() + /// API. + /// + /// + /// C++: + /// imgui_internal.h:1064 + ///
ImGuiSelectableFlags_SelectOnNav = 1 << 21 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + SelectOnNav = 1 << 21, + + /// + /// + /// Override button behavior to react on Click (default is Click+Release) + /// + /// + /// C++: + /// imgui_internal.h:1065 + ///
ImGuiSelectableFlags_SelectOnClick = 1 << 22 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + SelectOnClick = 1 << 22, + + /// + /// + /// Override button behavior to react on Release (default is Click+Release) + /// + /// + /// C++: + /// imgui_internal.h:1066 + ///
ImGuiSelectableFlags_SelectOnRelease = 1 << 23 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + SelectOnRelease = 1 << 23, + + /// + /// + /// Span all avail width even if we declared less for layout purpose. FIXME: We may be able to remove this + /// (added in 6251d379, 2bcafc86 for menus) + /// + /// + /// C++: + /// imgui_internal.h:1067 + ///
ImGuiSelectableFlags_SpanAvailWidth = 1 << 24 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + SpanAvailWidth = 1 << 24, + + /// + /// + /// Set Nav/Focus ID on mouse hover (used by MenuItem) + /// + /// + /// C++: + /// imgui_internal.h:1068 + ///
ImGuiSelectableFlags_SetNavIdOnHover = 1 << 25 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + SetNavIdOnHover = 1 << 25, + + /// + /// + /// Disable padding each side with ItemSpacing * 0.5f + /// + /// + /// C++: + /// imgui_internal.h:1069 + ///
ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 26 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + NoPadWithHalfSpacing = 1 << 26, + + /// + /// + /// Don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question + /// will be ImGuiKey_MouseLeft!) + /// + /// + /// C++: + /// imgui_internal.h:1070 + ///
ImGuiSelectableFlags_NoSetKeyOwner = 1 << 27 + ///
+ ///
+ /// + /// + /// NB: need to be in sync with last value of ImGuiSelectableFlags_ + /// + /// + NoSetKeyOwner = 1 << 27, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiSeparatorFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiSeparatorFlags.gen.cs new file mode 100644 index 0000000..5dcc23e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiSeparatorFlags.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1083 + ///
enum ImGuiSeparatorFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiSeparatorFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1085 + ///
ImGuiSeparatorFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar + /// + /// + /// C++: + /// imgui_internal.h:1086 + ///
ImGuiSeparatorFlags_Horizontal = 1 << 0 + ///
+ ///
+ Horizontal = 1 << 0, + + /// + /// + /// C++: + /// imgui_internal.h:1087 + ///
ImGuiSeparatorFlags_Vertical = 1 << 1 + ///
+ ///
+ Vertical = 1 << 1, + + /// + /// + /// Make separator cover all columns of a legacy Columns() set. + /// + /// + /// C++: + /// imgui_internal.h:1088 + ///
ImGuiSeparatorFlags_SpanAllColumns = 1 << 2 + ///
+ ///
+ SpanAllColumns = 1 << 2, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiSliderFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiSliderFlagsPrivate.gen.cs new file mode 100644 index 0000000..f2e116f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiSliderFlagsPrivate.gen.cs @@ -0,0 +1,247 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1053 + ///
enum ImGuiSliderFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiSliderFlags_ + /// + /// + public enum ImGuiSliderFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1983 + ///
ImGuiSliderFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + None = ImGuiSliderFlags.None, + + /// + /// + /// Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with + /// this if using a format-string with small amount of digits. + /// + /// + /// C++: + /// imgui.h:1984 + ///
ImGuiSliderFlags_Logarithmic = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + Logarithmic = ImGuiSliderFlags.Logarithmic, + + /// + /// + /// Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are + /// rounded to those 3 digits). + /// + /// + /// C++: + /// imgui.h:1985 + ///
ImGuiSliderFlags_NoRoundToFormat = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + NoRoundToFormat = ImGuiSliderFlags.NoRoundToFormat, + + /// + /// + /// Disable CTRL+Click or Enter key allowing to input text directly into the widget. + /// + /// + /// C++: + /// imgui.h:1986 + ///
ImGuiSliderFlags_NoInput = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + NoInput = ImGuiSliderFlags.NoInput, + + /// + /// + /// Enable wrapping around from max to min and from min to max. Only supported by DragXXX() functions for + /// now. + /// + /// + /// C++: + /// imgui.h:1987 + ///
ImGuiSliderFlags_WrapAround = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + WrapAround = ImGuiSliderFlags.WrapAround, + + /// + /// + /// Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going + /// out of bounds. + /// + /// + /// C++: + /// imgui.h:1988 + ///
ImGuiSliderFlags_ClampOnInput = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + ClampOnInput = ImGuiSliderFlags.ClampOnInput, + + /// + /// + /// Clamp even if min==max==0.0f. Otherwise due to legacy reason DragXXX functions don't clamp with those + /// values. When your clamping limits are dynamic you almost always want to use it. + /// + /// + /// C++: + /// imgui.h:1989 + ///
ImGuiSliderFlags_ClampZeroRange = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + ClampZeroRange = ImGuiSliderFlags.ClampZeroRange, + + /// + /// + /// Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based + /// on your own logic. + /// + /// + /// C++: + /// imgui.h:1990 + ///
ImGuiSliderFlags_NoSpeedTweaks = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + NoSpeedTweaks = ImGuiSliderFlags.NoSpeedTweaks, + + /// + /// + /// C++: + /// imgui.h:1991 + ///
+ /// ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + AlwaysClamp = ImGuiSliderFlags.AlwaysClamp, + + /// + /// + /// [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API + /// that has got miscast to this enum, and will trigger an assert if needed. + /// + /// + /// C++: + /// imgui.h:1992 + ///
ImGuiSliderFlags_InvalidMask_ = 0x7000000F + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + InvalidMask = ImGuiSliderFlags.InvalidMask, + + /// + /// + /// Should this slider be orientated vertically? + /// + /// + /// C++: + /// imgui_internal.h:1055 + ///
ImGuiSliderFlags_Vertical = 1 << 20 + ///
+ ///
+ /// + /// + /// Extend ImGuiSliderFlags_ + /// + /// + Vertical = 1 << 20, + + /// + /// + /// Consider using g.NextItemData.ItemFlags |= ImGuiItemFlags_ReadOnly instead. + /// + /// + /// C++: + /// imgui_internal.h:1056 + ///
ImGuiSliderFlags_ReadOnly = 1 << 21 + ///
+ ///
+ /// + /// + /// Extend ImGuiSliderFlags_ + /// + /// + ReadOnly = 1 << 21, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiTabBarFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTabBarFlagsPrivate.gen.cs new file mode 100644 index 0000000..2d39f57 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTabBarFlagsPrivate.gen.cs @@ -0,0 +1,287 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2944 + ///
enum ImGuiTabBarFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiTabBarFlags_ + /// + /// + public enum ImGuiTabBarFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1411 + ///
ImGuiTabBarFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + None = ImGuiTabBarFlags.None, + + /// + /// + /// Allow manually dragging tabs to re-order them + New tabs are appended at the end of list + /// + /// + /// C++: + /// imgui.h:1412 + ///
ImGuiTabBarFlags_Reorderable = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + Reorderable = ImGuiTabBarFlags.Reorderable, + + /// + /// + /// Automatically select new tabs when they appear + /// + /// + /// C++: + /// imgui.h:1413 + ///
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + AutoSelectNewTabs = ImGuiTabBarFlags.AutoSelectNewTabs, + + /// + /// + /// Disable buttons to open the tab list popup + /// + /// + /// C++: + /// imgui.h:1414 + ///
ImGuiTabBarFlags_TabListPopupButton = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + TabListPopupButton = ImGuiTabBarFlags.TabListPopupButton, + + /// + /// + /// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You + /// may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) + /// *p_open = false. + /// + /// + /// C++: + /// imgui.h:1415 + ///
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + NoCloseWithMiddleMouseButton = ImGuiTabBarFlags.NoCloseWithMiddleMouseButton, + + /// + /// + /// Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) + /// + /// + /// C++: + /// imgui.h:1416 + ///
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + NoTabListScrollingButtons = ImGuiTabBarFlags.NoTabListScrollingButtons, + + /// + /// + /// Disable tooltips when hovering a tab + /// + /// + /// C++: + /// imgui.h:1417 + ///
ImGuiTabBarFlags_NoTooltip = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + NoTooltip = ImGuiTabBarFlags.NoTooltip, + + /// + /// + /// Draw selected overline markers over selected tab + /// + /// + /// C++: + /// imgui.h:1418 + ///
ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + DrawSelectedOverline = ImGuiTabBarFlags.DrawSelectedOverline, + + /// + /// + /// Shrink down tabs when they don't fit, until width is style.TabMinWidthShrink, then enable scrolling + /// buttons. + /// + /// + /// C++: + /// imgui.h:1421 + ///
ImGuiTabBarFlags_FittingPolicyMixed = 1 << 7 + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyMixed = ImGuiTabBarFlags.FittingPolicyMixed, + + /// + /// + /// Shrink down tabs when they don't fit + /// + /// + /// C++: + /// imgui.h:1422 + ///
ImGuiTabBarFlags_FittingPolicyShrink = 1 << 8 + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyShrink = ImGuiTabBarFlags.FittingPolicyShrink, + + /// + /// + /// Enable scrolling buttons when tabs don't fit + /// + /// + /// C++: + /// imgui.h:1423 + ///
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 9 + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyScroll = ImGuiTabBarFlags.FittingPolicyScroll, + + /// + /// + /// C++: + /// imgui.h:1424 + ///
+ /// ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyMixed | ImGuiTabBarFlags_FittingPolicyShrink | ImGuiTabBarFlags_FittingPolicyScroll + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyMask = ImGuiTabBarFlags.FittingPolicyMask, + + /// + /// + /// C++: + /// imgui.h:1425 + ///
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyMixed + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyDefault = ImGuiTabBarFlags.FittingPolicyDefault, + + /// + /// + /// Part of a dock node [we don't use this in the master branch but it facilitate branch syncing to keep + /// this around] + /// + /// + /// C++: + /// imgui_internal.h:2946 + ///
ImGuiTabBarFlags_DockNode = 1 << 20 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabBarFlags_ + /// + /// + DockNode = 1 << 20, + + /// + /// + /// C++: + /// imgui_internal.h:2947 + ///
ImGuiTabBarFlags_IsFocused = 1 << 21 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabBarFlags_ + /// + /// + IsFocused = 1 << 21, + + /// + /// + /// FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty + /// when reordering tabs + /// + /// + /// C++: + /// imgui_internal.h:2948 + ///
ImGuiTabBarFlags_SaveSettings = 1 << 22 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabBarFlags_ + /// + /// + SaveSettings = 1 << 22, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiTabItemFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTabItemFlagsPrivate.gen.cs new file mode 100644 index 0000000..59090a0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTabItemFlagsPrivate.gen.cs @@ -0,0 +1,275 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2952 + ///
enum ImGuiTabItemFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiTabItemFlags_ + /// + /// + public enum ImGuiTabItemFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1435 + ///
ImGuiTabItemFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + None = ImGuiTabItemFlags.None, + + /// + /// + /// Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure. + /// + /// + /// C++: + /// imgui.h:1436 + ///
ImGuiTabItemFlags_UnsavedDocument = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + UnsavedDocument = ImGuiTabItemFlags.UnsavedDocument, + + /// + /// + /// Trigger flag to programmatically make the tab selected when calling BeginTabItem() + /// + /// + /// C++: + /// imgui.h:1437 + ///
ImGuiTabItemFlags_SetSelected = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + SetSelected = ImGuiTabItemFlags.SetSelected, + + /// + /// + /// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You + /// may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) + /// *p_open = false. + /// + /// + /// C++: + /// imgui.h:1438 + ///
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoCloseWithMiddleMouseButton = ImGuiTabItemFlags.NoCloseWithMiddleMouseButton, + + /// + /// + /// Don't call PushID()/PopID() on BeginTabItem()/EndTabItem() + /// + /// + /// C++: + /// imgui.h:1439 + ///
ImGuiTabItemFlags_NoPushId = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoPushId = ImGuiTabItemFlags.NoPushId, + + /// + /// + /// Disable tooltip for the given tab + /// + /// + /// C++: + /// imgui.h:1440 + ///
ImGuiTabItemFlags_NoTooltip = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoTooltip = ImGuiTabItemFlags.NoTooltip, + + /// + /// + /// Disable reordering this tab or having another tab cross over this tab + /// + /// + /// C++: + /// imgui.h:1441 + ///
ImGuiTabItemFlags_NoReorder = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoReorder = ImGuiTabItemFlags.NoReorder, + + /// + /// + /// Enforce the tab position to the left of the tab bar (after the tab list popup button) + /// + /// + /// C++: + /// imgui.h:1442 + ///
ImGuiTabItemFlags_Leading = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + Leading = ImGuiTabItemFlags.Leading, + + /// + /// + /// Enforce the tab position to the right of the tab bar (before the scrolling buttons) + /// + /// + /// C++: + /// imgui.h:1443 + ///
ImGuiTabItemFlags_Trailing = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + Trailing = ImGuiTabItemFlags.Trailing, + + /// + /// + /// Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop + /// submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab + /// may reappear at end of tab bar. + /// + /// + /// C++: + /// imgui.h:1444 + ///
ImGuiTabItemFlags_NoAssumedClosure = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoAssumedClosure = ImGuiTabItemFlags.NoAssumedClosure, + + /// + /// + /// C++: + /// imgui_internal.h:2954 + ///
ImGuiTabItemFlags_SectionMask_ = ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_Trailing + ///
+ ///
+ /// + /// + /// Extend ImGuiTabItemFlags_ + /// + /// + SectionMask = ImGuiTabItemFlags.Leading | ImGuiTabItemFlags.Trailing, + + /// + /// + /// Track whether p_open was set or not (we'll need this info on the next frame to recompute ContentWidth + /// during layout) + /// + /// + /// C++: + /// imgui_internal.h:2955 + ///
ImGuiTabItemFlags_NoCloseButton = 1 << 20 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabItemFlags_ + /// + /// + NoCloseButton = 1 << 20, + + /// + /// + /// Used by TabItemButton, change the tab item behavior to mimic a button + /// + /// + /// C++: + /// imgui_internal.h:2956 + ///
ImGuiTabItemFlags_Button = 1 << 21 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabItemFlags_ + /// + /// + Button = 1 << 21, + + /// + /// + /// To reserve space e.g. with ImGuiTabItemFlags_Leading + /// + /// + /// C++: + /// imgui_internal.h:2957 + ///
ImGuiTabItemFlags_Invisible = 1 << 22 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabItemFlags_ + /// + /// + Invisible = 1 << 22, + + /// + /// + /// [Docking] Trailing tabs with the _Unsorted flag will be sorted based on the DockOrder of their Window. + /// + /// + /// C++: + /// imgui_internal.h:2958 + ///
ImGuiTabItemFlags_Unsorted = 1 << 23 + ///
+ ///
+ /// + /// + /// Extend ImGuiTabItemFlags_ + /// + /// + Unsorted = 1 << 23, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiTextFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTextFlags.gen.cs new file mode 100644 index 0000000..60ef2e8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTextFlags.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1101 + ///
enum ImGuiTextFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiTextFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1103 + ///
ImGuiTextFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// C++: + /// imgui_internal.h:1104 + ///
ImGuiTextFlags_NoWidthForLargeClippedText = 1 << 0 + ///
+ ///
+ NoWidthForLargeClippedText = 1 << 0, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiTooltipFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTooltipFlags.gen.cs new file mode 100644 index 0000000..3f66075 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTooltipFlags.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1107 + ///
enum ImGuiTooltipFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiTooltipFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1109 + ///
ImGuiTooltipFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// Clear/ignore previously submitted tooltip (defaults to append) + /// + /// + /// C++: + /// imgui_internal.h:1110 + ///
ImGuiTooltipFlags_OverridePrevious = 1 << 1 + ///
+ ///
+ OverridePrevious = 1 << 1, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiTreeNodeFlagsPrivate.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTreeNodeFlagsPrivate.gen.cs new file mode 100644 index 0000000..644413c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTreeNodeFlagsPrivate.gen.cs @@ -0,0 +1,484 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1074 + ///
enum ImGuiTreeNodeFlagsPrivate_ + ///
+ ///
+ /// + /// + /// Extend ImGuiTreeNodeFlags_ + /// + /// + public enum ImGuiTreeNodeFlagsPrivate : int + { + /// + /// + /// C++: + /// imgui.h:1317 + ///
ImGuiTreeNodeFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + None = ImGuiTreeNodeFlags.None, + + /// + /// + /// Draw as selected + /// + /// + /// C++: + /// imgui.h:1318 + ///
ImGuiTreeNodeFlags_Selected = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Selected = ImGuiTreeNodeFlags.Selected, + + /// + /// + /// Draw frame with background (e.g. for CollapsingHeader) + /// + /// + /// C++: + /// imgui.h:1319 + ///
ImGuiTreeNodeFlags_Framed = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Framed = ImGuiTreeNodeFlags.Framed, + + /// + /// + /// Hit testing to allow subsequent widgets to overlap this one + /// + /// + /// C++: + /// imgui.h:1320 + ///
ImGuiTreeNodeFlags_AllowOverlap = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + AllowOverlap = ImGuiTreeNodeFlags.AllowOverlap, + + /// + /// + /// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack + /// + /// + /// C++: + /// imgui.h:1321 + ///
ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + NoTreePushOnOpen = ImGuiTreeNodeFlags.NoTreePushOnOpen, + + /// + /// + /// Don't automatically and temporarily open node when Logging is active (by default logging will + /// automatically open tree nodes) + /// + /// + /// C++: + /// imgui.h:1322 + ///
ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + NoAutoOpenOnLog = ImGuiTreeNodeFlags.NoAutoOpenOnLog, + + /// + /// + /// Default node to be open + /// + /// + /// C++: + /// imgui.h:1323 + ///
ImGuiTreeNodeFlags_DefaultOpen = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + DefaultOpen = ImGuiTreeNodeFlags.DefaultOpen, + + /// + /// + /// Open on double-click instead of simple click (default for multi-select unless any _OpenOnXXX behavior is + /// set explicitly). Both behaviors may be combined. + /// + /// + /// C++: + /// imgui.h:1324 + ///
ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + OpenOnDoubleClick = ImGuiTreeNodeFlags.OpenOnDoubleClick, + + /// + /// + /// Open when clicking on the arrow part (default for multi-select unless any _OpenOnXXX behavior is set + /// explicitly). Both behaviors may be combined. + /// + /// + /// C++: + /// imgui.h:1325 + ///
ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + OpenOnArrow = ImGuiTreeNodeFlags.OpenOnArrow, + + /// + /// + /// No collapsing, no arrow (use as a convenience for leaf nodes). + /// + /// + /// C++: + /// imgui.h:1326 + ///
ImGuiTreeNodeFlags_Leaf = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Leaf = ImGuiTreeNodeFlags.Leaf, + + /// + /// + /// Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the + /// _Leaf flag! + /// + /// + /// C++: + /// imgui.h:1327 + ///
ImGuiTreeNodeFlags_Bullet = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Bullet = ImGuiTreeNodeFlags.Bullet, + + /// + /// + /// Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget + /// height. Equivalent to calling AlignTextToFramePadding() before the node. + /// + /// + /// C++: + /// imgui.h:1328 + ///
ImGuiTreeNodeFlags_FramePadding = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + FramePadding = ImGuiTreeNodeFlags.FramePadding, + + /// + /// + /// Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow + /// adding other items on the same line without using AllowOverlap mode. + /// + /// + /// C++: + /// imgui.h:1329 + ///
ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanAvailWidth = ImGuiTreeNodeFlags.SpanAvailWidth, + + /// + /// + /// Extend hit box to the left-most and right-most edges (cover the indent area). + /// + /// + /// C++: + /// imgui.h:1330 + ///
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanFullWidth = ImGuiTreeNodeFlags.SpanFullWidth, + + /// + /// + /// Narrow hit box + narrow hovering highlight, will only cover the label text. + /// + /// + /// C++: + /// imgui.h:1331 + ///
ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanLabelWidth = ImGuiTreeNodeFlags.SpanLabelWidth, + + /// + /// + /// Frame will span all columns of its container table (label will still fit in current column) + /// + /// + /// C++: + /// imgui.h:1332 + ///
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanAllColumns = ImGuiTreeNodeFlags.SpanAllColumns, + + /// + /// + /// Label will span all columns of its container table + /// + /// + /// C++: + /// imgui.h:1333 + ///
ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + LabelSpanAllColumns = ImGuiTreeNodeFlags.LabelSpanAllColumns, + + /// + /// + /// Nav: left arrow moves back to parent. This is processed in TreePop() when there's an unfullfilled Left + /// nav request remaining. + /// + /// + /// C++: + /// imgui.h:1335 + ///
ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + NavLeftJumpsToParent = ImGuiTreeNodeFlags.NavLeftJumpsToParent, + + /// + /// + /// C++: + /// imgui.h:1336 + ///
+ /// ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + CollapsingHeader = ImGuiTreeNodeFlags.CollapsingHeader, + + /// + /// + /// No lines drawn + /// + /// + /// C++: + /// imgui.h:1340 + ///
ImGuiTreeNodeFlags_DrawLinesNone = 1 << 18 + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920. + /// Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls. + /// + /// + DrawLinesNone = ImGuiTreeNodeFlags.DrawLinesNone, + + /// + /// + /// Horizontal lines to child nodes. Vertical line drawn down to TreePop() position: cover full contents. + /// Faster (for large trees). + /// + /// + /// C++: + /// imgui.h:1341 + ///
ImGuiTreeNodeFlags_DrawLinesFull = 1 << 19 + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920. + /// Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls. + /// + /// + DrawLinesFull = ImGuiTreeNodeFlags.DrawLinesFull, + + /// + /// + /// Horizontal lines to child nodes. Vertical line drawn down to bottom-most child node. Slower (for large + /// trees). + /// + /// + /// C++: + /// imgui.h:1342 + ///
ImGuiTreeNodeFlags_DrawLinesToNodes = 1 << 20 + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920. + /// Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls. + /// + /// + DrawLinesToNodes = ImGuiTreeNodeFlags.DrawLinesToNodes, + + /// + /// + /// Don't claim nav focus when interacting with this item (#8551) + /// + /// + /// C++: + /// imgui_internal.h:1076 + ///
ImGuiTreeNodeFlags_NoNavFocus = 1 << 27 + ///
+ ///
+ /// + /// + /// Extend ImGuiTreeNodeFlags_ + /// + /// + NoNavFocus = 1 << 27, + + /// + /// + /// FIXME-WIP: Hard-coded for CollapsingHeader() + /// + /// + /// C++: + /// imgui_internal.h:1077 + ///
ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 28 + ///
+ ///
+ /// + /// + /// Extend ImGuiTreeNodeFlags_ + /// + /// + ClipLabelForTrailingButton = 1 << 28, + + /// + /// + /// FIXME-WIP: Turn Down arrow into an Up arrow, for reversed trees (#6517) + /// + /// + /// C++: + /// imgui_internal.h:1078 + ///
ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 29 + ///
+ ///
+ /// + /// + /// Extend ImGuiTreeNodeFlags_ + /// + /// + UpsideDownArrow = 1 << 29, + + /// + /// + /// C++: + /// imgui_internal.h:1079 + ///
+ /// ImGuiTreeNodeFlags_OpenOnMask_ = ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow + ///
+ ///
+ /// + /// + /// Extend ImGuiTreeNodeFlags_ + /// + /// + OpenOnMask = ImGuiTreeNodeFlags.OpenOnDoubleClick | ImGuiTreeNodeFlags.OpenOnArrow, + + /// + /// + /// C++: + /// imgui_internal.h:1080 + ///
+ /// ImGuiTreeNodeFlags_DrawLinesMask_ = ImGuiTreeNodeFlags_DrawLinesNone | ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes + ///
+ ///
+ /// + /// + /// Extend ImGuiTreeNodeFlags_ + /// + /// + DrawLinesMask = + ImGuiTreeNodeFlags.DrawLinesNone | ImGuiTreeNodeFlags.DrawLinesFull | ImGuiTreeNodeFlags.DrawLinesToNodes, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiTypingSelectFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTypingSelectFlags.gen.cs new file mode 100644 index 0000000..3261a83 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiTypingSelectFlags.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1767 + ///
enum ImGuiTypingSelectFlags_ + ///
+ ///
+ /// + /// + /// Flags for GetTypingSelectRequest() + /// + /// + [Flags] + public enum ImGuiTypingSelectFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1769 + ///
ImGuiTypingSelectFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for GetTypingSelectRequest() + /// + /// + None = 0, + + /// + /// + /// Backspace to delete character inputs. If using: ensure GetTypingSelectRequest() is not called more than + /// once per frame (filter by e.g. focus state) + /// + /// + /// C++: + /// imgui_internal.h:1770 + ///
ImGuiTypingSelectFlags_AllowBackspace = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for GetTypingSelectRequest() + /// + /// + AllowBackspace = 1 << 0, + + /// + /// + /// Allow "single char" search mode which is activated when pressing the same character multiple times. + /// + /// + /// C++: + /// imgui_internal.h:1771 + ///
ImGuiTypingSelectFlags_AllowSingleCharMode = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for GetTypingSelectRequest() + /// + /// + AllowSingleCharMode = 1 << 1, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowDockStyleCol.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowDockStyleCol.gen.cs new file mode 100644 index 0000000..3a9a328 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowDockStyleCol.gen.cs @@ -0,0 +1,177 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2055 + ///
enum ImGuiWindowDockStyleCol + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + public enum ImGuiWindowDockStyleCol : int + { + /// + /// + /// C++: + /// imgui_internal.h:2057 + ///
ImGuiWindowDockStyleCol_Text + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + Text, + + /// + /// + /// C++: + /// imgui_internal.h:2058 + ///
ImGuiWindowDockStyleCol_TabHovered + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabHovered, + + /// + /// + /// C++: + /// imgui_internal.h:2059 + ///
ImGuiWindowDockStyleCol_TabFocused + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabFocused, + + /// + /// + /// C++: + /// imgui_internal.h:2060 + ///
ImGuiWindowDockStyleCol_TabSelected + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabSelected, + + /// + /// + /// C++: + /// imgui_internal.h:2061 + ///
ImGuiWindowDockStyleCol_TabSelectedOverline + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabSelectedOverline, + + /// + /// + /// C++: + /// imgui_internal.h:2062 + ///
ImGuiWindowDockStyleCol_TabDimmed + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabDimmed, + + /// + /// + /// C++: + /// imgui_internal.h:2063 + ///
ImGuiWindowDockStyleCol_TabDimmedSelected + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabDimmedSelected, + + /// + /// + /// C++: + /// imgui_internal.h:2064 + ///
ImGuiWindowDockStyleCol_TabDimmedSelectedOverline + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + TabDimmedSelectedOverline, + + /// + /// + /// C++: + /// imgui_internal.h:2065 + ///
ImGuiWindowDockStyleCol_COUNT + ///
+ ///
+ /// + /// + /// List of colors that are stored at the time of Begin() into Docked Windows. + /// We currently store the packed colors in a simple array window->DockStyle.Colors[]. + /// A better solution may involve appending into a log of colors in ImGuiContext + store offsets into those arrays in ImGuiWindow, + /// but it would be more complex as we'd need to double-buffer both as e.g. drop target may refer to window from last frame. + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowRefreshFlags.gen.cs b/Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowRefreshFlags.gen.cs new file mode 100644 index 0000000..8841e13 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Enums/ImGuiWindowRefreshFlags.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1267 + ///
enum ImGuiWindowRefreshFlags_ + ///
+ ///
+ [Flags] + public enum ImGuiWindowRefreshFlags : int + { + /// + /// + /// C++: + /// imgui_internal.h:1269 + ///
ImGuiWindowRefreshFlags_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// [EXPERIMENTAL] Try to keep existing contents, USER MUST NOT HONOR BEGIN() RETURNING FALSE AND NOT + /// APPEND. + /// + /// + /// C++: + /// imgui_internal.h:1270 + ///
ImGuiWindowRefreshFlags_TryToAvoidRefresh = 1 << 0 + ///
+ ///
+ TryToAvoidRefresh = 1 << 0, + + /// + /// + /// [EXPERIMENTAL] Always refresh on hover + /// + /// + /// C++: + /// imgui_internal.h:1271 + ///
ImGuiWindowRefreshFlags_RefreshOnHover = 1 << 1 + ///
+ ///
+ RefreshOnHover = 1 << 1, + + /// + /// + /// [EXPERIMENTAL] Always refresh on focus + /// + /// + /// C++: + /// imgui_internal.h:1272 + ///
ImGuiWindowRefreshFlags_RefreshOnFocus = 1 << 2 + ///
+ ///
+ RefreshOnFocus = 1 << 2, + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImBitVector.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImBitVector.gen.cs new file mode 100644 index 0000000..961104a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImBitVector.gen.cs @@ -0,0 +1,88 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImBitVectorExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:650 + ///
void Create(int sz) + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + public static unsafe void Create(this ImBitVectorPtr target, int sz) => + PInvoke.ImBitVector_Create_internal(target, sz); + + /// + /// + /// C++: + /// imgui_internal.h:651 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + public static unsafe void Clear(this ImBitVectorPtr target) => PInvoke.ImBitVector_Clear_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:652 + ///
bool TestBit(int n) const + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + public static unsafe bool TestBit(this ImBitVectorPtr target, int n) => + PInvoke.ImBitVector_TestBit_internal(target, n); + + /// + /// + /// C++: + /// imgui_internal.h:653 + ///
void SetBit(int n) + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + public static unsafe void SetBit(this ImBitVectorPtr target, int n) => + PInvoke.ImBitVector_SetBit_internal(target, n); + + /// + /// + /// C++: + /// imgui_internal.h:654 + ///
void ClearBit(int n) + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + public static unsafe void ClearBit(this ImBitVectorPtr target, int n) => + PInvoke.ImBitVector_ClearBit_internal(target, n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImDrawListSharedData.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImDrawListSharedData.gen.cs new file mode 100644 index 0000000..59a4298 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImDrawListSharedData.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImDrawListSharedDataExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:872 + /// , + /// imgui_draw.cpp:407 + ///
void SetCircleTessellationMaxError(float max_error) + ///
+ ///
+ public static unsafe void SetCircleTessellationMaxError(ImDrawListSharedDataPtr target, float maxError) => + PInvoke.ImDrawListSharedData_SetCircleTessellationMaxError_internal(target, maxError); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs new file mode 100644 index 0000000..89fe3ef --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs @@ -0,0 +1,11009 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public partial class Internal + { + /// + /// + /// C++: + /// imgui_internal.h:3324 + /// , + /// imgui.cpp:5090 + ///
ImGuiIO& GetIO(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// This variant exists to facilitate backends experimenting with multi-threaded parallel context. + /// (#8069, #6293, #5856) + /// + /// + public static unsafe ImGuiIOPtr GetIO(ImGuiContextPtr ctx) => PInvoke.GetIO_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3325 + /// , + /// imgui.cpp:5103 + ///
ImGuiPlatformIO& GetPlatformIO(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// This variant exists to facilitate backends experimenting with multi-threaded parallel context. + /// (#8069, #6293, #5856) + /// + /// + public static unsafe ImGuiPlatformIOPtr GetPlatformIO(ImGuiContextPtr ctx) => + PInvoke.GetPlatformIO_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3326 + ///
inline ImGuiWindow* GetCurrentWindowRead() + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe ImGuiWindowPtr GetCurrentWindowRead() => PInvoke.GetCurrentWindowRead_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3327 + ///
inline ImGuiWindow* GetCurrentWindow() + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe ImGuiWindowPtr GetCurrentWindow() => PInvoke.GetCurrentWindow_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3328 + /// , + /// imgui.cpp:6670 + ///
ImGuiWindow* FindWindowByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe ImGuiWindowPtr FindWindowByID(ImGuiID id) => PInvoke.FindWindowByID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3329 + /// , + /// imgui.cpp:6676 + ///
ImGuiWindow* FindWindowByName(const char* name) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe ImGuiWindowPtr FindWindowByName(ImString name) + { + fixed (byte* name_fixed = name) + { + return PInvoke.FindWindowByName_internal(name_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3330 + /// , + /// imgui.cpp:7506 + ///
+ /// void UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void UpdateWindowParentAndRootLinks( + ImGuiWindowPtr window, + ImGuiWindowFlags flags, + ImGuiWindowPtr parentWindow + ) => PInvoke.UpdateWindowParentAndRootLinks_internal(window, flags, parentWindow); + + /// + /// + /// C++: + /// imgui_internal.h:3331 + /// , + /// imgui.cpp:7529 + ///
void UpdateWindowSkipRefresh(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// [EXPERIMENTAL] Called by Begin(). NextWindowData is valid at this point. + /// This is designed as a toy/test-bed for + /// + /// + public static unsafe void UpdateWindowSkipRefresh(ImGuiWindowPtr window) => + PInvoke.UpdateWindowSkipRefresh_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3332 + /// , + /// imgui.cpp:6890 + ///
ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe float2 CalcWindowNextAutoFitSize(ImGuiWindowPtr window) => + PInvoke.CalcWindowNextAutoFitSize_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3333 + /// , + /// imgui.cpp:8711 + ///
+ /// bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent, bool popup_hierarchy, bool dock_hierarchy) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe bool IsWindowChildOf( + ImGuiWindowPtr window, + ImGuiWindowPtr potentialParent, + bool popupHierarchy, + bool dockHierarchy + ) => PInvoke.IsWindowChildOf_internal(window, potentialParent, popupHierarchy, dockHierarchy); + + /// + /// + /// C++: + /// imgui_internal.h:3334 + /// , + /// imgui.cpp:8727 + ///
bool IsWindowWithinBeginStackOf(ImGuiWindow* window, ImGuiWindow* potential_parent) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe bool IsWindowWithinBeginStackOf( + ImGuiWindowPtr window, + ImGuiWindowPtr potentialParent + ) => PInvoke.IsWindowWithinBeginStackOf_internal(window, potentialParent); + + /// + /// + /// C++: + /// imgui_internal.h:3335 + /// , + /// imgui.cpp:8740 + ///
bool IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe bool IsWindowAbove(ImGuiWindowPtr potentialAbove, ImGuiWindowPtr potentialBelow) => + PInvoke.IsWindowAbove_internal(potentialAbove, potentialBelow); + + /// + /// + /// C++: + /// imgui_internal.h:3336 + /// , + /// imgui.cpp:14820 + ///
bool IsWindowNavFocusable(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// Can we focus this window with CTRL+TAB (or PadMenu + PadFocusPrev/PadFocusNext) + /// Note that NoNavFocus makes the window not reachable with CTRL+TAB but it can still be focused with mouse or programmatically. + /// If you want a window to never be focused, you may use the e.g. NoInputs flag. + /// + /// + public static unsafe bool IsWindowNavFocusable(ImGuiWindowPtr window) => + PInvoke.IsWindowNavFocusable_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3337 + /// , + /// imgui.cpp:8841 + ///
void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void SetWindowPos(ImGuiWindowPtr window, in float2 pos, ImGuiCond cond = default) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.SetWindowPos_internal(window, pos_fixed, cond); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3338 + /// , + /// imgui.cpp:8883 + ///
void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void SetWindowSize(ImGuiWindowPtr window, in float2 size, ImGuiCond cond = default) + { + fixed (float2* size_fixed = &size) + { + PInvoke.SetWindowSize_internal(window, size_fixed, cond); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3339 + /// , + /// imgui.cpp:8923 + ///
void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void SetWindowCollapsed( + ImGuiWindowPtr window, + bool collapsed, + ImGuiCond cond = default + ) => PInvoke.SetWindowCollapsed_internal(window, collapsed, cond); + + /// + /// + /// C++: + /// imgui_internal.h:3340 + /// , + /// imgui.cpp:8936 + ///
+ /// void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void SetWindowHitTestHole(ImGuiWindowPtr window, in float2 pos, in float2 size) + { + fixed (float2* size_fixed = &size) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.SetWindowHitTestHole_internal(window, pos_fixed, size_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3341 + /// , + /// imgui.cpp:8943 + ///
void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindowPtr window) => + PInvoke.SetWindowHiddenAndSkipItemsForCurrentFrame_internal(window); + + /// + /// + /// You may also use SetNextWindowClass()'s FocusRouteParentWindowId field. + /// + /// + /// C++: + /// imgui_internal.h:3342 + ///
+ /// inline void SetWindowParentWindowForFocusRoute(ImGuiWindow* window, ImGuiWindow* parent_window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe void SetWindowParentWindowForFocusRoute( + ImGuiWindowPtr window, + ImGuiWindowPtr parentWindow + ) => PInvoke.SetWindowParentWindowForFocusRoute_internal(window, parentWindow); + + /// + /// + /// C++: + /// imgui_internal.h:3343 + ///
inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe floatRect WindowRectAbsToRel(ImGuiWindowPtr window, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + return PInvoke.WindowRectAbsToRel_internal(window, r_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3344 + ///
inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe floatRect WindowRectRelToAbs(ImGuiWindowPtr window, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + return PInvoke.WindowRectRelToAbs_internal(window, r_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3345 + ///
inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe float2 WindowPosAbsToRel(ImGuiWindowPtr window, in float2 p) + { + fixed (float2* p_fixed = &p) + { + return PInvoke.WindowPosAbsToRel_internal(window, p_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3346 + ///
inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + public static unsafe float2 WindowPosRelToAbs(ImGuiWindowPtr window, in float2 p) + { + fixed (float2* p_fixed = &p) + { + return PInvoke.WindowPosRelToAbs_internal(window, p_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3349 + /// , + /// imgui.cpp:13350 + ///
void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + /// Moving window to front of display and set focus (which happens to be back of our sorted list) + /// + /// + public static unsafe void FocusWindow(ImGuiWindowPtr window, ImGuiFocusRequestFlags flags = default) => + PInvoke.FocusWindow_internal(window, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3350 + /// , + /// imgui.cpp:13419 + ///
+ /// void FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window, ImGuiViewport* filter_viewport, ImGuiFocusRequestFlags flags) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + public static unsafe void FocusTopMostWindowUnderOne( + ImGuiWindowPtr underThisWindow, + ImGuiWindowPtr ignoreWindow, + ImGuiViewportPtr filterViewport, + ImGuiFocusRequestFlags flags + ) => PInvoke.FocusTopMostWindowUnderOne_internal(underThisWindow, ignoreWindow, filterViewport, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3351 + /// , + /// imgui.cpp:13270 + ///
void BringWindowToFocusFront(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + public static unsafe void BringWindowToFocusFront(ImGuiWindowPtr window) => + PInvoke.BringWindowToFocusFront_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3352 + /// , + /// imgui.cpp:13292 + ///
void BringWindowToDisplayFront(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + /// Note technically focus related but rather adjacent and close to BringWindowToFocusFront() + /// + /// + public static unsafe void BringWindowToDisplayFront(ImGuiWindowPtr window) => + PInvoke.BringWindowToDisplayFront_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3353 + /// , + /// imgui.cpp:13307 + ///
void BringWindowToDisplayBack(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + public static unsafe void BringWindowToDisplayBack(ImGuiWindowPtr window) => + PInvoke.BringWindowToDisplayBack_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3354 + /// , + /// imgui.cpp:13321 + ///
void BringWindowToDisplayBehind(ImGuiWindow* window, ImGuiWindow* above_window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + public static unsafe void BringWindowToDisplayBehind(ImGuiWindowPtr window, ImGuiWindowPtr aboveWindow) => + PInvoke.BringWindowToDisplayBehind_internal(window, aboveWindow); + + /// + /// + /// C++: + /// imgui_internal.h:3355 + /// , + /// imgui.cpp:13343 + ///
int FindWindowDisplayIndex(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + public static unsafe int FindWindowDisplayIndex(ImGuiWindowPtr window) => + PInvoke.FindWindowDisplayIndex_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3356 + /// , + /// imgui.cpp:5940 + ///
ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + public static unsafe ImGuiWindowPtr FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindowPtr window) => + PInvoke.FindBottomMostVisibleWindowWithinBeginStack_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3359 + /// , + /// imgui.cpp:9061 + ///
void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags) + ///
+ ///
+ /// + /// + /// Windows: Idle, Refresh Policies [EXPERIMENTAL] + /// + /// + /// This is experimental and meant to be a toy for exploring a future/wider range of features. + /// + /// + public static unsafe void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags) => + PInvoke.SetNextWindowRefreshPolicy_internal(flags); + + /// + /// + /// Register external texture. EXPERIMENTAL: DO NOT USE YET. + /// + /// + /// C++: + /// imgui_internal.h:3362 + /// , + /// imgui.cpp:9378 + ///
void RegisterUserTexture(ImTextureData* tex) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// EXPERIMENTAL: DO NOT USE YET. + /// + /// + public static unsafe void RegisterUserTexture(ImTextureDataPtr tex) => + PInvoke.RegisterUserTexture_internal(tex); + + /// + /// + /// C++: + /// imgui_internal.h:3363 + /// , + /// imgui.cpp:9385 + ///
void UnregisterUserTexture(ImTextureData* tex) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe void UnregisterUserTexture(ImTextureDataPtr tex) => + PInvoke.UnregisterUserTexture_internal(tex); + + /// + /// + /// C++: + /// imgui_internal.h:3364 + /// , + /// imgui.cpp:9393 + ///
void RegisterFontAtlas(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe void RegisterFontAtlas(ImFontAtlasPtr atlas) => + PInvoke.RegisterFontAtlas_internal(atlas); + + /// + /// + /// C++: + /// imgui_internal.h:3365 + /// , + /// imgui.cpp:9403 + ///
void UnregisterFontAtlas(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe void UnregisterFontAtlas(ImFontAtlasPtr atlas) => + PInvoke.UnregisterFontAtlas_internal(atlas); + + /// + /// + /// C++: + /// imgui_internal.h:3366 + /// , + /// imgui.cpp:9420 + ///
+ /// void SetCurrentFont(ImFont* font, float font_size_before_scaling, float font_size_after_scaling) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// Use ImDrawList::_SetTexture(), making our shared g.FontStack[] authoritative against window-local ImDrawList. + /// - Whereas ImDrawList::PushTexture()/PopTexture() is not to be used across Begin() calls. + /// - Note that we don't propagate current texture id when e.g. Begin()-ing into a new window, we never really did... + /// - Some code paths never really fully worked with multiple atlas textures. + /// - The right-ish solution may be to remove _SetTexture() and make AddText/RenderText lazily call PushTexture()/PopTexture() + /// the same way AddImage() does, but then all other primitives would also need to? I don't think we should tackle this problem + /// because we have a concrete need and a test bed for multiple atlas textures. + /// FIXME-NEWATLAS-V2: perhaps we can now leverage ImFontAtlasUpdateDrawListsTextures() ? + /// + /// + public static unsafe void SetCurrentFont( + ImFontPtr font, + float fontSizeBeforeScaling, + float fontSizeAfterScaling + ) => PInvoke.SetCurrentFont_internal(font, fontSizeBeforeScaling, fontSizeAfterScaling); + + /// + /// + /// C++: + /// imgui_internal.h:3367 + /// , + /// imgui.cpp:9442 + ///
void UpdateCurrentFontSize(float restore_font_size_after_scaling) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe void UpdateCurrentFontSize(float restoreFontSizeAfterScaling) => + PInvoke.UpdateCurrentFontSize_internal(restoreFontSizeAfterScaling); + + /// + /// + /// C++: + /// imgui_internal.h:3368 + /// , + /// imgui.cpp:9497 + ///
void SetFontRasterizerDensity(float rasterizer_density) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// Exposed in case user may want to override setting density. + /// IMPORTANT: Begin()/End() is overriding density. Be considerate of this you change it. + /// + /// + public static unsafe void SetFontRasterizerDensity(float rasterizerDensity) => + PInvoke.SetFontRasterizerDensity_internal(rasterizerDensity); + + /// + /// + /// C++: + /// imgui_internal.h:3369 + ///
inline float GetFontRasterizerDensity() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe float GetFontRasterizerDensity() => PInvoke.GetFontRasterizerDensity_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3370 + ///
inline float GetRoundedFontSize(float size) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe float GetRoundedFontSize(float size) => PInvoke.GetRoundedFontSize_internal(size); + + /// + /// + /// C++: + /// imgui_internal.h:3371 + /// , + /// imgui.cpp:9368 + ///
ImFont* GetDefaultFont() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe ImFontPtr GetDefaultFont() => PInvoke.GetDefaultFont_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3372 + /// , + /// imgui_widgets.cpp:4328 + ///
void PushPasswordFont() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe void PushPasswordFont() => PInvoke.PushPasswordFont_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3373 + /// , + /// imgui_widgets.cpp:4344 + ///
void PopPasswordFont() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe void PopPasswordFont() => PInvoke.PopPasswordFont_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3374 + ///
inline ImDrawList* GetForegroundDrawList(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + public static unsafe ImDrawListPtr GetForegroundDrawList(ImGuiWindowPtr window) => + PInvoke.GetForegroundDrawList_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3375 + /// , + /// imgui_draw.cpp:2264 + ///
+ /// void AddDrawListToDrawDataEx(ImDrawData* draw_data, ImVector<ImDrawList*>* out_list, ImDrawList* draw_list) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// Important: 'out_list' is generally going to be draw_data->CmdLists, but may be another temporary list + /// as long at it is expected that the result will be later merged into draw_data->CmdLists[]. + /// + /// + public static unsafe void AddDrawListToDrawDataEx( + ImDrawDataPtr drawData, + out ImVector outList, + ImDrawListPtr drawList + ) + { + fixed (ImVector* outList_fixed = &outList) + { + PInvoke.AddDrawListToDrawDataEx_internal(drawData, outList_fixed, drawList); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3378 + /// , + /// imgui.cpp:4316 + ///
void Initialize() + ///
+ ///
+ /// + /// + /// Init + /// + /// + public static unsafe void Initialize() => PInvoke.Initialize_internal(); + + /// + /// + /// Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context + /// created by CreateContext(). + /// + /// + /// C++: + /// imgui_internal.h:3379 + /// , + /// imgui.cpp:4384 + ///
void Shutdown() + ///
+ ///
+ /// + /// + /// Init + /// + /// + /// This function is merely here to free heap allocations. + /// + /// + public static unsafe void Shutdown() => PInvoke.Shutdown_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3382 + /// , + /// imgui.cpp:10821 + ///
void UpdateInputEvents(bool trickle_fast_inputs) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Process input queue + /// We always call this with the value of 'bool g.IO.ConfigInputTrickleEventQueue'. + /// - trickle_fast_inputs = false : process all events, turn into flattened input state (e.g. successive down/up/down/up will be lost) + /// - trickle_fast_inputs = true : process as many events as possible (successive down/up/down/up will be trickled over several frames so nothing is lost) (new feature in 1.87) + /// + /// + public static unsafe void UpdateInputEvents(bool trickleFastInputs) => + PInvoke.UpdateInputEvents_internal(trickleFastInputs); + + /// + /// + /// C++: + /// imgui_internal.h:3383 + /// , + /// imgui.cpp:5385 + ///
void UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, + /// we want to dispatch inputs to the right target (imgui vs imgui+app) + /// + /// + public static unsafe void UpdateHoveredWindowAndCaptureFlags(in float2? mousePos) + { + var mousePos_ptr = mousePos is { } mousePos_value ? &mousePos_value : null; + PInvoke.UpdateHoveredWindowAndCaptureFlags_internal((float2*)mousePos_ptr); + } + + /// + /// + /// C++: + /// imgui_internal.h:3384 + /// , + /// imgui.cpp:6237 + ///
+ /// void FindHoveredWindowEx(const ImVec2& pos, bool find_first_and_in_any_viewport, ImGuiWindow** out_hovered_window, ImGuiWindow** out_hovered_window_under_moving_window) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Find window given position, search front-to-back + /// - Typically write output back to g.HoveredWindow and g.HoveredWindowUnderMovingWindow. + /// - FIXME: Note that we have an inconsequential lag here: OuterRectClipped is updated in Begin(), so windows moved programmatically + /// with SetWindowPos() and not SetNextWindowPos() will have that rectangle lagging by a frame at the time FindHoveredWindow() is + /// called, aka before the next Begin(). Moving window isn't affected. + /// - The 'find_first_and_in_any_viewport = true' mode is only used by TestEngine. It is simpler to maintain here. + /// + /// + public static unsafe void FindHoveredWindowEx( + in float2 pos, + bool findFirstAndInAnyViewport, + out ImGuiWindowPtr outHoveredWindow, + out ImGuiWindowPtr outHoveredWindowUnderMovingWindow + ) + { + fixed (ImGuiWindowPtr* outHoveredWindowUnderMovingWindow_fixed = &outHoveredWindowUnderMovingWindow) + { + fixed (ImGuiWindowPtr* outHoveredWindow_fixed = &outHoveredWindow) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.FindHoveredWindowEx_internal( + pos_fixed, + findFirstAndInAnyViewport, + (ImGuiWindow**)outHoveredWindow_fixed, + (ImGuiWindow**)outHoveredWindowUnderMovingWindow_fixed + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3385 + /// , + /// imgui.cpp:5170 + ///
void StartMouseMovingWindow(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + public static unsafe void StartMouseMovingWindow(ImGuiWindowPtr window) => + PInvoke.StartMouseMovingWindow_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3386 + /// , + /// imgui.cpp:5195 + ///
void StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// We use 'undock == false' when dragging from title bar to allow moving groups of floating nodes + /// without undocking them. + /// + /// + public static unsafe void StartMouseMovingWindowOrNode( + ImGuiWindowPtr window, + ImGuiDockNodePtr node, + bool undock + ) => PInvoke.StartMouseMovingWindowOrNode_internal(window, node, undock); + + /// + /// + /// C++: + /// imgui_internal.h:3387 + /// , + /// imgui.cpp:5221 + ///
void StopMouseMovingWindow() + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// This is not 100% symetric with StartMouseMovingWindow(). + /// We do NOT clear ActiveID, because: + /// - It would lead to rather confusing recursive code paths. Caller can call ClearActiveID() if desired. + /// - Some code intentionally cancel moving but keep the ActiveID to lock inputs (e.g. code path taken when clicking a disabled item). + /// + /// + public static unsafe void StopMouseMovingWindow() => PInvoke.StopMouseMovingWindow_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3388 + /// , + /// imgui.cpp:5251 + ///
void UpdateMouseMovingWindowNewFrame() + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Handle mouse moving window + /// Note: moving window with the navigation keys (Square + d-pad / CTRL+TAB + Arrows) are processed in NavUpdateWindowing() + /// FIXME: We don't have strong guarantee that g.MovingWindow stay synced with g.ActiveId == g.MovingWindow->MoveId. + /// This is currently enforced by the fact that BeginDragDropSource() is setting all g.ActiveIdUsingXXXX flags to inhibit navigation inputs, + /// but if we should more thoroughly test cases where g.ActiveId or g.MovingWindow gets changed and not the other. + /// + /// + public static unsafe void UpdateMouseMovingWindowNewFrame() => + PInvoke.UpdateMouseMovingWindowNewFrame_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3389 + /// , + /// imgui.cpp:5299 + ///
void UpdateMouseMovingWindowEndFrame() + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Initiate focusing and moving window when clicking on empty space or title bar. + /// Initiate focusing window when clicking on a disabled item. + /// Handle left-click and right-click focus. + /// + /// + public static unsafe void UpdateMouseMovingWindowEndFrame() => + PInvoke.UpdateMouseMovingWindowEndFrame_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3392 + /// , + /// imgui.cpp:4479 + ///
ImGuiID AddContextHook(ImGuiContext* context, const ImGuiContextHook* hook) + ///
+ ///
+ /// + /// + /// Generic context hooks + /// + /// + /// No specific ordering/dependency support, will see as needed + /// + /// + public static unsafe ImGuiID AddContextHook(ImGuiContextPtr context, ImGuiContextHookPtr hook) => + PInvoke.AddContextHook_internal(context, hook); + + /// + /// + /// C++: + /// imgui_internal.h:3393 + /// , + /// imgui.cpp:4489 + ///
void RemoveContextHook(ImGuiContext* context, ImGuiID hook_to_remove) + ///
+ ///
+ /// + /// + /// Generic context hooks + /// + /// + /// Deferred removal, avoiding issue with changing vector while iterating it + /// + /// + public static unsafe void RemoveContextHook(ImGuiContextPtr context, ImGuiID hookToRemove) => + PInvoke.RemoveContextHook_internal(context, hookToRemove); + + /// + /// + /// C++: + /// imgui_internal.h:3394 + /// , + /// imgui.cpp:4500 + ///
void CallContextHooks(ImGuiContext* context, ImGuiContextHookType type) + ///
+ ///
+ /// + /// + /// Generic context hooks + /// + /// + /// Call context hooks (used by e.g. test engine) + /// We assume a small number of hooks so all stored in same array + /// + /// + public static unsafe void CallContextHooks(ImGuiContextPtr context, ImGuiContextHookType type) => + PInvoke.CallContextHooks_internal(context, type); + + /// + /// + /// C++: + /// imgui_internal.h:3397 + /// , + /// imgui.cpp:16284 + ///
+ /// void TranslateWindowsInViewport(ImGuiViewportP* viewport, const ImVec2& old_pos, const ImVec2& new_pos, const ImVec2& old_size, const ImVec2& new_size) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// Translate Dear ImGui windows when a Host Viewport has been moved + /// (This additionally keeps windows at the same place when ImGuiConfigFlags_ViewportsEnable is toggled!) + /// + /// + public static unsafe void TranslateWindowsInViewport( + ImGuiViewportPPtr viewport, + in float2 oldPos, + in float2 newPos, + in float2 oldSize, + in float2 newSize + ) + { + fixed (float2* newSize_fixed = &newSize) + { + fixed (float2* oldSize_fixed = &oldSize) + { + fixed (float2* newPos_fixed = &newPos) + { + fixed (float2* oldPos_fixed = &oldPos) + { + PInvoke.TranslateWindowsInViewport_internal( + viewport, + oldPos_fixed, + newPos_fixed, + oldSize_fixed, + newSize_fixed + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3398 + /// , + /// imgui.cpp:16304 + ///
void ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!) + /// + /// + public static unsafe void ScaleWindowsInViewport(ImGuiViewportPPtr viewport, float scale) => + PInvoke.ScaleWindowsInViewport_internal(viewport, scale); + + /// + /// + /// C++: + /// imgui_internal.h:3399 + /// , + /// imgui.cpp:17123 + ///
void DestroyPlatformWindow(ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public static unsafe void DestroyPlatformWindow(ImGuiViewportPPtr viewport) => + PInvoke.DestroyPlatformWindow_internal(viewport); + + /// + /// + /// C++: + /// imgui_internal.h:3400 + /// , + /// imgui.cpp:16215 + ///
void SetWindowViewport(ImGuiWindow* window, ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public static unsafe void SetWindowViewport(ImGuiWindowPtr window, ImGuiViewportPPtr viewport) => + PInvoke.SetWindowViewport_internal(window, viewport); + + /// + /// + /// C++: + /// imgui_internal.h:3401 + /// , + /// imgui.cpp:16195 + ///
void SetCurrentViewport(ImGuiWindow* window, ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public static unsafe void SetCurrentViewport(ImGuiWindowPtr window, ImGuiViewportPPtr viewport) => + PInvoke.SetCurrentViewport_internal(window, viewport); + + /// + /// + /// C++: + /// imgui_internal.h:3402 + /// , + /// imgui.cpp:17113 + ///
const ImGuiPlatformMonitor* GetViewportPlatformMonitor(ImGuiViewport* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// Return value is always != NULL, but don't hold on it across frames. + /// + /// + public static unsafe ImGuiPlatformMonitorPtr GetViewportPlatformMonitor(ImGuiViewportPtr viewport) => + PInvoke.GetViewportPlatformMonitor_internal(viewport); + + /// + /// + /// C++: + /// imgui_internal.h:3403 + /// , + /// imgui.cpp:16323 + ///
+ /// ImGuiViewportP* FindHoveredViewportFromPlatformWindowStack(const ImVec2& mouse_platform_pos) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// If the backend doesn't set MouseLastHoveredViewport or doesn't honor ImGuiViewportFlags_NoInputs, we do a search ourselves. + /// A) It won't take account of the possibility that non-imgui windows may be in-between our dragged window and our target window. + /// B) It requires Platform_GetWindowFocus to be implemented by backend. + /// + /// + public static unsafe ImGuiViewportPPtr FindHoveredViewportFromPlatformWindowStack( + in float2 mousePlatformPos + ) + { + fixed (float2* mousePlatformPos_fixed = &mousePlatformPos) + { + return PInvoke.FindHoveredViewportFromPlatformWindowStack_internal(mousePlatformPos_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3406 + /// , + /// imgui.cpp:15788 + ///
void MarkIniSettingsDirty() + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public static unsafe void MarkIniSettingsDirty() => PInvoke.MarkIniSettingsDirty_internal_0(); + + /// + /// + /// C++: + /// imgui_internal.h:3407 + /// , + /// imgui.cpp:15795 + ///
void MarkIniSettingsDirty(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public static unsafe void MarkIniSettingsDirty(ImGuiWindowPtr window) => + PInvoke.MarkIniSettingsDirty_internal_1(window); + + /// + /// + /// C++: + /// imgui_internal.h:3408 + /// , + /// imgui.cpp:15828 + ///
void ClearIniSettings() + ///
+ ///
+ /// + /// + /// Settings + /// + /// + /// Clear all settings (windows, tables, docking etc.) + /// + /// + public static unsafe void ClearIniSettings() => PInvoke.ClearIniSettings_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3409 + /// , + /// imgui.cpp:15803 + ///
void AddSettingsHandler(const ImGuiSettingsHandler* handler) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public static unsafe void AddSettingsHandler(ImGuiSettingsHandlerPtr handler) => + PInvoke.AddSettingsHandler_internal(handler); + + /// + /// + /// C++: + /// imgui_internal.h:3410 + /// , + /// imgui.cpp:15810 + ///
void RemoveSettingsHandler(const char* type_name) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public static unsafe void RemoveSettingsHandler(ImString typeName) + { + fixed (byte* typeName_fixed = typeName) + { + PInvoke.RemoveSettingsHandler_internal(typeName_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3411 + /// , + /// imgui.cpp:15817 + ///
ImGuiSettingsHandler* FindSettingsHandler(const char* type_name) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public static unsafe ImGuiSettingsHandlerPtr FindSettingsHandler(ImString typeName) + { + fixed (byte* typeName_fixed = typeName) + { + return PInvoke.FindSettingsHandler_internal(typeName_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3414 + /// , + /// imgui.cpp:15950 + ///
ImGuiWindowSettings* CreateNewWindowSettings(const char* name) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + public static unsafe ImGuiWindowSettingsPtr CreateNewWindowSettings(ImString name) + { + fixed (byte* name_fixed = name) + { + return PInvoke.CreateNewWindowSettings_internal(name_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3415 + /// , + /// imgui.cpp:15975 + ///
ImGuiWindowSettings* FindWindowSettingsByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + /// We don't provide a FindWindowSettingsByName() because Docking system doesn't always hold on names. + /// This is called once per window .ini entry + once per newly instantiated window. + /// + /// + public static unsafe ImGuiWindowSettingsPtr FindWindowSettingsByID(ImGuiID id) => + PInvoke.FindWindowSettingsByID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3416 + /// , + /// imgui.cpp:15985 + ///
ImGuiWindowSettings* FindWindowSettingsByWindow(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + /// This is faster if you are holding on a Window already as we don't need to perform a search. + /// + /// + public static unsafe ImGuiWindowSettingsPtr FindWindowSettingsByWindow(ImGuiWindowPtr window) => + PInvoke.FindWindowSettingsByWindow_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3417 + /// , + /// imgui.cpp:15994 + ///
void ClearWindowSettings(const char* name) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + /// This will revert window to its initial state, including enabling the + /// ImGuiCond_FirstUseEver/ImGuiCond_Once conditions once more. + /// + /// + public static unsafe void ClearWindowSettings(ImString name) + { + fixed (byte* name_fixed = name) + { + PInvoke.ClearWindowSettings_internal(name_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3420 + /// , + /// imgui.cpp:16135 + ///
void LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count) + ///
+ ///
+ /// + /// + /// Localization + /// + /// + public static unsafe void LocalizeRegisterEntries(ImGuiLocEntryPtr entries, int count) => + PInvoke.LocalizeRegisterEntries_internal(entries, count); + + /// + /// + /// C++: + /// imgui_internal.h:3421 + ///
inline const char* LocalizeGetMsg(ImGuiLocKey key) + ///
+ ///
+ /// + /// + /// Localization + /// + /// + public static unsafe Ptr LocalizeGetMsg(ImGuiLocKey key) => PInvoke.LocalizeGetMsg_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3424 + /// , + /// imgui.cpp:12344 + ///
void SetScrollX(ImGuiWindow* window, float scroll_x) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + public static unsafe void SetScrollX(ImGuiWindowPtr window, float scrollX) => + PInvoke.SetScrollX_internal(window, scrollX); + + /// + /// + /// C++: + /// imgui_internal.h:3425 + /// , + /// imgui.cpp:12351 + ///
void SetScrollY(ImGuiWindow* window, float scroll_y) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + public static unsafe void SetScrollY(ImGuiWindowPtr window, float scrollY) => + PInvoke.SetScrollY_internal(window, scrollY); + + /// + /// + /// C++: + /// imgui_internal.h:3426 + /// , + /// imgui.cpp:12380 + ///
void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + /// Note that a local position will vary depending on initial scroll value, + /// This is a little bit confusing so bear with us: + /// - local_pos = (absolution_pos - window->Pos) + /// - So local_x/local_y are 0.0f for a position at the upper-left corner of a window, + /// and generally local_x/local_y are >(padding+decoration) && <(size-padding-decoration) when in the visible area. + /// - They mostly exist because of legacy API. + /// Following the rules above, when trying to work with scrolling code, consider that: + /// - SetScrollFromPosY(0.0f) == SetScrollY(0.0f + scroll.y) == has no effect! + /// - SetScrollFromPosY(-scroll.y) == SetScrollY(-scroll.y + scroll.y) == SetScrollY(0.0f) == reset scroll. Of course writing SetScrollY(0.0f) directly then makes more sense + /// We store a target position so centering and clamping can occur on the next frame when we are guaranteed to have a known window size + /// + /// + public static unsafe void SetScrollFromPosX(ImGuiWindowPtr window, float localX, float centerXRatio) => + PInvoke.SetScrollFromPosX_internal(window, localX, centerXRatio); + + /// + /// + /// C++: + /// imgui_internal.h:3427 + /// , + /// imgui.cpp:12388 + ///
void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + public static unsafe void SetScrollFromPosY(ImGuiWindowPtr window, float localY, float centerYRatio) => + PInvoke.SetScrollFromPosY_internal(window, localY, centerYRatio); + + /// + /// + /// C++: + /// imgui_internal.h:3430 + /// , + /// imgui.cpp:12235 + ///
void ScrollToItem(ImGuiScrollFlags flags = 0) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + public static unsafe void ScrollToItem(ImGuiScrollFlags flags = default) => + PInvoke.ScrollToItem_internal(flags); + + /// + /// + /// C++: + /// imgui_internal.h:3431 + /// , + /// imgui.cpp:12242 + ///
+ /// void ScrollToRect(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + public static unsafe void ScrollToRect( + ImGuiWindowPtr window, + in floatRect rect, + ImGuiScrollFlags flags = default + ) + { + fixed (floatRect* rect_fixed = &rect) + { + PInvoke.ScrollToRect_internal(window, rect_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3432 + /// , + /// imgui.cpp:12248 + ///
+ /// ImVec2 ScrollToRectEx(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + /// Scroll to keep newly navigated item fully into view + /// + /// + public static unsafe float2 ScrollToRectEx( + ImGuiWindowPtr window, + in floatRect rect, + ImGuiScrollFlags flags = default + ) + { + fixed (floatRect* rect_fixed = &rect) + { + return PInvoke.ScrollToRectEx_internal(window, rect_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3434 + ///
inline void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& rect) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + public static unsafe void ScrollToBringRectIntoView(ImGuiWindowPtr window, in floatRect rect) + { + fixed (floatRect* rect_fixed = &rect) + { + PInvoke.ScrollToBringRectIntoView_internal(window, rect_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3438 + ///
inline ImGuiItemStatusFlags GetItemStatusFlags() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe ImGuiItemStatusFlags GetItemStatusFlags() => PInvoke.GetItemStatusFlags_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3439 + ///
inline ImGuiItemFlags GetItemFlags() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe ImGuiItemFlags GetItemFlags() => PInvoke.GetItemFlags_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3440 + ///
inline ImGuiID GetActiveID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe ImGuiID GetActiveID() => PInvoke.GetActiveID_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3441 + ///
inline ImGuiID GetFocusID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe ImGuiID GetFocusID() => PInvoke.GetFocusID_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3442 + /// , + /// imgui.cpp:4611 + ///
void SetActiveID(ImGuiID id, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe void SetActiveID(ImGuiID id, ImGuiWindowPtr window) => + PInvoke.SetActiveID_internal(id, window); + + /// + /// + /// C++: + /// imgui_internal.h:3443 + /// , + /// imgui.cpp:13523 + ///
void SetFocusID(ImGuiID id, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe void SetFocusID(ImGuiID id, ImGuiWindowPtr window) => + PInvoke.SetFocusID_internal(id, window); + + /// + /// + /// C++: + /// imgui_internal.h:3444 + /// , + /// imgui.cpp:4675 + ///
void ClearActiveID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe void ClearActiveID() => PInvoke.ClearActiveID_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3445 + /// , + /// imgui.cpp:4689 + ///
ImGuiID GetHoveredID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe ImGuiID GetHoveredID() => PInvoke.GetHoveredID_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3446 + /// , + /// imgui.cpp:4680 + ///
void SetHoveredID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe void SetHoveredID(ImGuiID id) => PInvoke.SetHoveredID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3447 + /// , + /// imgui.cpp:11647 + ///
void KeepAliveID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + /// Code not using ItemAdd() may need to call this manually otherwise ActiveId will be cleared. In + /// IMGUI_VERSION_NUM < 18717 this was called by GetID(). + /// + /// + public static unsafe void KeepAliveID(ImGuiID id) => PInvoke.KeepAliveID_internal(id); + + /// + /// + /// Mark data associated to given item as "edited", used by IsItemDeactivatedAfterEdit() function. + /// + /// + /// C++: + /// imgui_internal.h:3448 + /// , + /// imgui.cpp:4695 + ///
void MarkItemEdited(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe void MarkItemEdited(ImGuiID id) => PInvoke.MarkItemEdited_internal(id); + + /// + /// + /// Push given value as-is at the top of the ID stack (whereas PushID combines old and new hashes) + /// + /// + /// C++: + /// imgui_internal.h:3449 + /// , + /// imgui.cpp:9630 + ///
void PushOverrideID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + /// Push a given id value ignoring the ID stack as a seed. + /// + /// + public static unsafe void PushOverrideID(ImGuiID id) => PInvoke.PushOverrideID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3450 + /// , + /// imgui.cpp:9644 + ///
ImGuiID GetIDWithSeed(const char* str_id_begin, const char* str_id_end, ImGuiID seed) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + /// Helper to avoid a common series of PushOverrideID -> GetID() -> PopID() call + /// (note that when using this pattern, ID Stack Tool will tend to not display the intermediate stack level. + /// for that to work we would need to do PushOverrideID() -> ItemAdd() -> PopID() which would alter widget code a little more) + /// + /// + public static unsafe ImGuiID GetIDWithSeed(ImString strId, ImGuiID seed) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.GetIDWithSeed_internal_0(strId_fixed, strId_fixed + strId.Length, seed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3451 + /// , + /// imgui.cpp:9655 + ///
ImGuiID GetIDWithSeed(int n, ImGuiID seed) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + public static unsafe ImGuiID GetIDWithSeed(int n, ImGuiID seed) => + PInvoke.GetIDWithSeed_internal_1(n, seed); + + /// + /// + /// C++: + /// imgui_internal.h:3454 + /// , + /// imgui.cpp:11799 + ///
void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + public static unsafe void ItemSize(in float2 size, float textBaselineY = -1f) + { + fixed (float2* size_fixed = &size) + { + PInvoke.ItemSize_internal_0(size_fixed, textBaselineY); + } + } + + /// + /// + /// FIXME: This is a misleading API since we expect CursorPos to be bb.Min. + /// + /// + /// C++: + /// imgui_internal.h:3455 + ///
inline void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + public static unsafe void ItemSize(in floatRect bb, float textBaselineY = -1f) + { + fixed (floatRect* bb_fixed = &bb) + { + PInvoke.ItemSize_internal_1(bb_fixed, textBaselineY); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3456 + /// , + /// imgui.cpp:11661 + ///
+ /// bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + public static unsafe bool ItemAdd( + in floatRect bb, + ImGuiID id, + Ptr navBb = default, + ImGuiItemFlags extraFlags = default + ) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.ItemAdd_internal(bb_fixed, id, (floatRect*)navBb, extraFlags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3457 + /// , + /// imgui.cpp:4864 + ///
bool ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flags) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// Internal facing ItemHoverable() used when submitting widgets. THIS IS A SUBMISSION NOT A HOVER CHECK. + /// Returns whether the item was hovered, logic differs slightly from IsItemHovered(). + /// (this does not rely on LastItemData it can be called from a ButtonBehavior() call not following an ItemAdd() call) + /// FIXME-LEGACY: the 'ImGuiItemFlags item_flags' parameter was added on 2023-06-28. + /// If you used this in your legacy/custom widgets code: + /// - Commonly: if your ItemHoverable() call comes after an ItemAdd() call: pass 'item_flags = g.LastItemData.ItemFlags'. + /// - Rare: otherwise you may pass 'item_flags = 0' (ImGuiItemFlags_None) unless you want to benefit from special behavior handled by ItemHoverable. + /// + /// + public static unsafe bool ItemHoverable(in floatRect bb, ImGuiID id, ImGuiItemFlags itemFlags) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.ItemHoverable_internal(bb_fixed, id, itemFlags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3458 + /// , + /// imgui.cpp:4719 + ///
bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flags = 0) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + public static unsafe bool IsWindowContentHoverable( + ImGuiWindowPtr window, + ImGuiHoveredFlags flags = default + ) => PInvoke.IsWindowContentHoverable_internal(window, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3459 + /// , + /// imgui.cpp:4956 + ///
bool IsClippedEx(const ImRect& bb, ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// FIXME: This is inlined/duplicated in ItemAdd() + /// FIXME: The id != 0 path is not used by our codebase, may get rid of it? + /// + /// + public static unsafe bool IsClippedEx(in floatRect bb, ImGuiID id) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.IsClippedEx_internal(bb_fixed, id); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3460 + /// , + /// imgui.cpp:4969 + ///
+ /// void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// This is also inlined in ItemAdd() + /// Note: if ImGuiItemStatusFlags_HasDisplayRect is set, user needs to set g.LastItemData.DisplayRect. + /// + /// + public static unsafe void SetLastItemData( + ImGuiID itemId, + ImGuiItemFlags itemFlags, + ImGuiItemStatusFlags statusFlags, + in floatRect itemRect + ) + { + fixed (floatRect* itemRect_fixed = &itemRect) + { + PInvoke.SetLastItemData_internal(itemId, itemFlags, statusFlags, itemRect_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3461 + /// , + /// imgui.cpp:12021 + ///
ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// [Internal] Calculate full item size given user provided 'size' parameter and default width/height. Default width is often == CalcItemWidth(). + /// Those two functions CalcItemWidth vs CalcItemSize are awkwardly named because they are not fully symmetrical. + /// Note that only CalcItemWidth() is publicly exposed. + /// The 4.0f here may be changed to match CalcItemWidth() and/or BeginChild() (right now we have a mismatch which is harmless but undesirable) + /// + /// + public static unsafe float2 CalcItemSize(float2 size, float defaultW, float defaultH) => + PInvoke.CalcItemSize_internal(size, defaultW, defaultH); + + /// + /// + /// C++: + /// imgui_internal.h:3462 + /// , + /// imgui.cpp:4993 + ///
float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + public static unsafe float CalcWrapWidthForPos(in float2 pos, float wrapPosX) + { + fixed (float2* pos_fixed = &pos) + { + return PInvoke.CalcWrapWidthForPos_internal(pos_fixed, wrapPosX); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3463 + /// , + /// imgui.cpp:11965 + ///
void PushMultiItemsWidths(int components, float width_full) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + public static unsafe void PushMultiItemsWidths(int components, float widthFull) => + PInvoke.PushMultiItemsWidths_internal(components, widthFull); + + /// + /// + /// C++: + /// imgui_internal.h:3464 + /// , + /// imgui_widgets.cpp:1839 + ///
+ /// void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess, float width_min) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// Shrink excess width from a set of item, by removing width from the larger items first. + /// Set items Width to -1.0f to disable shrinking this item. + /// + /// + public static unsafe void ShrinkWidths( + ImGuiShrinkWidthItemPtr items, + int count, + float widthExcess, + float widthMin + ) => PInvoke.ShrinkWidths_internal(items, count, widthExcess, widthMin); + + /// + /// + /// C++: + /// imgui_internal.h:3467 + /// , + /// imgui.cpp:3595 + ///
const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx) + ///
+ ///
+ /// + /// + /// Parameter stacks (shared) + /// + /// + public static unsafe ImGuiStyleVarInfoPtr GetStyleVarInfo(ImGuiStyleVar idx) => + PInvoke.GetStyleVarInfo_internal(idx); + + /// + /// + /// C++: + /// imgui_internal.h:3468 + /// , + /// imgui.cpp:8654 + ///
void BeginDisabledOverrideReenable() + ///
+ ///
+ /// + /// + /// Parameter stacks (shared) + /// + /// + /// Could have been called BeginDisabledDisable() but it didn't want to be award nominated for most awkward function name. + /// Ideally we would use a shared e.g. BeginDisabled()->BeginDisabledEx() but earlier needs to be optimal. + /// The whole code for this is awkward, will reevaluate if we find a way to implement SetNextItemDisabled(). + /// + /// + public static unsafe void BeginDisabledOverrideReenable() => + PInvoke.BeginDisabledOverrideReenable_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3469 + /// , + /// imgui.cpp:8665 + ///
void EndDisabledOverrideReenable() + ///
+ ///
+ /// + /// + /// Parameter stacks (shared) + /// + /// + public static unsafe void EndDisabledOverrideReenable() => PInvoke.EndDisabledOverrideReenable_internal(); + + /// + /// + /// -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name. + /// + /// + /// C++: + /// imgui_internal.h:3472 + /// , + /// imgui.cpp:15598 + ///
void LogBegin(ImGuiLogFlags flags, int auto_open_depth) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + /// Start logging/capturing text output + /// + /// + public static unsafe void LogBegin(ImGuiLogFlags flags, int autoOpenDepth) => + PInvoke.LogBegin_internal(flags, autoOpenDepth); + + /// + /// + /// Start logging/capturing to internal buffer + /// + /// + /// C++: + /// imgui_internal.h:3473 + /// , + /// imgui.cpp:15670 + ///
void LogToBuffer(int auto_open_depth = -1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + public static unsafe void LogToBuffer(int autoOpenDepth = -1) => + PInvoke.LogToBuffer_internal(autoOpenDepth); + + /// + /// + /// C++: + /// imgui_internal.h:3474 + /// , + /// imgui.cpp:15539 + ///
+ /// void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + /// Internal version that takes a position to decide on newline placement and pad items according to their depth. + /// We split text into individual lines to add current tree level padding + /// FIXME: This code is a little complicated perhaps, considering simplifying the whole system. + /// + /// + public static unsafe void LogRenderedText(Ptr refPos, ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.LogRenderedText_internal((float2*)refPos, text_fixed, text_fixed + text.Length); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3475 + /// , + /// imgui.cpp:15617 + ///
void LogSetNextTextDecoration(const char* prefix, const char* suffix) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + /// Important: doesn't copy underlying data, use carefully (prefix/suffix must be in scope at the time + /// of the next LogRenderedText) + /// + /// + public static unsafe void LogSetNextTextDecoration(ImString prefix, ImString suffix) + { + fixed (byte* suffix_fixed = suffix) + { + fixed (byte* prefix_fixed = prefix) + { + PInvoke.LogSetNextTextDecoration_internal(prefix_fixed, suffix_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3478 + /// , + /// imgui.cpp:6482 + ///
+ /// bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags) + ///
+ ///
+ /// + /// + /// Childs + /// + /// + public static unsafe bool BeginChildEx( + ImString name, + ImGuiID id, + in float2 sizeArg, + ImGuiChildFlags childFlags, + ImGuiWindowFlags windowFlags + ) + { + fixed (float2* sizeArg_fixed = &sizeArg) + { + fixed (byte* name_fixed = name) + { + return PInvoke.BeginChildEx_internal(name_fixed, id, sizeArg_fixed, childFlags, windowFlags); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3481 + /// , + /// imgui.cpp:12832 + ///
bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_window_flags) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Attention! BeginPopup() adds default flags when calling BeginPopupEx()! + /// + /// + public static unsafe bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extraWindowFlags) => + PInvoke.BeginPopupEx_internal(id, extraWindowFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3482 + /// , + /// imgui.cpp:12852 + ///
+ /// bool BeginPopupMenuEx(ImGuiID id, const char* label, ImGuiWindowFlags extra_window_flags) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + public static unsafe bool BeginPopupMenuEx(ImGuiID id, ImString label, ImGuiWindowFlags extraWindowFlags) + { + fixed (byte* label_fixed = label) + { + return PInvoke.BeginPopupMenuEx_internal(id, label_fixed, extraWindowFlags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3483 + /// , + /// imgui.cpp:12658 + ///
void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Mark popup as open (toggle toward open state). + /// Popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. + /// Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). + /// One open popup per level of the popup hierarchy (NB: when assigning we reset the Window member of ImGuiPopupRef to NULL) + /// + /// + public static unsafe void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popupFlags = default) => + PInvoke.OpenPopupEx_internal(id, popupFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3484 + /// , + /// imgui.cpp:12775 + ///
void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + public static unsafe void ClosePopupToLevel(int remaining, bool restoreFocusToWindowUnderPopup) => + PInvoke.ClosePopupToLevel_internal(remaining, restoreFocusToWindowUnderPopup); + + /// + /// + /// C++: + /// imgui_internal.h:3485 + /// , + /// imgui.cpp:12713 + ///
+ /// void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// When popups are stacked, clicking on a lower level popups puts focus back to it and close popups above it. + /// This function closes any popups that are over 'ref_window'. + /// + /// + public static unsafe void ClosePopupsOverWindow( + ImGuiWindowPtr refWindow, + bool restoreFocusToWindowUnderPopup + ) => PInvoke.ClosePopupsOverWindow_internal(refWindow, restoreFocusToWindowUnderPopup); + + /// + /// + /// C++: + /// imgui_internal.h:3486 + /// , + /// imgui.cpp:12760 + ///
void ClosePopupsExceptModals() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + public static unsafe void ClosePopupsExceptModals() => PInvoke.ClosePopupsExceptModals_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3487 + /// , + /// imgui.cpp:12542 + ///
bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Supported flags: ImGuiPopupFlags_AnyPopupId, ImGuiPopupFlags_AnyPopupLevel + /// + /// + public static unsafe bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popupFlags) => + PInvoke.IsPopupOpen_internal(id, popupFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3488 + /// , + /// imgui.cpp:13097 + ///
ImRect GetPopupAllowedExtentRect(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Note that this is used for popups, which can overlap the non work-area of individual viewports. + /// + /// + public static unsafe floatRect GetPopupAllowedExtentRect(ImGuiWindowPtr window) => + PInvoke.GetPopupAllowedExtentRect_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3489 + /// , + /// imgui.cpp:12583 + ///
ImGuiWindow* GetTopMostPopupModal() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Also see FindBlockingModal(NULL) + /// + /// + public static unsafe ImGuiWindowPtr GetTopMostPopupModal() => PInvoke.GetTopMostPopupModal_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3490 + /// , + /// imgui.cpp:12594 + ///
ImGuiWindow* GetTopMostAndVisiblePopupModal() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// See Demo->Stacked Modal to confirm what this is for. + /// + /// + public static unsafe ImGuiWindowPtr GetTopMostAndVisiblePopupModal() => + PInvoke.GetTopMostAndVisiblePopupModal_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3491 + /// , + /// imgui.cpp:12618 + ///
ImGuiWindow* FindBlockingModal(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// When a modal popup is open, newly created windows that want focus (i.e. are not popups and do not specify ImGuiWindowFlags_NoFocusOnAppearing) + /// should be positioned behind that modal window, unless the window was created inside the modal begin-stack. + /// In case of multiple stacked modals newly created window honors begin stack order and does not go below its own modal parent. + /// - WindowA // FindBlockingModal() returns Modal1 + /// - WindowB // .. returns Modal1 + /// - Modal1 // .. returns Modal2 + /// - WindowC // .. returns Modal2 + /// - WindowD // .. returns Modal2 + /// - Modal2 // .. returns Modal2 + /// - WindowE // .. returns NULL + /// Notes: + /// - FindBlockingModal(NULL) == NULL is generally equivalent to GetTopMostPopupModal() == NULL. + /// Only difference is here we check for ->Active/WasActive but it may be unnecessary. + /// + /// + public static unsafe ImGuiWindowPtr FindBlockingModal(ImGuiWindowPtr window) => + PInvoke.FindBlockingModal_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3492 + /// , + /// imgui.cpp:13118 + ///
ImVec2 FindBestWindowPosForPopup(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + public static unsafe float2 FindBestWindowPosForPopup(ImGuiWindowPtr window) => + PInvoke.FindBestWindowPosForPopup_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3493 + /// , + /// imgui.cpp:13022 + ///
+ /// ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// r_avoid = the rectangle to avoid (e.g. for tooltip it is a rectangle around the mouse cursor which we want to avoid. for popups it's a small point around the cursor.) + /// r_outer = the visible area rectangle, minus safe area padding. If our popup size won't fit because of safe area padding we ignore it. + /// (r_outer is usually equivalent to the viewport rectangle minus padding, but when multi-viewports are enabled and monitor + /// information are available, it may represent the entire platform monitor from the frame of reference of the current viewport. + /// this allows us to have tooltips/popups displayed out of the parent viewport.) + /// + /// + public static unsafe float2 FindBestWindowPosForPopupEx( + in float2 refPos, + in float2 size, + Ptr lastDir, + in floatRect rOuter, + in floatRect rAvoid, + ImGuiPopupPositionPolicy policy + ) + { + fixed (floatRect* rAvoid_fixed = &rAvoid) + { + fixed (floatRect* rOuter_fixed = &rOuter) + { + fixed (float2* size_fixed = &size) + { + fixed (float2* refPos_fixed = &refPos) + { + return PInvoke.FindBestWindowPosForPopupEx_internal( + refPos_fixed, + size_fixed, + (ImGuiDir*)lastDir, + rOuter_fixed, + rAvoid_fixed, + policy + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3496 + /// , + /// imgui.cpp:12450 + ///
+ /// bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags) + ///
+ ///
+ /// + /// + /// Tooltips + /// + /// + public static unsafe bool BeginTooltipEx( + ImGuiTooltipFlags tooltipFlags, + ImGuiWindowFlags extraWindowFlags + ) => PInvoke.BeginTooltipEx_internal(tooltipFlags, extraWindowFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3497 + /// , + /// imgui.cpp:15159 + ///
bool BeginTooltipHidden() + ///
+ ///
+ /// + /// + /// Tooltips + /// + /// + public static unsafe bool BeginTooltipHidden() => PInvoke.BeginTooltipHidden_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3500 + /// , + /// imgui_widgets.cpp:8912 + ///
+ /// bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags) + ///
+ ///
+ /// + /// + /// Menus + /// + /// + /// Important: calling order matters! + /// FIXME: Somehow overlapping with docking tech. + /// FIXME: The "rect-cut" aspect of this could be formalized into a lower-level helper (rect-cut: https://halt.software/dead-simple-layouts) + /// + /// + public static unsafe bool BeginViewportSideBar( + ImString name, + ImGuiViewportPtr viewport, + ImGuiDir dir, + float size, + ImGuiWindowFlags windowFlags + ) + { + fixed (byte* name_fixed = name) + { + return PInvoke.BeginViewportSideBar_internal(name_fixed, viewport, dir, size, windowFlags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3501 + /// , + /// imgui_widgets.cpp:9020 + ///
bool BeginMenuEx(const char* label, const char* icon, bool enabled = true) + ///
+ ///
+ /// + /// + /// Menus + /// + /// + public static unsafe bool BeginMenuEx(ImString label, ImString icon, bool enabled = true) + { + fixed (byte* icon_fixed = icon) + { + fixed (byte* label_fixed = label) + { + return PInvoke.BeginMenuEx_internal(label_fixed, icon_fixed, enabled); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3502 + /// , + /// imgui_widgets.cpp:9255 + ///
+ /// bool MenuItemEx(const char* label, const char* icon, const char* shortcut = NULL, bool selected = false, bool enabled = true) + ///
+ ///
+ /// + /// + /// Menus + /// + /// + public static unsafe bool MenuItemEx( + ImString label, + ImString icon, + ImString shortcut = default, + bool selected = false, + bool enabled = true + ) + { + fixed (byte* shortcut_fixed = shortcut) + { + fixed (byte* icon_fixed = icon) + { + fixed (byte* label_fixed = label) + { + return PInvoke.MenuItemEx_internal( + label_fixed, + icon_fixed, + shortcut_fixed, + selected, + enabled + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3505 + /// , + /// imgui_widgets.cpp:1982 + ///
bool BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags flags) + ///
+ ///
+ /// + /// + /// Combos + /// + /// + public static unsafe bool BeginComboPopup(ImGuiID popupId, in floatRect bb, ImGuiComboFlags flags) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.BeginComboPopup_internal(popupId, bb_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3506 + /// , + /// imgui_widgets.cpp:2056 + ///
bool BeginComboPreview() + ///
+ ///
+ /// + /// + /// Combos + /// + /// + /// Call directly after the BeginCombo/EndCombo block. The preview is designed to only host non-interactive elements + /// (Experimental, see GitHub issues: #1658, #4168) + /// + /// + public static unsafe bool BeginComboPreview() => PInvoke.BeginComboPreview_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3507 + /// , + /// imgui_widgets.cpp:2083 + ///
void EndComboPreview() + ///
+ ///
+ /// + /// + /// Combos + /// + /// + public static unsafe void EndComboPreview() => PInvoke.EndComboPreview_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3510 + /// , + /// imgui.cpp:14019 + ///
void NavInitWindow(ImGuiWindow* window, bool force_reinit) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// This needs to be called before we submit any widget (aka in or before Begin) + /// + /// + public static unsafe void NavInitWindow(ImGuiWindowPtr window, bool forceReinit) => + PInvoke.NavInitWindow_internal(window, forceReinit); + + /// + /// + /// C++: + /// imgui_internal.h:3511 + /// , + /// imgui.cpp:14298 + ///
void NavInitRequestApplyResult() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void NavInitRequestApplyResult() => PInvoke.NavInitRequestApplyResult_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3512 + /// , + /// imgui.cpp:13878 + ///
bool NavMoveRequestButNoResultYet() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe bool NavMoveRequestButNoResultYet() => PInvoke.NavMoveRequestButNoResultYet_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3513 + /// , + /// imgui.cpp:13885 + ///
+ /// void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// FIXME: ScoringRect is not set + /// + /// + public static unsafe void NavMoveRequestSubmit( + ImGuiDir moveDir, + ImGuiDir clipDir, + ImGuiNavMoveFlags moveFlags, + ImGuiScrollFlags scrollFlags + ) => PInvoke.NavMoveRequestSubmit_internal(moveDir, clipDir, moveFlags, scrollFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3514 + /// , + /// imgui.cpp:13939 + ///
+ /// void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Forward will reuse the move request again on the next frame (generally with modifications done to + /// it) + /// + /// + public static unsafe void NavMoveRequestForward( + ImGuiDir moveDir, + ImGuiDir clipDir, + ImGuiNavMoveFlags moveFlags, + ImGuiScrollFlags scrollFlags + ) => PInvoke.NavMoveRequestForward_internal(moveDir, clipDir, moveFlags, scrollFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3515 + /// , + /// imgui.cpp:13910 + ///
void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void NavMoveRequestResolveWithLastItem(ImGuiNavItemDataPtr result) => + PInvoke.NavMoveRequestResolveWithLastItem_internal(result); + + /// + /// + /// C++: + /// imgui_internal.h:3516 + /// , + /// imgui.cpp:13919 + ///
+ /// void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, const ImGuiTreeNodeStackData* tree_node_data) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Called by TreePop() to implement ImGuiTreeNodeFlags_NavLeftJumpsToParent + /// + /// + public static unsafe void NavMoveRequestResolveWithPastTreeNode( + ImGuiNavItemDataPtr result, + ImGuiTreeNodeStackDataPtr treeNodeData + ) => PInvoke.NavMoveRequestResolveWithPastTreeNode_internal(result, treeNodeData); + + /// + /// + /// C++: + /// imgui_internal.h:3517 + /// , + /// imgui.cpp:13931 + ///
void NavMoveRequestCancel() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void NavMoveRequestCancel() => PInvoke.NavMoveRequestCancel_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3518 + /// , + /// imgui.cpp:14498 + ///
void NavMoveRequestApplyResult() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Apply result from previous frame navigation directional move request. Always called from NavUpdate() + /// + /// + public static unsafe void NavMoveRequestApplyResult() => PInvoke.NavMoveRequestApplyResult_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3519 + /// , + /// imgui.cpp:13953 + ///
void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Navigation wrap-around logic is delayed to the end of the frame because this operation is only valid after entire + /// popup is assembled and in case of appended popups it is not clear which EndPopup() call is final. + /// + /// + public static unsafe void NavMoveRequestTryWrapping(ImGuiWindowPtr window, ImGuiNavMoveFlags moveFlags) => + PInvoke.NavMoveRequestTryWrapping_internal(window, moveFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3520 + /// , + /// imgui.cpp:13494 + ///
void NavHighlightActivated(ImGuiID id) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void NavHighlightActivated(ImGuiID id) => PInvoke.NavHighlightActivated_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3521 + /// , + /// imgui.cpp:13501 + ///
void NavClearPreferredPosForAxis(ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void NavClearPreferredPosForAxis(ImGuiAxis axis) => + PInvoke.NavClearPreferredPosForAxis_internal(axis); + + /// + /// + /// C++: + /// imgui_internal.h:3522 + /// , + /// imgui.cpp:13473 + ///
void SetNavCursorVisibleAfterMove() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// (was called NavRestoreHighlightAfterMove() before 1.91.4) + /// + /// + public static unsafe void SetNavCursorVisibleAfterMove() => PInvoke.SetNavCursorVisibleAfterMove_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3523 + /// , + /// imgui.cpp:13727 + ///
void NavUpdateCurrentWindowIsScrollPushableX() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// True when current work location may be scrolled horizontally when moving left / right. + /// This is generally always true UNLESS within a column. We don't have a vertical equivalent. + /// + /// + public static unsafe void NavUpdateCurrentWindowIsScrollPushableX() => + PInvoke.NavUpdateCurrentWindowIsScrollPushableX_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3524 + /// , + /// imgui.cpp:13481 + ///
void SetNavWindow(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void SetNavWindow(ImGuiWindowPtr window) => PInvoke.SetNavWindow_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3525 + /// , + /// imgui.cpp:13507 + ///
+ /// void SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id, const ImRect& rect_rel) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void SetNavID( + ImGuiID id, + ImGuiNavLayer navLayer, + ImGuiID focusScopeId, + in floatRect rectRel + ) + { + fixed (floatRect* rectRel_fixed = &rectRel) + { + PInvoke.SetNavID_internal(id, navLayer, focusScopeId, rectRel_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3526 + /// , + /// imgui.cpp:9143 + ///
void SetNavFocusScope(ImGuiID focus_scope_id) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void SetNavFocusScope(ImGuiID focusScopeId) => + PInvoke.SetNavFocusScope_internal(focusScopeId); + + /// + /// + /// Focus last item (no selection/activation). + /// + /// + /// C++: + /// imgui_internal.h:3531 + /// , + /// imgui.cpp:9171 + ///
void FocusItem() + ///
+ ///
+ /// + /// + /// Focus/Activation + /// This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are + /// much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones. + /// + /// + /// Focus = move navigation cursor, set scrolling, set focus window. + /// + /// + public static unsafe void FocusItem() => PInvoke.FocusItem_internal(); + + /// + /// + /// Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the + /// next frame when the item is encountered again. Was called 'ActivateItem()' before 1.89.7. + /// + /// + /// C++: + /// imgui_internal.h:3532 + /// , + /// imgui.cpp:9189 + ///
void ActivateItemByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Focus/Activation + /// This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are + /// much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones. + /// + /// + public static unsafe void ActivateItemByID(ImGuiID id) => PInvoke.ActivateItemByID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3536 + ///
inline bool IsNamedKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsNamedKey(ImGuiKey key) => PInvoke.IsNamedKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3537 + ///
inline bool IsNamedKeyOrMod(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsNamedKeyOrMod(ImGuiKey key) => PInvoke.IsNamedKeyOrMod_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3538 + ///
inline bool IsLegacyKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsLegacyKey(ImGuiKey key) => PInvoke.IsLegacyKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3539 + ///
inline bool IsKeyboardKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsKeyboardKey(ImGuiKey key) => PInvoke.IsKeyboardKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3540 + ///
inline bool IsGamepadKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsGamepadKey(ImGuiKey key) => PInvoke.IsGamepadKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3541 + ///
inline bool IsMouseKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsMouseKey(ImGuiKey key) => PInvoke.IsMouseKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3542 + ///
inline bool IsAliasKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsAliasKey(ImGuiKey key) => PInvoke.IsAliasKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3543 + ///
inline bool IsLRModKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe bool IsLRModKey(ImGuiKey key) => PInvoke.IsLRModKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3544 + /// , + /// imgui.cpp:9781 + ///
ImGuiKeyChord FixupKeyChord(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe ImGuiKeyChord FixupKeyChord(ImGuiKeyChord keyChord) => + PInvoke.FixupKeyChord_internal(keyChord); + + /// + /// + /// C++: + /// imgui_internal.h:3545 + ///
inline ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + public static unsafe ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key) => + PInvoke.ConvertSingleModFlagToKey_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3554 + /// , + /// imgui.cpp:9790 + ///
ImGuiKeyData* GetKeyData(ImGuiContext* ctx, ImGuiKey key) + ///
+ ///
+ public static unsafe ImGuiKeyDataPtr GetKeyData(ImGuiContextPtr ctx, ImGuiKey key) => + PInvoke.GetKeyData_internal_0(ctx, key); + + /// + /// + /// C++: + /// imgui_internal.h:3555 + ///
inline ImGuiKeyData* GetKeyData(ImGuiKey key) + ///
+ ///
+ public static unsafe ImGuiKeyDataPtr GetKeyData(ImGuiKey key) => PInvoke.GetKeyData_internal_1(key); + + /// + /// + /// C++: + /// imgui_internal.h:3556 + /// , + /// imgui.cpp:9844 + ///
const char* GetKeyChordName(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super. + /// Lifetime of return value: valid until next call to same function. + /// + /// + public static unsafe Ptr GetKeyChordName(ImGuiKeyChord keyChord) => + PInvoke.GetKeyChordName_internal(keyChord); + + /// + /// + /// C++: + /// imgui_internal.h:3557 + ///
inline ImGuiKey MouseButtonToKey(ImGuiMouseButton button) + ///
+ ///
+ public static unsafe ImGuiKey MouseButtonToKey(ImGuiMouseButton button) => + PInvoke.MouseButtonToKey_internal(button); + + /// + /// + /// C++: + /// imgui_internal.h:3558 + /// , + /// imgui.cpp:10355 + ///
bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold = -1.0f) + ///
+ ///
+ /// + /// + /// Return if a mouse click/drag went past the given threshold. Valid to call during the MouseReleased frame. + /// [Internal] This doesn't test if the button is pressed + /// + /// + public static unsafe bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lockThreshold = -1f) => + PInvoke.IsMouseDragPastThreshold_internal(button, lockThreshold); + + /// + /// + /// C++: + /// imgui_internal.h:3559 + /// , + /// imgui.cpp:9906 + ///
+ /// ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down) + ///
+ ///
+ /// + /// + /// Return 2D vector representing the combination of four cardinal direction, with analog value support + /// (for e.g. ImGuiKey_GamepadLStick* values). + /// + /// + public static unsafe float2 GetKeyMagnitude2d( + ImGuiKey keyLeft, + ImGuiKey keyRight, + ImGuiKey keyUp, + ImGuiKey keyDown + ) => PInvoke.GetKeyMagnitude2d_internal(keyLeft, keyRight, keyUp, keyDown); + + /// + /// + /// C++: + /// imgui_internal.h:3560 + /// , + /// imgui.cpp:14102 + ///
float GetNavTweakPressedAmount(ImGuiAxis axis) + ///
+ ///
+ public static unsafe float GetNavTweakPressedAmount(ImGuiAxis axis) => + PInvoke.GetNavTweakPressedAmount_internal(axis); + + /// + /// + /// C++: + /// imgui_internal.h:3561 + /// , + /// imgui.cpp:9868 + ///
int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate) + ///
+ ///
+ /// + /// + /// t0 = previous time (e.g.: g.Time - g.IO.DeltaTime) + /// t1 = current time (e.g.: g.Time) + /// An event is triggered at: + /// t = 0.0f t = repeat_delay, t = repeat_delay + repeat_rate*N + /// + /// + public static unsafe int CalcTypematicRepeatAmount( + float t0, + float t1, + float repeatDelay, + float repeatRate + ) => PInvoke.CalcTypematicRepeatAmount_internal(t0, t1, repeatDelay, repeatRate); + + /// + /// + /// C++: + /// imgui_internal.h:3562 + /// , + /// imgui.cpp:9882 + ///
+ /// void GetTypematicRepeatRate(ImGuiInputFlags flags, float* repeat_delay, float* repeat_rate) + ///
+ ///
+ public static unsafe void GetTypematicRepeatRate( + ImGuiInputFlags flags, + Ptr repeatDelay, + Ptr repeatRate + ) => PInvoke.GetTypematicRepeatRate_internal(flags, (float*)repeatDelay, (float*)repeatRate); + + /// + /// + /// C++: + /// imgui_internal.h:3563 + /// , + /// imgui.cpp:10381 + ///
void TeleportMousePos(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// This is called TeleportMousePos() and not SetMousePos() to emphasis that setting MousePosPrev will effectively clear mouse delta as well. + /// It is expected you only call this if (io.BackendFlags & ImGuiBackendFlags_HasSetMousePos) is set and supported by backend. + /// + /// + public static unsafe void TeleportMousePos(in float2 pos) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.TeleportMousePos_internal(pos_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3564 + /// , + /// imgui.cpp:6436 + ///
void SetActiveIdUsingAllKeyboardKeys() + ///
+ ///
+ /// + /// + /// This is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations. + /// FIXME: It might be undesirable that this will likely disable KeyOwner-aware shortcuts systems. Consider a more fine-tuned version if needed? + /// + /// + public static unsafe void SetActiveIdUsingAllKeyboardKeys() => + PInvoke.SetActiveIdUsingAllKeyboardKeys_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3565 + ///
inline bool IsActiveIdUsingNavDir(ImGuiDir dir) + ///
+ ///
+ public static unsafe bool IsActiveIdUsingNavDir(ImGuiDir dir) => + PInvoke.IsActiveIdUsingNavDir_internal(dir); + + /// + /// + /// C++: + /// imgui_internal.h:3578 + /// , + /// imgui.cpp:10961 + ///
ImGuiID GetKeyOwner(ImGuiKey key) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + public static unsafe ImGuiID GetKeyOwner(ImGuiKey key) => PInvoke.GetKeyOwner_internal(key); + + /// + /// + /// C++: + /// imgui_internal.h:3579 + /// , + /// imgui.cpp:11014 + ///
void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// _LockXXX flags are useful to lock keys away from code which is not input-owner aware. + /// When using _LockXXX flags, you can use ImGuiKeyOwner_Any to lock keys from everyone. + /// - SetKeyOwner(..., None) : clears owner + /// - SetKeyOwner(..., Any, !Lock) : illegal (assert) + /// - SetKeyOwner(..., Any or None, Lock) : set lock + /// + /// + public static unsafe void SetKeyOwner(ImGuiKey key, ImGuiID ownerId, ImGuiInputFlags flags = default) => + PInvoke.SetKeyOwner_internal(key, ownerId, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3580 + /// , + /// imgui.cpp:11031 + ///
+ /// void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// Rarely used helper + /// + /// + public static unsafe void SetKeyOwnersForKeyChord( + ImGuiKeyChord key, + ImGuiID ownerId, + ImGuiInputFlags flags = default + ) => PInvoke.SetKeyOwnersForKeyChord_internal(key, ownerId, flags); + + /// + /// + /// Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() || + /// IsItemActive()) { SetKeyOwner(key, GetItemID());'. + /// + /// + /// C++: + /// imgui_internal.h:3581 + /// , + /// imgui.cpp:11046 + ///
void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// This is more or less equivalent to: + /// if (IsItemHovered() || IsItemActive()) + /// SetKeyOwner(key, GetItemID()); + /// Extensive uses of that (e.g. many calls for a single item) may want to manually perform the tests once and then call SetKeyOwner() multiple times. + /// More advanced usage scenarios may want to call SetKeyOwner() manually based on different condition. + /// Worth noting is that only one item can be hovered and only one item can be active, therefore this usage pattern doesn't need to bother with routing and priority. + /// + /// + public static unsafe void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags) => + PInvoke.SetItemKeyOwner_internal(key, flags); + + /// + /// + /// Test that key is either not owned, either owned by 'owner_id' + /// + /// + /// C++: + /// imgui_internal.h:3582 + /// , + /// imgui.cpp:10981 + ///
bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// TestKeyOwner(..., ID) : (owner == None || owner == ID) + /// TestKeyOwner(..., None) : (owner == None) + /// TestKeyOwner(..., Any) : no owner test + /// All paths are also testing for key not being locked, for the rare cases that key have been locked with using ImGuiInputFlags_LockXXX flags. + /// + /// + public static unsafe bool TestKeyOwner(ImGuiKey key, ImGuiID ownerId) => + PInvoke.TestKeyOwner_internal(key, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3583 + ///
inline ImGuiKeyOwnerData* GetKeyOwnerData(ImGuiContext* ctx, ImGuiKey key) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + public static unsafe ImGuiKeyOwnerDataPtr GetKeyOwnerData(ImGuiContextPtr ctx, ImGuiKey key) => + PInvoke.GetKeyOwnerData_internal(ctx, key); + + /// + /// + /// C++: + /// imgui_internal.h:3591 + /// , + /// imgui.cpp:10176 + ///
bool IsKeyDown(ImGuiKey key, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + public static unsafe bool IsKeyDown(ImGuiKey key, ImGuiID ownerId) => + PInvoke.IsKeyDown_internal(key, ownerId); + + /// + /// + /// Important: when transitioning from old to new IsKeyPressed(): old API has "bool repeat = true", so + /// would default to repeat. New API requiress explicit ImGuiInputFlags_Repeat. + /// + /// + /// C++: + /// imgui_internal.h:3592 + /// , + /// imgui.cpp:10192 + ///
bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + /// Important: unlike legacy IsKeyPressed(ImGuiKey, bool repeat=true) which DEFAULT to repeat, this + /// requires EXPLICIT repeat. + /// + /// + public static unsafe bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID ownerId = default) => + PInvoke.IsKeyPressed_internal(key, flags, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3593 + /// , + /// imgui.cpp:10236 + ///
bool IsKeyReleased(ImGuiKey key, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + public static unsafe bool IsKeyReleased(ImGuiKey key, ImGuiID ownerId) => + PInvoke.IsKeyReleased_internal(key, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3594 + /// , + /// imgui.cpp:11073 + ///
+ /// bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + /// This is equivalent to comparing KeyMods + doing a IsKeyPressed() + /// + /// + public static unsafe bool IsKeyChordPressed( + ImGuiKeyChord keyChord, + ImGuiInputFlags flags, + ImGuiID ownerId = default + ) => PInvoke.IsKeyChordPressed_internal(keyChord, flags, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3595 + /// , + /// imgui.cpp:10253 + ///
bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + public static unsafe bool IsMouseDown(ImGuiMouseButton button, ImGuiID ownerId) => + PInvoke.IsMouseDown_internal(button, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3596 + /// , + /// imgui.cpp:10265 + ///
+ /// bool IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + public static unsafe bool IsMouseClicked( + ImGuiMouseButton button, + ImGuiInputFlags flags, + ImGuiID ownerId = default + ) => PInvoke.IsMouseClicked_internal(button, flags, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3597 + /// , + /// imgui.cpp:10294 + ///
bool IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + public static unsafe bool IsMouseReleased(ImGuiMouseButton button, ImGuiID ownerId) => + PInvoke.IsMouseReleased_internal(button, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3598 + /// , + /// imgui.cpp:10319 + ///
bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + public static unsafe bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID ownerId) => + PInvoke.IsMouseDoubleClicked_internal(button, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3614 + /// , + /// imgui.cpp:11128 + ///
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + public static unsafe bool Shortcut(ImGuiKeyChord keyChord, ImGuiInputFlags flags, ImGuiID ownerId) => + PInvoke.Shortcut_internal(keyChord, flags, ownerId); + + /// + /// + /// owner_id needs to be explicit and cannot be 0 + /// + /// + /// C++: + /// imgui_internal.h:3615 + /// , + /// imgui.cpp:10076 + ///
+ /// bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + /// Request a desired route for an input chord (key + mods). + /// Return true if the route is available this frame. + /// - Routes and key ownership are attributed at the beginning of next frame based on best score and mod state. + /// (Conceptually this does a "Submit for next frame" + "Test for current frame". + /// As such, it could be called TrySetXXX or SubmitXXX, or the Submit and Test operations should be separate.) + /// + /// + public static unsafe bool SetShortcutRouting( + ImGuiKeyChord keyChord, + ImGuiInputFlags flags, + ImGuiID ownerId + ) => PInvoke.SetShortcutRouting_internal(keyChord, flags, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3616 + /// , + /// imgui.cpp:10161 + ///
bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + /// Currently unused by core (but used by tests) + /// Note: this cannot be turned into GetShortcutRouting() because we do the owner_id->routing_id translation, name would be more misleading. + /// + /// + public static unsafe bool TestShortcutRouting(ImGuiKeyChord keyChord, ImGuiID ownerId) => + PInvoke.TestShortcutRouting_internal(keyChord, ownerId); + + /// + /// + /// C++: + /// imgui_internal.h:3617 + /// , + /// imgui.cpp:9964 + ///
ImGuiKeyRoutingData* GetShortcutRoutingData(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + public static unsafe ImGuiKeyRoutingDataPtr GetShortcutRoutingData(ImGuiKeyChord keyChord) => + PInvoke.GetShortcutRoutingData_internal(keyChord); + + /// + /// + /// C++: + /// imgui_internal.h:3621 + /// , + /// imgui.cpp:17386 + ///
void DockContextInitialize(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextInitialize(ImGuiContextPtr ctx) => + PInvoke.DockContextInitialize_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3622 + /// , + /// imgui.cpp:17405 + ///
void DockContextShutdown(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextShutdown(ImGuiContextPtr ctx) => + PInvoke.DockContextShutdown_internal(ctx); + + /// + /// + /// Use root_id==0 to clear all + /// + /// + /// C++: + /// imgui_internal.h:3623 + /// , + /// imgui.cpp:17413 + ///
void DockContextClearNodes(ImGuiContext* ctx, ImGuiID root_id, bool clear_settings_refs) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextClearNodes( + ImGuiContextPtr ctx, + ImGuiID rootId, + bool clearSettingsRefs + ) => PInvoke.DockContextClearNodes_internal(ctx, rootId, clearSettingsRefs); + + /// + /// + /// C++: + /// imgui_internal.h:3624 + /// , + /// imgui.cpp:17423 + ///
void DockContextRebuildNodes(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// [DEBUG] This function also acts as a defacto test to make sure we can rebuild from scratch without a glitch + /// (Different from DockSettingsHandler_ClearAll() + DockSettingsHandler_ApplyAll() because this reuses current settings!) + /// + /// + public static unsafe void DockContextRebuildNodes(ImGuiContextPtr ctx) => + PInvoke.DockContextRebuildNodes_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3625 + /// , + /// imgui.cpp:17436 + ///
void DockContextNewFrameUpdateUndocking(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// Docking context update function, called by NewFrame() + /// + /// + public static unsafe void DockContextNewFrameUpdateUndocking(ImGuiContextPtr ctx) => + PInvoke.DockContextNewFrameUpdateUndocking_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3626 + /// , + /// imgui.cpp:17479 + ///
void DockContextNewFrameUpdateDocking(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// Docking context update function, called by NewFrame() + /// + /// + public static unsafe void DockContextNewFrameUpdateDocking(ImGuiContextPtr ctx) => + PInvoke.DockContextNewFrameUpdateDocking_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3627 + /// , + /// imgui.cpp:17512 + ///
void DockContextEndFrame(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextEndFrame(ImGuiContextPtr ctx) => + PInvoke.DockContextEndFrame_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3628 + /// , + /// imgui.cpp:17533 + ///
ImGuiID DockContextGenNodeID(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe ImGuiID DockContextGenNodeID(ImGuiContextPtr ctx) => + PInvoke.DockContextGenNodeID_internal(ctx); + + /// + /// + /// C++: + /// imgui_internal.h:3629 + /// , + /// imgui.cpp:17732 + ///
+ /// void DockContextQueueDock(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload, ImGuiDir split_dir, float split_ratio, bool split_outer) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextQueueDock( + ImGuiContextPtr ctx, + ImGuiWindowPtr target, + ImGuiDockNodePtr targetNode, + ImGuiWindowPtr payload, + ImGuiDir splitDir, + float splitRatio, + bool splitOuter + ) => + PInvoke.DockContextQueueDock_internal( + ctx, + target, + targetNode, + payload, + splitDir, + splitRatio, + splitOuter + ); + + /// + /// + /// C++: + /// imgui_internal.h:3630 + /// , + /// imgui.cpp:17746 + ///
void DockContextQueueUndockWindow(ImGuiContext* ctx, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextQueueUndockWindow(ImGuiContextPtr ctx, ImGuiWindowPtr window) => + PInvoke.DockContextQueueUndockWindow_internal(ctx, window); + + /// + /// + /// C++: + /// imgui_internal.h:3631 + /// , + /// imgui.cpp:17754 + ///
void DockContextQueueUndockNode(ImGuiContext* ctx, ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextQueueUndockNode(ImGuiContextPtr ctx, ImGuiDockNodePtr node) => + PInvoke.DockContextQueueUndockNode_internal(ctx, node); + + /// + /// + /// C++: + /// imgui_internal.h:3632 + /// , + /// imgui.cpp:17931 + ///
+ /// void DockContextProcessUndockWindow(ImGuiContext* ctx, ImGuiWindow* window, bool clear_persistent_docking_ref = true) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextProcessUndockWindow( + ImGuiContextPtr ctx, + ImGuiWindowPtr window, + bool clearPersistentDockingRef = true + ) => PInvoke.DockContextProcessUndockWindow_internal(ctx, window, clearPersistentDockingRef); + + /// + /// + /// C++: + /// imgui_internal.h:3633 + /// , + /// imgui.cpp:17947 + ///
void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockContextProcessUndockNode(ImGuiContextPtr ctx, ImGuiDockNodePtr node) => + PInvoke.DockContextProcessUndockNode_internal(ctx, node); + + /// + /// + /// C++: + /// imgui_internal.h:3634 + /// , + /// imgui.cpp:17989 + ///
+ /// bool DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// This is mostly used for automation. + /// + /// + public static unsafe bool DockContextCalcDropPosForDocking( + ImGuiWindowPtr target, + ImGuiDockNodePtr targetNode, + ImGuiWindowPtr payloadWindow, + ImGuiDockNodePtr payloadNode, + ImGuiDir splitDir, + bool splitOuter, + out float2 outPos + ) + { + fixed (float2* outPos_fixed = &outPos) + { + return PInvoke.DockContextCalcDropPosForDocking_internal( + target, + targetNode, + payloadWindow, + payloadNode, + splitDir, + splitOuter, + outPos_fixed + ); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3635 + /// , + /// imgui.cpp:17528 + ///
ImGuiDockNode*DockContextFindNodeByID(ImGuiContext* ctx, ImGuiID id) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe ImGuiDockNodePtr DockContextFindNodeByID(ImGuiContextPtr ctx, ImGuiID id) => + PInvoke.DockContextFindNodeByID_internal(ctx, id); + + /// + /// + /// C++: + /// imgui_internal.h:3636 + /// , + /// imgui.cpp:18823 + ///
+ /// void DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// Default handler for g.DockNodeWindowMenuHandler(): display the list of windows for a given dock-node. + /// This is exceptionally stored in a function pointer to also user applications to tweak this menu (undocumented) + /// Custom overrides may want to decorate, group, sort entries. + /// Please note those are internal structures: if you copy this expect occasional breakage. + /// (if you don't need to modify the "Tabs.Size == 1" behavior/path it is recommend you call this function in your handler) + /// + /// + public static unsafe void DockNodeWindowMenuHandler_Default( + ImGuiContextPtr ctx, + ImGuiDockNodePtr node, + ImGuiTabBarPtr tabBar + ) => PInvoke.DockNodeWindowMenuHandler_Default_internal(ctx, node, tabBar); + + /// + /// + /// C++: + /// imgui_internal.h:3637 + /// , + /// imgui.cpp:18865 + ///
bool DockNodeBeginAmendTabBar(ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// User helper to append/amend into a dock node tab bar. Most commonly used to add e.g. a "+" button. + /// + /// + public static unsafe bool DockNodeBeginAmendTabBar(ImGuiDockNodePtr node) => + PInvoke.DockNodeBeginAmendTabBar_internal(node); + + /// + /// + /// C++: + /// imgui_internal.h:3638 + /// , + /// imgui.cpp:18881 + ///
void DockNodeEndAmendTabBar() + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void DockNodeEndAmendTabBar() => PInvoke.DockNodeEndAmendTabBar_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3639 + ///
inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe ImGuiDockNodePtr DockNodeGetRootNode(ImGuiDockNodePtr node) => + PInvoke.DockNodeGetRootNode_internal(node); + + /// + /// + /// C++: + /// imgui_internal.h:3640 + ///
inline bool DockNodeIsInHierarchyOf(ImGuiDockNode* node, ImGuiDockNode* parent) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe bool DockNodeIsInHierarchyOf(ImGuiDockNodePtr node, ImGuiDockNodePtr parent) => + PInvoke.DockNodeIsInHierarchyOf_internal(node, parent); + + /// + /// + /// C++: + /// imgui_internal.h:3641 + ///
inline int DockNodeGetDepth(const ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe int DockNodeGetDepth(ImGuiDockNodePtr node) => PInvoke.DockNodeGetDepth_internal(node); + + /// + /// + /// C++: + /// imgui_internal.h:3642 + ///
inline ImGuiID DockNodeGetWindowMenuButtonId(const ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe ImGuiID DockNodeGetWindowMenuButtonId(ImGuiDockNodePtr node) => + PInvoke.DockNodeGetWindowMenuButtonId_internal(node); + + /// + /// + /// C++: + /// imgui_internal.h:3643 + ///
inline ImGuiDockNode* GetWindowDockNode() + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe ImGuiDockNodePtr GetWindowDockNode() => PInvoke.GetWindowDockNode_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3644 + /// , + /// imgui.cpp:20587 + ///
bool GetWindowAlwaysWantOwnTabBar(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe bool GetWindowAlwaysWantOwnTabBar(ImGuiWindowPtr window) => + PInvoke.GetWindowAlwaysWantOwnTabBar_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3645 + /// , + /// imgui.cpp:20647 + ///
void BeginDocked(ImGuiWindow* window, bool* p_open) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void BeginDocked(ImGuiWindowPtr window, ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.BeginDocked_internal(window, (Bool8*)pOpen_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3645 + /// , + /// imgui.cpp:20647 + ///
void BeginDocked(ImGuiWindow* window, bool* p_open) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void BeginDocked(ImGuiWindowPtr window) => PInvoke.BeginDocked_internal(window, null); + + /// + /// + /// C++: + /// imgui_internal.h:3646 + /// , + /// imgui.cpp:20773 + ///
void BeginDockableDragDropSource(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void BeginDockableDragDropSource(ImGuiWindowPtr window) => + PInvoke.BeginDockableDragDropSource_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3647 + /// , + /// imgui.cpp:20805 + ///
void BeginDockableDragDropTarget(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + public static unsafe void BeginDockableDragDropTarget(ImGuiWindowPtr window) => + PInvoke.BeginDockableDragDropTarget_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3648 + /// , + /// imgui.cpp:19956 + ///
void SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// [Internal] Called via SetNextWindowDockID() + /// + /// + public static unsafe void SetWindowDock(ImGuiWindowPtr window, ImGuiID dockId, ImGuiCond cond) => + PInvoke.SetWindowDock_internal(window, dockId, cond); + + /// + /// + /// C++: + /// imgui_internal.h:3659 + /// , + /// imgui.cpp:20169 + ///
void DockBuilderDockWindow(const char* window_name, ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderDockWindow(ImString windowName, ImGuiID nodeId) + { + fixed (byte* windowName_fixed = windowName) + { + PInvoke.DockBuilderDockWindow_internal(windowName_fixed, nodeId); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3660 + /// , + /// imgui.cpp:20195 + ///
ImGuiDockNode*DockBuilderGetNode(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe ImGuiDockNodePtr DockBuilderGetNode(ImGuiID nodeId) => + PInvoke.DockBuilderGetNode_internal(nodeId); + + /// + /// + /// C++: + /// imgui_internal.h:3661 + ///
inline ImGuiDockNode* DockBuilderGetCentralNode(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe ImGuiDockNodePtr DockBuilderGetCentralNode(ImGuiID nodeId) => + PInvoke.DockBuilderGetCentralNode_internal(nodeId); + + /// + /// + /// C++: + /// imgui_internal.h:3662 + /// , + /// imgui.cpp:20229 + ///
ImGuiID DockBuilderAddNode(ImGuiID node_id = 0, ImGuiDockNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// Make sure to use the ImGuiDockNodeFlags_DockSpace flag to create a dockspace node! Otherwise this will create a floating node! + /// - Floating node: you can then call DockBuilderSetNodePos()/DockBuilderSetNodeSize() to position and size the floating node. + /// - Dockspace node: calling DockBuilderSetNodePos() is unnecessary. + /// - If you intend to split a node immediately after creation using DockBuilderSplitNode(), make sure to call DockBuilderSetNodeSize() beforehand! + /// For various reason, the splitting code currently needs a base size otherwise space may not be allocated as precisely as you would expect. + /// - Use (id == 0) to let the system allocate a node identifier. + /// - Existing node with a same id will be removed. + /// + /// + public static unsafe ImGuiID DockBuilderAddNode( + ImGuiID nodeId = default, + ImGuiDockNodeFlags flags = default + ) => PInvoke.DockBuilderAddNode_internal(nodeId, flags); + + /// + /// + /// Remove node and all its child, undock all windows + /// + /// + /// C++: + /// imgui_internal.h:3663 + /// , + /// imgui.cpp:20252 + ///
void DockBuilderRemoveNode(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderRemoveNode(ImGuiID nodeId) => + PInvoke.DockBuilderRemoveNode_internal(nodeId); + + /// + /// + /// C++: + /// imgui_internal.h:3664 + /// , + /// imgui.cpp:20342 + ///
+ /// void DockBuilderRemoveNodeDockedWindows(ImGuiID node_id, bool clear_settings_refs = true) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderRemoveNodeDockedWindows( + ImGuiID nodeId, + bool clearSettingsRefs = true + ) => PInvoke.DockBuilderRemoveNodeDockedWindows_internal(nodeId, clearSettingsRefs); + + /// + /// + /// Remove all split/hierarchy. All remaining docked windows will be re-docked to the remaining root + /// node (node_id). + /// + /// + /// C++: + /// imgui_internal.h:3665 + /// , + /// imgui.cpp:20272 + ///
void DockBuilderRemoveNodeChildNodes(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// root_id = 0 to remove all, root_id != 0 to remove child of given node. + /// + /// + public static unsafe void DockBuilderRemoveNodeChildNodes(ImGuiID nodeId) => + PInvoke.DockBuilderRemoveNodeChildNodes_internal(nodeId); + + /// + /// + /// C++: + /// imgui_internal.h:3666 + /// , + /// imgui.cpp:20201 + ///
void DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderSetNodePos(ImGuiID nodeId, float2 pos) => + PInvoke.DockBuilderSetNodePos_internal(nodeId, pos); + + /// + /// + /// C++: + /// imgui_internal.h:3667 + /// , + /// imgui.cpp:20211 + ///
void DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderSetNodeSize(ImGuiID nodeId, float2 size) => + PInvoke.DockBuilderSetNodeSize_internal(nodeId, size); + + /// + /// + /// Create 2 child nodes in this parent node. + /// + /// + /// C++: + /// imgui_internal.h:3668 + /// , + /// imgui.cpp:20379 + ///
+ /// ImGuiID DockBuilderSplitNode(ImGuiID node_id, ImGuiDir split_dir, float size_ratio_for_node_at_dir, ImGuiID* out_id_at_dir, ImGuiID* out_id_at_opposite_dir) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// If 'out_id_at_dir' or 'out_id_at_opposite_dir' are non NULL, the function will write out the ID of the two new nodes created. + /// Return value is ID of the node at the specified direction, so same as (*out_id_at_dir) if that pointer is set. + /// FIXME-DOCK: We are not exposing nor using split_outer. + /// + /// + public static unsafe ImGuiID DockBuilderSplitNode( + ImGuiID nodeId, + ImGuiDir splitDir, + float sizeRatioForNodeAtDir, + out ImGuiID outIdAtDir, + out ImGuiID outIdAtOppositeDir + ) + { + fixed (ImGuiID* outIdAtOppositeDir_fixed = &outIdAtOppositeDir) + { + fixed (ImGuiID* outIdAtDir_fixed = &outIdAtDir) + { + return PInvoke.DockBuilderSplitNode_internal( + nodeId, + splitDir, + sizeRatioForNodeAtDir, + outIdAtDir_fixed, + outIdAtOppositeDir_fixed + ); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3669 + /// , + /// imgui.cpp:20490 + ///
+ /// void DockBuilderCopyDockSpace(ImGuiID src_dockspace_id, ImGuiID dst_dockspace_id, ImVector<const char*>* in_window_remap_pairs) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// FIXME: Will probably want to change this signature, in particular how the window remapping pairs are + /// passed. + /// + /// + public static unsafe void DockBuilderCopyDockSpace( + ImGuiID srcDockspaceId, + ImGuiID dstDockspaceId, + Ptr>> inWindowRemapPairs + ) => + PInvoke.DockBuilderCopyDockSpace_internal( + srcDockspaceId, + dstDockspaceId, + (ImVector>*)inWindowRemapPairs + ); + + /// + /// + /// C++: + /// imgui_internal.h:3670 + /// , + /// imgui.cpp:20438 + ///
+ /// void DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id, ImVector<ImGuiID>* out_node_remap_pairs) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderCopyNode( + ImGuiID srcNodeId, + ImGuiID dstNodeId, + out ImVector outNodeRemapPairs + ) + { + fixed (ImVector* outNodeRemapPairs_fixed = &outNodeRemapPairs) + { + PInvoke.DockBuilderCopyNode_internal(srcNodeId, dstNodeId, outNodeRemapPairs_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3671 + /// , + /// imgui.cpp:20456 + ///
void DockBuilderCopyWindowSettings(const char* src_name, const char* dst_name) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + public static unsafe void DockBuilderCopyWindowSettings(ImString srcName, ImString dstName) + { + fixed (byte* dstName_fixed = dstName) + { + fixed (byte* srcName_fixed = srcName) + { + PInvoke.DockBuilderCopyWindowSettings_internal(srcName_fixed, dstName_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3672 + /// , + /// imgui.cpp:20570 + ///
void DockBuilderFinish(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// FIXME-DOCK: This is awkward because in series of split user is likely to loose access to its root + /// node. + /// + /// + public static unsafe void DockBuilderFinish(ImGuiID nodeId) => PInvoke.DockBuilderFinish_internal(nodeId); + + /// + /// + /// C++: + /// imgui_internal.h:3682 + /// , + /// imgui.cpp:9121 + ///
void PushFocusScope(ImGuiID id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Focus Scope + /// This is generally used to identify a unique input location (for e.g. a selection set) + /// There is one per window (automatically set in Begin), but: + /// - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set. + /// So in order to identify a set multiple lists in same window may each need a focus scope. + /// If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope() + /// - Shortcut routing also use focus scope as a default location identifier if an owner is not provided. + /// We don't use the ID Stack for this as it is common to want them separate. + /// + /// + public static unsafe void PushFocusScope(ImGuiID id) => PInvoke.PushFocusScope_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3683 + /// , + /// imgui.cpp:9131 + ///
void PopFocusScope() + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Focus Scope + /// This is generally used to identify a unique input location (for e.g. a selection set) + /// There is one per window (automatically set in Begin), but: + /// - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set. + /// So in order to identify a set multiple lists in same window may each need a focus scope. + /// If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope() + /// - Shortcut routing also use focus scope as a default location identifier if an owner is not provided. + /// We don't use the ID Stack for this as it is common to want them separate. + /// + /// + public static unsafe void PopFocusScope() => PInvoke.PopFocusScope_internal(); + + /// + /// + /// Focus scope we are outputting into, set by PushFocusScope() + /// + /// + /// C++: + /// imgui_internal.h:3684 + ///
inline ImGuiID GetCurrentFocusScope() + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Focus Scope + /// This is generally used to identify a unique input location (for e.g. a selection set) + /// There is one per window (automatically set in Begin), but: + /// - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set. + /// So in order to identify a set multiple lists in same window may each need a focus scope. + /// If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope() + /// - Shortcut routing also use focus scope as a default location identifier if an owner is not provided. + /// We don't use the ID Stack for this as it is common to want them separate. + /// + /// + public static unsafe ImGuiID GetCurrentFocusScope() => PInvoke.GetCurrentFocusScope_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3687 + /// , + /// imgui.cpp:15137 + ///
bool IsDragDropActive() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public static unsafe bool IsDragDropActive() => PInvoke.IsDragDropActive_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3688 + /// , + /// imgui.cpp:15353 + ///
bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public static unsafe bool BeginDragDropTargetCustom(in floatRect bb, ImGuiID id) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.BeginDragDropTargetCustom_internal(bb_fixed, id); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3689 + /// , + /// imgui.cpp:15143 + ///
void ClearDragDrop() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public static unsafe void ClearDragDrop() => PInvoke.ClearDragDrop_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3690 + /// , + /// imgui.cpp:15412 + ///
bool IsDragDropPayloadBeingAccepted() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public static unsafe bool IsDragDropPayloadBeingAccepted() => + PInvoke.IsDragDropPayloadBeingAccepted_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3691 + /// , + /// imgui.cpp:15460 + ///
void RenderDragDropTargetRect(const ImRect& bb, const ImRect& item_clip_rect) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + /// FIXME-STYLE FIXME-DRAGDROP: Settle on a proper default visuals for drop target. + /// + /// + public static unsafe void RenderDragDropTargetRect(in floatRect bb, in floatRect itemClipRect) + { + fixed (floatRect* itemClipRect_fixed = &itemClipRect) + { + fixed (floatRect* bb_fixed = &bb) + { + PInvoke.RenderDragDropTargetRect_internal(bb_fixed, itemClipRect_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3696 + /// , + /// imgui_widgets.cpp:7329 + ///
+ /// ImGuiTypingSelectRequest* GetTypingSelectRequest(ImGuiTypingSelectFlags flags = ImGuiTypingSelectFlags_None) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + /// [Experimental] Currently not exposed in public API. + /// Consume character inputs and return search request, if any. + /// This would typically only be called on the focused window or location you want to grab inputs for, e.g. + /// if (ImGui::IsWindowFocused(...)) + /// if (ImGuiTypingSelectRequest* req = ImGui::GetTypingSelectRequest()) + /// focus_idx = ImGui::TypingSelectFindMatch(req, my_items.size(), [](void*, int n) { return my_items[n]->Name; }, &my_items, -1); + /// However the code is written in a way where calling it from multiple locations is safe (e.g. to obtain buffer). + /// + /// + public static unsafe ImGuiTypingSelectRequestPtr GetTypingSelectRequest( + ImGuiTypingSelectFlags flags = default + ) => PInvoke.GetTypingSelectRequest_internal(flags); + + /// + /// + /// C++: + /// imgui_internal.h:3697 + /// , + /// imgui_widgets.cpp:7439 + ///
+ /// int TypingSelectFindMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data, int nav_item_idx) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + /// Default handler for finding a result for typing-select. You may implement your own. + /// You might want to display a tooltip to visualize the current request SearchBuffer + /// When SingleCharMode is set: + /// - it is better to NOT display a tooltip of other on-screen display indicator. + /// - the index of the currently focused item is required. + /// if your SetNextItemSelectionUserData() values are indices, you can obtain it from ImGuiMultiSelectIO::NavIdItem, otherwise from g.NavLastValidSelectionUserData. + /// + /// + public static unsafe int TypingSelectFindMatch( + ImGuiTypingSelectRequestPtr req, + int itemsCount, + nint getItemNameFunc, + Ptr userData, + int navItemIdx + ) => PInvoke.TypingSelectFindMatch_internal(req, itemsCount, getItemNameFunc, userData, navItemIdx); + + /// + /// + /// C++: + /// imgui_internal.h:3698 + /// , + /// imgui_widgets.cpp:7454 + ///
+ /// int TypingSelectFindNextSingleCharMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data, int nav_item_idx) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + /// Special handling when a single character is repeated: perform search on a single letter and goes to + /// next. + /// + /// + public static unsafe int TypingSelectFindNextSingleCharMatch( + ImGuiTypingSelectRequestPtr req, + int itemsCount, + nint getItemNameFunc, + Ptr userData, + int navItemIdx + ) => + PInvoke.TypingSelectFindNextSingleCharMatch_internal( + req, + itemsCount, + getItemNameFunc, + userData, + navItemIdx + ); + + /// + /// + /// C++: + /// imgui_internal.h:3699 + /// , + /// imgui_widgets.cpp:7479 + ///
+ /// int TypingSelectFindBestLeadingMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + public static unsafe int TypingSelectFindBestLeadingMatch( + ImGuiTypingSelectRequestPtr req, + int itemsCount, + nint getItemNameFunc, + Ptr userData + ) => PInvoke.TypingSelectFindBestLeadingMatch_internal(req, itemsCount, getItemNameFunc, userData); + + /// + /// + /// C++: + /// imgui_internal.h:3702 + /// , + /// imgui_widgets.cpp:7589 + ///
+ /// bool BeginBoxSelect(const ImRect& scope_rect, ImGuiWindow* window, ImGuiID box_select_id, ImGuiMultiSelectFlags ms_flags) + ///
+ ///
+ /// + /// + /// Box-Select API + /// + /// + public static unsafe bool BeginBoxSelect( + in floatRect scopeRect, + ImGuiWindowPtr window, + ImGuiID boxSelectId, + ImGuiMultiSelectFlags msFlags + ) + { + fixed (floatRect* scopeRect_fixed = &scopeRect) + { + return PInvoke.BeginBoxSelect_internal(scopeRect_fixed, window, boxSelectId, msFlags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3703 + /// , + /// imgui_widgets.cpp:7635 + ///
void EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flags) + ///
+ ///
+ /// + /// + /// Box-Select API + /// + /// + public static unsafe void EndBoxSelect(in floatRect scopeRect, ImGuiMultiSelectFlags msFlags) + { + fixed (floatRect* scopeRect_fixed = &scopeRect) + { + PInvoke.EndBoxSelect_internal(scopeRect_fixed, msFlags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3706 + /// , + /// imgui_widgets.cpp:7942 + ///
+ /// void MultiSelectItemHeader(ImGuiID id, bool* p_selected, ImGuiButtonFlags* p_button_flags) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + /// In charge of: + /// - Applying SetAll for submitted items. + /// - Applying SetRange for submitted items and record end points. + /// - Altering button behavior flags to facilitate use with drag and drop. + /// + /// + public static unsafe void MultiSelectItemHeader( + ImGuiID id, + ref bool pSelected, + Ptr pButtonFlags + ) + { + fixed (bool* pSelected_fixed = &pSelected) + { + PInvoke.MultiSelectItemHeader_internal( + id, + (Bool8*)pSelected_fixed, + (ImGuiButtonFlags*)pButtonFlags + ); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3707 + /// , + /// imgui_widgets.cpp:8011 + ///
void MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + /// In charge of: + /// - Auto-select on navigation. + /// - Box-select toggle handling. + /// - Right-click handling. + /// - Altering selection based on Ctrl/Shift modifiers, both for keyboard and mouse. + /// - Record current selection state for RangeSrc + /// This is all rather complex, best to run and refer to "widgets_multiselect_xxx" tests in imgui_test_suite. + /// + /// + public static unsafe void MultiSelectItemFooter(ImGuiID id, ref bool pSelected, Ptr pPressed) + { + fixed (bool* pSelected_fixed = &pSelected) + { + PInvoke.MultiSelectItemFooter_internal(id, (Bool8*)pSelected_fixed, (Bool8*)pPressed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3708 + /// , + /// imgui_widgets.cpp:8208 + ///
void MultiSelectAddSetAll(ImGuiMultiSelectTempData* ms, bool selected) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + public static unsafe void MultiSelectAddSetAll(ImGuiMultiSelectTempDataPtr ms, bool selected) => + PInvoke.MultiSelectAddSetAll_internal(ms, selected); + + /// + /// + /// C++: + /// imgui_internal.h:3709 + /// , + /// imgui_widgets.cpp:8215 + ///
+ /// void MultiSelectAddSetRange(ImGuiMultiSelectTempData* ms, bool selected, int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + public static unsafe void MultiSelectAddSetRange( + ImGuiMultiSelectTempDataPtr ms, + bool selected, + int rangeDir, + ulong firstItem, + ulong lastItem + ) => PInvoke.MultiSelectAddSetRange_internal(ms, selected, rangeDir, firstItem, lastItem); + + /// + /// + /// C++: + /// imgui_internal.h:3710 + ///
inline ImGuiBoxSelectState* GetBoxSelectState(ImGuiID id) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + public static unsafe ImGuiBoxSelectStatePtr GetBoxSelectState(ImGuiID id) => + PInvoke.GetBoxSelectState_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3711 + ///
inline ImGuiMultiSelectState* GetMultiSelectState(ImGuiID id) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + public static unsafe ImGuiMultiSelectStatePtr GetMultiSelectState(ImGuiID id) => + PInvoke.GetMultiSelectState_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3714 + /// , + /// imgui_tables.cpp:4144 + ///
void SetWindowClipRectBeforeSetChannel(ImGuiWindow* window, const ImRect& clip_rect) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + /// [Internal] Small optimization to avoid calls to PopClipRect/SetCurrentChannel/PushClipRect in sequences, + /// they would meddle many times with the underlying ImDrawCmd. + /// Instead, we do a preemptive overwrite of clipping rectangle _without_ altering the command-buffer and let + /// the subsequent single call to SetCurrentChannel() does it things once. + /// + /// + public static unsafe void SetWindowClipRectBeforeSetChannel(ImGuiWindowPtr window, in floatRect clipRect) + { + fixed (floatRect* clipRect_fixed = &clipRect) + { + PInvoke.SetWindowClipRectBeforeSetChannel_internal(window, clipRect_fixed); + } + } + + /// + /// + /// setup number of columns. use an identifier to distinguish multiple column sets. close with + /// EndColumns(). + /// + /// + /// C++: + /// imgui_internal.h:3715 + /// , + /// imgui_tables.cpp:4331 + ///
void BeginColumns(const char* str_id, int count, ImGuiOldColumnFlags flags = 0) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe void BeginColumns(ImString strId, int count, ImGuiOldColumnFlags flags = default) + { + fixed (byte* strId_fixed = strId) + { + PInvoke.BeginColumns_internal(strId_fixed, count, flags); + } + } + + /// + /// + /// close columns + /// + /// + /// C++: + /// imgui_internal.h:3716 + /// , + /// imgui_tables.cpp:4466 + ///
void EndColumns() + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe void EndColumns() => PInvoke.EndColumns_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3717 + /// , + /// imgui_tables.cpp:4268 + ///
void PushColumnClipRect(int column_index) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe void PushColumnClipRect(int columnIndex) => + PInvoke.PushColumnClipRect_internal(columnIndex); + + /// + /// + /// C++: + /// imgui_internal.h:3718 + /// , + /// imgui_tables.cpp:4280 + ///
void PushColumnsBackground() + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + /// Get into the columns background draw command (which is generally the same draw command as before we + /// called BeginColumns) + /// + /// + public static unsafe void PushColumnsBackground() => PInvoke.PushColumnsBackground_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3719 + /// , + /// imgui_tables.cpp:4293 + ///
void PopColumnsBackground() + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe void PopColumnsBackground() => PInvoke.PopColumnsBackground_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3720 + /// , + /// imgui_tables.cpp:4318 + ///
ImGuiID GetColumnsID(const char* str_id, int count) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe ImGuiID GetColumnsID(ImString strId, int count) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.GetColumnsID_internal(strId_fixed, count); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3721 + /// , + /// imgui_tables.cpp:4305 + ///
ImGuiOldColumns* FindOrCreateColumns(ImGuiWindow* window, ImGuiID id) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe ImGuiOldColumnsPtr FindOrCreateColumns(ImGuiWindowPtr window, ImGuiID id) => + PInvoke.FindOrCreateColumns_internal(window, id); + + /// + /// + /// C++: + /// imgui_internal.h:3722 + /// , + /// imgui_tables.cpp:4164 + ///
float GetColumnOffsetFromNorm(const ImGuiOldColumns* columns, float offset_norm) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe float GetColumnOffsetFromNorm(ImGuiOldColumnsPtr columns, float offsetNorm) => + PInvoke.GetColumnOffsetFromNorm_internal(columns, offsetNorm); + + /// + /// + /// C++: + /// imgui_internal.h:3723 + /// , + /// imgui_tables.cpp:4169 + ///
float GetColumnNormFromOffset(const ImGuiOldColumns* columns, float offset) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + public static unsafe float GetColumnNormFromOffset(ImGuiOldColumnsPtr columns, float offset) => + PInvoke.GetColumnNormFromOffset_internal(columns, offset); + + /// + /// + /// C++: + /// imgui_internal.h:3726 + /// , + /// imgui_tables.cpp:3478 + ///
void TableOpenContextMenu(int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Use -1 to open menu not specific to a given column. + /// + /// + public static unsafe void TableOpenContextMenu(int columnN = -1) => + PInvoke.TableOpenContextMenu_internal(columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3727 + /// , + /// imgui_tables.cpp:2314 + ///
void TableSetColumnWidth(int column_n, float width) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// 'width' = inner column width, without padding + /// + /// + public static unsafe void TableSetColumnWidth(int columnN, float width) => + PInvoke.TableSetColumnWidth_internal(columnN, width); + + /// + /// + /// C++: + /// imgui_internal.h:3728 + /// , + /// imgui_tables.cpp:2928 + ///
+ /// void TableSetColumnSortDirection(int column_n, ImGuiSortDirection sort_direction, bool append_to_sort_specs) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Note that the NoSortAscending/NoSortDescending flags are processed in TableSortSpecsSanitize(), and they may change/revert + /// the value of SortDirection. We could technically also do it here but it would be unnecessary and duplicate code. + /// + /// + public static unsafe void TableSetColumnSortDirection( + int columnN, + ImGuiSortDirection sortDirection, + bool appendToSortSpecs + ) => PInvoke.TableSetColumnSortDirection_internal(columnN, sortDirection, appendToSortSpecs); + + /// + /// + /// Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason + /// why this is not public yet. + /// + /// + /// C++: + /// imgui_internal.h:3729 + /// , + /// imgui_tables.cpp:1813 + ///
int TableGetHoveredRow() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Return -1 when table is not hovered. Return maxrow+1 if in table but below last submitted row. + /// *IMPORTANT* Unlike TableGetHoveredColumn(), this has a one frame latency in updating the value. + /// This difference with is the reason why this is not public yet. + /// + /// + public static unsafe int TableGetHoveredRow() => PInvoke.TableGetHoveredRow_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3730 + /// , + /// imgui_tables.cpp:3070 + ///
float TableGetHeaderRowHeight() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + public static unsafe float TableGetHeaderRowHeight() => PInvoke.TableGetHeaderRowHeight_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3731 + /// , + /// imgui_tables.cpp:3086 + ///
float TableGetHeaderAngledMaxLabelWidth() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + public static unsafe float TableGetHeaderAngledMaxLabelWidth() => + PInvoke.TableGetHeaderAngledMaxLabelWidth_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3732 + /// , + /// imgui_tables.cpp:2461 + ///
void TablePushBackgroundChannel() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Bg2 is used by Selectable (and possibly other widgets) to render to the background. + /// Unlike our Bg0/1 channel which we uses for RowBg/CellBg/Borders and where we guarantee all shapes to be CPU-clipped, the Bg2 channel being widgets-facing will rely on regular ClipRect. + /// + /// + public static unsafe void TablePushBackgroundChannel() => PInvoke.TablePushBackgroundChannel_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3733 + /// , + /// imgui_tables.cpp:2473 + ///
void TablePopBackgroundChannel() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + public static unsafe void TablePopBackgroundChannel() => PInvoke.TablePopBackgroundChannel_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3734 + /// , + /// imgui_tables.cpp:2485 + ///
void TablePushColumnChannel(int column_n) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Also see TableBeginCell() + /// + /// + public static unsafe void TablePushColumnChannel(int columnN) => + PInvoke.TablePushColumnChannel_internal(columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3735 + /// , + /// imgui_tables.cpp:2499 + ///
void TablePopColumnChannel() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + public static unsafe void TablePopColumnChannel() => PInvoke.TablePopColumnChannel_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3736 + /// , + /// imgui_tables.cpp:3332 + ///
+ /// void TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label_width, const ImGuiTableHeaderData* data, int data_count) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Important: data must be fed left to right + /// + /// + public static unsafe void TableAngledHeadersRowEx( + ImGuiID rowId, + float angle, + float maxLabelWidth, + ReadOnlySpan data + ) + { + fixed (ImGuiTableHeaderData* data_fixed = data) + { + PInvoke.TableAngledHeadersRowEx_internal(rowId, angle, maxLabelWidth, data_fixed, data.Length); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3739 + ///
inline ImGuiTable* GetCurrentTable() + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe ImGuiTablePtr GetCurrentTable() => PInvoke.GetCurrentTable_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3740 + /// , + /// imgui_tables.cpp:304 + ///
ImGuiTable* TableFindByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe ImGuiTablePtr TableFindByID(ImGuiID id) => PInvoke.TableFindByID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3741 + /// , + /// imgui_tables.cpp:317 + ///
+ /// bool BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe bool BeginTableEx( + ImString name, + ImGuiID id, + int columnsCount, + ImGuiTableFlags flags = default, + in float2? outerSize = default, + float innerWidth = 0f + ) + { + var outerSize_default = outerSize ?? new float2(0f, 0f); + fixed (byte* name_fixed = name) + { + return PInvoke.BeginTableEx_internal( + name_fixed, + id, + columnsCount, + flags, + &outerSize_default, + innerWidth + ); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3742 + /// , + /// imgui_tables.cpp:655 + ///
void TableBeginInitMemory(ImGuiTable* table, int columns_count) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// For reference, the average total _allocation count_ for a table is: + /// + 0 (for ImGuiTable instance, we are pooling allocations in g.Tables[]) + /// + 1 (for table->RawData allocated below) + /// + 1 (for table->ColumnsNames, if names are used) + /// Shared allocations for the maximum number of simultaneously nested tables (generally a very small number) + /// + 1 (for table->Splitter._Channels) + /// + 2 * active_channels_count (for ImDrawCmd and ImDrawIdx buffers inside channels) + /// Where active_channels_count is variable but often == columns_count or == columns_count + 1, see TableSetupDrawChannels() for details. + /// Unused channels don't perform their +2 allocations. + /// + /// + public static unsafe void TableBeginInitMemory(ImGuiTablePtr table, int columnsCount) => + PInvoke.TableBeginInitMemory_internal(table, columnsCount); + + /// + /// + /// C++: + /// imgui_internal.h:3743 + /// , + /// imgui_tables.cpp:677 + ///
void TableBeginApplyRequests(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Apply queued resizing/reordering/hiding requests + /// + /// + public static unsafe void TableBeginApplyRequests(ImGuiTablePtr table) => + PInvoke.TableBeginApplyRequests_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3744 + /// , + /// imgui_tables.cpp:2529 + ///
void TableSetupDrawChannels(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Allocate draw channels. Called by TableUpdateLayout() + /// - We allocate them following storage order instead of display order so reordering columns won't needlessly + /// increase overall dormant memory cost. + /// - We isolate headers draw commands in their own channels instead of just altering clip rects. + /// This is in order to facilitate merging of draw commands. + /// - After crossing FreezeRowsCount, all columns see their current draw channel changed to a second set of channels. + /// - We only use the dummy draw channel so we can push a null clipping rectangle into it without affecting other + /// channels, while simplifying per-row/per-cell overhead. It will be empty and discarded when merged. + /// - We allocate 1 or 2 background draw channels. This is because we know TablePushBackgroundChannel() is only used for + /// horizontal spanning. If we allowed vertical spanning we'd need one background draw channel per merge group (1-4). + /// Draw channel allocation (before merging): + /// - NoClip --> 2+D+1 channels: bg0/1 + bg2 + foreground (same clip rect == always 1 draw call) + /// - Clip --> 2+D+N channels + /// - FreezeRows --> 2+D+N*2 (unless scrolling value is zero) + /// - FreezeRows || FreezeColunns --> 3+D+N*2 (unless scrolling value is zero) + /// Where D is 1 if any column is clipped or hidden (dummy channel) otherwise 0. + /// + /// + public static unsafe void TableSetupDrawChannels(ImGuiTablePtr table) => + PInvoke.TableSetupDrawChannels_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3745 + /// , + /// imgui_tables.cpp:803 + ///
void TableUpdateLayout(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Layout columns for the frame. This is in essence the followup to BeginTable() and this is our largest function. + /// Runs on the first call to TableNextRow(), to give a chance for TableSetupColumn() and other TableSetupXXXXX() functions to be called first. + /// FIXME-TABLE: Our width (and therefore our WorkRect) will be minimal in the first frame for _WidthAuto columns. + /// Increase feedback side-effect with widgets relying on WorkRect.Max.x... Maybe provide a default distribution for _WidthAuto columns? + /// + /// + public static unsafe void TableUpdateLayout(ImGuiTablePtr table) => + PInvoke.TableUpdateLayout_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3746 + /// , + /// imgui_tables.cpp:1285 + ///
void TableUpdateBorders(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Process hit-testing on resizing borders. Actual size change will be applied in EndTable() + /// - Set table->HoveredColumnBorder with a short delay/timer to reduce visual feedback noise. + /// + /// + public static unsafe void TableUpdateBorders(ImGuiTablePtr table) => + PInvoke.TableUpdateBorders_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3747 + /// , + /// imgui_tables.cpp:2419 + ///
void TableUpdateColumnsWeightFromWidth(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe void TableUpdateColumnsWeightFromWidth(ImGuiTablePtr table) => + PInvoke.TableUpdateColumnsWeightFromWidth_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3748 + /// , + /// imgui_tables.cpp:2780 + ///
void TableDrawBorders(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// FIXME-TABLE: This is a mess, need to redesign how we render borders (as some are also done in + /// TableEndRow) + /// + /// + public static unsafe void TableDrawBorders(ImGuiTablePtr table) => PInvoke.TableDrawBorders_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3749 + /// , + /// imgui_tables.cpp:3516 + ///
+ /// void TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// - ImGuiTableFlags_Hideable -> display columns visibility menu items + /// It means if you have a custom context menus you can call this section and omit some sections, and add your own. + /// + /// + public static unsafe void TableDrawDefaultContextMenu( + ImGuiTablePtr table, + ImGuiTableFlags flagsForSectionToDisplay + ) => PInvoke.TableDrawDefaultContextMenu_internal(table, flagsForSectionToDisplay); + + /// + /// + /// C++: + /// imgui_internal.h:3750 + /// , + /// imgui_tables.cpp:3497 + ///
bool TableBeginContextMenuPopup(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe bool TableBeginContextMenuPopup(ImGuiTablePtr table) => + PInvoke.TableBeginContextMenuPopup_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3751 + /// , + /// imgui_tables.cpp:2597 + ///
void TableMergeDrawChannels(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// This function is particularly tricky to understand.. take a breath. + /// + /// + public static unsafe void TableMergeDrawChannels(ImGuiTablePtr table) => + PInvoke.TableMergeDrawChannels_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3752 + ///
inline ImGuiTableInstanceData* TableGetInstanceData(ImGuiTable* table, int instance_no) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe ImGuiTableInstanceDataPtr TableGetInstanceData(ImGuiTablePtr table, int instanceNo) => + PInvoke.TableGetInstanceData_internal(table, instanceNo); + + /// + /// + /// C++: + /// imgui_internal.h:3753 + ///
inline ImGuiID TableGetInstanceID(ImGuiTable* table, int instance_no) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe ImGuiID TableGetInstanceID(ImGuiTablePtr table, int instanceNo) => + PInvoke.TableGetInstanceID_internal(table, instanceNo); + + /// + /// + /// C++: + /// imgui_internal.h:3754 + /// , + /// imgui_tables.cpp:2961 + ///
void TableSortSpecsSanitize(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe void TableSortSpecsSanitize(ImGuiTablePtr table) => + PInvoke.TableSortSpecsSanitize_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3755 + /// , + /// imgui_tables.cpp:3027 + ///
void TableSortSpecsBuild(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe void TableSortSpecsBuild(ImGuiTablePtr table) => + PInvoke.TableSortSpecsBuild_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3756 + /// , + /// imgui_tables.cpp:2914 + ///
ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumn* column) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumnPtr column) => + PInvoke.TableGetColumnNextSortDirection_internal(column); + + /// + /// + /// C++: + /// imgui_internal.h:3757 + /// , + /// imgui_tables.cpp:2902 + ///
void TableFixColumnSortDirection(ImGuiTable* table, ImGuiTableColumn* column) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Fix sort direction if currently set on a value which is unavailable (e.g. activating + /// NoSortAscending/NoSortDescending) + /// + /// + public static unsafe void TableFixColumnSortDirection(ImGuiTablePtr table, ImGuiTableColumnPtr column) => + PInvoke.TableFixColumnSortDirection_internal(table, column); + + /// + /// + /// C++: + /// imgui_internal.h:3758 + /// , + /// imgui_tables.cpp:2297 + ///
float TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Note this is meant to be stored in column->WidthAuto, please generally use the WidthAuto field + /// + /// + public static unsafe float TableGetColumnWidthAuto(ImGuiTablePtr table, ImGuiTableColumnPtr column) => + PInvoke.TableGetColumnWidthAuto_internal(table, column); + + /// + /// + /// C++: + /// imgui_internal.h:3759 + /// , + /// imgui_tables.cpp:1916 + ///
void TableBeginRow(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Only called by TableNextRow() + /// + /// + public static unsafe void TableBeginRow(ImGuiTablePtr table) => PInvoke.TableBeginRow_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3760 + /// , + /// imgui_tables.cpp:1953 + ///
void TableEndRow(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Called by TableNextRow() + /// + /// + public static unsafe void TableEndRow(ImGuiTablePtr table) => PInvoke.TableEndRow_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3761 + /// , + /// imgui_tables.cpp:2171 + ///
void TableBeginCell(ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Called by TableSetColumnIndex()/TableNextColumn() + /// This is called very frequently, so we need to be mindful of unnecessary overhead. + /// FIXME-TABLE FIXME-OPT: Could probably shortcut some things for non-active or clipped columns. + /// + /// + public static unsafe void TableBeginCell(ImGuiTablePtr table, int columnN) => + PInvoke.TableBeginCell_internal(table, columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3762 + /// , + /// imgui_tables.cpp:2227 + ///
void TableEndCell(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Called by TableNextRow()/TableSetColumnIndex()/TableNextColumn() + /// + /// + public static unsafe void TableEndCell(ImGuiTablePtr table) => PInvoke.TableEndCell_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3763 + /// , + /// imgui_tables.cpp:1778 + ///
ImRect TableGetCellBgRect(const ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Return the cell rectangle based on currently known height. + /// - Important: we generally don't know our row height until the end of the row, so Max.y will be incorrect in many situations. + /// The only case where this is correct is if we provided a min_row_height to TableNextRow() and don't go below it, or in TableEndRow() when we locked that height. + /// - Important: if ImGuiTableFlags_PadOuterX is set but ImGuiTableFlags_PadInnerX is not set, the outer-most left and right + /// columns report a small offset so their CellBgRect can extend up to the outer border. + /// FIXME: But the rendering code in TableEndRow() nullifies that with clamping required for scrolling. + /// + /// + public static unsafe floatRect TableGetCellBgRect(ImGuiTablePtr table, int columnN) => + PInvoke.TableGetCellBgRect_internal(table, columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3764 + /// , + /// imgui_tables.cpp:1725 + ///
const char* TableGetColumnName(const ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe Ptr TableGetColumnName(ImGuiTablePtr table, int columnN) => + PInvoke.TableGetColumnName_internal(table, columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3765 + /// , + /// imgui_tables.cpp:1793 + ///
ImGuiID TableGetColumnResizeID(ImGuiTable* table, int column_n, int instance_no = 0) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Return the resizing ID for the right-side of the given column. + /// + /// + public static unsafe ImGuiID TableGetColumnResizeID(ImGuiTablePtr table, int columnN, int instanceNo = 0) => + PInvoke.TableGetColumnResizeID_internal(table, columnN, instanceNo); + + /// + /// + /// C++: + /// imgui_internal.h:3766 + /// , + /// imgui_tables.cpp:2265 + ///
float TableCalcMaxColumnWidth(const ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Maximum column content width given current layout. Use column->MinX so this value differs on a + /// per-column basis. + /// + /// + public static unsafe float TableCalcMaxColumnWidth(ImGuiTablePtr table, int columnN) => + PInvoke.TableCalcMaxColumnWidth_internal(table, columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3767 + /// , + /// imgui_tables.cpp:2397 + ///
void TableSetColumnWidthAutoSingle(ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Disable clipping then auto-fit, will take 2 frames + /// (we don't take a shortcut for unclipped columns to reduce inconsistencies when e.g. resizing multiple columns) + /// + /// + public static unsafe void TableSetColumnWidthAutoSingle(ImGuiTablePtr table, int columnN) => + PInvoke.TableSetColumnWidthAutoSingle_internal(table, columnN); + + /// + /// + /// C++: + /// imgui_internal.h:3768 + /// , + /// imgui_tables.cpp:2407 + ///
void TableSetColumnWidthAutoAll(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe void TableSetColumnWidthAutoAll(ImGuiTablePtr table) => + PInvoke.TableSetColumnWidthAutoAll_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3769 + /// , + /// imgui_tables.cpp:3946 + ///
void TableRemove(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Remove Table (currently only used by TestEngine) + /// + /// + public static unsafe void TableRemove(ImGuiTablePtr table) => PInvoke.TableRemove_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3770 + /// , + /// imgui_tables.cpp:3958 + ///
void TableGcCompactTransientBuffers(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Free up/compact internal Table buffers for when it gets unused + /// + /// + public static unsafe void TableGcCompactTransientBuffers(ImGuiTablePtr table) => + PInvoke.TableGcCompactTransientBuffers_internal_0(table); + + /// + /// + /// C++: + /// imgui_internal.h:3771 + /// , + /// imgui_tables.cpp:3973 + ///
void TableGcCompactTransientBuffers(ImGuiTableTempData* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + public static unsafe void TableGcCompactTransientBuffers(ImGuiTableTempDataPtr table) => + PInvoke.TableGcCompactTransientBuffers_internal_1(table); + + /// + /// + /// C++: + /// imgui_internal.h:3772 + /// , + /// imgui_tables.cpp:3980 + ///
void TableGcCompactSettings() + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Compact and remove unused settings data (currently only used by TestEngine) + /// + /// + public static unsafe void TableGcCompactSettings() => PInvoke.TableGcCompactSettings_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3775 + /// , + /// imgui_tables.cpp:3747 + ///
void TableLoadSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + public static unsafe void TableLoadSettings(ImGuiTablePtr table) => + PInvoke.TableLoadSettings_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3776 + /// , + /// imgui_tables.cpp:3692 + ///
void TableSaveSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + public static unsafe void TableSaveSettings(ImGuiTablePtr table) => + PInvoke.TableSaveSettings_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3777 + /// , + /// imgui_tables.cpp:3684 + ///
void TableResetSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + /// Restore initial state of table (with or without saved settings) + /// + /// + public static unsafe void TableResetSettings(ImGuiTablePtr table) => + PInvoke.TableResetSettings_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3778 + /// , + /// imgui_tables.cpp:3669 + ///
ImGuiTableSettings* TableGetBoundSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + /// Get settings for a given table, NULL if none + /// + /// + public static unsafe ImGuiTableSettingsPtr TableGetBoundSettings(ImGuiTablePtr table) => + PInvoke.TableGetBoundSettings_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3779 + /// , + /// imgui_tables.cpp:3924 + ///
void TableSettingsAddSettingsHandler() + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + public static unsafe void TableSettingsAddSettingsHandler() => + PInvoke.TableSettingsAddSettingsHandler_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3780 + /// , + /// imgui_tables.cpp:3649 + ///
ImGuiTableSettings* TableSettingsCreate(ImGuiID id, int columns_count) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + public static unsafe ImGuiTableSettingsPtr TableSettingsCreate(ImGuiID id, int columnsCount) => + PInvoke.TableSettingsCreate_internal(id, columnsCount); + + /// + /// + /// C++: + /// imgui_internal.h:3781 + /// , + /// imgui_tables.cpp:3658 + ///
ImGuiTableSettings* TableSettingsFindByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + /// Find existing settings + /// + /// + public static unsafe ImGuiTableSettingsPtr TableSettingsFindByID(ImGuiID id) => + PInvoke.TableSettingsFindByID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3784 + ///
inline ImGuiTabBar* GetCurrentTabBar() + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe ImGuiTabBarPtr GetCurrentTabBar() => PInvoke.GetCurrentTabBar_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3785 + /// , + /// imgui_widgets.cpp:9458 + ///
bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe bool BeginTabBarEx(ImGuiTabBarPtr tabBar, in floatRect bb, ImGuiTabBarFlags flags) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.BeginTabBarEx_internal(tabBar, bb_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3786 + /// , + /// imgui_widgets.cpp:9858 + ///
ImGuiTabItem* TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe ImGuiTabItemPtr TabBarFindTabByID(ImGuiTabBarPtr tabBar, ImGuiID tabId) => + PInvoke.TabBarFindTabByID_internal(tabBar, tabId); + + /// + /// + /// C++: + /// imgui_internal.h:3787 + /// , + /// imgui_widgets.cpp:9868 + ///
ImGuiTabItem* TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// Order = visible order, not submission order! (which is tab->BeginOrder) + /// + /// + public static unsafe ImGuiTabItemPtr TabBarFindTabByOrder(ImGuiTabBarPtr tabBar, int order) => + PInvoke.TabBarFindTabByOrder_internal(tabBar, order); + + /// + /// + /// C++: + /// imgui_internal.h:3788 + /// , + /// imgui_widgets.cpp:9876 + ///
ImGuiTabItem* TabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// FIXME: See references to #2304 in TODO.txt + /// + /// + public static unsafe ImGuiTabItemPtr TabBarFindMostRecentlySelectedTabForActiveWindow( + ImGuiTabBarPtr tabBar + ) => PInvoke.TabBarFindMostRecentlySelectedTabForActiveWindow_internal(tabBar); + + /// + /// + /// C++: + /// imgui_internal.h:3789 + /// , + /// imgui_widgets.cpp:9889 + ///
ImGuiTabItem* TabBarGetCurrentTab(ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe ImGuiTabItemPtr TabBarGetCurrentTab(ImGuiTabBarPtr tabBar) => + PInvoke.TabBarGetCurrentTab_internal(tabBar); + + /// + /// + /// C++: + /// imgui_internal.h:3790 + ///
inline int TabBarGetTabOrder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe int TabBarGetTabOrder(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab) => + PInvoke.TabBarGetTabOrder_internal(tabBar, tab); + + /// + /// + /// C++: + /// imgui_internal.h:3791 + /// , + /// imgui_widgets.cpp:9896 + ///
const char* TabBarGetTabName(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe Ptr TabBarGetTabName(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab) => + PInvoke.TabBarGetTabName_internal(tabBar, tab); + + /// + /// + /// C++: + /// imgui_internal.h:3792 + /// , + /// imgui_widgets.cpp:9908 + ///
+ /// void TabBarAddTab(ImGuiTabBar* tab_bar, ImGuiTabItemFlags tab_flags, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// The purpose of this call is to register tab in advance so we can control their order at the time they appear. + /// Otherwise calling this is unnecessary as tabs are appending as needed by the BeginTabItem() function. + /// + /// + public static unsafe void TabBarAddTab( + ImGuiTabBarPtr tabBar, + ImGuiTabItemFlags tabFlags, + ImGuiWindowPtr window + ) => PInvoke.TabBarAddTab_internal(tabBar, tabFlags, window); + + /// + /// + /// C++: + /// imgui_internal.h:3793 + /// , + /// imgui_widgets.cpp:9928 + ///
void TabBarRemoveTab(ImGuiTabBar* tab_bar, ImGuiID tab_id) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// The *TabId fields are already set by the docking system _before_ the actual TabItem was created, so + /// we clear them regardless. + /// + /// + public static unsafe void TabBarRemoveTab(ImGuiTabBarPtr tabBar, ImGuiID tabId) => + PInvoke.TabBarRemoveTab_internal(tabBar, tabId); + + /// + /// + /// C++: + /// imgui_internal.h:3794 + /// , + /// imgui_widgets.cpp:9938 + ///
void TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// Called on manual closure attempt + /// + /// + public static unsafe void TabBarCloseTab(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab) => + PInvoke.TabBarCloseTab_internal(tabBar, tab); + + /// + /// + /// C++: + /// imgui_internal.h:3795 + /// , + /// imgui_widgets.cpp:10002 + ///
void TabBarQueueFocus(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe void TabBarQueueFocus(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab) => + PInvoke.TabBarQueueFocus_internal_0(tabBar, tab); + + /// + /// + /// C++: + /// imgui_internal.h:3796 + /// , + /// imgui_widgets.cpp:10007 + ///
void TabBarQueueFocus(ImGuiTabBar* tab_bar, const char* tab_name) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe void TabBarQueueFocus(ImGuiTabBarPtr tabBar, ImString tabName) + { + fixed (byte* tabName_fixed = tabName) + { + PInvoke.TabBarQueueFocus_internal_1(tabBar, tabName_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3797 + /// , + /// imgui_widgets.cpp:10014 + ///
void TabBarQueueReorder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, int offset) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe void TabBarQueueReorder(ImGuiTabBarPtr tabBar, ImGuiTabItemPtr tab, int offset) => + PInvoke.TabBarQueueReorder_internal(tabBar, tab, offset); + + /// + /// + /// C++: + /// imgui_internal.h:3798 + /// , + /// imgui_widgets.cpp:10022 + ///
+ /// void TabBarQueueReorderFromMousePos(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, ImVec2 mouse_pos) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe void TabBarQueueReorderFromMousePos( + ImGuiTabBarPtr tabBar, + ImGuiTabItemPtr tab, + float2 mousePos + ) => PInvoke.TabBarQueueReorderFromMousePos_internal(tabBar, tab, mousePos); + + /// + /// + /// C++: + /// imgui_internal.h:3799 + /// , + /// imgui_widgets.cpp:10058 + ///
bool TabBarProcessReorder(ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe bool TabBarProcessReorder(ImGuiTabBarPtr tabBar) => + PInvoke.TabBarProcessReorder_internal(tabBar); + + /// + /// + /// C++: + /// imgui_internal.h:3800 + /// , + /// imgui_widgets.cpp:10279 + ///
+ /// bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe bool TabItemEx( + ImGuiTabBarPtr tabBar, + ImString label, + ref bool pOpen, + ImGuiTabItemFlags flags, + ImGuiWindowPtr dockedWindow + ) + { + fixed (bool* pOpen_fixed = &pOpen) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TabItemEx_internal( + tabBar, + label_fixed, + (Bool8*)pOpen_fixed, + flags, + dockedWindow + ); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3800 + /// , + /// imgui_widgets.cpp:10279 + ///
+ /// bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe bool TabItemEx( + ImGuiTabBarPtr tabBar, + ImString label, + ImGuiTabItemFlags flags, + ImGuiWindowPtr dockedWindow + ) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TabItemEx_internal(tabBar, label_fixed, null, flags, dockedWindow); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3801 + /// , + /// imgui_widgets.cpp:10262 + ///
void TabItemSpacing(const char* str_id, ImGuiTabItemFlags flags, float width) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe void TabItemSpacing(ImString strId, ImGuiTabItemFlags flags, float width) + { + fixed (byte* strId_fixed = strId) + { + PInvoke.TabItemSpacing_internal(strId_fixed, flags, width); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3802 + /// , + /// imgui_widgets.cpp:10612 + ///
ImVec2 TabItemCalcSize(const char* label, bool has_close_button_or_unsaved_marker) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe float2 TabItemCalcSize(ImString label, bool hasCloseButtonOrUnsavedMarker) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TabItemCalcSize_internal_0(label_fixed, hasCloseButtonOrUnsavedMarker); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3803 + /// , + /// imgui_widgets.cpp:10624 + ///
ImVec2 TabItemCalcSize(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe float2 TabItemCalcSize(ImGuiWindowPtr window) => + PInvoke.TabItemCalcSize_internal_1(window); + + /// + /// + /// C++: + /// imgui_internal.h:3804 + /// , + /// imgui_widgets.cpp:10629 + ///
+ /// void TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + public static unsafe void TabItemBackground( + ImDrawListPtr drawList, + in floatRect bb, + ImGuiTabItemFlags flags, + ImColor8 col + ) + { + fixed (floatRect* bb_fixed = &bb) + { + PInvoke.TabItemBackground_internal(drawList, bb_fixed, flags, col); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3805 + /// , + /// imgui_widgets.cpp:10656 + ///
+ /// void TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id, bool is_contents_visible, bool* out_just_closed, bool* out_text_clipped) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// Render text label (with custom clipping) + Unsaved Document marker + Close Button logic + /// We tend to lock style.FramePadding for a given tab-bar, hence the 'frame_padding' parameter. + /// + /// + public static unsafe void TabItemLabelAndCloseButton( + ImDrawListPtr drawList, + in floatRect bb, + ImGuiTabItemFlags flags, + float2 framePadding, + ImString label, + ImGuiID tabId, + ImGuiID closeButtonId, + bool isContentsVisible, + out bool outJustClosed, + out bool outTextClipped + ) + { + fixed (bool* outTextClipped_fixed = &outTextClipped) + { + fixed (bool* outJustClosed_fixed = &outJustClosed) + { + fixed (byte* label_fixed = label) + { + fixed (floatRect* bb_fixed = &bb) + { + PInvoke.TabItemLabelAndCloseButton_internal( + drawList, + bb_fixed, + flags, + framePadding, + label_fixed, + tabId, + closeButtonId, + isContentsVisible, + (Bool8*)outJustClosed_fixed, + (Bool8*)outTextClipped_fixed + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3810 + /// , + /// imgui.cpp:3769 + ///
+ /// void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Internal ImGui functions to render text + /// RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText() + /// + /// + public static unsafe void RenderText(float2 pos, ImString text, bool hideTextAfterHash = true) + { + fixed (byte* text_fixed = text) + { + PInvoke.RenderText_internal(pos, text_fixed, text_fixed + text.Length, hideTextAfterHash); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3811 + /// , + /// imgui.cpp:3795 + ///
+ /// void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + public static unsafe void RenderTextWrapped(float2 pos, ImString text, float wrapWidth) + { + fixed (byte* text_fixed = text) + { + PInvoke.RenderTextWrapped_internal(pos, text_fixed, text_fixed + text.Length, wrapWidth); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3812 + /// , + /// imgui.cpp:3844 + ///
+ /// void RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + public static unsafe void RenderTextClipped( + in float2 posMin, + in float2 posMax, + ImString text, + Ptr textSizeIfKnown, + in float2? align = default, + Ptr clipRect = default + ) + { + var align_default = align ?? new float2(0f, 0f); + fixed (byte* text_fixed = text) + { + fixed (float2* posMax_fixed = &posMax) + { + fixed (float2* posMin_fixed = &posMin) + { + PInvoke.RenderTextClipped_internal( + posMin_fixed, + posMax_fixed, + text_fixed, + text_fixed + text.Length, + (float2*)textSizeIfKnown, + &align_default, + (floatRect*)clipRect + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3813 + /// , + /// imgui.cpp:3816 + ///
+ /// void RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Default clip_rect uses (pos_min,pos_max) + /// Handle clipping on CPU immediately (vs typically let the GPU clip the triangles that are overlapping the clipping rectangle edges) + /// FIXME-OPT: Since we have or calculate text_size we could coarse clip whole block immediately, especially for text above draw_list->DrawList. + /// Effectively as this is called from widget doing their own coarse clipping it's not very valuable presently. Next time function will take + /// better advantage of the render function taking size into account for coarse clipping. + /// + /// + public static unsafe void RenderTextClippedEx( + ImDrawListPtr drawList, + in float2 posMin, + in float2 posMax, + ImString text, + Ptr textSizeIfKnown, + in float2? align = default, + Ptr clipRect = default + ) + { + var align_default = align ?? new float2(0f, 0f); + fixed (byte* text_fixed = text) + { + fixed (float2* posMax_fixed = &posMax) + { + fixed (float2* posMin_fixed = &posMin) + { + PInvoke.RenderTextClippedEx_internal( + drawList, + posMin_fixed, + posMax_fixed, + text_fixed, + text_fixed + text.Length, + (float2*)textSizeIfKnown, + &align_default, + (floatRect*)clipRect + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3814 + /// , + /// imgui.cpp:3863 + ///
+ /// void RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, float ellipsis_max_x, const char* text, const char* text_end, const ImVec2* text_size_if_known) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Another overly complex function until we reorganize everything into a nice all-in-one helper. + /// This is made more complex because we have dissociated the layout rectangle (pos_min..pos_max) from 'ellipsis_max_x' which may be beyond it. + /// This is because in the context of tabs we selectively hide part of the text when the Close Button appears, but we don't want the ellipsis to move. + /// (BREAKING) On 2025/04/16 we removed the 'float clip_max_x' parameters which was preceeding 'float ellipsis_max' and was the same value for 99% of users. + /// + /// + public static unsafe void RenderTextEllipsis( + ImDrawListPtr drawList, + in float2 posMin, + in float2 posMax, + float ellipsisMaxX, + ImString text, + Ptr textSizeIfKnown + ) + { + fixed (byte* text_fixed = text) + { + fixed (float2* posMax_fixed = &posMax) + { + fixed (float2* posMin_fixed = &posMin) + { + PInvoke.RenderTextEllipsis_internal( + drawList, + posMin_fixed, + posMax_fixed, + ellipsisMaxX, + text_fixed, + text_fixed + text.Length, + (float2*)textSizeIfKnown + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3815 + /// , + /// imgui.cpp:3914 + ///
+ /// void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool borders = true, float rounding = 0.0f) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Render a rectangle shaped with optional rounding and borders + /// + /// + public static unsafe void RenderFrame( + float2 pMin, + float2 pMax, + uint fillCol, + bool borders = true, + float rounding = 0f + ) => PInvoke.RenderFrame_internal(pMin, pMax, fillCol, borders, rounding); + + /// + /// + /// C++: + /// imgui_internal.h:3816 + /// , + /// imgui.cpp:3927 + ///
void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + public static unsafe void RenderFrameBorder(float2 pMin, float2 pMax, float rounding = 0f) => + PInvoke.RenderFrameBorder_internal(pMin, pMax, rounding); + + /// + /// + /// C++: + /// imgui_internal.h:3817 + /// , + /// imgui_draw.cpp:5983 + ///
+ /// void RenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list, ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding = 0.0f, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Helper for ColorPicker4() + /// NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that. + /// Spent a non reasonable amount of time trying to getting this right for ColorButton with rounding+anti-aliasing+ImGuiColorEditFlags_HalfAlphaPreview flag + various grid sizes and offsets, and eventually gave up... probably more reasonable to disable rounding altogether. + /// FIXME: uses ImGui::GetColorU32 + /// + /// + public static unsafe void RenderColorRectWithAlphaCheckerboard( + ImDrawListPtr drawList, + float2 pMin, + float2 pMax, + uint fillCol, + float gridStep, + float2 gridOff, + float rounding = 0f, + ImDrawFlags flags = default + ) => + PInvoke.RenderColorRectWithAlphaCheckerboard_internal( + drawList, + pMin, + pMax, + fillCol, + gridStep, + gridOff, + rounding, + flags + ); + + /// + /// + /// Navigation highlight + /// + /// + /// C++: + /// imgui_internal.h:3818 + /// , + /// imgui.cpp:3939 + ///
+ /// void RenderNavCursor(const ImRect& bb, ImGuiID id, ImGuiNavRenderCursorFlags flags = ImGuiNavRenderCursorFlags_None) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + public static unsafe void RenderNavCursor( + in floatRect bb, + ImGuiID id, + ImGuiNavRenderCursorFlags flags = default + ) + { + fixed (floatRect* bb_fixed = &bb) + { + PInvoke.RenderNavCursor_internal(bb_fixed, id, flags); + } + } + + /// + /// + /// Find the optional ## from which we stop displaying text. + /// + /// + /// C++: + /// imgui_internal.h:3822 + /// , + /// imgui.cpp:3756 + ///
const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + public static unsafe Ptr FindRenderedTextEnd(ImString text) + { + fixed (byte* text_fixed = text) + { + return PInvoke.FindRenderedTextEnd_internal(text_fixed, text_fixed + text.Length); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3823 + /// , + /// imgui.cpp:3973 + ///
+ /// void RenderMouseCursor(ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + public static unsafe void RenderMouseCursor( + float2 pos, + float scale, + ImGuiMouseCursor mouseCursor, + uint colFill, + uint colBorder, + uint colShadow + ) => PInvoke.RenderMouseCursor_internal(pos, scale, mouseCursor, colFill, colBorder, colShadow); + + /// + /// + /// C++: + /// imgui_internal.h:3826 + /// , + /// imgui_draw.cpp:5810 + ///
+ /// void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale = 1.0f) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// Render an arrow aimed to be aligned with text (p_min is a position in the same space text would be + /// positioned). To e.g. denote expanded/collapsed state + /// + /// + public static unsafe void RenderArrow( + ImDrawListPtr drawList, + float2 pos, + ImColor8 col, + ImGuiDir dir, + float scale = 1f + ) => PInvoke.RenderArrow_internal(drawList, pos, col, dir, scale); + + /// + /// + /// C++: + /// imgui_internal.h:3827 + /// , + /// imgui_draw.cpp:5841 + ///
void RenderBullet(ImDrawList* draw_list, ImVec2 pos, ImU32 col) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + public static unsafe void RenderBullet(ImDrawListPtr drawList, float2 pos, ImColor8 col) => + PInvoke.RenderBullet_internal(drawList, pos, col); + + /// + /// + /// C++: + /// imgui_internal.h:3828 + /// , + /// imgui_draw.cpp:5847 + ///
void RenderCheckMark(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + public static unsafe void RenderCheckMark(ImDrawListPtr drawList, float2 pos, ImColor8 col, float sz) => + PInvoke.RenderCheckMark_internal(drawList, pos, col, sz); + + /// + /// + /// C++: + /// imgui_internal.h:3829 + /// , + /// imgui_draw.cpp:5863 + ///
+ /// void RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// Render an arrow. 'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y + /// is length on each side. + /// + /// + public static unsafe void RenderArrowPointingAt( + ImDrawListPtr drawList, + float2 pos, + float2 halfSz, + ImGuiDir direction, + ImColor8 col + ) => PInvoke.RenderArrowPointingAt_internal(drawList, pos, halfSz, direction, col); + + /// + /// + /// C++: + /// imgui_internal.h:3830 + /// , + /// imgui_draw.cpp:5877 + ///
void RenderArrowDockMenu(ImDrawList* draw_list, ImVec2 p_min, float sz, ImU32 col) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// This is less wide than RenderArrow() and we use in dock nodes instead of the regular RenderArrow() to denote a change of functionality, + /// and because the saved space means that the left-most tab label can stay at exactly the same position as the label of a loose window. + /// + /// + public static unsafe void RenderArrowDockMenu( + ImDrawListPtr drawList, + float2 pMin, + float sz, + ImColor8 col + ) => PInvoke.RenderArrowDockMenu_internal(drawList, pMin, sz, col); + + /// + /// + /// C++: + /// imgui_internal.h:3831 + /// , + /// imgui_draw.cpp:5892 + ///
+ /// void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// FIXME: Cleanup and move code to ImDrawList. + /// + /// + public static unsafe void RenderRectFilledRangeH( + ImDrawListPtr drawList, + in floatRect rect, + ImColor8 col, + float xStartNorm, + float xEndNorm, + float rounding + ) + { + fixed (floatRect* rect_fixed = &rect) + { + PInvoke.RenderRectFilledRangeH_internal(drawList, rect_fixed, col, xStartNorm, xEndNorm, rounding); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3832 + /// , + /// imgui_draw.cpp:5952 + ///
+ /// void RenderRectFilledWithHole(ImDrawList* draw_list, const ImRect& outer, const ImRect& inner, ImU32 col, float rounding) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + public static unsafe void RenderRectFilledWithHole( + ImDrawListPtr drawList, + in floatRect outer, + in floatRect inner, + ImColor8 col, + float rounding + ) + { + fixed (floatRect* inner_fixed = &inner) + { + fixed (floatRect* outer_fixed = &outer) + { + PInvoke.RenderRectFilledWithHole_internal(drawList, outer_fixed, inner_fixed, col, rounding); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3833 + /// , + /// imgui_draw.cpp:5968 + ///
+ /// ImDrawFlags CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + public static unsafe ImDrawFlags CalcRoundingFlagsForRectInRect( + in floatRect rIn, + in floatRect rOuter, + float threshold + ) + { + fixed (floatRect* rOuter_fixed = &rOuter) + { + fixed (floatRect* rIn_fixed = &rIn) + { + return PInvoke.CalcRoundingFlagsForRectInRect_internal(rIn_fixed, rOuter_fixed, threshold); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3836 + /// , + /// imgui_widgets.cpp:160 + ///
void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void TextEx(ImString text, ImGuiTextFlags flags = default) + { + fixed (byte* text_fixed = text) + { + PInvoke.TextEx_internal(text_fixed, text_fixed + text.Length, flags); + } + } + + /// + /// + /// FIXME-WIP: Works but API is likely to be reworked. This is designed for 1 item on the line. (#7024) + /// + /// + /// C++: + /// imgui_internal.h:3837 + /// , + /// imgui_widgets.cpp:342 + ///
void TextAligned(float align_x, float size_x, const char* fmt, ...) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void TextAligned(float alignX, float sizeX, ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.TextAligned_internal(alignX, sizeX, text_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3841 + /// , + /// imgui_widgets.cpp:767 + ///
+ /// bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + public static unsafe bool ButtonEx( + ImString label, + in float2? sizeArg = default, + ImGuiButtonFlags flags = default + ) + { + var sizeArg_default = sizeArg ?? new float2(0f, 0f); + fixed (byte* label_fixed = label) + { + return PInvoke.ButtonEx_internal(label_fixed, &sizeArg_default, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3842 + /// , + /// imgui_widgets.cpp:851 + ///
+ /// bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + public static unsafe bool ArrowButtonEx( + ImString strId, + ImGuiDir dir, + float2 sizeArg, + ImGuiButtonFlags flags = default + ) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.ArrowButtonEx_internal(strId_fixed, dir, sizeArg, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3843 + /// , + /// imgui_widgets.cpp:1156 + ///
+ /// bool ImageButtonEx(ImGuiID id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + public static unsafe bool ImageButtonEx( + ImGuiID id, + ImTextureRef texRef, + in float2 imageSize, + in float2 uv0, + in float2 uv1, + in float4 bgCol, + in float4 tintCol, + ImGuiButtonFlags flags = default + ) + { + fixed (float4* tintCol_fixed = &tintCol) + { + fixed (float4* bgCol_fixed = &bgCol) + { + fixed (float2* uv1_fixed = &uv1) + { + fixed (float2* uv0_fixed = &uv0) + { + fixed (float2* imageSize_fixed = &imageSize) + { + return PInvoke.ImageButtonEx_internal( + id, + texRef, + imageSize_fixed, + uv0_fixed, + uv1_fixed, + bgCol_fixed, + tintCol_fixed, + flags + ); + } + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3844 + /// , + /// imgui_widgets.cpp:1622 + ///
void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + /// Horizontal/vertical separating line + /// FIXME: Surprisingly, this seemingly trivial widget is a victim of many different legacy/tricky layout issues. + /// Note how thickness == 1.0f is handled specifically as not moving CursorPos by 'thickness', but other values are. + /// + /// + public static unsafe void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1f) => + PInvoke.SeparatorEx_internal(flags, thickness); + + /// + /// + /// C++: + /// imgui_internal.h:3845 + /// , + /// imgui_widgets.cpp:1704 + ///
+ /// void SeparatorTextEx(ImGuiID id, const char* label, const char* label_end, float extra_width) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + public static unsafe void SeparatorTextEx(ImGuiID id, ImString label, ImString labelEnd, float extraWidth) + { + fixed (byte* labelEnd_fixed = labelEnd) + { + fixed (byte* label_fixed = label) + { + PInvoke.SeparatorTextEx_internal(id, label_fixed, labelEnd_fixed, extraWidth); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3846 + /// , + /// imgui_widgets.cpp:1329 + ///
bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + public static unsafe bool CheckboxFlags(ImString label, Ptr flags, long flagsValue) + { + fixed (byte* label_fixed = label) + { + return PInvoke.CheckboxFlags_internal_0(label_fixed, (long*)flags, flagsValue); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3847 + /// , + /// imgui_widgets.cpp:1334 + ///
bool CheckboxFlags(const char* label, ImU64* flags, ImU64 flags_value) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + public static unsafe bool CheckboxFlags(ImString label, Ptr flags, ulong flagsValue) + { + fixed (byte* label_fixed = label) + { + return PInvoke.CheckboxFlags_internal_1(label_fixed, (ulong*)flags, flagsValue); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3850 + /// , + /// imgui_widgets.cpp:886 + ///
bool CloseButton(ImGuiID id, const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Button to close a window + /// + /// + public static unsafe bool CloseButton(ImGuiID id, in float2 pos) + { + fixed (float2* pos_fixed = &pos) + { + return PInvoke.CloseButton_internal(id, pos_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3851 + /// , + /// imgui_widgets.cpp:924 + ///
bool CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_node) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// The Collapse button also functions as a Dock Menu button. + /// + /// + public static unsafe bool CollapseButton(ImGuiID id, in float2 pos, ImGuiDockNodePtr dockNode) + { + fixed (float2* pos_fixed = &pos) + { + return PInvoke.CollapseButton_internal(id, pos_fixed, dockNode); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3852 + /// , + /// imgui_widgets.cpp:977 + ///
void Scrollbar(ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + public static unsafe void Scrollbar(ImGuiAxis axis) => PInvoke.Scrollbar_internal(axis); + + /// + /// + /// C++: + /// imgui_internal.h:3853 + /// , + /// imgui_widgets.cpp:1012 + ///
+ /// bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags draw_rounding_flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Vertical/Horizontal scrollbar + /// The entire piece of code below is rather confusing because: + /// - We handle absolute seeking (when first clicking outside the grab) and relative manipulation (afterward or when clicking inside the grab) + /// - We store values as normalized ratio and in a form that allows the window content to change while we are holding on a scrollbar + /// - We handle both horizontal and vertical scrollbars, which makes the terminology not ideal. + /// Still, the code should probably be made simpler.. + /// + /// + public static unsafe bool ScrollbarEx( + in floatRect bb, + ImGuiID id, + ImGuiAxis axis, + Ptr pScrollV, + long availV, + long contentsV, + ImDrawFlags drawRoundingFlags = default + ) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.ScrollbarEx_internal( + bb_fixed, + id, + axis, + (long*)pScrollV, + availV, + contentsV, + drawRoundingFlags + ); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3854 + /// , + /// imgui_widgets.cpp:962 + ///
ImRect GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Return scrollbar rectangle, must only be called for corresponding axis if window->ScrollbarX/Y is + /// set. + /// + /// + public static unsafe floatRect GetWindowScrollbarRect(ImGuiWindowPtr window, ImGuiAxis axis) => + PInvoke.GetWindowScrollbarRect_internal(window, axis); + + /// + /// + /// C++: + /// imgui_internal.h:3855 + /// , + /// imgui_widgets.cpp:956 + ///
ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + public static unsafe ImGuiID GetWindowScrollbarID(ImGuiWindowPtr window, ImGuiAxis axis) => + PInvoke.GetWindowScrollbarID_internal(window, axis); + + /// + /// + /// 0..3: corners + /// + /// + /// C++: + /// imgui_internal.h:3856 + /// , + /// imgui.cpp:6967 + ///
ImGuiID GetWindowResizeCornerID(ImGuiWindow* window, int n) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// 0..3: corners (Lower-right, Lower-left, Unused, Unused) + /// + /// + public static unsafe ImGuiID GetWindowResizeCornerID(ImGuiWindowPtr window, int n) => + PInvoke.GetWindowResizeCornerID_internal(window, n); + + /// + /// + /// C++: + /// imgui_internal.h:3857 + /// , + /// imgui.cpp:6977 + ///
ImGuiID GetWindowResizeBorderID(ImGuiWindow* window, ImGuiDir dir) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Borders (Left, Right, Up, Down) + /// + /// + public static unsafe ImGuiID GetWindowResizeBorderID(ImGuiWindowPtr window, ImGuiDir dir) => + PInvoke.GetWindowResizeBorderID_internal(window, dir); + + /// + /// + /// C++: + /// imgui_internal.h:3860 + /// , + /// imgui_widgets.cpp:541 + ///
+ /// bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + /// - FIXME: For refactor we could output flags, incl mouse hovered vs nav keyboard vs nav triggered etc. + /// And better standardize how widgets use 'GetColor32((held && hovered) ? ... : hovered ? ...)' vs 'GetColor32(held ? ... : hovered ? ...);' + /// For mouse feedback we typically prefer the 'held && hovered' test, but for nav feedback not always. Outputting hovered=true on Activation may be misleading. + /// - Since v1.91.2 (Sept 2024) we included io.ConfigDebugHighlightIdConflicts feature. + /// One idiom which was previously valid which will now emit a warning is when using multiple overlaid ButtonBehavior() + /// with same ID and different MouseButton (see #8030). You can fix it by: + /// (1) switching to use a single ButtonBehavior() with multiple _MouseButton flags. + /// or (2) surrounding those calls with PushItemFlag(ImGuiItemFlags_AllowDuplicateId, true); ... PopItemFlag() + /// + /// + public static unsafe bool ButtonBehavior( + in floatRect bb, + ImGuiID id, + out bool outHovered, + out bool outHeld, + ImGuiButtonFlags flags = default + ) + { + fixed (bool* outHeld_fixed = &outHeld) + { + fixed (bool* outHovered_fixed = &outHovered) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.ButtonBehavior_internal( + bb_fixed, + id, + (Bool8*)outHovered_fixed, + (Bool8*)outHeld_fixed, + flags + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3861 + /// , + /// imgui_widgets.cpp:2635 + ///
+ /// bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + public static unsafe bool DragBehavior( + ImGuiID id, + ImGuiDataType dataType, + Ptr pV, + float vSpeed, + Ptr pMin, + Ptr pMax, + ImString format, + ImGuiSliderFlags flags + ) + { + fixed (byte* format_fixed = format) + { + return PInvoke.DragBehavior_internal(id, dataType, pV, vSpeed, pMin, pMax, format_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3862 + /// , + /// imgui_widgets.cpp:3240 + ///
+ /// bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + /// For 32-bit and larger types, slider bounds are limited to half the natural type range. + /// So e.g. an integer Slider between INT_MAX-10 and INT_MAX will fail, but an integer Slider between INT_MAX/2-10 and INT_MAX/2 will be ok. + /// It would be possible to lift that limitation with some work but it doesn't seem to be worth it for sliders. + /// + /// + public static unsafe bool SliderBehavior( + in floatRect bb, + ImGuiID id, + ImGuiDataType dataType, + Ptr pV, + Ptr pMin, + Ptr pMax, + ImString format, + ImGuiSliderFlags flags, + out floatRect outGrabBb + ) + { + fixed (floatRect* outGrabBb_fixed = &outGrabBb) + { + fixed (byte* format_fixed = format) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.SliderBehavior_internal( + bb_fixed, + id, + dataType, + pV, + pMin, + pMax, + format_fixed, + flags, + outGrabBb_fixed + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3863 + /// , + /// imgui_widgets.cpp:1770 + ///
+ /// bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + /// Using 'hover_visibility_delay' allows us to hide the highlight and mouse cursor for a short time, + /// which can be convenient to reduce visual noise. + /// + /// + public static unsafe bool SplitterBehavior( + in floatRect bb, + ImGuiID id, + ImGuiAxis axis, + Ptr size1, + Ptr size2, + float minSize1, + float minSize2, + float hoverExtend = 0f, + float hoverVisibilityDelay = 0f, + uint bgCol = default + ) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.SplitterBehavior_internal( + bb_fixed, + id, + axis, + (float*)size1, + (float*)size2, + minSize1, + minSize2, + hoverExtend, + hoverVisibilityDelay, + bgCol + ); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3866 + /// , + /// imgui_widgets.cpp:6644 + ///
+ /// bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + /// When using public API, currently 'id == storage_id' is always true, but we separate the values to + /// facilitate advanced user code doing storage queries outside of UI loop. + /// + /// + public static unsafe bool TreeNodeBehavior( + ImGuiID id, + ImGuiTreeNodeFlags flags, + ImString label, + ImString labelEnd = default + ) + { + fixed (byte* labelEnd_fixed = labelEnd) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TreeNodeBehavior_internal(id, flags, label_fixed, labelEnd_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3867 + /// , + /// imgui_widgets.cpp:6927 + ///
void TreeNodeDrawLineToChildNode(const ImVec2& target_pos) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + /// Draw horizontal line from our parent node + /// This is only called for visible child nodes so we are not too fussy anymore about performances + /// + /// + public static unsafe void TreeNodeDrawLineToChildNode(in float2 targetPos) + { + fixed (float2* targetPos_fixed = &targetPos) + { + PInvoke.TreeNodeDrawLineToChildNode_internal(targetPos_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3868 + /// , + /// imgui_widgets.cpp:6957 + ///
void TreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + /// Draw vertical line of the hierarchy + /// + /// + public static unsafe void TreeNodeDrawLineToTreePop(ImGuiTreeNodeStackDataPtr data) => + PInvoke.TreeNodeDrawLineToTreePop_internal(data); + + /// + /// + /// C++: + /// imgui_internal.h:3869 + /// , + /// imgui_widgets.cpp:6999 + ///
void TreePushOverrideID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + public static unsafe void TreePushOverrideID(ImGuiID id) => PInvoke.TreePushOverrideID_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3870 + /// , + /// imgui_widgets.cpp:6559 + ///
bool TreeNodeGetOpen(ImGuiID storage_id) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + public static unsafe bool TreeNodeGetOpen(ImGuiID storageId) => PInvoke.TreeNodeGetOpen_internal(storageId); + + /// + /// + /// C++: + /// imgui_internal.h:3871 + /// , + /// imgui_widgets.cpp:6566 + ///
void TreeNodeSetOpen(ImGuiID storage_id, bool open) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + public static unsafe void TreeNodeSetOpen(ImGuiID storageId, bool open) => + PInvoke.TreeNodeSetOpen_internal(storageId, open); + + /// + /// + /// Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging. + /// + /// + /// C++: + /// imgui_internal.h:3872 + /// , + /// imgui_widgets.cpp:6573 + ///
bool TreeNodeUpdateNextOpen(ImGuiID storage_id, ImGuiTreeNodeFlags flags) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + public static unsafe bool TreeNodeUpdateNextOpen(ImGuiID storageId, ImGuiTreeNodeFlags flags) => + PInvoke.TreeNodeUpdateNextOpen_internal(storageId, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3885 + /// , + /// imgui_widgets.cpp:2258 + ///
const ImGuiDataTypeInfo* DataTypeGetInfo(ImGuiDataType data_type) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + public static unsafe ImGuiDataTypeInfoPtr DataTypeGetInfo(ImGuiDataType dataType) => + PInvoke.DataTypeGetInfo_internal(dataType); + + /// + /// + /// C++: + /// imgui_internal.h:3886 + /// , + /// imgui_widgets.cpp:2264 + ///
+ /// int DataTypeFormatString(char* buf, int buf_size, ImGuiDataType data_type, const void* p_data, const char* format) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + public static unsafe int DataTypeFormatString( + ReadOnlySpan buf, + int bufSize, + ImGuiDataType dataType, + Ptr pData, + ImString format + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* buf_fixed = buf) + { + return PInvoke.DataTypeFormatString_internal(buf_fixed, bufSize, dataType, pData, format_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3887 + /// , + /// imgui_widgets.cpp:2287 + ///
+ /// void DataTypeApplyOp(ImGuiDataType data_type, int op, void* output, const void* arg_1, const void* arg_2) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + public static unsafe void DataTypeApplyOp(ImGuiDataType dataType, int op, Ptr output, Ptr arg1, Ptr arg2) => + PInvoke.DataTypeApplyOp_internal(dataType, op, output, arg1, arg2); + + /// + /// + /// C++: + /// imgui_internal.h:3888 + /// , + /// imgui_widgets.cpp:2339 + ///
+ /// bool DataTypeApplyFromText(const char* buf, ImGuiDataType data_type, void* p_data, const char* format, void* p_data_when_empty = NULL) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + /// User can input math operators (e.g. +100) to edit a numerical values. + /// NB: This is _not_ a full expression evaluator. We should probably add one and replace this dumb mess.. + /// + /// + public static unsafe bool DataTypeApplyFromText( + ReadOnlySpan buf, + ImGuiDataType dataType, + Ptr pData, + ImString format, + Ptr pDataWhenEmpty = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* buf_fixed = buf) + { + return PInvoke.DataTypeApplyFromText_internal( + buf_fixed, + dataType, + pData, + format_fixed, + pDataWhenEmpty + ); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3889 + /// , + /// imgui_widgets.cpp:2396 + ///
int DataTypeCompare(ImGuiDataType data_type, const void* arg_1, const void* arg_2) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + public static unsafe int DataTypeCompare(ImGuiDataType dataType, Ptr arg1, Ptr arg2) => + PInvoke.DataTypeCompare_internal(dataType, arg1, arg2); + + /// + /// + /// C++: + /// imgui_internal.h:3890 + /// , + /// imgui_widgets.cpp:2425 + ///
+ /// bool DataTypeClamp(ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + public static unsafe bool DataTypeClamp(ImGuiDataType dataType, Ptr pData, Ptr pMin, Ptr pMax) => + PInvoke.DataTypeClamp_internal(dataType, pData, pMin, pMax); + + /// + /// + /// C++: + /// imgui_internal.h:3891 + /// , + /// imgui_widgets.cpp:2445 + ///
bool DataTypeIsZero(ImGuiDataType data_type, const void* p_data) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + public static unsafe bool DataTypeIsZero(ImGuiDataType dataType, Ptr pData) => + PInvoke.DataTypeIsZero_internal(dataType, pData); + + /// + /// + /// C++: + /// imgui_internal.h:3894 + /// , + /// imgui_widgets.cpp:4522 + ///
+ /// bool InputTextEx(const char* label, const char* hint, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Edit a string of text + /// - buf_size account for the zero-terminator, so a buf_size of 6 can hold "Hello" but not "Hello!". + /// This is so we can easily call InputText() on static arrays using ARRAYSIZE() and to match + /// Note that in std::string world, capacity() would omit 1 byte used by the zero-terminator. + /// - When active, hold on a privately held copy of the text (and apply back to 'buf'). So changing 'buf' while the InputText is active has no effect. + /// - If you want to use ImGui::InputText() with std::string, see misc/cpp/imgui_stdlib.h + /// (FIXME: Rather confusing and messy function, among the worse part of our codebase, expecting to rewrite a V2 at some point.. Partly because we are + /// doing UTF8 > U16 > UTF8 conversions on the go to easily interface with stb_textedit. Ideally should stay in UTF-8 all the time. See https://github.com/nothings/stb/issues/188) + /// + /// + public static unsafe bool InputTextEx( + ImString label, + ImString hint, + ReadOnlySpan buf, + int bufSize, + in float2 sizeArg, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback? callback = default, + Ptr userData = default + ) + { + fixed (float2* sizeArg_fixed = &sizeArg) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* hint_fixed = hint) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputTextEx_internal( + label_fixed, + hint_fixed, + buf_fixed, + bufSize, + sizeArg_fixed, + flags, + callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + userData + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3894 + /// , + /// imgui_widgets.cpp:4522 + ///
+ /// bool InputTextEx(const char* label, const char* hint, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Edit a string of text + /// - buf_size account for the zero-terminator, so a buf_size of 6 can hold "Hello" but not "Hello!". + /// This is so we can easily call InputText() on static arrays using ARRAYSIZE() and to match + /// Note that in std::string world, capacity() would omit 1 byte used by the zero-terminator. + /// - When active, hold on a privately held copy of the text (and apply back to 'buf'). So changing 'buf' while the InputText is active has no effect. + /// - If you want to use ImGui::InputText() with std::string, see misc/cpp/imgui_stdlib.h + /// (FIXME: Rather confusing and messy function, among the worse part of our codebase, expecting to rewrite a V2 at some point.. Partly because we are + /// doing UTF8 > U16 > UTF8 conversions on the go to easily interface with stb_textedit. Ideally should stay in UTF-8 all the time. See https://github.com/nothings/stb/issues/188) + /// + /// + public static unsafe bool InputTextEx( + ImString label, + ImString hint, + ReadOnlySpan buf, + int bufSize, + in float2 sizeArg, + ImGuiInputTextFlags flags, + delegate* unmanaged[Cdecl] callback, + Ptr userData = default + ) + { + fixed (float2* sizeArg_fixed = &sizeArg) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* hint_fixed = hint) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputTextEx_internal( + label_fixed, + hint_fixed, + buf_fixed, + bufSize, + sizeArg_fixed, + flags, + (nint)callback, + userData + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3895 + /// , + /// imgui_widgets.cpp:4494 + ///
void InputTextDeactivateHook(ImGuiID id) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// As InputText() retain textual data and we currently provide a path for user to not retain it (via local variables) + /// we need some form of hook to reapply data back to user buffer on deactivation frame. (#4714) + /// It would be more desirable that we discourage users from taking advantage of the "user not retaining data" trick, + /// but that more likely be attractive when we do have _NoLiveEdit flag available. + /// + /// + public static unsafe void InputTextDeactivateHook(ImGuiID id) => + PInvoke.InputTextDeactivateHook_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3896 + /// , + /// imgui_widgets.cpp:3671 + ///
+ /// bool TempInputText(const ImRect& bb, ImGuiID id, const char* label, char* buf, int buf_size, ImGuiInputTextFlags flags) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Create text input in place of another active widget (e.g. used when doing a CTRL+Click on drag/slider widgets) + /// FIXME: Facilitate using this in variety of other situations. + /// FIXME: Among other things, setting ImGuiItemFlags_AllowDuplicateId in LastItemData is currently correct but + /// the expected relationship between TempInputXXX functions and LastItemData is a little fishy. + /// + /// + public static unsafe bool TempInputText( + in floatRect bb, + ImGuiID id, + ImString label, + ReadOnlySpan buf, + int bufSize, + ImGuiInputTextFlags flags + ) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* label_fixed = label) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.TempInputText_internal(bb_fixed, id, label_fixed, buf_fixed, bufSize, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3897 + /// , + /// imgui_widgets.cpp:3695 + ///
+ /// bool TempInputScalar(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* p_data, const char* format, const void* p_clamp_min = NULL, const void* p_clamp_max = NULL) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Note that Drag/Slider functions are only forwarding the min/max values clamping values if the ImGuiSliderFlags_AlwaysClamp flag is set! + /// This is intended: this way we allow CTRL+Click manual input to set a value out of bounds, for maximum flexibility. + /// However this may not be ideal for all uses, as some user code may break on out of bound values. + /// + /// + public static unsafe bool TempInputScalar( + in floatRect bb, + ImGuiID id, + ImString label, + ImGuiDataType dataType, + Ptr pData, + ImString format, + Ptr pClampMin = default, + Ptr pClampMax = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + fixed (floatRect* bb_fixed = &bb) + { + return PInvoke.TempInputScalar_internal( + bb_fixed, + id, + label_fixed, + dataType, + pData, + format_fixed, + pClampMin, + pClampMax + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3898 + ///
inline bool TempInputIsActive(ImGuiID id) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + public static unsafe bool TempInputIsActive(ImGuiID id) => PInvoke.TempInputIsActive_internal(id); + + /// + /// + /// Get input text state if active + /// + /// + /// C++: + /// imgui_internal.h:3899 + ///
inline ImGuiInputTextState* GetInputTextState(ImGuiID id) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + public static unsafe ImGuiInputTextStatePtr GetInputTextState(ImGuiID id) => + PInvoke.GetInputTextState_internal(id); + + /// + /// + /// C++: + /// imgui_internal.h:3900 + /// , + /// imgui_widgets.cpp:3737 + ///
void SetNextItemRefVal(ImGuiDataType data_type, void* p_data) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + public static unsafe void SetNextItemRefVal(ImGuiDataType dataType, Ptr pData) => + PInvoke.SetNextItemRefVal_internal(dataType, pData); + + /// + /// + /// This may be useful to apply workaround that a based on distinguish whenever an item is active as a + /// text input field. + /// + /// + /// C++: + /// imgui_internal.h:3901 + ///
inline bool IsItemActiveAsInputText() + ///
+ ///
+ /// + /// + /// InputText + /// + /// + public static unsafe bool IsItemActiveAsInputText() => PInvoke.IsItemActiveAsInputText_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3904 + /// , + /// imgui_widgets.cpp:6324 + ///
void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Color + /// + /// + /// Note: only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. + /// + /// + public static unsafe void ColorTooltip(ImString text, Ptr col, ImGuiColorEditFlags flags) + { + fixed (byte* text_fixed = text) + { + PInvoke.ColorTooltip_internal(text_fixed, (float*)col, flags); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3905 + /// , + /// imgui_widgets.cpp:6360 + ///
void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Color + /// + /// + public static unsafe void ColorEditOptionsPopup(Ptr col, ImGuiColorEditFlags flags) => + PInvoke.ColorEditOptionsPopup_internal((float*)col, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3906 + /// , + /// imgui_widgets.cpp:6414 + ///
void ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Color + /// + /// + public static unsafe void ColorPickerOptionsPopup(Ptr refCol, ImGuiColorEditFlags flags) => + PInvoke.ColorPickerOptionsPopup_internal((float*)refCol, flags); + + /// + /// + /// C++: + /// imgui_internal.h:3909 + /// , + /// imgui_widgets.cpp:8573 + ///
+ /// int PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, const ImVec2& size_arg) + ///
+ ///
+ /// + /// + /// Plot + /// + /// + public static unsafe int PlotEx( + ImGuiPlotType plotType, + ImString label, + nint valuesGetter, + Ptr data, + int valuesCount, + int valuesOffset, + ImString overlayText, + float scaleMin, + float scaleMax, + in float2 sizeArg + ) + { + fixed (float2* sizeArg_fixed = &sizeArg) + { + fixed (byte* overlayText_fixed = overlayText) + { + fixed (byte* label_fixed = label) + { + return PInvoke.PlotEx_internal( + plotType, + label_fixed, + valuesGetter, + data, + valuesCount, + valuesOffset, + overlayText_fixed, + scaleMin, + scaleMax, + sizeArg_fixed + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3912 + /// , + /// imgui_draw.cpp:2349 + ///
+ /// void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1) + ///
+ ///
+ /// + /// + /// Shade functions (write over already created vertices) + /// + /// + /// Generic linear color gradient, write to RGB fields, leave A untouched. + /// + /// + public static unsafe void ShadeVertsLinearColorGradientKeepAlpha( + ImDrawListPtr drawList, + int vertStartIdx, + int vertEndIdx, + float2 gradientP0, + float2 gradientP1, + uint col0, + uint col1 + ) => + PInvoke.ShadeVertsLinearColorGradientKeepAlpha_internal( + drawList, + vertStartIdx, + vertEndIdx, + gradientP0, + gradientP1, + col0, + col1 + ); + + /// + /// + /// C++: + /// imgui_internal.h:3913 + /// , + /// imgui_draw.cpp:2373 + ///
+ /// void ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp) + ///
+ ///
+ /// + /// + /// Shade functions (write over already created vertices) + /// + /// + /// Distribute UV over (a, b) rectangle + /// + /// + public static unsafe void ShadeVertsLinearUV( + ImDrawListPtr drawList, + int vertStartIdx, + int vertEndIdx, + in float2 a, + in float2 b, + in float2 uvA, + in float2 uvB, + bool clamp + ) + { + fixed (float2* uvB_fixed = &uvB) + { + fixed (float2* uvA_fixed = &uvA) + { + fixed (float2* b_fixed = &b) + { + fixed (float2* a_fixed = &a) + { + PInvoke.ShadeVertsLinearUV_internal( + drawList, + vertStartIdx, + vertEndIdx, + a_fixed, + b_fixed, + uvA_fixed, + uvB_fixed, + clamp + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3914 + /// , + /// imgui_draw.cpp:2397 + ///
+ /// void ShadeVertsTransformPos(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& pivot_in, float cos_a, float sin_a, const ImVec2& pivot_out) + ///
+ ///
+ /// + /// + /// Shade functions (write over already created vertices) + /// + /// + public static unsafe void ShadeVertsTransformPos( + ImDrawListPtr drawList, + int vertStartIdx, + int vertEndIdx, + in float2 pivotIn, + float cosA, + float sinA, + in float2 pivotOut + ) + { + fixed (float2* pivotOut_fixed = &pivotOut) + { + fixed (float2* pivotIn_fixed = &pivotIn) + { + PInvoke.ShadeVertsTransformPos_internal( + drawList, + vertStartIdx, + vertEndIdx, + pivotIn_fixed, + cosA, + sinA, + pivotOut_fixed + ); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3917 + /// , + /// imgui.cpp:4573 + ///
void GcCompactTransientMiscBuffers() + ///
+ ///
+ /// + /// + /// Garbage collection + /// + /// + public static unsafe void GcCompactTransientMiscBuffers() => + PInvoke.GcCompactTransientMiscBuffers_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3918 + /// , + /// imgui.cpp:4589 + ///
void GcCompactTransientWindowBuffers(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Garbage collection + /// + /// + /// Free up/compact internal window buffers, we can use this when a window becomes unused. + /// Not freed: + /// - ImGuiWindow, ImGuiWindowSettings, Name, StateStorage, ColumnsStorage (may hold useful data) + /// This should have no noticeable visual effect. When the window reappear however, expect new allocation/buffer growth/copy cost. + /// + /// + public static unsafe void GcCompactTransientWindowBuffers(ImGuiWindowPtr window) => + PInvoke.GcCompactTransientWindowBuffers_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3919 + /// , + /// imgui.cpp:4601 + ///
void GcAwakeTransientWindowBuffers(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Garbage collection + /// + /// + public static unsafe void GcAwakeTransientWindowBuffers(ImGuiWindowPtr window) => + PInvoke.GcAwakeTransientWindowBuffers_internal(window); + + /// + /// + /// C++: + /// imgui_internal.h:3922 + /// , + /// imgui.cpp:11512 + ///
bool ErrorLog(const char* msg) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + public static unsafe bool ErrorLog(ImString msg) + { + fixed (byte* msg_fixed = msg) + { + return PInvoke.ErrorLog_internal(msg_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3923 + /// , + /// imgui.cpp:11371 + ///
void ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual + /// recovery. + /// + /// + public static unsafe void ErrorRecoveryStoreState(ImGuiErrorRecoveryStatePtr stateOut) => + PInvoke.ErrorRecoveryStoreState_internal(stateOut); + + /// + /// + /// C++: + /// imgui_internal.h:3924 + /// , + /// imgui.cpp:11390 + ///
void ErrorRecoveryTryToRecoverState(const ImGuiErrorRecoveryState* state_in) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Chosen name "Try to recover" over e.g. "Restore" to suggest this is not a 100% guaranteed recovery. + /// Called by e.g. EndFrame() but may be called for manual recovery. + /// Attempt to recover full window stack. + /// + /// + public static unsafe void ErrorRecoveryTryToRecoverState(ImGuiErrorRecoveryStatePtr stateIn) => + PInvoke.ErrorRecoveryTryToRecoverState_internal(stateIn); + + /// + /// + /// C++: + /// imgui_internal.h:3925 + /// , + /// imgui.cpp:11428 + ///
void ErrorRecoveryTryToRecoverWindowState(const ImGuiErrorRecoveryState* state_in) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Called by e.g. End() but may be called for manual recovery. + /// Read '// Error Handling [BETA]' block in imgui_internal.h for details. + /// Attempt to recover from incorrect usage of BeginXXX/EndXXX/PushXXX/PopXXX calls. + /// + /// + public static unsafe void ErrorRecoveryTryToRecoverWindowState(ImGuiErrorRecoveryStatePtr stateIn) => + PInvoke.ErrorRecoveryTryToRecoverWindowState_internal(stateIn); + + /// + /// + /// C++: + /// imgui_internal.h:3926 + /// , + /// imgui.cpp:11224 + ///
void ErrorCheckUsingSetCursorPosToExtendParentBoundaries() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Advanced: + /// - For reference, old logic was causing issues because it meant that SetCursorScreenPos(GetCursorScreenPos()) + /// had a side-effect on layout! In particular this caused problem to compute group boundaries. + /// e.g. BeginGroup() + SomeItem() + SetCursorScreenPos(GetCursorScreenPos()) + EndGroup() would cause the + /// group to be taller because auto-sizing generally adds padding on bottom and right side. + /// - While this code is a little twisted, no-one would expect SetXXX(GetXXX()) to have a side-effect. + /// Using vertical alignment patterns would frequently trigger this sorts of issue. + /// - See https://github.com/ocornut/imgui/issues/5548 for more details. + /// + /// + public static unsafe void ErrorCheckUsingSetCursorPosToExtendParentBoundaries() => + PInvoke.ErrorCheckUsingSetCursorPosToExtendParentBoundaries_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3927 + /// , + /// imgui.cpp:11557 + ///
void ErrorCheckEndFrameFinalizeErrorTooltip() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + public static unsafe void ErrorCheckEndFrameFinalizeErrorTooltip() => + PInvoke.ErrorCheckEndFrameFinalizeErrorTooltip_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3928 + /// , + /// imgui.cpp:11610 + ///
bool BeginErrorTooltip() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Pseudo-tooltip. Follow mouse until CTRL is held. When CTRL is held we lock position, allowing to + /// click it. + /// + /// + public static unsafe bool BeginErrorTooltip() => PInvoke.BeginErrorTooltip_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3929 + /// , + /// imgui.cpp:11634 + ///
void EndErrorTooltip() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + public static unsafe void EndErrorTooltip() => PInvoke.EndErrorTooltip_internal(); + + /// + /// + /// size >= 0 : alloc, size = -1 : free + /// + /// + /// C++: + /// imgui_internal.h:3932 + /// , + /// imgui.cpp:5040 + ///
void DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// We record the number of allocation in recent frames, as a way to audit/sanitize our guiding + /// principles of "no allocations on idle/repeating frames" + /// + /// + public static unsafe void DebugAllocHook( + ImGuiDebugAllocInfoPtr info, + int frameCount, + Ptr ptr, + nuint size + ) => PInvoke.DebugAllocHook_internal(info, frameCount, ptr, size); + + /// + /// + /// C++: + /// imgui_internal.h:3933 + /// , + /// imgui.cpp:23364 + ///
void DebugDrawCursorPos(ImU32 col = IM_COL32(255, 0, 0, 255)) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw a small cross at current CursorPos in current window's DrawList + /// + /// + public static unsafe void DebugDrawCursorPos(ImColor8? col = default) + { + var col_default = col ?? 4278190335; + PInvoke.DebugDrawCursorPos_internal(col_default); + } + + /// + /// + /// C++: + /// imgui_internal.h:3934 + /// , + /// imgui.cpp:23374 + ///
void DebugDrawLineExtents(ImU32 col = IM_COL32(255, 0, 0, 255)) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList + /// + /// + public static unsafe void DebugDrawLineExtents(ImColor8? col = default) + { + var col_default = col ?? 4278190335; + PInvoke.DebugDrawLineExtents_internal(col_default); + } + + /// + /// + /// C++: + /// imgui_internal.h:3935 + /// , + /// imgui.cpp:23387 + ///
void DebugDrawItemRect(ImU32 col = IM_COL32(255, 0, 0, 255)) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw last item rect in ForegroundDrawList (so it is always visible) + /// + /// + public static unsafe void DebugDrawItemRect(ImColor8? col = default) + { + var col_default = col ?? 4278190335; + PInvoke.DebugDrawItemRect_internal(col_default); + } + + /// + /// + /// C++: + /// imgui_internal.h:3936 + /// , + /// imgui.cpp:23338 + ///
void DebugTextUnformattedWithLocateItem(const char* line_begin, const char* line_end) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Display line, search for 0xXXXXXXXX identifiers and call DebugLocateItemOnHover() when hovered. + /// + /// + public static unsafe void DebugTextUnformattedWithLocateItem(ImString lineBegin, ImString lineEnd) + { + fixed (byte* lineEnd_fixed = lineEnd) + { + fixed (byte* lineBegin_fixed = lineBegin) + { + PInvoke.DebugTextUnformattedWithLocateItem_internal(lineBegin_fixed, lineEnd_fixed); + } + } + } + + /// + /// + /// Call sparingly: only 1 at the same time! + /// + /// + /// C++: + /// imgui_internal.h:3937 + /// , + /// imgui.cpp:23397 + ///
void DebugLocateItem(ImGuiID target_id) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugLocateItem(ImGuiID targetId) => PInvoke.DebugLocateItem_internal(targetId); + + /// + /// + /// Only call on reaction to a mouse Hover: because only 1 at the same time! + /// + /// + /// C++: + /// imgui_internal.h:3938 + /// , + /// imgui.cpp:23406 + ///
void DebugLocateItemOnHover(ImGuiID target_id) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// FIXME: Doesn't work over through a modal window, because they clear HoveredWindow. + /// + /// + public static unsafe void DebugLocateItemOnHover(ImGuiID targetId) => + PInvoke.DebugLocateItemOnHover_internal(targetId); + + /// + /// + /// C++: + /// imgui_internal.h:3939 + /// , + /// imgui.cpp:23423 + ///
void DebugLocateItemResolveWithLastItem() + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugLocateItemResolveWithLastItem() => + PInvoke.DebugLocateItemResolveWithLastItem_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3940 + /// , + /// imgui.cpp:22467 + ///
void DebugBreakClearData() + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugBreakClearData() => PInvoke.DebugBreakClearData_internal(); + + /// + /// + /// C++: + /// imgui_internal.h:3941 + /// , + /// imgui.cpp:22490 + ///
bool DebugBreakButton(const char* label, const char* description_of_location) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Special button that doesn't take focus, doesn't take input owner, and can be activated without a click etc. + /// In order to reduce interferences with the contents we are trying to debug into. + /// + /// + public static unsafe bool DebugBreakButton(ImString label, ImString descriptionOfLocation) + { + fixed (byte* descriptionOfLocation_fixed = descriptionOfLocation) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DebugBreakButton_internal(label_fixed, descriptionOfLocation_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3942 + /// , + /// imgui.cpp:22476 + ///
void DebugBreakButtonTooltip(bool keyboard_only, const char* description_of_location) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugBreakButtonTooltip(bool keyboardOnly, ImString descriptionOfLocation) + { + fixed (byte* descriptionOfLocation_fixed = descriptionOfLocation) + { + PInvoke.DebugBreakButtonTooltip_internal(keyboardOnly, descriptionOfLocation_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3943 + /// , + /// imgui.cpp:21599 + ///
void ShowFontAtlas(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] List fonts in a font atlas and display its texture + /// + /// + public static unsafe void ShowFontAtlas(ImFontAtlasPtr atlas) => PInvoke.ShowFontAtlas_internal(atlas); + + /// + /// + /// C++: + /// imgui_internal.h:3944 + /// , + /// imgui.cpp:23523 + ///
+ /// void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] ID Stack tool: hooks called by GetID() family functions + /// + /// + public static unsafe void DebugHookIdInfo(ImGuiID id, ImGuiDataType dataType, Ptr dataId, Ptr dataIdEnd) => + PInvoke.DebugHookIdInfo_internal(id, dataType, dataId, dataIdEnd); + + /// + /// + /// C++: + /// imgui_internal.h:3945 + /// , + /// imgui.cpp:22526 + ///
void DebugNodeColumns(ImGuiOldColumns* columns) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of Columns + /// + /// + public static unsafe void DebugNodeColumns(ImGuiOldColumnsPtr columns) => + PInvoke.DebugNodeColumns_internal(columns); + + /// + /// + /// C++: + /// imgui_internal.h:3946 + /// , + /// imgui.cpp:22566 + ///
void DebugNodeDockNode(ImGuiDockNode* node, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImDockNode + /// + /// + public static unsafe void DebugNodeDockNode(ImGuiDockNodePtr node, ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodeDockNode_internal(node, label_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3947 + /// , + /// imgui.cpp:22625 + ///
+ /// void DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImDrawList + /// Note that both 'window' and 'viewport' may be NULL here. Viewport is generally null of destroyed popups which previously owned a viewport. + /// + /// + public static unsafe void DebugNodeDrawList( + ImGuiWindowPtr window, + ImGuiViewportPPtr viewport, + ImDrawListPtr drawList, + ImString label + ) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodeDrawList_internal(window, viewport, drawList, label_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3948 + /// , + /// imgui.cpp:22720 + ///
+ /// void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, const ImDrawList* draw_list, const ImDrawCmd* draw_cmd, bool show_mesh, bool show_aabb) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display mesh/aabb of a ImDrawCmd + /// + /// + public static unsafe void DebugNodeDrawCmdShowMeshAndBoundingBox( + out ImDrawList outDrawList, + ImDrawListPtr drawList, + ImDrawCmdPtr drawCmd, + bool showMesh, + bool showAabb + ) + { + fixed (ImDrawList* outDrawList_fixed = &outDrawList) + { + PInvoke.DebugNodeDrawCmdShowMeshAndBoundingBox_internal( + outDrawList_fixed, + drawList, + drawCmd, + showMesh, + showAabb + ); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3949 + /// , + /// imgui.cpp:22765 + ///
void DebugNodeFont(ImFont* font) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display details for a single font, called by ShowStyleEditor(). + /// + /// + public static unsafe void DebugNodeFont(ImFontPtr font) => PInvoke.DebugNodeFont_internal(font); + + /// + /// + /// C++: + /// imgui_internal.h:3950 + /// , + /// imgui.cpp:22914 + ///
void DebugNodeFontGlyphesForSrcMask(ImFont* font, ImFontBaked* baked, int src_mask) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeFontGlyphesForSrcMask( + ImFontPtr font, + ImFontBakedPtr baked, + int srcMask + ) => PInvoke.DebugNodeFontGlyphesForSrcMask_internal(font, baked, srcMask); + + /// + /// + /// C++: + /// imgui_internal.h:3951 + /// , + /// imgui.cpp:22965 + ///
void DebugNodeFontGlyph(ImFont* font, const ImFontGlyph* glyph) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeFontGlyph(ImFontPtr font, ImFontGlyphPtr glyph) => + PInvoke.DebugNodeFontGlyph_internal(font, glyph); + + /// + /// + /// ID used to facilitate persisting the "current" texture. + /// + /// + /// C++: + /// imgui_internal.h:3952 + /// , + /// imgui.cpp:21752 + ///
+ /// void DebugNodeTexture(ImTextureData* tex, int int_id, const ImFontAtlasRect* highlight_rect = NULL) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeTexture( + ImTextureDataPtr tex, + int intId, + ImFontAtlasRectPtr highlightRect = default + ) => PInvoke.DebugNodeTexture_internal(tex, intId, highlightRect); + + /// + /// + /// C++: + /// imgui_internal.h:3953 + /// , + /// imgui.cpp:22982 + ///
void DebugNodeStorage(ImGuiStorage* storage, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImGuiStorage + /// + /// + public static unsafe void DebugNodeStorage(ImGuiStoragePtr storage, ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodeStorage_internal(storage, label_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3954 + /// , + /// imgui.cpp:22995 + ///
void DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImGuiTabBar + /// + /// + public static unsafe void DebugNodeTabBar(ImGuiTabBarPtr tabBar, ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodeTabBar_internal(tabBar, label_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3955 + /// , + /// imgui_tables.cpp:4016 + ///
void DebugNodeTable(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeTable(ImGuiTablePtr table) => PInvoke.DebugNodeTable_internal(table); + + /// + /// + /// C++: + /// imgui_internal.h:3956 + /// , + /// imgui_tables.cpp:4090 + ///
void DebugNodeTableSettings(ImGuiTableSettings* settings) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeTableSettings(ImGuiTableSettingsPtr settings) => + PInvoke.DebugNodeTableSettings_internal(settings); + + /// + /// + /// C++: + /// imgui_internal.h:3957 + /// , + /// imgui_widgets.cpp:5489 + ///
void DebugNodeInputTextState(ImGuiInputTextState* state) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeInputTextState(ImGuiInputTextStatePtr state) => + PInvoke.DebugNodeInputTextState_internal(state); + + /// + /// + /// C++: + /// imgui_internal.h:3958 + /// , + /// imgui_widgets.cpp:7497 + ///
void DebugNodeTypingSelectState(ImGuiTypingSelectState* state) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeTypingSelectState(ImGuiTypingSelectStatePtr state) => + PInvoke.DebugNodeTypingSelectState_internal(state); + + /// + /// + /// C++: + /// imgui_internal.h:3959 + /// , + /// imgui_widgets.cpp:8232 + ///
void DebugNodeMultiSelectState(ImGuiMultiSelectState* state) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeMultiSelectState(ImGuiMultiSelectStatePtr state) => + PInvoke.DebugNodeMultiSelectState_internal(state); + + /// + /// + /// C++: + /// imgui_internal.h:3960 + /// , + /// imgui.cpp:23080 + ///
void DebugNodeWindow(ImGuiWindow* window, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeWindow(ImGuiWindowPtr window, ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodeWindow_internal(window, label_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3961 + /// , + /// imgui.cpp:23157 + ///
void DebugNodeWindowSettings(ImGuiWindowSettings* settings) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeWindowSettings(ImGuiWindowSettingsPtr settings) => + PInvoke.DebugNodeWindowSettings_internal(settings); + + /// + /// + /// C++: + /// imgui_internal.h:3962 + /// , + /// imgui.cpp:23167 + ///
void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeWindowsList(Ptr> windows, ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodeWindowsList_internal((ImVector*)windows, label_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3963 + /// , + /// imgui.cpp:23181 + ///
+ /// void DebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows, int windows_size, ImGuiWindow* parent_in_begin_stack) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// FIXME-OPT: This is technically suboptimal, but it is simpler this way. + /// + /// + public static unsafe void DebugNodeWindowsListByBeginStackParent( + Ptr windows, + int windowsSize, + ImGuiWindowPtr parentInBeginStack + ) => + PInvoke.DebugNodeWindowsListByBeginStackParent_internal( + (ImGuiWindow**)windows, + windowsSize, + parentInBeginStack + ); + + /// + /// + /// C++: + /// imgui_internal.h:3964 + /// , + /// imgui.cpp:23035 + ///
void DebugNodeViewport(ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodeViewport(ImGuiViewportPPtr viewport) => + PInvoke.DebugNodeViewport_internal(viewport); + + /// + /// + /// C++: + /// imgui_internal.h:3965 + /// , + /// imgui.cpp:23072 + ///
void DebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor, const char* label, int idx) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugNodePlatformMonitor(ImGuiPlatformMonitorPtr monitor, ImString label, int idx) + { + fixed (byte* label_fixed = label) + { + PInvoke.DebugNodePlatformMonitor_internal(monitor, label_fixed, idx); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:3966 + /// , + /// imgui.cpp:21459 + ///
void DebugRenderKeyboardPreview(ImDrawList* draw_list) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw an arbitrary US keyboard layout to visualize translated keys + /// + /// + public static unsafe void DebugRenderKeyboardPreview(ImDrawListPtr drawList) => + PInvoke.DebugRenderKeyboardPreview_internal(drawList); + + /// + /// + /// C++: + /// imgui_internal.h:3967 + /// , + /// imgui.cpp:21390 + ///
+ /// void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + public static unsafe void DebugRenderViewportThumbnail( + ImDrawListPtr drawList, + ImGuiViewportPPtr viewport, + in floatRect bb + ) + { + fixed (floatRect* bb_fixed = &bb) + { + PInvoke.DebugRenderViewportThumbnail_internal(drawList, viewport, bb_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:579 + ///
ImVec2 GetCenter() const + ///
+ ///
+ public static unsafe float2 GetCenter(Ptr target) => + PInvoke.ImRect_GetCenter_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:580 + ///
ImVec2 GetSize() const + ///
+ ///
+ public static unsafe float2 GetSize(Ptr target) => + PInvoke.ImRect_GetSize_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:581 + ///
float GetWidth() const + ///
+ ///
+ public static unsafe float GetWidth(Ptr target) => + PInvoke.ImRect_GetWidth_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:582 + ///
float GetHeight() const + ///
+ ///
+ public static unsafe float GetHeight(Ptr target) => + PInvoke.ImRect_GetHeight_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:583 + ///
float GetArea() const + ///
+ ///
+ public static unsafe float GetArea(Ptr target) => + PInvoke.ImRect_GetArea_internal((floatRect*)target); + + /// + /// + /// Top-left + /// + /// + /// C++: + /// imgui_internal.h:584 + ///
ImVec2 GetTL() const + ///
+ ///
+ public static unsafe float2 GetTL(Ptr target) => + PInvoke.ImRect_GetTL_internal((floatRect*)target); + + /// + /// + /// Top-right + /// + /// + /// C++: + /// imgui_internal.h:585 + ///
ImVec2 GetTR() const + ///
+ ///
+ public static unsafe float2 GetTR(Ptr target) => + PInvoke.ImRect_GetTR_internal((floatRect*)target); + + /// + /// + /// Bottom-left + /// + /// + /// C++: + /// imgui_internal.h:586 + ///
ImVec2 GetBL() const + ///
+ ///
+ public static unsafe float2 GetBL(Ptr target) => + PInvoke.ImRect_GetBL_internal((floatRect*)target); + + /// + /// + /// Bottom-right + /// + /// + /// C++: + /// imgui_internal.h:587 + ///
ImVec2 GetBR() const + ///
+ ///
+ public static unsafe float2 GetBR(Ptr target) => + PInvoke.ImRect_GetBR_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:588 + ///
bool Contains(const ImVec2& p) const + ///
+ ///
+ public static unsafe bool Contains(Ptr target, in float2 p) + { + fixed (float2* p_fixed = &p) + { + return PInvoke.ImRect_Contains_internal_0((floatRect*)target, p_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:589 + ///
bool Contains(const ImRect& r) const + ///
+ ///
+ public static unsafe bool Contains(Ptr target, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + return PInvoke.ImRect_Contains_internal_1((floatRect*)target, r_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:590 + ///
bool ContainsWithPad(const ImVec2& p, const ImVec2& pad) const + ///
+ ///
+ public static unsafe bool ContainsWithPad(Ptr target, in float2 p, in float2 pad) + { + fixed (float2* pad_fixed = &pad) + { + fixed (float2* p_fixed = &p) + { + return PInvoke.ImRect_ContainsWithPad_internal((floatRect*)target, p_fixed, pad_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui_internal.h:591 + ///
bool Overlaps(const ImRect& r) const + ///
+ ///
+ public static unsafe bool Overlaps(Ptr target, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + return PInvoke.ImRect_Overlaps_internal((floatRect*)target, r_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:592 + ///
void Add(const ImVec2& p) + ///
+ ///
+ public static unsafe void Add(Ptr target, in float2 p) + { + fixed (float2* p_fixed = &p) + { + PInvoke.ImRect_Add_internal_0((floatRect*)target, p_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:593 + ///
void Add(const ImRect& r) + ///
+ ///
+ public static unsafe void Add(Ptr target, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + PInvoke.ImRect_Add_internal_1((floatRect*)target, r_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:594 + ///
void Expand(const float amount) + ///
+ ///
+ public static unsafe void Expand(Ptr target, float amount) => + PInvoke.ImRect_Expand_internal_0((floatRect*)target, amount); + + /// + /// + /// C++: + /// imgui_internal.h:595 + ///
void Expand(const ImVec2& amount) + ///
+ ///
+ public static unsafe void Expand(Ptr target, in float2 amount) + { + fixed (float2* amount_fixed = &amount) + { + PInvoke.ImRect_Expand_internal_1((floatRect*)target, amount_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:596 + ///
void Translate(const ImVec2& d) + ///
+ ///
+ public static unsafe void Translate(Ptr target, in float2 d) + { + fixed (float2* d_fixed = &d) + { + PInvoke.ImRect_Translate_internal((floatRect*)target, d_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:597 + ///
void TranslateX(float dx) + ///
+ ///
+ public static unsafe void TranslateX(Ptr target, float dx) => + PInvoke.ImRect_TranslateX_internal((floatRect*)target, dx); + + /// + /// + /// C++: + /// imgui_internal.h:598 + ///
void TranslateY(float dy) + ///
+ ///
+ public static unsafe void TranslateY(Ptr target, float dy) => + PInvoke.ImRect_TranslateY_internal((floatRect*)target, dy); + + /// + /// + /// Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not + /// for display. + /// + /// + /// C++: + /// imgui_internal.h:599 + ///
void ClipWith(const ImRect& r) + ///
+ ///
+ public static unsafe void ClipWith(Ptr target, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + PInvoke.ImRect_ClipWith_internal((floatRect*)target, r_fixed); + } + } + + /// + /// + /// Full version, ensure both points are fully clipped. + /// + /// + /// C++: + /// imgui_internal.h:600 + ///
void ClipWithFull(const ImRect& r) + ///
+ ///
+ public static unsafe void ClipWithFull(Ptr target, in floatRect r) + { + fixed (floatRect* r_fixed = &r) + { + PInvoke.ImRect_ClipWithFull_internal((floatRect*)target, r_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:601 + ///
void Floor() + ///
+ ///
+ public static unsafe void Floor(Ptr target) => PInvoke.ImRect_Floor_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:602 + ///
bool IsInverted() const + ///
+ ///
+ public static unsafe bool IsInverted(Ptr target) => + PInvoke.ImRect_IsInverted_internal((floatRect*)target); + + /// + /// + /// C++: + /// imgui_internal.h:603 + ///
ImVec4 ToVec4() const + ///
+ ///
+ public static unsafe float4 ToVec4(Ptr target) => + PInvoke.ImRect_ToVec4_internal((floatRect*)target); + } + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiDockNode.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiDockNode.gen.cs new file mode 100644 index 0000000..0cd9113 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiDockNode.gen.cs @@ -0,0 +1,135 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiDockNodeExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:2036 + ///
bool IsRootNode() const + ///
+ ///
+ public static unsafe bool IsRootNode(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsRootNode_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2037 + ///
bool IsDockSpace() const + ///
+ ///
+ public static unsafe bool IsDockSpace(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsDockSpace_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2038 + ///
bool IsFloatingNode() const + ///
+ ///
+ public static unsafe bool IsFloatingNode(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsFloatingNode_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2039 + ///
bool IsCentralNode() const + ///
+ ///
+ public static unsafe bool IsCentralNode(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsCentralNode_internal(target); + + /// + /// + /// Hidden tab bar can be shown back by clicking the small triangle + /// + /// + /// C++: + /// imgui_internal.h:2040 + ///
bool IsHiddenTabBar() const + ///
+ ///
+ public static unsafe bool IsHiddenTabBar(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsHiddenTabBar_internal(target); + + /// + /// + /// Never show a tab bar + /// + /// + /// C++: + /// imgui_internal.h:2041 + ///
bool IsNoTabBar() const + ///
+ ///
+ public static unsafe bool IsNoTabBar(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsNoTabBar_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2042 + ///
bool IsSplitNode() const + ///
+ ///
+ public static unsafe bool IsSplitNode(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsSplitNode_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2043 + ///
bool IsLeafNode() const + ///
+ ///
+ public static unsafe bool IsLeafNode(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsLeafNode_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2044 + ///
bool IsEmpty() const + ///
+ ///
+ public static unsafe bool IsEmpty(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_IsEmpty_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2045 + ///
ImRect Rect() const + ///
+ ///
+ public static unsafe floatRect Rect(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_Rect_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2047 + ///
void SetLocalFlags(ImGuiDockNodeFlags flags) + ///
+ ///
+ public static unsafe void SetLocalFlags(this ImGuiDockNodePtr target, ImGuiDockNodeFlags flags) => + PInvoke.ImGuiDockNode_SetLocalFlags_internal(target, flags); + + /// + /// + /// C++: + /// imgui_internal.h:2048 + ///
void UpdateMergedFlags() + ///
+ ///
+ public static unsafe void UpdateMergedFlags(this ImGuiDockNodePtr target) => + PInvoke.ImGuiDockNode_UpdateMergedFlags_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextDeactivatedState.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextDeactivatedState.gen.cs new file mode 100644 index 0000000..1617d4d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextDeactivatedState.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiInputTextDeactivatedStateExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1203 + ///
void ClearFreeMemory() + ///
+ ///
+ public static unsafe void ClearFreeMemory(this ImGuiInputTextDeactivatedStatePtr target) => + PInvoke.ImGuiInputTextDeactivatedState_ClearFreeMemory_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextState.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextState.gen.cs new file mode 100644 index 0000000..9b03b58 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiInputTextState.gen.cs @@ -0,0 +1,259 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiInputTextStateExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1242 + ///
void ClearText() + ///
+ ///
+ public static unsafe void ClearText(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_ClearText_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1243 + ///
void ClearFreeMemory() + ///
+ ///
+ public static unsafe void ClearFreeMemory(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_ClearFreeMemory_internal(target); + + /// + /// + /// Cannot be inline because we call in code in stb_textedit.h implementation + /// + /// + /// C++: + /// imgui_internal.h:1244 + /// , + /// imgui_widgets.cpp:4234 + ///
void OnKeyPressed(int key) + ///
+ ///
+ public static unsafe void OnKeyPressed(this ImGuiInputTextStatePtr target, int key) => + PInvoke.ImGuiInputTextState_OnKeyPressed_internal(target, key); + + /// + /// + /// C++: + /// imgui_internal.h:1245 + /// , + /// imgui_widgets.cpp:4241 + ///
void OnCharPressed(unsigned int c) + ///
+ ///
+ public static unsafe void OnCharPressed(this ImGuiInputTextStatePtr target, uint c) => + PInvoke.ImGuiInputTextState_OnCharPressed_internal(target, c); + + /// + /// + /// C++: + /// imgui_internal.h:1248 + /// , + /// imgui_widgets.cpp:4253 + ///
void CursorAnimReset() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + /// Those functions are not inlined in imgui_internal.h, allowing us to hide ImStbTexteditState from that + /// header. + /// + /// + public static unsafe void CursorAnimReset(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_CursorAnimReset_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1249 + /// , + /// imgui_widgets.cpp:4254 + ///
void CursorClamp() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe void CursorClamp(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_CursorClamp_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1250 + /// , + /// imgui_widgets.cpp:4255 + ///
bool HasSelection() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe bool HasSelection(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_HasSelection_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1251 + /// , + /// imgui_widgets.cpp:4256 + ///
void ClearSelection() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe void ClearSelection(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_ClearSelection_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1252 + /// , + /// imgui_widgets.cpp:4257 + ///
int GetCursorPos() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe int GetCursorPos(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_GetCursorPos_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1253 + /// , + /// imgui_widgets.cpp:4258 + ///
int GetSelectionStart() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe int GetSelectionStart(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_GetSelectionStart_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1254 + /// , + /// imgui_widgets.cpp:4259 + ///
int GetSelectionEnd() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe int GetSelectionEnd(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_GetSelectionEnd_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1255 + /// , + /// imgui_widgets.cpp:4260 + ///
void SelectAll() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + public static unsafe void SelectAll(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_SelectAll_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1262 + /// , + /// imgui_widgets.cpp:4261 + ///
void ReloadUserBufAndSelectAll() + ///
+ ///
+ /// + /// + /// Reload user buf (WIP #2890) + /// If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + /// strcpy(my_buf, "hello"); + /// if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + /// state->ReloadUserBufAndSelectAll(); + /// + /// + public static unsafe void ReloadUserBufAndSelectAll(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_ReloadUserBufAndSelectAll_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1263 + /// , + /// imgui_widgets.cpp:4262 + ///
void ReloadUserBufAndKeepSelection() + ///
+ ///
+ /// + /// + /// Reload user buf (WIP #2890) + /// If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + /// strcpy(my_buf, "hello"); + /// if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + /// state->ReloadUserBufAndSelectAll(); + /// + /// + public static unsafe void ReloadUserBufAndKeepSelection(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_ReloadUserBufAndKeepSelection_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1264 + /// , + /// imgui_widgets.cpp:4263 + ///
void ReloadUserBufAndMoveToEnd() + ///
+ ///
+ /// + /// + /// Reload user buf (WIP #2890) + /// If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + /// strcpy(my_buf, "hello"); + /// if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + /// state->ReloadUserBufAndSelectAll(); + /// + /// + public static unsafe void ReloadUserBufAndMoveToEnd(this ImGuiInputTextStatePtr target) => + PInvoke.ImGuiInputTextState_ReloadUserBufAndMoveToEnd_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiKeyRoutingTable.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiKeyRoutingTable.gen.cs new file mode 100644 index 0000000..e46efbe --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiKeyRoutingTable.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiKeyRoutingTableExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1578 + ///
void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImGuiKeyRoutingTablePtr target) => + PInvoke.ImGuiKeyRoutingTable_Clear_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperData.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperData.gen.cs new file mode 100644 index 0000000..c33a9ba --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperData.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiListClipperDataExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1662 + ///
void Reset(ImGuiListClipper* clipper) + ///
+ ///
+ public static unsafe void Reset(this ImGuiListClipperDataPtr target, ImGuiListClipperPtr clipper) => + PInvoke.ImGuiListClipperData_Reset_internal(target, clipper); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperRange.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperRange.gen.cs new file mode 100644 index 0000000..6e54613 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiListClipperRange.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiListClipperRangeExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1648 + ///
static ImGuiListClipperRange FromIndices(int min, int max) + ///
+ ///
+ public static unsafe ImGuiListClipperRange FromIndices( + this ImGuiListClipperRangePtr target, + int min, + int max + ) => PInvoke.ImGuiListClipperRange_FromIndices_internal(target, min, max); + + /// + /// + /// C++: + /// imgui_internal.h:1649 + ///
static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max) + ///
+ ///
+ public static unsafe ImGuiListClipperRange FromPositions( + this ImGuiListClipperRangePtr target, + float y1, + float y2, + int offMin, + int offMax + ) => PInvoke.ImGuiListClipperRange_FromPositions_internal(target, y1, y2, offMin, offMax); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiMenuColumns.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiMenuColumns.gen.cs new file mode 100644 index 0000000..b785c61 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiMenuColumns.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiMenuColumnsExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1191 + /// , + /// imgui_widgets.cpp:8777 + ///
void Update(float spacing, bool window_reappearing) + ///
+ ///
+ /// + /// + /// Helpers for internal use + /// + /// + public static unsafe void Update(this ImGuiMenuColumnsPtr target, float spacing, bool windowReappearing) => + PInvoke.ImGuiMenuColumns_Update_internal(target, spacing, windowReappearing); + + /// + /// + /// C++: + /// imgui_internal.h:1192 + /// , + /// imgui_widgets.cpp:8809 + ///
float DeclColumns(float w_icon, float w_label, float w_shortcut, float w_mark) + ///
+ ///
+ public static unsafe float DeclColumns( + this ImGuiMenuColumnsPtr target, + float wIcon, + float wLabel, + float wShortcut, + float wMark + ) => PInvoke.ImGuiMenuColumns_DeclColumns_internal(target, wIcon, wLabel, wShortcut, wMark); + + /// + /// + /// C++: + /// imgui_internal.h:1193 + /// , + /// imgui_widgets.cpp:8788 + ///
void CalcNextTotalWidth(bool update_offsets) + ///
+ ///
+ public static unsafe void CalcNextTotalWidth(this ImGuiMenuColumnsPtr target, bool updateOffsets) => + PInvoke.ImGuiMenuColumns_CalcNextTotalWidth_internal(target, updateOffsets); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiMultiSelectTempData.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiMultiSelectTempData.gen.cs new file mode 100644 index 0000000..a2f711e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiMultiSelectTempData.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiMultiSelectTempDataExtensions + { + /// + /// + /// Zero-clear except IO as we preserve IO.Requests[] buffer allocation. + /// + /// + /// C++: + /// imgui_internal.h:1911 + ///
void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImGuiMultiSelectTempDataPtr target) => + PInvoke.ImGuiMultiSelectTempData_Clear_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:1912 + ///
void ClearIO() + ///
+ ///
+ public static unsafe void ClearIO(this ImGuiMultiSelectTempDataPtr target) => + PInvoke.ImGuiMultiSelectTempData_ClearIO_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiNavItemData.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiNavItemData.gen.cs new file mode 100644 index 0000000..1e30276 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiNavItemData.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiNavItemDataExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1752 + ///
void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImGuiNavItemDataPtr target) => + PInvoke.ImGuiNavItemData_Clear_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiNextItemData.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiNextItemData.gen.cs new file mode 100644 index 0000000..5fcaa1c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiNextItemData.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiNextItemDataExtensions + { + /// + /// + /// Also cleared manually by ItemAdd()! + /// + /// + /// C++: + /// imgui_internal.h:1355 + ///
inline void ClearFlags() + ///
+ ///
+ public static unsafe void ClearFlags(this ImGuiNextItemDataPtr target) => + PInvoke.ImGuiNextItemData_ClearFlags_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiNextWindowData.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiNextWindowData.gen.cs new file mode 100644 index 0000000..c8cf610 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiNextWindowData.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiNextWindowDataExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:1325 + ///
inline void ClearFlags() + ///
+ ///
+ public static unsafe void ClearFlags(this ImGuiNextWindowDataPtr target) => + PInvoke.ImGuiNextWindowData_ClearFlags_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiStyleVarInfo.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiStyleVarInfo.gen.cs new file mode 100644 index 0000000..620ab03 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiStyleVarInfo.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiStyleVarInfoExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:899 + ///
void* GetVarPtr(void* parent) const + ///
+ ///
+ public static unsafe Ptr GetVarPtr(this ImGuiStyleVarInfoPtr target, Ptr parent) => + PInvoke.ImGuiStyleVarInfo_GetVarPtr_internal(target, parent); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiTableSettings.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiTableSettings.gen.cs new file mode 100644 index 0000000..41c5909 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiTableSettings.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiTableSettingsExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:3309 + ///
ImGuiTableColumnSettings* GetColumnSettings() + ///
+ ///
+ public static unsafe ImGuiTableColumnSettingsPtr GetColumnSettings(this ImGuiTableSettingsPtr target) => + PInvoke.ImGuiTableSettings_GetColumnSettings_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiTextIndex.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiTextIndex.gen.cs new file mode 100644 index 0000000..72e7c6b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiTextIndex.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiTextIndexExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:805 + ///
void clear() + ///
+ ///
+ public static unsafe void clear(this ImGuiTextIndexPtr target) => PInvoke.ImGuiTextIndex_clear_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:806 + ///
int size() + ///
+ ///
+ public static unsafe int size(this ImGuiTextIndexPtr target) => PInvoke.ImGuiTextIndex_size_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:807 + ///
const char* get_line_begin(const char* base, int n) + ///
+ ///
+ public static unsafe Ptr get_line_begin(this ImGuiTextIndexPtr target, Ptr @base, int n) => + PInvoke.ImGuiTextIndex_get_line_begin_internal(target, (byte*)@base, n); + + /// + /// + /// C++: + /// imgui_internal.h:808 + ///
const char* get_line_end(const char* base, int n) + ///
+ ///
+ public static unsafe Ptr get_line_end(this ImGuiTextIndexPtr target, Ptr @base, int n) => + PInvoke.ImGuiTextIndex_get_line_end_internal(target, (byte*)@base, n); + + /// + /// + /// C++: + /// imgui_internal.h:809 + /// , + /// imgui.cpp:3127 + ///
void append(const char* base, int old_size, int new_size) + ///
+ ///
+ public static unsafe void append(this ImGuiTextIndexPtr target, Ptr @base, int oldSize, int newSize) => + PInvoke.ImGuiTextIndex_append_internal(target, (byte*)@base, oldSize, newSize); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiTypingSelectState.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiTypingSelectState.gen.cs new file mode 100644 index 0000000..220461d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiTypingSelectState.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiTypingSelectStateExtensions + { + /// + /// + /// We preserve remaining data for easier debugging + /// + /// + /// C++: + /// imgui_internal.h:1796 + ///
void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImGuiTypingSelectStatePtr target) => + PInvoke.ImGuiTypingSelectState_Clear_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiViewportP.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiViewportP.gen.cs new file mode 100644 index 0000000..b942333 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiViewportP.gen.cs @@ -0,0 +1,135 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiViewportPExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:2123 + ///
void ClearRequestFlags() + ///
+ ///
+ public static unsafe void ClearRequestFlags(this ImGuiViewportPPtr target) => + PInvoke.ImGuiViewportP_ClearRequestFlags_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2126 + ///
ImVec2 CalcWorkRectPos(const ImVec2& inset_min) const + ///
+ ///
+ /// + /// + /// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last + /// frame data, and 1 pair for currently building rect) + /// + /// + public static unsafe float2 CalcWorkRectPos(this ImGuiViewportPPtr target, in float2 insetMin) + { + fixed (float2* insetMin_fixed = &insetMin) + { + return PInvoke.ImGuiViewportP_CalcWorkRectPos_internal(target, insetMin_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:2127 + ///
ImVec2 CalcWorkRectSize(const ImVec2& inset_min, const ImVec2& inset_max) const + ///
+ ///
+ /// + /// + /// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last + /// frame data, and 1 pair for currently building rect) + /// + /// + public static unsafe float2 CalcWorkRectSize( + this ImGuiViewportPPtr target, + in float2 insetMin, + in float2 insetMax + ) + { + fixed (float2* insetMax_fixed = &insetMax) + { + fixed (float2* insetMin_fixed = &insetMin) + { + return PInvoke.ImGuiViewportP_CalcWorkRectSize_internal(target, insetMin_fixed, insetMax_fixed); + } + } + } + + /// + /// + /// Update public fields + /// + /// + /// C++: + /// imgui_internal.h:2128 + ///
void UpdateWorkRect() + ///
+ ///
+ /// + /// + /// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last + /// frame data, and 1 pair for currently building rect) + /// + /// + public static unsafe void UpdateWorkRect(this ImGuiViewportPPtr target) => + PInvoke.ImGuiViewportP_UpdateWorkRect_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2131 + ///
ImRect GetMainRect() const + ///
+ ///
+ /// + /// + /// Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, + /// hence the code asymmetry) + /// + /// + public static unsafe floatRect GetMainRect(this ImGuiViewportPPtr target) => + PInvoke.ImGuiViewportP_GetMainRect_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2132 + ///
ImRect GetWorkRect() const + ///
+ ///
+ /// + /// + /// Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, + /// hence the code asymmetry) + /// + /// + public static unsafe floatRect GetWorkRect(this ImGuiViewportPPtr target) => + PInvoke.ImGuiViewportP_GetWorkRect_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2133 + ///
ImRect GetBuildWorkRect() const + ///
+ ///
+ /// + /// + /// Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, + /// hence the code asymmetry) + /// + /// + public static unsafe floatRect GetBuildWorkRect(this ImGuiViewportPPtr target) => + PInvoke.ImGuiViewportP_GetBuildWorkRect_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiWindow.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiWindow.gen.cs new file mode 100644 index 0000000..9b3df4f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiWindow.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiWindowExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:2924 + /// , + /// imgui.cpp:9542 + ///
ImGuiID GetID(const char* str, const char* str_end = NULL) + ///
+ ///
+ public static unsafe ImGuiID GetID(this ImGuiWindowPtr target, ImString str) + { + fixed (byte* str_fixed = str) + { + return PInvoke.ImGuiWindow_GetID_internal_0(target, str_fixed, str_fixed + str.Length); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:2925 + /// , + /// imgui.cpp:9554 + ///
ImGuiID GetID(const void* ptr) + ///
+ ///
+ public static unsafe ImGuiID GetID(this ImGuiWindowPtr target, Ptr ptr) => + PInvoke.ImGuiWindow_GetID_internal_1(target, ptr); + + /// + /// + /// C++: + /// imgui_internal.h:2926 + /// , + /// imgui.cpp:9566 + ///
ImGuiID GetID(int n) + ///
+ ///
+ public static unsafe ImGuiID GetID(this ImGuiWindowPtr target, int n) => + PInvoke.ImGuiWindow_GetID_internal_2(target, n); + + /// + /// + /// C++: + /// imgui_internal.h:2927 + /// , + /// imgui.cpp:9580 + ///
ImGuiID GetIDFromPos(const ImVec2& p_abs) + ///
+ ///
+ /// + /// + /// This is only used in rare/specific situations to manufacture an ID out of nowhere. + /// FIXME: Consider instead storing last non-zero ID + count of successive zero-ID, and combine those? + /// + /// + public static unsafe ImGuiID GetIDFromPos(this ImGuiWindowPtr target, in float2 pAbs) + { + fixed (float2* pAbs_fixed = &pAbs) + { + return PInvoke.ImGuiWindow_GetIDFromPos_internal(target, pAbs_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:2928 + /// , + /// imgui.cpp:9589 + ///
ImGuiID GetIDFromRectangle(const ImRect& r_abs) + ///
+ ///
+ /// + /// + /// " + /// + /// + public static unsafe ImGuiID GetIDFromRectangle(this ImGuiWindowPtr target, in floatRect rAbs) + { + fixed (floatRect* rAbs_fixed = &rAbs) + { + return PInvoke.ImGuiWindow_GetIDFromRectangle_internal(target, rAbs_fixed); + } + } + + /// + /// + /// C++: + /// imgui_internal.h:2931 + ///
ImRect Rect() const + ///
+ ///
+ /// + /// + /// We don't use g.FontSize because the window may be != g.CurrentWindow. + /// + /// + public static unsafe floatRect Rect(this ImGuiWindowPtr target) => PInvoke.ImGuiWindow_Rect_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2932 + ///
ImRect TitleBarRect() const + ///
+ ///
+ /// + /// + /// We don't use g.FontSize because the window may be != g.CurrentWindow. + /// + /// + public static unsafe floatRect TitleBarRect(this ImGuiWindowPtr target) => + PInvoke.ImGuiWindow_TitleBarRect_internal(target); + + /// + /// + /// C++: + /// imgui_internal.h:2933 + ///
ImRect MenuBarRect() const + ///
+ ///
+ /// + /// + /// We don't use g.FontSize because the window may be != g.CurrentWindow. + /// + /// + public static unsafe floatRect MenuBarRect(this ImGuiWindowPtr target) => + PInvoke.ImGuiWindow_MenuBarRect_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Functions/ImGuiWindowSettings.gen.cs b/Brutal.ImGui/Generated-Internal/Functions/ImGuiWindowSettings.gen.cs new file mode 100644 index 0000000..8d02e23 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Functions/ImGuiWindowSettings.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public static partial class ImGuiWindowSettingsExtensions + { + /// + /// + /// C++: + /// imgui_internal.h:2159 + ///
char* GetName() + ///
+ ///
+ public static unsafe Ptr GetName(this ImGuiWindowSettingsPtr target) => + PInvoke.ImGuiWindowSettings_GetName_internal(target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/InlineArrays.gen.cs b/Brutal.ImGui/Generated-Internal/InlineArrays.gen.cs new file mode 100644 index 0000000..1e0c09b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/InlineArrays.gen.cs @@ -0,0 +1,140 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal.InlineArrays +{ + /// + /// Represents an inline array of ImGuiDockNodePtr with a fixed size of 2. + /// + [InlineArray(2)] + public struct ImGuiDockNodePtr_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImGuiDockNodePtr Items; + } + + /// + /// Represents an inline array of ushort with a fixed size of 4. + /// + [InlineArray(4)] + public struct ushort_4 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ushort Items; + } + + /// + /// Represents an inline array of uint with a fixed size of 2. + /// + [InlineArray(2)] + public struct uint_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public uint Items; + } + + /// + /// Represents an inline array of ImGuiID with a fixed size of 2. + /// + [InlineArray(2)] + public struct ImGuiID_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImGuiID Items; + } + + /// + /// Represents an inline array of floatRect with a fixed size of 2. + /// + [InlineArray(2)] + public struct floatRect_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public floatRect Items; + } + + /// + /// Represents an inline array of float2 with a fixed size of 2. + /// + [InlineArray(2)] + public struct float2_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float2 Items; + } + + /// + /// Represents an inline array of uint with a fixed size of 8. + /// + [InlineArray(8)] + public struct uint_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public uint Items; + } + + /// + /// Represents an inline array of byte with a fixed size of 8. + /// + [InlineArray(8)] + public struct byte_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte Items; + } + + /// + /// Represents an inline array of short with a fixed size of 155. + /// + [InlineArray(155)] + public struct short_155 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public short Items; + } + + /// + /// Represents an inline array of ImDrawListPtr with a fixed size of 2. + /// + [InlineArray(2)] + public struct ImDrawListPtr_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImDrawListPtr Items; + } + + /// + /// Represents an inline array of ImGuiDebugAllocEntry with a fixed size of 6. + /// + [InlineArray(6)] + public struct ImGuiDebugAllocEntry_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImGuiDebugAllocEntry Items; + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ActivateItemByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ActivateItemByID_internal.gen.cs new file mode 100644 index 0000000..5db0203 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ActivateItemByID_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the + /// next frame when the item is encountered again. Was called 'ActivateItem()' before 1.89.7. + /// + /// + /// C++: + /// imgui_internal.h:3532 + /// , + /// imgui.cpp:9189 + ///
void ActivateItemByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Focus/Activation + /// This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are + /// much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ActivateItemByID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/AddContextHook_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/AddContextHook_internal.gen.cs new file mode 100644 index 0000000..8e95085 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/AddContextHook_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3392 + /// , + /// imgui.cpp:4479 + ///
ImGuiID AddContextHook(ImGuiContext* context, const ImGuiContextHook* hook) + ///
+ ///
+ /// + /// + /// Generic context hooks + /// + /// + /// No specific ordering/dependency support, will see as needed + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID AddContextHook_internal(ImGuiContext* context, ImGuiContextHook* hook); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/AddDrawListToDrawDataEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/AddDrawListToDrawDataEx_internal.gen.cs new file mode 100644 index 0000000..b4bc9dd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/AddDrawListToDrawDataEx_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3375 + /// , + /// imgui_draw.cpp:2264 + ///
+ /// void AddDrawListToDrawDataEx(ImDrawData* draw_data, ImVector<ImDrawList*>* out_list, ImDrawList* draw_list) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// Important: 'out_list' is generally going to be draw_data->CmdLists, but may be another temporary list + /// as long at it is expected that the result will be later merged into draw_data->CmdLists[]. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void AddDrawListToDrawDataEx_internal( + ImDrawData* draw_data, + ImVector* out_list, + ImDrawList* draw_list + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/AddSettingsHandler_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/AddSettingsHandler_internal.gen.cs new file mode 100644 index 0000000..38e4b33 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/AddSettingsHandler_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3409 + /// , + /// imgui.cpp:15803 + ///
void AddSettingsHandler(const ImGuiSettingsHandler* handler) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void AddSettingsHandler_internal(ImGuiSettingsHandler* handler); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ArrowButtonEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ArrowButtonEx_internal.gen.cs new file mode 100644 index 0000000..74f51d9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ArrowButtonEx_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3842 + /// , + /// imgui_widgets.cpp:851 + ///
+ /// bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ArrowButtonEx_internal( + byte* str_id, + ImGuiDir dir, + float2 size_arg, + ImGuiButtonFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginBoxSelect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginBoxSelect_internal.gen.cs new file mode 100644 index 0000000..266369b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginBoxSelect_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3702 + /// , + /// imgui_widgets.cpp:7589 + ///
+ /// bool BeginBoxSelect(const ImRect& scope_rect, ImGuiWindow* window, ImGuiID box_select_id, ImGuiMultiSelectFlags ms_flags) + ///
+ ///
+ /// + /// + /// Box-Select API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginBoxSelect_internal( + floatRect* scope_rect, + ImGuiWindow* window, + ImGuiID box_select_id, + ImGuiMultiSelectFlags ms_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginChildEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginChildEx_internal.gen.cs new file mode 100644 index 0000000..cd0eebe --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginChildEx_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3478 + /// , + /// imgui.cpp:6482 + ///
+ /// bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags) + ///
+ ///
+ /// + /// + /// Childs + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginChildEx_internal( + byte* name, + ImGuiID id, + float2* size_arg, + ImGuiChildFlags child_flags, + ImGuiWindowFlags window_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginColumns_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginColumns_internal.gen.cs new file mode 100644 index 0000000..7cae9ee --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginColumns_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns(). + /// + /// + /// C++: + /// imgui_internal.h:3715 + /// , + /// imgui_tables.cpp:4331 + ///
void BeginColumns(const char* str_id, int count, ImGuiOldColumnFlags flags = 0) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginColumns_internal(byte* str_id, int count, ImGuiOldColumnFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPopup_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPopup_internal.gen.cs new file mode 100644 index 0000000..73613e4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPopup_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3505 + /// , + /// imgui_widgets.cpp:1982 + ///
bool BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags flags) + ///
+ ///
+ /// + /// + /// Combos + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginComboPopup_internal( + ImGuiID popup_id, + floatRect* bb, + ImGuiComboFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPreview_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPreview_internal.gen.cs new file mode 100644 index 0000000..97814d4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginComboPreview_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3506 + /// , + /// imgui_widgets.cpp:2056 + ///
bool BeginComboPreview() + ///
+ ///
+ /// + /// + /// Combos + /// + /// + /// Call directly after the BeginCombo/EndCombo block. The preview is designed to only host non-interactive elements + /// (Experimental, see GitHub issues: #1658, #4168) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginComboPreview_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginDisabledOverrideReenable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDisabledOverrideReenable_internal.gen.cs new file mode 100644 index 0000000..0702131 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDisabledOverrideReenable_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3468 + /// , + /// imgui.cpp:8654 + ///
void BeginDisabledOverrideReenable() + ///
+ ///
+ /// + /// + /// Parameter stacks (shared) + /// + /// + /// Could have been called BeginDisabledDisable() but it didn't want to be award nominated for most awkward function name. + /// Ideally we would use a shared e.g. BeginDisabled()->BeginDisabledEx() but earlier needs to be optimal. + /// The whole code for this is awkward, will reevaluate if we find a way to implement SetNextItemDisabled(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginDisabledOverrideReenable_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropSource_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropSource_internal.gen.cs new file mode 100644 index 0000000..71b1e05 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropSource_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3646 + /// , + /// imgui.cpp:20773 + ///
void BeginDockableDragDropSource(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginDockableDragDropSource_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropTarget_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropTarget_internal.gen.cs new file mode 100644 index 0000000..1a9c1d1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDockableDragDropTarget_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3647 + /// , + /// imgui.cpp:20805 + ///
void BeginDockableDragDropTarget(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginDockableDragDropTarget_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginDocked_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDocked_internal.gen.cs new file mode 100644 index 0000000..da22d46 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDocked_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3645 + /// , + /// imgui.cpp:20647 + ///
void BeginDocked(ImGuiWindow* window, bool* p_open) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginDocked_internal(ImGuiWindow* window, Bool8* p_open); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginDragDropTargetCustom_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDragDropTargetCustom_internal.gen.cs new file mode 100644 index 0000000..ef6d0aa --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginDragDropTargetCustom_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3688 + /// , + /// imgui.cpp:15353 + ///
bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginDragDropTargetCustom_internal(floatRect* bb, ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginErrorTooltip_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginErrorTooltip_internal.gen.cs new file mode 100644 index 0000000..a13b85f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginErrorTooltip_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3928 + /// , + /// imgui.cpp:11610 + ///
bool BeginErrorTooltip() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Pseudo-tooltip. Follow mouse until CTRL is held. When CTRL is held we lock position, allowing to click + /// it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginErrorTooltip_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginMenuEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginMenuEx_internal.gen.cs new file mode 100644 index 0000000..8d217d2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginMenuEx_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3501 + /// , + /// imgui_widgets.cpp:9020 + ///
bool BeginMenuEx(const char* label, const char* icon, bool enabled = true) + ///
+ ///
+ /// + /// + /// Menus + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginMenuEx_internal(byte* label, byte* icon, Bool8 enabled); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupEx_internal.gen.cs new file mode 100644 index 0000000..c087cbc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupEx_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3481 + /// , + /// imgui.cpp:12832 + ///
bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_window_flags) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Attention! BeginPopup() adds default flags when calling BeginPopupEx()! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopupEx_internal(ImGuiID id, ImGuiWindowFlags extra_window_flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupMenuEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupMenuEx_internal.gen.cs new file mode 100644 index 0000000..5300120 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginPopupMenuEx_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3482 + /// , + /// imgui.cpp:12852 + ///
bool BeginPopupMenuEx(ImGuiID id, const char* label, ImGuiWindowFlags extra_window_flags) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopupMenuEx_internal( + ImGuiID id, + byte* label, + ImGuiWindowFlags extra_window_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginTabBarEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTabBarEx_internal.gen.cs new file mode 100644 index 0000000..b050784 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTabBarEx_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3785 + /// , + /// imgui_widgets.cpp:9458 + ///
bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTabBarEx_internal( + ImGuiTabBar* tab_bar, + floatRect* bb, + ImGuiTabBarFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginTableEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTableEx_internal.gen.cs new file mode 100644 index 0000000..a704747 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTableEx_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3741 + /// , + /// imgui_tables.cpp:317 + ///
+ /// bool BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTableEx_internal( + byte* name, + ImGuiID id, + int columns_count, + ImGuiTableFlags flags, + float2* outer_size, + float inner_width + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipEx_internal.gen.cs new file mode 100644 index 0000000..37a1daf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipEx_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3496 + /// , + /// imgui.cpp:12450 + ///
bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags) + ///
+ ///
+ /// + /// + /// Tooltips + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTooltipEx_internal( + ImGuiTooltipFlags tooltip_flags, + ImGuiWindowFlags extra_window_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipHidden_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipHidden_internal.gen.cs new file mode 100644 index 0000000..3b30186 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginTooltipHidden_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3497 + /// , + /// imgui.cpp:15159 + ///
bool BeginTooltipHidden() + ///
+ ///
+ /// + /// + /// Tooltips + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTooltipHidden_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BeginViewportSideBar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BeginViewportSideBar_internal.gen.cs new file mode 100644 index 0000000..3eb44bf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BeginViewportSideBar_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3500 + /// , + /// imgui_widgets.cpp:8912 + ///
+ /// bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags) + ///
+ ///
+ /// + /// + /// Menus + /// + /// + /// Important: calling order matters! + /// FIXME: Somehow overlapping with docking tech. + /// FIXME: The "rect-cut" aspect of this could be formalized into a lower-level helper (rect-cut: https://halt.software/dead-simple-layouts) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginViewportSideBar_internal( + byte* name, + ImGuiViewport* viewport, + ImGuiDir dir, + float size, + ImGuiWindowFlags window_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBack_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBack_internal.gen.cs new file mode 100644 index 0000000..6218d7c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBack_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3353 + /// , + /// imgui.cpp:13307 + ///
void BringWindowToDisplayBack(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BringWindowToDisplayBack_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBehind_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBehind_internal.gen.cs new file mode 100644 index 0000000..e0ef1a7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayBehind_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3354 + /// , + /// imgui.cpp:13321 + ///
void BringWindowToDisplayBehind(ImGuiWindow* window, ImGuiWindow* above_window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BringWindowToDisplayBehind_internal( + ImGuiWindow* window, + ImGuiWindow* above_window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayFront_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayFront_internal.gen.cs new file mode 100644 index 0000000..43cdb9c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToDisplayFront_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3352 + /// , + /// imgui.cpp:13292 + ///
void BringWindowToDisplayFront(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + /// Note technically focus related but rather adjacent and close to BringWindowToFocusFront() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BringWindowToDisplayFront_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToFocusFront_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToFocusFront_internal.gen.cs new file mode 100644 index 0000000..6d8e185 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/BringWindowToFocusFront_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3351 + /// , + /// imgui.cpp:13270 + ///
void BringWindowToFocusFront(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BringWindowToFocusFront_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ButtonBehavior_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ButtonBehavior_internal.gen.cs new file mode 100644 index 0000000..8c865ec --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ButtonBehavior_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3860 + /// , + /// imgui_widgets.cpp:541 + ///
+ /// bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + /// - FIXME: For refactor we could output flags, incl mouse hovered vs nav keyboard vs nav triggered etc. + /// And better standardize how widgets use 'GetColor32((held && hovered) ? ... : hovered ? ...)' vs 'GetColor32(held ? ... : hovered ? ...);' + /// For mouse feedback we typically prefer the 'held && hovered' test, but for nav feedback not always. Outputting hovered=true on Activation may be misleading. + /// - Since v1.91.2 (Sept 2024) we included io.ConfigDebugHighlightIdConflicts feature. + /// One idiom which was previously valid which will now emit a warning is when using multiple overlaid ButtonBehavior() + /// with same ID and different MouseButton (see #8030). You can fix it by: + /// (1) switching to use a single ButtonBehavior() with multiple _MouseButton flags. + /// or (2) surrounding those calls with PushItemFlag(ImGuiItemFlags_AllowDuplicateId, true); ... PopItemFlag() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ButtonBehavior_internal( + floatRect* bb, + ImGuiID id, + Bool8* out_hovered, + Bool8* out_held, + ImGuiButtonFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ButtonEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ButtonEx_internal.gen.cs new file mode 100644 index 0000000..eef043a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ButtonEx_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3841 + /// , + /// imgui_widgets.cpp:767 + ///
+ /// bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ButtonEx_internal(byte* label, float2* size_arg, ImGuiButtonFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CalcItemSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CalcItemSize_internal.gen.cs new file mode 100644 index 0000000..9b9c50f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CalcItemSize_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3461 + /// , + /// imgui.cpp:12021 + ///
ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// [Internal] Calculate full item size given user provided 'size' parameter and default width/height. Default width is often == CalcItemWidth(). + /// Those two functions CalcItemWidth vs CalcItemSize are awkwardly named because they are not fully symmetrical. + /// Note that only CalcItemWidth() is publicly exposed. + /// The 4.0f here may be changed to match CalcItemWidth() and/or BeginChild() (right now we have a mismatch which is harmless but undesirable) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 CalcItemSize_internal(float2 size, float default_w, float default_h); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CalcRoundingFlagsForRectInRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CalcRoundingFlagsForRectInRect_internal.gen.cs new file mode 100644 index 0000000..5d35814 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CalcRoundingFlagsForRectInRect_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3833 + /// , + /// imgui_draw.cpp:5968 + ///
+ /// ImDrawFlags CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawFlags CalcRoundingFlagsForRectInRect_internal( + floatRect* r_in, + floatRect* r_outer, + float threshold + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CalcTypematicRepeatAmount_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CalcTypematicRepeatAmount_internal.gen.cs new file mode 100644 index 0000000..388d3e3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CalcTypematicRepeatAmount_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3561 + /// , + /// imgui.cpp:9868 + ///
int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate) + ///
+ ///
+ /// + /// + /// t0 = previous time (e.g.: g.Time - g.IO.DeltaTime) + /// t1 = current time (e.g.: g.Time) + /// An event is triggered at: + /// t = 0.0f t = repeat_delay, t = repeat_delay + repeat_rate*N + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int CalcTypematicRepeatAmount_internal( + float t0, + float t1, + float repeat_delay, + float repeat_rate + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CalcWindowNextAutoFitSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CalcWindowNextAutoFitSize_internal.gen.cs new file mode 100644 index 0000000..8899ff4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CalcWindowNextAutoFitSize_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3332 + /// , + /// imgui.cpp:6890 + ///
ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 CalcWindowNextAutoFitSize_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CalcWrapWidthForPos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CalcWrapWidthForPos_internal.gen.cs new file mode 100644 index 0000000..fe189d6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CalcWrapWidthForPos_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3462 + /// , + /// imgui.cpp:4993 + ///
float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float CalcWrapWidthForPos_internal(float2* pos, float wrap_pos_x); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CallContextHooks_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CallContextHooks_internal.gen.cs new file mode 100644 index 0000000..e686684 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CallContextHooks_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3394 + /// , + /// imgui.cpp:4500 + ///
void CallContextHooks(ImGuiContext* context, ImGuiContextHookType type) + ///
+ ///
+ /// + /// + /// Generic context hooks + /// + /// + /// Call context hooks (used by e.g. test engine) + /// We assume a small number of hooks so all stored in same array + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void CallContextHooks_internal(ImGuiContext* context, ImGuiContextHookType type); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CheckboxFlags_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CheckboxFlags_internal.gen.cs new file mode 100644 index 0000000..455fd83 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CheckboxFlags_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3846 + /// , + /// imgui_widgets.cpp:1329 + ///
bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CheckboxFlags_internal_0(byte* label, long* flags, long flags_value); + + /// + /// + /// C++: + /// imgui_internal.h:3847 + /// , + /// imgui_widgets.cpp:1334 + ///
bool CheckboxFlags(const char* label, ImU64* flags, ImU64 flags_value) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CheckboxFlags_internal_1(byte* label, ulong* flags, ulong flags_value); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClearActiveID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClearActiveID_internal.gen.cs new file mode 100644 index 0000000..9608cbd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClearActiveID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3444 + /// , + /// imgui.cpp:4675 + ///
void ClearActiveID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClearActiveID_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClearDragDrop_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClearDragDrop_internal.gen.cs new file mode 100644 index 0000000..ee9262b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClearDragDrop_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3689 + /// , + /// imgui.cpp:15143 + ///
void ClearDragDrop() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClearDragDrop_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClearIniSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClearIniSettings_internal.gen.cs new file mode 100644 index 0000000..30f4751 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClearIniSettings_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3408 + /// , + /// imgui.cpp:15828 + ///
void ClearIniSettings() + ///
+ ///
+ /// + /// + /// Settings + /// + /// + /// Clear all settings (windows, tables, docking etc.) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClearIniSettings_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClearWindowSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClearWindowSettings_internal.gen.cs new file mode 100644 index 0000000..9d7437b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClearWindowSettings_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3417 + /// , + /// imgui.cpp:15994 + ///
void ClearWindowSettings(const char* name) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + /// This will revert window to its initial state, including enabling the + /// ImGuiCond_FirstUseEver/ImGuiCond_Once conditions once more. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClearWindowSettings_internal(byte* name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CloseButton_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CloseButton_internal.gen.cs new file mode 100644 index 0000000..64cdd51 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CloseButton_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3850 + /// , + /// imgui_widgets.cpp:886 + ///
bool CloseButton(ImGuiID id, const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Button to close a window + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CloseButton_internal(ImGuiID id, float2* pos); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupToLevel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupToLevel_internal.gen.cs new file mode 100644 index 0000000..8997fcd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupToLevel_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3484 + /// , + /// imgui.cpp:12775 + ///
void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClosePopupToLevel_internal( + int remaining, + Bool8 restore_focus_to_window_under_popup + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsExceptModals_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsExceptModals_internal.gen.cs new file mode 100644 index 0000000..62f5cc5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsExceptModals_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3486 + /// , + /// imgui.cpp:12760 + ///
void ClosePopupsExceptModals() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClosePopupsExceptModals_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsOverWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsOverWindow_internal.gen.cs new file mode 100644 index 0000000..a063b7b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ClosePopupsOverWindow_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3485 + /// , + /// imgui.cpp:12713 + ///
+ /// void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// When popups are stacked, clicking on a lower level popups puts focus back to it and close popups above it. + /// This function closes any popups that are over 'ref_window'. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ClosePopupsOverWindow_internal( + ImGuiWindow* ref_window, + Bool8 restore_focus_to_window_under_popup + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CollapseButton_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CollapseButton_internal.gen.cs new file mode 100644 index 0000000..5c23f7f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CollapseButton_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3851 + /// , + /// imgui_widgets.cpp:924 + ///
bool CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_node) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// The Collapse button also functions as a Dock Menu button. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CollapseButton_internal(ImGuiID id, float2* pos, ImGuiDockNode* dock_node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ColorEditOptionsPopup_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ColorEditOptionsPopup_internal.gen.cs new file mode 100644 index 0000000..cb60b96 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ColorEditOptionsPopup_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3905 + /// , + /// imgui_widgets.cpp:6360 + ///
void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Color + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ColorEditOptionsPopup_internal(float* col, ImGuiColorEditFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ColorPickerOptionsPopup_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ColorPickerOptionsPopup_internal.gen.cs new file mode 100644 index 0000000..fd019ff --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ColorPickerOptionsPopup_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3906 + /// , + /// imgui_widgets.cpp:6414 + ///
void ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Color + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ColorPickerOptionsPopup_internal(float* ref_col, ImGuiColorEditFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ColorTooltip_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ColorTooltip_internal.gen.cs new file mode 100644 index 0000000..ab4b796 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ColorTooltip_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3904 + /// , + /// imgui_widgets.cpp:6324 + ///
void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Color + /// + /// + /// Note: only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ColorTooltip_internal(byte* text, float* col, ImGuiColorEditFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ConvertSingleModFlagToKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ConvertSingleModFlagToKey_internal.gen.cs new file mode 100644 index 0000000..f571f8e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ConvertSingleModFlagToKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3545 + ///
inline ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiKey ConvertSingleModFlagToKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/CreateNewWindowSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/CreateNewWindowSettings_internal.gen.cs new file mode 100644 index 0000000..df61b67 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/CreateNewWindowSettings_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3414 + /// , + /// imgui.cpp:15950 + ///
ImGuiWindowSettings* CreateNewWindowSettings(const char* name) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindowSettings* CreateNewWindowSettings_internal(byte* name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyFromText_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyFromText_internal.gen.cs new file mode 100644 index 0000000..d7382e9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyFromText_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3888 + /// , + /// imgui_widgets.cpp:2339 + ///
+ /// bool DataTypeApplyFromText(const char* buf, ImGuiDataType data_type, void* p_data, const char* format, void* p_data_when_empty = NULL) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + /// User can input math operators (e.g. +100) to edit a numerical values. + /// NB: This is _not_ a full expression evaluator. We should probably add one and replace this dumb mess.. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DataTypeApplyFromText_internal( + byte* buf, + ImGuiDataType data_type, + void* p_data, + byte* format, + void* p_data_when_empty + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyOp_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyOp_internal.gen.cs new file mode 100644 index 0000000..ec90fff --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeApplyOp_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3887 + /// , + /// imgui_widgets.cpp:2287 + ///
+ /// void DataTypeApplyOp(ImGuiDataType data_type, int op, void* output, const void* arg_1, const void* arg_2) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DataTypeApplyOp_internal( + ImGuiDataType data_type, + int op, + void* output, + void* arg_1, + void* arg_2 + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeClamp_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeClamp_internal.gen.cs new file mode 100644 index 0000000..5a3dff8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeClamp_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3890 + /// , + /// imgui_widgets.cpp:2425 + ///
+ /// bool DataTypeClamp(ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DataTypeClamp_internal( + ImGuiDataType data_type, + void* p_data, + void* p_min, + void* p_max + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeCompare_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeCompare_internal.gen.cs new file mode 100644 index 0000000..079c3f8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeCompare_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3889 + /// , + /// imgui_widgets.cpp:2396 + ///
int DataTypeCompare(ImGuiDataType data_type, const void* arg_1, const void* arg_2) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int DataTypeCompare_internal(ImGuiDataType data_type, void* arg_1, void* arg_2); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeFormatString_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeFormatString_internal.gen.cs new file mode 100644 index 0000000..e40531f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeFormatString_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3886 + /// , + /// imgui_widgets.cpp:2264 + ///
+ /// int DataTypeFormatString(char* buf, int buf_size, ImGuiDataType data_type, const void* p_data, const char* format) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int DataTypeFormatString_internal( + byte* buf, + int buf_size, + ImGuiDataType data_type, + void* p_data, + byte* format + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeGetInfo_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeGetInfo_internal.gen.cs new file mode 100644 index 0000000..aa74e6c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeGetInfo_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3885 + /// , + /// imgui_widgets.cpp:2258 + ///
const ImGuiDataTypeInfo* DataTypeGetInfo(ImGuiDataType data_type) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiDataTypeInfo* DataTypeGetInfo_internal(ImGuiDataType data_type); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeIsZero_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeIsZero_internal.gen.cs new file mode 100644 index 0000000..979b0f8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DataTypeIsZero_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3891 + /// , + /// imgui_widgets.cpp:2445 + ///
bool DataTypeIsZero(ImGuiDataType data_type, const void* p_data) + ///
+ ///
+ /// + /// + /// Data type helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DataTypeIsZero_internal(ImGuiDataType data_type, void* p_data); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugAllocHook_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugAllocHook_internal.gen.cs new file mode 100644 index 0000000..280db15 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugAllocHook_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// size >= 0 : alloc, size = -1 : free + /// + /// + /// C++: + /// imgui_internal.h:3932 + /// , + /// imgui.cpp:5040 + ///
void DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// We record the number of allocation in recent frames, as a way to audit/sanitize our guiding principles + /// of "no allocations on idle/repeating frames" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugAllocHook_internal( + ImGuiDebugAllocInfo* info, + int frame_count, + void* ptr, + nuint size + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButtonTooltip_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButtonTooltip_internal.gen.cs new file mode 100644 index 0000000..8001fb6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButtonTooltip_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3942 + /// , + /// imgui.cpp:22476 + ///
void DebugBreakButtonTooltip(bool keyboard_only, const char* description_of_location) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugBreakButtonTooltip_internal( + Bool8 keyboard_only, + byte* description_of_location + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButton_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButton_internal.gen.cs new file mode 100644 index 0000000..989e332 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakButton_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3941 + /// , + /// imgui.cpp:22490 + ///
bool DebugBreakButton(const char* label, const char* description_of_location) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Special button that doesn't take focus, doesn't take input owner, and can be activated without a click etc. + /// In order to reduce interferences with the contents we are trying to debug into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DebugBreakButton_internal(byte* label, byte* description_of_location); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakClearData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakClearData_internal.gen.cs new file mode 100644 index 0000000..2fc09d3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugBreakClearData_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3940 + /// , + /// imgui.cpp:22467 + ///
void DebugBreakClearData() + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugBreakClearData_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawCursorPos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawCursorPos_internal.gen.cs new file mode 100644 index 0000000..c62ff02 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawCursorPos_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3933 + /// , + /// imgui.cpp:23364 + ///
void DebugDrawCursorPos(ImU32 col = IM_COL32(255, 0, 0, 255)) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw a small cross at current CursorPos in current window's DrawList + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugDrawCursorPos_internal(uint col); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawItemRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawItemRect_internal.gen.cs new file mode 100644 index 0000000..5801428 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawItemRect_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3935 + /// , + /// imgui.cpp:23387 + ///
void DebugDrawItemRect(ImU32 col = IM_COL32(255, 0, 0, 255)) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw last item rect in ForegroundDrawList (so it is always visible) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugDrawItemRect_internal(uint col); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawLineExtents_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawLineExtents_internal.gen.cs new file mode 100644 index 0000000..5e89454 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugDrawLineExtents_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3934 + /// , + /// imgui.cpp:23374 + ///
void DebugDrawLineExtents(ImU32 col = IM_COL32(255, 0, 0, 255)) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw a 10px wide rectangle around CurposPos.x using Line Y1/Y2 in current window's DrawList + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugDrawLineExtents_internal(uint col); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugHookIdInfo_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugHookIdInfo_internal.gen.cs new file mode 100644 index 0000000..fc2dd1e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugHookIdInfo_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3944 + /// , + /// imgui.cpp:23523 + ///
+ /// void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] ID Stack tool: hooks called by GetID() family functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugHookIdInfo_internal( + ImGuiID id, + ImGuiDataType data_type, + void* data_id, + void* data_id_end + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemOnHover_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemOnHover_internal.gen.cs new file mode 100644 index 0000000..fd5f4a6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemOnHover_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Only call on reaction to a mouse Hover: because only 1 at the same time! + /// + /// + /// C++: + /// imgui_internal.h:3938 + /// , + /// imgui.cpp:23406 + ///
void DebugLocateItemOnHover(ImGuiID target_id) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// FIXME: Doesn't work over through a modal window, because they clear HoveredWindow. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugLocateItemOnHover_internal(ImGuiID target_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemResolveWithLastItem_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemResolveWithLastItem_internal.gen.cs new file mode 100644 index 0000000..fed595a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItemResolveWithLastItem_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3939 + /// , + /// imgui.cpp:23423 + ///
void DebugLocateItemResolveWithLastItem() + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugLocateItemResolveWithLastItem_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItem_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItem_internal.gen.cs new file mode 100644 index 0000000..5596dee --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugLocateItem_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Call sparingly: only 1 at the same time! + /// + /// + /// C++: + /// imgui_internal.h:3937 + /// , + /// imgui.cpp:23397 + ///
void DebugLocateItem(ImGuiID target_id) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugLocateItem_internal(ImGuiID target_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeColumns_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeColumns_internal.gen.cs new file mode 100644 index 0000000..427445c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeColumns_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3945 + /// , + /// imgui.cpp:22526 + ///
void DebugNodeColumns(ImGuiOldColumns* columns) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of Columns + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeColumns_internal(ImGuiOldColumns* columns); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDockNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDockNode_internal.gen.cs new file mode 100644 index 0000000..4145340 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDockNode_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3946 + /// , + /// imgui.cpp:22566 + ///
void DebugNodeDockNode(ImGuiDockNode* node, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImDockNode + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeDockNode_internal(ImGuiDockNode* node, byte* label); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawCmdShowMeshAndBoundingBox_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawCmdShowMeshAndBoundingBox_internal.gen.cs new file mode 100644 index 0000000..e3a5fd0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawCmdShowMeshAndBoundingBox_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3948 + /// , + /// imgui.cpp:22720 + ///
+ /// void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, const ImDrawList* draw_list, const ImDrawCmd* draw_cmd, bool show_mesh, bool show_aabb) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display mesh/aabb of a ImDrawCmd + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeDrawCmdShowMeshAndBoundingBox_internal( + ImDrawList* out_draw_list, + ImDrawList* draw_list, + ImDrawCmd* draw_cmd, + Bool8 show_mesh, + Bool8 show_aabb + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawList_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawList_internal.gen.cs new file mode 100644 index 0000000..a01f601 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeDrawList_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3947 + /// , + /// imgui.cpp:22625 + ///
+ /// void DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImDrawList + /// Note that both 'window' and 'viewport' may be NULL here. Viewport is generally null of destroyed popups which previously owned a viewport. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeDrawList_internal( + ImGuiWindow* window, + ImGuiViewportP* viewport, + ImDrawList* draw_list, + byte* label + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyph_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyph_internal.gen.cs new file mode 100644 index 0000000..6cd0071 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyph_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3951 + /// , + /// imgui.cpp:22965 + ///
void DebugNodeFontGlyph(ImFont* font, const ImFontGlyph* glyph) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeFontGlyph_internal(ImFont* font, ImFontGlyph* glyph); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyphesForSrcMask_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyphesForSrcMask_internal.gen.cs new file mode 100644 index 0000000..8e0794d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFontGlyphesForSrcMask_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3950 + /// , + /// imgui.cpp:22914 + ///
void DebugNodeFontGlyphesForSrcMask(ImFont* font, ImFontBaked* baked, int src_mask) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeFontGlyphesForSrcMask_internal( + ImFont* font, + ImFontBaked* baked, + int src_mask + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFont_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFont_internal.gen.cs new file mode 100644 index 0000000..2544ba4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeFont_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3949 + /// , + /// imgui.cpp:22765 + ///
void DebugNodeFont(ImFont* font) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display details for a single font, called by ShowStyleEditor(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeFont_internal(ImFont* font); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeInputTextState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeInputTextState_internal.gen.cs new file mode 100644 index 0000000..e1d7a42 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeInputTextState_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3957 + /// , + /// imgui_widgets.cpp:5489 + ///
void DebugNodeInputTextState(ImGuiInputTextState* state) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeInputTextState_internal(ImGuiInputTextState* state); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeMultiSelectState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeMultiSelectState_internal.gen.cs new file mode 100644 index 0000000..858380e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeMultiSelectState_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3959 + /// , + /// imgui_widgets.cpp:8232 + ///
void DebugNodeMultiSelectState(ImGuiMultiSelectState* state) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeMultiSelectState_internal(ImGuiMultiSelectState* state); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodePlatformMonitor_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodePlatformMonitor_internal.gen.cs new file mode 100644 index 0000000..760f1b2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodePlatformMonitor_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3965 + /// , + /// imgui.cpp:23072 + ///
void DebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor, const char* label, int idx) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodePlatformMonitor_internal( + ImGuiPlatformMonitor* monitor, + byte* label, + int idx + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeStorage_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeStorage_internal.gen.cs new file mode 100644 index 0000000..5358511 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeStorage_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3953 + /// , + /// imgui.cpp:22982 + ///
void DebugNodeStorage(ImGuiStorage* storage, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImGuiStorage + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeStorage_internal(ImGuiStorage* storage, byte* label); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTabBar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTabBar_internal.gen.cs new file mode 100644 index 0000000..920afa9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTabBar_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3954 + /// , + /// imgui.cpp:22995 + ///
void DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] Display contents of ImGuiTabBar + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeTabBar_internal(ImGuiTabBar* tab_bar, byte* label); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTableSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTableSettings_internal.gen.cs new file mode 100644 index 0000000..e0bddcd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTableSettings_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3956 + /// , + /// imgui_tables.cpp:4090 + ///
void DebugNodeTableSettings(ImGuiTableSettings* settings) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeTableSettings_internal(ImGuiTableSettings* settings); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTable_internal.gen.cs new file mode 100644 index 0000000..f3cc39a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTable_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3955 + /// , + /// imgui_tables.cpp:4016 + ///
void DebugNodeTable(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeTable_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTexture_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTexture_internal.gen.cs new file mode 100644 index 0000000..854b159 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTexture_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// ID used to facilitate persisting the "current" texture. + /// + /// + /// C++: + /// imgui_internal.h:3952 + /// , + /// imgui.cpp:21752 + ///
+ /// void DebugNodeTexture(ImTextureData* tex, int int_id, const ImFontAtlasRect* highlight_rect = NULL) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeTexture_internal( + ImTextureData* tex, + int int_id, + ImFontAtlasRect* highlight_rect + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTypingSelectState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTypingSelectState_internal.gen.cs new file mode 100644 index 0000000..76fc824 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeTypingSelectState_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3958 + /// , + /// imgui_widgets.cpp:7497 + ///
void DebugNodeTypingSelectState(ImGuiTypingSelectState* state) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeTypingSelectState_internal(ImGuiTypingSelectState* state); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeViewport_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeViewport_internal.gen.cs new file mode 100644 index 0000000..5ab0c01 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeViewport_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3964 + /// , + /// imgui.cpp:23035 + ///
void DebugNodeViewport(ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeViewport_internal(ImGuiViewportP* viewport); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowSettings_internal.gen.cs new file mode 100644 index 0000000..75cbcad --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowSettings_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3961 + /// , + /// imgui.cpp:23157 + ///
void DebugNodeWindowSettings(ImGuiWindowSettings* settings) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeWindowSettings_internal(ImGuiWindowSettings* settings); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindow_internal.gen.cs new file mode 100644 index 0000000..d42c829 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindow_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3960 + /// , + /// imgui.cpp:23080 + ///
void DebugNodeWindow(ImGuiWindow* window, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeWindow_internal(ImGuiWindow* window, byte* label); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsListByBeginStackParent_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsListByBeginStackParent_internal.gen.cs new file mode 100644 index 0000000..5a8d798 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsListByBeginStackParent_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3963 + /// , + /// imgui.cpp:23181 + ///
+ /// void DebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows, int windows_size, ImGuiWindow* parent_in_begin_stack) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// FIXME-OPT: This is technically suboptimal, but it is simpler this way. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeWindowsListByBeginStackParent_internal( + ImGuiWindow** windows, + int windows_size, + ImGuiWindow* parent_in_begin_stack + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsList_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsList_internal.gen.cs new file mode 100644 index 0000000..2814ef7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugNodeWindowsList_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3962 + /// , + /// imgui.cpp:23167 + ///
void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugNodeWindowsList_internal(ImVector* windows, byte* label); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderKeyboardPreview_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderKeyboardPreview_internal.gen.cs new file mode 100644 index 0000000..7e7b30b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderKeyboardPreview_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3966 + /// , + /// imgui.cpp:21459 + ///
void DebugRenderKeyboardPreview(ImDrawList* draw_list) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Draw an arbitrary US keyboard layout to visualize translated keys + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugRenderKeyboardPreview_internal(ImDrawList* draw_list); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderViewportThumbnail_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderViewportThumbnail_internal.gen.cs new file mode 100644 index 0000000..2115202 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugRenderViewportThumbnail_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3967 + /// , + /// imgui.cpp:21390 + ///
+ /// void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugRenderViewportThumbnail_internal( + ImDrawList* draw_list, + ImGuiViewportP* viewport, + floatRect* bb + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DebugTextUnformattedWithLocateItem_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DebugTextUnformattedWithLocateItem_internal.gen.cs new file mode 100644 index 0000000..a863878 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DebugTextUnformattedWithLocateItem_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3936 + /// , + /// imgui.cpp:23338 + ///
void DebugTextUnformattedWithLocateItem(const char* line_begin, const char* line_end) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// Display line, search for 0xXXXXXXXX identifiers and call DebugLocateItemOnHover() when hovered. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugTextUnformattedWithLocateItem_internal(byte* line_begin, byte* line_end); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DestroyPlatformWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DestroyPlatformWindow_internal.gen.cs new file mode 100644 index 0000000..7d54dfd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DestroyPlatformWindow_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3399 + /// , + /// imgui.cpp:17123 + ///
void DestroyPlatformWindow(ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DestroyPlatformWindow_internal(ImGuiViewportP* viewport); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderAddNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderAddNode_internal.gen.cs new file mode 100644 index 0000000..f2c4e6c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderAddNode_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3662 + /// , + /// imgui.cpp:20229 + ///
ImGuiID DockBuilderAddNode(ImGuiID node_id = 0, ImGuiDockNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// Make sure to use the ImGuiDockNodeFlags_DockSpace flag to create a dockspace node! Otherwise this will create a floating node! + /// - Floating node: you can then call DockBuilderSetNodePos()/DockBuilderSetNodeSize() to position and size the floating node. + /// - Dockspace node: calling DockBuilderSetNodePos() is unnecessary. + /// - If you intend to split a node immediately after creation using DockBuilderSplitNode(), make sure to call DockBuilderSetNodeSize() beforehand! + /// For various reason, the splitting code currently needs a base size otherwise space may not be allocated as precisely as you would expect. + /// - Use (id == 0) to let the system allocate a node identifier. + /// - Existing node with a same id will be removed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID DockBuilderAddNode_internal(ImGuiID node_id, ImGuiDockNodeFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyDockSpace_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyDockSpace_internal.gen.cs new file mode 100644 index 0000000..4330cc4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyDockSpace_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3669 + /// , + /// imgui.cpp:20490 + ///
+ /// void DockBuilderCopyDockSpace(ImGuiID src_dockspace_id, ImGuiID dst_dockspace_id, ImVector<const char*>* in_window_remap_pairs) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// FIXME: Will probably want to change this signature, in particular how the window remapping pairs are + /// passed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderCopyDockSpace_internal( + ImGuiID src_dockspace_id, + ImGuiID dst_dockspace_id, + ImVector>* in_window_remap_pairs + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyNode_internal.gen.cs new file mode 100644 index 0000000..2ae95d0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyNode_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3670 + /// , + /// imgui.cpp:20438 + ///
+ /// void DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id, ImVector<ImGuiID>* out_node_remap_pairs) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderCopyNode_internal( + ImGuiID src_node_id, + ImGuiID dst_node_id, + ImVector* out_node_remap_pairs + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyWindowSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyWindowSettings_internal.gen.cs new file mode 100644 index 0000000..ce733a1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderCopyWindowSettings_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3671 + /// , + /// imgui.cpp:20456 + ///
void DockBuilderCopyWindowSettings(const char* src_name, const char* dst_name) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderCopyWindowSettings_internal(byte* src_name, byte* dst_name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderDockWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderDockWindow_internal.gen.cs new file mode 100644 index 0000000..d9f6589 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderDockWindow_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3659 + /// , + /// imgui.cpp:20169 + ///
void DockBuilderDockWindow(const char* window_name, ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderDockWindow_internal(byte* window_name, ImGuiID node_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderFinish_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderFinish_internal.gen.cs new file mode 100644 index 0000000..83fdc8e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderFinish_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3672 + /// , + /// imgui.cpp:20570 + ///
void DockBuilderFinish(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// FIXME-DOCK: This is awkward because in series of split user is likely to loose access to its root node. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderFinish_internal(ImGuiID node_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetCentralNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetCentralNode_internal.gen.cs new file mode 100644 index 0000000..d0fa95d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetCentralNode_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3661 + ///
inline ImGuiDockNode* DockBuilderGetCentralNode(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiDockNode* DockBuilderGetCentralNode_internal(ImGuiID node_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetNode_internal.gen.cs new file mode 100644 index 0000000..7c8a96d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderGetNode_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3660 + /// , + /// imgui.cpp:20195 + ///
ImGuiDockNode*DockBuilderGetNode(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiDockNode* DockBuilderGetNode_internal(ImGuiID node_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeChildNodes_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeChildNodes_internal.gen.cs new file mode 100644 index 0000000..d983531 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeChildNodes_internal.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Remove all split/hierarchy. All remaining docked windows will be re-docked to the remaining root node + /// (node_id). + /// + /// + /// C++: + /// imgui_internal.h:3665 + /// , + /// imgui.cpp:20272 + ///
void DockBuilderRemoveNodeChildNodes(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// root_id = 0 to remove all, root_id != 0 to remove child of given node. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderRemoveNodeChildNodes_internal(ImGuiID node_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeDockedWindows_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeDockedWindows_internal.gen.cs new file mode 100644 index 0000000..de91989 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNodeDockedWindows_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3664 + /// , + /// imgui.cpp:20342 + ///
void DockBuilderRemoveNodeDockedWindows(ImGuiID node_id, bool clear_settings_refs = true) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderRemoveNodeDockedWindows_internal( + ImGuiID node_id, + Bool8 clear_settings_refs + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNode_internal.gen.cs new file mode 100644 index 0000000..0ed8b5c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderRemoveNode_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Remove node and all its child, undock all windows + /// + /// + /// C++: + /// imgui_internal.h:3663 + /// , + /// imgui.cpp:20252 + ///
void DockBuilderRemoveNode(ImGuiID node_id) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderRemoveNode_internal(ImGuiID node_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodePos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodePos_internal.gen.cs new file mode 100644 index 0000000..4debfcc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodePos_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3666 + /// , + /// imgui.cpp:20201 + ///
void DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderSetNodePos_internal(ImGuiID node_id, float2 pos); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodeSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodeSize_internal.gen.cs new file mode 100644 index 0000000..1b3127c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSetNodeSize_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3667 + /// , + /// imgui.cpp:20211 + ///
void DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockBuilderSetNodeSize_internal(ImGuiID node_id, float2 size); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSplitNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSplitNode_internal.gen.cs new file mode 100644 index 0000000..f9b8751 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockBuilderSplitNode_internal.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Create 2 child nodes in this parent node. + /// + /// + /// C++: + /// imgui_internal.h:3668 + /// , + /// imgui.cpp:20379 + ///
+ /// ImGuiID DockBuilderSplitNode(ImGuiID node_id, ImGuiDir split_dir, float size_ratio_for_node_at_dir, ImGuiID* out_id_at_dir, ImGuiID* out_id_at_opposite_dir) + ///
+ ///
+ /// + /// + /// Docking - Builder function needs to be generally called before the node is used/submitted. + /// - The DockBuilderXXX functions are designed to _eventually_ become a public API, but it is too early to expose it and guarantee stability. + /// - Do not hold on ImGuiDockNode* pointers! They may be invalidated by any split/merge/remove operation and every frame. + /// - To create a DockSpace() node, make sure to set the ImGuiDockNodeFlags_DockSpace flag when calling DockBuilderAddNode(). + /// You can create dockspace nodes (attached to a window) _or_ floating nodes (carry its own window) with this API. + /// - DockBuilderSplitNode() create 2 child nodes within 1 node. The initial node becomes a parent node. + /// - If you intend to split the node immediately after creation using DockBuilderSplitNode(), make sure + /// to call DockBuilderSetNodeSize() beforehand. If you don't, the resulting split sizes may not be reliable. + /// - Call DockBuilderFinish() after you are done. + /// + /// + /// If 'out_id_at_dir' or 'out_id_at_opposite_dir' are non NULL, the function will write out the ID of the two new nodes created. + /// Return value is ID of the node at the specified direction, so same as (*out_id_at_dir) if that pointer is set. + /// FIXME-DOCK: We are not exposing nor using split_outer. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID DockBuilderSplitNode_internal( + ImGuiID node_id, + ImGuiDir split_dir, + float size_ratio_for_node_at_dir, + ImGuiID* out_id_at_dir, + ImGuiID* out_id_at_opposite_dir + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextCalcDropPosForDocking_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextCalcDropPosForDocking_internal.gen.cs new file mode 100644 index 0000000..9c1a023 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextCalcDropPosForDocking_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3634 + /// , + /// imgui.cpp:17989 + ///
+ /// bool DockContextCalcDropPosForDocking(ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload_window, ImGuiDockNode* payload_node, ImGuiDir split_dir, bool split_outer, ImVec2* out_pos) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// This is mostly used for automation. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DockContextCalcDropPosForDocking_internal( + ImGuiWindow* target, + ImGuiDockNode* target_node, + ImGuiWindow* payload_window, + ImGuiDockNode* payload_node, + ImGuiDir split_dir, + Bool8 split_outer, + float2* out_pos + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextClearNodes_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextClearNodes_internal.gen.cs new file mode 100644 index 0000000..d331ce8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextClearNodes_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Use root_id==0 to clear all + /// + /// + /// C++: + /// imgui_internal.h:3623 + /// , + /// imgui.cpp:17413 + ///
void DockContextClearNodes(ImGuiContext* ctx, ImGuiID root_id, bool clear_settings_refs) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextClearNodes_internal( + ImGuiContext* ctx, + ImGuiID root_id, + Bool8 clear_settings_refs + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextEndFrame_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextEndFrame_internal.gen.cs new file mode 100644 index 0000000..b7a137a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextEndFrame_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3627 + /// , + /// imgui.cpp:17512 + ///
void DockContextEndFrame(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextEndFrame_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextFindNodeByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextFindNodeByID_internal.gen.cs new file mode 100644 index 0000000..6ba7058 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextFindNodeByID_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3635 + /// , + /// imgui.cpp:17528 + ///
ImGuiDockNode*DockContextFindNodeByID(ImGuiContext* ctx, ImGuiID id) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiDockNode* DockContextFindNodeByID_internal(ImGuiContext* ctx, ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextGenNodeID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextGenNodeID_internal.gen.cs new file mode 100644 index 0000000..af813b3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextGenNodeID_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3628 + /// , + /// imgui.cpp:17533 + ///
ImGuiID DockContextGenNodeID(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID DockContextGenNodeID_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextInitialize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextInitialize_internal.gen.cs new file mode 100644 index 0000000..b02f92a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextInitialize_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3621 + /// , + /// imgui.cpp:17386 + ///
void DockContextInitialize(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextInitialize_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateDocking_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateDocking_internal.gen.cs new file mode 100644 index 0000000..4e009d7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateDocking_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3626 + /// , + /// imgui.cpp:17479 + ///
void DockContextNewFrameUpdateDocking(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// Docking context update function, called by NewFrame() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextNewFrameUpdateDocking_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateUndocking_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateUndocking_internal.gen.cs new file mode 100644 index 0000000..6ff79f2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextNewFrameUpdateUndocking_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3625 + /// , + /// imgui.cpp:17436 + ///
void DockContextNewFrameUpdateUndocking(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// Docking context update function, called by NewFrame() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextNewFrameUpdateUndocking_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockNode_internal.gen.cs new file mode 100644 index 0000000..305e3d1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockNode_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3633 + /// , + /// imgui.cpp:17947 + ///
void DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextProcessUndockNode_internal(ImGuiContext* ctx, ImGuiDockNode* node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockWindow_internal.gen.cs new file mode 100644 index 0000000..68635b8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextProcessUndockWindow_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3632 + /// , + /// imgui.cpp:17931 + ///
+ /// void DockContextProcessUndockWindow(ImGuiContext* ctx, ImGuiWindow* window, bool clear_persistent_docking_ref = true) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextProcessUndockWindow_internal( + ImGuiContext* ctx, + ImGuiWindow* window, + Bool8 clear_persistent_docking_ref + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueDock_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueDock_internal.gen.cs new file mode 100644 index 0000000..684570d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueDock_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3629 + /// , + /// imgui.cpp:17732 + ///
+ /// void DockContextQueueDock(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload, ImGuiDir split_dir, float split_ratio, bool split_outer) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextQueueDock_internal( + ImGuiContext* ctx, + ImGuiWindow* target, + ImGuiDockNode* target_node, + ImGuiWindow* payload, + ImGuiDir split_dir, + float split_ratio, + Bool8 split_outer + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockNode_internal.gen.cs new file mode 100644 index 0000000..511b986 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockNode_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3631 + /// , + /// imgui.cpp:17754 + ///
void DockContextQueueUndockNode(ImGuiContext* ctx, ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextQueueUndockNode_internal(ImGuiContext* ctx, ImGuiDockNode* node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockWindow_internal.gen.cs new file mode 100644 index 0000000..9bd223f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextQueueUndockWindow_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3630 + /// , + /// imgui.cpp:17746 + ///
void DockContextQueueUndockWindow(ImGuiContext* ctx, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextQueueUndockWindow_internal(ImGuiContext* ctx, ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextRebuildNodes_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextRebuildNodes_internal.gen.cs new file mode 100644 index 0000000..a5725b4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextRebuildNodes_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3624 + /// , + /// imgui.cpp:17423 + ///
void DockContextRebuildNodes(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// [DEBUG] This function also acts as a defacto test to make sure we can rebuild from scratch without a glitch + /// (Different from DockSettingsHandler_ClearAll() + DockSettingsHandler_ApplyAll() because this reuses current settings!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextRebuildNodes_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockContextShutdown_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextShutdown_internal.gen.cs new file mode 100644 index 0000000..a9df9de --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockContextShutdown_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3622 + /// , + /// imgui.cpp:17405 + ///
void DockContextShutdown(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockContextShutdown_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeBeginAmendTabBar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeBeginAmendTabBar_internal.gen.cs new file mode 100644 index 0000000..3bb6770 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeBeginAmendTabBar_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3637 + /// , + /// imgui.cpp:18865 + ///
bool DockNodeBeginAmendTabBar(ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// User helper to append/amend into a dock node tab bar. Most commonly used to add e.g. a "+" button. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DockNodeBeginAmendTabBar_internal(ImGuiDockNode* node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeEndAmendTabBar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeEndAmendTabBar_internal.gen.cs new file mode 100644 index 0000000..edac9f3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeEndAmendTabBar_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3638 + /// , + /// imgui.cpp:18881 + ///
void DockNodeEndAmendTabBar() + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockNodeEndAmendTabBar_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetDepth_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetDepth_internal.gen.cs new file mode 100644 index 0000000..4ea631b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetDepth_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3641 + ///
inline int DockNodeGetDepth(const ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int DockNodeGetDepth_internal(ImGuiDockNode* node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetRootNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetRootNode_internal.gen.cs new file mode 100644 index 0000000..b6239a2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetRootNode_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3639 + ///
inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiDockNode* DockNodeGetRootNode_internal(ImGuiDockNode* node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetWindowMenuButtonId_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetWindowMenuButtonId_internal.gen.cs new file mode 100644 index 0000000..78e3dd7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeGetWindowMenuButtonId_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3642 + ///
inline ImGuiID DockNodeGetWindowMenuButtonId(const ImGuiDockNode* node) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID DockNodeGetWindowMenuButtonId_internal(ImGuiDockNode* node); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeIsInHierarchyOf_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeIsInHierarchyOf_internal.gen.cs new file mode 100644 index 0000000..73e8efc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeIsInHierarchyOf_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3640 + ///
inline bool DockNodeIsInHierarchyOf(ImGuiDockNode* node, ImGuiDockNode* parent) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DockNodeIsInHierarchyOf_internal(ImGuiDockNode* node, ImGuiDockNode* parent); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeWindowMenuHandler_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeWindowMenuHandler_internal.gen.cs new file mode 100644 index 0000000..79e1dce --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DockNodeWindowMenuHandler_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3636 + /// , + /// imgui.cpp:18823 + ///
+ /// void DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// Default handler for g.DockNodeWindowMenuHandler(): display the list of windows for a given dock-node. + /// This is exceptionally stored in a function pointer to also user applications to tweak this menu (undocumented) + /// Custom overrides may want to decorate, group, sort entries. + /// Please note those are internal structures: if you copy this expect occasional breakage. + /// (if you don't need to modify the "Tabs.Size == 1" behavior/path it is recommend you call this function in your handler) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DockNodeWindowMenuHandler_Default_internal( + ImGuiContext* ctx, + ImGuiDockNode* node, + ImGuiTabBar* tab_bar + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/DragBehavior_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/DragBehavior_internal.gen.cs new file mode 100644 index 0000000..38f7859 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/DragBehavior_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3861 + /// , + /// imgui_widgets.cpp:2635 + ///
+ /// bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragBehavior_internal( + ImGuiID id, + ImGuiDataType data_type, + void* p_v, + float v_speed, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/EndBoxSelect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/EndBoxSelect_internal.gen.cs new file mode 100644 index 0000000..3e31943 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/EndBoxSelect_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3703 + /// , + /// imgui_widgets.cpp:7635 + ///
void EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flags) + ///
+ ///
+ /// + /// + /// Box-Select API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndBoxSelect_internal(floatRect* scope_rect, ImGuiMultiSelectFlags ms_flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/EndColumns_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/EndColumns_internal.gen.cs new file mode 100644 index 0000000..eaf2a1d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/EndColumns_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// close columns + /// + /// + /// C++: + /// imgui_internal.h:3716 + /// , + /// imgui_tables.cpp:4466 + ///
void EndColumns() + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndColumns_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/EndComboPreview_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/EndComboPreview_internal.gen.cs new file mode 100644 index 0000000..44685c7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/EndComboPreview_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3507 + /// , + /// imgui_widgets.cpp:2083 + ///
void EndComboPreview() + ///
+ ///
+ /// + /// + /// Combos + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndComboPreview_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/EndDisabledOverrideReenable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/EndDisabledOverrideReenable_internal.gen.cs new file mode 100644 index 0000000..4c1d3ea --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/EndDisabledOverrideReenable_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3469 + /// , + /// imgui.cpp:8665 + ///
void EndDisabledOverrideReenable() + ///
+ ///
+ /// + /// + /// Parameter stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndDisabledOverrideReenable_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/EndErrorTooltip_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/EndErrorTooltip_internal.gen.cs new file mode 100644 index 0000000..ace42ca --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/EndErrorTooltip_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3929 + /// , + /// imgui.cpp:11634 + ///
void EndErrorTooltip() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndErrorTooltip_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckEndFrameFinalizeErrorTooltip_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckEndFrameFinalizeErrorTooltip_internal.gen.cs new file mode 100644 index 0000000..a7dbbd6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckEndFrameFinalizeErrorTooltip_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3927 + /// , + /// imgui.cpp:11557 + ///
void ErrorCheckEndFrameFinalizeErrorTooltip() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ErrorCheckEndFrameFinalizeErrorTooltip_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckUsingSetCursorPosToExtendParentBoundaries_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckUsingSetCursorPosToExtendParentBoundaries_internal.gen.cs new file mode 100644 index 0000000..73ea9c6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorCheckUsingSetCursorPosToExtendParentBoundaries_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3926 + /// , + /// imgui.cpp:11224 + ///
void ErrorCheckUsingSetCursorPosToExtendParentBoundaries() + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Advanced: + /// - For reference, old logic was causing issues because it meant that SetCursorScreenPos(GetCursorScreenPos()) + /// had a side-effect on layout! In particular this caused problem to compute group boundaries. + /// e.g. BeginGroup() + SomeItem() + SetCursorScreenPos(GetCursorScreenPos()) + EndGroup() would cause the + /// group to be taller because auto-sizing generally adds padding on bottom and right side. + /// - While this code is a little twisted, no-one would expect SetXXX(GetXXX()) to have a side-effect. + /// Using vertical alignment patterns would frequently trigger this sorts of issue. + /// - See https://github.com/ocornut/imgui/issues/5548 for more details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ErrorCheckUsingSetCursorPosToExtendParentBoundaries_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ErrorLog_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorLog_internal.gen.cs new file mode 100644 index 0000000..dcc006c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorLog_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3922 + /// , + /// imgui.cpp:11512 + ///
bool ErrorLog(const char* msg) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ErrorLog_internal(byte* msg); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryStoreState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryStoreState_internal.gen.cs new file mode 100644 index 0000000..a3e6895 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryStoreState_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3923 + /// , + /// imgui.cpp:11371 + ///
void ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual + /// recovery. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ErrorRecoveryStoreState_internal(ImGuiErrorRecoveryState* state_out); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverState_internal.gen.cs new file mode 100644 index 0000000..a6daf19 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverState_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3924 + /// , + /// imgui.cpp:11390 + ///
void ErrorRecoveryTryToRecoverState(const ImGuiErrorRecoveryState* state_in) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Chosen name "Try to recover" over e.g. "Restore" to suggest this is not a 100% guaranteed recovery. + /// Called by e.g. EndFrame() but may be called for manual recovery. + /// Attempt to recover full window stack. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ErrorRecoveryTryToRecoverState_internal(ImGuiErrorRecoveryState* state_in); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverWindowState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverWindowState_internal.gen.cs new file mode 100644 index 0000000..e8f3add --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ErrorRecoveryTryToRecoverWindowState_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3925 + /// , + /// imgui.cpp:11428 + ///
void ErrorRecoveryTryToRecoverWindowState(const ImGuiErrorRecoveryState* state_in) + ///
+ ///
+ /// + /// + /// Error handling, State Recovery + /// + /// + /// Called by e.g. End() but may be called for manual recovery. + /// Read '// Error Handling [BETA]' block in imgui_internal.h for details. + /// Attempt to recover from incorrect usage of BeginXXX/EndXXX/PushXXX/PopXXX calls. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ErrorRecoveryTryToRecoverWindowState_internal( + ImGuiErrorRecoveryState* state_in + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopupEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopupEx_internal.gen.cs new file mode 100644 index 0000000..a70dfd3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopupEx_internal.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3493 + /// , + /// imgui.cpp:13022 + ///
+ /// ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// r_avoid = the rectangle to avoid (e.g. for tooltip it is a rectangle around the mouse cursor which we want to avoid. for popups it's a small point around the cursor.) + /// r_outer = the visible area rectangle, minus safe area padding. If our popup size won't fit because of safe area padding we ignore it. + /// (r_outer is usually equivalent to the viewport rectangle minus padding, but when multi-viewports are enabled and monitor + /// information are available, it may represent the entire platform monitor from the frame of reference of the current viewport. + /// this allows us to have tooltips/popups displayed out of the parent viewport.) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 FindBestWindowPosForPopupEx_internal( + float2* ref_pos, + float2* size, + ImGuiDir* last_dir, + floatRect* r_outer, + floatRect* r_avoid, + ImGuiPopupPositionPolicy policy + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopup_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopup_internal.gen.cs new file mode 100644 index 0000000..fbfc56c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindBestWindowPosForPopup_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3492 + /// , + /// imgui.cpp:13118 + ///
ImVec2 FindBestWindowPosForPopup(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 FindBestWindowPosForPopup_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindBlockingModal_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindBlockingModal_internal.gen.cs new file mode 100644 index 0000000..3c2e644 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindBlockingModal_internal.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3491 + /// , + /// imgui.cpp:12618 + ///
ImGuiWindow* FindBlockingModal(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// When a modal popup is open, newly created windows that want focus (i.e. are not popups and do not specify ImGuiWindowFlags_NoFocusOnAppearing) + /// should be positioned behind that modal window, unless the window was created inside the modal begin-stack. + /// In case of multiple stacked modals newly created window honors begin stack order and does not go below its own modal parent. + /// - WindowA // FindBlockingModal() returns Modal1 + /// - WindowB // .. returns Modal1 + /// - Modal1 // .. returns Modal2 + /// - WindowC // .. returns Modal2 + /// - WindowD // .. returns Modal2 + /// - Modal2 // .. returns Modal2 + /// - WindowE // .. returns NULL + /// Notes: + /// - FindBlockingModal(NULL) == NULL is generally equivalent to GetTopMostPopupModal() == NULL. + /// Only difference is here we check for ->Active/WasActive but it may be unnecessary. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* FindBlockingModal_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindBottomMostVisibleWindowWithinBeginStack_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindBottomMostVisibleWindowWithinBeginStack_internal.gen.cs new file mode 100644 index 0000000..4eeee3a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindBottomMostVisibleWindowWithinBeginStack_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3356 + /// , + /// imgui.cpp:5940 + ///
ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack_internal( + ImGuiWindow* window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredViewportFromPlatformWindowStack_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredViewportFromPlatformWindowStack_internal.gen.cs new file mode 100644 index 0000000..193bbf3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredViewportFromPlatformWindowStack_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3403 + /// , + /// imgui.cpp:16323 + ///
+ /// ImGuiViewportP* FindHoveredViewportFromPlatformWindowStack(const ImVec2& mouse_platform_pos) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// If the backend doesn't set MouseLastHoveredViewport or doesn't honor ImGuiViewportFlags_NoInputs, we do a search ourselves. + /// A) It won't take account of the possibility that non-imgui windows may be in-between our dragged window and our target window. + /// B) It requires Platform_GetWindowFocus to be implemented by backend. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiViewportP* FindHoveredViewportFromPlatformWindowStack_internal( + float2* mouse_platform_pos + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredWindowEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredWindowEx_internal.gen.cs new file mode 100644 index 0000000..ae06a00 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindHoveredWindowEx_internal.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3384 + /// , + /// imgui.cpp:6237 + ///
+ /// void FindHoveredWindowEx(const ImVec2& pos, bool find_first_and_in_any_viewport, ImGuiWindow** out_hovered_window, ImGuiWindow** out_hovered_window_under_moving_window) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Find window given position, search front-to-back + /// - Typically write output back to g.HoveredWindow and g.HoveredWindowUnderMovingWindow. + /// - FIXME: Note that we have an inconsequential lag here: OuterRectClipped is updated in Begin(), so windows moved programmatically + /// with SetWindowPos() and not SetNextWindowPos() will have that rectangle lagging by a frame at the time FindHoveredWindow() is + /// called, aka before the next Begin(). Moving window isn't affected. + /// - The 'find_first_and_in_any_viewport = true' mode is only used by TestEngine. It is simpler to maintain here. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void FindHoveredWindowEx_internal( + float2* pos, + Bool8 find_first_and_in_any_viewport, + ImGuiWindow** out_hovered_window, + ImGuiWindow** out_hovered_window_under_moving_window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindOrCreateColumns_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindOrCreateColumns_internal.gen.cs new file mode 100644 index 0000000..41187d3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindOrCreateColumns_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3721 + /// , + /// imgui_tables.cpp:4305 + ///
ImGuiOldColumns* FindOrCreateColumns(ImGuiWindow* window, ImGuiID id) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiOldColumns* FindOrCreateColumns_internal(ImGuiWindow* window, ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindRenderedTextEnd_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindRenderedTextEnd_internal.gen.cs new file mode 100644 index 0000000..9dfc61b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindRenderedTextEnd_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Find the optional ## from which we stop displaying text. + /// + /// + /// C++: + /// imgui_internal.h:3822 + /// , + /// imgui.cpp:3756 + ///
const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* FindRenderedTextEnd_internal(byte* text, byte* text_end); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindSettingsHandler_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindSettingsHandler_internal.gen.cs new file mode 100644 index 0000000..a31d4d3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindSettingsHandler_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3411 + /// , + /// imgui.cpp:15817 + ///
ImGuiSettingsHandler* FindSettingsHandler(const char* type_name) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiSettingsHandler* FindSettingsHandler_internal(byte* type_name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByID_internal.gen.cs new file mode 100644 index 0000000..1f08c72 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByID_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3328 + /// , + /// imgui.cpp:6670 + ///
ImGuiWindow* FindWindowByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* FindWindowByID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByName_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByName_internal.gen.cs new file mode 100644 index 0000000..4c3a3e2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowByName_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3329 + /// , + /// imgui.cpp:6676 + ///
ImGuiWindow* FindWindowByName(const char* name) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* FindWindowByName_internal(byte* name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowDisplayIndex_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowDisplayIndex_internal.gen.cs new file mode 100644 index 0000000..b0b6ac8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowDisplayIndex_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3355 + /// , + /// imgui.cpp:13343 + ///
int FindWindowDisplayIndex(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int FindWindowDisplayIndex_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByID_internal.gen.cs new file mode 100644 index 0000000..24e2a96 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByID_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3415 + /// , + /// imgui.cpp:15975 + ///
ImGuiWindowSettings* FindWindowSettingsByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + /// We don't provide a FindWindowSettingsByName() because Docking system doesn't always hold on names. + /// This is called once per window .ini entry + once per newly instantiated window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindowSettings* FindWindowSettingsByID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByWindow_internal.gen.cs new file mode 100644 index 0000000..2a84921 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FindWindowSettingsByWindow_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3416 + /// , + /// imgui.cpp:15985 + ///
ImGuiWindowSettings* FindWindowSettingsByWindow(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Settings - Windows + /// + /// + /// This is faster if you are holding on a Window already as we don't need to perform a search. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindowSettings* FindWindowSettingsByWindow_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FixupKeyChord_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FixupKeyChord_internal.gen.cs new file mode 100644 index 0000000..2c92463 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FixupKeyChord_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3544 + /// , + /// imgui.cpp:9781 + ///
ImGuiKeyChord FixupKeyChord(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiKeyChord FixupKeyChord_internal(ImGuiKeyChord key_chord); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FocusItem_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FocusItem_internal.gen.cs new file mode 100644 index 0000000..d33f476 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FocusItem_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Focus last item (no selection/activation). + /// + /// + /// C++: + /// imgui_internal.h:3531 + /// , + /// imgui.cpp:9171 + ///
void FocusItem() + ///
+ ///
+ /// + /// + /// Focus/Activation + /// This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are + /// much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones. + /// + /// + /// Focus = move navigation cursor, set scrolling, set focus window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void FocusItem_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FocusTopMostWindowUnderOne_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FocusTopMostWindowUnderOne_internal.gen.cs new file mode 100644 index 0000000..4684f6c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FocusTopMostWindowUnderOne_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3350 + /// , + /// imgui.cpp:13419 + ///
+ /// void FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window, ImGuiViewport* filter_viewport, ImGuiFocusRequestFlags flags) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void FocusTopMostWindowUnderOne_internal( + ImGuiWindow* under_this_window, + ImGuiWindow* ignore_window, + ImGuiViewport* filter_viewport, + ImGuiFocusRequestFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/FocusWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/FocusWindow_internal.gen.cs new file mode 100644 index 0000000..71caa51 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/FocusWindow_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3349 + /// , + /// imgui.cpp:13350 + ///
void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0) + ///
+ ///
+ /// + /// + /// Windows: Display Order and Focus Order + /// + /// + /// Moving window to front of display and set focus (which happens to be back of our sorted list) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void FocusWindow_internal(ImGuiWindow* window, ImGuiFocusRequestFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GcAwakeTransientWindowBuffers_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GcAwakeTransientWindowBuffers_internal.gen.cs new file mode 100644 index 0000000..7a2a579 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GcAwakeTransientWindowBuffers_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3919 + /// , + /// imgui.cpp:4601 + ///
void GcAwakeTransientWindowBuffers(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Garbage collection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void GcAwakeTransientWindowBuffers_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientMiscBuffers_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientMiscBuffers_internal.gen.cs new file mode 100644 index 0000000..10a314b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientMiscBuffers_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3917 + /// , + /// imgui.cpp:4573 + ///
void GcCompactTransientMiscBuffers() + ///
+ ///
+ /// + /// + /// Garbage collection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void GcCompactTransientMiscBuffers_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientWindowBuffers_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientWindowBuffers_internal.gen.cs new file mode 100644 index 0000000..f220d1e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GcCompactTransientWindowBuffers_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3918 + /// , + /// imgui.cpp:4589 + ///
void GcCompactTransientWindowBuffers(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Garbage collection + /// + /// + /// Free up/compact internal window buffers, we can use this when a window becomes unused. + /// Not freed: + /// - ImGuiWindow, ImGuiWindowSettings, Name, StateStorage, ColumnsStorage (may hold useful data) + /// This should have no noticeable visual effect. When the window reappear however, expect new allocation/buffer growth/copy cost. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void GcCompactTransientWindowBuffers_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetActiveID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetActiveID_internal.gen.cs new file mode 100644 index 0000000..7b9a32f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetActiveID_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3440 + ///
inline ImGuiID GetActiveID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetActiveID_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetBoxSelectState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetBoxSelectState_internal.gen.cs new file mode 100644 index 0000000..56238da --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetBoxSelectState_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3710 + ///
inline ImGuiBoxSelectState* GetBoxSelectState(ImGuiID id) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiBoxSelectState* GetBoxSelectState_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnNormFromOffset_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnNormFromOffset_internal.gen.cs new file mode 100644 index 0000000..0bba3b1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnNormFromOffset_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3723 + /// , + /// imgui_tables.cpp:4169 + ///
float GetColumnNormFromOffset(const ImGuiOldColumns* columns, float offset) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetColumnNormFromOffset_internal(ImGuiOldColumns* columns, float offset); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnOffsetFromNorm_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnOffsetFromNorm_internal.gen.cs new file mode 100644 index 0000000..9858c42 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnOffsetFromNorm_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3722 + /// , + /// imgui_tables.cpp:4164 + ///
float GetColumnOffsetFromNorm(const ImGuiOldColumns* columns, float offset_norm) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetColumnOffsetFromNorm_internal( + ImGuiOldColumns* columns, + float offset_norm + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnsID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnsID_internal.gen.cs new file mode 100644 index 0000000..033b91d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetColumnsID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3720 + /// , + /// imgui_tables.cpp:4318 + ///
ImGuiID GetColumnsID(const char* str_id, int count) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetColumnsID_internal(byte* str_id, int count); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentFocusScope_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentFocusScope_internal.gen.cs new file mode 100644 index 0000000..dda29c7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentFocusScope_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Focus scope we are outputting into, set by PushFocusScope() + /// + /// + /// C++: + /// imgui_internal.h:3684 + ///
inline ImGuiID GetCurrentFocusScope() + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Focus Scope + /// This is generally used to identify a unique input location (for e.g. a selection set) + /// There is one per window (automatically set in Begin), but: + /// - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set. + /// So in order to identify a set multiple lists in same window may each need a focus scope. + /// If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope() + /// - Shortcut routing also use focus scope as a default location identifier if an owner is not provided. + /// We don't use the ID Stack for this as it is common to want them separate. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetCurrentFocusScope_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTabBar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTabBar_internal.gen.cs new file mode 100644 index 0000000..7a44cfa --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTabBar_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3784 + ///
inline ImGuiTabBar* GetCurrentTabBar() + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTabBar* GetCurrentTabBar_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTable_internal.gen.cs new file mode 100644 index 0000000..cf4dca5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentTable_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3739 + ///
inline ImGuiTable* GetCurrentTable() + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTable* GetCurrentTable_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindowRead_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindowRead_internal.gen.cs new file mode 100644 index 0000000..7d2b940 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindowRead_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3326 + ///
inline ImGuiWindow* GetCurrentWindowRead() + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* GetCurrentWindowRead_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindow_internal.gen.cs new file mode 100644 index 0000000..2463a82 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetCurrentWindow_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3327 + ///
inline ImGuiWindow* GetCurrentWindow() + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* GetCurrentWindow_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetDefaultFont_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetDefaultFont_internal.gen.cs new file mode 100644 index 0000000..44dc7e0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetDefaultFont_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3371 + /// , + /// imgui.cpp:9368 + ///
ImFont* GetDefaultFont() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* GetDefaultFont_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetFocusID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetFocusID_internal.gen.cs new file mode 100644 index 0000000..cc14536 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetFocusID_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3441 + ///
inline ImGuiID GetFocusID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetFocusID_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetFontRasterizerDensity_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetFontRasterizerDensity_internal.gen.cs new file mode 100644 index 0000000..979ef97 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetFontRasterizerDensity_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3369 + ///
inline float GetFontRasterizerDensity() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetFontRasterizerDensity_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetForegroundDrawList_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetForegroundDrawList_internal.gen.cs new file mode 100644 index 0000000..96e54e3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetForegroundDrawList_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3374 + ///
inline ImDrawList* GetForegroundDrawList(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawList* GetForegroundDrawList_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetHoveredID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetHoveredID_internal.gen.cs new file mode 100644 index 0000000..3fe78d1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetHoveredID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3445 + /// , + /// imgui.cpp:4689 + ///
ImGuiID GetHoveredID() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetHoveredID_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetIDWithSeed_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetIDWithSeed_internal.gen.cs new file mode 100644 index 0000000..63f08b6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetIDWithSeed_internal.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3450 + /// , + /// imgui.cpp:9644 + ///
ImGuiID GetIDWithSeed(const char* str_id_begin, const char* str_id_end, ImGuiID seed) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + /// Helper to avoid a common series of PushOverrideID -> GetID() -> PopID() call + /// (note that when using this pattern, ID Stack Tool will tend to not display the intermediate stack level. + /// for that to work we would need to do PushOverrideID() -> ItemAdd() -> PopID() which would alter widget code a little more) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetIDWithSeed_internal_0( + byte* str_id_begin, + byte* str_id_end, + ImGuiID seed + ); + + /// + /// + /// C++: + /// imgui_internal.h:3451 + /// , + /// imgui.cpp:9655 + ///
ImGuiID GetIDWithSeed(int n, ImGuiID seed) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetIDWithSeed_internal_1(int n, ImGuiID seed); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetIO_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetIO_internal.gen.cs new file mode 100644 index 0000000..5603f78 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetIO_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3324 + /// , + /// imgui.cpp:5090 + ///
ImGuiIO& GetIO(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// This variant exists to facilitate backends experimenting with multi-threaded parallel context. (#8069, + /// #6293, #5856) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiIO* GetIO_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetInputTextState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetInputTextState_internal.gen.cs new file mode 100644 index 0000000..47cf2ba --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetInputTextState_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Get input text state if active + /// + /// + /// C++: + /// imgui_internal.h:3899 + ///
inline ImGuiInputTextState* GetInputTextState(ImGuiID id) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiInputTextState* GetInputTextState_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetItemFlags_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetItemFlags_internal.gen.cs new file mode 100644 index 0000000..230da4a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetItemFlags_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3439 + ///
inline ImGuiItemFlags GetItemFlags() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiItemFlags GetItemFlags_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetItemStatusFlags_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetItemStatusFlags_internal.gen.cs new file mode 100644 index 0000000..1006e94 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetItemStatusFlags_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3438 + ///
inline ImGuiItemStatusFlags GetItemStatusFlags() + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiItemStatusFlags GetItemStatusFlags_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyChordName_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyChordName_internal.gen.cs new file mode 100644 index 0000000..2cbc67d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyChordName_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3556 + /// , + /// imgui.cpp:9844 + ///
const char* GetKeyChordName(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Return untranslated names: on macOS, Cmd key will show as Ctrl, Ctrl key will show as super. + /// Lifetime of return value: valid until next call to same function. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* GetKeyChordName_internal(ImGuiKeyChord key_chord); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyData_internal.gen.cs new file mode 100644 index 0000000..556aa05 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyData_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3554 + /// , + /// imgui.cpp:9790 + ///
ImGuiKeyData* GetKeyData(ImGuiContext* ctx, ImGuiKey key) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiKeyData* GetKeyData_internal_0(ImGuiContext* ctx, ImGuiKey key); + + /// + /// + /// C++: + /// imgui_internal.h:3555 + ///
inline ImGuiKeyData* GetKeyData(ImGuiKey key) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiKeyData* GetKeyData_internal_1(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyMagnitude2d_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyMagnitude2d_internal.gen.cs new file mode 100644 index 0000000..085b4e4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyMagnitude2d_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3559 + /// , + /// imgui.cpp:9906 + ///
+ /// ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down) + ///
+ ///
+ /// + /// + /// Return 2D vector representing the combination of four cardinal direction, with analog value support (for + /// e.g. ImGuiKey_GamepadLStick* values). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetKeyMagnitude2d_internal( + ImGuiKey key_left, + ImGuiKey key_right, + ImGuiKey key_up, + ImGuiKey key_down + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwnerData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwnerData_internal.gen.cs new file mode 100644 index 0000000..da0c4ea --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwnerData_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3583 + ///
inline ImGuiKeyOwnerData* GetKeyOwnerData(ImGuiContext* ctx, ImGuiKey key) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiKeyOwnerData* GetKeyOwnerData_internal(ImGuiContext* ctx, ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwner_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwner_internal.gen.cs new file mode 100644 index 0000000..cdf8278 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetKeyOwner_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3578 + /// , + /// imgui.cpp:10961 + ///
ImGuiID GetKeyOwner(ImGuiKey key) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetKeyOwner_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetMultiSelectState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetMultiSelectState_internal.gen.cs new file mode 100644 index 0000000..db37f9f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetMultiSelectState_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3711 + ///
inline ImGuiMultiSelectState* GetMultiSelectState(ImGuiID id) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiMultiSelectState* GetMultiSelectState_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetNavTweakPressedAmount_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetNavTweakPressedAmount_internal.gen.cs new file mode 100644 index 0000000..2b5ac16 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetNavTweakPressedAmount_internal.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3560 + /// , + /// imgui.cpp:14102 + ///
float GetNavTweakPressedAmount(ImGuiAxis axis) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float GetNavTweakPressedAmount_internal(ImGuiAxis axis); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetPlatformIO_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetPlatformIO_internal.gen.cs new file mode 100644 index 0000000..9fcf3e8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetPlatformIO_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3325 + /// , + /// imgui.cpp:5103 + ///
ImGuiPlatformIO& GetPlatformIO(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// This variant exists to facilitate backends experimenting with multi-threaded parallel context. (#8069, + /// #6293, #5856) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiPlatformIO* GetPlatformIO_internal(ImGuiContext* ctx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetPopupAllowedExtentRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetPopupAllowedExtentRect_internal.gen.cs new file mode 100644 index 0000000..9b7a975 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetPopupAllowedExtentRect_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3488 + /// , + /// imgui.cpp:13097 + ///
ImRect GetPopupAllowedExtentRect(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Note that this is used for popups, which can overlap the non work-area of individual viewports. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect GetPopupAllowedExtentRect_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetRoundedFontSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetRoundedFontSize_internal.gen.cs new file mode 100644 index 0000000..e7ea70b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetRoundedFontSize_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3370 + ///
inline float GetRoundedFontSize(float size) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetRoundedFontSize_internal(float size); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetShortcutRoutingData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetShortcutRoutingData_internal.gen.cs new file mode 100644 index 0000000..09e2647 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetShortcutRoutingData_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3617 + /// , + /// imgui.cpp:9964 + ///
ImGuiKeyRoutingData* GetShortcutRoutingData(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiKeyRoutingData* GetShortcutRoutingData_internal(ImGuiKeyChord key_chord); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetStyleVarInfo_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetStyleVarInfo_internal.gen.cs new file mode 100644 index 0000000..d495b98 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetStyleVarInfo_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3467 + /// , + /// imgui.cpp:3595 + ///
const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx) + ///
+ ///
+ /// + /// + /// Parameter stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiStyleVarInfo* GetStyleVarInfo_internal(ImGuiStyleVar idx); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostAndVisiblePopupModal_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostAndVisiblePopupModal_internal.gen.cs new file mode 100644 index 0000000..2cf6d8f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostAndVisiblePopupModal_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3490 + /// , + /// imgui.cpp:12594 + ///
ImGuiWindow* GetTopMostAndVisiblePopupModal() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// See Demo->Stacked Modal to confirm what this is for. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* GetTopMostAndVisiblePopupModal_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostPopupModal_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostPopupModal_internal.gen.cs new file mode 100644 index 0000000..bc1ebf2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetTopMostPopupModal_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3489 + /// , + /// imgui.cpp:12583 + ///
ImGuiWindow* GetTopMostPopupModal() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Also see FindBlockingModal(NULL) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiWindow* GetTopMostPopupModal_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetTypematicRepeatRate_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetTypematicRepeatRate_internal.gen.cs new file mode 100644 index 0000000..9cc9f32 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetTypematicRepeatRate_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3562 + /// , + /// imgui.cpp:9882 + ///
void GetTypematicRepeatRate(ImGuiInputFlags flags, float* repeat_delay, float* repeat_rate) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void GetTypematicRepeatRate_internal( + ImGuiInputFlags flags, + float* repeat_delay, + float* repeat_rate + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetTypingSelectRequest_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetTypingSelectRequest_internal.gen.cs new file mode 100644 index 0000000..047c10a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetTypingSelectRequest_internal.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3696 + /// , + /// imgui_widgets.cpp:7329 + ///
+ /// ImGuiTypingSelectRequest* GetTypingSelectRequest(ImGuiTypingSelectFlags flags = ImGuiTypingSelectFlags_None) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + /// [Experimental] Currently not exposed in public API. + /// Consume character inputs and return search request, if any. + /// This would typically only be called on the focused window or location you want to grab inputs for, e.g. + /// if (ImGui::IsWindowFocused(...)) + /// if (ImGuiTypingSelectRequest* req = ImGui::GetTypingSelectRequest()) + /// focus_idx = ImGui::TypingSelectFindMatch(req, my_items.size(), [](void*, int n) { return my_items[n]->Name; }, &my_items, -1); + /// However the code is written in a way where calling it from multiple locations is safe (e.g. to obtain buffer). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTypingSelectRequest* GetTypingSelectRequest_internal( + ImGuiTypingSelectFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetViewportPlatformMonitor_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetViewportPlatformMonitor_internal.gen.cs new file mode 100644 index 0000000..cd875f9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetViewportPlatformMonitor_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3402 + /// , + /// imgui.cpp:17113 + ///
const ImGuiPlatformMonitor* GetViewportPlatformMonitor(ImGuiViewport* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// Return value is always != NULL, but don't hold on it across frames. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiPlatformMonitor* GetViewportPlatformMonitor_internal(ImGuiViewport* viewport); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowAlwaysWantOwnTabBar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowAlwaysWantOwnTabBar_internal.gen.cs new file mode 100644 index 0000000..6a13a90 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowAlwaysWantOwnTabBar_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3644 + /// , + /// imgui.cpp:20587 + ///
bool GetWindowAlwaysWantOwnTabBar(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 GetWindowAlwaysWantOwnTabBar_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowDockNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowDockNode_internal.gen.cs new file mode 100644 index 0000000..329cf8a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowDockNode_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3643 + ///
inline ImGuiDockNode* GetWindowDockNode() + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiDockNode* GetWindowDockNode_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeBorderID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeBorderID_internal.gen.cs new file mode 100644 index 0000000..775a254 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeBorderID_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3857 + /// , + /// imgui.cpp:6977 + ///
ImGuiID GetWindowResizeBorderID(ImGuiWindow* window, ImGuiDir dir) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Borders (Left, Right, Up, Down) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetWindowResizeBorderID_internal(ImGuiWindow* window, ImGuiDir dir); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeCornerID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeCornerID_internal.gen.cs new file mode 100644 index 0000000..6fbf74e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowResizeCornerID_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// 0..3: corners + /// + /// + /// C++: + /// imgui_internal.h:3856 + /// , + /// imgui.cpp:6967 + ///
ImGuiID GetWindowResizeCornerID(ImGuiWindow* window, int n) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// 0..3: corners (Lower-right, Lower-left, Unused, Unused) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetWindowResizeCornerID_internal(ImGuiWindow* window, int n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarID_internal.gen.cs new file mode 100644 index 0000000..54fb7a8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3855 + /// , + /// imgui_widgets.cpp:956 + ///
ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetWindowScrollbarID_internal(ImGuiWindow* window, ImGuiAxis axis); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarRect_internal.gen.cs new file mode 100644 index 0000000..9a85449 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/GetWindowScrollbarRect_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3854 + /// , + /// imgui_widgets.cpp:962 + ///
ImRect GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Return scrollbar rectangle, must only be called for corresponding axis if window->ScrollbarX/Y is + /// set. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect GetWindowScrollbarRect_internal(ImGuiWindow* window, ImGuiAxis axis); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImBitVector_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImBitVector_internal.gen.cs new file mode 100644 index 0000000..54a698c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImBitVector_internal.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:650 + ///
void Create(int sz) + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImBitVector_Create_internal(ImBitVector* target, int sz); + + /// + /// + /// C++: + /// imgui_internal.h:651 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImBitVector_Clear_internal(ImBitVector* target); + + /// + /// + /// C++: + /// imgui_internal.h:652 + ///
bool TestBit(int n) const + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImBitVector_TestBit_internal(ImBitVector* target, int n); + + /// + /// + /// C++: + /// imgui_internal.h:653 + ///
void SetBit(int n) + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImBitVector_SetBit_internal(ImBitVector* target, int n); + + /// + /// + /// C++: + /// imgui_internal.h:654 + ///
void ClearBit(int n) + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImBitVector_ClearBit_internal(ImBitVector* target, int n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImDrawListSharedData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImDrawListSharedData_internal.gen.cs new file mode 100644 index 0000000..045adef --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImDrawListSharedData_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:872 + /// , + /// imgui_draw.cpp:407 + ///
void SetCircleTessellationMaxError(float max_error) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawListSharedData_SetCircleTessellationMaxError_internal( + ImDrawListSharedData* target, + float max_error + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiDockNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiDockNode_internal.gen.cs new file mode 100644 index 0000000..3ddfa61 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiDockNode_internal.gen.cs @@ -0,0 +1,138 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:2036 + ///
bool IsRootNode() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsRootNode_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2037 + ///
bool IsDockSpace() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsDockSpace_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2038 + ///
bool IsFloatingNode() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsFloatingNode_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2039 + ///
bool IsCentralNode() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsCentralNode_internal(ImGuiDockNode* target); + + /// + /// + /// Hidden tab bar can be shown back by clicking the small triangle + /// + /// + /// C++: + /// imgui_internal.h:2040 + ///
bool IsHiddenTabBar() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsHiddenTabBar_internal(ImGuiDockNode* target); + + /// + /// + /// Never show a tab bar + /// + /// + /// C++: + /// imgui_internal.h:2041 + ///
bool IsNoTabBar() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsNoTabBar_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2042 + ///
bool IsSplitNode() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsSplitNode_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2043 + ///
bool IsLeafNode() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsLeafNode_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2044 + ///
bool IsEmpty() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiDockNode_IsEmpty_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2045 + ///
ImRect Rect() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiDockNode_Rect_internal(ImGuiDockNode* target); + + /// + /// + /// C++: + /// imgui_internal.h:2047 + ///
void SetLocalFlags(ImGuiDockNodeFlags flags) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiDockNode_SetLocalFlags_internal( + ImGuiDockNode* target, + ImGuiDockNodeFlags flags + ); + + /// + /// + /// C++: + /// imgui_internal.h:2048 + ///
void UpdateMergedFlags() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiDockNode_UpdateMergedFlags_internal(ImGuiDockNode* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextDeactivatedState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextDeactivatedState_internal.gen.cs new file mode 100644 index 0000000..10fa76e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextDeactivatedState_internal.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1203 + ///
void ClearFreeMemory() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextDeactivatedState_ClearFreeMemory_internal( + ImGuiInputTextDeactivatedState* target + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextState_internal.gen.cs new file mode 100644 index 0000000..eb3a629 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiInputTextState_internal.gen.cs @@ -0,0 +1,271 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1242 + ///
void ClearText() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_ClearText_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1243 + ///
void ClearFreeMemory() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_ClearFreeMemory_internal(ImGuiInputTextState* target); + + /// + /// + /// Cannot be inline because we call in code in stb_textedit.h implementation + /// + /// + /// C++: + /// imgui_internal.h:1244 + /// , + /// imgui_widgets.cpp:4234 + ///
void OnKeyPressed(int key) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_OnKeyPressed_internal( + ImGuiInputTextState* target, + int key + ); + + /// + /// + /// C++: + /// imgui_internal.h:1245 + /// , + /// imgui_widgets.cpp:4241 + ///
void OnCharPressed(unsigned int c) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_OnCharPressed_internal( + ImGuiInputTextState* target, + uint c + ); + + /// + /// + /// C++: + /// imgui_internal.h:1248 + /// , + /// imgui_widgets.cpp:4253 + ///
void CursorAnimReset() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + /// Those functions are not inlined in imgui_internal.h, allowing us to hide ImStbTexteditState from that + /// header. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_CursorAnimReset_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1249 + /// , + /// imgui_widgets.cpp:4254 + ///
void CursorClamp() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_CursorClamp_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1250 + /// , + /// imgui_widgets.cpp:4255 + ///
bool HasSelection() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiInputTextState_HasSelection_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1251 + /// , + /// imgui_widgets.cpp:4256 + ///
void ClearSelection() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_ClearSelection_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1252 + /// , + /// imgui_widgets.cpp:4257 + ///
int GetCursorPos() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImGuiInputTextState_GetCursorPos_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1253 + /// , + /// imgui_widgets.cpp:4258 + ///
int GetSelectionStart() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImGuiInputTextState_GetSelectionStart_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1254 + /// , + /// imgui_widgets.cpp:4259 + ///
int GetSelectionEnd() const + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImGuiInputTextState_GetSelectionEnd_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1255 + /// , + /// imgui_widgets.cpp:4260 + ///
void SelectAll() + ///
+ ///
+ /// + /// + /// Cursor & Selection + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_SelectAll_internal(ImGuiInputTextState* target); + + /// + /// + /// C++: + /// imgui_internal.h:1262 + /// , + /// imgui_widgets.cpp:4261 + ///
void ReloadUserBufAndSelectAll() + ///
+ ///
+ /// + /// + /// Reload user buf (WIP #2890) + /// If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + /// strcpy(my_buf, "hello"); + /// if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + /// state->ReloadUserBufAndSelectAll(); + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_ReloadUserBufAndSelectAll_internal( + ImGuiInputTextState* target + ); + + /// + /// + /// C++: + /// imgui_internal.h:1263 + /// , + /// imgui_widgets.cpp:4262 + ///
void ReloadUserBufAndKeepSelection() + ///
+ ///
+ /// + /// + /// Reload user buf (WIP #2890) + /// If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + /// strcpy(my_buf, "hello"); + /// if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + /// state->ReloadUserBufAndSelectAll(); + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_ReloadUserBufAndKeepSelection_internal( + ImGuiInputTextState* target + ); + + /// + /// + /// C++: + /// imgui_internal.h:1264 + /// , + /// imgui_widgets.cpp:4263 + ///
void ReloadUserBufAndMoveToEnd() + ///
+ ///
+ /// + /// + /// Reload user buf (WIP #2890) + /// If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + /// strcpy(my_buf, "hello"); + /// if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + /// state->ReloadUserBufAndSelectAll(); + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextState_ReloadUserBufAndMoveToEnd_internal( + ImGuiInputTextState* target + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiKeyRoutingTable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiKeyRoutingTable_internal.gen.cs new file mode 100644 index 0000000..a0d7dbc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiKeyRoutingTable_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1578 + ///
void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiKeyRoutingTable_Clear_internal(ImGuiKeyRoutingTable* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperData_internal.gen.cs new file mode 100644 index 0000000..e1898e2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperData_internal.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1662 + ///
void Reset(ImGuiListClipper* clipper) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiListClipperData_Reset_internal( + ImGuiListClipperData* target, + ImGuiListClipper* clipper + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperRange_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperRange_internal.gen.cs new file mode 100644 index 0000000..767d620 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiListClipperRange_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1648 + ///
static ImGuiListClipperRange FromIndices(int min, int max) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiListClipperRange ImGuiListClipperRange_FromIndices_internal( + ImGuiListClipperRange* target, + int min, + int max + ); + + /// + /// + /// C++: + /// imgui_internal.h:1649 + ///
static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiListClipperRange ImGuiListClipperRange_FromPositions_internal( + ImGuiListClipperRange* target, + float y1, + float y2, + int off_min, + int off_max + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMenuColumns_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMenuColumns_internal.gen.cs new file mode 100644 index 0000000..c18a45f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMenuColumns_internal.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1191 + /// , + /// imgui_widgets.cpp:8777 + ///
void Update(float spacing, bool window_reappearing) + ///
+ ///
+ /// + /// + /// Helpers for internal use + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiMenuColumns_Update_internal( + ImGuiMenuColumns* target, + float spacing, + Bool8 window_reappearing + ); + + /// + /// + /// C++: + /// imgui_internal.h:1192 + /// , + /// imgui_widgets.cpp:8809 + ///
float DeclColumns(float w_icon, float w_label, float w_shortcut, float w_mark) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float ImGuiMenuColumns_DeclColumns_internal( + ImGuiMenuColumns* target, + float w_icon, + float w_label, + float w_shortcut, + float w_mark + ); + + /// + /// + /// C++: + /// imgui_internal.h:1193 + /// , + /// imgui_widgets.cpp:8788 + ///
void CalcNextTotalWidth(bool update_offsets) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiMenuColumns_CalcNextTotalWidth_internal( + ImGuiMenuColumns* target, + Bool8 update_offsets + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMultiSelectTempData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMultiSelectTempData_internal.gen.cs new file mode 100644 index 0000000..dfbf55b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiMultiSelectTempData_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Zero-clear except IO as we preserve IO.Requests[] buffer allocation. + /// + /// + /// C++: + /// imgui_internal.h:1911 + ///
void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiMultiSelectTempData_Clear_internal(ImGuiMultiSelectTempData* target); + + /// + /// + /// C++: + /// imgui_internal.h:1912 + ///
void ClearIO() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiMultiSelectTempData_ClearIO_internal(ImGuiMultiSelectTempData* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNavItemData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNavItemData_internal.gen.cs new file mode 100644 index 0000000..478b1b9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNavItemData_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1752 + ///
void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiNavItemData_Clear_internal(ImGuiNavItemData* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextItemData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextItemData_internal.gen.cs new file mode 100644 index 0000000..ec79172 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextItemData_internal.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Also cleared manually by ItemAdd()! + /// + /// + /// C++: + /// imgui_internal.h:1355 + ///
inline void ClearFlags() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiNextItemData_ClearFlags_internal(ImGuiNextItemData* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextWindowData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextWindowData_internal.gen.cs new file mode 100644 index 0000000..bb5e5b7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiNextWindowData_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:1325 + ///
inline void ClearFlags() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiNextWindowData_ClearFlags_internal(ImGuiNextWindowData* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiStyleVarInfo_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiStyleVarInfo_internal.gen.cs new file mode 100644 index 0000000..17a607e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiStyleVarInfo_internal.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:899 + ///
void* GetVarPtr(void* parent) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void* ImGuiStyleVarInfo_GetVarPtr_internal( + ImGuiStyleVarInfo* target, + void* parent + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTableSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTableSettings_internal.gen.cs new file mode 100644 index 0000000..81733ac --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTableSettings_internal.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3309 + ///
ImGuiTableColumnSettings* GetColumnSettings() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiTableColumnSettings* ImGuiTableSettings_GetColumnSettings_internal( + ImGuiTableSettings* target + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTextIndex_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTextIndex_internal.gen.cs new file mode 100644 index 0000000..9da8a25 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTextIndex_internal.gen.cs @@ -0,0 +1,74 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:805 + ///
void clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiTextIndex_clear_internal(ImGuiTextIndex* target); + + /// + /// + /// C++: + /// imgui_internal.h:806 + ///
int size() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial int ImGuiTextIndex_size_internal(ImGuiTextIndex* target); + + /// + /// + /// C++: + /// imgui_internal.h:807 + ///
const char* get_line_begin(const char* base, int n) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial byte* ImGuiTextIndex_get_line_begin_internal( + ImGuiTextIndex* target, + byte* @base, + int n + ); + + /// + /// + /// C++: + /// imgui_internal.h:808 + ///
const char* get_line_end(const char* base, int n) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial byte* ImGuiTextIndex_get_line_end_internal( + ImGuiTextIndex* target, + byte* @base, + int n + ); + + /// + /// + /// C++: + /// imgui_internal.h:809 + /// , + /// imgui.cpp:3127 + ///
void append(const char* base, int old_size, int new_size) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiTextIndex_append_internal( + ImGuiTextIndex* target, + byte* @base, + int old_size, + int new_size + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTypingSelectState_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTypingSelectState_internal.gen.cs new file mode 100644 index 0000000..ce0993a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiTypingSelectState_internal.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// We preserve remaining data for easier debugging + /// + /// + /// C++: + /// imgui_internal.h:1796 + ///
void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiTypingSelectState_Clear_internal(ImGuiTypingSelectState* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiViewportP_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiViewportP_internal.gen.cs new file mode 100644 index 0000000..bc5703d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiViewportP_internal.gen.cs @@ -0,0 +1,125 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:2123 + ///
void ClearRequestFlags() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiViewportP_ClearRequestFlags_internal(ImGuiViewportP* target); + + /// + /// + /// C++: + /// imgui_internal.h:2126 + ///
ImVec2 CalcWorkRectPos(const ImVec2& inset_min) const + ///
+ ///
+ /// + /// + /// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last + /// frame data, and 1 pair for currently building rect) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 ImGuiViewportP_CalcWorkRectPos_internal( + ImGuiViewportP* target, + float2* inset_min + ); + + /// + /// + /// C++: + /// imgui_internal.h:2127 + ///
ImVec2 CalcWorkRectSize(const ImVec2& inset_min, const ImVec2& inset_max) const + ///
+ ///
+ /// + /// + /// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last + /// frame data, and 1 pair for currently building rect) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 ImGuiViewportP_CalcWorkRectSize_internal( + ImGuiViewportP* target, + float2* inset_min, + float2* inset_max + ); + + /// + /// + /// Update public fields + /// + /// + /// C++: + /// imgui_internal.h:2128 + ///
void UpdateWorkRect() + ///
+ ///
+ /// + /// + /// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last + /// frame data, and 1 pair for currently building rect) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiViewportP_UpdateWorkRect_internal(ImGuiViewportP* target); + + /// + /// + /// C++: + /// imgui_internal.h:2131 + ///
ImRect GetMainRect() const + ///
+ ///
+ /// + /// + /// Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, + /// hence the code asymmetry) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiViewportP_GetMainRect_internal(ImGuiViewportP* target); + + /// + /// + /// C++: + /// imgui_internal.h:2132 + ///
ImRect GetWorkRect() const + ///
+ ///
+ /// + /// + /// Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, + /// hence the code asymmetry) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiViewportP_GetWorkRect_internal(ImGuiViewportP* target); + + /// + /// + /// C++: + /// imgui_internal.h:2133 + ///
ImRect GetBuildWorkRect() const + ///
+ ///
+ /// + /// + /// Helpers to retrieve ImRect (we don't need to store BuildWorkRect as every access tend to change it, + /// hence the code asymmetry) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiViewportP_GetBuildWorkRect_internal(ImGuiViewportP* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindowSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindowSettings_internal.gen.cs new file mode 100644 index 0000000..f7a3d43 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindowSettings_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:2159 + ///
char* GetName() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial byte* ImGuiWindowSettings_GetName_internal(ImGuiWindowSettings* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindow_internal.gen.cs new file mode 100644 index 0000000..9acac22 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImGuiWindow_internal.gen.cs @@ -0,0 +1,132 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:2924 + /// , + /// imgui.cpp:9542 + ///
ImGuiID GetID(const char* str, const char* str_end = NULL) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiID ImGuiWindow_GetID_internal_0( + ImGuiWindow* target, + byte* str, + byte* str_end + ); + + /// + /// + /// C++: + /// imgui_internal.h:2925 + /// , + /// imgui.cpp:9554 + ///
ImGuiID GetID(const void* ptr) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiID ImGuiWindow_GetID_internal_1(ImGuiWindow* target, void* ptr); + + /// + /// + /// C++: + /// imgui_internal.h:2926 + /// , + /// imgui.cpp:9566 + ///
ImGuiID GetID(int n) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiID ImGuiWindow_GetID_internal_2(ImGuiWindow* target, int n); + + /// + /// + /// C++: + /// imgui_internal.h:2927 + /// , + /// imgui.cpp:9580 + ///
ImGuiID GetIDFromPos(const ImVec2& p_abs) + ///
+ ///
+ /// + /// + /// This is only used in rare/specific situations to manufacture an ID out of nowhere. + /// FIXME: Consider instead storing last non-zero ID + count of successive zero-ID, and combine those? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID ImGuiWindow_GetIDFromPos_internal(ImGuiWindow* target, float2* p_abs); + + /// + /// + /// C++: + /// imgui_internal.h:2928 + /// , + /// imgui.cpp:9589 + ///
ImGuiID GetIDFromRectangle(const ImRect& r_abs) + ///
+ ///
+ /// + /// + /// " + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID ImGuiWindow_GetIDFromRectangle_internal( + ImGuiWindow* target, + floatRect* r_abs + ); + + /// + /// + /// C++: + /// imgui_internal.h:2931 + ///
ImRect Rect() const + ///
+ ///
+ /// + /// + /// We don't use g.FontSize because the window may be != g.CurrentWindow. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiWindow_Rect_internal(ImGuiWindow* target); + + /// + /// + /// C++: + /// imgui_internal.h:2932 + ///
ImRect TitleBarRect() const + ///
+ ///
+ /// + /// + /// We don't use g.FontSize because the window may be != g.CurrentWindow. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiWindow_TitleBarRect_internal(ImGuiWindow* target); + + /// + /// + /// C++: + /// imgui_internal.h:2933 + ///
ImRect MenuBarRect() const + ///
+ ///
+ /// + /// + /// We don't use g.FontSize because the window may be != g.CurrentWindow. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect ImGuiWindow_MenuBarRect_internal(ImGuiWindow* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImRect_internal.gen.cs new file mode 100644 index 0000000..ff2bc10 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImRect_internal.gen.cs @@ -0,0 +1,278 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:579 + ///
ImVec2 GetCenter() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImRect_GetCenter_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:580 + ///
ImVec2 GetSize() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImRect_GetSize_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:581 + ///
float GetWidth() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float ImRect_GetWidth_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:582 + ///
float GetHeight() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float ImRect_GetHeight_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:583 + ///
float GetArea() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float ImRect_GetArea_internal(floatRect* target); + + /// + /// + /// Top-left + /// + /// + /// C++: + /// imgui_internal.h:584 + ///
ImVec2 GetTL() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImRect_GetTL_internal(floatRect* target); + + /// + /// + /// Top-right + /// + /// + /// C++: + /// imgui_internal.h:585 + ///
ImVec2 GetTR() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImRect_GetTR_internal(floatRect* target); + + /// + /// + /// Bottom-left + /// + /// + /// C++: + /// imgui_internal.h:586 + ///
ImVec2 GetBL() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImRect_GetBL_internal(floatRect* target); + + /// + /// + /// Bottom-right + /// + /// + /// C++: + /// imgui_internal.h:587 + ///
ImVec2 GetBR() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImRect_GetBR_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:588 + ///
bool Contains(const ImVec2& p) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImRect_Contains_internal_0(floatRect* target, float2* p); + + /// + /// + /// C++: + /// imgui_internal.h:589 + ///
bool Contains(const ImRect& r) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImRect_Contains_internal_1(floatRect* target, floatRect* r); + + /// + /// + /// C++: + /// imgui_internal.h:590 + ///
bool ContainsWithPad(const ImVec2& p, const ImVec2& pad) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImRect_ContainsWithPad_internal(floatRect* target, float2* p, float2* pad); + + /// + /// + /// C++: + /// imgui_internal.h:591 + ///
bool Overlaps(const ImRect& r) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImRect_Overlaps_internal(floatRect* target, floatRect* r); + + /// + /// + /// C++: + /// imgui_internal.h:592 + ///
void Add(const ImVec2& p) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_Add_internal_0(floatRect* target, float2* p); + + /// + /// + /// C++: + /// imgui_internal.h:593 + ///
void Add(const ImRect& r) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_Add_internal_1(floatRect* target, floatRect* r); + + /// + /// + /// C++: + /// imgui_internal.h:594 + ///
void Expand(const float amount) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_Expand_internal_0(floatRect* target, float amount); + + /// + /// + /// C++: + /// imgui_internal.h:595 + ///
void Expand(const ImVec2& amount) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_Expand_internal_1(floatRect* target, float2* amount); + + /// + /// + /// C++: + /// imgui_internal.h:596 + ///
void Translate(const ImVec2& d) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_Translate_internal(floatRect* target, float2* d); + + /// + /// + /// C++: + /// imgui_internal.h:597 + ///
void TranslateX(float dx) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_TranslateX_internal(floatRect* target, float dx); + + /// + /// + /// C++: + /// imgui_internal.h:598 + ///
void TranslateY(float dy) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_TranslateY_internal(floatRect* target, float dy); + + /// + /// + /// Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for + /// display. + /// + /// + /// C++: + /// imgui_internal.h:599 + ///
void ClipWith(const ImRect& r) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_ClipWith_internal(floatRect* target, floatRect* r); + + /// + /// + /// Full version, ensure both points are fully clipped. + /// + /// + /// C++: + /// imgui_internal.h:600 + ///
void ClipWithFull(const ImRect& r) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_ClipWithFull_internal(floatRect* target, floatRect* r); + + /// + /// + /// C++: + /// imgui_internal.h:601 + ///
void Floor() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImRect_Floor_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:602 + ///
bool IsInverted() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImRect_IsInverted_internal(floatRect* target); + + /// + /// + /// C++: + /// imgui_internal.h:603 + ///
ImVec4 ToVec4() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float4 ImRect_ToVec4_internal(floatRect* target); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ImageButtonEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ImageButtonEx_internal.gen.cs new file mode 100644 index 0000000..4328621 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ImageButtonEx_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3843 + /// , + /// imgui_widgets.cpp:1156 + ///
+ /// bool ImageButtonEx(ImGuiID id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImageButtonEx_internal( + ImGuiID id, + ImTextureRef tex_ref, + float2* image_size, + float2* uv0, + float2* uv1, + float4* bg_col, + float4* tint_col, + ImGuiButtonFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/Initialize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/Initialize_internal.gen.cs new file mode 100644 index 0000000..e631091 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/Initialize_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3378 + /// , + /// imgui.cpp:4316 + ///
void Initialize() + ///
+ ///
+ /// + /// + /// Init + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Initialize_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/InputTextDeactivateHook_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/InputTextDeactivateHook_internal.gen.cs new file mode 100644 index 0000000..277f6f8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/InputTextDeactivateHook_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3895 + /// , + /// imgui_widgets.cpp:4494 + ///
void InputTextDeactivateHook(ImGuiID id) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// As InputText() retain textual data and we currently provide a path for user to not retain it (via local variables) + /// we need some form of hook to reapply data back to user buffer on deactivation frame. (#4714) + /// It would be more desirable that we discourage users from taking advantage of the "user not retaining data" trick, + /// but that more likely be attractive when we do have _NoLiveEdit flag available. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void InputTextDeactivateHook_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/InputTextEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/InputTextEx_internal.gen.cs new file mode 100644 index 0000000..787181f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/InputTextEx_internal.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3894 + /// , + /// imgui_widgets.cpp:4522 + ///
+ /// bool InputTextEx(const char* label, const char* hint, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Edit a string of text + /// - buf_size account for the zero-terminator, so a buf_size of 6 can hold "Hello" but not "Hello!". + /// This is so we can easily call InputText() on static arrays using ARRAYSIZE() and to match + /// Note that in std::string world, capacity() would omit 1 byte used by the zero-terminator. + /// - When active, hold on a privately held copy of the text (and apply back to 'buf'). So changing 'buf' while the InputText is active has no effect. + /// - If you want to use ImGui::InputText() with std::string, see misc/cpp/imgui_stdlib.h + /// (FIXME: Rather confusing and messy function, among the worse part of our codebase, expecting to rewrite a V2 at some point.. Partly because we are + /// doing UTF8 > U16 > UTF8 conversions on the go to easily interface with stb_textedit. Ideally should stay in UTF-8 all the time. See https://github.com/nothings/stb/issues/188) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputTextEx_internal( + byte* label, + byte* hint, + byte* buf, + int buf_size, + float2* size_arg, + ImGuiInputTextFlags flags, + nint callback, + void* user_data + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsActiveIdUsingNavDir_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsActiveIdUsingNavDir_internal.gen.cs new file mode 100644 index 0000000..a8c0019 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsActiveIdUsingNavDir_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3565 + ///
inline bool IsActiveIdUsingNavDir(ImGuiDir dir) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 IsActiveIdUsingNavDir_internal(ImGuiDir dir); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsAliasKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsAliasKey_internal.gen.cs new file mode 100644 index 0000000..579cbba --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsAliasKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3542 + ///
inline bool IsAliasKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsAliasKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsClippedEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsClippedEx_internal.gen.cs new file mode 100644 index 0000000..bedb455 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsClippedEx_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3459 + /// , + /// imgui.cpp:4956 + ///
bool IsClippedEx(const ImRect& bb, ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// FIXME: This is inlined/duplicated in ItemAdd() + /// FIXME: The id != 0 path is not used by our codebase, may get rid of it? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsClippedEx_internal(floatRect* bb, ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropActive_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropActive_internal.gen.cs new file mode 100644 index 0000000..0cfee55 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropActive_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3687 + /// , + /// imgui.cpp:15137 + ///
bool IsDragDropActive() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsDragDropActive_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropPayloadBeingAccepted_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropPayloadBeingAccepted_internal.gen.cs new file mode 100644 index 0000000..09c4678 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsDragDropPayloadBeingAccepted_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3690 + /// , + /// imgui.cpp:15412 + ///
bool IsDragDropPayloadBeingAccepted() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsDragDropPayloadBeingAccepted_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsGamepadKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsGamepadKey_internal.gen.cs new file mode 100644 index 0000000..44146fe --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsGamepadKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3540 + ///
inline bool IsGamepadKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsGamepadKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsItemActiveAsInputText_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsItemActiveAsInputText_internal.gen.cs new file mode 100644 index 0000000..2f5f266 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsItemActiveAsInputText_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// This may be useful to apply workaround that a based on distinguish whenever an item is active as a text + /// input field. + /// + /// + /// C++: + /// imgui_internal.h:3901 + ///
inline bool IsItemActiveAsInputText() + ///
+ ///
+ /// + /// + /// InputText + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemActiveAsInputText_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyChordPressed_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyChordPressed_internal.gen.cs new file mode 100644 index 0000000..36423d9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyChordPressed_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3594 + /// , + /// imgui.cpp:11073 + ///
bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + /// This is equivalent to comparing KeyMods + doing a IsKeyPressed() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyChordPressed_internal( + ImGuiKeyChord key_chord, + ImGuiInputFlags flags, + ImGuiID owner_id + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyDown_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyDown_internal.gen.cs new file mode 100644 index 0000000..a660658 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyDown_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3591 + /// , + /// imgui.cpp:10176 + ///
bool IsKeyDown(ImGuiKey key, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyDown_internal(ImGuiKey key, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyPressed_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyPressed_internal.gen.cs new file mode 100644 index 0000000..54860f9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyPressed_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Important: when transitioning from old to new IsKeyPressed(): old API has "bool repeat = true", so would + /// default to repeat. New API requiress explicit ImGuiInputFlags_Repeat. + /// + /// + /// C++: + /// imgui_internal.h:3592 + /// , + /// imgui.cpp:10192 + ///
bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + /// Important: unlike legacy IsKeyPressed(ImGuiKey, bool repeat=true) which DEFAULT to repeat, this requires + /// EXPLICIT repeat. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyPressed_internal(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyReleased_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyReleased_internal.gen.cs new file mode 100644 index 0000000..0cccbe2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyReleased_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3593 + /// , + /// imgui.cpp:10236 + ///
bool IsKeyReleased(ImGuiKey key, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyReleased_internal(ImGuiKey key, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyboardKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyboardKey_internal.gen.cs new file mode 100644 index 0000000..0417358 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsKeyboardKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3539 + ///
inline bool IsKeyboardKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyboardKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsLRModKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsLRModKey_internal.gen.cs new file mode 100644 index 0000000..1377342 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsLRModKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3543 + ///
inline bool IsLRModKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsLRModKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsLegacyKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsLegacyKey_internal.gen.cs new file mode 100644 index 0000000..ad5eddf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsLegacyKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3538 + ///
inline bool IsLegacyKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsLegacyKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseClicked_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseClicked_internal.gen.cs new file mode 100644 index 0000000..15fccdc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseClicked_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3596 + /// , + /// imgui.cpp:10265 + ///
bool IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseClicked_internal( + ImGuiMouseButton button, + ImGuiInputFlags flags, + ImGuiID owner_id + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDoubleClicked_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDoubleClicked_internal.gen.cs new file mode 100644 index 0000000..2ebb842 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDoubleClicked_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3598 + /// , + /// imgui.cpp:10319 + ///
bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseDoubleClicked_internal(ImGuiMouseButton button, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDown_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDown_internal.gen.cs new file mode 100644 index 0000000..02d836f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDown_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3595 + /// , + /// imgui.cpp:10253 + ///
bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseDown_internal(ImGuiMouseButton button, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDragPastThreshold_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDragPastThreshold_internal.gen.cs new file mode 100644 index 0000000..5afb6a4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseDragPastThreshold_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3558 + /// , + /// imgui.cpp:10355 + ///
bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold = -1.0f) + ///
+ ///
+ /// + /// + /// Return if a mouse click/drag went past the given threshold. Valid to call during the MouseReleased frame. + /// [Internal] This doesn't test if the button is pressed + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseDragPastThreshold_internal( + ImGuiMouseButton button, + float lock_threshold + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseKey_internal.gen.cs new file mode 100644 index 0000000..c1b6a91 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3541 + ///
inline bool IsMouseKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseReleased_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseReleased_internal.gen.cs new file mode 100644 index 0000000..a62b156 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsMouseReleased_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3597 + /// , + /// imgui.cpp:10294 + ///
bool IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] High-Level: Input Access functions w/ support for Key/Input Ownership + /// - Important: legacy IsKeyPressed(ImGuiKey, bool repeat=true) _DEFAULTS_ to repeat, new IsKeyPressed() requires _EXPLICIT_ ImGuiInputFlags_Repeat flag. + /// - Expected to be later promoted to public API, the prototypes are designed to replace existing ones (since owner_id can default to Any == 0) + /// - Specifying a value for 'ImGuiID owner' will test that EITHER the key is NOT owned (UNLESS locked), EITHER the key is owned by 'owner'. + /// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease. + /// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseReleased_internal(ImGuiMouseButton button, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKeyOrMod_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKeyOrMod_internal.gen.cs new file mode 100644 index 0000000..83a461c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKeyOrMod_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3537 + ///
inline bool IsNamedKeyOrMod(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsNamedKeyOrMod_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKey_internal.gen.cs new file mode 100644 index 0000000..50903b2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsNamedKey_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3536 + ///
inline bool IsNamedKey(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs + /// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsNamedKey_internal(ImGuiKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsPopupOpen_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsPopupOpen_internal.gen.cs new file mode 100644 index 0000000..22dcf69 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsPopupOpen_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3487 + /// , + /// imgui.cpp:12542 + ///
bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Supported flags: ImGuiPopupFlags_AnyPopupId, ImGuiPopupFlags_AnyPopupLevel + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsPopupOpen_internal(ImGuiID id, ImGuiPopupFlags popup_flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowAbove_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowAbove_internal.gen.cs new file mode 100644 index 0000000..f65c33d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowAbove_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3335 + /// , + /// imgui.cpp:8740 + ///
bool IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowAbove_internal( + ImGuiWindow* potential_above, + ImGuiWindow* potential_below + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowChildOf_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowChildOf_internal.gen.cs new file mode 100644 index 0000000..a94dc64 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowChildOf_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3333 + /// , + /// imgui.cpp:8711 + ///
+ /// bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent, bool popup_hierarchy, bool dock_hierarchy) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowChildOf_internal( + ImGuiWindow* window, + ImGuiWindow* potential_parent, + Bool8 popup_hierarchy, + Bool8 dock_hierarchy + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowContentHoverable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowContentHoverable_internal.gen.cs new file mode 100644 index 0000000..a961a13 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowContentHoverable_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3458 + /// , + /// imgui.cpp:4719 + ///
bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flags = 0) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowContentHoverable_internal( + ImGuiWindow* window, + ImGuiHoveredFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowNavFocusable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowNavFocusable_internal.gen.cs new file mode 100644 index 0000000..3a825d6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowNavFocusable_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3336 + /// , + /// imgui.cpp:14820 + ///
bool IsWindowNavFocusable(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// Can we focus this window with CTRL+TAB (or PadMenu + PadFocusPrev/PadFocusNext) + /// Note that NoNavFocus makes the window not reachable with CTRL+TAB but it can still be focused with mouse or programmatically. + /// If you want a window to never be focused, you may use the e.g. NoInputs flag. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowNavFocusable_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowWithinBeginStackOf_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowWithinBeginStackOf_internal.gen.cs new file mode 100644 index 0000000..da0317a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/IsWindowWithinBeginStackOf_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3334 + /// , + /// imgui.cpp:8727 + ///
bool IsWindowWithinBeginStackOf(ImGuiWindow* window, ImGuiWindow* potential_parent) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowWithinBeginStackOf_internal( + ImGuiWindow* window, + ImGuiWindow* potential_parent + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ItemAdd_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ItemAdd_internal.gen.cs new file mode 100644 index 0000000..7174c64 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ItemAdd_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3456 + /// , + /// imgui.cpp:11661 + ///
+ /// bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ItemAdd_internal( + floatRect* bb, + ImGuiID id, + floatRect* nav_bb, + ImGuiItemFlags extra_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ItemHoverable_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ItemHoverable_internal.gen.cs new file mode 100644 index 0000000..2aedc82 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ItemHoverable_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3457 + /// , + /// imgui.cpp:4864 + ///
bool ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flags) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// Internal facing ItemHoverable() used when submitting widgets. THIS IS A SUBMISSION NOT A HOVER CHECK. + /// Returns whether the item was hovered, logic differs slightly from IsItemHovered(). + /// (this does not rely on LastItemData it can be called from a ButtonBehavior() call not following an ItemAdd() call) + /// FIXME-LEGACY: the 'ImGuiItemFlags item_flags' parameter was added on 2023-06-28. + /// If you used this in your legacy/custom widgets code: + /// - Commonly: if your ItemHoverable() call comes after an ItemAdd() call: pass 'item_flags = g.LastItemData.ItemFlags'. + /// - Rare: otherwise you may pass 'item_flags = 0' (ImGuiItemFlags_None) unless you want to benefit from special behavior handled by ItemHoverable. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ItemHoverable_internal(floatRect* bb, ImGuiID id, ImGuiItemFlags item_flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ItemSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ItemSize_internal.gen.cs new file mode 100644 index 0000000..4c69560 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ItemSize_internal.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3454 + /// , + /// imgui.cpp:11799 + ///
void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ItemSize_internal_0(float2* size, float text_baseline_y); + + /// + /// + /// FIXME: This is a misleading API since we expect CursorPos to be bb.Min. + /// + /// + /// C++: + /// imgui_internal.h:3455 + ///
inline void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ItemSize_internal_1(floatRect* bb, float text_baseline_y); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/KeepAliveID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/KeepAliveID_internal.gen.cs new file mode 100644 index 0000000..7b8c6db --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/KeepAliveID_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3447 + /// , + /// imgui.cpp:11647 + ///
void KeepAliveID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + /// Code not using ItemAdd() may need to call this manually otherwise ActiveId will be cleared. In + /// IMGUI_VERSION_NUM < 18717 this was called by GetID(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void KeepAliveID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/LocalizeGetMsg_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/LocalizeGetMsg_internal.gen.cs new file mode 100644 index 0000000..f9ea8b8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/LocalizeGetMsg_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3421 + ///
inline const char* LocalizeGetMsg(ImGuiLocKey key) + ///
+ ///
+ /// + /// + /// Localization + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* LocalizeGetMsg_internal(ImGuiLocKey key); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/LocalizeRegisterEntries_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/LocalizeRegisterEntries_internal.gen.cs new file mode 100644 index 0000000..f44a085 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/LocalizeRegisterEntries_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3420 + /// , + /// imgui.cpp:16135 + ///
void LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count) + ///
+ ///
+ /// + /// + /// Localization + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LocalizeRegisterEntries_internal(ImGuiLocEntry* entries, int count); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/LogBegin_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/LogBegin_internal.gen.cs new file mode 100644 index 0000000..2335c1f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/LogBegin_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name. + /// + /// + /// C++: + /// imgui_internal.h:3472 + /// , + /// imgui.cpp:15598 + ///
void LogBegin(ImGuiLogFlags flags, int auto_open_depth) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + /// Start logging/capturing text output + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogBegin_internal(ImGuiLogFlags flags, int auto_open_depth); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/LogRenderedText_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/LogRenderedText_internal.gen.cs new file mode 100644 index 0000000..c3b5b0c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/LogRenderedText_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3474 + /// , + /// imgui.cpp:15539 + ///
void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + /// Internal version that takes a position to decide on newline placement and pad items according to their depth. + /// We split text into individual lines to add current tree level padding + /// FIXME: This code is a little complicated perhaps, considering simplifying the whole system. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogRenderedText_internal(float2* ref_pos, byte* text, byte* text_end); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/LogSetNextTextDecoration_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/LogSetNextTextDecoration_internal.gen.cs new file mode 100644 index 0000000..bd01709 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/LogSetNextTextDecoration_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3475 + /// , + /// imgui.cpp:15617 + ///
void LogSetNextTextDecoration(const char* prefix, const char* suffix) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + /// Important: doesn't copy underlying data, use carefully (prefix/suffix must be in scope at the time of + /// the next LogRenderedText) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogSetNextTextDecoration_internal(byte* prefix, byte* suffix); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/LogToBuffer_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/LogToBuffer_internal.gen.cs new file mode 100644 index 0000000..c620a41 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/LogToBuffer_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Start logging/capturing to internal buffer + /// + /// + /// C++: + /// imgui_internal.h:3473 + /// , + /// imgui.cpp:15670 + ///
void LogToBuffer(int auto_open_depth = -1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogToBuffer_internal(int auto_open_depth); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MarkIniSettingsDirty_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MarkIniSettingsDirty_internal.gen.cs new file mode 100644 index 0000000..6c68f8d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MarkIniSettingsDirty_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3406 + /// , + /// imgui.cpp:15788 + ///
void MarkIniSettingsDirty() + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MarkIniSettingsDirty_internal_0(); + + /// + /// + /// C++: + /// imgui_internal.h:3407 + /// , + /// imgui.cpp:15795 + ///
void MarkIniSettingsDirty(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MarkIniSettingsDirty_internal_1(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MarkItemEdited_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MarkItemEdited_internal.gen.cs new file mode 100644 index 0000000..f0af7b9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MarkItemEdited_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Mark data associated to given item as "edited", used by IsItemDeactivatedAfterEdit() function. + /// + /// + /// C++: + /// imgui_internal.h:3448 + /// , + /// imgui.cpp:4695 + ///
void MarkItemEdited(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MarkItemEdited_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MenuItemEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MenuItemEx_internal.gen.cs new file mode 100644 index 0000000..8c2a18a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MenuItemEx_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3502 + /// , + /// imgui_widgets.cpp:9255 + ///
+ /// bool MenuItemEx(const char* label, const char* icon, const char* shortcut = NULL, bool selected = false, bool enabled = true) + ///
+ ///
+ /// + /// + /// Menus + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 MenuItemEx_internal( + byte* label, + byte* icon, + byte* shortcut, + Bool8 selected, + Bool8 enabled + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MouseButtonToKey_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MouseButtonToKey_internal.gen.cs new file mode 100644 index 0000000..d430327 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MouseButtonToKey_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3557 + ///
inline ImGuiKey MouseButtonToKey(ImGuiMouseButton button) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImGuiKey MouseButtonToKey_internal(ImGuiMouseButton button); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetAll_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetAll_internal.gen.cs new file mode 100644 index 0000000..7044810 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetAll_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3708 + /// , + /// imgui_widgets.cpp:8208 + ///
void MultiSelectAddSetAll(ImGuiMultiSelectTempData* ms, bool selected) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MultiSelectAddSetAll_internal(ImGuiMultiSelectTempData* ms, Bool8 selected); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetRange_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetRange_internal.gen.cs new file mode 100644 index 0000000..6ad7583 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectAddSetRange_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3709 + /// , + /// imgui_widgets.cpp:8215 + ///
+ /// void MultiSelectAddSetRange(ImGuiMultiSelectTempData* ms, bool selected, int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MultiSelectAddSetRange_internal( + ImGuiMultiSelectTempData* ms, + Bool8 selected, + int range_dir, + ulong first_item, + ulong last_item + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemFooter_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemFooter_internal.gen.cs new file mode 100644 index 0000000..49d612c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemFooter_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3707 + /// , + /// imgui_widgets.cpp:8011 + ///
void MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + /// In charge of: + /// - Auto-select on navigation. + /// - Box-select toggle handling. + /// - Right-click handling. + /// - Altering selection based on Ctrl/Shift modifiers, both for keyboard and mouse. + /// - Record current selection state for RangeSrc + /// This is all rather complex, best to run and refer to "widgets_multiselect_xxx" tests in imgui_test_suite. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MultiSelectItemFooter_internal( + ImGuiID id, + Bool8* p_selected, + Bool8* p_pressed + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemHeader_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemHeader_internal.gen.cs new file mode 100644 index 0000000..826395d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/MultiSelectItemHeader_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3706 + /// , + /// imgui_widgets.cpp:7942 + ///
void MultiSelectItemHeader(ImGuiID id, bool* p_selected, ImGuiButtonFlags* p_button_flags) + ///
+ ///
+ /// + /// + /// Multi-Select API + /// + /// + /// In charge of: + /// - Applying SetAll for submitted items. + /// - Applying SetRange for submitted items and record end points. + /// - Altering button behavior flags to facilitate use with drag and drop. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MultiSelectItemHeader_internal( + ImGuiID id, + Bool8* p_selected, + ImGuiButtonFlags* p_button_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavClearPreferredPosForAxis_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavClearPreferredPosForAxis_internal.gen.cs new file mode 100644 index 0000000..5e182bc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavClearPreferredPosForAxis_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3521 + /// , + /// imgui.cpp:13501 + ///
void NavClearPreferredPosForAxis(ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavClearPreferredPosForAxis_internal(ImGuiAxis axis); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavHighlightActivated_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavHighlightActivated_internal.gen.cs new file mode 100644 index 0000000..ea62d88 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavHighlightActivated_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3520 + /// , + /// imgui.cpp:13494 + ///
void NavHighlightActivated(ImGuiID id) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavHighlightActivated_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavInitRequestApplyResult_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavInitRequestApplyResult_internal.gen.cs new file mode 100644 index 0000000..9b03891 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavInitRequestApplyResult_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3511 + /// , + /// imgui.cpp:14298 + ///
void NavInitRequestApplyResult() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavInitRequestApplyResult_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavInitWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavInitWindow_internal.gen.cs new file mode 100644 index 0000000..60aaa2e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavInitWindow_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3510 + /// , + /// imgui.cpp:14019 + ///
void NavInitWindow(ImGuiWindow* window, bool force_reinit) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// This needs to be called before we submit any widget (aka in or before Begin) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavInitWindow_internal(ImGuiWindow* window, Bool8 force_reinit); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestApplyResult_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestApplyResult_internal.gen.cs new file mode 100644 index 0000000..742b5d6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestApplyResult_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3518 + /// , + /// imgui.cpp:14498 + ///
void NavMoveRequestApplyResult() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Apply result from previous frame navigation directional move request. Always called from NavUpdate() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestApplyResult_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestButNoResultYet_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestButNoResultYet_internal.gen.cs new file mode 100644 index 0000000..0bd3226 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestButNoResultYet_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3512 + /// , + /// imgui.cpp:13878 + ///
bool NavMoveRequestButNoResultYet() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 NavMoveRequestButNoResultYet_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestCancel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestCancel_internal.gen.cs new file mode 100644 index 0000000..a6f4263 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestCancel_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3517 + /// , + /// imgui.cpp:13931 + ///
void NavMoveRequestCancel() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestCancel_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestForward_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestForward_internal.gen.cs new file mode 100644 index 0000000..76db5dd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestForward_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3514 + /// , + /// imgui.cpp:13939 + ///
+ /// void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Forward will reuse the move request again on the next frame (generally with modifications done to it) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestForward_internal( + ImGuiDir move_dir, + ImGuiDir clip_dir, + ImGuiNavMoveFlags move_flags, + ImGuiScrollFlags scroll_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithLastItem_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithLastItem_internal.gen.cs new file mode 100644 index 0000000..00de889 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithLastItem_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3515 + /// , + /// imgui.cpp:13910 + ///
void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestResolveWithLastItem_internal(ImGuiNavItemData* result); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithPastTreeNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithPastTreeNode_internal.gen.cs new file mode 100644 index 0000000..4a6edbf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestResolveWithPastTreeNode_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3516 + /// , + /// imgui.cpp:13919 + ///
+ /// void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, const ImGuiTreeNodeStackData* tree_node_data) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Called by TreePop() to implement ImGuiTreeNodeFlags_NavLeftJumpsToParent + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestResolveWithPastTreeNode_internal( + ImGuiNavItemData* result, + ImGuiTreeNodeStackData* tree_node_data + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestSubmit_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestSubmit_internal.gen.cs new file mode 100644 index 0000000..1f1312f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestSubmit_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3513 + /// , + /// imgui.cpp:13885 + ///
+ /// void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// FIXME: ScoringRect is not set + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestSubmit_internal( + ImGuiDir move_dir, + ImGuiDir clip_dir, + ImGuiNavMoveFlags move_flags, + ImGuiScrollFlags scroll_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestTryWrapping_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestTryWrapping_internal.gen.cs new file mode 100644 index 0000000..6928590 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavMoveRequestTryWrapping_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3519 + /// , + /// imgui.cpp:13953 + ///
void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// Navigation wrap-around logic is delayed to the end of the frame because this operation is only valid after entire + /// popup is assembled and in case of appended popups it is not clear which EndPopup() call is final. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavMoveRequestTryWrapping_internal( + ImGuiWindow* window, + ImGuiNavMoveFlags move_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/NavUpdateCurrentWindowIsScrollPushableX_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/NavUpdateCurrentWindowIsScrollPushableX_internal.gen.cs new file mode 100644 index 0000000..97a3dcd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/NavUpdateCurrentWindowIsScrollPushableX_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3523 + /// , + /// imgui.cpp:13727 + ///
void NavUpdateCurrentWindowIsScrollPushableX() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// True when current work location may be scrolled horizontally when moving left / right. + /// This is generally always true UNLESS within a column. We don't have a vertical equivalent. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NavUpdateCurrentWindowIsScrollPushableX_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/OpenPopupEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/OpenPopupEx_internal.gen.cs new file mode 100644 index 0000000..f53e92c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/OpenPopupEx_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3483 + /// , + /// imgui.cpp:12658 + ///
void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// + /// + /// Mark popup as open (toggle toward open state). + /// Popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. + /// Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). + /// One open popup per level of the popup hierarchy (NB: when assigning we reset the Window member of ImGuiPopupRef to NULL) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void OpenPopupEx_internal(ImGuiID id, ImGuiPopupFlags popup_flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PlotEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PlotEx_internal.gen.cs new file mode 100644 index 0000000..e7f7cf4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PlotEx_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3909 + /// , + /// imgui_widgets.cpp:8573 + ///
+ /// int PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, const ImVec2& size_arg) + ///
+ ///
+ /// + /// + /// Plot + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int PlotEx_internal( + ImGuiPlotType plot_type, + byte* label, + nint values_getter, + void* data, + int values_count, + int values_offset, + byte* overlay_text, + float scale_min, + float scale_max, + float2* size_arg + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PopColumnsBackground_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PopColumnsBackground_internal.gen.cs new file mode 100644 index 0000000..1a15983 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PopColumnsBackground_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3719 + /// , + /// imgui_tables.cpp:4293 + ///
void PopColumnsBackground() + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopColumnsBackground_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PopFocusScope_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PopFocusScope_internal.gen.cs new file mode 100644 index 0000000..9818d60 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PopFocusScope_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3683 + /// , + /// imgui.cpp:9131 + ///
void PopFocusScope() + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Focus Scope + /// This is generally used to identify a unique input location (for e.g. a selection set) + /// There is one per window (automatically set in Begin), but: + /// - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set. + /// So in order to identify a set multiple lists in same window may each need a focus scope. + /// If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope() + /// - Shortcut routing also use focus scope as a default location identifier if an owner is not provided. + /// We don't use the ID Stack for this as it is common to want them separate. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopFocusScope_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PopPasswordFont_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PopPasswordFont_internal.gen.cs new file mode 100644 index 0000000..4cce147 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PopPasswordFont_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3373 + /// , + /// imgui_widgets.cpp:4344 + ///
void PopPasswordFont() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopPasswordFont_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PushColumnClipRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PushColumnClipRect_internal.gen.cs new file mode 100644 index 0000000..f8de4fb --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PushColumnClipRect_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3717 + /// , + /// imgui_tables.cpp:4268 + ///
void PushColumnClipRect(int column_index) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushColumnClipRect_internal(int column_index); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PushColumnsBackground_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PushColumnsBackground_internal.gen.cs new file mode 100644 index 0000000..ccb3071 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PushColumnsBackground_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3718 + /// , + /// imgui_tables.cpp:4280 + ///
void PushColumnsBackground() + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + /// Get into the columns background draw command (which is generally the same draw command as before we + /// called BeginColumns) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushColumnsBackground_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PushFocusScope_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PushFocusScope_internal.gen.cs new file mode 100644 index 0000000..58641b8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PushFocusScope_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3682 + /// , + /// imgui.cpp:9121 + ///
void PushFocusScope(ImGuiID id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Focus Scope + /// This is generally used to identify a unique input location (for e.g. a selection set) + /// There is one per window (automatically set in Begin), but: + /// - Selection patterns generally need to react (e.g. clear a selection) when landing on one item of the set. + /// So in order to identify a set multiple lists in same window may each need a focus scope. + /// If you imagine an hypothetical BeginSelectionGroup()/EndSelectionGroup() api, it would likely call PushFocusScope()/EndFocusScope() + /// - Shortcut routing also use focus scope as a default location identifier if an owner is not provided. + /// We don't use the ID Stack for this as it is common to want them separate. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushFocusScope_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PushMultiItemsWidths_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PushMultiItemsWidths_internal.gen.cs new file mode 100644 index 0000000..a8adb28 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PushMultiItemsWidths_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3463 + /// , + /// imgui.cpp:11965 + ///
void PushMultiItemsWidths(int components, float width_full) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushMultiItemsWidths_internal(int components, float width_full); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PushOverrideID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PushOverrideID_internal.gen.cs new file mode 100644 index 0000000..fe87845 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PushOverrideID_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Push given value as-is at the top of the ID stack (whereas PushID combines old and new hashes) + /// + /// + /// C++: + /// imgui_internal.h:3449 + /// , + /// imgui.cpp:9630 + ///
void PushOverrideID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + /// Push a given id value ignoring the ID stack as a seed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushOverrideID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/PushPasswordFont_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/PushPasswordFont_internal.gen.cs new file mode 100644 index 0000000..208d07b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/PushPasswordFont_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3372 + /// , + /// imgui_widgets.cpp:4328 + ///
void PushPasswordFont() + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushPasswordFont_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RegisterFontAtlas_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RegisterFontAtlas_internal.gen.cs new file mode 100644 index 0000000..4d7b118 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RegisterFontAtlas_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3364 + /// , + /// imgui.cpp:9393 + ///
void RegisterFontAtlas(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RegisterFontAtlas_internal(ImFontAtlas* atlas); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RegisterUserTexture_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RegisterUserTexture_internal.gen.cs new file mode 100644 index 0000000..556160d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RegisterUserTexture_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Register external texture. EXPERIMENTAL: DO NOT USE YET. + /// + /// + /// C++: + /// imgui_internal.h:3362 + /// , + /// imgui.cpp:9378 + ///
void RegisterUserTexture(ImTextureData* tex) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// EXPERIMENTAL: DO NOT USE YET. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RegisterUserTexture_internal(ImTextureData* tex); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RemoveContextHook_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RemoveContextHook_internal.gen.cs new file mode 100644 index 0000000..7717536 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RemoveContextHook_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3393 + /// , + /// imgui.cpp:4489 + ///
void RemoveContextHook(ImGuiContext* context, ImGuiID hook_to_remove) + ///
+ ///
+ /// + /// + /// Generic context hooks + /// + /// + /// Deferred removal, avoiding issue with changing vector while iterating it + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RemoveContextHook_internal(ImGuiContext* context, ImGuiID hook_to_remove); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RemoveSettingsHandler_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RemoveSettingsHandler_internal.gen.cs new file mode 100644 index 0000000..de203a0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RemoveSettingsHandler_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3410 + /// , + /// imgui.cpp:15810 + ///
void RemoveSettingsHandler(const char* type_name) + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RemoveSettingsHandler_internal(byte* type_name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowDockMenu_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowDockMenu_internal.gen.cs new file mode 100644 index 0000000..f809b14 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowDockMenu_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3830 + /// , + /// imgui_draw.cpp:5877 + ///
void RenderArrowDockMenu(ImDrawList* draw_list, ImVec2 p_min, float sz, ImU32 col) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// This is less wide than RenderArrow() and we use in dock nodes instead of the regular RenderArrow() to denote a change of functionality, + /// and because the saved space means that the left-most tab label can stay at exactly the same position as the label of a loose window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderArrowDockMenu_internal( + ImDrawList* draw_list, + float2 p_min, + float sz, + uint col + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowPointingAt_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowPointingAt_internal.gen.cs new file mode 100644 index 0000000..149c502 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrowPointingAt_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3829 + /// , + /// imgui_draw.cpp:5863 + ///
+ /// void RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// Render an arrow. 'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y is + /// length on each side. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderArrowPointingAt_internal( + ImDrawList* draw_list, + float2 pos, + float2 half_sz, + ImGuiDir direction, + uint col + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrow_internal.gen.cs new file mode 100644 index 0000000..9e2ff32 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderArrow_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3826 + /// , + /// imgui_draw.cpp:5810 + ///
+ /// void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale = 1.0f) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// Render an arrow aimed to be aligned with text (p_min is a position in the same space text would be + /// positioned). To e.g. denote expanded/collapsed state + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderArrow_internal( + ImDrawList* draw_list, + float2 pos, + uint col, + ImGuiDir dir, + float scale + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderBullet_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderBullet_internal.gen.cs new file mode 100644 index 0000000..d463d36 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderBullet_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3827 + /// , + /// imgui_draw.cpp:5841 + ///
void RenderBullet(ImDrawList* draw_list, ImVec2 pos, ImU32 col) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderBullet_internal(ImDrawList* draw_list, float2 pos, uint col); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderCheckMark_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderCheckMark_internal.gen.cs new file mode 100644 index 0000000..47c1d1a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderCheckMark_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3828 + /// , + /// imgui_draw.cpp:5847 + ///
void RenderCheckMark(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderCheckMark_internal( + ImDrawList* draw_list, + float2 pos, + uint col, + float sz + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderColorRectWithAlphaCheckerboard_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderColorRectWithAlphaCheckerboard_internal.gen.cs new file mode 100644 index 0000000..9b25d74 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderColorRectWithAlphaCheckerboard_internal.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3817 + /// , + /// imgui_draw.cpp:5983 + ///
+ /// void RenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list, ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding = 0.0f, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Helper for ColorPicker4() + /// NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that. + /// Spent a non reasonable amount of time trying to getting this right for ColorButton with rounding+anti-aliasing+ImGuiColorEditFlags_HalfAlphaPreview flag + various grid sizes and offsets, and eventually gave up... probably more reasonable to disable rounding altogether. + /// FIXME: uses ImGui::GetColorU32 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderColorRectWithAlphaCheckerboard_internal( + ImDrawList* draw_list, + float2 p_min, + float2 p_max, + uint fill_col, + float grid_step, + float2 grid_off, + float rounding, + ImDrawFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderDragDropTargetRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderDragDropTargetRect_internal.gen.cs new file mode 100644 index 0000000..45368ef --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderDragDropTargetRect_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3691 + /// , + /// imgui.cpp:15460 + ///
void RenderDragDropTargetRect(const ImRect& bb, const ImRect& item_clip_rect) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + /// FIXME-STYLE FIXME-DRAGDROP: Settle on a proper default visuals for drop target. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderDragDropTargetRect_internal(floatRect* bb, floatRect* item_clip_rect); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderFrameBorder_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderFrameBorder_internal.gen.cs new file mode 100644 index 0000000..075e012 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderFrameBorder_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3816 + /// , + /// imgui.cpp:3927 + ///
void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderFrameBorder_internal(float2 p_min, float2 p_max, float rounding); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderFrame_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderFrame_internal.gen.cs new file mode 100644 index 0000000..0577275 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderFrame_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3815 + /// , + /// imgui.cpp:3914 + ///
+ /// void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool borders = true, float rounding = 0.0f) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Render a rectangle shaped with optional rounding and borders + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderFrame_internal( + float2 p_min, + float2 p_max, + uint fill_col, + Bool8 borders, + float rounding + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderMouseCursor_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderMouseCursor_internal.gen.cs new file mode 100644 index 0000000..70bda9c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderMouseCursor_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3823 + /// , + /// imgui.cpp:3973 + ///
+ /// void RenderMouseCursor(ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderMouseCursor_internal( + float2 pos, + float scale, + ImGuiMouseCursor mouse_cursor, + uint col_fill, + uint col_border, + uint col_shadow + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderNavCursor_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderNavCursor_internal.gen.cs new file mode 100644 index 0000000..4f41700 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderNavCursor_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Navigation highlight + /// + /// + /// C++: + /// imgui_internal.h:3818 + /// , + /// imgui.cpp:3939 + ///
+ /// void RenderNavCursor(const ImRect& bb, ImGuiID id, ImGuiNavRenderCursorFlags flags = ImGuiNavRenderCursorFlags_None) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderNavCursor_internal( + floatRect* bb, + ImGuiID id, + ImGuiNavRenderCursorFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledRangeH_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledRangeH_internal.gen.cs new file mode 100644 index 0000000..1b08307 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledRangeH_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3831 + /// , + /// imgui_draw.cpp:5892 + ///
+ /// void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + /// FIXME: Cleanup and move code to ImDrawList. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderRectFilledRangeH_internal( + ImDrawList* draw_list, + floatRect* rect, + uint col, + float x_start_norm, + float x_end_norm, + float rounding + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledWithHole_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledWithHole_internal.gen.cs new file mode 100644 index 0000000..1b74091 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderRectFilledWithHole_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3832 + /// , + /// imgui_draw.cpp:5952 + ///
+ /// void RenderRectFilledWithHole(ImDrawList* draw_list, const ImRect& outer, const ImRect& inner, ImU32 col, float rounding) + ///
+ ///
+ /// + /// + /// Render helpers (those functions don't access any ImGui state!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderRectFilledWithHole_internal( + ImDrawList* draw_list, + floatRect* outer, + floatRect* inner, + uint col, + float rounding + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClippedEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClippedEx_internal.gen.cs new file mode 100644 index 0000000..603f126 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClippedEx_internal.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3813 + /// , + /// imgui.cpp:3816 + ///
+ /// void RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Default clip_rect uses (pos_min,pos_max) + /// Handle clipping on CPU immediately (vs typically let the GPU clip the triangles that are overlapping the clipping rectangle edges) + /// FIXME-OPT: Since we have or calculate text_size we could coarse clip whole block immediately, especially for text above draw_list->DrawList. + /// Effectively as this is called from widget doing their own coarse clipping it's not very valuable presently. Next time function will take + /// better advantage of the render function taking size into account for coarse clipping. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderTextClippedEx_internal( + ImDrawList* draw_list, + float2* pos_min, + float2* pos_max, + byte* text, + byte* text_end, + float2* text_size_if_known, + float2* align, + floatRect* clip_rect + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClipped_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClipped_internal.gen.cs new file mode 100644 index 0000000..529ea68 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextClipped_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3812 + /// , + /// imgui.cpp:3844 + ///
+ /// void RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0, 0), const ImRect* clip_rect = NULL) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderTextClipped_internal( + float2* pos_min, + float2* pos_max, + byte* text, + byte* text_end, + float2* text_size_if_known, + float2* align, + floatRect* clip_rect + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextEllipsis_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextEllipsis_internal.gen.cs new file mode 100644 index 0000000..1a29f3b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextEllipsis_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3814 + /// , + /// imgui.cpp:3863 + ///
+ /// void RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, float ellipsis_max_x, const char* text, const char* text_end, const ImVec2* text_size_if_known) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Another overly complex function until we reorganize everything into a nice all-in-one helper. + /// This is made more complex because we have dissociated the layout rectangle (pos_min..pos_max) from 'ellipsis_max_x' which may be beyond it. + /// This is because in the context of tabs we selectively hide part of the text when the Close Button appears, but we don't want the ellipsis to move. + /// (BREAKING) On 2025/04/16 we removed the 'float clip_max_x' parameters which was preceeding 'float ellipsis_max' and was the same value for 99% of users. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderTextEllipsis_internal( + ImDrawList* draw_list, + float2* pos_min, + float2* pos_max, + float ellipsis_max_x, + byte* text, + byte* text_end, + float2* text_size_if_known + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextWrapped_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextWrapped_internal.gen.cs new file mode 100644 index 0000000..0d37416 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderTextWrapped_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3811 + /// , + /// imgui.cpp:3795 + ///
void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderTextWrapped_internal( + float2 pos, + byte* text, + byte* text_end, + float wrap_width + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/RenderText_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/RenderText_internal.gen.cs new file mode 100644 index 0000000..4c90431 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/RenderText_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3810 + /// , + /// imgui.cpp:3769 + ///
+ /// void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true) + ///
+ ///
+ /// + /// + /// Render helpers + /// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. + /// NB: All position are in absolute pixels coordinates (we are never using window coordinates internally) + /// + /// + /// Internal ImGui functions to render text + /// RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderText_internal( + float2 pos, + byte* text, + byte* text_end, + Bool8 hide_text_after_hash + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ScaleWindowsInViewport_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ScaleWindowsInViewport_internal.gen.cs new file mode 100644 index 0000000..39c9d43 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ScaleWindowsInViewport_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3398 + /// , + /// imgui.cpp:16304 + ///
void ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ScaleWindowsInViewport_internal(ImGuiViewportP* viewport, float scale); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToBringRectIntoView_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToBringRectIntoView_internal.gen.cs new file mode 100644 index 0000000..6a14ee9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToBringRectIntoView_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3434 + ///
inline void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& rect) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ScrollToBringRectIntoView_internal(ImGuiWindow* window, floatRect* rect); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToItem_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToItem_internal.gen.cs new file mode 100644 index 0000000..43e3076 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToItem_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3430 + /// , + /// imgui.cpp:12235 + ///
void ScrollToItem(ImGuiScrollFlags flags = 0) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ScrollToItem_internal(ImGuiScrollFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRectEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRectEx_internal.gen.cs new file mode 100644 index 0000000..ce78215 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRectEx_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3432 + /// , + /// imgui.cpp:12248 + ///
+ /// ImVec2 ScrollToRectEx(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + /// Scroll to keep newly navigated item fully into view + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 ScrollToRectEx_internal( + ImGuiWindow* window, + floatRect* rect, + ImGuiScrollFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRect_internal.gen.cs new file mode 100644 index 0000000..b5dd8f5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollToRect_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3431 + /// , + /// imgui.cpp:12242 + ///
void ScrollToRect(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0) + ///
+ ///
+ /// + /// + /// Early work-in-progress API (ScrollToItem() will become public) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ScrollToRect_internal( + ImGuiWindow* window, + floatRect* rect, + ImGuiScrollFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ScrollbarEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollbarEx_internal.gen.cs new file mode 100644 index 0000000..b0d3b11 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ScrollbarEx_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3853 + /// , + /// imgui_widgets.cpp:1012 + ///
+ /// bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags draw_rounding_flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + /// Vertical/Horizontal scrollbar + /// The entire piece of code below is rather confusing because: + /// - We handle absolute seeking (when first clicking outside the grab) and relative manipulation (afterward or when clicking inside the grab) + /// - We store values as normalized ratio and in a form that allows the window content to change while we are holding on a scrollbar + /// - We handle both horizontal and vertical scrollbars, which makes the terminology not ideal. + /// Still, the code should probably be made simpler.. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ScrollbarEx_internal( + floatRect* bb, + ImGuiID id, + ImGuiAxis axis, + long* p_scroll_v, + long avail_v, + long contents_v, + ImDrawFlags draw_rounding_flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/Scrollbar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/Scrollbar_internal.gen.cs new file mode 100644 index 0000000..1912e0e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/Scrollbar_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3852 + /// , + /// imgui_widgets.cpp:977 + ///
void Scrollbar(ImGuiAxis axis) + ///
+ ///
+ /// + /// + /// Widgets: Window Decorations + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Scrollbar_internal(ImGuiAxis axis); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SeparatorEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SeparatorEx_internal.gen.cs new file mode 100644 index 0000000..310dec5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SeparatorEx_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3844 + /// , + /// imgui_widgets.cpp:1622 + ///
void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + /// Horizontal/vertical separating line + /// FIXME: Surprisingly, this seemingly trivial widget is a victim of many different legacy/tricky layout issues. + /// Note how thickness == 1.0f is handled specifically as not moving CursorPos by 'thickness', but other values are. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SeparatorEx_internal(ImGuiSeparatorFlags flags, float thickness); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SeparatorTextEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SeparatorTextEx_internal.gen.cs new file mode 100644 index 0000000..17edc20 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SeparatorTextEx_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3845 + /// , + /// imgui_widgets.cpp:1704 + ///
+ /// void SeparatorTextEx(ImGuiID id, const char* label, const char* label_end, float extra_width) + ///
+ ///
+ /// + /// + /// Widgets + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SeparatorTextEx_internal( + ImGuiID id, + byte* label, + byte* label_end, + float extra_width + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetActiveID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetActiveID_internal.gen.cs new file mode 100644 index 0000000..a74fa43 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetActiveID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3442 + /// , + /// imgui.cpp:4611 + ///
void SetActiveID(ImGuiID id, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetActiveID_internal(ImGuiID id, ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetActiveIdUsingAllKeyboardKeys_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetActiveIdUsingAllKeyboardKeys_internal.gen.cs new file mode 100644 index 0000000..eab5f23 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetActiveIdUsingAllKeyboardKeys_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3564 + /// , + /// imgui.cpp:6436 + ///
void SetActiveIdUsingAllKeyboardKeys() + ///
+ ///
+ /// + /// + /// This is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations. + /// FIXME: It might be undesirable that this will likely disable KeyOwner-aware shortcuts systems. Consider a more fine-tuned version if needed? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetActiveIdUsingAllKeyboardKeys_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentFont_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentFont_internal.gen.cs new file mode 100644 index 0000000..5a02623 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentFont_internal.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3366 + /// , + /// imgui.cpp:9420 + ///
+ /// void SetCurrentFont(ImFont* font, float font_size_before_scaling, float font_size_after_scaling) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// Use ImDrawList::_SetTexture(), making our shared g.FontStack[] authoritative against window-local ImDrawList. + /// - Whereas ImDrawList::PushTexture()/PopTexture() is not to be used across Begin() calls. + /// - Note that we don't propagate current texture id when e.g. Begin()-ing into a new window, we never really did... + /// - Some code paths never really fully worked with multiple atlas textures. + /// - The right-ish solution may be to remove _SetTexture() and make AddText/RenderText lazily call PushTexture()/PopTexture() + /// the same way AddImage() does, but then all other primitives would also need to? I don't think we should tackle this problem + /// because we have a concrete need and a test bed for multiple atlas textures. + /// FIXME-NEWATLAS-V2: perhaps we can now leverage ImFontAtlasUpdateDrawListsTextures() ? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCurrentFont_internal( + ImFont* font, + float font_size_before_scaling, + float font_size_after_scaling + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentViewport_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentViewport_internal.gen.cs new file mode 100644 index 0000000..6a3abf1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetCurrentViewport_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3401 + /// , + /// imgui.cpp:16195 + ///
void SetCurrentViewport(ImGuiWindow* window, ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCurrentViewport_internal(ImGuiWindow* window, ImGuiViewportP* viewport); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetFocusID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetFocusID_internal.gen.cs new file mode 100644 index 0000000..393da91 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetFocusID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3443 + /// , + /// imgui.cpp:13523 + ///
void SetFocusID(ImGuiID id, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetFocusID_internal(ImGuiID id, ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetFontRasterizerDensity_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetFontRasterizerDensity_internal.gen.cs new file mode 100644 index 0000000..1b74fe0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetFontRasterizerDensity_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3368 + /// , + /// imgui.cpp:9497 + ///
void SetFontRasterizerDensity(float rasterizer_density) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + /// Exposed in case user may want to override setting density. + /// IMPORTANT: Begin()/End() is overriding density. Be considerate of this you change it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetFontRasterizerDensity_internal(float rasterizer_density); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetHoveredID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetHoveredID_internal.gen.cs new file mode 100644 index 0000000..97b7295 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetHoveredID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3446 + /// , + /// imgui.cpp:4680 + ///
void SetHoveredID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Basic Accessors + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetHoveredID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetItemKeyOwner_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetItemKeyOwner_internal.gen.cs new file mode 100644 index 0000000..6312bfd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetItemKeyOwner_internal.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() || + /// IsItemActive()) { SetKeyOwner(key, GetItemID());'. + /// + /// + /// C++: + /// imgui_internal.h:3581 + /// , + /// imgui.cpp:11046 + ///
void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// This is more or less equivalent to: + /// if (IsItemHovered() || IsItemActive()) + /// SetKeyOwner(key, GetItemID()); + /// Extensive uses of that (e.g. many calls for a single item) may want to manually perform the tests once and then call SetKeyOwner() multiple times. + /// More advanced usage scenarios may want to call SetKeyOwner() manually based on different condition. + /// Worth noting is that only one item can be hovered and only one item can be active, therefore this usage pattern doesn't need to bother with routing and priority. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetItemKeyOwner_internal(ImGuiKey key, ImGuiInputFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwner_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwner_internal.gen.cs new file mode 100644 index 0000000..ce278a4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwner_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3579 + /// , + /// imgui.cpp:11014 + ///
void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// _LockXXX flags are useful to lock keys away from code which is not input-owner aware. + /// When using _LockXXX flags, you can use ImGuiKeyOwner_Any to lock keys from everyone. + /// - SetKeyOwner(..., None) : clears owner + /// - SetKeyOwner(..., Any, !Lock) : illegal (assert) + /// - SetKeyOwner(..., Any or None, Lock) : set lock + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetKeyOwner_internal(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwnersForKeyChord_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwnersForKeyChord_internal.gen.cs new file mode 100644 index 0000000..97c12a2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetKeyOwnersForKeyChord_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3580 + /// , + /// imgui.cpp:11031 + ///
void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// Rarely used helper + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetKeyOwnersForKeyChord_internal( + ImGuiKeyChord key, + ImGuiID owner_id, + ImGuiInputFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetLastItemData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetLastItemData_internal.gen.cs new file mode 100644 index 0000000..7554ce9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetLastItemData_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3460 + /// , + /// imgui.cpp:4969 + ///
+ /// void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// This is also inlined in ItemAdd() + /// Note: if ImGuiItemStatusFlags_HasDisplayRect is set, user needs to set g.LastItemData.DisplayRect. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetLastItemData_internal( + ImGuiID item_id, + ImGuiItemFlags item_flags, + ImGuiItemStatusFlags status_flags, + floatRect* item_rect + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetNavCursorVisibleAfterMove_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavCursorVisibleAfterMove_internal.gen.cs new file mode 100644 index 0000000..bee6908 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavCursorVisibleAfterMove_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3522 + /// , + /// imgui.cpp:13473 + ///
void SetNavCursorVisibleAfterMove() + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + /// (was called NavRestoreHighlightAfterMove() before 1.91.4) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNavCursorVisibleAfterMove_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetNavFocusScope_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavFocusScope_internal.gen.cs new file mode 100644 index 0000000..cb58869 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavFocusScope_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3526 + /// , + /// imgui.cpp:9143 + ///
void SetNavFocusScope(ImGuiID focus_scope_id) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNavFocusScope_internal(ImGuiID focus_scope_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetNavID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavID_internal.gen.cs new file mode 100644 index 0000000..e510b97 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavID_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3525 + /// , + /// imgui.cpp:13507 + ///
+ /// void SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id, const ImRect& rect_rel) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNavID_internal( + ImGuiID id, + ImGuiNavLayer nav_layer, + ImGuiID focus_scope_id, + floatRect* rect_rel + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetNavWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavWindow_internal.gen.cs new file mode 100644 index 0000000..ef51dd9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetNavWindow_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3524 + /// , + /// imgui.cpp:13481 + ///
void SetNavWindow(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNavWindow_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetNextItemRefVal_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetNextItemRefVal_internal.gen.cs new file mode 100644 index 0000000..0524fb9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetNextItemRefVal_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3900 + /// , + /// imgui_widgets.cpp:3737 + ///
void SetNextItemRefVal(ImGuiDataType data_type, void* p_data) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemRefVal_internal(ImGuiDataType data_type, void* p_data); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetNextWindowRefreshPolicy_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetNextWindowRefreshPolicy_internal.gen.cs new file mode 100644 index 0000000..bf495ae --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetNextWindowRefreshPolicy_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3359 + /// , + /// imgui.cpp:9061 + ///
void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags) + ///
+ ///
+ /// + /// + /// Windows: Idle, Refresh Policies [EXPERIMENTAL] + /// + /// + /// This is experimental and meant to be a toy for exploring a future/wider range of features. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowRefreshPolicy_internal(ImGuiWindowRefreshFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosX_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosX_internal.gen.cs new file mode 100644 index 0000000..6fbffb0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosX_internal.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3426 + /// , + /// imgui.cpp:12380 + ///
void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + /// Note that a local position will vary depending on initial scroll value, + /// This is a little bit confusing so bear with us: + /// - local_pos = (absolution_pos - window->Pos) + /// - So local_x/local_y are 0.0f for a position at the upper-left corner of a window, + /// and generally local_x/local_y are >(padding+decoration) && <(size-padding-decoration) when in the visible area. + /// - They mostly exist because of legacy API. + /// Following the rules above, when trying to work with scrolling code, consider that: + /// - SetScrollFromPosY(0.0f) == SetScrollY(0.0f + scroll.y) == has no effect! + /// - SetScrollFromPosY(-scroll.y) == SetScrollY(-scroll.y + scroll.y) == SetScrollY(0.0f) == reset scroll. Of course writing SetScrollY(0.0f) directly then makes more sense + /// We store a target position so centering and clamping can occur on the next frame when we are guaranteed to have a known window size + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollFromPosX_internal( + ImGuiWindow* window, + float local_x, + float center_x_ratio + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosY_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosY_internal.gen.cs new file mode 100644 index 0000000..f6c7a52 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollFromPosY_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3427 + /// , + /// imgui.cpp:12388 + ///
void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollFromPosY_internal( + ImGuiWindow* window, + float local_y, + float center_y_ratio + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollX_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollX_internal.gen.cs new file mode 100644 index 0000000..6652ad7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollX_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3424 + /// , + /// imgui.cpp:12344 + ///
void SetScrollX(ImGuiWindow* window, float scroll_x) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollX_internal(ImGuiWindow* window, float scroll_x); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollY_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollY_internal.gen.cs new file mode 100644 index 0000000..4222c0c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetScrollY_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3425 + /// , + /// imgui.cpp:12351 + ///
void SetScrollY(ImGuiWindow* window, float scroll_y) + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollY_internal(ImGuiWindow* window, float scroll_y); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetShortcutRouting_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetShortcutRouting_internal.gen.cs new file mode 100644 index 0000000..22b6e4a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetShortcutRouting_internal.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// owner_id needs to be explicit and cannot be 0 + /// + /// + /// C++: + /// imgui_internal.h:3615 + /// , + /// imgui.cpp:10076 + ///
bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + /// Request a desired route for an input chord (key + mods). + /// Return true if the route is available this frame. + /// - Routes and key ownership are attributed at the beginning of next frame based on best score and mod state. + /// (Conceptually this does a "Submit for next frame" + "Test for current frame". + /// As such, it could be called TrySetXXX or SubmitXXX, or the Submit and Test operations should be separate.) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SetShortcutRouting_internal( + ImGuiKeyChord key_chord, + ImGuiInputFlags flags, + ImGuiID owner_id + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowClipRectBeforeSetChannel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowClipRectBeforeSetChannel_internal.gen.cs new file mode 100644 index 0000000..2233350 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowClipRectBeforeSetChannel_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3714 + /// , + /// imgui_tables.cpp:4144 + ///
void SetWindowClipRectBeforeSetChannel(ImGuiWindow* window, const ImRect& clip_rect) + ///
+ ///
+ /// + /// + /// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API) + /// + /// + /// [Internal] Small optimization to avoid calls to PopClipRect/SetCurrentChannel/PushClipRect in sequences, + /// they would meddle many times with the underlying ImDrawCmd. + /// Instead, we do a preemptive overwrite of clipping rectangle _without_ altering the command-buffer and let + /// the subsequent single call to SetCurrentChannel() does it things once. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowClipRectBeforeSetChannel_internal( + ImGuiWindow* window, + floatRect* clip_rect + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowCollapsed_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowCollapsed_internal.gen.cs new file mode 100644 index 0000000..63d88da --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowCollapsed_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3339 + /// , + /// imgui.cpp:8923 + ///
void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowCollapsed_internal( + ImGuiWindow* window, + Bool8 collapsed, + ImGuiCond cond + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowDock_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowDock_internal.gen.cs new file mode 100644 index 0000000..841a7dc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowDock_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3648 + /// , + /// imgui.cpp:19956 + ///
void SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond) + ///
+ ///
+ /// + /// + /// Docking + /// (some functions are only declared in imgui.cpp, see Docking section) + /// + /// + /// [Internal] Called via SetNextWindowDockID() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowDock_internal(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHiddenAndSkipItemsForCurrentFrame_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHiddenAndSkipItemsForCurrentFrame_internal.gen.cs new file mode 100644 index 0000000..28fdbd7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHiddenAndSkipItemsForCurrentFrame_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3341 + /// , + /// imgui.cpp:8943 + ///
void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowHiddenAndSkipItemsForCurrentFrame_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHitTestHole_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHitTestHole_internal.gen.cs new file mode 100644 index 0000000..7516d7a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowHitTestHole_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3340 + /// , + /// imgui.cpp:8936 + ///
+ /// void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowHitTestHole_internal(ImGuiWindow* window, float2* pos, float2* size); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowParentWindowForFocusRoute_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowParentWindowForFocusRoute_internal.gen.cs new file mode 100644 index 0000000..7a36079 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowParentWindowForFocusRoute_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// You may also use SetNextWindowClass()'s FocusRouteParentWindowId field. + /// + /// + /// C++: + /// imgui_internal.h:3342 + ///
+ /// inline void SetWindowParentWindowForFocusRoute(ImGuiWindow* window, ImGuiWindow* parent_window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowParentWindowForFocusRoute_internal( + ImGuiWindow* window, + ImGuiWindow* parent_window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowPos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowPos_internal.gen.cs new file mode 100644 index 0000000..de0a6b0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowPos_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3337 + /// , + /// imgui.cpp:8841 + ///
void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowPos_internal(ImGuiWindow* window, float2* pos, ImGuiCond cond); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowSize_internal.gen.cs new file mode 100644 index 0000000..be5943e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowSize_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3338 + /// , + /// imgui.cpp:8883 + ///
void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowSize_internal(ImGuiWindow* window, float2* size, ImGuiCond cond); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowViewport_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowViewport_internal.gen.cs new file mode 100644 index 0000000..eec128f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SetWindowViewport_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3400 + /// , + /// imgui.cpp:16215 + ///
void SetWindowViewport(ImGuiWindow* window, ImGuiViewportP* viewport) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowViewport_internal(ImGuiWindow* window, ImGuiViewportP* viewport); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearColorGradientKeepAlpha_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearColorGradientKeepAlpha_internal.gen.cs new file mode 100644 index 0000000..e04ef09 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearColorGradientKeepAlpha_internal.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3912 + /// , + /// imgui_draw.cpp:2349 + ///
+ /// void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1) + ///
+ ///
+ /// + /// + /// Shade functions (write over already created vertices) + /// + /// + /// Generic linear color gradient, write to RGB fields, leave A untouched. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShadeVertsLinearColorGradientKeepAlpha_internal( + ImDrawList* draw_list, + int vert_start_idx, + int vert_end_idx, + float2 gradient_p0, + float2 gradient_p1, + uint col0, + uint col1 + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearUV_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearUV_internal.gen.cs new file mode 100644 index 0000000..8f5446b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsLinearUV_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3913 + /// , + /// imgui_draw.cpp:2373 + ///
+ /// void ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp) + ///
+ ///
+ /// + /// + /// Shade functions (write over already created vertices) + /// + /// + /// Distribute UV over (a, b) rectangle + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShadeVertsLinearUV_internal( + ImDrawList* draw_list, + int vert_start_idx, + int vert_end_idx, + float2* a, + float2* b, + float2* uv_a, + float2* uv_b, + Bool8 clamp + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsTransformPos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsTransformPos_internal.gen.cs new file mode 100644 index 0000000..fc56918 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ShadeVertsTransformPos_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3914 + /// , + /// imgui_draw.cpp:2397 + ///
+ /// void ShadeVertsTransformPos(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& pivot_in, float cos_a, float sin_a, const ImVec2& pivot_out) + ///
+ ///
+ /// + /// + /// Shade functions (write over already created vertices) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShadeVertsTransformPos_internal( + ImDrawList* draw_list, + int vert_start_idx, + int vert_end_idx, + float2* pivot_in, + float cos_a, + float sin_a, + float2* pivot_out + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/Shortcut_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/Shortcut_internal.gen.cs new file mode 100644 index 0000000..5387951 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/Shortcut_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3614 + /// , + /// imgui.cpp:11128 + ///
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Shortcut_internal( + ImGuiKeyChord key_chord, + ImGuiInputFlags flags, + ImGuiID owner_id + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ShowFontAtlas_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ShowFontAtlas_internal.gen.cs new file mode 100644 index 0000000..c59a695 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ShowFontAtlas_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3943 + /// , + /// imgui.cpp:21599 + ///
void ShowFontAtlas(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Debug Tools + /// + /// + /// [DEBUG] List fonts in a font atlas and display its texture + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowFontAtlas_internal(ImFontAtlas* atlas); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/ShrinkWidths_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/ShrinkWidths_internal.gen.cs new file mode 100644 index 0000000..879f809 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/ShrinkWidths_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3464 + /// , + /// imgui_widgets.cpp:1839 + ///
+ /// void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess, float width_min) + ///
+ ///
+ /// + /// + /// Basic Helpers for widget code + /// + /// + /// Shrink excess width from a set of item, by removing width from the larger items first. + /// Set items Width to -1.0f to disable shrinking this item. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShrinkWidths_internal( + ImGuiShrinkWidthItem* items, + int count, + float width_excess, + float width_min + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/Shutdown_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/Shutdown_internal.gen.cs new file mode 100644 index 0000000..4e7f1c3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/Shutdown_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by + /// CreateContext(). + /// + /// + /// C++: + /// imgui_internal.h:3379 + /// , + /// imgui.cpp:4384 + ///
void Shutdown() + ///
+ ///
+ /// + /// + /// Init + /// + /// + /// This function is merely here to free heap allocations. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Shutdown_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SliderBehavior_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SliderBehavior_internal.gen.cs new file mode 100644 index 0000000..09750aa --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SliderBehavior_internal.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3862 + /// , + /// imgui_widgets.cpp:3240 + ///
+ /// bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + /// For 32-bit and larger types, slider bounds are limited to half the natural type range. + /// So e.g. an integer Slider between INT_MAX-10 and INT_MAX will fail, but an integer Slider between INT_MAX/2-10 and INT_MAX/2 will be ok. + /// It would be possible to lift that limitation with some work but it doesn't seem to be worth it for sliders. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderBehavior_internal( + floatRect* bb, + ImGuiID id, + ImGuiDataType data_type, + void* p_v, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags, + floatRect* out_grab_bb + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/SplitterBehavior_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/SplitterBehavior_internal.gen.cs new file mode 100644 index 0000000..1e39c43 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/SplitterBehavior_internal.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3863 + /// , + /// imgui_widgets.cpp:1770 + ///
+ /// bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0) + ///
+ ///
+ /// + /// + /// Widgets low-level behaviors + /// + /// + /// Using 'hover_visibility_delay' allows us to hide the highlight and mouse cursor for a short time, which + /// can be convenient to reduce visual noise. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SplitterBehavior_internal( + floatRect* bb, + ImGuiID id, + ImGuiAxis axis, + float* size1, + float* size2, + float min_size1, + float min_size2, + float hover_extend, + float hover_visibility_delay, + uint bg_col + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindowOrNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindowOrNode_internal.gen.cs new file mode 100644 index 0000000..3865fde --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindowOrNode_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3386 + /// , + /// imgui.cpp:5195 + ///
void StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// We use 'undock == false' when dragging from title bar to allow moving groups of floating nodes without + /// undocking them. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void StartMouseMovingWindowOrNode_internal( + ImGuiWindow* window, + ImGuiDockNode* node, + Bool8 undock + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindow_internal.gen.cs new file mode 100644 index 0000000..a6b0f2b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/StartMouseMovingWindow_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3385 + /// , + /// imgui.cpp:5170 + ///
void StartMouseMovingWindow(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void StartMouseMovingWindow_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/StopMouseMovingWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/StopMouseMovingWindow_internal.gen.cs new file mode 100644 index 0000000..af4a3e1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/StopMouseMovingWindow_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3387 + /// , + /// imgui.cpp:5221 + ///
void StopMouseMovingWindow() + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// This is not 100% symetric with StartMouseMovingWindow(). + /// We do NOT clear ActiveID, because: + /// - It would lead to rather confusing recursive code paths. Caller can call ClearActiveID() if desired. + /// - Some code intentionally cancel moving but keep the ActiveID to lock inputs (e.g. code path taken when clicking a disabled item). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void StopMouseMovingWindow_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarAddTab_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarAddTab_internal.gen.cs new file mode 100644 index 0000000..a43651c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarAddTab_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3792 + /// , + /// imgui_widgets.cpp:9908 + ///
void TabBarAddTab(ImGuiTabBar* tab_bar, ImGuiTabItemFlags tab_flags, ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// The purpose of this call is to register tab in advance so we can control their order at the time they appear. + /// Otherwise calling this is unnecessary as tabs are appending as needed by the BeginTabItem() function. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarAddTab_internal( + ImGuiTabBar* tab_bar, + ImGuiTabItemFlags tab_flags, + ImGuiWindow* window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarCloseTab_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarCloseTab_internal.gen.cs new file mode 100644 index 0000000..6ca6663 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarCloseTab_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3794 + /// , + /// imgui_widgets.cpp:9938 + ///
void TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// Called on manual closure attempt + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarCloseTab_internal(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindMostRecentlySelectedTabForActiveWindow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindMostRecentlySelectedTabForActiveWindow_internal.gen.cs new file mode 100644 index 0000000..2976adf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindMostRecentlySelectedTabForActiveWindow_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3788 + /// , + /// imgui_widgets.cpp:9876 + ///
ImGuiTabItem* TabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// FIXME: See references to #2304 in TODO.txt + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTabItem* TabBarFindMostRecentlySelectedTabForActiveWindow_internal( + ImGuiTabBar* tab_bar + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByID_internal.gen.cs new file mode 100644 index 0000000..2c3d5f3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3786 + /// , + /// imgui_widgets.cpp:9858 + ///
ImGuiTabItem* TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTabItem* TabBarFindTabByID_internal(ImGuiTabBar* tab_bar, ImGuiID tab_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByOrder_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByOrder_internal.gen.cs new file mode 100644 index 0000000..e55063b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarFindTabByOrder_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3787 + /// , + /// imgui_widgets.cpp:9868 + ///
ImGuiTabItem* TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// Order = visible order, not submission order! (which is tab->BeginOrder) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTabItem* TabBarFindTabByOrder_internal(ImGuiTabBar* tab_bar, int order); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetCurrentTab_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetCurrentTab_internal.gen.cs new file mode 100644 index 0000000..9db1cee --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetCurrentTab_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3789 + /// , + /// imgui_widgets.cpp:9889 + ///
ImGuiTabItem* TabBarGetCurrentTab(ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTabItem* TabBarGetCurrentTab_internal(ImGuiTabBar* tab_bar); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabName_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabName_internal.gen.cs new file mode 100644 index 0000000..5d01afd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabName_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3791 + /// , + /// imgui_widgets.cpp:9896 + ///
const char* TabBarGetTabName(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* TabBarGetTabName_internal(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabOrder_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabOrder_internal.gen.cs new file mode 100644 index 0000000..55a663c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarGetTabOrder_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3790 + ///
inline int TabBarGetTabOrder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TabBarGetTabOrder_internal(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarProcessReorder_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarProcessReorder_internal.gen.cs new file mode 100644 index 0000000..8e29941 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarProcessReorder_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3799 + /// , + /// imgui_widgets.cpp:10058 + ///
bool TabBarProcessReorder(ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TabBarProcessReorder_internal(ImGuiTabBar* tab_bar); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueFocus_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueFocus_internal.gen.cs new file mode 100644 index 0000000..26142e1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueFocus_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3795 + /// , + /// imgui_widgets.cpp:10002 + ///
void TabBarQueueFocus(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarQueueFocus_internal_0(ImGuiTabBar* tab_bar, ImGuiTabItem* tab); + + /// + /// + /// C++: + /// imgui_internal.h:3796 + /// , + /// imgui_widgets.cpp:10007 + ///
void TabBarQueueFocus(ImGuiTabBar* tab_bar, const char* tab_name) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarQueueFocus_internal_1(ImGuiTabBar* tab_bar, byte* tab_name); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorderFromMousePos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorderFromMousePos_internal.gen.cs new file mode 100644 index 0000000..e98db08 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorderFromMousePos_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3798 + /// , + /// imgui_widgets.cpp:10022 + ///
+ /// void TabBarQueueReorderFromMousePos(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, ImVec2 mouse_pos) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarQueueReorderFromMousePos_internal( + ImGuiTabBar* tab_bar, + ImGuiTabItem* tab, + float2 mouse_pos + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorder_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorder_internal.gen.cs new file mode 100644 index 0000000..fef49fa --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarQueueReorder_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3797 + /// , + /// imgui_widgets.cpp:10014 + ///
void TabBarQueueReorder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, int offset) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarQueueReorder_internal( + ImGuiTabBar* tab_bar, + ImGuiTabItem* tab, + int offset + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabBarRemoveTab_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarRemoveTab_internal.gen.cs new file mode 100644 index 0000000..ece7aae --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabBarRemoveTab_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3793 + /// , + /// imgui_widgets.cpp:9928 + ///
void TabBarRemoveTab(ImGuiTabBar* tab_bar, ImGuiID tab_id) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// The *TabId fields are already set by the docking system _before_ the actual TabItem was created, so we + /// clear them regardless. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabBarRemoveTab_internal(ImGuiTabBar* tab_bar, ImGuiID tab_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabItemBackground_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemBackground_internal.gen.cs new file mode 100644 index 0000000..10aeba7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemBackground_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3804 + /// , + /// imgui_widgets.cpp:10629 + ///
+ /// void TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabItemBackground_internal( + ImDrawList* draw_list, + floatRect* bb, + ImGuiTabItemFlags flags, + uint col + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabItemCalcSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemCalcSize_internal.gen.cs new file mode 100644 index 0000000..5517e97 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemCalcSize_internal.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3802 + /// , + /// imgui_widgets.cpp:10612 + ///
ImVec2 TabItemCalcSize(const char* label, bool has_close_button_or_unsaved_marker) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 TabItemCalcSize_internal_0( + byte* label, + Bool8 has_close_button_or_unsaved_marker + ); + + /// + /// + /// C++: + /// imgui_internal.h:3803 + /// , + /// imgui_widgets.cpp:10624 + ///
ImVec2 TabItemCalcSize(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 TabItemCalcSize_internal_1(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabItemEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemEx_internal.gen.cs new file mode 100644 index 0000000..d457971 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemEx_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3800 + /// , + /// imgui_widgets.cpp:10279 + ///
+ /// bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TabItemEx_internal( + ImGuiTabBar* tab_bar, + byte* label, + Bool8* p_open, + ImGuiTabItemFlags flags, + ImGuiWindow* docked_window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabItemLabelAndCloseButton_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemLabelAndCloseButton_internal.gen.cs new file mode 100644 index 0000000..4d42de6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemLabelAndCloseButton_internal.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3805 + /// , + /// imgui_widgets.cpp:10656 + ///
+ /// void TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id, bool is_contents_visible, bool* out_just_closed, bool* out_text_clipped) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + /// Render text label (with custom clipping) + Unsaved Document marker + Close Button logic + /// We tend to lock style.FramePadding for a given tab-bar, hence the 'frame_padding' parameter. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabItemLabelAndCloseButton_internal( + ImDrawList* draw_list, + floatRect* bb, + ImGuiTabItemFlags flags, + float2 frame_padding, + byte* label, + ImGuiID tab_id, + ImGuiID close_button_id, + Bool8 is_contents_visible, + Bool8* out_just_closed, + Bool8* out_text_clipped + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TabItemSpacing_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemSpacing_internal.gen.cs new file mode 100644 index 0000000..632092d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TabItemSpacing_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3801 + /// , + /// imgui_widgets.cpp:10262 + ///
void TabItemSpacing(const char* str_id, ImGuiTabItemFlags flags, float width) + ///
+ ///
+ /// + /// + /// Tab Bars + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TabItemSpacing_internal(byte* str_id, ImGuiTabItemFlags flags, float width); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableAngledHeadersRowEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableAngledHeadersRowEx_internal.gen.cs new file mode 100644 index 0000000..1e6a3d5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableAngledHeadersRowEx_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3736 + /// , + /// imgui_tables.cpp:3332 + ///
+ /// void TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label_width, const ImGuiTableHeaderData* data, int data_count) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Important: data must be fed left to right + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableAngledHeadersRowEx_internal( + ImGuiID row_id, + float angle, + float max_label_width, + ImGuiTableHeaderData* data, + int data_count + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginApplyRequests_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginApplyRequests_internal.gen.cs new file mode 100644 index 0000000..99b0f48 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginApplyRequests_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3743 + /// , + /// imgui_tables.cpp:677 + ///
void TableBeginApplyRequests(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Apply queued resizing/reordering/hiding requests + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableBeginApplyRequests_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginCell_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginCell_internal.gen.cs new file mode 100644 index 0000000..f5f9bd5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginCell_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3761 + /// , + /// imgui_tables.cpp:2171 + ///
void TableBeginCell(ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Called by TableSetColumnIndex()/TableNextColumn() + /// This is called very frequently, so we need to be mindful of unnecessary overhead. + /// FIXME-TABLE FIXME-OPT: Could probably shortcut some things for non-active or clipped columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableBeginCell_internal(ImGuiTable* table, int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginContextMenuPopup_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginContextMenuPopup_internal.gen.cs new file mode 100644 index 0000000..9a142bf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginContextMenuPopup_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3750 + /// , + /// imgui_tables.cpp:3497 + ///
bool TableBeginContextMenuPopup(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TableBeginContextMenuPopup_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginInitMemory_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginInitMemory_internal.gen.cs new file mode 100644 index 0000000..c707737 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginInitMemory_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3742 + /// , + /// imgui_tables.cpp:655 + ///
void TableBeginInitMemory(ImGuiTable* table, int columns_count) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// For reference, the average total _allocation count_ for a table is: + /// + 0 (for ImGuiTable instance, we are pooling allocations in g.Tables[]) + /// + 1 (for table->RawData allocated below) + /// + 1 (for table->ColumnsNames, if names are used) + /// Shared allocations for the maximum number of simultaneously nested tables (generally a very small number) + /// + 1 (for table->Splitter._Channels) + /// + 2 * active_channels_count (for ImDrawCmd and ImDrawIdx buffers inside channels) + /// Where active_channels_count is variable but often == columns_count or == columns_count + 1, see TableSetupDrawChannels() for details. + /// Unused channels don't perform their +2 allocations. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableBeginInitMemory_internal(ImGuiTable* table, int columns_count); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginRow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginRow_internal.gen.cs new file mode 100644 index 0000000..216fbbd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableBeginRow_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3759 + /// , + /// imgui_tables.cpp:1916 + ///
void TableBeginRow(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Only called by TableNextRow() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableBeginRow_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableCalcMaxColumnWidth_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableCalcMaxColumnWidth_internal.gen.cs new file mode 100644 index 0000000..6f5de5c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableCalcMaxColumnWidth_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3766 + /// , + /// imgui_tables.cpp:2265 + ///
float TableCalcMaxColumnWidth(const ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Maximum column content width given current layout. Use column->MinX so this value differs on a + /// per-column basis. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float TableCalcMaxColumnWidth_internal(ImGuiTable* table, int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableDrawBorders_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableDrawBorders_internal.gen.cs new file mode 100644 index 0000000..48414df --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableDrawBorders_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3748 + /// , + /// imgui_tables.cpp:2780 + ///
void TableDrawBorders(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// FIXME-TABLE: This is a mess, need to redesign how we render borders (as some are also done in + /// TableEndRow) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableDrawBorders_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableDrawDefaultContextMenu_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableDrawDefaultContextMenu_internal.gen.cs new file mode 100644 index 0000000..f6891a4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableDrawDefaultContextMenu_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3749 + /// , + /// imgui_tables.cpp:3516 + ///
+ /// void TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// - ImGuiTableFlags_Hideable -> display columns visibility menu items + /// It means if you have a custom context menus you can call this section and omit some sections, and add your own. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableDrawDefaultContextMenu_internal( + ImGuiTable* table, + ImGuiTableFlags flags_for_section_to_display + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableEndCell_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableEndCell_internal.gen.cs new file mode 100644 index 0000000..c8d38db --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableEndCell_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3762 + /// , + /// imgui_tables.cpp:2227 + ///
void TableEndCell(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Called by TableNextRow()/TableSetColumnIndex()/TableNextColumn() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableEndCell_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableEndRow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableEndRow_internal.gen.cs new file mode 100644 index 0000000..5eb2679 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableEndRow_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3760 + /// , + /// imgui_tables.cpp:1953 + ///
void TableEndRow(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// [Internal] Called by TableNextRow() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableEndRow_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableFindByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableFindByID_internal.gen.cs new file mode 100644 index 0000000..4b76114 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableFindByID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3740 + /// , + /// imgui_tables.cpp:304 + ///
ImGuiTable* TableFindByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTable* TableFindByID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableFixColumnSortDirection_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableFixColumnSortDirection_internal.gen.cs new file mode 100644 index 0000000..8319f02 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableFixColumnSortDirection_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3757 + /// , + /// imgui_tables.cpp:2902 + ///
void TableFixColumnSortDirection(ImGuiTable* table, ImGuiTableColumn* column) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Fix sort direction if currently set on a value which is unavailable (e.g. activating + /// NoSortAscending/NoSortDescending) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableFixColumnSortDirection_internal( + ImGuiTable* table, + ImGuiTableColumn* column + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactSettings_internal.gen.cs new file mode 100644 index 0000000..4920314 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactSettings_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3772 + /// , + /// imgui_tables.cpp:3980 + ///
void TableGcCompactSettings() + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Compact and remove unused settings data (currently only used by TestEngine) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableGcCompactSettings_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactTransientBuffers_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactTransientBuffers_internal.gen.cs new file mode 100644 index 0000000..99a6054 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGcCompactTransientBuffers_internal.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3770 + /// , + /// imgui_tables.cpp:3958 + ///
void TableGcCompactTransientBuffers(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Free up/compact internal Table buffers for when it gets unused + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableGcCompactTransientBuffers_internal_0(ImGuiTable* table); + + /// + /// + /// C++: + /// imgui_internal.h:3771 + /// , + /// imgui_tables.cpp:3973 + ///
void TableGcCompactTransientBuffers(ImGuiTableTempData* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableGcCompactTransientBuffers_internal_1(ImGuiTableTempData* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetBoundSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetBoundSettings_internal.gen.cs new file mode 100644 index 0000000..c65585a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetBoundSettings_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3778 + /// , + /// imgui_tables.cpp:3669 + ///
ImGuiTableSettings* TableGetBoundSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + /// Get settings for a given table, NULL if none + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTableSettings* TableGetBoundSettings_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetCellBgRect_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetCellBgRect_internal.gen.cs new file mode 100644 index 0000000..bc255a0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetCellBgRect_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3763 + /// , + /// imgui_tables.cpp:1778 + ///
ImRect TableGetCellBgRect(const ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Return the cell rectangle based on currently known height. + /// - Important: we generally don't know our row height until the end of the row, so Max.y will be incorrect in many situations. + /// The only case where this is correct is if we provided a min_row_height to TableNextRow() and don't go below it, or in TableEndRow() when we locked that height. + /// - Important: if ImGuiTableFlags_PadOuterX is set but ImGuiTableFlags_PadInnerX is not set, the outer-most left and right + /// columns report a small offset so their CellBgRect can extend up to the outer border. + /// FIXME: But the rendering code in TableEndRow() nullifies that with clamping required for scrolling. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect TableGetCellBgRect_internal(ImGuiTable* table, int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnName_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnName_internal.gen.cs new file mode 100644 index 0000000..06f1f35 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnName_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3764 + /// , + /// imgui_tables.cpp:1725 + ///
const char* TableGetColumnName(const ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* TableGetColumnName_internal(ImGuiTable* table, int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnNextSortDirection_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnNextSortDirection_internal.gen.cs new file mode 100644 index 0000000..b8b202f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnNextSortDirection_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3756 + /// , + /// imgui_tables.cpp:2914 + ///
ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumn* column) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiSortDirection TableGetColumnNextSortDirection_internal( + ImGuiTableColumn* column + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnResizeID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnResizeID_internal.gen.cs new file mode 100644 index 0000000..1b6909c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnResizeID_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3765 + /// , + /// imgui_tables.cpp:1793 + ///
ImGuiID TableGetColumnResizeID(ImGuiTable* table, int column_n, int instance_no = 0) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Return the resizing ID for the right-side of the given column. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID TableGetColumnResizeID_internal( + ImGuiTable* table, + int column_n, + int instance_no + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnWidthAuto_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnWidthAuto_internal.gen.cs new file mode 100644 index 0000000..6308d63 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetColumnWidthAuto_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3758 + /// , + /// imgui_tables.cpp:2297 + ///
float TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Note this is meant to be stored in column->WidthAuto, please generally use the WidthAuto field + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float TableGetColumnWidthAuto_internal( + ImGuiTable* table, + ImGuiTableColumn* column + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderAngledMaxLabelWidth_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderAngledMaxLabelWidth_internal.gen.cs new file mode 100644 index 0000000..8c74b3c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderAngledMaxLabelWidth_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3731 + /// , + /// imgui_tables.cpp:3086 + ///
float TableGetHeaderAngledMaxLabelWidth() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float TableGetHeaderAngledMaxLabelWidth_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderRowHeight_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderRowHeight_internal.gen.cs new file mode 100644 index 0000000..e331046 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHeaderRowHeight_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3730 + /// , + /// imgui_tables.cpp:3070 + ///
float TableGetHeaderRowHeight() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float TableGetHeaderRowHeight_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHoveredRow_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHoveredRow_internal.gen.cs new file mode 100644 index 0000000..4d886ac --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetHoveredRow_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason why + /// this is not public yet. + /// + /// + /// C++: + /// imgui_internal.h:3729 + /// , + /// imgui_tables.cpp:1813 + ///
int TableGetHoveredRow() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Return -1 when table is not hovered. Return maxrow+1 if in table but below last submitted row. + /// *IMPORTANT* Unlike TableGetHoveredColumn(), this has a one frame latency in updating the value. + /// This difference with is the reason why this is not public yet. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TableGetHoveredRow_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceData_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceData_internal.gen.cs new file mode 100644 index 0000000..dbbd9a2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceData_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3752 + ///
inline ImGuiTableInstanceData* TableGetInstanceData(ImGuiTable* table, int instance_no) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTableInstanceData* TableGetInstanceData_internal( + ImGuiTable* table, + int instance_no + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceID_internal.gen.cs new file mode 100644 index 0000000..c5221be --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableGetInstanceID_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3753 + ///
inline ImGuiID TableGetInstanceID(ImGuiTable* table, int instance_no) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID TableGetInstanceID_internal(ImGuiTable* table, int instance_no); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableLoadSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableLoadSettings_internal.gen.cs new file mode 100644 index 0000000..6354b9c --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableLoadSettings_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3775 + /// , + /// imgui_tables.cpp:3747 + ///
void TableLoadSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableLoadSettings_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableMergeDrawChannels_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableMergeDrawChannels_internal.gen.cs new file mode 100644 index 0000000..2933119 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableMergeDrawChannels_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3751 + /// , + /// imgui_tables.cpp:2597 + ///
void TableMergeDrawChannels(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// This function is particularly tricky to understand.. take a breath. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableMergeDrawChannels_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableOpenContextMenu_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableOpenContextMenu_internal.gen.cs new file mode 100644 index 0000000..6a7b1b8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableOpenContextMenu_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3726 + /// , + /// imgui_tables.cpp:3478 + ///
void TableOpenContextMenu(int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Use -1 to open menu not specific to a given column. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableOpenContextMenu_internal(int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TablePopBackgroundChannel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TablePopBackgroundChannel_internal.gen.cs new file mode 100644 index 0000000..a8d2c4a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TablePopBackgroundChannel_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3733 + /// , + /// imgui_tables.cpp:2473 + ///
void TablePopBackgroundChannel() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TablePopBackgroundChannel_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TablePopColumnChannel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TablePopColumnChannel_internal.gen.cs new file mode 100644 index 0000000..fea33a3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TablePopColumnChannel_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3735 + /// , + /// imgui_tables.cpp:2499 + ///
void TablePopColumnChannel() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TablePopColumnChannel_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TablePushBackgroundChannel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TablePushBackgroundChannel_internal.gen.cs new file mode 100644 index 0000000..11ec131 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TablePushBackgroundChannel_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3732 + /// , + /// imgui_tables.cpp:2461 + ///
void TablePushBackgroundChannel() + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Bg2 is used by Selectable (and possibly other widgets) to render to the background. + /// Unlike our Bg0/1 channel which we uses for RowBg/CellBg/Borders and where we guarantee all shapes to be CPU-clipped, the Bg2 channel being widgets-facing will rely on regular ClipRect. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TablePushBackgroundChannel_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TablePushColumnChannel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TablePushColumnChannel_internal.gen.cs new file mode 100644 index 0000000..beaa877 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TablePushColumnChannel_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3734 + /// , + /// imgui_tables.cpp:2485 + ///
void TablePushColumnChannel(int column_n) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Also see TableBeginCell() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TablePushColumnChannel_internal(int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableRemove_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableRemove_internal.gen.cs new file mode 100644 index 0000000..6629a83 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableRemove_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3769 + /// , + /// imgui_tables.cpp:3946 + ///
void TableRemove(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Remove Table (currently only used by TestEngine) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableRemove_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableResetSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableResetSettings_internal.gen.cs new file mode 100644 index 0000000..7ae6796 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableResetSettings_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3777 + /// , + /// imgui_tables.cpp:3684 + ///
void TableResetSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + /// Restore initial state of table (with or without saved settings) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableResetSettings_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSaveSettings_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSaveSettings_internal.gen.cs new file mode 100644 index 0000000..a4927b8 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSaveSettings_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3776 + /// , + /// imgui_tables.cpp:3692 + ///
void TableSaveSettings(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSaveSettings_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnSortDirection_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnSortDirection_internal.gen.cs new file mode 100644 index 0000000..2b02324 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnSortDirection_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3728 + /// , + /// imgui_tables.cpp:2928 + ///
+ /// void TableSetColumnSortDirection(int column_n, ImGuiSortDirection sort_direction, bool append_to_sort_specs) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// Note that the NoSortAscending/NoSortDescending flags are processed in TableSortSpecsSanitize(), and they may change/revert + /// the value of SortDirection. We could technically also do it here but it would be unnecessary and duplicate code. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetColumnSortDirection_internal( + int column_n, + ImGuiSortDirection sort_direction, + Bool8 append_to_sort_specs + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoAll_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoAll_internal.gen.cs new file mode 100644 index 0000000..7a1729a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoAll_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3768 + /// , + /// imgui_tables.cpp:2407 + ///
void TableSetColumnWidthAutoAll(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetColumnWidthAutoAll_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoSingle_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoSingle_internal.gen.cs new file mode 100644 index 0000000..49a2fa2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidthAutoSingle_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3767 + /// , + /// imgui_tables.cpp:2397 + ///
void TableSetColumnWidthAutoSingle(ImGuiTable* table, int column_n) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Disable clipping then auto-fit, will take 2 frames + /// (we don't take a shortcut for unclipped columns to reduce inconsistencies when e.g. resizing multiple columns) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetColumnWidthAutoSingle_internal(ImGuiTable* table, int column_n); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidth_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidth_internal.gen.cs new file mode 100644 index 0000000..cf15909 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetColumnWidth_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3727 + /// , + /// imgui_tables.cpp:2314 + ///
void TableSetColumnWidth(int column_n, float width) + ///
+ ///
+ /// + /// + /// Tables: Candidates for public API + /// + /// + /// 'width' = inner column width, without padding + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetColumnWidth_internal(int column_n, float width); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsAddSettingsHandler_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsAddSettingsHandler_internal.gen.cs new file mode 100644 index 0000000..0fb8582 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsAddSettingsHandler_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3779 + /// , + /// imgui_tables.cpp:3924 + ///
void TableSettingsAddSettingsHandler() + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSettingsAddSettingsHandler_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsCreate_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsCreate_internal.gen.cs new file mode 100644 index 0000000..acfdd4d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsCreate_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3780 + /// , + /// imgui_tables.cpp:3649 + ///
ImGuiTableSettings* TableSettingsCreate(ImGuiID id, int columns_count) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTableSettings* TableSettingsCreate_internal(ImGuiID id, int columns_count); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsFindByID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsFindByID_internal.gen.cs new file mode 100644 index 0000000..67fd809 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSettingsFindByID_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3781 + /// , + /// imgui_tables.cpp:3658 + ///
ImGuiTableSettings* TableSettingsFindByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Tables: Settings + /// + /// + /// Find existing settings + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTableSettings* TableSettingsFindByID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSetupDrawChannels_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetupDrawChannels_internal.gen.cs new file mode 100644 index 0000000..1097584 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSetupDrawChannels_internal.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3744 + /// , + /// imgui_tables.cpp:2529 + ///
void TableSetupDrawChannels(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Allocate draw channels. Called by TableUpdateLayout() + /// - We allocate them following storage order instead of display order so reordering columns won't needlessly + /// increase overall dormant memory cost. + /// - We isolate headers draw commands in their own channels instead of just altering clip rects. + /// This is in order to facilitate merging of draw commands. + /// - After crossing FreezeRowsCount, all columns see their current draw channel changed to a second set of channels. + /// - We only use the dummy draw channel so we can push a null clipping rectangle into it without affecting other + /// channels, while simplifying per-row/per-cell overhead. It will be empty and discarded when merged. + /// - We allocate 1 or 2 background draw channels. This is because we know TablePushBackgroundChannel() is only used for + /// horizontal spanning. If we allowed vertical spanning we'd need one background draw channel per merge group (1-4). + /// Draw channel allocation (before merging): + /// - NoClip --> 2+D+1 channels: bg0/1 + bg2 + foreground (same clip rect == always 1 draw call) + /// - Clip --> 2+D+N channels + /// - FreezeRows --> 2+D+N*2 (unless scrolling value is zero) + /// - FreezeRows || FreezeColunns --> 3+D+N*2 (unless scrolling value is zero) + /// Where D is 1 if any column is clipped or hidden (dummy channel) otherwise 0. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetupDrawChannels_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsBuild_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsBuild_internal.gen.cs new file mode 100644 index 0000000..ac87434 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsBuild_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3755 + /// , + /// imgui_tables.cpp:3027 + ///
void TableSortSpecsBuild(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSortSpecsBuild_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsSanitize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsSanitize_internal.gen.cs new file mode 100644 index 0000000..8bd407e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableSortSpecsSanitize_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3754 + /// , + /// imgui_tables.cpp:2961 + ///
void TableSortSpecsSanitize(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSortSpecsSanitize_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateBorders_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateBorders_internal.gen.cs new file mode 100644 index 0000000..c518c2d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateBorders_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3746 + /// , + /// imgui_tables.cpp:1285 + ///
void TableUpdateBorders(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Process hit-testing on resizing borders. Actual size change will be applied in EndTable() + /// - Set table->HoveredColumnBorder with a short delay/timer to reduce visual feedback noise. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableUpdateBorders_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateColumnsWeightFromWidth_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateColumnsWeightFromWidth_internal.gen.cs new file mode 100644 index 0000000..47150b2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateColumnsWeightFromWidth_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3747 + /// , + /// imgui_tables.cpp:2419 + ///
void TableUpdateColumnsWeightFromWidth(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableUpdateColumnsWeightFromWidth_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateLayout_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateLayout_internal.gen.cs new file mode 100644 index 0000000..970bfb1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TableUpdateLayout_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3745 + /// , + /// imgui_tables.cpp:803 + ///
void TableUpdateLayout(ImGuiTable* table) + ///
+ ///
+ /// + /// + /// Tables: Internals + /// + /// + /// Layout columns for the frame. This is in essence the followup to BeginTable() and this is our largest function. + /// Runs on the first call to TableNextRow(), to give a chance for TableSetupColumn() and other TableSetupXXXXX() functions to be called first. + /// FIXME-TABLE: Our width (and therefore our WorkRect) will be minimal in the first frame for _WidthAuto columns. + /// Increase feedback side-effect with widgets relying on WorkRect.Max.x... Maybe provide a default distribution for _WidthAuto columns? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableUpdateLayout_internal(ImGuiTable* table); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TeleportMousePos_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TeleportMousePos_internal.gen.cs new file mode 100644 index 0000000..895766f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TeleportMousePos_internal.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3563 + /// , + /// imgui.cpp:10381 + ///
void TeleportMousePos(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// This is called TeleportMousePos() and not SetMousePos() to emphasis that setting MousePosPrev will effectively clear mouse delta as well. + /// It is expected you only call this if (io.BackendFlags & ImGuiBackendFlags_HasSetMousePos) is set and supported by backend. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TeleportMousePos_internal(float2* pos); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TempInputIsActive_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TempInputIsActive_internal.gen.cs new file mode 100644 index 0000000..3eb356f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TempInputIsActive_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3898 + ///
inline bool TempInputIsActive(ImGuiID id) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TempInputIsActive_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TempInputScalar_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TempInputScalar_internal.gen.cs new file mode 100644 index 0000000..25f4457 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TempInputScalar_internal.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3897 + /// , + /// imgui_widgets.cpp:3695 + ///
+ /// bool TempInputScalar(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* p_data, const char* format, const void* p_clamp_min = NULL, const void* p_clamp_max = NULL) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Note that Drag/Slider functions are only forwarding the min/max values clamping values if the ImGuiSliderFlags_AlwaysClamp flag is set! + /// This is intended: this way we allow CTRL+Click manual input to set a value out of bounds, for maximum flexibility. + /// However this may not be ideal for all uses, as some user code may break on out of bound values. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TempInputScalar_internal( + floatRect* bb, + ImGuiID id, + byte* label, + ImGuiDataType data_type, + void* p_data, + byte* format, + void* p_clamp_min, + void* p_clamp_max + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TempInputText_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TempInputText_internal.gen.cs new file mode 100644 index 0000000..8f9d170 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TempInputText_internal.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3896 + /// , + /// imgui_widgets.cpp:3671 + ///
+ /// bool TempInputText(const ImRect& bb, ImGuiID id, const char* label, char* buf, int buf_size, ImGuiInputTextFlags flags) + ///
+ ///
+ /// + /// + /// InputText + /// + /// + /// Create text input in place of another active widget (e.g. used when doing a CTRL+Click on drag/slider widgets) + /// FIXME: Facilitate using this in variety of other situations. + /// FIXME: Among other things, setting ImGuiItemFlags_AllowDuplicateId in LastItemData is currently correct but + /// the expected relationship between TempInputXXX functions and LastItemData is a little fishy. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TempInputText_internal( + floatRect* bb, + ImGuiID id, + byte* label, + byte* buf, + int buf_size, + ImGuiInputTextFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TestKeyOwner_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TestKeyOwner_internal.gen.cs new file mode 100644 index 0000000..bbfa812 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TestKeyOwner_internal.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Test that key is either not owned, either owned by 'owner_id' + /// + /// + /// C++: + /// imgui_internal.h:3582 + /// , + /// imgui.cpp:10981 + ///
bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Low-Level: Key/Input Ownership + /// - The idea is that instead of "eating" a given input, we can link to an owner id. + /// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead). + /// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0). + /// - Input ownership is automatically released on the frame after a key is released. Therefore: + /// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case). + /// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover). + /// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state. + /// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step. + /// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved. + /// + /// + /// TestKeyOwner(..., ID) : (owner == None || owner == ID) + /// TestKeyOwner(..., None) : (owner == None) + /// TestKeyOwner(..., Any) : no owner test + /// All paths are also testing for key not being locked, for the rare cases that key have been locked with using ImGuiInputFlags_LockXXX flags. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TestKeyOwner_internal(ImGuiKey key, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TestShortcutRouting_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TestShortcutRouting_internal.gen.cs new file mode 100644 index 0000000..76cbc8d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TestShortcutRouting_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3616 + /// , + /// imgui.cpp:10161 + ///
bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id) + ///
+ ///
+ /// + /// + /// Shortcut Testing & Routing + /// - Set Shortcut() and SetNextItemShortcut() in imgui.h + /// - When a policy (except for ImGuiInputFlags_RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), + /// allowing the system to decide where to route the input among other route-aware calls. + /// (* using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key) and bypassing route registration and check) + /// - When using one of the routing option: + /// - The default route is ImGuiInputFlags_RouteFocused (accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.) + /// - Routes are requested given a chord (key + modifiers) and a routing policy. + /// - Routes are resolved during NewFrame(): if keyboard modifiers are matching current ones: SetKeyOwner() is called + route is granted for the frame. + /// - Each route may be granted to a single owner. When multiple requests are made we have policies to select the winning route (e.g. deep most window). + /// - Multiple read sites may use the same owner id can all access the granted route. + /// - When owner_id is 0 we use the current Focus Scope ID as a owner ID in order to identify our location. + /// - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute() + /// e.g. if you have a tool window associated to a document, and you want document shortcuts to run when the tool is focused. + /// + /// + /// Currently unused by core (but used by tests) + /// Note: this cannot be turned into GetShortcutRouting() because we do the owner_id->routing_id translation, name would be more misleading. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TestShortcutRouting_internal(ImGuiKeyChord key_chord, ImGuiID owner_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TextAligned_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TextAligned_internal.gen.cs new file mode 100644 index 0000000..b81fc55 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TextAligned_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// FIXME-WIP: Works but API is likely to be reworked. This is designed for 1 item on the line. (#7024) + /// + /// + /// C++: + /// imgui_internal.h:3837 + /// , + /// imgui_widgets.cpp:342 + ///
void TextAligned(float align_x, float size_x, const char* fmt, ...) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextAligned_internal(float align_x, float size_x, byte* fmt); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TextEx_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TextEx_internal.gen.cs new file mode 100644 index 0000000..7a4cda9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TextEx_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3836 + /// , + /// imgui_widgets.cpp:160 + ///
void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextEx_internal(byte* text, byte* text_end, ImGuiTextFlags flags); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TranslateWindowsInViewport_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TranslateWindowsInViewport_internal.gen.cs new file mode 100644 index 0000000..67bf351 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TranslateWindowsInViewport_internal.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3397 + /// , + /// imgui.cpp:16284 + ///
+ /// void TranslateWindowsInViewport(ImGuiViewportP* viewport, const ImVec2& old_pos, const ImVec2& new_pos, const ImVec2& old_size, const ImVec2& new_size) + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + /// Translate Dear ImGui windows when a Host Viewport has been moved + /// (This additionally keeps windows at the same place when ImGuiConfigFlags_ViewportsEnable is toggled!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TranslateWindowsInViewport_internal( + ImGuiViewportP* viewport, + float2* old_pos, + float2* new_pos, + float2* old_size, + float2* new_size + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeBehavior_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeBehavior_internal.gen.cs new file mode 100644 index 0000000..e984632 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeBehavior_internal.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3866 + /// , + /// imgui_widgets.cpp:6644 + ///
+ /// bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + /// When using public API, currently 'id == storage_id' is always true, but we separate the values to + /// facilitate advanced user code doing storage queries outside of UI loop. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNodeBehavior_internal( + ImGuiID id, + ImGuiTreeNodeFlags flags, + byte* label, + byte* label_end + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToChildNode_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToChildNode_internal.gen.cs new file mode 100644 index 0000000..3cfa0aa --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToChildNode_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3867 + /// , + /// imgui_widgets.cpp:6927 + ///
void TreeNodeDrawLineToChildNode(const ImVec2& target_pos) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + /// Draw horizontal line from our parent node + /// This is only called for visible child nodes so we are not too fussy anymore about performances + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreeNodeDrawLineToChildNode_internal(float2* target_pos); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToTreePop_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToTreePop_internal.gen.cs new file mode 100644 index 0000000..aa6911f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeDrawLineToTreePop_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3868 + /// , + /// imgui_widgets.cpp:6957 + ///
void TreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + /// Draw vertical line of the hierarchy + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreeNodeDrawLineToTreePop_internal(ImGuiTreeNodeStackData* data); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeGetOpen_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeGetOpen_internal.gen.cs new file mode 100644 index 0000000..1308f60 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeGetOpen_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3870 + /// , + /// imgui_widgets.cpp:6559 + ///
bool TreeNodeGetOpen(ImGuiID storage_id) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNodeGetOpen_internal(ImGuiID storage_id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeSetOpen_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeSetOpen_internal.gen.cs new file mode 100644 index 0000000..3eb6508 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeSetOpen_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3871 + /// , + /// imgui_widgets.cpp:6566 + ///
void TreeNodeSetOpen(ImGuiID storage_id, bool open) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreeNodeSetOpen_internal(ImGuiID storage_id, Bool8 open); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeUpdateNextOpen_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeUpdateNextOpen_internal.gen.cs new file mode 100644 index 0000000..55b6341 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreeNodeUpdateNextOpen_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging. + /// + /// + /// C++: + /// imgui_internal.h:3872 + /// , + /// imgui_widgets.cpp:6573 + ///
bool TreeNodeUpdateNextOpen(ImGuiID storage_id, ImGuiTreeNodeFlags flags) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNodeUpdateNextOpen_internal( + ImGuiID storage_id, + ImGuiTreeNodeFlags flags + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TreePushOverrideID_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TreePushOverrideID_internal.gen.cs new file mode 100644 index 0000000..7be28a2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TreePushOverrideID_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3869 + /// , + /// imgui_widgets.cpp:6999 + ///
void TreePushOverrideID(ImGuiID id) + ///
+ ///
+ /// + /// + /// Widgets: Tree Nodes + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreePushOverrideID_internal(ImGuiID id); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindBestLeadingMatch_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindBestLeadingMatch_internal.gen.cs new file mode 100644 index 0000000..fec6d7d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindBestLeadingMatch_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3699 + /// , + /// imgui_widgets.cpp:7479 + ///
+ /// int TypingSelectFindBestLeadingMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TypingSelectFindBestLeadingMatch_internal( + ImGuiTypingSelectRequest* req, + int items_count, + nint get_item_name_func, + void* user_data + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindMatch_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindMatch_internal.gen.cs new file mode 100644 index 0000000..a239785 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindMatch_internal.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3697 + /// , + /// imgui_widgets.cpp:7439 + ///
+ /// int TypingSelectFindMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data, int nav_item_idx) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + /// Default handler for finding a result for typing-select. You may implement your own. + /// You might want to display a tooltip to visualize the current request SearchBuffer + /// When SingleCharMode is set: + /// - it is better to NOT display a tooltip of other on-screen display indicator. + /// - the index of the currently focused item is required. + /// if your SetNextItemSelectionUserData() values are indices, you can obtain it from ImGuiMultiSelectIO::NavIdItem, otherwise from g.NavLastValidSelectionUserData. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TypingSelectFindMatch_internal( + ImGuiTypingSelectRequest* req, + int items_count, + nint get_item_name_func, + void* user_data, + int nav_item_idx + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindNextSingleCharMatch_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindNextSingleCharMatch_internal.gen.cs new file mode 100644 index 0000000..b8127bd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/TypingSelectFindNextSingleCharMatch_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3698 + /// , + /// imgui_widgets.cpp:7454 + ///
+ /// int TypingSelectFindNextSingleCharMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data, int nav_item_idx) + ///
+ ///
+ /// + /// + /// Typing-Select API + /// (provide Windows Explorer style "select items by typing partial name" + "cycle through items by typing same letter" feature) + /// (this is currently not documented nor used by main library, but should work. See "widgets_typingselect" in imgui_test_suite for usage code. Please let us know if you use this!) + /// + /// + /// Special handling when a single character is repeated: perform search on a single letter and goes to + /// next. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TypingSelectFindNextSingleCharMatch_internal( + ImGuiTypingSelectRequest* req, + int items_count, + nint get_item_name_func, + void* user_data, + int nav_item_idx + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UnregisterFontAtlas_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UnregisterFontAtlas_internal.gen.cs new file mode 100644 index 0000000..8ae77bf --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UnregisterFontAtlas_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3365 + /// , + /// imgui.cpp:9403 + ///
void UnregisterFontAtlas(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UnregisterFontAtlas_internal(ImFontAtlas* atlas); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UnregisterUserTexture_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UnregisterUserTexture_internal.gen.cs new file mode 100644 index 0000000..148a947 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UnregisterUserTexture_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3363 + /// , + /// imgui.cpp:9385 + ///
void UnregisterUserTexture(ImTextureData* tex) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UnregisterUserTexture_internal(ImTextureData* tex); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateCurrentFontSize_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateCurrentFontSize_internal.gen.cs new file mode 100644 index 0000000..da61b03 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateCurrentFontSize_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3367 + /// , + /// imgui.cpp:9442 + ///
void UpdateCurrentFontSize(float restore_font_size_after_scaling) + ///
+ ///
+ /// + /// + /// Fonts, drawing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateCurrentFontSize_internal(float restore_font_size_after_scaling); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateHoveredWindowAndCaptureFlags_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateHoveredWindowAndCaptureFlags_internal.gen.cs new file mode 100644 index 0000000..433bbdb --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateHoveredWindowAndCaptureFlags_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3383 + /// , + /// imgui.cpp:5385 + ///
void UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we + /// want to dispatch inputs to the right target (imgui vs imgui+app) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateHoveredWindowAndCaptureFlags_internal(float2* mouse_pos); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateInputEvents_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateInputEvents_internal.gen.cs new file mode 100644 index 0000000..8718f4b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateInputEvents_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3382 + /// , + /// imgui.cpp:10821 + ///
void UpdateInputEvents(bool trickle_fast_inputs) + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Process input queue + /// We always call this with the value of 'bool g.IO.ConfigInputTrickleEventQueue'. + /// - trickle_fast_inputs = false : process all events, turn into flattened input state (e.g. successive down/up/down/up will be lost) + /// - trickle_fast_inputs = true : process as many events as possible (successive down/up/down/up will be trickled over several frames so nothing is lost) (new feature in 1.87) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateInputEvents_internal(Bool8 trickle_fast_inputs); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowEndFrame_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowEndFrame_internal.gen.cs new file mode 100644 index 0000000..b14bc21 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowEndFrame_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3389 + /// , + /// imgui.cpp:5299 + ///
void UpdateMouseMovingWindowEndFrame() + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Initiate focusing and moving window when clicking on empty space or title bar. + /// Initiate focusing window when clicking on a disabled item. + /// Handle left-click and right-click focus. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateMouseMovingWindowEndFrame_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowNewFrame_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowNewFrame_internal.gen.cs new file mode 100644 index 0000000..c8df95e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateMouseMovingWindowNewFrame_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3388 + /// , + /// imgui.cpp:5251 + ///
void UpdateMouseMovingWindowNewFrame() + ///
+ ///
+ /// + /// + /// NewFrame + /// + /// + /// Handle mouse moving window + /// Note: moving window with the navigation keys (Square + d-pad / CTRL+TAB + Arrows) are processed in NavUpdateWindowing() + /// FIXME: We don't have strong guarantee that g.MovingWindow stay synced with g.ActiveId == g.MovingWindow->MoveId. + /// This is currently enforced by the fact that BeginDragDropSource() is setting all g.ActiveIdUsingXXXX flags to inhibit navigation inputs, + /// but if we should more thoroughly test cases where g.ActiveId or g.MovingWindow gets changed and not the other. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateMouseMovingWindowNewFrame_internal(); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowParentAndRootLinks_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowParentAndRootLinks_internal.gen.cs new file mode 100644 index 0000000..7384bb7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowParentAndRootLinks_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3330 + /// , + /// imgui.cpp:7506 + ///
+ /// void UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateWindowParentAndRootLinks_internal( + ImGuiWindow* window, + ImGuiWindowFlags flags, + ImGuiWindow* parent_window + ); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowSkipRefresh_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowSkipRefresh_internal.gen.cs new file mode 100644 index 0000000..51e12f7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/UpdateWindowSkipRefresh_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3331 + /// , + /// imgui.cpp:7529 + ///
void UpdateWindowSkipRefresh(ImGuiWindow* window) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + /// [EXPERIMENTAL] Called by Begin(). NextWindowData is valid at this point. + /// This is designed as a toy/test-bed for + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdateWindowSkipRefresh_internal(ImGuiWindow* window); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/WindowPosAbsToRel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/WindowPosAbsToRel_internal.gen.cs new file mode 100644 index 0000000..862ba4d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/WindowPosAbsToRel_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3345 + ///
inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 WindowPosAbsToRel_internal(ImGuiWindow* window, float2* p); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/WindowPosRelToAbs_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/WindowPosRelToAbs_internal.gen.cs new file mode 100644 index 0000000..66ec090 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/WindowPosRelToAbs_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3346 + ///
inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 WindowPosRelToAbs_internal(ImGuiWindow* window, float2* p); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/WindowRectAbsToRel_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/WindowRectAbsToRel_internal.gen.cs new file mode 100644 index 0000000..3bd0558 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/WindowRectAbsToRel_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3343 + ///
inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect WindowRectAbsToRel_internal(ImGuiWindow* window, floatRect* r); + } +} diff --git a/Brutal.ImGui/Generated-Internal/PInvoke/WindowRectRelToAbs_internal.gen.cs b/Brutal.ImGui/Generated-Internal/PInvoke/WindowRectRelToAbs_internal.gen.cs new file mode 100644 index 0000000..4bff486 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/PInvoke/WindowRectRelToAbs_internal.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui_internal.h:3344 + ///
inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) + ///
+ ///
+ /// + /// + /// Windows + /// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window) + /// If this ever crashes because g.CurrentWindow is NULL, it means that either: + /// - ImGui::NewFrame() has never been called, which is illegal. + /// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial floatRect WindowRectRelToAbs_internal(ImGuiWindow* window, floatRect* r); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImBitVector.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImBitVector.gen.cs new file mode 100644 index 0000000..bb0d06a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImBitVector.gen.cs @@ -0,0 +1,87 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Store 1-bit per value + /// + /// + /// C++: + /// imgui_internal.h:137 + ///
struct ImBitVector + ///
+ ///
+ /// + /// + /// Utilities + /// (other types which are not forwarded declared are: ImBitArray<>, ImSpan<>, ImSpanAllocator<>, ImStableVector<>, ImPool<>, ImChunkStream<>) + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImBitVector + { + /// + /// + /// C++: + /// imgui_internal.h:649 + ///
ImVector<ImU32> Storage + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + [FieldOffset(0)] + public ImVector Storage; + } + + /// + /// + /// Store 1-bit per value + /// + /// + /// C++: + /// imgui_internal.h:137 + ///
struct ImBitVector + ///
+ ///
+ /// + /// + /// Utilities + /// (other types which are not forwarded declared are: ImBitArray<>, ImSpan<>, ImSpanAllocator<>, ImStableVector<>, ImPool<>, ImChunkStream<>) + /// + /// + public unsafe partial struct ImBitVectorPtr(ImBitVector* ptr) : INullable + { + private ImBitVector* _ptr = ptr; + public ImBitVector* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImBitVectorPtr(ImBitVector* ptr) => new(ptr); + + public static implicit operator ImBitVector*(ImBitVectorPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:649 + ///
ImVector<ImU32> Storage + ///
+ ///
+ /// + /// + /// Helper: ImBitVector + /// Store 1-bit per value. + /// + /// + public ref ImVector Storage => ref Unsafe.AsRef>(&_ptr->Storage); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasPostProcessData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasPostProcessData.gen.cs new file mode 100644 index 0000000..2806521 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasPostProcessData.gen.cs @@ -0,0 +1,345 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Data available to potential texture post-processing functions + /// + /// + /// C++: + /// imgui_internal.h:145 + ///
struct ImFontAtlasPostProcessData + ///
+ ///
+ /// + /// + /// ImDrawList/ImFontAtlas + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct ImFontAtlasPostProcessData + { + /// + /// + /// C++: + /// imgui_internal.h:4054 + ///
ImFontAtlas* FontAtlas + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + [FieldOffset(0)] + public ImFontAtlasPtr FontAtlas; + + /// + /// + /// C++: + /// imgui_internal.h:4055 + ///
ImFont* Font + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + [FieldOffset(8)] + public ImFontPtr Font; + + /// + /// + /// C++: + /// imgui_internal.h:4056 + ///
ImFontConfig* FontSrc + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + [FieldOffset(16)] + public ImFontConfigPtr FontSrc; + + /// + /// + /// C++: + /// imgui_internal.h:4057 + ///
ImFontBaked* FontBaked + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + [FieldOffset(24)] + public ImFontBakedPtr FontBaked; + + /// + /// + /// C++: + /// imgui_internal.h:4058 + ///
ImFontGlyph* Glyph + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + [FieldOffset(32)] + public ImFontGlyphPtr Glyph; + + /// + /// + /// C++: + /// imgui_internal.h:4061 + ///
void* Pixels + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + [FieldOffset(40)] + public nint Pixels; + + /// + /// + /// C++: + /// imgui_internal.h:4062 + ///
ImTextureFormat Format + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + [FieldOffset(48)] + public ImTextureFormat Format; + + /// + /// + /// C++: + /// imgui_internal.h:4063 + ///
int Pitch + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + [FieldOffset(52)] + public int Pitch; + + /// + /// + /// C++: + /// imgui_internal.h:4064 + ///
int Width + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + [FieldOffset(56)] + public int Width; + + /// + /// + /// C++: + /// imgui_internal.h:4065 + ///
int Height + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + [FieldOffset(60)] + public int Height; + } + + /// + /// + /// Data available to potential texture post-processing functions + /// + /// + /// C++: + /// imgui_internal.h:145 + ///
struct ImFontAtlasPostProcessData + ///
+ ///
+ /// + /// + /// ImDrawList/ImFontAtlas + /// + /// + public unsafe partial struct ImFontAtlasPostProcessDataPtr(ImFontAtlasPostProcessData* ptr) : INullable + { + private ImFontAtlasPostProcessData* _ptr = ptr; + public ImFontAtlasPostProcessData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontAtlasPostProcessDataPtr(ImFontAtlasPostProcessData* ptr) => new(ptr); + + public static implicit operator ImFontAtlasPostProcessData*(ImFontAtlasPostProcessDataPtr wrapper) => + wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:4054 + ///
ImFontAtlas* FontAtlas + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + public ref ImFontAtlasPtr FontAtlas => ref Unsafe.AsRef(&_ptr->FontAtlas); + + /// + /// + /// C++: + /// imgui_internal.h:4055 + ///
ImFont* Font + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + public ref ImFontPtr Font => ref Unsafe.AsRef(&_ptr->Font); + + /// + /// + /// C++: + /// imgui_internal.h:4056 + ///
ImFontConfig* FontSrc + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + public ref ImFontConfigPtr FontSrc => ref Unsafe.AsRef(&_ptr->FontSrc); + + /// + /// + /// C++: + /// imgui_internal.h:4057 + ///
ImFontBaked* FontBaked + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + public ref ImFontBakedPtr FontBaked => ref Unsafe.AsRef(&_ptr->FontBaked); + + /// + /// + /// C++: + /// imgui_internal.h:4058 + ///
ImFontGlyph* Glyph + ///
+ ///
+ /// + /// + /// Data available to potential texture post-processing functions + /// + /// + public ref ImFontGlyphPtr Glyph => ref Unsafe.AsRef(&_ptr->Glyph); + + /// + /// + /// C++: + /// imgui_internal.h:4061 + ///
void* Pixels + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + public ref nint Pixels => ref Unsafe.AsRef(&_ptr->Pixels); + + /// + /// + /// C++: + /// imgui_internal.h:4062 + ///
ImTextureFormat Format + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + public ref ImTextureFormat Format => ref Unsafe.AsRef(&_ptr->Format); + + /// + /// + /// C++: + /// imgui_internal.h:4063 + ///
int Pitch + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + public ref int Pitch => ref Unsafe.AsRef(&_ptr->Pitch); + + /// + /// + /// C++: + /// imgui_internal.h:4064 + ///
int Width + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + public ref int Width => ref Unsafe.AsRef(&_ptr->Width); + + /// + /// + /// C++: + /// imgui_internal.h:4065 + ///
int Height + ///
+ ///
+ /// + /// + /// Pixel data + /// + /// + public ref int Height => ref Unsafe.AsRef(&_ptr->Height); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasRectEntry.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasRectEntry.gen.cs new file mode 100644 index 0000000..b7b76c2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasRectEntry.gen.cs @@ -0,0 +1,179 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Packed rectangle lookup entry + /// + /// + /// C++: + /// imgui_internal.h:146 + ///
struct ImFontAtlasRectEntry + ///
+ ///
+ /// + /// + /// ImDrawList/ImFontAtlas + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct ImFontAtlasRectEntry + { + /// + /// + /// When Used: ImFontAtlasRectId -> into Rects[]. When unused: index to next unused RectsIndex[] slot to + /// consume free-list. + /// + /// + /// C++: + /// imgui_internal.h:4046 + ///
int TargetIndex : 20 + ///
+ ///
+ /// + /// + /// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles) + /// User are returned ImFontAtlasRectId values which are meant to be persistent. + /// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId. + /// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code. + /// Having this also makes it easier to e.g. sort rectangles during repack. + /// + /// + [FieldOffset(0)] + public int TargetIndex; + + /// + /// + /// Increased each time the entry is reused for a new rectangle. + /// + /// + /// C++: + /// imgui_internal.h:4047 + ///
int Generation : 10 + ///
+ ///
+ /// + /// + /// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles) + /// User are returned ImFontAtlasRectId values which are meant to be persistent. + /// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId. + /// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code. + /// Having this also makes it easier to e.g. sort rectangles during repack. + /// + /// + [FieldOffset(2)] + public int Generation; + + /// + /// + /// C++: + /// imgui_internal.h:4048 + ///
unsigned int IsUsed : 1 + ///
+ ///
+ /// + /// + /// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles) + /// User are returned ImFontAtlasRectId values which are meant to be persistent. + /// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId. + /// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code. + /// Having this also makes it easier to e.g. sort rectangles during repack. + /// + /// + [FieldOffset(3)] + public uint IsUsed; + } + + /// + /// + /// Packed rectangle lookup entry + /// + /// + /// C++: + /// imgui_internal.h:146 + ///
struct ImFontAtlasRectEntry + ///
+ ///
+ /// + /// + /// ImDrawList/ImFontAtlas + /// + /// + public unsafe partial struct ImFontAtlasRectEntryPtr(ImFontAtlasRectEntry* ptr) : INullable + { + private ImFontAtlasRectEntry* _ptr = ptr; + public ImFontAtlasRectEntry* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontAtlasRectEntryPtr(ImFontAtlasRectEntry* ptr) => new(ptr); + + public static implicit operator ImFontAtlasRectEntry*(ImFontAtlasRectEntryPtr wrapper) => wrapper.Ptr; + + /// + /// + /// When Used: ImFontAtlasRectId -> into Rects[]. When unused: index to next unused RectsIndex[] slot to + /// consume free-list. + /// + /// + /// C++: + /// imgui_internal.h:4046 + ///
int TargetIndex : 20 + ///
+ ///
+ /// + /// + /// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles) + /// User are returned ImFontAtlasRectId values which are meant to be persistent. + /// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId. + /// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code. + /// Having this also makes it easier to e.g. sort rectangles during repack. + /// + /// + public ref int TargetIndex => ref Unsafe.AsRef(&_ptr->TargetIndex); + + /// + /// + /// Increased each time the entry is reused for a new rectangle. + /// + /// + /// C++: + /// imgui_internal.h:4047 + ///
int Generation : 10 + ///
+ ///
+ /// + /// + /// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles) + /// User are returned ImFontAtlasRectId values which are meant to be persistent. + /// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId. + /// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code. + /// Having this also makes it easier to e.g. sort rectangles during repack. + /// + /// + public ref int Generation => ref Unsafe.AsRef(&_ptr->Generation); + + /// + /// + /// C++: + /// imgui_internal.h:4048 + ///
unsigned int IsUsed : 1 + ///
+ ///
+ /// + /// + /// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles) + /// User are returned ImFontAtlasRectId values which are meant to be persistent. + /// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId. + /// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code. + /// Having this also makes it easier to e.g. sort rectangles during repack. + /// + /// + public ref uint IsUsed => ref Unsafe.AsRef(&_ptr->IsUsed); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImFontStackData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImFontStackData.gen.cs new file mode 100644 index 0000000..37e5948 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImFontStackData.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:883 + ///
struct ImFontStackData + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImFontStackData + { + /// + /// + /// C++: + /// imgui_internal.h:885 + ///
ImFont* Font + ///
+ ///
+ [FieldOffset(0)] + public ImFontPtr Font; + + /// + /// + /// ~~ style.FontSizeBase + /// + /// + /// C++: + /// imgui_internal.h:886 + ///
float FontSizeBeforeScaling + ///
+ ///
+ [FieldOffset(8)] + public float FontSizeBeforeScaling; + + /// + /// + /// ~~ g.FontSize + /// + /// + /// C++: + /// imgui_internal.h:887 + ///
float FontSizeAfterScaling + ///
+ ///
+ [FieldOffset(12)] + public float FontSizeAfterScaling; + } + + /// + /// + /// C++: + /// imgui_internal.h:883 + ///
struct ImFontStackData + ///
+ ///
+ public unsafe partial struct ImFontStackDataPtr(ImFontStackData* ptr) : INullable + { + private ImFontStackData* _ptr = ptr; + public ImFontStackData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontStackDataPtr(ImFontStackData* ptr) => new(ptr); + + public static implicit operator ImFontStackData*(ImFontStackDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:885 + ///
ImFont* Font + ///
+ ///
+ public ref ImFontPtr Font => ref Unsafe.AsRef(&_ptr->Font); + + /// + /// + /// ~~ style.FontSizeBase + /// + /// + /// C++: + /// imgui_internal.h:886 + ///
float FontSizeBeforeScaling + ///
+ ///
+ public ref float FontSizeBeforeScaling => ref Unsafe.AsRef(&_ptr->FontSizeBeforeScaling); + + /// + /// + /// ~~ g.FontSize + /// + /// + /// C++: + /// imgui_internal.h:887 + ///
float FontSizeAfterScaling + ///
+ ///
+ public ref float FontSizeAfterScaling => ref Unsafe.AsRef(&_ptr->FontSizeAfterScaling); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiBoxSelectState.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiBoxSelectState.gen.cs new file mode 100644 index 0000000..205fb45 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiBoxSelectState.gen.cs @@ -0,0 +1,541 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Box-selection state (currently used by multi-selection, could potentially be used by others) + /// + /// + /// C++: + /// imgui_internal.h:149 + ///
struct ImGuiBoxSelectState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public partial struct ImGuiBoxSelectState + { + /// + /// + /// C++: + /// imgui_internal.h:1862 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:1863 + ///
bool IsActive + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(4)] + public Bool8 IsActive; + + /// + /// + /// C++: + /// imgui_internal.h:1864 + ///
bool IsStarting + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(5)] + public Bool8 IsStarting; + + /// + /// + /// Starting click was not from an item. + /// + /// + /// C++: + /// imgui_internal.h:1865 + ///
bool IsStartedFromVoid + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(6)] + public Bool8 IsStartedFromVoid; + + /// + /// + /// C++: + /// imgui_internal.h:1866 + ///
bool IsStartedSetNavIdOnce + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(7)] + public Bool8 IsStartedSetNavIdOnce; + + /// + /// + /// C++: + /// imgui_internal.h:1867 + ///
bool RequestClear + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(8)] + public Bool8 RequestClear; + + /// + /// + /// Latched key-mods for box-select logic. + /// + /// + /// C++: + /// imgui_internal.h:1868 + ///
ImGuiKeyChord KeyMods : 16 + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(12)] + public ImGuiKeyChord KeyMods; + + /// + /// + /// Start position in window-contents relative space (to support scrolling) + /// + /// + /// C++: + /// imgui_internal.h:1869 + ///
ImVec2 StartPosRel + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(16)] + public float2 StartPosRel; + + /// + /// + /// End position in window-contents relative space + /// + /// + /// C++: + /// imgui_internal.h:1870 + ///
ImVec2 EndPosRel + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(24)] + public float2 EndPosRel; + + /// + /// + /// Scrolling accumulator (to behave at high-frame spaces) + /// + /// + /// C++: + /// imgui_internal.h:1871 + ///
ImVec2 ScrollAccum + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(32)] + public float2 ScrollAccum; + + /// + /// + /// C++: + /// imgui_internal.h:1872 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + [FieldOffset(40)] + public ImGuiWindowPtr Window; + + /// + /// + /// (Temp/Transient, here in hot area). Set/cleared by the BeginMultiSelect()/EndMultiSelect() owning active + /// box-select. + /// + /// + /// C++: + /// imgui_internal.h:1875 + ///
bool UnclipMode + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + [FieldOffset(48)] + public Bool8 UnclipMode; + + /// + /// + /// Rectangle where ItemAdd() clipping may be temporarily disabled. Need support by multi-select supporting + /// widgets. + /// + /// + /// C++: + /// imgui_internal.h:1876 + ///
ImRect UnclipRect + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + [FieldOffset(52)] + public floatRect UnclipRect; + + /// + /// + /// Selection rectangle in absolute coordinates (derived every frame from BoxSelectStartPosRel and MousePos) + /// + /// + /// C++: + /// imgui_internal.h:1877 + ///
ImRect BoxSelectRectPrev + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + [FieldOffset(68)] + public floatRect BoxSelectRectPrev; + + /// + /// + /// C++: + /// imgui_internal.h:1878 + ///
ImRect BoxSelectRectCurr + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + [FieldOffset(84)] + public floatRect BoxSelectRectCurr; + } + + /// + /// + /// Box-selection state (currently used by multi-selection, could potentially be used by others) + /// + /// + /// C++: + /// imgui_internal.h:149 + ///
struct ImGuiBoxSelectState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiBoxSelectStatePtr(ImGuiBoxSelectState* ptr) : INullable + { + private ImGuiBoxSelectState* _ptr = ptr; + public ImGuiBoxSelectState* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiBoxSelectStatePtr(ImGuiBoxSelectState* ptr) => new(ptr); + + public static implicit operator ImGuiBoxSelectState*(ImGuiBoxSelectStatePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1862 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:1863 + ///
bool IsActive + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref bool IsActive => ref Unsafe.AsRef(&_ptr->IsActive); + + /// + /// + /// C++: + /// imgui_internal.h:1864 + ///
bool IsStarting + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref bool IsStarting => ref Unsafe.AsRef(&_ptr->IsStarting); + + /// + /// + /// Starting click was not from an item. + /// + /// + /// C++: + /// imgui_internal.h:1865 + ///
bool IsStartedFromVoid + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref bool IsStartedFromVoid => ref Unsafe.AsRef(&_ptr->IsStartedFromVoid); + + /// + /// + /// C++: + /// imgui_internal.h:1866 + ///
bool IsStartedSetNavIdOnce + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref bool IsStartedSetNavIdOnce => ref Unsafe.AsRef(&_ptr->IsStartedSetNavIdOnce); + + /// + /// + /// C++: + /// imgui_internal.h:1867 + ///
bool RequestClear + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref bool RequestClear => ref Unsafe.AsRef(&_ptr->RequestClear); + + /// + /// + /// Latched key-mods for box-select logic. + /// + /// + /// C++: + /// imgui_internal.h:1868 + ///
ImGuiKeyChord KeyMods : 16 + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref ImGuiKeyChord KeyMods => ref Unsafe.AsRef(&_ptr->KeyMods); + + /// + /// + /// Start position in window-contents relative space (to support scrolling) + /// + /// + /// C++: + /// imgui_internal.h:1869 + ///
ImVec2 StartPosRel + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref float2 StartPosRel => ref Unsafe.AsRef(&_ptr->StartPosRel); + + /// + /// + /// End position in window-contents relative space + /// + /// + /// C++: + /// imgui_internal.h:1870 + ///
ImVec2 EndPosRel + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref float2 EndPosRel => ref Unsafe.AsRef(&_ptr->EndPosRel); + + /// + /// + /// Scrolling accumulator (to behave at high-frame spaces) + /// + /// + /// C++: + /// imgui_internal.h:1871 + ///
ImVec2 ScrollAccum + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref float2 ScrollAccum => ref Unsafe.AsRef(&_ptr->ScrollAccum); + + /// + /// + /// C++: + /// imgui_internal.h:1872 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Active box-selection data (persistent, 1 active at a time) + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// (Temp/Transient, here in hot area). Set/cleared by the BeginMultiSelect()/EndMultiSelect() owning active + /// box-select. + /// + /// + /// C++: + /// imgui_internal.h:1875 + ///
bool UnclipMode + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + public ref bool UnclipMode => ref Unsafe.AsRef(&_ptr->UnclipMode); + + /// + /// + /// Rectangle where ItemAdd() clipping may be temporarily disabled. Need support by multi-select supporting + /// widgets. + /// + /// + /// C++: + /// imgui_internal.h:1876 + ///
ImRect UnclipRect + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + public ref floatRect UnclipRect => ref Unsafe.AsRef(&_ptr->UnclipRect); + + /// + /// + /// Selection rectangle in absolute coordinates (derived every frame from BoxSelectStartPosRel and MousePos) + /// + /// + /// C++: + /// imgui_internal.h:1877 + ///
ImRect BoxSelectRectPrev + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + public ref floatRect BoxSelectRectPrev => ref Unsafe.AsRef(&_ptr->BoxSelectRectPrev); + + /// + /// + /// C++: + /// imgui_internal.h:1878 + ///
ImRect BoxSelectRectCurr + ///
+ ///
+ /// + /// + /// Temporary/Transient data + /// + /// + public ref floatRect BoxSelectRectCurr => ref Unsafe.AsRef(&_ptr->BoxSelectRectCurr); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiColorMod.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiColorMod.gen.cs new file mode 100644 index 0000000..f439aea --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiColorMod.gen.cs @@ -0,0 +1,112 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Stacked color modifier, backup of modified data so we can restore it + /// + /// + /// C++: + /// imgui_internal.h:150 + ///
struct ImGuiColorMod + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct ImGuiColorMod + { + /// + /// + /// C++: + /// imgui_internal.h:905 + ///
ImGuiCol Col + ///
+ ///
+ /// + /// + /// Stacked color modifier, backup of modified data so we can restore it + /// + /// + [FieldOffset(0)] + public ImGuiCol Col; + + /// + /// + /// C++: + /// imgui_internal.h:906 + ///
ImVec4 BackupValue + ///
+ ///
+ /// + /// + /// Stacked color modifier, backup of modified data so we can restore it + /// + /// + [FieldOffset(4)] + public float4 BackupValue; + } + + /// + /// + /// Stacked color modifier, backup of modified data so we can restore it + /// + /// + /// C++: + /// imgui_internal.h:150 + ///
struct ImGuiColorMod + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiColorModPtr(ImGuiColorMod* ptr) : INullable + { + private ImGuiColorMod* _ptr = ptr; + public ImGuiColorMod* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiColorModPtr(ImGuiColorMod* ptr) => new(ptr); + + public static implicit operator ImGuiColorMod*(ImGuiColorModPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:905 + ///
ImGuiCol Col + ///
+ ///
+ /// + /// + /// Stacked color modifier, backup of modified data so we can restore it + /// + /// + public ref ImGuiCol Col => ref Unsafe.AsRef(&_ptr->Col); + + /// + /// + /// C++: + /// imgui_internal.h:906 + ///
ImVec4 BackupValue + ///
+ ///
+ /// + /// + /// Stacked color modifier, backup of modified data so we can restore it + /// + /// + public ref float4 BackupValue => ref Unsafe.AsRef(&_ptr->BackupValue); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiComboPreviewData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiComboPreviewData.gen.cs new file mode 100644 index 0000000..236f302 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiComboPreviewData.gen.cs @@ -0,0 +1,222 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1148 + ///
struct IMGUI_API ImGuiComboPreviewData + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct ImGuiComboPreviewData + { + /// + /// + /// C++: + /// imgui_internal.h:1150 + ///
ImRect PreviewRect + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [FieldOffset(0)] + public floatRect PreviewRect; + + /// + /// + /// C++: + /// imgui_internal.h:1151 + ///
ImVec2 BackupCursorPos + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [FieldOffset(16)] + public float2 BackupCursorPos; + + /// + /// + /// C++: + /// imgui_internal.h:1152 + ///
ImVec2 BackupCursorMaxPos + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [FieldOffset(24)] + public float2 BackupCursorMaxPos; + + /// + /// + /// C++: + /// imgui_internal.h:1153 + ///
ImVec2 BackupCursorPosPrevLine + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [FieldOffset(32)] + public float2 BackupCursorPosPrevLine; + + /// + /// + /// C++: + /// imgui_internal.h:1154 + ///
float BackupPrevLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [FieldOffset(40)] + public float BackupPrevLineTextBaseOffset; + + /// + /// + /// C++: + /// imgui_internal.h:1155 + ///
ImGuiLayoutType BackupLayout + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + [FieldOffset(44)] + public ImGuiLayoutType BackupLayout; + } + + /// + /// + /// C++: + /// imgui_internal.h:1148 + ///
struct IMGUI_API ImGuiComboPreviewData + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public unsafe partial struct ImGuiComboPreviewDataPtr(ImGuiComboPreviewData* ptr) : INullable + { + private ImGuiComboPreviewData* _ptr = ptr; + public ImGuiComboPreviewData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiComboPreviewDataPtr(ImGuiComboPreviewData* ptr) => new(ptr); + + public static implicit operator ImGuiComboPreviewData*(ImGuiComboPreviewDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1150 + ///
ImRect PreviewRect + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public ref floatRect PreviewRect => ref Unsafe.AsRef(&_ptr->PreviewRect); + + /// + /// + /// C++: + /// imgui_internal.h:1151 + ///
ImVec2 BackupCursorPos + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public ref float2 BackupCursorPos => ref Unsafe.AsRef(&_ptr->BackupCursorPos); + + /// + /// + /// C++: + /// imgui_internal.h:1152 + ///
ImVec2 BackupCursorMaxPos + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public ref float2 BackupCursorMaxPos => ref Unsafe.AsRef(&_ptr->BackupCursorMaxPos); + + /// + /// + /// C++: + /// imgui_internal.h:1153 + ///
ImVec2 BackupCursorPosPrevLine + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public ref float2 BackupCursorPosPrevLine => ref Unsafe.AsRef(&_ptr->BackupCursorPosPrevLine); + + /// + /// + /// C++: + /// imgui_internal.h:1154 + ///
float BackupPrevLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public ref float BackupPrevLineTextBaseOffset => ref Unsafe.AsRef(&_ptr->BackupPrevLineTextBaseOffset); + + /// + /// + /// C++: + /// imgui_internal.h:1155 + ///
ImGuiLayoutType BackupLayout + ///
+ ///
+ /// + /// + /// Storage data for BeginComboPreview()/EndComboPreview() + /// + /// + public ref ImGuiLayoutType BackupLayout => ref Unsafe.AsRef(&_ptr->BackupLayout); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiContextHook.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiContextHook.gen.cs new file mode 100644 index 0000000..eef62e4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiContextHook.gen.cs @@ -0,0 +1,155 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Hook for extensions like ImGuiTestEngine + /// + /// + /// C++: + /// imgui_internal.h:152 + ///
struct ImGuiContextHook + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImGuiContextHook + { + /// + /// + /// A unique ID assigned by AddContextHook() + /// + /// + /// C++: + /// imgui_internal.h:2319 + ///
ImGuiID HookId + ///
+ ///
+ [FieldOffset(0)] + public ImGuiID HookId; + + /// + /// + /// C++: + /// imgui_internal.h:2320 + ///
ImGuiContextHookType Type + ///
+ ///
+ [FieldOffset(4)] + public ImGuiContextHookType Type; + + /// + /// + /// C++: + /// imgui_internal.h:2321 + ///
ImGuiID Owner + ///
+ ///
+ [FieldOffset(8)] + public ImGuiID Owner; + + /// + /// + /// C++: + /// imgui_internal.h:2322 + ///
ImGuiContextHookCallback Callback + ///
+ ///
+ [FieldOffset(16)] + public nint Callback; + + /// + /// + /// C++: + /// imgui_internal.h:2323 + ///
void* UserData + ///
+ ///
+ [FieldOffset(24)] + public nint UserData; + } + + /// + /// + /// Hook for extensions like ImGuiTestEngine + /// + /// + /// C++: + /// imgui_internal.h:152 + ///
struct ImGuiContextHook + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiContextHookPtr(ImGuiContextHook* ptr) : INullable + { + private ImGuiContextHook* _ptr = ptr; + public ImGuiContextHook* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiContextHookPtr(ImGuiContextHook* ptr) => new(ptr); + + public static implicit operator ImGuiContextHook*(ImGuiContextHookPtr wrapper) => wrapper.Ptr; + + /// + /// + /// A unique ID assigned by AddContextHook() + /// + /// + /// C++: + /// imgui_internal.h:2319 + ///
ImGuiID HookId + ///
+ ///
+ public ref ImGuiID HookId => ref Unsafe.AsRef(&_ptr->HookId); + + /// + /// + /// C++: + /// imgui_internal.h:2320 + ///
ImGuiContextHookType Type + ///
+ ///
+ public ref ImGuiContextHookType Type => ref Unsafe.AsRef(&_ptr->Type); + + /// + /// + /// C++: + /// imgui_internal.h:2321 + ///
ImGuiID Owner + ///
+ ///
+ public ref ImGuiID Owner => ref Unsafe.AsRef(&_ptr->Owner); + + /// + /// + /// C++: + /// imgui_internal.h:2322 + ///
ImGuiContextHookCallback Callback + ///
+ ///
+ public ref nint Callback => ref Unsafe.AsRef(&_ptr->Callback); + + /// + /// + /// C++: + /// imgui_internal.h:2323 + ///
void* UserData + ///
+ ///
+ public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeInfo.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeInfo.gen.cs new file mode 100644 index 0000000..8718d04 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeInfo.gen.cs @@ -0,0 +1,194 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Type information associated to a ImGuiDataType enum + /// + /// + /// C++: + /// imgui_internal.h:153 + ///
struct ImGuiDataTypeInfo + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImGuiDataTypeInfo + { + /// + /// + /// Size in bytes + /// + /// + /// C++: + /// imgui_internal.h:931 + ///
size_t Size + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + [FieldOffset(0)] + public nuint Size; + + /// + /// + /// Short descriptive name for the type, for debugging + /// + /// + /// C++: + /// imgui_internal.h:932 + ///
const char* Name + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + [FieldOffset(8)] + public Ptr Name; + + /// + /// + /// Default printf format for the type + /// + /// + /// C++: + /// imgui_internal.h:933 + ///
const char* PrintFmt + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + [FieldOffset(16)] + public Ptr PrintFmt; + + /// + /// + /// Default scanf format for the type + /// + /// + /// C++: + /// imgui_internal.h:934 + ///
const char* ScanFmt + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + [FieldOffset(24)] + public Ptr ScanFmt; + } + + /// + /// + /// Type information associated to a ImGuiDataType enum + /// + /// + /// C++: + /// imgui_internal.h:153 + ///
struct ImGuiDataTypeInfo + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiDataTypeInfoPtr(ImGuiDataTypeInfo* ptr) : INullable + { + private ImGuiDataTypeInfo* _ptr = ptr; + public ImGuiDataTypeInfo* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDataTypeInfoPtr(ImGuiDataTypeInfo* ptr) => new(ptr); + + public static implicit operator ImGuiDataTypeInfo*(ImGuiDataTypeInfoPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Size in bytes + /// + /// + /// C++: + /// imgui_internal.h:931 + ///
size_t Size + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + public ref nuint Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// Short descriptive name for the type, for debugging + /// + /// + /// C++: + /// imgui_internal.h:932 + ///
const char* Name + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + public ref Ptr Name => ref Unsafe.AsRef>(&_ptr->Name); + + /// + /// + /// Default printf format for the type + /// + /// + /// C++: + /// imgui_internal.h:933 + ///
const char* PrintFmt + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + public ref Ptr PrintFmt => ref Unsafe.AsRef>(&_ptr->PrintFmt); + + /// + /// + /// Default scanf format for the type + /// + /// + /// C++: + /// imgui_internal.h:934 + ///
const char* ScanFmt + ///
+ ///
+ /// + /// + /// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). + /// + /// + public ref Ptr ScanFmt => ref Unsafe.AsRef>(&_ptr->ScanFmt); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeStorage.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeStorage.gen.cs new file mode 100644 index 0000000..5142c5f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDataTypeStorage.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:923 + ///
struct ImGuiDataTypeStorage + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ImGuiDataTypeStorage + { + /// + /// + /// Opaque storage to fit any data up to ImGuiDataType_COUNT + /// + /// + /// C++: + /// imgui_internal.h:925 + ///
ImU8 Data[8] + ///
+ ///
+ [FieldOffset(0)] + public byte_8 Data; + } + + /// + /// + /// C++: + /// imgui_internal.h:923 + ///
struct ImGuiDataTypeStorage + ///
+ ///
+ public unsafe partial struct ImGuiDataTypeStoragePtr(ImGuiDataTypeStorage* ptr) : INullable + { + private ImGuiDataTypeStorage* _ptr = ptr; + public ImGuiDataTypeStorage* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDataTypeStoragePtr(ImGuiDataTypeStorage* ptr) => new(ptr); + + public static implicit operator ImGuiDataTypeStorage*(ImGuiDataTypeStoragePtr wrapper) => wrapper.Ptr; + + /// + /// + /// Opaque storage to fit any data up to ImGuiDataType_COUNT + /// + /// + /// C++: + /// imgui_internal.h:925 + ///
ImU8 Data[8] + ///
+ ///
+ public ref byte_8 Data => ref Unsafe.AsRef(&_ptr->Data); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDeactivatedItemData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDeactivatedItemData.gen.cs new file mode 100644 index 0000000..838b21f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDeactivatedItemData.gen.cs @@ -0,0 +1,170 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Data for IsItemDeactivated()/IsItemDeactivatedAfterEdit() function. + /// + /// + /// C++: + /// imgui_internal.h:154 + ///
struct ImGuiDeactivatedItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiDeactivatedItemData + { + /// + /// + /// C++: + /// imgui_internal.h:1436 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:1437 + ///
int ElapseFrame + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + [FieldOffset(4)] + public int ElapseFrame; + + /// + /// + /// C++: + /// imgui_internal.h:1438 + ///
bool HasBeenEditedBefore + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + [FieldOffset(8)] + public Bool8 HasBeenEditedBefore; + + /// + /// + /// C++: + /// imgui_internal.h:1439 + ///
bool IsAlive + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + [FieldOffset(9)] + public Bool8 IsAlive; + } + + /// + /// + /// Data for IsItemDeactivated()/IsItemDeactivatedAfterEdit() function. + /// + /// + /// C++: + /// imgui_internal.h:154 + ///
struct ImGuiDeactivatedItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiDeactivatedItemDataPtr(ImGuiDeactivatedItemData* ptr) : INullable + { + private ImGuiDeactivatedItemData* _ptr = ptr; + public ImGuiDeactivatedItemData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDeactivatedItemDataPtr(ImGuiDeactivatedItemData* ptr) => new(ptr); + + public static implicit operator ImGuiDeactivatedItemData*(ImGuiDeactivatedItemDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1436 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:1437 + ///
int ElapseFrame + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + public ref int ElapseFrame => ref Unsafe.AsRef(&_ptr->ElapseFrame); + + /// + /// + /// C++: + /// imgui_internal.h:1438 + ///
bool HasBeenEditedBefore + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + public ref bool HasBeenEditedBefore => ref Unsafe.AsRef(&_ptr->HasBeenEditedBefore); + + /// + /// + /// C++: + /// imgui_internal.h:1439 + ///
bool IsAlive + ///
+ ///
+ /// + /// + /// Data used by IsItemDeactivated()/IsItemDeactivatedAfterEdit() functions + /// + /// + public ref bool IsAlive => ref Unsafe.AsRef(&_ptr->IsAlive); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocEntry.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocEntry.gen.cs new file mode 100644 index 0000000..4340525 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocEntry.gen.cs @@ -0,0 +1,95 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2249 + ///
struct ImGuiDebugAllocEntry + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ImGuiDebugAllocEntry + { + /// + /// + /// C++: + /// imgui_internal.h:2251 + ///
int FrameCount + ///
+ ///
+ [FieldOffset(0)] + public int FrameCount; + + /// + /// + /// C++: + /// imgui_internal.h:2252 + ///
ImS16 AllocCount + ///
+ ///
+ [FieldOffset(4)] + public short AllocCount; + + /// + /// + /// C++: + /// imgui_internal.h:2253 + ///
ImS16 FreeCount + ///
+ ///
+ [FieldOffset(6)] + public short FreeCount; + } + + /// + /// + /// C++: + /// imgui_internal.h:2249 + ///
struct ImGuiDebugAllocEntry + ///
+ ///
+ public unsafe partial struct ImGuiDebugAllocEntryPtr(ImGuiDebugAllocEntry* ptr) : INullable + { + private ImGuiDebugAllocEntry* _ptr = ptr; + public ImGuiDebugAllocEntry* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDebugAllocEntryPtr(ImGuiDebugAllocEntry* ptr) => new(ptr); + + public static implicit operator ImGuiDebugAllocEntry*(ImGuiDebugAllocEntryPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2251 + ///
int FrameCount + ///
+ ///
+ public ref int FrameCount => ref Unsafe.AsRef(&_ptr->FrameCount); + + /// + /// + /// C++: + /// imgui_internal.h:2252 + ///
ImS16 AllocCount + ///
+ ///
+ public ref short AllocCount => ref Unsafe.AsRef(&_ptr->AllocCount); + + /// + /// + /// C++: + /// imgui_internal.h:2253 + ///
ImS16 FreeCount + ///
+ ///
+ public ref short FreeCount => ref Unsafe.AsRef(&_ptr->FreeCount); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocInfo.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocInfo.gen.cs new file mode 100644 index 0000000..cb78d3d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDebugAllocInfo.gen.cs @@ -0,0 +1,133 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2256 + ///
struct ImGuiDebugAllocInfo + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 60)] + public partial struct ImGuiDebugAllocInfo + { + /// + /// + /// Number of call to MemAlloc(). + /// + /// + /// C++: + /// imgui_internal.h:2258 + ///
int TotalAllocCount + ///
+ ///
+ [FieldOffset(0)] + public int TotalAllocCount; + + /// + /// + /// C++: + /// imgui_internal.h:2259 + ///
int TotalFreeCount + ///
+ ///
+ [FieldOffset(4)] + public int TotalFreeCount; + + /// + /// + /// Current index in buffer + /// + /// + /// C++: + /// imgui_internal.h:2260 + ///
ImS16 LastEntriesIdx + ///
+ ///
+ [FieldOffset(8)] + public short LastEntriesIdx; + + /// + /// + /// Track last 6 frames that had allocations + /// + /// + /// C++: + /// imgui_internal.h:2261 + ///
ImGuiDebugAllocEntry LastEntriesBuf[6] + ///
+ ///
+ [FieldOffset(12)] + public ImGuiDebugAllocEntry_6 LastEntriesBuf; + } + + /// + /// + /// C++: + /// imgui_internal.h:2256 + ///
struct ImGuiDebugAllocInfo + ///
+ ///
+ public unsafe partial struct ImGuiDebugAllocInfoPtr(ImGuiDebugAllocInfo* ptr) : INullable + { + private ImGuiDebugAllocInfo* _ptr = ptr; + public ImGuiDebugAllocInfo* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDebugAllocInfoPtr(ImGuiDebugAllocInfo* ptr) => new(ptr); + + public static implicit operator ImGuiDebugAllocInfo*(ImGuiDebugAllocInfoPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Number of call to MemAlloc(). + /// + /// + /// C++: + /// imgui_internal.h:2258 + ///
int TotalAllocCount + ///
+ ///
+ public ref int TotalAllocCount => ref Unsafe.AsRef(&_ptr->TotalAllocCount); + + /// + /// + /// C++: + /// imgui_internal.h:2259 + ///
int TotalFreeCount + ///
+ ///
+ public ref int TotalFreeCount => ref Unsafe.AsRef(&_ptr->TotalFreeCount); + + /// + /// + /// Current index in buffer + /// + /// + /// C++: + /// imgui_internal.h:2260 + ///
ImS16 LastEntriesIdx + ///
+ ///
+ public ref short LastEntriesIdx => ref Unsafe.AsRef(&_ptr->LastEntriesIdx); + + /// + /// + /// Track last 6 frames that had allocations + /// + /// + /// C++: + /// imgui_internal.h:2261 + ///
ImGuiDebugAllocEntry LastEntriesBuf[6] + ///
+ ///
+ public ref ImGuiDebugAllocEntry_6 LastEntriesBuf => + ref Unsafe.AsRef(&_ptr->LastEntriesBuf); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDockContext.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDockContext.gen.cs new file mode 100644 index 0000000..7968538 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDockContext.gen.cs @@ -0,0 +1,137 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Docking system context + /// + /// + /// C++: + /// imgui_internal.h:155 + ///
struct ImGuiDockContext + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiDockContext + { + /// + /// + /// Map ID -> ImGuiDockNode*: Active nodes + /// + /// + /// C++: + /// imgui_internal.h:2076 + ///
ImGuiStorage Nodes + ///
+ ///
+ [FieldOffset(0)] + public ImGuiStorage Nodes; + + /// + /// + /// C++: + /// imgui_internal.h:2077 + ///
ImVector<ImGuiDockRequest> Requests + ///
+ ///
+ [FieldOffset(16)] + public ImVector Requests; + + /// + /// + /// C++: + /// imgui_internal.h:2078 + ///
ImVector<ImGuiDockNodeSettings> NodesSettings + ///
+ ///
+ [FieldOffset(32)] + public ImVector NodesSettings; + + /// + /// + /// C++: + /// imgui_internal.h:2079 + ///
bool WantFullRebuild + ///
+ ///
+ [FieldOffset(48)] + public Bool8 WantFullRebuild; + } + + /// + /// + /// Docking system context + /// + /// + /// C++: + /// imgui_internal.h:155 + ///
struct ImGuiDockContext + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiDockContextPtr(ImGuiDockContext* ptr) : INullable + { + private ImGuiDockContext* _ptr = ptr; + public ImGuiDockContext* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDockContextPtr(ImGuiDockContext* ptr) => new(ptr); + + public static implicit operator ImGuiDockContext*(ImGuiDockContextPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Map ID -> ImGuiDockNode*: Active nodes + /// + /// + /// C++: + /// imgui_internal.h:2076 + ///
ImGuiStorage Nodes + ///
+ ///
+ public ref ImGuiStorage Nodes => ref Unsafe.AsRef(&_ptr->Nodes); + + /// + /// + /// C++: + /// imgui_internal.h:2077 + ///
ImVector<ImGuiDockRequest> Requests + ///
+ ///
+ public ref ImVector Requests => ref Unsafe.AsRef>(&_ptr->Requests); + + /// + /// + /// C++: + /// imgui_internal.h:2078 + ///
ImVector<ImGuiDockNodeSettings> NodesSettings + ///
+ ///
+ public ref ImVector NodesSettings => + ref Unsafe.AsRef>(&_ptr->NodesSettings); + + /// + /// + /// C++: + /// imgui_internal.h:2079 + ///
bool WantFullRebuild + ///
+ ///
+ public ref bool WantFullRebuild => ref Unsafe.AsRef(&_ptr->WantFullRebuild); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiDockNode.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDockNode.gen.cs new file mode 100644 index 0000000..3309224 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiDockNode.gen.cs @@ -0,0 +1,1179 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Docking system node (hold a list of Windows OR two child dock nodes) + /// + /// + /// C++: + /// imgui_internal.h:157 + ///
struct ImGuiDockNode + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 208)] + public partial struct ImGuiDockNode + { + /// + /// + /// C++: + /// imgui_internal.h:1990 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// (Write) Flags shared by all nodes of a same dockspace hierarchy (inherited from the root node) + /// + /// + /// C++: + /// imgui_internal.h:1991 + ///
ImGuiDockNodeFlags SharedFlags + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(4)] + public ImGuiDockNodeFlags SharedFlags; + + /// + /// + /// (Write) Flags specific to this node + /// + /// + /// C++: + /// imgui_internal.h:1992 + ///
ImGuiDockNodeFlags LocalFlags + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(8)] + public ImGuiDockNodeFlags LocalFlags; + + /// + /// + /// (Write) Flags specific to this node, applied from windows + /// + /// + /// C++: + /// imgui_internal.h:1993 + ///
ImGuiDockNodeFlags LocalFlagsInWindows + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(12)] + public ImGuiDockNodeFlags LocalFlagsInWindows; + + /// + /// + /// (Read) Effective flags (== SharedFlags | LocalFlagsInNode | LocalFlagsInWindows) + /// + /// + /// C++: + /// imgui_internal.h:1994 + ///
ImGuiDockNodeFlags MergedFlags + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(16)] + public ImGuiDockNodeFlags MergedFlags; + + /// + /// + /// C++: + /// imgui_internal.h:1995 + ///
ImGuiDockNodeState State + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(20)] + public ImGuiDockNodeState State; + + /// + /// + /// C++: + /// imgui_internal.h:1996 + ///
ImGuiDockNode* ParentNode + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(24)] + public ImGuiDockNodePtr ParentNode; + + /// + /// + /// [Split node only] Child nodes (left/right or top/bottom). Consider switching to an array. + /// + /// + /// C++: + /// imgui_internal.h:1997 + ///
ImGuiDockNode* ChildNodes[2] + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(32)] + public ImGuiDockNodePtr_2 ChildNodes; + + /// + /// + /// Note: unordered list! Iterate TabBar->Tabs for user-order. + /// + /// + /// C++: + /// imgui_internal.h:1998 + ///
ImVector<ImGuiWindow*> Windows + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(48)] + public ImVector Windows; + + /// + /// + /// C++: + /// imgui_internal.h:1999 + ///
ImGuiTabBar* TabBar + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(64)] + public ImGuiTabBarPtr TabBar; + + /// + /// + /// Current position + /// + /// + /// C++: + /// imgui_internal.h:2000 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(72)] + public float2 Pos; + + /// + /// + /// Current size + /// + /// + /// C++: + /// imgui_internal.h:2001 + ///
ImVec2 Size + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(80)] + public float2 Size; + + /// + /// + /// [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), + /// used to calculate Size. + /// + /// + /// C++: + /// imgui_internal.h:2002 + ///
ImVec2 SizeRef + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(88)] + public float2 SizeRef; + + /// + /// + /// [Split node only] Split axis (X or Y) + /// + /// + /// C++: + /// imgui_internal.h:2003 + ///
ImGuiAxis SplitAxis + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(96)] + public ImGuiAxis SplitAxis; + + /// + /// + /// [Root node only] + /// + /// + /// C++: + /// imgui_internal.h:2004 + ///
ImGuiWindowClass WindowClass + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(100)] + public ImGuiWindowClass WindowClass; + + /// + /// + /// C++: + /// imgui_internal.h:2005 + ///
ImU32 LastBgColor + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + [FieldOffset(132)] + public uint LastBgColor; + + /// + /// + /// C++: + /// imgui_internal.h:2007 + ///
ImGuiWindow* HostWindow + ///
+ ///
+ [FieldOffset(136)] + public ImGuiWindowPtr HostWindow; + + /// + /// + /// Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different + /// window. + /// + /// + /// C++: + /// imgui_internal.h:2008 + ///
ImGuiWindow* VisibleWindow + ///
+ ///
+ [FieldOffset(144)] + public ImGuiWindowPtr VisibleWindow; + + /// + /// + /// [Root node only] Pointer to central node. + /// + /// + /// C++: + /// imgui_internal.h:2009 + ///
ImGuiDockNode* CentralNode + ///
+ ///
+ [FieldOffset(152)] + public ImGuiDockNodePtr CentralNode; + + /// + /// + /// [Root node only] Set when there is a single visible node within the hierarchy. + /// + /// + /// C++: + /// imgui_internal.h:2010 + ///
ImGuiDockNode* OnlyNodeWithWindows + ///
+ ///
+ [FieldOffset(160)] + public ImGuiDockNodePtr OnlyNodeWithWindows; + + /// + /// + /// [Root node only] + /// + /// + /// C++: + /// imgui_internal.h:2011 + ///
int CountNodeWithWindows + ///
+ ///
+ [FieldOffset(168)] + public int CountNodeWithWindows; + + /// + /// + /// Last frame number the node was updated or kept alive explicitly with DockSpace() + + /// ImGuiDockNodeFlags_KeepAliveOnly + /// + /// + /// C++: + /// imgui_internal.h:2012 + ///
int LastFrameAlive + ///
+ ///
+ [FieldOffset(172)] + public int LastFrameAlive; + + /// + /// + /// Last frame number the node was updated. + /// + /// + /// C++: + /// imgui_internal.h:2013 + ///
int LastFrameActive + ///
+ ///
+ [FieldOffset(176)] + public int LastFrameActive; + + /// + /// + /// Last frame number the node was focused. + /// + /// + /// C++: + /// imgui_internal.h:2014 + ///
int LastFrameFocused + ///
+ ///
+ [FieldOffset(180)] + public int LastFrameFocused; + + /// + /// + /// [Root node only] Which of our child docking node (any ancestor in the hierarchy) was last focused. + /// + /// + /// C++: + /// imgui_internal.h:2015 + ///
ImGuiID LastFocusedNodeId + ///
+ ///
+ [FieldOffset(184)] + public ImGuiID LastFocusedNodeId; + + /// + /// + /// [Leaf node only] Which of our tab/window is selected. + /// + /// + /// C++: + /// imgui_internal.h:2016 + ///
ImGuiID SelectedTabId + ///
+ ///
+ [FieldOffset(188)] + public ImGuiID SelectedTabId; + + /// + /// + /// [Leaf node only] Set when closing a specific tab/window. + /// + /// + /// C++: + /// imgui_internal.h:2017 + ///
ImGuiID WantCloseTabId + ///
+ ///
+ [FieldOffset(192)] + public ImGuiID WantCloseTabId; + + /// + /// + /// Reference viewport ID from visible window when HostWindow == NULL. + /// + /// + /// C++: + /// imgui_internal.h:2018 + ///
ImGuiID RefViewportId + ///
+ ///
+ [FieldOffset(196)] + public ImGuiID RefViewportId; + + /// + /// + /// C++: + /// imgui_internal.h:2019 + ///
ImGuiDataAuthority AuthorityForPos :3 + ///
+ ///
+ [FieldOffset(200)] + public ImGuiDataAuthority AuthorityForPos; + + /// + /// + /// C++: + /// imgui_internal.h:2020 + ///
ImGuiDataAuthority AuthorityForSize :3 + ///
+ ///
+ [FieldOffset(200)] + public ImGuiDataAuthority AuthorityForSize; + + /// + /// + /// C++: + /// imgui_internal.h:2021 + ///
ImGuiDataAuthority AuthorityForViewport :3 + ///
+ ///
+ [FieldOffset(200)] + public ImGuiDataAuthority AuthorityForViewport; + + /// + /// + /// Set to false when the node is hidden (usually disabled as it has no active window) + /// + /// + /// C++: + /// imgui_internal.h:2022 + ///
bool IsVisible :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 IsVisible; + + /// + /// + /// C++: + /// imgui_internal.h:2023 + ///
bool IsFocused :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 IsFocused; + + /// + /// + /// C++: + /// imgui_internal.h:2024 + ///
bool IsBgDrawnThisFrame :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 IsBgDrawnThisFrame; + + /// + /// + /// Provide space for a close button (if any of the docked window has one). Note that button may be hidden + /// on window without one. + /// + /// + /// C++: + /// imgui_internal.h:2025 + ///
bool HasCloseButton :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 HasCloseButton; + + /// + /// + /// C++: + /// imgui_internal.h:2026 + ///
bool HasWindowMenuButton :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 HasWindowMenuButton; + + /// + /// + /// C++: + /// imgui_internal.h:2027 + ///
bool HasCentralNodeChild :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 HasCentralNodeChild; + + /// + /// + /// Set when closing all tabs at once. + /// + /// + /// C++: + /// imgui_internal.h:2028 + ///
bool WantCloseAll :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 WantCloseAll; + + /// + /// + /// C++: + /// imgui_internal.h:2029 + ///
bool WantLockSizeOnce :1 + ///
+ ///
+ [FieldOffset(204)] + public Bool8 WantLockSizeOnce; + + /// + /// + /// After a node extraction we need to transition toward moving the newly created host window + /// + /// + /// C++: + /// imgui_internal.h:2030 + ///
bool WantMouseMove :1 + ///
+ ///
+ [FieldOffset(205)] + public Bool8 WantMouseMove; + + /// + /// + /// C++: + /// imgui_internal.h:2031 + ///
bool WantHiddenTabBarUpdate :1 + ///
+ ///
+ [FieldOffset(205)] + public Bool8 WantHiddenTabBarUpdate; + + /// + /// + /// C++: + /// imgui_internal.h:2032 + ///
bool WantHiddenTabBarToggle :1 + ///
+ ///
+ [FieldOffset(205)] + public Bool8 WantHiddenTabBarToggle; + } + + /// + /// + /// Docking system node (hold a list of Windows OR two child dock nodes) + /// + /// + /// C++: + /// imgui_internal.h:157 + ///
struct ImGuiDockNode + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiDockNodePtr(ImGuiDockNode* ptr) : INullable + { + private ImGuiDockNode* _ptr = ptr; + public ImGuiDockNode* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiDockNodePtr(ImGuiDockNode* ptr) => new(ptr); + + public static implicit operator ImGuiDockNode*(ImGuiDockNodePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1990 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// (Write) Flags shared by all nodes of a same dockspace hierarchy (inherited from the root node) + /// + /// + /// C++: + /// imgui_internal.h:1991 + ///
ImGuiDockNodeFlags SharedFlags + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodeFlags SharedFlags => ref Unsafe.AsRef(&_ptr->SharedFlags); + + /// + /// + /// (Write) Flags specific to this node + /// + /// + /// C++: + /// imgui_internal.h:1992 + ///
ImGuiDockNodeFlags LocalFlags + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodeFlags LocalFlags => ref Unsafe.AsRef(&_ptr->LocalFlags); + + /// + /// + /// (Write) Flags specific to this node, applied from windows + /// + /// + /// C++: + /// imgui_internal.h:1993 + ///
ImGuiDockNodeFlags LocalFlagsInWindows + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodeFlags LocalFlagsInWindows => + ref Unsafe.AsRef(&_ptr->LocalFlagsInWindows); + + /// + /// + /// (Read) Effective flags (== SharedFlags | LocalFlagsInNode | LocalFlagsInWindows) + /// + /// + /// C++: + /// imgui_internal.h:1994 + ///
ImGuiDockNodeFlags MergedFlags + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodeFlags MergedFlags => ref Unsafe.AsRef(&_ptr->MergedFlags); + + /// + /// + /// C++: + /// imgui_internal.h:1995 + ///
ImGuiDockNodeState State + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodeState State => ref Unsafe.AsRef(&_ptr->State); + + /// + /// + /// C++: + /// imgui_internal.h:1996 + ///
ImGuiDockNode* ParentNode + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodePtr ParentNode => ref Unsafe.AsRef(&_ptr->ParentNode); + + /// + /// + /// [Split node only] Child nodes (left/right or top/bottom). Consider switching to an array. + /// + /// + /// C++: + /// imgui_internal.h:1997 + ///
ImGuiDockNode* ChildNodes[2] + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiDockNodePtr_2 ChildNodes => ref Unsafe.AsRef(&_ptr->ChildNodes); + + /// + /// + /// Note: unordered list! Iterate TabBar->Tabs for user-order. + /// + /// + /// C++: + /// imgui_internal.h:1998 + ///
ImVector<ImGuiWindow*> Windows + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImVector Windows => ref Unsafe.AsRef>(&_ptr->Windows); + + /// + /// + /// C++: + /// imgui_internal.h:1999 + ///
ImGuiTabBar* TabBar + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiTabBarPtr TabBar => ref Unsafe.AsRef(&_ptr->TabBar); + + /// + /// + /// Current position + /// + /// + /// C++: + /// imgui_internal.h:2000 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref float2 Pos => ref Unsafe.AsRef(&_ptr->Pos); + + /// + /// + /// Current size + /// + /// + /// C++: + /// imgui_internal.h:2001 + ///
ImVec2 Size + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref float2 Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), + /// used to calculate Size. + /// + /// + /// C++: + /// imgui_internal.h:2002 + ///
ImVec2 SizeRef + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref float2 SizeRef => ref Unsafe.AsRef(&_ptr->SizeRef); + + /// + /// + /// [Split node only] Split axis (X or Y) + /// + /// + /// C++: + /// imgui_internal.h:2003 + ///
ImGuiAxis SplitAxis + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiAxis SplitAxis => ref Unsafe.AsRef(&_ptr->SplitAxis); + + /// + /// + /// [Root node only] + /// + /// + /// C++: + /// imgui_internal.h:2004 + ///
ImGuiWindowClass WindowClass + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref ImGuiWindowClass WindowClass => ref Unsafe.AsRef(&_ptr->WindowClass); + + /// + /// + /// C++: + /// imgui_internal.h:2005 + ///
ImU32 LastBgColor + ///
+ ///
+ /// + /// + /// sizeof() 156~192 + /// + /// + public ref uint LastBgColor => ref Unsafe.AsRef(&_ptr->LastBgColor); + + /// + /// + /// C++: + /// imgui_internal.h:2007 + ///
ImGuiWindow* HostWindow + ///
+ ///
+ public ref ImGuiWindowPtr HostWindow => ref Unsafe.AsRef(&_ptr->HostWindow); + + /// + /// + /// Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different + /// window. + /// + /// + /// C++: + /// imgui_internal.h:2008 + ///
ImGuiWindow* VisibleWindow + ///
+ ///
+ public ref ImGuiWindowPtr VisibleWindow => ref Unsafe.AsRef(&_ptr->VisibleWindow); + + /// + /// + /// [Root node only] Pointer to central node. + /// + /// + /// C++: + /// imgui_internal.h:2009 + ///
ImGuiDockNode* CentralNode + ///
+ ///
+ public ref ImGuiDockNodePtr CentralNode => ref Unsafe.AsRef(&_ptr->CentralNode); + + /// + /// + /// [Root node only] Set when there is a single visible node within the hierarchy. + /// + /// + /// C++: + /// imgui_internal.h:2010 + ///
ImGuiDockNode* OnlyNodeWithWindows + ///
+ ///
+ public ref ImGuiDockNodePtr OnlyNodeWithWindows => + ref Unsafe.AsRef(&_ptr->OnlyNodeWithWindows); + + /// + /// + /// [Root node only] + /// + /// + /// C++: + /// imgui_internal.h:2011 + ///
int CountNodeWithWindows + ///
+ ///
+ public ref int CountNodeWithWindows => ref Unsafe.AsRef(&_ptr->CountNodeWithWindows); + + /// + /// + /// Last frame number the node was updated or kept alive explicitly with DockSpace() + + /// ImGuiDockNodeFlags_KeepAliveOnly + /// + /// + /// C++: + /// imgui_internal.h:2012 + ///
int LastFrameAlive + ///
+ ///
+ public ref int LastFrameAlive => ref Unsafe.AsRef(&_ptr->LastFrameAlive); + + /// + /// + /// Last frame number the node was updated. + /// + /// + /// C++: + /// imgui_internal.h:2013 + ///
int LastFrameActive + ///
+ ///
+ public ref int LastFrameActive => ref Unsafe.AsRef(&_ptr->LastFrameActive); + + /// + /// + /// Last frame number the node was focused. + /// + /// + /// C++: + /// imgui_internal.h:2014 + ///
int LastFrameFocused + ///
+ ///
+ public ref int LastFrameFocused => ref Unsafe.AsRef(&_ptr->LastFrameFocused); + + /// + /// + /// [Root node only] Which of our child docking node (any ancestor in the hierarchy) was last focused. + /// + /// + /// C++: + /// imgui_internal.h:2015 + ///
ImGuiID LastFocusedNodeId + ///
+ ///
+ public ref ImGuiID LastFocusedNodeId => ref Unsafe.AsRef(&_ptr->LastFocusedNodeId); + + /// + /// + /// [Leaf node only] Which of our tab/window is selected. + /// + /// + /// C++: + /// imgui_internal.h:2016 + ///
ImGuiID SelectedTabId + ///
+ ///
+ public ref ImGuiID SelectedTabId => ref Unsafe.AsRef(&_ptr->SelectedTabId); + + /// + /// + /// [Leaf node only] Set when closing a specific tab/window. + /// + /// + /// C++: + /// imgui_internal.h:2017 + ///
ImGuiID WantCloseTabId + ///
+ ///
+ public ref ImGuiID WantCloseTabId => ref Unsafe.AsRef(&_ptr->WantCloseTabId); + + /// + /// + /// Reference viewport ID from visible window when HostWindow == NULL. + /// + /// + /// C++: + /// imgui_internal.h:2018 + ///
ImGuiID RefViewportId + ///
+ ///
+ public ref ImGuiID RefViewportId => ref Unsafe.AsRef(&_ptr->RefViewportId); + + /// + /// + /// C++: + /// imgui_internal.h:2019 + ///
ImGuiDataAuthority AuthorityForPos :3 + ///
+ ///
+ public ref ImGuiDataAuthority AuthorityForPos => ref Unsafe.AsRef(&_ptr->AuthorityForPos); + + /// + /// + /// C++: + /// imgui_internal.h:2020 + ///
ImGuiDataAuthority AuthorityForSize :3 + ///
+ ///
+ public ref ImGuiDataAuthority AuthorityForSize => ref Unsafe.AsRef(&_ptr->AuthorityForSize); + + /// + /// + /// C++: + /// imgui_internal.h:2021 + ///
ImGuiDataAuthority AuthorityForViewport :3 + ///
+ ///
+ public ref ImGuiDataAuthority AuthorityForViewport => + ref Unsafe.AsRef(&_ptr->AuthorityForViewport); + + /// + /// + /// Set to false when the node is hidden (usually disabled as it has no active window) + /// + /// + /// C++: + /// imgui_internal.h:2022 + ///
bool IsVisible :1 + ///
+ ///
+ public ref bool IsVisible => ref Unsafe.AsRef(&_ptr->IsVisible); + + /// + /// + /// C++: + /// imgui_internal.h:2023 + ///
bool IsFocused :1 + ///
+ ///
+ public ref bool IsFocused => ref Unsafe.AsRef(&_ptr->IsFocused); + + /// + /// + /// C++: + /// imgui_internal.h:2024 + ///
bool IsBgDrawnThisFrame :1 + ///
+ ///
+ public ref bool IsBgDrawnThisFrame => ref Unsafe.AsRef(&_ptr->IsBgDrawnThisFrame); + + /// + /// + /// Provide space for a close button (if any of the docked window has one). Note that button may be hidden + /// on window without one. + /// + /// + /// C++: + /// imgui_internal.h:2025 + ///
bool HasCloseButton :1 + ///
+ ///
+ public ref bool HasCloseButton => ref Unsafe.AsRef(&_ptr->HasCloseButton); + + /// + /// + /// C++: + /// imgui_internal.h:2026 + ///
bool HasWindowMenuButton :1 + ///
+ ///
+ public ref bool HasWindowMenuButton => ref Unsafe.AsRef(&_ptr->HasWindowMenuButton); + + /// + /// + /// C++: + /// imgui_internal.h:2027 + ///
bool HasCentralNodeChild :1 + ///
+ ///
+ public ref bool HasCentralNodeChild => ref Unsafe.AsRef(&_ptr->HasCentralNodeChild); + + /// + /// + /// Set when closing all tabs at once. + /// + /// + /// C++: + /// imgui_internal.h:2028 + ///
bool WantCloseAll :1 + ///
+ ///
+ public ref bool WantCloseAll => ref Unsafe.AsRef(&_ptr->WantCloseAll); + + /// + /// + /// C++: + /// imgui_internal.h:2029 + ///
bool WantLockSizeOnce :1 + ///
+ ///
+ public ref bool WantLockSizeOnce => ref Unsafe.AsRef(&_ptr->WantLockSizeOnce); + + /// + /// + /// After a node extraction we need to transition toward moving the newly created host window + /// + /// + /// C++: + /// imgui_internal.h:2030 + ///
bool WantMouseMove :1 + ///
+ ///
+ public ref bool WantMouseMove => ref Unsafe.AsRef(&_ptr->WantMouseMove); + + /// + /// + /// C++: + /// imgui_internal.h:2031 + ///
bool WantHiddenTabBarUpdate :1 + ///
+ ///
+ public ref bool WantHiddenTabBarUpdate => ref Unsafe.AsRef(&_ptr->WantHiddenTabBarUpdate); + + /// + /// + /// C++: + /// imgui_internal.h:2032 + ///
bool WantHiddenTabBarToggle :1 + ///
+ ///
+ public ref bool WantHiddenTabBarToggle => ref Unsafe.AsRef(&_ptr->WantHiddenTabBarToggle); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiErrorRecoveryState.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiErrorRecoveryState.gen.cs new file mode 100644 index 0000000..5d8a105 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiErrorRecoveryState.gen.cs @@ -0,0 +1,373 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage of stack sizes for error handling and recovery + /// + /// + /// C++: + /// imgui_internal.h:159 + ///
struct ImGuiErrorRecoveryState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 22)] + public partial struct ImGuiErrorRecoveryState + { + /// + /// + /// C++: + /// imgui_internal.h:1392 + ///
short SizeOfWindowStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(0)] + public short SizeOfWindowStack; + + /// + /// + /// C++: + /// imgui_internal.h:1393 + ///
short SizeOfIDStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(2)] + public short SizeOfIDStack; + + /// + /// + /// C++: + /// imgui_internal.h:1394 + ///
short SizeOfTreeStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(4)] + public short SizeOfTreeStack; + + /// + /// + /// C++: + /// imgui_internal.h:1395 + ///
short SizeOfColorStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(6)] + public short SizeOfColorStack; + + /// + /// + /// C++: + /// imgui_internal.h:1396 + ///
short SizeOfStyleVarStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(8)] + public short SizeOfStyleVarStack; + + /// + /// + /// C++: + /// imgui_internal.h:1397 + ///
short SizeOfFontStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(10)] + public short SizeOfFontStack; + + /// + /// + /// C++: + /// imgui_internal.h:1398 + ///
short SizeOfFocusScopeStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(12)] + public short SizeOfFocusScopeStack; + + /// + /// + /// C++: + /// imgui_internal.h:1399 + ///
short SizeOfGroupStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(14)] + public short SizeOfGroupStack; + + /// + /// + /// C++: + /// imgui_internal.h:1400 + ///
short SizeOfItemFlagsStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(16)] + public short SizeOfItemFlagsStack; + + /// + /// + /// C++: + /// imgui_internal.h:1401 + ///
short SizeOfBeginPopupStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(18)] + public short SizeOfBeginPopupStack; + + /// + /// + /// C++: + /// imgui_internal.h:1402 + ///
short SizeOfDisabledStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + [FieldOffset(20)] + public short SizeOfDisabledStack; + } + + /// + /// + /// Storage of stack sizes for error handling and recovery + /// + /// + /// C++: + /// imgui_internal.h:159 + ///
struct ImGuiErrorRecoveryState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiErrorRecoveryStatePtr(ImGuiErrorRecoveryState* ptr) : INullable + { + private ImGuiErrorRecoveryState* _ptr = ptr; + public ImGuiErrorRecoveryState* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiErrorRecoveryStatePtr(ImGuiErrorRecoveryState* ptr) => new(ptr); + + public static implicit operator ImGuiErrorRecoveryState*(ImGuiErrorRecoveryStatePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1392 + ///
short SizeOfWindowStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfWindowStack => ref Unsafe.AsRef(&_ptr->SizeOfWindowStack); + + /// + /// + /// C++: + /// imgui_internal.h:1393 + ///
short SizeOfIDStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfIDStack => ref Unsafe.AsRef(&_ptr->SizeOfIDStack); + + /// + /// + /// C++: + /// imgui_internal.h:1394 + ///
short SizeOfTreeStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfTreeStack => ref Unsafe.AsRef(&_ptr->SizeOfTreeStack); + + /// + /// + /// C++: + /// imgui_internal.h:1395 + ///
short SizeOfColorStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfColorStack => ref Unsafe.AsRef(&_ptr->SizeOfColorStack); + + /// + /// + /// C++: + /// imgui_internal.h:1396 + ///
short SizeOfStyleVarStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfStyleVarStack => ref Unsafe.AsRef(&_ptr->SizeOfStyleVarStack); + + /// + /// + /// C++: + /// imgui_internal.h:1397 + ///
short SizeOfFontStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfFontStack => ref Unsafe.AsRef(&_ptr->SizeOfFontStack); + + /// + /// + /// C++: + /// imgui_internal.h:1398 + ///
short SizeOfFocusScopeStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfFocusScopeStack => ref Unsafe.AsRef(&_ptr->SizeOfFocusScopeStack); + + /// + /// + /// C++: + /// imgui_internal.h:1399 + ///
short SizeOfGroupStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfGroupStack => ref Unsafe.AsRef(&_ptr->SizeOfGroupStack); + + /// + /// + /// C++: + /// imgui_internal.h:1400 + ///
short SizeOfItemFlagsStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfItemFlagsStack => ref Unsafe.AsRef(&_ptr->SizeOfItemFlagsStack); + + /// + /// + /// C++: + /// imgui_internal.h:1401 + ///
short SizeOfBeginPopupStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfBeginPopupStack => ref Unsafe.AsRef(&_ptr->SizeOfBeginPopupStack); + + /// + /// + /// C++: + /// imgui_internal.h:1402 + ///
short SizeOfDisabledStack + ///
+ ///
+ /// + /// + /// sizeof() = 20 + /// + /// + public ref short SizeOfDisabledStack => ref Unsafe.AsRef(&_ptr->SizeOfDisabledStack); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiFocusScopeData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiFocusScopeData.gen.cs new file mode 100644 index 0000000..dfe10f1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiFocusScopeData.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1756 + ///
struct ImGuiFocusScopeData + ///
+ ///
+ /// + /// + /// Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[] + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ImGuiFocusScopeData + { + /// + /// + /// C++: + /// imgui_internal.h:1758 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[] + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:1759 + ///
ImGuiID WindowID + ///
+ ///
+ /// + /// + /// Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[] + /// + /// + [FieldOffset(4)] + public ImGuiID WindowID; + } + + /// + /// + /// C++: + /// imgui_internal.h:1756 + ///
struct ImGuiFocusScopeData + ///
+ ///
+ /// + /// + /// Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[] + /// + /// + public unsafe partial struct ImGuiFocusScopeDataPtr(ImGuiFocusScopeData* ptr) : INullable + { + private ImGuiFocusScopeData* _ptr = ptr; + public ImGuiFocusScopeData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiFocusScopeDataPtr(ImGuiFocusScopeData* ptr) => new(ptr); + + public static implicit operator ImGuiFocusScopeData*(ImGuiFocusScopeDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1758 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[] + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:1759 + ///
ImGuiID WindowID + ///
+ ///
+ /// + /// + /// Storage for PushFocusScope(), g.FocusScopeStack[], g.NavFocusRoute[] + /// + /// + public ref ImGuiID WindowID => ref Unsafe.AsRef(&_ptr->WindowID); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiGroupData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiGroupData.gen.cs new file mode 100644 index 0000000..65e61b3 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiGroupData.gen.cs @@ -0,0 +1,431 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + /// C++: + /// imgui_internal.h:160 + ///
struct ImGuiGroupData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiGroupData + { + /// + /// + /// C++: + /// imgui_internal.h:1163 + ///
ImGuiID WindowID + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(0)] + public ImGuiID WindowID; + + /// + /// + /// C++: + /// imgui_internal.h:1164 + ///
ImVec2 BackupCursorPos + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(4)] + public float2 BackupCursorPos; + + /// + /// + /// C++: + /// imgui_internal.h:1165 + ///
ImVec2 BackupCursorMaxPos + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(12)] + public float2 BackupCursorMaxPos; + + /// + /// + /// C++: + /// imgui_internal.h:1166 + ///
ImVec2 BackupCursorPosPrevLine + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(20)] + public float2 BackupCursorPosPrevLine; + + /// + /// + /// C++: + /// imgui_internal.h:1167 + ///
ImVec1 BackupIndent + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(28)] + public float BackupIndent; + + /// + /// + /// C++: + /// imgui_internal.h:1168 + ///
ImVec1 BackupGroupOffset + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(32)] + public float BackupGroupOffset; + + /// + /// + /// C++: + /// imgui_internal.h:1169 + ///
ImVec2 BackupCurrLineSize + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(36)] + public float2 BackupCurrLineSize; + + /// + /// + /// C++: + /// imgui_internal.h:1170 + ///
float BackupCurrLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(44)] + public float BackupCurrLineTextBaseOffset; + + /// + /// + /// C++: + /// imgui_internal.h:1171 + ///
ImGuiID BackupActiveIdIsAlive + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(48)] + public ImGuiID BackupActiveIdIsAlive; + + /// + /// + /// C++: + /// imgui_internal.h:1172 + ///
bool BackupDeactivatedIdIsAlive + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(52)] + public Bool8 BackupDeactivatedIdIsAlive; + + /// + /// + /// C++: + /// imgui_internal.h:1173 + ///
bool BackupHoveredIdIsAlive + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(53)] + public Bool8 BackupHoveredIdIsAlive; + + /// + /// + /// C++: + /// imgui_internal.h:1174 + ///
bool BackupIsSameLine + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(54)] + public Bool8 BackupIsSameLine; + + /// + /// + /// C++: + /// imgui_internal.h:1175 + ///
bool EmitItem + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + [FieldOffset(55)] + public Bool8 EmitItem; + } + + /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + /// C++: + /// imgui_internal.h:160 + ///
struct ImGuiGroupData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiGroupDataPtr(ImGuiGroupData* ptr) : INullable + { + private ImGuiGroupData* _ptr = ptr; + public ImGuiGroupData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiGroupDataPtr(ImGuiGroupData* ptr) => new(ptr); + + public static implicit operator ImGuiGroupData*(ImGuiGroupDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1163 + ///
ImGuiID WindowID + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref ImGuiID WindowID => ref Unsafe.AsRef(&_ptr->WindowID); + + /// + /// + /// C++: + /// imgui_internal.h:1164 + ///
ImVec2 BackupCursorPos + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float2 BackupCursorPos => ref Unsafe.AsRef(&_ptr->BackupCursorPos); + + /// + /// + /// C++: + /// imgui_internal.h:1165 + ///
ImVec2 BackupCursorMaxPos + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float2 BackupCursorMaxPos => ref Unsafe.AsRef(&_ptr->BackupCursorMaxPos); + + /// + /// + /// C++: + /// imgui_internal.h:1166 + ///
ImVec2 BackupCursorPosPrevLine + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float2 BackupCursorPosPrevLine => ref Unsafe.AsRef(&_ptr->BackupCursorPosPrevLine); + + /// + /// + /// C++: + /// imgui_internal.h:1167 + ///
ImVec1 BackupIndent + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float BackupIndent => ref Unsafe.AsRef(&_ptr->BackupIndent); + + /// + /// + /// C++: + /// imgui_internal.h:1168 + ///
ImVec1 BackupGroupOffset + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float BackupGroupOffset => ref Unsafe.AsRef(&_ptr->BackupGroupOffset); + + /// + /// + /// C++: + /// imgui_internal.h:1169 + ///
ImVec2 BackupCurrLineSize + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float2 BackupCurrLineSize => ref Unsafe.AsRef(&_ptr->BackupCurrLineSize); + + /// + /// + /// C++: + /// imgui_internal.h:1170 + ///
float BackupCurrLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref float BackupCurrLineTextBaseOffset => ref Unsafe.AsRef(&_ptr->BackupCurrLineTextBaseOffset); + + /// + /// + /// C++: + /// imgui_internal.h:1171 + ///
ImGuiID BackupActiveIdIsAlive + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref ImGuiID BackupActiveIdIsAlive => ref Unsafe.AsRef(&_ptr->BackupActiveIdIsAlive); + + /// + /// + /// C++: + /// imgui_internal.h:1172 + ///
bool BackupDeactivatedIdIsAlive + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref bool BackupDeactivatedIdIsAlive => ref Unsafe.AsRef(&_ptr->BackupDeactivatedIdIsAlive); + + /// + /// + /// C++: + /// imgui_internal.h:1173 + ///
bool BackupHoveredIdIsAlive + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref bool BackupHoveredIdIsAlive => ref Unsafe.AsRef(&_ptr->BackupHoveredIdIsAlive); + + /// + /// + /// C++: + /// imgui_internal.h:1174 + ///
bool BackupIsSameLine + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref bool BackupIsSameLine => ref Unsafe.AsRef(&_ptr->BackupIsSameLine); + + /// + /// + /// C++: + /// imgui_internal.h:1175 + ///
bool EmitItem + ///
+ ///
+ /// + /// + /// Stacked storage data for BeginGroup()/EndGroup() + /// + /// + public ref bool EmitItem => ref Unsafe.AsRef(&_ptr->EmitItem); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiIDStackTool.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiIDStackTool.gen.cs new file mode 100644 index 0000000..6ddfbe6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiIDStackTool.gen.cs @@ -0,0 +1,264 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2297 + ///
struct ImGuiIDStackTool + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiIDStackTool + { + /// + /// + /// C++: + /// imgui_internal.h:2299 + ///
int LastActiveFrame + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(0)] + public int LastActiveFrame; + + /// + /// + /// -1: query stack and resize Results, >= 0: individual stack level + /// + /// + /// C++: + /// imgui_internal.h:2300 + ///
int StackLevel + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(4)] + public int StackLevel; + + /// + /// + /// ID to query details for + /// + /// + /// C++: + /// imgui_internal.h:2301 + ///
ImGuiID QueryId + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(8)] + public ImGuiID QueryId; + + /// + /// + /// C++: + /// imgui_internal.h:2302 + ///
ImVector<ImGuiStackLevelInfo> Results + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(16)] + public ImVector Results; + + /// + /// + /// C++: + /// imgui_internal.h:2303 + ///
bool CopyToClipboardOnCtrlC + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(32)] + public Bool8 CopyToClipboardOnCtrlC; + + /// + /// + /// C++: + /// imgui_internal.h:2304 + ///
float CopyToClipboardLastTime + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(36)] + public float CopyToClipboardLastTime; + + /// + /// + /// C++: + /// imgui_internal.h:2305 + ///
ImGuiTextBuffer ResultPathBuf + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + [FieldOffset(40)] + public ImGuiTextBuffer ResultPathBuf; + } + + /// + /// + /// C++: + /// imgui_internal.h:2297 + ///
struct ImGuiIDStackTool + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public unsafe partial struct ImGuiIDStackToolPtr(ImGuiIDStackTool* ptr) : INullable + { + private ImGuiIDStackTool* _ptr = ptr; + public ImGuiIDStackTool* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiIDStackToolPtr(ImGuiIDStackTool* ptr) => new(ptr); + + public static implicit operator ImGuiIDStackTool*(ImGuiIDStackToolPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2299 + ///
int LastActiveFrame + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref int LastActiveFrame => ref Unsafe.AsRef(&_ptr->LastActiveFrame); + + /// + /// + /// -1: query stack and resize Results, >= 0: individual stack level + /// + /// + /// C++: + /// imgui_internal.h:2300 + ///
int StackLevel + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref int StackLevel => ref Unsafe.AsRef(&_ptr->StackLevel); + + /// + /// + /// ID to query details for + /// + /// + /// C++: + /// imgui_internal.h:2301 + ///
ImGuiID QueryId + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref ImGuiID QueryId => ref Unsafe.AsRef(&_ptr->QueryId); + + /// + /// + /// C++: + /// imgui_internal.h:2302 + ///
ImVector<ImGuiStackLevelInfo> Results + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref ImVector Results => + ref Unsafe.AsRef>(&_ptr->Results); + + /// + /// + /// C++: + /// imgui_internal.h:2303 + ///
bool CopyToClipboardOnCtrlC + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref bool CopyToClipboardOnCtrlC => ref Unsafe.AsRef(&_ptr->CopyToClipboardOnCtrlC); + + /// + /// + /// C++: + /// imgui_internal.h:2304 + ///
float CopyToClipboardLastTime + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref float CopyToClipboardLastTime => ref Unsafe.AsRef(&_ptr->CopyToClipboardLastTime); + + /// + /// + /// C++: + /// imgui_internal.h:2305 + ///
ImGuiTextBuffer ResultPathBuf + ///
+ ///
+ /// + /// + /// State for ID Stack tool queries + /// + /// + public ref ImGuiTextBuffer ResultPathBuf => ref Unsafe.AsRef(&_ptr->ResultPathBuf); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEvent.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEvent.gen.cs new file mode 100644 index 0000000..30d657f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEvent.gen.cs @@ -0,0 +1,301 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1529 + ///
struct ImGuiInputEvent + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct ImGuiInputEvent + { + /// + /// + /// C++: + /// imgui_internal.h:1531 + ///
ImGuiInputEventType Type + ///
+ ///
+ [FieldOffset(0)] + public ImGuiInputEventType Type; + + /// + /// + /// C++: + /// imgui_internal.h:1532 + ///
ImGuiInputSource Source + ///
+ ///
+ [FieldOffset(4)] + public ImGuiInputSource Source; + + /// + /// + /// Unique, sequential increasing integer to identify an event (if you need to correlate them to other + /// data). + /// + /// + /// C++: + /// imgui_internal.h:1533 + ///
ImU32 EventId + ///
+ ///
+ [FieldOffset(8)] + public uint EventId; + + /// + /// + /// if Type == ImGuiInputEventType_MousePos + /// + /// + /// C++: + /// imgui_internal.h:1536 + ///
ImGuiInputEventMousePos MousePos + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventMousePos MousePos; + + /// + /// + /// if Type == ImGuiInputEventType_MouseWheel + /// + /// + /// C++: + /// imgui_internal.h:1537 + ///
ImGuiInputEventMouseWheel MouseWheel + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventMouseWheel MouseWheel; + + /// + /// + /// if Type == ImGuiInputEventType_MouseButton + /// + /// + /// C++: + /// imgui_internal.h:1538 + ///
ImGuiInputEventMouseButton MouseButton + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventMouseButton MouseButton; + + /// + /// + /// if Type == ImGuiInputEventType_MouseViewport + /// + /// + /// C++: + /// imgui_internal.h:1539 + ///
ImGuiInputEventMouseViewport MouseViewport + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventMouseViewport MouseViewport; + + /// + /// + /// if Type == ImGuiInputEventType_Key + /// + /// + /// C++: + /// imgui_internal.h:1540 + ///
ImGuiInputEventKey Key + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventKey Key; + + /// + /// + /// if Type == ImGuiInputEventType_Text + /// + /// + /// C++: + /// imgui_internal.h:1541 + ///
ImGuiInputEventText Text + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventText Text; + + /// + /// + /// if Type == ImGuiInputEventType_Focus + /// + /// + /// C++: + /// imgui_internal.h:1542 + ///
ImGuiInputEventAppFocused AppFocused + ///
+ ///
+ [FieldOffset(12)] + public ImGuiInputEventAppFocused AppFocused; + + /// + /// + /// C++: + /// imgui_internal.h:1544 + ///
bool AddedByTestEngine + ///
+ ///
+ [FieldOffset(24)] + public Bool8 AddedByTestEngine; + } + + /// + /// + /// C++: + /// imgui_internal.h:1529 + ///
struct ImGuiInputEvent + ///
+ ///
+ public unsafe partial struct ImGuiInputEventPtr(ImGuiInputEvent* ptr) : INullable + { + private ImGuiInputEvent* _ptr = ptr; + public ImGuiInputEvent* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventPtr(ImGuiInputEvent* ptr) => new(ptr); + + public static implicit operator ImGuiInputEvent*(ImGuiInputEventPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1531 + ///
ImGuiInputEventType Type + ///
+ ///
+ public ref ImGuiInputEventType Type => ref Unsafe.AsRef(&_ptr->Type); + + /// + /// + /// C++: + /// imgui_internal.h:1532 + ///
ImGuiInputSource Source + ///
+ ///
+ public ref ImGuiInputSource Source => ref Unsafe.AsRef(&_ptr->Source); + + /// + /// + /// Unique, sequential increasing integer to identify an event (if you need to correlate them to other + /// data). + /// + /// + /// C++: + /// imgui_internal.h:1533 + ///
ImU32 EventId + ///
+ ///
+ public ref uint EventId => ref Unsafe.AsRef(&_ptr->EventId); + + /// + /// + /// if Type == ImGuiInputEventType_MousePos + /// + /// + /// C++: + /// imgui_internal.h:1536 + ///
ImGuiInputEventMousePos MousePos + ///
+ ///
+ public ref ImGuiInputEventMousePos MousePos => ref Unsafe.AsRef(&_ptr->MousePos); + + /// + /// + /// if Type == ImGuiInputEventType_MouseWheel + /// + /// + /// C++: + /// imgui_internal.h:1537 + ///
ImGuiInputEventMouseWheel MouseWheel + ///
+ ///
+ public ref ImGuiInputEventMouseWheel MouseWheel => + ref Unsafe.AsRef(&_ptr->MouseWheel); + + /// + /// + /// if Type == ImGuiInputEventType_MouseButton + /// + /// + /// C++: + /// imgui_internal.h:1538 + ///
ImGuiInputEventMouseButton MouseButton + ///
+ ///
+ public ref ImGuiInputEventMouseButton MouseButton => + ref Unsafe.AsRef(&_ptr->MouseButton); + + /// + /// + /// if Type == ImGuiInputEventType_MouseViewport + /// + /// + /// C++: + /// imgui_internal.h:1539 + ///
ImGuiInputEventMouseViewport MouseViewport + ///
+ ///
+ public ref ImGuiInputEventMouseViewport MouseViewport => + ref Unsafe.AsRef(&_ptr->MouseViewport); + + /// + /// + /// if Type == ImGuiInputEventType_Key + /// + /// + /// C++: + /// imgui_internal.h:1540 + ///
ImGuiInputEventKey Key + ///
+ ///
+ public ref ImGuiInputEventKey Key => ref Unsafe.AsRef(&_ptr->Key); + + /// + /// + /// if Type == ImGuiInputEventType_Text + /// + /// + /// C++: + /// imgui_internal.h:1541 + ///
ImGuiInputEventText Text + ///
+ ///
+ public ref ImGuiInputEventText Text => ref Unsafe.AsRef(&_ptr->Text); + + /// + /// + /// if Type == ImGuiInputEventType_Focus + /// + /// + /// C++: + /// imgui_internal.h:1542 + ///
ImGuiInputEventAppFocused AppFocused + ///
+ ///
+ public ref ImGuiInputEventAppFocused AppFocused => + ref Unsafe.AsRef(&_ptr->AppFocused); + + /// + /// + /// C++: + /// imgui_internal.h:1544 + ///
bool AddedByTestEngine + ///
+ ///
+ public ref bool AddedByTestEngine => ref Unsafe.AsRef(&_ptr->AddedByTestEngine); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventAppFocused.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventAppFocused.gen.cs new file mode 100644 index 0000000..513195b --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventAppFocused.gen.cs @@ -0,0 +1,81 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1527 + ///
struct ImGuiInputEventAppFocused { bool Focused; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 1)] + public partial struct ImGuiInputEventAppFocused + { + /// + /// + /// C++: + /// imgui_internal.h:1527 + ///
bool Focused + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public Bool8 Focused; + } + + /// + /// + /// C++: + /// imgui_internal.h:1527 + ///
struct ImGuiInputEventAppFocused { bool Focused; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventAppFocusedPtr(ImGuiInputEventAppFocused* ptr) : INullable + { + private ImGuiInputEventAppFocused* _ptr = ptr; + public ImGuiInputEventAppFocused* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventAppFocusedPtr(ImGuiInputEventAppFocused* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventAppFocused*(ImGuiInputEventAppFocusedPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1527 + ///
bool Focused + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref bool Focused => ref Unsafe.AsRef(&_ptr->Focused); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventKey.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventKey.gen.cs new file mode 100644 index 0000000..0c2291e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventKey.gen.cs @@ -0,0 +1,143 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
struct ImGuiInputEventKey { ImGuiKey Key; bool Down; float AnalogValue; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiInputEventKey + { + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
ImGuiKey Key + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public ImGuiKey Key; + + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
bool Down + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(4)] + public Bool8 Down; + + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
float AnalogValue + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(8)] + public float AnalogValue; + } + + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
struct ImGuiInputEventKey { ImGuiKey Key; bool Down; float AnalogValue; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventKeyPtr(ImGuiInputEventKey* ptr) : INullable + { + private ImGuiInputEventKey* _ptr = ptr; + public ImGuiInputEventKey* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventKeyPtr(ImGuiInputEventKey* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventKey*(ImGuiInputEventKeyPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
ImGuiKey Key + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref ImGuiKey Key => ref Unsafe.AsRef(&_ptr->Key); + + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
bool Down + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref bool Down => ref Unsafe.AsRef(&_ptr->Down); + + /// + /// + /// C++: + /// imgui_internal.h:1525 + ///
float AnalogValue + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref float AnalogValue => ref Unsafe.AsRef(&_ptr->AnalogValue); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseButton.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseButton.gen.cs new file mode 100644 index 0000000..caade12 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseButton.gen.cs @@ -0,0 +1,144 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
struct ImGuiInputEventMouseButton { int Button; bool Down; ImGuiMouseSource MouseSource; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiInputEventMouseButton + { + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
int Button + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public int Button; + + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
bool Down + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(4)] + public Bool8 Down; + + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(8)] + public ImGuiMouseSource MouseSource; + } + + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
struct ImGuiInputEventMouseButton { int Button; bool Down; ImGuiMouseSource MouseSource; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventMouseButtonPtr(ImGuiInputEventMouseButton* ptr) : INullable + { + private ImGuiInputEventMouseButton* _ptr = ptr; + public ImGuiInputEventMouseButton* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventMouseButtonPtr(ImGuiInputEventMouseButton* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventMouseButton*(ImGuiInputEventMouseButtonPtr wrapper) => + wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
int Button + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref int Button => ref Unsafe.AsRef(&_ptr->Button); + + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
bool Down + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref bool Down => ref Unsafe.AsRef(&_ptr->Down); + + /// + /// + /// C++: + /// imgui_internal.h:1523 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref ImGuiMouseSource MouseSource => ref Unsafe.AsRef(&_ptr->MouseSource); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMousePos.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMousePos.gen.cs new file mode 100644 index 0000000..987ccfd --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMousePos.gen.cs @@ -0,0 +1,143 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
struct ImGuiInputEventMousePos { float PosX, PosY; ImGuiMouseSource MouseSource; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiInputEventMousePos + { + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
float PosX + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public float PosX; + + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
float PosX, PosY + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(4)] + public float PosY; + + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(8)] + public ImGuiMouseSource MouseSource; + } + + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
struct ImGuiInputEventMousePos { float PosX, PosY; ImGuiMouseSource MouseSource; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventMousePosPtr(ImGuiInputEventMousePos* ptr) : INullable + { + private ImGuiInputEventMousePos* _ptr = ptr; + public ImGuiInputEventMousePos* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventMousePosPtr(ImGuiInputEventMousePos* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventMousePos*(ImGuiInputEventMousePosPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
float PosX + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref float PosX => ref Unsafe.AsRef(&_ptr->PosX); + + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
float PosX, PosY + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref float PosY => ref Unsafe.AsRef(&_ptr->PosY); + + /// + /// + /// C++: + /// imgui_internal.h:1521 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref ImGuiMouseSource MouseSource => ref Unsafe.AsRef(&_ptr->MouseSource); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseViewport.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseViewport.gen.cs new file mode 100644 index 0000000..94b48fc --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseViewport.gen.cs @@ -0,0 +1,82 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1524 + ///
struct ImGuiInputEventMouseViewport { ImGuiID HoveredViewportID; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct ImGuiInputEventMouseViewport + { + /// + /// + /// C++: + /// imgui_internal.h:1524 + ///
ImGuiID HoveredViewportID + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public ImGuiID HoveredViewportID; + } + + /// + /// + /// C++: + /// imgui_internal.h:1524 + ///
struct ImGuiInputEventMouseViewport { ImGuiID HoveredViewportID; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventMouseViewportPtr(ImGuiInputEventMouseViewport* ptr) : INullable + { + private ImGuiInputEventMouseViewport* _ptr = ptr; + public ImGuiInputEventMouseViewport* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventMouseViewportPtr(ImGuiInputEventMouseViewport* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventMouseViewport*(ImGuiInputEventMouseViewportPtr wrapper) => + wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1524 + ///
ImGuiID HoveredViewportID + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref ImGuiID HoveredViewportID => ref Unsafe.AsRef(&_ptr->HoveredViewportID); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseWheel.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseWheel.gen.cs new file mode 100644 index 0000000..7a7a73e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventMouseWheel.gen.cs @@ -0,0 +1,143 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
struct ImGuiInputEventMouseWheel { float WheelX, WheelY; ImGuiMouseSource MouseSource; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiInputEventMouseWheel + { + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
float WheelX + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public float WheelX; + + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
float WheelX, WheelY + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(4)] + public float WheelY; + + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(8)] + public ImGuiMouseSource MouseSource; + } + + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
struct ImGuiInputEventMouseWheel { float WheelX, WheelY; ImGuiMouseSource MouseSource; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventMouseWheelPtr(ImGuiInputEventMouseWheel* ptr) : INullable + { + private ImGuiInputEventMouseWheel* _ptr = ptr; + public ImGuiInputEventMouseWheel* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventMouseWheelPtr(ImGuiInputEventMouseWheel* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventMouseWheel*(ImGuiInputEventMouseWheelPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
float WheelX + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref float WheelX => ref Unsafe.AsRef(&_ptr->WheelX); + + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
float WheelX, WheelY + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref float WheelY => ref Unsafe.AsRef(&_ptr->WheelY); + + /// + /// + /// C++: + /// imgui_internal.h:1522 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref ImGuiMouseSource MouseSource => ref Unsafe.AsRef(&_ptr->MouseSource); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventText.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventText.gen.cs new file mode 100644 index 0000000..31ad2d7 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputEventText.gen.cs @@ -0,0 +1,81 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1526 + ///
struct ImGuiInputEventText { unsigned int Char; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct ImGuiInputEventText + { + /// + /// + /// C++: + /// imgui_internal.h:1526 + ///
unsigned int Char + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + [FieldOffset(0)] + public uint Char; + } + + /// + /// + /// C++: + /// imgui_internal.h:1526 + ///
struct ImGuiInputEventText { unsigned int Char; } + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public unsafe partial struct ImGuiInputEventTextPtr(ImGuiInputEventText* ptr) : INullable + { + private ImGuiInputEventText* _ptr = ptr; + public ImGuiInputEventText* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputEventTextPtr(ImGuiInputEventText* ptr) => new(ptr); + + public static implicit operator ImGuiInputEventText*(ImGuiInputEventTextPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1526 + ///
unsigned int Char + ///
+ ///
+ /// + /// + /// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension? + /// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor' + /// + /// + public ref uint Char => ref Unsafe.AsRef(&_ptr->Char); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextDeactivatedState.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextDeactivatedState.gen.cs new file mode 100644 index 0000000..2b351a6 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextDeactivatedState.gen.cs @@ -0,0 +1,120 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1197 + ///
struct IMGUI_API ImGuiInputTextDeactivatedState + ///
+ ///
+ /// + /// + /// Internal temporary state for deactivating InputText() instances. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImGuiInputTextDeactivatedState + { + /// + /// + /// widget id owning the text state (which just got deactivated) + /// + /// + /// C++: + /// imgui_internal.h:1199 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Internal temporary state for deactivating InputText() instances. + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// text buffer + /// + /// + /// C++: + /// imgui_internal.h:1200 + ///
ImVector<char> TextA + ///
+ ///
+ /// + /// + /// Internal temporary state for deactivating InputText() instances. + /// + /// + [FieldOffset(8)] + public ImVector TextA; + } + + /// + /// + /// C++: + /// imgui_internal.h:1197 + ///
struct IMGUI_API ImGuiInputTextDeactivatedState + ///
+ ///
+ /// + /// + /// Internal temporary state for deactivating InputText() instances. + /// + /// + public unsafe partial struct ImGuiInputTextDeactivatedStatePtr(ImGuiInputTextDeactivatedState* ptr) : INullable + { + private ImGuiInputTextDeactivatedState* _ptr = ptr; + public ImGuiInputTextDeactivatedState* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputTextDeactivatedStatePtr(ImGuiInputTextDeactivatedState* ptr) => + new(ptr); + + public static implicit operator ImGuiInputTextDeactivatedState*(ImGuiInputTextDeactivatedStatePtr wrapper) => + wrapper.Ptr; + + /// + /// + /// widget id owning the text state (which just got deactivated) + /// + /// + /// C++: + /// imgui_internal.h:1199 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Internal temporary state for deactivating InputText() instances. + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// text buffer + /// + /// + /// C++: + /// imgui_internal.h:1200 + ///
ImVector<char> TextA + ///
+ ///
+ /// + /// + /// Internal temporary state for deactivating InputText() instances. + /// + /// + public ref ImVector TextA => ref Unsafe.AsRef>(&_ptr->TextA); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextState.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextState.gen.cs new file mode 100644 index 0000000..6b65a11 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiInputTextState.gen.cs @@ -0,0 +1,714 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Internal state of the currently focused/edited text input box + /// + /// + /// C++: + /// imgui_internal.h:161 + ///
struct ImGuiInputTextState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 120)] + public partial struct ImGuiInputTextState + { + /// + /// + /// parent UI context (needs to be set explicitly by parent). + /// + /// + /// C++: + /// imgui_internal.h:1221 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(0)] + public ImGuiContextPtr Ctx; + + /// + /// + /// State for stb_textedit.h + /// + /// + /// C++: + /// imgui_internal.h:1222 + ///
ImStbTexteditState* Stb + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(8)] + public Ptr Stb; + + /// + /// + /// copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set. + /// + /// + /// C++: + /// imgui_internal.h:1223 + ///
ImGuiInputTextFlags Flags + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(16)] + public ImGuiInputTextFlags Flags; + + /// + /// + /// widget id owning the text state + /// + /// + /// C++: + /// imgui_internal.h:1224 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(20)] + public ImGuiID ID; + + /// + /// + /// UTF-8 length of the string in TextA (in bytes) + /// + /// + /// C++: + /// imgui_internal.h:1225 + ///
int TextLen + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(24)] + public int TextLen; + + /// + /// + /// == TextA.Data unless read-only, in which case == buf passed to InputText(). Field only set and valid + /// _inside_ the call InputText() call. + /// + /// + /// C++: + /// imgui_internal.h:1226 + ///
const char* TextSrc + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(32)] + public Ptr TextSrc; + + /// + /// + /// main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of + /// course >= CurLenA + 1). + /// + /// + /// C++: + /// imgui_internal.h:1227 + ///
ImVector<char> TextA + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(40)] + public ImVector TextA; + + /// + /// + /// value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, + /// unaltered) + /// + /// + /// C++: + /// imgui_internal.h:1228 + ///
ImVector<char> TextToRevertTo + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(56)] + public ImVector TextToRevertTo; + + /// + /// + /// temporary storage for callback to support automatic reconcile of undo-stack + /// + /// + /// C++: + /// imgui_internal.h:1229 + ///
ImVector<char> CallbackTextBackup + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(72)] + public ImVector CallbackTextBackup; + + /// + /// + /// end-user buffer capacity (include zero terminator) + /// + /// + /// C++: + /// imgui_internal.h:1230 + ///
int BufCapacity + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(88)] + public int BufCapacity; + + /// + /// + /// horizontal offset (managed manually) + vertical scrolling (pulled from child window's own Scroll.y) + /// + /// + /// C++: + /// imgui_internal.h:1231 + ///
ImVec2 Scroll + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(92)] + public float2 Scroll; + + /// + /// + /// timer for cursor blink, reset on every user action so the cursor reappears immediately + /// + /// + /// C++: + /// imgui_internal.h:1232 + ///
float CursorAnim + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(100)] + public float CursorAnim; + + /// + /// + /// set when we want scrolling to follow the current cursor position (not always!) + /// + /// + /// C++: + /// imgui_internal.h:1233 + ///
bool CursorFollow + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(104)] + public Bool8 CursorFollow; + + /// + /// + /// after a double-click to select all, we ignore further mouse drags to update selection + /// + /// + /// C++: + /// imgui_internal.h:1234 + ///
bool SelectedAllMouseLock + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(105)] + public Bool8 SelectedAllMouseLock; + + /// + /// + /// edited this frame + /// + /// + /// C++: + /// imgui_internal.h:1235 + ///
bool Edited + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(106)] + public Bool8 Edited; + + /// + /// + /// force a reload of user buf so it may be modified externally. may be automatic in future version. + /// + /// + /// C++: + /// imgui_internal.h:1236 + ///
bool WantReloadUserBuf + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(107)] + public Bool8 WantReloadUserBuf; + + /// + /// + /// C++: + /// imgui_internal.h:1237 + ///
int ReloadSelectionStart + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(108)] + public int ReloadSelectionStart; + + /// + /// + /// C++: + /// imgui_internal.h:1238 + ///
int ReloadSelectionEnd + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + [FieldOffset(112)] + public int ReloadSelectionEnd; + } + + /// + /// + /// Internal state of the currently focused/edited text input box + /// + /// + /// C++: + /// imgui_internal.h:161 + ///
struct ImGuiInputTextState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiInputTextStatePtr(ImGuiInputTextState* ptr) : INullable + { + private ImGuiInputTextState* _ptr = ptr; + public ImGuiInputTextState* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputTextStatePtr(ImGuiInputTextState* ptr) => new(ptr); + + public static implicit operator ImGuiInputTextState*(ImGuiInputTextStatePtr wrapper) => wrapper.Ptr; + + /// + /// + /// parent UI context (needs to be set explicitly by parent). + /// + /// + /// C++: + /// imgui_internal.h:1221 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref ImGuiContextPtr Ctx => ref Unsafe.AsRef(&_ptr->Ctx); + + /// + /// + /// State for stb_textedit.h + /// + /// + /// C++: + /// imgui_internal.h:1222 + ///
ImStbTexteditState* Stb + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref Ptr Stb => ref Unsafe.AsRef>(&_ptr->Stb); + + /// + /// + /// copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set. + /// + /// + /// C++: + /// imgui_internal.h:1223 + ///
ImGuiInputTextFlags Flags + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// widget id owning the text state + /// + /// + /// C++: + /// imgui_internal.h:1224 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// UTF-8 length of the string in TextA (in bytes) + /// + /// + /// C++: + /// imgui_internal.h:1225 + ///
int TextLen + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref int TextLen => ref Unsafe.AsRef(&_ptr->TextLen); + + /// + /// + /// == TextA.Data unless read-only, in which case == buf passed to InputText(). Field only set and valid + /// _inside_ the call InputText() call. + /// + /// + /// C++: + /// imgui_internal.h:1226 + ///
const char* TextSrc + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref Ptr TextSrc => ref Unsafe.AsRef>(&_ptr->TextSrc); + + /// + /// + /// main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of + /// course >= CurLenA + 1). + /// + /// + /// C++: + /// imgui_internal.h:1227 + ///
ImVector<char> TextA + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref ImVector TextA => ref Unsafe.AsRef>(&_ptr->TextA); + + /// + /// + /// value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, + /// unaltered) + /// + /// + /// C++: + /// imgui_internal.h:1228 + ///
ImVector<char> TextToRevertTo + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref ImVector TextToRevertTo => ref Unsafe.AsRef>(&_ptr->TextToRevertTo); + + /// + /// + /// temporary storage for callback to support automatic reconcile of undo-stack + /// + /// + /// C++: + /// imgui_internal.h:1229 + ///
ImVector<char> CallbackTextBackup + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref ImVector CallbackTextBackup => ref Unsafe.AsRef>(&_ptr->CallbackTextBackup); + + /// + /// + /// end-user buffer capacity (include zero terminator) + /// + /// + /// C++: + /// imgui_internal.h:1230 + ///
int BufCapacity + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref int BufCapacity => ref Unsafe.AsRef(&_ptr->BufCapacity); + + /// + /// + /// horizontal offset (managed manually) + vertical scrolling (pulled from child window's own Scroll.y) + /// + /// + /// C++: + /// imgui_internal.h:1231 + ///
ImVec2 Scroll + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref float2 Scroll => ref Unsafe.AsRef(&_ptr->Scroll); + + /// + /// + /// timer for cursor blink, reset on every user action so the cursor reappears immediately + /// + /// + /// C++: + /// imgui_internal.h:1232 + ///
float CursorAnim + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref float CursorAnim => ref Unsafe.AsRef(&_ptr->CursorAnim); + + /// + /// + /// set when we want scrolling to follow the current cursor position (not always!) + /// + /// + /// C++: + /// imgui_internal.h:1233 + ///
bool CursorFollow + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref bool CursorFollow => ref Unsafe.AsRef(&_ptr->CursorFollow); + + /// + /// + /// after a double-click to select all, we ignore further mouse drags to update selection + /// + /// + /// C++: + /// imgui_internal.h:1234 + ///
bool SelectedAllMouseLock + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref bool SelectedAllMouseLock => ref Unsafe.AsRef(&_ptr->SelectedAllMouseLock); + + /// + /// + /// edited this frame + /// + /// + /// C++: + /// imgui_internal.h:1235 + ///
bool Edited + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref bool Edited => ref Unsafe.AsRef(&_ptr->Edited); + + /// + /// + /// force a reload of user buf so it may be modified externally. may be automatic in future version. + /// + /// + /// C++: + /// imgui_internal.h:1236 + ///
bool WantReloadUserBuf + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref bool WantReloadUserBuf => ref Unsafe.AsRef(&_ptr->WantReloadUserBuf); + + /// + /// + /// C++: + /// imgui_internal.h:1237 + ///
int ReloadSelectionStart + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref int ReloadSelectionStart => ref Unsafe.AsRef(&_ptr->ReloadSelectionStart); + + /// + /// + /// C++: + /// imgui_internal.h:1238 + ///
int ReloadSelectionEnd + ///
+ ///
+ /// + /// + /// Internal state of the currently focused/edited text input box + /// For a given item ID, access with ImGui::GetInputTextState() + /// + /// + public ref int ReloadSelectionEnd => ref Unsafe.AsRef(&_ptr->ReloadSelectionEnd); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyOwnerData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyOwnerData.gen.cs new file mode 100644 index 0000000..3f5004a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyOwnerData.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1583 + ///
struct ImGuiKeyOwnerData + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiKeyOwnerData + { + /// + /// + /// C++: + /// imgui_internal.h:1585 + ///
ImGuiID OwnerCurr + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + [FieldOffset(0)] + public ImGuiID OwnerCurr; + + /// + /// + /// C++: + /// imgui_internal.h:1586 + ///
ImGuiID OwnerNext + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + [FieldOffset(4)] + public ImGuiID OwnerNext; + + /// + /// + /// Reading this key requires explicit owner id (until end of frame). Set by ImGuiInputFlags_LockThisFrame. + /// + /// + /// C++: + /// imgui_internal.h:1587 + ///
bool LockThisFrame + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + [FieldOffset(8)] + public Bool8 LockThisFrame; + + /// + /// + /// Reading this key requires explicit owner id (until key is released). Set by + /// ImGuiInputFlags_LockUntilRelease. When this is true LockThisFrame is always true as well. + /// + /// + /// C++: + /// imgui_internal.h:1588 + ///
bool LockUntilRelease + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + [FieldOffset(9)] + public Bool8 LockUntilRelease; + } + + /// + /// + /// C++: + /// imgui_internal.h:1583 + ///
struct ImGuiKeyOwnerData + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + public unsafe partial struct ImGuiKeyOwnerDataPtr(ImGuiKeyOwnerData* ptr) : INullable + { + private ImGuiKeyOwnerData* _ptr = ptr; + public ImGuiKeyOwnerData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiKeyOwnerDataPtr(ImGuiKeyOwnerData* ptr) => new(ptr); + + public static implicit operator ImGuiKeyOwnerData*(ImGuiKeyOwnerDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1585 + ///
ImGuiID OwnerCurr + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + public ref ImGuiID OwnerCurr => ref Unsafe.AsRef(&_ptr->OwnerCurr); + + /// + /// + /// C++: + /// imgui_internal.h:1586 + ///
ImGuiID OwnerNext + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + public ref ImGuiID OwnerNext => ref Unsafe.AsRef(&_ptr->OwnerNext); + + /// + /// + /// Reading this key requires explicit owner id (until end of frame). Set by ImGuiInputFlags_LockThisFrame. + /// + /// + /// C++: + /// imgui_internal.h:1587 + ///
bool LockThisFrame + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + public ref bool LockThisFrame => ref Unsafe.AsRef(&_ptr->LockThisFrame); + + /// + /// + /// Reading this key requires explicit owner id (until key is released). Set by + /// ImGuiInputFlags_LockUntilRelease. When this is true LockThisFrame is always true as well. + /// + /// + /// C++: + /// imgui_internal.h:1588 + ///
bool LockUntilRelease + ///
+ ///
+ /// + /// + /// This extends ImGuiKeyData but only for named keys (legacy keys don't support the new features) + /// Stored in main context (1 per named key). In the future it might be merged into ImGuiKeyData. + /// + /// + public ref bool LockUntilRelease => ref Unsafe.AsRef(&_ptr->LockUntilRelease); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingData.gen.cs new file mode 100644 index 0000000..47651e0 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingData.gen.cs @@ -0,0 +1,240 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1557 + ///
struct ImGuiKeyRoutingData + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiKeyRoutingData + { + /// + /// + /// C++: + /// imgui_internal.h:1559 + ///
ImGuiKeyRoutingIndex NextEntryIndex + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [FieldOffset(0)] + public short NextEntryIndex; + + /// + /// + /// Technically we'd only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits. + /// + /// + /// C++: + /// imgui_internal.h:1560 + ///
ImU16 Mods + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [FieldOffset(2)] + public ushort Mods; + + /// + /// + /// [DEBUG] For debug display + /// + /// + /// C++: + /// imgui_internal.h:1561 + ///
ImU8 RoutingCurrScore + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [FieldOffset(4)] + public byte RoutingCurrScore; + + /// + /// + /// Lower is better (0: perfect score) + /// + /// + /// C++: + /// imgui_internal.h:1562 + ///
ImU8 RoutingNextScore + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [FieldOffset(5)] + public byte RoutingNextScore; + + /// + /// + /// C++: + /// imgui_internal.h:1563 + ///
ImGuiID RoutingCurr + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [FieldOffset(8)] + public ImGuiID RoutingCurr; + + /// + /// + /// C++: + /// imgui_internal.h:1564 + ///
ImGuiID RoutingNext + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + [FieldOffset(12)] + public ImGuiID RoutingNext; + } + + /// + /// + /// C++: + /// imgui_internal.h:1557 + ///
struct ImGuiKeyRoutingData + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public unsafe partial struct ImGuiKeyRoutingDataPtr(ImGuiKeyRoutingData* ptr) : INullable + { + private ImGuiKeyRoutingData* _ptr = ptr; + public ImGuiKeyRoutingData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiKeyRoutingDataPtr(ImGuiKeyRoutingData* ptr) => new(ptr); + + public static implicit operator ImGuiKeyRoutingData*(ImGuiKeyRoutingDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1559 + ///
ImGuiKeyRoutingIndex NextEntryIndex + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public ref short NextEntryIndex => ref Unsafe.AsRef(&_ptr->NextEntryIndex); + + /// + /// + /// Technically we'd only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits. + /// + /// + /// C++: + /// imgui_internal.h:1560 + ///
ImU16 Mods + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public ref ushort Mods => ref Unsafe.AsRef(&_ptr->Mods); + + /// + /// + /// [DEBUG] For debug display + /// + /// + /// C++: + /// imgui_internal.h:1561 + ///
ImU8 RoutingCurrScore + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public ref byte RoutingCurrScore => ref Unsafe.AsRef(&_ptr->RoutingCurrScore); + + /// + /// + /// Lower is better (0: perfect score) + /// + /// + /// C++: + /// imgui_internal.h:1562 + ///
ImU8 RoutingNextScore + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public ref byte RoutingNextScore => ref Unsafe.AsRef(&_ptr->RoutingNextScore); + + /// + /// + /// C++: + /// imgui_internal.h:1563 + ///
ImGuiID RoutingCurr + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public ref ImGuiID RoutingCurr => ref Unsafe.AsRef(&_ptr->RoutingCurr); + + /// + /// + /// C++: + /// imgui_internal.h:1564 + ///
ImGuiID RoutingNext + ///
+ ///
+ /// + /// + /// Routing table entry (sizeof() == 16 bytes) + /// + /// + public ref ImGuiID RoutingNext => ref Unsafe.AsRef(&_ptr->RoutingNext); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingTable.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingTable.gen.cs new file mode 100644 index 0000000..d78c07f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiKeyRoutingTable.gen.cs @@ -0,0 +1,157 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1571 + ///
struct ImGuiKeyRoutingTable + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 344)] + public partial struct ImGuiKeyRoutingTable + { + /// + /// + /// Index of first entry in Entries[] + /// + /// + /// C++: + /// imgui_internal.h:1573 + ///
ImGuiKeyRoutingIndex Index[ImGuiKey_NamedKey_COUNT] + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + [FieldOffset(0)] + public short_155 Index; + + /// + /// + /// C++: + /// imgui_internal.h:1574 + ///
ImVector<ImGuiKeyRoutingData> Entries + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + [FieldOffset(312)] + public ImVector Entries; + + /// + /// + /// Double-buffer to avoid reallocation (could use a shared buffer) + /// + /// + /// C++: + /// imgui_internal.h:1575 + ///
ImVector<ImGuiKeyRoutingData> EntriesNext + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + [FieldOffset(328)] + public ImVector EntriesNext; + } + + /// + /// + /// C++: + /// imgui_internal.h:1571 + ///
struct ImGuiKeyRoutingTable + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + public unsafe partial struct ImGuiKeyRoutingTablePtr(ImGuiKeyRoutingTable* ptr) : INullable + { + private ImGuiKeyRoutingTable* _ptr = ptr; + public ImGuiKeyRoutingTable* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiKeyRoutingTablePtr(ImGuiKeyRoutingTable* ptr) => new(ptr); + + public static implicit operator ImGuiKeyRoutingTable*(ImGuiKeyRoutingTablePtr wrapper) => wrapper.Ptr; + + /// + /// + /// Index of first entry in Entries[] + /// + /// + /// C++: + /// imgui_internal.h:1573 + ///
ImGuiKeyRoutingIndex Index[ImGuiKey_NamedKey_COUNT] + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + public ref short_155 Index => ref Unsafe.AsRef(&_ptr->Index); + + /// + /// + /// C++: + /// imgui_internal.h:1574 + ///
ImVector<ImGuiKeyRoutingData> Entries + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + public ref ImVector Entries => + ref Unsafe.AsRef>(&_ptr->Entries); + + /// + /// + /// Double-buffer to avoid reallocation (could use a shared buffer) + /// + /// + /// C++: + /// imgui_internal.h:1575 + ///
ImVector<ImGuiKeyRoutingData> EntriesNext + ///
+ ///
+ /// + /// + /// Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. + /// Stored in main context (1 instance) + /// + /// + public ref ImVector EntriesNext => + ref Unsafe.AsRef>(&_ptr->EntriesNext); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiLastItemData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiLastItemData.gen.cs new file mode 100644 index 0000000..8401846 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiLastItemData.gen.cs @@ -0,0 +1,338 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Status storage for last submitted items + /// + /// + /// C++: + /// imgui_internal.h:163 + ///
struct ImGuiLastItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public partial struct ImGuiLastItemData + { + /// + /// + /// C++: + /// imgui_internal.h:1361 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// See ImGuiItemFlags_ (called 'InFlags' before v1.91.4). + /// + /// + /// C++: + /// imgui_internal.h:1362 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + [FieldOffset(4)] + public ImGuiItemFlags ItemFlags; + + /// + /// + /// See ImGuiItemStatusFlags_ + /// + /// + /// C++: + /// imgui_internal.h:1363 + ///
ImGuiItemStatusFlags StatusFlags + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + [FieldOffset(8)] + public ImGuiItemStatusFlags StatusFlags; + + /// + /// + /// Full rectangle + /// + /// + /// C++: + /// imgui_internal.h:1364 + ///
ImRect Rect + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + [FieldOffset(12)] + public floatRect Rect; + + /// + /// + /// Navigation scoring rectangle (not displayed) + /// + /// + /// C++: + /// imgui_internal.h:1365 + ///
ImRect NavRect + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + [FieldOffset(28)] + public floatRect NavRect; + + /// + /// + /// Display rectangle. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasDisplayRect) is set. + /// + /// + /// C++: + /// imgui_internal.h:1367 + ///
ImRect DisplayRect + ///
+ ///
+ /// + /// + /// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags + /// are set. + /// + /// + [FieldOffset(44)] + public floatRect DisplayRect; + + /// + /// + /// Clip rectangle at the time of submitting item. ONLY VALID IF (StatusFlags & + /// ImGuiItemStatusFlags_HasClipRect) is set.. + /// + /// + /// C++: + /// imgui_internal.h:1368 + ///
ImRect ClipRect + ///
+ ///
+ /// + /// + /// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags + /// are set. + /// + /// + [FieldOffset(60)] + public floatRect ClipRect; + + /// + /// + /// Shortcut at the time of submitting item. ONLY VALID IF (StatusFlags & + /// ImGuiItemStatusFlags_HasShortcut) is set.. + /// + /// + /// C++: + /// imgui_internal.h:1369 + ///
ImGuiKeyChord Shortcut + ///
+ ///
+ /// + /// + /// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags + /// are set. + /// + /// + [FieldOffset(76)] + public ImGuiKeyChord Shortcut; + } + + /// + /// + /// Status storage for last submitted items + /// + /// + /// C++: + /// imgui_internal.h:163 + ///
struct ImGuiLastItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiLastItemDataPtr(ImGuiLastItemData* ptr) : INullable + { + private ImGuiLastItemData* _ptr = ptr; + public ImGuiLastItemData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiLastItemDataPtr(ImGuiLastItemData* ptr) => new(ptr); + + public static implicit operator ImGuiLastItemData*(ImGuiLastItemDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1361 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// See ImGuiItemFlags_ (called 'InFlags' before v1.91.4). + /// + /// + /// C++: + /// imgui_internal.h:1362 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + public ref ImGuiItemFlags ItemFlags => ref Unsafe.AsRef(&_ptr->ItemFlags); + + /// + /// + /// See ImGuiItemStatusFlags_ + /// + /// + /// C++: + /// imgui_internal.h:1363 + ///
ImGuiItemStatusFlags StatusFlags + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + public ref ImGuiItemStatusFlags StatusFlags => ref Unsafe.AsRef(&_ptr->StatusFlags); + + /// + /// + /// Full rectangle + /// + /// + /// C++: + /// imgui_internal.h:1364 + ///
ImRect Rect + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + public ref floatRect Rect => ref Unsafe.AsRef(&_ptr->Rect); + + /// + /// + /// Navigation scoring rectangle (not displayed) + /// + /// + /// C++: + /// imgui_internal.h:1365 + ///
ImRect NavRect + ///
+ ///
+ /// + /// + /// Status storage for the last submitted item + /// + /// + public ref floatRect NavRect => ref Unsafe.AsRef(&_ptr->NavRect); + + /// + /// + /// Display rectangle. ONLY VALID IF (StatusFlags & ImGuiItemStatusFlags_HasDisplayRect) is set. + /// + /// + /// C++: + /// imgui_internal.h:1367 + ///
ImRect DisplayRect + ///
+ ///
+ /// + /// + /// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags + /// are set. + /// + /// + public ref floatRect DisplayRect => ref Unsafe.AsRef(&_ptr->DisplayRect); + + /// + /// + /// Clip rectangle at the time of submitting item. ONLY VALID IF (StatusFlags & + /// ImGuiItemStatusFlags_HasClipRect) is set.. + /// + /// + /// C++: + /// imgui_internal.h:1368 + ///
ImRect ClipRect + ///
+ ///
+ /// + /// + /// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags + /// are set. + /// + /// + public ref floatRect ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect); + + /// + /// + /// Shortcut at the time of submitting item. ONLY VALID IF (StatusFlags & + /// ImGuiItemStatusFlags_HasShortcut) is set.. + /// + /// + /// C++: + /// imgui_internal.h:1369 + ///
ImGuiKeyChord Shortcut + ///
+ ///
+ /// + /// + /// Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags + /// are set. + /// + /// + public ref ImGuiKeyChord Shortcut => ref Unsafe.AsRef(&_ptr->Shortcut); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperData.gen.cs new file mode 100644 index 0000000..1e5f12f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperData.gen.cs @@ -0,0 +1,194 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1653 + ///
struct ImGuiListClipperData + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImGuiListClipperData + { + /// + /// + /// C++: + /// imgui_internal.h:1655 + ///
ImGuiListClipper* ListClipper + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + [FieldOffset(0)] + public ImGuiListClipperPtr ListClipper; + + /// + /// + /// C++: + /// imgui_internal.h:1656 + ///
float LossynessOffset + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + [FieldOffset(8)] + public float LossynessOffset; + + /// + /// + /// C++: + /// imgui_internal.h:1657 + ///
int StepNo + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + [FieldOffset(12)] + public int StepNo; + + /// + /// + /// C++: + /// imgui_internal.h:1658 + ///
int ItemsFrozen + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + [FieldOffset(16)] + public int ItemsFrozen; + + /// + /// + /// C++: + /// imgui_internal.h:1659 + ///
ImVector<ImGuiListClipperRange> Ranges + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + [FieldOffset(24)] + public ImVector Ranges; + } + + /// + /// + /// C++: + /// imgui_internal.h:1653 + ///
struct ImGuiListClipperData + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + public unsafe partial struct ImGuiListClipperDataPtr(ImGuiListClipperData* ptr) : INullable + { + private ImGuiListClipperData* _ptr = ptr; + public ImGuiListClipperData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiListClipperDataPtr(ImGuiListClipperData* ptr) => new(ptr); + + public static implicit operator ImGuiListClipperData*(ImGuiListClipperDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1655 + ///
ImGuiListClipper* ListClipper + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + public ref ImGuiListClipperPtr ListClipper => ref Unsafe.AsRef(&_ptr->ListClipper); + + /// + /// + /// C++: + /// imgui_internal.h:1656 + ///
float LossynessOffset + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + public ref float LossynessOffset => ref Unsafe.AsRef(&_ptr->LossynessOffset); + + /// + /// + /// C++: + /// imgui_internal.h:1657 + ///
int StepNo + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + public ref int StepNo => ref Unsafe.AsRef(&_ptr->StepNo); + + /// + /// + /// C++: + /// imgui_internal.h:1658 + ///
int ItemsFrozen + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + public ref int ItemsFrozen => ref Unsafe.AsRef(&_ptr->ItemsFrozen); + + /// + /// + /// C++: + /// imgui_internal.h:1659 + ///
ImVector<ImGuiListClipperRange> Ranges + ///
+ ///
+ /// + /// + /// Temporary clipper data, buffers shared/reused between instances + /// + /// + public ref ImVector Ranges => + ref Unsafe.AsRef>(&_ptr->Ranges); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperRange.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperRange.gen.cs new file mode 100644 index 0000000..00cec4a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiListClipperRange.gen.cs @@ -0,0 +1,211 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1640 + ///
struct ImGuiListClipperRange + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiListClipperRange + { + /// + /// + /// C++: + /// imgui_internal.h:1642 + ///
int Min + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + [FieldOffset(0)] + public int Min; + + /// + /// + /// C++: + /// imgui_internal.h:1643 + ///
int Max + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + [FieldOffset(4)] + public int Max; + + /// + /// + /// Begin/End are absolute position (will be converted to indices later) + /// + /// + /// C++: + /// imgui_internal.h:1644 + ///
bool PosToIndexConvert + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + [FieldOffset(8)] + public Bool8 PosToIndexConvert; + + /// + /// + /// Add to Min after converting to indices + /// + /// + /// C++: + /// imgui_internal.h:1645 + ///
ImS8 PosToIndexOffsetMin + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + [FieldOffset(9)] + public sbyte PosToIndexOffsetMin; + + /// + /// + /// Add to Min after converting to indices + /// + /// + /// C++: + /// imgui_internal.h:1646 + ///
ImS8 PosToIndexOffsetMax + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + [FieldOffset(10)] + public sbyte PosToIndexOffsetMax; + } + + /// + /// + /// C++: + /// imgui_internal.h:1640 + ///
struct ImGuiListClipperRange + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + public unsafe partial struct ImGuiListClipperRangePtr(ImGuiListClipperRange* ptr) : INullable + { + private ImGuiListClipperRange* _ptr = ptr; + public ImGuiListClipperRange* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiListClipperRangePtr(ImGuiListClipperRange* ptr) => new(ptr); + + public static implicit operator ImGuiListClipperRange*(ImGuiListClipperRangePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1642 + ///
int Min + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + public ref int Min => ref Unsafe.AsRef(&_ptr->Min); + + /// + /// + /// C++: + /// imgui_internal.h:1643 + ///
int Max + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + public ref int Max => ref Unsafe.AsRef(&_ptr->Max); + + /// + /// + /// Begin/End are absolute position (will be converted to indices later) + /// + /// + /// C++: + /// imgui_internal.h:1644 + ///
bool PosToIndexConvert + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + public ref bool PosToIndexConvert => ref Unsafe.AsRef(&_ptr->PosToIndexConvert); + + /// + /// + /// Add to Min after converting to indices + /// + /// + /// C++: + /// imgui_internal.h:1645 + ///
ImS8 PosToIndexOffsetMin + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + public ref sbyte PosToIndexOffsetMin => ref Unsafe.AsRef(&_ptr->PosToIndexOffsetMin); + + /// + /// + /// Add to Min after converting to indices + /// + /// + /// C++: + /// imgui_internal.h:1646 + ///
ImS8 PosToIndexOffsetMax + ///
+ ///
+ /// + /// + /// Note that Max is exclusive, so perhaps should be using a Begin/End convention. + /// + /// + public ref sbyte PosToIndexOffsetMax => ref Unsafe.AsRef(&_ptr->PosToIndexOffsetMax); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiLocEntry.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiLocEntry.gen.cs new file mode 100644 index 0000000..e3872c5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiLocEntry.gen.cs @@ -0,0 +1,92 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// A localization entry. + /// + /// + /// C++: + /// imgui_internal.h:164 + ///
struct ImGuiLocEntry + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiLocEntry + { + /// + /// + /// C++: + /// imgui_internal.h:2202 + ///
ImGuiLocKey Key + ///
+ ///
+ [FieldOffset(0)] + public ImGuiLocKey Key; + + /// + /// + /// C++: + /// imgui_internal.h:2203 + ///
const char* Text + ///
+ ///
+ [FieldOffset(8)] + public Ptr Text; + } + + /// + /// + /// A localization entry. + /// + /// + /// C++: + /// imgui_internal.h:164 + ///
struct ImGuiLocEntry + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiLocEntryPtr(ImGuiLocEntry* ptr) : INullable + { + private ImGuiLocEntry* _ptr = ptr; + public ImGuiLocEntry* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiLocEntryPtr(ImGuiLocEntry* ptr) => new(ptr); + + public static implicit operator ImGuiLocEntry*(ImGuiLocEntryPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2202 + ///
ImGuiLocKey Key + ///
+ ///
+ public ref ImGuiLocKey Key => ref Unsafe.AsRef(&_ptr->Key); + + /// + /// + /// C++: + /// imgui_internal.h:2203 + ///
const char* Text + ///
+ ///
+ public ref Ptr Text => ref Unsafe.AsRef>(&_ptr->Text); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiMenuColumns.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMenuColumns.gen.cs new file mode 100644 index 0000000..e8b3871 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMenuColumns.gen.cs @@ -0,0 +1,320 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Simple column measurement, currently used for MenuItem() only + /// + /// + /// C++: + /// imgui_internal.h:165 + ///
struct ImGuiMenuColumns + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct ImGuiMenuColumns + { + /// + /// + /// C++: + /// imgui_internal.h:1181 + ///
ImU32 TotalWidth + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(0)] + public uint TotalWidth; + + /// + /// + /// C++: + /// imgui_internal.h:1182 + ///
ImU32 NextTotalWidth + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(4)] + public uint NextTotalWidth; + + /// + /// + /// C++: + /// imgui_internal.h:1183 + ///
ImU16 Spacing + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(8)] + public ushort Spacing; + + /// + /// + /// Always zero for now + /// + /// + /// C++: + /// imgui_internal.h:1184 + ///
ImU16 OffsetIcon + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(10)] + public ushort OffsetIcon; + + /// + /// + /// Offsets are locked in Update() + /// + /// + /// C++: + /// imgui_internal.h:1185 + ///
ImU16 OffsetLabel + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(12)] + public ushort OffsetLabel; + + /// + /// + /// C++: + /// imgui_internal.h:1186 + ///
ImU16 OffsetShortcut + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(14)] + public ushort OffsetShortcut; + + /// + /// + /// C++: + /// imgui_internal.h:1187 + ///
ImU16 OffsetMark + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(16)] + public ushort OffsetMark; + + /// + /// + /// Width of: Icon, Label, Shortcut, Mark (accumulators for current frame) + /// + /// + /// C++: + /// imgui_internal.h:1188 + ///
ImU16 Widths[4] + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + [FieldOffset(18)] + public ushort_4 Widths; + } + + /// + /// + /// Simple column measurement, currently used for MenuItem() only + /// + /// + /// C++: + /// imgui_internal.h:165 + ///
struct ImGuiMenuColumns + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiMenuColumnsPtr(ImGuiMenuColumns* ptr) : INullable + { + private ImGuiMenuColumns* _ptr = ptr; + public ImGuiMenuColumns* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiMenuColumnsPtr(ImGuiMenuColumns* ptr) => new(ptr); + + public static implicit operator ImGuiMenuColumns*(ImGuiMenuColumnsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1181 + ///
ImU32 TotalWidth + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref uint TotalWidth => ref Unsafe.AsRef(&_ptr->TotalWidth); + + /// + /// + /// C++: + /// imgui_internal.h:1182 + ///
ImU32 NextTotalWidth + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref uint NextTotalWidth => ref Unsafe.AsRef(&_ptr->NextTotalWidth); + + /// + /// + /// C++: + /// imgui_internal.h:1183 + ///
ImU16 Spacing + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref ushort Spacing => ref Unsafe.AsRef(&_ptr->Spacing); + + /// + /// + /// Always zero for now + /// + /// + /// C++: + /// imgui_internal.h:1184 + ///
ImU16 OffsetIcon + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref ushort OffsetIcon => ref Unsafe.AsRef(&_ptr->OffsetIcon); + + /// + /// + /// Offsets are locked in Update() + /// + /// + /// C++: + /// imgui_internal.h:1185 + ///
ImU16 OffsetLabel + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref ushort OffsetLabel => ref Unsafe.AsRef(&_ptr->OffsetLabel); + + /// + /// + /// C++: + /// imgui_internal.h:1186 + ///
ImU16 OffsetShortcut + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref ushort OffsetShortcut => ref Unsafe.AsRef(&_ptr->OffsetShortcut); + + /// + /// + /// C++: + /// imgui_internal.h:1187 + ///
ImU16 OffsetMark + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref ushort OffsetMark => ref Unsafe.AsRef(&_ptr->OffsetMark); + + /// + /// + /// Width of: Icon, Label, Shortcut, Mark (accumulators for current frame) + /// + /// + /// C++: + /// imgui_internal.h:1188 + ///
ImU16 Widths[4] + ///
+ ///
+ /// + /// + /// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away + /// code and NOT a generic helper. + /// + /// + public ref ushort_4 Widths => ref Unsafe.AsRef(&_ptr->Widths); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiMetricsConfig.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMetricsConfig.gen.cs new file mode 100644 index 0000000..856d1ea --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMetricsConfig.gen.cs @@ -0,0 +1,339 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for ShowMetricsWindow() and DebugNodeXXX() functions + /// + /// + /// C++: + /// imgui_internal.h:169 + ///
struct ImGuiMetricsConfig + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImGuiMetricsConfig + { + /// + /// + /// C++: + /// imgui_internal.h:2268 + ///
bool ShowDebugLog = false + ///
+ ///
+ [FieldOffset(0)] + public Bool8 ShowDebugLog; + + /// + /// + /// C++: + /// imgui_internal.h:2269 + ///
bool ShowIDStackTool = false + ///
+ ///
+ [FieldOffset(1)] + public Bool8 ShowIDStackTool; + + /// + /// + /// C++: + /// imgui_internal.h:2270 + ///
bool ShowWindowsRects = false + ///
+ ///
+ [FieldOffset(2)] + public Bool8 ShowWindowsRects; + + /// + /// + /// C++: + /// imgui_internal.h:2271 + ///
bool ShowWindowsBeginOrder = false + ///
+ ///
+ [FieldOffset(3)] + public Bool8 ShowWindowsBeginOrder; + + /// + /// + /// C++: + /// imgui_internal.h:2272 + ///
bool ShowTablesRects = false + ///
+ ///
+ [FieldOffset(4)] + public Bool8 ShowTablesRects; + + /// + /// + /// C++: + /// imgui_internal.h:2273 + ///
bool ShowDrawCmdMesh = true + ///
+ ///
+ [FieldOffset(5)] + public Bool8 ShowDrawCmdMesh; + + /// + /// + /// C++: + /// imgui_internal.h:2274 + ///
bool ShowDrawCmdBoundingBoxes = true + ///
+ ///
+ [FieldOffset(6)] + public Bool8 ShowDrawCmdBoundingBoxes; + + /// + /// + /// C++: + /// imgui_internal.h:2275 + ///
bool ShowTextEncodingViewer = false + ///
+ ///
+ [FieldOffset(7)] + public Bool8 ShowTextEncodingViewer; + + /// + /// + /// C++: + /// imgui_internal.h:2276 + ///
bool ShowTextureUsedRect = false + ///
+ ///
+ [FieldOffset(8)] + public Bool8 ShowTextureUsedRect; + + /// + /// + /// C++: + /// imgui_internal.h:2277 + ///
bool ShowDockingNodes = false + ///
+ ///
+ [FieldOffset(9)] + public Bool8 ShowDockingNodes; + + /// + /// + /// C++: + /// imgui_internal.h:2278 + ///
int ShowWindowsRectsType = -1 + ///
+ ///
+ [FieldOffset(12)] + public int ShowWindowsRectsType; + + /// + /// + /// C++: + /// imgui_internal.h:2279 + ///
int ShowTablesRectsType = -1 + ///
+ ///
+ [FieldOffset(16)] + public int ShowTablesRectsType; + + /// + /// + /// C++: + /// imgui_internal.h:2280 + ///
int HighlightMonitorIdx = -1 + ///
+ ///
+ [FieldOffset(20)] + public int HighlightMonitorIdx; + + /// + /// + /// C++: + /// imgui_internal.h:2281 + ///
ImGuiID HighlightViewportID = 0 + ///
+ ///
+ [FieldOffset(24)] + public ImGuiID HighlightViewportID; + + /// + /// + /// C++: + /// imgui_internal.h:2282 + ///
bool ShowFontPreview = true + ///
+ ///
+ [FieldOffset(28)] + public Bool8 ShowFontPreview; + } + + /// + /// + /// Storage for ShowMetricsWindow() and DebugNodeXXX() functions + /// + /// + /// C++: + /// imgui_internal.h:169 + ///
struct ImGuiMetricsConfig + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiMetricsConfigPtr(ImGuiMetricsConfig* ptr) : INullable + { + private ImGuiMetricsConfig* _ptr = ptr; + public ImGuiMetricsConfig* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiMetricsConfigPtr(ImGuiMetricsConfig* ptr) => new(ptr); + + public static implicit operator ImGuiMetricsConfig*(ImGuiMetricsConfigPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2268 + ///
bool ShowDebugLog = false + ///
+ ///
+ public ref bool ShowDebugLog => ref Unsafe.AsRef(&_ptr->ShowDebugLog); + + /// + /// + /// C++: + /// imgui_internal.h:2269 + ///
bool ShowIDStackTool = false + ///
+ ///
+ public ref bool ShowIDStackTool => ref Unsafe.AsRef(&_ptr->ShowIDStackTool); + + /// + /// + /// C++: + /// imgui_internal.h:2270 + ///
bool ShowWindowsRects = false + ///
+ ///
+ public ref bool ShowWindowsRects => ref Unsafe.AsRef(&_ptr->ShowWindowsRects); + + /// + /// + /// C++: + /// imgui_internal.h:2271 + ///
bool ShowWindowsBeginOrder = false + ///
+ ///
+ public ref bool ShowWindowsBeginOrder => ref Unsafe.AsRef(&_ptr->ShowWindowsBeginOrder); + + /// + /// + /// C++: + /// imgui_internal.h:2272 + ///
bool ShowTablesRects = false + ///
+ ///
+ public ref bool ShowTablesRects => ref Unsafe.AsRef(&_ptr->ShowTablesRects); + + /// + /// + /// C++: + /// imgui_internal.h:2273 + ///
bool ShowDrawCmdMesh = true + ///
+ ///
+ public ref bool ShowDrawCmdMesh => ref Unsafe.AsRef(&_ptr->ShowDrawCmdMesh); + + /// + /// + /// C++: + /// imgui_internal.h:2274 + ///
bool ShowDrawCmdBoundingBoxes = true + ///
+ ///
+ public ref bool ShowDrawCmdBoundingBoxes => ref Unsafe.AsRef(&_ptr->ShowDrawCmdBoundingBoxes); + + /// + /// + /// C++: + /// imgui_internal.h:2275 + ///
bool ShowTextEncodingViewer = false + ///
+ ///
+ public ref bool ShowTextEncodingViewer => ref Unsafe.AsRef(&_ptr->ShowTextEncodingViewer); + + /// + /// + /// C++: + /// imgui_internal.h:2276 + ///
bool ShowTextureUsedRect = false + ///
+ ///
+ public ref bool ShowTextureUsedRect => ref Unsafe.AsRef(&_ptr->ShowTextureUsedRect); + + /// + /// + /// C++: + /// imgui_internal.h:2277 + ///
bool ShowDockingNodes = false + ///
+ ///
+ public ref bool ShowDockingNodes => ref Unsafe.AsRef(&_ptr->ShowDockingNodes); + + /// + /// + /// C++: + /// imgui_internal.h:2278 + ///
int ShowWindowsRectsType = -1 + ///
+ ///
+ public ref int ShowWindowsRectsType => ref Unsafe.AsRef(&_ptr->ShowWindowsRectsType); + + /// + /// + /// C++: + /// imgui_internal.h:2279 + ///
int ShowTablesRectsType = -1 + ///
+ ///
+ public ref int ShowTablesRectsType => ref Unsafe.AsRef(&_ptr->ShowTablesRectsType); + + /// + /// + /// C++: + /// imgui_internal.h:2280 + ///
int HighlightMonitorIdx = -1 + ///
+ ///
+ public ref int HighlightMonitorIdx => ref Unsafe.AsRef(&_ptr->HighlightMonitorIdx); + + /// + /// + /// C++: + /// imgui_internal.h:2281 + ///
ImGuiID HighlightViewportID = 0 + ///
+ ///
+ public ref ImGuiID HighlightViewportID => ref Unsafe.AsRef(&_ptr->HighlightViewportID); + + /// + /// + /// C++: + /// imgui_internal.h:2282 + ///
bool ShowFontPreview = true + ///
+ ///
+ public ref bool ShowFontPreview => ref Unsafe.AsRef(&_ptr->ShowFontPreview); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectState.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectState.gen.cs new file mode 100644 index 0000000..3f8490f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectState.gen.cs @@ -0,0 +1,316 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Multi-selection persistent state (for focused selection). + /// + /// + /// C++: + /// imgui_internal.h:166 + ///
struct ImGuiMultiSelectState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImGuiMultiSelectState + { + /// + /// + /// C++: + /// imgui_internal.h:1918 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(0)] + public ImGuiWindowPtr Window; + + /// + /// + /// C++: + /// imgui_internal.h:1919 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(8)] + public ImGuiID ID; + + /// + /// + /// Last used frame-count, for GC. + /// + /// + /// C++: + /// imgui_internal.h:1920 + ///
int LastFrameActive + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(12)] + public int LastFrameActive; + + /// + /// + /// Set by BeginMultiSelect() based on optional info provided by user. May be -1 if unknown. + /// + /// + /// C++: + /// imgui_internal.h:1921 + ///
int LastSelectionSize + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(16)] + public int LastSelectionSize; + + /// + /// + /// -1 (don't have) or true/false + /// + /// + /// C++: + /// imgui_internal.h:1922 + ///
ImS8 RangeSelected + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(20)] + public sbyte RangeSelected; + + /// + /// + /// -1 (don't have) or true/false + /// + /// + /// C++: + /// imgui_internal.h:1923 + ///
ImS8 NavIdSelected + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(21)] + public sbyte NavIdSelected; + + /// + /// + /// C++: + /// imgui_internal.h:1924 + ///
ImGuiSelectionUserData RangeSrcItem + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(24)] + public ulong RangeSrcItem; + + /// + /// + /// SetNextItemSelectionUserData() value for NavId (if part of submitted items) + /// + /// + /// C++: + /// imgui_internal.h:1925 + ///
ImGuiSelectionUserData NavIdItem + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + [FieldOffset(32)] + public ulong NavIdItem; + } + + /// + /// + /// Multi-selection persistent state (for focused selection). + /// + /// + /// C++: + /// imgui_internal.h:166 + ///
struct ImGuiMultiSelectState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiMultiSelectStatePtr(ImGuiMultiSelectState* ptr) : INullable + { + private ImGuiMultiSelectState* _ptr = ptr; + public ImGuiMultiSelectState* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiMultiSelectStatePtr(ImGuiMultiSelectState* ptr) => new(ptr); + + public static implicit operator ImGuiMultiSelectState*(ImGuiMultiSelectStatePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1918 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// C++: + /// imgui_internal.h:1919 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// Last used frame-count, for GC. + /// + /// + /// C++: + /// imgui_internal.h:1920 + ///
int LastFrameActive + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref int LastFrameActive => ref Unsafe.AsRef(&_ptr->LastFrameActive); + + /// + /// + /// Set by BeginMultiSelect() based on optional info provided by user. May be -1 if unknown. + /// + /// + /// C++: + /// imgui_internal.h:1921 + ///
int LastSelectionSize + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref int LastSelectionSize => ref Unsafe.AsRef(&_ptr->LastSelectionSize); + + /// + /// + /// -1 (don't have) or true/false + /// + /// + /// C++: + /// imgui_internal.h:1922 + ///
ImS8 RangeSelected + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref sbyte RangeSelected => ref Unsafe.AsRef(&_ptr->RangeSelected); + + /// + /// + /// -1 (don't have) or true/false + /// + /// + /// C++: + /// imgui_internal.h:1923 + ///
ImS8 NavIdSelected + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref sbyte NavIdSelected => ref Unsafe.AsRef(&_ptr->NavIdSelected); + + /// + /// + /// C++: + /// imgui_internal.h:1924 + ///
ImGuiSelectionUserData RangeSrcItem + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref ulong RangeSrcItem => ref Unsafe.AsRef(&_ptr->RangeSrcItem); + + /// + /// + /// SetNextItemSelectionUserData() value for NavId (if part of submitted items) + /// + /// + /// C++: + /// imgui_internal.h:1925 + ///
ImGuiSelectionUserData NavIdItem + ///
+ ///
+ /// + /// + /// Persistent storage for multi-select (as long as selection is alive) + /// + /// + public ref ulong NavIdItem => ref Unsafe.AsRef(&_ptr->NavIdItem); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectTempData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectTempData.gen.cs new file mode 100644 index 0000000..94ad515 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiMultiSelectTempData.gen.cs @@ -0,0 +1,578 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Multi-selection temporary state (while traversing). + /// + /// + /// C++: + /// imgui_internal.h:167 + ///
struct ImGuiMultiSelectTempData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct ImGuiMultiSelectTempData + { + /// + /// + /// MUST BE FIRST FIELD. Requests are set and returned by BeginMultiSelect()/EndMultiSelect() + written to + /// by user during the loop. + /// + /// + /// C++: + /// imgui_internal.h:1893 + ///
ImGuiMultiSelectIO IO + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(0)] + public ImGuiMultiSelectIO IO; + + /// + /// + /// C++: + /// imgui_internal.h:1894 + ///
ImGuiMultiSelectState* Storage + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(40)] + public ImGuiMultiSelectStatePtr Storage; + + /// + /// + /// Copied from g.CurrentFocusScopeId (unless another selection scope was pushed manually) + /// + /// + /// C++: + /// imgui_internal.h:1895 + ///
ImGuiID FocusScopeId + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(48)] + public ImGuiID FocusScopeId; + + /// + /// + /// C++: + /// imgui_internal.h:1896 + ///
ImGuiMultiSelectFlags Flags + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(52)] + public ImGuiMultiSelectFlags Flags; + + /// + /// + /// C++: + /// imgui_internal.h:1897 + ///
ImVec2 ScopeRectMin + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(56)] + public float2 ScopeRectMin; + + /// + /// + /// C++: + /// imgui_internal.h:1898 + ///
ImVec2 BackupCursorMaxPos + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(64)] + public float2 BackupCursorMaxPos; + + /// + /// + /// Copy of last submitted item data, used to merge output ranges. + /// + /// + /// C++: + /// imgui_internal.h:1899 + ///
ImGuiSelectionUserData LastSubmittedItem + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(72)] + public ulong LastSubmittedItem; + + /// + /// + /// C++: + /// imgui_internal.h:1900 + ///
ImGuiID BoxSelectId + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(80)] + public ImGuiID BoxSelectId; + + /// + /// + /// C++: + /// imgui_internal.h:1901 + ///
ImGuiKeyChord KeyMods + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(84)] + public ImGuiKeyChord KeyMods; + + /// + /// + /// -1: no operation, 0: clear all, 1: select all. + /// + /// + /// C++: + /// imgui_internal.h:1902 + ///
ImS8 LoopRequestSetAll + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(88)] + public sbyte LoopRequestSetAll; + + /// + /// + /// Set when switching IO from BeginMultiSelect() to EndMultiSelect() state. + /// + /// + /// C++: + /// imgui_internal.h:1903 + ///
bool IsEndIO + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(89)] + public Bool8 IsEndIO; + + /// + /// + /// Set if currently focusing the selection scope (any item of the selection). May be used if you have + /// custom shortcut associated to selection. + /// + /// + /// C++: + /// imgui_internal.h:1904 + ///
bool IsFocused + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(90)] + public Bool8 IsFocused; + + /// + /// + /// Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford + /// a frame of lag with Shift+Navigation. + /// + /// + /// C++: + /// imgui_internal.h:1905 + ///
bool IsKeyboardSetRange + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(91)] + public Bool8 IsKeyboardSetRange; + + /// + /// + /// C++: + /// imgui_internal.h:1906 + ///
bool NavIdPassedBy + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(92)] + public Bool8 NavIdPassedBy; + + /// + /// + /// Set by the item that matches RangeSrcItem. + /// + /// + /// C++: + /// imgui_internal.h:1907 + ///
bool RangeSrcPassedBy + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(93)] + public Bool8 RangeSrcPassedBy; + + /// + /// + /// Set by the item that matches NavJustMovedToId when IsSetRange is set. + /// + /// + /// C++: + /// imgui_internal.h:1908 + ///
bool RangeDstPassedBy + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + [FieldOffset(94)] + public Bool8 RangeDstPassedBy; + } + + /// + /// + /// Multi-selection temporary state (while traversing). + /// + /// + /// C++: + /// imgui_internal.h:167 + ///
struct ImGuiMultiSelectTempData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiMultiSelectTempDataPtr(ImGuiMultiSelectTempData* ptr) : INullable + { + private ImGuiMultiSelectTempData* _ptr = ptr; + public ImGuiMultiSelectTempData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiMultiSelectTempDataPtr(ImGuiMultiSelectTempData* ptr) => new(ptr); + + public static implicit operator ImGuiMultiSelectTempData*(ImGuiMultiSelectTempDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// MUST BE FIRST FIELD. Requests are set and returned by BeginMultiSelect()/EndMultiSelect() + written to + /// by user during the loop. + /// + /// + /// C++: + /// imgui_internal.h:1893 + ///
ImGuiMultiSelectIO IO + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ImGuiMultiSelectIO IO => ref Unsafe.AsRef(&_ptr->IO); + + /// + /// + /// C++: + /// imgui_internal.h:1894 + ///
ImGuiMultiSelectState* Storage + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ImGuiMultiSelectStatePtr Storage => ref Unsafe.AsRef(&_ptr->Storage); + + /// + /// + /// Copied from g.CurrentFocusScopeId (unless another selection scope was pushed manually) + /// + /// + /// C++: + /// imgui_internal.h:1895 + ///
ImGuiID FocusScopeId + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ImGuiID FocusScopeId => ref Unsafe.AsRef(&_ptr->FocusScopeId); + + /// + /// + /// C++: + /// imgui_internal.h:1896 + ///
ImGuiMultiSelectFlags Flags + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ImGuiMultiSelectFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// imgui_internal.h:1897 + ///
ImVec2 ScopeRectMin + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref float2 ScopeRectMin => ref Unsafe.AsRef(&_ptr->ScopeRectMin); + + /// + /// + /// C++: + /// imgui_internal.h:1898 + ///
ImVec2 BackupCursorMaxPos + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref float2 BackupCursorMaxPos => ref Unsafe.AsRef(&_ptr->BackupCursorMaxPos); + + /// + /// + /// Copy of last submitted item data, used to merge output ranges. + /// + /// + /// C++: + /// imgui_internal.h:1899 + ///
ImGuiSelectionUserData LastSubmittedItem + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ulong LastSubmittedItem => ref Unsafe.AsRef(&_ptr->LastSubmittedItem); + + /// + /// + /// C++: + /// imgui_internal.h:1900 + ///
ImGuiID BoxSelectId + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ImGuiID BoxSelectId => ref Unsafe.AsRef(&_ptr->BoxSelectId); + + /// + /// + /// C++: + /// imgui_internal.h:1901 + ///
ImGuiKeyChord KeyMods + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref ImGuiKeyChord KeyMods => ref Unsafe.AsRef(&_ptr->KeyMods); + + /// + /// + /// -1: no operation, 0: clear all, 1: select all. + /// + /// + /// C++: + /// imgui_internal.h:1902 + ///
ImS8 LoopRequestSetAll + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref sbyte LoopRequestSetAll => ref Unsafe.AsRef(&_ptr->LoopRequestSetAll); + + /// + /// + /// Set when switching IO from BeginMultiSelect() to EndMultiSelect() state. + /// + /// + /// C++: + /// imgui_internal.h:1903 + ///
bool IsEndIO + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref bool IsEndIO => ref Unsafe.AsRef(&_ptr->IsEndIO); + + /// + /// + /// Set if currently focusing the selection scope (any item of the selection). May be used if you have + /// custom shortcut associated to selection. + /// + /// + /// C++: + /// imgui_internal.h:1904 + ///
bool IsFocused + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref bool IsFocused => ref Unsafe.AsRef(&_ptr->IsFocused); + + /// + /// + /// Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford + /// a frame of lag with Shift+Navigation. + /// + /// + /// C++: + /// imgui_internal.h:1905 + ///
bool IsKeyboardSetRange + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref bool IsKeyboardSetRange => ref Unsafe.AsRef(&_ptr->IsKeyboardSetRange); + + /// + /// + /// C++: + /// imgui_internal.h:1906 + ///
bool NavIdPassedBy + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref bool NavIdPassedBy => ref Unsafe.AsRef(&_ptr->NavIdPassedBy); + + /// + /// + /// Set by the item that matches RangeSrcItem. + /// + /// + /// C++: + /// imgui_internal.h:1907 + ///
bool RangeSrcPassedBy + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref bool RangeSrcPassedBy => ref Unsafe.AsRef(&_ptr->RangeSrcPassedBy); + + /// + /// + /// Set by the item that matches NavJustMovedToId when IsSetRange is set. + /// + /// + /// C++: + /// imgui_internal.h:1908 + ///
bool RangeDstPassedBy + ///
+ ///
+ /// + /// + /// Temporary storage for multi-select + /// + /// + public ref bool RangeDstPassedBy => ref Unsafe.AsRef(&_ptr->RangeDstPassedBy); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiNavItemData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiNavItemData.gen.cs new file mode 100644 index 0000000..0ba66d9 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiNavItemData.gen.cs @@ -0,0 +1,371 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Result of a keyboard/gamepad directional navigation move query result + /// + /// + /// C++: + /// imgui_internal.h:168 + ///
struct ImGuiNavItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiNavItemData + { + /// + /// + /// Init,Move // Best candidate window (result->ItemWindow->RootWindowForNav == request->Window) + /// + /// + /// C++: + /// imgui_internal.h:1741 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(0)] + public ImGuiWindowPtr Window; + + /// + /// + /// Init,Move // Best candidate item ID + /// + /// + /// C++: + /// imgui_internal.h:1742 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(8)] + public ImGuiID ID; + + /// + /// + /// Init,Move // Best candidate focus scope ID + /// + /// + /// C++: + /// imgui_internal.h:1743 + ///
ImGuiID FocusScopeId + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(12)] + public ImGuiID FocusScopeId; + + /// + /// + /// Init,Move // Best candidate bounding box in window relative space + /// + /// + /// C++: + /// imgui_internal.h:1744 + ///
ImRect RectRel + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(16)] + public floatRect RectRel; + + /// + /// + /// ????,Move // Best candidate item flags + /// + /// + /// C++: + /// imgui_internal.h:1745 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(32)] + public ImGuiItemFlags ItemFlags; + + /// + /// + /// Move // Best candidate box distance to current NavId + /// + /// + /// C++: + /// imgui_internal.h:1746 + ///
float DistBox + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(36)] + public float DistBox; + + /// + /// + /// Move // Best candidate center distance to current NavId + /// + /// + /// C++: + /// imgui_internal.h:1747 + ///
float DistCenter + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(40)] + public float DistCenter; + + /// + /// + /// Move // Best candidate axial distance to current NavId + /// + /// + /// C++: + /// imgui_internal.h:1748 + ///
float DistAxial + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(44)] + public float DistAxial; + + /// + /// + /// I+Mov // Best candidate SetNextItemSelectionUserData() value. Valid if (ItemFlags & + /// ImGuiItemFlags_HasSelectionUserData) + /// + /// + /// C++: + /// imgui_internal.h:1749 + ///
ImGuiSelectionUserData SelectionUserData + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + [FieldOffset(48)] + public ulong SelectionUserData; + } + + /// + /// + /// Result of a keyboard/gamepad directional navigation move query result + /// + /// + /// C++: + /// imgui_internal.h:168 + ///
struct ImGuiNavItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiNavItemDataPtr(ImGuiNavItemData* ptr) : INullable + { + private ImGuiNavItemData* _ptr = ptr; + public ImGuiNavItemData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiNavItemDataPtr(ImGuiNavItemData* ptr) => new(ptr); + + public static implicit operator ImGuiNavItemData*(ImGuiNavItemDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Init,Move // Best candidate window (result->ItemWindow->RootWindowForNav == request->Window) + /// + /// + /// C++: + /// imgui_internal.h:1741 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// Init,Move // Best candidate item ID + /// + /// + /// C++: + /// imgui_internal.h:1742 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// Init,Move // Best candidate focus scope ID + /// + /// + /// C++: + /// imgui_internal.h:1743 + ///
ImGuiID FocusScopeId + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref ImGuiID FocusScopeId => ref Unsafe.AsRef(&_ptr->FocusScopeId); + + /// + /// + /// Init,Move // Best candidate bounding box in window relative space + /// + /// + /// C++: + /// imgui_internal.h:1744 + ///
ImRect RectRel + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref floatRect RectRel => ref Unsafe.AsRef(&_ptr->RectRel); + + /// + /// + /// ????,Move // Best candidate item flags + /// + /// + /// C++: + /// imgui_internal.h:1745 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref ImGuiItemFlags ItemFlags => ref Unsafe.AsRef(&_ptr->ItemFlags); + + /// + /// + /// Move // Best candidate box distance to current NavId + /// + /// + /// C++: + /// imgui_internal.h:1746 + ///
float DistBox + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref float DistBox => ref Unsafe.AsRef(&_ptr->DistBox); + + /// + /// + /// Move // Best candidate center distance to current NavId + /// + /// + /// C++: + /// imgui_internal.h:1747 + ///
float DistCenter + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref float DistCenter => ref Unsafe.AsRef(&_ptr->DistCenter); + + /// + /// + /// Move // Best candidate axial distance to current NavId + /// + /// + /// C++: + /// imgui_internal.h:1748 + ///
float DistAxial + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref float DistAxial => ref Unsafe.AsRef(&_ptr->DistAxial); + + /// + /// + /// I+Mov // Best candidate SetNextItemSelectionUserData() value. Valid if (ItemFlags & + /// ImGuiItemFlags_HasSelectionUserData) + /// + /// + /// C++: + /// imgui_internal.h:1749 + ///
ImGuiSelectionUserData SelectionUserData + ///
+ ///
+ /// + /// + /// Storage for navigation query/results + /// + /// + public ref ulong SelectionUserData => ref Unsafe.AsRef(&_ptr->SelectionUserData); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiNextItemData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiNextItemData.gen.cs new file mode 100644 index 0000000..62bf8ab --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiNextItemData.gen.cs @@ -0,0 +1,439 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for SetNextItem** functions + /// + /// + /// C++: + /// imgui_internal.h:171 + ///
struct ImGuiNextItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiNextItemData + { + /// + /// + /// Called HasFlags instead of Flags to avoid mistaking this + /// + /// + /// C++: + /// imgui_internal.h:1340 + ///
ImGuiNextItemDataFlags HasFlags + ///
+ ///
+ [FieldOffset(0)] + public ImGuiNextItemDataFlags HasFlags; + + /// + /// + /// Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData. + /// + /// + /// C++: + /// imgui_internal.h:1341 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ [FieldOffset(4)] + public ImGuiItemFlags ItemFlags; + + /// + /// + /// Set by SetNextItemSelectionUserData() + /// + /// + /// C++: + /// imgui_internal.h:1344 + ///
ImGuiID FocusScopeId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(8)] + public ImGuiID FocusScopeId; + + /// + /// + /// Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == + /// ImGuiSelectionUserData_Invalid to mark invalid values) + /// + /// + /// C++: + /// imgui_internal.h:1345 + ///
ImGuiSelectionUserData SelectionUserData + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(16)] + public ulong SelectionUserData; + + /// + /// + /// Set by SetNextItemWidth() + /// + /// + /// C++: + /// imgui_internal.h:1346 + ///
float Width + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(24)] + public float Width; + + /// + /// + /// Set by SetNextItemShortcut() + /// + /// + /// C++: + /// imgui_internal.h:1347 + ///
ImGuiKeyChord Shortcut + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(28)] + public ImGuiKeyChord Shortcut; + + /// + /// + /// Set by SetNextItemShortcut() + /// + /// + /// C++: + /// imgui_internal.h:1348 + ///
ImGuiInputFlags ShortcutFlags + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(32)] + public ImGuiInputFlags ShortcutFlags; + + /// + /// + /// Set by SetNextItemOpen() + /// + /// + /// C++: + /// imgui_internal.h:1349 + ///
bool OpenVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(36)] + public Bool8 OpenVal; + + /// + /// + /// Set by SetNextItemOpen() + /// + /// + /// C++: + /// imgui_internal.h:1350 + ///
ImU8 OpenCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(37)] + public byte OpenCond; + + /// + /// + /// Not exposed yet, for ImGuiInputTextFlags_ParseEmptyAsRefVal + /// + /// + /// C++: + /// imgui_internal.h:1351 + ///
ImGuiDataTypeStorage RefVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(38)] + public ImGuiDataTypeStorage RefVal; + + /// + /// + /// Set by SetNextItemStorageID() + /// + /// + /// C++: + /// imgui_internal.h:1352 + ///
ImGuiID StorageId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + [FieldOffset(48)] + public ImGuiID StorageId; + } + + /// + /// + /// Storage for SetNextItem** functions + /// + /// + /// C++: + /// imgui_internal.h:171 + ///
struct ImGuiNextItemData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiNextItemDataPtr(ImGuiNextItemData* ptr) : INullable + { + private ImGuiNextItemData* _ptr = ptr; + public ImGuiNextItemData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiNextItemDataPtr(ImGuiNextItemData* ptr) => new(ptr); + + public static implicit operator ImGuiNextItemData*(ImGuiNextItemDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Called HasFlags instead of Flags to avoid mistaking this + /// + /// + /// C++: + /// imgui_internal.h:1340 + ///
ImGuiNextItemDataFlags HasFlags + ///
+ ///
+ public ref ImGuiNextItemDataFlags HasFlags => ref Unsafe.AsRef(&_ptr->HasFlags); + + /// + /// + /// Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData. + /// + /// + /// C++: + /// imgui_internal.h:1341 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ public ref ImGuiItemFlags ItemFlags => ref Unsafe.AsRef(&_ptr->ItemFlags); + + /// + /// + /// Set by SetNextItemSelectionUserData() + /// + /// + /// C++: + /// imgui_internal.h:1344 + ///
ImGuiID FocusScopeId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref ImGuiID FocusScopeId => ref Unsafe.AsRef(&_ptr->FocusScopeId); + + /// + /// + /// Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == + /// ImGuiSelectionUserData_Invalid to mark invalid values) + /// + /// + /// C++: + /// imgui_internal.h:1345 + ///
ImGuiSelectionUserData SelectionUserData + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref ulong SelectionUserData => ref Unsafe.AsRef(&_ptr->SelectionUserData); + + /// + /// + /// Set by SetNextItemWidth() + /// + /// + /// C++: + /// imgui_internal.h:1346 + ///
float Width + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref float Width => ref Unsafe.AsRef(&_ptr->Width); + + /// + /// + /// Set by SetNextItemShortcut() + /// + /// + /// C++: + /// imgui_internal.h:1347 + ///
ImGuiKeyChord Shortcut + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref ImGuiKeyChord Shortcut => ref Unsafe.AsRef(&_ptr->Shortcut); + + /// + /// + /// Set by SetNextItemShortcut() + /// + /// + /// C++: + /// imgui_internal.h:1348 + ///
ImGuiInputFlags ShortcutFlags + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref ImGuiInputFlags ShortcutFlags => ref Unsafe.AsRef(&_ptr->ShortcutFlags); + + /// + /// + /// Set by SetNextItemOpen() + /// + /// + /// C++: + /// imgui_internal.h:1349 + ///
bool OpenVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref bool OpenVal => ref Unsafe.AsRef(&_ptr->OpenVal); + + /// + /// + /// Set by SetNextItemOpen() + /// + /// + /// C++: + /// imgui_internal.h:1350 + ///
ImU8 OpenCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref byte OpenCond => ref Unsafe.AsRef(&_ptr->OpenCond); + + /// + /// + /// Not exposed yet, for ImGuiInputTextFlags_ParseEmptyAsRefVal + /// + /// + /// C++: + /// imgui_internal.h:1351 + ///
ImGuiDataTypeStorage RefVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref ImGuiDataTypeStorage RefVal => ref Unsafe.AsRef(&_ptr->RefVal); + + /// + /// + /// Set by SetNextItemStorageID() + /// + /// + /// C++: + /// imgui_internal.h:1352 + ///
ImGuiID StorageId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared by ItemAdd() meaning they are still valid during e.g. NavProcessItem(). + /// Always rely on HasFlags. + /// + /// + public ref ImGuiID StorageId => ref Unsafe.AsRef(&_ptr->StorageId); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiNextWindowData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiNextWindowData.gen.cs new file mode 100644 index 0000000..d6cd105 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiNextWindowData.gen.cs @@ -0,0 +1,742 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for SetNextWindow** functions + /// + /// + /// C++: + /// imgui_internal.h:170 + ///
struct ImGuiNextWindowData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 160)] + public partial struct ImGuiNextWindowData + { + /// + /// + /// C++: + /// imgui_internal.h:1298 + ///
ImGuiNextWindowDataFlags HasFlags + ///
+ ///
+ /// + /// + /// Storage for SetNexWindow** functions + /// + /// + [FieldOffset(0)] + public ImGuiNextWindowDataFlags HasFlags; + + /// + /// + /// C++: + /// imgui_internal.h:1301 + ///
ImGuiCond PosCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(4)] + public ImGuiCond PosCond; + + /// + /// + /// C++: + /// imgui_internal.h:1302 + ///
ImGuiCond SizeCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(8)] + public ImGuiCond SizeCond; + + /// + /// + /// C++: + /// imgui_internal.h:1303 + ///
ImGuiCond CollapsedCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(12)] + public ImGuiCond CollapsedCond; + + /// + /// + /// C++: + /// imgui_internal.h:1304 + ///
ImGuiCond DockCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(16)] + public ImGuiCond DockCond; + + /// + /// + /// C++: + /// imgui_internal.h:1305 + ///
ImVec2 PosVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(20)] + public float2 PosVal; + + /// + /// + /// C++: + /// imgui_internal.h:1306 + ///
ImVec2 PosPivotVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(28)] + public float2 PosPivotVal; + + /// + /// + /// C++: + /// imgui_internal.h:1307 + ///
ImVec2 SizeVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(36)] + public float2 SizeVal; + + /// + /// + /// C++: + /// imgui_internal.h:1308 + ///
ImVec2 ContentSizeVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(44)] + public float2 ContentSizeVal; + + /// + /// + /// C++: + /// imgui_internal.h:1309 + ///
ImVec2 ScrollVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(52)] + public float2 ScrollVal; + + /// + /// + /// Only honored by BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:1310 + ///
ImGuiWindowFlags WindowFlags + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(60)] + public ImGuiWindowFlags WindowFlags; + + /// + /// + /// C++: + /// imgui_internal.h:1311 + ///
ImGuiChildFlags ChildFlags + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(64)] + public ImGuiChildFlags ChildFlags; + + /// + /// + /// C++: + /// imgui_internal.h:1312 + ///
bool PosUndock + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(68)] + public Bool8 PosUndock; + + /// + /// + /// C++: + /// imgui_internal.h:1313 + ///
bool CollapsedVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(69)] + public Bool8 CollapsedVal; + + /// + /// + /// C++: + /// imgui_internal.h:1314 + ///
ImRect SizeConstraintRect + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(72)] + public floatRect SizeConstraintRect; + + /// + /// + /// C++: + /// imgui_internal.h:1315 + ///
ImGuiSizeCallback SizeCallback + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(88)] + public nint SizeCallback; + + /// + /// + /// C++: + /// imgui_internal.h:1316 + ///
void* SizeCallbackUserData + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(96)] + public nint SizeCallbackUserData; + + /// + /// + /// Override background alpha + /// + /// + /// C++: + /// imgui_internal.h:1317 + ///
float BgAlphaVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(104)] + public float BgAlphaVal; + + /// + /// + /// C++: + /// imgui_internal.h:1318 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(108)] + public ImGuiID ViewportId; + + /// + /// + /// C++: + /// imgui_internal.h:1319 + ///
ImGuiID DockId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(112)] + public ImGuiID DockId; + + /// + /// + /// C++: + /// imgui_internal.h:1320 + ///
ImGuiWindowClass WindowClass + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(116)] + public ImGuiWindowClass WindowClass; + + /// + /// + /// (Always on) This is not exposed publicly, so we don't clear it and it doesn't have a corresponding flag + /// (could we? for consistency?) + /// + /// + /// C++: + /// imgui_internal.h:1321 + ///
ImVec2 MenuBarOffsetMinVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(148)] + public float2 MenuBarOffsetMinVal; + + /// + /// + /// C++: + /// imgui_internal.h:1322 + ///
ImGuiWindowRefreshFlags RefreshFlagsVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + [FieldOffset(156)] + public ImGuiWindowRefreshFlags RefreshFlagsVal; + } + + /// + /// + /// Storage for SetNextWindow** functions + /// + /// + /// C++: + /// imgui_internal.h:170 + ///
struct ImGuiNextWindowData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiNextWindowDataPtr(ImGuiNextWindowData* ptr) : INullable + { + private ImGuiNextWindowData* _ptr = ptr; + public ImGuiNextWindowData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiNextWindowDataPtr(ImGuiNextWindowData* ptr) => new(ptr); + + public static implicit operator ImGuiNextWindowData*(ImGuiNextWindowDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1298 + ///
ImGuiNextWindowDataFlags HasFlags + ///
+ ///
+ /// + /// + /// Storage for SetNexWindow** functions + /// + /// + public ref ImGuiNextWindowDataFlags HasFlags => ref Unsafe.AsRef(&_ptr->HasFlags); + + /// + /// + /// C++: + /// imgui_internal.h:1301 + ///
ImGuiCond PosCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiCond PosCond => ref Unsafe.AsRef(&_ptr->PosCond); + + /// + /// + /// C++: + /// imgui_internal.h:1302 + ///
ImGuiCond SizeCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiCond SizeCond => ref Unsafe.AsRef(&_ptr->SizeCond); + + /// + /// + /// C++: + /// imgui_internal.h:1303 + ///
ImGuiCond CollapsedCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiCond CollapsedCond => ref Unsafe.AsRef(&_ptr->CollapsedCond); + + /// + /// + /// C++: + /// imgui_internal.h:1304 + ///
ImGuiCond DockCond + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiCond DockCond => ref Unsafe.AsRef(&_ptr->DockCond); + + /// + /// + /// C++: + /// imgui_internal.h:1305 + ///
ImVec2 PosVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float2 PosVal => ref Unsafe.AsRef(&_ptr->PosVal); + + /// + /// + /// C++: + /// imgui_internal.h:1306 + ///
ImVec2 PosPivotVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float2 PosPivotVal => ref Unsafe.AsRef(&_ptr->PosPivotVal); + + /// + /// + /// C++: + /// imgui_internal.h:1307 + ///
ImVec2 SizeVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float2 SizeVal => ref Unsafe.AsRef(&_ptr->SizeVal); + + /// + /// + /// C++: + /// imgui_internal.h:1308 + ///
ImVec2 ContentSizeVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float2 ContentSizeVal => ref Unsafe.AsRef(&_ptr->ContentSizeVal); + + /// + /// + /// C++: + /// imgui_internal.h:1309 + ///
ImVec2 ScrollVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float2 ScrollVal => ref Unsafe.AsRef(&_ptr->ScrollVal); + + /// + /// + /// Only honored by BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:1310 + ///
ImGuiWindowFlags WindowFlags + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiWindowFlags WindowFlags => ref Unsafe.AsRef(&_ptr->WindowFlags); + + /// + /// + /// C++: + /// imgui_internal.h:1311 + ///
ImGuiChildFlags ChildFlags + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiChildFlags ChildFlags => ref Unsafe.AsRef(&_ptr->ChildFlags); + + /// + /// + /// C++: + /// imgui_internal.h:1312 + ///
bool PosUndock + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref bool PosUndock => ref Unsafe.AsRef(&_ptr->PosUndock); + + /// + /// + /// C++: + /// imgui_internal.h:1313 + ///
bool CollapsedVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref bool CollapsedVal => ref Unsafe.AsRef(&_ptr->CollapsedVal); + + /// + /// + /// C++: + /// imgui_internal.h:1314 + ///
ImRect SizeConstraintRect + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref floatRect SizeConstraintRect => ref Unsafe.AsRef(&_ptr->SizeConstraintRect); + + /// + /// + /// C++: + /// imgui_internal.h:1315 + ///
ImGuiSizeCallback SizeCallback + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref nint SizeCallback => ref Unsafe.AsRef(&_ptr->SizeCallback); + + /// + /// + /// C++: + /// imgui_internal.h:1316 + ///
void* SizeCallbackUserData + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref nint SizeCallbackUserData => ref Unsafe.AsRef(&_ptr->SizeCallbackUserData); + + /// + /// + /// Override background alpha + /// + /// + /// C++: + /// imgui_internal.h:1317 + ///
float BgAlphaVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float BgAlphaVal => ref Unsafe.AsRef(&_ptr->BgAlphaVal); + + /// + /// + /// C++: + /// imgui_internal.h:1318 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiID ViewportId => ref Unsafe.AsRef(&_ptr->ViewportId); + + /// + /// + /// C++: + /// imgui_internal.h:1319 + ///
ImGuiID DockId + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiID DockId => ref Unsafe.AsRef(&_ptr->DockId); + + /// + /// + /// C++: + /// imgui_internal.h:1320 + ///
ImGuiWindowClass WindowClass + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiWindowClass WindowClass => ref Unsafe.AsRef(&_ptr->WindowClass); + + /// + /// + /// (Always on) This is not exposed publicly, so we don't clear it and it doesn't have a corresponding flag + /// (could we? for consistency?) + /// + /// + /// C++: + /// imgui_internal.h:1321 + ///
ImVec2 MenuBarOffsetMinVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref float2 MenuBarOffsetMinVal => ref Unsafe.AsRef(&_ptr->MenuBarOffsetMinVal); + + /// + /// + /// C++: + /// imgui_internal.h:1322 + ///
ImGuiWindowRefreshFlags RefreshFlagsVal + ///
+ ///
+ /// + /// + /// Members below are NOT cleared. Always rely on HasFlags. + /// + /// + public ref ImGuiWindowRefreshFlags RefreshFlagsVal => + ref Unsafe.AsRef(&_ptr->RefreshFlagsVal); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumnData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumnData.gen.cs new file mode 100644 index 0000000..4278958 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumnData.gen.cs @@ -0,0 +1,142 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage data for a single column for legacy Columns() api + /// + /// + /// C++: + /// imgui_internal.h:172 + ///
struct ImGuiOldColumnData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct ImGuiOldColumnData + { + /// + /// + /// Column start offset, normalized 0.0 (far left) -> 1.0 (far right) + /// + /// + /// C++: + /// imgui_internal.h:1826 + ///
float OffsetNorm + ///
+ ///
+ [FieldOffset(0)] + public float OffsetNorm; + + /// + /// + /// C++: + /// imgui_internal.h:1827 + ///
float OffsetNormBeforeResize + ///
+ ///
+ [FieldOffset(4)] + public float OffsetNormBeforeResize; + + /// + /// + /// Not exposed + /// + /// + /// C++: + /// imgui_internal.h:1828 + ///
ImGuiOldColumnFlags Flags + ///
+ ///
+ [FieldOffset(8)] + public ImGuiOldColumnFlags Flags; + + /// + /// + /// C++: + /// imgui_internal.h:1829 + ///
ImRect ClipRect + ///
+ ///
+ [FieldOffset(12)] + public floatRect ClipRect; + } + + /// + /// + /// Storage data for a single column for legacy Columns() api + /// + /// + /// C++: + /// imgui_internal.h:172 + ///
struct ImGuiOldColumnData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiOldColumnDataPtr(ImGuiOldColumnData* ptr) : INullable + { + private ImGuiOldColumnData* _ptr = ptr; + public ImGuiOldColumnData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiOldColumnDataPtr(ImGuiOldColumnData* ptr) => new(ptr); + + public static implicit operator ImGuiOldColumnData*(ImGuiOldColumnDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Column start offset, normalized 0.0 (far left) -> 1.0 (far right) + /// + /// + /// C++: + /// imgui_internal.h:1826 + ///
float OffsetNorm + ///
+ ///
+ public ref float OffsetNorm => ref Unsafe.AsRef(&_ptr->OffsetNorm); + + /// + /// + /// C++: + /// imgui_internal.h:1827 + ///
float OffsetNormBeforeResize + ///
+ ///
+ public ref float OffsetNormBeforeResize => ref Unsafe.AsRef(&_ptr->OffsetNormBeforeResize); + + /// + /// + /// Not exposed + /// + /// + /// C++: + /// imgui_internal.h:1828 + ///
ImGuiOldColumnFlags Flags + ///
+ ///
+ public ref ImGuiOldColumnFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// imgui_internal.h:1829 + ///
ImRect ClipRect + ///
+ ///
+ public ref floatRect ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumns.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumns.gen.cs new file mode 100644 index 0000000..1265802 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiOldColumns.gen.cs @@ -0,0 +1,420 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage data for a columns set for legacy Columns() api + /// + /// + /// C++: + /// imgui_internal.h:173 + ///
struct ImGuiOldColumns + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public partial struct ImGuiOldColumns + { + /// + /// + /// C++: + /// imgui_internal.h:1836 + ///
ImGuiID ID + ///
+ ///
+ [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:1837 + ///
ImGuiOldColumnFlags Flags + ///
+ ///
+ [FieldOffset(4)] + public ImGuiOldColumnFlags Flags; + + /// + /// + /// C++: + /// imgui_internal.h:1838 + ///
bool IsFirstFrame + ///
+ ///
+ [FieldOffset(8)] + public Bool8 IsFirstFrame; + + /// + /// + /// C++: + /// imgui_internal.h:1839 + ///
bool IsBeingResized + ///
+ ///
+ [FieldOffset(9)] + public Bool8 IsBeingResized; + + /// + /// + /// C++: + /// imgui_internal.h:1840 + ///
int Current + ///
+ ///
+ [FieldOffset(12)] + public int Current; + + /// + /// + /// C++: + /// imgui_internal.h:1841 + ///
int Count + ///
+ ///
+ [FieldOffset(16)] + public int Count; + + /// + /// + /// Offsets from HostWorkRect.Min.x + /// + /// + /// C++: + /// imgui_internal.h:1842 + ///
float OffMinX + ///
+ ///
+ [FieldOffset(20)] + public float OffMinX; + + /// + /// + /// Offsets from HostWorkRect.Min.x + /// + /// + /// C++: + /// imgui_internal.h:1842 + ///
float OffMinX, OffMaxX + ///
+ ///
+ [FieldOffset(24)] + public float OffMaxX; + + /// + /// + /// C++: + /// imgui_internal.h:1843 + ///
float LineMinY + ///
+ ///
+ [FieldOffset(28)] + public float LineMinY; + + /// + /// + /// C++: + /// imgui_internal.h:1843 + ///
float LineMinY, LineMaxY + ///
+ ///
+ [FieldOffset(32)] + public float LineMaxY; + + /// + /// + /// Backup of CursorPos at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1844 + ///
float HostCursorPosY + ///
+ ///
+ [FieldOffset(36)] + public float HostCursorPosY; + + /// + /// + /// Backup of CursorMaxPos at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1845 + ///
float HostCursorMaxPosX + ///
+ ///
+ [FieldOffset(40)] + public float HostCursorMaxPosX; + + /// + /// + /// Backup of ClipRect at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1846 + ///
ImRect HostInitialClipRect + ///
+ ///
+ [FieldOffset(44)] + public floatRect HostInitialClipRect; + + /// + /// + /// Backup of ClipRect during PushColumnsBackground()/PopColumnsBackground() + /// + /// + /// C++: + /// imgui_internal.h:1847 + ///
ImRect HostBackupClipRect + ///
+ ///
+ [FieldOffset(60)] + public floatRect HostBackupClipRect; + + /// + /// + /// Backup of WorkRect at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1848 + ///
ImRect HostBackupParentWorkRect + ///
+ ///
+ [FieldOffset(76)] + public floatRect HostBackupParentWorkRect; + + /// + /// + /// C++: + /// imgui_internal.h:1849 + ///
ImVector<ImGuiOldColumnData> Columns + ///
+ ///
+ [FieldOffset(96)] + public ImVector Columns; + + /// + /// + /// C++: + /// imgui_internal.h:1850 + ///
ImDrawListSplitter Splitter + ///
+ ///
+ [FieldOffset(112)] + public ImDrawListSplitter Splitter; + } + + /// + /// + /// Storage data for a columns set for legacy Columns() api + /// + /// + /// C++: + /// imgui_internal.h:173 + ///
struct ImGuiOldColumns + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiOldColumnsPtr(ImGuiOldColumns* ptr) : INullable + { + private ImGuiOldColumns* _ptr = ptr; + public ImGuiOldColumns* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiOldColumnsPtr(ImGuiOldColumns* ptr) => new(ptr); + + public static implicit operator ImGuiOldColumns*(ImGuiOldColumnsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1836 + ///
ImGuiID ID + ///
+ ///
+ public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:1837 + ///
ImGuiOldColumnFlags Flags + ///
+ ///
+ public ref ImGuiOldColumnFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// imgui_internal.h:1838 + ///
bool IsFirstFrame + ///
+ ///
+ public ref bool IsFirstFrame => ref Unsafe.AsRef(&_ptr->IsFirstFrame); + + /// + /// + /// C++: + /// imgui_internal.h:1839 + ///
bool IsBeingResized + ///
+ ///
+ public ref bool IsBeingResized => ref Unsafe.AsRef(&_ptr->IsBeingResized); + + /// + /// + /// C++: + /// imgui_internal.h:1840 + ///
int Current + ///
+ ///
+ public ref int Current => ref Unsafe.AsRef(&_ptr->Current); + + /// + /// + /// C++: + /// imgui_internal.h:1841 + ///
int Count + ///
+ ///
+ public ref int Count => ref Unsafe.AsRef(&_ptr->Count); + + /// + /// + /// Offsets from HostWorkRect.Min.x + /// + /// + /// C++: + /// imgui_internal.h:1842 + ///
float OffMinX + ///
+ ///
+ public ref float OffMinX => ref Unsafe.AsRef(&_ptr->OffMinX); + + /// + /// + /// Offsets from HostWorkRect.Min.x + /// + /// + /// C++: + /// imgui_internal.h:1842 + ///
float OffMinX, OffMaxX + ///
+ ///
+ public ref float OffMaxX => ref Unsafe.AsRef(&_ptr->OffMaxX); + + /// + /// + /// C++: + /// imgui_internal.h:1843 + ///
float LineMinY + ///
+ ///
+ public ref float LineMinY => ref Unsafe.AsRef(&_ptr->LineMinY); + + /// + /// + /// C++: + /// imgui_internal.h:1843 + ///
float LineMinY, LineMaxY + ///
+ ///
+ public ref float LineMaxY => ref Unsafe.AsRef(&_ptr->LineMaxY); + + /// + /// + /// Backup of CursorPos at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1844 + ///
float HostCursorPosY + ///
+ ///
+ public ref float HostCursorPosY => ref Unsafe.AsRef(&_ptr->HostCursorPosY); + + /// + /// + /// Backup of CursorMaxPos at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1845 + ///
float HostCursorMaxPosX + ///
+ ///
+ public ref float HostCursorMaxPosX => ref Unsafe.AsRef(&_ptr->HostCursorMaxPosX); + + /// + /// + /// Backup of ClipRect at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1846 + ///
ImRect HostInitialClipRect + ///
+ ///
+ public ref floatRect HostInitialClipRect => ref Unsafe.AsRef(&_ptr->HostInitialClipRect); + + /// + /// + /// Backup of ClipRect during PushColumnsBackground()/PopColumnsBackground() + /// + /// + /// C++: + /// imgui_internal.h:1847 + ///
ImRect HostBackupClipRect + ///
+ ///
+ public ref floatRect HostBackupClipRect => ref Unsafe.AsRef(&_ptr->HostBackupClipRect); + + /// + /// + /// Backup of WorkRect at the time of BeginColumns() + /// + /// + /// C++: + /// imgui_internal.h:1848 + ///
ImRect HostBackupParentWorkRect + ///
+ ///
+ public ref floatRect HostBackupParentWorkRect => ref Unsafe.AsRef(&_ptr->HostBackupParentWorkRect); + + /// + /// + /// C++: + /// imgui_internal.h:1849 + ///
ImVector<ImGuiOldColumnData> Columns + ///
+ ///
+ public ref ImVector Columns => + ref Unsafe.AsRef>(&_ptr->Columns); + + /// + /// + /// C++: + /// imgui_internal.h:1850 + ///
ImDrawListSplitter Splitter + ///
+ ///
+ public ref ImDrawListSplitter Splitter => ref Unsafe.AsRef(&_ptr->Splitter); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiPopupData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiPopupData.gen.cs new file mode 100644 index 0000000..a1b7656 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiPopupData.gen.cs @@ -0,0 +1,338 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for current popup stack + /// + /// + /// C++: + /// imgui_internal.h:174 + ///
struct ImGuiPopupData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiPopupData + { + /// + /// + /// Set on OpenPopup() + /// + /// + /// C++: + /// imgui_internal.h:1456 + ///
ImGuiID PopupId + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(0)] + public ImGuiID PopupId; + + /// + /// + /// Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() + /// + /// + /// C++: + /// imgui_internal.h:1457 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(8)] + public ImGuiWindowPtr Window; + + /// + /// + /// Set on OpenPopup(), a NavWindow that will be restored on popup close + /// + /// + /// C++: + /// imgui_internal.h:1458 + ///
ImGuiWindow* RestoreNavWindow + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(16)] + public ImGuiWindowPtr RestoreNavWindow; + + /// + /// + /// Resolved on BeginPopup(). Actually a ImGuiNavLayer type (declared down below), initialized to -1 which + /// is not part of an enum, but serves well-enough as "not any of layers" value + /// + /// + /// C++: + /// imgui_internal.h:1459 + ///
int ParentNavLayer + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(24)] + public int ParentNavLayer; + + /// + /// + /// Set on OpenPopup() + /// + /// + /// C++: + /// imgui_internal.h:1460 + ///
int OpenFrameCount + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(28)] + public int OpenFrameCount; + + /// + /// + /// Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu + /// bar vs loose menu items) + /// + /// + /// C++: + /// imgui_internal.h:1461 + ///
ImGuiID OpenParentId + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(32)] + public ImGuiID OpenParentId; + + /// + /// + /// Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse) + /// + /// + /// C++: + /// imgui_internal.h:1462 + ///
ImVec2 OpenPopupPos + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(36)] + public float2 OpenPopupPos; + + /// + /// + /// Set on OpenPopup(), copy of mouse position at the time of opening popup + /// + /// + /// C++: + /// imgui_internal.h:1463 + ///
ImVec2 OpenMousePos + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + [FieldOffset(44)] + public float2 OpenMousePos; + } + + /// + /// + /// Storage for current popup stack + /// + /// + /// C++: + /// imgui_internal.h:174 + ///
struct ImGuiPopupData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiPopupDataPtr(ImGuiPopupData* ptr) : INullable + { + private ImGuiPopupData* _ptr = ptr; + public ImGuiPopupData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiPopupDataPtr(ImGuiPopupData* ptr) => new(ptr); + + public static implicit operator ImGuiPopupData*(ImGuiPopupDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Set on OpenPopup() + /// + /// + /// C++: + /// imgui_internal.h:1456 + ///
ImGuiID PopupId + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref ImGuiID PopupId => ref Unsafe.AsRef(&_ptr->PopupId); + + /// + /// + /// Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() + /// + /// + /// C++: + /// imgui_internal.h:1457 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// Set on OpenPopup(), a NavWindow that will be restored on popup close + /// + /// + /// C++: + /// imgui_internal.h:1458 + ///
ImGuiWindow* RestoreNavWindow + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref ImGuiWindowPtr RestoreNavWindow => ref Unsafe.AsRef(&_ptr->RestoreNavWindow); + + /// + /// + /// Resolved on BeginPopup(). Actually a ImGuiNavLayer type (declared down below), initialized to -1 which + /// is not part of an enum, but serves well-enough as "not any of layers" value + /// + /// + /// C++: + /// imgui_internal.h:1459 + ///
int ParentNavLayer + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref int ParentNavLayer => ref Unsafe.AsRef(&_ptr->ParentNavLayer); + + /// + /// + /// Set on OpenPopup() + /// + /// + /// C++: + /// imgui_internal.h:1460 + ///
int OpenFrameCount + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref int OpenFrameCount => ref Unsafe.AsRef(&_ptr->OpenFrameCount); + + /// + /// + /// Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu + /// bar vs loose menu items) + /// + /// + /// C++: + /// imgui_internal.h:1461 + ///
ImGuiID OpenParentId + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref ImGuiID OpenParentId => ref Unsafe.AsRef(&_ptr->OpenParentId); + + /// + /// + /// Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse) + /// + /// + /// C++: + /// imgui_internal.h:1462 + ///
ImVec2 OpenPopupPos + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref float2 OpenPopupPos => ref Unsafe.AsRef(&_ptr->OpenPopupPos); + + /// + /// + /// Set on OpenPopup(), copy of mouse position at the time of opening popup + /// + /// + /// C++: + /// imgui_internal.h:1463 + ///
ImVec2 OpenMousePos + ///
+ ///
+ /// + /// + /// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) + /// + /// + public ref float2 OpenMousePos => ref Unsafe.AsRef(&_ptr->OpenMousePos); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiPtrOrIndex.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiPtrOrIndex.gen.cs new file mode 100644 index 0000000..700733e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiPtrOrIndex.gen.cs @@ -0,0 +1,90 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1424 + ///
struct ImGuiPtrOrIndex + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiPtrOrIndex + { + /// + /// + /// Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a + /// pool. + /// + /// + /// C++: + /// imgui_internal.h:1426 + ///
void* Ptr + ///
+ ///
+ [FieldOffset(0)] + public nint Ptr; + + /// + /// + /// Usually index in a main pool. + /// + /// + /// C++: + /// imgui_internal.h:1427 + ///
int Index + ///
+ ///
+ [FieldOffset(8)] + public int Index; + } + + /// + /// + /// C++: + /// imgui_internal.h:1424 + ///
struct ImGuiPtrOrIndex + ///
+ ///
+ public unsafe partial struct ImGuiPtrOrIndexPtr(ImGuiPtrOrIndex* ptr) : INullable + { + private ImGuiPtrOrIndex* _ptr = ptr; + public ImGuiPtrOrIndex* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiPtrOrIndexPtr(ImGuiPtrOrIndex* ptr) => new(ptr); + + public static implicit operator ImGuiPtrOrIndex*(ImGuiPtrOrIndexPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a + /// pool. + /// + /// + /// C++: + /// imgui_internal.h:1426 + ///
void* Ptr + ///
+ ///
+ public ref nint Pointer => ref Unsafe.AsRef(&_ptr->Ptr); + + /// + /// + /// Usually index in a main pool. + /// + /// + /// C++: + /// imgui_internal.h:1427 + ///
int Index + ///
+ ///
+ public ref int Index => ref Unsafe.AsRef(&_ptr->Index); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiSettingsHandler.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiSettingsHandler.gen.cs new file mode 100644 index 0000000..07d5966 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiSettingsHandler.gen.cs @@ -0,0 +1,277 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for one type registered in the .ini file + /// + /// + /// C++: + /// imgui_internal.h:175 + ///
struct ImGuiSettingsHandler + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public partial struct ImGuiSettingsHandler + { + /// + /// + /// Short description stored in .ini file. Disallowed characters: '[' ']' + /// + /// + /// C++: + /// imgui_internal.h:2164 + ///
const char* TypeName + ///
+ ///
+ [FieldOffset(0)] + public Ptr TypeName; + + /// + /// + /// == ImHashStr(TypeName) + /// + /// + /// C++: + /// imgui_internal.h:2165 + ///
ImGuiID TypeHash + ///
+ ///
+ [FieldOffset(8)] + public ImGuiID TypeHash; + + /// + /// + /// Clear all settings data + /// + /// + /// C++: + /// imgui_internal.h:2166 + ///
void (*ClearAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler) + ///
+ ///
+ [FieldOffset(16)] + public nint ClearAllFn; + + /// + /// + /// Read: Called before reading (in registration order) + /// + /// + /// C++: + /// imgui_internal.h:2167 + ///
void (*ReadInitFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler) + ///
+ ///
+ [FieldOffset(24)] + public nint ReadInitFn; + + /// + /// + /// Read: Called when entering into a new ini entry e.g. "[Window][Name]" + /// + /// + /// C++: + /// imgui_internal.h:2168 + ///
void* (*ReadOpenFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name) + ///
+ ///
+ [FieldOffset(32)] + public nint ReadOpenFn; + + /// + /// + /// Read: Called for every line of text within an ini entry + /// + /// + /// C++: + /// imgui_internal.h:2169 + ///
+ /// void (*ReadLineFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line) + ///
+ ///
+ [FieldOffset(40)] + public nint ReadLineFn; + + /// + /// + /// Read: Called after reading (in registration order) + /// + /// + /// C++: + /// imgui_internal.h:2170 + ///
void (*ApplyAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler) + ///
+ ///
+ [FieldOffset(48)] + public nint ApplyAllFn; + + /// + /// + /// Write: Output every entries into 'out_buf' + /// + /// + /// C++: + /// imgui_internal.h:2171 + ///
+ /// void (*WriteAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* out_buf) + ///
+ ///
+ [FieldOffset(56)] + public nint WriteAllFn; + + /// + /// + /// C++: + /// imgui_internal.h:2172 + ///
void* UserData + ///
+ ///
+ [FieldOffset(64)] + public nint UserData; + } + + /// + /// + /// Storage for one type registered in the .ini file + /// + /// + /// C++: + /// imgui_internal.h:175 + ///
struct ImGuiSettingsHandler + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiSettingsHandlerPtr(ImGuiSettingsHandler* ptr) : INullable + { + private ImGuiSettingsHandler* _ptr = ptr; + public ImGuiSettingsHandler* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiSettingsHandlerPtr(ImGuiSettingsHandler* ptr) => new(ptr); + + public static implicit operator ImGuiSettingsHandler*(ImGuiSettingsHandlerPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Short description stored in .ini file. Disallowed characters: '[' ']' + /// + /// + /// C++: + /// imgui_internal.h:2164 + ///
const char* TypeName + ///
+ ///
+ public ref Ptr TypeName => ref Unsafe.AsRef>(&_ptr->TypeName); + + /// + /// + /// == ImHashStr(TypeName) + /// + /// + /// C++: + /// imgui_internal.h:2165 + ///
ImGuiID TypeHash + ///
+ ///
+ public ref ImGuiID TypeHash => ref Unsafe.AsRef(&_ptr->TypeHash); + + /// + /// + /// Clear all settings data + /// + /// + /// C++: + /// imgui_internal.h:2166 + ///
void (*ClearAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler) + ///
+ ///
+ public ref nint ClearAllFn => ref Unsafe.AsRef(&_ptr->ClearAllFn); + + /// + /// + /// Read: Called before reading (in registration order) + /// + /// + /// C++: + /// imgui_internal.h:2167 + ///
void (*ReadInitFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler) + ///
+ ///
+ public ref nint ReadInitFn => ref Unsafe.AsRef(&_ptr->ReadInitFn); + + /// + /// + /// Read: Called when entering into a new ini entry e.g. "[Window][Name]" + /// + /// + /// C++: + /// imgui_internal.h:2168 + ///
void* (*ReadOpenFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name) + ///
+ ///
+ public ref nint ReadOpenFn => ref Unsafe.AsRef(&_ptr->ReadOpenFn); + + /// + /// + /// Read: Called for every line of text within an ini entry + /// + /// + /// C++: + /// imgui_internal.h:2169 + ///
+ /// void (*ReadLineFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line) + ///
+ ///
+ public ref nint ReadLineFn => ref Unsafe.AsRef(&_ptr->ReadLineFn); + + /// + /// + /// Read: Called after reading (in registration order) + /// + /// + /// C++: + /// imgui_internal.h:2170 + ///
void (*ApplyAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler) + ///
+ ///
+ public ref nint ApplyAllFn => ref Unsafe.AsRef(&_ptr->ApplyAllFn); + + /// + /// + /// Write: Output every entries into 'out_buf' + /// + /// + /// C++: + /// imgui_internal.h:2171 + ///
+ /// void (*WriteAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* out_buf) + ///
+ ///
+ public ref nint WriteAllFn => ref Unsafe.AsRef(&_ptr->WriteAllFn); + + /// + /// + /// C++: + /// imgui_internal.h:2172 + ///
void* UserData + ///
+ ///
+ public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiShrinkWidthItem.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiShrinkWidthItem.gen.cs new file mode 100644 index 0000000..e11d0c4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiShrinkWidthItem.gen.cs @@ -0,0 +1,95 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1417 + ///
struct ImGuiShrinkWidthItem + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiShrinkWidthItem + { + /// + /// + /// C++: + /// imgui_internal.h:1419 + ///
int Index + ///
+ ///
+ [FieldOffset(0)] + public int Index; + + /// + /// + /// C++: + /// imgui_internal.h:1420 + ///
float Width + ///
+ ///
+ [FieldOffset(4)] + public float Width; + + /// + /// + /// C++: + /// imgui_internal.h:1421 + ///
float InitialWidth + ///
+ ///
+ [FieldOffset(8)] + public float InitialWidth; + } + + /// + /// + /// C++: + /// imgui_internal.h:1417 + ///
struct ImGuiShrinkWidthItem + ///
+ ///
+ public unsafe partial struct ImGuiShrinkWidthItemPtr(ImGuiShrinkWidthItem* ptr) : INullable + { + private ImGuiShrinkWidthItem* _ptr = ptr; + public ImGuiShrinkWidthItem* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiShrinkWidthItemPtr(ImGuiShrinkWidthItem* ptr) => new(ptr); + + public static implicit operator ImGuiShrinkWidthItem*(ImGuiShrinkWidthItemPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1419 + ///
int Index + ///
+ ///
+ public ref int Index => ref Unsafe.AsRef(&_ptr->Index); + + /// + /// + /// C++: + /// imgui_internal.h:1420 + ///
float Width + ///
+ ///
+ public ref float Width => ref Unsafe.AsRef(&_ptr->Width); + + /// + /// + /// C++: + /// imgui_internal.h:1421 + ///
float InitialWidth + ///
+ ///
+ public ref float InitialWidth => ref Unsafe.AsRef(&_ptr->InitialWidth); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiStackLevelInfo.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiStackLevelInfo.gen.cs new file mode 100644 index 0000000..f646760 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiStackLevelInfo.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2285 + ///
struct MS_STRUCT ImGuiStackLevelInfo + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct ImGuiStackLevelInfo + { + /// + /// + /// C++: + /// imgui_internal.h:2287 + ///
ImGuiID ID + ///
+ ///
+ [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// >= 1: Query in progress + /// + /// + /// C++: + /// imgui_internal.h:2288 + ///
ImS8 QueryFrameCount + ///
+ ///
+ [FieldOffset(4)] + public sbyte QueryFrameCount; + + /// + /// + /// Obtained result from DebugHookIdInfo() + /// + /// + /// C++: + /// imgui_internal.h:2289 + ///
bool QuerySuccess + ///
+ ///
+ [FieldOffset(5)] + public Bool8 QuerySuccess; + + /// + /// + /// C++: + /// imgui_internal.h:2290 + ///
ImGuiDataType DataType : 8 + ///
+ ///
+ [FieldOffset(8)] + public ImGuiDataType DataType; + + /// + /// Arbitrarily sized buffer to hold a result (FIXME: could replace Results[] with a chunk stream?) FIXME: Now + /// that we added CTRL+C this should be fixed. + /// + [FieldOffset(12)] + public fixed byte Desc[57]; + } + + /// + /// + /// C++: + /// imgui_internal.h:2285 + ///
struct MS_STRUCT ImGuiStackLevelInfo + ///
+ ///
+ public unsafe partial struct ImGuiStackLevelInfoPtr(ImGuiStackLevelInfo* ptr) : INullable + { + private ImGuiStackLevelInfo* _ptr = ptr; + public ImGuiStackLevelInfo* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiStackLevelInfoPtr(ImGuiStackLevelInfo* ptr) => new(ptr); + + public static implicit operator ImGuiStackLevelInfo*(ImGuiStackLevelInfoPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2287 + ///
ImGuiID ID + ///
+ ///
+ public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// >= 1: Query in progress + /// + /// + /// C++: + /// imgui_internal.h:2288 + ///
ImS8 QueryFrameCount + ///
+ ///
+ public ref sbyte QueryFrameCount => ref Unsafe.AsRef(&_ptr->QueryFrameCount); + + /// + /// + /// Obtained result from DebugHookIdInfo() + /// + /// + /// C++: + /// imgui_internal.h:2289 + ///
bool QuerySuccess + ///
+ ///
+ public ref bool QuerySuccess => ref Unsafe.AsRef(&_ptr->QuerySuccess); + + /// + /// + /// C++: + /// imgui_internal.h:2290 + ///
ImGuiDataType DataType : 8 + ///
+ ///
+ public ref ImGuiDataType DataType => ref Unsafe.AsRef(&_ptr->DataType); + + /// + /// Arbitrarily sized buffer to hold a result (FIXME: could replace Results[] with a chunk stream?) FIXME: Now + /// that we added CTRL+C this should be fixed. + /// + public Span Desc => MemoryMarshal.CreateSpan(ref _ptr->Desc[0], 57); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleMod.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleMod.gen.cs new file mode 100644 index 0000000..c8482f1 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleMod.gen.cs @@ -0,0 +1,147 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Stacked style modifier, backup of modified data so we can restore it + /// + /// + /// C++: + /// imgui_internal.h:176 + ///
struct ImGuiStyleMod + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiStyleMod + { + /// + /// + /// C++: + /// imgui_internal.h:912 + ///
ImGuiStyleVar VarIdx + ///
+ ///
+ /// + /// + /// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the + /// variable. + /// + /// + [FieldOffset(0)] + public ImGuiStyleVar VarIdx; + + /// + /// + /// C++: + /// imgui_internal.h:913 + ///
int BackupInt[2] + ///
+ ///
+ /// + /// + /// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the + /// variable. + /// + /// + [FieldOffset(4)] + public int2 BackupInt; + + /// + /// + /// C++: + /// imgui_internal.h:913 + ///
float BackupFloat[2] + ///
+ ///
+ /// + /// + /// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the + /// variable. + /// + /// + [FieldOffset(4)] + public float2 BackupFloat; + } + + /// + /// + /// Stacked style modifier, backup of modified data so we can restore it + /// + /// + /// C++: + /// imgui_internal.h:176 + ///
struct ImGuiStyleMod + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiStyleModPtr(ImGuiStyleMod* ptr) : INullable + { + private ImGuiStyleMod* _ptr = ptr; + public ImGuiStyleMod* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiStyleModPtr(ImGuiStyleMod* ptr) => new(ptr); + + public static implicit operator ImGuiStyleMod*(ImGuiStyleModPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:912 + ///
ImGuiStyleVar VarIdx + ///
+ ///
+ /// + /// + /// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the + /// variable. + /// + /// + public ref ImGuiStyleVar VarIdx => ref Unsafe.AsRef(&_ptr->VarIdx); + + /// + /// + /// C++: + /// imgui_internal.h:913 + ///
int BackupInt[2] + ///
+ ///
+ /// + /// + /// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the + /// variable. + /// + /// + public ref int2 BackupInt => ref Unsafe.AsRef(&_ptr->BackupInt); + + /// + /// + /// C++: + /// imgui_internal.h:913 + ///
float BackupFloat[2] + ///
+ ///
+ /// + /// + /// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the + /// variable. + /// + /// + public ref float2 BackupFloat => ref Unsafe.AsRef(&_ptr->BackupFloat); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleVarInfo.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleVarInfo.gen.cs new file mode 100644 index 0000000..929c591 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiStyleVarInfo.gen.cs @@ -0,0 +1,123 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Style variable information (e.g. to access style variables from an enum) + /// + /// + /// C++: + /// imgui_internal.h:177 + ///
struct ImGuiStyleVarInfo + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct ImGuiStyleVarInfo + { + /// + /// + /// 1+ + /// + /// + /// C++: + /// imgui_internal.h:896 + ///
ImU32 Count : 8 + ///
+ ///
+ [FieldOffset(0)] + public uint Count; + + /// + /// + /// C++: + /// imgui_internal.h:897 + ///
ImGuiDataType DataType : 8 + ///
+ ///
+ [FieldOffset(1)] + public ImGuiDataType DataType; + + /// + /// + /// Offset in parent structure + /// + /// + /// C++: + /// imgui_internal.h:898 + ///
ImU32 Offset : 16 + ///
+ ///
+ [FieldOffset(2)] + public uint Offset; + } + + /// + /// + /// Style variable information (e.g. to access style variables from an enum) + /// + /// + /// C++: + /// imgui_internal.h:177 + ///
struct ImGuiStyleVarInfo + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiStyleVarInfoPtr(ImGuiStyleVarInfo* ptr) : INullable + { + private ImGuiStyleVarInfo* _ptr = ptr; + public ImGuiStyleVarInfo* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiStyleVarInfoPtr(ImGuiStyleVarInfo* ptr) => new(ptr); + + public static implicit operator ImGuiStyleVarInfo*(ImGuiStyleVarInfoPtr wrapper) => wrapper.Ptr; + + /// + /// + /// 1+ + /// + /// + /// C++: + /// imgui_internal.h:896 + ///
ImU32 Count : 8 + ///
+ ///
+ public ref uint Count => ref Unsafe.AsRef(&_ptr->Count); + + /// + /// + /// C++: + /// imgui_internal.h:897 + ///
ImGuiDataType DataType : 8 + ///
+ ///
+ public ref ImGuiDataType DataType => ref Unsafe.AsRef(&_ptr->DataType); + + /// + /// + /// Offset in parent structure + /// + /// + /// C++: + /// imgui_internal.h:898 + ///
ImU32 Offset : 16 + ///
+ ///
+ public ref uint Offset => ref Unsafe.AsRef(&_ptr->Offset); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTabBar.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTabBar.gen.cs new file mode 100644 index 0000000..e828924 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTabBar.gen.cs @@ -0,0 +1,1177 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for a tab bar + /// + /// + /// C++: + /// imgui_internal.h:178 + ///
struct ImGuiTabBar + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 176)] + public partial struct ImGuiTabBar + { + /// + /// + /// C++: + /// imgui_internal.h:2984 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(0)] + public ImGuiWindowPtr Window; + + /// + /// + /// C++: + /// imgui_internal.h:2985 + ///
ImVector<ImGuiTabItem> Tabs + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(8)] + public ImVector Tabs; + + /// + /// + /// C++: + /// imgui_internal.h:2986 + ///
ImGuiTabBarFlags Flags + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(24)] + public ImGuiTabBarFlags Flags; + + /// + /// + /// Zero for tab-bars used by docking + /// + /// + /// C++: + /// imgui_internal.h:2987 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(28)] + public ImGuiID ID; + + /// + /// + /// Selected tab/window + /// + /// + /// C++: + /// imgui_internal.h:2988 + ///
ImGuiID SelectedTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(32)] + public ImGuiID SelectedTabId; + + /// + /// + /// Next selected tab/window. Will also trigger a scrolling animation + /// + /// + /// C++: + /// imgui_internal.h:2989 + ///
ImGuiID NextSelectedTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(36)] + public ImGuiID NextSelectedTabId; + + /// + /// + /// Can occasionally be != SelectedTabId (e.g. when previewing contents for CTRL+TAB preview) + /// + /// + /// C++: + /// imgui_internal.h:2990 + ///
ImGuiID VisibleTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(40)] + public ImGuiID VisibleTabId; + + /// + /// + /// C++: + /// imgui_internal.h:2991 + ///
int CurrFrameVisible + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(44)] + public int CurrFrameVisible; + + /// + /// + /// C++: + /// imgui_internal.h:2992 + ///
int PrevFrameVisible + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(48)] + public int PrevFrameVisible; + + /// + /// + /// C++: + /// imgui_internal.h:2993 + ///
ImRect BarRect + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(52)] + public floatRect BarRect; + + /// + /// + /// Backup of previous width. When width change we enforce keep horizontal scroll on focused tab. + /// + /// + /// C++: + /// imgui_internal.h:2994 + ///
float BarRectPrevWidth + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(68)] + public float BarRectPrevWidth; + + /// + /// + /// C++: + /// imgui_internal.h:2995 + ///
float CurrTabsContentsHeight + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(72)] + public float CurrTabsContentsHeight; + + /// + /// + /// Record the height of contents submitted below the tab bar + /// + /// + /// C++: + /// imgui_internal.h:2996 + ///
float PrevTabsContentsHeight + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(76)] + public float PrevTabsContentsHeight; + + /// + /// + /// Actual width of all tabs (locked during layout) + /// + /// + /// C++: + /// imgui_internal.h:2997 + ///
float WidthAllTabs + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(80)] + public float WidthAllTabs; + + /// + /// + /// Ideal width if all tabs were visible and not clipped + /// + /// + /// C++: + /// imgui_internal.h:2998 + ///
float WidthAllTabsIdeal + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(84)] + public float WidthAllTabsIdeal; + + /// + /// + /// C++: + /// imgui_internal.h:2999 + ///
float ScrollingAnim + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(88)] + public float ScrollingAnim; + + /// + /// + /// C++: + /// imgui_internal.h:3000 + ///
float ScrollingTarget + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(92)] + public float ScrollingTarget; + + /// + /// + /// C++: + /// imgui_internal.h:3001 + ///
float ScrollingTargetDistToVisibility + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(96)] + public float ScrollingTargetDistToVisibility; + + /// + /// + /// C++: + /// imgui_internal.h:3002 + ///
float ScrollingSpeed + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(100)] + public float ScrollingSpeed; + + /// + /// + /// C++: + /// imgui_internal.h:3003 + ///
float ScrollingRectMinX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(104)] + public float ScrollingRectMinX; + + /// + /// + /// C++: + /// imgui_internal.h:3004 + ///
float ScrollingRectMaxX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(108)] + public float ScrollingRectMaxX; + + /// + /// + /// C++: + /// imgui_internal.h:3005 + ///
float SeparatorMinX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(112)] + public float SeparatorMinX; + + /// + /// + /// C++: + /// imgui_internal.h:3006 + ///
float SeparatorMaxX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(116)] + public float SeparatorMaxX; + + /// + /// + /// C++: + /// imgui_internal.h:3007 + ///
ImGuiID ReorderRequestTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(120)] + public ImGuiID ReorderRequestTabId; + + /// + /// + /// C++: + /// imgui_internal.h:3008 + ///
ImS16 ReorderRequestOffset + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(124)] + public short ReorderRequestOffset; + + /// + /// + /// C++: + /// imgui_internal.h:3009 + ///
ImS8 BeginCount + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(126)] + public sbyte BeginCount; + + /// + /// + /// C++: + /// imgui_internal.h:3010 + ///
bool WantLayout + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(127)] + public Bool8 WantLayout; + + /// + /// + /// C++: + /// imgui_internal.h:3011 + ///
bool VisibleTabWasSubmitted + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(128)] + public Bool8 VisibleTabWasSubmitted; + + /// + /// + /// Set to true when a new tab item or button has been added to the tab bar during last frame + /// + /// + /// C++: + /// imgui_internal.h:3012 + ///
bool TabsAddedNew + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(129)] + public Bool8 TabsAddedNew; + + /// + /// + /// C++: + /// imgui_internal.h:3013 + ///
bool ScrollButtonEnabled + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(130)] + public Bool8 ScrollButtonEnabled; + + /// + /// + /// Number of tabs submitted this frame. + /// + /// + /// C++: + /// imgui_internal.h:3014 + ///
ImS16 TabsActiveCount + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(132)] + public short TabsActiveCount; + + /// + /// + /// Index of last BeginTabItem() tab for use by EndTabItem() + /// + /// + /// C++: + /// imgui_internal.h:3015 + ///
ImS16 LastTabItemIdx + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(134)] + public short LastTabItemIdx; + + /// + /// + /// C++: + /// imgui_internal.h:3016 + ///
float ItemSpacingY + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(136)] + public float ItemSpacingY; + + /// + /// + /// style.FramePadding locked at the time of BeginTabBar() + /// + /// + /// C++: + /// imgui_internal.h:3017 + ///
ImVec2 FramePadding + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(140)] + public float2 FramePadding; + + /// + /// + /// C++: + /// imgui_internal.h:3018 + ///
ImVec2 BackupCursorPos + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(148)] + public float2 BackupCursorPos; + + /// + /// + /// For non-docking tab bar we re-append names in a contiguous buffer. + /// + /// + /// C++: + /// imgui_internal.h:3019 + ///
ImGuiTextBuffer TabsNames + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + [FieldOffset(160)] + public ImGuiTextBuffer TabsNames; + } + + /// + /// + /// Storage for a tab bar + /// + /// + /// C++: + /// imgui_internal.h:178 + ///
struct ImGuiTabBar + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTabBarPtr(ImGuiTabBar* ptr) : INullable + { + private ImGuiTabBar* _ptr = ptr; + public ImGuiTabBar* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTabBarPtr(ImGuiTabBar* ptr) => new(ptr); + + public static implicit operator ImGuiTabBar*(ImGuiTabBarPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2984 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// C++: + /// imgui_internal.h:2985 + ///
ImVector<ImGuiTabItem> Tabs + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImVector Tabs => ref Unsafe.AsRef>(&_ptr->Tabs); + + /// + /// + /// C++: + /// imgui_internal.h:2986 + ///
ImGuiTabBarFlags Flags + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiTabBarFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Zero for tab-bars used by docking + /// + /// + /// C++: + /// imgui_internal.h:2987 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// Selected tab/window + /// + /// + /// C++: + /// imgui_internal.h:2988 + ///
ImGuiID SelectedTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiID SelectedTabId => ref Unsafe.AsRef(&_ptr->SelectedTabId); + + /// + /// + /// Next selected tab/window. Will also trigger a scrolling animation + /// + /// + /// C++: + /// imgui_internal.h:2989 + ///
ImGuiID NextSelectedTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiID NextSelectedTabId => ref Unsafe.AsRef(&_ptr->NextSelectedTabId); + + /// + /// + /// Can occasionally be != SelectedTabId (e.g. when previewing contents for CTRL+TAB preview) + /// + /// + /// C++: + /// imgui_internal.h:2990 + ///
ImGuiID VisibleTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiID VisibleTabId => ref Unsafe.AsRef(&_ptr->VisibleTabId); + + /// + /// + /// C++: + /// imgui_internal.h:2991 + ///
int CurrFrameVisible + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref int CurrFrameVisible => ref Unsafe.AsRef(&_ptr->CurrFrameVisible); + + /// + /// + /// C++: + /// imgui_internal.h:2992 + ///
int PrevFrameVisible + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref int PrevFrameVisible => ref Unsafe.AsRef(&_ptr->PrevFrameVisible); + + /// + /// + /// C++: + /// imgui_internal.h:2993 + ///
ImRect BarRect + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref floatRect BarRect => ref Unsafe.AsRef(&_ptr->BarRect); + + /// + /// + /// Backup of previous width. When width change we enforce keep horizontal scroll on focused tab. + /// + /// + /// C++: + /// imgui_internal.h:2994 + ///
float BarRectPrevWidth + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float BarRectPrevWidth => ref Unsafe.AsRef(&_ptr->BarRectPrevWidth); + + /// + /// + /// C++: + /// imgui_internal.h:2995 + ///
float CurrTabsContentsHeight + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float CurrTabsContentsHeight => ref Unsafe.AsRef(&_ptr->CurrTabsContentsHeight); + + /// + /// + /// Record the height of contents submitted below the tab bar + /// + /// + /// C++: + /// imgui_internal.h:2996 + ///
float PrevTabsContentsHeight + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float PrevTabsContentsHeight => ref Unsafe.AsRef(&_ptr->PrevTabsContentsHeight); + + /// + /// + /// Actual width of all tabs (locked during layout) + /// + /// + /// C++: + /// imgui_internal.h:2997 + ///
float WidthAllTabs + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float WidthAllTabs => ref Unsafe.AsRef(&_ptr->WidthAllTabs); + + /// + /// + /// Ideal width if all tabs were visible and not clipped + /// + /// + /// C++: + /// imgui_internal.h:2998 + ///
float WidthAllTabsIdeal + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float WidthAllTabsIdeal => ref Unsafe.AsRef(&_ptr->WidthAllTabsIdeal); + + /// + /// + /// C++: + /// imgui_internal.h:2999 + ///
float ScrollingAnim + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ScrollingAnim => ref Unsafe.AsRef(&_ptr->ScrollingAnim); + + /// + /// + /// C++: + /// imgui_internal.h:3000 + ///
float ScrollingTarget + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ScrollingTarget => ref Unsafe.AsRef(&_ptr->ScrollingTarget); + + /// + /// + /// C++: + /// imgui_internal.h:3001 + ///
float ScrollingTargetDistToVisibility + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ScrollingTargetDistToVisibility => + ref Unsafe.AsRef(&_ptr->ScrollingTargetDistToVisibility); + + /// + /// + /// C++: + /// imgui_internal.h:3002 + ///
float ScrollingSpeed + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ScrollingSpeed => ref Unsafe.AsRef(&_ptr->ScrollingSpeed); + + /// + /// + /// C++: + /// imgui_internal.h:3003 + ///
float ScrollingRectMinX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ScrollingRectMinX => ref Unsafe.AsRef(&_ptr->ScrollingRectMinX); + + /// + /// + /// C++: + /// imgui_internal.h:3004 + ///
float ScrollingRectMaxX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ScrollingRectMaxX => ref Unsafe.AsRef(&_ptr->ScrollingRectMaxX); + + /// + /// + /// C++: + /// imgui_internal.h:3005 + ///
float SeparatorMinX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float SeparatorMinX => ref Unsafe.AsRef(&_ptr->SeparatorMinX); + + /// + /// + /// C++: + /// imgui_internal.h:3006 + ///
float SeparatorMaxX + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float SeparatorMaxX => ref Unsafe.AsRef(&_ptr->SeparatorMaxX); + + /// + /// + /// C++: + /// imgui_internal.h:3007 + ///
ImGuiID ReorderRequestTabId + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiID ReorderRequestTabId => ref Unsafe.AsRef(&_ptr->ReorderRequestTabId); + + /// + /// + /// C++: + /// imgui_internal.h:3008 + ///
ImS16 ReorderRequestOffset + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref short ReorderRequestOffset => ref Unsafe.AsRef(&_ptr->ReorderRequestOffset); + + /// + /// + /// C++: + /// imgui_internal.h:3009 + ///
ImS8 BeginCount + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref sbyte BeginCount => ref Unsafe.AsRef(&_ptr->BeginCount); + + /// + /// + /// C++: + /// imgui_internal.h:3010 + ///
bool WantLayout + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref bool WantLayout => ref Unsafe.AsRef(&_ptr->WantLayout); + + /// + /// + /// C++: + /// imgui_internal.h:3011 + ///
bool VisibleTabWasSubmitted + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref bool VisibleTabWasSubmitted => ref Unsafe.AsRef(&_ptr->VisibleTabWasSubmitted); + + /// + /// + /// Set to true when a new tab item or button has been added to the tab bar during last frame + /// + /// + /// C++: + /// imgui_internal.h:3012 + ///
bool TabsAddedNew + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref bool TabsAddedNew => ref Unsafe.AsRef(&_ptr->TabsAddedNew); + + /// + /// + /// C++: + /// imgui_internal.h:3013 + ///
bool ScrollButtonEnabled + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref bool ScrollButtonEnabled => ref Unsafe.AsRef(&_ptr->ScrollButtonEnabled); + + /// + /// + /// Number of tabs submitted this frame. + /// + /// + /// C++: + /// imgui_internal.h:3014 + ///
ImS16 TabsActiveCount + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref short TabsActiveCount => ref Unsafe.AsRef(&_ptr->TabsActiveCount); + + /// + /// + /// Index of last BeginTabItem() tab for use by EndTabItem() + /// + /// + /// C++: + /// imgui_internal.h:3015 + ///
ImS16 LastTabItemIdx + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref short LastTabItemIdx => ref Unsafe.AsRef(&_ptr->LastTabItemIdx); + + /// + /// + /// C++: + /// imgui_internal.h:3016 + ///
float ItemSpacingY + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float ItemSpacingY => ref Unsafe.AsRef(&_ptr->ItemSpacingY); + + /// + /// + /// style.FramePadding locked at the time of BeginTabBar() + /// + /// + /// C++: + /// imgui_internal.h:3017 + ///
ImVec2 FramePadding + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float2 FramePadding => ref Unsafe.AsRef(&_ptr->FramePadding); + + /// + /// + /// C++: + /// imgui_internal.h:3018 + ///
ImVec2 BackupCursorPos + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref float2 BackupCursorPos => ref Unsafe.AsRef(&_ptr->BackupCursorPos); + + /// + /// + /// For non-docking tab bar we re-append names in a contiguous buffer. + /// + /// + /// C++: + /// imgui_internal.h:3019 + ///
ImGuiTextBuffer TabsNames + ///
+ ///
+ /// + /// + /// Storage for a tab bar (sizeof() 160 bytes) + /// + /// + public ref ImGuiTextBuffer TabsNames => ref Unsafe.AsRef(&_ptr->TabsNames); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTabItem.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTabItem.gen.cs new file mode 100644 index 0000000..4fdb103 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTabItem.gen.cs @@ -0,0 +1,495 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for a tab item (within a tab bar) + /// + /// + /// C++: + /// imgui_internal.h:179 + ///
struct ImGuiTabItem + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImGuiTabItem + { + /// + /// + /// C++: + /// imgui_internal.h:2964 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:2965 + ///
ImGuiTabItemFlags Flags + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(4)] + public ImGuiTabItemFlags Flags; + + /// + /// + /// When TabItem is part of a DockNode's TabBar, we hold on to a window. + /// + /// + /// C++: + /// imgui_internal.h:2966 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(8)] + public ImGuiWindowPtr Window; + + /// + /// + /// C++: + /// imgui_internal.h:2967 + ///
int LastFrameVisible + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(16)] + public int LastFrameVisible; + + /// + /// + /// This allows us to infer an ordered list of the last activated tabs with little maintenance + /// + /// + /// C++: + /// imgui_internal.h:2968 + ///
int LastFrameSelected + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(20)] + public int LastFrameSelected; + + /// + /// + /// Position relative to beginning of tab + /// + /// + /// C++: + /// imgui_internal.h:2969 + ///
float Offset + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(24)] + public float Offset; + + /// + /// + /// Width currently displayed + /// + /// + /// C++: + /// imgui_internal.h:2970 + ///
float Width + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(28)] + public float Width; + + /// + /// + /// Width of label + padding, stored during BeginTabItem() call (misnamed as "Content" would normally imply + /// width of label only) + /// + /// + /// C++: + /// imgui_internal.h:2971 + ///
float ContentWidth + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(32)] + public float ContentWidth; + + /// + /// + /// Width optionally requested by caller, -1.0f is unused + /// + /// + /// C++: + /// imgui_internal.h:2972 + ///
float RequestedWidth + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(36)] + public float RequestedWidth; + + /// + /// + /// When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames + /// + /// + /// C++: + /// imgui_internal.h:2973 + ///
ImS32 NameOffset + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(40)] + public int NameOffset; + + /// + /// + /// BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable + /// + /// + /// C++: + /// imgui_internal.h:2974 + ///
ImS16 BeginOrder + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(44)] + public short BeginOrder; + + /// + /// + /// Index only used during TabBarLayout(). Tabs gets reordered so 'Tabs[n].IndexDuringLayout == n' but may + /// mismatch during additions. + /// + /// + /// C++: + /// imgui_internal.h:2975 + ///
ImS16 IndexDuringLayout + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(46)] + public short IndexDuringLayout; + + /// + /// + /// Marked as closed by SetTabItemClosed() + /// + /// + /// C++: + /// imgui_internal.h:2976 + ///
bool WantClose + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + [FieldOffset(48)] + public Bool8 WantClose; + } + + /// + /// + /// Storage for a tab item (within a tab bar) + /// + /// + /// C++: + /// imgui_internal.h:179 + ///
struct ImGuiTabItem + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTabItemPtr(ImGuiTabItem* ptr) : INullable + { + private ImGuiTabItem* _ptr = ptr; + public ImGuiTabItem* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTabItemPtr(ImGuiTabItem* ptr) => new(ptr); + + public static implicit operator ImGuiTabItem*(ImGuiTabItemPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2964 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:2965 + ///
ImGuiTabItemFlags Flags + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref ImGuiTabItemFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// When TabItem is part of a DockNode's TabBar, we hold on to a window. + /// + /// + /// C++: + /// imgui_internal.h:2966 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// C++: + /// imgui_internal.h:2967 + ///
int LastFrameVisible + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref int LastFrameVisible => ref Unsafe.AsRef(&_ptr->LastFrameVisible); + + /// + /// + /// This allows us to infer an ordered list of the last activated tabs with little maintenance + /// + /// + /// C++: + /// imgui_internal.h:2968 + ///
int LastFrameSelected + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref int LastFrameSelected => ref Unsafe.AsRef(&_ptr->LastFrameSelected); + + /// + /// + /// Position relative to beginning of tab + /// + /// + /// C++: + /// imgui_internal.h:2969 + ///
float Offset + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref float Offset => ref Unsafe.AsRef(&_ptr->Offset); + + /// + /// + /// Width currently displayed + /// + /// + /// C++: + /// imgui_internal.h:2970 + ///
float Width + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref float Width => ref Unsafe.AsRef(&_ptr->Width); + + /// + /// + /// Width of label + padding, stored during BeginTabItem() call (misnamed as "Content" would normally imply + /// width of label only) + /// + /// + /// C++: + /// imgui_internal.h:2971 + ///
float ContentWidth + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref float ContentWidth => ref Unsafe.AsRef(&_ptr->ContentWidth); + + /// + /// + /// Width optionally requested by caller, -1.0f is unused + /// + /// + /// C++: + /// imgui_internal.h:2972 + ///
float RequestedWidth + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref float RequestedWidth => ref Unsafe.AsRef(&_ptr->RequestedWidth); + + /// + /// + /// When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames + /// + /// + /// C++: + /// imgui_internal.h:2973 + ///
ImS32 NameOffset + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref int NameOffset => ref Unsafe.AsRef(&_ptr->NameOffset); + + /// + /// + /// BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable + /// + /// + /// C++: + /// imgui_internal.h:2974 + ///
ImS16 BeginOrder + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref short BeginOrder => ref Unsafe.AsRef(&_ptr->BeginOrder); + + /// + /// + /// Index only used during TabBarLayout(). Tabs gets reordered so 'Tabs[n].IndexDuringLayout == n' but may + /// mismatch during additions. + /// + /// + /// C++: + /// imgui_internal.h:2975 + ///
ImS16 IndexDuringLayout + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref short IndexDuringLayout => ref Unsafe.AsRef(&_ptr->IndexDuringLayout); + + /// + /// + /// Marked as closed by SetTabItemClosed() + /// + /// + /// C++: + /// imgui_internal.h:2976 + ///
bool WantClose + ///
+ ///
+ /// + /// + /// Storage for one active tab item (sizeof() 48 bytes) + /// + /// + public ref bool WantClose => ref Unsafe.AsRef(&_ptr->WantClose); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTable.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTable.gen.cs new file mode 100644 index 0000000..6d0b4d2 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTable.gen.cs @@ -0,0 +1,3849 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for a table + /// + /// + /// C++: + /// imgui_internal.h:180 + ///
struct ImGuiTable + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 592)] + public partial struct ImGuiTable + { + /// + /// + /// C++: + /// imgui_internal.h:3129 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:3130 + ///
ImGuiTableFlags Flags + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(4)] + public ImGuiTableFlags Flags; + + /// + /// + /// Single allocation to hold Columns[], DisplayOrderToIndex[], and RowCellData[] + /// + /// + /// C++: + /// imgui_internal.h:3131 + ///
void* RawData + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(8)] + public nint RawData; + + /// + /// + /// Transient data while table is active. Point within g.CurrentTableStack[] + /// + /// + /// C++: + /// imgui_internal.h:3132 + ///
ImGuiTableTempData* TempData + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(16)] + public ImGuiTableTempDataPtr TempData; + + /// + /// + /// Point within RawData[] + /// + /// + /// C++: + /// imgui_internal.h:3133 + ///
ImSpan<ImGuiTableColumn> Columns + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(24)] + public ImSpan Columns; + + /// + /// + /// Point within RawData[]. Store display order of columns (when not reordered, the values are 0...Count-1) + /// + /// + /// C++: + /// imgui_internal.h:3134 + ///
ImSpan<ImGuiTableColumnIdx> DisplayOrderToIndex + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(40)] + public ImSpan DisplayOrderToIndex; + + /// + /// + /// Point within RawData[]. Store cells background requests for current row. + /// + /// + /// C++: + /// imgui_internal.h:3135 + ///
ImSpan<ImGuiTableCellData> RowCellData + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(56)] + public ImSpan RowCellData; + + /// + /// + /// Column DisplayOrder -> IsEnabled map + /// + /// + /// C++: + /// imgui_internal.h:3136 + ///
ImBitArrayPtr EnabledMaskByDisplayOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(72)] + public ImBitArrayPtr EnabledMaskByDisplayOrder; + + /// + /// + /// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column + /// without touching cold data + /// + /// + /// C++: + /// imgui_internal.h:3137 + ///
ImBitArrayPtr EnabledMaskByIndex + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(80)] + public ImBitArrayPtr EnabledMaskByIndex; + + /// + /// + /// Column Index -> IsVisibleX|IsVisibleY map (== not hidden by user/api && not hidden by + /// scrolling/cliprect) + /// + /// + /// C++: + /// imgui_internal.h:3138 + ///
ImBitArrayPtr VisibleMaskByIndex + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(88)] + public ImBitArrayPtr VisibleMaskByIndex; + + /// + /// + /// Which data were loaded from the .ini file (e.g. when order is not altered we won't save order) + /// + /// + /// C++: + /// imgui_internal.h:3139 + ///
ImGuiTableFlags SettingsLoadedFlags + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(96)] + public ImGuiTableFlags SettingsLoadedFlags; + + /// + /// + /// Offset in g.SettingsTables + /// + /// + /// C++: + /// imgui_internal.h:3140 + ///
int SettingsOffset + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(100)] + public int SettingsOffset; + + /// + /// + /// C++: + /// imgui_internal.h:3141 + ///
int LastFrameActive + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(104)] + public int LastFrameActive; + + /// + /// + /// Number of columns declared in BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3142 + ///
int ColumnsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(108)] + public int ColumnsCount; + + /// + /// + /// C++: + /// imgui_internal.h:3143 + ///
int CurrentRow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(112)] + public int CurrentRow; + + /// + /// + /// C++: + /// imgui_internal.h:3144 + ///
int CurrentColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(116)] + public int CurrentColumn; + + /// + /// + /// Count of BeginTable() calls with same ID in the same frame (generally 0). This is a little bit similar + /// to BeginCount for a window, but multiple tables with the same ID are multiple tables, they are just + /// synced. + /// + /// + /// C++: + /// imgui_internal.h:3145 + ///
ImS16 InstanceCurrent + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(120)] + public short InstanceCurrent; + + /// + /// + /// Mark which instance (generally 0) of the same ID is being interacted with + /// + /// + /// C++: + /// imgui_internal.h:3146 + ///
ImS16 InstanceInteracted + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(122)] + public short InstanceInteracted; + + /// + /// + /// C++: + /// imgui_internal.h:3147 + ///
float RowPosY1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(124)] + public float RowPosY1; + + /// + /// + /// C++: + /// imgui_internal.h:3148 + ///
float RowPosY2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(128)] + public float RowPosY2; + + /// + /// + /// Height submitted to TableNextRow() + /// + /// + /// C++: + /// imgui_internal.h:3149 + ///
float RowMinHeight + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(132)] + public float RowMinHeight; + + /// + /// + /// Top and bottom padding. Reloaded during row change. + /// + /// + /// C++: + /// imgui_internal.h:3150 + ///
float RowCellPaddingY + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(136)] + public float RowCellPaddingY; + + /// + /// + /// C++: + /// imgui_internal.h:3151 + ///
float RowTextBaseline + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(140)] + public float RowTextBaseline; + + /// + /// + /// C++: + /// imgui_internal.h:3152 + ///
float RowIndentOffsetX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(144)] + public float RowIndentOffsetX; + + /// + /// + /// Current row flags, see ImGuiTableRowFlags_ + /// + /// + /// C++: + /// imgui_internal.h:3153 + ///
ImGuiTableRowFlags RowFlags : 16 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(148)] + public ImGuiTableRowFlags RowFlags; + + /// + /// + /// C++: + /// imgui_internal.h:3154 + ///
ImGuiTableRowFlags LastRowFlags : 16 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(150)] + public ImGuiTableRowFlags LastRowFlags; + + /// + /// + /// Counter for alternating background colors (can be fast-forwarded by e.g clipper), not same as CurrentRow + /// because header rows typically don't increase this. + /// + /// + /// C++: + /// imgui_internal.h:3155 + ///
int RowBgColorCounter + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(152)] + public int RowBgColorCounter; + + /// + /// + /// Background color override for current row. + /// + /// + /// C++: + /// imgui_internal.h:3156 + ///
ImU32 RowBgColor[2] + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(156)] + public uint_2 RowBgColor; + + /// + /// + /// C++: + /// imgui_internal.h:3157 + ///
ImU32 BorderColorStrong + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(164)] + public uint BorderColorStrong; + + /// + /// + /// C++: + /// imgui_internal.h:3158 + ///
ImU32 BorderColorLight + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(168)] + public uint BorderColorLight; + + /// + /// + /// C++: + /// imgui_internal.h:3159 + ///
float BorderX1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(172)] + public float BorderX1; + + /// + /// + /// C++: + /// imgui_internal.h:3160 + ///
float BorderX2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(176)] + public float BorderX2; + + /// + /// + /// C++: + /// imgui_internal.h:3161 + ///
float HostIndentX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(180)] + public float HostIndentX; + + /// + /// + /// C++: + /// imgui_internal.h:3162 + ///
float MinColumnWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(184)] + public float MinColumnWidth; + + /// + /// + /// C++: + /// imgui_internal.h:3163 + ///
float OuterPaddingX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(188)] + public float OuterPaddingX; + + /// + /// + /// Padding from each borders. Locked in BeginTable()/Layout. + /// + /// + /// C++: + /// imgui_internal.h:3164 + ///
float CellPaddingX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(192)] + public float CellPaddingX; + + /// + /// + /// Spacing between non-bordered cells. Locked in BeginTable()/Layout. + /// + /// + /// C++: + /// imgui_internal.h:3165 + ///
float CellSpacingX1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(196)] + public float CellSpacingX1; + + /// + /// + /// C++: + /// imgui_internal.h:3166 + ///
float CellSpacingX2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(200)] + public float CellSpacingX2; + + /// + /// + /// User value passed to BeginTable(), see comments at the top of BeginTable() for details. + /// + /// + /// C++: + /// imgui_internal.h:3167 + ///
float InnerWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(204)] + public float InnerWidth; + + /// + /// + /// Sum of current column width + /// + /// + /// C++: + /// imgui_internal.h:3168 + ///
float ColumnsGivenWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(208)] + public float ColumnsGivenWidth; + + /// + /// + /// Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width + /// submission in outer window + /// + /// + /// C++: + /// imgui_internal.h:3169 + ///
float ColumnsAutoFitWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(212)] + public float ColumnsAutoFitWidth; + + /// + /// + /// Sum of weight of all enabled stretching columns + /// + /// + /// C++: + /// imgui_internal.h:3170 + ///
float ColumnsStretchSumWeights + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(216)] + public float ColumnsStretchSumWeights; + + /// + /// + /// C++: + /// imgui_internal.h:3171 + ///
float ResizedColumnNextWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(220)] + public float ResizedColumnNextWidth; + + /// + /// + /// Lock minimum contents width while resizing down in order to not create feedback loops. But we allow + /// growing the table. + /// + /// + /// C++: + /// imgui_internal.h:3172 + ///
float ResizeLockMinContentsX2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(224)] + public float ResizeLockMinContentsX2; + + /// + /// + /// Reference scale to be able to rescale columns on font/dpi changes. + /// + /// + /// C++: + /// imgui_internal.h:3173 + ///
float RefScale + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(228)] + public float RefScale; + + /// + /// + /// Set by TableAngledHeadersRow(), used in TableUpdateLayout() + /// + /// + /// C++: + /// imgui_internal.h:3174 + ///
float AngledHeadersHeight + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(232)] + public float AngledHeadersHeight; + + /// + /// + /// Set by TableAngledHeadersRow(), used in TableUpdateLayout() + /// + /// + /// C++: + /// imgui_internal.h:3175 + ///
float AngledHeadersSlope + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(236)] + public float AngledHeadersSlope; + + /// + /// + /// Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has + /// been specified in BeginTable(). + /// + /// + /// C++: + /// imgui_internal.h:3176 + ///
ImRect OuterRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(240)] + public floatRect OuterRect; + + /// + /// + /// InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is " + /// + /// + /// C++: + /// imgui_internal.h:3177 + ///
ImRect InnerRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(256)] + public floatRect InnerRect; + + /// + /// + /// C++: + /// imgui_internal.h:3178 + ///
ImRect WorkRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(272)] + public floatRect WorkRect; + + /// + /// + /// C++: + /// imgui_internal.h:3179 + ///
ImRect InnerClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(288)] + public floatRect InnerClipRect; + + /// + /// + /// We use this to cpu-clip cell background color fill, evolve during the frame as we cross frozen rows + /// boundaries + /// + /// + /// C++: + /// imgui_internal.h:3180 + ///
ImRect BgClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(304)] + public floatRect BgClipRect; + + /// + /// + /// Actual ImDrawCmd clip rect for BG0/1 channel. This tends to be == OuterWindow->ClipRect at + /// BeginTable() because output in BG0/BG1 is cpu-clipped + /// + /// + /// C++: + /// imgui_internal.h:3181 + ///
ImRect Bg0ClipRectForDrawCmd + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(320)] + public floatRect Bg0ClipRectForDrawCmd; + + /// + /// + /// Actual ImDrawCmd clip rect for BG2 channel. This tends to be a correct, tight-fit, because output to BG2 + /// are done by widgets relying on regular ClipRect. + /// + /// + /// C++: + /// imgui_internal.h:3182 + ///
ImRect Bg2ClipRectForDrawCmd + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(336)] + public floatRect Bg2ClipRectForDrawCmd; + + /// + /// + /// This is used to check if we can eventually merge our columns draw calls into the current draw call of + /// the current window. + /// + /// + /// C++: + /// imgui_internal.h:3183 + ///
ImRect HostClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(352)] + public floatRect HostClipRect; + + /// + /// + /// Backup of InnerWindow->ClipRect during PushTableBackground()/PopTableBackground() + /// + /// + /// C++: + /// imgui_internal.h:3184 + ///
ImRect HostBackupInnerClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(368)] + public floatRect HostBackupInnerClipRect; + + /// + /// + /// Parent window for the table + /// + /// + /// C++: + /// imgui_internal.h:3185 + ///
ImGuiWindow* OuterWindow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(384)] + public ImGuiWindowPtr OuterWindow; + + /// + /// + /// Window holding the table data (== OuterWindow or a child window) + /// + /// + /// C++: + /// imgui_internal.h:3186 + ///
ImGuiWindow* InnerWindow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(392)] + public ImGuiWindowPtr InnerWindow; + + /// + /// + /// Contiguous buffer holding columns names + /// + /// + /// C++: + /// imgui_internal.h:3187 + ///
ImGuiTextBuffer ColumnsNames + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(400)] + public ImGuiTextBuffer ColumnsNames; + + /// + /// + /// Shortcut to TempData->DrawSplitter while in table. Isolate draw commands per columns to avoid + /// switching clip rect constantly + /// + /// + /// C++: + /// imgui_internal.h:3188 + ///
ImDrawListSplitter* DrawSplitter + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(416)] + public ImDrawListSplitterPtr DrawSplitter; + + /// + /// + /// C++: + /// imgui_internal.h:3189 + ///
ImGuiTableInstanceData InstanceDataFirst + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(424)] + public ImGuiTableInstanceData InstanceDataFirst; + + /// + /// + /// FIXME-OPT: Using a small-vector pattern would be good. + /// + /// + /// C++: + /// imgui_internal.h:3190 + ///
ImVector<ImGuiTableInstanceData> InstanceDataExtra + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(448)] + public ImVector InstanceDataExtra; + + /// + /// + /// C++: + /// imgui_internal.h:3191 + ///
ImGuiTableColumnSortSpecs SortSpecsSingle + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(464)] + public ImGuiTableColumnSortSpecs SortSpecsSingle; + + /// + /// + /// FIXME-OPT: Using a small-vector pattern would be good. + /// + /// + /// C++: + /// imgui_internal.h:3192 + ///
ImVector<ImGuiTableColumnSortSpecs> SortSpecsMulti + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(480)] + public ImVector SortSpecsMulti; + + /// + /// + /// Public facing sorts specs, this is what we return in TableGetSortSpecs() + /// + /// + /// C++: + /// imgui_internal.h:3193 + ///
ImGuiTableSortSpecs SortSpecs + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(496)] + public ImGuiTableSortSpecs SortSpecs; + + /// + /// + /// C++: + /// imgui_internal.h:3194 + ///
ImGuiTableColumnIdx SortSpecsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(512)] + public short SortSpecsCount; + + /// + /// + /// Number of enabled columns (<= ColumnsCount) + /// + /// + /// C++: + /// imgui_internal.h:3195 + ///
ImGuiTableColumnIdx ColumnsEnabledCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(514)] + public short ColumnsEnabledCount; + + /// + /// + /// Number of enabled columns using fixed width (<= ColumnsCount) + /// + /// + /// C++: + /// imgui_internal.h:3196 + ///
ImGuiTableColumnIdx ColumnsEnabledFixedCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(516)] + public short ColumnsEnabledFixedCount; + + /// + /// + /// Count calls to TableSetupColumn() + /// + /// + /// C++: + /// imgui_internal.h:3197 + ///
ImGuiTableColumnIdx DeclColumnsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(518)] + public short DeclColumnsCount; + + /// + /// + /// Count columns with angled headers + /// + /// + /// C++: + /// imgui_internal.h:3198 + ///
ImGuiTableColumnIdx AngledHeadersCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(520)] + public short AngledHeadersCount; + + /// + /// + /// Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty + /// region after the right-most column! + /// + /// + /// C++: + /// imgui_internal.h:3199 + ///
ImGuiTableColumnIdx HoveredColumnBody + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(522)] + public short HoveredColumnBody; + + /// + /// + /// Index of column whose right-border is being hovered (for resizing). + /// + /// + /// C++: + /// imgui_internal.h:3200 + ///
ImGuiTableColumnIdx HoveredColumnBorder + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(524)] + public short HoveredColumnBorder; + + /// + /// + /// Index of column which should be highlighted. + /// + /// + /// C++: + /// imgui_internal.h:3201 + ///
ImGuiTableColumnIdx HighlightColumnHeader + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(526)] + public short HighlightColumnHeader; + + /// + /// + /// Index of single column requesting auto-fit. + /// + /// + /// C++: + /// imgui_internal.h:3202 + ///
ImGuiTableColumnIdx AutoFitSingleColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(528)] + public short AutoFitSingleColumn; + + /// + /// + /// Index of column being resized. Reset when InstanceCurrent==0. + /// + /// + /// C++: + /// imgui_internal.h:3203 + ///
ImGuiTableColumnIdx ResizedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(530)] + public short ResizedColumn; + + /// + /// + /// Index of column being resized from previous frame. + /// + /// + /// C++: + /// imgui_internal.h:3204 + ///
ImGuiTableColumnIdx LastResizedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(532)] + public short LastResizedColumn; + + /// + /// + /// Index of column header being held. + /// + /// + /// C++: + /// imgui_internal.h:3205 + ///
ImGuiTableColumnIdx HeldHeaderColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(534)] + public short HeldHeaderColumn; + + /// + /// + /// Index of column being reordered. (not cleared) + /// + /// + /// C++: + /// imgui_internal.h:3206 + ///
ImGuiTableColumnIdx ReorderColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(536)] + public short ReorderColumn; + + /// + /// + /// -1 or +1 + /// + /// + /// C++: + /// imgui_internal.h:3207 + ///
ImGuiTableColumnIdx ReorderColumnDir + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(538)] + public short ReorderColumnDir; + + /// + /// + /// Index of left-most non-hidden column. + /// + /// + /// C++: + /// imgui_internal.h:3208 + ///
ImGuiTableColumnIdx LeftMostEnabledColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(540)] + public short LeftMostEnabledColumn; + + /// + /// + /// Index of right-most non-hidden column. + /// + /// + /// C++: + /// imgui_internal.h:3209 + ///
ImGuiTableColumnIdx RightMostEnabledColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(542)] + public short RightMostEnabledColumn; + + /// + /// + /// Index of left-most stretched column. + /// + /// + /// C++: + /// imgui_internal.h:3210 + ///
ImGuiTableColumnIdx LeftMostStretchedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(544)] + public short LeftMostStretchedColumn; + + /// + /// + /// Index of right-most stretched column. + /// + /// + /// C++: + /// imgui_internal.h:3211 + ///
ImGuiTableColumnIdx RightMostStretchedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(546)] + public short RightMostStretchedColumn; + + /// + /// + /// Column right-clicked on, of -1 if opening context menu from a neutral/empty spot + /// + /// + /// C++: + /// imgui_internal.h:3212 + ///
ImGuiTableColumnIdx ContextPopupColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(548)] + public short ContextPopupColumn; + + /// + /// + /// Requested frozen rows count + /// + /// + /// C++: + /// imgui_internal.h:3213 + ///
ImGuiTableColumnIdx FreezeRowsRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(550)] + public short FreezeRowsRequest; + + /// + /// + /// Actual frozen row count (== FreezeRowsRequest, or == 0 when no scrolling offset) + /// + /// + /// C++: + /// imgui_internal.h:3214 + ///
ImGuiTableColumnIdx FreezeRowsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(552)] + public short FreezeRowsCount; + + /// + /// + /// Requested frozen columns count + /// + /// + /// C++: + /// imgui_internal.h:3215 + ///
ImGuiTableColumnIdx FreezeColumnsRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(554)] + public short FreezeColumnsRequest; + + /// + /// + /// Actual frozen columns count (== FreezeColumnsRequest, or == 0 when no scrolling offset) + /// + /// + /// C++: + /// imgui_internal.h:3216 + ///
ImGuiTableColumnIdx FreezeColumnsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(556)] + public short FreezeColumnsCount; + + /// + /// + /// Index of current RowCellData[] entry in current row + /// + /// + /// C++: + /// imgui_internal.h:3217 + ///
ImGuiTableColumnIdx RowCellDataCurrent + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(558)] + public short RowCellDataCurrent; + + /// + /// + /// Redirect non-visible columns here. + /// + /// + /// C++: + /// imgui_internal.h:3218 + ///
ImGuiTableDrawChannelIdx DummyDrawChannel + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(560)] + public ushort DummyDrawChannel; + + /// + /// + /// For Selectable() and other widgets drawing across columns after the freezing line. Index within + /// DrawSplitter.Channels[] + /// + /// + /// C++: + /// imgui_internal.h:3219 + ///
ImGuiTableDrawChannelIdx Bg2DrawChannelCurrent + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(562)] + public ushort Bg2DrawChannelCurrent; + + /// + /// + /// C++: + /// imgui_internal.h:3220 + ///
ImGuiTableDrawChannelIdx Bg2DrawChannelUnfrozen + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(564)] + public ushort Bg2DrawChannelUnfrozen; + + /// + /// + /// ImGuiNavLayer at the time of BeginTable(). + /// + /// + /// C++: + /// imgui_internal.h:3221 + ///
ImS8 NavLayer + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(566)] + public sbyte NavLayer; + + /// + /// + /// Set by TableUpdateLayout() which is called when beginning the first row. + /// + /// + /// C++: + /// imgui_internal.h:3222 + ///
bool IsLayoutLocked + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(567)] + public Bool8 IsLayoutLocked; + + /// + /// + /// Set when inside TableBeginRow()/TableEndRow(). + /// + /// + /// C++: + /// imgui_internal.h:3223 + ///
bool IsInsideRow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(568)] + public Bool8 IsInsideRow; + + /// + /// + /// C++: + /// imgui_internal.h:3224 + ///
bool IsInitializing + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(569)] + public Bool8 IsInitializing; + + /// + /// + /// C++: + /// imgui_internal.h:3225 + ///
bool IsSortSpecsDirty + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(570)] + public Bool8 IsSortSpecsDirty; + + /// + /// + /// Set when the first row had the ImGuiTableRowFlags_Headers flag. + /// + /// + /// C++: + /// imgui_internal.h:3226 + ///
bool IsUsingHeaders + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(571)] + public Bool8 IsUsingHeaders; + + /// + /// + /// Set when default context menu is open (also see: ContextPopupColumn, InstanceInteracted). + /// + /// + /// C++: + /// imgui_internal.h:3227 + ///
bool IsContextPopupOpen + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(572)] + public Bool8 IsContextPopupOpen; + + /// + /// + /// Disable default context menu. You may submit your own using TableBeginContextMenuPopup()/EndPopup() + /// + /// + /// C++: + /// imgui_internal.h:3228 + ///
bool DisableDefaultContextMenu + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(573)] + public Bool8 DisableDefaultContextMenu; + + /// + /// + /// C++: + /// imgui_internal.h:3229 + ///
bool IsSettingsRequestLoad + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(574)] + public Bool8 IsSettingsRequestLoad; + + /// + /// + /// Set when table settings have changed and needs to be reported into ImGuiTableSetttings data. + /// + /// + /// C++: + /// imgui_internal.h:3230 + ///
bool IsSettingsDirty + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(575)] + public Bool8 IsSettingsDirty; + + /// + /// + /// Set when display order is unchanged from default (DisplayOrder contains 0...Count-1) + /// + /// + /// C++: + /// imgui_internal.h:3231 + ///
bool IsDefaultDisplayOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(576)] + public Bool8 IsDefaultDisplayOrder; + + /// + /// + /// C++: + /// imgui_internal.h:3232 + ///
bool IsResetAllRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(577)] + public Bool8 IsResetAllRequest; + + /// + /// + /// C++: + /// imgui_internal.h:3233 + ///
bool IsResetDisplayOrderRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(578)] + public Bool8 IsResetDisplayOrderRequest; + + /// + /// + /// Set when we got past the frozen row. + /// + /// + /// C++: + /// imgui_internal.h:3234 + ///
bool IsUnfrozenRows + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(579)] + public Bool8 IsUnfrozenRows; + + /// + /// + /// Set if user didn't explicitly set a sizing policy in BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3235 + ///
bool IsDefaultSizingPolicy + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(580)] + public Bool8 IsDefaultSizingPolicy; + + /// + /// + /// C++: + /// imgui_internal.h:3236 + ///
bool IsActiveIdAliveBeforeTable + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(581)] + public Bool8 IsActiveIdAliveBeforeTable; + + /// + /// + /// C++: + /// imgui_internal.h:3237 + ///
bool IsActiveIdInTable + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(582)] + public Bool8 IsActiveIdInTable; + + /// + /// + /// Whether ANY instance of this table had a vertical scrollbar during the current frame. + /// + /// + /// C++: + /// imgui_internal.h:3238 + ///
bool HasScrollbarYCurr + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(583)] + public Bool8 HasScrollbarYCurr; + + /// + /// + /// Whether ANY instance of this table had a vertical scrollbar during the previous. + /// + /// + /// C++: + /// imgui_internal.h:3239 + ///
bool HasScrollbarYPrev + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(584)] + public Bool8 HasScrollbarYPrev; + + /// + /// + /// C++: + /// imgui_internal.h:3240 + ///
bool MemoryCompacted + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(585)] + public Bool8 MemoryCompacted; + + /// + /// + /// Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite + /// InnerWindow->SkipItem on a per-column basis + /// + /// + /// C++: + /// imgui_internal.h:3241 + ///
bool HostSkipItems + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + [FieldOffset(586)] + public Bool8 HostSkipItems; + } + + /// + /// + /// Storage for a table + /// + /// + /// C++: + /// imgui_internal.h:180 + ///
struct ImGuiTable + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTablePtr(ImGuiTable* ptr) : INullable + { + private ImGuiTable* _ptr = ptr; + public ImGuiTable* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTablePtr(ImGuiTable* ptr) => new(ptr); + + public static implicit operator ImGuiTable*(ImGuiTablePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:3129 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:3130 + ///
ImGuiTableFlags Flags + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Single allocation to hold Columns[], DisplayOrderToIndex[], and RowCellData[] + /// + /// + /// C++: + /// imgui_internal.h:3131 + ///
void* RawData + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref nint RawData => ref Unsafe.AsRef(&_ptr->RawData); + + /// + /// + /// Transient data while table is active. Point within g.CurrentTableStack[] + /// + /// + /// C++: + /// imgui_internal.h:3132 + ///
ImGuiTableTempData* TempData + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableTempDataPtr TempData => ref Unsafe.AsRef(&_ptr->TempData); + + /// + /// + /// Point within RawData[] + /// + /// + /// C++: + /// imgui_internal.h:3133 + ///
ImSpan<ImGuiTableColumn> Columns + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImSpan Columns => ref Unsafe.AsRef>(&_ptr->Columns); + + /// + /// + /// Point within RawData[]. Store display order of columns (when not reordered, the values are 0...Count-1) + /// + /// + /// C++: + /// imgui_internal.h:3134 + ///
ImSpan<ImGuiTableColumnIdx> DisplayOrderToIndex + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImSpan DisplayOrderToIndex => ref Unsafe.AsRef>(&_ptr->DisplayOrderToIndex); + + /// + /// + /// Point within RawData[]. Store cells background requests for current row. + /// + /// + /// C++: + /// imgui_internal.h:3135 + ///
ImSpan<ImGuiTableCellData> RowCellData + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImSpan RowCellData => + ref Unsafe.AsRef>(&_ptr->RowCellData); + + /// + /// + /// Column DisplayOrder -> IsEnabled map + /// + /// + /// C++: + /// imgui_internal.h:3136 + ///
ImBitArrayPtr EnabledMaskByDisplayOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImBitArrayPtr EnabledMaskByDisplayOrder => + ref Unsafe.AsRef(&_ptr->EnabledMaskByDisplayOrder); + + /// + /// + /// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column + /// without touching cold data + /// + /// + /// C++: + /// imgui_internal.h:3137 + ///
ImBitArrayPtr EnabledMaskByIndex + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImBitArrayPtr EnabledMaskByIndex => ref Unsafe.AsRef(&_ptr->EnabledMaskByIndex); + + /// + /// + /// Column Index -> IsVisibleX|IsVisibleY map (== not hidden by user/api && not hidden by + /// scrolling/cliprect) + /// + /// + /// C++: + /// imgui_internal.h:3138 + ///
ImBitArrayPtr VisibleMaskByIndex + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImBitArrayPtr VisibleMaskByIndex => ref Unsafe.AsRef(&_ptr->VisibleMaskByIndex); + + /// + /// + /// Which data were loaded from the .ini file (e.g. when order is not altered we won't save order) + /// + /// + /// C++: + /// imgui_internal.h:3139 + ///
ImGuiTableFlags SettingsLoadedFlags + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableFlags SettingsLoadedFlags => ref Unsafe.AsRef(&_ptr->SettingsLoadedFlags); + + /// + /// + /// Offset in g.SettingsTables + /// + /// + /// C++: + /// imgui_internal.h:3140 + ///
int SettingsOffset + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref int SettingsOffset => ref Unsafe.AsRef(&_ptr->SettingsOffset); + + /// + /// + /// C++: + /// imgui_internal.h:3141 + ///
int LastFrameActive + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref int LastFrameActive => ref Unsafe.AsRef(&_ptr->LastFrameActive); + + /// + /// + /// Number of columns declared in BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3142 + ///
int ColumnsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref int ColumnsCount => ref Unsafe.AsRef(&_ptr->ColumnsCount); + + /// + /// + /// C++: + /// imgui_internal.h:3143 + ///
int CurrentRow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref int CurrentRow => ref Unsafe.AsRef(&_ptr->CurrentRow); + + /// + /// + /// C++: + /// imgui_internal.h:3144 + ///
int CurrentColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref int CurrentColumn => ref Unsafe.AsRef(&_ptr->CurrentColumn); + + /// + /// + /// Count of BeginTable() calls with same ID in the same frame (generally 0). This is a little bit similar + /// to BeginCount for a window, but multiple tables with the same ID are multiple tables, they are just + /// synced. + /// + /// + /// C++: + /// imgui_internal.h:3145 + ///
ImS16 InstanceCurrent + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short InstanceCurrent => ref Unsafe.AsRef(&_ptr->InstanceCurrent); + + /// + /// + /// Mark which instance (generally 0) of the same ID is being interacted with + /// + /// + /// C++: + /// imgui_internal.h:3146 + ///
ImS16 InstanceInteracted + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short InstanceInteracted => ref Unsafe.AsRef(&_ptr->InstanceInteracted); + + /// + /// + /// C++: + /// imgui_internal.h:3147 + ///
float RowPosY1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RowPosY1 => ref Unsafe.AsRef(&_ptr->RowPosY1); + + /// + /// + /// C++: + /// imgui_internal.h:3148 + ///
float RowPosY2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RowPosY2 => ref Unsafe.AsRef(&_ptr->RowPosY2); + + /// + /// + /// Height submitted to TableNextRow() + /// + /// + /// C++: + /// imgui_internal.h:3149 + ///
float RowMinHeight + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RowMinHeight => ref Unsafe.AsRef(&_ptr->RowMinHeight); + + /// + /// + /// Top and bottom padding. Reloaded during row change. + /// + /// + /// C++: + /// imgui_internal.h:3150 + ///
float RowCellPaddingY + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RowCellPaddingY => ref Unsafe.AsRef(&_ptr->RowCellPaddingY); + + /// + /// + /// C++: + /// imgui_internal.h:3151 + ///
float RowTextBaseline + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RowTextBaseline => ref Unsafe.AsRef(&_ptr->RowTextBaseline); + + /// + /// + /// C++: + /// imgui_internal.h:3152 + ///
float RowIndentOffsetX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RowIndentOffsetX => ref Unsafe.AsRef(&_ptr->RowIndentOffsetX); + + /// + /// + /// Current row flags, see ImGuiTableRowFlags_ + /// + /// + /// C++: + /// imgui_internal.h:3153 + ///
ImGuiTableRowFlags RowFlags : 16 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableRowFlags RowFlags => ref Unsafe.AsRef(&_ptr->RowFlags); + + /// + /// + /// C++: + /// imgui_internal.h:3154 + ///
ImGuiTableRowFlags LastRowFlags : 16 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableRowFlags LastRowFlags => ref Unsafe.AsRef(&_ptr->LastRowFlags); + + /// + /// + /// Counter for alternating background colors (can be fast-forwarded by e.g clipper), not same as CurrentRow + /// because header rows typically don't increase this. + /// + /// + /// C++: + /// imgui_internal.h:3155 + ///
int RowBgColorCounter + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref int RowBgColorCounter => ref Unsafe.AsRef(&_ptr->RowBgColorCounter); + + /// + /// + /// Background color override for current row. + /// + /// + /// C++: + /// imgui_internal.h:3156 + ///
ImU32 RowBgColor[2] + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref uint_2 RowBgColor => ref Unsafe.AsRef(&_ptr->RowBgColor); + + /// + /// + /// C++: + /// imgui_internal.h:3157 + ///
ImU32 BorderColorStrong + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref uint BorderColorStrong => ref Unsafe.AsRef(&_ptr->BorderColorStrong); + + /// + /// + /// C++: + /// imgui_internal.h:3158 + ///
ImU32 BorderColorLight + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref uint BorderColorLight => ref Unsafe.AsRef(&_ptr->BorderColorLight); + + /// + /// + /// C++: + /// imgui_internal.h:3159 + ///
float BorderX1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float BorderX1 => ref Unsafe.AsRef(&_ptr->BorderX1); + + /// + /// + /// C++: + /// imgui_internal.h:3160 + ///
float BorderX2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float BorderX2 => ref Unsafe.AsRef(&_ptr->BorderX2); + + /// + /// + /// C++: + /// imgui_internal.h:3161 + ///
float HostIndentX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float HostIndentX => ref Unsafe.AsRef(&_ptr->HostIndentX); + + /// + /// + /// C++: + /// imgui_internal.h:3162 + ///
float MinColumnWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float MinColumnWidth => ref Unsafe.AsRef(&_ptr->MinColumnWidth); + + /// + /// + /// C++: + /// imgui_internal.h:3163 + ///
float OuterPaddingX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float OuterPaddingX => ref Unsafe.AsRef(&_ptr->OuterPaddingX); + + /// + /// + /// Padding from each borders. Locked in BeginTable()/Layout. + /// + /// + /// C++: + /// imgui_internal.h:3164 + ///
float CellPaddingX + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float CellPaddingX => ref Unsafe.AsRef(&_ptr->CellPaddingX); + + /// + /// + /// Spacing between non-bordered cells. Locked in BeginTable()/Layout. + /// + /// + /// C++: + /// imgui_internal.h:3165 + ///
float CellSpacingX1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float CellSpacingX1 => ref Unsafe.AsRef(&_ptr->CellSpacingX1); + + /// + /// + /// C++: + /// imgui_internal.h:3166 + ///
float CellSpacingX2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float CellSpacingX2 => ref Unsafe.AsRef(&_ptr->CellSpacingX2); + + /// + /// + /// User value passed to BeginTable(), see comments at the top of BeginTable() for details. + /// + /// + /// C++: + /// imgui_internal.h:3167 + ///
float InnerWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float InnerWidth => ref Unsafe.AsRef(&_ptr->InnerWidth); + + /// + /// + /// Sum of current column width + /// + /// + /// C++: + /// imgui_internal.h:3168 + ///
float ColumnsGivenWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float ColumnsGivenWidth => ref Unsafe.AsRef(&_ptr->ColumnsGivenWidth); + + /// + /// + /// Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width + /// submission in outer window + /// + /// + /// C++: + /// imgui_internal.h:3169 + ///
float ColumnsAutoFitWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float ColumnsAutoFitWidth => ref Unsafe.AsRef(&_ptr->ColumnsAutoFitWidth); + + /// + /// + /// Sum of weight of all enabled stretching columns + /// + /// + /// C++: + /// imgui_internal.h:3170 + ///
float ColumnsStretchSumWeights + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float ColumnsStretchSumWeights => ref Unsafe.AsRef(&_ptr->ColumnsStretchSumWeights); + + /// + /// + /// C++: + /// imgui_internal.h:3171 + ///
float ResizedColumnNextWidth + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float ResizedColumnNextWidth => ref Unsafe.AsRef(&_ptr->ResizedColumnNextWidth); + + /// + /// + /// Lock minimum contents width while resizing down in order to not create feedback loops. But we allow + /// growing the table. + /// + /// + /// C++: + /// imgui_internal.h:3172 + ///
float ResizeLockMinContentsX2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float ResizeLockMinContentsX2 => ref Unsafe.AsRef(&_ptr->ResizeLockMinContentsX2); + + /// + /// + /// Reference scale to be able to rescale columns on font/dpi changes. + /// + /// + /// C++: + /// imgui_internal.h:3173 + ///
float RefScale + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float RefScale => ref Unsafe.AsRef(&_ptr->RefScale); + + /// + /// + /// Set by TableAngledHeadersRow(), used in TableUpdateLayout() + /// + /// + /// C++: + /// imgui_internal.h:3174 + ///
float AngledHeadersHeight + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float AngledHeadersHeight => ref Unsafe.AsRef(&_ptr->AngledHeadersHeight); + + /// + /// + /// Set by TableAngledHeadersRow(), used in TableUpdateLayout() + /// + /// + /// C++: + /// imgui_internal.h:3175 + ///
float AngledHeadersSlope + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref float AngledHeadersSlope => ref Unsafe.AsRef(&_ptr->AngledHeadersSlope); + + /// + /// + /// Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has + /// been specified in BeginTable(). + /// + /// + /// C++: + /// imgui_internal.h:3176 + ///
ImRect OuterRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect OuterRect => ref Unsafe.AsRef(&_ptr->OuterRect); + + /// + /// + /// InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is " + /// + /// + /// C++: + /// imgui_internal.h:3177 + ///
ImRect InnerRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect InnerRect => ref Unsafe.AsRef(&_ptr->InnerRect); + + /// + /// + /// C++: + /// imgui_internal.h:3178 + ///
ImRect WorkRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect WorkRect => ref Unsafe.AsRef(&_ptr->WorkRect); + + /// + /// + /// C++: + /// imgui_internal.h:3179 + ///
ImRect InnerClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect InnerClipRect => ref Unsafe.AsRef(&_ptr->InnerClipRect); + + /// + /// + /// We use this to cpu-clip cell background color fill, evolve during the frame as we cross frozen rows + /// boundaries + /// + /// + /// C++: + /// imgui_internal.h:3180 + ///
ImRect BgClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect BgClipRect => ref Unsafe.AsRef(&_ptr->BgClipRect); + + /// + /// + /// Actual ImDrawCmd clip rect for BG0/1 channel. This tends to be == OuterWindow->ClipRect at + /// BeginTable() because output in BG0/BG1 is cpu-clipped + /// + /// + /// C++: + /// imgui_internal.h:3181 + ///
ImRect Bg0ClipRectForDrawCmd + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect Bg0ClipRectForDrawCmd => ref Unsafe.AsRef(&_ptr->Bg0ClipRectForDrawCmd); + + /// + /// + /// Actual ImDrawCmd clip rect for BG2 channel. This tends to be a correct, tight-fit, because output to BG2 + /// are done by widgets relying on regular ClipRect. + /// + /// + /// C++: + /// imgui_internal.h:3182 + ///
ImRect Bg2ClipRectForDrawCmd + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect Bg2ClipRectForDrawCmd => ref Unsafe.AsRef(&_ptr->Bg2ClipRectForDrawCmd); + + /// + /// + /// This is used to check if we can eventually merge our columns draw calls into the current draw call of + /// the current window. + /// + /// + /// C++: + /// imgui_internal.h:3183 + ///
ImRect HostClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect HostClipRect => ref Unsafe.AsRef(&_ptr->HostClipRect); + + /// + /// + /// Backup of InnerWindow->ClipRect during PushTableBackground()/PopTableBackground() + /// + /// + /// C++: + /// imgui_internal.h:3184 + ///
ImRect HostBackupInnerClipRect + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref floatRect HostBackupInnerClipRect => ref Unsafe.AsRef(&_ptr->HostBackupInnerClipRect); + + /// + /// + /// Parent window for the table + /// + /// + /// C++: + /// imgui_internal.h:3185 + ///
ImGuiWindow* OuterWindow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiWindowPtr OuterWindow => ref Unsafe.AsRef(&_ptr->OuterWindow); + + /// + /// + /// Window holding the table data (== OuterWindow or a child window) + /// + /// + /// C++: + /// imgui_internal.h:3186 + ///
ImGuiWindow* InnerWindow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiWindowPtr InnerWindow => ref Unsafe.AsRef(&_ptr->InnerWindow); + + /// + /// + /// Contiguous buffer holding columns names + /// + /// + /// C++: + /// imgui_internal.h:3187 + ///
ImGuiTextBuffer ColumnsNames + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTextBuffer ColumnsNames => ref Unsafe.AsRef(&_ptr->ColumnsNames); + + /// + /// + /// Shortcut to TempData->DrawSplitter while in table. Isolate draw commands per columns to avoid + /// switching clip rect constantly + /// + /// + /// C++: + /// imgui_internal.h:3188 + ///
ImDrawListSplitter* DrawSplitter + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImDrawListSplitterPtr DrawSplitter => ref Unsafe.AsRef(&_ptr->DrawSplitter); + + /// + /// + /// C++: + /// imgui_internal.h:3189 + ///
ImGuiTableInstanceData InstanceDataFirst + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableInstanceData InstanceDataFirst => + ref Unsafe.AsRef(&_ptr->InstanceDataFirst); + + /// + /// + /// FIXME-OPT: Using a small-vector pattern would be good. + /// + /// + /// C++: + /// imgui_internal.h:3190 + ///
ImVector<ImGuiTableInstanceData> InstanceDataExtra + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImVector InstanceDataExtra => + ref Unsafe.AsRef>(&_ptr->InstanceDataExtra); + + /// + /// + /// C++: + /// imgui_internal.h:3191 + ///
ImGuiTableColumnSortSpecs SortSpecsSingle + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableColumnSortSpecs SortSpecsSingle => + ref Unsafe.AsRef(&_ptr->SortSpecsSingle); + + /// + /// + /// FIXME-OPT: Using a small-vector pattern would be good. + /// + /// + /// C++: + /// imgui_internal.h:3192 + ///
ImVector<ImGuiTableColumnSortSpecs> SortSpecsMulti + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImVector SortSpecsMulti => + ref Unsafe.AsRef>(&_ptr->SortSpecsMulti); + + /// + /// + /// Public facing sorts specs, this is what we return in TableGetSortSpecs() + /// + /// + /// C++: + /// imgui_internal.h:3193 + ///
ImGuiTableSortSpecs SortSpecs + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ImGuiTableSortSpecs SortSpecs => ref Unsafe.AsRef(&_ptr->SortSpecs); + + /// + /// + /// C++: + /// imgui_internal.h:3194 + ///
ImGuiTableColumnIdx SortSpecsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short SortSpecsCount => ref Unsafe.AsRef(&_ptr->SortSpecsCount); + + /// + /// + /// Number of enabled columns (<= ColumnsCount) + /// + /// + /// C++: + /// imgui_internal.h:3195 + ///
ImGuiTableColumnIdx ColumnsEnabledCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short ColumnsEnabledCount => ref Unsafe.AsRef(&_ptr->ColumnsEnabledCount); + + /// + /// + /// Number of enabled columns using fixed width (<= ColumnsCount) + /// + /// + /// C++: + /// imgui_internal.h:3196 + ///
ImGuiTableColumnIdx ColumnsEnabledFixedCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short ColumnsEnabledFixedCount => ref Unsafe.AsRef(&_ptr->ColumnsEnabledFixedCount); + + /// + /// + /// Count calls to TableSetupColumn() + /// + /// + /// C++: + /// imgui_internal.h:3197 + ///
ImGuiTableColumnIdx DeclColumnsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short DeclColumnsCount => ref Unsafe.AsRef(&_ptr->DeclColumnsCount); + + /// + /// + /// Count columns with angled headers + /// + /// + /// C++: + /// imgui_internal.h:3198 + ///
ImGuiTableColumnIdx AngledHeadersCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short AngledHeadersCount => ref Unsafe.AsRef(&_ptr->AngledHeadersCount); + + /// + /// + /// Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty + /// region after the right-most column! + /// + /// + /// C++: + /// imgui_internal.h:3199 + ///
ImGuiTableColumnIdx HoveredColumnBody + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short HoveredColumnBody => ref Unsafe.AsRef(&_ptr->HoveredColumnBody); + + /// + /// + /// Index of column whose right-border is being hovered (for resizing). + /// + /// + /// C++: + /// imgui_internal.h:3200 + ///
ImGuiTableColumnIdx HoveredColumnBorder + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short HoveredColumnBorder => ref Unsafe.AsRef(&_ptr->HoveredColumnBorder); + + /// + /// + /// Index of column which should be highlighted. + /// + /// + /// C++: + /// imgui_internal.h:3201 + ///
ImGuiTableColumnIdx HighlightColumnHeader + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short HighlightColumnHeader => ref Unsafe.AsRef(&_ptr->HighlightColumnHeader); + + /// + /// + /// Index of single column requesting auto-fit. + /// + /// + /// C++: + /// imgui_internal.h:3202 + ///
ImGuiTableColumnIdx AutoFitSingleColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short AutoFitSingleColumn => ref Unsafe.AsRef(&_ptr->AutoFitSingleColumn); + + /// + /// + /// Index of column being resized. Reset when InstanceCurrent==0. + /// + /// + /// C++: + /// imgui_internal.h:3203 + ///
ImGuiTableColumnIdx ResizedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short ResizedColumn => ref Unsafe.AsRef(&_ptr->ResizedColumn); + + /// + /// + /// Index of column being resized from previous frame. + /// + /// + /// C++: + /// imgui_internal.h:3204 + ///
ImGuiTableColumnIdx LastResizedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short LastResizedColumn => ref Unsafe.AsRef(&_ptr->LastResizedColumn); + + /// + /// + /// Index of column header being held. + /// + /// + /// C++: + /// imgui_internal.h:3205 + ///
ImGuiTableColumnIdx HeldHeaderColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short HeldHeaderColumn => ref Unsafe.AsRef(&_ptr->HeldHeaderColumn); + + /// + /// + /// Index of column being reordered. (not cleared) + /// + /// + /// C++: + /// imgui_internal.h:3206 + ///
ImGuiTableColumnIdx ReorderColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short ReorderColumn => ref Unsafe.AsRef(&_ptr->ReorderColumn); + + /// + /// + /// -1 or +1 + /// + /// + /// C++: + /// imgui_internal.h:3207 + ///
ImGuiTableColumnIdx ReorderColumnDir + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short ReorderColumnDir => ref Unsafe.AsRef(&_ptr->ReorderColumnDir); + + /// + /// + /// Index of left-most non-hidden column. + /// + /// + /// C++: + /// imgui_internal.h:3208 + ///
ImGuiTableColumnIdx LeftMostEnabledColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short LeftMostEnabledColumn => ref Unsafe.AsRef(&_ptr->LeftMostEnabledColumn); + + /// + /// + /// Index of right-most non-hidden column. + /// + /// + /// C++: + /// imgui_internal.h:3209 + ///
ImGuiTableColumnIdx RightMostEnabledColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short RightMostEnabledColumn => ref Unsafe.AsRef(&_ptr->RightMostEnabledColumn); + + /// + /// + /// Index of left-most stretched column. + /// + /// + /// C++: + /// imgui_internal.h:3210 + ///
ImGuiTableColumnIdx LeftMostStretchedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short LeftMostStretchedColumn => ref Unsafe.AsRef(&_ptr->LeftMostStretchedColumn); + + /// + /// + /// Index of right-most stretched column. + /// + /// + /// C++: + /// imgui_internal.h:3211 + ///
ImGuiTableColumnIdx RightMostStretchedColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short RightMostStretchedColumn => ref Unsafe.AsRef(&_ptr->RightMostStretchedColumn); + + /// + /// + /// Column right-clicked on, of -1 if opening context menu from a neutral/empty spot + /// + /// + /// C++: + /// imgui_internal.h:3212 + ///
ImGuiTableColumnIdx ContextPopupColumn + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short ContextPopupColumn => ref Unsafe.AsRef(&_ptr->ContextPopupColumn); + + /// + /// + /// Requested frozen rows count + /// + /// + /// C++: + /// imgui_internal.h:3213 + ///
ImGuiTableColumnIdx FreezeRowsRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short FreezeRowsRequest => ref Unsafe.AsRef(&_ptr->FreezeRowsRequest); + + /// + /// + /// Actual frozen row count (== FreezeRowsRequest, or == 0 when no scrolling offset) + /// + /// + /// C++: + /// imgui_internal.h:3214 + ///
ImGuiTableColumnIdx FreezeRowsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short FreezeRowsCount => ref Unsafe.AsRef(&_ptr->FreezeRowsCount); + + /// + /// + /// Requested frozen columns count + /// + /// + /// C++: + /// imgui_internal.h:3215 + ///
ImGuiTableColumnIdx FreezeColumnsRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short FreezeColumnsRequest => ref Unsafe.AsRef(&_ptr->FreezeColumnsRequest); + + /// + /// + /// Actual frozen columns count (== FreezeColumnsRequest, or == 0 when no scrolling offset) + /// + /// + /// C++: + /// imgui_internal.h:3216 + ///
ImGuiTableColumnIdx FreezeColumnsCount + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short FreezeColumnsCount => ref Unsafe.AsRef(&_ptr->FreezeColumnsCount); + + /// + /// + /// Index of current RowCellData[] entry in current row + /// + /// + /// C++: + /// imgui_internal.h:3217 + ///
ImGuiTableColumnIdx RowCellDataCurrent + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref short RowCellDataCurrent => ref Unsafe.AsRef(&_ptr->RowCellDataCurrent); + + /// + /// + /// Redirect non-visible columns here. + /// + /// + /// C++: + /// imgui_internal.h:3218 + ///
ImGuiTableDrawChannelIdx DummyDrawChannel + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ushort DummyDrawChannel => ref Unsafe.AsRef(&_ptr->DummyDrawChannel); + + /// + /// + /// For Selectable() and other widgets drawing across columns after the freezing line. Index within + /// DrawSplitter.Channels[] + /// + /// + /// C++: + /// imgui_internal.h:3219 + ///
ImGuiTableDrawChannelIdx Bg2DrawChannelCurrent + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ushort Bg2DrawChannelCurrent => ref Unsafe.AsRef(&_ptr->Bg2DrawChannelCurrent); + + /// + /// + /// C++: + /// imgui_internal.h:3220 + ///
ImGuiTableDrawChannelIdx Bg2DrawChannelUnfrozen + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref ushort Bg2DrawChannelUnfrozen => ref Unsafe.AsRef(&_ptr->Bg2DrawChannelUnfrozen); + + /// + /// + /// ImGuiNavLayer at the time of BeginTable(). + /// + /// + /// C++: + /// imgui_internal.h:3221 + ///
ImS8 NavLayer + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref sbyte NavLayer => ref Unsafe.AsRef(&_ptr->NavLayer); + + /// + /// + /// Set by TableUpdateLayout() which is called when beginning the first row. + /// + /// + /// C++: + /// imgui_internal.h:3222 + ///
bool IsLayoutLocked + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsLayoutLocked => ref Unsafe.AsRef(&_ptr->IsLayoutLocked); + + /// + /// + /// Set when inside TableBeginRow()/TableEndRow(). + /// + /// + /// C++: + /// imgui_internal.h:3223 + ///
bool IsInsideRow + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsInsideRow => ref Unsafe.AsRef(&_ptr->IsInsideRow); + + /// + /// + /// C++: + /// imgui_internal.h:3224 + ///
bool IsInitializing + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsInitializing => ref Unsafe.AsRef(&_ptr->IsInitializing); + + /// + /// + /// C++: + /// imgui_internal.h:3225 + ///
bool IsSortSpecsDirty + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsSortSpecsDirty => ref Unsafe.AsRef(&_ptr->IsSortSpecsDirty); + + /// + /// + /// Set when the first row had the ImGuiTableRowFlags_Headers flag. + /// + /// + /// C++: + /// imgui_internal.h:3226 + ///
bool IsUsingHeaders + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsUsingHeaders => ref Unsafe.AsRef(&_ptr->IsUsingHeaders); + + /// + /// + /// Set when default context menu is open (also see: ContextPopupColumn, InstanceInteracted). + /// + /// + /// C++: + /// imgui_internal.h:3227 + ///
bool IsContextPopupOpen + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsContextPopupOpen => ref Unsafe.AsRef(&_ptr->IsContextPopupOpen); + + /// + /// + /// Disable default context menu. You may submit your own using TableBeginContextMenuPopup()/EndPopup() + /// + /// + /// C++: + /// imgui_internal.h:3228 + ///
bool DisableDefaultContextMenu + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool DisableDefaultContextMenu => ref Unsafe.AsRef(&_ptr->DisableDefaultContextMenu); + + /// + /// + /// C++: + /// imgui_internal.h:3229 + ///
bool IsSettingsRequestLoad + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsSettingsRequestLoad => ref Unsafe.AsRef(&_ptr->IsSettingsRequestLoad); + + /// + /// + /// Set when table settings have changed and needs to be reported into ImGuiTableSetttings data. + /// + /// + /// C++: + /// imgui_internal.h:3230 + ///
bool IsSettingsDirty + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsSettingsDirty => ref Unsafe.AsRef(&_ptr->IsSettingsDirty); + + /// + /// + /// Set when display order is unchanged from default (DisplayOrder contains 0...Count-1) + /// + /// + /// C++: + /// imgui_internal.h:3231 + ///
bool IsDefaultDisplayOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsDefaultDisplayOrder => ref Unsafe.AsRef(&_ptr->IsDefaultDisplayOrder); + + /// + /// + /// C++: + /// imgui_internal.h:3232 + ///
bool IsResetAllRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsResetAllRequest => ref Unsafe.AsRef(&_ptr->IsResetAllRequest); + + /// + /// + /// C++: + /// imgui_internal.h:3233 + ///
bool IsResetDisplayOrderRequest + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsResetDisplayOrderRequest => ref Unsafe.AsRef(&_ptr->IsResetDisplayOrderRequest); + + /// + /// + /// Set when we got past the frozen row. + /// + /// + /// C++: + /// imgui_internal.h:3234 + ///
bool IsUnfrozenRows + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsUnfrozenRows => ref Unsafe.AsRef(&_ptr->IsUnfrozenRows); + + /// + /// + /// Set if user didn't explicitly set a sizing policy in BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3235 + ///
bool IsDefaultSizingPolicy + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsDefaultSizingPolicy => ref Unsafe.AsRef(&_ptr->IsDefaultSizingPolicy); + + /// + /// + /// C++: + /// imgui_internal.h:3236 + ///
bool IsActiveIdAliveBeforeTable + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsActiveIdAliveBeforeTable => ref Unsafe.AsRef(&_ptr->IsActiveIdAliveBeforeTable); + + /// + /// + /// C++: + /// imgui_internal.h:3237 + ///
bool IsActiveIdInTable + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool IsActiveIdInTable => ref Unsafe.AsRef(&_ptr->IsActiveIdInTable); + + /// + /// + /// Whether ANY instance of this table had a vertical scrollbar during the current frame. + /// + /// + /// C++: + /// imgui_internal.h:3238 + ///
bool HasScrollbarYCurr + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool HasScrollbarYCurr => ref Unsafe.AsRef(&_ptr->HasScrollbarYCurr); + + /// + /// + /// Whether ANY instance of this table had a vertical scrollbar during the previous. + /// + /// + /// C++: + /// imgui_internal.h:3239 + ///
bool HasScrollbarYPrev + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool HasScrollbarYPrev => ref Unsafe.AsRef(&_ptr->HasScrollbarYPrev); + + /// + /// + /// C++: + /// imgui_internal.h:3240 + ///
bool MemoryCompacted + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool MemoryCompacted => ref Unsafe.AsRef(&_ptr->MemoryCompacted); + + /// + /// + /// Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite + /// InnerWindow->SkipItem on a per-column basis + /// + /// + /// C++: + /// imgui_internal.h:3241 + ///
bool HostSkipItems + ///
+ ///
+ /// + /// + /// sizeof() ~ 592 bytes + heap allocs described in TableBeginInitMemory() + /// + /// + public ref bool HostSkipItems => ref Unsafe.AsRef(&_ptr->HostSkipItems); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableCellData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableCellData.gen.cs new file mode 100644 index 0000000..551f73f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableCellData.gen.cs @@ -0,0 +1,124 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:3095 + ///
struct ImGuiTableCellData + ///
+ ///
+ /// + /// + /// Transient cell data stored per row. + /// sizeof() ~ 6 bytes + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ImGuiTableCellData + { + /// + /// + /// Actual color + /// + /// + /// C++: + /// imgui_internal.h:3097 + ///
ImU32 BgColor + ///
+ ///
+ /// + /// + /// Transient cell data stored per row. + /// sizeof() ~ 6 bytes + /// + /// + [FieldOffset(0)] + public uint BgColor; + + /// + /// + /// Column number + /// + /// + /// C++: + /// imgui_internal.h:3098 + ///
ImGuiTableColumnIdx Column + ///
+ ///
+ /// + /// + /// Transient cell data stored per row. + /// sizeof() ~ 6 bytes + /// + /// + [FieldOffset(4)] + public short Column; + } + + /// + /// + /// C++: + /// imgui_internal.h:3095 + ///
struct ImGuiTableCellData + ///
+ ///
+ /// + /// + /// Transient cell data stored per row. + /// sizeof() ~ 6 bytes + /// + /// + public unsafe partial struct ImGuiTableCellDataPtr(ImGuiTableCellData* ptr) : INullable + { + private ImGuiTableCellData* _ptr = ptr; + public ImGuiTableCellData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableCellDataPtr(ImGuiTableCellData* ptr) => new(ptr); + + public static implicit operator ImGuiTableCellData*(ImGuiTableCellDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Actual color + /// + /// + /// C++: + /// imgui_internal.h:3097 + ///
ImU32 BgColor + ///
+ ///
+ /// + /// + /// Transient cell data stored per row. + /// sizeof() ~ 6 bytes + /// + /// + public ref uint BgColor => ref Unsafe.AsRef(&_ptr->BgColor); + + /// + /// + /// Column number + /// + /// + /// C++: + /// imgui_internal.h:3098 + ///
ImGuiTableColumnIdx Column + ///
+ ///
+ /// + /// + /// Transient cell data stored per row. + /// sizeof() ~ 6 bytes + /// + /// + public ref short Column => ref Unsafe.AsRef(&_ptr->Column); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumn.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumn.gen.cs new file mode 100644 index 0000000..4c8c2e5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumn.gen.cs @@ -0,0 +1,1750 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for one column of a table + /// + /// + /// C++: + /// imgui_internal.h:182 + ///
struct ImGuiTableColumn + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 116)] + public partial struct ImGuiTableColumn + { + /// + /// + /// Flags after some patching (not directly same as provided by user). See ImGuiTableColumnFlags_ + /// + /// + /// C++: + /// imgui_internal.h:3037 + ///
ImGuiTableColumnFlags Flags + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(0)] + public ImGuiTableColumnFlags Flags; + + /// + /// + /// Final/actual width visible == (MaxX - MinX), locked in TableUpdateLayout(). May be > WidthRequest to + /// honor minimum width, may be < WidthRequest to honor shrinking columns down in tight space. + /// + /// + /// C++: + /// imgui_internal.h:3038 + ///
float WidthGiven + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(4)] + public float WidthGiven; + + /// + /// + /// Absolute positions + /// + /// + /// C++: + /// imgui_internal.h:3039 + ///
float MinX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(8)] + public float MinX; + + /// + /// + /// C++: + /// imgui_internal.h:3040 + ///
float MaxX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(12)] + public float MaxX; + + /// + /// + /// Master width absolute value when !(Flags & _WidthStretch). When Stretch this is derived every frame + /// from StretchWeight in TableUpdateLayout() + /// + /// + /// C++: + /// imgui_internal.h:3041 + ///
float WidthRequest + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(16)] + public float WidthRequest; + + /// + /// + /// Automatic width + /// + /// + /// C++: + /// imgui_internal.h:3042 + ///
float WidthAuto + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(20)] + public float WidthAuto; + + /// + /// + /// Maximum width (FIXME: overwritten by each instance) + /// + /// + /// C++: + /// imgui_internal.h:3043 + ///
float WidthMax + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(24)] + public float WidthMax; + + /// + /// + /// Master width weight when (Flags & _WidthStretch). Often around ~1.0f initially. + /// + /// + /// C++: + /// imgui_internal.h:3044 + ///
float StretchWeight + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(28)] + public float StretchWeight; + + /// + /// + /// Value passed to TableSetupColumn(). For Width it is a content width (_without padding_). + /// + /// + /// C++: + /// imgui_internal.h:3045 + ///
float InitStretchWeightOrWidth + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(32)] + public float InitStretchWeightOrWidth; + + /// + /// + /// Clipping rectangle for the column + /// + /// + /// C++: + /// imgui_internal.h:3046 + ///
ImRect ClipRect + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(36)] + public floatRect ClipRect; + + /// + /// + /// Optional, value passed to TableSetupColumn() + /// + /// + /// C++: + /// imgui_internal.h:3047 + ///
ImGuiID UserID + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(52)] + public ImGuiID UserID; + + /// + /// + /// Contents region min ~(MinX + CellPaddingX + CellSpacingX1) == cursor start position when entering column + /// + /// + /// C++: + /// imgui_internal.h:3048 + ///
float WorkMinX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(56)] + public float WorkMinX; + + /// + /// + /// Contents region max ~(MaxX - CellPaddingX - CellSpacingX2) + /// + /// + /// C++: + /// imgui_internal.h:3049 + ///
float WorkMaxX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(60)] + public float WorkMaxX; + + /// + /// + /// Current item width for the column, preserved across rows + /// + /// + /// C++: + /// imgui_internal.h:3050 + ///
float ItemWidth + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(64)] + public float ItemWidth; + + /// + /// + /// Contents maximum position for frozen rows (apart from headers), from which we can infer content width. + /// + /// + /// C++: + /// imgui_internal.h:3051 + ///
float ContentMaxXFrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(68)] + public float ContentMaxXFrozen; + + /// + /// + /// C++: + /// imgui_internal.h:3052 + ///
float ContentMaxXUnfrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(72)] + public float ContentMaxXUnfrozen; + + /// + /// + /// Contents maximum position for headers rows (regardless of freezing). TableHeader() automatically + /// softclip itself + report ideal desired size, to avoid creating extraneous draw calls + /// + /// + /// C++: + /// imgui_internal.h:3053 + ///
float ContentMaxXHeadersUsed + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(76)] + public float ContentMaxXHeadersUsed; + + /// + /// + /// C++: + /// imgui_internal.h:3054 + ///
float ContentMaxXHeadersIdeal + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(80)] + public float ContentMaxXHeadersIdeal; + + /// + /// + /// Offset into parent ColumnsNames[] + /// + /// + /// C++: + /// imgui_internal.h:3055 + ///
ImS16 NameOffset + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(84)] + public short NameOffset; + + /// + /// + /// Index within Table's IndexToDisplayOrder[] (column may be reordered by users) + /// + /// + /// C++: + /// imgui_internal.h:3056 + ///
ImGuiTableColumnIdx DisplayOrder + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(86)] + public short DisplayOrder; + + /// + /// + /// Index within enabled/visible set (<= IndexToDisplayOrder) + /// + /// + /// C++: + /// imgui_internal.h:3057 + ///
ImGuiTableColumnIdx IndexWithinEnabledSet + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(88)] + public short IndexWithinEnabledSet; + + /// + /// + /// Index of prev enabled/visible column within Columns[], -1 if first enabled/visible column + /// + /// + /// C++: + /// imgui_internal.h:3058 + ///
ImGuiTableColumnIdx PrevEnabledColumn + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(90)] + public short PrevEnabledColumn; + + /// + /// + /// Index of next enabled/visible column within Columns[], -1 if last enabled/visible column + /// + /// + /// C++: + /// imgui_internal.h:3059 + ///
ImGuiTableColumnIdx NextEnabledColumn + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(92)] + public short NextEnabledColumn; + + /// + /// + /// Index of this column within sort specs, -1 if not sorting on this column, 0 for single-sort, may be + /// >0 on multi-sort + /// + /// + /// C++: + /// imgui_internal.h:3060 + ///
ImGuiTableColumnIdx SortOrder + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(94)] + public short SortOrder; + + /// + /// + /// Index within DrawSplitter.Channels[] + /// + /// + /// C++: + /// imgui_internal.h:3061 + ///
ImGuiTableDrawChannelIdx DrawChannelCurrent + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(96)] + public ushort DrawChannelCurrent; + + /// + /// + /// Draw channels for frozen rows (often headers) + /// + /// + /// C++: + /// imgui_internal.h:3062 + ///
ImGuiTableDrawChannelIdx DrawChannelFrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(98)] + public ushort DrawChannelFrozen; + + /// + /// + /// Draw channels for unfrozen rows + /// + /// + /// C++: + /// imgui_internal.h:3063 + ///
ImGuiTableDrawChannelIdx DrawChannelUnfrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(100)] + public ushort DrawChannelUnfrozen; + + /// + /// + /// IsUserEnabled && (Flags & ImGuiTableColumnFlags_Disabled) == 0 + /// + /// + /// C++: + /// imgui_internal.h:3064 + ///
bool IsEnabled + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(102)] + public Bool8 IsEnabled; + + /// + /// + /// Is the column not marked Hidden by the user? (unrelated to being off view, e.g. clipped by scrolling). + /// + /// + /// C++: + /// imgui_internal.h:3065 + ///
bool IsUserEnabled + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(103)] + public Bool8 IsUserEnabled; + + /// + /// + /// C++: + /// imgui_internal.h:3066 + ///
bool IsUserEnabledNextFrame + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(104)] + public Bool8 IsUserEnabledNextFrame; + + /// + /// + /// Is actually in view (e.g. overlapping the host window clipping rectangle, not scrolled). + /// + /// + /// C++: + /// imgui_internal.h:3067 + ///
bool IsVisibleX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(105)] + public Bool8 IsVisibleX; + + /// + /// + /// C++: + /// imgui_internal.h:3068 + ///
bool IsVisibleY + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(106)] + public Bool8 IsVisibleY; + + /// + /// + /// Return value for TableSetColumnIndex() / TableNextColumn(): whether we request user to output contents + /// or not. + /// + /// + /// C++: + /// imgui_internal.h:3069 + ///
bool IsRequestOutput + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(107)] + public Bool8 IsRequestOutput; + + /// + /// + /// Do we want item submissions to this column to be completely ignored (no layout will happen). + /// + /// + /// C++: + /// imgui_internal.h:3070 + ///
bool IsSkipItems + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(108)] + public Bool8 IsSkipItems; + + /// + /// + /// C++: + /// imgui_internal.h:3071 + ///
bool IsPreserveWidthAuto + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(109)] + public Bool8 IsPreserveWidthAuto; + + /// + /// + /// ImGuiNavLayer in 1 byte + /// + /// + /// C++: + /// imgui_internal.h:3072 + ///
ImS8 NavLayerCurrent + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(110)] + public sbyte NavLayerCurrent; + + /// + /// + /// Queue of 8 values for the next 8 frames to request auto-fit + /// + /// + /// C++: + /// imgui_internal.h:3073 + ///
ImU8 AutoFitQueue + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(111)] + public byte AutoFitQueue; + + /// + /// + /// Queue of 8 values for the next 8 frames to disable Clipped/SkipItem + /// + /// + /// C++: + /// imgui_internal.h:3074 + ///
ImU8 CannotSkipItemsQueue + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(112)] + public byte CannotSkipItemsQueue; + + /// + /// + /// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending + /// + /// + /// C++: + /// imgui_internal.h:3075 + ///
ImU8 SortDirection : 2 + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(113)] + public byte SortDirection; + + /// + /// + /// Number of available sort directions (0 to 3) + /// + /// + /// C++: + /// imgui_internal.h:3076 + ///
ImU8 SortDirectionsAvailCount : 2 + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(113)] + public byte SortDirectionsAvailCount; + + /// + /// + /// Mask of available sort directions (1-bit each) + /// + /// + /// C++: + /// imgui_internal.h:3077 + ///
ImU8 SortDirectionsAvailMask : 4 + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(113)] + public byte SortDirectionsAvailMask; + + /// + /// + /// Ordered list of available sort directions (2-bits each, total 8-bits) + /// + /// + /// C++: + /// imgui_internal.h:3078 + ///
ImU8 SortDirectionsAvailList + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + [FieldOffset(114)] + public byte SortDirectionsAvailList; + } + + /// + /// + /// Storage for one column of a table + /// + /// + /// C++: + /// imgui_internal.h:182 + ///
struct ImGuiTableColumn + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTableColumnPtr(ImGuiTableColumn* ptr) : INullable + { + private ImGuiTableColumn* _ptr = ptr; + public ImGuiTableColumn* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableColumnPtr(ImGuiTableColumn* ptr) => new(ptr); + + public static implicit operator ImGuiTableColumn*(ImGuiTableColumnPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Flags after some patching (not directly same as provided by user). See ImGuiTableColumnFlags_ + /// + /// + /// C++: + /// imgui_internal.h:3037 + ///
ImGuiTableColumnFlags Flags + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref ImGuiTableColumnFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Final/actual width visible == (MaxX - MinX), locked in TableUpdateLayout(). May be > WidthRequest to + /// honor minimum width, may be < WidthRequest to honor shrinking columns down in tight space. + /// + /// + /// C++: + /// imgui_internal.h:3038 + ///
float WidthGiven + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float WidthGiven => ref Unsafe.AsRef(&_ptr->WidthGiven); + + /// + /// + /// Absolute positions + /// + /// + /// C++: + /// imgui_internal.h:3039 + ///
float MinX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float MinX => ref Unsafe.AsRef(&_ptr->MinX); + + /// + /// + /// C++: + /// imgui_internal.h:3040 + ///
float MaxX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float MaxX => ref Unsafe.AsRef(&_ptr->MaxX); + + /// + /// + /// Master width absolute value when !(Flags & _WidthStretch). When Stretch this is derived every frame + /// from StretchWeight in TableUpdateLayout() + /// + /// + /// C++: + /// imgui_internal.h:3041 + ///
float WidthRequest + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float WidthRequest => ref Unsafe.AsRef(&_ptr->WidthRequest); + + /// + /// + /// Automatic width + /// + /// + /// C++: + /// imgui_internal.h:3042 + ///
float WidthAuto + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float WidthAuto => ref Unsafe.AsRef(&_ptr->WidthAuto); + + /// + /// + /// Maximum width (FIXME: overwritten by each instance) + /// + /// + /// C++: + /// imgui_internal.h:3043 + ///
float WidthMax + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float WidthMax => ref Unsafe.AsRef(&_ptr->WidthMax); + + /// + /// + /// Master width weight when (Flags & _WidthStretch). Often around ~1.0f initially. + /// + /// + /// C++: + /// imgui_internal.h:3044 + ///
float StretchWeight + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float StretchWeight => ref Unsafe.AsRef(&_ptr->StretchWeight); + + /// + /// + /// Value passed to TableSetupColumn(). For Width it is a content width (_without padding_). + /// + /// + /// C++: + /// imgui_internal.h:3045 + ///
float InitStretchWeightOrWidth + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float InitStretchWeightOrWidth => ref Unsafe.AsRef(&_ptr->InitStretchWeightOrWidth); + + /// + /// + /// Clipping rectangle for the column + /// + /// + /// C++: + /// imgui_internal.h:3046 + ///
ImRect ClipRect + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref floatRect ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect); + + /// + /// + /// Optional, value passed to TableSetupColumn() + /// + /// + /// C++: + /// imgui_internal.h:3047 + ///
ImGuiID UserID + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref ImGuiID UserID => ref Unsafe.AsRef(&_ptr->UserID); + + /// + /// + /// Contents region min ~(MinX + CellPaddingX + CellSpacingX1) == cursor start position when entering column + /// + /// + /// C++: + /// imgui_internal.h:3048 + ///
float WorkMinX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float WorkMinX => ref Unsafe.AsRef(&_ptr->WorkMinX); + + /// + /// + /// Contents region max ~(MaxX - CellPaddingX - CellSpacingX2) + /// + /// + /// C++: + /// imgui_internal.h:3049 + ///
float WorkMaxX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float WorkMaxX => ref Unsafe.AsRef(&_ptr->WorkMaxX); + + /// + /// + /// Current item width for the column, preserved across rows + /// + /// + /// C++: + /// imgui_internal.h:3050 + ///
float ItemWidth + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float ItemWidth => ref Unsafe.AsRef(&_ptr->ItemWidth); + + /// + /// + /// Contents maximum position for frozen rows (apart from headers), from which we can infer content width. + /// + /// + /// C++: + /// imgui_internal.h:3051 + ///
float ContentMaxXFrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float ContentMaxXFrozen => ref Unsafe.AsRef(&_ptr->ContentMaxXFrozen); + + /// + /// + /// C++: + /// imgui_internal.h:3052 + ///
float ContentMaxXUnfrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float ContentMaxXUnfrozen => ref Unsafe.AsRef(&_ptr->ContentMaxXUnfrozen); + + /// + /// + /// Contents maximum position for headers rows (regardless of freezing). TableHeader() automatically + /// softclip itself + report ideal desired size, to avoid creating extraneous draw calls + /// + /// + /// C++: + /// imgui_internal.h:3053 + ///
float ContentMaxXHeadersUsed + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float ContentMaxXHeadersUsed => ref Unsafe.AsRef(&_ptr->ContentMaxXHeadersUsed); + + /// + /// + /// C++: + /// imgui_internal.h:3054 + ///
float ContentMaxXHeadersIdeal + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref float ContentMaxXHeadersIdeal => ref Unsafe.AsRef(&_ptr->ContentMaxXHeadersIdeal); + + /// + /// + /// Offset into parent ColumnsNames[] + /// + /// + /// C++: + /// imgui_internal.h:3055 + ///
ImS16 NameOffset + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref short NameOffset => ref Unsafe.AsRef(&_ptr->NameOffset); + + /// + /// + /// Index within Table's IndexToDisplayOrder[] (column may be reordered by users) + /// + /// + /// C++: + /// imgui_internal.h:3056 + ///
ImGuiTableColumnIdx DisplayOrder + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref short DisplayOrder => ref Unsafe.AsRef(&_ptr->DisplayOrder); + + /// + /// + /// Index within enabled/visible set (<= IndexToDisplayOrder) + /// + /// + /// C++: + /// imgui_internal.h:3057 + ///
ImGuiTableColumnIdx IndexWithinEnabledSet + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref short IndexWithinEnabledSet => ref Unsafe.AsRef(&_ptr->IndexWithinEnabledSet); + + /// + /// + /// Index of prev enabled/visible column within Columns[], -1 if first enabled/visible column + /// + /// + /// C++: + /// imgui_internal.h:3058 + ///
ImGuiTableColumnIdx PrevEnabledColumn + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref short PrevEnabledColumn => ref Unsafe.AsRef(&_ptr->PrevEnabledColumn); + + /// + /// + /// Index of next enabled/visible column within Columns[], -1 if last enabled/visible column + /// + /// + /// C++: + /// imgui_internal.h:3059 + ///
ImGuiTableColumnIdx NextEnabledColumn + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref short NextEnabledColumn => ref Unsafe.AsRef(&_ptr->NextEnabledColumn); + + /// + /// + /// Index of this column within sort specs, -1 if not sorting on this column, 0 for single-sort, may be + /// >0 on multi-sort + /// + /// + /// C++: + /// imgui_internal.h:3060 + ///
ImGuiTableColumnIdx SortOrder + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref short SortOrder => ref Unsafe.AsRef(&_ptr->SortOrder); + + /// + /// + /// Index within DrawSplitter.Channels[] + /// + /// + /// C++: + /// imgui_internal.h:3061 + ///
ImGuiTableDrawChannelIdx DrawChannelCurrent + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref ushort DrawChannelCurrent => ref Unsafe.AsRef(&_ptr->DrawChannelCurrent); + + /// + /// + /// Draw channels for frozen rows (often headers) + /// + /// + /// C++: + /// imgui_internal.h:3062 + ///
ImGuiTableDrawChannelIdx DrawChannelFrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref ushort DrawChannelFrozen => ref Unsafe.AsRef(&_ptr->DrawChannelFrozen); + + /// + /// + /// Draw channels for unfrozen rows + /// + /// + /// C++: + /// imgui_internal.h:3063 + ///
ImGuiTableDrawChannelIdx DrawChannelUnfrozen + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref ushort DrawChannelUnfrozen => ref Unsafe.AsRef(&_ptr->DrawChannelUnfrozen); + + /// + /// + /// IsUserEnabled && (Flags & ImGuiTableColumnFlags_Disabled) == 0 + /// + /// + /// C++: + /// imgui_internal.h:3064 + ///
bool IsEnabled + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsEnabled => ref Unsafe.AsRef(&_ptr->IsEnabled); + + /// + /// + /// Is the column not marked Hidden by the user? (unrelated to being off view, e.g. clipped by scrolling). + /// + /// + /// C++: + /// imgui_internal.h:3065 + ///
bool IsUserEnabled + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsUserEnabled => ref Unsafe.AsRef(&_ptr->IsUserEnabled); + + /// + /// + /// C++: + /// imgui_internal.h:3066 + ///
bool IsUserEnabledNextFrame + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsUserEnabledNextFrame => ref Unsafe.AsRef(&_ptr->IsUserEnabledNextFrame); + + /// + /// + /// Is actually in view (e.g. overlapping the host window clipping rectangle, not scrolled). + /// + /// + /// C++: + /// imgui_internal.h:3067 + ///
bool IsVisibleX + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsVisibleX => ref Unsafe.AsRef(&_ptr->IsVisibleX); + + /// + /// + /// C++: + /// imgui_internal.h:3068 + ///
bool IsVisibleY + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsVisibleY => ref Unsafe.AsRef(&_ptr->IsVisibleY); + + /// + /// + /// Return value for TableSetColumnIndex() / TableNextColumn(): whether we request user to output contents + /// or not. + /// + /// + /// C++: + /// imgui_internal.h:3069 + ///
bool IsRequestOutput + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsRequestOutput => ref Unsafe.AsRef(&_ptr->IsRequestOutput); + + /// + /// + /// Do we want item submissions to this column to be completely ignored (no layout will happen). + /// + /// + /// C++: + /// imgui_internal.h:3070 + ///
bool IsSkipItems + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsSkipItems => ref Unsafe.AsRef(&_ptr->IsSkipItems); + + /// + /// + /// C++: + /// imgui_internal.h:3071 + ///
bool IsPreserveWidthAuto + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref bool IsPreserveWidthAuto => ref Unsafe.AsRef(&_ptr->IsPreserveWidthAuto); + + /// + /// + /// ImGuiNavLayer in 1 byte + /// + /// + /// C++: + /// imgui_internal.h:3072 + ///
ImS8 NavLayerCurrent + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref sbyte NavLayerCurrent => ref Unsafe.AsRef(&_ptr->NavLayerCurrent); + + /// + /// + /// Queue of 8 values for the next 8 frames to request auto-fit + /// + /// + /// C++: + /// imgui_internal.h:3073 + ///
ImU8 AutoFitQueue + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref byte AutoFitQueue => ref Unsafe.AsRef(&_ptr->AutoFitQueue); + + /// + /// + /// Queue of 8 values for the next 8 frames to disable Clipped/SkipItem + /// + /// + /// C++: + /// imgui_internal.h:3074 + ///
ImU8 CannotSkipItemsQueue + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref byte CannotSkipItemsQueue => ref Unsafe.AsRef(&_ptr->CannotSkipItemsQueue); + + /// + /// + /// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending + /// + /// + /// C++: + /// imgui_internal.h:3075 + ///
ImU8 SortDirection : 2 + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref byte SortDirection => ref Unsafe.AsRef(&_ptr->SortDirection); + + /// + /// + /// Number of available sort directions (0 to 3) + /// + /// + /// C++: + /// imgui_internal.h:3076 + ///
ImU8 SortDirectionsAvailCount : 2 + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref byte SortDirectionsAvailCount => ref Unsafe.AsRef(&_ptr->SortDirectionsAvailCount); + + /// + /// + /// Mask of available sort directions (1-bit each) + /// + /// + /// C++: + /// imgui_internal.h:3077 + ///
ImU8 SortDirectionsAvailMask : 4 + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref byte SortDirectionsAvailMask => ref Unsafe.AsRef(&_ptr->SortDirectionsAvailMask); + + /// + /// + /// Ordered list of available sort directions (2-bits each, total 8-bits) + /// + /// + /// C++: + /// imgui_internal.h:3078 + ///
ImU8 SortDirectionsAvailList + ///
+ ///
+ /// + /// + /// [Internal] sizeof() ~ 112 + /// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api. + /// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping. + /// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped". + /// + /// + public ref byte SortDirectionsAvailList => ref Unsafe.AsRef(&_ptr->SortDirectionsAvailList); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumnSettings.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumnSettings.gen.cs new file mode 100644 index 0000000..ed3c258 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableColumnSettings.gen.cs @@ -0,0 +1,286 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:3275 + ///
struct ImGuiTableColumnSettings + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiTableColumnSettings + { + /// + /// + /// C++: + /// imgui_internal.h:3277 + ///
float WidthOrWeight + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(0)] + public float WidthOrWeight; + + /// + /// + /// C++: + /// imgui_internal.h:3278 + ///
ImGuiID UserID + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(4)] + public ImGuiID UserID; + + /// + /// + /// C++: + /// imgui_internal.h:3279 + ///
ImGuiTableColumnIdx Index + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(8)] + public short Index; + + /// + /// + /// C++: + /// imgui_internal.h:3280 + ///
ImGuiTableColumnIdx DisplayOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(10)] + public short DisplayOrder; + + /// + /// + /// C++: + /// imgui_internal.h:3281 + ///
ImGuiTableColumnIdx SortOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(12)] + public short SortOrder; + + /// + /// + /// C++: + /// imgui_internal.h:3282 + ///
ImU8 SortDirection : 2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(14)] + public byte SortDirection; + + /// + /// + /// "Visible" in ini file + /// + /// + /// C++: + /// imgui_internal.h:3283 + ///
ImS8 IsEnabled : 2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(14)] + public sbyte IsEnabled; + + /// + /// + /// C++: + /// imgui_internal.h:3284 + ///
ImU8 IsStretch : 1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + [FieldOffset(14)] + public byte IsStretch; + } + + /// + /// + /// C++: + /// imgui_internal.h:3275 + ///
struct ImGuiTableColumnSettings + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public unsafe partial struct ImGuiTableColumnSettingsPtr(ImGuiTableColumnSettings* ptr) : INullable + { + private ImGuiTableColumnSettings* _ptr = ptr; + public ImGuiTableColumnSettings* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableColumnSettingsPtr(ImGuiTableColumnSettings* ptr) => new(ptr); + + public static implicit operator ImGuiTableColumnSettings*(ImGuiTableColumnSettingsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:3277 + ///
float WidthOrWeight + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref float WidthOrWeight => ref Unsafe.AsRef(&_ptr->WidthOrWeight); + + /// + /// + /// C++: + /// imgui_internal.h:3278 + ///
ImGuiID UserID + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref ImGuiID UserID => ref Unsafe.AsRef(&_ptr->UserID); + + /// + /// + /// C++: + /// imgui_internal.h:3279 + ///
ImGuiTableColumnIdx Index + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref short Index => ref Unsafe.AsRef(&_ptr->Index); + + /// + /// + /// C++: + /// imgui_internal.h:3280 + ///
ImGuiTableColumnIdx DisplayOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref short DisplayOrder => ref Unsafe.AsRef(&_ptr->DisplayOrder); + + /// + /// + /// C++: + /// imgui_internal.h:3281 + ///
ImGuiTableColumnIdx SortOrder + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref short SortOrder => ref Unsafe.AsRef(&_ptr->SortOrder); + + /// + /// + /// C++: + /// imgui_internal.h:3282 + ///
ImU8 SortDirection : 2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref byte SortDirection => ref Unsafe.AsRef(&_ptr->SortDirection); + + /// + /// + /// "Visible" in ini file + /// + /// + /// C++: + /// imgui_internal.h:3283 + ///
ImS8 IsEnabled : 2 + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref sbyte IsEnabled => ref Unsafe.AsRef(&_ptr->IsEnabled); + + /// + /// + /// C++: + /// imgui_internal.h:3284 + ///
ImU8 IsStretch : 1 + ///
+ ///
+ /// + /// + /// sizeof() ~ 16 + /// + /// + public ref byte IsStretch => ref Unsafe.AsRef(&_ptr->IsStretch); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableHeaderData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableHeaderData.gen.cs new file mode 100644 index 0000000..231227f --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableHeaderData.gen.cs @@ -0,0 +1,192 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for TableAngledHeadersRow() + /// + /// + /// C++: + /// imgui_internal.h:181 + ///
struct ImGuiTableHeaderData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiTableHeaderData + { + /// + /// + /// Column index + /// + /// + /// C++: + /// imgui_internal.h:3106 + ///
ImGuiTableColumnIdx Index + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + [FieldOffset(0)] + public short Index; + + /// + /// + /// C++: + /// imgui_internal.h:3107 + ///
ImU32 TextColor + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + [FieldOffset(4)] + public uint TextColor; + + /// + /// + /// C++: + /// imgui_internal.h:3108 + ///
ImU32 BgColor0 + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + [FieldOffset(8)] + public uint BgColor0; + + /// + /// + /// C++: + /// imgui_internal.h:3109 + ///
ImU32 BgColor1 + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + [FieldOffset(12)] + public uint BgColor1; + } + + /// + /// + /// Storage for TableAngledHeadersRow() + /// + /// + /// C++: + /// imgui_internal.h:181 + ///
struct ImGuiTableHeaderData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTableHeaderDataPtr(ImGuiTableHeaderData* ptr) : INullable + { + private ImGuiTableHeaderData* _ptr = ptr; + public ImGuiTableHeaderData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableHeaderDataPtr(ImGuiTableHeaderData* ptr) => new(ptr); + + public static implicit operator ImGuiTableHeaderData*(ImGuiTableHeaderDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Column index + /// + /// + /// C++: + /// imgui_internal.h:3106 + ///
ImGuiTableColumnIdx Index + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + public ref short Index => ref Unsafe.AsRef(&_ptr->Index); + + /// + /// + /// C++: + /// imgui_internal.h:3107 + ///
ImU32 TextColor + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + public ref uint TextColor => ref Unsafe.AsRef(&_ptr->TextColor); + + /// + /// + /// C++: + /// imgui_internal.h:3108 + ///
ImU32 BgColor0 + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + public ref uint BgColor0 => ref Unsafe.AsRef(&_ptr->BgColor0); + + /// + /// + /// C++: + /// imgui_internal.h:3109 + ///
ImU32 BgColor1 + ///
+ ///
+ /// + /// + /// Parameters for TableAngledHeadersRowEx() + /// This may end up being refactored for more general purpose. + /// sizeof() ~ 12 bytes + /// + /// + public ref uint BgColor1 => ref Unsafe.AsRef(&_ptr->BgColor1); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableInstanceData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableInstanceData.gen.cs new file mode 100644 index 0000000..6d9ae98 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableInstanceData.gen.cs @@ -0,0 +1,272 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for one instance of a same table + /// + /// + /// C++: + /// imgui_internal.h:183 + ///
struct ImGuiTableInstanceData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImGuiTableInstanceData + { + /// + /// + /// C++: + /// imgui_internal.h:3116 + ///
ImGuiID TableInstanceID + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + [FieldOffset(0)] + public ImGuiID TableInstanceID; + + /// + /// + /// Outer height from last frame + /// + /// + /// C++: + /// imgui_internal.h:3117 + ///
float LastOuterHeight + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + [FieldOffset(4)] + public float LastOuterHeight; + + /// + /// + /// Height of first consecutive header rows from last frame (FIXME: this is used assuming consecutive + /// headers are in same frozen set) + /// + /// + /// C++: + /// imgui_internal.h:3118 + ///
float LastTopHeadersRowHeight + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + [FieldOffset(8)] + public float LastTopHeadersRowHeight; + + /// + /// + /// Height of frozen section from last frame + /// + /// + /// C++: + /// imgui_internal.h:3119 + ///
float LastFrozenHeight + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + [FieldOffset(12)] + public float LastFrozenHeight; + + /// + /// + /// Index of row which was hovered last frame. + /// + /// + /// C++: + /// imgui_internal.h:3120 + ///
int HoveredRowLast + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + [FieldOffset(16)] + public int HoveredRowLast; + + /// + /// + /// Index of row hovered this frame, set after encountering it. + /// + /// + /// C++: + /// imgui_internal.h:3121 + ///
int HoveredRowNext + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + [FieldOffset(20)] + public int HoveredRowNext; + } + + /// + /// + /// Storage for one instance of a same table + /// + /// + /// C++: + /// imgui_internal.h:183 + ///
struct ImGuiTableInstanceData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTableInstanceDataPtr(ImGuiTableInstanceData* ptr) : INullable + { + private ImGuiTableInstanceData* _ptr = ptr; + public ImGuiTableInstanceData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableInstanceDataPtr(ImGuiTableInstanceData* ptr) => new(ptr); + + public static implicit operator ImGuiTableInstanceData*(ImGuiTableInstanceDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:3116 + ///
ImGuiID TableInstanceID + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + public ref ImGuiID TableInstanceID => ref Unsafe.AsRef(&_ptr->TableInstanceID); + + /// + /// + /// Outer height from last frame + /// + /// + /// C++: + /// imgui_internal.h:3117 + ///
float LastOuterHeight + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + public ref float LastOuterHeight => ref Unsafe.AsRef(&_ptr->LastOuterHeight); + + /// + /// + /// Height of first consecutive header rows from last frame (FIXME: this is used assuming consecutive + /// headers are in same frozen set) + /// + /// + /// C++: + /// imgui_internal.h:3118 + ///
float LastTopHeadersRowHeight + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + public ref float LastTopHeadersRowHeight => ref Unsafe.AsRef(&_ptr->LastTopHeadersRowHeight); + + /// + /// + /// Height of frozen section from last frame + /// + /// + /// C++: + /// imgui_internal.h:3119 + ///
float LastFrozenHeight + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + public ref float LastFrozenHeight => ref Unsafe.AsRef(&_ptr->LastFrozenHeight); + + /// + /// + /// Index of row which was hovered last frame. + /// + /// + /// C++: + /// imgui_internal.h:3120 + ///
int HoveredRowLast + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + public ref int HoveredRowLast => ref Unsafe.AsRef(&_ptr->HoveredRowLast); + + /// + /// + /// Index of row hovered this frame, set after encountering it. + /// + /// + /// C++: + /// imgui_internal.h:3121 + ///
int HoveredRowNext + ///
+ ///
+ /// + /// + /// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) + /// sizeof() ~ 24 bytes + /// + /// + public ref int HoveredRowNext => ref Unsafe.AsRef(&_ptr->HoveredRowNext); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableSettings.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableSettings.gen.cs new file mode 100644 index 0000000..fc57471 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableSettings.gen.cs @@ -0,0 +1,274 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for a table .ini settings + /// + /// + /// C++: + /// imgui_internal.h:185 + ///
struct ImGuiTableSettings + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct ImGuiTableSettings + { + /// + /// + /// Set to 0 to invalidate/delete the setting + /// + /// + /// C++: + /// imgui_internal.h:3301 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// Indicate data we want to save using the Resizable/Reorderable/Sortable/Hideable flags (could be using + /// its own flags..) + /// + /// + /// C++: + /// imgui_internal.h:3302 + ///
ImGuiTableFlags SaveFlags + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + [FieldOffset(4)] + public ImGuiTableFlags SaveFlags; + + /// + /// + /// Reference scale to be able to rescale columns on font/dpi changes. + /// + /// + /// C++: + /// imgui_internal.h:3303 + ///
float RefScale + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + [FieldOffset(8)] + public float RefScale; + + /// + /// + /// C++: + /// imgui_internal.h:3304 + ///
ImGuiTableColumnIdx ColumnsCount + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + [FieldOffset(12)] + public short ColumnsCount; + + /// + /// + /// Maximum number of columns this settings instance can store, we can recycle a settings instance with + /// lower number of columns but not higher + /// + /// + /// C++: + /// imgui_internal.h:3305 + ///
ImGuiTableColumnIdx ColumnsCountMax + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + [FieldOffset(14)] + public short ColumnsCountMax; + + /// + /// + /// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) + /// + /// + /// C++: + /// imgui_internal.h:3306 + ///
bool WantApply + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + [FieldOffset(16)] + public Bool8 WantApply; + } + + /// + /// + /// Storage for a table .ini settings + /// + /// + /// C++: + /// imgui_internal.h:185 + ///
struct ImGuiTableSettings + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTableSettingsPtr(ImGuiTableSettings* ptr) : INullable + { + private ImGuiTableSettings* _ptr = ptr; + public ImGuiTableSettings* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableSettingsPtr(ImGuiTableSettings* ptr) => new(ptr); + + public static implicit operator ImGuiTableSettings*(ImGuiTableSettingsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Set to 0 to invalidate/delete the setting + /// + /// + /// C++: + /// imgui_internal.h:3301 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// Indicate data we want to save using the Resizable/Reorderable/Sortable/Hideable flags (could be using + /// its own flags..) + /// + /// + /// C++: + /// imgui_internal.h:3302 + ///
ImGuiTableFlags SaveFlags + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + public ref ImGuiTableFlags SaveFlags => ref Unsafe.AsRef(&_ptr->SaveFlags); + + /// + /// + /// Reference scale to be able to rescale columns on font/dpi changes. + /// + /// + /// C++: + /// imgui_internal.h:3303 + ///
float RefScale + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + public ref float RefScale => ref Unsafe.AsRef(&_ptr->RefScale); + + /// + /// + /// C++: + /// imgui_internal.h:3304 + ///
ImGuiTableColumnIdx ColumnsCount + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + public ref short ColumnsCount => ref Unsafe.AsRef(&_ptr->ColumnsCount); + + /// + /// + /// Maximum number of columns this settings instance can store, we can recycle a settings instance with + /// lower number of columns but not higher + /// + /// + /// C++: + /// imgui_internal.h:3305 + ///
ImGuiTableColumnIdx ColumnsCountMax + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + public ref short ColumnsCountMax => ref Unsafe.AsRef(&_ptr->ColumnsCountMax); + + /// + /// + /// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) + /// + /// + /// C++: + /// imgui_internal.h:3306 + ///
bool WantApply + ///
+ ///
+ /// + /// + /// This is designed to be stored in a single ImChunkStream (1 header followed by N + /// ImGuiTableColumnSettings, etc.) + /// + /// + public ref bool WantApply => ref Unsafe.AsRef(&_ptr->WantApply); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableTempData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableTempData.gen.cs new file mode 100644 index 0000000..de84398 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTableTempData.gen.cs @@ -0,0 +1,471 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Temporary storage for one table (one per table in the stack), shared between tables. + /// + /// + /// C++: + /// imgui_internal.h:184 + ///
struct ImGuiTableTempData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public partial struct ImGuiTableTempData + { + /// + /// + /// Index in g.Tables.Buf[] pool + /// + /// + /// C++: + /// imgui_internal.h:3254 + ///
int TableIndex + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + [FieldOffset(0)] + public int TableIndex; + + /// + /// + /// Last timestamp this structure was used + /// + /// + /// C++: + /// imgui_internal.h:3255 + ///
float LastTimeActive + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + [FieldOffset(4)] + public float LastTimeActive; + + /// + /// + /// Used in EndTable() + /// + /// + /// C++: + /// imgui_internal.h:3256 + ///
float AngledHeadersExtraWidth + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + [FieldOffset(8)] + public float AngledHeadersExtraWidth; + + /// + /// + /// Used in TableAngledHeadersRow() + /// + /// + /// C++: + /// imgui_internal.h:3257 + ///
ImVector<ImGuiTableHeaderData> AngledHeadersRequests + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + [FieldOffset(16)] + public ImVector AngledHeadersRequests; + + /// + /// + /// outer_size.x passed to BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3259 + ///
ImVec2 UserOuterSize + ///
+ ///
+ [FieldOffset(32)] + public float2 UserOuterSize; + + /// + /// + /// C++: + /// imgui_internal.h:3260 + ///
ImDrawListSplitter DrawSplitter + ///
+ ///
+ [FieldOffset(40)] + public ImDrawListSplitter DrawSplitter; + + /// + /// + /// Backup of InnerWindow->WorkRect at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3262 + ///
ImRect HostBackupWorkRect + ///
+ ///
+ [FieldOffset(64)] + public floatRect HostBackupWorkRect; + + /// + /// + /// Backup of InnerWindow->ParentWorkRect at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3263 + ///
ImRect HostBackupParentWorkRect + ///
+ ///
+ [FieldOffset(80)] + public floatRect HostBackupParentWorkRect; + + /// + /// + /// Backup of InnerWindow->DC.PrevLineSize at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3264 + ///
ImVec2 HostBackupPrevLineSize + ///
+ ///
+ [FieldOffset(96)] + public float2 HostBackupPrevLineSize; + + /// + /// + /// Backup of InnerWindow->DC.CurrLineSize at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3265 + ///
ImVec2 HostBackupCurrLineSize + ///
+ ///
+ [FieldOffset(104)] + public float2 HostBackupCurrLineSize; + + /// + /// + /// Backup of InnerWindow->DC.CursorMaxPos at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3266 + ///
ImVec2 HostBackupCursorMaxPos + ///
+ ///
+ [FieldOffset(112)] + public float2 HostBackupCursorMaxPos; + + /// + /// + /// Backup of OuterWindow->DC.ColumnsOffset at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3267 + ///
ImVec1 HostBackupColumnsOffset + ///
+ ///
+ [FieldOffset(120)] + public float HostBackupColumnsOffset; + + /// + /// + /// Backup of OuterWindow->DC.ItemWidth at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3268 + ///
float HostBackupItemWidth + ///
+ ///
+ [FieldOffset(124)] + public float HostBackupItemWidth; + + /// + /// + /// Backup of OuterWindow->DC.ItemWidthStack.Size at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3269 + ///
int HostBackupItemWidthStackSize + ///
+ ///
+ [FieldOffset(128)] + public int HostBackupItemWidthStackSize; + } + + /// + /// + /// Temporary storage for one table (one per table in the stack), shared between tables. + /// + /// + /// C++: + /// imgui_internal.h:184 + ///
struct ImGuiTableTempData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTableTempDataPtr(ImGuiTableTempData* ptr) : INullable + { + private ImGuiTableTempData* _ptr = ptr; + public ImGuiTableTempData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableTempDataPtr(ImGuiTableTempData* ptr) => new(ptr); + + public static implicit operator ImGuiTableTempData*(ImGuiTableTempDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Index in g.Tables.Buf[] pool + /// + /// + /// C++: + /// imgui_internal.h:3254 + ///
int TableIndex + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + public ref int TableIndex => ref Unsafe.AsRef(&_ptr->TableIndex); + + /// + /// + /// Last timestamp this structure was used + /// + /// + /// C++: + /// imgui_internal.h:3255 + ///
float LastTimeActive + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + public ref float LastTimeActive => ref Unsafe.AsRef(&_ptr->LastTimeActive); + + /// + /// + /// Used in EndTable() + /// + /// + /// C++: + /// imgui_internal.h:3256 + ///
float AngledHeadersExtraWidth + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + public ref float AngledHeadersExtraWidth => ref Unsafe.AsRef(&_ptr->AngledHeadersExtraWidth); + + /// + /// + /// Used in TableAngledHeadersRow() + /// + /// + /// C++: + /// imgui_internal.h:3257 + ///
ImVector<ImGuiTableHeaderData> AngledHeadersRequests + ///
+ ///
+ /// + /// + /// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). + /// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. + /// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. + /// FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs. + /// sizeof() ~ 136 bytes. + /// + /// + public ref ImVector AngledHeadersRequests => + ref Unsafe.AsRef>(&_ptr->AngledHeadersRequests); + + /// + /// + /// outer_size.x passed to BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3259 + ///
ImVec2 UserOuterSize + ///
+ ///
+ public ref float2 UserOuterSize => ref Unsafe.AsRef(&_ptr->UserOuterSize); + + /// + /// + /// C++: + /// imgui_internal.h:3260 + ///
ImDrawListSplitter DrawSplitter + ///
+ ///
+ public ref ImDrawListSplitter DrawSplitter => ref Unsafe.AsRef(&_ptr->DrawSplitter); + + /// + /// + /// Backup of InnerWindow->WorkRect at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3262 + ///
ImRect HostBackupWorkRect + ///
+ ///
+ public ref floatRect HostBackupWorkRect => ref Unsafe.AsRef(&_ptr->HostBackupWorkRect); + + /// + /// + /// Backup of InnerWindow->ParentWorkRect at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3263 + ///
ImRect HostBackupParentWorkRect + ///
+ ///
+ public ref floatRect HostBackupParentWorkRect => ref Unsafe.AsRef(&_ptr->HostBackupParentWorkRect); + + /// + /// + /// Backup of InnerWindow->DC.PrevLineSize at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3264 + ///
ImVec2 HostBackupPrevLineSize + ///
+ ///
+ public ref float2 HostBackupPrevLineSize => ref Unsafe.AsRef(&_ptr->HostBackupPrevLineSize); + + /// + /// + /// Backup of InnerWindow->DC.CurrLineSize at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3265 + ///
ImVec2 HostBackupCurrLineSize + ///
+ ///
+ public ref float2 HostBackupCurrLineSize => ref Unsafe.AsRef(&_ptr->HostBackupCurrLineSize); + + /// + /// + /// Backup of InnerWindow->DC.CursorMaxPos at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3266 + ///
ImVec2 HostBackupCursorMaxPos + ///
+ ///
+ public ref float2 HostBackupCursorMaxPos => ref Unsafe.AsRef(&_ptr->HostBackupCursorMaxPos); + + /// + /// + /// Backup of OuterWindow->DC.ColumnsOffset at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3267 + ///
ImVec1 HostBackupColumnsOffset + ///
+ ///
+ public ref float HostBackupColumnsOffset => ref Unsafe.AsRef(&_ptr->HostBackupColumnsOffset); + + /// + /// + /// Backup of OuterWindow->DC.ItemWidth at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3268 + ///
float HostBackupItemWidth + ///
+ ///
+ public ref float HostBackupItemWidth => ref Unsafe.AsRef(&_ptr->HostBackupItemWidth); + + /// + /// + /// Backup of OuterWindow->DC.ItemWidthStack.Size at the end of BeginTable() + /// + /// + /// C++: + /// imgui_internal.h:3269 + ///
int HostBackupItemWidthStackSize + ///
+ ///
+ public ref int HostBackupItemWidthStackSize => ref Unsafe.AsRef(&_ptr->HostBackupItemWidthStackSize); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTextIndex.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTextIndex.gen.cs new file mode 100644 index 0000000..dfc826e --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTextIndex.gen.cs @@ -0,0 +1,124 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Maintain a line index for a text buffer. + /// + /// + /// C++: + /// imgui_internal.h:139 + ///
struct ImGuiTextIndex + ///
+ ///
+ /// + /// + /// Utilities + /// (other types which are not forwarded declared are: ImBitArray<>, ImSpan<>, ImSpanAllocator<>, ImStableVector<>, ImPool<>, ImChunkStream<>) + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImGuiTextIndex + { + /// + /// + /// C++: + /// imgui_internal.h:802 + ///
ImVector<int> LineOffsets + ///
+ ///
+ /// + /// + /// Helper: ImGuiTextIndex + /// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API. + /// + /// + [FieldOffset(0)] + public ImVector LineOffsets; + + /// + /// + /// Because we don't own text buffer we need to maintain EndOffset (may bake in LineOffsets?) + /// + /// + /// C++: + /// imgui_internal.h:803 + ///
int EndOffset = 0 + ///
+ ///
+ /// + /// + /// Helper: ImGuiTextIndex + /// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API. + /// + /// + [FieldOffset(16)] + public int EndOffset; + } + + /// + /// + /// Maintain a line index for a text buffer. + /// + /// + /// C++: + /// imgui_internal.h:139 + ///
struct ImGuiTextIndex + ///
+ ///
+ /// + /// + /// Utilities + /// (other types which are not forwarded declared are: ImBitArray<>, ImSpan<>, ImSpanAllocator<>, ImStableVector<>, ImPool<>, ImChunkStream<>) + /// + /// + public unsafe partial struct ImGuiTextIndexPtr(ImGuiTextIndex* ptr) : INullable + { + private ImGuiTextIndex* _ptr = ptr; + public ImGuiTextIndex* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTextIndexPtr(ImGuiTextIndex* ptr) => new(ptr); + + public static implicit operator ImGuiTextIndex*(ImGuiTextIndexPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:802 + ///
ImVector<int> LineOffsets + ///
+ ///
+ /// + /// + /// Helper: ImGuiTextIndex + /// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API. + /// + /// + public ref ImVector LineOffsets => ref Unsafe.AsRef>(&_ptr->LineOffsets); + + /// + /// + /// Because we don't own text buffer we need to maintain EndOffset (may bake in LineOffsets?) + /// + /// + /// C++: + /// imgui_internal.h:803 + ///
int EndOffset = 0 + ///
+ ///
+ /// + /// + /// Helper: ImGuiTextIndex + /// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API. + /// + /// + public ref int EndOffset => ref Unsafe.AsRef(&_ptr->EndOffset); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTreeNodeStackData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTreeNodeStackData.gen.cs new file mode 100644 index 0000000..088d52d --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTreeNodeStackData.gen.cs @@ -0,0 +1,311 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Temporary storage for TreeNode(). + /// + /// + /// C++: + /// imgui_internal.h:187 + ///
struct ImGuiTreeNodeStackData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImGuiTreeNodeStackData + { + /// + /// + /// C++: + /// imgui_internal.h:1380 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// imgui_internal.h:1381 + ///
ImGuiTreeNodeFlags TreeFlags + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(4)] + public ImGuiTreeNodeFlags TreeFlags; + + /// + /// + /// Used for nav landing + /// + /// + /// C++: + /// imgui_internal.h:1382 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(8)] + public ImGuiItemFlags ItemFlags; + + /// + /// + /// Used for nav landing + /// + /// + /// C++: + /// imgui_internal.h:1383 + ///
ImRect NavRect + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(12)] + public floatRect NavRect; + + /// + /// + /// C++: + /// imgui_internal.h:1384 + ///
float DrawLinesX1 + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(28)] + public float DrawLinesX1; + + /// + /// + /// C++: + /// imgui_internal.h:1385 + ///
float DrawLinesToNodesY2 + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(32)] + public float DrawLinesToNodesY2; + + /// + /// + /// C++: + /// imgui_internal.h:1386 + ///
ImGuiTableColumnIdx DrawLinesTableColumn + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + [FieldOffset(36)] + public short DrawLinesTableColumn; + } + + /// + /// + /// Temporary storage for TreeNode(). + /// + /// + /// C++: + /// imgui_internal.h:187 + ///
struct ImGuiTreeNodeStackData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTreeNodeStackDataPtr(ImGuiTreeNodeStackData* ptr) : INullable + { + private ImGuiTreeNodeStackData* _ptr = ptr; + public ImGuiTreeNodeStackData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTreeNodeStackDataPtr(ImGuiTreeNodeStackData* ptr) => new(ptr); + + public static implicit operator ImGuiTreeNodeStackData*(ImGuiTreeNodeStackDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1380 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// imgui_internal.h:1381 + ///
ImGuiTreeNodeFlags TreeFlags + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref ImGuiTreeNodeFlags TreeFlags => ref Unsafe.AsRef(&_ptr->TreeFlags); + + /// + /// + /// Used for nav landing + /// + /// + /// C++: + /// imgui_internal.h:1382 + ///
ImGuiItemFlags ItemFlags + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref ImGuiItemFlags ItemFlags => ref Unsafe.AsRef(&_ptr->ItemFlags); + + /// + /// + /// Used for nav landing + /// + /// + /// C++: + /// imgui_internal.h:1383 + ///
ImRect NavRect + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref floatRect NavRect => ref Unsafe.AsRef(&_ptr->NavRect); + + /// + /// + /// C++: + /// imgui_internal.h:1384 + ///
float DrawLinesX1 + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref float DrawLinesX1 => ref Unsafe.AsRef(&_ptr->DrawLinesX1); + + /// + /// + /// C++: + /// imgui_internal.h:1385 + ///
float DrawLinesToNodesY2 + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref float DrawLinesToNodesY2 => ref Unsafe.AsRef(&_ptr->DrawLinesToNodesY2); + + /// + /// + /// C++: + /// imgui_internal.h:1386 + ///
ImGuiTableColumnIdx DrawLinesTableColumn + ///
+ ///
+ /// + /// + /// Store data emitted by TreeNode() for usage by TreePop() + /// - To implement ImGuiTreeNodeFlags_NavLeftJumpsToParent: store the minimum amount of data + /// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult(). + /// Only stored when the node is a potential candidate for landing on a Left arrow jump. + /// + /// + public ref short DrawLinesTableColumn => ref Unsafe.AsRef(&_ptr->DrawLinesTableColumn); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectRequest.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectRequest.gen.cs new file mode 100644 index 0000000..d705880 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectRequest.gen.cs @@ -0,0 +1,264 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for GetTypingSelectRequest() (aimed to be public) + /// + /// + /// C++: + /// imgui_internal.h:189 + ///
struct ImGuiTypingSelectRequest + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImGuiTypingSelectRequest + { + /// + /// + /// Flags passed to GetTypingSelectRequest() + /// + /// + /// C++: + /// imgui_internal.h:1777 + ///
ImGuiTypingSelectFlags Flags + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + [FieldOffset(0)] + public ImGuiTypingSelectFlags Flags; + + /// + /// + /// C++: + /// imgui_internal.h:1778 + ///
int SearchBufferLen + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + [FieldOffset(4)] + public int SearchBufferLen; + + /// + /// + /// Search buffer contents (use full string. unless SingleCharMode is set, in which case use + /// SingleCharSize). + /// + /// + /// C++: + /// imgui_internal.h:1779 + ///
const char* SearchBuffer + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + [FieldOffset(8)] + public Ptr SearchBuffer; + + /// + /// + /// Set when buffer was modified this frame, requesting a selection. + /// + /// + /// C++: + /// imgui_internal.h:1780 + ///
bool SelectRequest + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + [FieldOffset(16)] + public Bool8 SelectRequest; + + /// + /// + /// Notify when buffer contains same character repeated, to implement special mode. In this situation it + /// preferred to not display any on-screen search indication. + /// + /// + /// C++: + /// imgui_internal.h:1781 + ///
bool SingleCharMode + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + [FieldOffset(17)] + public Bool8 SingleCharMode; + + /// + /// + /// Length in bytes of first letter codepoint (1 for ascii, 2-4 for UTF-8). If + /// (SearchBufferLen==RepeatCharSize) only 1 letter has been input. + /// + /// + /// C++: + /// imgui_internal.h:1782 + ///
ImS8 SingleCharSize + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + [FieldOffset(18)] + public sbyte SingleCharSize; + } + + /// + /// + /// Storage for GetTypingSelectRequest() (aimed to be public) + /// + /// + /// C++: + /// imgui_internal.h:189 + ///
struct ImGuiTypingSelectRequest + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTypingSelectRequestPtr(ImGuiTypingSelectRequest* ptr) : INullable + { + private ImGuiTypingSelectRequest* _ptr = ptr; + public ImGuiTypingSelectRequest* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTypingSelectRequestPtr(ImGuiTypingSelectRequest* ptr) => new(ptr); + + public static implicit operator ImGuiTypingSelectRequest*(ImGuiTypingSelectRequestPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Flags passed to GetTypingSelectRequest() + /// + /// + /// C++: + /// imgui_internal.h:1777 + ///
ImGuiTypingSelectFlags Flags + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + public ref ImGuiTypingSelectFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// imgui_internal.h:1778 + ///
int SearchBufferLen + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + public ref int SearchBufferLen => ref Unsafe.AsRef(&_ptr->SearchBufferLen); + + /// + /// + /// Search buffer contents (use full string. unless SingleCharMode is set, in which case use + /// SingleCharSize). + /// + /// + /// C++: + /// imgui_internal.h:1779 + ///
const char* SearchBuffer + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + public ref Ptr SearchBuffer => ref Unsafe.AsRef>(&_ptr->SearchBuffer); + + /// + /// + /// Set when buffer was modified this frame, requesting a selection. + /// + /// + /// C++: + /// imgui_internal.h:1780 + ///
bool SelectRequest + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + public ref bool SelectRequest => ref Unsafe.AsRef(&_ptr->SelectRequest); + + /// + /// + /// Notify when buffer contains same character repeated, to implement special mode. In this situation it + /// preferred to not display any on-screen search indication. + /// + /// + /// C++: + /// imgui_internal.h:1781 + ///
bool SingleCharMode + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + public ref bool SingleCharMode => ref Unsafe.AsRef(&_ptr->SingleCharMode); + + /// + /// + /// Length in bytes of first letter codepoint (1 for ascii, 2-4 for UTF-8). If + /// (SearchBufferLen==RepeatCharSize) only 1 letter has been input. + /// + /// + /// C++: + /// imgui_internal.h:1782 + ///
ImS8 SingleCharSize + ///
+ ///
+ /// + /// + /// Returned by GetTypingSelectRequest(), designed to eventually be public. + /// + /// + public ref sbyte SingleCharSize => ref Unsafe.AsRef(&_ptr->SingleCharSize); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectState.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectState.gen.cs new file mode 100644 index 0000000..7d965c4 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiTypingSelectState.gen.cs @@ -0,0 +1,224 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + /// C++: + /// imgui_internal.h:188 + ///
struct ImGuiTypingSelectState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct ImGuiTypingSelectState + { + /// + /// + /// User-facing data + /// + /// + /// C++: + /// imgui_internal.h:1788 + ///
ImGuiTypingSelectRequest Request + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + [FieldOffset(0)] + public ImGuiTypingSelectRequest Request; + + /// + /// Search buffer: no need to make dynamic as this search is very transient. + /// + [FieldOffset(24)] + public fixed byte SearchBuffer[64]; + + /// + /// + /// C++: + /// imgui_internal.h:1790 + ///
ImGuiID FocusScope + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + [FieldOffset(88)] + public ImGuiID FocusScope; + + /// + /// + /// C++: + /// imgui_internal.h:1791 + ///
int LastRequestFrame = 0 + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + [FieldOffset(92)] + public int LastRequestFrame; + + /// + /// + /// C++: + /// imgui_internal.h:1792 + ///
float LastRequestTime = 0.0f + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + [FieldOffset(96)] + public float LastRequestTime; + + /// + /// + /// After a certain single char repeat count we lock into SingleCharMode. Two benefits: 1) buffer never + /// fill, 2) we can provide an immediate SingleChar mode without timer elapsing. + /// + /// + /// C++: + /// imgui_internal.h:1793 + ///
bool SingleCharModeLock = false + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + [FieldOffset(100)] + public Bool8 SingleCharModeLock; + } + + /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + /// C++: + /// imgui_internal.h:188 + ///
struct ImGuiTypingSelectState + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiTypingSelectStatePtr(ImGuiTypingSelectState* ptr) : INullable + { + private ImGuiTypingSelectState* _ptr = ptr; + public ImGuiTypingSelectState* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTypingSelectStatePtr(ImGuiTypingSelectState* ptr) => new(ptr); + + public static implicit operator ImGuiTypingSelectState*(ImGuiTypingSelectStatePtr wrapper) => wrapper.Ptr; + + /// + /// + /// User-facing data + /// + /// + /// C++: + /// imgui_internal.h:1788 + ///
ImGuiTypingSelectRequest Request + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + public ref ImGuiTypingSelectRequest Request => ref Unsafe.AsRef(&_ptr->Request); + + /// + /// Search buffer: no need to make dynamic as this search is very transient. + /// + public Span SearchBuffer => MemoryMarshal.CreateSpan(ref _ptr->SearchBuffer[0], 64); + + /// + /// + /// C++: + /// imgui_internal.h:1790 + ///
ImGuiID FocusScope + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + public ref ImGuiID FocusScope => ref Unsafe.AsRef(&_ptr->FocusScope); + + /// + /// + /// C++: + /// imgui_internal.h:1791 + ///
int LastRequestFrame = 0 + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + public ref int LastRequestFrame => ref Unsafe.AsRef(&_ptr->LastRequestFrame); + + /// + /// + /// C++: + /// imgui_internal.h:1792 + ///
float LastRequestTime = 0.0f + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + public ref float LastRequestTime => ref Unsafe.AsRef(&_ptr->LastRequestTime); + + /// + /// + /// After a certain single char repeat count we lock into SingleCharMode. Two benefits: 1) buffer never + /// fill, 2) we can provide an immediate SingleChar mode without timer elapsing. + /// + /// + /// C++: + /// imgui_internal.h:1793 + ///
bool SingleCharModeLock = false + ///
+ ///
+ /// + /// + /// Storage for GetTypingSelectRequest() + /// + /// + public ref bool SingleCharModeLock => ref Unsafe.AsRef(&_ptr->SingleCharModeLock); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiViewportP.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiViewportP.gen.cs new file mode 100644 index 0000000..1673815 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiViewportP.gen.cs @@ -0,0 +1,826 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:2091 + ///
struct ImGuiViewportP : public ImGuiViewport + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 344)] + public partial struct ImGuiViewportP + { + /// + /// + /// Set when the viewport is owned by a window (and ImGuiViewportFlags_CanHostOtherWindows is NOT set) + /// + /// + /// C++: + /// imgui_internal.h:2093 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(104)] + public ImGuiWindowPtr Window; + + /// + /// + /// C++: + /// imgui_internal.h:2094 + ///
int Idx + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(112)] + public int Idx; + + /// + /// + /// Last frame number this viewport was activated by a window + /// + /// + /// C++: + /// imgui_internal.h:2095 + ///
int LastFrameActive + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(116)] + public int LastFrameActive; + + /// + /// + /// Last stamp number from when a window hosted by this viewport was focused (by comparing this value + /// between two viewport we have an implicit viewport z-order we use as fallback) + /// + /// + /// C++: + /// imgui_internal.h:2096 + ///
int LastFocusedStampCount + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(120)] + public int LastFocusedStampCount; + + /// + /// + /// C++: + /// imgui_internal.h:2097 + ///
ImGuiID LastNameHash + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(124)] + public ImGuiID LastNameHash; + + /// + /// + /// C++: + /// imgui_internal.h:2098 + ///
ImVec2 LastPos + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(128)] + public float2 LastPos; + + /// + /// + /// C++: + /// imgui_internal.h:2099 + ///
ImVec2 LastSize + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(136)] + public float2 LastSize; + + /// + /// + /// Window opacity (when dragging dockable windows/viewports we make them transparent) + /// + /// + /// C++: + /// imgui_internal.h:2100 + ///
float Alpha + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(144)] + public float Alpha; + + /// + /// + /// C++: + /// imgui_internal.h:2101 + ///
float LastAlpha + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(148)] + public float LastAlpha; + + /// + /// + /// Instead of maintaining a LastFocusedWindow (which may harder to correctly maintain), we merely store + /// weither NavWindow != NULL last time the viewport was focused. + /// + /// + /// C++: + /// imgui_internal.h:2102 + ///
bool LastFocusedHadNavWindow + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(152)] + public Bool8 LastFocusedHadNavWindow; + + /// + /// + /// C++: + /// imgui_internal.h:2103 + ///
short PlatformMonitor + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(154)] + public short PlatformMonitor; + + /// + /// + /// Last frame number the background (0) and foreground (1) draw lists were used + /// + /// + /// C++: + /// imgui_internal.h:2104 + ///
int BgFgDrawListsLastFrame[2] + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(156)] + public int2 BgFgDrawListsLastFrame; + + /// + /// + /// Convenience background (0) and foreground (1) draw lists. We use them to draw software mouser cursor + /// when io.MouseDrawCursor is set and to draw most debug overlays. + /// + /// + /// C++: + /// imgui_internal.h:2105 + ///
ImDrawList* BgFgDrawLists[2] + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(168)] + public ImDrawListPtr_2 BgFgDrawLists; + + /// + /// + /// C++: + /// imgui_internal.h:2106 + ///
ImDrawData DrawDataP + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(184)] + public ImDrawData DrawDataP; + + /// + /// + /// Temporary data while building final ImDrawData + /// + /// + /// C++: + /// imgui_internal.h:2107 + ///
ImDrawDataBuilder DrawDataBuilder + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(256)] + public ImDrawDataBuilder DrawDataBuilder; + + /// + /// + /// C++: + /// imgui_internal.h:2108 + ///
ImVec2 LastPlatformPos + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(288)] + public float2 LastPlatformPos; + + /// + /// + /// C++: + /// imgui_internal.h:2109 + ///
ImVec2 LastPlatformSize + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(296)] + public float2 LastPlatformSize; + + /// + /// + /// C++: + /// imgui_internal.h:2110 + ///
ImVec2 LastRendererSize + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + [FieldOffset(304)] + public float2 LastRendererSize; + + /// + /// + /// Work Area inset locked for the frame. GetWorkRect() always fits within GetMainRect(). + /// + /// + /// C++: + /// imgui_internal.h:2116 + ///
ImVec2 WorkInsetMin + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + [FieldOffset(312)] + public float2 WorkInsetMin; + + /// + /// + /// " + /// + /// + /// C++: + /// imgui_internal.h:2117 + ///
ImVec2 WorkInsetMax + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + [FieldOffset(320)] + public float2 WorkInsetMax; + + /// + /// + /// Work Area inset accumulator for current frame, to become next frame's WorkInset + /// + /// + /// C++: + /// imgui_internal.h:2118 + ///
ImVec2 BuildWorkInsetMin + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + [FieldOffset(328)] + public float2 BuildWorkInsetMin; + + /// + /// + /// " + /// + /// + /// C++: + /// imgui_internal.h:2119 + ///
ImVec2 BuildWorkInsetMax + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + [FieldOffset(336)] + public float2 BuildWorkInsetMax; + } + + /// + /// + /// C++: + /// imgui_internal.h:2091 + ///
struct ImGuiViewportP : public ImGuiViewport + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public unsafe partial struct ImGuiViewportPPtr(ImGuiViewportP* ptr) : INullable + { + private ImGuiViewportP* _ptr = ptr; + public ImGuiViewportP* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiViewportPPtr(ImGuiViewportP* ptr) => new(ptr); + + public static implicit operator ImGuiViewportP*(ImGuiViewportPPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Set when the viewport is owned by a window (and ImGuiViewportFlags_CanHostOtherWindows is NOT set) + /// + /// + /// C++: + /// imgui_internal.h:2093 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// C++: + /// imgui_internal.h:2094 + ///
int Idx + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref int Idx => ref Unsafe.AsRef(&_ptr->Idx); + + /// + /// + /// Last frame number this viewport was activated by a window + /// + /// + /// C++: + /// imgui_internal.h:2095 + ///
int LastFrameActive + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref int LastFrameActive => ref Unsafe.AsRef(&_ptr->LastFrameActive); + + /// + /// + /// Last stamp number from when a window hosted by this viewport was focused (by comparing this value + /// between two viewport we have an implicit viewport z-order we use as fallback) + /// + /// + /// C++: + /// imgui_internal.h:2096 + ///
int LastFocusedStampCount + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref int LastFocusedStampCount => ref Unsafe.AsRef(&_ptr->LastFocusedStampCount); + + /// + /// + /// C++: + /// imgui_internal.h:2097 + ///
ImGuiID LastNameHash + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref ImGuiID LastNameHash => ref Unsafe.AsRef(&_ptr->LastNameHash); + + /// + /// + /// C++: + /// imgui_internal.h:2098 + ///
ImVec2 LastPos + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float2 LastPos => ref Unsafe.AsRef(&_ptr->LastPos); + + /// + /// + /// C++: + /// imgui_internal.h:2099 + ///
ImVec2 LastSize + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float2 LastSize => ref Unsafe.AsRef(&_ptr->LastSize); + + /// + /// + /// Window opacity (when dragging dockable windows/viewports we make them transparent) + /// + /// + /// C++: + /// imgui_internal.h:2100 + ///
float Alpha + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float Alpha => ref Unsafe.AsRef(&_ptr->Alpha); + + /// + /// + /// C++: + /// imgui_internal.h:2101 + ///
float LastAlpha + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float LastAlpha => ref Unsafe.AsRef(&_ptr->LastAlpha); + + /// + /// + /// Instead of maintaining a LastFocusedWindow (which may harder to correctly maintain), we merely store + /// weither NavWindow != NULL last time the viewport was focused. + /// + /// + /// C++: + /// imgui_internal.h:2102 + ///
bool LastFocusedHadNavWindow + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref bool LastFocusedHadNavWindow => ref Unsafe.AsRef(&_ptr->LastFocusedHadNavWindow); + + /// + /// + /// C++: + /// imgui_internal.h:2103 + ///
short PlatformMonitor + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref short PlatformMonitor => ref Unsafe.AsRef(&_ptr->PlatformMonitor); + + /// + /// + /// Last frame number the background (0) and foreground (1) draw lists were used + /// + /// + /// C++: + /// imgui_internal.h:2104 + ///
int BgFgDrawListsLastFrame[2] + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref int2 BgFgDrawListsLastFrame => ref Unsafe.AsRef(&_ptr->BgFgDrawListsLastFrame); + + /// + /// + /// Convenience background (0) and foreground (1) draw lists. We use them to draw software mouser cursor + /// when io.MouseDrawCursor is set and to draw most debug overlays. + /// + /// + /// C++: + /// imgui_internal.h:2105 + ///
ImDrawList* BgFgDrawLists[2] + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref ImDrawListPtr_2 BgFgDrawLists => ref Unsafe.AsRef(&_ptr->BgFgDrawLists); + + /// + /// + /// C++: + /// imgui_internal.h:2106 + ///
ImDrawData DrawDataP + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref ImDrawData DrawDataP => ref Unsafe.AsRef(&_ptr->DrawDataP); + + /// + /// + /// Temporary data while building final ImDrawData + /// + /// + /// C++: + /// imgui_internal.h:2107 + ///
ImDrawDataBuilder DrawDataBuilder + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref ImDrawDataBuilder DrawDataBuilder => ref Unsafe.AsRef(&_ptr->DrawDataBuilder); + + /// + /// + /// C++: + /// imgui_internal.h:2108 + ///
ImVec2 LastPlatformPos + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float2 LastPlatformPos => ref Unsafe.AsRef(&_ptr->LastPlatformPos); + + /// + /// + /// C++: + /// imgui_internal.h:2109 + ///
ImVec2 LastPlatformSize + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float2 LastPlatformSize => ref Unsafe.AsRef(&_ptr->LastPlatformSize); + + /// + /// + /// C++: + /// imgui_internal.h:2110 + ///
ImVec2 LastRendererSize + ///
+ ///
+ /// + /// + /// ImGuiViewport Private/Internals fields (cardinal sin: we are using inheritance!) + /// Every instance of ImGuiViewport is in fact a ImGuiViewportP. + /// + /// + public ref float2 LastRendererSize => ref Unsafe.AsRef(&_ptr->LastRendererSize); + + /// + /// + /// Work Area inset locked for the frame. GetWorkRect() always fits within GetMainRect(). + /// + /// + /// C++: + /// imgui_internal.h:2116 + ///
ImVec2 WorkInsetMin + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + public ref float2 WorkInsetMin => ref Unsafe.AsRef(&_ptr->WorkInsetMin); + + /// + /// + /// " + /// + /// + /// C++: + /// imgui_internal.h:2117 + ///
ImVec2 WorkInsetMax + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + public ref float2 WorkInsetMax => ref Unsafe.AsRef(&_ptr->WorkInsetMax); + + /// + /// + /// Work Area inset accumulator for current frame, to become next frame's WorkInset + /// + /// + /// C++: + /// imgui_internal.h:2118 + ///
ImVec2 BuildWorkInsetMin + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + public ref float2 BuildWorkInsetMin => ref Unsafe.AsRef(&_ptr->BuildWorkInsetMin); + + /// + /// + /// " + /// + /// + /// C++: + /// imgui_internal.h:2119 + ///
ImVec2 BuildWorkInsetMax + ///
+ ///
+ /// + /// + /// Per-viewport work area + /// - Insets are >= 0.0f values, distance from viewport corners to work area. + /// - BeginMainMenuBar() and DockspaceOverViewport() tend to use work area to avoid stepping over existing contents. + /// - Generally 'safeAreaInsets' in iOS land, 'DisplayCutout' in Android land. + /// + /// + public ref float2 BuildWorkInsetMax => ref Unsafe.AsRef(&_ptr->BuildWorkInsetMax); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindow.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindow.gen.cs new file mode 100644 index 0000000..b0778ba --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindow.gen.cs @@ -0,0 +1,4101 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for one window + /// + /// + /// C++: + /// imgui_internal.h:190 + ///
struct ImGuiWindow + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 1224)] + public partial struct ImGuiWindow + { + /// + /// + /// Parent UI context (needs to be set explicitly by parent). + /// + /// + /// C++: + /// imgui_internal.h:2791 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(0)] + public ImGuiContextPtr Ctx; + + /// + /// + /// Window name, owned by the window. + /// + /// + /// C++: + /// imgui_internal.h:2792 + ///
char* Name + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(8)] + public Ptr Name; + + /// + /// + /// == ImHashStr(Name) + /// + /// + /// C++: + /// imgui_internal.h:2793 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(16)] + public ImGuiID ID; + + /// + /// + /// See enum ImGuiWindowFlags_ + /// + /// + /// C++: + /// imgui_internal.h:2794 + ///
ImGuiWindowFlags Flags + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(20)] + public ImGuiWindowFlags Flags; + + /// + /// + /// See enum ImGuiWindowFlags_ + /// + /// + /// C++: + /// imgui_internal.h:2794 + ///
ImGuiWindowFlags Flags, FlagsPreviousFrame + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(24)] + public ImGuiWindowFlags FlagsPreviousFrame; + + /// + /// + /// Set when window is a child window. See enum ImGuiChildFlags_ + /// + /// + /// C++: + /// imgui_internal.h:2795 + ///
ImGuiChildFlags ChildFlags + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(28)] + public ImGuiChildFlags ChildFlags; + + /// + /// + /// Advanced users only. Set with SetNextWindowClass() + /// + /// + /// C++: + /// imgui_internal.h:2796 + ///
ImGuiWindowClass WindowClass + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(32)] + public ImGuiWindowClass WindowClass; + + /// + /// + /// Always set in Begin(). Inactive windows may have a NULL value here if their viewport was discarded. + /// + /// + /// C++: + /// imgui_internal.h:2797 + ///
ImGuiViewportP* Viewport + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(64)] + public ImGuiViewportPPtr Viewport; + + /// + /// + /// We backup the viewport id (since the viewport may disappear or never be created if the window is + /// inactive) + /// + /// + /// C++: + /// imgui_internal.h:2798 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(72)] + public ImGuiID ViewportId; + + /// + /// + /// We backup the viewport position (since the viewport may disappear or never be created if the window is + /// inactive) + /// + /// + /// C++: + /// imgui_internal.h:2799 + ///
ImVec2 ViewportPos + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(76)] + public float2 ViewportPos; + + /// + /// + /// Reset to -1 every frame (index is guaranteed to be valid between NewFrame..EndFrame), only used in the + /// Appearing frame of a tooltip/popup to enforce clamping to a given monitor + /// + /// + /// C++: + /// imgui_internal.h:2800 + ///
int ViewportAllowPlatformMonitorExtend + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(84)] + public int ViewportAllowPlatformMonitorExtend; + + /// + /// + /// Position (always rounded-up to nearest pixel) + /// + /// + /// C++: + /// imgui_internal.h:2801 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(88)] + public float2 Pos; + + /// + /// + /// Current size (==SizeFull or collapsed title bar size) + /// + /// + /// C++: + /// imgui_internal.h:2802 + ///
ImVec2 Size + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(96)] + public float2 Size; + + /// + /// + /// Size when non collapsed + /// + /// + /// C++: + /// imgui_internal.h:2803 + ///
ImVec2 SizeFull + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(104)] + public float2 SizeFull; + + /// + /// + /// Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous + /// frame. Does not include window decoration or window padding. + /// + /// + /// C++: + /// imgui_internal.h:2804 + ///
ImVec2 ContentSize + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(112)] + public float2 ContentSize; + + /// + /// + /// C++: + /// imgui_internal.h:2805 + ///
ImVec2 ContentSizeIdeal + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(120)] + public float2 ContentSizeIdeal; + + /// + /// + /// Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize(). + /// + /// + /// C++: + /// imgui_internal.h:2806 + ///
ImVec2 ContentSizeExplicit + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(128)] + public float2 ContentSizeExplicit; + + /// + /// + /// Window padding at the time of Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2807 + ///
ImVec2 WindowPadding + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(136)] + public float2 WindowPadding; + + /// + /// + /// Window rounding at the time of Begin(). May be clamped lower to avoid rendering artifacts with title + /// bar, menu bar etc. + /// + /// + /// C++: + /// imgui_internal.h:2808 + ///
float WindowRounding + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(144)] + public float WindowRounding; + + /// + /// + /// Window border size at the time of Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2809 + ///
float WindowBorderSize + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(148)] + public float WindowBorderSize; + + /// + /// + /// Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you + /// can change it to TitleBarHeight. + /// + /// + /// C++: + /// imgui_internal.h:2810 + ///
float TitleBarHeight + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(152)] + public float TitleBarHeight; + + /// + /// + /// Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you + /// can change it to TitleBarHeight. + /// + /// + /// C++: + /// imgui_internal.h:2810 + ///
float TitleBarHeight, MenuBarHeight + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(156)] + public float MenuBarHeight; + + /// + /// + /// Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0f. Y1 generally = + /// TitleBarHeight + MenuBarHeight). Locked during Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2811 + ///
float DecoOuterSizeX1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(160)] + public float DecoOuterSizeX1; + + /// + /// + /// Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0f. Y1 generally = + /// TitleBarHeight + MenuBarHeight). Locked during Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2811 + ///
float DecoOuterSizeX1, DecoOuterSizeY1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(164)] + public float DecoOuterSizeY1; + + /// + /// + /// Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y). + /// + /// + /// C++: + /// imgui_internal.h:2812 + ///
float DecoOuterSizeX2 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(168)] + public float DecoOuterSizeX2; + + /// + /// + /// Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y). + /// + /// + /// C++: + /// imgui_internal.h:2812 + ///
float DecoOuterSizeX2, DecoOuterSizeY2 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(172)] + public float DecoOuterSizeY2; + + /// + /// + /// Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen + /// rows/columns are inside InnerRect (and not part of regular decoration sizes). + /// + /// + /// C++: + /// imgui_internal.h:2813 + ///
float DecoInnerSizeX1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(176)] + public float DecoInnerSizeX1; + + /// + /// + /// Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen + /// rows/columns are inside InnerRect (and not part of regular decoration sizes). + /// + /// + /// C++: + /// imgui_internal.h:2813 + ///
float DecoInnerSizeX1, DecoInnerSizeY1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(180)] + public float DecoInnerSizeY1; + + /// + /// + /// Size of buffer storing Name. May be larger than strlen(Name)! + /// + /// + /// C++: + /// imgui_internal.h:2814 + ///
int NameBufLen + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(184)] + public int NameBufLen; + + /// + /// + /// == window->GetID("#MOVE") + /// + /// + /// C++: + /// imgui_internal.h:2815 + ///
ImGuiID MoveId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(188)] + public ImGuiID MoveId; + + /// + /// + /// == window->GetID("#TAB") + /// + /// + /// C++: + /// imgui_internal.h:2816 + ///
ImGuiID TabId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(192)] + public ImGuiID TabId; + + /// + /// + /// ID of corresponding item in parent window (for navigation to return from child window to parent window) + /// + /// + /// C++: + /// imgui_internal.h:2817 + ///
ImGuiID ChildId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(196)] + public ImGuiID ChildId; + + /// + /// + /// ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for + /// recycling) + /// + /// + /// C++: + /// imgui_internal.h:2818 + ///
ImGuiID PopupId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(200)] + public ImGuiID PopupId; + + /// + /// + /// C++: + /// imgui_internal.h:2819 + ///
ImVec2 Scroll + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(204)] + public float2 Scroll; + + /// + /// + /// C++: + /// imgui_internal.h:2820 + ///
ImVec2 ScrollMax + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(212)] + public float2 ScrollMax; + + /// + /// + /// target scroll position. stored as cursor position with scrolling canceled out, so the highest point is + /// always 0.0f. (FLT_MAX for no change) + /// + /// + /// C++: + /// imgui_internal.h:2821 + ///
ImVec2 ScrollTarget + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(220)] + public float2 ScrollTarget; + + /// + /// + /// 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered + /// + /// + /// C++: + /// imgui_internal.h:2822 + ///
ImVec2 ScrollTargetCenterRatio + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(228)] + public float2 ScrollTargetCenterRatio; + + /// + /// + /// 0.0f = no snapping, >0.0f snapping threshold + /// + /// + /// C++: + /// imgui_internal.h:2823 + ///
ImVec2 ScrollTargetEdgeSnapDist + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(236)] + public float2 ScrollTargetEdgeSnapDist; + + /// + /// + /// Size taken by each scrollbars on their smaller axis. Pay attention! ScrollbarSizes.x == width of the + /// vertical scrollbar, ScrollbarSizes.y = height of the horizontal scrollbar. + /// + /// + /// C++: + /// imgui_internal.h:2824 + ///
ImVec2 ScrollbarSizes + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(244)] + public float2 ScrollbarSizes; + + /// + /// + /// Are scrollbars visible? + /// + /// + /// C++: + /// imgui_internal.h:2825 + ///
bool ScrollbarX + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(252)] + public Bool8 ScrollbarX; + + /// + /// + /// Are scrollbars visible? + /// + /// + /// C++: + /// imgui_internal.h:2825 + ///
bool ScrollbarX, ScrollbarY + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(253)] + public Bool8 ScrollbarY; + + /// + /// + /// Was ScrollbarX previously auto-stabilized? + /// + /// + /// C++: + /// imgui_internal.h:2826 + ///
bool ScrollbarXStabilizeEnabled + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(254)] + public Bool8 ScrollbarXStabilizeEnabled; + + /// + /// + /// Used to stabilize scrollbar visibility in case of feedback loops + /// + /// + /// C++: + /// imgui_internal.h:2827 + ///
ImU8 ScrollbarXStabilizeToggledHistory + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(255)] + public byte ScrollbarXStabilizeToggledHistory; + + /// + /// + /// C++: + /// imgui_internal.h:2828 + ///
bool ViewportOwned + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(256)] + public Bool8 ViewportOwned; + + /// + /// + /// Set to true on Begin(), unless Collapsed + /// + /// + /// C++: + /// imgui_internal.h:2829 + ///
bool Active + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(257)] + public Bool8 Active; + + /// + /// + /// C++: + /// imgui_internal.h:2830 + ///
bool WasActive + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(258)] + public Bool8 WasActive; + + /// + /// + /// Set to true when any widget access the current window + /// + /// + /// C++: + /// imgui_internal.h:2831 + ///
bool WriteAccessed + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(259)] + public Bool8 WriteAccessed; + + /// + /// + /// Set when collapsing window to become only title-bar + /// + /// + /// C++: + /// imgui_internal.h:2832 + ///
bool Collapsed + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(260)] + public Bool8 Collapsed; + + /// + /// + /// C++: + /// imgui_internal.h:2833 + ///
bool WantCollapseToggle + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(261)] + public Bool8 WantCollapseToggle; + + /// + /// + /// Set when items can safely be all clipped (e.g. window not visible or collapsed) + /// + /// + /// C++: + /// imgui_internal.h:2834 + ///
bool SkipItems + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(262)] + public Bool8 SkipItems; + + /// + /// + /// [EXPERIMENTAL] Reuse previous frame drawn contents, Begin() returns false. + /// + /// + /// C++: + /// imgui_internal.h:2835 + ///
bool SkipRefresh + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(263)] + public Bool8 SkipRefresh; + + /// + /// + /// Set during the frame where the window is appearing (or re-appearing) + /// + /// + /// C++: + /// imgui_internal.h:2836 + ///
bool Appearing + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(264)] + public Bool8 Appearing; + + /// + /// + /// Do not display (== HiddenFrames*** > 0) + /// + /// + /// C++: + /// imgui_internal.h:2837 + ///
bool Hidden + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(265)] + public Bool8 Hidden; + + /// + /// + /// Set on the "Debug##Default" window. + /// + /// + /// C++: + /// imgui_internal.h:2838 + ///
bool IsFallbackWindow + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(266)] + public Bool8 IsFallbackWindow; + + /// + /// + /// Set when passed _ChildWindow, left to false by BeginDocked() + /// + /// + /// C++: + /// imgui_internal.h:2839 + ///
bool IsExplicitChild + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(267)] + public Bool8 IsExplicitChild; + + /// + /// + /// Set when the window has a close button (p_open != NULL) + /// + /// + /// C++: + /// imgui_internal.h:2840 + ///
bool HasCloseButton + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(268)] + public Bool8 HasCloseButton; + + /// + /// + /// Current border being hovered for resize (-1: none, otherwise 0-3) + /// + /// + /// C++: + /// imgui_internal.h:2841 + ///
signed char ResizeBorderHovered + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(269)] + public byte ResizeBorderHovered; + + /// + /// + /// Current border being held for resize (-1: none, otherwise 0-3) + /// + /// + /// C++: + /// imgui_internal.h:2842 + ///
signed char ResizeBorderHeld + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(270)] + public byte ResizeBorderHeld; + + /// + /// + /// Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End + /// pairs) + /// + /// + /// C++: + /// imgui_internal.h:2843 + ///
short BeginCount + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(272)] + public short BeginCount; + + /// + /// + /// Number of Begin() during the previous frame + /// + /// + /// C++: + /// imgui_internal.h:2844 + ///
short BeginCountPreviousFrame + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(274)] + public short BeginCountPreviousFrame; + + /// + /// + /// Begin() order within immediate parent window, if we are a child window. Otherwise 0. + /// + /// + /// C++: + /// imgui_internal.h:2845 + ///
short BeginOrderWithinParent + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(276)] + public short BeginOrderWithinParent; + + /// + /// + /// Begin() order within entire imgui context. This is mostly used for debugging submission order related + /// issues. + /// + /// + /// C++: + /// imgui_internal.h:2846 + ///
short BeginOrderWithinContext + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(278)] + public short BeginOrderWithinContext; + + /// + /// + /// Order within WindowsFocusOrder[], altered when windows are focused. + /// + /// + /// C++: + /// imgui_internal.h:2847 + ///
short FocusOrder + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(280)] + public short FocusOrder; + + /// + /// + /// C++: + /// imgui_internal.h:2848 + ///
ImS8 AutoFitFramesX + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(282)] + public sbyte AutoFitFramesX; + + /// + /// + /// C++: + /// imgui_internal.h:2848 + ///
ImS8 AutoFitFramesX, AutoFitFramesY + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(283)] + public sbyte AutoFitFramesY; + + /// + /// + /// C++: + /// imgui_internal.h:2849 + ///
bool AutoFitOnlyGrows + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(284)] + public Bool8 AutoFitOnlyGrows; + + /// + /// + /// C++: + /// imgui_internal.h:2850 + ///
ImGuiDir AutoPosLastDirection + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(288)] + public ImGuiDir AutoPosLastDirection; + + /// + /// + /// Hide the window for N frames + /// + /// + /// C++: + /// imgui_internal.h:2851 + ///
ImS8 HiddenFramesCanSkipItems + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(292)] + public sbyte HiddenFramesCanSkipItems; + + /// + /// + /// Hide the window for N frames while allowing items to be submitted so we can measure their size + /// + /// + /// C++: + /// imgui_internal.h:2852 + ///
ImS8 HiddenFramesCannotSkipItems + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(293)] + public sbyte HiddenFramesCannotSkipItems; + + /// + /// + /// Hide the window until frame N at Render() time only + /// + /// + /// C++: + /// imgui_internal.h:2853 + ///
ImS8 HiddenFramesForRenderOnly + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(294)] + public sbyte HiddenFramesForRenderOnly; + + /// + /// + /// Disable window interactions for N frames + /// + /// + /// C++: + /// imgui_internal.h:2854 + ///
ImS8 DisableInputsFrames + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(295)] + public sbyte DisableInputsFrames; + + /// + /// + /// store acceptable condition flags for SetNextWindowPos() use. + /// + /// + /// C++: + /// imgui_internal.h:2855 + ///
ImGuiCond SetWindowPosAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(296)] + public ImGuiCond SetWindowPosAllowFlags; + + /// + /// + /// store acceptable condition flags for SetNextWindowSize() use. + /// + /// + /// C++: + /// imgui_internal.h:2856 + ///
ImGuiCond SetWindowSizeAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(297)] + public ImGuiCond SetWindowSizeAllowFlags; + + /// + /// + /// store acceptable condition flags for SetNextWindowCollapsed() use. + /// + /// + /// C++: + /// imgui_internal.h:2857 + ///
ImGuiCond SetWindowCollapsedAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(298)] + public ImGuiCond SetWindowCollapsedAllowFlags; + + /// + /// + /// store acceptable condition flags for SetNextWindowDock() use. + /// + /// + /// C++: + /// imgui_internal.h:2858 + ///
ImGuiCond SetWindowDockAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(299)] + public ImGuiCond SetWindowDockAllowFlags; + + /// + /// + /// store window position when using a non-zero Pivot (position set needs to be processed when we know the + /// window size) + /// + /// + /// C++: + /// imgui_internal.h:2859 + ///
ImVec2 SetWindowPosVal + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(300)] + public float2 SetWindowPosVal; + + /// + /// + /// store window pivot for positioning. ImVec2(0, 0) when positioning from top-left corner; ImVec2(0.5f, + /// 0.5f) for centering; ImVec2(1, 1) for bottom right. + /// + /// + /// C++: + /// imgui_internal.h:2860 + ///
ImVec2 SetWindowPosPivot + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + [FieldOffset(308)] + public float2 SetWindowPosPivot; + + /// + /// + /// ID stack. ID are hashes seeded with the value at the top of the stack. (In theory this should be in the + /// TempData structure) + /// + /// + /// C++: + /// imgui_internal.h:2862 + ///
ImVector<ImGuiID> IDStack + ///
+ ///
+ [FieldOffset(320)] + public ImVector IDStack; + + /// + /// + /// Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, + /// hence the "DC" variable name. + /// + /// + /// C++: + /// imgui_internal.h:2863 + ///
ImGuiWindowTempData DC + ///
+ ///
+ [FieldOffset(336)] + public ImGuiWindowTempData DC; + + /// + /// + /// == Window->Rect() just after setup in Begin(). == window->Rect() for root window. + /// + /// + /// C++: + /// imgui_internal.h:2867 + ///
ImRect OuterRectClipped + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(608)] + public floatRect OuterRectClipped; + + /// + /// + /// Inner rectangle (omit title bar, menu bar, scroll bar) + /// + /// + /// C++: + /// imgui_internal.h:2868 + ///
ImRect InnerRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(624)] + public floatRect InnerRect; + + /// + /// + /// == InnerRect shrunk by WindowPadding*0.5f on each side, clipped within viewport or parent clip rect. + /// + /// + /// C++: + /// imgui_internal.h:2869 + ///
ImRect InnerClipRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(640)] + public floatRect InnerClipRect; + + /// + /// + /// Initially covers the whole scrolling region. Reduced by containers e.g columns/tables when active. + /// Shrunk by WindowPadding*1.0f on each side. This is meant to replace ContentRegionRect over time (from + /// 1.71+ onward). + /// + /// + /// C++: + /// imgui_internal.h:2870 + ///
ImRect WorkRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(656)] + public floatRect WorkRect; + + /// + /// + /// Backup of WorkRect before entering a container such as columns/tables. Used by e.g. SpanAllColumns + /// functions to easily access. Stacked containers are responsible for maintaining this. // FIXME-WORKRECT: + /// Could be a stack? + /// + /// + /// C++: + /// imgui_internal.h:2871 + ///
ImRect ParentWorkRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(672)] + public floatRect ParentWorkRect; + + /// + /// + /// Current clipping/scissoring rectangle, evolve as we are using PushClipRect(), etc. == + /// DrawList->clip_rect_stack.back(). + /// + /// + /// C++: + /// imgui_internal.h:2872 + ///
ImRect ClipRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(688)] + public floatRect ClipRect; + + /// + /// + /// FIXME: This is currently confusing/misleading. It is essentially WorkRect but not handling of scrolling. + /// We currently rely on it as right/bottom aligned sizing operation need some size to rely on. + /// + /// + /// C++: + /// imgui_internal.h:2873 + ///
ImRect ContentRegionRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(704)] + public floatRect ContentRegionRect; + + /// + /// + /// Define an optional rectangular hole where mouse will pass-through the window. + /// + /// + /// C++: + /// imgui_internal.h:2874 + ///
ImVec2ih HitTestHoleSize + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(720)] + public short2 HitTestHoleSize; + + /// + /// + /// C++: + /// imgui_internal.h:2875 + ///
ImVec2ih HitTestHoleOffset + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + [FieldOffset(724)] + public short2 HitTestHoleOffset; + + /// + /// + /// Last frame number the window was Active. + /// + /// + /// C++: + /// imgui_internal.h:2877 + ///
int LastFrameActive + ///
+ ///
+ [FieldOffset(728)] + public int LastFrameActive; + + /// + /// + /// Last frame number the window was made Focused. + /// + /// + /// C++: + /// imgui_internal.h:2878 + ///
int LastFrameJustFocused + ///
+ ///
+ [FieldOffset(732)] + public int LastFrameJustFocused; + + /// + /// + /// Last timestamp the window was Active (using float as we don't need high precision there) + /// + /// + /// C++: + /// imgui_internal.h:2879 + ///
float LastTimeActive + ///
+ ///
+ [FieldOffset(736)] + public float LastTimeActive; + + /// + /// + /// C++: + /// imgui_internal.h:2880 + ///
float ItemWidthDefault + ///
+ ///
+ [FieldOffset(740)] + public float ItemWidthDefault; + + /// + /// + /// C++: + /// imgui_internal.h:2881 + ///
ImGuiStorage StateStorage + ///
+ ///
+ [FieldOffset(744)] + public ImGuiStorage StateStorage; + + /// + /// + /// C++: + /// imgui_internal.h:2882 + ///
ImVector<ImGuiOldColumns> ColumnsStorage + ///
+ ///
+ [FieldOffset(760)] + public ImVector ColumnsStorage; + + /// + /// + /// User scale multiplier per-window, via SetWindowFontScale() + /// + /// + /// C++: + /// imgui_internal.h:2883 + ///
float FontWindowScale + ///
+ ///
+ [FieldOffset(776)] + public float FontWindowScale; + + /// + /// + /// C++: + /// imgui_internal.h:2884 + ///
float FontWindowScaleParents + ///
+ ///
+ [FieldOffset(780)] + public float FontWindowScaleParents; + + /// + /// + /// This is a copy of window->CalcFontSize() at the time of Begin(), trying to phase out CalcFontSize() + /// especially as it may be called on non-current window. + /// + /// + /// C++: + /// imgui_internal.h:2885 + ///
float FontRefSize + ///
+ ///
+ [FieldOffset(784)] + public float FontRefSize; + + /// + /// + /// Offset into SettingsWindows[] (offsets are always valid as we only grow the array from the back) + /// + /// + /// C++: + /// imgui_internal.h:2886 + ///
int SettingsOffset + ///
+ ///
+ [FieldOffset(788)] + public int SettingsOffset; + + /// + /// + /// == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a + /// pointer) + /// + /// + /// C++: + /// imgui_internal.h:2888 + ///
ImDrawList* DrawList + ///
+ ///
+ [FieldOffset(792)] + public ImDrawListPtr DrawList; + + /// + /// + /// C++: + /// imgui_internal.h:2889 + ///
ImDrawList DrawListInst + ///
+ ///
+ [FieldOffset(800)] + public ImDrawList DrawListInst; + + /// + /// + /// If we are a child _or_ popup _or_ docked window, this is pointing to our parent. Otherwise NULL. + /// + /// + /// C++: + /// imgui_internal.h:2890 + ///
ImGuiWindow* ParentWindow + ///
+ ///
+ [FieldOffset(1024)] + public ImGuiWindowPtr ParentWindow; + + /// + /// + /// C++: + /// imgui_internal.h:2891 + ///
ImGuiWindow* ParentWindowInBeginStack + ///
+ ///
+ [FieldOffset(1032)] + public ImGuiWindowPtr ParentWindowInBeginStack; + + /// + /// + /// Point to ourself or first ancestor that is not a child window. Doesn't cross through popups/dock nodes. + /// + /// + /// C++: + /// imgui_internal.h:2892 + ///
ImGuiWindow* RootWindow + ///
+ ///
+ [FieldOffset(1040)] + public ImGuiWindowPtr RootWindow; + + /// + /// + /// Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child. + /// + /// + /// C++: + /// imgui_internal.h:2893 + ///
ImGuiWindow* RootWindowPopupTree + ///
+ ///
+ [FieldOffset(1048)] + public ImGuiWindowPtr RootWindowPopupTree; + + /// + /// + /// Point to ourself or first ancestor that is not a child window. Cross through dock nodes. + /// + /// + /// C++: + /// imgui_internal.h:2894 + ///
ImGuiWindow* RootWindowDockTree + ///
+ ///
+ [FieldOffset(1056)] + public ImGuiWindowPtr RootWindowDockTree; + + /// + /// + /// Point to ourself or first ancestor which will display TitleBgActive color when this window is active. + /// + /// + /// C++: + /// imgui_internal.h:2895 + ///
ImGuiWindow* RootWindowForTitleBarHighlight + ///
+ ///
+ [FieldOffset(1064)] + public ImGuiWindowPtr RootWindowForTitleBarHighlight; + + /// + /// + /// Point to ourself or first ancestor which doesn't have the NavFlattened flag. + /// + /// + /// C++: + /// imgui_internal.h:2896 + ///
ImGuiWindow* RootWindowForNav + ///
+ ///
+ [FieldOffset(1072)] + public ImGuiWindowPtr RootWindowForNav; + + /// + /// + /// Set to manual link a window to its logical parent so that Shortcut() chain are honoerd (e.g. Tool linked + /// to Document) + /// + /// + /// C++: + /// imgui_internal.h:2897 + ///
ImGuiWindow* ParentWindowForFocusRoute + ///
+ ///
+ [FieldOffset(1080)] + public ImGuiWindowPtr ParentWindowForFocusRoute; + + /// + /// + /// When going to the menu bar, we remember the child window we came from. (This could probably be made + /// implicit if we kept g.Windows sorted by last focused including child window.) + /// + /// + /// C++: + /// imgui_internal.h:2899 + ///
ImGuiWindow* NavLastChildNavWindow + ///
+ ///
+ [FieldOffset(1088)] + public ImGuiWindowPtr NavLastChildNavWindow; + + /// + /// + /// Last known NavId for this window, per layer (0/1) + /// + /// + /// C++: + /// imgui_internal.h:2900 + ///
ImGuiID NavLastIds[ImGuiNavLayer_COUNT] + ///
+ ///
+ [FieldOffset(1096)] + public ImGuiID_2 NavLastIds; + + /// + /// + /// Reference rectangle, in window relative space + /// + /// + /// C++: + /// imgui_internal.h:2901 + ///
ImRect NavRectRel[ImGuiNavLayer_COUNT] + ///
+ ///
+ [FieldOffset(1104)] + public floatRect_2 NavRectRel; + + /// + /// + /// Preferred X/Y position updated when moving on a given axis, reset to FLT_MAX. + /// + /// + /// C++: + /// imgui_internal.h:2902 + ///
ImVec2 NavPreferredScoringPosRel[ImGuiNavLayer_COUNT] + ///
+ ///
+ [FieldOffset(1136)] + public float2_2 NavPreferredScoringPosRel; + + /// + /// + /// Focus Scope ID at the time of Begin() + /// + /// + /// C++: + /// imgui_internal.h:2903 + ///
ImGuiID NavRootFocusScopeId + ///
+ ///
+ [FieldOffset(1152)] + public ImGuiID NavRootFocusScopeId; + + /// + /// + /// Backup of last idx/vtx count, so when waking up the window we can preallocate and avoid iterative + /// alloc/copy + /// + /// + /// C++: + /// imgui_internal.h:2905 + ///
int MemoryDrawListIdxCapacity + ///
+ ///
+ [FieldOffset(1156)] + public int MemoryDrawListIdxCapacity; + + /// + /// + /// C++: + /// imgui_internal.h:2906 + ///
int MemoryDrawListVtxCapacity + ///
+ ///
+ [FieldOffset(1160)] + public int MemoryDrawListVtxCapacity; + + /// + /// + /// Set when window extraneous data have been garbage collected + /// + /// + /// C++: + /// imgui_internal.h:2907 + ///
bool MemoryCompacted + ///
+ ///
+ [FieldOffset(1164)] + public Bool8 MemoryCompacted; + + /// + /// + /// When docking artifacts are actually visible. When this is set, DockNode is guaranteed to be != NULL. ~~ + /// (DockNode != NULL) && (DockNode->Windows.Size > 1). + /// + /// + /// C++: + /// imgui_internal.h:2910 + ///
bool DockIsActive :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1165)] + public Bool8 DockIsActive; + + /// + /// + /// C++: + /// imgui_internal.h:2911 + ///
bool DockNodeIsVisible :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1165)] + public Bool8 DockNodeIsVisible; + + /// + /// + /// Is our window visible this frame? ~~ is the corresponding tab selected? + /// + /// + /// C++: + /// imgui_internal.h:2912 + ///
bool DockTabIsVisible :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1165)] + public Bool8 DockTabIsVisible; + + /// + /// + /// C++: + /// imgui_internal.h:2913 + ///
bool DockTabWantClose :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1165)] + public Bool8 DockTabWantClose; + + /// + /// + /// Order of the last time the window was visible within its DockNode. This is used to reorder windows that + /// are reappearing on the same frame. Same value between windows that were active and windows that were + /// none are possible. + /// + /// + /// C++: + /// imgui_internal.h:2914 + ///
short DockOrder + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1166)] + public short DockOrder; + + /// + /// + /// C++: + /// imgui_internal.h:2915 + ///
ImGuiWindowDockStyle DockStyle + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1168)] + public ImGuiWindowDockStyle DockStyle; + + /// + /// + /// Which node are we docked into. Important: Prefer testing DockIsActive in many cases as this will still + /// be set when the dock node is hidden. + /// + /// + /// C++: + /// imgui_internal.h:2916 + ///
ImGuiDockNode* DockNode + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1200)] + public ImGuiDockNodePtr DockNode; + + /// + /// + /// Which node are we owning (for parent windows) + /// + /// + /// C++: + /// imgui_internal.h:2917 + ///
ImGuiDockNode* DockNodeAsHost + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1208)] + public ImGuiDockNodePtr DockNodeAsHost; + + /// + /// + /// Backup of last valid DockNode->ID, so single window remember their dock node id even when they are + /// not bound any more + /// + /// + /// C++: + /// imgui_internal.h:2918 + ///
ImGuiID DockId + ///
+ ///
+ /// + /// + /// Docking + /// + /// + [FieldOffset(1216)] + public ImGuiID DockId; + } + + /// + /// + /// Storage for one window + /// + /// + /// C++: + /// imgui_internal.h:190 + ///
struct ImGuiWindow + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiWindowPtr(ImGuiWindow* ptr) : INullable + { + private ImGuiWindow* _ptr = ptr; + public ImGuiWindow* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiWindowPtr(ImGuiWindow* ptr) => new(ptr); + + public static implicit operator ImGuiWindow*(ImGuiWindowPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Parent UI context (needs to be set explicitly by parent). + /// + /// + /// C++: + /// imgui_internal.h:2791 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiContextPtr Ctx => ref Unsafe.AsRef(&_ptr->Ctx); + + /// + /// + /// Window name, owned by the window. + /// + /// + /// C++: + /// imgui_internal.h:2792 + ///
char* Name + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref Ptr Name => ref Unsafe.AsRef>(&_ptr->Name); + + /// + /// + /// == ImHashStr(Name) + /// + /// + /// C++: + /// imgui_internal.h:2793 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// See enum ImGuiWindowFlags_ + /// + /// + /// C++: + /// imgui_internal.h:2794 + ///
ImGuiWindowFlags Flags + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiWindowFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// See enum ImGuiWindowFlags_ + /// + /// + /// C++: + /// imgui_internal.h:2794 + ///
ImGuiWindowFlags Flags, FlagsPreviousFrame + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiWindowFlags FlagsPreviousFrame => ref Unsafe.AsRef(&_ptr->FlagsPreviousFrame); + + /// + /// + /// Set when window is a child window. See enum ImGuiChildFlags_ + /// + /// + /// C++: + /// imgui_internal.h:2795 + ///
ImGuiChildFlags ChildFlags + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiChildFlags ChildFlags => ref Unsafe.AsRef(&_ptr->ChildFlags); + + /// + /// + /// Advanced users only. Set with SetNextWindowClass() + /// + /// + /// C++: + /// imgui_internal.h:2796 + ///
ImGuiWindowClass WindowClass + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiWindowClass WindowClass => ref Unsafe.AsRef(&_ptr->WindowClass); + + /// + /// + /// Always set in Begin(). Inactive windows may have a NULL value here if their viewport was discarded. + /// + /// + /// C++: + /// imgui_internal.h:2797 + ///
ImGuiViewportP* Viewport + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiViewportPPtr Viewport => ref Unsafe.AsRef(&_ptr->Viewport); + + /// + /// + /// We backup the viewport id (since the viewport may disappear or never be created if the window is + /// inactive) + /// + /// + /// C++: + /// imgui_internal.h:2798 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiID ViewportId => ref Unsafe.AsRef(&_ptr->ViewportId); + + /// + /// + /// We backup the viewport position (since the viewport may disappear or never be created if the window is + /// inactive) + /// + /// + /// C++: + /// imgui_internal.h:2799 + ///
ImVec2 ViewportPos + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ViewportPos => ref Unsafe.AsRef(&_ptr->ViewportPos); + + /// + /// + /// Reset to -1 every frame (index is guaranteed to be valid between NewFrame..EndFrame), only used in the + /// Appearing frame of a tooltip/popup to enforce clamping to a given monitor + /// + /// + /// C++: + /// imgui_internal.h:2800 + ///
int ViewportAllowPlatformMonitorExtend + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref int ViewportAllowPlatformMonitorExtend => + ref Unsafe.AsRef(&_ptr->ViewportAllowPlatformMonitorExtend); + + /// + /// + /// Position (always rounded-up to nearest pixel) + /// + /// + /// C++: + /// imgui_internal.h:2801 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 Pos => ref Unsafe.AsRef(&_ptr->Pos); + + /// + /// + /// Current size (==SizeFull or collapsed title bar size) + /// + /// + /// C++: + /// imgui_internal.h:2802 + ///
ImVec2 Size + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// Size when non collapsed + /// + /// + /// C++: + /// imgui_internal.h:2803 + ///
ImVec2 SizeFull + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 SizeFull => ref Unsafe.AsRef(&_ptr->SizeFull); + + /// + /// + /// Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous + /// frame. Does not include window decoration or window padding. + /// + /// + /// C++: + /// imgui_internal.h:2804 + ///
ImVec2 ContentSize + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ContentSize => ref Unsafe.AsRef(&_ptr->ContentSize); + + /// + /// + /// C++: + /// imgui_internal.h:2805 + ///
ImVec2 ContentSizeIdeal + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ContentSizeIdeal => ref Unsafe.AsRef(&_ptr->ContentSizeIdeal); + + /// + /// + /// Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize(). + /// + /// + /// C++: + /// imgui_internal.h:2806 + ///
ImVec2 ContentSizeExplicit + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ContentSizeExplicit => ref Unsafe.AsRef(&_ptr->ContentSizeExplicit); + + /// + /// + /// Window padding at the time of Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2807 + ///
ImVec2 WindowPadding + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 WindowPadding => ref Unsafe.AsRef(&_ptr->WindowPadding); + + /// + /// + /// Window rounding at the time of Begin(). May be clamped lower to avoid rendering artifacts with title + /// bar, menu bar etc. + /// + /// + /// C++: + /// imgui_internal.h:2808 + ///
float WindowRounding + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float WindowRounding => ref Unsafe.AsRef(&_ptr->WindowRounding); + + /// + /// + /// Window border size at the time of Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2809 + ///
float WindowBorderSize + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float WindowBorderSize => ref Unsafe.AsRef(&_ptr->WindowBorderSize); + + /// + /// + /// Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you + /// can change it to TitleBarHeight. + /// + /// + /// C++: + /// imgui_internal.h:2810 + ///
float TitleBarHeight + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float TitleBarHeight => ref Unsafe.AsRef(&_ptr->TitleBarHeight); + + /// + /// + /// Note that those used to be function before 2024/05/28. If you have old code calling TitleBarHeight() you + /// can change it to TitleBarHeight. + /// + /// + /// C++: + /// imgui_internal.h:2810 + ///
float TitleBarHeight, MenuBarHeight + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float MenuBarHeight => ref Unsafe.AsRef(&_ptr->MenuBarHeight); + + /// + /// + /// Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0f. Y1 generally = + /// TitleBarHeight + MenuBarHeight). Locked during Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2811 + ///
float DecoOuterSizeX1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float DecoOuterSizeX1 => ref Unsafe.AsRef(&_ptr->DecoOuterSizeX1); + + /// + /// + /// Left/Up offsets. Sum of non-scrolling outer decorations (X1 generally == 0.0f. Y1 generally = + /// TitleBarHeight + MenuBarHeight). Locked during Begin(). + /// + /// + /// C++: + /// imgui_internal.h:2811 + ///
float DecoOuterSizeX1, DecoOuterSizeY1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float DecoOuterSizeY1 => ref Unsafe.AsRef(&_ptr->DecoOuterSizeY1); + + /// + /// + /// Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y). + /// + /// + /// C++: + /// imgui_internal.h:2812 + ///
float DecoOuterSizeX2 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float DecoOuterSizeX2 => ref Unsafe.AsRef(&_ptr->DecoOuterSizeX2); + + /// + /// + /// Right/Down offsets (X2 generally == ScrollbarSize.x, Y2 == ScrollbarSizes.y). + /// + /// + /// C++: + /// imgui_internal.h:2812 + ///
float DecoOuterSizeX2, DecoOuterSizeY2 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float DecoOuterSizeY2 => ref Unsafe.AsRef(&_ptr->DecoOuterSizeY2); + + /// + /// + /// Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen + /// rows/columns are inside InnerRect (and not part of regular decoration sizes). + /// + /// + /// C++: + /// imgui_internal.h:2813 + ///
float DecoInnerSizeX1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float DecoInnerSizeX1 => ref Unsafe.AsRef(&_ptr->DecoInnerSizeX1); + + /// + /// + /// Applied AFTER/OVER InnerRect. Specialized for Tables as they use specialized form of clipping and frozen + /// rows/columns are inside InnerRect (and not part of regular decoration sizes). + /// + /// + /// C++: + /// imgui_internal.h:2813 + ///
float DecoInnerSizeX1, DecoInnerSizeY1 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float DecoInnerSizeY1 => ref Unsafe.AsRef(&_ptr->DecoInnerSizeY1); + + /// + /// + /// Size of buffer storing Name. May be larger than strlen(Name)! + /// + /// + /// C++: + /// imgui_internal.h:2814 + ///
int NameBufLen + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref int NameBufLen => ref Unsafe.AsRef(&_ptr->NameBufLen); + + /// + /// + /// == window->GetID("#MOVE") + /// + /// + /// C++: + /// imgui_internal.h:2815 + ///
ImGuiID MoveId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiID MoveId => ref Unsafe.AsRef(&_ptr->MoveId); + + /// + /// + /// == window->GetID("#TAB") + /// + /// + /// C++: + /// imgui_internal.h:2816 + ///
ImGuiID TabId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiID TabId => ref Unsafe.AsRef(&_ptr->TabId); + + /// + /// + /// ID of corresponding item in parent window (for navigation to return from child window to parent window) + /// + /// + /// C++: + /// imgui_internal.h:2817 + ///
ImGuiID ChildId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiID ChildId => ref Unsafe.AsRef(&_ptr->ChildId); + + /// + /// + /// ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for + /// recycling) + /// + /// + /// C++: + /// imgui_internal.h:2818 + ///
ImGuiID PopupId + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiID PopupId => ref Unsafe.AsRef(&_ptr->PopupId); + + /// + /// + /// C++: + /// imgui_internal.h:2819 + ///
ImVec2 Scroll + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 Scroll => ref Unsafe.AsRef(&_ptr->Scroll); + + /// + /// + /// C++: + /// imgui_internal.h:2820 + ///
ImVec2 ScrollMax + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ScrollMax => ref Unsafe.AsRef(&_ptr->ScrollMax); + + /// + /// + /// target scroll position. stored as cursor position with scrolling canceled out, so the highest point is + /// always 0.0f. (FLT_MAX for no change) + /// + /// + /// C++: + /// imgui_internal.h:2821 + ///
ImVec2 ScrollTarget + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ScrollTarget => ref Unsafe.AsRef(&_ptr->ScrollTarget); + + /// + /// + /// 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered + /// + /// + /// C++: + /// imgui_internal.h:2822 + ///
ImVec2 ScrollTargetCenterRatio + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ScrollTargetCenterRatio => ref Unsafe.AsRef(&_ptr->ScrollTargetCenterRatio); + + /// + /// + /// 0.0f = no snapping, >0.0f snapping threshold + /// + /// + /// C++: + /// imgui_internal.h:2823 + ///
ImVec2 ScrollTargetEdgeSnapDist + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ScrollTargetEdgeSnapDist => ref Unsafe.AsRef(&_ptr->ScrollTargetEdgeSnapDist); + + /// + /// + /// Size taken by each scrollbars on their smaller axis. Pay attention! ScrollbarSizes.x == width of the + /// vertical scrollbar, ScrollbarSizes.y = height of the horizontal scrollbar. + /// + /// + /// C++: + /// imgui_internal.h:2824 + ///
ImVec2 ScrollbarSizes + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 ScrollbarSizes => ref Unsafe.AsRef(&_ptr->ScrollbarSizes); + + /// + /// + /// Are scrollbars visible? + /// + /// + /// C++: + /// imgui_internal.h:2825 + ///
bool ScrollbarX + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool ScrollbarX => ref Unsafe.AsRef(&_ptr->ScrollbarX); + + /// + /// + /// Are scrollbars visible? + /// + /// + /// C++: + /// imgui_internal.h:2825 + ///
bool ScrollbarX, ScrollbarY + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool ScrollbarY => ref Unsafe.AsRef(&_ptr->ScrollbarY); + + /// + /// + /// Was ScrollbarX previously auto-stabilized? + /// + /// + /// C++: + /// imgui_internal.h:2826 + ///
bool ScrollbarXStabilizeEnabled + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool ScrollbarXStabilizeEnabled => ref Unsafe.AsRef(&_ptr->ScrollbarXStabilizeEnabled); + + /// + /// + /// Used to stabilize scrollbar visibility in case of feedback loops + /// + /// + /// C++: + /// imgui_internal.h:2827 + ///
ImU8 ScrollbarXStabilizeToggledHistory + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref byte ScrollbarXStabilizeToggledHistory => + ref Unsafe.AsRef(&_ptr->ScrollbarXStabilizeToggledHistory); + + /// + /// + /// C++: + /// imgui_internal.h:2828 + ///
bool ViewportOwned + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool ViewportOwned => ref Unsafe.AsRef(&_ptr->ViewportOwned); + + /// + /// + /// Set to true on Begin(), unless Collapsed + /// + /// + /// C++: + /// imgui_internal.h:2829 + ///
bool Active + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool Active => ref Unsafe.AsRef(&_ptr->Active); + + /// + /// + /// C++: + /// imgui_internal.h:2830 + ///
bool WasActive + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool WasActive => ref Unsafe.AsRef(&_ptr->WasActive); + + /// + /// + /// Set to true when any widget access the current window + /// + /// + /// C++: + /// imgui_internal.h:2831 + ///
bool WriteAccessed + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool WriteAccessed => ref Unsafe.AsRef(&_ptr->WriteAccessed); + + /// + /// + /// Set when collapsing window to become only title-bar + /// + /// + /// C++: + /// imgui_internal.h:2832 + ///
bool Collapsed + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool Collapsed => ref Unsafe.AsRef(&_ptr->Collapsed); + + /// + /// + /// C++: + /// imgui_internal.h:2833 + ///
bool WantCollapseToggle + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool WantCollapseToggle => ref Unsafe.AsRef(&_ptr->WantCollapseToggle); + + /// + /// + /// Set when items can safely be all clipped (e.g. window not visible or collapsed) + /// + /// + /// C++: + /// imgui_internal.h:2834 + ///
bool SkipItems + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool SkipItems => ref Unsafe.AsRef(&_ptr->SkipItems); + + /// + /// + /// [EXPERIMENTAL] Reuse previous frame drawn contents, Begin() returns false. + /// + /// + /// C++: + /// imgui_internal.h:2835 + ///
bool SkipRefresh + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool SkipRefresh => ref Unsafe.AsRef(&_ptr->SkipRefresh); + + /// + /// + /// Set during the frame where the window is appearing (or re-appearing) + /// + /// + /// C++: + /// imgui_internal.h:2836 + ///
bool Appearing + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool Appearing => ref Unsafe.AsRef(&_ptr->Appearing); + + /// + /// + /// Do not display (== HiddenFrames*** > 0) + /// + /// + /// C++: + /// imgui_internal.h:2837 + ///
bool Hidden + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool Hidden => ref Unsafe.AsRef(&_ptr->Hidden); + + /// + /// + /// Set on the "Debug##Default" window. + /// + /// + /// C++: + /// imgui_internal.h:2838 + ///
bool IsFallbackWindow + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool IsFallbackWindow => ref Unsafe.AsRef(&_ptr->IsFallbackWindow); + + /// + /// + /// Set when passed _ChildWindow, left to false by BeginDocked() + /// + /// + /// C++: + /// imgui_internal.h:2839 + ///
bool IsExplicitChild + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool IsExplicitChild => ref Unsafe.AsRef(&_ptr->IsExplicitChild); + + /// + /// + /// Set when the window has a close button (p_open != NULL) + /// + /// + /// C++: + /// imgui_internal.h:2840 + ///
bool HasCloseButton + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool HasCloseButton => ref Unsafe.AsRef(&_ptr->HasCloseButton); + + /// + /// + /// Current border being hovered for resize (-1: none, otherwise 0-3) + /// + /// + /// C++: + /// imgui_internal.h:2841 + ///
signed char ResizeBorderHovered + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref byte ResizeBorderHovered => ref Unsafe.AsRef(&_ptr->ResizeBorderHovered); + + /// + /// + /// Current border being held for resize (-1: none, otherwise 0-3) + /// + /// + /// C++: + /// imgui_internal.h:2842 + ///
signed char ResizeBorderHeld + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref byte ResizeBorderHeld => ref Unsafe.AsRef(&_ptr->ResizeBorderHeld); + + /// + /// + /// Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End + /// pairs) + /// + /// + /// C++: + /// imgui_internal.h:2843 + ///
short BeginCount + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref short BeginCount => ref Unsafe.AsRef(&_ptr->BeginCount); + + /// + /// + /// Number of Begin() during the previous frame + /// + /// + /// C++: + /// imgui_internal.h:2844 + ///
short BeginCountPreviousFrame + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref short BeginCountPreviousFrame => ref Unsafe.AsRef(&_ptr->BeginCountPreviousFrame); + + /// + /// + /// Begin() order within immediate parent window, if we are a child window. Otherwise 0. + /// + /// + /// C++: + /// imgui_internal.h:2845 + ///
short BeginOrderWithinParent + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref short BeginOrderWithinParent => ref Unsafe.AsRef(&_ptr->BeginOrderWithinParent); + + /// + /// + /// Begin() order within entire imgui context. This is mostly used for debugging submission order related + /// issues. + /// + /// + /// C++: + /// imgui_internal.h:2846 + ///
short BeginOrderWithinContext + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref short BeginOrderWithinContext => ref Unsafe.AsRef(&_ptr->BeginOrderWithinContext); + + /// + /// + /// Order within WindowsFocusOrder[], altered when windows are focused. + /// + /// + /// C++: + /// imgui_internal.h:2847 + ///
short FocusOrder + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref short FocusOrder => ref Unsafe.AsRef(&_ptr->FocusOrder); + + /// + /// + /// C++: + /// imgui_internal.h:2848 + ///
ImS8 AutoFitFramesX + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref sbyte AutoFitFramesX => ref Unsafe.AsRef(&_ptr->AutoFitFramesX); + + /// + /// + /// C++: + /// imgui_internal.h:2848 + ///
ImS8 AutoFitFramesX, AutoFitFramesY + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref sbyte AutoFitFramesY => ref Unsafe.AsRef(&_ptr->AutoFitFramesY); + + /// + /// + /// C++: + /// imgui_internal.h:2849 + ///
bool AutoFitOnlyGrows + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref bool AutoFitOnlyGrows => ref Unsafe.AsRef(&_ptr->AutoFitOnlyGrows); + + /// + /// + /// C++: + /// imgui_internal.h:2850 + ///
ImGuiDir AutoPosLastDirection + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiDir AutoPosLastDirection => ref Unsafe.AsRef(&_ptr->AutoPosLastDirection); + + /// + /// + /// Hide the window for N frames + /// + /// + /// C++: + /// imgui_internal.h:2851 + ///
ImS8 HiddenFramesCanSkipItems + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref sbyte HiddenFramesCanSkipItems => ref Unsafe.AsRef(&_ptr->HiddenFramesCanSkipItems); + + /// + /// + /// Hide the window for N frames while allowing items to be submitted so we can measure their size + /// + /// + /// C++: + /// imgui_internal.h:2852 + ///
ImS8 HiddenFramesCannotSkipItems + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref sbyte HiddenFramesCannotSkipItems => ref Unsafe.AsRef(&_ptr->HiddenFramesCannotSkipItems); + + /// + /// + /// Hide the window until frame N at Render() time only + /// + /// + /// C++: + /// imgui_internal.h:2853 + ///
ImS8 HiddenFramesForRenderOnly + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref sbyte HiddenFramesForRenderOnly => ref Unsafe.AsRef(&_ptr->HiddenFramesForRenderOnly); + + /// + /// + /// Disable window interactions for N frames + /// + /// + /// C++: + /// imgui_internal.h:2854 + ///
ImS8 DisableInputsFrames + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref sbyte DisableInputsFrames => ref Unsafe.AsRef(&_ptr->DisableInputsFrames); + + /// + /// + /// store acceptable condition flags for SetNextWindowPos() use. + /// + /// + /// C++: + /// imgui_internal.h:2855 + ///
ImGuiCond SetWindowPosAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiCond SetWindowPosAllowFlags => ref Unsafe.AsRef(&_ptr->SetWindowPosAllowFlags); + + /// + /// + /// store acceptable condition flags for SetNextWindowSize() use. + /// + /// + /// C++: + /// imgui_internal.h:2856 + ///
ImGuiCond SetWindowSizeAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiCond SetWindowSizeAllowFlags => ref Unsafe.AsRef(&_ptr->SetWindowSizeAllowFlags); + + /// + /// + /// store acceptable condition flags for SetNextWindowCollapsed() use. + /// + /// + /// C++: + /// imgui_internal.h:2857 + ///
ImGuiCond SetWindowCollapsedAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiCond SetWindowCollapsedAllowFlags => + ref Unsafe.AsRef(&_ptr->SetWindowCollapsedAllowFlags); + + /// + /// + /// store acceptable condition flags for SetNextWindowDock() use. + /// + /// + /// C++: + /// imgui_internal.h:2858 + ///
ImGuiCond SetWindowDockAllowFlags : 8 + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref ImGuiCond SetWindowDockAllowFlags => ref Unsafe.AsRef(&_ptr->SetWindowDockAllowFlags); + + /// + /// + /// store window position when using a non-zero Pivot (position set needs to be processed when we know the + /// window size) + /// + /// + /// C++: + /// imgui_internal.h:2859 + ///
ImVec2 SetWindowPosVal + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 SetWindowPosVal => ref Unsafe.AsRef(&_ptr->SetWindowPosVal); + + /// + /// + /// store window pivot for positioning. ImVec2(0, 0) when positioning from top-left corner; ImVec2(0.5f, + /// 0.5f) for centering; ImVec2(1, 1) for bottom right. + /// + /// + /// C++: + /// imgui_internal.h:2860 + ///
ImVec2 SetWindowPosPivot + ///
+ ///
+ /// + /// + /// Storage for one window + /// + /// + public ref float2 SetWindowPosPivot => ref Unsafe.AsRef(&_ptr->SetWindowPosPivot); + + /// + /// + /// ID stack. ID are hashes seeded with the value at the top of the stack. (In theory this should be in the + /// TempData structure) + /// + /// + /// C++: + /// imgui_internal.h:2862 + ///
ImVector<ImGuiID> IDStack + ///
+ ///
+ public ref ImVector IDStack => ref Unsafe.AsRef>(&_ptr->IDStack); + + /// + /// + /// Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, + /// hence the "DC" variable name. + /// + /// + /// C++: + /// imgui_internal.h:2863 + ///
ImGuiWindowTempData DC + ///
+ ///
+ public ref ImGuiWindowTempData DC => ref Unsafe.AsRef(&_ptr->DC); + + /// + /// + /// == Window->Rect() just after setup in Begin(). == window->Rect() for root window. + /// + /// + /// C++: + /// imgui_internal.h:2867 + ///
ImRect OuterRectClipped + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect OuterRectClipped => ref Unsafe.AsRef(&_ptr->OuterRectClipped); + + /// + /// + /// Inner rectangle (omit title bar, menu bar, scroll bar) + /// + /// + /// C++: + /// imgui_internal.h:2868 + ///
ImRect InnerRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect InnerRect => ref Unsafe.AsRef(&_ptr->InnerRect); + + /// + /// + /// == InnerRect shrunk by WindowPadding*0.5f on each side, clipped within viewport or parent clip rect. + /// + /// + /// C++: + /// imgui_internal.h:2869 + ///
ImRect InnerClipRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect InnerClipRect => ref Unsafe.AsRef(&_ptr->InnerClipRect); + + /// + /// + /// Initially covers the whole scrolling region. Reduced by containers e.g columns/tables when active. + /// Shrunk by WindowPadding*1.0f on each side. This is meant to replace ContentRegionRect over time (from + /// 1.71+ onward). + /// + /// + /// C++: + /// imgui_internal.h:2870 + ///
ImRect WorkRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect WorkRect => ref Unsafe.AsRef(&_ptr->WorkRect); + + /// + /// + /// Backup of WorkRect before entering a container such as columns/tables. Used by e.g. SpanAllColumns + /// functions to easily access. Stacked containers are responsible for maintaining this. // FIXME-WORKRECT: + /// Could be a stack? + /// + /// + /// C++: + /// imgui_internal.h:2871 + ///
ImRect ParentWorkRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect ParentWorkRect => ref Unsafe.AsRef(&_ptr->ParentWorkRect); + + /// + /// + /// Current clipping/scissoring rectangle, evolve as we are using PushClipRect(), etc. == + /// DrawList->clip_rect_stack.back(). + /// + /// + /// C++: + /// imgui_internal.h:2872 + ///
ImRect ClipRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect); + + /// + /// + /// FIXME: This is currently confusing/misleading. It is essentially WorkRect but not handling of scrolling. + /// We currently rely on it as right/bottom aligned sizing operation need some size to rely on. + /// + /// + /// C++: + /// imgui_internal.h:2873 + ///
ImRect ContentRegionRect + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref floatRect ContentRegionRect => ref Unsafe.AsRef(&_ptr->ContentRegionRect); + + /// + /// + /// Define an optional rectangular hole where mouse will pass-through the window. + /// + /// + /// C++: + /// imgui_internal.h:2874 + ///
ImVec2ih HitTestHoleSize + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref short2 HitTestHoleSize => ref Unsafe.AsRef(&_ptr->HitTestHoleSize); + + /// + /// + /// C++: + /// imgui_internal.h:2875 + ///
ImVec2ih HitTestHoleOffset + ///
+ ///
+ /// + /// + /// The best way to understand what those rectangles are is to use the 'Metrics->Tools->Show Windows Rectangles' viewer. + /// The main 'OuterRect', omitted as a field, is window->Rect(). + /// + /// + public ref short2 HitTestHoleOffset => ref Unsafe.AsRef(&_ptr->HitTestHoleOffset); + + /// + /// + /// Last frame number the window was Active. + /// + /// + /// C++: + /// imgui_internal.h:2877 + ///
int LastFrameActive + ///
+ ///
+ public ref int LastFrameActive => ref Unsafe.AsRef(&_ptr->LastFrameActive); + + /// + /// + /// Last frame number the window was made Focused. + /// + /// + /// C++: + /// imgui_internal.h:2878 + ///
int LastFrameJustFocused + ///
+ ///
+ public ref int LastFrameJustFocused => ref Unsafe.AsRef(&_ptr->LastFrameJustFocused); + + /// + /// + /// Last timestamp the window was Active (using float as we don't need high precision there) + /// + /// + /// C++: + /// imgui_internal.h:2879 + ///
float LastTimeActive + ///
+ ///
+ public ref float LastTimeActive => ref Unsafe.AsRef(&_ptr->LastTimeActive); + + /// + /// + /// C++: + /// imgui_internal.h:2880 + ///
float ItemWidthDefault + ///
+ ///
+ public ref float ItemWidthDefault => ref Unsafe.AsRef(&_ptr->ItemWidthDefault); + + /// + /// + /// C++: + /// imgui_internal.h:2881 + ///
ImGuiStorage StateStorage + ///
+ ///
+ public ref ImGuiStorage StateStorage => ref Unsafe.AsRef(&_ptr->StateStorage); + + /// + /// + /// C++: + /// imgui_internal.h:2882 + ///
ImVector<ImGuiOldColumns> ColumnsStorage + ///
+ ///
+ public ref ImVector ColumnsStorage => + ref Unsafe.AsRef>(&_ptr->ColumnsStorage); + + /// + /// + /// User scale multiplier per-window, via SetWindowFontScale() + /// + /// + /// C++: + /// imgui_internal.h:2883 + ///
float FontWindowScale + ///
+ ///
+ public ref float FontWindowScale => ref Unsafe.AsRef(&_ptr->FontWindowScale); + + /// + /// + /// C++: + /// imgui_internal.h:2884 + ///
float FontWindowScaleParents + ///
+ ///
+ public ref float FontWindowScaleParents => ref Unsafe.AsRef(&_ptr->FontWindowScaleParents); + + /// + /// + /// This is a copy of window->CalcFontSize() at the time of Begin(), trying to phase out CalcFontSize() + /// especially as it may be called on non-current window. + /// + /// + /// C++: + /// imgui_internal.h:2885 + ///
float FontRefSize + ///
+ ///
+ public ref float FontRefSize => ref Unsafe.AsRef(&_ptr->FontRefSize); + + /// + /// + /// Offset into SettingsWindows[] (offsets are always valid as we only grow the array from the back) + /// + /// + /// C++: + /// imgui_internal.h:2886 + ///
int SettingsOffset + ///
+ ///
+ public ref int SettingsOffset => ref Unsafe.AsRef(&_ptr->SettingsOffset); + + /// + /// + /// == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a + /// pointer) + /// + /// + /// C++: + /// imgui_internal.h:2888 + ///
ImDrawList* DrawList + ///
+ ///
+ public ref ImDrawListPtr DrawList => ref Unsafe.AsRef(&_ptr->DrawList); + + /// + /// + /// C++: + /// imgui_internal.h:2889 + ///
ImDrawList DrawListInst + ///
+ ///
+ public ref ImDrawList DrawListInst => ref Unsafe.AsRef(&_ptr->DrawListInst); + + /// + /// + /// If we are a child _or_ popup _or_ docked window, this is pointing to our parent. Otherwise NULL. + /// + /// + /// C++: + /// imgui_internal.h:2890 + ///
ImGuiWindow* ParentWindow + ///
+ ///
+ public ref ImGuiWindowPtr ParentWindow => ref Unsafe.AsRef(&_ptr->ParentWindow); + + /// + /// + /// C++: + /// imgui_internal.h:2891 + ///
ImGuiWindow* ParentWindowInBeginStack + ///
+ ///
+ public ref ImGuiWindowPtr ParentWindowInBeginStack => + ref Unsafe.AsRef(&_ptr->ParentWindowInBeginStack); + + /// + /// + /// Point to ourself or first ancestor that is not a child window. Doesn't cross through popups/dock nodes. + /// + /// + /// C++: + /// imgui_internal.h:2892 + ///
ImGuiWindow* RootWindow + ///
+ ///
+ public ref ImGuiWindowPtr RootWindow => ref Unsafe.AsRef(&_ptr->RootWindow); + + /// + /// + /// Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child. + /// + /// + /// C++: + /// imgui_internal.h:2893 + ///
ImGuiWindow* RootWindowPopupTree + ///
+ ///
+ public ref ImGuiWindowPtr RootWindowPopupTree => ref Unsafe.AsRef(&_ptr->RootWindowPopupTree); + + /// + /// + /// Point to ourself or first ancestor that is not a child window. Cross through dock nodes. + /// + /// + /// C++: + /// imgui_internal.h:2894 + ///
ImGuiWindow* RootWindowDockTree + ///
+ ///
+ public ref ImGuiWindowPtr RootWindowDockTree => ref Unsafe.AsRef(&_ptr->RootWindowDockTree); + + /// + /// + /// Point to ourself or first ancestor which will display TitleBgActive color when this window is active. + /// + /// + /// C++: + /// imgui_internal.h:2895 + ///
ImGuiWindow* RootWindowForTitleBarHighlight + ///
+ ///
+ public ref ImGuiWindowPtr RootWindowForTitleBarHighlight => + ref Unsafe.AsRef(&_ptr->RootWindowForTitleBarHighlight); + + /// + /// + /// Point to ourself or first ancestor which doesn't have the NavFlattened flag. + /// + /// + /// C++: + /// imgui_internal.h:2896 + ///
ImGuiWindow* RootWindowForNav + ///
+ ///
+ public ref ImGuiWindowPtr RootWindowForNav => ref Unsafe.AsRef(&_ptr->RootWindowForNav); + + /// + /// + /// Set to manual link a window to its logical parent so that Shortcut() chain are honoerd (e.g. Tool linked + /// to Document) + /// + /// + /// C++: + /// imgui_internal.h:2897 + ///
ImGuiWindow* ParentWindowForFocusRoute + ///
+ ///
+ public ref ImGuiWindowPtr ParentWindowForFocusRoute => + ref Unsafe.AsRef(&_ptr->ParentWindowForFocusRoute); + + /// + /// + /// When going to the menu bar, we remember the child window we came from. (This could probably be made + /// implicit if we kept g.Windows sorted by last focused including child window.) + /// + /// + /// C++: + /// imgui_internal.h:2899 + ///
ImGuiWindow* NavLastChildNavWindow + ///
+ ///
+ public ref ImGuiWindowPtr NavLastChildNavWindow => + ref Unsafe.AsRef(&_ptr->NavLastChildNavWindow); + + /// + /// + /// Last known NavId for this window, per layer (0/1) + /// + /// + /// C++: + /// imgui_internal.h:2900 + ///
ImGuiID NavLastIds[ImGuiNavLayer_COUNT] + ///
+ ///
+ public ref ImGuiID_2 NavLastIds => ref Unsafe.AsRef(&_ptr->NavLastIds); + + /// + /// + /// Reference rectangle, in window relative space + /// + /// + /// C++: + /// imgui_internal.h:2901 + ///
ImRect NavRectRel[ImGuiNavLayer_COUNT] + ///
+ ///
+ public ref floatRect_2 NavRectRel => ref Unsafe.AsRef(&_ptr->NavRectRel); + + /// + /// + /// Preferred X/Y position updated when moving on a given axis, reset to FLT_MAX. + /// + /// + /// C++: + /// imgui_internal.h:2902 + ///
ImVec2 NavPreferredScoringPosRel[ImGuiNavLayer_COUNT] + ///
+ ///
+ public ref float2_2 NavPreferredScoringPosRel => ref Unsafe.AsRef(&_ptr->NavPreferredScoringPosRel); + + /// + /// + /// Focus Scope ID at the time of Begin() + /// + /// + /// C++: + /// imgui_internal.h:2903 + ///
ImGuiID NavRootFocusScopeId + ///
+ ///
+ public ref ImGuiID NavRootFocusScopeId => ref Unsafe.AsRef(&_ptr->NavRootFocusScopeId); + + /// + /// + /// Backup of last idx/vtx count, so when waking up the window we can preallocate and avoid iterative + /// alloc/copy + /// + /// + /// C++: + /// imgui_internal.h:2905 + ///
int MemoryDrawListIdxCapacity + ///
+ ///
+ public ref int MemoryDrawListIdxCapacity => ref Unsafe.AsRef(&_ptr->MemoryDrawListIdxCapacity); + + /// + /// + /// C++: + /// imgui_internal.h:2906 + ///
int MemoryDrawListVtxCapacity + ///
+ ///
+ public ref int MemoryDrawListVtxCapacity => ref Unsafe.AsRef(&_ptr->MemoryDrawListVtxCapacity); + + /// + /// + /// Set when window extraneous data have been garbage collected + /// + /// + /// C++: + /// imgui_internal.h:2907 + ///
bool MemoryCompacted + ///
+ ///
+ public ref bool MemoryCompacted => ref Unsafe.AsRef(&_ptr->MemoryCompacted); + + /// + /// + /// When docking artifacts are actually visible. When this is set, DockNode is guaranteed to be != NULL. ~~ + /// (DockNode != NULL) && (DockNode->Windows.Size > 1). + /// + /// + /// C++: + /// imgui_internal.h:2910 + ///
bool DockIsActive :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref bool DockIsActive => ref Unsafe.AsRef(&_ptr->DockIsActive); + + /// + /// + /// C++: + /// imgui_internal.h:2911 + ///
bool DockNodeIsVisible :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref bool DockNodeIsVisible => ref Unsafe.AsRef(&_ptr->DockNodeIsVisible); + + /// + /// + /// Is our window visible this frame? ~~ is the corresponding tab selected? + /// + /// + /// C++: + /// imgui_internal.h:2912 + ///
bool DockTabIsVisible :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref bool DockTabIsVisible => ref Unsafe.AsRef(&_ptr->DockTabIsVisible); + + /// + /// + /// C++: + /// imgui_internal.h:2913 + ///
bool DockTabWantClose :1 + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref bool DockTabWantClose => ref Unsafe.AsRef(&_ptr->DockTabWantClose); + + /// + /// + /// Order of the last time the window was visible within its DockNode. This is used to reorder windows that + /// are reappearing on the same frame. Same value between windows that were active and windows that were + /// none are possible. + /// + /// + /// C++: + /// imgui_internal.h:2914 + ///
short DockOrder + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref short DockOrder => ref Unsafe.AsRef(&_ptr->DockOrder); + + /// + /// + /// C++: + /// imgui_internal.h:2915 + ///
ImGuiWindowDockStyle DockStyle + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref ImGuiWindowDockStyle DockStyle => ref Unsafe.AsRef(&_ptr->DockStyle); + + /// + /// + /// Which node are we docked into. Important: Prefer testing DockIsActive in many cases as this will still + /// be set when the dock node is hidden. + /// + /// + /// C++: + /// imgui_internal.h:2916 + ///
ImGuiDockNode* DockNode + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref ImGuiDockNodePtr DockNode => ref Unsafe.AsRef(&_ptr->DockNode); + + /// + /// + /// Which node are we owning (for parent windows) + /// + /// + /// C++: + /// imgui_internal.h:2917 + ///
ImGuiDockNode* DockNodeAsHost + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref ImGuiDockNodePtr DockNodeAsHost => ref Unsafe.AsRef(&_ptr->DockNodeAsHost); + + /// + /// + /// Backup of last valid DockNode->ID, so single window remember their dock node id even when they are + /// not bound any more + /// + /// + /// C++: + /// imgui_internal.h:2918 + ///
ImGuiID DockId + ///
+ ///
+ /// + /// + /// Docking + /// + /// + public ref ImGuiID DockId => ref Unsafe.AsRef(&_ptr->DockId); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowDockStyle.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowDockStyle.gen.cs new file mode 100644 index 0000000..eebc580 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowDockStyle.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for window-style data which needs to be stored for docking purpose + /// + /// + /// C++: + /// imgui_internal.h:191 + ///
struct ImGuiWindowDockStyle + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImGuiWindowDockStyle + { + /// + /// + /// C++: + /// imgui_internal.h:2071 + ///
ImU32 Colors[ImGuiWindowDockStyleCol_COUNT] + ///
+ ///
+ /// + /// + /// We don't store style.Alpha: dock_node->LastBgColor embeds it and otherwise it would only affect the + /// docking tab, which intuitively I would say we don't want to. + /// + /// + [FieldOffset(0)] + public uint_8 Colors; + } + + /// + /// + /// Storage for window-style data which needs to be stored for docking purpose + /// + /// + /// C++: + /// imgui_internal.h:191 + ///
struct ImGuiWindowDockStyle + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiWindowDockStylePtr(ImGuiWindowDockStyle* ptr) : INullable + { + private ImGuiWindowDockStyle* _ptr = ptr; + public ImGuiWindowDockStyle* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiWindowDockStylePtr(ImGuiWindowDockStyle* ptr) => new(ptr); + + public static implicit operator ImGuiWindowDockStyle*(ImGuiWindowDockStylePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2071 + ///
ImU32 Colors[ImGuiWindowDockStyleCol_COUNT] + ///
+ ///
+ /// + /// + /// We don't store style.Alpha: dock_node->LastBgColor embeds it and otherwise it would only affect the + /// docking tab, which intuitively I would say we don't want to. + /// + /// + public ref uint_8 Colors => ref Unsafe.AsRef(&_ptr->Colors); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowSettings.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowSettings.gen.cs new file mode 100644 index 0000000..5eddb3a --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowSettings.gen.cs @@ -0,0 +1,494 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Storage for a window .ini settings (we keep one of those even if the actual window wasn't instanced during + /// this session) + /// + /// + /// C++: + /// imgui_internal.h:193 + ///
struct ImGuiWindowSettings + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 36)] + public partial struct ImGuiWindowSettings + { + /// + /// + /// C++: + /// imgui_internal.h:2145 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// NB: Settings position are stored RELATIVE to the viewport! Whereas runtime ones are absolute positions. + /// + /// + /// C++: + /// imgui_internal.h:2146 + ///
ImVec2ih Pos + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(4)] + public short2 Pos; + + /// + /// + /// C++: + /// imgui_internal.h:2147 + ///
ImVec2ih Size + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(8)] + public short2 Size; + + /// + /// + /// C++: + /// imgui_internal.h:2148 + ///
ImVec2ih ViewportPos + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(12)] + public short2 ViewportPos; + + /// + /// + /// C++: + /// imgui_internal.h:2149 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(16)] + public ImGuiID ViewportId; + + /// + /// + /// ID of last known DockNode (even if the DockNode is invisible because it has only 1 active window), or 0 + /// if none. + /// + /// + /// C++: + /// imgui_internal.h:2150 + ///
ImGuiID DockId + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(20)] + public ImGuiID DockId; + + /// + /// + /// ID of window class if specified + /// + /// + /// C++: + /// imgui_internal.h:2151 + ///
ImGuiID ClassId + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(24)] + public ImGuiID ClassId; + + /// + /// + /// Order of the last time the window was visible within its DockNode. This is used to reorder windows that + /// are reappearing on the same frame. Same value between windows that were active and windows that were + /// none are possible. + /// + /// + /// C++: + /// imgui_internal.h:2152 + ///
short DockOrder + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(28)] + public short DockOrder; + + /// + /// + /// C++: + /// imgui_internal.h:2153 + ///
bool Collapsed + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(30)] + public Bool8 Collapsed; + + /// + /// + /// C++: + /// imgui_internal.h:2154 + ///
bool IsChild + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(31)] + public Bool8 IsChild; + + /// + /// + /// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) + /// + /// + /// C++: + /// imgui_internal.h:2155 + ///
bool WantApply + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(32)] + public Bool8 WantApply; + + /// + /// + /// Set to invalidate/delete the settings entry + /// + /// + /// C++: + /// imgui_internal.h:2156 + ///
bool WantDelete + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + [FieldOffset(33)] + public Bool8 WantDelete; + } + + /// + /// + /// Storage for a window .ini settings (we keep one of those even if the actual window wasn't instanced during + /// this session) + /// + /// + /// C++: + /// imgui_internal.h:193 + ///
struct ImGuiWindowSettings + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiWindowSettingsPtr(ImGuiWindowSettings* ptr) : INullable + { + private ImGuiWindowSettings* _ptr = ptr; + public ImGuiWindowSettings* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiWindowSettingsPtr(ImGuiWindowSettings* ptr) => new(ptr); + + public static implicit operator ImGuiWindowSettings*(ImGuiWindowSettingsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2145 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// NB: Settings position are stored RELATIVE to the viewport! Whereas runtime ones are absolute positions. + /// + /// + /// C++: + /// imgui_internal.h:2146 + ///
ImVec2ih Pos + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref short2 Pos => ref Unsafe.AsRef(&_ptr->Pos); + + /// + /// + /// C++: + /// imgui_internal.h:2147 + ///
ImVec2ih Size + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref short2 Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// C++: + /// imgui_internal.h:2148 + ///
ImVec2ih ViewportPos + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref short2 ViewportPos => ref Unsafe.AsRef(&_ptr->ViewportPos); + + /// + /// + /// C++: + /// imgui_internal.h:2149 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref ImGuiID ViewportId => ref Unsafe.AsRef(&_ptr->ViewportId); + + /// + /// + /// ID of last known DockNode (even if the DockNode is invisible because it has only 1 active window), or 0 + /// if none. + /// + /// + /// C++: + /// imgui_internal.h:2150 + ///
ImGuiID DockId + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref ImGuiID DockId => ref Unsafe.AsRef(&_ptr->DockId); + + /// + /// + /// ID of window class if specified + /// + /// + /// C++: + /// imgui_internal.h:2151 + ///
ImGuiID ClassId + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref ImGuiID ClassId => ref Unsafe.AsRef(&_ptr->ClassId); + + /// + /// + /// Order of the last time the window was visible within its DockNode. This is used to reorder windows that + /// are reappearing on the same frame. Same value between windows that were active and windows that were + /// none are possible. + /// + /// + /// C++: + /// imgui_internal.h:2152 + ///
short DockOrder + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref short DockOrder => ref Unsafe.AsRef(&_ptr->DockOrder); + + /// + /// + /// C++: + /// imgui_internal.h:2153 + ///
bool Collapsed + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref bool Collapsed => ref Unsafe.AsRef(&_ptr->Collapsed); + + /// + /// + /// C++: + /// imgui_internal.h:2154 + ///
bool IsChild + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref bool IsChild => ref Unsafe.AsRef(&_ptr->IsChild); + + /// + /// + /// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) + /// + /// + /// C++: + /// imgui_internal.h:2155 + ///
bool WantApply + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref bool WantApply => ref Unsafe.AsRef(&_ptr->WantApply); + + /// + /// + /// Set to invalidate/delete the settings entry + /// + /// + /// C++: + /// imgui_internal.h:2156 + ///
bool WantDelete + ///
+ ///
+ /// + /// + /// Windows data saved in imgui.ini file + /// Because we never destroy or rename ImGuiWindowSettings, we can store the names in a separate buffer easily. + /// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) + /// + /// + public ref bool WantDelete => ref Unsafe.AsRef(&_ptr->WantDelete); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowStackData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowStackData.gen.cs new file mode 100644 index 0000000..d3056d5 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowStackData.gen.cs @@ -0,0 +1,208 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:1408 + ///
struct ImGuiWindowStackData + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 120)] + public partial struct ImGuiWindowStackData + { + /// + /// + /// C++: + /// imgui_internal.h:1410 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + [FieldOffset(0)] + public ImGuiWindowPtr Window; + + /// + /// + /// C++: + /// imgui_internal.h:1411 + ///
ImGuiLastItemData ParentLastItemDataBackup + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + [FieldOffset(8)] + public ImGuiLastItemData ParentLastItemDataBackup; + + /// + /// + /// Store size of various stacks for asserting + /// + /// + /// C++: + /// imgui_internal.h:1412 + ///
ImGuiErrorRecoveryState StackSizesInBegin + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + [FieldOffset(88)] + public ImGuiErrorRecoveryState StackSizesInBegin; + + /// + /// + /// Non-child window override disabled flag + /// + /// + /// C++: + /// imgui_internal.h:1413 + ///
bool DisabledOverrideReenable + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + [FieldOffset(110)] + public Bool8 DisabledOverrideReenable; + + /// + /// + /// C++: + /// imgui_internal.h:1414 + ///
float DisabledOverrideReenableAlphaBackup + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + [FieldOffset(112)] + public float DisabledOverrideReenableAlphaBackup; + } + + /// + /// + /// C++: + /// imgui_internal.h:1408 + ///
struct ImGuiWindowStackData + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + public unsafe partial struct ImGuiWindowStackDataPtr(ImGuiWindowStackData* ptr) : INullable + { + private ImGuiWindowStackData* _ptr = ptr; + public ImGuiWindowStackData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiWindowStackDataPtr(ImGuiWindowStackData* ptr) => new(ptr); + + public static implicit operator ImGuiWindowStackData*(ImGuiWindowStackDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:1410 + ///
ImGuiWindow* Window + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&_ptr->Window); + + /// + /// + /// C++: + /// imgui_internal.h:1411 + ///
ImGuiLastItemData ParentLastItemDataBackup + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + public ref ImGuiLastItemData ParentLastItemDataBackup => + ref Unsafe.AsRef(&_ptr->ParentLastItemDataBackup); + + /// + /// + /// Store size of various stacks for asserting + /// + /// + /// C++: + /// imgui_internal.h:1412 + ///
ImGuiErrorRecoveryState StackSizesInBegin + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + public ref ImGuiErrorRecoveryState StackSizesInBegin => + ref Unsafe.AsRef(&_ptr->StackSizesInBegin); + + /// + /// + /// Non-child window override disabled flag + /// + /// + /// C++: + /// imgui_internal.h:1413 + ///
bool DisabledOverrideReenable + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + public ref bool DisabledOverrideReenable => ref Unsafe.AsRef(&_ptr->DisabledOverrideReenable); + + /// + /// + /// C++: + /// imgui_internal.h:1414 + ///
float DisabledOverrideReenableAlphaBackup + ///
+ ///
+ /// + /// + /// Data saved for each window pushed into the stack + /// + /// + public ref float DisabledOverrideReenableAlphaBackup => + ref Unsafe.AsRef(&_ptr->DisabledOverrideReenableAlphaBackup); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowTempData.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowTempData.gen.cs new file mode 100644 index 0000000..cb618ab --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/ImGuiWindowTempData.gen.cs @@ -0,0 +1,1466 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// Temporary storage for one window (that's the data which in theory we could ditch at the end of the frame, in + /// practice we currently keep it for each window) + /// + /// + /// C++: + /// imgui_internal.h:192 + ///
struct ImGuiWindowTempData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 272)] + public partial struct ImGuiWindowTempData + { + /// + /// + /// Current emitting position, in absolute coordinates. + /// + /// + /// C++: + /// imgui_internal.h:2735 + ///
ImVec2 CursorPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(0)] + public float2 CursorPos; + + /// + /// + /// C++: + /// imgui_internal.h:2736 + ///
ImVec2 CursorPosPrevLine + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(8)] + public float2 CursorPosPrevLine; + + /// + /// + /// Initial position after Begin(), generally ~ window position + WindowPadding. + /// + /// + /// C++: + /// imgui_internal.h:2737 + ///
ImVec2 CursorStartPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(16)] + public float2 CursorStartPos; + + /// + /// + /// Used to implicitly calculate ContentSize at the beginning of next frame, for scrolling range and + /// auto-resize. Always growing during the frame. + /// + /// + /// C++: + /// imgui_internal.h:2738 + ///
ImVec2 CursorMaxPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(24)] + public float2 CursorMaxPos; + + /// + /// + /// Used to implicitly calculate ContentSizeIdeal at the beginning of next frame, for auto-resize only. + /// Always growing during the frame. + /// + /// + /// C++: + /// imgui_internal.h:2739 + ///
ImVec2 IdealMaxPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(32)] + public float2 IdealMaxPos; + + /// + /// + /// C++: + /// imgui_internal.h:2740 + ///
ImVec2 CurrLineSize + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(40)] + public float2 CurrLineSize; + + /// + /// + /// C++: + /// imgui_internal.h:2741 + ///
ImVec2 PrevLineSize + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(48)] + public float2 PrevLineSize; + + /// + /// + /// Baseline offset (0.0f by default on a new line, generally == style.FramePadding.y when a framed item has + /// been added). + /// + /// + /// C++: + /// imgui_internal.h:2742 + ///
float CurrLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(56)] + public float CurrLineTextBaseOffset; + + /// + /// + /// C++: + /// imgui_internal.h:2743 + ///
float PrevLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(60)] + public float PrevLineTextBaseOffset; + + /// + /// + /// C++: + /// imgui_internal.h:2744 + ///
bool IsSameLine + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(64)] + public Bool8 IsSameLine; + + /// + /// + /// C++: + /// imgui_internal.h:2745 + ///
bool IsSetPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(65)] + public Bool8 IsSetPos; + + /// + /// + /// Indentation / start position from left of window (increased by TreePush/TreePop, etc.) + /// + /// + /// C++: + /// imgui_internal.h:2746 + ///
ImVec1 Indent + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(68)] + public float Indent; + + /// + /// + /// Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to + /// allow use cases like Tree->Column->Tree. Need revamp columns API. + /// + /// + /// C++: + /// imgui_internal.h:2747 + ///
ImVec1 ColumnsOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(72)] + public float ColumnsOffset; + + /// + /// + /// C++: + /// imgui_internal.h:2748 + ///
ImVec1 GroupOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(76)] + public float GroupOffset; + + /// + /// + /// Record the loss of precision of CursorStartPos due to really large scrolling amount. This is used by + /// clipper to compensate and fix the most common use case of large scroll area. + /// + /// + /// C++: + /// imgui_internal.h:2749 + ///
ImVec2 CursorStartPosLossyness + ///
+ ///
+ /// + /// + /// Layout + /// + /// + [FieldOffset(80)] + public float2 CursorStartPosLossyness; + + /// + /// + /// Current layer, 0..31 (we currently only use 0..1) + /// + /// + /// C++: + /// imgui_internal.h:2752 + ///
ImGuiNavLayer NavLayerCurrent + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + [FieldOffset(88)] + public ImGuiNavLayer NavLayerCurrent; + + /// + /// + /// Which layers have been written to (result from previous frame) + /// + /// + /// C++: + /// imgui_internal.h:2753 + ///
short NavLayersActiveMask + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + [FieldOffset(92)] + public short NavLayersActiveMask; + + /// + /// + /// Which layers have been written to (accumulator for current frame) + /// + /// + /// C++: + /// imgui_internal.h:2754 + ///
short NavLayersActiveMaskNext + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + [FieldOffset(94)] + public short NavLayersActiveMaskNext; + + /// + /// + /// Set when current work location may be scrolled horizontally when moving left / right. This is generally + /// always true UNLESS within a column. + /// + /// + /// C++: + /// imgui_internal.h:2755 + ///
bool NavIsScrollPushableX + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + [FieldOffset(96)] + public Bool8 NavIsScrollPushableX; + + /// + /// + /// C++: + /// imgui_internal.h:2756 + ///
bool NavHideHighlightOneFrame + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + [FieldOffset(97)] + public Bool8 NavHideHighlightOneFrame; + + /// + /// + /// Set per window when scrolling can be used (== ScrollMax.y > 0.0f) + /// + /// + /// C++: + /// imgui_internal.h:2757 + ///
bool NavWindowHasScrollY + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + [FieldOffset(98)] + public Bool8 NavWindowHasScrollY; + + /// + /// + /// FIXME: Remove this + /// + /// + /// C++: + /// imgui_internal.h:2760 + ///
bool MenuBarAppending + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(99)] + public Bool8 MenuBarAppending; + + /// + /// + /// MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the + /// menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > + /// FramePadding.y), often used on TVs. + /// + /// + /// C++: + /// imgui_internal.h:2761 + ///
ImVec2 MenuBarOffset + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(100)] + public float2 MenuBarOffset; + + /// + /// + /// Simplified columns storage for menu items measurement + /// + /// + /// C++: + /// imgui_internal.h:2762 + ///
ImGuiMenuColumns MenuColumns + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(108)] + public ImGuiMenuColumns MenuColumns; + + /// + /// + /// Current tree depth. + /// + /// + /// C++: + /// imgui_internal.h:2763 + ///
int TreeDepth + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(136)] + public int TreeDepth; + + /// + /// + /// Store whether given depth has ImGuiTreeNodeStackData data. Could be turned into a ImU64 if necessary. + /// + /// + /// C++: + /// imgui_internal.h:2764 + ///
ImU32 TreeHasStackDataDepthMask + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(140)] + public uint TreeHasStackDataDepthMask; + + /// + /// + /// Store whether we should keep recording Y2. Cleared when passing clip max. Equivalent + /// TreeHasStackDataDepthMask value should always be set. + /// + /// + /// C++: + /// imgui_internal.h:2765 + ///
ImU32 TreeRecordsClippedNodesY2Mask + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(144)] + public uint TreeRecordsClippedNodesY2Mask; + + /// + /// + /// C++: + /// imgui_internal.h:2766 + ///
ImVector<ImGuiWindow*> ChildWindows + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(152)] + public ImVector ChildWindows; + + /// + /// + /// Current persistent per-window storage (store e.g. tree node open/close state) + /// + /// + /// C++: + /// imgui_internal.h:2767 + ///
ImGuiStorage* StateStorage + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(168)] + public ImGuiStoragePtr StateStorage; + + /// + /// + /// Current columns set + /// + /// + /// C++: + /// imgui_internal.h:2768 + ///
ImGuiOldColumns* CurrentColumns + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(176)] + public ImGuiOldColumnsPtr CurrentColumns; + + /// + /// + /// Current table index (into g.Tables) + /// + /// + /// C++: + /// imgui_internal.h:2769 + ///
int CurrentTableIdx + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(184)] + public int CurrentTableIdx; + + /// + /// + /// C++: + /// imgui_internal.h:2770 + ///
ImGuiLayoutType LayoutType + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(188)] + public ImGuiLayoutType LayoutType; + + /// + /// + /// Layout type of parent window at the time of Begin() + /// + /// + /// C++: + /// imgui_internal.h:2771 + ///
ImGuiLayoutType ParentLayoutType + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(192)] + public ImGuiLayoutType ParentLayoutType; + + /// + /// + /// C++: + /// imgui_internal.h:2772 + ///
ImU32 ModalDimBgColor + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + [FieldOffset(196)] + public uint ModalDimBgColor; + + /// + /// + /// C++: + /// imgui_internal.h:2775 + ///
ImGuiItemStatusFlags WindowItemStatusFlags + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + [FieldOffset(200)] + public ImGuiItemStatusFlags WindowItemStatusFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2776 + ///
ImGuiItemStatusFlags ChildItemStatusFlags + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + [FieldOffset(204)] + public ImGuiItemStatusFlags ChildItemStatusFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2777 + ///
ImGuiItemStatusFlags DockTabItemStatusFlags + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + [FieldOffset(208)] + public ImGuiItemStatusFlags DockTabItemStatusFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2778 + ///
ImRect DockTabItemRect + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + [FieldOffset(212)] + public floatRect DockTabItemRect; + + /// + /// + /// Current item width (>0.0: width in pixels, <0.0: align xx pixels to the right of window). + /// + /// + /// C++: + /// imgui_internal.h:2782 + ///
float ItemWidth + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + [FieldOffset(228)] + public float ItemWidth; + + /// + /// + /// Current text wrap pos. + /// + /// + /// C++: + /// imgui_internal.h:2783 + ///
float TextWrapPos + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + [FieldOffset(232)] + public float TextWrapPos; + + /// + /// + /// Store item widths to restore (attention: .back() is not == ItemWidth) + /// + /// + /// C++: + /// imgui_internal.h:2784 + ///
ImVector<float> ItemWidthStack + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + [FieldOffset(240)] + public ImVector ItemWidthStack; + + /// + /// + /// Store text wrap pos to restore (attention: .back() is not == TextWrapPos) + /// + /// + /// C++: + /// imgui_internal.h:2785 + ///
ImVector<float> TextWrapPosStack + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + [FieldOffset(256)] + public ImVector TextWrapPosStack; + } + + /// + /// + /// Temporary storage for one window (that's the data which in theory we could ditch at the end of the frame, in + /// practice we currently keep it for each window) + /// + /// + /// C++: + /// imgui_internal.h:192 + ///
struct ImGuiWindowTempData + ///
+ ///
+ /// + /// + /// ImGui + /// + /// + public unsafe partial struct ImGuiWindowTempDataPtr(ImGuiWindowTempData* ptr) : INullable + { + private ImGuiWindowTempData* _ptr = ptr; + public ImGuiWindowTempData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiWindowTempDataPtr(ImGuiWindowTempData* ptr) => new(ptr); + + public static implicit operator ImGuiWindowTempData*(ImGuiWindowTempDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Current emitting position, in absolute coordinates. + /// + /// + /// C++: + /// imgui_internal.h:2735 + ///
ImVec2 CursorPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 CursorPos => ref Unsafe.AsRef(&_ptr->CursorPos); + + /// + /// + /// C++: + /// imgui_internal.h:2736 + ///
ImVec2 CursorPosPrevLine + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 CursorPosPrevLine => ref Unsafe.AsRef(&_ptr->CursorPosPrevLine); + + /// + /// + /// Initial position after Begin(), generally ~ window position + WindowPadding. + /// + /// + /// C++: + /// imgui_internal.h:2737 + ///
ImVec2 CursorStartPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 CursorStartPos => ref Unsafe.AsRef(&_ptr->CursorStartPos); + + /// + /// + /// Used to implicitly calculate ContentSize at the beginning of next frame, for scrolling range and + /// auto-resize. Always growing during the frame. + /// + /// + /// C++: + /// imgui_internal.h:2738 + ///
ImVec2 CursorMaxPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 CursorMaxPos => ref Unsafe.AsRef(&_ptr->CursorMaxPos); + + /// + /// + /// Used to implicitly calculate ContentSizeIdeal at the beginning of next frame, for auto-resize only. + /// Always growing during the frame. + /// + /// + /// C++: + /// imgui_internal.h:2739 + ///
ImVec2 IdealMaxPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 IdealMaxPos => ref Unsafe.AsRef(&_ptr->IdealMaxPos); + + /// + /// + /// C++: + /// imgui_internal.h:2740 + ///
ImVec2 CurrLineSize + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 CurrLineSize => ref Unsafe.AsRef(&_ptr->CurrLineSize); + + /// + /// + /// C++: + /// imgui_internal.h:2741 + ///
ImVec2 PrevLineSize + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 PrevLineSize => ref Unsafe.AsRef(&_ptr->PrevLineSize); + + /// + /// + /// Baseline offset (0.0f by default on a new line, generally == style.FramePadding.y when a framed item has + /// been added). + /// + /// + /// C++: + /// imgui_internal.h:2742 + ///
float CurrLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float CurrLineTextBaseOffset => ref Unsafe.AsRef(&_ptr->CurrLineTextBaseOffset); + + /// + /// + /// C++: + /// imgui_internal.h:2743 + ///
float PrevLineTextBaseOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float PrevLineTextBaseOffset => ref Unsafe.AsRef(&_ptr->PrevLineTextBaseOffset); + + /// + /// + /// C++: + /// imgui_internal.h:2744 + ///
bool IsSameLine + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref bool IsSameLine => ref Unsafe.AsRef(&_ptr->IsSameLine); + + /// + /// + /// C++: + /// imgui_internal.h:2745 + ///
bool IsSetPos + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref bool IsSetPos => ref Unsafe.AsRef(&_ptr->IsSetPos); + + /// + /// + /// Indentation / start position from left of window (increased by TreePush/TreePop, etc.) + /// + /// + /// C++: + /// imgui_internal.h:2746 + ///
ImVec1 Indent + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float Indent => ref Unsafe.AsRef(&_ptr->Indent); + + /// + /// + /// Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to + /// allow use cases like Tree->Column->Tree. Need revamp columns API. + /// + /// + /// C++: + /// imgui_internal.h:2747 + ///
ImVec1 ColumnsOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float ColumnsOffset => ref Unsafe.AsRef(&_ptr->ColumnsOffset); + + /// + /// + /// C++: + /// imgui_internal.h:2748 + ///
ImVec1 GroupOffset + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float GroupOffset => ref Unsafe.AsRef(&_ptr->GroupOffset); + + /// + /// + /// Record the loss of precision of CursorStartPos due to really large scrolling amount. This is used by + /// clipper to compensate and fix the most common use case of large scroll area. + /// + /// + /// C++: + /// imgui_internal.h:2749 + ///
ImVec2 CursorStartPosLossyness + ///
+ ///
+ /// + /// + /// Layout + /// + /// + public ref float2 CursorStartPosLossyness => ref Unsafe.AsRef(&_ptr->CursorStartPosLossyness); + + /// + /// + /// Current layer, 0..31 (we currently only use 0..1) + /// + /// + /// C++: + /// imgui_internal.h:2752 + ///
ImGuiNavLayer NavLayerCurrent + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + public ref ImGuiNavLayer NavLayerCurrent => ref Unsafe.AsRef(&_ptr->NavLayerCurrent); + + /// + /// + /// Which layers have been written to (result from previous frame) + /// + /// + /// C++: + /// imgui_internal.h:2753 + ///
short NavLayersActiveMask + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + public ref short NavLayersActiveMask => ref Unsafe.AsRef(&_ptr->NavLayersActiveMask); + + /// + /// + /// Which layers have been written to (accumulator for current frame) + /// + /// + /// C++: + /// imgui_internal.h:2754 + ///
short NavLayersActiveMaskNext + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + public ref short NavLayersActiveMaskNext => ref Unsafe.AsRef(&_ptr->NavLayersActiveMaskNext); + + /// + /// + /// Set when current work location may be scrolled horizontally when moving left / right. This is generally + /// always true UNLESS within a column. + /// + /// + /// C++: + /// imgui_internal.h:2755 + ///
bool NavIsScrollPushableX + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + public ref bool NavIsScrollPushableX => ref Unsafe.AsRef(&_ptr->NavIsScrollPushableX); + + /// + /// + /// C++: + /// imgui_internal.h:2756 + ///
bool NavHideHighlightOneFrame + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + public ref bool NavHideHighlightOneFrame => ref Unsafe.AsRef(&_ptr->NavHideHighlightOneFrame); + + /// + /// + /// Set per window when scrolling can be used (== ScrollMax.y > 0.0f) + /// + /// + /// C++: + /// imgui_internal.h:2757 + ///
bool NavWindowHasScrollY + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad navigation + /// + /// + public ref bool NavWindowHasScrollY => ref Unsafe.AsRef(&_ptr->NavWindowHasScrollY); + + /// + /// + /// FIXME: Remove this + /// + /// + /// C++: + /// imgui_internal.h:2760 + ///
bool MenuBarAppending + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref bool MenuBarAppending => ref Unsafe.AsRef(&_ptr->MenuBarAppending); + + /// + /// + /// MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the + /// menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > + /// FramePadding.y), often used on TVs. + /// + /// + /// C++: + /// imgui_internal.h:2761 + ///
ImVec2 MenuBarOffset + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref float2 MenuBarOffset => ref Unsafe.AsRef(&_ptr->MenuBarOffset); + + /// + /// + /// Simplified columns storage for menu items measurement + /// + /// + /// C++: + /// imgui_internal.h:2762 + ///
ImGuiMenuColumns MenuColumns + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref ImGuiMenuColumns MenuColumns => ref Unsafe.AsRef(&_ptr->MenuColumns); + + /// + /// + /// Current tree depth. + /// + /// + /// C++: + /// imgui_internal.h:2763 + ///
int TreeDepth + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref int TreeDepth => ref Unsafe.AsRef(&_ptr->TreeDepth); + + /// + /// + /// Store whether given depth has ImGuiTreeNodeStackData data. Could be turned into a ImU64 if necessary. + /// + /// + /// C++: + /// imgui_internal.h:2764 + ///
ImU32 TreeHasStackDataDepthMask + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref uint TreeHasStackDataDepthMask => ref Unsafe.AsRef(&_ptr->TreeHasStackDataDepthMask); + + /// + /// + /// Store whether we should keep recording Y2. Cleared when passing clip max. Equivalent + /// TreeHasStackDataDepthMask value should always be set. + /// + /// + /// C++: + /// imgui_internal.h:2765 + ///
ImU32 TreeRecordsClippedNodesY2Mask + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref uint TreeRecordsClippedNodesY2Mask => ref Unsafe.AsRef(&_ptr->TreeRecordsClippedNodesY2Mask); + + /// + /// + /// C++: + /// imgui_internal.h:2766 + ///
ImVector<ImGuiWindow*> ChildWindows + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref ImVector ChildWindows => + ref Unsafe.AsRef>(&_ptr->ChildWindows); + + /// + /// + /// Current persistent per-window storage (store e.g. tree node open/close state) + /// + /// + /// C++: + /// imgui_internal.h:2767 + ///
ImGuiStorage* StateStorage + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref ImGuiStoragePtr StateStorage => ref Unsafe.AsRef(&_ptr->StateStorage); + + /// + /// + /// Current columns set + /// + /// + /// C++: + /// imgui_internal.h:2768 + ///
ImGuiOldColumns* CurrentColumns + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref ImGuiOldColumnsPtr CurrentColumns => ref Unsafe.AsRef(&_ptr->CurrentColumns); + + /// + /// + /// Current table index (into g.Tables) + /// + /// + /// C++: + /// imgui_internal.h:2769 + ///
int CurrentTableIdx + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref int CurrentTableIdx => ref Unsafe.AsRef(&_ptr->CurrentTableIdx); + + /// + /// + /// C++: + /// imgui_internal.h:2770 + ///
ImGuiLayoutType LayoutType + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref ImGuiLayoutType LayoutType => ref Unsafe.AsRef(&_ptr->LayoutType); + + /// + /// + /// Layout type of parent window at the time of Begin() + /// + /// + /// C++: + /// imgui_internal.h:2771 + ///
ImGuiLayoutType ParentLayoutType + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref ImGuiLayoutType ParentLayoutType => ref Unsafe.AsRef(&_ptr->ParentLayoutType); + + /// + /// + /// C++: + /// imgui_internal.h:2772 + ///
ImU32 ModalDimBgColor + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + public ref uint ModalDimBgColor => ref Unsafe.AsRef(&_ptr->ModalDimBgColor); + + /// + /// + /// C++: + /// imgui_internal.h:2775 + ///
ImGuiItemStatusFlags WindowItemStatusFlags + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + public ref ImGuiItemStatusFlags WindowItemStatusFlags => + ref Unsafe.AsRef(&_ptr->WindowItemStatusFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2776 + ///
ImGuiItemStatusFlags ChildItemStatusFlags + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + public ref ImGuiItemStatusFlags ChildItemStatusFlags => + ref Unsafe.AsRef(&_ptr->ChildItemStatusFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2777 + ///
ImGuiItemStatusFlags DockTabItemStatusFlags + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + public ref ImGuiItemStatusFlags DockTabItemStatusFlags => + ref Unsafe.AsRef(&_ptr->DockTabItemStatusFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2778 + ///
ImRect DockTabItemRect + ///
+ ///
+ /// + /// + /// Status flags + /// + /// + public ref floatRect DockTabItemRect => ref Unsafe.AsRef(&_ptr->DockTabItemRect); + + /// + /// + /// Current item width (>0.0: width in pixels, <0.0: align xx pixels to the right of window). + /// + /// + /// C++: + /// imgui_internal.h:2782 + ///
float ItemWidth + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + public ref float ItemWidth => ref Unsafe.AsRef(&_ptr->ItemWidth); + + /// + /// + /// Current text wrap pos. + /// + /// + /// C++: + /// imgui_internal.h:2783 + ///
float TextWrapPos + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + public ref float TextWrapPos => ref Unsafe.AsRef(&_ptr->TextWrapPos); + + /// + /// + /// Store item widths to restore (attention: .back() is not == ItemWidth) + /// + /// + /// C++: + /// imgui_internal.h:2784 + ///
ImVector<float> ItemWidthStack + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + public ref ImVector ItemWidthStack => ref Unsafe.AsRef>(&_ptr->ItemWidthStack); + + /// + /// + /// Store text wrap pos to restore (attention: .back() is not == TextWrapPos) + /// + /// + /// C++: + /// imgui_internal.h:2785 + ///
ImVector<float> TextWrapPosStack + ///
+ ///
+ /// + /// + /// Local parameters stacks + /// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + /// + /// + public ref ImVector TextWrapPosStack => ref Unsafe.AsRef>(&_ptr->TextWrapPosStack); + } +} diff --git a/Brutal.ImGui/Generated-Internal/Structs/stbrp_context_opaque.gen.cs b/Brutal.ImGui/Generated-Internal/Structs/stbrp_context_opaque.gen.cs new file mode 100644 index 0000000..7681976 --- /dev/null +++ b/Brutal.ImGui/Generated-Internal/Structs/stbrp_context_opaque.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.Internal +{ + /// + /// + /// C++: + /// imgui_internal.h:4076 + ///
struct stbrp_context_opaque { char data[80]; } + ///
+ ///
+ /// + /// + /// We avoid dragging imstb_rectpack.h into public header (partly because binding generators are having issues + /// with it) + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct stbrp_context_opaque + { + [FieldOffset(0)] + public fixed byte data[80]; + } + + /// + /// + /// C++: + /// imgui_internal.h:4076 + ///
struct stbrp_context_opaque { char data[80]; } + ///
+ ///
+ /// + /// + /// We avoid dragging imstb_rectpack.h into public header (partly because binding generators are having issues + /// with it) + /// + /// + public unsafe partial struct stbrp_context_opaquePtr(stbrp_context_opaque* ptr) : INullable + { + private stbrp_context_opaque* _ptr = ptr; + public stbrp_context_opaque* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator stbrp_context_opaquePtr(stbrp_context_opaque* ptr) => new(ptr); + + public static implicit operator stbrp_context_opaque*(stbrp_context_opaquePtr wrapper) => wrapper.Ptr; + + public Span data => MemoryMarshal.CreateSpan(ref _ptr->data[0], 80); + } +} diff --git a/Brutal.ImGui/Generated/Delegates/ImDrawCallback.gen.cs b/Brutal.ImGui/Generated/Delegates/ImDrawCallback.gen.cs new file mode 100644 index 0000000..4cb0dde --- /dev/null +++ b/Brutal.ImGui/Generated/Delegates/ImDrawCallback.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3221 + ///
typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd) + ///
+ ///
+ /// + /// + /// ImDrawCallback: Draw callbacks for advanced uses [configurable type: override in imconfig.h] + /// NB: You most likely do NOT need to use draw callbacks just to create your own widget or customized UI rendering, + /// you can poke into the draw list for that! Draw callback may be useful for example to: + /// A) Change your GPU render state, + /// B) render a complex 3D scene inside a UI element without an intermediate texture/render target, etc. + /// The expected behavior from your rendering function is 'if (cmd.UserCallback != NULL) { cmd.UserCallback(parent_list, cmd); } else { RenderTriangles() }' + /// If you want to override the signature of ImDrawCallback, you can simply use e.g. '#define ImDrawCallback MyDrawCallback' (in imconfig.h) + update rendering backend accordingly. + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void ImDrawCallback(ImDrawList* parent_list, ImDrawCmd* cmd); +} diff --git a/Brutal.ImGui/Generated/Delegates/ImGuiInputTextCallback.gen.cs b/Brutal.ImGui/Generated/Delegates/ImGuiInputTextCallback.gen.cs new file mode 100644 index 0000000..206252c --- /dev/null +++ b/Brutal.ImGui/Generated/Delegates/ImGuiInputTextCallback.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Callback function for ImGui::InputText() + /// + /// + /// C++: + /// imgui.h:290 + ///
typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data) + ///
+ ///
+ /// + /// + /// Callback and functions types + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int ImGuiInputTextCallback(ImGuiInputTextCallbackData* data); +} diff --git a/Brutal.ImGui/Generated/Delegates/ImGuiMemAllocFunc.gen.cs b/Brutal.ImGui/Generated/Delegates/ImGuiMemAllocFunc.gen.cs new file mode 100644 index 0000000..795f3f2 --- /dev/null +++ b/Brutal.ImGui/Generated/Delegates/ImGuiMemAllocFunc.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Function signature for ImGui::SetAllocatorFunctions() + /// + /// + /// C++: + /// imgui.h:292 + ///
typedef void* (*ImGuiMemAllocFunc)(size_t sz, void* user_data) + ///
+ ///
+ /// + /// + /// Callback and functions types + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* ImGuiMemAllocFunc(nuint sz, void* user_data); +} diff --git a/Brutal.ImGui/Generated/Delegates/ImGuiMemFreeFunc.gen.cs b/Brutal.ImGui/Generated/Delegates/ImGuiMemFreeFunc.gen.cs new file mode 100644 index 0000000..d4fabba --- /dev/null +++ b/Brutal.ImGui/Generated/Delegates/ImGuiMemFreeFunc.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Function signature for ImGui::SetAllocatorFunctions() + /// + /// + /// C++: + /// imgui.h:293 + ///
typedef void (*ImGuiMemFreeFunc)(void* ptr, void* user_data) + ///
+ ///
+ /// + /// + /// Callback and functions types + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void ImGuiMemFreeFunc(void* ptr, void* user_data); +} diff --git a/Brutal.ImGui/Generated/Delegates/ImGuiSizeCallback.gen.cs b/Brutal.ImGui/Generated/Delegates/ImGuiSizeCallback.gen.cs new file mode 100644 index 0000000..76fbccc --- /dev/null +++ b/Brutal.ImGui/Generated/Delegates/ImGuiSizeCallback.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Callback function for ImGui::SetNextWindowSizeConstraints() + /// + /// + /// C++: + /// imgui.h:291 + ///
typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data) + ///
+ ///
+ /// + /// + /// Callback and functions types + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void ImGuiSizeCallback(ImGuiSizeCallbackData* data); +} diff --git a/Brutal.ImGui/Generated/Enums/ImDrawFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImDrawFlags.gen.cs new file mode 100644 index 0000000..663b874 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImDrawFlags.gen.cs @@ -0,0 +1,265 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3304 + ///
enum ImDrawFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + [Flags] + public enum ImDrawFlags : int + { + /// + /// + /// C++: + /// imgui.h:3306 + ///
ImDrawFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + None = 0, + + /// + /// + /// PathStroke(), AddPolyline(): specify that shape should be closed (Important: this is always == 1 for + /// legacy reason) + /// + /// + /// C++: + /// imgui.h:3307 + ///
ImDrawFlags_Closed = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + Closed = 1 << 0, + + /// + /// + /// AddRect(), AddRectFilled(), PathRect(): enable rounding top-left corner only (when rounding > 0.0f, + /// we default to all corners). Was 0x01. + /// + /// + /// C++: + /// imgui.h:3308 + ///
ImDrawFlags_RoundCornersTopLeft = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersTopLeft = 1 << 4, + + /// + /// + /// AddRect(), AddRectFilled(), PathRect(): enable rounding top-right corner only (when rounding > 0.0f, + /// we default to all corners). Was 0x02. + /// + /// + /// C++: + /// imgui.h:3309 + ///
ImDrawFlags_RoundCornersTopRight = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersTopRight = 1 << 5, + + /// + /// + /// AddRect(), AddRectFilled(), PathRect(): enable rounding bottom-left corner only (when rounding > + /// 0.0f, we default to all corners). Was 0x04. + /// + /// + /// C++: + /// imgui.h:3310 + ///
ImDrawFlags_RoundCornersBottomLeft = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersBottomLeft = 1 << 6, + + /// + /// + /// AddRect(), AddRectFilled(), PathRect(): enable rounding bottom-right corner only (when rounding > + /// 0.0f, we default to all corners). Wax 0x08. + /// + /// + /// C++: + /// imgui.h:3311 + ///
ImDrawFlags_RoundCornersBottomRight = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersBottomRight = 1 << 7, + + /// + /// + /// AddRect(), AddRectFilled(), PathRect(): disable rounding on all corners (when rounding > 0.0f). This + /// is NOT zero, NOT an implicit flag! + /// + /// + /// C++: + /// imgui.h:3312 + ///
ImDrawFlags_RoundCornersNone = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersNone = 1 << 8, + + /// + /// + /// C++: + /// imgui.h:3313 + ///
+ /// ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersTop = RoundCornersTopLeft | RoundCornersTopRight, + + /// + /// + /// C++: + /// imgui.h:3314 + ///
+ /// ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersBottom = RoundCornersBottomLeft | RoundCornersBottomRight, + + /// + /// + /// C++: + /// imgui.h:3315 + ///
+ /// ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersLeft = RoundCornersBottomLeft | RoundCornersTopLeft, + + /// + /// + /// C++: + /// imgui.h:3316 + ///
+ /// ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersRight = RoundCornersBottomRight | RoundCornersTopRight, + + /// + /// + /// C++: + /// imgui.h:3317 + ///
+ /// ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersAll = RoundCornersTopLeft | RoundCornersTopRight | RoundCornersBottomLeft | RoundCornersBottomRight, + + /// + /// + /// Default to ALL corners if none of the _RoundCornersXX flags are specified. + /// + /// + /// C++: + /// imgui.h:3318 + ///
ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersDefault = RoundCornersAll, + + /// + /// + /// C++: + /// imgui.h:3319 + ///
ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone + ///
+ ///
+ /// + /// + /// Flags for ImDrawList functions + /// (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused) + /// + /// + RoundCornersMask = RoundCornersAll | RoundCornersNone, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImDrawListFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImDrawListFlags.gen.cs new file mode 100644 index 0000000..d23bd56 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImDrawListFlags.gen.cs @@ -0,0 +1,113 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3324 + ///
enum ImDrawListFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly. + /// It is however possible to temporarily alter flags between calls to ImDrawList:: functions. + /// + /// + [Flags] + public enum ImDrawListFlags : int + { + /// + /// + /// C++: + /// imgui.h:3326 + ///
ImDrawListFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly. + /// It is however possible to temporarily alter flags between calls to ImDrawList:: functions. + /// + /// + None = 0, + + /// + /// + /// Enable anti-aliased lines/borders (*2 the number of triangles for 1.0f wide line or lines thin enough to + /// be drawn using textures, otherwise *3 the number of triangles) + /// + /// + /// C++: + /// imgui.h:3327 + ///
ImDrawListFlags_AntiAliasedLines = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly. + /// It is however possible to temporarily alter flags between calls to ImDrawList:: functions. + /// + /// + AntiAliasedLines = 1 << 0, + + /// + /// + /// Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear + /// filtering (NOT point/nearest filtering). + /// + /// + /// C++: + /// imgui.h:3328 + ///
ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly. + /// It is however possible to temporarily alter flags between calls to ImDrawList:: functions. + /// + /// + AntiAliasedLinesUseTex = 1 << 1, + + /// + /// + /// Enable anti-aliased edge around filled shapes (rounded rectangles, circles). + /// + /// + /// C++: + /// imgui.h:3329 + ///
ImDrawListFlags_AntiAliasedFill = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly. + /// It is however possible to temporarily alter flags between calls to ImDrawList:: functions. + /// + /// + AntiAliasedFill = 1 << 2, + + /// + /// + /// Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is + /// enabled. + /// + /// + /// C++: + /// imgui.h:3330 + ///
ImDrawListFlags_AllowVtxOffset = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly. + /// It is however possible to temporarily alter flags between calls to ImDrawList:: functions. + /// + /// + AllowVtxOffset = 1 << 3, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImFontAtlasFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImFontAtlasFlags.gen.cs new file mode 100644 index 0000000..7c127b8 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImFontAtlasFlags.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3695 + ///
enum ImFontAtlasFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImFontAtlas build + /// + /// + [Flags] + public enum ImFontAtlasFlags : int + { + /// + /// + /// C++: + /// imgui.h:3697 + ///
ImFontAtlasFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImFontAtlas build + /// + /// + None = 0, + + /// + /// + /// Don't round the height to next power of two + /// + /// + /// C++: + /// imgui.h:3698 + ///
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImFontAtlas build + /// + /// + NoPowerOfTwoHeight = 1 << 0, + + /// + /// + /// Don't build software mouse cursors into the atlas (save a little texture memory) + /// + /// + /// C++: + /// imgui.h:3699 + ///
ImFontAtlasFlags_NoMouseCursors = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImFontAtlas build + /// + /// + NoMouseCursors = 1 << 1, + + /// + /// + /// Don't build thick line textures into the atlas (save a little texture memory, allow support for + /// point/nearest filtering). The AntiAliasedLinesUseTex features uses them, otherwise they will be rendered + /// using polygons (more expensive for CPU/GPU). + /// + /// + /// C++: + /// imgui.h:3700 + ///
ImFontAtlasFlags_NoBakedLines = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImFontAtlas build + /// + /// + NoBakedLines = 1 << 2, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImFontFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImFontFlags.gen.cs new file mode 100644 index 0000000..ccdbfa7 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImFontFlags.gen.cs @@ -0,0 +1,95 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3906 + ///
enum ImFontFlags_ + ///
+ ///
+ /// + /// + /// Font flags + /// (in future versions as we redesign font loading API, this will become more important and better documented. for now please consider this as internal/advanced use) + /// + /// + [Flags] + public enum ImFontFlags : int + { + /// + /// + /// C++: + /// imgui.h:3908 + ///
ImFontFlags_None = 0 + ///
+ ///
+ /// + /// + /// Font flags + /// (in future versions as we redesign font loading API, this will become more important and better documented. for now please consider this as internal/advanced use) + /// + /// + None = 0, + + /// + /// + /// Disable throwing an error/assert when calling AddFontXXX() with missing file/data. Calling code is + /// expected to check AddFontXXX() return value. + /// + /// + /// C++: + /// imgui.h:3909 + ///
ImFontFlags_NoLoadError = 1 << 1 + ///
+ ///
+ /// + /// + /// Font flags + /// (in future versions as we redesign font loading API, this will become more important and better documented. for now please consider this as internal/advanced use) + /// + /// + NoLoadError = 1 << 1, + + /// + /// + /// [Internal] Disable loading new glyphs. + /// + /// + /// C++: + /// imgui.h:3910 + ///
ImFontFlags_NoLoadGlyphs = 1 << 2 + ///
+ ///
+ /// + /// + /// Font flags + /// (in future versions as we redesign font loading API, this will become more important and better documented. for now please consider this as internal/advanced use) + /// + /// + NoLoadGlyphs = 1 << 2, + + /// + /// + /// [Internal] Disable loading new baked sizes, disable garbage collecting current ones. e.g. if you want to + /// lock a font to a single size. Important: if you use this to preload given sizes, consider the + /// possibility of multiple font density used on Retina display. + /// + /// + /// C++: + /// imgui.h:3911 + ///
ImFontFlags_LockBakedSizes = 1 << 3 + ///
+ ///
+ /// + /// + /// Font flags + /// (in future versions as we redesign font loading API, this will become more important and better documented. for now please consider this as internal/advanced use) + /// + /// + LockBakedSizes = 1 << 3, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiBackendFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiBackendFlags.gen.cs new file mode 100644 index 0000000..dd8268a --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiBackendFlags.gen.cs @@ -0,0 +1,180 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1772 + ///
enum ImGuiBackendFlags_ + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + [Flags] + public enum ImGuiBackendFlags : int + { + /// + /// + /// C++: + /// imgui.h:1774 + ///
ImGuiBackendFlags_None = 0 + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + None = 0, + + /// + /// + /// Backend Platform supports gamepad and currently has one connected. + /// + /// + /// C++: + /// imgui.h:1775 + ///
ImGuiBackendFlags_HasGamepad = 1 << 0 + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + HasGamepad = 1 << 0, + + /// + /// + /// Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape. + /// + /// + /// C++: + /// imgui.h:1776 + ///
ImGuiBackendFlags_HasMouseCursors = 1 << 1 + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + HasMouseCursors = 1 << 1, + + /// + /// + /// Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if + /// io.ConfigNavMoveSetMousePos is set). + /// + /// + /// C++: + /// imgui.h:1777 + ///
ImGuiBackendFlags_HasSetMousePos = 1 << 2 + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + HasSetMousePos = 1 << 2, + + /// + /// + /// Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) + /// while still using 16-bit indices. + /// + /// + /// C++: + /// imgui.h:1778 + ///
ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3 + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + RendererHasVtxOffset = 1 << 3, + + /// + /// + /// Backend Renderer supports ImTextureData requests to create/update/destroy textures. This enables + /// incremental texture updates and texture reloads. See + /// https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md for instructions on how to upgrade your + /// custom backend. + /// + /// + /// C++: + /// imgui.h:1779 + ///
ImGuiBackendFlags_RendererHasTextures = 1 << 4 + ///
+ ///
+ /// + /// + /// Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend. + /// + /// + RendererHasTextures = 1 << 4, + + /// + /// + /// Backend Platform supports multiple viewports. + /// + /// + /// C++: + /// imgui.h:1782 + ///
ImGuiBackendFlags_PlatformHasViewports = 1 << 10 + ///
+ ///
+ /// + /// + /// [BETA] Viewports + /// + /// + PlatformHasViewports = 1 << 10, + + /// + /// + /// Backend Platform supports calling io.AddMouseViewportEvent() with the viewport under the mouse. IF + /// POSSIBLE, ignore viewports with the ImGuiViewportFlags_NoInputs flag (Win32 backend, GLFW 3.30+ backend + /// can do this, SDL backend cannot). If this cannot be done, Dear ImGui needs to use a flawed heuristic to + /// find the viewport under. + /// + /// + /// C++: + /// imgui.h:1783 + ///
ImGuiBackendFlags_HasMouseHoveredViewport=1 << 11 + ///
+ ///
+ /// + /// + /// [BETA] Viewports + /// + /// + HasMouseHoveredViewport = 1 << 11, + + /// + /// + /// Backend Renderer supports multiple viewports. + /// + /// + /// C++: + /// imgui.h:1784 + ///
ImGuiBackendFlags_RendererHasViewports = 1 << 12 + ///
+ ///
+ /// + /// + /// [BETA] Viewports + /// + /// + RendererHasViewports = 1 << 12, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiButtonFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiButtonFlags.gen.cs new file mode 100644 index 0000000..12b3efb --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiButtonFlags.gen.cs @@ -0,0 +1,122 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1914 + ///
enum ImGuiButtonFlags_ + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + [Flags] + public enum ImGuiButtonFlags : int + { + /// + /// + /// C++: + /// imgui.h:1916 + ///
ImGuiButtonFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + None = 0, + + /// + /// + /// React on left mouse button (default) + /// + /// + /// C++: + /// imgui.h:1917 + ///
ImGuiButtonFlags_MouseButtonLeft = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonLeft = 1 << 0, + + /// + /// + /// React on right mouse button + /// + /// + /// C++: + /// imgui.h:1918 + ///
ImGuiButtonFlags_MouseButtonRight = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonRight = 1 << 1, + + /// + /// + /// React on center mouse button + /// + /// + /// C++: + /// imgui.h:1919 + ///
ImGuiButtonFlags_MouseButtonMiddle = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonMiddle = 1 << 2, + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:1920 + ///
+ /// ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + MouseButtonMask = MouseButtonLeft | MouseButtonRight | MouseButtonMiddle, + + /// + /// + /// InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default. + /// + /// + /// C++: + /// imgui.h:1921 + ///
ImGuiButtonFlags_EnableNav = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for InvisibleButton() [extended in imgui_internal.h] + /// + /// + EnableNav = 1 << 3, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiChildFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiChildFlags.gen.cs new file mode 100644 index 0000000..3f545e8 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiChildFlags.gen.cs @@ -0,0 +1,283 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1239 + ///
enum ImGuiChildFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + [Flags] + public enum ImGuiChildFlags : int + { + /// + /// + /// C++: + /// imgui.h:1241 + ///
ImGuiChildFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + None = 0, + + /// + /// + /// Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy + /// reason) + /// + /// + /// C++: + /// imgui.h:1242 + ///
ImGuiChildFlags_Borders = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + Borders = 1 << 0, + + /// + /// + /// Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child + /// windows because it makes more sense) + /// + /// + /// C++: + /// imgui.h:1243 + ///
ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + AlwaysUseWindowPadding = 1 << 1, + + /// + /// + /// Allow resize from right border (layout direction). Enable .ini saving (unless + /// ImGuiWindowFlags_NoSavedSettings passed to window flags) + /// + /// + /// C++: + /// imgui.h:1244 + ///
ImGuiChildFlags_ResizeX = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + ResizeX = 1 << 2, + + /// + /// + /// Allow resize from bottom border (layout direction). " + /// + /// + /// C++: + /// imgui.h:1245 + ///
ImGuiChildFlags_ResizeY = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + ResizeY = 1 << 3, + + /// + /// + /// Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above. + /// + /// + /// C++: + /// imgui.h:1246 + ///
ImGuiChildFlags_AutoResizeX = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + AutoResizeX = 1 << 4, + + /// + /// + /// Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above. + /// + /// + /// C++: + /// imgui.h:1247 + ///
ImGuiChildFlags_AutoResizeY = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + AutoResizeY = 1 << 5, + + /// + /// + /// Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return + /// true, always disable clipping optimization! NOT RECOMMENDED. + /// + /// + /// C++: + /// imgui.h:1248 + ///
ImGuiChildFlags_AlwaysAutoResize = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + AlwaysAutoResize = 1 << 6, + + /// + /// + /// Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding + /// instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding. + /// + /// + /// C++: + /// imgui.h:1249 + ///
ImGuiChildFlags_FrameStyle = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + FrameStyle = 1 << 7, + + /// + /// + /// [BETA] Share focus scope, allow keyboard/gamepad navigation to cross over parent border to this child or + /// between sibling child windows. + /// + /// + /// C++: + /// imgui.h:1250 + ///
ImGuiChildFlags_NavFlattened = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginChild() + /// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'. + /// About using AutoResizeX/AutoResizeY flags: + /// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). + /// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. + /// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. + /// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. + /// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. + /// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. + /// + /// + NavFlattened = 1 << 8, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiCol.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiCol.gen.cs new file mode 100644 index 0000000..8912015 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiCol.gen.cs @@ -0,0 +1,974 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1788 + ///
enum ImGuiCol_ + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + public enum ImGuiCol : int + { + /// + /// + /// C++: + /// imgui.h:1790 + ///
ImGuiCol_Text + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + Text, + + /// + /// + /// C++: + /// imgui.h:1791 + ///
ImGuiCol_TextDisabled + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TextDisabled, + + /// + /// + /// Background of normal windows + /// + /// + /// C++: + /// imgui.h:1792 + ///
ImGuiCol_WindowBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + WindowBg, + + /// + /// + /// Background of child windows + /// + /// + /// C++: + /// imgui.h:1793 + ///
ImGuiCol_ChildBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ChildBg, + + /// + /// + /// Background of popups, menus, tooltips windows + /// + /// + /// C++: + /// imgui.h:1794 + ///
ImGuiCol_PopupBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + PopupBg, + + /// + /// + /// C++: + /// imgui.h:1795 + ///
ImGuiCol_Border + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + Border, + + /// + /// + /// C++: + /// imgui.h:1796 + ///
ImGuiCol_BorderShadow + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + BorderShadow, + + /// + /// + /// Background of checkbox, radio button, plot, slider, text input + /// + /// + /// C++: + /// imgui.h:1797 + ///
ImGuiCol_FrameBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + FrameBg, + + /// + /// + /// C++: + /// imgui.h:1798 + ///
ImGuiCol_FrameBgHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + FrameBgHovered, + + /// + /// + /// C++: + /// imgui.h:1799 + ///
ImGuiCol_FrameBgActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + FrameBgActive, + + /// + /// + /// Title bar + /// + /// + /// C++: + /// imgui.h:1800 + ///
ImGuiCol_TitleBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TitleBg, + + /// + /// + /// Title bar when focused + /// + /// + /// C++: + /// imgui.h:1801 + ///
ImGuiCol_TitleBgActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TitleBgActive, + + /// + /// + /// Title bar when collapsed + /// + /// + /// C++: + /// imgui.h:1802 + ///
ImGuiCol_TitleBgCollapsed + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TitleBgCollapsed, + + /// + /// + /// C++: + /// imgui.h:1803 + ///
ImGuiCol_MenuBarBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + MenuBarBg, + + /// + /// + /// C++: + /// imgui.h:1804 + ///
ImGuiCol_ScrollbarBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ScrollbarBg, + + /// + /// + /// C++: + /// imgui.h:1805 + ///
ImGuiCol_ScrollbarGrab + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ScrollbarGrab, + + /// + /// + /// C++: + /// imgui.h:1806 + ///
ImGuiCol_ScrollbarGrabHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ScrollbarGrabHovered, + + /// + /// + /// C++: + /// imgui.h:1807 + ///
ImGuiCol_ScrollbarGrabActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ScrollbarGrabActive, + + /// + /// + /// Checkbox tick and RadioButton circle + /// + /// + /// C++: + /// imgui.h:1808 + ///
ImGuiCol_CheckMark + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + CheckMark, + + /// + /// + /// C++: + /// imgui.h:1809 + ///
ImGuiCol_SliderGrab + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + SliderGrab, + + /// + /// + /// C++: + /// imgui.h:1810 + ///
ImGuiCol_SliderGrabActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + SliderGrabActive, + + /// + /// + /// C++: + /// imgui.h:1811 + ///
ImGuiCol_Button + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + Button, + + /// + /// + /// C++: + /// imgui.h:1812 + ///
ImGuiCol_ButtonHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ButtonHovered, + + /// + /// + /// C++: + /// imgui.h:1813 + ///
ImGuiCol_ButtonActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ButtonActive, + + /// + /// + /// Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem + /// + /// + /// C++: + /// imgui.h:1814 + ///
ImGuiCol_Header + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + Header, + + /// + /// + /// C++: + /// imgui.h:1815 + ///
ImGuiCol_HeaderHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + HeaderHovered, + + /// + /// + /// C++: + /// imgui.h:1816 + ///
ImGuiCol_HeaderActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + HeaderActive, + + /// + /// + /// C++: + /// imgui.h:1817 + ///
ImGuiCol_Separator + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + Separator, + + /// + /// + /// C++: + /// imgui.h:1818 + ///
ImGuiCol_SeparatorHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + SeparatorHovered, + + /// + /// + /// C++: + /// imgui.h:1819 + ///
ImGuiCol_SeparatorActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + SeparatorActive, + + /// + /// + /// Resize grip in lower-right and lower-left corners of windows. + /// + /// + /// C++: + /// imgui.h:1820 + ///
ImGuiCol_ResizeGrip + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ResizeGrip, + + /// + /// + /// C++: + /// imgui.h:1821 + ///
ImGuiCol_ResizeGripHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ResizeGripHovered, + + /// + /// + /// C++: + /// imgui.h:1822 + ///
ImGuiCol_ResizeGripActive + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ResizeGripActive, + + /// + /// + /// InputText cursor/caret + /// + /// + /// C++: + /// imgui.h:1823 + ///
ImGuiCol_InputTextCursor + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + InputTextCursor, + + /// + /// + /// Tab background, when hovered + /// + /// + /// C++: + /// imgui.h:1824 + ///
ImGuiCol_TabHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TabHovered, + + /// + /// + /// Tab background, when tab-bar is focused & tab is unselected + /// + /// + /// C++: + /// imgui.h:1825 + ///
ImGuiCol_Tab + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + Tab, + + /// + /// + /// Tab background, when tab-bar is focused & tab is selected + /// + /// + /// C++: + /// imgui.h:1826 + ///
ImGuiCol_TabSelected + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TabSelected, + + /// + /// + /// Tab horizontal overline, when tab-bar is focused & tab is selected + /// + /// + /// C++: + /// imgui.h:1827 + ///
ImGuiCol_TabSelectedOverline + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TabSelectedOverline, + + /// + /// + /// Tab background, when tab-bar is unfocused & tab is unselected + /// + /// + /// C++: + /// imgui.h:1828 + ///
ImGuiCol_TabDimmed + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TabDimmed, + + /// + /// + /// Tab background, when tab-bar is unfocused & tab is selected + /// + /// + /// C++: + /// imgui.h:1829 + ///
ImGuiCol_TabDimmedSelected + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TabDimmedSelected, + + /// + /// + /// ..horizontal overline, when tab-bar is unfocused & tab is selected + /// + /// + /// C++: + /// imgui.h:1830 + ///
ImGuiCol_TabDimmedSelectedOverline + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TabDimmedSelectedOverline, + + /// + /// + /// Preview overlay color when about to docking something + /// + /// + /// C++: + /// imgui.h:1831 + ///
ImGuiCol_DockingPreview + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + DockingPreview, + + /// + /// + /// Background color for empty node (e.g. CentralNode with no window docked into it) + /// + /// + /// C++: + /// imgui.h:1832 + ///
ImGuiCol_DockingEmptyBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + DockingEmptyBg, + + /// + /// + /// C++: + /// imgui.h:1833 + ///
ImGuiCol_PlotLines + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + PlotLines, + + /// + /// + /// C++: + /// imgui.h:1834 + ///
ImGuiCol_PlotLinesHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + PlotLinesHovered, + + /// + /// + /// C++: + /// imgui.h:1835 + ///
ImGuiCol_PlotHistogram + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + PlotHistogram, + + /// + /// + /// C++: + /// imgui.h:1836 + ///
ImGuiCol_PlotHistogramHovered + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + PlotHistogramHovered, + + /// + /// + /// Table header background + /// + /// + /// C++: + /// imgui.h:1837 + ///
ImGuiCol_TableHeaderBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TableHeaderBg, + + /// + /// + /// Table outer and header borders (prefer using Alpha=1.0 here) + /// + /// + /// C++: + /// imgui.h:1838 + ///
ImGuiCol_TableBorderStrong + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TableBorderStrong, + + /// + /// + /// Table inner borders (prefer using Alpha=1.0 here) + /// + /// + /// C++: + /// imgui.h:1839 + ///
ImGuiCol_TableBorderLight + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TableBorderLight, + + /// + /// + /// Table row background (even rows) + /// + /// + /// C++: + /// imgui.h:1840 + ///
ImGuiCol_TableRowBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TableRowBg, + + /// + /// + /// Table row background (odd rows) + /// + /// + /// C++: + /// imgui.h:1841 + ///
ImGuiCol_TableRowBgAlt + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TableRowBgAlt, + + /// + /// + /// Hyperlink color + /// + /// + /// C++: + /// imgui.h:1842 + ///
ImGuiCol_TextLink + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TextLink, + + /// + /// + /// Selected text inside an InputText + /// + /// + /// C++: + /// imgui.h:1843 + ///
ImGuiCol_TextSelectedBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TextSelectedBg, + + /// + /// + /// Tree node hierarchy outlines when using ImGuiTreeNodeFlags_DrawLines + /// + /// + /// C++: + /// imgui.h:1844 + ///
ImGuiCol_TreeLines + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + TreeLines, + + /// + /// + /// Rectangle highlighting a drop target + /// + /// + /// C++: + /// imgui.h:1845 + ///
ImGuiCol_DragDropTarget + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + DragDropTarget, + + /// + /// + /// Color of keyboard/gamepad navigation cursor/rectangle, when visible + /// + /// + /// C++: + /// imgui.h:1846 + ///
ImGuiCol_NavCursor + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + NavCursor, + + /// + /// + /// Highlight window when using CTRL+TAB + /// + /// + /// C++: + /// imgui.h:1847 + ///
ImGuiCol_NavWindowingHighlight + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + NavWindowingHighlight, + + /// + /// + /// Darken/colorize entire screen behind the CTRL+TAB window list, when active + /// + /// + /// C++: + /// imgui.h:1848 + ///
ImGuiCol_NavWindowingDimBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + NavWindowingDimBg, + + /// + /// + /// Darken/colorize entire screen behind a modal window, when one is active + /// + /// + /// C++: + /// imgui.h:1849 + ///
ImGuiCol_ModalWindowDimBg + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + ModalWindowDimBg, + + /// + /// + /// C++: + /// imgui.h:1850 + ///
ImGuiCol_COUNT + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleColor() / PopStyleColor() + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiColorEditFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiColorEditFlags.gen.cs new file mode 100644 index 0000000..384396b --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiColorEditFlags.gen.cs @@ -0,0 +1,552 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1925 + ///
enum ImGuiColorEditFlags_ + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + [Flags] + public enum ImGuiColorEditFlags : int + { + /// + /// + /// C++: + /// imgui.h:1927 + ///
ImGuiColorEditFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + None = 0, + + /// + /// + /// // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the + /// input pointer). + /// + /// + /// C++: + /// imgui.h:1928 + ///
ImGuiColorEditFlags_NoAlpha = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoAlpha = 1 << 1, + + /// + /// + /// // ColorEdit: disable picker when clicking on color square. + /// + /// + /// C++: + /// imgui.h:1929 + ///
ImGuiColorEditFlags_NoPicker = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoPicker = 1 << 2, + + /// + /// + /// // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview. + /// + /// + /// C++: + /// imgui.h:1930 + ///
ImGuiColorEditFlags_NoOptions = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoOptions = 1 << 3, + + /// + /// + /// // ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the + /// inputs) + /// + /// + /// C++: + /// imgui.h:1931 + ///
ImGuiColorEditFlags_NoSmallPreview = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoSmallPreview = 1 << 4, + + /// + /// + /// // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview + /// color square). + /// + /// + /// C++: + /// imgui.h:1932 + ///
ImGuiColorEditFlags_NoInputs = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoInputs = 1 << 5, + + /// + /// + /// // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview. + /// + /// + /// C++: + /// imgui.h:1933 + ///
ImGuiColorEditFlags_NoTooltip = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoTooltip = 1 << 6, + + /// + /// + /// // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the + /// tooltip and picker). + /// + /// + /// C++: + /// imgui.h:1934 + ///
ImGuiColorEditFlags_NoLabel = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoLabel = 1 << 7, + + /// + /// + /// // ColorPicker: disable bigger color preview on right side of the picker, use small color square preview + /// instead. + /// + /// + /// C++: + /// imgui.h:1935 + ///
ImGuiColorEditFlags_NoSidePreview = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoSidePreview = 1 << 8, + + /// + /// + /// // ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source. + /// + /// + /// C++: + /// imgui.h:1936 + ///
ImGuiColorEditFlags_NoDragDrop = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoDragDrop = 1 << 9, + + /// + /// + /// // ColorButton: disable border (which is enforced by default) + /// + /// + /// C++: + /// imgui.h:1937 + ///
ImGuiColorEditFlags_NoBorder = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() + /// + /// + NoBorder = 1 << 10, + + /// + /// + /// // ColorEdit, ColorPicker, ColorButton: disable alpha in the preview,. Contrary to _NoAlpha it may still + /// be edited when calling ColorEdit4()/ColorPicker4(). For ColorButton() this does the same as _NoAlpha. + /// + /// + /// C++: + /// imgui.h:1943 + ///
ImGuiColorEditFlags_AlphaOpaque = 1 << 11 + ///
+ ///
+ /// + /// + /// Alpha preview + /// - Prior to 1.91.8 (2025/01/21): alpha was made opaque in the preview by default using old name ImGuiColorEditFlags_AlphaPreview. + /// - We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior. + /// - The new flags may be combined better and allow finer controls. + /// + /// + AlphaOpaque = 1 << 11, + + /// + /// + /// // ColorEdit, ColorPicker, ColorButton: disable rendering a checkerboard background behind transparent + /// color. + /// + /// + /// C++: + /// imgui.h:1944 + ///
ImGuiColorEditFlags_AlphaNoBg = 1 << 12 + ///
+ ///
+ /// + /// + /// Alpha preview + /// - Prior to 1.91.8 (2025/01/21): alpha was made opaque in the preview by default using old name ImGuiColorEditFlags_AlphaPreview. + /// - We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior. + /// - The new flags may be combined better and allow finer controls. + /// + /// + AlphaNoBg = 1 << 12, + + /// + /// + /// // ColorEdit, ColorPicker, ColorButton: display half opaque / half transparent preview. + /// + /// + /// C++: + /// imgui.h:1945 + ///
ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 13 + ///
+ ///
+ /// + /// + /// Alpha preview + /// - Prior to 1.91.8 (2025/01/21): alpha was made opaque in the preview by default using old name ImGuiColorEditFlags_AlphaPreview. + /// - We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior. + /// - The new flags may be combined better and allow finer controls. + /// + /// + AlphaPreviewHalf = 1 << 13, + + /// + /// + /// // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker. + /// + /// + /// C++: + /// imgui.h:1948 + ///
ImGuiColorEditFlags_AlphaBar = 1 << 16 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + AlphaBar = 1 << 16, + + /// + /// + /// // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to + /// use ImGuiColorEditFlags_Float flag as well). + /// + /// + /// C++: + /// imgui.h:1949 + ///
ImGuiColorEditFlags_HDR = 1 << 19 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + HDR = 1 << 19, + + /// + /// + /// [Display] // ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any + /// combination using one or more of RGB/HSV/Hex. + /// + /// + /// C++: + /// imgui.h:1950 + ///
ImGuiColorEditFlags_DisplayRGB = 1 << 20 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + DisplayRGB = 1 << 20, + + /// + /// + /// [Display] // " + /// + /// + /// C++: + /// imgui.h:1951 + ///
ImGuiColorEditFlags_DisplayHSV = 1 << 21 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + DisplayHSV = 1 << 21, + + /// + /// + /// [Display] // " + /// + /// + /// C++: + /// imgui.h:1952 + ///
ImGuiColorEditFlags_DisplayHex = 1 << 22 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + DisplayHex = 1 << 22, + + /// + /// + /// [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255. + /// + /// + /// C++: + /// imgui.h:1953 + ///
ImGuiColorEditFlags_Uint8 = 1 << 23 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + Uint8 = 1 << 23, + + /// + /// + /// [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats + /// instead of 0..255 integers. No round-trip of value via integers. + /// + /// + /// C++: + /// imgui.h:1954 + ///
ImGuiColorEditFlags_Float = 1 << 24 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + Float = 1 << 24, + + /// + /// + /// [Picker] // ColorPicker: bar for Hue, rectangle for Sat/Value. + /// + /// + /// C++: + /// imgui.h:1955 + ///
ImGuiColorEditFlags_PickerHueBar = 1 << 25 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + PickerHueBar = 1 << 25, + + /// + /// + /// [Picker] // ColorPicker: wheel for Hue, triangle for Sat/Value. + /// + /// + /// C++: + /// imgui.h:1956 + ///
ImGuiColorEditFlags_PickerHueWheel = 1 << 26 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + PickerHueWheel = 1 << 26, + + /// + /// + /// [Input] // ColorEdit, ColorPicker: input and output data in RGB format. + /// + /// + /// C++: + /// imgui.h:1957 + ///
ImGuiColorEditFlags_InputRGB = 1 << 27 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + InputRGB = 1 << 27, + + /// + /// + /// [Input] // ColorEdit, ColorPicker: input and output data in HSV format. + /// + /// + /// C++: + /// imgui.h:1958 + ///
ImGuiColorEditFlags_InputHSV = 1 << 28 + ///
+ ///
+ /// + /// + /// User Options (right-click on widget to change some of them). + /// + /// + InputHSV = 1 << 28, + + /// + /// + /// C++: + /// imgui.h:1962 + ///
+ /// ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar + ///
+ ///
+ /// + /// + /// Defaults Options. You can set application defaults using SetColorEditOptions(). The intent is that you probably don't want to + /// override them in most of your calls. Let the user choose via the option menu and/or call SetColorEditOptions() once during startup. + /// + /// + DefaultOptions = Uint8 | DisplayRGB | InputRGB | PickerHueBar, + + /// + /// + /// C++: + /// imgui.h:1965 + ///
+ /// ImGuiColorEditFlags_AlphaMask_ = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaOpaque | ImGuiColorEditFlags_AlphaNoBg | ImGuiColorEditFlags_AlphaPreviewHalf + ///
+ ///
+ /// + /// + /// [Internal] Masks + /// + /// + AlphaMask = NoAlpha | AlphaOpaque | AlphaNoBg | AlphaPreviewHalf, + + /// + /// + /// C++: + /// imgui.h:1966 + ///
+ /// ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex + ///
+ ///
+ /// + /// + /// [Internal] Masks + /// + /// + DisplayMask = DisplayRGB | DisplayHSV | DisplayHex, + + /// + /// + /// C++: + /// imgui.h:1967 + ///
ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float + ///
+ ///
+ /// + /// + /// [Internal] Masks + /// + /// + DataTypeMask = Uint8 | Float, + + /// + /// + /// C++: + /// imgui.h:1968 + ///
+ /// ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar + ///
+ ///
+ /// + /// + /// [Internal] Masks + /// + /// + PickerMask = PickerHueWheel | PickerHueBar, + + /// + /// + /// C++: + /// imgui.h:1969 + ///
ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV + ///
+ ///
+ /// + /// + /// [Internal] Masks + /// + /// + InputMask = InputRGB | InputHSV, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiComboFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiComboFlags.gen.cs new file mode 100644 index 0000000..d1b5b75 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiComboFlags.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1394 + ///
enum ImGuiComboFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + [Flags] + public enum ImGuiComboFlags : int + { + /// + /// + /// C++: + /// imgui.h:1396 + ///
ImGuiComboFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + None = 0, + + /// + /// + /// Align the popup toward the left by default + /// + /// + /// C++: + /// imgui.h:1397 + ///
ImGuiComboFlags_PopupAlignLeft = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + PopupAlignLeft = 1 << 0, + + /// + /// + /// Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use + /// SetNextWindowSizeConstraints() prior to calling BeginCombo() + /// + /// + /// C++: + /// imgui.h:1398 + ///
ImGuiComboFlags_HeightSmall = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightSmall = 1 << 1, + + /// + /// + /// Max ~8 items visible (default) + /// + /// + /// C++: + /// imgui.h:1399 + ///
ImGuiComboFlags_HeightRegular = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightRegular = 1 << 2, + + /// + /// + /// Max ~20 items visible + /// + /// + /// C++: + /// imgui.h:1400 + ///
ImGuiComboFlags_HeightLarge = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightLarge = 1 << 3, + + /// + /// + /// As many fitting items as possible + /// + /// + /// C++: + /// imgui.h:1401 + ///
ImGuiComboFlags_HeightLargest = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightLargest = 1 << 4, + + /// + /// + /// Display on the preview box without the square arrow button + /// + /// + /// C++: + /// imgui.h:1402 + ///
ImGuiComboFlags_NoArrowButton = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + NoArrowButton = 1 << 5, + + /// + /// + /// Display only a square arrow button + /// + /// + /// C++: + /// imgui.h:1403 + ///
ImGuiComboFlags_NoPreview = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + NoPreview = 1 << 6, + + /// + /// + /// Width dynamically calculated from preview contents + /// + /// + /// C++: + /// imgui.h:1404 + ///
ImGuiComboFlags_WidthFitPreview = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + WidthFitPreview = 1 << 7, + + /// + /// + /// C++: + /// imgui.h:1405 + ///
+ /// ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginCombo() + /// + /// + HeightMask = HeightSmall | HeightRegular | HeightLarge | HeightLargest, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiCond.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiCond.gen.cs new file mode 100644 index 0000000..aade5a4 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiCond.gen.cs @@ -0,0 +1,118 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:2039 + ///
enum ImGuiCond_ + ///
+ ///
+ /// + /// + /// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions + /// Represent a condition. + /// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. + /// + /// + public enum ImGuiCond : int + { + /// + /// + /// No condition (always set the variable), same as _Always + /// + /// + /// C++: + /// imgui.h:2041 + ///
ImGuiCond_None = 0 + ///
+ ///
+ /// + /// + /// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions + /// Represent a condition. + /// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. + /// + /// + None = 0, + + /// + /// + /// No condition (always set the variable), same as _None + /// + /// + /// C++: + /// imgui.h:2042 + ///
ImGuiCond_Always = 1 << 0 + ///
+ ///
+ /// + /// + /// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions + /// Represent a condition. + /// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. + /// + /// + Always = 1 << 0, + + /// + /// + /// Set the variable once per runtime session (only the first call will succeed) + /// + /// + /// C++: + /// imgui.h:2043 + ///
ImGuiCond_Once = 1 << 1 + ///
+ ///
+ /// + /// + /// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions + /// Represent a condition. + /// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. + /// + /// + Once = 1 << 1, + + /// + /// + /// Set the variable if the object/window has no persistently saved data (no entry in .ini file) + /// + /// + /// C++: + /// imgui.h:2044 + ///
ImGuiCond_FirstUseEver = 1 << 2 + ///
+ ///
+ /// + /// + /// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions + /// Represent a condition. + /// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. + /// + /// + FirstUseEver = 1 << 2, + + /// + /// + /// Set the variable if the object/window is appearing after being hidden/inactive (or the first time) + /// + /// + /// C++: + /// imgui.h:2045 + ///
ImGuiCond_Appearing = 1 << 3 + ///
+ ///
+ /// + /// + /// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions + /// Represent a condition. + /// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. + /// + /// + Appearing = 1 << 3, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiConfigFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiConfigFlags.gen.cs new file mode 100644 index 0000000..c4a05c9 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiConfigFlags.gen.cs @@ -0,0 +1,197 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1743 + ///
enum ImGuiConfigFlags_ + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + [Flags] + public enum ImGuiConfigFlags : int + { + /// + /// + /// C++: + /// imgui.h:1745 + ///
ImGuiConfigFlags_None = 0 + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + None = 0, + + /// + /// + /// Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to + /// activate. + /// + /// + /// C++: + /// imgui.h:1746 + ///
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0 + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + NavEnableKeyboard = 1 << 0, + + /// + /// + /// Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad. + /// + /// + /// C++: + /// imgui.h:1747 + ///
ImGuiConfigFlags_NavEnableGamepad = 1 << 1 + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + NavEnableGamepad = 1 << 1, + + /// + /// + /// Instruct dear imgui to disable mouse inputs and interactions. + /// + /// + /// C++: + /// imgui.h:1748 + ///
ImGuiConfigFlags_NoMouse = 1 << 4 + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + NoMouse = 1 << 4, + + /// + /// + /// Instruct backend to not alter mouse cursor shape and visibility. Use if the backend cursor changes are + /// interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want + /// to honor requests from imgui by reading GetMouseCursor() yourself instead. + /// + /// + /// C++: + /// imgui.h:1749 + ///
ImGuiConfigFlags_NoMouseCursorChange = 1 << 5 + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + NoMouseCursorChange = 1 << 5, + + /// + /// + /// Instruct dear imgui to disable keyboard inputs and interactions. This is done by ignoring keyboard + /// events and clearing existing states. + /// + /// + /// C++: + /// imgui.h:1750 + ///
ImGuiConfigFlags_NoKeyboard = 1 << 6 + ///
+ ///
+ /// + /// + /// Configuration flags stored in io.ConfigFlags. Set by user/application. + /// + /// + NoKeyboard = 1 << 6, + + /// + /// + /// Docking enable flags. + /// + /// + /// C++: + /// imgui.h:1753 + ///
ImGuiConfigFlags_DockingEnable = 1 << 7 + ///
+ ///
+ /// + /// + /// [BETA] Docking + /// + /// + DockingEnable = 1 << 7, + + /// + /// + /// Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + + /// ImGuiBackendFlags_RendererHasViewports set by the respective backends) + /// + /// + /// C++: + /// imgui.h:1757 + ///
ImGuiConfigFlags_ViewportsEnable = 1 << 10 + ///
+ ///
+ /// + /// + /// [BETA] Viewports + /// When using viewports it is recommended that your default value for ImGuiCol_WindowBg is opaque (Alpha=1.0) so transition to a viewport won't be noticeable. + /// + /// + ViewportsEnable = 1 << 10, + + /// + /// + /// Application is SRGB-aware. + /// + /// + /// C++: + /// imgui.h:1760 + ///
ImGuiConfigFlags_IsSRGB = 1 << 20 + ///
+ ///
+ /// + /// + /// User storage (to allow your backend/engine to communicate to code that may be shared between multiple + /// projects. Those flags are NOT used by core Dear ImGui) + /// + /// + IsSRGB = 1 << 20, + + /// + /// + /// Application is using a touch screen instead of a mouse. + /// + /// + /// C++: + /// imgui.h:1761 + ///
ImGuiConfigFlags_IsTouchScreen = 1 << 21 + ///
+ ///
+ /// + /// + /// User storage (to allow your backend/engine to communicate to code that may be shared between multiple + /// projects. Those flags are NOT used by core Dear ImGui) + /// + /// + IsTouchScreen = 1 << 21, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiDataType.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiDataType.gen.cs new file mode 100644 index 0000000..6b9ce2d --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiDataType.gen.cs @@ -0,0 +1,239 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1549 + ///
enum ImGuiDataType_ + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + public enum ImGuiDataType : int + { + /// + /// + /// signed char / char (with sensible compilers) + /// + /// + /// C++: + /// imgui.h:1551 + ///
ImGuiDataType_S8 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S8, + + /// + /// + /// unsigned char + /// + /// + /// C++: + /// imgui.h:1552 + ///
ImGuiDataType_U8 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U8, + + /// + /// + /// short + /// + /// + /// C++: + /// imgui.h:1553 + ///
ImGuiDataType_S16 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S16, + + /// + /// + /// unsigned short + /// + /// + /// C++: + /// imgui.h:1554 + ///
ImGuiDataType_U16 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U16, + + /// + /// + /// int + /// + /// + /// C++: + /// imgui.h:1555 + ///
ImGuiDataType_S32 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S32, + + /// + /// + /// unsigned int + /// + /// + /// C++: + /// imgui.h:1556 + ///
ImGuiDataType_U32 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U32, + + /// + /// + /// long long / __int64 + /// + /// + /// C++: + /// imgui.h:1557 + ///
ImGuiDataType_S64 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + S64, + + /// + /// + /// unsigned long long / unsigned __int64 + /// + /// + /// C++: + /// imgui.h:1558 + ///
ImGuiDataType_U64 + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + U64, + + /// + /// + /// float + /// + /// + /// C++: + /// imgui.h:1559 + ///
ImGuiDataType_Float + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + Float, + + /// + /// + /// double + /// + /// + /// C++: + /// imgui.h:1560 + ///
ImGuiDataType_Double + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + Double, + + /// + /// + /// bool (provided for user convenience, not supported by scalar widgets) + /// + /// + /// C++: + /// imgui.h:1561 + ///
ImGuiDataType_Bool + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + Bool, + + /// + /// + /// char* (provided for user convenience, not supported by scalar widgets) + /// + /// + /// C++: + /// imgui.h:1562 + ///
ImGuiDataType_String + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + String, + + /// + /// + /// C++: + /// imgui.h:1563 + ///
ImGuiDataType_COUNT + ///
+ ///
+ /// + /// + /// A primary data type + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiDir.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiDir.gen.cs new file mode 100644 index 0000000..dd58482 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiDir.gen.cs @@ -0,0 +1,113 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// -> enum ImGuiDir // Enum: A cardinal direction (Left, Right, Up, Down) + /// + /// + /// C++: + /// imgui.h:226 + ///
enum ImGuiDir : int + ///
+ ///
+ /// + /// + /// Enumerations + /// - We don't use strongly typed enums much because they add constraints (can't extend in private code, can't store typed in bit fields, extra casting on iteration) + /// - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists! + /// - In Visual Studio: CTRL+comma ("Edit.GoToAll") can follow symbols inside comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. + /// - In Visual Studio w/ Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols inside comments. + /// - In VS Code, CLion, etc.: CTRL+click can follow symbols inside comments. + /// + /// + public enum ImGuiDir : int + { + /// + /// + /// C++: + /// imgui.h:1569 + ///
ImGuiDir_None = -1 + ///
+ ///
+ /// + /// + /// A cardinal direction + /// + /// + None = -1, + + /// + /// + /// C++: + /// imgui.h:1570 + ///
ImGuiDir_Left = 0 + ///
+ ///
+ /// + /// + /// A cardinal direction + /// + /// + Left = 0, + + /// + /// + /// C++: + /// imgui.h:1571 + ///
ImGuiDir_Right = 1 + ///
+ ///
+ /// + /// + /// A cardinal direction + /// + /// + Right = 1, + + /// + /// + /// C++: + /// imgui.h:1572 + ///
ImGuiDir_Up = 2 + ///
+ ///
+ /// + /// + /// A cardinal direction + /// + /// + Up = 2, + + /// + /// + /// C++: + /// imgui.h:1573 + ///
ImGuiDir_Down = 3 + ///
+ ///
+ /// + /// + /// A cardinal direction + /// + /// + Down = 3, + + /// + /// + /// C++: + /// imgui.h:1574 + ///
ImGuiDir_COUNT + ///
+ ///
+ /// + /// + /// A cardinal direction + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiDockNodeFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiDockNodeFlags.gen.cs new file mode 100644 index 0000000..061d434 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiDockNodeFlags.gen.cs @@ -0,0 +1,178 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1502 + ///
enum ImGuiDockNodeFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + [Flags] + public enum ImGuiDockNodeFlags : int + { + /// + /// + /// C++: + /// imgui.h:1504 + ///
ImGuiDockNodeFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + None = 0, + + /// + /// + /// // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be + /// undocked. + /// + /// + /// C++: + /// imgui.h:1505 + ///
ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + KeepAliveOnly = 1 << 0, + + /// + /// + /// // Disable docking over the Central Node, which will be always kept empty. + /// + /// + /// C++: + /// imgui.h:1507 + ///
ImGuiDockNodeFlags_NoDockingOverCentralNode = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoDockingOverCentralNode = 1 << 2, + + /// + /// + /// // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering + /// everything excepted the Central Node when empty. Meaning the host window should probably use + /// SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs + /// pass-through + won't display a DockingEmptyBg background. See demo for details. + /// + /// + /// C++: + /// imgui.h:1508 + ///
ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + PassthruCentralNode = 1 << 3, + + /// + /// + /// // Disable other windows/nodes from splitting this node. + /// + /// + /// C++: + /// imgui.h:1509 + ///
ImGuiDockNodeFlags_NoDockingSplit = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoDockingSplit = 1 << 4, + + /// + /// + /// Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup + /// dockspaces. + /// + /// + /// C++: + /// imgui.h:1510 + ///
ImGuiDockNodeFlags_NoResize = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoResize = 1 << 5, + + /// + /// + /// // Tab bar will automatically hide when there is a single window in the dock node. + /// + /// + /// C++: + /// imgui.h:1511 + ///
ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + AutoHideTabBar = 1 << 6, + + /// + /// + /// // Disable undocking this node. + /// + /// + /// C++: + /// imgui.h:1512 + ///
ImGuiDockNodeFlags_NoUndocking = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::DockSpace(), shared/inherited by child nodes. + /// (Some flags can be applied to individual nodes directly) + /// FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api. + /// + /// + NoUndocking = 1 << 7, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiDragDropFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiDragDropFlags.gen.cs new file mode 100644 index 0000000..4e25c3a --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiDragDropFlags.gen.cs @@ -0,0 +1,250 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1521 + ///
enum ImGuiDragDropFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload() + /// + /// + [Flags] + public enum ImGuiDragDropFlags : int + { + /// + /// + /// C++: + /// imgui.h:1523 + ///
ImGuiDragDropFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload() + /// + /// + None = 0, + + /// + /// + /// Disable preview tooltip. By default, a successful call to BeginDragDropSource opens a tooltip so you can + /// display a preview or description of the source contents. This flag disables this behavior. + /// + /// + /// C++: + /// imgui.h:1525 + ///
ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + SourceNoPreviewTooltip = 1 << 0, + + /// + /// + /// By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent + /// user code submitting tooltips. This flag disables this behavior so you can still call IsItemHovered() on + /// the source item. + /// + /// + /// C++: + /// imgui.h:1526 + ///
ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + SourceNoDisableHover = 1 << 1, + + /// + /// + /// Disable the behavior that allows to open tree nodes and collapsing header by holding over them while + /// dragging a source item. + /// + /// + /// C++: + /// imgui.h:1527 + ///
ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + SourceNoHoldToOpenOthers = 1 << 2, + + /// + /// + /// Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by + /// manufacturing a temporary identifier based on their window-relative position. This is extremely unusual + /// within the dear imgui ecosystem and so we made it explicit. + /// + /// + /// C++: + /// imgui.h:1528 + ///
ImGuiDragDropFlags_SourceAllowNullID = 1 << 3 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + SourceAllowNullID = 1 << 3, + + /// + /// + /// External source (from outside of dear imgui), won't attempt to read current item/window info. Will + /// always return true. Only one Extern source can be active simultaneously. + /// + /// + /// C++: + /// imgui.h:1529 + ///
ImGuiDragDropFlags_SourceExtern = 1 << 4 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + SourceExtern = 1 << 4, + + /// + /// + /// Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting + /// while being dragged) + /// + /// + /// C++: + /// imgui.h:1530 + ///
ImGuiDragDropFlags_PayloadAutoExpire = 1 << 5 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + PayloadAutoExpire = 1 << 5, + + /// + /// + /// Hint to specify that the payload may not be copied outside current dear imgui context. + /// + /// + /// C++: + /// imgui.h:1531 + ///
ImGuiDragDropFlags_PayloadNoCrossContext = 1 << 6 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + PayloadNoCrossContext = 1 << 6, + + /// + /// + /// Hint to specify that the payload may not be copied outside current process. + /// + /// + /// C++: + /// imgui.h:1532 + ///
ImGuiDragDropFlags_PayloadNoCrossProcess = 1 << 7 + ///
+ ///
+ /// + /// + /// BeginDragDropSource() flags + /// + /// + PayloadNoCrossProcess = 1 << 7, + + /// + /// + /// AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call + /// IsDelivery() to test if the payload needs to be delivered. + /// + /// + /// C++: + /// imgui.h:1534 + ///
ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10 + ///
+ ///
+ /// + /// + /// AcceptDragDropPayload() flags + /// + /// + AcceptBeforeDelivery = 1 << 10, + + /// + /// + /// Do not draw the default highlight rectangle when hovering over target. + /// + /// + /// C++: + /// imgui.h:1535 + ///
ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11 + ///
+ ///
+ /// + /// + /// AcceptDragDropPayload() flags + /// + /// + AcceptNoDrawDefaultRect = 1 << 11, + + /// + /// + /// Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site. + /// + /// + /// C++: + /// imgui.h:1536 + ///
ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12 + ///
+ ///
+ /// + /// + /// AcceptDragDropPayload() flags + /// + /// + AcceptNoPreviewTooltip = 1 << 12, + + /// + /// + /// For peeking ahead and inspecting the payload before delivery. + /// + /// + /// C++: + /// imgui.h:1537 + ///
+ /// ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect + ///
+ ///
+ /// + /// + /// AcceptDragDropPayload() flags + /// + /// + AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiFocusedFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiFocusedFlags.gen.cs new file mode 100644 index 0000000..e1d5aad --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiFocusedFlags.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1448 + ///
enum ImGuiFocusedFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + [Flags] + public enum ImGuiFocusedFlags : int + { + /// + /// + /// C++: + /// imgui.h:1450 + ///
ImGuiFocusedFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + None = 0, + + /// + /// + /// Return true if any children of the window is focused + /// + /// + /// C++: + /// imgui.h:1451 + ///
ImGuiFocusedFlags_ChildWindows = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + ChildWindows = 1 << 0, + + /// + /// + /// Test from root window (top most parent of the current hierarchy) + /// + /// + /// C++: + /// imgui.h:1452 + ///
ImGuiFocusedFlags_RootWindow = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + RootWindow = 1 << 1, + + /// + /// + /// Return true if any window is focused. Important: If you are trying to tell how to dispatch your + /// low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// + /// + /// C++: + /// imgui.h:1453 + ///
ImGuiFocusedFlags_AnyWindow = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + AnyWindow = 1 << 2, + + /// + /// + /// Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with + /// _ChildWindows or _RootWindow) + /// + /// + /// C++: + /// imgui.h:1454 + ///
ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + NoPopupHierarchy = 1 << 3, + + /// + /// + /// Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with + /// _ChildWindows or _RootWindow) + /// + /// + /// C++: + /// imgui.h:1455 + ///
ImGuiFocusedFlags_DockHierarchy = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + DockHierarchy = 1 << 4, + + /// + /// + /// C++: + /// imgui.h:1456 + ///
+ /// ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsWindowFocused() + /// + /// + RootAndChildWindows = RootWindow | ChildWindows, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiHoveredFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiHoveredFlags.gen.cs new file mode 100644 index 0000000..deafdf3 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiHoveredFlags.gen.cs @@ -0,0 +1,431 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1462 + ///
enum ImGuiHoveredFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + [Flags] + public enum ImGuiHoveredFlags : int + { + /// + /// + /// Return true if directly over the item/window, not obstructed by another window, not obstructed by an + /// active popup or modal blocking inputs under them. + /// + /// + /// C++: + /// imgui.h:1464 + ///
ImGuiHoveredFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + None = 0, + + /// + /// + /// IsWindowHovered() only: Return true if any children of the window is hovered + /// + /// + /// C++: + /// imgui.h:1465 + ///
ImGuiHoveredFlags_ChildWindows = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + ChildWindows = 1 << 0, + + /// + /// + /// IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) + /// + /// + /// C++: + /// imgui.h:1466 + ///
ImGuiHoveredFlags_RootWindow = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + RootWindow = 1 << 1, + + /// + /// + /// IsWindowHovered() only: Return true if any window is hovered + /// + /// + /// C++: + /// imgui.h:1467 + ///
ImGuiHoveredFlags_AnyWindow = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AnyWindow = 1 << 2, + + /// + /// + /// IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) + /// (when used with _ChildWindows or _RootWindow) + /// + /// + /// C++: + /// imgui.h:1468 + ///
ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + NoPopupHierarchy = 1 << 3, + + /// + /// + /// IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) + /// (when used with _ChildWindows or _RootWindow) + /// + /// + /// C++: + /// imgui.h:1469 + ///
ImGuiHoveredFlags_DockHierarchy = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + DockHierarchy = 1 << 4, + + /// + /// + /// Return true even if a popup window is normally blocking access to this item/window + /// + /// + /// C++: + /// imgui.h:1470 + ///
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenBlockedByPopup = 1 << 5, + + /// + /// + /// Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop + /// patterns. + /// + /// + /// C++: + /// imgui.h:1472 + ///
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenBlockedByActiveItem = 1 << 7, + + /// + /// + /// IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another + /// hoverable item. + /// + /// + /// C++: + /// imgui.h:1473 + ///
ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenOverlappedByItem = 1 << 8, + + /// + /// + /// IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window. + /// + /// + /// C++: + /// imgui.h:1474 + ///
ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenOverlappedByWindow = 1 << 9, + + /// + /// + /// IsItemHovered() only: Return true even if the item is disabled + /// + /// + /// C++: + /// imgui.h:1475 + ///
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenDisabled = 1 << 10, + + /// + /// + /// IsItemHovered() only: Disable using keyboard/gamepad navigation state when active, always query mouse + /// + /// + /// C++: + /// imgui.h:1476 + ///
ImGuiHoveredFlags_NoNavOverride = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + NoNavOverride = 1 << 11, + + /// + /// + /// C++: + /// imgui.h:1477 + ///
+ /// ImGuiHoveredFlags_AllowWhenOverlapped = ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + AllowWhenOverlapped = AllowWhenOverlappedByItem | AllowWhenOverlappedByWindow, + + /// + /// + /// C++: + /// imgui.h:1478 + ///
+ /// ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + RectOnly = AllowWhenBlockedByPopup | AllowWhenBlockedByActiveItem | AllowWhenOverlapped, + + /// + /// + /// C++: + /// imgui.h:1479 + ///
+ /// ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows + ///
+ ///
+ /// + /// + /// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() + /// Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ! + /// Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls. + /// + /// + RootAndChildWindows = RootWindow | ChildWindows, + + /// + /// + /// Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence. + /// + /// + /// C++: + /// imgui.h:1487 + ///
ImGuiHoveredFlags_ForTooltip = 1 << 12 + ///
+ ///
+ /// + /// + /// Tooltips mode + /// - typically used in IsItemHovered() + SetTooltip() sequence. + /// - this is a shortcut to pull flags from 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' where you can reconfigure desired behavior. + /// e.g. 'TooltipHoveredFlagsForMouse' defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + /// - for frequently actioned or hovered items providing a tooltip, you want may to use ImGuiHoveredFlags_ForTooltip (stationary + delay) so the tooltip doesn't show too often. + /// - for items which main purpose is to be hovered, or items with low affordance, or in less consistent apps, prefer no delay or shorter delay. + /// + /// + ForTooltip = 1 << 12, + + /// + /// + /// Require mouse to be stationary for style.HoverStationaryDelay (~0.15 sec) _at least one time_. After + /// this, can move on same item/window. Using the stationary test tends to reduces the need for a long + /// delay. + /// + /// + /// C++: + /// imgui.h:1492 + ///
ImGuiHoveredFlags_Stationary = 1 << 13 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + Stationary = 1 << 13, + + /// + /// + /// IsItemHovered() only: Return true immediately (default). As this is the default you generally ignore + /// this. + /// + /// + /// C++: + /// imgui.h:1493 + ///
ImGuiHoveredFlags_DelayNone = 1 << 14 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + DelayNone = 1 << 14, + + /// + /// + /// IsItemHovered() only: Return true after style.HoverDelayShort elapsed (~0.15 sec) (shared between items) + /// + requires mouse to be stationary for style.HoverStationaryDelay (once per item). + /// + /// + /// C++: + /// imgui.h:1494 + ///
ImGuiHoveredFlags_DelayShort = 1 << 15 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + DelayShort = 1 << 15, + + /// + /// + /// IsItemHovered() only: Return true after style.HoverDelayNormal elapsed (~0.40 sec) (shared between + /// items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item). + /// + /// + /// C++: + /// imgui.h:1495 + ///
ImGuiHoveredFlags_DelayNormal = 1 << 16 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + DelayNormal = 1 << 16, + + /// + /// + /// IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the + /// previous timer for a short time (standard for tooltips with long delays) + /// + /// + /// C++: + /// imgui.h:1496 + ///
ImGuiHoveredFlags_NoSharedDelay = 1 << 17 + ///
+ ///
+ /// + /// + /// (Advanced) Mouse Hovering delays. + /// - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags. + /// - use those if you need specific overrides. + /// + /// + NoSharedDelay = 1 << 17, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiInputFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiInputFlags.gen.cs new file mode 100644 index 0000000..01e915d --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiInputFlags.gen.cs @@ -0,0 +1,225 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1720 + ///
enum ImGuiInputFlags_ + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut(), + /// (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h) + /// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) + /// + /// + [Flags] + public enum ImGuiInputFlags : int + { + /// + /// + /// C++: + /// imgui.h:1722 + ///
ImGuiInputFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut(), + /// (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h) + /// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) + /// + /// + None = 0, + + /// + /// + /// Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for + /// legacy IsMouseClicked(). MUST BE == 1. + /// + /// + /// C++: + /// imgui.h:1723 + ///
ImGuiInputFlags_Repeat = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut(), + /// (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h) + /// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) + /// + /// + Repeat = 1 << 0, + + /// + /// + /// Route to active item only. + /// + /// + /// C++: + /// imgui.h:1728 + ///
ImGuiInputFlags_RouteActive = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteActive = 1 << 10, + + /// + /// + /// Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes + /// inputs over deep-most focused window. + /// + /// + /// C++: + /// imgui.h:1729 + ///
ImGuiInputFlags_RouteFocused = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteFocused = 1 << 11, + + /// + /// + /// Global route (unless a focused window or active item registered the route). + /// + /// + /// C++: + /// imgui.h:1730 + ///
ImGuiInputFlags_RouteGlobal = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteGlobal = 1 << 12, + + /// + /// + /// Do not register route, poll keys directly. + /// + /// + /// C++: + /// imgui.h:1731 + ///
ImGuiInputFlags_RouteAlways = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for Shortcut(), SetNextItemShortcut() + /// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal. + /// - Default policy is RouteFocused. Can select only 1 policy among all available. + /// + /// + RouteAlways = 1 << 13, + + /// + /// + /// Option: global route: higher priority than focused route (unless active item in focused route). + /// + /// + /// C++: + /// imgui.h:1733 + ///
ImGuiInputFlags_RouteOverFocused = 1 << 14 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteOverFocused = 1 << 14, + + /// + /// + /// Option: global route: higher priority than active item. Unlikely you need to use that: will interfere + /// with every active items, e.g. CTRL+A registered by InputText will be overridden by this. May not be + /// fully honored as user/internal code is likely to always assume they can access keys when active. + /// + /// + /// C++: + /// imgui.h:1734 + ///
ImGuiInputFlags_RouteOverActive = 1 << 15 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteOverActive = 1 << 15, + + /// + /// + /// Option: global route: will not be applied if underlying background/void is focused (== no Dear ImGui + /// windows are focused). Useful for overlay applications. + /// + /// + /// C++: + /// imgui.h:1735 + ///
ImGuiInputFlags_RouteUnlessBgFocused = 1 << 16 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteUnlessBgFocused = 1 << 16, + + /// + /// + /// Option: route evaluated from the point of view of root window rather than current window. + /// + /// + /// C++: + /// imgui.h:1736 + ///
ImGuiInputFlags_RouteFromRootWindow = 1 << 17 + ///
+ ///
+ /// + /// + /// - Routing options + /// + /// + RouteFromRootWindow = 1 << 17, + + /// + /// + /// Automatically display a tooltip when hovering item [BETA] Unsure of right api (opt-in/opt-out) + /// + /// + /// C++: + /// imgui.h:1739 + ///
ImGuiInputFlags_Tooltip = 1 << 18 + ///
+ ///
+ /// + /// + /// Flags for SetNextItemShortcut() + /// + /// + Tooltip = 1 << 18, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiInputTextFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiInputTextFlags.gen.cs new file mode 100644 index 0000000..8ff0a74 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiInputTextFlags.gen.cs @@ -0,0 +1,456 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1273 + ///
enum ImGuiInputTextFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::InputText() + /// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive) + /// + /// + [Flags] + public enum ImGuiInputTextFlags : int + { + /// + /// + /// C++: + /// imgui.h:1276 + ///
ImGuiInputTextFlags_None = 0 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + None = 0, + + /// + /// + /// Allow 0123456789.+-*/ + /// + /// + /// C++: + /// imgui.h:1277 + ///
ImGuiInputTextFlags_CharsDecimal = 1 << 0 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsDecimal = 1 << 0, + + /// + /// + /// Allow 0123456789ABCDEFabcdef + /// + /// + /// C++: + /// imgui.h:1278 + ///
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsHexadecimal = 1 << 1, + + /// + /// + /// Allow 0123456789.+-*/eE (Scientific notation input) + /// + /// + /// C++: + /// imgui.h:1279 + ///
ImGuiInputTextFlags_CharsScientific = 1 << 2 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsScientific = 1 << 2, + + /// + /// + /// Turn a..z into A..Z + /// + /// + /// C++: + /// imgui.h:1280 + ///
ImGuiInputTextFlags_CharsUppercase = 1 << 3 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsUppercase = 1 << 3, + + /// + /// + /// Filter out spaces, tabs + /// + /// + /// C++: + /// imgui.h:1281 + ///
ImGuiInputTextFlags_CharsNoBlank = 1 << 4 + ///
+ ///
+ /// + /// + /// Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter) + /// + /// + CharsNoBlank = 1 << 4, + + /// + /// + /// Pressing TAB input a '\t' character into the text field + /// + /// + /// C++: + /// imgui.h:1284 + ///
ImGuiInputTextFlags_AllowTabInput = 1 << 5 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + AllowTabInput = 1 << 5, + + /// + /// + /// Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider using + /// IsItemDeactivatedAfterEdit() instead! + /// + /// + /// C++: + /// imgui.h:1285 + ///
ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + EnterReturnsTrue = 1 << 6, + + /// + /// + /// Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape + /// to revert) + /// + /// + /// C++: + /// imgui.h:1286 + ///
ImGuiInputTextFlags_EscapeClearsAll = 1 << 7 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + EscapeClearsAll = 1 << 7, + + /// + /// + /// In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate + /// with Ctrl+Enter, add line with Enter). + /// + /// + /// C++: + /// imgui.h:1287 + ///
ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8 + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + CtrlEnterForNewLine = 1 << 8, + + /// + /// + /// Read-only mode + /// + /// + /// C++: + /// imgui.h:1290 + ///
ImGuiInputTextFlags_ReadOnly = 1 << 9 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + ReadOnly = 1 << 9, + + /// + /// + /// Password mode, display all characters as '*', disable copy + /// + /// + /// C++: + /// imgui.h:1291 + ///
ImGuiInputTextFlags_Password = 1 << 10 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + Password = 1 << 10, + + /// + /// + /// Overwrite mode + /// + /// + /// C++: + /// imgui.h:1292 + ///
ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + AlwaysOverwrite = 1 << 11, + + /// + /// + /// Select entire text when first taking mouse focus + /// + /// + /// C++: + /// imgui.h:1293 + ///
ImGuiInputTextFlags_AutoSelectAll = 1 << 12 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + AutoSelectAll = 1 << 12, + + /// + /// + /// InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value. + /// + /// + /// C++: + /// imgui.h:1294 + ///
ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + ParseEmptyRefVal = 1 << 13, + + /// + /// + /// InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used + /// with ImGuiInputTextFlags_ParseEmptyRefVal. + /// + /// + /// C++: + /// imgui.h:1295 + ///
ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + DisplayEmptyRefVal = 1 << 14, + + /// + /// + /// Disable following the cursor horizontally + /// + /// + /// C++: + /// imgui.h:1296 + ///
ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + NoHorizontalScroll = 1 << 15, + + /// + /// + /// Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own + /// undo/redo stack you need e.g. to call ClearActiveID(). + /// + /// + /// C++: + /// imgui.h:1297 + ///
ImGuiInputTextFlags_NoUndoRedo = 1 << 16 + ///
+ ///
+ /// + /// + /// Other options + /// + /// + NoUndoRedo = 1 << 16, + + /// + /// + /// When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. + /// Single-line only! + /// + /// + /// C++: + /// imgui.h:1300 + ///
ImGuiInputTextFlags_ElideLeft = 1 << 17 + ///
+ ///
+ /// + /// + /// Elide display / Alignment + /// + /// + ElideLeft = 1 << 17, + + /// + /// + /// Callback on pressing TAB (for completion handling) + /// + /// + /// C++: + /// imgui.h:1303 + ///
ImGuiInputTextFlags_CallbackCompletion = 1 << 18 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackCompletion = 1 << 18, + + /// + /// + /// Callback on pressing Up/Down arrows (for history handling) + /// + /// + /// C++: + /// imgui.h:1304 + ///
ImGuiInputTextFlags_CallbackHistory = 1 << 19 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackHistory = 1 << 19, + + /// + /// + /// Callback on each iteration. User code may query cursor position, modify text buffer. + /// + /// + /// C++: + /// imgui.h:1305 + ///
ImGuiInputTextFlags_CallbackAlways = 1 << 20 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackAlways = 1 << 20, + + /// + /// + /// Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or + /// return 1 in callback to discard. + /// + /// + /// C++: + /// imgui.h:1306 + ///
ImGuiInputTextFlags_CallbackCharFilter = 1 << 21 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackCharFilter = 1 << 21, + + /// + /// + /// Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to + /// grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). + /// You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h + /// for an example of using this) + /// + /// + /// C++: + /// imgui.h:1307 + ///
ImGuiInputTextFlags_CallbackResize = 1 << 22 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackResize = 1 << 22, + + /// + /// + /// Callback on any edit. Note that InputText() already returns true on edit + you can always use + /// IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// + /// + /// C++: + /// imgui.h:1308 + ///
ImGuiInputTextFlags_CallbackEdit = 1 << 23 + ///
+ ///
+ /// + /// + /// Callback features + /// + /// + CallbackEdit = 1 << 23, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiItemFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiItemFlags.gen.cs new file mode 100644 index 0000000..3ccd2c1 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiItemFlags.gen.cs @@ -0,0 +1,153 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1260 + ///
enum ImGuiItemFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + [Flags] + public enum ImGuiItemFlags : int + { + /// + /// + /// (Default) + /// + /// + /// C++: + /// imgui.h:1262 + ///
ImGuiItemFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + None = 0, + + /// + /// + /// false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav. + /// + /// + /// C++: + /// imgui.h:1263 + ///
ImGuiItemFlags_NoTabStop = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + NoTabStop = 1 << 0, + + /// + /// + /// false // Disable any form of focusing (keyboard/gamepad directional navigation and + /// SetKeyboardFocusHere() calls). + /// + /// + /// C++: + /// imgui.h:1264 + ///
ImGuiItemFlags_NoNav = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + NoNav = 1 << 1, + + /// + /// + /// false // Disable item being a candidate for default focus (e.g. used by title bar items). + /// + /// + /// C++: + /// imgui.h:1265 + ///
ImGuiItemFlags_NoNavDefaultFocus = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + NoNavDefaultFocus = 1 << 2, + + /// + /// + /// false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and + /// io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is + /// being held. + /// + /// + /// C++: + /// imgui.h:1266 + ///
ImGuiItemFlags_ButtonRepeat = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + ButtonRepeat = 1 << 3, + + /// + /// + /// true // MenuItem()/Selectable() automatically close their parent popup window. + /// + /// + /// C++: + /// imgui.h:1267 + ///
ImGuiItemFlags_AutoClosePopups = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + AutoClosePopups = 1 << 4, + + /// + /// + /// false // Allow submitting an item with the same identifier as an item already submitted this frame + /// without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set. + /// + /// + /// C++: + /// imgui.h:1268 + ///
ImGuiItemFlags_AllowDuplicateId = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::PushItemFlag() + /// (Those are shared by all items) + /// + /// + AllowDuplicateId = 1 << 5, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiKey.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiKey.gen.cs new file mode 100644 index 0000000..26f4d19 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiKey.gen.cs @@ -0,0 +1,2018 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// -> enum ImGuiKey // Enum: A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value) + /// + /// + /// C++: + /// imgui.h:227 + ///
enum ImGuiKey : int + ///
+ ///
+ /// + /// + /// Enumerations + /// - We don't use strongly typed enums much because they add constraints (can't extend in private code, can't store typed in bit fields, extra casting on iteration) + /// - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists! + /// - In Visual Studio: CTRL+comma ("Edit.GoToAll") can follow symbols inside comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. + /// - In Visual Studio w/ Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols inside comments. + /// - In VS Code, CLion, etc.: CTRL+click can follow symbols inside comments. + /// + /// + public enum ImGuiKey : int + { + /// + /// + /// C++: + /// imgui.h:1594 + ///
ImGuiKey_None = 0 + ///
+ ///
+ /// + /// + /// Keyboard + /// + /// + None = 0, + + /// + /// + /// First valid key value (other than 0) + /// + /// + /// C++: + /// imgui.h:1595 + ///
ImGuiKey_NamedKey_BEGIN = 512 + ///
+ ///
+ /// + /// + /// Keyboard + /// + /// + NamedKey_BEGIN = 512, + + /// + /// + /// == ImGuiKey_NamedKey_BEGIN + /// + /// + /// C++: + /// imgui.h:1597 + ///
ImGuiKey_Tab = 512 + ///
+ ///
+ Tab = 512, + + /// + /// + /// C++: + /// imgui.h:1598 + ///
ImGuiKey_LeftArrow + ///
+ ///
+ LeftArrow, + + /// + /// + /// C++: + /// imgui.h:1599 + ///
ImGuiKey_RightArrow + ///
+ ///
+ RightArrow, + + /// + /// + /// C++: + /// imgui.h:1600 + ///
ImGuiKey_UpArrow + ///
+ ///
+ UpArrow, + + /// + /// + /// C++: + /// imgui.h:1601 + ///
ImGuiKey_DownArrow + ///
+ ///
+ DownArrow, + + /// + /// + /// C++: + /// imgui.h:1602 + ///
ImGuiKey_PageUp + ///
+ ///
+ PageUp, + + /// + /// + /// C++: + /// imgui.h:1603 + ///
ImGuiKey_PageDown + ///
+ ///
+ PageDown, + + /// + /// + /// C++: + /// imgui.h:1604 + ///
ImGuiKey_Home + ///
+ ///
+ Home, + + /// + /// + /// C++: + /// imgui.h:1605 + ///
ImGuiKey_End + ///
+ ///
+ End, + + /// + /// + /// C++: + /// imgui.h:1606 + ///
ImGuiKey_Insert + ///
+ ///
+ Insert, + + /// + /// + /// C++: + /// imgui.h:1607 + ///
ImGuiKey_Delete + ///
+ ///
+ Delete, + + /// + /// + /// C++: + /// imgui.h:1608 + ///
ImGuiKey_Backspace + ///
+ ///
+ Backspace, + + /// + /// + /// C++: + /// imgui.h:1609 + ///
ImGuiKey_Space + ///
+ ///
+ Space, + + /// + /// + /// C++: + /// imgui.h:1610 + ///
ImGuiKey_Enter + ///
+ ///
+ Enter, + + /// + /// + /// C++: + /// imgui.h:1611 + ///
ImGuiKey_Escape + ///
+ ///
+ Escape, + + /// + /// + /// Also see ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiMod_Alt, ImGuiMod_Super below! + /// + /// + /// C++: + /// imgui.h:1612 + ///
ImGuiKey_LeftCtrl + ///
+ ///
+ LeftCtrl, + + /// + /// + /// Also see ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiMod_Alt, ImGuiMod_Super below! + /// + /// + /// C++: + /// imgui.h:1612 + ///
ImGuiKey_LeftShift + ///
+ ///
+ LeftShift, + + /// + /// + /// Also see ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiMod_Alt, ImGuiMod_Super below! + /// + /// + /// C++: + /// imgui.h:1612 + ///
ImGuiKey_LeftAlt + ///
+ ///
+ LeftAlt, + + /// + /// + /// Also see ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiMod_Alt, ImGuiMod_Super below! + /// + /// + /// C++: + /// imgui.h:1612 + ///
ImGuiKey_LeftSuper + ///
+ ///
+ LeftSuper, + + /// + /// + /// C++: + /// imgui.h:1613 + ///
ImGuiKey_RightCtrl + ///
+ ///
+ RightCtrl, + + /// + /// + /// C++: + /// imgui.h:1613 + ///
ImGuiKey_RightShift + ///
+ ///
+ RightShift, + + /// + /// + /// C++: + /// imgui.h:1613 + ///
ImGuiKey_RightAlt + ///
+ ///
+ RightAlt, + + /// + /// + /// C++: + /// imgui.h:1613 + ///
ImGuiKey_RightSuper + ///
+ ///
+ RightSuper, + + /// + /// + /// C++: + /// imgui.h:1614 + ///
ImGuiKey_Menu + ///
+ ///
+ Menu, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_0 + ///
+ ///
+ _0, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_1 + ///
+ ///
+ _1, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_2 + ///
+ ///
+ _2, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_3 + ///
+ ///
+ _3, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_4 + ///
+ ///
+ _4, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_5 + ///
+ ///
+ _5, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_6 + ///
+ ///
+ _6, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_7 + ///
+ ///
+ _7, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_8 + ///
+ ///
+ _8, + + /// + /// + /// C++: + /// imgui.h:1615 + ///
ImGuiKey_9 + ///
+ ///
+ _9, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_A + ///
+ ///
+ A, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_B + ///
+ ///
+ B, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_C + ///
+ ///
+ C, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_D + ///
+ ///
+ D, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_E + ///
+ ///
+ E, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_F + ///
+ ///
+ F, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_G + ///
+ ///
+ G, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_H + ///
+ ///
+ H, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_I + ///
+ ///
+ I, + + /// + /// + /// C++: + /// imgui.h:1616 + ///
ImGuiKey_J + ///
+ ///
+ J, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_K + ///
+ ///
+ K, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_L + ///
+ ///
+ L, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_M + ///
+ ///
+ M, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_N + ///
+ ///
+ N, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_O + ///
+ ///
+ O, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_P + ///
+ ///
+ P, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_Q + ///
+ ///
+ Q, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_R + ///
+ ///
+ R, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_S + ///
+ ///
+ S, + + /// + /// + /// C++: + /// imgui.h:1617 + ///
ImGuiKey_T + ///
+ ///
+ T, + + /// + /// + /// C++: + /// imgui.h:1618 + ///
ImGuiKey_U + ///
+ ///
+ U, + + /// + /// + /// C++: + /// imgui.h:1618 + ///
ImGuiKey_V + ///
+ ///
+ V, + + /// + /// + /// C++: + /// imgui.h:1618 + ///
ImGuiKey_W + ///
+ ///
+ W, + + /// + /// + /// C++: + /// imgui.h:1618 + ///
ImGuiKey_X + ///
+ ///
+ X, + + /// + /// + /// C++: + /// imgui.h:1618 + ///
ImGuiKey_Y + ///
+ ///
+ Y, + + /// + /// + /// C++: + /// imgui.h:1618 + ///
ImGuiKey_Z + ///
+ ///
+ Z, + + /// + /// + /// C++: + /// imgui.h:1619 + ///
ImGuiKey_F1 + ///
+ ///
+ F1, + + /// + /// + /// C++: + /// imgui.h:1619 + ///
ImGuiKey_F2 + ///
+ ///
+ F2, + + /// + /// + /// C++: + /// imgui.h:1619 + ///
ImGuiKey_F3 + ///
+ ///
+ F3, + + /// + /// + /// C++: + /// imgui.h:1619 + ///
ImGuiKey_F4 + ///
+ ///
+ F4, + + /// + /// + /// C++: + /// imgui.h:1619 + ///
ImGuiKey_F5 + ///
+ ///
+ F5, + + /// + /// + /// C++: + /// imgui.h:1619 + ///
ImGuiKey_F6 + ///
+ ///
+ F6, + + /// + /// + /// C++: + /// imgui.h:1620 + ///
ImGuiKey_F7 + ///
+ ///
+ F7, + + /// + /// + /// C++: + /// imgui.h:1620 + ///
ImGuiKey_F8 + ///
+ ///
+ F8, + + /// + /// + /// C++: + /// imgui.h:1620 + ///
ImGuiKey_F9 + ///
+ ///
+ F9, + + /// + /// + /// C++: + /// imgui.h:1620 + ///
ImGuiKey_F10 + ///
+ ///
+ F10, + + /// + /// + /// C++: + /// imgui.h:1620 + ///
ImGuiKey_F11 + ///
+ ///
+ F11, + + /// + /// + /// C++: + /// imgui.h:1620 + ///
ImGuiKey_F12 + ///
+ ///
+ F12, + + /// + /// + /// C++: + /// imgui.h:1621 + ///
ImGuiKey_F13 + ///
+ ///
+ F13, + + /// + /// + /// C++: + /// imgui.h:1621 + ///
ImGuiKey_F14 + ///
+ ///
+ F14, + + /// + /// + /// C++: + /// imgui.h:1621 + ///
ImGuiKey_F15 + ///
+ ///
+ F15, + + /// + /// + /// C++: + /// imgui.h:1621 + ///
ImGuiKey_F16 + ///
+ ///
+ F16, + + /// + /// + /// C++: + /// imgui.h:1621 + ///
ImGuiKey_F17 + ///
+ ///
+ F17, + + /// + /// + /// C++: + /// imgui.h:1621 + ///
ImGuiKey_F18 + ///
+ ///
+ F18, + + /// + /// + /// C++: + /// imgui.h:1622 + ///
ImGuiKey_F19 + ///
+ ///
+ F19, + + /// + /// + /// C++: + /// imgui.h:1622 + ///
ImGuiKey_F20 + ///
+ ///
+ F20, + + /// + /// + /// C++: + /// imgui.h:1622 + ///
ImGuiKey_F21 + ///
+ ///
+ F21, + + /// + /// + /// C++: + /// imgui.h:1622 + ///
ImGuiKey_F22 + ///
+ ///
+ F22, + + /// + /// + /// C++: + /// imgui.h:1622 + ///
ImGuiKey_F23 + ///
+ ///
+ F23, + + /// + /// + /// C++: + /// imgui.h:1622 + ///
ImGuiKey_F24 + ///
+ ///
+ F24, + + /// + /// + /// ' + /// + /// + /// C++: + /// imgui.h:1623 + ///
ImGuiKey_Apostrophe + ///
+ ///
+ Apostrophe, + + /// + /// + /// , + /// + /// + /// C++: + /// imgui.h:1624 + ///
ImGuiKey_Comma + ///
+ ///
+ Comma, + + /// + /// + /// - + /// + /// + /// C++: + /// imgui.h:1625 + ///
ImGuiKey_Minus + ///
+ ///
+ Minus, + + /// + /// + /// . + /// + /// + /// C++: + /// imgui.h:1626 + ///
ImGuiKey_Period + ///
+ ///
+ Period, + + /// + /// + /// / + /// + /// + /// C++: + /// imgui.h:1627 + ///
ImGuiKey_Slash + ///
+ ///
+ Slash, + + /// + /// + /// ; + /// + /// + /// C++: + /// imgui.h:1628 + ///
ImGuiKey_Semicolon + ///
+ ///
+ Semicolon, + + /// + /// + /// = + /// + /// + /// C++: + /// imgui.h:1629 + ///
ImGuiKey_Equal + ///
+ ///
+ Equal, + + /// + /// + /// [ + /// + /// + /// C++: + /// imgui.h:1630 + ///
ImGuiKey_LeftBracket + ///
+ ///
+ LeftBracket, + + /// + /// + /// \ (this text inhibit multiline comment caused by backslash) + /// + /// + /// C++: + /// imgui.h:1631 + ///
ImGuiKey_Backslash + ///
+ ///
+ Backslash, + + /// + /// + /// ] + /// + /// + /// C++: + /// imgui.h:1632 + ///
ImGuiKey_RightBracket + ///
+ ///
+ RightBracket, + + /// + /// + /// ` + /// + /// + /// C++: + /// imgui.h:1633 + ///
ImGuiKey_GraveAccent + ///
+ ///
+ GraveAccent, + + /// + /// + /// C++: + /// imgui.h:1634 + ///
ImGuiKey_CapsLock + ///
+ ///
+ CapsLock, + + /// + /// + /// C++: + /// imgui.h:1635 + ///
ImGuiKey_ScrollLock + ///
+ ///
+ ScrollLock, + + /// + /// + /// C++: + /// imgui.h:1636 + ///
ImGuiKey_NumLock + ///
+ ///
+ NumLock, + + /// + /// + /// C++: + /// imgui.h:1637 + ///
ImGuiKey_PrintScreen + ///
+ ///
+ PrintScreen, + + /// + /// + /// C++: + /// imgui.h:1638 + ///
ImGuiKey_Pause + ///
+ ///
+ Pause, + + /// + /// + /// C++: + /// imgui.h:1639 + ///
ImGuiKey_Keypad0 + ///
+ ///
+ Keypad0, + + /// + /// + /// C++: + /// imgui.h:1639 + ///
ImGuiKey_Keypad1 + ///
+ ///
+ Keypad1, + + /// + /// + /// C++: + /// imgui.h:1639 + ///
ImGuiKey_Keypad2 + ///
+ ///
+ Keypad2, + + /// + /// + /// C++: + /// imgui.h:1639 + ///
ImGuiKey_Keypad3 + ///
+ ///
+ Keypad3, + + /// + /// + /// C++: + /// imgui.h:1639 + ///
ImGuiKey_Keypad4 + ///
+ ///
+ Keypad4, + + /// + /// + /// C++: + /// imgui.h:1640 + ///
ImGuiKey_Keypad5 + ///
+ ///
+ Keypad5, + + /// + /// + /// C++: + /// imgui.h:1640 + ///
ImGuiKey_Keypad6 + ///
+ ///
+ Keypad6, + + /// + /// + /// C++: + /// imgui.h:1640 + ///
ImGuiKey_Keypad7 + ///
+ ///
+ Keypad7, + + /// + /// + /// C++: + /// imgui.h:1640 + ///
ImGuiKey_Keypad8 + ///
+ ///
+ Keypad8, + + /// + /// + /// C++: + /// imgui.h:1640 + ///
ImGuiKey_Keypad9 + ///
+ ///
+ Keypad9, + + /// + /// + /// C++: + /// imgui.h:1641 + ///
ImGuiKey_KeypadDecimal + ///
+ ///
+ KeypadDecimal, + + /// + /// + /// C++: + /// imgui.h:1642 + ///
ImGuiKey_KeypadDivide + ///
+ ///
+ KeypadDivide, + + /// + /// + /// C++: + /// imgui.h:1643 + ///
ImGuiKey_KeypadMultiply + ///
+ ///
+ KeypadMultiply, + + /// + /// + /// C++: + /// imgui.h:1644 + ///
ImGuiKey_KeypadSubtract + ///
+ ///
+ KeypadSubtract, + + /// + /// + /// C++: + /// imgui.h:1645 + ///
ImGuiKey_KeypadAdd + ///
+ ///
+ KeypadAdd, + + /// + /// + /// C++: + /// imgui.h:1646 + ///
ImGuiKey_KeypadEnter + ///
+ ///
+ KeypadEnter, + + /// + /// + /// C++: + /// imgui.h:1647 + ///
ImGuiKey_KeypadEqual + ///
+ ///
+ KeypadEqual, + + /// + /// + /// Available on some keyboard/mouses. Often referred as "Browser Back" + /// + /// + /// C++: + /// imgui.h:1648 + ///
ImGuiKey_AppBack + ///
+ ///
+ AppBack, + + /// + /// + /// C++: + /// imgui.h:1649 + ///
ImGuiKey_AppForward + ///
+ ///
+ AppForward, + + /// + /// + /// Non-US backslash. + /// + /// + /// C++: + /// imgui.h:1650 + ///
ImGuiKey_Oem102 + ///
+ ///
+ Oem102, + + /// + /// + /// Menu | + | Options | + /// + /// + /// C++: + /// imgui.h:1656 + ///
ImGuiKey_GamepadStart + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadStart, + + /// + /// + /// View | - | Share | + /// + /// + /// C++: + /// imgui.h:1657 + ///
ImGuiKey_GamepadBack + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadBack, + + /// + /// + /// X | Y | Square | Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows) + /// + /// + /// C++: + /// imgui.h:1658 + ///
ImGuiKey_GamepadFaceLeft + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadFaceLeft, + + /// + /// + /// B | A | Circle | Cancel / Close / Exit + /// + /// + /// C++: + /// imgui.h:1659 + ///
ImGuiKey_GamepadFaceRight + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadFaceRight, + + /// + /// + /// Y | X | Triangle | Text Input / On-screen Keyboard + /// + /// + /// C++: + /// imgui.h:1660 + ///
ImGuiKey_GamepadFaceUp + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadFaceUp, + + /// + /// + /// A | B | Cross | Activate / Open / Toggle / Tweak + /// + /// + /// C++: + /// imgui.h:1661 + ///
ImGuiKey_GamepadFaceDown + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadFaceDown, + + /// + /// + /// D-pad Left | " | " | Move / Tweak / Resize Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1662 + ///
ImGuiKey_GamepadDpadLeft + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadDpadLeft, + + /// + /// + /// D-pad Right | " | " | Move / Tweak / Resize Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1663 + ///
ImGuiKey_GamepadDpadRight + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadDpadRight, + + /// + /// + /// D-pad Up | " | " | Move / Tweak / Resize Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1664 + ///
ImGuiKey_GamepadDpadUp + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadDpadUp, + + /// + /// + /// D-pad Down | " | " | Move / Tweak / Resize Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1665 + ///
ImGuiKey_GamepadDpadDown + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadDpadDown, + + /// + /// + /// L Bumper | L | L1 | Tweak Slower / Focus Previous (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1666 + ///
ImGuiKey_GamepadL1 + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadL1, + + /// + /// + /// R Bumper | R | R1 | Tweak Faster / Focus Next (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1667 + ///
ImGuiKey_GamepadR1 + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadR1, + + /// + /// + /// L Trigger | ZL | L2 | [Analog] + /// + /// + /// C++: + /// imgui.h:1668 + ///
ImGuiKey_GamepadL2 + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadL2, + + /// + /// + /// R Trigger | ZR | R2 | [Analog] + /// + /// + /// C++: + /// imgui.h:1669 + ///
ImGuiKey_GamepadR2 + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadR2, + + /// + /// + /// L Stick | L3 | L3 | + /// + /// + /// C++: + /// imgui.h:1670 + ///
ImGuiKey_GamepadL3 + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadL3, + + /// + /// + /// R Stick | R3 | R3 | + /// + /// + /// C++: + /// imgui.h:1671 + ///
ImGuiKey_GamepadR3 + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadR3, + + /// + /// + /// | | | [Analog] Move Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1672 + ///
ImGuiKey_GamepadLStickLeft + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadLStickLeft, + + /// + /// + /// | | | [Analog] Move Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1673 + ///
ImGuiKey_GamepadLStickRight + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadLStickRight, + + /// + /// + /// | | | [Analog] Move Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1674 + ///
ImGuiKey_GamepadLStickUp + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadLStickUp, + + /// + /// + /// | | | [Analog] Move Window (in Windowing mode) + /// + /// + /// C++: + /// imgui.h:1675 + ///
ImGuiKey_GamepadLStickDown + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadLStickDown, + + /// + /// + /// | | | [Analog] + /// + /// + /// C++: + /// imgui.h:1676 + ///
ImGuiKey_GamepadRStickLeft + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadRStickLeft, + + /// + /// + /// | | | [Analog] + /// + /// + /// C++: + /// imgui.h:1677 + ///
ImGuiKey_GamepadRStickRight + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadRStickRight, + + /// + /// + /// | | | [Analog] + /// + /// + /// C++: + /// imgui.h:1678 + ///
ImGuiKey_GamepadRStickUp + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadRStickUp, + + /// + /// + /// | | | [Analog] + /// + /// + /// C++: + /// imgui.h:1679 + ///
ImGuiKey_GamepadRStickDown + ///
+ ///
+ /// + /// + /// Gamepad + /// (analog values are 0.0f to 1.0f) + /// (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) + /// // XBOX | SWITCH | PLAYSTA. | -> ACTION + /// + /// + GamepadRStickDown, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseLeft + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseLeft, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseRight + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseRight, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseMiddle + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseMiddle, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseX1 + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseX1, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseX2 + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseX2, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseWheelX + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseWheelX, + + /// + /// + /// C++: + /// imgui.h:1683 + ///
ImGuiKey_MouseWheelY + ///
+ ///
+ /// + /// + /// Aliases: Mouse Buttons (auto-submitted from AddMouseButtonEvent() calls) + /// - This is mirroring the data also written to io.MouseDown[], io.MouseWheel, in a format allowing them to be accessed via standard key API. + /// + /// + MouseWheelY, + + /// + /// + /// C++: + /// imgui.h:1686 + ///
ImGuiKey_ReservedForModCtrl + ///
+ ///
+ /// + /// + /// [Internal] Reserved for mod storage + /// + /// + ReservedForModCtrl, + + /// + /// + /// C++: + /// imgui.h:1686 + ///
ImGuiKey_ReservedForModShift + ///
+ ///
+ /// + /// + /// [Internal] Reserved for mod storage + /// + /// + ReservedForModShift, + + /// + /// + /// C++: + /// imgui.h:1686 + ///
ImGuiKey_ReservedForModAlt + ///
+ ///
+ /// + /// + /// [Internal] Reserved for mod storage + /// + /// + ReservedForModAlt, + + /// + /// + /// C++: + /// imgui.h:1686 + ///
ImGuiKey_ReservedForModSuper + ///
+ ///
+ /// + /// + /// [Internal] Reserved for mod storage + /// + /// + ReservedForModSuper, + + /// + /// + /// C++: + /// imgui.h:1689 + ///
ImGuiKey_NamedKey_END + ///
+ ///
+ /// + /// + /// [Internal] If you need to iterate all keys (for e.g. an input mapper) you may use + /// ImGuiKey_NamedKey_BEGIN..ImGuiKey_NamedKey_END. + /// + /// + NamedKey_END, + + /// + /// + /// C++: + /// imgui.h:1690 + ///
ImGuiKey_NamedKey_COUNT = ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN + ///
+ ///
+ /// + /// + /// [Internal] If you need to iterate all keys (for e.g. an input mapper) you may use + /// ImGuiKey_NamedKey_BEGIN..ImGuiKey_NamedKey_END. + /// + /// + NamedKey_COUNT = NamedKey_END - NamedKey_BEGIN, + + /// + /// + /// C++: + /// imgui.h:1702 + ///
ImGuiMod_None = 0 + ///
+ ///
+ /// + /// + /// Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) + /// - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S). + /// - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience, + /// but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc. + /// - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those + /// and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). + /// - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. + /// In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and + /// backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... + /// - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call. + /// + /// + Mod_None = 0, + + /// + /// + /// Ctrl (non-macOS), Cmd (macOS) + /// + /// + /// C++: + /// imgui.h:1703 + ///
ImGuiMod_Ctrl = 1 << 12 + ///
+ ///
+ /// + /// + /// Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) + /// - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S). + /// - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience, + /// but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc. + /// - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those + /// and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). + /// - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. + /// In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and + /// backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... + /// - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call. + /// + /// + Mod_Ctrl = 1 << 12, + + /// + /// + /// Shift + /// + /// + /// C++: + /// imgui.h:1704 + ///
ImGuiMod_Shift = 1 << 13 + ///
+ ///
+ /// + /// + /// Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) + /// - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S). + /// - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience, + /// but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc. + /// - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those + /// and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). + /// - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. + /// In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and + /// backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... + /// - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call. + /// + /// + Mod_Shift = 1 << 13, + + /// + /// + /// Option/Menu + /// + /// + /// C++: + /// imgui.h:1705 + ///
ImGuiMod_Alt = 1 << 14 + ///
+ ///
+ /// + /// + /// Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) + /// - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S). + /// - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience, + /// but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc. + /// - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those + /// and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). + /// - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. + /// In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and + /// backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... + /// - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call. + /// + /// + Mod_Alt = 1 << 14, + + /// + /// + /// Windows/Super (non-macOS), Ctrl (macOS) + /// + /// + /// C++: + /// imgui.h:1706 + ///
ImGuiMod_Super = 1 << 15 + ///
+ ///
+ /// + /// + /// Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) + /// - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S). + /// - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience, + /// but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc. + /// - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those + /// and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). + /// - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. + /// In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and + /// backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... + /// - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call. + /// + /// + Mod_Super = 1 << 15, + + /// + /// + /// 4-bits + /// + /// + /// C++: + /// imgui.h:1707 + ///
ImGuiMod_Mask_ = 0xF000 + ///
+ ///
+ /// + /// + /// Keyboard Modifiers (explicitly submitted by backend via AddKeyEvent() calls) + /// - Any functions taking a ImGuiKeyChord parameter can binary-or those with regular keys, e.g. Shortcut(ImGuiMod_Ctrl | ImGuiKey_S). + /// - Those are written back into io.KeyCtrl, io.KeyShift, io.KeyAlt, io.KeySuper for convenience, + /// but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc. + /// - Code polling every key (e.g. an interface to detect a key press for input mapping) might want to ignore those + /// and prefer using the real keys (e.g. ImGuiKey_LeftCtrl, ImGuiKey_RightCtrl instead of ImGuiMod_Ctrl). + /// - In theory the value of keyboard modifiers should be roughly equivalent to a logical or of the equivalent left/right keys. + /// In practice: it's complicated; mods are often provided from different sources. Keyboard layout, IME, sticky keys and + /// backends tend to interfere and break that equivalence. The safer decision is to relay that ambiguity down to the end-user... + /// - On macOS, we swap Cmd(Super) and Ctrl keys at the time of the io.AddKeyEvent() call. + /// + /// + Mod_Mask = 0xF000, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiMouseButton.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiMouseButton.gen.cs new file mode 100644 index 0000000..e05f8ae --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiMouseButton.gen.cs @@ -0,0 +1,82 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1997 + ///
enum ImGuiMouseButton_ + ///
+ ///
+ /// + /// + /// Identify a mouse button. + /// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience. + /// + /// + public enum ImGuiMouseButton : int + { + /// + /// + /// C++: + /// imgui.h:1999 + ///
ImGuiMouseButton_Left = 0 + ///
+ ///
+ /// + /// + /// Identify a mouse button. + /// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience. + /// + /// + Left = 0, + + /// + /// + /// C++: + /// imgui.h:2000 + ///
ImGuiMouseButton_Right = 1 + ///
+ ///
+ /// + /// + /// Identify a mouse button. + /// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience. + /// + /// + Right = 1, + + /// + /// + /// C++: + /// imgui.h:2001 + ///
ImGuiMouseButton_Middle = 2 + ///
+ ///
+ /// + /// + /// Identify a mouse button. + /// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience. + /// + /// + Middle = 2, + + /// + /// + /// C++: + /// imgui.h:2002 + ///
ImGuiMouseButton_COUNT = 5 + ///
+ ///
+ /// + /// + /// Identify a mouse button. + /// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience. + /// + /// + COUNT = 5, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiMouseCursor.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiMouseCursor.gen.cs new file mode 100644 index 0000000..a3f1784 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiMouseCursor.gen.cs @@ -0,0 +1,247 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:2007 + ///
enum ImGuiMouseCursor_ + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + public enum ImGuiMouseCursor : int + { + /// + /// + /// C++: + /// imgui.h:2009 + ///
ImGuiMouseCursor_None = -1 + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + None = -1, + + /// + /// + /// C++: + /// imgui.h:2010 + ///
ImGuiMouseCursor_Arrow = 0 + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + Arrow = 0, + + /// + /// + /// When hovering over InputText, etc. + /// + /// + /// C++: + /// imgui.h:2011 + ///
ImGuiMouseCursor_TextInput + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + TextInput, + + /// + /// + /// (Unused by Dear ImGui functions) + /// + /// + /// C++: + /// imgui.h:2012 + ///
ImGuiMouseCursor_ResizeAll + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + ResizeAll, + + /// + /// + /// When hovering over a horizontal border + /// + /// + /// C++: + /// imgui.h:2013 + ///
ImGuiMouseCursor_ResizeNS + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + ResizeNS, + + /// + /// + /// When hovering over a vertical border or a column + /// + /// + /// C++: + /// imgui.h:2014 + ///
ImGuiMouseCursor_ResizeEW + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + ResizeEW, + + /// + /// + /// When hovering over the bottom-left corner of a window + /// + /// + /// C++: + /// imgui.h:2015 + ///
ImGuiMouseCursor_ResizeNESW + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + ResizeNESW, + + /// + /// + /// When hovering over the bottom-right corner of a window + /// + /// + /// C++: + /// imgui.h:2016 + ///
ImGuiMouseCursor_ResizeNWSE + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + ResizeNWSE, + + /// + /// + /// (Unused by Dear ImGui functions. Use for e.g. hyperlinks) + /// + /// + /// C++: + /// imgui.h:2017 + ///
ImGuiMouseCursor_Hand + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + Hand, + + /// + /// + /// When waiting for something to process/load. + /// + /// + /// C++: + /// imgui.h:2018 + ///
ImGuiMouseCursor_Wait + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + Wait, + + /// + /// + /// When waiting for something to process/load, but application is still interactive. + /// + /// + /// C++: + /// imgui.h:2019 + ///
ImGuiMouseCursor_Progress + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + Progress, + + /// + /// + /// When hovering something with disallowed interaction. Usually a crossed circle. + /// + /// + /// C++: + /// imgui.h:2020 + ///
ImGuiMouseCursor_NotAllowed + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + NotAllowed, + + /// + /// + /// C++: + /// imgui.h:2021 + ///
ImGuiMouseCursor_COUNT + ///
+ ///
+ /// + /// + /// Enumeration for GetMouseCursor() + /// User code may request backend to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiMouseSource.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiMouseSource.gen.cs new file mode 100644 index 0000000..6b331ef --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiMouseSource.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// -> enum ImGuiMouseSource // Enum; A mouse input source identifier (Mouse, TouchScreen, Pen) + /// + /// + /// C++: + /// imgui.h:228 + ///
enum ImGuiMouseSource : int + ///
+ ///
+ /// + /// + /// Enumerations + /// - We don't use strongly typed enums much because they add constraints (can't extend in private code, can't store typed in bit fields, extra casting on iteration) + /// - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists! + /// - In Visual Studio: CTRL+comma ("Edit.GoToAll") can follow symbols inside comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. + /// - In Visual Studio w/ Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols inside comments. + /// - In VS Code, CLion, etc.: CTRL+click can follow symbols inside comments. + /// + /// + public enum ImGuiMouseSource : int + { + /// + /// + /// Input is coming from an actual mouse. + /// + /// + /// C++: + /// imgui.h:2030 + ///
ImGuiMouseSource_Mouse = 0 + ///
+ ///
+ /// + /// + /// Enumeration for AddMouseSourceEvent() actual source of Mouse Input data. + /// Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent() + /// But that "Mouse" data can come from different source which occasionally may be useful for application to know about. + /// You can submit a change of pointer type using io.AddMouseSourceEvent(). + /// + /// + Mouse = 0, + + /// + /// + /// Input is coming from a touch screen (no hovering prior to initial press, less precise initial press + /// aiming, dual-axis wheeling possible). + /// + /// + /// C++: + /// imgui.h:2031 + ///
ImGuiMouseSource_TouchScreen + ///
+ ///
+ /// + /// + /// Enumeration for AddMouseSourceEvent() actual source of Mouse Input data. + /// Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent() + /// But that "Mouse" data can come from different source which occasionally may be useful for application to know about. + /// You can submit a change of pointer type using io.AddMouseSourceEvent(). + /// + /// + TouchScreen, + + /// + /// + /// Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates). + /// + /// + /// C++: + /// imgui.h:2032 + ///
ImGuiMouseSource_Pen + ///
+ ///
+ /// + /// + /// Enumeration for AddMouseSourceEvent() actual source of Mouse Input data. + /// Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent() + /// But that "Mouse" data can come from different source which occasionally may be useful for application to know about. + /// You can submit a change of pointer type using io.AddMouseSourceEvent(). + /// + /// + Pen, + + /// + /// + /// C++: + /// imgui.h:2033 + ///
ImGuiMouseSource_COUNT + ///
+ ///
+ /// + /// + /// Enumeration for AddMouseSourceEvent() actual source of Mouse Input data. + /// Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent() + /// But that "Mouse" data can come from different source which occasionally may be useful for application to know about. + /// You can submit a change of pointer type using io.AddMouseSourceEvent(). + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiMultiSelectFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiMultiSelectFlags.gen.cs new file mode 100644 index 0000000..5fccbf4 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiMultiSelectFlags.gen.cs @@ -0,0 +1,321 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3089 + ///
enum ImGuiMultiSelectFlags_ + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + [Flags] + public enum ImGuiMultiSelectFlags : int + { + /// + /// + /// C++: + /// imgui.h:3091 + ///
ImGuiMultiSelectFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + None = 0, + + /// + /// + /// Disable selecting more than one item. This is available to allow single-selection code to share same + /// code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho! + /// + /// + /// C++: + /// imgui.h:3092 + ///
ImGuiMultiSelectFlags_SingleSelect = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + SingleSelect = 1 << 0, + + /// + /// + /// Disable CTRL+A shortcut to select all. + /// + /// + /// C++: + /// imgui.h:3093 + ///
ImGuiMultiSelectFlags_NoSelectAll = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + NoSelectAll = 1 << 1, + + /// + /// + /// Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is + /// also ensure contiguous SetRange requests are not combined into one. This allows not handling + /// interpolation in SetRange requests. + /// + /// + /// C++: + /// imgui.h:3094 + ///
ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + NoRangeSelect = 1 << 2, + + /// + /// + /// Disable selecting items when navigating (useful for e.g. supporting range-select in a list of + /// checkboxes). + /// + /// + /// C++: + /// imgui.h:3095 + ///
ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + NoAutoSelect = 1 << 3, + + /// + /// + /// Disable clearing selection when navigating or selecting another one (generally used with + /// ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes). + /// + /// + /// C++: + /// imgui.h:3096 + ///
ImGuiMultiSelectFlags_NoAutoClear = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + NoAutoClear = 1 << 4, + + /// + /// + /// Disable clearing selection when clicking/selecting an already selected item. + /// + /// + /// C++: + /// imgui.h:3097 + ///
ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + NoAutoClearOnReselect = 1 << 5, + + /// + /// + /// Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection + /// works better with little bit of spacing between items hit-box in order to be able to aim at empty space. + /// + /// + /// C++: + /// imgui.h:3098 + ///
ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + BoxSelect1d = 1 << 6, + + /// + /// + /// Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or + /// 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update + /// selection of normally clipped items. + /// + /// + /// C++: + /// imgui.h:3099 + ///
ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + BoxSelect2d = 1 << 7, + + /// + /// + /// Disable scrolling when box-selecting near edges of scope. + /// + /// + /// C++: + /// imgui.h:3100 + ///
ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + BoxSelectNoScroll = 1 << 8, + + /// + /// + /// Clear selection when pressing Escape while scope is focused. + /// + /// + /// C++: + /// imgui.h:3101 + ///
ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + ClearOnEscape = 1 << 9, + + /// + /// + /// Clear selection when clicking on empty location within scope. + /// + /// + /// C++: + /// imgui.h:3102 + ///
ImGuiMultiSelectFlags_ClearOnClickVoid = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + ClearOnClickVoid = 1 << 10, + + /// + /// + /// Scope for _BoxSelect and _ClearOnClickVoid is whole window (Default). Use if BeginMultiSelect() covers a + /// whole window or used a single time in same window. + /// + /// + /// C++: + /// imgui.h:3103 + ///
ImGuiMultiSelectFlags_ScopeWindow = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + ScopeWindow = 1 << 11, + + /// + /// + /// Scope for _BoxSelect and _ClearOnClickVoid is rectangle encompassing + /// BeginMultiSelect()/EndMultiSelect(). Use if BeginMultiSelect() is called multiple times in same window. + /// + /// + /// C++: + /// imgui.h:3104 + ///
ImGuiMultiSelectFlags_ScopeRect = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + ScopeRect = 1 << 12, + + /// + /// + /// Apply selection on mouse down when clicking on unselected item. (Default) + /// + /// + /// C++: + /// imgui.h:3105 + ///
ImGuiMultiSelectFlags_SelectOnClick = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + SelectOnClick = 1 << 13, + + /// + /// + /// Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item + /// without altering selection. + /// + /// + /// C++: + /// imgui.h:3106 + ///
ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + SelectOnClickRelease = 1 << 14, + + /// + /// + /// [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a + /// design for the general Nav API for this yet. When the more general feature be public we may obsolete + /// this flag in favor of new one. + /// + /// + /// C++: + /// imgui.h:3108 + ///
ImGuiMultiSelectFlags_NavWrapX = 1 << 16 + ///
+ ///
+ /// + /// + /// Flags for BeginMultiSelect() + /// + /// + NavWrapX = 1 << 16, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiPopupFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiPopupFlags.gen.cs new file mode 100644 index 0000000..637573b --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiPopupFlags.gen.cs @@ -0,0 +1,310 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1359 + ///
enum ImGuiPopupFlags_ + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + [Flags] + public enum ImGuiPopupFlags : int + { + /// + /// + /// C++: + /// imgui.h:1361 + ///
ImGuiPopupFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + None = 0, + + /// + /// + /// For BeginPopupContext*(): open on Left Mouse release. Guaranteed to always be == 0 (same as + /// ImGuiMouseButton_Left) + /// + /// + /// C++: + /// imgui.h:1362 + ///
ImGuiPopupFlags_MouseButtonLeft = 0 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + MouseButtonLeft = 0, + + /// + /// + /// For BeginPopupContext*(): open on Right Mouse release. Guaranteed to always be == 1 (same as + /// ImGuiMouseButton_Right) + /// + /// + /// C++: + /// imgui.h:1363 + ///
ImGuiPopupFlags_MouseButtonRight = 1 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + MouseButtonRight = 1, + + /// + /// + /// For BeginPopupContext*(): open on Middle Mouse release. Guaranteed to always be == 2 (same as + /// ImGuiMouseButton_Middle) + /// + /// + /// C++: + /// imgui.h:1364 + ///
ImGuiPopupFlags_MouseButtonMiddle = 2 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + MouseButtonMiddle = 2, + + /// + /// + /// C++: + /// imgui.h:1365 + ///
ImGuiPopupFlags_MouseButtonMask_ = 0x1F + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + MouseButtonMask = 0x1F, + + /// + /// + /// C++: + /// imgui.h:1366 + ///
ImGuiPopupFlags_MouseButtonDefault_ = 1 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + MouseButtonDefault = 1, + + /// + /// + /// For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't + /// reinitialize navigation) + /// + /// + /// C++: + /// imgui.h:1367 + ///
ImGuiPopupFlags_NoReopen = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + NoReopen = 1 << 5, + + /// + /// + /// For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the + /// popup stack + /// + /// + /// C++: + /// imgui.h:1369 + ///
ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + NoOpenOverExistingPopup = 1 << 7, + + /// + /// + /// For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space + /// + /// + /// C++: + /// imgui.h:1370 + ///
ImGuiPopupFlags_NoOpenOverItems = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + NoOpenOverItems = 1 << 8, + + /// + /// + /// For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup. + /// + /// + /// C++: + /// imgui.h:1371 + ///
ImGuiPopupFlags_AnyPopupId = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + AnyPopupId = 1 << 10, + + /// + /// + /// For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level) + /// + /// + /// C++: + /// imgui.h:1372 + ///
ImGuiPopupFlags_AnyPopupLevel = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + AnyPopupLevel = 1 << 11, + + /// + /// + /// C++: + /// imgui.h:1373 + ///
ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel + ///
+ ///
+ /// + /// + /// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. + /// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', + /// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. + /// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. + /// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. + /// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter + /// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly. + /// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later). + /// + /// + AnyPopup = AnyPopupId | AnyPopupLevel, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiSelectableFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiSelectableFlags.gen.cs new file mode 100644 index 0000000..fdfb298 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiSelectableFlags.gen.cs @@ -0,0 +1,138 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1377 + ///
enum ImGuiSelectableFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + [Flags] + public enum ImGuiSelectableFlags : int + { + /// + /// + /// C++: + /// imgui.h:1379 + ///
ImGuiSelectableFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + None = 0, + + /// + /// + /// Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups) + /// + /// + /// C++: + /// imgui.h:1380 + ///
ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + NoAutoClosePopups = 1 << 0, + + /// + /// + /// Frame will span all columns of its container table (text will still fit in current column) + /// + /// + /// C++: + /// imgui.h:1381 + ///
ImGuiSelectableFlags_SpanAllColumns = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + SpanAllColumns = 1 << 1, + + /// + /// + /// Generate press events on double clicks too + /// + /// + /// C++: + /// imgui.h:1382 + ///
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + AllowDoubleClick = 1 << 2, + + /// + /// + /// Cannot be selected, display grayed out text + /// + /// + /// C++: + /// imgui.h:1383 + ///
ImGuiSelectableFlags_Disabled = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + Disabled = 1 << 3, + + /// + /// + /// (WIP) Hit testing to allow subsequent widgets to overlap this one + /// + /// + /// C++: + /// imgui.h:1384 + ///
ImGuiSelectableFlags_AllowOverlap = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + AllowOverlap = 1 << 4, + + /// + /// + /// Make the item be displayed as if it is hovered + /// + /// + /// C++: + /// imgui.h:1385 + ///
ImGuiSelectableFlags_Highlight = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Selectable() + /// + /// + Highlight = 1 << 5, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiSelectionRequestType.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiSelectionRequestType.gen.cs new file mode 100644 index 0000000..210ce88 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiSelectionRequestType.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3128 + ///
enum ImGuiSelectionRequestType + ///
+ ///
+ /// + /// + /// Selection request type + /// + /// + public enum ImGuiSelectionRequestType : int + { + /// + /// + /// C++: + /// imgui.h:3130 + ///
ImGuiSelectionRequestType_None = 0 + ///
+ ///
+ /// + /// + /// Selection request type + /// + /// + None = 0, + + /// + /// + /// Request app to clear selection (if Selected==false) or select all items (if Selected==true). We cannot + /// set RangeFirstItem/RangeLastItem as its contents is entirely up to user (not necessarily an index) + /// + /// + /// C++: + /// imgui.h:3131 + ///
ImGuiSelectionRequestType_SetAll + ///
+ ///
+ /// + /// + /// Selection request type + /// + /// + SetAll, + + /// + /// + /// Request app to select/unselect [RangeFirstItem..RangeLastItem] items (inclusive) based on value of + /// Selected. Only EndMultiSelect() request this, app code can read after BeginMultiSelect() and it will + /// always be false. + /// + /// + /// C++: + /// imgui.h:3132 + ///
ImGuiSelectionRequestType_SetRange + ///
+ ///
+ /// + /// + /// Selection request type + /// + /// + SetRange, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiSliderFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiSliderFlags.gen.cs new file mode 100644 index 0000000..41c8a41 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiSliderFlags.gen.cs @@ -0,0 +1,216 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1981 + ///
enum ImGuiSliderFlags_ + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + [Flags] + public enum ImGuiSliderFlags : int + { + /// + /// + /// C++: + /// imgui.h:1983 + ///
ImGuiSliderFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + None = 0, + + /// + /// + /// Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with + /// this if using a format-string with small amount of digits. + /// + /// + /// C++: + /// imgui.h:1984 + ///
ImGuiSliderFlags_Logarithmic = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + Logarithmic = 1 << 5, + + /// + /// + /// Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are + /// rounded to those 3 digits). + /// + /// + /// C++: + /// imgui.h:1985 + ///
ImGuiSliderFlags_NoRoundToFormat = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + NoRoundToFormat = 1 << 6, + + /// + /// + /// Disable CTRL+Click or Enter key allowing to input text directly into the widget. + /// + /// + /// C++: + /// imgui.h:1986 + ///
ImGuiSliderFlags_NoInput = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + NoInput = 1 << 7, + + /// + /// + /// Enable wrapping around from max to min and from min to max. Only supported by DragXXX() functions for + /// now. + /// + /// + /// C++: + /// imgui.h:1987 + ///
ImGuiSliderFlags_WrapAround = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + WrapAround = 1 << 8, + + /// + /// + /// Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going + /// out of bounds. + /// + /// + /// C++: + /// imgui.h:1988 + ///
ImGuiSliderFlags_ClampOnInput = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + ClampOnInput = 1 << 9, + + /// + /// + /// Clamp even if min==max==0.0f. Otherwise due to legacy reason DragXXX functions don't clamp with those + /// values. When your clamping limits are dynamic you almost always want to use it. + /// + /// + /// C++: + /// imgui.h:1989 + ///
ImGuiSliderFlags_ClampZeroRange = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + ClampZeroRange = 1 << 10, + + /// + /// + /// Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based + /// on your own logic. + /// + /// + /// C++: + /// imgui.h:1990 + ///
ImGuiSliderFlags_NoSpeedTweaks = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + NoSpeedTweaks = 1 << 11, + + /// + /// + /// C++: + /// imgui.h:1991 + ///
+ /// ImGuiSliderFlags_AlwaysClamp = ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + AlwaysClamp = ClampOnInput | ClampZeroRange, + + /// + /// + /// [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API + /// that has got miscast to this enum, and will trigger an assert if needed. + /// + /// + /// C++: + /// imgui.h:1992 + ///
ImGuiSliderFlags_InvalidMask_ = 0x7000000F + ///
+ ///
+ /// + /// + /// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. + /// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText) + /// + /// + InvalidMask = 0x7000000F, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiSortDirection.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiSortDirection.gen.cs new file mode 100644 index 0000000..1f41c1b --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiSortDirection.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// -> enum ImGuiSortDirection // Enum: A sorting direction (ascending or descending) + /// + /// + /// C++: + /// imgui.h:229 + ///
enum ImGuiSortDirection : ImU8 + ///
+ ///
+ /// + /// + /// Enumerations + /// - We don't use strongly typed enums much because they add constraints (can't extend in private code, can't store typed in bit fields, extra casting on iteration) + /// - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists! + /// - In Visual Studio: CTRL+comma ("Edit.GoToAll") can follow symbols inside comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. + /// - In Visual Studio w/ Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols inside comments. + /// - In VS Code, CLion, etc.: CTRL+click can follow symbols inside comments. + /// + /// + public enum ImGuiSortDirection : int + { + /// + /// + /// C++: + /// imgui.h:1580 + ///
ImGuiSortDirection_None = 0 + ///
+ ///
+ /// + /// + /// A sorting direction + /// + /// + None = 0, + + /// + /// + /// Ascending = 0->9, A->Z etc. + /// + /// + /// C++: + /// imgui.h:1581 + ///
ImGuiSortDirection_Ascending = 1 + ///
+ ///
+ /// + /// + /// A sorting direction + /// + /// + Ascending = 1, + + /// + /// + /// Descending = 9->0, Z->A etc. + /// + /// + /// C++: + /// imgui.h:1582 + ///
ImGuiSortDirection_Descending = 2 + ///
+ ///
+ /// + /// + /// A sorting direction + /// + /// + Descending = 2, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiStyleVar.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiStyleVar.gen.cs new file mode 100644 index 0000000..12f06c8 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiStyleVar.gen.cs @@ -0,0 +1,705 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1868 + ///
enum ImGuiStyleVar_ + ///
+ ///
+ /// + /// + /// Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure. + /// - The enum only refers to fields of ImGuiStyle which makes sense to be pushed/popped inside UI code. + /// During initialization or between frames, feel free to just poke into ImGuiStyle directly. + /// - Tip: Use your programming IDE navigation facilities on the names in the _second column_ below to find the actual members and their description. + /// - In Visual Studio: CTRL+comma ("Edit.GoToAll") can follow symbols inside comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. + /// - In Visual Studio w/ Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols inside comments. + /// - In VS Code, CLion, etc.: CTRL+click can follow symbols inside comments. + /// - When changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type. + /// + /// + public enum ImGuiStyleVar : int + { + /// + /// + /// float Alpha + /// + /// + /// C++: + /// imgui.h:1871 + ///
ImGuiStyleVar_Alpha + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + Alpha, + + /// + /// + /// float DisabledAlpha + /// + /// + /// C++: + /// imgui.h:1872 + ///
ImGuiStyleVar_DisabledAlpha + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + DisabledAlpha, + + /// + /// + /// ImVec2 WindowPadding + /// + /// + /// C++: + /// imgui.h:1873 + ///
ImGuiStyleVar_WindowPadding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + WindowPadding, + + /// + /// + /// float WindowRounding + /// + /// + /// C++: + /// imgui.h:1874 + ///
ImGuiStyleVar_WindowRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + WindowRounding, + + /// + /// + /// float WindowBorderSize + /// + /// + /// C++: + /// imgui.h:1875 + ///
ImGuiStyleVar_WindowBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + WindowBorderSize, + + /// + /// + /// ImVec2 WindowMinSize + /// + /// + /// C++: + /// imgui.h:1876 + ///
ImGuiStyleVar_WindowMinSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + WindowMinSize, + + /// + /// + /// ImVec2 WindowTitleAlign + /// + /// + /// C++: + /// imgui.h:1877 + ///
ImGuiStyleVar_WindowTitleAlign + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + WindowTitleAlign, + + /// + /// + /// float ChildRounding + /// + /// + /// C++: + /// imgui.h:1878 + ///
ImGuiStyleVar_ChildRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ChildRounding, + + /// + /// + /// float ChildBorderSize + /// + /// + /// C++: + /// imgui.h:1879 + ///
ImGuiStyleVar_ChildBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ChildBorderSize, + + /// + /// + /// float PopupRounding + /// + /// + /// C++: + /// imgui.h:1880 + ///
ImGuiStyleVar_PopupRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + PopupRounding, + + /// + /// + /// float PopupBorderSize + /// + /// + /// C++: + /// imgui.h:1881 + ///
ImGuiStyleVar_PopupBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + PopupBorderSize, + + /// + /// + /// ImVec2 FramePadding + /// + /// + /// C++: + /// imgui.h:1882 + ///
ImGuiStyleVar_FramePadding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + FramePadding, + + /// + /// + /// float FrameRounding + /// + /// + /// C++: + /// imgui.h:1883 + ///
ImGuiStyleVar_FrameRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + FrameRounding, + + /// + /// + /// float FrameBorderSize + /// + /// + /// C++: + /// imgui.h:1884 + ///
ImGuiStyleVar_FrameBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + FrameBorderSize, + + /// + /// + /// ImVec2 ItemSpacing + /// + /// + /// C++: + /// imgui.h:1885 + ///
ImGuiStyleVar_ItemSpacing + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ItemSpacing, + + /// + /// + /// ImVec2 ItemInnerSpacing + /// + /// + /// C++: + /// imgui.h:1886 + ///
ImGuiStyleVar_ItemInnerSpacing + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ItemInnerSpacing, + + /// + /// + /// float IndentSpacing + /// + /// + /// C++: + /// imgui.h:1887 + ///
ImGuiStyleVar_IndentSpacing + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + IndentSpacing, + + /// + /// + /// ImVec2 CellPadding + /// + /// + /// C++: + /// imgui.h:1888 + ///
ImGuiStyleVar_CellPadding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + CellPadding, + + /// + /// + /// float ScrollbarSize + /// + /// + /// C++: + /// imgui.h:1889 + ///
ImGuiStyleVar_ScrollbarSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ScrollbarSize, + + /// + /// + /// float ScrollbarRounding + /// + /// + /// C++: + /// imgui.h:1890 + ///
ImGuiStyleVar_ScrollbarRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ScrollbarRounding, + + /// + /// + /// float GrabMinSize + /// + /// + /// C++: + /// imgui.h:1891 + ///
ImGuiStyleVar_GrabMinSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + GrabMinSize, + + /// + /// + /// float GrabRounding + /// + /// + /// C++: + /// imgui.h:1892 + ///
ImGuiStyleVar_GrabRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + GrabRounding, + + /// + /// + /// float ImageBorderSize + /// + /// + /// C++: + /// imgui.h:1893 + ///
ImGuiStyleVar_ImageBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ImageBorderSize, + + /// + /// + /// float TabRounding + /// + /// + /// C++: + /// imgui.h:1894 + ///
ImGuiStyleVar_TabRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TabRounding, + + /// + /// + /// float TabBorderSize + /// + /// + /// C++: + /// imgui.h:1895 + ///
ImGuiStyleVar_TabBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TabBorderSize, + + /// + /// + /// float TabMinWidthBase + /// + /// + /// C++: + /// imgui.h:1896 + ///
ImGuiStyleVar_TabMinWidthBase + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TabMinWidthBase, + + /// + /// + /// float TabMinWidthShrink + /// + /// + /// C++: + /// imgui.h:1897 + ///
ImGuiStyleVar_TabMinWidthShrink + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TabMinWidthShrink, + + /// + /// + /// float TabBarBorderSize + /// + /// + /// C++: + /// imgui.h:1898 + ///
ImGuiStyleVar_TabBarBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TabBarBorderSize, + + /// + /// + /// float TabBarOverlineSize + /// + /// + /// C++: + /// imgui.h:1899 + ///
ImGuiStyleVar_TabBarOverlineSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TabBarOverlineSize, + + /// + /// + /// float TableAngledHeadersAngle + /// + /// + /// C++: + /// imgui.h:1900 + ///
ImGuiStyleVar_TableAngledHeadersAngle + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TableAngledHeadersAngle, + + /// + /// + /// ImVec2 TableAngledHeadersTextAlign + /// + /// + /// C++: + /// imgui.h:1901 + ///
ImGuiStyleVar_TableAngledHeadersTextAlign + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TableAngledHeadersTextAlign, + + /// + /// + /// float TreeLinesSize + /// + /// + /// C++: + /// imgui.h:1902 + ///
ImGuiStyleVar_TreeLinesSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TreeLinesSize, + + /// + /// + /// float TreeLinesRounding + /// + /// + /// C++: + /// imgui.h:1903 + ///
ImGuiStyleVar_TreeLinesRounding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + TreeLinesRounding, + + /// + /// + /// ImVec2 ButtonTextAlign + /// + /// + /// C++: + /// imgui.h:1904 + ///
ImGuiStyleVar_ButtonTextAlign + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + ButtonTextAlign, + + /// + /// + /// ImVec2 SelectableTextAlign + /// + /// + /// C++: + /// imgui.h:1905 + ///
ImGuiStyleVar_SelectableTextAlign + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + SelectableTextAlign, + + /// + /// + /// float SeparatorTextBorderSize + /// + /// + /// C++: + /// imgui.h:1906 + ///
ImGuiStyleVar_SeparatorTextBorderSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + SeparatorTextBorderSize, + + /// + /// + /// ImVec2 SeparatorTextAlign + /// + /// + /// C++: + /// imgui.h:1907 + ///
ImGuiStyleVar_SeparatorTextAlign + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + SeparatorTextAlign, + + /// + /// + /// ImVec2 SeparatorTextPadding + /// + /// + /// C++: + /// imgui.h:1908 + ///
ImGuiStyleVar_SeparatorTextPadding + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + SeparatorTextPadding, + + /// + /// + /// float DockingSeparatorSize + /// + /// + /// C++: + /// imgui.h:1909 + ///
ImGuiStyleVar_DockingSeparatorSize + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + DockingSeparatorSize, + + /// + /// + /// C++: + /// imgui.h:1910 + ///
ImGuiStyleVar_COUNT + ///
+ ///
+ /// + /// + /// Enum name -------------------------- // Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + /// + /// + COUNT, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTabBarFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTabBarFlags.gen.cs new file mode 100644 index 0000000..7607724 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTabBarFlags.gen.cs @@ -0,0 +1,238 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1409 + ///
enum ImGuiTabBarFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + [Flags] + public enum ImGuiTabBarFlags : int + { + /// + /// + /// C++: + /// imgui.h:1411 + ///
ImGuiTabBarFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + None = 0, + + /// + /// + /// Allow manually dragging tabs to re-order them + New tabs are appended at the end of list + /// + /// + /// C++: + /// imgui.h:1412 + ///
ImGuiTabBarFlags_Reorderable = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + Reorderable = 1 << 0, + + /// + /// + /// Automatically select new tabs when they appear + /// + /// + /// C++: + /// imgui.h:1413 + ///
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + AutoSelectNewTabs = 1 << 1, + + /// + /// + /// Disable buttons to open the tab list popup + /// + /// + /// C++: + /// imgui.h:1414 + ///
ImGuiTabBarFlags_TabListPopupButton = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + TabListPopupButton = 1 << 2, + + /// + /// + /// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You + /// may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) + /// *p_open = false. + /// + /// + /// C++: + /// imgui.h:1415 + ///
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + NoCloseWithMiddleMouseButton = 1 << 3, + + /// + /// + /// Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) + /// + /// + /// C++: + /// imgui.h:1416 + ///
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + NoTabListScrollingButtons = 1 << 4, + + /// + /// + /// Disable tooltips when hovering a tab + /// + /// + /// C++: + /// imgui.h:1417 + ///
ImGuiTabBarFlags_NoTooltip = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + NoTooltip = 1 << 5, + + /// + /// + /// Draw selected overline markers over selected tab + /// + /// + /// C++: + /// imgui.h:1418 + ///
ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabBar() + /// + /// + DrawSelectedOverline = 1 << 6, + + /// + /// + /// Shrink down tabs when they don't fit, until width is style.TabMinWidthShrink, then enable scrolling + /// buttons. + /// + /// + /// C++: + /// imgui.h:1421 + ///
ImGuiTabBarFlags_FittingPolicyMixed = 1 << 7 + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyMixed = 1 << 7, + + /// + /// + /// Shrink down tabs when they don't fit + /// + /// + /// C++: + /// imgui.h:1422 + ///
ImGuiTabBarFlags_FittingPolicyShrink = 1 << 8 + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyShrink = 1 << 8, + + /// + /// + /// Enable scrolling buttons when tabs don't fit + /// + /// + /// C++: + /// imgui.h:1423 + ///
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 9 + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyScroll = 1 << 9, + + /// + /// + /// C++: + /// imgui.h:1424 + ///
+ /// ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyMixed | ImGuiTabBarFlags_FittingPolicyShrink | ImGuiTabBarFlags_FittingPolicyScroll + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyMask = FittingPolicyMixed | FittingPolicyShrink | FittingPolicyScroll, + + /// + /// + /// C++: + /// imgui.h:1425 + ///
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyMixed + ///
+ ///
+ /// + /// + /// Fitting/Resize policy + /// + /// + FittingPolicyDefault = FittingPolicyMixed, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTabItemFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTabItemFlags.gen.cs new file mode 100644 index 0000000..65a4b22 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTabItemFlags.gen.cs @@ -0,0 +1,193 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1433 + ///
enum ImGuiTabItemFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + [Flags] + public enum ImGuiTabItemFlags : int + { + /// + /// + /// C++: + /// imgui.h:1435 + ///
ImGuiTabItemFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + None = 0, + + /// + /// + /// Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure. + /// + /// + /// C++: + /// imgui.h:1436 + ///
ImGuiTabItemFlags_UnsavedDocument = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + UnsavedDocument = 1 << 0, + + /// + /// + /// Trigger flag to programmatically make the tab selected when calling BeginTabItem() + /// + /// + /// C++: + /// imgui.h:1437 + ///
ImGuiTabItemFlags_SetSelected = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + SetSelected = 1 << 1, + + /// + /// + /// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You + /// may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) + /// *p_open = false. + /// + /// + /// C++: + /// imgui.h:1438 + ///
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoCloseWithMiddleMouseButton = 1 << 2, + + /// + /// + /// Don't call PushID()/PopID() on BeginTabItem()/EndTabItem() + /// + /// + /// C++: + /// imgui.h:1439 + ///
ImGuiTabItemFlags_NoPushId = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoPushId = 1 << 3, + + /// + /// + /// Disable tooltip for the given tab + /// + /// + /// C++: + /// imgui.h:1440 + ///
ImGuiTabItemFlags_NoTooltip = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoTooltip = 1 << 4, + + /// + /// + /// Disable reordering this tab or having another tab cross over this tab + /// + /// + /// C++: + /// imgui.h:1441 + ///
ImGuiTabItemFlags_NoReorder = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoReorder = 1 << 5, + + /// + /// + /// Enforce the tab position to the left of the tab bar (after the tab list popup button) + /// + /// + /// C++: + /// imgui.h:1442 + ///
ImGuiTabItemFlags_Leading = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + Leading = 1 << 6, + + /// + /// + /// Enforce the tab position to the right of the tab bar (before the scrolling buttons) + /// + /// + /// C++: + /// imgui.h:1443 + ///
ImGuiTabItemFlags_Trailing = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + Trailing = 1 << 7, + + /// + /// + /// Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop + /// submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab + /// may reappear at end of tab bar. + /// + /// + /// C++: + /// imgui.h:1444 + ///
ImGuiTabItemFlags_NoAssumedClosure = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTabItem() + /// + /// + NoAssumedClosure = 1 << 8, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTableBgTarget.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTableBgTarget.gen.cs new file mode 100644 index 0000000..12bb912 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTableBgTarget.gen.cs @@ -0,0 +1,127 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:2180 + ///
enum ImGuiTableBgTarget_ + ///
+ ///
+ /// + /// + /// Enum for ImGui::TableSetBgColor() + /// Background colors are rendering in 3 layers: + /// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. + /// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. + /// - Layer 2: draw with CellBg color if set. + /// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. + /// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. + /// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. + /// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. + /// + /// + public enum ImGuiTableBgTarget : int + { + /// + /// + /// C++: + /// imgui.h:2182 + ///
ImGuiTableBgTarget_None = 0 + ///
+ ///
+ /// + /// + /// Enum for ImGui::TableSetBgColor() + /// Background colors are rendering in 3 layers: + /// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. + /// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. + /// - Layer 2: draw with CellBg color if set. + /// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. + /// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. + /// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. + /// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. + /// + /// + None = 0, + + /// + /// + /// Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg + /// is used) + /// + /// + /// C++: + /// imgui.h:2183 + ///
ImGuiTableBgTarget_RowBg0 = 1 + ///
+ ///
+ /// + /// + /// Enum for ImGui::TableSetBgColor() + /// Background colors are rendering in 3 layers: + /// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. + /// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. + /// - Layer 2: draw with CellBg color if set. + /// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. + /// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. + /// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. + /// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. + /// + /// + RowBg0 = 1, + + /// + /// + /// Set row background color 1 (generally used for selection marking) + /// + /// + /// C++: + /// imgui.h:2184 + ///
ImGuiTableBgTarget_RowBg1 = 2 + ///
+ ///
+ /// + /// + /// Enum for ImGui::TableSetBgColor() + /// Background colors are rendering in 3 layers: + /// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. + /// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. + /// - Layer 2: draw with CellBg color if set. + /// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. + /// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. + /// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. + /// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. + /// + /// + RowBg1 = 2, + + /// + /// + /// Set cell background color (top-most color) + /// + /// + /// C++: + /// imgui.h:2185 + ///
ImGuiTableBgTarget_CellBg = 3 + ///
+ ///
+ /// + /// + /// Enum for ImGui::TableSetBgColor() + /// Background colors are rendering in 3 layers: + /// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. + /// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. + /// - Layer 2: draw with CellBg color if set. + /// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. + /// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. + /// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. + /// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. + /// + /// + CellBg = 3, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTableColumnFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTableColumnFlags.gen.cs new file mode 100644 index 0000000..9294858 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTableColumnFlags.gen.cs @@ -0,0 +1,497 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:2127 + ///
enum ImGuiTableColumnFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::TableSetupColumn() + /// + /// + [Flags] + public enum ImGuiTableColumnFlags : int + { + /// + /// + /// C++: + /// imgui.h:2130 + ///
ImGuiTableColumnFlags_None = 0 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + None = 0, + + /// + /// + /// Overriding/master disable flag: hide column, won't show in context menu (unlike calling + /// TableSetColumnEnabled() which manipulates the user accessible state) + /// + /// + /// C++: + /// imgui.h:2131 + ///
ImGuiTableColumnFlags_Disabled = 1 << 0 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + Disabled = 1 << 0, + + /// + /// + /// Default as a hidden/disabled column. + /// + /// + /// C++: + /// imgui.h:2132 + ///
ImGuiTableColumnFlags_DefaultHide = 1 << 1 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + DefaultHide = 1 << 1, + + /// + /// + /// Default as a sorting column. + /// + /// + /// C++: + /// imgui.h:2133 + ///
ImGuiTableColumnFlags_DefaultSort = 1 << 2 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + DefaultSort = 1 << 2, + + /// + /// + /// Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is + /// _SizingStretchSame or _SizingStretchProp). + /// + /// + /// C++: + /// imgui.h:2134 + ///
ImGuiTableColumnFlags_WidthStretch = 1 << 3 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + WidthStretch = 1 << 3, + + /// + /// + /// Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is + /// _SizingFixedFit and table is resizable). + /// + /// + /// C++: + /// imgui.h:2135 + ///
ImGuiTableColumnFlags_WidthFixed = 1 << 4 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + WidthFixed = 1 << 4, + + /// + /// + /// Disable manual resizing. + /// + /// + /// C++: + /// imgui.h:2136 + ///
ImGuiTableColumnFlags_NoResize = 1 << 5 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoResize = 1 << 5, + + /// + /// + /// Disable manual reordering this column, this will also prevent other columns from crossing over this + /// column. + /// + /// + /// C++: + /// imgui.h:2137 + ///
ImGuiTableColumnFlags_NoReorder = 1 << 6 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoReorder = 1 << 6, + + /// + /// + /// Disable ability to hide/disable this column. + /// + /// + /// C++: + /// imgui.h:2138 + ///
ImGuiTableColumnFlags_NoHide = 1 << 7 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoHide = 1 << 7, + + /// + /// + /// Disable clipping for this column (all NoClip columns will render in a same draw command). + /// + /// + /// C++: + /// imgui.h:2139 + ///
ImGuiTableColumnFlags_NoClip = 1 << 8 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoClip = 1 << 8, + + /// + /// + /// Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). + /// + /// + /// C++: + /// imgui.h:2140 + ///
ImGuiTableColumnFlags_NoSort = 1 << 9 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoSort = 1 << 9, + + /// + /// + /// Disable ability to sort in the ascending direction. + /// + /// + /// C++: + /// imgui.h:2141 + ///
ImGuiTableColumnFlags_NoSortAscending = 1 << 10 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoSortAscending = 1 << 10, + + /// + /// + /// Disable ability to sort in the descending direction. + /// + /// + /// C++: + /// imgui.h:2142 + ///
ImGuiTableColumnFlags_NoSortDescending = 1 << 11 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoSortDescending = 1 << 11, + + /// + /// + /// TableHeadersRow() will submit an empty label for this column. Convenient for some small columns. Name + /// will still appear in context menu or in angled headers. You may append into this cell by calling + /// TableSetColumnIndex() right after the TableHeadersRow() call. + /// + /// + /// C++: + /// imgui.h:2143 + ///
ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoHeaderLabel = 1 << 12, + + /// + /// + /// Disable header text width contribution to automatic column width. + /// + /// + /// C++: + /// imgui.h:2144 + ///
ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + NoHeaderWidth = 1 << 13, + + /// + /// + /// Make the initial sort direction Ascending when first sorting on this column (default). + /// + /// + /// C++: + /// imgui.h:2145 + ///
ImGuiTableColumnFlags_PreferSortAscending = 1 << 14 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + PreferSortAscending = 1 << 14, + + /// + /// + /// Make the initial sort direction Descending when first sorting on this column. + /// + /// + /// C++: + /// imgui.h:2146 + ///
ImGuiTableColumnFlags_PreferSortDescending = 1 << 15 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + PreferSortDescending = 1 << 15, + + /// + /// + /// Use current Indent value when entering cell (default for column 0). + /// + /// + /// C++: + /// imgui.h:2147 + ///
ImGuiTableColumnFlags_IndentEnable = 1 << 16 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + IndentEnable = 1 << 16, + + /// + /// + /// Ignore current Indent value when entering cell (default for columns > 0). Indentation changes + /// _within_ the cell will still be honored. + /// + /// + /// C++: + /// imgui.h:2148 + ///
ImGuiTableColumnFlags_IndentDisable = 1 << 17 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + IndentDisable = 1 << 17, + + /// + /// + /// TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row. + /// + /// + /// C++: + /// imgui.h:2149 + ///
ImGuiTableColumnFlags_AngledHeader = 1 << 18 + ///
+ ///
+ /// + /// + /// Input configuration flags + /// + /// + AngledHeader = 1 << 18, + + /// + /// + /// Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. + /// + /// + /// C++: + /// imgui.h:2152 + ///
ImGuiTableColumnFlags_IsEnabled = 1 << 24 + ///
+ ///
+ /// + /// + /// Output status flags, read-only via TableGetColumnFlags() + /// + /// + IsEnabled = 1 << 24, + + /// + /// + /// Status: is visible == is enabled AND not clipped by scrolling. + /// + /// + /// C++: + /// imgui.h:2153 + ///
ImGuiTableColumnFlags_IsVisible = 1 << 25 + ///
+ ///
+ /// + /// + /// Output status flags, read-only via TableGetColumnFlags() + /// + /// + IsVisible = 1 << 25, + + /// + /// + /// Status: is currently part of the sort specs + /// + /// + /// C++: + /// imgui.h:2154 + ///
ImGuiTableColumnFlags_IsSorted = 1 << 26 + ///
+ ///
+ /// + /// + /// Output status flags, read-only via TableGetColumnFlags() + /// + /// + IsSorted = 1 << 26, + + /// + /// + /// Status: is hovered by mouse + /// + /// + /// C++: + /// imgui.h:2155 + ///
ImGuiTableColumnFlags_IsHovered = 1 << 27 + ///
+ ///
+ /// + /// + /// Output status flags, read-only via TableGetColumnFlags() + /// + /// + IsHovered = 1 << 27, + + /// + /// + /// C++: + /// imgui.h:2158 + ///
+ /// ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed + ///
+ ///
+ /// + /// + /// [Internal] Combinations and masks + /// + /// + WidthMask = WidthStretch | WidthFixed, + + /// + /// + /// C++: + /// imgui.h:2159 + ///
+ /// ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable + ///
+ ///
+ /// + /// + /// [Internal] Combinations and masks + /// + /// + IndentMask = IndentEnable | IndentDisable, + + /// + /// + /// C++: + /// imgui.h:2160 + ///
+ /// ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered + ///
+ ///
+ /// + /// + /// [Internal] Combinations and masks + /// + /// + StatusMask = IsEnabled | IsVisible | IsSorted | IsHovered, + + /// + /// + /// [Internal] Disable user resizing this column directly (it may however we resized indirectly from its + /// left edge) + /// + /// + /// C++: + /// imgui.h:2161 + ///
ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30 + ///
+ ///
+ /// + /// + /// [Internal] Combinations and masks + /// + /// + NoDirectResize = 1 << 30, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTableFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTableFlags.gen.cs new file mode 100644 index 0000000..5929af9 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTableFlags.gen.cs @@ -0,0 +1,685 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:2074 + ///
enum ImGuiTableFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::BeginTable() + /// - Important! Sizing policies have complex and subtle side effects, much more so than you would expect. + /// Read comments/demos carefully + experiment with live demos to get acquainted with them. + /// - The DEFAULT sizing policies are: + /// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize. + /// - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off. + /// - When ScrollX is off: + /// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight. + /// - Columns sizing policy allowed: Stretch (default), Fixed/Auto. + /// - Fixed Columns (if any) will generally obtain their requested width (unless the table cannot fit them all). + /// - Stretch Columns will share the remaining width according to their respective weight. + /// - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors. + /// The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns. + /// (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing). + /// - When ScrollX is on: + /// - Table defaults to ImGuiTableFlags_SizingFixedFit -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed + /// - Columns sizing policy allowed: Fixed/Auto mostly. + /// - Fixed Columns can be enlarged as needed. Table will show a horizontal scrollbar if needed. + /// - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop. + /// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable(). + /// If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again. + /// - Read on documentation at the top of imgui_tables.cpp for details. + /// + /// + [Flags] + public enum ImGuiTableFlags : int + { + /// + /// + /// C++: + /// imgui.h:2077 + ///
ImGuiTableFlags_None = 0 + ///
+ ///
+ /// + /// + /// Features + /// + /// + None = 0, + + /// + /// + /// Enable resizing columns. + /// + /// + /// C++: + /// imgui.h:2078 + ///
ImGuiTableFlags_Resizable = 1 << 0 + ///
+ ///
+ /// + /// + /// Features + /// + /// + Resizable = 1 << 0, + + /// + /// + /// Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display + /// headers) + /// + /// + /// C++: + /// imgui.h:2079 + ///
ImGuiTableFlags_Reorderable = 1 << 1 + ///
+ ///
+ /// + /// + /// Features + /// + /// + Reorderable = 1 << 1, + + /// + /// + /// Enable hiding/disabling columns in context menu. + /// + /// + /// C++: + /// imgui.h:2080 + ///
ImGuiTableFlags_Hideable = 1 << 2 + ///
+ ///
+ /// + /// + /// Features + /// + /// + Hideable = 1 << 2, + + /// + /// + /// Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and + /// ImGuiTableFlags_SortTristate. + /// + /// + /// C++: + /// imgui.h:2081 + ///
ImGuiTableFlags_Sortable = 1 << 3 + ///
+ ///
+ /// + /// + /// Features + /// + /// + Sortable = 1 << 3, + + /// + /// + /// Disable persisting columns order, width and sort settings in the .ini file. + /// + /// + /// C++: + /// imgui.h:2082 + ///
ImGuiTableFlags_NoSavedSettings = 1 << 4 + ///
+ ///
+ /// + /// + /// Features + /// + /// + NoSavedSettings = 1 << 4, + + /// + /// + /// Right-click on columns body/contents will display table context menu. By default it is available in + /// TableHeadersRow(). + /// + /// + /// C++: + /// imgui.h:2083 + ///
ImGuiTableFlags_ContextMenuInBody = 1 << 5 + ///
+ ///
+ /// + /// + /// Features + /// + /// + ContextMenuInBody = 1 << 5, + + /// + /// + /// Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling + /// TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually) + /// + /// + /// C++: + /// imgui.h:2085 + ///
ImGuiTableFlags_RowBg = 1 << 6 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + RowBg = 1 << 6, + + /// + /// + /// Draw horizontal borders between rows. + /// + /// + /// C++: + /// imgui.h:2086 + ///
ImGuiTableFlags_BordersInnerH = 1 << 7 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersInnerH = 1 << 7, + + /// + /// + /// Draw horizontal borders at the top and bottom. + /// + /// + /// C++: + /// imgui.h:2087 + ///
ImGuiTableFlags_BordersOuterH = 1 << 8 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersOuterH = 1 << 8, + + /// + /// + /// Draw vertical borders between columns. + /// + /// + /// C++: + /// imgui.h:2088 + ///
ImGuiTableFlags_BordersInnerV = 1 << 9 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersInnerV = 1 << 9, + + /// + /// + /// Draw vertical borders on the left and right sides. + /// + /// + /// C++: + /// imgui.h:2089 + ///
ImGuiTableFlags_BordersOuterV = 1 << 10 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersOuterV = 1 << 10, + + /// + /// + /// Draw horizontal borders. + /// + /// + /// C++: + /// imgui.h:2090 + ///
ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersH = BordersInnerH | BordersOuterH, + + /// + /// + /// Draw vertical borders. + /// + /// + /// C++: + /// imgui.h:2091 + ///
ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersV = BordersInnerV | BordersOuterV, + + /// + /// + /// Draw inner borders. + /// + /// + /// C++: + /// imgui.h:2092 + ///
ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersInner = BordersInnerV | BordersInnerH, + + /// + /// + /// Draw outer borders. + /// + /// + /// C++: + /// imgui.h:2093 + ///
ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + BordersOuter = BordersOuterV | BordersOuterH, + + /// + /// + /// Draw all borders. + /// + /// + /// C++: + /// imgui.h:2094 + ///
ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + Borders = BordersInner | BordersOuter, + + /// + /// + /// [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move + /// to style + /// + /// + /// C++: + /// imgui.h:2095 + ///
ImGuiTableFlags_NoBordersInBody = 1 << 11 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + NoBordersInBody = 1 << 11, + + /// + /// + /// [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in + /// Headers). -> May move to style + /// + /// + /// C++: + /// imgui.h:2096 + ///
ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12 + ///
+ ///
+ /// + /// + /// Decorations + /// + /// + NoBordersInBodyUntilResize = 1 << 12, + + /// + /// + /// Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width. + /// + /// + /// C++: + /// imgui.h:2098 + ///
ImGuiTableFlags_SizingFixedFit = 1 << 13 + ///
+ ///
+ /// + /// + /// Sizing Policy (read above for defaults) + /// + /// + SizingFixedFit = 1 << 13, + + /// + /// + /// Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum + /// contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible. + /// + /// + /// C++: + /// imgui.h:2099 + ///
ImGuiTableFlags_SizingFixedSame = 2 << 13 + ///
+ ///
+ /// + /// + /// Sizing Policy (read above for defaults) + /// + /// + SizingFixedSame = 2 << 13, + + /// + /// + /// Columns default to _WidthStretch with default weights proportional to each columns contents widths. + /// + /// + /// C++: + /// imgui.h:2100 + ///
ImGuiTableFlags_SizingStretchProp = 3 << 13 + ///
+ ///
+ /// + /// + /// Sizing Policy (read above for defaults) + /// + /// + SizingStretchProp = 3 << 13, + + /// + /// + /// Columns default to _WidthStretch with default weights all equal, unless overridden by + /// TableSetupColumn(). + /// + /// + /// C++: + /// imgui.h:2101 + ///
ImGuiTableFlags_SizingStretchSame = 4 << 13 + ///
+ ///
+ /// + /// + /// Sizing Policy (read above for defaults) + /// + /// + SizingStretchSame = 4 << 13, + + /// + /// + /// Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY + /// are disabled and Stretch columns are not used. + /// + /// + /// C++: + /// imgui.h:2103 + ///
ImGuiTableFlags_NoHostExtendX = 1 << 16 + ///
+ ///
+ /// + /// + /// Sizing Extra Options + /// + /// + NoHostExtendX = 1 << 16, + + /// + /// + /// Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only + /// available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible. + /// + /// + /// C++: + /// imgui.h:2104 + ///
ImGuiTableFlags_NoHostExtendY = 1 << 17 + ///
+ ///
+ /// + /// + /// Sizing Extra Options + /// + /// + NoHostExtendY = 1 << 17, + + /// + /// + /// Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not + /// recommended if columns are resizable. + /// + /// + /// C++: + /// imgui.h:2105 + ///
ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18 + ///
+ ///
+ /// + /// + /// Sizing Extra Options + /// + /// + NoKeepColumnsVisible = 1 << 18, + + /// + /// + /// Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 + /// columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing + /// will appear to be less smooth. + /// + /// + /// C++: + /// imgui.h:2106 + ///
ImGuiTableFlags_PreciseWidths = 1 << 19 + ///
+ ///
+ /// + /// + /// Sizing Extra Options + /// + /// + PreciseWidths = 1 << 19, + + /// + /// + /// Disable clipping rectangle for every individual columns (reduce draw command count, items will be able + /// to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). + /// + /// + /// C++: + /// imgui.h:2108 + ///
ImGuiTableFlags_NoClip = 1 << 20 + ///
+ ///
+ /// + /// + /// Clipping + /// + /// + NoClip = 1 << 20, + + /// + /// + /// Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers. + /// + /// + /// C++: + /// imgui.h:2110 + ///
ImGuiTableFlags_PadOuterX = 1 << 21 + ///
+ ///
+ /// + /// + /// Padding + /// + /// + PadOuterX = 1 << 21, + + /// + /// + /// Default if BordersOuterV is off. Disable outermost padding. + /// + /// + /// C++: + /// imgui.h:2111 + ///
ImGuiTableFlags_NoPadOuterX = 1 << 22 + ///
+ ///
+ /// + /// + /// Padding + /// + /// + NoPadOuterX = 1 << 22, + + /// + /// + /// Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding + /// if BordersOuterV is off). + /// + /// + /// C++: + /// imgui.h:2112 + ///
ImGuiTableFlags_NoPadInnerX = 1 << 23 + ///
+ ///
+ /// + /// + /// Padding + /// + /// + NoPadInnerX = 1 << 23, + + /// + /// + /// Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container + /// size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally + /// recommended when using ScrollX. + /// + /// + /// C++: + /// imgui.h:2114 + ///
ImGuiTableFlags_ScrollX = 1 << 24 + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + ScrollX = 1 << 24, + + /// + /// + /// Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. + /// + /// + /// C++: + /// imgui.h:2115 + ///
ImGuiTableFlags_ScrollY = 1 << 25 + ///
+ ///
+ /// + /// + /// Scrolling + /// + /// + ScrollY = 1 << 25, + + /// + /// + /// Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where + /// (SpecsCount > 1). + /// + /// + /// C++: + /// imgui.h:2117 + ///
ImGuiTableFlags_SortMulti = 1 << 26 + ///
+ ///
+ /// + /// + /// Sorting + /// + /// + SortMulti = 1 << 26, + + /// + /// + /// Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). + /// + /// + /// C++: + /// imgui.h:2118 + ///
ImGuiTableFlags_SortTristate = 1 << 27 + ///
+ ///
+ /// + /// + /// Sorting + /// + /// + SortTristate = 1 << 27, + + /// + /// + /// Highlight column headers when hovered (may evolve into a fuller highlight) + /// + /// + /// C++: + /// imgui.h:2120 + ///
ImGuiTableFlags_HighlightHoveredColumn = 1 << 28 + ///
+ ///
+ /// + /// + /// Miscellaneous + /// + /// + HighlightHoveredColumn = 1 << 28, + + /// + /// + /// C++: + /// imgui.h:2123 + ///
+ /// ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame + ///
+ ///
+ /// + /// + /// [Internal] Combinations and masks + /// + /// + SizingMask = SizingFixedFit | SizingFixedSame | SizingStretchProp | SizingStretchSame, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTableRowFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTableRowFlags.gen.cs new file mode 100644 index 0000000..c99b3dd --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTableRowFlags.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:2165 + ///
enum ImGuiTableRowFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::TableNextRow() + /// + /// + [Flags] + public enum ImGuiTableRowFlags : int + { + /// + /// + /// C++: + /// imgui.h:2167 + ///
ImGuiTableRowFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TableNextRow() + /// + /// + None = 0, + + /// + /// + /// Identify header row (set default background color + width of its contents accounted differently for auto + /// column width) + /// + /// + /// C++: + /// imgui.h:2168 + ///
ImGuiTableRowFlags_Headers = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TableNextRow() + /// + /// + Headers = 1 << 0, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiTreeNodeFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiTreeNodeFlags.gen.cs new file mode 100644 index 0000000..a665228 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiTreeNodeFlags.gen.cs @@ -0,0 +1,403 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1315 + ///
enum ImGuiTreeNodeFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + [Flags] + public enum ImGuiTreeNodeFlags : int + { + /// + /// + /// C++: + /// imgui.h:1317 + ///
ImGuiTreeNodeFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + None = 0, + + /// + /// + /// Draw as selected + /// + /// + /// C++: + /// imgui.h:1318 + ///
ImGuiTreeNodeFlags_Selected = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Selected = 1 << 0, + + /// + /// + /// Draw frame with background (e.g. for CollapsingHeader) + /// + /// + /// C++: + /// imgui.h:1319 + ///
ImGuiTreeNodeFlags_Framed = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Framed = 1 << 1, + + /// + /// + /// Hit testing to allow subsequent widgets to overlap this one + /// + /// + /// C++: + /// imgui.h:1320 + ///
ImGuiTreeNodeFlags_AllowOverlap = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + AllowOverlap = 1 << 2, + + /// + /// + /// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack + /// + /// + /// C++: + /// imgui.h:1321 + ///
ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + NoTreePushOnOpen = 1 << 3, + + /// + /// + /// Don't automatically and temporarily open node when Logging is active (by default logging will + /// automatically open tree nodes) + /// + /// + /// C++: + /// imgui.h:1322 + ///
ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + NoAutoOpenOnLog = 1 << 4, + + /// + /// + /// Default node to be open + /// + /// + /// C++: + /// imgui.h:1323 + ///
ImGuiTreeNodeFlags_DefaultOpen = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + DefaultOpen = 1 << 5, + + /// + /// + /// Open on double-click instead of simple click (default for multi-select unless any _OpenOnXXX behavior is + /// set explicitly). Both behaviors may be combined. + /// + /// + /// C++: + /// imgui.h:1324 + ///
ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + OpenOnDoubleClick = 1 << 6, + + /// + /// + /// Open when clicking on the arrow part (default for multi-select unless any _OpenOnXXX behavior is set + /// explicitly). Both behaviors may be combined. + /// + /// + /// C++: + /// imgui.h:1325 + ///
ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + OpenOnArrow = 1 << 7, + + /// + /// + /// No collapsing, no arrow (use as a convenience for leaf nodes). + /// + /// + /// C++: + /// imgui.h:1326 + ///
ImGuiTreeNodeFlags_Leaf = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Leaf = 1 << 8, + + /// + /// + /// Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the + /// _Leaf flag! + /// + /// + /// C++: + /// imgui.h:1327 + ///
ImGuiTreeNodeFlags_Bullet = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + Bullet = 1 << 9, + + /// + /// + /// Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget + /// height. Equivalent to calling AlignTextToFramePadding() before the node. + /// + /// + /// C++: + /// imgui.h:1328 + ///
ImGuiTreeNodeFlags_FramePadding = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + FramePadding = 1 << 10, + + /// + /// + /// Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow + /// adding other items on the same line without using AllowOverlap mode. + /// + /// + /// C++: + /// imgui.h:1329 + ///
ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanAvailWidth = 1 << 11, + + /// + /// + /// Extend hit box to the left-most and right-most edges (cover the indent area). + /// + /// + /// C++: + /// imgui.h:1330 + ///
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanFullWidth = 1 << 12, + + /// + /// + /// Narrow hit box + narrow hovering highlight, will only cover the label text. + /// + /// + /// C++: + /// imgui.h:1331 + ///
ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanLabelWidth = 1 << 13, + + /// + /// + /// Frame will span all columns of its container table (label will still fit in current column) + /// + /// + /// C++: + /// imgui.h:1332 + ///
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + SpanAllColumns = 1 << 14, + + /// + /// + /// Label will span all columns of its container table + /// + /// + /// C++: + /// imgui.h:1333 + ///
ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + LabelSpanAllColumns = 1 << 15, + + /// + /// + /// Nav: left arrow moves back to parent. This is processed in TreePop() when there's an unfullfilled Left + /// nav request remaining. + /// + /// + /// C++: + /// imgui.h:1335 + ///
ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17 + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + NavLeftJumpsToParent = 1 << 17, + + /// + /// + /// C++: + /// imgui.h:1336 + ///
+ /// ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog + ///
+ ///
+ /// + /// + /// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() + /// + /// + CollapsingHeader = Framed | NoTreePushOnOpen | NoAutoOpenOnLog, + + /// + /// + /// No lines drawn + /// + /// + /// C++: + /// imgui.h:1340 + ///
ImGuiTreeNodeFlags_DrawLinesNone = 1 << 18 + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920. + /// Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls. + /// + /// + DrawLinesNone = 1 << 18, + + /// + /// + /// Horizontal lines to child nodes. Vertical line drawn down to TreePop() position: cover full contents. + /// Faster (for large trees). + /// + /// + /// C++: + /// imgui.h:1341 + ///
ImGuiTreeNodeFlags_DrawLinesFull = 1 << 19 + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920. + /// Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls. + /// + /// + DrawLinesFull = 1 << 19, + + /// + /// + /// Horizontal lines to child nodes. Vertical line drawn down to bottom-most child node. Slower (for large + /// trees). + /// + /// + /// C++: + /// imgui.h:1342 + ///
ImGuiTreeNodeFlags_DrawLinesToNodes = 1 << 20 + ///
+ ///
+ /// + /// + /// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920. + /// Default value is pulled from style.TreeLinesFlags. May be overridden in TreeNode calls. + /// + /// + DrawLinesToNodes = 1 << 20, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiViewportFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiViewportFlags.gen.cs new file mode 100644 index 0000000..09cb05f --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiViewportFlags.gen.cs @@ -0,0 +1,282 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3989 + ///
enum ImGuiViewportFlags_ + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + [Flags] + public enum ImGuiViewportFlags : int + { + /// + /// + /// C++: + /// imgui.h:3991 + ///
ImGuiViewportFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + None = 0, + + /// + /// + /// Represent a Platform Window + /// + /// + /// C++: + /// imgui.h:3992 + ///
ImGuiViewportFlags_IsPlatformWindow = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + IsPlatformWindow = 1 << 0, + + /// + /// + /// Represent a Platform Monitor (unused yet) + /// + /// + /// C++: + /// imgui.h:3993 + ///
ImGuiViewportFlags_IsPlatformMonitor = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + IsPlatformMonitor = 1 << 1, + + /// + /// + /// Platform Window: Is created/managed by the user application? (rather than our backend) + /// + /// + /// C++: + /// imgui.h:3994 + ///
ImGuiViewportFlags_OwnedByApp = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + OwnedByApp = 1 << 2, + + /// + /// + /// Platform Window: Disable platform decorations: title bar, borders, etc. (generally set all windows, but + /// if ImGuiConfigFlags_ViewportsDecoration is set we only set this on popups/tooltips) + /// + /// + /// C++: + /// imgui.h:3995 + ///
ImGuiViewportFlags_NoDecoration = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoDecoration = 1 << 3, + + /// + /// + /// Platform Window: Disable platform task bar icon (generally set on popups/tooltips, or all windows if + /// ImGuiConfigFlags_ViewportsNoTaskBarIcon is set) + /// + /// + /// C++: + /// imgui.h:3996 + ///
ImGuiViewportFlags_NoTaskBarIcon = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoTaskBarIcon = 1 << 4, + + /// + /// + /// Platform Window: Don't take focus when created. + /// + /// + /// C++: + /// imgui.h:3997 + ///
ImGuiViewportFlags_NoFocusOnAppearing = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoFocusOnAppearing = 1 << 5, + + /// + /// + /// Platform Window: Don't take focus when clicked on. + /// + /// + /// C++: + /// imgui.h:3998 + ///
ImGuiViewportFlags_NoFocusOnClick = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoFocusOnClick = 1 << 6, + + /// + /// + /// Platform Window: Make mouse pass through so we can drag this window while peaking behind it. + /// + /// + /// C++: + /// imgui.h:3999 + ///
ImGuiViewportFlags_NoInputs = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoInputs = 1 << 7, + + /// + /// + /// Platform Window: Renderer doesn't need to clear the framebuffer ahead (because we will fill it + /// entirely). + /// + /// + /// C++: + /// imgui.h:4000 + ///
ImGuiViewportFlags_NoRendererClear = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoRendererClear = 1 << 8, + + /// + /// + /// Platform Window: Avoid merging this window into another host window. This can only be set via + /// ImGuiWindowClass viewport flags override (because we need to now ahead if we are going to create a + /// viewport in the first place!). + /// + /// + /// C++: + /// imgui.h:4001 + ///
ImGuiViewportFlags_NoAutoMerge = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + NoAutoMerge = 1 << 9, + + /// + /// + /// Platform Window: Display on top (for tooltips only). + /// + /// + /// C++: + /// imgui.h:4002 + ///
ImGuiViewportFlags_TopMost = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + TopMost = 1 << 10, + + /// + /// + /// Viewport can host multiple imgui windows (secondary viewports are associated to a single window). // + /// FIXME: In practice there's still probably code making the assumption that this is always and only on the + /// MainViewport. Will fix once we add support for "no main viewport". + /// + /// + /// C++: + /// imgui.h:4003 + ///
ImGuiViewportFlags_CanHostOtherWindows = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags stored in ImGuiViewport::Flags, giving indications to the platform backends. + /// + /// + CanHostOtherWindows = 1 << 11, + + /// + /// + /// Platform Window: Window is minimized, can skip render. When minimized we tend to avoid using the + /// viewport pos/size for clipping window or testing if they are contained in the viewport. + /// + /// + /// C++: + /// imgui.h:4006 + ///
ImGuiViewportFlags_IsMinimized = 1 << 12 + ///
+ ///
+ /// + /// + /// Output status flags (from Platform) + /// + /// + IsMinimized = 1 << 12, + + /// + /// + /// Platform Window: Window is focused (last call to Platform_GetWindowFocus() returned true) + /// + /// + /// C++: + /// imgui.h:4007 + ///
ImGuiViewportFlags_IsFocused = 1 << 13 + ///
+ ///
+ /// + /// + /// Output status flags (from Platform) + /// + /// + IsFocused = 1 << 13, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImGuiWindowFlags.gen.cs b/Brutal.ImGui/Generated/Enums/ImGuiWindowFlags.gen.cs new file mode 100644 index 0000000..5b247a1 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImGuiWindowFlags.gen.cs @@ -0,0 +1,555 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:1188 + ///
enum ImGuiWindowFlags_ + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + [Flags] + public enum ImGuiWindowFlags : int + { + /// + /// + /// C++: + /// imgui.h:1190 + ///
ImGuiWindowFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + None = 0, + + /// + /// + /// Disable title-bar + /// + /// + /// C++: + /// imgui.h:1191 + ///
ImGuiWindowFlags_NoTitleBar = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoTitleBar = 1 << 0, + + /// + /// + /// Disable user resizing with the lower-right grip + /// + /// + /// C++: + /// imgui.h:1192 + ///
ImGuiWindowFlags_NoResize = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoResize = 1 << 1, + + /// + /// + /// Disable user moving the window + /// + /// + /// C++: + /// imgui.h:1193 + ///
ImGuiWindowFlags_NoMove = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoMove = 1 << 2, + + /// + /// + /// Disable scrollbars (window can still scroll with mouse or programmatically) + /// + /// + /// C++: + /// imgui.h:1194 + ///
ImGuiWindowFlags_NoScrollbar = 1 << 3 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoScrollbar = 1 << 3, + + /// + /// + /// Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to + /// the parent unless NoScrollbar is also set. + /// + /// + /// C++: + /// imgui.h:1195 + ///
ImGuiWindowFlags_NoScrollWithMouse = 1 << 4 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoScrollWithMouse = 1 << 4, + + /// + /// + /// Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. + /// within a docking node). + /// + /// + /// C++: + /// imgui.h:1196 + ///
ImGuiWindowFlags_NoCollapse = 1 << 5 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoCollapse = 1 << 5, + + /// + /// + /// Resize every window to its content every frame + /// + /// + /// C++: + /// imgui.h:1197 + ///
ImGuiWindowFlags_AlwaysAutoResize = 1 << 6 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + AlwaysAutoResize = 1 << 6, + + /// + /// + /// Disable drawing background color (WindowBg, etc.) and outside border. Similar as using + /// SetNextWindowBgAlpha(0.0f). + /// + /// + /// C++: + /// imgui.h:1198 + ///
ImGuiWindowFlags_NoBackground = 1 << 7 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoBackground = 1 << 7, + + /// + /// + /// Never load/save settings in .ini file + /// + /// + /// C++: + /// imgui.h:1199 + ///
ImGuiWindowFlags_NoSavedSettings = 1 << 8 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoSavedSettings = 1 << 8, + + /// + /// + /// Disable catching mouse, hovering test with pass through. + /// + /// + /// C++: + /// imgui.h:1200 + ///
ImGuiWindowFlags_NoMouseInputs = 1 << 9 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoMouseInputs = 1 << 9, + + /// + /// + /// Has a menu-bar + /// + /// + /// C++: + /// imgui.h:1201 + ///
ImGuiWindowFlags_MenuBar = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + MenuBar = 1 << 10, + + /// + /// + /// Allow horizontal scrollbar to appear (off by default). You may use + /// SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in + /// imgui_demo in the "Horizontal Scrolling" section. + /// + /// + /// C++: + /// imgui.h:1202 + ///
ImGuiWindowFlags_HorizontalScrollbar = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + HorizontalScrollbar = 1 << 11, + + /// + /// + /// Disable taking focus when transitioning from hidden to visible state + /// + /// + /// C++: + /// imgui.h:1203 + ///
ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoFocusOnAppearing = 1 << 12, + + /// + /// + /// Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it + /// focus) + /// + /// + /// C++: + /// imgui.h:1204 + ///
ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoBringToFrontOnFocus = 1 << 13, + + /// + /// + /// Always show vertical scrollbar (even if ContentSize.y < Size.y) + /// + /// + /// C++: + /// imgui.h:1205 + ///
ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + AlwaysVerticalScrollbar = 1 << 14, + + /// + /// + /// Always show horizontal scrollbar (even if ContentSize.x < Size.x) + /// + /// + /// C++: + /// imgui.h:1206 + ///
ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + AlwaysHorizontalScrollbar = 1 << 15, + + /// + /// + /// No keyboard/gamepad navigation within the window + /// + /// + /// C++: + /// imgui.h:1207 + ///
ImGuiWindowFlags_NoNavInputs = 1 << 16 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoNavInputs = 1 << 16, + + /// + /// + /// No focusing toward this window with keyboard/gamepad navigation (e.g. skipped by CTRL+TAB) + /// + /// + /// C++: + /// imgui.h:1208 + ///
ImGuiWindowFlags_NoNavFocus = 1 << 17 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoNavFocus = 1 << 17, + + /// + /// + /// Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + /// + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed + /// when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. + /// + /// + /// C++: + /// imgui.h:1209 + ///
ImGuiWindowFlags_UnsavedDocument = 1 << 18 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + UnsavedDocument = 1 << 18, + + /// + /// + /// Disable docking of this window + /// + /// + /// C++: + /// imgui.h:1210 + ///
ImGuiWindowFlags_NoDocking = 1 << 19 + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoDocking = 1 << 19, + + /// + /// + /// C++: + /// imgui.h:1211 + ///
ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoNav = NoNavInputs | NoNavFocus, + + /// + /// + /// C++: + /// imgui.h:1212 + ///
+ /// ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoDecoration = NoTitleBar | NoResize | NoScrollbar | NoCollapse, + + /// + /// + /// C++: + /// imgui.h:1213 + ///
+ /// ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus + ///
+ ///
+ /// + /// + /// Flags for ImGui::Begin() + /// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly) + /// + /// + NoInputs = NoMouseInputs | NoNavInputs | NoNavFocus, + + /// + /// + /// Don't use! For internal use by Begin()/NewFrame() + /// + /// + /// C++: + /// imgui.h:1216 + ///
ImGuiWindowFlags_DockNodeHost = 1 << 23 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + DockNodeHost = 1 << 23, + + /// + /// + /// Don't use! For internal use by BeginChild() + /// + /// + /// C++: + /// imgui.h:1217 + ///
ImGuiWindowFlags_ChildWindow = 1 << 24 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + ChildWindow = 1 << 24, + + /// + /// + /// Don't use! For internal use by BeginTooltip() + /// + /// + /// C++: + /// imgui.h:1218 + ///
ImGuiWindowFlags_Tooltip = 1 << 25 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + Tooltip = 1 << 25, + + /// + /// + /// Don't use! For internal use by BeginPopup() + /// + /// + /// C++: + /// imgui.h:1219 + ///
ImGuiWindowFlags_Popup = 1 << 26 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + Popup = 1 << 26, + + /// + /// + /// Don't use! For internal use by BeginPopupModal() + /// + /// + /// C++: + /// imgui.h:1220 + ///
ImGuiWindowFlags_Modal = 1 << 27 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + Modal = 1 << 27, + + /// + /// + /// Don't use! For internal use by BeginMenu() + /// + /// + /// C++: + /// imgui.h:1221 + ///
ImGuiWindowFlags_ChildMenu = 1 << 28 + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + ChildMenu = 1 << 28, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImTextureFormat.gen.cs b/Brutal.ImGui/Generated/Enums/ImTextureFormat.gen.cs new file mode 100644 index 0000000..682e33c --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImTextureFormat.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3533 + ///
enum ImTextureFormat + ///
+ ///
+ /// + /// + /// We intentionally support a limited amount of texture formats to limit burden on CPU-side code and extension. + /// Most standard backends only support RGBA32 but we provide a single channel option for low-resource/embedded systems. + /// + /// + public enum ImTextureFormat : int + { + /// + /// + /// 4 components per pixel, each is unsigned 8-bit. Total size = TexWidth * TexHeight * 4 + /// + /// + /// C++: + /// imgui.h:3535 + ///
ImTextureFormat_RGBA32 + ///
+ ///
+ /// + /// + /// We intentionally support a limited amount of texture formats to limit burden on CPU-side code and extension. + /// Most standard backends only support RGBA32 but we provide a single channel option for low-resource/embedded systems. + /// + /// + RGBA32, + + /// + /// + /// 1 component per pixel, each is unsigned 8-bit. Total size = TexWidth * TexHeight + /// + /// + /// C++: + /// imgui.h:3536 + ///
ImTextureFormat_Alpha8 + ///
+ ///
+ /// + /// + /// We intentionally support a limited amount of texture formats to limit burden on CPU-side code and extension. + /// Most standard backends only support RGBA32 but we provide a single channel option for low-resource/embedded systems. + /// + /// + Alpha8, + } +} diff --git a/Brutal.ImGui/Generated/Enums/ImTextureStatus.gen.cs b/Brutal.ImGui/Generated/Enums/ImTextureStatus.gen.cs new file mode 100644 index 0000000..b0b8f94 --- /dev/null +++ b/Brutal.ImGui/Generated/Enums/ImTextureStatus.gen.cs @@ -0,0 +1,104 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3540 + ///
enum ImTextureStatus + ///
+ ///
+ /// + /// + /// Status of a texture to communicate with Renderer Backend. + /// + /// + public enum ImTextureStatus : int + { + /// + /// + /// C++: + /// imgui.h:3542 + ///
ImTextureStatus_OK + ///
+ ///
+ /// + /// + /// Status of a texture to communicate with Renderer Backend. + /// + /// + OK, + + /// + /// + /// Backend destroyed the texture. + /// + /// + /// C++: + /// imgui.h:3543 + ///
ImTextureStatus_Destroyed + ///
+ ///
+ /// + /// + /// Status of a texture to communicate with Renderer Backend. + /// + /// + Destroyed, + + /// + /// + /// Requesting backend to create the texture. Set status OK when done. + /// + /// + /// C++: + /// imgui.h:3544 + ///
ImTextureStatus_WantCreate + ///
+ ///
+ /// + /// + /// Status of a texture to communicate with Renderer Backend. + /// + /// + WantCreate, + + /// + /// + /// Requesting backend to update specific blocks of pixels (write to texture portions which have never been + /// used before). Set status OK when done. + /// + /// + /// C++: + /// imgui.h:3545 + ///
ImTextureStatus_WantUpdates + ///
+ ///
+ /// + /// + /// Status of a texture to communicate with Renderer Backend. + /// + /// + WantUpdates, + + /// + /// + /// Requesting backend to destroy the texture. Set status to Destroyed when done. + /// + /// + /// C++: + /// imgui.h:3546 + ///
ImTextureStatus_WantDestroy + ///
+ ///
+ /// + /// + /// Status of a texture to communicate with Renderer Backend. + /// + /// + WantDestroy, + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImDrawCmd.gen.cs b/Brutal.ImGui/Generated/Functions/ImDrawCmd.gen.cs new file mode 100644 index 0000000..c06ff43 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImDrawCmd.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImDrawCmdExtensions + { + /// + /// + /// == (TexRef._TexData ? TexRef._TexData->TexID : TexRef._TexID + /// + /// + /// C++: + /// imgui.h:3251 + ///
inline ImTextureID GetTexID() const + ///
+ ///
+ /// + /// + /// Since 1.83: returns ImTextureID associated with this draw call. Warning: DO NOT assume this is always same as 'TextureId' (we will change this function for an upcoming feature) + /// Since 1.92: removed ImDrawCmd::TextureId field, the getter function must be used! + /// + /// + public static unsafe ImTextureID GetTexID(this ImDrawCmdPtr target) => PInvoke.ImDrawCmd_GetTexID(target); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImDrawData.gen.cs b/Brutal.ImGui/Generated/Functions/ImDrawData.gen.cs new file mode 100644 index 0000000..385bc0e --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImDrawData.gen.cs @@ -0,0 +1,102 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImDrawDataExtensions + { + /// + /// + /// C++: + /// imgui.h:3515 + /// , + /// imgui_draw.cpp:2252 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe void Clear(this ImDrawDataPtr target) => PInvoke.ImDrawData_Clear(target); + + /// + /// + /// Helper to add an external draw list into an existing ImDrawData. + /// + /// + /// C++: + /// imgui.h:3516 + /// , + /// imgui_draw.cpp:2309 + ///
void AddDrawList(ImDrawList* draw_list) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe void AddDrawList(this ImDrawDataPtr target, ImDrawListPtr drawList) => + PInvoke.ImDrawData_AddDrawList(target, drawList); + + /// + /// + /// Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this + /// is slow and most likely a waste of resources. Always prefer indexed rendering! + /// + /// + /// C++: + /// imgui.h:3517 + /// , + /// imgui_draw.cpp:2317 + ///
void DeIndexAllBuffers() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render + /// indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering! + /// + /// + public static unsafe void DeIndexAllBuffers(this ImDrawDataPtr target) => + PInvoke.ImDrawData_DeIndexAllBuffers(target); + + /// + /// + /// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different + /// scale than Dear ImGui expects, or if there is a difference between your window resolution and + /// framebuffer resolution. + /// + /// + /// C++: + /// imgui.h:3518 + /// , + /// imgui_draw.cpp:2337 + ///
void ScaleClipRects(const ImVec2& fb_scale) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Helper to scale the ClipRect field of each ImDrawCmd. + /// Use if your final output buffer is at a different scale than draw_data->DisplaySize, + /// or if there is a difference between your window resolution and framebuffer resolution. + /// + /// + public static unsafe void ScaleClipRects(this ImDrawDataPtr target, in float2 fbScale) + { + fixed (float2* fbScale_fixed = &fbScale) + { + PInvoke.ImDrawData_ScaleClipRects(target, fbScale_fixed); + } + } + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImDrawList.gen.cs b/Brutal.ImGui/Generated/Functions/ImDrawList.gen.cs new file mode 100644 index 0000000..7a78b14 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImDrawList.gen.cs @@ -0,0 +1,2069 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImDrawListExtensions + { + /// + /// + /// Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse + /// clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget + /// culling) + /// + /// + /// C++: + /// imgui.h:3369 + /// , + /// imgui_draw.cpp:651 + ///
+ /// void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false) + ///
+ ///
+ /// + /// + /// Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse + /// clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget + /// culling) + /// + /// + public static unsafe void PushClipRect( + this ImDrawListPtr target, + in float2 clipRectMin, + in float2 clipRectMax, + bool intersectWithCurrentClipRect = false + ) + { + fixed (float2* clipRectMax_fixed = &clipRectMax) + { + fixed (float2* clipRectMin_fixed = &clipRectMin) + { + PInvoke.ImDrawList_PushClipRect( + target, + clipRectMin_fixed, + clipRectMax_fixed, + intersectWithCurrentClipRect + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3370 + /// , + /// imgui_draw.cpp:670 + ///
void PushClipRectFullScreen() + ///
+ ///
+ public static unsafe void PushClipRectFullScreen(this ImDrawListPtr target) => + PInvoke.ImDrawList_PushClipRectFullScreen(target); + + /// + /// + /// C++: + /// imgui.h:3371 + /// , + /// imgui_draw.cpp:675 + ///
void PopClipRect() + ///
+ ///
+ public static unsafe void PopClipRect(this ImDrawListPtr target) => PInvoke.ImDrawList_PopClipRect(target); + + /// + /// + /// C++: + /// imgui.h:3372 + /// , + /// imgui_draw.cpp:682 + ///
void PushTexture(ImTextureRef tex_ref) + ///
+ ///
+ public static unsafe void PushTexture(this ImDrawListPtr target, ImTextureRef texRef) => + PInvoke.ImDrawList_PushTexture(target, texRef); + + /// + /// + /// C++: + /// imgui.h:3373 + /// , + /// imgui_draw.cpp:691 + ///
void PopTexture() + ///
+ ///
+ public static unsafe void PopTexture(this ImDrawListPtr target) => PInvoke.ImDrawList_PopTexture(target); + + /// + /// + /// C++: + /// imgui.h:3374 + ///
inline ImVec2 GetClipRectMin() const + ///
+ ///
+ public static unsafe float2 GetClipRectMin(this ImDrawListPtr target) => + PInvoke.ImDrawList_GetClipRectMin(target); + + /// + /// + /// C++: + /// imgui.h:3375 + ///
inline ImVec2 GetClipRectMax() const + ///
+ ///
+ public static unsafe float2 GetClipRectMax(this ImDrawListPtr target) => + PInvoke.ImDrawList_GetClipRectMax(target); + + /// + /// + /// C++: + /// imgui.h:3384 + /// , + /// imgui_draw.cpp:1479 + ///
void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddLine( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + ImColor8 col, + float thickness = 1f + ) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddLine(target, p1_fixed, p2_fixed, col, thickness); + } + } + } + + /// + /// + /// a: upper-left, b: lower-right (== upper-left + size) + /// + /// + /// C++: + /// imgui.h:3385 + /// , + /// imgui_draw.cpp:1490 + ///
+ /// void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// p_min = upper-left, p_max = lower-right + /// Note we don't render 1 pixels sized rectangles properly. + /// + /// + public static unsafe void AddRect( + this ImDrawListPtr target, + in float2 pMin, + in float2 pMax, + ImColor8 col, + float rounding = 0f, + ImDrawFlags flags = default, + float thickness = 1f + ) + { + fixed (float2* pMax_fixed = &pMax) + { + fixed (float2* pMin_fixed = &pMin) + { + PInvoke.ImDrawList_AddRect(target, pMin_fixed, pMax_fixed, col, rounding, flags, thickness); + } + } + } + + /// + /// + /// a: upper-left, b: lower-right (== upper-left + size) + /// + /// + /// C++: + /// imgui.h:3386 + /// , + /// imgui_draw.cpp:1501 + ///
+ /// void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddRectFilled( + this ImDrawListPtr target, + in float2 pMin, + in float2 pMax, + ImColor8 col, + float rounding = 0f, + ImDrawFlags flags = default + ) + { + fixed (float2* pMax_fixed = &pMax) + { + fixed (float2* pMin_fixed = &pMin) + { + PInvoke.ImDrawList_AddRectFilled(target, pMin_fixed, pMax_fixed, col, rounding, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3387 + /// , + /// imgui_draw.cpp:1518 + ///
+ /// void AddRectFilledMultiColor(const ImVec2& p_min, const ImVec2& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// p_min = upper-left, p_max = lower-right + /// + /// + public static unsafe void AddRectFilledMultiColor( + this ImDrawListPtr target, + in float2 pMin, + in float2 pMax, + uint colUprLeft, + uint colUprRight, + uint colBotRight, + uint colBotLeft + ) + { + fixed (float2* pMax_fixed = &pMax) + { + fixed (float2* pMin_fixed = &pMin) + { + PInvoke.ImDrawList_AddRectFilledMultiColor( + target, + pMin_fixed, + pMax_fixed, + colUprLeft, + colUprRight, + colBotRight, + colBotLeft + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3388 + /// , + /// imgui_draw.cpp:1533 + ///
+ /// void AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddQuad( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + in float2 p3, + in float2 p4, + ImColor8 col, + float thickness = 1f + ) + { + fixed (float2* p4_fixed = &p4) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddQuad(target, p1_fixed, p2_fixed, p3_fixed, p4_fixed, col, thickness); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3389 + /// , + /// imgui_draw.cpp:1545 + ///
+ /// void AddQuadFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddQuadFilled( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + in float2 p3, + in float2 p4, + ImColor8 col + ) + { + fixed (float2* p4_fixed = &p4) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddQuadFilled(target, p1_fixed, p2_fixed, p3_fixed, p4_fixed, col); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3390 + /// , + /// imgui_draw.cpp:1557 + ///
+ /// void AddTriangle(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddTriangle( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + in float2 p3, + ImColor8 col, + float thickness = 1f + ) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddTriangle(target, p1_fixed, p2_fixed, p3_fixed, col, thickness); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3391 + /// , + /// imgui_draw.cpp:1568 + ///
+ /// void AddTriangleFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddTriangleFilled( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + in float2 p3, + ImColor8 col + ) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddTriangleFilled(target, p1_fixed, p2_fixed, p3_fixed, col); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3392 + /// , + /// imgui_draw.cpp:1579 + ///
+ /// void AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddCircle( + this ImDrawListPtr target, + in float2 center, + float radius, + ImColor8 col, + int numSegments = 0, + float thickness = 1f + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_AddCircle(target, center_fixed, radius, col, numSegments, thickness); + } + } + + /// + /// + /// C++: + /// imgui.h:3393 + /// , + /// imgui_draw.cpp:1603 + ///
+ /// void AddCircleFilled(const ImVec2& center, float radius, ImU32 col, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddCircleFilled( + this ImDrawListPtr target, + in float2 center, + float radius, + ImColor8 col, + int numSegments = 0 + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_AddCircleFilled(target, center_fixed, radius, col, numSegments); + } + } + + /// + /// + /// C++: + /// imgui.h:3394 + /// , + /// imgui_draw.cpp:1628 + ///
+ /// void AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Guaranteed to honor 'num_segments' + /// + /// + public static unsafe void AddNgon( + this ImDrawListPtr target, + in float2 center, + float radius, + ImColor8 col, + int numSegments, + float thickness = 1f + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_AddNgon(target, center_fixed, radius, col, numSegments, thickness); + } + } + + /// + /// + /// C++: + /// imgui.h:3395 + /// , + /// imgui_draw.cpp:1640 + ///
void AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Guaranteed to honor 'num_segments' + /// + /// + public static unsafe void AddNgonFilled( + this ImDrawListPtr target, + in float2 center, + float radius, + ImColor8 col, + int numSegments + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_AddNgonFilled(target, center_fixed, radius, col, numSegments); + } + } + + /// + /// + /// C++: + /// imgui.h:3396 + /// , + /// imgui_draw.cpp:1652 + ///
+ /// void AddEllipse(const ImVec2& center, const ImVec2& radius, ImU32 col, float rot = 0.0f, int num_segments = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Ellipse + /// + /// + public static unsafe void AddEllipse( + this ImDrawListPtr target, + in float2 center, + in float2 radius, + ImColor8 col, + float rot = 0f, + int numSegments = 0, + float thickness = 1f + ) + { + fixed (float2* radius_fixed = &radius) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_AddEllipse(target, center_fixed, radius_fixed, col, rot, numSegments, thickness); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3397 + /// , + /// imgui_draw.cpp:1666 + ///
+ /// void AddEllipseFilled(const ImVec2& center, const ImVec2& radius, ImU32 col, float rot = 0.0f, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddEllipseFilled( + this ImDrawListPtr target, + in float2 center, + in float2 radius, + ImColor8 col, + float rot = 0f, + int numSegments = 0 + ) + { + fixed (float2* radius_fixed = &radius) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_AddEllipseFilled(target, center_fixed, radius_fixed, col, rot, numSegments); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3398 + /// , + /// imgui_draw.cpp:1729 + ///
+ /// void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddText(this ImDrawListPtr target, in float2 pos, ImColor8 col, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImDrawList_AddText_0(target, pos_fixed, col, text_fixed, text_fixed + text.Length); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3399 + /// , + /// imgui_draw.cpp:1702 + ///
+ /// void AddText(ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + public static unsafe void AddText( + this ImDrawListPtr target, + ImFontPtr font, + float fontSize, + in float2 pos, + ImColor8 col, + ImString text, + float wrapWidth = 0f, + in float4? cpuFineClipRect = null + ) + { + var cpuFineClipRect_ptr = cpuFineClipRect is { } cpuFineClipRect_value ? &cpuFineClipRect_value : null; + fixed (byte* text_fixed = text) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImDrawList_AddText_1( + target, + font, + fontSize, + pos_fixed, + col, + text_fixed, + text_fixed + text.Length, + wrapWidth, + (float4*)cpuFineClipRect_ptr + ); + } + } + } + + /// + /// + /// Cubic Bezier (4 control points) + /// + /// + /// C++: + /// imgui.h:3400 + /// , + /// imgui_draw.cpp:1681 + ///
+ /// void AddBezierCubic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Cubic Bezier takes 4 controls points + /// + /// + public static unsafe void AddBezierCubic( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + in float2 p3, + in float2 p4, + ImColor8 col, + float thickness, + int numSegments = 0 + ) + { + fixed (float2* p4_fixed = &p4) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddBezierCubic( + target, + p1_fixed, + p2_fixed, + p3_fixed, + p4_fixed, + col, + thickness, + numSegments + ); + } + } + } + } + } + + /// + /// + /// Quadratic Bezier (3 control points) + /// + /// + /// C++: + /// imgui.h:3401 + /// , + /// imgui_draw.cpp:1692 + ///
+ /// void AddBezierQuadratic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Quadratic Bezier takes 3 controls points + /// + /// + public static unsafe void AddBezierQuadratic( + this ImDrawListPtr target, + in float2 p1, + in float2 p2, + in float2 p3, + ImColor8 col, + float thickness, + int numSegments = 0 + ) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + fixed (float2* p1_fixed = &p1) + { + PInvoke.ImDrawList_AddBezierQuadratic( + target, + p1_fixed, + p2_fixed, + p3_fixed, + col, + thickness, + numSegments + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3406 + /// , + /// imgui_draw.cpp:801 + ///
+ /// void AddPolyline(const ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness) + ///
+ ///
+ /// + /// + /// General polygon + /// - Only simple polygons are supported by filling functions (no self-intersections, no holes). + /// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library. + /// + /// + /// TODO: Thickness anti-aliased lines cap are missing their AA fringe. + /// We avoid using the ImVec2 math operators here to reduce cost to a minimum for debug/non-inlined builds. + /// + /// + public static unsafe void AddPolyline( + this ImDrawListPtr target, + ReadOnlySpan points, + ImColor8 col, + ImDrawFlags flags, + float thickness + ) + { + fixed (float2* points_fixed = points) + { + PInvoke.ImDrawList_AddPolyline(target, points_fixed, points.Length, col, flags, thickness); + } + } + + /// + /// + /// C++: + /// imgui.h:3407 + /// , + /// imgui_draw.cpp:1059 + ///
void AddConvexPolyFilled(const ImVec2* points, int num_points, ImU32 col) + ///
+ ///
+ /// + /// + /// General polygon + /// - Only simple polygons are supported by filling functions (no self-intersections, no holes). + /// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library. + /// + /// + /// - We intentionally avoid using ImVec2 and its math operators here to reduce cost to a minimum for debug/non-inlined builds. + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// + /// + public static unsafe void AddConvexPolyFilled( + this ImDrawListPtr target, + ReadOnlySpan points, + ImColor8 col + ) + { + fixed (float2* points_fixed = points) + { + PInvoke.ImDrawList_AddConvexPolyFilled(target, points_fixed, points.Length, col); + } + } + + /// + /// + /// C++: + /// imgui.h:3408 + /// , + /// imgui_draw.cpp:2013 + ///
void AddConcavePolyFilled(const ImVec2* points, int num_points, ImU32 col) + ///
+ ///
+ /// + /// + /// General polygon + /// - Only simple polygons are supported by filling functions (no self-intersections, no holes). + /// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library. + /// + /// + /// Use ear-clipping algorithm to triangulate a simple polygon (no self-interaction, no holes). + /// (Reminder: we don't perform any coarse clipping/culling in ImDrawList layer! + /// It is up to caller to ensure not making costly calls that will be outside of visible area. + /// As concave fill is noticeably more expensive than other primitives, be mindful of this... + /// Caller can build AABB of points, and avoid filling if 'draw_list->_CmdHeader.ClipRect.Overlays(points_bb) == false') + /// + /// + public static unsafe void AddConcavePolyFilled( + this ImDrawListPtr target, + ReadOnlySpan points, + ImColor8 col + ) + { + fixed (float2* points_fixed = points) + { + PInvoke.ImDrawList_AddConcavePolyFilled(target, points_fixed, points.Length, col); + } + } + + /// + /// + /// C++: + /// imgui.h:3416 + /// , + /// imgui_draw.cpp:1766 + ///
+ /// void AddImageRounded(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Image primitives + /// - Read FAQ to understand what ImTextureID/ImTextureRef are. + /// - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. + /// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. + /// + /// + public static unsafe void AddImageRounded( + this ImDrawListPtr target, + ImTextureRef texRef, + in float2 pMin, + in float2 pMax, + in float2 uvMin, + in float2 uvMax, + ImColor8 col, + float rounding, + ImDrawFlags flags = default + ) + { + fixed (float2* uvMax_fixed = &uvMax) + { + fixed (float2* uvMin_fixed = &uvMin) + { + fixed (float2* pMax_fixed = &pMax) + { + fixed (float2* pMin_fixed = &pMin) + { + PInvoke.ImDrawList_AddImageRounded( + target, + texRef, + pMin_fixed, + pMax_fixed, + uvMin_fixed, + uvMax_fixed, + col, + rounding, + flags + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3421 + ///
inline void PathClear() + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathClear(this ImDrawListPtr target) => PInvoke.ImDrawList_PathClear(target); + + /// + /// + /// C++: + /// imgui.h:3422 + ///
inline void PathLineTo(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathLineTo(this ImDrawListPtr target, in float2 pos) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImDrawList_PathLineTo(target, pos_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:3423 + ///
inline void PathLineToMergeDuplicate(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathLineToMergeDuplicate(this ImDrawListPtr target, in float2 pos) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImDrawList_PathLineToMergeDuplicate(target, pos_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:3424 + ///
inline void PathFillConvex(ImU32 col) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathFillConvex(this ImDrawListPtr target, ImColor8 col) => + PInvoke.ImDrawList_PathFillConvex(target, col); + + /// + /// + /// C++: + /// imgui.h:3425 + ///
inline void PathFillConcave(ImU32 col) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathFillConcave(this ImDrawListPtr target, ImColor8 col) => + PInvoke.ImDrawList_PathFillConcave(target, col); + + /// + /// + /// C++: + /// imgui.h:3426 + ///
inline void PathStroke(ImU32 col, ImDrawFlags flags = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathStroke( + this ImDrawListPtr target, + ImColor8 col, + ImDrawFlags flags = default, + float thickness = 1f + ) => PInvoke.ImDrawList_PathStroke(target, col, flags, thickness); + + /// + /// + /// C++: + /// imgui.h:3427 + /// , + /// imgui_draw.cpp:1262 + ///
+ /// void PathArcTo(const ImVec2& center, float radius, float a_min, float a_max, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathArcTo( + this ImDrawListPtr target, + in float2 center, + float radius, + float aMin, + float aMax, + int numSegments = 0 + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_PathArcTo(target, center_fixed, radius, aMin, aMax, numSegments); + } + } + + /// + /// + /// Use precomputed angles for a 12 steps circle + /// + /// + /// C++: + /// imgui.h:3428 + /// , + /// imgui_draw.cpp:1252 + ///
void PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + /// 0: East, 3: South, 6: West, 9: North, 12: East + /// + /// + public static unsafe void PathArcToFast( + this ImDrawListPtr target, + in float2 center, + float radius, + int aMinOf12, + int aMaxOf12 + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_PathArcToFast(target, center_fixed, radius, aMinOf12, aMaxOf12); + } + } + + /// + /// + /// Ellipse + /// + /// + /// C++: + /// imgui.h:3429 + /// , + /// imgui_draw.cpp:1312 + ///
+ /// void PathEllipticalArcTo(const ImVec2& center, const ImVec2& radius, float rot, float a_min, float a_max, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathEllipticalArcTo( + this ImDrawListPtr target, + in float2 center, + in float2 radius, + float rot, + float aMin, + float aMax, + int numSegments = 0 + ) + { + fixed (float2* radius_fixed = &radius) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_PathEllipticalArcTo( + target, + center_fixed, + radius_fixed, + rot, + aMin, + aMax, + numSegments + ); + } + } + } + + /// + /// + /// Cubic Bezier (4 control points) + /// + /// + /// C++: + /// imgui.h:3430 + /// , + /// imgui_draw.cpp:1395 + ///
+ /// void PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathBezierCubicCurveTo( + this ImDrawListPtr target, + in float2 p2, + in float2 p3, + in float2 p4, + int numSegments = 0 + ) + { + fixed (float2* p4_fixed = &p4) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + PInvoke.ImDrawList_PathBezierCubicCurveTo(target, p2_fixed, p3_fixed, p4_fixed, numSegments); + } + } + } + } + + /// + /// + /// Quadratic Bezier (3 control points) + /// + /// + /// C++: + /// imgui.h:3431 + /// , + /// imgui_draw.cpp:1411 + ///
+ /// void PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathBezierQuadraticCurveTo( + this ImDrawListPtr target, + in float2 p2, + in float2 p3, + int numSegments = 0 + ) + { + fixed (float2* p3_fixed = &p3) + { + fixed (float2* p2_fixed = &p2) + { + PInvoke.ImDrawList_PathBezierQuadraticCurveTo(target, p2_fixed, p3_fixed, numSegments); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3432 + /// , + /// imgui_draw.cpp:1451 + ///
+ /// void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + public static unsafe void PathRect( + this ImDrawListPtr target, + in float2 rectMin, + in float2 rectMax, + float rounding = 0f, + ImDrawFlags flags = default + ) + { + fixed (float2* rectMax_fixed = &rectMax) + { + fixed (float2* rectMin_fixed = &rectMin) + { + PInvoke.ImDrawList_PathRect(target, rectMin_fixed, rectMax_fixed, rounding, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3443 + /// , + /// imgui_draw.cpp:522 + ///
void AddCallback(ImDrawCallback callback, void* userdata, size_t userdata_size = 0) + ///
+ ///
+ /// + /// + /// Advanced: Draw Callbacks + /// - May be used to alter render state (change sampler, blending, current shader). May be used to emit custom rendering commands (difficult to do correctly, but possible). + /// - Use special ImDrawCallback_ResetRenderState callback to instruct backend to reset its render state to the default. + /// - Your rendering loop must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles. All standard backends are honoring this. + /// - For some backends, the callback may access selected render-states exposed by the backend in a ImGui_ImplXXXX_RenderState structure pointed to by platform_io.Renderer_RenderState. + /// - IMPORTANT: please be mindful of the different level of indirection between using size==0 (copying argument) and using size>0 (copying pointed data into a buffer). + /// - If userdata_size == 0: we copy/store the 'userdata' argument as-is. It will be available unmodified in ImDrawCmd::UserCallbackData during render. + /// - If userdata_size > 0, we copy/store 'userdata_size' bytes pointed to by 'userdata'. We store them in a buffer stored inside the drawlist. ImDrawCmd::UserCallbackData will point inside that buffer so you have to retrieve data from there. Your callback may need to use ImDrawCmd::UserCallbackDataSize if you expect dynamically-sized data. + /// - Support for userdata_size > 0 was added in v1.91.4, October 2024. So earlier code always only allowed to copy/store a simple void*. + /// + /// + public static unsafe void AddCallback( + this ImDrawListPtr target, + ImDrawCallback callback, + Ptr userdata, + nuint userdataSize = default + ) => + PInvoke.ImDrawList_AddCallback( + target, + Marshal.GetFunctionPointerForDelegate(callback), + userdata, + userdataSize + ); + + /// + /// + /// C++: + /// imgui.h:3443 + /// , + /// imgui_draw.cpp:522 + ///
void AddCallback(ImDrawCallback callback, void* userdata, size_t userdata_size = 0) + ///
+ ///
+ /// + /// + /// Advanced: Draw Callbacks + /// - May be used to alter render state (change sampler, blending, current shader). May be used to emit custom rendering commands (difficult to do correctly, but possible). + /// - Use special ImDrawCallback_ResetRenderState callback to instruct backend to reset its render state to the default. + /// - Your rendering loop must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles. All standard backends are honoring this. + /// - For some backends, the callback may access selected render-states exposed by the backend in a ImGui_ImplXXXX_RenderState structure pointed to by platform_io.Renderer_RenderState. + /// - IMPORTANT: please be mindful of the different level of indirection between using size==0 (copying argument) and using size>0 (copying pointed data into a buffer). + /// - If userdata_size == 0: we copy/store the 'userdata' argument as-is. It will be available unmodified in ImDrawCmd::UserCallbackData during render. + /// - If userdata_size > 0, we copy/store 'userdata_size' bytes pointed to by 'userdata'. We store them in a buffer stored inside the drawlist. ImDrawCmd::UserCallbackData will point inside that buffer so you have to retrieve data from there. Your callback may need to use ImDrawCmd::UserCallbackDataSize if you expect dynamically-sized data. + /// - Support for userdata_size > 0 was added in v1.91.4, October 2024. So earlier code always only allowed to copy/store a simple void*. + /// + /// + public static unsafe void AddCallback( + this ImDrawListPtr target, + delegate* unmanaged[Cdecl] callback, + Ptr userdata, + nuint userdataSize = default + ) => PInvoke.ImDrawList_AddCallback(target, (nint)callback, userdata, userdataSize); + + /// + /// + /// This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / + /// blending). Otherwise primitives are merged into the same draw-call as much as possible + /// + /// + /// C++: + /// imgui.h:3446 + /// , + /// imgui_draw.cpp:497 + ///
void AddDrawCmd() + ///
+ ///
+ /// + /// + /// Advanced: Miscellaneous + /// + /// + public static unsafe void AddDrawCmd(this ImDrawListPtr target) => PInvoke.ImDrawList_AddDrawCmd(target); + + /// + /// + /// Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer. + /// + /// + /// C++: + /// imgui.h:3447 + /// , + /// imgui_draw.cpp:487 + ///
ImDrawList* CloneOutput() const + ///
+ ///
+ /// + /// + /// Advanced: Miscellaneous + /// + /// + public static unsafe ImDrawListPtr CloneOutput(this ImDrawListPtr target) => + PInvoke.ImDrawList_CloneOutput(target); + + /// + /// + /// C++: + /// imgui.h:3455 + ///
inline void ChannelsSplit(int count) + ///
+ ///
+ /// + /// + /// Advanced: Channels + /// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) + /// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) + /// - This API shouldn't have been in ImDrawList in the first place! + /// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. + /// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. + /// + /// + public static unsafe void ChannelsSplit(this ImDrawListPtr target, int count) => + PInvoke.ImDrawList_ChannelsSplit(target, count); + + /// + /// + /// C++: + /// imgui.h:3456 + ///
inline void ChannelsMerge() + ///
+ ///
+ /// + /// + /// Advanced: Channels + /// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) + /// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) + /// - This API shouldn't have been in ImDrawList in the first place! + /// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. + /// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. + /// + /// + public static unsafe void ChannelsMerge(this ImDrawListPtr target) => PInvoke.ImDrawList_ChannelsMerge(target); + + /// + /// + /// C++: + /// imgui.h:3457 + ///
inline void ChannelsSetCurrent(int n) + ///
+ ///
+ /// + /// + /// Advanced: Channels + /// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) + /// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) + /// - This API shouldn't have been in ImDrawList in the first place! + /// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. + /// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. + /// + /// + public static unsafe void ChannelsSetCurrent(this ImDrawListPtr target, int n) => + PInvoke.ImDrawList_ChannelsSetCurrent(target, n); + + /// + /// + /// C++: + /// imgui.h:3462 + /// , + /// imgui_draw.cpp:711 + ///
void PrimReserve(int idx_count, int vtx_count) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + /// Reserve space for a number of vertices and indices. + /// You must finish filling your reserved data before calling PrimReserve() again, as it may reallocate or + /// submit the intermediate results. PrimUnreserve() can be used to release unused allocations. + /// + /// + public static unsafe void PrimReserve(this ImDrawListPtr target, int idxCount, int vtxCount) => + PInvoke.ImDrawList_PrimReserve(target, idxCount, vtxCount); + + /// + /// + /// C++: + /// imgui.h:3463 + /// , + /// imgui_draw.cpp:737 + ///
void PrimUnreserve(int idx_count, int vtx_count) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + /// Release the number of reserved vertices/indices from the end of the last reservation made with + /// PrimReserve(). + /// + /// + public static unsafe void PrimUnreserve(this ImDrawListPtr target, int idxCount, int vtxCount) => + PInvoke.ImDrawList_PrimUnreserve(target, idxCount, vtxCount); + + /// + /// + /// Axis aligned rectangle (composed of two triangles) + /// + /// + /// C++: + /// imgui.h:3464 + /// , + /// imgui_draw.cpp:748 + ///
void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + /// Fully unrolled with inline call to keep our debug builds decently fast. + /// + /// + public static unsafe void PrimRect(this ImDrawListPtr target, in float2 a, in float2 b, ImColor8 col) + { + fixed (float2* b_fixed = &b) + { + fixed (float2* a_fixed = &a) + { + PInvoke.ImDrawList_PrimRect(target, a_fixed, b_fixed, col); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3465 + /// , + /// imgui_draw.cpp:763 + ///
+ /// void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + public static unsafe void PrimRectUV( + this ImDrawListPtr target, + in float2 a, + in float2 b, + in float2 uvA, + in float2 uvB, + ImColor8 col + ) + { + fixed (float2* uvB_fixed = &uvB) + { + fixed (float2* uvA_fixed = &uvA) + { + fixed (float2* b_fixed = &b) + { + fixed (float2* a_fixed = &a) + { + PInvoke.ImDrawList_PrimRectUV(target, a_fixed, b_fixed, uvA_fixed, uvB_fixed, col); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3466 + /// , + /// imgui_draw.cpp:778 + ///
+ /// void PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + public static unsafe void PrimQuadUV( + this ImDrawListPtr target, + in float2 a, + in float2 b, + in float2 c, + in float2 d, + in float2 uvA, + in float2 uvB, + in float2 uvC, + in float2 uvD, + ImColor8 col + ) + { + fixed (float2* uvD_fixed = &uvD) + { + fixed (float2* uvC_fixed = &uvC) + { + fixed (float2* uvB_fixed = &uvB) + { + fixed (float2* uvA_fixed = &uvA) + { + fixed (float2* d_fixed = &d) + { + fixed (float2* c_fixed = &c) + { + fixed (float2* b_fixed = &b) + { + fixed (float2* a_fixed = &a) + { + PInvoke.ImDrawList_PrimQuadUV( + target, + a_fixed, + b_fixed, + c_fixed, + d_fixed, + uvA_fixed, + uvB_fixed, + uvC_fixed, + uvD_fixed, + col + ); + } + } + } + } + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3467 + ///
inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + public static unsafe void PrimWriteVtx(this ImDrawListPtr target, in float2 pos, in float2 uv, ImColor8 col) + { + fixed (float2* uv_fixed = &uv) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImDrawList_PrimWriteVtx(target, pos_fixed, uv_fixed, col); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3468 + ///
inline void PrimWriteIdx(ImDrawIdx idx) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + public static unsafe void PrimWriteIdx(this ImDrawListPtr target, ushort idx) => + PInvoke.ImDrawList_PrimWriteIdx(target, idx); + + /// + /// + /// Write vertex with unique index + /// + /// + /// C++: + /// imgui.h:3469 + ///
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + public static unsafe void PrimVtx(this ImDrawListPtr target, in float2 pos, in float2 uv, ImColor8 col) + { + fixed (float2* uv_fixed = &uv) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImDrawList_PrimVtx(target, pos_fixed, uv_fixed, col); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3483 + /// , + /// imgui_draw.cpp:434 + ///
void _SetDrawListSharedData(ImDrawListSharedData* data) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe void SetDrawListSharedData(this ImDrawListPtr target, ImDrawListSharedDataPtr data) => + PInvoke.ImDrawList_SetDrawListSharedData(target, data); + + /// + /// + /// C++: + /// imgui.h:3484 + /// , + /// imgui_draw.cpp:445 + ///
void _ResetForNewFrame() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Initialize before use in a new frame. We always have a command ready in the buffer. + /// In the majority of cases, you would want to call PushClipRect() and PushTexture() after this. + /// + /// + public static unsafe void ResetForNewFrame(this ImDrawListPtr target) => + PInvoke.ImDrawList_ResetForNewFrame(target); + + /// + /// + /// C++: + /// imgui.h:3485 + /// , + /// imgui_draw.cpp:471 + ///
void _ClearFreeMemory() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe void ClearFreeMemory(this ImDrawListPtr target) => + PInvoke.ImDrawList_ClearFreeMemory(target); + + /// + /// + /// C++: + /// imgui.h:3486 + /// , + /// imgui_draw.cpp:511 + ///
void _PopUnusedDrawCmd() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Pop trailing draw command (used before merging or presenting to user) + /// Note that this leaves the ImDrawList in a state unfit for further commands, as most code assume that CmdBuffer.Size > 0 && CmdBuffer.back().UserCallback == NULL + /// + /// + public static unsafe void PopUnusedDrawCmd(this ImDrawListPtr target) => + PInvoke.ImDrawList_PopUnusedDrawCmd(target); + + /// + /// + /// C++: + /// imgui.h:3487 + /// , + /// imgui_draw.cpp:563 + ///
void _TryMergeDrawCmds() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Try to merge two last draw commands + /// + /// + public static unsafe void TryMergeDrawCmds(this ImDrawListPtr target) => + PInvoke.ImDrawList_TryMergeDrawCmds(target); + + /// + /// + /// C++: + /// imgui.h:3488 + /// , + /// imgui_draw.cpp:577 + ///
void _OnChangedClipRect() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Our scheme may appears a bit unusual, basically we want the most-common calls AddLine AddRect etc. to not have to perform any check so we always have a command ready in the stack. + /// The cost of figuring out if a new command has to be added or if we can merge is paid in those Update** functions only. + /// + /// + public static unsafe void OnChangedClipRect(this ImDrawListPtr target) => + PInvoke.ImDrawList_OnChangedClipRect(target); + + /// + /// + /// C++: + /// imgui.h:3489 + /// , + /// imgui_draw.cpp:599 + ///
void _OnChangedTexture() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe void OnChangedTexture(this ImDrawListPtr target) => + PInvoke.ImDrawList_OnChangedTexture(target); + + /// + /// + /// C++: + /// imgui.h:3490 + /// , + /// imgui_draw.cpp:624 + ///
void _OnChangedVtxOffset() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe void OnChangedVtxOffset(this ImDrawListPtr target) => + PInvoke.ImDrawList_OnChangedVtxOffset(target); + + /// + /// + /// C++: + /// imgui.h:3491 + /// , + /// imgui_draw.cpp:699 + ///
void _SetTexture(ImTextureRef tex_ref) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// This is used by ImGui::PushFont()/PopFont(). It works because we never use _TextureIdStack[] elsewhere + /// than in PushTexture()/PopTexture(). + /// + /// + public static unsafe void SetTexture(this ImDrawListPtr target, ImTextureRef texRef) => + PInvoke.ImDrawList_SetTexture(target, texRef); + + /// + /// + /// C++: + /// imgui.h:3492 + /// , + /// imgui_draw.cpp:640 + ///
int _CalcCircleAutoSegmentCount(float radius) const + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe int CalcCircleAutoSegmentCount(this ImDrawListPtr target, float radius) => + PInvoke.ImDrawList_CalcCircleAutoSegmentCount(target, radius); + + /// + /// + /// C++: + /// imgui.h:3493 + /// , + /// imgui_draw.cpp:1141 + ///
+ /// void _PathArcToFastEx(const ImVec2& center, float radius, int a_min_sample, int a_max_sample, int a_step) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe void PathArcToFastEx( + this ImDrawListPtr target, + in float2 center, + float radius, + int aMinSample, + int aMaxSample, + int aStep + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_PathArcToFastEx(target, center_fixed, radius, aMinSample, aMaxSample, aStep); + } + } + + /// + /// + /// C++: + /// imgui.h:3494 + /// , + /// imgui_draw.cpp:1233 + ///
+ /// void _PathArcToN(const ImVec2& center, float radius, float a_min, float a_max, int num_segments) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + public static unsafe void PathArcToN( + this ImDrawListPtr target, + in float2 center, + float radius, + float aMin, + float aMax, + int numSegments + ) + { + fixed (float2* center_fixed = ¢er) + { + PInvoke.ImDrawList_PathArcToN(target, center_fixed, radius, aMin, aMax, numSegments); + } + } + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImDrawListSplitter.gen.cs b/Brutal.ImGui/Generated/Functions/ImDrawListSplitter.gen.cs new file mode 100644 index 0000000..62a98bf --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImDrawListSplitter.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImDrawListSplitterExtensions + { + /// + /// + /// Do not clear Channels[] so our allocations are reused next frame + /// + /// + /// C++: + /// imgui.h:3295 + ///
inline void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImDrawListSplitterPtr target) => PInvoke.ImDrawListSplitter_Clear(target); + + /// + /// + /// C++: + /// imgui.h:3296 + /// , + /// imgui_draw.cpp:2109 + ///
void ClearFreeMemory() + ///
+ ///
+ public static unsafe void ClearFreeMemory(this ImDrawListSplitterPtr target) => + PInvoke.ImDrawListSplitter_ClearFreeMemory(target); + + /// + /// + /// C++: + /// imgui.h:3297 + /// , + /// imgui_draw.cpp:2123 + ///
void Split(ImDrawList* draw_list, int count) + ///
+ ///
+ public static unsafe void Split(this ImDrawListSplitterPtr target, ImDrawListPtr drawList, int count) => + PInvoke.ImDrawListSplitter_Split(target, drawList, count); + + /// + /// + /// C++: + /// imgui.h:3298 + /// , + /// imgui_draw.cpp:2153 + ///
void Merge(ImDrawList* draw_list) + ///
+ ///
+ public static unsafe void Merge(this ImDrawListSplitterPtr target, ImDrawListPtr drawList) => + PInvoke.ImDrawListSplitter_Merge(target, drawList); + + /// + /// + /// C++: + /// imgui.h:3299 + /// , + /// imgui_draw.cpp:2224 + ///
void SetCurrentChannel(ImDrawList* draw_list, int channel_idx) + ///
+ ///
+ public static unsafe void SetCurrentChannel( + this ImDrawListSplitterPtr target, + ImDrawListPtr drawList, + int channelIdx + ) => PInvoke.ImDrawListSplitter_SetCurrentChannel(target, drawList, channelIdx); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImFont.gen.cs b/Brutal.ImGui/Generated/Functions/ImFont.gen.cs new file mode 100644 index 0000000..e7f00dd --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImFont.gen.cs @@ -0,0 +1,319 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImFontExtensions + { + /// + /// + /// C++: + /// imgui.h:3944 + /// , + /// imgui_draw.cpp:5250 + ///
bool IsGlyphInFont(ImWchar c) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// This is not fast query + /// + /// + public static unsafe bool IsGlyphInFont(this ImFontPtr target, uint c) => + PInvoke.ImFont_IsGlyphInFont(target, c); + + /// + /// + /// C++: + /// imgui.h:3945 + ///
bool IsLoaded() const + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe bool IsLoaded(this ImFontPtr target) => PInvoke.ImFont_IsLoaded(target); + + /// + /// + /// Fill ImFontConfig::Name. + /// + /// + /// C++: + /// imgui.h:3946 + ///
const char* GetDebugName() const + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe ImString GetDebugName(this ImFontPtr target) => + Utf8.GetNullTerminatedSpan(PInvoke.ImFont_GetDebugName(target)); + + /// + /// + /// Get or create baked data for given size + /// + /// + /// C++: + /// imgui.h:3951 + /// , + /// imgui_draw.cpp:5288 + ///
ImFontBaked* GetFontBaked(float font_size, float density = -1.0f) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// ImFontBaked pointers are valid for the entire frame but shall never be kept between frames. + /// + /// + public static unsafe ImFontBakedPtr GetFontBaked(this ImFontPtr target, float fontSize, float density = -1f) => + PInvoke.ImFont_GetFontBaked(target, fontSize, density); + + /// + /// + /// utf8 + /// + /// + /// C++: + /// imgui.h:3952 + /// , + /// imgui_draw.cpp:5465 + ///
+ /// ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end = NULL, const char** remaining = NULL) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + public static unsafe float2 CalcTextSizeA( + this ImFontPtr target, + float size, + float maxWidth, + float wrapWidth, + ImString text, + Ptr> remaining = default + ) + { + fixed (byte* text_fixed = text) + { + return PInvoke.ImFont_CalcTextSizeA( + target, + size, + maxWidth, + wrapWidth, + text_fixed, + text_fixed + text.Length, + (byte**)remaining + ); + } + } + + /// + /// + /// C++: + /// imgui.h:3953 + /// , + /// imgui_draw.cpp:5359 + ///
+ /// const char* CalcWordWrapPosition(float size, const char* text, const char* text_end, float wrap_width) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// Simple word-wrapping for English, not full-featured. Please submit failing cases! + /// This will return the next location to wrap from. If no wrapping if necessary, this will fast-forward to e.g. text_end. + /// FIXME: Much possible improvements (don't cut things like "word !", "word!!!" but cut within "word,,,,", more sensible support for punctuations, support for Unicode punctuations, etc.) + /// + /// + public static unsafe Ptr CalcWordWrapPosition( + this ImFontPtr target, + float size, + ImString text, + float wrapWidth + ) + { + fixed (byte* text_fixed = text) + { + return PInvoke.ImFont_CalcWordWrapPosition( + target, + size, + text_fixed, + text_fixed + text.Length, + wrapWidth + ); + } + } + + /// + /// + /// C++: + /// imgui.h:3954 + /// , + /// imgui_draw.cpp:5550 + ///
+ /// void RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, ImWchar c, const ImVec4* cpu_fine_clip = NULL) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound. + /// + /// + public static unsafe void RenderChar( + this ImFontPtr target, + ImDrawListPtr drawList, + float size, + in float2 pos, + ImColor8 col, + uint c, + in float4? cpuFineClip = null + ) + { + var cpuFineClip_ptr = cpuFineClip is { } cpuFineClip_value ? &cpuFineClip_value : null; + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImFont_RenderChar(target, drawList, size, pos_fixed, col, c, (float4*)cpuFineClip_ptr); + } + } + + /// + /// + /// C++: + /// imgui.h:3955 + /// , + /// imgui_draw.cpp:5589 + ///
+ /// void RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, bool cpu_fine_clip = false) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound. + /// + /// + public static unsafe void RenderText( + this ImFontPtr target, + ImDrawListPtr drawList, + float size, + in float2 pos, + ImColor8 col, + in float4 clipRect, + ImString text, + float wrapWidth = 0f, + bool cpuFineClip = false + ) + { + fixed (byte* text_fixed = text) + { + fixed (float4* clipRect_fixed = &clipRect) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImFont_RenderText( + target, + drawList, + size, + pos_fixed, + col, + clipRect_fixed, + text_fixed, + text_fixed + text.Length, + wrapWidth, + cpuFineClip + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:3961 + /// , + /// imgui_draw.cpp:5087 + ///
void ClearOutputData() + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// + /// + public static unsafe void ClearOutputData(this ImFontPtr target) => PInvoke.ImFont_ClearOutputData(target); + + /// + /// + /// Makes 'from_codepoint' character points to 'to_codepoint' glyph. + /// + /// + /// C++: + /// imgui.h:3962 + /// , + /// imgui_draw.cpp:5199 + ///
void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// + /// + public static unsafe void AddRemapChar(this ImFontPtr target, uint fromCodepoint, uint toCodepoint) => + PInvoke.ImFont_AddRemapChar(target, fromCodepoint, toCodepoint); + + /// + /// + /// C++: + /// imgui.h:3963 + /// , + /// imgui_draw.cpp:5098 + ///
bool IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// + /// + /// API is designed this way to avoid exposing the 8K page size + /// e.g. use with IsGlyphRangeUnused(0, 255) + /// + /// + public static unsafe bool IsGlyphRangeUnused(this ImFontPtr target, uint cBegin, uint cLast) => + PInvoke.ImFont_IsGlyphRangeUnused(target, cBegin, cLast); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImFontAtlas.gen.cs b/Brutal.ImGui/Generated/Functions/ImFontAtlas.gen.cs new file mode 100644 index 0000000..3a7ced4 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImFontAtlas.gen.cs @@ -0,0 +1,645 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImFontAtlasExtensions + { + /// + /// + /// C++: + /// imgui.h:3726 + /// , + /// imgui_draw.cpp:3006 + ///
ImFont* AddFont(const ImFontConfig* font_cfg) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + public static unsafe ImFontPtr AddFont(this ImFontAtlasPtr target, ImFontConfigPtr fontCfg) => + PInvoke.ImFontAtlas_AddFont(target, fontCfg); + + /// + /// + /// C++: + /// imgui.h:3727 + /// , + /// imgui_draw.cpp:3105 + ///
ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + /// Load embedded ProggyClean.ttf at size 13, disable oversampling + /// + /// + public static unsafe ImFontPtr AddFontDefault(this ImFontAtlasPtr target, ImFontConfigPtr fontCfg = default) => + PInvoke.ImFontAtlas_AddFontDefault(target, fontCfg); + + /// + /// + /// C++: + /// imgui.h:3728 + /// , + /// imgui_draw.cpp:3133 + ///
+ /// ImFont* AddFontFromFileTTF(const char* filename, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + public static unsafe ImFontPtr AddFontFromFileTTF( + this ImFontAtlasPtr target, + ImString filename, + float sizePixels = 0f, + ImFontConfigPtr fontCfg = default, + ReadOnlySpan glyphRanges = default + ) + { + fixed (uint* glyphRanges_fixed = glyphRanges) + { + fixed (byte* filename_fixed = filename) + { + return PInvoke.ImFontAtlas_AddFontFromFileTTF( + target, + filename_fixed, + sizePixels, + fontCfg, + glyphRanges_fixed + ); + } + } + } + + /// + /// + /// Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the atlas. + /// Set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed. + /// + /// + /// C++: + /// imgui.h:3729 + /// , + /// imgui_draw.cpp:3159 + ///
+ /// ImFont* AddFontFromMemoryTTF(void* font_data, int font_data_size, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + /// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas + /// == false. Owned TTF buffer will be deleted after Build(). + /// + /// + public static unsafe ImFontPtr AddFontFromMemoryTTF( + this ImFontAtlasPtr target, + Ptr fontData, + int fontDataSize, + float sizePixels = 0f, + ImFontConfigPtr fontCfg = default, + ReadOnlySpan glyphRanges = default + ) + { + fixed (uint* glyphRanges_fixed = glyphRanges) + { + return PInvoke.ImFontAtlas_AddFontFromMemoryTTF( + target, + fontData, + fontDataSize, + sizePixels, + fontCfg, + glyphRanges_fixed + ); + } + } + + /// + /// + /// 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp. + /// + /// + /// C++: + /// imgui.h:3730 + /// , + /// imgui_draw.cpp:3173 + ///
+ /// ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_data_size, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + public static unsafe ImFontPtr AddFontFromMemoryCompressedTTF( + this ImFontAtlasPtr target, + Ptr compressedFontData, + int compressedFontDataSize, + float sizePixels = 0f, + ImFontConfigPtr fontCfg = default, + ReadOnlySpan glyphRanges = default + ) + { + fixed (uint* glyphRanges_fixed = glyphRanges) + { + return PInvoke.ImFontAtlas_AddFontFromMemoryCompressedTTF( + target, + compressedFontData, + compressedFontDataSize, + sizePixels, + fontCfg, + glyphRanges_fixed + ); + } + } + + /// + /// + /// 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with + /// -base85 parameter. + /// + /// + /// C++: + /// imgui.h:3731 + /// , + /// imgui_draw.cpp:3185 + ///
+ /// ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + public static unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF( + this ImFontAtlasPtr target, + ReadOnlySpan compressedFontDataBase85, + float sizePixels = 0f, + ImFontConfigPtr fontCfg = default, + ReadOnlySpan glyphRanges = default + ) + { + fixed (uint* glyphRanges_fixed = glyphRanges) + { + fixed (byte* compressedFontDataBase85_fixed = compressedFontDataBase85) + { + return PInvoke.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF( + target, + compressedFontDataBase85_fixed, + sizePixels, + fontCfg, + glyphRanges_fixed + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:3732 + /// , + /// imgui_draw.cpp:3224 + ///
void RemoveFont(ImFont* font) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + public static unsafe void RemoveFont(this ImFontAtlasPtr target, ImFontPtr font) => + PInvoke.ImFontAtlas_RemoveFont(target, font); + + /// + /// + /// Clear everything (input fonts, output glyphs/textures) + /// + /// + /// C++: + /// imgui.h:3734 + /// , + /// imgui_draw.cpp:2657 + ///
void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_Clear(target); + + /// + /// + /// Compact cached glyphs and texture. + /// + /// + /// C++: + /// imgui.h:3735 + /// , + /// imgui_draw.cpp:2666 + ///
void CompactCache() + ///
+ ///
+ public static unsafe void CompactCache(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_CompactCache(target); + + /// + /// + /// Change font loader at runtime. + /// + /// + /// C++: + /// imgui.h:3736 + /// , + /// imgui_draw.cpp:2671 + ///
void SetFontLoader(const ImFontLoader* font_loader) + ///
+ ///
+ public static unsafe void SetFontLoader(this ImFontAtlasPtr target, ImFontLoaderPtr fontLoader) => + PInvoke.ImFontAtlas_SetFontLoader(target, fontLoader); + + /// + /// + /// [OBSOLETE] Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) + /// = all the data used to build the texture and fonts. + /// + /// + /// C++: + /// imgui.h:3739 + /// , + /// imgui_draw.cpp:2676 + ///
void ClearInputData() + ///
+ ///
+ /// + /// + /// As we are transitioning toward a new font system, we expect to obsolete those soon: + /// + /// + public static unsafe void ClearInputData(this ImFontAtlasPtr target) => + PInvoke.ImFontAtlas_ClearInputData(target); + + /// + /// + /// [OBSOLETE] Clear input+output font data (same as ClearInputData() + glyphs storage, UV coordinates). + /// + /// + /// C++: + /// imgui.h:3740 + /// , + /// imgui_draw.cpp:2703 + ///
void ClearFonts() + ///
+ ///
+ /// + /// + /// As we are transitioning toward a new font system, we expect to obsolete those soon: + /// + /// + public static unsafe void ClearFonts(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_ClearFonts(target); + + /// + /// + /// [OBSOLETE] Clear CPU-side copy of the texture data. Saves RAM once the texture has been copied to + /// graphics memory. + /// + /// + /// C++: + /// imgui.h:3741 + /// , + /// imgui_draw.cpp:2694 + ///
void ClearTexData() + ///
+ ///
+ /// + /// + /// As we are transitioning toward a new font system, we expect to obsolete those soon: + /// + /// + /// Clear CPU-side copy of the texture data. + /// + /// + public static unsafe void ClearTexData(this ImFontAtlasPtr target) => PInvoke.ImFontAtlas_ClearTexData(target); + + /// + /// + /// Basic Latin, Extended Latin + /// + /// + /// C++: + /// imgui.h:3765 + /// , + /// imgui_draw.cpp:4753 + ///
const ImWchar* GetGlyphRangesDefault() + ///
+ ///
+ /// + /// + /// Since 1.92: specifying glyph ranges is only useful/necessary if your backend doesn't support + /// ImGuiBackendFlags_RendererHasTextures! + /// + /// + /// Retrieve list of range (2 int per range, values are inclusive) + /// + /// + public static unsafe Ptr GetGlyphRangesDefault(this ImFontAtlasPtr target) => + PInvoke.ImFontAtlas_GetGlyphRangesDefault(target); + + /// + /// + /// Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error. + /// + /// + /// C++: + /// imgui.h:3802 + /// , + /// imgui_draw.cpp:3251 + ///
ImFontAtlasRectId AddCustomRect(int width, int height, ImFontAtlasRect* out_r = NULL) + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + /// At it is common to do an AddCustomRect() followed by a GetCustomRect(), we provide an optional + /// 'ImFontAtlasRect* out_r = NULL' argument to retrieve the info straight away. + /// + /// + public static unsafe ImFontAtlasRectId AddCustomRect( + this ImFontAtlasPtr target, + int width, + int height, + ImFontAtlasRectPtr outR = default + ) => PInvoke.ImFontAtlas_AddCustomRect(target, width, height, outR); + + /// + /// + /// Unregister a rectangle. Existing pixels will stay in texture until resized / garbage collected. + /// + /// + /// C++: + /// imgui.h:3803 + /// , + /// imgui_draw.cpp:3273 + ///
void RemoveCustomRect(ImFontAtlasRectId id) + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + public static unsafe void RemoveCustomRect(this ImFontAtlasPtr target, ImFontAtlasRectId id) => + PInvoke.ImFontAtlas_RemoveCustomRect(target, id); + + /// + /// + /// Get rectangle coordinates for current texture. Valid immediately, never store this (read above)! + /// + /// + /// C++: + /// imgui.h:3804 + /// , + /// imgui_draw.cpp:3330 + ///
bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + public static unsafe bool GetCustomRect( + this ImFontAtlasPtr target, + ImFontAtlasRectId id, + out ImFontAtlasRect outR + ) + { + fixed (ImFontAtlasRect* outR_fixed = &outR) + { + return PInvoke.ImFontAtlas_GetCustomRect(target, id, outR_fixed); + } + } + + /// + /// + /// Get rectangle coordinates for current texture. Valid immediately, never store this (read above)! + /// + /// + /// C++: + /// imgui.h:3804 + /// , + /// imgui_draw.cpp:3330 + ///
bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + public static unsafe bool GetCustomRect(this ImFontAtlasPtr target, ImFontAtlasRectId id) => + PInvoke.ImFontAtlas_GetCustomRect(target, id, null); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImFontBaked.gen.cs b/Brutal.ImGui/Generated/Functions/ImFontBaked.gen.cs new file mode 100644 index 0000000..0bca23f --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImFontBaked.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImFontBakedExtensions + { + /// + /// + /// C++: + /// imgui.h:3897 + /// , + /// imgui_draw.cpp:5063 + ///
void ClearOutputData() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe void ClearOutputData(this ImFontBakedPtr target) => + PInvoke.ImFontBaked_ClearOutputData(target); + + /// + /// + /// Return U+FFFD glyph if requested glyph doesn't exists. + /// + /// + /// C++: + /// imgui.h:3898 + /// , + /// imgui_draw.cpp:5205 + ///
ImFontGlyph* FindGlyph(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Find glyph, load if necessary, return fallback if missing + /// + /// + public static unsafe ImFontGlyphPtr FindGlyph(this ImFontBakedPtr target, uint c) => + PInvoke.ImFontBaked_FindGlyph(target, c); + + /// + /// + /// Return NULL if glyph doesn't exist + /// + /// + /// C++: + /// imgui.h:3899 + /// , + /// imgui_draw.cpp:5220 + ///
ImFontGlyph* FindGlyphNoFallback(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Attempt to load but when missing, return NULL instead of FallbackGlyph + /// + /// + public static unsafe ImFontGlyphPtr FindGlyphNoFallback(this ImFontBakedPtr target, uint c) => + PInvoke.ImFontBaked_FindGlyphNoFallback(target, c); + + /// + /// + /// C++: + /// imgui.h:3900 + /// , + /// imgui_draw.cpp:5265 + ///
float GetCharAdvance(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe float GetCharAdvance(this ImFontBakedPtr target, uint c) => + PInvoke.ImFontBaked_GetCharAdvance(target, c); + + /// + /// + /// C++: + /// imgui.h:3901 + /// , + /// imgui_draw.cpp:5236 + ///
bool IsGlyphLoaded(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe bool IsGlyphLoaded(this ImFontBakedPtr target, uint c) => + PInvoke.ImFontBaked_IsGlyphLoaded(target, c); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImFontGlyphRangesBuilder.gen.cs b/Brutal.ImGui/Generated/Functions/ImFontGlyphRangesBuilder.gen.cs new file mode 100644 index 0000000..7c5a0ec --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImFontGlyphRangesBuilder.gen.cs @@ -0,0 +1,119 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImFontGlyphRangesBuilderExtensions + { + /// + /// + /// C++: + /// imgui.h:3668 + ///
inline void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImFontGlyphRangesBuilderPtr target) => + PInvoke.ImFontGlyphRangesBuilder_Clear(target); + + /// + /// + /// Get bit n in the array + /// + /// + /// C++: + /// imgui.h:3669 + ///
inline bool GetBit(size_t n) const + ///
+ ///
+ public static unsafe bool GetBit(this ImFontGlyphRangesBuilderPtr target, nuint n) => + PInvoke.ImFontGlyphRangesBuilder_GetBit(target, n); + + /// + /// + /// Set bit n in the array + /// + /// + /// C++: + /// imgui.h:3670 + ///
inline void SetBit(size_t n) + ///
+ ///
+ public static unsafe void SetBit(this ImFontGlyphRangesBuilderPtr target, nuint n) => + PInvoke.ImFontGlyphRangesBuilder_SetBit(target, n); + + /// + /// + /// Add character + /// + /// + /// C++: + /// imgui.h:3671 + ///
inline void AddChar(ImWchar c) + ///
+ ///
+ public static unsafe void AddChar(this ImFontGlyphRangesBuilderPtr target, uint c) => + PInvoke.ImFontGlyphRangesBuilder_AddChar(target, c); + + /// + /// + /// Add string (each character of the UTF-8 string are added) + /// + /// + /// C++: + /// imgui.h:3672 + /// , + /// imgui_draw.cpp:5019 + ///
void AddText(const char* text, const char* text_end = NULL) + ///
+ ///
+ public static unsafe void AddText(this ImFontGlyphRangesBuilderPtr target, ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.ImFontGlyphRangesBuilder_AddText(target, text_fixed, text_fixed + text.Length); + } + } + + /// + /// + /// Add ranges, e.g. builder.AddRanges(ImFontAtlas::GetGlyphRangesDefault()) to force add all of + /// ASCII/Latin+Ext + /// + /// + /// C++: + /// imgui.h:3673 + /// , + /// imgui_draw.cpp:5032 + ///
void AddRanges(const ImWchar* ranges) + ///
+ ///
+ public static unsafe void AddRanges(this ImFontGlyphRangesBuilderPtr target, ReadOnlySpan ranges) + { + fixed (uint* ranges_fixed = ranges) + { + PInvoke.ImFontGlyphRangesBuilder_AddRanges(target, ranges_fixed); + } + } + + /// + /// + /// Output new ranges + /// + /// + /// C++: + /// imgui.h:3674 + /// , + /// imgui_draw.cpp:5039 + ///
void BuildRanges(ImVector<ImWchar>* out_ranges) + ///
+ ///
+ public static unsafe void BuildRanges(this ImFontGlyphRangesBuilderPtr target, out ImVector outRanges) + { + fixed (ImVector* outRanges_fixed = &outRanges) + { + PInvoke.ImFontGlyphRangesBuilder_BuildRanges(target, outRanges_fixed); + } + } + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGui.gen.cs b/Brutal.ImGui/Generated/Functions/ImGui.gen.cs new file mode 100644 index 0000000..a2c6b9f --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGui.gen.cs @@ -0,0 +1,11524 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + /// + /// + /// C++: + /// imgui.h:396 + /// , + /// imgui.cpp:4042 + ///
ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL) + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + public static unsafe ImGuiContextPtr CreateContext(ImFontAtlasPtr sharedFontAtlas = default) => + PInvoke.CreateContext(sharedFontAtlas); + + /// + /// + /// NULL = destroy current context + /// + /// + /// C++: + /// imgui.h:397 + /// , + /// imgui.cpp:4053 + ///
void DestroyContext(ImGuiContext* ctx = NULL) + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + public static unsafe void DestroyContext(ImGuiContextPtr ctx = default) => PInvoke.DestroyContext(ctx); + + /// + /// + /// C++: + /// imgui.h:398 + /// , + /// imgui.cpp:4013 + ///
ImGuiContext* GetCurrentContext() + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + /// Internal state access - if you want to share Dear ImGui state between modules (e.g. DLL) or allocate it yourself + /// Note that we still point to some static data and members (such as GFontAtlas), so the state instance you end up using will point to the static data within its module + /// + /// + public static unsafe ImGuiContextPtr GetCurrentContext() => PInvoke.GetCurrentContext(); + + /// + /// + /// C++: + /// imgui.h:399 + /// , + /// imgui.cpp:4018 + ///
void SetCurrentContext(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + public static unsafe void SetCurrentContext(ImGuiContextPtr ctx) => PInvoke.SetCurrentContext(ctx); + + /// + /// + /// access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags) + /// + /// + /// C++: + /// imgui.h:402 + /// , + /// imgui.cpp:5083 + ///
ImGuiIO& GetIO() + ///
+ ///
+ /// + /// + /// Main + /// + /// + public static unsafe ImGuiIOPtr GetIO() => PInvoke.GetIO(); + + /// + /// + /// access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS + /// Clipboard, IME etc.) + /// + /// + /// C++: + /// imgui.h:403 + /// , + /// imgui.cpp:5096 + ///
ImGuiPlatformIO& GetPlatformIO() + ///
+ ///
+ /// + /// + /// Main + /// + /// + public static unsafe ImGuiPlatformIOPtr GetPlatformIO() => PInvoke.GetPlatformIO(); + + /// + /// + /// access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style + /// mid-frame! + /// + /// + /// C++: + /// imgui.h:404 + /// , + /// imgui.cpp:3468 + ///
ImGuiStyle& GetStyle() + ///
+ ///
+ /// + /// + /// Main + /// + /// + public static unsafe ImGuiStylePtr GetStyle() => PInvoke.GetStyle(); + + /// + /// + /// start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame(). + /// + /// + /// C++: + /// imgui.h:405 + /// , + /// imgui.cpp:5493 + ///
void NewFrame() + ///
+ ///
+ /// + /// + /// Main + /// + /// + public static unsafe void NewFrame() => PInvoke.NewFrame(); + + /// + /// + /// ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping + /// rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't + /// need to render, better to not create any windows and not call NewFrame() at all! + /// + /// + /// C++: + /// imgui.h:406 + /// , + /// imgui.cpp:6017 + ///
void EndFrame() + ///
+ ///
+ /// + /// + /// Main + /// + /// + /// This is normally called by Render(). You may want to call it directly if you want to avoid calling + /// Render() but the gain will be very minimal. + /// + /// + public static unsafe void EndFrame() => PInvoke.EndFrame(); + + /// + /// + /// ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData(). + /// + /// + /// C++: + /// imgui.h:407 + /// , + /// imgui.cpp:6131 + ///
void Render() + ///
+ ///
+ /// + /// + /// Main + /// + /// + /// Prepare the data for rendering so you can call GetDrawData() + /// (As with anything within the ImGui:: namespace this doesn't touch your GPU or graphics API at all: + /// it is the role of the ImGui_ImplXXXX_RenderDrawData() function provided by the renderer backend) + /// + /// + public static unsafe void Render() => PInvoke.Render(); + + /// + /// + /// valid after Render() and until the next call to NewFrame(). Call ImGui_ImplXXXX_RenderDrawData() + /// function in your Renderer Backend to render. + /// + /// + /// C++: + /// imgui.h:408 + /// , + /// imgui.cpp:5110 + ///
ImDrawData* GetDrawData() + ///
+ ///
+ /// + /// + /// Main + /// + /// + /// Pass this to your backend rendering function! Valid after Render() and until the next call to NewFrame() + /// + /// + public static unsafe ImDrawDataPtr GetDrawData() => PInvoke.GetDrawData(); + + /// + /// + /// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make + /// it always available in your application! + /// + /// + /// C++: + /// imgui.h:411 + /// , + /// imgui_demo.cpp:346 + ///
void ShowDemoWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demonstrate most Dear ImGui features (this is big function!) + /// You may execute this function to experiment with the UI and understand what it does. + /// You may then search for keywords in the code when you are interested by a specific feature. + /// + /// + public static unsafe void ShowDemoWindow(ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.ShowDemoWindow((Bool8*)pOpen_fixed); + } + } + + /// + /// + /// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make + /// it always available in your application! + /// + /// + /// C++: + /// imgui.h:411 + /// , + /// imgui_demo.cpp:346 + ///
void ShowDemoWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demonstrate most Dear ImGui features (this is big function!) + /// You may execute this function to experiment with the UI and understand what it does. + /// You may then search for keywords in the code when you are interested by a specific feature. + /// + /// + public static unsafe void ShowDemoWindow() => PInvoke.ShowDemoWindow(null); + + /// + /// + /// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal + /// state, etc. + /// + /// + /// C++: + /// imgui.h:412 + /// , + /// imgui.cpp:21785 + ///
void ShowMetricsWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe void ShowMetricsWindow(ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.ShowMetricsWindow((Bool8*)pOpen_fixed); + } + } + + /// + /// + /// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal + /// state, etc. + /// + /// + /// C++: + /// imgui.h:412 + /// , + /// imgui.cpp:21785 + ///
void ShowMetricsWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe void ShowMetricsWindow() => PInvoke.ShowMetricsWindow(null); + + /// + /// + /// create Debug Log window. display a simplified log of important dear imgui events. + /// + /// + /// C++: + /// imgui.h:413 + /// , + /// imgui.cpp:23266 + ///
void ShowDebugLogWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe void ShowDebugLogWindow(ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.ShowDebugLogWindow((Bool8*)pOpen_fixed); + } + } + + /// + /// + /// create Debug Log window. display a simplified log of important dear imgui events. + /// + /// + /// C++: + /// imgui.h:413 + /// , + /// imgui.cpp:23266 + ///
void ShowDebugLogWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe void ShowDebugLogWindow() => PInvoke.ShowDebugLogWindow(null); + + /// + /// + /// create Stack Tool window. hover items with mouse to query information about the source of their unique + /// ID. + /// + /// + /// C++: + /// imgui.h:414 + /// , + /// imgui.cpp:23588 + ///
void ShowIDStackToolWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// ID Stack Tool: Display UI + /// + /// + public static unsafe void ShowIDStackToolWindow(ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.ShowIDStackToolWindow((Bool8*)pOpen_fixed); + } + } + + /// + /// + /// create Stack Tool window. hover items with mouse to query information about the source of their unique + /// ID. + /// + /// + /// C++: + /// imgui.h:414 + /// , + /// imgui.cpp:23588 + ///
void ShowIDStackToolWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// ID Stack Tool: Display UI + /// + /// + public static unsafe void ShowIDStackToolWindow() => PInvoke.ShowIDStackToolWindow(null); + + /// + /// + /// create About window. display Dear ImGui version, credits and build/system information. + /// + /// + /// C++: + /// imgui.h:415 + /// , + /// imgui_demo.cpp:8137 + ///
void ShowAboutWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe void ShowAboutWindow(ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.ShowAboutWindow((Bool8*)pOpen_fixed); + } + } + + /// + /// + /// create About window. display Dear ImGui version, credits and build/system information. + /// + /// + /// C++: + /// imgui.h:415 + /// , + /// imgui_demo.cpp:8137 + ///
void ShowAboutWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe void ShowAboutWindow() => PInvoke.ShowAboutWindow(null); + + /// + /// + /// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, + /// revert to and save to (else it uses the default style) + /// + /// + /// C++: + /// imgui.h:416 + /// , + /// imgui_demo.cpp:8358 + ///
void ShowStyleEditor(ImGuiStyle* ref = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// We omit the ImGui:: prefix in this function, as we don't expect user to be copy and pasting this code. + /// + /// + public static unsafe void ShowStyleEditor(ImGuiStylePtr @ref = default) => PInvoke.ShowStyleEditor(@ref); + + /// + /// + /// add style selector block (not a window), essentially a combo listing the default styles. + /// + /// + /// C++: + /// imgui.h:417 + /// , + /// imgui_demo.cpp:8333 + ///
bool ShowStyleSelector(const char* label) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demo helper function to select among default colors. See ShowStyleEditor() for more advanced options. + /// Here we use the simplified Combo() api that packs items into a single literal string. + /// Useful for quick combo boxes where the choices are known locally. + /// + /// + public static unsafe bool ShowStyleSelector(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ShowStyleSelector(label_fixed); + } + } + + /// + /// + /// add font selector block (not a window), essentially a combo listing the loaded fonts. + /// + /// + /// C++: + /// imgui.h:418 + /// , + /// imgui.cpp:23692 + ///
void ShowFontSelector(const char* label) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demo helper function to select among loaded fonts. + /// Here we use the regular BeginCombo()/EndCombo() api which is the more flexible one. + /// + /// + public static unsafe void ShowFontSelector(ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.ShowFontSelector(label_fixed); + } + } + + /// + /// + /// add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard + /// controls). + /// + /// + /// C++: + /// imgui.h:419 + /// , + /// imgui_demo.cpp:8696 + ///
void ShowUserGuide() + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// We omit the ImGui:: prefix in this function, as we don't expect user to be copy and pasting this code. + /// + /// + public static unsafe void ShowUserGuide() => PInvoke.ShowUserGuide(); + + /// + /// + /// get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the + /// compiled version of imgui.cpp) + /// + /// + /// C++: + /// imgui.h:420 + /// , + /// imgui.cpp:5078 + ///
const char* GetVersion() + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + public static unsafe ImString GetVersion() => Utf8.GetNullTerminatedSpan(PInvoke.GetVersion()); + + /// + /// + /// new, recommended style (default) + /// + /// + /// C++: + /// imgui.h:423 + /// , + /// imgui_draw.cpp:184 + ///
void StyleColorsDark(ImGuiStyle* dst = NULL) + ///
+ ///
+ /// + /// + /// Styles + /// + /// + public static unsafe void StyleColorsDark(ImGuiStylePtr dst = default) => PInvoke.StyleColorsDark(dst); + + /// + /// + /// best used with borders and a custom, thicker font + /// + /// + /// C++: + /// imgui.h:424 + /// , + /// imgui_draw.cpp:319 + ///
void StyleColorsLight(ImGuiStyle* dst = NULL) + ///
+ ///
+ /// + /// + /// Styles + /// + /// + /// Those light colors are better suited with a thicker font than the default one + FrameBorder + /// + /// + public static unsafe void StyleColorsLight(ImGuiStylePtr dst = default) => PInvoke.StyleColorsLight(dst); + + /// + /// + /// classic imgui style + /// + /// + /// C++: + /// imgui.h:425 + /// , + /// imgui_draw.cpp:251 + ///
void StyleColorsClassic(ImGuiStyle* dst = NULL) + ///
+ ///
+ /// + /// + /// Styles + /// + /// + public static unsafe void StyleColorsClassic(ImGuiStylePtr dst = default) => PInvoke.StyleColorsClassic(dst); + + /// + /// + /// C++: + /// imgui.h:439 + /// , + /// imgui.cpp:7571 + ///
bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Windows + /// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack. + /// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window, + /// which clicking will set the boolean to false when clicked. + /// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times. + /// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin(). + /// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value! + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// - Note that the bottom of window stack always contains a window called "Debug". + /// + /// + /// Push a new Dear ImGui window to add widgets to. + /// - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair. + /// - Begin/End can be called multiple times during the frame with the same window name to append content. + /// - The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file). + /// You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file. + /// - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned. + /// - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed. + /// + /// + public static unsafe bool Begin(ImString name, ref bool pOpen, ImGuiWindowFlags flags = default) + { + fixed (bool* pOpen_fixed = &pOpen) + { + fixed (byte* name_fixed = name) + { + return PInvoke.Begin(name_fixed, (Bool8*)pOpen_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:439 + /// , + /// imgui.cpp:7571 + ///
bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Windows + /// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack. + /// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window, + /// which clicking will set the boolean to false when clicked. + /// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times. + /// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin(). + /// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value! + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// - Note that the bottom of window stack always contains a window called "Debug". + /// + /// + /// Push a new Dear ImGui window to add widgets to. + /// - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair. + /// - Begin/End can be called multiple times during the frame with the same window name to append content. + /// - The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file). + /// You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file. + /// - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned. + /// - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed. + /// + /// + public static unsafe bool Begin(ImString name, ImGuiWindowFlags flags = default) + { + fixed (byte* name_fixed = name) + { + return PInvoke.Begin(name_fixed, null, flags); + } + } + + /// + /// + /// C++: + /// imgui.h:440 + /// , + /// imgui.cpp:8526 + ///
void End() + ///
+ ///
+ /// + /// + /// Windows + /// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack. + /// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window, + /// which clicking will set the boolean to false when clicked. + /// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times. + /// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin(). + /// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value! + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// - Note that the bottom of window stack always contains a window called "Debug". + /// + /// + public static unsafe void End() => PInvoke.End(); + + /// + /// + /// C++: + /// imgui.h:460 + /// , + /// imgui.cpp:6471 + ///
+ /// bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0) + ///
+ ///
+ /// + /// + /// Child Windows + /// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. + /// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + /// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true. + /// Consider updating your old code: + /// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + /// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders); + /// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + /// == 0.0f: use remaining parent window size for this axis. + /// > 0.0f: use specified size for this axis. + /// < 0.0f: right/bottom-align to specified distance from available content boundaries. + /// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + /// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + /// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// + /// + /// Prior to v1.90 2023/10/16, the BeginChild() function took a 'bool border = false' parameter instead of 'ImGuiChildFlags child_flags = 0'. + /// ImGuiChildFlags_Borders is defined as always == 1 in order to allow old code passing 'true'. Read comments in imgui.h for details! + /// + /// + public static unsafe bool BeginChild( + ImString strId, + in float2? size = default, + ImGuiChildFlags childFlags = default, + ImGuiWindowFlags windowFlags = default + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginChild_0(strId_fixed, &size_default, childFlags, windowFlags); + } + } + + /// + /// + /// C++: + /// imgui.h:461 + /// , + /// imgui.cpp:6477 + ///
+ /// bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0) + ///
+ ///
+ /// + /// + /// Child Windows + /// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. + /// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + /// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true. + /// Consider updating your old code: + /// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + /// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders); + /// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + /// == 0.0f: use remaining parent window size for this axis. + /// > 0.0f: use specified size for this axis. + /// < 0.0f: right/bottom-align to specified distance from available content boundaries. + /// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + /// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + /// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// + /// + public static unsafe bool BeginChild( + ImGuiID id, + in float2? size = default, + ImGuiChildFlags childFlags = default, + ImGuiWindowFlags windowFlags = default + ) + { + var size_default = size ?? new float2(0f, 0f); + return PInvoke.BeginChild_1(id, &size_default, childFlags, windowFlags); + } + + /// + /// + /// C++: + /// imgui.h:462 + /// , + /// imgui.cpp:6611 + ///
void EndChild() + ///
+ ///
+ /// + /// + /// Child Windows + /// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. + /// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + /// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true. + /// Consider updating your old code: + /// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + /// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders); + /// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + /// == 0.0f: use remaining parent window size for this axis. + /// > 0.0f: use specified size for this axis. + /// < 0.0f: right/bottom-align to specified distance from available content boundaries. + /// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + /// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + /// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// + /// + public static unsafe void EndChild() => PInvoke.EndChild(); + + /// + /// + /// C++: + /// imgui.h:466 + /// , + /// imgui.cpp:8960 + ///
bool IsWindowAppearing() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe bool IsWindowAppearing() => PInvoke.IsWindowAppearing(); + + /// + /// + /// C++: + /// imgui.h:467 + /// , + /// imgui.cpp:8954 + ///
bool IsWindowCollapsed() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe bool IsWindowCollapsed() => PInvoke.IsWindowCollapsed(); + + /// + /// + /// is current window focused? or its root/child, depending on flags. see flags for options. + /// + /// + /// C++: + /// imgui.h:468 + /// , + /// imgui.cpp:13214 + ///
bool IsWindowFocused(ImGuiFocusedFlags flags=0) + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + /// Similar to IsWindowHovered() + /// + /// + public static unsafe bool IsWindowFocused(ImGuiFocusedFlags flags = default) => PInvoke.IsWindowFocused(flags); + + /// + /// + /// is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for + /// options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or + /// to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' boolean for + /// that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my + /// application?" for details. + /// + /// + /// C++: + /// imgui.h:469 + /// , + /// imgui.cpp:8764 + ///
bool IsWindowHovered(ImGuiHoveredFlags flags=0) + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + /// Is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options. + /// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, + /// you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! + /// Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details. + /// + /// + public static unsafe bool IsWindowHovered(ImGuiHoveredFlags flags = default) => PInvoke.IsWindowHovered(flags); + + /// + /// + /// get draw list associated to the current window, to append your own drawing primitives + /// + /// + /// C++: + /// imgui.h:470 + /// , + /// imgui.cpp:9068 + ///
ImDrawList* GetWindowDrawList() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe ImDrawListPtr GetWindowDrawList() => PInvoke.GetWindowDrawList(); + + /// + /// + /// get DPI scale currently associated to the current window's viewport. + /// + /// + /// C++: + /// imgui.h:471 + /// , + /// imgui.cpp:9074 + ///
float GetWindowDpiScale() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe float GetWindowDpiScale() => PInvoke.GetWindowDpiScale(); + + /// + /// + /// get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always + /// using GetCursorScreenPos() and GetContentRegionAvail() instead) + /// + /// + /// C++: + /// imgui.h:472 + /// , + /// imgui.cpp:8834 + ///
ImVec2 GetWindowPos() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe float2 GetWindowPos() => PInvoke.GetWindowPos(); + + /// + /// + /// get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using + /// GetCursorScreenPos() and GetContentRegionAvail() instead) + /// + /// + /// C++: + /// imgui.h:473 + /// , + /// imgui.cpp:8877 + ///
ImVec2 GetWindowSize() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe float2 GetWindowSize() => PInvoke.GetWindowSize(); + + /// + /// + /// get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x. + /// + /// + /// C++: + /// imgui.h:474 + /// , + /// imgui.cpp:8822 + ///
float GetWindowWidth() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe float GetWindowWidth() => PInvoke.GetWindowWidth(); + + /// + /// + /// get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y. + /// + /// + /// C++: + /// imgui.h:475 + /// , + /// imgui.cpp:8828 + ///
float GetWindowHeight() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe float GetWindowHeight() => PInvoke.GetWindowHeight(); + + /// + /// + /// get viewport currently associated to the current window. + /// + /// + /// C++: + /// imgui.h:476 + /// , + /// imgui.cpp:9080 + ///
ImGuiViewport*GetWindowViewport() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + public static unsafe ImGuiViewportPtr GetWindowViewport() => PInvoke.GetWindowViewport(); + + /// + /// + /// set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc. + /// + /// + /// C++: + /// imgui.h:480 + /// , + /// imgui.cpp:8972 + ///
+ /// void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowPos(in float2 pos, ImGuiCond cond = default, in float2? pivot = default) + { + var pivot_default = pivot ?? new float2(0f, 0f); + fixed (float2* pos_fixed = &pos) + { + PInvoke.SetNextWindowPos(pos_fixed, cond, &pivot_default); + } + } + + /// + /// + /// set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() + /// + /// + /// C++: + /// imgui.h:481 + /// , + /// imgui.cpp:8983 + ///
void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowSize(in float2 size, ImGuiCond cond = default) + { + fixed (float2* size_fixed = &size) + { + PInvoke.SetNextWindowSize(size_fixed, cond); + } + } + + /// + /// + /// set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max + /// of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial + /// programmatic constraints. + /// + /// + /// C++: + /// imgui.h:482 + /// , + /// imgui.cpp:8996 + ///
+ /// void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + /// For each axis: + /// - Use 0.0f as min or FLT_MAX as max if you don't want limits, e.g. size_min = (500.0f, 0.0f), size_max = (FLT_MAX, FLT_MAX) sets a minimum width. + /// - Use -1 for both min and max of same axis to preserve current size which itself is a constraint. + /// - See "Demo->Examples->Constrained-resizing window" for examples. + /// + /// + public static unsafe void SetNextWindowSizeConstraints( + in float2 sizeMin, + in float2 sizeMax, + ImGuiSizeCallback? customCallback = default, + Ptr customCallbackData = default + ) + { + fixed (float2* sizeMax_fixed = &sizeMax) + { + fixed (float2* sizeMin_fixed = &sizeMin) + { + PInvoke.SetNextWindowSizeConstraints( + sizeMin_fixed, + sizeMax_fixed, + customCallback == null ? 0 : Marshal.GetFunctionPointerForDelegate(customCallback), + customCallbackData + ); + } + } + } + + /// + /// + /// set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max + /// of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial + /// programmatic constraints. + /// + /// + /// C++: + /// imgui.h:482 + /// , + /// imgui.cpp:8996 + ///
+ /// void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + /// For each axis: + /// - Use 0.0f as min or FLT_MAX as max if you don't want limits, e.g. size_min = (500.0f, 0.0f), size_max = (FLT_MAX, FLT_MAX) sets a minimum width. + /// - Use -1 for both min and max of same axis to preserve current size which itself is a constraint. + /// - See "Demo->Examples->Constrained-resizing window" for examples. + /// + /// + public static unsafe void SetNextWindowSizeConstraints( + in float2 sizeMin, + in float2 sizeMax, + delegate* unmanaged[Cdecl] customCallback, + Ptr customCallbackData = default + ) + { + fixed (float2* sizeMax_fixed = &sizeMax) + { + fixed (float2* sizeMin_fixed = &sizeMin) + { + PInvoke.SetNextWindowSizeConstraints( + sizeMin_fixed, + sizeMax_fixed, + (nint)customCallback, + customCallbackData + ); + } + } + } + + /// + /// + /// set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not + /// including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to leave + /// it automatic. call before Begin() + /// + /// + /// C++: + /// imgui.h:483 + /// , + /// imgui.cpp:9007 + ///
void SetNextWindowContentSize(const ImVec2& size) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + /// Content size = inner scrollable rectangle, padded with WindowPadding. + /// SetNextWindowContentSize(ImVec2(100,100) + ImGuiWindowFlags_AlwaysAutoResize will always allow submitting a 100x100 item. + /// + /// + public static unsafe void SetNextWindowContentSize(in float2 size) + { + fixed (float2* size_fixed = &size) + { + PInvoke.SetNextWindowContentSize(size_fixed); + } + } + + /// + /// + /// set next window collapsed state. call before Begin() + /// + /// + /// C++: + /// imgui.h:484 + /// , + /// imgui.cpp:9021 + ///
void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = default) => + PInvoke.SetNextWindowCollapsed(collapsed, cond); + + /// + /// + /// set next window to be focused / top-most. call before Begin() + /// + /// + /// C++: + /// imgui.h:485 + /// , + /// imgui.cpp:13207 + ///
void SetNextWindowFocus() + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowFocus() => PInvoke.SetNextWindowFocus(); + + /// + /// + /// set next window scrolling value (use < 0.0f to not affect a given axis). + /// + /// + /// C++: + /// imgui.h:486 + /// , + /// imgui.cpp:9014 + ///
void SetNextWindowScroll(const ImVec2& scroll) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowScroll(in float2 scroll) + { + fixed (float2* scroll_fixed = &scroll) + { + PInvoke.SetNextWindowScroll(scroll_fixed); + } + } + + /// + /// + /// set next window background color alpha. helper to easily override the Alpha component of + /// ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground. + /// + /// + /// C++: + /// imgui.h:487 + /// , + /// imgui.cpp:9030 + ///
void SetNextWindowBgAlpha(float alpha) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowBgAlpha(float alpha) => PInvoke.SetNextWindowBgAlpha(alpha); + + /// + /// + /// set next window viewport + /// + /// + /// C++: + /// imgui.h:488 + /// , + /// imgui.cpp:9037 + ///
void SetNextWindowViewport(ImGuiID viewport_id) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetNextWindowViewport(ImGuiID viewportId) => + PInvoke.SetNextWindowViewport(viewportId); + + /// + /// + /// (not recommended) set current window position - call within Begin()/End(). prefer using + /// SetNextWindowPos(), as this may incur tearing and side-effects. + /// + /// + /// C++: + /// imgui.h:489 + /// , + /// imgui.cpp:8865 + ///
void SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowPos(in float2 pos, ImGuiCond cond = default) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.SetWindowPos_0(pos_fixed, cond); + } + } + + /// + /// + /// (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0, 0) to force an + /// auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects. + /// + /// + /// C++: + /// imgui.h:490 + /// , + /// imgui.cpp:8912 + ///
void SetWindowSize(const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowSize(in float2 size, ImGuiCond cond = default) + { + fixed (float2* size_fixed = &size) + { + PInvoke.SetWindowSize_0(size_fixed, cond); + } + } + + /// + /// + /// (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed(). + /// + /// + /// C++: + /// imgui.h:491 + /// , + /// imgui.cpp:8949 + ///
void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowCollapsed(bool collapsed, ImGuiCond cond = default) => + PInvoke.SetWindowCollapsed_0(collapsed, cond); + + /// + /// + /// (not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus(). + /// + /// + /// C++: + /// imgui.h:492 + /// , + /// imgui.cpp:13189 + ///
void SetWindowFocus() + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowFocus() => PInvoke.SetWindowFocus_0(); + + /// + /// + /// set named window position. + /// + /// + /// C++: + /// imgui.h:493 + /// , + /// imgui.cpp:8871 + ///
void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowPos(ImString name, in float2 pos, ImGuiCond cond = default) + { + fixed (float2* pos_fixed = &pos) + { + fixed (byte* name_fixed = name) + { + PInvoke.SetWindowPos_1(name_fixed, pos_fixed, cond); + } + } + } + + /// + /// + /// set named window size. set axis to 0.0f to force an auto-fit on this axis. + /// + /// + /// C++: + /// imgui.h:494 + /// , + /// imgui.cpp:8917 + ///
void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowSize(ImString name, in float2 size, ImGuiCond cond = default) + { + fixed (float2* size_fixed = &size) + { + fixed (byte* name_fixed = name) + { + PInvoke.SetWindowSize_1(name_fixed, size_fixed, cond); + } + } + } + + /// + /// + /// set named window collapsed state + /// + /// + /// C++: + /// imgui.h:495 + /// , + /// imgui.cpp:8966 + ///
void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowCollapsed(ImString name, bool collapsed, ImGuiCond cond = default) + { + fixed (byte* name_fixed = name) + { + PInvoke.SetWindowCollapsed_1(name_fixed, collapsed, cond); + } + } + + /// + /// + /// set named window to be focused / top-most. use NULL to remove focus. + /// + /// + /// C++: + /// imgui.h:496 + /// , + /// imgui.cpp:13194 + ///
void SetWindowFocus(const char* name) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + public static unsafe void SetWindowFocus(ImString name) + { + fixed (byte* name_fixed = name) + { + PInvoke.SetWindowFocus_1(name_fixed); + } + } + + /// + /// + /// get scrolling amount [0 .. GetScrollMaxX()] + /// + /// + /// C++: + /// imgui.h:501 + /// , + /// imgui.cpp:12320 + ///
float GetScrollX() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe float GetScrollX() => PInvoke.GetScrollX(); + + /// + /// + /// get scrolling amount [0 .. GetScrollMaxY()] + /// + /// + /// C++: + /// imgui.h:502 + /// , + /// imgui.cpp:12326 + ///
float GetScrollY() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe float GetScrollY() => PInvoke.GetScrollY(); + + /// + /// + /// set scrolling amount [0 .. GetScrollMaxX()] + /// + /// + /// C++: + /// imgui.h:503 + /// , + /// imgui.cpp:12358 + ///
void SetScrollX(float scroll_x) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe void SetScrollX(float scrollX) => PInvoke.SetScrollX(scrollX); + + /// + /// + /// set scrolling amount [0 .. GetScrollMaxY()] + /// + /// + /// C++: + /// imgui.h:504 + /// , + /// imgui.cpp:12364 + ///
void SetScrollY(float scroll_y) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe void SetScrollY(float scrollY) => PInvoke.SetScrollY(scrollY); + + /// + /// + /// get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x + /// + /// + /// C++: + /// imgui.h:505 + /// , + /// imgui.cpp:12332 + ///
float GetScrollMaxX() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe float GetScrollMaxX() => PInvoke.GetScrollMaxX(); + + /// + /// + /// get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y + /// + /// + /// C++: + /// imgui.h:506 + /// , + /// imgui.cpp:12338 + ///
float GetScrollMaxY() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe float GetScrollMaxY() => PInvoke.GetScrollMaxY(); + + /// + /// + /// adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, + /// 1.0: right. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() + /// instead. + /// + /// + /// C++: + /// imgui.h:507 + /// , + /// imgui.cpp:12409 + ///
void SetScrollHereX(float center_x_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + /// center_x_ratio: 0.0f left of last item, 0.5f horizontal center of last item, 1.0f right of last item. + /// + /// + public static unsafe void SetScrollHereX(float centerXRatio = 0.5f) => PInvoke.SetScrollHereX(centerXRatio); + + /// + /// + /// adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, + /// 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() + /// instead. + /// + /// + /// C++: + /// imgui.h:508 + /// , + /// imgui.cpp:12422 + ///
void SetScrollHereY(float center_y_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + /// center_y_ratio: 0.0f top of last item, 0.5f vertical center of last item, 1.0f bottom of last item. + /// + /// + public static unsafe void SetScrollHereY(float centerYRatio = 0.5f) => PInvoke.SetScrollHereY(centerYRatio); + + /// + /// + /// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to + /// compute a valid position. + /// + /// + /// C++: + /// imgui.h:509 + /// , + /// imgui.cpp:12396 + ///
void SetScrollFromPosX(float local_x, float center_x_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe void SetScrollFromPosX(float localX, float centerXRatio = 0.5f) => + PInvoke.SetScrollFromPosX(localX, centerXRatio); + + /// + /// + /// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to + /// compute a valid position. + /// + /// + /// C++: + /// imgui.h:510 + /// , + /// imgui.cpp:12402 + ///
void SetScrollFromPosY(float local_y, float center_y_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + public static unsafe void SetScrollFromPosY(float localY, float centerYRatio = 0.5f) => + PInvoke.SetScrollFromPosY(localY, centerYRatio); + + /// + /// + /// Use NULL as a shortcut to keep current font. Use 0.0f to keep current size. + /// + /// + /// C++: + /// imgui.h:528 + /// , + /// imgui.cpp:9508 + ///
void PushFont(ImFont* font, float font_size_base_unscaled) + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + /// If you want to scale an existing font size! Read comments in imgui.h! + /// + /// + public static unsafe void PushFont(ImFontPtr font, float fontSizeBaseUnscaled) => + PInvoke.PushFont(font, fontSizeBaseUnscaled); + + /// + /// + /// C++: + /// imgui.h:529 + /// , + /// imgui.cpp:9522 + ///
void PopFont() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + public static unsafe void PopFont() => PInvoke.PopFont(); + + /// + /// + /// get current font + /// + /// + /// C++: + /// imgui.h:530 + /// , + /// imgui.cpp:9087 + ///
ImFont* GetFont() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + public static unsafe ImFontPtr GetFont() => PInvoke.GetFont(); + + /// + /// + /// get current scaled font size (= height in pixels). AFTER global scale factors applied. *IMPORTANT* DO + /// NOT PASS THIS VALUE TO PushFont()! Use ImGui::GetStyle().FontSizeBase to get value before global scale + /// factors. + /// + /// + /// C++: + /// imgui.h:531 + /// , + /// imgui.cpp:9100 + ///
float GetFontSize() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + /// Get current font size (= height in pixels) of current font, with global scale factors applied. + /// - Use style.FontSizeBase to get value before global scale factors. + /// - recap: ImGui::GetFontSize() == style.FontSizeBase * (style.FontScaleMain * style.FontScaleDpi * other_scaling_factors) + /// + /// + public static unsafe float GetFontSize() => PInvoke.GetFontSize(); + + /// + /// + /// get current font bound at current size // == GetFont()->GetFontBaked(GetFontSize()) + /// + /// + /// C++: + /// imgui.h:532 + /// , + /// imgui.cpp:9092 + ///
ImFontBaked* GetFontBaked() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + public static unsafe ImFontBakedPtr GetFontBaked() => PInvoke.GetFontBaked(); + + /// + /// + /// modify a style color. always use this if you modify the style after NewFrame(). + /// + /// + /// C++: + /// imgui.h:535 + /// , + /// imgui.cpp:3508 + ///
void PushStyleColor(ImGuiCol idx, ImU32 col) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + /// FIXME: This may incur a round-trip (if the end user got their data from a float4) but eventually we aim + /// to store the in-flight colors as ImU32 + /// + /// + public static unsafe void PushStyleColor(ImGuiCol idx, ImColor8 col) => PInvoke.PushStyleColor_0(idx, col); + + /// + /// + /// C++: + /// imgui.h:536 + /// , + /// imgui.cpp:3519 + ///
void PushStyleColor(ImGuiCol idx, const ImVec4& col) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PushStyleColor(ImGuiCol idx, in float4 col) + { + fixed (float4* col_fixed = &col) + { + PInvoke.PushStyleColor_1(idx, col_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:537 + /// , + /// imgui.cpp:3530 + ///
void PopStyleColor(int count = 1) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PopStyleColor(int count = 1) => PInvoke.PopStyleColor(count); + + /// + /// + /// modify a style float variable. always use this if you modify the style after NewFrame()! + /// + /// + /// C++: + /// imgui.h:538 + /// , + /// imgui.cpp:3602 + ///
void PushStyleVar(ImGuiStyleVar idx, float val) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PushStyleVar(ImGuiStyleVar idx, float val) => PInvoke.PushStyleVar_0(idx, val); + + /// + /// + /// modify a style ImVec2 variable. " + /// + /// + /// C++: + /// imgui.h:539 + /// , + /// imgui.cpp:3644 + ///
void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PushStyleVar(ImGuiStyleVar idx, in float2 val) + { + fixed (float2* val_fixed = &val) + { + PInvoke.PushStyleVar_1(idx, val_fixed); + } + } + + /// + /// + /// modify X component of a style ImVec2 variable. " + /// + /// + /// C++: + /// imgui.h:540 + /// , + /// imgui.cpp:3616 + ///
void PushStyleVarX(ImGuiStyleVar idx, float val_x) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PushStyleVarX(ImGuiStyleVar idx, float valX) => PInvoke.PushStyleVarX(idx, valX); + + /// + /// + /// modify Y component of a style ImVec2 variable. " + /// + /// + /// C++: + /// imgui.h:541 + /// , + /// imgui.cpp:3630 + ///
void PushStyleVarY(ImGuiStyleVar idx, float val_y) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PushStyleVarY(ImGuiStyleVar idx, float valY) => PInvoke.PushStyleVarY(idx, valY); + + /// + /// + /// C++: + /// imgui.h:542 + /// , + /// imgui.cpp:3658 + ///
void PopStyleVar(int count = 1) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PopStyleVar(int count = 1) => PInvoke.PopStyleVar(count); + + /// + /// + /// modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true) + /// + /// + /// C++: + /// imgui.h:543 + /// , + /// imgui.cpp:8587 + ///
void PushItemFlag(ImGuiItemFlags option, bool enabled) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PushItemFlag(ImGuiItemFlags option, bool enabled) => + PInvoke.PushItemFlag(option, enabled); + + /// + /// + /// C++: + /// imgui.h:544 + /// , + /// imgui.cpp:8600 + ///
void PopItemFlag() + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + public static unsafe void PopItemFlag() => PInvoke.PopItemFlag(); + + /// + /// + /// push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx + /// pixels to the right of window (so -FLT_MIN always align width to the right side). + /// + /// + /// C++: + /// imgui.h:547 + /// , + /// imgui.cpp:11956 + ///
void PushItemWidth(float item_width) + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + /// FIXME: Remove the == 0.0f behavior? + /// + /// + public static unsafe void PushItemWidth(float itemWidth) => PInvoke.PushItemWidth(itemWidth); + + /// + /// + /// C++: + /// imgui.h:548 + /// , + /// imgui.cpp:11984 + ///
void PopItemWidth() + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + public static unsafe void PopItemWidth() => PInvoke.PopItemWidth(); + + /// + /// + /// set width of the _next_ common large "item+label" widget. >0.0f: width in pixels, <0.0f align xx + /// pixels to the right of window (so -FLT_MIN always align width to the right side) + /// + /// + /// C++: + /// imgui.h:549 + /// , + /// imgui.cpp:11948 + ///
void SetNextItemWidth(float item_width) + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + /// Affect large frame+labels widgets only. + /// + /// + public static unsafe void SetNextItemWidth(float itemWidth) => PInvoke.SetNextItemWidth(itemWidth); + + /// + /// + /// width of item given pushed settings and current cursor position. NOT necessarily the width of last item + /// unlike most 'Item' functions. + /// + /// + /// C++: + /// imgui.h:550 + /// , + /// imgui.cpp:11999 + ///
float CalcItemWidth() + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + /// Calculate default item width given value passed to PushItemWidth() or SetNextItemWidth(). + /// The SetNextItemWidth() data is generally cleared/consumed by ItemAdd() or NextItemData.ClearFlags() + /// + /// + public static unsafe float CalcItemWidth() => PInvoke.CalcItemWidth(); + + /// + /// + /// push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window + /// (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space + /// + /// + /// C++: + /// imgui.h:551 + /// , + /// imgui.cpp:8675 + ///
void PushTextWrapPos(float wrap_local_pos_x = 0.0f) + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + public static unsafe void PushTextWrapPos(float wrapLocalPosX = 0f) => PInvoke.PushTextWrapPos(wrapLocalPosX); + + /// + /// + /// C++: + /// imgui.h:552 + /// , + /// imgui.cpp:8683 + ///
void PopTextWrapPos() + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + public static unsafe void PopTextWrapPos() => PInvoke.PopTextWrapPos(); + + /// + /// + /// get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API + /// + /// + /// C++: + /// imgui.h:556 + /// , + /// imgui.cpp:9105 + ///
ImVec2 GetFontTexUvWhitePixel() + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + public static unsafe float2 GetFontTexUvWhitePixel() => PInvoke.GetFontTexUvWhitePixel(); + + /// + /// + /// retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a + /// 32-bit value suitable for ImDrawList + /// + /// + /// C++: + /// imgui.h:557 + /// , + /// imgui.cpp:3474 + ///
ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + public static unsafe ImColor8 GetColorU32(ImGuiCol idx, float alphaMul = 1f) + { + var result = PInvoke.GetColorU32_0(idx, alphaMul); + return Unsafe.As(ref result); + } + + /// + /// + /// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList + /// + /// + /// C++: + /// imgui.h:558 + /// , + /// imgui.cpp:3482 + ///
ImU32 GetColorU32(const ImVec4& col) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + public static unsafe ImColor8 GetColorU32(in float4 col) + { + fixed (float4* col_fixed = &col) + { + var result = PInvoke.GetColorU32_1(col_fixed); + return Unsafe.As(ref result); + } + } + + /// + /// + /// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList + /// + /// + /// C++: + /// imgui.h:559 + /// , + /// imgui.cpp:3496 + ///
ImU32 GetColorU32(ImU32 col, float alpha_mul = 1.0f) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + public static unsafe ImColor8 GetColorU32(ImColor8 col, float alphaMul = 1f) + { + var result = PInvoke.GetColorU32_2(col, alphaMul); + return Unsafe.As(ref result); + } + + /// + /// + /// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), + /// otherwise use GetColorU32() to get style color with style alpha baked in. + /// + /// + /// C++: + /// imgui.h:560 + /// , + /// imgui.cpp:3490 + ///
const ImVec4& GetStyleColorVec4(ImGuiCol idx) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + public static unsafe float4 GetStyleColorVec4(ImGuiCol idx) => *PInvoke.GetStyleColorVec4(idx); + + /// + /// + /// cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than + /// GetCursorPos(), also more useful to work with ImDrawList API). + /// + /// + /// C++: + /// imgui.h:572 + /// , + /// imgui.cpp:11867 + ///
ImVec2 GetCursorScreenPos() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe float2 GetCursorScreenPos() => PInvoke.GetCursorScreenPos(); + + /// + /// + /// cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND. + /// + /// + /// C++: + /// imgui.h:573 + /// , + /// imgui.cpp:11873 + ///
void SetCursorScreenPos(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe void SetCursorScreenPos(in float2 pos) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.SetCursorScreenPos(pos_fixed); + } + } + + /// + /// + /// available space from current position. THIS IS YOUR BEST FRIEND. + /// + /// + /// C++: + /// imgui.h:574 + /// , + /// imgui.cpp:12064 + ///
ImVec2 GetContentRegionAvail() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe float2 GetContentRegionAvail() => PInvoke.GetContentRegionAvail(); + + /// + /// + /// [window-local] cursor position in window-local coordinates. This is not your best friend. + /// + /// + /// C++: + /// imgui.h:575 + /// , + /// imgui.cpp:11883 + ///
ImVec2 GetCursorPos() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + /// User generally sees positions in window coordinates. Internally we store CursorPos in absolute screen coordinates because it is more convenient. + /// Conversion happens as we pass the value to user, but it makes our naming convention confusing because GetCursorPos() == (DC.CursorPos - window.Pos). May want to rename 'DC.CursorPos'. + /// + /// + public static unsafe float2 GetCursorPos() => PInvoke.GetCursorPos(); + + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:576 + /// , + /// imgui.cpp:11889 + ///
float GetCursorPosX() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe float GetCursorPosX() => PInvoke.GetCursorPosX(); + + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:577 + /// , + /// imgui.cpp:11895 + ///
float GetCursorPosY() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe float GetCursorPosY() => PInvoke.GetCursorPosY(); + + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:578 + /// , + /// imgui.cpp:11901 + ///
void SetCursorPos(const ImVec2& local_pos) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe void SetCursorPos(in float2 localPos) + { + fixed (float2* localPos_fixed = &localPos) + { + PInvoke.SetCursorPos(localPos_fixed); + } + } + + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:579 + /// , + /// imgui.cpp:11909 + ///
void SetCursorPosX(float local_x) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe void SetCursorPosX(float localX) => PInvoke.SetCursorPosX(localX); + + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:580 + /// , + /// imgui.cpp:11917 + ///
void SetCursorPosY(float local_y) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe void SetCursorPosY(float localY) => PInvoke.SetCursorPosY(localY); + + /// + /// + /// [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after + /// Begin() to get the absolute coordinates version. + /// + /// + /// C++: + /// imgui.h:581 + /// , + /// imgui.cpp:11925 + ///
ImVec2 GetCursorStartPos() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + public static unsafe float2 GetCursorStartPos() => PInvoke.GetCursorStartPos(); + + /// + /// + /// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical + /// separator. + /// + /// + /// C++: + /// imgui.h:584 + /// , + /// imgui_widgets.cpp:1686 + ///
void Separator() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void Separator() => PInvoke.Separator(); + + /// + /// + /// call between widgets or groups to layout them horizontally. X position given in window coordinates. + /// + /// + /// C++: + /// imgui.h:585 + /// , + /// imgui.cpp:11841 + ///
void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + /// Gets back to previous line and continue with horizontal layout + /// offset_from_start_x == 0 : follow right after previous item + /// offset_from_start_x != 0 : align to specified x position (relative to window/group left) + /// spacing_w < 0 : use default spacing if offset_from_start_x == 0, no spacing if offset_from_start_x != 0 + /// spacing_w >= 0 : enforce spacing amount + /// + /// + public static unsafe void SameLine(float offsetFromStartX = 0f, float spacing = -1f) => + PInvoke.SameLine(offsetFromStartX, spacing); + + /// + /// + /// undo a SameLine() or force a new line when in a horizontal-layout context. + /// + /// + /// C++: + /// imgui.h:586 + /// , + /// imgui_widgets.cpp:1591 + ///
void NewLine() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void NewLine() => PInvoke.NewLine(); + + /// + /// + /// add vertical spacing. + /// + /// + /// C++: + /// imgui.h:587 + /// , + /// imgui_widgets.cpp:1572 + ///
void Spacing() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void Spacing() => PInvoke.Spacing(); + + /// + /// + /// add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be + /// navigable into. + /// + /// + /// C++: + /// imgui.h:588 + /// , + /// imgui_widgets.cpp:1580 + ///
void Dummy(const ImVec2& size) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void Dummy(in float2 size) + { + fixed (float2* size_fixed = &size) + { + PInvoke.Dummy(size_fixed); + } + } + + /// + /// + /// move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0 + /// + /// + /// C++: + /// imgui.h:589 + /// , + /// imgui.cpp:11931 + ///
void Indent(float indent_w = 0.0f) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void Indent(float indentW = 0f) => PInvoke.Indent(indentW); + + /// + /// + /// move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0 + /// + /// + /// C++: + /// imgui.h:590 + /// , + /// imgui.cpp:11939 + ///
void Unindent(float indent_w = 0.0f) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void Unindent(float indentW = 0f) => PInvoke.Unindent(indentW); + + /// + /// + /// lock horizontal starting position + /// + /// + /// C++: + /// imgui.h:591 + /// , + /// imgui.cpp:12097 + ///
void BeginGroup() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + /// Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) + /// Groups are currently a mishmash of functionalities which should perhaps be clarified and separated. + /// FIXME-OPT: Could we safely early out on ->SkipItems? + /// + /// + public static unsafe void BeginGroup() => PInvoke.BeginGroup(); + + /// + /// + /// unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can + /// use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) + /// + /// + /// C++: + /// imgui.h:592 + /// , + /// imgui.cpp:12126 + ///
void EndGroup() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void EndGroup() => PInvoke.EndGroup(); + + /// + /// + /// vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly + /// framed items (call if you have text on a line before a framed item) + /// + /// + /// C++: + /// imgui.h:593 + /// , + /// imgui_widgets.cpp:1608 + ///
void AlignTextToFramePadding() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe void AlignTextToFramePadding() => PInvoke.AlignTextToFramePadding(); + + /// + /// + /// ~ FontSize + /// + /// + /// C++: + /// imgui.h:594 + /// , + /// imgui.cpp:12040 + ///
float GetTextLineHeight() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe float GetTextLineHeight() => PInvoke.GetTextLineHeight(); + + /// + /// + /// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text) + /// + /// + /// C++: + /// imgui.h:595 + /// , + /// imgui.cpp:12046 + ///
float GetTextLineHeightWithSpacing() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe float GetTextLineHeightWithSpacing() => PInvoke.GetTextLineHeightWithSpacing(); + + /// + /// + /// ~ FontSize + style.FramePadding.y * 2 + /// + /// + /// C++: + /// imgui.h:596 + /// , + /// imgui.cpp:12052 + ///
float GetFrameHeight() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe float GetFrameHeight() => PInvoke.GetFrameHeight(); + + /// + /// + /// ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive + /// lines of framed widgets) + /// + /// + /// C++: + /// imgui.h:597 + /// , + /// imgui.cpp:12058 + ///
float GetFrameHeightWithSpacing() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + public static unsafe float GetFrameHeightWithSpacing() => PInvoke.GetFrameHeightWithSpacing(); + + /// + /// + /// push string into the ID stack (will hash string). + /// + /// + /// C++: + /// imgui.h:611 + /// , + /// imgui.cpp:9605 + ///
void PushID(const char* str_id_begin, const char* str_id_end) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe void PushID(ImString strId) + { + fixed (byte* strId_fixed = strId) + { + PInvoke.PushID_1(strId_fixed, strId_fixed + strId.Length); + } + } + + /// + /// + /// push pointer into the ID stack (will hash pointer). + /// + /// + /// C++: + /// imgui.h:612 + /// , + /// imgui.cpp:9613 + ///
void PushID(const void* ptr_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe void PushID(nint ptrId) => PInvoke.PushID_2((void*)ptrId); + + /// + /// + /// push integer into the ID stack (will hash integer). + /// + /// + /// C++: + /// imgui.h:613 + /// , + /// imgui.cpp:9621 + ///
void PushID(int int_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe void PushID(int intId) => PInvoke.PushID_3(intId); + + /// + /// + /// pop from the ID stack. + /// + /// + /// C++: + /// imgui.h:614 + /// , + /// imgui.cpp:9666 + ///
void PopID() + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe void PopID() => PInvoke.PopID(); + + /// + /// + /// C++: + /// imgui.h:616 + /// , + /// imgui.cpp:9683 + ///
ImGuiID GetID(const char* str_id_begin, const char* str_id_end) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe ImGuiID GetID(ImString strId) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.GetID_1(strId_fixed, strId_fixed + strId.Length); + } + } + + /// + /// + /// C++: + /// imgui.h:617 + /// , + /// imgui.cpp:9689 + ///
ImGuiID GetID(const void* ptr_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe ImGuiID GetID(nint ptrId) => PInvoke.GetID_2((void*)ptrId); + + /// + /// + /// C++: + /// imgui.h:618 + /// , + /// imgui.cpp:9695 + ///
ImGuiID GetID(int int_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + public static unsafe ImGuiID GetID(int intId) => PInvoke.GetID_3(intId); + + /// + /// + /// shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor(); + /// + /// + /// C++: + /// imgui.h:624 + /// , + /// imgui_widgets.cpp:292 + ///
void TextColored(const ImVec4& col, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void TextColored(in float4 col, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (float4* col_fixed = &col) + { + PInvoke.TextColored(col_fixed, text_fixed); + } + } + } + + /// + /// + /// shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); + /// PopStyleColor(); + /// + /// + /// C++: + /// imgui.h:626 + /// , + /// imgui_widgets.cpp:307 + ///
void TextDisabled(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void TextDisabled(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.TextDisabled(text_fixed); + } + } + + /// + /// + /// shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an + /// auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size + /// using SetNextWindowSize(). + /// + /// + /// C++: + /// imgui.h:628 + /// , + /// imgui_widgets.cpp:323 + ///
void TextWrapped(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void TextWrapped(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.TextWrapped(text_fixed); + } + } + + /// + /// + /// display text+label aligned the same way as value+label widgets + /// + /// + /// C++: + /// imgui.h:630 + /// , + /// imgui_widgets.cpp:382 + ///
void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void LabelText(ImString label, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (byte* label_fixed = label) + { + PInvoke.LabelText(label_fixed, text_fixed); + } + } + } + + /// + /// + /// shortcut for Bullet()+Text() + /// + /// + /// C++: + /// imgui.h:632 + /// , + /// imgui_widgets.cpp:419 + ///
void BulletText(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void BulletText(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.BulletText(text_fixed); + } + } + + /// + /// + /// currently: formatted text with a horizontal line + /// + /// + /// C++: + /// imgui.h:634 + /// , + /// imgui_widgets.cpp:1754 + ///
void SeparatorText(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + public static unsafe void SeparatorText(ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.SeparatorText(label_fixed); + } + } + + /// + /// + /// button + /// + /// + /// C++: + /// imgui.h:639 + /// , + /// imgui_widgets.cpp:808 + ///
bool Button(const char* label, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool Button(ImString label, in float2? size = default) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* label_fixed = label) + { + return PInvoke.Button(label_fixed, &size_default); + } + } + + /// + /// + /// button with (FramePadding.y == 0) to easily embed within text + /// + /// + /// C++: + /// imgui.h:640 + /// , + /// imgui_widgets.cpp:814 + ///
bool SmallButton(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// Small buttons fits within text without additional vertical spacing. + /// + /// + public static unsafe bool SmallButton(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SmallButton(label_fixed); + } + } + + /// + /// + /// flexible button behavior without the visuals, frequently useful to build custom behaviors using the + /// public api (along with IsItemActive, IsItemHovered, etc.) + /// + /// + /// C++: + /// imgui.h:641 + /// , + /// imgui_widgets.cpp:826 + ///
bool InvisibleButton(const char* str_id, const ImVec2& size, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// Tip: use ImGui::PushID()/PopID() to push indices or pointers in the ID stack. + /// Then you can keep 'str_id' empty or the same for all your buttons (instead of creating a string based on a non-string id) + /// + /// + public static unsafe bool InvisibleButton(ImString strId, in float2 size, ImGuiButtonFlags flags = default) + { + fixed (float2* size_fixed = &size) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.InvisibleButton(strId_fixed, size_fixed, flags); + } + } + } + + /// + /// + /// square button with an arrow shape + /// + /// + /// C++: + /// imgui.h:642 + /// , + /// imgui_widgets.cpp:879 + ///
bool ArrowButton(const char* str_id, ImGuiDir dir) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool ArrowButton(ImString strId, ImGuiDir dir) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.ArrowButton(strId_fixed, dir); + } + } + + /// + /// + /// C++: + /// imgui.h:643 + /// , + /// imgui_widgets.cpp:1217 + ///
bool Checkbox(const char* label, bool* v) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool Checkbox(ImString label, ref bool v) + { + fixed (bool* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.Checkbox(label_fixed, (Bool8*)v_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui.h:644 + /// , + /// imgui_widgets.cpp:1319 + ///
bool CheckboxFlags(const char* label, int* flags, int flags_value) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool CheckboxFlags(ImString label, ref int flags, int flagsValue) + { + fixed (int* flags_fixed = &flags) + { + fixed (byte* label_fixed = label) + { + return PInvoke.CheckboxFlags_0(label_fixed, flags_fixed, flagsValue); + } + } + } + + /// + /// + /// C++: + /// imgui.h:645 + /// , + /// imgui_widgets.cpp:1324 + ///
bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool CheckboxFlags(ImString label, ref uint flags, uint flagsValue) + { + fixed (uint* flags_fixed = &flags) + { + fixed (byte* label_fixed = label) + { + return PInvoke.CheckboxFlags_1(label_fixed, flags_fixed, flagsValue); + } + } + } + + /// + /// + /// use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; } + /// + /// + /// C++: + /// imgui.h:646 + /// , + /// imgui_widgets.cpp:1339 + ///
bool RadioButton(const char* label, bool active) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool RadioButton(ImString label, bool active) + { + fixed (byte* label_fixed = label) + { + return PInvoke.RadioButton_0(label_fixed, active); + } + } + + /// + /// + /// shortcut to handle the above pattern when value is an integer + /// + /// + /// C++: + /// imgui.h:647 + /// , + /// imgui_widgets.cpp:1394 + ///
bool RadioButton(const char* label, int* v, int v_button) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// FIXME: This would work nicely if it was a public template, e.g. 'template<T> RadioButton(const + /// char* label, T* v, T v_button)', but I'm not sure how we would expose it.. + /// + /// + public static unsafe bool RadioButton(ImString label, ref int v, int vButton) + { + fixed (int* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.RadioButton_1(label_fixed, v_fixed, vButton); + } + } + } + + /// + /// + /// C++: + /// imgui.h:648 + /// , + /// imgui_widgets.cpp:1403 + ///
+ /// void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// size_arg (for each axis) < 0.0f: align to end, 0.0f: auto, > 0.0f: specified size + /// + /// + public static unsafe void ProgressBar(float fraction, in float2? sizeArg = default, ImString overlay = default) + { + var sizeArg_default = sizeArg ?? new float2(-float.Epsilon, 0f); + fixed (byte* overlay_fixed = overlay) + { + PInvoke.ProgressBar(fraction, &sizeArg_default, overlay_fixed); + } + } + + /// + /// + /// draw a small circle + keep the cursor on the same line. advance cursor x position by + /// GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses + /// + /// + /// C++: + /// imgui.h:649 + /// , + /// imgui_widgets.cpp:1462 + ///
void Bullet() + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe void Bullet() => PInvoke.Bullet(); + + /// + /// + /// hyperlink text button, return true when clicked + /// + /// + /// C++: + /// imgui.h:650 + /// , + /// imgui_widgets.cpp:1489 + ///
bool TextLink(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// This is provided as a convenience for being an often requested feature. + /// FIXME-STYLE: we delayed adding as there is a larger plan to revamp the styling system. + /// Because of this we currently don't provide many styling options for this widget + /// (e.g. hovered/active colors are automatically inferred from a single color). + /// + /// + public static unsafe bool TextLink(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TextLink(label_fixed); + } + } + + /// + /// + /// hyperlink text button, automatically open file/url when clicked + /// + /// + /// C++: + /// imgui.h:651 + /// , + /// imgui_widgets.cpp:1541 + ///
bool TextLinkOpenURL(const char* label, const char* url = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + public static unsafe bool TextLinkOpenURL(ImString label, ImString url = default) + { + fixed (byte* url_fixed = url) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TextLinkOpenURL(label_fixed, url_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui.h:659 + /// , + /// imgui_widgets.cpp:1138 + ///
+ /// void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1)) + ///
+ ///
+ /// + /// + /// Widgets: Images + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. + /// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function. + /// + /// + public static unsafe void Image( + ImTextureRef texRef, + in float2 imageSize, + in float2? uv0 = default, + in float2? uv1 = default + ) + { + var uv0_default = uv0 ?? new float2(0f, 0f); + var uv1_default = uv1 ?? new float2(1f, 1f); + fixed (float2* imageSize_fixed = &imageSize) + { + PInvoke.Image(texRef, imageSize_fixed, &uv0_default, &uv1_default); + } + } + + /// + /// + /// C++: + /// imgui.h:660 + /// , + /// imgui_widgets.cpp:1117 + ///
+ /// void ImageWithBg(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)) + ///
+ ///
+ /// + /// + /// Widgets: Images + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. + /// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function. + /// + /// + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// + /// + public static unsafe void ImageWithBg( + ImTextureRef texRef, + in float2 imageSize, + in float2? uv0 = default, + in float2? uv1 = default, + in float4? bgCol = default, + in float4? tintCol = default + ) + { + var uv0_default = uv0 ?? new float2(0f, 0f); + var uv1_default = uv1 ?? new float2(1f, 1f); + var bgCol_default = bgCol ?? new float4(0f, 0f, 0f, 0f); + var tintCol_default = tintCol ?? new float4(1f, 1f, 1f, 1f); + fixed (float2* imageSize_fixed = &imageSize) + { + PInvoke.ImageWithBg( + texRef, + imageSize_fixed, + &uv0_default, + &uv1_default, + &bgCol_default, + &tintCol_default + ); + } + } + + /// + /// + /// C++: + /// imgui.h:661 + /// , + /// imgui_widgets.cpp:1185 + ///
+ /// bool ImageButton(const char* str_id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)) + ///
+ ///
+ /// + /// + /// Widgets: Images + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. + /// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function. + /// + /// + /// - ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. (#8165) // FIXME: Maybe that's not the best design? + /// + /// + public static unsafe bool ImageButton( + ImString strId, + ImTextureRef texRef, + in float2 imageSize, + in float2? uv0 = default, + in float2? uv1 = default, + in float4? bgCol = default, + in float4? tintCol = default + ) + { + var uv0_default = uv0 ?? new float2(0f, 0f); + var uv1_default = uv1 ?? new float2(1f, 1f); + var bgCol_default = bgCol ?? new float4(0f, 0f, 0f, 0f); + var tintCol_default = tintCol ?? new float4(1f, 1f, 1f, 1f); + fixed (float2* imageSize_fixed = &imageSize) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.ImageButton( + strId_fixed, + texRef, + imageSize_fixed, + &uv0_default, + &uv1_default, + &bgCol_default, + &tintCol_default + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:666 + /// , + /// imgui_widgets.cpp:1904 + ///
bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + public static unsafe bool BeginCombo( + ImString label, + ImString previewValue = default, + ImGuiComboFlags flags = default + ) + { + fixed (byte* previewValue_fixed = previewValue) + { + fixed (byte* label_fixed = label) + { + return PInvoke.BeginCombo(label_fixed, previewValue_fixed, flags); + } + } + } + + /// + /// + /// only call EndCombo() if BeginCombo() returns true! + /// + /// + /// C++: + /// imgui.h:667 + /// , + /// imgui_widgets.cpp:2047 + ///
void EndCombo() + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + public static unsafe void EndCombo() => PInvoke.EndCombo(); + + /// + /// + /// Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0" + /// + /// + /// C++: + /// imgui.h:669 + /// , + /// imgui_widgets.cpp:2186 + ///
+ /// bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1) + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + /// Combo box helper allowing to pass all items in a single string literal holding multiple zero-terminated + /// items "item1\0item2\0" + /// + /// + public static unsafe bool Combo( + ImString label, + ref int currentItem, + ImString itemsSeparatedByZeros, + int popupMaxHeightInItems = -1 + ) + { + fixed (byte* itemsSeparatedByZeros_fixed = itemsSeparatedByZeros) + { + fixed (int* currentItem_fixed = ¤tItem) + { + fixed (byte* label_fixed = label) + { + return PInvoke.Combo_1( + label_fixed, + currentItem_fixed, + itemsSeparatedByZeros_fixed, + popupMaxHeightInItems + ); + } + } + } + } + + /// + /// + /// If v_min >= v_max we have no bound + /// + /// + /// C++: + /// imgui.h:684 + /// , + /// imgui_widgets.cpp:2808 + ///
+ /// bool DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragFloat( + ImString label, + ref float v, + float vSpeed = 1f, + float vMin = 0f, + float vMax = 0f, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragFloat(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:685 + /// , + /// imgui_widgets.cpp:2813 + ///
+ /// bool DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragFloat2( + ImString label, + ref float2 v, + float vSpeed = 1f, + float vMin = 0f, + float vMax = 0f, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float2* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragFloat2(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:686 + /// , + /// imgui_widgets.cpp:2818 + ///
+ /// bool DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragFloat3( + ImString label, + ref float3 v, + float vSpeed = 1f, + float vMin = 0f, + float vMax = 0f, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float3* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragFloat3(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:687 + /// , + /// imgui_widgets.cpp:2823 + ///
+ /// bool DragFloat4(const char* label, float v[4], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragFloat4( + ImString label, + ref float4 v, + float vSpeed = 1f, + float vMin = 0f, + float vMax = 0f, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float4* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragFloat4(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:688 + /// , + /// imgui_widgets.cpp:2829 + ///
+ /// bool DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", const char* format_max = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// NB: You likely want to specify the ImGuiSliderFlags_AlwaysClamp when using this. + /// + /// + public static unsafe bool DragFloatRange2( + ImString label, + ref float vCurrentMin, + ref float vCurrentMax, + float vSpeed = 1f, + float vMin = 0f, + float vMax = 0f, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImString formatMax = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* formatMax_fixed = formatMax) + { + fixed (byte* format_fixed = format) + { + fixed (float* vCurrentMax_fixed = &vCurrentMax) + { + fixed (float* vCurrentMin_fixed = &vCurrentMin) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragFloatRange2( + label_fixed, + vCurrentMin_fixed, + vCurrentMax_fixed, + vSpeed, + vMin, + vMax, + format_fixed, + formatMax_fixed, + flags + ); + } + } + } + } + } + } + + /// + /// + /// If v_min >= v_max we have no bound + /// + /// + /// C++: + /// imgui.h:689 + /// , + /// imgui_widgets.cpp:2862 + ///
+ /// bool DragInt(const char* label, int* v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// NB: v_speed is float to allow adjusting the drag speed with more precision + /// + /// + public static unsafe bool DragInt( + ImString label, + ref int v, + float vSpeed = 1f, + int vMin = 0, + int vMax = 0, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragInt(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:690 + /// , + /// imgui_widgets.cpp:2867 + ///
+ /// bool DragInt2(const char* label, int v[2], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragInt2( + ImString label, + ref int2 v, + float vSpeed = 1f, + int vMin = 0, + int vMax = 0, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int2* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragInt2(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:691 + /// , + /// imgui_widgets.cpp:2872 + ///
+ /// bool DragInt3(const char* label, int v[3], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragInt3( + ImString label, + ref int3 v, + float vSpeed = 1f, + int vMin = 0, + int vMax = 0, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int3* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragInt3(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:692 + /// , + /// imgui_widgets.cpp:2877 + ///
+ /// bool DragInt4(const char* label, int v[4], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragInt4( + ImString label, + ref int4 v, + float vSpeed = 1f, + int vMin = 0, + int vMax = 0, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int4* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragInt4(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:693 + /// , + /// imgui_widgets.cpp:2883 + ///
+ /// bool DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", const char* format_max = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// NB: You likely want to specify the ImGuiSliderFlags_AlwaysClamp when using this. + /// + /// + public static unsafe bool DragIntRange2( + ImString label, + ref int vCurrentMin, + ref int vCurrentMax, + float vSpeed = 1f, + int vMin = 0, + int vMax = 0, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImString formatMax = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* formatMax_fixed = formatMax) + { + fixed (byte* format_fixed = format) + { + fixed (int* vCurrentMax_fixed = &vCurrentMax) + { + fixed (int* vCurrentMin_fixed = &vCurrentMin) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragIntRange2( + label_fixed, + vCurrentMin_fixed, + vCurrentMax_fixed, + vSpeed, + vMin, + vMax, + format_fixed, + formatMax_fixed, + flags + ); + } + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:694 + /// , + /// imgui_widgets.cpp:2674 + ///
+ /// bool DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a Drag widget, p_min and p_max are optional. + /// Read code of e.g. DragFloat(), DragInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly. + /// + /// + public static unsafe bool DragScalar( + ImString label, + ImGuiDataType dataType, + Ptr pData, + float vSpeed = 1f, + Ptr pMin = default, + Ptr pMax = default, + ImString format = default, + ImGuiSliderFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragScalar(label_fixed, dataType, pData, vSpeed, pMin, pMax, format_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:695 + /// , + /// imgui_widgets.cpp:2773 + ///
+ /// bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool DragScalarN( + ImString label, + ImGuiDataType dataType, + Ptr pData, + int components, + float vSpeed = 1f, + Ptr pMin = default, + Ptr pMax = default, + ImString format = default, + ImGuiSliderFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.DragScalarN( + label_fixed, + dataType, + pData, + components, + vSpeed, + pMin, + pMax, + format_fixed, + flags + ); + } + } + } + + /// + /// + /// adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display. + /// + /// + /// C++: + /// imgui.h:703 + /// , + /// imgui_widgets.cpp:3400 + ///
+ /// bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderFloat( + ImString label, + ref float v, + float vMin, + float vMax, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderFloat(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:704 + /// , + /// imgui_widgets.cpp:3405 + ///
+ /// bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderFloat2( + ImString label, + ref float2 v, + float vMin, + float vMax, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float2* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderFloat2(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:705 + /// , + /// imgui_widgets.cpp:3410 + ///
+ /// bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderFloat3( + ImString label, + ref float3 v, + float vMin, + float vMax, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float3* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderFloat3(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:706 + /// , + /// imgui_widgets.cpp:3415 + ///
+ /// bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderFloat4( + ImString label, + ref float4 v, + float vMin, + float vMax, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float4* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderFloat4(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:707 + /// , + /// imgui_widgets.cpp:3420 + ///
+ /// bool SliderAngle(const char* label, float* v_rad, float v_degrees_min = -360.0f, float v_degrees_max = +360.0f, const char* format = "%.0f deg", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.0f deg" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderAngle( + ImString label, + ref float vRad, + float vDegreesMin = -360f, + float vDegreesMax = 360f, + [System.ComponentModel.DefaultValue("%.0f deg")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.0f deg"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float* vRad_fixed = &vRad) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderAngle( + label_fixed, + vRad_fixed, + vDegreesMin, + vDegreesMax, + format_fixed, + flags + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:708 + /// , + /// imgui_widgets.cpp:3431 + ///
+ /// bool SliderInt(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderInt( + ImString label, + ref int v, + int vMin, + int vMax, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderInt(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:709 + /// , + /// imgui_widgets.cpp:3436 + ///
+ /// bool SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderInt2( + ImString label, + ref int2 v, + int vMin, + int vMax, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int2* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderInt2(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:710 + /// , + /// imgui_widgets.cpp:3441 + ///
+ /// bool SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderInt3( + ImString label, + ref int3 v, + int vMin, + int vMax, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int3* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderInt3(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:711 + /// , + /// imgui_widgets.cpp:3446 + ///
+ /// bool SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool SliderInt4( + ImString label, + ref int4 v, + int vMin, + int vMax, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int4* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderInt4(label_fixed, v_fixed, vMin, vMax, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:712 + /// , + /// imgui_widgets.cpp:3278 + ///
+ /// bool SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a slider, they are all required. + /// Read code of e.g. SliderFloat(), SliderInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly. + /// + /// + public static unsafe bool SliderScalar( + ImString label, + ImGuiDataType dataType, + Ptr pData, + Ptr pMin, + Ptr pMax, + ImString format = default, + ImGuiSliderFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderScalar(label_fixed, dataType, pData, pMin, pMax, format_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:713 + /// , + /// imgui_widgets.cpp:3365 + ///
+ /// bool SliderScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// Add multiple sliders on 1 line for compact edition of multiple components + /// + /// + public static unsafe bool SliderScalarN( + ImString label, + ImGuiDataType dataType, + Ptr pData, + int components, + Ptr pMin, + Ptr pMax, + ImString format = default, + ImGuiSliderFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.SliderScalarN( + label_fixed, + dataType, + pData, + components, + pMin, + pMax, + format_fixed, + flags + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:714 + /// , + /// imgui_widgets.cpp:3511 + ///
+ /// bool VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool VSliderFloat( + ImString label, + in float2 size, + ref float v, + float vMin, + float vMax, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float* v_fixed = &v) + { + fixed (float2* size_fixed = &size) + { + fixed (byte* label_fixed = label) + { + return PInvoke.VSliderFloat( + label_fixed, + size_fixed, + v_fixed, + vMin, + vMax, + format_fixed, + flags + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:715 + /// , + /// imgui_widgets.cpp:3516 + ///
+ /// bool VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%d" + /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool VSliderInt( + ImString label, + in float2 size, + ref int v, + int vMin, + int vMax, + [System.ComponentModel.DefaultValue("%d")] ImString format = default, + ImGuiSliderFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%d"u8; + } + fixed (byte* format_fixed = format) + { + fixed (int* v_fixed = &v) + { + fixed (float2* size_fixed = &size) + { + fixed (byte* label_fixed = label) + { + return PInvoke.VSliderInt( + label_fixed, + size_fixed, + v_fixed, + vMin, + vMax, + format_fixed, + flags + ); + } + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:716 + /// , + /// imgui_widgets.cpp:3451 + ///
+ /// bool VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + public static unsafe bool VSliderScalar( + ImString label, + in float2 size, + ImGuiDataType dataType, + Ptr pData, + Ptr pMin, + Ptr pMax, + ImString format = default, + ImGuiSliderFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (float2* size_fixed = &size) + { + fixed (byte* label_fixed = label) + { + return PInvoke.VSliderScalar( + label_fixed, + size_fixed, + dataType, + pData, + pMin, + pMax, + format_fixed, + flags + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:721 + /// , + /// imgui_widgets.cpp:3931 + ///
+ /// bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputText( + ImString label, + ReadOnlySpan buf, + ImGuiInputTextFlags flags = default, + ImGuiInputTextCallback? callback = default, + Ptr userData = default + ) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputText( + label_fixed, + buf_fixed, + (nuint)buf.Length, + flags, + callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + userData + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:721 + /// , + /// imgui_widgets.cpp:3931 + ///
+ /// bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputText( + ImString label, + ReadOnlySpan buf, + ImGuiInputTextFlags flags, + delegate* unmanaged[Cdecl] callback, + Ptr userData = default + ) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputText( + label_fixed, + buf_fixed, + (nuint)buf.Length, + flags, + (nint)callback, + userData + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:722 + /// , + /// imgui_widgets.cpp:3937 + ///
+ /// bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputTextMultiline( + ImString label, + ReadOnlySpan buf, + in float2? size = default, + ImGuiInputTextFlags flags = default, + ImGuiInputTextCallback? callback = default, + Ptr userData = default + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* buf_fixed = buf) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputTextMultiline( + label_fixed, + buf_fixed, + (nuint)buf.Length, + &size_default, + flags, + callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + userData + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:722 + /// , + /// imgui_widgets.cpp:3937 + ///
+ /// bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputTextMultiline( + ImString label, + ReadOnlySpan buf, + in float2? size, + ImGuiInputTextFlags flags, + delegate* unmanaged[Cdecl] callback, + Ptr userData = default + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* buf_fixed = buf) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputTextMultiline( + label_fixed, + buf_fixed, + (nuint)buf.Length, + &size_default, + flags, + (nint)callback, + userData + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:723 + /// , + /// imgui_widgets.cpp:3942 + ///
+ /// bool InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputTextWithHint( + ImString label, + ImString hint, + ReadOnlySpan buf, + ImGuiInputTextFlags flags = default, + ImGuiInputTextCallback? callback = default, + Ptr userData = default + ) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* hint_fixed = hint) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputTextWithHint( + label_fixed, + hint_fixed, + buf_fixed, + (nuint)buf.Length, + flags, + callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + userData + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:723 + /// , + /// imgui_widgets.cpp:3942 + ///
+ /// bool InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputTextWithHint( + ImString label, + ImString hint, + ReadOnlySpan buf, + ImGuiInputTextFlags flags, + delegate* unmanaged[Cdecl] callback, + Ptr userData = default + ) + { + fixed (byte* buf_fixed = buf) + { + fixed (byte* hint_fixed = hint) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputTextWithHint( + label_fixed, + hint_fixed, + buf_fixed, + (nuint)buf.Length, + flags, + (nint)callback, + userData + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:724 + /// , + /// imgui_widgets.cpp:3865 + ///
+ /// bool InputFloat(const char* label, float* v, float step = 0.0f, float step_fast = 0.0f, const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputFloat( + ImString label, + ref float v, + float step = 0f, + float stepFast = 0f, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputFloat(label_fixed, v_fixed, step, stepFast, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:725 + /// , + /// imgui_widgets.cpp:3870 + ///
+ /// bool InputFloat2(const char* label, float v[2], const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputFloat2( + ImString label, + ref float2 v, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float2* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputFloat2(label_fixed, v_fixed, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:726 + /// , + /// imgui_widgets.cpp:3875 + ///
+ /// bool InputFloat3(const char* label, float v[3], const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputFloat3( + ImString label, + ref float3 v, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float3* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputFloat3(label_fixed, v_fixed, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:727 + /// , + /// imgui_widgets.cpp:3880 + ///
+ /// bool InputFloat4(const char* label, float v[4], const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.3f" + /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputFloat4( + ImString label, + ref float4 v, + [System.ComponentModel.DefaultValue("%.3f")] ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.3f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (float4* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputFloat4(label_fixed, v_fixed, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:728 + /// , + /// imgui_widgets.cpp:3885 + ///
+ /// bool InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputInt( + ImString label, + ref int v, + int step = 1, + int stepFast = 100, + ImGuiInputTextFlags flags = default + ) + { + fixed (int* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputInt(label_fixed, v_fixed, step, stepFast, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:729 + /// , + /// imgui_widgets.cpp:3892 + ///
bool InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputInt2(ImString label, ref int2 v, ImGuiInputTextFlags flags = default) + { + fixed (int2* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputInt2(label_fixed, v_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:730 + /// , + /// imgui_widgets.cpp:3897 + ///
bool InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputInt3(ImString label, ref int3 v, ImGuiInputTextFlags flags = default) + { + fixed (int3* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputInt3(label_fixed, v_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:731 + /// , + /// imgui_widgets.cpp:3902 + ///
bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputInt4(ImString label, ref int4 v, ImGuiInputTextFlags flags = default) + { + fixed (int4* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputInt4(label_fixed, v_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:732 + /// , + /// imgui_widgets.cpp:3907 + ///
+ /// bool InputDouble(const char* label, double* v, double step = 0.0, double step_fast = 0.0, const char* format = "%.6f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// Default value if unset: "%.6f" + /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputDouble( + ImString label, + ref double v, + double step = 0d, + double stepFast = 0d, + [System.ComponentModel.DefaultValue("%.6f")] ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + if (format.IsUnset) + { + format = "%.6f"u8; + } + fixed (byte* format_fixed = format) + { + fixed (double* v_fixed = &v) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputDouble(label_fixed, v_fixed, step, stepFast, format_fixed, flags); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:733 + /// , + /// imgui_widgets.cpp:3746 + ///
+ /// bool InputScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + /// Note: p_data, p_step, p_step_fast are _pointers_ to a memory address holding the data. For an Input widget, p_step and p_step_fast are optional. + /// Read code of e.g. InputFloat(), InputInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly. + /// + /// + public static unsafe bool InputScalar( + ImString label, + ImGuiDataType dataType, + Ptr pData, + Ptr pStep = default, + Ptr pStepFast = default, + ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputScalar(label_fixed, dataType, pData, pStep, pStepFast, format_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:734 + /// , + /// imgui_widgets.cpp:3830 + ///
+ /// bool InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + public static unsafe bool InputScalarN( + ImString label, + ImGuiDataType dataType, + Ptr pData, + int components, + Ptr pStep = default, + Ptr pStepFast = default, + ImString format = default, + ImGuiInputTextFlags flags = default + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.InputScalarN( + label_fixed, + dataType, + pData, + components, + pStep, + pStepFast, + format_fixed, + flags + ); + } + } + } + + /// + /// + /// C++: + /// imgui.h:739 + /// , + /// imgui_widgets.cpp:5541 + ///
bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + public static unsafe bool ColorEdit3(ImString label, ref float3 col, ImGuiColorEditFlags flags = default) + { + fixed (float3* col_fixed = &col) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ColorEdit3(label_fixed, col_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:740 + /// , + /// imgui_widgets.cpp:5577 + ///
bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// Edit colors components (each component in 0.0f..1.0f range). + /// See enum ImGuiColorEditFlags_ for available options. e.g. Only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. + /// With typical options: Left-click on color square to open color picker. Right-click to open option menu. CTRL+Click over input fields to edit them and TAB to go to next item. + /// + /// + public static unsafe bool ColorEdit4(ImString label, ref float4 col, ImGuiColorEditFlags flags = default) + { + fixed (float4* col_fixed = &col) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ColorEdit4(label_fixed, col_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:741 + /// , + /// imgui_widgets.cpp:5825 + ///
bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + public static unsafe bool ColorPicker3(ImString label, ref float3 col, ImGuiColorEditFlags flags = default) + { + fixed (float3* col_fixed = &col) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ColorPicker3(label_fixed, col_fixed, flags); + } + } + } + + /// + /// + /// C++: + /// imgui.h:742 + /// , + /// imgui_widgets.cpp:5848 + ///
+ /// bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// Note: ColorPicker4() only accesses 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. + /// (In C++ the 'float col[4]' notation for a function argument is equivalent to 'float* col', we only specify a size to facilitate understanding of the code.) + /// FIXME: we adjust the big color square height based on item width, which may cause a flickering feedback loop (if automatic height makes a vertical scrollbar appears, affecting automatic width..) + /// FIXME: this is trying to be aware of style.Alpha but not fully correct. Also, the color wheel will have overlapping glitches with (style.Alpha < 1.0) + /// + /// + public static unsafe bool ColorPicker4( + ImString label, + ref float4 col, + ImGuiColorEditFlags flags = default, + in float4? refCol = null + ) + { + var refCol_ptr = refCol is { } refCol_value ? &refCol_value : null; + fixed (float4* col_fixed = &col) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ColorPicker4(label_fixed, col_fixed, flags, (float*)refCol_ptr); + } + } + } + + /// + /// + /// display a color square/button, hover for details, return true when pressed. + /// + /// + /// C++: + /// imgui.h:743 + /// , + /// imgui_widgets.cpp:6221 + ///
+ /// bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// A little color square. Return true when clicked. + /// FIXME: May want to display/ignore the alpha component in the color display? Yet show it in the tooltip. + /// 'desc_id' is not called 'label' because we don't display it next to the button, but only in the tooltip. + /// Note that 'col' may be encoded in HSV if ImGuiColorEditFlags_InputHSV is set. + /// + /// + public static unsafe bool ColorButton( + ImString descId, + in float4 col, + ImGuiColorEditFlags flags = default, + in float2? size = default + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (float4* col_fixed = &col) + { + fixed (byte* descId_fixed = descId) + { + return PInvoke.ColorButton(descId_fixed, col_fixed, flags, &size_default); + } + } + } + + /// + /// + /// initialize current options (generally on application startup) if you want to select a default format, + /// picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your + /// calls. + /// + /// + /// C++: + /// imgui.h:744 + /// , + /// imgui_widgets.cpp:6305 + ///
void SetColorEditOptions(ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// Initialize/override default color options + /// + /// + public static unsafe void SetColorEditOptions(ImGuiColorEditFlags flags) => PInvoke.SetColorEditOptions(flags); + + /// + /// + /// C++: + /// imgui.h:748 + /// , + /// imgui_widgets.cpp:6489 + ///
bool TreeNode(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe bool TreeNode(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TreeNode_0(label_fixed); + } + } + + /// + /// + /// helper variation to easily decorelate the id from the displayed string. Read the FAQ about why and how + /// to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet(). + /// + /// + /// C++: + /// imgui.h:749 + /// , + /// imgui_widgets.cpp:6471 + ///
bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe bool TreeNode(ImString strId, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.TreeNode_1(strId_fixed, text_fixed); + } + } + } + + /// + /// + /// " + /// + /// + /// C++: + /// imgui.h:750 + /// , + /// imgui_widgets.cpp:6480 + ///
bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe bool TreeNode(nint ptrId, ImString text) + { + fixed (byte* text_fixed = text) + { + return PInvoke.TreeNode_2((void*)ptrId, text_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:753 + /// , + /// imgui_widgets.cpp:6508 + ///
bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe bool TreeNodeEx(ImString label, ImGuiTreeNodeFlags flags = default) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TreeNodeEx_0(label_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui.h:754 + /// , + /// imgui_widgets.cpp:6517 + ///
+ /// bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe bool TreeNodeEx(ImString strId, ImGuiTreeNodeFlags flags, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.TreeNodeEx_1(strId_fixed, flags, text_fixed); + } + } + } + + /// + /// + /// C++: + /// imgui.h:755 + /// , + /// imgui_widgets.cpp:6526 + ///
+ /// bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe bool TreeNodeEx(nint ptrId, ImGuiTreeNodeFlags flags, ImString text) + { + fixed (byte* text_fixed = text) + { + return PInvoke.TreeNodeEx_2((void*)ptrId, flags, text_fixed); + } + } + + /// + /// + /// ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop + /// yourself if desired. + /// + /// + /// C++: + /// imgui.h:758 + /// , + /// imgui_widgets.cpp:6983 + ///
void TreePush(const char* str_id) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe void TreePush(ImString strId) + { + fixed (byte* strId_fixed = strId) + { + PInvoke.TreePush_0(strId_fixed); + } + } + + /// + /// + /// " + /// + /// + /// C++: + /// imgui.h:759 + /// , + /// imgui_widgets.cpp:6991 + ///
void TreePush(const void* ptr_id) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe void TreePush(nint ptrId) => PInvoke.TreePush_1((void*)ptrId); + + /// + /// + /// ~ Unindent()+PopID() + /// + /// + /// C++: + /// imgui.h:760 + /// , + /// imgui_widgets.cpp:7008 + ///
void TreePop() + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + public static unsafe void TreePop() => PInvoke.TreePop(); + + /// + /// + /// horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + + /// style.FramePadding.x*2) for a regular unframed TreeNode + /// + /// + /// C++: + /// imgui.h:761 + /// , + /// imgui_widgets.cpp:7041 + ///
float GetTreeNodeToLabelSpacing() + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// Horizontal distance preceding label when using TreeNode() or Bullet() + /// + /// + public static unsafe float GetTreeNodeToLabelSpacing() => PInvoke.GetTreeNodeToLabelSpacing(); + + /// + /// + /// if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call + /// TreePop(). + /// + /// + /// C++: + /// imgui.h:762 + /// , + /// imgui_widgets.cpp:7070 + ///
bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// CollapsingHeader returns true when opened but do not indent nor push into the ID stack (because of the ImGuiTreeNodeFlags_NoTreePushOnOpen flag). + /// This is basically the same as calling TreeNodeEx(label, ImGuiTreeNodeFlags_CollapsingHeader). You can remove the _NoTreePushOnOpen flag if you want behavior closer to normal TreeNode(). + /// + /// + public static unsafe bool CollapsingHeader(ImString label, ImGuiTreeNodeFlags flags = default) + { + fixed (byte* label_fixed = label) + { + return PInvoke.CollapsingHeader_0(label_fixed, flags); + } + } + + /// + /// + /// when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right + /// of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the + /// header. + /// + /// + /// C++: + /// imgui.h:763 + /// , + /// imgui_widgets.cpp:7083 + ///
bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// p_visible == NULL : regular collapsing header + /// p_visible != NULL && *p_visible == true : show a small close button on the corner of the header, clicking the button will set *p_visible = false + /// p_visible != NULL && *p_visible == false : do not show the header at all + /// Do not mistake this with the Open state of the header itself, which you can adjust with SetNextItemOpen() or ImGuiTreeNodeFlags_DefaultOpen. + /// + /// + public static unsafe bool CollapsingHeader( + ImString label, + ref bool pVisible, + ImGuiTreeNodeFlags flags = default + ) + { + fixed (bool* pVisible_fixed = &pVisible) + { + fixed (byte* label_fixed = label) + { + return PInvoke.CollapsingHeader_1(label_fixed, (Bool8*)pVisible_fixed, flags); + } + } + } + + /// + /// + /// set next TreeNode/CollapsingHeader open state. + /// + /// + /// C++: + /// imgui.h:764 + /// , + /// imgui_widgets.cpp:7048 + ///
void SetNextItemOpen(bool is_open, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// Set next TreeNode/CollapsingHeader open state. + /// + /// + public static unsafe void SetNextItemOpen(bool isOpen, ImGuiCond cond = default) => + PInvoke.SetNextItemOpen(isOpen, cond); + + /// + /// + /// set id to use for open/close storage (default to same as item id). + /// + /// + /// C++: + /// imgui.h:765 + /// , + /// imgui_widgets.cpp:7059 + ///
void SetNextItemStorageID(ImGuiID storage_id) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// Set next TreeNode/CollapsingHeader storage id. + /// + /// + public static unsafe void SetNextItemStorageID(ImGuiID storageId) => PInvoke.SetNextItemStorageID(storageId); + + /// + /// + /// "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you + /// can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. + /// size.y==0.0: use label height, size.y>0.0: specify height + /// + /// + /// C++: + /// imgui.h:770 + /// , + /// imgui_widgets.cpp:7126 + ///
+ /// bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Selectables + /// - A selectable highlights when hovered, and can display another color when selected. + /// - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous. + /// + /// + /// Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image. + /// But you need to make sure the ID is unique, e.g. enclose calls in PushID/PopID or use ##unique_id. + /// With this scheme, ImGuiSelectableFlags_SpanAllColumns and ImGuiSelectableFlags_AllowOverlap are also frequently used flags. + /// FIXME: Selectable() with (size.x == 0.0f) and (SelectableTextAlign.x > 0.0f) followed by SameLine() is currently not supported. + /// + /// + public static unsafe bool Selectable( + ImString label, + bool selected = false, + ImGuiSelectableFlags flags = default, + in float2? size = default + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* label_fixed = label) + { + return PInvoke.Selectable_0(label_fixed, selected, flags, &size_default); + } + } + + /// + /// + /// "bool* p_selected" point to the selection state (read-write), as a convenient helper. + /// + /// + /// C++: + /// imgui.h:771 + /// , + /// imgui_widgets.cpp:7307 + ///
+ /// bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Selectables + /// - A selectable highlights when hovered, and can display another color when selected. + /// - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous. + /// + /// + public static unsafe bool Selectable( + ImString label, + ref bool pSelected, + ImGuiSelectableFlags flags = default, + in float2? size = default + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (bool* pSelected_fixed = &pSelected) + { + fixed (byte* label_fixed = label) + { + return PInvoke.Selectable_1(label_fixed, (Bool8*)pSelected_fixed, flags, &size_default); + } + } + } + + /// + /// + /// C++: + /// imgui.h:780 + /// , + /// imgui_widgets.cpp:7715 + ///
+ /// ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1) + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + /// Return ImGuiMultiSelectIO structure. + /// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect(). + /// Passing 'selection_size' and 'items_count' parameters is currently optional. + /// - 'selection_size' is useful to disable some shortcut routing: e.g. ImGuiMultiSelectFlags_ClearOnEscape won't claim Escape key when selection_size 0, + /// allowing a first press to clear selection THEN the second press to leave child window and return to parent. + /// - 'items_count' is stored in ImGuiMultiSelectIO which makes it a convenient way to pass the information to your ApplyRequest() handler (but you may pass it differently). + /// - If they are costly for you to compute (e.g. external intrusive selection without maintaining size), you may avoid them and pass -1. + /// - If you can easily tell if your selection is empty or not, you may pass 0/1, or you may enable ImGuiMultiSelectFlags_ClearOnEscape flag dynamically. + /// + /// + public static unsafe ImGuiMultiSelectIOPtr BeginMultiSelect( + ImGuiMultiSelectFlags flags, + int selectionSize = -1, + int itemsCount = -1 + ) => PInvoke.BeginMultiSelect(flags, selectionSize, itemsCount); + + /// + /// + /// C++: + /// imgui.h:781 + /// , + /// imgui_widgets.cpp:7838 + ///
ImGuiMultiSelectIO* EndMultiSelect() + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + /// Return updated ImGuiMultiSelectIO structure. + /// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect(). + /// + /// + public static unsafe ImGuiMultiSelectIOPtr EndMultiSelect() => PInvoke.EndMultiSelect(); + + /// + /// + /// C++: + /// imgui.h:782 + /// , + /// imgui_widgets.cpp:7917 + ///
void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data) + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + public static unsafe void SetNextItemSelectionUserData(ulong selectionUserData) => + PInvoke.SetNextItemSelectionUserData(selectionUserData); + + /// + /// + /// Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching + /// EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly. + /// + /// + /// C++: + /// imgui.h:783 + /// , + /// imgui.cpp:6371 + ///
bool IsItemToggledSelection() + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + /// Call after a Selectable() or TreeNode() involved in multi-selection. + /// Useful if you need the per-item information before reaching EndMultiSelect(), e.g. for rendering purpose. + /// This is only meant to be called inside a BeginMultiSelect()/EndMultiSelect() block. + /// (Outside of multi-select, it would be misleading/ambiguous to report this signal, as widgets + /// return e.g. a pressed event and user code is in charge of altering selection in ways we cannot predict.) + /// + /// + public static unsafe bool IsItemToggledSelection() => PInvoke.IsItemToggledSelection(); + + /// + /// + /// open a framed scrolling region + /// + /// + /// C++: + /// imgui.h:792 + /// , + /// imgui_widgets.cpp:8455 + ///
bool BeginListBox(const char* label, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: List Boxes + /// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. + /// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. + /// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created. + /// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth + /// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items + /// + /// + /// This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// This handle some subtleties with capturing info from the label. + /// If you don't need a label you can pretty much directly use ImGui::BeginChild() with ImGuiChildFlags_FrameStyle. + /// Tip: To have a list filling the entire window width, use size.x = -FLT_MIN and pass an non-visible label e.g. "##empty" + /// Tip: If your vertical size is calculated from an item count (e.g. 10 * item_height) consider adding a fractional part to facilitate seeing scrolling boundaries (e.g. 10.5f * item_height). + /// + /// + public static unsafe bool BeginListBox(ImString label, in float2? size = default) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* label_fixed = label) + { + return PInvoke.BeginListBox(label_fixed, &size_default); + } + } + + /// + /// + /// only call EndListBox() if BeginListBox() returned true! + /// + /// + /// C++: + /// imgui.h:793 + /// , + /// imgui_widgets.cpp:8496 + ///
void EndListBox() + ///
+ ///
+ /// + /// + /// Widgets: List Boxes + /// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. + /// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. + /// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created. + /// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth + /// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items + /// + /// + public static unsafe void EndListBox() => PInvoke.EndListBox(); + + /// + /// + /// C++: + /// imgui.h:799 + /// , + /// imgui_widgets.cpp:8704 + ///
+ /// void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)) + ///
+ ///
+ /// + /// + /// Widgets: Data Plotting + /// - Consider using ImPlot (https://github.com/epezent/implot) which is much better! + /// + /// + public static unsafe void PlotLines( + ImString label, + ReadOnlySpan values, + int valuesOffset = 0, + ImString overlayText = default, + float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, + float2? graphSize = default, + int stride = 4 + ) + { + var graphSize_default = graphSize ?? new float2(0f, 0f); + fixed (byte* overlayText_fixed = overlayText) + { + fixed (float* values_fixed = values) + { + fixed (byte* label_fixed = label) + { + PInvoke.PlotLines_0( + label_fixed, + values_fixed, + values.Length, + valuesOffset, + overlayText_fixed, + scaleMin, + scaleMax, + graphSize_default, + stride + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:801 + /// , + /// imgui_widgets.cpp:8715 + ///
+ /// void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)) + ///
+ ///
+ /// + /// + /// Widgets: Data Plotting + /// - Consider using ImPlot (https://github.com/epezent/implot) which is much better! + /// + /// + public static unsafe void PlotHistogram( + ImString label, + ReadOnlySpan values, + int valuesOffset = 0, + ImString overlayText = default, + float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, + float2? graphSize = default, + int stride = 4 + ) + { + var graphSize_default = graphSize ?? new float2(0f, 0f); + fixed (byte* overlayText_fixed = overlayText) + { + fixed (float* values_fixed = values) + { + fixed (byte* label_fixed = label) + { + PInvoke.PlotHistogram_0( + label_fixed, + values_fixed, + values.Length, + valuesOffset, + overlayText_fixed, + scaleMin, + scaleMax, + graphSize_default, + stride + ); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:806 + /// , + /// imgui_widgets.cpp:8733 + ///
void Value(const char* prefix, bool b) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + public static unsafe void Value(ImString prefix, bool b) + { + fixed (byte* prefix_fixed = prefix) + { + PInvoke.Value_0(prefix_fixed, b); + } + } + + /// + /// + /// C++: + /// imgui.h:807 + /// , + /// imgui_widgets.cpp:8738 + ///
void Value(const char* prefix, int v) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + public static unsafe void Value(ImString prefix, int v) + { + fixed (byte* prefix_fixed = prefix) + { + PInvoke.Value_1(prefix_fixed, v); + } + } + + /// + /// + /// C++: + /// imgui.h:808 + /// , + /// imgui_widgets.cpp:8743 + ///
void Value(const char* prefix, unsigned int v) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + public static unsafe void Value(ImString prefix, uint v) + { + fixed (byte* prefix_fixed = prefix) + { + PInvoke.Value_2(prefix_fixed, v); + } + } + + /// + /// + /// C++: + /// imgui.h:809 + /// , + /// imgui_widgets.cpp:8748 + ///
void Value(const char* prefix, float v, const char* float_format = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + public static unsafe void Value(ImString prefix, float v, ImString floatFormat = default) + { + fixed (byte* floatFormat_fixed = floatFormat) + { + fixed (byte* prefix_fixed = prefix) + { + PInvoke.Value_3(prefix_fixed, v, floatFormat_fixed); + } + } + } + + /// + /// + /// append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window). + /// + /// + /// C++: + /// imgui.h:816 + /// , + /// imgui_widgets.cpp:8823 + ///
bool BeginMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + /// FIXME: Provided a rectangle perhaps e.g. a BeginMenuBarEx() could be used anywhere.. + /// Currently the main responsibility of this function being to setup clip-rect + horizontal layout + menu navigation layer. + /// Ideally we also want this to be responsible for claiming space out of the main window scrolling rectangle, in which case ImGuiWindowFlags_MenuBar will become unnecessary. + /// Then later the same system could be used for multiple menu-bars, scrollbars, side-bars. + /// + /// + public static unsafe bool BeginMenuBar() => PInvoke.BeginMenuBar(); + + /// + /// + /// only call EndMenuBar() if BeginMenuBar() returns true! + /// + /// + /// C++: + /// imgui.h:817 + /// , + /// imgui_widgets.cpp:8854 + ///
void EndMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe void EndMenuBar() => PInvoke.EndMenuBar(); + + /// + /// + /// create and append to a full screen menu-bar. + /// + /// + /// C++: + /// imgui.h:818 + /// , + /// imgui_widgets.cpp:8948 + ///
bool BeginMainMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe bool BeginMainMenuBar() => PInvoke.BeginMainMenuBar(); + + /// + /// + /// only call EndMainMenuBar() if BeginMainMenuBar() returns true! + /// + /// + /// C++: + /// imgui.h:819 + /// , + /// imgui_widgets.cpp:8976 + ///
void EndMainMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe void EndMainMenuBar() => PInvoke.EndMainMenuBar(); + + /// + /// + /// create a sub-menu entry. only call EndMenu() if this returns true! + /// + /// + /// C++: + /// imgui.h:820 + /// , + /// imgui_widgets.cpp:9232 + ///
bool BeginMenu(const char* label, bool enabled = true) + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe bool BeginMenu(ImString label, bool enabled = true) + { + fixed (byte* label_fixed = label) + { + return PInvoke.BeginMenu(label_fixed, enabled); + } + } + + /// + /// + /// only call EndMenu() if BeginMenu() returns true! + /// + /// + /// C++: + /// imgui.h:821 + /// , + /// imgui_widgets.cpp:9237 + ///
void EndMenu() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe void EndMenu() => PInvoke.EndMenu(); + + /// + /// + /// return true when activated. + /// + /// + /// C++: + /// imgui.h:822 + /// , + /// imgui_widgets.cpp:9332 + ///
+ /// bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true) + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe bool MenuItem( + ImString label, + ImString shortcut = default, + bool selected = false, + bool enabled = true + ) + { + fixed (byte* shortcut_fixed = shortcut) + { + fixed (byte* label_fixed = label) + { + return PInvoke.MenuItem_0(label_fixed, shortcut_fixed, selected, enabled); + } + } + } + + /// + /// + /// return true when activated + toggle (*p_selected) if p_selected != NULL + /// + /// + /// C++: + /// imgui.h:823 + /// , + /// imgui_widgets.cpp:9337 + ///
+ /// bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true) + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + public static unsafe bool MenuItem(ImString label, ImString shortcut, ref bool pSelected, bool enabled = true) + { + fixed (bool* pSelected_fixed = &pSelected) + { + fixed (byte* shortcut_fixed = shortcut) + { + fixed (byte* label_fixed = label) + { + return PInvoke.MenuItem_1(label_fixed, shortcut_fixed, (Bool8*)pSelected_fixed, enabled); + } + } + } + } + + /// + /// + /// begin/append a tooltip window. + /// + /// + /// C++: + /// imgui.h:829 + /// , + /// imgui.cpp:12438 + ///
bool BeginTooltip() + ///
+ ///
+ /// + /// + /// Tooltips + /// - Tooltips are windows following the mouse. They do not take focus away. + /// - A tooltip window can contain items of any types. + /// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip) + /// + /// + public static unsafe bool BeginTooltip() => PInvoke.BeginTooltip(); + + /// + /// + /// only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true! + /// + /// + /// C++: + /// imgui.h:830 + /// , + /// imgui.cpp:12497 + ///
void EndTooltip() + ///
+ ///
+ /// + /// + /// Tooltips + /// - Tooltips are windows following the mouse. They do not take focus away. + /// - A tooltip window can contain items of any types. + /// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip) + /// + /// + public static unsafe void EndTooltip() => PInvoke.EndTooltip(); + + /// + /// + /// set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to + /// SetTooltip(). + /// + /// + /// C++: + /// imgui.h:831 + /// , + /// imgui.cpp:12503 + ///
void SetTooltip(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Tooltips + /// - Tooltips are windows following the mouse. They do not take focus away. + /// - A tooltip window can contain items of any types. + /// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip) + /// + /// + public static unsafe void SetTooltip(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.SetTooltip(text_fixed); + } + } + + /// + /// + /// begin/append a tooltip window if preceding item was hovered. + /// + /// + /// C++: + /// imgui.h:838 + /// , + /// imgui.cpp:12443 + ///
bool BeginItemTooltip() + ///
+ ///
+ /// + /// + /// Tooltips: helpers for showing a tooltip when hovering an item + /// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom. + /// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom. + /// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + /// + /// + public static unsafe bool BeginItemTooltip() => PInvoke.BeginItemTooltip(); + + /// + /// + /// set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip(). + /// + /// + /// C++: + /// imgui.h:839 + /// , + /// imgui.cpp:12521 + ///
void SetItemTooltip(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Tooltips: helpers for showing a tooltip when hovering an item + /// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom. + /// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom. + /// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + /// + /// + /// Shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav'. + /// Defaults to == ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort when using the mouse. + /// + /// + public static unsafe void SetItemTooltip(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.SetItemTooltip(text_fixed); + } + } + + /// + /// + /// return true if the popup is open, and you can start outputting to it. + /// + /// + /// C++: + /// imgui.h:852 + /// , + /// imgui.cpp:12871 + ///
bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + public static unsafe bool BeginPopup(ImString strId, ImGuiWindowFlags flags = default) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginPopup(strId_fixed, flags); + } + } + + /// + /// + /// return true if the modal is open, and you can start outputting to it. + /// + /// + /// C++: + /// imgui.h:853 + /// , + /// imgui.cpp:12888 + ///
bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + /// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup. + /// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup). + /// - *p_open set back to false in BeginPopupModal() when popup is not open. + /// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup. + /// + /// + public static unsafe bool BeginPopupModal(ImString name, ref bool pOpen, ImGuiWindowFlags flags = default) + { + fixed (bool* pOpen_fixed = &pOpen) + { + fixed (byte* name_fixed = name) + { + return PInvoke.BeginPopupModal(name_fixed, (Bool8*)pOpen_fixed, flags); + } + } + } + + /// + /// + /// return true if the modal is open, and you can start outputting to it. + /// + /// + /// C++: + /// imgui.h:853 + /// , + /// imgui.cpp:12888 + ///
bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + /// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup. + /// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup). + /// - *p_open set back to false in BeginPopupModal() when popup is not open. + /// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup. + /// + /// + public static unsafe bool BeginPopupModal(ImString name, ImGuiWindowFlags flags = default) + { + fixed (byte* name_fixed = name) + { + return PInvoke.BeginPopupModal(name_fixed, null, flags); + } + } + + /// + /// + /// only call EndPopup() if BeginPopupXXX() returns true! + /// + /// + /// C++: + /// imgui.h:854 + /// , + /// imgui.cpp:12922 + ///
void EndPopup() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + public static unsafe void EndPopup() => PInvoke.EndPopup(); + + /// + /// + /// call to mark popup as open (don't call every frame!). + /// + /// + /// C++: + /// imgui.h:864 + /// , + /// imgui.cpp:12641 + ///
void OpenPopup(const char* str_id, ImGuiPopupFlags popup_flags = 0) + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + public static unsafe void OpenPopup(ImString strId, ImGuiPopupFlags popupFlags = default) + { + fixed (byte* strId_fixed = strId) + { + PInvoke.OpenPopup_0(strId_fixed, popupFlags); + } + } + + /// + /// + /// id overload to facilitate calling from nested stacks + /// + /// + /// C++: + /// imgui.h:865 + /// , + /// imgui.cpp:12649 + ///
void OpenPopup(ImGuiID id, ImGuiPopupFlags popup_flags = 0) + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + public static unsafe void OpenPopup(ImGuiID id, ImGuiPopupFlags popupFlags = default) => + PInvoke.OpenPopup_1(id, popupFlags); + + /// + /// + /// helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note: + /// actually triggers on the mouse _released_ event to be consistent with popup behaviors) + /// + /// + /// C++: + /// imgui.h:866 + /// , + /// imgui.cpp:12946 + ///
void OpenPopupOnItemClick(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + /// Helper to open a popup if mouse button is released over the item + /// - This is essentially the same as BeginPopupContextItem() but without the trailing BeginPopup() + /// + /// + public static unsafe void OpenPopupOnItemClick( + ImString strId = default, + ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1 + ) + { + fixed (byte* strId_fixed = strId) + { + PInvoke.OpenPopupOnItemClick(strId_fixed, popupFlags); + } + } + + /// + /// + /// manually close the popup we have begin-ed into. + /// + /// + /// C++: + /// imgui.h:867 + /// , + /// imgui.cpp:12801 + ///
void CloseCurrentPopup() + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + /// Close the popup we have begin-ed into. + /// + /// + public static unsafe void CloseCurrentPopup() => PInvoke.CloseCurrentPopup(); + + /// + /// + /// open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous item. If + /// you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. + /// read comments in .cpp! + /// + /// + /// C++: + /// imgui.h:874 + /// , + /// imgui.cpp:12975 + ///
bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open+begin combined functions helpers + /// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking. + /// - They are convenient to easily create context menus, hence the name. + /// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future. + /// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight. + /// + /// + /// This is a helper to handle the simplest case of associating one named popup to one given widget. + /// - To create a popup associated to the last item, you generally want to pass a NULL value to str_id. + /// - To create a popup with a specific identifier, pass it in str_id. + /// - This is useful when using using BeginPopupContextItem() on an item which doesn't have an identifier, e.g. a Text() call. + /// - This is useful when multiple code locations may want to manipulate/open the same popup, given an explicit id. + /// - You may want to handle the whole on user side if you have specific needs (e.g. tweaking IsItemHovered() parameters). + /// This is essentially the same as: + /// id = str_id ? GetID(str_id) : GetItemID(); + /// OpenPopupOnItemClick(str_id, ImGuiPopupFlags_MouseButtonRight); + /// return BeginPopup(id); + /// Which is essentially the same as: + /// id = str_id ? GetID(str_id) : GetItemID(); + /// if (IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right)) + /// OpenPopup(id); + /// return BeginPopup(id); + /// The main difference being that this is tweaked to avoid computing the ID twice. + /// + /// + public static unsafe bool BeginPopupContextItem( + ImString strId = default, + ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1 + ) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginPopupContextItem(strId_fixed, popupFlags); + } + } + + /// + /// + /// open+begin popup when clicked on current window. + /// + /// + /// C++: + /// imgui.h:875 + /// , + /// imgui.cpp:12989 + ///
bool BeginPopupContextWindow(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open+begin combined functions helpers + /// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking. + /// - They are convenient to easily create context menus, hence the name. + /// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future. + /// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight. + /// + /// + public static unsafe bool BeginPopupContextWindow( + ImString strId = default, + ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1 + ) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginPopupContextWindow(strId_fixed, popupFlags); + } + } + + /// + /// + /// open+begin popup when clicked in void (where there are no windows). + /// + /// + /// C++: + /// imgui.h:876 + /// , + /// imgui.cpp:13003 + ///
bool BeginPopupContextVoid(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open+begin combined functions helpers + /// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking. + /// - They are convenient to easily create context menus, hence the name. + /// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future. + /// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight. + /// + /// + public static unsafe bool BeginPopupContextVoid( + ImString strId = default, + ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1 + ) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginPopupContextVoid(strId_fixed, popupFlags); + } + } + + /// + /// + /// return true if the popup is open. + /// + /// + /// C++: + /// imgui.h:882 + /// , + /// imgui.cpp:12573 + ///
bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups: query functions + /// - IsPopupOpen(): return true if the popup is open at the current BeginPopup() level of the popup stack. + /// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId: return true if any popup is open at the current BeginPopup() level of the popup stack. + /// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId + ImGuiPopupFlags_AnyPopupLevel: return true if any popup is open. + /// + /// + public static unsafe bool IsPopupOpen(ImString strId, ImGuiPopupFlags flags = default) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.IsPopupOpen(strId_fixed, flags); + } + } + + /// + /// + /// C++: + /// imgui.h:905 + /// , + /// imgui_tables.cpp:311 + ///
+ /// bool BeginTable(const char* str_id, int columns, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f) + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// Read about "TABLE SIZING" at the top of this file. + /// + /// + public static unsafe bool BeginTable( + ImString strId, + int columns, + ImGuiTableFlags flags = default, + in float2? outerSize = default, + float innerWidth = 0f + ) + { + var outerSize_default = outerSize ?? new float2(0.0f, 0.0f); + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginTable(strId_fixed, columns, flags, &outerSize_default, innerWidth); + } + } + + /// + /// + /// only call EndTable() if BeginTable() returns true! + /// + /// + /// C++: + /// imgui.h:906 + /// , + /// imgui_tables.cpp:1346 + ///
void EndTable() + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + public static unsafe void EndTable() => PInvoke.EndTable(); + + /// + /// + /// append into the first cell of a new row. + /// + /// + /// C++: + /// imgui.h:907 + /// , + /// imgui_tables.cpp:1890 + ///
void TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f) + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// [Public] Starts into the first cell of a new row + /// + /// + public static unsafe void TableNextRow(ImGuiTableRowFlags rowFlags = default, float minRowHeight = 0f) => + PInvoke.TableNextRow(rowFlags, minRowHeight); + + /// + /// + /// append into the next column (or first column of next row if currently in last column). Return true when + /// column is visible. + /// + /// + /// C++: + /// imgui.h:908 + /// , + /// imgui_tables.cpp:2143 + ///
bool TableNextColumn() + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// [Public] Append into the next column, wrap and create a new row when already on last column + /// + /// + public static unsafe bool TableNextColumn() => PInvoke.TableNextColumn(); + + /// + /// + /// append into the specified column. Return true when column is visible. + /// + /// + /// C++: + /// imgui.h:909 + /// , + /// imgui_tables.cpp:2118 + ///
bool TableSetColumnIndex(int column_n) + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// [Public] Append into a specific column + /// + /// + public static unsafe bool TableSetColumnIndex(int columnN) => PInvoke.TableSetColumnIndex(columnN); + + /// + /// + /// C++: + /// imgui.h:919 + /// , + /// imgui_tables.cpp:1599 + ///
+ /// void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0) + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// See "COLUMNS SIZING POLICIES" comments at the top of this file + /// If (init_width_or_weight <= 0.0f) it is ignored + /// + /// + public static unsafe void TableSetupColumn( + ImString label, + ImGuiTableColumnFlags flags = default, + float initWidthOrWeight = 0f, + ImGuiID userId = default + ) + { + fixed (byte* label_fixed = label) + { + PInvoke.TableSetupColumn(label_fixed, flags, initWidthOrWeight, userId); + } + } + + /// + /// + /// lock columns/rows so they stay visible when scrolled. + /// + /// + /// C++: + /// imgui.h:920 + /// , + /// imgui_tables.cpp:1660 + ///
void TableSetupScrollFreeze(int cols, int rows) + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// [Public] + /// + /// + public static unsafe void TableSetupScrollFreeze(int cols, int rows) => + PInvoke.TableSetupScrollFreeze(cols, rows); + + /// + /// + /// submit one header cell manually (rarely used) + /// + /// + /// C++: + /// imgui.h:921 + /// , + /// imgui_tables.cpp:3150 + ///
void TableHeader(const char* label) + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// Emit a column header (text + optional sort order) + /// We cpu-clip text here so that all columns headers can be merged into a same draw call. + /// Note that because of how we cpu-clip and display sorting indicators, you _cannot_ use SameLine() after a TableHeader() + /// + /// + public static unsafe void TableHeader(ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.TableHeader(label_fixed); + } + } + + /// + /// + /// submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu + /// + /// + /// C++: + /// imgui.h:922 + /// , + /// imgui_tables.cpp:3105 + ///
void TableHeadersRow() + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// [Public] This is a helper to output TableHeader() calls based on the column names declared in TableSetupColumn(). + /// The intent is that advanced users willing to create customized headers would not need to use this helper + /// and can create their own! For example: TableHeader() may be preceded by Checkbox() or other custom widgets. + /// See 'Demo->Tables->Custom headers' for a demonstration of implementing a custom version of this. + /// This code is intentionally written to not make much use of internal functions, to give you better direction + /// if you need to write your own. + /// FIXME-TABLE: TableOpenContextMenu() and TableGetHeaderRowHeight() are not public. + /// + /// + public static unsafe void TableHeadersRow() => PInvoke.TableHeadersRow(); + + /// + /// + /// submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST + /// BE FIRST ROW. + /// + /// + /// C++: + /// imgui.h:923 + /// , + /// imgui_tables.cpp:3297 + ///
void TableAngledHeadersRow() + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// Unlike TableHeadersRow() it is not expected that you can reimplement or customize this with custom widgets. + /// FIXME: No hit-testing/button on the angled header. + /// + /// + public static unsafe void TableAngledHeadersRow() => PInvoke.TableAngledHeadersRow(); + + /// + /// + /// get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over + /// multiple frames or past any subsequent call to BeginTable(). + /// + /// + /// C++: + /// imgui.h:931 + /// , + /// imgui_tables.cpp:2880 + ///
ImGuiTableSortSpecs* TableGetSortSpecs() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// Return NULL if no sort specs (most often when ImGuiTableFlags_Sortable is not set) + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable()! + /// + /// + public static unsafe ImGuiTableSortSpecsPtr TableGetSortSpecs() => PInvoke.TableGetSortSpecs(); + + /// + /// + /// return number of columns (value passed to BeginTable) + /// + /// + /// C++: + /// imgui.h:932 + /// , + /// imgui_tables.cpp:1707 + ///
int TableGetColumnCount() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + public static unsafe int TableGetColumnCount() => PInvoke.TableGetColumnCount(); + + /// + /// + /// return current column index. + /// + /// + /// C++: + /// imgui.h:933 + /// , + /// imgui_tables.cpp:2108 + ///
int TableGetColumnIndex() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + public static unsafe int TableGetColumnIndex() => PInvoke.TableGetColumnIndex(); + + /// + /// + /// return current row index (header rows are accounted for) + /// + /// + /// C++: + /// imgui.h:934 + /// , + /// imgui_tables.cpp:1880 + ///
int TableGetRowIndex() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// [Public] Note: for row coloring we use ->RowBgColorCounter which is the same value without counting + /// header rows + /// + /// + public static unsafe int TableGetRowIndex() => PInvoke.TableGetRowIndex(); + + /// + /// + /// return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column. + /// + /// + /// C++: + /// imgui.h:935 + /// , + /// imgui_tables.cpp:1714 + ///
const char* TableGetColumnName(int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + public static unsafe ImString TableGetColumnName(int columnN = -1) => + Utf8.GetNullTerminatedSpan(PInvoke.TableGetColumnName(columnN)); + + /// + /// + /// return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use + /// current column. + /// + /// + /// C++: + /// imgui.h:936 + /// , + /// imgui_tables.cpp:1759 + ///
ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// We allow querying for an extra column in order to poll the IsHovered state of the right-most section + /// + /// + public static unsafe ImGuiTableColumnFlags TableGetColumnFlags(int columnN = -1) => + PInvoke.TableGetColumnFlags(columnN); + + /// + /// + /// change user accessible enabled/disabled state of a column. Set to false to hide the column. User can use + /// the context menu to change this themselves (right-click in headers, or right-click in columns body with + /// ImGuiTableFlags_ContextMenuInBody) + /// + /// + /// C++: + /// imgui.h:937 + /// , + /// imgui_tables.cpp:1741 + ///
void TableSetColumnEnabled(int column_n, bool v) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// Change user accessible enabled/disabled state of a column (often perceived as "showing/hiding" from users point of view) + /// Note that end-user can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody) + /// - Require table to have the ImGuiTableFlags_Hideable flag because we are manipulating user accessible state. + /// - Request will be applied during next layout, which happens on the first call to TableNextRow() after BeginTable(). + /// - For the getter you can test (TableGetColumnFlags() & ImGuiTableColumnFlags_IsEnabled) != 0. + /// - Alternative: the ImGuiTableColumnFlags_Disabled is an overriding/master disable flag which will also hide the column from context menu. + /// + /// + public static unsafe void TableSetColumnEnabled(int columnN, bool v) => + PInvoke.TableSetColumnEnabled(columnN, v); + + /// + /// + /// return hovered column. return -1 when table is not hovered. return columns_count if the unused space at + /// the right of visible columns is hovered. Can also use (TableGetColumnFlags() & + /// ImGuiTableColumnFlags_IsHovered) instead. + /// + /// + /// C++: + /// imgui.h:938 + /// , + /// imgui_tables.cpp:1801 + ///
int TableGetHoveredColumn() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// Return -1 when table is not hovered. return columns_count if hovering the unused space at the right of + /// the right-most visible column. + /// + /// + public static unsafe int TableGetHoveredColumn() => PInvoke.TableGetHoveredColumn(); + + /// + /// + /// change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details. + /// + /// + /// C++: + /// imgui.h:939 + /// , + /// imgui_tables.cpp:1823 + ///
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + public static unsafe void TableSetBgColor(ImGuiTableBgTarget target, ImColor8 color, int columnN = -1) => + PInvoke.TableSetBgColor(target, color, columnN); + + /// + /// + /// C++: + /// imgui.h:943 + /// , + /// imgui_tables.cpp:4542 + ///
void Columns(int count = 1, const char* id = NULL, bool borders = true) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe void Columns(int count = 1, ImString id = default, bool borders = true) + { + fixed (byte* id_fixed = id) + { + PInvoke.Columns(count, id_fixed, borders); + } + } + + /// + /// + /// next column, defaults to current row or next row if the current row is finished + /// + /// + /// C++: + /// imgui.h:944 + /// , + /// imgui_tables.cpp:4410 + ///
void NextColumn() + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe void NextColumn() => PInvoke.NextColumn(); + + /// + /// + /// get current column index + /// + /// + /// C++: + /// imgui.h:945 + /// , + /// imgui_tables.cpp:4152 + ///
int GetColumnIndex() + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe int GetColumnIndex() => PInvoke.GetColumnIndex(); + + /// + /// + /// get column width (in pixels). pass -1 to use current column + /// + /// + /// C++: + /// imgui.h:946 + /// , + /// imgui_tables.cpp:4222 + ///
float GetColumnWidth(int column_index = -1) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe float GetColumnWidth(int columnIndex = -1) => PInvoke.GetColumnWidth(columnIndex); + + /// + /// + /// set column width (in pixels). pass -1 to use current column + /// + /// + /// C++: + /// imgui.h:947 + /// , + /// imgui_tables.cpp:4257 + ///
void SetColumnWidth(int column_index, float width) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe void SetColumnWidth(int columnIndex, float width) => + PInvoke.SetColumnWidth(columnIndex, width); + + /// + /// + /// get position of column line (in pixels, from the left side of the contents region). pass -1 to use + /// current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f + /// + /// + /// C++: + /// imgui.h:948 + /// , + /// imgui_tables.cpp:4193 + ///
float GetColumnOffset(int column_index = -1) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe float GetColumnOffset(int columnIndex = -1) => PInvoke.GetColumnOffset(columnIndex); + + /// + /// + /// set position of column line (in pixels, from the left side of the contents region). pass -1 to use + /// current column + /// + /// + /// C++: + /// imgui.h:949 + /// , + /// imgui_tables.cpp:4235 + ///
void SetColumnOffset(int column_index, float offset_x) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe void SetColumnOffset(int columnIndex, float offsetX) => + PInvoke.SetColumnOffset(columnIndex, offsetX); + + /// + /// + /// C++: + /// imgui.h:950 + /// , + /// imgui_tables.cpp:4158 + ///
int GetColumnsCount() + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + public static unsafe int GetColumnsCount() => PInvoke.GetColumnsCount(); + + /// + /// + /// create and append into a TabBar + /// + /// + /// C++: + /// imgui.h:954 + /// , + /// imgui_widgets.cpp:9440 + ///
bool BeginTabBar(const char* str_id, ImGuiTabBarFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + public static unsafe bool BeginTabBar(ImString strId, ImGuiTabBarFlags flags = default) + { + fixed (byte* strId_fixed = strId) + { + return PInvoke.BeginTabBar(strId_fixed, flags); + } + } + + /// + /// + /// only call EndTabBar() if BeginTabBar() returns true! + /// + /// + /// C++: + /// imgui.h:955 + /// , + /// imgui_widgets.cpp:9520 + ///
void EndTabBar() + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + public static unsafe void EndTabBar() => PInvoke.EndTabBar(); + + /// + /// + /// create a Tab. Returns true if the Tab is selected. + /// + /// + /// C++: + /// imgui.h:956 + /// , + /// imgui_widgets.cpp:10203 + ///
bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + public static unsafe bool BeginTabItem(ImString label, ref bool pOpen, ImGuiTabItemFlags flags = default) + { + fixed (bool* pOpen_fixed = &pOpen) + { + fixed (byte* label_fixed = label) + { + return PInvoke.BeginTabItem(label_fixed, (Bool8*)pOpen_fixed, flags); + } + } + } + + /// + /// + /// create a Tab. Returns true if the Tab is selected. + /// + /// + /// C++: + /// imgui.h:956 + /// , + /// imgui_widgets.cpp:10203 + ///
bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + public static unsafe bool BeginTabItem(ImString label, ImGuiTabItemFlags flags = default) + { + fixed (byte* label_fixed = label) + { + return PInvoke.BeginTabItem(label_fixed, null, flags); + } + } + + /// + /// + /// only call EndTabItem() if BeginTabItem() returns true! + /// + /// + /// C++: + /// imgui.h:957 + /// , + /// imgui_widgets.cpp:10227 + ///
void EndTabItem() + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + public static unsafe void EndTabItem() => PInvoke.EndTabItem(); + + /// + /// + /// create a Tab behaving like a button. return true when clicked. cannot be selected in the tab bar. + /// + /// + /// C++: + /// imgui.h:958 + /// , + /// imgui_widgets.cpp:10246 + ///
bool TabItemButton(const char* label, ImGuiTabItemFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + public static unsafe bool TabItemButton(ImString label, ImGuiTabItemFlags flags = default) + { + fixed (byte* label_fixed = label) + { + return PInvoke.TabItemButton(label_fixed, flags); + } + } + + /// + /// + /// notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on + /// reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call + /// with a window name. + /// + /// + /// C++: + /// imgui.h:959 + /// , + /// imgui_widgets.cpp:10589 + ///
void SetTabItemClosed(const char* tab_or_docked_window_label) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + /// [Public] This is call is 100% optional but it allows to remove some one-frame glitches when a tab has been unexpectedly removed. + /// To use it to need to call the function SetTabItemClosed() between BeginTabBar() and EndTabBar(). + /// Tabs closed by the close button will automatically be flagged to avoid this issue. + /// + /// + public static unsafe void SetTabItemClosed(ImString tabOrDockedWindowLabel) + { + fixed (byte* tabOrDockedWindowLabel_fixed = tabOrDockedWindowLabel) + { + PInvoke.SetTabItemClosed(tabOrDockedWindowLabel_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:974 + /// , + /// imgui.cpp:19996 + ///
+ /// ImGuiID DockSpace(ImGuiID dockspace_id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + /// Create an explicit dockspace node within an existing window. Also expose dock node flags and creates a CentralNode by default. + /// The Central Node is always displayed even when empty and shrink/extend according to the requested size of its neighbors. + /// DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app. + /// When ImGuiDockNodeFlags_KeepAliveOnly is set, nothing is submitted in the current window (function may be called from any location). + /// + /// + public static unsafe ImGuiID DockSpace( + ImGuiID dockspaceId, + in float2? size = default, + ImGuiDockNodeFlags flags = default, + ImGuiWindowClassPtr windowClass = default + ) + { + var size_default = size ?? new float2(0f, 0f); + return PInvoke.DockSpace(dockspaceId, &size_default, flags, windowClass); + } + + /// + /// + /// C++: + /// imgui.h:975 + /// , + /// imgui.cpp:20106 + ///
+ /// ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0, const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + /// Tips: Use with ImGuiDockNodeFlags_PassthruCentralNode! + /// The limitation with this call is that your window won't have a local menu bar, but you can also use BeginMainMenuBar(). + /// Even though we could pass window flags, it would also require the user to be able to call BeginMenuBar() somehow meaning we can't Begin/End in a single function. + /// If you really want a menu bar inside the same window as the one hosting the dockspace, you will need to copy this code somewhere and tweak it. + /// + /// + public static unsafe ImGuiID DockSpaceOverViewport( + ImGuiID dockspaceId = default, + ImGuiViewportPtr viewport = default, + ImGuiDockNodeFlags flags = default, + ImGuiWindowClassPtr windowClass = default + ) => PInvoke.DockSpaceOverViewport(dockspaceId, viewport, flags, windowClass); + + /// + /// + /// set next window dock id + /// + /// + /// C++: + /// imgui.h:976 + /// , + /// imgui.cpp:9044 + ///
void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + public static unsafe void SetNextWindowDockID(ImGuiID dockId, ImGuiCond cond = default) => + PInvoke.SetNextWindowDockID(dockId, cond); + + /// + /// + /// set next window class (control docking compatibility + provide hints to platform backend via custom + /// viewport flags and platform parent/child relationship) + /// + /// + /// C++: + /// imgui.h:977 + /// , + /// imgui.cpp:9052 + ///
void SetNextWindowClass(const ImGuiWindowClass* window_class) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + public static unsafe void SetNextWindowClass(ImGuiWindowClassPtr windowClass) => + PInvoke.SetNextWindowClass(windowClass); + + /// + /// + /// C++: + /// imgui.h:978 + /// , + /// imgui.cpp:8810 + ///
ImGuiID GetWindowDockID() + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + public static unsafe ImGuiID GetWindowDockID() => PInvoke.GetWindowDockID(); + + /// + /// + /// is current window docked into another window? + /// + /// + /// C++: + /// imgui.h:979 + /// , + /// imgui.cpp:8816 + ///
bool IsWindowDocked() + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + public static unsafe bool IsWindowDocked() => PInvoke.IsWindowDocked(); + + /// + /// + /// start logging to tty (stdout) + /// + /// + /// C++: + /// imgui.h:983 + /// , + /// imgui.cpp:15624 + ///
void LogToTTY(int auto_open_depth = -1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + public static unsafe void LogToTTY(int autoOpenDepth = -1) => PInvoke.LogToTTY(autoOpenDepth); + + /// + /// + /// start logging to file + /// + /// + /// C++: + /// imgui.h:984 + /// , + /// imgui.cpp:15637 + ///
void LogToFile(int auto_open_depth = -1, const char* filename = NULL) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + /// Start logging/capturing text output to given file + /// + /// + public static unsafe void LogToFile(int autoOpenDepth = -1, ImString filename = default) + { + fixed (byte* filename_fixed = filename) + { + PInvoke.LogToFile(autoOpenDepth, filename_fixed); + } + } + + /// + /// + /// start logging to OS clipboard + /// + /// + /// C++: + /// imgui.h:985 + /// , + /// imgui.cpp:15662 + ///
void LogToClipboard(int auto_open_depth = -1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + /// Start logging/capturing text output to clipboard + /// + /// + public static unsafe void LogToClipboard(int autoOpenDepth = -1) => PInvoke.LogToClipboard(autoOpenDepth); + + /// + /// + /// stop logging (close file, etc.) + /// + /// + /// C++: + /// imgui.h:986 + /// , + /// imgui.cpp:15678 + ///
void LogFinish() + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + public static unsafe void LogFinish() => PInvoke.LogFinish(); + + /// + /// + /// helper to display buttons for logging to tty/file/clipboard + /// + /// + /// C++: + /// imgui.h:987 + /// , + /// imgui.cpp:15714 + ///
void LogButtons() + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + /// Helper to display logging buttons + /// FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!) + /// + /// + public static unsafe void LogButtons() => PInvoke.LogButtons(); + + /// + /// + /// pass text data straight to log (without being displayed) + /// + /// + /// C++: + /// imgui.h:988 + /// , + /// imgui.cpp:15515 + ///
void LogText(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + public static unsafe void LogText(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.LogText(text_fixed); + } + } + + /// + /// + /// call after submitting an item which may be dragged. when this return true, you can call + /// SetDragDropPayload() + EndDragDropSource() + /// + /// + /// C++: + /// imgui.h:996 + /// , + /// imgui.cpp:15174 + ///
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + /// When this returns true you need to: a) call SetDragDropPayload() exactly once, b) you may render the payload visual/description, c) call EndDragDropSource() + /// If the item has an identifier: + /// - This assume/require the item to be activated (typically via ButtonBehavior). + /// - Therefore if you want to use this with a mouse button other than left mouse button, it is up to the item itself to activate with another button. + /// - We then pull and use the mouse button that was used to activate the item and use it to carry on the drag. + /// If the item has no identifier: + /// - Currently always assume left mouse button. + /// + /// + public static unsafe bool BeginDragDropSource(ImGuiDragDropFlags flags = default) => + PInvoke.BeginDragDropSource(flags); + + /// + /// + /// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear + /// imgui internal types. Data is copied and held by imgui. Return true when payload has been accepted. + /// + /// + /// C++: + /// imgui.h:997 + /// , + /// imgui.cpp:15309 + ///
bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + /// Use 'cond' to choose to submit payload on drag start or every frame + /// + /// + public static unsafe bool SetDragDropPayload(ImString type, Ptr data, nuint sz, ImGuiCond cond = default) + { + fixed (byte* type_fixed = type) + { + return PInvoke.SetDragDropPayload(type_fixed, data, sz, cond); + } + } + + /// + /// + /// only call EndDragDropSource() if BeginDragDropSource() returns true! + /// + /// + /// C++: + /// imgui.h:998 + /// , + /// imgui.cpp:15293 + ///
void EndDragDropSource() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + public static unsafe void EndDragDropSource() => PInvoke.EndDragDropSource(); + + /// + /// + /// call after submitting an item that may receive a payload. If this returns true, you can call + /// AcceptDragDropPayload() + EndDragDropTarget() + /// + /// + /// C++: + /// imgui.h:999 + /// , + /// imgui.cpp:15381 + ///
bool BeginDragDropTarget() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + /// We don't use BeginDragDropTargetCustom() and duplicate its code because: + /// 1) we use LastItemData's ImGuiItemStatusFlags_HoveredRect which handles items that push a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them. + /// 2) and it's faster. as this code may be very frequently called, we want to early out as fast as we can. + /// Also note how the HoveredWindow test is positioned differently in both functions (in both functions we optimize for the cheapest early out case) + /// + /// + public static unsafe bool BeginDragDropTarget() => PInvoke.BeginDragDropTarget(); + + /// + /// + /// accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the + /// payload before the mouse button is released. + /// + /// + /// C++: + /// imgui.h:1000 + /// , + /// imgui.cpp:15418 + ///
const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + public static unsafe ImGuiPayloadPtr AcceptDragDropPayload(ImString type, ImGuiDragDropFlags flags = default) + { + fixed (byte* type_fixed = type) + { + return PInvoke.AcceptDragDropPayload(type_fixed, flags); + } + } + + /// + /// + /// only call EndDragDropTarget() if BeginDragDropTarget() returns true! + /// + /// + /// C++: + /// imgui.h:1001 + /// , + /// imgui.cpp:15481 + ///
void EndDragDropTarget() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + public static unsafe void EndDragDropTarget() => PInvoke.EndDragDropTarget(); + + /// + /// + /// peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or + /// inactive. use ImGuiPayload::IsDataType() to test for the payload type. + /// + /// + /// C++: + /// imgui.h:1002 + /// , + /// imgui.cpp:15475 + ///
const ImGuiPayload* GetDragDropPayload() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + public static unsafe ImGuiPayloadPtr GetDragDropPayload() => PInvoke.GetDragDropPayload(); + + /// + /// + /// C++: + /// imgui.h:1009 + /// , + /// imgui.cpp:8619 + ///
void BeginDisabled(bool disabled = true) + ///
+ ///
+ /// + /// + /// Disabling [BETA API] + /// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors) + /// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) + /// - Tooltips windows by exception are opted out of disabling. + /// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) + /// + /// + /// BeginDisabled()/EndDisabled() + /// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) + /// - Visually this is currently altering alpha, but it is expected that in a future styling system this would work differently. + /// - Feedback welcome at https://github.com/ocornut/imgui/issues/211 + /// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions. + /// (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) + /// - Note: mixing up BeginDisabled() and PushItemFlag(ImGuiItemFlags_Disabled) is currently NOT SUPPORTED. + /// + /// + public static unsafe void BeginDisabled(bool disabled = true) => PInvoke.BeginDisabled(disabled); + + /// + /// + /// C++: + /// imgui.h:1010 + /// , + /// imgui.cpp:8634 + ///
void EndDisabled() + ///
+ ///
+ /// + /// + /// Disabling [BETA API] + /// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors) + /// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) + /// - Tooltips windows by exception are opted out of disabling. + /// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) + /// + /// + public static unsafe void EndDisabled() => PInvoke.EndDisabled(); + + /// + /// + /// C++: + /// imgui.h:1014 + /// , + /// imgui.cpp:5879 + ///
+ /// void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect) + ///
+ ///
+ /// + /// + /// Clipping + /// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only. + /// + /// + /// Push a clipping rectangle for both ImGui logic (hit-testing etc.) and low-level ImDrawList rendering. + /// - When using this function it is sane to ensure that float are perfectly rounded to integer values, + /// so that e.g. (int)(max.x-min.x) in user's render produce correct result. + /// - If the code here changes, may need to update code of functions like NextColumn() and PushColumnClipRect(): + /// some frequently called functions which to modify both channels and clipping simultaneously tend to use the + /// more specialized SetWindowClipRectBeforeSetChannel() to avoid extraneous updates of underlying ImDrawCmds. + /// - This is analogous to PushFont()/PopFont() in the sense that are a mixing a global stack and a window stack, + /// which in the case of ClipRect is not so problematic but tends to be more restrictive for fonts. + /// + /// + public static unsafe void PushClipRect( + in float2 clipRectMin, + in float2 clipRectMax, + bool intersectWithCurrentClipRect + ) + { + fixed (float2* clipRectMax_fixed = &clipRectMax) + { + fixed (float2* clipRectMin_fixed = &clipRectMin) + { + PInvoke.PushClipRect(clipRectMin_fixed, clipRectMax_fixed, intersectWithCurrentClipRect); + } + } + } + + /// + /// + /// C++: + /// imgui.h:1015 + /// , + /// imgui.cpp:5886 + ///
void PopClipRect() + ///
+ ///
+ /// + /// + /// Clipping + /// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only. + /// + /// + public static unsafe void PopClipRect() => PInvoke.PopClipRect(); + + /// + /// + /// make last item the default focused item of a newly appearing window. + /// + /// + /// C++: + /// imgui.h:1018 + /// , + /// imgui.cpp:9231 + ///
void SetItemDefaultFocus() + ///
+ ///
+ /// + /// + /// Focus, Activation + /// + /// + public static unsafe void SetItemDefaultFocus() => PInvoke.SetItemDefaultFocus(); + + /// + /// + /// focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple + /// component widget. Use -1 to access previous widget. + /// + /// + /// C++: + /// imgui.h:1019 + /// , + /// imgui.cpp:9198 + ///
void SetKeyboardFocusHere(int offset = 0) + ///
+ ///
+ /// + /// + /// Focus, Activation + /// + /// + /// Note: this will likely be called ActivateItem() once we rework our Focus/Activation system! + /// But ActivateItem() should function without altering scroll/focus? + /// + /// + public static unsafe void SetKeyboardFocusHere(int offset = 0) => PInvoke.SetKeyboardFocusHere(offset); + + /// + /// + /// alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when + /// clicking with mouse. + /// + /// + /// C++: + /// imgui.h:1022 + /// , + /// imgui.cpp:13464 + ///
void SetNavCursorVisible(bool visible) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public static unsafe void SetNavCursorVisible(bool visible) => PInvoke.SetNavCursorVisible(visible); + + /// + /// + /// allow next item to be overlapped by a subsequent item. Useful with invisible buttons, selectable, + /// treenode covering an area where subsequent items may need to be added. Note that both Selectable() and + /// TreeNode() have dedicated flags doing this. + /// + /// + /// C++: + /// imgui.h:1025 + /// , + /// imgui.cpp:6414 + ///
void SetNextItemAllowOverlap() + ///
+ ///
+ /// + /// + /// Overlapping mode + /// + /// + /// Allow next item to be overlapped by subsequent items. + /// This works by requiring HoveredId to match for two subsequent frames, + /// so if a following items overwrite it our interactions will naturally be disabled. + /// + /// + public static unsafe void SetNextItemAllowOverlap() => PInvoke.SetNextItemAllowOverlap(); + + /// + /// + /// is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more + /// options. + /// + /// + /// C++: + /// imgui.h:1030 + /// , + /// imgui.cpp:4770 + ///
bool IsItemHovered(ImGuiHoveredFlags flags = 0) + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// This is roughly matching the behavior of internal-facing ItemHoverable() + /// - this should work even for non-interactive items that have no ID, so we cannot use LastItemId + /// + /// + public static unsafe bool IsItemHovered(ImGuiHoveredFlags flags = default) => PInvoke.IsItemHovered(flags); + + /// + /// + /// is the last item active? (e.g. button being held, text field being edited. This will continuously return + /// true while holding mouse button on an item. Items that don't interact will always return false) + /// + /// + /// C++: + /// imgui.h:1031 + /// , + /// imgui.cpp:6306 + ///
bool IsItemActive() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemActive() => PInvoke.IsItemActive(); + + /// + /// + /// is the last item focused for keyboard/gamepad navigation? + /// + /// + /// C++: + /// imgui.h:1032 + /// , + /// imgui.cpp:6338 + ///
bool IsItemFocused() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// == (GetItemID() == GetFocusID() && GetFocusID() != 0) + /// + /// + public static unsafe bool IsItemFocused() => PInvoke.IsItemFocused(); + + /// + /// + /// is the last item hovered and mouse clicked on? (**) == IsMouseClicked(mouse_button) && + /// IsItemHovered()Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in + /// function definition. + /// + /// + /// C++: + /// imgui.h:1033 + /// , + /// imgui.cpp:6355 + ///
bool IsItemClicked(ImGuiMouseButton mouse_button = 0) + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// Important: this can be useful but it is NOT equivalent to the behavior of e.g.Button()! + /// Most widgets have specific reactions based on mouse-up/down state, mouse position etc. + /// + /// + public static unsafe bool IsItemClicked(ImGuiMouseButton mouseButton = default) => + PInvoke.IsItemClicked(mouseButton); + + /// + /// + /// is the last item visible? (items may be out of sight because of clipping/scrolling) + /// + /// + /// C++: + /// imgui.h:1034 + /// , + /// imgui.cpp:6399 + ///
bool IsItemVisible() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemVisible() => PInvoke.IsItemVisible(); + + /// + /// + /// did the last item modify its underlying value this frame? or was pressed? This is generally the same as + /// the "bool" return value of many widgets. + /// + /// + /// C++: + /// imgui.h:1035 + /// , + /// imgui.cpp:6405 + ///
bool IsItemEdited() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemEdited() => PInvoke.IsItemEdited(); + + /// + /// + /// was the last item just made active (item was previously inactive). + /// + /// + /// C++: + /// imgui.h:1036 + /// , + /// imgui.cpp:6314 + ///
bool IsItemActivated() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemActivated() => PInvoke.IsItemActivated(); + + /// + /// + /// was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with + /// widgets that require continuous editing. + /// + /// + /// C++: + /// imgui.h:1037 + /// , + /// imgui.cpp:6323 + ///
bool IsItemDeactivated() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemDeactivated() => PInvoke.IsItemDeactivated(); + + /// + /// + /// was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag + /// moved). Useful for Undo/Redo patterns with widgets that require continuous editing. Note that you may + /// get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when + /// clicking an already selected item). + /// + /// + /// C++: + /// imgui.h:1038 + /// , + /// imgui.cpp:6331 + ///
bool IsItemDeactivatedAfterEdit() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemDeactivatedAfterEdit() => PInvoke.IsItemDeactivatedAfterEdit(); + + /// + /// + /// was the last item open state toggled? set by TreeNode(). + /// + /// + /// C++: + /// imgui.h:1039 + /// , + /// imgui.cpp:6360 + ///
bool IsItemToggledOpen() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsItemToggledOpen() => PInvoke.IsItemToggledOpen(); + + /// + /// + /// is any item hovered? + /// + /// + /// C++: + /// imgui.h:1040 + /// , + /// imgui.cpp:6381 + ///
bool IsAnyItemHovered() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, + /// you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! + /// Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details. + /// + /// + public static unsafe bool IsAnyItemHovered() => PInvoke.IsAnyItemHovered(); + + /// + /// + /// is any item active? + /// + /// + /// C++: + /// imgui.h:1041 + /// , + /// imgui.cpp:6387 + ///
bool IsAnyItemActive() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsAnyItemActive() => PInvoke.IsAnyItemActive(); + + /// + /// + /// is any item focused? + /// + /// + /// C++: + /// imgui.h:1042 + /// , + /// imgui.cpp:6393 + ///
bool IsAnyItemFocused() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe bool IsAnyItemFocused() => PInvoke.IsAnyItemFocused(); + + /// + /// + /// get ID of last item (~~ often same ImGui::GetID(label) beforehand) + /// + /// + /// C++: + /// imgui.h:1043 + /// , + /// imgui.cpp:6445 + ///
ImGuiID GetItemID() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe ImGuiID GetItemID() => PInvoke.GetItemID(); + + /// + /// + /// get upper-left bounding rectangle of the last item (screen space) + /// + /// + /// C++: + /// imgui.h:1044 + /// , + /// imgui.cpp:6451 + ///
ImVec2 GetItemRectMin() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe float2 GetItemRectMin() => PInvoke.GetItemRectMin(); + + /// + /// + /// get lower-right bounding rectangle of the last item (screen space) + /// + /// + /// C++: + /// imgui.h:1045 + /// , + /// imgui.cpp:6457 + ///
ImVec2 GetItemRectMax() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe float2 GetItemRectMax() => PInvoke.GetItemRectMax(); + + /// + /// + /// get size of last item + /// + /// + /// C++: + /// imgui.h:1046 + /// , + /// imgui.cpp:6463 + ///
ImVec2 GetItemRectSize() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + public static unsafe float2 GetItemRectSize() => PInvoke.GetItemRectSize(); + + /// + /// + /// return primary/default viewport. This can never be NULL. + /// + /// + /// C++: + /// imgui.h:1052 + /// , + /// imgui.cpp:16170 + ///
ImGuiViewport* GetMainViewport() + ///
+ ///
+ /// + /// + /// Viewports + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// + /// + public static unsafe ImGuiViewportPtr GetMainViewport() => PInvoke.GetMainViewport(); + + /// + /// + /// get background draw list for the given viewport or viewport associated to the current window. this draw + /// list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents. + /// + /// + /// C++: + /// imgui.h:1055 + /// , + /// imgui.cpp:5151 + ///
ImDrawList* GetBackgroundDrawList(ImGuiViewport* viewport = NULL) + ///
+ ///
+ /// + /// + /// Background/Foreground Draw Lists + /// + /// + public static unsafe ImDrawListPtr GetBackgroundDrawList(ImGuiViewportPtr viewport = default) => + PInvoke.GetBackgroundDrawList(viewport); + + /// + /// + /// get foreground draw list for the given viewport or viewport associated to the current window. this draw + /// list will be the top-most rendered one. Useful to quickly draw shapes/text over dear imgui contents. + /// + /// + /// C++: + /// imgui.h:1056 + /// , + /// imgui.cpp:5158 + ///
ImDrawList* GetForegroundDrawList(ImGuiViewport* viewport = NULL) + ///
+ ///
+ /// + /// + /// Background/Foreground Draw Lists + /// + /// + public static unsafe ImDrawListPtr GetForegroundDrawList(ImGuiViewportPtr viewport = default) => + PInvoke.GetForegroundDrawList(viewport); + + /// + /// + /// test if rectangle (of given size, starting from cursor position) is visible / not clipped. + /// + /// + /// C++: + /// imgui.h:1059 + /// , + /// imgui.cpp:9261 + ///
bool IsRectVisible(const ImVec2& size) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe bool IsRectVisible(in float2 size) + { + fixed (float2* size_fixed = &size) + { + return PInvoke.IsRectVisible_0(size_fixed); + } + } + + /// + /// + /// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side. + /// + /// + /// C++: + /// imgui.h:1060 + /// , + /// imgui.cpp:9267 + ///
bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe bool IsRectVisible(in float2 rectMin, in float2 rectMax) + { + fixed (float2* rectMax_fixed = &rectMax) + { + fixed (float2* rectMin_fixed = &rectMin) + { + return PInvoke.IsRectVisible_1(rectMin_fixed, rectMax_fixed); + } + } + } + + /// + /// + /// get global imgui time. incremented by io.DeltaTime every frame. + /// + /// + /// C++: + /// imgui.h:1061 + /// , + /// imgui.cpp:5117 + ///
double GetTime() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe double GetTime() => PInvoke.GetTime(); + + /// + /// + /// get global imgui frame count. incremented by 1 every frame. + /// + /// + /// C++: + /// imgui.h:1062 + /// , + /// imgui.cpp:5122 + ///
int GetFrameCount() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe int GetFrameCount() => PInvoke.GetFrameCount(); + + /// + /// + /// you may use this when creating your own ImDrawList instances. + /// + /// + /// C++: + /// imgui.h:1063 + /// , + /// imgui.cpp:5165 + ///
ImDrawListSharedData* GetDrawListSharedData() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe ImDrawListSharedDataPtr GetDrawListSharedData() => PInvoke.GetDrawListSharedData(); + + /// + /// + /// get a string corresponding to the enum value (for display, saving, etc.). + /// + /// + /// C++: + /// imgui.h:1064 + /// , + /// imgui.cpp:3679 + ///
const char* GetStyleColorName(ImGuiCol idx) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe ImString GetStyleColorName(ImGuiCol idx) => + Utf8.GetNullTerminatedSpan(PInvoke.GetStyleColorName(idx)); + + /// + /// + /// replace current window storage with our own (if you want to manipulate it yourself, typically clear + /// subsection of it) + /// + /// + /// C++: + /// imgui.h:1065 + /// , + /// imgui.cpp:9249 + ///
void SetStateStorage(ImGuiStorage* storage) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe void SetStateStorage(ImGuiStoragePtr storage) => PInvoke.SetStateStorage(storage); + + /// + /// + /// C++: + /// imgui.h:1066 + /// , + /// imgui.cpp:9255 + ///
ImGuiStorage* GetStateStorage() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + public static unsafe ImGuiStoragePtr GetStateStorage() => PInvoke.GetStateStorage(); + + /// + /// + /// C++: + /// imgui.h:1069 + /// , + /// imgui.cpp:6205 + ///
+ /// ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f) + ///
+ ///
+ /// + /// + /// Text Utilities + /// + /// + /// Calculate text size. Text can be multi-line. Optionally ignore text after a ## marker. + /// CalcTextSize("") should return ImVec2(0.0f, g.FontSize) + /// + /// + public static unsafe float2 CalcTextSize( + ImString text, + bool hideTextAfterDoubleHash = false, + float wrapWidth = -1f + ) + { + fixed (byte* text_fixed = text) + { + return PInvoke.CalcTextSize(text_fixed, text_fixed + text.Length, hideTextAfterDoubleHash, wrapWidth); + } + } + + /// + /// + /// C++: + /// imgui.h:1072 + /// , + /// imgui.cpp:2750 + ///
ImVec4 ColorConvertU32ToFloat4(ImU32 in) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + public static unsafe float4 ColorConvertU32ToFloat4(uint @in) => PInvoke.ColorConvertU32ToFloat4(@in); + + /// + /// + /// C++: + /// imgui.h:1073 + /// , + /// imgui.cpp:2760 + ///
ImU32 ColorConvertFloat4ToU32(const ImVec4& in) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + public static unsafe uint ColorConvertFloat4ToU32(in float4 @in) + { + fixed (float4* @in_fixed = &@in) + { + return PInvoke.ColorConvertFloat4ToU32(@in_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:1074 + /// , + /// imgui.cpp:2772 + ///
+ /// void ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + /// Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592 + /// Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv + /// + /// + public static unsafe void ColorConvertRGBtoHSV( + float r, + float g, + float b, + out float outH, + out float outS, + out float outV + ) + { + fixed (float* outV_fixed = &outV) + { + fixed (float* outS_fixed = &outS) + { + fixed (float* outH_fixed = &outH) + { + PInvoke.ColorConvertRGBtoHSV(r, g, b, outH_fixed, outS_fixed, outV_fixed); + } + } + } + } + + /// + /// + /// C++: + /// imgui.h:1075 + /// , + /// imgui.cpp:2794 + ///
+ /// void ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + /// Convert hsv floats ([0-1],[0-1],[0-1]) to rgb floats ([0-1],[0-1],[0-1]), from Foley & van Dam p593 + /// also http://en.wikipedia.org/wiki/HSL_and_HSV + /// + /// + public static unsafe void ColorConvertHSVtoRGB( + float h, + float s, + float v, + out float outR, + out float outG, + out float outB + ) + { + fixed (float* outB_fixed = &outB) + { + fixed (float* outG_fixed = &outG) + { + fixed (float* outR_fixed = &outR) + { + PInvoke.ColorConvertHSVtoRGB(h, s, v, outR_fixed, outG_fixed, outB_fixed); + } + } + } + } + + /// + /// + /// is key being held. + /// + /// + /// C++: + /// imgui.h:1081 + /// , + /// imgui.cpp:10171 + ///
bool IsKeyDown(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + /// Note that Dear ImGui doesn't know the meaning/semantic of ImGuiKey from 0..511: they are legacy native keycodes. + /// Consider transitioning from 'IsKeyDown(MY_ENGINE_KEY_A)' (<1.87) to IsKeyDown(ImGuiKey_A) (>= 1.87) + /// + /// + public static unsafe bool IsKeyDown(ImGuiKey key) => PInvoke.IsKeyDown(key); + + /// + /// + /// was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate + /// + /// + /// C++: + /// imgui.h:1082 + /// , + /// imgui.cpp:10186 + ///
bool IsKeyPressed(ImGuiKey key, bool repeat = true) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + public static unsafe bool IsKeyPressed(ImGuiKey key, bool repeat = true) => PInvoke.IsKeyPressed(key, repeat); + + /// + /// + /// was key released (went from Down to !Down)? + /// + /// + /// C++: + /// imgui.h:1083 + /// , + /// imgui.cpp:10231 + ///
bool IsKeyReleased(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + public static unsafe bool IsKeyReleased(ImGuiKey key) => PInvoke.IsKeyReleased(key); + + /// + /// + /// was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This + /// doesn't do any routing or focus check, please consider using Shortcut() function instead. + /// + /// + /// C++: + /// imgui.h:1084 + /// , + /// imgui.cpp:11067 + ///
bool IsKeyChordPressed(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + /// This is the only public API until we expose owner_id versions of the API as replacements. + /// + /// + public static unsafe bool IsKeyChordPressed(ImGuiKeyChord keyChord) => PInvoke.IsKeyChordPressed(keyChord); + + /// + /// + /// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is + /// small enough that DeltaTime > RepeatRate + /// + /// + /// C++: + /// imgui.h:1085 + /// , + /// imgui.cpp:9895 + ///
int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + /// Return value representing the number of presses in the last time period, for the given repeat rate + /// (most often returns 0 or 1. The result is generally only >1 when RepeatRate is smaller than DeltaTime, aka large DeltaTime or fast RepeatRate) + /// + /// + public static unsafe int GetKeyPressedAmount(ImGuiKey key, float repeatDelay, float rate) => + PInvoke.GetKeyPressedAmount(key, repeatDelay, rate); + + /// + /// + /// [DEBUG] returns English name of the key. Those names are provided for debugging purpose and are not + /// meant to be saved persistently nor compared. + /// + /// + /// C++: + /// imgui.h:1086 + /// , + /// imgui.cpp:9829 + ///
const char* GetKeyName(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + public static unsafe ImString GetKeyName(ImGuiKey key) => Utf8.GetNullTerminatedSpan(PInvoke.GetKeyName(key)); + + /// + /// + /// Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, + /// typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your + /// widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; + /// after the next NewFrame() call. + /// + /// + /// C++: + /// imgui.h:1087 + /// , + /// imgui.cpp:10775 + ///
void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + public static unsafe void SetNextFrameWantCaptureKeyboard(bool wantCaptureKeyboard) => + PInvoke.SetNextFrameWantCaptureKeyboard(wantCaptureKeyboard); + + /// + /// + /// C++: + /// imgui.h:1104 + /// , + /// imgui.cpp:11123 + ///
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Shortcut Testing & Routing [BETA] + /// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super. + /// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments) + /// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments) + /// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values. + /// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it. + /// Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut. + /// Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts) + /// Child2 -> no call // When Child2 is focused, Parent gets the shortcut. + /// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical. + /// This is an important property as it facilitate working with foreign code or larger codebase. + /// - To understand the difference: + /// - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect. + /// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route. + /// - Visualize registered routes in 'Metrics/Debugger->Inputs'. + /// + /// + public static unsafe bool Shortcut(ImGuiKeyChord keyChord, ImGuiInputFlags flags = default) => + PInvoke.Shortcut(keyChord, flags); + + /// + /// + /// C++: + /// imgui.h:1105 + /// , + /// imgui.cpp:11090 + ///
void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Shortcut Testing & Routing [BETA] + /// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super. + /// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments) + /// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments) + /// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values. + /// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it. + /// Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut. + /// Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts) + /// Child2 -> no call // When Child2 is focused, Parent gets the shortcut. + /// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical. + /// This is an important property as it facilitate working with foreign code or larger codebase. + /// - To understand the difference: + /// - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect. + /// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route. + /// - Visualize registered routes in 'Metrics/Debugger->Inputs'. + /// + /// + public static unsafe void SetNextItemShortcut(ImGuiKeyChord keyChord, ImGuiInputFlags flags = default) => + PInvoke.SetNextItemShortcut(keyChord, flags); + + /// + /// + /// Set key owner to last item ID if it is hovered or active. Equivalent to 'if (IsItemHovered() || + /// IsItemActive()) { SetKeyOwner(key, GetItemID());'. + /// + /// + /// C++: + /// imgui.h:1113 + /// , + /// imgui.cpp:11061 + ///
void SetItemKeyOwner(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Key/Input Ownership [BETA] + /// - One common use case would be to allow your items to disable standard inputs behaviors such + /// as Tab or Alt key handling, Mouse Wheel scrolling, etc. + /// e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling. + /// - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them. + /// - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version. + /// + /// + public static unsafe void SetItemKeyOwner(ImGuiKey key) => PInvoke.SetItemKeyOwner(key); + + /// + /// + /// is mouse button held? + /// + /// + /// C++: + /// imgui.h:1119 + /// , + /// imgui.cpp:10246 + ///
bool IsMouseDown(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe bool IsMouseDown(ImGuiMouseButton button) => PInvoke.IsMouseDown(button); + + /// + /// + /// did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1. + /// + /// + /// C++: + /// imgui.h:1120 + /// , + /// imgui.cpp:10260 + ///
bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false) => + PInvoke.IsMouseClicked(button, repeat); + + /// + /// + /// did mouse button released? (went from Down to !Down) + /// + /// + /// C++: + /// imgui.h:1121 + /// , + /// imgui.cpp:10287 + ///
bool IsMouseReleased(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe bool IsMouseReleased(ImGuiMouseButton button) => PInvoke.IsMouseReleased(button); + + /// + /// + /// did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will + /// also report IsMouseClicked() == true) + /// + /// + /// C++: + /// imgui.h:1122 + /// , + /// imgui.cpp:10312 + ///
bool IsMouseDoubleClicked(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe bool IsMouseDoubleClicked(ImGuiMouseButton button) => PInvoke.IsMouseDoubleClicked(button); + + /// + /// + /// delayed mouse release (use very sparingly!). Generally used with 'delay >= io.MouseDoubleClickTime' + + /// combined with a 'io.MouseClickedLastCount==1' test. This is a very rarely used UI idiom, but some apps + /// use this: e.g. MS Explorer single click on an icon to rename. + /// + /// + /// C++: + /// imgui.h:1123 + /// , + /// imgui.cpp:10304 + ///
bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Use if you absolutely need to distinguish single-click from double-click by introducing a delay. + /// Generally use with 'delay >= io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount == 1' test. + /// This is a very rarely used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename. + /// + /// + public static unsafe bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay) => + PInvoke.IsMouseReleasedWithDelay(button, delay); + + /// + /// + /// return the number of successive mouse-clicks at the time where a click happen (otherwise 0). + /// + /// + /// C++: + /// imgui.h:1124 + /// , + /// imgui.cpp:10326 + ///
int GetMouseClickedCount(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe int GetMouseClickedCount(ImGuiMouseButton button) => PInvoke.GetMouseClickedCount(button); + + /// + /// + /// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but + /// disregarding of other consideration of focus/window ordering/popup-block. + /// + /// + /// C++: + /// imgui.h:1125 + /// , + /// imgui.cpp:10336 + ///
bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Test if mouse cursor is hovering given rectangle + /// NB- Rectangle is clipped by our current clip setting + /// NB- Expand the rectangle to be generous on imprecise inputs systems (g.Style.TouchExtraPadding) + /// + /// + public static unsafe bool IsMouseHoveringRect(in float2 rMin, in float2 rMax, bool clip = true) + { + fixed (float2* rMax_fixed = &rMax) + { + fixed (float2* rMin_fixed = &rMin) + { + return PInvoke.IsMouseHoveringRect(rMin_fixed, rMax_fixed, clip); + } + } + } + + /// + /// + /// by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available + /// + /// + /// C++: + /// imgui.h:1126 + /// , + /// imgui.cpp:10400 + ///
bool IsMousePosValid(const ImVec2* mouse_pos = NULL) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// We typically use ImVec2(-FLT_MAX,-FLT_MAX) to denote an invalid mouse position. + /// + /// + public static unsafe bool IsMousePosValid(in float2? mousePos = null) + { + var mousePos_ptr = mousePos is { } mousePos_value ? &mousePos_value : null; + return PInvoke.IsMousePosValid((float2*)mousePos_ptr); + } + + /// + /// + /// [WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend + /// maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid. + /// + /// + /// C++: + /// imgui.h:1127 + /// , + /// imgui.cpp:10411 + ///
bool IsAnyMouseDown() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// [WILL OBSOLETE] This was designed for backends, but prefer having backend maintain a mask of held mouse + /// buttons, because upcoming input queue system will make this invalid. + /// + /// + public static unsafe bool IsAnyMouseDown() => PInvoke.IsAnyMouseDown(); + + /// + /// + /// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls + /// + /// + /// C++: + /// imgui.h:1128 + /// , + /// imgui.cpp:10373 + ///
ImVec2 GetMousePos() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe float2 GetMousePos() => PInvoke.GetMousePos(); + + /// + /// + /// retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user + /// backing that value themselves) + /// + /// + /// C++: + /// imgui.h:1129 + /// , + /// imgui.cpp:10391 + ///
ImVec2 GetMousePosOnOpeningCurrentPopup() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// NB: prefer to call right after BeginPopup(). At the time Selectable/MenuItem is activated, the popup is + /// already closed! + /// + /// + public static unsafe float2 GetMousePosOnOpeningCurrentPopup() => PInvoke.GetMousePosOnOpeningCurrentPopup(); + + /// + /// + /// is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f) + /// + /// + /// C++: + /// imgui.h:1130 + /// , + /// imgui.cpp:10364 + ///
bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe bool IsMouseDragging(ImGuiMouseButton button, float lockThreshold = -1f) => + PInvoke.IsMouseDragging(button, lockThreshold); + + /// + /// + /// return the delta from the initial clicking position while the mouse button is pressed or was just + /// released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once + /// (uses io.MouseDraggingThreshold if lock_threshold < 0.0f) + /// + /// + /// C++: + /// imgui.h:1131 + /// , + /// imgui.cpp:10423 + ///
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Return the delta from the initial clicking position while the mouse button is clicked or was just released. + /// This is locked and return 0.0f until the mouse moves past a distance threshold at least once. + /// NB: This is only valid if IsMousePosValid(). backends in theory should always keep mouse position valid when dragging even outside the client window. + /// + /// + public static unsafe float2 GetMouseDragDelta(ImGuiMouseButton button = default, float lockThreshold = -1f) => + PInvoke.GetMouseDragDelta(button, lockThreshold); + + /// + /// + /// C++: + /// imgui.h:1132 + /// , + /// imgui.cpp:10436 + ///
void ResetMouseDragDelta(ImGuiMouseButton button = 0) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe void ResetMouseDragDelta(ImGuiMouseButton button = default) => + PInvoke.ResetMouseDragDelta(button); + + /// + /// + /// get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. + /// valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render + /// those for you + /// + /// + /// C++: + /// imgui.h:1133 + /// , + /// imgui.cpp:10448 + ///
ImGuiMouseCursor GetMouseCursor() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Get desired mouse cursor shape. + /// Important: this is meant to be used by a platform backend, it is reset in ImGui::NewFrame(), + /// updated during the frame, and locked in EndFrame()/Render(). + /// If you use software rendering by setting io.MouseDrawCursor then Dear ImGui will render those for you + /// + /// + public static unsafe ImGuiMouseCursor GetMouseCursor() => PInvoke.GetMouseCursor(); + + /// + /// + /// set desired mouse cursor shape + /// + /// + /// C++: + /// imgui.h:1134 + /// , + /// imgui.cpp:10457 + ///
void SetMouseCursor(ImGuiMouseCursor cursor_type) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// We intentionally accept values of ImGuiMouseCursor that are outside our bounds, in case users needs to hack-in a custom cursor value. + /// Custom cursors may be handled by custom backends. If you are using a standard backend and want to hack in a custom cursor, you may + /// handle it before the backend _NewFrame() call and temporarily set ImGuiConfigFlags_NoMouseCursorChange during the backend _NewFrame() call. + /// + /// + public static unsafe void SetMouseCursor(ImGuiMouseCursor cursorType) => PInvoke.SetMouseCursor(cursorType); + + /// + /// + /// Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical + /// when true it instructs your app to ignore inputs). This is equivalent to setting "io.WantCaptureMouse = + /// want_capture_mouse;" after the next NewFrame() call. + /// + /// + /// C++: + /// imgui.h:1135 + /// , + /// imgui.cpp:10781 + ///
void SetNextFrameWantCaptureMouse(bool want_capture_mouse) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + public static unsafe void SetNextFrameWantCaptureMouse(bool wantCaptureMouse) => + PInvoke.SetNextFrameWantCaptureMouse(wantCaptureMouse); + + /// + /// + /// C++: + /// imgui.h:1139 + /// , + /// imgui.cpp:5065 + ///
const char* GetClipboardText() + ///
+ ///
+ /// + /// + /// Clipboard Utilities + /// - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard. + /// + /// + public static unsafe ImString GetClipboardText() => Utf8.GetNullTerminatedSpan(PInvoke.GetClipboardText()); + + /// + /// + /// C++: + /// imgui.h:1140 + /// , + /// imgui.cpp:5071 + ///
void SetClipboardText(const char* text) + ///
+ ///
+ /// + /// + /// Clipboard Utilities + /// - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard. + /// + /// + public static unsafe void SetClipboardText(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.SetClipboardText(text_fixed); + } + } + + /// + /// + /// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls + /// LoadIniSettingsFromDisk(io.IniFilename). + /// + /// + /// C++: + /// imgui.h:1146 + /// , + /// imgui.cpp:15837 + ///
void LoadIniSettingsFromDisk(const char* ini_filename) + ///
+ ///
+ /// + /// + /// Settings/.Ini Utilities + /// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). + /// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually. + /// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables). + /// + /// + public static unsafe void LoadIniSettingsFromDisk(ImString iniFilename) + { + fixed (byte* iniFilename_fixed = iniFilename) + { + PInvoke.LoadIniSettingsFromDisk(iniFilename_fixed); + } + } + + /// + /// + /// this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that + /// should be reflected in the .ini file (and also by DestroyContext). + /// + /// + /// C++: + /// imgui.h:1148 + /// , + /// imgui.cpp:15920 + ///
void SaveIniSettingsToDisk(const char* ini_filename) + ///
+ ///
+ /// + /// + /// Settings/.Ini Utilities + /// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). + /// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually. + /// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables). + /// + /// + public static unsafe void SaveIniSettingsToDisk(ImString iniFilename) + { + fixed (byte* iniFilename_fixed = iniFilename) + { + PInvoke.SaveIniSettingsToDisk(iniFilename_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:1153 + /// , + /// imgui.cpp:21509 + ///
void DebugTextEncoding(const char* text) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + /// Helper tool to diagnose between text encoding issues and font loading issues. Pass your UTF-8 string and + /// verify that there are correct. + /// + /// + public static unsafe void DebugTextEncoding(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.DebugTextEncoding(text_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:1154 + /// , + /// imgui.cpp:21555 + ///
void DebugFlashStyleColor(ImGuiCol idx) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + /// Flash a given style color for some + inhibit modifications of this color via PushStyleColor() calls. + /// + /// + public static unsafe void DebugFlashStyleColor(ImGuiCol idx) => PInvoke.DebugFlashStyleColor(idx); + + /// + /// + /// C++: + /// imgui.h:1155 + /// , + /// imgui.cpp:23442 + ///
void DebugStartItemPicker() + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + public static unsafe void DebugStartItemPicker() => PInvoke.DebugStartItemPicker(); + + /// + /// + /// This is called by IMGUI_CHECKVERSION() macro. + /// + /// + /// C++: + /// imgui.h:1156 + /// , + /// imgui.cpp:11187 + ///
+ /// bool DebugCheckVersionAndDataLayout(const char* version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + /// Verify ABI compatibility between caller code and compiled version of Dear ImGui. This helps detects some build issues. + /// Called by IMGUI_CHECKVERSION(). + /// Verify that the type sizes are matching between the calling file's compilation unit and imgui.cpp's compilation unit + /// If this triggers you have mismatched headers and compiled code versions. + /// - It could be because of a build issue (using new headers with old compiled code) + /// - It could be because of mismatched configuration #define, compilation settings, packing pragma etc. + /// THE CONFIGURATION SETTINGS MENTIONED IN imconfig.h MUST BE SET FOR ALL COMPILATION UNITS INVOLVED WITH DEAR IMGUI. + /// Which is why it is required you put them in your imconfig file (and NOT only before including imgui.h). + /// Otherwise it is possible that different compilation units would see different structure layout. + /// If you don't want to modify imconfig.h you can use the IMGUI_USER_CONFIG define to change filename. + /// + /// + public static unsafe bool DebugCheckVersionAndDataLayout( + ImString versionStr, + nuint szIo, + nuint szStyle, + nuint szVec2, + nuint szVec4, + nuint szDrawvert, + nuint szDrawidx + ) + { + fixed (byte* versionStr_fixed = versionStr) + { + return PInvoke.DebugCheckVersionAndDataLayout( + versionStr_fixed, + szIo, + szStyle, + szVec2, + szVec4, + szDrawvert, + szDrawidx + ); + } + } + + /// + /// + /// Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code! + /// + /// + /// C++: + /// imgui.h:1158 + /// , + /// imgui.cpp:23202 + ///
void DebugLog(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + public static unsafe void DebugLog(ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.DebugLog(text_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:1166 + /// , + /// imgui.cpp:4027 + ///
+ /// void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + public static unsafe void SetAllocatorFunctions( + ImGuiMemAllocFunc allocFunc, + ImGuiMemFreeFunc freeFunc, + Ptr userData = default + ) => + PInvoke.SetAllocatorFunctions( + Marshal.GetFunctionPointerForDelegate(allocFunc), + Marshal.GetFunctionPointerForDelegate(freeFunc), + userData + ); + + /// + /// + /// C++: + /// imgui.h:1166 + /// , + /// imgui.cpp:4027 + ///
+ /// void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + public static unsafe void SetAllocatorFunctions( + delegate* unmanaged[Cdecl] allocFunc, + delegate* unmanaged[Cdecl] freeFunc, + Ptr userData = default + ) => PInvoke.SetAllocatorFunctions((nint)allocFunc, (nint)freeFunc, userData); + + /// + /// + /// C++: + /// imgui.h:1168 + /// , + /// imgui.cpp:5018 + ///
void* MemAlloc(size_t size) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + /// IM_ALLOC() == ImGui::MemAlloc() + /// + /// + public static unsafe Ptr MemAlloc(nuint size) => PInvoke.MemAlloc(size); + + /// + /// + /// C++: + /// imgui.h:1169 + /// , + /// imgui.cpp:5029 + ///
void MemFree(void* ptr) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + /// IM_FREE() == ImGui::MemFree() + /// + /// + public static unsafe void MemFree(Ptr ptr) => PInvoke.MemFree(ptr); + + /// + /// + /// call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary + /// viewport, and DestroyWindow for each inactive viewport. + /// + /// + /// C++: + /// imgui.h:1174 + /// , + /// imgui.cpp:16926 + ///
void UpdatePlatformWindows() + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + /// Called by user at the end of the main loop, after EndFrame() + /// This will handle the creation/update of all OS windows via function defined in the ImGuiPlatformIO api. + /// + /// + public static unsafe void UpdatePlatformWindows() => PInvoke.UpdatePlatformWindows(); + + /// + /// + /// call in main loop. will call RenderWindow/SwapBuffers platform functions for each secondary viewport + /// which doesn't have the ImGuiViewportFlags_Minimized flag set. May be reimplemented by user for custom + /// rendering needs. + /// + /// + /// C++: + /// imgui.h:1175 + /// , + /// imgui.cpp:17038 + ///
+ /// void RenderPlatformWindowsDefault(void* platform_render_arg = NULL, void* renderer_render_arg = NULL) + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + public static unsafe void RenderPlatformWindowsDefault( + Ptr platformRenderArg = default, + Ptr rendererRenderArg = default + ) => PInvoke.RenderPlatformWindowsDefault(platformRenderArg, rendererRenderArg); + + /// + /// + /// call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to + /// close platform windows before imgui shutdown. otherwise will be called by DestroyContext(). + /// + /// + /// C++: + /// imgui.h:1176 + /// , + /// imgui.cpp:17148 + ///
void DestroyPlatformWindows() + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + public static unsafe void DestroyPlatformWindows() => PInvoke.DestroyPlatformWindows(); + + /// + /// + /// this is a helper for backends. + /// + /// + /// C++: + /// imgui.h:1177 + /// , + /// imgui.cpp:16177 + ///
ImGuiViewport* FindViewportByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + /// FIXME: This leaks access to viewports not listed in PlatformIO.Viewports[]. Problematic? (#4236) + /// + /// + public static unsafe ImGuiViewportPtr FindViewportByID(ImGuiID id) => PInvoke.FindViewportByID(id); + + /// + /// + /// this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, + /// GLFWwindow* etc.) + /// + /// + /// C++: + /// imgui.h:1178 + /// , + /// imgui.cpp:16186 + ///
ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle) + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + public static unsafe ImGuiViewportPtr FindViewportByPlatformHandle(Ptr platformHandle) => + PInvoke.FindViewportByPlatformHandle(platformHandle); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiIO.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiIO.gen.cs new file mode 100644 index 0000000..ba39565 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiIO.gen.cs @@ -0,0 +1,374 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiIOExtensions + { + /// + /// + /// Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key + /// end-user would use to emit an 'A' character) + /// + /// + /// C++: + /// imgui.h:2577 + /// , + /// imgui.cpp:1808 + ///
void AddKeyEvent(ImGuiKey key, bool down) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + public static unsafe void AddKeyEvent(this ImGuiIOPtr target, ImGuiKey key, bool down) => + PInvoke.ImGuiIO_AddKeyEvent(target, key, down); + + /// + /// + /// Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be + /// handled by the backend. + /// + /// + /// C++: + /// imgui.h:2578 + /// , + /// imgui.cpp:1768 + ///
void AddKeyAnalogEvent(ImGuiKey key, bool down, float v) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Queue a new key down/up event. + /// - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character) + /// - bool down: Is the key down? use false to signify a key release. + /// - float analog_value: 0.0f..1.0f + /// IMPORTANT: THIS FUNCTION AND OTHER "ADD" GRABS THE CONTEXT FROM OUR INSTANCE. + /// WE NEED TO ENSURE THAT ALL FUNCTION CALLS ARE FULFILLING THIS, WHICH IS WHY GetKeyData() HAS AN EXPLICIT CONTEXT. + /// + /// + public static unsafe void AddKeyAnalogEvent(this ImGuiIOPtr target, ImGuiKey key, bool down, float v) => + PInvoke.ImGuiIO_AddKeyAnalogEvent(target, key, down, v); + + /// + /// + /// Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not + /// hovered) + /// + /// + /// C++: + /// imgui.h:2579 + /// , + /// imgui.cpp:1837 + ///
void AddMousePosEvent(float x, float y) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Queue a mouse move event + /// + /// + public static unsafe void AddMousePosEvent(this ImGuiIOPtr target, float x, float y) => + PInvoke.ImGuiIO_AddMousePosEvent(target, x, y); + + /// + /// + /// Queue a mouse button change + /// + /// + /// C++: + /// imgui.h:2580 + /// , + /// imgui.cpp:1863 + ///
void AddMouseButtonEvent(int button, bool down) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + public static unsafe void AddMouseButtonEvent(this ImGuiIOPtr target, int button, bool down) => + PInvoke.ImGuiIO_AddMouseButtonEvent(target, button, down); + + /// + /// + /// Queue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll + /// right, wheel_x>0: scroll left. + /// + /// + /// C++: + /// imgui.h:2581 + /// , + /// imgui.cpp:1912 + ///
void AddMouseWheelEvent(float wheel_x, float wheel_y) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Queue a mouse wheel event (some mouse/API may only have a Y component) + /// + /// + public static unsafe void AddMouseWheelEvent(this ImGuiIOPtr target, float wheelX, float wheelY) => + PInvoke.ImGuiIO_AddMouseWheelEvent(target, wheelX, wheelY); + + /// + /// + /// Queue a mouse source change (Mouse/TouchScreen/Pen) + /// + /// + /// C++: + /// imgui.h:2582 + /// , + /// imgui.cpp:1933 + ///
void AddMouseSourceEvent(ImGuiMouseSource source) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// This is not a real event, the data is latched in order to be stored in actual Mouse events. + /// This is so that duplicate events (e.g. Windows sending extraneous WM_MOUSEMOVE) gets filtered and are not leading to actual source changes. + /// + /// + public static unsafe void AddMouseSourceEvent(this ImGuiIOPtr target, ImGuiMouseSource source) => + PInvoke.ImGuiIO_AddMouseSourceEvent(target, source); + + /// + /// + /// Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to + /// call this (for multi-viewport support). + /// + /// + /// C++: + /// imgui.h:2583 + /// , + /// imgui.cpp:1940 + ///
void AddMouseViewportEvent(ImGuiID id) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + public static unsafe void AddMouseViewportEvent(this ImGuiIOPtr target, ImGuiID id) => + PInvoke.ImGuiIO_AddMouseViewportEvent(target, id); + + /// + /// + /// Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window) + /// + /// + /// C++: + /// imgui.h:2584 + /// , + /// imgui.cpp:1961 + ///
void AddFocusEvent(bool focused) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + public static unsafe void AddFocusEvent(this ImGuiIOPtr target, bool focused) => + PInvoke.ImGuiIO_AddFocusEvent(target, focused); + + /// + /// + /// Queue a new character input + /// + /// + /// C++: + /// imgui.h:2585 + /// , + /// imgui.cpp:1629 + ///
void AddInputCharacter(unsigned int c) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Pass in translated ASCII characters for text input. + /// - with glfw you can get those from the callback set in glfwSetCharCallback() + /// - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message + /// FIXME: Should in theory be called "AddCharacterEvent()" to be consistent with new API + /// + /// + public static unsafe void AddInputCharacter(this ImGuiIOPtr target, uint c) => + PInvoke.ImGuiIO_AddInputCharacter(target, c); + + /// + /// + /// Queue a new character input from a UTF-16 character, it can be a surrogate + /// + /// + /// C++: + /// imgui.h:2586 + /// , + /// imgui.cpp:1646 + ///
void AddInputCharacterUTF16(ImWchar16 c) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// UTF16 strings use surrogate pairs to encode codepoints >= 0x10000, so + /// we should save the high surrogate. + /// + /// + public static unsafe void AddInputCharacterUTF16(this ImGuiIOPtr target, ushort c) => + PInvoke.ImGuiIO_AddInputCharacterUTF16(target, c); + + /// + /// + /// Queue a new characters input from a UTF-8 string + /// + /// + /// C++: + /// imgui.h:2587 + /// , + /// imgui.cpp:1680 + ///
void AddInputCharactersUTF8(const char* str) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + public static unsafe void AddInputCharactersUTF8(this ImGuiIOPtr target, ImString str) + { + fixed (byte* str_fixed = str) + { + PInvoke.ImGuiIO_AddInputCharactersUTF8(target, str_fixed); + } + } + + /// + /// + /// [Optional] Specify index for legacy <1.87 IsKeyXXX() functions with native indices + specify native + /// keycode, scancode. + /// + /// + /// C++: + /// imgui.h:2589 + /// , + /// imgui.cpp:1818 + ///
+ /// void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index = -1) + ///
+ ///
+ /// + /// + /// [Optional] Call after AddKeyEvent(). + /// Specify native keycode, scancode + Specify index for legacy <1.87 IsKeyXXX() functions with native indices. + /// If you are writing a backend in 2022 or don't use IsKeyXXX() with native values that are not ImGuiKey values, you can avoid calling this. + /// + /// + public static unsafe void SetKeyEventNativeData( + this ImGuiIOPtr target, + ImGuiKey key, + int nativeKeycode, + int nativeScancode, + int nativeLegacyIndex = -1 + ) => PInvoke.ImGuiIO_SetKeyEventNativeData(target, key, nativeKeycode, nativeScancode, nativeLegacyIndex); + + /// + /// + /// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog + /// boxes that are interrupting your application loop/refresh, and you want to disable events being queued + /// while your app is frozen. + /// + /// + /// C++: + /// imgui.h:2590 + /// , + /// imgui.cpp:1831 + ///
void SetAppAcceptingEvents(bool accepting_events) + ///
+ ///
+ /// + /// + /// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog + /// boxes that are interrupting your application loop/refresh, and you want to disable events being queued + /// while your app is frozen. + /// + /// + public static unsafe void SetAppAcceptingEvents(this ImGuiIOPtr target, bool acceptingEvents) => + PInvoke.ImGuiIO_SetAppAcceptingEvents(target, acceptingEvents); + + /// + /// + /// Clear all incoming events. + /// + /// + /// C++: + /// imgui.h:2591 + /// , + /// imgui.cpp:1693 + ///
void ClearEventsQueue() + ///
+ ///
+ /// + /// + /// Clear all incoming events. + /// + /// + public static unsafe void ClearEventsQueue(this ImGuiIOPtr target) => PInvoke.ImGuiIO_ClearEventsQueue(target); + + /// + /// + /// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all + /// keys/buttons. + /// + /// + /// C++: + /// imgui.h:2592 + /// , + /// imgui.cpp:1701 + ///
void ClearInputKeys() + ///
+ ///
+ /// + /// + /// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all + /// keys/buttons. + /// + /// + public static unsafe void ClearInputKeys(this ImGuiIOPtr target) => PInvoke.ImGuiIO_ClearInputKeys(target); + + /// + /// + /// Clear current mouse state. + /// + /// + /// C++: + /// imgui.h:2593 + /// , + /// imgui.cpp:1718 + ///
void ClearInputMouse() + ///
+ ///
+ public static unsafe void ClearInputMouse(this ImGuiIOPtr target) => PInvoke.ImGuiIO_ClearInputMouse(target); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiInputTextCallbackData.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiInputTextCallbackData.gen.cs new file mode 100644 index 0000000..fce0f97 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiInputTextCallbackData.gen.cs @@ -0,0 +1,104 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiInputTextCallbackDataExtensions + { + /// + /// + /// C++: + /// imgui.h:2726 + /// , + /// imgui_widgets.cpp:4274 + ///
void DeleteChars(int pos, int bytes_count) + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + /// Public API to manipulate UTF-8 text from within a callback. + /// FIXME: The existence of this rarely exercised code path is a bit of a nuisance. + /// Historically they existed because STB_TEXTEDIT_INSERTCHARS() etc. worked on our ImWchar + /// buffer, but nowadays they both work on UTF-8 data. Should aim to merge both. + /// + /// + public static unsafe void DeleteChars(this ImGuiInputTextCallbackDataPtr target, int pos, int bytesCount) => + PInvoke.ImGuiInputTextCallbackData_DeleteChars(target, pos, bytesCount); + + /// + /// + /// C++: + /// imgui.h:2727 + /// , + /// imgui_widgets.cpp:4290 + ///
void InsertChars(int pos, const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + public static unsafe void InsertChars(this ImGuiInputTextCallbackDataPtr target, int pos, ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.ImGuiInputTextCallbackData_InsertChars(target, pos, text_fixed, text_fixed + text.Length); + } + } + + /// + /// + /// C++: + /// imgui.h:2728 + ///
void SelectAll() + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + public static unsafe void SelectAll(this ImGuiInputTextCallbackDataPtr target) => + PInvoke.ImGuiInputTextCallbackData_SelectAll(target); + + /// + /// + /// C++: + /// imgui.h:2729 + ///
void ClearSelection() + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + public static unsafe void ClearSelection(this ImGuiInputTextCallbackDataPtr target) => + PInvoke.ImGuiInputTextCallbackData_ClearSelection(target); + + /// + /// + /// C++: + /// imgui.h:2730 + ///
bool HasSelection() const + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + public static unsafe bool HasSelection(this ImGuiInputTextCallbackDataPtr target) => + PInvoke.ImGuiInputTextCallbackData_HasSelection(target); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiListClipper.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiListClipper.gen.cs new file mode 100644 index 0000000..12194af --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiListClipper.gen.cs @@ -0,0 +1,160 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiListClipperExtensions + { + /// + /// + /// C++: + /// imgui.h:2946 + /// , + /// imgui.cpp:3212 + ///
void Begin(int items_count, float items_height = -1.0f) + ///
+ ///
+ /// + /// + /// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need) + /// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). + /// + /// + public static unsafe void Begin(this ref ImGuiListClipper target, int itemsCount, float itemsHeight = -1f) + { + fixed (ImGuiListClipper* target_fixed = &target) + { + PInvoke.ImGuiListClipper_Begin(target_fixed, itemsCount, itemsHeight); + } + } + + /// + /// + /// Automatically called on the last call of Step() that returns false. + /// + /// + /// C++: + /// imgui.h:2947 + /// , + /// imgui.cpp:3241 + ///
void End() + ///
+ ///
+ /// + /// + /// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need) + /// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). + /// + /// + public static unsafe void End(this ref ImGuiListClipper target) + { + fixed (ImGuiListClipper* target_fixed = &target) + { + PInvoke.ImGuiListClipper_End(target_fixed); + } + } + + /// + /// + /// Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw + /// those items. + /// + /// + /// C++: + /// imgui.h:2948 + /// , + /// imgui.cpp:3441 + ///
bool Step() + ///
+ ///
+ /// + /// + /// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need) + /// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). + /// + /// + public static unsafe bool Step(this ref ImGuiListClipper target) + { + fixed (ImGuiListClipper* target_fixed = &target) + { + return PInvoke.ImGuiListClipper_Step(target_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:2952 + ///
inline void IncludeItemByIndex(int item_index) + ///
+ ///
+ /// + /// + /// Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility. + /// (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range). + /// + /// + public static unsafe void IncludeItemByIndex(this ref ImGuiListClipper target, int itemIndex) + { + fixed (ImGuiListClipper* target_fixed = &target) + { + PInvoke.ImGuiListClipper_IncludeItemByIndex(target_fixed, itemIndex); + } + } + + /// + /// + /// item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped. + /// + /// + /// C++: + /// imgui.h:2953 + /// , + /// imgui.cpp:3264 + ///
void IncludeItemsByIndex(int item_begin, int item_end) + ///
+ ///
+ /// + /// + /// Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility. + /// (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range). + /// + /// + public static unsafe void IncludeItemsByIndex(this ref ImGuiListClipper target, int itemBegin, int itemEnd) + { + fixed (ImGuiListClipper* target_fixed = &target) + { + PInvoke.ImGuiListClipper_IncludeItemsByIndex(target_fixed, itemBegin, itemEnd); + } + } + + /// + /// + /// C++: + /// imgui.h:2958 + /// , + /// imgui.cpp:3275 + ///
void SeekCursorForItem(int item_index) + ///
+ ///
+ /// + /// + /// Seek cursor toward given item. This is automatically called while stepping. + /// - The only reason to call this is: you can use ImGuiListClipper::Begin(INT_MAX) if you don't know item count ahead of time. + /// - In this case, after all steps are done, you'll want to call SeekCursorForItem(item_count). + /// + /// + /// This is already called while stepping. + /// The ONLY reason you may want to call this is if you passed INT_MAX to ImGuiListClipper::Begin() because you couldn't step item count beforehand. + /// + /// + public static unsafe void SeekCursorForItem(this ref ImGuiListClipper target, int itemIndex) + { + fixed (ImGuiListClipper* target_fixed = &target) + { + PInvoke.ImGuiListClipper_SeekCursorForItem(target_fixed, itemIndex); + } + } + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiPayload.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiPayload.gen.cs new file mode 100644 index 0000000..a03f7b7 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiPayload.gen.cs @@ -0,0 +1,51 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiPayloadExtensions + { + /// + /// + /// C++: + /// imgui.h:2781 + ///
void Clear() + ///
+ ///
+ public static unsafe void Clear(this ImGuiPayloadPtr target) => PInvoke.ImGuiPayload_Clear(target); + + /// + /// + /// C++: + /// imgui.h:2782 + ///
bool IsDataType(const char* type) const + ///
+ ///
+ public static unsafe bool IsDataType(this ImGuiPayloadPtr target, ImString type) + { + fixed (byte* type_fixed = type) + { + return PInvoke.ImGuiPayload_IsDataType(target, type_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:2783 + ///
bool IsPreview() const + ///
+ ///
+ public static unsafe bool IsPreview(this ImGuiPayloadPtr target) => PInvoke.ImGuiPayload_IsPreview(target); + + /// + /// + /// C++: + /// imgui.h:2784 + ///
bool IsDelivery() const + ///
+ ///
+ public static unsafe bool IsDelivery(this ImGuiPayloadPtr target) => PInvoke.ImGuiPayload_IsDelivery(target); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiSelectionBasicStorage.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiSelectionBasicStorage.gen.cs new file mode 100644 index 0000000..24175b3 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiSelectionBasicStorage.gen.cs @@ -0,0 +1,185 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiSelectionBasicStorageExtensions + { + /// + /// + /// Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses + /// 'items_count' passed to BeginMultiSelect() + /// + /// + /// C++: + /// imgui.h:3174 + /// , + /// imgui_widgets.cpp:8359 + ///
void ApplyRequests(ImGuiMultiSelectIO* ms_io) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// Apply requests coming from BeginMultiSelect() and EndMultiSelect(). + /// - Enable 'Demo->Tools->Debug Log->Selection' to see selection requests as they happen. + /// - Honoring SetRange requests requires that you can iterate/interpolate between RangeFirstItem and RangeLastItem. + /// - In this demo we often submit indices to SetNextItemSelectionUserData() + store the same indices in persistent selection. + /// - Your code may do differently. If you store pointers or objects ID in ImGuiSelectionUserData you may need to perform + /// a lookup in order to have some way to iterate/interpolate between two items. + /// - A full-featured application is likely to allow search/filtering which is likely to lead to using indices + /// and constructing a view index <> object id/ptr data structure anyway. + /// WHEN YOUR APPLICATION SETTLES ON A CHOICE, YOU WILL PROBABLY PREFER TO GET RID OF THIS UNNECESSARY 'ImGuiSelectionBasicStorage' INDIRECTION LOGIC. + /// Notice that with the simplest adapter (using indices everywhere), all functions return their parameters. + /// The most simple implementation (using indices everywhere) would look like: + /// for (ImGuiSelectionRequest& req : ms_io->Requests) + /// { + /// if (req.Type == ImGuiSelectionRequestType_SetAll) { Clear(); if (req.Selected) { for (int n = 0; n < items_count; n++) { SetItemSelected(n, true); } } + /// if (req.Type == ImGuiSelectionRequestType_SetRange) { for (int n = (int)ms_io->RangeFirstItem; n <= (int)ms_io->RangeLastItem; n++) { SetItemSelected(n, ms_io->Selected); } } + /// } + /// + /// + public static unsafe void ApplyRequests( + this ImGuiSelectionBasicStoragePtr target, + ImGuiMultiSelectIOPtr msIo + ) => PInvoke.ImGuiSelectionBasicStorage_ApplyRequests(target, msIo); + + /// + /// + /// Query if an item id is in selection. + /// + /// + /// C++: + /// imgui.h:3175 + /// , + /// imgui_widgets.cpp:8280 + ///
bool Contains(ImGuiID id) const + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe bool Contains(this ImGuiSelectionBasicStoragePtr target, ImGuiID id) => + PInvoke.ImGuiSelectionBasicStorage_Contains(target, id); + + /// + /// + /// Clear selection + /// + /// + /// C++: + /// imgui.h:3176 + /// , + /// imgui_widgets.cpp:8266 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe void Clear(this ImGuiSelectionBasicStoragePtr target) => + PInvoke.ImGuiSelectionBasicStorage_Clear(target); + + /// + /// + /// Swap two selections + /// + /// + /// C++: + /// imgui.h:3177 + /// , + /// imgui_widgets.cpp:8273 + ///
void Swap(ImGuiSelectionBasicStorage& r) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe void Swap(this ImGuiSelectionBasicStoragePtr target, ImGuiSelectionBasicStoragePtr r) => + PInvoke.ImGuiSelectionBasicStorage_Swap(target, r); + + /// + /// + /// Add/remove an item from selection (generally done by ApplyRequests() function) + /// + /// + /// C++: + /// imgui.h:3178 + /// , + /// imgui_widgets.cpp:8314 + ///
void SetItemSelected(ImGuiID id, bool selected) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe void SetItemSelected( + this ImGuiSelectionBasicStoragePtr target, + ImGuiID id, + bool selected + ) => PInvoke.ImGuiSelectionBasicStorage_SetItemSelected(target, id, selected); + + /// + /// + /// Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, + /// &id)) { ... }' + /// + /// + /// C++: + /// imgui.h:3179 + /// , + /// imgui_widgets.cpp:8294 + ///
bool GetNextSelectedItem(void** opaque_it, ImGuiID* out_id) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// GetNextSelectedItem() is an abstraction allowing us to change our underlying actual storage system without impacting user. + /// (e.g. store unselected vs compact down, compact down on demand, use raw ImVector<ImGuiID> instead of ImGuiStorage...) + /// + /// + public static unsafe bool GetNextSelectedItem( + this ImGuiSelectionBasicStoragePtr target, + Ptr opaqueIt, + out ImGuiID outId + ) + { + fixed (ImGuiID* outId_fixed = &outId) + { + return PInvoke.ImGuiSelectionBasicStorage_GetNextSelectedItem(target, (void**)opaqueIt, outId_fixed); + } + } + + /// + /// + /// Convert index to item id based on provided adapter. + /// + /// + /// C++: + /// imgui.h:3180 + ///
inline ImGuiID GetStorageIdFromIndex(int idx) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + public static unsafe ImGuiID GetStorageIdFromIndex(this ImGuiSelectionBasicStoragePtr target, int idx) => + PInvoke.ImGuiSelectionBasicStorage_GetStorageIdFromIndex(target, idx); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiSelectionExternalStorage.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiSelectionExternalStorage.gen.cs new file mode 100644 index 0000000..a57cb34 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiSelectionExternalStorage.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiSelectionExternalStorageExtensions + { + /// + /// + /// Apply selection requests by using AdapterSetItemSelected() calls + /// + /// + /// C++: + /// imgui.h:3193 + /// , + /// imgui_widgets.cpp:8428 + ///
void ApplyRequests(ImGuiMultiSelectIO* ms_io) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// Apply requests coming from BeginMultiSelect() and EndMultiSelect(). + /// We also pull 'ms_io->ItemsCount' as passed for BeginMultiSelect() for consistency with ImGuiSelectionBasicStorage + /// This makes no assumption about underlying storage. + /// + /// + public static unsafe void ApplyRequests( + this ImGuiSelectionExternalStoragePtr target, + ImGuiMultiSelectIOPtr msIo + ) => PInvoke.ImGuiSelectionExternalStorage_ApplyRequests(target, msIo); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiStorage.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiStorage.gen.cs new file mode 100644 index 0000000..b102af5 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiStorage.gen.cs @@ -0,0 +1,310 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiStorageExtensions + { + /// + /// + /// C++: + /// imgui.h:2882 + ///
void Clear() + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe void Clear(this ImGuiStoragePtr target) => PInvoke.ImGuiStorage_Clear(target); + + /// + /// + /// C++: + /// imgui.h:2883 + /// , + /// imgui.cpp:2862 + ///
int GetInt(ImGuiID key, int default_val = 0) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe int GetInt(this ImGuiStoragePtr target, ImGuiID key, int defaultVal = 0) => + PInvoke.ImGuiStorage_GetInt(target, key, defaultVal); + + /// + /// + /// C++: + /// imgui.h:2884 + /// , + /// imgui.cpp:2922 + ///
void SetInt(ImGuiID key, int val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + /// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad + /// because it only happens on explicit interaction (maximum one a frame) + /// + /// + public static unsafe void SetInt(this ImGuiStoragePtr target, ImGuiID key, int val) => + PInvoke.ImGuiStorage_SetInt(target, key, val); + + /// + /// + /// C++: + /// imgui.h:2885 + /// , + /// imgui.cpp:2870 + ///
bool GetBool(ImGuiID key, bool default_val = false) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe bool GetBool(this ImGuiStoragePtr target, ImGuiID key, bool defaultVal = false) => + PInvoke.ImGuiStorage_GetBool(target, key, defaultVal); + + /// + /// + /// C++: + /// imgui.h:2886 + /// , + /// imgui.cpp:2931 + ///
void SetBool(ImGuiID key, bool val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe void SetBool(this ImGuiStoragePtr target, ImGuiID key, bool val) => + PInvoke.ImGuiStorage_SetBool(target, key, val); + + /// + /// + /// C++: + /// imgui.h:2887 + /// , + /// imgui.cpp:2875 + ///
float GetFloat(ImGuiID key, float default_val = 0.0f) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe float GetFloat(this ImGuiStoragePtr target, ImGuiID key, float defaultVal = 0f) => + PInvoke.ImGuiStorage_GetFloat(target, key, defaultVal); + + /// + /// + /// C++: + /// imgui.h:2888 + /// , + /// imgui.cpp:2936 + ///
void SetFloat(ImGuiID key, float val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe void SetFloat(this ImGuiStoragePtr target, ImGuiID key, float val) => + PInvoke.ImGuiStorage_SetFloat(target, key, val); + + /// + /// + /// default_val is NULL + /// + /// + /// C++: + /// imgui.h:2889 + /// , + /// imgui.cpp:2883 + ///
void* GetVoidPtr(ImGuiID key) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe Ptr GetVoidPtr(this ImGuiStoragePtr target, ImGuiID key) => + PInvoke.ImGuiStorage_GetVoidPtr(target, key); + + /// + /// + /// C++: + /// imgui.h:2890 + /// , + /// imgui.cpp:2945 + ///
void SetVoidPtr(ImGuiID key, void* val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + public static unsafe void SetVoidPtr(this ImGuiStoragePtr target, ImGuiID key, Ptr val) => + PInvoke.ImGuiStorage_SetVoidPtr(target, key, val); + + /// + /// + /// C++: + /// imgui.h:2896 + /// , + /// imgui.cpp:2892 + ///
int* GetIntRef(ImGuiID key, int default_val = 0) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + /// References are only valid until a new value is added to the storage. Calling a Set***() function or a + /// Get***Ref() function invalidates the pointer. + /// + /// + public static unsafe ref int GetIntRef(this ImGuiStoragePtr target, ImGuiID key, int defaultVal = 0) => + ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetIntRef(target, key, defaultVal)); + + /// + /// + /// C++: + /// imgui.h:2897 + /// , + /// imgui.cpp:2900 + ///
bool* GetBoolRef(ImGuiID key, bool default_val = false) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + public static unsafe ref bool GetBoolRef(this ImGuiStoragePtr target, ImGuiID key, bool defaultVal = false) => + ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetBoolRef(target, key, defaultVal)); + + /// + /// + /// C++: + /// imgui.h:2898 + /// , + /// imgui.cpp:2905 + ///
float* GetFloatRef(ImGuiID key, float default_val = 0.0f) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + public static unsafe ref float GetFloatRef(this ImGuiStoragePtr target, ImGuiID key, float defaultVal = 0f) => + ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetFloatRef(target, key, defaultVal)); + + /// + /// + /// C++: + /// imgui.h:2899 + /// , + /// imgui.cpp:2913 + ///
void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + public static unsafe ref Ptr GetVoidPtrRef( + this ImGuiStoragePtr target, + ImGuiID key, + Ptr defaultVal = default + ) => ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetVoidPtrRef(target, key, defaultVal)); + + /// + /// + /// C++: + /// imgui.h:2902 + /// , + /// imgui.cpp:2857 + ///
void BuildSortByKey() + ///
+ ///
+ /// + /// + /// Advanced: for quicker full rebuild of a storage (instead of an incremental one), you may add all your + /// contents and then sort once. + /// + /// + /// For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and + /// then sort once. + /// + /// + public static unsafe void BuildSortByKey(this ImGuiStoragePtr target) => + PInvoke.ImGuiStorage_BuildSortByKey(target); + + /// + /// + /// C++: + /// imgui.h:2904 + /// , + /// imgui.cpp:2954 + ///
void SetAllInt(int val) + ///
+ ///
+ /// + /// + /// Obsolete: use on your own storage if you know only integer are being stored (open/close all tree nodes) + /// + /// + public static unsafe void SetAllInt(this ImGuiStoragePtr target, int val) => + PInvoke.ImGuiStorage_SetAllInt(target, val); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiStyle.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiStyle.gen.cs new file mode 100644 index 0000000..526e766 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiStyle.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiStyleExtensions + { + /// + /// + /// Scale all spacing/padding/thickness values. Do not scale fonts. + /// + /// + /// C++: + /// imgui.h:2408 + /// , + /// imgui.cpp:1494 + ///
void ScaleAllSizes(float scale_factor) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Scale all spacing/padding/thickness values. Do not scale fonts. + /// Important: This operation is lossy because we round all sizes to integer. If you need to change your scale multiples, call this over a freshly initialized ImGuiStyle structure rather than scaling multiple times. + /// + /// + public static unsafe void ScaleAllSizes(this ImGuiStylePtr target, float scaleFactor) => + PInvoke.ImGuiStyle_ScaleAllSizes(target, scaleFactor); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiTextFilter.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiTextFilter.gen.cs new file mode 100644 index 0000000..6cb77f1 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiTextFilter.gen.cs @@ -0,0 +1,133 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiTextFilterExtensions + { + /// + /// + /// Helper calling InputText+Build + /// + /// + /// C++: + /// imgui.h:2812 + /// , + /// imgui.cpp:2977 + ///
bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f) + ///
+ ///
+ /// Default value if unset: "Filter (inc,-exc)" + /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + public static unsafe bool Draw( + this ref ImGuiTextFilter target, + [System.ComponentModel.DefaultValue("Filter (inc,-exc)")] ImString label = default, + float width = 0f + ) + { + if (label.IsUnset) + { + label = "Filter (inc,-exc)"u8; + } + fixed (byte* label_fixed = label) + { + fixed (ImGuiTextFilter* target_fixed = &target) + { + return PInvoke.ImGuiTextFilter_Draw(target_fixed, label_fixed, width); + } + } + } + + /// + /// + /// C++: + /// imgui.h:2813 + /// , + /// imgui.cpp:3025 + ///
bool PassFilter(const char* text, const char* text_end = NULL) const + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + public static unsafe bool PassFilter(this ref ImGuiTextFilter target, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (ImGuiTextFilter* target_fixed = &target) + { + return PInvoke.ImGuiTextFilter_PassFilter(target_fixed, text_fixed, text_fixed + text.Length); + } + } + } + + /// + /// + /// C++: + /// imgui.h:2814 + /// , + /// imgui.cpp:3005 + ///
void Build() + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + public static unsafe void Build(this ref ImGuiTextFilter target) + { + fixed (ImGuiTextFilter* target_fixed = &target) + { + PInvoke.ImGuiTextFilter_Build(target_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:2815 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + public static unsafe void Clear(this ref ImGuiTextFilter target) + { + fixed (ImGuiTextFilter* target_fixed = &target) + { + PInvoke.ImGuiTextFilter_Clear(target_fixed); + } + } + + /// + /// + /// C++: + /// imgui.h:2816 + ///
bool IsActive() const + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + public static unsafe bool IsActive(this ref ImGuiTextFilter target) + { + fixed (ImGuiTextFilter* target_fixed = &target) + { + return PInvoke.ImGuiTextFilter_IsActive(target_fixed); + } + } + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImGuiViewport.gen.cs b/Brutal.ImGui/Generated/Functions/ImGuiViewport.gen.cs new file mode 100644 index 0000000..b989b51 --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImGuiViewport.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImGuiViewportExtensions + { + /// + /// + /// C++: + /// imgui.h:4048 + ///
ImVec2 GetCenter() const + ///
+ ///
+ /// + /// + /// Helpers + /// + /// + public static unsafe float2 GetCenter(this ImGuiViewportPtr target) => PInvoke.ImGuiViewport_GetCenter(target); + + /// + /// + /// C++: + /// imgui.h:4049 + ///
ImVec2 GetWorkCenter() const + ///
+ ///
+ /// + /// + /// Helpers + /// + /// + public static unsafe float2 GetWorkCenter(this ImGuiViewportPtr target) => + PInvoke.ImGuiViewport_GetWorkCenter(target); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImTextureData.gen.cs b/Brutal.ImGui/Generated/Functions/ImTextureData.gen.cs new file mode 100644 index 0000000..22690ff --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImTextureData.gen.cs @@ -0,0 +1,167 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImTextureDataExtensions + { + /// + /// + /// C++: + /// imgui.h:3588 + /// , + /// imgui_draw.cpp:2463 + ///
void Create(ImTextureFormat format, int w, int h) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe void Create(this ImTextureDataPtr target, ImTextureFormat format, int w, int h) => + PInvoke.ImTextureData_Create(target, format, w, h); + + /// + /// + /// C++: + /// imgui.h:3589 + /// , + /// imgui_draw.cpp:2481 + ///
void DestroyPixels() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe void DestroyPixels(this ImTextureDataPtr target) => + PInvoke.ImTextureData_DestroyPixels(target); + + /// + /// + /// C++: + /// imgui.h:3590 + ///
void* GetPixels() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe Ptr GetPixels(this ImTextureDataPtr target) => PInvoke.ImTextureData_GetPixels(target); + + /// + /// + /// C++: + /// imgui.h:3591 + ///
void* GetPixelsAt(int x, int y) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe Ptr GetPixelsAt(this ImTextureDataPtr target, int x, int y) => + PInvoke.ImTextureData_GetPixelsAt(target, x, y); + + /// + /// + /// C++: + /// imgui.h:3592 + ///
int GetSizeInBytes() const + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe int GetSizeInBytes(this ImTextureDataPtr target) => + PInvoke.ImTextureData_GetSizeInBytes(target); + + /// + /// + /// C++: + /// imgui.h:3593 + ///
int GetPitch() const + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe int GetPitch(this ImTextureDataPtr target) => PInvoke.ImTextureData_GetPitch(target); + + /// + /// + /// C++: + /// imgui.h:3594 + ///
ImTextureRef GetTexRef() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe ImTextureRef GetTexRef(this ImTextureDataPtr target) => + PInvoke.ImTextureData_GetTexRef(target); + + /// + /// + /// C++: + /// imgui.h:3595 + ///
ImTextureID GetTexID() const + ///
+ ///
+ /// + /// + /// Functions + /// + /// + public static unsafe ImTextureID GetTexID(this ImTextureDataPtr target) => + PInvoke.ImTextureData_GetTexID(target); + + /// + /// + /// Call after creating or destroying the texture. Never modify TexID directly! + /// + /// + /// C++: + /// imgui.h:3598 + ///
void SetTexID(ImTextureID tex_id) + ///
+ ///
+ /// + /// + /// Called by Renderer backend + /// + /// + public static unsafe void SetTexID(this ImTextureDataPtr target, ImTextureID texId) => + PInvoke.ImTextureData_SetTexID(target, texId); + + /// + /// + /// Call after honoring a request. Never modify Status directly! + /// + /// + /// C++: + /// imgui.h:3599 + ///
void SetStatus(ImTextureStatus status) + ///
+ ///
+ /// + /// + /// Called by Renderer backend + /// + /// + public static unsafe void SetStatus(this ImTextureDataPtr target, ImTextureStatus status) => + PInvoke.ImTextureData_SetStatus(target, status); + } +} diff --git a/Brutal.ImGui/Generated/Functions/ImTextureRef.gen.cs b/Brutal.ImGui/Generated/Functions/ImTextureRef.gen.cs new file mode 100644 index 0000000..26b947a --- /dev/null +++ b/Brutal.ImGui/Generated/Functions/ImTextureRef.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class ImTextureRefExtensions + { + /// + /// + /// == (_TexData ? _TexData->TexID : _TexID) // Implemented below in the file. + /// + /// + /// C++: + /// imgui.h:377 + ///
inline ImTextureID GetTexID() const + ///
+ ///
+ public static unsafe ImTextureID GetTexID(this ImTextureRefPtr target) => PInvoke.ImTextureRef_GetTexID(target); + } +} diff --git a/Brutal.ImGui/Generated/InlineArrays.gen.cs b/Brutal.ImGui/Generated/InlineArrays.gen.cs new file mode 100644 index 0000000..afcf360 --- /dev/null +++ b/Brutal.ImGui/Generated/InlineArrays.gen.cs @@ -0,0 +1,116 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi.InlineArrays +{ + /// + /// Represents an inline array of byte with a fixed size of 17. + /// + [InlineArray(17)] + public struct byte_17 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte Items; + } + + /// + /// Represents an inline array of float4 with a fixed size of 33. + /// + [InlineArray(33)] + public struct float4_33 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float4 Items; + } + + /// + /// Represents an inline array of ImGuiKeyOwnerData with a fixed size of 155. + /// + [InlineArray(155)] + public struct ImGuiKeyOwnerData_155 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImGuiKeyOwnerData Items; + } + + /// + /// Represents an inline array of Ptr<byte> with a fixed size of 13. + /// + [InlineArray(13)] + public struct Ptr_byte__13 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public Ptr Items; + } + + /// + /// Represents an inline array of Bool8 with a fixed size of 5. + /// + [InlineArray(5)] + public struct Bool8_5 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public Bool8 Items; + } + + /// + /// Represents an inline array of ImGuiKeyData with a fixed size of 155. + /// + [InlineArray(155)] + public struct ImGuiKeyData_155 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImGuiKeyData Items; + } + + /// + /// Represents an inline array of float2 with a fixed size of 5. + /// + [InlineArray(5)] + public struct float2_5 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float2 Items; + } + + /// + /// Represents an inline array of ushort with a fixed size of 5. + /// + [InlineArray(5)] + public struct ushort_5 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ushort Items; + } + + /// + /// Represents an inline array of float4 with a fixed size of 60. + /// + [InlineArray(60)] + public struct float4_60 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float4 Items; + } +} diff --git a/Brutal.ImGui/Generated/Macros.gen.cs b/Brutal.ImGui/Generated/Macros.gen.cs new file mode 100644 index 0000000..7f40af4 --- /dev/null +++ b/Brutal.ImGui/Generated/Macros.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public static partial class Constants + { + public const string IMGUI_VERSION = "1.92.2"; + public const int IMGUI_VERSION_NUM = 19220; + public const string IMGUI_PAYLOAD_TYPE_COLOR_3F = "_COL3F"; + public const string IMGUI_PAYLOAD_TYPE_COLOR_4F = "_COL4F"; + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/AcceptDragDropPayload.gen.cs b/Brutal.ImGui/Generated/PInvoke/AcceptDragDropPayload.gen.cs new file mode 100644 index 0000000..40621e1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/AcceptDragDropPayload.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into + /// the payload before the mouse button is released. + /// + /// + /// C++: + /// imgui.h:1000 + /// , + /// imgui.cpp:15418 + ///
+ /// const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiPayload* AcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/AlignTextToFramePadding.gen.cs b/Brutal.ImGui/Generated/PInvoke/AlignTextToFramePadding.gen.cs new file mode 100644 index 0000000..a24f66f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/AlignTextToFramePadding.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// vertically align upcoming text baseline to FramePadding.y so that it will align properly to + /// regularly framed items (call if you have text on a line before a framed item) + /// + /// + /// C++: + /// imgui.h:593 + /// , + /// imgui_widgets.cpp:1608 + ///
void AlignTextToFramePadding() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void AlignTextToFramePadding(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ArrowButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/ArrowButton.gen.cs new file mode 100644 index 0000000..849fa1f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ArrowButton.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// square button with an arrow shape + /// + /// + /// C++: + /// imgui.h:642 + /// , + /// imgui_widgets.cpp:879 + ///
bool ArrowButton(const char* str_id, ImGuiDir dir) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ArrowButton(byte* str_id, ImGuiDir dir); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Begin.gen.cs b/Brutal.ImGui/Generated/PInvoke/Begin.gen.cs new file mode 100644 index 0000000..f20ff96 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Begin.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:439 + /// , + /// imgui.cpp:7571 + ///
bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Windows + /// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack. + /// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window, + /// which clicking will set the boolean to false when clicked. + /// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times. + /// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin(). + /// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value! + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// - Note that the bottom of window stack always contains a window called "Debug". + /// + /// + /// Push a new Dear ImGui window to add widgets to. + /// - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair. + /// - Begin/End can be called multiple times during the frame with the same window name to append content. + /// - The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file). + /// You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file. + /// - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned. + /// - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Begin(byte* name, Bool8* p_open, ImGuiWindowFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginChild.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginChild.gen.cs new file mode 100644 index 0000000..6e6fd9d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginChild.gen.cs @@ -0,0 +1,96 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:460 + /// , + /// imgui.cpp:6471 + ///
+ /// bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0) + ///
+ ///
+ /// + /// + /// Child Windows + /// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. + /// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + /// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true. + /// Consider updating your old code: + /// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + /// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders); + /// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + /// == 0.0f: use remaining parent window size for this axis. + /// > 0.0f: use specified size for this axis. + /// < 0.0f: right/bottom-align to specified distance from available content boundaries. + /// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + /// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + /// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// + /// + /// Prior to v1.90 2023/10/16, the BeginChild() function took a 'bool border = false' parameter instead of 'ImGuiChildFlags child_flags = 0'. + /// ImGuiChildFlags_Borders is defined as always == 1 in order to allow old code passing 'true'. Read comments in imgui.h for details! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginChild_0( + byte* str_id, + float2* size, + ImGuiChildFlags child_flags, + ImGuiWindowFlags window_flags + ); + + /// + /// + /// C++: + /// imgui.h:461 + /// , + /// imgui.cpp:6477 + ///
+ /// bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0) + ///
+ ///
+ /// + /// + /// Child Windows + /// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. + /// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + /// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true. + /// Consider updating your old code: + /// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + /// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders); + /// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + /// == 0.0f: use remaining parent window size for this axis. + /// > 0.0f: use specified size for this axis. + /// < 0.0f: right/bottom-align to specified distance from available content boundaries. + /// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + /// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + /// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginChild_1( + ImGuiID id, + float2* size, + ImGuiChildFlags child_flags, + ImGuiWindowFlags window_flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginCombo.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginCombo.gen.cs new file mode 100644 index 0000000..ea81c68 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginCombo.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:666 + /// , + /// imgui_widgets.cpp:1904 + ///
bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginCombo(byte* label, byte* preview_value, ImGuiComboFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginDisabled.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginDisabled.gen.cs new file mode 100644 index 0000000..95e6a14 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginDisabled.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1009 + /// , + /// imgui.cpp:8619 + ///
void BeginDisabled(bool disabled = true) + ///
+ ///
+ /// + /// + /// Disabling [BETA API] + /// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors) + /// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) + /// - Tooltips windows by exception are opted out of disabling. + /// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) + /// + /// + /// BeginDisabled()/EndDisabled() + /// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) + /// - Visually this is currently altering alpha, but it is expected that in a future styling system this would work differently. + /// - Feedback welcome at https://github.com/ocornut/imgui/issues/211 + /// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions. + /// (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) + /// - Note: mixing up BeginDisabled() and PushItemFlag(ImGuiItemFlags_Disabled) is currently NOT SUPPORTED. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginDisabled(Bool8 disabled); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginDragDropSource.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginDragDropSource.gen.cs new file mode 100644 index 0000000..09eb710 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginDragDropSource.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call after submitting an item which may be dragged. when this return true, you can call + /// SetDragDropPayload() + EndDragDropSource() + /// + /// + /// C++: + /// imgui.h:996 + /// , + /// imgui.cpp:15174 + ///
bool BeginDragDropSource(ImGuiDragDropFlags flags = 0) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + /// When this returns true you need to: a) call SetDragDropPayload() exactly once, b) you may render the payload visual/description, c) call EndDragDropSource() + /// If the item has an identifier: + /// - This assume/require the item to be activated (typically via ButtonBehavior). + /// - Therefore if you want to use this with a mouse button other than left mouse button, it is up to the item itself to activate with another button. + /// - We then pull and use the mouse button that was used to activate the item and use it to carry on the drag. + /// If the item has no identifier: + /// - Currently always assume left mouse button. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginDragDropSource(ImGuiDragDropFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginDragDropTarget.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginDragDropTarget.gen.cs new file mode 100644 index 0000000..5897b88 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginDragDropTarget.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call after submitting an item that may receive a payload. If this returns true, you can call + /// AcceptDragDropPayload() + EndDragDropTarget() + /// + /// + /// C++: + /// imgui.h:999 + /// , + /// imgui.cpp:15381 + ///
bool BeginDragDropTarget() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + /// We don't use BeginDragDropTargetCustom() and duplicate its code because: + /// 1) we use LastItemData's ImGuiItemStatusFlags_HoveredRect which handles items that push a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them. + /// 2) and it's faster. as this code may be very frequently called, we want to early out as fast as we can. + /// Also note how the HoveredWindow test is positioned differently in both functions (in both functions we optimize for the cheapest early out case) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginDragDropTarget(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginGroup.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginGroup.gen.cs new file mode 100644 index 0000000..57d97a8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginGroup.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// lock horizontal starting position + /// + /// + /// C++: + /// imgui.h:591 + /// , + /// imgui.cpp:12097 + ///
void BeginGroup() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + /// Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) + /// Groups are currently a mishmash of functionalities which should perhaps be clarified and separated. + /// FIXME-OPT: Could we safely early out on ->SkipItems? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BeginGroup(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginItemTooltip.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginItemTooltip.gen.cs new file mode 100644 index 0000000..4c7b916 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginItemTooltip.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// begin/append a tooltip window if preceding item was hovered. + /// + /// + /// C++: + /// imgui.h:838 + /// , + /// imgui.cpp:12443 + ///
bool BeginItemTooltip() + ///
+ ///
+ /// + /// + /// Tooltips: helpers for showing a tooltip when hovering an item + /// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom. + /// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom. + /// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginItemTooltip(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginListBox.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginListBox.gen.cs new file mode 100644 index 0000000..de09fd1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginListBox.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// open a framed scrolling region + /// + /// + /// C++: + /// imgui.h:792 + /// , + /// imgui_widgets.cpp:8455 + ///
bool BeginListBox(const char* label, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: List Boxes + /// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. + /// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. + /// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created. + /// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth + /// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items + /// + /// + /// This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// This handle some subtleties with capturing info from the label. + /// If you don't need a label you can pretty much directly use ImGui::BeginChild() with ImGuiChildFlags_FrameStyle. + /// Tip: To have a list filling the entire window width, use size.x = -FLT_MIN and pass an non-visible label e.g. "##empty" + /// Tip: If your vertical size is calculated from an item count (e.g. 10 * item_height) consider adding a fractional part to facilitate seeing scrolling boundaries (e.g. 10.5f * item_height). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginListBox(byte* label, float2* size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginMainMenuBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginMainMenuBar.gen.cs new file mode 100644 index 0000000..df71a0f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginMainMenuBar.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create and append to a full screen menu-bar. + /// + /// + /// C++: + /// imgui.h:818 + /// , + /// imgui_widgets.cpp:8948 + ///
bool BeginMainMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginMainMenuBar(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginMenu.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginMenu.gen.cs new file mode 100644 index 0000000..7cf34e1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginMenu.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create a sub-menu entry. only call EndMenu() if this returns true! + /// + /// + /// C++: + /// imgui.h:820 + /// , + /// imgui_widgets.cpp:9232 + ///
bool BeginMenu(const char* label, bool enabled = true) + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginMenu(byte* label, Bool8 enabled); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginMenuBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginMenuBar.gen.cs new file mode 100644 index 0000000..71fde86 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginMenuBar.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window). + /// + /// + /// C++: + /// imgui.h:816 + /// , + /// imgui_widgets.cpp:8823 + ///
bool BeginMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + /// FIXME: Provided a rectangle perhaps e.g. a BeginMenuBarEx() could be used anywhere.. + /// Currently the main responsibility of this function being to setup clip-rect + horizontal layout + menu navigation layer. + /// Ideally we also want this to be responsible for claiming space out of the main window scrolling rectangle, in which case ImGuiWindowFlags_MenuBar will become unnecessary. + /// Then later the same system could be used for multiple menu-bars, scrollbars, side-bars. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginMenuBar(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginMultiSelect.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginMultiSelect.gen.cs new file mode 100644 index 0000000..f4bf33c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginMultiSelect.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:780 + /// , + /// imgui_widgets.cpp:7715 + ///
+ /// ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1) + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + /// Return ImGuiMultiSelectIO structure. + /// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect(). + /// Passing 'selection_size' and 'items_count' parameters is currently optional. + /// - 'selection_size' is useful to disable some shortcut routing: e.g. ImGuiMultiSelectFlags_ClearOnEscape won't claim Escape key when selection_size 0, + /// allowing a first press to clear selection THEN the second press to leave child window and return to parent. + /// - 'items_count' is stored in ImGuiMultiSelectIO which makes it a convenient way to pass the information to your ApplyRequest() handler (but you may pass it differently). + /// - If they are costly for you to compute (e.g. external intrusive selection without maintaining size), you may avoid them and pass -1. + /// - If you can easily tell if your selection is empty or not, you may pass 0/1, or you may enable ImGuiMultiSelectFlags_ClearOnEscape flag dynamically. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiMultiSelectIO* BeginMultiSelect( + ImGuiMultiSelectFlags flags, + int selection_size, + int items_count + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginPopup.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginPopup.gen.cs new file mode 100644 index 0000000..947a7ea --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginPopup.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return true if the popup is open, and you can start outputting to it. + /// + /// + /// C++: + /// imgui.h:852 + /// , + /// imgui.cpp:12871 + ///
bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopup(byte* str_id, ImGuiWindowFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginPopupContextItem.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginPopupContextItem.gen.cs new file mode 100644 index 0000000..d923d39 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginPopupContextItem.gen.cs @@ -0,0 +1,56 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous + /// item. If you want to use that on a non-interactive item such as Text() you need to pass in an + /// explicit ID here. read comments in .cpp! + /// + /// + /// C++: + /// imgui.h:874 + /// , + /// imgui.cpp:12975 + ///
bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open+begin combined functions helpers + /// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking. + /// - They are convenient to easily create context menus, hence the name. + /// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future. + /// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight. + /// + /// + /// This is a helper to handle the simplest case of associating one named popup to one given widget. + /// - To create a popup associated to the last item, you generally want to pass a NULL value to str_id. + /// - To create a popup with a specific identifier, pass it in str_id. + /// - This is useful when using using BeginPopupContextItem() on an item which doesn't have an identifier, e.g. a Text() call. + /// - This is useful when multiple code locations may want to manipulate/open the same popup, given an explicit id. + /// - You may want to handle the whole on user side if you have specific needs (e.g. tweaking IsItemHovered() parameters). + /// This is essentially the same as: + /// id = str_id ? GetID(str_id) : GetItemID(); + /// OpenPopupOnItemClick(str_id, ImGuiPopupFlags_MouseButtonRight); + /// return BeginPopup(id); + /// Which is essentially the same as: + /// id = str_id ? GetID(str_id) : GetItemID(); + /// if (IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right)) + /// OpenPopup(id); + /// return BeginPopup(id); + /// The main difference being that this is tweaked to avoid computing the ID twice. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopupContextItem(byte* str_id, ImGuiPopupFlags popup_flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginPopupContextVoid.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginPopupContextVoid.gen.cs new file mode 100644 index 0000000..1ff4add --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginPopupContextVoid.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// open+begin popup when clicked in void (where there are no windows). + /// + /// + /// C++: + /// imgui.h:876 + /// , + /// imgui.cpp:13003 + ///
bool BeginPopupContextVoid(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open+begin combined functions helpers + /// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking. + /// - They are convenient to easily create context menus, hence the name. + /// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future. + /// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopupContextVoid(byte* str_id, ImGuiPopupFlags popup_flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginPopupContextWindow.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginPopupContextWindow.gen.cs new file mode 100644 index 0000000..90460a1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginPopupContextWindow.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// open+begin popup when clicked on current window. + /// + /// + /// C++: + /// imgui.h:875 + /// , + /// imgui.cpp:12989 + ///
bool BeginPopupContextWindow(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open+begin combined functions helpers + /// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking. + /// - They are convenient to easily create context menus, hence the name. + /// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future. + /// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopupContextWindow(byte* str_id, ImGuiPopupFlags popup_flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginPopupModal.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginPopupModal.gen.cs new file mode 100644 index 0000000..d3dcc6d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginPopupModal.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return true if the modal is open, and you can start outputting to it. + /// + /// + /// C++: + /// imgui.h:853 + /// , + /// imgui.cpp:12888 + ///
bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + /// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup. + /// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup). + /// - *p_open set back to false in BeginPopupModal() when popup is not open. + /// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginPopupModal(byte* name, Bool8* p_open, ImGuiWindowFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginTabBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginTabBar.gen.cs new file mode 100644 index 0000000..c26f030 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginTabBar.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create and append into a TabBar + /// + /// + /// C++: + /// imgui.h:954 + /// , + /// imgui_widgets.cpp:9440 + ///
bool BeginTabBar(const char* str_id, ImGuiTabBarFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTabBar(byte* str_id, ImGuiTabBarFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginTabItem.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginTabItem.gen.cs new file mode 100644 index 0000000..2470b20 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginTabItem.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create a Tab. Returns true if the Tab is selected. + /// + /// + /// C++: + /// imgui.h:956 + /// , + /// imgui_widgets.cpp:10203 + ///
bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTabItem(byte* label, Bool8* p_open, ImGuiTabItemFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginTable.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginTable.gen.cs new file mode 100644 index 0000000..fe2ae48 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginTable.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:905 + /// , + /// imgui_tables.cpp:311 + ///
+ /// bool BeginTable(const char* str_id, int columns, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f) + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// Read about "TABLE SIZING" at the top of this file. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTable( + byte* str_id, + int columns, + ImGuiTableFlags flags, + float2* outer_size, + float inner_width + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BeginTooltip.gen.cs b/Brutal.ImGui/Generated/PInvoke/BeginTooltip.gen.cs new file mode 100644 index 0000000..7bb4e3e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BeginTooltip.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// begin/append a tooltip window. + /// + /// + /// C++: + /// imgui.h:829 + /// , + /// imgui.cpp:12438 + ///
bool BeginTooltip() + ///
+ ///
+ /// + /// + /// Tooltips + /// - Tooltips are windows following the mouse. They do not take focus away. + /// - A tooltip window can contain items of any types. + /// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 BeginTooltip(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Bullet.gen.cs b/Brutal.ImGui/Generated/PInvoke/Bullet.gen.cs new file mode 100644 index 0000000..248d43e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Bullet.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// draw a small circle + keep the cursor on the same line. advance cursor x position by + /// GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses + /// + /// + /// C++: + /// imgui.h:649 + /// , + /// imgui_widgets.cpp:1462 + ///
void Bullet() + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Bullet(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/BulletText.gen.cs b/Brutal.ImGui/Generated/PInvoke/BulletText.gen.cs new file mode 100644 index 0000000..c453e6f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/BulletText.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// shortcut for Bullet()+Text() + /// + /// + /// C++: + /// imgui.h:632 + /// , + /// imgui_widgets.cpp:419 + ///
void BulletText(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void BulletText(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Button.gen.cs b/Brutal.ImGui/Generated/PInvoke/Button.gen.cs new file mode 100644 index 0000000..31db9d4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Button.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// button + /// + /// + /// C++: + /// imgui.h:639 + /// , + /// imgui_widgets.cpp:808 + ///
bool Button(const char* label, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Button(byte* label, float2* size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/CalcItemWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/CalcItemWidth.gen.cs new file mode 100644 index 0000000..ac29dae --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/CalcItemWidth.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// width of item given pushed settings and current cursor position. NOT necessarily the width of last + /// item unlike most 'Item' functions. + /// + /// + /// C++: + /// imgui.h:550 + /// , + /// imgui.cpp:11999 + ///
float CalcItemWidth() + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + /// Calculate default item width given value passed to PushItemWidth() or SetNextItemWidth(). + /// The SetNextItemWidth() data is generally cleared/consumed by ItemAdd() or NextItemData.ClearFlags() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float CalcItemWidth(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/CalcTextSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/CalcTextSize.gen.cs new file mode 100644 index 0000000..9a5e74b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/CalcTextSize.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1069 + /// , + /// imgui.cpp:6205 + ///
+ /// ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f) + ///
+ ///
+ /// + /// + /// Text Utilities + /// + /// + /// Calculate text size. Text can be multi-line. Optionally ignore text after a ## marker. + /// CalcTextSize("") should return ImVec2(0.0f, g.FontSize) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 CalcTextSize( + byte* text, + byte* text_end, + Bool8 hide_text_after_double_hash, + float wrap_width + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Checkbox.gen.cs b/Brutal.ImGui/Generated/PInvoke/Checkbox.gen.cs new file mode 100644 index 0000000..9a57d80 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Checkbox.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:643 + /// , + /// imgui_widgets.cpp:1217 + ///
bool Checkbox(const char* label, bool* v) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Checkbox(byte* label, Bool8* v); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/CheckboxFlags.gen.cs b/Brutal.ImGui/Generated/PInvoke/CheckboxFlags.gen.cs new file mode 100644 index 0000000..2863fdd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/CheckboxFlags.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:644 + /// , + /// imgui_widgets.cpp:1319 + ///
bool CheckboxFlags(const char* label, int* flags, int flags_value) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CheckboxFlags_0(byte* label, int* flags, int flags_value); + + /// + /// + /// C++: + /// imgui.h:645 + /// , + /// imgui_widgets.cpp:1324 + ///
bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CheckboxFlags_1(byte* label, uint* flags, uint flags_value); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/CloseCurrentPopup.gen.cs b/Brutal.ImGui/Generated/PInvoke/CloseCurrentPopup.gen.cs new file mode 100644 index 0000000..05cd1d0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/CloseCurrentPopup.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// manually close the popup we have begin-ed into. + /// + /// + /// C++: + /// imgui.h:867 + /// , + /// imgui.cpp:12801 + ///
void CloseCurrentPopup() + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + /// Close the popup we have begin-ed into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void CloseCurrentPopup(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/CollapsingHeader.gen.cs b/Brutal.ImGui/Generated/PInvoke/CollapsingHeader.gen.cs new file mode 100644 index 0000000..c6a8462 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/CollapsingHeader.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to + /// call TreePop(). + /// + /// + /// C++: + /// imgui.h:762 + /// , + /// imgui_widgets.cpp:7070 + ///
bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// CollapsingHeader returns true when opened but do not indent nor push into the ID stack (because of the ImGuiTreeNodeFlags_NoTreePushOnOpen flag). + /// This is basically the same as calling TreeNodeEx(label, ImGuiTreeNodeFlags_CollapsingHeader). You can remove the _NoTreePushOnOpen flag if you want behavior closer to normal TreeNode(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CollapsingHeader_0(byte* label, ImGuiTreeNodeFlags flags); + + /// + /// + /// when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper + /// right of the header which will set the bool to false when clicked, if '*p_visible==false' don't + /// display the header. + /// + /// + /// C++: + /// imgui.h:763 + /// , + /// imgui_widgets.cpp:7083 + ///
bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// p_visible == NULL : regular collapsing header + /// p_visible != NULL && *p_visible == true : show a small close button on the corner of the header, clicking the button will set *p_visible = false + /// p_visible != NULL && *p_visible == false : do not show the header at all + /// Do not mistake this with the Open state of the header itself, which you can adjust with SetNextItemOpen() or ImGuiTreeNodeFlags_DefaultOpen. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 CollapsingHeader_1( + byte* label, + Bool8* p_visible, + ImGuiTreeNodeFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorButton.gen.cs new file mode 100644 index 0000000..e60cd4e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorButton.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// display a color square/button, hover for details, return true when pressed. + /// + /// + /// C++: + /// imgui.h:743 + /// , + /// imgui_widgets.cpp:6221 + ///
+ /// bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// A little color square. Return true when clicked. + /// FIXME: May want to display/ignore the alpha component in the color display? Yet show it in the tooltip. + /// 'desc_id' is not called 'label' because we don't display it next to the button, but only in the tooltip. + /// Note that 'col' may be encoded in HSV if ImGuiColorEditFlags_InputHSV is set. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ColorButton( + byte* desc_id, + float4* col, + ImGuiColorEditFlags flags, + float2* size + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorConvertFloat4ToU32.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorConvertFloat4ToU32.gen.cs new file mode 100644 index 0000000..fb2cedf --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorConvertFloat4ToU32.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1073 + /// , + /// imgui.cpp:2760 + ///
ImU32 ColorConvertFloat4ToU32(const ImVec4& in) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial uint ColorConvertFloat4ToU32(float4* @in); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorConvertHSVtoRGB.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorConvertHSVtoRGB.gen.cs new file mode 100644 index 0000000..fabe077 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorConvertHSVtoRGB.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1075 + /// , + /// imgui.cpp:2794 + ///
+ /// void ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + /// Convert hsv floats ([0-1],[0-1],[0-1]) to rgb floats ([0-1],[0-1],[0-1]), from Foley & van Dam p593 + /// also http://en.wikipedia.org/wiki/HSL_and_HSV + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ColorConvertHSVtoRGB( + float h, + float s, + float v, + float* out_r, + float* out_g, + float* out_b + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorConvertRGBtoHSV.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorConvertRGBtoHSV.gen.cs new file mode 100644 index 0000000..10f7cf9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorConvertRGBtoHSV.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1074 + /// , + /// imgui.cpp:2772 + ///
+ /// void ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + /// Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592 + /// Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ColorConvertRGBtoHSV( + float r, + float g, + float b, + float* out_h, + float* out_s, + float* out_v + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorConvertU32ToFloat4.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorConvertU32ToFloat4.gen.cs new file mode 100644 index 0000000..0d5f7db --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorConvertU32ToFloat4.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1072 + /// , + /// imgui.cpp:2750 + ///
ImVec4 ColorConvertU32ToFloat4(ImU32 in) + ///
+ ///
+ /// + /// + /// Color Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float4 ColorConvertU32ToFloat4(uint @in); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorEdit3.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorEdit3.gen.cs new file mode 100644 index 0000000..ce737c8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorEdit3.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:739 + /// , + /// imgui_widgets.cpp:5541 + ///
bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ColorEdit3(byte* label, float3* col, ImGuiColorEditFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorEdit4.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorEdit4.gen.cs new file mode 100644 index 0000000..4ac62c8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorEdit4.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:740 + /// , + /// imgui_widgets.cpp:5577 + ///
bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// Edit colors components (each component in 0.0f..1.0f range). + /// See enum ImGuiColorEditFlags_ for available options. e.g. Only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. + /// With typical options: Left-click on color square to open color picker. Right-click to open option menu. CTRL+Click over input fields to edit them and TAB to go to next item. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ColorEdit4(byte* label, float4* col, ImGuiColorEditFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorPicker3.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorPicker3.gen.cs new file mode 100644 index 0000000..5762244 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorPicker3.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:741 + /// , + /// imgui_widgets.cpp:5825 + ///
bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ColorPicker3(byte* label, float3* col, ImGuiColorEditFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ColorPicker4.gen.cs b/Brutal.ImGui/Generated/PInvoke/ColorPicker4.gen.cs new file mode 100644 index 0000000..cdc66a0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ColorPicker4.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:742 + /// , + /// imgui_widgets.cpp:5848 + ///
+ /// bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// Note: ColorPicker4() only accesses 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. + /// (In C++ the 'float col[4]' notation for a function argument is equivalent to 'float* col', we only specify a size to facilitate understanding of the code.) + /// FIXME: we adjust the big color square height based on item width, which may cause a flickering feedback loop (if automatic height makes a vertical scrollbar appears, affecting automatic width..) + /// FIXME: this is trying to be aware of style.Alpha but not fully correct. Also, the color wheel will have overlapping glitches with (style.Alpha < 1.0) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ColorPicker4( + byte* label, + float4* col, + ImGuiColorEditFlags flags, + float* ref_col + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Columns.gen.cs b/Brutal.ImGui/Generated/PInvoke/Columns.gen.cs new file mode 100644 index 0000000..792eb09 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Columns.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:943 + /// , + /// imgui_tables.cpp:4542 + ///
void Columns(int count = 1, const char* id = NULL, bool borders = true) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Columns(int count, byte* id, Bool8 borders); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Combo.gen.cs b/Brutal.ImGui/Generated/PInvoke/Combo.gen.cs new file mode 100644 index 0000000..cc852a4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Combo.gen.cs @@ -0,0 +1,103 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:668 + /// , + /// imgui_widgets.cpp:2179 + ///
+ /// bool Combo(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items = -1) + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + /// Combo box helper allowing to pass an array of strings. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Combo_0( + byte* label, + int* current_item, + byte** items, + int items_count, + int popup_max_height_in_items + ); + + /// + /// + /// Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0" + /// + /// + /// C++: + /// imgui.h:669 + /// , + /// imgui_widgets.cpp:2186 + ///
+ /// bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1) + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + /// Combo box helper allowing to pass all items in a single string literal holding multiple + /// zero-terminated items "item1\0item2\0" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Combo_1( + byte* label, + int* current_item, + byte* items_separated_by_zeros, + int popup_max_height_in_items + ); + + /// + /// + /// C++: + /// imgui.h:670 + /// , + /// imgui_widgets.cpp:2131 + ///
+ /// bool Combo(const char* label, int* current_item, const char* (*getter)(void* user_data, int idx), void* user_data, int items_count, int popup_max_height_in_items = -1) + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + /// Old API, prefer using BeginCombo() nowadays if you can. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Combo_2( + byte* label, + int* current_item, + nint getter, + void* user_data, + int items_count, + int popup_max_height_in_items + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/CreateContext.gen.cs b/Brutal.ImGui/Generated/PInvoke/CreateContext.gen.cs new file mode 100644 index 0000000..efd2d41 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/CreateContext.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:396 + /// , + /// imgui.cpp:4042 + ///
ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL) + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DebugCheckVersionAndDataLayout.gen.cs b/Brutal.ImGui/Generated/PInvoke/DebugCheckVersionAndDataLayout.gen.cs new file mode 100644 index 0000000..99f5fba --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DebugCheckVersionAndDataLayout.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// This is called by IMGUI_CHECKVERSION() macro. + /// + /// + /// C++: + /// imgui.h:1156 + /// , + /// imgui.cpp:11187 + ///
+ /// bool DebugCheckVersionAndDataLayout(const char* version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + /// Verify ABI compatibility between caller code and compiled version of Dear ImGui. This helps detects some build issues. + /// Called by IMGUI_CHECKVERSION(). + /// Verify that the type sizes are matching between the calling file's compilation unit and imgui.cpp's compilation unit + /// If this triggers you have mismatched headers and compiled code versions. + /// - It could be because of a build issue (using new headers with old compiled code) + /// - It could be because of mismatched configuration #define, compilation settings, packing pragma etc. + /// THE CONFIGURATION SETTINGS MENTIONED IN imconfig.h MUST BE SET FOR ALL COMPILATION UNITS INVOLVED WITH DEAR IMGUI. + /// Which is why it is required you put them in your imconfig file (and NOT only before including imgui.h). + /// Otherwise it is possible that different compilation units would see different structure layout. + /// If you don't want to modify imconfig.h you can use the IMGUI_USER_CONFIG define to change filename. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DebugCheckVersionAndDataLayout( + byte* version_str, + nuint sz_io, + nuint sz_style, + nuint sz_vec2, + nuint sz_vec4, + nuint sz_drawvert, + nuint sz_drawidx + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DebugFlashStyleColor.gen.cs b/Brutal.ImGui/Generated/PInvoke/DebugFlashStyleColor.gen.cs new file mode 100644 index 0000000..954d6c7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DebugFlashStyleColor.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1154 + /// , + /// imgui.cpp:21555 + ///
void DebugFlashStyleColor(ImGuiCol idx) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + /// Flash a given style color for some + inhibit modifications of this color via PushStyleColor() calls. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugFlashStyleColor(ImGuiCol idx); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DebugLog.gen.cs b/Brutal.ImGui/Generated/PInvoke/DebugLog.gen.cs new file mode 100644 index 0000000..5f30b64 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DebugLog.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code! + /// + /// + /// C++: + /// imgui.h:1158 + /// , + /// imgui.cpp:23202 + ///
void DebugLog(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugLog(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DebugStartItemPicker.gen.cs b/Brutal.ImGui/Generated/PInvoke/DebugStartItemPicker.gen.cs new file mode 100644 index 0000000..e206394 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DebugStartItemPicker.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1155 + /// , + /// imgui.cpp:23442 + ///
void DebugStartItemPicker() + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugStartItemPicker(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DebugTextEncoding.gen.cs b/Brutal.ImGui/Generated/PInvoke/DebugTextEncoding.gen.cs new file mode 100644 index 0000000..226c847 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DebugTextEncoding.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1153 + /// , + /// imgui.cpp:21509 + ///
void DebugTextEncoding(const char* text) + ///
+ ///
+ /// + /// + /// Debug Utilities + /// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger + /// + /// + /// Helper tool to diagnose between text encoding issues and font loading issues. Pass your UTF-8 string + /// and verify that there are correct. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DebugTextEncoding(byte* text); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DestroyContext.gen.cs b/Brutal.ImGui/Generated/PInvoke/DestroyContext.gen.cs new file mode 100644 index 0000000..ea6c5af --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DestroyContext.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// NULL = destroy current context + /// + /// + /// C++: + /// imgui.h:397 + /// , + /// imgui.cpp:4053 + ///
void DestroyContext(ImGuiContext* ctx = NULL) + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DestroyContext(ImGuiContext* ctx); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DestroyPlatformWindows.gen.cs b/Brutal.ImGui/Generated/PInvoke/DestroyPlatformWindows.gen.cs new file mode 100644 index 0000000..94eebb3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DestroyPlatformWindows.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to + /// close platform windows before imgui shutdown. otherwise will be called by DestroyContext(). + /// + /// + /// C++: + /// imgui.h:1176 + /// , + /// imgui.cpp:17148 + ///
void DestroyPlatformWindows() + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void DestroyPlatformWindows(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DockSpace.gen.cs b/Brutal.ImGui/Generated/PInvoke/DockSpace.gen.cs new file mode 100644 index 0000000..d05f51f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DockSpace.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:974 + /// , + /// imgui.cpp:19996 + ///
+ /// ImGuiID DockSpace(ImGuiID dockspace_id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + /// Create an explicit dockspace node within an existing window. Also expose dock node flags and creates a CentralNode by default. + /// The Central Node is always displayed even when empty and shrink/extend according to the requested size of its neighbors. + /// DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app. + /// When ImGuiDockNodeFlags_KeepAliveOnly is set, nothing is submitted in the current window (function may be called from any location). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID DockSpace( + ImGuiID dockspace_id, + float2* size, + ImGuiDockNodeFlags flags, + ImGuiWindowClass* window_class + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DockSpaceOverViewport.gen.cs b/Brutal.ImGui/Generated/PInvoke/DockSpaceOverViewport.gen.cs new file mode 100644 index 0000000..a4784de --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DockSpaceOverViewport.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:975 + /// , + /// imgui.cpp:20106 + ///
+ /// ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0, const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + /// Tips: Use with ImGuiDockNodeFlags_PassthruCentralNode! + /// The limitation with this call is that your window won't have a local menu bar, but you can also use BeginMainMenuBar(). + /// Even though we could pass window flags, it would also require the user to be able to call BeginMenuBar() somehow meaning we can't Begin/End in a single function. + /// If you really want a menu bar inside the same window as the one hosting the dockspace, you will need to copy this code somewhere and tweak it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID DockSpaceOverViewport( + ImGuiID dockspace_id, + ImGuiViewport* viewport, + ImGuiDockNodeFlags flags, + ImGuiWindowClass* window_class + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragFloat.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragFloat.gen.cs new file mode 100644 index 0000000..9af5ba9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragFloat.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// If v_min >= v_max we have no bound + /// + /// + /// C++: + /// imgui.h:684 + /// , + /// imgui_widgets.cpp:2808 + ///
+ /// bool DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragFloat( + byte* label, + float* v, + float v_speed, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragFloat2.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragFloat2.gen.cs new file mode 100644 index 0000000..2683288 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragFloat2.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:685 + /// , + /// imgui_widgets.cpp:2813 + ///
+ /// bool DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragFloat2( + byte* label, + float2* v, + float v_speed, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragFloat3.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragFloat3.gen.cs new file mode 100644 index 0000000..f9b307d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragFloat3.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:686 + /// , + /// imgui_widgets.cpp:2818 + ///
+ /// bool DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragFloat3( + byte* label, + float3* v, + float v_speed, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragFloat4.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragFloat4.gen.cs new file mode 100644 index 0000000..8c822e7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragFloat4.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:687 + /// , + /// imgui_widgets.cpp:2823 + ///
+ /// bool DragFloat4(const char* label, float v[4], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragFloat4( + byte* label, + float4* v, + float v_speed, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragFloatRange2.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragFloatRange2.gen.cs new file mode 100644 index 0000000..aba5b72 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragFloatRange2.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:688 + /// , + /// imgui_widgets.cpp:2829 + ///
+ /// bool DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", const char* format_max = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// NB: You likely want to specify the ImGuiSliderFlags_AlwaysClamp when using this. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragFloatRange2( + byte* label, + float* v_current_min, + float* v_current_max, + float v_speed, + float v_min, + float v_max, + byte* format, + byte* format_max, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragInt.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragInt.gen.cs new file mode 100644 index 0000000..ece0a4c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragInt.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// If v_min >= v_max we have no bound + /// + /// + /// C++: + /// imgui.h:689 + /// , + /// imgui_widgets.cpp:2862 + ///
+ /// bool DragInt(const char* label, int* v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// NB: v_speed is float to allow adjusting the drag speed with more precision + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragInt( + byte* label, + int* v, + float v_speed, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragInt2.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragInt2.gen.cs new file mode 100644 index 0000000..aa733f3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragInt2.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:690 + /// , + /// imgui_widgets.cpp:2867 + ///
+ /// bool DragInt2(const char* label, int v[2], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragInt2( + byte* label, + int2* v, + float v_speed, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragInt3.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragInt3.gen.cs new file mode 100644 index 0000000..3b2de61 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragInt3.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:691 + /// , + /// imgui_widgets.cpp:2872 + ///
+ /// bool DragInt3(const char* label, int v[3], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragInt3( + byte* label, + int3* v, + float v_speed, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragInt4.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragInt4.gen.cs new file mode 100644 index 0000000..5cee30d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragInt4.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:692 + /// , + /// imgui_widgets.cpp:2877 + ///
+ /// bool DragInt4(const char* label, int v[4], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragInt4( + byte* label, + int4* v, + float v_speed, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragIntRange2.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragIntRange2.gen.cs new file mode 100644 index 0000000..c5f712e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragIntRange2.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:693 + /// , + /// imgui_widgets.cpp:2883 + ///
+ /// bool DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", const char* format_max = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// NB: You likely want to specify the ImGuiSliderFlags_AlwaysClamp when using this. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragIntRange2( + byte* label, + int* v_current_min, + int* v_current_max, + float v_speed, + int v_min, + int v_max, + byte* format, + byte* format_max, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragScalar.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragScalar.gen.cs new file mode 100644 index 0000000..cc18935 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragScalar.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:694 + /// , + /// imgui_widgets.cpp:2674 + ///
+ /// bool DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a Drag widget, p_min and p_max are optional. + /// Read code of e.g. DragFloat(), DragInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragScalar( + byte* label, + ImGuiDataType data_type, + void* p_data, + float v_speed, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/DragScalarN.gen.cs b/Brutal.ImGui/Generated/PInvoke/DragScalarN.gen.cs new file mode 100644 index 0000000..7f1c444 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/DragScalarN.gen.cs @@ -0,0 +1,51 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:695 + /// , + /// imgui_widgets.cpp:2773 + ///
+ /// bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Drag Sliders + /// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', + /// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision). + /// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used. + /// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum. + /// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them. + /// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 DragScalarN( + byte* label, + ImGuiDataType data_type, + void* p_data, + int components, + float v_speed, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Dummy.gen.cs b/Brutal.ImGui/Generated/PInvoke/Dummy.gen.cs new file mode 100644 index 0000000..55d3e45 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Dummy.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be + /// navigable into. + /// + /// + /// C++: + /// imgui.h:588 + /// , + /// imgui_widgets.cpp:1580 + ///
void Dummy(const ImVec2& size) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Dummy(float2* size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/End.gen.cs b/Brutal.ImGui/Generated/PInvoke/End.gen.cs new file mode 100644 index 0000000..4941329 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/End.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:440 + /// , + /// imgui.cpp:8526 + ///
void End() + ///
+ ///
+ /// + /// + /// Windows + /// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack. + /// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window, + /// which clicking will set the boolean to false when clicked. + /// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times. + /// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin(). + /// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value! + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// - Note that the bottom of window stack always contains a window called "Debug". + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void End(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndChild.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndChild.gen.cs new file mode 100644 index 0000000..e9d6b06 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndChild.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:462 + /// , + /// imgui.cpp:6611 + ///
void EndChild() + ///
+ ///
+ /// + /// + /// Child Windows + /// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. + /// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + /// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true. + /// Consider updating your old code: + /// BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + /// BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders); + /// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + /// == 0.0f: use remaining parent window size for this axis. + /// > 0.0f: use specified size for this axis. + /// < 0.0f: right/bottom-align to specified distance from available content boundaries. + /// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + /// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + /// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + /// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + /// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + /// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + /// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndChild(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndCombo.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndCombo.gen.cs new file mode 100644 index 0000000..b438636 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndCombo.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndCombo() if BeginCombo() returns true! + /// + /// + /// C++: + /// imgui.h:667 + /// , + /// imgui_widgets.cpp:2047 + ///
void EndCombo() + ///
+ ///
+ /// + /// + /// Widgets: Combo Box (Dropdown) + /// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. + /// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndCombo(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndDisabled.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndDisabled.gen.cs new file mode 100644 index 0000000..9e03d3d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndDisabled.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1010 + /// , + /// imgui.cpp:8634 + ///
void EndDisabled() + ///
+ ///
+ /// + /// + /// Disabling [BETA API] + /// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors) + /// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) + /// - Tooltips windows by exception are opted out of disabling. + /// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndDisabled(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndDragDropSource.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndDragDropSource.gen.cs new file mode 100644 index 0000000..a6aa992 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndDragDropSource.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndDragDropSource() if BeginDragDropSource() returns true! + /// + /// + /// C++: + /// imgui.h:998 + /// , + /// imgui.cpp:15293 + ///
void EndDragDropSource() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndDragDropSource(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndDragDropTarget.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndDragDropTarget.gen.cs new file mode 100644 index 0000000..c5c5ebf --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndDragDropTarget.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndDragDropTarget() if BeginDragDropTarget() returns true! + /// + /// + /// C++: + /// imgui.h:1001 + /// , + /// imgui.cpp:15481 + ///
void EndDragDropTarget() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndDragDropTarget(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndFrame.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndFrame.gen.cs new file mode 100644 index 0000000..03305e8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndFrame.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data + /// (skipping rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! + /// If you don't need to render, better to not create any windows and not call NewFrame() at all! + /// + /// + /// C++: + /// imgui.h:406 + /// , + /// imgui.cpp:6017 + ///
void EndFrame() + ///
+ ///
+ /// + /// + /// Main + /// + /// + /// This is normally called by Render(). You may want to call it directly if you want to avoid calling + /// Render() but the gain will be very minimal. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndFrame(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndGroup.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndGroup.gen.cs new file mode 100644 index 0000000..808515f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndGroup.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// unlock horizontal starting position + capture the whole group bounding box into one "item" (so you + /// can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) + /// + /// + /// C++: + /// imgui.h:592 + /// , + /// imgui.cpp:12126 + ///
void EndGroup() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndGroup(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndListBox.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndListBox.gen.cs new file mode 100644 index 0000000..abebdf9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndListBox.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndListBox() if BeginListBox() returned true! + /// + /// + /// C++: + /// imgui.h:793 + /// , + /// imgui_widgets.cpp:8496 + ///
void EndListBox() + ///
+ ///
+ /// + /// + /// Widgets: List Boxes + /// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. + /// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. + /// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created. + /// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth + /// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndListBox(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndMainMenuBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndMainMenuBar.gen.cs new file mode 100644 index 0000000..a4570b9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndMainMenuBar.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndMainMenuBar() if BeginMainMenuBar() returns true! + /// + /// + /// C++: + /// imgui.h:819 + /// , + /// imgui_widgets.cpp:8976 + ///
void EndMainMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndMainMenuBar(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndMenu.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndMenu.gen.cs new file mode 100644 index 0000000..4fa0505 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndMenu.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndMenu() if BeginMenu() returns true! + /// + /// + /// C++: + /// imgui.h:821 + /// , + /// imgui_widgets.cpp:9237 + ///
void EndMenu() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndMenu(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndMenuBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndMenuBar.gen.cs new file mode 100644 index 0000000..f42e951 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndMenuBar.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndMenuBar() if BeginMenuBar() returns true! + /// + /// + /// C++: + /// imgui.h:817 + /// , + /// imgui_widgets.cpp:8854 + ///
void EndMenuBar() + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndMenuBar(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndMultiSelect.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndMultiSelect.gen.cs new file mode 100644 index 0000000..adbc365 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndMultiSelect.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:781 + /// , + /// imgui_widgets.cpp:7838 + ///
ImGuiMultiSelectIO* EndMultiSelect() + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + /// Return updated ImGuiMultiSelectIO structure. + /// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiMultiSelectIO* EndMultiSelect(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndPopup.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndPopup.gen.cs new file mode 100644 index 0000000..f7c055d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndPopup.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndPopup() if BeginPopupXXX() returns true! + /// + /// + /// C++: + /// imgui.h:854 + /// , + /// imgui.cpp:12922 + ///
void EndPopup() + ///
+ ///
+ /// + /// + /// Popups, Modals + /// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls. + /// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time. + /// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). + /// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. + /// This is sometimes leading to confusing mistakes. May rework this in the future. + /// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. + /// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndPopup(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndTabBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndTabBar.gen.cs new file mode 100644 index 0000000..d704555 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndTabBar.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndTabBar() if BeginTabBar() returns true! + /// + /// + /// C++: + /// imgui.h:955 + /// , + /// imgui_widgets.cpp:9520 + ///
void EndTabBar() + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndTabBar(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndTabItem.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndTabItem.gen.cs new file mode 100644 index 0000000..a165b39 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndTabItem.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndTabItem() if BeginTabItem() returns true! + /// + /// + /// C++: + /// imgui.h:957 + /// , + /// imgui_widgets.cpp:10227 + ///
void EndTabItem() + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndTabItem(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndTable.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndTable.gen.cs new file mode 100644 index 0000000..dfe18e6 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndTable.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndTable() if BeginTable() returns true! + /// + /// + /// C++: + /// imgui.h:906 + /// , + /// imgui_tables.cpp:1346 + ///
void EndTable() + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndTable(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/EndTooltip.gen.cs b/Brutal.ImGui/Generated/PInvoke/EndTooltip.gen.cs new file mode 100644 index 0000000..60922c3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/EndTooltip.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true! + /// + /// + /// C++: + /// imgui.h:830 + /// , + /// imgui.cpp:12497 + ///
void EndTooltip() + ///
+ ///
+ /// + /// + /// Tooltips + /// - Tooltips are windows following the mouse. They do not take focus away. + /// - A tooltip window can contain items of any types. + /// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void EndTooltip(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/FindViewportByID.gen.cs b/Brutal.ImGui/Generated/PInvoke/FindViewportByID.gen.cs new file mode 100644 index 0000000..f9fc634 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/FindViewportByID.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// this is a helper for backends. + /// + /// + /// C++: + /// imgui.h:1177 + /// , + /// imgui.cpp:16177 + ///
ImGuiViewport* FindViewportByID(ImGuiID id) + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + /// FIXME: This leaks access to viewports not listed in PlatformIO.Viewports[]. Problematic? (#4236) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiViewport* FindViewportByID(ImGuiID id); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/FindViewportByPlatformHandle.gen.cs b/Brutal.ImGui/Generated/PInvoke/FindViewportByPlatformHandle.gen.cs new file mode 100644 index 0000000..4b5e4f5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/FindViewportByPlatformHandle.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, + /// MyWindow*, GLFWwindow* etc.) + /// + /// + /// C++: + /// imgui.h:1178 + /// , + /// imgui.cpp:16186 + ///
ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle) + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetAllocatorFunctions.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetAllocatorFunctions.gen.cs new file mode 100644 index 0000000..c9357f8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetAllocatorFunctions.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1167 + /// , + /// imgui.cpp:4035 + ///
+ /// void GetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func, ImGuiMemFreeFunc* p_free_func, void** p_user_data) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + /// This is provided to facilitate copying allocators from one static/DLL boundary to another (e.g. + /// retrieve default allocator of your executable address space) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void GetAllocatorFunctions( + nint* p_alloc_func, + nint* p_free_func, + void** p_user_data + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetBackgroundDrawList.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetBackgroundDrawList.gen.cs new file mode 100644 index 0000000..416e09b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetBackgroundDrawList.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get background draw list for the given viewport or viewport associated to the current window. this + /// draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui + /// contents. + /// + /// + /// C++: + /// imgui.h:1055 + /// , + /// imgui.cpp:5151 + ///
ImDrawList* GetBackgroundDrawList(ImGuiViewport* viewport = NULL) + ///
+ ///
+ /// + /// + /// Background/Foreground Draw Lists + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawList* GetBackgroundDrawList(ImGuiViewport* viewport); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetClipboardText.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetClipboardText.gen.cs new file mode 100644 index 0000000..b4290c8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetClipboardText.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1139 + /// , + /// imgui.cpp:5065 + ///
const char* GetClipboardText() + ///
+ ///
+ /// + /// + /// Clipboard Utilities + /// - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* GetClipboardText(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetColorU32.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetColorU32.gen.cs new file mode 100644 index 0000000..9f95d1a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetColorU32.gen.cs @@ -0,0 +1,76 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a + /// 32-bit value suitable for ImDrawList + /// + /// + /// C++: + /// imgui.h:557 + /// , + /// imgui.cpp:3474 + ///
ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial uint GetColorU32_0(ImGuiCol idx, float alpha_mul); + + /// + /// + /// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList + /// + /// + /// C++: + /// imgui.h:558 + /// , + /// imgui.cpp:3482 + ///
ImU32 GetColorU32(const ImVec4& col) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial uint GetColorU32_1(float4* col); + + /// + /// + /// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList + /// + /// + /// C++: + /// imgui.h:559 + /// , + /// imgui.cpp:3496 + ///
ImU32 GetColorU32(ImU32 col, float alpha_mul = 1.0f) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial uint GetColorU32_2(uint col, float alpha_mul); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetColumnIndex.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetColumnIndex.gen.cs new file mode 100644 index 0000000..bc6c40b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetColumnIndex.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current column index + /// + /// + /// C++: + /// imgui.h:945 + /// , + /// imgui_tables.cpp:4152 + ///
int GetColumnIndex() + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int GetColumnIndex(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetColumnOffset.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetColumnOffset.gen.cs new file mode 100644 index 0000000..d34453a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetColumnOffset.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get position of column line (in pixels, from the left side of the contents region). pass -1 to use + /// current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f + /// + /// + /// C++: + /// imgui.h:948 + /// , + /// imgui_tables.cpp:4193 + ///
float GetColumnOffset(int column_index = -1) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetColumnOffset(int column_index); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetColumnWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetColumnWidth.gen.cs new file mode 100644 index 0000000..6459074 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetColumnWidth.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get column width (in pixels). pass -1 to use current column + /// + /// + /// C++: + /// imgui.h:946 + /// , + /// imgui_tables.cpp:4222 + ///
float GetColumnWidth(int column_index = -1) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetColumnWidth(int column_index); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetColumnsCount.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetColumnsCount.gen.cs new file mode 100644 index 0000000..750db81 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetColumnsCount.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:950 + /// , + /// imgui_tables.cpp:4158 + ///
int GetColumnsCount() + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int GetColumnsCount(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetContentRegionAvail.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetContentRegionAvail.gen.cs new file mode 100644 index 0000000..ea3aeca --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetContentRegionAvail.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// available space from current position. THIS IS YOUR BEST FRIEND. + /// + /// + /// C++: + /// imgui.h:574 + /// , + /// imgui.cpp:12064 + ///
ImVec2 GetContentRegionAvail() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetContentRegionAvail(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetCurrentContext.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetCurrentContext.gen.cs new file mode 100644 index 0000000..1f2157e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetCurrentContext.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:398 + /// , + /// imgui.cpp:4013 + ///
ImGuiContext* GetCurrentContext() + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + /// Internal state access - if you want to share Dear ImGui state between modules (e.g. DLL) or allocate it yourself + /// Note that we still point to some static data and members (such as GFontAtlas), so the state instance you end up using will point to the static data within its module + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiContext* GetCurrentContext(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetCursorPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetCursorPos.gen.cs new file mode 100644 index 0000000..b2ca58b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetCursorPos.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] cursor position in window-local coordinates. This is not your best friend. + /// + /// + /// C++: + /// imgui.h:575 + /// , + /// imgui.cpp:11883 + ///
ImVec2 GetCursorPos() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + /// User generally sees positions in window coordinates. Internally we store CursorPos in absolute screen coordinates because it is more convenient. + /// Conversion happens as we pass the value to user, but it makes our naming convention confusing because GetCursorPos() == (DC.CursorPos - window.Pos). May want to rename 'DC.CursorPos'. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetCursorPos(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetCursorPosX.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetCursorPosX.gen.cs new file mode 100644 index 0000000..84b7b65 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetCursorPosX.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:576 + /// , + /// imgui.cpp:11889 + ///
float GetCursorPosX() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetCursorPosX(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetCursorPosY.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetCursorPosY.gen.cs new file mode 100644 index 0000000..eb34268 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetCursorPosY.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:577 + /// , + /// imgui.cpp:11895 + ///
float GetCursorPosY() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetCursorPosY(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetCursorScreenPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetCursorScreenPos.gen.cs new file mode 100644 index 0000000..1db21d8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetCursorScreenPos.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than + /// GetCursorPos(), also more useful to work with ImDrawList API). + /// + /// + /// C++: + /// imgui.h:572 + /// , + /// imgui.cpp:11867 + ///
ImVec2 GetCursorScreenPos() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetCursorScreenPos(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetCursorStartPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetCursorStartPos.gen.cs new file mode 100644 index 0000000..4b09ecb --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetCursorStartPos.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after + /// Begin() to get the absolute coordinates version. + /// + /// + /// C++: + /// imgui.h:581 + /// , + /// imgui.cpp:11925 + ///
ImVec2 GetCursorStartPos() + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetCursorStartPos(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetDragDropPayload.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetDragDropPayload.gen.cs new file mode 100644 index 0000000..10b5be5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetDragDropPayload.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or + /// inactive. use ImGuiPayload::IsDataType() to test for the payload type. + /// + /// + /// C++: + /// imgui.h:1002 + /// , + /// imgui.cpp:15475 + ///
const ImGuiPayload* GetDragDropPayload() + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiPayload* GetDragDropPayload(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetDrawData.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetDrawData.gen.cs new file mode 100644 index 0000000..ed0812a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetDrawData.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// valid after Render() and until the next call to NewFrame(). Call ImGui_ImplXXXX_RenderDrawData() + /// function in your Renderer Backend to render. + /// + /// + /// C++: + /// imgui.h:408 + /// , + /// imgui.cpp:5110 + ///
ImDrawData* GetDrawData() + ///
+ ///
+ /// + /// + /// Main + /// + /// + /// Pass this to your backend rendering function! Valid after Render() and until the next call to + /// NewFrame() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawData* GetDrawData(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetDrawListSharedData.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetDrawListSharedData.gen.cs new file mode 100644 index 0000000..a5cbb8e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetDrawListSharedData.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// you may use this when creating your own ImDrawList instances. + /// + /// + /// C++: + /// imgui.h:1063 + /// , + /// imgui.cpp:5165 + ///
ImDrawListSharedData* GetDrawListSharedData() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawListSharedData* GetDrawListSharedData(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFont.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFont.gen.cs new file mode 100644 index 0000000..e7ed434 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFont.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current font + /// + /// + /// C++: + /// imgui.h:530 + /// , + /// imgui.cpp:9087 + ///
ImFont* GetFont() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* GetFont(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFontBaked.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFontBaked.gen.cs new file mode 100644 index 0000000..7d85214 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFontBaked.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current font bound at current size // == GetFont()->GetFontBaked(GetFontSize()) + /// + /// + /// C++: + /// imgui.h:532 + /// , + /// imgui.cpp:9092 + ///
ImFontBaked* GetFontBaked() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFontBaked* GetFontBaked(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFontSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFontSize.gen.cs new file mode 100644 index 0000000..807f6d5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFontSize.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current scaled font size (= height in pixels). AFTER global scale factors applied. *IMPORTANT* + /// DO NOT PASS THIS VALUE TO PushFont()! Use ImGui::GetStyle().FontSizeBase to get value before global + /// scale factors. + /// + /// + /// C++: + /// imgui.h:531 + /// , + /// imgui.cpp:9100 + ///
float GetFontSize() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + /// Get current font size (= height in pixels) of current font, with global scale factors applied. + /// - Use style.FontSizeBase to get value before global scale factors. + /// - recap: ImGui::GetFontSize() == style.FontSizeBase * (style.FontScaleMain * style.FontScaleDpi * other_scaling_factors) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetFontSize(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFontTexUvWhitePixel.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFontTexUvWhitePixel.gen.cs new file mode 100644 index 0000000..8c43b0f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFontTexUvWhitePixel.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API + /// + /// + /// C++: + /// imgui.h:556 + /// , + /// imgui.cpp:9105 + ///
ImVec2 GetFontTexUvWhitePixel() + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetFontTexUvWhitePixel(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetForegroundDrawList.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetForegroundDrawList.gen.cs new file mode 100644 index 0000000..a68f84c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetForegroundDrawList.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get foreground draw list for the given viewport or viewport associated to the current window. this + /// draw list will be the top-most rendered one. Useful to quickly draw shapes/text over dear imgui + /// contents. + /// + /// + /// C++: + /// imgui.h:1056 + /// , + /// imgui.cpp:5158 + ///
ImDrawList* GetForegroundDrawList(ImGuiViewport* viewport = NULL) + ///
+ ///
+ /// + /// + /// Background/Foreground Draw Lists + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawList* GetForegroundDrawList(ImGuiViewport* viewport); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFrameCount.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFrameCount.gen.cs new file mode 100644 index 0000000..6094b3b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFrameCount.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get global imgui frame count. incremented by 1 every frame. + /// + /// + /// C++: + /// imgui.h:1062 + /// , + /// imgui.cpp:5122 + ///
int GetFrameCount() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int GetFrameCount(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFrameHeight.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFrameHeight.gen.cs new file mode 100644 index 0000000..99fffd7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFrameHeight.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ~ FontSize + style.FramePadding.y * 2 + /// + /// + /// C++: + /// imgui.h:596 + /// , + /// imgui.cpp:12052 + ///
float GetFrameHeight() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetFrameHeight(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetFrameHeightWithSpacing.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetFrameHeightWithSpacing.gen.cs new file mode 100644 index 0000000..f7710c7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetFrameHeightWithSpacing.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 + /// consecutive lines of framed widgets) + /// + /// + /// C++: + /// imgui.h:597 + /// , + /// imgui.cpp:12058 + ///
float GetFrameHeightWithSpacing() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetFrameHeightWithSpacing(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetID.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetID.gen.cs new file mode 100644 index 0000000..6d90906 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetID.gen.cs @@ -0,0 +1,124 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into + /// ImGuiStorage yourself + /// + /// + /// C++: + /// imgui.h:615 + /// , + /// imgui.cpp:9677 + ///
ImGuiID GetID(const char* str_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetID_0(byte* str_id); + + /// + /// + /// C++: + /// imgui.h:616 + /// , + /// imgui.cpp:9683 + ///
ImGuiID GetID(const char* str_id_begin, const char* str_id_end) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetID_1(byte* str_id_begin, byte* str_id_end); + + /// + /// + /// C++: + /// imgui.h:617 + /// , + /// imgui.cpp:9689 + ///
ImGuiID GetID(const void* ptr_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetID_2(void* ptr_id); + + /// + /// + /// C++: + /// imgui.h:618 + /// , + /// imgui.cpp:9695 + ///
ImGuiID GetID(int int_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetID_3(int int_id); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetIO.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetIO.gen.cs new file mode 100644 index 0000000..051f989 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetIO.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration + /// options/flags) + /// + /// + /// C++: + /// imgui.h:402 + /// , + /// imgui.cpp:5083 + ///
ImGuiIO& GetIO() + ///
+ ///
+ /// + /// + /// Main + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiIO* GetIO(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetItemID.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetItemID.gen.cs new file mode 100644 index 0000000..868137b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetItemID.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get ID of last item (~~ often same ImGui::GetID(label) beforehand) + /// + /// + /// C++: + /// imgui.h:1043 + /// , + /// imgui.cpp:6445 + ///
ImGuiID GetItemID() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetItemID(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetItemRectMax.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetItemRectMax.gen.cs new file mode 100644 index 0000000..f479ccc --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetItemRectMax.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get lower-right bounding rectangle of the last item (screen space) + /// + /// + /// C++: + /// imgui.h:1045 + /// , + /// imgui.cpp:6457 + ///
ImVec2 GetItemRectMax() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetItemRectMax(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetItemRectMin.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetItemRectMin.gen.cs new file mode 100644 index 0000000..21aac2c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetItemRectMin.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get upper-left bounding rectangle of the last item (screen space) + /// + /// + /// C++: + /// imgui.h:1044 + /// , + /// imgui.cpp:6451 + ///
ImVec2 GetItemRectMin() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetItemRectMin(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetItemRectSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetItemRectSize.gen.cs new file mode 100644 index 0000000..d67b25b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetItemRectSize.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get size of last item + /// + /// + /// C++: + /// imgui.h:1046 + /// , + /// imgui.cpp:6463 + ///
ImVec2 GetItemRectSize() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetItemRectSize(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetKeyName.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetKeyName.gen.cs new file mode 100644 index 0000000..96a64d0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetKeyName.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [DEBUG] returns English name of the key. Those names are provided for debugging purpose and are not + /// meant to be saved persistently nor compared. + /// + /// + /// C++: + /// imgui.h:1086 + /// , + /// imgui.cpp:9829 + ///
const char* GetKeyName(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* GetKeyName(ImGuiKey key); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetKeyPressedAmount.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetKeyPressedAmount.gen.cs new file mode 100644 index 0000000..f1b017b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetKeyPressedAmount.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate + /// is small enough that DeltaTime > RepeatRate + /// + /// + /// C++: + /// imgui.h:1085 + /// , + /// imgui.cpp:9895 + ///
int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + /// Return value representing the number of presses in the last time period, for the given repeat rate + /// (most often returns 0 or 1. The result is generally only >1 when RepeatRate is smaller than DeltaTime, aka large DeltaTime or fast RepeatRate) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetMainViewport.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetMainViewport.gen.cs new file mode 100644 index 0000000..54c7103 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetMainViewport.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return primary/default viewport. This can never be NULL. + /// + /// + /// C++: + /// imgui.h:1052 + /// , + /// imgui.cpp:16170 + ///
ImGuiViewport* GetMainViewport() + ///
+ ///
+ /// + /// + /// Viewports + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiViewport* GetMainViewport(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetMouseClickedCount.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetMouseClickedCount.gen.cs new file mode 100644 index 0000000..5f8ad39 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetMouseClickedCount.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return the number of successive mouse-clicks at the time where a click happen (otherwise 0). + /// + /// + /// C++: + /// imgui.h:1124 + /// , + /// imgui.cpp:10326 + ///
int GetMouseClickedCount(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int GetMouseClickedCount(ImGuiMouseButton button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetMouseCursor.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetMouseCursor.gen.cs new file mode 100644 index 0000000..9ac8573 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetMouseCursor.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the + /// frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will + /// render those for you + /// + /// + /// C++: + /// imgui.h:1133 + /// , + /// imgui.cpp:10448 + ///
ImGuiMouseCursor GetMouseCursor() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Get desired mouse cursor shape. + /// Important: this is meant to be used by a platform backend, it is reset in ImGui::NewFrame(), + /// updated during the frame, and locked in EndFrame()/Render(). + /// If you use software rendering by setting io.MouseDrawCursor then Dear ImGui will render those for you + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiMouseCursor GetMouseCursor(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetMouseDragDelta.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetMouseDragDelta.gen.cs new file mode 100644 index 0000000..6ef5cd5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetMouseDragDelta.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return the delta from the initial clicking position while the mouse button is pressed or was just + /// released. This is locked and return 0.0f until the mouse moves past a distance threshold at least + /// once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f) + /// + /// + /// C++: + /// imgui.h:1131 + /// , + /// imgui.cpp:10423 + ///
ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Return the delta from the initial clicking position while the mouse button is clicked or was just released. + /// This is locked and return 0.0f until the mouse moves past a distance threshold at least once. + /// NB: This is only valid if IsMousePosValid(). backends in theory should always keep mouse position valid when dragging even outside the client window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetMouseDragDelta(ImGuiMouseButton button, float lock_threshold); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetMousePos.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetMousePos.gen.cs new file mode 100644 index 0000000..747fe88 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetMousePos.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls + /// + /// + /// C++: + /// imgui.h:1128 + /// , + /// imgui.cpp:10373 + ///
ImVec2 GetMousePos() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetMousePos(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetMousePosOnOpeningCurrentPopup.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetMousePosOnOpeningCurrentPopup.gen.cs new file mode 100644 index 0000000..3f86038 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetMousePosOnOpeningCurrentPopup.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user + /// backing that value themselves) + /// + /// + /// C++: + /// imgui.h:1129 + /// , + /// imgui.cpp:10391 + ///
ImVec2 GetMousePosOnOpeningCurrentPopup() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// NB: prefer to call right after BeginPopup(). At the time Selectable/MenuItem is activated, the popup + /// is already closed! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetMousePosOnOpeningCurrentPopup(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetPlatformIO.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetPlatformIO.gen.cs new file mode 100644 index 0000000..4dc73be --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetPlatformIO.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS + /// Clipboard, IME etc.) + /// + /// + /// C++: + /// imgui.h:403 + /// , + /// imgui.cpp:5096 + ///
ImGuiPlatformIO& GetPlatformIO() + ///
+ ///
+ /// + /// + /// Main + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiPlatformIO* GetPlatformIO(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetScrollMaxX.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetScrollMaxX.gen.cs new file mode 100644 index 0000000..80c4c3a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetScrollMaxX.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x + /// + /// + /// C++: + /// imgui.h:505 + /// , + /// imgui.cpp:12332 + ///
float GetScrollMaxX() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetScrollMaxX(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetScrollMaxY.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetScrollMaxY.gen.cs new file mode 100644 index 0000000..2eee3cc --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetScrollMaxY.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y + /// + /// + /// C++: + /// imgui.h:506 + /// , + /// imgui.cpp:12338 + ///
float GetScrollMaxY() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetScrollMaxY(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetScrollX.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetScrollX.gen.cs new file mode 100644 index 0000000..d80b180 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetScrollX.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get scrolling amount [0 .. GetScrollMaxX()] + /// + /// + /// C++: + /// imgui.h:501 + /// , + /// imgui.cpp:12320 + ///
float GetScrollX() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetScrollX(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetScrollY.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetScrollY.gen.cs new file mode 100644 index 0000000..b1f32e9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetScrollY.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get scrolling amount [0 .. GetScrollMaxY()] + /// + /// + /// C++: + /// imgui.h:502 + /// , + /// imgui.cpp:12326 + ///
float GetScrollY() + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetScrollY(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetStateStorage.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetStateStorage.gen.cs new file mode 100644 index 0000000..f8f352c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetStateStorage.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1066 + /// , + /// imgui.cpp:9255 + ///
ImGuiStorage* GetStateStorage() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiStorage* GetStateStorage(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetStyle.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetStyle.gen.cs new file mode 100644 index 0000000..ab363c0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetStyle.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify + /// style mid-frame! + /// + /// + /// C++: + /// imgui.h:404 + /// , + /// imgui.cpp:3468 + ///
ImGuiStyle& GetStyle() + ///
+ ///
+ /// + /// + /// Main + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiStyle* GetStyle(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetStyleColorName.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetStyleColorName.gen.cs new file mode 100644 index 0000000..25e050f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetStyleColorName.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get a string corresponding to the enum value (for display, saving, etc.). + /// + /// + /// C++: + /// imgui.h:1064 + /// , + /// imgui.cpp:3679 + ///
const char* GetStyleColorName(ImGuiCol idx) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* GetStyleColorName(ImGuiCol idx); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetStyleColorVec4.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetStyleColorVec4.gen.cs new file mode 100644 index 0000000..c4e95ee --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetStyleColorVec4.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), + /// otherwise use GetColorU32() to get style color with style alpha baked in. + /// + /// + /// C++: + /// imgui.h:560 + /// , + /// imgui.cpp:3490 + ///
const ImVec4& GetStyleColorVec4(ImGuiCol idx) + ///
+ ///
+ /// + /// + /// Style read access + /// - Use the ShowStyleEditor() function to interactively see/edit the colors. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float4* GetStyleColorVec4(ImGuiCol idx); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetTextLineHeight.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetTextLineHeight.gen.cs new file mode 100644 index 0000000..2683517 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetTextLineHeight.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ~ FontSize + /// + /// + /// C++: + /// imgui.h:594 + /// , + /// imgui.cpp:12040 + ///
float GetTextLineHeight() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetTextLineHeight(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetTextLineHeightWithSpacing.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetTextLineHeightWithSpacing.gen.cs new file mode 100644 index 0000000..4b0628b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetTextLineHeightWithSpacing.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text) + /// + /// + /// C++: + /// imgui.h:595 + /// , + /// imgui.cpp:12046 + ///
float GetTextLineHeightWithSpacing() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetTextLineHeightWithSpacing(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetTime.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetTime.gen.cs new file mode 100644 index 0000000..00ab2fa --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetTime.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get global imgui time. incremented by io.DeltaTime every frame. + /// + /// + /// C++: + /// imgui.h:1061 + /// , + /// imgui.cpp:5117 + ///
double GetTime() + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial double GetTime(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetTreeNodeToLabelSpacing.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetTreeNodeToLabelSpacing.gen.cs new file mode 100644 index 0000000..12e8840 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetTreeNodeToLabelSpacing.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + + /// style.FramePadding.x*2) for a regular unframed TreeNode + /// + /// + /// C++: + /// imgui.h:761 + /// , + /// imgui_widgets.cpp:7041 + ///
float GetTreeNodeToLabelSpacing() + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// Horizontal distance preceding label when using TreeNode() or Bullet() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetTreeNodeToLabelSpacing(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetVersion.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetVersion.gen.cs new file mode 100644 index 0000000..281ca21 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetVersion.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the + /// compiled version of imgui.cpp) + /// + /// + /// C++: + /// imgui.h:420 + /// , + /// imgui.cpp:5078 + ///
const char* GetVersion() + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* GetVersion(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowDockID.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowDockID.gen.cs new file mode 100644 index 0000000..8834562 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowDockID.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:978 + /// , + /// imgui.cpp:8810 + ///
ImGuiID GetWindowDockID() + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID GetWindowDockID(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowDpiScale.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowDpiScale.gen.cs new file mode 100644 index 0000000..3cecd2c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowDpiScale.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get DPI scale currently associated to the current window's viewport. + /// + /// + /// C++: + /// imgui.h:471 + /// , + /// imgui.cpp:9074 + ///
float GetWindowDpiScale() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetWindowDpiScale(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowDrawList.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowDrawList.gen.cs new file mode 100644 index 0000000..92d42fe --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowDrawList.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get draw list associated to the current window, to append your own drawing primitives + /// + /// + /// C++: + /// imgui.h:470 + /// , + /// imgui.cpp:9068 + ///
ImDrawList* GetWindowDrawList() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawList* GetWindowDrawList(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowHeight.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowHeight.gen.cs new file mode 100644 index 0000000..5bb12b1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowHeight.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for + /// GetWindowSize().y. + /// + /// + /// C++: + /// imgui.h:475 + /// , + /// imgui.cpp:8828 + ///
float GetWindowHeight() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetWindowHeight(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowPos.gen.cs new file mode 100644 index 0000000..800d6c5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowPos.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider + /// always using GetCursorScreenPos() and GetContentRegionAvail() instead) + /// + /// + /// C++: + /// imgui.h:472 + /// , + /// imgui.cpp:8834 + ///
ImVec2 GetWindowPos() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetWindowPos(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowSize.gen.cs new file mode 100644 index 0000000..08238be --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowSize.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using + /// GetCursorScreenPos() and GetContentRegionAvail() instead) + /// + /// + /// C++: + /// imgui.h:473 + /// , + /// imgui.cpp:8877 + ///
ImVec2 GetWindowSize() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 GetWindowSize(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowViewport.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowViewport.gen.cs new file mode 100644 index 0000000..dfe62cd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowViewport.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get viewport currently associated to the current window. + /// + /// + /// C++: + /// imgui.h:476 + /// , + /// imgui.cpp:9080 + ///
ImGuiViewport*GetWindowViewport() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiViewport* GetWindowViewport(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/GetWindowWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/GetWindowWidth.gen.cs new file mode 100644 index 0000000..7e0938f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/GetWindowWidth.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x. + /// + /// + /// C++: + /// imgui.h:474 + /// , + /// imgui.cpp:8822 + ///
float GetWindowWidth() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float GetWindowWidth(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImDrawCmd.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImDrawCmd.gen.cs new file mode 100644 index 0000000..a0758ab --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImDrawCmd.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// == (TexRef._TexData ? TexRef._TexData->TexID : TexRef._TexID + /// + /// + /// C++: + /// imgui.h:3251 + ///
inline ImTextureID GetTexID() const + ///
+ ///
+ /// + /// + /// Since 1.83: returns ImTextureID associated with this draw call. Warning: DO NOT assume this is always same as 'TextureId' (we will change this function for an upcoming feature) + /// Since 1.92: removed ImDrawCmd::TextureId field, the getter function must be used! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImTextureID ImDrawCmd_GetTexID(ImDrawCmd* target); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImDrawData.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImDrawData.gen.cs new file mode 100644 index 0000000..7c781d3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImDrawData.gen.cs @@ -0,0 +1,102 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:3515 + /// , + /// imgui_draw.cpp:2252 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawData_Clear(ImDrawData* target); + + /// + /// + /// Helper to add an external draw list into an existing ImDrawData. + /// + /// + /// C++: + /// imgui.h:3516 + /// , + /// imgui_draw.cpp:2309 + ///
void AddDrawList(ImDrawList* draw_list) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawData_AddDrawList(ImDrawData* target, ImDrawList* draw_list); + + /// + /// + /// Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: + /// this is slow and most likely a waste of resources. Always prefer indexed rendering! + /// + /// + /// C++: + /// imgui.h:3517 + /// , + /// imgui_draw.cpp:2317 + ///
void DeIndexAllBuffers() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot + /// render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed + /// rendering! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawData_DeIndexAllBuffers(ImDrawData* target); + + /// + /// + /// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a + /// different scale than Dear ImGui expects, or if there is a difference between your window resolution + /// and framebuffer resolution. + /// + /// + /// C++: + /// imgui.h:3518 + /// , + /// imgui_draw.cpp:2337 + ///
void ScaleClipRects(const ImVec2& fb_scale) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Helper to scale the ClipRect field of each ImDrawCmd. + /// Use if your final output buffer is at a different scale than draw_data->DisplaySize, + /// or if there is a difference between your window resolution and framebuffer resolution. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawData_ScaleClipRects(ImDrawData* target, float2* fb_scale); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImDrawList.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImDrawList.gen.cs new file mode 100644 index 0000000..1741cfc --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImDrawList.gen.cs @@ -0,0 +1,1735 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Render-level scissoring. This is passed down to your render function but not used for CPU-side + /// coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and + /// widget culling) + /// + /// + /// C++: + /// imgui.h:3369 + /// , + /// imgui_draw.cpp:651 + ///
+ /// void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect = false) + ///
+ ///
+ /// + /// + /// Render-level scissoring. This is passed down to your render function but not used for CPU-side + /// coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and + /// widget culling) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PushClipRect( + ImDrawList* target, + float2* clip_rect_min, + float2* clip_rect_max, + Bool8 intersect_with_current_clip_rect + ); + + /// + /// + /// C++: + /// imgui.h:3370 + /// , + /// imgui_draw.cpp:670 + ///
void PushClipRectFullScreen() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PushClipRectFullScreen(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3371 + /// , + /// imgui_draw.cpp:675 + ///
void PopClipRect() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PopClipRect(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3372 + /// , + /// imgui_draw.cpp:682 + ///
void PushTexture(ImTextureRef tex_ref) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PushTexture(ImDrawList* target, ImTextureRef tex_ref); + + /// + /// + /// C++: + /// imgui.h:3373 + /// , + /// imgui_draw.cpp:691 + ///
void PopTexture() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PopTexture(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3374 + ///
inline ImVec2 GetClipRectMin() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImDrawList_GetClipRectMin(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3375 + ///
inline ImVec2 GetClipRectMax() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial float2 ImDrawList_GetClipRectMax(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3384 + /// , + /// imgui_draw.cpp:1479 + ///
+ /// void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddLine( + ImDrawList* target, + float2* p1, + float2* p2, + uint col, + float thickness + ); + + /// + /// + /// a: upper-left, b: lower-right (== upper-left + size) + /// + /// + /// C++: + /// imgui.h:3385 + /// , + /// imgui_draw.cpp:1490 + ///
+ /// void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// p_min = upper-left, p_max = lower-right + /// Note we don't render 1 pixels sized rectangles properly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddRect( + ImDrawList* target, + float2* p_min, + float2* p_max, + uint col, + float rounding, + ImDrawFlags flags, + float thickness + ); + + /// + /// + /// a: upper-left, b: lower-right (== upper-left + size) + /// + /// + /// C++: + /// imgui.h:3386 + /// , + /// imgui_draw.cpp:1501 + ///
+ /// void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddRectFilled( + ImDrawList* target, + float2* p_min, + float2* p_max, + uint col, + float rounding, + ImDrawFlags flags + ); + + /// + /// + /// C++: + /// imgui.h:3387 + /// , + /// imgui_draw.cpp:1518 + ///
+ /// void AddRectFilledMultiColor(const ImVec2& p_min, const ImVec2& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// p_min = upper-left, p_max = lower-right + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddRectFilledMultiColor( + ImDrawList* target, + float2* p_min, + float2* p_max, + uint col_upr_left, + uint col_upr_right, + uint col_bot_right, + uint col_bot_left + ); + + /// + /// + /// C++: + /// imgui.h:3388 + /// , + /// imgui_draw.cpp:1533 + ///
+ /// void AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddQuad( + ImDrawList* target, + float2* p1, + float2* p2, + float2* p3, + float2* p4, + uint col, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3389 + /// , + /// imgui_draw.cpp:1545 + ///
+ /// void AddQuadFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddQuadFilled( + ImDrawList* target, + float2* p1, + float2* p2, + float2* p3, + float2* p4, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3390 + /// , + /// imgui_draw.cpp:1557 + ///
+ /// void AddTriangle(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddTriangle( + ImDrawList* target, + float2* p1, + float2* p2, + float2* p3, + uint col, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3391 + /// , + /// imgui_draw.cpp:1568 + ///
+ /// void AddTriangleFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddTriangleFilled( + ImDrawList* target, + float2* p1, + float2* p2, + float2* p3, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3392 + /// , + /// imgui_draw.cpp:1579 + ///
+ /// void AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddCircle( + ImDrawList* target, + float2* center, + float radius, + uint col, + int num_segments, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3393 + /// , + /// imgui_draw.cpp:1603 + ///
+ /// void AddCircleFilled(const ImVec2& center, float radius, ImU32 col, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddCircleFilled( + ImDrawList* target, + float2* center, + float radius, + uint col, + int num_segments + ); + + /// + /// + /// C++: + /// imgui.h:3394 + /// , + /// imgui_draw.cpp:1628 + ///
+ /// void AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Guaranteed to honor 'num_segments' + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddNgon( + ImDrawList* target, + float2* center, + float radius, + uint col, + int num_segments, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3395 + /// , + /// imgui_draw.cpp:1640 + ///
void AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Guaranteed to honor 'num_segments' + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddNgonFilled( + ImDrawList* target, + float2* center, + float radius, + uint col, + int num_segments + ); + + /// + /// + /// C++: + /// imgui.h:3396 + /// , + /// imgui_draw.cpp:1652 + ///
+ /// void AddEllipse(const ImVec2& center, const ImVec2& radius, ImU32 col, float rot = 0.0f, int num_segments = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Ellipse + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddEllipse( + ImDrawList* target, + float2* center, + float2* radius, + uint col, + float rot, + int num_segments, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3397 + /// , + /// imgui_draw.cpp:1666 + ///
+ /// void AddEllipseFilled(const ImVec2& center, const ImVec2& radius, ImU32 col, float rot = 0.0f, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddEllipseFilled( + ImDrawList* target, + float2* center, + float2* radius, + uint col, + float rot, + int num_segments + ); + + /// + /// + /// C++: + /// imgui.h:3398 + /// , + /// imgui_draw.cpp:1729 + ///
+ /// void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddText_0( + ImDrawList* target, + float2* pos, + uint col, + byte* text_begin, + byte* text_end + ); + + /// + /// + /// C++: + /// imgui.h:3399 + /// , + /// imgui_draw.cpp:1702 + ///
+ /// void AddText(ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddText_1( + ImDrawList* target, + ImFont* font, + float font_size, + float2* pos, + uint col, + byte* text_begin, + byte* text_end, + float wrap_width, + float4* cpu_fine_clip_rect + ); + + /// + /// + /// Cubic Bezier (4 control points) + /// + /// + /// C++: + /// imgui.h:3400 + /// , + /// imgui_draw.cpp:1681 + ///
+ /// void AddBezierCubic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Cubic Bezier takes 4 controls points + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddBezierCubic( + ImDrawList* target, + float2* p1, + float2* p2, + float2* p3, + float2* p4, + uint col, + float thickness, + int num_segments + ); + + /// + /// + /// Quadratic Bezier (3 control points) + /// + /// + /// C++: + /// imgui.h:3401 + /// , + /// imgui_draw.cpp:1692 + ///
+ /// void AddBezierQuadratic(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, ImU32 col, float thickness, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Primitives + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. + /// - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). + /// In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. + /// In future versions we will use textures to provide cheaper and higher-quality circles. + /// Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. + /// + /// + /// Quadratic Bezier takes 3 controls points + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddBezierQuadratic( + ImDrawList* target, + float2* p1, + float2* p2, + float2* p3, + uint col, + float thickness, + int num_segments + ); + + /// + /// + /// C++: + /// imgui.h:3406 + /// , + /// imgui_draw.cpp:801 + ///
+ /// void AddPolyline(const ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness) + ///
+ ///
+ /// + /// + /// General polygon + /// - Only simple polygons are supported by filling functions (no self-intersections, no holes). + /// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library. + /// + /// + /// TODO: Thickness anti-aliased lines cap are missing their AA fringe. + /// We avoid using the ImVec2 math operators here to reduce cost to a minimum for debug/non-inlined builds. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddPolyline( + ImDrawList* target, + float2* points, + int num_points, + uint col, + ImDrawFlags flags, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3407 + /// , + /// imgui_draw.cpp:1059 + ///
void AddConvexPolyFilled(const ImVec2* points, int num_points, ImU32 col) + ///
+ ///
+ /// + /// + /// General polygon + /// - Only simple polygons are supported by filling functions (no self-intersections, no holes). + /// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library. + /// + /// + /// - We intentionally avoid using ImVec2 and its math operators here to reduce cost to a minimum for debug/non-inlined builds. + /// - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddConvexPolyFilled( + ImDrawList* target, + float2* points, + int num_points, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3408 + /// , + /// imgui_draw.cpp:2013 + ///
void AddConcavePolyFilled(const ImVec2* points, int num_points, ImU32 col) + ///
+ ///
+ /// + /// + /// General polygon + /// - Only simple polygons are supported by filling functions (no self-intersections, no holes). + /// - Concave polygon fill is more expensive than convex one: it has O(N^2) complexity. Provided as a convenience for the user but not used by the main library. + /// + /// + /// Use ear-clipping algorithm to triangulate a simple polygon (no self-interaction, no holes). + /// (Reminder: we don't perform any coarse clipping/culling in ImDrawList layer! + /// It is up to caller to ensure not making costly calls that will be outside of visible area. + /// As concave fill is noticeably more expensive than other primitives, be mindful of this... + /// Caller can build AABB of points, and avoid filling if 'draw_list->_CmdHeader.ClipRect.Overlays(points_bb) == false') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddConcavePolyFilled( + ImDrawList* target, + float2* points, + int num_points, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3414 + /// , + /// imgui_draw.cpp:1734 + ///
+ /// void AddImage(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min = ImVec2(0, 0), const ImVec2& uv_max = ImVec2(1, 1), ImU32 col = IM_COL32_WHITE) + ///
+ ///
+ /// + /// + /// Image primitives + /// - Read FAQ to understand what ImTextureID/ImTextureRef are. + /// - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. + /// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddImage( + ImDrawList* target, + ImTextureRef tex_ref, + float2* p_min, + float2* p_max, + float2* uv_min, + float2* uv_max, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3415 + /// , + /// imgui_draw.cpp:1750 + ///
+ /// void AddImageQuad(ImTextureRef tex_ref, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1 = ImVec2(0, 0), const ImVec2& uv2 = ImVec2(1, 0), const ImVec2& uv3 = ImVec2(1, 1), const ImVec2& uv4 = ImVec2(0, 1), ImU32 col = IM_COL32_WHITE) + ///
+ ///
+ /// + /// + /// Image primitives + /// - Read FAQ to understand what ImTextureID/ImTextureRef are. + /// - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. + /// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddImageQuad( + ImDrawList* target, + ImTextureRef tex_ref, + float2* p1, + float2* p2, + float2* p3, + float2* p4, + float2* uv1, + float2* uv2, + float2* uv3, + float2* uv4, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3416 + /// , + /// imgui_draw.cpp:1766 + ///
+ /// void AddImageRounded(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Image primitives + /// - Read FAQ to understand what ImTextureID/ImTextureRef are. + /// - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. + /// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddImageRounded( + ImDrawList* target, + ImTextureRef tex_ref, + float2* p_min, + float2* p_max, + float2* uv_min, + float2* uv_max, + uint col, + float rounding, + ImDrawFlags flags + ); + + /// + /// + /// C++: + /// imgui.h:3421 + ///
inline void PathClear() + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathClear(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3422 + ///
inline void PathLineTo(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathLineTo(ImDrawList* target, float2* pos); + + /// + /// + /// C++: + /// imgui.h:3423 + ///
inline void PathLineToMergeDuplicate(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathLineToMergeDuplicate(ImDrawList* target, float2* pos); + + /// + /// + /// C++: + /// imgui.h:3424 + ///
inline void PathFillConvex(ImU32 col) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathFillConvex(ImDrawList* target, uint col); + + /// + /// + /// C++: + /// imgui.h:3425 + ///
inline void PathFillConcave(ImU32 col) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathFillConcave(ImDrawList* target, uint col); + + /// + /// + /// C++: + /// imgui.h:3426 + ///
inline void PathStroke(ImU32 col, ImDrawFlags flags = 0, float thickness = 1.0f) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathStroke( + ImDrawList* target, + uint col, + ImDrawFlags flags, + float thickness + ); + + /// + /// + /// C++: + /// imgui.h:3427 + /// , + /// imgui_draw.cpp:1262 + ///
+ /// void PathArcTo(const ImVec2& center, float radius, float a_min, float a_max, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathArcTo( + ImDrawList* target, + float2* center, + float radius, + float a_min, + float a_max, + int num_segments + ); + + /// + /// + /// Use precomputed angles for a 12 steps circle + /// + /// + /// C++: + /// imgui.h:3428 + /// , + /// imgui_draw.cpp:1252 + ///
+ /// void PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + /// 0: East, 3: South, 6: West, 9: North, 12: East + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathArcToFast( + ImDrawList* target, + float2* center, + float radius, + int a_min_of_12, + int a_max_of_12 + ); + + /// + /// + /// Ellipse + /// + /// + /// C++: + /// imgui.h:3429 + /// , + /// imgui_draw.cpp:1312 + ///
+ /// void PathEllipticalArcTo(const ImVec2& center, const ImVec2& radius, float rot, float a_min, float a_max, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathEllipticalArcTo( + ImDrawList* target, + float2* center, + float2* radius, + float rot, + float a_min, + float a_max, + int num_segments + ); + + /// + /// + /// Cubic Bezier (4 control points) + /// + /// + /// C++: + /// imgui.h:3430 + /// , + /// imgui_draw.cpp:1395 + ///
+ /// void PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathBezierCubicCurveTo( + ImDrawList* target, + float2* p2, + float2* p3, + float2* p4, + int num_segments + ); + + /// + /// + /// Quadratic Bezier (3 control points) + /// + /// + /// C++: + /// imgui.h:3431 + /// , + /// imgui_draw.cpp:1411 + ///
+ /// void PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathBezierQuadraticCurveTo( + ImDrawList* target, + float2* p2, + float2* p3, + int num_segments + ); + + /// + /// + /// C++: + /// imgui.h:3432 + /// , + /// imgui_draw.cpp:1451 + ///
+ /// void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawFlags flags = 0) + ///
+ ///
+ /// + /// + /// Stateful path API, add points then finish with PathFillConvex() or PathStroke() + /// - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + /// so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathRect( + ImDrawList* target, + float2* rect_min, + float2* rect_max, + float rounding, + ImDrawFlags flags + ); + + /// + /// + /// C++: + /// imgui.h:3443 + /// , + /// imgui_draw.cpp:522 + ///
void AddCallback(ImDrawCallback callback, void* userdata, size_t userdata_size = 0) + ///
+ ///
+ /// + /// + /// Advanced: Draw Callbacks + /// - May be used to alter render state (change sampler, blending, current shader). May be used to emit custom rendering commands (difficult to do correctly, but possible). + /// - Use special ImDrawCallback_ResetRenderState callback to instruct backend to reset its render state to the default. + /// - Your rendering loop must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles. All standard backends are honoring this. + /// - For some backends, the callback may access selected render-states exposed by the backend in a ImGui_ImplXXXX_RenderState structure pointed to by platform_io.Renderer_RenderState. + /// - IMPORTANT: please be mindful of the different level of indirection between using size==0 (copying argument) and using size>0 (copying pointed data into a buffer). + /// - If userdata_size == 0: we copy/store the 'userdata' argument as-is. It will be available unmodified in ImDrawCmd::UserCallbackData during render. + /// - If userdata_size > 0, we copy/store 'userdata_size' bytes pointed to by 'userdata'. We store them in a buffer stored inside the drawlist. ImDrawCmd::UserCallbackData will point inside that buffer so you have to retrieve data from there. Your callback may need to use ImDrawCmd::UserCallbackDataSize if you expect dynamically-sized data. + /// - Support for userdata_size > 0 was added in v1.91.4, October 2024. So earlier code always only allowed to copy/store a simple void*. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddCallback( + ImDrawList* target, + nint callback, + void* userdata, + nuint userdata_size + ); + + /// + /// + /// This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / + /// blending). Otherwise primitives are merged into the same draw-call as much as possible + /// + /// + /// C++: + /// imgui.h:3446 + /// , + /// imgui_draw.cpp:497 + ///
void AddDrawCmd() + ///
+ ///
+ /// + /// + /// Advanced: Miscellaneous + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_AddDrawCmd(ImDrawList* target); + + /// + /// + /// Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer. + /// + /// + /// C++: + /// imgui.h:3447 + /// , + /// imgui_draw.cpp:487 + ///
ImDrawList* CloneOutput() const + ///
+ ///
+ /// + /// + /// Advanced: Miscellaneous + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImDrawList* ImDrawList_CloneOutput(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3455 + ///
inline void ChannelsSplit(int count) + ///
+ ///
+ /// + /// + /// Advanced: Channels + /// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) + /// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) + /// - This API shouldn't have been in ImDrawList in the first place! + /// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. + /// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_ChannelsSplit(ImDrawList* target, int count); + + /// + /// + /// C++: + /// imgui.h:3456 + ///
inline void ChannelsMerge() + ///
+ ///
+ /// + /// + /// Advanced: Channels + /// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) + /// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) + /// - This API shouldn't have been in ImDrawList in the first place! + /// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. + /// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_ChannelsMerge(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3457 + ///
inline void ChannelsSetCurrent(int n) + ///
+ ///
+ /// + /// + /// Advanced: Channels + /// - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) + /// - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) + /// - This API shouldn't have been in ImDrawList in the first place! + /// Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. + /// Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_ChannelsSetCurrent(ImDrawList* target, int n); + + /// + /// + /// C++: + /// imgui.h:3462 + /// , + /// imgui_draw.cpp:711 + ///
void PrimReserve(int idx_count, int vtx_count) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + /// Reserve space for a number of vertices and indices. + /// You must finish filling your reserved data before calling PrimReserve() again, as it may reallocate or + /// submit the intermediate results. PrimUnreserve() can be used to release unused allocations. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimReserve(ImDrawList* target, int idx_count, int vtx_count); + + /// + /// + /// C++: + /// imgui.h:3463 + /// , + /// imgui_draw.cpp:737 + ///
void PrimUnreserve(int idx_count, int vtx_count) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + /// Release the number of reserved vertices/indices from the end of the last reservation made with + /// PrimReserve(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimUnreserve( + ImDrawList* target, + int idx_count, + int vtx_count + ); + + /// + /// + /// Axis aligned rectangle (composed of two triangles) + /// + /// + /// C++: + /// imgui.h:3464 + /// , + /// imgui_draw.cpp:748 + ///
void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + /// Fully unrolled with inline call to keep our debug builds decently fast. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimRect(ImDrawList* target, float2* a, float2* b, uint col); + + /// + /// + /// C++: + /// imgui.h:3465 + /// , + /// imgui_draw.cpp:763 + ///
+ /// void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimRectUV( + ImDrawList* target, + float2* a, + float2* b, + float2* uv_a, + float2* uv_b, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3466 + /// , + /// imgui_draw.cpp:778 + ///
+ /// void PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimQuadUV( + ImDrawList* target, + float2* a, + float2* b, + float2* c, + float2* d, + float2* uv_a, + float2* uv_b, + float2* uv_c, + float2* uv_d, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3467 + ///
inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimWriteVtx( + ImDrawList* target, + float2* pos, + float2* uv, + uint col + ); + + /// + /// + /// C++: + /// imgui.h:3468 + ///
inline void PrimWriteIdx(ImDrawIdx idx) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimWriteIdx(ImDrawList* target, ushort idx); + + /// + /// + /// Write vertex with unique index + /// + /// + /// C++: + /// imgui.h:3469 + ///
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) + ///
+ ///
+ /// + /// + /// Advanced: Primitives allocations + /// - We render triangles (three vertices) + /// - All primitives needs to be reserved via PrimReserve() beforehand. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PrimVtx(ImDrawList* target, float2* pos, float2* uv, uint col); + + /// + /// + /// C++: + /// imgui.h:3483 + /// , + /// imgui_draw.cpp:434 + ///
void _SetDrawListSharedData(ImDrawListSharedData* data) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_SetDrawListSharedData( + ImDrawList* target, + ImDrawListSharedData* data + ); + + /// + /// + /// C++: + /// imgui.h:3484 + /// , + /// imgui_draw.cpp:445 + ///
void _ResetForNewFrame() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Initialize before use in a new frame. We always have a command ready in the buffer. + /// In the majority of cases, you would want to call PushClipRect() and PushTexture() after this. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_ResetForNewFrame(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3485 + /// , + /// imgui_draw.cpp:471 + ///
void _ClearFreeMemory() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_ClearFreeMemory(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3486 + /// , + /// imgui_draw.cpp:511 + ///
void _PopUnusedDrawCmd() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Pop trailing draw command (used before merging or presenting to user) + /// Note that this leaves the ImDrawList in a state unfit for further commands, as most code assume that CmdBuffer.Size > 0 && CmdBuffer.back().UserCallback == NULL + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PopUnusedDrawCmd(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3487 + /// , + /// imgui_draw.cpp:563 + ///
void _TryMergeDrawCmds() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Try to merge two last draw commands + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_TryMergeDrawCmds(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3488 + /// , + /// imgui_draw.cpp:577 + ///
void _OnChangedClipRect() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// Our scheme may appears a bit unusual, basically we want the most-common calls AddLine AddRect etc. to not have to perform any check so we always have a command ready in the stack. + /// The cost of figuring out if a new command has to be added or if we can merge is paid in those Update** functions only. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_OnChangedClipRect(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3489 + /// , + /// imgui_draw.cpp:599 + ///
void _OnChangedTexture() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_OnChangedTexture(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3490 + /// , + /// imgui_draw.cpp:624 + ///
void _OnChangedVtxOffset() + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_OnChangedVtxOffset(ImDrawList* target); + + /// + /// + /// C++: + /// imgui.h:3491 + /// , + /// imgui_draw.cpp:699 + ///
void _SetTexture(ImTextureRef tex_ref) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + /// This is used by ImGui::PushFont()/PopFont(). It works because we never use _TextureIdStack[] + /// elsewhere than in PushTexture()/PopTexture(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_SetTexture(ImDrawList* target, ImTextureRef tex_ref); + + /// + /// + /// C++: + /// imgui.h:3492 + /// , + /// imgui_draw.cpp:640 + ///
int _CalcCircleAutoSegmentCount(float radius) const + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImDrawList_CalcCircleAutoSegmentCount(ImDrawList* target, float radius); + + /// + /// + /// C++: + /// imgui.h:3493 + /// , + /// imgui_draw.cpp:1141 + ///
+ /// void _PathArcToFastEx(const ImVec2& center, float radius, int a_min_sample, int a_max_sample, int a_step) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathArcToFastEx( + ImDrawList* target, + float2* center, + float radius, + int a_min_sample, + int a_max_sample, + int a_step + ); + + /// + /// + /// C++: + /// imgui.h:3494 + /// , + /// imgui_draw.cpp:1233 + ///
+ /// void _PathArcToN(const ImVec2& center, float radius, float a_min, float a_max, int num_segments) + ///
+ ///
+ /// + /// + /// [Internal helpers] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImDrawList_PathArcToN( + ImDrawList* target, + float2* center, + float radius, + float a_min, + float a_max, + int num_segments + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImDrawListSplitter.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImDrawListSplitter.gen.cs new file mode 100644 index 0000000..4d7261e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImDrawListSplitter.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Do not clear Channels[] so our allocations are reused next frame + /// + /// + /// C++: + /// imgui.h:3295 + ///
inline void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawListSplitter_Clear(ImDrawListSplitter* target); + + /// + /// + /// C++: + /// imgui.h:3296 + /// , + /// imgui_draw.cpp:2109 + ///
void ClearFreeMemory() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawListSplitter_ClearFreeMemory(ImDrawListSplitter* target); + + /// + /// + /// C++: + /// imgui.h:3297 + /// , + /// imgui_draw.cpp:2123 + ///
void Split(ImDrawList* draw_list, int count) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawListSplitter_Split( + ImDrawListSplitter* target, + ImDrawList* draw_list, + int count + ); + + /// + /// + /// C++: + /// imgui.h:3298 + /// , + /// imgui_draw.cpp:2153 + ///
void Merge(ImDrawList* draw_list) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawListSplitter_Merge( + ImDrawListSplitter* target, + ImDrawList* draw_list + ); + + /// + /// + /// C++: + /// imgui.h:3299 + /// , + /// imgui_draw.cpp:2224 + ///
void SetCurrentChannel(ImDrawList* draw_list, int channel_idx) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImDrawListSplitter_SetCurrentChannel( + ImDrawListSplitter* target, + ImDrawList* draw_list, + int channel_idx + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImFont.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImFont.gen.cs new file mode 100644 index 0000000..b079aaa --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImFont.gen.cs @@ -0,0 +1,283 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:3944 + /// , + /// imgui_draw.cpp:5250 + ///
bool IsGlyphInFont(ImWchar c) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// This is not fast query + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImFont_IsGlyphInFont(ImFont* target, uint c); + + /// + /// + /// C++: + /// imgui.h:3945 + ///
bool IsLoaded() const + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImFont_IsLoaded(ImFont* target); + + /// + /// + /// Fill ImFontConfig::Name. + /// + /// + /// C++: + /// imgui.h:3946 + ///
const char* GetDebugName() const + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* ImFont_GetDebugName(ImFont* target); + + /// + /// + /// Get or create baked data for given size + /// + /// + /// C++: + /// imgui.h:3951 + /// , + /// imgui_draw.cpp:5288 + ///
ImFontBaked* GetFontBaked(float font_size, float density = -1.0f) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// ImFontBaked pointers are valid for the entire frame but shall never be kept between frames. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFontBaked* ImFont_GetFontBaked( + ImFont* target, + float font_size, + float density + ); + + /// + /// + /// utf8 + /// + /// + /// C++: + /// imgui.h:3952 + /// , + /// imgui_draw.cpp:5465 + ///
+ /// ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end = NULL, const char** remaining = NULL) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 ImFont_CalcTextSizeA( + ImFont* target, + float size, + float max_width, + float wrap_width, + byte* text_begin, + byte* text_end, + byte** remaining + ); + + /// + /// + /// C++: + /// imgui.h:3953 + /// , + /// imgui_draw.cpp:5359 + ///
+ /// const char* CalcWordWrapPosition(float size, const char* text, const char* text_end, float wrap_width) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// Simple word-wrapping for English, not full-featured. Please submit failing cases! + /// This will return the next location to wrap from. If no wrapping if necessary, this will fast-forward to e.g. text_end. + /// FIXME: Much possible improvements (don't cut things like "word !", "word!!!" but cut within "word,,,,", more sensible support for punctuations, support for Unicode punctuations, etc.) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* ImFont_CalcWordWrapPosition( + ImFont* target, + float size, + byte* text, + byte* text_end, + float wrap_width + ); + + /// + /// + /// C++: + /// imgui.h:3954 + /// , + /// imgui_draw.cpp:5550 + ///
+ /// void RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, ImWchar c, const ImVec4* cpu_fine_clip = NULL) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFont_RenderChar( + ImFont* target, + ImDrawList* draw_list, + float size, + float2* pos, + uint col, + uint c, + float4* cpu_fine_clip + ); + + /// + /// + /// C++: + /// imgui.h:3955 + /// , + /// imgui_draw.cpp:5589 + ///
+ /// void RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, bool cpu_fine_clip = false) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. + /// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. + /// + /// + /// Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFont_RenderText( + ImFont* target, + ImDrawList* draw_list, + float size, + float2* pos, + uint col, + float4* clip_rect, + byte* text_begin, + byte* text_end, + float wrap_width, + Bool8 cpu_fine_clip + ); + + /// + /// + /// C++: + /// imgui.h:3961 + /// , + /// imgui_draw.cpp:5087 + ///
void ClearOutputData() + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFont_ClearOutputData(ImFont* target); + + /// + /// + /// Makes 'from_codepoint' character points to 'to_codepoint' glyph. + /// + /// + /// C++: + /// imgui.h:3962 + /// , + /// imgui_draw.cpp:5199 + ///
void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFont_AddRemapChar( + ImFont* target, + uint from_codepoint, + uint to_codepoint + ); + + /// + /// + /// C++: + /// imgui.h:3963 + /// , + /// imgui_draw.cpp:5098 + ///
bool IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last) + ///
+ ///
+ /// + /// + /// [Internal] Don't use! + /// + /// + /// API is designed this way to avoid exposing the 8K page size + /// e.g. use with IsGlyphRangeUnused(0, 255) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImFont_IsGlyphRangeUnused(ImFont* target, uint c_begin, uint c_last); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImFontAtlas.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImFontAtlas.gen.cs new file mode 100644 index 0000000..ea333d0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImFontAtlas.gen.cs @@ -0,0 +1,564 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:3726 + /// , + /// imgui_draw.cpp:3006 + ///
ImFont* AddFont(const ImFontConfig* font_cfg) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* ImFontAtlas_AddFont(ImFontAtlas* target, ImFontConfig* font_cfg); + + /// + /// + /// C++: + /// imgui.h:3727 + /// , + /// imgui_draw.cpp:3105 + ///
ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + /// Load embedded ProggyClean.ttf at size 13, disable oversampling + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* ImFontAtlas_AddFontDefault( + ImFontAtlas* target, + ImFontConfig* font_cfg + ); + + /// + /// + /// C++: + /// imgui.h:3728 + /// , + /// imgui_draw.cpp:3133 + ///
+ /// ImFont* AddFontFromFileTTF(const char* filename, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* ImFontAtlas_AddFontFromFileTTF( + ImFontAtlas* target, + byte* filename, + float size_pixels, + ImFontConfig* font_cfg, + uint* glyph_ranges + ); + + /// + /// + /// Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after destruction of the + /// atlas. Set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be + /// freed. + /// + /// + /// C++: + /// imgui.h:3729 + /// , + /// imgui_draw.cpp:3159 + ///
+ /// ImFont* AddFontFromMemoryTTF(void* font_data, int font_data_size, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + /// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless + /// font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* ImFontAtlas_AddFontFromMemoryTTF( + ImFontAtlas* target, + void* font_data, + int font_data_size, + float size_pixels, + ImFontConfig* font_cfg, + uint* glyph_ranges + ); + + /// + /// + /// 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp. + /// + /// + /// C++: + /// imgui.h:3730 + /// , + /// imgui_draw.cpp:3173 + ///
+ /// ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_data_size, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF( + ImFontAtlas* target, + void* compressed_font_data, + int compressed_font_data_size, + float size_pixels, + ImFontConfig* font_cfg, + uint* glyph_ranges + ); + + /// + /// + /// 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with + /// -base85 parameter. + /// + /// + /// C++: + /// imgui.h:3731 + /// , + /// imgui_draw.cpp:3185 + ///
+ /// ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels = 0.0f, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF( + ImFontAtlas* target, + byte* compressed_font_data_base85, + float size_pixels, + ImFontConfig* font_cfg, + uint* glyph_ranges + ); + + /// + /// + /// C++: + /// imgui.h:3732 + /// , + /// imgui_draw.cpp:3224 + ///
void RemoveFont(ImFont* font) + ///
+ ///
+ /// + /// + /// Load and rasterize multiple TTF/OTF fonts into a same texture. The font atlas will build a single texture holding: + /// - One or more fonts. + /// - Custom graphics data needed to render the shapes needed by Dear ImGui. + /// - Mouse cursor shapes for software cursor rendering (unless setting 'Flags |= ImFontAtlasFlags_NoMouseCursors' in the font atlas). + /// - If you don't call any AddFont*** functions, the default font embedded in the code will be loaded for you. + /// It is the rendering backend responsibility to upload texture into your graphics API: + /// - ImGui_ImplXXXX_RenderDrawData() functions generally iterate platform_io->Textures[] to create/update/destroy each ImTextureData instance. + /// - Backend then set ImTextureData's TexID and BackendUserData. + /// - Texture id are passed back to you during rendering to identify the texture. Read FAQ entry about ImTextureID/ImTextureRef for more details. + /// Legacy path: + /// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. + /// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API. + /// Common pitfalls: + /// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the + /// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data. + /// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction. + /// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed, + /// - Even though many functions are suffixed with "TTF", OTF data is supported just as well. + /// - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_RemoveFont(ImFontAtlas* target, ImFont* font); + + /// + /// + /// Clear everything (input fonts, output glyphs/textures) + /// + /// + /// C++: + /// imgui.h:3734 + /// , + /// imgui_draw.cpp:2657 + ///
void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_Clear(ImFontAtlas* target); + + /// + /// + /// Compact cached glyphs and texture. + /// + /// + /// C++: + /// imgui.h:3735 + /// , + /// imgui_draw.cpp:2666 + ///
void CompactCache() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_CompactCache(ImFontAtlas* target); + + /// + /// + /// Change font loader at runtime. + /// + /// + /// C++: + /// imgui.h:3736 + /// , + /// imgui_draw.cpp:2671 + ///
void SetFontLoader(const ImFontLoader* font_loader) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_SetFontLoader(ImFontAtlas* target, ImFontLoader* font_loader); + + /// + /// + /// [OBSOLETE] Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, + /// etc.) = all the data used to build the texture and fonts. + /// + /// + /// C++: + /// imgui.h:3739 + /// , + /// imgui_draw.cpp:2676 + ///
void ClearInputData() + ///
+ ///
+ /// + /// + /// As we are transitioning toward a new font system, we expect to obsolete those soon: + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_ClearInputData(ImFontAtlas* target); + + /// + /// + /// [OBSOLETE] Clear input+output font data (same as ClearInputData() + glyphs storage, UV coordinates). + /// + /// + /// C++: + /// imgui.h:3740 + /// , + /// imgui_draw.cpp:2703 + ///
void ClearFonts() + ///
+ ///
+ /// + /// + /// As we are transitioning toward a new font system, we expect to obsolete those soon: + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_ClearFonts(ImFontAtlas* target); + + /// + /// + /// [OBSOLETE] Clear CPU-side copy of the texture data. Saves RAM once the texture has been copied to + /// graphics memory. + /// + /// + /// C++: + /// imgui.h:3741 + /// , + /// imgui_draw.cpp:2694 + ///
void ClearTexData() + ///
+ ///
+ /// + /// + /// As we are transitioning toward a new font system, we expect to obsolete those soon: + /// + /// + /// Clear CPU-side copy of the texture data. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_ClearTexData(ImFontAtlas* target); + + /// + /// + /// Basic Latin, Extended Latin + /// + /// + /// C++: + /// imgui.h:3765 + /// , + /// imgui_draw.cpp:4753 + ///
const ImWchar* GetGlyphRangesDefault() + ///
+ ///
+ /// + /// + /// Since 1.92: specifying glyph ranges is only useful/necessary if your backend doesn't support + /// ImGuiBackendFlags_RendererHasTextures! + /// + /// + /// Retrieve list of range (2 int per range, values are inclusive) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial uint* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* target); + + /// + /// + /// Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error. + /// + /// + /// C++: + /// imgui.h:3802 + /// , + /// imgui_draw.cpp:3251 + ///
ImFontAtlasRectId AddCustomRect(int width, int height, ImFontAtlasRect* out_r = NULL) + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + /// At it is common to do an AddCustomRect() followed by a GetCustomRect(), we provide an optional + /// 'ImFontAtlasRect* out_r = NULL' argument to retrieve the info straight away. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFontAtlasRectId ImFontAtlas_AddCustomRect( + ImFontAtlas* target, + int width, + int height, + ImFontAtlasRect* out_r + ); + + /// + /// + /// Unregister a rectangle. Existing pixels will stay in texture until resized / garbage collected. + /// + /// + /// C++: + /// imgui.h:3803 + /// , + /// imgui_draw.cpp:3273 + ///
void RemoveCustomRect(ImFontAtlasRectId id) + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFontAtlas_RemoveCustomRect(ImFontAtlas* target, ImFontAtlasRectId id); + + /// + /// + /// Get rectangle coordinates for current texture. Valid immediately, never store this (read above)! + /// + /// + /// C++: + /// imgui.h:3804 + /// , + /// imgui_draw.cpp:3330 + ///
bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const + ///
+ ///
+ /// + /// + /// Register and retrieve custom rectangles + /// - You can request arbitrary rectangles to be packed into the atlas, for your own purpose. + /// - Since 1.92.X, packing is done immediately in the function call (previously packing was done during the Build call) + /// - You can render your pixels into the texture right after calling the AddCustomRect() functions. + /// - VERY IMPORTANT: + /// - Texture may be created/resized at any time when calling ImGui or ImFontAtlas functions. + /// - IT WILL INVALIDATE RECTANGLE DATA SUCH AS UV COORDINATES. Always use latest values from GetCustomRect(). + /// - UV coordinates are associated to the current texture identifier aka 'atlas->TexRef'. Both TexRef and UV coordinates are typically changed at the same time. + /// - If you render colored output into your custom rectangles: set 'atlas->TexPixelsUseColors = true' as this may help some backends decide of preferred texture format. + /// - Read docs/FONTS.md for more details about using colorful icons. + /// - Note: this API may be reworked further in order to facilitate supporting e.g. multi-monitor, varying DPI settings. + /// - (Pre-1.92 names) ------------> (1.92 names) + /// - GetCustomRectByIndex() --> Use GetCustomRect() + /// - CalcCustomRectUV() --> Use GetCustomRect() and read uv0, uv1 fields. + /// - AddCustomRectRegular() --> Renamed to AddCustomRect() + /// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig + /// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImFontAtlas_GetCustomRect( + ImFontAtlas* target, + ImFontAtlasRectId id, + ImFontAtlasRect* out_r + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImFontBaked.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImFontBaked.gen.cs new file mode 100644 index 0000000..b72f861 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImFontBaked.gen.cs @@ -0,0 +1,109 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:3897 + /// , + /// imgui_draw.cpp:5063 + ///
void ClearOutputData() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImFontBaked_ClearOutputData(ImFontBaked* target); + + /// + /// + /// Return U+FFFD glyph if requested glyph doesn't exists. + /// + /// + /// C++: + /// imgui.h:3898 + /// , + /// imgui_draw.cpp:5205 + ///
ImFontGlyph* FindGlyph(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Find glyph, load if necessary, return fallback if missing + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFontGlyph* ImFontBaked_FindGlyph(ImFontBaked* target, uint c); + + /// + /// + /// Return NULL if glyph doesn't exist + /// + /// + /// C++: + /// imgui.h:3899 + /// , + /// imgui_draw.cpp:5220 + ///
ImFontGlyph* FindGlyphNoFallback(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Attempt to load but when missing, return NULL instead of FallbackGlyph + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImFontGlyph* ImFontBaked_FindGlyphNoFallback(ImFontBaked* target, uint c); + + /// + /// + /// C++: + /// imgui.h:3900 + /// , + /// imgui_draw.cpp:5265 + ///
float GetCharAdvance(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float ImFontBaked_GetCharAdvance(ImFontBaked* target, uint c); + + /// + /// + /// C++: + /// imgui.h:3901 + /// , + /// imgui_draw.cpp:5236 + ///
bool IsGlyphLoaded(ImWchar c) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImFontBaked_IsGlyphLoaded(ImFontBaked* target, uint c); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImFontGlyphRangesBuilder.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImFontGlyphRangesBuilder.gen.cs new file mode 100644 index 0000000..d31fda2 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImFontGlyphRangesBuilder.gen.cs @@ -0,0 +1,126 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:3668 + ///
inline void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontGlyphRangesBuilder_Clear(ImFontGlyphRangesBuilder* target); + + /// + /// + /// Get bit n in the array + /// + /// + /// C++: + /// imgui.h:3669 + ///
inline bool GetBit(size_t n) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImFontGlyphRangesBuilder_GetBit( + ImFontGlyphRangesBuilder* target, + nuint n + ); + + /// + /// + /// Set bit n in the array + /// + /// + /// C++: + /// imgui.h:3670 + ///
inline void SetBit(size_t n) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontGlyphRangesBuilder_SetBit( + ImFontGlyphRangesBuilder* target, + nuint n + ); + + /// + /// + /// Add character + /// + /// + /// C++: + /// imgui.h:3671 + ///
inline void AddChar(ImWchar c) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontGlyphRangesBuilder_AddChar( + ImFontGlyphRangesBuilder* target, + uint c + ); + + /// + /// + /// Add string (each character of the UTF-8 string are added) + /// + /// + /// C++: + /// imgui.h:3672 + /// , + /// imgui_draw.cpp:5019 + ///
void AddText(const char* text, const char* text_end = NULL) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontGlyphRangesBuilder_AddText( + ImFontGlyphRangesBuilder* target, + byte* text, + byte* text_end + ); + + /// + /// + /// Add ranges, e.g. builder.AddRanges(ImFontAtlas::GetGlyphRangesDefault()) to force add all of + /// ASCII/Latin+Ext + /// + /// + /// C++: + /// imgui.h:3673 + /// , + /// imgui_draw.cpp:5032 + ///
void AddRanges(const ImWchar* ranges) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontGlyphRangesBuilder_AddRanges( + ImFontGlyphRangesBuilder* target, + uint* ranges + ); + + /// + /// + /// Output new ranges + /// + /// + /// C++: + /// imgui.h:3674 + /// , + /// imgui_draw.cpp:5039 + ///
void BuildRanges(ImVector<ImWchar>* out_ranges) + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImFontGlyphRangesBuilder_BuildRanges( + ImFontGlyphRangesBuilder* target, + ImVector* out_ranges + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiIO.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiIO.gen.cs new file mode 100644 index 0000000..2c11538 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiIO.gen.cs @@ -0,0 +1,381 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the + /// key end-user would use to emit an 'A' character) + /// + /// + /// C++: + /// imgui.h:2577 + /// , + /// imgui.cpp:1808 + ///
void AddKeyEvent(ImGuiKey key, bool down) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddKeyEvent(ImGuiIO* target, ImGuiKey key, Bool8 down); + + /// + /// + /// Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should + /// be handled by the backend. + /// + /// + /// C++: + /// imgui.h:2578 + /// , + /// imgui.cpp:1768 + ///
void AddKeyAnalogEvent(ImGuiKey key, bool down, float v) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Queue a new key down/up event. + /// - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character) + /// - bool down: Is the key down? use false to signify a key release. + /// - float analog_value: 0.0f..1.0f + /// IMPORTANT: THIS FUNCTION AND OTHER "ADD" GRABS THE CONTEXT FROM OUR INSTANCE. + /// WE NEED TO ENSURE THAT ALL FUNCTION CALLS ARE FULFILLING THIS, WHICH IS WHY GetKeyData() HAS AN EXPLICIT CONTEXT. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddKeyAnalogEvent( + ImGuiIO* target, + ImGuiKey key, + Bool8 down, + float v + ); + + /// + /// + /// Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and + /// not hovered) + /// + /// + /// C++: + /// imgui.h:2579 + /// , + /// imgui.cpp:1837 + ///
void AddMousePosEvent(float x, float y) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Queue a mouse move event + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddMousePosEvent(ImGuiIO* target, float x, float y); + + /// + /// + /// Queue a mouse button change + /// + /// + /// C++: + /// imgui.h:2580 + /// , + /// imgui.cpp:1863 + ///
void AddMouseButtonEvent(int button, bool down) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddMouseButtonEvent(ImGuiIO* target, int button, Bool8 down); + + /// + /// + /// Queue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll + /// right, wheel_x>0: scroll left. + /// + /// + /// C++: + /// imgui.h:2581 + /// , + /// imgui.cpp:1912 + ///
void AddMouseWheelEvent(float wheel_x, float wheel_y) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Queue a mouse wheel event (some mouse/API may only have a Y component) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddMouseWheelEvent(ImGuiIO* target, float wheel_x, float wheel_y); + + /// + /// + /// Queue a mouse source change (Mouse/TouchScreen/Pen) + /// + /// + /// C++: + /// imgui.h:2582 + /// , + /// imgui.cpp:1933 + ///
void AddMouseSourceEvent(ImGuiMouseSource source) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// This is not a real event, the data is latched in order to be stored in actual Mouse events. + /// This is so that duplicate events (e.g. Windows sending extraneous WM_MOUSEMOVE) gets filtered and are not leading to actual source changes. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddMouseSourceEvent(ImGuiIO* target, ImGuiMouseSource source); + + /// + /// + /// Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to + /// call this (for multi-viewport support). + /// + /// + /// C++: + /// imgui.h:2583 + /// , + /// imgui.cpp:1940 + ///
void AddMouseViewportEvent(ImGuiID id) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddMouseViewportEvent(ImGuiIO* target, ImGuiID id); + + /// + /// + /// Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window) + /// + /// + /// C++: + /// imgui.h:2584 + /// , + /// imgui.cpp:1961 + ///
void AddFocusEvent(bool focused) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddFocusEvent(ImGuiIO* target, Bool8 focused); + + /// + /// + /// Queue a new character input + /// + /// + /// C++: + /// imgui.h:2585 + /// , + /// imgui.cpp:1629 + ///
void AddInputCharacter(unsigned int c) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// Pass in translated ASCII characters for text input. + /// - with glfw you can get those from the callback set in glfwSetCharCallback() + /// - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message + /// FIXME: Should in theory be called "AddCharacterEvent()" to be consistent with new API + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddInputCharacter(ImGuiIO* target, uint c); + + /// + /// + /// Queue a new character input from a UTF-16 character, it can be a surrogate + /// + /// + /// C++: + /// imgui.h:2586 + /// , + /// imgui.cpp:1646 + ///
void AddInputCharacterUTF16(ImWchar16 c) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + /// UTF16 strings use surrogate pairs to encode codepoints >= 0x10000, so + /// we should save the high surrogate. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddInputCharacterUTF16(ImGuiIO* target, ushort c); + + /// + /// + /// Queue a new characters input from a UTF-8 string + /// + /// + /// C++: + /// imgui.h:2587 + /// , + /// imgui.cpp:1680 + ///
void AddInputCharactersUTF8(const char* str) + ///
+ ///
+ /// + /// + /// Input Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* target, byte* str); + + /// + /// + /// [Optional] Specify index for legacy <1.87 IsKeyXXX() functions with native indices + specify + /// native keycode, scancode. + /// + /// + /// C++: + /// imgui.h:2589 + /// , + /// imgui.cpp:1818 + ///
+ /// void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index = -1) + ///
+ ///
+ /// + /// + /// [Optional] Call after AddKeyEvent(). + /// Specify native keycode, scancode + Specify index for legacy <1.87 IsKeyXXX() functions with native indices. + /// If you are writing a backend in 2022 or don't use IsKeyXXX() with native values that are not ImGuiKey values, you can avoid calling this. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_SetKeyEventNativeData( + ImGuiIO* target, + ImGuiKey key, + int native_keycode, + int native_scancode, + int native_legacy_index + ); + + /// + /// + /// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native + /// dialog boxes that are interrupting your application loop/refresh, and you want to disable events + /// being queued while your app is frozen. + /// + /// + /// C++: + /// imgui.h:2590 + /// , + /// imgui.cpp:1831 + ///
void SetAppAcceptingEvents(bool accepting_events) + ///
+ ///
+ /// + /// + /// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native + /// dialog boxes that are interrupting your application loop/refresh, and you want to disable events + /// being queued while your app is frozen. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_SetAppAcceptingEvents(ImGuiIO* target, Bool8 accepting_events); + + /// + /// + /// Clear all incoming events. + /// + /// + /// C++: + /// imgui.h:2591 + /// , + /// imgui.cpp:1693 + ///
void ClearEventsQueue() + ///
+ ///
+ /// + /// + /// Clear all incoming events. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_ClearEventsQueue(ImGuiIO* target); + + /// + /// + /// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all + /// keys/buttons. + /// + /// + /// C++: + /// imgui.h:2592 + /// , + /// imgui.cpp:1701 + ///
void ClearInputKeys() + ///
+ ///
+ /// + /// + /// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all + /// keys/buttons. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_ClearInputKeys(ImGuiIO* target); + + /// + /// + /// Clear current mouse state. + /// + /// + /// C++: + /// imgui.h:2593 + /// , + /// imgui.cpp:1718 + ///
void ClearInputMouse() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiIO_ClearInputMouse(ImGuiIO* target); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiInputTextCallbackData.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiInputTextCallbackData.gen.cs new file mode 100644 index 0000000..225f3dd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiInputTextCallbackData.gen.cs @@ -0,0 +1,115 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:2726 + /// , + /// imgui_widgets.cpp:4274 + ///
void DeleteChars(int pos, int bytes_count) + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + /// Public API to manipulate UTF-8 text from within a callback. + /// FIXME: The existence of this rarely exercised code path is a bit of a nuisance. + /// Historically they existed because STB_TEXTEDIT_INSERTCHARS() etc. worked on our ImWchar + /// buffer, but nowadays they both work on UTF-8 data. Should aim to merge both. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextCallbackData_DeleteChars( + ImGuiInputTextCallbackData* target, + int pos, + int bytes_count + ); + + /// + /// + /// C++: + /// imgui.h:2727 + /// , + /// imgui_widgets.cpp:4290 + ///
void InsertChars(int pos, const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextCallbackData_InsertChars( + ImGuiInputTextCallbackData* target, + int pos, + byte* text, + byte* text_end + ); + + /// + /// + /// C++: + /// imgui.h:2728 + ///
void SelectAll() + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextCallbackData_SelectAll(ImGuiInputTextCallbackData* target); + + /// + /// + /// C++: + /// imgui.h:2729 + ///
void ClearSelection() + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiInputTextCallbackData_ClearSelection( + ImGuiInputTextCallbackData* target + ); + + /// + /// + /// C++: + /// imgui.h:2730 + ///
bool HasSelection() const + ///
+ ///
+ /// + /// + /// Helper functions for text manipulation. + /// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiInputTextCallbackData_HasSelection( + ImGuiInputTextCallbackData* target + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiListClipper.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiListClipper.gen.cs new file mode 100644 index 0000000..6e375e8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiListClipper.gen.cs @@ -0,0 +1,147 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:2946 + /// , + /// imgui.cpp:3212 + ///
void Begin(int items_count, float items_height = -1.0f) + ///
+ ///
+ /// + /// + /// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need) + /// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiListClipper_Begin( + ImGuiListClipper* target, + int items_count, + float items_height + ); + + /// + /// + /// Automatically called on the last call of Step() that returns false. + /// + /// + /// C++: + /// imgui.h:2947 + /// , + /// imgui.cpp:3241 + ///
void End() + ///
+ ///
+ /// + /// + /// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need) + /// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiListClipper_End(ImGuiListClipper* target); + + /// + /// + /// Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw + /// those items. + /// + /// + /// C++: + /// imgui.h:2948 + /// , + /// imgui.cpp:3441 + ///
bool Step() + ///
+ ///
+ /// + /// + /// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need) + /// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiListClipper_Step(ImGuiListClipper* target); + + /// + /// + /// C++: + /// imgui.h:2952 + ///
inline void IncludeItemByIndex(int item_index) + ///
+ ///
+ /// + /// + /// Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility. + /// (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiListClipper_IncludeItemByIndex( + ImGuiListClipper* target, + int item_index + ); + + /// + /// + /// item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped. + /// + /// + /// C++: + /// imgui.h:2953 + /// , + /// imgui.cpp:3264 + ///
void IncludeItemsByIndex(int item_begin, int item_end) + ///
+ ///
+ /// + /// + /// Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility. + /// (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiListClipper_IncludeItemsByIndex( + ImGuiListClipper* target, + int item_begin, + int item_end + ); + + /// + /// + /// C++: + /// imgui.h:2958 + /// , + /// imgui.cpp:3275 + ///
void SeekCursorForItem(int item_index) + ///
+ ///
+ /// + /// + /// Seek cursor toward given item. This is automatically called while stepping. + /// - The only reason to call this is: you can use ImGuiListClipper::Begin(INT_MAX) if you don't know item count ahead of time. + /// - In this case, after all steps are done, you'll want to call SeekCursorForItem(item_count). + /// + /// + /// This is already called while stepping. + /// The ONLY reason you may want to call this is if you passed INT_MAX to ImGuiListClipper::Begin() because you couldn't step item count beforehand. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiListClipper_SeekCursorForItem( + ImGuiListClipper* target, + int item_index + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiPayload.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiPayload.gen.cs new file mode 100644 index 0000000..6f84f5c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiPayload.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:2781 + ///
void Clear() + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial void ImGuiPayload_Clear(ImGuiPayload* target); + + /// + /// + /// C++: + /// imgui.h:2782 + ///
bool IsDataType(const char* type) const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiPayload_IsDataType(ImGuiPayload* target, byte* type); + + /// + /// + /// C++: + /// imgui.h:2783 + ///
bool IsPreview() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiPayload_IsPreview(ImGuiPayload* target); + + /// + /// + /// C++: + /// imgui.h:2784 + ///
bool IsDelivery() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiPayload_IsDelivery(ImGuiPayload* target); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiSelectionBasicStorage.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiSelectionBasicStorage.gen.cs new file mode 100644 index 0000000..bf7b461 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiSelectionBasicStorage.gen.cs @@ -0,0 +1,194 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses + /// 'items_count' passed to BeginMultiSelect() + /// + /// + /// C++: + /// imgui.h:3174 + /// , + /// imgui_widgets.cpp:8359 + ///
void ApplyRequests(ImGuiMultiSelectIO* ms_io) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// Apply requests coming from BeginMultiSelect() and EndMultiSelect(). + /// - Enable 'Demo->Tools->Debug Log->Selection' to see selection requests as they happen. + /// - Honoring SetRange requests requires that you can iterate/interpolate between RangeFirstItem and RangeLastItem. + /// - In this demo we often submit indices to SetNextItemSelectionUserData() + store the same indices in persistent selection. + /// - Your code may do differently. If you store pointers or objects ID in ImGuiSelectionUserData you may need to perform + /// a lookup in order to have some way to iterate/interpolate between two items. + /// - A full-featured application is likely to allow search/filtering which is likely to lead to using indices + /// and constructing a view index <> object id/ptr data structure anyway. + /// WHEN YOUR APPLICATION SETTLES ON A CHOICE, YOU WILL PROBABLY PREFER TO GET RID OF THIS UNNECESSARY 'ImGuiSelectionBasicStorage' INDIRECTION LOGIC. + /// Notice that with the simplest adapter (using indices everywhere), all functions return their parameters. + /// The most simple implementation (using indices everywhere) would look like: + /// for (ImGuiSelectionRequest& req : ms_io->Requests) + /// { + /// if (req.Type == ImGuiSelectionRequestType_SetAll) { Clear(); if (req.Selected) { for (int n = 0; n < items_count; n++) { SetItemSelected(n, true); } } + /// if (req.Type == ImGuiSelectionRequestType_SetRange) { for (int n = (int)ms_io->RangeFirstItem; n <= (int)ms_io->RangeLastItem; n++) { SetItemSelected(n, ms_io->Selected); } } + /// } + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiSelectionBasicStorage_ApplyRequests( + ImGuiSelectionBasicStorage* target, + ImGuiMultiSelectIO* ms_io + ); + + /// + /// + /// Query if an item id is in selection. + /// + /// + /// C++: + /// imgui.h:3175 + /// , + /// imgui_widgets.cpp:8280 + ///
bool Contains(ImGuiID id) const + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiSelectionBasicStorage_Contains( + ImGuiSelectionBasicStorage* target, + ImGuiID id + ); + + /// + /// + /// Clear selection + /// + /// + /// C++: + /// imgui.h:3176 + /// , + /// imgui_widgets.cpp:8266 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiSelectionBasicStorage_Clear(ImGuiSelectionBasicStorage* target); + + /// + /// + /// Swap two selections + /// + /// + /// C++: + /// imgui.h:3177 + /// , + /// imgui_widgets.cpp:8273 + ///
void Swap(ImGuiSelectionBasicStorage& r) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiSelectionBasicStorage_Swap( + ImGuiSelectionBasicStorage* target, + ImGuiSelectionBasicStorage* r + ); + + /// + /// + /// Add/remove an item from selection (generally done by ApplyRequests() function) + /// + /// + /// C++: + /// imgui.h:3178 + /// , + /// imgui_widgets.cpp:8314 + ///
void SetItemSelected(ImGuiID id, bool selected) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiSelectionBasicStorage_SetItemSelected( + ImGuiSelectionBasicStorage* target, + ImGuiID id, + Bool8 selected + ); + + /// + /// + /// Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, + /// &id)) { ... }' + /// + /// + /// C++: + /// imgui.h:3179 + /// , + /// imgui_widgets.cpp:8294 + ///
bool GetNextSelectedItem(void** opaque_it, ImGuiID* out_id) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// GetNextSelectedItem() is an abstraction allowing us to change our underlying actual storage system without impacting user. + /// (e.g. store unselected vs compact down, compact down on demand, use raw ImVector<ImGuiID> instead of ImGuiStorage...) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiSelectionBasicStorage_GetNextSelectedItem( + ImGuiSelectionBasicStorage* target, + void** opaque_it, + ImGuiID* out_id + ); + + /// + /// + /// Convert index to item id based on provided adapter. + /// + /// + /// C++: + /// imgui.h:3180 + ///
inline ImGuiID GetStorageIdFromIndex(int idx) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiID ImGuiSelectionBasicStorage_GetStorageIdFromIndex( + ImGuiSelectionBasicStorage* target, + int idx + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiSelectionExternalStorage.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiSelectionExternalStorage.gen.cs new file mode 100644 index 0000000..3d41977 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiSelectionExternalStorage.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Apply selection requests by using AdapterSetItemSelected() calls + /// + /// + /// C++: + /// imgui.h:3193 + /// , + /// imgui_widgets.cpp:8428 + ///
void ApplyRequests(ImGuiMultiSelectIO* ms_io) + ///
+ ///
+ /// + /// + /// Methods + /// + /// + /// Apply requests coming from BeginMultiSelect() and EndMultiSelect(). + /// We also pull 'ms_io->ItemsCount' as passed for BeginMultiSelect() for consistency with ImGuiSelectionBasicStorage + /// This makes no assumption about underlying storage. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiSelectionExternalStorage_ApplyRequests( + ImGuiSelectionExternalStorage* target, + ImGuiMultiSelectIO* ms_io + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiStorage.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiStorage.gen.cs new file mode 100644 index 0000000..d6497b7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiStorage.gen.cs @@ -0,0 +1,336 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:2882 + ///
void Clear() + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_Clear(ImGuiStorage* target); + + /// + /// + /// C++: + /// imgui.h:2883 + /// , + /// imgui.cpp:2862 + ///
int GetInt(ImGuiID key, int default_val = 0) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImGuiStorage_GetInt(ImGuiStorage* target, ImGuiID key, int default_val); + + /// + /// + /// C++: + /// imgui.h:2884 + /// , + /// imgui.cpp:2922 + ///
void SetInt(ImGuiID key, int val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + /// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad + /// because it only happens on explicit interaction (maximum one a frame) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_SetInt(ImGuiStorage* target, ImGuiID key, int val); + + /// + /// + /// C++: + /// imgui.h:2885 + /// , + /// imgui.cpp:2870 + ///
bool GetBool(ImGuiID key, bool default_val = false) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiStorage_GetBool( + ImGuiStorage* target, + ImGuiID key, + Bool8 default_val + ); + + /// + /// + /// C++: + /// imgui.h:2886 + /// , + /// imgui.cpp:2931 + ///
void SetBool(ImGuiID key, bool val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_SetBool(ImGuiStorage* target, ImGuiID key, Bool8 val); + + /// + /// + /// C++: + /// imgui.h:2887 + /// , + /// imgui.cpp:2875 + ///
float GetFloat(ImGuiID key, float default_val = 0.0f) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float ImGuiStorage_GetFloat( + ImGuiStorage* target, + ImGuiID key, + float default_val + ); + + /// + /// + /// C++: + /// imgui.h:2888 + /// , + /// imgui.cpp:2936 + ///
void SetFloat(ImGuiID key, float val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_SetFloat(ImGuiStorage* target, ImGuiID key, float val); + + /// + /// + /// default_val is NULL + /// + /// + /// C++: + /// imgui.h:2889 + /// , + /// imgui.cpp:2883 + ///
void* GetVoidPtr(ImGuiID key) const + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void* ImGuiStorage_GetVoidPtr(ImGuiStorage* target, ImGuiID key); + + /// + /// + /// C++: + /// imgui.h:2890 + /// , + /// imgui.cpp:2945 + ///
void SetVoidPtr(ImGuiID key, void* val) + ///
+ ///
+ /// + /// + /// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) + /// - Set***() functions find pair, insertion on demand if missing. + /// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_SetVoidPtr(ImGuiStorage* target, ImGuiID key, void* val); + + /// + /// + /// C++: + /// imgui.h:2896 + /// , + /// imgui.cpp:2892 + ///
int* GetIntRef(ImGuiID key, int default_val = 0) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + /// References are only valid until a new value is added to the storage. Calling a Set***() function or + /// a Get***Ref() function invalidates the pointer. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int* ImGuiStorage_GetIntRef( + ImGuiStorage* target, + ImGuiID key, + int default_val + ); + + /// + /// + /// C++: + /// imgui.h:2897 + /// , + /// imgui.cpp:2900 + ///
bool* GetBoolRef(ImGuiID key, bool default_val = false) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8* ImGuiStorage_GetBoolRef( + ImGuiStorage* target, + ImGuiID key, + Bool8 default_val + ); + + /// + /// + /// C++: + /// imgui.h:2898 + /// , + /// imgui.cpp:2905 + ///
float* GetFloatRef(ImGuiID key, float default_val = 0.0f) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float* ImGuiStorage_GetFloatRef( + ImGuiStorage* target, + ImGuiID key, + float default_val + ); + + /// + /// + /// C++: + /// imgui.h:2899 + /// , + /// imgui.cpp:2913 + ///
void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL) + ///
+ ///
+ /// + /// + /// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. + /// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. + /// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) + /// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void** ImGuiStorage_GetVoidPtrRef( + ImGuiStorage* target, + ImGuiID key, + void* default_val + ); + + /// + /// + /// C++: + /// imgui.h:2902 + /// , + /// imgui.cpp:2857 + ///
void BuildSortByKey() + ///
+ ///
+ /// + /// + /// Advanced: for quicker full rebuild of a storage (instead of an incremental one), you may add all + /// your contents and then sort once. + /// + /// + /// For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents + /// and then sort once. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_BuildSortByKey(ImGuiStorage* target); + + /// + /// + /// C++: + /// imgui.h:2904 + /// , + /// imgui.cpp:2954 + ///
void SetAllInt(int val) + ///
+ ///
+ /// + /// + /// Obsolete: use on your own storage if you know only integer are being stored (open/close all tree + /// nodes) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStorage_SetAllInt(ImGuiStorage* target, int val); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiStyle.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiStyle.gen.cs new file mode 100644 index 0000000..8a6a93d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiStyle.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Scale all spacing/padding/thickness values. Do not scale fonts. + /// + /// + /// C++: + /// imgui.h:2408 + /// , + /// imgui.cpp:1494 + ///
void ScaleAllSizes(float scale_factor) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + /// Scale all spacing/padding/thickness values. Do not scale fonts. + /// Important: This operation is lossy because we round all sizes to integer. If you need to change your scale multiples, call this over a freshly initialized ImGuiStyle structure rather than scaling multiple times. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiStyle_ScaleAllSizes(ImGuiStyle* target, float scale_factor); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiTextFilter.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiTextFilter.gen.cs new file mode 100644 index 0000000..aa56f15 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiTextFilter.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Helper calling InputText+Build + /// + /// + /// C++: + /// imgui.h:2812 + /// , + /// imgui.cpp:2977 + ///
bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f) + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiTextFilter_Draw(ImGuiTextFilter* target, byte* label, float width); + + /// + /// + /// C++: + /// imgui.h:2813 + /// , + /// imgui.cpp:3025 + ///
bool PassFilter(const char* text, const char* text_end = NULL) const + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiTextFilter_PassFilter( + ImGuiTextFilter* target, + byte* text, + byte* text_end + ); + + /// + /// + /// C++: + /// imgui.h:2814 + /// , + /// imgui.cpp:3005 + ///
void Build() + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiTextFilter_Build(ImGuiTextFilter* target); + + /// + /// + /// C++: + /// imgui.h:2815 + ///
void Clear() + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImGuiTextFilter_Clear(ImGuiTextFilter* target); + + /// + /// + /// C++: + /// imgui.h:2816 + ///
bool IsActive() const + ///
+ ///
+ /// + /// + /// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImGuiTextFilter_IsActive(ImGuiTextFilter* target); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImGuiViewport.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImGuiViewport.gen.cs new file mode 100644 index 0000000..6f01b73 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImGuiViewport.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:4048 + ///
ImVec2 GetCenter() const + ///
+ ///
+ /// + /// + /// Helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 ImGuiViewport_GetCenter(ImGuiViewport* target); + + /// + /// + /// C++: + /// imgui.h:4049 + ///
ImVec2 GetWorkCenter() const + ///
+ ///
+ /// + /// + /// Helpers + /// + /// + [LibraryImport("imgui")] + public static unsafe partial float2 ImGuiViewport_GetWorkCenter(ImGuiViewport* target); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImTextureData.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImTextureData.gen.cs new file mode 100644 index 0000000..68f890c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImTextureData.gen.cs @@ -0,0 +1,177 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:3588 + /// , + /// imgui_draw.cpp:2463 + ///
void Create(ImTextureFormat format, int w, int h) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImTextureData_Create( + ImTextureData* target, + ImTextureFormat format, + int w, + int h + ); + + /// + /// + /// C++: + /// imgui.h:3589 + /// , + /// imgui_draw.cpp:2481 + ///
void DestroyPixels() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImTextureData_DestroyPixels(ImTextureData* target); + + /// + /// + /// C++: + /// imgui.h:3590 + ///
void* GetPixels() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void* ImTextureData_GetPixels(ImTextureData* target); + + /// + /// + /// C++: + /// imgui.h:3591 + ///
void* GetPixelsAt(int x, int y) + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void* ImTextureData_GetPixelsAt(ImTextureData* target, int x, int y); + + /// + /// + /// C++: + /// imgui.h:3592 + ///
int GetSizeInBytes() const + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImTextureData_GetSizeInBytes(ImTextureData* target); + + /// + /// + /// C++: + /// imgui.h:3593 + ///
int GetPitch() const + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int ImTextureData_GetPitch(ImTextureData* target); + + /// + /// + /// C++: + /// imgui.h:3594 + ///
ImTextureRef GetTexRef() + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImTextureRef ImTextureData_GetTexRef(ImTextureData* target); + + /// + /// + /// C++: + /// imgui.h:3595 + ///
ImTextureID GetTexID() const + ///
+ ///
+ /// + /// + /// Functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImTextureID ImTextureData_GetTexID(ImTextureData* target); + + /// + /// + /// Call after creating or destroying the texture. Never modify TexID directly! + /// + /// + /// C++: + /// imgui.h:3598 + ///
void SetTexID(ImTextureID tex_id) + ///
+ ///
+ /// + /// + /// Called by Renderer backend + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImTextureData_SetTexID(ImTextureData* target, ImTextureID tex_id); + + /// + /// + /// Call after honoring a request. Never modify Status directly! + /// + /// + /// C++: + /// imgui.h:3599 + ///
void SetStatus(ImTextureStatus status) + ///
+ ///
+ /// + /// + /// Called by Renderer backend + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImTextureData_SetStatus(ImTextureData* target, ImTextureStatus status); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImTextureRef.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImTextureRef.gen.cs new file mode 100644 index 0000000..0207a00 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImTextureRef.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// == (_TexData ? _TexData->TexID : _TexID) // Implemented below in the file. + /// + /// + /// C++: + /// imgui.h:377 + ///
inline ImTextureID GetTexID() const + ///
+ ///
+ [LibraryImport("imgui")] + public static unsafe partial ImTextureID ImTextureRef_GetTexID(ImTextureRef* target); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Image.gen.cs b/Brutal.ImGui/Generated/PInvoke/Image.gen.cs new file mode 100644 index 0000000..8f1ee1e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Image.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:659 + /// , + /// imgui_widgets.cpp:1138 + ///
+ /// void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1)) + ///
+ ///
+ /// + /// + /// Widgets: Images + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. + /// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Image(ImTextureRef tex_ref, float2* image_size, float2* uv0, float2* uv1); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImageButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImageButton.gen.cs new file mode 100644 index 0000000..421e730 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImageButton.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:661 + /// , + /// imgui_widgets.cpp:1185 + ///
+ /// bool ImageButton(const char* str_id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)) + ///
+ ///
+ /// + /// + /// Widgets: Images + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. + /// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function. + /// + /// + /// - ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. (#8165) // FIXME: Maybe that's not the best design? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ImageButton( + byte* str_id, + ImTextureRef tex_ref, + float2* image_size, + float2* uv0, + float2* uv1, + float4* bg_col, + float4* tint_col + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ImageWithBg.gen.cs b/Brutal.ImGui/Generated/PInvoke/ImageWithBg.gen.cs new file mode 100644 index 0000000..b22022c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ImageWithBg.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:660 + /// , + /// imgui_widgets.cpp:1117 + ///
+ /// void ImageWithBg(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)) + ///
+ ///
+ /// + /// + /// Widgets: Images + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side. + /// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. + /// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function. + /// + /// + /// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples + /// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ImageWithBg( + ImTextureRef tex_ref, + float2* image_size, + float2* uv0, + float2* uv1, + float4* bg_col, + float4* tint_col + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Indent.gen.cs b/Brutal.ImGui/Generated/PInvoke/Indent.gen.cs new file mode 100644 index 0000000..7d9ecf2 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Indent.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0 + /// + /// + /// C++: + /// imgui.h:589 + /// , + /// imgui.cpp:11931 + ///
void Indent(float indent_w = 0.0f) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Indent(float indent_w); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputDouble.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputDouble.gen.cs new file mode 100644 index 0000000..0677161 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputDouble.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:732 + /// , + /// imgui_widgets.cpp:3907 + ///
+ /// bool InputDouble(const char* label, double* v, double step = 0.0, double step_fast = 0.0, const char* format = "%.6f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputDouble( + byte* label, + double* v, + double step, + double step_fast, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputFloat.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputFloat.gen.cs new file mode 100644 index 0000000..6d8f658 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputFloat.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:724 + /// , + /// imgui_widgets.cpp:3865 + ///
+ /// bool InputFloat(const char* label, float* v, float step = 0.0f, float step_fast = 0.0f, const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputFloat( + byte* label, + float* v, + float step, + float step_fast, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputFloat2.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputFloat2.gen.cs new file mode 100644 index 0000000..81766c7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputFloat2.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:725 + /// , + /// imgui_widgets.cpp:3870 + ///
+ /// bool InputFloat2(const char* label, float v[2], const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputFloat2( + byte* label, + float2* v, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputFloat3.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputFloat3.gen.cs new file mode 100644 index 0000000..5454135 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputFloat3.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:726 + /// , + /// imgui_widgets.cpp:3875 + ///
+ /// bool InputFloat3(const char* label, float v[3], const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputFloat3( + byte* label, + float3* v, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputFloat4.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputFloat4.gen.cs new file mode 100644 index 0000000..a02b418 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputFloat4.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:727 + /// , + /// imgui_widgets.cpp:3880 + ///
+ /// bool InputFloat4(const char* label, float v[4], const char* format = "%.3f", ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputFloat4( + byte* label, + float4* v, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputInt.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputInt.gen.cs new file mode 100644 index 0000000..d57ab10 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputInt.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:728 + /// , + /// imgui_widgets.cpp:3885 + ///
+ /// bool InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputInt( + byte* label, + int* v, + int step, + int step_fast, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputInt2.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputInt2.gen.cs new file mode 100644 index 0000000..256199e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputInt2.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:729 + /// , + /// imgui_widgets.cpp:3892 + ///
bool InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputInt2(byte* label, int2* v, ImGuiInputTextFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputInt3.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputInt3.gen.cs new file mode 100644 index 0000000..b65be7e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputInt3.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:730 + /// , + /// imgui_widgets.cpp:3897 + ///
bool InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputInt3(byte* label, int3* v, ImGuiInputTextFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputInt4.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputInt4.gen.cs new file mode 100644 index 0000000..18563f5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputInt4.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:731 + /// , + /// imgui_widgets.cpp:3902 + ///
bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputInt4(byte* label, int4* v, ImGuiInputTextFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputScalar.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputScalar.gen.cs new file mode 100644 index 0000000..54efaa8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputScalar.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:733 + /// , + /// imgui_widgets.cpp:3746 + ///
+ /// bool InputScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + /// Note: p_data, p_step, p_step_fast are _pointers_ to a memory address holding the data. For an Input widget, p_step and p_step_fast are optional. + /// Read code of e.g. InputFloat(), InputInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputScalar( + byte* label, + ImGuiDataType data_type, + void* p_data, + void* p_step, + void* p_step_fast, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputScalarN.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputScalarN.gen.cs new file mode 100644 index 0000000..6a5f9da --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputScalarN.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:734 + /// , + /// imgui_widgets.cpp:3830 + ///
+ /// bool InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputScalarN( + byte* label, + ImGuiDataType data_type, + void* p_data, + int components, + void* p_step, + void* p_step_fast, + byte* format, + ImGuiInputTextFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputText.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputText.gen.cs new file mode 100644 index 0000000..e51bffc --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputText.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:721 + /// , + /// imgui_widgets.cpp:3931 + ///
+ /// bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputText( + byte* label, + byte* buf, + nuint buf_size, + ImGuiInputTextFlags flags, + nint callback, + void* user_data + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputTextMultiline.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputTextMultiline.gen.cs new file mode 100644 index 0000000..e7d8cde --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputTextMultiline.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:722 + /// , + /// imgui_widgets.cpp:3937 + ///
+ /// bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputTextMultiline( + byte* label, + byte* buf, + nuint buf_size, + float2* size, + ImGuiInputTextFlags flags, + nint callback, + void* user_data + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InputTextWithHint.gen.cs b/Brutal.ImGui/Generated/PInvoke/InputTextWithHint.gen.cs new file mode 100644 index 0000000..3baa8be --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InputTextWithHint.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:723 + /// , + /// imgui_widgets.cpp:3942 + ///
+ /// bool InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Input with Keyboard + /// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp. + /// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InputTextWithHint( + byte* label, + byte* hint, + byte* buf, + nuint buf_size, + ImGuiInputTextFlags flags, + nint callback, + void* user_data + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/InvisibleButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/InvisibleButton.gen.cs new file mode 100644 index 0000000..12417b8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/InvisibleButton.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// flexible button behavior without the visuals, frequently useful to build custom behaviors using the + /// public api (along with IsItemActive, IsItemHovered, etc.) + /// + /// + /// C++: + /// imgui.h:641 + /// , + /// imgui_widgets.cpp:826 + ///
+ /// bool InvisibleButton(const char* str_id, const ImVec2& size, ImGuiButtonFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// Tip: use ImGui::PushID()/PopID() to push indices or pointers in the ID stack. + /// Then you can keep 'str_id' empty or the same for all your buttons (instead of creating a string based on a non-string id) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 InvisibleButton(byte* str_id, float2* size, ImGuiButtonFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsAnyItemActive.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsAnyItemActive.gen.cs new file mode 100644 index 0000000..4999832 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsAnyItemActive.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is any item active? + /// + /// + /// C++: + /// imgui.h:1041 + /// , + /// imgui.cpp:6387 + ///
bool IsAnyItemActive() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsAnyItemActive(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsAnyItemFocused.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsAnyItemFocused.gen.cs new file mode 100644 index 0000000..6c9b8d7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsAnyItemFocused.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is any item focused? + /// + /// + /// C++: + /// imgui.h:1042 + /// , + /// imgui.cpp:6393 + ///
bool IsAnyItemFocused() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsAnyItemFocused(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsAnyItemHovered.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsAnyItemHovered.gen.cs new file mode 100644 index 0000000..f6d5b84 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsAnyItemHovered.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is any item hovered? + /// + /// + /// C++: + /// imgui.h:1040 + /// , + /// imgui.cpp:6381 + ///
bool IsAnyItemHovered() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, + /// you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! + /// Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsAnyItemHovered(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsAnyMouseDown.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsAnyMouseDown.gen.cs new file mode 100644 index 0000000..58c6d08 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsAnyMouseDown.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend + /// maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid. + /// + /// + /// C++: + /// imgui.h:1127 + /// , + /// imgui.cpp:10411 + ///
bool IsAnyMouseDown() + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// [WILL OBSOLETE] This was designed for backends, but prefer having backend maintain a mask of held + /// mouse buttons, because upcoming input queue system will make this invalid. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsAnyMouseDown(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemActivated.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemActivated.gen.cs new file mode 100644 index 0000000..eb462a3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemActivated.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was the last item just made active (item was previously inactive). + /// + /// + /// C++: + /// imgui.h:1036 + /// , + /// imgui.cpp:6314 + ///
bool IsItemActivated() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemActivated(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemActive.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemActive.gen.cs new file mode 100644 index 0000000..6541d73 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemActive.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is the last item active? (e.g. button being held, text field being edited. This will continuously + /// return true while holding mouse button on an item. Items that don't interact will always return + /// false) + /// + /// + /// C++: + /// imgui.h:1031 + /// , + /// imgui.cpp:6306 + ///
bool IsItemActive() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemActive(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemClicked.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemClicked.gen.cs new file mode 100644 index 0000000..8966818 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemClicked.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is the last item hovered and mouse clicked on? (**) == IsMouseClicked(mouse_button) && + /// IsItemHovered()Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read + /// comments in function definition. + /// + /// + /// C++: + /// imgui.h:1033 + /// , + /// imgui.cpp:6355 + ///
bool IsItemClicked(ImGuiMouseButton mouse_button = 0) + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// Important: this can be useful but it is NOT equivalent to the behavior of e.g.Button()! + /// Most widgets have specific reactions based on mouse-up/down state, mouse position etc. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemClicked(ImGuiMouseButton mouse_button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemDeactivated.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemDeactivated.gen.cs new file mode 100644 index 0000000..24ec2ce --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemDeactivated.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns + /// with widgets that require continuous editing. + /// + /// + /// C++: + /// imgui.h:1037 + /// , + /// imgui.cpp:6323 + ///
bool IsItemDeactivated() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemDeactivated(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemDeactivatedAfterEdit.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemDeactivatedAfterEdit.gen.cs new file mode 100644 index 0000000..9621aad --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemDeactivatedAfterEdit.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag + /// moved). Useful for Undo/Redo patterns with widgets that require continuous editing. Note that you + /// may get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even + /// when clicking an already selected item). + /// + /// + /// C++: + /// imgui.h:1038 + /// , + /// imgui.cpp:6331 + ///
bool IsItemDeactivatedAfterEdit() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemDeactivatedAfterEdit(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemEdited.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemEdited.gen.cs new file mode 100644 index 0000000..9a81cb9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemEdited.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// did the last item modify its underlying value this frame? or was pressed? This is generally the same + /// as the "bool" return value of many widgets. + /// + /// + /// C++: + /// imgui.h:1035 + /// , + /// imgui.cpp:6405 + ///
bool IsItemEdited() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemEdited(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemFocused.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemFocused.gen.cs new file mode 100644 index 0000000..45a9c46 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemFocused.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is the last item focused for keyboard/gamepad navigation? + /// + /// + /// C++: + /// imgui.h:1032 + /// , + /// imgui.cpp:6338 + ///
bool IsItemFocused() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// == (GetItemID() == GetFocusID() && GetFocusID() != 0) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemFocused(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemHovered.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemHovered.gen.cs new file mode 100644 index 0000000..987a3e0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemHovered.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for + /// more options. + /// + /// + /// C++: + /// imgui.h:1030 + /// , + /// imgui.cpp:4770 + ///
bool IsItemHovered(ImGuiHoveredFlags flags = 0) + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + /// This is roughly matching the behavior of internal-facing ItemHoverable() + /// - this should work even for non-interactive items that have no ID, so we cannot use LastItemId + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemHovered(ImGuiHoveredFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemToggledOpen.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemToggledOpen.gen.cs new file mode 100644 index 0000000..0904fdf --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemToggledOpen.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was the last item open state toggled? set by TreeNode(). + /// + /// + /// C++: + /// imgui.h:1039 + /// , + /// imgui.cpp:6360 + ///
bool IsItemToggledOpen() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemToggledOpen(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemToggledSelection.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemToggledSelection.gen.cs new file mode 100644 index 0000000..ce69eba --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemToggledSelection.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Was the last item selection state toggled? Useful if you need the per-item information _before_ + /// reaching EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly. + /// + /// + /// C++: + /// imgui.h:783 + /// , + /// imgui.cpp:6371 + ///
bool IsItemToggledSelection() + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + /// Call after a Selectable() or TreeNode() involved in multi-selection. + /// Useful if you need the per-item information before reaching EndMultiSelect(), e.g. for rendering purpose. + /// This is only meant to be called inside a BeginMultiSelect()/EndMultiSelect() block. + /// (Outside of multi-select, it would be misleading/ambiguous to report this signal, as widgets + /// return e.g. a pressed event and user code is in charge of altering selection in ways we cannot predict.) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemToggledSelection(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsItemVisible.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsItemVisible.gen.cs new file mode 100644 index 0000000..c633e99 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsItemVisible.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is the last item visible? (items may be out of sight because of clipping/scrolling) + /// + /// + /// C++: + /// imgui.h:1034 + /// , + /// imgui.cpp:6399 + ///
bool IsItemVisible() + ///
+ ///
+ /// + /// + /// Item/Widgets Utilities and Query Functions + /// - Most of the functions are referring to the previous Item that has been submitted. + /// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsItemVisible(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsKeyChordPressed.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsKeyChordPressed.gen.cs new file mode 100644 index 0000000..2f45d4c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsKeyChordPressed.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. + /// This doesn't do any routing or focus check, please consider using Shortcut() function instead. + /// + /// + /// C++: + /// imgui.h:1084 + /// , + /// imgui.cpp:11067 + ///
bool IsKeyChordPressed(ImGuiKeyChord key_chord) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + /// This is the only public API until we expose owner_id versions of the API as replacements. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyChordPressed(ImGuiKeyChord key_chord); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsKeyDown.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsKeyDown.gen.cs new file mode 100644 index 0000000..ffb4c21 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsKeyDown.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is key being held. + /// + /// + /// C++: + /// imgui.h:1081 + /// , + /// imgui.cpp:10171 + ///
bool IsKeyDown(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + /// Note that Dear ImGui doesn't know the meaning/semantic of ImGuiKey from 0..511: they are legacy native keycodes. + /// Consider transitioning from 'IsKeyDown(MY_ENGINE_KEY_A)' (<1.87) to IsKeyDown(ImGuiKey_A) (>= 1.87) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyDown(ImGuiKey key); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsKeyPressed.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsKeyPressed.gen.cs new file mode 100644 index 0000000..5293e27 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsKeyPressed.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate + /// + /// + /// C++: + /// imgui.h:1082 + /// , + /// imgui.cpp:10186 + ///
bool IsKeyPressed(ImGuiKey key, bool repeat = true) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyPressed(ImGuiKey key, Bool8 repeat); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsKeyReleased.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsKeyReleased.gen.cs new file mode 100644 index 0000000..cde8eb3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsKeyReleased.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// was key released (went from Down to !Down)? + /// + /// + /// C++: + /// imgui.h:1083 + /// , + /// imgui.cpp:10231 + ///
bool IsKeyReleased(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsKeyReleased(ImGuiKey key); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseClicked.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseClicked.gen.cs new file mode 100644 index 0000000..c703c1e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseClicked.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1. + /// + /// + /// C++: + /// imgui.h:1120 + /// , + /// imgui.cpp:10260 + ///
bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseClicked(ImGuiMouseButton button, Bool8 repeat); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseDoubleClicked.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseDoubleClicked.gen.cs new file mode 100644 index 0000000..549b437 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseDoubleClicked.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will + /// also report IsMouseClicked() == true) + /// + /// + /// C++: + /// imgui.h:1122 + /// , + /// imgui.cpp:10312 + ///
bool IsMouseDoubleClicked(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseDoubleClicked(ImGuiMouseButton button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseDown.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseDown.gen.cs new file mode 100644 index 0000000..3979ab1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseDown.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is mouse button held? + /// + /// + /// C++: + /// imgui.h:1119 + /// , + /// imgui.cpp:10246 + ///
bool IsMouseDown(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseDown(ImGuiMouseButton button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseDragging.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseDragging.gen.cs new file mode 100644 index 0000000..c6f70f5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseDragging.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f) + /// + /// + /// C++: + /// imgui.h:1130 + /// , + /// imgui.cpp:10364 + ///
bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseDragging(ImGuiMouseButton button, float lock_threshold); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseHoveringRect.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseHoveringRect.gen.cs new file mode 100644 index 0000000..8830daa --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseHoveringRect.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but + /// disregarding of other consideration of focus/window ordering/popup-block. + /// + /// + /// C++: + /// imgui.h:1125 + /// , + /// imgui.cpp:10336 + ///
+ /// bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Test if mouse cursor is hovering given rectangle + /// NB- Rectangle is clipped by our current clip setting + /// NB- Expand the rectangle to be generous on imprecise inputs systems (g.Style.TouchExtraPadding) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseHoveringRect(float2* r_min, float2* r_max, Bool8 clip); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMousePosValid.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMousePosValid.gen.cs new file mode 100644 index 0000000..3336010 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMousePosValid.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available + /// + /// + /// C++: + /// imgui.h:1126 + /// , + /// imgui.cpp:10400 + ///
bool IsMousePosValid(const ImVec2* mouse_pos = NULL) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// We typically use ImVec2(-FLT_MAX,-FLT_MAX) to denote an invalid mouse position. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMousePosValid(float2* mouse_pos); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseReleased.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseReleased.gen.cs new file mode 100644 index 0000000..6d4923f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseReleased.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// did mouse button released? (went from Down to !Down) + /// + /// + /// C++: + /// imgui.h:1121 + /// , + /// imgui.cpp:10287 + ///
bool IsMouseReleased(ImGuiMouseButton button) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseReleased(ImGuiMouseButton button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsMouseReleasedWithDelay.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsMouseReleasedWithDelay.gen.cs new file mode 100644 index 0000000..da7fedd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsMouseReleasedWithDelay.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// delayed mouse release (use very sparingly!). Generally used with 'delay >= + /// io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount==1' test. This is a very rarely + /// used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename. + /// + /// + /// C++: + /// imgui.h:1123 + /// , + /// imgui.cpp:10304 + ///
bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// Use if you absolutely need to distinguish single-click from double-click by introducing a delay. + /// Generally use with 'delay >= io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount == 1' test. + /// This is a very rarely used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsPopupOpen.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsPopupOpen.gen.cs new file mode 100644 index 0000000..d8ec175 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsPopupOpen.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return true if the popup is open. + /// + /// + /// C++: + /// imgui.h:882 + /// , + /// imgui.cpp:12573 + ///
bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0) + ///
+ ///
+ /// + /// + /// Popups: query functions + /// - IsPopupOpen(): return true if the popup is open at the current BeginPopup() level of the popup stack. + /// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId: return true if any popup is open at the current BeginPopup() level of the popup stack. + /// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId + ImGuiPopupFlags_AnyPopupLevel: return true if any popup is open. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsPopupOpen(byte* str_id, ImGuiPopupFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsRectVisible.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsRectVisible.gen.cs new file mode 100644 index 0000000..f2de9ce --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsRectVisible.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// test if rectangle (of given size, starting from cursor position) is visible / not clipped. + /// + /// + /// C++: + /// imgui.h:1059 + /// , + /// imgui.cpp:9261 + ///
bool IsRectVisible(const ImVec2& size) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsRectVisible_0(float2* size); + + /// + /// + /// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's + /// side. + /// + /// + /// C++: + /// imgui.h:1060 + /// , + /// imgui.cpp:9267 + ///
bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsRectVisible_1(float2* rect_min, float2* rect_max); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsWindowAppearing.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsWindowAppearing.gen.cs new file mode 100644 index 0000000..7b8ba38 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsWindowAppearing.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:466 + /// , + /// imgui.cpp:8960 + ///
bool IsWindowAppearing() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowAppearing(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsWindowCollapsed.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsWindowCollapsed.gen.cs new file mode 100644 index 0000000..d09120e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsWindowCollapsed.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:467 + /// , + /// imgui.cpp:8954 + ///
bool IsWindowCollapsed() + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowCollapsed(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsWindowDocked.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsWindowDocked.gen.cs new file mode 100644 index 0000000..a340ad6 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsWindowDocked.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is current window docked into another window? + /// + /// + /// C++: + /// imgui.h:979 + /// , + /// imgui.cpp:8816 + ///
bool IsWindowDocked() + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowDocked(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsWindowFocused.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsWindowFocused.gen.cs new file mode 100644 index 0000000..ca0b391 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsWindowFocused.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is current window focused? or its root/child, depending on flags. see flags for options. + /// + /// + /// C++: + /// imgui.h:468 + /// , + /// imgui.cpp:13214 + ///
bool IsWindowFocused(ImGuiFocusedFlags flags=0) + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + /// Similar to IsWindowHovered() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowFocused(ImGuiFocusedFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/IsWindowHovered.gen.cs b/Brutal.ImGui/Generated/PInvoke/IsWindowHovered.gen.cs new file mode 100644 index 0000000..b5030b6 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/IsWindowHovered.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ + /// for options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear + /// ImGui or to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' + /// boolean for that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear + /// ImGui or my application?" for details. + /// + /// + /// C++: + /// imgui.h:469 + /// , + /// imgui.cpp:8764 + ///
bool IsWindowHovered(ImGuiHoveredFlags flags=0) + ///
+ ///
+ /// + /// + /// Windows Utilities + /// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into. + /// + /// + /// Is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options. + /// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, + /// you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! + /// Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 IsWindowHovered(ImGuiHoveredFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LabelText.gen.cs b/Brutal.ImGui/Generated/PInvoke/LabelText.gen.cs new file mode 100644 index 0000000..855a691 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LabelText.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// display text+label aligned the same way as value+label widgets + /// + /// + /// C++: + /// imgui.h:630 + /// , + /// imgui_widgets.cpp:382 + ///
void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LabelText(byte* label, byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ListBox.gen.cs b/Brutal.ImGui/Generated/PInvoke/ListBox.gen.cs new file mode 100644 index 0000000..aa55074 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ListBox.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:794 + /// , + /// imgui_widgets.cpp:8507 + ///
+ /// bool ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items = -1) + ///
+ ///
+ /// + /// + /// Widgets: List Boxes + /// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. + /// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. + /// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created. + /// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth + /// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ListBox_0( + byte* label, + int* current_item, + byte** items, + int items_count, + int height_in_items + ); + + /// + /// + /// C++: + /// imgui.h:795 + /// , + /// imgui_widgets.cpp:8515 + ///
+ /// bool ListBox(const char* label, int* current_item, const char* (*getter)(void* user_data, int idx), void* user_data, int items_count, int height_in_items = -1) + ///
+ ///
+ /// + /// + /// Widgets: List Boxes + /// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + /// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result. + /// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items. + /// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created. + /// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth + /// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items + /// + /// + /// This is merely a helper around BeginListBox(), EndListBox(). + /// Considering using those directly to submit custom data or store selection differently. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ListBox_1( + byte* label, + int* current_item, + nint getter, + void* user_data, + int items_count, + int height_in_items + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromDisk.gen.cs b/Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromDisk.gen.cs new file mode 100644 index 0000000..cf9edf0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromDisk.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls + /// LoadIniSettingsFromDisk(io.IniFilename). + /// + /// + /// C++: + /// imgui.h:1146 + /// , + /// imgui.cpp:15837 + ///
void LoadIniSettingsFromDisk(const char* ini_filename) + ///
+ ///
+ /// + /// + /// Settings/.Ini Utilities + /// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). + /// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually. + /// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LoadIniSettingsFromDisk(byte* ini_filename); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromMemory.gen.cs b/Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromMemory.gen.cs new file mode 100644 index 0000000..2e9ebd3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LoadIniSettingsFromMemory.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call after CreateContext() and before the first call to NewFrame() to provide .ini data from your + /// own data source. + /// + /// + /// C++: + /// imgui.h:1147 + /// , + /// imgui.cpp:15850 + ///
void LoadIniSettingsFromMemory(const char* ini_data, size_t ini_size=0) + ///
+ ///
+ /// + /// + /// Settings/.Ini Utilities + /// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). + /// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually. + /// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables). + /// + /// + /// Zero-tolerance, no error reporting, cheap .ini parsing + /// Set ini_size==0 to let us use strlen(ini_data). Do not call this function with a 0 if your buffer is actually empty! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LoadIniSettingsFromMemory(byte* ini_data, nuint ini_size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LogButtons.gen.cs b/Brutal.ImGui/Generated/PInvoke/LogButtons.gen.cs new file mode 100644 index 0000000..e763af9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LogButtons.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// helper to display buttons for logging to tty/file/clipboard + /// + /// + /// C++: + /// imgui.h:987 + /// , + /// imgui.cpp:15714 + ///
void LogButtons() + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + /// Helper to display logging buttons + /// FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogButtons(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LogFinish.gen.cs b/Brutal.ImGui/Generated/PInvoke/LogFinish.gen.cs new file mode 100644 index 0000000..606f58f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LogFinish.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// stop logging (close file, etc.) + /// + /// + /// C++: + /// imgui.h:986 + /// , + /// imgui.cpp:15678 + ///
void LogFinish() + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogFinish(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LogText.gen.cs b/Brutal.ImGui/Generated/PInvoke/LogText.gen.cs new file mode 100644 index 0000000..6ac2304 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LogText.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// pass text data straight to log (without being displayed) + /// + /// + /// C++: + /// imgui.h:988 + /// , + /// imgui.cpp:15515 + ///
void LogText(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogText(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LogToClipboard.gen.cs b/Brutal.ImGui/Generated/PInvoke/LogToClipboard.gen.cs new file mode 100644 index 0000000..40c21ab --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LogToClipboard.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// start logging to OS clipboard + /// + /// + /// C++: + /// imgui.h:985 + /// , + /// imgui.cpp:15662 + ///
void LogToClipboard(int auto_open_depth = -1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + /// Start logging/capturing text output to clipboard + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogToClipboard(int auto_open_depth); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LogToFile.gen.cs b/Brutal.ImGui/Generated/PInvoke/LogToFile.gen.cs new file mode 100644 index 0000000..e0354a3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LogToFile.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// start logging to file + /// + /// + /// C++: + /// imgui.h:984 + /// , + /// imgui.cpp:15637 + ///
void LogToFile(int auto_open_depth = -1, const char* filename = NULL) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + /// Start logging/capturing text output to given file + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogToFile(int auto_open_depth, byte* filename); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/LogToTTY.gen.cs b/Brutal.ImGui/Generated/PInvoke/LogToTTY.gen.cs new file mode 100644 index 0000000..83ba54b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/LogToTTY.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// start logging to tty (stdout) + /// + /// + /// C++: + /// imgui.h:983 + /// , + /// imgui.cpp:15624 + ///
void LogToTTY(int auto_open_depth = -1) + ///
+ ///
+ /// + /// + /// Logging/Capture + /// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void LogToTTY(int auto_open_depth); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/MemAlloc.gen.cs b/Brutal.ImGui/Generated/PInvoke/MemAlloc.gen.cs new file mode 100644 index 0000000..e1b0a7e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/MemAlloc.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1168 + /// , + /// imgui.cpp:5018 + ///
void* MemAlloc(size_t size) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + /// IM_ALLOC() == ImGui::MemAlloc() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void* MemAlloc(nuint size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/MemFree.gen.cs b/Brutal.ImGui/Generated/PInvoke/MemFree.gen.cs new file mode 100644 index 0000000..2cfb511 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/MemFree.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1169 + /// , + /// imgui.cpp:5029 + ///
void MemFree(void* ptr) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + /// IM_FREE() == ImGui::MemFree() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void MemFree(void* ptr); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/MenuItem.gen.cs b/Brutal.ImGui/Generated/PInvoke/MenuItem.gen.cs new file mode 100644 index 0000000..0a45e6d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/MenuItem.gen.cs @@ -0,0 +1,67 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return true when activated. + /// + /// + /// C++: + /// imgui.h:822 + /// , + /// imgui_widgets.cpp:9332 + ///
+ /// bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true) + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 MenuItem_0(byte* label, byte* shortcut, Bool8 selected, Bool8 enabled); + + /// + /// + /// return true when activated + toggle (*p_selected) if p_selected != NULL + /// + /// + /// C++: + /// imgui.h:823 + /// , + /// imgui_widgets.cpp:9337 + ///
+ /// bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true) + ///
+ ///
+ /// + /// + /// Widgets: Menus + /// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar. + /// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it. + /// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it. + /// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 MenuItem_1( + byte* label, + byte* shortcut, + Bool8* p_selected, + Bool8 enabled + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/NewFrame.gen.cs b/Brutal.ImGui/Generated/PInvoke/NewFrame.gen.cs new file mode 100644 index 0000000..01734d5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/NewFrame.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame(). + /// + /// + /// C++: + /// imgui.h:405 + /// , + /// imgui.cpp:5493 + ///
void NewFrame() + ///
+ ///
+ /// + /// + /// Main + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NewFrame(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/NewLine.gen.cs b/Brutal.ImGui/Generated/PInvoke/NewLine.gen.cs new file mode 100644 index 0000000..f5e3fe2 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/NewLine.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// undo a SameLine() or force a new line when in a horizontal-layout context. + /// + /// + /// C++: + /// imgui.h:586 + /// , + /// imgui_widgets.cpp:1591 + ///
void NewLine() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NewLine(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/NextColumn.gen.cs b/Brutal.ImGui/Generated/PInvoke/NextColumn.gen.cs new file mode 100644 index 0000000..f908e59 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/NextColumn.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// next column, defaults to current row or next row if the current row is finished + /// + /// + /// C++: + /// imgui.h:944 + /// , + /// imgui_tables.cpp:4410 + ///
void NextColumn() + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void NextColumn(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/OpenPopup.gen.cs b/Brutal.ImGui/Generated/PInvoke/OpenPopup.gen.cs new file mode 100644 index 0000000..02c8fc9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/OpenPopup.gen.cs @@ -0,0 +1,66 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call to mark popup as open (don't call every frame!). + /// + /// + /// C++: + /// imgui.h:864 + /// , + /// imgui.cpp:12641 + ///
void OpenPopup(const char* str_id, ImGuiPopupFlags popup_flags = 0) + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void OpenPopup_0(byte* str_id, ImGuiPopupFlags popup_flags); + + /// + /// + /// id overload to facilitate calling from nested stacks + /// + /// + /// C++: + /// imgui.h:865 + /// , + /// imgui.cpp:12649 + ///
void OpenPopup(ImGuiID id, ImGuiPopupFlags popup_flags = 0) + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void OpenPopup_1(ImGuiID id, ImGuiPopupFlags popup_flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/OpenPopupOnItemClick.gen.cs b/Brutal.ImGui/Generated/PInvoke/OpenPopupOnItemClick.gen.cs new file mode 100644 index 0000000..97df448 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/OpenPopupOnItemClick.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. + /// (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors) + /// + /// + /// C++: + /// imgui.h:866 + /// , + /// imgui.cpp:12946 + ///
void OpenPopupOnItemClick(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1) + ///
+ ///
+ /// + /// + /// Popups: open/close functions + /// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options. + /// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE. + /// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually. + /// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options). + /// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup(). + /// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened. + /// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter + /// + /// + /// Helper to open a popup if mouse button is released over the item + /// - This is essentially the same as BeginPopupContextItem() but without the trailing BeginPopup() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void OpenPopupOnItemClick(byte* str_id, ImGuiPopupFlags popup_flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PlotHistogram.gen.cs b/Brutal.ImGui/Generated/PInvoke/PlotHistogram.gen.cs new file mode 100644 index 0000000..f05c11b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PlotHistogram.gen.cs @@ -0,0 +1,70 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:801 + /// , + /// imgui_widgets.cpp:8715 + ///
+ /// void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)) + ///
+ ///
+ /// + /// + /// Widgets: Data Plotting + /// - Consider using ImPlot (https://github.com/epezent/implot) which is much better! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PlotHistogram_0( + byte* label, + float* values, + int values_count, + int values_offset, + byte* overlay_text, + float scale_min, + float scale_max, + float2 graph_size, + int stride + ); + + /// + /// + /// C++: + /// imgui.h:802 + /// , + /// imgui_widgets.cpp:8721 + ///
+ /// void PlotHistogram(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Data Plotting + /// - Consider using ImPlot (https://github.com/epezent/implot) which is much better! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PlotHistogram_1( + byte* label, + nint values_getter, + void* data, + int values_count, + int values_offset, + byte* overlay_text, + float scale_min, + float scale_max, + float2 graph_size + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PlotLines.gen.cs b/Brutal.ImGui/Generated/PInvoke/PlotLines.gen.cs new file mode 100644 index 0000000..36cbddb --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PlotLines.gen.cs @@ -0,0 +1,70 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:799 + /// , + /// imgui_widgets.cpp:8704 + ///
+ /// void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)) + ///
+ ///
+ /// + /// + /// Widgets: Data Plotting + /// - Consider using ImPlot (https://github.com/epezent/implot) which is much better! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PlotLines_0( + byte* label, + float* values, + int values_count, + int values_offset, + byte* overlay_text, + float scale_min, + float scale_max, + float2 graph_size, + int stride + ); + + /// + /// + /// C++: + /// imgui.h:800 + /// , + /// imgui_widgets.cpp:8710 + ///
+ /// void PlotLines(const char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Data Plotting + /// - Consider using ImPlot (https://github.com/epezent/implot) which is much better! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PlotLines_1( + byte* label, + nint values_getter, + void* data, + int values_count, + int values_offset, + byte* overlay_text, + float scale_min, + float scale_max, + float2 graph_size + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopClipRect.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopClipRect.gen.cs new file mode 100644 index 0000000..bfe69f2 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopClipRect.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1015 + /// , + /// imgui.cpp:5886 + ///
void PopClipRect() + ///
+ ///
+ /// + /// + /// Clipping + /// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopClipRect(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopFont.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopFont.gen.cs new file mode 100644 index 0000000..5985a9c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopFont.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:529 + /// , + /// imgui.cpp:9522 + ///
void PopFont() + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopFont(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopID.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopID.gen.cs new file mode 100644 index 0000000..425ecb3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopID.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// pop from the ID stack. + /// + /// + /// C++: + /// imgui.h:614 + /// , + /// imgui.cpp:9666 + ///
void PopID() + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopID(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopItemFlag.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopItemFlag.gen.cs new file mode 100644 index 0000000..1dfecbb --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopItemFlag.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:544 + /// , + /// imgui.cpp:8600 + ///
void PopItemFlag() + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopItemFlag(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopItemWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopItemWidth.gen.cs new file mode 100644 index 0000000..5a2802c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopItemWidth.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:548 + /// , + /// imgui.cpp:11984 + ///
void PopItemWidth() + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopItemWidth(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopStyleColor.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopStyleColor.gen.cs new file mode 100644 index 0000000..ad03370 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopStyleColor.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:537 + /// , + /// imgui.cpp:3530 + ///
void PopStyleColor(int count = 1) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopStyleColor(int count); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopStyleVar.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopStyleVar.gen.cs new file mode 100644 index 0000000..57c4902 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopStyleVar.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:542 + /// , + /// imgui.cpp:3658 + ///
void PopStyleVar(int count = 1) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopStyleVar(int count); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PopTextWrapPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/PopTextWrapPos.gen.cs new file mode 100644 index 0000000..bea73b8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PopTextWrapPos.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:552 + /// , + /// imgui.cpp:8683 + ///
void PopTextWrapPos() + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PopTextWrapPos(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ProgressBar.gen.cs b/Brutal.ImGui/Generated/PInvoke/ProgressBar.gen.cs new file mode 100644 index 0000000..34bf6f2 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ProgressBar.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:648 + /// , + /// imgui_widgets.cpp:1403 + ///
+ /// void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// size_arg (for each axis) < 0.0f: align to end, 0.0f: auto, > 0.0f: specified size + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ProgressBar(float fraction, float2* size_arg, byte* overlay); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushClipRect.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushClipRect.gen.cs new file mode 100644 index 0000000..9e51fe8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushClipRect.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1014 + /// , + /// imgui.cpp:5879 + ///
+ /// void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect) + ///
+ ///
+ /// + /// + /// Clipping + /// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only. + /// + /// + /// Push a clipping rectangle for both ImGui logic (hit-testing etc.) and low-level ImDrawList rendering. + /// - When using this function it is sane to ensure that float are perfectly rounded to integer values, + /// so that e.g. (int)(max.x-min.x) in user's render produce correct result. + /// - If the code here changes, may need to update code of functions like NextColumn() and PushColumnClipRect(): + /// some frequently called functions which to modify both channels and clipping simultaneously tend to use the + /// more specialized SetWindowClipRectBeforeSetChannel() to avoid extraneous updates of underlying ImDrawCmds. + /// - This is analogous to PushFont()/PopFont() in the sense that are a mixing a global stack and a window stack, + /// which in the case of ClipRect is not so problematic but tends to be more restrictive for fonts. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushClipRect( + float2* clip_rect_min, + float2* clip_rect_max, + Bool8 intersect_with_current_clip_rect + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushFont.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushFont.gen.cs new file mode 100644 index 0000000..9ee17b7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushFont.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Use NULL as a shortcut to keep current font. Use 0.0f to keep current size. + /// + /// + /// C++: + /// imgui.h:528 + /// , + /// imgui.cpp:9508 + ///
void PushFont(ImFont* font, float font_size_base_unscaled) + ///
+ ///
+ /// + /// + /// Parameters stacks (font) + /// - PushFont(font, 0.0f) // Change font and keep current size + /// - PushFont(NULL, 20.0f) // Keep font and change current size + /// - PushFont(font, 20.0f) // Change font and set size to 20.0f + /// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size. + /// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior. + /// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted. + /// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition. + /// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function. + /// *IMPORTANT* global scale factors are applied over the provided size. + /// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more. + /// - If you want to apply a factor to the _current_ font size: + /// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing + /// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger + /// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE! + /// + /// + /// If you want to scale an existing font size! Read comments in imgui.h! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushFont(ImFont* font, float font_size_base_unscaled); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushID.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushID.gen.cs new file mode 100644 index 0000000..7eb15d4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushID.gen.cs @@ -0,0 +1,132 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// push string into the ID stack (will hash string). + /// + /// + /// C++: + /// imgui.h:610 + /// , + /// imgui.cpp:9597 + ///
void PushID(const char* str_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushID_0(byte* str_id); + + /// + /// + /// push string into the ID stack (will hash string). + /// + /// + /// C++: + /// imgui.h:611 + /// , + /// imgui.cpp:9605 + ///
void PushID(const char* str_id_begin, const char* str_id_end) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushID_1(byte* str_id_begin, byte* str_id_end); + + /// + /// + /// push pointer into the ID stack (will hash pointer). + /// + /// + /// C++: + /// imgui.h:612 + /// , + /// imgui.cpp:9613 + ///
void PushID(const void* ptr_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushID_2(void* ptr_id); + + /// + /// + /// push integer into the ID stack (will hash integer). + /// + /// + /// C++: + /// imgui.h:613 + /// , + /// imgui.cpp:9621 + ///
void PushID(int int_id) + ///
+ ///
+ /// + /// + /// ID stack/scopes + /// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui. + /// - Those questions are answered and impacted by understanding of the ID stack system: + /// - "Q: Why is my widget not reacting when I click on it?" + /// - "Q: How can I have widgets with an empty label?" + /// - "Q: How can I have multiple widgets with the same label?" + /// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely + /// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. + /// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others. + /// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID, + /// whereas "str_id" denote a string that is only used as an ID and not normally displayed. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushID_3(int int_id); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushItemFlag.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushItemFlag.gen.cs new file mode 100644 index 0000000..995a07f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushItemFlag.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true) + /// + /// + /// C++: + /// imgui.h:543 + /// , + /// imgui.cpp:8587 + ///
void PushItemFlag(ImGuiItemFlags option, bool enabled) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushItemFlag(ImGuiItemFlags option, Bool8 enabled); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushItemWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushItemWidth.gen.cs new file mode 100644 index 0000000..425a1a5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushItemWidth.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align + /// xx pixels to the right of window (so -FLT_MIN always align width to the right side). + /// + /// + /// C++: + /// imgui.h:547 + /// , + /// imgui.cpp:11956 + ///
void PushItemWidth(float item_width) + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + /// FIXME: Remove the == 0.0f behavior? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushItemWidth(float item_width); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushStyleColor.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushStyleColor.gen.cs new file mode 100644 index 0000000..ecf1968 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushStyleColor.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// modify a style color. always use this if you modify the style after NewFrame(). + /// + /// + /// C++: + /// imgui.h:535 + /// , + /// imgui.cpp:3508 + ///
void PushStyleColor(ImGuiCol idx, ImU32 col) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + /// FIXME: This may incur a round-trip (if the end user got their data from a float4) but eventually we + /// aim to store the in-flight colors as ImU32 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushStyleColor_0(ImGuiCol idx, uint col); + + /// + /// + /// C++: + /// imgui.h:536 + /// , + /// imgui.cpp:3519 + ///
void PushStyleColor(ImGuiCol idx, const ImVec4& col) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushStyleColor_1(ImGuiCol idx, float4* col); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushStyleVar.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushStyleVar.gen.cs new file mode 100644 index 0000000..06cefb5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushStyleVar.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// modify a style float variable. always use this if you modify the style after NewFrame()! + /// + /// + /// C++: + /// imgui.h:538 + /// , + /// imgui.cpp:3602 + ///
void PushStyleVar(ImGuiStyleVar idx, float val) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushStyleVar_0(ImGuiStyleVar idx, float val); + + /// + /// + /// modify a style ImVec2 variable. " + /// + /// + /// C++: + /// imgui.h:539 + /// , + /// imgui.cpp:3644 + ///
void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushStyleVar_1(ImGuiStyleVar idx, float2* val); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushStyleVarX.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushStyleVarX.gen.cs new file mode 100644 index 0000000..e92c53d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushStyleVarX.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// modify X component of a style ImVec2 variable. " + /// + /// + /// C++: + /// imgui.h:540 + /// , + /// imgui.cpp:3616 + ///
void PushStyleVarX(ImGuiStyleVar idx, float val_x) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushStyleVarX(ImGuiStyleVar idx, float val_x); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushStyleVarY.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushStyleVarY.gen.cs new file mode 100644 index 0000000..5896c49 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushStyleVarY.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// modify Y component of a style ImVec2 variable. " + /// + /// + /// C++: + /// imgui.h:541 + /// , + /// imgui.cpp:3630 + ///
void PushStyleVarY(ImGuiStyleVar idx, float val_y) + ///
+ ///
+ /// + /// + /// Parameters stacks (shared) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushStyleVarY(ImGuiStyleVar idx, float val_y); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/PushTextWrapPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/PushTextWrapPos.gen.cs new file mode 100644 index 0000000..fcd9c7f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/PushTextWrapPos.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of + /// window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space + /// + /// + /// C++: + /// imgui.h:551 + /// , + /// imgui.cpp:8675 + ///
void PushTextWrapPos(float wrap_local_pos_x = 0.0f) + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void PushTextWrapPos(float wrap_local_pos_x); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/RadioButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/RadioButton.gen.cs new file mode 100644 index 0000000..92f2ee4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/RadioButton.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; } + /// + /// + /// C++: + /// imgui.h:646 + /// , + /// imgui_widgets.cpp:1339 + ///
bool RadioButton(const char* label, bool active) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 RadioButton_0(byte* label, Bool8 active); + + /// + /// + /// shortcut to handle the above pattern when value is an integer + /// + /// + /// C++: + /// imgui.h:647 + /// , + /// imgui_widgets.cpp:1394 + ///
bool RadioButton(const char* label, int* v, int v_button) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// FIXME: This would work nicely if it was a public template, e.g. 'template<T> RadioButton(const + /// char* label, T* v, T v_button)', but I'm not sure how we would expose it.. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 RadioButton_1(byte* label, int* v, int v_button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Render.gen.cs b/Brutal.ImGui/Generated/PInvoke/Render.gen.cs new file mode 100644 index 0000000..cb2352b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Render.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData(). + /// + /// + /// C++: + /// imgui.h:407 + /// , + /// imgui.cpp:6131 + ///
void Render() + ///
+ ///
+ /// + /// + /// Main + /// + /// + /// Prepare the data for rendering so you can call GetDrawData() + /// (As with anything within the ImGui:: namespace this doesn't touch your GPU or graphics API at all: + /// it is the role of the ImGui_ImplXXXX_RenderDrawData() function provided by the renderer backend) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Render(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/RenderPlatformWindowsDefault.gen.cs b/Brutal.ImGui/Generated/PInvoke/RenderPlatformWindowsDefault.gen.cs new file mode 100644 index 0000000..9ca7f59 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/RenderPlatformWindowsDefault.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call in main loop. will call RenderWindow/SwapBuffers platform functions for each secondary viewport + /// which doesn't have the ImGuiViewportFlags_Minimized flag set. May be reimplemented by user for + /// custom rendering needs. + /// + /// + /// C++: + /// imgui.h:1175 + /// , + /// imgui.cpp:17038 + ///
+ /// void RenderPlatformWindowsDefault(void* platform_render_arg = NULL, void* renderer_render_arg = NULL) + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void RenderPlatformWindowsDefault( + void* platform_render_arg, + void* renderer_render_arg + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ResetMouseDragDelta.gen.cs b/Brutal.ImGui/Generated/PInvoke/ResetMouseDragDelta.gen.cs new file mode 100644 index 0000000..784dc14 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ResetMouseDragDelta.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1132 + /// , + /// imgui.cpp:10436 + ///
void ResetMouseDragDelta(ImGuiMouseButton button = 0) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ResetMouseDragDelta(ImGuiMouseButton button); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SameLine.gen.cs b/Brutal.ImGui/Generated/PInvoke/SameLine.gen.cs new file mode 100644 index 0000000..1527a54 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SameLine.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call between widgets or groups to layout them horizontally. X position given in window coordinates. + /// + /// + /// C++: + /// imgui.h:585 + /// , + /// imgui.cpp:11841 + ///
void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + /// Gets back to previous line and continue with horizontal layout + /// offset_from_start_x == 0 : follow right after previous item + /// offset_from_start_x != 0 : align to specified x position (relative to window/group left) + /// spacing_w < 0 : use default spacing if offset_from_start_x == 0, no spacing if offset_from_start_x != 0 + /// spacing_w >= 0 : enforce spacing amount + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SameLine(float offset_from_start_x, float spacing); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToDisk.gen.cs b/Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToDisk.gen.cs new file mode 100644 index 0000000..2c067f5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToDisk.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// this is automatically called (if io.IniFilename is not empty) a few seconds after any modification + /// that should be reflected in the .ini file (and also by DestroyContext). + /// + /// + /// C++: + /// imgui.h:1148 + /// , + /// imgui.cpp:15920 + ///
void SaveIniSettingsToDisk(const char* ini_filename) + ///
+ ///
+ /// + /// + /// Settings/.Ini Utilities + /// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). + /// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually. + /// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SaveIniSettingsToDisk(byte* ini_filename); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToMemory.gen.cs b/Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToMemory.gen.cs new file mode 100644 index 0000000..ec4f803 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SaveIniSettingsToMemory.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return a zero-terminated string with the .ini data which you can save by your own mean. call when + /// io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings. + /// + /// + /// C++: + /// imgui.h:1149 + /// , + /// imgui.cpp:15937 + ///
const char* SaveIniSettingsToMemory(size_t* out_ini_size = NULL) + ///
+ ///
+ /// + /// + /// Settings/.Ini Utilities + /// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). + /// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually. + /// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables). + /// + /// + /// Call registered handlers (e.g. SettingsHandlerWindow_WriteAll() + custom handlers) to write their + /// stuff into a text buffer + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* SaveIniSettingsToMemory(nuint* out_ini_size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Selectable.gen.cs b/Brutal.ImGui/Generated/PInvoke/Selectable.gen.cs new file mode 100644 index 0000000..fc400c8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Selectable.gen.cs @@ -0,0 +1,76 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so + /// you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. + /// size.y==0.0: use label height, size.y>0.0: specify height + /// + /// + /// C++: + /// imgui.h:770 + /// , + /// imgui_widgets.cpp:7126 + ///
+ /// bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Selectables + /// - A selectable highlights when hovered, and can display another color when selected. + /// - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous. + /// + /// + /// Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image. + /// But you need to make sure the ID is unique, e.g. enclose calls in PushID/PopID or use ##unique_id. + /// With this scheme, ImGuiSelectableFlags_SpanAllColumns and ImGuiSelectableFlags_AllowOverlap are also frequently used flags. + /// FIXME: Selectable() with (size.x == 0.0f) and (SelectableTextAlign.x > 0.0f) followed by SameLine() is currently not supported. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Selectable_0( + byte* label, + Bool8 selected, + ImGuiSelectableFlags flags, + float2* size + ); + + /// + /// + /// "bool* p_selected" point to the selection state (read-write), as a convenient helper. + /// + /// + /// C++: + /// imgui.h:771 + /// , + /// imgui_widgets.cpp:7307 + ///
+ /// bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Widgets: Selectables + /// - A selectable highlights when hovered, and can display another color when selected. + /// - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Selectable_1( + byte* label, + Bool8* p_selected, + ImGuiSelectableFlags flags, + float2* size + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Separator.gen.cs b/Brutal.ImGui/Generated/PInvoke/Separator.gen.cs new file mode 100644 index 0000000..1b0792b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Separator.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a + /// vertical separator. + /// + /// + /// C++: + /// imgui.h:584 + /// , + /// imgui_widgets.cpp:1686 + ///
void Separator() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Separator(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SeparatorText.gen.cs b/Brutal.ImGui/Generated/PInvoke/SeparatorText.gen.cs new file mode 100644 index 0000000..b75ff73 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SeparatorText.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// currently: formatted text with a horizontal line + /// + /// + /// C++: + /// imgui.h:634 + /// , + /// imgui_widgets.cpp:1754 + ///
void SeparatorText(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SeparatorText(byte* label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetAllocatorFunctions.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetAllocatorFunctions.gen.cs new file mode 100644 index 0000000..ba205b1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetAllocatorFunctions.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1166 + /// , + /// imgui.cpp:4027 + ///
+ /// void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void* user_data = NULL) + ///
+ ///
+ /// + /// + /// Memory Allocators + /// - Those functions are not reliant on the current context. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetAllocatorFunctions(nint alloc_func, nint free_func, void* user_data); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetClipboardText.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetClipboardText.gen.cs new file mode 100644 index 0000000..8d7f3a5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetClipboardText.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1140 + /// , + /// imgui.cpp:5071 + ///
void SetClipboardText(const char* text) + ///
+ ///
+ /// + /// + /// Clipboard Utilities + /// - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetClipboardText(byte* text); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetColorEditOptions.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetColorEditOptions.gen.cs new file mode 100644 index 0000000..b6e6684 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetColorEditOptions.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// initialize current options (generally on application startup) if you want to select a default + /// format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions + /// flag to your calls. + /// + /// + /// C++: + /// imgui.h:744 + /// , + /// imgui_widgets.cpp:6305 + ///
void SetColorEditOptions(ImGuiColorEditFlags flags) + ///
+ ///
+ /// + /// + /// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + /// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. + /// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + /// + /// + /// Initialize/override default color options + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetColorEditOptions(ImGuiColorEditFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetColumnOffset.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetColumnOffset.gen.cs new file mode 100644 index 0000000..0d82510 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetColumnOffset.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set position of column line (in pixels, from the left side of the contents region). pass -1 to use + /// current column + /// + /// + /// C++: + /// imgui.h:949 + /// , + /// imgui_tables.cpp:4235 + ///
void SetColumnOffset(int column_index, float offset_x) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetColumnOffset(int column_index, float offset_x); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetColumnWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetColumnWidth.gen.cs new file mode 100644 index 0000000..ad89b4c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetColumnWidth.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set column width (in pixels). pass -1 to use current column + /// + /// + /// C++: + /// imgui.h:947 + /// , + /// imgui_tables.cpp:4257 + ///
void SetColumnWidth(int column_index, float width) + ///
+ ///
+ /// + /// + /// Legacy Columns API (prefer using Tables!) + /// - You can also use SameLine(pos_x) to mimic simplified columns. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetColumnWidth(int column_index, float width); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetCurrentContext.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetCurrentContext.gen.cs new file mode 100644 index 0000000..57fe048 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetCurrentContext.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:399 + /// , + /// imgui.cpp:4018 + ///
void SetCurrentContext(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Context creation and access + /// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts. + /// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() + /// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCurrentContext(ImGuiContext* ctx); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetCursorPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetCursorPos.gen.cs new file mode 100644 index 0000000..c16653d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetCursorPos.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:578 + /// , + /// imgui.cpp:11901 + ///
void SetCursorPos(const ImVec2& local_pos) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCursorPos(float2* local_pos); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetCursorPosX.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetCursorPosX.gen.cs new file mode 100644 index 0000000..ceebca9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetCursorPosX.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:579 + /// , + /// imgui.cpp:11909 + ///
void SetCursorPosX(float local_x) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCursorPosX(float local_x); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetCursorPosY.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetCursorPosY.gen.cs new file mode 100644 index 0000000..0886e1f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetCursorPosY.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// [window-local] " + /// + /// + /// C++: + /// imgui.h:580 + /// , + /// imgui.cpp:11917 + ///
void SetCursorPosY(float local_y) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCursorPosY(float local_y); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetCursorScreenPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetCursorScreenPos.gen.cs new file mode 100644 index 0000000..362a297 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetCursorScreenPos.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND. + /// + /// + /// C++: + /// imgui.h:573 + /// , + /// imgui.cpp:11873 + ///
void SetCursorScreenPos(const ImVec2& pos) + ///
+ ///
+ /// + /// + /// Layout cursor positioning + /// - By "cursor" we mean the current output position. + /// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. + /// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget. + /// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail(). + /// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: + /// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward. + /// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos() + /// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM. + /// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetCursorScreenPos(float2* pos); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetDragDropPayload.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetDragDropPayload.gen.cs new file mode 100644 index 0000000..fbcd9fa --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetDragDropPayload.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for + /// dear imgui internal types. Data is copied and held by imgui. Return true when payload has been + /// accepted. + /// + /// + /// C++: + /// imgui.h:997 + /// , + /// imgui.cpp:15309 + ///
+ /// bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Drag and Drop + /// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource(). + /// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget(). + /// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725) + /// - An item can be both drag source and drop target. + /// + /// + /// Use 'cond' to choose to submit payload on drag start or every frame + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SetDragDropPayload(byte* type, void* data, nuint sz, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetItemDefaultFocus.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetItemDefaultFocus.gen.cs new file mode 100644 index 0000000..f47def9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetItemDefaultFocus.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// make last item the default focused item of a newly appearing window. + /// + /// + /// C++: + /// imgui.h:1018 + /// , + /// imgui.cpp:9231 + ///
void SetItemDefaultFocus() + ///
+ ///
+ /// + /// + /// Focus, Activation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetItemDefaultFocus(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetItemKeyOwner.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetItemKeyOwner.gen.cs new file mode 100644 index 0000000..85cbd1c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetItemKeyOwner.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Set key owner to last item ID if it is hovered or active. Equivalent to 'if (IsItemHovered() || + /// IsItemActive()) { SetKeyOwner(key, GetItemID());'. + /// + /// + /// C++: + /// imgui.h:1113 + /// , + /// imgui.cpp:11061 + ///
void SetItemKeyOwner(ImGuiKey key) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Key/Input Ownership [BETA] + /// - One common use case would be to allow your items to disable standard inputs behaviors such + /// as Tab or Alt key handling, Mouse Wheel scrolling, etc. + /// e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling. + /// - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them. + /// - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetItemKeyOwner(ImGuiKey key); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetItemTooltip.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetItemTooltip.gen.cs new file mode 100644 index 0000000..778b0af --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetItemTooltip.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip(). + /// + /// + /// C++: + /// imgui.h:839 + /// , + /// imgui.cpp:12521 + ///
void SetItemTooltip(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Tooltips: helpers for showing a tooltip when hovering an item + /// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom. + /// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom. + /// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + /// + /// + /// Shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav'. + /// Defaults to == ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort when using the mouse. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetItemTooltip(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetKeyboardFocusHere.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetKeyboardFocusHere.gen.cs new file mode 100644 index 0000000..4c5ae15 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetKeyboardFocusHere.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple + /// component widget. Use -1 to access previous widget. + /// + /// + /// C++: + /// imgui.h:1019 + /// , + /// imgui.cpp:9198 + ///
void SetKeyboardFocusHere(int offset = 0) + ///
+ ///
+ /// + /// + /// Focus, Activation + /// + /// + /// Note: this will likely be called ActivateItem() once we rework our Focus/Activation system! + /// But ActivateItem() should function without altering scroll/focus? + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetKeyboardFocusHere(int offset); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetMouseCursor.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetMouseCursor.gen.cs new file mode 100644 index 0000000..27ec244 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetMouseCursor.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set desired mouse cursor shape + /// + /// + /// C++: + /// imgui.h:1134 + /// , + /// imgui.cpp:10457 + ///
void SetMouseCursor(ImGuiMouseCursor cursor_type) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + /// We intentionally accept values of ImGuiMouseCursor that are outside our bounds, in case users needs to hack-in a custom cursor value. + /// Custom cursors may be handled by custom backends. If you are using a standard backend and want to hack in a custom cursor, you may + /// handle it before the backend _NewFrame() call and temporarily set ImGuiConfigFlags_NoMouseCursorChange during the backend _NewFrame() call. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetMouseCursor(ImGuiMouseCursor cursor_type); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNavCursorVisible.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNavCursorVisible.gen.cs new file mode 100644 index 0000000..19237fc --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNavCursorVisible.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when + /// clicking with mouse. + /// + /// + /// C++: + /// imgui.h:1022 + /// , + /// imgui.cpp:13464 + ///
void SetNavCursorVisible(bool visible) + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNavCursorVisible(Bool8 visible); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureKeyboard.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureKeyboard.gen.cs new file mode 100644 index 0000000..1792ffc --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureKeyboard.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, + /// typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your + /// widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = + /// want_capture_keyboard"; after the next NewFrame() call. + /// + /// + /// C++: + /// imgui.h:1087 + /// , + /// imgui.cpp:10775 + ///
void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Keyboard/Mouse/Gamepad + /// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...). + /// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921) + /// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextFrameWantCaptureKeyboard(Bool8 want_capture_keyboard); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureMouse.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureMouse.gen.cs new file mode 100644 index 0000000..e0349d7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextFrameWantCaptureMouse.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, + /// typical when true it instructs your app to ignore inputs). This is equivalent to setting + /// "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call. + /// + /// + /// C++: + /// imgui.h:1135 + /// , + /// imgui.cpp:10781 + ///
void SetNextFrameWantCaptureMouse(bool want_capture_mouse) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Mouse + /// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right. + /// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle. + /// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold') + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextFrameWantCaptureMouse(Bool8 want_capture_mouse); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextItemAllowOverlap.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextItemAllowOverlap.gen.cs new file mode 100644 index 0000000..0596fdd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextItemAllowOverlap.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// allow next item to be overlapped by a subsequent item. Useful with invisible buttons, selectable, + /// treenode covering an area where subsequent items may need to be added. Note that both Selectable() + /// and TreeNode() have dedicated flags doing this. + /// + /// + /// C++: + /// imgui.h:1025 + /// , + /// imgui.cpp:6414 + ///
void SetNextItemAllowOverlap() + ///
+ ///
+ /// + /// + /// Overlapping mode + /// + /// + /// Allow next item to be overlapped by subsequent items. + /// This works by requiring HoveredId to match for two subsequent frames, + /// so if a following items overwrite it our interactions will naturally be disabled. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemAllowOverlap(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextItemOpen.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextItemOpen.gen.cs new file mode 100644 index 0000000..b9b8a3b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextItemOpen.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next TreeNode/CollapsingHeader open state. + /// + /// + /// C++: + /// imgui.h:764 + /// , + /// imgui_widgets.cpp:7048 + ///
void SetNextItemOpen(bool is_open, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// Set next TreeNode/CollapsingHeader open state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemOpen(Bool8 is_open, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextItemSelectionUserData.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextItemSelectionUserData.gen.cs new file mode 100644 index 0000000..249426e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextItemSelectionUserData.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:782 + /// , + /// imgui_widgets.cpp:7917 + ///
void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data) + ///
+ ///
+ /// + /// + /// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA] + /// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. + /// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). + /// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. + /// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree, + /// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo. + /// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemSelectionUserData(ulong selection_user_data); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextItemShortcut.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextItemShortcut.gen.cs new file mode 100644 index 0000000..3b700f1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextItemShortcut.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1105 + /// , + /// imgui.cpp:11090 + ///
void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Shortcut Testing & Routing [BETA] + /// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super. + /// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments) + /// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments) + /// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values. + /// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it. + /// Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut. + /// Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts) + /// Child2 -> no call // When Child2 is focused, Parent gets the shortcut. + /// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical. + /// This is an important property as it facilitate working with foreign code or larger codebase. + /// - To understand the difference: + /// - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect. + /// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route. + /// - Visualize registered routes in 'Metrics/Debugger->Inputs'. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextItemStorageID.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextItemStorageID.gen.cs new file mode 100644 index 0000000..3ee2d1b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextItemStorageID.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set id to use for open/close storage (default to same as item id). + /// + /// + /// C++: + /// imgui.h:765 + /// , + /// imgui_widgets.cpp:7059 + ///
void SetNextItemStorageID(ImGuiID storage_id) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + /// Set next TreeNode/CollapsingHeader storage id. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemStorageID(ImGuiID storage_id); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextItemWidth.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextItemWidth.gen.cs new file mode 100644 index 0000000..e968f90 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextItemWidth.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set width of the _next_ common large "item+label" widget. >0.0f: width in pixels, <0.0f align + /// xx pixels to the right of window (so -FLT_MIN always align width to the right side) + /// + /// + /// C++: + /// imgui.h:549 + /// , + /// imgui.cpp:11948 + ///
void SetNextItemWidth(float item_width) + ///
+ ///
+ /// + /// + /// Parameters stacks (current window) + /// + /// + /// Affect large frame+labels widgets only. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextItemWidth(float item_width); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowBgAlpha.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowBgAlpha.gen.cs new file mode 100644 index 0000000..9994fd5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowBgAlpha.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window background color alpha. helper to easily override the Alpha component of + /// ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground. + /// + /// + /// C++: + /// imgui.h:487 + /// , + /// imgui.cpp:9030 + ///
void SetNextWindowBgAlpha(float alpha) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowBgAlpha(float alpha); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowClass.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowClass.gen.cs new file mode 100644 index 0000000..ea30b67 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowClass.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window class (control docking compatibility + provide hints to platform backend via custom + /// viewport flags and platform parent/child relationship) + /// + /// + /// C++: + /// imgui.h:977 + /// , + /// imgui.cpp:9052 + ///
void SetNextWindowClass(const ImGuiWindowClass* window_class) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowClass(ImGuiWindowClass* window_class); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowCollapsed.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowCollapsed.gen.cs new file mode 100644 index 0000000..3d214be --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowCollapsed.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window collapsed state. call before Begin() + /// + /// + /// C++: + /// imgui.h:484 + /// , + /// imgui.cpp:9021 + ///
void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowCollapsed(Bool8 collapsed, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowContentSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowContentSize.gen.cs new file mode 100644 index 0000000..dae87bf --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowContentSize.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not + /// including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to + /// leave it automatic. call before Begin() + /// + /// + /// C++: + /// imgui.h:483 + /// , + /// imgui.cpp:9007 + ///
void SetNextWindowContentSize(const ImVec2& size) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + /// Content size = inner scrollable rectangle, padded with WindowPadding. + /// SetNextWindowContentSize(ImVec2(100,100) + ImGuiWindowFlags_AlwaysAutoResize will always allow submitting a 100x100 item. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowContentSize(float2* size); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowDockID.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowDockID.gen.cs new file mode 100644 index 0000000..a281e30 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowDockID.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window dock id + /// + /// + /// C++: + /// imgui.h:976 + /// , + /// imgui.cpp:9044 + ///
void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Docking + /// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable. + /// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking! + /// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking. + /// - Drag from window menu button (upper-left button) to undock an entire node (all windows). + /// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking. + /// About dockspaces: + /// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it. + /// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent. + /// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. + /// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame! + /// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked. + /// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowFocus.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowFocus.gen.cs new file mode 100644 index 0000000..785d524 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowFocus.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window to be focused / top-most. call before Begin() + /// + /// + /// C++: + /// imgui.h:485 + /// , + /// imgui.cpp:13207 + ///
void SetNextWindowFocus() + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowFocus(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowPos.gen.cs new file mode 100644 index 0000000..981899a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowPos.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc. + /// + /// + /// C++: + /// imgui.h:480 + /// , + /// imgui.cpp:8972 + ///
+ /// void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0, 0)) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowPos(float2* pos, ImGuiCond cond, float2* pivot); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowScroll.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowScroll.gen.cs new file mode 100644 index 0000000..130063f --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowScroll.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window scrolling value (use < 0.0f to not affect a given axis). + /// + /// + /// C++: + /// imgui.h:486 + /// , + /// imgui.cpp:9014 + ///
void SetNextWindowScroll(const ImVec2& scroll) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowScroll(float2* scroll); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowSize.gen.cs new file mode 100644 index 0000000..64f0eee --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowSize.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() + /// + /// + /// C++: + /// imgui.h:481 + /// , + /// imgui.cpp:8983 + ///
void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowSize(float2* size, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowSizeConstraints.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowSizeConstraints.gen.cs new file mode 100644 index 0000000..8ba7fb4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowSizeConstraints.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and + /// max of same axis to preserve current size (which itself is a constraint). Use callback to apply + /// non-trivial programmatic constraints. + /// + /// + /// C++: + /// imgui.h:482 + /// , + /// imgui.cpp:8996 + ///
+ /// void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + /// For each axis: + /// - Use 0.0f as min or FLT_MAX as max if you don't want limits, e.g. size_min = (500.0f, 0.0f), size_max = (FLT_MAX, FLT_MAX) sets a minimum width. + /// - Use -1 for both min and max of same axis to preserve current size which itself is a constraint. + /// - See "Demo->Examples->Constrained-resizing window" for examples. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowSizeConstraints( + float2* size_min, + float2* size_max, + nint custom_callback, + void* custom_callback_data + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetNextWindowViewport.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetNextWindowViewport.gen.cs new file mode 100644 index 0000000..a35b22e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetNextWindowViewport.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set next window viewport + /// + /// + /// C++: + /// imgui.h:488 + /// , + /// imgui.cpp:9037 + ///
void SetNextWindowViewport(ImGuiID viewport_id) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetNextWindowViewport(ImGuiID viewport_id); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetScrollFromPosX.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetScrollFromPosX.gen.cs new file mode 100644 index 0000000..0ff5938 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetScrollFromPosX.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to + /// compute a valid position. + /// + /// + /// C++: + /// imgui.h:509 + /// , + /// imgui.cpp:12396 + ///
void SetScrollFromPosX(float local_x, float center_x_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollFromPosX(float local_x, float center_x_ratio); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetScrollFromPosY.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetScrollFromPosY.gen.cs new file mode 100644 index 0000000..cd5ba83 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetScrollFromPosY.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to + /// compute a valid position. + /// + /// + /// C++: + /// imgui.h:510 + /// , + /// imgui.cpp:12402 + ///
void SetScrollFromPosY(float local_y, float center_y_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollFromPosY(float local_y, float center_y_ratio); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetScrollHereX.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetScrollHereX.gen.cs new file mode 100644 index 0000000..cbbf783 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetScrollHereX.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: + /// center, 1.0: right. When using to make a "default/current item" visible, consider using + /// SetItemDefaultFocus() instead. + /// + /// + /// C++: + /// imgui.h:507 + /// , + /// imgui.cpp:12409 + ///
void SetScrollHereX(float center_x_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + /// center_x_ratio: 0.0f left of last item, 0.5f horizontal center of last item, 1.0f right of last + /// item. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollHereX(float center_x_ratio); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetScrollHereY.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetScrollHereY.gen.cs new file mode 100644 index 0000000..19de2db --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetScrollHereY.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: + /// center, 1.0: bottom. When using to make a "default/current item" visible, consider using + /// SetItemDefaultFocus() instead. + /// + /// + /// C++: + /// imgui.h:508 + /// , + /// imgui.cpp:12422 + ///
void SetScrollHereY(float center_y_ratio = 0.5f) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + /// center_y_ratio: 0.0f top of last item, 0.5f vertical center of last item, 1.0f bottom of last item. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollHereY(float center_y_ratio); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetScrollX.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetScrollX.gen.cs new file mode 100644 index 0000000..514b50c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetScrollX.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set scrolling amount [0 .. GetScrollMaxX()] + /// + /// + /// C++: + /// imgui.h:503 + /// , + /// imgui.cpp:12358 + ///
void SetScrollX(float scroll_x) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollX(float scroll_x); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetScrollY.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetScrollY.gen.cs new file mode 100644 index 0000000..495276e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetScrollY.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set scrolling amount [0 .. GetScrollMaxY()] + /// + /// + /// C++: + /// imgui.h:504 + /// , + /// imgui.cpp:12364 + ///
void SetScrollY(float scroll_y) + ///
+ ///
+ /// + /// + /// Windows Scrolling + /// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin(). + /// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY(). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetScrollY(float scroll_y); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetStateStorage.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetStateStorage.gen.cs new file mode 100644 index 0000000..0833f28 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetStateStorage.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// replace current window storage with our own (if you want to manipulate it yourself, typically clear + /// subsection of it) + /// + /// + /// C++: + /// imgui.h:1065 + /// , + /// imgui.cpp:9249 + ///
void SetStateStorage(ImGuiStorage* storage) + ///
+ ///
+ /// + /// + /// Miscellaneous Utilities + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetStateStorage(ImGuiStorage* storage); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetTabItemClosed.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetTabItemClosed.gen.cs new file mode 100644 index 0000000..d110c99 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetTabItemClosed.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on + /// reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise + /// call with a window name. + /// + /// + /// C++: + /// imgui.h:959 + /// , + /// imgui_widgets.cpp:10589 + ///
void SetTabItemClosed(const char* tab_or_docked_window_label) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + /// [Public] This is call is 100% optional but it allows to remove some one-frame glitches when a tab has been unexpectedly removed. + /// To use it to need to call the function SetTabItemClosed() between BeginTabBar() and EndTabBar(). + /// Tabs closed by the close button will automatically be flagged to avoid this issue. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetTabItemClosed(byte* tab_or_docked_window_label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetTooltip.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetTooltip.gen.cs new file mode 100644 index 0000000..b1035a5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetTooltip.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call + /// to SetTooltip(). + /// + /// + /// C++: + /// imgui.h:831 + /// , + /// imgui.cpp:12503 + ///
void SetTooltip(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Tooltips + /// - Tooltips are windows following the mouse. They do not take focus away. + /// - A tooltip window can contain items of any types. + /// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetTooltip(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetWindowCollapsed.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetWindowCollapsed.gen.cs new file mode 100644 index 0000000..132ad1a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetWindowCollapsed.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed(). + /// + /// + /// C++: + /// imgui.h:491 + /// , + /// imgui.cpp:8949 + ///
void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowCollapsed_0(Bool8 collapsed, ImGuiCond cond); + + /// + /// + /// set named window collapsed state + /// + /// + /// C++: + /// imgui.h:495 + /// , + /// imgui.cpp:8966 + ///
void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowCollapsed_1(byte* name, Bool8 collapsed, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetWindowFocus.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetWindowFocus.gen.cs new file mode 100644 index 0000000..354211c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetWindowFocus.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// (not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus(). + /// + /// + /// C++: + /// imgui.h:492 + /// , + /// imgui.cpp:13189 + ///
void SetWindowFocus() + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowFocus_0(); + + /// + /// + /// set named window to be focused / top-most. use NULL to remove focus. + /// + /// + /// C++: + /// imgui.h:496 + /// , + /// imgui.cpp:13194 + ///
void SetWindowFocus(const char* name) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowFocus_1(byte* name); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetWindowPos.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetWindowPos.gen.cs new file mode 100644 index 0000000..d03c716 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetWindowPos.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// (not recommended) set current window position - call within Begin()/End(). prefer using + /// SetNextWindowPos(), as this may incur tearing and side-effects. + /// + /// + /// C++: + /// imgui.h:489 + /// , + /// imgui.cpp:8865 + ///
void SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowPos_0(float2* pos, ImGuiCond cond); + + /// + /// + /// set named window position. + /// + /// + /// C++: + /// imgui.h:493 + /// , + /// imgui.cpp:8871 + ///
void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowPos_1(byte* name, float2* pos, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SetWindowSize.gen.cs b/Brutal.ImGui/Generated/PInvoke/SetWindowSize.gen.cs new file mode 100644 index 0000000..7f82821 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SetWindowSize.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0, 0) to force + /// an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects. + /// + /// + /// C++: + /// imgui.h:490 + /// , + /// imgui.cpp:8912 + ///
void SetWindowSize(const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowSize_0(float2* size, ImGuiCond cond); + + /// + /// + /// set named window size. set axis to 0.0f to force an auto-fit on this axis. + /// + /// + /// C++: + /// imgui.h:494 + /// , + /// imgui.cpp:8917 + ///
void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0) + ///
+ ///
+ /// + /// + /// Window manipulation + /// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void SetWindowSize_1(byte* name, float2* size, ImGuiCond cond); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Shortcut.gen.cs b/Brutal.ImGui/Generated/PInvoke/Shortcut.gen.cs new file mode 100644 index 0000000..c12fae8 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Shortcut.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:1104 + /// , + /// imgui.cpp:11123 + ///
bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0) + ///
+ ///
+ /// + /// + /// Inputs Utilities: Shortcut Testing & Routing [BETA] + /// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super. + /// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments) + /// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments) + /// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values. + /// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it. + /// Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut. + /// Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts) + /// Child2 -> no call // When Child2 is focused, Parent gets the shortcut. + /// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical. + /// This is an important property as it facilitate working with foreign code or larger codebase. + /// - To understand the difference: + /// - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect. + /// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route. + /// - Visualize registered routes in 'Metrics/Debugger->Inputs'. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowAboutWindow.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowAboutWindow.gen.cs new file mode 100644 index 0000000..fe0cfa6 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowAboutWindow.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create About window. display Dear ImGui version, credits and build/system information. + /// + /// + /// C++: + /// imgui.h:415 + /// , + /// imgui_demo.cpp:8137 + ///
void ShowAboutWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowAboutWindow(Bool8* p_open); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowDebugLogWindow.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowDebugLogWindow.gen.cs new file mode 100644 index 0000000..4740860 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowDebugLogWindow.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create Debug Log window. display a simplified log of important dear imgui events. + /// + /// + /// C++: + /// imgui.h:413 + /// , + /// imgui.cpp:23266 + ///
void ShowDebugLogWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowDebugLogWindow(Bool8* p_open); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowDemoWindow.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowDemoWindow.gen.cs new file mode 100644 index 0000000..74e2410 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowDemoWindow.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to + /// make it always available in your application! + /// + /// + /// C++: + /// imgui.h:411 + /// , + /// imgui_demo.cpp:346 + ///
void ShowDemoWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demonstrate most Dear ImGui features (this is big function!) + /// You may execute this function to experiment with the UI and understand what it does. + /// You may then search for keywords in the code when you are interested by a specific feature. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowDemoWindow(Bool8* p_open); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowFontSelector.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowFontSelector.gen.cs new file mode 100644 index 0000000..ef364f9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowFontSelector.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// add font selector block (not a window), essentially a combo listing the loaded fonts. + /// + /// + /// C++: + /// imgui.h:418 + /// , + /// imgui.cpp:23692 + ///
void ShowFontSelector(const char* label) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demo helper function to select among loaded fonts. + /// Here we use the regular BeginCombo()/EndCombo() api which is the more flexible one. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowFontSelector(byte* label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowIDStackToolWindow.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowIDStackToolWindow.gen.cs new file mode 100644 index 0000000..35ac790 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowIDStackToolWindow.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create Stack Tool window. hover items with mouse to query information about the source of their + /// unique ID. + /// + /// + /// C++: + /// imgui.h:414 + /// , + /// imgui.cpp:23588 + ///
void ShowIDStackToolWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// ID Stack Tool: Display UI + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowIDStackToolWindow(Bool8* p_open); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowMetricsWindow.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowMetricsWindow.gen.cs new file mode 100644 index 0000000..64ea98e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowMetricsWindow.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various + /// internal state, etc. + /// + /// + /// C++: + /// imgui.h:412 + /// , + /// imgui.cpp:21785 + ///
void ShowMetricsWindow(bool* p_open = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowMetricsWindow(Bool8* p_open); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowStyleEditor.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowStyleEditor.gen.cs new file mode 100644 index 0000000..832357b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowStyleEditor.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare + /// to, revert to and save to (else it uses the default style) + /// + /// + /// C++: + /// imgui.h:416 + /// , + /// imgui_demo.cpp:8358 + ///
void ShowStyleEditor(ImGuiStyle* ref = NULL) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// We omit the ImGui:: prefix in this function, as we don't expect user to be copy and pasting this + /// code. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowStyleEditor(ImGuiStyle* @ref); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowStyleSelector.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowStyleSelector.gen.cs new file mode 100644 index 0000000..78bbcf4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowStyleSelector.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// add style selector block (not a window), essentially a combo listing the default styles. + /// + /// + /// C++: + /// imgui.h:417 + /// , + /// imgui_demo.cpp:8333 + ///
bool ShowStyleSelector(const char* label) + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// Demo helper function to select among default colors. See ShowStyleEditor() for more advanced options. + /// Here we use the simplified Combo() api that packs items into a single literal string. + /// Useful for quick combo boxes where the choices are known locally. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 ShowStyleSelector(byte* label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/ShowUserGuide.gen.cs b/Brutal.ImGui/Generated/PInvoke/ShowUserGuide.gen.cs new file mode 100644 index 0000000..e0e4ce4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/ShowUserGuide.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard + /// controls). + /// + /// + /// C++: + /// imgui.h:419 + /// , + /// imgui_demo.cpp:8696 + ///
void ShowUserGuide() + ///
+ ///
+ /// + /// + /// Demo, Debug, Information + /// + /// + /// We omit the ImGui:: prefix in this function, as we don't expect user to be copy and pasting this + /// code. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void ShowUserGuide(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderAngle.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderAngle.gen.cs new file mode 100644 index 0000000..4861203 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderAngle.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:707 + /// , + /// imgui_widgets.cpp:3420 + ///
+ /// bool SliderAngle(const char* label, float* v_rad, float v_degrees_min = -360.0f, float v_degrees_max = +360.0f, const char* format = "%.0f deg", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderAngle( + byte* label, + float* v_rad, + float v_degrees_min, + float v_degrees_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderFloat.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderFloat.gen.cs new file mode 100644 index 0000000..6a4876b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderFloat.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display. + /// + /// + /// C++: + /// imgui.h:703 + /// , + /// imgui_widgets.cpp:3400 + ///
+ /// bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderFloat( + byte* label, + float* v, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderFloat2.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderFloat2.gen.cs new file mode 100644 index 0000000..85d64a4 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderFloat2.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:704 + /// , + /// imgui_widgets.cpp:3405 + ///
+ /// bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderFloat2( + byte* label, + float2* v, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderFloat3.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderFloat3.gen.cs new file mode 100644 index 0000000..3109d83 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderFloat3.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:705 + /// , + /// imgui_widgets.cpp:3410 + ///
+ /// bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderFloat3( + byte* label, + float3* v, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderFloat4.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderFloat4.gen.cs new file mode 100644 index 0000000..f7a84c5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderFloat4.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:706 + /// , + /// imgui_widgets.cpp:3415 + ///
+ /// bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderFloat4( + byte* label, + float4* v, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderInt.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderInt.gen.cs new file mode 100644 index 0000000..040bff0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderInt.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:708 + /// , + /// imgui_widgets.cpp:3431 + ///
+ /// bool SliderInt(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderInt( + byte* label, + int* v, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderInt2.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderInt2.gen.cs new file mode 100644 index 0000000..fe3ae21 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderInt2.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:709 + /// , + /// imgui_widgets.cpp:3436 + ///
+ /// bool SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderInt2( + byte* label, + int2* v, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderInt3.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderInt3.gen.cs new file mode 100644 index 0000000..95f7d5c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderInt3.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:710 + /// , + /// imgui_widgets.cpp:3441 + ///
+ /// bool SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderInt3( + byte* label, + int3* v, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderInt4.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderInt4.gen.cs new file mode 100644 index 0000000..457b975 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderInt4.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:711 + /// , + /// imgui_widgets.cpp:3446 + ///
+ /// bool SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderInt4( + byte* label, + int4* v, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderScalar.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderScalar.gen.cs new file mode 100644 index 0000000..42e0132 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderScalar.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:712 + /// , + /// imgui_widgets.cpp:3278 + ///
+ /// bool SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a slider, they are all required. + /// Read code of e.g. SliderFloat(), SliderInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderScalar( + byte* label, + ImGuiDataType data_type, + void* p_data, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SliderScalarN.gen.cs b/Brutal.ImGui/Generated/PInvoke/SliderScalarN.gen.cs new file mode 100644 index 0000000..d5bf9d9 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SliderScalarN.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:713 + /// , + /// imgui_widgets.cpp:3365 + ///
+ /// bool SliderScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + /// Add multiple sliders on 1 line for compact edition of multiple components + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SliderScalarN( + byte* label, + ImGuiDataType data_type, + void* p_data, + int components, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/SmallButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/SmallButton.gen.cs new file mode 100644 index 0000000..2e4c4da --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/SmallButton.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// button with (FramePadding.y == 0) to easily embed within text + /// + /// + /// C++: + /// imgui.h:640 + /// , + /// imgui_widgets.cpp:814 + ///
bool SmallButton(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// Small buttons fits within text without additional vertical spacing. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 SmallButton(byte* label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Spacing.gen.cs b/Brutal.ImGui/Generated/PInvoke/Spacing.gen.cs new file mode 100644 index 0000000..3a081eb --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Spacing.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// add vertical spacing. + /// + /// + /// C++: + /// imgui.h:587 + /// , + /// imgui_widgets.cpp:1572 + ///
void Spacing() + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Spacing(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/StyleColorsClassic.gen.cs b/Brutal.ImGui/Generated/PInvoke/StyleColorsClassic.gen.cs new file mode 100644 index 0000000..a8126aa --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/StyleColorsClassic.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// classic imgui style + /// + /// + /// C++: + /// imgui.h:425 + /// , + /// imgui_draw.cpp:251 + ///
void StyleColorsClassic(ImGuiStyle* dst = NULL) + ///
+ ///
+ /// + /// + /// Styles + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void StyleColorsClassic(ImGuiStyle* dst); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/StyleColorsDark.gen.cs b/Brutal.ImGui/Generated/PInvoke/StyleColorsDark.gen.cs new file mode 100644 index 0000000..2daf832 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/StyleColorsDark.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// new, recommended style (default) + /// + /// + /// C++: + /// imgui.h:423 + /// , + /// imgui_draw.cpp:184 + ///
void StyleColorsDark(ImGuiStyle* dst = NULL) + ///
+ ///
+ /// + /// + /// Styles + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void StyleColorsDark(ImGuiStyle* dst); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/StyleColorsLight.gen.cs b/Brutal.ImGui/Generated/PInvoke/StyleColorsLight.gen.cs new file mode 100644 index 0000000..19a4a91 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/StyleColorsLight.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// best used with borders and a custom, thicker font + /// + /// + /// C++: + /// imgui.h:424 + /// , + /// imgui_draw.cpp:319 + ///
void StyleColorsLight(ImGuiStyle* dst = NULL) + ///
+ ///
+ /// + /// + /// Styles + /// + /// + /// Those light colors are better suited with a thicker font than the default one + FrameBorder + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void StyleColorsLight(ImGuiStyle* dst); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TabItemButton.gen.cs b/Brutal.ImGui/Generated/PInvoke/TabItemButton.gen.cs new file mode 100644 index 0000000..1a17138 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TabItemButton.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// create a Tab behaving like a button. return true when clicked. cannot be selected in the tab bar. + /// + /// + /// C++: + /// imgui.h:958 + /// , + /// imgui_widgets.cpp:10246 + ///
bool TabItemButton(const char* label, ImGuiTabItemFlags flags = 0) + ///
+ ///
+ /// + /// + /// Tab Bars, Tabs + /// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TabItemButton(byte* label, ImGuiTabItemFlags flags); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableAngledHeadersRow.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableAngledHeadersRow.gen.cs new file mode 100644 index 0000000..73033bb --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableAngledHeadersRow.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. + /// MUST BE FIRST ROW. + /// + /// + /// C++: + /// imgui.h:923 + /// , + /// imgui_tables.cpp:3297 + ///
void TableAngledHeadersRow() + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// Unlike TableHeadersRow() it is not expected that you can reimplement or customize this with custom widgets. + /// FIXME: No hit-testing/button on the angled header. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableAngledHeadersRow(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetColumnCount.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetColumnCount.gen.cs new file mode 100644 index 0000000..7f966bd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetColumnCount.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return number of columns (value passed to BeginTable) + /// + /// + /// C++: + /// imgui.h:932 + /// , + /// imgui_tables.cpp:1707 + ///
int TableGetColumnCount() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TableGetColumnCount(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetColumnFlags.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetColumnFlags.gen.cs new file mode 100644 index 0000000..bbbdba3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetColumnFlags.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to + /// use current column. + /// + /// + /// C++: + /// imgui.h:936 + /// , + /// imgui_tables.cpp:1759 + ///
ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// We allow querying for an extra column in order to poll the IsHovered state of the right-most section + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTableColumnFlags TableGetColumnFlags(int column_n); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetColumnIndex.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetColumnIndex.gen.cs new file mode 100644 index 0000000..6e97218 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetColumnIndex.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return current column index. + /// + /// + /// C++: + /// imgui.h:933 + /// , + /// imgui_tables.cpp:2108 + ///
int TableGetColumnIndex() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TableGetColumnIndex(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetColumnName.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetColumnName.gen.cs new file mode 100644 index 0000000..36bfdc7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetColumnName.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current + /// column. + /// + /// + /// C++: + /// imgui.h:935 + /// , + /// imgui_tables.cpp:1714 + ///
const char* TableGetColumnName(int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial byte* TableGetColumnName(int column_n); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetHoveredColumn.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetHoveredColumn.gen.cs new file mode 100644 index 0000000..80849a1 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetHoveredColumn.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return hovered column. return -1 when table is not hovered. return columns_count if the unused space + /// at the right of visible columns is hovered. Can also use (TableGetColumnFlags() & + /// ImGuiTableColumnFlags_IsHovered) instead. + /// + /// + /// C++: + /// imgui.h:938 + /// , + /// imgui_tables.cpp:1801 + ///
int TableGetHoveredColumn() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// Return -1 when table is not hovered. return columns_count if hovering the unused space at the right + /// of the right-most visible column. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TableGetHoveredColumn(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetRowIndex.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetRowIndex.gen.cs new file mode 100644 index 0000000..a0dd5ad --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetRowIndex.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// return current row index (header rows are accounted for) + /// + /// + /// C++: + /// imgui.h:934 + /// , + /// imgui_tables.cpp:1880 + ///
int TableGetRowIndex() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// [Public] Note: for row coloring we use ->RowBgColorCounter which is the same value without + /// counting header rows + /// + /// + [LibraryImport("imgui")] + public static unsafe partial int TableGetRowIndex(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableGetSortSpecs.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableGetSortSpecs.gen.cs new file mode 100644 index 0000000..35ed259 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableGetSortSpecs.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer + /// over multiple frames or past any subsequent call to BeginTable(). + /// + /// + /// C++: + /// imgui.h:931 + /// , + /// imgui_tables.cpp:2880 + ///
ImGuiTableSortSpecs* TableGetSortSpecs() + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// Return NULL if no sort specs (most often when ImGuiTableFlags_Sortable is not set) + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable()! + /// + /// + [LibraryImport("imgui")] + public static unsafe partial ImGuiTableSortSpecs* TableGetSortSpecs(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableHeader.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableHeader.gen.cs new file mode 100644 index 0000000..dae01d5 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableHeader.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// submit one header cell manually (rarely used) + /// + /// + /// C++: + /// imgui.h:921 + /// , + /// imgui_tables.cpp:3150 + ///
void TableHeader(const char* label) + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// Emit a column header (text + optional sort order) + /// We cpu-clip text here so that all columns headers can be merged into a same draw call. + /// Note that because of how we cpu-clip and display sorting indicators, you _cannot_ use SameLine() after a TableHeader() + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableHeader(byte* label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableHeadersRow.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableHeadersRow.gen.cs new file mode 100644 index 0000000..4999299 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableHeadersRow.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu + /// + /// + /// C++: + /// imgui.h:922 + /// , + /// imgui_tables.cpp:3105 + ///
void TableHeadersRow() + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// [Public] This is a helper to output TableHeader() calls based on the column names declared in TableSetupColumn(). + /// The intent is that advanced users willing to create customized headers would not need to use this helper + /// and can create their own! For example: TableHeader() may be preceded by Checkbox() or other custom widgets. + /// See 'Demo->Tables->Custom headers' for a demonstration of implementing a custom version of this. + /// This code is intentionally written to not make much use of internal functions, to give you better direction + /// if you need to write your own. + /// FIXME-TABLE: TableOpenContextMenu() and TableGetHeaderRowHeight() are not public. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableHeadersRow(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableNextColumn.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableNextColumn.gen.cs new file mode 100644 index 0000000..422fad7 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableNextColumn.gen.cs @@ -0,0 +1,56 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// append into the next column (or first column of next row if currently in last column). Return true + /// when column is visible. + /// + /// + /// C++: + /// imgui.h:908 + /// , + /// imgui_tables.cpp:2143 + ///
bool TableNextColumn() + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// [Public] Append into the next column, wrap and create a new row when already on last column + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TableNextColumn(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableNextRow.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableNextRow.gen.cs new file mode 100644 index 0000000..f32f84a --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableNextRow.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// append into the first cell of a new row. + /// + /// + /// C++: + /// imgui.h:907 + /// , + /// imgui_tables.cpp:1890 + ///
void TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f) + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// [Public] Starts into the first cell of a new row + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableNextRow(ImGuiTableRowFlags row_flags, float min_row_height); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableSetBgColor.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableSetBgColor.gen.cs new file mode 100644 index 0000000..026a687 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableSetBgColor.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details. + /// + /// + /// C++: + /// imgui.h:939 + /// , + /// imgui_tables.cpp:1823 + ///
void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n = -1) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetBgColor(ImGuiTableBgTarget target, uint color, int column_n); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableSetColumnEnabled.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableSetColumnEnabled.gen.cs new file mode 100644 index 0000000..2c7c27c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableSetColumnEnabled.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// change user accessible enabled/disabled state of a column. Set to false to hide the column. User can + /// use the context menu to change this themselves (right-click in headers, or right-click in columns + /// body with ImGuiTableFlags_ContextMenuInBody) + /// + /// + /// C++: + /// imgui.h:937 + /// , + /// imgui_tables.cpp:1741 + ///
void TableSetColumnEnabled(int column_n, bool v) + ///
+ ///
+ /// + /// + /// Tables: Sorting & Miscellaneous functions + /// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. + /// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have + /// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, + /// else you may wastefully sort your data every frame! + /// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. + /// + /// + /// Change user accessible enabled/disabled state of a column (often perceived as "showing/hiding" from users point of view) + /// Note that end-user can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody) + /// - Require table to have the ImGuiTableFlags_Hideable flag because we are manipulating user accessible state. + /// - Request will be applied during next layout, which happens on the first call to TableNextRow() after BeginTable(). + /// - For the getter you can test (TableGetColumnFlags() & ImGuiTableColumnFlags_IsEnabled) != 0. + /// - Alternative: the ImGuiTableColumnFlags_Disabled is an overriding/master disable flag which will also hide the column from context menu. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetColumnEnabled(int column_n, Bool8 v); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableSetColumnIndex.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableSetColumnIndex.gen.cs new file mode 100644 index 0000000..6ce7fbd --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableSetColumnIndex.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// append into the specified column. Return true when column is visible. + /// + /// + /// C++: + /// imgui.h:909 + /// , + /// imgui_tables.cpp:2118 + ///
bool TableSetColumnIndex(int column_n) + ///
+ ///
+ /// + /// + /// Tables + /// - Full-featured replacement for old Columns API. + /// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary. + /// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags. + /// The typical call flow is: + /// - 1. Call BeginTable(), early out if returning false. + /// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults. + /// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows. + /// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. + /// - 5. Populate contents: + /// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column. + /// - If you are using tables as a sort of grid, where every column is holding the same type of contents, + /// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). + /// TableNextColumn() will automatically wrap-around into the next row if needed. + /// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! + /// - Summary of possible call flow: + /// - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + /// - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + /// - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + /// - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! + /// - 5. Call EndTable() + /// + /// + /// [Public] Append into a specific column + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TableSetColumnIndex(int column_n); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableSetupColumn.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableSetupColumn.gen.cs new file mode 100644 index 0000000..2101c89 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableSetupColumn.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:919 + /// , + /// imgui_tables.cpp:1599 + ///
+ /// void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0) + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// See "COLUMNS SIZING POLICIES" comments at the top of this file + /// If (init_width_or_weight <= 0.0f) it is ignored + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetupColumn( + byte* label, + ImGuiTableColumnFlags flags, + float init_width_or_weight, + ImGuiID user_id + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TableSetupScrollFreeze.gen.cs b/Brutal.ImGui/Generated/PInvoke/TableSetupScrollFreeze.gen.cs new file mode 100644 index 0000000..2dda267 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TableSetupScrollFreeze.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// lock columns/rows so they stay visible when scrolled. + /// + /// + /// C++: + /// imgui.h:920 + /// , + /// imgui_tables.cpp:1660 + ///
void TableSetupScrollFreeze(int cols, int rows) + ///
+ ///
+ /// + /// + /// Tables: Headers & Columns declaration + /// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. + /// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. + /// Headers are required to perform: reordering, sorting, and opening the context menu. + /// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. + /// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in + /// some advanced use cases (e.g. adding custom widgets in header row). + /// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. + /// + /// + /// [Public] + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TableSetupScrollFreeze(int cols, int rows); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Text.gen.cs b/Brutal.ImGui/Generated/PInvoke/Text.gen.cs new file mode 100644 index 0000000..ad0c4a2 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Text.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// formatted text + /// + /// + /// C++: + /// imgui.h:622 + /// , + /// imgui_widgets.cpp:273 + ///
void Text(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Text(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextColored.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextColored.gen.cs new file mode 100644 index 0000000..4f357da --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextColored.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor(); + /// + /// + /// C++: + /// imgui.h:624 + /// , + /// imgui_widgets.cpp:292 + ///
void TextColored(const ImVec4& col, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextColored(float4* col, byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextDisabled.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextDisabled.gen.cs new file mode 100644 index 0000000..cffc9be --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextDisabled.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); + /// PopStyleColor(); + /// + /// + /// C++: + /// imgui.h:626 + /// , + /// imgui_widgets.cpp:307 + ///
void TextDisabled(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextDisabled(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextLink.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextLink.gen.cs new file mode 100644 index 0000000..67cb387 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextLink.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// hyperlink text button, return true when clicked + /// + /// + /// C++: + /// imgui.h:650 + /// , + /// imgui_widgets.cpp:1489 + ///
bool TextLink(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + /// This is provided as a convenience for being an often requested feature. + /// FIXME-STYLE: we delayed adding as there is a larger plan to revamp the styling system. + /// Because of this we currently don't provide many styling options for this widget + /// (e.g. hovered/active colors are automatically inferred from a single color). + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TextLink(byte* label); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextLinkOpenURL.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextLinkOpenURL.gen.cs new file mode 100644 index 0000000..b25a886 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextLinkOpenURL.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// hyperlink text button, automatically open file/url when clicked + /// + /// + /// C++: + /// imgui.h:651 + /// , + /// imgui_widgets.cpp:1541 + ///
bool TextLinkOpenURL(const char* label, const char* url = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Main + /// - Most widgets return true when the value has been changed or when pressed/selected + /// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TextLinkOpenURL(byte* label, byte* url); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextUnformatted.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextUnformatted.gen.cs new file mode 100644 index 0000000..5c7739b --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextUnformatted.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null + /// terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size + /// limits, recommended for long chunks of text. + /// + /// + /// C++: + /// imgui.h:621 + /// , + /// imgui_widgets.cpp:268 + ///
void TextUnformatted(const char* text, const char* text_end = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextUnformatted(byte* text, byte* text_end); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextV.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextV.gen.cs new file mode 100644 index 0000000..11a0a28 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextV.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:623 + /// , + /// imgui_widgets.cpp:281 + ///
void TextV(const char* fmt, va_list args) IM_FMTLIST(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextV(byte* fmt, byte* args); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TextWrapped.gen.cs b/Brutal.ImGui/Generated/PInvoke/TextWrapped.gen.cs new file mode 100644 index 0000000..e064d00 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TextWrapped.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on + /// an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set + /// a size using SetNextWindowSize(). + /// + /// + /// C++: + /// imgui.h:628 + /// , + /// imgui_widgets.cpp:323 + ///
void TextWrapped(const char* fmt, ...) IM_FMTARGS(1) + ///
+ ///
+ /// + /// + /// Widgets: Text + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TextWrapped(byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TreeNode.gen.cs b/Brutal.ImGui/Generated/PInvoke/TreeNode.gen.cs new file mode 100644 index 0000000..f2531c0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TreeNode.gen.cs @@ -0,0 +1,73 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:748 + /// , + /// imgui_widgets.cpp:6489 + ///
bool TreeNode(const char* label) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNode_0(byte* label); + + /// + /// + /// helper variation to easily decorelate the id from the displayed string. Read the FAQ about why and + /// how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet(). + /// + /// + /// C++: + /// imgui.h:749 + /// , + /// imgui_widgets.cpp:6471 + ///
bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNode_1(byte* str_id, byte* fmt); + + /// + /// + /// " + /// + /// + /// C++: + /// imgui.h:750 + /// , + /// imgui_widgets.cpp:6480 + ///
bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNode_2(void* ptr_id, byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TreeNodeEx.gen.cs b/Brutal.ImGui/Generated/PInvoke/TreeNodeEx.gen.cs new file mode 100644 index 0000000..77428d3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TreeNodeEx.gen.cs @@ -0,0 +1,68 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:753 + /// , + /// imgui_widgets.cpp:6508 + ///
bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNodeEx_0(byte* label, ImGuiTreeNodeFlags flags); + + /// + /// + /// C++: + /// imgui.h:754 + /// , + /// imgui_widgets.cpp:6517 + ///
+ /// bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNodeEx_1(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); + + /// + /// + /// C++: + /// imgui.h:755 + /// , + /// imgui_widgets.cpp:6526 + ///
+ /// bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 TreeNodeEx_2(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TreePop.gen.cs b/Brutal.ImGui/Generated/PInvoke/TreePop.gen.cs new file mode 100644 index 0000000..bf14e3e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TreePop.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ~ Unindent()+PopID() + /// + /// + /// C++: + /// imgui.h:760 + /// , + /// imgui_widgets.cpp:7008 + ///
void TreePop() + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreePop(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/TreePush.gen.cs b/Brutal.ImGui/Generated/PInvoke/TreePush.gen.cs new file mode 100644 index 0000000..f58ade3 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/TreePush.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call + /// TreePush/TreePop yourself if desired. + /// + /// + /// C++: + /// imgui.h:758 + /// , + /// imgui_widgets.cpp:6983 + ///
void TreePush(const char* str_id) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreePush_0(byte* str_id); + + /// + /// + /// " + /// + /// + /// C++: + /// imgui.h:759 + /// , + /// imgui_widgets.cpp:6991 + ///
void TreePush(const void* ptr_id) + ///
+ ///
+ /// + /// + /// Widgets: Trees + /// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void TreePush_1(void* ptr_id); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Unindent.gen.cs b/Brutal.ImGui/Generated/PInvoke/Unindent.gen.cs new file mode 100644 index 0000000..a303e94 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Unindent.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0 + /// + /// + /// C++: + /// imgui.h:590 + /// , + /// imgui.cpp:11939 + ///
void Unindent(float indent_w = 0.0f) + ///
+ ///
+ /// + /// + /// Other layout functions + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Unindent(float indent_w); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/UpdatePlatformWindows.gen.cs b/Brutal.ImGui/Generated/PInvoke/UpdatePlatformWindows.gen.cs new file mode 100644 index 0000000..f92d68c --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/UpdatePlatformWindows.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary + /// viewport, and DestroyWindow for each inactive viewport. + /// + /// + /// C++: + /// imgui.h:1174 + /// , + /// imgui.cpp:16926 + ///
void UpdatePlatformWindows() + ///
+ ///
+ /// + /// + /// (Optional) Platform/OS interface for multi-viewport support + /// Read comments around the ImGuiPlatformIO structure for more details. + /// Note: You may use GetWindowViewport() to get the current viewport of the current window. + /// + /// + /// Called by user at the end of the main loop, after EndFrame() + /// This will handle the creation/update of all OS windows via function defined in the ImGuiPlatformIO api. + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void UpdatePlatformWindows(); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/VSliderFloat.gen.cs b/Brutal.ImGui/Generated/PInvoke/VSliderFloat.gen.cs new file mode 100644 index 0000000..6e18d4d --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/VSliderFloat.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:714 + /// , + /// imgui_widgets.cpp:3511 + ///
+ /// bool VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 VSliderFloat( + byte* label, + float2* size, + float* v, + float v_min, + float v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/VSliderInt.gen.cs b/Brutal.ImGui/Generated/PInvoke/VSliderInt.gen.cs new file mode 100644 index 0000000..69c343e --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/VSliderInt.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:715 + /// , + /// imgui_widgets.cpp:3516 + ///
+ /// bool VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 VSliderInt( + byte* label, + float2* size, + int* v, + int v_min, + int v_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/VSliderScalar.gen.cs b/Brutal.ImGui/Generated/PInvoke/VSliderScalar.gen.cs new file mode 100644 index 0000000..7da0da0 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/VSliderScalar.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:716 + /// , + /// imgui_widgets.cpp:3451 + ///
+ /// bool VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0) + ///
+ ///
+ /// + /// + /// Widgets: Regular Sliders + /// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp. + /// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc. + /// - Format string may also be set to NULL or use the default format ("%f" or "%d"). + /// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument. + /// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 + /// + /// + [LibraryImport("imgui")] + public static unsafe partial Bool8 VSliderScalar( + byte* label, + float2* size, + ImGuiDataType data_type, + void* p_data, + void* p_min, + void* p_max, + byte* format, + ImGuiSliderFlags flags + ); + } + } +} diff --git a/Brutal.ImGui/Generated/PInvoke/Value.gen.cs b/Brutal.ImGui/Generated/PInvoke/Value.gen.cs new file mode 100644 index 0000000..8dda708 --- /dev/null +++ b/Brutal.ImGui/Generated/PInvoke/Value.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImGuiApi +{ + public partial class ImGui + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// imgui.h:806 + /// , + /// imgui_widgets.cpp:8733 + ///
void Value(const char* prefix, bool b) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Value_0(byte* prefix, Bool8 b); + + /// + /// + /// C++: + /// imgui.h:807 + /// , + /// imgui_widgets.cpp:8738 + ///
void Value(const char* prefix, int v) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Value_1(byte* prefix, int v); + + /// + /// + /// C++: + /// imgui.h:808 + /// , + /// imgui_widgets.cpp:8743 + ///
void Value(const char* prefix, unsigned int v) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Value_2(byte* prefix, uint v); + + /// + /// + /// C++: + /// imgui.h:809 + /// , + /// imgui_widgets.cpp:8748 + ///
void Value(const char* prefix, float v, const char* float_format = NULL) + ///
+ ///
+ /// + /// + /// Widgets: Value() Helpers. + /// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) + /// + /// + [LibraryImport("imgui")] + public static unsafe partial void Value_3(byte* prefix, float v, byte* float_format); + } + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawChannel.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawChannel.gen.cs new file mode 100644 index 0000000..8fc4701 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawChannel.gen.cs @@ -0,0 +1,114 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Temporary storage to output draw commands out of order, used by ImDrawListSplitter and + /// ImDrawList::ChannelsSplit() + /// + /// + /// C++: + /// imgui.h:174 + ///
struct ImDrawChannel + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImDrawChannel + { + /// + /// + /// C++: + /// imgui.h:3281 + ///
ImVector<ImDrawCmd> _CmdBuffer + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawListSplitter + /// + /// + [FieldOffset(0)] + public ImVector _CmdBuffer; + + /// + /// + /// C++: + /// imgui.h:3282 + ///
ImVector<ImDrawIdx> _IdxBuffer + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawListSplitter + /// + /// + [FieldOffset(16)] + public ImVector _IdxBuffer; + } + + /// + /// + /// Temporary storage to output draw commands out of order, used by ImDrawListSplitter and + /// ImDrawList::ChannelsSplit() + /// + /// + /// C++: + /// imgui.h:174 + ///
struct ImDrawChannel + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImDrawChannelPtr(ImDrawChannel* ptr) : INullable + { + private ImDrawChannel* _ptr = ptr; + public ImDrawChannel* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawChannelPtr(ImDrawChannel* ptr) => new(ptr); + + public static implicit operator ImDrawChannel*(ImDrawChannelPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:3281 + ///
ImVector<ImDrawCmd> _CmdBuffer + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawListSplitter + /// + /// + public ref ImVector _CmdBuffer => ref Unsafe.AsRef>(&_ptr->_CmdBuffer); + + /// + /// + /// C++: + /// imgui.h:3282 + ///
ImVector<ImDrawIdx> _IdxBuffer + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawListSplitter + /// + /// + public ref ImVector _IdxBuffer => ref Unsafe.AsRef>(&_ptr->_IdxBuffer); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawCmd.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawCmd.gen.cs new file mode 100644 index 0000000..86df83c --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawCmd.gen.cs @@ -0,0 +1,457 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a + /// callback) + /// + /// + /// C++: + /// imgui.h:175 + ///
struct ImDrawCmd + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public partial struct ImDrawCmd + { + /// + /// + /// 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping + /// rectangle in "viewport" coordinates + /// + /// + /// C++: + /// imgui.h:3237 + ///
ImVec4 ClipRect + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(0)] + public float4 ClipRect; + + /// + /// + /// 16 // Reference to a font/texture atlas (where backend called ImTextureData::SetTexID()) or to a + /// user-provided texture ID (via e.g. ImGui::Image() calls). Both will lead to a ImTextureID value. + /// + /// + /// C++: + /// imgui.h:3238 + ///
ImTextureRef TexRef + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(16)] + public ImTextureRef TexRef; + + /// + /// + /// 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may + /// be >0 to support meshes larger than 64K vertices with 16-bit indices. + /// + /// + /// C++: + /// imgui.h:3239 + ///
unsigned int VtxOffset + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(32)] + public uint VtxOffset; + + /// + /// + /// 4 // Start offset in index buffer. + /// + /// + /// C++: + /// imgui.h:3240 + ///
unsigned int IdxOffset + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(36)] + public uint IdxOffset; + + /// + /// + /// 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee + /// ImDrawList's vtx_buffer[] array, indices in idx_buffer[]. + /// + /// + /// C++: + /// imgui.h:3241 + ///
unsigned int ElemCount + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(40)] + public uint ElemCount; + + /// + /// + /// 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will + /// be set normally. + /// + /// + /// C++: + /// imgui.h:3242 + ///
ImDrawCallback UserCallback + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(48)] + public nint UserCallback; + + /// + /// + /// 4-8 // Callback user data (when UserCallback != NULL). If called AddCallback() with size == 0, this is + /// a copy of the AddCallback() argument. If called AddCallback() with size > 0, this is pointing to a + /// buffer where data is stored. + /// + /// + /// C++: + /// imgui.h:3243 + ///
void* UserCallbackData + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(56)] + public nint UserCallbackData; + + /// + /// + /// 4 // Size of callback user data when using storage, otherwise 0. + /// + /// + /// C++: + /// imgui.h:3244 + ///
int UserCallbackDataSize + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(64)] + public int UserCallbackDataSize; + + /// + /// + /// 4 // [Internal] Offset of callback user data when using storage, otherwise -1. + /// + /// + /// C++: + /// imgui.h:3245 + ///
int UserCallbackDataOffset + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + [FieldOffset(68)] + public int UserCallbackDataOffset; + } + + /// + /// + /// A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a + /// callback) + /// + /// + /// C++: + /// imgui.h:175 + ///
struct ImDrawCmd + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImDrawCmdPtr(ImDrawCmd* ptr) : INullable + { + private ImDrawCmd* _ptr = ptr; + public ImDrawCmd* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawCmdPtr(ImDrawCmd* ptr) => new(ptr); + + public static implicit operator ImDrawCmd*(ImDrawCmdPtr wrapper) => wrapper.Ptr; + + /// + /// + /// 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping + /// rectangle in "viewport" coordinates + /// + /// + /// C++: + /// imgui.h:3237 + ///
ImVec4 ClipRect + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref float4 ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect); + + /// + /// + /// 16 // Reference to a font/texture atlas (where backend called ImTextureData::SetTexID()) or to a + /// user-provided texture ID (via e.g. ImGui::Image() calls). Both will lead to a ImTextureID value. + /// + /// + /// C++: + /// imgui.h:3238 + ///
ImTextureRef TexRef + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref ImTextureRef TexRef => ref Unsafe.AsRef(&_ptr->TexRef); + + /// + /// + /// 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may + /// be >0 to support meshes larger than 64K vertices with 16-bit indices. + /// + /// + /// C++: + /// imgui.h:3239 + ///
unsigned int VtxOffset + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref uint VtxOffset => ref Unsafe.AsRef(&_ptr->VtxOffset); + + /// + /// + /// 4 // Start offset in index buffer. + /// + /// + /// C++: + /// imgui.h:3240 + ///
unsigned int IdxOffset + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref uint IdxOffset => ref Unsafe.AsRef(&_ptr->IdxOffset); + + /// + /// + /// 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee + /// ImDrawList's vtx_buffer[] array, indices in idx_buffer[]. + /// + /// + /// C++: + /// imgui.h:3241 + ///
unsigned int ElemCount + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref uint ElemCount => ref Unsafe.AsRef(&_ptr->ElemCount); + + /// + /// + /// 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will + /// be set normally. + /// + /// + /// C++: + /// imgui.h:3242 + ///
ImDrawCallback UserCallback + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref nint UserCallback => ref Unsafe.AsRef(&_ptr->UserCallback); + + /// + /// + /// 4-8 // Callback user data (when UserCallback != NULL). If called AddCallback() with size == 0, this is + /// a copy of the AddCallback() argument. If called AddCallback() with size > 0, this is pointing to a + /// buffer where data is stored. + /// + /// + /// C++: + /// imgui.h:3243 + ///
void* UserCallbackData + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref nint UserCallbackData => ref Unsafe.AsRef(&_ptr->UserCallbackData); + + /// + /// + /// 4 // Size of callback user data when using storage, otherwise 0. + /// + /// + /// C++: + /// imgui.h:3244 + ///
int UserCallbackDataSize + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref int UserCallbackDataSize => ref Unsafe.AsRef(&_ptr->UserCallbackDataSize); + + /// + /// + /// 4 // [Internal] Offset of callback user data when using storage, otherwise -1. + /// + /// + /// C++: + /// imgui.h:3245 + ///
int UserCallbackDataOffset + ///
+ ///
+ /// + /// + /// Typically, 1 command = 1 GPU draw call (unless command is a callback) + /// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, + /// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices. + /// Backends made for <1.71. will typically ignore the VtxOffset fields. + /// - The ClipRect/TexRef/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for). + /// + /// + public ref int UserCallbackDataOffset => ref Unsafe.AsRef(&_ptr->UserCallbackDataOffset); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawCmdHeader.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawCmdHeader.gen.cs new file mode 100644 index 0000000..1f41b27 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawCmdHeader.gen.cs @@ -0,0 +1,135 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:3271 + ///
struct ImDrawCmdHeader + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImDrawCmdHeader + { + /// + /// + /// C++: + /// imgui.h:3273 + ///
ImVec4 ClipRect + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + [FieldOffset(0)] + public float4 ClipRect; + + /// + /// + /// C++: + /// imgui.h:3274 + ///
ImTextureRef TexRef + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + [FieldOffset(16)] + public ImTextureRef TexRef; + + /// + /// + /// C++: + /// imgui.h:3275 + ///
unsigned int VtxOffset + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + [FieldOffset(32)] + public uint VtxOffset; + } + + /// + /// + /// C++: + /// imgui.h:3271 + ///
struct ImDrawCmdHeader + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + public unsafe partial struct ImDrawCmdHeaderPtr(ImDrawCmdHeader* ptr) : INullable + { + private ImDrawCmdHeader* _ptr = ptr; + public ImDrawCmdHeader* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawCmdHeaderPtr(ImDrawCmdHeader* ptr) => new(ptr); + + public static implicit operator ImDrawCmdHeader*(ImDrawCmdHeaderPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:3273 + ///
ImVec4 ClipRect + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + public ref float4 ClipRect => ref Unsafe.AsRef(&_ptr->ClipRect); + + /// + /// + /// C++: + /// imgui.h:3274 + ///
ImTextureRef TexRef + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + public ref ImTextureRef TexRef => ref Unsafe.AsRef(&_ptr->TexRef); + + /// + /// + /// C++: + /// imgui.h:3275 + ///
unsigned int VtxOffset + ///
+ ///
+ /// + /// + /// [Internal] For use by ImDrawList + /// + /// + public ref uint VtxOffset => ref Unsafe.AsRef(&_ptr->VtxOffset); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawData.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawData.gen.cs new file mode 100644 index 0000000..114a19c --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawData.gen.cs @@ -0,0 +1,457 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// All draw command lists required to render the frame + pos/size coordinates to use for the projection matrix. + /// + /// + /// C++: + /// imgui.h:176 + ///
struct ImDrawData + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public partial struct ImDrawData + { + /// + /// + /// Only valid after Render() is called and before the next NewFrame() is called. + /// + /// + /// C++: + /// imgui.h:3502 + ///
bool Valid + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(0)] + public Bool8 Valid; + + /// + /// + /// == CmdLists.Size. (OBSOLETE: exists for legacy reasons). Number of ImDrawList* to render. + /// + /// + /// C++: + /// imgui.h:3503 + ///
int CmdListsCount + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(4)] + public int CmdListsCount; + + /// + /// + /// For convenience, sum of all ImDrawList's IdxBuffer.Size + /// + /// + /// C++: + /// imgui.h:3504 + ///
int TotalIdxCount + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(8)] + public int TotalIdxCount; + + /// + /// + /// For convenience, sum of all ImDrawList's VtxBuffer.Size + /// + /// + /// C++: + /// imgui.h:3505 + ///
int TotalVtxCount + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(12)] + public int TotalVtxCount; + + /// + /// + /// Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here. + /// + /// + /// C++: + /// imgui.h:3506 + ///
ImVector<ImDrawList*> CmdLists + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(16)] + public ImVector CmdLists; + + /// + /// + /// Top-left position of the viewport to render (== top-left of the orthogonal projection matrix to use) (== + /// GetMainViewport()->Pos for the main viewport, == (0.0) in most single-viewport applications) + /// + /// + /// C++: + /// imgui.h:3507 + ///
ImVec2 DisplayPos + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(32)] + public float2 DisplayPos; + + /// + /// + /// Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize + /// in most single-viewport applications) + /// + /// + /// C++: + /// imgui.h:3508 + ///
ImVec2 DisplaySize + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(40)] + public float2 DisplaySize; + + /// + /// + /// Amount of pixels for each unit of DisplaySize. Copied from viewport->FramebufferScale (== + /// io.DisplayFramebufferScale for main viewport). Generally (1,1) on normal display, (2,2) on OSX with + /// Retina display. + /// + /// + /// C++: + /// imgui.h:3509 + ///
ImVec2 FramebufferScale + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(48)] + public float2 FramebufferScale; + + /// + /// + /// Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not). + /// + /// + /// C++: + /// imgui.h:3510 + ///
ImGuiViewport* OwnerViewport + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(56)] + public ImGuiViewportPtr OwnerViewport; + + /// + /// + /// List of textures to update. Most of the times the list is shared by all ImDrawData, has only 1 texture + /// and it doesn't need any update. This almost always points to ImGui::GetPlatformIO().Textures[]. May be + /// overriden or set to NULL if you want to manually update textures. + /// + /// + /// C++: + /// imgui.h:3511 + ///
ImVector<ImTextureData*>* Textures + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + [FieldOffset(64)] + public Ptr> Textures; + } + + /// + /// + /// All draw command lists required to render the frame + pos/size coordinates to use for the projection matrix. + /// + /// + /// C++: + /// imgui.h:176 + ///
struct ImDrawData + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImDrawDataPtr(ImDrawData* ptr) : INullable + { + private ImDrawData* _ptr = ptr; + public ImDrawData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawDataPtr(ImDrawData* ptr) => new(ptr); + + public static implicit operator ImDrawData*(ImDrawDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Only valid after Render() is called and before the next NewFrame() is called. + /// + /// + /// C++: + /// imgui.h:3502 + ///
bool Valid + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref bool Valid => ref Unsafe.AsRef(&_ptr->Valid); + + /// + /// + /// == CmdLists.Size. (OBSOLETE: exists for legacy reasons). Number of ImDrawList* to render. + /// + /// + /// C++: + /// imgui.h:3503 + ///
int CmdListsCount + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref int CmdListsCount => ref Unsafe.AsRef(&_ptr->CmdListsCount); + + /// + /// + /// For convenience, sum of all ImDrawList's IdxBuffer.Size + /// + /// + /// C++: + /// imgui.h:3504 + ///
int TotalIdxCount + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref int TotalIdxCount => ref Unsafe.AsRef(&_ptr->TotalIdxCount); + + /// + /// + /// For convenience, sum of all ImDrawList's VtxBuffer.Size + /// + /// + /// C++: + /// imgui.h:3505 + ///
int TotalVtxCount + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref int TotalVtxCount => ref Unsafe.AsRef(&_ptr->TotalVtxCount); + + /// + /// + /// Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here. + /// + /// + /// C++: + /// imgui.h:3506 + ///
ImVector<ImDrawList*> CmdLists + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref ImVector CmdLists => ref Unsafe.AsRef>(&_ptr->CmdLists); + + /// + /// + /// Top-left position of the viewport to render (== top-left of the orthogonal projection matrix to use) (== + /// GetMainViewport()->Pos for the main viewport, == (0.0) in most single-viewport applications) + /// + /// + /// C++: + /// imgui.h:3507 + ///
ImVec2 DisplayPos + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref float2 DisplayPos => ref Unsafe.AsRef(&_ptr->DisplayPos); + + /// + /// + /// Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize + /// in most single-viewport applications) + /// + /// + /// C++: + /// imgui.h:3508 + ///
ImVec2 DisplaySize + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref float2 DisplaySize => ref Unsafe.AsRef(&_ptr->DisplaySize); + + /// + /// + /// Amount of pixels for each unit of DisplaySize. Copied from viewport->FramebufferScale (== + /// io.DisplayFramebufferScale for main viewport). Generally (1,1) on normal display, (2,2) on OSX with + /// Retina display. + /// + /// + /// C++: + /// imgui.h:3509 + ///
ImVec2 FramebufferScale + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref float2 FramebufferScale => ref Unsafe.AsRef(&_ptr->FramebufferScale); + + /// + /// + /// Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not). + /// + /// + /// C++: + /// imgui.h:3510 + ///
ImGuiViewport* OwnerViewport + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref ImGuiViewportPtr OwnerViewport => ref Unsafe.AsRef(&_ptr->OwnerViewport); + + /// + /// + /// List of textures to update. Most of the times the list is shared by all ImDrawData, has only 1 texture + /// and it doesn't need any update. This almost always points to ImGui::GetPlatformIO().Textures[]. May be + /// overriden or set to NULL if you want to manually update textures. + /// + /// + /// C++: + /// imgui.h:3511 + ///
ImVector<ImTextureData*>* Textures + ///
+ ///
+ /// + /// + /// All draw data to render a Dear ImGui frame + /// (NB: the style and the naming convention here is a little inconsistent, we currently preserve them for backward compatibility purpose, + /// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList) + /// + /// + public ref Ptr> Textures => + ref Unsafe.AsRef>>(&_ptr->Textures); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawList.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawList.gen.cs new file mode 100644 index 0000000..9ae69d0 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawList.gen.cs @@ -0,0 +1,627 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// A single draw command list (generally one per window, conceptually you may see this as a dynamic "mesh" + /// builder) + /// + /// + /// C++: + /// imgui.h:177 + ///
struct ImDrawList + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 224)] + public partial struct ImDrawList + { + /// + /// + /// Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback. + /// + /// + /// C++: + /// imgui.h:3345 + ///
ImVector<ImDrawCmd> CmdBuffer + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + [FieldOffset(0)] + public ImVector CmdBuffer; + + /// + /// + /// Index buffer. Each command consume ImDrawCmd::ElemCount of those + /// + /// + /// C++: + /// imgui.h:3346 + ///
ImVector<ImDrawIdx> IdxBuffer + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + [FieldOffset(16)] + public ImVector IdxBuffer; + + /// + /// + /// Vertex buffer. + /// + /// + /// C++: + /// imgui.h:3347 + ///
ImVector<ImDrawVert> VtxBuffer + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + [FieldOffset(32)] + public ImVector VtxBuffer; + + /// + /// + /// Flags, you may poke into these to adjust anti-aliasing settings per-primitive. + /// + /// + /// C++: + /// imgui.h:3348 + ///
ImDrawListFlags Flags + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + [FieldOffset(48)] + public ImDrawListFlags Flags; + + /// + /// + /// [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to + /// 0. + /// + /// + /// C++: + /// imgui.h:3351 + ///
unsigned int _VtxCurrentIdx + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(52)] + public uint _VtxCurrentIdx; + + /// + /// + /// Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current + /// ImGui context) + /// + /// + /// C++: + /// imgui.h:3352 + ///
ImDrawListSharedData* _Data + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(56)] + public ImDrawListSharedDataPtr _Data; + + /// + /// + /// [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> + /// operators too much) + /// + /// + /// C++: + /// imgui.h:3353 + ///
ImDrawVert* _VtxWritePtr + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(64)] + public ImDrawVertPtr _VtxWritePtr; + + /// + /// + /// [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> + /// operators too much) + /// + /// + /// C++: + /// imgui.h:3354 + ///
ImDrawIdx* _IdxWritePtr + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(72)] + public Ptr _IdxWritePtr; + + /// + /// + /// [Internal] current path building + /// + /// + /// C++: + /// imgui.h:3355 + ///
ImVector<ImVec2> _Path + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(80)] + public ImVector _Path; + + /// + /// + /// [Internal] template of active commands. Fields should match those of CmdBuffer.back(). + /// + /// + /// C++: + /// imgui.h:3356 + ///
ImDrawCmdHeader _CmdHeader + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(96)] + public ImDrawCmdHeader _CmdHeader; + + /// + /// + /// [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!) + /// + /// + /// C++: + /// imgui.h:3357 + ///
ImDrawListSplitter _Splitter + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(136)] + public ImDrawListSplitter _Splitter; + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:3358 + ///
ImVector<ImVec4> _ClipRectStack + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(160)] + public ImVector _ClipRectStack; + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:3359 + ///
ImVector<ImTextureRef> _TextureStack + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(176)] + public ImVector _TextureStack; + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:3360 + ///
ImVector<ImU8> _CallbacksDataBuf + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(192)] + public ImVector _CallbacksDataBuf; + + /// + /// + /// [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at + /// vertex buffer content + /// + /// + /// C++: + /// imgui.h:3361 + ///
float _FringeScale + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(208)] + public float _FringeScale; + + /// + /// + /// Pointer to owner window's name for debugging + /// + /// + /// C++: + /// imgui.h:3362 + ///
const char* _OwnerName + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + [FieldOffset(216)] + public Ptr _OwnerName; + } + + /// + /// + /// A single draw command list (generally one per window, conceptually you may see this as a dynamic "mesh" + /// builder) + /// + /// + /// C++: + /// imgui.h:177 + ///
struct ImDrawList + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImDrawListPtr(ImDrawList* ptr) : INullable + { + private ImDrawList* _ptr = ptr; + public ImDrawList* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawListPtr(ImDrawList* ptr) => new(ptr); + + public static implicit operator ImDrawList*(ImDrawListPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback. + /// + /// + /// C++: + /// imgui.h:3345 + ///
ImVector<ImDrawCmd> CmdBuffer + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + public ref ImVector CmdBuffer => ref Unsafe.AsRef>(&_ptr->CmdBuffer); + + /// + /// + /// Index buffer. Each command consume ImDrawCmd::ElemCount of those + /// + /// + /// C++: + /// imgui.h:3346 + ///
ImVector<ImDrawIdx> IdxBuffer + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + public ref ImVector IdxBuffer => ref Unsafe.AsRef>(&_ptr->IdxBuffer); + + /// + /// + /// Vertex buffer. + /// + /// + /// C++: + /// imgui.h:3347 + ///
ImVector<ImDrawVert> VtxBuffer + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + public ref ImVector VtxBuffer => ref Unsafe.AsRef>(&_ptr->VtxBuffer); + + /// + /// + /// Flags, you may poke into these to adjust anti-aliasing settings per-primitive. + /// + /// + /// C++: + /// imgui.h:3348 + ///
ImDrawListFlags Flags + ///
+ ///
+ /// + /// + /// This is what you have to render + /// + /// + public ref ImDrawListFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to + /// 0. + /// + /// + /// C++: + /// imgui.h:3351 + ///
unsigned int _VtxCurrentIdx + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref uint _VtxCurrentIdx => ref Unsafe.AsRef(&_ptr->_VtxCurrentIdx); + + /// + /// + /// Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current + /// ImGui context) + /// + /// + /// C++: + /// imgui.h:3352 + ///
ImDrawListSharedData* _Data + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImDrawListSharedDataPtr _Data => ref Unsafe.AsRef(&_ptr->_Data); + + /// + /// + /// [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> + /// operators too much) + /// + /// + /// C++: + /// imgui.h:3353 + ///
ImDrawVert* _VtxWritePtr + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImDrawVertPtr _VtxWritePtr => ref Unsafe.AsRef(&_ptr->_VtxWritePtr); + + /// + /// + /// [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> + /// operators too much) + /// + /// + /// C++: + /// imgui.h:3354 + ///
ImDrawIdx* _IdxWritePtr + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref Ptr _IdxWritePtr => ref Unsafe.AsRef>(&_ptr->_IdxWritePtr); + + /// + /// + /// [Internal] current path building + /// + /// + /// C++: + /// imgui.h:3355 + ///
ImVector<ImVec2> _Path + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImVector _Path => ref Unsafe.AsRef>(&_ptr->_Path); + + /// + /// + /// [Internal] template of active commands. Fields should match those of CmdBuffer.back(). + /// + /// + /// C++: + /// imgui.h:3356 + ///
ImDrawCmdHeader _CmdHeader + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImDrawCmdHeader _CmdHeader => ref Unsafe.AsRef(&_ptr->_CmdHeader); + + /// + /// + /// [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!) + /// + /// + /// C++: + /// imgui.h:3357 + ///
ImDrawListSplitter _Splitter + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImDrawListSplitter _Splitter => ref Unsafe.AsRef(&_ptr->_Splitter); + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:3358 + ///
ImVector<ImVec4> _ClipRectStack + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImVector _ClipRectStack => ref Unsafe.AsRef>(&_ptr->_ClipRectStack); + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:3359 + ///
ImVector<ImTextureRef> _TextureStack + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImVector _TextureStack => + ref Unsafe.AsRef>(&_ptr->_TextureStack); + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui.h:3360 + ///
ImVector<ImU8> _CallbacksDataBuf + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref ImVector _CallbacksDataBuf => ref Unsafe.AsRef>(&_ptr->_CallbacksDataBuf); + + /// + /// + /// [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at + /// vertex buffer content + /// + /// + /// C++: + /// imgui.h:3361 + ///
float _FringeScale + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref float _FringeScale => ref Unsafe.AsRef(&_ptr->_FringeScale); + + /// + /// + /// Pointer to owner window's name for debugging + /// + /// + /// C++: + /// imgui.h:3362 + ///
const char* _OwnerName + ///
+ ///
+ /// + /// + /// [Internal, used while building lists] + /// + /// + public ref Ptr _OwnerName => ref Unsafe.AsRef>(&_ptr->_OwnerName); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawListSplitter.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawListSplitter.gen.cs new file mode 100644 index 0000000..6791fb7 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawListSplitter.gen.cs @@ -0,0 +1,165 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper to split a draw list into different layers which can be drawn into out of order, then flattened back. + /// + /// + /// C++: + /// imgui.h:179 + ///
struct ImDrawListSplitter + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImDrawListSplitter + { + /// + /// + /// Current channel number (0) + /// + /// + /// C++: + /// imgui.h:3289 + ///
int _Current + ///
+ ///
+ /// + /// + /// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order. + /// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call. + /// + /// + [FieldOffset(0)] + public int _Current; + + /// + /// + /// Number of active channels (1+) + /// + /// + /// C++: + /// imgui.h:3290 + ///
int _Count + ///
+ ///
+ /// + /// + /// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order. + /// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call. + /// + /// + [FieldOffset(4)] + public int _Count; + + /// + /// + /// Draw channels (not resized down so _Count might be < Channels.Size) + /// + /// + /// C++: + /// imgui.h:3291 + ///
ImVector<ImDrawChannel> _Channels + ///
+ ///
+ /// + /// + /// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order. + /// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call. + /// + /// + [FieldOffset(8)] + public ImVector _Channels; + } + + /// + /// + /// Helper to split a draw list into different layers which can be drawn into out of order, then flattened back. + /// + /// + /// C++: + /// imgui.h:179 + ///
struct ImDrawListSplitter + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImDrawListSplitterPtr(ImDrawListSplitter* ptr) : INullable + { + private ImDrawListSplitter* _ptr = ptr; + public ImDrawListSplitter* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawListSplitterPtr(ImDrawListSplitter* ptr) => new(ptr); + + public static implicit operator ImDrawListSplitter*(ImDrawListSplitterPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Current channel number (0) + /// + /// + /// C++: + /// imgui.h:3289 + ///
int _Current + ///
+ ///
+ /// + /// + /// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order. + /// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call. + /// + /// + public ref int _Current => ref Unsafe.AsRef(&_ptr->_Current); + + /// + /// + /// Number of active channels (1+) + /// + /// + /// C++: + /// imgui.h:3290 + ///
int _Count + ///
+ ///
+ /// + /// + /// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order. + /// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call. + /// + /// + public ref int _Count => ref Unsafe.AsRef(&_ptr->_Count); + + /// + /// + /// Draw channels (not resized down so _Count might be < Channels.Size) + /// + /// + /// C++: + /// imgui.h:3291 + ///
ImVector<ImDrawChannel> _Channels + ///
+ ///
+ /// + /// + /// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order. + /// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call. + /// + /// + public ref ImVector _Channels => ref Unsafe.AsRef>(&_ptr->_Channels); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImDrawVert.gen.cs b/Brutal.ImGui/Generated/Structs/ImDrawVert.gen.cs new file mode 100644 index 0000000..cf0102a --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImDrawVert.gen.cs @@ -0,0 +1,143 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// A single vertex (pos + uv + col = 20 bytes by default. Override layout with + /// IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT) + /// + /// + /// C++: + /// imgui.h:180 + ///
struct ImDrawVert + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct ImDrawVert + { + /// + /// + /// C++: + /// imgui.h:3258 + ///
ImVec2 pos + ///
+ ///
+ /// + /// + /// Vertex layout + /// + /// + [FieldOffset(0)] + public float2 pos; + + /// + /// + /// C++: + /// imgui.h:3259 + ///
ImVec2 uv + ///
+ ///
+ /// + /// + /// Vertex layout + /// + /// + [FieldOffset(8)] + public float2 uv; + + /// + /// + /// C++: + /// imgui.h:3260 + ///
ImU32 col + ///
+ ///
+ /// + /// + /// Vertex layout + /// + /// + [FieldOffset(16)] + public uint col; + } + + /// + /// + /// A single vertex (pos + uv + col = 20 bytes by default. Override layout with + /// IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT) + /// + /// + /// C++: + /// imgui.h:180 + ///
struct ImDrawVert + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImDrawVertPtr(ImDrawVert* ptr) : INullable + { + private ImDrawVert* _ptr = ptr; + public ImDrawVert* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawVertPtr(ImDrawVert* ptr) => new(ptr); + + public static implicit operator ImDrawVert*(ImDrawVertPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:3258 + ///
ImVec2 pos + ///
+ ///
+ /// + /// + /// Vertex layout + /// + /// + public ref float2 pos => ref Unsafe.AsRef(&_ptr->pos); + + /// + /// + /// C++: + /// imgui.h:3259 + ///
ImVec2 uv + ///
+ ///
+ /// + /// + /// Vertex layout + /// + /// + public ref float2 uv => ref Unsafe.AsRef(&_ptr->uv); + + /// + /// + /// C++: + /// imgui.h:3260 + ///
ImU32 col + ///
+ ///
+ /// + /// + /// Vertex layout + /// + /// + public ref uint col => ref Unsafe.AsRef(&_ptr->col); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFont.gen.cs b/Brutal.ImGui/Generated/Structs/ImFont.gen.cs new file mode 100644 index 0000000..190744d --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFont.gen.cs @@ -0,0 +1,496 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Runtime data for a single font within a parent ImFontAtlas + /// + /// + /// C++: + /// imgui.h:181 + ///
struct ImFont + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct ImFont + { + /// + /// + /// 4-8 // Cache last bound baked. NEVER USE DIRECTLY. Use GetFontBaked(). + /// + /// + /// C++: + /// imgui.h:3922 + ///
ImFontBaked* LastBaked + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + [FieldOffset(0)] + public ImFontBakedPtr LastBaked; + + /// + /// + /// 4-8 // What we have been loaded into. + /// + /// + /// C++: + /// imgui.h:3923 + ///
ImFontAtlas* ContainerAtlas + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + [FieldOffset(8)] + public ImFontAtlasPtr ContainerAtlas; + + /// + /// + /// 4 // Font flags. + /// + /// + /// C++: + /// imgui.h:3924 + ///
ImFontFlags Flags + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + [FieldOffset(16)] + public ImFontFlags Flags; + + /// + /// + /// Current rasterizer density. This is a varying state of the font. + /// + /// + /// C++: + /// imgui.h:3925 + ///
float CurrentRasterizerDensity + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + [FieldOffset(20)] + public float CurrentRasterizerDensity; + + /// + /// + /// Unique identifier for the font + /// + /// + /// C++: + /// imgui.h:3929 + ///
ImGuiID FontId + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(24)] + public ImGuiID FontId; + + /// + /// + /// 4 // in // Font size passed to AddFont(). Use for old code calling PushFont() expecting to use that + /// size. (use ImGui::GetFontBaked() to get font baked at current bound size). + /// + /// + /// C++: + /// imgui.h:3930 + ///
float LegacySize + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(28)] + public float LegacySize; + + /// + /// + /// 16 // in // List of sources. Pointers within ContainerAtlas->Sources[] + /// + /// + /// C++: + /// imgui.h:3931 + ///
ImVector<ImFontConfig*> Sources + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(32)] + public ImVector Sources; + + /// + /// + /// 2-4 // out // Character used for ellipsis rendering ('...'). + /// + /// + /// C++: + /// imgui.h:3932 + ///
ImWchar EllipsisChar + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(48)] + public uint EllipsisChar; + + /// + /// + /// 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?') + /// + /// + /// C++: + /// imgui.h:3933 + ///
ImWchar FallbackChar + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(52)] + public uint FallbackChar; + + /// + /// + /// 1 bytes if ImWchar=ImWchar16, 16 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K + /// codepoints that has one active glyph. This is mainly used to facilitate iterations across all used + /// codepoints. + /// + /// + /// C++: + /// imgui.h:3934 + ///
ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8] + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(56)] + public byte_17 Used8kPagesMap; + + /// + /// + /// 1 // // Mark when the "..." glyph needs to be generated. + /// + /// + /// C++: + /// imgui.h:3935 + ///
bool EllipsisAutoBake + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(73)] + public Bool8 EllipsisAutoBake; + + /// + /// + /// 16 // // Remapping pairs when using AddRemapChar(), otherwise empty. + /// + /// + /// C++: + /// imgui.h:3936 + ///
ImGuiStorage RemapPairs + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + [FieldOffset(80)] + public ImGuiStorage RemapPairs; + } + + /// + /// + /// Runtime data for a single font within a parent ImFontAtlas + /// + /// + /// C++: + /// imgui.h:181 + ///
struct ImFont + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontPtr(ImFont* ptr) : INullable + { + private ImFont* _ptr = ptr; + public ImFont* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontPtr(ImFont* ptr) => new(ptr); + + public static implicit operator ImFont*(ImFontPtr wrapper) => wrapper.Ptr; + + /// + /// + /// 4-8 // Cache last bound baked. NEVER USE DIRECTLY. Use GetFontBaked(). + /// + /// + /// C++: + /// imgui.h:3922 + ///
ImFontBaked* LastBaked + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + public ref ImFontBakedPtr LastBaked => ref Unsafe.AsRef(&_ptr->LastBaked); + + /// + /// + /// 4-8 // What we have been loaded into. + /// + /// + /// C++: + /// imgui.h:3923 + ///
ImFontAtlas* ContainerAtlas + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + public ref ImFontAtlasPtr ContainerAtlas => ref Unsafe.AsRef(&_ptr->ContainerAtlas); + + /// + /// + /// 4 // Font flags. + /// + /// + /// C++: + /// imgui.h:3924 + ///
ImFontFlags Flags + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + public ref ImFontFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Current rasterizer density. This is a varying state of the font. + /// + /// + /// C++: + /// imgui.h:3925 + ///
float CurrentRasterizerDensity + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~12-20 bytes + /// + /// + public ref float CurrentRasterizerDensity => ref Unsafe.AsRef(&_ptr->CurrentRasterizerDensity); + + /// + /// + /// Unique identifier for the font + /// + /// + /// C++: + /// imgui.h:3929 + ///
ImGuiID FontId + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref ImGuiID FontId => ref Unsafe.AsRef(&_ptr->FontId); + + /// + /// + /// 4 // in // Font size passed to AddFont(). Use for old code calling PushFont() expecting to use that + /// size. (use ImGui::GetFontBaked() to get font baked at current bound size). + /// + /// + /// C++: + /// imgui.h:3930 + ///
float LegacySize + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref float LegacySize => ref Unsafe.AsRef(&_ptr->LegacySize); + + /// + /// + /// 16 // in // List of sources. Pointers within ContainerAtlas->Sources[] + /// + /// + /// C++: + /// imgui.h:3931 + ///
ImVector<ImFontConfig*> Sources + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref ImVector Sources => ref Unsafe.AsRef>(&_ptr->Sources); + + /// + /// + /// 2-4 // out // Character used for ellipsis rendering ('...'). + /// + /// + /// C++: + /// imgui.h:3932 + ///
ImWchar EllipsisChar + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref uint EllipsisChar => ref Unsafe.AsRef(&_ptr->EllipsisChar); + + /// + /// + /// 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?') + /// + /// + /// C++: + /// imgui.h:3933 + ///
ImWchar FallbackChar + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref uint FallbackChar => ref Unsafe.AsRef(&_ptr->FallbackChar); + + /// + /// + /// 1 bytes if ImWchar=ImWchar16, 16 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K + /// codepoints that has one active glyph. This is mainly used to facilitate iterations across all used + /// codepoints. + /// + /// + /// C++: + /// imgui.h:3934 + ///
ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8] + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref byte_17 Used8kPagesMap => ref Unsafe.AsRef(&_ptr->Used8kPagesMap); + + /// + /// + /// 1 // // Mark when the "..." glyph needs to be generated. + /// + /// + /// C++: + /// imgui.h:3935 + ///
bool EllipsisAutoBake + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref bool EllipsisAutoBake => ref Unsafe.AsRef(&_ptr->EllipsisAutoBake); + + /// + /// + /// 16 // // Remapping pairs when using AddRemapChar(), otherwise empty. + /// + /// + /// C++: + /// imgui.h:3936 + ///
ImGuiStorage RemapPairs + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold ~24-52 bytes + /// Conceptually Sources[] is the list of font sources merged to create this font. + /// + /// + public ref ImGuiStorage RemapPairs => ref Unsafe.AsRef(&_ptr->RemapPairs); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontAtlas.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontAtlas.gen.cs new file mode 100644 index 0000000..b7b021d --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontAtlas.gen.cs @@ -0,0 +1,1129 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF/OTF font loader + /// + /// + /// C++: + /// imgui.h:182 + ///
struct ImFontAtlas + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 736)] + public partial struct ImFontAtlas + { + /// + /// + /// Build flags (see ImFontAtlasFlags_) + /// + /// + /// C++: + /// imgui.h:3811 + ///
ImFontAtlasFlags Flags + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(0)] + public ImFontAtlasFlags Flags; + + /// + /// + /// Desired texture format (default to ImTextureFormat_RGBA32 but may be changed to ImTextureFormat_Alpha8). + /// + /// + /// C++: + /// imgui.h:3812 + ///
ImTextureFormat TexDesiredFormat + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(4)] + public ImTextureFormat TexDesiredFormat; + + /// + /// + /// FIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to + /// 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to + /// set AntiAliasedLinesUseTex = false). + /// + /// + /// C++: + /// imgui.h:3813 + ///
int TexGlyphPadding + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(8)] + public int TexGlyphPadding; + + /// + /// + /// Minimum desired texture width. Must be a power of two. Default to 512. + /// + /// + /// C++: + /// imgui.h:3814 + ///
int TexMinWidth + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(12)] + public int TexMinWidth; + + /// + /// + /// Minimum desired texture height. Must be a power of two. Default to 128. + /// + /// + /// C++: + /// imgui.h:3815 + ///
int TexMinHeight + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(16)] + public int TexMinHeight; + + /// + /// + /// Maximum desired texture width. Must be a power of two. Default to 8192. + /// + /// + /// C++: + /// imgui.h:3816 + ///
int TexMaxWidth + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(20)] + public int TexMaxWidth; + + /// + /// + /// Maximum desired texture height. Must be a power of two. Default to 8192. + /// + /// + /// C++: + /// imgui.h:3817 + ///
int TexMaxHeight + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(24)] + public int TexMaxHeight; + + /// + /// + /// Store your own atlas related user-data (if e.g. you have multiple font atlas). + /// + /// + /// C++: + /// imgui.h:3818 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Input + /// + /// + [FieldOffset(32)] + public nint UserData; + + /// + /// + /// Latest texture identifier == TexData->GetTexRef(). + /// + /// + /// C++: + /// imgui.h:3824 + ///
ImTextureRef TexRef + ///
+ ///
+ /// + /// + /// Output + /// - Because textures are dynamically created/resized, the current texture identifier may changed at *ANY TIME* during the frame. + /// - This should not affect you as you can always use the latest value. But note that any precomputed UV coordinates are only valid for the current TexRef. + /// + /// + [FieldOffset(40)] + public ImTextureRef TexRef; + + /// + /// + /// Latest texture. + /// + /// + /// C++: + /// imgui.h:3828 + ///
ImTextureData* TexData + ///
+ ///
+ /// + /// + /// Output + /// - Because textures are dynamically created/resized, the current texture identifier may changed at *ANY TIME* during the frame. + /// - This should not affect you as you can always use the latest value. But note that any precomputed UV coordinates are only valid for the current TexRef. + /// + /// + [FieldOffset(56)] + public ImTextureDataPtr TexData; + + /// + /// + /// Texture list (most often TexList.Size == 1). TexData is always == TexList.back(). DO NOT USE DIRECTLY, + /// USE GetDrawData().Textures[]/GetPlatformIO().Textures[] instead! + /// + /// + /// C++: + /// imgui.h:3831 + ///
ImVector<ImTextureData*> TexList + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(64)] + public ImVector TexList; + + /// + /// + /// Marked as locked during ImGui::NewFrame()..EndFrame() scope if TexUpdates are not supported. Any attempt + /// to modify the atlas will assert. + /// + /// + /// C++: + /// imgui.h:3832 + ///
bool Locked + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(80)] + public Bool8 Locked; + + /// + /// + /// Copy of (BackendFlags & ImGuiBackendFlags_RendererHasTextures) from supporting context. + /// + /// + /// C++: + /// imgui.h:3833 + ///
bool RendererHasTextures + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(81)] + public Bool8 RendererHasTextures; + + /// + /// + /// Set when texture was built matching current font input. Mostly useful for legacy IsBuilt() call. + /// + /// + /// C++: + /// imgui.h:3834 + ///
bool TexIsBuilt + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(82)] + public Bool8 TexIsBuilt; + + /// + /// + /// Tell whether our texture data is known to use colors (rather than just alpha channel), in order to help + /// backend select a format or conversion process. + /// + /// + /// C++: + /// imgui.h:3835 + ///
bool TexPixelsUseColors + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(83)] + public Bool8 TexPixelsUseColors; + + /// + /// + /// = (1.0f/TexData->TexWidth, 1.0f/TexData->TexHeight). May change as new texture gets created. + /// + /// + /// C++: + /// imgui.h:3836 + ///
ImVec2 TexUvScale + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(84)] + public float2 TexUvScale; + + /// + /// + /// Texture coordinates to a white pixel. May change as new texture gets created. + /// + /// + /// C++: + /// imgui.h:3837 + ///
ImVec2 TexUvWhitePixel + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(92)] + public float2 TexUvWhitePixel; + + /// + /// + /// Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), + /// use ImGui::PushFont()/PopFont() to change the current font. + /// + /// + /// C++: + /// imgui.h:3838 + ///
ImVector<ImFont*> Fonts + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(104)] + public ImVector Fonts; + + /// + /// + /// Source/configuration data + /// + /// + /// C++: + /// imgui.h:3839 + ///
ImVector<ImFontConfig> Sources + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(120)] + public ImVector Sources; + + /// + /// + /// UVs for baked anti-aliased lines + /// + /// + /// C++: + /// imgui.h:3840 + ///
ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1] + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(136)] + public float4_33 TexUvLines; + + /// + /// + /// Next value to be stored in TexData->UniqueID + /// + /// + /// C++: + /// imgui.h:3841 + ///
int TexNextUniqueID + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(664)] + public int TexNextUniqueID; + + /// + /// + /// Next value to be stored in ImFont->FontID + /// + /// + /// C++: + /// imgui.h:3842 + ///
int FontNextUniqueID + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(668)] + public int FontNextUniqueID; + + /// + /// + /// List of users for this atlas. Typically one per Dear ImGui context. + /// + /// + /// C++: + /// imgui.h:3843 + ///
ImVector<ImDrawListSharedData*> DrawListSharedDatas + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(672)] + public ImVector DrawListSharedDatas; + + /// + /// + /// Opaque interface to our data that doesn't need to be public and may be discarded when rebuilding. + /// + /// + /// C++: + /// imgui.h:3844 + ///
ImFontAtlasBuilder* Builder + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(688)] + public ImFontAtlasBuilderPtr Builder; + + /// + /// + /// Font loader opaque interface (default to use FreeType when IMGUI_ENABLE_FREETYPE is defined, otherwise + /// default to use stb_truetype). Use SetFontLoader() to change this at runtime. + /// + /// + /// C++: + /// imgui.h:3845 + ///
const ImFontLoader* FontLoader + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(696)] + public Ptr FontLoader; + + /// + /// + /// Font loader name (for display e.g. in About box) == FontLoader->Name + /// + /// + /// C++: + /// imgui.h:3846 + ///
const char* FontLoaderName + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(704)] + public Ptr FontLoaderName; + + /// + /// + /// Font backend opaque storage + /// + /// + /// C++: + /// imgui.h:3847 + ///
void* FontLoaderData + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(712)] + public nint FontLoaderData; + + /// + /// + /// Shared flags (for all fonts) for font loader. THIS IS BUILD IMPLEMENTATION DEPENDENT (e.g. Per-font + /// override is also available in ImFontConfig). + /// + /// + /// C++: + /// imgui.h:3848 + ///
unsigned int FontLoaderFlags + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(720)] + public uint FontLoaderFlags; + + /// + /// + /// Number of contexts using this atlas + /// + /// + /// C++: + /// imgui.h:3849 + ///
int RefCount + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(724)] + public int RefCount; + + /// + /// + /// Context which own the atlas will be in charge of updating and destroying it. + /// + /// + /// C++: + /// imgui.h:3850 + ///
ImGuiContext* OwnerContext + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(728)] + public ImGuiContextPtr OwnerContext; + } + + /// + /// + /// Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF/OTF font loader + /// + /// + /// C++: + /// imgui.h:182 + ///
struct ImFontAtlas + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontAtlasPtr(ImFontAtlas* ptr) : INullable + { + private ImFontAtlas* _ptr = ptr; + public ImFontAtlas* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontAtlasPtr(ImFontAtlas* ptr) => new(ptr); + + public static implicit operator ImFontAtlas*(ImFontAtlasPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Build flags (see ImFontAtlasFlags_) + /// + /// + /// C++: + /// imgui.h:3811 + ///
ImFontAtlasFlags Flags + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref ImFontAtlasFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Desired texture format (default to ImTextureFormat_RGBA32 but may be changed to ImTextureFormat_Alpha8). + /// + /// + /// C++: + /// imgui.h:3812 + ///
ImTextureFormat TexDesiredFormat + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref ImTextureFormat TexDesiredFormat => ref Unsafe.AsRef(&_ptr->TexDesiredFormat); + + /// + /// + /// FIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to + /// 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to + /// set AntiAliasedLinesUseTex = false). + /// + /// + /// C++: + /// imgui.h:3813 + ///
int TexGlyphPadding + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref int TexGlyphPadding => ref Unsafe.AsRef(&_ptr->TexGlyphPadding); + + /// + /// + /// Minimum desired texture width. Must be a power of two. Default to 512. + /// + /// + /// C++: + /// imgui.h:3814 + ///
int TexMinWidth + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref int TexMinWidth => ref Unsafe.AsRef(&_ptr->TexMinWidth); + + /// + /// + /// Minimum desired texture height. Must be a power of two. Default to 128. + /// + /// + /// C++: + /// imgui.h:3815 + ///
int TexMinHeight + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref int TexMinHeight => ref Unsafe.AsRef(&_ptr->TexMinHeight); + + /// + /// + /// Maximum desired texture width. Must be a power of two. Default to 8192. + /// + /// + /// C++: + /// imgui.h:3816 + ///
int TexMaxWidth + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref int TexMaxWidth => ref Unsafe.AsRef(&_ptr->TexMaxWidth); + + /// + /// + /// Maximum desired texture height. Must be a power of two. Default to 8192. + /// + /// + /// C++: + /// imgui.h:3817 + ///
int TexMaxHeight + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref int TexMaxHeight => ref Unsafe.AsRef(&_ptr->TexMaxHeight); + + /// + /// + /// Store your own atlas related user-data (if e.g. you have multiple font atlas). + /// + /// + /// C++: + /// imgui.h:3818 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Input + /// + /// + public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + + /// + /// + /// Latest texture identifier == TexData->GetTexRef(). + /// + /// + /// C++: + /// imgui.h:3824 + ///
ImTextureRef TexRef + ///
+ ///
+ /// + /// + /// Output + /// - Because textures are dynamically created/resized, the current texture identifier may changed at *ANY TIME* during the frame. + /// - This should not affect you as you can always use the latest value. But note that any precomputed UV coordinates are only valid for the current TexRef. + /// + /// + public ref ImTextureRef TexRef => ref Unsafe.AsRef(&_ptr->TexRef); + + /// + /// + /// Latest texture. + /// + /// + /// C++: + /// imgui.h:3828 + ///
ImTextureData* TexData + ///
+ ///
+ /// + /// + /// Output + /// - Because textures are dynamically created/resized, the current texture identifier may changed at *ANY TIME* during the frame. + /// - This should not affect you as you can always use the latest value. But note that any precomputed UV coordinates are only valid for the current TexRef. + /// + /// + public ref ImTextureDataPtr TexData => ref Unsafe.AsRef(&_ptr->TexData); + + /// + /// + /// Texture list (most often TexList.Size == 1). TexData is always == TexList.back(). DO NOT USE DIRECTLY, + /// USE GetDrawData().Textures[]/GetPlatformIO().Textures[] instead! + /// + /// + /// C++: + /// imgui.h:3831 + ///
ImVector<ImTextureData*> TexList + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImVector TexList => ref Unsafe.AsRef>(&_ptr->TexList); + + /// + /// + /// Marked as locked during ImGui::NewFrame()..EndFrame() scope if TexUpdates are not supported. Any attempt + /// to modify the atlas will assert. + /// + /// + /// C++: + /// imgui.h:3832 + ///
bool Locked + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref bool Locked => ref Unsafe.AsRef(&_ptr->Locked); + + /// + /// + /// Copy of (BackendFlags & ImGuiBackendFlags_RendererHasTextures) from supporting context. + /// + /// + /// C++: + /// imgui.h:3833 + ///
bool RendererHasTextures + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref bool RendererHasTextures => ref Unsafe.AsRef(&_ptr->RendererHasTextures); + + /// + /// + /// Set when texture was built matching current font input. Mostly useful for legacy IsBuilt() call. + /// + /// + /// C++: + /// imgui.h:3834 + ///
bool TexIsBuilt + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref bool TexIsBuilt => ref Unsafe.AsRef(&_ptr->TexIsBuilt); + + /// + /// + /// Tell whether our texture data is known to use colors (rather than just alpha channel), in order to help + /// backend select a format or conversion process. + /// + /// + /// C++: + /// imgui.h:3835 + ///
bool TexPixelsUseColors + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref bool TexPixelsUseColors => ref Unsafe.AsRef(&_ptr->TexPixelsUseColors); + + /// + /// + /// = (1.0f/TexData->TexWidth, 1.0f/TexData->TexHeight). May change as new texture gets created. + /// + /// + /// C++: + /// imgui.h:3836 + ///
ImVec2 TexUvScale + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref float2 TexUvScale => ref Unsafe.AsRef(&_ptr->TexUvScale); + + /// + /// + /// Texture coordinates to a white pixel. May change as new texture gets created. + /// + /// + /// C++: + /// imgui.h:3837 + ///
ImVec2 TexUvWhitePixel + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref float2 TexUvWhitePixel => ref Unsafe.AsRef(&_ptr->TexUvWhitePixel); + + /// + /// + /// Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), + /// use ImGui::PushFont()/PopFont() to change the current font. + /// + /// + /// C++: + /// imgui.h:3838 + ///
ImVector<ImFont*> Fonts + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImVector Fonts => ref Unsafe.AsRef>(&_ptr->Fonts); + + /// + /// + /// Source/configuration data + /// + /// + /// C++: + /// imgui.h:3839 + ///
ImVector<ImFontConfig> Sources + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImVector Sources => ref Unsafe.AsRef>(&_ptr->Sources); + + /// + /// + /// UVs for baked anti-aliased lines + /// + /// + /// C++: + /// imgui.h:3840 + ///
ImVec4 TexUvLines[IM_DRAWLIST_TEX_LINES_WIDTH_MAX + 1] + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref float4_33 TexUvLines => ref Unsafe.AsRef(&_ptr->TexUvLines); + + /// + /// + /// Next value to be stored in TexData->UniqueID + /// + /// + /// C++: + /// imgui.h:3841 + ///
int TexNextUniqueID + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref int TexNextUniqueID => ref Unsafe.AsRef(&_ptr->TexNextUniqueID); + + /// + /// + /// Next value to be stored in ImFont->FontID + /// + /// + /// C++: + /// imgui.h:3842 + ///
int FontNextUniqueID + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref int FontNextUniqueID => ref Unsafe.AsRef(&_ptr->FontNextUniqueID); + + /// + /// + /// List of users for this atlas. Typically one per Dear ImGui context. + /// + /// + /// C++: + /// imgui.h:3843 + ///
ImVector<ImDrawListSharedData*> DrawListSharedDatas + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImVector DrawListSharedDatas => + ref Unsafe.AsRef>(&_ptr->DrawListSharedDatas); + + /// + /// + /// Opaque interface to our data that doesn't need to be public and may be discarded when rebuilding. + /// + /// + /// C++: + /// imgui.h:3844 + ///
ImFontAtlasBuilder* Builder + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImFontAtlasBuilderPtr Builder => ref Unsafe.AsRef(&_ptr->Builder); + + /// + /// + /// Font loader opaque interface (default to use FreeType when IMGUI_ENABLE_FREETYPE is defined, otherwise + /// default to use stb_truetype). Use SetFontLoader() to change this at runtime. + /// + /// + /// C++: + /// imgui.h:3845 + ///
const ImFontLoader* FontLoader + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref Ptr FontLoader => ref Unsafe.AsRef>(&_ptr->FontLoader); + + /// + /// + /// Font loader name (for display e.g. in About box) == FontLoader->Name + /// + /// + /// C++: + /// imgui.h:3846 + ///
const char* FontLoaderName + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref Ptr FontLoaderName => ref Unsafe.AsRef>(&_ptr->FontLoaderName); + + /// + /// + /// Font backend opaque storage + /// + /// + /// C++: + /// imgui.h:3847 + ///
void* FontLoaderData + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref nint FontLoaderData => ref Unsafe.AsRef(&_ptr->FontLoaderData); + + /// + /// + /// Shared flags (for all fonts) for font loader. THIS IS BUILD IMPLEMENTATION DEPENDENT (e.g. Per-font + /// override is also available in ImFontConfig). + /// + /// + /// C++: + /// imgui.h:3848 + ///
unsigned int FontLoaderFlags + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref uint FontLoaderFlags => ref Unsafe.AsRef(&_ptr->FontLoaderFlags); + + /// + /// + /// Number of contexts using this atlas + /// + /// + /// C++: + /// imgui.h:3849 + ///
int RefCount + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref int RefCount => ref Unsafe.AsRef(&_ptr->RefCount); + + /// + /// + /// Context which own the atlas will be in charge of updating and destroying it. + /// + /// + /// C++: + /// imgui.h:3850 + ///
ImGuiContext* OwnerContext + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImGuiContextPtr OwnerContext => ref Unsafe.AsRef(&_ptr->OwnerContext); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontAtlasBuilder.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontAtlasBuilder.gen.cs new file mode 100644 index 0000000..65aff09 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontAtlasBuilder.gen.cs @@ -0,0 +1,716 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Opaque storage for building a ImFontAtlas + /// + /// + /// C++: + /// imgui.h:183 + ///
struct ImFontAtlasBuilder + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 248)] + public partial struct ImFontAtlasBuilder + { + /// + /// + /// Actually 'stbrp_context' but we don't want to define this in the header file. + /// + /// + /// C++: + /// imgui_internal.h:4081 + ///
stbrp_context_opaque PackContext + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(0)] + public stbrp_context_opaque PackContext; + + /// + /// + /// C++: + /// imgui_internal.h:4082 + ///
ImVector<stbrp_node_im> PackNodes + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(80)] + public ImVector PackNodes; + + /// + /// + /// C++: + /// imgui_internal.h:4083 + ///
ImVector<ImTextureRect> Rects + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(96)] + public ImVector Rects; + + /// + /// + /// ImFontAtlasRectId -> index into Rects[] + /// + /// + /// C++: + /// imgui_internal.h:4084 + ///
ImVector<ImFontAtlasRectEntry> RectsIndex + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(112)] + public ImVector RectsIndex; + + /// + /// + /// Misc scratch buffer + /// + /// + /// C++: + /// imgui_internal.h:4085 + ///
ImVector<unsigned char> TempBuffer + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(128)] + public ImVector TempBuffer; + + /// + /// + /// First unused entry + /// + /// + /// C++: + /// imgui_internal.h:4086 + ///
int RectsIndexFreeListStart + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(144)] + public int RectsIndexFreeListStart; + + /// + /// + /// Number of packed rectangles. + /// + /// + /// C++: + /// imgui_internal.h:4087 + ///
int RectsPackedCount + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(148)] + public int RectsPackedCount; + + /// + /// + /// Number of packed pixels. Used when compacting to heuristically find the ideal texture size. + /// + /// + /// C++: + /// imgui_internal.h:4088 + ///
int RectsPackedSurface + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(152)] + public int RectsPackedSurface; + + /// + /// + /// C++: + /// imgui_internal.h:4089 + ///
int RectsDiscardedCount + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(156)] + public int RectsDiscardedCount; + + /// + /// + /// C++: + /// imgui_internal.h:4090 + ///
int RectsDiscardedSurface + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(160)] + public int RectsDiscardedSurface; + + /// + /// + /// Current frame count + /// + /// + /// C++: + /// imgui_internal.h:4091 + ///
int FrameCount + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(164)] + public int FrameCount; + + /// + /// + /// Largest rectangle to pack (de-facto used as a "minimum texture size") + /// + /// + /// C++: + /// imgui_internal.h:4092 + ///
ImVec2i MaxRectSize + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(168)] + public int2 MaxRectSize; + + /// + /// + /// Bottom-right most used pixels + /// + /// + /// C++: + /// imgui_internal.h:4093 + ///
ImVec2i MaxRectBounds + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(176)] + public int2 MaxRectBounds; + + /// + /// + /// Disable resizing texture + /// + /// + /// C++: + /// imgui_internal.h:4094 + ///
bool LockDisableResize + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(184)] + public Bool8 LockDisableResize; + + /// + /// + /// Set when missing ImGuiBackendFlags_RendererHasTextures features forces atlas to preload everything. + /// + /// + /// C++: + /// imgui_internal.h:4095 + ///
bool PreloadedAllGlyphsRanges + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + [FieldOffset(185)] + public Bool8 PreloadedAllGlyphsRanges; + + /// + /// + /// C++: + /// imgui_internal.h:4098 + ///
ImStableVector<ImFontBaked,32> BakedPool + ///
+ ///
+ /// + /// + /// Cache of all ImFontBaked + /// + /// + [FieldOffset(192)] + public ImStableVector BakedPool; + + /// + /// + /// BakedId --> ImFontBaked* + /// + /// + /// C++: + /// imgui_internal.h:4099 + ///
ImGuiStorage BakedMap + ///
+ ///
+ /// + /// + /// Cache of all ImFontBaked + /// + /// + [FieldOffset(216)] + public ImGuiStorage BakedMap; + + /// + /// + /// C++: + /// imgui_internal.h:4100 + ///
int BakedDiscardedCount + ///
+ ///
+ /// + /// + /// Cache of all ImFontBaked + /// + /// + [FieldOffset(232)] + public int BakedDiscardedCount; + + /// + /// + /// White pixel + mouse cursors. Also happen to be fallback in case of packing failure. + /// + /// + /// C++: + /// imgui_internal.h:4103 + ///
ImFontAtlasRectId PackIdMouseCursors + ///
+ ///
+ /// + /// + /// Custom rectangle identifiers + /// + /// + [FieldOffset(236)] + public ImFontAtlasRectId PackIdMouseCursors; + + /// + /// + /// C++: + /// imgui_internal.h:4104 + ///
ImFontAtlasRectId PackIdLinesTexData + ///
+ ///
+ /// + /// + /// Custom rectangle identifiers + /// + /// + [FieldOffset(240)] + public ImFontAtlasRectId PackIdLinesTexData; + } + + /// + /// + /// Opaque storage for building a ImFontAtlas + /// + /// + /// C++: + /// imgui.h:183 + ///
struct ImFontAtlasBuilder + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontAtlasBuilderPtr(ImFontAtlasBuilder* ptr) : INullable + { + private ImFontAtlasBuilder* _ptr = ptr; + public ImFontAtlasBuilder* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontAtlasBuilderPtr(ImFontAtlasBuilder* ptr) => new(ptr); + + public static implicit operator ImFontAtlasBuilder*(ImFontAtlasBuilderPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Actually 'stbrp_context' but we don't want to define this in the header file. + /// + /// + /// C++: + /// imgui_internal.h:4081 + ///
stbrp_context_opaque PackContext + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref stbrp_context_opaque PackContext => ref Unsafe.AsRef(&_ptr->PackContext); + + /// + /// + /// C++: + /// imgui_internal.h:4082 + ///
ImVector<stbrp_node_im> PackNodes + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref ImVector PackNodes => ref Unsafe.AsRef>(&_ptr->PackNodes); + + /// + /// + /// C++: + /// imgui_internal.h:4083 + ///
ImVector<ImTextureRect> Rects + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref ImVector Rects => ref Unsafe.AsRef>(&_ptr->Rects); + + /// + /// + /// ImFontAtlasRectId -> index into Rects[] + /// + /// + /// C++: + /// imgui_internal.h:4084 + ///
ImVector<ImFontAtlasRectEntry> RectsIndex + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref ImVector RectsIndex => + ref Unsafe.AsRef>(&_ptr->RectsIndex); + + /// + /// + /// Misc scratch buffer + /// + /// + /// C++: + /// imgui_internal.h:4085 + ///
ImVector<unsigned char> TempBuffer + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref ImVector TempBuffer => ref Unsafe.AsRef>(&_ptr->TempBuffer); + + /// + /// + /// First unused entry + /// + /// + /// C++: + /// imgui_internal.h:4086 + ///
int RectsIndexFreeListStart + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int RectsIndexFreeListStart => ref Unsafe.AsRef(&_ptr->RectsIndexFreeListStart); + + /// + /// + /// Number of packed rectangles. + /// + /// + /// C++: + /// imgui_internal.h:4087 + ///
int RectsPackedCount + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int RectsPackedCount => ref Unsafe.AsRef(&_ptr->RectsPackedCount); + + /// + /// + /// Number of packed pixels. Used when compacting to heuristically find the ideal texture size. + /// + /// + /// C++: + /// imgui_internal.h:4088 + ///
int RectsPackedSurface + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int RectsPackedSurface => ref Unsafe.AsRef(&_ptr->RectsPackedSurface); + + /// + /// + /// C++: + /// imgui_internal.h:4089 + ///
int RectsDiscardedCount + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int RectsDiscardedCount => ref Unsafe.AsRef(&_ptr->RectsDiscardedCount); + + /// + /// + /// C++: + /// imgui_internal.h:4090 + ///
int RectsDiscardedSurface + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int RectsDiscardedSurface => ref Unsafe.AsRef(&_ptr->RectsDiscardedSurface); + + /// + /// + /// Current frame count + /// + /// + /// C++: + /// imgui_internal.h:4091 + ///
int FrameCount + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int FrameCount => ref Unsafe.AsRef(&_ptr->FrameCount); + + /// + /// + /// Largest rectangle to pack (de-facto used as a "minimum texture size") + /// + /// + /// C++: + /// imgui_internal.h:4092 + ///
ImVec2i MaxRectSize + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int2 MaxRectSize => ref Unsafe.AsRef(&_ptr->MaxRectSize); + + /// + /// + /// Bottom-right most used pixels + /// + /// + /// C++: + /// imgui_internal.h:4093 + ///
ImVec2i MaxRectBounds + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref int2 MaxRectBounds => ref Unsafe.AsRef(&_ptr->MaxRectBounds); + + /// + /// + /// Disable resizing texture + /// + /// + /// C++: + /// imgui_internal.h:4094 + ///
bool LockDisableResize + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref bool LockDisableResize => ref Unsafe.AsRef(&_ptr->LockDisableResize); + + /// + /// + /// Set when missing ImGuiBackendFlags_RendererHasTextures features forces atlas to preload everything. + /// + /// + /// C++: + /// imgui_internal.h:4095 + ///
bool PreloadedAllGlyphsRanges + ///
+ ///
+ /// + /// + /// Internal storage for incrementally packing and building a ImFontAtlas + /// + /// + public ref bool PreloadedAllGlyphsRanges => ref Unsafe.AsRef(&_ptr->PreloadedAllGlyphsRanges); + + /// + /// + /// C++: + /// imgui_internal.h:4098 + ///
ImStableVector<ImFontBaked,32> BakedPool + ///
+ ///
+ /// + /// + /// Cache of all ImFontBaked + /// + /// + public ref ImStableVector BakedPool => + ref Unsafe.AsRef>(&_ptr->BakedPool); + + /// + /// + /// BakedId --> ImFontBaked* + /// + /// + /// C++: + /// imgui_internal.h:4099 + ///
ImGuiStorage BakedMap + ///
+ ///
+ /// + /// + /// Cache of all ImFontBaked + /// + /// + public ref ImGuiStorage BakedMap => ref Unsafe.AsRef(&_ptr->BakedMap); + + /// + /// + /// C++: + /// imgui_internal.h:4100 + ///
int BakedDiscardedCount + ///
+ ///
+ /// + /// + /// Cache of all ImFontBaked + /// + /// + public ref int BakedDiscardedCount => ref Unsafe.AsRef(&_ptr->BakedDiscardedCount); + + /// + /// + /// White pixel + mouse cursors. Also happen to be fallback in case of packing failure. + /// + /// + /// C++: + /// imgui_internal.h:4103 + ///
ImFontAtlasRectId PackIdMouseCursors + ///
+ ///
+ /// + /// + /// Custom rectangle identifiers + /// + /// + public ref ImFontAtlasRectId PackIdMouseCursors => + ref Unsafe.AsRef(&_ptr->PackIdMouseCursors); + + /// + /// + /// C++: + /// imgui_internal.h:4104 + ///
ImFontAtlasRectId PackIdLinesTexData + ///
+ ///
+ /// + /// + /// Custom rectangle identifiers + /// + /// + public ref ImFontAtlasRectId PackIdLinesTexData => + ref Unsafe.AsRef(&_ptr->PackIdLinesTexData); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontAtlasRect.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontAtlasRect.gen.cs new file mode 100644 index 0000000..f161dd5 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontAtlasRect.gen.cs @@ -0,0 +1,288 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// + /// + /// C++: + /// imgui.h:184 + ///
struct ImFontAtlasRect + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImFontAtlasRect + { + /// + /// + /// Position (in current texture) + /// + /// + /// C++: + /// imgui.h:3687 + ///
unsigned short x + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + [FieldOffset(0)] + public ushort x; + + /// + /// + /// Position (in current texture) + /// + /// + /// C++: + /// imgui.h:3687 + ///
unsigned short x, y + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + [FieldOffset(2)] + public ushort y; + + /// + /// + /// Size + /// + /// + /// C++: + /// imgui.h:3688 + ///
unsigned short w + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + [FieldOffset(4)] + public ushort w; + + /// + /// + /// Size + /// + /// + /// C++: + /// imgui.h:3688 + ///
unsigned short w, h + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + [FieldOffset(6)] + public ushort h; + + /// + /// + /// UV coordinates (in current texture) + /// + /// + /// C++: + /// imgui.h:3689 + ///
ImVec2 uv0 + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + [FieldOffset(8)] + public float2 uv0; + + /// + /// + /// UV coordinates (in current texture) + /// + /// + /// C++: + /// imgui.h:3689 + ///
ImVec2 uv0, uv1 + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + [FieldOffset(16)] + public float2 uv1; + } + + /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// + /// + /// C++: + /// imgui.h:184 + ///
struct ImFontAtlasRect + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontAtlasRectPtr(ImFontAtlasRect* ptr) : INullable + { + private ImFontAtlasRect* _ptr = ptr; + public ImFontAtlasRect* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontAtlasRectPtr(ImFontAtlasRect* ptr) => new(ptr); + + public static implicit operator ImFontAtlasRect*(ImFontAtlasRectPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Position (in current texture) + /// + /// + /// C++: + /// imgui.h:3687 + ///
unsigned short x + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + public ref ushort x => ref Unsafe.AsRef(&_ptr->x); + + /// + /// + /// Position (in current texture) + /// + /// + /// C++: + /// imgui.h:3687 + ///
unsigned short x, y + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + public ref ushort y => ref Unsafe.AsRef(&_ptr->y); + + /// + /// + /// Size + /// + /// + /// C++: + /// imgui.h:3688 + ///
unsigned short w + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + public ref ushort w => ref Unsafe.AsRef(&_ptr->w); + + /// + /// + /// Size + /// + /// + /// C++: + /// imgui.h:3688 + ///
unsigned short w, h + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + public ref ushort h => ref Unsafe.AsRef(&_ptr->h); + + /// + /// + /// UV coordinates (in current texture) + /// + /// + /// C++: + /// imgui.h:3689 + ///
ImVec2 uv0 + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + public ref float2 uv0 => ref Unsafe.AsRef(&_ptr->uv0); + + /// + /// + /// UV coordinates (in current texture) + /// + /// + /// C++: + /// imgui.h:3689 + ///
ImVec2 uv0, uv1 + ///
+ ///
+ /// + /// + /// Output of ImFontAtlas::GetCustomRect() when using custom rectangles. + /// Those values may not be cached/stored as they are only valid for the current value of atlas->TexRef + /// (this is in theory derived from ImTextureRect but we use separate structures for reasons) + /// + /// + public ref float2 uv1 => ref Unsafe.AsRef(&_ptr->uv1); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontBaked.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontBaked.gen.cs new file mode 100644 index 0000000..ed589ed --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontBaked.gen.cs @@ -0,0 +1,661 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Baked data for a ImFont at a given size. + /// + /// + /// C++: + /// imgui.h:185 + ///
struct ImFontBaked + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public partial struct ImFontBaked + { + /// + /// + /// 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize + /// functions which only this info, and are often bottleneck in large UI). + /// + /// + /// C++: + /// imgui.h:3874 + ///
ImVector<float> IndexAdvanceX + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + [FieldOffset(0)] + public ImVector IndexAdvanceX; + + /// + /// + /// 4 // out // FindGlyph(FallbackChar)->AdvanceX + /// + /// + /// C++: + /// imgui.h:3875 + ///
float FallbackAdvanceX + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + [FieldOffset(16)] + public float FallbackAdvanceX; + + /// + /// + /// 4 // in // Height of characters/line, set during loading (doesn't change after loading) + /// + /// + /// C++: + /// imgui.h:3876 + ///
float Size + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + [FieldOffset(20)] + public float Size; + + /// + /// + /// 4 // in // Density this is baked at + /// + /// + /// C++: + /// imgui.h:3877 + ///
float RasterizerDensity + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + [FieldOffset(24)] + public float RasterizerDensity; + + /// + /// + /// 12-16 // out // Sparse. Index glyphs by Unicode code-point. + /// + /// + /// C++: + /// imgui.h:3880 + ///
ImVector<ImU16> IndexLookup + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~28/36 bytes (for RenderText loop) + /// + /// + [FieldOffset(32)] + public ImVector IndexLookup; + + /// + /// + /// 12-16 // out // All glyphs. + /// + /// + /// C++: + /// imgui.h:3881 + ///
ImVector<ImFontGlyph> Glyphs + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~28/36 bytes (for RenderText loop) + /// + /// + [FieldOffset(48)] + public ImVector Glyphs; + + /// + /// + /// 4 // out // Index of FontFallbackChar + /// + /// + /// C++: + /// imgui.h:3882 + ///
int FallbackGlyphIndex + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~28/36 bytes (for RenderText loop) + /// + /// + [FieldOffset(64)] + public int FallbackGlyphIndex; + + /// + /// + /// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled) + /// + /// + /// C++: + /// imgui.h:3885 + ///
float Ascent + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(68)] + public float Ascent; + + /// + /// + /// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled) + /// + /// + /// C++: + /// imgui.h:3885 + ///
float Ascent, Descent + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(72)] + public float Descent; + + /// + /// + /// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, + /// we approximate the cost of padding between glyphs) + /// + /// + /// C++: + /// imgui.h:3886 + ///
unsigned int MetricsTotalSurface:26 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(76)] + public uint MetricsTotalSurface; + + /// + /// + /// 0 // // Queued for destroy + /// + /// + /// C++: + /// imgui.h:3887 + ///
unsigned int WantDestroy:1 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(79)] + public uint WantDestroy; + + /// + /// + /// 0 // // Disable loading fallback in lower-level calls. + /// + /// + /// C++: + /// imgui.h:3888 + ///
unsigned int LoadNoFallback:1 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(79)] + public uint LoadNoFallback; + + /// + /// + /// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* + /// rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be + /// rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on + /// the first Draw. + /// + /// + /// C++: + /// imgui.h:3889 + ///
unsigned int LoadNoRenderOnLayout:1 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(79)] + public uint LoadNoRenderOnLayout; + + /// + /// + /// 4 // // Record of that time this was bounds + /// + /// + /// C++: + /// imgui.h:3890 + ///
int LastUsedFrame + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(80)] + public int LastUsedFrame; + + /// + /// + /// 4 // // Unique ID for this baked storage + /// + /// + /// C++: + /// imgui.h:3891 + ///
ImGuiID BakedId + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(84)] + public ImGuiID BakedId; + + /// + /// + /// 4-8 // in // Parent font + /// + /// + /// C++: + /// imgui.h:3892 + ///
ImFont* ContainerFont + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(88)] + public ImFontPtr ContainerFont; + + /// + /// + /// 4-8 // // Font loader opaque storage (per baked font * sources): single contiguous buffer + /// allocated by imgui, passed to loader. + /// + /// + /// C++: + /// imgui.h:3893 + ///
void* FontLoaderDatas + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + [FieldOffset(96)] + public nint FontLoaderDatas; + } + + /// + /// + /// Baked data for a ImFont at a given size. + /// + /// + /// C++: + /// imgui.h:185 + ///
struct ImFontBaked + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontBakedPtr(ImFontBaked* ptr) : INullable + { + private ImFontBaked* _ptr = ptr; + public ImFontBaked* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontBakedPtr(ImFontBaked* ptr) => new(ptr); + + public static implicit operator ImFontBaked*(ImFontBakedPtr wrapper) => wrapper.Ptr; + + /// + /// + /// 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize + /// functions which only this info, and are often bottleneck in large UI). + /// + /// + /// C++: + /// imgui.h:3874 + ///
ImVector<float> IndexAdvanceX + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + public ref ImVector IndexAdvanceX => ref Unsafe.AsRef>(&_ptr->IndexAdvanceX); + + /// + /// + /// 4 // out // FindGlyph(FallbackChar)->AdvanceX + /// + /// + /// C++: + /// imgui.h:3875 + ///
float FallbackAdvanceX + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + public ref float FallbackAdvanceX => ref Unsafe.AsRef(&_ptr->FallbackAdvanceX); + + /// + /// + /// 4 // in // Height of characters/line, set during loading (doesn't change after loading) + /// + /// + /// C++: + /// imgui.h:3876 + ///
float Size + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + public ref float Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// 4 // in // Density this is baked at + /// + /// + /// C++: + /// imgui.h:3877 + ///
float RasterizerDensity + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize) + /// + /// + public ref float RasterizerDensity => ref Unsafe.AsRef(&_ptr->RasterizerDensity); + + /// + /// + /// 12-16 // out // Sparse. Index glyphs by Unicode code-point. + /// + /// + /// C++: + /// imgui.h:3880 + ///
ImVector<ImU16> IndexLookup + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~28/36 bytes (for RenderText loop) + /// + /// + public ref ImVector IndexLookup => ref Unsafe.AsRef>(&_ptr->IndexLookup); + + /// + /// + /// 12-16 // out // All glyphs. + /// + /// + /// C++: + /// imgui.h:3881 + ///
ImVector<ImFontGlyph> Glyphs + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~28/36 bytes (for RenderText loop) + /// + /// + public ref ImVector Glyphs => ref Unsafe.AsRef>(&_ptr->Glyphs); + + /// + /// + /// 4 // out // Index of FontFallbackChar + /// + /// + /// C++: + /// imgui.h:3882 + ///
int FallbackGlyphIndex + ///
+ ///
+ /// + /// + /// [Internal] Members: Hot ~28/36 bytes (for RenderText loop) + /// + /// + public ref int FallbackGlyphIndex => ref Unsafe.AsRef(&_ptr->FallbackGlyphIndex); + + /// + /// + /// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled) + /// + /// + /// C++: + /// imgui.h:3885 + ///
float Ascent + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref float Ascent => ref Unsafe.AsRef(&_ptr->Ascent); + + /// + /// + /// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled) + /// + /// + /// C++: + /// imgui.h:3885 + ///
float Ascent, Descent + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref float Descent => ref Unsafe.AsRef(&_ptr->Descent); + + /// + /// + /// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, + /// we approximate the cost of padding between glyphs) + /// + /// + /// C++: + /// imgui.h:3886 + ///
unsigned int MetricsTotalSurface:26 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref uint MetricsTotalSurface => ref Unsafe.AsRef(&_ptr->MetricsTotalSurface); + + /// + /// + /// 0 // // Queued for destroy + /// + /// + /// C++: + /// imgui.h:3887 + ///
unsigned int WantDestroy:1 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref uint WantDestroy => ref Unsafe.AsRef(&_ptr->WantDestroy); + + /// + /// + /// 0 // // Disable loading fallback in lower-level calls. + /// + /// + /// C++: + /// imgui.h:3888 + ///
unsigned int LoadNoFallback:1 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref uint LoadNoFallback => ref Unsafe.AsRef(&_ptr->LoadNoFallback); + + /// + /// + /// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* + /// rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be + /// rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on + /// the first Draw. + /// + /// + /// C++: + /// imgui.h:3889 + ///
unsigned int LoadNoRenderOnLayout:1 + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref uint LoadNoRenderOnLayout => ref Unsafe.AsRef(&_ptr->LoadNoRenderOnLayout); + + /// + /// + /// 4 // // Record of that time this was bounds + /// + /// + /// C++: + /// imgui.h:3890 + ///
int LastUsedFrame + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref int LastUsedFrame => ref Unsafe.AsRef(&_ptr->LastUsedFrame); + + /// + /// + /// 4 // // Unique ID for this baked storage + /// + /// + /// C++: + /// imgui.h:3891 + ///
ImGuiID BakedId + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref ImGuiID BakedId => ref Unsafe.AsRef(&_ptr->BakedId); + + /// + /// + /// 4-8 // in // Parent font + /// + /// + /// C++: + /// imgui.h:3892 + ///
ImFont* ContainerFont + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref ImFontPtr ContainerFont => ref Unsafe.AsRef(&_ptr->ContainerFont); + + /// + /// + /// 4-8 // // Font loader opaque storage (per baked font * sources): single contiguous buffer + /// allocated by imgui, passed to loader. + /// + /// + /// C++: + /// imgui.h:3893 + ///
void* FontLoaderDatas + ///
+ ///
+ /// + /// + /// [Internal] Members: Cold + /// + /// + public ref nint FontLoaderDatas => ref Unsafe.AsRef(&_ptr->FontLoaderDatas); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontConfig.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontConfig.gen.cs new file mode 100644 index 0000000..90ad53d --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontConfig.gen.cs @@ -0,0 +1,945 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Configuration data when adding a font or merging fonts + /// + /// + /// C++: + /// imgui.h:186 + ///
struct ImFontConfig + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public unsafe partial struct ImFontConfig + { + /// + /// <auto> // Name (strictly to ease debugging, hence limited size buffer) + /// + [FieldOffset(0)] + public fixed byte Name[40]; + + /// + /// + /// // TTF/OTF data + /// + /// + /// C++: + /// imgui.h:3611 + ///
void* FontData + ///
+ ///
+ /// + /// + /// Data Source + /// + /// + [FieldOffset(40)] + public nint FontData; + + /// + /// + /// // TTF/OTF data size + /// + /// + /// C++: + /// imgui.h:3612 + ///
int FontDataSize + ///
+ ///
+ /// + /// + /// Data Source + /// + /// + [FieldOffset(48)] + public int FontDataSize; + + /// + /// + /// true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself). + /// + /// + /// C++: + /// imgui.h:3613 + ///
bool FontDataOwnedByAtlas + ///
+ ///
+ /// + /// + /// Data Source + /// + /// + [FieldOffset(52)] + public Bool8 FontDataOwnedByAtlas; + + /// + /// + /// false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. + /// ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different + /// heights. + /// + /// + /// C++: + /// imgui.h:3616 + ///
bool MergeMode + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(53)] + public Bool8 MergeMode; + + /// + /// + /// false // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel + /// aligned font with the default font. If enabled, you can set OversampleH/V to 1. + /// + /// + /// C++: + /// imgui.h:3617 + ///
bool PixelSnapH + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(54)] + public Bool8 PixelSnapH; + + /// + /// + /// true // Align Scaled GlyphOffset.y to pixel boundaries. + /// + /// + /// C++: + /// imgui.h:3618 + ///
bool PixelSnapV + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(55)] + public Bool8 PixelSnapV; + + /// + /// + /// 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on + /// size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save + /// memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details. + /// + /// + /// C++: + /// imgui.h:3619 + ///
ImS8 OversampleH + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(56)] + public sbyte OversampleH; + + /// + /// + /// 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really + /// useful as we don't use sub-pixel positions on the Y axis. + /// + /// + /// C++: + /// imgui.h:3620 + ///
ImS8 OversampleV + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(57)] + public sbyte OversampleV; + + /// + /// + /// 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged + /// first specified ellipsis will be used. + /// + /// + /// C++: + /// imgui.h:3621 + ///
ImWchar EllipsisChar + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(60)] + public uint EllipsisChar; + + /// + /// + /// // Size in pixels for rasterizer (more or less maps to the resulting font height). + /// + /// + /// C++: + /// imgui.h:3622 + ///
float SizePixels + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(64)] + public float SizePixels; + + /// + /// + /// NULL // *LEGACY* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a + /// user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). + /// + /// + /// C++: + /// imgui.h:3623 + ///
const ImWchar* GlyphRanges + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(72)] + public Ptr GlyphRanges; + + /// + /// + /// NULL // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are + /// inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges + /// from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection + /// Tool" to find about your overlapping ranges. + /// + /// + /// C++: + /// imgui.h:3624 + ///
const ImWchar* GlyphExcludeRanges + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(80)] + public Ptr GlyphExcludeRanges; + + /// + /// + /// 0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other + /// sizes will scale this value. + /// + /// + /// C++: + /// imgui.h:3626 + ///
ImVec2 GlyphOffset + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(88)] + public float2 GlyphOffset; + + /// + /// + /// 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce + /// mono-space font. Absolute value for default size, other sizes will scale this value. + /// + /// + /// C++: + /// imgui.h:3627 + ///
float GlyphMinAdvanceX + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(96)] + public float GlyphMinAdvanceX; + + /// + /// + /// FLT_MAX // Maximum AdvanceX for glyphs + /// + /// + /// C++: + /// imgui.h:3628 + ///
float GlyphMaxAdvanceX + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(100)] + public float GlyphMaxAdvanceX; + + /// + /// + /// 0 // Extra spacing (in pixels) between glyphs. Please contact us if you are using this. // + /// FIXME-NEWATLAS: Intentionally unscaled + /// + /// + /// C++: + /// imgui.h:3629 + ///
float GlyphExtraAdvanceX + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(104)] + public float GlyphExtraAdvanceX; + + /// + /// + /// 0 // Index of font within TTF/OTF file + /// + /// + /// C++: + /// imgui.h:3630 + ///
ImU32 FontNo + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(108)] + public uint FontNo; + + /// + /// + /// 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if + /// unsure. + /// + /// + /// C++: + /// imgui.h:3631 + ///
unsigned int FontLoaderFlags + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(112)] + public uint FontLoaderFlags; + + /// + /// + /// 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may + /// be a good workaround to make them more readable. This is a silly thing we may remove in the future. + /// + /// + /// C++: + /// imgui.h:3633 + ///
float RasterizerMultiply + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(116)] + public float RasterizerMultiply; + + /// + /// + /// 1.0f // [LEGACY: this only makes sense when ImGuiBackendFlags_RendererHasTextures is not supported] + /// DPI scale multiplier for rasterization. Not altering other font metrics: makes it easy to swap between + /// e.g. a 100% and a 400% fonts for a zooming display, or handle Retina screen. IMPORTANT: If you change + /// this it is expected that you increase/decrease font scale roughly to the inverse of this, otherwise + /// quality may look lowered. + /// + /// + /// C++: + /// imgui.h:3634 + ///
float RasterizerDensity + ///
+ ///
+ /// + /// + /// Options + /// + /// + [FieldOffset(120)] + public float RasterizerDensity; + + /// + /// + /// Font flags (don't use just yet, will be exposed in upcoming 1.92.X updates) + /// + /// + /// C++: + /// imgui.h:3637 + ///
ImFontFlags Flags + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(124)] + public ImFontFlags Flags; + + /// + /// + /// Target font (as we merging fonts, multiple ImFontConfig may target the same font) + /// + /// + /// C++: + /// imgui.h:3638 + ///
ImFont* DstFont + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(128)] + public ImFontPtr DstFont; + + /// + /// + /// Custom font backend for this source (default source is the one stored in ImFontAtlas) + /// + /// + /// C++: + /// imgui.h:3639 + ///
const ImFontLoader* FontLoader + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(136)] + public Ptr FontLoader; + + /// + /// + /// Font loader opaque storage (per font config) + /// + /// + /// C++: + /// imgui.h:3640 + ///
void* FontLoaderData + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(144)] + public nint FontLoaderData; + } + + /// + /// + /// Configuration data when adding a font or merging fonts + /// + /// + /// C++: + /// imgui.h:186 + ///
struct ImFontConfig + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontConfigPtr(ImFontConfig* ptr) : INullable + { + private ImFontConfig* _ptr = ptr; + public ImFontConfig* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontConfigPtr(ImFontConfig* ptr) => new(ptr); + + public static implicit operator ImFontConfig*(ImFontConfigPtr wrapper) => wrapper.Ptr; + + /// + /// <auto> // Name (strictly to ease debugging, hence limited size buffer) + /// + public Span Name => MemoryMarshal.CreateSpan(ref _ptr->Name[0], 40); + + /// + /// + /// // TTF/OTF data + /// + /// + /// C++: + /// imgui.h:3611 + ///
void* FontData + ///
+ ///
+ /// + /// + /// Data Source + /// + /// + public ref nint FontData => ref Unsafe.AsRef(&_ptr->FontData); + + /// + /// + /// // TTF/OTF data size + /// + /// + /// C++: + /// imgui.h:3612 + ///
int FontDataSize + ///
+ ///
+ /// + /// + /// Data Source + /// + /// + public ref int FontDataSize => ref Unsafe.AsRef(&_ptr->FontDataSize); + + /// + /// + /// true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself). + /// + /// + /// C++: + /// imgui.h:3613 + ///
bool FontDataOwnedByAtlas + ///
+ ///
+ /// + /// + /// Data Source + /// + /// + public ref bool FontDataOwnedByAtlas => ref Unsafe.AsRef(&_ptr->FontDataOwnedByAtlas); + + /// + /// + /// false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. + /// ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different + /// heights. + /// + /// + /// C++: + /// imgui.h:3616 + ///
bool MergeMode + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref bool MergeMode => ref Unsafe.AsRef(&_ptr->MergeMode); + + /// + /// + /// false // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel + /// aligned font with the default font. If enabled, you can set OversampleH/V to 1. + /// + /// + /// C++: + /// imgui.h:3617 + ///
bool PixelSnapH + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref bool PixelSnapH => ref Unsafe.AsRef(&_ptr->PixelSnapH); + + /// + /// + /// true // Align Scaled GlyphOffset.y to pixel boundaries. + /// + /// + /// C++: + /// imgui.h:3618 + ///
bool PixelSnapV + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref bool PixelSnapV => ref Unsafe.AsRef(&_ptr->PixelSnapV); + + /// + /// + /// 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on + /// size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save + /// memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details. + /// + /// + /// C++: + /// imgui.h:3619 + ///
ImS8 OversampleH + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref sbyte OversampleH => ref Unsafe.AsRef(&_ptr->OversampleH); + + /// + /// + /// 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really + /// useful as we don't use sub-pixel positions on the Y axis. + /// + /// + /// C++: + /// imgui.h:3620 + ///
ImS8 OversampleV + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref sbyte OversampleV => ref Unsafe.AsRef(&_ptr->OversampleV); + + /// + /// + /// 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged + /// first specified ellipsis will be used. + /// + /// + /// C++: + /// imgui.h:3621 + ///
ImWchar EllipsisChar + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref uint EllipsisChar => ref Unsafe.AsRef(&_ptr->EllipsisChar); + + /// + /// + /// // Size in pixels for rasterizer (more or less maps to the resulting font height). + /// + /// + /// C++: + /// imgui.h:3622 + ///
float SizePixels + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float SizePixels => ref Unsafe.AsRef(&_ptr->SizePixels); + + /// + /// + /// NULL // *LEGACY* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a + /// user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). + /// + /// + /// C++: + /// imgui.h:3623 + ///
const ImWchar* GlyphRanges + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref Ptr GlyphRanges => ref Unsafe.AsRef>(&_ptr->GlyphRanges); + + /// + /// + /// NULL // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are + /// inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges + /// from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection + /// Tool" to find about your overlapping ranges. + /// + /// + /// C++: + /// imgui.h:3624 + ///
const ImWchar* GlyphExcludeRanges + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref Ptr GlyphExcludeRanges => ref Unsafe.AsRef>(&_ptr->GlyphExcludeRanges); + + /// + /// + /// 0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other + /// sizes will scale this value. + /// + /// + /// C++: + /// imgui.h:3626 + ///
ImVec2 GlyphOffset + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float2 GlyphOffset => ref Unsafe.AsRef(&_ptr->GlyphOffset); + + /// + /// + /// 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce + /// mono-space font. Absolute value for default size, other sizes will scale this value. + /// + /// + /// C++: + /// imgui.h:3627 + ///
float GlyphMinAdvanceX + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float GlyphMinAdvanceX => ref Unsafe.AsRef(&_ptr->GlyphMinAdvanceX); + + /// + /// + /// FLT_MAX // Maximum AdvanceX for glyphs + /// + /// + /// C++: + /// imgui.h:3628 + ///
float GlyphMaxAdvanceX + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float GlyphMaxAdvanceX => ref Unsafe.AsRef(&_ptr->GlyphMaxAdvanceX); + + /// + /// + /// 0 // Extra spacing (in pixels) between glyphs. Please contact us if you are using this. // + /// FIXME-NEWATLAS: Intentionally unscaled + /// + /// + /// C++: + /// imgui.h:3629 + ///
float GlyphExtraAdvanceX + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float GlyphExtraAdvanceX => ref Unsafe.AsRef(&_ptr->GlyphExtraAdvanceX); + + /// + /// + /// 0 // Index of font within TTF/OTF file + /// + /// + /// C++: + /// imgui.h:3630 + ///
ImU32 FontNo + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref uint FontNo => ref Unsafe.AsRef(&_ptr->FontNo); + + /// + /// + /// 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if + /// unsure. + /// + /// + /// C++: + /// imgui.h:3631 + ///
unsigned int FontLoaderFlags + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref uint FontLoaderFlags => ref Unsafe.AsRef(&_ptr->FontLoaderFlags); + + /// + /// + /// 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may + /// be a good workaround to make them more readable. This is a silly thing we may remove in the future. + /// + /// + /// C++: + /// imgui.h:3633 + ///
float RasterizerMultiply + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float RasterizerMultiply => ref Unsafe.AsRef(&_ptr->RasterizerMultiply); + + /// + /// + /// 1.0f // [LEGACY: this only makes sense when ImGuiBackendFlags_RendererHasTextures is not supported] + /// DPI scale multiplier for rasterization. Not altering other font metrics: makes it easy to swap between + /// e.g. a 100% and a 400% fonts for a zooming display, or handle Retina screen. IMPORTANT: If you change + /// this it is expected that you increase/decrease font scale roughly to the inverse of this, otherwise + /// quality may look lowered. + /// + /// + /// C++: + /// imgui.h:3634 + ///
float RasterizerDensity + ///
+ ///
+ /// + /// + /// Options + /// + /// + public ref float RasterizerDensity => ref Unsafe.AsRef(&_ptr->RasterizerDensity); + + /// + /// + /// Font flags (don't use just yet, will be exposed in upcoming 1.92.X updates) + /// + /// + /// C++: + /// imgui.h:3637 + ///
ImFontFlags Flags + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImFontFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Target font (as we merging fonts, multiple ImFontConfig may target the same font) + /// + /// + /// C++: + /// imgui.h:3638 + ///
ImFont* DstFont + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImFontPtr DstFont => ref Unsafe.AsRef(&_ptr->DstFont); + + /// + /// + /// Custom font backend for this source (default source is the one stored in ImFontAtlas) + /// + /// + /// C++: + /// imgui.h:3639 + ///
const ImFontLoader* FontLoader + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref Ptr FontLoader => ref Unsafe.AsRef>(&_ptr->FontLoader); + + /// + /// + /// Font loader opaque storage (per font config) + /// + /// + /// C++: + /// imgui.h:3640 + ///
void* FontLoaderData + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref nint FontLoaderData => ref Unsafe.AsRef(&_ptr->FontLoaderData); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontGlyph.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontGlyph.gen.cs new file mode 100644 index 0000000..ceefca4 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontGlyph.gen.cs @@ -0,0 +1,582 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// A single font glyph (code point + coordinates within in ImFontAtlas + offset) + /// + /// + /// C++: + /// imgui.h:187 + ///
struct ImFontGlyph + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 44)] + public partial struct ImFontGlyph + { + /// + /// + /// Flag to indicate glyph is colored and should generally ignore tinting (make it usable with no shift on + /// little-endian as this is used in loops) + /// + /// + /// C++: + /// imgui.h:3649 + ///
unsigned int Colored : 1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(0)] + public uint Colored; + + /// + /// + /// Flag to indicate glyph has no visible pixels (e.g. space). Allow early out when rendering. + /// + /// + /// C++: + /// imgui.h:3650 + ///
unsigned int Visible : 1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(0)] + public uint Visible; + + /// + /// + /// Index of source in parent font + /// + /// + /// C++: + /// imgui.h:3651 + ///
unsigned int SourceIdx : 4 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(0)] + public uint SourceIdx; + + /// + /// + /// 0x0000..0x10FFFF + /// + /// + /// C++: + /// imgui.h:3652 + ///
unsigned int Codepoint : 26 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(0)] + public uint Codepoint; + + /// + /// + /// Horizontal distance to advance cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3653 + ///
float AdvanceX + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(4)] + public float AdvanceX; + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(8)] + public float X0; + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0, Y0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(12)] + public float Y0; + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0, Y0, X1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(16)] + public float X1; + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0, Y0, X1, Y1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(20)] + public float Y1; + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(24)] + public float U0; + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0, V0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(28)] + public float V0; + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0, V0, U1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(32)] + public float U1; + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0, V0, U1, V1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(36)] + public float V1; + + /// + /// + /// [Internal] ImFontAtlasRectId value (FIXME: Cold data, could be moved elsewhere?) + /// + /// + /// C++: + /// imgui.h:3656 + ///
int PackId + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + [FieldOffset(40)] + public int PackId; + } + + /// + /// + /// A single font glyph (code point + coordinates within in ImFontAtlas + offset) + /// + /// + /// C++: + /// imgui.h:187 + ///
struct ImFontGlyph + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontGlyphPtr(ImFontGlyph* ptr) : INullable + { + private ImFontGlyph* _ptr = ptr; + public ImFontGlyph* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontGlyphPtr(ImFontGlyph* ptr) => new(ptr); + + public static implicit operator ImFontGlyph*(ImFontGlyphPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Flag to indicate glyph is colored and should generally ignore tinting (make it usable with no shift on + /// little-endian as this is used in loops) + /// + /// + /// C++: + /// imgui.h:3649 + ///
unsigned int Colored : 1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref uint Colored => ref Unsafe.AsRef(&_ptr->Colored); + + /// + /// + /// Flag to indicate glyph has no visible pixels (e.g. space). Allow early out when rendering. + /// + /// + /// C++: + /// imgui.h:3650 + ///
unsigned int Visible : 1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref uint Visible => ref Unsafe.AsRef(&_ptr->Visible); + + /// + /// + /// Index of source in parent font + /// + /// + /// C++: + /// imgui.h:3651 + ///
unsigned int SourceIdx : 4 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref uint SourceIdx => ref Unsafe.AsRef(&_ptr->SourceIdx); + + /// + /// + /// 0x0000..0x10FFFF + /// + /// + /// C++: + /// imgui.h:3652 + ///
unsigned int Codepoint : 26 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref uint Codepoint => ref Unsafe.AsRef(&_ptr->Codepoint); + + /// + /// + /// Horizontal distance to advance cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3653 + ///
float AdvanceX + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float AdvanceX => ref Unsafe.AsRef(&_ptr->AdvanceX); + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float X0 => ref Unsafe.AsRef(&_ptr->X0); + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0, Y0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float Y0 => ref Unsafe.AsRef(&_ptr->Y0); + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0, Y0, X1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float X1 => ref Unsafe.AsRef(&_ptr->X1); + + /// + /// + /// Glyph corners. Offsets from current cursor/layout position. + /// + /// + /// C++: + /// imgui.h:3654 + ///
float X0, Y0, X1, Y1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float Y1 => ref Unsafe.AsRef(&_ptr->Y1); + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float U0 => ref Unsafe.AsRef(&_ptr->U0); + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0, V0 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float V0 => ref Unsafe.AsRef(&_ptr->V0); + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0, V0, U1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float U1 => ref Unsafe.AsRef(&_ptr->U1); + + /// + /// + /// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling + /// GetCustomRect() with PackId. + /// + /// + /// C++: + /// imgui.h:3655 + ///
float U0, V0, U1, V1 + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref float V1 => ref Unsafe.AsRef(&_ptr->V1); + + /// + /// + /// [Internal] ImFontAtlasRectId value (FIXME: Cold data, could be moved elsewhere?) + /// + /// + /// C++: + /// imgui.h:3656 + ///
int PackId + ///
+ ///
+ /// + /// + /// Hold rendering data for one glyph. + /// (Note: some language parsers may fail to convert the bitfield members, in this case maybe drop store a single u32 or we can rework this) + /// + /// + public ref int PackId => ref Unsafe.AsRef(&_ptr->PackId); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs new file mode 100644 index 0000000..04f079e --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontGlyphRangesBuilder.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper to build glyph ranges from text/string data + /// + /// + /// C++: + /// imgui.h:188 + ///
struct ImFontGlyphRangesBuilder + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImFontGlyphRangesBuilder + { + /// + /// + /// Store 1-bit per Unicode code point (0=unused, 1=used) + /// + /// + /// C++: + /// imgui.h:3665 + ///
ImVector<ImU32> UsedChars + ///
+ ///
+ /// + /// + /// Helper to build glyph ranges from text/string data. Feed your application strings/characters to it then call BuildRanges(). + /// This is essentially a tightly packed of vector of 64k booleans = 8KB storage. + /// + /// + [FieldOffset(0)] + public ImVector UsedChars; + } + + /// + /// + /// Helper to build glyph ranges from text/string data + /// + /// + /// C++: + /// imgui.h:188 + ///
struct ImFontGlyphRangesBuilder + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontGlyphRangesBuilderPtr(ImFontGlyphRangesBuilder* ptr) : INullable + { + private ImFontGlyphRangesBuilder* _ptr = ptr; + public ImFontGlyphRangesBuilder* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontGlyphRangesBuilderPtr(ImFontGlyphRangesBuilder* ptr) => new(ptr); + + public static implicit operator ImFontGlyphRangesBuilder*(ImFontGlyphRangesBuilderPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Store 1-bit per Unicode code point (0=unused, 1=used) + /// + /// + /// C++: + /// imgui.h:3665 + ///
ImVector<ImU32> UsedChars + ///
+ ///
+ /// + /// + /// Helper to build glyph ranges from text/string data. Feed your application strings/characters to it then call BuildRanges(). + /// This is essentially a tightly packed of vector of 64k booleans = 8KB storage. + /// + /// + public ref ImVector UsedChars => ref Unsafe.AsRef>(&_ptr->UsedChars); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImFontLoader.gen.cs b/Brutal.ImGui/Generated/Structs/ImFontLoader.gen.cs new file mode 100644 index 0000000..5f0e8b7 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImFontLoader.gen.cs @@ -0,0 +1,388 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Opaque interface to a font loading backend (stb_truetype, FreeType etc.). + /// + /// + /// C++: + /// imgui.h:189 + ///
struct ImFontLoader + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public partial struct ImFontLoader + { + /// + /// + /// C++: + /// imgui_internal.h:3995 + ///
const char* Name + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(0)] + public Ptr Name; + + /// + /// + /// C++: + /// imgui_internal.h:3996 + ///
bool (*LoaderInit)(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(8)] + public nint LoaderInit; + + /// + /// + /// C++: + /// imgui_internal.h:3997 + ///
void (*LoaderShutdown)(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(16)] + public nint LoaderShutdown; + + /// + /// + /// C++: + /// imgui_internal.h:3998 + ///
bool (*FontSrcInit)(ImFontAtlas* atlas, ImFontConfig* src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(24)] + public nint FontSrcInit; + + /// + /// + /// C++: + /// imgui_internal.h:3999 + ///
void (*FontSrcDestroy)(ImFontAtlas* atlas, ImFontConfig* src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(32)] + public nint FontSrcDestroy; + + /// + /// + /// C++: + /// imgui_internal.h:4000 + ///
bool (*FontSrcContainsGlyph)(ImFontAtlas* atlas, ImFontConfig* src, ImWchar codepoint) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(40)] + public nint FontSrcContainsGlyph; + + /// + /// + /// C++: + /// imgui_internal.h:4001 + ///
+ /// bool (*FontBakedInit)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(48)] + public nint FontBakedInit; + + /// + /// + /// C++: + /// imgui_internal.h:4002 + ///
+ /// void (*FontBakedDestroy)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(56)] + public nint FontBakedDestroy; + + /// + /// + /// C++: + /// imgui_internal.h:4003 + ///
+ /// bool (*FontBakedLoadGlyph)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src, ImWchar codepoint, ImFontGlyph* out_glyph, float* out_advance_x) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + [FieldOffset(64)] + public nint FontBakedLoadGlyph; + + /// + /// + /// C++: + /// imgui_internal.h:4007 + ///
size_t FontBakedSrcLoaderDataSize + ///
+ ///
+ /// + /// + /// Size of backend data, Per Baked * Per Source. Buffers are managed by core to avoid excessive allocations. + /// FIXME: At this point the two other types of buffers may be managed by core to be consistent? + /// + /// + [FieldOffset(72)] + public nuint FontBakedSrcLoaderDataSize; + } + + /// + /// + /// Opaque interface to a font loading backend (stb_truetype, FreeType etc.). + /// + /// + /// C++: + /// imgui.h:189 + ///
struct ImFontLoader + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImFontLoaderPtr(ImFontLoader* ptr) : INullable + { + private ImFontLoader* _ptr = ptr; + public ImFontLoader* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImFontLoaderPtr(ImFontLoader* ptr) => new(ptr); + + public static implicit operator ImFontLoader*(ImFontLoaderPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:3995 + ///
const char* Name + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref Ptr Name => ref Unsafe.AsRef>(&_ptr->Name); + + /// + /// + /// C++: + /// imgui_internal.h:3996 + ///
bool (*LoaderInit)(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint LoaderInit => ref Unsafe.AsRef(&_ptr->LoaderInit); + + /// + /// + /// C++: + /// imgui_internal.h:3997 + ///
void (*LoaderShutdown)(ImFontAtlas* atlas) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint LoaderShutdown => ref Unsafe.AsRef(&_ptr->LoaderShutdown); + + /// + /// + /// C++: + /// imgui_internal.h:3998 + ///
bool (*FontSrcInit)(ImFontAtlas* atlas, ImFontConfig* src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint FontSrcInit => ref Unsafe.AsRef(&_ptr->FontSrcInit); + + /// + /// + /// C++: + /// imgui_internal.h:3999 + ///
void (*FontSrcDestroy)(ImFontAtlas* atlas, ImFontConfig* src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint FontSrcDestroy => ref Unsafe.AsRef(&_ptr->FontSrcDestroy); + + /// + /// + /// C++: + /// imgui_internal.h:4000 + ///
bool (*FontSrcContainsGlyph)(ImFontAtlas* atlas, ImFontConfig* src, ImWchar codepoint) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint FontSrcContainsGlyph => ref Unsafe.AsRef(&_ptr->FontSrcContainsGlyph); + + /// + /// + /// C++: + /// imgui_internal.h:4001 + ///
+ /// bool (*FontBakedInit)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint FontBakedInit => ref Unsafe.AsRef(&_ptr->FontBakedInit); + + /// + /// + /// C++: + /// imgui_internal.h:4002 + ///
+ /// void (*FontBakedDestroy)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint FontBakedDestroy => ref Unsafe.AsRef(&_ptr->FontBakedDestroy); + + /// + /// + /// C++: + /// imgui_internal.h:4003 + ///
+ /// bool (*FontBakedLoadGlyph)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src, ImWchar codepoint, ImFontGlyph* out_glyph, float* out_advance_x) + ///
+ ///
+ /// + /// + /// Hooks and storage for a given font backend. + /// This structure is likely to evolve as we add support for incremental atlas updates. + /// Conceptually this could be public, but API is still going to be evolve. + /// + /// + public ref nint FontBakedLoadGlyph => ref Unsafe.AsRef(&_ptr->FontBakedLoadGlyph); + + /// + /// + /// C++: + /// imgui_internal.h:4007 + ///
size_t FontBakedSrcLoaderDataSize + ///
+ ///
+ /// + /// + /// Size of backend data, Per Baked * Per Source. Buffers are managed by core to avoid excessive allocations. + /// FIXME: At this point the two other types of buffers may be managed by core to be consistent? + /// + /// + public ref nuint FontBakedSrcLoaderDataSize => ref Unsafe.AsRef(&_ptr->FontBakedSrcLoaderDataSize); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiContext.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiContext.gen.cs new file mode 100644 index 0000000..465293e --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiContext.gen.cs @@ -0,0 +1,10417 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Dear ImGui context (opaque structure, unless including imgui_internal.h) + /// + /// + /// C++: + /// imgui.h:195 + ///
struct ImGuiContext + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 11320)] + public unsafe partial struct ImGuiContext + { + /// + /// + /// C++: + /// imgui_internal.h:2334 + ///
bool Initialized + ///
+ ///
+ [FieldOffset(0)] + public Bool8 Initialized; + + /// + /// + /// C++: + /// imgui_internal.h:2335 + ///
ImGuiIO IO + ///
+ ///
+ [FieldOffset(8)] + public ImGuiIO IO; + + /// + /// + /// C++: + /// imgui_internal.h:2336 + ///
ImGuiPlatformIO PlatformIO + ///
+ ///
+ [FieldOffset(3072)] + public ImGuiPlatformIO PlatformIO; + + /// + /// + /// C++: + /// imgui_internal.h:2337 + ///
ImGuiStyle Style + ///
+ ///
+ [FieldOffset(3400)] + public ImGuiStyle Style; + + /// + /// + /// = g.IO.ConfigFlags at the time of NewFrame() + /// + /// + /// C++: + /// imgui_internal.h:2338 + ///
ImGuiConfigFlags ConfigFlagsCurrFrame + ///
+ ///
+ [FieldOffset(4676)] + public ImGuiConfigFlags ConfigFlagsCurrFrame; + + /// + /// + /// C++: + /// imgui_internal.h:2339 + ///
ImGuiConfigFlags ConfigFlagsLastFrame + ///
+ ///
+ [FieldOffset(4680)] + public ImGuiConfigFlags ConfigFlagsLastFrame; + + /// + /// + /// List of font atlases used by the context (generally only contains g.IO.Fonts aka the main font atlas) + /// + /// + /// C++: + /// imgui_internal.h:2340 + ///
ImVector<ImFontAtlas*> FontAtlases + ///
+ ///
+ [FieldOffset(4688)] + public ImVector FontAtlases; + + /// + /// + /// Currently bound font. (== FontStack.back().Font) + /// + /// + /// C++: + /// imgui_internal.h:2341 + ///
ImFont* Font + ///
+ ///
+ [FieldOffset(4704)] + public ImFontPtr Font; + + /// + /// + /// Currently bound font at currently bound size. (== Font->GetFontBaked(FontSize)) + /// + /// + /// C++: + /// imgui_internal.h:2342 + ///
ImFontBaked* FontBaked + ///
+ ///
+ [FieldOffset(4712)] + public ImFontBakedPtr FontBaked; + + /// + /// + /// Currently bound font size == line height (== FontSizeBase + externals scales applied in the + /// UpdateCurrentFontSize() function). + /// + /// + /// C++: + /// imgui_internal.h:2343 + ///
float FontSize + ///
+ ///
+ [FieldOffset(4720)] + public float FontSize; + + /// + /// + /// Font size before scaling == style.FontSizeBase == value passed to PushFont() when specified. + /// + /// + /// C++: + /// imgui_internal.h:2344 + ///
float FontSizeBase + ///
+ ///
+ [FieldOffset(4724)] + public float FontSizeBase; + + /// + /// + /// == FontBaked->Size / FontSize. Scale factor over baked size. Rarely used nowadays, very often == + /// 1.0f. + /// + /// + /// C++: + /// imgui_internal.h:2345 + ///
float FontBakedScale + ///
+ ///
+ [FieldOffset(4728)] + public float FontBakedScale; + + /// + /// + /// Current font density. Used by all calls to GetFontBaked(). + /// + /// + /// C++: + /// imgui_internal.h:2346 + ///
float FontRasterizerDensity + ///
+ ///
+ [FieldOffset(4732)] + public float FontRasterizerDensity; + + /// + /// + /// Current window/viewport DpiScale == CurrentViewport->DpiScale + /// + /// + /// C++: + /// imgui_internal.h:2347 + ///
float CurrentDpiScale + ///
+ ///
+ [FieldOffset(4736)] + public float CurrentDpiScale; + + /// + /// + /// C++: + /// imgui_internal.h:2348 + ///
ImDrawListSharedData DrawListSharedData + ///
+ ///
+ [FieldOffset(4744)] + public ImDrawListSharedData DrawListSharedData; + + /// + /// + /// C++: + /// imgui_internal.h:2349 + ///
double Time + ///
+ ///
+ [FieldOffset(5312)] + public double Time; + + /// + /// + /// C++: + /// imgui_internal.h:2350 + ///
int FrameCount + ///
+ ///
+ [FieldOffset(5320)] + public int FrameCount; + + /// + /// + /// C++: + /// imgui_internal.h:2351 + ///
int FrameCountEnded + ///
+ ///
+ [FieldOffset(5324)] + public int FrameCountEnded; + + /// + /// + /// C++: + /// imgui_internal.h:2352 + ///
int FrameCountPlatformEnded + ///
+ ///
+ [FieldOffset(5328)] + public int FrameCountPlatformEnded; + + /// + /// + /// C++: + /// imgui_internal.h:2353 + ///
int FrameCountRendered + ///
+ ///
+ [FieldOffset(5332)] + public int FrameCountRendered; + + /// + /// + /// Set within EndChild() + /// + /// + /// C++: + /// imgui_internal.h:2354 + ///
ImGuiID WithinEndChildID + ///
+ ///
+ [FieldOffset(5336)] + public ImGuiID WithinEndChildID; + + /// + /// + /// Set by NewFrame(), cleared by EndFrame() + /// + /// + /// C++: + /// imgui_internal.h:2355 + ///
bool WithinFrameScope + ///
+ ///
+ [FieldOffset(5340)] + public Bool8 WithinFrameScope; + + /// + /// + /// Set by NewFrame(), cleared by EndFrame() when the implicit debug window has been pushed + /// + /// + /// C++: + /// imgui_internal.h:2356 + ///
bool WithinFrameScopeWithImplicitWindow + ///
+ ///
+ [FieldOffset(5341)] + public Bool8 WithinFrameScopeWithImplicitWindow; + + /// + /// + /// Request full GC + /// + /// + /// C++: + /// imgui_internal.h:2357 + ///
bool GcCompactAll + ///
+ ///
+ [FieldOffset(5342)] + public Bool8 GcCompactAll; + + /// + /// + /// Will call test engine hooks: ImGuiTestEngineHook_ItemAdd(), ImGuiTestEngineHook_ItemInfo(), + /// ImGuiTestEngineHook_Log() + /// + /// + /// C++: + /// imgui_internal.h:2358 + ///
bool TestEngineHookItems + ///
+ ///
+ [FieldOffset(5343)] + public Bool8 TestEngineHookItems; + + /// + /// + /// Test engine user data + /// + /// + /// C++: + /// imgui_internal.h:2359 + ///
void* TestEngine + ///
+ ///
+ [FieldOffset(5344)] + public nint TestEngine; + + /// + /// Storage for a context name (to facilitate debugging multi-context setups) + /// + [FieldOffset(5352)] + public fixed byte ContextName[16]; + + /// + /// + /// Input events which will be trickled/written into IO structure. + /// + /// + /// C++: + /// imgui_internal.h:2363 + ///
ImVector<ImGuiInputEvent> InputEventsQueue + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + [FieldOffset(5368)] + public ImVector InputEventsQueue; + + /// + /// + /// Past input events processed in NewFrame(). This is to allow domain-specific application to access e.g + /// mouse/pen trail. + /// + /// + /// C++: + /// imgui_internal.h:2364 + ///
ImVector<ImGuiInputEvent> InputEventsTrail + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + [FieldOffset(5384)] + public ImVector InputEventsTrail; + + /// + /// + /// C++: + /// imgui_internal.h:2365 + ///
ImGuiMouseSource InputEventsNextMouseSource + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + [FieldOffset(5400)] + public ImGuiMouseSource InputEventsNextMouseSource; + + /// + /// + /// C++: + /// imgui_internal.h:2366 + ///
ImU32 InputEventsNextEventId + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + [FieldOffset(5404)] + public uint InputEventsNextEventId; + + /// + /// + /// Windows, sorted in display order, back to front + /// + /// + /// C++: + /// imgui_internal.h:2369 + ///
ImVector<ImGuiWindow*> Windows + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5408)] + public ImVector Windows; + + /// + /// + /// Root windows, sorted in focus order, back to front. + /// + /// + /// C++: + /// imgui_internal.h:2370 + ///
ImVector<ImGuiWindow*> WindowsFocusOrder + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5424)] + public ImVector WindowsFocusOrder; + + /// + /// + /// Temporary buffer used in EndFrame() to reorder windows so parents are kept before their child + /// + /// + /// C++: + /// imgui_internal.h:2371 + ///
ImVector<ImGuiWindow*> WindowsTempSortBuffer + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5440)] + public ImVector WindowsTempSortBuffer; + + /// + /// + /// C++: + /// imgui_internal.h:2372 + ///
ImVector<ImGuiWindowStackData> CurrentWindowStack + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5456)] + public ImVector CurrentWindowStack; + + /// + /// + /// Map window's ImGuiID to ImGuiWindow* + /// + /// + /// C++: + /// imgui_internal.h:2373 + ///
ImGuiStorage WindowsById + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5472)] + public ImGuiStorage WindowsById; + + /// + /// + /// Number of unique windows submitted by frame + /// + /// + /// C++: + /// imgui_internal.h:2374 + ///
int WindowsActiveCount + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5488)] + public int WindowsActiveCount; + + /// + /// + /// Padding around resizable windows for which hovering on counts as hovering the window == + /// ImMax(style.TouchExtraPadding, style.WindowBorderHoverPadding). This isn't so multi-dpi friendly. + /// + /// + /// C++: + /// imgui_internal.h:2375 + ///
float WindowsBorderHoverPadding + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5492)] + public float WindowsBorderHoverPadding; + + /// + /// + /// Set to break in Begin() call. + /// + /// + /// C++: + /// imgui_internal.h:2376 + ///
ImGuiID DebugBreakInWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5496)] + public ImGuiID DebugBreakInWindow; + + /// + /// + /// Window being drawn into + /// + /// + /// C++: + /// imgui_internal.h:2377 + ///
ImGuiWindow* CurrentWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5504)] + public ImGuiWindowPtr CurrentWindow; + + /// + /// + /// Window the mouse is hovering. Will typically catch mouse inputs. + /// + /// + /// C++: + /// imgui_internal.h:2378 + ///
ImGuiWindow* HoveredWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5512)] + public ImGuiWindowPtr HoveredWindow; + + /// + /// + /// Hovered window ignoring MovingWindow. Only set if MovingWindow is set. + /// + /// + /// C++: + /// imgui_internal.h:2379 + ///
ImGuiWindow* HoveredWindowUnderMovingWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5520)] + public ImGuiWindowPtr HoveredWindowUnderMovingWindow; + + /// + /// + /// Window the mouse is hovering. Filled even with _NoMouse. This is currently useful for multi-context + /// compositors. + /// + /// + /// C++: + /// imgui_internal.h:2380 + ///
ImGuiWindow* HoveredWindowBeforeClear + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5528)] + public ImGuiWindowPtr HoveredWindowBeforeClear; + + /// + /// + /// Track the window we clicked on (in order to preserve focus). The actual window that is moved is + /// generally MovingWindow->RootWindowDockTree. + /// + /// + /// C++: + /// imgui_internal.h:2381 + ///
ImGuiWindow* MovingWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5536)] + public ImGuiWindowPtr MovingWindow; + + /// + /// + /// Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep + /// scrolling the same window even if during the course of scrolling the mouse ends up hovering a child + /// window. + /// + /// + /// C++: + /// imgui_internal.h:2382 + ///
ImGuiWindow* WheelingWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5544)] + public ImGuiWindowPtr WheelingWindow; + + /// + /// + /// C++: + /// imgui_internal.h:2383 + ///
ImVec2 WheelingWindowRefMousePos + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5552)] + public float2 WheelingWindowRefMousePos; + + /// + /// + /// This may be set one frame before WheelingWindow is != NULL + /// + /// + /// C++: + /// imgui_internal.h:2384 + ///
int WheelingWindowStartFrame + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5560)] + public int WheelingWindowStartFrame; + + /// + /// + /// C++: + /// imgui_internal.h:2385 + ///
int WheelingWindowScrolledFrame + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5564)] + public int WheelingWindowScrolledFrame; + + /// + /// + /// C++: + /// imgui_internal.h:2386 + ///
float WheelingWindowReleaseTimer + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5568)] + public float WheelingWindowReleaseTimer; + + /// + /// + /// C++: + /// imgui_internal.h:2387 + ///
ImVec2 WheelingWindowWheelRemainder + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5572)] + public float2 WheelingWindowWheelRemainder; + + /// + /// + /// C++: + /// imgui_internal.h:2388 + ///
ImVec2 WheelingAxisAvg + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + [FieldOffset(5580)] + public float2 WheelingAxisAvg; + + /// + /// + /// Set when we detect multiple items with the same identifier + /// + /// + /// C++: + /// imgui_internal.h:2391 + ///
ImGuiID DebugDrawIdConflictsId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5588)] + public ImGuiID DebugDrawIdConflictsId; + + /// + /// + /// Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next + /// HoveredId/ActiveId to not pull in an extra cache-line] + /// + /// + /// C++: + /// imgui_internal.h:2392 + ///
ImGuiID DebugHookIdInfo + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5592)] + public ImGuiID DebugHookIdInfo; + + /// + /// + /// Hovered widget, filled during the frame + /// + /// + /// C++: + /// imgui_internal.h:2393 + ///
ImGuiID HoveredId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5596)] + public ImGuiID HoveredId; + + /// + /// + /// C++: + /// imgui_internal.h:2394 + ///
ImGuiID HoveredIdPreviousFrame + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5600)] + public ImGuiID HoveredIdPreviousFrame; + + /// + /// + /// Count numbers of items using the same ID as last frame's hovered id + /// + /// + /// C++: + /// imgui_internal.h:2395 + ///
int HoveredIdPreviousFrameItemCount + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5604)] + public int HoveredIdPreviousFrameItemCount; + + /// + /// + /// Measure contiguous hovering time + /// + /// + /// C++: + /// imgui_internal.h:2396 + ///
float HoveredIdTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5608)] + public float HoveredIdTimer; + + /// + /// + /// Measure contiguous hovering time where the item has not been active + /// + /// + /// C++: + /// imgui_internal.h:2397 + ///
float HoveredIdNotActiveTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5612)] + public float HoveredIdNotActiveTimer; + + /// + /// + /// C++: + /// imgui_internal.h:2398 + ///
bool HoveredIdAllowOverlap + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5616)] + public Bool8 HoveredIdAllowOverlap; + + /// + /// + /// At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May + /// be true even if HoveredId == 0. + /// + /// + /// C++: + /// imgui_internal.h:2399 + ///
bool HoveredIdIsDisabled + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5617)] + public Bool8 HoveredIdIsDisabled; + + /// + /// + /// Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled + /// + /// + /// C++: + /// imgui_internal.h:2400 + ///
bool ItemUnclipByLog + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5618)] + public Bool8 ItemUnclipByLog; + + /// + /// + /// Active widget + /// + /// + /// C++: + /// imgui_internal.h:2401 + ///
ImGuiID ActiveId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5620)] + public ImGuiID ActiveId; + + /// + /// + /// Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame) + /// + /// + /// C++: + /// imgui_internal.h:2402 + ///
ImGuiID ActiveIdIsAlive + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5624)] + public ImGuiID ActiveIdIsAlive; + + /// + /// + /// C++: + /// imgui_internal.h:2403 + ///
float ActiveIdTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5628)] + public float ActiveIdTimer; + + /// + /// + /// Set at the time of activation for one frame + /// + /// + /// C++: + /// imgui_internal.h:2404 + ///
bool ActiveIdIsJustActivated + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5632)] + public Bool8 ActiveIdIsJustActivated; + + /// + /// + /// Active widget allows another widget to steal active id (generally for overlapping widgets, but not + /// always) + /// + /// + /// C++: + /// imgui_internal.h:2405 + ///
bool ActiveIdAllowOverlap + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5633)] + public Bool8 ActiveIdAllowOverlap; + + /// + /// + /// Disable losing active id if the active id window gets unfocused. + /// + /// + /// C++: + /// imgui_internal.h:2406 + ///
bool ActiveIdNoClearOnFocusLoss + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5634)] + public Bool8 ActiveIdNoClearOnFocusLoss; + + /// + /// + /// Track whether the active id led to a press (this is to allow changing between PressOnClick and + /// PressOnRelease without pressing twice). Used by range_select branch. + /// + /// + /// C++: + /// imgui_internal.h:2407 + ///
bool ActiveIdHasBeenPressedBefore + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5635)] + public Bool8 ActiveIdHasBeenPressedBefore; + + /// + /// + /// Was the value associated to the widget Edited over the course of the Active state. + /// + /// + /// C++: + /// imgui_internal.h:2408 + ///
bool ActiveIdHasBeenEditedBefore + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5636)] + public Bool8 ActiveIdHasBeenEditedBefore; + + /// + /// + /// C++: + /// imgui_internal.h:2409 + ///
bool ActiveIdHasBeenEditedThisFrame + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5637)] + public Bool8 ActiveIdHasBeenEditedThisFrame; + + /// + /// + /// C++: + /// imgui_internal.h:2410 + ///
bool ActiveIdFromShortcut + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5638)] + public Bool8 ActiveIdFromShortcut; + + /// + /// + /// C++: + /// imgui_internal.h:2411 + ///
int ActiveIdMouseButton : 8 + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5640)] + public int ActiveIdMouseButton; + + /// + /// + /// Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior) + /// + /// + /// C++: + /// imgui_internal.h:2412 + ///
ImVec2 ActiveIdClickOffset + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5644)] + public float2 ActiveIdClickOffset; + + /// + /// + /// C++: + /// imgui_internal.h:2413 + ///
ImGuiWindow* ActiveIdWindow + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5656)] + public ImGuiWindowPtr ActiveIdWindow; + + /// + /// + /// Activating source: ImGuiInputSource_Mouse OR ImGuiInputSource_Keyboard OR ImGuiInputSource_Gamepad + /// + /// + /// C++: + /// imgui_internal.h:2414 + ///
ImGuiInputSource ActiveIdSource + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5664)] + public ImGuiInputSource ActiveIdSource; + + /// + /// + /// C++: + /// imgui_internal.h:2415 + ///
ImGuiID ActiveIdPreviousFrame + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5668)] + public ImGuiID ActiveIdPreviousFrame; + + /// + /// + /// C++: + /// imgui_internal.h:2416 + ///
ImGuiDeactivatedItemData DeactivatedItemData + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5672)] + public ImGuiDeactivatedItemData DeactivatedItemData; + + /// + /// + /// Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX. + /// + /// + /// C++: + /// imgui_internal.h:2417 + ///
ImGuiDataTypeStorage ActiveIdValueOnActivation + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5684)] + public ImGuiDataTypeStorage ActiveIdValueOnActivation; + + /// + /// + /// Store the last non-zero ActiveId, useful for animation. + /// + /// + /// C++: + /// imgui_internal.h:2418 + ///
ImGuiID LastActiveId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5692)] + public ImGuiID LastActiveId; + + /// + /// + /// Store the last non-zero ActiveId timer since the beginning of activation, useful for animation. + /// + /// + /// C++: + /// imgui_internal.h:2419 + ///
float LastActiveIdTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + [FieldOffset(5696)] + public float LastActiveIdTimer; + + /// + /// + /// Record the last time key mods changed (affect repeat delay when using shortcut logic) + /// + /// + /// C++: + /// imgui_internal.h:2425 + ///
double LastKeyModsChangeTime + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(5704)] + public double LastKeyModsChangeTime; + + /// + /// + /// Record the last time key mods changed away from being 0 (affect repeat delay when using shortcut logic) + /// + /// + /// C++: + /// imgui_internal.h:2426 + ///
double LastKeyModsChangeFromNoneTime + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(5712)] + public double LastKeyModsChangeFromNoneTime; + + /// + /// + /// Record the last time a keyboard key (ignore mouse/gamepad ones) was pressed. + /// + /// + /// C++: + /// imgui_internal.h:2427 + ///
double LastKeyboardKeyPressTime + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(5720)] + public double LastKeyboardKeyPressTime; + + /// + /// + /// Lookup to tell if a key can emit char input, see IsKeyChordPotentiallyCharInput(). sizeof() = 20 bytes + /// + /// + /// C++: + /// imgui_internal.h:2428 + ///
ImBitArrayForNamedKeys KeysMayBeCharInput + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(5728)] + public ImBitArrayForNamedKeys KeysMayBeCharInput; + + /// + /// + /// C++: + /// imgui_internal.h:2429 + ///
ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT] + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(5748)] + public ImGuiKeyOwnerData_155 KeysOwnerData; + + /// + /// + /// C++: + /// imgui_internal.h:2430 + ///
ImGuiKeyRoutingTable KeysRoutingTable + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(7608)] + public ImGuiKeyRoutingTable KeysRoutingTable; + + /// + /// + /// Active widget will want to read those nav move requests (e.g. can activate a button and move away from + /// it) + /// + /// + /// C++: + /// imgui_internal.h:2431 + ///
ImU32 ActiveIdUsingNavDirMask + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(7952)] + public uint ActiveIdUsingNavDirMask; + + /// + /// + /// Active widget will want to read all keyboard keys inputs. (this is a shortcut for not taking ownership + /// of 100+ keys, frequently used by drag operations) + /// + /// + /// C++: + /// imgui_internal.h:2432 + ///
bool ActiveIdUsingAllKeyboardKeys + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(7956)] + public Bool8 ActiveIdUsingAllKeyboardKeys; + + /// + /// + /// Set to break in SetShortcutRouting()/Shortcut() calls. + /// + /// + /// C++: + /// imgui_internal.h:2433 + ///
ImGuiKeyChord DebugBreakInShortcutRouting + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + [FieldOffset(7960)] + public ImGuiKeyChord DebugBreakInShortcutRouting; + + /// + /// + /// Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with + /// g.NavFocusScopeId. + /// + /// + /// C++: + /// imgui_internal.h:2437 + ///
ImGuiID CurrentFocusScopeId + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(7964)] + public ImGuiID CurrentFocusScopeId; + + /// + /// + /// Value for currently appending items == g.ItemFlagsStack.back() + /// + /// + /// C++: + /// imgui_internal.h:2438 + ///
ImGuiItemFlags CurrentItemFlags + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(7968)] + public ImGuiItemFlags CurrentItemFlags; + + /// + /// + /// Storage for DebugLocateItemOnHover() feature: this is read by ItemAdd() so we keep it in a hot/cached + /// location + /// + /// + /// C++: + /// imgui_internal.h:2439 + ///
ImGuiID DebugLocateId + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(7972)] + public ImGuiID DebugLocateId; + + /// + /// + /// Storage for SetNextItem** functions + /// + /// + /// C++: + /// imgui_internal.h:2440 + ///
ImGuiNextItemData NextItemData + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(7976)] + public ImGuiNextItemData NextItemData; + + /// + /// + /// Storage for last submitted item (setup by ItemAdd) + /// + /// + /// C++: + /// imgui_internal.h:2441 + ///
ImGuiLastItemData LastItemData + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(8032)] + public ImGuiLastItemData LastItemData; + + /// + /// + /// Storage for SetNextWindow** functions + /// + /// + /// C++: + /// imgui_internal.h:2442 + ///
ImGuiNextWindowData NextWindowData + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(8112)] + public ImGuiNextWindowData NextWindowData; + + /// + /// + /// C++: + /// imgui_internal.h:2443 + ///
bool DebugShowGroupRects + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + [FieldOffset(8272)] + public Bool8 DebugShowGroupRects; + + /// + /// + /// (Keep close to ColorStack to share cache line) + /// + /// + /// C++: + /// imgui_internal.h:2446 + ///
ImGuiCol DebugFlashStyleColorIdx + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8276)] + public ImGuiCol DebugFlashStyleColorIdx; + + /// + /// + /// Stack for PushStyleColor()/PopStyleColor() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2447 + ///
ImVector<ImGuiColorMod> ColorStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8280)] + public ImVector ColorStack; + + /// + /// + /// Stack for PushStyleVar()/PopStyleVar() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2448 + ///
ImVector<ImGuiStyleMod> StyleVarStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8296)] + public ImVector StyleVarStack; + + /// + /// + /// Stack for PushFont()/PopFont() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2449 + ///
ImVector<ImFontStackData> FontStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8312)] + public ImVector FontStack; + + /// + /// + /// Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2450 + ///
ImVector<ImGuiFocusScopeData> FocusScopeStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8328)] + public ImVector FocusScopeStack; + + /// + /// + /// Stack for PushItemFlag()/PopItemFlag() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2451 + ///
ImVector<ImGuiItemFlags> ItemFlagsStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8344)] + public ImVector ItemFlagsStack; + + /// + /// + /// Stack for BeginGroup()/EndGroup() - not inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2452 + ///
ImVector<ImGuiGroupData> GroupStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8360)] + public ImVector GroupStack; + + /// + /// + /// Which popups are open (persistent) + /// + /// + /// C++: + /// imgui_internal.h:2453 + ///
ImVector<ImGuiPopupData> OpenPopupStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8376)] + public ImVector OpenPopupStack; + + /// + /// + /// Which level of BeginPopup() we are in (reset every frame) + /// + /// + /// C++: + /// imgui_internal.h:2454 + ///
ImVector<ImGuiPopupData> BeginPopupStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8392)] + public ImVector BeginPopupStack; + + /// + /// + /// Stack for TreeNode() + /// + /// + /// C++: + /// imgui_internal.h:2455 + ///
ImVector<ImGuiTreeNodeStackData>TreeNodeStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + [FieldOffset(8408)] + public ImVector TreeNodeStack; + + /// + /// + /// Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold + /// their copy of ImDrawData. + /// + /// + /// C++: + /// imgui_internal.h:2458 + ///
ImVector<ImGuiViewportP*> Viewports + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8424)] + public ImVector Viewports; + + /// + /// + /// We track changes of viewport (happening in Begin) so we can call Platform_OnChangedViewport() + /// + /// + /// C++: + /// imgui_internal.h:2459 + ///
ImGuiViewportP* CurrentViewport + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8440)] + public ImGuiViewportPPtr CurrentViewport; + + /// + /// + /// C++: + /// imgui_internal.h:2460 + ///
ImGuiViewportP* MouseViewport + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8448)] + public ImGuiViewportPPtr MouseViewport; + + /// + /// + /// Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + + /// honoring the _NoInputs flag. + /// + /// + /// C++: + /// imgui_internal.h:2461 + ///
ImGuiViewportP* MouseLastHoveredViewport + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8456)] + public ImGuiViewportPPtr MouseLastHoveredViewport; + + /// + /// + /// C++: + /// imgui_internal.h:2462 + ///
ImGuiID PlatformLastFocusedViewportId + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8464)] + public ImGuiID PlatformLastFocusedViewportId; + + /// + /// + /// Virtual monitor used as fallback if backend doesn't provide monitor information. + /// + /// + /// C++: + /// imgui_internal.h:2463 + ///
ImGuiPlatformMonitor FallbackMonitor + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8472)] + public ImGuiPlatformMonitor FallbackMonitor; + + /// + /// + /// Bounding box of all platform monitors + /// + /// + /// C++: + /// imgui_internal.h:2464 + ///
ImRect PlatformMonitorsFullWorkRect + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8520)] + public floatRect PlatformMonitorsFullWorkRect; + + /// + /// + /// Unique sequential creation counter (mostly for testing/debugging) + /// + /// + /// C++: + /// imgui_internal.h:2465 + ///
int ViewportCreatedCount + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8536)] + public int ViewportCreatedCount; + + /// + /// + /// Unique sequential creation counter (mostly for testing/debugging) + /// + /// + /// C++: + /// imgui_internal.h:2466 + ///
int PlatformWindowsCreatedCount + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8540)] + public int PlatformWindowsCreatedCount; + + /// + /// + /// Every time the front-most window changes, we stamp its viewport with an incrementing counter + /// + /// + /// C++: + /// imgui_internal.h:2467 + ///
int ViewportFocusedStampCount + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + [FieldOffset(8544)] + public int ViewportFocusedStampCount; + + /// + /// + /// Nav focus cursor/rectangle is visible? We hide it after a mouse click. We show it after a nav move. + /// + /// + /// C++: + /// imgui_internal.h:2470 + ///
bool NavCursorVisible + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8548)] + public Bool8 NavCursorVisible; + + /// + /// + /// Disable mouse hovering highlight. Highlight navigation focused item instead of mouse hovered item. + /// + /// + /// C++: + /// imgui_internal.h:2471 + ///
bool NavHighlightItemUnderNav + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8549)] + public Bool8 NavHighlightItemUnderNav; + + /// + /// + /// When set we will update mouse position if io.ConfigNavMoveSetMousePos is set (not enabled by default) + /// + /// + /// C++: + /// imgui_internal.h:2474 + ///
bool NavMousePosDirty + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8550)] + public Bool8 NavMousePosDirty; + + /// + /// + /// Nav widget has been seen this frame ~~ NavRectRel is valid + /// + /// + /// C++: + /// imgui_internal.h:2475 + ///
bool NavIdIsAlive + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8551)] + public Bool8 NavIdIsAlive; + + /// + /// + /// Focused item for navigation + /// + /// + /// C++: + /// imgui_internal.h:2476 + ///
ImGuiID NavId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8552)] + public ImGuiID NavId; + + /// + /// + /// Focused window for navigation. Could be called 'FocusedWindow' + /// + /// + /// C++: + /// imgui_internal.h:2477 + ///
ImGuiWindow* NavWindow + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8560)] + public ImGuiWindowPtr NavWindow; + + /// + /// + /// Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of + /// the same scope) + /// + /// + /// C++: + /// imgui_internal.h:2478 + ///
ImGuiID NavFocusScopeId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8568)] + public ImGuiID NavFocusScopeId; + + /// + /// + /// Focused layer (main scrolling layer, or menu/title bar layer) + /// + /// + /// C++: + /// imgui_internal.h:2479 + ///
ImGuiNavLayer NavLayer + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8572)] + public ImGuiNavLayer NavLayer; + + /// + /// + /// ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || + /// IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItemByID() + /// + /// + /// C++: + /// imgui_internal.h:2480 + ///
ImGuiID NavActivateId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8576)] + public ImGuiID NavActivateId; + + /// + /// + /// ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? + /// NavId : 0 + /// + /// + /// C++: + /// imgui_internal.h:2481 + ///
ImGuiID NavActivateDownId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8580)] + public ImGuiID NavActivateDownId; + + /// + /// + /// ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || + /// IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat) + /// + /// + /// C++: + /// imgui_internal.h:2482 + ///
ImGuiID NavActivatePressedId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8584)] + public ImGuiID NavActivatePressedId; + + /// + /// + /// C++: + /// imgui_internal.h:2483 + ///
ImGuiActivateFlags NavActivateFlags + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8588)] + public ImGuiActivateFlags NavActivateFlags; + + /// + /// + /// Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the + /// window->ParentWindowForFocusRoute chain. + /// + /// + /// C++: + /// imgui_internal.h:2484 + ///
ImVector<ImGuiFocusScopeData> NavFocusRoute + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8592)] + public ImVector NavFocusRoute; + + /// + /// + /// C++: + /// imgui_internal.h:2485 + ///
ImGuiID NavHighlightActivatedId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8608)] + public ImGuiID NavHighlightActivatedId; + + /// + /// + /// C++: + /// imgui_internal.h:2486 + ///
float NavHighlightActivatedTimer + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8612)] + public float NavHighlightActivatedTimer; + + /// + /// + /// Set by ActivateItemByID(), queued until next frame. + /// + /// + /// C++: + /// imgui_internal.h:2487 + ///
ImGuiID NavNextActivateId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8616)] + public ImGuiID NavNextActivateId; + + /// + /// + /// C++: + /// imgui_internal.h:2488 + ///
ImGuiActivateFlags NavNextActivateFlags + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8620)] + public ImGuiActivateFlags NavNextActivateFlags; + + /// + /// + /// Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse + /// + /// + /// C++: + /// imgui_internal.h:2489 + ///
ImGuiInputSource NavInputSource + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8624)] + public ImGuiInputSource NavInputSource; + + /// + /// + /// Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing + /// an item that doesn't have selection data. + /// + /// + /// C++: + /// imgui_internal.h:2490 + ///
ImGuiSelectionUserData NavLastValidSelectionUserData + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8632)] + public ulong NavLastValidSelectionUserData; + + /// + /// + /// C++: + /// imgui_internal.h:2491 + ///
ImS8 NavCursorHideFrames + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + [FieldOffset(8640)] + public sbyte NavCursorHideFrames; + + /// + /// + /// ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd() + /// + /// + /// C++: + /// imgui_internal.h:2495 + ///
bool NavAnyRequest + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8641)] + public Bool8 NavAnyRequest; + + /// + /// + /// Init request for appearing window to select first item + /// + /// + /// C++: + /// imgui_internal.h:2496 + ///
bool NavInitRequest + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8642)] + public Bool8 NavInitRequest; + + /// + /// + /// C++: + /// imgui_internal.h:2497 + ///
bool NavInitRequestFromMove + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8643)] + public Bool8 NavInitRequestFromMove; + + /// + /// + /// Init request result (first item of the window, or one for which SetItemDefaultFocus() was called) + /// + /// + /// C++: + /// imgui_internal.h:2498 + ///
ImGuiNavItemData NavInitResult + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8648)] + public ImGuiNavItemData NavInitResult; + + /// + /// + /// Move request submitted, will process result on next NewFrame() + /// + /// + /// C++: + /// imgui_internal.h:2499 + ///
bool NavMoveSubmitted + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8704)] + public Bool8 NavMoveSubmitted; + + /// + /// + /// Move request submitted, still scoring incoming items + /// + /// + /// C++: + /// imgui_internal.h:2500 + ///
bool NavMoveScoringItems + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8705)] + public Bool8 NavMoveScoringItems; + + /// + /// + /// C++: + /// imgui_internal.h:2501 + ///
bool NavMoveForwardToNextFrame + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8706)] + public Bool8 NavMoveForwardToNextFrame; + + /// + /// + /// C++: + /// imgui_internal.h:2502 + ///
ImGuiNavMoveFlags NavMoveFlags + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8708)] + public ImGuiNavMoveFlags NavMoveFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2503 + ///
ImGuiScrollFlags NavMoveScrollFlags + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8712)] + public ImGuiScrollFlags NavMoveScrollFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2504 + ///
ImGuiKeyChord NavMoveKeyMods + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8716)] + public ImGuiKeyChord NavMoveKeyMods; + + /// + /// + /// Direction of the move request (left/right/up/down) + /// + /// + /// C++: + /// imgui_internal.h:2505 + ///
ImGuiDir NavMoveDir + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8720)] + public ImGuiDir NavMoveDir; + + /// + /// + /// C++: + /// imgui_internal.h:2506 + ///
ImGuiDir NavMoveDirForDebug + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8724)] + public ImGuiDir NavMoveDirForDebug; + + /// + /// + /// FIXME-NAV: Describe the purpose of this better. Might want to rename? + /// + /// + /// C++: + /// imgui_internal.h:2507 + ///
ImGuiDir NavMoveClipDir + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8728)] + public ImGuiDir NavMoveClipDir; + + /// + /// + /// Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional + /// navigation scoring. + /// + /// + /// C++: + /// imgui_internal.h:2508 + ///
ImRect NavScoringRect + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8732)] + public floatRect NavScoringRect; + + /// + /// + /// Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep + /// submitted + /// + /// + /// C++: + /// imgui_internal.h:2509 + ///
ImRect NavScoringNoClipRect + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8748)] + public floatRect NavScoringNoClipRect; + + /// + /// + /// Metrics for debugging + /// + /// + /// C++: + /// imgui_internal.h:2510 + ///
int NavScoringDebugCount + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8764)] + public int NavScoringDebugCount; + + /// + /// + /// Generally -1 or +1, 0 when tabbing without a nav id + /// + /// + /// C++: + /// imgui_internal.h:2511 + ///
int NavTabbingDir + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8768)] + public int NavTabbingDir; + + /// + /// + /// >0 when counting items for tabbing + /// + /// + /// C++: + /// imgui_internal.h:2512 + ///
int NavTabbingCounter + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8772)] + public int NavTabbingCounter; + + /// + /// + /// Best move request candidate within NavWindow + /// + /// + /// C++: + /// imgui_internal.h:2513 + ///
ImGuiNavItemData NavMoveResultLocal + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8776)] + public ImGuiNavItemData NavMoveResultLocal; + + /// + /// + /// Best move request candidate within NavWindow that are mostly visible (when using + /// ImGuiNavMoveFlags_AlsoScoreVisibleSet flag) + /// + /// + /// C++: + /// imgui_internal.h:2514 + ///
ImGuiNavItemData NavMoveResultLocalVisible + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8832)] + public ImGuiNavItemData NavMoveResultLocalVisible; + + /// + /// + /// Best move request candidate within NavWindow's flattened hierarchy (when using + /// ImGuiWindowFlags_NavFlattened flag) + /// + /// + /// C++: + /// imgui_internal.h:2515 + ///
ImGuiNavItemData NavMoveResultOther + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8888)] + public ImGuiNavItemData NavMoveResultOther; + + /// + /// + /// First tabbing request candidate within NavWindow and flattened hierarchy + /// + /// + /// C++: + /// imgui_internal.h:2516 + ///
ImGuiNavItemData NavTabbingResultFirst + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + [FieldOffset(8944)] + public ImGuiNavItemData NavTabbingResultFirst; + + /// + /// + /// Just navigated from this focus scope id (result of a successfully MoveRequest). + /// + /// + /// C++: + /// imgui_internal.h:2519 + ///
ImGuiID NavJustMovedFromFocusScopeId + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + [FieldOffset(9000)] + public ImGuiID NavJustMovedFromFocusScopeId; + + /// + /// + /// Just navigated to this id (result of a successfully MoveRequest). + /// + /// + /// C++: + /// imgui_internal.h:2520 + ///
ImGuiID NavJustMovedToId + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + [FieldOffset(9004)] + public ImGuiID NavJustMovedToId; + + /// + /// + /// Just navigated to this focus scope id (result of a successfully MoveRequest). + /// + /// + /// C++: + /// imgui_internal.h:2521 + ///
ImGuiID NavJustMovedToFocusScopeId + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + [FieldOffset(9008)] + public ImGuiID NavJustMovedToFocusScopeId; + + /// + /// + /// C++: + /// imgui_internal.h:2522 + ///
ImGuiKeyChord NavJustMovedToKeyMods + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + [FieldOffset(9012)] + public ImGuiKeyChord NavJustMovedToKeyMods; + + /// + /// + /// Copy of ImGuiNavMoveFlags_IsTabbing. Maybe we should store whole flags. + /// + /// + /// C++: + /// imgui_internal.h:2523 + ///
bool NavJustMovedToIsTabbing + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + [FieldOffset(9016)] + public Bool8 NavJustMovedToIsTabbing; + + /// + /// + /// Copy of move result's ItemFlags & ImGuiItemFlags_HasSelectionUserData). Maybe we should just store + /// ImGuiNavItemData. + /// + /// + /// C++: + /// imgui_internal.h:2524 + ///
bool NavJustMovedToHasSelectionData + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + [FieldOffset(9017)] + public Bool8 NavJustMovedToHasSelectionData; + + /// + /// + /// = true. Enable CTRL+TAB by holding ImGuiKey_GamepadFaceLeft (== ImGuiKey_NavGamepadMenu). When false, + /// the button may still be used to toggle Menu layer. + /// + /// + /// C++: + /// imgui_internal.h:2527 + ///
bool ConfigNavWindowingWithGamepad + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9018)] + public Bool8 ConfigNavWindowingWithGamepad; + + /// + /// + /// = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). For reconfiguration (see + /// #4828) + /// + /// + /// C++: + /// imgui_internal.h:2528 + ///
ImGuiKeyChord ConfigNavWindowingKeyNext + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9020)] + public ImGuiKeyChord ConfigNavWindowingKeyNext; + + /// + /// + /// = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS + /// X) + /// + /// + /// C++: + /// imgui_internal.h:2529 + ///
ImGuiKeyChord ConfigNavWindowingKeyPrev + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9024)] + public ImGuiKeyChord ConfigNavWindowingKeyPrev; + + /// + /// + /// Target window when doing CTRL+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed + /// top-most! + /// + /// + /// C++: + /// imgui_internal.h:2530 + ///
ImGuiWindow* NavWindowingTarget + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9032)] + public ImGuiWindowPtr NavWindowingTarget; + + /// + /// + /// Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0f, so + /// the fade-out can stay on it. + /// + /// + /// C++: + /// imgui_internal.h:2531 + ///
ImGuiWindow* NavWindowingTargetAnim + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9040)] + public ImGuiWindowPtr NavWindowingTargetAnim; + + /// + /// + /// Internal window actually listing the CTRL+Tab contents + /// + /// + /// C++: + /// imgui_internal.h:2532 + ///
ImGuiWindow* NavWindowingListWindow + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9048)] + public ImGuiWindowPtr NavWindowingListWindow; + + /// + /// + /// C++: + /// imgui_internal.h:2533 + ///
float NavWindowingTimer + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9056)] + public float NavWindowingTimer; + + /// + /// + /// C++: + /// imgui_internal.h:2534 + ///
float NavWindowingHighlightAlpha + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9060)] + public float NavWindowingHighlightAlpha; + + /// + /// + /// C++: + /// imgui_internal.h:2535 + ///
ImGuiInputSource NavWindowingInputSource + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9064)] + public ImGuiInputSource NavWindowingInputSource; + + /// + /// + /// Set while Alt or GamepadMenu is held, may be cleared by other operations, and processed when releasing + /// the key. + /// + /// + /// C++: + /// imgui_internal.h:2536 + ///
bool NavWindowingToggleLayer + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9068)] + public Bool8 NavWindowingToggleLayer; + + /// + /// + /// Keyboard/gamepad key used when toggling to menu layer. + /// + /// + /// C++: + /// imgui_internal.h:2537 + ///
ImGuiKey NavWindowingToggleKey + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9072)] + public ImGuiKey NavWindowingToggleKey; + + /// + /// + /// C++: + /// imgui_internal.h:2538 + ///
ImVec2 NavWindowingAccumDeltaPos + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9076)] + public float2 NavWindowingAccumDeltaPos; + + /// + /// + /// C++: + /// imgui_internal.h:2539 + ///
ImVec2 NavWindowingAccumDeltaSize + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + [FieldOffset(9084)] + public float2 NavWindowingAccumDeltaSize; + + /// + /// + /// 0.0..1.0 animation when fading in a dimming background (for modal window and CTRL+TAB list) + /// + /// + /// C++: + /// imgui_internal.h:2542 + ///
float DimBgRatio + ///
+ ///
+ /// + /// + /// Render + /// + /// + [FieldOffset(9092)] + public float DimBgRatio; + + /// + /// + /// C++: + /// imgui_internal.h:2545 + ///
bool DragDropActive + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9096)] + public Bool8 DragDropActive; + + /// + /// + /// Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag source. + /// + /// + /// C++: + /// imgui_internal.h:2546 + ///
bool DragDropWithinSource + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9097)] + public Bool8 DragDropWithinSource; + + /// + /// + /// Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag target. + /// + /// + /// C++: + /// imgui_internal.h:2547 + ///
bool DragDropWithinTarget + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9098)] + public Bool8 DragDropWithinTarget; + + /// + /// + /// C++: + /// imgui_internal.h:2548 + ///
ImGuiDragDropFlags DragDropSourceFlags + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9100)] + public ImGuiDragDropFlags DragDropSourceFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2549 + ///
int DragDropSourceFrameCount + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9104)] + public int DragDropSourceFrameCount; + + /// + /// + /// C++: + /// imgui_internal.h:2550 + ///
int DragDropMouseButton + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9108)] + public int DragDropMouseButton; + + /// + /// + /// C++: + /// imgui_internal.h:2551 + ///
ImGuiPayload DragDropPayload + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9112)] + public ImGuiPayload DragDropPayload; + + /// + /// + /// Store rectangle of current target candidate (we favor small targets when overlapping) + /// + /// + /// C++: + /// imgui_internal.h:2552 + ///
ImRect DragDropTargetRect + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9176)] + public floatRect DragDropTargetRect; + + /// + /// + /// Store ClipRect at the time of item's drawing + /// + /// + /// C++: + /// imgui_internal.h:2553 + ///
ImRect DragDropTargetClipRect + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9192)] + public floatRect DragDropTargetClipRect; + + /// + /// + /// C++: + /// imgui_internal.h:2554 + ///
ImGuiID DragDropTargetId + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9208)] + public ImGuiID DragDropTargetId; + + /// + /// + /// C++: + /// imgui_internal.h:2555 + ///
ImGuiDragDropFlags DragDropAcceptFlags + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9212)] + public ImGuiDragDropFlags DragDropAcceptFlags; + + /// + /// + /// Target item surface (we resolve overlapping targets by prioritizing the smaller surface) + /// + /// + /// C++: + /// imgui_internal.h:2556 + ///
float DragDropAcceptIdCurrRectSurface + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9216)] + public float DragDropAcceptIdCurrRectSurface; + + /// + /// + /// Target item id (set at the time of accepting the payload) + /// + /// + /// C++: + /// imgui_internal.h:2557 + ///
ImGuiID DragDropAcceptIdCurr + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9220)] + public ImGuiID DragDropAcceptIdCurr; + + /// + /// + /// Target item id from previous frame (we need to store this to allow for overlapping drag and drop + /// targets) + /// + /// + /// C++: + /// imgui_internal.h:2558 + ///
ImGuiID DragDropAcceptIdPrev + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9224)] + public ImGuiID DragDropAcceptIdPrev; + + /// + /// + /// Last time a target expressed a desire to accept the source + /// + /// + /// C++: + /// imgui_internal.h:2559 + ///
int DragDropAcceptFrameCount + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9228)] + public int DragDropAcceptFrameCount; + + /// + /// + /// Set when holding a payload just made ButtonBehavior() return a press. + /// + /// + /// C++: + /// imgui_internal.h:2560 + ///
ImGuiID DragDropHoldJustPressedId + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9232)] + public ImGuiID DragDropHoldJustPressedId; + + /// + /// + /// We don't expose the ImVector<> directly, ImGuiPayload only holds pointer+size + /// + /// + /// C++: + /// imgui_internal.h:2561 + ///
ImVector<unsigned char> DragDropPayloadBufHeap + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + [FieldOffset(9240)] + public ImVector DragDropPayloadBufHeap; + + /// + /// Local buffer for small payloads + /// + [FieldOffset(9256)] + public fixed byte DragDropPayloadBufLocal[16]; + + /// + /// + /// C++: + /// imgui_internal.h:2565 + ///
int ClipperTempDataStacked + ///
+ ///
+ /// + /// + /// Clipper + /// + /// + [FieldOffset(9272)] + public int ClipperTempDataStacked; + + /// + /// + /// C++: + /// imgui_internal.h:2566 + ///
ImVector<ImGuiListClipperData> ClipperTempData + ///
+ ///
+ /// + /// + /// Clipper + /// + /// + [FieldOffset(9280)] + public ImVector ClipperTempData; + + /// + /// + /// C++: + /// imgui_internal.h:2569 + ///
ImGuiTable* CurrentTable + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9296)] + public ImGuiTablePtr CurrentTable; + + /// + /// + /// Set to break in BeginTable() call. + /// + /// + /// C++: + /// imgui_internal.h:2570 + ///
ImGuiID DebugBreakInTable + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9304)] + public ImGuiID DebugBreakInTable; + + /// + /// + /// Temporary table data size (because we leave previous instances undestructed, we generally don't use + /// TablesTempData.Size) + /// + /// + /// C++: + /// imgui_internal.h:2571 + ///
int TablesTempDataStacked + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9308)] + public int TablesTempDataStacked; + + /// + /// + /// Temporary table data (buffers reused/shared across instances, support nesting) + /// + /// + /// C++: + /// imgui_internal.h:2572 + ///
ImVector<ImGuiTableTempData> TablesTempData + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9312)] + public ImVector TablesTempData; + + /// + /// + /// Persistent table data + /// + /// + /// C++: + /// imgui_internal.h:2573 + ///
ImPool<ImGuiTable> Tables + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9328)] + public ImPool Tables; + + /// + /// + /// Last used timestamp of each tables (SOA, for efficient GC) + /// + /// + /// C++: + /// imgui_internal.h:2574 + ///
ImVector<float> TablesLastTimeActive + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9368)] + public ImVector TablesLastTimeActive; + + /// + /// + /// C++: + /// imgui_internal.h:2575 + ///
ImVector<ImDrawChannel> DrawChannelsTempMergeBuffer + ///
+ ///
+ /// + /// + /// Tables + /// + /// + [FieldOffset(9384)] + public ImVector DrawChannelsTempMergeBuffer; + + /// + /// + /// C++: + /// imgui_internal.h:2578 + ///
ImGuiTabBar* CurrentTabBar + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + [FieldOffset(9400)] + public ImGuiTabBarPtr CurrentTabBar; + + /// + /// + /// C++: + /// imgui_internal.h:2579 + ///
ImPool<ImGuiTabBar> TabBars + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + [FieldOffset(9408)] + public ImPool TabBars; + + /// + /// + /// C++: + /// imgui_internal.h:2580 + ///
ImVector<ImGuiPtrOrIndex> CurrentTabBarStack + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + [FieldOffset(9448)] + public ImVector CurrentTabBarStack; + + /// + /// + /// C++: + /// imgui_internal.h:2581 + ///
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + [FieldOffset(9464)] + public ImVector ShrinkWidthBuffer; + + /// + /// + /// C++: + /// imgui_internal.h:2584 + ///
ImGuiBoxSelectState BoxSelectState + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + [FieldOffset(9480)] + public ImGuiBoxSelectState BoxSelectState; + + /// + /// + /// C++: + /// imgui_internal.h:2585 + ///
ImGuiMultiSelectTempData* CurrentMultiSelect + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + [FieldOffset(9584)] + public ImGuiMultiSelectTempDataPtr CurrentMultiSelect; + + /// + /// + /// Temporary multi-select data size (because we leave previous instances undestructed, we generally don't + /// use MultiSelectTempData.Size) + /// + /// + /// C++: + /// imgui_internal.h:2586 + ///
int MultiSelectTempDataStacked + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + [FieldOffset(9592)] + public int MultiSelectTempDataStacked; + + /// + /// + /// C++: + /// imgui_internal.h:2587 + ///
ImVector<ImGuiMultiSelectTempData> MultiSelectTempData + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + [FieldOffset(9600)] + public ImVector MultiSelectTempData; + + /// + /// + /// C++: + /// imgui_internal.h:2588 + ///
ImPool<ImGuiMultiSelectState> MultiSelectStorage + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + [FieldOffset(9616)] + public ImPool MultiSelectStorage; + + /// + /// + /// C++: + /// imgui_internal.h:2591 + ///
ImGuiID HoverItemDelayId + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + [FieldOffset(9656)] + public ImGuiID HoverItemDelayId; + + /// + /// + /// C++: + /// imgui_internal.h:2592 + ///
ImGuiID HoverItemDelayIdPreviousFrame + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + [FieldOffset(9660)] + public ImGuiID HoverItemDelayIdPreviousFrame; + + /// + /// + /// Currently used by IsItemHovered() + /// + /// + /// C++: + /// imgui_internal.h:2593 + ///
float HoverItemDelayTimer + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + [FieldOffset(9664)] + public float HoverItemDelayTimer; + + /// + /// + /// Currently used by IsItemHovered(): grace time before g.TooltipHoverTimer gets cleared. + /// + /// + /// C++: + /// imgui_internal.h:2594 + ///
float HoverItemDelayClearTimer + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + [FieldOffset(9668)] + public float HoverItemDelayClearTimer; + + /// + /// + /// Mouse has once been stationary on this item. Only reset after departing the item. + /// + /// + /// C++: + /// imgui_internal.h:2595 + ///
ImGuiID HoverItemUnlockedStationaryId + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + [FieldOffset(9672)] + public ImGuiID HoverItemUnlockedStationaryId; + + /// + /// + /// Mouse has once been stationary on this window. Only reset after departing the window. + /// + /// + /// C++: + /// imgui_internal.h:2596 + ///
ImGuiID HoverWindowUnlockedStationaryId + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + [FieldOffset(9676)] + public ImGuiID HoverWindowUnlockedStationaryId; + + /// + /// + /// C++: + /// imgui_internal.h:2599 + ///
ImGuiMouseCursor MouseCursor + ///
+ ///
+ /// + /// + /// Mouse state + /// + /// + [FieldOffset(9680)] + public ImGuiMouseCursor MouseCursor; + + /// + /// + /// Time the mouse has been stationary (with some loose heuristic) + /// + /// + /// C++: + /// imgui_internal.h:2600 + ///
float MouseStationaryTimer + ///
+ ///
+ /// + /// + /// Mouse state + /// + /// + [FieldOffset(9684)] + public float MouseStationaryTimer; + + /// + /// + /// C++: + /// imgui_internal.h:2601 + ///
ImVec2 MouseLastValidPos + ///
+ ///
+ /// + /// + /// Mouse state + /// + /// + [FieldOffset(9688)] + public float2 MouseLastValidPos; + + /// + /// + /// C++: + /// imgui_internal.h:2604 + ///
ImGuiInputTextState InputTextState + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9696)] + public ImGuiInputTextState InputTextState; + + /// + /// + /// C++: + /// imgui_internal.h:2605 + ///
ImGuiInputTextDeactivatedState InputTextDeactivatedState + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9816)] + public ImGuiInputTextDeactivatedState InputTextDeactivatedState; + + /// + /// + /// C++: + /// imgui_internal.h:2606 + ///
ImFontBaked InputTextPasswordFontBackupBaked + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9840)] + public ImFontBaked InputTextPasswordFontBackupBaked; + + /// + /// + /// C++: + /// imgui_internal.h:2607 + ///
ImFontFlags InputTextPasswordFontBackupFlags + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9944)] + public ImFontFlags InputTextPasswordFontBackupFlags; + + /// + /// + /// Temporary text input when CTRL+clicking on a slider, etc. + /// + /// + /// C++: + /// imgui_internal.h:2608 + ///
ImGuiID TempInputId + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9948)] + public ImGuiID TempInputId; + + /// + /// + /// 0 for all data types + /// + /// + /// C++: + /// imgui_internal.h:2609 + ///
ImGuiDataTypeStorage DataTypeZeroValue + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9952)] + public ImGuiDataTypeStorage DataTypeZeroValue; + + /// + /// + /// C++: + /// imgui_internal.h:2610 + ///
int BeginMenuDepth + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9960)] + public int BeginMenuDepth; + + /// + /// + /// C++: + /// imgui_internal.h:2611 + ///
int BeginComboDepth + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9964)] + public int BeginComboDepth; + + /// + /// + /// Store user options for color edit widgets + /// + /// + /// C++: + /// imgui_internal.h:2612 + ///
ImGuiColorEditFlags ColorEditOptions + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9968)] + public ImGuiColorEditFlags ColorEditOptions; + + /// + /// + /// Set temporarily while inside of the parent-most ColorEdit4/ColorPicker4 (because they call each others). + /// + /// + /// C++: + /// imgui_internal.h:2613 + ///
ImGuiID ColorEditCurrentID + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9972)] + public ImGuiID ColorEditCurrentID; + + /// + /// + /// ID we are saving/restoring HS for + /// + /// + /// C++: + /// imgui_internal.h:2614 + ///
ImGuiID ColorEditSavedID + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9976)] + public ImGuiID ColorEditSavedID; + + /// + /// + /// Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips + /// + /// + /// C++: + /// imgui_internal.h:2615 + ///
float ColorEditSavedHue + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9980)] + public float ColorEditSavedHue; + + /// + /// + /// Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV + /// round trips + /// + /// + /// C++: + /// imgui_internal.h:2616 + ///
float ColorEditSavedSat + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9984)] + public float ColorEditSavedSat; + + /// + /// + /// RGB value with alpha set to 0. + /// + /// + /// C++: + /// imgui_internal.h:2617 + ///
ImU32 ColorEditSavedColor + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9988)] + public uint ColorEditSavedColor; + + /// + /// + /// Initial/reference color at the time of opening the color picker. + /// + /// + /// C++: + /// imgui_internal.h:2618 + ///
ImVec4 ColorPickerRef + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(9992)] + public float4 ColorPickerRef; + + /// + /// + /// C++: + /// imgui_internal.h:2619 + ///
ImGuiComboPreviewData ComboPreviewData + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10008)] + public ImGuiComboPreviewData ComboPreviewData; + + /// + /// + /// Expected border rect, switch to relative edit if moving + /// + /// + /// C++: + /// imgui_internal.h:2620 + ///
ImRect WindowResizeBorderExpectedRect + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10056)] + public floatRect WindowResizeBorderExpectedRect; + + /// + /// + /// C++: + /// imgui_internal.h:2621 + ///
bool WindowResizeRelativeMode + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10072)] + public Bool8 WindowResizeRelativeMode; + + /// + /// + /// 0: scroll to clicked location, -1/+1: prev/next page. + /// + /// + /// C++: + /// imgui_internal.h:2622 + ///
short ScrollbarSeekMode + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10074)] + public short ScrollbarSeekMode; + + /// + /// + /// When scrolling to mouse location: distance between mouse and center of grab box, normalized in parent + /// space. + /// + /// + /// C++: + /// imgui_internal.h:2623 + ///
float ScrollbarClickDeltaToGrabCenter + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10076)] + public float ScrollbarClickDeltaToGrabCenter; + + /// + /// + /// C++: + /// imgui_internal.h:2624 + ///
float SliderGrabClickOffset + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10080)] + public float SliderGrabClickOffset; + + /// + /// + /// Accumulated slider delta when using navigation controls. + /// + /// + /// C++: + /// imgui_internal.h:2625 + ///
float SliderCurrentAccum + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10084)] + public float SliderCurrentAccum; + + /// + /// + /// Has the accumulated slider delta changed since last time we tried to apply it? + /// + /// + /// C++: + /// imgui_internal.h:2626 + ///
bool SliderCurrentAccumDirty + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10088)] + public Bool8 SliderCurrentAccumDirty; + + /// + /// + /// C++: + /// imgui_internal.h:2627 + ///
bool DragCurrentAccumDirty + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10089)] + public Bool8 DragCurrentAccumDirty; + + /// + /// + /// Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings + /// + /// + /// C++: + /// imgui_internal.h:2628 + ///
float DragCurrentAccum + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10092)] + public float DragCurrentAccum; + + /// + /// + /// If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio + /// + /// + /// C++: + /// imgui_internal.h:2629 + ///
float DragSpeedDefaultRatio + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10096)] + public float DragSpeedDefaultRatio; + + /// + /// + /// Backup for style.Alpha for BeginDisabled() + /// + /// + /// C++: + /// imgui_internal.h:2630 + ///
float DisabledAlphaBackup + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10100)] + public float DisabledAlphaBackup; + + /// + /// + /// C++: + /// imgui_internal.h:2631 + ///
short DisabledStackSize + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10104)] + public short DisabledStackSize; + + /// + /// + /// C++: + /// imgui_internal.h:2632 + ///
short TooltipOverrideCount + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10106)] + public short TooltipOverrideCount; + + /// + /// + /// Window of last tooltip submitted during the frame + /// + /// + /// C++: + /// imgui_internal.h:2633 + ///
ImGuiWindow* TooltipPreviousWindow + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10112)] + public ImGuiWindowPtr TooltipPreviousWindow; + + /// + /// + /// If no custom clipboard handler is defined + /// + /// + /// C++: + /// imgui_internal.h:2634 + ///
ImVector<char> ClipboardHandlerData + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10120)] + public ImVector ClipboardHandlerData; + + /// + /// + /// A list of menu IDs that were rendered at least once + /// + /// + /// C++: + /// imgui_internal.h:2635 + ///
ImVector<ImGuiID> MenusIdSubmittedThisFrame + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10136)] + public ImVector MenusIdSubmittedThisFrame; + + /// + /// + /// State for GetTypingSelectRequest() + /// + /// + /// C++: + /// imgui_internal.h:2636 + ///
ImGuiTypingSelectState TypingSelectState + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + [FieldOffset(10152)] + public ImGuiTypingSelectState TypingSelectState; + + /// + /// + /// Data updated by current frame. Will be applied at end of the frame. For some backends, this is required + /// to have WantVisible=true in order to receive text message. + /// + /// + /// C++: + /// imgui_internal.h:2639 + ///
ImGuiPlatformImeData PlatformImeData + ///
+ ///
+ /// + /// + /// Platform support + /// + /// + [FieldOffset(10256)] + public ImGuiPlatformImeData PlatformImeData; + + /// + /// + /// Previous frame data. When changed we call the platform_io.Platform_SetImeDataFn() handler. + /// + /// + /// C++: + /// imgui_internal.h:2640 + ///
ImGuiPlatformImeData PlatformImeDataPrev + ///
+ ///
+ /// + /// + /// Platform support + /// + /// + [FieldOffset(10276)] + public ImGuiPlatformImeData PlatformImeDataPrev; + + /// + /// + /// List of textures created/managed by user or third-party extension. Automatically appended into + /// platform_io.Textures[]. + /// + /// + /// C++: + /// imgui_internal.h:2644 + ///
ImVector<ImTextureData*> UserTextures + ///
+ ///
+ /// + /// + /// Extensions + /// FIXME: We could provide an API to register one slot in an array held in ImGuiContext? + /// + /// + [FieldOffset(10296)] + public ImVector UserTextures; + + /// + /// + /// C++: + /// imgui_internal.h:2645 + ///
ImGuiDockContext DockContext + ///
+ ///
+ /// + /// + /// Extensions + /// FIXME: We could provide an API to register one slot in an array held in ImGuiContext? + /// + /// + [FieldOffset(10312)] + public ImGuiDockContext DockContext; + + /// + /// + /// C++: + /// imgui_internal.h:2646 + ///
+ /// void (*DockNodeWindowMenuHandler)(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Extensions + /// FIXME: We could provide an API to register one slot in an array held in ImGuiContext? + /// + /// + [FieldOffset(10368)] + public nint DockNodeWindowMenuHandler; + + /// + /// + /// C++: + /// imgui_internal.h:2649 + ///
bool SettingsLoaded + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10376)] + public Bool8 SettingsLoaded; + + /// + /// + /// Save .ini Settings to memory when time reaches zero + /// + /// + /// C++: + /// imgui_internal.h:2650 + ///
float SettingsDirtyTimer + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10380)] + public float SettingsDirtyTimer; + + /// + /// + /// In memory .ini settings + /// + /// + /// C++: + /// imgui_internal.h:2651 + ///
ImGuiTextBuffer SettingsIniData + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10384)] + public ImGuiTextBuffer SettingsIniData; + + /// + /// + /// List of .ini settings handlers + /// + /// + /// C++: + /// imgui_internal.h:2652 + ///
ImVector<ImGuiSettingsHandler> SettingsHandlers + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10400)] + public ImVector SettingsHandlers; + + /// + /// + /// ImGuiWindow .ini settings entries + /// + /// + /// C++: + /// imgui_internal.h:2653 + ///
ImChunkStream<ImGuiWindowSettings> SettingsWindows + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10416)] + public ImChunkStream SettingsWindows; + + /// + /// + /// ImGuiTable .ini settings entries + /// + /// + /// C++: + /// imgui_internal.h:2654 + ///
ImChunkStream<ImGuiTableSettings> SettingsTables + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10432)] + public ImChunkStream SettingsTables; + + /// + /// + /// Hooks for extensions (e.g. test engine) + /// + /// + /// C++: + /// imgui_internal.h:2655 + ///
ImVector<ImGuiContextHook> Hooks + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10448)] + public ImVector Hooks; + + /// + /// + /// Next available HookId + /// + /// + /// C++: + /// imgui_internal.h:2656 + ///
ImGuiID HookIdNext + ///
+ ///
+ /// + /// + /// Settings + /// + /// + [FieldOffset(10464)] + public ImGuiID HookIdNext; + + /// + /// + /// C++: + /// imgui_internal.h:2659 + ///
const char* LocalizationTable[ImGuiLocKey_COUNT] + ///
+ ///
+ /// + /// + /// Localization + /// + /// + [FieldOffset(10472)] + public Ptr_byte__13 LocalizationTable; + + /// + /// + /// Currently capturing + /// + /// + /// C++: + /// imgui_internal.h:2662 + ///
bool LogEnabled + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10576)] + public Bool8 LogEnabled; + + /// + /// + /// Capture flags/type + /// + /// + /// C++: + /// imgui_internal.h:2663 + ///
ImGuiLogFlags LogFlags + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10580)] + public ImGuiLogFlags LogFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2664 + ///
ImGuiWindow* LogWindow + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10584)] + public ImGuiWindowPtr LogWindow; + + /// + /// + /// If != NULL log to stdout/ file + /// + /// + /// C++: + /// imgui_internal.h:2665 + ///
ImFileHandle LogFile + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10592)] + public ImFileHandle LogFile; + + /// + /// + /// Accumulation buffer when log to clipboard. This is pointer so our GImGui static constructor doesn't call + /// heap allocators. + /// + /// + /// C++: + /// imgui_internal.h:2666 + ///
ImGuiTextBuffer LogBuffer + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10600)] + public ImGuiTextBuffer LogBuffer; + + /// + /// + /// C++: + /// imgui_internal.h:2667 + ///
const char* LogNextPrefix + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10616)] + public Ptr LogNextPrefix; + + /// + /// + /// C++: + /// imgui_internal.h:2668 + ///
const char* LogNextSuffix + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10624)] + public Ptr LogNextSuffix; + + /// + /// + /// C++: + /// imgui_internal.h:2669 + ///
float LogLinePosY + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10632)] + public float LogLinePosY; + + /// + /// + /// C++: + /// imgui_internal.h:2670 + ///
bool LogLineFirstItem + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10636)] + public Bool8 LogLineFirstItem; + + /// + /// + /// C++: + /// imgui_internal.h:2671 + ///
int LogDepthRef + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10640)] + public int LogDepthRef; + + /// + /// + /// C++: + /// imgui_internal.h:2672 + ///
int LogDepthToExpand + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10644)] + public int LogDepthToExpand; + + /// + /// + /// Default/stored value for LogDepthMaxExpand if not specified in the LogXXX function call. + /// + /// + /// C++: + /// imgui_internal.h:2673 + ///
int LogDepthToExpandDefault + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + [FieldOffset(10648)] + public int LogDepthToExpandDefault; + + /// + /// + /// = NULL. May be exposed in public API eventually. + /// + /// + /// C++: + /// imgui_internal.h:2676 + ///
ImGuiErrorCallback ErrorCallback + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10656)] + public nint ErrorCallback; + + /// + /// + /// = NULL + /// + /// + /// C++: + /// imgui_internal.h:2677 + ///
void* ErrorCallbackUserData + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10664)] + public nint ErrorCallbackUserData; + + /// + /// + /// C++: + /// imgui_internal.h:2678 + ///
ImVec2 ErrorTooltipLockedPos + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10672)] + public float2 ErrorTooltipLockedPos; + + /// + /// + /// C++: + /// imgui_internal.h:2679 + ///
bool ErrorFirst + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10680)] + public Bool8 ErrorFirst; + + /// + /// + /// [Internal] Number of errors submitted this frame. + /// + /// + /// C++: + /// imgui_internal.h:2680 + ///
int ErrorCountCurrentFrame + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10684)] + public int ErrorCountCurrentFrame; + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui_internal.h:2681 + ///
ImGuiErrorRecoveryState StackSizesInNewFrame + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10688)] + public ImGuiErrorRecoveryState StackSizesInNewFrame; + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui_internal.h:2682 + ///
ImGuiErrorRecoveryState*StackSizesInBeginForCurrentWindow + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + [FieldOffset(10712)] + public ImGuiErrorRecoveryStatePtr StackSizesInBeginForCurrentWindow; + + /// + /// + /// Locked count (preserved when holding CTRL) + /// + /// + /// C++: + /// imgui_internal.h:2686 + ///
int DebugDrawIdConflictsCount + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10720)] + public int DebugDrawIdConflictsCount; + + /// + /// + /// C++: + /// imgui_internal.h:2687 + ///
ImGuiDebugLogFlags DebugLogFlags + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10724)] + public ImGuiDebugLogFlags DebugLogFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2688 + ///
ImGuiTextBuffer DebugLogBuf + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10728)] + public ImGuiTextBuffer DebugLogBuf; + + /// + /// + /// C++: + /// imgui_internal.h:2689 + ///
ImGuiTextIndex DebugLogIndex + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10744)] + public ImGuiTextIndex DebugLogIndex; + + /// + /// + /// C++: + /// imgui_internal.h:2690 + ///
int DebugLogSkippedErrors + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10768)] + public int DebugLogSkippedErrors; + + /// + /// + /// C++: + /// imgui_internal.h:2691 + ///
ImGuiDebugLogFlags DebugLogAutoDisableFlags + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10772)] + public ImGuiDebugLogFlags DebugLogAutoDisableFlags; + + /// + /// + /// C++: + /// imgui_internal.h:2692 + ///
ImU8 DebugLogAutoDisableFrames + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10776)] + public byte DebugLogAutoDisableFrames; + + /// + /// + /// For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot + /// above. + /// + /// + /// C++: + /// imgui_internal.h:2693 + ///
ImU8 DebugLocateFrames + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10777)] + public byte DebugLocateFrames; + + /// + /// + /// Debug break in ItemAdd() call for g.DebugLocateId. + /// + /// + /// C++: + /// imgui_internal.h:2694 + ///
bool DebugBreakInLocateId + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10778)] + public Bool8 DebugBreakInLocateId; + + /// + /// + /// = ImGuiKey_Pause + /// + /// + /// C++: + /// imgui_internal.h:2695 + ///
ImGuiKeyChord DebugBreakKeyChord + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10780)] + public ImGuiKeyChord DebugBreakKeyChord; + + /// + /// + /// Cycle between 0..9 then wrap around. + /// + /// + /// C++: + /// imgui_internal.h:2696 + ///
ImS8 DebugBeginReturnValueCullDepth + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10784)] + public sbyte DebugBeginReturnValueCullDepth; + + /// + /// + /// Item picker is active (started with DebugStartItemPicker()) + /// + /// + /// C++: + /// imgui_internal.h:2697 + ///
bool DebugItemPickerActive + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10785)] + public Bool8 DebugItemPickerActive; + + /// + /// + /// C++: + /// imgui_internal.h:2698 + ///
ImU8 DebugItemPickerMouseButton + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10786)] + public byte DebugItemPickerMouseButton; + + /// + /// + /// Will call IM_DEBUG_BREAK() when encountering this ID + /// + /// + /// C++: + /// imgui_internal.h:2699 + ///
ImGuiID DebugItemPickerBreakId + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10788)] + public ImGuiID DebugItemPickerBreakId; + + /// + /// + /// C++: + /// imgui_internal.h:2700 + ///
float DebugFlashStyleColorTime + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10792)] + public float DebugFlashStyleColorTime; + + /// + /// + /// C++: + /// imgui_internal.h:2701 + ///
ImVec4 DebugFlashStyleColorBackup + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10796)] + public float4 DebugFlashStyleColorBackup; + + /// + /// + /// C++: + /// imgui_internal.h:2702 + ///
ImGuiMetricsConfig DebugMetricsConfig + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10812)] + public ImGuiMetricsConfig DebugMetricsConfig; + + /// + /// + /// C++: + /// imgui_internal.h:2703 + ///
ImGuiIDStackTool DebugIDStackTool + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10848)] + public ImGuiIDStackTool DebugIDStackTool; + + /// + /// + /// C++: + /// imgui_internal.h:2704 + ///
ImGuiDebugAllocInfo DebugAllocInfo + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10904)] + public ImGuiDebugAllocInfo DebugAllocInfo; + + /// + /// + /// Hovered dock node. + /// + /// + /// C++: + /// imgui_internal.h:2705 + ///
ImGuiDockNode* DebugHoveredDockNode + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + [FieldOffset(10968)] + public ImGuiDockNodePtr DebugHoveredDockNode; + + /// + /// Calculate estimate of framerate for user over the last 60 frames.. + /// + [FieldOffset(10976)] + public fixed float FramerateSecPerFrame[60]; + + /// + /// + /// C++: + /// imgui_internal.h:2713 + ///
int FramerateSecPerFrameIdx + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11216)] + public int FramerateSecPerFrameIdx; + + /// + /// + /// C++: + /// imgui_internal.h:2714 + ///
int FramerateSecPerFrameCount + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11220)] + public int FramerateSecPerFrameCount; + + /// + /// + /// C++: + /// imgui_internal.h:2715 + ///
float FramerateSecPerFrameAccum + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11224)] + public float FramerateSecPerFrameAccum; + + /// + /// + /// Explicit capture override via SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard(). Default + /// to -1. + /// + /// + /// C++: + /// imgui_internal.h:2716 + ///
int WantCaptureMouseNextFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11228)] + public int WantCaptureMouseNextFrame; + + /// + /// + /// " + /// + /// + /// C++: + /// imgui_internal.h:2717 + ///
int WantCaptureKeyboardNextFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11232)] + public int WantCaptureKeyboardNextFrame; + + /// + /// + /// Copied in EndFrame() from g.PlatformImeData.WantTextInput. Needs to be set for some backends (SDL3) to + /// emit character inputs. + /// + /// + /// C++: + /// imgui_internal.h:2718 + ///
int WantTextInputNextFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11236)] + public int WantTextInputNextFrame; + + /// + /// + /// Temporary text buffer + /// + /// + /// C++: + /// imgui_internal.h:2719 + ///
ImVector<char> TempBuffer + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(11240)] + public ImVector TempBuffer; + + [FieldOffset(11256)] + public fixed byte TempKeychordName[64]; + } + + /// + /// + /// Dear ImGui context (opaque structure, unless including imgui_internal.h) + /// + /// + /// C++: + /// imgui.h:195 + ///
struct ImGuiContext + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiContextPtr(ImGuiContext* ptr) : INullable + { + private ImGuiContext* _ptr = ptr; + public ImGuiContext* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiContextPtr(ImGuiContext* ptr) => new(ptr); + + public static implicit operator ImGuiContext*(ImGuiContextPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui_internal.h:2334 + ///
bool Initialized + ///
+ ///
+ public ref bool Initialized => ref Unsafe.AsRef(&_ptr->Initialized); + + /// + /// + /// C++: + /// imgui_internal.h:2335 + ///
ImGuiIO IO + ///
+ ///
+ public ref ImGuiIO IO => ref Unsafe.AsRef(&_ptr->IO); + + /// + /// + /// C++: + /// imgui_internal.h:2336 + ///
ImGuiPlatformIO PlatformIO + ///
+ ///
+ public ref ImGuiPlatformIO PlatformIO => ref Unsafe.AsRef(&_ptr->PlatformIO); + + /// + /// + /// C++: + /// imgui_internal.h:2337 + ///
ImGuiStyle Style + ///
+ ///
+ public ref ImGuiStyle Style => ref Unsafe.AsRef(&_ptr->Style); + + /// + /// + /// = g.IO.ConfigFlags at the time of NewFrame() + /// + /// + /// C++: + /// imgui_internal.h:2338 + ///
ImGuiConfigFlags ConfigFlagsCurrFrame + ///
+ ///
+ public ref ImGuiConfigFlags ConfigFlagsCurrFrame => + ref Unsafe.AsRef(&_ptr->ConfigFlagsCurrFrame); + + /// + /// + /// C++: + /// imgui_internal.h:2339 + ///
ImGuiConfigFlags ConfigFlagsLastFrame + ///
+ ///
+ public ref ImGuiConfigFlags ConfigFlagsLastFrame => + ref Unsafe.AsRef(&_ptr->ConfigFlagsLastFrame); + + /// + /// + /// List of font atlases used by the context (generally only contains g.IO.Fonts aka the main font atlas) + /// + /// + /// C++: + /// imgui_internal.h:2340 + ///
ImVector<ImFontAtlas*> FontAtlases + ///
+ ///
+ public ref ImVector FontAtlases => + ref Unsafe.AsRef>(&_ptr->FontAtlases); + + /// + /// + /// Currently bound font. (== FontStack.back().Font) + /// + /// + /// C++: + /// imgui_internal.h:2341 + ///
ImFont* Font + ///
+ ///
+ public ref ImFontPtr Font => ref Unsafe.AsRef(&_ptr->Font); + + /// + /// + /// Currently bound font at currently bound size. (== Font->GetFontBaked(FontSize)) + /// + /// + /// C++: + /// imgui_internal.h:2342 + ///
ImFontBaked* FontBaked + ///
+ ///
+ public ref ImFontBakedPtr FontBaked => ref Unsafe.AsRef(&_ptr->FontBaked); + + /// + /// + /// Currently bound font size == line height (== FontSizeBase + externals scales applied in the + /// UpdateCurrentFontSize() function). + /// + /// + /// C++: + /// imgui_internal.h:2343 + ///
float FontSize + ///
+ ///
+ public ref float FontSize => ref Unsafe.AsRef(&_ptr->FontSize); + + /// + /// + /// Font size before scaling == style.FontSizeBase == value passed to PushFont() when specified. + /// + /// + /// C++: + /// imgui_internal.h:2344 + ///
float FontSizeBase + ///
+ ///
+ public ref float FontSizeBase => ref Unsafe.AsRef(&_ptr->FontSizeBase); + + /// + /// + /// == FontBaked->Size / FontSize. Scale factor over baked size. Rarely used nowadays, very often == + /// 1.0f. + /// + /// + /// C++: + /// imgui_internal.h:2345 + ///
float FontBakedScale + ///
+ ///
+ public ref float FontBakedScale => ref Unsafe.AsRef(&_ptr->FontBakedScale); + + /// + /// + /// Current font density. Used by all calls to GetFontBaked(). + /// + /// + /// C++: + /// imgui_internal.h:2346 + ///
float FontRasterizerDensity + ///
+ ///
+ public ref float FontRasterizerDensity => ref Unsafe.AsRef(&_ptr->FontRasterizerDensity); + + /// + /// + /// Current window/viewport DpiScale == CurrentViewport->DpiScale + /// + /// + /// C++: + /// imgui_internal.h:2347 + ///
float CurrentDpiScale + ///
+ ///
+ public ref float CurrentDpiScale => ref Unsafe.AsRef(&_ptr->CurrentDpiScale); + + /// + /// + /// C++: + /// imgui_internal.h:2348 + ///
ImDrawListSharedData DrawListSharedData + ///
+ ///
+ public ref ImDrawListSharedData DrawListSharedData => + ref Unsafe.AsRef(&_ptr->DrawListSharedData); + + /// + /// + /// C++: + /// imgui_internal.h:2349 + ///
double Time + ///
+ ///
+ public ref double Time => ref Unsafe.AsRef(&_ptr->Time); + + /// + /// + /// C++: + /// imgui_internal.h:2350 + ///
int FrameCount + ///
+ ///
+ public ref int FrameCount => ref Unsafe.AsRef(&_ptr->FrameCount); + + /// + /// + /// C++: + /// imgui_internal.h:2351 + ///
int FrameCountEnded + ///
+ ///
+ public ref int FrameCountEnded => ref Unsafe.AsRef(&_ptr->FrameCountEnded); + + /// + /// + /// C++: + /// imgui_internal.h:2352 + ///
int FrameCountPlatformEnded + ///
+ ///
+ public ref int FrameCountPlatformEnded => ref Unsafe.AsRef(&_ptr->FrameCountPlatformEnded); + + /// + /// + /// C++: + /// imgui_internal.h:2353 + ///
int FrameCountRendered + ///
+ ///
+ public ref int FrameCountRendered => ref Unsafe.AsRef(&_ptr->FrameCountRendered); + + /// + /// + /// Set within EndChild() + /// + /// + /// C++: + /// imgui_internal.h:2354 + ///
ImGuiID WithinEndChildID + ///
+ ///
+ public ref ImGuiID WithinEndChildID => ref Unsafe.AsRef(&_ptr->WithinEndChildID); + + /// + /// + /// Set by NewFrame(), cleared by EndFrame() + /// + /// + /// C++: + /// imgui_internal.h:2355 + ///
bool WithinFrameScope + ///
+ ///
+ public ref bool WithinFrameScope => ref Unsafe.AsRef(&_ptr->WithinFrameScope); + + /// + /// + /// Set by NewFrame(), cleared by EndFrame() when the implicit debug window has been pushed + /// + /// + /// C++: + /// imgui_internal.h:2356 + ///
bool WithinFrameScopeWithImplicitWindow + ///
+ ///
+ public ref bool WithinFrameScopeWithImplicitWindow => + ref Unsafe.AsRef(&_ptr->WithinFrameScopeWithImplicitWindow); + + /// + /// + /// Request full GC + /// + /// + /// C++: + /// imgui_internal.h:2357 + ///
bool GcCompactAll + ///
+ ///
+ public ref bool GcCompactAll => ref Unsafe.AsRef(&_ptr->GcCompactAll); + + /// + /// + /// Will call test engine hooks: ImGuiTestEngineHook_ItemAdd(), ImGuiTestEngineHook_ItemInfo(), + /// ImGuiTestEngineHook_Log() + /// + /// + /// C++: + /// imgui_internal.h:2358 + ///
bool TestEngineHookItems + ///
+ ///
+ public ref bool TestEngineHookItems => ref Unsafe.AsRef(&_ptr->TestEngineHookItems); + + /// + /// + /// Test engine user data + /// + /// + /// C++: + /// imgui_internal.h:2359 + ///
void* TestEngine + ///
+ ///
+ public ref nint TestEngine => ref Unsafe.AsRef(&_ptr->TestEngine); + + /// + /// Storage for a context name (to facilitate debugging multi-context setups) + /// + public Span ContextName => MemoryMarshal.CreateSpan(ref _ptr->ContextName[0], 16); + + /// + /// + /// Input events which will be trickled/written into IO structure. + /// + /// + /// C++: + /// imgui_internal.h:2363 + ///
ImVector<ImGuiInputEvent> InputEventsQueue + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + public ref ImVector InputEventsQueue => + ref Unsafe.AsRef>(&_ptr->InputEventsQueue); + + /// + /// + /// Past input events processed in NewFrame(). This is to allow domain-specific application to access e.g + /// mouse/pen trail. + /// + /// + /// C++: + /// imgui_internal.h:2364 + ///
ImVector<ImGuiInputEvent> InputEventsTrail + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + public ref ImVector InputEventsTrail => + ref Unsafe.AsRef>(&_ptr->InputEventsTrail); + + /// + /// + /// C++: + /// imgui_internal.h:2365 + ///
ImGuiMouseSource InputEventsNextMouseSource + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + public ref ImGuiMouseSource InputEventsNextMouseSource => + ref Unsafe.AsRef(&_ptr->InputEventsNextMouseSource); + + /// + /// + /// C++: + /// imgui_internal.h:2366 + ///
ImU32 InputEventsNextEventId + ///
+ ///
+ /// + /// + /// Inputs + /// + /// + public ref uint InputEventsNextEventId => ref Unsafe.AsRef(&_ptr->InputEventsNextEventId); + + /// + /// + /// Windows, sorted in display order, back to front + /// + /// + /// C++: + /// imgui_internal.h:2369 + ///
ImVector<ImGuiWindow*> Windows + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImVector Windows => ref Unsafe.AsRef>(&_ptr->Windows); + + /// + /// + /// Root windows, sorted in focus order, back to front. + /// + /// + /// C++: + /// imgui_internal.h:2370 + ///
ImVector<ImGuiWindow*> WindowsFocusOrder + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImVector WindowsFocusOrder => + ref Unsafe.AsRef>(&_ptr->WindowsFocusOrder); + + /// + /// + /// Temporary buffer used in EndFrame() to reorder windows so parents are kept before their child + /// + /// + /// C++: + /// imgui_internal.h:2371 + ///
ImVector<ImGuiWindow*> WindowsTempSortBuffer + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImVector WindowsTempSortBuffer => + ref Unsafe.AsRef>(&_ptr->WindowsTempSortBuffer); + + /// + /// + /// C++: + /// imgui_internal.h:2372 + ///
ImVector<ImGuiWindowStackData> CurrentWindowStack + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImVector CurrentWindowStack => + ref Unsafe.AsRef>(&_ptr->CurrentWindowStack); + + /// + /// + /// Map window's ImGuiID to ImGuiWindow* + /// + /// + /// C++: + /// imgui_internal.h:2373 + ///
ImGuiStorage WindowsById + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiStorage WindowsById => ref Unsafe.AsRef(&_ptr->WindowsById); + + /// + /// + /// Number of unique windows submitted by frame + /// + /// + /// C++: + /// imgui_internal.h:2374 + ///
int WindowsActiveCount + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref int WindowsActiveCount => ref Unsafe.AsRef(&_ptr->WindowsActiveCount); + + /// + /// + /// Padding around resizable windows for which hovering on counts as hovering the window == + /// ImMax(style.TouchExtraPadding, style.WindowBorderHoverPadding). This isn't so multi-dpi friendly. + /// + /// + /// C++: + /// imgui_internal.h:2375 + ///
float WindowsBorderHoverPadding + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref float WindowsBorderHoverPadding => ref Unsafe.AsRef(&_ptr->WindowsBorderHoverPadding); + + /// + /// + /// Set to break in Begin() call. + /// + /// + /// C++: + /// imgui_internal.h:2376 + ///
ImGuiID DebugBreakInWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiID DebugBreakInWindow => ref Unsafe.AsRef(&_ptr->DebugBreakInWindow); + + /// + /// + /// Window being drawn into + /// + /// + /// C++: + /// imgui_internal.h:2377 + ///
ImGuiWindow* CurrentWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiWindowPtr CurrentWindow => ref Unsafe.AsRef(&_ptr->CurrentWindow); + + /// + /// + /// Window the mouse is hovering. Will typically catch mouse inputs. + /// + /// + /// C++: + /// imgui_internal.h:2378 + ///
ImGuiWindow* HoveredWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiWindowPtr HoveredWindow => ref Unsafe.AsRef(&_ptr->HoveredWindow); + + /// + /// + /// Hovered window ignoring MovingWindow. Only set if MovingWindow is set. + /// + /// + /// C++: + /// imgui_internal.h:2379 + ///
ImGuiWindow* HoveredWindowUnderMovingWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiWindowPtr HoveredWindowUnderMovingWindow => + ref Unsafe.AsRef(&_ptr->HoveredWindowUnderMovingWindow); + + /// + /// + /// Window the mouse is hovering. Filled even with _NoMouse. This is currently useful for multi-context + /// compositors. + /// + /// + /// C++: + /// imgui_internal.h:2380 + ///
ImGuiWindow* HoveredWindowBeforeClear + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiWindowPtr HoveredWindowBeforeClear => + ref Unsafe.AsRef(&_ptr->HoveredWindowBeforeClear); + + /// + /// + /// Track the window we clicked on (in order to preserve focus). The actual window that is moved is + /// generally MovingWindow->RootWindowDockTree. + /// + /// + /// C++: + /// imgui_internal.h:2381 + ///
ImGuiWindow* MovingWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiWindowPtr MovingWindow => ref Unsafe.AsRef(&_ptr->MovingWindow); + + /// + /// + /// Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep + /// scrolling the same window even if during the course of scrolling the mouse ends up hovering a child + /// window. + /// + /// + /// C++: + /// imgui_internal.h:2382 + ///
ImGuiWindow* WheelingWindow + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref ImGuiWindowPtr WheelingWindow => ref Unsafe.AsRef(&_ptr->WheelingWindow); + + /// + /// + /// C++: + /// imgui_internal.h:2383 + ///
ImVec2 WheelingWindowRefMousePos + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref float2 WheelingWindowRefMousePos => ref Unsafe.AsRef(&_ptr->WheelingWindowRefMousePos); + + /// + /// + /// This may be set one frame before WheelingWindow is != NULL + /// + /// + /// C++: + /// imgui_internal.h:2384 + ///
int WheelingWindowStartFrame + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref int WheelingWindowStartFrame => ref Unsafe.AsRef(&_ptr->WheelingWindowStartFrame); + + /// + /// + /// C++: + /// imgui_internal.h:2385 + ///
int WheelingWindowScrolledFrame + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref int WheelingWindowScrolledFrame => ref Unsafe.AsRef(&_ptr->WheelingWindowScrolledFrame); + + /// + /// + /// C++: + /// imgui_internal.h:2386 + ///
float WheelingWindowReleaseTimer + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref float WheelingWindowReleaseTimer => ref Unsafe.AsRef(&_ptr->WheelingWindowReleaseTimer); + + /// + /// + /// C++: + /// imgui_internal.h:2387 + ///
ImVec2 WheelingWindowWheelRemainder + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref float2 WheelingWindowWheelRemainder => ref Unsafe.AsRef(&_ptr->WheelingWindowWheelRemainder); + + /// + /// + /// C++: + /// imgui_internal.h:2388 + ///
ImVec2 WheelingAxisAvg + ///
+ ///
+ /// + /// + /// Windows state + /// + /// + public ref float2 WheelingAxisAvg => ref Unsafe.AsRef(&_ptr->WheelingAxisAvg); + + /// + /// + /// Set when we detect multiple items with the same identifier + /// + /// + /// C++: + /// imgui_internal.h:2391 + ///
ImGuiID DebugDrawIdConflictsId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID DebugDrawIdConflictsId => ref Unsafe.AsRef(&_ptr->DebugDrawIdConflictsId); + + /// + /// + /// Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next + /// HoveredId/ActiveId to not pull in an extra cache-line] + /// + /// + /// C++: + /// imgui_internal.h:2392 + ///
ImGuiID DebugHookIdInfo + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID DebugHookIdInfo => ref Unsafe.AsRef(&_ptr->DebugHookIdInfo); + + /// + /// + /// Hovered widget, filled during the frame + /// + /// + /// C++: + /// imgui_internal.h:2393 + ///
ImGuiID HoveredId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID HoveredId => ref Unsafe.AsRef(&_ptr->HoveredId); + + /// + /// + /// C++: + /// imgui_internal.h:2394 + ///
ImGuiID HoveredIdPreviousFrame + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID HoveredIdPreviousFrame => ref Unsafe.AsRef(&_ptr->HoveredIdPreviousFrame); + + /// + /// + /// Count numbers of items using the same ID as last frame's hovered id + /// + /// + /// C++: + /// imgui_internal.h:2395 + ///
int HoveredIdPreviousFrameItemCount + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref int HoveredIdPreviousFrameItemCount => ref Unsafe.AsRef(&_ptr->HoveredIdPreviousFrameItemCount); + + /// + /// + /// Measure contiguous hovering time + /// + /// + /// C++: + /// imgui_internal.h:2396 + ///
float HoveredIdTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref float HoveredIdTimer => ref Unsafe.AsRef(&_ptr->HoveredIdTimer); + + /// + /// + /// Measure contiguous hovering time where the item has not been active + /// + /// + /// C++: + /// imgui_internal.h:2397 + ///
float HoveredIdNotActiveTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref float HoveredIdNotActiveTimer => ref Unsafe.AsRef(&_ptr->HoveredIdNotActiveTimer); + + /// + /// + /// C++: + /// imgui_internal.h:2398 + ///
bool HoveredIdAllowOverlap + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool HoveredIdAllowOverlap => ref Unsafe.AsRef(&_ptr->HoveredIdAllowOverlap); + + /// + /// + /// At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May + /// be true even if HoveredId == 0. + /// + /// + /// C++: + /// imgui_internal.h:2399 + ///
bool HoveredIdIsDisabled + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool HoveredIdIsDisabled => ref Unsafe.AsRef(&_ptr->HoveredIdIsDisabled); + + /// + /// + /// Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled + /// + /// + /// C++: + /// imgui_internal.h:2400 + ///
bool ItemUnclipByLog + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ItemUnclipByLog => ref Unsafe.AsRef(&_ptr->ItemUnclipByLog); + + /// + /// + /// Active widget + /// + /// + /// C++: + /// imgui_internal.h:2401 + ///
ImGuiID ActiveId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID ActiveId => ref Unsafe.AsRef(&_ptr->ActiveId); + + /// + /// + /// Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame) + /// + /// + /// C++: + /// imgui_internal.h:2402 + ///
ImGuiID ActiveIdIsAlive + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID ActiveIdIsAlive => ref Unsafe.AsRef(&_ptr->ActiveIdIsAlive); + + /// + /// + /// C++: + /// imgui_internal.h:2403 + ///
float ActiveIdTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref float ActiveIdTimer => ref Unsafe.AsRef(&_ptr->ActiveIdTimer); + + /// + /// + /// Set at the time of activation for one frame + /// + /// + /// C++: + /// imgui_internal.h:2404 + ///
bool ActiveIdIsJustActivated + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdIsJustActivated => ref Unsafe.AsRef(&_ptr->ActiveIdIsJustActivated); + + /// + /// + /// Active widget allows another widget to steal active id (generally for overlapping widgets, but not + /// always) + /// + /// + /// C++: + /// imgui_internal.h:2405 + ///
bool ActiveIdAllowOverlap + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdAllowOverlap => ref Unsafe.AsRef(&_ptr->ActiveIdAllowOverlap); + + /// + /// + /// Disable losing active id if the active id window gets unfocused. + /// + /// + /// C++: + /// imgui_internal.h:2406 + ///
bool ActiveIdNoClearOnFocusLoss + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdNoClearOnFocusLoss => ref Unsafe.AsRef(&_ptr->ActiveIdNoClearOnFocusLoss); + + /// + /// + /// Track whether the active id led to a press (this is to allow changing between PressOnClick and + /// PressOnRelease without pressing twice). Used by range_select branch. + /// + /// + /// C++: + /// imgui_internal.h:2407 + ///
bool ActiveIdHasBeenPressedBefore + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdHasBeenPressedBefore => ref Unsafe.AsRef(&_ptr->ActiveIdHasBeenPressedBefore); + + /// + /// + /// Was the value associated to the widget Edited over the course of the Active state. + /// + /// + /// C++: + /// imgui_internal.h:2408 + ///
bool ActiveIdHasBeenEditedBefore + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdHasBeenEditedBefore => ref Unsafe.AsRef(&_ptr->ActiveIdHasBeenEditedBefore); + + /// + /// + /// C++: + /// imgui_internal.h:2409 + ///
bool ActiveIdHasBeenEditedThisFrame + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdHasBeenEditedThisFrame => ref Unsafe.AsRef(&_ptr->ActiveIdHasBeenEditedThisFrame); + + /// + /// + /// C++: + /// imgui_internal.h:2410 + ///
bool ActiveIdFromShortcut + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref bool ActiveIdFromShortcut => ref Unsafe.AsRef(&_ptr->ActiveIdFromShortcut); + + /// + /// + /// C++: + /// imgui_internal.h:2411 + ///
int ActiveIdMouseButton : 8 + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref int ActiveIdMouseButton => ref Unsafe.AsRef(&_ptr->ActiveIdMouseButton); + + /// + /// + /// Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior) + /// + /// + /// C++: + /// imgui_internal.h:2412 + ///
ImVec2 ActiveIdClickOffset + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref float2 ActiveIdClickOffset => ref Unsafe.AsRef(&_ptr->ActiveIdClickOffset); + + /// + /// + /// C++: + /// imgui_internal.h:2413 + ///
ImGuiWindow* ActiveIdWindow + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiWindowPtr ActiveIdWindow => ref Unsafe.AsRef(&_ptr->ActiveIdWindow); + + /// + /// + /// Activating source: ImGuiInputSource_Mouse OR ImGuiInputSource_Keyboard OR ImGuiInputSource_Gamepad + /// + /// + /// C++: + /// imgui_internal.h:2414 + ///
ImGuiInputSource ActiveIdSource + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiInputSource ActiveIdSource => ref Unsafe.AsRef(&_ptr->ActiveIdSource); + + /// + /// + /// C++: + /// imgui_internal.h:2415 + ///
ImGuiID ActiveIdPreviousFrame + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID ActiveIdPreviousFrame => ref Unsafe.AsRef(&_ptr->ActiveIdPreviousFrame); + + /// + /// + /// C++: + /// imgui_internal.h:2416 + ///
ImGuiDeactivatedItemData DeactivatedItemData + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiDeactivatedItemData DeactivatedItemData => + ref Unsafe.AsRef(&_ptr->DeactivatedItemData); + + /// + /// + /// Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX. + /// + /// + /// C++: + /// imgui_internal.h:2417 + ///
ImGuiDataTypeStorage ActiveIdValueOnActivation + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiDataTypeStorage ActiveIdValueOnActivation => + ref Unsafe.AsRef(&_ptr->ActiveIdValueOnActivation); + + /// + /// + /// Store the last non-zero ActiveId, useful for animation. + /// + /// + /// C++: + /// imgui_internal.h:2418 + ///
ImGuiID LastActiveId + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref ImGuiID LastActiveId => ref Unsafe.AsRef(&_ptr->LastActiveId); + + /// + /// + /// Store the last non-zero ActiveId timer since the beginning of activation, useful for animation. + /// + /// + /// C++: + /// imgui_internal.h:2419 + ///
float LastActiveIdTimer + ///
+ ///
+ /// + /// + /// Item/widgets state and tracking information + /// + /// + public ref float LastActiveIdTimer => ref Unsafe.AsRef(&_ptr->LastActiveIdTimer); + + /// + /// + /// Record the last time key mods changed (affect repeat delay when using shortcut logic) + /// + /// + /// C++: + /// imgui_internal.h:2425 + ///
double LastKeyModsChangeTime + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref double LastKeyModsChangeTime => ref Unsafe.AsRef(&_ptr->LastKeyModsChangeTime); + + /// + /// + /// Record the last time key mods changed away from being 0 (affect repeat delay when using shortcut logic) + /// + /// + /// C++: + /// imgui_internal.h:2426 + ///
double LastKeyModsChangeFromNoneTime + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref double LastKeyModsChangeFromNoneTime => + ref Unsafe.AsRef(&_ptr->LastKeyModsChangeFromNoneTime); + + /// + /// + /// Record the last time a keyboard key (ignore mouse/gamepad ones) was pressed. + /// + /// + /// C++: + /// imgui_internal.h:2427 + ///
double LastKeyboardKeyPressTime + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref double LastKeyboardKeyPressTime => ref Unsafe.AsRef(&_ptr->LastKeyboardKeyPressTime); + + /// + /// + /// Lookup to tell if a key can emit char input, see IsKeyChordPotentiallyCharInput(). sizeof() = 20 bytes + /// + /// + /// C++: + /// imgui_internal.h:2428 + ///
ImBitArrayForNamedKeys KeysMayBeCharInput + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref ImBitArrayForNamedKeys KeysMayBeCharInput => + ref Unsafe.AsRef(&_ptr->KeysMayBeCharInput); + + /// + /// + /// C++: + /// imgui_internal.h:2429 + ///
ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT] + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref ImGuiKeyOwnerData_155 KeysOwnerData => ref Unsafe.AsRef(&_ptr->KeysOwnerData); + + /// + /// + /// C++: + /// imgui_internal.h:2430 + ///
ImGuiKeyRoutingTable KeysRoutingTable + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref ImGuiKeyRoutingTable KeysRoutingTable => + ref Unsafe.AsRef(&_ptr->KeysRoutingTable); + + /// + /// + /// Active widget will want to read those nav move requests (e.g. can activate a button and move away from + /// it) + /// + /// + /// C++: + /// imgui_internal.h:2431 + ///
ImU32 ActiveIdUsingNavDirMask + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref uint ActiveIdUsingNavDirMask => ref Unsafe.AsRef(&_ptr->ActiveIdUsingNavDirMask); + + /// + /// + /// Active widget will want to read all keyboard keys inputs. (this is a shortcut for not taking ownership + /// of 100+ keys, frequently used by drag operations) + /// + /// + /// C++: + /// imgui_internal.h:2432 + ///
bool ActiveIdUsingAllKeyboardKeys + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref bool ActiveIdUsingAllKeyboardKeys => ref Unsafe.AsRef(&_ptr->ActiveIdUsingAllKeyboardKeys); + + /// + /// + /// Set to break in SetShortcutRouting()/Shortcut() calls. + /// + /// + /// C++: + /// imgui_internal.h:2433 + ///
ImGuiKeyChord DebugBreakInShortcutRouting + ///
+ ///
+ /// + /// + /// Key/Input Ownership + Shortcut Routing system + /// - The idea is that instead of "eating" a given key, we can link to an owner. + /// - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID. + /// - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + /// + /// + public ref ImGuiKeyChord DebugBreakInShortcutRouting => + ref Unsafe.AsRef(&_ptr->DebugBreakInShortcutRouting); + + /// + /// + /// Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with + /// g.NavFocusScopeId. + /// + /// + /// C++: + /// imgui_internal.h:2437 + ///
ImGuiID CurrentFocusScopeId + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref ImGuiID CurrentFocusScopeId => ref Unsafe.AsRef(&_ptr->CurrentFocusScopeId); + + /// + /// + /// Value for currently appending items == g.ItemFlagsStack.back() + /// + /// + /// C++: + /// imgui_internal.h:2438 + ///
ImGuiItemFlags CurrentItemFlags + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref ImGuiItemFlags CurrentItemFlags => ref Unsafe.AsRef(&_ptr->CurrentItemFlags); + + /// + /// + /// Storage for DebugLocateItemOnHover() feature: this is read by ItemAdd() so we keep it in a hot/cached + /// location + /// + /// + /// C++: + /// imgui_internal.h:2439 + ///
ImGuiID DebugLocateId + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref ImGuiID DebugLocateId => ref Unsafe.AsRef(&_ptr->DebugLocateId); + + /// + /// + /// Storage for SetNextItem** functions + /// + /// + /// C++: + /// imgui_internal.h:2440 + ///
ImGuiNextItemData NextItemData + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref ImGuiNextItemData NextItemData => ref Unsafe.AsRef(&_ptr->NextItemData); + + /// + /// + /// Storage for last submitted item (setup by ItemAdd) + /// + /// + /// C++: + /// imgui_internal.h:2441 + ///
ImGuiLastItemData LastItemData + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref ImGuiLastItemData LastItemData => ref Unsafe.AsRef(&_ptr->LastItemData); + + /// + /// + /// Storage for SetNextWindow** functions + /// + /// + /// C++: + /// imgui_internal.h:2442 + ///
ImGuiNextWindowData NextWindowData + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref ImGuiNextWindowData NextWindowData => ref Unsafe.AsRef(&_ptr->NextWindowData); + + /// + /// + /// C++: + /// imgui_internal.h:2443 + ///
bool DebugShowGroupRects + ///
+ ///
+ /// + /// + /// Next window/item data + /// + /// + public ref bool DebugShowGroupRects => ref Unsafe.AsRef(&_ptr->DebugShowGroupRects); + + /// + /// + /// (Keep close to ColorStack to share cache line) + /// + /// + /// C++: + /// imgui_internal.h:2446 + ///
ImGuiCol DebugFlashStyleColorIdx + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImGuiCol DebugFlashStyleColorIdx => ref Unsafe.AsRef(&_ptr->DebugFlashStyleColorIdx); + + /// + /// + /// Stack for PushStyleColor()/PopStyleColor() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2447 + ///
ImVector<ImGuiColorMod> ColorStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector ColorStack => ref Unsafe.AsRef>(&_ptr->ColorStack); + + /// + /// + /// Stack for PushStyleVar()/PopStyleVar() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2448 + ///
ImVector<ImGuiStyleMod> StyleVarStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector StyleVarStack => + ref Unsafe.AsRef>(&_ptr->StyleVarStack); + + /// + /// + /// Stack for PushFont()/PopFont() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2449 + ///
ImVector<ImFontStackData> FontStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector FontStack => ref Unsafe.AsRef>(&_ptr->FontStack); + + /// + /// + /// Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2450 + ///
ImVector<ImGuiFocusScopeData> FocusScopeStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector FocusScopeStack => + ref Unsafe.AsRef>(&_ptr->FocusScopeStack); + + /// + /// + /// Stack for PushItemFlag()/PopItemFlag() - inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2451 + ///
ImVector<ImGuiItemFlags> ItemFlagsStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector ItemFlagsStack => ref Unsafe.AsRef>(&_ptr->ItemFlagsStack); + + /// + /// + /// Stack for BeginGroup()/EndGroup() - not inherited by Begin() + /// + /// + /// C++: + /// imgui_internal.h:2452 + ///
ImVector<ImGuiGroupData> GroupStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector GroupStack => ref Unsafe.AsRef>(&_ptr->GroupStack); + + /// + /// + /// Which popups are open (persistent) + /// + /// + /// C++: + /// imgui_internal.h:2453 + ///
ImVector<ImGuiPopupData> OpenPopupStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector OpenPopupStack => + ref Unsafe.AsRef>(&_ptr->OpenPopupStack); + + /// + /// + /// Which level of BeginPopup() we are in (reset every frame) + /// + /// + /// C++: + /// imgui_internal.h:2454 + ///
ImVector<ImGuiPopupData> BeginPopupStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector BeginPopupStack => + ref Unsafe.AsRef>(&_ptr->BeginPopupStack); + + /// + /// + /// Stack for TreeNode() + /// + /// + /// C++: + /// imgui_internal.h:2455 + ///
ImVector<ImGuiTreeNodeStackData>TreeNodeStack + ///
+ ///
+ /// + /// + /// Shared stacks + /// + /// + public ref ImVector TreeNodeStack => + ref Unsafe.AsRef>(&_ptr->TreeNodeStack); + + /// + /// + /// Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold + /// their copy of ImDrawData. + /// + /// + /// C++: + /// imgui_internal.h:2458 + ///
ImVector<ImGuiViewportP*> Viewports + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref ImVector Viewports => + ref Unsafe.AsRef>(&_ptr->Viewports); + + /// + /// + /// We track changes of viewport (happening in Begin) so we can call Platform_OnChangedViewport() + /// + /// + /// C++: + /// imgui_internal.h:2459 + ///
ImGuiViewportP* CurrentViewport + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref ImGuiViewportPPtr CurrentViewport => ref Unsafe.AsRef(&_ptr->CurrentViewport); + + /// + /// + /// C++: + /// imgui_internal.h:2460 + ///
ImGuiViewportP* MouseViewport + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref ImGuiViewportPPtr MouseViewport => ref Unsafe.AsRef(&_ptr->MouseViewport); + + /// + /// + /// Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + + /// honoring the _NoInputs flag. + /// + /// + /// C++: + /// imgui_internal.h:2461 + ///
ImGuiViewportP* MouseLastHoveredViewport + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref ImGuiViewportPPtr MouseLastHoveredViewport => + ref Unsafe.AsRef(&_ptr->MouseLastHoveredViewport); + + /// + /// + /// C++: + /// imgui_internal.h:2462 + ///
ImGuiID PlatformLastFocusedViewportId + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref ImGuiID PlatformLastFocusedViewportId => + ref Unsafe.AsRef(&_ptr->PlatformLastFocusedViewportId); + + /// + /// + /// Virtual monitor used as fallback if backend doesn't provide monitor information. + /// + /// + /// C++: + /// imgui_internal.h:2463 + ///
ImGuiPlatformMonitor FallbackMonitor + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref ImGuiPlatformMonitor FallbackMonitor => + ref Unsafe.AsRef(&_ptr->FallbackMonitor); + + /// + /// + /// Bounding box of all platform monitors + /// + /// + /// C++: + /// imgui_internal.h:2464 + ///
ImRect PlatformMonitorsFullWorkRect + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref floatRect PlatformMonitorsFullWorkRect => + ref Unsafe.AsRef(&_ptr->PlatformMonitorsFullWorkRect); + + /// + /// + /// Unique sequential creation counter (mostly for testing/debugging) + /// + /// + /// C++: + /// imgui_internal.h:2465 + ///
int ViewportCreatedCount + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref int ViewportCreatedCount => ref Unsafe.AsRef(&_ptr->ViewportCreatedCount); + + /// + /// + /// Unique sequential creation counter (mostly for testing/debugging) + /// + /// + /// C++: + /// imgui_internal.h:2466 + ///
int PlatformWindowsCreatedCount + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref int PlatformWindowsCreatedCount => ref Unsafe.AsRef(&_ptr->PlatformWindowsCreatedCount); + + /// + /// + /// Every time the front-most window changes, we stamp its viewport with an incrementing counter + /// + /// + /// C++: + /// imgui_internal.h:2467 + ///
int ViewportFocusedStampCount + ///
+ ///
+ /// + /// + /// Viewports + /// + /// + public ref int ViewportFocusedStampCount => ref Unsafe.AsRef(&_ptr->ViewportFocusedStampCount); + + /// + /// + /// Nav focus cursor/rectangle is visible? We hide it after a mouse click. We show it after a nav move. + /// + /// + /// C++: + /// imgui_internal.h:2470 + ///
bool NavCursorVisible + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref bool NavCursorVisible => ref Unsafe.AsRef(&_ptr->NavCursorVisible); + + /// + /// + /// Disable mouse hovering highlight. Highlight navigation focused item instead of mouse hovered item. + /// + /// + /// C++: + /// imgui_internal.h:2471 + ///
bool NavHighlightItemUnderNav + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref bool NavHighlightItemUnderNav => ref Unsafe.AsRef(&_ptr->NavHighlightItemUnderNav); + + /// + /// + /// When set we will update mouse position if io.ConfigNavMoveSetMousePos is set (not enabled by default) + /// + /// + /// C++: + /// imgui_internal.h:2474 + ///
bool NavMousePosDirty + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref bool NavMousePosDirty => ref Unsafe.AsRef(&_ptr->NavMousePosDirty); + + /// + /// + /// Nav widget has been seen this frame ~~ NavRectRel is valid + /// + /// + /// C++: + /// imgui_internal.h:2475 + ///
bool NavIdIsAlive + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref bool NavIdIsAlive => ref Unsafe.AsRef(&_ptr->NavIdIsAlive); + + /// + /// + /// Focused item for navigation + /// + /// + /// C++: + /// imgui_internal.h:2476 + ///
ImGuiID NavId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavId => ref Unsafe.AsRef(&_ptr->NavId); + + /// + /// + /// Focused window for navigation. Could be called 'FocusedWindow' + /// + /// + /// C++: + /// imgui_internal.h:2477 + ///
ImGuiWindow* NavWindow + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiWindowPtr NavWindow => ref Unsafe.AsRef(&_ptr->NavWindow); + + /// + /// + /// Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of + /// the same scope) + /// + /// + /// C++: + /// imgui_internal.h:2478 + ///
ImGuiID NavFocusScopeId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavFocusScopeId => ref Unsafe.AsRef(&_ptr->NavFocusScopeId); + + /// + /// + /// Focused layer (main scrolling layer, or menu/title bar layer) + /// + /// + /// C++: + /// imgui_internal.h:2479 + ///
ImGuiNavLayer NavLayer + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiNavLayer NavLayer => ref Unsafe.AsRef(&_ptr->NavLayer); + + /// + /// + /// ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || + /// IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItemByID() + /// + /// + /// C++: + /// imgui_internal.h:2480 + ///
ImGuiID NavActivateId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavActivateId => ref Unsafe.AsRef(&_ptr->NavActivateId); + + /// + /// + /// ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? + /// NavId : 0 + /// + /// + /// C++: + /// imgui_internal.h:2481 + ///
ImGuiID NavActivateDownId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavActivateDownId => ref Unsafe.AsRef(&_ptr->NavActivateDownId); + + /// + /// + /// ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || + /// IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat) + /// + /// + /// C++: + /// imgui_internal.h:2482 + ///
ImGuiID NavActivatePressedId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavActivatePressedId => ref Unsafe.AsRef(&_ptr->NavActivatePressedId); + + /// + /// + /// C++: + /// imgui_internal.h:2483 + ///
ImGuiActivateFlags NavActivateFlags + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiActivateFlags NavActivateFlags => ref Unsafe.AsRef(&_ptr->NavActivateFlags); + + /// + /// + /// Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the + /// window->ParentWindowForFocusRoute chain. + /// + /// + /// C++: + /// imgui_internal.h:2484 + ///
ImVector<ImGuiFocusScopeData> NavFocusRoute + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImVector NavFocusRoute => + ref Unsafe.AsRef>(&_ptr->NavFocusRoute); + + /// + /// + /// C++: + /// imgui_internal.h:2485 + ///
ImGuiID NavHighlightActivatedId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavHighlightActivatedId => ref Unsafe.AsRef(&_ptr->NavHighlightActivatedId); + + /// + /// + /// C++: + /// imgui_internal.h:2486 + ///
float NavHighlightActivatedTimer + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref float NavHighlightActivatedTimer => ref Unsafe.AsRef(&_ptr->NavHighlightActivatedTimer); + + /// + /// + /// Set by ActivateItemByID(), queued until next frame. + /// + /// + /// C++: + /// imgui_internal.h:2487 + ///
ImGuiID NavNextActivateId + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiID NavNextActivateId => ref Unsafe.AsRef(&_ptr->NavNextActivateId); + + /// + /// + /// C++: + /// imgui_internal.h:2488 + ///
ImGuiActivateFlags NavNextActivateFlags + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiActivateFlags NavNextActivateFlags => + ref Unsafe.AsRef(&_ptr->NavNextActivateFlags); + + /// + /// + /// Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse + /// + /// + /// C++: + /// imgui_internal.h:2489 + ///
ImGuiInputSource NavInputSource + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ImGuiInputSource NavInputSource => ref Unsafe.AsRef(&_ptr->NavInputSource); + + /// + /// + /// Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing + /// an item that doesn't have selection data. + /// + /// + /// C++: + /// imgui_internal.h:2490 + ///
ImGuiSelectionUserData NavLastValidSelectionUserData + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref ulong NavLastValidSelectionUserData => ref Unsafe.AsRef(&_ptr->NavLastValidSelectionUserData); + + /// + /// + /// C++: + /// imgui_internal.h:2491 + ///
ImS8 NavCursorHideFrames + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation + /// + /// + public ref sbyte NavCursorHideFrames => ref Unsafe.AsRef(&_ptr->NavCursorHideFrames); + + /// + /// + /// ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd() + /// + /// + /// C++: + /// imgui_internal.h:2495 + ///
bool NavAnyRequest + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref bool NavAnyRequest => ref Unsafe.AsRef(&_ptr->NavAnyRequest); + + /// + /// + /// Init request for appearing window to select first item + /// + /// + /// C++: + /// imgui_internal.h:2496 + ///
bool NavInitRequest + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref bool NavInitRequest => ref Unsafe.AsRef(&_ptr->NavInitRequest); + + /// + /// + /// C++: + /// imgui_internal.h:2497 + ///
bool NavInitRequestFromMove + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref bool NavInitRequestFromMove => ref Unsafe.AsRef(&_ptr->NavInitRequestFromMove); + + /// + /// + /// Init request result (first item of the window, or one for which SetItemDefaultFocus() was called) + /// + /// + /// C++: + /// imgui_internal.h:2498 + ///
ImGuiNavItemData NavInitResult + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiNavItemData NavInitResult => ref Unsafe.AsRef(&_ptr->NavInitResult); + + /// + /// + /// Move request submitted, will process result on next NewFrame() + /// + /// + /// C++: + /// imgui_internal.h:2499 + ///
bool NavMoveSubmitted + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref bool NavMoveSubmitted => ref Unsafe.AsRef(&_ptr->NavMoveSubmitted); + + /// + /// + /// Move request submitted, still scoring incoming items + /// + /// + /// C++: + /// imgui_internal.h:2500 + ///
bool NavMoveScoringItems + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref bool NavMoveScoringItems => ref Unsafe.AsRef(&_ptr->NavMoveScoringItems); + + /// + /// + /// C++: + /// imgui_internal.h:2501 + ///
bool NavMoveForwardToNextFrame + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref bool NavMoveForwardToNextFrame => ref Unsafe.AsRef(&_ptr->NavMoveForwardToNextFrame); + + /// + /// + /// C++: + /// imgui_internal.h:2502 + ///
ImGuiNavMoveFlags NavMoveFlags + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiNavMoveFlags NavMoveFlags => ref Unsafe.AsRef(&_ptr->NavMoveFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2503 + ///
ImGuiScrollFlags NavMoveScrollFlags + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiScrollFlags NavMoveScrollFlags => ref Unsafe.AsRef(&_ptr->NavMoveScrollFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2504 + ///
ImGuiKeyChord NavMoveKeyMods + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiKeyChord NavMoveKeyMods => ref Unsafe.AsRef(&_ptr->NavMoveKeyMods); + + /// + /// + /// Direction of the move request (left/right/up/down) + /// + /// + /// C++: + /// imgui_internal.h:2505 + ///
ImGuiDir NavMoveDir + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiDir NavMoveDir => ref Unsafe.AsRef(&_ptr->NavMoveDir); + + /// + /// + /// C++: + /// imgui_internal.h:2506 + ///
ImGuiDir NavMoveDirForDebug + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiDir NavMoveDirForDebug => ref Unsafe.AsRef(&_ptr->NavMoveDirForDebug); + + /// + /// + /// FIXME-NAV: Describe the purpose of this better. Might want to rename? + /// + /// + /// C++: + /// imgui_internal.h:2507 + ///
ImGuiDir NavMoveClipDir + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiDir NavMoveClipDir => ref Unsafe.AsRef(&_ptr->NavMoveClipDir); + + /// + /// + /// Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional + /// navigation scoring. + /// + /// + /// C++: + /// imgui_internal.h:2508 + ///
ImRect NavScoringRect + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref floatRect NavScoringRect => ref Unsafe.AsRef(&_ptr->NavScoringRect); + + /// + /// + /// Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep + /// submitted + /// + /// + /// C++: + /// imgui_internal.h:2509 + ///
ImRect NavScoringNoClipRect + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref floatRect NavScoringNoClipRect => ref Unsafe.AsRef(&_ptr->NavScoringNoClipRect); + + /// + /// + /// Metrics for debugging + /// + /// + /// C++: + /// imgui_internal.h:2510 + ///
int NavScoringDebugCount + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref int NavScoringDebugCount => ref Unsafe.AsRef(&_ptr->NavScoringDebugCount); + + /// + /// + /// Generally -1 or +1, 0 when tabbing without a nav id + /// + /// + /// C++: + /// imgui_internal.h:2511 + ///
int NavTabbingDir + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref int NavTabbingDir => ref Unsafe.AsRef(&_ptr->NavTabbingDir); + + /// + /// + /// >0 when counting items for tabbing + /// + /// + /// C++: + /// imgui_internal.h:2512 + ///
int NavTabbingCounter + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref int NavTabbingCounter => ref Unsafe.AsRef(&_ptr->NavTabbingCounter); + + /// + /// + /// Best move request candidate within NavWindow + /// + /// + /// C++: + /// imgui_internal.h:2513 + ///
ImGuiNavItemData NavMoveResultLocal + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiNavItemData NavMoveResultLocal => ref Unsafe.AsRef(&_ptr->NavMoveResultLocal); + + /// + /// + /// Best move request candidate within NavWindow that are mostly visible (when using + /// ImGuiNavMoveFlags_AlsoScoreVisibleSet flag) + /// + /// + /// C++: + /// imgui_internal.h:2514 + ///
ImGuiNavItemData NavMoveResultLocalVisible + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiNavItemData NavMoveResultLocalVisible => + ref Unsafe.AsRef(&_ptr->NavMoveResultLocalVisible); + + /// + /// + /// Best move request candidate within NavWindow's flattened hierarchy (when using + /// ImGuiWindowFlags_NavFlattened flag) + /// + /// + /// C++: + /// imgui_internal.h:2515 + ///
ImGuiNavItemData NavMoveResultOther + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiNavItemData NavMoveResultOther => ref Unsafe.AsRef(&_ptr->NavMoveResultOther); + + /// + /// + /// First tabbing request candidate within NavWindow and flattened hierarchy + /// + /// + /// C++: + /// imgui_internal.h:2516 + ///
ImGuiNavItemData NavTabbingResultFirst + ///
+ ///
+ /// + /// + /// Navigation: Init & Move Requests + /// + /// + public ref ImGuiNavItemData NavTabbingResultFirst => + ref Unsafe.AsRef(&_ptr->NavTabbingResultFirst); + + /// + /// + /// Just navigated from this focus scope id (result of a successfully MoveRequest). + /// + /// + /// C++: + /// imgui_internal.h:2519 + ///
ImGuiID NavJustMovedFromFocusScopeId + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + public ref ImGuiID NavJustMovedFromFocusScopeId => + ref Unsafe.AsRef(&_ptr->NavJustMovedFromFocusScopeId); + + /// + /// + /// Just navigated to this id (result of a successfully MoveRequest). + /// + /// + /// C++: + /// imgui_internal.h:2520 + ///
ImGuiID NavJustMovedToId + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + public ref ImGuiID NavJustMovedToId => ref Unsafe.AsRef(&_ptr->NavJustMovedToId); + + /// + /// + /// Just navigated to this focus scope id (result of a successfully MoveRequest). + /// + /// + /// C++: + /// imgui_internal.h:2521 + ///
ImGuiID NavJustMovedToFocusScopeId + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + public ref ImGuiID NavJustMovedToFocusScopeId => ref Unsafe.AsRef(&_ptr->NavJustMovedToFocusScopeId); + + /// + /// + /// C++: + /// imgui_internal.h:2522 + ///
ImGuiKeyChord NavJustMovedToKeyMods + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + public ref ImGuiKeyChord NavJustMovedToKeyMods => ref Unsafe.AsRef(&_ptr->NavJustMovedToKeyMods); + + /// + /// + /// Copy of ImGuiNavMoveFlags_IsTabbing. Maybe we should store whole flags. + /// + /// + /// C++: + /// imgui_internal.h:2523 + ///
bool NavJustMovedToIsTabbing + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + public ref bool NavJustMovedToIsTabbing => ref Unsafe.AsRef(&_ptr->NavJustMovedToIsTabbing); + + /// + /// + /// Copy of move result's ItemFlags & ImGuiItemFlags_HasSelectionUserData). Maybe we should just store + /// ImGuiNavItemData. + /// + /// + /// C++: + /// imgui_internal.h:2524 + ///
bool NavJustMovedToHasSelectionData + ///
+ ///
+ /// + /// + /// Navigation: record of last move request + /// + /// + public ref bool NavJustMovedToHasSelectionData => ref Unsafe.AsRef(&_ptr->NavJustMovedToHasSelectionData); + + /// + /// + /// = true. Enable CTRL+TAB by holding ImGuiKey_GamepadFaceLeft (== ImGuiKey_NavGamepadMenu). When false, + /// the button may still be used to toggle Menu layer. + /// + /// + /// C++: + /// imgui_internal.h:2527 + ///
bool ConfigNavWindowingWithGamepad + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref bool ConfigNavWindowingWithGamepad => ref Unsafe.AsRef(&_ptr->ConfigNavWindowingWithGamepad); + + /// + /// + /// = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). For reconfiguration (see + /// #4828) + /// + /// + /// C++: + /// imgui_internal.h:2528 + ///
ImGuiKeyChord ConfigNavWindowingKeyNext + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiKeyChord ConfigNavWindowingKeyNext => + ref Unsafe.AsRef(&_ptr->ConfigNavWindowingKeyNext); + + /// + /// + /// = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS + /// X) + /// + /// + /// C++: + /// imgui_internal.h:2529 + ///
ImGuiKeyChord ConfigNavWindowingKeyPrev + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiKeyChord ConfigNavWindowingKeyPrev => + ref Unsafe.AsRef(&_ptr->ConfigNavWindowingKeyPrev); + + /// + /// + /// Target window when doing CTRL+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed + /// top-most! + /// + /// + /// C++: + /// imgui_internal.h:2530 + ///
ImGuiWindow* NavWindowingTarget + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiWindowPtr NavWindowingTarget => ref Unsafe.AsRef(&_ptr->NavWindowingTarget); + + /// + /// + /// Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0f, so + /// the fade-out can stay on it. + /// + /// + /// C++: + /// imgui_internal.h:2531 + ///
ImGuiWindow* NavWindowingTargetAnim + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiWindowPtr NavWindowingTargetAnim => + ref Unsafe.AsRef(&_ptr->NavWindowingTargetAnim); + + /// + /// + /// Internal window actually listing the CTRL+Tab contents + /// + /// + /// C++: + /// imgui_internal.h:2532 + ///
ImGuiWindow* NavWindowingListWindow + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiWindowPtr NavWindowingListWindow => + ref Unsafe.AsRef(&_ptr->NavWindowingListWindow); + + /// + /// + /// C++: + /// imgui_internal.h:2533 + ///
float NavWindowingTimer + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref float NavWindowingTimer => ref Unsafe.AsRef(&_ptr->NavWindowingTimer); + + /// + /// + /// C++: + /// imgui_internal.h:2534 + ///
float NavWindowingHighlightAlpha + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref float NavWindowingHighlightAlpha => ref Unsafe.AsRef(&_ptr->NavWindowingHighlightAlpha); + + /// + /// + /// C++: + /// imgui_internal.h:2535 + ///
ImGuiInputSource NavWindowingInputSource + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiInputSource NavWindowingInputSource => + ref Unsafe.AsRef(&_ptr->NavWindowingInputSource); + + /// + /// + /// Set while Alt or GamepadMenu is held, may be cleared by other operations, and processed when releasing + /// the key. + /// + /// + /// C++: + /// imgui_internal.h:2536 + ///
bool NavWindowingToggleLayer + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref bool NavWindowingToggleLayer => ref Unsafe.AsRef(&_ptr->NavWindowingToggleLayer); + + /// + /// + /// Keyboard/gamepad key used when toggling to menu layer. + /// + /// + /// C++: + /// imgui_internal.h:2537 + ///
ImGuiKey NavWindowingToggleKey + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref ImGuiKey NavWindowingToggleKey => ref Unsafe.AsRef(&_ptr->NavWindowingToggleKey); + + /// + /// + /// C++: + /// imgui_internal.h:2538 + ///
ImVec2 NavWindowingAccumDeltaPos + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref float2 NavWindowingAccumDeltaPos => ref Unsafe.AsRef(&_ptr->NavWindowingAccumDeltaPos); + + /// + /// + /// C++: + /// imgui_internal.h:2539 + ///
ImVec2 NavWindowingAccumDeltaSize + ///
+ ///
+ /// + /// + /// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize) + /// + /// + public ref float2 NavWindowingAccumDeltaSize => ref Unsafe.AsRef(&_ptr->NavWindowingAccumDeltaSize); + + /// + /// + /// 0.0..1.0 animation when fading in a dimming background (for modal window and CTRL+TAB list) + /// + /// + /// C++: + /// imgui_internal.h:2542 + ///
float DimBgRatio + ///
+ ///
+ /// + /// + /// Render + /// + /// + public ref float DimBgRatio => ref Unsafe.AsRef(&_ptr->DimBgRatio); + + /// + /// + /// C++: + /// imgui_internal.h:2545 + ///
bool DragDropActive + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref bool DragDropActive => ref Unsafe.AsRef(&_ptr->DragDropActive); + + /// + /// + /// Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag source. + /// + /// + /// C++: + /// imgui_internal.h:2546 + ///
bool DragDropWithinSource + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref bool DragDropWithinSource => ref Unsafe.AsRef(&_ptr->DragDropWithinSource); + + /// + /// + /// Set when within a BeginDragDropXXX/EndDragDropXXX block for a drag target. + /// + /// + /// C++: + /// imgui_internal.h:2547 + ///
bool DragDropWithinTarget + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref bool DragDropWithinTarget => ref Unsafe.AsRef(&_ptr->DragDropWithinTarget); + + /// + /// + /// C++: + /// imgui_internal.h:2548 + ///
ImGuiDragDropFlags DragDropSourceFlags + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiDragDropFlags DragDropSourceFlags => + ref Unsafe.AsRef(&_ptr->DragDropSourceFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2549 + ///
int DragDropSourceFrameCount + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref int DragDropSourceFrameCount => ref Unsafe.AsRef(&_ptr->DragDropSourceFrameCount); + + /// + /// + /// C++: + /// imgui_internal.h:2550 + ///
int DragDropMouseButton + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref int DragDropMouseButton => ref Unsafe.AsRef(&_ptr->DragDropMouseButton); + + /// + /// + /// C++: + /// imgui_internal.h:2551 + ///
ImGuiPayload DragDropPayload + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiPayload DragDropPayload => ref Unsafe.AsRef(&_ptr->DragDropPayload); + + /// + /// + /// Store rectangle of current target candidate (we favor small targets when overlapping) + /// + /// + /// C++: + /// imgui_internal.h:2552 + ///
ImRect DragDropTargetRect + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref floatRect DragDropTargetRect => ref Unsafe.AsRef(&_ptr->DragDropTargetRect); + + /// + /// + /// Store ClipRect at the time of item's drawing + /// + /// + /// C++: + /// imgui_internal.h:2553 + ///
ImRect DragDropTargetClipRect + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref floatRect DragDropTargetClipRect => ref Unsafe.AsRef(&_ptr->DragDropTargetClipRect); + + /// + /// + /// C++: + /// imgui_internal.h:2554 + ///
ImGuiID DragDropTargetId + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiID DragDropTargetId => ref Unsafe.AsRef(&_ptr->DragDropTargetId); + + /// + /// + /// C++: + /// imgui_internal.h:2555 + ///
ImGuiDragDropFlags DragDropAcceptFlags + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiDragDropFlags DragDropAcceptFlags => + ref Unsafe.AsRef(&_ptr->DragDropAcceptFlags); + + /// + /// + /// Target item surface (we resolve overlapping targets by prioritizing the smaller surface) + /// + /// + /// C++: + /// imgui_internal.h:2556 + ///
float DragDropAcceptIdCurrRectSurface + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref float DragDropAcceptIdCurrRectSurface => + ref Unsafe.AsRef(&_ptr->DragDropAcceptIdCurrRectSurface); + + /// + /// + /// Target item id (set at the time of accepting the payload) + /// + /// + /// C++: + /// imgui_internal.h:2557 + ///
ImGuiID DragDropAcceptIdCurr + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiID DragDropAcceptIdCurr => ref Unsafe.AsRef(&_ptr->DragDropAcceptIdCurr); + + /// + /// + /// Target item id from previous frame (we need to store this to allow for overlapping drag and drop + /// targets) + /// + /// + /// C++: + /// imgui_internal.h:2558 + ///
ImGuiID DragDropAcceptIdPrev + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiID DragDropAcceptIdPrev => ref Unsafe.AsRef(&_ptr->DragDropAcceptIdPrev); + + /// + /// + /// Last time a target expressed a desire to accept the source + /// + /// + /// C++: + /// imgui_internal.h:2559 + ///
int DragDropAcceptFrameCount + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref int DragDropAcceptFrameCount => ref Unsafe.AsRef(&_ptr->DragDropAcceptFrameCount); + + /// + /// + /// Set when holding a payload just made ButtonBehavior() return a press. + /// + /// + /// C++: + /// imgui_internal.h:2560 + ///
ImGuiID DragDropHoldJustPressedId + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImGuiID DragDropHoldJustPressedId => ref Unsafe.AsRef(&_ptr->DragDropHoldJustPressedId); + + /// + /// + /// We don't expose the ImVector<> directly, ImGuiPayload only holds pointer+size + /// + /// + /// C++: + /// imgui_internal.h:2561 + ///
ImVector<unsigned char> DragDropPayloadBufHeap + ///
+ ///
+ /// + /// + /// Drag and Drop + /// + /// + public ref ImVector DragDropPayloadBufHeap => + ref Unsafe.AsRef>(&_ptr->DragDropPayloadBufHeap); + + /// + /// Local buffer for small payloads + /// + public Span DragDropPayloadBufLocal => MemoryMarshal.CreateSpan(ref _ptr->DragDropPayloadBufLocal[0], 16); + + /// + /// + /// C++: + /// imgui_internal.h:2565 + ///
int ClipperTempDataStacked + ///
+ ///
+ /// + /// + /// Clipper + /// + /// + public ref int ClipperTempDataStacked => ref Unsafe.AsRef(&_ptr->ClipperTempDataStacked); + + /// + /// + /// C++: + /// imgui_internal.h:2566 + ///
ImVector<ImGuiListClipperData> ClipperTempData + ///
+ ///
+ /// + /// + /// Clipper + /// + /// + public ref ImVector ClipperTempData => + ref Unsafe.AsRef>(&_ptr->ClipperTempData); + + /// + /// + /// C++: + /// imgui_internal.h:2569 + ///
ImGuiTable* CurrentTable + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref ImGuiTablePtr CurrentTable => ref Unsafe.AsRef(&_ptr->CurrentTable); + + /// + /// + /// Set to break in BeginTable() call. + /// + /// + /// C++: + /// imgui_internal.h:2570 + ///
ImGuiID DebugBreakInTable + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref ImGuiID DebugBreakInTable => ref Unsafe.AsRef(&_ptr->DebugBreakInTable); + + /// + /// + /// Temporary table data size (because we leave previous instances undestructed, we generally don't use + /// TablesTempData.Size) + /// + /// + /// C++: + /// imgui_internal.h:2571 + ///
int TablesTempDataStacked + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref int TablesTempDataStacked => ref Unsafe.AsRef(&_ptr->TablesTempDataStacked); + + /// + /// + /// Temporary table data (buffers reused/shared across instances, support nesting) + /// + /// + /// C++: + /// imgui_internal.h:2572 + ///
ImVector<ImGuiTableTempData> TablesTempData + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref ImVector TablesTempData => + ref Unsafe.AsRef>(&_ptr->TablesTempData); + + /// + /// + /// Persistent table data + /// + /// + /// C++: + /// imgui_internal.h:2573 + ///
ImPool<ImGuiTable> Tables + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref ImPool Tables => ref Unsafe.AsRef>(&_ptr->Tables); + + /// + /// + /// Last used timestamp of each tables (SOA, for efficient GC) + /// + /// + /// C++: + /// imgui_internal.h:2574 + ///
ImVector<float> TablesLastTimeActive + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref ImVector TablesLastTimeActive => + ref Unsafe.AsRef>(&_ptr->TablesLastTimeActive); + + /// + /// + /// C++: + /// imgui_internal.h:2575 + ///
ImVector<ImDrawChannel> DrawChannelsTempMergeBuffer + ///
+ ///
+ /// + /// + /// Tables + /// + /// + public ref ImVector DrawChannelsTempMergeBuffer => + ref Unsafe.AsRef>(&_ptr->DrawChannelsTempMergeBuffer); + + /// + /// + /// C++: + /// imgui_internal.h:2578 + ///
ImGuiTabBar* CurrentTabBar + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + public ref ImGuiTabBarPtr CurrentTabBar => ref Unsafe.AsRef(&_ptr->CurrentTabBar); + + /// + /// + /// C++: + /// imgui_internal.h:2579 + ///
ImPool<ImGuiTabBar> TabBars + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + public ref ImPool TabBars => ref Unsafe.AsRef>(&_ptr->TabBars); + + /// + /// + /// C++: + /// imgui_internal.h:2580 + ///
ImVector<ImGuiPtrOrIndex> CurrentTabBarStack + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + public ref ImVector CurrentTabBarStack => + ref Unsafe.AsRef>(&_ptr->CurrentTabBarStack); + + /// + /// + /// C++: + /// imgui_internal.h:2581 + ///
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer + ///
+ ///
+ /// + /// + /// Tab bars + /// + /// + public ref ImVector ShrinkWidthBuffer => + ref Unsafe.AsRef>(&_ptr->ShrinkWidthBuffer); + + /// + /// + /// C++: + /// imgui_internal.h:2584 + ///
ImGuiBoxSelectState BoxSelectState + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + public ref ImGuiBoxSelectState BoxSelectState => ref Unsafe.AsRef(&_ptr->BoxSelectState); + + /// + /// + /// C++: + /// imgui_internal.h:2585 + ///
ImGuiMultiSelectTempData* CurrentMultiSelect + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + public ref ImGuiMultiSelectTempDataPtr CurrentMultiSelect => + ref Unsafe.AsRef(&_ptr->CurrentMultiSelect); + + /// + /// + /// Temporary multi-select data size (because we leave previous instances undestructed, we generally don't + /// use MultiSelectTempData.Size) + /// + /// + /// C++: + /// imgui_internal.h:2586 + ///
int MultiSelectTempDataStacked + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + public ref int MultiSelectTempDataStacked => ref Unsafe.AsRef(&_ptr->MultiSelectTempDataStacked); + + /// + /// + /// C++: + /// imgui_internal.h:2587 + ///
ImVector<ImGuiMultiSelectTempData> MultiSelectTempData + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + public ref ImVector MultiSelectTempData => + ref Unsafe.AsRef>(&_ptr->MultiSelectTempData); + + /// + /// + /// C++: + /// imgui_internal.h:2588 + ///
ImPool<ImGuiMultiSelectState> MultiSelectStorage + ///
+ ///
+ /// + /// + /// Multi-Select state + /// + /// + public ref ImPool MultiSelectStorage => + ref Unsafe.AsRef>(&_ptr->MultiSelectStorage); + + /// + /// + /// C++: + /// imgui_internal.h:2591 + ///
ImGuiID HoverItemDelayId + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + public ref ImGuiID HoverItemDelayId => ref Unsafe.AsRef(&_ptr->HoverItemDelayId); + + /// + /// + /// C++: + /// imgui_internal.h:2592 + ///
ImGuiID HoverItemDelayIdPreviousFrame + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + public ref ImGuiID HoverItemDelayIdPreviousFrame => + ref Unsafe.AsRef(&_ptr->HoverItemDelayIdPreviousFrame); + + /// + /// + /// Currently used by IsItemHovered() + /// + /// + /// C++: + /// imgui_internal.h:2593 + ///
float HoverItemDelayTimer + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + public ref float HoverItemDelayTimer => ref Unsafe.AsRef(&_ptr->HoverItemDelayTimer); + + /// + /// + /// Currently used by IsItemHovered(): grace time before g.TooltipHoverTimer gets cleared. + /// + /// + /// C++: + /// imgui_internal.h:2594 + ///
float HoverItemDelayClearTimer + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + public ref float HoverItemDelayClearTimer => ref Unsafe.AsRef(&_ptr->HoverItemDelayClearTimer); + + /// + /// + /// Mouse has once been stationary on this item. Only reset after departing the item. + /// + /// + /// C++: + /// imgui_internal.h:2595 + ///
ImGuiID HoverItemUnlockedStationaryId + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + public ref ImGuiID HoverItemUnlockedStationaryId => + ref Unsafe.AsRef(&_ptr->HoverItemUnlockedStationaryId); + + /// + /// + /// Mouse has once been stationary on this window. Only reset after departing the window. + /// + /// + /// C++: + /// imgui_internal.h:2596 + ///
ImGuiID HoverWindowUnlockedStationaryId + ///
+ ///
+ /// + /// + /// Hover Delay system + /// + /// + public ref ImGuiID HoverWindowUnlockedStationaryId => + ref Unsafe.AsRef(&_ptr->HoverWindowUnlockedStationaryId); + + /// + /// + /// C++: + /// imgui_internal.h:2599 + ///
ImGuiMouseCursor MouseCursor + ///
+ ///
+ /// + /// + /// Mouse state + /// + /// + public ref ImGuiMouseCursor MouseCursor => ref Unsafe.AsRef(&_ptr->MouseCursor); + + /// + /// + /// Time the mouse has been stationary (with some loose heuristic) + /// + /// + /// C++: + /// imgui_internal.h:2600 + ///
float MouseStationaryTimer + ///
+ ///
+ /// + /// + /// Mouse state + /// + /// + public ref float MouseStationaryTimer => ref Unsafe.AsRef(&_ptr->MouseStationaryTimer); + + /// + /// + /// C++: + /// imgui_internal.h:2601 + ///
ImVec2 MouseLastValidPos + ///
+ ///
+ /// + /// + /// Mouse state + /// + /// + public ref float2 MouseLastValidPos => ref Unsafe.AsRef(&_ptr->MouseLastValidPos); + + /// + /// + /// C++: + /// imgui_internal.h:2604 + ///
ImGuiInputTextState InputTextState + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiInputTextState InputTextState => ref Unsafe.AsRef(&_ptr->InputTextState); + + /// + /// + /// C++: + /// imgui_internal.h:2605 + ///
ImGuiInputTextDeactivatedState InputTextDeactivatedState + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiInputTextDeactivatedState InputTextDeactivatedState => + ref Unsafe.AsRef(&_ptr->InputTextDeactivatedState); + + /// + /// + /// C++: + /// imgui_internal.h:2606 + ///
ImFontBaked InputTextPasswordFontBackupBaked + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImFontBaked InputTextPasswordFontBackupBaked => + ref Unsafe.AsRef(&_ptr->InputTextPasswordFontBackupBaked); + + /// + /// + /// C++: + /// imgui_internal.h:2607 + ///
ImFontFlags InputTextPasswordFontBackupFlags + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImFontFlags InputTextPasswordFontBackupFlags => + ref Unsafe.AsRef(&_ptr->InputTextPasswordFontBackupFlags); + + /// + /// + /// Temporary text input when CTRL+clicking on a slider, etc. + /// + /// + /// C++: + /// imgui_internal.h:2608 + ///
ImGuiID TempInputId + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiID TempInputId => ref Unsafe.AsRef(&_ptr->TempInputId); + + /// + /// + /// 0 for all data types + /// + /// + /// C++: + /// imgui_internal.h:2609 + ///
ImGuiDataTypeStorage DataTypeZeroValue + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiDataTypeStorage DataTypeZeroValue => + ref Unsafe.AsRef(&_ptr->DataTypeZeroValue); + + /// + /// + /// C++: + /// imgui_internal.h:2610 + ///
int BeginMenuDepth + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref int BeginMenuDepth => ref Unsafe.AsRef(&_ptr->BeginMenuDepth); + + /// + /// + /// C++: + /// imgui_internal.h:2611 + ///
int BeginComboDepth + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref int BeginComboDepth => ref Unsafe.AsRef(&_ptr->BeginComboDepth); + + /// + /// + /// Store user options for color edit widgets + /// + /// + /// C++: + /// imgui_internal.h:2612 + ///
ImGuiColorEditFlags ColorEditOptions + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiColorEditFlags ColorEditOptions => + ref Unsafe.AsRef(&_ptr->ColorEditOptions); + + /// + /// + /// Set temporarily while inside of the parent-most ColorEdit4/ColorPicker4 (because they call each others). + /// + /// + /// C++: + /// imgui_internal.h:2613 + ///
ImGuiID ColorEditCurrentID + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiID ColorEditCurrentID => ref Unsafe.AsRef(&_ptr->ColorEditCurrentID); + + /// + /// + /// ID we are saving/restoring HS for + /// + /// + /// C++: + /// imgui_internal.h:2614 + ///
ImGuiID ColorEditSavedID + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiID ColorEditSavedID => ref Unsafe.AsRef(&_ptr->ColorEditSavedID); + + /// + /// + /// Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips + /// + /// + /// C++: + /// imgui_internal.h:2615 + ///
float ColorEditSavedHue + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float ColorEditSavedHue => ref Unsafe.AsRef(&_ptr->ColorEditSavedHue); + + /// + /// + /// Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV + /// round trips + /// + /// + /// C++: + /// imgui_internal.h:2616 + ///
float ColorEditSavedSat + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float ColorEditSavedSat => ref Unsafe.AsRef(&_ptr->ColorEditSavedSat); + + /// + /// + /// RGB value with alpha set to 0. + /// + /// + /// C++: + /// imgui_internal.h:2617 + ///
ImU32 ColorEditSavedColor + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref uint ColorEditSavedColor => ref Unsafe.AsRef(&_ptr->ColorEditSavedColor); + + /// + /// + /// Initial/reference color at the time of opening the color picker. + /// + /// + /// C++: + /// imgui_internal.h:2618 + ///
ImVec4 ColorPickerRef + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float4 ColorPickerRef => ref Unsafe.AsRef(&_ptr->ColorPickerRef); + + /// + /// + /// C++: + /// imgui_internal.h:2619 + ///
ImGuiComboPreviewData ComboPreviewData + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiComboPreviewData ComboPreviewData => + ref Unsafe.AsRef(&_ptr->ComboPreviewData); + + /// + /// + /// Expected border rect, switch to relative edit if moving + /// + /// + /// C++: + /// imgui_internal.h:2620 + ///
ImRect WindowResizeBorderExpectedRect + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref floatRect WindowResizeBorderExpectedRect => + ref Unsafe.AsRef(&_ptr->WindowResizeBorderExpectedRect); + + /// + /// + /// C++: + /// imgui_internal.h:2621 + ///
bool WindowResizeRelativeMode + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref bool WindowResizeRelativeMode => ref Unsafe.AsRef(&_ptr->WindowResizeRelativeMode); + + /// + /// + /// 0: scroll to clicked location, -1/+1: prev/next page. + /// + /// + /// C++: + /// imgui_internal.h:2622 + ///
short ScrollbarSeekMode + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref short ScrollbarSeekMode => ref Unsafe.AsRef(&_ptr->ScrollbarSeekMode); + + /// + /// + /// When scrolling to mouse location: distance between mouse and center of grab box, normalized in parent + /// space. + /// + /// + /// C++: + /// imgui_internal.h:2623 + ///
float ScrollbarClickDeltaToGrabCenter + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float ScrollbarClickDeltaToGrabCenter => + ref Unsafe.AsRef(&_ptr->ScrollbarClickDeltaToGrabCenter); + + /// + /// + /// C++: + /// imgui_internal.h:2624 + ///
float SliderGrabClickOffset + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float SliderGrabClickOffset => ref Unsafe.AsRef(&_ptr->SliderGrabClickOffset); + + /// + /// + /// Accumulated slider delta when using navigation controls. + /// + /// + /// C++: + /// imgui_internal.h:2625 + ///
float SliderCurrentAccum + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float SliderCurrentAccum => ref Unsafe.AsRef(&_ptr->SliderCurrentAccum); + + /// + /// + /// Has the accumulated slider delta changed since last time we tried to apply it? + /// + /// + /// C++: + /// imgui_internal.h:2626 + ///
bool SliderCurrentAccumDirty + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref bool SliderCurrentAccumDirty => ref Unsafe.AsRef(&_ptr->SliderCurrentAccumDirty); + + /// + /// + /// C++: + /// imgui_internal.h:2627 + ///
bool DragCurrentAccumDirty + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref bool DragCurrentAccumDirty => ref Unsafe.AsRef(&_ptr->DragCurrentAccumDirty); + + /// + /// + /// Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings + /// + /// + /// C++: + /// imgui_internal.h:2628 + ///
float DragCurrentAccum + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float DragCurrentAccum => ref Unsafe.AsRef(&_ptr->DragCurrentAccum); + + /// + /// + /// If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio + /// + /// + /// C++: + /// imgui_internal.h:2629 + ///
float DragSpeedDefaultRatio + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float DragSpeedDefaultRatio => ref Unsafe.AsRef(&_ptr->DragSpeedDefaultRatio); + + /// + /// + /// Backup for style.Alpha for BeginDisabled() + /// + /// + /// C++: + /// imgui_internal.h:2630 + ///
float DisabledAlphaBackup + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref float DisabledAlphaBackup => ref Unsafe.AsRef(&_ptr->DisabledAlphaBackup); + + /// + /// + /// C++: + /// imgui_internal.h:2631 + ///
short DisabledStackSize + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref short DisabledStackSize => ref Unsafe.AsRef(&_ptr->DisabledStackSize); + + /// + /// + /// C++: + /// imgui_internal.h:2632 + ///
short TooltipOverrideCount + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref short TooltipOverrideCount => ref Unsafe.AsRef(&_ptr->TooltipOverrideCount); + + /// + /// + /// Window of last tooltip submitted during the frame + /// + /// + /// C++: + /// imgui_internal.h:2633 + ///
ImGuiWindow* TooltipPreviousWindow + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiWindowPtr TooltipPreviousWindow => + ref Unsafe.AsRef(&_ptr->TooltipPreviousWindow); + + /// + /// + /// If no custom clipboard handler is defined + /// + /// + /// C++: + /// imgui_internal.h:2634 + ///
ImVector<char> ClipboardHandlerData + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImVector ClipboardHandlerData => ref Unsafe.AsRef>(&_ptr->ClipboardHandlerData); + + /// + /// + /// A list of menu IDs that were rendered at least once + /// + /// + /// C++: + /// imgui_internal.h:2635 + ///
ImVector<ImGuiID> MenusIdSubmittedThisFrame + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImVector MenusIdSubmittedThisFrame => + ref Unsafe.AsRef>(&_ptr->MenusIdSubmittedThisFrame); + + /// + /// + /// State for GetTypingSelectRequest() + /// + /// + /// C++: + /// imgui_internal.h:2636 + ///
ImGuiTypingSelectState TypingSelectState + ///
+ ///
+ /// + /// + /// Widget state + /// + /// + public ref ImGuiTypingSelectState TypingSelectState => + ref Unsafe.AsRef(&_ptr->TypingSelectState); + + /// + /// + /// Data updated by current frame. Will be applied at end of the frame. For some backends, this is required + /// to have WantVisible=true in order to receive text message. + /// + /// + /// C++: + /// imgui_internal.h:2639 + ///
ImGuiPlatformImeData PlatformImeData + ///
+ ///
+ /// + /// + /// Platform support + /// + /// + public ref ImGuiPlatformImeData PlatformImeData => + ref Unsafe.AsRef(&_ptr->PlatformImeData); + + /// + /// + /// Previous frame data. When changed we call the platform_io.Platform_SetImeDataFn() handler. + /// + /// + /// C++: + /// imgui_internal.h:2640 + ///
ImGuiPlatformImeData PlatformImeDataPrev + ///
+ ///
+ /// + /// + /// Platform support + /// + /// + public ref ImGuiPlatformImeData PlatformImeDataPrev => + ref Unsafe.AsRef(&_ptr->PlatformImeDataPrev); + + /// + /// + /// List of textures created/managed by user or third-party extension. Automatically appended into + /// platform_io.Textures[]. + /// + /// + /// C++: + /// imgui_internal.h:2644 + ///
ImVector<ImTextureData*> UserTextures + ///
+ ///
+ /// + /// + /// Extensions + /// FIXME: We could provide an API to register one slot in an array held in ImGuiContext? + /// + /// + public ref ImVector UserTextures => + ref Unsafe.AsRef>(&_ptr->UserTextures); + + /// + /// + /// C++: + /// imgui_internal.h:2645 + ///
ImGuiDockContext DockContext + ///
+ ///
+ /// + /// + /// Extensions + /// FIXME: We could provide an API to register one slot in an array held in ImGuiContext? + /// + /// + public ref ImGuiDockContext DockContext => ref Unsafe.AsRef(&_ptr->DockContext); + + /// + /// + /// C++: + /// imgui_internal.h:2646 + ///
+ /// void (*DockNodeWindowMenuHandler)(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) + ///
+ ///
+ /// + /// + /// Extensions + /// FIXME: We could provide an API to register one slot in an array held in ImGuiContext? + /// + /// + public ref nint DockNodeWindowMenuHandler => ref Unsafe.AsRef(&_ptr->DockNodeWindowMenuHandler); + + /// + /// + /// C++: + /// imgui_internal.h:2649 + ///
bool SettingsLoaded + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref bool SettingsLoaded => ref Unsafe.AsRef(&_ptr->SettingsLoaded); + + /// + /// + /// Save .ini Settings to memory when time reaches zero + /// + /// + /// C++: + /// imgui_internal.h:2650 + ///
float SettingsDirtyTimer + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref float SettingsDirtyTimer => ref Unsafe.AsRef(&_ptr->SettingsDirtyTimer); + + /// + /// + /// In memory .ini settings + /// + /// + /// C++: + /// imgui_internal.h:2651 + ///
ImGuiTextBuffer SettingsIniData + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref ImGuiTextBuffer SettingsIniData => ref Unsafe.AsRef(&_ptr->SettingsIniData); + + /// + /// + /// List of .ini settings handlers + /// + /// + /// C++: + /// imgui_internal.h:2652 + ///
ImVector<ImGuiSettingsHandler> SettingsHandlers + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref ImVector SettingsHandlers => + ref Unsafe.AsRef>(&_ptr->SettingsHandlers); + + /// + /// + /// ImGuiWindow .ini settings entries + /// + /// + /// C++: + /// imgui_internal.h:2653 + ///
ImChunkStream<ImGuiWindowSettings> SettingsWindows + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref ImChunkStream SettingsWindows => + ref Unsafe.AsRef>(&_ptr->SettingsWindows); + + /// + /// + /// ImGuiTable .ini settings entries + /// + /// + /// C++: + /// imgui_internal.h:2654 + ///
ImChunkStream<ImGuiTableSettings> SettingsTables + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref ImChunkStream SettingsTables => + ref Unsafe.AsRef>(&_ptr->SettingsTables); + + /// + /// + /// Hooks for extensions (e.g. test engine) + /// + /// + /// C++: + /// imgui_internal.h:2655 + ///
ImVector<ImGuiContextHook> Hooks + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref ImVector Hooks => ref Unsafe.AsRef>(&_ptr->Hooks); + + /// + /// + /// Next available HookId + /// + /// + /// C++: + /// imgui_internal.h:2656 + ///
ImGuiID HookIdNext + ///
+ ///
+ /// + /// + /// Settings + /// + /// + public ref ImGuiID HookIdNext => ref Unsafe.AsRef(&_ptr->HookIdNext); + + /// + /// + /// C++: + /// imgui_internal.h:2659 + ///
const char* LocalizationTable[ImGuiLocKey_COUNT] + ///
+ ///
+ /// + /// + /// Localization + /// + /// + public ref Ptr_byte__13 LocalizationTable => ref Unsafe.AsRef(&_ptr->LocalizationTable); + + /// + /// + /// Currently capturing + /// + /// + /// C++: + /// imgui_internal.h:2662 + ///
bool LogEnabled + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref bool LogEnabled => ref Unsafe.AsRef(&_ptr->LogEnabled); + + /// + /// + /// Capture flags/type + /// + /// + /// C++: + /// imgui_internal.h:2663 + ///
ImGuiLogFlags LogFlags + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref ImGuiLogFlags LogFlags => ref Unsafe.AsRef(&_ptr->LogFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2664 + ///
ImGuiWindow* LogWindow + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref ImGuiWindowPtr LogWindow => ref Unsafe.AsRef(&_ptr->LogWindow); + + /// + /// + /// If != NULL log to stdout/ file + /// + /// + /// C++: + /// imgui_internal.h:2665 + ///
ImFileHandle LogFile + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref ImFileHandle LogFile => ref Unsafe.AsRef(&_ptr->LogFile); + + /// + /// + /// Accumulation buffer when log to clipboard. This is pointer so our GImGui static constructor doesn't call + /// heap allocators. + /// + /// + /// C++: + /// imgui_internal.h:2666 + ///
ImGuiTextBuffer LogBuffer + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref ImGuiTextBuffer LogBuffer => ref Unsafe.AsRef(&_ptr->LogBuffer); + + /// + /// + /// C++: + /// imgui_internal.h:2667 + ///
const char* LogNextPrefix + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref Ptr LogNextPrefix => ref Unsafe.AsRef>(&_ptr->LogNextPrefix); + + /// + /// + /// C++: + /// imgui_internal.h:2668 + ///
const char* LogNextSuffix + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref Ptr LogNextSuffix => ref Unsafe.AsRef>(&_ptr->LogNextSuffix); + + /// + /// + /// C++: + /// imgui_internal.h:2669 + ///
float LogLinePosY + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref float LogLinePosY => ref Unsafe.AsRef(&_ptr->LogLinePosY); + + /// + /// + /// C++: + /// imgui_internal.h:2670 + ///
bool LogLineFirstItem + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref bool LogLineFirstItem => ref Unsafe.AsRef(&_ptr->LogLineFirstItem); + + /// + /// + /// C++: + /// imgui_internal.h:2671 + ///
int LogDepthRef + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref int LogDepthRef => ref Unsafe.AsRef(&_ptr->LogDepthRef); + + /// + /// + /// C++: + /// imgui_internal.h:2672 + ///
int LogDepthToExpand + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref int LogDepthToExpand => ref Unsafe.AsRef(&_ptr->LogDepthToExpand); + + /// + /// + /// Default/stored value for LogDepthMaxExpand if not specified in the LogXXX function call. + /// + /// + /// C++: + /// imgui_internal.h:2673 + ///
int LogDepthToExpandDefault + ///
+ ///
+ /// + /// + /// Capture/Logging + /// + /// + public ref int LogDepthToExpandDefault => ref Unsafe.AsRef(&_ptr->LogDepthToExpandDefault); + + /// + /// + /// = NULL. May be exposed in public API eventually. + /// + /// + /// C++: + /// imgui_internal.h:2676 + ///
ImGuiErrorCallback ErrorCallback + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref nint ErrorCallback => ref Unsafe.AsRef(&_ptr->ErrorCallback); + + /// + /// + /// = NULL + /// + /// + /// C++: + /// imgui_internal.h:2677 + ///
void* ErrorCallbackUserData + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref nint ErrorCallbackUserData => ref Unsafe.AsRef(&_ptr->ErrorCallbackUserData); + + /// + /// + /// C++: + /// imgui_internal.h:2678 + ///
ImVec2 ErrorTooltipLockedPos + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref float2 ErrorTooltipLockedPos => ref Unsafe.AsRef(&_ptr->ErrorTooltipLockedPos); + + /// + /// + /// C++: + /// imgui_internal.h:2679 + ///
bool ErrorFirst + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref bool ErrorFirst => ref Unsafe.AsRef(&_ptr->ErrorFirst); + + /// + /// + /// [Internal] Number of errors submitted this frame. + /// + /// + /// C++: + /// imgui_internal.h:2680 + ///
int ErrorCountCurrentFrame + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref int ErrorCountCurrentFrame => ref Unsafe.AsRef(&_ptr->ErrorCountCurrentFrame); + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui_internal.h:2681 + ///
ImGuiErrorRecoveryState StackSizesInNewFrame + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref ImGuiErrorRecoveryState StackSizesInNewFrame => + ref Unsafe.AsRef(&_ptr->StackSizesInNewFrame); + + /// + /// + /// [Internal] + /// + /// + /// C++: + /// imgui_internal.h:2682 + ///
ImGuiErrorRecoveryState*StackSizesInBeginForCurrentWindow + ///
+ ///
+ /// + /// + /// Error Handling + /// + /// + public ref ImGuiErrorRecoveryStatePtr StackSizesInBeginForCurrentWindow => + ref Unsafe.AsRef(&_ptr->StackSizesInBeginForCurrentWindow); + + /// + /// + /// Locked count (preserved when holding CTRL) + /// + /// + /// C++: + /// imgui_internal.h:2686 + ///
int DebugDrawIdConflictsCount + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref int DebugDrawIdConflictsCount => ref Unsafe.AsRef(&_ptr->DebugDrawIdConflictsCount); + + /// + /// + /// C++: + /// imgui_internal.h:2687 + ///
ImGuiDebugLogFlags DebugLogFlags + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiDebugLogFlags DebugLogFlags => ref Unsafe.AsRef(&_ptr->DebugLogFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2688 + ///
ImGuiTextBuffer DebugLogBuf + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiTextBuffer DebugLogBuf => ref Unsafe.AsRef(&_ptr->DebugLogBuf); + + /// + /// + /// C++: + /// imgui_internal.h:2689 + ///
ImGuiTextIndex DebugLogIndex + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiTextIndex DebugLogIndex => ref Unsafe.AsRef(&_ptr->DebugLogIndex); + + /// + /// + /// C++: + /// imgui_internal.h:2690 + ///
int DebugLogSkippedErrors + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref int DebugLogSkippedErrors => ref Unsafe.AsRef(&_ptr->DebugLogSkippedErrors); + + /// + /// + /// C++: + /// imgui_internal.h:2691 + ///
ImGuiDebugLogFlags DebugLogAutoDisableFlags + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiDebugLogFlags DebugLogAutoDisableFlags => + ref Unsafe.AsRef(&_ptr->DebugLogAutoDisableFlags); + + /// + /// + /// C++: + /// imgui_internal.h:2692 + ///
ImU8 DebugLogAutoDisableFrames + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref byte DebugLogAutoDisableFrames => ref Unsafe.AsRef(&_ptr->DebugLogAutoDisableFrames); + + /// + /// + /// For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot + /// above. + /// + /// + /// C++: + /// imgui_internal.h:2693 + ///
ImU8 DebugLocateFrames + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref byte DebugLocateFrames => ref Unsafe.AsRef(&_ptr->DebugLocateFrames); + + /// + /// + /// Debug break in ItemAdd() call for g.DebugLocateId. + /// + /// + /// C++: + /// imgui_internal.h:2694 + ///
bool DebugBreakInLocateId + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref bool DebugBreakInLocateId => ref Unsafe.AsRef(&_ptr->DebugBreakInLocateId); + + /// + /// + /// = ImGuiKey_Pause + /// + /// + /// C++: + /// imgui_internal.h:2695 + ///
ImGuiKeyChord DebugBreakKeyChord + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiKeyChord DebugBreakKeyChord => ref Unsafe.AsRef(&_ptr->DebugBreakKeyChord); + + /// + /// + /// Cycle between 0..9 then wrap around. + /// + /// + /// C++: + /// imgui_internal.h:2696 + ///
ImS8 DebugBeginReturnValueCullDepth + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref sbyte DebugBeginReturnValueCullDepth => + ref Unsafe.AsRef(&_ptr->DebugBeginReturnValueCullDepth); + + /// + /// + /// Item picker is active (started with DebugStartItemPicker()) + /// + /// + /// C++: + /// imgui_internal.h:2697 + ///
bool DebugItemPickerActive + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref bool DebugItemPickerActive => ref Unsafe.AsRef(&_ptr->DebugItemPickerActive); + + /// + /// + /// C++: + /// imgui_internal.h:2698 + ///
ImU8 DebugItemPickerMouseButton + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref byte DebugItemPickerMouseButton => ref Unsafe.AsRef(&_ptr->DebugItemPickerMouseButton); + + /// + /// + /// Will call IM_DEBUG_BREAK() when encountering this ID + /// + /// + /// C++: + /// imgui_internal.h:2699 + ///
ImGuiID DebugItemPickerBreakId + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiID DebugItemPickerBreakId => ref Unsafe.AsRef(&_ptr->DebugItemPickerBreakId); + + /// + /// + /// C++: + /// imgui_internal.h:2700 + ///
float DebugFlashStyleColorTime + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref float DebugFlashStyleColorTime => ref Unsafe.AsRef(&_ptr->DebugFlashStyleColorTime); + + /// + /// + /// C++: + /// imgui_internal.h:2701 + ///
ImVec4 DebugFlashStyleColorBackup + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref float4 DebugFlashStyleColorBackup => ref Unsafe.AsRef(&_ptr->DebugFlashStyleColorBackup); + + /// + /// + /// C++: + /// imgui_internal.h:2702 + ///
ImGuiMetricsConfig DebugMetricsConfig + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiMetricsConfig DebugMetricsConfig => + ref Unsafe.AsRef(&_ptr->DebugMetricsConfig); + + /// + /// + /// C++: + /// imgui_internal.h:2703 + ///
ImGuiIDStackTool DebugIDStackTool + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiIDStackTool DebugIDStackTool => ref Unsafe.AsRef(&_ptr->DebugIDStackTool); + + /// + /// + /// C++: + /// imgui_internal.h:2704 + ///
ImGuiDebugAllocInfo DebugAllocInfo + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiDebugAllocInfo DebugAllocInfo => ref Unsafe.AsRef(&_ptr->DebugAllocInfo); + + /// + /// + /// Hovered dock node. + /// + /// + /// C++: + /// imgui_internal.h:2705 + ///
ImGuiDockNode* DebugHoveredDockNode + ///
+ ///
+ /// + /// + /// Debug Tools + /// (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) + /// + /// + public ref ImGuiDockNodePtr DebugHoveredDockNode => + ref Unsafe.AsRef(&_ptr->DebugHoveredDockNode); + + /// + /// Calculate estimate of framerate for user over the last 60 frames.. + /// + public Span FramerateSecPerFrame => MemoryMarshal.CreateSpan(ref _ptr->FramerateSecPerFrame[0], 60); + + /// + /// + /// C++: + /// imgui_internal.h:2713 + ///
int FramerateSecPerFrameIdx + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int FramerateSecPerFrameIdx => ref Unsafe.AsRef(&_ptr->FramerateSecPerFrameIdx); + + /// + /// + /// C++: + /// imgui_internal.h:2714 + ///
int FramerateSecPerFrameCount + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int FramerateSecPerFrameCount => ref Unsafe.AsRef(&_ptr->FramerateSecPerFrameCount); + + /// + /// + /// C++: + /// imgui_internal.h:2715 + ///
float FramerateSecPerFrameAccum + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref float FramerateSecPerFrameAccum => ref Unsafe.AsRef(&_ptr->FramerateSecPerFrameAccum); + + /// + /// + /// Explicit capture override via SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard(). Default + /// to -1. + /// + /// + /// C++: + /// imgui_internal.h:2716 + ///
int WantCaptureMouseNextFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int WantCaptureMouseNextFrame => ref Unsafe.AsRef(&_ptr->WantCaptureMouseNextFrame); + + /// + /// + /// " + /// + /// + /// C++: + /// imgui_internal.h:2717 + ///
int WantCaptureKeyboardNextFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int WantCaptureKeyboardNextFrame => ref Unsafe.AsRef(&_ptr->WantCaptureKeyboardNextFrame); + + /// + /// + /// Copied in EndFrame() from g.PlatformImeData.WantTextInput. Needs to be set for some backends (SDL3) to + /// emit character inputs. + /// + /// + /// C++: + /// imgui_internal.h:2718 + ///
int WantTextInputNextFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int WantTextInputNextFrame => ref Unsafe.AsRef(&_ptr->WantTextInputNextFrame); + + /// + /// + /// Temporary text buffer + /// + /// + /// C++: + /// imgui_internal.h:2719 + ///
ImVector<char> TempBuffer + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref ImVector TempBuffer => ref Unsafe.AsRef>(&_ptr->TempBuffer); + public Span TempKeychordName => MemoryMarshal.CreateSpan(ref _ptr->TempKeychordName[0], 64); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiIO.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiIO.gen.cs new file mode 100644 index 0000000..30e34b5 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiIO.gen.cs @@ -0,0 +1,3997 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Main configuration and I/O between your application and ImGui (also see: ImGuiPlatformIO) + /// + /// + /// C++: + /// imgui.h:196 + ///
struct ImGuiIO + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 3064)] + public unsafe partial struct ImGuiIO + { + /// + /// + /// = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Keyboard/Gamepad navigation + /// options, etc. + /// + /// + /// C++: + /// imgui.h:2444 + ///
ImGuiConfigFlags ConfigFlags + ///
+ ///
+ [FieldOffset(0)] + public ImGuiConfigFlags ConfigFlags; + + /// + /// + /// = 0 // See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) + /// to communicate features supported by the backend. + /// + /// + /// C++: + /// imgui.h:2445 + ///
ImGuiBackendFlags BackendFlags + ///
+ ///
+ [FieldOffset(4)] + public ImGuiBackendFlags BackendFlags; + + /// + /// + /// <unset> // Main display size, in pixels (== GetMainViewport()->Size). May change every + /// frame. + /// + /// + /// C++: + /// imgui.h:2446 + ///
ImVec2 DisplaySize + ///
+ ///
+ [FieldOffset(8)] + public float2 DisplaySize; + + /// + /// + /// = (1, 1) // Main display density. For retina display where window coordinates are different from + /// framebuffer coordinates. This will affect font density + will end up in ImDrawData::FramebufferScale. + /// + /// + /// C++: + /// imgui.h:2447 + ///
ImVec2 DisplayFramebufferScale + ///
+ ///
+ [FieldOffset(16)] + public float2 DisplayFramebufferScale; + + /// + /// + /// = 1.0f/60.0f // Time elapsed since last frame, in seconds. May change every frame. + /// + /// + /// C++: + /// imgui.h:2448 + ///
float DeltaTime + ///
+ ///
+ [FieldOffset(24)] + public float DeltaTime; + + /// + /// + /// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds. + /// + /// + /// C++: + /// imgui.h:2449 + ///
float IniSavingRate + ///
+ ///
+ [FieldOffset(28)] + public float IniSavingRate; + + /// + /// + /// = "imgui.ini" // Path to .ini file (important: default "imgui.ini" is relative to current working + /// dir!). Set NULL to disable automatic .ini loading/saving or if you want to manually call + /// LoadIniSettingsXXX() / SaveIniSettingsXXX() functions. + /// + /// + /// C++: + /// imgui.h:2450 + ///
const char* IniFilename + ///
+ ///
+ [FieldOffset(32)] + public Ptr IniFilename; + + /// + /// + /// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified). + /// + /// + /// C++: + /// imgui.h:2451 + ///
const char* LogFilename + ///
+ ///
+ [FieldOffset(40)] + public Ptr LogFilename; + + /// + /// + /// = NULL // Store your own data. + /// + /// + /// C++: + /// imgui.h:2452 + ///
void* UserData + ///
+ ///
+ [FieldOffset(48)] + public nint UserData; + + /// + /// + /// <auto> // Font atlas: load, rasterize and pack one or more fonts into a single texture. + /// + /// + /// C++: + /// imgui.h:2455 + ///
ImFontAtlas*Fonts + ///
+ ///
+ /// + /// + /// Font system + /// + /// + [FieldOffset(56)] + public ImFontAtlasPtr Fonts; + + /// + /// + /// = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0]. + /// + /// + /// C++: + /// imgui.h:2456 + ///
ImFont* FontDefault + ///
+ ///
+ /// + /// + /// Font system + /// + /// + [FieldOffset(64)] + public ImFontPtr FontDefault; + + /// + /// + /// = false // [OBSOLETE] Allow user scaling text of individual window with CTRL+Wheel. + /// + /// + /// C++: + /// imgui.h:2457 + ///
bool FontAllowUserScaling + ///
+ ///
+ /// + /// + /// Font system + /// + /// + [FieldOffset(72)] + public Bool8 FontAllowUserScaling; + + /// + /// + /// = false // Swap Activate<>Cancel (A<>B) buttons, matching typical + /// "Nintendo/Japanese style" gamepad layout. + /// + /// + /// C++: + /// imgui.h:2460 + ///
bool ConfigNavSwapGamepadButtons + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(73)] + public Bool8 ConfigNavSwapGamepadButtons; + + /// + /// + /// = false // Directional/tabbing navigation teleports the mouse cursor. May be useful on + /// TV/console systems where moving a virtual mouse is difficult. Will update io.MousePos and set + /// io.WantSetMousePos=true. + /// + /// + /// C++: + /// imgui.h:2461 + ///
bool ConfigNavMoveSetMousePos + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(74)] + public Bool8 ConfigNavMoveSetMousePos; + + /// + /// + /// = true // Sets io.WantCaptureKeyboard when io.NavActive is set. + /// + /// + /// C++: + /// imgui.h:2462 + ///
bool ConfigNavCaptureKeyboard + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(75)] + public Bool8 ConfigNavCaptureKeyboard; + + /// + /// + /// = true // Pressing Escape can clear focused item + navigation id/highlight. Set to false if + /// you want to always keep highlight on. + /// + /// + /// C++: + /// imgui.h:2463 + ///
bool ConfigNavEscapeClearFocusItem + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(76)] + public Bool8 ConfigNavEscapeClearFocusItem; + + /// + /// + /// = false // Pressing Escape can clear focused window as well (super set of + /// io.ConfigNavEscapeClearFocusItem). + /// + /// + /// C++: + /// imgui.h:2464 + ///
bool ConfigNavEscapeClearFocusWindow + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(77)] + public Bool8 ConfigNavEscapeClearFocusWindow; + + /// + /// + /// = true // Using directional navigation key makes the cursor visible. Mouse click hides the + /// cursor. + /// + /// + /// C++: + /// imgui.h:2465 + ///
bool ConfigNavCursorVisibleAuto + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(78)] + public Bool8 ConfigNavCursorVisibleAuto; + + /// + /// + /// = false // Navigation cursor is always visible. + /// + /// + /// C++: + /// imgui.h:2466 + ///
bool ConfigNavCursorVisibleAlways + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + [FieldOffset(79)] + public Bool8 ConfigNavCursorVisibleAlways; + + /// + /// + /// = false // Simplified docking mode: disable window splitting, so docking is limited to merging + /// multiple windows together into tab-bars. + /// + /// + /// C++: + /// imgui.h:2469 + ///
bool ConfigDockingNoSplit + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + [FieldOffset(80)] + public Bool8 ConfigDockingNoSplit; + + /// + /// + /// = false // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider + /// space) + /// + /// + /// C++: + /// imgui.h:2470 + ///
bool ConfigDockingWithShift + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + [FieldOffset(81)] + public Bool8 ConfigDockingWithShift; + + /// + /// + /// = false // [BETA] [FIXME: This currently creates regression with auto-sizing and general + /// overhead] Make every single floating window display within a docking node. + /// + /// + /// C++: + /// imgui.h:2471 + ///
bool ConfigDockingAlwaysTabBar + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + [FieldOffset(82)] + public Bool8 ConfigDockingAlwaysTabBar; + + /// + /// + /// = false // [BETA] Make window or viewport transparent when docking and only display docking + /// boxes on the target viewport. Useful if rendering of multiple viewport cannot be synced. Best used with + /// ConfigViewportsNoAutoMerge. + /// + /// + /// C++: + /// imgui.h:2472 + ///
bool ConfigDockingTransparentPayload + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + [FieldOffset(83)] + public Bool8 ConfigDockingTransparentPayload; + + /// + /// + /// = false; // Set to make all floating imgui windows always create their own viewport. Otherwise, + /// they are merged into the main host viewports when overlapping it. May also set + /// ImGuiViewportFlags_NoAutoMerge on individual viewport. + /// + /// + /// C++: + /// imgui.h:2475 + ///
bool ConfigViewportsNoAutoMerge + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + [FieldOffset(84)] + public Bool8 ConfigViewportsNoAutoMerge; + + /// + /// + /// = false // Disable default OS task bar icon flag for secondary viewports. When a viewport + /// doesn't want a task bar icon, ImGuiViewportFlags_NoTaskBarIcon will be set on it. + /// + /// + /// C++: + /// imgui.h:2476 + ///
bool ConfigViewportsNoTaskBarIcon + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + [FieldOffset(85)] + public Bool8 ConfigViewportsNoTaskBarIcon; + + /// + /// + /// = true // Disable default OS window decoration flag for secondary viewports. When a viewport + /// doesn't want window decorations, ImGuiViewportFlags_NoDecoration will be set on it. Enabling decoration + /// can create subsequent issues at OS levels (e.g. minimum window size). + /// + /// + /// C++: + /// imgui.h:2477 + ///
bool ConfigViewportsNoDecoration + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + [FieldOffset(86)] + public Bool8 ConfigViewportsNoDecoration; + + /// + /// + /// = false // Disable default OS parenting to main viewport for secondary viewports. By default, + /// viewports are marked with ParentViewportId = <main_viewport>, expecting the platform backend to + /// setup a parent/child relationship between the OS windows (some backend may ignore this). Set to true if + /// you want the default to be 0, then all viewports will be top-level OS windows. + /// + /// + /// C++: + /// imgui.h:2478 + ///
bool ConfigViewportsNoDefaultParent + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + [FieldOffset(87)] + public Bool8 ConfigViewportsNoDefaultParent; + + /// + /// + /// = true // When a platform window is focused (e.g. using Alt+Tab, clicking Platform Title Bar), apply + /// corresponding focus on imgui windows (may clear focus/active id from imgui windows location in other + /// platform windows). In principle this is better enabled but we provide an opt-out, because some Linux + /// window managers tend to eagerly focus windows (e.g. on mouse hover, or even a simple window pos/size + /// change). + /// + /// + /// C++: + /// imgui.h:2479 + ///
bool ConfigViewportPlatformFocusSetsImGuiFocus + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + [FieldOffset(88)] + public Bool8 ConfigViewportPlatformFocusSetsImGuiFocus; + + /// + /// + /// = false // [EXPERIMENTAL] Automatically overwrite style.FontScaleDpi when Monitor DPI changes. + /// This will scale fonts but _NOT_ scale sizes/padding for now. + /// + /// + /// C++: + /// imgui.h:2483 + ///
bool ConfigDpiScaleFonts + ///
+ ///
+ /// + /// + /// DPI/Scaling options + /// This may keep evolving during 1.92.x releases. Expect some turbulence. + /// + /// + [FieldOffset(89)] + public Bool8 ConfigDpiScaleFonts; + + /// + /// + /// = false // [EXPERIMENTAL] Scale Dear ImGui and Platform Windows when Monitor DPI changes. + /// + /// + /// C++: + /// imgui.h:2484 + ///
bool ConfigDpiScaleViewports + ///
+ ///
+ /// + /// + /// DPI/Scaling options + /// This may keep evolving during 1.92.x releases. Expect some turbulence. + /// + /// + [FieldOffset(90)] + public Bool8 ConfigDpiScaleViewports; + + /// + /// + /// = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a + /// mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend + /// implementations. + /// + /// + /// C++: + /// imgui.h:2488 + ///
bool MouseDrawCursor + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(91)] + public Bool8 MouseDrawCursor; + + /// + /// + /// = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt + /// instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows + /// instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in + /// lists uses Cmd/Super instead of Ctrl. + /// + /// + /// C++: + /// imgui.h:2489 + ///
bool ConfigMacOSXBehaviors + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(92)] + public Bool8 ConfigMacOSXBehaviors; + + /// + /// + /// = true // Enable input queue trickling: some types of events submitted during the same frame + /// (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates. + /// + /// + /// C++: + /// imgui.h:2490 + ///
bool ConfigInputTrickleEventQueue + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(93)] + public Bool8 ConfigInputTrickleEventQueue; + + /// + /// + /// = true // Enable blinking cursor (optional as some users consider it to be distracting). + /// + /// + /// C++: + /// imgui.h:2491 + ///
bool ConfigInputTextCursorBlink + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(94)] + public Bool8 ConfigInputTextCursorBlink; + + /// + /// + /// = false // [BETA] Pressing Enter will keep item active and select contents (single-line only). + /// + /// + /// C++: + /// imgui.h:2492 + ///
bool ConfigInputTextEnterKeepActive + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(95)] + public Bool8 ConfigInputTextEnterKeepActive; + + /// + /// + /// = false // [BETA] Enable turning DragXXX widgets into text input with a simple mouse + /// click-release (without moving). Not desirable on devices without a keyboard. + /// + /// + /// C++: + /// imgui.h:2493 + ///
bool ConfigDragClickToInputText + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(96)] + public Bool8 ConfigDragClickToInputText; + + /// + /// + /// = true // Enable resizing of windows from their edges and from the lower-left corner. This + /// requires ImGuiBackendFlags_HasMouseCursors for better mouse cursor feedback. (This used to be a + /// per-window ImGuiWindowFlags_ResizeFromAnySide flag) + /// + /// + /// C++: + /// imgui.h:2494 + ///
bool ConfigWindowsResizeFromEdges + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(97)] + public Bool8 ConfigWindowsResizeFromEdges; + + /// + /// + /// = false // Enable allowing to move windows only when clicking on their title bar. Does not apply to + /// windows without a title bar. + /// + /// + /// C++: + /// imgui.h:2495 + ///
bool ConfigWindowsMoveFromTitleBarOnly + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(98)] + public Bool8 ConfigWindowsMoveFromTitleBarOnly; + + /// + /// + /// = false // [EXPERIMENTAL] CTRL+C copy the contents of focused window into the clipboard. + /// Experimental because: (1) has known issues with nested Begin/End pairs (2) text output quality varies + /// (3) text output is in submission order rather than spatial order. + /// + /// + /// C++: + /// imgui.h:2496 + ///
bool ConfigWindowsCopyContentsWithCtrlC + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(99)] + public Bool8 ConfigWindowsCopyContentsWithCtrlC; + + /// + /// + /// = true // Enable scrolling page by page when clicking outside the scrollbar grab. When + /// disabled, always scroll to clicked location. When enabled, Shift+Click scrolls to clicked location. + /// + /// + /// C++: + /// imgui.h:2497 + ///
bool ConfigScrollbarScrollByPage + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(100)] + public Bool8 ConfigScrollbarScrollByPage; + + /// + /// + /// = 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set + /// to -1.0f to disable. + /// + /// + /// C++: + /// imgui.h:2498 + ///
float ConfigMemoryCompactTimer + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + [FieldOffset(104)] + public float ConfigMemoryCompactTimer; + + /// + /// + /// = 0.30f // Time for a double-click, in seconds. + /// + /// + /// C++: + /// imgui.h:2502 + ///
float MouseDoubleClickTime + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + [FieldOffset(108)] + public float MouseDoubleClickTime; + + /// + /// + /// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels. + /// + /// + /// C++: + /// imgui.h:2503 + ///
float MouseDoubleClickMaxDist + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + [FieldOffset(112)] + public float MouseDoubleClickMaxDist; + + /// + /// + /// = 6.0f // Distance threshold before considering we are dragging. + /// + /// + /// C++: + /// imgui.h:2504 + ///
float MouseDragThreshold + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + [FieldOffset(116)] + public float MouseDragThreshold; + + /// + /// + /// = 0.275f // When holding a key/button, time before it starts repeating, in seconds (for buttons + /// in Repeat mode, etc.). + /// + /// + /// C++: + /// imgui.h:2505 + ///
float KeyRepeatDelay + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + [FieldOffset(120)] + public float KeyRepeatDelay; + + /// + /// + /// = 0.050f // When holding a key/button, rate at which it repeats, in seconds. + /// + /// + /// C++: + /// imgui.h:2506 + ///
float KeyRepeatRate + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + [FieldOffset(124)] + public float KeyRepeatRate; + + /// + /// + /// = true // Enable error recovery support. Some errors won't be detected and lead to direct crashes + /// if recovery is disabled. + /// + /// + /// C++: + /// imgui.h:2526 + ///
bool ConfigErrorRecovery + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + [FieldOffset(128)] + public Bool8 ConfigErrorRecovery; + + /// + /// + /// = true // Enable asserts on recoverable error. By default call IM_ASSERT() when returning from a + /// failing IM_ASSERT_USER_ERROR() + /// + /// + /// C++: + /// imgui.h:2527 + ///
bool ConfigErrorRecoveryEnableAssert + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + [FieldOffset(129)] + public Bool8 ConfigErrorRecoveryEnableAssert; + + /// + /// + /// = true // Enable debug log output on recoverable errors. + /// + /// + /// C++: + /// imgui.h:2528 + ///
bool ConfigErrorRecoveryEnableDebugLog + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + [FieldOffset(130)] + public Bool8 ConfigErrorRecoveryEnableDebugLog; + + /// + /// + /// = true // Enable tooltip on recoverable errors. The tooltip include a way to enable asserts if + /// they were disabled. + /// + /// + /// C++: + /// imgui.h:2529 + ///
bool ConfigErrorRecoveryEnableTooltip + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + [FieldOffset(131)] + public Bool8 ConfigErrorRecoveryEnableTooltip; + + /// + /// + /// = false // Enable various tools calling IM_DEBUG_BREAK(). + /// + /// + /// C++: + /// imgui.h:2535 + ///
bool ConfigDebugIsDebuggerPresent + ///
+ ///
+ /// + /// + /// Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro. + /// - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability. + /// - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application. + /// e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version). + /// + /// + [FieldOffset(132)] + public Bool8 ConfigDebugIsDebuggerPresent; + + /// + /// + /// = true // Highlight and show an error message popup when multiple items have conflicting + /// identifiers. + /// + /// + /// C++: + /// imgui.h:2541 + ///
bool ConfigDebugHighlightIdConflicts + ///
+ ///
+ /// + /// + /// Tools to detect code submitting items with conflicting/duplicate IDs + /// - Code should use PushID()/PopID() in loops, or append "##xx" to same-label identifiers. + /// - Empty label e.g. Button("") == same ID as parent widget/node. Use Button("##xx") instead! + /// - See FAQ https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-about-the-id-stack-system + /// + /// + [FieldOffset(133)] + public Bool8 ConfigDebugHighlightIdConflicts; + + /// + /// + /// =true // Show "Item Picker" button in aforementioned popup. + /// + /// + /// C++: + /// imgui.h:2542 + ///
bool ConfigDebugHighlightIdConflictsShowItemPicker + ///
+ ///
+ /// + /// + /// Tools to detect code submitting items with conflicting/duplicate IDs + /// - Code should use PushID()/PopID() in loops, or append "##xx" to same-label identifiers. + /// - Empty label e.g. Button("") == same ID as parent widget/node. Use Button("##xx") instead! + /// - See FAQ https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-about-the-id-stack-system + /// + /// + [FieldOffset(134)] + public Bool8 ConfigDebugHighlightIdConflictsShowItemPicker; + + /// + /// + /// = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT + /// APPLICATION BOOT TIME if you don't want to miss windows. + /// + /// + /// C++: + /// imgui.h:2548 + ///
bool ConfigDebugBeginReturnValueOnce + ///
+ ///
+ /// + /// + /// Tools to test correct Begin/End and BeginChild/EndChild behaviors. + /// - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX() + /// - This is inconsistent with other BeginXXX functions and create confusion for many users. + /// - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior. + /// + /// + [FieldOffset(135)] + public Bool8 ConfigDebugBeginReturnValueOnce; + + /// + /// + /// = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window + /// depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop + /// then occasionally press SHIFT. Windows should be flickering while running. + /// + /// + /// C++: + /// imgui.h:2549 + ///
bool ConfigDebugBeginReturnValueLoop + ///
+ ///
+ /// + /// + /// Tools to test correct Begin/End and BeginChild/EndChild behaviors. + /// - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX() + /// - This is inconsistent with other BeginXXX functions and create confusion for many users. + /// - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior. + /// + /// + [FieldOffset(136)] + public Bool8 ConfigDebugBeginReturnValueLoop; + + /// + /// + /// = false // Ignore io.AddFocusEvent(false), consequently not calling + /// io.ClearInputKeys()/io.ClearInputMouse() in input processing. + /// + /// + /// C++: + /// imgui.h:2554 + ///
bool ConfigDebugIgnoreFocusLoss + ///
+ ///
+ /// + /// + /// Option to deactivate io.AddFocusEvent(false) handling. + /// - May facilitate interactions with a debugger when focus loss leads to clearing inputs data. + /// - Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them. + /// + /// + [FieldOffset(137)] + public Bool8 ConfigDebugIgnoreFocusLoss; + + /// + /// + /// = false // Save .ini data with extra comments (particularly helpful for Docking, but makes + /// saving slower) + /// + /// + /// C++: + /// imgui.h:2557 + ///
bool ConfigDebugIniSettings + ///
+ ///
+ /// + /// + /// Option to audit .ini data + /// + /// + [FieldOffset(138)] + public Bool8 ConfigDebugIniSettings; + + /// + /// + /// = NULL + /// + /// + /// C++: + /// imgui.h:2566 + ///
const char* BackendPlatformName + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + [FieldOffset(144)] + public Ptr BackendPlatformName; + + /// + /// + /// = NULL + /// + /// + /// C++: + /// imgui.h:2567 + ///
const char* BackendRendererName + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + [FieldOffset(152)] + public Ptr BackendRendererName; + + /// + /// + /// = NULL // User data for platform backend + /// + /// + /// C++: + /// imgui.h:2568 + ///
void* BackendPlatformUserData + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + [FieldOffset(160)] + public nint BackendPlatformUserData; + + /// + /// + /// = NULL // User data for renderer backend + /// + /// + /// C++: + /// imgui.h:2569 + ///
void* BackendRendererUserData + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + [FieldOffset(168)] + public nint BackendRendererUserData; + + /// + /// + /// = NULL // User data for non C++ programming language backend + /// + /// + /// C++: + /// imgui.h:2570 + ///
void* BackendLanguageUserData + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + [FieldOffset(176)] + public nint BackendLanguageUserData; + + /// + /// + /// Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main + /// game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering + /// over an imgui window, widget is active, mouse was clicked over an imgui window, etc.). + /// + /// + /// C++: + /// imgui.h:2604 + ///
bool WantCaptureMouse + ///
+ ///
+ [FieldOffset(184)] + public Bool8 WantCaptureMouse; + + /// + /// + /// Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main + /// game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui + /// window is focused and navigation is enabled, etc.). + /// + /// + /// C++: + /// imgui.h:2605 + ///
bool WantCaptureKeyboard + ///
+ ///
+ [FieldOffset(185)] + public Bool8 WantCaptureKeyboard; + + /// + /// + /// Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants + /// textual keyboard input to happen (e.g. when a InputText widget is active). + /// + /// + /// C++: + /// imgui.h:2606 + ///
bool WantTextInput + ///
+ ///
+ [FieldOffset(186)] + public Bool8 WantTextInput; + + /// + /// + /// MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when + /// io.ConfigNavMoveSetMousePos is enabled. + /// + /// + /// C++: + /// imgui.h:2607 + ///
bool WantSetMousePos + ///
+ ///
+ [FieldOffset(187)] + public Bool8 WantSetMousePos; + + /// + /// + /// When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your + /// application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear + /// io.WantSaveIniSettings yourself after saving! + /// + /// + /// C++: + /// imgui.h:2608 + ///
bool WantSaveIniSettings + ///
+ ///
+ [FieldOffset(188)] + public Bool8 WantSaveIniSettings; + + /// + /// + /// Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is + /// focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag. + /// + /// + /// C++: + /// imgui.h:2609 + ///
bool NavActive + ///
+ ///
+ [FieldOffset(189)] + public Bool8 NavActive; + + /// + /// + /// Keyboard/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events). + /// + /// + /// C++: + /// imgui.h:2610 + ///
bool NavVisible + ///
+ ///
+ [FieldOffset(190)] + public Bool8 NavVisible; + + /// + /// + /// Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per + /// second. Solely for convenience. Slow applications may not want to use a moving average or may want to + /// reset underlying buffers occasionally. + /// + /// + /// C++: + /// imgui.h:2611 + ///
float Framerate + ///
+ ///
+ [FieldOffset(192)] + public float Framerate; + + /// + /// + /// Vertices output during last call to Render() + /// + /// + /// C++: + /// imgui.h:2612 + ///
int MetricsRenderVertices + ///
+ ///
+ [FieldOffset(196)] + public int MetricsRenderVertices; + + /// + /// + /// Indices output during last call to Render() = number of triangles * 3 + /// + /// + /// C++: + /// imgui.h:2613 + ///
int MetricsRenderIndices + ///
+ ///
+ [FieldOffset(200)] + public int MetricsRenderIndices; + + /// + /// + /// Number of visible windows + /// + /// + /// C++: + /// imgui.h:2614 + ///
int MetricsRenderWindows + ///
+ ///
+ [FieldOffset(204)] + public int MetricsRenderWindows; + + /// + /// + /// Number of active windows + /// + /// + /// C++: + /// imgui.h:2615 + ///
int MetricsActiveWindows + ///
+ ///
+ [FieldOffset(208)] + public int MetricsActiveWindows; + + /// + /// + /// Mouse delta. Note that this is zero if either current or previous position are invalid + /// (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. + /// + /// + /// C++: + /// imgui.h:2616 + ///
ImVec2 MouseDelta + ///
+ ///
+ [FieldOffset(212)] + public float2 MouseDelta; + + /// + /// + /// Parent UI context (needs to be set explicitly by parent). + /// + /// + /// C++: + /// imgui.h:2622 + ///
ImGuiContext* Ctx + ///
+ ///
+ [FieldOffset(224)] + public ImGuiContextPtr Ctx; + + /// + /// + /// Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, + /// etc.) + /// + /// + /// C++: + /// imgui.h:2627 + ///
ImVec2 MousePos + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(232)] + public float2 MousePos; + + /// + /// + /// Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses + /// left and right buttons. Other buttons allow us to track if the mouse is being used by your application + + /// available to user as a convenience via IsMouse** API. + /// + /// + /// C++: + /// imgui.h:2628 + ///
bool MouseDown[5] + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(240)] + public Bool8_5 MouseDown; + + /// + /// + /// Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold + /// SHIFT to turn vertical scroll into horizontal scroll. + /// + /// + /// C++: + /// imgui.h:2629 + ///
float MouseWheel + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(248)] + public float MouseWheel; + + /// + /// + /// Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a + /// horizontal wheel, may not be filled by all backends. + /// + /// + /// C++: + /// imgui.h:2630 + ///
float MouseWheelH + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(252)] + public float MouseWheelH; + + /// + /// + /// Mouse actual input peripheral (Mouse/TouchScreen/Pen). + /// + /// + /// C++: + /// imgui.h:2631 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(256)] + public ImGuiMouseSource MouseSource; + + /// + /// + /// (Optional) Modify using io.AddMouseViewportEvent(). With multi-viewports: viewport the OS mouse is + /// hovering. If possible _IGNORING_ viewports with the ImGuiViewportFlags_NoInputs flag is much better (few + /// backends can handle that). Set io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport if you can + /// provide this info. If you don't imgui will infer the value using the rectangles and last focused time of + /// the viewports it knows about (ignoring other OS windows). + /// + /// + /// C++: + /// imgui.h:2632 + ///
ImGuiID MouseHoveredViewport + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(260)] + public ImGuiID MouseHoveredViewport; + + /// + /// + /// Keyboard modifier down: Ctrl (non-macOS), Cmd (macOS) + /// + /// + /// C++: + /// imgui.h:2633 + ///
bool KeyCtrl + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(264)] + public Bool8 KeyCtrl; + + /// + /// + /// Keyboard modifier down: Shift + /// + /// + /// C++: + /// imgui.h:2634 + ///
bool KeyShift + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(265)] + public Bool8 KeyShift; + + /// + /// + /// Keyboard modifier down: Alt + /// + /// + /// C++: + /// imgui.h:2635 + ///
bool KeyAlt + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(266)] + public Bool8 KeyAlt; + + /// + /// + /// Keyboard modifier down: Windows/Super (non-macOS), Ctrl (macOS) + /// + /// + /// C++: + /// imgui.h:2636 + ///
bool KeySuper + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + [FieldOffset(267)] + public Bool8 KeySuper; + + /// + /// + /// Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as + /// io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. Read-only, updated by NewFrame() + /// + /// + /// C++: + /// imgui.h:2639 + ///
ImGuiKeyChord KeyMods + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(268)] + public ImGuiKeyChord KeyMods; + + /// + /// + /// Key state for all known keys. MUST use 'key - ImGuiKey_NamedKey_BEGIN' as index. Use IsKeyXXX() + /// functions to access this. + /// + /// + /// C++: + /// imgui.h:2640 + ///
ImGuiKeyData KeysData[ImGuiKey_NamedKey_COUNT] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(272)] + public ImGuiKeyData_155 KeysData; + + /// + /// + /// Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose + /// == false) when a click over void is expected to close a popup. + /// + /// + /// C++: + /// imgui.h:2641 + ///
bool WantCaptureMouseUnlessPopupClose + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2752)] + public Bool8 WantCaptureMouseUnlessPopupClose; + + /// + /// + /// Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either + /// position is invalid) + /// + /// + /// C++: + /// imgui.h:2642 + ///
ImVec2 MousePosPrev + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2756)] + public float2 MousePosPrev; + + /// + /// + /// Position at time of clicking + /// + /// + /// C++: + /// imgui.h:2643 + ///
ImVec2 MouseClickedPos[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2764)] + public float2_5 MouseClickedPos; + + /// + /// Time of last click (used to figure out double-click) + /// + [FieldOffset(2808)] + public fixed double MouseClickedTime[5]; + + /// + /// + /// Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) + /// + /// + /// C++: + /// imgui.h:2645 + ///
bool MouseClicked[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2848)] + public Bool8_5 MouseClicked; + + /// + /// + /// Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) + /// + /// + /// C++: + /// imgui.h:2646 + ///
bool MouseDoubleClicked[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2853)] + public Bool8_5 MouseDoubleClicked; + + /// + /// + /// == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. + /// when going from !Down to Down + /// + /// + /// C++: + /// imgui.h:2647 + ///
ImU16 MouseClickedCount[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2858)] + public ushort_5 MouseClickedCount; + + /// + /// + /// Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. + /// + /// + /// C++: + /// imgui.h:2648 + ///
ImU16 MouseClickedLastCount[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2868)] + public ushort_5 MouseClickedLastCount; + + /// + /// + /// Mouse button went from Down to !Down + /// + /// + /// C++: + /// imgui.h:2649 + ///
bool MouseReleased[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2878)] + public Bool8_5 MouseReleased; + + /// + /// Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate + /// them from double-click). + /// + [FieldOffset(2888)] + public fixed double MouseReleasedTime[5]; + + /// + /// + /// Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request + /// mouse capture from the application if click started outside ImGui bounds. + /// + /// + /// C++: + /// imgui.h:2651 + ///
bool MouseDownOwned[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2928)] + public Bool8_5 MouseDownOwned; + + /// + /// + /// Track if button was clicked inside a dear imgui window. + /// + /// + /// C++: + /// imgui.h:2652 + ///
bool MouseDownOwnedUnlessPopupClose[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2933)] + public Bool8_5 MouseDownOwnedUnlessPopupClose; + + /// + /// + /// On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac + /// system this is already enforced by the system. + /// + /// + /// C++: + /// imgui.h:2653 + ///
bool MouseWheelRequestAxisSwap + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2938)] + public Bool8 MouseWheelRequestAxisSwap; + + /// + /// + /// (OSX) Set to true when the current click was a Ctrl+click that spawned a simulated right click + /// + /// + /// C++: + /// imgui.h:2654 + ///
bool MouseCtrlLeftAsRightClick + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2939)] + public Bool8 MouseCtrlLeftAsRightClick; + + /// + /// Duration the mouse button has been down (0.0f == just clicked) + /// + [FieldOffset(2940)] + public fixed float MouseDownDuration[5]; + + /// + /// Previous time the mouse button has been down + /// + [FieldOffset(2960)] + public fixed float MouseDownDurationPrev[5]; + + /// + /// + /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point + /// + /// + /// C++: + /// imgui.h:2657 + ///
ImVec2 MouseDragMaxDistanceAbs[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(2980)] + public float2_5 MouseDragMaxDistanceAbs; + + /// + /// Squared maximum distance of how much mouse has traveled from the clicking point (used for moving + /// thresholds) + /// + [FieldOffset(3020)] + public fixed float MouseDragMaxDistanceSqr[5]; + + /// + /// + /// Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage + /// currently unused by Dear ImGui. + /// + /// + /// C++: + /// imgui.h:2659 + ///
float PenPressure + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(3040)] + public float PenPressure; + + /// + /// + /// Only modify via AddFocusEvent() + /// + /// + /// C++: + /// imgui.h:2660 + ///
bool AppFocusLost + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(3044)] + public Bool8 AppFocusLost; + + /// + /// + /// Only modify via SetAppAcceptingEvents() + /// + /// + /// C++: + /// imgui.h:2661 + ///
bool AppAcceptingEvents + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(3045)] + public Bool8 AppAcceptingEvents; + + /// + /// + /// For AddInputCharacterUTF16() + /// + /// + /// C++: + /// imgui.h:2662 + ///
ImWchar16 InputQueueSurrogate + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(3046)] + public ushort InputQueueSurrogate; + + /// + /// + /// Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper. + /// + /// + /// C++: + /// imgui.h:2663 + ///
ImVector<ImWchar> InputQueueCharacters + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + [FieldOffset(3048)] + public ImVector InputQueueCharacters; + } + + /// + /// + /// Main configuration and I/O between your application and ImGui (also see: ImGuiPlatformIO) + /// + /// + /// C++: + /// imgui.h:196 + ///
struct ImGuiIO + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiIOPtr(ImGuiIO* ptr) : INullable + { + private ImGuiIO* _ptr = ptr; + public ImGuiIO* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiIOPtr(ImGuiIO* ptr) => new(ptr); + + public static implicit operator ImGuiIO*(ImGuiIOPtr wrapper) => wrapper.Ptr; + + /// + /// + /// = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Keyboard/Gamepad navigation + /// options, etc. + /// + /// + /// C++: + /// imgui.h:2444 + ///
ImGuiConfigFlags ConfigFlags + ///
+ ///
+ public ref ImGuiConfigFlags ConfigFlags => ref Unsafe.AsRef(&_ptr->ConfigFlags); + + /// + /// + /// = 0 // See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) + /// to communicate features supported by the backend. + /// + /// + /// C++: + /// imgui.h:2445 + ///
ImGuiBackendFlags BackendFlags + ///
+ ///
+ public ref ImGuiBackendFlags BackendFlags => ref Unsafe.AsRef(&_ptr->BackendFlags); + + /// + /// + /// <unset> // Main display size, in pixels (== GetMainViewport()->Size). May change every + /// frame. + /// + /// + /// C++: + /// imgui.h:2446 + ///
ImVec2 DisplaySize + ///
+ ///
+ public ref float2 DisplaySize => ref Unsafe.AsRef(&_ptr->DisplaySize); + + /// + /// + /// = (1, 1) // Main display density. For retina display where window coordinates are different from + /// framebuffer coordinates. This will affect font density + will end up in ImDrawData::FramebufferScale. + /// + /// + /// C++: + /// imgui.h:2447 + ///
ImVec2 DisplayFramebufferScale + ///
+ ///
+ public ref float2 DisplayFramebufferScale => ref Unsafe.AsRef(&_ptr->DisplayFramebufferScale); + + /// + /// + /// = 1.0f/60.0f // Time elapsed since last frame, in seconds. May change every frame. + /// + /// + /// C++: + /// imgui.h:2448 + ///
float DeltaTime + ///
+ ///
+ public ref float DeltaTime => ref Unsafe.AsRef(&_ptr->DeltaTime); + + /// + /// + /// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds. + /// + /// + /// C++: + /// imgui.h:2449 + ///
float IniSavingRate + ///
+ ///
+ public ref float IniSavingRate => ref Unsafe.AsRef(&_ptr->IniSavingRate); + + /// + /// + /// = "imgui.ini" // Path to .ini file (important: default "imgui.ini" is relative to current working + /// dir!). Set NULL to disable automatic .ini loading/saving or if you want to manually call + /// LoadIniSettingsXXX() / SaveIniSettingsXXX() functions. + /// + /// + /// C++: + /// imgui.h:2450 + ///
const char* IniFilename + ///
+ ///
+ public ref Ptr IniFilename => ref Unsafe.AsRef>(&_ptr->IniFilename); + + /// + /// + /// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified). + /// + /// + /// C++: + /// imgui.h:2451 + ///
const char* LogFilename + ///
+ ///
+ public ref Ptr LogFilename => ref Unsafe.AsRef>(&_ptr->LogFilename); + + /// + /// + /// = NULL // Store your own data. + /// + /// + /// C++: + /// imgui.h:2452 + ///
void* UserData + ///
+ ///
+ public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + + /// + /// + /// <auto> // Font atlas: load, rasterize and pack one or more fonts into a single texture. + /// + /// + /// C++: + /// imgui.h:2455 + ///
ImFontAtlas*Fonts + ///
+ ///
+ /// + /// + /// Font system + /// + /// + public ref ImFontAtlasPtr Fonts => ref Unsafe.AsRef(&_ptr->Fonts); + + /// + /// + /// = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0]. + /// + /// + /// C++: + /// imgui.h:2456 + ///
ImFont* FontDefault + ///
+ ///
+ /// + /// + /// Font system + /// + /// + public ref ImFontPtr FontDefault => ref Unsafe.AsRef(&_ptr->FontDefault); + + /// + /// + /// = false // [OBSOLETE] Allow user scaling text of individual window with CTRL+Wheel. + /// + /// + /// C++: + /// imgui.h:2457 + ///
bool FontAllowUserScaling + ///
+ ///
+ /// + /// + /// Font system + /// + /// + public ref bool FontAllowUserScaling => ref Unsafe.AsRef(&_ptr->FontAllowUserScaling); + + /// + /// + /// = false // Swap Activate<>Cancel (A<>B) buttons, matching typical + /// "Nintendo/Japanese style" gamepad layout. + /// + /// + /// C++: + /// imgui.h:2460 + ///
bool ConfigNavSwapGamepadButtons + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavSwapGamepadButtons => ref Unsafe.AsRef(&_ptr->ConfigNavSwapGamepadButtons); + + /// + /// + /// = false // Directional/tabbing navigation teleports the mouse cursor. May be useful on + /// TV/console systems where moving a virtual mouse is difficult. Will update io.MousePos and set + /// io.WantSetMousePos=true. + /// + /// + /// C++: + /// imgui.h:2461 + ///
bool ConfigNavMoveSetMousePos + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavMoveSetMousePos => ref Unsafe.AsRef(&_ptr->ConfigNavMoveSetMousePos); + + /// + /// + /// = true // Sets io.WantCaptureKeyboard when io.NavActive is set. + /// + /// + /// C++: + /// imgui.h:2462 + ///
bool ConfigNavCaptureKeyboard + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavCaptureKeyboard => ref Unsafe.AsRef(&_ptr->ConfigNavCaptureKeyboard); + + /// + /// + /// = true // Pressing Escape can clear focused item + navigation id/highlight. Set to false if + /// you want to always keep highlight on. + /// + /// + /// C++: + /// imgui.h:2463 + ///
bool ConfigNavEscapeClearFocusItem + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavEscapeClearFocusItem => ref Unsafe.AsRef(&_ptr->ConfigNavEscapeClearFocusItem); + + /// + /// + /// = false // Pressing Escape can clear focused window as well (super set of + /// io.ConfigNavEscapeClearFocusItem). + /// + /// + /// C++: + /// imgui.h:2464 + ///
bool ConfigNavEscapeClearFocusWindow + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavEscapeClearFocusWindow => + ref Unsafe.AsRef(&_ptr->ConfigNavEscapeClearFocusWindow); + + /// + /// + /// = true // Using directional navigation key makes the cursor visible. Mouse click hides the + /// cursor. + /// + /// + /// C++: + /// imgui.h:2465 + ///
bool ConfigNavCursorVisibleAuto + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavCursorVisibleAuto => ref Unsafe.AsRef(&_ptr->ConfigNavCursorVisibleAuto); + + /// + /// + /// = false // Navigation cursor is always visible. + /// + /// + /// C++: + /// imgui.h:2466 + ///
bool ConfigNavCursorVisibleAlways + ///
+ ///
+ /// + /// + /// Keyboard/Gamepad Navigation options + /// + /// + public ref bool ConfigNavCursorVisibleAlways => ref Unsafe.AsRef(&_ptr->ConfigNavCursorVisibleAlways); + + /// + /// + /// = false // Simplified docking mode: disable window splitting, so docking is limited to merging + /// multiple windows together into tab-bars. + /// + /// + /// C++: + /// imgui.h:2469 + ///
bool ConfigDockingNoSplit + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + public ref bool ConfigDockingNoSplit => ref Unsafe.AsRef(&_ptr->ConfigDockingNoSplit); + + /// + /// + /// = false // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider + /// space) + /// + /// + /// C++: + /// imgui.h:2470 + ///
bool ConfigDockingWithShift + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + public ref bool ConfigDockingWithShift => ref Unsafe.AsRef(&_ptr->ConfigDockingWithShift); + + /// + /// + /// = false // [BETA] [FIXME: This currently creates regression with auto-sizing and general + /// overhead] Make every single floating window display within a docking node. + /// + /// + /// C++: + /// imgui.h:2471 + ///
bool ConfigDockingAlwaysTabBar + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + public ref bool ConfigDockingAlwaysTabBar => ref Unsafe.AsRef(&_ptr->ConfigDockingAlwaysTabBar); + + /// + /// + /// = false // [BETA] Make window or viewport transparent when docking and only display docking + /// boxes on the target viewport. Useful if rendering of multiple viewport cannot be synced. Best used with + /// ConfigViewportsNoAutoMerge. + /// + /// + /// C++: + /// imgui.h:2472 + ///
bool ConfigDockingTransparentPayload + ///
+ ///
+ /// + /// + /// Docking options (when ImGuiConfigFlags_DockingEnable is set) + /// + /// + public ref bool ConfigDockingTransparentPayload => + ref Unsafe.AsRef(&_ptr->ConfigDockingTransparentPayload); + + /// + /// + /// = false; // Set to make all floating imgui windows always create their own viewport. Otherwise, + /// they are merged into the main host viewports when overlapping it. May also set + /// ImGuiViewportFlags_NoAutoMerge on individual viewport. + /// + /// + /// C++: + /// imgui.h:2475 + ///
bool ConfigViewportsNoAutoMerge + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + public ref bool ConfigViewportsNoAutoMerge => ref Unsafe.AsRef(&_ptr->ConfigViewportsNoAutoMerge); + + /// + /// + /// = false // Disable default OS task bar icon flag for secondary viewports. When a viewport + /// doesn't want a task bar icon, ImGuiViewportFlags_NoTaskBarIcon will be set on it. + /// + /// + /// C++: + /// imgui.h:2476 + ///
bool ConfigViewportsNoTaskBarIcon + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + public ref bool ConfigViewportsNoTaskBarIcon => ref Unsafe.AsRef(&_ptr->ConfigViewportsNoTaskBarIcon); + + /// + /// + /// = true // Disable default OS window decoration flag for secondary viewports. When a viewport + /// doesn't want window decorations, ImGuiViewportFlags_NoDecoration will be set on it. Enabling decoration + /// can create subsequent issues at OS levels (e.g. minimum window size). + /// + /// + /// C++: + /// imgui.h:2477 + ///
bool ConfigViewportsNoDecoration + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + public ref bool ConfigViewportsNoDecoration => ref Unsafe.AsRef(&_ptr->ConfigViewportsNoDecoration); + + /// + /// + /// = false // Disable default OS parenting to main viewport for secondary viewports. By default, + /// viewports are marked with ParentViewportId = <main_viewport>, expecting the platform backend to + /// setup a parent/child relationship between the OS windows (some backend may ignore this). Set to true if + /// you want the default to be 0, then all viewports will be top-level OS windows. + /// + /// + /// C++: + /// imgui.h:2478 + ///
bool ConfigViewportsNoDefaultParent + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + public ref bool ConfigViewportsNoDefaultParent => ref Unsafe.AsRef(&_ptr->ConfigViewportsNoDefaultParent); + + /// + /// + /// = true // When a platform window is focused (e.g. using Alt+Tab, clicking Platform Title Bar), apply + /// corresponding focus on imgui windows (may clear focus/active id from imgui windows location in other + /// platform windows). In principle this is better enabled but we provide an opt-out, because some Linux + /// window managers tend to eagerly focus windows (e.g. on mouse hover, or even a simple window pos/size + /// change). + /// + /// + /// C++: + /// imgui.h:2479 + ///
bool ConfigViewportPlatformFocusSetsImGuiFocus + ///
+ ///
+ /// + /// + /// Viewport options (when ImGuiConfigFlags_ViewportsEnable is set) + /// + /// + public ref bool ConfigViewportPlatformFocusSetsImGuiFocus => + ref Unsafe.AsRef(&_ptr->ConfigViewportPlatformFocusSetsImGuiFocus); + + /// + /// + /// = false // [EXPERIMENTAL] Automatically overwrite style.FontScaleDpi when Monitor DPI changes. + /// This will scale fonts but _NOT_ scale sizes/padding for now. + /// + /// + /// C++: + /// imgui.h:2483 + ///
bool ConfigDpiScaleFonts + ///
+ ///
+ /// + /// + /// DPI/Scaling options + /// This may keep evolving during 1.92.x releases. Expect some turbulence. + /// + /// + public ref bool ConfigDpiScaleFonts => ref Unsafe.AsRef(&_ptr->ConfigDpiScaleFonts); + + /// + /// + /// = false // [EXPERIMENTAL] Scale Dear ImGui and Platform Windows when Monitor DPI changes. + /// + /// + /// C++: + /// imgui.h:2484 + ///
bool ConfigDpiScaleViewports + ///
+ ///
+ /// + /// + /// DPI/Scaling options + /// This may keep evolving during 1.92.x releases. Expect some turbulence. + /// + /// + public ref bool ConfigDpiScaleViewports => ref Unsafe.AsRef(&_ptr->ConfigDpiScaleViewports); + + /// + /// + /// = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a + /// mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend + /// implementations. + /// + /// + /// C++: + /// imgui.h:2488 + ///
bool MouseDrawCursor + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool MouseDrawCursor => ref Unsafe.AsRef(&_ptr->MouseDrawCursor); + + /// + /// + /// = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt + /// instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows + /// instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in + /// lists uses Cmd/Super instead of Ctrl. + /// + /// + /// C++: + /// imgui.h:2489 + ///
bool ConfigMacOSXBehaviors + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef(&_ptr->ConfigMacOSXBehaviors); + + /// + /// + /// = true // Enable input queue trickling: some types of events submitted during the same frame + /// (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates. + /// + /// + /// C++: + /// imgui.h:2490 + ///
bool ConfigInputTrickleEventQueue + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigInputTrickleEventQueue => ref Unsafe.AsRef(&_ptr->ConfigInputTrickleEventQueue); + + /// + /// + /// = true // Enable blinking cursor (optional as some users consider it to be distracting). + /// + /// + /// C++: + /// imgui.h:2491 + ///
bool ConfigInputTextCursorBlink + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef(&_ptr->ConfigInputTextCursorBlink); + + /// + /// + /// = false // [BETA] Pressing Enter will keep item active and select contents (single-line only). + /// + /// + /// C++: + /// imgui.h:2492 + ///
bool ConfigInputTextEnterKeepActive + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigInputTextEnterKeepActive => ref Unsafe.AsRef(&_ptr->ConfigInputTextEnterKeepActive); + + /// + /// + /// = false // [BETA] Enable turning DragXXX widgets into text input with a simple mouse + /// click-release (without moving). Not desirable on devices without a keyboard. + /// + /// + /// C++: + /// imgui.h:2493 + ///
bool ConfigDragClickToInputText + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigDragClickToInputText => ref Unsafe.AsRef(&_ptr->ConfigDragClickToInputText); + + /// + /// + /// = true // Enable resizing of windows from their edges and from the lower-left corner. This + /// requires ImGuiBackendFlags_HasMouseCursors for better mouse cursor feedback. (This used to be a + /// per-window ImGuiWindowFlags_ResizeFromAnySide flag) + /// + /// + /// C++: + /// imgui.h:2494 + ///
bool ConfigWindowsResizeFromEdges + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigWindowsResizeFromEdges => ref Unsafe.AsRef(&_ptr->ConfigWindowsResizeFromEdges); + + /// + /// + /// = false // Enable allowing to move windows only when clicking on their title bar. Does not apply to + /// windows without a title bar. + /// + /// + /// C++: + /// imgui.h:2495 + ///
bool ConfigWindowsMoveFromTitleBarOnly + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigWindowsMoveFromTitleBarOnly => + ref Unsafe.AsRef(&_ptr->ConfigWindowsMoveFromTitleBarOnly); + + /// + /// + /// = false // [EXPERIMENTAL] CTRL+C copy the contents of focused window into the clipboard. + /// Experimental because: (1) has known issues with nested Begin/End pairs (2) text output quality varies + /// (3) text output is in submission order rather than spatial order. + /// + /// + /// C++: + /// imgui.h:2496 + ///
bool ConfigWindowsCopyContentsWithCtrlC + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigWindowsCopyContentsWithCtrlC => + ref Unsafe.AsRef(&_ptr->ConfigWindowsCopyContentsWithCtrlC); + + /// + /// + /// = true // Enable scrolling page by page when clicking outside the scrollbar grab. When + /// disabled, always scroll to clicked location. When enabled, Shift+Click scrolls to clicked location. + /// + /// + /// C++: + /// imgui.h:2497 + ///
bool ConfigScrollbarScrollByPage + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref bool ConfigScrollbarScrollByPage => ref Unsafe.AsRef(&_ptr->ConfigScrollbarScrollByPage); + + /// + /// + /// = 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set + /// to -1.0f to disable. + /// + /// + /// C++: + /// imgui.h:2498 + ///
float ConfigMemoryCompactTimer + ///
+ ///
+ /// + /// + /// Miscellaneous options + /// (you can visualize and interact with all options in 'Demo->Configuration') + /// + /// + public ref float ConfigMemoryCompactTimer => ref Unsafe.AsRef(&_ptr->ConfigMemoryCompactTimer); + + /// + /// + /// = 0.30f // Time for a double-click, in seconds. + /// + /// + /// C++: + /// imgui.h:2502 + ///
float MouseDoubleClickTime + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + public ref float MouseDoubleClickTime => ref Unsafe.AsRef(&_ptr->MouseDoubleClickTime); + + /// + /// + /// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels. + /// + /// + /// C++: + /// imgui.h:2503 + ///
float MouseDoubleClickMaxDist + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + public ref float MouseDoubleClickMaxDist => ref Unsafe.AsRef(&_ptr->MouseDoubleClickMaxDist); + + /// + /// + /// = 6.0f // Distance threshold before considering we are dragging. + /// + /// + /// C++: + /// imgui.h:2504 + ///
float MouseDragThreshold + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + public ref float MouseDragThreshold => ref Unsafe.AsRef(&_ptr->MouseDragThreshold); + + /// + /// + /// = 0.275f // When holding a key/button, time before it starts repeating, in seconds (for buttons + /// in Repeat mode, etc.). + /// + /// + /// C++: + /// imgui.h:2505 + ///
float KeyRepeatDelay + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + public ref float KeyRepeatDelay => ref Unsafe.AsRef(&_ptr->KeyRepeatDelay); + + /// + /// + /// = 0.050f // When holding a key/button, rate at which it repeats, in seconds. + /// + /// + /// C++: + /// imgui.h:2506 + ///
float KeyRepeatRate + ///
+ ///
+ /// + /// + /// Inputs Behaviors + /// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle) + /// + /// + public ref float KeyRepeatRate => ref Unsafe.AsRef(&_ptr->KeyRepeatRate); + + /// + /// + /// = true // Enable error recovery support. Some errors won't be detected and lead to direct crashes + /// if recovery is disabled. + /// + /// + /// C++: + /// imgui.h:2526 + ///
bool ConfigErrorRecovery + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + public ref bool ConfigErrorRecovery => ref Unsafe.AsRef(&_ptr->ConfigErrorRecovery); + + /// + /// + /// = true // Enable asserts on recoverable error. By default call IM_ASSERT() when returning from a + /// failing IM_ASSERT_USER_ERROR() + /// + /// + /// C++: + /// imgui.h:2527 + ///
bool ConfigErrorRecoveryEnableAssert + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + public ref bool ConfigErrorRecoveryEnableAssert => + ref Unsafe.AsRef(&_ptr->ConfigErrorRecoveryEnableAssert); + + /// + /// + /// = true // Enable debug log output on recoverable errors. + /// + /// + /// C++: + /// imgui.h:2528 + ///
bool ConfigErrorRecoveryEnableDebugLog + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + public ref bool ConfigErrorRecoveryEnableDebugLog => + ref Unsafe.AsRef(&_ptr->ConfigErrorRecoveryEnableDebugLog); + + /// + /// + /// = true // Enable tooltip on recoverable errors. The tooltip include a way to enable asserts if + /// they were disabled. + /// + /// + /// C++: + /// imgui.h:2529 + ///
bool ConfigErrorRecoveryEnableTooltip + ///
+ ///
+ /// + /// + /// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL] + /// - Error recovery is provided as a way to facilitate: + /// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running). + /// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected. + /// - Error recovery is not perfect nor guaranteed! It is a feature to ease development. + /// You not are not supposed to rely on it in the course of a normal application run. + /// - Functions that support error recovery are using IM_ASSERT_USER_ERROR() instead of IM_ASSERT(). + /// - By design, we do NOT allow error recovery to be 100% silent. One of the three options needs to be checked! + /// - Always ensure that on programmers seats you have at minimum Asserts or Tooltips enabled when making direct imgui API calls! + /// Otherwise it would severely hinder your ability to catch and correct mistakes! + /// Read https://github.com/ocornut/imgui/wiki/Error-Handling for details. + /// - Programmer seats: keep asserts (default), or disable asserts and keep error tooltips (new and nice!) + /// - Non-programmer seats: maybe disable asserts, but make sure errors are resurfaced (tooltips, visible log entries, use callback etc.) + /// - Recovery after error/exception: record stack sizes with ErrorRecoveryStoreState(), disable assert, set log callback (to e.g. trigger high-level breakpoint), recover with ErrorRecoveryTryToRecoverState(), restore settings. + /// + /// + public ref bool ConfigErrorRecoveryEnableTooltip => + ref Unsafe.AsRef(&_ptr->ConfigErrorRecoveryEnableTooltip); + + /// + /// + /// = false // Enable various tools calling IM_DEBUG_BREAK(). + /// + /// + /// C++: + /// imgui.h:2535 + ///
bool ConfigDebugIsDebuggerPresent + ///
+ ///
+ /// + /// + /// Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro. + /// - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability. + /// - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application. + /// e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version). + /// + /// + public ref bool ConfigDebugIsDebuggerPresent => ref Unsafe.AsRef(&_ptr->ConfigDebugIsDebuggerPresent); + + /// + /// + /// = true // Highlight and show an error message popup when multiple items have conflicting + /// identifiers. + /// + /// + /// C++: + /// imgui.h:2541 + ///
bool ConfigDebugHighlightIdConflicts + ///
+ ///
+ /// + /// + /// Tools to detect code submitting items with conflicting/duplicate IDs + /// - Code should use PushID()/PopID() in loops, or append "##xx" to same-label identifiers. + /// - Empty label e.g. Button("") == same ID as parent widget/node. Use Button("##xx") instead! + /// - See FAQ https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-about-the-id-stack-system + /// + /// + public ref bool ConfigDebugHighlightIdConflicts => + ref Unsafe.AsRef(&_ptr->ConfigDebugHighlightIdConflicts); + + /// + /// + /// =true // Show "Item Picker" button in aforementioned popup. + /// + /// + /// C++: + /// imgui.h:2542 + ///
bool ConfigDebugHighlightIdConflictsShowItemPicker + ///
+ ///
+ /// + /// + /// Tools to detect code submitting items with conflicting/duplicate IDs + /// - Code should use PushID()/PopID() in loops, or append "##xx" to same-label identifiers. + /// - Empty label e.g. Button("") == same ID as parent widget/node. Use Button("##xx") instead! + /// - See FAQ https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-about-the-id-stack-system + /// + /// + public ref bool ConfigDebugHighlightIdConflictsShowItemPicker => + ref Unsafe.AsRef(&_ptr->ConfigDebugHighlightIdConflictsShowItemPicker); + + /// + /// + /// = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT + /// APPLICATION BOOT TIME if you don't want to miss windows. + /// + /// + /// C++: + /// imgui.h:2548 + ///
bool ConfigDebugBeginReturnValueOnce + ///
+ ///
+ /// + /// + /// Tools to test correct Begin/End and BeginChild/EndChild behaviors. + /// - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX() + /// - This is inconsistent with other BeginXXX functions and create confusion for many users. + /// - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior. + /// + /// + public ref bool ConfigDebugBeginReturnValueOnce => + ref Unsafe.AsRef(&_ptr->ConfigDebugBeginReturnValueOnce); + + /// + /// + /// = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window + /// depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop + /// then occasionally press SHIFT. Windows should be flickering while running. + /// + /// + /// C++: + /// imgui.h:2549 + ///
bool ConfigDebugBeginReturnValueLoop + ///
+ ///
+ /// + /// + /// Tools to test correct Begin/End and BeginChild/EndChild behaviors. + /// - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX() + /// - This is inconsistent with other BeginXXX functions and create confusion for many users. + /// - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior. + /// + /// + public ref bool ConfigDebugBeginReturnValueLoop => + ref Unsafe.AsRef(&_ptr->ConfigDebugBeginReturnValueLoop); + + /// + /// + /// = false // Ignore io.AddFocusEvent(false), consequently not calling + /// io.ClearInputKeys()/io.ClearInputMouse() in input processing. + /// + /// + /// C++: + /// imgui.h:2554 + ///
bool ConfigDebugIgnoreFocusLoss + ///
+ ///
+ /// + /// + /// Option to deactivate io.AddFocusEvent(false) handling. + /// - May facilitate interactions with a debugger when focus loss leads to clearing inputs data. + /// - Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them. + /// + /// + public ref bool ConfigDebugIgnoreFocusLoss => ref Unsafe.AsRef(&_ptr->ConfigDebugIgnoreFocusLoss); + + /// + /// + /// = false // Save .ini data with extra comments (particularly helpful for Docking, but makes + /// saving slower) + /// + /// + /// C++: + /// imgui.h:2557 + ///
bool ConfigDebugIniSettings + ///
+ ///
+ /// + /// + /// Option to audit .ini data + /// + /// + public ref bool ConfigDebugIniSettings => ref Unsafe.AsRef(&_ptr->ConfigDebugIniSettings); + + /// + /// + /// = NULL + /// + /// + /// C++: + /// imgui.h:2566 + ///
const char* BackendPlatformName + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + public ref Ptr BackendPlatformName => ref Unsafe.AsRef>(&_ptr->BackendPlatformName); + + /// + /// + /// = NULL + /// + /// + /// C++: + /// imgui.h:2567 + ///
const char* BackendRendererName + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + public ref Ptr BackendRendererName => ref Unsafe.AsRef>(&_ptr->BackendRendererName); + + /// + /// + /// = NULL // User data for platform backend + /// + /// + /// C++: + /// imgui.h:2568 + ///
void* BackendPlatformUserData + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + public ref nint BackendPlatformUserData => ref Unsafe.AsRef(&_ptr->BackendPlatformUserData); + + /// + /// + /// = NULL // User data for renderer backend + /// + /// + /// C++: + /// imgui.h:2569 + ///
void* BackendRendererUserData + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + public ref nint BackendRendererUserData => ref Unsafe.AsRef(&_ptr->BackendRendererUserData); + + /// + /// + /// = NULL // User data for non C++ programming language backend + /// + /// + /// C++: + /// imgui.h:2570 + ///
void* BackendLanguageUserData + ///
+ ///
+ /// + /// + /// Nowadays those would be stored in ImGuiPlatformIO but we are leaving them here for legacy reasons. + /// Optional: Platform/Renderer backend name (informational only! will be displayed in About Window) + User data for backend/wrappers to store their own stuff. + /// + /// + public ref nint BackendLanguageUserData => ref Unsafe.AsRef(&_ptr->BackendLanguageUserData); + + /// + /// + /// Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main + /// game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering + /// over an imgui window, widget is active, mouse was clicked over an imgui window, etc.). + /// + /// + /// C++: + /// imgui.h:2604 + ///
bool WantCaptureMouse + ///
+ ///
+ public ref bool WantCaptureMouse => ref Unsafe.AsRef(&_ptr->WantCaptureMouse); + + /// + /// + /// Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main + /// game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui + /// window is focused and navigation is enabled, etc.). + /// + /// + /// C++: + /// imgui.h:2605 + ///
bool WantCaptureKeyboard + ///
+ ///
+ public ref bool WantCaptureKeyboard => ref Unsafe.AsRef(&_ptr->WantCaptureKeyboard); + + /// + /// + /// Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants + /// textual keyboard input to happen (e.g. when a InputText widget is active). + /// + /// + /// C++: + /// imgui.h:2606 + ///
bool WantTextInput + ///
+ ///
+ public ref bool WantTextInput => ref Unsafe.AsRef(&_ptr->WantTextInput); + + /// + /// + /// MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when + /// io.ConfigNavMoveSetMousePos is enabled. + /// + /// + /// C++: + /// imgui.h:2607 + ///
bool WantSetMousePos + ///
+ ///
+ public ref bool WantSetMousePos => ref Unsafe.AsRef(&_ptr->WantSetMousePos); + + /// + /// + /// When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your + /// application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear + /// io.WantSaveIniSettings yourself after saving! + /// + /// + /// C++: + /// imgui.h:2608 + ///
bool WantSaveIniSettings + ///
+ ///
+ public ref bool WantSaveIniSettings => ref Unsafe.AsRef(&_ptr->WantSaveIniSettings); + + /// + /// + /// Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is + /// focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag. + /// + /// + /// C++: + /// imgui.h:2609 + ///
bool NavActive + ///
+ ///
+ public ref bool NavActive => ref Unsafe.AsRef(&_ptr->NavActive); + + /// + /// + /// Keyboard/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events). + /// + /// + /// C++: + /// imgui.h:2610 + ///
bool NavVisible + ///
+ ///
+ public ref bool NavVisible => ref Unsafe.AsRef(&_ptr->NavVisible); + + /// + /// + /// Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per + /// second. Solely for convenience. Slow applications may not want to use a moving average or may want to + /// reset underlying buffers occasionally. + /// + /// + /// C++: + /// imgui.h:2611 + ///
float Framerate + ///
+ ///
+ public ref float Framerate => ref Unsafe.AsRef(&_ptr->Framerate); + + /// + /// + /// Vertices output during last call to Render() + /// + /// + /// C++: + /// imgui.h:2612 + ///
int MetricsRenderVertices + ///
+ ///
+ public ref int MetricsRenderVertices => ref Unsafe.AsRef(&_ptr->MetricsRenderVertices); + + /// + /// + /// Indices output during last call to Render() = number of triangles * 3 + /// + /// + /// C++: + /// imgui.h:2613 + ///
int MetricsRenderIndices + ///
+ ///
+ public ref int MetricsRenderIndices => ref Unsafe.AsRef(&_ptr->MetricsRenderIndices); + + /// + /// + /// Number of visible windows + /// + /// + /// C++: + /// imgui.h:2614 + ///
int MetricsRenderWindows + ///
+ ///
+ public ref int MetricsRenderWindows => ref Unsafe.AsRef(&_ptr->MetricsRenderWindows); + + /// + /// + /// Number of active windows + /// + /// + /// C++: + /// imgui.h:2615 + ///
int MetricsActiveWindows + ///
+ ///
+ public ref int MetricsActiveWindows => ref Unsafe.AsRef(&_ptr->MetricsActiveWindows); + + /// + /// + /// Mouse delta. Note that this is zero if either current or previous position are invalid + /// (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. + /// + /// + /// C++: + /// imgui.h:2616 + ///
ImVec2 MouseDelta + ///
+ ///
+ public ref float2 MouseDelta => ref Unsafe.AsRef(&_ptr->MouseDelta); + + /// + /// + /// Parent UI context (needs to be set explicitly by parent). + /// + /// + /// C++: + /// imgui.h:2622 + ///
ImGuiContext* Ctx + ///
+ ///
+ public ref ImGuiContextPtr Ctx => ref Unsafe.AsRef(&_ptr->Ctx); + + /// + /// + /// Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, + /// etc.) + /// + /// + /// C++: + /// imgui.h:2627 + ///
ImVec2 MousePos + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref float2 MousePos => ref Unsafe.AsRef(&_ptr->MousePos); + + /// + /// + /// Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses + /// left and right buttons. Other buttons allow us to track if the mouse is being used by your application + + /// available to user as a convenience via IsMouse** API. + /// + /// + /// C++: + /// imgui.h:2628 + ///
bool MouseDown[5] + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref Bool8_5 MouseDown => ref Unsafe.AsRef(&_ptr->MouseDown); + + /// + /// + /// Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold + /// SHIFT to turn vertical scroll into horizontal scroll. + /// + /// + /// C++: + /// imgui.h:2629 + ///
float MouseWheel + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref float MouseWheel => ref Unsafe.AsRef(&_ptr->MouseWheel); + + /// + /// + /// Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a + /// horizontal wheel, may not be filled by all backends. + /// + /// + /// C++: + /// imgui.h:2630 + ///
float MouseWheelH + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref float MouseWheelH => ref Unsafe.AsRef(&_ptr->MouseWheelH); + + /// + /// + /// Mouse actual input peripheral (Mouse/TouchScreen/Pen). + /// + /// + /// C++: + /// imgui.h:2631 + ///
ImGuiMouseSource MouseSource + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref ImGuiMouseSource MouseSource => ref Unsafe.AsRef(&_ptr->MouseSource); + + /// + /// + /// (Optional) Modify using io.AddMouseViewportEvent(). With multi-viewports: viewport the OS mouse is + /// hovering. If possible _IGNORING_ viewports with the ImGuiViewportFlags_NoInputs flag is much better (few + /// backends can handle that). Set io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport if you can + /// provide this info. If you don't imgui will infer the value using the rectangles and last focused time of + /// the viewports it knows about (ignoring other OS windows). + /// + /// + /// C++: + /// imgui.h:2632 + ///
ImGuiID MouseHoveredViewport + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref ImGuiID MouseHoveredViewport => ref Unsafe.AsRef(&_ptr->MouseHoveredViewport); + + /// + /// + /// Keyboard modifier down: Ctrl (non-macOS), Cmd (macOS) + /// + /// + /// C++: + /// imgui.h:2633 + ///
bool KeyCtrl + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref bool KeyCtrl => ref Unsafe.AsRef(&_ptr->KeyCtrl); + + /// + /// + /// Keyboard modifier down: Shift + /// + /// + /// C++: + /// imgui.h:2634 + ///
bool KeyShift + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref bool KeyShift => ref Unsafe.AsRef(&_ptr->KeyShift); + + /// + /// + /// Keyboard modifier down: Alt + /// + /// + /// C++: + /// imgui.h:2635 + ///
bool KeyAlt + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref bool KeyAlt => ref Unsafe.AsRef(&_ptr->KeyAlt); + + /// + /// + /// Keyboard modifier down: Windows/Super (non-macOS), Ctrl (macOS) + /// + /// + /// C++: + /// imgui.h:2636 + ///
bool KeySuper + ///
+ ///
+ /// + /// + /// Main Input State + /// (this block used to be written by backend, since 1.87 it is best to NOT write to those directly, call the AddXXX functions above instead) + /// (reading from those variables is fair game, as they are extremely unlikely to be moving anywhere) + /// + /// + public ref bool KeySuper => ref Unsafe.AsRef(&_ptr->KeySuper); + + /// + /// + /// Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as + /// io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. Read-only, updated by NewFrame() + /// + /// + /// C++: + /// imgui.h:2639 + ///
ImGuiKeyChord KeyMods + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref ImGuiKeyChord KeyMods => ref Unsafe.AsRef(&_ptr->KeyMods); + + /// + /// + /// Key state for all known keys. MUST use 'key - ImGuiKey_NamedKey_BEGIN' as index. Use IsKeyXXX() + /// functions to access this. + /// + /// + /// C++: + /// imgui.h:2640 + ///
ImGuiKeyData KeysData[ImGuiKey_NamedKey_COUNT] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref ImGuiKeyData_155 KeysData => ref Unsafe.AsRef(&_ptr->KeysData); + + /// + /// + /// Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose + /// == false) when a click over void is expected to close a popup. + /// + /// + /// C++: + /// imgui.h:2641 + ///
bool WantCaptureMouseUnlessPopupClose + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref bool WantCaptureMouseUnlessPopupClose => + ref Unsafe.AsRef(&_ptr->WantCaptureMouseUnlessPopupClose); + + /// + /// + /// Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either + /// position is invalid) + /// + /// + /// C++: + /// imgui.h:2642 + ///
ImVec2 MousePosPrev + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref float2 MousePosPrev => ref Unsafe.AsRef(&_ptr->MousePosPrev); + + /// + /// + /// Position at time of clicking + /// + /// + /// C++: + /// imgui.h:2643 + ///
ImVec2 MouseClickedPos[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref float2_5 MouseClickedPos => ref Unsafe.AsRef(&_ptr->MouseClickedPos); + + /// + /// Time of last click (used to figure out double-click) + /// + public Span MouseClickedTime => MemoryMarshal.CreateSpan(ref _ptr->MouseClickedTime[0], 5); + + /// + /// + /// Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0) + /// + /// + /// C++: + /// imgui.h:2645 + ///
bool MouseClicked[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref Bool8_5 MouseClicked => ref Unsafe.AsRef(&_ptr->MouseClicked); + + /// + /// + /// Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2) + /// + /// + /// C++: + /// imgui.h:2646 + ///
bool MouseDoubleClicked[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref Bool8_5 MouseDoubleClicked => ref Unsafe.AsRef(&_ptr->MouseDoubleClicked); + + /// + /// + /// == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. + /// when going from !Down to Down + /// + /// + /// C++: + /// imgui.h:2647 + ///
ImU16 MouseClickedCount[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref ushort_5 MouseClickedCount => ref Unsafe.AsRef(&_ptr->MouseClickedCount); + + /// + /// + /// Count successive number of clicks. Stays valid after mouse release. Reset after another click is done. + /// + /// + /// C++: + /// imgui.h:2648 + ///
ImU16 MouseClickedLastCount[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref ushort_5 MouseClickedLastCount => ref Unsafe.AsRef(&_ptr->MouseClickedLastCount); + + /// + /// + /// Mouse button went from Down to !Down + /// + /// + /// C++: + /// imgui.h:2649 + ///
bool MouseReleased[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref Bool8_5 MouseReleased => ref Unsafe.AsRef(&_ptr->MouseReleased); + + /// + /// Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate + /// them from double-click). + /// + public Span MouseReleasedTime => MemoryMarshal.CreateSpan(ref _ptr->MouseReleasedTime[0], 5); + + /// + /// + /// Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request + /// mouse capture from the application if click started outside ImGui bounds. + /// + /// + /// C++: + /// imgui.h:2651 + ///
bool MouseDownOwned[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref Bool8_5 MouseDownOwned => ref Unsafe.AsRef(&_ptr->MouseDownOwned); + + /// + /// + /// Track if button was clicked inside a dear imgui window. + /// + /// + /// C++: + /// imgui.h:2652 + ///
bool MouseDownOwnedUnlessPopupClose[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref Bool8_5 MouseDownOwnedUnlessPopupClose => + ref Unsafe.AsRef(&_ptr->MouseDownOwnedUnlessPopupClose); + + /// + /// + /// On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac + /// system this is already enforced by the system. + /// + /// + /// C++: + /// imgui.h:2653 + ///
bool MouseWheelRequestAxisSwap + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref bool MouseWheelRequestAxisSwap => ref Unsafe.AsRef(&_ptr->MouseWheelRequestAxisSwap); + + /// + /// + /// (OSX) Set to true when the current click was a Ctrl+click that spawned a simulated right click + /// + /// + /// C++: + /// imgui.h:2654 + ///
bool MouseCtrlLeftAsRightClick + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref bool MouseCtrlLeftAsRightClick => ref Unsafe.AsRef(&_ptr->MouseCtrlLeftAsRightClick); + + /// + /// Duration the mouse button has been down (0.0f == just clicked) + /// + public Span MouseDownDuration => MemoryMarshal.CreateSpan(ref _ptr->MouseDownDuration[0], 5); + + /// + /// Previous time the mouse button has been down + /// + public Span MouseDownDurationPrev => MemoryMarshal.CreateSpan(ref _ptr->MouseDownDurationPrev[0], 5); + + /// + /// + /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point + /// + /// + /// C++: + /// imgui.h:2657 + ///
ImVec2 MouseDragMaxDistanceAbs[5] + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref float2_5 MouseDragMaxDistanceAbs => ref Unsafe.AsRef(&_ptr->MouseDragMaxDistanceAbs); + + /// + /// Squared maximum distance of how much mouse has traveled from the clicking point (used for moving + /// thresholds) + /// + public Span MouseDragMaxDistanceSqr => MemoryMarshal.CreateSpan(ref _ptr->MouseDragMaxDistanceSqr[0], 5); + + /// + /// + /// Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage + /// currently unused by Dear ImGui. + /// + /// + /// C++: + /// imgui.h:2659 + ///
float PenPressure + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref float PenPressure => ref Unsafe.AsRef(&_ptr->PenPressure); + + /// + /// + /// Only modify via AddFocusEvent() + /// + /// + /// C++: + /// imgui.h:2660 + ///
bool AppFocusLost + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref bool AppFocusLost => ref Unsafe.AsRef(&_ptr->AppFocusLost); + + /// + /// + /// Only modify via SetAppAcceptingEvents() + /// + /// + /// C++: + /// imgui.h:2661 + ///
bool AppAcceptingEvents + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref bool AppAcceptingEvents => ref Unsafe.AsRef(&_ptr->AppAcceptingEvents); + + /// + /// + /// For AddInputCharacterUTF16() + /// + /// + /// C++: + /// imgui.h:2662 + ///
ImWchar16 InputQueueSurrogate + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref ushort InputQueueSurrogate => ref Unsafe.AsRef(&_ptr->InputQueueSurrogate); + + /// + /// + /// Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper. + /// + /// + /// C++: + /// imgui.h:2663 + ///
ImVector<ImWchar> InputQueueCharacters + ///
+ ///
+ /// + /// + /// Other state maintained from data above + IO function calls + /// + /// + public ref ImVector InputQueueCharacters => ref Unsafe.AsRef>(&_ptr->InputQueueCharacters); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiInputTextCallbackData.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiInputTextCallbackData.gen.cs new file mode 100644 index 0000000..7db2168 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiInputTextCallbackData.gen.cs @@ -0,0 +1,654 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use) + /// + /// + /// C++: + /// imgui.h:197 + ///
struct ImGuiInputTextCallbackData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct ImGuiInputTextCallbackData + { + /// + /// + /// Parent UI context + /// + /// + /// C++: + /// imgui.h:2703 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + [FieldOffset(0)] + public ImGuiContextPtr Ctx; + + /// + /// + /// One ImGuiInputTextFlags_Callback* // Read-only + /// + /// + /// C++: + /// imgui.h:2704 + ///
ImGuiInputTextFlags EventFlag + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + [FieldOffset(8)] + public ImGuiInputTextFlags EventFlag; + + /// + /// + /// What user passed to InputText() // Read-only + /// + /// + /// C++: + /// imgui.h:2705 + ///
ImGuiInputTextFlags Flags + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + [FieldOffset(12)] + public ImGuiInputTextFlags Flags; + + /// + /// + /// What user passed to InputText() // Read-only + /// + /// + /// C++: + /// imgui.h:2706 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + [FieldOffset(16)] + public nint UserData; + + /// + /// + /// Character input // Read-write // [CharFilter] Replace character with another one, + /// or set to zero to drop. return 1 is equivalent to setting EventChar=0; + /// + /// + /// C++: + /// imgui.h:2713 + ///
ImWchar EventChar + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(24)] + public uint EventChar; + + /// + /// + /// Key pressed (Up/Down/TAB) // Read-only // [Completion,History] + /// + /// + /// C++: + /// imgui.h:2714 + ///
ImGuiKey EventKey + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(28)] + public ImGuiKey EventKey; + + /// + /// + /// Text buffer // Read-write // [Resize] Can replace pointer / + /// [Completion,History,Always] Only write to pointed data, don't replace the actual pointer! + /// + /// + /// C++: + /// imgui.h:2715 + ///
char* Buf + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(32)] + public Ptr Buf; + + /// + /// + /// Text length (in bytes) // Read-write // [Resize,Completion,History,Always] Exclude + /// zero-terminator storage. In C land: == strlen(some_text), in C++ land: string.length() + /// + /// + /// C++: + /// imgui.h:2716 + ///
int BufTextLen + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(40)] + public int BufTextLen; + + /// + /// + /// Buffer size (in bytes) = capacity+1 // Read-only // [Resize,Completion,History,Always] Include + /// zero-terminator storage. In C land == ARRAYSIZE(my_char_array), in C++ land: string.capacity()+1 + /// + /// + /// C++: + /// imgui.h:2717 + ///
int BufSize + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(44)] + public int BufSize; + + /// + /// + /// Set if you modify Buf/BufTextLen! // Write // [Completion,History,Always] + /// + /// + /// C++: + /// imgui.h:2718 + ///
bool BufDirty + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(48)] + public Bool8 BufDirty; + + /// + /// + /// // Read-write // [Completion,History,Always] + /// + /// + /// C++: + /// imgui.h:2719 + ///
int CursorPos + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(52)] + public int CursorPos; + + /// + /// + /// // Read-write // [Completion,History,Always] == to SelectionEnd when no selection) + /// + /// + /// C++: + /// imgui.h:2720 + ///
int SelectionStart + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(56)] + public int SelectionStart; + + /// + /// + /// // Read-write // [Completion,History,Always] + /// + /// + /// C++: + /// imgui.h:2721 + ///
int SelectionEnd + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + [FieldOffset(60)] + public int SelectionEnd; + } + + /// + /// + /// Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use) + /// + /// + /// C++: + /// imgui.h:197 + ///
struct ImGuiInputTextCallbackData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* ptr) : INullable + { + private ImGuiInputTextCallbackData* _ptr = ptr; + public ImGuiInputTextCallbackData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* ptr) => new(ptr); + + public static implicit operator ImGuiInputTextCallbackData*(ImGuiInputTextCallbackDataPtr wrapper) => + wrapper.Ptr; + + /// + /// + /// Parent UI context + /// + /// + /// C++: + /// imgui.h:2703 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + public ref ImGuiContextPtr Ctx => ref Unsafe.AsRef(&_ptr->Ctx); + + /// + /// + /// One ImGuiInputTextFlags_Callback* // Read-only + /// + /// + /// C++: + /// imgui.h:2704 + ///
ImGuiInputTextFlags EventFlag + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + public ref ImGuiInputTextFlags EventFlag => ref Unsafe.AsRef(&_ptr->EventFlag); + + /// + /// + /// What user passed to InputText() // Read-only + /// + /// + /// C++: + /// imgui.h:2705 + ///
ImGuiInputTextFlags Flags + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// What user passed to InputText() // Read-only + /// + /// + /// C++: + /// imgui.h:2706 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. + /// The callback function should return 0 by default. + /// Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details) + /// - ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active. + /// - ImGuiInputTextFlags_CallbackAlways: Callback on each iteration + /// - ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB + /// - ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows + /// - ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + /// - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + /// + /// + public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + + /// + /// + /// Character input // Read-write // [CharFilter] Replace character with another one, + /// or set to zero to drop. return 1 is equivalent to setting EventChar=0; + /// + /// + /// C++: + /// imgui.h:2713 + ///
ImWchar EventChar + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref uint EventChar => ref Unsafe.AsRef(&_ptr->EventChar); + + /// + /// + /// Key pressed (Up/Down/TAB) // Read-only // [Completion,History] + /// + /// + /// C++: + /// imgui.h:2714 + ///
ImGuiKey EventKey + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref ImGuiKey EventKey => ref Unsafe.AsRef(&_ptr->EventKey); + + /// + /// + /// Text buffer // Read-write // [Resize] Can replace pointer / + /// [Completion,History,Always] Only write to pointed data, don't replace the actual pointer! + /// + /// + /// C++: + /// imgui.h:2715 + ///
char* Buf + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref Ptr Buf => ref Unsafe.AsRef>(&_ptr->Buf); + + /// + /// + /// Text length (in bytes) // Read-write // [Resize,Completion,History,Always] Exclude + /// zero-terminator storage. In C land: == strlen(some_text), in C++ land: string.length() + /// + /// + /// C++: + /// imgui.h:2716 + ///
int BufTextLen + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref int BufTextLen => ref Unsafe.AsRef(&_ptr->BufTextLen); + + /// + /// + /// Buffer size (in bytes) = capacity+1 // Read-only // [Resize,Completion,History,Always] Include + /// zero-terminator storage. In C land == ARRAYSIZE(my_char_array), in C++ land: string.capacity()+1 + /// + /// + /// C++: + /// imgui.h:2717 + ///
int BufSize + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref int BufSize => ref Unsafe.AsRef(&_ptr->BufSize); + + /// + /// + /// Set if you modify Buf/BufTextLen! // Write // [Completion,History,Always] + /// + /// + /// C++: + /// imgui.h:2718 + ///
bool BufDirty + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref bool BufDirty => ref Unsafe.AsRef(&_ptr->BufDirty); + + /// + /// + /// // Read-write // [Completion,History,Always] + /// + /// + /// C++: + /// imgui.h:2719 + ///
int CursorPos + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref int CursorPos => ref Unsafe.AsRef(&_ptr->CursorPos); + + /// + /// + /// // Read-write // [Completion,History,Always] == to SelectionEnd when no selection) + /// + /// + /// C++: + /// imgui.h:2720 + ///
int SelectionStart + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref int SelectionStart => ref Unsafe.AsRef(&_ptr->SelectionStart); + + /// + /// + /// // Read-write // [Completion,History,Always] + /// + /// + /// C++: + /// imgui.h:2721 + ///
int SelectionEnd + ///
+ ///
+ /// + /// + /// Arguments for the different callback events + /// - During Resize callback, Buf will be same as your input buffer. + /// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback. + /// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary. + /// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state. + /// + /// + public ref int SelectionEnd => ref Unsafe.AsRef(&_ptr->SelectionEnd); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiKeyData.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiKeyData.gen.cs new file mode 100644 index 0000000..dab3c6d --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiKeyData.gen.cs @@ -0,0 +1,202 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions. + /// + /// + /// C++: + /// imgui.h:198 + ///
struct ImGuiKeyData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiKeyData + { + /// + /// + /// True for if key is down + /// + /// + /// C++: + /// imgui.h:2432 + ///
bool Down + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + [FieldOffset(0)] + public Bool8 Down; + + /// + /// + /// Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held) + /// + /// + /// C++: + /// imgui.h:2433 + ///
float DownDuration + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + [FieldOffset(4)] + public float DownDuration; + + /// + /// + /// Last frame duration the key has been down + /// + /// + /// C++: + /// imgui.h:2434 + ///
float DownDurationPrev + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + [FieldOffset(8)] + public float DownDurationPrev; + + /// + /// + /// 0.0f..1.0f for gamepad values + /// + /// + /// C++: + /// imgui.h:2435 + ///
float AnalogValue + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + [FieldOffset(12)] + public float AnalogValue; + } + + /// + /// + /// Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions. + /// + /// + /// C++: + /// imgui.h:198 + ///
struct ImGuiKeyData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiKeyDataPtr(ImGuiKeyData* ptr) : INullable + { + private ImGuiKeyData* _ptr = ptr; + public ImGuiKeyData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiKeyDataPtr(ImGuiKeyData* ptr) => new(ptr); + + public static implicit operator ImGuiKeyData*(ImGuiKeyDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// True for if key is down + /// + /// + /// C++: + /// imgui.h:2432 + ///
bool Down + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + public ref bool Down => ref Unsafe.AsRef(&_ptr->Down); + + /// + /// + /// Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held) + /// + /// + /// C++: + /// imgui.h:2433 + ///
float DownDuration + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + public ref float DownDuration => ref Unsafe.AsRef(&_ptr->DownDuration); + + /// + /// + /// Last frame duration the key has been down + /// + /// + /// C++: + /// imgui.h:2434 + ///
float DownDurationPrev + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + public ref float DownDurationPrev => ref Unsafe.AsRef(&_ptr->DownDurationPrev); + + /// + /// + /// 0.0f..1.0f for gamepad values + /// + /// + /// C++: + /// imgui.h:2435 + ///
float AnalogValue + ///
+ ///
+ /// + /// + /// [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. + /// If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration. + /// + /// + public ref float AnalogValue => ref Unsafe.AsRef(&_ptr->AnalogValue); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiListClipper.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiListClipper.gen.cs new file mode 100644 index 0000000..930173c --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiListClipper.gen.cs @@ -0,0 +1,638 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper to manually clip large list of items + /// + /// + /// C++: + /// imgui.h:199 + ///
struct ImGuiListClipper + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct ImGuiListClipper + { + /// + /// + /// Parent UI context + /// + /// + /// C++: + /// imgui.h:2933 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(0)] + public ImGuiContextPtr Ctx; + + /// + /// + /// First item to display, updated by each call to Step() + /// + /// + /// C++: + /// imgui.h:2934 + ///
int DisplayStart + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(8)] + public int DisplayStart; + + /// + /// + /// End of items to display (exclusive) + /// + /// + /// C++: + /// imgui.h:2935 + ///
int DisplayEnd + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(12)] + public int DisplayEnd; + + /// + /// + /// [Internal] Number of items + /// + /// + /// C++: + /// imgui.h:2936 + ///
int ItemsCount + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(16)] + public int ItemsCount; + + /// + /// + /// [Internal] Height of item after a first step and item submission can calculate it + /// + /// + /// C++: + /// imgui.h:2937 + ///
float ItemsHeight + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(20)] + public float ItemsHeight; + + /// + /// + /// [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed + /// + /// + /// C++: + /// imgui.h:2938 + ///
double StartPosY + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(24)] + public double StartPosY; + + /// + /// + /// [Internal] Account for frozen rows in a table and initial loss of precision in very large windows. + /// + /// + /// C++: + /// imgui.h:2939 + ///
double StartSeekOffsetY + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(32)] + public double StartSeekOffsetY; + + /// + /// + /// [Internal] Internal data + /// + /// + /// C++: + /// imgui.h:2940 + ///
void* TempData + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + [FieldOffset(40)] + public nint TempData; + } + + /// + /// + /// Helper to manually clip large list of items + /// + /// + /// C++: + /// imgui.h:199 + ///
struct ImGuiListClipper + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiListClipperPtr(ImGuiListClipper* ptr) : INullable + { + private ImGuiListClipper* _ptr = ptr; + public ImGuiListClipper* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiListClipperPtr(ImGuiListClipper* ptr) => new(ptr); + + public static implicit operator ImGuiListClipper*(ImGuiListClipperPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Parent UI context + /// + /// + /// C++: + /// imgui.h:2933 + ///
ImGuiContext* Ctx + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref ImGuiContextPtr Ctx => ref Unsafe.AsRef(&_ptr->Ctx); + + /// + /// + /// First item to display, updated by each call to Step() + /// + /// + /// C++: + /// imgui.h:2934 + ///
int DisplayStart + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref int DisplayStart => ref Unsafe.AsRef(&_ptr->DisplayStart); + + /// + /// + /// End of items to display (exclusive) + /// + /// + /// C++: + /// imgui.h:2935 + ///
int DisplayEnd + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref int DisplayEnd => ref Unsafe.AsRef(&_ptr->DisplayEnd); + + /// + /// + /// [Internal] Number of items + /// + /// + /// C++: + /// imgui.h:2936 + ///
int ItemsCount + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref int ItemsCount => ref Unsafe.AsRef(&_ptr->ItemsCount); + + /// + /// + /// [Internal] Height of item after a first step and item submission can calculate it + /// + /// + /// C++: + /// imgui.h:2937 + ///
float ItemsHeight + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref float ItemsHeight => ref Unsafe.AsRef(&_ptr->ItemsHeight); + + /// + /// + /// [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed + /// + /// + /// C++: + /// imgui.h:2938 + ///
double StartPosY + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref double StartPosY => ref Unsafe.AsRef(&_ptr->StartPosY); + + /// + /// + /// [Internal] Account for frozen rows in a table and initial loss of precision in very large windows. + /// + /// + /// C++: + /// imgui.h:2939 + ///
double StartSeekOffsetY + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref double StartSeekOffsetY => ref Unsafe.AsRef(&_ptr->StartSeekOffsetY); + + /// + /// + /// [Internal] Internal data + /// + /// + /// C++: + /// imgui.h:2940 + ///
void* TempData + ///
+ ///
+ /// + /// + /// Helper: Manually clip large list of items. + /// If you have lots evenly spaced items and you have random access to the list, you can perform coarse + /// clipping based on visibility to only submit items that are in view. + /// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. + /// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally + /// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily + /// scale using lists with tens of thousands of items without a problem) + /// Usage: + /// ImGuiListClipper clipper; + /// clipper.Begin(1000); // We have 1000 elements, evenly spaced. + /// while (clipper.Step()) + /// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + /// ImGui::Text("line number %d", i); + /// Generally what happens is: + /// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. + /// - User code submit that one element. + /// - Clipper can measure the height of the first element + /// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. + /// - User code submit visible elements. + /// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. + /// + /// + public ref nint TempData => ref Unsafe.AsRef(&_ptr->TempData); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiMultiSelectIO.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiMultiSelectIO.gen.cs new file mode 100644 index 0000000..1f2c46d --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiMultiSelectIO.gen.cs @@ -0,0 +1,323 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Structure to interact with a BeginMultiSelect()/EndMultiSelect() block + /// + /// + /// C++: + /// imgui.h:200 + ///
struct ImGuiMultiSelectIO + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImGuiMultiSelectIO + { + /// + /// + /// ms:w, app:r / ms:w app:r // Requests to apply to your selection data. + /// + /// + /// C++: + /// imgui.h:3119 + ///
ImVector<ImGuiSelectionRequest> Requests + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + [FieldOffset(0)] + public ImVector Requests; + + /// + /// + /// ms:w app:r / // (If using clipper) Begin: Source item (often the first selected + /// item) must never be clipped: use clipper.IncludeItemByIndex() to ensure it is submitted. + /// + /// + /// C++: + /// imgui.h:3120 + ///
ImGuiSelectionUserData RangeSrcItem + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + [FieldOffset(16)] + public ulong RangeSrcItem; + + /// + /// + /// ms:w, app:r / // (If using deletion) Last known SetNextItemSelectionUserData() value + /// for NavId (if part of submitted items). + /// + /// + /// C++: + /// imgui.h:3121 + ///
ImGuiSelectionUserData NavIdItem + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + [FieldOffset(24)] + public ulong NavIdItem; + + /// + /// + /// ms:w, app:r / app:r // (If using deletion) Last known selection state for NavId (if part of + /// submitted items). + /// + /// + /// C++: + /// imgui.h:3122 + ///
bool NavIdSelected + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + [FieldOffset(32)] + public Bool8 NavIdSelected; + + /// + /// + /// app:w / ms:r // (If using deletion) Set before EndMultiSelect() to reset ResetSrcItem + /// (e.g. if deleted selection). + /// + /// + /// C++: + /// imgui.h:3123 + ///
bool RangeSrcReset + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + [FieldOffset(33)] + public Bool8 RangeSrcReset; + + /// + /// + /// ms:w, app:r / app:r // 'int items_count' parameter to BeginMultiSelect() is copied here for + /// convenience, allowing simpler calls to your ApplyRequests handler. Not used internally. + /// + /// + /// C++: + /// imgui.h:3124 + ///
int ItemsCount + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + [FieldOffset(36)] + public int ItemsCount; + } + + /// + /// + /// Structure to interact with a BeginMultiSelect()/EndMultiSelect() block + /// + /// + /// C++: + /// imgui.h:200 + ///
struct ImGuiMultiSelectIO + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiMultiSelectIOPtr(ImGuiMultiSelectIO* ptr) : INullable + { + private ImGuiMultiSelectIO* _ptr = ptr; + public ImGuiMultiSelectIO* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiMultiSelectIOPtr(ImGuiMultiSelectIO* ptr) => new(ptr); + + public static implicit operator ImGuiMultiSelectIO*(ImGuiMultiSelectIOPtr wrapper) => wrapper.Ptr; + + /// + /// + /// ms:w, app:r / ms:w app:r // Requests to apply to your selection data. + /// + /// + /// C++: + /// imgui.h:3119 + ///
ImVector<ImGuiSelectionRequest> Requests + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + public ref ImVector Requests => + ref Unsafe.AsRef>(&_ptr->Requests); + + /// + /// + /// ms:w app:r / // (If using clipper) Begin: Source item (often the first selected + /// item) must never be clipped: use clipper.IncludeItemByIndex() to ensure it is submitted. + /// + /// + /// C++: + /// imgui.h:3120 + ///
ImGuiSelectionUserData RangeSrcItem + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + public ref ulong RangeSrcItem => ref Unsafe.AsRef(&_ptr->RangeSrcItem); + + /// + /// + /// ms:w, app:r / // (If using deletion) Last known SetNextItemSelectionUserData() value + /// for NavId (if part of submitted items). + /// + /// + /// C++: + /// imgui.h:3121 + ///
ImGuiSelectionUserData NavIdItem + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + public ref ulong NavIdItem => ref Unsafe.AsRef(&_ptr->NavIdItem); + + /// + /// + /// ms:w, app:r / app:r // (If using deletion) Last known selection state for NavId (if part of + /// submitted items). + /// + /// + /// C++: + /// imgui.h:3122 + ///
bool NavIdSelected + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + public ref bool NavIdSelected => ref Unsafe.AsRef(&_ptr->NavIdSelected); + + /// + /// + /// app:w / ms:r // (If using deletion) Set before EndMultiSelect() to reset ResetSrcItem + /// (e.g. if deleted selection). + /// + /// + /// C++: + /// imgui.h:3123 + ///
bool RangeSrcReset + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + public ref bool RangeSrcReset => ref Unsafe.AsRef(&_ptr->RangeSrcReset); + + /// + /// + /// ms:w, app:r / app:r // 'int items_count' parameter to BeginMultiSelect() is copied here for + /// convenience, allowing simpler calls to your ApplyRequests handler. Not used internally. + /// + /// + /// C++: + /// imgui.h:3124 + ///
int ItemsCount + ///
+ ///
+ /// + /// + /// Main IO structure returned by BeginMultiSelect()/EndMultiSelect(). + /// This mainly contains a list of selection requests. + /// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen. + /// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo) + /// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code. + /// + /// + public ref int ItemsCount => ref Unsafe.AsRef(&_ptr->ItemsCount); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiPayload.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiPayload.gen.cs new file mode 100644 index 0000000..f898692 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiPayload.gen.cs @@ -0,0 +1,312 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// User data payload for drag and drop operations + /// + /// + /// C++: + /// imgui.h:202 + ///
struct ImGuiPayload + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct ImGuiPayload + { + /// + /// + /// Data (copied and owned by dear imgui) + /// + /// + /// C++: + /// imgui.h:2769 + ///
void* Data + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(0)] + public nint Data; + + /// + /// + /// Data size + /// + /// + /// C++: + /// imgui.h:2770 + ///
int DataSize + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(8)] + public int DataSize; + + /// + /// + /// Source item id + /// + /// + /// C++: + /// imgui.h:2773 + ///
ImGuiID SourceId + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(12)] + public ImGuiID SourceId; + + /// + /// + /// Source parent id (if available) + /// + /// + /// C++: + /// imgui.h:2774 + ///
ImGuiID SourceParentId + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(16)] + public ImGuiID SourceParentId; + + /// + /// + /// Data timestamp + /// + /// + /// C++: + /// imgui.h:2775 + ///
int DataFrameCount + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(20)] + public int DataFrameCount; + + /// + /// Data type tag (short user-supplied string, 32 characters max) + /// + [FieldOffset(24)] + public fixed byte DataType[33]; + + /// + /// + /// Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle + /// overlapping drag targets) + /// + /// + /// C++: + /// imgui.h:2777 + ///
bool Preview + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(57)] + public Bool8 Preview; + + /// + /// + /// Set when AcceptDragDropPayload() was called and mouse button is released over the target item. + /// + /// + /// C++: + /// imgui.h:2778 + ///
bool Delivery + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(58)] + public Bool8 Delivery; + } + + /// + /// + /// User data payload for drag and drop operations + /// + /// + /// C++: + /// imgui.h:202 + ///
struct ImGuiPayload + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiPayloadPtr(ImGuiPayload* ptr) : INullable + { + private ImGuiPayload* _ptr = ptr; + public ImGuiPayload* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiPayloadPtr(ImGuiPayload* ptr) => new(ptr); + + public static implicit operator ImGuiPayload*(ImGuiPayloadPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Data (copied and owned by dear imgui) + /// + /// + /// C++: + /// imgui.h:2769 + ///
void* Data + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref nint Data => ref Unsafe.AsRef(&_ptr->Data); + + /// + /// + /// Data size + /// + /// + /// C++: + /// imgui.h:2770 + ///
int DataSize + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref int DataSize => ref Unsafe.AsRef(&_ptr->DataSize); + + /// + /// + /// Source item id + /// + /// + /// C++: + /// imgui.h:2773 + ///
ImGuiID SourceId + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImGuiID SourceId => ref Unsafe.AsRef(&_ptr->SourceId); + + /// + /// + /// Source parent id (if available) + /// + /// + /// C++: + /// imgui.h:2774 + ///
ImGuiID SourceParentId + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImGuiID SourceParentId => ref Unsafe.AsRef(&_ptr->SourceParentId); + + /// + /// + /// Data timestamp + /// + /// + /// C++: + /// imgui.h:2775 + ///
int DataFrameCount + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref int DataFrameCount => ref Unsafe.AsRef(&_ptr->DataFrameCount); + + /// + /// Data type tag (short user-supplied string, 32 characters max) + /// + public Span DataType => MemoryMarshal.CreateSpan(ref _ptr->DataType[0], 33); + + /// + /// + /// Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle + /// overlapping drag targets) + /// + /// + /// C++: + /// imgui.h:2777 + ///
bool Preview + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref bool Preview => ref Unsafe.AsRef(&_ptr->Preview); + + /// + /// + /// Set when AcceptDragDropPayload() was called and mouse button is released over the target item. + /// + /// + /// C++: + /// imgui.h:2778 + ///
bool Delivery + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref bool Delivery => ref Unsafe.AsRef(&_ptr->Delivery); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiPlatformIO.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiPlatformIO.gen.cs new file mode 100644 index 0000000..f671542 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiPlatformIO.gen.cs @@ -0,0 +1,1423 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Interface between platform/renderer backends and ImGui (e.g. Clipboard, IME, Multi-Viewport support). + /// Extends ImGuiIO. + /// + /// + /// C++: + /// imgui.h:203 + ///
struct ImGuiPlatformIO + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 328)] + public partial struct ImGuiPlatformIO + { + /// + /// + /// C++: + /// imgui.h:4113 + ///
const char* (*Platform_GetClipboardTextFn)(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Optional: Access OS clipboard + /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) + /// + /// + [FieldOffset(0)] + public nint Platform_GetClipboardTextFn; + + /// + /// + /// C++: + /// imgui.h:4114 + ///
void (*Platform_SetClipboardTextFn)(ImGuiContext* ctx, const char* text) + ///
+ ///
+ /// + /// + /// Optional: Access OS clipboard + /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) + /// + /// + [FieldOffset(8)] + public nint Platform_SetClipboardTextFn; + + /// + /// + /// C++: + /// imgui.h:4115 + ///
void* Platform_ClipboardUserData + ///
+ ///
+ /// + /// + /// Optional: Access OS clipboard + /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) + /// + /// + [FieldOffset(16)] + public nint Platform_ClipboardUserData; + + /// + /// + /// C++: + /// imgui.h:4119 + ///
bool (*Platform_OpenInShellFn)(ImGuiContext* ctx, const char* path) + ///
+ ///
+ /// + /// + /// Optional: Open link/folder/file in OS Shell + /// (default to use ShellExecuteW() on Windows, system() on Linux/Mac) + /// + /// + [FieldOffset(24)] + public nint Platform_OpenInShellFn; + + /// + /// + /// C++: + /// imgui.h:4120 + ///
void* Platform_OpenInShellUserData + ///
+ ///
+ /// + /// + /// Optional: Open link/folder/file in OS Shell + /// (default to use ShellExecuteW() on Windows, system() on Linux/Mac) + /// + /// + [FieldOffset(32)] + public nint Platform_OpenInShellUserData; + + /// + /// + /// C++: + /// imgui.h:4124 + ///
+ /// void (*Platform_SetImeDataFn)(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data) + ///
+ ///
+ /// + /// + /// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows) + /// (default to use native imm32 api on Windows) + /// + /// + [FieldOffset(40)] + public nint Platform_SetImeDataFn; + + /// + /// + /// C++: + /// imgui.h:4125 + ///
void* Platform_ImeUserData + ///
+ ///
+ /// + /// + /// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows) + /// (default to use native imm32 api on Windows) + /// + /// + [FieldOffset(48)] + public nint Platform_ImeUserData; + + /// + /// + /// '.' + /// + /// + /// C++: + /// imgui.h:4130 + ///
ImWchar Platform_LocaleDecimalPoint + ///
+ ///
+ /// + /// + /// Optional: Platform locale + /// [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point + /// + /// + [FieldOffset(56)] + public uint Platform_LocaleDecimalPoint; + + /// + /// + /// C++: + /// imgui.h:4137 + ///
int Renderer_TextureMaxWidth + ///
+ ///
+ /// + /// + /// Optional: Maximum texture size supported by renderer (used to adjust how we size textures). 0 if not + /// known. + /// + /// + [FieldOffset(60)] + public int Renderer_TextureMaxWidth; + + /// + /// + /// C++: + /// imgui.h:4138 + ///
int Renderer_TextureMaxHeight + ///
+ ///
+ /// + /// + /// Optional: Maximum texture size supported by renderer (used to adjust how we size textures). 0 if not + /// known. + /// + /// + [FieldOffset(64)] + public int Renderer_TextureMaxHeight; + + /// + /// + /// C++: + /// imgui.h:4141 + ///
void* Renderer_RenderState + ///
+ ///
+ /// + /// + /// Written by some backends during ImGui_ImplXXXX_RenderDrawData() call to point backend_specific + /// ImGui_ImplXXXX_RenderState* structure. + /// + /// + [FieldOffset(72)] + public nint Renderer_RenderState; + + /// + /// + /// . . U . . // Create a new platform window for the given viewport + /// + /// + /// C++: + /// imgui.h:4160 + ///
void (*Platform_CreateWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(80)] + public nint Platform_CreateWindow; + + /// + /// + /// N . U . D // + /// + /// + /// C++: + /// imgui.h:4161 + ///
void (*Platform_DestroyWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(88)] + public nint Platform_DestroyWindow; + + /// + /// + /// . . U . . // Newly created windows are initially hidden so SetWindowPos/Size/Title can be called on + /// them before showing the window + /// + /// + /// C++: + /// imgui.h:4162 + ///
void (*Platform_ShowWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(96)] + public nint Platform_ShowWindow; + + /// + /// + /// . . U . . // Set platform window position (given the upper-left corner of client area) + /// + /// + /// C++: + /// imgui.h:4163 + ///
void (*Platform_SetWindowPos)(ImGuiViewport* vp, ImVec2 pos) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(104)] + public nint Platform_SetWindowPos; + + /// + /// + /// N . . . . // + /// + /// + /// C++: + /// imgui.h:4164 + ///
ImVec2 (*Platform_GetWindowPos)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(112)] + public nint Platform_GetWindowPos; + + /// + /// + /// . . U . . // Set platform window client area size (ignoring OS decorations such as OS title bar etc.) + /// + /// + /// C++: + /// imgui.h:4165 + ///
void (*Platform_SetWindowSize)(ImGuiViewport* vp, ImVec2 size) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(120)] + public nint Platform_SetWindowSize; + + /// + /// + /// N . . . . // Get platform window client area size + /// + /// + /// C++: + /// imgui.h:4166 + ///
ImVec2 (*Platform_GetWindowSize)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(128)] + public nint Platform_GetWindowSize; + + /// + /// + /// N . . . . // Return viewport density. Always 1,1 on Windows, often 2,2 on Retina display on macOS/iOS. + /// MUST BE INTEGER VALUES. + /// + /// + /// C++: + /// imgui.h:4167 + ///
ImVec2 (*Platform_GetWindowFramebufferScale)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(136)] + public nint Platform_GetWindowFramebufferScale; + + /// + /// + /// N . . . . // Move window to front and set input focus + /// + /// + /// C++: + /// imgui.h:4168 + ///
void (*Platform_SetWindowFocus)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(144)] + public nint Platform_SetWindowFocus; + + /// + /// + /// . . U . . // + /// + /// + /// C++: + /// imgui.h:4169 + ///
bool (*Platform_GetWindowFocus)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(152)] + public nint Platform_GetWindowFocus; + + /// + /// + /// N . . . . // Get platform window minimized state. When minimized, we generally won't attempt to get/set + /// size and contents will be culled more easily + /// + /// + /// C++: + /// imgui.h:4170 + ///
bool (*Platform_GetWindowMinimized)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(160)] + public nint Platform_GetWindowMinimized; + + /// + /// + /// . . U . . // Set platform window title (given an UTF-8 string) + /// + /// + /// C++: + /// imgui.h:4171 + ///
void (*Platform_SetWindowTitle)(ImGuiViewport* vp, const char* str) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(168)] + public nint Platform_SetWindowTitle; + + /// + /// + /// . . U . . // (Optional) Setup global transparency (not per-pixel transparency) + /// + /// + /// C++: + /// imgui.h:4172 + ///
void (*Platform_SetWindowAlpha)(ImGuiViewport* vp, float alpha) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(176)] + public nint Platform_SetWindowAlpha; + + /// + /// + /// . . U . . // (Optional) Called by UpdatePlatformWindows(). Optional hook to allow the platform backend + /// from doing general book-keeping every frame. + /// + /// + /// C++: + /// imgui.h:4173 + ///
void (*Platform_UpdateWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(184)] + public nint Platform_UpdateWindow; + + /// + /// + /// . . . R . // (Optional) Main rendering (platform side! This is often unused, or just setting a + /// "current" context for OpenGL bindings). 'render_arg' is the value passed to + /// RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4174 + ///
void (*Platform_RenderWindow)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(192)] + public nint Platform_RenderWindow; + + /// + /// + /// . . . R . // (Optional) Call Present/SwapBuffers (platform side! This is often unused!). 'render_arg' + /// is the value passed to RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4175 + ///
void (*Platform_SwapBuffers)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(200)] + public nint Platform_SwapBuffers; + + /// + /// + /// N . . . . // (Optional) [BETA] FIXME-DPI: DPI handling: Return DPI scale for this viewport. 1.0f = 96 + /// DPI. + /// + /// + /// C++: + /// imgui.h:4176 + ///
float (*Platform_GetWindowDpiScale)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(208)] + public nint Platform_GetWindowDpiScale; + + /// + /// + /// . F . . . // (Optional) [BETA] FIXME-DPI: DPI handling: Called during Begin() every time the viewport + /// we are outputting into changes, so backend has a chance to swap fonts to adjust style. + /// + /// + /// C++: + /// imgui.h:4177 + ///
void (*Platform_OnChangedViewport)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(216)] + public nint Platform_OnChangedViewport; + + /// + /// + /// N . . . . // (Optional) [BETA] Get initial work area inset for the viewport (won't be covered by main + /// menu bar, dockspace over viewport etc.). Default to (0,0),(0,0). 'safeAreaInsets' in iOS land, + /// 'DisplayCutout' in Android land. + /// + /// + /// C++: + /// imgui.h:4178 + ///
ImVec4 (*Platform_GetWindowWorkAreaInsets)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(224)] + public nint Platform_GetWindowWorkAreaInsets; + + /// + /// + /// (Optional) For a Vulkan Renderer to call into Platform code (since the surface creation needs to tie + /// them both). + /// + /// + /// C++: + /// imgui.h:4179 + ///
+ /// int (*Platform_CreateVkSurface)(ImGuiViewport* vp, ImU64 vk_inst, const void* vk_allocators, ImU64* out_vk_surface) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + [FieldOffset(232)] + public nint Platform_CreateVkSurface; + + /// + /// + /// . . U . . // Create swap chain, frame buffers etc. (called after Platform_CreateWindow) + /// + /// + /// C++: + /// imgui.h:4182 + ///
void (*Renderer_CreateWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + [FieldOffset(240)] + public nint Renderer_CreateWindow; + + /// + /// + /// N . U . D // Destroy swap chain, frame buffers etc. (called before Platform_DestroyWindow) + /// + /// + /// C++: + /// imgui.h:4183 + ///
void (*Renderer_DestroyWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + [FieldOffset(248)] + public nint Renderer_DestroyWindow; + + /// + /// + /// . . U . . // Resize swap chain, frame buffers etc. (called after Platform_SetWindowSize) + /// + /// + /// C++: + /// imgui.h:4184 + ///
void (*Renderer_SetWindowSize)(ImGuiViewport* vp, ImVec2 size) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + [FieldOffset(256)] + public nint Renderer_SetWindowSize; + + /// + /// + /// . . . R . // (Optional) Clear framebuffer, setup render target, then render the viewport->DrawData. + /// 'render_arg' is the value passed to RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4185 + ///
void (*Renderer_RenderWindow)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + [FieldOffset(264)] + public nint Renderer_RenderWindow; + + /// + /// + /// . . . R . // (Optional) Call Present/SwapBuffers. 'render_arg' is the value passed to + /// RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4186 + ///
void (*Renderer_SwapBuffers)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + [FieldOffset(272)] + public nint Renderer_SwapBuffers; + + /// + /// + /// C++: + /// imgui.h:4191 + ///
ImVector<ImGuiPlatformMonitor> Monitors + ///
+ ///
+ /// + /// + /// (Optional) Monitor list + /// - Updated by: app/backend. Update every frame to dynamically support changing monitor or DPI configuration. + /// - Used by: dear imgui to query DPI info, clamp popups/tooltips within same monitor and not have them straddle monitors. + /// + /// + [FieldOffset(280)] + public ImVector Monitors; + + /// + /// + /// List of textures used by Dear ImGui (most often 1) + contents of external texture list is automatically + /// appended into this. + /// + /// + /// C++: + /// imgui.h:4199 + ///
ImVector<ImTextureData*> Textures + ///
+ ///
+ /// + /// + /// Textures list (the list is updated by calling ImGui::EndFrame or ImGui::Render) + /// The ImGui_ImplXXXX_RenderDrawData() function of each backend generally access this via ImDrawData::Textures which points to this. The array is available here mostly because backends will want to destroy textures on shutdown. + /// + /// + [FieldOffset(296)] + public ImVector Textures; + + /// + /// + /// Main viewports, followed by all secondary viewports. + /// + /// + /// C++: + /// imgui.h:4203 + ///
ImVector<ImGuiViewport*> Viewports + ///
+ ///
+ /// + /// + /// Viewports list (the list is updated by calling ImGui::EndFrame or ImGui::Render) + /// (in the future we will attempt to organize this feature to remove the need for a "main viewport") + /// + /// + [FieldOffset(312)] + public ImVector Viewports; + } + + /// + /// + /// Interface between platform/renderer backends and ImGui (e.g. Clipboard, IME, Multi-Viewport support). + /// Extends ImGuiIO. + /// + /// + /// C++: + /// imgui.h:203 + ///
struct ImGuiPlatformIO + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiPlatformIOPtr(ImGuiPlatformIO* ptr) : INullable + { + private ImGuiPlatformIO* _ptr = ptr; + public ImGuiPlatformIO* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiPlatformIOPtr(ImGuiPlatformIO* ptr) => new(ptr); + + public static implicit operator ImGuiPlatformIO*(ImGuiPlatformIOPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:4113 + ///
const char* (*Platform_GetClipboardTextFn)(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Optional: Access OS clipboard + /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) + /// + /// + public ref nint Platform_GetClipboardTextFn => ref Unsafe.AsRef(&_ptr->Platform_GetClipboardTextFn); + + /// + /// + /// C++: + /// imgui.h:4114 + ///
void (*Platform_SetClipboardTextFn)(ImGuiContext* ctx, const char* text) + ///
+ ///
+ /// + /// + /// Optional: Access OS clipboard + /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) + /// + /// + public ref nint Platform_SetClipboardTextFn => ref Unsafe.AsRef(&_ptr->Platform_SetClipboardTextFn); + + /// + /// + /// C++: + /// imgui.h:4115 + ///
void* Platform_ClipboardUserData + ///
+ ///
+ /// + /// + /// Optional: Access OS clipboard + /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) + /// + /// + public ref nint Platform_ClipboardUserData => ref Unsafe.AsRef(&_ptr->Platform_ClipboardUserData); + + /// + /// + /// C++: + /// imgui.h:4119 + ///
bool (*Platform_OpenInShellFn)(ImGuiContext* ctx, const char* path) + ///
+ ///
+ /// + /// + /// Optional: Open link/folder/file in OS Shell + /// (default to use ShellExecuteW() on Windows, system() on Linux/Mac) + /// + /// + public ref nint Platform_OpenInShellFn => ref Unsafe.AsRef(&_ptr->Platform_OpenInShellFn); + + /// + /// + /// C++: + /// imgui.h:4120 + ///
void* Platform_OpenInShellUserData + ///
+ ///
+ /// + /// + /// Optional: Open link/folder/file in OS Shell + /// (default to use ShellExecuteW() on Windows, system() on Linux/Mac) + /// + /// + public ref nint Platform_OpenInShellUserData => ref Unsafe.AsRef(&_ptr->Platform_OpenInShellUserData); + + /// + /// + /// C++: + /// imgui.h:4124 + ///
+ /// void (*Platform_SetImeDataFn)(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data) + ///
+ ///
+ /// + /// + /// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows) + /// (default to use native imm32 api on Windows) + /// + /// + public ref nint Platform_SetImeDataFn => ref Unsafe.AsRef(&_ptr->Platform_SetImeDataFn); + + /// + /// + /// C++: + /// imgui.h:4125 + ///
void* Platform_ImeUserData + ///
+ ///
+ /// + /// + /// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows) + /// (default to use native imm32 api on Windows) + /// + /// + public ref nint Platform_ImeUserData => ref Unsafe.AsRef(&_ptr->Platform_ImeUserData); + + /// + /// + /// '.' + /// + /// + /// C++: + /// imgui.h:4130 + ///
ImWchar Platform_LocaleDecimalPoint + ///
+ ///
+ /// + /// + /// Optional: Platform locale + /// [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point + /// + /// + public ref uint Platform_LocaleDecimalPoint => ref Unsafe.AsRef(&_ptr->Platform_LocaleDecimalPoint); + + /// + /// + /// C++: + /// imgui.h:4137 + ///
int Renderer_TextureMaxWidth + ///
+ ///
+ /// + /// + /// Optional: Maximum texture size supported by renderer (used to adjust how we size textures). 0 if not + /// known. + /// + /// + public ref int Renderer_TextureMaxWidth => ref Unsafe.AsRef(&_ptr->Renderer_TextureMaxWidth); + + /// + /// + /// C++: + /// imgui.h:4138 + ///
int Renderer_TextureMaxHeight + ///
+ ///
+ /// + /// + /// Optional: Maximum texture size supported by renderer (used to adjust how we size textures). 0 if not + /// known. + /// + /// + public ref int Renderer_TextureMaxHeight => ref Unsafe.AsRef(&_ptr->Renderer_TextureMaxHeight); + + /// + /// + /// C++: + /// imgui.h:4141 + ///
void* Renderer_RenderState + ///
+ ///
+ /// + /// + /// Written by some backends during ImGui_ImplXXXX_RenderDrawData() call to point backend_specific + /// ImGui_ImplXXXX_RenderState* structure. + /// + /// + public ref nint Renderer_RenderState => ref Unsafe.AsRef(&_ptr->Renderer_RenderState); + + /// + /// + /// . . U . . // Create a new platform window for the given viewport + /// + /// + /// C++: + /// imgui.h:4160 + ///
void (*Platform_CreateWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_CreateWindow => ref Unsafe.AsRef(&_ptr->Platform_CreateWindow); + + /// + /// + /// N . U . D // + /// + /// + /// C++: + /// imgui.h:4161 + ///
void (*Platform_DestroyWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_DestroyWindow => ref Unsafe.AsRef(&_ptr->Platform_DestroyWindow); + + /// + /// + /// . . U . . // Newly created windows are initially hidden so SetWindowPos/Size/Title can be called on + /// them before showing the window + /// + /// + /// C++: + /// imgui.h:4162 + ///
void (*Platform_ShowWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_ShowWindow => ref Unsafe.AsRef(&_ptr->Platform_ShowWindow); + + /// + /// + /// . . U . . // Set platform window position (given the upper-left corner of client area) + /// + /// + /// C++: + /// imgui.h:4163 + ///
void (*Platform_SetWindowPos)(ImGuiViewport* vp, ImVec2 pos) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_SetWindowPos => ref Unsafe.AsRef(&_ptr->Platform_SetWindowPos); + + /// + /// + /// N . . . . // + /// + /// + /// C++: + /// imgui.h:4164 + ///
ImVec2 (*Platform_GetWindowPos)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowPos => ref Unsafe.AsRef(&_ptr->Platform_GetWindowPos); + + /// + /// + /// . . U . . // Set platform window client area size (ignoring OS decorations such as OS title bar etc.) + /// + /// + /// C++: + /// imgui.h:4165 + ///
void (*Platform_SetWindowSize)(ImGuiViewport* vp, ImVec2 size) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_SetWindowSize => ref Unsafe.AsRef(&_ptr->Platform_SetWindowSize); + + /// + /// + /// N . . . . // Get platform window client area size + /// + /// + /// C++: + /// imgui.h:4166 + ///
ImVec2 (*Platform_GetWindowSize)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowSize => ref Unsafe.AsRef(&_ptr->Platform_GetWindowSize); + + /// + /// + /// N . . . . // Return viewport density. Always 1,1 on Windows, often 2,2 on Retina display on macOS/iOS. + /// MUST BE INTEGER VALUES. + /// + /// + /// C++: + /// imgui.h:4167 + ///
ImVec2 (*Platform_GetWindowFramebufferScale)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowFramebufferScale => + ref Unsafe.AsRef(&_ptr->Platform_GetWindowFramebufferScale); + + /// + /// + /// N . . . . // Move window to front and set input focus + /// + /// + /// C++: + /// imgui.h:4168 + ///
void (*Platform_SetWindowFocus)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_SetWindowFocus => ref Unsafe.AsRef(&_ptr->Platform_SetWindowFocus); + + /// + /// + /// . . U . . // + /// + /// + /// C++: + /// imgui.h:4169 + ///
bool (*Platform_GetWindowFocus)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowFocus => ref Unsafe.AsRef(&_ptr->Platform_GetWindowFocus); + + /// + /// + /// N . . . . // Get platform window minimized state. When minimized, we generally won't attempt to get/set + /// size and contents will be culled more easily + /// + /// + /// C++: + /// imgui.h:4170 + ///
bool (*Platform_GetWindowMinimized)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowMinimized => ref Unsafe.AsRef(&_ptr->Platform_GetWindowMinimized); + + /// + /// + /// . . U . . // Set platform window title (given an UTF-8 string) + /// + /// + /// C++: + /// imgui.h:4171 + ///
void (*Platform_SetWindowTitle)(ImGuiViewport* vp, const char* str) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_SetWindowTitle => ref Unsafe.AsRef(&_ptr->Platform_SetWindowTitle); + + /// + /// + /// . . U . . // (Optional) Setup global transparency (not per-pixel transparency) + /// + /// + /// C++: + /// imgui.h:4172 + ///
void (*Platform_SetWindowAlpha)(ImGuiViewport* vp, float alpha) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_SetWindowAlpha => ref Unsafe.AsRef(&_ptr->Platform_SetWindowAlpha); + + /// + /// + /// . . U . . // (Optional) Called by UpdatePlatformWindows(). Optional hook to allow the platform backend + /// from doing general book-keeping every frame. + /// + /// + /// C++: + /// imgui.h:4173 + ///
void (*Platform_UpdateWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_UpdateWindow => ref Unsafe.AsRef(&_ptr->Platform_UpdateWindow); + + /// + /// + /// . . . R . // (Optional) Main rendering (platform side! This is often unused, or just setting a + /// "current" context for OpenGL bindings). 'render_arg' is the value passed to + /// RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4174 + ///
void (*Platform_RenderWindow)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_RenderWindow => ref Unsafe.AsRef(&_ptr->Platform_RenderWindow); + + /// + /// + /// . . . R . // (Optional) Call Present/SwapBuffers (platform side! This is often unused!). 'render_arg' + /// is the value passed to RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4175 + ///
void (*Platform_SwapBuffers)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_SwapBuffers => ref Unsafe.AsRef(&_ptr->Platform_SwapBuffers); + + /// + /// + /// N . . . . // (Optional) [BETA] FIXME-DPI: DPI handling: Return DPI scale for this viewport. 1.0f = 96 + /// DPI. + /// + /// + /// C++: + /// imgui.h:4176 + ///
float (*Platform_GetWindowDpiScale)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowDpiScale => ref Unsafe.AsRef(&_ptr->Platform_GetWindowDpiScale); + + /// + /// + /// . F . . . // (Optional) [BETA] FIXME-DPI: DPI handling: Called during Begin() every time the viewport + /// we are outputting into changes, so backend has a chance to swap fonts to adjust style. + /// + /// + /// C++: + /// imgui.h:4177 + ///
void (*Platform_OnChangedViewport)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_OnChangedViewport => ref Unsafe.AsRef(&_ptr->Platform_OnChangedViewport); + + /// + /// + /// N . . . . // (Optional) [BETA] Get initial work area inset for the viewport (won't be covered by main + /// menu bar, dockspace over viewport etc.). Default to (0,0),(0,0). 'safeAreaInsets' in iOS land, + /// 'DisplayCutout' in Android land. + /// + /// + /// C++: + /// imgui.h:4178 + ///
ImVec4 (*Platform_GetWindowWorkAreaInsets)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_GetWindowWorkAreaInsets => + ref Unsafe.AsRef(&_ptr->Platform_GetWindowWorkAreaInsets); + + /// + /// + /// (Optional) For a Vulkan Renderer to call into Platform code (since the surface creation needs to tie + /// them both). + /// + /// + /// C++: + /// imgui.h:4179 + ///
+ /// int (*Platform_CreateVkSurface)(ImGuiViewport* vp, ImU64 vk_inst, const void* vk_allocators, ImU64* out_vk_surface) + ///
+ ///
+ /// + /// + /// Platform Backend functions (e.g. Win32, GLFW, SDL) ------------------- Called by ----- + /// + /// + public ref nint Platform_CreateVkSurface => ref Unsafe.AsRef(&_ptr->Platform_CreateVkSurface); + + /// + /// + /// . . U . . // Create swap chain, frame buffers etc. (called after Platform_CreateWindow) + /// + /// + /// C++: + /// imgui.h:4182 + ///
void (*Renderer_CreateWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + public ref nint Renderer_CreateWindow => ref Unsafe.AsRef(&_ptr->Renderer_CreateWindow); + + /// + /// + /// N . U . D // Destroy swap chain, frame buffers etc. (called before Platform_DestroyWindow) + /// + /// + /// C++: + /// imgui.h:4183 + ///
void (*Renderer_DestroyWindow)(ImGuiViewport* vp) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + public ref nint Renderer_DestroyWindow => ref Unsafe.AsRef(&_ptr->Renderer_DestroyWindow); + + /// + /// + /// . . U . . // Resize swap chain, frame buffers etc. (called after Platform_SetWindowSize) + /// + /// + /// C++: + /// imgui.h:4184 + ///
void (*Renderer_SetWindowSize)(ImGuiViewport* vp, ImVec2 size) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + public ref nint Renderer_SetWindowSize => ref Unsafe.AsRef(&_ptr->Renderer_SetWindowSize); + + /// + /// + /// . . . R . // (Optional) Clear framebuffer, setup render target, then render the viewport->DrawData. + /// 'render_arg' is the value passed to RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4185 + ///
void (*Renderer_RenderWindow)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + public ref nint Renderer_RenderWindow => ref Unsafe.AsRef(&_ptr->Renderer_RenderWindow); + + /// + /// + /// . . . R . // (Optional) Call Present/SwapBuffers. 'render_arg' is the value passed to + /// RenderPlatformWindowsDefault(). + /// + /// + /// C++: + /// imgui.h:4186 + ///
void (*Renderer_SwapBuffers)(ImGuiViewport* vp, void* render_arg) + ///
+ ///
+ /// + /// + /// Renderer Backend functions (e.g. DirectX, OpenGL, Vulkan) ------------ Called by ----- + /// + /// + public ref nint Renderer_SwapBuffers => ref Unsafe.AsRef(&_ptr->Renderer_SwapBuffers); + + /// + /// + /// C++: + /// imgui.h:4191 + ///
ImVector<ImGuiPlatformMonitor> Monitors + ///
+ ///
+ /// + /// + /// (Optional) Monitor list + /// - Updated by: app/backend. Update every frame to dynamically support changing monitor or DPI configuration. + /// - Used by: dear imgui to query DPI info, clamp popups/tooltips within same monitor and not have them straddle monitors. + /// + /// + public ref ImVector Monitors => + ref Unsafe.AsRef>(&_ptr->Monitors); + + /// + /// + /// List of textures used by Dear ImGui (most often 1) + contents of external texture list is automatically + /// appended into this. + /// + /// + /// C++: + /// imgui.h:4199 + ///
ImVector<ImTextureData*> Textures + ///
+ ///
+ /// + /// + /// Textures list (the list is updated by calling ImGui::EndFrame or ImGui::Render) + /// The ImGui_ImplXXXX_RenderDrawData() function of each backend generally access this via ImDrawData::Textures which points to this. The array is available here mostly because backends will want to destroy textures on shutdown. + /// + /// + public ref ImVector Textures => ref Unsafe.AsRef>(&_ptr->Textures); + + /// + /// + /// Main viewports, followed by all secondary viewports. + /// + /// + /// C++: + /// imgui.h:4203 + ///
ImVector<ImGuiViewport*> Viewports + ///
+ ///
+ /// + /// + /// Viewports list (the list is updated by calling ImGui::EndFrame or ImGui::Render) + /// (in the future we will attempt to organize this feature to remove the need for a "main viewport") + /// + /// + public ref ImVector Viewports => + ref Unsafe.AsRef>(&_ptr->Viewports); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiPlatformImeData.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiPlatformImeData.gen.cs new file mode 100644 index 0000000..5012952 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiPlatformImeData.gen.cs @@ -0,0 +1,241 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Platform IME data for io.PlatformSetImeDataFn() function. + /// + /// + /// C++: + /// imgui.h:204 + ///
struct ImGuiPlatformImeData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct ImGuiPlatformImeData + { + /// + /// + /// A widget wants the IME to be visible. + /// + /// + /// C++: + /// imgui.h:4220 + ///
bool WantVisible + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + [FieldOffset(0)] + public Bool8 WantVisible; + + /// + /// + /// A widget wants text input, not necessarily IME to be visible. This is automatically set to the upcoming + /// value of io.WantTextInput. + /// + /// + /// C++: + /// imgui.h:4221 + ///
bool WantTextInput + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + [FieldOffset(1)] + public Bool8 WantTextInput; + + /// + /// + /// Position of input cursor (for IME). + /// + /// + /// C++: + /// imgui.h:4222 + ///
ImVec2 InputPos + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + [FieldOffset(4)] + public float2 InputPos; + + /// + /// + /// Line height (for IME). + /// + /// + /// C++: + /// imgui.h:4223 + ///
float InputLineHeight + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + [FieldOffset(12)] + public float InputLineHeight; + + /// + /// + /// ID of platform window/viewport. + /// + /// + /// C++: + /// imgui.h:4224 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + [FieldOffset(16)] + public ImGuiID ViewportId; + } + + /// + /// + /// Platform IME data for io.PlatformSetImeDataFn() function. + /// + /// + /// C++: + /// imgui.h:204 + ///
struct ImGuiPlatformImeData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiPlatformImeDataPtr(ImGuiPlatformImeData* ptr) : INullable + { + private ImGuiPlatformImeData* _ptr = ptr; + public ImGuiPlatformImeData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiPlatformImeDataPtr(ImGuiPlatformImeData* ptr) => new(ptr); + + public static implicit operator ImGuiPlatformImeData*(ImGuiPlatformImeDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// A widget wants the IME to be visible. + /// + /// + /// C++: + /// imgui.h:4220 + ///
bool WantVisible + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + public ref bool WantVisible => ref Unsafe.AsRef(&_ptr->WantVisible); + + /// + /// + /// A widget wants text input, not necessarily IME to be visible. This is automatically set to the upcoming + /// value of io.WantTextInput. + /// + /// + /// C++: + /// imgui.h:4221 + ///
bool WantTextInput + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + public ref bool WantTextInput => ref Unsafe.AsRef(&_ptr->WantTextInput); + + /// + /// + /// Position of input cursor (for IME). + /// + /// + /// C++: + /// imgui.h:4222 + ///
ImVec2 InputPos + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + public ref float2 InputPos => ref Unsafe.AsRef(&_ptr->InputPos); + + /// + /// + /// Line height (for IME). + /// + /// + /// C++: + /// imgui.h:4223 + ///
float InputLineHeight + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + public ref float InputLineHeight => ref Unsafe.AsRef(&_ptr->InputLineHeight); + + /// + /// + /// ID of platform window/viewport. + /// + /// + /// C++: + /// imgui.h:4224 + ///
ImGuiID ViewportId + ///
+ ///
+ /// + /// + /// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. + /// Handler is called during EndFrame(). + /// + /// + public ref ImGuiID ViewportId => ref Unsafe.AsRef(&_ptr->ViewportId); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiPlatformMonitor.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiPlatformMonitor.gen.cs new file mode 100644 index 0000000..2eb3678 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiPlatformMonitor.gen.cs @@ -0,0 +1,282 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning + /// popups and tooltips to avoid them straddling monitors + /// + /// + /// C++: + /// imgui.h:205 + ///
struct ImGuiPlatformMonitor + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct ImGuiPlatformMonitor + { + /// + /// + /// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right) + /// + /// + /// C++: + /// imgui.h:4210 + ///
ImVec2 MainPos + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + [FieldOffset(0)] + public float2 MainPos; + + /// + /// + /// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right) + /// + /// + /// C++: + /// imgui.h:4210 + ///
ImVec2 MainPos, MainSize + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + [FieldOffset(8)] + public float2 MainSize; + + /// + /// + /// Coordinates without task bars / side bars / menu bars. Used to avoid positioning popups/tooltips inside + /// this region. If you don't have this info, please copy the value for MainPos/MainSize. + /// + /// + /// C++: + /// imgui.h:4211 + ///
ImVec2 WorkPos + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + [FieldOffset(16)] + public float2 WorkPos; + + /// + /// + /// Coordinates without task bars / side bars / menu bars. Used to avoid positioning popups/tooltips inside + /// this region. If you don't have this info, please copy the value for MainPos/MainSize. + /// + /// + /// C++: + /// imgui.h:4211 + ///
ImVec2 WorkPos, WorkSize + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + [FieldOffset(24)] + public float2 WorkSize; + + /// + /// + /// 1.0f = 96 DPI + /// + /// + /// C++: + /// imgui.h:4212 + ///
float DpiScale + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + [FieldOffset(32)] + public float DpiScale; + + /// + /// + /// Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*) + /// + /// + /// C++: + /// imgui.h:4213 + ///
void* PlatformHandle + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + [FieldOffset(40)] + public nint PlatformHandle; + } + + /// + /// + /// Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning + /// popups and tooltips to avoid them straddling monitors + /// + /// + /// C++: + /// imgui.h:205 + ///
struct ImGuiPlatformMonitor + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* ptr) : INullable + { + private ImGuiPlatformMonitor* _ptr = ptr; + public ImGuiPlatformMonitor* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* ptr) => new(ptr); + + public static implicit operator ImGuiPlatformMonitor*(ImGuiPlatformMonitorPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right) + /// + /// + /// C++: + /// imgui.h:4210 + ///
ImVec2 MainPos + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + public ref float2 MainPos => ref Unsafe.AsRef(&_ptr->MainPos); + + /// + /// + /// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right) + /// + /// + /// C++: + /// imgui.h:4210 + ///
ImVec2 MainPos, MainSize + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + public ref float2 MainSize => ref Unsafe.AsRef(&_ptr->MainSize); + + /// + /// + /// Coordinates without task bars / side bars / menu bars. Used to avoid positioning popups/tooltips inside + /// this region. If you don't have this info, please copy the value for MainPos/MainSize. + /// + /// + /// C++: + /// imgui.h:4211 + ///
ImVec2 WorkPos + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + public ref float2 WorkPos => ref Unsafe.AsRef(&_ptr->WorkPos); + + /// + /// + /// Coordinates without task bars / side bars / menu bars. Used to avoid positioning popups/tooltips inside + /// this region. If you don't have this info, please copy the value for MainPos/MainSize. + /// + /// + /// C++: + /// imgui.h:4211 + ///
ImVec2 WorkPos, WorkSize + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + public ref float2 WorkSize => ref Unsafe.AsRef(&_ptr->WorkSize); + + /// + /// + /// 1.0f = 96 DPI + /// + /// + /// C++: + /// imgui.h:4212 + ///
float DpiScale + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + public ref float DpiScale => ref Unsafe.AsRef(&_ptr->DpiScale); + + /// + /// + /// Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*) + /// + /// + /// C++: + /// imgui.h:4213 + ///
void* PlatformHandle + ///
+ ///
+ /// + /// + /// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI. + /// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors. + /// + /// + public ref nint PlatformHandle => ref Unsafe.AsRef(&_ptr->PlatformHandle); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiSelectionBasicStorage.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiSelectionBasicStorage.gen.cs new file mode 100644 index 0000000..06f9c36 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiSelectionBasicStorage.gen.cs @@ -0,0 +1,271 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Optional helper to store multi-selection state + apply multi-selection requests. + /// + /// + /// C++: + /// imgui.h:206 + ///
struct ImGuiSelectionBasicStorage + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct ImGuiSelectionBasicStorage + { + /// + /// + /// // Number of selected items, maintained by this helper. + /// + /// + /// C++: + /// imgui.h:3165 + ///
int Size + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(0)] + public int Size; + + /// + /// + /// = false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional + /// sorts of selection. Could be improved) + /// + /// + /// C++: + /// imgui.h:3166 + ///
bool PreserveOrder + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(4)] + public Bool8 PreserveOrder; + + /// + /// + /// = NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items; + /// + /// + /// C++: + /// imgui.h:3167 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(8)] + public nint UserData; + + /// + /// + /// e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return + /// ((MyItems**)self->UserData)[idx]->ID; }; + /// + /// + /// C++: + /// imgui.h:3168 + ///
ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self, int idx) + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(16)] + public nint AdapterIndexToStorageId; + + /// + /// + /// [Internal] Increasing counter to store selection order + /// + /// + /// C++: + /// imgui.h:3169 + ///
int _SelectionOrder + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(24)] + public int _SelectionOrder; + + /// + /// + /// [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing + /// directly: iterate with GetNextSelectedItem(). + /// + /// + /// C++: + /// imgui.h:3170 + ///
ImGuiStorage _Storage + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(32)] + public ImGuiStorage _Storage; + } + + /// + /// + /// Optional helper to store multi-selection state + apply multi-selection requests. + /// + /// + /// C++: + /// imgui.h:206 + ///
struct ImGuiSelectionBasicStorage + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiSelectionBasicStoragePtr(ImGuiSelectionBasicStorage* ptr) : INullable + { + private ImGuiSelectionBasicStorage* _ptr = ptr; + public ImGuiSelectionBasicStorage* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiSelectionBasicStoragePtr(ImGuiSelectionBasicStorage* ptr) => new(ptr); + + public static implicit operator ImGuiSelectionBasicStorage*(ImGuiSelectionBasicStoragePtr wrapper) => + wrapper.Ptr; + + /// + /// + /// // Number of selected items, maintained by this helper. + /// + /// + /// C++: + /// imgui.h:3165 + ///
int Size + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref int Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// = false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional + /// sorts of selection. Could be improved) + /// + /// + /// C++: + /// imgui.h:3166 + ///
bool PreserveOrder + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref bool PreserveOrder => ref Unsafe.AsRef(&_ptr->PreserveOrder); + + /// + /// + /// = NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items; + /// + /// + /// C++: + /// imgui.h:3167 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + + /// + /// + /// e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return + /// ((MyItems**)self->UserData)[idx]->ID; }; + /// + /// + /// C++: + /// imgui.h:3168 + ///
ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self, int idx) + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref nint AdapterIndexToStorageId => ref Unsafe.AsRef(&_ptr->AdapterIndexToStorageId); + + /// + /// + /// [Internal] Increasing counter to store selection order + /// + /// + /// C++: + /// imgui.h:3169 + ///
int _SelectionOrder + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref int _SelectionOrder => ref Unsafe.AsRef(&_ptr->_SelectionOrder); + + /// + /// + /// [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing + /// directly: iterate with GetNextSelectedItem(). + /// + /// + /// C++: + /// imgui.h:3170 + ///
ImGuiStorage _Storage + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref ImGuiStorage _Storage => ref Unsafe.AsRef(&_ptr->_Storage); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiSelectionExternalStorage.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiSelectionExternalStorage.gen.cs new file mode 100644 index 0000000..2d3e847 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiSelectionExternalStorage.gen.cs @@ -0,0 +1,130 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Optional helper to apply multi-selection requests to existing randomly accessible storage. + /// + /// + /// C++: + /// imgui.h:207 + ///
struct ImGuiSelectionExternalStorage + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiSelectionExternalStorage + { + /// + /// + /// User data for use by adapter function // e.g. selection.UserData = + /// (void*)my_items; + /// + /// + /// C++: + /// imgui.h:3188 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(0)] + public nint UserData; + + /// + /// + /// e.g. AdapterSetItemSelected = [](ImGuiSelectionExternalStorage* self, int idx, bool selected) { + /// ((MyItems**)self->UserData)[idx]->Selected = selected; } + /// + /// + /// C++: + /// imgui.h:3189 + ///
void (*AdapterSetItemSelected)(ImGuiSelectionExternalStorage* self, int idx, bool selected) + ///
+ ///
+ /// + /// + /// Members + /// + /// + [FieldOffset(8)] + public nint AdapterSetItemSelected; + } + + /// + /// + /// Optional helper to apply multi-selection requests to existing randomly accessible storage. + /// + /// + /// C++: + /// imgui.h:207 + ///
struct ImGuiSelectionExternalStorage + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiSelectionExternalStoragePtr(ImGuiSelectionExternalStorage* ptr) : INullable + { + private ImGuiSelectionExternalStorage* _ptr = ptr; + public ImGuiSelectionExternalStorage* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiSelectionExternalStoragePtr(ImGuiSelectionExternalStorage* ptr) => + new(ptr); + + public static implicit operator ImGuiSelectionExternalStorage*(ImGuiSelectionExternalStoragePtr wrapper) => + wrapper.Ptr; + + /// + /// + /// User data for use by adapter function // e.g. selection.UserData = + /// (void*)my_items; + /// + /// + /// C++: + /// imgui.h:3188 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + + /// + /// + /// e.g. AdapterSetItemSelected = [](ImGuiSelectionExternalStorage* self, int idx, bool selected) { + /// ((MyItems**)self->UserData)[idx]->Selected = selected; } + /// + /// + /// C++: + /// imgui.h:3189 + ///
void (*AdapterSetItemSelected)(ImGuiSelectionExternalStorage* self, int idx, bool selected) + ///
+ ///
+ /// + /// + /// Members + /// + /// + public ref nint AdapterSetItemSelected => ref Unsafe.AsRef(&_ptr->AdapterSetItemSelected); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiSelectionRequest.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiSelectionRequest.gen.cs new file mode 100644 index 0000000..5473974 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiSelectionRequest.gen.cs @@ -0,0 +1,239 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// A selection request (stored in ImGuiMultiSelectIO) + /// + /// + /// C++: + /// imgui.h:208 + ///
struct ImGuiSelectionRequest + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct ImGuiSelectionRequest + { + /// + /// + /// ms:w, app:r / ms:w, app:r // Request type. You'll most often receive 1 Clear + 1 SetRange with a + /// single-item range. + /// + /// + /// C++: + /// imgui.h:3139 + ///
ImGuiSelectionRequestType Type + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + [FieldOffset(0)] + public ImGuiSelectionRequestType Type; + + /// + /// + /// ms:w, app:r / ms:w, app:r // Parameter for SetAll/SetRange requests (true = select, false = + /// unselect) + /// + /// + /// C++: + /// imgui.h:3140 + ///
bool Selected + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + [FieldOffset(4)] + public Bool8 Selected; + + /// + /// + /// / ms:w app:r // Parameter for SetRange request: +1 when RangeFirstItem comes before RangeLastItem, + /// -1 otherwise. Useful if you want to preserve selection order on a backward Shift+Click. + /// + /// + /// C++: + /// imgui.h:3141 + ///
ImS8 RangeDirection + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + [FieldOffset(5)] + public sbyte RangeDirection; + + /// + /// + /// / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift + /// selecting from top to bottom). + /// + /// + /// C++: + /// imgui.h:3142 + ///
ImGuiSelectionUserData RangeFirstItem + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + [FieldOffset(8)] + public ulong RangeFirstItem; + + /// + /// + /// / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift + /// selecting from bottom to top). Inclusive! + /// + /// + /// C++: + /// imgui.h:3143 + ///
ImGuiSelectionUserData RangeLastItem + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + [FieldOffset(16)] + public ulong RangeLastItem; + } + + /// + /// + /// A selection request (stored in ImGuiMultiSelectIO) + /// + /// + /// C++: + /// imgui.h:208 + ///
struct ImGuiSelectionRequest + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiSelectionRequestPtr(ImGuiSelectionRequest* ptr) : INullable + { + private ImGuiSelectionRequest* _ptr = ptr; + public ImGuiSelectionRequest* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiSelectionRequestPtr(ImGuiSelectionRequest* ptr) => new(ptr); + + public static implicit operator ImGuiSelectionRequest*(ImGuiSelectionRequestPtr wrapper) => wrapper.Ptr; + + /// + /// + /// ms:w, app:r / ms:w, app:r // Request type. You'll most often receive 1 Clear + 1 SetRange with a + /// single-item range. + /// + /// + /// C++: + /// imgui.h:3139 + ///
ImGuiSelectionRequestType Type + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + public ref ImGuiSelectionRequestType Type => ref Unsafe.AsRef(&_ptr->Type); + + /// + /// + /// ms:w, app:r / ms:w, app:r // Parameter for SetAll/SetRange requests (true = select, false = + /// unselect) + /// + /// + /// C++: + /// imgui.h:3140 + ///
bool Selected + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + public ref bool Selected => ref Unsafe.AsRef(&_ptr->Selected); + + /// + /// + /// / ms:w app:r // Parameter for SetRange request: +1 when RangeFirstItem comes before RangeLastItem, + /// -1 otherwise. Useful if you want to preserve selection order on a backward Shift+Click. + /// + /// + /// C++: + /// imgui.h:3141 + ///
ImS8 RangeDirection + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + public ref sbyte RangeDirection => ref Unsafe.AsRef(&_ptr->RangeDirection); + + /// + /// + /// / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift + /// selecting from top to bottom). + /// + /// + /// C++: + /// imgui.h:3142 + ///
ImGuiSelectionUserData RangeFirstItem + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + public ref ulong RangeFirstItem => ref Unsafe.AsRef(&_ptr->RangeFirstItem); + + /// + /// + /// / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift + /// selecting from bottom to top). Inclusive! + /// + /// + /// C++: + /// imgui.h:3143 + ///
ImGuiSelectionUserData RangeLastItem + ///
+ ///
+ /// + /// + /// Selection request item + /// + /// + public ref ulong RangeLastItem => ref Unsafe.AsRef(&_ptr->RangeLastItem); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiSizeCallbackData.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiSizeCallbackData.gen.cs new file mode 100644 index 0000000..5ec132a --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiSizeCallbackData.gen.cs @@ -0,0 +1,204 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Callback data when using SetNextWindowSizeConstraints() (rare/advanced use) + /// + /// + /// C++: + /// imgui.h:209 + ///
struct ImGuiSizeCallbackData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImGuiSizeCallbackData + { + /// + /// + /// Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in + /// here (need reinterpret_cast<>). + /// + /// + /// C++: + /// imgui.h:2737 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + [FieldOffset(0)] + public nint UserData; + + /// + /// + /// Read-only. Window position, for reference. + /// + /// + /// C++: + /// imgui.h:2738 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + [FieldOffset(8)] + public float2 Pos; + + /// + /// + /// Read-only. Current window size. + /// + /// + /// C++: + /// imgui.h:2739 + ///
ImVec2 CurrentSize + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + [FieldOffset(16)] + public float2 CurrentSize; + + /// + /// + /// Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. + /// + /// + /// C++: + /// imgui.h:2740 + ///
ImVec2 DesiredSize + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + [FieldOffset(24)] + public float2 DesiredSize; + } + + /// + /// + /// Callback data when using SetNextWindowSizeConstraints() (rare/advanced use) + /// + /// + /// C++: + /// imgui.h:209 + ///
struct ImGuiSizeCallbackData + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiSizeCallbackDataPtr(ImGuiSizeCallbackData* ptr) : INullable + { + private ImGuiSizeCallbackData* _ptr = ptr; + public ImGuiSizeCallbackData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiSizeCallbackDataPtr(ImGuiSizeCallbackData* ptr) => new(ptr); + + public static implicit operator ImGuiSizeCallbackData*(ImGuiSizeCallbackDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in + /// here (need reinterpret_cast<>). + /// + /// + /// C++: + /// imgui.h:2737 + ///
void* UserData + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData); + + /// + /// + /// Read-only. Window position, for reference. + /// + /// + /// C++: + /// imgui.h:2738 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + public ref float2 Pos => ref Unsafe.AsRef(&_ptr->Pos); + + /// + /// + /// Read-only. Current window size. + /// + /// + /// C++: + /// imgui.h:2739 + ///
ImVec2 CurrentSize + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + public ref float2 CurrentSize => ref Unsafe.AsRef(&_ptr->CurrentSize); + + /// + /// + /// Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. + /// + /// + /// C++: + /// imgui.h:2740 + ///
ImVec2 DesiredSize + ///
+ ///
+ /// + /// + /// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). + /// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. + /// + /// + public ref float2 DesiredSize => ref Unsafe.AsRef(&_ptr->DesiredSize); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiStorage.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiStorage.gen.cs new file mode 100644 index 0000000..f13a409 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiStorage.gen.cs @@ -0,0 +1,83 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper for key->value storage (container sorted by key) + /// + /// + /// C++: + /// imgui.h:210 + ///
struct ImGuiStorage + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiStorage + { + /// + /// + /// C++: + /// imgui.h:2877 + ///
ImVector<ImGuiStoragePair> Data + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(0)] + public ImVector Data; + } + + /// + /// + /// Helper for key->value storage (container sorted by key) + /// + /// + /// C++: + /// imgui.h:210 + ///
struct ImGuiStorage + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiStoragePtr(ImGuiStorage* ptr) : INullable + { + private ImGuiStorage* _ptr = ptr; + public ImGuiStorage* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiStoragePtr(ImGuiStorage* ptr) => new(ptr); + + public static implicit operator ImGuiStorage*(ImGuiStoragePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:2877 + ///
ImVector<ImGuiStoragePair> Data + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref ImVector Data => ref Unsafe.AsRef>(&_ptr->Data); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiStoragePair.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiStoragePair.gen.cs new file mode 100644 index 0000000..92a6531 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiStoragePair.gen.cs @@ -0,0 +1,170 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper for key->value storage (pair) + /// + /// + /// C++: + /// imgui.h:211 + ///
struct ImGuiStoragePair + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiStoragePair + { + /// + /// + /// C++: + /// imgui.h:2859 + ///
ImGuiID key + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + [FieldOffset(0)] + public ImGuiID key; + + /// + /// + /// C++: + /// imgui.h:2860 + ///
int val_i + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + [FieldOffset(8)] + public int val_i; + + /// + /// + /// C++: + /// imgui.h:2860 + ///
float val_f + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + [FieldOffset(8)] + public float val_f; + + /// + /// + /// C++: + /// imgui.h:2860 + ///
void* val_p + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + [FieldOffset(8)] + public nint val_p; + } + + /// + /// + /// Helper for key->value storage (pair) + /// + /// + /// C++: + /// imgui.h:211 + ///
struct ImGuiStoragePair + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiStoragePairPtr(ImGuiStoragePair* ptr) : INullable + { + private ImGuiStoragePair* _ptr = ptr; + public ImGuiStoragePair* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiStoragePairPtr(ImGuiStoragePair* ptr) => new(ptr); + + public static implicit operator ImGuiStoragePair*(ImGuiStoragePairPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:2859 + ///
ImGuiID key + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + public ref ImGuiID key => ref Unsafe.AsRef(&_ptr->key); + + /// + /// + /// C++: + /// imgui.h:2860 + ///
int val_i + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + public ref int val_i => ref Unsafe.AsRef(&_ptr->val_i); + + /// + /// + /// C++: + /// imgui.h:2860 + ///
float val_f + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + public ref float val_f => ref Unsafe.AsRef(&_ptr->val_f); + + /// + /// + /// C++: + /// imgui.h:2860 + ///
void* val_p + ///
+ ///
+ /// + /// + /// [Internal] Key+Value for ImGuiStorage + /// + /// + public ref nint val_p => ref Unsafe.AsRef(&_ptr->val_p); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiStyle.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiStyle.gen.cs new file mode 100644 index 0000000..5cb6d31 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiStyle.gen.cs @@ -0,0 +1,1905 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Runtime data for styling/colors + /// + /// + /// C++: + /// imgui.h:212 + ///
struct ImGuiStyle + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 1276)] + public partial struct ImGuiStyle + { + /// + /// + /// Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify. + /// Use ImGui::GetFontSize() to obtain scaled value. + /// + /// + /// C++: + /// imgui.h:2330 + ///
float FontSizeBase + ///
+ ///
+ /// + /// + /// Font scaling + /// - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors) + /// + /// + [FieldOffset(0)] + public float FontSizeBase; + + /// + /// + /// Main global scale factor. May be set by application once, or exposed to end-user. + /// + /// + /// C++: + /// imgui.h:2331 + ///
float FontScaleMain + ///
+ ///
+ /// + /// + /// Font scaling + /// - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors) + /// + /// + [FieldOffset(4)] + public float FontScaleMain; + + /// + /// + /// Additional global scale factor from viewport/monitor contents scale. When io.ConfigDpiScaleFonts is + /// enabled, this is automatically overwritten when changing monitor DPI. + /// + /// + /// C++: + /// imgui.h:2332 + ///
float FontScaleDpi + ///
+ ///
+ /// + /// + /// Font scaling + /// - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors) + /// + /// + [FieldOffset(8)] + public float FontScaleDpi; + + /// + /// + /// Global alpha applies to everything in Dear ImGui. + /// + /// + /// C++: + /// imgui.h:2334 + ///
float Alpha + ///
+ ///
+ [FieldOffset(12)] + public float Alpha; + + /// + /// + /// Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha. + /// + /// + /// C++: + /// imgui.h:2335 + ///
float DisabledAlpha + ///
+ ///
+ [FieldOffset(16)] + public float DisabledAlpha; + + /// + /// + /// Padding within a window. + /// + /// + /// C++: + /// imgui.h:2336 + ///
ImVec2 WindowPadding + ///
+ ///
+ [FieldOffset(20)] + public float2 WindowPadding; + + /// + /// + /// Radius of window corners rounding. Set to 0.0f to have rectangular windows. Large values tend to lead to + /// variety of artifacts and are not recommended. + /// + /// + /// C++: + /// imgui.h:2337 + ///
float WindowRounding + ///
+ ///
+ [FieldOffset(28)] + public float WindowRounding; + + /// + /// + /// Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and + /// more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2338 + ///
float WindowBorderSize + ///
+ ///
+ [FieldOffset(32)] + public float WindowBorderSize; + + /// + /// + /// Hit-testing extent outside/inside resizing border. Also extend determination of hovered window. + /// Generally meaningfully larger than WindowBorderSize to make it easy to reach borders. + /// + /// + /// C++: + /// imgui.h:2339 + ///
float WindowBorderHoverPadding + ///
+ ///
+ [FieldOffset(36)] + public float WindowBorderHoverPadding; + + /// + /// + /// Minimum window size. This is a global setting. If you want to constrain individual windows, use + /// SetNextWindowSizeConstraints(). + /// + /// + /// C++: + /// imgui.h:2340 + ///
ImVec2 WindowMinSize + ///
+ ///
+ [FieldOffset(40)] + public float2 WindowMinSize; + + /// + /// + /// Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered. + /// + /// + /// C++: + /// imgui.h:2341 + ///
ImVec2 WindowTitleAlign + ///
+ ///
+ [FieldOffset(48)] + public float2 WindowTitleAlign; + + /// + /// + /// Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left. + /// + /// + /// C++: + /// imgui.h:2342 + ///
ImGuiDir WindowMenuButtonPosition + ///
+ ///
+ [FieldOffset(56)] + public ImGuiDir WindowMenuButtonPosition; + + /// + /// + /// Radius of child window corners rounding. Set to 0.0f to have rectangular windows. + /// + /// + /// C++: + /// imgui.h:2343 + ///
float ChildRounding + ///
+ ///
+ [FieldOffset(60)] + public float ChildRounding; + + /// + /// + /// Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well + /// tested and more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2344 + ///
float ChildBorderSize + ///
+ ///
+ [FieldOffset(64)] + public float ChildBorderSize; + + /// + /// + /// Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding) + /// + /// + /// C++: + /// imgui.h:2345 + ///
float PopupRounding + ///
+ ///
+ [FieldOffset(68)] + public float PopupRounding; + + /// + /// + /// Thickness of border around popup/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not + /// well tested and more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2346 + ///
float PopupBorderSize + ///
+ ///
+ [FieldOffset(72)] + public float PopupBorderSize; + + /// + /// + /// Padding within a framed rectangle (used by most widgets). + /// + /// + /// C++: + /// imgui.h:2347 + ///
ImVec2 FramePadding + ///
+ ///
+ [FieldOffset(76)] + public float2 FramePadding; + + /// + /// + /// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). + /// + /// + /// C++: + /// imgui.h:2348 + ///
float FrameRounding + ///
+ ///
+ [FieldOffset(84)] + public float FrameRounding; + + /// + /// + /// Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and + /// more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2349 + ///
float FrameBorderSize + ///
+ ///
+ [FieldOffset(88)] + public float FrameBorderSize; + + /// + /// + /// Horizontal and vertical spacing between widgets/lines. + /// + /// + /// C++: + /// imgui.h:2350 + ///
ImVec2 ItemSpacing + ///
+ ///
+ [FieldOffset(92)] + public float2 ItemSpacing; + + /// + /// + /// Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its + /// label). + /// + /// + /// C++: + /// imgui.h:2351 + ///
ImVec2 ItemInnerSpacing + ///
+ ///
+ [FieldOffset(100)] + public float2 ItemInnerSpacing; + + /// + /// + /// Padding within a table cell. Cellpadding.x is locked for entire table. CellPadding.y may be altered + /// between different rows. + /// + /// + /// C++: + /// imgui.h:2352 + ///
ImVec2 CellPadding + ///
+ ///
+ [FieldOffset(108)] + public float2 CellPadding; + + /// + /// + /// Expand reactive bounding box for touch-based system where touch position is not accurate enough. + /// Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So + /// don't grow this too much! + /// + /// + /// C++: + /// imgui.h:2353 + ///
ImVec2 TouchExtraPadding + ///
+ ///
+ [FieldOffset(116)] + public float2 TouchExtraPadding; + + /// + /// + /// Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2). + /// + /// + /// C++: + /// imgui.h:2354 + ///
float IndentSpacing + ///
+ ///
+ [FieldOffset(124)] + public float IndentSpacing; + + /// + /// + /// Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1). + /// + /// + /// C++: + /// imgui.h:2355 + ///
float ColumnsMinSpacing + ///
+ ///
+ [FieldOffset(128)] + public float ColumnsMinSpacing; + + /// + /// + /// Width of the vertical scrollbar, Height of the horizontal scrollbar. + /// + /// + /// C++: + /// imgui.h:2356 + ///
float ScrollbarSize + ///
+ ///
+ [FieldOffset(132)] + public float ScrollbarSize; + + /// + /// + /// Radius of grab corners for scrollbar. + /// + /// + /// C++: + /// imgui.h:2357 + ///
float ScrollbarRounding + ///
+ ///
+ [FieldOffset(136)] + public float ScrollbarRounding; + + /// + /// + /// Minimum width/height of a grab box for slider/scrollbar. + /// + /// + /// C++: + /// imgui.h:2358 + ///
float GrabMinSize + ///
+ ///
+ [FieldOffset(140)] + public float GrabMinSize; + + /// + /// + /// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. + /// + /// + /// C++: + /// imgui.h:2359 + ///
float GrabRounding + ///
+ ///
+ [FieldOffset(144)] + public float GrabRounding; + + /// + /// + /// The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero. + /// + /// + /// C++: + /// imgui.h:2360 + ///
float LogSliderDeadzone + ///
+ ///
+ [FieldOffset(148)] + public float LogSliderDeadzone; + + /// + /// + /// Thickness of border around Image() calls. + /// + /// + /// C++: + /// imgui.h:2361 + ///
float ImageBorderSize + ///
+ ///
+ [FieldOffset(152)] + public float ImageBorderSize; + + /// + /// + /// Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs. + /// + /// + /// C++: + /// imgui.h:2362 + ///
float TabRounding + ///
+ ///
+ [FieldOffset(156)] + public float TabRounding; + + /// + /// + /// Thickness of border around tabs. + /// + /// + /// C++: + /// imgui.h:2363 + ///
float TabBorderSize + ///
+ ///
+ [FieldOffset(160)] + public float TabBorderSize; + + /// + /// + /// Minimum tab width, to make tabs larger than their contents. TabBar buttons are not affected. + /// + /// + /// C++: + /// imgui.h:2364 + ///
float TabMinWidthBase + ///
+ ///
+ [FieldOffset(164)] + public float TabMinWidthBase; + + /// + /// + /// Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy. + /// + /// + /// C++: + /// imgui.h:2365 + ///
float TabMinWidthShrink + ///
+ ///
+ [FieldOffset(168)] + public float TabMinWidthShrink; + + /// + /// + /// -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. + /// + /// + /// C++: + /// imgui.h:2366 + ///
float TabCloseButtonMinWidthSelected + ///
+ ///
+ [FieldOffset(172)] + public float TabCloseButtonMinWidthSelected; + + /// + /// + /// -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. + /// FLT_MAX: never show close button when unselected. + /// + /// + /// C++: + /// imgui.h:2367 + ///
float TabCloseButtonMinWidthUnselected + ///
+ ///
+ [FieldOffset(176)] + public float TabCloseButtonMinWidthUnselected; + + /// + /// + /// Thickness of tab-bar separator, which takes on the tab active color to denote focus. + /// + /// + /// C++: + /// imgui.h:2368 + ///
float TabBarBorderSize + ///
+ ///
+ [FieldOffset(180)] + public float TabBarBorderSize; + + /// + /// + /// Thickness of tab-bar overline, which highlights the selected tab-bar. + /// + /// + /// C++: + /// imgui.h:2369 + ///
float TabBarOverlineSize + ///
+ ///
+ [FieldOffset(184)] + public float TabBarOverlineSize; + + /// + /// + /// Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees). + /// + /// + /// C++: + /// imgui.h:2370 + ///
float TableAngledHeadersAngle + ///
+ ///
+ [FieldOffset(188)] + public float TableAngledHeadersAngle; + + /// + /// + /// Alignment of angled headers within the cell + /// + /// + /// C++: + /// imgui.h:2371 + ///
ImVec2 TableAngledHeadersTextAlign + ///
+ ///
+ [FieldOffset(192)] + public float2 TableAngledHeadersTextAlign; + + /// + /// + /// Default way to draw lines connecting TreeNode hierarchy. ImGuiTreeNodeFlags_DrawLinesNone or + /// ImGuiTreeNodeFlags_DrawLinesFull or ImGuiTreeNodeFlags_DrawLinesToNodes. + /// + /// + /// C++: + /// imgui.h:2372 + ///
ImGuiTreeNodeFlags TreeLinesFlags + ///
+ ///
+ [FieldOffset(200)] + public ImGuiTreeNodeFlags TreeLinesFlags; + + /// + /// + /// Thickness of outlines when using ImGuiTreeNodeFlags_DrawLines. + /// + /// + /// C++: + /// imgui.h:2373 + ///
float TreeLinesSize + ///
+ ///
+ [FieldOffset(204)] + public float TreeLinesSize; + + /// + /// + /// Radius of lines connecting child nodes to the vertical line. + /// + /// + /// C++: + /// imgui.h:2374 + ///
float TreeLinesRounding + ///
+ ///
+ [FieldOffset(208)] + public float TreeLinesRounding; + + /// + /// + /// Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right. + /// + /// + /// C++: + /// imgui.h:2375 + ///
ImGuiDir ColorButtonPosition + ///
+ ///
+ [FieldOffset(212)] + public ImGuiDir ColorButtonPosition; + + /// + /// + /// Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered). + /// + /// + /// C++: + /// imgui.h:2376 + ///
ImVec2 ButtonTextAlign + ///
+ ///
+ [FieldOffset(216)] + public float2 ButtonTextAlign; + + /// + /// + /// Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to + /// keep this left-aligned if you want to lay multiple items on a same line. + /// + /// + /// C++: + /// imgui.h:2377 + ///
ImVec2 SelectableTextAlign + ///
+ ///
+ [FieldOffset(224)] + public float2 SelectableTextAlign; + + /// + /// + /// Thickness of border in SeparatorText() + /// + /// + /// C++: + /// imgui.h:2378 + ///
float SeparatorTextBorderSize + ///
+ ///
+ [FieldOffset(232)] + public float SeparatorTextBorderSize; + + /// + /// + /// Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center). + /// + /// + /// C++: + /// imgui.h:2379 + ///
ImVec2 SeparatorTextAlign + ///
+ ///
+ [FieldOffset(236)] + public float2 SeparatorTextAlign; + + /// + /// + /// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small + /// values. .y is recommended to be == FramePadding.y. + /// + /// + /// C++: + /// imgui.h:2380 + ///
ImVec2 SeparatorTextPadding + ///
+ ///
+ [FieldOffset(244)] + public float2 SeparatorTextPadding; + + /// + /// + /// Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen. + /// + /// + /// C++: + /// imgui.h:2381 + ///
ImVec2 DisplayWindowPadding + ///
+ ///
+ [FieldOffset(252)] + public float2 DisplayWindowPadding; + + /// + /// + /// Apply to every windows, menus, popups, tooltips: amount where we avoid displaying contents. Adjust if + /// you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured). + /// + /// + /// C++: + /// imgui.h:2382 + ///
ImVec2 DisplaySafeAreaPadding + ///
+ ///
+ [FieldOffset(260)] + public float2 DisplaySafeAreaPadding; + + /// + /// + /// Thickness of resizing border between docked windows + /// + /// + /// C++: + /// imgui.h:2383 + ///
float DockingSeparatorSize + ///
+ ///
+ [FieldOffset(268)] + public float DockingSeparatorSize; + + /// + /// + /// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI + /// scaling over this scale. May be removed later. + /// + /// + /// C++: + /// imgui.h:2384 + ///
float MouseCursorScale + ///
+ ///
+ [FieldOffset(272)] + public float MouseCursorScale; + + /// + /// + /// Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning + /// of the frame (copied to ImDrawList). + /// + /// + /// C++: + /// imgui.h:2385 + ///
bool AntiAliasedLines + ///
+ ///
+ [FieldOffset(276)] + public Bool8 AntiAliasedLines; + + /// + /// + /// Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear + /// filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList). + /// + /// + /// C++: + /// imgui.h:2386 + ///
bool AntiAliasedLinesUseTex + ///
+ ///
+ [FieldOffset(277)] + public Bool8 AntiAliasedLinesUseTex; + + /// + /// + /// Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are + /// really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList). + /// + /// + /// C++: + /// imgui.h:2387 + ///
bool AntiAliasedFill + ///
+ ///
+ [FieldOffset(278)] + public Bool8 AntiAliasedFill; + + /// + /// + /// Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease + /// for highly tessellated curves (higher quality, more polygons), increase to reduce quality. + /// + /// + /// C++: + /// imgui.h:2388 + ///
float CurveTessellationTol + ///
+ ///
+ [FieldOffset(280)] + public float CurveTessellationTol; + + /// + /// + /// Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner + /// rectangles with no explicit segment count specified. Decrease for higher quality but more geometry. + /// + /// + /// C++: + /// imgui.h:2389 + ///
float CircleTessellationMaxError + ///
+ ///
+ [FieldOffset(284)] + public float CircleTessellationMaxError; + + /// + /// + /// C++: + /// imgui.h:2392 + ///
ImVec4 Colors[ImGuiCol_COUNT] + ///
+ ///
+ /// + /// + /// Colors + /// + /// + [FieldOffset(288)] + public float4_60 Colors; + + /// + /// + /// Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary. + /// + /// + /// C++: + /// imgui.h:2396 + ///
float HoverStationaryDelay + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + [FieldOffset(1248)] + public float HoverStationaryDelay; + + /// + /// + /// Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay. + /// + /// + /// C++: + /// imgui.h:2397 + ///
float HoverDelayShort + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + [FieldOffset(1252)] + public float HoverDelayShort; + + /// + /// + /// Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). " + /// + /// + /// C++: + /// imgui.h:2398 + ///
float HoverDelayNormal + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + [FieldOffset(1256)] + public float HoverDelayNormal; + + /// + /// + /// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or + /// BeginItemTooltip()/SetItemTooltip() while using mouse. + /// + /// + /// C++: + /// imgui.h:2399 + ///
ImGuiHoveredFlags HoverFlagsForTooltipMouse + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + [FieldOffset(1260)] + public ImGuiHoveredFlags HoverFlagsForTooltipMouse; + + /// + /// + /// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or + /// BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad. + /// + /// + /// C++: + /// imgui.h:2400 + ///
ImGuiHoveredFlags HoverFlagsForTooltipNav + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + [FieldOffset(1264)] + public ImGuiHoveredFlags HoverFlagsForTooltipNav; + + /// + /// + /// FIXME-WIP: Reference scale, as applied by ScaleAllSizes(). + /// + /// + /// C++: + /// imgui.h:2403 + ///
float _MainScale + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(1268)] + public float _MainScale; + + /// + /// + /// FIXME: Temporary hack until we finish remaining work. + /// + /// + /// C++: + /// imgui.h:2404 + ///
float _NextFrameFontSizeBase + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + [FieldOffset(1272)] + public float _NextFrameFontSizeBase; + } + + /// + /// + /// Runtime data for styling/colors + /// + /// + /// C++: + /// imgui.h:212 + ///
struct ImGuiStyle + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiStylePtr(ImGuiStyle* ptr) : INullable + { + private ImGuiStyle* _ptr = ptr; + public ImGuiStyle* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiStylePtr(ImGuiStyle* ptr) => new(ptr); + + public static implicit operator ImGuiStyle*(ImGuiStylePtr wrapper) => wrapper.Ptr; + + /// + /// + /// Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify. + /// Use ImGui::GetFontSize() to obtain scaled value. + /// + /// + /// C++: + /// imgui.h:2330 + ///
float FontSizeBase + ///
+ ///
+ /// + /// + /// Font scaling + /// - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors) + /// + /// + public ref float FontSizeBase => ref Unsafe.AsRef(&_ptr->FontSizeBase); + + /// + /// + /// Main global scale factor. May be set by application once, or exposed to end-user. + /// + /// + /// C++: + /// imgui.h:2331 + ///
float FontScaleMain + ///
+ ///
+ /// + /// + /// Font scaling + /// - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors) + /// + /// + public ref float FontScaleMain => ref Unsafe.AsRef(&_ptr->FontScaleMain); + + /// + /// + /// Additional global scale factor from viewport/monitor contents scale. When io.ConfigDpiScaleFonts is + /// enabled, this is automatically overwritten when changing monitor DPI. + /// + /// + /// C++: + /// imgui.h:2332 + ///
float FontScaleDpi + ///
+ ///
+ /// + /// + /// Font scaling + /// - recap: ImGui::GetFontSize() == FontSizeBase * (FontScaleMain * FontScaleDpi * other_scaling_factors) + /// + /// + public ref float FontScaleDpi => ref Unsafe.AsRef(&_ptr->FontScaleDpi); + + /// + /// + /// Global alpha applies to everything in Dear ImGui. + /// + /// + /// C++: + /// imgui.h:2334 + ///
float Alpha + ///
+ ///
+ public ref float Alpha => ref Unsafe.AsRef(&_ptr->Alpha); + + /// + /// + /// Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha. + /// + /// + /// C++: + /// imgui.h:2335 + ///
float DisabledAlpha + ///
+ ///
+ public ref float DisabledAlpha => ref Unsafe.AsRef(&_ptr->DisabledAlpha); + + /// + /// + /// Padding within a window. + /// + /// + /// C++: + /// imgui.h:2336 + ///
ImVec2 WindowPadding + ///
+ ///
+ public ref float2 WindowPadding => ref Unsafe.AsRef(&_ptr->WindowPadding); + + /// + /// + /// Radius of window corners rounding. Set to 0.0f to have rectangular windows. Large values tend to lead to + /// variety of artifacts and are not recommended. + /// + /// + /// C++: + /// imgui.h:2337 + ///
float WindowRounding + ///
+ ///
+ public ref float WindowRounding => ref Unsafe.AsRef(&_ptr->WindowRounding); + + /// + /// + /// Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and + /// more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2338 + ///
float WindowBorderSize + ///
+ ///
+ public ref float WindowBorderSize => ref Unsafe.AsRef(&_ptr->WindowBorderSize); + + /// + /// + /// Hit-testing extent outside/inside resizing border. Also extend determination of hovered window. + /// Generally meaningfully larger than WindowBorderSize to make it easy to reach borders. + /// + /// + /// C++: + /// imgui.h:2339 + ///
float WindowBorderHoverPadding + ///
+ ///
+ public ref float WindowBorderHoverPadding => ref Unsafe.AsRef(&_ptr->WindowBorderHoverPadding); + + /// + /// + /// Minimum window size. This is a global setting. If you want to constrain individual windows, use + /// SetNextWindowSizeConstraints(). + /// + /// + /// C++: + /// imgui.h:2340 + ///
ImVec2 WindowMinSize + ///
+ ///
+ public ref float2 WindowMinSize => ref Unsafe.AsRef(&_ptr->WindowMinSize); + + /// + /// + /// Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered. + /// + /// + /// C++: + /// imgui.h:2341 + ///
ImVec2 WindowTitleAlign + ///
+ ///
+ public ref float2 WindowTitleAlign => ref Unsafe.AsRef(&_ptr->WindowTitleAlign); + + /// + /// + /// Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left. + /// + /// + /// C++: + /// imgui.h:2342 + ///
ImGuiDir WindowMenuButtonPosition + ///
+ ///
+ public ref ImGuiDir WindowMenuButtonPosition => ref Unsafe.AsRef(&_ptr->WindowMenuButtonPosition); + + /// + /// + /// Radius of child window corners rounding. Set to 0.0f to have rectangular windows. + /// + /// + /// C++: + /// imgui.h:2343 + ///
float ChildRounding + ///
+ ///
+ public ref float ChildRounding => ref Unsafe.AsRef(&_ptr->ChildRounding); + + /// + /// + /// Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well + /// tested and more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2344 + ///
float ChildBorderSize + ///
+ ///
+ public ref float ChildBorderSize => ref Unsafe.AsRef(&_ptr->ChildBorderSize); + + /// + /// + /// Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding) + /// + /// + /// C++: + /// imgui.h:2345 + ///
float PopupRounding + ///
+ ///
+ public ref float PopupRounding => ref Unsafe.AsRef(&_ptr->PopupRounding); + + /// + /// + /// Thickness of border around popup/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not + /// well tested and more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2346 + ///
float PopupBorderSize + ///
+ ///
+ public ref float PopupBorderSize => ref Unsafe.AsRef(&_ptr->PopupBorderSize); + + /// + /// + /// Padding within a framed rectangle (used by most widgets). + /// + /// + /// C++: + /// imgui.h:2347 + ///
ImVec2 FramePadding + ///
+ ///
+ public ref float2 FramePadding => ref Unsafe.AsRef(&_ptr->FramePadding); + + /// + /// + /// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). + /// + /// + /// C++: + /// imgui.h:2348 + ///
float FrameRounding + ///
+ ///
+ public ref float FrameRounding => ref Unsafe.AsRef(&_ptr->FrameRounding); + + /// + /// + /// Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and + /// more CPU/GPU costly). + /// + /// + /// C++: + /// imgui.h:2349 + ///
float FrameBorderSize + ///
+ ///
+ public ref float FrameBorderSize => ref Unsafe.AsRef(&_ptr->FrameBorderSize); + + /// + /// + /// Horizontal and vertical spacing between widgets/lines. + /// + /// + /// C++: + /// imgui.h:2350 + ///
ImVec2 ItemSpacing + ///
+ ///
+ public ref float2 ItemSpacing => ref Unsafe.AsRef(&_ptr->ItemSpacing); + + /// + /// + /// Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its + /// label). + /// + /// + /// C++: + /// imgui.h:2351 + ///
ImVec2 ItemInnerSpacing + ///
+ ///
+ public ref float2 ItemInnerSpacing => ref Unsafe.AsRef(&_ptr->ItemInnerSpacing); + + /// + /// + /// Padding within a table cell. Cellpadding.x is locked for entire table. CellPadding.y may be altered + /// between different rows. + /// + /// + /// C++: + /// imgui.h:2352 + ///
ImVec2 CellPadding + ///
+ ///
+ public ref float2 CellPadding => ref Unsafe.AsRef(&_ptr->CellPadding); + + /// + /// + /// Expand reactive bounding box for touch-based system where touch position is not accurate enough. + /// Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So + /// don't grow this too much! + /// + /// + /// C++: + /// imgui.h:2353 + ///
ImVec2 TouchExtraPadding + ///
+ ///
+ public ref float2 TouchExtraPadding => ref Unsafe.AsRef(&_ptr->TouchExtraPadding); + + /// + /// + /// Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2). + /// + /// + /// C++: + /// imgui.h:2354 + ///
float IndentSpacing + ///
+ ///
+ public ref float IndentSpacing => ref Unsafe.AsRef(&_ptr->IndentSpacing); + + /// + /// + /// Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1). + /// + /// + /// C++: + /// imgui.h:2355 + ///
float ColumnsMinSpacing + ///
+ ///
+ public ref float ColumnsMinSpacing => ref Unsafe.AsRef(&_ptr->ColumnsMinSpacing); + + /// + /// + /// Width of the vertical scrollbar, Height of the horizontal scrollbar. + /// + /// + /// C++: + /// imgui.h:2356 + ///
float ScrollbarSize + ///
+ ///
+ public ref float ScrollbarSize => ref Unsafe.AsRef(&_ptr->ScrollbarSize); + + /// + /// + /// Radius of grab corners for scrollbar. + /// + /// + /// C++: + /// imgui.h:2357 + ///
float ScrollbarRounding + ///
+ ///
+ public ref float ScrollbarRounding => ref Unsafe.AsRef(&_ptr->ScrollbarRounding); + + /// + /// + /// Minimum width/height of a grab box for slider/scrollbar. + /// + /// + /// C++: + /// imgui.h:2358 + ///
float GrabMinSize + ///
+ ///
+ public ref float GrabMinSize => ref Unsafe.AsRef(&_ptr->GrabMinSize); + + /// + /// + /// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. + /// + /// + /// C++: + /// imgui.h:2359 + ///
float GrabRounding + ///
+ ///
+ public ref float GrabRounding => ref Unsafe.AsRef(&_ptr->GrabRounding); + + /// + /// + /// The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero. + /// + /// + /// C++: + /// imgui.h:2360 + ///
float LogSliderDeadzone + ///
+ ///
+ public ref float LogSliderDeadzone => ref Unsafe.AsRef(&_ptr->LogSliderDeadzone); + + /// + /// + /// Thickness of border around Image() calls. + /// + /// + /// C++: + /// imgui.h:2361 + ///
float ImageBorderSize + ///
+ ///
+ public ref float ImageBorderSize => ref Unsafe.AsRef(&_ptr->ImageBorderSize); + + /// + /// + /// Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs. + /// + /// + /// C++: + /// imgui.h:2362 + ///
float TabRounding + ///
+ ///
+ public ref float TabRounding => ref Unsafe.AsRef(&_ptr->TabRounding); + + /// + /// + /// Thickness of border around tabs. + /// + /// + /// C++: + /// imgui.h:2363 + ///
float TabBorderSize + ///
+ ///
+ public ref float TabBorderSize => ref Unsafe.AsRef(&_ptr->TabBorderSize); + + /// + /// + /// Minimum tab width, to make tabs larger than their contents. TabBar buttons are not affected. + /// + /// + /// C++: + /// imgui.h:2364 + ///
float TabMinWidthBase + ///
+ ///
+ public ref float TabMinWidthBase => ref Unsafe.AsRef(&_ptr->TabMinWidthBase); + + /// + /// + /// Minimum tab width after shrinking, when using ImGuiTabBarFlags_FittingPolicyMixed policy. + /// + /// + /// C++: + /// imgui.h:2365 + ///
float TabMinWidthShrink + ///
+ ///
+ public ref float TabMinWidthShrink => ref Unsafe.AsRef(&_ptr->TabMinWidthShrink); + + /// + /// + /// -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. + /// + /// + /// C++: + /// imgui.h:2366 + ///
float TabCloseButtonMinWidthSelected + ///
+ ///
+ public ref float TabCloseButtonMinWidthSelected => + ref Unsafe.AsRef(&_ptr->TabCloseButtonMinWidthSelected); + + /// + /// + /// -1: always visible. 0.0f: visible when hovered. >0.0f: visible when hovered if minimum width. + /// FLT_MAX: never show close button when unselected. + /// + /// + /// C++: + /// imgui.h:2367 + ///
float TabCloseButtonMinWidthUnselected + ///
+ ///
+ public ref float TabCloseButtonMinWidthUnselected => + ref Unsafe.AsRef(&_ptr->TabCloseButtonMinWidthUnselected); + + /// + /// + /// Thickness of tab-bar separator, which takes on the tab active color to denote focus. + /// + /// + /// C++: + /// imgui.h:2368 + ///
float TabBarBorderSize + ///
+ ///
+ public ref float TabBarBorderSize => ref Unsafe.AsRef(&_ptr->TabBarBorderSize); + + /// + /// + /// Thickness of tab-bar overline, which highlights the selected tab-bar. + /// + /// + /// C++: + /// imgui.h:2369 + ///
float TabBarOverlineSize + ///
+ ///
+ public ref float TabBarOverlineSize => ref Unsafe.AsRef(&_ptr->TabBarOverlineSize); + + /// + /// + /// Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees). + /// + /// + /// C++: + /// imgui.h:2370 + ///
float TableAngledHeadersAngle + ///
+ ///
+ public ref float TableAngledHeadersAngle => ref Unsafe.AsRef(&_ptr->TableAngledHeadersAngle); + + /// + /// + /// Alignment of angled headers within the cell + /// + /// + /// C++: + /// imgui.h:2371 + ///
ImVec2 TableAngledHeadersTextAlign + ///
+ ///
+ public ref float2 TableAngledHeadersTextAlign => ref Unsafe.AsRef(&_ptr->TableAngledHeadersTextAlign); + + /// + /// + /// Default way to draw lines connecting TreeNode hierarchy. ImGuiTreeNodeFlags_DrawLinesNone or + /// ImGuiTreeNodeFlags_DrawLinesFull or ImGuiTreeNodeFlags_DrawLinesToNodes. + /// + /// + /// C++: + /// imgui.h:2372 + ///
ImGuiTreeNodeFlags TreeLinesFlags + ///
+ ///
+ public ref ImGuiTreeNodeFlags TreeLinesFlags => ref Unsafe.AsRef(&_ptr->TreeLinesFlags); + + /// + /// + /// Thickness of outlines when using ImGuiTreeNodeFlags_DrawLines. + /// + /// + /// C++: + /// imgui.h:2373 + ///
float TreeLinesSize + ///
+ ///
+ public ref float TreeLinesSize => ref Unsafe.AsRef(&_ptr->TreeLinesSize); + + /// + /// + /// Radius of lines connecting child nodes to the vertical line. + /// + /// + /// C++: + /// imgui.h:2374 + ///
float TreeLinesRounding + ///
+ ///
+ public ref float TreeLinesRounding => ref Unsafe.AsRef(&_ptr->TreeLinesRounding); + + /// + /// + /// Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right. + /// + /// + /// C++: + /// imgui.h:2375 + ///
ImGuiDir ColorButtonPosition + ///
+ ///
+ public ref ImGuiDir ColorButtonPosition => ref Unsafe.AsRef(&_ptr->ColorButtonPosition); + + /// + /// + /// Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered). + /// + /// + /// C++: + /// imgui.h:2376 + ///
ImVec2 ButtonTextAlign + ///
+ ///
+ public ref float2 ButtonTextAlign => ref Unsafe.AsRef(&_ptr->ButtonTextAlign); + + /// + /// + /// Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to + /// keep this left-aligned if you want to lay multiple items on a same line. + /// + /// + /// C++: + /// imgui.h:2377 + ///
ImVec2 SelectableTextAlign + ///
+ ///
+ public ref float2 SelectableTextAlign => ref Unsafe.AsRef(&_ptr->SelectableTextAlign); + + /// + /// + /// Thickness of border in SeparatorText() + /// + /// + /// C++: + /// imgui.h:2378 + ///
float SeparatorTextBorderSize + ///
+ ///
+ public ref float SeparatorTextBorderSize => ref Unsafe.AsRef(&_ptr->SeparatorTextBorderSize); + + /// + /// + /// Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center). + /// + /// + /// C++: + /// imgui.h:2379 + ///
ImVec2 SeparatorTextAlign + ///
+ ///
+ public ref float2 SeparatorTextAlign => ref Unsafe.AsRef(&_ptr->SeparatorTextAlign); + + /// + /// + /// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small + /// values. .y is recommended to be == FramePadding.y. + /// + /// + /// C++: + /// imgui.h:2380 + ///
ImVec2 SeparatorTextPadding + ///
+ ///
+ public ref float2 SeparatorTextPadding => ref Unsafe.AsRef(&_ptr->SeparatorTextPadding); + + /// + /// + /// Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen. + /// + /// + /// C++: + /// imgui.h:2381 + ///
ImVec2 DisplayWindowPadding + ///
+ ///
+ public ref float2 DisplayWindowPadding => ref Unsafe.AsRef(&_ptr->DisplayWindowPadding); + + /// + /// + /// Apply to every windows, menus, popups, tooltips: amount where we avoid displaying contents. Adjust if + /// you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured). + /// + /// + /// C++: + /// imgui.h:2382 + ///
ImVec2 DisplaySafeAreaPadding + ///
+ ///
+ public ref float2 DisplaySafeAreaPadding => ref Unsafe.AsRef(&_ptr->DisplaySafeAreaPadding); + + /// + /// + /// Thickness of resizing border between docked windows + /// + /// + /// C++: + /// imgui.h:2383 + ///
float DockingSeparatorSize + ///
+ ///
+ public ref float DockingSeparatorSize => ref Unsafe.AsRef(&_ptr->DockingSeparatorSize); + + /// + /// + /// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI + /// scaling over this scale. May be removed later. + /// + /// + /// C++: + /// imgui.h:2384 + ///
float MouseCursorScale + ///
+ ///
+ public ref float MouseCursorScale => ref Unsafe.AsRef(&_ptr->MouseCursorScale); + + /// + /// + /// Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning + /// of the frame (copied to ImDrawList). + /// + /// + /// C++: + /// imgui.h:2385 + ///
bool AntiAliasedLines + ///
+ ///
+ public ref bool AntiAliasedLines => ref Unsafe.AsRef(&_ptr->AntiAliasedLines); + + /// + /// + /// Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear + /// filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList). + /// + /// + /// C++: + /// imgui.h:2386 + ///
bool AntiAliasedLinesUseTex + ///
+ ///
+ public ref bool AntiAliasedLinesUseTex => ref Unsafe.AsRef(&_ptr->AntiAliasedLinesUseTex); + + /// + /// + /// Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are + /// really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList). + /// + /// + /// C++: + /// imgui.h:2387 + ///
bool AntiAliasedFill + ///
+ ///
+ public ref bool AntiAliasedFill => ref Unsafe.AsRef(&_ptr->AntiAliasedFill); + + /// + /// + /// Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease + /// for highly tessellated curves (higher quality, more polygons), increase to reduce quality. + /// + /// + /// C++: + /// imgui.h:2388 + ///
float CurveTessellationTol + ///
+ ///
+ public ref float CurveTessellationTol => ref Unsafe.AsRef(&_ptr->CurveTessellationTol); + + /// + /// + /// Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner + /// rectangles with no explicit segment count specified. Decrease for higher quality but more geometry. + /// + /// + /// C++: + /// imgui.h:2389 + ///
float CircleTessellationMaxError + ///
+ ///
+ public ref float CircleTessellationMaxError => ref Unsafe.AsRef(&_ptr->CircleTessellationMaxError); + + /// + /// + /// C++: + /// imgui.h:2392 + ///
ImVec4 Colors[ImGuiCol_COUNT] + ///
+ ///
+ /// + /// + /// Colors + /// + /// + public ref float4_60 Colors => ref Unsafe.AsRef(&_ptr->Colors); + + /// + /// + /// Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary. + /// + /// + /// C++: + /// imgui.h:2396 + ///
float HoverStationaryDelay + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + public ref float HoverStationaryDelay => ref Unsafe.AsRef(&_ptr->HoverStationaryDelay); + + /// + /// + /// Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay. + /// + /// + /// C++: + /// imgui.h:2397 + ///
float HoverDelayShort + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + public ref float HoverDelayShort => ref Unsafe.AsRef(&_ptr->HoverDelayShort); + + /// + /// + /// Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). " + /// + /// + /// C++: + /// imgui.h:2398 + ///
float HoverDelayNormal + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + public ref float HoverDelayNormal => ref Unsafe.AsRef(&_ptr->HoverDelayNormal); + + /// + /// + /// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or + /// BeginItemTooltip()/SetItemTooltip() while using mouse. + /// + /// + /// C++: + /// imgui.h:2399 + ///
ImGuiHoveredFlags HoverFlagsForTooltipMouse + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + public ref ImGuiHoveredFlags HoverFlagsForTooltipMouse => + ref Unsafe.AsRef(&_ptr->HoverFlagsForTooltipMouse); + + /// + /// + /// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or + /// BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad. + /// + /// + /// C++: + /// imgui.h:2400 + ///
ImGuiHoveredFlags HoverFlagsForTooltipNav + ///
+ ///
+ /// + /// + /// Behaviors + /// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO) + /// + /// + public ref ImGuiHoveredFlags HoverFlagsForTooltipNav => + ref Unsafe.AsRef(&_ptr->HoverFlagsForTooltipNav); + + /// + /// + /// FIXME-WIP: Reference scale, as applied by ScaleAllSizes(). + /// + /// + /// C++: + /// imgui.h:2403 + ///
float _MainScale + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref float _MainScale => ref Unsafe.AsRef(&_ptr->_MainScale); + + /// + /// + /// FIXME: Temporary hack until we finish remaining work. + /// + /// + /// C++: + /// imgui.h:2404 + ///
float _NextFrameFontSizeBase + ///
+ ///
+ /// + /// + /// [Internal] + /// + /// + public ref float _NextFrameFontSizeBase => ref Unsafe.AsRef(&_ptr->_NextFrameFontSizeBase); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs new file mode 100644 index 0000000..efa10f4 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiTableColumnSortSpecs.gen.cs @@ -0,0 +1,196 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Sorting specification for one column of a table + /// + /// + /// C++: + /// imgui.h:214 + ///
struct ImGuiTableColumnSortSpecs + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImGuiTableColumnSortSpecs + { + /// + /// + /// User id of the column (if specified by a TableSetupColumn() call) + /// + /// + /// C++: + /// imgui.h:2204 + ///
ImGuiID ColumnUserID + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + [FieldOffset(0)] + public ImGuiID ColumnUserID; + + /// + /// + /// Index of the column + /// + /// + /// C++: + /// imgui.h:2205 + ///
ImS16 ColumnIndex + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + [FieldOffset(4)] + public short ColumnIndex; + + /// + /// + /// Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a + /// single criteria will always have a 0 here) + /// + /// + /// C++: + /// imgui.h:2206 + ///
ImS16 SortOrder + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + [FieldOffset(6)] + public short SortOrder; + + /// + /// + /// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending + /// + /// + /// C++: + /// imgui.h:2207 + ///
ImGuiSortDirection SortDirection + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + [FieldOffset(8)] + public ImGuiSortDirection SortDirection; + } + + /// + /// + /// Sorting specification for one column of a table + /// + /// + /// C++: + /// imgui.h:214 + ///
struct ImGuiTableColumnSortSpecs + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiTableColumnSortSpecsPtr(ImGuiTableColumnSortSpecs* ptr) : INullable + { + private ImGuiTableColumnSortSpecs* _ptr = ptr; + public ImGuiTableColumnSortSpecs* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableColumnSortSpecsPtr(ImGuiTableColumnSortSpecs* ptr) => new(ptr); + + public static implicit operator ImGuiTableColumnSortSpecs*(ImGuiTableColumnSortSpecsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// User id of the column (if specified by a TableSetupColumn() call) + /// + /// + /// C++: + /// imgui.h:2204 + ///
ImGuiID ColumnUserID + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + public ref ImGuiID ColumnUserID => ref Unsafe.AsRef(&_ptr->ColumnUserID); + + /// + /// + /// Index of the column + /// + /// + /// C++: + /// imgui.h:2205 + ///
ImS16 ColumnIndex + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + public ref short ColumnIndex => ref Unsafe.AsRef(&_ptr->ColumnIndex); + + /// + /// + /// Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a + /// single criteria will always have a 0 here) + /// + /// + /// C++: + /// imgui.h:2206 + ///
ImS16 SortOrder + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + public ref short SortOrder => ref Unsafe.AsRef(&_ptr->SortOrder); + + /// + /// + /// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending + /// + /// + /// C++: + /// imgui.h:2207 + ///
ImGuiSortDirection SortDirection + ///
+ ///
+ /// + /// + /// Sorting specification for one column of a table (sizeof == 12 bytes) + /// + /// + public ref ImGuiSortDirection SortDirection => ref Unsafe.AsRef(&_ptr->SortDirection); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiTableSortSpecs.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiTableSortSpecs.gen.cs new file mode 100644 index 0000000..8743a8a --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiTableSortSpecs.gen.cs @@ -0,0 +1,180 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// + /// + /// C++: + /// imgui.h:213 + ///
struct ImGuiTableSortSpecs + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImGuiTableSortSpecs + { + /// + /// + /// Pointer to sort spec array. + /// + /// + /// C++: + /// imgui.h:2194 + ///
const ImGuiTableColumnSortSpecs* Specs + ///
+ ///
+ /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// Obtained by calling TableGetSortSpecs(). + /// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. + /// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! + /// + /// + [FieldOffset(0)] + public Ptr Specs; + + /// + /// + /// Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when + /// ImGuiTableFlags_SortTristate is enabled. + /// + /// + /// C++: + /// imgui.h:2195 + ///
int SpecsCount + ///
+ ///
+ /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// Obtained by calling TableGetSortSpecs(). + /// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. + /// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! + /// + /// + [FieldOffset(8)] + public int SpecsCount; + + /// + /// + /// Set to true when specs have changed since last time! Use this to sort again, then clear the flag. + /// + /// + /// C++: + /// imgui.h:2196 + ///
bool SpecsDirty + ///
+ ///
+ /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// Obtained by calling TableGetSortSpecs(). + /// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. + /// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! + /// + /// + [FieldOffset(12)] + public Bool8 SpecsDirty; + } + + /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// + /// + /// C++: + /// imgui.h:213 + ///
struct ImGuiTableSortSpecs + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiTableSortSpecsPtr(ImGuiTableSortSpecs* ptr) : INullable + { + private ImGuiTableSortSpecs* _ptr = ptr; + public ImGuiTableSortSpecs* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTableSortSpecsPtr(ImGuiTableSortSpecs* ptr) => new(ptr); + + public static implicit operator ImGuiTableSortSpecs*(ImGuiTableSortSpecsPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Pointer to sort spec array. + /// + /// + /// C++: + /// imgui.h:2194 + ///
const ImGuiTableColumnSortSpecs* Specs + ///
+ ///
+ /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// Obtained by calling TableGetSortSpecs(). + /// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. + /// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! + /// + /// + public ref Ptr Specs => + ref Unsafe.AsRef>(&_ptr->Specs); + + /// + /// + /// Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when + /// ImGuiTableFlags_SortTristate is enabled. + /// + /// + /// C++: + /// imgui.h:2195 + ///
int SpecsCount + ///
+ ///
+ /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// Obtained by calling TableGetSortSpecs(). + /// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. + /// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! + /// + /// + public ref int SpecsCount => ref Unsafe.AsRef(&_ptr->SpecsCount); + + /// + /// + /// Set to true when specs have changed since last time! Use this to sort again, then clear the flag. + /// + /// + /// C++: + /// imgui.h:2196 + ///
bool SpecsDirty + ///
+ ///
+ /// + /// + /// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) + /// Obtained by calling TableGetSortSpecs(). + /// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. + /// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! + /// + /// + public ref bool SpecsDirty => ref Unsafe.AsRef(&_ptr->SpecsDirty); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiTextBuffer.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiTextBuffer.gen.cs new file mode 100644 index 0000000..c8d1393 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiTextBuffer.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper to hold and append into a text buffer (~string builder) + /// + /// + /// C++: + /// imgui.h:215 + ///
struct ImGuiTextBuffer + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct ImGuiTextBuffer + { + /// + /// + /// C++: + /// imgui.h:2838 + ///
ImVector<char> Buf + ///
+ ///
+ /// + /// + /// Helper: Growable text buffer for logging/accumulating text + /// (this could be called 'ImGuiTextBuilder' / 'ImGuiStringBuilder') + /// + /// + [FieldOffset(0)] + public ImVector Buf; + + [FieldOffset(0)] + public fixed byte EmptyString[1]; + } + + /// + /// + /// Helper to hold and append into a text buffer (~string builder) + /// + /// + /// C++: + /// imgui.h:215 + ///
struct ImGuiTextBuffer + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiTextBufferPtr(ImGuiTextBuffer* ptr) : INullable + { + private ImGuiTextBuffer* _ptr = ptr; + public ImGuiTextBuffer* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiTextBufferPtr(ImGuiTextBuffer* ptr) => new(ptr); + + public static implicit operator ImGuiTextBuffer*(ImGuiTextBufferPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// imgui.h:2838 + ///
ImVector<char> Buf + ///
+ ///
+ /// + /// + /// Helper: Growable text buffer for logging/accumulating text + /// (this could be called 'ImGuiTextBuilder' / 'ImGuiStringBuilder') + /// + /// + public ref ImVector Buf => ref Unsafe.AsRef>(&_ptr->Buf); + public Span EmptyString => MemoryMarshal.CreateSpan(ref _ptr->EmptyString[0], 1); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiTextFilter.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiTextFilter.gen.cs new file mode 100644 index 0000000..a39cc32 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiTextFilter.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Helper to parse and apply text filters (e.g. "aaaaa[,bbbbb][,ccccc]") + /// + /// + /// C++: + /// imgui.h:216 + ///
struct ImGuiTextFilter + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 280)] + public unsafe partial struct ImGuiTextFilter + { + [FieldOffset(0)] + public fixed byte InputBuf[256]; + + /// + /// + /// C++: + /// imgui.h:2830 + ///
ImVector<ImGuiTextRange>Filters + ///
+ ///
+ [FieldOffset(256)] + public ImVector Filters; + + /// + /// + /// C++: + /// imgui.h:2831 + ///
int CountGrep + ///
+ ///
+ [FieldOffset(272)] + public int CountGrep; + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiViewport.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiViewport.gen.cs new file mode 100644 index 0000000..5b0abb4 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiViewport.gen.cs @@ -0,0 +1,894 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// A Platform Window (always 1 unless multi-viewport are enabled. One per platform window to output to). In the + /// future may represent Platform Monitor + /// + /// + /// C++: + /// imgui.h:217 + ///
struct ImGuiViewport + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public partial struct ImGuiViewport + { + /// + /// + /// Unique identifier for the viewport + /// + /// + /// C++: + /// imgui.h:4019 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// See ImGuiViewportFlags_ + /// + /// + /// C++: + /// imgui.h:4020 + ///
ImGuiViewportFlags Flags + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(4)] + public ImGuiViewportFlags Flags; + + /// + /// + /// Main Area: Position of the viewport (Dear ImGui coordinates are the same as OS desktop/native + /// coordinates) + /// + /// + /// C++: + /// imgui.h:4021 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(8)] + public float2 Pos; + + /// + /// + /// Main Area: Size of the viewport. + /// + /// + /// C++: + /// imgui.h:4022 + ///
ImVec2 Size + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(16)] + public float2 Size; + + /// + /// + /// Density of the viewport for Retina display (always 1,1 on Windows, may be 2,2 etc on macOS/iOS). This + /// will affect font rasterizer density. + /// + /// + /// C++: + /// imgui.h:4023 + ///
ImVec2 FramebufferScale + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(24)] + public float2 FramebufferScale; + + /// + /// + /// Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos) + /// + /// + /// C++: + /// imgui.h:4024 + ///
ImVec2 WorkPos + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(32)] + public float2 WorkPos; + + /// + /// + /// Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size) + /// + /// + /// C++: + /// imgui.h:4025 + ///
ImVec2 WorkSize + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(40)] + public float2 WorkSize; + + /// + /// + /// 1.0f = 96 DPI = No extra scale. + /// + /// + /// C++: + /// imgui.h:4026 + ///
float DpiScale + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(48)] + public float DpiScale; + + /// + /// + /// (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between + /// platform windows. + /// + /// + /// C++: + /// imgui.h:4027 + ///
ImGuiID ParentViewportId + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(52)] + public ImGuiID ParentViewportId; + + /// + /// + /// The ImDrawData corresponding to this viewport. Valid after Render() and until the next call to + /// NewFrame(). + /// + /// + /// C++: + /// imgui.h:4028 + ///
ImDrawData* DrawData + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + [FieldOffset(56)] + public ImDrawDataPtr DrawData; + + /// + /// + /// void* to hold custom data structure for the renderer (e.g. swap chain, framebuffers etc.). generally set + /// by your Renderer_CreateWindow function. + /// + /// + /// C++: + /// imgui.h:4035 + ///
void* RendererUserData + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(64)] + public nint RendererUserData; + + /// + /// + /// void* to hold custom data structure for the OS / platform (e.g. windowing info, render context). + /// generally set by your Platform_CreateWindow function. + /// + /// + /// C++: + /// imgui.h:4036 + ///
void* PlatformUserData + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(72)] + public nint PlatformUserData; + + /// + /// + /// void* to hold higher-level, platform window handle (e.g. HWND for Win32 backend, Uint32 WindowID for + /// SDL, GLFWWindow* for GLFW), for FindViewportByPlatformHandle(). + /// + /// + /// C++: + /// imgui.h:4037 + ///
void* PlatformHandle + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(80)] + public nint PlatformHandle; + + /// + /// + /// void* to hold lower-level, platform-native window handle (always HWND on Win32 platform, unused for + /// other platforms). + /// + /// + /// C++: + /// imgui.h:4038 + ///
void* PlatformHandleRaw + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(88)] + public nint PlatformHandleRaw; + + /// + /// + /// Platform window has been created (Platform_CreateWindow() has been called). This is false during the + /// first frame where a viewport is being created. + /// + /// + /// C++: + /// imgui.h:4039 + ///
bool PlatformWindowCreated + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(96)] + public Bool8 PlatformWindowCreated; + + /// + /// + /// Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative + /// position will be OS window position) + /// + /// + /// C++: + /// imgui.h:4040 + ///
bool PlatformRequestMove + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(97)] + public Bool8 PlatformRequestMove; + + /// + /// + /// Platform window requested resize (e.g. window was resized by the OS / host window manager, authoritative + /// size will be OS window size) + /// + /// + /// C++: + /// imgui.h:4041 + ///
bool PlatformRequestResize + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(98)] + public Bool8 PlatformRequestResize; + + /// + /// + /// Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing + /// ALT-F4) + /// + /// + /// C++: + /// imgui.h:4042 + ///
bool PlatformRequestClose + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + [FieldOffset(99)] + public Bool8 PlatformRequestClose; + } + + /// + /// + /// A Platform Window (always 1 unless multi-viewport are enabled. One per platform window to output to). In the + /// future may represent Platform Monitor + /// + /// + /// C++: + /// imgui.h:217 + ///
struct ImGuiViewport + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiViewportPtr(ImGuiViewport* ptr) : INullable + { + private ImGuiViewport* _ptr = ptr; + public ImGuiViewport* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiViewportPtr(ImGuiViewport* ptr) => new(ptr); + + public static implicit operator ImGuiViewport*(ImGuiViewportPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Unique identifier for the viewport + /// + /// + /// C++: + /// imgui.h:4019 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// See ImGuiViewportFlags_ + /// + /// + /// C++: + /// imgui.h:4020 + ///
ImGuiViewportFlags Flags + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref ImGuiViewportFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// Main Area: Position of the viewport (Dear ImGui coordinates are the same as OS desktop/native + /// coordinates) + /// + /// + /// C++: + /// imgui.h:4021 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref float2 Pos => ref Unsafe.AsRef(&_ptr->Pos); + + /// + /// + /// Main Area: Size of the viewport. + /// + /// + /// C++: + /// imgui.h:4022 + ///
ImVec2 Size + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref float2 Size => ref Unsafe.AsRef(&_ptr->Size); + + /// + /// + /// Density of the viewport for Retina display (always 1,1 on Windows, may be 2,2 etc on macOS/iOS). This + /// will affect font rasterizer density. + /// + /// + /// C++: + /// imgui.h:4023 + ///
ImVec2 FramebufferScale + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref float2 FramebufferScale => ref Unsafe.AsRef(&_ptr->FramebufferScale); + + /// + /// + /// Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos) + /// + /// + /// C++: + /// imgui.h:4024 + ///
ImVec2 WorkPos + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref float2 WorkPos => ref Unsafe.AsRef(&_ptr->WorkPos); + + /// + /// + /// Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size) + /// + /// + /// C++: + /// imgui.h:4025 + ///
ImVec2 WorkSize + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref float2 WorkSize => ref Unsafe.AsRef(&_ptr->WorkSize); + + /// + /// + /// 1.0f = 96 DPI = No extra scale. + /// + /// + /// C++: + /// imgui.h:4026 + ///
float DpiScale + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref float DpiScale => ref Unsafe.AsRef(&_ptr->DpiScale); + + /// + /// + /// (Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between + /// platform windows. + /// + /// + /// C++: + /// imgui.h:4027 + ///
ImGuiID ParentViewportId + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref ImGuiID ParentViewportId => ref Unsafe.AsRef(&_ptr->ParentViewportId); + + /// + /// + /// The ImDrawData corresponding to this viewport. Valid after Render() and until the next call to + /// NewFrame(). + /// + /// + /// C++: + /// imgui.h:4028 + ///
ImDrawData* DrawData + ///
+ ///
+ /// + /// + /// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows. + /// - With multi-viewport enabled, we extend this concept to have multiple active viewports. + /// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode. + /// - About Main Area vs Work Area: + /// - Main Area = entire viewport. + /// - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor). + /// - Windows are generally trying to stay within the Work Area of their host viewport. + /// + /// + public ref ImDrawDataPtr DrawData => ref Unsafe.AsRef(&_ptr->DrawData); + + /// + /// + /// void* to hold custom data structure for the renderer (e.g. swap chain, framebuffers etc.). generally set + /// by your Renderer_CreateWindow function. + /// + /// + /// C++: + /// imgui.h:4035 + ///
void* RendererUserData + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref nint RendererUserData => ref Unsafe.AsRef(&_ptr->RendererUserData); + + /// + /// + /// void* to hold custom data structure for the OS / platform (e.g. windowing info, render context). + /// generally set by your Platform_CreateWindow function. + /// + /// + /// C++: + /// imgui.h:4036 + ///
void* PlatformUserData + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref nint PlatformUserData => ref Unsafe.AsRef(&_ptr->PlatformUserData); + + /// + /// + /// void* to hold higher-level, platform window handle (e.g. HWND for Win32 backend, Uint32 WindowID for + /// SDL, GLFWWindow* for GLFW), for FindViewportByPlatformHandle(). + /// + /// + /// C++: + /// imgui.h:4037 + ///
void* PlatformHandle + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref nint PlatformHandle => ref Unsafe.AsRef(&_ptr->PlatformHandle); + + /// + /// + /// void* to hold lower-level, platform-native window handle (always HWND on Win32 platform, unused for + /// other platforms). + /// + /// + /// C++: + /// imgui.h:4038 + ///
void* PlatformHandleRaw + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref nint PlatformHandleRaw => ref Unsafe.AsRef(&_ptr->PlatformHandleRaw); + + /// + /// + /// Platform window has been created (Platform_CreateWindow() has been called). This is false during the + /// first frame where a viewport is being created. + /// + /// + /// C++: + /// imgui.h:4039 + ///
bool PlatformWindowCreated + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref bool PlatformWindowCreated => ref Unsafe.AsRef(&_ptr->PlatformWindowCreated); + + /// + /// + /// Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative + /// position will be OS window position) + /// + /// + /// C++: + /// imgui.h:4040 + ///
bool PlatformRequestMove + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref bool PlatformRequestMove => ref Unsafe.AsRef(&_ptr->PlatformRequestMove); + + /// + /// + /// Platform window requested resize (e.g. window was resized by the OS / host window manager, authoritative + /// size will be OS window size) + /// + /// + /// C++: + /// imgui.h:4041 + ///
bool PlatformRequestResize + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref bool PlatformRequestResize => ref Unsafe.AsRef(&_ptr->PlatformRequestResize); + + /// + /// + /// Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing + /// ALT-F4) + /// + /// + /// C++: + /// imgui.h:4042 + ///
bool PlatformRequestClose + ///
+ ///
+ /// + /// + /// Platform/Backend Dependent Data + /// Our design separate the Renderer and Platform backends to facilitate combining default backends with each others. + /// When our create your own backend for a custom engine, it is possible that both Renderer and Platform will be handled + /// by the same system and you may not need to use all the UserData/Handle fields. + /// The library never uses those fields, they are merely storage to facilitate backend implementation. + /// + /// + public ref bool PlatformRequestClose => ref Unsafe.AsRef(&_ptr->PlatformRequestClose); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImGuiWindowClass.gen.cs b/Brutal.ImGui/Generated/Structs/ImGuiWindowClass.gen.cs new file mode 100644 index 0000000..0afa713 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImGuiWindowClass.gen.cs @@ -0,0 +1,503 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Window class (rare/advanced uses: provide hints to the platform backend via altered viewport flags and + /// parent/child info) + /// + /// + /// C++: + /// imgui.h:218 + ///
struct ImGuiWindowClass + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImGuiWindowClass + { + /// + /// + /// User data. 0 = Default class (unclassed). Windows of different classes cannot be docked with each + /// others. + /// + /// + /// C++: + /// imgui.h:2752 + ///
ImGuiID ClassId + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(0)] + public ImGuiID ClassId; + + /// + /// + /// Hint for the platform backend. -1: use default. 0: request platform backend to not parent the platform. + /// != 0: request platform backend to create a parent<>child relationship between the platform + /// windows. Not conforming backends are free to e.g. parent every viewport to the main viewport or not. + /// + /// + /// C++: + /// imgui.h:2753 + ///
ImGuiID ParentViewportId + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(4)] + public ImGuiID ParentViewportId; + + /// + /// + /// ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will + /// succeed when this window is focused. + /// + /// + /// C++: + /// imgui.h:2754 + ///
ImGuiID FocusRouteParentWindowId + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(8)] + public ImGuiID FocusRouteParentWindowId; + + /// + /// + /// Viewport flags to set when a window of this class owns a viewport. This allows you to enforce OS + /// decoration or task bar icon, override the defaults on a per-window basis. + /// + /// + /// C++: + /// imgui.h:2755 + ///
ImGuiViewportFlags ViewportFlagsOverrideSet + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(12)] + public ImGuiViewportFlags ViewportFlagsOverrideSet; + + /// + /// + /// Viewport flags to clear when a window of this class owns a viewport. This allows you to enforce OS + /// decoration or task bar icon, override the defaults on a per-window basis. + /// + /// + /// C++: + /// imgui.h:2756 + ///
ImGuiViewportFlags ViewportFlagsOverrideClear + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(16)] + public ImGuiViewportFlags ViewportFlagsOverrideClear; + + /// + /// + /// [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. + /// May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing. + /// + /// + /// C++: + /// imgui.h:2757 + ///
ImGuiTabItemFlags TabItemFlagsOverrideSet + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(20)] + public ImGuiTabItemFlags TabItemFlagsOverrideSet; + + /// + /// + /// [EXPERIMENTAL] Dock node flags to set when a window of this class is hosted by a dock node (it doesn't + /// have to be selected!) + /// + /// + /// C++: + /// imgui.h:2758 + ///
ImGuiDockNodeFlags DockNodeFlagsOverrideSet + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(24)] + public ImGuiDockNodeFlags DockNodeFlagsOverrideSet; + + /// + /// + /// Set to true to enforce single floating windows of this class always having their own docking node + /// (equivalent of setting the global io.ConfigDockingAlwaysTabBar) + /// + /// + /// C++: + /// imgui.h:2759 + ///
bool DockingAlwaysTabBar + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(28)] + public Bool8 DockingAlwaysTabBar; + + /// + /// + /// Set to true to allow windows of this class to be docked/merged with an unclassed window. // FIXME-DOCK: + /// Move to DockNodeFlags override? + /// + /// + /// C++: + /// imgui.h:2760 + ///
bool DockingAllowUnclassed + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + [FieldOffset(29)] + public Bool8 DockingAllowUnclassed; + } + + /// + /// + /// Window class (rare/advanced uses: provide hints to the platform backend via altered viewport flags and + /// parent/child info) + /// + /// + /// C++: + /// imgui.h:218 + ///
struct ImGuiWindowClass + ///
+ ///
+ /// + /// + /// Forward declarations: ImGui layer + /// + /// + public unsafe partial struct ImGuiWindowClassPtr(ImGuiWindowClass* ptr) : INullable + { + private ImGuiWindowClass* _ptr = ptr; + public ImGuiWindowClass* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImGuiWindowClassPtr(ImGuiWindowClass* ptr) => new(ptr); + + public static implicit operator ImGuiWindowClass*(ImGuiWindowClassPtr wrapper) => wrapper.Ptr; + + /// + /// + /// User data. 0 = Default class (unclassed). Windows of different classes cannot be docked with each + /// others. + /// + /// + /// C++: + /// imgui.h:2752 + ///
ImGuiID ClassId + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiID ClassId => ref Unsafe.AsRef(&_ptr->ClassId); + + /// + /// + /// Hint for the platform backend. -1: use default. 0: request platform backend to not parent the platform. + /// != 0: request platform backend to create a parent<>child relationship between the platform + /// windows. Not conforming backends are free to e.g. parent every viewport to the main viewport or not. + /// + /// + /// C++: + /// imgui.h:2753 + ///
ImGuiID ParentViewportId + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiID ParentViewportId => ref Unsafe.AsRef(&_ptr->ParentViewportId); + + /// + /// + /// ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will + /// succeed when this window is focused. + /// + /// + /// C++: + /// imgui.h:2754 + ///
ImGuiID FocusRouteParentWindowId + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiID FocusRouteParentWindowId => ref Unsafe.AsRef(&_ptr->FocusRouteParentWindowId); + + /// + /// + /// Viewport flags to set when a window of this class owns a viewport. This allows you to enforce OS + /// decoration or task bar icon, override the defaults on a per-window basis. + /// + /// + /// C++: + /// imgui.h:2755 + ///
ImGuiViewportFlags ViewportFlagsOverrideSet + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiViewportFlags ViewportFlagsOverrideSet => + ref Unsafe.AsRef(&_ptr->ViewportFlagsOverrideSet); + + /// + /// + /// Viewport flags to clear when a window of this class owns a viewport. This allows you to enforce OS + /// decoration or task bar icon, override the defaults on a per-window basis. + /// + /// + /// C++: + /// imgui.h:2756 + ///
ImGuiViewportFlags ViewportFlagsOverrideClear + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiViewportFlags ViewportFlagsOverrideClear => + ref Unsafe.AsRef(&_ptr->ViewportFlagsOverrideClear); + + /// + /// + /// [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. + /// May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing. + /// + /// + /// C++: + /// imgui.h:2757 + ///
ImGuiTabItemFlags TabItemFlagsOverrideSet + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiTabItemFlags TabItemFlagsOverrideSet => + ref Unsafe.AsRef(&_ptr->TabItemFlagsOverrideSet); + + /// + /// + /// [EXPERIMENTAL] Dock node flags to set when a window of this class is hosted by a dock node (it doesn't + /// have to be selected!) + /// + /// + /// C++: + /// imgui.h:2758 + ///
ImGuiDockNodeFlags DockNodeFlagsOverrideSet + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref ImGuiDockNodeFlags DockNodeFlagsOverrideSet => + ref Unsafe.AsRef(&_ptr->DockNodeFlagsOverrideSet); + + /// + /// + /// Set to true to enforce single floating windows of this class always having their own docking node + /// (equivalent of setting the global io.ConfigDockingAlwaysTabBar) + /// + /// + /// C++: + /// imgui.h:2759 + ///
bool DockingAlwaysTabBar + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref bool DockingAlwaysTabBar => ref Unsafe.AsRef(&_ptr->DockingAlwaysTabBar); + + /// + /// + /// Set to true to allow windows of this class to be docked/merged with an unclassed window. // FIXME-DOCK: + /// Move to DockNodeFlags override? + /// + /// + /// C++: + /// imgui.h:2760 + ///
bool DockingAllowUnclassed + ///
+ ///
+ /// + /// + /// [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions. + /// Important: the content of this class is still highly WIP and likely to change and be refactored + /// before we stabilize Docking features. Please be mindful if using this. + /// Provide hints: + /// - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.) + /// - To the platform backend for OS level parent/child relationships of viewport. + /// - To the docking system for various options and filtering. + /// + /// + public ref bool DockingAllowUnclassed => ref Unsafe.AsRef(&_ptr->DockingAllowUnclassed); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImTextureData.gen.cs b/Brutal.ImGui/Generated/Structs/ImTextureData.gen.cs new file mode 100644 index 0000000..64a209c --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImTextureData.gen.cs @@ -0,0 +1,814 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// + /// + /// C++: + /// imgui.h:190 + ///
struct ImTextureData + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public partial struct ImTextureData + { + /// + /// + /// w - // [DEBUG] Sequential index to facilitate identifying a texture when debugging/printing. Unique + /// per atlas. + /// + /// + /// C++: + /// imgui.h:3568 + ///
int UniqueID + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(0)] + public int UniqueID; + + /// + /// + /// rw rw // ImTextureStatus_OK/_WantCreate/_WantUpdates/_WantDestroy. Always use SetStatus() to modify! + /// + /// + /// C++: + /// imgui.h:3569 + ///
ImTextureStatus Status + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(4)] + public ImTextureStatus Status; + + /// + /// + /// - rw // Convenience storage for backend. Some backends may have enough with TexID. + /// + /// + /// C++: + /// imgui.h:3570 + ///
void* BackendUserData + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(8)] + public nint BackendUserData; + + /// + /// + /// r w // Backend-specific texture identifier. Always use SetTexID() to modify! The identifier will + /// stored in ImDrawCmd::GetTexID() and passed to backend's RenderDrawData function. + /// + /// + /// C++: + /// imgui.h:3571 + ///
ImTextureID TexID + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(16)] + public ImTextureID TexID; + + /// + /// + /// w r // ImTextureFormat_RGBA32 (default) or ImTextureFormat_Alpha8 + /// + /// + /// C++: + /// imgui.h:3572 + ///
ImTextureFormat Format + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(24)] + public ImTextureFormat Format; + + /// + /// + /// w r // Texture width + /// + /// + /// C++: + /// imgui.h:3573 + ///
int Width + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(28)] + public int Width; + + /// + /// + /// w r // Texture height + /// + /// + /// C++: + /// imgui.h:3574 + ///
int Height + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(32)] + public int Height; + + /// + /// + /// w r // 4 or 1 + /// + /// + /// C++: + /// imgui.h:3575 + ///
int BytesPerPixel + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(36)] + public int BytesPerPixel; + + /// + /// + /// w r // Pointer to buffer holding 'Width*Height' pixels and 'Width*Height*BytesPerPixels' bytes. + /// + /// + /// C++: + /// imgui.h:3576 + ///
unsigned char* Pixels + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(40)] + public Ptr Pixels; + + /// + /// + /// w r // Bounding box encompassing all past and queued Updates[]. + /// + /// + /// C++: + /// imgui.h:3577 + ///
ImTextureRect UsedRect + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(48)] + public ImTextureRect UsedRect; + + /// + /// + /// w r // Bounding box encompassing all queued Updates[]. + /// + /// + /// C++: + /// imgui.h:3578 + ///
ImTextureRect UpdateRect + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(56)] + public ImTextureRect UpdateRect; + + /// + /// + /// w r // Array of individual updates. + /// + /// + /// C++: + /// imgui.h:3579 + ///
ImVector<ImTextureRect> Updates + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(64)] + public ImVector Updates; + + /// + /// + /// w r // In order to facilitate handling Status==WantDestroy in some backend: this is a count + /// successive frames where the texture was not used. Always >0 when Status==WantDestroy. + /// + /// + /// C++: + /// imgui.h:3580 + ///
int UnusedFrames + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(80)] + public int UnusedFrames; + + /// + /// + /// w r // Number of contexts using this texture. Used during backend shutdown. + /// + /// + /// C++: + /// imgui.h:3581 + ///
unsigned short RefCount + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(84)] + public ushort RefCount; + + /// + /// + /// w r // Tell whether our texture data is known to use colors (rather than just white + alpha). + /// + /// + /// C++: + /// imgui.h:3582 + ///
bool UseColors + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(86)] + public Bool8 UseColors; + + /// + /// + /// rw - // [Internal] Queued to set ImTextureStatus_WantDestroy next frame. May still be used in the + /// current frame. + /// + /// + /// C++: + /// imgui.h:3583 + ///
bool WantDestroyNextFrame + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + [FieldOffset(87)] + public Bool8 WantDestroyNextFrame; + } + + /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// + /// + /// C++: + /// imgui.h:190 + ///
struct ImTextureData + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImTextureDataPtr(ImTextureData* ptr) : INullable + { + private ImTextureData* _ptr = ptr; + public ImTextureData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImTextureDataPtr(ImTextureData* ptr) => new(ptr); + + public static implicit operator ImTextureData*(ImTextureDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// w - // [DEBUG] Sequential index to facilitate identifying a texture when debugging/printing. Unique + /// per atlas. + /// + /// + /// C++: + /// imgui.h:3568 + ///
int UniqueID + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref int UniqueID => ref Unsafe.AsRef(&_ptr->UniqueID); + + /// + /// + /// rw rw // ImTextureStatus_OK/_WantCreate/_WantUpdates/_WantDestroy. Always use SetStatus() to modify! + /// + /// + /// C++: + /// imgui.h:3569 + ///
ImTextureStatus Status + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ImTextureStatus Status => ref Unsafe.AsRef(&_ptr->Status); + + /// + /// + /// - rw // Convenience storage for backend. Some backends may have enough with TexID. + /// + /// + /// C++: + /// imgui.h:3570 + ///
void* BackendUserData + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref nint BackendUserData => ref Unsafe.AsRef(&_ptr->BackendUserData); + + /// + /// + /// r w // Backend-specific texture identifier. Always use SetTexID() to modify! The identifier will + /// stored in ImDrawCmd::GetTexID() and passed to backend's RenderDrawData function. + /// + /// + /// C++: + /// imgui.h:3571 + ///
ImTextureID TexID + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ImTextureID TexID => ref Unsafe.AsRef(&_ptr->TexID); + + /// + /// + /// w r // ImTextureFormat_RGBA32 (default) or ImTextureFormat_Alpha8 + /// + /// + /// C++: + /// imgui.h:3572 + ///
ImTextureFormat Format + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ImTextureFormat Format => ref Unsafe.AsRef(&_ptr->Format); + + /// + /// + /// w r // Texture width + /// + /// + /// C++: + /// imgui.h:3573 + ///
int Width + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref int Width => ref Unsafe.AsRef(&_ptr->Width); + + /// + /// + /// w r // Texture height + /// + /// + /// C++: + /// imgui.h:3574 + ///
int Height + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref int Height => ref Unsafe.AsRef(&_ptr->Height); + + /// + /// + /// w r // 4 or 1 + /// + /// + /// C++: + /// imgui.h:3575 + ///
int BytesPerPixel + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref int BytesPerPixel => ref Unsafe.AsRef(&_ptr->BytesPerPixel); + + /// + /// + /// w r // Pointer to buffer holding 'Width*Height' pixels and 'Width*Height*BytesPerPixels' bytes. + /// + /// + /// C++: + /// imgui.h:3576 + ///
unsigned char* Pixels + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref Ptr Pixels => ref Unsafe.AsRef>(&_ptr->Pixels); + + /// + /// + /// w r // Bounding box encompassing all past and queued Updates[]. + /// + /// + /// C++: + /// imgui.h:3577 + ///
ImTextureRect UsedRect + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ImTextureRect UsedRect => ref Unsafe.AsRef(&_ptr->UsedRect); + + /// + /// + /// w r // Bounding box encompassing all queued Updates[]. + /// + /// + /// C++: + /// imgui.h:3578 + ///
ImTextureRect UpdateRect + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ImTextureRect UpdateRect => ref Unsafe.AsRef(&_ptr->UpdateRect); + + /// + /// + /// w r // Array of individual updates. + /// + /// + /// C++: + /// imgui.h:3579 + ///
ImVector<ImTextureRect> Updates + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ImVector Updates => ref Unsafe.AsRef>(&_ptr->Updates); + + /// + /// + /// w r // In order to facilitate handling Status==WantDestroy in some backend: this is a count + /// successive frames where the texture was not used. Always >0 when Status==WantDestroy. + /// + /// + /// C++: + /// imgui.h:3580 + ///
int UnusedFrames + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref int UnusedFrames => ref Unsafe.AsRef(&_ptr->UnusedFrames); + + /// + /// + /// w r // Number of contexts using this texture. Used during backend shutdown. + /// + /// + /// C++: + /// imgui.h:3581 + ///
unsigned short RefCount + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref ushort RefCount => ref Unsafe.AsRef(&_ptr->RefCount); + + /// + /// + /// w r // Tell whether our texture data is known to use colors (rather than just white + alpha). + /// + /// + /// C++: + /// imgui.h:3582 + ///
bool UseColors + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref bool UseColors => ref Unsafe.AsRef(&_ptr->UseColors); + + /// + /// + /// rw - // [Internal] Queued to set ImTextureStatus_WantDestroy next frame. May still be used in the + /// current frame. + /// + /// + /// C++: + /// imgui.h:3583 + ///
bool WantDestroyNextFrame + ///
+ ///
+ /// + /// + /// Specs and pixel storage for a texture used by Dear ImGui. + /// This is only useful for (1) core library and (2) backends. End-user/applications do not need to care about this. + /// Renderer Backends will create a GPU-side version of this. + /// Why does we store two identifiers: TexID and BackendUserData? + /// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData. + /// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both. + /// In columns below: who reads/writes each fields? 'r'=read, 'w'=write, 'core'=main library, 'backend'=renderer backend + /// + /// + public ref bool WantDestroyNextFrame => ref Unsafe.AsRef(&_ptr->WantDestroyNextFrame); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImTextureRect.gen.cs b/Brutal.ImGui/Generated/Structs/ImTextureRect.gen.cs new file mode 100644 index 0000000..af6fcf8 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImTextureRect.gen.cs @@ -0,0 +1,210 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// Coordinates of a rectangle within a texture. + /// + /// + /// C++: + /// imgui.h:191 + ///
struct ImTextureRect + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ImTextureRect + { + /// + /// + /// Upper-left coordinates of rectangle to update + /// + /// + /// C++: + /// imgui.h:3554 + ///
unsigned short x + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + [FieldOffset(0)] + public ushort x; + + /// + /// + /// Upper-left coordinates of rectangle to update + /// + /// + /// C++: + /// imgui.h:3554 + ///
unsigned short x, y + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + [FieldOffset(2)] + public ushort y; + + /// + /// + /// Size of rectangle to update (in pixels) + /// + /// + /// C++: + /// imgui.h:3555 + ///
unsigned short w + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + [FieldOffset(4)] + public ushort w; + + /// + /// + /// Size of rectangle to update (in pixels) + /// + /// + /// C++: + /// imgui.h:3555 + ///
unsigned short w, h + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + [FieldOffset(6)] + public ushort h; + } + + /// + /// + /// Coordinates of a rectangle within a texture. + /// + /// + /// C++: + /// imgui.h:191 + ///
struct ImTextureRect + ///
+ ///
+ /// + /// + /// Forward declarations: ImDrawList, ImFontAtlas layer + /// + /// + public unsafe partial struct ImTextureRectPtr(ImTextureRect* ptr) : INullable + { + private ImTextureRect* _ptr = ptr; + public ImTextureRect* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImTextureRectPtr(ImTextureRect* ptr) => new(ptr); + + public static implicit operator ImTextureRect*(ImTextureRectPtr wrapper) => wrapper.Ptr; + + /// + /// + /// Upper-left coordinates of rectangle to update + /// + /// + /// C++: + /// imgui.h:3554 + ///
unsigned short x + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + public ref ushort x => ref Unsafe.AsRef(&_ptr->x); + + /// + /// + /// Upper-left coordinates of rectangle to update + /// + /// + /// C++: + /// imgui.h:3554 + ///
unsigned short x, y + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + public ref ushort y => ref Unsafe.AsRef(&_ptr->y); + + /// + /// + /// Size of rectangle to update (in pixels) + /// + /// + /// C++: + /// imgui.h:3555 + ///
unsigned short w + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + public ref ushort w => ref Unsafe.AsRef(&_ptr->w); + + /// + /// + /// Size of rectangle to update (in pixels) + /// + /// + /// C++: + /// imgui.h:3555 + ///
unsigned short w, h + ///
+ ///
+ /// + /// + /// Coordinates of a rectangle within a texture. + /// When a texture is in ImTextureStatus_WantUpdates state, we provide a list of individual rectangles to copy to the graphics system. + /// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box. + /// + /// + public ref ushort h => ref Unsafe.AsRef(&_ptr->h); + } +} diff --git a/Brutal.ImGui/Generated/Structs/ImTextureRef.gen.cs b/Brutal.ImGui/Generated/Structs/ImTextureRef.gen.cs new file mode 100644 index 0000000..a1e9049 --- /dev/null +++ b/Brutal.ImGui/Generated/Structs/ImTextureRef.gen.cs @@ -0,0 +1,152 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImGuiApi +{ + /// + /// + /// C++: + /// imgui.h:369 + ///
struct ImTextureRef + ///
+ ///
+ /// + /// + /// ImTextureRef = higher-level identifier for a texture. Store a ImTextureID _or_ a ImTextureData*. + /// The identifier is valid even before the texture has been uploaded to the GPU/graphics system. + /// This is what gets passed to functions such as `ImGui::Image()`, `ImDrawList::AddImage()`. + /// This is what gets stored in draw commands (`ImDrawCmd`) to identify a texture during rendering. + /// - When a texture is created by user code (e.g. custom images), we directly stores the low-level ImTextureID. + /// Because of this, when displaying your own texture you are likely to ever only manage ImTextureID values on your side. + /// - When a texture is created by the backend, we stores a ImTextureData* which becomes an indirection + /// to extract the ImTextureID value during rendering, after texture upload has happened. + /// - To create a ImTextureRef from a ImTextureData you can use ImTextureData::GetTexRef(). + /// We intentionally do not provide an ImTextureRef constructor for this: we don't expect this + /// to be frequently useful to the end-user, and it would be erroneously called by many legacy code. + /// - If you want to bind the current atlas when using custom rectangle, you can use io.Fonts->TexRef. + /// - Binding generators for languages such as C (which don't have constructors), should provide a helper, e.g. + /// inline ImTextureRef ImTextureRefFromID(ImTextureID tex_id) { ImTextureRef tex_ref = { ._TexData = NULL, .TexID = tex_id }; return tex_ref; } + /// In 1.92 we changed most drawing functions using ImTextureID to use ImTextureRef. + /// We intentionally do not provide an implicit ImTextureRef -> ImTextureID cast operator because it is technically lossy to convert ImTextureRef to ImTextureID before rendering. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImTextureRef + { + /// + /// + /// A texture, generally owned by a ImFontAtlas. Will convert to ImTextureID during render loop, after + /// texture has been uploaded. + /// + /// + /// C++: + /// imgui.h:380 + ///
ImTextureData* _TexData + ///
+ ///
+ /// + /// + /// Members (either are set, never both!) + /// + /// + [FieldOffset(0)] + public ImTextureDataPtr _TexData; + + /// + /// + /// _OR_ Low-level backend texture identifier, if already uploaded or created by user/app. Generally + /// provided to e.g. ImGui::Image() calls. + /// + /// + /// C++: + /// imgui.h:381 + ///
ImTextureID _TexID + ///
+ ///
+ /// + /// + /// Members (either are set, never both!) + /// + /// + [FieldOffset(8)] + public ImTextureID _TexID; + } + + /// + /// + /// C++: + /// imgui.h:369 + ///
struct ImTextureRef + ///
+ ///
+ /// + /// + /// ImTextureRef = higher-level identifier for a texture. Store a ImTextureID _or_ a ImTextureData*. + /// The identifier is valid even before the texture has been uploaded to the GPU/graphics system. + /// This is what gets passed to functions such as `ImGui::Image()`, `ImDrawList::AddImage()`. + /// This is what gets stored in draw commands (`ImDrawCmd`) to identify a texture during rendering. + /// - When a texture is created by user code (e.g. custom images), we directly stores the low-level ImTextureID. + /// Because of this, when displaying your own texture you are likely to ever only manage ImTextureID values on your side. + /// - When a texture is created by the backend, we stores a ImTextureData* which becomes an indirection + /// to extract the ImTextureID value during rendering, after texture upload has happened. + /// - To create a ImTextureRef from a ImTextureData you can use ImTextureData::GetTexRef(). + /// We intentionally do not provide an ImTextureRef constructor for this: we don't expect this + /// to be frequently useful to the end-user, and it would be erroneously called by many legacy code. + /// - If you want to bind the current atlas when using custom rectangle, you can use io.Fonts->TexRef. + /// - Binding generators for languages such as C (which don't have constructors), should provide a helper, e.g. + /// inline ImTextureRef ImTextureRefFromID(ImTextureID tex_id) { ImTextureRef tex_ref = { ._TexData = NULL, .TexID = tex_id }; return tex_ref; } + /// In 1.92 we changed most drawing functions using ImTextureID to use ImTextureRef. + /// We intentionally do not provide an implicit ImTextureRef -> ImTextureID cast operator because it is technically lossy to convert ImTextureRef to ImTextureID before rendering. + /// + /// + public unsafe partial struct ImTextureRefPtr(ImTextureRef* ptr) : INullable + { + private ImTextureRef* _ptr = ptr; + public ImTextureRef* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImTextureRefPtr(ImTextureRef* ptr) => new(ptr); + + public static implicit operator ImTextureRef*(ImTextureRefPtr wrapper) => wrapper.Ptr; + + /// + /// + /// A texture, generally owned by a ImFontAtlas. Will convert to ImTextureID during render loop, after + /// texture has been uploaded. + /// + /// + /// C++: + /// imgui.h:380 + ///
ImTextureData* _TexData + ///
+ ///
+ /// + /// + /// Members (either are set, never both!) + /// + /// + public ref ImTextureDataPtr _TexData => ref Unsafe.AsRef(&_ptr->_TexData); + + /// + /// + /// _OR_ Low-level backend texture identifier, if already uploaded or created by user/app. Generally + /// provided to e.g. ImGui::Image() calls. + /// + /// + /// C++: + /// imgui.h:381 + ///
ImTextureID _TexID + ///
+ ///
+ /// + /// + /// Members (either are set, never both!) + /// + /// + public ref ImTextureID _TexID => ref Unsafe.AsRef(&_ptr->_TexID); + } +} diff --git a/Brutal.ImGui/GlobalUsings.cs b/Brutal.ImGui/GlobalUsings.cs new file mode 100644 index 0000000..734ba5e --- /dev/null +++ b/Brutal.ImGui/GlobalUsings.cs @@ -0,0 +1,18 @@ +global using System.Diagnostics.Contracts; +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.ImGuiApi.InlineArrays; +global using Brutal.ImGuiApi.Internal; +global using Brutal.ImGuiApi.Internal.InlineArrays; +global using Brutal.Numerics; +global using Brutal.Pointers; +global using Brutal.Pointers.Extensions; +global using Brutal.Strings; +global using Char16 = char; +global using Char8 = byte; +global using String16 = string; +global using PInvoke = Brutal.ImGuiApi.Internal.PInvoke; +global using String16View = System.ReadOnlySpan; +global using String8View = System.ReadOnlySpan; +global using StringBuilder16 = Brutal.Strings.StringBuilder; +global using StringBuilder8 = Brutal.Strings.StringBuilder; diff --git a/Brutal.ImGui/ImString/ArenaStringBuilder.cs b/Brutal.ImGui/ImString/ArenaStringBuilder.cs new file mode 100644 index 0000000..a3724bb --- /dev/null +++ b/Brutal.ImGui/ImString/ArenaStringBuilder.cs @@ -0,0 +1,122 @@ +namespace Brutal.Strings; + +using ArenaString = ReadOnlySpan; + +/// +/// Packs multiple null-terminated strings (aka chunks) into one fixed-capacity . +/// The buffer never reallocates (Capacity == MaxCapacity), so every span handed out stays valid +/// until the next . Being an arena, the suggested lifetime is a frame / tick. +/// Each chunk owns a trailing \0 terminator, so beginning or growing one needs room: +/// throws when the arena is full. +/// +public class ArenaStringBuilder(int capacity) +{ + // Fixed capacity: cannot grow as a realloc would dangle every mid-flight chunk. + private readonly StringBuilder8 _sb = new(capacity: capacity, maxCapacity: capacity); + + /// + public void Clear() => _sb.Clear(); + + /// Begins a chunk (empty span at the current position). + public ArenaString Begin() + { + // StringBuilder keeps a \0 at Contents.Length: skip 1 to avoid clobbering the previous chunk's null-terminator. + if (_sb.WrittenSpan.Length > 0) + _sb.Advance(1); + var contents = _sb.WrittenSpan; + return contents[contents.Length..]; // empty span at the current write position + } + + /// Returns the span from to the builder's current write position. + public void Extend(scoped ref ArenaString origin) + { + var contents = _sb.WrittenSpan; + var start = (int) + Unsafe.ByteOffset(in MemoryMarshal.GetReference(contents), in MemoryMarshal.GetReference(origin)); + origin = contents[start..]; + } + + /// Appends to the chunk. + public void Append(ref ArenaString origin, T value, int alignment = 0, String16? format = null) + { + _sb.Append(value, alignment, format); + Extend(ref origin); + } + + /// + public void Append(ref ArenaString origin, scoped ReadOnlySpan value, int alignment = 0) + { + _sb.Append(value, alignment); + Extend(ref origin); + } + + /// + public void Append(ref ArenaString origin, scoped ReadOnlySpan value, int alignment = 0) + { + _sb.Append(value, alignment); + Extend(ref origin); + } + + /// Appends and returns a standalone chunk. + public ArenaString Append(String8View value) + { + var origin = Begin(); + _sb.Append(value); + Extend(ref origin); + return origin; + } + + /// + public ArenaString Append(ReadOnlySpan value) + { + var origin = Begin(); + _sb.Append(value); + Extend(ref origin); + return origin; + } + + /// Folds a hole's into the chunk. + public void Absorb(ref ArenaString origin, scoped ArenaString value, int alignment = 0) + { + /* + * The value may have arrived three ways, told apart by where it sits relative to our chunk: + * - nested $"...": written straight through our chunk (starts exactly where we end) -> absorb in place; + * - inline string/char->ImString conversion: wrote mid-flight, landing at our tail behind its own Begin + * separator -> rewind over the stray bytes and re-lay contiguously; + * - external (u8 literal, a variable's span): not in the arena -> just copy it in. + */ + var written = _sb.WrittenSpan; + ref var baseRef = ref MemoryMarshal.GetReference(written); + var valueOffset = Unsafe.ByteOffset(in baseRef, in MemoryMarshal.GetReference(value)); + var originEnd = (int)Unsafe.ByteOffset(in baseRef, in MemoryMarshal.GetReference(origin)) + origin.Length; + + // Only trust the offset math if `value` actually lives in our arena buffer (offset within [0, Capacity]). + if ((nuint)valueOffset <= (nuint)_sb.Capacity) + { + var valueStart = (int)valueOffset; + if (valueStart == originEnd) // nested write-through: already part of our chunk + { + if (alignment != 0) + AlignFrom(ref origin, value, alignment); + else + Extend(ref origin); + return; + } + if (valueStart + value.Length == written.Length) // inline conversion that wrote at our tail + _sb.Position = originEnd; // rewind over its stray bytes (Begin separator + content) before re-laying + } + + // Re-lay (or copy) the value contiguously at the chunk end. When rewound, this is a forward copy with + // dest (originEnd) < src (valueStart) - memmove-safe even though value aliases the tail. + Append(ref origin, value, alignment); + } + + /// + public void AlignFrom(ref ArenaString origin, scoped ArenaString nested, int alignment) + { + var start = (int) + Unsafe.ByteOffset(in MemoryMarshal.GetReference(_sb.WrittenSpan), in MemoryMarshal.GetReference(nested)); + _sb.AlignFrom(start, alignment); + Extend(ref origin); + } +} diff --git a/Brutal.ImGui/ImString/ImInputString.cs b/Brutal.ImGui/ImString/ImInputString.cs new file mode 100644 index 0000000..0274484 --- /dev/null +++ b/Brutal.ImGui/ImString/ImInputString.cs @@ -0,0 +1,114 @@ +namespace Brutal.ImGuiApi; + +/// A UTF8 mutable string, for ImGui InputText() etc. +/// Heap-allocated. +public class ImInputString : IUtf8SpanFormattable, ISpanFormattable +{ + public readonly byte[] Buffer; + public int Capacity => Buffer.Length; + public int Length; + + public ImInputString(int capacity, ReadOnlySpan initialContent = default) + { + if (capacity < 1) + throw new ArgumentOutOfRangeException( + nameof(capacity), + "Capacity must be at least 1 to accommodate null-terminator." + ); + Buffer = new byte[capacity]; + SetValue(initialContent); + } + + public ImInputString(int capacity, ImString initialContent) + : this(capacity, initialContent.AsSpan()) { } + + public void SetValue(ReadOnlySpan content) + { + Length = Utf8.EvaluateLength(content); + ValidateLength(); + if (Length > 0) + content[..Length].CopyTo(Buffer); + NullTerminate(); + } + + public void SetValue(ReadOnlySpan content) + { + Utf8.FromUtf16(content, Buffer, out _, out Length); + ValidateLength(); + NullTerminate(); + } + + public void Clear() + { + Length = 0; + NullTerminate(); + } + + /// + public void EvaluateLength() + { + Length = Utf8.EvaluateLength(Buffer); + ValidateLength(); + } + + private void ValidateLength() + { + if (Length >= Capacity) + throw new Exception("Length must be less than Capacity to accommodate null-terminator."); + } + + private void NullTerminate() + { + Buffer[Length] = 0; + } + + public bool IsEmpty => Length == 0; + + /// for PInvoke + public ref readonly byte GetPinnableReference() => ref MemoryMarshal.GetArrayDataReference(Buffer); + + public ReadOnlySpan ValueSpan => Buffer.AsSpan()[..Length]; + + //public static implicit operator ReadOnlySpan(ImInputString input) => input.ValueSpan; + public ImString Value => ValueSpan; + public ReadOnlySpan Value8 + { + set => SetValue(value); + } + public ReadOnlySpan Value16 + { + set => SetValue(value); + } + + public static implicit operator ImString(ImInputString input) => input.ValueSpan; + + #region IUtf8SpanFormattable, ISpanFormattable, IFormattable + + /// IUtf8SpanFormattable implementation + public bool TryFormat( + Span utf8Destination, + out int bytesWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) => Value.TryFormat(utf8Destination, out bytesWritten, format, provider); + + /// ISpanFormattable implementation + public bool TryFormat( + Span utf16Destination, + out int charsWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) => Value.TryFormat(utf16Destination, out charsWritten, format, provider); + + /// IFormattable implementation - useless but required for ISpanFormattable + string IFormattable.ToString(string? format, IFormatProvider? formatProvider) => Value.ToString(); + + public override string ToString() => Value.ToString(); + + #endregion +} + +public static class ImInputStringExtensions +{ + public static bool IsNullOrEmpty(this ImInputString? @this) => @this == null || @this.Length == 0; +} diff --git a/Brutal.ImGui/ImString/ImString.Interpolation.cs b/Brutal.ImGui/ImString/ImString.Interpolation.cs new file mode 100644 index 0000000..a3e2d8c --- /dev/null +++ b/Brutal.ImGui/ImString/ImString.Interpolation.cs @@ -0,0 +1,94 @@ +using System.ComponentModel; + +namespace Brutal.ImGuiApi; + +[InterpolatedStringHandler] +public ref partial struct ImString +{ + /* + * Interpolation handler for ImString. Each piece is appended to the shared arena builder, + * which centralizes formatting, grapheme-aware alignment, and nested-interpolation write-through; + * then `_bytes` is extended to span the chunk built so far. + * The arena maintains a null terminator just past each chunk for native interop. + */ + + /// InterpolatedStringHandler constructor; not intended for general use. + [EditorBrowsable(EditorBrowsableState.Never)] + public ImString(int literalLength, int formattedCount) + { + if (literalLength + formattedCount == 0) + { + // special case for empty interpolation: $"" + this = Empty; + return; + } + + _bytes = SharedStorage.Begin(); // empty span anchored at the chunk start; grown by each Append below + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public void AppendLiteral(scoped ReadOnlySpan value) + { + SharedStorage.Append(ref _bytes, value); + } + + #region AppendFormatted() for string types (UTF16 and UTF8) + + [EditorBrowsable(EditorBrowsableState.Never)] + public void AppendFormatted(String8 value, int alignment = 0, string? format = null) // no custom format, but we still declare the overload for compatibility + { + SharedStorage.Append(ref _bytes, value.AsSpan(), alignment); + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public void AppendFormatted(String16 value, int alignment = 0, string? format = null) // no custom format, but we still declare the overload for compatibility + { + SharedStorage.Append(ref _bytes, value.AsSpan(), alignment); + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public void AppendFormatted(scoped ReadOnlySpan value, int alignment = 0, string? format = null) // no custom format, but we still declare the overload for compatibility + { + SharedStorage.Append(ref _bytes, value, alignment); + } + + /// This assumes that value is a UTF8 string, rather than actual binary bytes... + /// TODO: we could use a format string to disambiguate? Also see Utf8.IsValid(value) + [EditorBrowsable(EditorBrowsableState.Never)] + [OverloadResolutionPriority(1)] // disambiguates holes convertible to both ROS and ImString; both fold via Absorb + public void AppendFormatted(scoped ReadOnlySpan value, int alignment = 0, string? format = null) // no custom format, but we still declare the overload for compatibility + { + SharedStorage.Absorb(ref _bytes, value, alignment); + } + + #endregion + + /// Kitchen-sink formatting through / . + [EditorBrowsable(EditorBrowsableState.Never)] + public void AppendFormatted(T value, int alignment = 0, string? format = null) + { + SharedStorage.Append(ref _bytes, value, alignment, format); + } + + #region nested interpolation + + /// Nested interpolation ctor for + [EditorBrowsable(EditorBrowsableState.Never)] + public ImString(int literalLength, int formattedCount, ImString parent) + { + _bytes = parent._bytes[^0..]; // continue the parent's chunk + } + + /// Folds an ImString hole - a nested $"..." written through our chunk, or any other value - into this chunk. + [EditorBrowsable(EditorBrowsableState.Never)] + public void AppendFormatted( + [InterpolatedStringHandlerArgument("")] scoped ImString value, + int alignment = 0, + string? format = null + ) + { + SharedStorage.Absorb(ref _bytes, value._bytes, alignment); + } + + #endregion +} diff --git a/Brutal.ImGui/ImString/ImString.ToString.cs b/Brutal.ImGui/ImString/ImString.ToString.cs new file mode 100644 index 0000000..22e43b4 --- /dev/null +++ b/Brutal.ImGui/ImString/ImString.ToString.cs @@ -0,0 +1,42 @@ +namespace Brutal.ImGuiApi; + +public ref partial struct ImString +{ + /* + * This partial provides helpers to interface with APIs that take regular C# strings. + * Ideally should be removed in a stricter implementation, to avoid accidental conversions. + * Also, the StringPool dictionary is naive, leaks etc. + */ + + // TODO: I would like to make the string conversion operator explicit, + // unfortunately it is necessary to support ImString inside DefaultInterpolatedStringHandler... + public static implicit operator string(in ImString s) => s.ToString(); + + private class StringPool + { + private readonly Dictionary _utf8ToString = new(); + + public string ToString(ReadOnlySpan bytes) + { + var hash = new HashCode(); + hash.AddBytes(bytes); + var key = hash.ToHashCode(); + if (!_utf8ToString.TryGetValue(key, out var toString)) + { + toString = Utf8.GetString(bytes); + _utf8ToString.Add(key, toString); + } + return toString; + } + } + + private static readonly StringPool SharedStringPool = new(); + public static bool CacheToString = true; + + public override string ToString() + { + if (!CacheToString) + return Utf8.GetString(_bytes); + return SharedStringPool.ToString(_bytes); + } +} diff --git a/Brutal.ImGui/ImString/ImString.cs b/Brutal.ImGui/ImString/ImString.cs new file mode 100644 index 0000000..84ebbbd --- /dev/null +++ b/Brutal.ImGui/ImString/ImString.cs @@ -0,0 +1,126 @@ +using System.Buffers; +using Brutal.Localization; + +namespace Brutal.ImGuiApi; + +/// A UTF8 ref-string, for passing to ImGui API. +/// Allocated in an arena buffer -> life-span of one frame (or less), cannot be retained. +public ref partial struct ImString : IUtf8SpanFormattable, ISpanFormattable, INullable +{ + public class Storage(int capacity) : ArenaStringBuilder(capacity) + { + // TODO: mark [Obsolete] / replace with ImString.Clear() + public void Reset() => Clear(); + } + + public static readonly Storage SharedStorage = new(8 * 1024 * 1024); + + private ReadOnlySpan _bytes; + + public ImString(ReadOnlySpan value) + { + _bytes = value; // avoid copying UTF8 literals + } + + public ImString(ReadOnlySpan value, bool copy) + { + _bytes = copy ? SharedStorage.Append(value) : value; + } + + public ImString(ReadOnlySpan value) + { + _bytes = SharedStorage.Append(value); + } + + public static implicit operator ImString(ReadOnlySpan value) => new(value); + + public static implicit operator ImString(Span value) => new(value); + + public static implicit operator ImString(ReadOnlySpan value) => new(value); + + public static implicit operator ImString(Span value) => new(value); + + public static implicit operator ImString(string value) => new(value); + + public static implicit operator ImString(String8 value) => new(value, true); // String8 isn't fixed, so we need to copy it + + public static implicit operator ImString(RefString8 value) => new(value.AsSpan()); + + public static implicit operator ImString(LString value) => new(value.Format()); + + public static implicit operator ImString(Ptr value) => new(Utf8.GetNullTerminatedSpan(value)); + + public static implicit operator ReadOnlySpan(in ImString s) => s._bytes; + + public readonly ReadOnlySpan AsSpan() => _bytes; + + /// for PInvoke + public ref readonly byte GetPinnableReference() => ref MemoryMarshal.GetReference(_bytes); + + /// Convert to UTF16 + public readonly Span GetChars(Span chars) + { + var len = Utf8.GetChars(_bytes, chars); + return chars[..len]; + } + + private static byte _forceNull; + + /// Used to distinguish between "unset" vs "set to null" in optional arguments. + public static ImString Null => new ReadOnlySpan(ref _forceNull)[..0]; + + /// Returns a null-terminated empty string. + public static ImString Empty => ""u8; + + /// Was a value set? Used to distinguish between "unset" vs "set to null" in optional arguments. + public readonly bool IsSet => !_bytes.IsNull(); + + /// Was a value set? Used to distinguish between "unset" vs "set to null" in optional arguments. + public readonly bool IsUnset => _bytes.IsNull(); + + /// Whether this represents a null string rather than an empty string. + /// Technically "IsDefault", but "IsNull" seems more intuitive. + public readonly bool IsNull() => _bytes.IsNull() || _bytes == Null; + + public readonly bool IsEmpty => _bytes.IsEmpty; + + // TODO: ensure byte count is always accurate / detect null-terminated byte spans + // TODO: evaluate character count vs byte count + public readonly int Length => _bytes.Length; + + #region IUtf8SpanFormattable, ISpanFormattable, IFormattable + + /// IUtf8SpanFormattable implementation + public bool TryFormat( + Span utf8Destination, + out int bytesWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + { + if (_bytes.TryCopyTo(utf8Destination)) + { + bytesWritten = _bytes.Length; + return true; + } + + bytesWritten = 0; + return false; + } + + /// ISpanFormattable implementation + public bool TryFormat( + Span utf16Destination, + out int charsWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + { + return Utf8.ToUtf16(_bytes, utf16Destination, out _, out charsWritten) != OperationStatus.Done; + } + + /// IFormattable implementation - useless but required for ISpanFormattable + string IFormattable.ToString(string? format, IFormatProvider? formatProvider) => ToString(); + + #endregion +} diff --git a/Brutal.ImGui/ImString/InteropExtensions.cs b/Brutal.ImGui/ImString/InteropExtensions.cs new file mode 100644 index 0000000..8f907bd --- /dev/null +++ b/Brutal.ImGui/ImString/InteropExtensions.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi; + +static class InteropExtensions +{ + /// Whether this span is unset rather than empty. + /// Technically "IsDefault", but "IsNull" seems more intuitive. + public static unsafe bool IsNull(in this ReadOnlySpan span) + where T : unmanaged + { + ref var spanRef = ref MemoryMarshal.GetReference(span); + fixed (T* spanPtr = &spanRef) + return spanPtr == null; + } + + /// + public static unsafe bool IsNull(in this Span span) + where T : unmanaged + { + ref var spanRef = ref MemoryMarshal.GetReference(span); + fixed (T* spanPtr = &spanRef) + return spanPtr == null; + } +} diff --git a/Brutal.ImGui/LICENSES/BRUTAL-IMGUI-THIRD-PARTY-NOTICES.txt b/Brutal.ImGui/LICENSES/BRUTAL-IMGUI-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..b3cd102 --- /dev/null +++ b/Brutal.ImGui/LICENSES/BRUTAL-IMGUI-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,175 @@ +THIRD-PARTY LICENSE NOTICES +The Brutal.ImGui packages + +This file ships in all eight packages named below. They redistribute the third-party +components listed here, each reproduced with the license that governs it. + + One file serves all eight packages, so this table says which components apply to + the package you are holding: + + RocketWerkz.Brutal.ImGui Dear ImGui, and the three stb libraries + compiled into it + RocketWerkz.Brutal.ImGui.Backends Dear ImGui's platform and renderer + backends, translated to C# + RocketWerkz.Brutal.ImGui.DemoWindow Dear ImGui's demo sources, translated + to C# + RocketWerkz.Brutal.ImGui.FreeType Dear ImGui's FreeType font adapter + RocketWerkz.Brutal.ImPlot ImPlot + RocketWerkz.Brutal.ImPlot.DemoWindow ImPlot's demo sources, translated to C# + RocketWerkz.Brutal.ImGui.Abstractions no third-party code + RocketWerkz.Brutal.ImGui.Extensions no third-party code + + Where a package ships native libraries, it ships them for every runtime identifier + it supports (win-x64, linux-x64, osx-arm64): + + Dear ImGui 1.92.2 imgui.dll / libimgui.so / libimgui.dylib + imgui_freetype.dll / libimgui_freetype.so / libimgui_freetype.dylib + ImPlot 0.17 implot.dll / libimplot.so / libimplot.dylib + + Dear ImGui vendors three of Sean Barrett's stb libraries, and all three are + compiled into the Dear ImGui binaries shipped here. They have their own section + below. + + The managed assemblies are in scope as well as the native libraries. Type names, + enumerant values and entry-point signatures are generated from the corresponding + upstream headers, and the backend and demo assemblies are C# translations of + upstream sources. + + RocketWerkz.Brutal.ImGui.FreeType binds Dear ImGui's FreeType font adapter, which + is Dear ImGui code and is covered by the Dear ImGui section below. FreeType itself + is in none of these eight packages; it is supplied by RocketWerkz.Brutal.FreeType, + whose own notices reproduce the FreeType License in full. + + +============================================================================== +Dear ImGui +============================================================================== + + Name Dear ImGui + Version 1.92.2, docking branch + Upstream https://github.com/ocornut/imgui + SPDX MIT + + Built from a RocketWerkz fork of the docking branch. The modifications are ours + and do not alter the terms below, which are reproduced from the copy these + packages were built from. + + This component covers the imgui and imgui_freetype native libraries, the managed + bindings generated from Dear ImGui's headers, and the C# translations of Dear + ImGui's backend and demo sources. + +The MIT License (MIT) + +Copyright (c) 2014-2025 Omar Cornut + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +============================================================================== +stb +============================================================================== + + Name stb_rect_pack, stb_textedit, stb_truetype + Version 1.01, 1.14, 1.26 respectively + Upstream https://github.com/nothings/stb + SPDX MIT OR Unlicense + + Vendored by Dear ImGui as imstb_rectpack.h, imstb_textedit.h and + imstb_truetype.h, and compiled into the Dear ImGui native libraries shipped + here. All three carry the same dual license, which offers a choice between + the MIT License and release into the public domain. It is reproduced once + below, from the copy these packages were built from. + +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ + + +============================================================================== +ImPlot +============================================================================== + + Name ImPlot + Version 0.17, upstream commit 3da8bd3 (26 commits after tag v0.16) + Upstream https://github.com/epezent/implot + SPDX MIT + + ImPlot is a plotting extension for Dear ImGui. Its version is the one ImPlot + reports for itself; the commit is given because upstream had not tagged 0.17 when + these packages were built. + + This component covers the implot native library, the managed bindings generated + from ImPlot's headers, and the C# translation of ImPlot's demo sources. + +MIT License + +Copyright (c) 2020 Evan Pezent + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Brutal.ImGui/Manual/Functions/ImDrawList.cs b/Brutal.ImGui/Manual/Functions/ImDrawList.cs new file mode 100644 index 0000000..fe5aef9 --- /dev/null +++ b/Brutal.ImGui/Manual/Functions/ImDrawList.cs @@ -0,0 +1,120 @@ +namespace Brutal.ImGuiApi; + +public static partial class ImDrawListExtensions +{ + /// + /// Image primitives + /// - Read FAQ to understand what ImTextureID/ImTextureRef are. + /// - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. + /// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. + /// + /// imgui.h:3407 + ///
+ /// void AddImage(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min = ImVec2(0, 0), const ImVec2& uv_max = ImVec2(1, 1), ImU32 col = IM_COL32_WHITE) + public static void AddImage( + this ImDrawListPtr target, + ImTextureRef texRef, + in float2 pMin, + in float2 pMax, + in float2? uvMin = default, + in float2? uvMax = default, + ImColor8? col = default + ) + { + unsafe + { + var uvMin_default = uvMin ?? new float2(0f, 0f); + var uvMax_default = uvMax ?? new float2(1f, 1f); + var col_default = col ?? new byte4(255); + fixed (float2* pMax_fixed = &pMax) + fixed (float2* pMin_fixed = &pMin) + { + ImGui.PInvoke.ImDrawList_AddImage( + target, + texRef, + pMin_fixed, + pMax_fixed, + &uvMin_default, + &uvMax_default, + col_default + ); + } + } + } + + /// + /// Image primitives + /// - Read FAQ to understand what ImTextureID/ImTextureRef are. + /// - "p_min" and "p_max" represent the upper-left and lower-right corners of the rectangle. + /// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. + /// + /// imgui.h:3408 + ///
+ /// void AddImageQuad(ImTextureRef tex_ref, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1 = ImVec2(0, 0), const ImVec2& uv2 = ImVec2(1, 0), const ImVec2& uv3 = ImVec2(1, 1), const ImVec2& uv4 = ImVec2(0, 1), ImU32 col = IM_COL32_WHITE) + public static void AddImageQuad( + this ImDrawListPtr target, + ImTextureRef texRef, + in float2 p1, + in float2 p2, + in float2 p3, + in float2 p4, + in float2? uv1 = default, + in float2? uv2 = default, + in float2? uv3 = default, + in float2? uv4 = default, + ImColor8? col = default + ) + { + unsafe + { + var uv1_default = uv1 ?? new float2(0f, 0f); + var uv2_default = uv2 ?? new float2(1f, 0f); + var uv3_default = uv3 ?? new float2(1f, 1f); + var uv4_default = uv4 ?? new float2(0f, 1f); + var col_default = col ?? new byte4(255); + fixed (float2* p4_fixed = &p4) + fixed (float2* p3_fixed = &p3) + fixed (float2* p2_fixed = &p2) + fixed (float2* p1_fixed = &p1) + { + ImGui.PInvoke.ImDrawList_AddImageQuad( + target, + texRef, + p1_fixed, + p2_fixed, + p3_fixed, + p4_fixed, + &uv1_default, + &uv2_default, + &uv3_default, + &uv4_default, + col_default + ); + } + } + } + + /// + /// Advanced: Draw Callbacks + /// - May be used to alter render state (change sampler, blending, current shader). + /// - May be used to emit custom rendering commands (difficult to do correctly, but possible). + /// - Use special ImDrawCallback_ResetRenderState callback to instruct backend to reset its render state to the default. + /// - Your rendering loop must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles. (All standard backends are honoring this.) + /// + /// + /// User data is copied to a backing buffer by ImGui internals, and the callback points to the copy for user data + /// + public static unsafe void AddCallback(this ImDrawListPtr target, ImDrawCallback callback, in T userData) + where T : unmanaged + { + fixed (void* ptr = &userData) + { + PInvoke.ImDrawList_AddCallback( + target, + Marshal.GetFunctionPointerForDelegate(callback), + ptr, + (UIntPtr)ByteSize.Of() + ); + } + } +} diff --git a/Brutal.ImGui/Manual/Functions/ImGui.Text.cs b/Brutal.ImGui/Manual/Functions/ImGui.Text.cs new file mode 100644 index 0000000..ced330a --- /dev/null +++ b/Brutal.ImGui/Manual/Functions/ImGui.Text.cs @@ -0,0 +1,45 @@ +namespace Brutal.ImGuiApi; + +public partial class ImGui +{ + // Manually wrap PInvoke.TextUnformatted() as Managed.Text(), as rules don't have renaming support. + + /// + /// raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text. + /// + /// C++: imgui.h:614, imgui_widgets.cpp:268 + ///
+ /// void TextUnformatted(const char* text, const char* text_end = NULL) + ///
+ ///
+ /// Widgets: Text + public static void Text(ImString text) + { + unsafe + { + fixed (byte* text_fixed = text) + { + PInvoke.TextUnformatted(text_fixed, null); + } + } + } + + public partial class Internal + { + /// + /// + /// C++: imgui.h:616, imgui_widgets.cpp:281 + ///
+ /// void TextV(const char* fmt, va_list args) IM_FMTLIST(1) + ///
+ ///
+ /// Uses C++/printf-style formatting: %d, %f etc. + ///
C# has better options, but this could be useful for compatibility, porting C++ code etc.
+ public static unsafe void TextFormatted(ImString fmt, params ReadOnlySpan args) + { + fixed (byte* fmt_fixed = fmt) + fixed (byte* vaList_fixed = VaList.Pack(stackalloc byte[VaList.GetSize(args)], args)) + PInvoke.TextV(fmt_fixed, vaList_fixed); + } + } +} diff --git a/Brutal.ImGui/Manual/Functions/ImGui.cs b/Brutal.ImGui/Manual/Functions/ImGui.cs new file mode 100644 index 0000000..82c2517 --- /dev/null +++ b/Brutal.ImGui/Manual/Functions/ImGui.cs @@ -0,0 +1,385 @@ +using System.Buffers; +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi; + +/* + * NOTE: we want ImGui non-static to allow extensions -> make it abstract instead + * (static == abstract sealed, so we just don't seal it). + * + * If we want to roll back on that decision, this is the only place we should add `static`, + * (ie not in the dozens of auto-generated files). + */ +public abstract partial class ImGui +{ + /// + public static void LoadIniSettingsFromMemory(ImString iniData) + { + unsafe + { + fixed (byte* iniData_fixed = iniData) + { + PInvoke.LoadIniSettingsFromMemory(iniData_fixed, (nuint)iniData.Length); + } + } + } + + /// + public static ImString SaveIniSettingsToMemory() + { + unsafe + { + nuint outIniSize; + var resultPtr = PInvoke.SaveIniSettingsToMemory(&outIniSize); + return new ReadOnlySpan(resultPtr, (int)outIniSize); + } + } + + /// + public static unsafe bool Combo( + ImString label, + ref int currentItem, + ReadOnlySpan> items, + int popupMaxHeightInItems = -1 + ) + { + fixed (Ptr* pointers = items) + fixed (int* currentItem_fixed = ¤tItem) + fixed (byte* label_fixed = label) + { + return PInvoke.Combo_0( + label_fixed, + currentItem_fixed, + (byte**)pointers, + items.Length, + popupMaxHeightInItems + ); + } + } + + /// + public static unsafe bool Combo( + ImString label, + ref int currentItem, + scoped RefString8Array items, + int popupMaxHeightInItems = -1 + ) + { + try + { + fixed (byte* bytePtr = items) + { + fixed (int* currentItem_fixed = ¤tItem) + fixed (byte* label_fixed = label) + { + return PInvoke.Combo_0( + label_fixed, + currentItem_fixed, + items.CommitFixedRegion(bytePtr), + items.Length, + popupMaxHeightInItems + ); + } + } + } + finally + { + items.Dispose(); + } + } + + /// + public static unsafe bool ListBox( + ImString label, + ref int currentItem, + ReadOnlySpan> items, + int heightInItems = -1 + ) + { + fixed (Ptr* test = items) + fixed (int* currentItem_fixed = ¤tItem) + fixed (byte* label_fixed = label) + { + return PInvoke.ListBox_0(label_fixed, currentItem_fixed, (byte**)test, items.Length, heightInItems); + } + } + + /// + public static unsafe bool ListBox( + ImString label, + ref int currentItem, + scoped RefString8Array items, + int heightInItems = -1 + ) + { + try + { + fixed (byte* bytePtr = items) + { + fixed (int* currentItem_fixed = ¤tItem) + fixed (byte* label_fixed = label) + { + return PInvoke.ListBox_0( + label_fixed, + currentItem_fixed, + items.CommitFixedRegion(bytePtr), + items.Length, + heightInItems + ); + } + } + } + finally + { + items.Dispose(); + } + } + + /// + public static unsafe bool InputText( + ImString label, + ImInputString buffer, + ImGuiInputTextFlags flags = default, + ImGuiInputTextCallback? callback = null, + nint userData = 0 + ) + { + fixed (byte* buffer_fixed = buffer.Buffer) + fixed (byte* label_fixed = label) + { + var result = PInvoke.InputText( + label_fixed, + buffer_fixed, + (nuint)buffer.Capacity, + flags, + callback is null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + (void*)userData + ); + + if (result) + buffer.EvaluateLength(); + + return result; + } + } + + /// + public static unsafe bool InputTextMultiline( + ImString label, + ImInputString buffer, + in float2 size = default, + ImGuiInputTextFlags flags = default, + ImGuiInputTextCallback? callback = null, + nint userData = 0 + ) + { + fixed (byte* buffer_fixed = buffer.Buffer) + fixed (float2* size_fixed = &size) + fixed (byte* label_fixed = label) + { + var result = PInvoke.InputTextMultiline( + label_fixed, + buffer_fixed, + (nuint)buffer.Capacity, + size_fixed, + flags, + callback is null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + (void*)userData + ); + + if (result) + buffer.EvaluateLength(); + + return result; + } + } + + /// + public static unsafe bool InputTextWithHint( + ImString label, + ImString hint, + ImInputString buffer, + ImGuiInputTextFlags flags = default, + ImGuiInputTextCallback? callback = null, + nint userData = 0 + ) + { + fixed (byte* buffer_fixed = buffer.Buffer) + fixed (byte* hint_fixed = hint) + fixed (byte* label_fixed = label) + { + var result = PInvoke.InputTextWithHint( + label_fixed, + hint_fixed, + buffer_fixed, + (nuint)buffer.Capacity, + flags, + callback is null ? 0 : Marshal.GetFunctionPointerForDelegate(callback), + (void*)userData + ); + + if (result) + buffer.EvaluateLength(); + + return result; + } + } + + /// + public static unsafe void GetAllocatorFunctions( + out ImGuiMemAllocFunc? pAllocFunc, + out ImGuiMemFreeFunc? pFreeFunc, + out nint pUserData + ) + { + nint pAllocFunc_value = 0; + nint pFreeFunc_value = 0; + + fixed (nint* pUserData_ptr = &pUserData) + { + PInvoke.GetAllocatorFunctions(&pAllocFunc_value, &pFreeFunc_value, (void**)pUserData_ptr); + } + + pAllocFunc = pAllocFunc_value is 0 + ? null + : Marshal.GetDelegateForFunctionPointer(pAllocFunc_value); + + pFreeFunc = pFreeFunc_value is 0 + ? null + : Marshal.GetDelegateForFunctionPointer(pFreeFunc_value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate byte* ComboGetter(nint userData, int idx); + + /// + public static bool Combo( + ImString label, + ref int currentItem, + ComboGetter getter, + nint userData, + int itemsCount, + int popupMaxHeightInItems = -1 + ) + { + unsafe + { + fixed (int* currentItem_fixed = ¤tItem) + fixed (byte* label_fixed = label) + { + return PInvoke.Combo_2( + label_fixed, + currentItem_fixed, + Marshal.GetFunctionPointerForDelegate(getter), + (void*)userData, + itemsCount, + popupMaxHeightInItems + ); + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate byte* ListBoxGetter(nint userData, int idx); + + /// + public static bool ListBox( + ImString label, + ref int currentItem, + ListBoxGetter getter, + nint userData, + int itemsCount, + int heightInItems = -1 + ) + { + unsafe + { + fixed (int* currentItem_fixed = ¤tItem) + fixed (byte* label_fixed = label) + { + return PInvoke.ListBox_1( + label_fixed, + currentItem_fixed, + Marshal.GetFunctionPointerForDelegate(getter), + (void*)userData, + itemsCount, + heightInItems + ); + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate float PlotLinesValuesGetter(nint data, int idx); + + /// + public static void PlotLines( + ImString label, + PlotLinesValuesGetter valuesGetter, + nint data, + int valuesCount, + int valuesOffset = 0, + ImString overlayText = default, + float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, + float2? graphSize = default + ) + { + unsafe + { + var graphSize_default = graphSize ?? new float2(0f, 0f); + fixed (byte* overlayText_fixed = overlayText) + fixed (byte* label_fixed = label) + { + PInvoke.PlotLines_1( + label_fixed, + Marshal.GetFunctionPointerForDelegate(valuesGetter), + (void*)data, + valuesCount, + valuesOffset, + overlayText_fixed, + scaleMin, + scaleMax, + graphSize_default + ); + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate float PlotHistogramValuesGetter(nint data, int idx); + + /// + public static void PlotHistogram( + ImString label, + PlotHistogramValuesGetter valuesGetter, + nint data, + int valuesCount, + int valuesOffset = 0, + ImString overlayText = default, + float scaleMin = float.MaxValue, + float scaleMax = float.MaxValue, + float2? graphSize = default + ) + { + unsafe + { + var graphSize_default = graphSize ?? new float2(0f, 0f); + fixed (byte* overlayText_fixed = overlayText) + fixed (byte* label_fixed = label) + { + PInvoke.PlotHistogram_1( + label_fixed, + Marshal.GetFunctionPointerForDelegate(valuesGetter), + (void*)data, + valuesCount, + valuesOffset, + overlayText_fixed, + scaleMin, + scaleMax, + graphSize_default + ); + } + } + } +} diff --git a/Brutal.ImGui/Manual/Handles/ImDrawListSharedData.cs b/Brutal.ImGui/Manual/Handles/ImDrawListSharedData.cs new file mode 100644 index 0000000..69533f8 --- /dev/null +++ b/Brutal.ImGui/Manual/Handles/ImDrawListSharedData.cs @@ -0,0 +1,17 @@ +namespace Brutal.ImGuiApi; + +public record struct ImDrawListSharedData; + +public readonly unsafe struct ImDrawListSharedDataPtr(ImDrawListSharedData* value) : INullable +{ + private readonly ImDrawListSharedData* _value = value; + + public bool IsNull() + { + return _value == null; + } + + public static implicit operator ImDrawListSharedDataPtr(ImDrawListSharedData* value) => new(value); + + public static implicit operator ImDrawListSharedData*(ImDrawListSharedDataPtr wrapper) => wrapper._value; +} diff --git a/Brutal.ImGui/Manual/ImAssert.cs b/Brutal.ImGui/Manual/ImAssert.cs new file mode 100644 index 0000000..af5c550 --- /dev/null +++ b/Brutal.ImGui/Manual/ImAssert.cs @@ -0,0 +1,15 @@ +namespace Brutal.ImGuiApi; + +public class ImException(string message) : Exception(message); + +public partial class ImGui +{ + /// + /// This is an equivalent of the IM_ASSERT C++ macro, intended for similar validation in ported code. + /// + public static void Assert(bool condition, string? message = null) + { + if (!condition) + throw new ImException(message ?? "Assertion failed"); + } +} diff --git a/Brutal.ImGui/Manual/ImColor8.cs b/Brutal.ImGui/Manual/ImColor8.cs new file mode 100644 index 0000000..4191faa --- /dev/null +++ b/Brutal.ImGui/Manual/ImColor8.cs @@ -0,0 +1,77 @@ +namespace Brutal.ImGuiApi; + +// TODO: byte4 converts implicitly to uint... so why not from uint as well? + +/// +/// 8-bit per channel color, for interop. +/// Converts to/from uint, byte4, and float4. +/// +public struct ImColor8 +{ + private byte4 _value; + + private ImColor8(uint value) + { + _value = Unsafe.As(ref value); + } + + private ImColor8(byte4 value) + { + _value = value; + } + + private ImColor8(float4 value) + { + _value = byte4.Pack(value, Pack.Float.Normalize); + } + + public ImColor8(byte r, byte g, byte b, byte a = 255) + : this(new byte4(r, g, b, a)) { } + + public static implicit operator ImColor8(in uint value) => new(value); + + public static implicit operator ImColor8(in byte4 value) => new(value); + + public static explicit operator ImColor8(in float4 value) => new(value); + + public static implicit operator ImColor8(in Color.Preset value) => new(value.AsByte4); + + public static implicit operator ImColor8(in ImGuiCol value) => ImGui.GetColorU32(value); + + // TODO: this is just here to make PInvoke easier but I don't like it... + public static implicit operator uint(in ImColor8 value) => value._value; + + //public static implicit operator byte4(in ImColor8 value) => value._value; + + public readonly uint AsUint() => _value; + + public readonly byte4 AsByte4() => _value; + + public readonly float4 AsFloat4() + { + float4 result; + result.X = _value.X / 255f; + result.Y = _value.Y / 255f; + result.Z = _value.Z / 255f; + result.W = _value.W / 255f; + return result; + } + + public ImColor8 RGBA + { + get => _value.RGBA; + set => _value.RGBA = value._value.RGBA; + } + + public ImColor8 ARGB + { + get => _value.ARGB; + set => _value.ARGB = value._value.ARGB; + } + + public static readonly ImColor8 Black = new(0, 0, 0); + public static readonly ImColor8 White = new(255, 255, 255); + public static readonly ImColor8 Red = new(255, 0, 0); + public static readonly ImColor8 Green = new(0, 255, 0); + public static readonly ImColor8 Blue = new(0, 0, 255); +} diff --git a/Brutal.ImGui/Manual/ImGui.Internal.cs b/Brutal.ImGui/Manual/ImGui.Internal.cs new file mode 100644 index 0000000..8ac25f0 --- /dev/null +++ b/Brutal.ImGui/Manual/ImGui.Internal.cs @@ -0,0 +1,15 @@ +namespace Brutal.ImGuiApi +{ + public abstract partial class ImGui + { + public abstract partial class Internal : Brutal.ImGuiApi.ImGui + { + public new abstract class PInvoke : Brutal.ImGuiApi.Internal.PInvoke; + } + } +} + +namespace Brutal.ImGuiApi.Internal +{ + public abstract partial class PInvoke : Brutal.ImGuiApi.ImGui.PInvoke; +} diff --git a/Brutal.ImGui/Manual/ImGuiCpp.cs b/Brutal.ImGui/Manual/ImGuiCpp.cs new file mode 100644 index 0000000..cbb658c --- /dev/null +++ b/Brutal.ImGui/Manual/ImGuiCpp.cs @@ -0,0 +1,118 @@ +namespace Brutal.ImGuiApi; + +/* + * These types are only forward declared in headers, defined in imgui.cpp but used in imgui_internal.h structs + */ + +public enum ImGuiDockRequestType +{ + None = 0, + Dock, + Undock, + Split, // Split is the same as Dock but without a DockPayload +} + +[StructLayout(LayoutKind.Explicit, Size = 64)] +public struct ImGuiDockRequest() +{ + [FieldOffset(0)] + public ImGuiDockRequestType Type; + + [FieldOffset(8)] + public Ptr DockTargetWindow; // Destination/Target Window to dock into (may be a loose window or a DockNode, might be NULL in which case DockTargetNode cannot be NULL) + + [FieldOffset(16)] + public Ptr DockTargetNode; // Destination/Target Node to dock into + + [FieldOffset(24)] + public Ptr DockPayload; // Source/Payload window to dock (may be a loose window or a DockNode), [Optional] + + [FieldOffset(32)] + public ImGuiDir DockSplitDir; + + [FieldOffset(36)] + public float DockSplitRatio = 0.5f; + + [FieldOffset(40)] + public Bool8 DockSplitOuter; + + [FieldOffset(48)] + public Ptr UndockTargetWindow; + + [FieldOffset(56)] + public Ptr UndockTargetNode; +} + +[InlineArray((int)ImGuiDir.COUNT + 1)] +public struct ImGuiDockPreviewData_DockRectsDraw +{ + public floatRect Value; +} + +[StructLayout(LayoutKind.Explicit, Size = 312)] +public struct ImGuiDockPreviewData +{ + [FieldOffset(0)] + public ImGuiDockNode FutureNode; + + [FieldOffset(208)] + public Bool8 IsDropAllowed; + + [FieldOffset(209)] + public Bool8 IsCenterAvailable; + + [FieldOffset(210)] + public Bool8 IsSidesAvailable; // Hold your breath, grammar freaks.. + + [FieldOffset(211)] + public Bool8 IsSplitDirExplicit; // Set when hovered the drop rect (vs. implicit SplitDir==None when hovered the window) + + [FieldOffset(216)] + public Ptr SplitNode; + + [FieldOffset(224)] + public ImGuiDir SplitDir; + + [FieldOffset(228)] + public float SplitRatio; + + [FieldOffset(232)] + public ImGuiDockPreviewData_DockRectsDraw DropRectsDraw; // May be slightly different from hit-testing drop rects used in DockNodeCalcDropRects() + + // TODO: Init DropRectsDraw as per constructor defaults +} + +// Persistent Settings data, stored contiguously in SettingsNodes (sizeof() ~32 bytes) +[StructLayout(LayoutKind.Explicit, Size = 36)] +public struct ImGuiDockNodeSettings +{ + [FieldOffset(0)] + public ImGuiID ID; + + [FieldOffset(4)] + public ImGuiID ParentNodeId; + + [FieldOffset(8)] + public ImGuiID ParentWindowId; + + [FieldOffset(12)] + public ImGuiID SelectedTabId; + + [FieldOffset(16)] + public sbyte SplitAxis; + + [FieldOffset(17)] + public byte Depth; + + [FieldOffset(20)] + public ImGuiDockNodeFlags Flags; // NB: We save individual flags one by one in ascii format (ImGuiDockNodeFlags_SavedFlagsMask_) + + [FieldOffset(24)] + public short2 Pos; + + [FieldOffset(28)] + public short2 Size; + + [FieldOffset(32)] + public short2 SizeRef; +} diff --git a/Brutal.ImGui/Manual/ImVector.cs b/Brutal.ImGui/Manual/ImVector.cs new file mode 100644 index 0000000..6059b66 --- /dev/null +++ b/Brutal.ImGui/Manual/ImVector.cs @@ -0,0 +1,226 @@ +using System.Collections; +using Brutal.Memory; + +namespace Brutal.ImGuiApi; + +[StructLayout(LayoutKind.Sequential)] +public struct ImVector : IList + where T : unmanaged +{ + private const int DEFAULT_CAPACITY = 8; + + private int _size; + private int _capacity; + private Ptr _data; + + public int Count + { + get => _size; + set + { + ArgumentOutOfRangeException.ThrowIfNegative(value); + + if (value == _size) + return; + + EnsureCapacity(value); + + if (value > _size) + { + Mem.Clear(Data.Offset(_size), ElementCount.Of(value - _size)); + } + + _size = value; + } + } + + public int Capacity => _capacity; + + public unsafe void EnsureCapacity(int capacity) + { + if (capacity <= _capacity) + return; + + var newCapacity = GetGrownCapacity(capacity); + + var newData = (T*)ImGui.MemAlloc((nuint)newCapacity * (nuint)Stride); + + if (_data.IsNotNull()) + { + Mem.Copy(_data, newData, _size); + ImGui.MemFree(_data.Pointer); + } + + _data = new Ptr(newData); + _capacity = newCapacity; + } + + public Ptr Data => _data; + public unsafe T* DataRaw => _data; + public Span Span => _data.AsSpan(_size); + + public T this[int i] + { + get + { + ArgumentOutOfRangeException.ThrowIfNegative(i); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(i, _size); + + return Data[i]; + } + set + { + ArgumentOutOfRangeException.ThrowIfNegative(i); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(i, _size); + + Data[i] = value; + } + } + + public int IndexOf(T item) + { + return Span.IndexOf(item); + } + + public void Insert(int index, T item) + { + ArgumentOutOfRangeException.ThrowIfNegative(index); + ArgumentOutOfRangeException.ThrowIfGreaterThan(index, _size); + + EnsureCapacity(_size + 1); + + // Shift elements right to open a slot; Mem.Copy has memmove semantics, so the overlapping + // copy is safe. + if (index < _size) + Mem.Copy(Data.Offset(index), Data.Offset(index + 1), _size - index); + + Data[index] = item; + + _size++; + } + + public void RemoveAt(int index) + { + ArgumentOutOfRangeException.ThrowIfNegative(index); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _size); + + _size--; + if (index < _size) + { + // Shift elements left over the removed slot; Mem.Copy has memmove semantics, so the + // overlapping copy is safe. + Mem.Copy(Data.Offset(index + 1), Data.Offset(index), _size - index); + } + } + + // Pattern-based GetEnumerator to enable foreach without boxing + public unsafe ImVectorEnumerator GetEnumerator() => new(Data, _size); + + IEnumerator IEnumerable.GetEnumerator() + { + unsafe + { + return new ImVectorEnumerator(Data, _size); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureCapacity(_size + 1); + Data[_size] = item; + _size++; + } + + public unsafe void Clear() + { + if (_data.IsNull()) + return; + + _size = _capacity = 0; + ImGui.MemFree(_data.Pointer); + _data = null; + } + + /// Resets the count to zero but keeps the allocated buffer so we can re-use it without freeing/allocating + public void Reset() => _size = 0; + + public bool Contains(T item) + { + return IndexOf(item) >= 0; + } + + public void CopyTo(T[] array, int arrayIndex) + { + unsafe + { + fixed (T* ptr = array) + { + Mem.Copy(Data, ptr + arrayIndex, _size); + } + } + } + + public bool Remove(T item) + { + var index = IndexOf(item); + if (index < 0) + return false; + + RemoveAt(index); + return true; + } + + public bool IsReadOnly => false; + + private static unsafe int Stride => sizeof(T); + + private readonly int GetGrownCapacity(int requiredCapacity) + { + var newCapacity = _capacity is 0 ? DEFAULT_CAPACITY : _capacity + _capacity / 2; + return newCapacity > requiredCapacity ? newCapacity : requiredCapacity; + } +} + +public struct ImVectorEnumerator : IEnumerator + where T : unmanaged +{ + private readonly unsafe T* _start; + private readonly int _length; + private int _index; + + public unsafe ImVectorEnumerator(T* start, int length) + { + _start = start; + _length = length; + _index = -1; + } + + public bool MoveNext() + { + var i = _index + 1; + + if ((uint)i < (uint)_length) + { + _index = i; + return true; + } + + return false; + } + + public void Reset() + { + _index = -1; + } + + public unsafe T Current => _start[_index]; + + object IEnumerator.Current => Current; + + public void Dispose() { } +} diff --git a/Brutal.ImGui/Manual/Interop.cs b/Brutal.ImGui/Manual/Interop.cs new file mode 100644 index 0000000..ff3e197 --- /dev/null +++ b/Brutal.ImGui/Manual/Interop.cs @@ -0,0 +1,40 @@ +using System.Diagnostics; +using System.Reflection; + +namespace Brutal.ImGuiApi +{ + public static class Interop + { + /// + /// A function that sets up a trampoline for our functions that take an ImGuiViewportPtr and return an ImVec2 so + /// that interop works. Without this things don't work because C++ and C# think different things about ImVec2 + /// and how it can be returned over interop. C++ expects the return type on the stack but C# puts it in a register. + /// + /// The function looks for a native function pointer variable and sets it to the value of managedFunction. + /// It then requests the function pointer for the shim function and returns it, so that can be passed to ImGui as + /// a callback. This shim function calls the managed function that returns a POD type, and converts it to the + /// non-pod type that C++ expects to be returned. + /// Address of the function that is your normal C# callback + /// The name of the function that you are hooking. e.g. "GetWindowPos" + /// Pointer to the c++ shim function. + public static unsafe nint CreateTrampoline( + delegate* unmanaged[Cdecl] managedFunction, + string functionName + ) + { + Debug.Assert(sizeof(delegate* unmanaged[Cdecl]) == sizeof(IntPtr)); + + var imguiLibrary = NativeLibrary.Load(LibraryName, Assembly.GetExecutingAssembly(), null); + + var pointerToManagedFunctionPointer = (delegate* unmanaged[Cdecl]*) + NativeLibrary.GetExport(imguiLibrary, $"Platform_{functionName}_ManagedFunctionPointer"); + *pointerToManagedFunctionPointer = managedFunction; + + var getShimFunctionPointer = (delegate* unmanaged[Cdecl]) + NativeLibrary.GetExport(imguiLibrary, $"Get_{functionName}_InteropPointer"); + return getShimFunctionPointer(); + } + + private const string LibraryName = "imgui"; + } +} diff --git a/Brutal.ImGui/Manual/StructExtensions/ImDrawCmd.cs b/Brutal.ImGui/Manual/StructExtensions/ImDrawCmd.cs new file mode 100644 index 0000000..128cbba --- /dev/null +++ b/Brutal.ImGui/Manual/StructExtensions/ImDrawCmd.cs @@ -0,0 +1,23 @@ +namespace Brutal.ImGuiApi; + +public partial struct ImDrawCmd +{ + /// + /// + /// Port of definition in imgui.h for backend use on underlying struct + /// + public unsafe ImTextureID GetTexID() + { + if (TexRef._TexData.IsNotNull()) + { + var texId = TexRef._TexData.TexID; + ImGui.Assert( + texId != ImTextureID.Invalid, + "ImDrawCmd is referring to ImTextureData that wasn't uploaded to graphics system. Backend must call ImTextureData::SetTexID() after handling ImTextureStatus_WantCreate request!" + ); + return texId; + } + + return TexRef._TexID; + } +} diff --git a/Brutal.ImGui/Manual/StructExtensions/ImGuiPlatformIO.cs b/Brutal.ImGui/Manual/StructExtensions/ImGuiPlatformIO.cs new file mode 100644 index 0000000..66a4677 --- /dev/null +++ b/Brutal.ImGui/Manual/StructExtensions/ImGuiPlatformIO.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi; + +public partial struct ImGuiPlatformIO +{ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate byte* GetClipboardTextFnDelegate(ImGuiContextPtr ctx); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SetClipboardTextFnDelegate(ImGuiContextPtr ctx, byte* text); +} diff --git a/Brutal.ImGui/Manual/StructExtensions/ImGuiTextFilter.cs b/Brutal.ImGui/Manual/StructExtensions/ImGuiTextFilter.cs new file mode 100644 index 0000000..01f9be3 --- /dev/null +++ b/Brutal.ImGui/Manual/StructExtensions/ImGuiTextFilter.cs @@ -0,0 +1,23 @@ +namespace Brutal.ImGuiApi; + +public partial struct ImGuiTextFilter +{ + private static int InputBufSize => 256; + + public unsafe ImGuiTextFilter(ImString defaultFilter = default) + : this() + { + if (!defaultFilter.IsNull()) + { + fixed (byte* inputBufPtr = InputBuf) + { + var target = new Span(inputBufPtr, InputBufSize); + var source = defaultFilter.AsSpan(); + if (source.Length > InputBufSize) + source = source[..InputBufSize]; + source.CopyTo(target); + this.Build(); + } + } + } +} diff --git a/Brutal.ImGui/Manual/Structs/ImDrawDataBuilder.cs b/Brutal.ImGui/Manual/Structs/ImDrawDataBuilder.cs new file mode 100644 index 0000000..5bfee24 --- /dev/null +++ b/Brutal.ImGui/Manual/Structs/ImDrawDataBuilder.cs @@ -0,0 +1,49 @@ +namespace Brutal.ImGuiApi; + +[InlineArray(2)] +public struct ImDrawDataBuilderLayers +{ + public Ptr> Value; +} + +/// Helper to build a ImDrawData instance +/// ImDrawList/ImFontAtlas +/// imgui_internal.h:142 +///
+/// struct ImDrawDataBuilder +[StructLayout(LayoutKind.Explicit, Size = 32)] +public partial struct ImDrawDataBuilder() +{ + /// Pointers to global layers for: regular, tooltip. LayersP[0] is owned by DrawData. + /// imgui_internal.h:877 + ///
+ /// ImVector<ImDrawList*>* Layers[2] + [FieldOffset(0)] + public ImDrawDataBuilderLayers Layers; + + /// + /// imgui_internal.h:878 + ///
+ /// ImVector<ImDrawList*> LayerData1 + [FieldOffset(16)] + public ImVector LayerData1; +} + +/// +public unsafe partial struct ImDrawDataBuilderPtr(ImDrawDataBuilder* ptr) : INullable +{ + private ImDrawDataBuilder* _ptr = ptr; + public ImDrawDataBuilder* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImDrawDataBuilderPtr(ImDrawDataBuilder* ptr) => new(ptr); + + public static implicit operator ImDrawDataBuilder*(ImDrawDataBuilderPtr wrapper) => wrapper.Ptr; + + /// + public ref ImDrawDataBuilderLayers Layers => ref Unsafe.AsRef(&_ptr->Layers); + + /// + public ref ImVector LayerData1 => ref Unsafe.AsRef>(&_ptr->LayerData1); +} diff --git a/Brutal.ImGui/Manual/Structs/ImGuiListClipper.cs b/Brutal.ImGui/Manual/Structs/ImGuiListClipper.cs new file mode 100644 index 0000000..7ed32b1 --- /dev/null +++ b/Brutal.ImGui/Manual/Structs/ImGuiListClipper.cs @@ -0,0 +1,7 @@ +namespace Brutal.ImGuiApi; + +public partial struct ImGuiListClipper : IDisposable +{ + /// + public void Dispose() => this.End(); +} diff --git a/Brutal.ImGui/Manual/Structs/ImGuiOnceUponAFrame.cs b/Brutal.ImGui/Manual/Structs/ImGuiOnceUponAFrame.cs new file mode 100644 index 0000000..72ade2f --- /dev/null +++ b/Brutal.ImGui/Manual/Structs/ImGuiOnceUponAFrame.cs @@ -0,0 +1,27 @@ +namespace Brutal.ImGuiApi; + +/// Helper: Execute a block of code at maximum once a frame. +/// +/// Convenient if you want to quickly create a UI within deep-nested code that runs multiple times every frame.
+/// Usage: static ImGuiOnceUponAFrame oaf = new(); if (oaf) ImGui.Text("This will be called only once per frame"); +///
+/// imgui.h:194 +///
+/// struct ImGuiOnceUponAFrame +// A class, not a struct, so the implicit bool operator mutates the shared instance's _refFrame. +public class ImGuiOnceUponAFrame +{ + private int _refFrame = -1; + + public static implicit operator bool(ImGuiOnceUponAFrame value) + { + var currentFrame = ImGui.GetFrameCount(); + + if (value._refFrame == currentFrame) + return false; + + value._refFrame = currentFrame; + + return true; + } +} diff --git a/Brutal.ImGui/Manual/Structs/ImGuiTextRange.cs b/Brutal.ImGui/Manual/Structs/ImGuiTextRange.cs new file mode 100644 index 0000000..7456c9d --- /dev/null +++ b/Brutal.ImGui/Manual/Structs/ImGuiTextRange.cs @@ -0,0 +1,22 @@ +using System.Runtime.InteropServices; + +namespace Brutal.ImGuiApi; + +public partial struct ImGuiTextFilter +{ + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe struct ImGuiTextRange + { + [FieldOffset(0)] + public byte* B; + + [FieldOffset(8)] + public byte* E; + + public ImGuiTextRange(ReadOnlySpan range) + { + B = range.AsPointer(); + E = B + range.Length; + } + } +} diff --git a/Brutal.ImGui/Manual/Typedefs/ImFontAtlasRectId.cs b/Brutal.ImGui/Manual/Typedefs/ImFontAtlasRectId.cs new file mode 100644 index 0000000..cfde93e --- /dev/null +++ b/Brutal.ImGui/Manual/Typedefs/ImFontAtlasRectId.cs @@ -0,0 +1,6 @@ +namespace Brutal.ImGuiApi; + +public record struct ImFontAtlasRectId(int Value) +{ + public static readonly ImFontAtlasRectId Invalid = new(-1); +} diff --git a/Brutal.ImGui/Manual/Typedefs/ImGuiID.cs b/Brutal.ImGui/Manual/Typedefs/ImGuiID.cs new file mode 100644 index 0000000..a0f8efc --- /dev/null +++ b/Brutal.ImGui/Manual/Typedefs/ImGuiID.cs @@ -0,0 +1,12 @@ +namespace Brutal.ImGuiApi; + +public record struct ImGuiID(uint Value) +{ + public static implicit operator ImGuiID(uint value) => new(value); + + public static implicit operator ImGuiID(int value) => new((uint)value); + + public static implicit operator uint(ImGuiID value) => value.Value; + + public static implicit operator int(ImGuiID value) => (int)value.Value; +} diff --git a/Brutal.ImGui/Manual/Typedefs/ImGuiKeyChord.cs b/Brutal.ImGui/Manual/Typedefs/ImGuiKeyChord.cs new file mode 100644 index 0000000..23bd26c --- /dev/null +++ b/Brutal.ImGui/Manual/Typedefs/ImGuiKeyChord.cs @@ -0,0 +1,7 @@ +namespace Brutal.ImGuiApi; + +// Just a wrapper for ImGuiKey values, in the expectation that it will be a combination of Mod flags and a key value. +public record struct ImGuiKeyChord(ImGuiKey Flags) +{ + public static implicit operator ImGuiKeyChord(ImGuiKey key) => new(key); +} diff --git a/Brutal.ImGui/Manual/Typedefs/ImTextureID.cs b/Brutal.ImGui/Manual/Typedefs/ImTextureID.cs new file mode 100644 index 0000000..9b46da6 --- /dev/null +++ b/Brutal.ImGui/Manual/Typedefs/ImTextureID.cs @@ -0,0 +1,11 @@ +namespace Brutal.ImGuiApi; + +public record struct ImTextureID(nint Value) +{ + // Special 'invalid' default defined by ImGui + public static readonly ImTextureID Invalid = new(0); + + public static implicit operator nint(ImTextureID value) => value.Value; + + public static explicit operator ImTextureID(nint value) => new(value); +} diff --git a/Brutal.ImGui/Manual/Typedefs/TODO.cs b/Brutal.ImGui/Manual/Typedefs/TODO.cs new file mode 100644 index 0000000..be63392 --- /dev/null +++ b/Brutal.ImGui/Manual/Typedefs/TODO.cs @@ -0,0 +1,31 @@ +//typedef ImU32* ImBitArrayPtr +global using ImBitArrayPtr = Brutal.Pointers.Ptr; + +namespace Brutal.ImGuiApi; + +public struct ImSpan { } + +public struct ImStableVector { } + +public struct ImPool { } + +public struct ImStbTexteditState { } + +public struct stbrp_node +{ +#pragma warning disable CS0169 // Field is never used + int x, + y; + nint next; +#pragma warning restore CS0169 // Field is never used +} + +#region used by ImGuiContext + +public struct ImBitArrayForNamedKeys { } + +public struct ImChunkStream { } + +public struct ImFileHandle { } + +#endregion diff --git a/Brutal.ImPlot/Generated-Internal/Delegates/ImPlotLocator.gen.cs b/Brutal.ImPlot/Generated-Internal/Delegates/ImPlotLocator.gen.cs new file mode 100644 index 0000000..f833447 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Delegates/ImPlotLocator.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:271 + ///
+ /// typedef void (*ImPlotLocator)(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void ImPlotLocator( + ImPlotTicker* ticker, + ImPlotRange* range, + float pixels, + Bool8 vertical, + nint formatter, + void* formatter_data + ); +} diff --git a/Brutal.ImPlot/Generated-Internal/Enums/ImPlotDateFmt.gen.cs b/Brutal.ImPlot/Generated-Internal/Enums/ImPlotDateFmt.gen.cs new file mode 100644 index 0000000..639944a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Enums/ImPlotDateFmt.gen.cs @@ -0,0 +1,88 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// default [ ISO 8601 ] + /// + /// + /// C++: + /// implot_internal.h:245 + ///
enum ImPlotDateFmt_ { // default [ ISO 8601 ] + ///
+ ///
+ public enum ImPlotDateFmt : int + { + /// + /// + /// C++: + /// implot_internal.h:246 + ///
ImPlotDateFmt_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// 10/3 [ --10-03 ] + /// + /// + /// C++: + /// implot_internal.h:247 + ///
ImPlotDateFmt_DayMo + ///
+ ///
+ DayMo, + + /// + /// + /// 10/3/91 [ 1991-10-03 ] + /// + /// + /// C++: + /// implot_internal.h:248 + ///
ImPlotDateFmt_DayMoYr + ///
+ ///
+ DayMoYr, + + /// + /// + /// Oct 1991 [ 1991-10 ] + /// + /// + /// C++: + /// implot_internal.h:249 + ///
ImPlotDateFmt_MoYr + ///
+ ///
+ MoYr, + + /// + /// + /// Oct [ --10 ] + /// + /// + /// C++: + /// implot_internal.h:250 + ///
ImPlotDateFmt_Mo + ///
+ ///
+ Mo, + + /// + /// + /// 1991 [ 1991 ] + /// + /// + /// C++: + /// implot_internal.h:251 + ///
ImPlotDateFmt_Yr + ///
+ ///
+ Yr, + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeFmt.gen.cs b/Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeFmt.gen.cs new file mode 100644 index 0000000..c6da8eb --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeFmt.gen.cs @@ -0,0 +1,136 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// default [ 24 Hour Clock ] + /// + /// + /// C++: + /// implot_internal.h:254 + ///
enum ImPlotTimeFmt_ { // default [ 24 Hour Clock ] + ///
+ ///
+ public enum ImPlotTimeFmt : int + { + /// + /// + /// C++: + /// implot_internal.h:255 + ///
ImPlotTimeFmt_None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// .428 552 [ .428 552 ] + /// + /// + /// C++: + /// implot_internal.h:256 + ///
ImPlotTimeFmt_Us + ///
+ ///
+ Us, + + /// + /// + /// :29.428 552 [ :29.428 552 ] + /// + /// + /// C++: + /// implot_internal.h:257 + ///
ImPlotTimeFmt_SUs + ///
+ ///
+ SUs, + + /// + /// + /// :29.428 [ :29.428 ] + /// + /// + /// C++: + /// implot_internal.h:258 + ///
ImPlotTimeFmt_SMs + ///
+ ///
+ SMs, + + /// + /// + /// :29 [ :29 ] + /// + /// + /// C++: + /// implot_internal.h:259 + ///
ImPlotTimeFmt_S + ///
+ ///
+ S, + + /// + /// + /// 21:29.428 [ 21:29.428 ] + /// + /// + /// C++: + /// implot_internal.h:260 + ///
ImPlotTimeFmt_MinSMs + ///
+ ///
+ MinSMs, + + /// + /// + /// 7:21:29.428pm [ 19:21:29.428 ] + /// + /// + /// C++: + /// implot_internal.h:261 + ///
ImPlotTimeFmt_HrMinSMs + ///
+ ///
+ HrMinSMs, + + /// + /// + /// 7:21:29pm [ 19:21:29 ] + /// + /// + /// C++: + /// implot_internal.h:262 + ///
ImPlotTimeFmt_HrMinS + ///
+ ///
+ HrMinS, + + /// + /// + /// 7:21pm [ 19:21 ] + /// + /// + /// C++: + /// implot_internal.h:263 + ///
ImPlotTimeFmt_HrMin + ///
+ ///
+ HrMin, + + /// + /// + /// 7pm [ 19:00 ] + /// + /// + /// C++: + /// implot_internal.h:264 + ///
ImPlotTimeFmt_Hr + ///
+ ///
+ Hr, + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeUnit.gen.cs b/Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeUnit.gen.cs new file mode 100644 index 0000000..673257b --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Enums/ImPlotTimeUnit.gen.cs @@ -0,0 +1,121 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:233 + ///
enum ImPlotTimeUnit_ { + ///
+ ///
+ public enum ImPlotTimeUnit : int + { + /// + /// + /// microsecond + /// + /// + /// C++: + /// implot_internal.h:234 + ///
ImPlotTimeUnit_Us + ///
+ ///
+ Us, + + /// + /// + /// millisecond + /// + /// + /// C++: + /// implot_internal.h:235 + ///
ImPlotTimeUnit_Ms + ///
+ ///
+ Ms, + + /// + /// + /// second + /// + /// + /// C++: + /// implot_internal.h:236 + ///
ImPlotTimeUnit_S + ///
+ ///
+ S, + + /// + /// + /// minute + /// + /// + /// C++: + /// implot_internal.h:237 + ///
ImPlotTimeUnit_Min + ///
+ ///
+ Min, + + /// + /// + /// hour + /// + /// + /// C++: + /// implot_internal.h:238 + ///
ImPlotTimeUnit_Hr + ///
+ ///
+ Hr, + + /// + /// + /// day + /// + /// + /// C++: + /// implot_internal.h:239 + ///
ImPlotTimeUnit_Day + ///
+ ///
+ Day, + + /// + /// + /// month + /// + /// + /// C++: + /// implot_internal.h:240 + ///
ImPlotTimeUnit_Mo + ///
+ ///
+ Mo, + + /// + /// + /// year + /// + /// + /// C++: + /// implot_internal.h:241 + ///
ImPlotTimeUnit_Yr + ///
+ ///
+ Yr, + + /// + /// + /// C++: + /// implot_internal.h:242 + ///
ImPlotTimeUnit_COUNT + ///
+ ///
+ COUNT, + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlot.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlot.gen.cs new file mode 100644 index 0000000..4282271 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlot.gen.cs @@ -0,0 +1,2257 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public partial class Internal + { + /// + /// + /// C++: + /// implot_internal.h:1263 + /// , implot.cpp:463 + ///
void Initialize(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Initializes an ImPlotContext + /// + /// + public static unsafe void Initialize(ImPlotContextPtr ctx) => PInvoke.Initialize_internal(ctx); + + /// + /// + /// C++: + /// implot_internal.h:1265 + /// , implot.cpp:503 + ///
void ResetCtxForNextPlot(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Resets an ImPlot context for the next call to BeginPlot + /// + /// + public static unsafe void ResetCtxForNextPlot(ImPlotContextPtr ctx) => + PInvoke.ResetCtxForNextPlot_internal(ctx); + + /// + /// + /// C++: + /// implot_internal.h:1267 + /// , implot.cpp:521 + ///
void ResetCtxForNextAlignedPlots(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Resets an ImPlot context for the next call to BeginAlignedPlots + /// + /// + public static unsafe void ResetCtxForNextAlignedPlots(ImPlotContextPtr ctx) => + PInvoke.ResetCtxForNextAlignedPlots_internal(ctx); + + /// + /// + /// C++: + /// implot_internal.h:1269 + /// , implot.cpp:526 + ///
void ResetCtxForNextSubplot(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Resets an ImPlot context for the next call to BeginSubplot + /// + /// + public static unsafe void ResetCtxForNextSubplot(ImPlotContextPtr ctx) => + PInvoke.ResetCtxForNextSubplot_internal(ctx); + + /// + /// + /// C++: + /// implot_internal.h:1276 + /// , implot.cpp:536 + ///
ImPlotPlot* GetPlot(const char* title) + ///
+ ///
+ /// + /// + /// Gets a plot from the current ImPlotContext + /// + /// + public static unsafe ImPlotPlotPtr GetPlot(ImString title) + { + fixed (byte* title_fixed = title) + { + return PInvoke.GetPlot_internal(title_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1278 + /// , implot.cpp:542 + ///
ImPlotPlot* GetCurrentPlot() + ///
+ ///
+ /// + /// + /// Gets the current plot from the current ImPlotContext + /// + /// + public static unsafe ImPlotPlotPtr GetCurrentPlot() => PInvoke.GetCurrentPlot_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1280 + /// , implot.cpp:546 + ///
void BustPlotCache() + ///
+ ///
+ /// + /// + /// Busts the cache for every plot in the current context + /// + /// + public static unsafe void BustPlotCache() => PInvoke.BustPlotCache_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1283 + /// , implot.cpp:1515 + ///
void ShowPlotContextMenu(ImPlotPlot& plot) + ///
+ ///
+ /// + /// + /// Shows a plot's context menu. + /// + /// + public static unsafe void ShowPlotContextMenu(ImPlotPlotPtr plot) => + PInvoke.ShowPlotContextMenu_internal(plot); + + /// + /// + /// C++: + /// implot_internal.h:1290 + ///
static inline void SetupLock() + ///
+ ///
+ /// + /// + /// Lock Setup and call SetupFinish if necessary. + /// + /// + public static unsafe void SetupLock() => PInvoke.SetupLock_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1302 + /// , implot.cpp:3335 + ///
void SubplotNextCell() + ///
+ ///
+ /// + /// + /// Advances to next subplot + /// + /// + public static unsafe void SubplotNextCell() => PInvoke.SubplotNextCell_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1305 + /// , implot.cpp:1488 + ///
void ShowSubplotsContextMenu(ImPlotSubplot& subplot) + ///
+ ///
+ /// + /// + /// Shows a subplot's context menu. + /// + /// + public static unsafe void ShowSubplotsContextMenu(ImPlotSubplotPtr subplot) => + PInvoke.ShowSubplotsContextMenu_internal(subplot); + + /// + /// + /// C++: + /// implot_internal.h:1312 + /// , + /// implot_items.cpp:398 + ///
+ /// bool BeginItem(const char* label_id, ImPlotItemFlags flags=0, ImPlotCol recolor_from=IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Begins a new item. Returns false if the item should not be plotted. Pushes PlotClipRect. + /// + /// + /// Begins a new item. Returns false if the item should not be plotted. + /// + /// + public static unsafe bool BeginItem( + ImString labelId, + ImPlotItemFlags flags = default, + ImPlotCol recolorFrom = (ImPlotCol)(-1) + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.BeginItem_internal(labelId_fixed, flags, recolorFrom); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1327 + /// , + /// implot_items.cpp:479 + ///
void EndItem() + ///
+ ///
+ /// + /// + /// Ends an item (call only if BeginItem returns true). Pops PlotClipRect. + /// + /// + /// Ends an item (call only if BeginItem returns true) + /// + /// + public static unsafe void EndItem() => PInvoke.EndItem_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1330 + /// , + /// implot_items.cpp:287 + ///
+ /// ImPlotItem* RegisterOrGetItem(const char* label_id, ImPlotItemFlags flags, bool* just_created = nullptr) + ///
+ ///
+ /// + /// + /// Register or get an existing item from the current plot. + /// + /// + public static unsafe ImPlotItemPtr RegisterOrGetItem( + ImString labelId, + ImPlotItemFlags flags, + Ptr justCreated = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.RegisterOrGetItem_internal(labelId_fixed, flags, (Bool8*)justCreated); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1332 + /// , + /// implot_items.cpp:310 + ///
ImPlotItem* GetItem(const char* label_id) + ///
+ ///
+ /// + /// + /// Get a plot item from the current plot. + /// + /// + public static unsafe ImPlotItemPtr GetItem(ImString labelId) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.GetItem_internal(labelId_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1334 + /// , + /// implot_items.cpp:320 + ///
ImPlotItem* GetCurrentItem() + ///
+ ///
+ /// + /// + /// Gets the current item. + /// + /// + public static unsafe ImPlotItemPtr GetCurrentItem() => PInvoke.GetCurrentItem_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1336 + /// , + /// implot_items.cpp:360 + ///
void BustItemCache() + ///
+ ///
+ /// + /// + /// Busts the cache for every item for every plot in the current context. + /// + /// + public static unsafe void BustItemCache() => PInvoke.BustItemCache_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1343 + ///
static inline bool AnyAxesInputLocked(ImPlotAxis* axes, int count) + ///
+ ///
+ /// + /// + /// Returns true if any enabled axis is locked from user input. + /// + /// + public static unsafe bool AnyAxesInputLocked(ImPlotAxisPtr axes, int count) => + PInvoke.AnyAxesInputLocked_internal(axes, count); + + /// + /// + /// C++: + /// implot_internal.h:1352 + ///
static inline bool AllAxesInputLocked(ImPlotAxis* axes, int count) + ///
+ ///
+ /// + /// + /// Returns true if all enabled axes are locked from user input. + /// + /// + public static unsafe bool AllAxesInputLocked(ImPlotAxisPtr axes, int count) => + PInvoke.AllAxesInputLocked_internal(axes, count); + + /// + /// + /// C++: + /// implot_internal.h:1360 + ///
static inline bool AnyAxesHeld(ImPlotAxis* axes, int count) + ///
+ ///
+ public static unsafe bool AnyAxesHeld(ImPlotAxisPtr axes, int count) => + PInvoke.AnyAxesHeld_internal(axes, count); + + /// + /// + /// C++: + /// implot_internal.h:1368 + ///
static inline bool AnyAxesHovered(ImPlotAxis* axes, int count) + ///
+ ///
+ public static unsafe bool AnyAxesHovered(ImPlotAxisPtr axes, int count) => + PInvoke.AnyAxesHovered_internal(axes, count); + + /// + /// + /// C++: + /// implot_internal.h:1377 + ///
static inline bool FitThisFrame() + ///
+ ///
+ /// + /// + /// Returns true if the user has requested data to be fit. + /// + /// + public static unsafe bool FitThisFrame() => PInvoke.FitThisFrame_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1382 + ///
static inline void FitPointX(double x) + ///
+ ///
+ /// + /// + /// Extends the current plot's axes so that it encompasses a vertical line at x + /// + /// + public static unsafe void FitPointX(double x) => PInvoke.FitPointX_internal(x); + + /// + /// + /// C++: + /// implot_internal.h:1389 + ///
static inline void FitPointY(double y) + ///
+ ///
+ /// + /// + /// Extends the current plot's axes so that it encompasses a horizontal line at y + /// + /// + public static unsafe void FitPointY(double y) => PInvoke.FitPointY_internal(y); + + /// + /// + /// C++: + /// implot_internal.h:1396 + ///
static inline void FitPoint(const ImPlotPoint& p) + ///
+ ///
+ /// + /// + /// Extends the current plot's axes so that it encompasses point p + /// + /// + public static unsafe void FitPoint(in double2 p) + { + fixed (double2* p_fixed = &p) + { + PInvoke.FitPoint_internal(p_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1405 + ///
static inline bool RangesOverlap(const ImPlotRange& r1, const ImPlotRange& r2) + ///
+ ///
+ /// + /// + /// Returns true if two ranges overlap + /// + /// + public static unsafe bool RangesOverlap(in ImPlotRange r1, in ImPlotRange r2) + { + fixed (ImPlotRange* r2_fixed = &r2) + { + fixed (ImPlotRange* r1_fixed = &r1) + { + return PInvoke.RangesOverlap_internal(r1_fixed, r2_fixed); + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1409 + /// , implot.cpp:1347 + ///
+ /// void ShowAxisContextMenu(ImPlotAxis& axis, ImPlotAxis* equal_axis, bool time_allowed = false) + ///
+ ///
+ /// + /// + /// Shows an axis's context menu. + /// + /// + public static unsafe void ShowAxisContextMenu( + ImPlotAxisPtr axis, + ImPlotAxisPtr equalAxis, + bool timeAllowed = false + ) => PInvoke.ShowAxisContextMenu_internal(axis, equalAxis, timeAllowed); + + /// + /// + /// C++: + /// implot_internal.h:1416 + /// , implot.cpp:556 + ///
+ /// ImVec2 GetLocationPos(const ImRect& outer_rect, const ImVec2& inner_size, ImPlotLocation location, const ImVec2& pad = ImVec2(0,0)) + ///
+ ///
+ /// + /// + /// Gets the position of an inner rect that is located inside of an outer rect according to an + /// ImPlotLocation and padding amount. + /// + /// + public static unsafe float2 GetLocationPos( + in floatRect outerRect, + in float2 innerSize, + ImPlotLocation location, + in float2? pad = default + ) + { + var pad_default = pad ?? new float2(0f, 0f); + fixed (float2* innerSize_fixed = &innerSize) + { + fixed (floatRect* outerRect_fixed = &outerRect) + { + return PInvoke.GetLocationPos_internal( + outerRect_fixed, + innerSize_fixed, + location, + &pad_default + ); + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1418 + /// , implot.cpp:576 + ///
+ /// ImVec2 CalcLegendSize(ImPlotItemGroup& items, const ImVec2& pad, const ImVec2& spacing, bool vertical) + ///
+ ///
+ /// + /// + /// Calculates the bounding box size of a legend _before_ clipping. + /// + /// + public static unsafe float2 CalcLegendSize( + ImPlotItemGroupPtr items, + in float2 pad, + in float2 spacing, + bool vertical + ) + { + fixed (float2* spacing_fixed = &spacing) + { + fixed (float2* pad_fixed = &pad) + { + return PInvoke.CalcLegendSize_internal(items, pad_fixed, spacing_fixed, vertical); + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1420 + /// , implot.cpp:597 + ///
+ /// bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2& pad) + ///
+ ///
+ /// + /// + /// Clips calculated legend size + /// + /// + public static unsafe bool ClampLegendRect(Ptr legendRect, in floatRect outerRect, in float2 pad) + { + fixed (float2* pad_fixed = &pad) + { + fixed (floatRect* outerRect_fixed = &outerRect) + { + return PInvoke.ClampLegendRect_internal((floatRect*)legendRect, outerRect_fixed, pad_fixed); + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1422 + /// , implot.cpp:628 + ///
+ /// bool ShowLegendEntries(ImPlotItemGroup& items, const ImRect& legend_bb, bool interactable, const ImVec2& pad, const ImVec2& spacing, bool vertical, ImDrawList& DrawList) + ///
+ ///
+ /// + /// + /// Renders legend entries into a bounding box + /// + /// + public static unsafe bool ShowLegendEntries( + ImPlotItemGroupPtr items, + in floatRect legendBb, + bool interactable, + in float2 pad, + in float2 spacing, + bool vertical, + ImDrawListPtr drawList + ) + { + fixed (float2* spacing_fixed = &spacing) + { + fixed (float2* pad_fixed = &pad) + { + fixed (floatRect* legendBb_fixed = &legendBb) + { + return PInvoke.ShowLegendEntries_internal( + items, + legendBb_fixed, + interactable, + pad_fixed, + spacing_fixed, + vertical, + drawList + ); + } + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1424 + /// , implot.cpp:4246 + ///
+ /// void ShowAltLegend(const char* title_id, bool vertical = true, const ImVec2 size = ImVec2(0,0), bool interactable = true) + ///
+ ///
+ /// + /// + /// Shows an alternate legend for the plot identified by #title_id, outside of the plot frame (can be + /// called before or after of Begin/EndPlot but must occur in the same ImGui window! This is not + /// thoroughly tested nor scrollable!). + /// + /// + public static unsafe void ShowAltLegend( + ImString titleId, + bool vertical = true, + float2? size = default, + bool interactable = true + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* titleId_fixed = titleId) + { + PInvoke.ShowAltLegend_internal(titleId_fixed, vertical, size_default, interactable); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1426 + /// , implot.cpp:1462 + ///
bool ShowLegendContextMenu(ImPlotLegend& legend, bool visible) + ///
+ ///
+ /// + /// + /// Shows a legend's context menu. + /// + /// + public static unsafe bool ShowLegendContextMenu(ImPlotLegendPtr legend, bool visible) => + PInvoke.ShowLegendContextMenu_internal(legend, visible); + + /// + /// + /// C++: + /// implot_internal.h:1433 + /// , implot.cpp:1599 + ///
+ /// void LabelAxisValue(const ImPlotAxis& axis, double value, char* buff, int size, bool round = false) + ///
+ ///
+ /// + /// + /// Create a a string label for a an axis value + /// + /// + public static unsafe void LabelAxisValue( + in ImPlotAxis axis, + double value, + Ptr buff, + int size, + bool round = false + ) + { + fixed (ImPlotAxis* axis_fixed = &axis) + { + PInvoke.LabelAxisValue_internal(axis_fixed, value, (byte*)buff, size, round); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1440 + ///
static inline const ImPlotNextItemData& GetItemData() + ///
+ ///
+ /// + /// + /// Get styling data for next item (call between Begin/EndItem) + /// + /// + public static unsafe ImPlotNextItemDataPtr GetItemData() => PInvoke.GetItemData_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1443 + ///
static inline bool IsColorAuto(const ImVec4& col) + ///
+ ///
+ /// + /// + /// Returns true if a color is set to be automatically determined + /// + /// + public static unsafe bool IsColorAuto(in float4 col) + { + fixed (float4* col_fixed = &col) + { + return PInvoke.IsColorAuto_internal_0(col_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1445 + ///
static inline bool IsColorAuto(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns true if a style color is set to be automatically determined + /// + /// + public static unsafe bool IsColorAuto(ImPlotCol idx) => PInvoke.IsColorAuto_internal_1(idx); + + /// + /// + /// C++: + /// implot_internal.h:1447 + /// , implot.cpp:262 + ///
ImVec4 GetAutoColor(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the automatically deduced style color + /// + /// + public static unsafe float4 GetAutoColor(ImPlotCol idx) => PInvoke.GetAutoColor_internal(idx); + + /// + /// + /// C++: + /// implot_internal.h:1450 + ///
static inline ImVec4 GetStyleColorVec4(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the style color whether it is automatic or custom set + /// + /// + public static unsafe float4 GetStyleColorVec4(ImPlotCol idx) => PInvoke.GetStyleColorVec4_internal(idx); + + /// + /// + /// C++: + /// implot_internal.h:1451 + ///
static inline ImU32 GetStyleColorU32(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the style color whether it is automatic or custom set + /// + /// + public static unsafe uint GetStyleColorU32(ImPlotCol idx) => PInvoke.GetStyleColorU32_internal(idx); + + /// + /// + /// C++: + /// implot_internal.h:1454 + /// , implot.cpp:340 + ///
+ /// void AddTextVertical(ImDrawList *DrawList, ImVec2 pos, ImU32 col, const char* text_begin, const char* text_end = nullptr) + ///
+ ///
+ /// + /// + /// Draws vertical text. The position is the bottom left of the text rect. + /// + /// + public static unsafe void AddTextVertical(ImDrawListPtr drawList, float2 pos, ImColor8 col, ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.AddTextVertical_internal(drawList, pos, col, text_fixed, text_fixed + text.Length); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1456 + /// , implot.cpp:388 + ///
+ /// void AddTextCentered(ImDrawList* DrawList, ImVec2 top_center, ImU32 col, const char* text_begin, const char* text_end = nullptr) + ///
+ ///
+ /// + /// + /// Draws multiline horizontal text centered. + /// + /// + public static unsafe void AddTextCentered( + ImDrawListPtr drawList, + float2 topCenter, + ImColor8 col, + ImString text + ) + { + fixed (byte* text_fixed = text) + { + PInvoke.AddTextCentered_internal(drawList, topCenter, col, text_fixed, text_fixed + text.Length); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1458 + ///
static inline ImVec2 CalcTextSizeVertical(const char *text) + ///
+ ///
+ /// + /// + /// Calculates the size of vertical text + /// + /// + public static unsafe float2 CalcTextSizeVertical(ImString text) + { + fixed (byte* text_fixed = text) + { + return PInvoke.CalcTextSizeVertical_internal(text_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1463 + ///
static inline ImU32 CalcTextColor(const ImVec4& bg) + ///
+ ///
+ /// + /// + /// Returns white or black text given background color + /// + /// + public static unsafe uint CalcTextColor(in float4 bg) + { + fixed (float4* bg_fixed = &bg) + { + return PInvoke.CalcTextColor_internal_0(bg_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1464 + ///
static inline ImU32 CalcTextColor(ImU32 bg) + ///
+ ///
+ /// + /// + /// Returns white or black text given background color + /// + /// + public static unsafe uint CalcTextColor(uint bg) => PInvoke.CalcTextColor_internal_1(bg); + + /// + /// + /// C++: + /// implot_internal.h:1466 + ///
static inline ImU32 CalcHoverColor(ImU32 col) + ///
+ ///
+ /// + /// + /// Lightens or darkens a color for hover + /// + /// + public static unsafe uint CalcHoverColor(ImColor8 col) => PInvoke.CalcHoverColor_internal(col); + + /// + /// + /// C++: + /// implot_internal.h:1469 + ///
+ /// static inline ImVec2 ClampLabelPos(ImVec2 pos, const ImVec2& size, const ImVec2& Min, const ImVec2& Max) + ///
+ ///
+ /// + /// + /// Clamps a label position so that it fits a rect defined by Min/Max + /// + /// + public static unsafe float2 ClampLabelPos(float2 pos, in float2 size, in float2 min, in float2 max) + { + fixed (float2* max_fixed = &max) + { + fixed (float2* min_fixed = &min) + { + fixed (float2* size_fixed = &size) + { + return PInvoke.ClampLabelPos_internal(pos, size_fixed, min_fixed, max_fixed); + } + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1478 + /// , implot.cpp:4572 + ///
ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Returns a color from the Color map given an index >= 0 (modulo will be performed). + /// + /// + public static unsafe uint GetColormapColorU32(int idx, ImPlotColormap cmap) => + PInvoke.GetColormapColorU32_internal(idx, cmap); + + /// + /// + /// C++: + /// implot_internal.h:1480 + /// , implot.cpp:4552 + ///
ImU32 NextColormapColorU32() + ///
+ ///
+ /// + /// + /// Returns the next unused colormap color and advances the colormap. Can be used to skip colors if + /// desired. + /// + /// + public static unsafe uint NextColormapColorU32() => PInvoke.NextColormapColorU32_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1482 + /// , implot.cpp:4584 + ///
ImU32 SampleColormapU32(float t, ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Linearly interpolates a color from the current colormap given t between 0 and 1. + /// + /// + public static unsafe uint SampleColormapU32(float t, ImPlotColormap cmap) => + PInvoke.SampleColormapU32_internal(t, cmap); + + /// + /// + /// C++: + /// implot_internal.h:1485 + /// , implot.cpp:4595 + ///
+ /// void RenderColorBar(const ImU32* colors, int size, ImDrawList& DrawList, const ImRect& bounds, bool vert, bool reversed, bool continuous) + ///
+ ///
+ /// + /// + /// Render a colormap bar + /// + /// + public static unsafe void RenderColorBar( + Ptr colors, + int size, + ImDrawListPtr drawList, + in floatRect bounds, + bool vert, + bool reversed, + bool continuous + ) + { + fixed (floatRect* bounds_fixed = &bounds) + { + PInvoke.RenderColorBar_internal( + (uint*)colors, + size, + drawList, + bounds_fixed, + vert, + reversed, + continuous + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1492 + /// , implot.cpp:403 + ///
double NiceNum(double x, bool round) + ///
+ ///
+ /// + /// + /// Rounds x to powers of 2,5 and 10 for generating axis labels (from Graphics Gems 1 Chapter 11.2) + /// + /// + public static unsafe double NiceNum(double x, bool round) => PInvoke.NiceNum_internal(x, round); + + /// + /// + /// C++: + /// implot_internal.h:1494 + ///
static inline int OrderOfMagnitude(double val) + ///
+ ///
+ /// + /// + /// Computes order of magnitude of double. + /// + /// + public static unsafe int OrderOfMagnitude(double val) => PInvoke.OrderOfMagnitude_internal(val); + + /// + /// + /// C++: + /// implot_internal.h:1496 + ///
static inline int OrderToPrecision(int order) + ///
+ ///
+ /// + /// + /// Returns the precision required for a order of magnitude. + /// + /// + public static unsafe int OrderToPrecision(int order) => PInvoke.OrderToPrecision_internal(order); + + /// + /// + /// C++: + /// implot_internal.h:1498 + ///
static inline int Precision(double val) + ///
+ ///
+ /// + /// + /// Returns a floating point precision to use given a value + /// + /// + public static unsafe int Precision(double val) => PInvoke.Precision_internal(val); + + /// + /// + /// C++: + /// implot_internal.h:1500 + ///
static inline double RoundTo(double val, int prec) + ///
+ ///
+ /// + /// + /// Round a value to a given precision + /// + /// + public static unsafe double RoundTo(double val, int prec) => PInvoke.RoundTo_internal(val, prec); + + /// + /// + /// C++: + /// implot_internal.h:1503 + ///
+ /// static inline ImVec2 Intersection(const ImVec2& a1, const ImVec2& a2, const ImVec2& b1, const ImVec2& b2) + ///
+ ///
+ /// + /// + /// Returns the intersection point of two lines A and B (assumes they are not parallel!) + /// + /// + public static unsafe float2 Intersection(in float2 a1, in float2 a2, in float2 b1, in float2 b2) + { + fixed (float2* b2_fixed = &b2) + { + fixed (float2* b1_fixed = &b1) + { + fixed (float2* a2_fixed = &a2) + { + fixed (float2* a1_fixed = &a1) + { + return PInvoke.Intersection_internal(a1_fixed, a2_fixed, b1_fixed, b2_fixed); + } + } + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_float( + (float*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_double( + (double*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_sbyte( + (sbyte*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_byte( + (byte*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_short( + (short*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_ushort( + (ushort*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_int( + (int*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_uint( + (uint*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_long( + (long*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + public static unsafe void CalculateBins( + Ptr values, + int count, + ImPlotBin meth, + in ImPlotRange range, + Ptr binsOut, + Ptr widthOut + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.CalculateBins_internal_ulong( + (ulong*)values, + count, + meth, + range_fixed, + (int*)binsOut, + (double*)widthOut + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1545 + ///
static inline bool IsLeapYear(int year) + ///
+ ///
+ /// + /// + /// Returns true if year is leap year (366 days long) + /// + /// + public static unsafe bool IsLeapYear(int year) => PInvoke.IsLeapYear_internal(year); + + /// + /// + /// C++: + /// implot_internal.h:1549 + ///
static inline int GetDaysInMonth(int year, int month) + ///
+ ///
+ /// + /// + /// Returns the number of days in a month, accounting for Feb. leap years. #month is zero indexed. + /// + /// + public static unsafe int GetDaysInMonth(int year, int month) => + PInvoke.GetDaysInMonth_internal(year, month); + + /// + /// + /// C++: + /// implot_internal.h:1555 + /// , implot.cpp:915 + ///
ImPlotTime MkGmtTime(struct tm *ptm) + ///
+ ///
+ /// + /// + /// Make a UNIX timestamp from a tm struct expressed in UTC time (i.e. GMT timezone). + /// + /// + public static unsafe ImPlotTime MkGmtTime(Ptr ptm) => PInvoke.MkGmtTime_internal((tm*)ptm); + + /// + /// + /// C++: + /// implot_internal.h:1557 + /// , implot.cpp:927 + ///
tm* GetGmtTime(const ImPlotTime& t, tm* ptm) + ///
+ ///
+ /// + /// + /// Make a tm struct expressed in UTC time (i.e. GMT timezone) from a UNIX timestamp. + /// + /// + public static unsafe Ptr GetGmtTime(in ImPlotTime t, Ptr ptm) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.GetGmtTime_internal(t_fixed, (tm*)ptm); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1560 + /// , implot.cpp:939 + ///
ImPlotTime MkLocTime(struct tm *ptm) + ///
+ ///
+ /// + /// + /// Make a UNIX timestamp from a tm struct expressed in local time. + /// + /// + public static unsafe ImPlotTime MkLocTime(Ptr ptm) => PInvoke.MkLocTime_internal((tm*)ptm); + + /// + /// + /// C++: + /// implot_internal.h:1562 + /// , implot.cpp:947 + ///
tm* GetLocTime(const ImPlotTime& t, tm* ptm) + ///
+ ///
+ /// + /// + /// Make a tm struct expressed in local time from a UNIX timestamp. + /// + /// + public static unsafe Ptr GetLocTime(in ImPlotTime t, Ptr ptm) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.GetLocTime_internal(t_fixed, (tm*)ptm); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1568 + ///
static inline ImPlotTime MkTime(struct tm *ptm) + ///
+ ///
+ /// + /// + /// // Make a UNIX timestamp from a tm struct according to the current ImPlotStyle.UseLocalTime setting. + /// + /// + public static unsafe ImPlotTime MkTime(Ptr ptm) => PInvoke.MkTime_internal((tm*)ptm); + + /// + /// + /// C++: + /// implot_internal.h:1573 + ///
static inline tm* GetTime(const ImPlotTime& t, tm* ptm) + ///
+ ///
+ /// + /// + /// Get a tm struct from a UNIX timestamp according to the current ImPlotStyle.UseLocalTime setting. + /// + /// + public static unsafe Ptr GetTime(in ImPlotTime t, Ptr ptm) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.GetTime_internal(t_fixed, (tm*)ptm); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1580 + /// , implot.cpp:958 + ///
+ /// ImPlotTime MakeTime(int year, int month = 0, int day = 1, int hour = 0, int min = 0, int sec = 0, int us = 0) + ///
+ ///
+ /// + /// + /// Make a timestamp from time components. + /// year[1970-3000], month[0-11], day[1-31], hour[0-23], min[0-59], sec[0-59], us[0,999999] + /// + /// + public static unsafe ImPlotTime MakeTime( + int year, + int month = 0, + int day = 1, + int hour = 0, + int min = 0, + int sec = 0, + int us = 0 + ) => PInvoke.MakeTime_internal(year, month, day, hour, min, sec, us); + + /// + /// + /// C++: + /// implot_internal.h:1582 + /// , implot.cpp:981 + ///
int GetYear(const ImPlotTime& t) + ///
+ ///
+ /// + /// + /// Get year component from timestamp [1970-3000] + /// + /// + public static unsafe int GetYear(in ImPlotTime t) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.GetYear_internal(t_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1584 + /// , implot.cpp:987 + ///
int GetMonth(const ImPlotTime& t) + ///
+ ///
+ /// + /// + /// Get month component from timestamp [0-11] + /// + /// + public static unsafe int GetMonth(in ImPlotTime t) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.GetMonth_internal(t_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1587 + /// , implot.cpp:993 + ///
ImPlotTime AddTime(const ImPlotTime& t, ImPlotTimeUnit unit, int count) + ///
+ ///
+ /// + /// + /// Adds or subtracts time from a timestamp. #count > 0 to add, < 0 to subtract. + /// + /// + public static unsafe ImPlotTime AddTime(in ImPlotTime t, ImPlotTimeUnit unit, int count) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.AddTime_internal(t_fixed, unit, count); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1589 + /// , implot.cpp:1025 + ///
ImPlotTime FloorTime(const ImPlotTime& t, ImPlotTimeUnit unit) + ///
+ ///
+ /// + /// + /// Rounds a timestamp down to nearest unit. + /// + /// + public static unsafe ImPlotTime FloorTime(in ImPlotTime t, ImPlotTimeUnit unit) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.FloorTime_internal(t_fixed, unit); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1591 + /// , implot.cpp:1042 + ///
ImPlotTime CeilTime(const ImPlotTime& t, ImPlotTimeUnit unit) + ///
+ ///
+ /// + /// + /// Rounds a timestamp up to the nearest unit. + /// + /// + public static unsafe ImPlotTime CeilTime(in ImPlotTime t, ImPlotTimeUnit unit) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.CeilTime_internal(t_fixed, unit); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1593 + /// , implot.cpp:1046 + ///
ImPlotTime RoundTime(const ImPlotTime& t, ImPlotTimeUnit unit) + ///
+ ///
+ /// + /// + /// Rounds a timestamp up or down to the nearest unit. + /// + /// + public static unsafe ImPlotTime RoundTime(in ImPlotTime t, ImPlotTimeUnit unit) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.RoundTime_internal(t_fixed, unit); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1595 + /// , implot.cpp:1054 + ///
+ /// ImPlotTime CombineDateTime(const ImPlotTime& date_part, const ImPlotTime& time_part) + ///
+ ///
+ /// + /// + /// Combines the date of one timestamp with the time-of-day of another timestamp. + /// + /// + public static unsafe ImPlotTime CombineDateTime(in ImPlotTime datePart, in ImPlotTime timePart) + { + fixed (ImPlotTime* timePart_fixed = &timePart) + { + fixed (ImPlotTime* datePart_fixed = &datePart) + { + return PInvoke.CombineDateTime_internal(datePart_fixed, timePart_fixed); + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:1598 + ///
static inline ImPlotTime Now() + ///
+ ///
+ /// + /// + /// Get the current time as a timestamp. + /// + /// + public static unsafe ImPlotTime Now() => PInvoke.Now_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1600 + ///
static inline ImPlotTime Today() + ///
+ ///
+ /// + /// + /// Get the current date as a timestamp. + /// + /// + public static unsafe ImPlotTime Today() => PInvoke.Today_internal(); + + /// + /// + /// C++: + /// implot_internal.h:1603 + /// , implot.cpp:1075 + ///
+ /// int FormatTime(const ImPlotTime& t, char* buffer, int size, ImPlotTimeFmt fmt, bool use_24_hr_clk) + ///
+ ///
+ /// + /// + /// Formats the time part of timestamp t into a buffer according to #fmt + /// + /// + public static unsafe int FormatTime( + in ImPlotTime t, + Ptr buffer, + int size, + ImPlotTimeFmt text, + bool use24HrClk + ) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.FormatTime_internal(t_fixed, (byte*)buffer, size, text, use24HrClk); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1605 + /// , implot.cpp:1115 + ///
+ /// int FormatDate(const ImPlotTime& t, char* buffer, int size, ImPlotDateFmt fmt, bool use_iso_8601) + ///
+ ///
+ /// + /// + /// Formats the date part of timestamp t into a buffer according to #fmt + /// + /// + public static unsafe int FormatDate( + in ImPlotTime t, + Ptr buffer, + int size, + ImPlotDateFmt text, + bool useIso8601 + ) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.FormatDate_internal(t_fixed, (byte*)buffer, size, text, useIso8601); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1607 + /// , implot.cpp:1144 + ///
+ /// int FormatDateTime(const ImPlotTime& t, char* buffer, int size, ImPlotDateTimeSpec fmt) + ///
+ ///
+ /// + /// + /// Formats the time and/or date parts of a timestamp t into a buffer according to #fmt + /// + /// + public static unsafe int FormatDateTime( + in ImPlotTime t, + Ptr buffer, + int size, + ImPlotDateTimeSpec text + ) + { + fixed (ImPlotTime* t_fixed = &t) + { + return PInvoke.FormatDateTime_internal(t_fixed, (byte*)buffer, size, text); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1613 + /// , implot.cpp:5451 + ///
+ /// bool ShowDatePicker(const char* id, int* level, ImPlotTime* t, const ImPlotTime* t1 = nullptr, const ImPlotTime* t2 = nullptr) + ///
+ ///
+ /// + /// + /// Shows a date picker widget block (year/month/day). + /// #level = 0 for day, 1 for month, 2 for year. Modified by user interaction. + /// #t will be set when a day is clicked and the function will return true. + /// #t1 and #t2 are optional dates to highlight. + /// + /// + public static unsafe bool ShowDatePicker( + ImString id, + Ptr level, + ImPlotTimePtr t, + ImPlotTimePtr t1 = default, + ImPlotTimePtr t2 = default + ) + { + fixed (byte* id_fixed = id) + { + return PInvoke.ShowDatePicker_internal(id_fixed, (int*)level, t, t1, t2); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1616 + /// , implot.cpp:5662 + ///
bool ShowTimePicker(const char* id, ImPlotTime* t) + ///
+ ///
+ /// + /// + /// Shows a time picker widget block (hour/min/sec). + /// #t will be set when a new hour, minute, or sec is selected or am/pm is toggled, and the function will return true. + /// + /// + public static unsafe bool ShowTimePicker(ImString id, ImPlotTimePtr t) + { + fixed (byte* id_fixed = id) + { + return PInvoke.ShowTimePicker_internal(id_fixed, t); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1622 + ///
static inline double TransformForward_Log10(double v, void*) + ///
+ ///
+ public static unsafe double TransformForward_Log10(double v, Ptr _) => + PInvoke.TransformForward_Log10_internal(v, _); + + /// + /// + /// C++: + /// implot_internal.h:1627 + ///
static inline double TransformInverse_Log10(double v, void*) + ///
+ ///
+ public static unsafe double TransformInverse_Log10(double v, Ptr _) => + PInvoke.TransformInverse_Log10_internal(v, _); + + /// + /// + /// C++: + /// implot_internal.h:1631 + ///
static inline double TransformForward_SymLog(double v, void*) + ///
+ ///
+ public static unsafe double TransformForward_SymLog(double v, Ptr _) => + PInvoke.TransformForward_SymLog_internal(v, _); + + /// + /// + /// C++: + /// implot_internal.h:1635 + ///
static inline double TransformInverse_SymLog(double v, void*) + ///
+ ///
+ public static unsafe double TransformInverse_SymLog(double v, Ptr _) => + PInvoke.TransformInverse_SymLog_internal(v, _); + + /// + /// + /// C++: + /// implot_internal.h:1639 + ///
static inline double TransformForward_Logit(double v, void*) + ///
+ ///
+ public static unsafe double TransformForward_Logit(double v, Ptr _) => + PInvoke.TransformForward_Logit_internal(v, _); + + /// + /// + /// C++: + /// implot_internal.h:1644 + ///
static inline double TransformInverse_Logit(double v, void*) + ///
+ ///
+ public static unsafe double TransformInverse_Logit(double v, Ptr _) => + PInvoke.TransformInverse_Logit_internal(v, _); + + /// + /// + /// C++: + /// implot_internal.h:1652 + ///
static inline int Formatter_Default(double value, char* buff, int size, void* data) + ///
+ ///
+ public static unsafe int Formatter_Default(double value, Ptr buff, int size, Ptr data) => + PInvoke.Formatter_Default_internal(value, (byte*)buff, size, data); + + /// + /// + /// C++: + /// implot_internal.h:1657 + ///
static inline int Formatter_Logit(double value, char* buff, int size, void*) + ///
+ ///
+ public static unsafe int Formatter_Logit(double value, Ptr buff, int size, Ptr _) => + PInvoke.Formatter_Logit_internal(value, (byte*)buff, size, _); + + /// + /// + /// C++: + /// implot_internal.h:1673 + ///
static inline int Formatter_Time(double, char* buff, int size, void* data) + ///
+ ///
+ public static unsafe int Formatter_Time(double _, Ptr buff, int size, Ptr data) => + PInvoke.Formatter_Time_internal(_, (byte*)buff, size, data); + + /// + /// + /// C++: + /// implot_internal.h:1682 + /// , implot.cpp:722 + ///
+ /// void Locator_Default(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_Default( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + ImPlotFormatter formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_Default_internal( + ticker, + range_fixed, + pixels, + vertical, + Marshal.GetFunctionPointerForDelegate(formatter), + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1682 + /// , implot.cpp:722 + ///
+ /// void Locator_Default(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_Default( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + delegate* unmanaged[Cdecl] formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_Default_internal( + ticker, + range_fixed, + pixels, + vertical, + (nint)formatter, + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1683 + /// , implot.cpp:1222 + ///
+ /// void Locator_Time(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_Time( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + ImPlotFormatter formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_Time_internal( + ticker, + range_fixed, + pixels, + vertical, + Marshal.GetFunctionPointerForDelegate(formatter), + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1683 + /// , implot.cpp:1222 + ///
+ /// void Locator_Time(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_Time( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + delegate* unmanaged[Cdecl] formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_Time_internal( + ticker, + range_fixed, + pixels, + vertical, + (nint)formatter, + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1684 + /// , implot.cpp:802 + ///
+ /// void Locator_Log10(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_Log10( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + ImPlotFormatter formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_Log10_internal( + ticker, + range_fixed, + pixels, + vertical, + Marshal.GetFunctionPointerForDelegate(formatter), + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1684 + /// , implot.cpp:802 + ///
+ /// void Locator_Log10(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_Log10( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + delegate* unmanaged[Cdecl] formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_Log10_internal( + ticker, + range_fixed, + pixels, + vertical, + (nint)formatter, + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1685 + /// , implot.cpp:819 + ///
+ /// void Locator_SymLog(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_SymLog( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + ImPlotFormatter formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_SymLog_internal( + ticker, + range_fixed, + pixels, + vertical, + Marshal.GetFunctionPointerForDelegate(formatter), + formatterData + ); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1685 + /// , implot.cpp:819 + ///
+ /// void Locator_SymLog(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ public static unsafe void Locator_SymLog( + ImPlotTickerPtr ticker, + in ImPlotRange range, + float pixels, + bool vertical, + delegate* unmanaged[Cdecl] formatter, + Ptr formatterData + ) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.Locator_SymLog_internal( + ticker, + range_fixed, + pixels, + vertical, + (nint)formatter, + formatterData + ); + } + } + } + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAlignmentData.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAlignmentData.gen.cs new file mode 100644 index 0000000..2c6046c --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAlignmentData.gen.cs @@ -0,0 +1,81 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotAlignmentDataExtensions + { + /// + /// + /// C++: + /// implot_internal.h:927 + ///
void Begin() + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public static unsafe void Begin(this ImPlotAlignmentDataPtr target) => + PInvoke.ImPlotAlignmentData_Begin_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:928 + ///
void Update(float& pad_a, float& pad_b, float& delta_a, float& delta_b) + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public static unsafe void Update( + this ImPlotAlignmentDataPtr target, + Ptr padA, + Ptr padB, + Ptr deltaA, + Ptr deltaB + ) => + PInvoke.ImPlotAlignmentData_Update_internal( + target, + (float*)padA, + (float*)padB, + (float*)deltaA, + (float*)deltaB + ); + + /// + /// + /// C++: + /// implot_internal.h:935 + ///
void End() + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public static unsafe void End(this ImPlotAlignmentDataPtr target) => + PInvoke.ImPlotAlignmentData_End_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:936 + ///
void Reset() + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public static unsafe void Reset(this ImPlotAlignmentDataPtr target) => + PInvoke.ImPlotAlignmentData_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAnnotationCollection.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAnnotationCollection.gen.cs new file mode 100644 index 0000000..7f5240a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAnnotationCollection.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotAnnotationCollectionExtensions + { + /// + /// + /// C++: + /// implot_internal.h:452 + ///
+ /// void AppendV(const ImVec2& pos, const ImVec2& off, ImU32 bg, ImU32 fg, bool clamp, const char* fmt, va_list args) IM_FMTLIST(7) + ///
+ ///
+ public static unsafe void AppendV( + this ImPlotAnnotationCollectionPtr target, + in float2 pos, + in float2 off, + uint bg, + uint fg, + bool clamp, + ImString text, + Ptr args + ) + { + fixed (byte* text_fixed = text) + { + fixed (float2* off_fixed = &off) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImPlotAnnotationCollection_AppendV_internal( + target, + pos_fixed, + off_fixed, + bg, + fg, + clamp, + text_fixed, + (byte*)args + ); + } + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:465 + ///
+ /// void Append(const ImVec2& pos, const ImVec2& off, ImU32 bg, ImU32 fg, bool clamp, const char* fmt, ...) IM_FMTARGS(7) + ///
+ ///
+ public static unsafe void Append( + this ImPlotAnnotationCollectionPtr target, + in float2 pos, + in float2 off, + uint bg, + uint fg, + bool clamp, + ImString text + ) + { + fixed (byte* text_fixed = text) + { + fixed (float2* off_fixed = &off) + { + fixed (float2* pos_fixed = &pos) + { + PInvoke.ImPlotAnnotationCollection_Append_internal( + target, + pos_fixed, + off_fixed, + bg, + fg, + clamp, + text_fixed + ); + } + } + } + } + + /// + /// + /// C++: + /// implot_internal.h:472 + ///
const char* GetText(int idx) + ///
+ ///
+ public static unsafe Ptr GetText(this ImPlotAnnotationCollectionPtr target, int idx) => + PInvoke.ImPlotAnnotationCollection_GetText_internal(target, idx); + + /// + /// + /// C++: + /// implot_internal.h:476 + ///
void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotAnnotationCollectionPtr target) => + PInvoke.ImPlotAnnotationCollection_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAxis.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAxis.gen.cs new file mode 100644 index 0000000..fb2fa3a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotAxis.gen.cs @@ -0,0 +1,367 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotAxisExtensions + { + /// + /// + /// C++: + /// implot_internal.h:697 + ///
inline void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_Reset_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:717 + ///
inline bool SetMin(double _min, bool force=false) + ///
+ ///
+ public static unsafe bool SetMin(this ImPlotAxisPtr target, double min, bool force = false) => + PInvoke.ImPlotAxis_SetMin_internal(target, min, force); + + /// + /// + /// C++: + /// implot_internal.h:736 + ///
inline bool SetMax(double _max, bool force=false) + ///
+ ///
+ public static unsafe bool SetMax(this ImPlotAxisPtr target, double max, bool force = false) => + PInvoke.ImPlotAxis_SetMax_internal(target, max, force); + + /// + /// + /// C++: + /// implot_internal.h:755 + ///
inline void SetRange(double v1, double v2) + ///
+ ///
+ public static unsafe void SetRange(this ImPlotAxisPtr target, double v1, double v2) => + PInvoke.ImPlotAxis_SetRange_internal_0(target, v1, v2); + + /// + /// + /// C++: + /// implot_internal.h:764 + ///
inline void SetRange(const ImPlotRange& range) + ///
+ ///
+ public static unsafe void SetRange(this ImPlotAxisPtr target, in ImPlotRange range) + { + fixed (ImPlotRange* range_fixed = &range) + { + PInvoke.ImPlotAxis_SetRange_internal_1(target, range_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:768 + ///
inline void SetAspect(double unit_per_pix) + ///
+ ///
+ public static unsafe void SetAspect(this ImPlotAxisPtr target, double unitPerPix) => + PInvoke.ImPlotAxis_SetAspect_internal(target, unitPerPix); + + /// + /// + /// C++: + /// implot_internal.h:781 + ///
inline float PixelSize() const + ///
+ ///
+ public static unsafe float PixelSize(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_PixelSize_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:783 + ///
inline double GetAspect() const + ///
+ ///
+ public static unsafe double GetAspect(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_GetAspect_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:785 + ///
inline void Constrain() + ///
+ ///
+ public static unsafe void Constrain(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_Constrain_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:807 + ///
inline void UpdateTransformCache() + ///
+ ///
+ public static unsafe void UpdateTransformCache(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_UpdateTransformCache_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:819 + ///
inline float PlotToPixels(double plt) const + ///
+ ///
+ public static unsafe float PlotToPixels(this ImPlotAxisPtr target, double plt) => + PInvoke.ImPlotAxis_PlotToPixels_internal(target, plt); + + /// + /// + /// C++: + /// implot_internal.h:829 + ///
inline double PixelsToPlot(float pix) const + ///
+ ///
+ public static unsafe double PixelsToPlot(this ImPlotAxisPtr target, float pix) => + PInvoke.ImPlotAxis_PixelsToPlot_internal(target, pix); + + /// + /// + /// C++: + /// implot_internal.h:839 + ///
inline void ExtendFit(double v) + ///
+ ///
+ public static unsafe void ExtendFit(this ImPlotAxisPtr target, double v) => + PInvoke.ImPlotAxis_ExtendFit_internal(target, v); + + /// + /// + /// C++: + /// implot_internal.h:846 + ///
inline void ExtendFitWith(ImPlotAxis& alt, double v, double v_alt) + ///
+ ///
+ public static unsafe void ExtendFitWith(this ImPlotAxisPtr target, ImPlotAxisPtr alt, double v, double vAlt) => + PInvoke.ImPlotAxis_ExtendFitWith_internal(target, alt, v, vAlt); + + /// + /// + /// C++: + /// implot_internal.h:855 + ///
inline void ApplyFit(float padding) + ///
+ ///
+ public static unsafe void ApplyFit(this ImPlotAxisPtr target, float padding) => + PInvoke.ImPlotAxis_ApplyFit_internal(target, padding); + + /// + /// + /// C++: + /// implot_internal.h:871 + ///
inline bool HasLabel() const + ///
+ ///
+ public static unsafe bool HasLabel(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_HasLabel_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:872 + ///
inline bool HasGridLines() const + ///
+ ///
+ public static unsafe bool HasGridLines(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_HasGridLines_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:873 + ///
inline bool HasTickLabels() const + ///
+ ///
+ public static unsafe bool HasTickLabels(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_HasTickLabels_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:874 + ///
inline bool HasTickMarks() const + ///
+ ///
+ public static unsafe bool HasTickMarks(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_HasTickMarks_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:875 + ///
inline bool WillRender() const + ///
+ ///
+ public static unsafe bool WillRender(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_WillRender_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:876 + ///
inline bool IsOpposite() const + ///
+ ///
+ public static unsafe bool IsOpposite(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsOpposite_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:877 + ///
inline bool IsInverted() const + ///
+ ///
+ public static unsafe bool IsInverted(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsInverted_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:878 + ///
inline bool IsForeground() const + ///
+ ///
+ public static unsafe bool IsForeground(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsForeground_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:879 + ///
inline bool IsAutoFitting() const + ///
+ ///
+ public static unsafe bool IsAutoFitting(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsAutoFitting_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:880 + ///
inline bool CanInitFit() const + ///
+ ///
+ public static unsafe bool CanInitFit(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_CanInitFit_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:881 + ///
inline bool IsRangeLocked() const + ///
+ ///
+ public static unsafe bool IsRangeLocked(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsRangeLocked_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:882 + ///
inline bool IsLockedMin() const + ///
+ ///
+ public static unsafe bool IsLockedMin(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsLockedMin_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:883 + ///
inline bool IsLockedMax() const + ///
+ ///
+ public static unsafe bool IsLockedMax(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsLockedMax_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:884 + ///
inline bool IsLocked() const + ///
+ ///
+ public static unsafe bool IsLocked(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_IsLocked_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:885 + ///
inline bool IsInputLockedMin() const + ///
+ ///
+ public static unsafe bool IsInputLockedMin(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsInputLockedMin_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:886 + ///
inline bool IsInputLockedMax() const + ///
+ ///
+ public static unsafe bool IsInputLockedMax(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsInputLockedMax_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:887 + ///
inline bool IsInputLocked() const + ///
+ ///
+ public static unsafe bool IsInputLocked(this ImPlotAxisPtr target) => + PInvoke.ImPlotAxis_IsInputLocked_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:888 + ///
inline bool HasMenus() const + ///
+ ///
+ public static unsafe bool HasMenus(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_HasMenus_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:890 + ///
inline bool IsPanLocked(bool increasing) + ///
+ ///
+ public static unsafe bool IsPanLocked(this ImPlotAxisPtr target, bool increasing) => + PInvoke.ImPlotAxis_IsPanLocked_internal(target, increasing); + + /// + /// + /// C++: + /// implot_internal.h:904 + ///
void PushLinks() + ///
+ ///
+ public static unsafe void PushLinks(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_PushLinks_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:909 + ///
void PullLinks() + ///
+ ///
+ public static unsafe void PullLinks(this ImPlotAxisPtr target) => PInvoke.ImPlotAxis_PullLinks_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotColormapData.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotColormapData.gen.cs new file mode 100644 index 0000000..f8c409f --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotColormapData.gen.cs @@ -0,0 +1,169 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotColormapDataExtensions + { + /// + /// + /// C++: + /// implot_internal.h:334 + ///
int Append(const char* name, const ImU32* keys, int count, bool qual) + ///
+ ///
+ public static unsafe int Append( + this ImPlotColormapDataPtr target, + ImString name, + Ptr keys, + int count, + bool qual + ) + { + fixed (byte* name_fixed = name) + { + return PInvoke.ImPlotColormapData_Append_internal(target, name_fixed, (uint*)keys, count, qual); + } + } + + /// + /// + /// C++: + /// implot_internal.h:352 + ///
void _AppendTable(ImPlotColormap cmap) + ///
+ ///
+ public static unsafe void AppendTable(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_AppendTable_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:391 + ///
void RebuildTables() + ///
+ ///
+ public static unsafe void RebuildTables(this ImPlotColormapDataPtr target) => + PInvoke.ImPlotColormapData_RebuildTables_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:399 + ///
inline bool IsQual(ImPlotColormap cmap) const + ///
+ ///
+ public static unsafe bool IsQual(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_IsQual_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:400 + ///
inline const char* GetName(ImPlotColormap cmap) const + ///
+ ///
+ public static unsafe Ptr GetName(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_GetName_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:401 + ///
inline ImPlotColormap GetIndex(const char* name) const + ///
+ ///
+ public static unsafe ImPlotColormap GetIndex(this ImPlotColormapDataPtr target, ImString name) + { + fixed (byte* name_fixed = name) + { + return PInvoke.ImPlotColormapData_GetIndex_internal(target, name_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:403 + ///
inline const ImU32* GetKeys(ImPlotColormap cmap) const + ///
+ ///
+ public static unsafe Ptr GetKeys(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_GetKeys_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:404 + ///
inline int GetKeyCount(ImPlotColormap cmap) const + ///
+ ///
+ public static unsafe int GetKeyCount(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_GetKeyCount_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:405 + ///
inline ImU32 GetKeyColor(ImPlotColormap cmap, int idx) const + ///
+ ///
+ public static unsafe uint GetKeyColor(this ImPlotColormapDataPtr target, ImPlotColormap cmap, int idx) => + PInvoke.ImPlotColormapData_GetKeyColor_internal(target, cmap, idx); + + /// + /// + /// C++: + /// implot_internal.h:406 + ///
inline void SetKeyColor(ImPlotColormap cmap, int idx, ImU32 value) + ///
+ ///
+ public static unsafe void SetKeyColor( + this ImPlotColormapDataPtr target, + ImPlotColormap cmap, + int idx, + uint value + ) => PInvoke.ImPlotColormapData_SetKeyColor_internal(target, cmap, idx, value); + + /// + /// + /// C++: + /// implot_internal.h:408 + ///
inline const ImU32* GetTable(ImPlotColormap cmap) const + ///
+ ///
+ public static unsafe Ptr GetTable(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_GetTable_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:409 + ///
inline int GetTableSize(ImPlotColormap cmap) const + ///
+ ///
+ public static unsafe int GetTableSize(this ImPlotColormapDataPtr target, ImPlotColormap cmap) => + PInvoke.ImPlotColormapData_GetTableSize_internal(target, cmap); + + /// + /// + /// C++: + /// implot_internal.h:410 + ///
inline ImU32 GetTableColor(ImPlotColormap cmap, int idx) const + ///
+ ///
+ public static unsafe uint GetTableColor(this ImPlotColormapDataPtr target, ImPlotColormap cmap, int idx) => + PInvoke.ImPlotColormapData_GetTableColor_internal(target, cmap, idx); + + /// + /// + /// C++: + /// implot_internal.h:412 + ///
inline ImU32 LerpTable(ImPlotColormap cmap, float t) const + ///
+ ///
+ public static unsafe uint LerpTable(this ImPlotColormapDataPtr target, ImPlotColormap cmap, float t) => + PInvoke.ImPlotColormapData_LerpTable_internal(target, cmap, t); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotItemGroup.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotItemGroup.gen.cs new file mode 100644 index 0000000..c37dccb --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotItemGroup.gen.cs @@ -0,0 +1,129 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotItemGroupExtensions + { + /// + /// + /// C++: + /// implot_internal.h:999 + ///
int GetItemCount() const + ///
+ ///
+ public static unsafe int GetItemCount(this ImPlotItemGroupPtr target) => + PInvoke.ImPlotItemGroup_GetItemCount_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1000 + ///
ImGuiID GetItemID(const char* label_id) + ///
+ ///
+ public static unsafe ImGuiID GetItemID(this ImPlotItemGroupPtr target, ImString labelId) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.ImPlotItemGroup_GetItemID_internal(target, labelId_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1001 + ///
ImPlotItem* GetItem(ImGuiID id) + ///
+ ///
+ public static unsafe ImPlotItemPtr GetItem(this ImPlotItemGroupPtr target, ImGuiID id) => + PInvoke.ImPlotItemGroup_GetItem_internal_0(target, id); + + /// + /// + /// C++: + /// implot_internal.h:1002 + ///
ImPlotItem* GetItem(const char* label_id) + ///
+ ///
+ public static unsafe ImPlotItemPtr GetItem(this ImPlotItemGroupPtr target, ImString labelId) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.ImPlotItemGroup_GetItem_internal_1(target, labelId_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1003 + ///
ImPlotItem* GetOrAddItem(ImGuiID id) + ///
+ ///
+ public static unsafe ImPlotItemPtr GetOrAddItem(this ImPlotItemGroupPtr target, ImGuiID id) => + PInvoke.ImPlotItemGroup_GetOrAddItem_internal(target, id); + + /// + /// + /// C++: + /// implot_internal.h:1004 + ///
ImPlotItem* GetItemByIndex(int i) + ///
+ ///
+ public static unsafe ImPlotItemPtr GetItemByIndex(this ImPlotItemGroupPtr target, int i) => + PInvoke.ImPlotItemGroup_GetItemByIndex_internal(target, i); + + /// + /// + /// C++: + /// implot_internal.h:1005 + ///
int GetItemIndex(ImPlotItem* item) + ///
+ ///
+ public static unsafe int GetItemIndex(this ImPlotItemGroupPtr target, ImPlotItemPtr item) => + PInvoke.ImPlotItemGroup_GetItemIndex_internal(target, item); + + /// + /// + /// C++: + /// implot_internal.h:1006 + ///
int GetLegendCount() const + ///
+ ///
+ public static unsafe int GetLegendCount(this ImPlotItemGroupPtr target) => + PInvoke.ImPlotItemGroup_GetLegendCount_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1007 + ///
ImPlotItem* GetLegendItem(int i) + ///
+ ///
+ public static unsafe ImPlotItemPtr GetLegendItem(this ImPlotItemGroupPtr target, int i) => + PInvoke.ImPlotItemGroup_GetLegendItem_internal(target, i); + + /// + /// + /// C++: + /// implot_internal.h:1008 + ///
const char* GetLegendLabel(int i) + ///
+ ///
+ public static unsafe Ptr GetLegendLabel(this ImPlotItemGroupPtr target, int i) => + PInvoke.ImPlotItemGroup_GetLegendLabel_internal(target, i); + + /// + /// + /// C++: + /// implot_internal.h:1009 + ///
void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotItemGroupPtr target) => + PInvoke.ImPlotItemGroup_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotLegend.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotLegend.gen.cs new file mode 100644 index 0000000..63a51ec --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotLegend.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotLegendExtensions + { + /// + /// + /// C++: + /// implot_internal.h:986 + ///
void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotLegendPtr target) => PInvoke.ImPlotLegend_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextItemData.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextItemData.gen.cs new file mode 100644 index 0000000..6ede610 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextItemData.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotNextItemDataExtensions + { + /// + /// + /// C++: + /// implot_internal.h:1194 + ///
void Reset() + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public static unsafe void Reset(this ImPlotNextItemDataPtr target) => + PInvoke.ImPlotNextItemData_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextPlotData.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextPlotData.gen.cs new file mode 100644 index 0000000..f7feaf6 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotNextPlotData.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotNextPlotDataExtensions + { + /// + /// + /// C++: + /// implot_internal.h:1164 + ///
void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotNextPlotDataPtr target) => + PInvoke.ImPlotNextPlotData_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotPlot.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotPlot.gen.cs new file mode 100644 index 0000000..9a12eca --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotPlot.gen.cs @@ -0,0 +1,133 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotPlotExtensions + { + /// + /// + /// C++: + /// implot_internal.h:1059 + ///
inline bool IsInputLocked() const + ///
+ ///
+ public static unsafe bool IsInputLocked(this ImPlotPlotPtr target) => + PInvoke.ImPlotPlot_IsInputLocked_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1071 + ///
inline void ClearTextBuffer() + ///
+ ///
+ public static unsafe void ClearTextBuffer(this ImPlotPlotPtr target) => + PInvoke.ImPlotPlot_ClearTextBuffer_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1073 + ///
inline void SetTitle(const char* title) + ///
+ ///
+ public static unsafe void SetTitle(this ImPlotPlotPtr target, ImString title) + { + fixed (byte* title_fixed = title) + { + PInvoke.ImPlotPlot_SetTitle_internal(target, title_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1082 + ///
inline bool HasTitle() const + ///
+ ///
+ public static unsafe bool HasTitle(this ImPlotPlotPtr target) => PInvoke.ImPlotPlot_HasTitle_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1083 + ///
inline const char* GetTitle() const + ///
+ ///
+ public static unsafe Ptr GetTitle(this ImPlotPlotPtr target) => + PInvoke.ImPlotPlot_GetTitle_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1085 + ///
inline ImPlotAxis& XAxis(int i) + ///
+ ///
+ public static unsafe ImPlotAxisPtr XAxis(this ImPlotPlotPtr target, int i) => + PInvoke.ImPlotPlot_XAxis_internal_0(target, i); + + /// + /// + /// C++: + /// implot_internal.h:1087 + ///
inline ImPlotAxis& YAxis(int i) + ///
+ ///
+ public static unsafe ImPlotAxisPtr YAxis(this ImPlotPlotPtr target, int i) => + PInvoke.ImPlotPlot_YAxis_internal_0(target, i); + + /// + /// + /// C++: + /// implot_internal.h:1090 + ///
inline int EnabledAxesX() + ///
+ ///
+ public static unsafe int EnabledAxesX(this ImPlotPlotPtr target) => + PInvoke.ImPlotPlot_EnabledAxesX_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1097 + ///
inline int EnabledAxesY() + ///
+ ///
+ public static unsafe int EnabledAxesY(this ImPlotPlotPtr target) => + PInvoke.ImPlotPlot_EnabledAxesY_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:1104 + ///
inline void SetAxisLabel(ImPlotAxis& axis, const char* label) + ///
+ ///
+ public static unsafe void SetAxisLabel(this ImPlotPlotPtr target, ImPlotAxisPtr axis, ImString label) + { + fixed (byte* label_fixed = label) + { + PInvoke.ImPlotPlot_SetAxisLabel_internal(target, axis, label_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:1114 + ///
inline const char* GetAxisLabel(const ImPlotAxis& axis) const + ///
+ ///
+ public static unsafe Ptr GetAxisLabel(this ImPlotPlotPtr target, in ImPlotAxis axis) + { + fixed (ImPlotAxis* axis_fixed = &axis) + { + return PInvoke.ImPlotPlot_GetAxisLabel_internal(target, axis_fixed); + } + } + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTagCollection.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTagCollection.gen.cs new file mode 100644 index 0000000..5f16e73 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTagCollection.gen.cs @@ -0,0 +1,76 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotTagCollectionExtensions + { + /// + /// + /// C++: + /// implot_internal.h:499 + ///
+ /// void AppendV(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, va_list args) IM_FMTLIST(6) + ///
+ ///
+ public static unsafe void AppendV( + this ImPlotTagCollectionPtr target, + ImAxis axis, + double value, + uint bg, + uint fg, + ImString text, + Ptr args + ) + { + fixed (byte* text_fixed = text) + { + PInvoke.ImPlotTagCollection_AppendV_internal(target, axis, value, bg, fg, text_fixed, (byte*)args); + } + } + + /// + /// + /// C++: + /// implot_internal.h:513 + ///
+ /// void Append(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, ...) IM_FMTARGS(6) + ///
+ ///
+ public static unsafe void Append( + this ImPlotTagCollectionPtr target, + ImAxis axis, + double value, + uint bg, + uint fg, + ImString text + ) + { + fixed (byte* text_fixed = text) + { + PInvoke.ImPlotTagCollection_Append_internal(target, axis, value, bg, fg, text_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:520 + ///
const char* GetText(int idx) + ///
+ ///
+ public static unsafe Ptr GetText(this ImPlotTagCollectionPtr target, int idx) => + PInvoke.ImPlotTagCollection_GetText_internal(target, idx); + + /// + /// + /// C++: + /// implot_internal.h:524 + ///
void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotTagCollectionPtr target) => + PInvoke.ImPlotTagCollection_Reset_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTicker.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTicker.gen.cs new file mode 100644 index 0000000..19c36fd --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTicker.gen.cs @@ -0,0 +1,146 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotTickerExtensions + { + /// + /// + /// C++: + /// implot_internal.h:565 + ///
+ /// ImPlotTick& AddTick(double value, bool major, int level, bool show_label, const char* label) + ///
+ ///
+ public static unsafe ImPlotTickPtr AddTick( + this ImPlotTickerPtr target, + double value, + bool major, + int level, + bool showLabel, + ImString label + ) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ImPlotTicker_AddTick_internal_0(target, value, major, level, showLabel, label_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:575 + ///
+ /// ImPlotTick& AddTick(double value, bool major, int level, bool show_label, ImPlotFormatter formatter, void* data) + ///
+ ///
+ public static unsafe ImPlotTickPtr AddTick( + this ImPlotTickerPtr target, + double value, + bool major, + int level, + bool showLabel, + ImPlotFormatter formatter, + Ptr data + ) => + PInvoke.ImPlotTicker_AddTick_internal_1( + target, + value, + major, + level, + showLabel, + Marshal.GetFunctionPointerForDelegate(formatter), + data + ); + + /// + /// + /// C++: + /// implot_internal.h:575 + ///
+ /// ImPlotTick& AddTick(double value, bool major, int level, bool show_label, ImPlotFormatter formatter, void* data) + ///
+ ///
+ public static unsafe ImPlotTickPtr AddTick( + this ImPlotTickerPtr target, + double value, + bool major, + int level, + bool showLabel, + delegate* unmanaged[Cdecl] formatter, + Ptr data + ) => PInvoke.ImPlotTicker_AddTick_internal_1(target, value, major, level, showLabel, (nint)formatter, data); + + /// + /// + /// C++: + /// implot_internal.h:587 + ///
inline ImPlotTick& AddTick(ImPlotTick tick) + ///
+ ///
+ public static unsafe ImPlotTickPtr AddTick(this ImPlotTickerPtr target, ImPlotTick tick) => + PInvoke.ImPlotTicker_AddTick_internal_2(target, tick); + + /// + /// + /// C++: + /// implot_internal.h:597 + ///
const char* GetText(int idx) const + ///
+ ///
+ public static unsafe Ptr GetText(this ImPlotTickerPtr target, int idx) => + PInvoke.ImPlotTicker_GetText_internal_0(target, idx); + + /// + /// + /// C++: + /// implot_internal.h:601 + ///
const char* GetText(const ImPlotTick& tick) + ///
+ ///
+ public static unsafe Ptr GetText(this ImPlotTickerPtr target, in ImPlotTick tick) + { + fixed (ImPlotTick* tick_fixed = &tick) + { + return PInvoke.ImPlotTicker_GetText_internal_1(target, tick_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:605 + ///
void OverrideSizeLate(const ImVec2& size) + ///
+ ///
+ public static unsafe void OverrideSizeLate(this ImPlotTickerPtr target, in float2 size) + { + fixed (float2* size_fixed = &size) + { + PInvoke.ImPlotTicker_OverrideSizeLate_internal(target, size_fixed); + } + } + + /// + /// + /// C++: + /// implot_internal.h:610 + ///
void Reset() + ///
+ ///
+ public static unsafe void Reset(this ImPlotTickerPtr target) => PInvoke.ImPlotTicker_Reset_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:618 + ///
int TickCount() const + ///
+ ///
+ public static unsafe int TickCount(this ImPlotTickerPtr target) => + PInvoke.ImPlotTicker_TickCount_internal(target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTime.gen.cs b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTime.gen.cs new file mode 100644 index 0000000..4284c75 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Functions/ImPlotTime.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public static partial class ImPlotTimeExtensions + { + /// + /// + /// C++: + /// implot_internal.h:298 + ///
void RollOver() + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + public static unsafe void RollOver(this ImPlotTimePtr target) => PInvoke.ImPlotTime_RollOver_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:299 + ///
double ToDouble() const + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + public static unsafe double ToDouble(this ImPlotTimePtr target) => PInvoke.ImPlotTime_ToDouble_internal(target); + + /// + /// + /// C++: + /// implot_internal.h:300 + ///
static ImPlotTime FromDouble(double t) + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + public static unsafe ImPlotTime FromDouble(this ImPlotTimePtr target, double t) => + PInvoke.ImPlotTime_FromDouble_internal(target, t); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/InlineArrays.gen.cs b/Brutal.ImPlot/Generated-Internal/InlineArrays.gen.cs new file mode 100644 index 0000000..f0ad6e4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/InlineArrays.gen.cs @@ -0,0 +1,80 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal.InlineArrays +{ + /// + /// Represents an inline array of ImPlotAxis with a fixed size of 6. + /// + [InlineArray(6)] + public struct ImPlotAxis_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImPlotAxis Items; + } + + /// + /// Represents an inline array of ImPlotCond with a fixed size of 6. + /// + [InlineArray(6)] + public struct ImPlotCond_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImPlotCond Items; + } + + /// + /// Represents an inline array of ImPlotRange with a fixed size of 6. + /// + [InlineArray(6)] + public struct ImPlotRange_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ImPlotRange Items; + } + + /// + /// Represents an inline array of Bool8 with a fixed size of 6. + /// + [InlineArray(6)] + public struct Bool8_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public Bool8 Items; + } + + /// + /// Represents an inline array of Ptr<double> with a fixed size of 6. + /// + [InlineArray(6)] + public struct Ptr_double__6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public Ptr Items; + } + + /// + /// Represents an inline array of float4 with a fixed size of 5. + /// + [InlineArray(5)] + public struct float4_5 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float4 Items; + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AddTextCentered_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AddTextCentered_internal.gen.cs new file mode 100644 index 0000000..1f70066 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AddTextCentered_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1456 + /// , implot.cpp:388
+ /// void AddTextCentered(ImDrawList* DrawList, ImVec2 top_center, ImU32 col, const char* text_begin, const char* text_end = nullptr) + ///
+ ///
+ /// + /// + /// Draws multiline horizontal text centered. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void AddTextCentered_internal( + ImDrawList* DrawList, + float2 top_center, + uint col, + byte* text_begin, + byte* text_end + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AddTextVertical_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AddTextVertical_internal.gen.cs new file mode 100644 index 0000000..ad5d063 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AddTextVertical_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1454 + /// , implot.cpp:340
+ /// void AddTextVertical(ImDrawList *DrawList, ImVec2 pos, ImU32 col, const char* text_begin, const char* text_end = nullptr) + ///
+ ///
+ /// + /// + /// Draws vertical text. The position is the bottom left of the text rect. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void AddTextVertical_internal( + ImDrawList* DrawList, + float2 pos, + uint col, + byte* text_begin, + byte* text_end + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AddTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AddTime_internal.gen.cs new file mode 100644 index 0000000..d8e34cc --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AddTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1587 + /// , implot.cpp:993
+ /// ImPlotTime AddTime(const ImPlotTime& t, ImPlotTimeUnit unit, int count) + ///
+ ///
+ /// + /// + /// Adds or subtracts time from a timestamp. #count > 0 to add, < 0 to subtract. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime AddTime_internal(ImPlotTime* t, ImPlotTimeUnit unit, int count); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AllAxesInputLocked_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AllAxesInputLocked_internal.gen.cs new file mode 100644 index 0000000..46e0fbe --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AllAxesInputLocked_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1352 + ///
static inline bool AllAxesInputLocked(ImPlotAxis* axes, int count) + ///
+ ///
+ /// + /// + /// Returns true if all enabled axes are locked from user input. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 AllAxesInputLocked_internal(ImPlotAxis* axes, int count); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHeld_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHeld_internal.gen.cs new file mode 100644 index 0000000..90d73c6 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHeld_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1360 + ///
static inline bool AnyAxesHeld(ImPlotAxis* axes, int count) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 AnyAxesHeld_internal(ImPlotAxis* axes, int count); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHovered_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHovered_internal.gen.cs new file mode 100644 index 0000000..0a5831c --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesHovered_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1368 + ///
static inline bool AnyAxesHovered(ImPlotAxis* axes, int count) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 AnyAxesHovered_internal(ImPlotAxis* axes, int count); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesInputLocked_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesInputLocked_internal.gen.cs new file mode 100644 index 0000000..8db64f2 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/AnyAxesInputLocked_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1343 + ///
static inline bool AnyAxesInputLocked(ImPlotAxis* axes, int count) + ///
+ ///
+ /// + /// + /// Returns true if any enabled axis is locked from user input. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 AnyAxesInputLocked_internal(ImPlotAxis* axes, int count); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/BeginItem_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/BeginItem_internal.gen.cs new file mode 100644 index 0000000..6893cfb --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/BeginItem_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1312 + /// , + /// implot_items.cpp:398 + ///
+ /// bool BeginItem(const char* label_id, ImPlotItemFlags flags=0, ImPlotCol recolor_from=IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Begins a new item. Returns false if the item should not be plotted. Pushes PlotClipRect. + /// + /// + /// Begins a new item. Returns false if the item should not be plotted. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginItem_internal( + byte* label_id, + ImPlotItemFlags flags, + ImPlotCol recolor_from + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/BustItemCache_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/BustItemCache_internal.gen.cs new file mode 100644 index 0000000..26ab451 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/BustItemCache_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1336 + /// , + /// implot_items.cpp:360 + ///
void BustItemCache() + ///
+ ///
+ /// + /// + /// Busts the cache for every item for every plot in the current context. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void BustItemCache_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/BustPlotCache_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/BustPlotCache_internal.gen.cs new file mode 100644 index 0000000..5d9b5d4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/BustPlotCache_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1280 + /// , implot.cpp:546
+ /// void BustPlotCache() + ///
+ ///
+ /// + /// + /// Busts the cache for every plot in the current context + /// + /// + [LibraryImport("implot")] + public static unsafe partial void BustPlotCache_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CalcHoverColor_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcHoverColor_internal.gen.cs new file mode 100644 index 0000000..c1397c4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcHoverColor_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1466 + ///
static inline ImU32 CalcHoverColor(ImU32 col) + ///
+ ///
+ /// + /// + /// Lightens or darkens a color for hover + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint CalcHoverColor_internal(uint col); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CalcLegendSize_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcLegendSize_internal.gen.cs new file mode 100644 index 0000000..3fbd179 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcLegendSize_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1418 + /// , implot.cpp:576
+ /// ImVec2 CalcLegendSize(ImPlotItemGroup& items, const ImVec2& pad, const ImVec2& spacing, bool vertical) + ///
+ ///
+ /// + /// + /// Calculates the bounding box size of a legend _before_ clipping. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 CalcLegendSize_internal( + ImPlotItemGroup* items, + float2* pad, + float2* spacing, + Bool8 vertical + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextColor_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextColor_internal.gen.cs new file mode 100644 index 0000000..ba31f46 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextColor_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1463 + ///
static inline ImU32 CalcTextColor(const ImVec4& bg) + ///
+ ///
+ /// + /// + /// Returns white or black text given background color + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint CalcTextColor_internal_0(float4* bg); + + /// + /// + /// C++: + /// implot_internal.h:1464 + ///
static inline ImU32 CalcTextColor(ImU32 bg) + ///
+ ///
+ /// + /// + /// Returns white or black text given background color + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint CalcTextColor_internal_1(uint bg); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextSizeVertical_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextSizeVertical_internal.gen.cs new file mode 100644 index 0000000..ee2727e --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CalcTextSizeVertical_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1458 + ///
static inline ImVec2 CalcTextSizeVertical(const char *text) + ///
+ ///
+ /// + /// + /// Calculates the size of vertical text + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 CalcTextSizeVertical_internal(byte* text); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CalculateBins_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CalculateBins_internal.gen.cs new file mode 100644 index 0000000..61e72da --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CalculateBins_internal.gen.cs @@ -0,0 +1,229 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_float( + float* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_double( + double* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_sbyte( + sbyte* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_byte( + byte* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_short( + short* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_ushort( + ushort* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_int( + int* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_uint( + uint* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_long( + long* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + + /// + /// + /// C++: + /// implot_internal.h:1520 + ///
template <typename T> + ///
+ ///
+ /// + /// + /// Calculate histogram bin counts and widths + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CalculateBins_internal_ulong( + ulong* values, + int count, + ImPlotBin meth, + ImPlotRange* range, + int* bins_out, + double* width_out + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CeilTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CeilTime_internal.gen.cs new file mode 100644 index 0000000..55ccb68 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CeilTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1591 + /// , implot.cpp:1042 + ///
ImPlotTime CeilTime(const ImPlotTime& t, ImPlotTimeUnit unit) + ///
+ ///
+ /// + /// + /// Rounds a timestamp up to the nearest unit. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime CeilTime_internal(ImPlotTime* t, ImPlotTimeUnit unit); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ClampLabelPos_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ClampLabelPos_internal.gen.cs new file mode 100644 index 0000000..0ca5581 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ClampLabelPos_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1469 + ///
+ /// static inline ImVec2 ClampLabelPos(ImVec2 pos, const ImVec2& size, const ImVec2& Min, const ImVec2& Max) + ///
+ ///
+ /// + /// + /// Clamps a label position so that it fits a rect defined by Min/Max + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 ClampLabelPos_internal(float2 pos, float2* size, float2* Min, float2* Max); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ClampLegendRect_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ClampLegendRect_internal.gen.cs new file mode 100644 index 0000000..d9df4be --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ClampLegendRect_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1420 + /// , implot.cpp:597
+ /// bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2& pad) + ///
+ ///
+ /// + /// + /// Clips calculated legend size + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ClampLegendRect_internal( + floatRect* legend_rect, + floatRect* outer_rect, + float2* pad + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/CombineDateTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/CombineDateTime_internal.gen.cs new file mode 100644 index 0000000..4ba5aa8 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/CombineDateTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1595 + /// , implot.cpp:1054 + ///
ImPlotTime CombineDateTime(const ImPlotTime& date_part, const ImPlotTime& time_part) + ///
+ ///
+ /// + /// + /// Combines the date of one timestamp with the time-of-day of another timestamp. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime CombineDateTime_internal(ImPlotTime* date_part, ImPlotTime* time_part); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/EndItem_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/EndItem_internal.gen.cs new file mode 100644 index 0000000..ada1c68 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/EndItem_internal.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1327 + /// , + /// implot_items.cpp:479 + ///
void EndItem() + ///
+ ///
+ /// + /// + /// Ends an item (call only if BeginItem returns true). Pops PlotClipRect. + /// + /// + /// Ends an item (call only if BeginItem returns true) + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndItem_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FitPointX_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FitPointX_internal.gen.cs new file mode 100644 index 0000000..af2307a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FitPointX_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1382 + ///
static inline void FitPointX(double x) + ///
+ ///
+ /// + /// + /// Extends the current plot's axes so that it encompasses a vertical line at x + /// + /// + [LibraryImport("implot")] + public static unsafe partial void FitPointX_internal(double x); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FitPointY_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FitPointY_internal.gen.cs new file mode 100644 index 0000000..7baf373 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FitPointY_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1389 + ///
static inline void FitPointY(double y) + ///
+ ///
+ /// + /// + /// Extends the current plot's axes so that it encompasses a horizontal line at y + /// + /// + [LibraryImport("implot")] + public static unsafe partial void FitPointY_internal(double y); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FitPoint_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FitPoint_internal.gen.cs new file mode 100644 index 0000000..896835f --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FitPoint_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1396 + ///
static inline void FitPoint(const ImPlotPoint& p) + ///
+ ///
+ /// + /// + /// Extends the current plot's axes so that it encompasses point p + /// + /// + [LibraryImport("implot")] + public static unsafe partial void FitPoint_internal(double2* p); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FitThisFrame_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FitThisFrame_internal.gen.cs new file mode 100644 index 0000000..deee103 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FitThisFrame_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1377 + ///
static inline bool FitThisFrame() + ///
+ ///
+ /// + /// + /// Returns true if the user has requested data to be fit. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 FitThisFrame_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FloorTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FloorTime_internal.gen.cs new file mode 100644 index 0000000..dcd91b2 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FloorTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1589 + /// , implot.cpp:1025 + ///
ImPlotTime FloorTime(const ImPlotTime& t, ImPlotTimeUnit unit) + ///
+ ///
+ /// + /// + /// Rounds a timestamp down to nearest unit. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime FloorTime_internal(ImPlotTime* t, ImPlotTimeUnit unit); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FormatDateTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FormatDateTime_internal.gen.cs new file mode 100644 index 0000000..814a2c5 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FormatDateTime_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1607 + /// , implot.cpp:1144 + ///
int FormatDateTime(const ImPlotTime& t, char* buffer, int size, ImPlotDateTimeSpec fmt) + ///
+ ///
+ /// + /// + /// Formats the time and/or date parts of a timestamp t into a buffer according to #fmt + /// + /// + [LibraryImport("implot")] + public static unsafe partial int FormatDateTime_internal( + ImPlotTime* t, + byte* buffer, + int size, + ImPlotDateTimeSpec fmt + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FormatDate_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FormatDate_internal.gen.cs new file mode 100644 index 0000000..25f2863 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FormatDate_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1605 + /// , implot.cpp:1115 + ///
+ /// int FormatDate(const ImPlotTime& t, char* buffer, int size, ImPlotDateFmt fmt, bool use_iso_8601) + ///
+ ///
+ /// + /// + /// Formats the date part of timestamp t into a buffer according to #fmt + /// + /// + [LibraryImport("implot")] + public static unsafe partial int FormatDate_internal( + ImPlotTime* t, + byte* buffer, + int size, + ImPlotDateFmt fmt, + Bool8 use_iso_8601 + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/FormatTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/FormatTime_internal.gen.cs new file mode 100644 index 0000000..5afe3d4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/FormatTime_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1603 + /// , implot.cpp:1075 + ///
+ /// int FormatTime(const ImPlotTime& t, char* buffer, int size, ImPlotTimeFmt fmt, bool use_24_hr_clk) + ///
+ ///
+ /// + /// + /// Formats the time part of timestamp t into a buffer according to #fmt + /// + /// + [LibraryImport("implot")] + public static unsafe partial int FormatTime_internal( + ImPlotTime* t, + byte* buffer, + int size, + ImPlotTimeFmt fmt, + Bool8 use_24_hr_clk + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Formatter_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Formatter_internal.gen.cs new file mode 100644 index 0000000..9bf0416 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Formatter_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1652 + ///
static inline int Formatter_Default(double value, char* buff, int size, void* data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int Formatter_Default_internal(double value, byte* buff, int size, void* data); + + /// + /// + /// C++: + /// implot_internal.h:1657 + ///
static inline int Formatter_Logit(double value, char* buff, int size, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int Formatter_Logit_internal(double value, byte* buff, int size, void* _); + + /// + /// + /// C++: + /// implot_internal.h:1673 + ///
static inline int Formatter_Time(double, char* buff, int size, void* data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int Formatter_Time_internal(double _, byte* buff, int size, void* data); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetAutoColor_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetAutoColor_internal.gen.cs new file mode 100644 index 0000000..5628799 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetAutoColor_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1447 + /// , implot.cpp:262
+ /// ImVec4 GetAutoColor(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the automatically deduced style color + /// + /// + [LibraryImport("implot")] + public static unsafe partial float4 GetAutoColor_internal(ImPlotCol idx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetColormapColorU32_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetColormapColorU32_internal.gen.cs new file mode 100644 index 0000000..c07e90e --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetColormapColorU32_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1478 + /// , implot.cpp:4572 + ///
ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Returns a color from the Color map given an index >= 0 (modulo will be performed). + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint GetColormapColorU32_internal(int idx, ImPlotColormap cmap); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentItem_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentItem_internal.gen.cs new file mode 100644 index 0000000..08ad0a7 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentItem_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1334 + /// , + /// implot_items.cpp:320 + ///
ImPlotItem* GetCurrentItem() + ///
+ ///
+ /// + /// + /// Gets the current item. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotItem* GetCurrentItem_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentPlot_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentPlot_internal.gen.cs new file mode 100644 index 0000000..faa04cf --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetCurrentPlot_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1278 + /// , implot.cpp:542
+ /// ImPlotPlot* GetCurrentPlot() + ///
+ ///
+ /// + /// + /// Gets the current plot from the current ImPlotContext + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotPlot* GetCurrentPlot_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetDaysInMonth_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetDaysInMonth_internal.gen.cs new file mode 100644 index 0000000..08530d6 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetDaysInMonth_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1549 + ///
static inline int GetDaysInMonth(int year, int month) + ///
+ ///
+ /// + /// + /// Returns the number of days in a month, accounting for Feb. leap years. #month is zero indexed. + /// + /// + [LibraryImport("implot")] + public static unsafe partial int GetDaysInMonth_internal(int year, int month); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetGmtTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetGmtTime_internal.gen.cs new file mode 100644 index 0000000..5a90103 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetGmtTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1557 + /// , implot.cpp:927
+ /// tm* GetGmtTime(const ImPlotTime& t, tm* ptm) + ///
+ ///
+ /// + /// + /// Make a tm struct expressed in UTC time (i.e. GMT timezone) from a UNIX timestamp. + /// + /// + [LibraryImport("implot")] + public static unsafe partial tm* GetGmtTime_internal(ImPlotTime* t, tm* ptm); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetItemData_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetItemData_internal.gen.cs new file mode 100644 index 0000000..038ccc8 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetItemData_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1440 + ///
static inline const ImPlotNextItemData& GetItemData() + ///
+ ///
+ /// + /// + /// Get styling data for next item (call between Begin/EndItem) + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotNextItemData* GetItemData_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetItem_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetItem_internal.gen.cs new file mode 100644 index 0000000..065b86a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetItem_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1332 + /// , + /// implot_items.cpp:310 + ///
ImPlotItem* GetItem(const char* label_id) + ///
+ ///
+ /// + /// + /// Get a plot item from the current plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotItem* GetItem_internal(byte* label_id); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetLocTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetLocTime_internal.gen.cs new file mode 100644 index 0000000..bcd3c0f --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetLocTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1562 + /// , implot.cpp:947
+ /// tm* GetLocTime(const ImPlotTime& t, tm* ptm) + ///
+ ///
+ /// + /// + /// Make a tm struct expressed in local time from a UNIX timestamp. + /// + /// + [LibraryImport("implot")] + public static unsafe partial tm* GetLocTime_internal(ImPlotTime* t, tm* ptm); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetLocationPos_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetLocationPos_internal.gen.cs new file mode 100644 index 0000000..d1d0416 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetLocationPos_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1416 + /// , implot.cpp:556
+ /// ImVec2 GetLocationPos(const ImRect& outer_rect, const ImVec2& inner_size, ImPlotLocation location, const ImVec2& pad = ImVec2(0,0)) + ///
+ ///
+ /// + /// + /// Gets the position of an inner rect that is located inside of an outer rect according to an + /// ImPlotLocation and padding amount. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 GetLocationPos_internal( + floatRect* outer_rect, + float2* inner_size, + ImPlotLocation location, + float2* pad + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetMonth_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetMonth_internal.gen.cs new file mode 100644 index 0000000..7f10a03 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetMonth_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1584 + /// , implot.cpp:987
+ /// int GetMonth(const ImPlotTime& t) + ///
+ ///
+ /// + /// + /// Get month component from timestamp [0-11] + /// + /// + [LibraryImport("implot")] + public static unsafe partial int GetMonth_internal(ImPlotTime* t); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetPlot_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetPlot_internal.gen.cs new file mode 100644 index 0000000..f513c9b --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetPlot_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1276 + /// , implot.cpp:536
+ /// ImPlotPlot* GetPlot(const char* title) + ///
+ ///
+ /// + /// + /// Gets a plot from the current ImPlotContext + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotPlot* GetPlot_internal(byte* title); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorU32_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorU32_internal.gen.cs new file mode 100644 index 0000000..7960967 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorU32_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1451 + ///
static inline ImU32 GetStyleColorU32(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the style color whether it is automatic or custom set + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint GetStyleColorU32_internal(ImPlotCol idx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorVec4_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorVec4_internal.gen.cs new file mode 100644 index 0000000..4966604 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetStyleColorVec4_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1450 + ///
static inline ImVec4 GetStyleColorVec4(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the style color whether it is automatic or custom set + /// + /// + [LibraryImport("implot")] + public static unsafe partial float4 GetStyleColorVec4_internal(ImPlotCol idx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetTime_internal.gen.cs new file mode 100644 index 0000000..78244e9 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetTime_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1573 + ///
static inline tm* GetTime(const ImPlotTime& t, tm* ptm) + ///
+ ///
+ /// + /// + /// Get a tm struct from a UNIX timestamp according to the current ImPlotStyle.UseLocalTime setting. + /// + /// + [LibraryImport("implot")] + public static unsafe partial tm* GetTime_internal(ImPlotTime* t, tm* ptm); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/GetYear_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/GetYear_internal.gen.cs new file mode 100644 index 0000000..afc97b3 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/GetYear_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1582 + /// , implot.cpp:981
+ /// int GetYear(const ImPlotTime& t) + ///
+ ///
+ /// + /// + /// Get year component from timestamp [1970-3000] + /// + /// + [LibraryImport("implot")] + public static unsafe partial int GetYear_internal(ImPlotTime* t); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAlignmentData_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAlignmentData_internal.gen.cs new file mode 100644 index 0000000..5dc7334 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAlignmentData_internal.gen.cs @@ -0,0 +1,75 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:927 + ///
void Begin() + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ImPlotAlignmentData_Begin_internal(ImPlotAlignmentData* target); + + /// + /// + /// C++: + /// implot_internal.h:928 + ///
void Update(float& pad_a, float& pad_b, float& delta_a, float& delta_b) + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ImPlotAlignmentData_Update_internal( + ImPlotAlignmentData* target, + float* pad_a, + float* pad_b, + float* delta_a, + float* delta_b + ); + + /// + /// + /// C++: + /// implot_internal.h:935 + ///
void End() + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ImPlotAlignmentData_End_internal(ImPlotAlignmentData* target); + + /// + /// + /// C++: + /// implot_internal.h:936 + ///
void Reset() + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ImPlotAlignmentData_Reset_internal(ImPlotAlignmentData* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAnnotationCollection_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAnnotationCollection_internal.gen.cs new file mode 100644 index 0000000..5d453af --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAnnotationCollection_internal.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:452 + ///
+ /// void AppendV(const ImVec2& pos, const ImVec2& off, ImU32 bg, ImU32 fg, bool clamp, const char* fmt, va_list args) IM_FMTLIST(7) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAnnotationCollection_AppendV_internal( + ImPlotAnnotationCollection* target, + float2* pos, + float2* off, + uint bg, + uint fg, + Bool8 clamp, + byte* fmt, + byte* args + ); + + /// + /// + /// C++: + /// implot_internal.h:465 + ///
+ /// void Append(const ImVec2& pos, const ImVec2& off, ImU32 bg, ImU32 fg, bool clamp, const char* fmt, ...) IM_FMTARGS(7) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAnnotationCollection_Append_internal( + ImPlotAnnotationCollection* target, + float2* pos, + float2* off, + uint bg, + uint fg, + Bool8 clamp, + byte* fmt + ); + + /// + /// + /// C++: + /// implot_internal.h:472 + ///
const char* GetText(int idx) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotAnnotationCollection_GetText_internal( + ImPlotAnnotationCollection* target, + int idx + ); + + /// + /// + /// C++: + /// implot_internal.h:476 + ///
void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAnnotationCollection_Reset_internal(ImPlotAnnotationCollection* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAxis_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAxis_internal.gen.cs new file mode 100644 index 0000000..b6da567 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotAxis_internal.gen.cs @@ -0,0 +1,374 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:697 + ///
inline void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_Reset_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:717 + ///
inline bool SetMin(double _min, bool force=false) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_SetMin_internal(ImPlotAxis* target, double _min, Bool8 force); + + /// + /// + /// C++: + /// implot_internal.h:736 + ///
inline bool SetMax(double _max, bool force=false) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_SetMax_internal(ImPlotAxis* target, double _max, Bool8 force); + + /// + /// + /// C++: + /// implot_internal.h:755 + ///
inline void SetRange(double v1, double v2) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_SetRange_internal_0(ImPlotAxis* target, double v1, double v2); + + /// + /// + /// C++: + /// implot_internal.h:764 + ///
inline void SetRange(const ImPlotRange& range) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_SetRange_internal_1(ImPlotAxis* target, ImPlotRange* range); + + /// + /// + /// C++: + /// implot_internal.h:768 + ///
inline void SetAspect(double unit_per_pix) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_SetAspect_internal(ImPlotAxis* target, double unit_per_pix); + + /// + /// + /// C++: + /// implot_internal.h:781 + ///
inline float PixelSize() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial float ImPlotAxis_PixelSize_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:783 + ///
inline double GetAspect() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double ImPlotAxis_GetAspect_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:785 + ///
inline void Constrain() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_Constrain_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:807 + ///
inline void UpdateTransformCache() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_UpdateTransformCache_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:819 + ///
inline float PlotToPixels(double plt) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial float ImPlotAxis_PlotToPixels_internal(ImPlotAxis* target, double plt); + + /// + /// + /// C++: + /// implot_internal.h:829 + ///
inline double PixelsToPlot(float pix) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double ImPlotAxis_PixelsToPlot_internal(ImPlotAxis* target, float pix); + + /// + /// + /// C++: + /// implot_internal.h:839 + ///
inline void ExtendFit(double v) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_ExtendFit_internal(ImPlotAxis* target, double v); + + /// + /// + /// C++: + /// implot_internal.h:846 + ///
inline void ExtendFitWith(ImPlotAxis& alt, double v, double v_alt) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_ExtendFitWith_internal( + ImPlotAxis* target, + ImPlotAxis* alt, + double v, + double v_alt + ); + + /// + /// + /// C++: + /// implot_internal.h:855 + ///
inline void ApplyFit(float padding) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_ApplyFit_internal(ImPlotAxis* target, float padding); + + /// + /// + /// C++: + /// implot_internal.h:871 + ///
inline bool HasLabel() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_HasLabel_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:872 + ///
inline bool HasGridLines() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_HasGridLines_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:873 + ///
inline bool HasTickLabels() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_HasTickLabels_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:874 + ///
inline bool HasTickMarks() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_HasTickMarks_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:875 + ///
inline bool WillRender() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_WillRender_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:876 + ///
inline bool IsOpposite() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsOpposite_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:877 + ///
inline bool IsInverted() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsInverted_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:878 + ///
inline bool IsForeground() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsForeground_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:879 + ///
inline bool IsAutoFitting() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsAutoFitting_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:880 + ///
inline bool CanInitFit() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_CanInitFit_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:881 + ///
inline bool IsRangeLocked() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsRangeLocked_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:882 + ///
inline bool IsLockedMin() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsLockedMin_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:883 + ///
inline bool IsLockedMax() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsLockedMax_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:884 + ///
inline bool IsLocked() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsLocked_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:885 + ///
inline bool IsInputLockedMin() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsInputLockedMin_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:886 + ///
inline bool IsInputLockedMax() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsInputLockedMax_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:887 + ///
inline bool IsInputLocked() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsInputLocked_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:888 + ///
inline bool HasMenus() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_HasMenus_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:890 + ///
inline bool IsPanLocked(bool increasing) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotAxis_IsPanLocked_internal(ImPlotAxis* target, Bool8 increasing); + + /// + /// + /// C++: + /// implot_internal.h:904 + ///
void PushLinks() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_PushLinks_internal(ImPlotAxis* target); + + /// + /// + /// C++: + /// implot_internal.h:909 + ///
void PullLinks() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotAxis_PullLinks_internal(ImPlotAxis* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotColormapData_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotColormapData_internal.gen.cs new file mode 100644 index 0000000..707a64e --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotColormapData_internal.gen.cs @@ -0,0 +1,196 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:334 + ///
int Append(const char* name, const ImU32* keys, int count, bool qual) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotColormapData_Append_internal( + ImPlotColormapData* target, + byte* name, + uint* keys, + int count, + Bool8 qual + ); + + /// + /// + /// C++: + /// implot_internal.h:352 + ///
void _AppendTable(ImPlotColormap cmap) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotColormapData_AppendTable_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:391 + ///
void RebuildTables() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotColormapData_RebuildTables_internal(ImPlotColormapData* target); + + /// + /// + /// C++: + /// implot_internal.h:399 + ///
inline bool IsQual(ImPlotColormap cmap) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotColormapData_IsQual_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:400 + ///
inline const char* GetName(ImPlotColormap cmap) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotColormapData_GetName_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:401 + ///
inline ImPlotColormap GetIndex(const char* name) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotColormap ImPlotColormapData_GetIndex_internal( + ImPlotColormapData* target, + byte* name + ); + + /// + /// + /// C++: + /// implot_internal.h:403 + ///
inline const ImU32* GetKeys(ImPlotColormap cmap) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial uint* ImPlotColormapData_GetKeys_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:404 + ///
inline int GetKeyCount(ImPlotColormap cmap) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotColormapData_GetKeyCount_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:405 + ///
inline ImU32 GetKeyColor(ImPlotColormap cmap, int idx) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial uint ImPlotColormapData_GetKeyColor_internal( + ImPlotColormapData* target, + ImPlotColormap cmap, + int idx + ); + + /// + /// + /// C++: + /// implot_internal.h:406 + ///
inline void SetKeyColor(ImPlotColormap cmap, int idx, ImU32 value) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotColormapData_SetKeyColor_internal( + ImPlotColormapData* target, + ImPlotColormap cmap, + int idx, + uint value + ); + + /// + /// + /// C++: + /// implot_internal.h:408 + ///
inline const ImU32* GetTable(ImPlotColormap cmap) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial uint* ImPlotColormapData_GetTable_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:409 + ///
inline int GetTableSize(ImPlotColormap cmap) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotColormapData_GetTableSize_internal( + ImPlotColormapData* target, + ImPlotColormap cmap + ); + + /// + /// + /// C++: + /// implot_internal.h:410 + ///
inline ImU32 GetTableColor(ImPlotColormap cmap, int idx) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial uint ImPlotColormapData_GetTableColor_internal( + ImPlotColormapData* target, + ImPlotColormap cmap, + int idx + ); + + /// + /// + /// C++: + /// implot_internal.h:412 + ///
inline ImU32 LerpTable(ImPlotColormap cmap, float t) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial uint ImPlotColormapData_LerpTable_internal( + ImPlotColormapData* target, + ImPlotColormap cmap, + float t + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotItemGroup_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotItemGroup_internal.gen.cs new file mode 100644 index 0000000..0b2f090 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotItemGroup_internal.gen.cs @@ -0,0 +1,137 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:999 + ///
int GetItemCount() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotItemGroup_GetItemCount_internal(ImPlotItemGroup* target); + + /// + /// + /// C++: + /// implot_internal.h:1000 + ///
ImGuiID GetItemID(const char* label_id) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImGuiID ImPlotItemGroup_GetItemID_internal( + ImPlotItemGroup* target, + byte* label_id + ); + + /// + /// + /// C++: + /// implot_internal.h:1001 + ///
ImPlotItem* GetItem(ImGuiID id) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotItem* ImPlotItemGroup_GetItem_internal_0( + ImPlotItemGroup* target, + ImGuiID id + ); + + /// + /// + /// C++: + /// implot_internal.h:1002 + ///
ImPlotItem* GetItem(const char* label_id) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotItem* ImPlotItemGroup_GetItem_internal_1( + ImPlotItemGroup* target, + byte* label_id + ); + + /// + /// + /// C++: + /// implot_internal.h:1003 + ///
ImPlotItem* GetOrAddItem(ImGuiID id) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotItem* ImPlotItemGroup_GetOrAddItem_internal( + ImPlotItemGroup* target, + ImGuiID id + ); + + /// + /// + /// C++: + /// implot_internal.h:1004 + ///
ImPlotItem* GetItemByIndex(int i) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotItem* ImPlotItemGroup_GetItemByIndex_internal( + ImPlotItemGroup* target, + int i + ); + + /// + /// + /// C++: + /// implot_internal.h:1005 + ///
int GetItemIndex(ImPlotItem* item) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotItemGroup_GetItemIndex_internal( + ImPlotItemGroup* target, + ImPlotItem* item + ); + + /// + /// + /// C++: + /// implot_internal.h:1006 + ///
int GetLegendCount() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotItemGroup_GetLegendCount_internal(ImPlotItemGroup* target); + + /// + /// + /// C++: + /// implot_internal.h:1007 + ///
ImPlotItem* GetLegendItem(int i) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotItem* ImPlotItemGroup_GetLegendItem_internal(ImPlotItemGroup* target, int i); + + /// + /// + /// C++: + /// implot_internal.h:1008 + ///
const char* GetLegendLabel(int i) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotItemGroup_GetLegendLabel_internal(ImPlotItemGroup* target, int i); + + /// + /// + /// C++: + /// implot_internal.h:1009 + ///
void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotItemGroup_Reset_internal(ImPlotItemGroup* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotLegend_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotLegend_internal.gen.cs new file mode 100644 index 0000000..7142f44 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotLegend_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:986 + ///
void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotLegend_Reset_internal(ImPlotLegend* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextItemData_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextItemData_internal.gen.cs new file mode 100644 index 0000000..b4dfb62 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextItemData_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1194 + ///
void Reset() + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ImPlotNextItemData_Reset_internal(ImPlotNextItemData* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextPlotData_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextPlotData_internal.gen.cs new file mode 100644 index 0000000..87dc8b3 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotNextPlotData_internal.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1164 + ///
void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotNextPlotData_Reset_internal(ImPlotNextPlotData* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotPlot_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotPlot_internal.gen.cs new file mode 100644 index 0000000..66d6e41 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotPlot_internal.gen.cs @@ -0,0 +1,123 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1059 + ///
inline bool IsInputLocked() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotPlot_IsInputLocked_internal(ImPlotPlot* target); + + /// + /// + /// C++: + /// implot_internal.h:1071 + ///
inline void ClearTextBuffer() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotPlot_ClearTextBuffer_internal(ImPlotPlot* target); + + /// + /// + /// C++: + /// implot_internal.h:1073 + ///
inline void SetTitle(const char* title) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotPlot_SetTitle_internal(ImPlotPlot* target, byte* title); + + /// + /// + /// C++: + /// implot_internal.h:1082 + ///
inline bool HasTitle() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotPlot_HasTitle_internal(ImPlotPlot* target); + + /// + /// + /// C++: + /// implot_internal.h:1083 + ///
inline const char* GetTitle() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotPlot_GetTitle_internal(ImPlotPlot* target); + + /// + /// + /// C++: + /// implot_internal.h:1085 + ///
inline ImPlotAxis& XAxis(int i) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotAxis* ImPlotPlot_XAxis_internal_0(ImPlotPlot* target, int i); + + /// + /// + /// C++: + /// implot_internal.h:1087 + ///
inline ImPlotAxis& YAxis(int i) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotAxis* ImPlotPlot_YAxis_internal_0(ImPlotPlot* target, int i); + + /// + /// + /// C++: + /// implot_internal.h:1090 + ///
inline int EnabledAxesX() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotPlot_EnabledAxesX_internal(ImPlotPlot* target); + + /// + /// + /// C++: + /// implot_internal.h:1097 + ///
inline int EnabledAxesY() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotPlot_EnabledAxesY_internal(ImPlotPlot* target); + + /// + /// + /// C++: + /// implot_internal.h:1104 + ///
inline void SetAxisLabel(ImPlotAxis& axis, const char* label) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotPlot_SetAxisLabel_internal( + ImPlotPlot* target, + ImPlotAxis* axis, + byte* label + ); + + /// + /// + /// C++: + /// implot_internal.h:1114 + ///
inline const char* GetAxisLabel(const ImPlotAxis& axis) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotPlot_GetAxisLabel_internal(ImPlotPlot* target, ImPlotAxis* axis); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTagCollection_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTagCollection_internal.gen.cs new file mode 100644 index 0000000..b745dd8 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTagCollection_internal.gen.cs @@ -0,0 +1,66 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:499 + ///
+ /// void AppendV(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, va_list args) IM_FMTLIST(6) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotTagCollection_AppendV_internal( + ImPlotTagCollection* target, + ImAxis axis, + double value, + uint bg, + uint fg, + byte* fmt, + byte* args + ); + + /// + /// + /// C++: + /// implot_internal.h:513 + ///
+ /// void Append(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, ...) IM_FMTARGS(6) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotTagCollection_Append_internal( + ImPlotTagCollection* target, + ImAxis axis, + double value, + uint bg, + uint fg, + byte* fmt + ); + + /// + /// + /// C++: + /// implot_internal.h:520 + ///
const char* GetText(int idx) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotTagCollection_GetText_internal(ImPlotTagCollection* target, int idx); + + /// + /// + /// C++: + /// implot_internal.h:524 + ///
void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotTagCollection_Reset_internal(ImPlotTagCollection* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTicker_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTicker_internal.gen.cs new file mode 100644 index 0000000..28caf64 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTicker_internal.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:565 + ///
+ /// ImPlotTick& AddTick(double value, bool major, int level, bool show_label, const char* label) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotTick* ImPlotTicker_AddTick_internal_0( + ImPlotTicker* target, + double value, + Bool8 major, + int level, + Bool8 show_label, + byte* label + ); + + /// + /// + /// C++: + /// implot_internal.h:575 + ///
+ /// ImPlotTick& AddTick(double value, bool major, int level, bool show_label, ImPlotFormatter formatter, void* data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotTick* ImPlotTicker_AddTick_internal_1( + ImPlotTicker* target, + double value, + Bool8 major, + int level, + Bool8 show_label, + nint formatter, + void* data + ); + + /// + /// + /// C++: + /// implot_internal.h:587 + ///
inline ImPlotTick& AddTick(ImPlotTick tick) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial ImPlotTick* ImPlotTicker_AddTick_internal_2(ImPlotTicker* target, ImPlotTick tick); + + /// + /// + /// C++: + /// implot_internal.h:597 + ///
const char* GetText(int idx) const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotTicker_GetText_internal_0(ImPlotTicker* target, int idx); + + /// + /// + /// C++: + /// implot_internal.h:601 + ///
const char* GetText(const ImPlotTick& tick) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial byte* ImPlotTicker_GetText_internal_1(ImPlotTicker* target, ImPlotTick* tick); + + /// + /// + /// C++: + /// implot_internal.h:605 + ///
void OverrideSizeLate(const ImVec2& size) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotTicker_OverrideSizeLate_internal(ImPlotTicker* target, float2* size); + + /// + /// + /// C++: + /// implot_internal.h:610 + ///
void Reset() + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void ImPlotTicker_Reset_internal(ImPlotTicker* target); + + /// + /// + /// C++: + /// implot_internal.h:618 + ///
int TickCount() const + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial int ImPlotTicker_TickCount_internal(ImPlotTicker* target); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTime_internal.gen.cs new file mode 100644 index 0000000..0e482bd --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ImPlotTime_internal.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:298 + ///
void RollOver() + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ImPlotTime_RollOver_internal(ImPlotTime* target); + + /// + /// + /// C++: + /// implot_internal.h:299 + ///
double ToDouble() const + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double ImPlotTime_ToDouble_internal(ImPlotTime* target); + + /// + /// + /// C++: + /// implot_internal.h:300 + ///
static ImPlotTime FromDouble(double t) + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime ImPlotTime_FromDouble_internal(ImPlotTime* target, double t); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Initialize_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Initialize_internal.gen.cs new file mode 100644 index 0000000..130af68 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Initialize_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1263 + /// , implot.cpp:463
+ /// void Initialize(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Initializes an ImPlotContext + /// + /// + [LibraryImport("implot")] + public static unsafe partial void Initialize_internal(ImPlotContext* ctx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Intersection_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Intersection_internal.gen.cs new file mode 100644 index 0000000..7175a5a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Intersection_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1503 + ///
+ /// static inline ImVec2 Intersection(const ImVec2& a1, const ImVec2& a2, const ImVec2& b1, const ImVec2& b2) + ///
+ ///
+ /// + /// + /// Returns the intersection point of two lines A and B (assumes they are not parallel!) + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 Intersection_internal(float2* a1, float2* a2, float2* b1, float2* b2); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/IsColorAuto_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/IsColorAuto_internal.gen.cs new file mode 100644 index 0000000..d83a1fc --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/IsColorAuto_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1443 + ///
static inline bool IsColorAuto(const ImVec4& col) + ///
+ ///
+ /// + /// + /// Returns true if a color is set to be automatically determined + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsColorAuto_internal_0(float4* col); + + /// + /// + /// C++: + /// implot_internal.h:1445 + ///
static inline bool IsColorAuto(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns true if a style color is set to be automatically determined + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsColorAuto_internal_1(ImPlotCol idx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/IsLeapYear_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/IsLeapYear_internal.gen.cs new file mode 100644 index 0000000..4afedc3 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/IsLeapYear_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1545 + ///
static inline bool IsLeapYear(int year) + ///
+ ///
+ /// + /// + /// Returns true if year is leap year (366 days long) + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsLeapYear_internal(int year); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/LabelAxisValue_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/LabelAxisValue_internal.gen.cs new file mode 100644 index 0000000..936068d --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/LabelAxisValue_internal.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1433 + /// , implot.cpp:1599 + ///
+ /// void LabelAxisValue(const ImPlotAxis& axis, double value, char* buff, int size, bool round = false) + ///
+ ///
+ /// + /// + /// Create a a string label for a an axis value + /// + /// + [LibraryImport("implot")] + public static unsafe partial void LabelAxisValue_internal( + ImPlotAxis* axis, + double value, + byte* buff, + int size, + Bool8 round + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Locator_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Locator_internal.gen.cs new file mode 100644 index 0000000..c990c85 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Locator_internal.gen.cs @@ -0,0 +1,82 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1682 + /// , implot.cpp:722
+ /// void Locator_Default(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void Locator_Default_internal( + ImPlotTicker* ticker, + ImPlotRange* range, + float pixels, + Bool8 vertical, + nint formatter, + void* formatter_data + ); + + /// + /// + /// C++: + /// implot_internal.h:1683 + /// , implot.cpp:1222 + ///
+ /// void Locator_Time(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void Locator_Time_internal( + ImPlotTicker* ticker, + ImPlotRange* range, + float pixels, + Bool8 vertical, + nint formatter, + void* formatter_data + ); + + /// + /// + /// C++: + /// implot_internal.h:1684 + /// , implot.cpp:802
+ /// void Locator_Log10(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void Locator_Log10_internal( + ImPlotTicker* ticker, + ImPlotRange* range, + float pixels, + Bool8 vertical, + nint formatter, + void* formatter_data + ); + + /// + /// + /// C++: + /// implot_internal.h:1685 + /// , implot.cpp:819
+ /// void Locator_SymLog(ImPlotTicker& ticker, const ImPlotRange& range, float pixels, bool vertical, ImPlotFormatter formatter, void* formatter_data) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial void Locator_SymLog_internal( + ImPlotTicker* ticker, + ImPlotRange* range, + float pixels, + Bool8 vertical, + nint formatter, + void* formatter_data + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/MakeTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/MakeTime_internal.gen.cs new file mode 100644 index 0000000..988e8a8 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/MakeTime_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1580 + /// , implot.cpp:958
+ /// ImPlotTime MakeTime(int year, int month = 0, int day = 1, int hour = 0, int min = 0, int sec = 0, int us = 0) + ///
+ ///
+ /// + /// + /// Make a timestamp from time components. + /// year[1970-3000], month[0-11], day[1-31], hour[0-23], min[0-59], sec[0-59], us[0,999999] + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime MakeTime_internal( + int year, + int month, + int day, + int hour, + int min, + int sec, + int us + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/MkGmtTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/MkGmtTime_internal.gen.cs new file mode 100644 index 0000000..0d2a72b --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/MkGmtTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1555 + /// , implot.cpp:915
+ /// ImPlotTime MkGmtTime(struct tm *ptm) + ///
+ ///
+ /// + /// + /// Make a UNIX timestamp from a tm struct expressed in UTC time (i.e. GMT timezone). + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime MkGmtTime_internal(tm* ptm); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/MkLocTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/MkLocTime_internal.gen.cs new file mode 100644 index 0000000..b1f3e55 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/MkLocTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1560 + /// , implot.cpp:939
+ /// ImPlotTime MkLocTime(struct tm *ptm) + ///
+ ///
+ /// + /// + /// Make a UNIX timestamp from a tm struct expressed in local time. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime MkLocTime_internal(tm* ptm); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/MkTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/MkTime_internal.gen.cs new file mode 100644 index 0000000..ddcf2a4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/MkTime_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1568 + ///
static inline ImPlotTime MkTime(struct tm *ptm) + ///
+ ///
+ /// + /// + /// // Make a UNIX timestamp from a tm struct according to the current ImPlotStyle.UseLocalTime setting. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime MkTime_internal(tm* ptm); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/NextColormapColorU32_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/NextColormapColorU32_internal.gen.cs new file mode 100644 index 0000000..77cf19f --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/NextColormapColorU32_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1480 + /// , implot.cpp:4552 + ///
ImU32 NextColormapColorU32() + ///
+ ///
+ /// + /// + /// Returns the next unused colormap color and advances the colormap. Can be used to skip colors if desired. + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint NextColormapColorU32_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/NiceNum_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/NiceNum_internal.gen.cs new file mode 100644 index 0000000..604e667 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/NiceNum_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1492 + /// , implot.cpp:403
+ /// double NiceNum(double x, bool round) + ///
+ ///
+ /// + /// + /// Rounds x to powers of 2,5 and 10 for generating axis labels (from Graphics Gems 1 Chapter 11.2) + /// + /// + [LibraryImport("implot")] + public static unsafe partial double NiceNum_internal(double x, Bool8 round); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Now_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Now_internal.gen.cs new file mode 100644 index 0000000..290ee6d --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Now_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1598 + ///
static inline ImPlotTime Now() + ///
+ ///
+ /// + /// + /// Get the current time as a timestamp. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime Now_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/OrderOfMagnitude_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/OrderOfMagnitude_internal.gen.cs new file mode 100644 index 0000000..73f64a3 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/OrderOfMagnitude_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1494 + ///
static inline int OrderOfMagnitude(double val) + ///
+ ///
+ /// + /// + /// Computes order of magnitude of double. + /// + /// + [LibraryImport("implot")] + public static unsafe partial int OrderOfMagnitude_internal(double val); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/OrderToPrecision_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/OrderToPrecision_internal.gen.cs new file mode 100644 index 0000000..84d449e --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/OrderToPrecision_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1496 + ///
static inline int OrderToPrecision(int order) + ///
+ ///
+ /// + /// + /// Returns the precision required for a order of magnitude. + /// + /// + [LibraryImport("implot")] + public static unsafe partial int OrderToPrecision_internal(int order); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Precision_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Precision_internal.gen.cs new file mode 100644 index 0000000..01be251 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Precision_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1498 + ///
static inline int Precision(double val) + ///
+ ///
+ /// + /// + /// Returns a floating point precision to use given a value + /// + /// + [LibraryImport("implot")] + public static unsafe partial int Precision_internal(double val); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/RangesOverlap_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/RangesOverlap_internal.gen.cs new file mode 100644 index 0000000..de702c0 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/RangesOverlap_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1405 + ///
static inline bool RangesOverlap(const ImPlotRange& r1, const ImPlotRange& r2) + ///
+ ///
+ /// + /// + /// Returns true if two ranges overlap + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 RangesOverlap_internal(ImPlotRange* r1, ImPlotRange* r2); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/RegisterOrGetItem_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/RegisterOrGetItem_internal.gen.cs new file mode 100644 index 0000000..efe4370 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/RegisterOrGetItem_internal.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1330 + /// , + /// implot_items.cpp:287 + ///
+ /// ImPlotItem* RegisterOrGetItem(const char* label_id, ImPlotItemFlags flags, bool* just_created = nullptr) + ///
+ ///
+ /// + /// + /// Register or get an existing item from the current plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotItem* RegisterOrGetItem_internal( + byte* label_id, + ImPlotItemFlags flags, + Bool8* just_created + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/RenderColorBar_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/RenderColorBar_internal.gen.cs new file mode 100644 index 0000000..6b618de --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/RenderColorBar_internal.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1485 + /// , implot.cpp:4595 + ///
+ /// void RenderColorBar(const ImU32* colors, int size, ImDrawList& DrawList, const ImRect& bounds, bool vert, bool reversed, bool continuous) + ///
+ ///
+ /// + /// + /// Render a colormap bar + /// + /// + [LibraryImport("implot")] + public static unsafe partial void RenderColorBar_internal( + uint* colors, + int size, + ImDrawList* DrawList, + floatRect* bounds, + Bool8 vert, + Bool8 reversed, + Bool8 continuous + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextAlignedPlots_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextAlignedPlots_internal.gen.cs new file mode 100644 index 0000000..ee22889 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextAlignedPlots_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1267 + /// , implot.cpp:521
+ /// void ResetCtxForNextAlignedPlots(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Resets an ImPlot context for the next call to BeginAlignedPlots + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ResetCtxForNextAlignedPlots_internal(ImPlotContext* ctx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextPlot_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextPlot_internal.gen.cs new file mode 100644 index 0000000..0924c08 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextPlot_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1265 + /// , implot.cpp:503
+ /// void ResetCtxForNextPlot(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Resets an ImPlot context for the next call to BeginPlot + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ResetCtxForNextPlot_internal(ImPlotContext* ctx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextSubplot_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextSubplot_internal.gen.cs new file mode 100644 index 0000000..14b42a1 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ResetCtxForNextSubplot_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1269 + /// , implot.cpp:526
+ /// void ResetCtxForNextSubplot(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Resets an ImPlot context for the next call to BeginSubplot + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ResetCtxForNextSubplot_internal(ImPlotContext* ctx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/RoundTime_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/RoundTime_internal.gen.cs new file mode 100644 index 0000000..5a22956 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/RoundTime_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1593 + /// , implot.cpp:1046 + ///
ImPlotTime RoundTime(const ImPlotTime& t, ImPlotTimeUnit unit) + ///
+ ///
+ /// + /// + /// Rounds a timestamp up or down to the nearest unit. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime RoundTime_internal(ImPlotTime* t, ImPlotTimeUnit unit); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/RoundTo_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/RoundTo_internal.gen.cs new file mode 100644 index 0000000..536f8bc --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/RoundTo_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1500 + ///
static inline double RoundTo(double val, int prec) + ///
+ ///
+ /// + /// + /// Round a value to a given precision + /// + /// + [LibraryImport("implot")] + public static unsafe partial double RoundTo_internal(double val, int prec); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/SampleColormapU32_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/SampleColormapU32_internal.gen.cs new file mode 100644 index 0000000..d8a876b --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/SampleColormapU32_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1482 + /// , implot.cpp:4584 + ///
ImU32 SampleColormapU32(float t, ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Linearly interpolates a color from the current colormap given t between 0 and 1. + /// + /// + [LibraryImport("implot")] + public static unsafe partial uint SampleColormapU32_internal(float t, ImPlotColormap cmap); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/SetupLock_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/SetupLock_internal.gen.cs new file mode 100644 index 0000000..438bb88 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/SetupLock_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1290 + ///
static inline void SetupLock() + ///
+ ///
+ /// + /// + /// Lock Setup and call SetupFinish if necessary. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupLock_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowAltLegend_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowAltLegend_internal.gen.cs new file mode 100644 index 0000000..63ea66f --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowAltLegend_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1424 + /// , implot.cpp:4246 + ///
+ /// void ShowAltLegend(const char* title_id, bool vertical = true, const ImVec2 size = ImVec2(0,0), bool interactable = true) + ///
+ ///
+ /// + /// + /// Shows an alternate legend for the plot identified by #title_id, outside of the plot frame (can be called + /// before or after of Begin/EndPlot but must occur in the same ImGui window! This is not thoroughly tested + /// nor scrollable!). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowAltLegend_internal( + byte* title_id, + Bool8 vertical, + float2 size, + Bool8 interactable + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowAxisContextMenu_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowAxisContextMenu_internal.gen.cs new file mode 100644 index 0000000..cce50bd --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowAxisContextMenu_internal.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1409 + /// , implot.cpp:1347 + ///
+ /// void ShowAxisContextMenu(ImPlotAxis& axis, ImPlotAxis* equal_axis, bool time_allowed = false) + ///
+ ///
+ /// + /// + /// Shows an axis's context menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowAxisContextMenu_internal( + ImPlotAxis* axis, + ImPlotAxis* equal_axis, + Bool8 time_allowed + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowDatePicker_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowDatePicker_internal.gen.cs new file mode 100644 index 0000000..6740d0a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowDatePicker_internal.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1613 + /// , implot.cpp:5451 + ///
+ /// bool ShowDatePicker(const char* id, int* level, ImPlotTime* t, const ImPlotTime* t1 = nullptr, const ImPlotTime* t2 = nullptr) + ///
+ ///
+ /// + /// + /// Shows a date picker widget block (year/month/day). + /// #level = 0 for day, 1 for month, 2 for year. Modified by user interaction. + /// #t will be set when a day is clicked and the function will return true. + /// #t1 and #t2 are optional dates to highlight. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowDatePicker_internal( + byte* id, + int* level, + ImPlotTime* t, + ImPlotTime* t1, + ImPlotTime* t2 + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendContextMenu_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendContextMenu_internal.gen.cs new file mode 100644 index 0000000..bc4a619 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendContextMenu_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1426 + /// , implot.cpp:1462 + ///
bool ShowLegendContextMenu(ImPlotLegend& legend, bool visible) + ///
+ ///
+ /// + /// + /// Shows a legend's context menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowLegendContextMenu_internal(ImPlotLegend* legend, Bool8 visible); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendEntries_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendEntries_internal.gen.cs new file mode 100644 index 0000000..bf2abc4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowLegendEntries_internal.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1422 + /// , implot.cpp:628
+ /// bool ShowLegendEntries(ImPlotItemGroup& items, const ImRect& legend_bb, bool interactable, const ImVec2& pad, const ImVec2& spacing, bool vertical, ImDrawList& DrawList) + ///
+ ///
+ /// + /// + /// Renders legend entries into a bounding box + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowLegendEntries_internal( + ImPlotItemGroup* items, + floatRect* legend_bb, + Bool8 interactable, + float2* pad, + float2* spacing, + Bool8 vertical, + ImDrawList* DrawList + ); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowPlotContextMenu_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowPlotContextMenu_internal.gen.cs new file mode 100644 index 0000000..24dca95 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowPlotContextMenu_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1283 + /// , implot.cpp:1515 + ///
void ShowPlotContextMenu(ImPlotPlot& plot) + ///
+ ///
+ /// + /// + /// Shows a plot's context menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowPlotContextMenu_internal(ImPlotPlot* plot); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowSubplotsContextMenu_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowSubplotsContextMenu_internal.gen.cs new file mode 100644 index 0000000..6bd55a0 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowSubplotsContextMenu_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1305 + /// , implot.cpp:1488 + ///
void ShowSubplotsContextMenu(ImPlotSubplot& subplot) + ///
+ ///
+ /// + /// + /// Shows a subplot's context menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowSubplotsContextMenu_internal(ImPlotSubplot* subplot); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/ShowTimePicker_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowTimePicker_internal.gen.cs new file mode 100644 index 0000000..1740a9d --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/ShowTimePicker_internal.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1616 + /// , implot.cpp:5662 + ///
bool ShowTimePicker(const char* id, ImPlotTime* t) + ///
+ ///
+ /// + /// + /// Shows a time picker widget block (hour/min/sec). + /// #t will be set when a new hour, minute, or sec is selected or am/pm is toggled, and the function will return true. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowTimePicker_internal(byte* id, ImPlotTime* t); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/SubplotNextCell_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/SubplotNextCell_internal.gen.cs new file mode 100644 index 0000000..0d98d7a --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/SubplotNextCell_internal.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1302 + /// , implot.cpp:3335 + ///
void SubplotNextCell() + ///
+ ///
+ /// + /// + /// Advances to next subplot + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SubplotNextCell_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/Today_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/Today_internal.gen.cs new file mode 100644 index 0000000..5cddb17 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/Today_internal.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1600 + ///
static inline ImPlotTime Today() + ///
+ ///
+ /// + /// + /// Get the current date as a timestamp. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotTime Today_internal(); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/TransformForward_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/TransformForward_internal.gen.cs new file mode 100644 index 0000000..9316195 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/TransformForward_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1622 + ///
static inline double TransformForward_Log10(double v, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double TransformForward_Log10_internal(double v, void* _); + + /// + /// + /// C++: + /// implot_internal.h:1631 + ///
static inline double TransformForward_SymLog(double v, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double TransformForward_SymLog_internal(double v, void* _); + + /// + /// + /// C++: + /// implot_internal.h:1639 + ///
static inline double TransformForward_Logit(double v, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double TransformForward_Logit_internal(double v, void* _); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/PInvoke/TransformInverse_internal.gen.cs b/Brutal.ImPlot/Generated-Internal/PInvoke/TransformInverse_internal.gen.cs new file mode 100644 index 0000000..1ddff2e --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/PInvoke/TransformInverse_internal.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi.Internal +{ + public unsafe partial class PInvoke + { + /// + /// + /// C++: + /// implot_internal.h:1627 + ///
static inline double TransformInverse_Log10(double v, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double TransformInverse_Log10_internal(double v, void* _); + + /// + /// + /// C++: + /// implot_internal.h:1635 + ///
static inline double TransformInverse_SymLog(double v, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double TransformInverse_SymLog_internal(double v, void* _); + + /// + /// + /// C++: + /// implot_internal.h:1644 + ///
static inline double TransformInverse_Logit(double v, void*) + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial double TransformInverse_Logit_internal(double v, void* _); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAlignmentData.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAlignmentData.gen.cs new file mode 100644 index 0000000..4e286ed --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAlignmentData.gen.cs @@ -0,0 +1,193 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:917 + ///
struct ImPlotAlignmentData { + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct ImPlotAlignmentData + { + /// + /// + /// C++: + /// implot_internal.h:918 + ///
bool Vertical + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [FieldOffset(0)] + public Bool8 Vertical; + + /// + /// + /// C++: + /// implot_internal.h:919 + ///
float PadA + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [FieldOffset(4)] + public float PadA; + + /// + /// + /// C++: + /// implot_internal.h:920 + ///
float PadB + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [FieldOffset(8)] + public float PadB; + + /// + /// + /// C++: + /// implot_internal.h:921 + ///
float PadAMax + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [FieldOffset(12)] + public float PadAMax; + + /// + /// + /// C++: + /// implot_internal.h:922 + ///
float PadBMax + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + [FieldOffset(16)] + public float PadBMax; + } + + /// + /// + /// C++: + /// implot_internal.h:917 + ///
struct ImPlotAlignmentData { + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public unsafe partial struct ImPlotAlignmentDataPtr(ImPlotAlignmentData* ptr) : INullable + { + private ImPlotAlignmentData* _ptr = ptr; + public ImPlotAlignmentData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotAlignmentDataPtr(ImPlotAlignmentData* ptr) => new(ptr); + + public static implicit operator ImPlotAlignmentData*(ImPlotAlignmentDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:918 + ///
bool Vertical + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public ref bool Vertical => ref Unsafe.AsRef(&_ptr->Vertical); + + /// + /// + /// C++: + /// implot_internal.h:919 + ///
float PadA + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public ref float PadA => ref Unsafe.AsRef(&_ptr->PadA); + + /// + /// + /// C++: + /// implot_internal.h:920 + ///
float PadB + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public ref float PadB => ref Unsafe.AsRef(&_ptr->PadB); + + /// + /// + /// C++: + /// implot_internal.h:921 + ///
float PadAMax + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public ref float PadAMax => ref Unsafe.AsRef(&_ptr->PadAMax); + + /// + /// + /// C++: + /// implot_internal.h:922 + ///
float PadBMax + ///
+ ///
+ /// + /// + /// Align plots group data + /// + /// + public ref float PadBMax => ref Unsafe.AsRef(&_ptr->PadBMax); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotation.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotation.gen.cs new file mode 100644 index 0000000..8e1d302 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotation.gen.cs @@ -0,0 +1,222 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:429 + ///
struct ImPlotAnnotation { + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImPlotAnnotation + { + /// + /// + /// C++: + /// implot_internal.h:430 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [FieldOffset(0)] + public float2 Pos; + + /// + /// + /// C++: + /// implot_internal.h:431 + ///
ImVec2 Offset + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [FieldOffset(8)] + public float2 Offset; + + /// + /// + /// C++: + /// implot_internal.h:432 + ///
ImU32 ColorBg + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [FieldOffset(16)] + public uint ColorBg; + + /// + /// + /// C++: + /// implot_internal.h:433 + ///
ImU32 ColorFg + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [FieldOffset(20)] + public uint ColorFg; + + /// + /// + /// C++: + /// implot_internal.h:434 + ///
int TextOffset + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [FieldOffset(24)] + public int TextOffset; + + /// + /// + /// C++: + /// implot_internal.h:435 + ///
bool Clamp + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + [FieldOffset(28)] + public Bool8 Clamp; + } + + /// + /// + /// C++: + /// implot_internal.h:429 + ///
struct ImPlotAnnotation { + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public unsafe partial struct ImPlotAnnotationPtr(ImPlotAnnotation* ptr) : INullable + { + private ImPlotAnnotation* _ptr = ptr; + public ImPlotAnnotation* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotAnnotationPtr(ImPlotAnnotation* ptr) => new(ptr); + + public static implicit operator ImPlotAnnotation*(ImPlotAnnotationPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:430 + ///
ImVec2 Pos + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public ref float2 Pos => ref Unsafe.AsRef(&_ptr->Pos); + + /// + /// + /// C++: + /// implot_internal.h:431 + ///
ImVec2 Offset + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public ref float2 Offset => ref Unsafe.AsRef(&_ptr->Offset); + + /// + /// + /// C++: + /// implot_internal.h:432 + ///
ImU32 ColorBg + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public ref uint ColorBg => ref Unsafe.AsRef(&_ptr->ColorBg); + + /// + /// + /// C++: + /// implot_internal.h:433 + ///
ImU32 ColorFg + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public ref uint ColorFg => ref Unsafe.AsRef(&_ptr->ColorFg); + + /// + /// + /// C++: + /// implot_internal.h:434 + ///
int TextOffset + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public ref int TextOffset => ref Unsafe.AsRef(&_ptr->TextOffset); + + /// + /// + /// C++: + /// implot_internal.h:435 + ///
bool Clamp + ///
+ ///
+ /// + /// + /// Interior plot label/annotation + /// + /// + public ref bool Clamp => ref Unsafe.AsRef(&_ptr->Clamp); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotationCollection.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotationCollection.gen.cs new file mode 100644 index 0000000..7f51d38 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAnnotationCollection.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:444 + ///
struct ImPlotAnnotationCollection { + ///
+ ///
+ /// + /// + /// Collection of plot labels + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImPlotAnnotationCollection + { + /// + /// + /// C++: + /// implot_internal.h:446 + ///
ImVector<ImPlotAnnotation> Annotations + ///
+ ///
+ [FieldOffset(0)] + public ImVector Annotations; + + /// + /// + /// C++: + /// implot_internal.h:447 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ [FieldOffset(16)] + public ImGuiTextBuffer TextBuffer; + + /// + /// + /// C++: + /// implot_internal.h:448 + ///
int Size + ///
+ ///
+ [FieldOffset(32)] + public int Size; + } + + /// + /// + /// C++: + /// implot_internal.h:444 + ///
struct ImPlotAnnotationCollection { + ///
+ ///
+ /// + /// + /// Collection of plot labels + /// + /// + public unsafe partial struct ImPlotAnnotationCollectionPtr(ImPlotAnnotationCollection* ptr) : INullable + { + private ImPlotAnnotationCollection* _ptr = ptr; + public ImPlotAnnotationCollection* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotAnnotationCollectionPtr(ImPlotAnnotationCollection* ptr) => new(ptr); + + public static implicit operator ImPlotAnnotationCollection*(ImPlotAnnotationCollectionPtr wrapper) => + wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:446 + ///
ImVector<ImPlotAnnotation> Annotations + ///
+ ///
+ public ref ImVector Annotations => + ref Unsafe.AsRef>(&_ptr->Annotations); + + /// + /// + /// C++: + /// implot_internal.h:447 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ public ref ImGuiTextBuffer TextBuffer => ref Unsafe.AsRef(&_ptr->TextBuffer); + + /// + /// + /// C++: + /// implot_internal.h:448 + ///
int Size + ///
+ ///
+ public ref int Size => ref Unsafe.AsRef(&_ptr->Size); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAxis.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAxis.gen.cs new file mode 100644 index 0000000..e0554de --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotAxis.gen.cs @@ -0,0 +1,1035 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:81 + ///
struct ImPlotAxis + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 376)] + public unsafe partial struct ImPlotAxis + { + /// + /// + /// C++: + /// implot_internal.h:626 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// implot_internal.h:627 + ///
ImPlotAxisFlags Flags + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(4)] + public ImPlotAxisFlags Flags; + + /// + /// + /// C++: + /// implot_internal.h:628 + ///
ImPlotAxisFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(8)] + public ImPlotAxisFlags PreviousFlags; + + /// + /// + /// C++: + /// implot_internal.h:629 + ///
ImPlotRange Range + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(16)] + public ImPlotRange Range; + + /// + /// + /// C++: + /// implot_internal.h:630 + ///
ImPlotCond RangeCond + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(32)] + public ImPlotCond RangeCond; + + /// + /// + /// C++: + /// implot_internal.h:631 + ///
ImPlotScale Scale + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(36)] + public ImPlotScale Scale; + + /// + /// + /// C++: + /// implot_internal.h:632 + ///
ImPlotRange FitExtents + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(40)] + public ImPlotRange FitExtents; + + /// + /// + /// C++: + /// implot_internal.h:633 + ///
ImPlotAxis* OrthoAxis + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(56)] + public ImPlotAxisPtr OrthoAxis; + + /// + /// + /// C++: + /// implot_internal.h:634 + ///
ImPlotRange ConstraintRange + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(64)] + public ImPlotRange ConstraintRange; + + /// + /// + /// C++: + /// implot_internal.h:635 + ///
ImPlotRange ConstraintZoom + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + [FieldOffset(80)] + public ImPlotRange ConstraintZoom; + + /// + /// + /// C++: + /// implot_internal.h:637 + ///
ImPlotTicker Ticker + ///
+ ///
+ [FieldOffset(96)] + public ImPlotTicker Ticker; + + /// + /// + /// C++: + /// implot_internal.h:638 + ///
ImPlotFormatter Formatter + ///
+ ///
+ [FieldOffset(152)] + public nint Formatter; + + /// + /// + /// C++: + /// implot_internal.h:639 + ///
void* FormatterData + ///
+ ///
+ [FieldOffset(160)] + public nint FormatterData; + + [FieldOffset(168)] + public fixed byte FormatSpec[16]; + + /// + /// + /// C++: + /// implot_internal.h:641 + ///
ImPlotLocator Locator + ///
+ ///
+ [FieldOffset(184)] + public nint Locator; + + /// + /// + /// C++: + /// implot_internal.h:643 + ///
double* LinkedMin + ///
+ ///
+ [FieldOffset(192)] + public Ptr LinkedMin; + + /// + /// + /// C++: + /// implot_internal.h:644 + ///
double* LinkedMax + ///
+ ///
+ [FieldOffset(200)] + public Ptr LinkedMax; + + /// + /// + /// C++: + /// implot_internal.h:646 + ///
int PickerLevel + ///
+ ///
+ [FieldOffset(208)] + public int PickerLevel; + + /// + /// + /// C++: + /// implot_internal.h:647 + ///
ImPlotTime PickerTimeMin + ///
+ ///
+ [FieldOffset(216)] + public ImPlotTime PickerTimeMin; + + /// + /// + /// C++: + /// implot_internal.h:647 + ///
ImPlotTime PickerTimeMin, PickerTimeMax + ///
+ ///
+ [FieldOffset(232)] + public ImPlotTime PickerTimeMax; + + /// + /// + /// C++: + /// implot_internal.h:649 + ///
ImPlotTransform TransformForward + ///
+ ///
+ [FieldOffset(248)] + public nint TransformForward; + + /// + /// + /// C++: + /// implot_internal.h:650 + ///
ImPlotTransform TransformInverse + ///
+ ///
+ [FieldOffset(256)] + public nint TransformInverse; + + /// + /// + /// C++: + /// implot_internal.h:651 + ///
void* TransformData + ///
+ ///
+ [FieldOffset(264)] + public nint TransformData; + + /// + /// + /// C++: + /// implot_internal.h:652 + ///
float PixelMin + ///
+ ///
+ [FieldOffset(272)] + public float PixelMin; + + /// + /// + /// C++: + /// implot_internal.h:652 + ///
float PixelMin, PixelMax + ///
+ ///
+ [FieldOffset(276)] + public float PixelMax; + + /// + /// + /// C++: + /// implot_internal.h:653 + ///
double ScaleMin + ///
+ ///
+ [FieldOffset(280)] + public double ScaleMin; + + /// + /// + /// C++: + /// implot_internal.h:653 + ///
double ScaleMin, ScaleMax + ///
+ ///
+ [FieldOffset(288)] + public double ScaleMax; + + /// + /// + /// C++: + /// implot_internal.h:654 + ///
double ScaleToPixel + ///
+ ///
+ [FieldOffset(296)] + public double ScaleToPixel; + + /// + /// + /// C++: + /// implot_internal.h:655 + ///
float Datum1 + ///
+ ///
+ [FieldOffset(304)] + public float Datum1; + + /// + /// + /// C++: + /// implot_internal.h:655 + ///
float Datum1, Datum2 + ///
+ ///
+ [FieldOffset(308)] + public float Datum2; + + /// + /// + /// C++: + /// implot_internal.h:657 + ///
ImRect HoverRect + ///
+ ///
+ [FieldOffset(312)] + public floatRect HoverRect; + + /// + /// + /// C++: + /// implot_internal.h:658 + ///
int LabelOffset + ///
+ ///
+ [FieldOffset(328)] + public int LabelOffset; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj + ///
+ ///
+ [FieldOffset(332)] + public uint ColorMaj; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin + ///
+ ///
+ [FieldOffset(336)] + public uint ColorMin; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick + ///
+ ///
+ [FieldOffset(340)] + public uint ColorTick; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt + ///
+ ///
+ [FieldOffset(344)] + public uint ColorTxt; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg + ///
+ ///
+ [FieldOffset(348)] + public uint ColorBg; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg, ColorHov + ///
+ ///
+ [FieldOffset(352)] + public uint ColorHov; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg, ColorHov, ColorAct + ///
+ ///
+ [FieldOffset(356)] + public uint ColorAct; + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg, ColorHov, ColorAct, ColorHiLi + ///
+ ///
+ [FieldOffset(360)] + public uint ColorHiLi; + + /// + /// + /// C++: + /// implot_internal.h:661 + ///
bool Enabled + ///
+ ///
+ [FieldOffset(364)] + public Bool8 Enabled; + + /// + /// + /// C++: + /// implot_internal.h:662 + ///
bool Vertical + ///
+ ///
+ [FieldOffset(365)] + public Bool8 Vertical; + + /// + /// + /// C++: + /// implot_internal.h:663 + ///
bool FitThisFrame + ///
+ ///
+ [FieldOffset(366)] + public Bool8 FitThisFrame; + + /// + /// + /// C++: + /// implot_internal.h:664 + ///
bool HasRange + ///
+ ///
+ [FieldOffset(367)] + public Bool8 HasRange; + + /// + /// + /// C++: + /// implot_internal.h:665 + ///
bool HasFormatSpec + ///
+ ///
+ [FieldOffset(368)] + public Bool8 HasFormatSpec; + + /// + /// + /// C++: + /// implot_internal.h:666 + ///
bool ShowDefaultTicks + ///
+ ///
+ [FieldOffset(369)] + public Bool8 ShowDefaultTicks; + + /// + /// + /// C++: + /// implot_internal.h:667 + ///
bool Hovered + ///
+ ///
+ [FieldOffset(370)] + public Bool8 Hovered; + + /// + /// + /// C++: + /// implot_internal.h:668 + ///
bool Held + ///
+ ///
+ [FieldOffset(371)] + public Bool8 Held; + } + + /// + /// + /// C++: + /// implot_internal.h:81 + ///
struct ImPlotAxis + ///
+ ///
+ public unsafe partial struct ImPlotAxisPtr(ImPlotAxis* ptr) : INullable + { + private ImPlotAxis* _ptr = ptr; + public ImPlotAxis* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotAxisPtr(ImPlotAxis* ptr) => new(ptr); + + public static implicit operator ImPlotAxis*(ImPlotAxisPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:626 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// implot_internal.h:627 + ///
ImPlotAxisFlags Flags + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotAxisFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// implot_internal.h:628 + ///
ImPlotAxisFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotAxisFlags PreviousFlags => ref Unsafe.AsRef(&_ptr->PreviousFlags); + + /// + /// + /// C++: + /// implot_internal.h:629 + ///
ImPlotRange Range + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotRange Range => ref Unsafe.AsRef(&_ptr->Range); + + /// + /// + /// C++: + /// implot_internal.h:630 + ///
ImPlotCond RangeCond + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotCond RangeCond => ref Unsafe.AsRef(&_ptr->RangeCond); + + /// + /// + /// C++: + /// implot_internal.h:631 + ///
ImPlotScale Scale + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotScale Scale => ref Unsafe.AsRef(&_ptr->Scale); + + /// + /// + /// C++: + /// implot_internal.h:632 + ///
ImPlotRange FitExtents + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotRange FitExtents => ref Unsafe.AsRef(&_ptr->FitExtents); + + /// + /// + /// C++: + /// implot_internal.h:633 + ///
ImPlotAxis* OrthoAxis + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotAxisPtr OrthoAxis => ref Unsafe.AsRef(&_ptr->OrthoAxis); + + /// + /// + /// C++: + /// implot_internal.h:634 + ///
ImPlotRange ConstraintRange + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotRange ConstraintRange => ref Unsafe.AsRef(&_ptr->ConstraintRange); + + /// + /// + /// C++: + /// implot_internal.h:635 + ///
ImPlotRange ConstraintZoom + ///
+ ///
+ /// + /// + /// Axis state information that must persist after EndPlot + /// + /// + public ref ImPlotRange ConstraintZoom => ref Unsafe.AsRef(&_ptr->ConstraintZoom); + + /// + /// + /// C++: + /// implot_internal.h:637 + ///
ImPlotTicker Ticker + ///
+ ///
+ public ref ImPlotTicker Ticker => ref Unsafe.AsRef(&_ptr->Ticker); + + /// + /// + /// C++: + /// implot_internal.h:638 + ///
ImPlotFormatter Formatter + ///
+ ///
+ public ref nint Formatter => ref Unsafe.AsRef(&_ptr->Formatter); + + /// + /// + /// C++: + /// implot_internal.h:639 + ///
void* FormatterData + ///
+ ///
+ public ref nint FormatterData => ref Unsafe.AsRef(&_ptr->FormatterData); + public Span FormatSpec => MemoryMarshal.CreateSpan(ref _ptr->FormatSpec[0], 16); + + /// + /// + /// C++: + /// implot_internal.h:641 + ///
ImPlotLocator Locator + ///
+ ///
+ public ref nint Locator => ref Unsafe.AsRef(&_ptr->Locator); + + /// + /// + /// C++: + /// implot_internal.h:643 + ///
double* LinkedMin + ///
+ ///
+ public ref Ptr LinkedMin => ref Unsafe.AsRef>(&_ptr->LinkedMin); + + /// + /// + /// C++: + /// implot_internal.h:644 + ///
double* LinkedMax + ///
+ ///
+ public ref Ptr LinkedMax => ref Unsafe.AsRef>(&_ptr->LinkedMax); + + /// + /// + /// C++: + /// implot_internal.h:646 + ///
int PickerLevel + ///
+ ///
+ public ref int PickerLevel => ref Unsafe.AsRef(&_ptr->PickerLevel); + + /// + /// + /// C++: + /// implot_internal.h:647 + ///
ImPlotTime PickerTimeMin + ///
+ ///
+ public ref ImPlotTime PickerTimeMin => ref Unsafe.AsRef(&_ptr->PickerTimeMin); + + /// + /// + /// C++: + /// implot_internal.h:647 + ///
ImPlotTime PickerTimeMin, PickerTimeMax + ///
+ ///
+ public ref ImPlotTime PickerTimeMax => ref Unsafe.AsRef(&_ptr->PickerTimeMax); + + /// + /// + /// C++: + /// implot_internal.h:649 + ///
ImPlotTransform TransformForward + ///
+ ///
+ public ref nint TransformForward => ref Unsafe.AsRef(&_ptr->TransformForward); + + /// + /// + /// C++: + /// implot_internal.h:650 + ///
ImPlotTransform TransformInverse + ///
+ ///
+ public ref nint TransformInverse => ref Unsafe.AsRef(&_ptr->TransformInverse); + + /// + /// + /// C++: + /// implot_internal.h:651 + ///
void* TransformData + ///
+ ///
+ public ref nint TransformData => ref Unsafe.AsRef(&_ptr->TransformData); + + /// + /// + /// C++: + /// implot_internal.h:652 + ///
float PixelMin + ///
+ ///
+ public ref float PixelMin => ref Unsafe.AsRef(&_ptr->PixelMin); + + /// + /// + /// C++: + /// implot_internal.h:652 + ///
float PixelMin, PixelMax + ///
+ ///
+ public ref float PixelMax => ref Unsafe.AsRef(&_ptr->PixelMax); + + /// + /// + /// C++: + /// implot_internal.h:653 + ///
double ScaleMin + ///
+ ///
+ public ref double ScaleMin => ref Unsafe.AsRef(&_ptr->ScaleMin); + + /// + /// + /// C++: + /// implot_internal.h:653 + ///
double ScaleMin, ScaleMax + ///
+ ///
+ public ref double ScaleMax => ref Unsafe.AsRef(&_ptr->ScaleMax); + + /// + /// + /// C++: + /// implot_internal.h:654 + ///
double ScaleToPixel + ///
+ ///
+ public ref double ScaleToPixel => ref Unsafe.AsRef(&_ptr->ScaleToPixel); + + /// + /// + /// C++: + /// implot_internal.h:655 + ///
float Datum1 + ///
+ ///
+ public ref float Datum1 => ref Unsafe.AsRef(&_ptr->Datum1); + + /// + /// + /// C++: + /// implot_internal.h:655 + ///
float Datum1, Datum2 + ///
+ ///
+ public ref float Datum2 => ref Unsafe.AsRef(&_ptr->Datum2); + + /// + /// + /// C++: + /// implot_internal.h:657 + ///
ImRect HoverRect + ///
+ ///
+ public ref floatRect HoverRect => ref Unsafe.AsRef(&_ptr->HoverRect); + + /// + /// + /// C++: + /// implot_internal.h:658 + ///
int LabelOffset + ///
+ ///
+ public ref int LabelOffset => ref Unsafe.AsRef(&_ptr->LabelOffset); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj + ///
+ ///
+ public ref uint ColorMaj => ref Unsafe.AsRef(&_ptr->ColorMaj); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin + ///
+ ///
+ public ref uint ColorMin => ref Unsafe.AsRef(&_ptr->ColorMin); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick + ///
+ ///
+ public ref uint ColorTick => ref Unsafe.AsRef(&_ptr->ColorTick); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt + ///
+ ///
+ public ref uint ColorTxt => ref Unsafe.AsRef(&_ptr->ColorTxt); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg + ///
+ ///
+ public ref uint ColorBg => ref Unsafe.AsRef(&_ptr->ColorBg); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg, ColorHov + ///
+ ///
+ public ref uint ColorHov => ref Unsafe.AsRef(&_ptr->ColorHov); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg, ColorHov, ColorAct + ///
+ ///
+ public ref uint ColorAct => ref Unsafe.AsRef(&_ptr->ColorAct); + + /// + /// + /// C++: + /// implot_internal.h:659 + ///
ImU32 ColorMaj, ColorMin, ColorTick, ColorTxt, ColorBg, ColorHov, ColorAct, ColorHiLi + ///
+ ///
+ public ref uint ColorHiLi => ref Unsafe.AsRef(&_ptr->ColorHiLi); + + /// + /// + /// C++: + /// implot_internal.h:661 + ///
bool Enabled + ///
+ ///
+ public ref bool Enabled => ref Unsafe.AsRef(&_ptr->Enabled); + + /// + /// + /// C++: + /// implot_internal.h:662 + ///
bool Vertical + ///
+ ///
+ public ref bool Vertical => ref Unsafe.AsRef(&_ptr->Vertical); + + /// + /// + /// C++: + /// implot_internal.h:663 + ///
bool FitThisFrame + ///
+ ///
+ public ref bool FitThisFrame => ref Unsafe.AsRef(&_ptr->FitThisFrame); + + /// + /// + /// C++: + /// implot_internal.h:664 + ///
bool HasRange + ///
+ ///
+ public ref bool HasRange => ref Unsafe.AsRef(&_ptr->HasRange); + + /// + /// + /// C++: + /// implot_internal.h:665 + ///
bool HasFormatSpec + ///
+ ///
+ public ref bool HasFormatSpec => ref Unsafe.AsRef(&_ptr->HasFormatSpec); + + /// + /// + /// C++: + /// implot_internal.h:666 + ///
bool ShowDefaultTicks + ///
+ ///
+ public ref bool ShowDefaultTicks => ref Unsafe.AsRef(&_ptr->ShowDefaultTicks); + + /// + /// + /// C++: + /// implot_internal.h:667 + ///
bool Hovered + ///
+ ///
+ public ref bool Hovered => ref Unsafe.AsRef(&_ptr->Hovered); + + /// + /// + /// C++: + /// implot_internal.h:668 + ///
bool Held + ///
+ ///
+ public ref bool Held => ref Unsafe.AsRef(&_ptr->Held); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotColormapData.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotColormapData.gen.cs new file mode 100644 index 0000000..413a707 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotColormapData.gen.cs @@ -0,0 +1,367 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:319 + ///
struct ImPlotColormapData { + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 168)] + public partial struct ImPlotColormapData + { + /// + /// + /// C++: + /// implot_internal.h:320 + ///
ImVector<ImU32> Keys + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(0)] + public ImVector Keys; + + /// + /// + /// C++: + /// implot_internal.h:321 + ///
ImVector<int> KeyCounts + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(16)] + public ImVector KeyCounts; + + /// + /// + /// C++: + /// implot_internal.h:322 + ///
ImVector<int> KeyOffsets + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(32)] + public ImVector KeyOffsets; + + /// + /// + /// C++: + /// implot_internal.h:323 + ///
ImVector<ImU32> Tables + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(48)] + public ImVector Tables; + + /// + /// + /// C++: + /// implot_internal.h:324 + ///
ImVector<int> TableSizes + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(64)] + public ImVector TableSizes; + + /// + /// + /// C++: + /// implot_internal.h:325 + ///
ImVector<int> TableOffsets + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(80)] + public ImVector TableOffsets; + + /// + /// + /// C++: + /// implot_internal.h:326 + ///
ImGuiTextBuffer Text + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(96)] + public ImGuiTextBuffer Text; + + /// + /// + /// C++: + /// implot_internal.h:327 + ///
ImVector<int> TextOffsets + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(112)] + public ImVector TextOffsets; + + /// + /// + /// C++: + /// implot_internal.h:328 + ///
ImVector<bool> Quals + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(128)] + public ImVector Quals; + + /// + /// + /// C++: + /// implot_internal.h:329 + ///
ImGuiStorage Map + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(144)] + public ImGuiStorage Map; + + /// + /// + /// C++: + /// implot_internal.h:330 + ///
int Count + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + [FieldOffset(160)] + public int Count; + } + + /// + /// + /// C++: + /// implot_internal.h:319 + ///
struct ImPlotColormapData { + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public unsafe partial struct ImPlotColormapDataPtr(ImPlotColormapData* ptr) : INullable + { + private ImPlotColormapData* _ptr = ptr; + public ImPlotColormapData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotColormapDataPtr(ImPlotColormapData* ptr) => new(ptr); + + public static implicit operator ImPlotColormapData*(ImPlotColormapDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:320 + ///
ImVector<ImU32> Keys + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector Keys => ref Unsafe.AsRef>(&_ptr->Keys); + + /// + /// + /// C++: + /// implot_internal.h:321 + ///
ImVector<int> KeyCounts + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector KeyCounts => ref Unsafe.AsRef>(&_ptr->KeyCounts); + + /// + /// + /// C++: + /// implot_internal.h:322 + ///
ImVector<int> KeyOffsets + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector KeyOffsets => ref Unsafe.AsRef>(&_ptr->KeyOffsets); + + /// + /// + /// C++: + /// implot_internal.h:323 + ///
ImVector<ImU32> Tables + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector Tables => ref Unsafe.AsRef>(&_ptr->Tables); + + /// + /// + /// C++: + /// implot_internal.h:324 + ///
ImVector<int> TableSizes + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector TableSizes => ref Unsafe.AsRef>(&_ptr->TableSizes); + + /// + /// + /// C++: + /// implot_internal.h:325 + ///
ImVector<int> TableOffsets + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector TableOffsets => ref Unsafe.AsRef>(&_ptr->TableOffsets); + + /// + /// + /// C++: + /// implot_internal.h:326 + ///
ImGuiTextBuffer Text + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImGuiTextBuffer Text => ref Unsafe.AsRef(&_ptr->Text); + + /// + /// + /// C++: + /// implot_internal.h:327 + ///
ImVector<int> TextOffsets + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector TextOffsets => ref Unsafe.AsRef>(&_ptr->TextOffsets); + + /// + /// + /// C++: + /// implot_internal.h:328 + ///
ImVector<bool> Quals + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImVector Quals => ref Unsafe.AsRef>(&_ptr->Quals); + + /// + /// + /// C++: + /// implot_internal.h:329 + ///
ImGuiStorage Map + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref ImGuiStorage Map => ref Unsafe.AsRef(&_ptr->Map); + + /// + /// + /// C++: + /// implot_internal.h:330 + ///
int Count + ///
+ ///
+ /// + /// + /// Colormap data storage + /// + /// + public ref int Count => ref Unsafe.AsRef(&_ptr->Count); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotDateTimeSpec.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotDateTimeSpec.gen.cs new file mode 100644 index 0000000..20dd0e2 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotDateTimeSpec.gen.cs @@ -0,0 +1,164 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:278 + ///
struct ImPlotDateTimeSpec { + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ImPlotDateTimeSpec + { + /// + /// + /// C++: + /// implot_internal.h:286 + ///
ImPlotDateFmt Date + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + [FieldOffset(0)] + public ImPlotDateFmt Date; + + /// + /// + /// C++: + /// implot_internal.h:287 + ///
ImPlotTimeFmt Time + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + [FieldOffset(4)] + public ImPlotTimeFmt Time; + + /// + /// + /// C++: + /// implot_internal.h:288 + ///
bool UseISO8601 + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + [FieldOffset(8)] + public Bool8 UseISO8601; + + /// + /// + /// C++: + /// implot_internal.h:289 + ///
bool Use24HourClock + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + [FieldOffset(9)] + public Bool8 Use24HourClock; + } + + /// + /// + /// C++: + /// implot_internal.h:278 + ///
struct ImPlotDateTimeSpec { + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + public unsafe partial struct ImPlotDateTimeSpecPtr(ImPlotDateTimeSpec* ptr) : INullable + { + private ImPlotDateTimeSpec* _ptr = ptr; + public ImPlotDateTimeSpec* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotDateTimeSpecPtr(ImPlotDateTimeSpec* ptr) => new(ptr); + + public static implicit operator ImPlotDateTimeSpec*(ImPlotDateTimeSpecPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:286 + ///
ImPlotDateFmt Date + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + public ref ImPlotDateFmt Date => ref Unsafe.AsRef(&_ptr->Date); + + /// + /// + /// C++: + /// implot_internal.h:287 + ///
ImPlotTimeFmt Time + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + public ref ImPlotTimeFmt Time => ref Unsafe.AsRef(&_ptr->Time); + + /// + /// + /// C++: + /// implot_internal.h:288 + ///
bool UseISO8601 + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + public ref bool UseISO8601 => ref Unsafe.AsRef(&_ptr->UseISO8601); + + /// + /// + /// C++: + /// implot_internal.h:289 + ///
bool Use24HourClock + ///
+ ///
+ /// + /// + /// Combined date/time format spec + /// + /// + public ref bool Use24HourClock => ref Unsafe.AsRef(&_ptr->Use24HourClock); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotItem.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotItem.gen.cs new file mode 100644 index 0000000..437a6ca --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotItem.gen.cs @@ -0,0 +1,241 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:83 + ///
struct ImPlotItem + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImPlotItem + { + /// + /// + /// C++: + /// implot_internal.h:942 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// implot_internal.h:943 + ///
ImU32 Color + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(4)] + public uint Color; + + /// + /// + /// C++: + /// implot_internal.h:944 + ///
ImRect LegendHoverRect + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(8)] + public floatRect LegendHoverRect; + + /// + /// + /// C++: + /// implot_internal.h:945 + ///
int NameOffset + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(24)] + public int NameOffset; + + /// + /// + /// C++: + /// implot_internal.h:946 + ///
bool Show + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(28)] + public Bool8 Show; + + /// + /// + /// C++: + /// implot_internal.h:947 + ///
bool LegendHovered + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(29)] + public Bool8 LegendHovered; + + /// + /// + /// C++: + /// implot_internal.h:948 + ///
bool SeenThisFrame + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + [FieldOffset(30)] + public Bool8 SeenThisFrame; + } + + /// + /// + /// C++: + /// implot_internal.h:83 + ///
struct ImPlotItem + ///
+ ///
+ public unsafe partial struct ImPlotItemPtr(ImPlotItem* ptr) : INullable + { + private ImPlotItem* _ptr = ptr; + public ImPlotItem* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotItemPtr(ImPlotItem* ptr) => new(ptr); + + public static implicit operator ImPlotItem*(ImPlotItemPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:942 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// implot_internal.h:943 + ///
ImU32 Color + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref uint Color => ref Unsafe.AsRef(&_ptr->Color); + + /// + /// + /// C++: + /// implot_internal.h:944 + ///
ImRect LegendHoverRect + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref floatRect LegendHoverRect => ref Unsafe.AsRef(&_ptr->LegendHoverRect); + + /// + /// + /// C++: + /// implot_internal.h:945 + ///
int NameOffset + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref int NameOffset => ref Unsafe.AsRef(&_ptr->NameOffset); + + /// + /// + /// C++: + /// implot_internal.h:946 + ///
bool Show + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref bool Show => ref Unsafe.AsRef(&_ptr->Show); + + /// + /// + /// C++: + /// implot_internal.h:947 + ///
bool LegendHovered + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref bool LegendHovered => ref Unsafe.AsRef(&_ptr->LegendHovered); + + /// + /// + /// C++: + /// implot_internal.h:948 + ///
bool SeenThisFrame + ///
+ ///
+ /// + /// + /// State information for Plot items + /// + /// + public ref bool SeenThisFrame => ref Unsafe.AsRef(&_ptr->SeenThisFrame); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotItemGroup.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotItemGroup.gen.cs new file mode 100644 index 0000000..f2e9b82 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotItemGroup.gen.cs @@ -0,0 +1,164 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:990 + ///
struct ImPlotItemGroup + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public partial struct ImPlotItemGroup + { + /// + /// + /// C++: + /// implot_internal.h:992 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// implot_internal.h:993 + ///
ImPlotLegend Legend + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + [FieldOffset(8)] + public ImPlotLegend Legend; + + /// + /// + /// C++: + /// implot_internal.h:994 + ///
ImPool<ImPlotItem> ItemPool + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + [FieldOffset(104)] + public ImPool ItemPool; + + /// + /// + /// C++: + /// implot_internal.h:995 + ///
int ColormapIdx + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + [FieldOffset(144)] + public int ColormapIdx; + } + + /// + /// + /// C++: + /// implot_internal.h:990 + ///
struct ImPlotItemGroup + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + public unsafe partial struct ImPlotItemGroupPtr(ImPlotItemGroup* ptr) : INullable + { + private ImPlotItemGroup* _ptr = ptr; + public ImPlotItemGroup* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotItemGroupPtr(ImPlotItemGroup* ptr) => new(ptr); + + public static implicit operator ImPlotItemGroup*(ImPlotItemGroupPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:992 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// implot_internal.h:993 + ///
ImPlotLegend Legend + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + public ref ImPlotLegend Legend => ref Unsafe.AsRef(&_ptr->Legend); + + /// + /// + /// C++: + /// implot_internal.h:994 + ///
ImPool<ImPlotItem> ItemPool + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + public ref ImPool ItemPool => ref Unsafe.AsRef>(&_ptr->ItemPool); + + /// + /// + /// C++: + /// implot_internal.h:995 + ///
int ColormapIdx + ///
+ ///
+ /// + /// + /// Holds Items and Legend data + /// + /// + public ref int ColormapIdx => ref Unsafe.AsRef(&_ptr->ColormapIdx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotLegend.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotLegend.gen.cs new file mode 100644 index 0000000..cb2962e --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotLegend.gen.cs @@ -0,0 +1,386 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:84 + ///
struct ImPlotLegend + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct ImPlotLegend + { + /// + /// + /// C++: + /// implot_internal.h:965 + ///
ImPlotLegendFlags Flags + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(0)] + public ImPlotLegendFlags Flags; + + /// + /// + /// C++: + /// implot_internal.h:966 + ///
ImPlotLegendFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(4)] + public ImPlotLegendFlags PreviousFlags; + + /// + /// + /// C++: + /// implot_internal.h:967 + ///
ImPlotLocation Location + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(8)] + public ImPlotLocation Location; + + /// + /// + /// C++: + /// implot_internal.h:968 + ///
ImPlotLocation PreviousLocation + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(12)] + public ImPlotLocation PreviousLocation; + + /// + /// + /// C++: + /// implot_internal.h:969 + ///
ImVec2 Scroll + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(16)] + public float2 Scroll; + + /// + /// + /// C++: + /// implot_internal.h:970 + ///
ImVector<int> Indices + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(24)] + public ImVector Indices; + + /// + /// + /// C++: + /// implot_internal.h:971 + ///
ImGuiTextBuffer Labels + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(40)] + public ImGuiTextBuffer Labels; + + /// + /// + /// C++: + /// implot_internal.h:972 + ///
ImRect Rect + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(56)] + public floatRect Rect; + + /// + /// + /// C++: + /// implot_internal.h:973 + ///
ImRect RectClamped + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(72)] + public floatRect RectClamped; + + /// + /// + /// C++: + /// implot_internal.h:974 + ///
bool Hovered + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(88)] + public Bool8 Hovered; + + /// + /// + /// C++: + /// implot_internal.h:975 + ///
bool Held + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(89)] + public Bool8 Held; + + /// + /// + /// C++: + /// implot_internal.h:976 + ///
bool CanGoInside + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + [FieldOffset(90)] + public Bool8 CanGoInside; + } + + /// + /// + /// C++: + /// implot_internal.h:84 + ///
struct ImPlotLegend + ///
+ ///
+ public unsafe partial struct ImPlotLegendPtr(ImPlotLegend* ptr) : INullable + { + private ImPlotLegend* _ptr = ptr; + public ImPlotLegend* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotLegendPtr(ImPlotLegend* ptr) => new(ptr); + + public static implicit operator ImPlotLegend*(ImPlotLegendPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:965 + ///
ImPlotLegendFlags Flags + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref ImPlotLegendFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// implot_internal.h:966 + ///
ImPlotLegendFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref ImPlotLegendFlags PreviousFlags => ref Unsafe.AsRef(&_ptr->PreviousFlags); + + /// + /// + /// C++: + /// implot_internal.h:967 + ///
ImPlotLocation Location + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref ImPlotLocation Location => ref Unsafe.AsRef(&_ptr->Location); + + /// + /// + /// C++: + /// implot_internal.h:968 + ///
ImPlotLocation PreviousLocation + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref ImPlotLocation PreviousLocation => ref Unsafe.AsRef(&_ptr->PreviousLocation); + + /// + /// + /// C++: + /// implot_internal.h:969 + ///
ImVec2 Scroll + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref float2 Scroll => ref Unsafe.AsRef(&_ptr->Scroll); + + /// + /// + /// C++: + /// implot_internal.h:970 + ///
ImVector<int> Indices + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref ImVector Indices => ref Unsafe.AsRef>(&_ptr->Indices); + + /// + /// + /// C++: + /// implot_internal.h:971 + ///
ImGuiTextBuffer Labels + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref ImGuiTextBuffer Labels => ref Unsafe.AsRef(&_ptr->Labels); + + /// + /// + /// C++: + /// implot_internal.h:972 + ///
ImRect Rect + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref floatRect Rect => ref Unsafe.AsRef(&_ptr->Rect); + + /// + /// + /// C++: + /// implot_internal.h:973 + ///
ImRect RectClamped + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref floatRect RectClamped => ref Unsafe.AsRef(&_ptr->RectClamped); + + /// + /// + /// C++: + /// implot_internal.h:974 + ///
bool Hovered + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref bool Hovered => ref Unsafe.AsRef(&_ptr->Hovered); + + /// + /// + /// C++: + /// implot_internal.h:975 + ///
bool Held + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref bool Held => ref Unsafe.AsRef(&_ptr->Held); + + /// + /// + /// C++: + /// implot_internal.h:976 + ///
bool CanGoInside + ///
+ ///
+ /// + /// + /// Holds Legend state + /// + /// + public ref bool CanGoInside => ref Unsafe.AsRef(&_ptr->CanGoInside); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextItemData.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextItemData.gen.cs new file mode 100644 index 0000000..98dfab3 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextItemData.gen.cs @@ -0,0 +1,547 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:1175 + ///
struct ImPlotNextItemData { + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 128)] + public partial struct ImPlotNextItemData + { + /// + /// + /// ImPlotCol_Line, ImPlotCol_Fill, ImPlotCol_MarkerOutline, ImPlotCol_MarkerFill, ImPlotCol_ErrorBar + /// + /// + /// C++: + /// implot_internal.h:1176 + ///
ImVec4 Colors[5] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(0)] + public float4_5 Colors; + + /// + /// + /// C++: + /// implot_internal.h:1177 + ///
float LineWeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(80)] + public float LineWeight; + + /// + /// + /// C++: + /// implot_internal.h:1178 + ///
ImPlotMarker Marker + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(84)] + public ImPlotMarker Marker; + + /// + /// + /// C++: + /// implot_internal.h:1179 + ///
float MarkerSize + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(88)] + public float MarkerSize; + + /// + /// + /// C++: + /// implot_internal.h:1180 + ///
float MarkerWeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(92)] + public float MarkerWeight; + + /// + /// + /// C++: + /// implot_internal.h:1181 + ///
float FillAlpha + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(96)] + public float FillAlpha; + + /// + /// + /// C++: + /// implot_internal.h:1182 + ///
float ErrorBarSize + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(100)] + public float ErrorBarSize; + + /// + /// + /// C++: + /// implot_internal.h:1183 + ///
float ErrorBarWeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(104)] + public float ErrorBarWeight; + + /// + /// + /// C++: + /// implot_internal.h:1184 + ///
float DigitalBitHeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(108)] + public float DigitalBitHeight; + + /// + /// + /// C++: + /// implot_internal.h:1185 + ///
float DigitalBitGap + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(112)] + public float DigitalBitGap; + + /// + /// + /// C++: + /// implot_internal.h:1186 + ///
bool RenderLine + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(116)] + public Bool8 RenderLine; + + /// + /// + /// C++: + /// implot_internal.h:1187 + ///
bool RenderFill + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(117)] + public Bool8 RenderFill; + + /// + /// + /// C++: + /// implot_internal.h:1188 + ///
bool RenderMarkerLine + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(118)] + public Bool8 RenderMarkerLine; + + /// + /// + /// C++: + /// implot_internal.h:1189 + ///
bool RenderMarkerFill + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(119)] + public Bool8 RenderMarkerFill; + + /// + /// + /// C++: + /// implot_internal.h:1190 + ///
bool HasHidden + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(120)] + public Bool8 HasHidden; + + /// + /// + /// C++: + /// implot_internal.h:1191 + ///
bool Hidden + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(121)] + public Bool8 Hidden; + + /// + /// + /// C++: + /// implot_internal.h:1192 + ///
ImPlotCond HiddenCond + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + [FieldOffset(124)] + public ImPlotCond HiddenCond; + } + + /// + /// + /// C++: + /// implot_internal.h:1175 + ///
struct ImPlotNextItemData { + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public unsafe partial struct ImPlotNextItemDataPtr(ImPlotNextItemData* ptr) : INullable + { + private ImPlotNextItemData* _ptr = ptr; + public ImPlotNextItemData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotNextItemDataPtr(ImPlotNextItemData* ptr) => new(ptr); + + public static implicit operator ImPlotNextItemData*(ImPlotNextItemDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// ImPlotCol_Line, ImPlotCol_Fill, ImPlotCol_MarkerOutline, ImPlotCol_MarkerFill, ImPlotCol_ErrorBar + /// + /// + /// C++: + /// implot_internal.h:1176 + ///
ImVec4 Colors[5] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float4_5 Colors => ref Unsafe.AsRef(&_ptr->Colors); + + /// + /// + /// C++: + /// implot_internal.h:1177 + ///
float LineWeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float LineWeight => ref Unsafe.AsRef(&_ptr->LineWeight); + + /// + /// + /// C++: + /// implot_internal.h:1178 + ///
ImPlotMarker Marker + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref ImPlotMarker Marker => ref Unsafe.AsRef(&_ptr->Marker); + + /// + /// + /// C++: + /// implot_internal.h:1179 + ///
float MarkerSize + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float MarkerSize => ref Unsafe.AsRef(&_ptr->MarkerSize); + + /// + /// + /// C++: + /// implot_internal.h:1180 + ///
float MarkerWeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float MarkerWeight => ref Unsafe.AsRef(&_ptr->MarkerWeight); + + /// + /// + /// C++: + /// implot_internal.h:1181 + ///
float FillAlpha + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float FillAlpha => ref Unsafe.AsRef(&_ptr->FillAlpha); + + /// + /// + /// C++: + /// implot_internal.h:1182 + ///
float ErrorBarSize + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float ErrorBarSize => ref Unsafe.AsRef(&_ptr->ErrorBarSize); + + /// + /// + /// C++: + /// implot_internal.h:1183 + ///
float ErrorBarWeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float ErrorBarWeight => ref Unsafe.AsRef(&_ptr->ErrorBarWeight); + + /// + /// + /// C++: + /// implot_internal.h:1184 + ///
float DigitalBitHeight + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float DigitalBitHeight => ref Unsafe.AsRef(&_ptr->DigitalBitHeight); + + /// + /// + /// C++: + /// implot_internal.h:1185 + ///
float DigitalBitGap + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref float DigitalBitGap => ref Unsafe.AsRef(&_ptr->DigitalBitGap); + + /// + /// + /// C++: + /// implot_internal.h:1186 + ///
bool RenderLine + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref bool RenderLine => ref Unsafe.AsRef(&_ptr->RenderLine); + + /// + /// + /// C++: + /// implot_internal.h:1187 + ///
bool RenderFill + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref bool RenderFill => ref Unsafe.AsRef(&_ptr->RenderFill); + + /// + /// + /// C++: + /// implot_internal.h:1188 + ///
bool RenderMarkerLine + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref bool RenderMarkerLine => ref Unsafe.AsRef(&_ptr->RenderMarkerLine); + + /// + /// + /// C++: + /// implot_internal.h:1189 + ///
bool RenderMarkerFill + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref bool RenderMarkerFill => ref Unsafe.AsRef(&_ptr->RenderMarkerFill); + + /// + /// + /// C++: + /// implot_internal.h:1190 + ///
bool HasHidden + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref bool HasHidden => ref Unsafe.AsRef(&_ptr->HasHidden); + + /// + /// + /// C++: + /// implot_internal.h:1191 + ///
bool Hidden + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref bool Hidden => ref Unsafe.AsRef(&_ptr->Hidden); + + /// + /// + /// C++: + /// implot_internal.h:1192 + ///
ImPlotCond HiddenCond + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming item + /// + /// + public ref ImPlotCond HiddenCond => ref Unsafe.AsRef(&_ptr->HiddenCond); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextPlotData.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextPlotData.gen.cs new file mode 100644 index 0000000..2f5b5af --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotNextPlotData.gen.cs @@ -0,0 +1,212 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:86 + ///
struct ImPlotNextPlotData + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 232)] + public partial struct ImPlotNextPlotData + { + /// + /// + /// C++: + /// implot_internal.h:1155 + ///
ImPlotCond RangeCond[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + [FieldOffset(0)] + public ImPlotCond_6 RangeCond; + + /// + /// + /// C++: + /// implot_internal.h:1156 + ///
ImPlotRange Range[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + [FieldOffset(24)] + public ImPlotRange_6 Range; + + /// + /// + /// C++: + /// implot_internal.h:1157 + ///
bool HasRange[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + [FieldOffset(120)] + public Bool8_6 HasRange; + + /// + /// + /// C++: + /// implot_internal.h:1158 + ///
bool Fit[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + [FieldOffset(126)] + public Bool8_6 Fit; + + /// + /// + /// C++: + /// implot_internal.h:1159 + ///
double* LinkedMin[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + [FieldOffset(136)] + public Ptr_double__6 LinkedMin; + + /// + /// + /// C++: + /// implot_internal.h:1160 + ///
double* LinkedMax[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + [FieldOffset(184)] + public Ptr_double__6 LinkedMax; + } + + /// + /// + /// C++: + /// implot_internal.h:86 + ///
struct ImPlotNextPlotData + ///
+ ///
+ public unsafe partial struct ImPlotNextPlotDataPtr(ImPlotNextPlotData* ptr) : INullable + { + private ImPlotNextPlotData* _ptr = ptr; + public ImPlotNextPlotData* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotNextPlotDataPtr(ImPlotNextPlotData* ptr) => new(ptr); + + public static implicit operator ImPlotNextPlotData*(ImPlotNextPlotDataPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:1155 + ///
ImPlotCond RangeCond[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + public ref ImPlotCond_6 RangeCond => ref Unsafe.AsRef(&_ptr->RangeCond); + + /// + /// + /// C++: + /// implot_internal.h:1156 + ///
ImPlotRange Range[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + public ref ImPlotRange_6 Range => ref Unsafe.AsRef(&_ptr->Range); + + /// + /// + /// C++: + /// implot_internal.h:1157 + ///
bool HasRange[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + public ref Bool8_6 HasRange => ref Unsafe.AsRef(&_ptr->HasRange); + + /// + /// + /// C++: + /// implot_internal.h:1158 + ///
bool Fit[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + public ref Bool8_6 Fit => ref Unsafe.AsRef(&_ptr->Fit); + + /// + /// + /// C++: + /// implot_internal.h:1159 + ///
double* LinkedMin[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + public ref Ptr_double__6 LinkedMin => ref Unsafe.AsRef(&_ptr->LinkedMin); + + /// + /// + /// C++: + /// implot_internal.h:1160 + ///
double* LinkedMax[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Temporary data storage for upcoming plot + /// + /// + public ref Ptr_double__6 LinkedMax => ref Unsafe.AsRef(&_ptr->LinkedMax); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotPlot.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotPlot.gen.cs new file mode 100644 index 0000000..5e7b722 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotPlot.gen.cs @@ -0,0 +1,792 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:85 + ///
struct ImPlotPlot + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 2560)] + public partial struct ImPlotPlot + { + /// + /// + /// C++: + /// implot_internal.h:1015 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// implot_internal.h:1016 + ///
ImPlotFlags Flags + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(4)] + public ImPlotFlags Flags; + + /// + /// + /// C++: + /// implot_internal.h:1017 + ///
ImPlotFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(8)] + public ImPlotFlags PreviousFlags; + + /// + /// + /// C++: + /// implot_internal.h:1018 + ///
ImPlotLocation MouseTextLocation + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(12)] + public ImPlotLocation MouseTextLocation; + + /// + /// + /// C++: + /// implot_internal.h:1019 + ///
ImPlotMouseTextFlags MouseTextFlags + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(16)] + public ImPlotMouseTextFlags MouseTextFlags; + + /// + /// + /// C++: + /// implot_internal.h:1020 + ///
ImPlotAxis Axes[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(24)] + public ImPlotAxis_6 Axes; + + /// + /// + /// C++: + /// implot_internal.h:1021 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2280)] + public ImGuiTextBuffer TextBuffer; + + /// + /// + /// C++: + /// implot_internal.h:1022 + ///
ImPlotItemGroup Items + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2296)] + public ImPlotItemGroup Items; + + /// + /// + /// C++: + /// implot_internal.h:1023 + ///
ImAxis CurrentX + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2448)] + public ImAxis CurrentX; + + /// + /// + /// C++: + /// implot_internal.h:1024 + ///
ImAxis CurrentY + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2452)] + public ImAxis CurrentY; + + /// + /// + /// C++: + /// implot_internal.h:1025 + ///
ImRect FrameRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2456)] + public floatRect FrameRect; + + /// + /// + /// C++: + /// implot_internal.h:1026 + ///
ImRect CanvasRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2472)] + public floatRect CanvasRect; + + /// + /// + /// C++: + /// implot_internal.h:1027 + ///
ImRect PlotRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2488)] + public floatRect PlotRect; + + /// + /// + /// C++: + /// implot_internal.h:1028 + ///
ImRect AxesRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2504)] + public floatRect AxesRect; + + /// + /// + /// C++: + /// implot_internal.h:1029 + ///
ImRect SelectRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2520)] + public floatRect SelectRect; + + /// + /// + /// C++: + /// implot_internal.h:1030 + ///
ImVec2 SelectStart + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2536)] + public float2 SelectStart; + + /// + /// + /// C++: + /// implot_internal.h:1031 + ///
int TitleOffset + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2544)] + public int TitleOffset; + + /// + /// + /// C++: + /// implot_internal.h:1032 + ///
bool JustCreated + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2548)] + public Bool8 JustCreated; + + /// + /// + /// C++: + /// implot_internal.h:1033 + ///
bool Initialized + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2549)] + public Bool8 Initialized; + + /// + /// + /// C++: + /// implot_internal.h:1034 + ///
bool SetupLocked + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2550)] + public Bool8 SetupLocked; + + /// + /// + /// C++: + /// implot_internal.h:1035 + ///
bool FitThisFrame + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2551)] + public Bool8 FitThisFrame; + + /// + /// + /// C++: + /// implot_internal.h:1036 + ///
bool Hovered + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2552)] + public Bool8 Hovered; + + /// + /// + /// C++: + /// implot_internal.h:1037 + ///
bool Held + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2553)] + public Bool8 Held; + + /// + /// + /// C++: + /// implot_internal.h:1038 + ///
bool Selecting + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2554)] + public Bool8 Selecting; + + /// + /// + /// C++: + /// implot_internal.h:1039 + ///
bool Selected + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2555)] + public Bool8 Selected; + + /// + /// + /// C++: + /// implot_internal.h:1040 + ///
bool ContextLocked + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + [FieldOffset(2556)] + public Bool8 ContextLocked; + } + + /// + /// + /// C++: + /// implot_internal.h:85 + ///
struct ImPlotPlot + ///
+ ///
+ public unsafe partial struct ImPlotPlotPtr(ImPlotPlot* ptr) : INullable + { + private ImPlotPlot* _ptr = ptr; + public ImPlotPlot* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotPlotPtr(ImPlotPlot* ptr) => new(ptr); + + public static implicit operator ImPlotPlot*(ImPlotPlotPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:1015 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// implot_internal.h:1016 + ///
ImPlotFlags Flags + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImPlotFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// implot_internal.h:1017 + ///
ImPlotFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImPlotFlags PreviousFlags => ref Unsafe.AsRef(&_ptr->PreviousFlags); + + /// + /// + /// C++: + /// implot_internal.h:1018 + ///
ImPlotLocation MouseTextLocation + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImPlotLocation MouseTextLocation => ref Unsafe.AsRef(&_ptr->MouseTextLocation); + + /// + /// + /// C++: + /// implot_internal.h:1019 + ///
ImPlotMouseTextFlags MouseTextFlags + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImPlotMouseTextFlags MouseTextFlags => ref Unsafe.AsRef(&_ptr->MouseTextFlags); + + /// + /// + /// C++: + /// implot_internal.h:1020 + ///
ImPlotAxis Axes[ImAxis_COUNT] + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImPlotAxis_6 Axes => ref Unsafe.AsRef(&_ptr->Axes); + + /// + /// + /// C++: + /// implot_internal.h:1021 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImGuiTextBuffer TextBuffer => ref Unsafe.AsRef(&_ptr->TextBuffer); + + /// + /// + /// C++: + /// implot_internal.h:1022 + ///
ImPlotItemGroup Items + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImPlotItemGroup Items => ref Unsafe.AsRef(&_ptr->Items); + + /// + /// + /// C++: + /// implot_internal.h:1023 + ///
ImAxis CurrentX + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImAxis CurrentX => ref Unsafe.AsRef(&_ptr->CurrentX); + + /// + /// + /// C++: + /// implot_internal.h:1024 + ///
ImAxis CurrentY + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref ImAxis CurrentY => ref Unsafe.AsRef(&_ptr->CurrentY); + + /// + /// + /// C++: + /// implot_internal.h:1025 + ///
ImRect FrameRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref floatRect FrameRect => ref Unsafe.AsRef(&_ptr->FrameRect); + + /// + /// + /// C++: + /// implot_internal.h:1026 + ///
ImRect CanvasRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref floatRect CanvasRect => ref Unsafe.AsRef(&_ptr->CanvasRect); + + /// + /// + /// C++: + /// implot_internal.h:1027 + ///
ImRect PlotRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref floatRect PlotRect => ref Unsafe.AsRef(&_ptr->PlotRect); + + /// + /// + /// C++: + /// implot_internal.h:1028 + ///
ImRect AxesRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref floatRect AxesRect => ref Unsafe.AsRef(&_ptr->AxesRect); + + /// + /// + /// C++: + /// implot_internal.h:1029 + ///
ImRect SelectRect + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref floatRect SelectRect => ref Unsafe.AsRef(&_ptr->SelectRect); + + /// + /// + /// C++: + /// implot_internal.h:1030 + ///
ImVec2 SelectStart + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref float2 SelectStart => ref Unsafe.AsRef(&_ptr->SelectStart); + + /// + /// + /// C++: + /// implot_internal.h:1031 + ///
int TitleOffset + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref int TitleOffset => ref Unsafe.AsRef(&_ptr->TitleOffset); + + /// + /// + /// C++: + /// implot_internal.h:1032 + ///
bool JustCreated + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool JustCreated => ref Unsafe.AsRef(&_ptr->JustCreated); + + /// + /// + /// C++: + /// implot_internal.h:1033 + ///
bool Initialized + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool Initialized => ref Unsafe.AsRef(&_ptr->Initialized); + + /// + /// + /// C++: + /// implot_internal.h:1034 + ///
bool SetupLocked + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool SetupLocked => ref Unsafe.AsRef(&_ptr->SetupLocked); + + /// + /// + /// C++: + /// implot_internal.h:1035 + ///
bool FitThisFrame + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool FitThisFrame => ref Unsafe.AsRef(&_ptr->FitThisFrame); + + /// + /// + /// C++: + /// implot_internal.h:1036 + ///
bool Hovered + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool Hovered => ref Unsafe.AsRef(&_ptr->Hovered); + + /// + /// + /// C++: + /// implot_internal.h:1037 + ///
bool Held + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool Held => ref Unsafe.AsRef(&_ptr->Held); + + /// + /// + /// C++: + /// implot_internal.h:1038 + ///
bool Selecting + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool Selecting => ref Unsafe.AsRef(&_ptr->Selecting); + + /// + /// + /// C++: + /// implot_internal.h:1039 + ///
bool Selected + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool Selected => ref Unsafe.AsRef(&_ptr->Selected); + + /// + /// + /// C++: + /// implot_internal.h:1040 + ///
bool ContextLocked + ///
+ ///
+ /// + /// + /// Holds Plot state information that must persist after EndPlot + /// + /// + public ref bool ContextLocked => ref Unsafe.AsRef(&_ptr->ContextLocked); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotPointError.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotPointError.gen.cs new file mode 100644 index 0000000..0d9efe4 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotPointError.gen.cs @@ -0,0 +1,164 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:421 + ///
struct ImPlotPointError { + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImPlotPointError + { + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + [FieldOffset(0)] + public double X; + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X, Y + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + [FieldOffset(8)] + public double Y; + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X, Y, Neg + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + [FieldOffset(16)] + public double Neg; + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X, Y, Neg, Pos + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + [FieldOffset(24)] + public double Pos; + } + + /// + /// + /// C++: + /// implot_internal.h:421 + ///
struct ImPlotPointError { + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + public unsafe partial struct ImPlotPointErrorPtr(ImPlotPointError* ptr) : INullable + { + private ImPlotPointError* _ptr = ptr; + public ImPlotPointError* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotPointErrorPtr(ImPlotPointError* ptr) => new(ptr); + + public static implicit operator ImPlotPointError*(ImPlotPointErrorPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + public ref double X => ref Unsafe.AsRef(&_ptr->X); + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X, Y + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + public ref double Y => ref Unsafe.AsRef(&_ptr->Y); + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X, Y, Neg + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + public ref double Neg => ref Unsafe.AsRef(&_ptr->Neg); + + /// + /// + /// C++: + /// implot_internal.h:422 + ///
double X, Y, Neg, Pos + ///
+ ///
+ /// + /// + /// ImPlotPoint with positive/negative error values + /// + /// + public ref double Pos => ref Unsafe.AsRef(&_ptr->Pos); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotSubplot.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotSubplot.gen.cs new file mode 100644 index 0000000..fd290d3 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotSubplot.gen.cs @@ -0,0 +1,601 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:1118 + ///
struct ImPlotSubplot { + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 336)] + public partial struct ImPlotSubplot + { + /// + /// + /// C++: + /// implot_internal.h:1119 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(0)] + public ImGuiID ID; + + /// + /// + /// C++: + /// implot_internal.h:1120 + ///
ImPlotSubplotFlags Flags + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(4)] + public ImPlotSubplotFlags Flags; + + /// + /// + /// C++: + /// implot_internal.h:1121 + ///
ImPlotSubplotFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(8)] + public ImPlotSubplotFlags PreviousFlags; + + /// + /// + /// C++: + /// implot_internal.h:1122 + ///
ImPlotItemGroup Items + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(16)] + public ImPlotItemGroup Items; + + /// + /// + /// C++: + /// implot_internal.h:1123 + ///
int Rows + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(168)] + public int Rows; + + /// + /// + /// C++: + /// implot_internal.h:1124 + ///
int Cols + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(172)] + public int Cols; + + /// + /// + /// C++: + /// implot_internal.h:1125 + ///
int CurrentIdx + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(176)] + public int CurrentIdx; + + /// + /// + /// C++: + /// implot_internal.h:1126 + ///
ImRect FrameRect + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(180)] + public floatRect FrameRect; + + /// + /// + /// C++: + /// implot_internal.h:1127 + ///
ImRect GridRect + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(196)] + public floatRect GridRect; + + /// + /// + /// C++: + /// implot_internal.h:1128 + ///
ImVec2 CellSize + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(212)] + public float2 CellSize; + + /// + /// + /// C++: + /// implot_internal.h:1129 + ///
ImVector<ImPlotAlignmentData> RowAlignmentData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(224)] + public ImVector RowAlignmentData; + + /// + /// + /// C++: + /// implot_internal.h:1130 + ///
ImVector<ImPlotAlignmentData> ColAlignmentData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(240)] + public ImVector ColAlignmentData; + + /// + /// + /// C++: + /// implot_internal.h:1131 + ///
ImVector<float> RowRatios + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(256)] + public ImVector RowRatios; + + /// + /// + /// C++: + /// implot_internal.h:1132 + ///
ImVector<float> ColRatios + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(272)] + public ImVector ColRatios; + + /// + /// + /// C++: + /// implot_internal.h:1133 + ///
ImVector<ImPlotRange> RowLinkData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(288)] + public ImVector RowLinkData; + + /// + /// + /// C++: + /// implot_internal.h:1134 + ///
ImVector<ImPlotRange> ColLinkData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(304)] + public ImVector ColLinkData; + + /// + /// + /// C++: + /// implot_internal.h:1135 + ///
float TempSizes[2] + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(320)] + public float2 TempSizes; + + /// + /// + /// C++: + /// implot_internal.h:1136 + ///
bool FrameHovered + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(328)] + public Bool8 FrameHovered; + + /// + /// + /// C++: + /// implot_internal.h:1137 + ///
bool HasTitle + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + [FieldOffset(329)] + public Bool8 HasTitle; + } + + /// + /// + /// C++: + /// implot_internal.h:1118 + ///
struct ImPlotSubplot { + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public unsafe partial struct ImPlotSubplotPtr(ImPlotSubplot* ptr) : INullable + { + private ImPlotSubplot* _ptr = ptr; + public ImPlotSubplot* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotSubplotPtr(ImPlotSubplot* ptr) => new(ptr); + + public static implicit operator ImPlotSubplot*(ImPlotSubplotPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:1119 + ///
ImGuiID ID + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImGuiID ID => ref Unsafe.AsRef(&_ptr->ID); + + /// + /// + /// C++: + /// implot_internal.h:1120 + ///
ImPlotSubplotFlags Flags + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImPlotSubplotFlags Flags => ref Unsafe.AsRef(&_ptr->Flags); + + /// + /// + /// C++: + /// implot_internal.h:1121 + ///
ImPlotSubplotFlags PreviousFlags + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImPlotSubplotFlags PreviousFlags => ref Unsafe.AsRef(&_ptr->PreviousFlags); + + /// + /// + /// C++: + /// implot_internal.h:1122 + ///
ImPlotItemGroup Items + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImPlotItemGroup Items => ref Unsafe.AsRef(&_ptr->Items); + + /// + /// + /// C++: + /// implot_internal.h:1123 + ///
int Rows + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref int Rows => ref Unsafe.AsRef(&_ptr->Rows); + + /// + /// + /// C++: + /// implot_internal.h:1124 + ///
int Cols + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref int Cols => ref Unsafe.AsRef(&_ptr->Cols); + + /// + /// + /// C++: + /// implot_internal.h:1125 + ///
int CurrentIdx + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref int CurrentIdx => ref Unsafe.AsRef(&_ptr->CurrentIdx); + + /// + /// + /// C++: + /// implot_internal.h:1126 + ///
ImRect FrameRect + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref floatRect FrameRect => ref Unsafe.AsRef(&_ptr->FrameRect); + + /// + /// + /// C++: + /// implot_internal.h:1127 + ///
ImRect GridRect + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref floatRect GridRect => ref Unsafe.AsRef(&_ptr->GridRect); + + /// + /// + /// C++: + /// implot_internal.h:1128 + ///
ImVec2 CellSize + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref float2 CellSize => ref Unsafe.AsRef(&_ptr->CellSize); + + /// + /// + /// C++: + /// implot_internal.h:1129 + ///
ImVector<ImPlotAlignmentData> RowAlignmentData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImVector RowAlignmentData => + ref Unsafe.AsRef>(&_ptr->RowAlignmentData); + + /// + /// + /// C++: + /// implot_internal.h:1130 + ///
ImVector<ImPlotAlignmentData> ColAlignmentData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImVector ColAlignmentData => + ref Unsafe.AsRef>(&_ptr->ColAlignmentData); + + /// + /// + /// C++: + /// implot_internal.h:1131 + ///
ImVector<float> RowRatios + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImVector RowRatios => ref Unsafe.AsRef>(&_ptr->RowRatios); + + /// + /// + /// C++: + /// implot_internal.h:1132 + ///
ImVector<float> ColRatios + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImVector ColRatios => ref Unsafe.AsRef>(&_ptr->ColRatios); + + /// + /// + /// C++: + /// implot_internal.h:1133 + ///
ImVector<ImPlotRange> RowLinkData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImVector RowLinkData => ref Unsafe.AsRef>(&_ptr->RowLinkData); + + /// + /// + /// C++: + /// implot_internal.h:1134 + ///
ImVector<ImPlotRange> ColLinkData + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref ImVector ColLinkData => ref Unsafe.AsRef>(&_ptr->ColLinkData); + + /// + /// + /// C++: + /// implot_internal.h:1135 + ///
float TempSizes[2] + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref float2 TempSizes => ref Unsafe.AsRef(&_ptr->TempSizes); + + /// + /// + /// C++: + /// implot_internal.h:1136 + ///
bool FrameHovered + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref bool FrameHovered => ref Unsafe.AsRef(&_ptr->FrameHovered); + + /// + /// + /// C++: + /// implot_internal.h:1137 + ///
bool HasTitle + ///
+ ///
+ /// + /// + /// Holds subplot data that must persist after EndSubplot + /// + /// + public ref bool HasTitle => ref Unsafe.AsRef(&_ptr->HasTitle); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTag.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTag.gen.cs new file mode 100644 index 0000000..9fa73e7 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTag.gen.cs @@ -0,0 +1,133 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:483 + ///
struct ImPlotTag { + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImPlotTag + { + /// + /// + /// C++: + /// implot_internal.h:484 + ///
ImAxis Axis + ///
+ ///
+ [FieldOffset(0)] + public ImAxis Axis; + + /// + /// + /// C++: + /// implot_internal.h:485 + ///
double Value + ///
+ ///
+ [FieldOffset(8)] + public double Value; + + /// + /// + /// C++: + /// implot_internal.h:486 + ///
ImU32 ColorBg + ///
+ ///
+ [FieldOffset(16)] + public uint ColorBg; + + /// + /// + /// C++: + /// implot_internal.h:487 + ///
ImU32 ColorFg + ///
+ ///
+ [FieldOffset(20)] + public uint ColorFg; + + /// + /// + /// C++: + /// implot_internal.h:488 + ///
int TextOffset + ///
+ ///
+ [FieldOffset(24)] + public int TextOffset; + } + + /// + /// + /// C++: + /// implot_internal.h:483 + ///
struct ImPlotTag { + ///
+ ///
+ public unsafe partial struct ImPlotTagPtr(ImPlotTag* ptr) : INullable + { + private ImPlotTag* _ptr = ptr; + public ImPlotTag* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotTagPtr(ImPlotTag* ptr) => new(ptr); + + public static implicit operator ImPlotTag*(ImPlotTagPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:484 + ///
ImAxis Axis + ///
+ ///
+ public ref ImAxis Axis => ref Unsafe.AsRef(&_ptr->Axis); + + /// + /// + /// C++: + /// implot_internal.h:485 + ///
double Value + ///
+ ///
+ public ref double Value => ref Unsafe.AsRef(&_ptr->Value); + + /// + /// + /// C++: + /// implot_internal.h:486 + ///
ImU32 ColorBg + ///
+ ///
+ public ref uint ColorBg => ref Unsafe.AsRef(&_ptr->ColorBg); + + /// + /// + /// C++: + /// implot_internal.h:487 + ///
ImU32 ColorFg + ///
+ ///
+ public ref uint ColorFg => ref Unsafe.AsRef(&_ptr->ColorFg); + + /// + /// + /// C++: + /// implot_internal.h:488 + ///
int TextOffset + ///
+ ///
+ public ref int TextOffset => ref Unsafe.AsRef(&_ptr->TextOffset); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTagCollection.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTagCollection.gen.cs new file mode 100644 index 0000000..02d1fd8 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTagCollection.gen.cs @@ -0,0 +1,95 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:491 + ///
struct ImPlotTagCollection { + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImPlotTagCollection + { + /// + /// + /// C++: + /// implot_internal.h:493 + ///
ImVector<ImPlotTag> Tags + ///
+ ///
+ [FieldOffset(0)] + public ImVector Tags; + + /// + /// + /// C++: + /// implot_internal.h:494 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ [FieldOffset(16)] + public ImGuiTextBuffer TextBuffer; + + /// + /// + /// C++: + /// implot_internal.h:495 + ///
int Size + ///
+ ///
+ [FieldOffset(32)] + public int Size; + } + + /// + /// + /// C++: + /// implot_internal.h:491 + ///
struct ImPlotTagCollection { + ///
+ ///
+ public unsafe partial struct ImPlotTagCollectionPtr(ImPlotTagCollection* ptr) : INullable + { + private ImPlotTagCollection* _ptr = ptr; + public ImPlotTagCollection* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotTagCollectionPtr(ImPlotTagCollection* ptr) => new(ptr); + + public static implicit operator ImPlotTagCollection*(ImPlotTagCollectionPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:493 + ///
ImVector<ImPlotTag> Tags + ///
+ ///
+ public ref ImVector Tags => ref Unsafe.AsRef>(&_ptr->Tags); + + /// + /// + /// C++: + /// implot_internal.h:494 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ public ref ImGuiTextBuffer TextBuffer => ref Unsafe.AsRef(&_ptr->TextBuffer); + + /// + /// + /// C++: + /// implot_internal.h:495 + ///
int Size + ///
+ ///
+ public ref int Size => ref Unsafe.AsRef(&_ptr->Size); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTick.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTick.gen.cs new file mode 100644 index 0000000..aa316e6 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTick.gen.cs @@ -0,0 +1,270 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:80 + ///
struct ImPlotTick + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct ImPlotTick + { + /// + /// + /// C++: + /// implot_internal.h:534 + ///
double PlotPos + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(0)] + public double PlotPos; + + /// + /// + /// C++: + /// implot_internal.h:535 + ///
float PixelPos + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(8)] + public float PixelPos; + + /// + /// + /// C++: + /// implot_internal.h:536 + ///
ImVec2 LabelSize + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(12)] + public float2 LabelSize; + + /// + /// + /// C++: + /// implot_internal.h:537 + ///
int TextOffset + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(20)] + public int TextOffset; + + /// + /// + /// C++: + /// implot_internal.h:538 + ///
bool Major + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(24)] + public Bool8 Major; + + /// + /// + /// C++: + /// implot_internal.h:539 + ///
bool ShowLabel + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(25)] + public Bool8 ShowLabel; + + /// + /// + /// C++: + /// implot_internal.h:540 + ///
int Level + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(28)] + public int Level; + + /// + /// + /// C++: + /// implot_internal.h:541 + ///
int Idx + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + [FieldOffset(32)] + public int Idx; + } + + /// + /// + /// C++: + /// implot_internal.h:80 + ///
struct ImPlotTick + ///
+ ///
+ public unsafe partial struct ImPlotTickPtr(ImPlotTick* ptr) : INullable + { + private ImPlotTick* _ptr = ptr; + public ImPlotTick* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotTickPtr(ImPlotTick* ptr) => new(ptr); + + public static implicit operator ImPlotTick*(ImPlotTickPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:534 + ///
double PlotPos + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref double PlotPos => ref Unsafe.AsRef(&_ptr->PlotPos); + + /// + /// + /// C++: + /// implot_internal.h:535 + ///
float PixelPos + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref float PixelPos => ref Unsafe.AsRef(&_ptr->PixelPos); + + /// + /// + /// C++: + /// implot_internal.h:536 + ///
ImVec2 LabelSize + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref float2 LabelSize => ref Unsafe.AsRef(&_ptr->LabelSize); + + /// + /// + /// C++: + /// implot_internal.h:537 + ///
int TextOffset + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref int TextOffset => ref Unsafe.AsRef(&_ptr->TextOffset); + + /// + /// + /// C++: + /// implot_internal.h:538 + ///
bool Major + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref bool Major => ref Unsafe.AsRef(&_ptr->Major); + + /// + /// + /// C++: + /// implot_internal.h:539 + ///
bool ShowLabel + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref bool ShowLabel => ref Unsafe.AsRef(&_ptr->ShowLabel); + + /// + /// + /// C++: + /// implot_internal.h:540 + ///
int Level + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref int Level => ref Unsafe.AsRef(&_ptr->Level); + + /// + /// + /// C++: + /// implot_internal.h:541 + ///
int Idx + ///
+ ///
+ /// + /// + /// Tick mark info + /// + /// + public ref int Idx => ref Unsafe.AsRef(&_ptr->Idx); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTicker.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTicker.gen.cs new file mode 100644 index 0000000..99d014f --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTicker.gen.cs @@ -0,0 +1,183 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:87 + ///
struct ImPlotTicker + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct ImPlotTicker + { + /// + /// + /// C++: + /// implot_internal.h:555 + ///
ImVector<ImPlotTick> Ticks + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + [FieldOffset(0)] + public ImVector Ticks; + + /// + /// + /// C++: + /// implot_internal.h:556 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + [FieldOffset(16)] + public ImGuiTextBuffer TextBuffer; + + /// + /// + /// C++: + /// implot_internal.h:557 + ///
ImVec2 MaxSize + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + [FieldOffset(32)] + public float2 MaxSize; + + /// + /// + /// C++: + /// implot_internal.h:558 + ///
ImVec2 LateSize + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + [FieldOffset(40)] + public float2 LateSize; + + /// + /// + /// C++: + /// implot_internal.h:559 + ///
int Levels + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + [FieldOffset(48)] + public int Levels; + } + + /// + /// + /// C++: + /// implot_internal.h:87 + ///
struct ImPlotTicker + ///
+ ///
+ public unsafe partial struct ImPlotTickerPtr(ImPlotTicker* ptr) : INullable + { + private ImPlotTicker* _ptr = ptr; + public ImPlotTicker* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotTickerPtr(ImPlotTicker* ptr) => new(ptr); + + public static implicit operator ImPlotTicker*(ImPlotTickerPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:555 + ///
ImVector<ImPlotTick> Ticks + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + public ref ImVector Ticks => ref Unsafe.AsRef>(&_ptr->Ticks); + + /// + /// + /// C++: + /// implot_internal.h:556 + ///
ImGuiTextBuffer TextBuffer + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + public ref ImGuiTextBuffer TextBuffer => ref Unsafe.AsRef(&_ptr->TextBuffer); + + /// + /// + /// C++: + /// implot_internal.h:557 + ///
ImVec2 MaxSize + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + public ref float2 MaxSize => ref Unsafe.AsRef(&_ptr->MaxSize); + + /// + /// + /// C++: + /// implot_internal.h:558 + ///
ImVec2 LateSize + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + public ref float2 LateSize => ref Unsafe.AsRef(&_ptr->LateSize); + + /// + /// + /// C++: + /// implot_internal.h:559 + ///
int Levels + ///
+ ///
+ /// + /// + /// Collection of ticks + /// + /// + public ref int Levels => ref Unsafe.AsRef(&_ptr->Levels); + } +} diff --git a/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTime.gen.cs b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTime.gen.cs new file mode 100644 index 0000000..45569f1 --- /dev/null +++ b/Brutal.ImPlot/Generated-Internal/Structs/ImPlotTime.gen.cs @@ -0,0 +1,118 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.Internal +{ + /// + /// + /// C++: + /// implot_internal.h:293 + ///
struct ImPlotTime { + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImPlotTime + { + /// + /// + /// second part + /// + /// + /// C++: + /// implot_internal.h:294 + ///
time_t S + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + [FieldOffset(0)] + public long S; + + /// + /// + /// microsecond part + /// + /// + /// C++: + /// implot_internal.h:295 + ///
int Us + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + [FieldOffset(8)] + public int Us; + } + + /// + /// + /// C++: + /// implot_internal.h:293 + ///
struct ImPlotTime { + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + public unsafe partial struct ImPlotTimePtr(ImPlotTime* ptr) : INullable + { + private ImPlotTime* _ptr = ptr; + public ImPlotTime* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotTimePtr(ImPlotTime* ptr) => new(ptr); + + public static implicit operator ImPlotTime*(ImPlotTimePtr wrapper) => wrapper.Ptr; + + /// + /// + /// second part + /// + /// + /// C++: + /// implot_internal.h:294 + ///
time_t S + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + public ref long S => ref Unsafe.AsRef(&_ptr->S); + + /// + /// + /// microsecond part + /// + /// + /// C++: + /// implot_internal.h:295 + ///
int Us + ///
+ ///
+ /// + /// + /// Two part timestamp struct. + /// + /// + public ref int Us => ref Unsafe.AsRef(&_ptr->Us); + } +} diff --git a/Brutal.ImPlot/Generated/Delegates/ImPlotFormatter.gen.cs b/Brutal.ImPlot/Generated/Delegates/ImPlotFormatter.gen.cs new file mode 100644 index 0000000..e53c4ea --- /dev/null +++ b/Brutal.ImPlot/Generated/Delegates/ImPlotFormatter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:587
+ /// typedef int (*ImPlotFormatter)(double value, char* buff, int size, void* user_data) + ///
+ ///
+ /// + /// + /// Callback signature for axis tick label formatter. + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int ImPlotFormatter(double value, byte* buff, int size, void* user_data); +} diff --git a/Brutal.ImPlot/Generated/Delegates/ImPlotGetter.gen.cs b/Brutal.ImPlot/Generated/Delegates/ImPlotGetter.gen.cs new file mode 100644 index 0000000..62cc371 --- /dev/null +++ b/Brutal.ImPlot/Generated/Delegates/ImPlotGetter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:590
+ /// typedef ImPlotPoint (*ImPlotGetter)(int idx, void* user_data) + ///
+ ///
+ /// + /// + /// Callback signature for data getter. + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate double2 ImPlotGetter(int idx, void* user_data); +} diff --git a/Brutal.ImPlot/Generated/Delegates/ImPlotTransform.gen.cs b/Brutal.ImPlot/Generated/Delegates/ImPlotTransform.gen.cs new file mode 100644 index 0000000..7cae29e --- /dev/null +++ b/Brutal.ImPlot/Generated/Delegates/ImPlotTransform.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.InteropServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:593
+ /// typedef double (*ImPlotTransform)(double value, void* user_data) + ///
+ ///
+ /// + /// + /// Callback signature for axis transform. + /// + /// + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate double ImPlotTransform(double value, void* user_data); +} diff --git a/Brutal.ImPlot/Generated/Enums/ImAxis.gen.cs b/Brutal.ImPlot/Generated/Enums/ImAxis.gen.cs new file mode 100644 index 0000000..c49c0b9 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImAxis.gen.cs @@ -0,0 +1,129 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:117
+ /// enum ImAxis_ { + ///
+ ///
+ /// + /// + /// Axis indices. The values assigned may change; NEVER hardcode these. + /// + /// + public enum ImAxis : int + { + /// + /// + /// enabled by default + /// + /// + /// C++: implot.h:119
+ /// ImAxis_X1 = 0 + ///
+ ///
+ /// + /// + /// horizontal axes + /// + /// + X1 = 0, + + /// + /// + /// disabled by default + /// + /// + /// C++: implot.h:120
+ /// ImAxis_X2 + ///
+ ///
+ /// + /// + /// horizontal axes + /// + /// + X2, + + /// + /// + /// disabled by default + /// + /// + /// C++: implot.h:121
+ /// ImAxis_X3 + ///
+ ///
+ /// + /// + /// horizontal axes + /// + /// + X3, + + /// + /// + /// enabled by default + /// + /// + /// C++: implot.h:123
+ /// ImAxis_Y1 + ///
+ ///
+ /// + /// + /// vertical axes + /// + /// + Y1, + + /// + /// + /// disabled by default + /// + /// + /// C++: implot.h:124
+ /// ImAxis_Y2 + ///
+ ///
+ /// + /// + /// vertical axes + /// + /// + Y2, + + /// + /// + /// disabled by default + /// + /// + /// C++: implot.h:125
+ /// ImAxis_Y3 + ///
+ ///
+ /// + /// + /// vertical axes + /// + /// + Y3, + + /// + /// + /// C++: implot.h:127
+ /// ImAxis_COUNT + ///
+ ///
+ /// + /// + /// bookeeping + /// + /// + COUNT, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotAxisFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotAxisFlags.gen.cs new file mode 100644 index 0000000..ef29bc0 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotAxisFlags.gen.cs @@ -0,0 +1,333 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:146
+ /// enum ImPlotAxisFlags_ { + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + [Flags] + public enum ImPlotAxisFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:147
+ /// ImPlotAxisFlags_None = 0 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + None = 0, + + /// + /// + /// the axis label will not be displayed (axis labels are also hidden if the supplied string name is + /// nullptr) + /// + /// + /// C++: implot.h:148
+ /// ImPlotAxisFlags_NoLabel = 1 << 0 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoLabel = 1 << 0, + + /// + /// + /// no grid lines will be displayed + /// + /// + /// C++: implot.h:149
+ /// ImPlotAxisFlags_NoGridLines = 1 << 1 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoGridLines = 1 << 1, + + /// + /// + /// no tick marks will be displayed + /// + /// + /// C++: implot.h:150
+ /// ImPlotAxisFlags_NoTickMarks = 1 << 2 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoTickMarks = 1 << 2, + + /// + /// + /// no text labels will be displayed + /// + /// + /// C++: implot.h:151
+ /// ImPlotAxisFlags_NoTickLabels = 1 << 3 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoTickLabels = 1 << 3, + + /// + /// + /// axis will not be initially fit to data extents on the first rendered frame + /// + /// + /// C++: implot.h:152
+ /// ImPlotAxisFlags_NoInitialFit = 1 << 4 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoInitialFit = 1 << 4, + + /// + /// + /// the user will not be able to open context menus with right-click + /// + /// + /// C++: implot.h:153
+ /// ImPlotAxisFlags_NoMenus = 1 << 5 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoMenus = 1 << 5, + + /// + /// + /// the user will not be able to switch the axis side by dragging it + /// + /// + /// C++: implot.h:154
+ /// ImPlotAxisFlags_NoSideSwitch = 1 << 6 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoSideSwitch = 1 << 6, + + /// + /// + /// the axis will not have its background highlighted when hovered or held + /// + /// + /// C++: implot.h:155
+ /// ImPlotAxisFlags_NoHighlight = 1 << 7 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoHighlight = 1 << 7, + + /// + /// + /// axis ticks and labels will be rendered on the conventionally opposite side (i.e, right or top) + /// + /// + /// C++: implot.h:156
+ /// ImPlotAxisFlags_Opposite = 1 << 8 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + Opposite = 1 << 8, + + /// + /// + /// grid lines will be displayed in the foreground (i.e. on top of data) instead of the background + /// + /// + /// C++: implot.h:157
+ /// ImPlotAxisFlags_Foreground = 1 << 9 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + Foreground = 1 << 9, + + /// + /// + /// the axis will be inverted + /// + /// + /// C++: implot.h:158
+ /// ImPlotAxisFlags_Invert = 1 << 10 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + Invert = 1 << 10, + + /// + /// + /// axis will be auto-fitting to data extents + /// + /// + /// C++: implot.h:159
+ /// ImPlotAxisFlags_AutoFit = 1 << 11 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + AutoFit = 1 << 11, + + /// + /// + /// axis will only fit points if the point is in the visible range of the **orthogonal** axis + /// + /// + /// C++: implot.h:160
+ /// ImPlotAxisFlags_RangeFit = 1 << 12 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + RangeFit = 1 << 12, + + /// + /// + /// panning in a locked or constrained state will cause the axis to stretch if possible + /// + /// + /// C++: implot.h:161
+ /// ImPlotAxisFlags_PanStretch = 1 << 13 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + PanStretch = 1 << 13, + + /// + /// + /// the axis minimum value will be locked when panning/zooming + /// + /// + /// C++: implot.h:162
+ /// ImPlotAxisFlags_LockMin = 1 << 14 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + LockMin = 1 << 14, + + /// + /// + /// the axis maximum value will be locked when panning/zooming + /// + /// + /// C++: implot.h:163
+ /// ImPlotAxisFlags_LockMax = 1 << 15 + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + LockMax = 1 << 15, + + /// + /// + /// C++: implot.h:164
+ /// ImPlotAxisFlags_Lock = ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + Lock = LockMin | LockMax, + + /// + /// + /// C++: implot.h:165
+ /// ImPlotAxisFlags_NoDecorations = ImPlotAxisFlags_NoLabel | ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_NoTickMarks | ImPlotAxisFlags_NoTickLabels + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + NoDecorations = NoLabel | NoGridLines | NoTickMarks | NoTickLabels, + + /// + /// + /// C++: implot.h:166
+ /// ImPlotAxisFlags_AuxDefault = ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_Opposite + ///
+ ///
+ /// + /// + /// Options for plot axes (see SetupAxis). + /// + /// + AuxDefault = NoGridLines | Opposite, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotBarGroupsFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotBarGroupsFlags.gen.cs new file mode 100644 index 0000000..de884a1 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotBarGroupsFlags.gen.cs @@ -0,0 +1,69 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:264
+ /// enum ImPlotBarGroupsFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotBarGroups + /// + /// + [Flags] + public enum ImPlotBarGroupsFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:265
+ /// ImPlotBarGroupsFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotBarGroups + /// + /// + None = 0, + + /// + /// + /// bar groups will be rendered horizontally on the current y-axis + /// + /// + /// C++: implot.h:266
+ /// ImPlotBarGroupsFlags_Horizontal = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotBarGroups + /// + /// + Horizontal = 1 << 10, + + /// + /// + /// items in a group will be stacked on top of each other + /// + /// + /// C++: implot.h:267
+ /// ImPlotBarGroupsFlags_Stacked = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for PlotBarGroups + /// + /// + Stacked = 1 << 11, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotBarsFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotBarsFlags.gen.cs new file mode 100644 index 0000000..d4bc55b --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotBarsFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:258
+ /// enum ImPlotBarsFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotBars + /// + /// + [Flags] + public enum ImPlotBarsFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:259
+ /// ImPlotBarsFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotBars + /// + /// + None = 0, + + /// + /// + /// bars will be rendered horizontally on the current y-axis + /// + /// + /// C++: implot.h:260
+ /// ImPlotBarsFlags_Horizontal = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotBars + /// + /// + Horizontal = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotBin.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotBin.gen.cs new file mode 100644 index 0000000..36dc5f2 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotBin.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:461
+ /// enum ImPlotBin_ { + ///
+ ///
+ /// + /// + /// Enums for different automatic histogram binning methods (k = bin count or w = bin width) + /// + /// + public enum ImPlotBin : int + { + /// + /// + /// k = sqrt(n) + /// + /// + /// C++: implot.h:462
+ /// ImPlotBin_Sqrt = -1 + ///
+ ///
+ /// + /// + /// Enums for different automatic histogram binning methods (k = bin count or w = bin width) + /// + /// + Sqrt = -1, + + /// + /// + /// k = 1 + log2(n) + /// + /// + /// C++: implot.h:463
+ /// ImPlotBin_Sturges = -2 + ///
+ ///
+ /// + /// + /// Enums for different automatic histogram binning methods (k = bin count or w = bin width) + /// + /// + Sturges = -2, + + /// + /// + /// k = 2 * cbrt(n) + /// + /// + /// C++: implot.h:464
+ /// ImPlotBin_Rice = -3 + ///
+ ///
+ /// + /// + /// Enums for different automatic histogram binning methods (k = bin count or w = bin width) + /// + /// + Rice = -3, + + /// + /// + /// w = 3.49 * sigma / cbrt(n) + /// + /// + /// C++: implot.h:465
+ /// ImPlotBin_Scott = -4 + ///
+ ///
+ /// + /// + /// Enums for different automatic histogram binning methods (k = bin count or w = bin width) + /// + /// + Scott = -4, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotCol.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotCol.gen.cs new file mode 100644 index 0000000..e3e9af4 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotCol.gen.cs @@ -0,0 +1,369 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:342
+ /// enum ImPlotCol_ { + ///
+ ///
+ /// + /// + /// Plot styling colors. + /// + /// + public enum ImPlotCol : int + { + /// + /// + /// plot line/outline color (defaults to next unused color in current colormap) + /// + /// + /// C++: implot.h:344
+ /// ImPlotCol_Line + ///
+ ///
+ /// + /// + /// item styling colors + /// + /// + Line, + + /// + /// + /// plot fill color for bars (defaults to the current line color) + /// + /// + /// C++: implot.h:345
+ /// ImPlotCol_Fill + ///
+ ///
+ /// + /// + /// item styling colors + /// + /// + Fill, + + /// + /// + /// marker outline color (defaults to the current line color) + /// + /// + /// C++: implot.h:346
+ /// ImPlotCol_MarkerOutline + ///
+ ///
+ /// + /// + /// item styling colors + /// + /// + MarkerOutline, + + /// + /// + /// marker fill color (defaults to the current line color) + /// + /// + /// C++: implot.h:347
+ /// ImPlotCol_MarkerFill + ///
+ ///
+ /// + /// + /// item styling colors + /// + /// + MarkerFill, + + /// + /// + /// error bar color (defaults to ImGuiCol_Text) + /// + /// + /// C++: implot.h:348
+ /// ImPlotCol_ErrorBar + ///
+ ///
+ /// + /// + /// item styling colors + /// + /// + ErrorBar, + + /// + /// + /// plot frame background color (defaults to ImGuiCol_FrameBg) + /// + /// + /// C++: implot.h:350
+ /// ImPlotCol_FrameBg + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + FrameBg, + + /// + /// + /// plot area background color (defaults to ImGuiCol_WindowBg) + /// + /// + /// C++: implot.h:351
+ /// ImPlotCol_PlotBg + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + PlotBg, + + /// + /// + /// plot area border color (defaults to ImGuiCol_Border) + /// + /// + /// C++: implot.h:352
+ /// ImPlotCol_PlotBorder + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + PlotBorder, + + /// + /// + /// legend background color (defaults to ImGuiCol_PopupBg) + /// + /// + /// C++: implot.h:353
+ /// ImPlotCol_LegendBg + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + LegendBg, + + /// + /// + /// legend border color (defaults to ImPlotCol_PlotBorder) + /// + /// + /// C++: implot.h:354
+ /// ImPlotCol_LegendBorder + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + LegendBorder, + + /// + /// + /// legend text color (defaults to ImPlotCol_InlayText) + /// + /// + /// C++: implot.h:355
+ /// ImPlotCol_LegendText + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + LegendText, + + /// + /// + /// plot title text color (defaults to ImGuiCol_Text) + /// + /// + /// C++: implot.h:356
+ /// ImPlotCol_TitleText + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + TitleText, + + /// + /// + /// color of text appearing inside of plots (defaults to ImGuiCol_Text) + /// + /// + /// C++: implot.h:357
+ /// ImPlotCol_InlayText + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + InlayText, + + /// + /// + /// axis label and tick lables color (defaults to ImGuiCol_Text) + /// + /// + /// C++: implot.h:358
+ /// ImPlotCol_AxisText + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + AxisText, + + /// + /// + /// axis grid color (defaults to 25% ImPlotCol_AxisText) + /// + /// + /// C++: implot.h:359
+ /// ImPlotCol_AxisGrid + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + AxisGrid, + + /// + /// + /// axis tick color (defaults to AxisGrid) + /// + /// + /// C++: implot.h:360
+ /// ImPlotCol_AxisTick + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + AxisTick, + + /// + /// + /// background color of axis hover region (defaults to transparent) + /// + /// + /// C++: implot.h:361
+ /// ImPlotCol_AxisBg + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + AxisBg, + + /// + /// + /// axis hover color (defaults to ImGuiCol_ButtonHovered) + /// + /// + /// C++: implot.h:362
+ /// ImPlotCol_AxisBgHovered + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + AxisBgHovered, + + /// + /// + /// axis active color (defaults to ImGuiCol_ButtonActive) + /// + /// + /// C++: implot.h:363
+ /// ImPlotCol_AxisBgActive + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + AxisBgActive, + + /// + /// + /// box-selection color (defaults to yellow) + /// + /// + /// C++: implot.h:364
+ /// ImPlotCol_Selection + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + Selection, + + /// + /// + /// crosshairs color (defaults to ImPlotCol_PlotBorder) + /// + /// + /// C++: implot.h:365
+ /// ImPlotCol_Crosshairs + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + Crosshairs, + + /// + /// + /// C++: implot.h:366
+ /// ImPlotCol_COUNT + ///
+ ///
+ /// + /// + /// plot styling colors + /// + /// + COUNT, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotColormap.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotColormap.gen.cs new file mode 100644 index 0000000..9b5c8fc --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotColormap.gen.cs @@ -0,0 +1,276 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:428
+ /// enum ImPlotColormap_ { + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + public enum ImPlotColormap : int + { + /// + /// + /// a.k.a. seaborn deep (qual=true, n=10) (default) + /// + /// + /// C++: implot.h:429
+ /// ImPlotColormap_Deep = 0 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Deep = 0, + + /// + /// + /// a.k.a. matplotlib "Set1" (qual=true, n=9 ) + /// + /// + /// C++: implot.h:430
+ /// ImPlotColormap_Dark = 1 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Dark = 1, + + /// + /// + /// a.k.a. matplotlib "Pastel1" (qual=true, n=9 ) + /// + /// + /// C++: implot.h:431
+ /// ImPlotColormap_Pastel = 2 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Pastel = 2, + + /// + /// + /// a.k.a. matplotlib "Paired" (qual=true, n=12) + /// + /// + /// C++: implot.h:432
+ /// ImPlotColormap_Paired = 3 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Paired = 3, + + /// + /// + /// a.k.a. matplotlib "viridis" (qual=false, n=11) + /// + /// + /// C++: implot.h:433
+ /// ImPlotColormap_Viridis = 4 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Viridis = 4, + + /// + /// + /// a.k.a. matplotlib "plasma" (qual=false, n=11) + /// + /// + /// C++: implot.h:434
+ /// ImPlotColormap_Plasma = 5 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Plasma = 5, + + /// + /// + /// a.k.a. matplotlib/MATLAB "hot" (qual=false, n=11) + /// + /// + /// C++: implot.h:435
+ /// ImPlotColormap_Hot = 6 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Hot = 6, + + /// + /// + /// a.k.a. matplotlib/MATLAB "cool" (qual=false, n=11) + /// + /// + /// C++: implot.h:436
+ /// ImPlotColormap_Cool = 7 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Cool = 7, + + /// + /// + /// a.k.a. matplotlib/MATLAB "pink" (qual=false, n=11) + /// + /// + /// C++: implot.h:437
+ /// ImPlotColormap_Pink = 8 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Pink = 8, + + /// + /// + /// a.k.a. MATLAB "jet" (qual=false, n=11) + /// + /// + /// C++: implot.h:438
+ /// ImPlotColormap_Jet = 9 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Jet = 9, + + /// + /// + /// a.k.a. matplotlib "twilight" (qual=false, n=11) + /// + /// + /// C++: implot.h:439
+ /// ImPlotColormap_Twilight = 10 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Twilight = 10, + + /// + /// + /// red/blue, Color Brewer (qual=false, n=11) + /// + /// + /// C++: implot.h:440
+ /// ImPlotColormap_RdBu = 11 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + RdBu = 11, + + /// + /// + /// brown/blue-green, Color Brewer (qual=false, n=11) + /// + /// + /// C++: implot.h:441
+ /// ImPlotColormap_BrBG = 12 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + BrBG = 12, + + /// + /// + /// pink/yellow-green, Color Brewer (qual=false, n=11) + /// + /// + /// C++: implot.h:442
+ /// ImPlotColormap_PiYG = 13 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + PiYG = 13, + + /// + /// + /// color spectrum, Color Brewer (qual=false, n=11) + /// + /// + /// C++: implot.h:443
+ /// ImPlotColormap_Spectral = 14 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Spectral = 14, + + /// + /// + /// white/black (qual=false, n=2 ) + /// + /// + /// C++: implot.h:444
+ /// ImPlotColormap_Greys = 15 + ///
+ ///
+ /// + /// + /// Built-in colormaps + /// + /// + Greys = 15, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotColormapScaleFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotColormapScaleFlags.gen.cs new file mode 100644 index 0000000..48faeb0 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotColormapScaleFlags.gen.cs @@ -0,0 +1,86 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:215
+ /// enum ImPlotColormapScaleFlags_ { + ///
+ ///
+ /// + /// + /// Flags for ColormapScale + /// + /// + [Flags] + public enum ImPlotColormapScaleFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:216
+ /// ImPlotColormapScaleFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ColormapScale + /// + /// + None = 0, + + /// + /// + /// the colormap axis label will not be displayed + /// + /// + /// C++: implot.h:217
+ /// ImPlotColormapScaleFlags_NoLabel = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ColormapScale + /// + /// + NoLabel = 1 << 0, + + /// + /// + /// render the colormap label and tick labels on the opposite side + /// + /// + /// C++: implot.h:218
+ /// ImPlotColormapScaleFlags_Opposite = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ColormapScale + /// + /// + Opposite = 1 << 1, + + /// + /// + /// invert the colormap bar and axis scale (this only affects rendering; if you only want to reverse the + /// scale mapping, make scale_min > scale_max) + /// + /// + /// C++: implot.h:219
+ /// ImPlotColormapScaleFlags_Invert = 1 << 2 + ///
+ ///
+ /// + /// + /// Flags for ColormapScale + /// + /// + Invert = 1 << 2, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotCond.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotCond.gen.cs new file mode 100644 index 0000000..cd75645 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotCond.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:334
+ /// enum ImPlotCond_ + ///
+ ///
+ /// + /// + /// Represents a condition for SetupAxisLimits etc. (same as ImGuiCond, but we only support a subset of those + /// enums) + /// + /// + public enum ImPlotCond : int + { + /// + /// + /// No condition (always set the variable), same as _Always + /// + /// + /// C++: implot.h:336
+ /// ImPlotCond_None = ImGuiCond_None + ///
+ ///
+ /// + /// + /// Represents a condition for SetupAxisLimits etc. (same as ImGuiCond, but we only support a subset of + /// those enums) + /// + /// + None = ImGuiCond.None, + + /// + /// + /// No condition (always set the variable) + /// + /// + /// C++: implot.h:337
+ /// ImPlotCond_Always = ImGuiCond_Always + ///
+ ///
+ /// + /// + /// Represents a condition for SetupAxisLimits etc. (same as ImGuiCond, but we only support a subset of + /// those enums) + /// + /// + Always = ImGuiCond.Always, + + /// + /// + /// Set the variable once per runtime session (only the first call will succeed) + /// + /// + /// C++: implot.h:338
+ /// ImPlotCond_Once = ImGuiCond_Once + ///
+ ///
+ /// + /// + /// Represents a condition for SetupAxisLimits etc. (same as ImGuiCond, but we only support a subset of + /// those enums) + /// + /// + Once = ImGuiCond.Once, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotDigitalFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotDigitalFlags.gen.cs new file mode 100644 index 0000000..7f1b164 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotDigitalFlags.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:313
+ /// enum ImPlotDigitalFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotDigital (placeholder) + /// + /// + [Flags] + public enum ImPlotDigitalFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:314
+ /// ImPlotDigitalFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotDigital (placeholder) + /// + /// + None = 0, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotDragToolFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotDragToolFlags.gen.cs new file mode 100644 index 0000000..5faf7b6 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotDragToolFlags.gen.cs @@ -0,0 +1,101 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:206
+ /// enum ImPlotDragToolFlags_ { + ///
+ ///
+ /// + /// + /// Options for DragPoint, DragLine, DragRect + /// + /// + [Flags] + public enum ImPlotDragToolFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:207
+ /// ImPlotDragToolFlags_None = 0 + ///
+ ///
+ /// + /// + /// Options for DragPoint, DragLine, DragRect + /// + /// + None = 0, + + /// + /// + /// drag tools won't change cursor icons when hovered or held + /// + /// + /// C++: implot.h:208
+ /// ImPlotDragToolFlags_NoCursors = 1 << 0 + ///
+ ///
+ /// + /// + /// Options for DragPoint, DragLine, DragRect + /// + /// + NoCursors = 1 << 0, + + /// + /// + /// the drag tool won't be considered for plot fits + /// + /// + /// C++: implot.h:209
+ /// ImPlotDragToolFlags_NoFit = 1 << 1 + ///
+ ///
+ /// + /// + /// Options for DragPoint, DragLine, DragRect + /// + /// + NoFit = 1 << 1, + + /// + /// + /// lock the tool from user inputs + /// + /// + /// C++: implot.h:210
+ /// ImPlotDragToolFlags_NoInputs = 1 << 2 + ///
+ ///
+ /// + /// + /// Options for DragPoint, DragLine, DragRect + /// + /// + NoInputs = 1 << 2, + + /// + /// + /// tool rendering will be delayed one frame; useful when applying position-constraints + /// + /// + /// C++: implot.h:211
+ /// ImPlotDragToolFlags_Delayed = 1 << 3 + ///
+ ///
+ /// + /// + /// Options for DragPoint, DragLine, DragRect + /// + /// + Delayed = 1 << 3, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotDummyFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotDummyFlags.gen.cs new file mode 100644 index 0000000..8f3b184 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotDummyFlags.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:329
+ /// enum ImPlotDummyFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotDummy (placeholder) + /// + /// + [Flags] + public enum ImPlotDummyFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:330
+ /// ImPlotDummyFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotDummy (placeholder) + /// + /// + None = 0, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotErrorBarsFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotErrorBarsFlags.gen.cs new file mode 100644 index 0000000..248f9e9 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotErrorBarsFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:271
+ /// enum ImPlotErrorBarsFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotErrorBars + /// + /// + [Flags] + public enum ImPlotErrorBarsFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:272
+ /// ImPlotErrorBarsFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotErrorBars + /// + /// + None = 0, + + /// + /// + /// error bars will be rendered horizontally on the current y-axis + /// + /// + /// C++: implot.h:273
+ /// ImPlotErrorBarsFlags_Horizontal = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotErrorBars + /// + /// + Horizontal = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotFlags.gen.cs new file mode 100644 index 0000000..0339c9d --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotFlags.gen.cs @@ -0,0 +1,195 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:131
+ /// enum ImPlotFlags_ { + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + [Flags] + public enum ImPlotFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:132
+ /// ImPlotFlags_None = 0 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + None = 0, + + /// + /// + /// the plot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. + /// "##MyPlot") + /// + /// + /// C++: implot.h:133
+ /// ImPlotFlags_NoTitle = 1 << 0 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoTitle = 1 << 0, + + /// + /// + /// the legend will not be displayed + /// + /// + /// C++: implot.h:134
+ /// ImPlotFlags_NoLegend = 1 << 1 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoLegend = 1 << 1, + + /// + /// + /// the mouse position, in plot coordinates, will not be displayed inside of the plot + /// + /// + /// C++: implot.h:135
+ /// ImPlotFlags_NoMouseText = 1 << 2 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoMouseText = 1 << 2, + + /// + /// + /// the user will not be able to interact with the plot + /// + /// + /// C++: implot.h:136
+ /// ImPlotFlags_NoInputs = 1 << 3 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoInputs = 1 << 3, + + /// + /// + /// the user will not be able to open context menus + /// + /// + /// C++: implot.h:137
+ /// ImPlotFlags_NoMenus = 1 << 4 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoMenus = 1 << 4, + + /// + /// + /// the user will not be able to box-select + /// + /// + /// C++: implot.h:138
+ /// ImPlotFlags_NoBoxSelect = 1 << 5 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoBoxSelect = 1 << 5, + + /// + /// + /// the ImGui frame will not be rendered + /// + /// + /// C++: implot.h:139
+ /// ImPlotFlags_NoFrame = 1 << 6 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + NoFrame = 1 << 6, + + /// + /// + /// x and y axes pairs will be constrained to have the same units/pixel + /// + /// + /// C++: implot.h:140
+ /// ImPlotFlags_Equal = 1 << 7 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + Equal = 1 << 7, + + /// + /// + /// the default mouse cursor will be replaced with a crosshair when hovered + /// + /// + /// C++: implot.h:141
+ /// ImPlotFlags_Crosshairs = 1 << 8 + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + Crosshairs = 1 << 8, + + /// + /// + /// C++: implot.h:142
+ /// ImPlotFlags_CanvasOnly = ImPlotFlags_NoTitle | ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMouseText + ///
+ ///
+ /// + /// + /// Options for plots (see BeginPlot). + /// + /// + CanvasOnly = NoTitle | NoLegend | NoMenus | NoBoxSelect | NoMouseText, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotHeatmapFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotHeatmapFlags.gen.cs new file mode 100644 index 0000000..f7c4b35 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotHeatmapFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:297
+ /// enum ImPlotHeatmapFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotHeatmap + /// + /// + [Flags] + public enum ImPlotHeatmapFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:298
+ /// ImPlotHeatmapFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotHeatmap + /// + /// + None = 0, + + /// + /// + /// data will be read in column major order + /// + /// + /// C++: implot.h:299
+ /// ImPlotHeatmapFlags_ColMajor = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotHeatmap + /// + /// + ColMajor = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotHistogramFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotHistogramFlags.gen.cs new file mode 100644 index 0000000..b84b91e --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotHistogramFlags.gen.cs @@ -0,0 +1,119 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:303
+ /// enum ImPlotHistogramFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + [Flags] + public enum ImPlotHistogramFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:304
+ /// ImPlotHistogramFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + None = 0, + + /// + /// + /// histogram bars will be rendered horizontally (not supported by PlotHistogram2D) + /// + /// + /// C++: implot.h:305
+ /// ImPlotHistogramFlags_Horizontal = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + Horizontal = 1 << 10, + + /// + /// + /// each bin will contain its count plus the counts of all previous bins (not supported by PlotHistogram2D) + /// + /// + /// C++: implot.h:306
+ /// ImPlotHistogramFlags_Cumulative = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + Cumulative = 1 << 11, + + /// + /// + /// counts will be normalized, i.e. the PDF will be visualized, or the CDF will be visualized if Cumulative + /// is also set + /// + /// + /// C++: implot.h:307
+ /// ImPlotHistogramFlags_Density = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + Density = 1 << 12, + + /// + /// + /// exclude values outside the specifed histogram range from the count toward normalizing and cumulative + /// counts + /// + /// + /// C++: implot.h:308
+ /// ImPlotHistogramFlags_NoOutliers = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + NoOutliers = 1 << 13, + + /// + /// + /// data will be read in column major order (not supported by PlotHistogram) + /// + /// + /// C++: implot.h:309
+ /// ImPlotHistogramFlags_ColMajor = 1 << 14 + ///
+ ///
+ /// + /// + /// Flags for PlotHistogram and PlotHistogram2D + /// + /// + ColMajor = 1 << 14, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotImageFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotImageFlags.gen.cs new file mode 100644 index 0000000..aaf3d4c --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotImageFlags.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:318
+ /// enum ImPlotImageFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotImage (placeholder) + /// + /// + [Flags] + public enum ImPlotImageFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:319
+ /// ImPlotImageFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotImage (placeholder) + /// + /// + None = 0, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotInfLinesFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotInfLinesFlags.gen.cs new file mode 100644 index 0000000..2fba558 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotInfLinesFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:283
+ /// enum ImPlotInfLinesFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotInfLines + /// + /// + [Flags] + public enum ImPlotInfLinesFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:284
+ /// ImPlotInfLinesFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotInfLines + /// + /// + None = 0, + + /// + /// + /// lines will be rendered horizontally on the current y-axis + /// + /// + /// C++: implot.h:285
+ /// ImPlotInfLinesFlags_Horizontal = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotInfLines + /// + /// + Horizontal = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotItemFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotItemFlags.gen.cs new file mode 100644 index 0000000..5b45526 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotItemFlags.gen.cs @@ -0,0 +1,66 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:223
+ /// enum ImPlotItemFlags_ { + ///
+ ///
+ /// + /// + /// Flags for ANY PlotX function + /// + /// + [Flags] + public enum ImPlotItemFlags : int + { + /// + /// + /// C++: implot.h:224
+ /// ImPlotItemFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for ANY PlotX function + /// + /// + None = 0, + + /// + /// + /// the item won't have a legend entry displayed + /// + /// + /// C++: implot.h:225
+ /// ImPlotItemFlags_NoLegend = 1 << 0 + ///
+ ///
+ /// + /// + /// Flags for ANY PlotX function + /// + /// + NoLegend = 1 << 0, + + /// + /// + /// the item won't be considered for plot fits + /// + /// + /// C++: implot.h:226
+ /// ImPlotItemFlags_NoFit = 1 << 1 + ///
+ ///
+ /// + /// + /// Flags for ANY PlotX function + /// + /// + NoFit = 1 << 1, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotLegendFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotLegendFlags.gen.cs new file mode 100644 index 0000000..7c28d37 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotLegendFlags.gen.cs @@ -0,0 +1,149 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:186
+ /// enum ImPlotLegendFlags_ { + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + [Flags] + public enum ImPlotLegendFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:187
+ /// ImPlotLegendFlags_None = 0 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + None = 0, + + /// + /// + /// legend icons will not function as hide/show buttons + /// + /// + /// C++: implot.h:188
+ /// ImPlotLegendFlags_NoButtons = 1 << 0 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + NoButtons = 1 << 0, + + /// + /// + /// plot items will not be highlighted when their legend entry is hovered + /// + /// + /// C++: implot.h:189
+ /// ImPlotLegendFlags_NoHighlightItem = 1 << 1 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + NoHighlightItem = 1 << 1, + + /// + /// + /// axes will not be highlighted when legend entries are hovered (only relevant if x/y-axis count > 1) + /// + /// + /// C++: implot.h:190
+ /// ImPlotLegendFlags_NoHighlightAxis = 1 << 2 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + NoHighlightAxis = 1 << 2, + + /// + /// + /// the user will not be able to open context menus with right-click + /// + /// + /// C++: implot.h:191
+ /// ImPlotLegendFlags_NoMenus = 1 << 3 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + NoMenus = 1 << 3, + + /// + /// + /// legend will be rendered outside of the plot area + /// + /// + /// C++: implot.h:192
+ /// ImPlotLegendFlags_Outside = 1 << 4 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + Outside = 1 << 4, + + /// + /// + /// legend entries will be displayed horizontally + /// + /// + /// C++: implot.h:193
+ /// ImPlotLegendFlags_Horizontal = 1 << 5 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + Horizontal = 1 << 5, + + /// + /// + /// legend entries will be displayed in alphabetical order + /// + /// + /// C++: implot.h:194
+ /// ImPlotLegendFlags_Sort = 1 << 6 + ///
+ ///
+ /// + /// + /// Options for legends (see SetupLegend) + /// + /// + Sort = 1 << 6, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotLineFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotLineFlags.gen.cs new file mode 100644 index 0000000..2da4b99 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotLineFlags.gen.cs @@ -0,0 +1,118 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:230
+ /// enum ImPlotLineFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + [Flags] + public enum ImPlotLineFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:231
+ /// ImPlotLineFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + None = 0, + + /// + /// + /// a line segment will be rendered from every two consecutive points + /// + /// + /// C++: implot.h:232
+ /// ImPlotLineFlags_Segments = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + Segments = 1 << 10, + + /// + /// + /// the last and first point will be connected to form a closed loop + /// + /// + /// C++: implot.h:233
+ /// ImPlotLineFlags_Loop = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + Loop = 1 << 11, + + /// + /// + /// NaNs values will be skipped instead of rendered as missing data + /// + /// + /// C++: implot.h:234
+ /// ImPlotLineFlags_SkipNaN = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + SkipNaN = 1 << 12, + + /// + /// + /// markers (if displayed) on the edge of a plot will not be clipped + /// + /// + /// C++: implot.h:235
+ /// ImPlotLineFlags_NoClip = 1 << 13 + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + NoClip = 1 << 13, + + /// + /// + /// a filled region between the line and horizontal origin will be rendered; use PlotShaded for more + /// advanced cases + /// + /// + /// C++: implot.h:236
+ /// ImPlotLineFlags_Shaded = 1 << 14 + ///
+ ///
+ /// + /// + /// Flags for PlotLine + /// + /// + Shaded = 1 << 14, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotLocation.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotLocation.gen.cs new file mode 100644 index 0000000..40e9c52 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotLocation.gen.cs @@ -0,0 +1,164 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:448
+ /// enum ImPlotLocation_ { + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + public enum ImPlotLocation : int + { + /// + /// + /// center-center + /// + /// + /// C++: implot.h:449
+ /// ImPlotLocation_Center = 0 + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + Center = 0, + + /// + /// + /// top-center + /// + /// + /// C++: implot.h:450
+ /// ImPlotLocation_North = 1 << 0 + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + North = 1 << 0, + + /// + /// + /// bottom-center + /// + /// + /// C++: implot.h:451
+ /// ImPlotLocation_South = 1 << 1 + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + South = 1 << 1, + + /// + /// + /// center-left + /// + /// + /// C++: implot.h:452
+ /// ImPlotLocation_West = 1 << 2 + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + West = 1 << 2, + + /// + /// + /// center-right + /// + /// + /// C++: implot.h:453
+ /// ImPlotLocation_East = 1 << 3 + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + East = 1 << 3, + + /// + /// + /// top-left + /// + /// + /// C++: implot.h:454
+ /// ImPlotLocation_NorthWest = ImPlotLocation_North | ImPlotLocation_West + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + NorthWest = North | West, + + /// + /// + /// top-right + /// + /// + /// C++: implot.h:455
+ /// ImPlotLocation_NorthEast = ImPlotLocation_North | ImPlotLocation_East + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + NorthEast = North | East, + + /// + /// + /// bottom-left + /// + /// + /// C++: implot.h:456
+ /// ImPlotLocation_SouthWest = ImPlotLocation_South | ImPlotLocation_West + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + SouthWest = South | West, + + /// + /// + /// bottom-right + /// + /// + /// C++: implot.h:457
+ /// ImPlotLocation_SouthEast = ImPlotLocation_South | ImPlotLocation_East + ///
+ ///
+ /// + /// + /// Used to position items on a plot (e.g. legends, labels, etc.) + /// + /// + SouthEast = South | East, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotMarker.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotMarker.gen.cs new file mode 100644 index 0000000..0eb520c --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotMarker.gen.cs @@ -0,0 +1,209 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:412
+ /// enum ImPlotMarker_ { + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + public enum ImPlotMarker : int + { + /// + /// + /// no marker + /// + /// + /// C++: implot.h:413
+ /// ImPlotMarker_None = -1 + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + None = -1, + + /// + /// + /// a circle marker (default) + /// + /// + /// C++: implot.h:414
+ /// ImPlotMarker_Circle + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Circle, + + /// + /// + /// a square maker + /// + /// + /// C++: implot.h:415
+ /// ImPlotMarker_Square + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Square, + + /// + /// + /// a diamond marker + /// + /// + /// C++: implot.h:416
+ /// ImPlotMarker_Diamond + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Diamond, + + /// + /// + /// an upward-pointing triangle marker + /// + /// + /// C++: implot.h:417
+ /// ImPlotMarker_Up + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Up, + + /// + /// + /// an downward-pointing triangle marker + /// + /// + /// C++: implot.h:418
+ /// ImPlotMarker_Down + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Down, + + /// + /// + /// an leftward-pointing triangle marker + /// + /// + /// C++: implot.h:419
+ /// ImPlotMarker_Left + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Left, + + /// + /// + /// an rightward-pointing triangle marker + /// + /// + /// C++: implot.h:420
+ /// ImPlotMarker_Right + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Right, + + /// + /// + /// a cross marker (not fillable) + /// + /// + /// C++: implot.h:421
+ /// ImPlotMarker_Cross + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Cross, + + /// + /// + /// a plus marker (not fillable) + /// + /// + /// C++: implot.h:422
+ /// ImPlotMarker_Plus + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Plus, + + /// + /// + /// a asterisk marker (not fillable) + /// + /// + /// C++: implot.h:423
+ /// ImPlotMarker_Asterisk + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + Asterisk, + + /// + /// + /// C++: implot.h:424
+ /// ImPlotMarker_COUNT + ///
+ ///
+ /// + /// + /// Marker specifications. + /// + /// + COUNT, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotMouseTextFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotMouseTextFlags.gen.cs new file mode 100644 index 0000000..91cae03 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotMouseTextFlags.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:198
+ /// enum ImPlotMouseTextFlags_ { + ///
+ ///
+ /// + /// + /// Options for mouse hover text (see SetupMouseText) + /// + /// + [Flags] + public enum ImPlotMouseTextFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:199
+ /// ImPlotMouseTextFlags_None = 0 + ///
+ ///
+ /// + /// + /// Options for mouse hover text (see SetupMouseText) + /// + /// + None = 0, + + /// + /// + /// only show the mouse position for primary axes + /// + /// + /// C++: implot.h:200
+ /// ImPlotMouseTextFlags_NoAuxAxes = 1 << 0 + ///
+ ///
+ /// + /// + /// Options for mouse hover text (see SetupMouseText) + /// + /// + NoAuxAxes = 1 << 0, + + /// + /// + /// axes label formatters won't be used to render text + /// + /// + /// C++: implot.h:201
+ /// ImPlotMouseTextFlags_NoFormat = 1 << 1 + ///
+ ///
+ /// + /// + /// Options for mouse hover text (see SetupMouseText) + /// + /// + NoFormat = 1 << 1, + + /// + /// + /// always display mouse position even if plot not hovered + /// + /// + /// C++: implot.h:202
+ /// ImPlotMouseTextFlags_ShowAlways = 1 << 2 + ///
+ ///
+ /// + /// + /// Options for mouse hover text (see SetupMouseText) + /// + /// + ShowAlways = 1 << 2, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotPieChartFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotPieChartFlags.gen.cs new file mode 100644 index 0000000..50f4db0 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotPieChartFlags.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:289
+ /// enum ImPlotPieChartFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotPieChart + /// + /// + [Flags] + public enum ImPlotPieChartFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:290
+ /// ImPlotPieChartFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotPieChart + /// + /// + None = 0, + + /// + /// + /// force normalization of pie chart values (i.e. always make a full circle if sum < 0) + /// + /// + /// C++: implot.h:291
+ /// ImPlotPieChartFlags_Normalize = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotPieChart + /// + /// + Normalize = 1 << 10, + + /// + /// + /// ignore hidden slices when drawing the pie chart (as if they were not there) + /// + /// + /// C++: implot.h:292
+ /// ImPlotPieChartFlags_IgnoreHidden = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for PlotPieChart + /// + /// + IgnoreHidden = 1 << 11, + + /// + /// + /// Explode legend-hovered slice + /// + /// + /// C++: implot.h:293
+ /// ImPlotPieChartFlags_Exploding = 1 << 12 + ///
+ ///
+ /// + /// + /// Flags for PlotPieChart + /// + /// + Exploding = 1 << 12, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotScale.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotScale.gen.cs new file mode 100644 index 0000000..df3db32 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotScale.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:404
+ /// enum ImPlotScale_ { + ///
+ ///
+ /// + /// + /// Axis scale + /// + /// + public enum ImPlotScale : int + { + /// + /// + /// default linear scale + /// + /// + /// C++: implot.h:405
+ /// ImPlotScale_Linear = 0 + ///
+ ///
+ /// + /// + /// Axis scale + /// + /// + Linear = 0, + + /// + /// + /// date/time scale + /// + /// + /// C++: implot.h:406
+ /// ImPlotScale_Time + ///
+ ///
+ /// + /// + /// Axis scale + /// + /// + Time, + + /// + /// + /// base 10 logartithmic scale + /// + /// + /// C++: implot.h:407
+ /// ImPlotScale_Log10 + ///
+ ///
+ /// + /// + /// Axis scale + /// + /// + Log10, + + /// + /// + /// symmetric log scale + /// + /// + /// C++: implot.h:408
+ /// ImPlotScale_SymLog + ///
+ ///
+ /// + /// + /// Axis scale + /// + /// + SymLog, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotScatterFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotScatterFlags.gen.cs new file mode 100644 index 0000000..3b7d57a --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotScatterFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:240
+ /// enum ImPlotScatterFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotScatter + /// + /// + [Flags] + public enum ImPlotScatterFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:241
+ /// ImPlotScatterFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotScatter + /// + /// + None = 0, + + /// + /// + /// markers on the edge of a plot will not be clipped + /// + /// + /// C++: implot.h:242
+ /// ImPlotScatterFlags_NoClip = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotScatter + /// + /// + NoClip = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotShadedFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotShadedFlags.gen.cs new file mode 100644 index 0000000..8c088ce --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotShadedFlags.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:253
+ /// enum ImPlotShadedFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotShaded (placeholder) + /// + /// + [Flags] + public enum ImPlotShadedFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:254
+ /// ImPlotShadedFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotShaded (placeholder) + /// + /// + None = 0, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotStairsFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotStairsFlags.gen.cs new file mode 100644 index 0000000..89bb28c --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotStairsFlags.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:246
+ /// enum ImPlotStairsFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotStairs + /// + /// + [Flags] + public enum ImPlotStairsFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:247
+ /// ImPlotStairsFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotStairs + /// + /// + None = 0, + + /// + /// + /// the y value is continued constantly to the left from every x position, i.e. the interval (x[i-1], x[i]] + /// has the value y[i] + /// + /// + /// C++: implot.h:248
+ /// ImPlotStairsFlags_PreStep = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotStairs + /// + /// + PreStep = 1 << 10, + + /// + /// + /// a filled region between the stairs and horizontal origin will be rendered; use PlotShaded for more + /// advanced cases + /// + /// + /// C++: implot.h:249
+ /// ImPlotStairsFlags_Shaded = 1 << 11 + ///
+ ///
+ /// + /// + /// Flags for PlotStairs + /// + /// + Shaded = 1 << 11, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotStemsFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotStemsFlags.gen.cs new file mode 100644 index 0000000..4b36617 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotStemsFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:277
+ /// enum ImPlotStemsFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotStems + /// + /// + [Flags] + public enum ImPlotStemsFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:278
+ /// ImPlotStemsFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotStems + /// + /// + None = 0, + + /// + /// + /// stems will be rendered horizontally on the current y-axis + /// + /// + /// C++: implot.h:279
+ /// ImPlotStemsFlags_Horizontal = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotStems + /// + /// + Horizontal = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotStyleVar.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotStyleVar.gen.cs new file mode 100644 index 0000000..e29083d --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotStyleVar.gen.cs @@ -0,0 +1,466 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:370
+ /// enum ImPlotStyleVar_ { + ///
+ ///
+ /// + /// + /// Plot styling variables. + /// + /// + public enum ImPlotStyleVar : int + { + /// + /// + /// float, plot item line weight in pixels + /// + /// + /// C++: implot.h:372
+ /// ImPlotStyleVar_LineWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + LineWeight, + + /// + /// + /// int, marker specification + /// + /// + /// C++: implot.h:373
+ /// ImPlotStyleVar_Marker + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + Marker, + + /// + /// + /// float, marker size in pixels (roughly the marker's "radius") + /// + /// + /// C++: implot.h:374
+ /// ImPlotStyleVar_MarkerSize + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + MarkerSize, + + /// + /// + /// float, plot outline weight of markers in pixels + /// + /// + /// C++: implot.h:375
+ /// ImPlotStyleVar_MarkerWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + MarkerWeight, + + /// + /// + /// float, alpha modifier applied to all plot item fills + /// + /// + /// C++: implot.h:376
+ /// ImPlotStyleVar_FillAlpha + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + FillAlpha, + + /// + /// + /// float, error bar whisker width in pixels + /// + /// + /// C++: implot.h:377
+ /// ImPlotStyleVar_ErrorBarSize + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + ErrorBarSize, + + /// + /// + /// float, error bar whisker weight in pixels + /// + /// + /// C++: implot.h:378
+ /// ImPlotStyleVar_ErrorBarWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + ErrorBarWeight, + + /// + /// + /// float, digital channels bit height (at 1) in pixels + /// + /// + /// C++: implot.h:379
+ /// ImPlotStyleVar_DigitalBitHeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + DigitalBitHeight, + + /// + /// + /// float, digital channels bit padding gap in pixels + /// + /// + /// C++: implot.h:380
+ /// ImPlotStyleVar_DigitalBitGap + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + DigitalBitGap, + + /// + /// + /// float, thickness of border around plot area + /// + /// + /// C++: implot.h:382
+ /// ImPlotStyleVar_PlotBorderSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + PlotBorderSize, + + /// + /// + /// float, alpha multiplier applied to minor axis grid lines + /// + /// + /// C++: implot.h:383
+ /// ImPlotStyleVar_MinorAlpha + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MinorAlpha, + + /// + /// + /// ImVec2, major tick lengths for X and Y axes + /// + /// + /// C++: implot.h:384
+ /// ImPlotStyleVar_MajorTickLen + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MajorTickLen, + + /// + /// + /// ImVec2, minor tick lengths for X and Y axes + /// + /// + /// C++: implot.h:385
+ /// ImPlotStyleVar_MinorTickLen + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MinorTickLen, + + /// + /// + /// ImVec2, line thickness of major ticks + /// + /// + /// C++: implot.h:386
+ /// ImPlotStyleVar_MajorTickSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MajorTickSize, + + /// + /// + /// ImVec2, line thickness of minor ticks + /// + /// + /// C++: implot.h:387
+ /// ImPlotStyleVar_MinorTickSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MinorTickSize, + + /// + /// + /// ImVec2, line thickness of major grid lines + /// + /// + /// C++: implot.h:388
+ /// ImPlotStyleVar_MajorGridSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MajorGridSize, + + /// + /// + /// ImVec2, line thickness of minor grid lines + /// + /// + /// C++: implot.h:389
+ /// ImPlotStyleVar_MinorGridSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MinorGridSize, + + /// + /// + /// ImVec2, padding between widget frame and plot area, labels, or outside legends (i.e. main padding) + /// + /// + /// C++: implot.h:390
+ /// ImPlotStyleVar_PlotPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + PlotPadding, + + /// + /// + /// ImVec2, padding between axes labels, tick labels, and plot edge + /// + /// + /// C++: implot.h:391
+ /// ImPlotStyleVar_LabelPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + LabelPadding, + + /// + /// + /// ImVec2, legend padding from plot edges + /// + /// + /// C++: implot.h:392
+ /// ImPlotStyleVar_LegendPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + LegendPadding, + + /// + /// + /// ImVec2, legend inner padding from legend edges + /// + /// + /// C++: implot.h:393
+ /// ImPlotStyleVar_LegendInnerPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + LegendInnerPadding, + + /// + /// + /// ImVec2, spacing between legend entries + /// + /// + /// C++: implot.h:394
+ /// ImPlotStyleVar_LegendSpacing + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + LegendSpacing, + + /// + /// + /// ImVec2, padding between plot edge and interior info text + /// + /// + /// C++: implot.h:395
+ /// ImPlotStyleVar_MousePosPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + MousePosPadding, + + /// + /// + /// ImVec2, text padding around annotation labels + /// + /// + /// C++: implot.h:396
+ /// ImPlotStyleVar_AnnotationPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + AnnotationPadding, + + /// + /// + /// ImVec2, additional fit padding as a percentage of the fit extents (e.g. ImVec2(0.1f,0.1f) adds 10% to + /// the fit extents of X and Y) + /// + /// + /// C++: implot.h:397
+ /// ImPlotStyleVar_FitPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + FitPadding, + + /// + /// + /// ImVec2, default size used when ImVec2(0,0) is passed to BeginPlot + /// + /// + /// C++: implot.h:398
+ /// ImPlotStyleVar_PlotDefaultSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + PlotDefaultSize, + + /// + /// + /// ImVec2, minimum size plot frame can be when shrunk + /// + /// + /// C++: implot.h:399
+ /// ImPlotStyleVar_PlotMinSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + PlotMinSize, + + /// + /// + /// C++: implot.h:400
+ /// ImPlotStyleVar_COUNT + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + COUNT, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotSubplotFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotSubplotFlags.gen.cs new file mode 100644 index 0000000..89151a1 --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotSubplotFlags.gen.cs @@ -0,0 +1,214 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:170
+ /// enum ImPlotSubplotFlags_ { + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + [Flags] + public enum ImPlotSubplotFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:171
+ /// ImPlotSubplotFlags_None = 0 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + None = 0, + + /// + /// + /// the subplot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. + /// "##MySubplot") + /// + /// + /// C++: implot.h:172
+ /// ImPlotSubplotFlags_NoTitle = 1 << 0 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + NoTitle = 1 << 0, + + /// + /// + /// the legend will not be displayed (only applicable if ImPlotSubplotFlags_ShareItems is enabled) + /// + /// + /// C++: implot.h:173
+ /// ImPlotSubplotFlags_NoLegend = 1 << 1 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + NoLegend = 1 << 1, + + /// + /// + /// the user will not be able to open context menus with right-click + /// + /// + /// C++: implot.h:174
+ /// ImPlotSubplotFlags_NoMenus = 1 << 2 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + NoMenus = 1 << 2, + + /// + /// + /// resize splitters between subplot cells will be not be provided + /// + /// + /// C++: implot.h:175
+ /// ImPlotSubplotFlags_NoResize = 1 << 3 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + NoResize = 1 << 3, + + /// + /// + /// subplot edges will not be aligned vertically or horizontally + /// + /// + /// C++: implot.h:176
+ /// ImPlotSubplotFlags_NoAlign = 1 << 4 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + NoAlign = 1 << 4, + + /// + /// + /// items across all subplots will be shared and rendered into a single legend entry + /// + /// + /// C++: implot.h:177
+ /// ImPlotSubplotFlags_ShareItems = 1 << 5 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + ShareItems = 1 << 5, + + /// + /// + /// link the y-axis limits of all plots in each row (does not apply to auxiliary axes) + /// + /// + /// C++: implot.h:178
+ /// ImPlotSubplotFlags_LinkRows = 1 << 6 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + LinkRows = 1 << 6, + + /// + /// + /// link the x-axis limits of all plots in each column (does not apply to auxiliary axes) + /// + /// + /// C++: implot.h:179
+ /// ImPlotSubplotFlags_LinkCols = 1 << 7 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + LinkCols = 1 << 7, + + /// + /// + /// link the x-axis limits in every plot in the subplot (does not apply to auxiliary axes) + /// + /// + /// C++: implot.h:180
+ /// ImPlotSubplotFlags_LinkAllX = 1 << 8 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + LinkAllX = 1 << 8, + + /// + /// + /// link the y-axis limits in every plot in the subplot (does not apply to auxiliary axes) + /// + /// + /// C++: implot.h:181
+ /// ImPlotSubplotFlags_LinkAllY = 1 << 9 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + LinkAllY = 1 << 9, + + /// + /// + /// subplots are added in column major order instead of the default row major order + /// + /// + /// C++: implot.h:182
+ /// ImPlotSubplotFlags_ColMajor = 1 << 10 + ///
+ ///
+ /// + /// + /// Options for subplots (see BeginSubplot) + /// + /// + ColMajor = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Enums/ImPlotTextFlags.gen.cs b/Brutal.ImPlot/Generated/Enums/ImPlotTextFlags.gen.cs new file mode 100644 index 0000000..856152b --- /dev/null +++ b/Brutal.ImPlot/Generated/Enums/ImPlotTextFlags.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:323
+ /// enum ImPlotTextFlags_ { + ///
+ ///
+ /// + /// + /// Flags for PlotText + /// + /// + [Flags] + public enum ImPlotTextFlags : int + { + /// + /// + /// default + /// + /// + /// C++: implot.h:324
+ /// ImPlotTextFlags_None = 0 + ///
+ ///
+ /// + /// + /// Flags for PlotText + /// + /// + None = 0, + + /// + /// + /// text will be rendered vertically + /// + /// + /// C++: implot.h:325
+ /// ImPlotTextFlags_Vertical = 1 << 10 + ///
+ ///
+ /// + /// + /// Flags for PlotText + /// + /// + Vertical = 1 << 10, + } +} diff --git a/Brutal.ImPlot/Generated/Functions/ImPlot.gen.cs b/Brutal.ImPlot/Generated/Functions/ImPlot.gen.cs new file mode 100644 index 0000000..a03ce89 --- /dev/null +++ b/Brutal.ImPlot/Generated/Functions/ImPlot.gen.cs @@ -0,0 +1,20853 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + /// + /// + /// C++: implot.h:602, + /// implot.cpp:436
+ /// ImPlotContext* CreateContext() + ///
+ ///
+ /// + /// + /// Creates a new ImPlot context. Call this after ImGui::CreateContext. + /// + /// + public static unsafe ImPlotContextPtr CreateContext() => PInvoke.CreateContext(); + + /// + /// + /// C++: implot.h:604, + /// implot.cpp:444
+ /// void DestroyContext(ImPlotContext* ctx = nullptr) + ///
+ ///
+ /// + /// + /// Destroys an ImPlot context. Call this before ImGui::DestroyContext. nullptr = destroy current context. + /// + /// + public static unsafe void DestroyContext(ImPlotContextPtr ctx = default) => PInvoke.DestroyContext(ctx); + + /// + /// + /// C++: implot.h:606, + /// implot.cpp:452
+ /// ImPlotContext* GetCurrentContext() + ///
+ ///
+ /// + /// + /// Returns the current ImPlot context. nullptr if no context has ben set. + /// + /// + public static unsafe ImPlotContextPtr GetCurrentContext() => PInvoke.GetCurrentContext(); + + /// + /// + /// C++: implot.h:608, + /// implot.cpp:456
+ /// void SetCurrentContext(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Sets the current ImPlot context. + /// + /// + public static unsafe void SetCurrentContext(ImPlotContextPtr ctx) => PInvoke.SetCurrentContext(ctx); + + /// + /// + /// C++: implot.h:614, + /// implot.cpp:432
+ /// void SetImGuiContext(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Sets the current **ImGui** context. This is ONLY necessary if you are compiling + /// ImPlot as a DLL (not recommended) separate from your ImGui compilation. It + /// sets the global variable GImGui, which is not shared across DLL boundaries. + /// See GImGui documentation in imgui.cpp for more details. + /// + /// + public static unsafe void SetImGuiContext(ImGuiContextPtr ctx) => PInvoke.SetImGuiContext(ctx); + + /// + /// + /// C++: implot.h:636, + /// implot.cpp:2372
+ /// bool BeginPlot(const char* title_id, const ImVec2& size=ImVec2(-1,0), ImPlotFlags flags=0) + ///
+ ///
+ /// + /// + /// - #title_id must be unique to the current ImGui ID scope. If you need to avoid ID + /// collisions or don't want to display a title in the plot, use double hashes + /// (e.g. "MyPlot##HiddenIdText" or "##NoTitle"). + /// - #size is the **frame** size of the plot widget, not the plot area. The default + /// size of plots (i.e. when ImVec2(0,0)) can be modified in your ImPlotStyle. + /// + /// + public static unsafe bool BeginPlot(ImString titleId, in float2? size = default, ImPlotFlags flags = default) + { + var size_default = size ?? new float2(-1f, 0f); + fixed (byte* titleId_fixed = titleId) + { + return PInvoke.BeginPlot(titleId_fixed, &size_default, flags); + } + } + + /// + /// + /// C++: implot.h:640, + /// implot.cpp:2766
+ /// void EndPlot() + ///
+ ///
+ /// + /// + /// Only call EndPlot() if BeginPlot() returns true! Typically called at the end + /// of an if statement conditioned on BeginPlot(). See example above. + /// + /// + public static unsafe void EndPlot() => PInvoke.EndPlot(); + + /// + /// + /// C++: implot.h:692, + /// implot.cpp:3341
+ /// bool BeginSubplots(const char* title_id, + ///
+ ///
+ public static unsafe bool BeginSubplots( + ImString titleId, + int rows, + int cols, + in float2 size, + ImPlotSubplotFlags flags = default, + ReadOnlySpan rowRatios = default, + ReadOnlySpan colRatios = default + ) + { + fixed (float* colRatios_fixed = colRatios) + { + fixed (float* rowRatios_fixed = rowRatios) + { + fixed (float2* size_fixed = &size) + { + fixed (byte* titleId_fixed = titleId) + { + return PInvoke.BeginSubplots( + titleId_fixed, + rows, + cols, + size_fixed, + flags, + rowRatios_fixed, + colRatios_fixed + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:702, + /// implot.cpp:3543
+ /// void EndSubplots() + ///
+ ///
+ /// + /// + /// Only call EndSubplots() if BeginSubplots() returns true! Typically called at the end + /// of an if statement conditioned on BeginSublots(). See example above. + /// + /// + public static unsafe void EndSubplots() => PInvoke.EndSubplots(); + + /// + /// + /// C++: implot.h:734, + /// implot.cpp:2125
+ /// void SetupAxis(ImAxis axis, const char* label=nullptr, ImPlotAxisFlags flags=0) + ///
+ ///
+ /// + /// + /// Enables an axis or sets the label and/or flags for an existing axis. Leave #label = nullptr for no + /// label. + /// + /// + public static unsafe void SetupAxis(ImAxis axis, ImString label = default, ImPlotAxisFlags flags = default) + { + fixed (byte* label_fixed = label) + { + PInvoke.SetupAxis(axis, label_fixed, flags); + } + } + + /// + /// + /// C++: implot.h:736, + /// implot.cpp:2146
+ /// void SetupAxisLimits(ImAxis axis, double v_min, double v_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets an axis range limits. If ImPlotCond_Always is used, the axes limits will be locked. Inversion with + /// v_min > v_max is not supported; use SetupAxisLimits instead. + /// + /// + public static unsafe void SetupAxisLimits( + ImAxis axis, + double vMin, + double vMax, + ImPlotCond cond = (ImPlotCond)2 + ) => PInvoke.SetupAxisLimits(axis, vMin, vMax, cond); + + /// + /// + /// C++: implot.h:738, + /// implot.cpp:2171
+ /// void SetupAxisLinks(ImAxis axis, double* link_min, double* link_max) + ///
+ ///
+ /// + /// + /// Links an axis range limits to external values. Set to nullptr for no linkage. The pointer data must + /// remain valid until EndPlot. + /// + /// + public static unsafe void SetupAxisLinks(ImAxis axis, Ptr linkMin, Ptr linkMax) => + PInvoke.SetupAxisLinks(axis, (double*)linkMin, (double*)linkMax); + + /// + /// + /// C++: implot.h:740, + /// implot.cpp:2159
+ /// void SetupAxisFormat(ImAxis axis, const char* fmt) + ///
+ ///
+ /// + /// + /// Sets the format of numeric axis labels via formater specifier (default="%g"). Formated values will be + /// double (i.e. use %f). + /// + /// + public static unsafe void SetupAxisFormat(ImAxis axis, ImString text) + { + fixed (byte* text_fixed = text) + { + PInvoke.SetupAxisFormat_0(axis, text_fixed); + } + } + + /// + /// + /// C++: implot.h:742, + /// implot.cpp:2183
+ /// void SetupAxisFormat(ImAxis axis, ImPlotFormatter formatter, void* data=nullptr) + ///
+ ///
+ /// + /// + /// Sets the format of numeric axis labels via formatter callback. Given #value, write a label into #buff. + /// Optionally pass user data. + /// + /// + public static unsafe void SetupAxisFormat(ImAxis axis, ImPlotFormatter formatter, Ptr data = default) => + PInvoke.SetupAxisFormat_1(axis, Marshal.GetFunctionPointerForDelegate(formatter), data); + + /// + /// + /// C++: implot.h:742, + /// implot.cpp:2183
+ /// void SetupAxisFormat(ImAxis axis, ImPlotFormatter formatter, void* data=nullptr) + ///
+ ///
+ /// + /// + /// Sets the format of numeric axis labels via formatter callback. Given #value, write a label into #buff. + /// Optionally pass user data. + /// + /// + public static unsafe void SetupAxisFormat( + ImAxis axis, + delegate* unmanaged[Cdecl] formatter, + Ptr data = default + ) => PInvoke.SetupAxisFormat_1(axis, (nint)formatter, data); + + /// + /// + /// C++: implot.h:744, + /// implot.cpp:2194
+ /// void SetupAxisTicks(ImAxis axis, const double* values, int n_ticks, const char* const labels[]=nullptr, bool keep_default=false) + ///
+ ///
+ /// + /// + /// Sets an axis' ticks and optionally the labels. To keep the default ticks, set #keep_default=true. + /// + /// + public static unsafe void SetupAxisTicks( + ImAxis axis, + ReadOnlySpan values, + ReadOnlySpan> labels, + bool keepDefault = false + ) + { + fixed (Ptr* labels_fixed = labels) + { + fixed (double* values_fixed = values) + { + PInvoke.SetupAxisTicks_0(axis, values_fixed, values.Length, (byte**)labels_fixed, keepDefault); + } + } + } + + /// + /// + /// C++: implot.h:746, + /// implot.cpp:2210
+ /// void SetupAxisTicks(ImAxis axis, double v_min, double v_max, int n_ticks, const char* const labels[]=nullptr, bool keep_default=false) + ///
+ ///
+ /// + /// + /// Sets an axis' ticks and optionally the labels for the next plot. To keep the default ticks, set + /// #keep_default=true. + /// + /// + public static unsafe void SetupAxisTicks( + ImAxis axis, + double vMin, + double vMax, + int nTicks, + ReadOnlySpan> labels, + bool keepDefault = false + ) + { + fixed (Ptr* labels_fixed = labels) + { + PInvoke.SetupAxisTicks_1(axis, vMin, vMax, nTicks, (byte**)labels_fixed, keepDefault); + } + } + + /// + /// + /// C++: implot.h:748, + /// implot.cpp:2219
+ /// void SetupAxisScale(ImAxis axis, ImPlotScale scale) + ///
+ ///
+ /// + /// + /// Sets an axis' scale using built-in options. + /// + /// + public static unsafe void SetupAxisScale(ImAxis axis, ImPlotScale scale) => + PInvoke.SetupAxisScale_0(axis, scale); + + /// + /// + /// C++: implot.h:750, + /// implot.cpp:2261
+ /// void SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse, void* data=nullptr) + ///
+ ///
+ /// + /// + /// Sets an axis' scale using user supplied forward and inverse transfroms. + /// + /// + public static unsafe void SetupAxisScale( + ImAxis axis, + ImPlotTransform forward, + ImPlotTransform inverse, + Ptr data = default + ) => + PInvoke.SetupAxisScale_1( + axis, + Marshal.GetFunctionPointerForDelegate(forward), + Marshal.GetFunctionPointerForDelegate(inverse), + data + ); + + /// + /// + /// C++: implot.h:750, + /// implot.cpp:2261
+ /// void SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse, void* data=nullptr) + ///
+ ///
+ /// + /// + /// Sets an axis' scale using user supplied forward and inverse transfroms. + /// + /// + public static unsafe void SetupAxisScale( + ImAxis axis, + delegate* unmanaged[Cdecl] forward, + delegate* unmanaged[Cdecl] inverse, + Ptr data = default + ) => PInvoke.SetupAxisScale_1(axis, (nint)forward, (nint)inverse, data); + + /// + /// + /// C++: implot.h:752, + /// implot.cpp:2274
+ /// void SetupAxisLimitsConstraints(ImAxis axis, double v_min, double v_max) + ///
+ ///
+ /// + /// + /// Sets an axis' limits constraints. + /// + /// + public static unsafe void SetupAxisLimitsConstraints(ImAxis axis, double vMin, double vMax) => + PInvoke.SetupAxisLimitsConstraints(axis, vMin, vMax); + + /// + /// + /// C++: implot.h:754, + /// implot.cpp:2285
+ /// void SetupAxisZoomConstraints(ImAxis axis, double z_min, double z_max) + ///
+ ///
+ /// + /// + /// Sets an axis' zoom constraints. + /// + /// + public static unsafe void SetupAxisZoomConstraints(ImAxis axis, double zMin, double zMax) => + PInvoke.SetupAxisZoomConstraints(axis, zMin, zMax); + + /// + /// + /// C++: implot.h:757, + /// implot.cpp:2296
+ /// void SetupAxes(const char* x_label, const char* y_label, ImPlotAxisFlags x_flags=0, ImPlotAxisFlags y_flags=0) + ///
+ ///
+ /// + /// + /// Sets the label and/or flags for primary X and Y axes (shorthand for two calls to SetupAxis). + /// + /// + public static unsafe void SetupAxes( + ImString xLabel, + ImString yLabel, + ImPlotAxisFlags xFlags = default, + ImPlotAxisFlags yFlags = default + ) + { + fixed (byte* yLabel_fixed = yLabel) + { + fixed (byte* xLabel_fixed = xLabel) + { + PInvoke.SetupAxes(xLabel_fixed, yLabel_fixed, xFlags, yFlags); + } + } + } + + /// + /// + /// C++: implot.h:759, + /// implot.cpp:2301
+ /// void SetupAxesLimits(double x_min, double x_max, double y_min, double y_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets the primary X and Y axes range limits. If ImPlotCond_Always is used, the axes limits will be locked + /// (shorthand for two calls to SetupAxisLimits). + /// + /// + public static unsafe void SetupAxesLimits( + double xMin, + double xMax, + double yMin, + double yMax, + ImPlotCond cond = (ImPlotCond)2 + ) => PInvoke.SetupAxesLimits(xMin, xMax, yMin, yMax, cond); + + /// + /// + /// C++: implot.h:762, + /// implot.cpp:2306
+ /// void SetupLegend(ImPlotLocation location, ImPlotLegendFlags flags=0) + ///
+ ///
+ /// + /// + /// Sets up the plot legend. This can also be called immediately after BeginSubplots when using + /// ImPlotSubplotFlags_ShareItems. + /// + /// + public static unsafe void SetupLegend(ImPlotLocation location, ImPlotLegendFlags flags = default) => + PInvoke.SetupLegend(location, flags); + + /// + /// + /// C++: implot.h:764, + /// implot.cpp:2323
+ /// void SetupMouseText(ImPlotLocation location, ImPlotMouseTextFlags flags=0) + ///
+ ///
+ /// + /// + /// Set the location of the current plot's mouse position text (default = South|East). + /// + /// + public static unsafe void SetupMouseText(ImPlotLocation location, ImPlotMouseTextFlags flags = default) => + PInvoke.SetupMouseText(location, flags); + + /// + /// + /// C++: implot.h:768, + /// implot.cpp:2466
+ /// void SetupFinish() + ///
+ ///
+ /// + /// + /// Explicitly finalize plot setup. Once you call this, you cannot make anymore Setup calls for the current plot! + /// Note that calling this function is OPTIONAL; it will be called by the first subsequent setup-locking API call. + /// + /// + public static unsafe void SetupFinish() => PInvoke.SetupFinish(); + + /// + /// + /// C++: implot.h:794, + /// implot.cpp:2335
+ /// void SetNextAxisLimits(ImAxis axis, double v_min, double v_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets an upcoming axis range limits. If ImPlotCond_Always is used, the axes limits will be locked. + /// + /// + public static unsafe void SetNextAxisLimits( + ImAxis axis, + double vMin, + double vMax, + ImPlotCond cond = (ImPlotCond)2 + ) => PInvoke.SetNextAxisLimits(axis, vMin, vMax, cond); + + /// + /// + /// C++: implot.h:796, + /// implot.cpp:2345
+ /// void SetNextAxisLinks(ImAxis axis, double* link_min, double* link_max) + ///
+ ///
+ /// + /// + /// Links an upcoming axis range limits to external values. Set to nullptr for no linkage. The pointer data + /// must remain valid until EndPlot! + /// + /// + public static unsafe void SetNextAxisLinks(ImAxis axis, Ptr linkMin, Ptr linkMax) => + PInvoke.SetNextAxisLinks(axis, (double*)linkMin, (double*)linkMax); + + /// + /// + /// C++: implot.h:798, + /// implot.cpp:2352
+ /// void SetNextAxisToFit(ImAxis axis) + ///
+ ///
+ /// + /// + /// Set an upcoming axis to auto fit to its data. + /// + /// + public static unsafe void SetNextAxisToFit(ImAxis axis) => PInvoke.SetNextAxisToFit(axis); + + /// + /// + /// C++: implot.h:801, + /// implot.cpp:2358
+ /// void SetNextAxesLimits(double x_min, double x_max, double y_min, double y_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets the upcoming primary X and Y axes range limits. If ImPlotCond_Always is used, the axes limits will + /// be locked (shorthand for two calls to SetupAxisLimits). + /// + /// + public static unsafe void SetNextAxesLimits( + double xMin, + double xMax, + double yMin, + double yMax, + ImPlotCond cond = (ImPlotCond)2 + ) => PInvoke.SetNextAxesLimits(xMin, xMax, yMin, yMax, cond); + + /// + /// + /// C++: implot.h:803, + /// implot.cpp:2363
+ /// void SetNextAxesToFit() + ///
+ ///
+ /// + /// + /// Sets all upcoming axes to auto fit to their data. + /// + /// + public static unsafe void SetNextAxesToFit() => PInvoke.SetNextAxesToFit(); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_float(labelId_fixed, (float*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_float( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_double(labelId_fixed, (double*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_double( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_sbyte(labelId_fixed, (sbyte*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_sbyte( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_byte(labelId_fixed, (byte*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_byte( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_short(labelId_fixed, (short*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_short( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_ushort(labelId_fixed, (ushort*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_ushort( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_int(labelId_fixed, (int*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_int( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_uint(labelId_fixed, (uint*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_uint( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_long(labelId_fixed, (long*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_long( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_ulong(labelId_fixed, (ulong*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_0_ulong( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_float(labelId_fixed, (float*)xs, (float*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_float(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_double(labelId_fixed, (double*)xs, (double*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_double(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_sbyte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_byte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_short(labelId_fixed, (short*)xs, (short*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_short(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_ushort(labelId_fixed, (ushort*)xs, (ushort*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_ushort(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_int(labelId_fixed, (int*)xs, (int*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_int(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_uint(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_long(labelId_fixed, (long*)xs, (long*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_long(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + public static unsafe void PlotLine( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotLineFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLine_1_ulong(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:860, + /// implot_items.cpp:1638 + ///
+ /// void PlotLineG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotLineFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + /// custom + /// + /// + public static unsafe void PlotLineG( + ImString labelId, + ImPlotGetter getter, + Ptr data, + int count, + ImPlotLineFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLineG(labelId_fixed, Marshal.GetFunctionPointerForDelegate(getter), data, count, flags); + } + } + + /// + /// + /// C++: implot.h:860, + /// implot_items.cpp:1638 + ///
+ /// void PlotLineG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotLineFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + /// custom + /// + /// + public static unsafe void PlotLineG( + ImString labelId, + delegate* unmanaged[Cdecl] getter, + Ptr data, + int count, + ImPlotLineFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotLineG(labelId_fixed, (nint)getter, data, count, flags); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_float( + labelId_fixed, + (float*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_float( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_double( + labelId_fixed, + (double*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_double( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_sbyte( + labelId_fixed, + (sbyte*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_sbyte( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_byte(labelId_fixed, (byte*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_byte( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_short( + labelId_fixed, + (short*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_short( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_ushort( + labelId_fixed, + (ushort*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_ushort( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_int(labelId_fixed, (int*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_int( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_uint(labelId_fixed, (uint*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_uint( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_long(labelId_fixed, (long*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_long( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_ulong( + labelId_fixed, + (ulong*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_0_ulong( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_float(labelId_fixed, (float*)xs, (float*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_float( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_double(labelId_fixed, (double*)xs, (double*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_double( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_sbyte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_byte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_short(labelId_fixed, (short*)xs, (short*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_short( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_ushort(labelId_fixed, (ushort*)xs, (ushort*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_ushort( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_int(labelId_fixed, (int*)xs, (int*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_int(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_uint(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_long(labelId_fixed, (long*)xs, (long*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_long(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + public static unsafe void PlotScatter( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotScatterFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatter_1_ulong( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:865, + /// implot_items.cpp:1688 + ///
+ /// void PlotScatterG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotScatterFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + /// custom + /// + /// + public static unsafe void PlotScatterG( + ImString labelId, + ImPlotGetter getter, + Ptr data, + int count, + ImPlotScatterFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatterG(labelId_fixed, Marshal.GetFunctionPointerForDelegate(getter), data, count, flags); + } + } + + /// + /// + /// C++: implot.h:865, + /// implot_items.cpp:1688 + ///
+ /// void PlotScatterG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotScatterFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + /// custom + /// + /// + public static unsafe void PlotScatterG( + ImString labelId, + delegate* unmanaged[Cdecl] getter, + Ptr data, + int count, + ImPlotScatterFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotScatterG(labelId_fixed, (nint)getter, data, count, flags); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_float(labelId_fixed, (float*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_float( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_double( + labelId_fixed, + (double*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_double( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_sbyte(labelId_fixed, (sbyte*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_sbyte( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_byte(labelId_fixed, (byte*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_byte( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_short(labelId_fixed, (short*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_short( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_ushort( + labelId_fixed, + (ushort*)values, + count, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_ushort( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_int(labelId_fixed, (int*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_int( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_uint(labelId_fixed, (uint*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_uint( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_long(labelId_fixed, (long*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_long( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr values, + int count, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_ulong(labelId_fixed, (ulong*)values, count, xscale, xstart, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan values, + double xscale = 1d, + double xstart = 0d, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_0_ulong( + labelId_fixed, + values_fixed, + values.Length, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_float(labelId_fixed, (float*)xs, (float*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_float(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_double(labelId_fixed, (double*)xs, (double*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_double( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_sbyte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_byte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_short(labelId_fixed, (short*)xs, (short*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_short(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_ushort(labelId_fixed, (ushort*)xs, (ushort*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_ushort( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_int(labelId_fixed, (int*)xs, (int*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_int(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_uint(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_long(labelId_fixed, (long*)xs, (long*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_long(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + public static unsafe void PlotStairs( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotStairsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairs_1_ulong(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:870, + /// implot_items.cpp:1752 + ///
+ /// void PlotStairsG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotStairsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + /// custom + /// + /// + public static unsafe void PlotStairsG( + ImString labelId, + ImPlotGetter getter, + Ptr data, + int count, + ImPlotStairsFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairsG(labelId_fixed, Marshal.GetFunctionPointerForDelegate(getter), data, count, flags); + } + } + + /// + /// + /// C++: implot.h:870, + /// implot_items.cpp:1752 + ///
+ /// void PlotStairsG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotStairsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, i.e. + /// the interval [x[i], x[i+1]) has the value y[i] + /// + /// + /// custom + /// + /// + public static unsafe void PlotStairsG( + ImString labelId, + delegate* unmanaged[Cdecl] getter, + Ptr data, + int count, + ImPlotStairsFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStairsG(labelId_fixed, (nint)getter, data, count, flags); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_float( + labelId_fixed, + (float*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_float( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_double( + labelId_fixed, + (double*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_double( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_sbyte( + labelId_fixed, + (sbyte*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_sbyte( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_byte( + labelId_fixed, + (byte*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_byte( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_short( + labelId_fixed, + (short*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_short( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_ushort( + labelId_fixed, + (ushort*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_ushort( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_int( + labelId_fixed, + (int*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_int( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_uint( + labelId_fixed, + (uint*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_uint( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_long( + labelId_fixed, + (long*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_long( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr values, + int count, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_ulong( + labelId_fixed, + (ulong*)values, + count, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + double xscale = 1d, + double xstart = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_0_ulong( + labelId_fixed, + values_fixed, + values.Length, + yref, + xscale, + xstart, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_float(labelId_fixed, (float*)xs, (float*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_float( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_double( + labelId_fixed, + (double*)xs, + (double*)ys, + count, + yref, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_double( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_sbyte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_byte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_short(labelId_fixed, (short*)xs, (short*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_short( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_ushort( + labelId_fixed, + (ushort*)xs, + (ushort*)ys, + count, + yref, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_ushort( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_int(labelId_fixed, (int*)xs, (int*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_int( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_uint( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_long(labelId_fixed, (long*)xs, (long*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_long( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, yref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_1_ulong( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + yref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_float( + labelId_fixed, + (float*)xs, + (float*)ys1, + (float*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys2_fixed = ys2) + { + fixed (float* ys1_fixed = ys1) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_float( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_double( + labelId_fixed, + (double*)xs, + (double*)ys1, + (double*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys2_fixed = ys2) + { + fixed (double* ys1_fixed = ys1) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_double( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_sbyte( + labelId_fixed, + (sbyte*)xs, + (sbyte*)ys1, + (sbyte*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys2_fixed = ys2) + { + fixed (sbyte* ys1_fixed = ys1) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_sbyte( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_byte( + labelId_fixed, + (byte*)xs, + (byte*)ys1, + (byte*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys2_fixed = ys2) + { + fixed (byte* ys1_fixed = ys1) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_byte( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_short( + labelId_fixed, + (short*)xs, + (short*)ys1, + (short*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys2_fixed = ys2) + { + fixed (short* ys1_fixed = ys1) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_short( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_ushort( + labelId_fixed, + (ushort*)xs, + (ushort*)ys1, + (ushort*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys2_fixed = ys2) + { + fixed (ushort* ys1_fixed = ys1) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_ushort( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_int(labelId_fixed, (int*)xs, (int*)ys1, (int*)ys2, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys2_fixed = ys2) + { + fixed (int* ys1_fixed = ys1) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_int( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_uint( + labelId_fixed, + (uint*)xs, + (uint*)ys1, + (uint*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys2_fixed = ys2) + { + fixed (uint* ys1_fixed = ys1) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_uint( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_long( + labelId_fixed, + (long*)xs, + (long*)ys1, + (long*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys2_fixed = ys2) + { + fixed (long* ys1_fixed = ys1) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_long( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + Ptr xs, + Ptr ys1, + Ptr ys2, + int count, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_ulong( + labelId_fixed, + (ulong*)xs, + (ulong*)ys1, + (ulong*)ys2, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + public static unsafe void PlotShaded( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys1, + ReadOnlySpan ys2, + ImPlotShadedFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys2_fixed = ys2) + { + fixed (ulong* ys1_fixed = ys1) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShaded_2_ulong( + labelId_fixed, + xs_fixed, + ys1_fixed, + ys2_fixed, + xs.Length, + flags, + offset, + stride + ); + } + } + } + } + } + + /// + /// + /// C++: implot.h:876, + /// implot_items.cpp:1815 + ///
+ /// void PlotShadedG(const char* label_id, ImPlotGetter getter1, void* data1, ImPlotGetter getter2, void* data2, int count, ImPlotShadedFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + /// custom + /// + /// + public static unsafe void PlotShadedG( + ImString labelId, + ImPlotGetter getter1, + Ptr data1, + ImPlotGetter getter2, + Ptr data2, + int count, + ImPlotShadedFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShadedG( + labelId_fixed, + Marshal.GetFunctionPointerForDelegate(getter1), + data1, + Marshal.GetFunctionPointerForDelegate(getter2), + data2, + count, + flags + ); + } + } + + /// + /// + /// C++: implot.h:876, + /// implot_items.cpp:1815 + ///
+ /// void PlotShadedG(const char* label_id, ImPlotGetter getter1, void* data1, ImPlotGetter getter2, void* data2, int count, ImPlotShadedFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + /// custom + /// + /// + public static unsafe void PlotShadedG( + ImString labelId, + delegate* unmanaged[Cdecl] getter1, + Ptr data1, + delegate* unmanaged[Cdecl] getter2, + Ptr data2, + int count, + ImPlotShadedFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotShadedG(labelId_fixed, (nint)getter1, data1, (nint)getter2, data2, count, flags); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_float(labelId_fixed, (float*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_float( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_double(labelId_fixed, (double*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_double( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_sbyte(labelId_fixed, (sbyte*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_sbyte( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_byte(labelId_fixed, (byte*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_byte( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_short(labelId_fixed, (short*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_short( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_ushort(labelId_fixed, (ushort*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_ushort( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_int(labelId_fixed, (int*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_int( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_uint(labelId_fixed, (uint*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_uint( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_long(labelId_fixed, (long*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_long( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr values, + int count, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_ulong(labelId_fixed, (ulong*)values, count, barSize, shift, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan values, + double barSize = 0.67d, + double shift = 0d, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_0_ulong( + labelId_fixed, + values_fixed, + values.Length, + barSize, + shift, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_float(labelId_fixed, (float*)xs, (float*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_float( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_double( + labelId_fixed, + (double*)xs, + (double*)ys, + count, + barSize, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_double( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_sbyte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_byte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_short(labelId_fixed, (short*)xs, (short*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_short( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_ushort( + labelId_fixed, + (ushort*)xs, + (ushort*)ys, + count, + barSize, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_ushort( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_int(labelId_fixed, (int*)xs, (int*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_int( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_uint( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_long(labelId_fixed, (long*)xs, (long*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_long( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, barSize, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBars( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double barSize, + ImPlotBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBars_1_ulong( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + barSize, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:881, + /// implot_items.cpp:1907 + ///
+ /// void PlotBarsG(const char* label_id, ImPlotGetter getter, void* data, int count, double bar_size, ImPlotBarsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBarsG( + ImString labelId, + ImPlotGetter getter, + Ptr data, + int count, + double barSize, + ImPlotBarsFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBarsG( + labelId_fixed, + Marshal.GetFunctionPointerForDelegate(getter), + data, + count, + barSize, + flags + ); + } + } + + /// + /// + /// C++: implot.h:881, + /// implot_items.cpp:1907 + ///
+ /// void PlotBarsG(const char* label_id, ImPlotGetter getter, void* data, int count, double bar_size, ImPlotBarsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + public static unsafe void PlotBarsG( + ImString labelId, + delegate* unmanaged[Cdecl] getter, + Ptr data, + int count, + double barSize, + ImPlotBarsFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotBarsG(labelId_fixed, (nint)getter, data, count, barSize, flags); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_float( + (byte**)labelIds_fixed, + (float*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (float* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_float( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_double( + (byte**)labelIds_fixed, + (double*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (double* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_double( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_sbyte( + (byte**)labelIds_fixed, + (sbyte*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_sbyte( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_byte( + (byte**)labelIds_fixed, + (byte*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (byte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_byte( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_short( + (byte**)labelIds_fixed, + (short*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (short* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_short( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_ushort( + (byte**)labelIds_fixed, + (ushort*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (ushort* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_ushort( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_int( + (byte**)labelIds_fixed, + (int*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (int* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_int( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_uint( + (byte**)labelIds_fixed, + (uint*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (uint* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_uint( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_long( + (byte**)labelIds_fixed, + (long*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (long* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_long( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + Ptr values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_ulong( + (byte**)labelIds_fixed, + (ulong*)values, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + public static unsafe void PlotBarGroups( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + int itemCount, + int groupCount, + double groupSize = 0.67d, + double shift = 0d, + ImPlotBarGroupsFlags flags = default + ) + { + fixed (ulong* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotBarGroups_ulong( + (byte**)labelIds_fixed, + values_fixed, + itemCount, + groupCount, + groupSize, + shift, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_float( + labelId_fixed, + (float*)xs, + (float*)ys, + (float*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_double( + labelId_fixed, + (double*)xs, + (double*)ys, + (double*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_sbyte( + labelId_fixed, + (sbyte*)xs, + (sbyte*)ys, + (sbyte*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_byte( + labelId_fixed, + (byte*)xs, + (byte*)ys, + (byte*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_short( + labelId_fixed, + (short*)xs, + (short*)ys, + (short*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_ushort( + labelId_fixed, + (ushort*)xs, + (ushort*)ys, + (ushort*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_int(labelId_fixed, (int*)xs, (int*)ys, (int*)err, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_uint( + labelId_fixed, + (uint*)xs, + (uint*)ys, + (uint*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_long( + labelId_fixed, + (long*)xs, + (long*)ys, + (long*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr err, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_0_ulong( + labelId_fixed, + (ulong*)xs, + (ulong*)ys, + (ulong*)err, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_float( + labelId_fixed, + (float*)xs, + (float*)ys, + (float*)neg, + (float*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_double( + labelId_fixed, + (double*)xs, + (double*)ys, + (double*)neg, + (double*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_sbyte( + labelId_fixed, + (sbyte*)xs, + (sbyte*)ys, + (sbyte*)neg, + (sbyte*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_byte( + labelId_fixed, + (byte*)xs, + (byte*)ys, + (byte*)neg, + (byte*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_short( + labelId_fixed, + (short*)xs, + (short*)ys, + (short*)neg, + (short*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_ushort( + labelId_fixed, + (ushort*)xs, + (ushort*)ys, + (ushort*)neg, + (ushort*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_int( + labelId_fixed, + (int*)xs, + (int*)ys, + (int*)neg, + (int*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_uint( + labelId_fixed, + (uint*)xs, + (uint*)ys, + (uint*)neg, + (uint*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_long( + labelId_fixed, + (long*)xs, + (long*)ys, + (long*)neg, + (long*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar + /// plot. + /// + /// + public static unsafe void PlotErrorBars( + ImString labelId, + Ptr xs, + Ptr ys, + Ptr neg, + Ptr pos, + int count, + ImPlotErrorBarsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotErrorBars_1_ulong( + labelId_fixed, + (ulong*)xs, + (ulong*)ys, + (ulong*)neg, + (ulong*)pos, + count, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_float( + labelId_fixed, + (float*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_float( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_double( + labelId_fixed, + (double*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_double( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_sbyte( + labelId_fixed, + (sbyte*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_sbyte( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_byte( + labelId_fixed, + (byte*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_byte( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_short( + labelId_fixed, + (short*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_short( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_ushort( + labelId_fixed, + (ushort*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_ushort( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_int(labelId_fixed, (int*)values, count, @ref, scale, start, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_int( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_uint( + labelId_fixed, + (uint*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_uint( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_long( + labelId_fixed, + (long*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_long( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr values, + int count, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_ulong( + labelId_fixed, + (ulong*)values, + count, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan values, + double @ref = 0d, + double scale = 1d, + double start = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_0_ulong( + labelId_fixed, + values_fixed, + values.Length, + @ref, + scale, + start, + flags, + offset, + stride + ); + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_float(labelId_fixed, (float*)xs, (float*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_float( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_double(labelId_fixed, (double*)xs, (double*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_double( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_sbyte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_byte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_short(labelId_fixed, (short*)xs, (short*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_short( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_ushort(labelId_fixed, (ushort*)xs, (ushort*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_ushort( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_int(labelId_fixed, (int*)xs, (int*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_int( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_uint( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_long(labelId_fixed, (long*)xs, (long*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_long( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, @ref, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + public static unsafe void PlotStems( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + double @ref = 0d, + ImPlotStemsFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotStems_1_ulong( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + @ref, + flags, + offset, + stride + ); + } + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_float(labelId_fixed, (float*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_float(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_double(labelId_fixed, (double*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_double(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_sbyte(labelId_fixed, (sbyte*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_sbyte(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_byte(labelId_fixed, (byte*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_byte(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_short(labelId_fixed, (short*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_short(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_ushort(labelId_fixed, (ushort*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_ushort(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_int(labelId_fixed, (int*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_int(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_uint(labelId_fixed, (uint*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_uint(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_long(labelId_fixed, (long*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_long(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + Ptr values, + int count, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_ulong(labelId_fixed, (ulong*)values, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + public static unsafe void PlotInfLines( + ImString labelId, + ReadOnlySpan values, + ImPlotInfLinesFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotInfLines_ulong(labelId_fixed, values_fixed, values.Length, flags, offset, stride); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_float( + (byte**)labelIds_fixed, + (float*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_float( + (byte**)labelIds_fixed, + (float*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (float* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_float( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (float* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_float( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_double( + (byte**)labelIds_fixed, + (double*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_double( + (byte**)labelIds_fixed, + (double*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (double* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_double( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (double* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_double( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_sbyte( + (byte**)labelIds_fixed, + (sbyte*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_sbyte( + (byte**)labelIds_fixed, + (sbyte*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_sbyte( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_sbyte( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_byte( + (byte**)labelIds_fixed, + (byte*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_byte( + (byte**)labelIds_fixed, + (byte*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (byte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_byte( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (byte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_byte( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_short( + (byte**)labelIds_fixed, + (short*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_short( + (byte**)labelIds_fixed, + (short*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (short* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_short( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (short* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_short( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ushort( + (byte**)labelIds_fixed, + (ushort*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ushort( + (byte**)labelIds_fixed, + (ushort*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (ushort* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ushort( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (ushort* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ushort( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_int( + (byte**)labelIds_fixed, + (int*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_int( + (byte**)labelIds_fixed, + (int*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (int* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_int( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (int* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_int( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_uint( + (byte**)labelIds_fixed, + (uint*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_uint( + (byte**)labelIds_fixed, + (uint*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (uint* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_uint( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (uint* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_uint( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_long( + (byte**)labelIds_fixed, + (long*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_long( + (byte**)labelIds_fixed, + (long*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (long* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_long( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (long* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_long( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + ImPlotFormatter text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ulong( + (byte**)labelIds_fixed, + (ulong*)values, + count, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(text), + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] text, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ulong( + (byte**)labelIds_fixed, + (ulong*)values, + count, + x, + y, + radius, + (nint)text, + fmtData, + angle0, + flags + ); + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + ImPlotFormatter fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (ulong* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ulong( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + Marshal.GetFunctionPointerForDelegate(fmt), + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + delegate* unmanaged[Cdecl] fmt, + Ptr fmtData = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + fixed (ulong* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_0_ulong( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + (nint)fmt, + fmtData, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_float( + (byte**)labelIds_fixed, + (float*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (float* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_float( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_double( + (byte**)labelIds_fixed, + (double*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (double* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_double( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_sbyte( + (byte**)labelIds_fixed, + (sbyte*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (sbyte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_sbyte( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_byte( + (byte**)labelIds_fixed, + (byte*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_byte( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_short( + (byte**)labelIds_fixed, + (short*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (short* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_short( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_ushort( + (byte**)labelIds_fixed, + (ushort*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (ushort* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_ushort( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_int( + (byte**)labelIds_fixed, + (int*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (int* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_int( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_uint( + (byte**)labelIds_fixed, + (uint*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (uint* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_uint( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_long( + (byte**)labelIds_fixed, + (long*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (long* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_long( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + Ptr values, + int count, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_ulong( + (byte**)labelIds_fixed, + (ulong*)values, + count, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. + /// + /// + public static unsafe void PlotPieChart( + ReadOnlySpan> labelIds, + ReadOnlySpan values, + double x, + double y, + double radius, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + double angle0 = 90d, + ImPlotPieChartFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (ulong* values_fixed = values) + { + fixed (Ptr* labelIds_fixed = labelIds) + { + PInvoke.PlotPieChart_1_ulong( + (byte**)labelIds_fixed, + values_fixed, + values.Length, + x, + y, + radius, + labelFmt_fixed, + angle0, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_float( + labelId_fixed, + (float*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_float( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_double( + labelId_fixed, + (double*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_double( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_sbyte( + labelId_fixed, + (sbyte*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_sbyte( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_byte( + labelId_fixed, + (byte*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_byte( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_short( + labelId_fixed, + (short*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_short( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_ushort( + labelId_fixed, + (ushort*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_ushort( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_int( + labelId_fixed, + (int*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_int( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_uint( + labelId_fixed, + (uint*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_uint( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_long( + labelId_fixed, + (long*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_long( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + Ptr values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_ulong( + labelId_fixed, + (ulong*)values, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// Default value if unset: "%.1f" + /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and + /// scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be + /// set to nullptr for no labels. + /// + /// + public static unsafe void PlotHeatmap( + ImString labelId, + ReadOnlySpan values, + int rows, + int cols, + double scaleMin = 0d, + double scaleMax = 0d, + [System.ComponentModel.DefaultValue("%.1f")] ImString labelFmt = default, + in double2? boundsMin = default, + in double2? boundsMax = default, + ImPlotHeatmapFlags flags = default + ) + { + if (labelFmt.IsUnset) + { + labelFmt = "%.1f"u8; + } + var boundsMin_default = boundsMin ?? new double2(0f, 0f); + var boundsMax_default = boundsMax ?? new double2(1f, 1f); + fixed (byte* labelFmt_fixed = labelFmt) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotHeatmap_ulong( + labelId_fixed, + values_fixed, + rows, + cols, + scaleMin, + scaleMax, + labelFmt_fixed, + &boundsMin_default, + &boundsMax_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_float(labelId_fixed, (float*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (float* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_float( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_double( + labelId_fixed, + (double*)values, + count, + bins, + barScale, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (double* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_double( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_sbyte(labelId_fixed, (sbyte*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (sbyte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_sbyte( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_byte(labelId_fixed, (byte*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_byte( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_short(labelId_fixed, (short*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (short* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_short( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_ushort( + labelId_fixed, + (ushort*)values, + count, + bins, + barScale, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (ushort* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_ushort( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_int(labelId_fixed, (int*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (int* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_int( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_uint(labelId_fixed, (uint*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (uint* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_uint( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_long(labelId_fixed, (long*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (long* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_long( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + Ptr values, + int count, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_ulong(labelId_fixed, (ulong*)values, count, bins, barScale, range, flags); + } + } + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram( + ImString labelId, + ReadOnlySpan values, + int bins = -2, + double barScale = 1d, + ImPlotRange range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (ulong* values_fixed = values) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram_ulong( + labelId_fixed, + values_fixed, + values.Length, + bins, + barScale, + range, + flags + ); + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_float( + labelId_fixed, + (float*)xs, + (float*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_float( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_double( + labelId_fixed, + (double*)xs, + (double*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_double( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_sbyte( + labelId_fixed, + (sbyte*)xs, + (sbyte*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_sbyte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_byte( + labelId_fixed, + (byte*)xs, + (byte*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_byte( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_short( + labelId_fixed, + (short*)xs, + (short*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_short( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_ushort( + labelId_fixed, + (ushort*)xs, + (ushort*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_ushort( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_int( + labelId_fixed, + (int*)xs, + (int*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_int( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_uint( + labelId_fixed, + (uint*)xs, + (uint*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_uint( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_long( + labelId_fixed, + (long*)xs, + (long*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_long( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_ulong( + labelId_fixed, + (ulong*)xs, + (ulong*)ys, + count, + xBins, + yBins, + range, + flags + ); + } + } + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + public static unsafe double PlotHistogram2D( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + int xBins = -2, + int yBins = -2, + ImPlotRect range = default, + ImPlotHistogramFlags flags = default + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.PlotHistogram2D_ulong( + labelId_fixed, + xs_fixed, + ys_fixed, + xs.Length, + xBins, + yBins, + range, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_float(labelId_fixed, (float*)xs, (float*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(float) + ) + { + fixed (float* ys_fixed = ys) + { + fixed (float* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_float(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_double(labelId_fixed, (double*)xs, (double*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(double) + ) + { + fixed (double* ys_fixed = ys) + { + fixed (double* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_double(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_sbyte(labelId_fixed, (sbyte*)xs, (sbyte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(sbyte) + ) + { + fixed (sbyte* ys_fixed = ys) + { + fixed (sbyte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_sbyte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_byte(labelId_fixed, (byte*)xs, (byte*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(byte) + ) + { + fixed (byte* ys_fixed = ys) + { + fixed (byte* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_byte(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_short(labelId_fixed, (short*)xs, (short*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(short) + ) + { + fixed (short* ys_fixed = ys) + { + fixed (short* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_short(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_ushort(labelId_fixed, (ushort*)xs, (ushort*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(ushort) + ) + { + fixed (ushort* ys_fixed = ys) + { + fixed (ushort* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_ushort(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_int(labelId_fixed, (int*)xs, (int*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(int) + ) + { + fixed (int* ys_fixed = ys) + { + fixed (int* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_int(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_uint(labelId_fixed, (uint*)xs, (uint*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(uint) + ) + { + fixed (uint* ys_fixed = ys) + { + fixed (uint* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_uint(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_long(labelId_fixed, (long*)xs, (long*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(long) + ) + { + fixed (long* ys_fixed = ys) + { + fixed (long* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_long(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + Ptr xs, + Ptr ys, + int count, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_ulong(labelId_fixed, (ulong*)xs, (ulong*)ys, count, flags, offset, stride); + } + } + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + public static unsafe void PlotDigital( + ImString labelId, + ReadOnlySpan xs, + ReadOnlySpan ys, + ImPlotDigitalFlags flags = default, + int offset = 0, + int stride = sizeof(ulong) + ) + { + fixed (ulong* ys_fixed = ys) + { + fixed (ulong* xs_fixed = xs) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigital_ulong(labelId_fixed, xs_fixed, ys_fixed, xs.Length, flags, offset, stride); + } + } + } + } + + /// + /// + /// C++: implot.h:914, + /// implot_items.cpp:2782 + ///
+ /// void PlotDigitalG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotDigitalFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + /// custom + /// + /// + public static unsafe void PlotDigitalG( + ImString labelId, + ImPlotGetter getter, + Ptr data, + int count, + ImPlotDigitalFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigitalG(labelId_fixed, Marshal.GetFunctionPointerForDelegate(getter), data, count, flags); + } + } + + /// + /// + /// C++: implot.h:914, + /// implot_items.cpp:2782 + ///
+ /// void PlotDigitalG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotDigitalFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + /// custom + /// + /// + public static unsafe void PlotDigitalG( + ImString labelId, + delegate* unmanaged[Cdecl] getter, + Ptr data, + int count, + ImPlotDigitalFlags flags = default + ) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDigitalG(labelId_fixed, (nint)getter, data, count, flags); + } + } + + /// + /// + /// C++: implot.h:918, + /// implot_items.cpp:2792 + ///
+ /// void PlotImage(const char* label_id, ImTextureRef tex_ref, const ImPlotPoint& bounds_min, const ImPlotPoint& bounds_max, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), ImPlotImageFlags flags = 0) + ///
+ ///
+ /// + /// + /// Plots an axis-aligned image. #bounds_min/bounds_max are in plot coordinates (y-up) and #uv0/uv1 are in + /// texture coordinates (y-down). + /// + /// + public static unsafe void PlotImage( + ImString labelId, + ImTextureRef texRef, + in double2 boundsMin, + in double2 boundsMax, + in float2? uv0 = default, + in float2? uv1 = default, + in float4? tintCol = default, + ImPlotImageFlags flags = default + ) + { + var uv0_default = uv0 ?? new float2(0f, 0f); + var uv1_default = uv1 ?? new float2(1f, 1f); + var tintCol_default = tintCol ?? new float4(1f, 1f, 1f, 1f); + fixed (double2* boundsMax_fixed = &boundsMax) + { + fixed (double2* boundsMin_fixed = &boundsMin) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotImage( + labelId_fixed, + texRef, + boundsMin_fixed, + boundsMax_fixed, + &uv0_default, + &uv1_default, + &tintCol_default, + flags + ); + } + } + } + } + + /// + /// + /// C++: implot.h:924, + /// implot_items.cpp:2813 + ///
+ /// void PlotText(const char* text, double x, double y, const ImVec2& pix_offset=ImVec2(0,0), ImPlotTextFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a centered text label at point x,y with an optional pixel offset. Text color can be changed with + /// ImPlot::PushStyleColor(ImPlotCol_InlayText, ...). + /// + /// + public static unsafe void PlotText( + ImString text, + double x, + double y, + in float2? pixOffset = default, + ImPlotTextFlags flags = default + ) + { + var pixOffset_default = pixOffset ?? new float2(0f, 0f); + fixed (byte* text_fixed = text) + { + PInvoke.PlotText(text_fixed, x, y, &pixOffset_default, flags); + } + } + + /// + /// + /// C++: implot.h:927, + /// implot_items.cpp:2845 + ///
void PlotDummy(const char* label_id, ImPlotDummyFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a dummy item (i.e. adds a legend entry colored by ImPlotCol_Line) + /// + /// + public static unsafe void PlotDummy(ImString labelId, ImPlotDummyFlags flags = default) + { + fixed (byte* labelId_fixed = labelId) + { + PInvoke.PlotDummy(labelId_fixed, flags); + } + } + + /// + /// + /// C++: implot.h:940, + /// implot.cpp:3905
+ /// bool DragPoint(int id, double* x, double* y, const ImVec4& col, float size = 4, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable point at x,y. #col defaults to ImGuiCol_Text. + /// + /// + public static unsafe bool DragPoint( + int id, + Ptr x, + Ptr y, + in float4 col, + float size = 4f, + ImPlotDragToolFlags flags = default, + Ptr outClicked = default, + Ptr outHovered = default, + Ptr held = default + ) + { + fixed (float4* col_fixed = &col) + { + return PInvoke.DragPoint( + id, + (double*)x, + (double*)y, + col_fixed, + size, + flags, + (Bool8*)outClicked, + (Bool8*)outHovered, + (Bool8*)held + ); + } + } + + /// + /// + /// C++: implot.h:942, + /// implot.cpp:3954
+ /// bool DragLineX(int id, double* x, const ImVec4& col, float thickness = 1, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable vertical guide line at an x-value. #col defaults to ImGuiCol_Text. + /// + /// + public static unsafe bool DragLineX( + int id, + Ptr x, + in float4 col, + float thickness = 1f, + ImPlotDragToolFlags flags = default, + Ptr outClicked = default, + Ptr outHovered = default, + Ptr held = default + ) + { + fixed (float4* col_fixed = &col) + { + return PInvoke.DragLineX( + id, + (double*)x, + col_fixed, + thickness, + flags, + (Bool8*)outClicked, + (Bool8*)outHovered, + (Bool8*)held + ); + } + } + + /// + /// + /// C++: implot.h:944, + /// implot.cpp:4009
+ /// bool DragLineY(int id, double* y, const ImVec4& col, float thickness = 1, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable horizontal guide line at a y-value. #col defaults to ImGuiCol_Text. + /// + /// + public static unsafe bool DragLineY( + int id, + Ptr y, + in float4 col, + float thickness = 1f, + ImPlotDragToolFlags flags = default, + Ptr outClicked = default, + Ptr outHovered = default, + Ptr held = default + ) + { + fixed (float4* col_fixed = &col) + { + return PInvoke.DragLineY( + id, + (double*)y, + col_fixed, + thickness, + flags, + (Bool8*)outClicked, + (Bool8*)outHovered, + (Bool8*)held + ); + } + } + + /// + /// + /// C++: implot.h:946, + /// implot.cpp:4065
+ /// bool DragRect(int id, double* x1, double* y1, double* x2, double* y2, const ImVec4& col, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable and resizeable rectangle. + /// + /// + public static unsafe bool DragRect( + int id, + Ptr x1, + Ptr y1, + Ptr x2, + Ptr y2, + in float4 col, + ImPlotDragToolFlags flags = default, + Ptr outClicked = default, + Ptr outHovered = default, + Ptr held = default + ) + { + fixed (float4* col_fixed = &col) + { + return PInvoke.DragRect( + id, + (double*)x1, + (double*)y1, + (double*)x2, + (double*)y2, + col_fixed, + flags, + (Bool8*)outClicked, + (Bool8*)outHovered, + (Bool8*)held + ); + } + } + + /// + /// + /// C++: implot.h:949, + /// implot.cpp:3807
+ /// void Annotation(double x, double y, const ImVec4& col, const ImVec2& pix_offset, bool clamp, bool round = false) + ///
+ ///
+ /// + /// + /// Shows an annotation callout at a chosen point. Clamping keeps annotations in the plot area. Annotations + /// are always rendered on top. + /// + /// + public static unsafe void Annotation( + double x, + double y, + in float4 col, + in float2 pixOffset, + bool clamp, + bool round = false + ) + { + fixed (float2* pixOffset_fixed = &pixOffset) + { + fixed (float4* col_fixed = &col) + { + PInvoke.Annotation_0(x, y, col_fixed, pixOffset_fixed, clamp, round); + } + } + } + + /// + /// + /// C++: implot.h:950, + /// implot.cpp:3830
+ /// void Annotation(double x, double y, const ImVec4& col, const ImVec2& pix_offset, bool clamp, const char* fmt, ...) IM_FMTARGS(6) + ///
+ ///
+ /// + /// + /// Shows an annotation callout at a chosen point. Clamping keeps annotations in the plot area. Annotations + /// are always rendered on top. + /// + /// + public static unsafe void Annotation( + double x, + double y, + in float4 col, + in float2 pixOffset, + bool clamp, + ImString text + ) + { + fixed (byte* text_fixed = text) + { + fixed (float2* pixOffset_fixed = &pixOffset) + { + fixed (float4* col_fixed = &col) + { + PInvoke.Annotation_1(x, y, col_fixed, pixOffset_fixed, clamp, text_fixed); + } + } + } + } + + /// + /// + /// C++: implot.h:954, + /// implot.cpp:3861
+ /// void TagX(double x, const ImVec4& col, bool round = false) + ///
+ ///
+ /// + /// + /// Shows a x-axis tag at the specified coordinate value. + /// + /// + public static unsafe void TagX(double x, in float4 col, bool round = false) + { + fixed (float4* col_fixed = &col) + { + PInvoke.TagX_0(x, col_fixed, round); + } + } + + /// + /// + /// C++: implot.h:955, + /// implot.cpp:3867
+ /// void TagX(double x, const ImVec4& col, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Shows a x-axis tag at the specified coordinate value. + /// + /// + public static unsafe void TagX(double x, in float4 col, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (float4* col_fixed = &col) + { + PInvoke.TagX_1(x, col_fixed, text_fixed); + } + } + } + + /// + /// + /// C++: implot.h:959, + /// implot.cpp:3882
+ /// void TagY(double y, const ImVec4& col, bool round = false) + ///
+ ///
+ /// + /// + /// Shows a y-axis tag at the specified coordinate value. + /// + /// + public static unsafe void TagY(double y, in float4 col, bool round = false) + { + fixed (float4* col_fixed = &col) + { + PInvoke.TagY_0(y, col_fixed, round); + } + } + + /// + /// + /// C++: implot.h:960, + /// implot.cpp:3888
+ /// void TagY(double y, const ImVec4& col, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Shows a y-axis tag at the specified coordinate value. + /// + /// + public static unsafe void TagY(double y, in float4 col, ImString text) + { + fixed (byte* text_fixed = text) + { + fixed (float4* col_fixed = &col) + { + PInvoke.TagY_1(y, col_fixed, text_fixed); + } + } + } + + /// + /// + /// C++: implot.h:968, + /// implot.cpp:3652
+ /// void SetAxis(ImAxis axis) + ///
+ ///
+ /// + /// + /// Select which axis/axes will be used for subsequent plot elements. + /// + /// + public static unsafe void SetAxis(ImAxis axis) => PInvoke.SetAxis(axis); + + /// + /// + /// C++: implot.h:969, + /// implot.cpp:3664
+ /// void SetAxes(ImAxis x_axis, ImAxis y_axis) + ///
+ ///
+ /// + /// + /// Select which axis/axes will be used for subsequent plot elements. + /// + /// + public static unsafe void SetAxes(ImAxis xAxis, ImAxis yAxis) => PInvoke.SetAxes(xAxis, yAxis); + + /// + /// + /// C++: implot.h:972, + /// implot.cpp:3688
+ /// ImPlotPoint PixelsToPlot(const ImVec2& pix, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert pixels to a position in the current plot's coordinate system. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + public static unsafe double2 PixelsToPlot( + in float2 pix, + ImAxis xAxis = (ImAxis)(-1), + ImAxis yAxis = (ImAxis)(-1) + ) + { + fixed (float2* pix_fixed = &pix) + { + return PInvoke.PixelsToPlot_0(pix_fixed, xAxis, yAxis); + } + } + + /// + /// + /// C++: implot.h:973, + /// implot.cpp:3676
+ /// ImPlotPoint PixelsToPlot(float x, float y, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert pixels to a position in the current plot's coordinate system. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + public static unsafe double2 PixelsToPlot( + float x, + float y, + ImAxis xAxis = (ImAxis)(-1), + ImAxis yAxis = (ImAxis)(-1) + ) => PInvoke.PixelsToPlot_1(x, y, xAxis, yAxis); + + /// + /// + /// C++: implot.h:976, + /// implot.cpp:3704
+ /// ImVec2 PlotToPixels(const ImPlotPoint& plt, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert a position in the current plot's coordinate system to pixels. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + public static unsafe float2 PlotToPixels( + in double2 plt, + ImAxis xAxis = (ImAxis)(-1), + ImAxis yAxis = (ImAxis)(-1) + ) + { + fixed (double2* plt_fixed = &plt) + { + return PInvoke.PlotToPixels_0(plt_fixed, xAxis, yAxis); + } + } + + /// + /// + /// C++: implot.h:977, + /// implot.cpp:3692
+ /// ImVec2 PlotToPixels(double x, double y, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert a position in the current plot's coordinate system to pixels. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + public static unsafe float2 PlotToPixels( + double x, + double y, + ImAxis xAxis = (ImAxis)(-1), + ImAxis yAxis = (ImAxis)(-1) + ) => PInvoke.PlotToPixels_1(x, y, xAxis, yAxis); + + /// + /// + /// C++: implot.h:980, + /// implot.cpp:3708
+ /// ImVec2 GetPlotPos() + ///
+ ///
+ /// + /// + /// Get the current Plot position (top-left) in pixels. + /// + /// + public static unsafe float2 GetPlotPos() => PInvoke.GetPlotPos(); + + /// + /// + /// C++: implot.h:982, + /// implot.cpp:3715
+ /// ImVec2 GetPlotSize() + ///
+ ///
+ /// + /// + /// Get the curent Plot size in pixels. + /// + /// + public static unsafe float2 GetPlotSize() => PInvoke.GetPlotSize(); + + /// + /// + /// C++: implot.h:985, + /// implot.cpp:3722
+ /// ImPlotPoint GetPlotMousePos(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the mouse position in x,y coordinates of the current plot. Passing IMPLOT_AUTO uses the current + /// axes. + /// + /// + public static unsafe double2 GetPlotMousePos(ImAxis xAxis = (ImAxis)(-1), ImAxis yAxis = (ImAxis)(-1)) => + PInvoke.GetPlotMousePos(xAxis, yAxis); + + /// + /// + /// C++: implot.h:987, + /// implot.cpp:3728
+ /// ImPlotRect GetPlotLimits(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the current plot axis range. + /// + /// + public static unsafe ImPlotRect GetPlotLimits(ImAxis xAxis = (ImAxis)(-1), ImAxis yAxis = (ImAxis)(-1)) => + PInvoke.GetPlotLimits(xAxis, yAxis); + + /// + /// + /// C++: implot.h:990, + /// implot.cpp:3743
+ /// bool IsPlotHovered() + ///
+ ///
+ /// + /// + /// Returns true if the plot area in the current plot is hovered. + /// + /// + public static unsafe bool IsPlotHovered() => PInvoke.IsPlotHovered(); + + /// + /// + /// C++: implot.h:992, + /// implot.cpp:3750
+ /// bool IsAxisHovered(ImAxis axis) + ///
+ ///
+ /// + /// + /// Returns true if the axis label area in the current plot is hovered. + /// + /// + public static unsafe bool IsAxisHovered(ImAxis axis) => PInvoke.IsAxisHovered(axis); + + /// + /// + /// C++: implot.h:994, + /// implot.cpp:3757
+ /// bool IsSubplotsHovered() + ///
+ ///
+ /// + /// + /// Returns true if the bounding frame of a subplot is hovered. + /// + /// + public static unsafe bool IsSubplotsHovered() => PInvoke.IsSubplotsHovered(); + + /// + /// + /// C++: implot.h:997, + /// implot.cpp:3763
+ /// bool IsPlotSelected() + ///
+ ///
+ /// + /// + /// Returns true if the current plot is being box selected. + /// + /// + public static unsafe bool IsPlotSelected() => PInvoke.IsPlotSelected(); + + /// + /// + /// C++: implot.h:999, + /// implot.cpp:3770
+ /// ImPlotRect GetPlotSelection(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the current plot box selection bounds. Passing IMPLOT_AUTO uses the current axes. + /// + /// + public static unsafe ImPlotRect GetPlotSelection(ImAxis xAxis = (ImAxis)(-1), ImAxis yAxis = (ImAxis)(-1)) => + PInvoke.GetPlotSelection(xAxis, yAxis); + + /// + /// + /// C++: implot.h:1001, + /// implot.cpp:3787
+ /// void CancelPlotSelection() + ///
+ ///
+ /// + /// + /// Cancels a the current plot box selection. + /// + /// + public static unsafe void CancelPlotSelection() => PInvoke.CancelPlotSelection(); + + /// + /// + /// C++: implot.h:1005, + /// implot.cpp:3796
+ /// void HideNextItem(bool hidden = true, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Hides or shows the next plot item (i.e. as if it were toggled from the legend). + /// Use ImPlotCond_Always if you need to forcefully set this every frame. + /// + /// + public static unsafe void HideNextItem(bool hidden = true, ImPlotCond cond = (ImPlotCond)2) => + PInvoke.HideNextItem(hidden, cond); + + /// + /// + /// C++: implot.h:1014, + /// implot.cpp:4353
+ /// bool BeginAlignedPlots(const char* group_id, bool vertical = true) + ///
+ ///
+ /// + /// + /// Align axis padding over multiple plots in a single row or column. #group_id must + /// be unique. If this function returns true, EndAlignedPlots() must be called. + /// + /// + public static unsafe bool BeginAlignedPlots(ImString groupId, bool vertical = true) + { + fixed (byte* groupId_fixed = groupId) + { + return PInvoke.BeginAlignedPlots(groupId_fixed, vertical); + } + } + + /// + /// + /// C++: implot.h:1016, + /// implot.cpp:4374
+ /// void EndAlignedPlots() + ///
+ ///
+ /// + /// + /// Only call EndAlignedPlots() if BeginAlignedPlots() returns true! + /// + /// + public static unsafe void EndAlignedPlots() => PInvoke.EndAlignedPlots(); + + /// + /// + /// C++: implot.h:1023, + /// implot.cpp:4225
+ /// bool BeginLegendPopup(const char* label_id, ImGuiMouseButton mouse_button=1) + ///
+ ///
+ /// + /// + /// Begin a popup for a legend entry. + /// + /// + public static unsafe bool BeginLegendPopup(ImString labelId, ImGuiMouseButton mouseButton = (ImGuiMouseButton)1) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.BeginLegendPopup(labelId_fixed, mouseButton); + } + } + + /// + /// + /// C++: implot.h:1025, + /// implot.cpp:4241
+ /// void EndLegendPopup() + ///
+ ///
+ /// + /// + /// End a popup for a legend entry. + /// + /// + public static unsafe void EndLegendPopup() => PInvoke.EndLegendPopup(); + + /// + /// + /// C++: implot.h:1027, + /// implot.cpp:4216
+ /// bool IsLegendEntryHovered(const char* label_id) + ///
+ ///
+ /// + /// + /// Returns true if a plot item legend entry is hovered. + /// + /// + public static unsafe bool IsLegendEntryHovered(ImString labelId) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.IsLegendEntryHovered(labelId_fixed); + } + } + + /// + /// + /// C++: implot.h:1034, + /// implot.cpp:4286
+ /// bool BeginDragDropTargetPlot() + ///
+ ///
+ /// + /// + /// Turns the current plot's plotting area into a drag and drop target. Don't forget to call + /// EndDragDropTarget! + /// + /// + public static unsafe bool BeginDragDropTargetPlot() => PInvoke.BeginDragDropTargetPlot(); + + /// + /// + /// C++: implot.h:1036, + /// implot.cpp:4293
+ /// bool BeginDragDropTargetAxis(ImAxis axis) + ///
+ ///
+ /// + /// + /// Turns the current plot's X-axis into a drag and drop target. Don't forget to call EndDragDropTarget! + /// + /// + public static unsafe bool BeginDragDropTargetAxis(ImAxis axis) => PInvoke.BeginDragDropTargetAxis(axis); + + /// + /// + /// C++: implot.h:1038, + /// implot.cpp:4302
+ /// bool BeginDragDropTargetLegend() + ///
+ ///
+ /// + /// + /// Turns the current plot's legend into a drag and drop target. Don't forget to call EndDragDropTarget! + /// + /// + public static unsafe bool BeginDragDropTargetLegend() => PInvoke.BeginDragDropTargetLegend(); + + /// + /// + /// C++: implot.h:1040, + /// implot.cpp:4309
+ /// void EndDragDropTarget() + ///
+ ///
+ /// + /// + /// Ends a drag and drop target (currently just an alias for ImGui::EndDragDropTarget). + /// + /// + public static unsafe void EndDragDropTarget() => PInvoke.EndDragDropTarget(); + + /// + /// + /// C++: implot.h:1046, + /// implot.cpp:4314
+ /// bool BeginDragDropSourcePlot(ImGuiDragDropFlags flags=0) + ///
+ ///
+ /// + /// + /// Turns the current plot's plotting area into a drag and drop source. You must hold Ctrl. Don't forget to + /// call EndDragDropSource! + /// + /// + public static unsafe bool BeginDragDropSourcePlot(ImGuiDragDropFlags flags = default) => + PInvoke.BeginDragDropSourcePlot(flags); + + /// + /// + /// C++: implot.h:1048, + /// implot.cpp:4323
+ /// bool BeginDragDropSourceAxis(ImAxis axis, ImGuiDragDropFlags flags=0) + ///
+ ///
+ /// + /// + /// Turns the current plot's X-axis into a drag and drop source. You must hold Ctrl. Don't forget to call + /// EndDragDropSource! + /// + /// + public static unsafe bool BeginDragDropSourceAxis(ImAxis axis, ImGuiDragDropFlags flags = default) => + PInvoke.BeginDragDropSourceAxis(axis, flags); + + /// + /// + /// C++: implot.h:1050, + /// implot.cpp:4332
+ /// bool BeginDragDropSourceItem(const char* label_id, ImGuiDragDropFlags flags=0) + ///
+ ///
+ /// + /// + /// Turns an item in the current plot's legend into drag and drop source. Don't forget to call + /// EndDragDropSource! + /// + /// + public static unsafe bool BeginDragDropSourceItem(ImString labelId, ImGuiDragDropFlags flags = default) + { + fixed (byte* labelId_fixed = labelId) + { + return PInvoke.BeginDragDropSourceItem(labelId_fixed, flags); + } + } + + /// + /// + /// C++: implot.h:1052, + /// implot.cpp:4344
+ /// void EndDragDropSource() + ///
+ ///
+ /// + /// + /// Ends a drag and drop source (currently just an alias for ImGui::EndDragDropSource). + /// + /// + public static unsafe void EndDragDropSource() => PInvoke.EndDragDropSource(); + + /// + /// + /// C++: implot.h:1088, + /// implot.cpp:4388
+ /// ImPlotStyle& GetStyle() + ///
+ ///
+ /// + /// + /// Provides access to plot style structure for permanant modifications to colors, sizes, etc. + /// + /// + public static unsafe ImPlotStylePtr GetStyle() => PInvoke.GetStyle(); + + /// + /// + /// C++: implot.h:1091, + /// implot.cpp:5759
+ /// void StyleColorsAuto(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for current ImGui style (default). + /// + /// + public static unsafe void StyleColorsAuto(ImPlotStylePtr dst = default) => PInvoke.StyleColorsAuto(dst); + + /// + /// + /// C++: implot.h:1093, + /// implot.cpp:5789
+ /// void StyleColorsClassic(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for ImGui "Classic". + /// + /// + public static unsafe void StyleColorsClassic(ImPlotStylePtr dst = default) => PInvoke.StyleColorsClassic(dst); + + /// + /// + /// C++: implot.h:1095, + /// implot.cpp:5818
+ /// void StyleColorsDark(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for ImGui "Dark". + /// + /// + public static unsafe void StyleColorsDark(ImPlotStylePtr dst = default) => PInvoke.StyleColorsDark(dst); + + /// + /// + /// C++: implot.h:1097, + /// implot.cpp:5847
+ /// void StyleColorsLight(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for ImGui "Light". + /// + /// + public static unsafe void StyleColorsLight(ImPlotStylePtr dst = default) => PInvoke.StyleColorsLight(dst); + + /// + /// + /// C++: implot.h:1104, + /// implot.cpp:4394
+ /// void PushStyleColor(ImPlotCol idx, ImU32 col) + ///
+ ///
+ /// + /// + /// Temporarily modify a style color. Don't forget to call PopStyleColor! + /// + /// + public static unsafe void PushStyleColor(ImPlotCol idx, ImColor8 col) => PInvoke.PushStyleColor_0(idx, col); + + /// + /// + /// C++: implot.h:1105, + /// implot.cpp:4403
+ /// void PushStyleColor(ImPlotCol idx, const ImVec4& col) + ///
+ ///
+ /// + /// + /// Temporarily modify a style color. Don't forget to call PopStyleColor! + /// + /// + public static unsafe void PushStyleColor(ImPlotCol idx, in float4 col) + { + fixed (float4* col_fixed = &col) + { + PInvoke.PushStyleColor_1(idx, col_fixed); + } + } + + /// + /// + /// C++: implot.h:1107, + /// implot.cpp:4412
+ /// void PopStyleColor(int count = 1) + ///
+ ///
+ /// + /// + /// Undo temporary style color modification(s). Undo multiple pushes at once by increasing count. + /// + /// + public static unsafe void PopStyleColor(int count = 1) => PInvoke.PopStyleColor(count); + + /// + /// + /// C++: implot.h:1110, + /// implot.cpp:4424
+ /// void PushStyleVar(ImPlotStyleVar idx, float val) + ///
+ ///
+ /// + /// + /// Temporarily modify a style variable of float type. Don't forget to call PopStyleVar! + /// + /// + public static unsafe void PushStyleVar(ImPlotStyleVar idx, float val) => PInvoke.PushStyleVar_0(idx, val); + + /// + /// + /// C++: implot.h:1112, + /// implot.cpp:4436
+ /// void PushStyleVar(ImPlotStyleVar idx, int val) + ///
+ ///
+ /// + /// + /// Temporarily modify a style variable of int type. Don't forget to call PopStyleVar! + /// + /// + public static unsafe void PushStyleVar(ImPlotStyleVar idx, int val) => PInvoke.PushStyleVar_1(idx, val); + + /// + /// + /// C++: implot.h:1114, + /// implot.cpp:4454
+ /// void PushStyleVar(ImPlotStyleVar idx, const ImVec2& val) + ///
+ ///
+ /// + /// + /// Temporarily modify a style variable of ImVec2 type. Don't forget to call PopStyleVar! + /// + /// + public static unsafe void PushStyleVar(ImPlotStyleVar idx, in float2 val) + { + fixed (float2* val_fixed = &val) + { + PInvoke.PushStyleVar_2(idx, val_fixed); + } + } + + /// + /// + /// C++: implot.h:1116, + /// implot.cpp:4468
+ /// void PopStyleVar(int count = 1) + ///
+ ///
+ /// + /// + /// Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count. + /// + /// + public static unsafe void PopStyleVar(int count = 1) => PInvoke.PopStyleVar(count); + + /// + /// + /// C++: implot.h:1124, + /// implot_items.cpp:325 + ///
void SetNextLineStyle(const ImVec4& col = IMPLOT_AUTO_COL, float weight = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Set the line color and weight for the next item only. + /// + /// + public static unsafe void SetNextLineStyle(in float4? col = default, float weight = -1f) + { + var col_default = col ?? new float4(0f, 0f, 0f, -1f); + PInvoke.SetNextLineStyle(&col_default, weight); + } + + /// + /// + /// C++: implot.h:1126, + /// implot_items.cpp:331 + ///
+ /// void SetNextFillStyle(const ImVec4& col = IMPLOT_AUTO_COL, float alpha_mod = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Set the fill color for the next item only. + /// + /// + public static unsafe void SetNextFillStyle(in float4? col = default, float alphaMod = -1f) + { + var col_default = col ?? new float4(0f, 0f, 0f, -1f); + PInvoke.SetNextFillStyle(&col_default, alphaMod); + } + + /// + /// + /// C++: implot.h:1128, + /// implot_items.cpp:337 + ///
+ /// void SetNextMarkerStyle(ImPlotMarker marker = IMPLOT_AUTO, float size = IMPLOT_AUTO, const ImVec4& fill = IMPLOT_AUTO_COL, float weight = IMPLOT_AUTO, const ImVec4& outline = IMPLOT_AUTO_COL) + ///
+ ///
+ /// + /// + /// Set the marker style for the next item only. + /// + /// + public static unsafe void SetNextMarkerStyle( + ImPlotMarker marker = (ImPlotMarker)(-1), + float size = -1f, + in float4? fill = default, + float weight = -1f, + in float4? outline = default + ) + { + var fill_default = fill ?? new float4(0f, 0f, 0f, -1f); + var outline_default = outline ?? new float4(0f, 0f, 0f, -1f); + PInvoke.SetNextMarkerStyle(marker, size, &fill_default, weight, &outline_default); + } + + /// + /// + /// C++: implot.h:1130, + /// implot_items.cpp:346 + ///
+ /// void SetNextErrorBarStyle(const ImVec4& col = IMPLOT_AUTO_COL, float size = IMPLOT_AUTO, float weight = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Set the error bar style for the next item only. + /// + /// + public static unsafe void SetNextErrorBarStyle(in float4? col = default, float size = -1f, float weight = -1f) + { + var col_default = col ?? new float4(0f, 0f, 0f, -1f); + PInvoke.SetNextErrorBarStyle(&col_default, size, weight); + } + + /// + /// + /// C++: implot.h:1133, + /// implot_items.cpp:353 + ///
ImVec4 GetLastItemColor() + ///
+ ///
+ /// + /// + /// Gets the last item primary color (i.e. its legend icon color) + /// + /// + public static unsafe float4 GetLastItemColor() => PInvoke.GetLastItemColor(); + + /// + /// + /// C++: implot.h:1136, + /// implot.cpp:218
+ /// const char* GetStyleColorName(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the null terminated string name for an ImPlotCol. + /// + /// + public static unsafe ImString GetStyleColorName(ImPlotCol idx) => + Utf8.GetNullTerminatedSpan(PInvoke.GetStyleColorName(idx)); + + /// + /// + /// C++: implot.h:1138, + /// implot.cpp:245
+ /// const char* GetMarkerName(ImPlotMarker idx) + ///
+ ///
+ /// + /// + /// Returns the null terminated string name for an ImPlotMarker. + /// + /// + public static unsafe Ptr GetMarkerName(ImPlotMarker idx) => PInvoke.GetMarkerName(idx); + + /// + /// + /// C++: implot.h:1159, + /// implot.cpp:4494
+ /// ImPlotColormap AddColormap(const char* name, const ImVec4* cols, int size, bool qual=true) + ///
+ ///
+ /// + /// + /// Add a new colormap. The color data will be copied. The colormap can be used by pushing either the returned index or the + /// string name with PushColormap. The colormap name must be unique and the size must be greater than 1. You will receive + /// an assert otherwise! By default colormaps are considered to be qualitative (i.e. discrete). If you want to create a + /// continuous colormap, set #qual=false. This will treat the colors you provide as keys, and ImPlot will build a linearly + /// interpolated lookup table. The memory footprint of this table will be exactly ((size-1)*255+1)*4 bytes. + /// + /// + public static unsafe ImPlotColormap AddColormap(ImString name, ReadOnlySpan cols, bool qual = true) + { + fixed (float4* cols_fixed = cols) + { + fixed (byte* name_fixed = name) + { + return PInvoke.AddColormap_0(name_fixed, cols_fixed, cols.Length, qual); + } + } + } + + /// + /// + /// C++: implot.h:1160, + /// implot.cpp:4505
+ /// ImPlotColormap AddColormap(const char* name, const ImU32* cols, int size, bool qual=true) + ///
+ ///
+ /// + /// + /// Add a new colormap. The color data will be copied. The colormap can be used by pushing either the returned index or the + /// string name with PushColormap. The colormap name must be unique and the size must be greater than 1. You will receive + /// an assert otherwise! By default colormaps are considered to be qualitative (i.e. discrete). If you want to create a + /// continuous colormap, set #qual=false. This will treat the colors you provide as keys, and ImPlot will build a linearly + /// interpolated lookup table. The memory footprint of this table will be exactly ((size-1)*255+1)*4 bytes. + /// + /// + public static unsafe ImPlotColormap AddColormap(ImString name, ReadOnlySpan cols, bool qual = true) + { + fixed (uint* cols_fixed = cols) + { + fixed (byte* name_fixed = name) + { + return PInvoke.AddColormap_1(name_fixed, cols_fixed, cols.Length, qual); + } + } + } + + /// + /// + /// C++: implot.h:1163, + /// implot.cpp:4512
+ /// int GetColormapCount() + ///
+ ///
+ /// + /// + /// Returns the number of available colormaps (i.e. the built-in + user-added count). + /// + /// + public static unsafe int GetColormapCount() => PInvoke.GetColormapCount(); + + /// + /// + /// C++: implot.h:1165, + /// implot.cpp:4517
+ /// const char* GetColormapName(ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Returns a null terminated string name for a colormap given an index. Returns nullptr if index is + /// invalid. + /// + /// + public static unsafe ImString GetColormapName(ImPlotColormap cmap) => + Utf8.GetNullTerminatedSpan(PInvoke.GetColormapName(cmap)); + + /// + /// + /// C++: implot.h:1167, + /// implot.cpp:4522
+ /// ImPlotColormap GetColormapIndex(const char* name) + ///
+ ///
+ /// + /// + /// Returns an index number for a colormap given a valid string name. Returns -1 if name is invalid. + /// + /// + public static unsafe ImPlotColormap GetColormapIndex(ImString name) + { + fixed (byte* name_fixed = name) + { + return PInvoke.GetColormapIndex(name_fixed); + } + } + + /// + /// + /// C++: implot.h:1170, + /// implot.cpp:4527
+ /// void PushColormap(ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Temporarily switch to one of the built-in (i.e. ImPlotColormap_XXX) or user-added colormaps (i.e. a + /// return value of AddColormap). Don't forget to call PopColormap! + /// + /// + public static unsafe void PushColormap(ImPlotColormap cmap) => PInvoke.PushColormap_0(cmap); + + /// + /// + /// C++: implot.h:1172, + /// implot.cpp:4534
+ /// void PushColormap(const char* name) + ///
+ ///
+ /// + /// + /// Push a colormap by string name. Use built-in names such as "Default", "Deep", "Jet", etc. or a string + /// you provided to AddColormap. Don't forget to call PopColormap! + /// + /// + public static unsafe void PushColormap(ImString name) + { + fixed (byte* name_fixed = name) + { + PInvoke.PushColormap_1(name_fixed); + } + } + + /// + /// + /// C++: implot.h:1174, + /// implot.cpp:4541
+ /// void PopColormap(int count = 1) + ///
+ ///
+ /// + /// + /// Undo temporary colormap modification(s). Undo multiple pushes at once by increasing count. + /// + /// + public static unsafe void PopColormap(int count = 1) => PInvoke.PopColormap(count); + + /// + /// + /// C++: implot.h:1178, + /// implot.cpp:4561
+ /// ImVec4 NextColormapColor() + ///
+ ///
+ /// + /// + /// Returns the next color from the current colormap and advances the colormap for the current plot. + /// Can also be used with no return value to skip colors if desired. You need to call this between Begin/EndPlot! + /// + /// + public static unsafe float4 NextColormapColor() => PInvoke.NextColormapColor(); + + /// + /// + /// C++: implot.h:1184, + /// implot.cpp:4565
+ /// int GetColormapSize(ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the size of a colormap. + /// + /// + public static unsafe int GetColormapSize(ImPlotColormap cmap = (ImPlotColormap)(-1)) => + PInvoke.GetColormapSize(cmap); + + /// + /// + /// C++: implot.h:1186, + /// implot.cpp:4580
+ /// ImVec4 GetColormapColor(int idx, ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns a color from a colormap given an index >= 0 (modulo will be performed). + /// + /// + public static unsafe float4 GetColormapColor(int idx, ImPlotColormap cmap = (ImPlotColormap)(-1)) => + PInvoke.GetColormapColor(idx, cmap); + + /// + /// + /// C++: implot.h:1188, + /// implot.cpp:4591
+ /// ImVec4 SampleColormap(float t, ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Sample a color from the current colormap given t between 0 and 1. + /// + /// + public static unsafe float4 SampleColormap(float t, ImPlotColormap cmap = (ImPlotColormap)(-1)) => + PInvoke.SampleColormap(t, cmap); + + /// + /// + /// C++: implot.h:1191, + /// implot.cpp:4632
+ /// void ColormapScale(const char* label, double scale_min, double scale_max, const ImVec2& size = ImVec2(0,0), const char* format = "%g", ImPlotColormapScaleFlags flags = 0, ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// Default value if unset: "%g" + /// + /// + /// Shows a vertical color scale with linear spaced ticks using the specified color map. Use double hashes + /// to hide label (e.g. "##NoLabel"). If scale_min > scale_max, the scale to color mapping will be + /// reversed. + /// + /// + public static unsafe void ColormapScale( + ImString label, + double scaleMin, + double scaleMax, + in float2? size = default, + [System.ComponentModel.DefaultValue("%g")] ImString format = default, + ImPlotColormapScaleFlags flags = default, + ImPlotColormap cmap = (ImPlotColormap)(-1) + ) + { + var size_default = size ?? new float2(0f, 0f); + if (format.IsUnset) + { + format = "%g"u8; + } + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + PInvoke.ColormapScale(label_fixed, scaleMin, scaleMax, &size_default, format_fixed, flags, cmap); + } + } + } + + /// + /// + /// C++: implot.h:1193, + /// implot.cpp:4721
+ /// bool ColormapSlider(const char* label, float* t, ImVec4* out = nullptr, const char* format = "", ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Shows a horizontal slider with a colormap gradient background. Optionally returns the color sampled at t + /// in [0 1]. + /// + /// + public static unsafe bool ColormapSlider( + ImString label, + Ptr t, + Ptr @out = default, + ImString format = default, + ImPlotColormap cmap = (ImPlotColormap)(-1) + ) + { + fixed (byte* format_fixed = format) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ColormapSlider(label_fixed, (float*)t, (float4*)@out, format_fixed, cmap); + } + } + } + + /// + /// + /// C++: implot.h:1195, + /// implot.cpp:4755
+ /// bool ColormapButton(const char* label, const ImVec2& size = ImVec2(0,0), ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Shows a button with a colormap gradient brackground. + /// + /// + public static unsafe bool ColormapButton( + ImString label, + in float2? size = default, + ImPlotColormap cmap = (ImPlotColormap)(-1) + ) + { + var size_default = size ?? new float2(0f, 0f); + fixed (byte* label_fixed = label) + { + return PInvoke.ColormapButton(label_fixed, &size_default, cmap); + } + } + + /// + /// + /// C++: implot.h:1204, + /// implot_items.cpp:372 + ///
void BustColorCache(const char* plot_title_id = nullptr) + ///
+ ///
+ /// + /// + /// When items in a plot sample their color from a colormap, the color is cached and does not change + /// unless explicitly overriden. Therefore, if you change the colormap after the item has already been plotted, + /// item colors will NOT update. If you need item colors to resample the new colormap, then use this + /// function to bust the cached colors. If #plot_title_id is nullptr, then every item in EVERY existing plot + /// will be cache busted. Otherwise only the plot specified by #plot_title_id will be busted. For the + /// latter, this function must be called in the same ImGui ID scope that the plot is in. You should rarely if ever + /// need this function, but it is available for applications that require runtime colormap swaps (e.g. Heatmaps demo). + /// + /// + public static unsafe void BustColorCache(ImString plotTitleId = default) + { + fixed (byte* plotTitleId_fixed = plotTitleId) + { + PInvoke.BustColorCache(plotTitleId_fixed); + } + } + + /// + /// + /// C++: implot.h:1211, + /// implot.cpp:4788
+ /// ImPlotInputMap& GetInputMap() + ///
+ ///
+ /// + /// + /// Provides access to input mapping structure for permanant modifications to controls for pan, select, etc. + /// + /// + public static unsafe ImPlotInputMapPtr GetInputMap() => PInvoke.GetInputMap(); + + /// + /// + /// C++: implot.h:1214, + /// implot.cpp:4794
+ /// void MapInputDefault(ImPlotInputMap* dst = nullptr) + ///
+ ///
+ /// + /// + /// Default input mapping: pan = LMB drag, box select = RMB drag, fit = LMB double click, context menu = RMB + /// click, zoom = scroll. + /// + /// + public static unsafe void MapInputDefault(ImPlotInputMapPtr dst = default) => PInvoke.MapInputDefault(dst); + + /// + /// + /// C++: implot.h:1216, + /// implot.cpp:4810
+ /// void MapInputReverse(ImPlotInputMap* dst = nullptr) + ///
+ ///
+ /// + /// + /// Reverse input mapping: pan = RMB drag, box select = LMB drag, fit = LMB double click, context menu = RMB + /// click, zoom = scroll. + /// + /// + public static unsafe void MapInputReverse(ImPlotInputMapPtr dst = default) => PInvoke.MapInputReverse(dst); + + /// + /// + /// C++: implot.h:1223, + /// implot.cpp:4830
+ /// void ItemIcon(const ImVec4& col) + ///
+ ///
+ /// + /// + /// Render icons similar to those that appear in legends (nifty for data lists). + /// + /// + public static unsafe void ItemIcon(in float4 col) + { + fixed (float4* col_fixed = &col) + { + PInvoke.ItemIcon_0(col_fixed); + } + } + + /// + /// + /// C++: implot.h:1224, + /// implot.cpp:4834
+ /// void ItemIcon(ImU32 col) + ///
+ ///
+ /// + /// + /// Render icons similar to those that appear in legends (nifty for data lists). + /// + /// + public static unsafe void ItemIcon(ImColor8 col) => PInvoke.ItemIcon_1(col); + + /// + /// + /// C++: implot.h:1225, + /// implot.cpp:4843
+ /// void ColormapIcon(ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Render icons similar to those that appear in legends (nifty for data lists). + /// + /// + public static unsafe void ColormapIcon(ImPlotColormap cmap) => PInvoke.ColormapIcon(cmap); + + /// + /// + /// C++: implot.h:1228, + /// implot.cpp:4855
+ /// ImDrawList* GetPlotDrawList() + ///
+ ///
+ /// + /// + /// Get the plot draw list for custom rendering to the current plot area. Call between Begin/EndPlot. + /// + /// + public static unsafe ImDrawListPtr GetPlotDrawList() => PInvoke.GetPlotDrawList(); + + /// + /// + /// C++: implot.h:1230, + /// implot.cpp:4859
+ /// void PushPlotClipRect(float expand=0) + ///
+ ///
+ /// + /// + /// Push clip rect for rendering to current plot area. The rect can be expanded or contracted by #expand + /// pixels. Call between Begin/EndPlot. + /// + /// + public static unsafe void PushPlotClipRect(float expand = 0f) => PInvoke.PushPlotClipRect(expand); + + /// + /// + /// C++: implot.h:1232, + /// implot.cpp:4868
+ /// void PopPlotClipRect() + ///
+ ///
+ /// + /// + /// Pop plot clip rect. Call between Begin/EndPlot. + /// + /// + public static unsafe void PopPlotClipRect() => PInvoke.PopPlotClipRect(); + + /// + /// + /// C++: implot.h:1235, + /// implot.cpp:4884
+ /// bool ShowStyleSelector(const char* label) + ///
+ ///
+ /// + /// + /// Shows ImPlot style selector dropdown menu. + /// + /// + public static unsafe bool ShowStyleSelector(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ShowStyleSelector(label_fixed); + } + } + + /// + /// + /// C++: implot.h:1237, + /// implot.cpp:4901
+ /// bool ShowColormapSelector(const char* label) + ///
+ ///
+ /// + /// + /// Shows ImPlot colormap selector dropdown menu. + /// + /// + public static unsafe bool ShowColormapSelector(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ShowColormapSelector(label_fixed); + } + } + + /// + /// + /// C++: implot.h:1239, + /// implot.cpp:4918
+ /// bool ShowInputMapSelector(const char* label) + ///
+ ///
+ /// + /// + /// Shows ImPlot input map selector dropdown menu. + /// + /// + public static unsafe bool ShowInputMapSelector(ImString label) + { + fixed (byte* label_fixed = label) + { + return PInvoke.ShowInputMapSelector(label_fixed); + } + } + + /// + /// + /// C++: implot.h:1241, + /// implot.cpp:4933
+ /// void ShowStyleEditor(ImPlotStyle* ref = nullptr) + ///
+ ///
+ /// + /// + /// Shows ImPlot style editor block (not a window). + /// + /// + public static unsafe void ShowStyleEditor(ImPlotStylePtr @ref = default) => PInvoke.ShowStyleEditor(@ref); + + /// + /// + /// C++: implot.h:1243, + /// implot.cpp:5183
+ /// void ShowUserGuide() + ///
+ ///
+ /// + /// + /// Add basic help/info block for end users (not a window). + /// + /// + public static unsafe void ShowUserGuide() => PInvoke.ShowUserGuide(); + + /// + /// + /// C++: implot.h:1245, + /// implot.cpp:5241
+ /// void ShowMetricsWindow(bool* p_popen = nullptr) + ///
+ ///
+ /// + /// + /// Shows ImPlot metrics/debug information window. + /// + /// + public static unsafe void ShowMetricsWindow(ref bool pPopen) + { + fixed (bool* pPopen_fixed = &pPopen) + { + PInvoke.ShowMetricsWindow((Bool8*)pPopen_fixed); + } + } + + /// + /// + /// C++: implot.h:1245, + /// implot.cpp:5241
+ /// void ShowMetricsWindow(bool* p_popen = nullptr) + ///
+ ///
+ /// + /// + /// Shows ImPlot metrics/debug information window. + /// + /// + public static unsafe void ShowMetricsWindow() => PInvoke.ShowMetricsWindow(null); + + /// + /// + /// C++: implot.h:1252, + /// implot_demo.cpp:2181 + ///
void ShowDemoWindow(bool* p_open = nullptr) + ///
+ ///
+ /// + /// + /// Shows the ImPlot demo window (add implot_demo.cpp to your sources!) + /// + /// + public static unsafe void ShowDemoWindow(ref bool pOpen) + { + fixed (bool* pOpen_fixed = &pOpen) + { + PInvoke.ShowDemoWindow((Bool8*)pOpen_fixed); + } + } + + /// + /// + /// C++: implot.h:1252, + /// implot_demo.cpp:2181 + ///
void ShowDemoWindow(bool* p_open = nullptr) + ///
+ ///
+ /// + /// + /// Shows the ImPlot demo window (add implot_demo.cpp to your sources!) + /// + /// + public static unsafe void ShowDemoWindow() => PInvoke.ShowDemoWindow(null); + } +} diff --git a/Brutal.ImPlot/Generated/Functions/ImPlotRange.gen.cs b/Brutal.ImPlot/Generated/Functions/ImPlotRange.gen.cs new file mode 100644 index 0000000..5d1ca54 --- /dev/null +++ b/Brutal.ImPlot/Generated/Functions/ImPlotRange.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public static partial class ImPlotRangeExtensions + { + /// + /// + /// C++: implot.h:489
+ /// bool Contains(double value) const + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + public static unsafe bool Contains(this ImPlotRangePtr target, double value) => + PInvoke.ImPlotRange_Contains(target, value); + + /// + /// + /// C++: implot.h:490
+ /// double Size() const + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + public static unsafe double Size(this ImPlotRangePtr target) => PInvoke.ImPlotRange_Size(target); + + /// + /// + /// C++: implot.h:491
+ /// double Clamp(double value) const + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + public static unsafe double Clamp(this ImPlotRangePtr target, double value) => + PInvoke.ImPlotRange_Clamp(target, value); + } +} diff --git a/Brutal.ImPlot/Generated/Functions/ImPlotRect.gen.cs b/Brutal.ImPlot/Generated/Functions/ImPlotRect.gen.cs new file mode 100644 index 0000000..032ff7d --- /dev/null +++ b/Brutal.ImPlot/Generated/Functions/ImPlotRect.gen.cs @@ -0,0 +1,114 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public static partial class ImPlotRectExtensions + { + /// + /// + /// C++: implot.h:499
+ /// bool Contains(const ImPlotPoint& p) const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe bool Contains(this ImPlotRectPtr target, in double2 p) + { + fixed (double2* p_fixed = &p) + { + return PInvoke.ImPlotRect_Contains_0(target, p_fixed); + } + } + + /// + /// + /// C++: implot.h:500
+ /// bool Contains(double x, double y) const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe bool Contains(this ImPlotRectPtr target, double x, double y) => + PInvoke.ImPlotRect_Contains_1(target, x, y); + + /// + /// + /// C++: implot.h:501
+ /// ImPlotPoint Size() const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe double2 Size(this ImPlotRectPtr target) => PInvoke.ImPlotRect_Size(target); + + /// + /// + /// C++: implot.h:502
+ /// ImPlotPoint Clamp(const ImPlotPoint& p) + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe double2 Clamp(this ImPlotRectPtr target, in double2 p) + { + fixed (double2* p_fixed = &p) + { + return PInvoke.ImPlotRect_Clamp_0(target, p_fixed); + } + } + + /// + /// + /// C++: implot.h:503
+ /// ImPlotPoint Clamp(double x, double y) + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe double2 Clamp(this ImPlotRectPtr target, double x, double y) => + PInvoke.ImPlotRect_Clamp_1(target, x, y); + + /// + /// + /// C++: implot.h:504
+ /// ImPlotPoint Min() const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe double2 Min(this ImPlotRectPtr target) => PInvoke.ImPlotRect_Min(target); + + /// + /// + /// C++: implot.h:505
+ /// ImPlotPoint Max() const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public static unsafe double2 Max(this ImPlotRectPtr target) => PInvoke.ImPlotRect_Max(target); + } +} diff --git a/Brutal.ImPlot/Generated/InlineArrays.gen.cs b/Brutal.ImPlot/Generated/InlineArrays.gen.cs new file mode 100644 index 0000000..b4652d3 --- /dev/null +++ b/Brutal.ImPlot/Generated/InlineArrays.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi.InlineArrays +{ + /// + /// Represents an inline array of float4 with a fixed size of 21. + /// + [InlineArray(21)] + public struct float4_21 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float4 Items; + } +} diff --git a/Brutal.ImPlot/Generated/Macros.gen.cs b/Brutal.ImPlot/Generated/Macros.gen.cs new file mode 100644 index 0000000..9a38558 --- /dev/null +++ b/Brutal.ImPlot/Generated/Macros.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public static partial class Constants + { + public const string IMPLOT_VERSION = "0.17"; + public const int IMPLOT_AUTO = -1; + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/AddColormap.gen.cs b/Brutal.ImPlot/Generated/PInvoke/AddColormap.gen.cs new file mode 100644 index 0000000..55daa16 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/AddColormap.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1159, + /// implot.cpp:4494 + ///
+ /// ImPlotColormap AddColormap(const char* name, const ImVec4* cols, int size, bool qual=true) + ///
+ ///
+ /// + /// + /// Add a new colormap. The color data will be copied. The colormap can be used by pushing either the returned index or the + /// string name with PushColormap. The colormap name must be unique and the size must be greater than 1. You will receive + /// an assert otherwise! By default colormaps are considered to be qualitative (i.e. discrete). If you want to create a + /// continuous colormap, set #qual=false. This will treat the colors you provide as keys, and ImPlot will build a linearly + /// interpolated lookup table. The memory footprint of this table will be exactly ((size-1)*255+1)*4 bytes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotColormap AddColormap_0(byte* name, float4* cols, int size, Bool8 qual); + + /// + /// + /// C++: implot.h:1160, + /// implot.cpp:4505 + ///
+ /// ImPlotColormap AddColormap(const char* name, const ImU32* cols, int size, bool qual=true) + ///
+ ///
+ /// + /// + /// Add a new colormap. The color data will be copied. The colormap can be used by pushing either the returned index or the + /// string name with PushColormap. The colormap name must be unique and the size must be greater than 1. You will receive + /// an assert otherwise! By default colormaps are considered to be qualitative (i.e. discrete). If you want to create a + /// continuous colormap, set #qual=false. This will treat the colors you provide as keys, and ImPlot will build a linearly + /// interpolated lookup table. The memory footprint of this table will be exactly ((size-1)*255+1)*4 bytes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotColormap AddColormap_1(byte* name, uint* cols, int size, Bool8 qual); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/Annotation.gen.cs b/Brutal.ImPlot/Generated/PInvoke/Annotation.gen.cs new file mode 100644 index 0000000..7a84cb3 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/Annotation.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:949, + /// implot.cpp:3807 + ///
+ /// void Annotation(double x, double y, const ImVec4& col, const ImVec2& pix_offset, bool clamp, bool round = false) + ///
+ ///
+ /// + /// + /// Shows an annotation callout at a chosen point. Clamping keeps annotations in the plot area. + /// Annotations are always rendered on top. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void Annotation_0( + double x, + double y, + float4* col, + float2* pix_offset, + Bool8 clamp, + Bool8 round + ); + + /// + /// + /// C++: implot.h:950, + /// implot.cpp:3830 + ///
+ /// void Annotation(double x, double y, const ImVec4& col, const ImVec2& pix_offset, bool clamp, const char* fmt, ...) IM_FMTARGS(6) + ///
+ ///
+ /// + /// + /// Shows an annotation callout at a chosen point. Clamping keeps annotations in the plot area. + /// Annotations are always rendered on top. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void Annotation_1( + double x, + double y, + float4* col, + float2* pix_offset, + Bool8 clamp, + byte* fmt + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginAlignedPlots.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginAlignedPlots.gen.cs new file mode 100644 index 0000000..5aa419d --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginAlignedPlots.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1014, + /// implot.cpp:4353 + ///
bool BeginAlignedPlots(const char* group_id, bool vertical = true) + ///
+ ///
+ /// + /// + /// Align axis padding over multiple plots in a single row or column. #group_id must + /// be unique. If this function returns true, EndAlignedPlots() must be called. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginAlignedPlots(byte* group_id, Bool8 vertical); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceAxis.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceAxis.gen.cs new file mode 100644 index 0000000..ac968e4 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceAxis.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1048, + /// implot.cpp:4323 + ///
bool BeginDragDropSourceAxis(ImAxis axis, ImGuiDragDropFlags flags=0) + ///
+ ///
+ /// + /// + /// Turns the current plot's X-axis into a drag and drop source. You must hold Ctrl. Don't forget to + /// call EndDragDropSource! + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginDragDropSourceAxis(ImAxis axis, ImGuiDragDropFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceItem.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceItem.gen.cs new file mode 100644 index 0000000..a05da18 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourceItem.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1050, + /// implot.cpp:4332 + ///
bool BeginDragDropSourceItem(const char* label_id, ImGuiDragDropFlags flags=0) + ///
+ ///
+ /// + /// + /// Turns an item in the current plot's legend into drag and drop source. Don't forget to call + /// EndDragDropSource! + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginDragDropSourceItem(byte* label_id, ImGuiDragDropFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourcePlot.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourcePlot.gen.cs new file mode 100644 index 0000000..63fcd1b --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropSourcePlot.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1046, + /// implot.cpp:4314 + ///
bool BeginDragDropSourcePlot(ImGuiDragDropFlags flags=0) + ///
+ ///
+ /// + /// + /// Turns the current plot's plotting area into a drag and drop source. You must hold Ctrl. Don't forget + /// to call EndDragDropSource! + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginDragDropSourcePlot(ImGuiDragDropFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetAxis.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetAxis.gen.cs new file mode 100644 index 0000000..d3a6249 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetAxis.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1036, + /// implot.cpp:4293 + ///
bool BeginDragDropTargetAxis(ImAxis axis) + ///
+ ///
+ /// + /// + /// Turns the current plot's X-axis into a drag and drop target. Don't forget to call EndDragDropTarget! + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginDragDropTargetAxis(ImAxis axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetLegend.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetLegend.gen.cs new file mode 100644 index 0000000..230e219 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetLegend.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1038, + /// implot.cpp:4302 + ///
bool BeginDragDropTargetLegend() + ///
+ ///
+ /// + /// + /// Turns the current plot's legend into a drag and drop target. Don't forget to call EndDragDropTarget! + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginDragDropTargetLegend(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetPlot.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetPlot.gen.cs new file mode 100644 index 0000000..712b122 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginDragDropTargetPlot.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1034, + /// implot.cpp:4286 + ///
bool BeginDragDropTargetPlot() + ///
+ ///
+ /// + /// + /// Turns the current plot's plotting area into a drag and drop target. Don't forget to call + /// EndDragDropTarget! + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginDragDropTargetPlot(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginLegendPopup.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginLegendPopup.gen.cs new file mode 100644 index 0000000..2a59574 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginLegendPopup.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1023, + /// implot.cpp:4225 + ///
bool BeginLegendPopup(const char* label_id, ImGuiMouseButton mouse_button=1) + ///
+ ///
+ /// + /// + /// Begin a popup for a legend entry. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginLegendPopup(byte* label_id, ImGuiMouseButton mouse_button); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginPlot.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginPlot.gen.cs new file mode 100644 index 0000000..71621b1 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginPlot.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:636, + /// implot.cpp:2372 + ///
+ /// bool BeginPlot(const char* title_id, const ImVec2& size=ImVec2(-1,0), ImPlotFlags flags=0) + ///
+ ///
+ /// + /// + /// - #title_id must be unique to the current ImGui ID scope. If you need to avoid ID + /// collisions or don't want to display a title in the plot, use double hashes + /// (e.g. "MyPlot##HiddenIdText" or "##NoTitle"). + /// - #size is the **frame** size of the plot widget, not the plot area. The default + /// size of plots (i.e. when ImVec2(0,0)) can be modified in your ImPlotStyle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 BeginPlot(byte* title_id, float2* size, ImPlotFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BeginSubplots.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BeginSubplots.gen.cs new file mode 100644 index 0000000..8f05bc0 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BeginSubplots.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:692, + /// implot.cpp:3341 + ///
bool BeginSubplots(const char* title_id, + ///
+ ///
+ [LibraryImport("implot")] + public static unsafe partial Bool8 BeginSubplots( + byte* title_id, + int rows, + int cols, + float2* size, + ImPlotSubplotFlags flags, + float* row_ratios, + float* col_ratios + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/BustColorCache.gen.cs b/Brutal.ImPlot/Generated/PInvoke/BustColorCache.gen.cs new file mode 100644 index 0000000..d8e1e13 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/BustColorCache.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1204, + /// implot_items.cpp:372 + ///
void BustColorCache(const char* plot_title_id = nullptr) + ///
+ ///
+ /// + /// + /// When items in a plot sample their color from a colormap, the color is cached and does not change + /// unless explicitly overriden. Therefore, if you change the colormap after the item has already been plotted, + /// item colors will NOT update. If you need item colors to resample the new colormap, then use this + /// function to bust the cached colors. If #plot_title_id is nullptr, then every item in EVERY existing plot + /// will be cache busted. Otherwise only the plot specified by #plot_title_id will be busted. For the + /// latter, this function must be called in the same ImGui ID scope that the plot is in. You should rarely if ever + /// need this function, but it is available for applications that require runtime colormap swaps (e.g. Heatmaps demo). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void BustColorCache(byte* plot_title_id); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/CancelPlotSelection.gen.cs b/Brutal.ImPlot/Generated/PInvoke/CancelPlotSelection.gen.cs new file mode 100644 index 0000000..2ee9495 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/CancelPlotSelection.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1001, + /// implot.cpp:3787 + ///
void CancelPlotSelection() + ///
+ ///
+ /// + /// + /// Cancels a the current plot box selection. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void CancelPlotSelection(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ColormapButton.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ColormapButton.gen.cs new file mode 100644 index 0000000..7bdb667 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ColormapButton.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1195, + /// implot.cpp:4755 + ///
+ /// bool ColormapButton(const char* label, const ImVec2& size = ImVec2(0,0), ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Shows a button with a colormap gradient brackground. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ColormapButton(byte* label, float2* size, ImPlotColormap cmap); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ColormapIcon.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ColormapIcon.gen.cs new file mode 100644 index 0000000..81ad8df --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ColormapIcon.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1225, + /// implot.cpp:4843 + ///
void ColormapIcon(ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Render icons similar to those that appear in legends (nifty for data lists). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ColormapIcon(ImPlotColormap cmap); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ColormapScale.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ColormapScale.gen.cs new file mode 100644 index 0000000..f85893d --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ColormapScale.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1191, + /// implot.cpp:4632 + ///
+ /// void ColormapScale(const char* label, double scale_min, double scale_max, const ImVec2& size = ImVec2(0,0), const char* format = "%g", ImPlotColormapScaleFlags flags = 0, ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Shows a vertical color scale with linear spaced ticks using the specified color map. Use double + /// hashes to hide label (e.g. "##NoLabel"). If scale_min > scale_max, the scale to color mapping + /// will be reversed. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ColormapScale( + byte* label, + double scale_min, + double scale_max, + float2* size, + byte* format, + ImPlotColormapScaleFlags flags, + ImPlotColormap cmap + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ColormapSlider.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ColormapSlider.gen.cs new file mode 100644 index 0000000..497585d --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ColormapSlider.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1193, + /// implot.cpp:4721 + ///
+ /// bool ColormapSlider(const char* label, float* t, ImVec4* out = nullptr, const char* format = "", ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Shows a horizontal slider with a colormap gradient background. Optionally returns the color sampled + /// at t in [0 1]. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ColormapSlider( + byte* label, + float* t, + float4* @out, + byte* format, + ImPlotColormap cmap + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/CreateContext.gen.cs b/Brutal.ImPlot/Generated/PInvoke/CreateContext.gen.cs new file mode 100644 index 0000000..bdec0db --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/CreateContext.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:602, + /// implot.cpp:436 + ///
ImPlotContext* CreateContext() + ///
+ ///
+ /// + /// + /// Creates a new ImPlot context. Call this after ImGui::CreateContext. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotContext* CreateContext(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/DestroyContext.gen.cs b/Brutal.ImPlot/Generated/PInvoke/DestroyContext.gen.cs new file mode 100644 index 0000000..9330d9f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/DestroyContext.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:604, + /// implot.cpp:444 + ///
void DestroyContext(ImPlotContext* ctx = nullptr) + ///
+ ///
+ /// + /// + /// Destroys an ImPlot context. Call this before ImGui::DestroyContext. nullptr = destroy current + /// context. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void DestroyContext(ImPlotContext* ctx); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/DragLineX.gen.cs b/Brutal.ImPlot/Generated/PInvoke/DragLineX.gen.cs new file mode 100644 index 0000000..6b3187c --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/DragLineX.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:942, + /// implot.cpp:3954 + ///
+ /// bool DragLineX(int id, double* x, const ImVec4& col, float thickness = 1, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable vertical guide line at an x-value. #col defaults to ImGuiCol_Text. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 DragLineX( + int id, + double* x, + float4* col, + float thickness, + ImPlotDragToolFlags flags, + Bool8* out_clicked, + Bool8* out_hovered, + Bool8* held + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/DragLineY.gen.cs b/Brutal.ImPlot/Generated/PInvoke/DragLineY.gen.cs new file mode 100644 index 0000000..b8893be --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/DragLineY.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:944, + /// implot.cpp:4009 + ///
+ /// bool DragLineY(int id, double* y, const ImVec4& col, float thickness = 1, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable horizontal guide line at a y-value. #col defaults to ImGuiCol_Text. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 DragLineY( + int id, + double* y, + float4* col, + float thickness, + ImPlotDragToolFlags flags, + Bool8* out_clicked, + Bool8* out_hovered, + Bool8* held + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/DragPoint.gen.cs b/Brutal.ImPlot/Generated/PInvoke/DragPoint.gen.cs new file mode 100644 index 0000000..d973384 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/DragPoint.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:940, + /// implot.cpp:3905 + ///
+ /// bool DragPoint(int id, double* x, double* y, const ImVec4& col, float size = 4, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable point at x,y. #col defaults to ImGuiCol_Text. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 DragPoint( + int id, + double* x, + double* y, + float4* col, + float size, + ImPlotDragToolFlags flags, + Bool8* out_clicked, + Bool8* out_hovered, + Bool8* held + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/DragRect.gen.cs b/Brutal.ImPlot/Generated/PInvoke/DragRect.gen.cs new file mode 100644 index 0000000..5b12fbe --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/DragRect.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:946, + /// implot.cpp:4065 + ///
+ /// bool DragRect(int id, double* x1, double* y1, double* x2, double* y2, const ImVec4& col, ImPlotDragToolFlags flags = 0, bool* out_clicked = nullptr, bool* out_hovered = nullptr, bool* held = nullptr) + ///
+ ///
+ /// + /// + /// Shows a draggable and resizeable rectangle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 DragRect( + int id, + double* x1, + double* y1, + double* x2, + double* y2, + float4* col, + ImPlotDragToolFlags flags, + Bool8* out_clicked, + Bool8* out_hovered, + Bool8* held + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/EndAlignedPlots.gen.cs b/Brutal.ImPlot/Generated/PInvoke/EndAlignedPlots.gen.cs new file mode 100644 index 0000000..3d93dbb --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/EndAlignedPlots.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1016, + /// implot.cpp:4374 + ///
void EndAlignedPlots() + ///
+ ///
+ /// + /// + /// Only call EndAlignedPlots() if BeginAlignedPlots() returns true! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndAlignedPlots(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/EndDragDropSource.gen.cs b/Brutal.ImPlot/Generated/PInvoke/EndDragDropSource.gen.cs new file mode 100644 index 0000000..1f2eed2 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/EndDragDropSource.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1052, + /// implot.cpp:4344 + ///
void EndDragDropSource() + ///
+ ///
+ /// + /// + /// Ends a drag and drop source (currently just an alias for ImGui::EndDragDropSource). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndDragDropSource(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/EndDragDropTarget.gen.cs b/Brutal.ImPlot/Generated/PInvoke/EndDragDropTarget.gen.cs new file mode 100644 index 0000000..9b52adf --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/EndDragDropTarget.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1040, + /// implot.cpp:4309 + ///
void EndDragDropTarget() + ///
+ ///
+ /// + /// + /// Ends a drag and drop target (currently just an alias for ImGui::EndDragDropTarget). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndDragDropTarget(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/EndLegendPopup.gen.cs b/Brutal.ImPlot/Generated/PInvoke/EndLegendPopup.gen.cs new file mode 100644 index 0000000..64b9534 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/EndLegendPopup.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1025, + /// implot.cpp:4241 + ///
void EndLegendPopup() + ///
+ ///
+ /// + /// + /// End a popup for a legend entry. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndLegendPopup(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/EndPlot.gen.cs b/Brutal.ImPlot/Generated/PInvoke/EndPlot.gen.cs new file mode 100644 index 0000000..39ad435 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/EndPlot.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:640, + /// implot.cpp:2766 + ///
void EndPlot() + ///
+ ///
+ /// + /// + /// Only call EndPlot() if BeginPlot() returns true! Typically called at the end + /// of an if statement conditioned on BeginPlot(). See example above. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndPlot(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/EndSubplots.gen.cs b/Brutal.ImPlot/Generated/PInvoke/EndSubplots.gen.cs new file mode 100644 index 0000000..87f37a6 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/EndSubplots.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:702, + /// implot.cpp:3543 + ///
void EndSubplots() + ///
+ ///
+ /// + /// + /// Only call EndSubplots() if BeginSubplots() returns true! Typically called at the end + /// of an if statement conditioned on BeginSublots(). See example above. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void EndSubplots(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetColormapColor.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetColormapColor.gen.cs new file mode 100644 index 0000000..f970f6f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetColormapColor.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1186, + /// implot.cpp:4580 + ///
ImVec4 GetColormapColor(int idx, ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns a color from a colormap given an index >= 0 (modulo will be performed). + /// + /// + [LibraryImport("implot")] + public static unsafe partial float4 GetColormapColor(int idx, ImPlotColormap cmap); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetColormapCount.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetColormapCount.gen.cs new file mode 100644 index 0000000..4e9b6ed --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetColormapCount.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1163, + /// implot.cpp:4512 + ///
int GetColormapCount() + ///
+ ///
+ /// + /// + /// Returns the number of available colormaps (i.e. the built-in + user-added count). + /// + /// + [LibraryImport("implot")] + public static unsafe partial int GetColormapCount(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetColormapIndex.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetColormapIndex.gen.cs new file mode 100644 index 0000000..7cb5a8e --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetColormapIndex.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1167, + /// implot.cpp:4522 + ///
ImPlotColormap GetColormapIndex(const char* name) + ///
+ ///
+ /// + /// + /// Returns an index number for a colormap given a valid string name. Returns -1 if name is invalid. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotColormap GetColormapIndex(byte* name); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetColormapName.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetColormapName.gen.cs new file mode 100644 index 0000000..ce70d0f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetColormapName.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1165, + /// implot.cpp:4517 + ///
const char* GetColormapName(ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Returns a null terminated string name for a colormap given an index. Returns nullptr if index is + /// invalid. + /// + /// + [LibraryImport("implot")] + public static unsafe partial byte* GetColormapName(ImPlotColormap cmap); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetColormapSize.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetColormapSize.gen.cs new file mode 100644 index 0000000..4929cbc --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetColormapSize.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1184, + /// implot.cpp:4565 + ///
int GetColormapSize(ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the size of a colormap. + /// + /// + [LibraryImport("implot")] + public static unsafe partial int GetColormapSize(ImPlotColormap cmap); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetCurrentContext.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetCurrentContext.gen.cs new file mode 100644 index 0000000..79c6464 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetCurrentContext.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:606, + /// implot.cpp:452 + ///
ImPlotContext* GetCurrentContext() + ///
+ ///
+ /// + /// + /// Returns the current ImPlot context. nullptr if no context has ben set. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotContext* GetCurrentContext(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetInputMap.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetInputMap.gen.cs new file mode 100644 index 0000000..681bda3 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetInputMap.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1211, + /// implot.cpp:4788 + ///
ImPlotInputMap& GetInputMap() + ///
+ ///
+ /// + /// + /// Provides access to input mapping structure for permanant modifications to controls for pan, select, + /// etc. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotInputMap* GetInputMap(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetLastItemColor.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetLastItemColor.gen.cs new file mode 100644 index 0000000..2b2683b --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetLastItemColor.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1133, + /// implot_items.cpp:353 + ///
ImVec4 GetLastItemColor() + ///
+ ///
+ /// + /// + /// Gets the last item primary color (i.e. its legend icon color) + /// + /// + [LibraryImport("implot")] + public static unsafe partial float4 GetLastItemColor(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetMarkerName.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetMarkerName.gen.cs new file mode 100644 index 0000000..62e003b --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetMarkerName.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1138, + /// implot.cpp:245 + ///
const char* GetMarkerName(ImPlotMarker idx) + ///
+ ///
+ /// + /// + /// Returns the null terminated string name for an ImPlotMarker. + /// + /// + [LibraryImport("implot")] + public static unsafe partial byte* GetMarkerName(ImPlotMarker idx); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetPlotDrawList.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetPlotDrawList.gen.cs new file mode 100644 index 0000000..0ba56cb --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetPlotDrawList.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1228, + /// implot.cpp:4855 + ///
ImDrawList* GetPlotDrawList() + ///
+ ///
+ /// + /// + /// Get the plot draw list for custom rendering to the current plot area. Call between Begin/EndPlot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImDrawList* GetPlotDrawList(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetPlotLimits.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetPlotLimits.gen.cs new file mode 100644 index 0000000..eaeec2c --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetPlotLimits.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:987, + /// implot.cpp:3728 + ///
ImPlotRect GetPlotLimits(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the current plot axis range. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotRect GetPlotLimits(ImAxis x_axis, ImAxis y_axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetPlotMousePos.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetPlotMousePos.gen.cs new file mode 100644 index 0000000..b971699 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetPlotMousePos.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:985, + /// implot.cpp:3722 + ///
ImPlotPoint GetPlotMousePos(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the mouse position in x,y coordinates of the current plot. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 GetPlotMousePos(ImAxis x_axis, ImAxis y_axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetPlotPos.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetPlotPos.gen.cs new file mode 100644 index 0000000..007bda2 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetPlotPos.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:980, + /// implot.cpp:3708 + ///
ImVec2 GetPlotPos() + ///
+ ///
+ /// + /// + /// Get the current Plot position (top-left) in pixels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 GetPlotPos(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetPlotSelection.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetPlotSelection.gen.cs new file mode 100644 index 0000000..fcab24f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetPlotSelection.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:999, + /// implot.cpp:3770 + ///
ImPlotRect GetPlotSelection(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Returns the current plot box selection bounds. Passing IMPLOT_AUTO uses the current axes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotRect GetPlotSelection(ImAxis x_axis, ImAxis y_axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetPlotSize.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetPlotSize.gen.cs new file mode 100644 index 0000000..b032c9a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetPlotSize.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:982, + /// implot.cpp:3715 + ///
ImVec2 GetPlotSize() + ///
+ ///
+ /// + /// + /// Get the curent Plot size in pixels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 GetPlotSize(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetStyle.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetStyle.gen.cs new file mode 100644 index 0000000..fc26858 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetStyle.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1088, + /// implot.cpp:4388 + ///
ImPlotStyle& GetStyle() + ///
+ ///
+ /// + /// + /// Provides access to plot style structure for permanant modifications to colors, sizes, etc. + /// + /// + [LibraryImport("implot")] + public static unsafe partial ImPlotStyle* GetStyle(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/GetStyleColorName.gen.cs b/Brutal.ImPlot/Generated/PInvoke/GetStyleColorName.gen.cs new file mode 100644 index 0000000..2c73d3a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/GetStyleColorName.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1136, + /// implot.cpp:218 + ///
const char* GetStyleColorName(ImPlotCol idx) + ///
+ ///
+ /// + /// + /// Returns the null terminated string name for an ImPlotCol. + /// + /// + [LibraryImport("implot")] + public static unsafe partial byte* GetStyleColorName(ImPlotCol idx); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/HideNextItem.gen.cs b/Brutal.ImPlot/Generated/PInvoke/HideNextItem.gen.cs new file mode 100644 index 0000000..c6f6df8 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/HideNextItem.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1005, + /// implot.cpp:3796 + ///
void HideNextItem(bool hidden = true, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Hides or shows the next plot item (i.e. as if it were toggled from the legend). + /// Use ImPlotCond_Always if you need to forcefully set this every frame. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void HideNextItem(Bool8 hidden, ImPlotCond cond); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ImPlotRange.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ImPlotRange.gen.cs new file mode 100644 index 0000000..9d0c117 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ImPlotRange.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:489 + ///
bool Contains(double value) const + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotRange_Contains(ImPlotRange* target, double value); + + /// + /// + /// C++: implot.h:490 + ///
double Size() const + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double ImPlotRange_Size(ImPlotRange* target); + + /// + /// + /// C++: implot.h:491 + ///
double Clamp(double value) const + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double ImPlotRange_Clamp(ImPlotRange* target, double value); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ImPlotRect.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ImPlotRect.gen.cs new file mode 100644 index 0000000..d25be55 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ImPlotRect.gen.cs @@ -0,0 +1,110 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:499 + ///
bool Contains(const ImPlotPoint& p) const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotRect_Contains_0(ImPlotRect* target, double2* p); + + /// + /// + /// C++: implot.h:500 + ///
bool Contains(double x, double y) const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ImPlotRect_Contains_1(ImPlotRect* target, double x, double y); + + /// + /// + /// C++: implot.h:501 + ///
ImPlotPoint Size() const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 ImPlotRect_Size(ImPlotRect* target); + + /// + /// + /// C++: implot.h:502 + ///
ImPlotPoint Clamp(const ImPlotPoint& p) + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 ImPlotRect_Clamp_0(ImPlotRect* target, double2* p); + + /// + /// + /// C++: implot.h:503 + ///
ImPlotPoint Clamp(double x, double y) + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 ImPlotRect_Clamp_1(ImPlotRect* target, double x, double y); + + /// + /// + /// C++: implot.h:504 + ///
ImPlotPoint Min() const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 ImPlotRect_Min(ImPlotRect* target); + + /// + /// + /// C++: implot.h:505 + ///
ImPlotPoint Max() const + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 ImPlotRect_Max(ImPlotRect* target); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/IsAxisHovered.gen.cs b/Brutal.ImPlot/Generated/PInvoke/IsAxisHovered.gen.cs new file mode 100644 index 0000000..b1ee635 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/IsAxisHovered.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:992, + /// implot.cpp:3750 + ///
bool IsAxisHovered(ImAxis axis) + ///
+ ///
+ /// + /// + /// Returns true if the axis label area in the current plot is hovered. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsAxisHovered(ImAxis axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/IsLegendEntryHovered.gen.cs b/Brutal.ImPlot/Generated/PInvoke/IsLegendEntryHovered.gen.cs new file mode 100644 index 0000000..a81d4bd --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/IsLegendEntryHovered.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1027, + /// implot.cpp:4216 + ///
bool IsLegendEntryHovered(const char* label_id) + ///
+ ///
+ /// + /// + /// Returns true if a plot item legend entry is hovered. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsLegendEntryHovered(byte* label_id); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/IsPlotHovered.gen.cs b/Brutal.ImPlot/Generated/PInvoke/IsPlotHovered.gen.cs new file mode 100644 index 0000000..ba48384 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/IsPlotHovered.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:990, + /// implot.cpp:3743 + ///
bool IsPlotHovered() + ///
+ ///
+ /// + /// + /// Returns true if the plot area in the current plot is hovered. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsPlotHovered(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/IsPlotSelected.gen.cs b/Brutal.ImPlot/Generated/PInvoke/IsPlotSelected.gen.cs new file mode 100644 index 0000000..8f3b1ce --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/IsPlotSelected.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:997, + /// implot.cpp:3763 + ///
bool IsPlotSelected() + ///
+ ///
+ /// + /// + /// Returns true if the current plot is being box selected. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsPlotSelected(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/IsSubplotsHovered.gen.cs b/Brutal.ImPlot/Generated/PInvoke/IsSubplotsHovered.gen.cs new file mode 100644 index 0000000..547d0d8 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/IsSubplotsHovered.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:994, + /// implot.cpp:3757 + ///
bool IsSubplotsHovered() + ///
+ ///
+ /// + /// + /// Returns true if the bounding frame of a subplot is hovered. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 IsSubplotsHovered(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ItemIcon.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ItemIcon.gen.cs new file mode 100644 index 0000000..443c852 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ItemIcon.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1223, + /// implot.cpp:4830 + ///
void ItemIcon(const ImVec4& col) + ///
+ ///
+ /// + /// + /// Render icons similar to those that appear in legends (nifty for data lists). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ItemIcon_0(float4* col); + + /// + /// + /// C++: implot.h:1224, + /// implot.cpp:4834 + ///
void ItemIcon(ImU32 col) + ///
+ ///
+ /// + /// + /// Render icons similar to those that appear in legends (nifty for data lists). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ItemIcon_1(uint col); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/MapInputDefault.gen.cs b/Brutal.ImPlot/Generated/PInvoke/MapInputDefault.gen.cs new file mode 100644 index 0000000..a5fec5a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/MapInputDefault.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1214, + /// implot.cpp:4794 + ///
void MapInputDefault(ImPlotInputMap* dst = nullptr) + ///
+ ///
+ /// + /// + /// Default input mapping: pan = LMB drag, box select = RMB drag, fit = LMB double click, context menu = + /// RMB click, zoom = scroll. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void MapInputDefault(ImPlotInputMap* dst); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/MapInputReverse.gen.cs b/Brutal.ImPlot/Generated/PInvoke/MapInputReverse.gen.cs new file mode 100644 index 0000000..7083c8a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/MapInputReverse.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1216, + /// implot.cpp:4810 + ///
void MapInputReverse(ImPlotInputMap* dst = nullptr) + ///
+ ///
+ /// + /// + /// Reverse input mapping: pan = RMB drag, box select = LMB drag, fit = LMB double click, context menu = + /// RMB click, zoom = scroll. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void MapInputReverse(ImPlotInputMap* dst); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/NextColormapColor.gen.cs b/Brutal.ImPlot/Generated/PInvoke/NextColormapColor.gen.cs new file mode 100644 index 0000000..2b40d59 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/NextColormapColor.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1178, + /// implot.cpp:4561 + ///
ImVec4 NextColormapColor() + ///
+ ///
+ /// + /// + /// Returns the next color from the current colormap and advances the colormap for the current plot. + /// Can also be used with no return value to skip colors if desired. You need to call this between Begin/EndPlot! + /// + /// + [LibraryImport("implot")] + public static unsafe partial float4 NextColormapColor(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PixelsToPlot.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PixelsToPlot.gen.cs new file mode 100644 index 0000000..a6e6330 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PixelsToPlot.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:972, + /// implot.cpp:3688 + ///
+ /// ImPlotPoint PixelsToPlot(const ImVec2& pix, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert pixels to a position in the current plot's coordinate system. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 PixelsToPlot_0(float2* pix, ImAxis x_axis, ImAxis y_axis); + + /// + /// + /// C++: implot.h:973, + /// implot.cpp:3676 + ///
+ /// ImPlotPoint PixelsToPlot(float x, float y, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert pixels to a position in the current plot's coordinate system. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double2 PixelsToPlot_1(float x, float y, ImAxis x_axis, ImAxis y_axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotBarGroups.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotBarGroups.gen.cs new file mode 100644 index 0000000..449bf72 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotBarGroups.gen.cs @@ -0,0 +1,262 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_float( + byte** label_ids, + float* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_double( + byte** label_ids, + double* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_sbyte( + byte** label_ids, + sbyte* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_byte( + byte** label_ids, + byte* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_short( + byte** label_ids, + short* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_ushort( + byte** label_ids, + ushort* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_int( + byte** label_ids, + int* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_uint( + byte** label_ids, + uint* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_long( + byte** label_ids, + long* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + + /// + /// + /// C++: implot.h:884, + /// implot_items.cpp:1925 + ///
+ /// IMPLOT_TMP void PlotBarGroups(const char* const label_ids[], const T* values, int item_count, int group_count, double group_size=0.67, double shift=0, ImPlotBarGroupsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a group of bars. #values is a row-major matrix with #item_count rows and #group_count cols. + /// #label_ids should have #item_count elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarGroups_ulong( + byte** label_ids, + ulong* values, + int item_count, + int group_count, + double group_size, + double shift, + ImPlotBarGroupsFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotBars.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotBars.gen.cs new file mode 100644 index 0000000..5ced555 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotBars.gen.cs @@ -0,0 +1,512 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_float( + byte* label_id, + float* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_double( + byte* label_id, + double* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_sbyte( + byte* label_id, + sbyte* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_byte( + byte* label_id, + byte* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_short( + byte* label_id, + short* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_ushort( + byte* label_id, + ushort* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_int( + byte* label_id, + int* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_uint( + byte* label_id, + uint* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_long( + byte* label_id, + long* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:879, + /// implot_items.cpp:1874 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* values, int count, double bar_size=0.67, double shift=0, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_0_ulong( + byte* label_id, + ulong* values, + int count, + double bar_size, + double shift, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_float( + byte* label_id, + float* xs, + float* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_double( + byte* label_id, + double* xs, + double* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_short( + byte* label_id, + short* xs, + short* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_int( + byte* label_id, + int* xs, + int* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_long( + byte* label_id, + long* xs, + long* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:880, + /// implot_items.cpp:1888 + ///
+ /// IMPLOT_TMP void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBars_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + double bar_size, + ImPlotBarsFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotBarsG.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotBarsG.gen.cs new file mode 100644 index 0000000..1cb4940 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotBarsG.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:881, + /// implot_items.cpp:1907 + ///
+ /// void PlotBarsG(const char* label_id, ImPlotGetter getter, void* data, int count, double bar_size, ImPlotBarsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a bar graph. Vertical by default. #bar_size and #shift are in plot units. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotBarsG( + byte* label_id, + nint getter, + void* data, + int count, + double bar_size, + ImPlotBarsFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotDigital.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotDigital.gen.cs new file mode 100644 index 0000000..2f8f07a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotDigital.gen.cs @@ -0,0 +1,262 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_float( + byte* label_id, + float* xs, + float* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_double( + byte* label_id, + double* xs, + double* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_short( + byte* label_id, + short* xs, + short* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_int( + byte* label_id, + int* xs, + int* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_long( + byte* label_id, + long* xs, + long* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:913, + /// implot_items.cpp:2773 + ///
+ /// IMPLOT_TMP void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, ImPlotDigitalFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigital_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + ImPlotDigitalFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotDigitalG.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotDigitalG.gen.cs new file mode 100644 index 0000000..384b131 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotDigitalG.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:914, + /// implot_items.cpp:2782 + ///
+ /// void PlotDigitalG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotDigitalFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the + /// bottom of the plot. + /// + /// + /// custom + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDigitalG( + byte* label_id, + nint getter, + void* data, + int count, + ImPlotDigitalFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotDummy.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotDummy.gen.cs new file mode 100644 index 0000000..d8b5bca --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotDummy.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:927, + /// implot_items.cpp:2845 + ///
void PlotDummy(const char* label_id, ImPlotDummyFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a dummy item (i.e. adds a legend entry colored by ImPlotCol_Line) + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotDummy(byte* label_id, ImPlotDummyFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotErrorBars.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotErrorBars.gen.cs new file mode 100644 index 0000000..a1a2e9c --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotErrorBars.gen.cs @@ -0,0 +1,542 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_float( + byte* label_id, + float* xs, + float* ys, + float* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_double( + byte* label_id, + double* xs, + double* ys, + double* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + sbyte* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_byte( + byte* label_id, + byte* xs, + byte* ys, + byte* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_short( + byte* label_id, + short* xs, + short* ys, + short* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + ushort* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_int( + byte* label_id, + int* xs, + int* ys, + int* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_uint( + byte* label_id, + uint* xs, + uint* ys, + uint* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_long( + byte* label_id, + long* xs, + long* ys, + long* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:887, + /// implot_items.cpp:2060 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_0_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + ulong* err, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_float( + byte* label_id, + float* xs, + float* ys, + float* neg, + float* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_double( + byte* label_id, + double* xs, + double* ys, + double* neg, + double* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + sbyte* neg, + sbyte* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_byte( + byte* label_id, + byte* xs, + byte* ys, + byte* neg, + byte* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_short( + byte* label_id, + short* xs, + short* ys, + short* neg, + short* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + ushort* neg, + ushort* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_int( + byte* label_id, + int* xs, + int* ys, + int* neg, + int* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_uint( + byte* label_id, + uint* xs, + uint* ys, + uint* neg, + uint* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_long( + byte* label_id, + long* xs, + long* ys, + long* neg, + long* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:888, + /// implot_items.cpp:2065 + ///
+ /// IMPLOT_TMP void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, ImPlotErrorBarsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or + /// bar plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotErrorBars_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + ulong* neg, + ulong* pos, + int count, + ImPlotErrorBarsFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotHeatmap.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotHeatmap.gen.cs new file mode 100644 index 0000000..b343b2a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotHeatmap.gen.cs @@ -0,0 +1,302 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_float( + byte* label_id, + float* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_double( + byte* label_id, + double* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_sbyte( + byte* label_id, + sbyte* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_byte( + byte* label_id, + byte* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_short( + byte* label_id, + short* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_ushort( + byte* label_id, + ushort* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_int( + byte* label_id, + int* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_uint( + byte* label_id, + uint* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_long( + byte* label_id, + long* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + + /// + /// + /// C++: implot.h:902, + /// implot_items.cpp:2522 + ///
+ /// IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min + /// and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt + /// can be set to nullptr for no labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotHeatmap_ulong( + byte* label_id, + ulong* values, + int rows, + int cols, + double scale_min, + double scale_max, + byte* label_fmt, + double2* bounds_min, + double2* bounds_max, + ImPlotHeatmapFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotHistogram.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotHistogram.gen.cs new file mode 100644 index 0000000..fc3b5f8 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotHistogram.gen.cs @@ -0,0 +1,262 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_float( + byte* label_id, + float* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_double( + byte* label_id, + double* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_sbyte( + byte* label_id, + sbyte* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_byte( + byte* label_id, + byte* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_short( + byte* label_id, + short* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_ushort( + byte* label_id, + ushort* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_int( + byte* label_id, + int* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_uint( + byte* label_id, + uint* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_long( + byte* label_id, + long* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:906, + /// implot_items.cpp:2543 + ///
+ /// IMPLOT_TMP double PlotHistogram(const char* label_id, const T* values, int count, int bins=ImPlotBin_Sturges, double bar_scale=1.0, ImPlotRange range=ImPlotRange(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #range is left unspecified, the min/max of #values will be used as the range. + /// Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram_ulong( + byte* label_id, + ulong* values, + int count, + int bins, + double bar_scale, + ImPlotRange range, + ImPlotHistogramFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotHistogram2D.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotHistogram2D.gen.cs new file mode 100644 index 0000000..473ed52 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotHistogram2D.gen.cs @@ -0,0 +1,272 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_float( + byte* label_id, + float* xs, + float* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_double( + byte* label_id, + double* xs, + double* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_short( + byte* label_id, + short* xs, + short* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_int( + byte* label_id, + int* xs, + int* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_long( + byte* label_id, + long* xs, + long* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + + /// + /// + /// C++: implot.h:910, + /// implot_items.cpp:2629 + ///
+ /// IMPLOT_TMP double PlotHistogram2D(const char* label_id, const T* xs, const T* ys, int count, int x_bins=ImPlotBin_Sturges, int y_bins=ImPlotBin_Sturges, ImPlotRect range=ImPlotRect(), ImPlotHistogramFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #range is left unspecified, the min/max of + /// #xs an #ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned. + /// + /// + [LibraryImport("implot")] + public static unsafe partial double PlotHistogram2D_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + int x_bins, + int y_bins, + ImPlotRect range, + ImPlotHistogramFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotImage.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotImage.gen.cs new file mode 100644 index 0000000..e37e006 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotImage.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:918, + /// implot_items.cpp:2792 + ///
+ /// void PlotImage(const char* label_id, ImTextureRef tex_ref, const ImPlotPoint& bounds_min, const ImPlotPoint& bounds_max, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), ImPlotImageFlags flags = 0) + ///
+ ///
+ /// + /// + /// Plots an axis-aligned image. #bounds_min/bounds_max are in plot coordinates (y-up) and #uv0/uv1 are + /// in texture coordinates (y-down). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotImage( + byte* label_id, + ImTextureRef tex_ref, + double2* bounds_min, + double2* bounds_max, + float2* uv0, + float2* uv1, + float4* tint_col, + ImPlotImageFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotInfLines.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotInfLines.gen.cs new file mode 100644 index 0000000..9f28cf3 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotInfLines.gen.cs @@ -0,0 +1,242 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_float( + byte* label_id, + float* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_double( + byte* label_id, + double* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_sbyte( + byte* label_id, + sbyte* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_byte( + byte* label_id, + byte* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_short( + byte* label_id, + short* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_ushort( + byte* label_id, + ushort* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_int( + byte* label_id, + int* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_uint( + byte* label_id, + uint* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_long( + byte* label_id, + long* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:895, + /// implot_items.cpp:2162 + ///
+ /// IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots infinite vertical or horizontal lines (e.g. for references or asymptotes). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotInfLines_ulong( + byte* label_id, + ulong* values, + int count, + ImPlotInfLinesFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotLine.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotLine.gen.cs new file mode 100644 index 0000000..b6ac5ab --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotLine.gen.cs @@ -0,0 +1,502 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_float( + byte* label_id, + float* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_double( + byte* label_id, + double* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_sbyte( + byte* label_id, + sbyte* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_byte( + byte* label_id, + byte* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_short( + byte* label_id, + short* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_ushort( + byte* label_id, + ushort* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_int( + byte* label_id, + int* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_uint( + byte* label_id, + uint* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_long( + byte* label_id, + long* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:858, + /// implot_items.cpp:1620 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_0_ulong( + byte* label_id, + ulong* values, + int count, + double xscale, + double xstart, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_float( + byte* label_id, + float* xs, + float* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_double( + byte* label_id, + double* xs, + double* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_short( + byte* label_id, + short* xs, + short* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_int( + byte* label_id, + int* xs, + int* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_long( + byte* label_id, + long* xs, + long* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:859, + /// implot_items.cpp:1626 + ///
+ /// IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, ImPlotLineFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLine_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + ImPlotLineFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotLineG.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotLineG.gen.cs new file mode 100644 index 0000000..17db5b1 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotLineG.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:860, + /// implot_items.cpp:1638 + ///
+ /// void PlotLineG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotLineFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a standard 2D line plot. + /// + /// + /// custom + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotLineG( + byte* label_id, + nint getter, + void* data, + int count, + ImPlotLineFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotPieChart.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotPieChart.gen.cs new file mode 100644 index 0000000..c74f5f6 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotPieChart.gen.cs @@ -0,0 +1,562 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_float( + byte** label_ids, + float* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_double( + byte** label_ids, + double* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_sbyte( + byte** label_ids, + sbyte* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_byte( + byte** label_ids, + byte* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_short( + byte** label_ids, + short* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_ushort( + byte** label_ids, + ushort* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_int( + byte** label_ids, + int* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_uint( + byte** label_ids, + uint* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_long( + byte** label_ids, + long* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:898, + /// implot_items.cpp:2331 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_0_ulong( + byte** label_ids, + ulong* values, + int count, + double x, + double y, + double radius, + nint fmt, + void* fmt_data, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_float( + byte** label_ids, + float* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_double( + byte** label_ids, + double* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_sbyte( + byte** label_ids, + sbyte* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_byte( + byte** label_ids, + byte* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_short( + byte** label_ids, + short* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_ushort( + byte** label_ids, + ushort* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_int( + byte** label_ids, + int* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_uint( + byte** label_ids, + uint* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_long( + byte** label_ids, + long* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + + /// + /// + /// C++: implot.h:899, + /// implot_items.cpp:2323 + ///
+ /// IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no + /// labels. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotPieChart_1_ulong( + byte** label_ids, + ulong* values, + int count, + double x, + double y, + double radius, + byte* label_fmt, + double angle0, + ImPlotPieChartFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotScatter.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotScatter.gen.cs new file mode 100644 index 0000000..67a8b01 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotScatter.gen.cs @@ -0,0 +1,502 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_float( + byte* label_id, + float* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_double( + byte* label_id, + double* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_sbyte( + byte* label_id, + sbyte* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_byte( + byte* label_id, + byte* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_short( + byte* label_id, + short* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_ushort( + byte* label_id, + ushort* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_int( + byte* label_id, + int* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_uint( + byte* label_id, + uint* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_long( + byte* label_id, + long* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:863, + /// implot_items.cpp:1670 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_0_ulong( + byte* label_id, + ulong* values, + int count, + double xscale, + double xstart, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_float( + byte* label_id, + float* xs, + float* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_double( + byte* label_id, + double* xs, + double* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_short( + byte* label_id, + short* xs, + short* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_int( + byte* label_id, + int* xs, + int* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_long( + byte* label_id, + long* xs, + long* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:864, + /// implot_items.cpp:1676 + ///
+ /// IMPLOT_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, ImPlotScatterFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatter_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + ImPlotScatterFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotScatterG.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotScatterG.gen.cs new file mode 100644 index 0000000..32a4024 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotScatterG.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:865, + /// implot_items.cpp:1688 + ///
+ /// void PlotScatterG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotScatterFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle. + /// + /// + /// custom + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotScatterG( + byte* label_id, + nint getter, + void* data, + int count, + ImPlotScatterFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotShaded.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotShaded.gen.cs new file mode 100644 index 0000000..fe4621d --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotShaded.gen.cs @@ -0,0 +1,802 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_float( + byte* label_id, + float* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_double( + byte* label_id, + double* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_sbyte( + byte* label_id, + sbyte* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_byte( + byte* label_id, + byte* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_short( + byte* label_id, + short* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_ushort( + byte* label_id, + ushort* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_int( + byte* label_id, + int* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_uint( + byte* label_id, + uint* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_long( + byte* label_id, + long* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:873, + /// implot_items.cpp:1778 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* values, int count, double yref=0, double xscale=1, double xstart=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_0_ulong( + byte* label_id, + ulong* values, + int count, + double yref, + double xscale, + double xstart, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_float( + byte* label_id, + float* xs, + float* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_double( + byte* label_id, + double* xs, + double* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_short( + byte* label_id, + short* xs, + short* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_int( + byte* label_id, + int* xs, + int* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_long( + byte* label_id, + long* xs, + long* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:874, + /// implot_items.cpp:1789 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double yref=0, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + double yref, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_float( + byte* label_id, + float* xs, + float* ys1, + float* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_double( + byte* label_id, + double* xs, + double* ys1, + double* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys1, + sbyte* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_byte( + byte* label_id, + byte* xs, + byte* ys1, + byte* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_short( + byte* label_id, + short* xs, + short* ys1, + short* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_ushort( + byte* label_id, + ushort* xs, + ushort* ys1, + ushort* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_int( + byte* label_id, + int* xs, + int* ys1, + int* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_uint( + byte* label_id, + uint* xs, + uint* ys1, + uint* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_long( + byte* label_id, + long* xs, + long* ys1, + long* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:875, + /// implot_items.cpp:1801 + ///
+ /// IMPLOT_TMP void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, ImPlotShadedFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShaded_2_ulong( + byte* label_id, + ulong* xs, + ulong* ys1, + ulong* ys2, + int count, + ImPlotShadedFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotShadedG.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotShadedG.gen.cs new file mode 100644 index 0000000..b28fd9b --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotShadedG.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:876, + /// implot_items.cpp:1815 + ///
+ /// void PlotShadedG(const char* label_id, ImPlotGetter getter1, void* data1, ImPlotGetter getter2, void* data2, int count, ImPlotShadedFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to + /// +/-INFINITY for infinite fill extents. + /// + /// + /// custom + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotShadedG( + byte* label_id, + nint getter1, + void* data1, + nint getter2, + void* data2, + int count, + ImPlotShadedFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotStairs.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotStairs.gen.cs new file mode 100644 index 0000000..6b316cf --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotStairs.gen.cs @@ -0,0 +1,522 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_float( + byte* label_id, + float* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_double( + byte* label_id, + double* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_sbyte( + byte* label_id, + sbyte* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_byte( + byte* label_id, + byte* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_short( + byte* label_id, + short* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_ushort( + byte* label_id, + ushort* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_int( + byte* label_id, + int* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_uint( + byte* label_id, + uint* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_long( + byte* label_id, + long* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:868, + /// implot_items.cpp:1734 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* values, int count, double xscale=1, double xstart=0, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_0_ulong( + byte* label_id, + ulong* values, + int count, + double xscale, + double xstart, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_float( + byte* label_id, + float* xs, + float* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_double( + byte* label_id, + double* xs, + double* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_short( + byte* label_id, + short* xs, + short* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_int( + byte* label_id, + int* xs, + int* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_long( + byte* label_id, + long* xs, + long* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:869, + /// implot_items.cpp:1740 + ///
+ /// IMPLOT_TMP void PlotStairs(const char* label_id, const T* xs, const T* ys, int count, ImPlotStairsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairs_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + ImPlotStairsFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotStairsG.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotStairsG.gen.cs new file mode 100644 index 0000000..35f0a22 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotStairsG.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:870, + /// implot_items.cpp:1752 + ///
+ /// void PlotStairsG(const char* label_id, ImPlotGetter getter, void* data, int count, ImPlotStairsFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a a stairstep graph. The y value is continued constantly to the right from every x position, + /// i.e. the interval [x[i], x[i+1]) has the value y[i] + /// + /// + /// custom + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStairsG( + byte* label_id, + nint getter, + void* data, + int count, + ImPlotStairsFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotStems.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotStems.gen.cs new file mode 100644 index 0000000..b7fb252 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotStems.gen.cs @@ -0,0 +1,522 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_float( + byte* label_id, + float* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_double( + byte* label_id, + double* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_sbyte( + byte* label_id, + sbyte* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_byte( + byte* label_id, + byte* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_short( + byte* label_id, + short* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_ushort( + byte* label_id, + ushort* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_int( + byte* label_id, + int* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_uint( + byte* label_id, + uint* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_long( + byte* label_id, + long* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:891, + /// implot_items.cpp:2123 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* values, int count, double ref=0, double scale=1, double start=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_0_ulong( + byte* label_id, + ulong* values, + int count, + double @ref, + double scale, + double start, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_float( + byte* label_id, + float* xs, + float* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_double( + byte* label_id, + double* xs, + double* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_sbyte( + byte* label_id, + sbyte* xs, + sbyte* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_byte( + byte* label_id, + byte* xs, + byte* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_short( + byte* label_id, + short* xs, + short* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_ushort( + byte* label_id, + ushort* xs, + ushort* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_int( + byte* label_id, + int* xs, + int* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_uint( + byte* label_id, + uint* xs, + uint* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_long( + byte* label_id, + long* xs, + long* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + + /// + /// + /// C++: implot.h:892, + /// implot_items.cpp:2137 + ///
+ /// IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double ref=0, ImPlotStemsFlags flags=0, int offset=0, int stride=sizeof(T)) + ///
+ ///
+ /// + /// + /// Plots stems. Vertical by default. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotStems_1_ulong( + byte* label_id, + ulong* xs, + ulong* ys, + int count, + double @ref, + ImPlotStemsFlags flags, + int offset, + int stride + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotText.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotText.gen.cs new file mode 100644 index 0000000..640c548 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotText.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:924, + /// implot_items.cpp:2813 + ///
+ /// void PlotText(const char* text, double x, double y, const ImVec2& pix_offset=ImVec2(0,0), ImPlotTextFlags flags=0) + ///
+ ///
+ /// + /// + /// Plots a centered text label at point x,y with an optional pixel offset. Text color can be changed + /// with ImPlot::PushStyleColor(ImPlotCol_InlayText, ...). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PlotText( + byte* text, + double x, + double y, + float2* pix_offset, + ImPlotTextFlags flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PlotToPixels.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PlotToPixels.gen.cs new file mode 100644 index 0000000..29c7e1d --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PlotToPixels.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:976, + /// implot.cpp:3704 + ///
+ /// ImVec2 PlotToPixels(const ImPlotPoint& plt, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert a position in the current plot's coordinate system to pixels. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 PlotToPixels_0(double2* plt, ImAxis x_axis, ImAxis y_axis); + + /// + /// + /// C++: implot.h:977, + /// implot.cpp:3692 + ///
+ /// ImVec2 PlotToPixels(double x, double y, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Convert a position in the current plot's coordinate system to pixels. Passing IMPLOT_AUTO uses the + /// current axes. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float2 PlotToPixels_1(double x, double y, ImAxis x_axis, ImAxis y_axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PopColormap.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PopColormap.gen.cs new file mode 100644 index 0000000..a564921 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PopColormap.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1174, + /// implot.cpp:4541 + ///
void PopColormap(int count = 1) + ///
+ ///
+ /// + /// + /// Undo temporary colormap modification(s). Undo multiple pushes at once by increasing count. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PopColormap(int count); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PopPlotClipRect.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PopPlotClipRect.gen.cs new file mode 100644 index 0000000..22b0069 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PopPlotClipRect.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1232, + /// implot.cpp:4868 + ///
void PopPlotClipRect() + ///
+ ///
+ /// + /// + /// Pop plot clip rect. Call between Begin/EndPlot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PopPlotClipRect(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PopStyleColor.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PopStyleColor.gen.cs new file mode 100644 index 0000000..7a33179 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PopStyleColor.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1107, + /// implot.cpp:4412 + ///
void PopStyleColor(int count = 1) + ///
+ ///
+ /// + /// + /// Undo temporary style color modification(s). Undo multiple pushes at once by increasing count. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PopStyleColor(int count); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PopStyleVar.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PopStyleVar.gen.cs new file mode 100644 index 0000000..822f181 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PopStyleVar.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1116, + /// implot.cpp:4468 + ///
void PopStyleVar(int count = 1) + ///
+ ///
+ /// + /// + /// Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PopStyleVar(int count); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PushColormap.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PushColormap.gen.cs new file mode 100644 index 0000000..ad9a44c --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PushColormap.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1170, + /// implot.cpp:4527 + ///
void PushColormap(ImPlotColormap cmap) + ///
+ ///
+ /// + /// + /// Temporarily switch to one of the built-in (i.e. ImPlotColormap_XXX) or user-added colormaps (i.e. a + /// return value of AddColormap). Don't forget to call PopColormap! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushColormap_0(ImPlotColormap cmap); + + /// + /// + /// C++: implot.h:1172, + /// implot.cpp:4534 + ///
void PushColormap(const char* name) + ///
+ ///
+ /// + /// + /// Push a colormap by string name. Use built-in names such as "Default", "Deep", "Jet", etc. or a + /// string you provided to AddColormap. Don't forget to call PopColormap! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushColormap_1(byte* name); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PushPlotClipRect.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PushPlotClipRect.gen.cs new file mode 100644 index 0000000..e66e00b --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PushPlotClipRect.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1230, + /// implot.cpp:4859 + ///
void PushPlotClipRect(float expand=0) + ///
+ ///
+ /// + /// + /// Push clip rect for rendering to current plot area. The rect can be expanded or contracted by #expand + /// pixels. Call between Begin/EndPlot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushPlotClipRect(float expand); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PushStyleColor.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PushStyleColor.gen.cs new file mode 100644 index 0000000..ae3492a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PushStyleColor.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1104, + /// implot.cpp:4394 + ///
void PushStyleColor(ImPlotCol idx, ImU32 col) + ///
+ ///
+ /// + /// + /// Temporarily modify a style color. Don't forget to call PopStyleColor! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushStyleColor_0(ImPlotCol idx, uint col); + + /// + /// + /// C++: implot.h:1105, + /// implot.cpp:4403 + ///
void PushStyleColor(ImPlotCol idx, const ImVec4& col) + ///
+ ///
+ /// + /// + /// Temporarily modify a style color. Don't forget to call PopStyleColor! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushStyleColor_1(ImPlotCol idx, float4* col); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/PushStyleVar.gen.cs b/Brutal.ImPlot/Generated/PInvoke/PushStyleVar.gen.cs new file mode 100644 index 0000000..e966082 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/PushStyleVar.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1110, + /// implot.cpp:4424 + ///
void PushStyleVar(ImPlotStyleVar idx, float val) + ///
+ ///
+ /// + /// + /// Temporarily modify a style variable of float type. Don't forget to call PopStyleVar! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushStyleVar_0(ImPlotStyleVar idx, float val); + + /// + /// + /// C++: implot.h:1112, + /// implot.cpp:4436 + ///
void PushStyleVar(ImPlotStyleVar idx, int val) + ///
+ ///
+ /// + /// + /// Temporarily modify a style variable of int type. Don't forget to call PopStyleVar! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushStyleVar_1(ImPlotStyleVar idx, int val); + + /// + /// + /// C++: implot.h:1114, + /// implot.cpp:4454 + ///
void PushStyleVar(ImPlotStyleVar idx, const ImVec2& val) + ///
+ ///
+ /// + /// + /// Temporarily modify a style variable of ImVec2 type. Don't forget to call PopStyleVar! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void PushStyleVar_2(ImPlotStyleVar idx, float2* val); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SampleColormap.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SampleColormap.gen.cs new file mode 100644 index 0000000..0d33ddf --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SampleColormap.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1188, + /// implot.cpp:4591 + ///
ImVec4 SampleColormap(float t, ImPlotColormap cmap = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Sample a color from the current colormap given t between 0 and 1. + /// + /// + [LibraryImport("implot")] + public static unsafe partial float4 SampleColormap(float t, ImPlotColormap cmap); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetAxes.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetAxes.gen.cs new file mode 100644 index 0000000..02309dc --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetAxes.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:969, + /// implot.cpp:3664 + ///
void SetAxes(ImAxis x_axis, ImAxis y_axis) + ///
+ ///
+ /// + /// + /// Select which axis/axes will be used for subsequent plot elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetAxes(ImAxis x_axis, ImAxis y_axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetAxis.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetAxis.gen.cs new file mode 100644 index 0000000..b6c5c7e --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetAxis.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:968, + /// implot.cpp:3652 + ///
void SetAxis(ImAxis axis) + ///
+ ///
+ /// + /// + /// Select which axis/axes will be used for subsequent plot elements. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetAxis(ImAxis axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetCurrentContext.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetCurrentContext.gen.cs new file mode 100644 index 0000000..4f70a82 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetCurrentContext.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:608, + /// implot.cpp:456 + ///
void SetCurrentContext(ImPlotContext* ctx) + ///
+ ///
+ /// + /// + /// Sets the current ImPlot context. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetCurrentContext(ImPlotContext* ctx); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetImGuiContext.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetImGuiContext.gen.cs new file mode 100644 index 0000000..adacadb --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetImGuiContext.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:614, + /// implot.cpp:432 + ///
void SetImGuiContext(ImGuiContext* ctx) + ///
+ ///
+ /// + /// + /// Sets the current **ImGui** context. This is ONLY necessary if you are compiling + /// ImPlot as a DLL (not recommended) separate from your ImGui compilation. It + /// sets the global variable GImGui, which is not shared across DLL boundaries. + /// See GImGui documentation in imgui.cpp for more details. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetImGuiContext(ImGuiContext* ctx); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextAxesLimits.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextAxesLimits.gen.cs new file mode 100644 index 0000000..817b981 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextAxesLimits.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:801, + /// implot.cpp:2358 + ///
+ /// void SetNextAxesLimits(double x_min, double x_max, double y_min, double y_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets the upcoming primary X and Y axes range limits. If ImPlotCond_Always is used, the axes limits + /// will be locked (shorthand for two calls to SetupAxisLimits). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextAxesLimits( + double x_min, + double x_max, + double y_min, + double y_max, + ImPlotCond cond + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextAxesToFit.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextAxesToFit.gen.cs new file mode 100644 index 0000000..dda43a0 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextAxesToFit.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:803, + /// implot.cpp:2363 + ///
void SetNextAxesToFit() + ///
+ ///
+ /// + /// + /// Sets all upcoming axes to auto fit to their data. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextAxesToFit(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextAxisLimits.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextAxisLimits.gen.cs new file mode 100644 index 0000000..aa1781e --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextAxisLimits.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:794, + /// implot.cpp:2335 + ///
+ /// void SetNextAxisLimits(ImAxis axis, double v_min, double v_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets an upcoming axis range limits. If ImPlotCond_Always is used, the axes limits will be locked. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextAxisLimits( + ImAxis axis, + double v_min, + double v_max, + ImPlotCond cond + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextAxisLinks.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextAxisLinks.gen.cs new file mode 100644 index 0000000..25205ce --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextAxisLinks.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:796, + /// implot.cpp:2345 + ///
void SetNextAxisLinks(ImAxis axis, double* link_min, double* link_max) + ///
+ ///
+ /// + /// + /// Links an upcoming axis range limits to external values. Set to nullptr for no linkage. The pointer + /// data must remain valid until EndPlot! + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextAxisLinks(ImAxis axis, double* link_min, double* link_max); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextAxisToFit.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextAxisToFit.gen.cs new file mode 100644 index 0000000..acd4477 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextAxisToFit.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:798, + /// implot.cpp:2352 + ///
void SetNextAxisToFit(ImAxis axis) + ///
+ ///
+ /// + /// + /// Set an upcoming axis to auto fit to its data. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextAxisToFit(ImAxis axis); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextErrorBarStyle.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextErrorBarStyle.gen.cs new file mode 100644 index 0000000..0b31f23 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextErrorBarStyle.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1130, + /// implot_items.cpp:346 + ///
+ /// void SetNextErrorBarStyle(const ImVec4& col = IMPLOT_AUTO_COL, float size = IMPLOT_AUTO, float weight = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Set the error bar style for the next item only. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextErrorBarStyle(float4* col, float size, float weight); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextFillStyle.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextFillStyle.gen.cs new file mode 100644 index 0000000..1765bd2 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextFillStyle.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1126, + /// implot_items.cpp:331 + ///
+ /// void SetNextFillStyle(const ImVec4& col = IMPLOT_AUTO_COL, float alpha_mod = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Set the fill color for the next item only. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextFillStyle(float4* col, float alpha_mod); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextLineStyle.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextLineStyle.gen.cs new file mode 100644 index 0000000..c9fd263 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextLineStyle.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1124, + /// implot_items.cpp:325 + ///
+ /// void SetNextLineStyle(const ImVec4& col = IMPLOT_AUTO_COL, float weight = IMPLOT_AUTO) + ///
+ ///
+ /// + /// + /// Set the line color and weight for the next item only. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextLineStyle(float4* col, float weight); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetNextMarkerStyle.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetNextMarkerStyle.gen.cs new file mode 100644 index 0000000..7c77e04 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetNextMarkerStyle.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1128, + /// implot_items.cpp:337 + ///
+ /// void SetNextMarkerStyle(ImPlotMarker marker = IMPLOT_AUTO, float size = IMPLOT_AUTO, const ImVec4& fill = IMPLOT_AUTO_COL, float weight = IMPLOT_AUTO, const ImVec4& outline = IMPLOT_AUTO_COL) + ///
+ ///
+ /// + /// + /// Set the marker style for the next item only. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetNextMarkerStyle( + ImPlotMarker marker, + float size, + float4* fill, + float weight, + float4* outline + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxes.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxes.gen.cs new file mode 100644 index 0000000..35d8fd8 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxes.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:757, + /// implot.cpp:2296 + ///
+ /// void SetupAxes(const char* x_label, const char* y_label, ImPlotAxisFlags x_flags=0, ImPlotAxisFlags y_flags=0) + ///
+ ///
+ /// + /// + /// Sets the label and/or flags for primary X and Y axes (shorthand for two calls to SetupAxis). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxes( + byte* x_label, + byte* y_label, + ImPlotAxisFlags x_flags, + ImPlotAxisFlags y_flags + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxesLimits.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxesLimits.gen.cs new file mode 100644 index 0000000..9692ac8 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxesLimits.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:759, + /// implot.cpp:2301 + ///
+ /// void SetupAxesLimits(double x_min, double x_max, double y_min, double y_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets the primary X and Y axes range limits. If ImPlotCond_Always is used, the axes limits will be + /// locked (shorthand for two calls to SetupAxisLimits). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxesLimits( + double x_min, + double x_max, + double y_min, + double y_max, + ImPlotCond cond + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxis.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxis.gen.cs new file mode 100644 index 0000000..62bcdef --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxis.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:734, + /// implot.cpp:2125 + ///
void SetupAxis(ImAxis axis, const char* label=nullptr, ImPlotAxisFlags flags=0) + ///
+ ///
+ /// + /// + /// Enables an axis or sets the label and/or flags for an existing axis. Leave #label = nullptr for no + /// label. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxis(ImAxis axis, byte* label, ImPlotAxisFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisFormat.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisFormat.gen.cs new file mode 100644 index 0000000..51b6b01 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisFormat.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:740, + /// implot.cpp:2159 + ///
void SetupAxisFormat(ImAxis axis, const char* fmt) + ///
+ ///
+ /// + /// + /// Sets the format of numeric axis labels via formater specifier (default="%g"). Formated values will + /// be double (i.e. use %f). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisFormat_0(ImAxis axis, byte* fmt); + + /// + /// + /// C++: implot.h:742, + /// implot.cpp:2183 + ///
void SetupAxisFormat(ImAxis axis, ImPlotFormatter formatter, void* data=nullptr) + ///
+ ///
+ /// + /// + /// Sets the format of numeric axis labels via formatter callback. Given #value, write a label into + /// #buff. Optionally pass user data. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisFormat_1(ImAxis axis, nint formatter, void* data); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisLimits.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisLimits.gen.cs new file mode 100644 index 0000000..918ad6f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisLimits.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:736, + /// implot.cpp:2146 + ///
+ /// void SetupAxisLimits(ImAxis axis, double v_min, double v_max, ImPlotCond cond = ImPlotCond_Once) + ///
+ ///
+ /// + /// + /// Sets an axis range limits. If ImPlotCond_Always is used, the axes limits will be locked. Inversion + /// with v_min > v_max is not supported; use SetupAxisLimits instead. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisLimits(ImAxis axis, double v_min, double v_max, ImPlotCond cond); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisLimitsConstraints.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisLimitsConstraints.gen.cs new file mode 100644 index 0000000..0a9a818 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisLimitsConstraints.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:752, + /// implot.cpp:2274 + ///
void SetupAxisLimitsConstraints(ImAxis axis, double v_min, double v_max) + ///
+ ///
+ /// + /// + /// Sets an axis' limits constraints. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisLimitsConstraints(ImAxis axis, double v_min, double v_max); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisLinks.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisLinks.gen.cs new file mode 100644 index 0000000..9352c86 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisLinks.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:738, + /// implot.cpp:2171 + ///
void SetupAxisLinks(ImAxis axis, double* link_min, double* link_max) + ///
+ ///
+ /// + /// + /// Links an axis range limits to external values. Set to nullptr for no linkage. The pointer data must + /// remain valid until EndPlot. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisLinks(ImAxis axis, double* link_min, double* link_max); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisScale.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisScale.gen.cs new file mode 100644 index 0000000..d42b49e --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisScale.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:748, + /// implot.cpp:2219 + ///
void SetupAxisScale(ImAxis axis, ImPlotScale scale) + ///
+ ///
+ /// + /// + /// Sets an axis' scale using built-in options. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisScale_0(ImAxis axis, ImPlotScale scale); + + /// + /// + /// C++: implot.h:750, + /// implot.cpp:2261 + ///
+ /// void SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse, void* data=nullptr) + ///
+ ///
+ /// + /// + /// Sets an axis' scale using user supplied forward and inverse transfroms. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisScale_1(ImAxis axis, nint forward, nint inverse, void* data); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisTicks.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisTicks.gen.cs new file mode 100644 index 0000000..ce81669 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisTicks.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:744, + /// implot.cpp:2194 + ///
+ /// void SetupAxisTicks(ImAxis axis, const double* values, int n_ticks, const char* const labels[]=nullptr, bool keep_default=false) + ///
+ ///
+ /// + /// + /// Sets an axis' ticks and optionally the labels. To keep the default ticks, set #keep_default=true. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisTicks_0( + ImAxis axis, + double* values, + int n_ticks, + byte** labels, + Bool8 keep_default + ); + + /// + /// + /// C++: implot.h:746, + /// implot.cpp:2210 + ///
+ /// void SetupAxisTicks(ImAxis axis, double v_min, double v_max, int n_ticks, const char* const labels[]=nullptr, bool keep_default=false) + ///
+ ///
+ /// + /// + /// Sets an axis' ticks and optionally the labels for the next plot. To keep the default ticks, set + /// #keep_default=true. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisTicks_1( + ImAxis axis, + double v_min, + double v_max, + int n_ticks, + byte** labels, + Bool8 keep_default + ); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupAxisZoomConstraints.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupAxisZoomConstraints.gen.cs new file mode 100644 index 0000000..d39145f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupAxisZoomConstraints.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:754, + /// implot.cpp:2285 + ///
void SetupAxisZoomConstraints(ImAxis axis, double z_min, double z_max) + ///
+ ///
+ /// + /// + /// Sets an axis' zoom constraints. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupAxisZoomConstraints(ImAxis axis, double z_min, double z_max); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupFinish.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupFinish.gen.cs new file mode 100644 index 0000000..b1fe67a --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupFinish.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:768, + /// implot.cpp:2466 + ///
void SetupFinish() + ///
+ ///
+ /// + /// + /// Explicitly finalize plot setup. Once you call this, you cannot make anymore Setup calls for the current plot! + /// Note that calling this function is OPTIONAL; it will be called by the first subsequent setup-locking API call. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupFinish(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupLegend.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupLegend.gen.cs new file mode 100644 index 0000000..65e91fd --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupLegend.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:762, + /// implot.cpp:2306 + ///
void SetupLegend(ImPlotLocation location, ImPlotLegendFlags flags=0) + ///
+ ///
+ /// + /// + /// Sets up the plot legend. This can also be called immediately after BeginSubplots when using + /// ImPlotSubplotFlags_ShareItems. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupLegend(ImPlotLocation location, ImPlotLegendFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/SetupMouseText.gen.cs b/Brutal.ImPlot/Generated/PInvoke/SetupMouseText.gen.cs new file mode 100644 index 0000000..bfa4c51 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/SetupMouseText.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:764, + /// implot.cpp:2323 + ///
void SetupMouseText(ImPlotLocation location, ImPlotMouseTextFlags flags=0) + ///
+ ///
+ /// + /// + /// Set the location of the current plot's mouse position text (default = South|East). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void SetupMouseText(ImPlotLocation location, ImPlotMouseTextFlags flags); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowColormapSelector.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowColormapSelector.gen.cs new file mode 100644 index 0000000..1d057cb --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowColormapSelector.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1237, + /// implot.cpp:4901 + ///
bool ShowColormapSelector(const char* label) + ///
+ ///
+ /// + /// + /// Shows ImPlot colormap selector dropdown menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowColormapSelector(byte* label); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowDemoWindow.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowDemoWindow.gen.cs new file mode 100644 index 0000000..88c1d05 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowDemoWindow.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1252, + /// implot_demo.cpp:2181 + ///
void ShowDemoWindow(bool* p_open = nullptr) + ///
+ ///
+ /// + /// + /// Shows the ImPlot demo window (add implot_demo.cpp to your sources!) + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowDemoWindow(Bool8* p_open); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowInputMapSelector.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowInputMapSelector.gen.cs new file mode 100644 index 0000000..a5fb3f1 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowInputMapSelector.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1239, + /// implot.cpp:4918 + ///
bool ShowInputMapSelector(const char* label) + ///
+ ///
+ /// + /// + /// Shows ImPlot input map selector dropdown menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowInputMapSelector(byte* label); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowMetricsWindow.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowMetricsWindow.gen.cs new file mode 100644 index 0000000..e80552f --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowMetricsWindow.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1245, + /// implot.cpp:5241 + ///
void ShowMetricsWindow(bool* p_popen = nullptr) + ///
+ ///
+ /// + /// + /// Shows ImPlot metrics/debug information window. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowMetricsWindow(Bool8* p_popen); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowStyleEditor.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowStyleEditor.gen.cs new file mode 100644 index 0000000..634af95 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowStyleEditor.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1241, + /// implot.cpp:4933 + ///
void ShowStyleEditor(ImPlotStyle* ref = nullptr) + ///
+ ///
+ /// + /// + /// Shows ImPlot style editor block (not a window). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowStyleEditor(ImPlotStyle* @ref); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowStyleSelector.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowStyleSelector.gen.cs new file mode 100644 index 0000000..6befa48 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowStyleSelector.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1235, + /// implot.cpp:4884 + ///
bool ShowStyleSelector(const char* label) + ///
+ ///
+ /// + /// + /// Shows ImPlot style selector dropdown menu. + /// + /// + [LibraryImport("implot")] + public static unsafe partial Bool8 ShowStyleSelector(byte* label); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/ShowUserGuide.gen.cs b/Brutal.ImPlot/Generated/PInvoke/ShowUserGuide.gen.cs new file mode 100644 index 0000000..8f03689 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/ShowUserGuide.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1243, + /// implot.cpp:5183 + ///
void ShowUserGuide() + ///
+ ///
+ /// + /// + /// Add basic help/info block for end users (not a window). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void ShowUserGuide(); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/StyleColorsAuto.gen.cs b/Brutal.ImPlot/Generated/PInvoke/StyleColorsAuto.gen.cs new file mode 100644 index 0000000..3ae4116 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/StyleColorsAuto.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1091, + /// implot.cpp:5759 + ///
void StyleColorsAuto(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for current ImGui style (default). + /// + /// + [LibraryImport("implot")] + public static unsafe partial void StyleColorsAuto(ImPlotStyle* dst); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/StyleColorsClassic.gen.cs b/Brutal.ImPlot/Generated/PInvoke/StyleColorsClassic.gen.cs new file mode 100644 index 0000000..4c23a11 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/StyleColorsClassic.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1093, + /// implot.cpp:5789 + ///
void StyleColorsClassic(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for ImGui "Classic". + /// + /// + [LibraryImport("implot")] + public static unsafe partial void StyleColorsClassic(ImPlotStyle* dst); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/StyleColorsDark.gen.cs b/Brutal.ImPlot/Generated/PInvoke/StyleColorsDark.gen.cs new file mode 100644 index 0000000..0dc5990 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/StyleColorsDark.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1095, + /// implot.cpp:5818 + ///
void StyleColorsDark(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for ImGui "Dark". + /// + /// + [LibraryImport("implot")] + public static unsafe partial void StyleColorsDark(ImPlotStyle* dst); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/StyleColorsLight.gen.cs b/Brutal.ImPlot/Generated/PInvoke/StyleColorsLight.gen.cs new file mode 100644 index 0000000..6503b39 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/StyleColorsLight.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:1097, + /// implot.cpp:5847 + ///
void StyleColorsLight(ImPlotStyle* dst = nullptr) + ///
+ ///
+ /// + /// + /// Style plot colors for ImGui "Light". + /// + /// + [LibraryImport("implot")] + public static unsafe partial void StyleColorsLight(ImPlotStyle* dst); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/TagX.gen.cs b/Brutal.ImPlot/Generated/PInvoke/TagX.gen.cs new file mode 100644 index 0000000..e3943dc --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/TagX.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:954, + /// implot.cpp:3861 + ///
void TagX(double x, const ImVec4& col, bool round = false) + ///
+ ///
+ /// + /// + /// Shows a x-axis tag at the specified coordinate value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void TagX_0(double x, float4* col, Bool8 round); + + /// + /// + /// C++: implot.h:955, + /// implot.cpp:3867 + ///
void TagX(double x, const ImVec4& col, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Shows a x-axis tag at the specified coordinate value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void TagX_1(double x, float4* col, byte* fmt); + } + } +} diff --git a/Brutal.ImPlot/Generated/PInvoke/TagY.gen.cs b/Brutal.ImPlot/Generated/PInvoke/TagY.gen.cs new file mode 100644 index 0000000..3f37a64 --- /dev/null +++ b/Brutal.ImPlot/Generated/PInvoke/TagY.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +namespace Brutal.ImPlotApi +{ + public partial class ImPlot + { + public unsafe partial class PInvoke + { + /// + /// + /// C++: implot.h:959, + /// implot.cpp:3882 + ///
void TagY(double y, const ImVec4& col, bool round = false) + ///
+ ///
+ /// + /// + /// Shows a y-axis tag at the specified coordinate value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void TagY_0(double y, float4* col, Bool8 round); + + /// + /// + /// C++: implot.h:960, + /// implot.cpp:3888 + ///
void TagY(double y, const ImVec4& col, const char* fmt, ...) IM_FMTARGS(3) + ///
+ ///
+ /// + /// + /// Shows a y-axis tag at the specified coordinate value. + /// + /// + [LibraryImport("implot")] + public static unsafe partial void TagY_1(double y, float4* col, byte* fmt); + } + } +} diff --git a/Brutal.ImPlot/Generated/Structs/ImPlotContext.gen.cs b/Brutal.ImPlot/Generated/Structs/ImPlotContext.gen.cs new file mode 100644 index 0000000..b80ce24 --- /dev/null +++ b/Brutal.ImPlot/Generated/Structs/ImPlotContext.gen.cs @@ -0,0 +1,929 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// ImPlot context (opaque struct, see implot_internal.h) + /// + /// + /// C++: implot.h:77
+ /// struct ImPlotContext + ///
+ ///
+ /// + /// + /// Forward declarations + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 1584)] + public partial struct ImPlotContext + { + /// + /// + /// C++: + /// implot_internal.h:1206 + ///
ImPool<ImPlotPlot> Plots + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(0)] + public ImPool Plots; + + /// + /// + /// C++: + /// implot_internal.h:1207 + ///
ImPool<ImPlotSubplot> Subplots + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(40)] + public ImPool Subplots; + + /// + /// + /// C++: + /// implot_internal.h:1208 + ///
ImPlotPlot* CurrentPlot + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(80)] + public ImPlotPlotPtr CurrentPlot; + + /// + /// + /// C++: + /// implot_internal.h:1209 + ///
ImPlotSubplot* CurrentSubplot + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(88)] + public ImPlotSubplotPtr CurrentSubplot; + + /// + /// + /// C++: + /// implot_internal.h:1210 + ///
ImPlotItemGroup* CurrentItems + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(96)] + public ImPlotItemGroupPtr CurrentItems; + + /// + /// + /// C++: + /// implot_internal.h:1211 + ///
ImPlotItem* CurrentItem + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(104)] + public ImPlotItemPtr CurrentItem; + + /// + /// + /// C++: + /// implot_internal.h:1212 + ///
ImPlotItem* PreviousItem + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + [FieldOffset(112)] + public ImPlotItemPtr PreviousItem; + + /// + /// + /// C++: + /// implot_internal.h:1215 + ///
ImPlotTicker CTicker + ///
+ ///
+ /// + /// + /// Tick Marks and Labels + /// + /// + [FieldOffset(120)] + public ImPlotTicker CTicker; + + /// + /// + /// C++: + /// implot_internal.h:1218 + ///
ImPlotAnnotationCollection Annotations + ///
+ ///
+ /// + /// + /// Annotation and Tabs + /// + /// + [FieldOffset(176)] + public ImPlotAnnotationCollection Annotations; + + /// + /// + /// C++: + /// implot_internal.h:1219 + ///
ImPlotTagCollection Tags + ///
+ ///
+ /// + /// + /// Annotation and Tabs + /// + /// + [FieldOffset(216)] + public ImPlotTagCollection Tags; + + /// + /// + /// C++: + /// implot_internal.h:1222 + ///
ImPlotStyle Style + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + [FieldOffset(256)] + public ImPlotStyle Style; + + /// + /// + /// C++: + /// implot_internal.h:1223 + ///
ImVector<ImGuiColorMod> ColorModifiers + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + [FieldOffset(776)] + public ImVector ColorModifiers; + + /// + /// + /// C++: + /// implot_internal.h:1224 + ///
ImVector<ImGuiStyleMod> StyleModifiers + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + [FieldOffset(792)] + public ImVector StyleModifiers; + + /// + /// + /// C++: + /// implot_internal.h:1225 + ///
ImPlotColormapData ColormapData + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + [FieldOffset(808)] + public ImPlotColormapData ColormapData; + + /// + /// + /// C++: + /// implot_internal.h:1226 + ///
ImVector<ImPlotColormap> ColormapModifiers + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + [FieldOffset(976)] + public ImVector ColormapModifiers; + + /// + /// + /// C++: + /// implot_internal.h:1229 + ///
tm Tm + ///
+ ///
+ /// + /// + /// Time + /// + /// + [FieldOffset(992)] + public tm Tm; + + /// + /// + /// C++: + /// implot_internal.h:1232 + ///
ImVector<double> TempDouble1 + ///
+ ///
+ /// + /// + /// Temp data for general use + /// + /// + [FieldOffset(1032)] + public ImVector TempDouble1; + + /// + /// + /// C++: + /// implot_internal.h:1232 + ///
ImVector<double> TempDouble1, TempDouble2 + ///
+ ///
+ /// + /// + /// Temp data for general use + /// + /// + [FieldOffset(1048)] + public ImVector TempDouble2; + + /// + /// + /// C++: + /// implot_internal.h:1233 + ///
ImVector<int> TempInt1 + ///
+ ///
+ /// + /// + /// Temp data for general use + /// + /// + [FieldOffset(1064)] + public ImVector TempInt1; + + /// + /// + /// C++: + /// implot_internal.h:1236 + ///
int DigitalPlotItemCnt + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1080)] + public int DigitalPlotItemCnt; + + /// + /// + /// C++: + /// implot_internal.h:1237 + ///
int DigitalPlotOffset + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1084)] + public int DigitalPlotOffset; + + /// + /// + /// C++: + /// implot_internal.h:1238 + ///
ImPlotNextPlotData NextPlotData + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1088)] + public ImPlotNextPlotData NextPlotData; + + /// + /// + /// C++: + /// implot_internal.h:1239 + ///
ImPlotNextItemData NextItemData + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1320)] + public ImPlotNextItemData NextItemData; + + /// + /// + /// C++: + /// implot_internal.h:1240 + ///
ImPlotInputMap InputMap + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1448)] + public ImPlotInputMap InputMap; + + /// + /// + /// C++: + /// implot_internal.h:1241 + ///
bool OpenContextThisFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1496)] + public Bool8 OpenContextThisFrame; + + /// + /// + /// C++: + /// implot_internal.h:1242 + ///
ImGuiTextBuffer MousePosStringBuilder + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1504)] + public ImGuiTextBuffer MousePosStringBuilder; + + /// + /// + /// C++: + /// implot_internal.h:1243 + ///
ImPlotItemGroup* SortItems + ///
+ ///
+ /// + /// + /// Misc + /// + /// + [FieldOffset(1520)] + public ImPlotItemGroupPtr SortItems; + + /// + /// + /// C++: + /// implot_internal.h:1246 + ///
ImPool<ImPlotAlignmentData> AlignmentData + ///
+ ///
+ /// + /// + /// Align plots + /// + /// + [FieldOffset(1528)] + public ImPool AlignmentData; + + /// + /// + /// C++: + /// implot_internal.h:1247 + ///
ImPlotAlignmentData* CurrentAlignmentH + ///
+ ///
+ /// + /// + /// Align plots + /// + /// + [FieldOffset(1568)] + public ImPlotAlignmentDataPtr CurrentAlignmentH; + + /// + /// + /// C++: + /// implot_internal.h:1248 + ///
ImPlotAlignmentData* CurrentAlignmentV + ///
+ ///
+ /// + /// + /// Align plots + /// + /// + [FieldOffset(1576)] + public ImPlotAlignmentDataPtr CurrentAlignmentV; + } + + /// + /// + /// ImPlot context (opaque struct, see implot_internal.h) + /// + /// + /// C++: implot.h:77
+ /// struct ImPlotContext + ///
+ ///
+ /// + /// + /// Forward declarations + /// + /// + public unsafe partial struct ImPlotContextPtr(ImPlotContext* ptr) : INullable + { + private ImPlotContext* _ptr = ptr; + public ImPlotContext* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotContextPtr(ImPlotContext* ptr) => new(ptr); + + public static implicit operator ImPlotContext*(ImPlotContextPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: + /// implot_internal.h:1206 + ///
ImPool<ImPlotPlot> Plots + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPool Plots => ref Unsafe.AsRef>(&_ptr->Plots); + + /// + /// + /// C++: + /// implot_internal.h:1207 + ///
ImPool<ImPlotSubplot> Subplots + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPool Subplots => ref Unsafe.AsRef>(&_ptr->Subplots); + + /// + /// + /// C++: + /// implot_internal.h:1208 + ///
ImPlotPlot* CurrentPlot + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPlotPlotPtr CurrentPlot => ref Unsafe.AsRef(&_ptr->CurrentPlot); + + /// + /// + /// C++: + /// implot_internal.h:1209 + ///
ImPlotSubplot* CurrentSubplot + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPlotSubplotPtr CurrentSubplot => ref Unsafe.AsRef(&_ptr->CurrentSubplot); + + /// + /// + /// C++: + /// implot_internal.h:1210 + ///
ImPlotItemGroup* CurrentItems + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPlotItemGroupPtr CurrentItems => ref Unsafe.AsRef(&_ptr->CurrentItems); + + /// + /// + /// C++: + /// implot_internal.h:1211 + ///
ImPlotItem* CurrentItem + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPlotItemPtr CurrentItem => ref Unsafe.AsRef(&_ptr->CurrentItem); + + /// + /// + /// C++: + /// implot_internal.h:1212 + ///
ImPlotItem* PreviousItem + ///
+ ///
+ /// + /// + /// Plot States + /// + /// + public ref ImPlotItemPtr PreviousItem => ref Unsafe.AsRef(&_ptr->PreviousItem); + + /// + /// + /// C++: + /// implot_internal.h:1215 + ///
ImPlotTicker CTicker + ///
+ ///
+ /// + /// + /// Tick Marks and Labels + /// + /// + public ref ImPlotTicker CTicker => ref Unsafe.AsRef(&_ptr->CTicker); + + /// + /// + /// C++: + /// implot_internal.h:1218 + ///
ImPlotAnnotationCollection Annotations + ///
+ ///
+ /// + /// + /// Annotation and Tabs + /// + /// + public ref ImPlotAnnotationCollection Annotations => + ref Unsafe.AsRef(&_ptr->Annotations); + + /// + /// + /// C++: + /// implot_internal.h:1219 + ///
ImPlotTagCollection Tags + ///
+ ///
+ /// + /// + /// Annotation and Tabs + /// + /// + public ref ImPlotTagCollection Tags => ref Unsafe.AsRef(&_ptr->Tags); + + /// + /// + /// C++: + /// implot_internal.h:1222 + ///
ImPlotStyle Style + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + public ref ImPlotStyle Style => ref Unsafe.AsRef(&_ptr->Style); + + /// + /// + /// C++: + /// implot_internal.h:1223 + ///
ImVector<ImGuiColorMod> ColorModifiers + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + public ref ImVector ColorModifiers => + ref Unsafe.AsRef>(&_ptr->ColorModifiers); + + /// + /// + /// C++: + /// implot_internal.h:1224 + ///
ImVector<ImGuiStyleMod> StyleModifiers + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + public ref ImVector StyleModifiers => + ref Unsafe.AsRef>(&_ptr->StyleModifiers); + + /// + /// + /// C++: + /// implot_internal.h:1225 + ///
ImPlotColormapData ColormapData + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + public ref ImPlotColormapData ColormapData => ref Unsafe.AsRef(&_ptr->ColormapData); + + /// + /// + /// C++: + /// implot_internal.h:1226 + ///
ImVector<ImPlotColormap> ColormapModifiers + ///
+ ///
+ /// + /// + /// Style and Colormaps + /// + /// + public ref ImVector ColormapModifiers => ref Unsafe.AsRef>(&_ptr->ColormapModifiers); + + /// + /// + /// C++: + /// implot_internal.h:1229 + ///
tm Tm + ///
+ ///
+ /// + /// + /// Time + /// + /// + public ref tm Tm => ref Unsafe.AsRef(&_ptr->Tm); + + /// + /// + /// C++: + /// implot_internal.h:1232 + ///
ImVector<double> TempDouble1 + ///
+ ///
+ /// + /// + /// Temp data for general use + /// + /// + public ref ImVector TempDouble1 => ref Unsafe.AsRef>(&_ptr->TempDouble1); + + /// + /// + /// C++: + /// implot_internal.h:1232 + ///
ImVector<double> TempDouble1, TempDouble2 + ///
+ ///
+ /// + /// + /// Temp data for general use + /// + /// + public ref ImVector TempDouble2 => ref Unsafe.AsRef>(&_ptr->TempDouble2); + + /// + /// + /// C++: + /// implot_internal.h:1233 + ///
ImVector<int> TempInt1 + ///
+ ///
+ /// + /// + /// Temp data for general use + /// + /// + public ref ImVector TempInt1 => ref Unsafe.AsRef>(&_ptr->TempInt1); + + /// + /// + /// C++: + /// implot_internal.h:1236 + ///
int DigitalPlotItemCnt + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int DigitalPlotItemCnt => ref Unsafe.AsRef(&_ptr->DigitalPlotItemCnt); + + /// + /// + /// C++: + /// implot_internal.h:1237 + ///
int DigitalPlotOffset + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref int DigitalPlotOffset => ref Unsafe.AsRef(&_ptr->DigitalPlotOffset); + + /// + /// + /// C++: + /// implot_internal.h:1238 + ///
ImPlotNextPlotData NextPlotData + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref ImPlotNextPlotData NextPlotData => ref Unsafe.AsRef(&_ptr->NextPlotData); + + /// + /// + /// C++: + /// implot_internal.h:1239 + ///
ImPlotNextItemData NextItemData + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref ImPlotNextItemData NextItemData => ref Unsafe.AsRef(&_ptr->NextItemData); + + /// + /// + /// C++: + /// implot_internal.h:1240 + ///
ImPlotInputMap InputMap + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref ImPlotInputMap InputMap => ref Unsafe.AsRef(&_ptr->InputMap); + + /// + /// + /// C++: + /// implot_internal.h:1241 + ///
bool OpenContextThisFrame + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref bool OpenContextThisFrame => ref Unsafe.AsRef(&_ptr->OpenContextThisFrame); + + /// + /// + /// C++: + /// implot_internal.h:1242 + ///
ImGuiTextBuffer MousePosStringBuilder + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref ImGuiTextBuffer MousePosStringBuilder => + ref Unsafe.AsRef(&_ptr->MousePosStringBuilder); + + /// + /// + /// C++: + /// implot_internal.h:1243 + ///
ImPlotItemGroup* SortItems + ///
+ ///
+ /// + /// + /// Misc + /// + /// + public ref ImPlotItemGroupPtr SortItems => ref Unsafe.AsRef(&_ptr->SortItems); + + /// + /// + /// C++: + /// implot_internal.h:1246 + ///
ImPool<ImPlotAlignmentData> AlignmentData + ///
+ ///
+ /// + /// + /// Align plots + /// + /// + public ref ImPool AlignmentData => + ref Unsafe.AsRef>(&_ptr->AlignmentData); + + /// + /// + /// C++: + /// implot_internal.h:1247 + ///
ImPlotAlignmentData* CurrentAlignmentH + ///
+ ///
+ /// + /// + /// Align plots + /// + /// + public ref ImPlotAlignmentDataPtr CurrentAlignmentH => + ref Unsafe.AsRef(&_ptr->CurrentAlignmentH); + + /// + /// + /// C++: + /// implot_internal.h:1248 + ///
ImPlotAlignmentData* CurrentAlignmentV + ///
+ ///
+ /// + /// + /// Align plots + /// + /// + public ref ImPlotAlignmentDataPtr CurrentAlignmentV => + ref Unsafe.AsRef(&_ptr->CurrentAlignmentV); + } +} diff --git a/Brutal.ImPlot/Generated/Structs/ImPlotInputMap.gen.cs b/Brutal.ImPlot/Generated/Structs/ImPlotInputMap.gen.cs new file mode 100644 index 0000000..2bd770e --- /dev/null +++ b/Brutal.ImPlot/Generated/Structs/ImPlotInputMap.gen.cs @@ -0,0 +1,442 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:566
+ /// struct ImPlotInputMap { + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct ImPlotInputMap + { + /// + /// + /// LMB enables panning when held, + /// + /// + /// C++: implot.h:567
+ /// ImGuiMouseButton Pan + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(0)] + public ImGuiMouseButton Pan; + + /// + /// + /// none optional modifier that must be held for panning/fitting + /// + /// + /// C++: implot.h:568
+ /// int PanMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(4)] + public int PanMod; + + /// + /// + /// LMB initiates fit when double clicked + /// + /// + /// C++: implot.h:569
+ /// ImGuiMouseButton Fit + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(8)] + public ImGuiMouseButton Fit; + + /// + /// + /// RMB begins box selection when pressed and confirms selection when released + /// + /// + /// C++: implot.h:570
+ /// ImGuiMouseButton Select + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(12)] + public ImGuiMouseButton Select; + + /// + /// + /// LMB cancels active box selection when pressed; cannot be same as Select + /// + /// + /// C++: implot.h:571
+ /// ImGuiMouseButton SelectCancel + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(16)] + public ImGuiMouseButton SelectCancel; + + /// + /// + /// none optional modifier that must be held for box selection + /// + /// + /// C++: implot.h:572
+ /// int SelectMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(20)] + public int SelectMod; + + /// + /// + /// Alt expands active box selection horizontally to plot edge when held + /// + /// + /// C++: implot.h:573
+ /// int SelectHorzMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(24)] + public int SelectHorzMod; + + /// + /// + /// Shift expands active box selection vertically to plot edge when held + /// + /// + /// C++: implot.h:574
+ /// int SelectVertMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(28)] + public int SelectVertMod; + + /// + /// + /// RMB opens context menus (if enabled) when clicked + /// + /// + /// C++: implot.h:575
+ /// ImGuiMouseButton Menu + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(32)] + public ImGuiMouseButton Menu; + + /// + /// + /// Ctrl when held, all input is ignored; used to enable axis/plots as DND sources + /// + /// + /// C++: implot.h:576
+ /// int OverrideMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(36)] + public int OverrideMod; + + /// + /// + /// none optional modifier that must be held for scroll wheel zooming + /// + /// + /// C++: implot.h:577
+ /// int ZoomMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(40)] + public int ZoomMod; + + /// + /// + /// 0.1f zoom rate for scroll (e.g. 0.1f = 10% plot range every scroll click); make negative to invert + /// + /// + /// C++: implot.h:578
+ /// float ZoomRate + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + [FieldOffset(44)] + public float ZoomRate; + } + + /// + /// + /// C++: implot.h:566
+ /// struct ImPlotInputMap { + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public unsafe partial struct ImPlotInputMapPtr(ImPlotInputMap* ptr) : INullable + { + private ImPlotInputMap* _ptr = ptr; + public ImPlotInputMap* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotInputMapPtr(ImPlotInputMap* ptr) => new(ptr); + + public static implicit operator ImPlotInputMap*(ImPlotInputMapPtr wrapper) => wrapper.Ptr; + + /// + /// + /// LMB enables panning when held, + /// + /// + /// C++: implot.h:567
+ /// ImGuiMouseButton Pan + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref ImGuiMouseButton Pan => ref Unsafe.AsRef(&_ptr->Pan); + + /// + /// + /// none optional modifier that must be held for panning/fitting + /// + /// + /// C++: implot.h:568
+ /// int PanMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref int PanMod => ref Unsafe.AsRef(&_ptr->PanMod); + + /// + /// + /// LMB initiates fit when double clicked + /// + /// + /// C++: implot.h:569
+ /// ImGuiMouseButton Fit + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref ImGuiMouseButton Fit => ref Unsafe.AsRef(&_ptr->Fit); + + /// + /// + /// RMB begins box selection when pressed and confirms selection when released + /// + /// + /// C++: implot.h:570
+ /// ImGuiMouseButton Select + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref ImGuiMouseButton Select => ref Unsafe.AsRef(&_ptr->Select); + + /// + /// + /// LMB cancels active box selection when pressed; cannot be same as Select + /// + /// + /// C++: implot.h:571
+ /// ImGuiMouseButton SelectCancel + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref ImGuiMouseButton SelectCancel => ref Unsafe.AsRef(&_ptr->SelectCancel); + + /// + /// + /// none optional modifier that must be held for box selection + /// + /// + /// C++: implot.h:572
+ /// int SelectMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref int SelectMod => ref Unsafe.AsRef(&_ptr->SelectMod); + + /// + /// + /// Alt expands active box selection horizontally to plot edge when held + /// + /// + /// C++: implot.h:573
+ /// int SelectHorzMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref int SelectHorzMod => ref Unsafe.AsRef(&_ptr->SelectHorzMod); + + /// + /// + /// Shift expands active box selection vertically to plot edge when held + /// + /// + /// C++: implot.h:574
+ /// int SelectVertMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref int SelectVertMod => ref Unsafe.AsRef(&_ptr->SelectVertMod); + + /// + /// + /// RMB opens context menus (if enabled) when clicked + /// + /// + /// C++: implot.h:575
+ /// ImGuiMouseButton Menu + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref ImGuiMouseButton Menu => ref Unsafe.AsRef(&_ptr->Menu); + + /// + /// + /// Ctrl when held, all input is ignored; used to enable axis/plots as DND sources + /// + /// + /// C++: implot.h:576
+ /// int OverrideMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref int OverrideMod => ref Unsafe.AsRef(&_ptr->OverrideMod); + + /// + /// + /// none optional modifier that must be held for scroll wheel zooming + /// + /// + /// C++: implot.h:577
+ /// int ZoomMod + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref int ZoomMod => ref Unsafe.AsRef(&_ptr->ZoomMod); + + /// + /// + /// 0.1f zoom rate for scroll (e.g. 0.1f = 10% plot range every scroll click); make negative to invert + /// + /// + /// C++: implot.h:578
+ /// float ZoomRate + ///
+ ///
+ /// + /// + /// Input mapping structure. Default values listed. See also MapInputDefault, MapInputReverse. + /// + /// + public ref float ZoomRate => ref Unsafe.AsRef(&_ptr->ZoomRate); + } +} diff --git a/Brutal.ImPlot/Generated/Structs/ImPlotRange.gen.cs b/Brutal.ImPlot/Generated/Structs/ImPlotRange.gen.cs new file mode 100644 index 0000000..f43fad4 --- /dev/null +++ b/Brutal.ImPlot/Generated/Structs/ImPlotRange.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:485
+ /// struct ImPlotRange { + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ImPlotRange + { + /// + /// + /// C++: implot.h:486
+ /// double Min + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + [FieldOffset(0)] + public double Min; + + /// + /// + /// C++: implot.h:486
+ /// double Min, Max + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + [FieldOffset(8)] + public double Max; + } + + /// + /// + /// C++: implot.h:485
+ /// struct ImPlotRange { + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + public unsafe partial struct ImPlotRangePtr(ImPlotRange* ptr) : INullable + { + private ImPlotRange* _ptr = ptr; + public ImPlotRange* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotRangePtr(ImPlotRange* ptr) => new(ptr); + + public static implicit operator ImPlotRange*(ImPlotRangePtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: implot.h:486
+ /// double Min + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + public ref double Min => ref Unsafe.AsRef(&_ptr->Min); + + /// + /// + /// C++: implot.h:486
+ /// double Min, Max + ///
+ ///
+ /// + /// + /// Range defined by a min/max value. + /// + /// + public ref double Max => ref Unsafe.AsRef(&_ptr->Max); + } +} diff --git a/Brutal.ImPlot/Generated/Structs/ImPlotRect.gen.cs b/Brutal.ImPlot/Generated/Structs/ImPlotRect.gen.cs new file mode 100644 index 0000000..204f6eb --- /dev/null +++ b/Brutal.ImPlot/Generated/Structs/ImPlotRect.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:495
+ /// struct ImPlotRect { + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct ImPlotRect + { + /// + /// + /// C++: implot.h:496
+ /// ImPlotRange X + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [FieldOffset(0)] + public ImPlotRange X; + + /// + /// + /// C++: implot.h:496
+ /// ImPlotRange X, Y + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + [FieldOffset(16)] + public ImPlotRange Y; + } + + /// + /// + /// C++: implot.h:495
+ /// struct ImPlotRect { + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public unsafe partial struct ImPlotRectPtr(ImPlotRect* ptr) : INullable + { + private ImPlotRect* _ptr = ptr; + public ImPlotRect* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotRectPtr(ImPlotRect* ptr) => new(ptr); + + public static implicit operator ImPlotRect*(ImPlotRectPtr wrapper) => wrapper.Ptr; + + /// + /// + /// C++: implot.h:496
+ /// ImPlotRange X + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public ref ImPlotRange X => ref Unsafe.AsRef(&_ptr->X); + + /// + /// + /// C++: implot.h:496
+ /// ImPlotRange X, Y + ///
+ ///
+ /// + /// + /// Combination of two range limits for X and Y axes. Also an AABB defined by Min()/Max(). + /// + /// + public ref ImPlotRange Y => ref Unsafe.AsRef(&_ptr->Y); + } +} diff --git a/Brutal.ImPlot/Generated/Structs/ImPlotStyle.gen.cs b/Brutal.ImPlot/Generated/Structs/ImPlotStyle.gen.cs new file mode 100644 index 0000000..ce9b896 --- /dev/null +++ b/Brutal.ImPlot/Generated/Structs/ImPlotStyle.gen.cs @@ -0,0 +1,1106 @@ +// +// Generated by Brutal.ImGui.Generator; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; + +namespace Brutal.ImPlotApi +{ + /// + /// + /// C++: implot.h:509
+ /// struct ImPlotStyle { + ///
+ ///
+ /// + /// + /// Plot style structure + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 516)] + public partial struct ImPlotStyle + { + /// + /// + /// = 1, item line weight in pixels + /// + /// + /// C++: implot.h:511
+ /// float LineWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(0)] + public float LineWeight; + + /// + /// + /// = ImPlotMarker_None, marker specification + /// + /// + /// C++: implot.h:512
+ /// int Marker + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(4)] + public int Marker; + + /// + /// + /// = 4, marker size in pixels (roughly the marker's "radius") + /// + /// + /// C++: implot.h:513
+ /// float MarkerSize + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(8)] + public float MarkerSize; + + /// + /// + /// = 1, outline weight of markers in pixels + /// + /// + /// C++: implot.h:514
+ /// float MarkerWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(12)] + public float MarkerWeight; + + /// + /// + /// = 1, alpha modifier applied to plot fills + /// + /// + /// C++: implot.h:515
+ /// float FillAlpha + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(16)] + public float FillAlpha; + + /// + /// + /// = 5, error bar whisker width in pixels + /// + /// + /// C++: implot.h:516
+ /// float ErrorBarSize + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(20)] + public float ErrorBarSize; + + /// + /// + /// = 1.5, error bar whisker weight in pixels + /// + /// + /// C++: implot.h:517
+ /// float ErrorBarWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(24)] + public float ErrorBarWeight; + + /// + /// + /// = 8, digital channels bit height (at y = 1.0f) in pixels + /// + /// + /// C++: implot.h:518
+ /// float DigitalBitHeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(28)] + public float DigitalBitHeight; + + /// + /// + /// = 4, digital channels bit padding gap in pixels + /// + /// + /// C++: implot.h:519
+ /// float DigitalBitGap + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + [FieldOffset(32)] + public float DigitalBitGap; + + /// + /// + /// = 1, line thickness of border around plot area + /// + /// + /// C++: implot.h:521
+ /// float PlotBorderSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(36)] + public float PlotBorderSize; + + /// + /// + /// = 0.25 alpha multiplier applied to minor axis grid lines + /// + /// + /// C++: implot.h:522
+ /// float MinorAlpha + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(40)] + public float MinorAlpha; + + /// + /// + /// = 10,10 major tick lengths for X and Y axes + /// + /// + /// C++: implot.h:523
+ /// ImVec2 MajorTickLen + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(44)] + public float2 MajorTickLen; + + /// + /// + /// = 5,5 minor tick lengths for X and Y axes + /// + /// + /// C++: implot.h:524
+ /// ImVec2 MinorTickLen + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(52)] + public float2 MinorTickLen; + + /// + /// + /// = 1,1 line thickness of major ticks + /// + /// + /// C++: implot.h:525
+ /// ImVec2 MajorTickSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(60)] + public float2 MajorTickSize; + + /// + /// + /// = 1,1 line thickness of minor ticks + /// + /// + /// C++: implot.h:526
+ /// ImVec2 MinorTickSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(68)] + public float2 MinorTickSize; + + /// + /// + /// = 1,1 line thickness of major grid lines + /// + /// + /// C++: implot.h:527
+ /// ImVec2 MajorGridSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(76)] + public float2 MajorGridSize; + + /// + /// + /// = 1,1 line thickness of minor grid lines + /// + /// + /// C++: implot.h:528
+ /// ImVec2 MinorGridSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(84)] + public float2 MinorGridSize; + + /// + /// + /// = 10,10 padding between widget frame and plot area, labels, or outside legends (i.e. main padding) + /// + /// + /// C++: implot.h:529
+ /// ImVec2 PlotPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(92)] + public float2 PlotPadding; + + /// + /// + /// = 5,5 padding between axes labels, tick labels, and plot edge + /// + /// + /// C++: implot.h:530
+ /// ImVec2 LabelPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(100)] + public float2 LabelPadding; + + /// + /// + /// = 10,10 legend padding from plot edges + /// + /// + /// C++: implot.h:531
+ /// ImVec2 LegendPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(108)] + public float2 LegendPadding; + + /// + /// + /// = 5,5 legend inner padding from legend edges + /// + /// + /// C++: implot.h:532
+ /// ImVec2 LegendInnerPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(116)] + public float2 LegendInnerPadding; + + /// + /// + /// = 5,0 spacing between legend entries + /// + /// + /// C++: implot.h:533
+ /// ImVec2 LegendSpacing + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(124)] + public float2 LegendSpacing; + + /// + /// + /// = 10,10 padding between plot edge and interior mouse location text + /// + /// + /// C++: implot.h:534
+ /// ImVec2 MousePosPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(132)] + public float2 MousePosPadding; + + /// + /// + /// = 2,2 text padding around annotation labels + /// + /// + /// C++: implot.h:535
+ /// ImVec2 AnnotationPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(140)] + public float2 AnnotationPadding; + + /// + /// + /// = 0,0 additional fit padding as a percentage of the fit extents (e.g. ImVec2(0.1f,0.1f) adds 10% to + /// the fit extents of X and Y) + /// + /// + /// C++: implot.h:536
+ /// ImVec2 FitPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(148)] + public float2 FitPadding; + + /// + /// + /// = 400,300 default size used when ImVec2(0,0) is passed to BeginPlot + /// + /// + /// C++: implot.h:537
+ /// ImVec2 PlotDefaultSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(156)] + public float2 PlotDefaultSize; + + /// + /// + /// = 200,150 minimum size plot frame can be when shrunk + /// + /// + /// C++: implot.h:538
+ /// ImVec2 PlotMinSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + [FieldOffset(164)] + public float2 PlotMinSize; + + /// + /// + /// Array of styling colors. Indexable with ImPlotCol_ enums. + /// + /// + /// C++: implot.h:540
+ /// ImVec4 Colors[ImPlotCol_COUNT] + ///
+ ///
+ /// + /// + /// style colors + /// + /// + [FieldOffset(172)] + public float4_21 Colors; + + /// + /// + /// The current colormap. Set this to either an ImPlotColormap_ enum or an index returned by AddColormap. + /// + /// + /// C++: implot.h:542
+ /// ImPlotColormap Colormap + ///
+ ///
+ /// + /// + /// colormap + /// + /// + [FieldOffset(508)] + public ImPlotColormap Colormap; + + /// + /// + /// = false, axis labels will be formatted for your timezone when ImPlotAxisFlag_Time is enabled + /// + /// + /// C++: implot.h:544
+ /// bool UseLocalTime + ///
+ ///
+ /// + /// + /// settings/flags + /// + /// + [FieldOffset(512)] + public Bool8 UseLocalTime; + + /// + /// + /// = false, dates will be formatted according to ISO 8601 where applicable (e.g. YYYY-MM-DD, YYYY-MM, + /// --MM-DD, etc.) + /// + /// + /// C++: implot.h:545
+ /// bool UseISO8601 + ///
+ ///
+ /// + /// + /// settings/flags + /// + /// + [FieldOffset(513)] + public Bool8 UseISO8601; + + /// + /// + /// = false, times will be formatted using a 24 hour clock + /// + /// + /// C++: implot.h:546
+ /// bool Use24HourClock + ///
+ ///
+ /// + /// + /// settings/flags + /// + /// + [FieldOffset(514)] + public Bool8 Use24HourClock; + } + + /// + /// + /// C++: implot.h:509
+ /// struct ImPlotStyle { + ///
+ ///
+ /// + /// + /// Plot style structure + /// + /// + public unsafe partial struct ImPlotStylePtr(ImPlotStyle* ptr) : INullable + { + private ImPlotStyle* _ptr = ptr; + public ImPlotStyle* Ptr => _ptr; + + public bool IsNull() => _ptr is null; + + public static implicit operator ImPlotStylePtr(ImPlotStyle* ptr) => new(ptr); + + public static implicit operator ImPlotStyle*(ImPlotStylePtr wrapper) => wrapper.Ptr; + + /// + /// + /// = 1, item line weight in pixels + /// + /// + /// C++: implot.h:511
+ /// float LineWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float LineWeight => ref Unsafe.AsRef(&_ptr->LineWeight); + + /// + /// + /// = ImPlotMarker_None, marker specification + /// + /// + /// C++: implot.h:512
+ /// int Marker + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref int Marker => ref Unsafe.AsRef(&_ptr->Marker); + + /// + /// + /// = 4, marker size in pixels (roughly the marker's "radius") + /// + /// + /// C++: implot.h:513
+ /// float MarkerSize + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float MarkerSize => ref Unsafe.AsRef(&_ptr->MarkerSize); + + /// + /// + /// = 1, outline weight of markers in pixels + /// + /// + /// C++: implot.h:514
+ /// float MarkerWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float MarkerWeight => ref Unsafe.AsRef(&_ptr->MarkerWeight); + + /// + /// + /// = 1, alpha modifier applied to plot fills + /// + /// + /// C++: implot.h:515
+ /// float FillAlpha + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float FillAlpha => ref Unsafe.AsRef(&_ptr->FillAlpha); + + /// + /// + /// = 5, error bar whisker width in pixels + /// + /// + /// C++: implot.h:516
+ /// float ErrorBarSize + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float ErrorBarSize => ref Unsafe.AsRef(&_ptr->ErrorBarSize); + + /// + /// + /// = 1.5, error bar whisker weight in pixels + /// + /// + /// C++: implot.h:517
+ /// float ErrorBarWeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float ErrorBarWeight => ref Unsafe.AsRef(&_ptr->ErrorBarWeight); + + /// + /// + /// = 8, digital channels bit height (at y = 1.0f) in pixels + /// + /// + /// C++: implot.h:518
+ /// float DigitalBitHeight + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float DigitalBitHeight => ref Unsafe.AsRef(&_ptr->DigitalBitHeight); + + /// + /// + /// = 4, digital channels bit padding gap in pixels + /// + /// + /// C++: implot.h:519
+ /// float DigitalBitGap + ///
+ ///
+ /// + /// + /// item styling variables + /// + /// + public ref float DigitalBitGap => ref Unsafe.AsRef(&_ptr->DigitalBitGap); + + /// + /// + /// = 1, line thickness of border around plot area + /// + /// + /// C++: implot.h:521
+ /// float PlotBorderSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float PlotBorderSize => ref Unsafe.AsRef(&_ptr->PlotBorderSize); + + /// + /// + /// = 0.25 alpha multiplier applied to minor axis grid lines + /// + /// + /// C++: implot.h:522
+ /// float MinorAlpha + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float MinorAlpha => ref Unsafe.AsRef(&_ptr->MinorAlpha); + + /// + /// + /// = 10,10 major tick lengths for X and Y axes + /// + /// + /// C++: implot.h:523
+ /// ImVec2 MajorTickLen + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MajorTickLen => ref Unsafe.AsRef(&_ptr->MajorTickLen); + + /// + /// + /// = 5,5 minor tick lengths for X and Y axes + /// + /// + /// C++: implot.h:524
+ /// ImVec2 MinorTickLen + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MinorTickLen => ref Unsafe.AsRef(&_ptr->MinorTickLen); + + /// + /// + /// = 1,1 line thickness of major ticks + /// + /// + /// C++: implot.h:525
+ /// ImVec2 MajorTickSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MajorTickSize => ref Unsafe.AsRef(&_ptr->MajorTickSize); + + /// + /// + /// = 1,1 line thickness of minor ticks + /// + /// + /// C++: implot.h:526
+ /// ImVec2 MinorTickSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MinorTickSize => ref Unsafe.AsRef(&_ptr->MinorTickSize); + + /// + /// + /// = 1,1 line thickness of major grid lines + /// + /// + /// C++: implot.h:527
+ /// ImVec2 MajorGridSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MajorGridSize => ref Unsafe.AsRef(&_ptr->MajorGridSize); + + /// + /// + /// = 1,1 line thickness of minor grid lines + /// + /// + /// C++: implot.h:528
+ /// ImVec2 MinorGridSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MinorGridSize => ref Unsafe.AsRef(&_ptr->MinorGridSize); + + /// + /// + /// = 10,10 padding between widget frame and plot area, labels, or outside legends (i.e. main padding) + /// + /// + /// C++: implot.h:529
+ /// ImVec2 PlotPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 PlotPadding => ref Unsafe.AsRef(&_ptr->PlotPadding); + + /// + /// + /// = 5,5 padding between axes labels, tick labels, and plot edge + /// + /// + /// C++: implot.h:530
+ /// ImVec2 LabelPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 LabelPadding => ref Unsafe.AsRef(&_ptr->LabelPadding); + + /// + /// + /// = 10,10 legend padding from plot edges + /// + /// + /// C++: implot.h:531
+ /// ImVec2 LegendPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 LegendPadding => ref Unsafe.AsRef(&_ptr->LegendPadding); + + /// + /// + /// = 5,5 legend inner padding from legend edges + /// + /// + /// C++: implot.h:532
+ /// ImVec2 LegendInnerPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 LegendInnerPadding => ref Unsafe.AsRef(&_ptr->LegendInnerPadding); + + /// + /// + /// = 5,0 spacing between legend entries + /// + /// + /// C++: implot.h:533
+ /// ImVec2 LegendSpacing + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 LegendSpacing => ref Unsafe.AsRef(&_ptr->LegendSpacing); + + /// + /// + /// = 10,10 padding between plot edge and interior mouse location text + /// + /// + /// C++: implot.h:534
+ /// ImVec2 MousePosPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 MousePosPadding => ref Unsafe.AsRef(&_ptr->MousePosPadding); + + /// + /// + /// = 2,2 text padding around annotation labels + /// + /// + /// C++: implot.h:535
+ /// ImVec2 AnnotationPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 AnnotationPadding => ref Unsafe.AsRef(&_ptr->AnnotationPadding); + + /// + /// + /// = 0,0 additional fit padding as a percentage of the fit extents (e.g. ImVec2(0.1f,0.1f) adds 10% to + /// the fit extents of X and Y) + /// + /// + /// C++: implot.h:536
+ /// ImVec2 FitPadding + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 FitPadding => ref Unsafe.AsRef(&_ptr->FitPadding); + + /// + /// + /// = 400,300 default size used when ImVec2(0,0) is passed to BeginPlot + /// + /// + /// C++: implot.h:537
+ /// ImVec2 PlotDefaultSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 PlotDefaultSize => ref Unsafe.AsRef(&_ptr->PlotDefaultSize); + + /// + /// + /// = 200,150 minimum size plot frame can be when shrunk + /// + /// + /// C++: implot.h:538
+ /// ImVec2 PlotMinSize + ///
+ ///
+ /// + /// + /// plot styling variables + /// + /// + public ref float2 PlotMinSize => ref Unsafe.AsRef(&_ptr->PlotMinSize); + + /// + /// + /// Array of styling colors. Indexable with ImPlotCol_ enums. + /// + /// + /// C++: implot.h:540
+ /// ImVec4 Colors[ImPlotCol_COUNT] + ///
+ ///
+ /// + /// + /// style colors + /// + /// + public ref float4_21 Colors => ref Unsafe.AsRef(&_ptr->Colors); + + /// + /// + /// The current colormap. Set this to either an ImPlotColormap_ enum or an index returned by AddColormap. + /// + /// + /// C++: implot.h:542
+ /// ImPlotColormap Colormap + ///
+ ///
+ /// + /// + /// colormap + /// + /// + public ref ImPlotColormap Colormap => ref Unsafe.AsRef(&_ptr->Colormap); + + /// + /// + /// = false, axis labels will be formatted for your timezone when ImPlotAxisFlag_Time is enabled + /// + /// + /// C++: implot.h:544
+ /// bool UseLocalTime + ///
+ ///
+ /// + /// + /// settings/flags + /// + /// + public ref bool UseLocalTime => ref Unsafe.AsRef(&_ptr->UseLocalTime); + + /// + /// + /// = false, dates will be formatted according to ISO 8601 where applicable (e.g. YYYY-MM-DD, YYYY-MM, + /// --MM-DD, etc.) + /// + /// + /// C++: implot.h:545
+ /// bool UseISO8601 + ///
+ ///
+ /// + /// + /// settings/flags + /// + /// + public ref bool UseISO8601 => ref Unsafe.AsRef(&_ptr->UseISO8601); + + /// + /// + /// = false, times will be formatted using a 24 hour clock + /// + /// + /// C++: implot.h:546
+ /// bool Use24HourClock + ///
+ ///
+ /// + /// + /// settings/flags + /// + /// + public ref bool Use24HourClock => ref Unsafe.AsRef(&_ptr->Use24HourClock); + } +} diff --git a/Brutal.ImPlot/GlobalUsings.cs b/Brutal.ImPlot/GlobalUsings.cs new file mode 100644 index 0000000..7afd0d6 --- /dev/null +++ b/Brutal.ImPlot/GlobalUsings.cs @@ -0,0 +1,12 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.ImGuiApi; +global using Brutal.ImGuiApi.Internal; +global using Brutal.ImPlotApi.InlineArrays; +global using Brutal.ImPlotApi.Internal; +global using Brutal.ImPlotApi.Internal.InlineArrays; +global using Brutal.Numerics; +global using Brutal.Pointers; +global using Brutal.Pointers.Extensions; +global using Brutal.Strings; +global using PInvoke = Brutal.ImPlotApi.ImPlot.PInvoke; diff --git a/Brutal.ImPlot/Manual/ImPlot.Internal.cs b/Brutal.ImPlot/Manual/ImPlot.Internal.cs new file mode 100644 index 0000000..86b1e33 --- /dev/null +++ b/Brutal.ImPlot/Manual/ImPlot.Internal.cs @@ -0,0 +1,15 @@ +namespace Brutal.ImPlotApi +{ + public abstract partial class ImPlot + { + public abstract partial class Internal : Brutal.ImPlotApi.ImPlot + { + public new abstract class PInvoke : Brutal.ImPlotApi.Internal.PInvoke; + } + } +} + +namespace Brutal.ImPlotApi.Internal +{ + public abstract partial class PInvoke : Brutal.ImPlotApi.ImPlot.PInvoke; +} diff --git a/Brutal.ImPlot/Manual/Macros.manual.cs b/Brutal.ImPlot/Manual/Macros.manual.cs new file mode 100644 index 0000000..317b5c9 --- /dev/null +++ b/Brutal.ImPlot/Manual/Macros.manual.cs @@ -0,0 +1,6 @@ +namespace Brutal.ImPlotApi; + +public static partial class Constants +{ + public static readonly float4 IMPLOT_AUTO_COL = new(0, 0, 0, -1); +} diff --git a/Brutal.ImPlot/Manual/PlotLine.manual.cs b/Brutal.ImPlot/Manual/PlotLine.manual.cs new file mode 100644 index 0000000..1242ca7 --- /dev/null +++ b/Brutal.ImPlot/Manual/PlotLine.manual.cs @@ -0,0 +1,40 @@ +namespace Brutal.ImPlotApi; + +public partial class ImPlot +{ + public static void PlotLine( + ImString labelId, + ReadOnlySpan values, + ImPlotLineFlags flags = default, + int offset = 0 + ) + { + unsafe + { + fixed (float2* valuesPtr = values) + { + var xs = (float*)valuesPtr; + var ys = xs + 1; + PlotLine(labelId, xs, ys, values.Length, flags, offset, sizeof(float2)); + } + } + } + + public static void PlotLine( + ImString labelId, + ReadOnlySpan values, + ImPlotLineFlags flags = default, + int offset = 0 + ) + { + unsafe + { + fixed (double2* valuesPtr = values) + { + var xs = (double*)valuesPtr; + var ys = xs + 1; + PlotLine(labelId, xs, ys, values.Length, flags, offset, sizeof(double2)); + } + } + } +} diff --git a/Brutal.ImPlot/Manual/PlotShaded.manual.cs b/Brutal.ImPlot/Manual/PlotShaded.manual.cs new file mode 100644 index 0000000..e4875e0 --- /dev/null +++ b/Brutal.ImPlot/Manual/PlotShaded.manual.cs @@ -0,0 +1,23 @@ +namespace Brutal.ImPlotApi; + +public partial class ImPlot +{ + public static void PlotShaded( + ImString labelId, + ReadOnlySpan values, + double yref = 0d, + ImPlotShadedFlags flags = default, + int offset = 0 + ) + { + unsafe + { + fixed (float2* valuesPtr = values) + { + var xsPtr = (float*)valuesPtr; + var ysPtr = xsPtr + 1; + PlotShaded(labelId, xsPtr, ysPtr, values.Length, yref, flags, offset, sizeof(float2)); + } + } + } +} diff --git a/Brutal.ImPlot/Manual/TODO.cs b/Brutal.ImPlot/Manual/TODO.cs new file mode 100644 index 0000000..9711ae9 --- /dev/null +++ b/Brutal.ImPlot/Manual/TODO.cs @@ -0,0 +1 @@ +global using tm = System.DateTime; // TODO: wrap C++ tm? diff --git a/Brutal.Interop/IInteropHandle.cs b/Brutal.Interop/IInteropHandle.cs new file mode 100644 index 0000000..9508f26 --- /dev/null +++ b/Brutal.Interop/IInteropHandle.cs @@ -0,0 +1,11 @@ +namespace Brutal.Interop; + +/// +/// Describes an object that can be marshalled between managed and unmanaged code via a typed handle. +/// +public interface IInteropHandle : INullable + where THandle : unmanaged + where TSelf : struct, IInteropHandle +{ + THandle Pointer { get; init; } +} diff --git a/Brutal.Interop/InteropHandleAttribute.cs b/Brutal.Interop/InteropHandleAttribute.cs new file mode 100644 index 0000000..991d257 --- /dev/null +++ b/Brutal.Interop/InteropHandleAttribute.cs @@ -0,0 +1,6 @@ +using System; + +namespace Brutal.Interop; + +[AttributeUsage(AttributeTargets.Struct)] +public sealed class InteropHandleAttribute : Attribute { } diff --git a/Brutal.Interop/InteropHandleMarshaller.cs b/Brutal.Interop/InteropHandleMarshaller.cs new file mode 100644 index 0000000..d04f807 --- /dev/null +++ b/Brutal.Interop/InteropHandleMarshaller.cs @@ -0,0 +1,18 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.Interop; + +[CustomMarshaller( + typeof(CustomMarshallerAttribute.GenericPlaceholder), + MarshalMode.Default, + typeof(InteropHandleMarshaller<,>) +)] +public static class InteropHandleMarshaller + where THandle : unmanaged + where T : struct, IInteropHandle +{ + public static THandle ConvertToUnmanaged(T managed) => managed.Pointer; + + public static T ConvertToManaged(THandle unmanaged) => Unsafe.As(ref unmanaged); +} diff --git a/Brutal.Interop/InteropNullableStringMarshaller.cs b/Brutal.Interop/InteropNullableStringMarshaller.cs new file mode 100644 index 0000000..ffd2578 --- /dev/null +++ b/Brutal.Interop/InteropNullableStringMarshaller.cs @@ -0,0 +1,30 @@ +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.Interop; + +/// +/// Marshaller for UTF-8 strings whose out direction preserves a NULL native +/// pointer as . The null-preserving sibling of +/// , for native APIs that use a NULL +/// return as a failure or absence sentinel. +/// +[CustomMarshaller( + typeof(string), + MarshalMode.ManagedToUnmanagedIn, + typeof(InteropStringMarshaller.ManagedToUnmanagedIn) +)] // string parameter, shared with the non-nullable sibling +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedOut, typeof(ManagedToUnmanagedOut))] // return string? +public static unsafe class InteropNullableStringMarshaller +{ + public static class ManagedToUnmanagedOut + { + public static string? ConvertToManaged(byte* unmanaged) + { + if (unmanaged == null) + return null; + + return Marshal.PtrToStringUTF8((IntPtr)unmanaged); + } + } +} diff --git a/Brutal.Interop/InteropStringMarshaller.cs b/Brutal.Interop/InteropStringMarshaller.cs new file mode 100644 index 0000000..a62caec --- /dev/null +++ b/Brutal.Interop/InteropStringMarshaller.cs @@ -0,0 +1,178 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; +using System.Text; + +namespace Brutal.Interop; + +/// +/// Marshaller for UTF-8 strings. +/// +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedIn, typeof(ManagedToUnmanagedIn))] // string parameter +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedOut, typeof(ManagedToUnmanagedOut))] // return string +//[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedRef, typeof(ManagedToUnmanagedRef))] +//[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedIn, typeof(UnmanagedToManagedIn))] +//[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedRef, typeof(UnmanagedToManagedRef))] +//[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedOut, typeof(UnmanagedToManagedOut))] +//[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedIn, typeof(ManagedToUnmanagedIn))] +public static unsafe class InteropStringMarshaller +{ + /// + /// Custom marshaller to marshal a managed string as a UTF-8 unmanaged string. + /// + public ref struct ManagedToUnmanagedIn + { + /// + /// Gets the requested buffer size for optimized marshalling. + /// + public static int BufferSize => 0x100; + + private byte* _unmanagedValue; + private bool _allocated; + + /// + /// Initializes the marshaller with a managed string and requested buffer. + /// + /// The managed string with which to initialize the marshaller. + /// The request buffer whose size is at least . + public void FromManaged(string? managed, Span buffer) + { + _allocated = false; + + if (managed is null) + { + _unmanagedValue = null; + return; + } + + const int MaxUtf8BytesPerChar = 3; + + // >= for null terminator + // Use the cast to long to avoid the checked operation + if ((long)MaxUtf8BytesPerChar * managed.Length >= buffer.Length) + { + // Calculate accurate byte count when the provided stack-allocated buffer is not sufficient + int exactByteCount = checked(Encoding.UTF8.GetByteCount(managed) + 1); // + 1 for null terminator + if (exactByteCount > buffer.Length) + { + buffer = new Span( + (byte*)NativeMemory.Alloc((nuint)exactByteCount), + exactByteCount + ); + _allocated = true; + } + } + + // Unsafe.AsPointer is safe since buffer must be pinned + _unmanagedValue = (byte*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(buffer)); + + int byteCount = Encoding.UTF8.GetBytes(managed, buffer); + buffer[byteCount] = 0; // null-terminate + } + + /// + /// Converts the current managed string to an unmanaged string. + /// + /// An unmanaged string. + public byte* ToUnmanaged() => _unmanagedValue; + + /// + /// Frees any allocated unmanaged memory. + /// + public void Free() + { + if (_allocated) + NativeMemory.Free(_unmanagedValue); + } + } + + public static class ManagedToUnmanagedOut + { + public static string ConvertToManaged(byte* unmanaged) + { + if (unmanaged == null) + return string.Empty; + + var result = Marshal.PtrToStringUTF8((IntPtr)unmanaged); + + if (result is null) + return string.Empty; + + return result; + } + } + + /* + public ref struct ManagedToUnmanagedRef + { + public void FromManaged(string managed) { } + + public void FromUnmanaged(byte* unmanaged) + { + } + + public string ToManaged() + { + return ""; + } + + public byte* ToUnmanaged() + { + return null; + } + + public void Free() { } + } + + + public ref struct UnmanagedToManagedOut + { + public void FromManaged(string managed) { } + + public byte* ToUnmanaged() + { + return null; + } + + public void Free() { } + } + + public ref struct UnmanagedToManagedRef + { + public void FromManaged(string managed) { } + + public void FromUnmanaged(byte* unmanaged) + { + } + + public string ToManaged() + { + return ""; + } + + public byte* ToUnmanaged() + { + return null; + } + + public void Free() { } + } + + public ref struct UnmanagedToManagedIn + { + private byte* _unmanagedValue; + + public void FromUnmanaged(byte* unmanaged) + { + _unmanagedValue = unmanaged; + } + + public string ToManaged() + { + return ""; + } + + public void Free() { } + } + */ +} diff --git a/Brutal.Jolt/Generated/Classes/AABBTreeBuilder.gen.cs b/Brutal.Jolt/Generated/Classes/AABBTreeBuilder.gen.cs new file mode 100644 index 0000000..98266c1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/AABBTreeBuilder.gen.cs @@ -0,0 +1,65 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Helper class to build an AABB tree + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:35 + ///
+ /// class AABBTreeBuilder + ///
+ ///
+ [InteropHandle] + public readonly partial struct AABBTreeBuilder : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:101 + ///
+ /// explicit AABBTreeBuilder(TriangleSplitter &inSplitter, uint inMaxTrianglesPerLeaf = 16) + ///
+ ///
+ public static AABBTreeBuilder Create(TriangleSplitter splitter, uint maxTrianglesPerLeaf = 16) => + Jolt.PInvoke.AABBTreeBuilder_Create(splitter, maxTrianglesPerLeaf); + + /// + /// + /// Get all triangles + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:110 + ///
+ /// const Array<IndexedTriangle> &GetTriangles() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetTriangles() + { + Jolt.PInvoke.AABBTreeBuilder_GetTriangles(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + public void Dispose() => Jolt.PInvoke.AABBTreeBuilder_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/AngleConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/AngleConstraintPart.gen.cs new file mode 100644 index 0000000..0a3a66e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/AngleConstraintPart.gen.cs @@ -0,0 +1,359 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constraint that constrains rotation along 1 axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:36 + ///
+ /// class AngleConstraintPart + ///
+ ///
+ /// + /// + /// Constraint that constrains rotation along 1 axis + /// + /// Based on: "Constraints Derivation for Rigid Body Simulation in 3D" - Daniel Chappuis, see section 2.4.5 + /// + /// Constraint equation (eq 108): + /// + /// \f[C = \theta(t) - \theta_{min}\f] + /// + /// Jacobian (eq 109): + /// + /// \f[J = \begin{bmatrix}0 & -a^T & 0 & a^T\end{bmatrix}\f] + /// + /// Used terms (here and below, everything in world space):\n + /// a = axis around which rotation is constrained (normalized).\n + /// x1, x2 = center of mass for the bodies.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// b = velocity bias.\n + /// \f$\beta\f$ = baumgarte constant. + /// + /// + [InteropHandle] + public readonly partial struct AngleConstraintPart : IDisposable + { + public static AngleConstraintPart Create() => Jolt.PInvoke.AngleConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below. Creates a constraint without spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:81 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias = 0.0f) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below. Creates a constraint without spring. + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis The axis of rotation along which the constraint acts (normalized) + /// Set the following terms to zero if you don't want to drive the constraint to zero with a spring: + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// + /// + public void CalculateConstraintProperties(Body body1, Body body2, float3 worldSpaceAxis, float bias = 0f) => + Jolt.PInvoke.AngleConstraintPart_CalculateConstraintProperties(this, body1, body2, worldSpaceAxis, bias); + + /// + /// + /// Calculate properties used during the functions below. Set inFrequency to zero if you don't want to drive + /// using a spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:103 + ///
+ /// inline void CalculateConstraintPropertiesWithFrequencyAndDamping(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inFrequency, float inDamping) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below. Set inFrequency to zero if you don't want to drive using a spring. + /// @param inDeltaTime Time step + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis The axis of rotation along which the constraint acts (normalized) + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C) + /// @param inFrequency Oscillation frequency (Hz) + /// @param inDamping Damping factor (0 = no damping, 1 = critical damping) + /// + /// + public void CalculateConstraintPropertiesWithFrequencyAndDamping( + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + float frequency, + float damping + ) => + Jolt.PInvoke.AngleConstraintPart_CalculateConstraintPropertiesWithFrequencyAndDamping( + this, + deltaTime, + body1, + body2, + worldSpaceAxis, + bias, + c, + frequency, + damping + ); + + /// + /// + /// Calculate properties used during the functions below. Set inStiffness and inDamping to zero if you don't + /// want to drive using a spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:127 + ///
+ /// inline void CalculateConstraintPropertiesWithStiffnessAndDamping(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inStiffness, float inDamping) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below. Set inStiffness and inDamping to zero if you don't want to drive using a spring. + /// @param inDeltaTime Time step + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis The axis of rotation along which the constraint acts (normalized) + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C) + /// @param inStiffness Spring stiffness k. + /// @param inDamping Spring damping coefficient c. + /// + /// + public void CalculateConstraintPropertiesWithStiffnessAndDamping( + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + float stiffness, + float damping + ) => + Jolt.PInvoke.AngleConstraintPart_CalculateConstraintPropertiesWithStiffnessAndDamping( + this, + deltaTime, + body1, + body2, + worldSpaceAxis, + bias, + c, + stiffness, + damping + ); + + /// + /// + /// Calculate properties used during the functions below based on inSpringSettings. Turns to a hard limit + /// when inSpringSettings has stiffness / frequency = 0 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:144 + ///
+ /// inline void CalculateConstraintPropertiesWithSettingsForLimit(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, const SpringSettings &inSpringSettings) + ///
+ ///
+ public void CalculateConstraintPropertiesWithSettingsForLimit( + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ) => + Jolt.PInvoke.AngleConstraintPart_CalculateConstraintPropertiesWithSettingsForLimit( + this, + deltaTime, + body1, + body2, + worldSpaceAxis, + bias, + c, + springSettings + ); + + /// + /// + /// Calculate properties used during the functions below based on inSpringSettings. Assumes the spring has + /// either stiffness or damping. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:161 + ///
+ /// inline void CalculateConstraintPropertiesWithSettingsForMotor(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, const SpringSettings &inSpringSettings) + ///
+ ///
+ public void CalculateConstraintPropertiesWithSettingsForMotor( + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ) => + Jolt.PInvoke.AngleConstraintPart_CalculateConstraintPropertiesWithSettingsForMotor( + this, + deltaTime, + body1, + body2, + worldSpaceAxis, + bias, + c, + springSettings + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:174 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.AngleConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:181 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.AngleConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:190 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame + /// + /// + public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.AngleConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:202 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda) + ///
+ ///
+ /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis The axis of rotation along which the constraint acts (normalized) + /// @param inMinLambda Minimum angular impulse to apply (N m s) + /// @param inMaxLambda Maximum angular impulse to apply (N m s) + /// + /// + public bool SolveVelocityConstraint( + Body body1, + Body body2, + float3 worldSpaceAxis, + float minLambda, + float maxLambda + ) => + Jolt.PInvoke.AngleConstraintPart_SolveVelocityConstraint( + this, + body1, + body2, + worldSpaceAxis, + minLambda, + maxLambda + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:216 + ///
+ /// float GetTotalLambda() const + ///
+ ///
+ public float GetTotalLambda() => Jolt.PInvoke.AngleConstraintPart_GetTotalLambda(this); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h:226 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inC, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inC Value of the constraint equation (C) + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint(Body body1, Body body2, float c, float baumgarte) => + Jolt.PInvoke.AngleConstraintPart_SolvePositionConstraint(this, body1, body2, c, baumgarte); + + public void Dispose() => Jolt.PInvoke.AngleConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/AxisConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/AxisConstraintPart.gen.cs new file mode 100644 index 0000000..24c1dff --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/AxisConstraintPart.gen.cs @@ -0,0 +1,402 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constraint that constrains motion along 1 axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:41 + ///
+ /// class AxisConstraintPart + ///
+ ///
+ /// + /// + /// Constraint that constrains motion along 1 axis + /// + /// @see "Constraints Derivation for Rigid Body Simulation in 3D" - Daniel Chappuis, section 2.1.1 + /// (we're not using the approximation of eq 27 but instead add the U term as in eq 55) + /// + /// Constraint equation (eq 25): + /// + /// \f[C = (p_2 - p_1) \cdot n\f] + /// + /// Jacobian (eq 28): + /// + /// \f[J = \begin{bmatrix} -n^T & (-(r_1 + u) \times n)^T & n^T & (r_2 \times n)^T \end{bmatrix}\f] + /// + /// Used terms (here and below, everything in world space):\n + /// n = constraint axis (normalized).\n + /// p1, p2 = constraint points.\n + /// r1 = p1 - x1.\n + /// r2 = p2 - x2.\n + /// u = x2 + r2 - x1 - r1 = p2 - p1.\n + /// x1, x2 = center of mass for the bodies.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// b = velocity bias.\n + /// \f$\beta\f$ = baumgarte constant. + /// + /// + [InteropHandle] + public readonly partial struct AxisConstraintPart : IDisposable + { + public static AxisConstraintPart Create() => Jolt.PInvoke.AxisConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below. Creates a constraint without spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:145 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias = 0.0f) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below. Creates a constraint without spring. + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inR1PlusU See equations above (r1 + u) + /// @param inR2 See equations above (r2) + /// @param inWorldSpaceAxis Axis along which the constraint acts (normalized, pointing from body 1 to 2) + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// + /// + public void CalculateConstraintProperties( + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias = 0f + ) => + Jolt.PInvoke.AxisConstraintPart_CalculateConstraintProperties( + this, + body1, + r1PlusU, + body2, + r2, + worldSpaceAxis, + bias + ); + + /// + /// + /// Calculate properties used during the functions below. Set inFrequency to zero if you don't want to drive + /// using a spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:169 + ///
+ /// inline void CalculateConstraintPropertiesWithFrequencyAndDamping(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inFrequency, float inDamping) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below. Set inFrequency to zero if you don't want to drive using a spring. + /// @param inDeltaTime Time step + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inR1PlusU See equations above (r1 + u) + /// @param inR2 See equations above (r2) + /// @param inWorldSpaceAxis Axis along which the constraint acts (normalized, pointing from body 1 to 2) + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C). + /// @param inFrequency Oscillation frequency (Hz). + /// @param inDamping Damping factor (0 = no damping, 1 = critical damping). + /// + /// + public void CalculateConstraintPropertiesWithFrequencyAndDamping( + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + float frequency, + float damping + ) => + Jolt.PInvoke.AxisConstraintPart_CalculateConstraintPropertiesWithFrequencyAndDamping( + this, + deltaTime, + body1, + r1PlusU, + body2, + r2, + worldSpaceAxis, + bias, + c, + frequency, + damping + ); + + /// + /// + /// Calculate properties used during the functions below. Set inFrequency and inDamping to zero if you don't + /// want to drive using a spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:195 + ///
+ /// inline void CalculateConstraintPropertiesWithStiffnessAndDamping(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inStiffness, float inDamping) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below. Set inFrequency and inDamping to zero if you don't want to drive using a spring. + /// @param inDeltaTime Time step + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inR1PlusU See equations above (r1 + u) + /// @param inR2 See equations above (r2) + /// @param inWorldSpaceAxis Axis along which the constraint acts (normalized, pointing from body 1 to 2) + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C). + /// @param inStiffness Spring stiffness k. + /// @param inDamping Spring damping coefficient c. + /// + /// + public void CalculateConstraintPropertiesWithStiffnessAndDamping( + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + float stiffness, + float damping + ) => + Jolt.PInvoke.AxisConstraintPart_CalculateConstraintPropertiesWithStiffnessAndDamping( + this, + deltaTime, + body1, + r1PlusU, + body2, + r2, + worldSpaceAxis, + bias, + c, + stiffness, + damping + ); + + /// + /// + /// Calculate properties used during the functions below based on inSpringSettings. Turns to a hard limit + /// when inSpringSettings has stiffness / frequency = 0 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:212 + ///
+ /// inline void CalculateConstraintPropertiesWithSettingsForLimit(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, const SpringSettings &inSpringSettings) + ///
+ ///
+ public void CalculateConstraintPropertiesWithSettingsForLimit( + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ) => + Jolt.PInvoke.AxisConstraintPart_CalculateConstraintPropertiesWithSettingsForLimit( + this, + deltaTime, + body1, + r1PlusU, + body2, + r2, + worldSpaceAxis, + bias, + c, + springSettings + ); + + /// + /// + /// Calculate properties used during the functions below based on inSpringSettings. Assumes the spring has + /// either stiffness or damping. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:229 + ///
+ /// inline void CalculateConstraintPropertiesWithSettingsForMotor(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, const SpringSettings &inSpringSettings) + ///
+ ///
+ public void CalculateConstraintPropertiesWithSettingsForMotor( + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ) => + Jolt.PInvoke.AxisConstraintPart_CalculateConstraintPropertiesWithSettingsForMotor( + this, + deltaTime, + body1, + r1PlusU, + body2, + r2, + worldSpaceAxis, + bias, + c, + springSettings + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:242 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.AxisConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:249 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.AxisConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:259 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inWarmStartImpulseRatio) + ///
+ ///
+ /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis Axis along which the constraint acts (normalized) + /// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame + /// + /// + public void WarmStart(Body body1, Body body2, float3 worldSpaceAxis, float warmStartImpulseRatio) => + Jolt.PInvoke.AxisConstraintPart_WarmStart(this, body1, body2, worldSpaceAxis, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:272 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda) + ///
+ ///
+ /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis Axis along which the constraint acts (normalized) + /// @param inMinLambda Minimum value of constraint impulse to apply (N s) + /// @param inMaxLambda Maximum value of constraint impulse to apply (N s) + /// + /// + public bool SolveVelocityConstraint( + Body body1, + Body body2, + float3 worldSpaceAxis, + float minLambda, + float maxLambda + ) => + Jolt.PInvoke.AxisConstraintPart_SolveVelocityConstraint( + this, + body1, + body2, + worldSpaceAxis, + minLambda, + maxLambda + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:310 + ///
+ /// float GetTotalLambda() const + ///
+ ///
+ public float GetTotalLambda() => Jolt.PInvoke.AxisConstraintPart_GetTotalLambda(this); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h:321 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inC, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWorldSpaceAxis Axis along which the constraint acts (normalized) + /// @param inC Value of the constraint equation (C) + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint(Body body1, Body body2, float3 worldSpaceAxis, float c, float baumgarte) => + Jolt.PInvoke.AxisConstraintPart_SolvePositionConstraint(this, body1, body2, worldSpaceAxis, c, baumgarte); + + public void Dispose() => Jolt.PInvoke.AxisConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Body.gen.cs b/Brutal.Jolt/Generated/Classes/Body.gen.cs new file mode 100644 index 0000000..5013da0 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Body.gen.cs @@ -0,0 +1,1611 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A rigid body that can be simulated using the physics system + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:34 + ///
+ /// class + ///
+ ///
+ /// + /// + /// A rigid body that can be simulated using the physics system + /// + /// Note that internally all properties (position, velocity etc.) are tracked relative to the center of mass of the object to simplify the simulation of the object. + /// + /// The offset between the position of the body and the center of mass position of the body is GetShape()->GetCenterOfMass(). + /// The functions that get/set the position of the body all indicate if they are relative to the center of mass or to the original position in which the shape was created. + /// + /// The linear velocity is also velocity of the center of mass, to correct for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$. + /// + /// + [InteropHandle] + public readonly partial struct Body + { + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:434 + ///
+ /// enum class EFlags : uint8 + ///
+ ///
+ [Flags] + public enum Flags : byte + { + /// + /// + /// If this object is a sensor. A sensor will receive collision callbacks, but will not cause any + /// collision responses and can be used as a trigger volume. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:436 + ///
+ /// IsSensor = 1 << 0 + ///
+ ///
+ IsSensor = 1, + + /// + /// + /// If kinematic objects can generate contact points against other kinematic or static objects. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:437 + ///
+ /// CollideKinematicVsNonDynamic = 1 << 1 + ///
+ ///
+ CollideKinematicVsNonDynamic = 2, + + /// + /// + /// Set this bit to indicate that the body is in the broadphase + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:438 + ///
+ /// IsInBroadPhase = 1 << 2 + ///
+ ///
+ IsInBroadPhase = 4, + + /// + /// + /// Set this bit to indicate that all collision caches for this body are invalid, will be reset the next + /// simulation step. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:439 + ///
+ /// InvalidateContactCache = 1 << 3 + ///
+ ///
+ InvalidateContactCache = 8, + + /// + /// + /// Set this bit to indicate that this body can use manifold reduction (if + /// PhysicsSettings::mUseManifoldReduction is true) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:440 + ///
+ /// UseManifoldReduction = 1 << 4 + ///
+ ///
+ UseManifoldReduction = 16, + + /// + /// + /// Set this bit to indicate that the gyroscopic force should be applied to this body (aka Dzhanibekov + /// effect, see https://en.wikipedia.org/wiki/Tennis_racket_theorem) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:441 + ///
+ /// ApplyGyroscopicForce = 1 << 5 + ///
+ ///
+ ApplyGyroscopicForce = 32, + + /// + /// + /// Set this bit to indicate that enhanced internal edge removal should be used for this body (see + /// BodyCreationSettings::mEnhancedInternalEdgeRemoval) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:442 + ///
+ /// EnhancedInternalEdgeRemoval = 1 << 6 + ///
+ ///
+ EnhancedInternalEdgeRemoval = 64, + } + + /// + /// + /// Get the id of this body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:44 + ///
+ /// inline const BodyID & GetID() const + ///
+ ///
+ public uint GetID() => Jolt.PInvoke.Body_GetID(this); + + /// + /// + /// Get the type of body (rigid or soft) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:47 + ///
+ /// inline EBodyType GetBodyType() const + ///
+ ///
+ public BodyType GetBodyType() => Jolt.PInvoke.Body_GetBodyType(this); + + /// + /// + /// Check if this body is a rigid body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:50 + ///
+ /// inline bool IsRigidBody() const + ///
+ ///
+ public bool IsRigidBody() => Jolt.PInvoke.Body_IsRigidBody(this); + + /// + /// + /// Check if this body is a soft body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:53 + ///
+ /// inline bool IsSoftBody() const + ///
+ ///
+ public bool IsSoftBody() => Jolt.PInvoke.Body_IsSoftBody(this); + + /// + /// + /// If this body is currently actively simulating (true) or sleeping (false) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:58 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.Body_IsActive(this); + + /// + /// + /// Check if this body is static (not movable) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:61 + ///
+ /// inline bool IsStatic() const + ///
+ ///
+ public bool IsStatic() => Jolt.PInvoke.Body_IsStatic(this); + + /// + /// + /// Check if this body is kinematic (keyframed), which means that it will move according to its current + /// velocity, but forces don't affect it + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:64 + ///
+ /// inline bool IsKinematic() const + ///
+ ///
+ public bool IsKinematic() => Jolt.PInvoke.Body_IsKinematic(this); + + /// + /// + /// Check if this body is dynamic, which means that it moves and forces can act on it + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:67 + ///
+ /// inline bool IsDynamic() const + ///
+ ///
+ public bool IsDynamic() => Jolt.PInvoke.Body_IsDynamic(this); + + /// + /// + /// Check if a body could be made kinematic or dynamic (if it was created dynamic or with + /// mAllowDynamicOrKinematic set to true) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:70 + ///
+ /// inline bool CanBeKinematicOrDynamic() const + ///
+ ///
+ public bool CanBeKinematicOrDynamic() => Jolt.PInvoke.Body_CanBeKinematicOrDynamic(this); + + /// + /// + /// Change the body to a sensor. A sensor will receive collision callbacks, but will not cause any collision + /// responses and can be used as a trigger volume. The cheapest sensor (in terms of CPU usage) is a sensor + /// with motion type Static (they can be moved around using + /// BodyInterface::SetPosition/SetPositionAndRotation). These sensors will only detect collisions with + /// active Dynamic or Kinematic bodies. As soon as a body go to sleep, the contact point with the sensor + /// will be lost. If you make a sensor Dynamic or Kinematic and activate them, the sensor will be able to + /// detect collisions with sleeping bodies too. An active sensor will never go to sleep automatically. When + /// you make a Dynamic or Kinematic sensor, make sure it is in an ObjectLayer that does not collide with + /// Static bodies or other sensors to avoid extra overhead in the broad phase. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:77 + ///
+ /// inline void SetIsSensor(bool inIsSensor) + ///
+ ///
+ public void SetIsSensor(bool isSensor) => Jolt.PInvoke.Body_SetIsSensor(this, isSensor); + + /// + /// + /// Check if this body is a sensor. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:80 + ///
+ /// inline bool IsSensor() const + ///
+ ///
+ public bool IsSensor() => Jolt.PInvoke.Body_IsSensor(this); + + /// + /// + /// If kinematic objects can generate contact points against other kinematic or static objects. Note that + /// turning this on can be CPU intensive as much more collision detection work will be done without any + /// effect on the simulation (kinematic objects are not affected by other kinematic/static objects). This + /// can be used to make sensors detect static objects. Note that the sensor must be kinematic and active for + /// it to detect static objects. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:85 + ///
+ /// inline void SetCollideKinematicVsNonDynamic(bool inCollide) + ///
+ ///
+ public void SetCollideKinematicVsNonDynamic(bool collide) => + Jolt.PInvoke.Body_SetCollideKinematicVsNonDynamic(this, collide); + + /// + /// + /// Check if kinematic objects can generate contact points against other kinematic or static objects. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:88 + ///
+ /// inline bool GetCollideKinematicVsNonDynamic() const + ///
+ ///
+ public bool GetCollideKinematicVsNonDynamic() => Jolt.PInvoke.Body_GetCollideKinematicVsNonDynamic(this); + + /// + /// + /// If PhysicsSettings::mUseManifoldReduction is true, this allows turning off manifold reduction for this + /// specific body. Manifold reduction by default will combine contacts with similar normals that come from + /// different SubShapeIDs (e.g. different triangles in a mesh shape or different compound shapes). If the + /// application requires tracking exactly which SubShapeIDs are in contact, you can turn off manifold + /// reduction. Note that this comes at a performance cost. Consider using + /// BodyInterface::SetUseManifoldReduction if the body could already be in contact with other bodies to + /// ensure that the contact cache is invalidated and you get the correct contact callbacks. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:94 + ///
+ /// inline void SetUseManifoldReduction(bool inUseReduction) + ///
+ ///
+ public void SetUseManifoldReduction(bool useReduction) => + Jolt.PInvoke.Body_SetUseManifoldReduction(this, useReduction); + + /// + /// + /// Check if this body can use manifold reduction. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:97 + ///
+ /// inline bool GetUseManifoldReduction() const + ///
+ ///
+ public bool GetUseManifoldReduction() => Jolt.PInvoke.Body_GetUseManifoldReduction(this); + + /// + /// + /// Checks if the combination of this body and inBody2 should use manifold reduction + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:100 + ///
+ /// inline bool GetUseManifoldReductionWithBody(const Body &inBody2) const + ///
+ ///
+ public bool GetUseManifoldReductionWithBody(Body body2) => + Jolt.PInvoke.Body_GetUseManifoldReductionWithBody(this, body2); + + /// + /// + /// Set to indicate that the gyroscopic force should be applied to this body (aka Dzhanibekov effect, see + /// https://en.wikipedia.org/wiki/Tennis_racket_theorem) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:103 + ///
+ /// inline void SetApplyGyroscopicForce(bool inApply) + ///
+ ///
+ public void SetApplyGyroscopicForce(bool apply) => Jolt.PInvoke.Body_SetApplyGyroscopicForce(this, apply); + + /// + /// + /// Check if the gyroscopic force is being applied for this body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:106 + ///
+ /// inline bool GetApplyGyroscopicForce() const + ///
+ ///
+ public bool GetApplyGyroscopicForce() => Jolt.PInvoke.Body_GetApplyGyroscopicForce(this); + + /// + /// + /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with + /// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex + /// edges. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:109 + ///
+ /// inline void SetEnhancedInternalEdgeRemoval(bool inApply) + ///
+ ///
+ public void SetEnhancedInternalEdgeRemoval(bool apply) => + Jolt.PInvoke.Body_SetEnhancedInternalEdgeRemoval(this, apply); + + /// + /// + /// Check if enhanced internal edge removal is turned on + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:112 + ///
+ /// inline bool GetEnhancedInternalEdgeRemoval() const + ///
+ ///
+ public bool GetEnhancedInternalEdgeRemoval() => Jolt.PInvoke.Body_GetEnhancedInternalEdgeRemoval(this); + + /// + /// + /// Checks if the combination of this body and inBody2 should use enhanced internal edge removal + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:115 + ///
+ /// inline bool GetEnhancedInternalEdgeRemovalWithBody(const Body &inBody2) const + ///
+ ///
+ public bool GetEnhancedInternalEdgeRemovalWithBody(Body body2) => + Jolt.PInvoke.Body_GetEnhancedInternalEdgeRemovalWithBody(this, body2); + + /// + /// + /// Get the bodies motion type. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:118 + ///
+ /// inline EMotionType GetMotionType() const + ///
+ ///
+ public MotionType GetMotionType() => Jolt.PInvoke.Body_GetMotionType(this); + + /// + /// + /// Set the motion type of this body. Consider using BodyInterface::SetMotionType instead of this function + /// if the body may be active or if it needs to be activated. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:121 + ///
+ /// void SetMotionType(EMotionType inMotionType) + ///
+ ///
+ public void SetMotionType(MotionType motionType) => Jolt.PInvoke.Body_SetMotionType(this, motionType); + + /// + /// + /// Get broadphase layer, this determines in which broad phase sub-tree the object is placed + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:124 + ///
+ /// inline BroadPhaseLayer GetBroadPhaseLayer() const + ///
+ ///
+ public byte GetBroadPhaseLayer() => Jolt.PInvoke.Body_GetBroadPhaseLayer(this); + + /// + /// + /// Get object layer, this determines which other objects it collides with + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:127 + ///
+ /// inline ObjectLayer GetObjectLayer() const + ///
+ ///
+ public ushort GetObjectLayer() => Jolt.PInvoke.Body_GetObjectLayer(this); + + /// + /// + /// Collision group and sub-group ID, determines which other objects it collides with + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:130 + ///
+ /// const CollisionGroup & GetCollisionGroup() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public CollisionGroup GetCollisionGroup() => Jolt.PInvoke.Body_GetCollisionGroup(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:132 + ///
+ /// void SetCollisionGroup(const CollisionGroup &inGroup) + ///
+ ///
+ public void SetCollisionGroup(CollisionGroup group) => Jolt.PInvoke.Body_SetCollisionGroup(this, group); + + /// + /// + /// If this body can go to sleep. Note that disabling sleeping on a sleeping object will not wake it up. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:135 + ///
+ /// bool GetAllowSleeping() const + ///
+ ///
+ public bool GetAllowSleeping() => Jolt.PInvoke.Body_GetAllowSleeping(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:136 + ///
+ /// void SetAllowSleeping(bool inAllow) + ///
+ ///
+ public void SetAllowSleeping(bool allow) => Jolt.PInvoke.Body_SetAllowSleeping(this, allow); + + /// + /// + /// Resets the sleep timer. This does not wake up the body if it is sleeping, but allows resetting the + /// system that detects when a body is sleeping. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:139 + ///
+ /// inline void ResetSleepTimer() + ///
+ ///
+ public void ResetSleepTimer() => Jolt.PInvoke.Body_ResetSleepTimer(this); + + /// + /// + /// Friction (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals + /// force that presses the two bodies together). Note that bodies can have negative friction but the + /// combined friction (see PhysicsSystem::SetCombineFriction) should never go below zero. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:142 + ///
+ /// inline float GetFriction() const + ///
+ ///
+ public float GetFriction() => Jolt.PInvoke.Body_GetFriction(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:143 + ///
+ /// void SetFriction(float inFriction) + ///
+ ///
+ public void SetFriction(float friction) => Jolt.PInvoke.Body_SetFriction(this, friction); + + /// + /// + /// Restitution (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision response, + /// 1 = completely elastic collision response). Note that bodies can have negative restitution but the + /// combined restitution (see PhysicsSystem::SetCombineRestitution) should never go below zero. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:146 + ///
+ /// inline float GetRestitution() const + ///
+ ///
+ public float GetRestitution() => Jolt.PInvoke.Body_GetRestitution(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:147 + ///
+ /// void SetRestitution(float inRestitution) + ///
+ ///
+ public void SetRestitution(float restitution) => Jolt.PInvoke.Body_SetRestitution(this, restitution); + + /// + /// + /// Get world space linear velocity of the center of mass (unit: m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:150 + ///
+ /// inline Vec3 GetLinearVelocity() const + ///
+ ///
+ public float3 GetLinearVelocity() => Jolt.PInvoke.Body_GetLinearVelocity(this); + + /// + /// + /// Set world space linear velocity of the center of mass (unit: m/s). Note that it is illegal to set a + /// non-zero linear velocity on a sleeping body without waking it up afterwards. If you want the body to + /// wake up when it is sleeping, use BodyInterface::SetLinearVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:155 + ///
+ /// void SetLinearVelocity(Vec3Arg inLinearVelocity) + ///
+ ///
+ public void SetLinearVelocity(float3 linearVelocity) => + Jolt.PInvoke.Body_SetLinearVelocity(this, linearVelocity); + + /// + /// + /// Set world space linear velocity of the center of mass, will make sure the value is clamped against the + /// maximum linear velocity. Note that it is illegal to set a non-zero linear velocity on a sleeping body + /// without waking it up afterwards. If you want the body to wake up when it is sleeping, use + /// BodyInterface::SetLinearVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:160 + ///
+ /// void SetLinearVelocityClamped(Vec3Arg inLinearVelocity) + ///
+ ///
+ public void SetLinearVelocityClamped(float3 linearVelocity) => + Jolt.PInvoke.Body_SetLinearVelocityClamped(this, linearVelocity); + + /// + /// + /// Get world space angular velocity of the center of mass (unit: rad/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:163 + ///
+ /// inline Vec3 GetAngularVelocity() const + ///
+ ///
+ public float3 GetAngularVelocity() => Jolt.PInvoke.Body_GetAngularVelocity(this); + + /// + /// + /// Set world space angular velocity of the center of mass (unit: rad/s). Note that it is illegal to set a + /// non-zero angular velocity on a sleeping body without waking it up afterwards. If you want the body to + /// wake up when it is sleeping, use BodyInterface::SetAngularVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:168 + ///
+ /// void SetAngularVelocity(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetAngularVelocity(float3 angularVelocity) => + Jolt.PInvoke.Body_SetAngularVelocity(this, angularVelocity); + + /// + /// + /// Set world space angular velocity of the center of mass, will make sure the value is clamped against the + /// maximum angular velocity. Note that it is illegal to set a non-zero angular velocity on a sleeping body + /// without waking it up afterwards. If you want the body to wake up when it is sleeping, use + /// BodyInterface::SetAngularVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:173 + ///
+ /// void SetAngularVelocityClamped(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetAngularVelocityClamped(float3 angularVelocity) => + Jolt.PInvoke.Body_SetAngularVelocityClamped(this, angularVelocity); + + /// + /// + /// Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (unit: + /// m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:176 + ///
+ /// inline Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const + ///
+ ///
+ public float3 GetPointVelocityCOM(float3 pointRelativeToCOM) => + Jolt.PInvoke.Body_GetPointVelocityCOM(this, pointRelativeToCOM); + + /// + /// + /// Velocity of point inPoint (in world space, e.g. on the surface of the body) of the body (unit: m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:179 + ///
+ /// inline Vec3 GetPointVelocity(RVec3Arg inPoint) const + ///
+ ///
+ public float3 GetPointVelocity(float3 point) => Jolt.PInvoke.Body_GetPointVelocity(this, point); + + /// + /// + /// Add force (unit: N) at center of mass for the next time step, will be reset after the next call to + /// PhysicsSystem::Update. If you want the body to wake up when it is sleeping, use BodyInterface::AddForce + /// instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:183 + ///
+ /// inline void AddForce(Vec3Arg inForce) + ///
+ ///
+ public void AddForce(float3 force) => Jolt.PInvoke.Body_AddForce(this, force); + + /// + /// + /// Add force (unit: N) at world space position inPosition for the next time step, will be reset after the + /// next call to PhysicsSystem::Update. If you want the body to wake up when it is sleeping, use + /// BodyInterface::AddForce instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:187 + ///
+ /// inline void AddForce(Vec3Arg inForce, RVec3Arg inPosition) + ///
+ ///
+ public void AddForce(float3 force, float3 position) => Jolt.PInvoke.Body_AddForce_2(this, force, position); + + /// + /// + /// Add torque (unit: N m) for the next time step, will be reset after the next call to + /// PhysicsSystem::Update. If you want the body to wake up when it is sleeping, use BodyInterface::AddTorque + /// instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:191 + ///
+ /// inline void AddTorque(Vec3Arg inTorque) + ///
+ ///
+ public void AddTorque(float3 torque) => Jolt.PInvoke.Body_AddTorque(this, torque); + + /// + /// + /// Get the total amount of force applied to the center of mass this time step (through AddForce calls). + /// Note that it will reset to zero after PhysicsSystem::Update. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:194 + ///
+ /// inline Vec3 GetAccumulatedForce() const + ///
+ ///
+ public float3 GetAccumulatedForce() => Jolt.PInvoke.Body_GetAccumulatedForce(this); + + /// + /// + /// Get the total amount of torque applied to the center of mass this time step (through AddForce/AddTorque + /// calls). Note that it will reset to zero after PhysicsSystem::Update. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:197 + ///
+ /// inline Vec3 GetAccumulatedTorque() const + ///
+ ///
+ public float3 GetAccumulatedTorque() => Jolt.PInvoke.Body_GetAccumulatedTorque(this); + + /// + /// + /// Reset the total accumulated force, not that this will be done automatically after every time step. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:200 + ///
+ /// void ResetForce() + ///
+ ///
+ public void ResetForce() => Jolt.PInvoke.Body_ResetForce(this); + + /// + /// + /// Reset the total accumulated torque, not that this will be done automatically after every time step. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:203 + ///
+ /// void ResetTorque() + ///
+ ///
+ public void ResetTorque() => Jolt.PInvoke.Body_ResetTorque(this); + + /// + /// + /// Reset the current velocity and accumulated force and torque. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:206 + ///
+ /// void ResetMotion() + ///
+ ///
+ public void ResetMotion() => Jolt.PInvoke.Body_ResetMotion(this); + + /// + /// + /// Get inverse inertia tensor in world space + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:209 + ///
+ /// inline Mat44 GetInverseInertia() const + ///
+ ///
+ public float4x4 GetInverseInertia() => Jolt.PInvoke.Body_GetInverseInertia(this); + + /// + /// + /// Add impulse to center of mass (unit: kg m/s). If you want the body to wake up when it is sleeping, use + /// BodyInterface::AddImpulse instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:213 + ///
+ /// inline void AddImpulse(Vec3Arg inImpulse) + ///
+ ///
+ public void AddImpulse(float3 impulse) => Jolt.PInvoke.Body_AddImpulse(this, impulse); + + /// + /// + /// Add impulse to point in world space (unit: kg m/s). If you want the body to wake up when it is sleeping, + /// use BodyInterface::AddImpulse instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:217 + ///
+ /// inline void AddImpulse(Vec3Arg inImpulse, RVec3Arg inPosition) + ///
+ ///
+ public void AddImpulse(float3 impulse, float3 position) => + Jolt.PInvoke.Body_AddImpulse_2(this, impulse, position); + + /// + /// + /// Add angular impulse in world space (unit: N m s). If you want the body to wake up when it is sleeping, + /// use BodyInterface::AddAngularImpulse instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:221 + ///
+ /// inline void AddAngularImpulse(Vec3Arg inAngularImpulse) + ///
+ ///
+ public void AddAngularImpulse(float3 angularImpulse) => + Jolt.PInvoke.Body_AddAngularImpulse(this, angularImpulse); + + /// + /// + /// Set velocity of body such that it will be positioned at inTargetPosition/inTargetRotation in inDeltaTime + /// seconds. Note that it is illegal to provide a new position/orientation on a sleeping body without waking + /// it up afterwards. If you want the body to wake up when it is sleeping, use BodyInterface::MoveKinematic + /// instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:226 + ///
+ /// void MoveKinematic(RVec3Arg inTargetPosition, QuatArg inTargetRotation, float inDeltaTime) + ///
+ ///
+ public void MoveKinematic(float3 targetPosition, floatQuat targetRotation, float deltaTime) => + Jolt.PInvoke.Body_MoveKinematic(this, targetPosition, targetRotation, deltaTime); + + /// + /// + /// Gets the properties needed to do buoyancy calculations + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:234 + ///
+ /// void GetSubmergedVolume(RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outRelativeCenterOfBuoyancy) const + ///
+ ///
+ /// + /// + /// Gets the properties needed to do buoyancy calculations + /// @param inSurfacePosition Position of the fluid surface in world space + /// @param inSurfaceNormal Normal of the fluid surface (should point up) + /// @param outTotalVolume On return this contains the total volume of the shape + /// @param outSubmergedVolume On return this contains the submerged volume of the shape + /// @param outRelativeCenterOfBuoyancy On return this contains the center of mass of the submerged volume relative to the center of mass of the body + /// + /// + public void GetSubmergedVolume( + float3 surfacePosition, + float3 surfaceNormal, + out float totalVolume, + out float submergedVolume, + out float3 relativeCenterOfBuoyancy + ) => + Jolt.PInvoke.Body_GetSubmergedVolume( + this, + surfacePosition, + surfaceNormal, + out totalVolume, + out submergedVolume, + out relativeCenterOfBuoyancy + ); + + /// + /// + /// Applies an impulse to the body that simulates fluid buoyancy and drag. If you want the body to wake up + /// when it is sleeping, use BodyInterface::ApplyBuoyancyImpulse instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:247 + ///
+ /// bool ApplyBuoyancyImpulse(RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime) + ///
+ ///
+ /// + /// + /// Applies an impulse to the body that simulates fluid buoyancy and drag. + /// If you want the body to wake up when it is sleeping, use BodyInterface::ApplyBuoyancyImpulse instead. + /// @param inSurfacePosition Position of the fluid surface in world space + /// @param inSurfaceNormal Normal of the fluid surface (should point up) + /// @param inBuoyancy The buoyancy factor for the body. 1 = neutral body, < 1 sinks, > 1 floats. Note that we don't use the fluid density since it is harder to configure than a simple number between [0, 2] + /// @param inLinearDrag Linear drag factor that slows down the body when in the fluid (approx. 0.5) + /// @param inAngularDrag Angular drag factor that slows down rotation when the body is in the fluid (approx. 0.01) + /// @param inFluidVelocity The average velocity of the fluid (in m/s) in which the body resides + /// @param inGravity The gravity vector (pointing down) + /// @param inDeltaTime Delta time of the next simulation step (in s) + /// @return true if an impulse was applied, false if the body was not in the fluid + /// + /// + public bool ApplyBuoyancyImpulse( + float3 surfacePosition, + float3 surfaceNormal, + float buoyancy, + float linearDrag, + float angularDrag, + float3 fluidVelocity, + float3 gravity, + float deltaTime + ) => + Jolt.PInvoke.Body_ApplyBuoyancyImpulse( + this, + surfacePosition, + surfaceNormal, + buoyancy, + linearDrag, + angularDrag, + fluidVelocity, + gravity, + deltaTime + ); + + /// + /// + /// Applies an impulse to the body that simulates fluid buoyancy and drag. If you want the body to wake up + /// when it is sleeping, use BodyInterface::ApplyBuoyancyImpulse instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:261 + ///
+ /// bool ApplyBuoyancyImpulse(float inTotalVolume, float inSubmergedVolume, Vec3Arg inRelativeCenterOfBuoyancy, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime) + ///
+ ///
+ /// + /// + /// Applies an impulse to the body that simulates fluid buoyancy and drag. + /// If you want the body to wake up when it is sleeping, use BodyInterface::ApplyBuoyancyImpulse instead. + /// @param inTotalVolume Total volume of the shape of this body (m^3) + /// @param inSubmergedVolume Submerged volume of the shape of this body (m^3) + /// @param inRelativeCenterOfBuoyancy The center of mass of the submerged volume relative to the center of mass of the body + /// @param inBuoyancy The buoyancy factor for the body. 1 = neutral body, < 1 sinks, > 1 floats. Note that we don't use the fluid density since it is harder to configure than a simple number between [0, 2] + /// @param inLinearDrag Linear drag factor that slows down the body when in the fluid (approx. 0.5) + /// @param inAngularDrag Angular drag factor that slows down rotation when the body is in the fluid (approx. 0.01) + /// @param inFluidVelocity The average velocity of the fluid (in m/s) in which the body resides + /// @param inGravity The gravity vector (pointing down) + /// @param inDeltaTime Delta time of the next simulation step (in s) + /// @return true if an impulse was applied, false if the body was not in the fluid + /// + /// + public bool ApplyBuoyancyImpulse( + float totalVolume, + float submergedVolume, + float3 relativeCenterOfBuoyancy, + float buoyancy, + float linearDrag, + float angularDrag, + float3 fluidVelocity, + float3 gravity, + float deltaTime + ) => + Jolt.PInvoke.Body_ApplyBuoyancyImpulse_2( + this, + totalVolume, + submergedVolume, + relativeCenterOfBuoyancy, + buoyancy, + linearDrag, + angularDrag, + fluidVelocity, + gravity, + deltaTime + ); + + /// + /// + /// Check if this body has been added to the physics system + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:264 + ///
+ /// inline bool IsInBroadPhase() const + ///
+ ///
+ public bool IsInBroadPhase() => Jolt.PInvoke.Body_IsInBroadPhase(this); + + /// + /// + /// Check if this body has been changed in such a way that the collision cache should be considered invalid + /// for any body interacting with this body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:267 + ///
+ /// inline bool IsCollisionCacheInvalid() const + ///
+ ///
+ public bool IsCollisionCacheInvalid() => Jolt.PInvoke.Body_IsCollisionCacheInvalid(this); + + /// + /// + /// Get the shape of this body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:270 + ///
+ /// inline const Shape * GetShape() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetShape() => Jolt.PInvoke.Body_GetShape(this); + + /// + /// + /// World space position of the body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:273 + ///
+ /// inline RVec3 GetPosition() const + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.Body_GetPosition(this); + + /// + /// + /// World space rotation of the body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:276 + ///
+ /// inline Quat GetRotation() const + ///
+ ///
+ public floatQuat GetRotation() => Jolt.PInvoke.Body_GetRotation(this); + + /// + /// + /// Calculates the transform of this body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:279 + ///
+ /// inline RMat44 GetWorldTransform() const + ///
+ ///
+ public float4x4 GetWorldTransform() => Jolt.PInvoke.Body_GetWorldTransform(this); + + /// + /// + /// Gets the world space position of this body's center of mass + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:282 + ///
+ /// inline RVec3 GetCenterOfMassPosition() const + ///
+ ///
+ public float3 GetCenterOfMassPosition() => Jolt.PInvoke.Body_GetCenterOfMassPosition(this); + + /// + /// + /// Calculates the transform for this body's center of mass + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:285 + ///
+ /// inline RMat44 GetCenterOfMassTransform() const + ///
+ ///
+ public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.Body_GetCenterOfMassTransform(this); + + /// + /// + /// Calculates the inverse of the transform for this body's center of mass + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:288 + ///
+ /// inline RMat44 GetInverseCenterOfMassTransform() const + ///
+ ///
+ public float4x4 GetInverseCenterOfMassTransform() => Jolt.PInvoke.Body_GetInverseCenterOfMassTransform(this); + + /// + /// + /// Get world space bounding box + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:291 + ///
+ /// inline const AABox & GetWorldSpaceBounds() const + ///
+ ///
+ public AABox GetWorldSpaceBounds() => Jolt.PInvoke.Body_GetWorldSpaceBounds(this); + + /// + /// + /// Access to the motion properties + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:325 + ///
+ /// const MotionProperties *GetMotionProperties() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotionProperties GetMotionProperties() => Jolt.PInvoke.Body_GetMotionProperties(this); + + /// + /// + /// Access to the motion properties (version that does not check if the object is kinematic or dynamic) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:329 + ///
+ /// const MotionProperties *GetMotionPropertiesUnchecked() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotionProperties GetMotionPropertiesUnchecked() => Jolt.PInvoke.Body_GetMotionPropertiesUnchecked(this); + + /// + /// + /// Access to the user data, can be used for anything by the application + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:333 + ///
+ /// uint64 GetUserData() const + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.Body_GetUserData(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:334 + ///
+ /// void SetUserData(uint64 inUserData) + ///
+ ///
+ public void SetUserData(ulong userData) => Jolt.PInvoke.Body_SetUserData(this, userData); + + /// + /// + /// Get surface normal of a particular sub shape and its world space surface position on this body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:337 + ///
+ /// inline Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const + ///
+ ///
+ public float3 GetWorldSpaceSurfaceNormal(uint subShapeID, float3 position) => + Jolt.PInvoke.Body_GetWorldSpaceSurfaceNormal(this, subShapeID, position); + + /// + /// + /// Get the transformed shape of this body, which can be used to do collision detection outside of a body + /// lock + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:340 + ///
+ /// inline TransformedShape GetTransformedShape() const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public TransformedShape GetTransformedShape() => Jolt.PInvoke.Body_GetTransformedShape(this); + + /// + /// + /// Function to convert a body back to a body creation settings object to be able to save/recreate the body + /// later. Can e.g. be used to move a body from one PhysicsSystem to another. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:343 + ///
+ /// BodyCreationSettings GetBodyCreationSettings() const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public BodyCreationSettings GetBodyCreationSettings() => Jolt.PInvoke.Body_GetBodyCreationSettings(this); + + /// + /// + /// Function to overwrite current body state with inBodyCreationSettings. Can only be done when the body is + /// not in the physics system and cannot add MotionProperties if the body was created without one. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:346 + ///
+ /// void ApplyBodyCreationSettings(const BodyCreationSettings &inBodyCreationSettings, const BroadPhaseLayerInterface &inBPLInterface) + ///
+ ///
+ public void ApplyBodyCreationSettings( + BodyCreationSettings bodyCreationSettings, + BroadPhaseLayerInterface bPLInterface + ) => Jolt.PInvoke.Body_ApplyBodyCreationSettings(this, bodyCreationSettings, bPLInterface); + + /// + /// + /// Function to convert a soft body back to a body creation settings object to be able to save/recreate the + /// body later. Can e.g. be used to move a body from one PhysicsSystem to another. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:349 + ///
+ /// SoftBodyCreationSettings GetSoftBodyCreationSettings() const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SoftBodyCreationSettings GetSoftBodyCreationSettings() => + Jolt.PInvoke.Body_GetSoftBodyCreationSettings(this); + + /// + /// + /// Function to overwrite current body state with inSoftBodyCreationSettings. Can only be done when the body + /// is not in the physics system and cannot add MotionProperties if the body was created without one. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:352 + ///
+ /// void ApplySoftBodyCreationSettings(const SoftBodyCreationSettings &inSoftBodyCreationSettings, const BroadPhaseLayerInterface &inBPLInterface) + ///
+ ///
+ public void ApplySoftBodyCreationSettings( + SoftBodyCreationSettings softBodyCreationSettings, + BroadPhaseLayerInterface bPLInterface + ) => Jolt.PInvoke.Body_ApplySoftBodyCreationSettings(this, softBodyCreationSettings, bPLInterface); + + /// + /// + /// Helper function for BroadPhase::FindCollidingPairs that returns true when two bodies can collide It + /// assumes that body 1 is dynamic and active and guarantees that it body 1 collides with body 2 that body 2 + /// will not collide with body 1 in order to avoid finding duplicate collision pairs + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:362 + ///
+ /// static inline bool sFindCollidingPairsCanCollide(const Body &inBody1, const Body &inBody2) + ///
+ ///
+ public static bool FindCollidingPairsCanCollide(Body body1, Body body2) => + Jolt.PInvoke.Body_FindCollidingPairsCanCollide(body1, body2); + + /// + /// + /// Update position using an Euler step (used during position integrate & constraint solving) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:365 + ///
+ /// inline void AddPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime) + ///
+ ///
+ public void AddPositionStep(float3 linearVelocityTimesDeltaTime) => + Jolt.PInvoke.Body_AddPositionStep(this, linearVelocityTimesDeltaTime); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:366 + ///
+ /// inline void SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime) + ///
+ ///
+ public void SubPositionStep(float3 linearVelocityTimesDeltaTime) => + Jolt.PInvoke.Body_SubPositionStep(this, linearVelocityTimesDeltaTime); + + /// + /// + /// Update rotation using an Euler step (used during position integrate & constraint solving) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:369 + ///
+ /// inline void AddRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime) + ///
+ ///
+ public void AddRotationStep(float3 angularVelocityTimesDeltaTime) => + Jolt.PInvoke.Body_AddRotationStep(this, angularVelocityTimesDeltaTime); + + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:370 + ///
+ /// inline void SubRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime) + ///
+ ///
+ public void SubRotationStep(float3 angularVelocityTimesDeltaTime) => + Jolt.PInvoke.Body_SubRotationStep(this, angularVelocityTimesDeltaTime); + + /// + /// + /// Function to update body's layer (should only be called internally since it also requires updating the + /// broadphase) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:373 + ///
+ /// inline void SetObjectLayerInternal(ObjectLayer inLayer, const BroadPhaseLayerInterface &inBPLInterface) + ///
+ ///
+ public void SetObjectLayerInternal(ushort layer, BroadPhaseLayerInterface bPLInterface) => + Jolt.PInvoke.Body_SetObjectLayerInternal(this, layer, bPLInterface); + + /// + /// + /// Flag if body is in the broadphase (should only be called by the BroadPhase) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:376 + ///
+ /// inline void SetInBroadPhaseInternal(bool inInBroadPhase) + ///
+ ///
+ public void SetInBroadPhaseInternal(bool inBroadPhase) => + Jolt.PInvoke.Body_SetInBroadPhaseInternal(this, inBroadPhase); + + /// + /// + /// Invalidate the contact cache (should only be called by the BodyManager), will be reset the next + /// simulation step. Returns true if the contact cache was still valid. + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:379 + ///
+ /// inline bool InvalidateContactCacheInternal() + ///
+ ///
+ public bool InvalidateContactCacheInternal() => Jolt.PInvoke.Body_InvalidateContactCacheInternal(this); + + /// + /// + /// Reset the collision cache invalid flag (should only be called by the BodyManager). + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:382 + ///
+ /// inline void ValidateContactCacheInternal() + ///
+ ///
+ public void ValidateContactCacheInternal() => Jolt.PInvoke.Body_ValidateContactCacheInternal(this); + + /// + /// + /// Updates world space bounding box (should only be called by the PhysicsSystem) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:385 + ///
+ /// void CalculateWorldSpaceBoundsInternal() + ///
+ ///
+ public void CalculateWorldSpaceBoundsInternal() => Jolt.PInvoke.Body_CalculateWorldSpaceBoundsInternal(this); + + /// + /// + /// Function to update body's position (should only be called by the BodyInterface since it also requires + /// updating the broadphase) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:388 + ///
+ /// void SetPositionAndRotationInternal(RVec3Arg inPosition, QuatArg inRotation, bool inResetSleepTimer = true) + ///
+ ///
+ public void SetPositionAndRotationInternal(float3 position, floatQuat rotation, bool resetSleepTimer = true) => + Jolt.PInvoke.Body_SetPositionAndRotationInternal(this, position, rotation, resetSleepTimer); + + /// + /// + /// Updates the center of mass and optionally mass properties after shifting the center of mass or changes + /// to the shape (should only be called by the BodyInterface since it also requires updating the broadphase) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:393 + ///
+ /// void UpdateCenterOfMassInternal(Vec3Arg inPreviousCenterOfMass, bool inUpdateMassProperties) + ///
+ ///
+ /// + /// + /// Updates the center of mass and optionally mass properties after shifting the center of mass or changes to the shape (should only be called by the BodyInterface since it also requires updating the broadphase) + /// @param inPreviousCenterOfMass Center of mass of the shape before the alterations + /// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated + /// + /// + public void UpdateCenterOfMassInternal(float3 previousCenterOfMass, bool updateMassProperties) => + Jolt.PInvoke.Body_UpdateCenterOfMassInternal(this, previousCenterOfMass, updateMassProperties); + + /// + /// + /// Function to update a body's shape (should only be called by the BodyInterface since it also requires + /// updating the broadphase) + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:398 + ///
+ /// void SetShapeInternal(const Shape *inShape, bool inUpdateMassProperties) + ///
+ ///
+ /// + /// + /// Function to update a body's shape (should only be called by the BodyInterface since it also requires updating the broadphase) + /// @param inShape The new shape for this body + /// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated + /// + /// + public void SetShapeInternal(Shape shape, bool updateMassProperties) => + Jolt.PInvoke.Body_SetShapeInternal(this, shape, updateMassProperties); + + /// + /// + /// Access to the index in the BodyManager::mActiveBodies list + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:406 + ///
+ /// uint32 GetIndexInActiveBodiesInternal() const + ///
+ ///
+ public uint GetIndexInActiveBodiesInternal() => Jolt.PInvoke.Body_GetIndexInActiveBodiesInternal(this); + + /// + /// + /// Update eligibility for sleeping + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:409 + ///
+ /// ECanSleep UpdateSleepStateInternal(float inDeltaTime, float inMaxMovement, float inTimeBeforeSleep) + ///
+ ///
+ public CanSleep UpdateSleepStateInternal(float deltaTime, float maxMovement, float timeBeforeSleep) => + Jolt.PInvoke.Body_UpdateSleepStateInternal(this, deltaTime, maxMovement, timeBeforeSleep); + + /// + /// + /// A dummy body that can be used by constraints to attach a constraint to the world instead of another body + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:355 + ///
+ /// static Body sFixedToWorld + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public static Body GetFixedToWorld() => Jolt.PInvoke.Body_GetFixedToWorld(); + + /// + /// + /// Constant indicating that body is not active + /// + /// + /// C++: + /// Jolt/Physics/Body/Body.h:419 + ///
+ /// static constexpr uint32 cInactiveIndex = MotionProperties::cInactiveIndex + ///
+ ///
+ public static uint GetInactiveIndex() => Jolt.PInvoke.Body_GetInactiveIndex(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyActivationListener.gen.cs b/Brutal.Jolt/Generated/Classes/BodyActivationListener.gen.cs new file mode 100644 index 0000000..43e0c23 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyActivationListener.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A listener class that receives events when a body activates or deactivates. It can be registered with the + /// BodyManager (or PhysicsSystem). + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyActivationListener.h:13 + ///
+ /// class BodyActivationListener + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyActivationListener + { + /// + /// + /// Called whenever a body activates, note this can be called from any thread so make sure your code is + /// thread safe. At the time of the callback the body inBodyID will be locked and no bodies can be + /// written/activated/deactivated from the callback. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyActivationListener.h:21 + ///
+ /// virtual void OnBodyActivated(const BodyID &inBodyID, uint64 inBodyUserData) = 0 + ///
+ ///
+ public void OnBodyActivated(uint bodyID, ulong bodyUserData) => + Jolt.PInvoke.BodyActivationListener_OnBodyActivated(this, bodyID, bodyUserData); + + /// + /// + /// Called whenever a body deactivates, note this can be called from any thread so make sure your code is + /// thread safe. At the time of the callback the body inBodyID will be locked and no bodies can be + /// written/activated/deactivated from the callback. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyActivationListener.h:25 + ///
+ /// virtual void OnBodyDeactivated(const BodyID &inBodyID, uint64 inBodyUserData) = 0 + ///
+ ///
+ public void OnBodyDeactivated(uint bodyID, ulong bodyUserData) => + Jolt.PInvoke.BodyActivationListener_OnBodyDeactivated(this, bodyID, bodyUserData); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyCreationSettings.gen.cs b/Brutal.Jolt/Generated/Classes/BodyCreationSettings.gen.cs new file mode 100644 index 0000000..3cc8e11 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyCreationSettings.gen.cs @@ -0,0 +1,1142 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings for constructing a rigid body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:30 + ///
+ /// class BodyCreationSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyCreationSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:36 + ///
+ /// BodyCreationSettings() = default + ///
+ ///
+ public static BodyCreationSettings Create() => Jolt.PInvoke.BodyCreationSettings_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:37 + ///
+ /// BodyCreationSettings(const ShapeSettings *inShape, RVec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer) + ///
+ ///
+ public static BodyCreationSettings Create( + ShapeSettings shape, + float3 position, + floatQuat rotation, + MotionType motionType, + ushort objectLayer + ) => Jolt.PInvoke.BodyCreationSettings_Create_2(shape, position, rotation, motionType, objectLayer); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:38 + ///
+ /// BodyCreationSettings(const Shape *inShape, RVec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer) + ///
+ ///
+ public static BodyCreationSettings Create( + Shape shape, + float3 position, + floatQuat rotation, + MotionType motionType, + ushort objectLayer + ) => Jolt.PInvoke.BodyCreationSettings_Create_3(shape, position, rotation, motionType, objectLayer); + + /// + /// + /// Access to the shape settings object. This contains serializable (non-runtime optimized) information + /// about the Shape. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:45 + ///
+ /// const ShapeSettings * GetShapeSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public ShapeSettings GetShapeSettings() => Jolt.PInvoke.BodyCreationSettings_GetShapeSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:46 + ///
+ /// void SetShapeSettings(const ShapeSettings *inShape) + ///
+ ///
+ public void SetShapeSettings(ShapeSettings shape) => + Jolt.PInvoke.BodyCreationSettings_SetShapeSettings(this, shape); + + /// + /// + /// Convert ShapeSettings object into a Shape object. This will free the ShapeSettings object and make the + /// object ready for runtime. Serialization is no longer possible after this. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:49 + ///
+ /// Shape::ShapeResult ConvertShapeSettings() + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public Shape ConvertShapeSettings() + { + var _handle = Jolt.PInvoke.BodyCreationSettings_ConvertShapeSettings(this); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Access to the run-time shape object. Will convert from ShapeSettings object if needed. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:52 + ///
+ /// const Shape * GetShape() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetShape() => Jolt.PInvoke.BodyCreationSettings_GetShape(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:53 + ///
+ /// void SetShape(const Shape *inShape) + ///
+ ///
+ public void SetShape(Shape shape) => Jolt.PInvoke.BodyCreationSettings_SetShape(this, shape); + + /// + /// + /// Check if the mass properties of this body will be calculated (only relevant for kinematic or dynamic + /// objects that need a MotionProperties object) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:56 + ///
+ /// bool HasMassProperties() const + ///
+ ///
+ public bool HasMassProperties() => Jolt.PInvoke.BodyCreationSettings_HasMassProperties(this); + + /// + /// + /// Calculate (or return when overridden) the mass and inertia for this body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:59 + ///
+ /// MassProperties GetMassProperties() const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MassProperties GetMassProperties() => Jolt.PInvoke.BodyCreationSettings_GetMassProperties(this); + + /// + /// + /// Saves the state of this object in binary form to inStream. Doesn't store the shape nor the group filter. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:62 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.BodyCreationSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. Doesn't restore the shape nor the group filter. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:65 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.BodyCreationSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Save body creation settings, its shape, materials and group filter. Pass in an empty map in ioShapeMap / + /// ioMaterialMap / ioGroupFilterMap or reuse the same map while saving multiple shapes to the same stream + /// in order to avoid writing duplicates. Pass nullptr to ioShapeMap and ioMaterial map to skip saving + /// shapes Pass nullptr to ioGroupFilterMap to skip saving group filters + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:77 + ///
+ /// void SaveWithChildren(StreamOut &inStream, ShapeToIDMap *ioShapeMap, MaterialToIDMap *ioMaterialMap, GroupFilterToIDMap *ioGroupFilterMap) const + ///
+ ///
+ /// + /// + /// A null shapeMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's shape + /// needs both its shape and material maps). + /// + /// + /// A null materialMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's + /// shape needs both its shape and material maps). + /// + /// + /// A null groupFilterMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's + /// shape needs both its shape and material maps). + /// + /// + public void SaveWithChildren( + StreamOut stream, + ShapeToIDMap shapeMap, + MaterialToIDMap materialMap, + GroupFilterToIDMap groupFilterMap + ) => Jolt.PInvoke.BodyCreationSettings_SaveWithChildren(this, stream, shapeMap, materialMap, groupFilterMap); + + /// + /// + /// Restore body creation settings, its shape, materials and group filter. Pass in an empty map in + /// ioShapeMap / ioMaterialMap / ioGroupFilterMap or reuse the same map while reading multiple shapes from + /// the same stream in order to restore duplicates. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:82 + ///
+ /// static BCSResult sRestoreWithChildren(StreamIn &inStream, IDToShapeMap &ioShapeMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. The returned handle is an owned + /// copy; Dispose it when you're done with it. + /// + /// + public static BodyCreationSettings RestoreWithChildren( + StreamIn stream, + IDToShapeMap shapeMap, + IDToMaterialMap materialMap, + IDToGroupFilterMap groupFilterMap + ) + { + var _handle = Jolt.PInvoke.BodyCreationSettings_RestoreWithChildren( + stream, + shapeMap, + materialMap, + groupFilterMap + ); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Position of the body (not of the center of mass) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:84 + ///
+ /// RVec3 mPosition = RVec3::sZero() + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.BodyCreationSettings_GetPosition(this); + + /// + /// + /// Position of the body (not of the center of mass) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:84 + ///
+ /// RVec3 mPosition = RVec3::sZero() + ///
+ ///
+ public void SetPosition(float3 value) => Jolt.PInvoke.BodyCreationSettings_SetPosition(this, value); + + /// + /// + /// Rotation of the body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:85 + ///
+ /// Quat mRotation = Quat::sIdentity() + ///
+ ///
+ public floatQuat GetRotation() => Jolt.PInvoke.BodyCreationSettings_GetRotation(this); + + /// + /// + /// Rotation of the body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:85 + ///
+ /// Quat mRotation = Quat::sIdentity() + ///
+ ///
+ public void SetRotation(floatQuat value) => Jolt.PInvoke.BodyCreationSettings_SetRotation(this, value); + + /// + /// + /// World space linear velocity of the center of mass (m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:86 + ///
+ /// Vec3 mLinearVelocity = Vec3::sZero() + ///
+ ///
+ public float3 GetLinearVelocity() => Jolt.PInvoke.BodyCreationSettings_GetLinearVelocity(this); + + /// + /// + /// World space linear velocity of the center of mass (m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:86 + ///
+ /// Vec3 mLinearVelocity = Vec3::sZero() + ///
+ ///
+ public void SetLinearVelocity(float3 value) => Jolt.PInvoke.BodyCreationSettings_SetLinearVelocity(this, value); + + /// + /// + /// World space angular velocity (rad/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:87 + ///
+ /// Vec3 mAngularVelocity = Vec3::sZero() + ///
+ ///
+ public float3 GetAngularVelocity() => Jolt.PInvoke.BodyCreationSettings_GetAngularVelocity(this); + + /// + /// + /// World space angular velocity (rad/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:87 + ///
+ /// Vec3 mAngularVelocity = Vec3::sZero() + ///
+ ///
+ public void SetAngularVelocity(float3 value) => + Jolt.PInvoke.BodyCreationSettings_SetAngularVelocity(this, value); + + /// + /// + /// User data value (can be used by application) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:90 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.BodyCreationSettings_GetUserData(this); + + /// + /// + /// User data value (can be used by application) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:90 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public void SetUserData(ulong value) => Jolt.PInvoke.BodyCreationSettings_SetUserData(this, value); + + /// + /// + /// The collision layer this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:93 + ///
+ /// ObjectLayer mObjectLayer = 0 + ///
+ ///
+ /// + /// + /// @name Collision settings + /// + /// + public ushort GetObjectLayer() => Jolt.PInvoke.BodyCreationSettings_GetObjectLayer(this); + + /// + /// + /// The collision layer this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:93 + ///
+ /// ObjectLayer mObjectLayer = 0 + ///
+ ///
+ /// + /// + /// @name Collision settings + /// + /// + public void SetObjectLayer(ushort value) => Jolt.PInvoke.BodyCreationSettings_SetObjectLayer(this, value); + + /// + /// + /// The collision group this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:94 + ///
+ /// CollisionGroup mCollisionGroup + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public CollisionGroup GetCollisionGroup() => Jolt.PInvoke.BodyCreationSettings_GetCollisionGroup(this); + + /// + /// + /// The collision group this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:94 + ///
+ /// CollisionGroup mCollisionGroup + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetCollisionGroup(CollisionGroup value) => + Jolt.PInvoke.BodyCreationSettings_SetCollisionGroup(this, value); + + /// + /// + /// Motion type, determines if the object is static, dynamic or kinematic + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:97 + ///
+ /// EMotionType mMotionType = EMotionType::Dynamic + ///
+ ///
+ /// + /// + /// @name Simulation properties + /// + /// + public MotionType GetMotionType() => Jolt.PInvoke.BodyCreationSettings_GetMotionType(this); + + /// + /// + /// Motion type, determines if the object is static, dynamic or kinematic + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:97 + ///
+ /// EMotionType mMotionType = EMotionType::Dynamic + ///
+ ///
+ /// + /// + /// @name Simulation properties + /// + /// + public void SetMotionType(MotionType value) => Jolt.PInvoke.BodyCreationSettings_SetMotionType(this, value); + + /// + /// + /// Which degrees of freedom this body has (can be used to limit simulation to 2D) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:98 + ///
+ /// EAllowedDOFs mAllowedDOFs = EAllowedDOFs::All + ///
+ ///
+ public AllowedDOFs GetAllowedDOFs() => Jolt.PInvoke.BodyCreationSettings_GetAllowedDOFs(this); + + /// + /// + /// Which degrees of freedom this body has (can be used to limit simulation to 2D) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:98 + ///
+ /// EAllowedDOFs mAllowedDOFs = EAllowedDOFs::All + ///
+ ///
+ public void SetAllowedDOFs(AllowedDOFs value) => Jolt.PInvoke.BodyCreationSettings_SetAllowedDOFs(this, value); + + /// + /// + /// When this body is created as static, this setting tells the system to create a MotionProperties object + /// so that the object can be switched to kinematic or dynamic + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:99 + ///
+ /// bool mAllowDynamicOrKinematic = false + ///
+ ///
+ public bool GetAllowDynamicOrKinematic() => Jolt.PInvoke.BodyCreationSettings_GetAllowDynamicOrKinematic(this); + + /// + /// + /// When this body is created as static, this setting tells the system to create a MotionProperties object + /// so that the object can be switched to kinematic or dynamic + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:99 + ///
+ /// bool mAllowDynamicOrKinematic = false + ///
+ ///
+ public void SetAllowDynamicOrKinematic(bool value) => + Jolt.PInvoke.BodyCreationSettings_SetAllowDynamicOrKinematic(this, value); + + /// + /// + /// If this body is a sensor. A sensor will receive collision callbacks, but will not cause any collision + /// responses and can be used as a trigger volume. See description at Body::SetIsSensor. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:100 + ///
+ /// bool mIsSensor = false + ///
+ ///
+ public bool GetIsSensor() => Jolt.PInvoke.BodyCreationSettings_GetIsSensor(this); + + /// + /// + /// If this body is a sensor. A sensor will receive collision callbacks, but will not cause any collision + /// responses and can be used as a trigger volume. See description at Body::SetIsSensor. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:100 + ///
+ /// bool mIsSensor = false + ///
+ ///
+ public void SetIsSensor(bool value) => Jolt.PInvoke.BodyCreationSettings_SetIsSensor(this, value); + + /// + /// + /// If kinematic objects can generate contact points against other kinematic or static objects. See + /// description at Body::SetCollideKinematicVsNonDynamic. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:101 + ///
+ /// bool mCollideKinematicVsNonDynamic = false + ///
+ ///
+ public bool GetCollideKinematicVsNonDynamic() => + Jolt.PInvoke.BodyCreationSettings_GetCollideKinematicVsNonDynamic(this); + + /// + /// + /// If kinematic objects can generate contact points against other kinematic or static objects. See + /// description at Body::SetCollideKinematicVsNonDynamic. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:101 + ///
+ /// bool mCollideKinematicVsNonDynamic = false + ///
+ ///
+ public void SetCollideKinematicVsNonDynamic(bool value) => + Jolt.PInvoke.BodyCreationSettings_SetCollideKinematicVsNonDynamic(this, value); + + /// + /// + /// If this body should use manifold reduction (see description at Body::SetUseManifoldReduction) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:102 + ///
+ /// bool mUseManifoldReduction = true + ///
+ ///
+ public bool GetUseManifoldReduction() => Jolt.PInvoke.BodyCreationSettings_GetUseManifoldReduction(this); + + /// + /// + /// If this body should use manifold reduction (see description at Body::SetUseManifoldReduction) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:102 + ///
+ /// bool mUseManifoldReduction = true + ///
+ ///
+ public void SetUseManifoldReduction(bool value) => + Jolt.PInvoke.BodyCreationSettings_SetUseManifoldReduction(this, value); + + /// + /// + /// Set to indicate that the gyroscopic force should be applied to this body (aka Dzhanibekov effect, see + /// https://en.wikipedia.org/wiki/Tennis_racket_theorem) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:103 + ///
+ /// bool mApplyGyroscopicForce = false + ///
+ ///
+ public bool GetApplyGyroscopicForce() => Jolt.PInvoke.BodyCreationSettings_GetApplyGyroscopicForce(this); + + /// + /// + /// Set to indicate that the gyroscopic force should be applied to this body (aka Dzhanibekov effect, see + /// https://en.wikipedia.org/wiki/Tennis_racket_theorem) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:103 + ///
+ /// bool mApplyGyroscopicForce = false + ///
+ ///
+ public void SetApplyGyroscopicForce(bool value) => + Jolt.PInvoke.BodyCreationSettings_SetApplyGyroscopicForce(this, value); + + /// + /// + /// Motion quality, or how well it detects collisions when it has a high velocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:104 + ///
+ /// EMotionQuality mMotionQuality = EMotionQuality::Discrete + ///
+ ///
+ public MotionQuality GetMotionQuality() => Jolt.PInvoke.BodyCreationSettings_GetMotionQuality(this); + + /// + /// + /// Motion quality, or how well it detects collisions when it has a high velocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:104 + ///
+ /// EMotionQuality mMotionQuality = EMotionQuality::Discrete + ///
+ ///
+ public void SetMotionQuality(MotionQuality value) => + Jolt.PInvoke.BodyCreationSettings_SetMotionQuality(this, value); + + /// + /// + /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with + /// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex + /// edges. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:105 + ///
+ /// bool mEnhancedInternalEdgeRemoval = false + ///
+ ///
+ public bool GetEnhancedInternalEdgeRemoval() => + Jolt.PInvoke.BodyCreationSettings_GetEnhancedInternalEdgeRemoval(this); + + /// + /// + /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with + /// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex + /// edges. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:105 + ///
+ /// bool mEnhancedInternalEdgeRemoval = false + ///
+ ///
+ public void SetEnhancedInternalEdgeRemoval(bool value) => + Jolt.PInvoke.BodyCreationSettings_SetEnhancedInternalEdgeRemoval(this, value); + + /// + /// + /// If this body can go to sleep or not + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:106 + ///
+ /// bool mAllowSleeping = true + ///
+ ///
+ public bool GetAllowSleeping() => Jolt.PInvoke.BodyCreationSettings_GetAllowSleeping(this); + + /// + /// + /// If this body can go to sleep or not + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:106 + ///
+ /// bool mAllowSleeping = true + ///
+ ///
+ public void SetAllowSleeping(bool value) => Jolt.PInvoke.BodyCreationSettings_SetAllowSleeping(this, value); + + /// + /// + /// Friction of the body (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force + /// equals force that presses the two bodies together). Note that bodies can have negative friction but the + /// combined friction (see PhysicsSystem::SetCombineFriction) should never go below zero. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:107 + ///
+ /// float mFriction = 0.2f + ///
+ ///
+ public float GetFriction() => Jolt.PInvoke.BodyCreationSettings_GetFriction(this); + + /// + /// + /// Friction of the body (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force + /// equals force that presses the two bodies together). Note that bodies can have negative friction but the + /// combined friction (see PhysicsSystem::SetCombineFriction) should never go below zero. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:107 + ///
+ /// float mFriction = 0.2f + ///
+ ///
+ public void SetFriction(float value) => Jolt.PInvoke.BodyCreationSettings_SetFriction(this, value); + + /// + /// + /// Restitution of body (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision + /// response, 1 = completely elastic collision response). Note that bodies can have negative restitution but + /// the combined restitution (see PhysicsSystem::SetCombineRestitution) should never go below zero. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:108 + ///
+ /// float mRestitution = 0.0f + ///
+ ///
+ public float GetRestitution() => Jolt.PInvoke.BodyCreationSettings_GetRestitution(this); + + /// + /// + /// Restitution of body (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision + /// response, 1 = completely elastic collision response). Note that bodies can have negative restitution but + /// the combined restitution (see PhysicsSystem::SetCombineRestitution) should never go below zero. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:108 + ///
+ /// float mRestitution = 0.0f + ///
+ ///
+ public void SetRestitution(float value) => Jolt.PInvoke.BodyCreationSettings_SetRestitution(this, value); + + /// + /// + /// Linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:109 + ///
+ /// float mLinearDamping = 0.05f + ///
+ ///
+ public float GetLinearDamping() => Jolt.PInvoke.BodyCreationSettings_GetLinearDamping(this); + + /// + /// + /// Linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:109 + ///
+ /// float mLinearDamping = 0.05f + ///
+ ///
+ public void SetLinearDamping(float value) => Jolt.PInvoke.BodyCreationSettings_SetLinearDamping(this, value); + + /// + /// + /// Angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:110 + ///
+ /// float mAngularDamping = 0.05f + ///
+ ///
+ public float GetAngularDamping() => Jolt.PInvoke.BodyCreationSettings_GetAngularDamping(this); + + /// + /// + /// Angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:110 + ///
+ /// float mAngularDamping = 0.05f + ///
+ ///
+ public void SetAngularDamping(float value) => Jolt.PInvoke.BodyCreationSettings_SetAngularDamping(this, value); + + /// + /// + /// Maximum linear velocity that this body can reach (m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:111 + ///
+ /// float mMaxLinearVelocity = 500.0f + ///
+ ///
+ public float GetMaxLinearVelocity() => Jolt.PInvoke.BodyCreationSettings_GetMaxLinearVelocity(this); + + /// + /// + /// Maximum linear velocity that this body can reach (m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:111 + ///
+ /// float mMaxLinearVelocity = 500.0f + ///
+ ///
+ public void SetMaxLinearVelocity(float value) => + Jolt.PInvoke.BodyCreationSettings_SetMaxLinearVelocity(this, value); + + /// + /// + /// Maximum angular velocity that this body can reach (rad/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:112 + ///
+ /// float mMaxAngularVelocity = 0.25f * JPH_PI * 60.0f + ///
+ ///
+ public float GetMaxAngularVelocity() => Jolt.PInvoke.BodyCreationSettings_GetMaxAngularVelocity(this); + + /// + /// + /// Maximum angular velocity that this body can reach (rad/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:112 + ///
+ /// float mMaxAngularVelocity = 0.25f * JPH_PI * 60.0f + ///
+ ///
+ public void SetMaxAngularVelocity(float value) => + Jolt.PInvoke.BodyCreationSettings_SetMaxAngularVelocity(this, value); + + /// + /// + /// Value to multiply gravity with for this body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:113 + ///
+ /// float mGravityFactor = 1.0f + ///
+ ///
+ public float GetGravityFactor() => Jolt.PInvoke.BodyCreationSettings_GetGravityFactor(this); + + /// + /// + /// Value to multiply gravity with for this body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:113 + ///
+ /// float mGravityFactor = 1.0f + ///
+ ///
+ public void SetGravityFactor(float value) => Jolt.PInvoke.BodyCreationSettings_SetGravityFactor(this, value); + + /// + /// + /// Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations + /// to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use + /// is the max of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:114 + ///
+ /// uint mNumVelocityStepsOverride = 0 + ///
+ ///
+ public uint GetNumVelocityStepsOverride() => + Jolt.PInvoke.BodyCreationSettings_GetNumVelocityStepsOverride(this); + + /// + /// + /// Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations + /// to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use + /// is the max of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:114 + ///
+ /// uint mNumVelocityStepsOverride = 0 + ///
+ ///
+ public void SetNumVelocityStepsOverride(uint value) => + Jolt.PInvoke.BodyCreationSettings_SetNumVelocityStepsOverride(this, value); + + /// + /// + /// Used only when this body is dynamic and colliding. Override for the number of solver position iterations + /// to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use + /// is the max of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:115 + ///
+ /// uint mNumPositionStepsOverride = 0 + ///
+ ///
+ public uint GetNumPositionStepsOverride() => + Jolt.PInvoke.BodyCreationSettings_GetNumPositionStepsOverride(this); + + /// + /// + /// Used only when this body is dynamic and colliding. Override for the number of solver position iterations + /// to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use + /// is the max of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:115 + ///
+ /// uint mNumPositionStepsOverride = 0 + ///
+ ///
+ public void SetNumPositionStepsOverride(uint value) => + Jolt.PInvoke.BodyCreationSettings_SetNumPositionStepsOverride(this, value); + + /// + /// + /// Determines how mMassPropertiesOverride will be used + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:118 + ///
+ /// EOverrideMassProperties mOverrideMassProperties = EOverrideMassProperties::CalculateMassAndInertia + ///
+ ///
+ /// + /// + /// @name Mass properties of the body (by default calculated by the shape) + /// + /// + public OverrideMassProperties GetOverrideMassProperties() => + Jolt.PInvoke.BodyCreationSettings_GetOverrideMassProperties(this); + + /// + /// + /// Determines how mMassPropertiesOverride will be used + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:118 + ///
+ /// EOverrideMassProperties mOverrideMassProperties = EOverrideMassProperties::CalculateMassAndInertia + ///
+ ///
+ /// + /// + /// @name Mass properties of the body (by default calculated by the shape) + /// + /// + public void SetOverrideMassProperties(OverrideMassProperties value) => + Jolt.PInvoke.BodyCreationSettings_SetOverrideMassProperties(this, value); + + /// + /// + /// When calculating the inertia (not when it is provided) the calculated inertia will be multiplied by this + /// value + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:119 + ///
+ /// float mInertiaMultiplier = 1.0f + ///
+ ///
+ public float GetInertiaMultiplier() => Jolt.PInvoke.BodyCreationSettings_GetInertiaMultiplier(this); + + /// + /// + /// When calculating the inertia (not when it is provided) the calculated inertia will be multiplied by this + /// value + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:119 + ///
+ /// float mInertiaMultiplier = 1.0f + ///
+ ///
+ public void SetInertiaMultiplier(float value) => + Jolt.PInvoke.BodyCreationSettings_SetInertiaMultiplier(this, value); + + /// + /// + /// Contains replacement mass settings which override the automatically calculated values + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:120 + ///
+ /// MassProperties mMassPropertiesOverride + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MassProperties GetMassPropertiesOverride() => + Jolt.PInvoke.BodyCreationSettings_GetMassPropertiesOverride(this); + + /// + /// + /// Contains replacement mass settings which override the automatically calculated values + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:120 + ///
+ /// MassProperties mMassPropertiesOverride + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetMassPropertiesOverride(MassProperties value) => + Jolt.PInvoke.BodyCreationSettings_SetMassPropertiesOverride(this, value); + + public void Dispose() => Jolt.PInvoke.BodyCreationSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyDrawFilter.gen.cs b/Brutal.Jolt/Generated/Classes/BodyDrawFilter.gen.cs new file mode 100644 index 0000000..cf47300 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyDrawFilter.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class function to filter out bodies for debug rendering, returns true if body should be rendered + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:116 + ///
+ /// class BodyDrawFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyDrawFilter : IDisposable + { + public static BodyDrawFilter Create() => Jolt.PInvoke.BodyDrawFilter_Create(); + + /// + /// + /// Filter function. Returns true if inBody should be rendered + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:123 + ///
+ /// virtual bool ShouldDraw(const Body& inBody) const + ///
+ ///
+ public bool ShouldDraw(Body body) => Jolt.PInvoke.BodyDrawFilter_ShouldDraw(this, body); + + public void Dispose() => Jolt.PInvoke.BodyDrawFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyFilter.gen.cs b/Brutal.Jolt/Generated/Classes/BodyFilter.gen.cs new file mode 100644 index 0000000..ef3ea83 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyFilter.gen.cs @@ -0,0 +1,56 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class function to filter out bodies, returns true if test should collide with body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:15 + ///
+ /// class BodyFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyFilter : IDisposable + { + public static BodyFilter Create() => Jolt.PInvoke.BodyFilter_Create(); + + /// + /// + /// Filter function. Returns true if we should collide with inBodyID + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:22 + ///
+ /// virtual bool ShouldCollide(const BodyID &inBodyID) const + ///
+ ///
+ public bool ShouldCollide(uint bodyID) => Jolt.PInvoke.BodyFilter_ShouldCollide(this, bodyID); + + /// + /// + /// Filter function. Returns true if we should collide with inBody (this is called after the body is locked + /// and makes it possible to filter based on body members) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:28 + ///
+ /// virtual bool ShouldCollideLocked(const Body &inBody) const + ///
+ ///
+ public bool ShouldCollideLocked(Body body) => Jolt.PInvoke.BodyFilter_ShouldCollideLocked(this, body); + + public void Dispose() => Jolt.PInvoke.BodyFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyInterface.gen.cs b/Brutal.Jolt/Generated/Classes/BodyInterface.gen.cs new file mode 100644 index 0000000..c5acaba --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyInterface.gen.cs @@ -0,0 +1,1841 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that provides operations on bodies using a body ID. Note that if you need to do multiple operations on + /// a single body, it is more efficient to lock the body once and combine the operations. All quantities are in + /// world space unless otherwise specified. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:35 + ///
+ /// class BodyInterface : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyInterface + { + /// + /// + /// Initialize the interface (should only be called by PhysicsSystem) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:39 + ///
+ /// void Init(BodyLockInterface &inBodyLockInterface, BodyManager &inBodyManager, BroadPhase &inBroadPhase) + ///
+ ///
+ public void Init(BodyLockInterface bodyLockInterface, BodyManager bodyManager, BroadPhase broadPhase) => + Jolt.PInvoke.BodyInterface_Init(this, bodyLockInterface, bodyManager, broadPhase); + + /// + /// + /// Create a rigid body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:43 + ///
+ /// Body * CreateBody(const BodyCreationSettings &inSettings) + ///
+ ///
+ /// + /// + /// Create a rigid body + /// @return Created body or null when out of bodies + /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body CreateBody(BodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateBody(this, settings); + + /// + /// + /// Create a soft body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:47 + ///
+ /// Body * CreateSoftBody(const SoftBodyCreationSettings &inSettings) + ///
+ ///
+ /// + /// + /// Create a soft body + /// @return Created body or null when out of bodies + /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body CreateSoftBody(SoftBodyCreationSettings settings) => + Jolt.PInvoke.BodyInterface_CreateSoftBody(this, settings); + + /// + /// + /// Create a rigid body with specified ID. This function can be used if a simulation is to run in sync + /// between clients or if a simulation needs to be restored exactly. The ID created on the server can be + /// replicated to the client and used to create a deterministic simulation. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:52 + ///
+ /// Body * CreateBodyWithID(const BodyID &inBodyID, const BodyCreationSettings &inSettings) + ///
+ ///
+ /// + /// + /// Create a rigid body with specified ID. This function can be used if a simulation is to run in sync between clients or if a simulation needs to be restored exactly. + /// The ID created on the server can be replicated to the client and used to create a deterministic simulation. + /// @return Created body or null when the body ID is invalid or a body of the same ID already exists. + /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body CreateBodyWithID(uint bodyID, BodyCreationSettings settings) => + Jolt.PInvoke.BodyInterface_CreateBodyWithID(this, bodyID, settings); + + /// + /// + /// Create a soft body with specified ID. See comments at CreateBodyWithID. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:55 + ///
+ /// Body * CreateSoftBodyWithID(const BodyID &inBodyID, const SoftBodyCreationSettings &inSettings) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body CreateSoftBodyWithID(uint bodyID, SoftBodyCreationSettings settings) => + Jolt.PInvoke.BodyInterface_CreateSoftBodyWithID(this, bodyID, settings); + + /// + /// + /// Advanced use only. Creates a rigid body without specifying an ID. This body cannot be added to the + /// physics system until it has been assigned a body ID. This can be used to decouple allocation from + /// registering the body. A call to CreateBodyWithoutID followed by AssignBodyID is equivalent to calling + /// CreateBodyWithID. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:60 + ///
+ /// Body * CreateBodyWithoutID(const BodyCreationSettings &inSettings) const + ///
+ ///
+ /// + /// + /// Advanced use only. Creates a rigid body without specifying an ID. This body cannot be added to the physics system until it has been assigned a body ID. + /// This can be used to decouple allocation from registering the body. A call to CreateBodyWithoutID followed by AssignBodyID is equivalent to calling CreateBodyWithID. + /// @return Created body + /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body CreateBodyWithoutID(BodyCreationSettings settings) => + Jolt.PInvoke.BodyInterface_CreateBodyWithoutID(this, settings); + + /// + /// + /// Advanced use only. Creates a body without specifying an ID. See comments at CreateBodyWithoutID. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:63 + ///
+ /// Body * CreateSoftBodyWithoutID(const SoftBodyCreationSettings &inSettings) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body CreateSoftBodyWithoutID(SoftBodyCreationSettings settings) => + Jolt.PInvoke.BodyInterface_CreateSoftBodyWithoutID(this, settings); + + /// + /// + /// Advanced use only. Destroy a body previously created with CreateBodyWithoutID that hasn't gotten an ID + /// yet through the AssignBodyID function, or a body that has had its body ID unassigned through + /// UnassignBodyIDs. Bodies that have an ID should be destroyed through DestroyBody. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:67 + ///
+ /// void DestroyBodyWithoutID(Body *inBody) const + ///
+ ///
+ public void DestroyBodyWithoutID(Body body) => Jolt.PInvoke.BodyInterface_DestroyBodyWithoutID(this, body); + + /// + /// + /// Advanced use only. Assigns the next available body ID to a body that was created using + /// CreateBodyWithoutID. After this call, the body can be added to the physics system. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:71 + ///
+ /// bool AssignBodyID(Body *ioBody) + ///
+ ///
+ /// + /// + /// Advanced use only. Assigns the next available body ID to a body that was created using CreateBodyWithoutID. After this call, the body can be added to the physics system. + /// @return false if the body already has an ID or out of body ids. + /// + /// + public bool AssignBodyID(Body body) => Jolt.PInvoke.BodyInterface_AssignBodyID(this, body); + + /// + /// + /// Advanced use only. Assigns a body ID to a body that was created using CreateBodyWithoutID. After this + /// call, the body can be added to the physics system. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:75 + ///
+ /// bool AssignBodyID(Body *ioBody, const BodyID &inBodyID) + ///
+ ///
+ /// + /// + /// Advanced use only. Assigns a body ID to a body that was created using CreateBodyWithoutID. After this call, the body can be added to the physics system. + /// @return false if the body already has an ID or if the ID is not valid. + /// + /// + public bool AssignBodyID(Body body, uint bodyID) => + Jolt.PInvoke.BodyInterface_AssignBodyID_2(this, body, bodyID); + + /// + /// + /// Advanced use only. See UnassignBodyIDs. Unassigns the ID of a single body. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:78 + ///
+ /// Body * UnassignBodyID(const BodyID &inBodyID) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body UnassignBodyID(uint bodyID) => Jolt.PInvoke.BodyInterface_UnassignBodyID(this, bodyID); + + /// + /// + /// Advanced use only. Removes a number of body IDs from their bodies and returns the body pointers. Before + /// calling this, the body should have been removed from the physics system. The body can be destroyed + /// through DestroyBodyWithoutID. This can be used to decouple deallocation. A call to UnassignBodyIDs + /// followed by calls to DestroyBodyWithoutID is equivalent to calling DestroyBodies. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:85 + ///
+ /// void UnassignBodyIDs(const BodyID *inBodyIDs, int inNumber, Body **outBodies) + ///
+ ///
+ /// + /// + /// Advanced use only. Removes a number of body IDs from their bodies and returns the body pointers. Before calling this, the body should have been removed from the physics system. + /// The body can be destroyed through DestroyBodyWithoutID. This can be used to decouple deallocation. A call to UnassignBodyIDs followed by calls to DestroyBodyWithoutID is equivalent to calling DestroyBodies. + /// @param inBodyIDs A list of body IDs + /// @param inNumber Number of bodies in the list + /// @param outBodies If not null on input, this will contain a list of body pointers corresponding to inBodyIDs that can be destroyed afterwards (caller assumes ownership over these). + /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + /// bodies is a buffer of Body handles you allocate and size, read by the call. + /// + /// + public unsafe void UnassignBodyIDs(ReadOnlySpan bodyIDs, Ptr bodies) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyInterface_UnassignBodyIDs(this, bodyIDs_fixed, (int)bodyIDs.Length, bodies); + } + } + + /// + /// + /// Destroy a body. Make sure that you remove the body from the physics system using + /// BodyInterface::RemoveBody before calling this function. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:89 + ///
+ /// void DestroyBody(const BodyID &inBodyID) + ///
+ ///
+ public void DestroyBody(uint bodyID) => Jolt.PInvoke.BodyInterface_DestroyBody(this, bodyID); + + /// + /// + /// Destroy multiple bodies Make sure that you remove the bodies from the physics system using + /// BodyInterface::RemoveBody before calling this function. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:93 + ///
+ /// void DestroyBodies(const BodyID *inBodyIDs, int inNumber) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void DestroyBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyInterface_DestroyBodies(this, bodyIDs_fixed, (int)bodyIDs.Length); + } + } + + /// + /// + /// Add body to the physics system. Note that if you need to add multiple bodies, use the + /// AddBodiesPrepare/AddBodiesFinalize function. Adding many bodies, one at a time, results in a really + /// inefficient broadphase until PhysicsSystem::OptimizeBroadPhase is called or when PhysicsSystem::Update + /// rebuilds the tree! After adding, to get a body by ID use the BodyLockRead or BodyLockWrite interface! + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:99 + ///
+ /// void AddBody(const BodyID &inBodyID, EActivation inActivationMode) + ///
+ ///
+ public void AddBody(uint bodyID, Activation activationMode) => + Jolt.PInvoke.BodyInterface_AddBody(this, bodyID, activationMode); + + /// + /// + /// Remove body from the physics system. Note that you need to add a body to the physics system before you + /// can remove it. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:102 + ///
+ /// void RemoveBody(const BodyID &inBodyID) + ///
+ ///
+ public void RemoveBody(uint bodyID) => Jolt.PInvoke.BodyInterface_RemoveBody(this, bodyID); + + /// + /// + /// Check if a body has been added to the physics system. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:105 + ///
+ /// bool IsAdded(const BodyID &inBodyID) const + ///
+ ///
+ public bool IsAdded(uint bodyID) => Jolt.PInvoke.BodyInterface_IsAdded(this, bodyID); + + /// + /// + /// Combines CreateBody and AddBody + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:109 + ///
+ /// BodyID CreateAndAddBody(const BodyCreationSettings &inSettings, EActivation inActivationMode) + ///
+ ///
+ /// + /// + /// Combines CreateBody and AddBody + /// @return Created body ID or an invalid ID when out of bodies + /// + /// + public uint CreateAndAddBody(BodyCreationSettings settings, Activation activationMode) => + Jolt.PInvoke.BodyInterface_CreateAndAddBody(this, settings, activationMode); + + /// + /// + /// Combines CreateSoftBody and AddBody + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:113 + ///
+ /// BodyID CreateAndAddSoftBody(const SoftBodyCreationSettings &inSettings, EActivation inActivationMode) + ///
+ ///
+ /// + /// + /// Combines CreateSoftBody and AddBody + /// @return Created body ID or an invalid ID when out of bodies + /// + /// + public uint CreateAndAddSoftBody(SoftBodyCreationSettings settings, Activation activationMode) => + Jolt.PInvoke.BodyInterface_CreateAndAddSoftBody(this, settings, activationMode); + + /// + /// + /// Remove inNumber bodies in ioBodies from the PhysicsSystem. Note that bodies need to be added to the + /// physics system before they can be removed. ioBodies may be shuffled around by this function. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:137 + ///
+ /// void RemoveBodies(BodyID *ioBodies, int inNumber) + ///
+ ///
+ /// + /// + /// bodies is the buffer the native call works on, and its element count travels with it: the call may write + /// through the span, and only for the duration of the call. + /// + /// + public unsafe void RemoveBodies(Span bodies) + { + fixed (uint* bodies_fixed = bodies) + { + Jolt.PInvoke.BodyInterface_RemoveBodies(this, bodies_fixed, (int)bodies.Length); + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:142 + ///
+ /// void ActivateBody(const BodyID &inBodyID) + ///
+ ///
+ /// + /// + /// @name Activate / deactivate a body. Note that you need to add a body to the physics system before you can activate it. + /// @{ + /// + /// + public void ActivateBody(uint bodyID) => Jolt.PInvoke.BodyInterface_ActivateBody(this, bodyID); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:143 + ///
+ /// void ActivateBodies(const BodyID *inBodyIDs, int inNumber) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void ActivateBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyInterface_ActivateBodies(this, bodyIDs_fixed, (int)bodyIDs.Length); + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:144 + ///
+ /// void ActivateBodiesInAABox(const AABox &inBox, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) + ///
+ ///
+ /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public void ActivateBodiesInAABox( + in AABox box, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => Jolt.PInvoke.BodyInterface_ActivateBodiesInAABox(this, in box, broadPhaseLayerFilter, objectLayerFilter); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:145 + ///
+ /// void DeactivateBody(const BodyID &inBodyID) + ///
+ ///
+ public void DeactivateBody(uint bodyID) => Jolt.PInvoke.BodyInterface_DeactivateBody(this, bodyID); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:146 + ///
+ /// void DeactivateBodies(const BodyID *inBodyIDs, int inNumber) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void DeactivateBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyInterface_DeactivateBodies(this, bodyIDs_fixed, (int)bodyIDs.Length); + } + } + + /// + /// + /// Checks if a body is currently actively simulating + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:147 + ///
+ /// bool IsActive(const BodyID &inBodyID) const + ///
+ ///
+ public bool IsActive(uint bodyID) => Jolt.PInvoke.BodyInterface_IsActive(this, bodyID); + + /// + /// + /// @see Body::ResetSleepTimer + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:148 + ///
+ /// void ResetSleepTimer(const BodyID &inBodyID) + ///
+ ///
+ public void ResetSleepTimer(uint bodyID) => Jolt.PInvoke.BodyInterface_ResetSleepTimer(this, bodyID); + + /// + /// + /// Create a two body constraint + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:152 + ///
+ /// TwoBodyConstraint * CreateConstraint(const TwoBodyConstraintSettings *inSettings, const BodyID &inBodyID1, const BodyID &inBodyID2) + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public TwoBodyConstraint CreateConstraint(TwoBodyConstraintSettings settings, uint bodyID1, uint bodyID2) => + Jolt.PInvoke.BodyInterface_CreateConstraint(this, settings, bodyID1, bodyID2); + + /// + /// + /// Activate non-static bodies attached to a constraint. Note that the bodies involved in the constraint + /// should be added to the physics system before activating a constraint. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:156 + ///
+ /// void ActivateConstraint(const TwoBodyConstraint *inConstraint) + ///
+ ///
+ public void ActivateConstraint(TwoBodyConstraint constraint) => + Jolt.PInvoke.BodyInterface_ActivateConstraint(this, constraint); + + /// + /// + /// Get the current shape + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:162 + ///
+ /// RefConst<Shape> GetShape(const BodyID &inBodyID) const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetShape(uint bodyID) => Jolt.PInvoke.BodyInterface_GetShape(this, bodyID); + + /// + /// + /// Set a new shape on the body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:169 + ///
+ /// void SetShape(const BodyID &inBodyID, const Shape *inShape, bool inUpdateMassProperties, EActivation inActivationMode) const + ///
+ ///
+ /// + /// + /// Set a new shape on the body + /// @param inBodyID Body ID of body that had its shape changed + /// @param inShape The new shape + /// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated + /// @param inActivationMode Whether or not to activate the body + /// + /// + public void SetShape(uint bodyID, Shape shape, bool updateMassProperties, Activation activationMode) => + Jolt.PInvoke.BodyInterface_SetShape(this, bodyID, shape, updateMassProperties, activationMode); + + /// + /// + /// Notify all systems to indicate that a shape has changed (usable for MutableCompoundShapes) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:176 + ///
+ /// void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inPreviousCenterOfMass, bool inUpdateMassProperties, EActivation inActivationMode) const + ///
+ ///
+ /// + /// + /// Notify all systems to indicate that a shape has changed (usable for MutableCompoundShapes) + /// @param inBodyID Body ID of body that had its shape changed + /// @param inPreviousCenterOfMass Center of mass of the shape before the alterations + /// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated + /// @param inActivationMode Whether or not to activate the body + /// + /// + public void NotifyShapeChanged( + uint bodyID, + float3 previousCenterOfMass, + bool updateMassProperties, + Activation activationMode + ) => + Jolt.PInvoke.BodyInterface_NotifyShapeChanged( + this, + bodyID, + previousCenterOfMass, + updateMassProperties, + activationMode + ); + + /// + /// + /// The collision layer this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:181 + ///
+ /// void SetObjectLayer(const BodyID &inBodyID, ObjectLayer inLayer) + ///
+ ///
+ /// + /// + /// @name Object layer of a body + /// @{ + /// + /// + public void SetObjectLayer(uint bodyID, ushort layer) => + Jolt.PInvoke.BodyInterface_SetObjectLayer(this, bodyID, layer); + + /// + /// + /// @see Body::GetObjectLayer + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:182 + ///
+ /// ObjectLayer GetObjectLayer(const BodyID &inBodyID) const + ///
+ ///
+ public ushort GetObjectLayer(uint bodyID) => Jolt.PInvoke.BodyInterface_GetObjectLayer(this, bodyID); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:187 + ///
+ /// void SetPositionAndRotation(const BodyID &inBodyID, RVec3Arg inPosition, QuatArg inRotation, EActivation inActivationMode) + ///
+ ///
+ /// + /// + /// @name Position and rotation of a body + /// @{ + /// + /// + public void SetPositionAndRotation( + uint bodyID, + float3 position, + floatQuat rotation, + Activation activationMode + ) => Jolt.PInvoke.BodyInterface_SetPositionAndRotation(this, bodyID, position, rotation, activationMode); + + /// + /// + /// Will only update the position/rotation and activate the body when the difference is larger than a very + /// small number. This avoids updating the broadphase/waking up a body when the resulting + /// position/orientation doesn't really change. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:188 + ///
+ /// void SetPositionAndRotationWhenChanged(const BodyID &inBodyID, RVec3Arg inPosition, QuatArg inRotation, EActivation inActivationMode) + ///
+ ///
+ public void SetPositionAndRotationWhenChanged( + uint bodyID, + float3 position, + floatQuat rotation, + Activation activationMode + ) => + Jolt.PInvoke.BodyInterface_SetPositionAndRotationWhenChanged( + this, + bodyID, + position, + rotation, + activationMode + ); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:189 + ///
+ /// void GetPositionAndRotation(const BodyID &inBodyID, RVec3 &outPosition, Quat &outRotation) const + ///
+ ///
+ public void GetPositionAndRotation(uint bodyID, out float3 position, out floatQuat rotation) => + Jolt.PInvoke.BodyInterface_GetPositionAndRotation(this, bodyID, out position, out rotation); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:190 + ///
+ /// void SetPosition(const BodyID &inBodyID, RVec3Arg inPosition, EActivation inActivationMode) + ///
+ ///
+ public void SetPosition(uint bodyID, float3 position, Activation activationMode) => + Jolt.PInvoke.BodyInterface_SetPosition(this, bodyID, position, activationMode); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:191 + ///
+ /// RVec3 GetPosition(const BodyID &inBodyID) const + ///
+ ///
+ public float3 GetPosition(uint bodyID) => Jolt.PInvoke.BodyInterface_GetPosition(this, bodyID); + + /// + /// + /// @see Body::GetCenterOfMassPosition + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:192 + ///
+ /// RVec3 GetCenterOfMassPosition(const BodyID &inBodyID) const + ///
+ ///
+ public float3 GetCenterOfMassPosition(uint bodyID) => + Jolt.PInvoke.BodyInterface_GetCenterOfMassPosition(this, bodyID); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:193 + ///
+ /// void SetRotation(const BodyID &inBodyID, QuatArg inRotation, EActivation inActivationMode) + ///
+ ///
+ public void SetRotation(uint bodyID, floatQuat rotation, Activation activationMode) => + Jolt.PInvoke.BodyInterface_SetRotation(this, bodyID, rotation, activationMode); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:194 + ///
+ /// Quat GetRotation(const BodyID &inBodyID) const + ///
+ ///
+ public floatQuat GetRotation(uint bodyID) => Jolt.PInvoke.BodyInterface_GetRotation(this, bodyID); + + /// + /// + /// @see Body::GetWorldTransform + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:195 + ///
+ /// RMat44 GetWorldTransform(const BodyID &inBodyID) const + ///
+ ///
+ public float4x4 GetWorldTransform(uint bodyID) => Jolt.PInvoke.BodyInterface_GetWorldTransform(this, bodyID); + + /// + /// + /// @see Body::GetCenterOfMassTransform + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:196 + ///
+ /// RMat44 GetCenterOfMassTransform(const BodyID &inBodyID) const + ///
+ ///
+ public float4x4 GetCenterOfMassTransform(uint bodyID) => + Jolt.PInvoke.BodyInterface_GetCenterOfMassTransform(this, bodyID); + + /// + /// + /// Set velocity of body such that it will be positioned at inTargetPosition/Rotation in inDeltaTime seconds + /// (will activate body if needed) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:200 + ///
+ /// void MoveKinematic(const BodyID &inBodyID, RVec3Arg inTargetPosition, QuatArg inTargetRotation, float inDeltaTime) + ///
+ ///
+ public void MoveKinematic(uint bodyID, float3 targetPosition, floatQuat targetRotation, float deltaTime) => + Jolt.PInvoke.BodyInterface_MoveKinematic(this, bodyID, targetPosition, targetRotation, deltaTime); + + /// + /// + /// Linear or angular velocity (functions will activate body if needed). Note that the linear velocity is + /// the velocity of the center of mass, which may not coincide with the position of your object, to correct + /// for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$ + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:204 + ///
+ /// void SetLinearAndAngularVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetLinearAndAngularVelocity(uint bodyID, float3 linearVelocity, float3 angularVelocity) => + Jolt.PInvoke.BodyInterface_SetLinearAndAngularVelocity(this, bodyID, linearVelocity, angularVelocity); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:205 + ///
+ /// void GetLinearAndAngularVelocity(const BodyID &inBodyID, Vec3 &outLinearVelocity, Vec3 &outAngularVelocity) const + ///
+ ///
+ public void GetLinearAndAngularVelocity(uint bodyID, out float3 linearVelocity, out float3 angularVelocity) => + Jolt.PInvoke.BodyInterface_GetLinearAndAngularVelocity( + this, + bodyID, + out linearVelocity, + out angularVelocity + ); + + /// + /// + /// @see Body::SetLinearVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:206 + ///
+ /// void SetLinearVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity) + ///
+ ///
+ public void SetLinearVelocity(uint bodyID, float3 linearVelocity) => + Jolt.PInvoke.BodyInterface_SetLinearVelocity(this, bodyID, linearVelocity); + + /// + /// + /// @see Body::GetLinearVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:207 + ///
+ /// Vec3 GetLinearVelocity(const BodyID &inBodyID) const + ///
+ ///
+ public float3 GetLinearVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetLinearVelocity(this, bodyID); + + /// + /// + /// Add velocity to current velocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:208 + ///
+ /// void AddLinearVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity) + ///
+ ///
+ public void AddLinearVelocity(uint bodyID, float3 linearVelocity) => + Jolt.PInvoke.BodyInterface_AddLinearVelocity(this, bodyID, linearVelocity); + + /// + /// + /// Add linear and angular to current velocities + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:209 + ///
+ /// void AddLinearAndAngularVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity) + ///
+ ///
+ public void AddLinearAndAngularVelocity(uint bodyID, float3 linearVelocity, float3 angularVelocity) => + Jolt.PInvoke.BodyInterface_AddLinearAndAngularVelocity(this, bodyID, linearVelocity, angularVelocity); + + /// + /// + /// @see Body::SetAngularVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:210 + ///
+ /// void SetAngularVelocity(const BodyID &inBodyID, Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetAngularVelocity(uint bodyID, float3 angularVelocity) => + Jolt.PInvoke.BodyInterface_SetAngularVelocity(this, bodyID, angularVelocity); + + /// + /// + /// @see Body::GetAngularVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:211 + ///
+ /// Vec3 GetAngularVelocity(const BodyID &inBodyID) const + ///
+ ///
+ public float3 GetAngularVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetAngularVelocity(this, bodyID); + + /// + /// + /// Velocity of point inPoint (in world space, e.g. on the surface of the body) of the body. @see + /// Body::GetPointVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:212 + ///
+ /// Vec3 GetPointVelocity(const BodyID &inBodyID, RVec3Arg inPoint) const + ///
+ ///
+ public float3 GetPointVelocity(uint bodyID, float3 point) => + Jolt.PInvoke.BodyInterface_GetPointVelocity(this, bodyID, point); + + /// + /// + /// Set the complete motion state of a body. Note that the linear velocity is the velocity of the center of + /// mass, which may not coincide with the position of your object, to correct for this: \f$VelocityCOM = + /// Velocity - AngularVelocity \times ShapeCOM\f$ + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:216 + ///
+ /// void SetPositionRotationAndVelocity(const BodyID &inBodyID, RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetPositionRotationAndVelocity( + uint bodyID, + float3 position, + floatQuat rotation, + float3 linearVelocity, + float3 angularVelocity + ) => + Jolt.PInvoke.BodyInterface_SetPositionRotationAndVelocity( + this, + bodyID, + position, + rotation, + linearVelocity, + angularVelocity + ); + + /// + /// + /// @see Body::AddForce + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:220 + ///
+ /// void AddForce(const BodyID &inBodyID, Vec3Arg inForce, EActivation inActivationMode = EActivation::Activate) + ///
+ ///
+ /// + /// + /// @name Add forces to the body. Note that you should add a body to the physics system before applying forces or torques. + /// @{ + /// + /// + public void AddForce(uint bodyID, float3 force, Activation activationMode = Activation.Activate) => + Jolt.PInvoke.BodyInterface_AddForce(this, bodyID, force, activationMode); + + /// + /// + /// Applied at world space position inPoint. @see Body::AddForce + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:221 + ///
+ /// void AddForce(const BodyID &inBodyID, Vec3Arg inForce, RVec3Arg inPoint, EActivation inActivationMode = EActivation::Activate) + ///
+ ///
+ public void AddForce( + uint bodyID, + float3 force, + float3 point, + Activation activationMode = Activation.Activate + ) => Jolt.PInvoke.BodyInterface_AddForce_2(this, bodyID, force, point, activationMode); + + /// + /// + /// @see Body::AddTorque + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:222 + ///
+ /// void AddTorque(const BodyID &inBodyID, Vec3Arg inTorque, EActivation inActivationMode = EActivation::Activate) + ///
+ ///
+ public void AddTorque(uint bodyID, float3 torque, Activation activationMode = Activation.Activate) => + Jolt.PInvoke.BodyInterface_AddTorque(this, bodyID, torque, activationMode); + + /// + /// + /// A combination of Body::AddForce and Body::AddTorque + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:223 + ///
+ /// void AddForceAndTorque(const BodyID &inBodyID, Vec3Arg inForce, Vec3Arg inTorque, EActivation inActivationMode = EActivation::Activate) + ///
+ ///
+ public void AddForceAndTorque( + uint bodyID, + float3 force, + float3 torque, + Activation activationMode = Activation.Activate + ) => Jolt.PInvoke.BodyInterface_AddForceAndTorque(this, bodyID, force, torque, activationMode); + + /// + /// + /// Applied at center of mass. @see Body::AddImpulse + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:228 + ///
+ /// void AddImpulse(const BodyID &inBodyID, Vec3Arg inImpulse) + ///
+ ///
+ /// + /// + /// @name Add an impulse to the body. Note that you should add a body to the physics system before applying impulses. + /// @{ + /// + /// + public void AddImpulse(uint bodyID, float3 impulse) => + Jolt.PInvoke.BodyInterface_AddImpulse(this, bodyID, impulse); + + /// + /// + /// Applied at world space position inPoint. @see Body::AddImpulse + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:229 + ///
+ /// void AddImpulse(const BodyID &inBodyID, Vec3Arg inImpulse, RVec3Arg inPoint) + ///
+ ///
+ public void AddImpulse(uint bodyID, float3 impulse, float3 point) => + Jolt.PInvoke.BodyInterface_AddImpulse_2(this, bodyID, impulse, point); + + /// + /// + /// @see Body::AddAngularImpulse + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:230 + ///
+ /// void AddAngularImpulse(const BodyID &inBodyID, Vec3Arg inAngularImpulse) + ///
+ ///
+ public void AddAngularImpulse(uint bodyID, float3 angularImpulse) => + Jolt.PInvoke.BodyInterface_AddAngularImpulse(this, bodyID, angularImpulse); + + /// + /// + /// @see Body::ApplyBuoyancyImpulse + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:231 + ///
+ /// bool ApplyBuoyancyImpulse(const BodyID &inBodyID, RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime) + ///
+ ///
+ public bool ApplyBuoyancyImpulse( + uint bodyID, + float3 surfacePosition, + float3 surfaceNormal, + float buoyancy, + float linearDrag, + float angularDrag, + float3 fluidVelocity, + float3 gravity, + float deltaTime + ) => + Jolt.PInvoke.BodyInterface_ApplyBuoyancyImpulse( + this, + bodyID, + surfacePosition, + surfaceNormal, + buoyancy, + linearDrag, + angularDrag, + fluidVelocity, + gravity, + deltaTime + ); + + /// + /// + /// @see Body::GetBodyType + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:236 + ///
+ /// EBodyType GetBodyType(const BodyID &inBodyID) const + ///
+ ///
+ /// + /// + /// @name Body type + /// @{ + /// + /// + public BodyType GetBodyType(uint bodyID) => Jolt.PInvoke.BodyInterface_GetBodyType(this, bodyID); + + /// + /// + /// @see Body::SetMotionType + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:241 + ///
+ /// void SetMotionType(const BodyID &inBodyID, EMotionType inMotionType, EActivation inActivationMode) + ///
+ ///
+ /// + /// + /// @name Body motion type + /// @{ + /// + /// + public void SetMotionType(uint bodyID, MotionType motionType, Activation activationMode) => + Jolt.PInvoke.BodyInterface_SetMotionType(this, bodyID, motionType, activationMode); + + /// + /// + /// @see Body::GetMotionType + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:242 + ///
+ /// EMotionType GetMotionType(const BodyID &inBodyID) const + ///
+ ///
+ public MotionType GetMotionType(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMotionType(this, bodyID); + + /// + /// + /// How well it detects collisions when it has a high velocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:247 + ///
+ /// void SetMotionQuality(const BodyID &inBodyID, EMotionQuality inMotionQuality) + ///
+ ///
+ /// + /// + /// @name Body motion quality + /// @{ + /// + /// + public void SetMotionQuality(uint bodyID, MotionQuality motionQuality) => + Jolt.PInvoke.BodyInterface_SetMotionQuality(this, bodyID, motionQuality); + + /// + /// + /// @see MotionProperties::GetMotionQuality + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:248 + ///
+ /// EMotionQuality GetMotionQuality(const BodyID &inBodyID) const + ///
+ ///
+ public MotionQuality GetMotionQuality(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMotionQuality(this, bodyID); + + /// + /// + /// @see Body::GetInverseInertia + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:252 + ///
+ /// Mat44 GetInverseInertia(const BodyID &inBodyID) const + ///
+ ///
+ /// + /// + /// Get inverse inertia tensor in world space + /// + /// + public float4x4 GetInverseInertia(uint bodyID) => Jolt.PInvoke.BodyInterface_GetInverseInertia(this, bodyID); + + /// + /// + /// @see Body::SetRestitution + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:256 + ///
+ /// void SetRestitution(const BodyID &inBodyID, float inRestitution) + ///
+ ///
+ /// + /// + /// @name Restitution + /// @{ + /// + /// + public void SetRestitution(uint bodyID, float restitution) => + Jolt.PInvoke.BodyInterface_SetRestitution(this, bodyID, restitution); + + /// + /// + /// @see Body::GetRestitution + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:257 + ///
+ /// float GetRestitution(const BodyID &inBodyID) const + ///
+ ///
+ public float GetRestitution(uint bodyID) => Jolt.PInvoke.BodyInterface_GetRestitution(this, bodyID); + + /// + /// + /// @see Body::SetFriction + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:262 + ///
+ /// void SetFriction(const BodyID &inBodyID, float inFriction) + ///
+ ///
+ /// + /// + /// @name Friction + /// @{ + /// + /// + public void SetFriction(uint bodyID, float friction) => + Jolt.PInvoke.BodyInterface_SetFriction(this, bodyID, friction); + + /// + /// + /// @see Body::GetFriction + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:263 + ///
+ /// float GetFriction(const BodyID &inBodyID) const + ///
+ ///
+ public float GetFriction(uint bodyID) => Jolt.PInvoke.BodyInterface_GetFriction(this, bodyID); + + /// + /// + /// @see MotionProperties::SetGravityFactor + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:268 + ///
+ /// void SetGravityFactor(const BodyID &inBodyID, float inGravityFactor) + ///
+ ///
+ /// + /// + /// @name Gravity factor + /// @{ + /// + /// + public void SetGravityFactor(uint bodyID, float gravityFactor) => + Jolt.PInvoke.BodyInterface_SetGravityFactor(this, bodyID, gravityFactor); + + /// + /// + /// @see MotionProperties::GetGravityFactor + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:269 + ///
+ /// float GetGravityFactor(const BodyID &inBodyID) const + ///
+ ///
+ public float GetGravityFactor(uint bodyID) => Jolt.PInvoke.BodyInterface_GetGravityFactor(this, bodyID); + + /// + /// + /// @see MotionProperties::SetMaxLinearVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:274 + ///
+ /// void SetMaxLinearVelocity(const BodyID &inBodyID, float inLinearVelocity) + ///
+ ///
+ /// + /// + /// @name Max linear velocity + /// @{ + /// + /// + public void SetMaxLinearVelocity(uint bodyID, float linearVelocity) => + Jolt.PInvoke.BodyInterface_SetMaxLinearVelocity(this, bodyID, linearVelocity); + + /// + /// + /// @see MotionProperties::GetMaxLinearVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:275 + ///
+ /// float GetMaxLinearVelocity(const BodyID &inBodyID) const + ///
+ ///
+ public float GetMaxLinearVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMaxLinearVelocity(this, bodyID); + + /// + /// + /// @see MotionProperties::SetMaxAngularVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:280 + ///
+ /// void SetMaxAngularVelocity(const BodyID &inBodyID, float inAngularVelocity) + ///
+ ///
+ /// + /// + /// @name Max angular velocity + /// @{ + /// + /// + public void SetMaxAngularVelocity(uint bodyID, float angularVelocity) => + Jolt.PInvoke.BodyInterface_SetMaxAngularVelocity(this, bodyID, angularVelocity); + + /// + /// + /// @see MotionProperties::GetMaxAngularVelocity + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:281 + ///
+ /// float GetMaxAngularVelocity(const BodyID &inBodyID) const + ///
+ ///
+ public float GetMaxAngularVelocity(uint bodyID) => + Jolt.PInvoke.BodyInterface_GetMaxAngularVelocity(this, bodyID); + + /// + /// + /// @see Body::SetUseManifoldReduction + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:286 + ///
+ /// void SetUseManifoldReduction(const BodyID &inBodyID, bool inUseReduction) + ///
+ ///
+ /// + /// + /// @name Manifold reduction + /// @{ + /// + /// + public void SetUseManifoldReduction(uint bodyID, bool useReduction) => + Jolt.PInvoke.BodyInterface_SetUseManifoldReduction(this, bodyID, useReduction); + + /// + /// + /// @see Body::GetUseManifoldReduction + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:287 + ///
+ /// bool GetUseManifoldReduction(const BodyID &inBodyID) const + ///
+ ///
+ public bool GetUseManifoldReduction(uint bodyID) => + Jolt.PInvoke.BodyInterface_GetUseManifoldReduction(this, bodyID); + + /// + /// + /// @see Body::SetIsSensor + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:292 + ///
+ /// void SetIsSensor(const BodyID &inBodyID, bool inIsSensor) + ///
+ ///
+ /// + /// + /// @name Sensor + /// @{ + /// + /// + public void SetIsSensor(uint bodyID, bool isSensor) => + Jolt.PInvoke.BodyInterface_SetIsSensor(this, bodyID, isSensor); + + /// + /// + /// @see Body::IsSensor + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:293 + ///
+ /// bool IsSensor(const BodyID &inBodyID) const + ///
+ ///
+ public bool IsSensor(uint bodyID) => Jolt.PInvoke.BodyInterface_IsSensor(this, bodyID); + + /// + /// + /// @see Body::SetCollisionGroup + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:298 + ///
+ /// void SetCollisionGroup(const BodyID &inBodyID, const CollisionGroup &inCollisionGroup) + ///
+ ///
+ /// + /// + /// @name Collision group + /// @{ + /// + /// + public void SetCollisionGroup(uint bodyID, CollisionGroup collisionGroup) => + Jolt.PInvoke.BodyInterface_SetCollisionGroup(this, bodyID, collisionGroup); + + /// + /// + /// @see Body::GetCollisionGroup + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:299 + ///
+ /// const CollisionGroup & GetCollisionGroup(const BodyID &inBodyID) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public CollisionGroup GetCollisionGroup(uint bodyID) => + Jolt.PInvoke.BodyInterface_GetCollisionGroup(this, bodyID); + + /// + /// + /// Get transform and shape for this body, used to perform collision detection + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:303 + ///
+ /// TransformedShape GetTransformedShape(const BodyID &inBodyID) const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public TransformedShape GetTransformedShape(uint bodyID) => + Jolt.PInvoke.BodyInterface_GetTransformedShape(this, bodyID); + + /// + /// + /// Get the user data for a body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:306 + ///
+ /// uint64 GetUserData(const BodyID &inBodyID) const + ///
+ ///
+ public ulong GetUserData(uint bodyID) => Jolt.PInvoke.BodyInterface_GetUserData(this, bodyID); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:307 + ///
+ /// void SetUserData(const BodyID &inBodyID, uint64 inUserData) const + ///
+ ///
+ public void SetUserData(uint bodyID, ulong userData) => + Jolt.PInvoke.BodyInterface_SetUserData(this, bodyID, userData); + + /// + /// + /// Get the material for a particular sub shape + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:310 + ///
+ /// const PhysicsMaterial * GetMaterial(const BodyID &inBodyID, const SubShapeID &inSubShapeID) const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial(uint bodyID, uint subShapeID) => + Jolt.PInvoke.BodyInterface_GetMaterial(this, bodyID, subShapeID); + + /// + /// + /// Set the Body::EFlags::InvalidateContactCache flag for the specified body. This means that the collision + /// cache is invalid for any body pair involving that body until the next physics step. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyInterface.h:313 + ///
+ /// void InvalidateContactCache(const BodyID &inBodyID) + ///
+ ///
+ public void InvalidateContactCache(uint bodyID) => + Jolt.PInvoke.BodyInterface_InvalidateContactCache(this, bodyID); + + /// + /// + /// Sets the position and rotation of every body in bodyIDs in one native call, through the same per-body + /// update BodyInterface.SetPositionAndRotation does (broad phase and activation included). Rotations must + /// be normalized. An ID that no longer names a body is skipped, as it is one at a time. Only as many + /// elements as there are IDs are read. + /// + /// + public unsafe void SetPositionsAndRotations( + ReadOnlySpan bodyIDs, + ReadOnlySpan positions, + ReadOnlySpan rotations, + Activation activation = Activation.Activate + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (positions.Length < bodyIDs.Length) + throw new ArgumentException( + "positions must hold at least one element per body ID.", + nameof(positions) + ); + if (rotations.Length < bodyIDs.Length) + throw new ArgumentException( + "rotations must hold at least one element per body ID.", + nameof(rotations) + ); + Jolt.PInvoke.BodyInterface_SetPositionsAndRotations( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length, + activation + ); + } + } + + /// + /// + /// Like SetPositionsAndRotations, but leaves a body alone when its new position and rotation are within a + /// very small tolerance of its current ones, so syncing an unchanged body doesn't wake it or touch the + /// broad phase. Rotations must be normalized. An ID that no longer names a body is skipped, as it is one at + /// a time. Only as many elements as there are IDs are read. + /// + /// + public unsafe void SetPositionsAndRotationsWhenChanged( + ReadOnlySpan bodyIDs, + ReadOnlySpan positions, + ReadOnlySpan rotations, + Activation activation = Activation.Activate + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (positions.Length < bodyIDs.Length) + throw new ArgumentException( + "positions must hold at least one element per body ID.", + nameof(positions) + ); + if (rotations.Length < bodyIDs.Length) + throw new ArgumentException( + "rotations must hold at least one element per body ID.", + nameof(rotations) + ); + Jolt.PInvoke.BodyInterface_SetPositionsAndRotationsWhenChanged( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length, + activation + ); + } + } + + /// + /// + /// Moves every kinematic body in bodyIDs towards its target position and rotation over deltaTime in one + /// native call, as BodyInterface.MoveKinematic does per body - the way to drive many animated bodies each + /// frame. An ID that no longer names a body is skipped, as it is one at a time. Only as many elements as + /// there are IDs are read. + /// + /// + public unsafe void MoveKinematics( + ReadOnlySpan bodyIDs, + ReadOnlySpan positions, + ReadOnlySpan rotations, + float deltaTime + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (positions.Length < bodyIDs.Length) + throw new ArgumentException( + "positions must hold at least one element per body ID.", + nameof(positions) + ); + if (rotations.Length < bodyIDs.Length) + throw new ArgumentException( + "rotations must hold at least one element per body ID.", + nameof(rotations) + ); + Jolt.PInvoke.BodyInterface_MoveKinematics( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length, + deltaTime + ); + } + } + + /// + /// + /// Sets the linear and angular velocity of every body in bodyIDs in one native call, as + /// BodyInterface.SetLinearAndAngularVelocity does per body (clamped, and a moving body is woken). Static + /// bodies are left alone. An ID that no longer names a body is skipped, as it is one at a time. Only as + /// many elements as there are IDs are read. + /// + /// + public unsafe void SetLinearAndAngularVelocities( + ReadOnlySpan bodyIDs, + ReadOnlySpan linearVelocities, + ReadOnlySpan angularVelocities + ) + { + fixed (float3* angularVelocities_fixed = angularVelocities) + fixed (float3* linearVelocities_fixed = linearVelocities) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (linearVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "linearVelocities must hold at least one element per body ID.", + nameof(linearVelocities) + ); + if (angularVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "angularVelocities must hold at least one element per body ID.", + nameof(angularVelocities) + ); + Jolt.PInvoke.BodyInterface_SetLinearAndAngularVelocities( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + linearVelocities_fixed, + (nuint)linearVelocities.Length, + angularVelocities_fixed, + (nuint)angularVelocities.Length + ); + } + } + + /// + /// + /// Adds a force at the center of mass of every body in bodyIDs in one native call, as + /// BodyInterface.AddForce does per body - wind, buoyancy or any force field over many bodies. An ID that no + /// longer names a body is skipped, as it is one at a time. Only as many elements as there are IDs are read. + /// + /// + public unsafe void AddForces( + ReadOnlySpan bodyIDs, + ReadOnlySpan forces, + Activation activation = Activation.Activate + ) + { + fixed (float3* forces_fixed = forces) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (forces.Length < bodyIDs.Length) + throw new ArgumentException("forces must hold at least one element per body ID.", nameof(forces)); + Jolt.PInvoke.BodyInterface_AddForces( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + forces_fixed, + (nuint)forces.Length, + activation + ); + } + } + + /// + /// + /// Adds an impulse at the center of mass of every body in bodyIDs in one native call, as + /// BodyInterface.AddImpulse does per body - an explosion over many bodies at once. An ID that no longer + /// names a body is skipped, as it is one at a time. Only as many elements as there are IDs are read. + /// + /// + public unsafe void AddImpulses(ReadOnlySpan bodyIDs, ReadOnlySpan impulses) + { + fixed (float3* impulses_fixed = impulses) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (impulses.Length < bodyIDs.Length) + throw new ArgumentException( + "impulses must hold at least one element per body ID.", + nameof(impulses) + ); + Jolt.PInvoke.BodyInterface_AddImpulses( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + impulses_fixed, + (nuint)impulses.Length + ); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockInterface.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockInterface.gen.cs new file mode 100644 index 0000000..25f6f65 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockInterface.gen.cs @@ -0,0 +1,177 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class interface for locking a body. Usually you will use BodyLockRead / BodyLockWrite / + /// BodyLockMultiRead / BodyLockMultiWrite instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLockInterface.h:16 + ///
+ /// class BodyLockInterface : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyLockInterface + { + /// + /// + /// Convert body ID to body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLockInterface.h:50 + ///
+ /// inline Body * TryGetBody(const BodyID &inBodyID) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body TryGetBody(uint bodyID) => Jolt.PInvoke.BodyLockInterface_TryGetBody(this, bodyID); + + /// + /// + /// Reads the world transform of every body in bodyIDs into transforms, taking the body locks once for the + /// whole set rather than once per body - what a render loop reading back many bodies wants. An ID that no + /// longer names a body (removed, or a stale sequence number) reads back as the identity, the same as + /// BodyInterface does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetWorldTransforms(ReadOnlySpan bodyIDs, Span transforms) + { + fixed (float4x4* transforms_fixed = transforms) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (transforms.Length < bodyIDs.Length) + throw new ArgumentException( + "transforms must hold at least one element per body ID.", + nameof(transforms) + ); + Jolt.PInvoke.BodyLockInterface_GetWorldTransforms( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + transforms_fixed, + (nuint)transforms.Length + ); + } + } + + /// + /// + /// Reads the position and rotation of every body in bodyIDs into positions and rotations, taking the body + /// locks once for the whole set rather than once per body. An ID that no longer names a body (removed, or a + /// stale sequence number) reads back as the origin and the identity rotation, the same as BodyInterface + /// does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetPositionsAndRotations( + ReadOnlySpan bodyIDs, + Span positions, + Span rotations + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (positions.Length < bodyIDs.Length) + throw new ArgumentException( + "positions must hold at least one element per body ID.", + nameof(positions) + ); + if (rotations.Length < bodyIDs.Length) + throw new ArgumentException( + "rotations must hold at least one element per body ID.", + nameof(rotations) + ); + Jolt.PInvoke.BodyLockInterface_GetPositionsAndRotations( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length + ); + } + } + + /// + /// + /// Reads the linear and angular velocity of every body in bodyIDs, taking the body locks once for the whole + /// set rather than once per body. A static body reads as zero, as it does one at a time. An ID that no + /// longer names a body (removed, or a stale sequence number) reads back as zero, the same as BodyInterface + /// does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetLinearAndAngularVelocities( + ReadOnlySpan bodyIDs, + Span linearVelocities, + Span angularVelocities + ) + { + fixed (float3* angularVelocities_fixed = angularVelocities) + fixed (float3* linearVelocities_fixed = linearVelocities) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (linearVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "linearVelocities must hold at least one element per body ID.", + nameof(linearVelocities) + ); + if (angularVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "angularVelocities must hold at least one element per body ID.", + nameof(angularVelocities) + ); + Jolt.PInvoke.BodyLockInterface_GetLinearAndAngularVelocities( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + linearVelocities_fixed, + (nuint)linearVelocities.Length, + angularVelocities_fixed, + (nuint)angularVelocities.Length + ); + } + } + + /// + /// + /// Reads the position, rotation, velocities, user data and activation of every body in bodyIDs into states, + /// taking the body locks once for the whole set - one pass where syncing a snapshot would otherwise take a + /// pose read, a velocity read and a per-body activation query. An ID that no longer names a body reads as + /// the origin at rest with BodyStateFlags.Valid clear. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetBodyStates(ReadOnlySpan bodyIDs, Span states) + { + fixed (BodyState* states_fixed = states) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (states.Length < bodyIDs.Length) + throw new ArgumentException("states must hold at least one element per body ID.", nameof(states)); + Jolt.PInvoke.BodyLockInterface_GetBodyStates( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + states_fixed, + (nuint)states.Length + ); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockInterfaceLocking.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockInterfaceLocking.gen.cs new file mode 100644 index 0000000..d20b83f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockInterfaceLocking.gen.cs @@ -0,0 +1,164 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation that uses the body manager to lock the correct mutex for a body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLockInterface.h:77 + ///
+ /// class BodyLockInterfaceLocking final : public BodyLockInterface + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyLockInterfaceLocking + { + /// + /// + /// Reads the world transform of every body in bodyIDs into transforms, taking the body locks once for the + /// whole set rather than once per body - what a render loop reading back many bodies wants. An ID that no + /// longer names a body (removed, or a stale sequence number) reads back as the identity, the same as + /// BodyInterface does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetWorldTransforms(ReadOnlySpan bodyIDs, Span transforms) + { + fixed (float4x4* transforms_fixed = transforms) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (transforms.Length < bodyIDs.Length) + throw new ArgumentException( + "transforms must hold at least one element per body ID.", + nameof(transforms) + ); + Jolt.PInvoke.BodyLockInterfaceLocking_GetWorldTransforms( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + transforms_fixed, + (nuint)transforms.Length + ); + } + } + + /// + /// + /// Reads the position and rotation of every body in bodyIDs into positions and rotations, taking the body + /// locks once for the whole set rather than once per body. An ID that no longer names a body (removed, or a + /// stale sequence number) reads back as the origin and the identity rotation, the same as BodyInterface + /// does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetPositionsAndRotations( + ReadOnlySpan bodyIDs, + Span positions, + Span rotations + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (positions.Length < bodyIDs.Length) + throw new ArgumentException( + "positions must hold at least one element per body ID.", + nameof(positions) + ); + if (rotations.Length < bodyIDs.Length) + throw new ArgumentException( + "rotations must hold at least one element per body ID.", + nameof(rotations) + ); + Jolt.PInvoke.BodyLockInterfaceLocking_GetPositionsAndRotations( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length + ); + } + } + + /// + /// + /// Reads the linear and angular velocity of every body in bodyIDs, taking the body locks once for the whole + /// set rather than once per body. A static body reads as zero, as it does one at a time. An ID that no + /// longer names a body (removed, or a stale sequence number) reads back as zero, the same as BodyInterface + /// does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetLinearAndAngularVelocities( + ReadOnlySpan bodyIDs, + Span linearVelocities, + Span angularVelocities + ) + { + fixed (float3* angularVelocities_fixed = angularVelocities) + fixed (float3* linearVelocities_fixed = linearVelocities) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (linearVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "linearVelocities must hold at least one element per body ID.", + nameof(linearVelocities) + ); + if (angularVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "angularVelocities must hold at least one element per body ID.", + nameof(angularVelocities) + ); + Jolt.PInvoke.BodyLockInterfaceLocking_GetLinearAndAngularVelocities( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + linearVelocities_fixed, + (nuint)linearVelocities.Length, + angularVelocities_fixed, + (nuint)angularVelocities.Length + ); + } + } + + /// + /// + /// Reads the position, rotation, velocities, user data and activation of every body in bodyIDs into states, + /// taking the body locks once for the whole set - one pass where syncing a snapshot would otherwise take a + /// pose read, a velocity read and a per-body activation query. An ID that no longer names a body reads as + /// the origin at rest with BodyStateFlags.Valid clear. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetBodyStates(ReadOnlySpan bodyIDs, Span states) + { + fixed (BodyState* states_fixed = states) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (states.Length < bodyIDs.Length) + throw new ArgumentException("states must hold at least one element per body ID.", nameof(states)); + Jolt.PInvoke.BodyLockInterfaceLocking_GetBodyStates( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + states_fixed, + (nuint)states.Length + ); + } + } + + public static implicit operator BodyLockInterface(BodyLockInterfaceLocking value) => + Unsafe.BitCast(value); + + /// + public Body TryGetBody(uint bodyID) => ((BodyLockInterface)this).TryGetBody(bodyID); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockInterfaceNoLock.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockInterfaceNoLock.gen.cs new file mode 100644 index 0000000..a7cb08c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockInterfaceNoLock.gen.cs @@ -0,0 +1,164 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation that performs no locking (assumes the lock has already been taken) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLockInterface.h:57 + ///
+ /// class BodyLockInterfaceNoLock final : public BodyLockInterface + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyLockInterfaceNoLock + { + /// + /// + /// Reads the world transform of every body in bodyIDs into transforms, taking the body locks once for the + /// whole set rather than once per body - what a render loop reading back many bodies wants. An ID that no + /// longer names a body (removed, or a stale sequence number) reads back as the identity, the same as + /// BodyInterface does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetWorldTransforms(ReadOnlySpan bodyIDs, Span transforms) + { + fixed (float4x4* transforms_fixed = transforms) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (transforms.Length < bodyIDs.Length) + throw new ArgumentException( + "transforms must hold at least one element per body ID.", + nameof(transforms) + ); + Jolt.PInvoke.BodyLockInterfaceNoLock_GetWorldTransforms( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + transforms_fixed, + (nuint)transforms.Length + ); + } + } + + /// + /// + /// Reads the position and rotation of every body in bodyIDs into positions and rotations, taking the body + /// locks once for the whole set rather than once per body. An ID that no longer names a body (removed, or a + /// stale sequence number) reads back as the origin and the identity rotation, the same as BodyInterface + /// does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetPositionsAndRotations( + ReadOnlySpan bodyIDs, + Span positions, + Span rotations + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (positions.Length < bodyIDs.Length) + throw new ArgumentException( + "positions must hold at least one element per body ID.", + nameof(positions) + ); + if (rotations.Length < bodyIDs.Length) + throw new ArgumentException( + "rotations must hold at least one element per body ID.", + nameof(rotations) + ); + Jolt.PInvoke.BodyLockInterfaceNoLock_GetPositionsAndRotations( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length + ); + } + } + + /// + /// + /// Reads the linear and angular velocity of every body in bodyIDs, taking the body locks once for the whole + /// set rather than once per body. A static body reads as zero, as it does one at a time. An ID that no + /// longer names a body (removed, or a stale sequence number) reads back as zero, the same as BodyInterface + /// does. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetLinearAndAngularVelocities( + ReadOnlySpan bodyIDs, + Span linearVelocities, + Span angularVelocities + ) + { + fixed (float3* angularVelocities_fixed = angularVelocities) + fixed (float3* linearVelocities_fixed = linearVelocities) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (linearVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "linearVelocities must hold at least one element per body ID.", + nameof(linearVelocities) + ); + if (angularVelocities.Length < bodyIDs.Length) + throw new ArgumentException( + "angularVelocities must hold at least one element per body ID.", + nameof(angularVelocities) + ); + Jolt.PInvoke.BodyLockInterfaceNoLock_GetLinearAndAngularVelocities( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + linearVelocities_fixed, + (nuint)linearVelocities.Length, + angularVelocities_fixed, + (nuint)angularVelocities.Length + ); + } + } + + /// + /// + /// Reads the position, rotation, velocities, user data and activation of every body in bodyIDs into states, + /// taking the body locks once for the whole set - one pass where syncing a snapshot would otherwise take a + /// pose read, a velocity read and a per-body activation query. An ID that no longer names a body reads as + /// the origin at rest with BodyStateFlags.Valid clear. Only as many elements as there are IDs are written. + /// + /// + public unsafe void GetBodyStates(ReadOnlySpan bodyIDs, Span states) + { + fixed (BodyState* states_fixed = states) + fixed (uint* bodyIDs_fixed = bodyIDs) + { + if (states.Length < bodyIDs.Length) + throw new ArgumentException("states must hold at least one element per body ID.", nameof(states)); + Jolt.PInvoke.BodyLockInterfaceNoLock_GetBodyStates( + this, + bodyIDs_fixed, + (nuint)bodyIDs.Length, + states_fixed, + (nuint)states.Length + ); + } + } + + public static implicit operator BodyLockInterface(BodyLockInterfaceNoLock value) => + Unsafe.BitCast(value); + + /// + public Body TryGetBody(uint bodyID) => ((BodyLockInterface)this).TryGetBody(bodyID); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockMultiRead.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockMultiRead.gen.cs new file mode 100644 index 0000000..2a62657 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockMultiRead.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A multi body lock takes a number of body IDs and locks the underlying bodies so that other threads cannot + /// access its members + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLockMulti.h:109 + ///
+ /// class BodyLockMultiRead : public BodyLockMultiBase<false, const Body> + ///
+ ///
+ /// + /// + /// A multi body lock takes a number of body IDs and locks the underlying bodies so that other threads cannot access its members + /// + /// The common usage pattern is: + /// + /// BodyLockInterface lock_interface = physics_system.GetBodyLockInterface(); // Or non-locking interface if the lock is already taken + /// const BodyID *body_id = ...; // Obtain IDs to bodies + /// int num_body_ids = ...; + /// + /// // Scoped lock + /// { + /// BodyLockMultiRead lock(lock_interface, body_ids, num_body_ids); + /// for (int i = 0; i < num_body_ids; ++i) + /// { + /// const Body *body = lock.GetBody(i); + /// if (body != nullptr) + /// { + /// const Body &body = lock.Body(); + /// + /// // Do something with body + /// ... + /// } + /// } + /// } + /// + /// + [InteropHandle] + public readonly partial struct BodyLockMultiRead { } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockMultiWrite.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockMultiWrite.gen.cs new file mode 100644 index 0000000..a59516a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockMultiWrite.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Specialization that locks multiple bodies for writing to. @see BodyLockMultiRead for usage patterns. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLockMulti.h:115 + ///
+ /// class BodyLockMultiWrite : public BodyLockMultiBase<true, Body> + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyLockMultiWrite { } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockRead.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockRead.gen.cs new file mode 100644 index 0000000..82163bc --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockRead.gen.cs @@ -0,0 +1,90 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A body lock takes a body ID and locks the underlying body so that other threads cannot access its members + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLock.h:100 + ///
+ /// class BodyLockRead : public BodyLockBase<false, const Body> + ///
+ ///
+ /// + /// + /// A body lock takes a body ID and locks the underlying body so that other threads cannot access its members + /// + /// The common usage pattern is: + /// + /// BodyLockInterface lock_interface = physics_system.GetBodyLockInterface(); // Or non-locking interface if the lock is already taken + /// BodyID body_id = ...; // Obtain ID to body + /// + /// // Scoped lock + /// { + /// BodyLockRead lock(lock_interface, body_id); + /// if (lock.Succeeded()) // body_id may no longer be valid + /// { + /// const Body &body = lock.GetBody(); + /// + /// // Do something with body + /// ... + /// } + /// } + /// + /// + [InteropHandle] + public readonly partial struct BodyLockRead : IDisposable + { + /// + /// + /// Takes the read lock on one body, held until Dispose (or ReleaseLock). An ID that no longer names a body + /// still returns a lock, whose Succeeded() is false. Through PhysicsSystem.GetBodyLockInterface() this + /// really locks; through GetBodyLockInterfaceNoLock() it doesn't, for code that already runs where no other + /// thread can touch the body. + /// + /// + public static BodyLockRead Create(BodyLockInterface lockInterface, uint bodyID) => + Jolt.PInvoke.BodyLockRead_Create(lockInterface, bodyID); + + /// + /// + /// Whether the ID named a body, so GetBody() has one. + /// + /// + public bool Succeeded() => Jolt.PInvoke.BodyLockRead_Succeeded(this); + + /// + /// + /// Whether the ID named a body that is also in the broad phase (added to the physics system). + /// + /// + public bool SucceededAndIsInBroadPhase() => Jolt.PInvoke.BodyLockRead_SucceededAndIsInBroadPhase(this); + + /// + /// + /// The locked body, or a null handle when Succeeded() is false (where Jolt itself would assert). It is + /// borrowed and only safe to use while the lock is held. A read lock means read only: don't call anything + /// that changes the body. + /// + /// + public Body GetBody() => Jolt.PInvoke.BodyLockRead_GetBody(this); + + /// + /// + /// Releases the lock early; Dispose is still needed to free the lock object. GetBody() is null afterwards. + /// + /// + public void ReleaseLock() => Jolt.PInvoke.BodyLockRead_ReleaseLock(this); + + public void Dispose() => Jolt.PInvoke.BodyLockRead_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyLockWrite.gen.cs b/Brutal.Jolt/Generated/Classes/BodyLockWrite.gen.cs new file mode 100644 index 0000000..c15c24e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyLockWrite.gen.cs @@ -0,0 +1,67 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Specialization that locks a body for writing to. @see BodyLockRead for usage patterns. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyLock.h:106 + ///
+ /// class BodyLockWrite : public BodyLockBase<true, Body> + ///
+ ///
+ [InteropHandle] + public readonly partial struct BodyLockWrite : IDisposable + { + /// + /// + /// Takes the write lock on one body, held until Dispose (or ReleaseLock). An ID that no longer names a body + /// still returns a lock, whose Succeeded() is false. Through PhysicsSystem.GetBodyLockInterface() this + /// really locks; through GetBodyLockInterfaceNoLock() it doesn't, for code that already runs where no other + /// thread can touch the body. + /// + /// + public static BodyLockWrite Create(BodyLockInterface lockInterface, uint bodyID) => + Jolt.PInvoke.BodyLockWrite_Create(lockInterface, bodyID); + + /// + /// + /// Whether the ID named a body, so GetBody() has one. + /// + /// + public bool Succeeded() => Jolt.PInvoke.BodyLockWrite_Succeeded(this); + + /// + /// + /// Whether the ID named a body that is also in the broad phase (added to the physics system). + /// + /// + public bool SucceededAndIsInBroadPhase() => Jolt.PInvoke.BodyLockWrite_SucceededAndIsInBroadPhase(this); + + /// + /// + /// The locked body, or a null handle when Succeeded() is false (where Jolt itself would assert). It is + /// borrowed and only safe to use while the lock is held. + /// + /// + public Body GetBody() => Jolt.PInvoke.BodyLockWrite_GetBody(this); + + /// + /// + /// Releases the lock early; Dispose is still needed to free the lock object. GetBody() is null afterwards. + /// + /// + public void ReleaseLock() => Jolt.PInvoke.BodyLockWrite_ReleaseLock(this); + + public void Dispose() => Jolt.PInvoke.BodyLockWrite_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BodyManager.gen.cs b/Brutal.Jolt/Generated/Classes/BodyManager.gen.cs new file mode 100644 index 0000000..a6c10ec --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BodyManager.gen.cs @@ -0,0 +1,1235 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that contains all bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:46 + ///
+ /// class BodyManager : public NonCopyable + ///
+ ///
+ /// + /// + /// Class that contains all bodies + /// + /// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library. + /// Its functionality is exposed through PhysicsSystem, BodyInterface, BodyLockRead and BodyLockWrite. + /// + /// + [InteropHandle] + public readonly partial struct BodyManager + { + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:222 + ///
+ /// enum class EShapeColor + ///
+ ///
+ public enum ShapeColor : int + { + /// + /// + /// Random color per instance + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:224 + ///
+ /// InstanceColor + ///
+ ///
+ InstanceColor, + + /// + /// + /// Convex = green, scaled = yellow, compound = orange, mesh = red + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:225 + ///
+ /// ShapeTypeColor + ///
+ ///
+ ShapeTypeColor, + + /// + /// + /// Static = grey, keyframed = green, dynamic = random color per instance + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:226 + ///
+ /// MotionTypeColor + ///
+ ///
+ MotionTypeColor, + + /// + /// + /// Static = grey, keyframed = green, dynamic = yellow, sleeping = red + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:227 + ///
+ /// SleepColor + ///
+ ///
+ SleepColor, + + /// + /// + /// Static = grey, active = random color per island, sleeping = light grey + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:228 + ///
+ /// IslandColor + ///
+ ///
+ IslandColor, + + /// + /// + /// Color as defined by the PhysicsMaterial of the shape + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:229 + ///
+ /// MaterialColor + ///
+ ///
+ MaterialColor, + } + + /// + /// + /// Helper struct that counts the number of bodies of each type + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:64 + ///
+ /// struct BodyStats + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 36)] + public partial struct BodyStats + { + /// + /// + /// Total number of bodies in the body manager + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:66 + ///
+ /// uint mNumBodies = 0 + ///
+ ///
+ [FieldOffset(0)] + public uint NumBodies; + + /// + /// + /// Max allowed number of bodies in the body manager (as configured in Init(...)) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:67 + ///
+ /// uint mMaxBodies = 0 + ///
+ ///
+ [FieldOffset(4)] + public uint MaxBodies; + + /// + /// + /// Number of static bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:69 + ///
+ /// uint mNumBodiesStatic = 0 + ///
+ ///
+ [FieldOffset(8)] + public uint NumBodiesStatic; + + /// + /// + /// Number of dynamic bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:71 + ///
+ /// uint mNumBodiesDynamic = 0 + ///
+ ///
+ [FieldOffset(12)] + public uint NumBodiesDynamic; + + /// + /// + /// Number of dynamic bodies that are currently active + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:72 + ///
+ /// uint mNumActiveBodiesDynamic = 0 + ///
+ ///
+ [FieldOffset(16)] + public uint NumActiveBodiesDynamic; + + /// + /// + /// Number of kinematic bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:74 + ///
+ /// uint mNumBodiesKinematic = 0 + ///
+ ///
+ [FieldOffset(20)] + public uint NumBodiesKinematic; + + /// + /// + /// Number of kinematic bodies that are currently active + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:75 + ///
+ /// uint mNumActiveBodiesKinematic = 0 + ///
+ ///
+ [FieldOffset(24)] + public uint NumActiveBodiesKinematic; + + /// + /// + /// Number of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:77 + ///
+ /// uint mNumSoftBodies = 0 + ///
+ ///
+ [FieldOffset(28)] + public uint NumSoftBodies; + + /// + /// + /// Number of soft bodies that are currently active + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:78 + ///
+ /// uint mNumActiveSoftBodies = 0 + ///
+ ///
+ [FieldOffset(32)] + public uint NumActiveSoftBodies; + } + + /// + /// + /// Draw settings + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:243 + ///
+ /// struct DrawSettings + ///
+ ///
+ /// + /// + /// Draw settings + /// + /// Note that there are several debug drawing features that are not exposed through this interface since they use information + /// that is only available deep inside the simulation update and are mostly there to facilitate debugging Jolt. These options + /// use DebugRenderer::sInstance to draw. + /// + /// E.g.: + /// * To draw contact information, use ContactConstraintManager::sDrawContactManifolds. + /// * To draw when continuous collision detection is used, use PhysicsSystem::sDrawMotionQualityLinearCast. + /// * To draw what's going on in a CharacterVirtual update, use CharacterVirtual::sDrawConstraints, CharacterVirtual::sDrawWalkStairs and CharacterVirtual::sDrawStickToFloor. + /// * To draw the volume of water that interacts with a shape, use Shape::sDrawSubmergedVolumes. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 36)] + public partial struct DrawSettings + { + /// + /// + /// Draw the GetSupport() function, used for convex collision detection + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:245 + ///
+ /// bool mDrawGetSupportFunction = false + ///
+ ///
+ [FieldOffset(0)] + public Brutal.Bool8 DrawGetSupportFunction; + + /// + /// + /// When drawing the support function, also draw which direction mapped to a specific support point + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:246 + ///
+ /// bool mDrawSupportDirection = false + ///
+ ///
+ [FieldOffset(1)] + public Brutal.Bool8 DrawSupportDirection; + + /// + /// + /// Draw the faces that were found colliding during collision detection + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:247 + ///
+ /// bool mDrawGetSupportingFace = false + ///
+ ///
+ [FieldOffset(2)] + public Brutal.Bool8 DrawGetSupportingFace; + + /// + /// + /// Draw the shapes of all bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:248 + ///
+ /// bool mDrawShape = true + ///
+ ///
+ [FieldOffset(3)] + public Brutal.Bool8 DrawShape; + + /// + /// + /// When mDrawShape is true and this is true, the shapes will be drawn in wireframe instead of solid. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:249 + ///
+ /// bool mDrawShapeWireframe = false + ///
+ ///
+ [FieldOffset(4)] + public Brutal.Bool8 DrawShapeWireframe; + + /// + /// + /// Coloring scheme to use for shapes + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:250 + ///
+ /// EShapeColor mDrawShapeColor = EShapeColor::MotionTypeColor + ///
+ ///
+ [FieldOffset(8)] + public BodyManager.ShapeColor DrawShapeColor; + + /// + /// + /// Draw a bounding box per body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:251 + ///
+ /// bool mDrawBoundingBox = false + ///
+ ///
+ [FieldOffset(12)] + public Brutal.Bool8 DrawBoundingBox; + + /// + /// + /// Draw the center of mass for each body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:252 + ///
+ /// bool mDrawCenterOfMassTransform = false + ///
+ ///
+ [FieldOffset(13)] + public Brutal.Bool8 DrawCenterOfMassTransform; + + /// + /// + /// Draw the world transform (which can be different than the center of mass) for each body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:253 + ///
+ /// bool mDrawWorldTransform = false + ///
+ ///
+ [FieldOffset(14)] + public Brutal.Bool8 DrawWorldTransform; + + /// + /// + /// Draw the velocity vector for each body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:254 + ///
+ /// bool mDrawVelocity = false + ///
+ ///
+ [FieldOffset(15)] + public Brutal.Bool8 DrawVelocity; + + /// + /// + /// Draw the mass and inertia (as the box equivalent) for each body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:255 + ///
+ /// bool mDrawMassAndInertia = false + ///
+ ///
+ [FieldOffset(16)] + public Brutal.Bool8 DrawMassAndInertia; + + /// + /// + /// Draw stats regarding the sleeping algorithm of each body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:256 + ///
+ /// bool mDrawSleepStats = false + ///
+ ///
+ [FieldOffset(17)] + public Brutal.Bool8 DrawSleepStats; + + /// + /// + /// Draw the vertices of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:257 + ///
+ /// bool mDrawSoftBodyVertices = false + ///
+ ///
+ [FieldOffset(18)] + public Brutal.Bool8 DrawSoftBodyVertices; + + /// + /// + /// Draw the velocities of the vertices of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:258 + ///
+ /// bool mDrawSoftBodyVertexVelocities = false + ///
+ ///
+ [FieldOffset(19)] + public Brutal.Bool8 DrawSoftBodyVertexVelocities; + + /// + /// + /// Draw the edge constraints of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:259 + ///
+ /// bool mDrawSoftBodyEdgeConstraints = false + ///
+ ///
+ [FieldOffset(20)] + public Brutal.Bool8 DrawSoftBodyEdgeConstraints; + + /// + /// + /// Draw the bend constraints of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:260 + ///
+ /// bool mDrawSoftBodyBendConstraints = false + ///
+ ///
+ [FieldOffset(21)] + public Brutal.Bool8 DrawSoftBodyBendConstraints; + + /// + /// + /// Draw the volume constraints of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:261 + ///
+ /// bool mDrawSoftBodyVolumeConstraints = false + ///
+ ///
+ [FieldOffset(22)] + public Brutal.Bool8 DrawSoftBodyVolumeConstraints; + + /// + /// + /// Draw the skin constraints of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:262 + ///
+ /// bool mDrawSoftBodySkinConstraints = false + ///
+ ///
+ [FieldOffset(23)] + public Brutal.Bool8 DrawSoftBodySkinConstraints; + + /// + /// + /// Draw the LRA constraints of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:263 + ///
+ /// bool mDrawSoftBodyLRAConstraints = false + ///
+ ///
+ [FieldOffset(24)] + public Brutal.Bool8 DrawSoftBodyLRAConstraints; + + /// + /// + /// Draw the rods of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:264 + ///
+ /// bool mDrawSoftBodyRods = false + ///
+ ///
+ [FieldOffset(25)] + public Brutal.Bool8 DrawSoftBodyRods; + + /// + /// + /// Draw the rod states (orientation and angular velocity) of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:265 + ///
+ /// bool mDrawSoftBodyRodStates = false + ///
+ ///
+ [FieldOffset(26)] + public Brutal.Bool8 DrawSoftBodyRodStates; + + /// + /// + /// Draw the rod bend twist constraints of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:266 + ///
+ /// bool mDrawSoftBodyRodBendTwistConstraints = false + ///
+ ///
+ [FieldOffset(27)] + public Brutal.Bool8 DrawSoftBodyRodBendTwistConstraints; + + /// + /// + /// Draw the predicted bounds of soft bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:267 + ///
+ /// bool mDrawSoftBodyPredictedBounds = false + ///
+ ///
+ [FieldOffset(28)] + public Brutal.Bool8 DrawSoftBodyPredictedBounds; + + /// + /// + /// Coloring scheme to use for soft body constraints + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:268 + ///
+ /// ESoftBodyConstraintColor mDrawSoftBodyConstraintColor = ESoftBodyConstraintColor::ConstraintType + ///
+ ///
+ [FieldOffset(32)] + public SoftBodyConstraintColor DrawSoftBodyConstraintColor; + } + + /// + /// + /// Initialize the manager + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:55 + ///
+ /// void Init(uint inMaxBodies, uint inNumBodyMutexes, const BroadPhaseLayerInterface &inLayerInterface) + ///
+ ///
+ public void Init(uint maxBodies, uint numBodyMutexes, BroadPhaseLayerInterface layerInterface) => + Jolt.PInvoke.BodyManager_Init(this, maxBodies, numBodyMutexes, layerInterface); + + /// + /// + /// Gets the current amount of bodies that are in the body manager + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:58 + ///
+ /// uint GetNumBodies() const + ///
+ ///
+ public uint GetNumBodies() => Jolt.PInvoke.BodyManager_GetNumBodies(this); + + /// + /// + /// Gets the max bodies that we can support + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:61 + ///
+ /// uint GetMaxBodies() const + ///
+ ///
+ public uint GetMaxBodies() => Jolt.PInvoke.BodyManager_GetMaxBodies(this); + + /// + /// + /// Get stats about the bodies in the body manager (slow, iterates through all bodies) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:82 + ///
+ /// BodyStats GetBodyStats() const + ///
+ ///
+ public BodyManager.BodyStats GetBodyStats() + { + Jolt.PInvoke.BodyManager_GetBodyStats(this, out var _outResult); + return _outResult; + } + + /// + /// + /// Create a body using creation settings. The returned body will not be part of the body manager yet. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:85 + ///
+ /// Body * AllocateBody(const BodyCreationSettings &inBodyCreationSettings) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body AllocateBody(BodyCreationSettings bodyCreationSettings) => + Jolt.PInvoke.BodyManager_AllocateBody(this, bodyCreationSettings); + + /// + /// + /// Create a soft body using creation settings. The returned body will not be part of the body manager yet. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:88 + ///
+ /// Body * AllocateSoftBody(const SoftBodyCreationSettings &inSoftBodyCreationSettings) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body AllocateSoftBody(SoftBodyCreationSettings softBodyCreationSettings) => + Jolt.PInvoke.BodyManager_AllocateSoftBody(this, softBodyCreationSettings); + + /// + /// + /// Free a body that has not been added to the body manager yet (if it has, use DestroyBodies). + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:91 + ///
+ /// void FreeBody(Body *inBody) const + ///
+ ///
+ public void FreeBody(Body body) => Jolt.PInvoke.BodyManager_FreeBody(this, body); + + /// + /// + /// Add a body to the body manager, assigning it the next available ID. Returns false if no more IDs are + /// available. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:94 + ///
+ /// bool AddBody(Body *ioBody) + ///
+ ///
+ public bool AddBody(Body body) => Jolt.PInvoke.BodyManager_AddBody(this, body); + + /// + /// + /// Add a body to the body manager, assigning it a custom ID. Returns false if the ID is not valid. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:97 + ///
+ /// bool AddBodyWithCustomID(Body *ioBody, const BodyID &inBodyID) + ///
+ ///
+ public bool AddBodyWithCustomID(Body body, uint bodyID) => + Jolt.PInvoke.BodyManager_AddBodyWithCustomID(this, body, bodyID); + + /// + /// + /// Remove a list of bodies from the body manager + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:100 + ///
+ /// void RemoveBodies(const BodyID *inBodyIDs, int inNumber, Body **outBodies) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + /// bodies is a buffer of Body handles you allocate and size, read by the call. + /// + /// + public unsafe void RemoveBodies(ReadOnlySpan bodyIDs, Ptr bodies) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyManager_RemoveBodies(this, bodyIDs_fixed, (int)bodyIDs.Length, bodies); + } + } + + /// + /// + /// Remove a set of bodies from the body manager and frees them. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:103 + ///
+ /// void DestroyBodies(const BodyID *inBodyIDs, int inNumber) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void DestroyBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyManager_DestroyBodies(this, bodyIDs_fixed, (int)bodyIDs.Length); + } + } + + /// + /// + /// Activate a list of bodies. This function should only be called when an exclusive lock for the bodies are + /// held. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:107 + ///
+ /// void ActivateBodies(const BodyID *inBodyIDs, int inNumber) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void ActivateBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyManager_ActivateBodies(this, bodyIDs_fixed, (int)bodyIDs.Length); + } + } + + /// + /// + /// Deactivate a list of bodies. This function should only be called when an exclusive lock for the bodies + /// are held. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:111 + ///
+ /// void DeactivateBodies(const BodyID *inBodyIDs, int inNumber) + ///
+ ///
+ /// + /// + /// bodyIDs is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void DeactivateBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + Jolt.PInvoke.BodyManager_DeactivateBodies(this, bodyIDs_fixed, (int)bodyIDs.Length); + } + } + + /// + /// + /// Update the motion quality for a body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:114 + ///
+ /// void SetMotionQuality(Body &ioBody, EMotionQuality inMotionQuality) + ///
+ ///
+ public void SetMotionQuality(Body body, MotionQuality motionQuality) => + Jolt.PInvoke.BodyManager_SetMotionQuality(this, body, motionQuality); + + /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:117 + ///
+ /// void GetActiveBodies(EBodyType inType, BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public NativeArray GetActiveBodies(BodyType type) + { + Jolt.PInvoke.BodyManager_GetActiveBodies(this, type, out var bodyIDs_raw); + return new NativeArray(bodyIDs_raw); + } + + /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:117 + ///
+ /// void GetActiveBodies(EBodyType inType, BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint GetActiveBodies(BodyType type, Span results, out uint totalHits) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BodyManager_GetActiveBodies_2(this, type, results_fixed, (uint)results.Length); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get the number of active bodies. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:123 + ///
+ /// uint32 GetNumActiveBodies(EBodyType inType) const + ///
+ ///
+ public uint GetNumActiveBodies(BodyType type) => Jolt.PInvoke.BodyManager_GetNumActiveBodies(this, type); + + /// + /// + /// Get the number of active bodies that are using continuous collision detection + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:126 + ///
+ /// uint32 GetNumActiveCCDBodies() const + ///
+ ///
+ public uint GetNumActiveCCDBodies() => Jolt.PInvoke.BodyManager_GetNumActiveCCDBodies(this); + + /// + /// + /// Listener that is notified whenever a body is activated/deactivated + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:129 + ///
+ /// void SetBodyActivationListener(BodyActivationListener *inListener) + ///
+ ///
+ public void SetBodyActivationListener(BodyActivationListener listener) => + Jolt.PInvoke.BodyManager_SetBodyActivationListener(this, listener); + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:130 + ///
+ /// BodyActivationListener * GetBodyActivationListener() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyActivationListener GetBodyActivationListener() => + Jolt.PInvoke.BodyManager_GetBodyActivationListener(this); + + /// + /// + /// Check if this is a valid body pointer. When a body is freed the memory that the pointer occupies is + /// reused to store a freelist. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:133 + ///
+ /// static inline bool sIsValidBodyPointer(const Body *inBody) + ///
+ ///
+ public static bool IsValidBodyPointer(Body body) => Jolt.PInvoke.BodyManager_IsValidBodyPointer(body); + + /// + /// + /// Get all bodies. Note that this can contain invalid body pointers, call sIsValidBodyPointer to check. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:139 + ///
+ /// BodyVector & GetBodies() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. The handles in it are borrowed from the + /// object that owns them: don't Dispose them, and don't read them once that owner is gone - the buffer + /// keeps the pointers alive, not the objects. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetBodies() + { + Jolt.PInvoke.BodyManager_GetBodies(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Get all body IDs under the protection of a lock + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:142 + ///
+ /// void GetBodyIDs(BodyIDVector &outBodies) const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public NativeArray GetBodyIDs() + { + Jolt.PInvoke.BodyManager_GetBodyIDs(this, out var bodies_raw); + return new NativeArray(bodies_raw); + } + + /// + /// + /// Get all body IDs under the protection of a lock + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:142 + ///
+ /// void GetBodyIDs(BodyIDVector &outBodies) const + ///
+ ///
+ /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint GetBodyIDs(Span results, out uint totalHits) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BodyManager_GetBodyIDs_2(this, results_fixed, (uint)results.Length); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Access a body (not protected by lock) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:145 + ///
+ /// const Body & GetBody(const BodyID &inID) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body GetBody(uint id) => Jolt.PInvoke.BodyManager_GetBody(this, id); + + /// + /// + /// Access a body, will return a nullptr if the body ID is no longer valid (not protected by lock) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:151 + ///
+ /// const Body * TryGetBody(const BodyID &inID) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body TryGetBody(uint id) => Jolt.PInvoke.BodyManager_TryGetBody(this, id); + + /// + /// + /// Lock all bodies. This should only be done during PhysicsSystem::Update(). + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:195 + ///
+ /// void LockAllBodies() const + ///
+ ///
+ public void LockAllBodies() => Jolt.PInvoke.BodyManager_LockAllBodies(this); + + /// + /// + /// Unlock all bodies. This should only be done during PhysicsSystem::Update(). + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:198 + ///
+ /// void UnlockAllBodies() const + ///
+ ///
+ public void UnlockAllBodies() => Jolt.PInvoke.BodyManager_UnlockAllBodies(this); + + /// + /// + /// Set the Body::EFlags::InvalidateContactCache flag for the specified body. This means that the collision + /// cache is invalid for any body pair involving that body until the next physics step. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:201 + ///
+ /// void InvalidateContactCacheForBody(Body &ioBody) + ///
+ ///
+ public void InvalidateContactCacheForBody(Body body) => + Jolt.PInvoke.BodyManager_InvalidateContactCacheForBody(this, body); + + /// + /// + /// Reset the Body::EFlags::InvalidateContactCache flag for all bodies. All contact pairs in the contact + /// cache will now by valid again. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:204 + ///
+ /// void ValidateContactCacheForAllBodies() + ///
+ ///
+ public void ValidateContactCacheForAllBodies() => + Jolt.PInvoke.BodyManager_ValidateContactCacheForAllBodies(this); + + /// + /// + /// Return the BroadPhaseLayerInterface that this class has been initialized with + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:207 + ///
+ /// const BroadPhaseLayerInterface &GetBroadPhaseLayerInterface() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BroadPhaseLayerInterface GetBroadPhaseLayerInterface() => + Jolt.PInvoke.BodyManager_GetBroadPhaseLayerInterface(this); + + /// + /// + /// Save the state of a single body for replay + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:216 + ///
+ /// void SaveBodyState(const Body &inBody, StateRecorder &inStream) const + ///
+ ///
+ public void SaveBodyState(Body body, StateRecorder stream) => + Jolt.PInvoke.BodyManager_SaveBodyState(this, body, stream); + + /// + /// + /// Save the state of a single body for replay + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:219 + ///
+ /// void RestoreBodyState(Body &inBody, StateRecorder &inStream) + ///
+ ///
+ public void RestoreBodyState(Body body, StateRecorder stream) => + Jolt.PInvoke.BodyManager_RestoreBodyState(this, body, stream); + + /// + /// + /// Draw the state of the bodies (debugging purposes) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:272 + ///
+ /// void Draw(const DrawSettings &inSettings, const PhysicsSettings &inPhysicsSettings, DebugRenderer *inRenderer, const BodyDrawFilter *inBodyFilter = nullptr) + ///
+ ///
+ public void Draw( + in BodyManager.DrawSettings settings, + in PhysicsSettings physicsSettings, + DebugRenderer renderer, + BodyDrawFilter bodyFilter = default + ) => Jolt.PInvoke.BodyManager_Draw(this, in settings, in physicsSettings, renderer, bodyFilter); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BoxShape.gen.cs b/Brutal.Jolt/Generated/Classes/BoxShape.gen.cs new file mode 100644 index 0000000..5d633ce --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BoxShape.gen.cs @@ -0,0 +1,383 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A box, centered around the origin + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:33 + ///
+ /// class BoxShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct BoxShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:39 + ///
+ /// BoxShape() + ///
+ ///
+ public static BoxShape Create() => Jolt.PInvoke.BoxShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:40 + ///
+ /// BoxShape(const BoxShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static BoxShape Create(BoxShapeSettings settings) + { + var _handle = Jolt.PInvoke.BoxShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create a box with half edge length inHalfExtent and convex radius inConvexRadius. (internally the convex + /// radius will be subtracted from the half extent so the total box will not grow with the convex radius). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:44 + ///
+ /// explicit BoxShape(Vec3Arg inHalfExtent, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static BoxShape Create( + float3 halfExtent, + float convexRadius = 0.05f, + PhysicsMaterial material = default + ) => Jolt.PInvoke.BoxShape_Create_3(halfExtent, convexRadius, material); + + /// + /// + /// Get half extent of box + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:47 + ///
+ /// Vec3 GetHalfExtent() const + ///
+ ///
+ public float3 GetHalfExtent() => Jolt.PInvoke.BoxShape_GetHalfExtent(this); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Get the convex radius of this box + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:98 + ///
+ /// float GetConvexRadius() const + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.BoxShape_GetConvexRadius(this); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:101 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.BoxShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(BoxShape value) => Unsafe.BitCast(value); + + public static implicit operator Shape(BoxShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BoxShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/BoxShapeSettings.gen.cs new file mode 100644 index 0000000..8bfbd12 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BoxShapeSettings.gen.cs @@ -0,0 +1,151 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a BoxShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:13 + ///
+ /// class BoxShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct BoxShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:19 + ///
+ /// BoxShapeSettings() = default + ///
+ ///
+ public static BoxShapeSettings Create() => Jolt.PInvoke.BoxShapeSettings_Create(); + + /// + /// + /// Create a box with half edge length inHalfExtent and convex radius inConvexRadius. (internally the convex + /// radius will be subtracted from the half extent so the total box will not grow with the convex radius). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:23 + ///
+ /// explicit BoxShapeSettings(Vec3Arg inHalfExtent, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static BoxShapeSettings Create( + float3 halfExtent, + float convexRadius = 0.05f, + PhysicsMaterial material = default + ) => Jolt.PInvoke.BoxShapeSettings_Create_2(halfExtent, convexRadius, material); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Half the size of the box (including convex radius) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:28 + ///
+ /// Vec3 mHalfExtent = Vec3::sZero() + ///
+ ///
+ public float3 GetHalfExtent() => Jolt.PInvoke.BoxShapeSettings_GetHalfExtent(this); + + /// + /// + /// Half the size of the box (including convex radius) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:28 + ///
+ /// Vec3 mHalfExtent = Vec3::sZero() + ///
+ ///
+ public void SetHalfExtent(float3 value) => Jolt.PInvoke.BoxShapeSettings_SetHalfExtent(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:29 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.BoxShapeSettings_GetConvexRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/BoxShape.h:29 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public void SetConvexRadius(float value) => Jolt.PInvoke.BoxShapeSettings_SetConvexRadius(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(BoxShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(BoxShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhase.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhase.gen.cs new file mode 100644 index 0000000..2245f59 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhase.gen.cs @@ -0,0 +1,460 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Used to do coarse collision detection operations to quickly prune out bodies that will not collide. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:25 + ///
+ /// class BroadPhase : public BroadPhaseQuery + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhase + { + /// + /// + /// Context used during broadphase update + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:44 + ///
+ /// struct UpdateState { void *mData[4]; } + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct UpdateState + { + /// + /// + /// Context used during broadphase update + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:44 + ///
+ /// void *mData[4] + ///
+ ///
+ [FieldOffset(0)] + public nint_4 Data; + } + + /// + /// + /// Initialize the broadphase. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:32 + ///
+ /// virtual void Init(BodyManager *inBodyManager, const BroadPhaseLayerInterface &inLayerInterface) + ///
+ ///
+ /// + /// + /// Initialize the broadphase. + /// @param inBodyManager The body manager singleton + /// @param inLayerInterface Interface that maps object layers to broadphase layers. + /// Note that the broadphase takes a pointer to the data inside inObjectToBroadPhaseLayer so this object should remain static. + /// + /// + public void Init(BodyManager bodyManager, BroadPhaseLayerInterface layerInterface) => + Jolt.PInvoke.BroadPhase_Init(this, bodyManager, layerInterface); + + /// + /// + /// Should be called after many objects have been inserted to make the broadphase more efficient, usually + /// done on startup only + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:35 + ///
+ /// virtual void Optimize() + ///
+ ///
+ public void Optimize() => Jolt.PInvoke.BroadPhase_Optimize(this); + + /// + /// + /// Must be called just before updating the broadphase when none of the body mutexes are locked + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:38 + ///
+ /// virtual void FrameSync() + ///
+ ///
+ public void FrameSync() => Jolt.PInvoke.BroadPhase_FrameSync(this); + + /// + /// + /// Must be called before UpdatePrepare to prevent modifications from being made to the tree + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:41 + ///
+ /// virtual void LockModifications() + ///
+ ///
+ public void LockModifications() => Jolt.PInvoke.BroadPhase_LockModifications(this); + + /// + /// + /// Must be called after UpdateFinalize to allow modifications to the broadphase + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:54 + ///
+ /// virtual void UnlockModifications() + ///
+ ///
+ public void UnlockModifications() => Jolt.PInvoke.BroadPhase_UnlockModifications(this); + + /// + /// + /// Remove inNumber bodies in ioBodies from the broadphase. ioBodies may be shuffled around by this + /// function. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:75 + ///
+ /// virtual void RemoveBodies(BodyID *ioBodies, int inNumber) = 0 + ///
+ ///
+ /// + /// + /// bodies is the buffer the native call works on, and its element count travels with it: the call may write + /// through the span, and only for the duration of the call. + /// + /// + public unsafe void RemoveBodies(Span bodies) + { + fixed (uint* bodies_fixed = bodies) + { + Jolt.PInvoke.BroadPhase_RemoveBodies(this, bodies_fixed, (int)bodies.Length); + } + } + + /// + /// + /// Call whenever the aabb of a body changes (can change order of ioBodies array) inTakeLock should be false + /// if we're between LockModifications/UnlockModifications, in which case care needs to be taken to not call + /// this between UpdatePrepare/UpdateFinalize + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:79 + ///
+ /// virtual void NotifyBodiesAABBChanged(BodyID *ioBodies, int inNumber, bool inTakeLock = true) = 0 + ///
+ ///
+ /// + /// + /// bodies is the buffer the native call works on, and its element count travels with it: the call may write + /// through the span, and only for the duration of the call. + /// + /// + public unsafe void NotifyBodiesAABBChanged(Span bodies, bool takeLock = true) + { + fixed (uint* bodies_fixed = bodies) + { + Jolt.PInvoke.BroadPhase_NotifyBodiesAABBChanged(this, bodies_fixed, (int)bodies.Length, takeLock); + } + } + + /// + /// + /// Call whenever the layer (and optionally the aabb as well) of a body changes (can change order of + /// ioBodies array) + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:82 + ///
+ /// virtual void NotifyBodiesLayerChanged(BodyID *ioBodies, int inNumber) = 0 + ///
+ ///
+ /// + /// + /// bodies is the buffer the native call works on, and its element count travels with it: the call may write + /// through the span, and only for the duration of the call. + /// + /// + public unsafe void NotifyBodiesLayerChanged(Span bodies) + { + fixed (uint* bodies_fixed = bodies) + { + Jolt.PInvoke.BroadPhase_NotifyBodiesLayerChanged(this, bodies_fixed, (int)bodies.Length); + } + } + + /// + /// + /// Find all colliding pairs between dynamic bodies Note that this function is very specifically tailored + /// for the PhysicsSystem::Update function, hence it is not part of the BroadPhaseQuery interface. One of + /// the assumptions it can make is that no locking is needed during the query as it will only be called + /// during a very particular part of the update. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:93 + ///
+ /// virtual void FindCollidingPairs(BodyID *ioActiveBodies, int inNumActiveBodies, float inSpeculativeContactDistance, const ObjectVsBroadPhaseLayerFilter &inObjectVsBroadPhaseLayerFilter, const ObjectLayerPairFilter &inObjectLayerPairFilter, BodyPairCollector &ioPairCollector) const = 0 + ///
+ ///
+ /// + /// + /// Find all colliding pairs between dynamic bodies + /// Note that this function is very specifically tailored for the PhysicsSystem::Update function, hence it is not part of the BroadPhaseQuery interface. + /// One of the assumptions it can make is that no locking is needed during the query as it will only be called during a very particular part of the update. + /// @param ioActiveBodies is a list of bodies for which we need to find colliding pairs (this function can change the order of the ioActiveBodies array). This can be a subset of the set of active bodies in the system. + /// @param inNumActiveBodies is the size of the ioActiveBodies array. + /// @param inSpeculativeContactDistance Distance at which speculative contact points will be created. + /// @param inObjectVsBroadPhaseLayerFilter is the filter that determines if an object can collide with a broadphase layer. + /// @param inObjectLayerPairFilter is the filter that determines if two objects can collide. + /// @param ioPairCollector receives callbacks for every body pair found. + /// + /// + /// Collects every hit into findcollidingpairsresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// activeBodies is the buffer the native call works on, and its element count travels with it: the call may + /// write through the span, and only for the duration of the call. + /// + /// + public unsafe uint FindCollidingPairs( + Span activeBodies, + float speculativeContactDistance, + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ObjectLayerPairFilter objectLayerPairFilter, + Span results, + out uint totalHits + ) + { + fixed (uint* activeBodies_fixed = activeBodies) + fixed (BodyPair* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhase_FindCollidingPairs( + this, + activeBodies_fixed, + (int)activeBodies.Length, + speculativeContactDistance, + objectVsBroadPhaseLayerFilter, + objectLayerPairFilter, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Same as BroadPhaseQuery::CastAABox but can be implemented in a way to take no broad phase locks. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:96 + ///
+ /// virtual void CastAABoxNoLock(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxnolockresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CastAABoxNoLock( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhase_CastAABoxNoLock( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Same as BroadPhaseQuery::CastAABox but can be implemented in a way to take no broad phase locks. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:96 + ///
+ /// virtual void CastAABoxNoLock(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public bool CastAABoxNoLockClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + Jolt.PInvoke.BroadPhase_CastAABoxNoLockClosest( + this, + in box, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + public static implicit operator BroadPhaseQuery(BroadPhase value) => + Unsafe.BitCast(value); + + /// + public unsafe uint CastRay( + in RayCast ray, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => ((BroadPhaseQuery)this).CastRay(in ray, results, out totalHits, broadPhaseLayerFilter, objectLayerFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => ((BroadPhaseQuery)this).CastRayClosest(in ray, out result, broadPhaseLayerFilter, objectLayerFilter); + + /// + public unsafe uint CollideAABox( + in AABox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + ((BroadPhaseQuery)this).CollideAABox( + in box, + results, + out totalHits, + broadPhaseLayerFilter, + objectLayerFilter + ); + + /// + public unsafe uint CollideSphere( + float3 center, + float radius, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + ((BroadPhaseQuery)this).CollideSphere( + center, + radius, + results, + out totalHits, + broadPhaseLayerFilter, + objectLayerFilter + ); + + /// + public unsafe uint CollidePoint( + float3 point, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + ((BroadPhaseQuery)this).CollidePoint( + point, + results, + out totalHits, + broadPhaseLayerFilter, + objectLayerFilter + ); + + /// + public unsafe uint CollideOrientedBox( + OrientedBox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + ((BroadPhaseQuery)this).CollideOrientedBox( + box, + results, + out totalHits, + broadPhaseLayerFilter, + objectLayerFilter + ); + + /// + public unsafe uint CastAABox( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + ((BroadPhaseQuery)this).CastAABox(in box, results, out totalHits, broadPhaseLayerFilter, objectLayerFilter); + + /// + public bool CastAABoxClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => ((BroadPhaseQuery)this).CastAABoxClosest(in box, out result, broadPhaseLayerFilter, objectLayerFilter); + + /// + public AABox GetBounds() => ((BroadPhaseQuery)this).GetBounds(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseBruteForce.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseBruteForce.gen.cs new file mode 100644 index 0000000..a5da3ab --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseBruteForce.gen.cs @@ -0,0 +1,455 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Test BroadPhase implementation that does not do anything to speed up the operations. Can be used as a + /// reference implementation. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:13 + ///
+ /// class BroadPhaseBruteForce final : public BroadPhase + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseBruteForce : IDisposable + { + public static BroadPhaseBruteForce Create() => Jolt.PInvoke.BroadPhaseBruteForce_Create(); + + /// + public unsafe void RemoveBodies(Span bodies) => ((BroadPhase)this).RemoveBodies(bodies); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:21 + ///
+ /// virtual void NotifyBodiesAABBChanged(BodyID *ioBodies, int inNumber, bool inTakeLock) override + ///
+ ///
+ /// + /// + /// bodies is the buffer the native call works on, and its element count travels with it: the call may write + /// through the span, and only for the duration of the call. + /// + /// + public unsafe void NotifyBodiesAABBChanged(Span bodies, bool takeLock) + { + fixed (uint* bodies_fixed = bodies) + { + Jolt.PInvoke.BroadPhaseBruteForce_NotifyBodiesAABBChanged( + this, + bodies_fixed, + (int)bodies.Length, + takeLock + ); + } + } + + /// + public unsafe void NotifyBodiesLayerChanged(Span bodies) => + ((BroadPhase)this).NotifyBodiesLayerChanged(bodies); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:23 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CastRay( + in RayCast ray, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseBruteForce_CastRay( + this, + in ray, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:23 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public bool CastRayClosest( + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + Jolt.PInvoke.BroadPhaseBruteForce_CastRayClosest( + this, + in ray, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:24 + ///
+ /// virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideaaboxresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollideAABox( + in AABox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseBruteForce_CollideAABox( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:25 + ///
+ /// virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidesphereresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollideSphere( + float3 center, + float radius, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseBruteForce_CollideSphere( + this, + center, + radius, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:26 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollidePoint( + float3 point, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseBruteForce_CollidePoint( + this, + point, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:27 + ///
+ /// virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideorientedboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollideOrientedBox( + OrientedBox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseBruteForce_CollideOrientedBox( + this, + box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + public unsafe uint CastAABoxNoLock( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + ((BroadPhase)this).CastAABoxNoLock( + in box, + results, + out totalHits, + broadPhaseLayerFilter, + objectLayerFilter + ); + + /// + public bool CastAABoxNoLockClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => ((BroadPhase)this).CastAABoxNoLockClosest(in box, out result, broadPhaseLayerFilter, objectLayerFilter); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:29 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CastAABox( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseBruteForce_CastAABox( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:29 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public bool CastAABoxClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + Jolt.PInvoke.BroadPhaseBruteForce_CastAABoxClosest( + this, + in box, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + /// + public unsafe uint FindCollidingPairs( + Span activeBodies, + float speculativeContactDistance, + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ObjectLayerPairFilter objectLayerPairFilter, + Span results, + out uint totalHits + ) => + ((BroadPhase)this).FindCollidingPairs( + activeBodies, + speculativeContactDistance, + objectVsBroadPhaseLayerFilter, + objectLayerPairFilter, + results, + out totalHits + ); + + /// + public AABox GetBounds() => ((BroadPhaseQuery)this).GetBounds(); + + public static implicit operator BroadPhase(BroadPhaseBruteForce value) => + Unsafe.BitCast(value); + + public static implicit operator BroadPhaseQuery(BroadPhaseBruteForce value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.BroadPhaseBruteForce_Destroy(this); + + /// + public void Init(BodyManager bodyManager, BroadPhaseLayerInterface layerInterface) => + ((BroadPhase)this).Init(bodyManager, layerInterface); + + /// + public void Optimize() => ((BroadPhase)this).Optimize(); + + /// + public void FrameSync() => ((BroadPhase)this).FrameSync(); + + /// + public void LockModifications() => ((BroadPhase)this).LockModifications(); + + /// + public void UnlockModifications() => ((BroadPhase)this).UnlockModifications(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..86977f6 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerFilter.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class for broadphase layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:93 + ///
+ /// class BroadPhaseLayerFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseLayerFilter : IDisposable + { + public static BroadPhaseLayerFilter Create() => Jolt.PInvoke.BroadPhaseLayerFilter_Create(); + + /// + /// + /// Function to filter out broadphase layers when doing collision query test (return true to allow testing + /// against objects with this layer) + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:100 + ///
+ /// virtual bool ShouldCollide(BroadPhaseLayer inLayer) const + ///
+ ///
+ public bool ShouldCollide(byte layer) => Jolt.PInvoke.BroadPhaseLayerFilter_ShouldCollide(this, layer); + + public void Dispose() => Jolt.PInvoke.BroadPhaseLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterface.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterface.gen.cs new file mode 100644 index 0000000..b0d88e2 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterface.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Interface that the application should implement to allow mapping object layers to broadphase layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:60 + ///
+ /// class BroadPhaseLayerInterface : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseLayerInterface + { + /// + /// + /// Return the number of broadphase layers there are + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:67 + ///
+ /// virtual uint GetNumBroadPhaseLayers() const = 0 + ///
+ ///
+ public uint GetNumBroadPhaseLayers() => Jolt.PInvoke.BroadPhaseLayerInterface_GetNumBroadPhaseLayers(this); + + /// + /// + /// Convert an object layer to the corresponding broadphase layer + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:70 + ///
+ /// virtual BroadPhaseLayer GetBroadPhaseLayer(ObjectLayer inLayer) const = 0 + ///
+ ///
+ public byte GetBroadPhaseLayer(ushort layer) => + Jolt.PInvoke.BroadPhaseLayerInterface_GetBroadPhaseLayer(this, layer); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceMask.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceMask.gen.cs new file mode 100644 index 0000000..9b28768 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceMask.gen.cs @@ -0,0 +1,119 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// BroadPhaseLayerInterface implementation. This defines a mapping between object and broadphase layers. This + /// implementation works together with ObjectLayerPairFilterMask and ObjectVsBroadPhaseLayerFilterMask. A + /// broadphase layer is suitable for an object if its group & inGroupsToInclude is not zero and its group + /// & inGroupsToExclude is zero. The broadphase layers are iterated from lowest to highest value and the + /// first one that matches is taken. If none match then it takes the last layer. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:17 + ///
+ /// class BroadPhaseLayerInterfaceMask : public BroadPhaseLayerInterface + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseLayerInterfaceMask : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:80 + ///
+ /// struct Mapping + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct Mapping + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:82 + ///
+ /// uint32 mGroupsToInclude = 0 + ///
+ ///
+ [FieldOffset(0)] + public uint GroupsToInclude; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:83 + ///
+ /// uint32 mGroupsToExclude = ~uint32(0) + ///
+ ///
+ [FieldOffset(4)] + public uint GroupsToExclude; + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:22 + ///
+ /// explicit BroadPhaseLayerInterfaceMask(uint inNumBroadPhaseLayers) + ///
+ ///
+ public static BroadPhaseLayerInterfaceMask Create(uint numBroadPhaseLayers) => + Jolt.PInvoke.BroadPhaseLayerInterfaceMask_Create(numBroadPhaseLayers); + + /// + /// + /// Configures a broadphase layer. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:33 + ///
+ /// void ConfigureLayer(BroadPhaseLayer inBroadPhaseLayer, uint32 inGroupsToInclude, uint32 inGroupsToExclude) + ///
+ ///
+ public void ConfigureLayer(byte broadPhaseLayer, uint groupsToInclude, uint groupsToExclude) => + Jolt.PInvoke.BroadPhaseLayerInterfaceMask_ConfigureLayer( + this, + broadPhaseLayer, + groupsToInclude, + groupsToExclude + ); + + /// + public uint GetNumBroadPhaseLayers() => ((BroadPhaseLayerInterface)this).GetNumBroadPhaseLayers(); + + /// + public byte GetBroadPhaseLayer(ushort layer) => ((BroadPhaseLayerInterface)this).GetBroadPhaseLayer(layer); + + /// + /// + /// Returns true if an object layer should collide with a broadphase layer, this function is being called + /// from ObjectVsBroadPhaseLayerFilterMask + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h:59 + ///
+ /// inline bool ShouldCollide(ObjectLayer inLayer1, BroadPhaseLayer inLayer2) const + ///
+ ///
+ public bool ShouldCollide(ushort layer1, byte layer2) => + Jolt.PInvoke.BroadPhaseLayerInterfaceMask_ShouldCollide(this, layer1, layer2); + + public static implicit operator BroadPhaseLayerInterface(BroadPhaseLayerInterfaceMask value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.BroadPhaseLayerInterfaceMask_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceTable.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceTable.gen.cs new file mode 100644 index 0000000..184ac9e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseLayerInterfaceTable.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// BroadPhaseLayerInterface implementation. This defines a mapping between object and broadphase layers. This + /// implementation uses a simple table + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h:14 + ///
+ /// class BroadPhaseLayerInterfaceTable : public BroadPhaseLayerInterface + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseLayerInterfaceTable : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h:19 + ///
+ /// BroadPhaseLayerInterfaceTable(uint inNumObjectLayers, uint inNumBroadPhaseLayers) + ///
+ ///
+ public static BroadPhaseLayerInterfaceTable Create(uint numObjectLayers, uint numBroadPhaseLayers) => + Jolt.PInvoke.BroadPhaseLayerInterfaceTable_Create(numObjectLayers, numBroadPhaseLayers); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h:28 + ///
+ /// void MapObjectToBroadPhaseLayer(ObjectLayer inObjectLayer, BroadPhaseLayer inBroadPhaseLayer) + ///
+ ///
+ public void MapObjectToBroadPhaseLayer(ushort objectLayer, byte broadPhaseLayer) => + Jolt.PInvoke.BroadPhaseLayerInterfaceTable_MapObjectToBroadPhaseLayer(this, objectLayer, broadPhaseLayer); + + /// + public uint GetNumBroadPhaseLayers() => ((BroadPhaseLayerInterface)this).GetNumBroadPhaseLayers(); + + /// + public byte GetBroadPhaseLayer(ushort layer) => ((BroadPhaseLayerInterface)this).GetBroadPhaseLayer(layer); + + public static implicit operator BroadPhaseLayerInterface(BroadPhaseLayerInterfaceTable value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.BroadPhaseLayerInterfaceTable_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseQuadTree.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseQuadTree.gen.cs new file mode 100644 index 0000000..12fab1c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseQuadTree.gen.cs @@ -0,0 +1,455 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Fast SIMD based quad tree BroadPhase that is multithreading aware and tries to do a minimal amount of + /// locking. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:14 + ///
+ /// class BroadPhaseQuadTree final : public BroadPhase + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseQuadTree : IDisposable + { + public static BroadPhaseQuadTree Create() => Jolt.PInvoke.BroadPhaseQuadTree_Create(); + + /// + public void Init(BodyManager bodyManager, BroadPhaseLayerInterface layerInterface) => + ((BroadPhase)this).Init(bodyManager, layerInterface); + + /// + public void Optimize() => ((BroadPhase)this).Optimize(); + + /// + public void FrameSync() => ((BroadPhase)this).FrameSync(); + + /// + public void LockModifications() => ((BroadPhase)this).LockModifications(); + + /// + public void UnlockModifications() => ((BroadPhase)this).UnlockModifications(); + + /// + public unsafe void RemoveBodies(Span bodies) => ((BroadPhase)this).RemoveBodies(bodies); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:34 + ///
+ /// virtual void NotifyBodiesAABBChanged(BodyID *ioBodies, int inNumber, bool inTakeLock) override + ///
+ ///
+ /// + /// + /// bodies is the buffer the native call works on, and its element count travels with it: the call may write + /// through the span, and only for the duration of the call. + /// + /// + public unsafe void NotifyBodiesAABBChanged(Span bodies, bool takeLock) + { + fixed (uint* bodies_fixed = bodies) + { + Jolt.PInvoke.BroadPhaseQuadTree_NotifyBodiesAABBChanged( + this, + bodies_fixed, + (int)bodies.Length, + takeLock + ); + } + } + + /// + public unsafe void NotifyBodiesLayerChanged(Span bodies) => + ((BroadPhase)this).NotifyBodiesLayerChanged(bodies); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:36 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CastRay( + in RayCast ray, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuadTree_CastRay( + this, + in ray, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:36 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public bool CastRayClosest( + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + Jolt.PInvoke.BroadPhaseQuadTree_CastRayClosest( + this, + in ray, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:37 + ///
+ /// virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideaaboxresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollideAABox( + in AABox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuadTree_CollideAABox( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:38 + ///
+ /// virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidesphereresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollideSphere( + float3 center, + float radius, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuadTree_CollideSphere( + this, + center, + radius, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:39 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollidePoint( + float3 point, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuadTree_CollidePoint( + this, + point, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:40 + ///
+ /// virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideorientedboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CollideOrientedBox( + OrientedBox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuadTree_CollideOrientedBox( + this, + box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + public unsafe uint CastAABoxNoLock( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + ((BroadPhase)this).CastAABoxNoLock( + in box, + results, + out totalHits, + broadPhaseLayerFilter, + objectLayerFilter + ); + + /// + public bool CastAABoxNoLockClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => ((BroadPhase)this).CastAABoxNoLockClosest(in box, out result, broadPhaseLayerFilter, objectLayerFilter); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:42 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public unsafe uint CastAABox( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuadTree_CastAABox( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:42 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + public bool CastAABoxClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ) => + Jolt.PInvoke.BroadPhaseQuadTree_CastAABoxClosest( + this, + in box, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + /// + public unsafe uint FindCollidingPairs( + Span activeBodies, + float speculativeContactDistance, + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ObjectLayerPairFilter objectLayerPairFilter, + Span results, + out uint totalHits + ) => + ((BroadPhase)this).FindCollidingPairs( + activeBodies, + speculativeContactDistance, + objectVsBroadPhaseLayerFilter, + objectLayerPairFilter, + results, + out totalHits + ); + + /// + public AABox GetBounds() => ((BroadPhaseQuery)this).GetBounds(); + + public static implicit operator BroadPhase(BroadPhaseQuadTree value) => + Unsafe.BitCast(value); + + public static implicit operator BroadPhaseQuery(BroadPhaseQuadTree value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.BroadPhaseQuadTree_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/BroadPhaseQuery.gen.cs b/Brutal.Jolt/Generated/Classes/BroadPhaseQuery.gen.cs new file mode 100644 index 0000000..a73bf39 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/BroadPhaseQuery.gen.cs @@ -0,0 +1,340 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Interface to the broadphase that can perform collision queries. These queries will only test the bounding + /// box of the body to quickly determine a potential set of colliding bodies. The shapes of the bodies are not + /// tested, if you want this then you should use the NarrowPhaseQuery interface. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:28 + ///
+ /// class BroadPhaseQuery : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct BroadPhaseQuery + { + /// + /// + /// Cast a ray and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:35 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastRay( + in RayCast ray, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuery_CastRay( + this, + in ray, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a ray and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:35 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastRayClosest( + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + Jolt.PInvoke.BroadPhaseQuery_CastRayClosest( + this, + in ray, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + /// + /// + /// Get bodies intersecting with inBox and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:38 + ///
+ /// virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collideaaboxresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollideAABox( + in AABox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuery_CollideAABox( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get bodies intersecting with a sphere and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:41 + ///
+ /// virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collidesphereresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public unsafe uint CollideSphere( + float3 center, + float radius, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuery_CollideSphere( + this, + center, + radius, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get bodies intersecting with a point and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:44 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollidePoint( + float3 point, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuery_CollidePoint( + this, + point, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get bodies intersecting with an oriented box and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:47 + ///
+ /// virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collideorientedboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public unsafe uint CollideOrientedBox( + OrientedBox box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuery_CollideOrientedBox( + this, + box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a box and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:50 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastAABox( + in AABoxCast box, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) + { + fixed (BroadPhaseCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.BroadPhaseQuery_CastAABox( + this, + in box, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a box and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:50 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastAABoxClosest( + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default + ) => + Jolt.PInvoke.BroadPhaseQuery_CastAABoxClosest( + this, + in box, + out result, + broadPhaseLayerFilter, + objectLayerFilter + ) != 0; + + /// + /// + /// Get the bounding box of all objects in the broadphase + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:53 + ///
+ /// virtual AABox GetBounds() const = 0 + ///
+ ///
+ public AABox GetBounds() => Jolt.PInvoke.BroadPhaseQuery_GetBounds(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ByteBuffer.gen.cs b/Brutal.Jolt/Generated/Classes/ByteBuffer.gen.cs new file mode 100644 index 0000000..6fb9447 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ByteBuffer.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Simple byte buffer, aligned to a cache line + /// + /// + /// C++: + /// Jolt/Core/ByteBuffer.h:15 + ///
+ /// class ByteBuffer : public ByteBufferVector + ///
+ ///
+ [InteropHandle] + public readonly partial struct ByteBuffer : IDisposable + { + public static ByteBuffer Create() => Jolt.PInvoke.ByteBuffer_Create(); + + /// + /// + /// Align the size to a multiple of inSize, returns the length after alignment + /// + /// + /// C++: + /// Jolt/Core/ByteBuffer.h:19 + ///
+ /// size_t Align(size_t inSize) + ///
+ ///
+ public nuint Align(ByteSize size) => Jolt.PInvoke.ByteBuffer_Align(this, (nuint)size); + + public void Dispose() => Jolt.PInvoke.ByteBuffer_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CalculateSolverSteps.gen.cs b/Brutal.Jolt/Generated/Classes/CalculateSolverSteps.gen.cs new file mode 100644 index 0000000..97c6404 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CalculateSolverSteps.gen.cs @@ -0,0 +1,80 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Constraints/CalculateSolverSteps.h:13 + ///
+ /// class CalculateSolverSteps + ///
+ ///
+ /// + /// + /// @cond INTERNAL + /// Internal class used to calculate the total number of velocity and position steps + /// + /// + [InteropHandle] + public readonly partial struct CalculateSolverSteps : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/CalculateSolverSteps.h:17 + ///
+ /// explicit CalculateSolverSteps(const PhysicsSettings &inSettings) + ///
+ ///
+ public static CalculateSolverSteps Create(in PhysicsSettings settings) => + Jolt.PInvoke.CalculateSolverSteps_Create(in settings); + + /// + /// + /// Must be called after all bodies/constraints have been processed + /// + /// + /// C++: + /// Jolt/Physics/Constraints/CalculateSolverSteps.h:33 + ///
+ /// void Finalize() + ///
+ ///
+ public void Complete() => Jolt.PInvoke.CalculateSolverSteps_Complete(this); + + /// + /// + /// Get the results of the calculation + /// + /// + /// C++: + /// Jolt/Physics/Constraints/CalculateSolverSteps.h:43 + ///
+ /// uint GetNumPositionSteps() const + ///
+ ///
+ public uint GetNumPositionSteps() => Jolt.PInvoke.CalculateSolverSteps_GetNumPositionSteps(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/CalculateSolverSteps.h:44 + ///
+ /// uint GetNumVelocitySteps() const + ///
+ ///
+ public uint GetNumVelocitySteps() => Jolt.PInvoke.CalculateSolverSteps_GetNumVelocitySteps(this); + + public void Dispose() => Jolt.PInvoke.CalculateSolverSteps_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CapsuleShape.gen.cs b/Brutal.Jolt/Generated/Classes/CapsuleShape.gen.cs new file mode 100644 index 0000000..42d5601 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CapsuleShape.gen.cs @@ -0,0 +1,384 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A capsule, implemented as a line segment with convex radius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:38 + ///
+ /// class CapsuleShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct CapsuleShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:44 + ///
+ /// CapsuleShape() + ///
+ ///
+ public static CapsuleShape Create() => Jolt.PInvoke.CapsuleShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:45 + ///
+ /// CapsuleShape(const CapsuleShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static CapsuleShape Create(CapsuleShapeSettings settings) + { + var _handle = Jolt.PInvoke.CapsuleShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create a capsule centered around the origin with one sphere cap at (0, -inHalfHeightOfCylinder, 0) and + /// the other at (0, inHalfHeightOfCylinder, 0) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:48 + ///
+ /// CapsuleShape(float inHalfHeightOfCylinder, float inRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static CapsuleShape Create( + float halfHeightOfCylinder, + float radius, + PhysicsMaterial material = default + ) => Jolt.PInvoke.CapsuleShape_Create_3(halfHeightOfCylinder, radius, material); + + /// + /// + /// Radius of the cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:51 + ///
+ /// float GetRadius() const + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.CapsuleShape_GetRadius(this); + + /// + /// + /// Get half of the height of the cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:54 + ///
+ /// float GetHalfHeightOfCylinder() const + ///
+ ///
+ public float GetHalfHeightOfCylinder() => Jolt.PInvoke.CapsuleShape_GetHalfHeightOfCylinder(this); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:115 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.CapsuleShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(CapsuleShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(CapsuleShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CapsuleShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CapsuleShapeSettings.gen.cs new file mode 100644 index 0000000..08fa26b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CapsuleShapeSettings.gen.cs @@ -0,0 +1,172 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a CapsuleShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:12 + ///
+ /// class CapsuleShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct CapsuleShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:18 + ///
+ /// CapsuleShapeSettings() = default + ///
+ ///
+ public static CapsuleShapeSettings Create() => Jolt.PInvoke.CapsuleShapeSettings_Create(); + + /// + /// + /// Create a capsule centered around the origin with one sphere cap at (0, -inHalfHeightOfCylinder, 0) and + /// the other at (0, inHalfHeightOfCylinder, 0) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:21 + ///
+ /// CapsuleShapeSettings(float inHalfHeightOfCylinder, float inRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static CapsuleShapeSettings Create( + float halfHeightOfCylinder, + float radius, + PhysicsMaterial material = default + ) => Jolt.PInvoke.CapsuleShapeSettings_Create_2(halfHeightOfCylinder, radius, material); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + /// + /// Check if this is a valid capsule shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:24 + ///
+ /// bool IsValid() const + ///
+ ///
+ public bool IsValid() => Jolt.PInvoke.CapsuleShapeSettings_IsValid(this); + + /// + /// + /// Checks if the settings of this capsule make this shape a sphere + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:27 + ///
+ /// bool IsSphere() const + ///
+ ///
+ public bool IsSphere() => Jolt.PInvoke.CapsuleShapeSettings_IsSphere(this); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:33 + ///
+ /// float mRadius = 0.0f + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.CapsuleShapeSettings_GetRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:33 + ///
+ /// float mRadius = 0.0f + ///
+ ///
+ public void SetRadius(float value) => Jolt.PInvoke.CapsuleShapeSettings_SetRadius(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:34 + ///
+ /// float mHalfHeightOfCylinder = 0.0f + ///
+ ///
+ public float GetHalfHeightOfCylinder() => Jolt.PInvoke.CapsuleShapeSettings_GetHalfHeightOfCylinder(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CapsuleShape.h:34 + ///
+ /// float mHalfHeightOfCylinder = 0.0f + ///
+ ///
+ public void SetHalfHeightOfCylinder(float value) => + Jolt.PInvoke.CapsuleShapeSettings_SetHalfHeightOfCylinder(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(CapsuleShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(CapsuleShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CastConvexVsTriangles.gen.cs b/Brutal.Jolt/Generated/Classes/CastConvexVsTriangles.gen.cs new file mode 100644 index 0000000..bf8bf16 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CastConvexVsTriangles.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision detection helper that casts a convex object vs one or more triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastConvexVsTriangles.h:13 + ///
+ /// class CastConvexVsTriangles + ///
+ ///
+ [InteropHandle] + public readonly partial struct CastConvexVsTriangles + { + /// + /// + /// Cast convex object with a single triangle + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastConvexVsTriangles.h:30 + ///
+ /// void Cast(Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2) + ///
+ ///
+ /// + /// + /// Cast convex object with a single triangle + /// @param inV0 , inV1 , inV2: CCW triangle vertices + /// @param inActiveEdges bit 0 = edge v0..v1 is active, bit 1 = edge v1..v2 is active, bit 2 = edge v2..v0 is active + /// An active edge is an edge that is not connected to another triangle in such a way that it is impossible to collide with the edge + /// @param inSubShapeID2 The sub shape ID for the triangle + /// + /// + public void Cast(float3 v0, float3 v1, float3 v2, byte activeEdges, uint subShapeID2) => + Jolt.PInvoke.CastConvexVsTriangles_Cast(this, v0, v1, v2, activeEdges, subShapeID2); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CastSphereVsTriangles.gen.cs b/Brutal.Jolt/Generated/Classes/CastSphereVsTriangles.gen.cs new file mode 100644 index 0000000..02da7f1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CastSphereVsTriangles.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision detection helper that casts a sphere vs one or more triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastSphereVsTriangles.h:12 + ///
+ /// class CastSphereVsTriangles + ///
+ ///
+ [InteropHandle] + public readonly partial struct CastSphereVsTriangles + { + /// + /// + /// Cast sphere with a single triangle + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastSphereVsTriangles.h:29 + ///
+ /// void Cast(Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2) + ///
+ ///
+ /// + /// + /// Cast sphere with a single triangle + /// @param inV0 , inV1 , inV2: CCW triangle vertices + /// @param inActiveEdges bit 0 = edge v0..v1 is active, bit 1 = edge v1..v2 is active, bit 2 = edge v2..v0 is active + /// An active edge is an edge that is not connected to another triangle in such a way that it is impossible to collide with the edge + /// @param inSubShapeID2 The sub shape ID for the triangle + /// + /// + public void Cast(float3 v0, float3 v1, float3 v2, byte activeEdges, uint subShapeID2) => + Jolt.PInvoke.CastSphereVsTriangles_Cast(this, v0, v1, v2, activeEdges, subShapeID2); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Character.gen.cs b/Brutal.Jolt/Generated/Classes/Character.gen.cs new file mode 100644 index 0000000..125eded --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Character.gen.cs @@ -0,0 +1,586 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime character object. This object usually represents the player or a humanoid AI. It uses a single rigid + /// body, usually with a capsule shape to simulate movement and collision for the character. The character is a + /// keyframed object, the application controls it by setting the velocity. + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:46 + ///
+ /// class Character : public CharacterBase + ///
+ ///
+ [InteropHandle] + public readonly partial struct Character : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:57 + ///
+ /// Character(const CharacterSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, uint64 inUserData, PhysicsSystem *inSystem) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inSettings The settings for the character + /// @param inPosition Initial position for the character + /// @param inRotation Initial rotation for the character (usually only around Y) + /// @param inUserData Application specific value + /// @param inSystem Physics system that this character will be added to later + /// + /// + public static Character Create( + CharacterSettings settings, + float3 position, + floatQuat rotation, + ulong userData, + PhysicsSystem system + ) => Jolt.PInvoke.Character_Create(settings, position, rotation, userData, system); + + /// + /// + /// Add bodies and constraints to the system and optionally activate the bodies + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:63 + ///
+ /// void AddToPhysicsSystem(EActivation inActivationMode = EActivation::Activate, bool inLockBodies = true) + ///
+ ///
+ public void AddToPhysicsSystem(Activation activationMode = Activation.Activate, bool lockBodies = true) => + Jolt.PInvoke.Character_AddToPhysicsSystem(this, activationMode, lockBodies); + + /// + /// + /// Remove bodies and constraints from the system + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:66 + ///
+ /// void RemoveFromPhysicsSystem(bool inLockBodies = true) + ///
+ ///
+ public void RemoveFromPhysicsSystem(bool lockBodies = true) => + Jolt.PInvoke.Character_RemoveFromPhysicsSystem(this, lockBodies); + + /// + /// + /// Wake up the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:69 + ///
+ /// void Activate(bool inLockBodies = true) + ///
+ ///
+ public void Activate(bool lockBodies = true) => Jolt.PInvoke.Character_Activate(this, lockBodies); + + /// + /// + /// Needs to be called after every PhysicsSystem::Update + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:74 + ///
+ /// void PostSimulation(float inMaxSeparationDistance, bool inLockBodies = true) + ///
+ ///
+ /// + /// + /// Needs to be called after every PhysicsSystem::Update + /// @param inMaxSeparationDistance Max distance between the floor and the character to still consider the character standing on the floor + /// @param inLockBodies If the collision query should use the locking body interface (true) or the non locking body interface (false) + /// + /// + public void PostSimulation(float maxSeparationDistance, bool lockBodies = true) => + Jolt.PInvoke.Character_PostSimulation(this, maxSeparationDistance, lockBodies); + + /// + /// + /// Control the velocity of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:77 + ///
+ /// void SetLinearAndAngularVelocity(Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity, bool inLockBodies = true) + ///
+ ///
+ public void SetLinearAndAngularVelocity( + float3 linearVelocity, + float3 angularVelocity, + bool lockBodies = true + ) => Jolt.PInvoke.Character_SetLinearAndAngularVelocity(this, linearVelocity, angularVelocity, lockBodies); + + /// + /// + /// Get the linear velocity of the character (m / s) + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:80 + ///
+ /// Vec3 GetLinearVelocity(bool inLockBodies = true) const + ///
+ ///
+ public float3 GetLinearVelocity(bool lockBodies = true) => + Jolt.PInvoke.Character_GetLinearVelocity(this, lockBodies); + + /// + /// + /// Set the linear velocity of the character (m / s) + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:83 + ///
+ /// void SetLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true) + ///
+ ///
+ public void SetLinearVelocity(float3 linearVelocity, bool lockBodies = true) => + Jolt.PInvoke.Character_SetLinearVelocity(this, linearVelocity, lockBodies); + + /// + /// + /// Add world space linear velocity to current velocity (m / s) + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:86 + ///
+ /// void AddLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true) + ///
+ ///
+ public void AddLinearVelocity(float3 linearVelocity, bool lockBodies = true) => + Jolt.PInvoke.Character_AddLinearVelocity(this, linearVelocity, lockBodies); + + /// + /// + /// Add impulse to the center of mass of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:89 + ///
+ /// void AddImpulse(Vec3Arg inImpulse, bool inLockBodies = true) + ///
+ ///
+ public void AddImpulse(float3 impulse, bool lockBodies = true) => + Jolt.PInvoke.Character_AddImpulse(this, impulse, lockBodies); + + /// + /// + /// Get the body associated with this character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:92 + ///
+ /// BodyID GetBodyID() const + ///
+ ///
+ public uint GetBodyID() => Jolt.PInvoke.Character_GetBodyID(this); + + /// + /// + /// Get position / rotation of the body + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:95 + ///
+ /// void GetPositionAndRotation(RVec3 &outPosition, Quat &outRotation, bool inLockBodies = true) const + ///
+ ///
+ public void GetPositionAndRotation(out float3 position, out floatQuat rotation, bool lockBodies = true) => + Jolt.PInvoke.Character_GetPositionAndRotation(this, out position, out rotation, lockBodies); + + /// + /// + /// Set the position / rotation of the body, optionally activating it. + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:98 + ///
+ /// void SetPositionAndRotation(RVec3Arg inPosition, QuatArg inRotation, EActivation inActivationMode = EActivation::Activate, bool inLockBodies = true) const + ///
+ ///
+ public void SetPositionAndRotation( + float3 position, + floatQuat rotation, + Activation activationMode = Activation.Activate, + bool lockBodies = true + ) => Jolt.PInvoke.Character_SetPositionAndRotation(this, position, rotation, activationMode, lockBodies); + + /// + /// + /// Get the position of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:101 + ///
+ /// RVec3 GetPosition(bool inLockBodies = true) const + ///
+ ///
+ public float3 GetPosition(bool lockBodies = true) => Jolt.PInvoke.Character_GetPosition(this, lockBodies); + + /// + /// + /// Set the position of the character, optionally activating it. + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:104 + ///
+ /// void SetPosition(RVec3Arg inPosition, EActivation inActivationMode = EActivation::Activate, bool inLockBodies = true) + ///
+ ///
+ public void SetPosition( + float3 position, + Activation activationMode = Activation.Activate, + bool lockBodies = true + ) => Jolt.PInvoke.Character_SetPosition(this, position, activationMode, lockBodies); + + /// + /// + /// Get the rotation of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:107 + ///
+ /// Quat GetRotation(bool inLockBodies = true) const + ///
+ ///
+ public floatQuat GetRotation(bool lockBodies = true) => Jolt.PInvoke.Character_GetRotation(this, lockBodies); + + /// + /// + /// Set the rotation of the character, optionally activating it. + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:110 + ///
+ /// void SetRotation(QuatArg inRotation, EActivation inActivationMode = EActivation::Activate, bool inLockBodies = true) + ///
+ ///
+ public void SetRotation( + floatQuat rotation, + Activation activationMode = Activation.Activate, + bool lockBodies = true + ) => Jolt.PInvoke.Character_SetRotation(this, rotation, activationMode, lockBodies); + + /// + /// + /// Position of the center of mass of the underlying rigid body + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:113 + ///
+ /// RVec3 GetCenterOfMassPosition(bool inLockBodies = true) const + ///
+ ///
+ public float3 GetCenterOfMassPosition(bool lockBodies = true) => + Jolt.PInvoke.Character_GetCenterOfMassPosition(this, lockBodies); + + /// + /// + /// Calculate the world transform of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:116 + ///
+ /// RMat44 GetWorldTransform(bool inLockBodies = true) const + ///
+ ///
+ public float4x4 GetWorldTransform(bool lockBodies = true) => + Jolt.PInvoke.Character_GetWorldTransform(this, lockBodies); + + /// + /// + /// Get the layer of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:119 + ///
+ /// ObjectLayer GetLayer() const + ///
+ ///
+ public ushort GetLayer() => Jolt.PInvoke.Character_GetLayer(this); + + /// + /// + /// Update the layer of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:122 + ///
+ /// void SetLayer(ObjectLayer inLayer, bool inLockBodies = true) + ///
+ ///
+ public void SetLayer(ushort layer, bool lockBodies = true) => + Jolt.PInvoke.Character_SetLayer(this, layer, lockBodies); + + /// + /// + /// Switch the shape of the character (e.g. for stance). When inMaxPenetrationDepth is not FLT_MAX, it + /// checks if the new shape collides before switching shape. Returns true if the switch succeeded. + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:126 + ///
+ /// bool SetShape(const Shape *inShape, float inMaxPenetrationDepth, bool inLockBodies = true) + ///
+ ///
+ public bool SetShape(Shape shape, float maxPenetrationDepth, bool lockBodies = true) => + Jolt.PInvoke.Character_SetShape(this, shape, maxPenetrationDepth, lockBodies); + + /// + /// + /// Get the transformed shape that represents the volume of the character, can be used for collision checks. + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:129 + ///
+ /// TransformedShape GetTransformedShape(bool inLockBodies = true) const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public TransformedShape GetTransformedShape(bool lockBodies = true) => + Jolt.PInvoke.Character_GetTransformedShape(this, lockBodies); + + /// + /// + /// Get all contacts for the character at a particular location + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:140 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, bool inLockBodies = true) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location + /// @param inPosition Position to test. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inLockBodies If the collision query should use the locking body interface (true) or the non locking body interface (false) + /// + /// + /// Collects every hit into checkcollisionresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public unsafe uint CheckCollision( + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + Span results, + out uint totalHits, + bool lockBodies = true + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.Character_CheckCollision( + this, + position, + rotation, + movementDirection, + maxSeparationDistance, + shape, + baseOffset, + results_fixed, + (uint)results.Length, + lockBodies + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get all contacts for the character at a particular location + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:140 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, bool inLockBodies = true) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location + /// @param inPosition Position to test. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inLockBodies If the collision query should use the locking body interface (true) or the non locking body interface (false) + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CheckCollisionClosest( + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + out CollideShapeResult result, + bool lockBodies = true + ) => + Jolt.PInvoke.Character_CheckCollisionClosest( + this, + position, + rotation, + movementDirection, + maxSeparationDistance, + shape, + baseOffset, + out result, + lockBodies + ) != 0; + + /// + /// + /// Get the character settings that can recreate this character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:143 + ///
+ /// CharacterSettings GetCharacterSettings(bool inLockBodies = true) const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public CharacterSettings GetCharacterSettings(bool lockBodies = true) => + Jolt.PInvoke.Character_GetCharacterSettings(this, lockBodies); + + public void AddRef() => ((CharacterBase)this).AddRef(); + + public void Release() => ((CharacterBase)this).Release(); + + public uint GetRefCount() => ((CharacterBase)this).GetRefCount(); + + public static implicit operator CharacterBase(Character value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetMaxSlopeAngle(float maxSlopeAngle) => ((CharacterBase)this).SetMaxSlopeAngle(maxSlopeAngle); + + /// + public float GetCosMaxSlopeAngle() => ((CharacterBase)this).GetCosMaxSlopeAngle(); + + /// + public void SetUp(float3 up) => ((CharacterBase)this).SetUp(up); + + /// + public float3 GetUp() => ((CharacterBase)this).GetUp(); + + /// + public Plane GetSupportingVolume() => ((CharacterBase)this).GetSupportingVolume(); + + /// + public void SetSupportingVolume(in Plane plane) => ((CharacterBase)this).SetSupportingVolume(in plane); + + /// + public bool IsSlopeTooSteep(float3 normal) => ((CharacterBase)this).IsSlopeTooSteep(normal); + + /// + public Shape GetShape() => ((CharacterBase)this).GetShape(); + + /// + public CharacterBase.GroundState GetGroundState() => ((CharacterBase)this).GetGroundState(); + + /// + public bool IsSupported() => ((CharacterBase)this).IsSupported(); + + /// + public float3 GetGroundPosition() => ((CharacterBase)this).GetGroundPosition(); + + /// + public float3 GetGroundNormal() => ((CharacterBase)this).GetGroundNormal(); + + /// + public float3 GetGroundVelocity() => ((CharacterBase)this).GetGroundVelocity(); + + /// + public PhysicsMaterial GetGroundMaterial() => ((CharacterBase)this).GetGroundMaterial(); + + /// + public uint GetGroundBodyID() => ((CharacterBase)this).GetGroundBodyID(); + + /// + public uint GetGroundSubShapeID() => ((CharacterBase)this).GetGroundSubShapeID(); + + /// + public ulong GetGroundUserData() => ((CharacterBase)this).GetGroundUserData(); + + /// + public void SaveState(StateRecorder stream) => ((CharacterBase)this).SaveState(stream); + + /// + public void RestoreState(StateRecorder stream) => ((CharacterBase)this).RestoreState(stream); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterBase.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterBase.gen.cs new file mode 100644 index 0000000..ffd6fbc --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterBase.gen.cs @@ -0,0 +1,378 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for character class + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:53 + ///
+ /// class CharacterBase : public RefTarget<CharacterBase>, public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterBase : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:87 + ///
+ /// enum class EGroundState + ///
+ ///
+ public enum GroundState : int + { + /// + /// + /// Character is on the ground and can move freely. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:89 + ///
+ /// OnGround + ///
+ ///
+ OnGround, + + /// + /// + /// Character is on a slope that is too steep and can't climb up any further. The caller should start + /// applying downward velocity if sliding from the slope is desired. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:90 + ///
+ /// OnSteepGround + ///
+ ///
+ OnSteepGround, + + /// + /// + /// Character is touching an object, but is not supported by it and should fall. The GetGroundXXX + /// functions will return information about the touched object. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:91 + ///
+ /// NotSupported + ///
+ ///
+ NotSupported, + + /// + /// + /// Character is in the air and is not touching anything. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:92 + ///
+ /// InAir + ///
+ ///
+ InAir, + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:59 + ///
+ /// CharacterBase(const CharacterBaseSettings *inSettings, PhysicsSystem *inSystem) + ///
+ ///
+ public static CharacterBase Create(CharacterBaseSettings settings, PhysicsSystem system) => + Jolt.PInvoke.CharacterBase_Create(settings, system); + + /// + /// + /// Set the maximum angle of slope that character can still walk on (radians) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:65 + ///
+ /// void SetMaxSlopeAngle(float inMaxSlopeAngle) + ///
+ ///
+ public void SetMaxSlopeAngle(float maxSlopeAngle) => + Jolt.PInvoke.CharacterBase_SetMaxSlopeAngle(this, maxSlopeAngle); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:66 + ///
+ /// float GetCosMaxSlopeAngle() const + ///
+ ///
+ public float GetCosMaxSlopeAngle() => Jolt.PInvoke.CharacterBase_GetCosMaxSlopeAngle(this); + + /// + /// + /// Set the up vector for the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:69 + ///
+ /// void SetUp(Vec3Arg inUp) + ///
+ ///
+ public void SetUp(float3 up) => Jolt.PInvoke.CharacterBase_SetUp(this, up); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:70 + ///
+ /// Vec3 GetUp() const + ///
+ ///
+ public float3 GetUp() => Jolt.PInvoke.CharacterBase_GetUp(this); + + /// + /// + /// Every contact behind this plane can support the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:73 + ///
+ /// const Plane & GetSupportingVolume() const + ///
+ ///
+ public Plane GetSupportingVolume() => Jolt.PInvoke.CharacterBase_GetSupportingVolume(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:74 + ///
+ /// void SetSupportingVolume(const Plane &inPlane) + ///
+ ///
+ public void SetSupportingVolume(in Plane plane) => + Jolt.PInvoke.CharacterBase_SetSupportingVolume(this, in plane); + + /// + /// + /// Check if the normal of the ground surface is too steep to walk on + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:77 + ///
+ /// bool IsSlopeTooSteep(Vec3Arg inNormal) const + ///
+ ///
+ public bool IsSlopeTooSteep(float3 normal) => Jolt.PInvoke.CharacterBase_IsSlopeTooSteep(this, normal); + + /// + /// + /// Get the current shape that the character is using. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:85 + ///
+ /// const Shape * GetShape() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetShape() => Jolt.PInvoke.CharacterBase_GetShape(this); + + /// + /// + /// Debug function to convert enum values to string + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:96 + ///
+ /// static const char * sToString(EGroundState inState) + ///
+ ///
+ public static unsafe RefString8 ToDisplayString(CharacterBase.GroundState state) => + (Ptr)Jolt.PInvoke.CharacterBase_ToDisplayString(state); + + /// + /// + /// Current ground state + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:101 + ///
+ /// EGroundState GetGroundState() const + ///
+ ///
+ public CharacterBase.GroundState GetGroundState() => Jolt.PInvoke.CharacterBase_GetGroundState(this); + + /// + /// + /// Returns true if the player is supported by normal or steep ground + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:104 + ///
+ /// bool IsSupported() const + ///
+ ///
+ public bool IsSupported() => Jolt.PInvoke.CharacterBase_IsSupported(this); + + /// + /// + /// Get the contact point with the ground + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:107 + ///
+ /// RVec3 GetGroundPosition() const + ///
+ ///
+ public float3 GetGroundPosition() => Jolt.PInvoke.CharacterBase_GetGroundPosition(this); + + /// + /// + /// Get the contact normal with the ground + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:110 + ///
+ /// Vec3 GetGroundNormal() const + ///
+ ///
+ public float3 GetGroundNormal() => Jolt.PInvoke.CharacterBase_GetGroundNormal(this); + + /// + /// + /// Velocity in world space of ground + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:113 + ///
+ /// Vec3 GetGroundVelocity() const + ///
+ ///
+ public float3 GetGroundVelocity() => Jolt.PInvoke.CharacterBase_GetGroundVelocity(this); + + /// + /// + /// Material that the character is standing on + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:116 + ///
+ /// const PhysicsMaterial * GetGroundMaterial() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetGroundMaterial() => Jolt.PInvoke.CharacterBase_GetGroundMaterial(this); + + /// + /// + /// BodyID of the object the character is standing on. Note may have been removed! + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:119 + ///
+ /// BodyID GetGroundBodyID() const + ///
+ ///
+ public uint GetGroundBodyID() => Jolt.PInvoke.CharacterBase_GetGroundBodyID(this); + + /// + /// + /// Sub part of the body that we're standing on. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:122 + ///
+ /// SubShapeID GetGroundSubShapeID() const + ///
+ ///
+ public uint GetGroundSubShapeID() => Jolt.PInvoke.CharacterBase_GetGroundSubShapeID(this); + + /// + /// + /// User data value of the body that we're standing on + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:125 + ///
+ /// uint64 GetGroundUserData() const + ///
+ ///
+ public ulong GetGroundUserData() => Jolt.PInvoke.CharacterBase_GetGroundUserData(this); + + /// + /// + /// Saving / restoring state for replay + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:128 + ///
+ /// virtual void SaveState(StateRecorder &inStream) const + ///
+ ///
+ public void SaveState(StateRecorder stream) => Jolt.PInvoke.CharacterBase_SaveState(this, stream); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:129 + ///
+ /// virtual void RestoreState(StateRecorder &inStream) + ///
+ ///
+ public void RestoreState(StateRecorder stream) => Jolt.PInvoke.CharacterBase_RestoreState(this, stream); + + public void AddRef() => Jolt.PInvoke.CharacterBase_AddRef(this); + + public void Release() => Jolt.PInvoke.CharacterBase_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.CharacterBase_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterBaseSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterBaseSettings.gen.cs new file mode 100644 index 0000000..97a3421 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterBaseSettings.gen.cs @@ -0,0 +1,199 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for configuration of a character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:20 + ///
+ /// class CharacterBaseSettings : public RefTarget<CharacterBaseSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterBaseSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:26 + ///
+ /// CharacterBaseSettings() = default + ///
+ ///
+ public static CharacterBaseSettings Create() => Jolt.PInvoke.CharacterBaseSettings_Create(); + + /// + /// + /// Vector indicating the up direction of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:34 + ///
+ /// Vec3 mUp = Vec3::sAxisY() + ///
+ ///
+ public float3 GetUp() => Jolt.PInvoke.CharacterBaseSettings_GetUp(this); + + /// + /// + /// Vector indicating the up direction of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:34 + ///
+ /// Vec3 mUp = Vec3::sAxisY() + ///
+ ///
+ public void SetUp(float3 value) => Jolt.PInvoke.CharacterBaseSettings_SetUp(this, value); + + /// + /// + /// Plane, defined in local space relative to the character. Every contact behind this plane can support the + /// character, every contact in front of this plane is treated as only colliding with the player. Default: + /// Accept any contact. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:39 + ///
+ /// Plane mSupportingVolume { Vec3::sAxisY(), -1.0e10f } + ///
+ ///
+ public Plane GetSupportingVolume() => Jolt.PInvoke.CharacterBaseSettings_GetSupportingVolume(this); + + /// + /// + /// Plane, defined in local space relative to the character. Every contact behind this plane can support the + /// character, every contact in front of this plane is treated as only colliding with the player. Default: + /// Accept any contact. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:39 + ///
+ /// Plane mSupportingVolume { Vec3::sAxisY(), -1.0e10f } + ///
+ ///
+ public void SetSupportingVolume(Plane value) => + Jolt.PInvoke.CharacterBaseSettings_SetSupportingVolume(this, value); + + /// + /// + /// Maximum angle of slope that character can still walk on (radians). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:42 + ///
+ /// float mMaxSlopeAngle = DegreesToRadians(50.0f) + ///
+ ///
+ public float GetMaxSlopeAngle() => Jolt.PInvoke.CharacterBaseSettings_GetMaxSlopeAngle(this); + + /// + /// + /// Maximum angle of slope that character can still walk on (radians). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:42 + ///
+ /// float mMaxSlopeAngle = DegreesToRadians(50.0f) + ///
+ ///
+ public void SetMaxSlopeAngle(float value) => Jolt.PInvoke.CharacterBaseSettings_SetMaxSlopeAngle(this, value); + + /// + /// + /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with + /// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex + /// edges. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:45 + ///
+ /// bool mEnhancedInternalEdgeRemoval = false + ///
+ ///
+ public bool GetEnhancedInternalEdgeRemoval() => + Jolt.PInvoke.CharacterBaseSettings_GetEnhancedInternalEdgeRemoval(this); + + /// + /// + /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with + /// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex + /// edges. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:45 + ///
+ /// bool mEnhancedInternalEdgeRemoval = false + ///
+ ///
+ public void SetEnhancedInternalEdgeRemoval(bool value) => + Jolt.PInvoke.CharacterBaseSettings_SetEnhancedInternalEdgeRemoval(this, value); + + /// + /// + /// Initial shape that represents the character's volume. Usually this is a capsule, make sure the shape is + /// made so that the bottom of the shape is at (0, 0, 0). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:49 + ///
+ /// RefConst<Shape> mShape + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetShape() => Jolt.PInvoke.CharacterBaseSettings_GetShape(this); + + /// + /// + /// Initial shape that represents the character's volume. Usually this is a capsule, make sure the shape is + /// made so that the bottom of the shape is at (0, 0, 0). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterBase.h:49 + ///
+ /// RefConst<Shape> mShape + ///
+ ///
+ public void SetShape(Shape value) => Jolt.PInvoke.CharacterBaseSettings_SetShape(this, value); + + public void AddRef() => Jolt.PInvoke.CharacterBaseSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.CharacterBaseSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.CharacterBaseSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterContactListener.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterContactListener.gen.cs new file mode 100644 index 0000000..d70880a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterContactListener.gen.cs @@ -0,0 +1,305 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class receives callbacks when a virtual character hits something. Once created, register it on a + /// CharacterVirtual by using the character's SetListener method. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:155 + ///
+ /// class CharacterContactListener + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterContactListener : IDisposable + { + public static CharacterContactListener Create() => Jolt.PInvoke.CharacterContactListener_Create(); + + /// + /// + /// Callback to adjust the velocity of a body as seen by the character. Can be adjusted to e.g. implement a + /// conveyor belt or an inertial dampener system of a sci-fi space ship. Note that inBody2 is locked during + /// the callback so you can read its properties freely. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:163 + ///
+ /// virtual void OnAdjustBodyVelocity(const CharacterVirtual *inCharacter, const Body &inBody2, Vec3 &ioLinearVelocity, Vec3 &ioAngularVelocity) + ///
+ ///
+ public void OnAdjustBodyVelocity( + CharacterVirtual character, + Body body2, + ref float3 linearVelocity, + ref float3 angularVelocity + ) => + Jolt.PInvoke.CharacterContactListener_OnAdjustBodyVelocity( + this, + character, + body2, + ref linearVelocity, + ref angularVelocity + ); + + /// + /// + /// Checks if a character can collide with specified body. Return true if the contact is valid. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:166 + ///
+ /// virtual bool OnContactValidate(const CharacterVirtual *inCharacter, const CharacterContact &inContact) + ///
+ ///
+ public bool OnContactValidate(CharacterVirtual character, in CharacterContact contact) => + Jolt.PInvoke.CharacterContactListener_OnContactValidate(this, character, in contact); + + /// + /// + /// Called whenever the character collides with a body for the first time. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:172 + ///
+ /// virtual void OnContactAdded(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever the character collides with a body for the first time. + /// @param inCharacter Character that is being solved + /// @param inContact Contact that we're colliding against + /// @param ioSettings Settings returned by the contact callback to indicate how the character should behave + /// + /// + public void OnContactAdded( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) => Jolt.PInvoke.CharacterContactListener_OnContactAdded(this, character, in contact, ref settings); + + /// + /// + /// Called whenever the character persists colliding with a body. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:178 + ///
+ /// virtual void OnContactPersisted(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever the character persists colliding with a body. + /// @param inCharacter Character that is being solved + /// @param inContact Contact that we're colliding against + /// @param ioSettings Settings returned by the contact callback to indicate how the character should behave + /// + /// + public void OnContactPersisted( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) => Jolt.PInvoke.CharacterContactListener_OnContactPersisted(this, character, in contact, ref settings); + + /// + /// + /// Called whenever the character loses contact with a body. Note that there is no guarantee that the body + /// or its sub shape still exists at this point. The body may have been deleted since the last update. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:185 + ///
+ /// virtual void OnContactRemoved(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2) + ///
+ ///
+ /// + /// + /// Called whenever the character loses contact with a body. + /// Note that there is no guarantee that the body or its sub shape still exists at this point. The body may have been deleted since the last update. + /// @param inCharacter Character that is being solved + /// @param inBodyID2 Body ID of body that is being hit + /// @param inSubShapeID2 Sub shape ID of shape that is being hit + /// + /// + public void OnContactRemoved(CharacterVirtual character, uint bodyID2, uint subShapeID2) => + Jolt.PInvoke.CharacterContactListener_OnContactRemoved(this, character, bodyID2, subShapeID2); + + /// + /// + /// Same as OnContactValidate but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:188 + ///
+ /// virtual bool OnCharacterContactValidate(const CharacterVirtual *inCharacter, const CharacterContact &inContact) + ///
+ ///
+ public bool OnCharacterContactValidate(CharacterVirtual character, in CharacterContact contact) => + Jolt.PInvoke.CharacterContactListener_OnCharacterContactValidate(this, character, in contact); + + /// + /// + /// Same as OnContactAdded but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:191 + ///
+ /// virtual void OnCharacterContactAdded(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ public void OnCharacterContactAdded( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) => Jolt.PInvoke.CharacterContactListener_OnCharacterContactAdded(this, character, in contact, ref settings); + + /// + /// + /// Same as OnContactPersisted but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:194 + ///
+ /// virtual void OnCharacterContactPersisted(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ public void OnCharacterContactPersisted( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) => + Jolt.PInvoke.CharacterContactListener_OnCharacterContactPersisted( + this, + character, + in contact, + ref settings + ); + + /// + /// + /// Same as OnContactRemoved but when colliding with a CharacterVirtual Note that inOtherCharacterID can be + /// the ID of a character that has been deleted. This happens if the character was in contact with this + /// character during the last update, but has been deleted since. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:198 + ///
+ /// virtual void OnCharacterContactRemoved(const CharacterVirtual *inCharacter, const CharacterID &inOtherCharacterID, const SubShapeID &inSubShapeID2) + ///
+ ///
+ public void OnCharacterContactRemoved(CharacterVirtual character, uint otherCharacterID, uint subShapeID2) => + Jolt.PInvoke.CharacterContactListener_OnCharacterContactRemoved( + this, + character, + otherCharacterID, + subShapeID2 + ); + + /// + /// + /// Called whenever a contact is being used by the solver. Allows the listener to override the resulting + /// character velocity (e.g. by preventing sliding along certain surfaces). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:210 + ///
+ /// virtual void OnContactSolve(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, Vec3Arg inContactVelocity, const PhysicsMaterial *inContactMaterial, Vec3Arg inCharacterVelocity, Vec3 &ioNewCharacterVelocity) + ///
+ ///
+ /// + /// + /// Called whenever a contact is being used by the solver. Allows the listener to override the resulting character velocity (e.g. by preventing sliding along certain surfaces). + /// @param inCharacter Character that is being solved + /// @param inBodyID2 Body ID of body that is being hit + /// @param inSubShapeID2 Sub shape ID of shape that is being hit + /// @param inContactPosition World space contact position + /// @param inContactNormal World space contact normal + /// @param inContactVelocity World space velocity of contact point (e.g. for a moving platform) + /// @param inContactMaterial Material of contact point + /// @param inCharacterVelocity World space velocity of the character prior to hitting this contact + /// @param ioNewCharacterVelocity Contains the calculated world space velocity of the character after hitting this contact, this velocity slides along the surface of the contact. Can be modified by the listener to provide an alternative velocity. + /// + /// + public void OnContactSolve( + CharacterVirtual character, + uint bodyID2, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + ref float3 newCharacterVelocity + ) => + Jolt.PInvoke.CharacterContactListener_OnContactSolve( + this, + character, + bodyID2, + subShapeID2, + contactPosition, + contactNormal, + contactVelocity, + contactMaterial, + characterVelocity, + ref newCharacterVelocity + ); + + /// + /// + /// Same as OnContactSolve but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:213 + ///
+ /// virtual void OnCharacterContactSolve(const CharacterVirtual *inCharacter, const CharacterVirtual *inOtherCharacter, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, Vec3Arg inContactVelocity, const PhysicsMaterial *inContactMaterial, Vec3Arg inCharacterVelocity, Vec3 &ioNewCharacterVelocity) + ///
+ ///
+ public void OnCharacterContactSolve( + CharacterVirtual character, + CharacterVirtual otherCharacter, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + ref float3 newCharacterVelocity + ) => + Jolt.PInvoke.CharacterContactListener_OnCharacterContactSolve( + this, + character, + otherCharacter, + subShapeID2, + contactPosition, + contactNormal, + contactVelocity, + contactMaterial, + characterVelocity, + ref newCharacterVelocity + ); + + public void Dispose() => Jolt.PInvoke.CharacterContactListener_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterSettings.gen.cs new file mode 100644 index 0000000..143b646 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterSettings.gen.cs @@ -0,0 +1,215 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Contains the configuration of a character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:16 + ///
+ /// class CharacterSettings : public CharacterBaseSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:22 + ///
+ /// CharacterSettings() = default + ///
+ ///
+ public static CharacterSettings Create() => Jolt.PInvoke.CharacterSettings_Create(); + + /// + /// + /// Layer that this character will be added to + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:27 + ///
+ /// ObjectLayer mLayer = 0 + ///
+ ///
+ public ushort GetLayer() => Jolt.PInvoke.CharacterSettings_GetLayer(this); + + /// + /// + /// Layer that this character will be added to + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:27 + ///
+ /// ObjectLayer mLayer = 0 + ///
+ ///
+ public void SetLayer(ushort value) => Jolt.PInvoke.CharacterSettings_SetLayer(this, value); + + /// + /// + /// Mass of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:30 + ///
+ /// float mMass = 80.0f + ///
+ ///
+ public float GetMass() => Jolt.PInvoke.CharacterSettings_GetMass(this); + + /// + /// + /// Mass of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:30 + ///
+ /// float mMass = 80.0f + ///
+ ///
+ public void SetMass(float value) => Jolt.PInvoke.CharacterSettings_SetMass(this, value); + + /// + /// + /// Friction for the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:33 + ///
+ /// float mFriction = 0.2f + ///
+ ///
+ public float GetFriction() => Jolt.PInvoke.CharacterSettings_GetFriction(this); + + /// + /// + /// Friction for the character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:33 + ///
+ /// float mFriction = 0.2f + ///
+ ///
+ public void SetFriction(float value) => Jolt.PInvoke.CharacterSettings_SetFriction(this, value); + + /// + /// + /// Value to multiply gravity with for this character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:36 + ///
+ /// float mGravityFactor = 1.0f + ///
+ ///
+ public float GetGravityFactor() => Jolt.PInvoke.CharacterSettings_GetGravityFactor(this); + + /// + /// + /// Value to multiply gravity with for this character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:36 + ///
+ /// float mGravityFactor = 1.0f + ///
+ ///
+ public void SetGravityFactor(float value) => Jolt.PInvoke.CharacterSettings_SetGravityFactor(this, value); + + /// + /// + /// Allowed degrees of freedom for this character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:39 + ///
+ /// EAllowedDOFs mAllowedDOFs = EAllowedDOFs::TranslationX | EAllowedDOFs::TranslationY | EAllowedDOFs::TranslationZ + ///
+ ///
+ public AllowedDOFs GetAllowedDOFs() => Jolt.PInvoke.CharacterSettings_GetAllowedDOFs(this); + + /// + /// + /// Allowed degrees of freedom for this character + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:39 + ///
+ /// EAllowedDOFs mAllowedDOFs = EAllowedDOFs::TranslationX | EAllowedDOFs::TranslationY | EAllowedDOFs::TranslationZ + ///
+ ///
+ public void SetAllowedDOFs(AllowedDOFs value) => Jolt.PInvoke.CharacterSettings_SetAllowedDOFs(this, value); + + public void AddRef() => ((CharacterBaseSettings)this).AddRef(); + + public void Release() => ((CharacterBaseSettings)this).Release(); + + public uint GetRefCount() => ((CharacterBaseSettings)this).GetRefCount(); + + public static implicit operator CharacterBaseSettings(CharacterSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public float3 GetUp() => ((CharacterBaseSettings)this).GetUp(); + + /// + public void SetUp(float3 value) => ((CharacterBaseSettings)this).SetUp(value); + + /// + public Plane GetSupportingVolume() => ((CharacterBaseSettings)this).GetSupportingVolume(); + + /// + public void SetSupportingVolume(Plane value) => ((CharacterBaseSettings)this).SetSupportingVolume(value); + + /// + public float GetMaxSlopeAngle() => ((CharacterBaseSettings)this).GetMaxSlopeAngle(); + + /// + public void SetMaxSlopeAngle(float value) => ((CharacterBaseSettings)this).SetMaxSlopeAngle(value); + + /// + public bool GetEnhancedInternalEdgeRemoval() => ((CharacterBaseSettings)this).GetEnhancedInternalEdgeRemoval(); + + /// + public void SetEnhancedInternalEdgeRemoval(bool value) => + ((CharacterBaseSettings)this).SetEnhancedInternalEdgeRemoval(value); + + /// + public Shape GetShape() => ((CharacterBaseSettings)this).GetShape(); + + /// + public void SetShape(Shape value) => ((CharacterBaseSettings)this).SetShape(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterVirtual.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterVirtual.gen.cs new file mode 100644 index 0000000..a1ad580 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterVirtual.gen.cs @@ -0,0 +1,1615 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime character object. This object usually represents the player. Contrary to the Character class it + /// doesn't use a rigid body but moves doing collision checks only (hence the name virtual). The advantage of + /// this is that you can determine when the character moves in the frame (usually this has to happen at a very + /// particular point in the frame) but the downside is that other objects don't see this virtual character. To + /// make a CharacterVirtual visible to the simulation, you can optionally create an inner rigid body through + /// CharacterVirtualSettings::mInnerBodyShape. A CharacterVirtual is not tracked by the PhysicsSystem so you + /// need to update it yourself. This also means that a call to PhysicsSystem::SaveState will not save its state, + /// you need to call CharacterVirtual::SaveState yourself. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:268 + ///
+ /// class CharacterVirtual : public CharacterBase + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterVirtual : IDisposable + { + /// + /// + /// Settings struct with settings for ExtendedUpdate + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:429 + ///
+ /// struct ExtendedUpdateSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct ExtendedUpdateSettings + { + /// + /// + /// See StickToFloor inStepDown parameter. Can be zero to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:431 + ///
+ /// Vec3 mStickToFloorStepDown { 0, -0.5f, 0 } + ///
+ ///
+ [FieldOffset(0)] + public float3 StickToFloorStepDown; + + /// + /// + /// See WalkStairs inStepUp parameter. Can be zero to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:432 + ///
+ /// Vec3 mWalkStairsStepUp { 0, 0.4f, 0 } + ///
+ ///
+ [FieldOffset(16)] + public float3 WalkStairsStepUp; + + /// + /// + /// See WalkStairs inStepForward parameter. Note that the parameter only indicates a magnitude, + /// direction is taken from current velocity. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:433 + ///
+ /// float mWalkStairsMinStepForward { 0.02f } + ///
+ ///
+ [FieldOffset(32)] + public float WalkStairsMinStepForward; + + /// + /// + /// See WalkStairs inStepForwardTest parameter. Note that the parameter only indicates a magnitude, + /// direction is taken from current velocity. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:434 + ///
+ /// float mWalkStairsStepForwardTest { 0.15f } + ///
+ ///
+ [FieldOffset(36)] + public float WalkStairsStepForwardTest; + + /// + /// + /// Cos(angle) where angle is the maximum angle between the ground normal in the horizontal plane and + /// the character forward vector where we're willing to adjust the step forward test towards the contact + /// normal. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:435 + ///
+ /// float mWalkStairsCosAngleForwardContact { Cos(DegreesToRadians(75.0f)) } + ///
+ ///
+ [FieldOffset(40)] + public float WalkStairsCosAngleForwardContact; + + /// + /// + /// See WalkStairs inStepDownExtra + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:436 + ///
+ /// Vec3 mWalkStairsStepDownExtra { Vec3::sZero() } + ///
+ ///
+ [FieldOffset(48)] + public float3 WalkStairsStepDownExtra; + } + + /// + /// + /// A constraint that limits the movement of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:556 + ///
+ /// struct Constraint + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct Constraint + { + /// + /// + /// Contact that this constraint was generated from + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:558 + ///
+ /// CharacterContact * mContact + ///
+ ///
+ [FieldOffset(0)] + public Ptr Contact; + + /// + /// + /// Calculated time of impact (can be negative if penetrating) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:559 + ///
+ /// float mTOI + ///
+ ///
+ [FieldOffset(8)] + public float TOI; + + /// + /// + /// Velocity of the contact projected on the contact normal (negative if separating) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:560 + ///
+ /// float mProjectedVelocity + ///
+ ///
+ [FieldOffset(12)] + public float ProjectedVelocity; + + /// + /// + /// Velocity of the contact (can contain a corrective velocity to resolve penetration) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:561 + ///
+ /// Vec3 mLinearVelocity + ///
+ ///
+ [FieldOffset(16)] + public float3 LinearVelocity; + + /// + /// + /// Plane around the origin that describes how far we can displace (from the origin) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:562 + ///
+ /// Plane mPlane + ///
+ ///
+ [FieldOffset(32)] + public Plane Plane; + + /// + /// + /// If this constraint belongs to a steep slope + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:563 + ///
+ /// bool mIsSteepSlope = false + ///
+ ///
+ [FieldOffset(48)] + public Brutal.Bool8 IsSteepSlope; + } + + /// + /// + /// View from a contact listener perspective on which contacts have been added/removed + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:736 + ///
+ /// struct ListenerContactValue + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct ListenerContactValue + { + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:741 + ///
+ /// CharacterContactSettings mSettings + ///
+ ///
+ [FieldOffset(0)] + public CharacterContactSettings Settings; + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:742 + ///
+ /// int mCount = 0 + ///
+ ///
+ [FieldOffset(4)] + public int Count; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:279 + ///
+ /// CharacterVirtual(const CharacterVirtualSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, uint64 inUserData, PhysicsSystem *inSystem) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inSettings The settings for the character + /// @param inPosition Initial position for the character + /// @param inRotation Initial rotation for the character (usually only around the up-axis) + /// @param inUserData Application specific value + /// @param inSystem Physics system that this character will be added to + /// + /// + public static CharacterVirtual Create( + CharacterVirtualSettings settings, + float3 position, + floatQuat rotation, + ulong userData, + PhysicsSystem system + ) => Jolt.PInvoke.CharacterVirtual_Create(settings, position, rotation, userData, system); + + /// + /// + /// Constructor without user data + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:282 + ///
+ /// CharacterVirtual(const CharacterVirtualSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, PhysicsSystem *inSystem) + ///
+ ///
+ public static CharacterVirtual Create( + CharacterVirtualSettings settings, + float3 position, + floatQuat rotation, + PhysicsSystem system + ) => Jolt.PInvoke.CharacterVirtual_Create_2(settings, position, rotation, system); + + /// + /// + /// The ID of this character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:288 + ///
+ /// inline const CharacterID & GetID() const + ///
+ ///
+ public uint GetID() => Jolt.PInvoke.CharacterVirtual_GetID(this); + + /// + /// + /// Set the contact listener + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:291 + ///
+ /// void SetListener(CharacterContactListener *inListener) + ///
+ ///
+ public void SetListener(CharacterContactListener listener) => + Jolt.PInvoke.CharacterVirtual_SetListener(this, listener); + + /// + /// + /// Get the current contact listener + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:294 + ///
+ /// CharacterContactListener * GetListener() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public CharacterContactListener GetListener() => Jolt.PInvoke.CharacterVirtual_GetListener(this); + + /// + /// + /// Set the character vs character collision interface + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:297 + ///
+ /// void SetCharacterVsCharacterCollision(CharacterVsCharacterCollision *inCharacterVsCharacterCollision) + ///
+ ///
+ public void SetCharacterVsCharacterCollision(CharacterVsCharacterCollision characterVsCharacterCollision) => + Jolt.PInvoke.CharacterVirtual_SetCharacterVsCharacterCollision(this, characterVsCharacterCollision); + + /// + /// + /// Get the linear velocity of the character (m / s) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:300 + ///
+ /// Vec3 GetLinearVelocity() const + ///
+ ///
+ public float3 GetLinearVelocity() => Jolt.PInvoke.CharacterVirtual_GetLinearVelocity(this); + + /// + /// + /// Set the linear velocity of the character (m / s) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:303 + ///
+ /// void SetLinearVelocity(Vec3Arg inLinearVelocity) + ///
+ ///
+ public void SetLinearVelocity(float3 linearVelocity) => + Jolt.PInvoke.CharacterVirtual_SetLinearVelocity(this, linearVelocity); + + /// + /// + /// Get the position of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:306 + ///
+ /// RVec3 GetPosition() const + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.CharacterVirtual_GetPosition(this); + + /// + /// + /// Set the position of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:309 + ///
+ /// void SetPosition(RVec3Arg inPosition) + ///
+ ///
+ public void SetPosition(float3 position) => Jolt.PInvoke.CharacterVirtual_SetPosition(this, position); + + /// + /// + /// Get the rotation of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:312 + ///
+ /// Quat GetRotation() const + ///
+ ///
+ public floatQuat GetRotation() => Jolt.PInvoke.CharacterVirtual_GetRotation(this); + + /// + /// + /// Set the rotation of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:315 + ///
+ /// void SetRotation(QuatArg inRotation) + ///
+ ///
+ public void SetRotation(floatQuat rotation) => Jolt.PInvoke.CharacterVirtual_SetRotation(this, rotation); + + /// + /// + /// Get the center of mass position of the shape + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:318 + ///
+ /// inline RVec3 GetCenterOfMassPosition() const + ///
+ ///
+ public float3 GetCenterOfMassPosition() => Jolt.PInvoke.CharacterVirtual_GetCenterOfMassPosition(this); + + /// + /// + /// Calculate the world transform of the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:321 + ///
+ /// RMat44 GetWorldTransform() const + ///
+ ///
+ public float4x4 GetWorldTransform() => Jolt.PInvoke.CharacterVirtual_GetWorldTransform(this); + + /// + /// + /// Calculates the transform for this character's center of mass + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:324 + ///
+ /// RMat44 GetCenterOfMassTransform() const + ///
+ ///
+ public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.CharacterVirtual_GetCenterOfMassTransform(this); + + /// + /// + /// Character mass (kg) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:327 + ///
+ /// float GetMass() const + ///
+ ///
+ public float GetMass() => Jolt.PInvoke.CharacterVirtual_GetMass(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:328 + ///
+ /// void SetMass(float inMass) + ///
+ ///
+ public void SetMass(float mass) => Jolt.PInvoke.CharacterVirtual_SetMass(this, mass); + + /// + /// + /// Maximum force with which the character can push other bodies (N) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:331 + ///
+ /// float GetMaxStrength() const + ///
+ ///
+ public float GetMaxStrength() => Jolt.PInvoke.CharacterVirtual_GetMaxStrength(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:332 + ///
+ /// void SetMaxStrength(float inMaxStrength) + ///
+ ///
+ public void SetMaxStrength(float maxStrength) => + Jolt.PInvoke.CharacterVirtual_SetMaxStrength(this, maxStrength); + + /// + /// + /// This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in + /// one update + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:335 + ///
+ /// float GetPenetrationRecoverySpeed() const + ///
+ ///
+ public float GetPenetrationRecoverySpeed() => Jolt.PInvoke.CharacterVirtual_GetPenetrationRecoverySpeed(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:336 + ///
+ /// void SetPenetrationRecoverySpeed(float inSpeed) + ///
+ ///
+ public void SetPenetrationRecoverySpeed(float speed) => + Jolt.PInvoke.CharacterVirtual_SetPenetrationRecoverySpeed(this, speed); + + /// + /// + /// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with + /// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex + /// edges. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:339 + ///
+ /// bool GetEnhancedInternalEdgeRemoval() const + ///
+ ///
+ public bool GetEnhancedInternalEdgeRemoval() => + Jolt.PInvoke.CharacterVirtual_GetEnhancedInternalEdgeRemoval(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:340 + ///
+ /// void SetEnhancedInternalEdgeRemoval(bool inApply) + ///
+ ///
+ public void SetEnhancedInternalEdgeRemoval(bool apply) => + Jolt.PInvoke.CharacterVirtual_SetEnhancedInternalEdgeRemoval(this, apply); + + /// + /// + /// Character padding + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:343 + ///
+ /// float GetCharacterPadding() const + ///
+ ///
+ public float GetCharacterPadding() => Jolt.PInvoke.CharacterVirtual_GetCharacterPadding(this); + + /// + /// + /// Max num hits to collect in order to avoid excess of contact points collection + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:346 + ///
+ /// uint GetMaxNumHits() const + ///
+ ///
+ public uint GetMaxNumHits() => Jolt.PInvoke.CharacterVirtual_GetMaxNumHits(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:347 + ///
+ /// void SetMaxNumHits(uint inMaxHits) + ///
+ ///
+ public void SetMaxNumHits(uint maxHits) => Jolt.PInvoke.CharacterVirtual_SetMaxNumHits(this, maxHits); + + /// + /// + /// Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be + /// merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:350 + ///
+ /// float GetHitReductionCosMaxAngle() const + ///
+ ///
+ public float GetHitReductionCosMaxAngle() => Jolt.PInvoke.CharacterVirtual_GetHitReductionCosMaxAngle(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:351 + ///
+ /// void SetHitReductionCosMaxAngle(float inCosMaxAngle) + ///
+ ///
+ public void SetHitReductionCosMaxAngle(float cosMaxAngle) => + Jolt.PInvoke.CharacterVirtual_SetHitReductionCosMaxAngle(this, cosMaxAngle); + + /// + /// + /// Returns if we exceeded the maximum number of hits during the last collision check and had to discard + /// hits based on distance. This can be used to find areas that have too complex geometry for the character + /// to navigate properly. To solve you can either increase the max number of hits or simplify the geometry. + /// Note that the character simulation will try to do its best to select the most relevant contacts to avoid + /// the character from getting stuck. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:357 + ///
+ /// bool GetMaxHitsExceeded() const + ///
+ ///
+ public bool GetMaxHitsExceeded() => Jolt.PInvoke.CharacterVirtual_GetMaxHitsExceeded(this); + + /// + /// + /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape + /// in local space. Note that setting it on the fly can cause the shape to teleport into collision. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:360 + ///
+ /// Vec3 GetShapeOffset() const + ///
+ ///
+ public float3 GetShapeOffset() => Jolt.PInvoke.CharacterVirtual_GetShapeOffset(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:361 + ///
+ /// void SetShapeOffset(Vec3Arg inShapeOffset) + ///
+ ///
+ public void SetShapeOffset(float3 shapeOffset) => + Jolt.PInvoke.CharacterVirtual_SetShapeOffset(this, shapeOffset); + + /// + /// + /// Access to the user data, can be used for anything by the application + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:364 + ///
+ /// uint64 GetUserData() const + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.CharacterVirtual_GetUserData(this); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:365 + ///
+ /// void SetUserData(uint64 inUserData) + ///
+ ///
+ public void SetUserData(ulong userData) => Jolt.PInvoke.CharacterVirtual_SetUserData(this, userData); + + /// + /// + /// Optional inner rigid body that proxies the character in the world. Can be used to update body + /// properties. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:368 + ///
+ /// BodyID GetInnerBodyID() const + ///
+ ///
+ public uint GetInnerBodyID() => Jolt.PInvoke.CharacterVirtual_GetInnerBodyID(this); + + /// + /// + /// This function can be called prior to calling Update() to convert a desired velocity into a velocity that + /// won't make the character move further onto steep slopes. This velocity can then be set on the character + /// using SetLinearVelocity() + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:374 + ///
+ /// Vec3 CancelVelocityTowardsSteepSlopes(Vec3Arg inDesiredVelocity) const + ///
+ ///
+ /// + /// + /// This function can be called prior to calling Update() to convert a desired velocity into a velocity that won't make the character move further onto steep slopes. + /// This velocity can then be set on the character using SetLinearVelocity() + /// @param inDesiredVelocity Velocity to clamp against steep walls + /// @return A new velocity vector that won't make the character move up steep slopes + /// + /// + public float3 CancelVelocityTowardsSteepSlopes(float3 desiredVelocity) => + Jolt.PInvoke.CharacterVirtual_CancelVelocityTowardsSteepSlopes(this, desiredVelocity); + + /// + /// + /// This function is internally called by Update, WalkStairs, StickToFloor and ExtendedUpdate and is + /// responsible for tracking if contacts are added, persisted or removed. If you want to do multiple + /// operations on a character (e.g. first Update then WalkStairs), you can surround the code with a + /// StartTrackingContactChanges and FinishTrackingContactChanges pair to only receive a single callback per + /// contact on the CharacterContactListener. If you don't do this then you could for example receive a + /// contact added callback during the Update and a contact persisted callback during WalkStairs. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:380 + ///
+ /// void StartTrackingContactChanges() + ///
+ ///
+ public void StartTrackingContactChanges() => Jolt.PInvoke.CharacterVirtual_StartTrackingContactChanges(this); + + /// + /// + /// This call triggers contact removal callbacks and is used in conjunction with + /// StartTrackingContactChanges. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:383 + ///
+ /// void FinishTrackingContactChanges() + ///
+ ///
+ public void FinishTrackingContactChanges() => Jolt.PInvoke.CharacterVirtual_FinishTrackingContactChanges(this); + + /// + /// + /// This is the main update function. It moves the character according to its current velocity (the + /// character is similar to a kinematic body in the sense that you set the velocity and the character will + /// follow unless collision is blocking the way). Note it's your own responsibility to apply gravity to the + /// character velocity! Different surface materials (like ice) can be emulated by getting the ground + /// material and adjusting the velocity and/or the max slope angle accordingly every frame. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:395 + ///
+ /// void Update(float inDeltaTime, Vec3Arg inGravity, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// This is the main update function. It moves the character according to its current velocity (the character is similar to a kinematic body in the sense + /// that you set the velocity and the character will follow unless collision is blocking the way). Note it's your own responsibility to apply gravity to the character velocity! + /// Different surface materials (like ice) can be emulated by getting the ground material and adjusting the velocity and/or the max slope angle accordingly every frame. + /// @param inDeltaTime Time step to simulate. + /// @param inGravity Gravity vector (m/s^2). This gravity vector is only used when the character is standing on top of another object to apply downward force. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public void Update( + float deltaTime, + float3 gravity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ) => + Jolt.PInvoke.CharacterVirtual_Update( + this, + deltaTime, + gravity, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter, + allocator + ); + + /// + /// + /// This function will return true if the character has moved into a slope that is too steep (e.g. a + /// vertical wall). You would call WalkStairs to attempt to step up stairs. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:400 + ///
+ /// bool CanWalkStairs(Vec3Arg inLinearVelocity) const + ///
+ ///
+ /// + /// + /// This function will return true if the character has moved into a slope that is too steep (e.g. a vertical wall). + /// You would call WalkStairs to attempt to step up stairs. + /// @param inLinearVelocity The linear velocity that the player desired. This is used to determine if we're pushing into a step. + /// + /// + public bool CanWalkStairs(float3 linearVelocity) => + Jolt.PInvoke.CharacterVirtual_CanWalkStairs(this, linearVelocity); + + /// + /// + /// When stair walking is needed, you can call the WalkStairs function to cast up, forward and down again to + /// try to find a valid position + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:414 + ///
+ /// bool WalkStairs(float inDeltaTime, Vec3Arg inStepUp, Vec3Arg inStepForward, Vec3Arg inStepForwardTest, Vec3Arg inStepDownExtra, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// When stair walking is needed, you can call the WalkStairs function to cast up, forward and down again to try to find a valid position + /// @param inDeltaTime Time step to simulate. + /// @param inStepUp The direction and distance to step up (this corresponds to the max step height) + /// @param inStepForward The direction and distance to step forward after the step up + /// @param inStepForwardTest When running at a high frequency, inStepForward can be very small and it's likely that you hit the side of the stairs on the way down. This could produce a normal that violates the max slope angle. If this happens, we test again using this distance from the up position to see if we find a valid slope. + /// @param inStepDownExtra An additional translation that is added when stepping down at the end. Allows you to step further down than up. Set to zero if you don't want this. Should be in the opposite direction of up. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns. + /// @return true if the stair walk was successful + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public bool WalkStairs( + float deltaTime, + float3 stepUp, + float3 stepForward, + float3 stepForwardTest, + float3 stepDownExtra, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ) => + Jolt.PInvoke.CharacterVirtual_WalkStairs( + this, + deltaTime, + stepUp, + stepForward, + stepForwardTest, + stepDownExtra, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter, + allocator + ); + + /// + /// + /// This function can be used to artificially keep the character to the floor. Normally when a character is + /// on a small step and starts moving horizontally, the character will lose contact with the floor because + /// the initial vertical velocity is zero while the horizontal velocity is quite high. To prevent the + /// character from losing contact with the floor, we do an additional collision check downwards and if we + /// find the floor within a certain distance, we project the character onto the floor. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:426 + ///
+ /// bool StickToFloor(Vec3Arg inStepDown, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// This function can be used to artificially keep the character to the floor. Normally when a character is on a small step and starts moving horizontally, the character will + /// lose contact with the floor because the initial vertical velocity is zero while the horizontal velocity is quite high. To prevent the character from losing contact with the floor, + /// we do an additional collision check downwards and if we find the floor within a certain distance, we project the character onto the floor. + /// @param inStepDown Max amount to project the character downwards (if no floor is found within this distance, the function will return false) + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns. + /// @return True if the character was successfully projected onto the floor. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public bool StickToFloor( + float3 stepDown, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ) => + Jolt.PInvoke.CharacterVirtual_StickToFloor( + this, + stepDown, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter, + allocator + ); + + /// + /// + /// This function combines Update, StickToFloor and WalkStairs. This function serves as an example of how + /// these functions could be combined. Before calling, call SetLinearVelocity to update the + /// horizontal/vertical speed of the character, typically this is: - When on OnGround and not moving away + /// from ground: velocity = GetGroundVelocity() + horizontal speed as input by player + optional vertical + /// jump velocity + delta time * gravity - Else: velocity = current vertical velocity + horizontal speed as + /// input by player + delta time * gravity + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:451 + ///
+ /// void ExtendedUpdate(float inDeltaTime, Vec3Arg inGravity, const ExtendedUpdateSettings &inSettings, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// This function combines Update, StickToFloor and WalkStairs. This function serves as an example of how these functions could be combined. + /// Before calling, call SetLinearVelocity to update the horizontal/vertical speed of the character, typically this is: + /// - When on OnGround and not moving away from ground: velocity = GetGroundVelocity() + horizontal speed as input by player + optional vertical jump velocity + delta time * gravity + /// - Else: velocity = current vertical velocity + horizontal speed as input by player + delta time * gravity + /// @param inDeltaTime Time step to simulate. + /// @param inGravity Gravity vector (m/s^2). This gravity vector is only used when the character is standing on top of another object to apply downward force. + /// @param inSettings A structure containing settings for the algorithm. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public void ExtendedUpdate( + float deltaTime, + float3 gravity, + in CharacterVirtual.ExtendedUpdateSettings settings, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ) => + Jolt.PInvoke.CharacterVirtual_ExtendedUpdate( + this, + deltaTime, + gravity, + in settings, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter, + allocator + ); + + /// + /// + /// This function can be used after a character has teleported to determine the new contacts with the world. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:454 + ///
+ /// void RefreshContacts(const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public void RefreshContacts( + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ) => + Jolt.PInvoke.CharacterVirtual_RefreshContacts( + this, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter, + allocator + ); + + /// + /// + /// Use the ground body ID to get an updated estimate of the ground velocity. This function can be used if + /// the ground body has moved / changed velocity and you want a new estimate of the ground velocity. It will + /// not perform collision detection, so is less accurate than RefreshContacts but a lot faster. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:458 + ///
+ /// void UpdateGroundVelocity() + ///
+ ///
+ public void UpdateGroundVelocity() => Jolt.PInvoke.CharacterVirtual_UpdateGroundVelocity(this); + + /// + /// + /// Switch the shape of the character (e.g. for stance). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:469 + ///
+ /// bool SetShape(const Shape *inShape, float inMaxPenetrationDepth, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// Switch the shape of the character (e.g. for stance). + /// @param inShape The shape to switch to. + /// @param inMaxPenetrationDepth When inMaxPenetrationDepth is not FLT_MAX, it checks if the new shape collides before switching shape. This is the max penetration we're willing to accept after the switch. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// @param inAllocator An allocator for temporary allocations. All memory will be freed by the time this function returns. + /// @return Returns true if the switch succeeded. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public bool SetShape( + Shape shape, + float maxPenetrationDepth, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ) => + Jolt.PInvoke.CharacterVirtual_SetShape( + this, + shape, + maxPenetrationDepth, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter, + allocator + ); + + /// + /// + /// Updates the shape of the inner rigid body. Should be called after a successful call to SetShape. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:472 + ///
+ /// void SetInnerBodyShape(const Shape *inShape) + ///
+ ///
+ public void SetInnerBodyShape(Shape shape) => Jolt.PInvoke.CharacterVirtual_SetInnerBodyShape(this, shape); + + /// + /// + /// Get the transformed shape that represents the volume of the character, can be used for collision checks. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:475 + ///
+ /// TransformedShape GetTransformedShape() const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public TransformedShape GetTransformedShape() => Jolt.PInvoke.CharacterVirtual_GetTransformedShape(this); + + /// + /// + /// Get all contacts for the character at a particular location. When colliding with another character + /// virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a + /// hit. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:490 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location. + /// When colliding with another character virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a hit. + /// @param inPosition Position to test, note that this position will be corrected for the character padding. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// + /// + /// Collects every hit into checkcollisionresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public unsafe uint CheckCollision( + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CharacterVirtual_CheckCollision( + this, + position, + rotation, + movementDirection, + maxSeparationDistance, + shape, + baseOffset, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get all contacts for the character at a particular location. When colliding with another character + /// virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a + /// hit. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:490 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location. + /// When colliding with another character virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a hit. + /// @param inPosition Position to test, note that this position will be corrected for the character padding. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public bool CheckCollisionClosest( + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + out CollideShapeResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ) => + Jolt.PInvoke.CharacterVirtual_CheckCollisionClosest( + this, + position, + rotation, + movementDirection, + maxSeparationDistance, + shape, + baseOffset, + out result, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ) != 0; + + /// + /// + /// Get the character settings that can recreate this character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:493 + ///
+ /// CharacterVirtualSettings GetCharacterVirtualSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public CharacterVirtualSettings GetCharacterVirtualSettings() => + Jolt.PInvoke.CharacterVirtual_GetCharacterVirtualSettings(this); + + /// + public void SaveState(StateRecorder stream) => ((CharacterBase)this).SaveState(stream); + + /// + public void RestoreState(StateRecorder stream) => ((CharacterBase)this).RestoreState(stream); + + /// + /// + /// Access to the internal list of contacts that the character has found. Note that only contacts that have + /// their mHadCollision flag set are actual contacts. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:511 + ///
+ /// const ContactList & GetActiveContacts() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetActiveContacts() + { + Jolt.PInvoke.CharacterVirtual_GetActiveContacts(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Check if the character is currently in contact with or has collided with another body in the last + /// operation (e.g. Update or WalkStairs) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:514 + ///
+ /// bool HasCollidedWith(const BodyID &inBody) const + ///
+ ///
+ public bool HasCollidedWith(uint body) => Jolt.PInvoke.CharacterVirtual_HasCollidedWith(this, body); + + /// + /// + /// Check if the character is currently in contact with or has collided with another character in the last + /// time step (e.g. Update or WalkStairs) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:532 + ///
+ /// bool HasCollidedWith(const CharacterVirtual *inCharacter) const + ///
+ ///
+ public bool HasCollidedWith(CharacterVirtual character) => + Jolt.PInvoke.CharacterVirtual_HasCollidedWith_2(this, character); + + /// + /// + /// Draw the current state of the constraints for iteration 0 when creating them + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:500 + ///
+ /// static inline bool sDrawConstraints = false + ///
+ ///
+ public static bool GetDrawConstraints() => Jolt.PInvoke.CharacterVirtual_GetDrawConstraints(); + + /// + /// + /// Draw the current state of the constraints for iteration 0 when creating them + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:500 + ///
+ /// static inline bool sDrawConstraints = false + ///
+ ///
+ public static void SetDrawConstraints(bool value) => Jolt.PInvoke.CharacterVirtual_SetDrawConstraints(value); + + /// + /// + /// Draw the state of the walk stairs algorithm + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:501 + ///
+ /// static inline bool sDrawWalkStairs = false + ///
+ ///
+ public static bool GetDrawWalkStairs() => Jolt.PInvoke.CharacterVirtual_GetDrawWalkStairs(); + + /// + /// + /// Draw the state of the walk stairs algorithm + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:501 + ///
+ /// static inline bool sDrawWalkStairs = false + ///
+ ///
+ public static void SetDrawWalkStairs(bool value) => Jolt.PInvoke.CharacterVirtual_SetDrawWalkStairs(value); + + /// + /// + /// Draw the state of the stick to floor algorithm + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:502 + ///
+ /// static inline bool sDrawStickToFloor = false + ///
+ ///
+ public static bool GetDrawStickToFloor() => Jolt.PInvoke.CharacterVirtual_GetDrawStickToFloor(); + + /// + /// + /// Draw the state of the stick to floor algorithm + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:502 + ///
+ /// static inline bool sDrawStickToFloor = false + ///
+ ///
+ public static void SetDrawStickToFloor(bool value) => Jolt.PInvoke.CharacterVirtual_SetDrawStickToFloor(value); + + /// + /// + /// Draw the supporting volume plane + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:503 + ///
+ /// static inline bool sDrawSupportingVolume = false + ///
+ ///
+ public static bool GetDrawSupportingVolume() => Jolt.PInvoke.CharacterVirtual_GetDrawSupportingVolume(); + + /// + /// + /// Draw the supporting volume plane + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:503 + ///
+ /// static inline bool sDrawSupportingVolume = false + ///
+ ///
+ public static void SetDrawSupportingVolume(bool value) => + Jolt.PInvoke.CharacterVirtual_SetDrawSupportingVolume(value); + + public void AddRef() => ((CharacterBase)this).AddRef(); + + public void Release() => ((CharacterBase)this).Release(); + + public uint GetRefCount() => ((CharacterBase)this).GetRefCount(); + + public static implicit operator CharacterBase(CharacterVirtual value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetMaxSlopeAngle(float maxSlopeAngle) => ((CharacterBase)this).SetMaxSlopeAngle(maxSlopeAngle); + + /// + public float GetCosMaxSlopeAngle() => ((CharacterBase)this).GetCosMaxSlopeAngle(); + + /// + public void SetUp(float3 up) => ((CharacterBase)this).SetUp(up); + + /// + public float3 GetUp() => ((CharacterBase)this).GetUp(); + + /// + public Plane GetSupportingVolume() => ((CharacterBase)this).GetSupportingVolume(); + + /// + public void SetSupportingVolume(in Plane plane) => ((CharacterBase)this).SetSupportingVolume(in plane); + + /// + public bool IsSlopeTooSteep(float3 normal) => ((CharacterBase)this).IsSlopeTooSteep(normal); + + /// + public Shape GetShape() => ((CharacterBase)this).GetShape(); + + /// + public CharacterBase.GroundState GetGroundState() => ((CharacterBase)this).GetGroundState(); + + /// + public bool IsSupported() => ((CharacterBase)this).IsSupported(); + + /// + public float3 GetGroundPosition() => ((CharacterBase)this).GetGroundPosition(); + + /// + public float3 GetGroundNormal() => ((CharacterBase)this).GetGroundNormal(); + + /// + public float3 GetGroundVelocity() => ((CharacterBase)this).GetGroundVelocity(); + + /// + public PhysicsMaterial GetGroundMaterial() => ((CharacterBase)this).GetGroundMaterial(); + + /// + public uint GetGroundBodyID() => ((CharacterBase)this).GetGroundBodyID(); + + /// + public uint GetGroundSubShapeID() => ((CharacterBase)this).GetGroundSubShapeID(); + + /// + public ulong GetGroundUserData() => ((CharacterBase)this).GetGroundUserData(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterVirtualSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterVirtualSettings.gen.cs new file mode 100644 index 0000000..4c4905b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterVirtualSettings.gen.cs @@ -0,0 +1,591 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Contains the configuration of a character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:23 + ///
+ /// class CharacterVirtualSettings : public CharacterBaseSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterVirtualSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:29 + ///
+ /// CharacterVirtualSettings() = default + ///
+ ///
+ public static CharacterVirtualSettings Create() => Jolt.PInvoke.CharacterVirtualSettings_Create(); + + /// + /// + /// ID to give to this character. This is used for deterministically sorting and as an identifier to + /// represent the character in the contact removal callback. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:34 + ///
+ /// CharacterID mID = CharacterID::sNextCharacterID() + ///
+ ///
+ public uint GetID() => Jolt.PInvoke.CharacterVirtualSettings_GetID(this); + + /// + /// + /// ID to give to this character. This is used for deterministically sorting and as an identifier to + /// represent the character in the contact removal callback. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:34 + ///
+ /// CharacterID mID = CharacterID::sNextCharacterID() + ///
+ ///
+ public void SetID(uint value) => Jolt.PInvoke.CharacterVirtualSettings_SetID(this, value); + + /// + /// + /// Character mass (kg). Used to push down objects with gravity when the character is standing on top. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:37 + ///
+ /// float mMass = 70.0f + ///
+ ///
+ public float GetMass() => Jolt.PInvoke.CharacterVirtualSettings_GetMass(this); + + /// + /// + /// Character mass (kg). Used to push down objects with gravity when the character is standing on top. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:37 + ///
+ /// float mMass = 70.0f + ///
+ ///
+ public void SetMass(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetMass(this, value); + + /// + /// + /// Maximum force with which the character can push other bodies (N). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:40 + ///
+ /// float mMaxStrength = 100.0f + ///
+ ///
+ public float GetMaxStrength() => Jolt.PInvoke.CharacterVirtualSettings_GetMaxStrength(this); + + /// + /// + /// Maximum force with which the character can push other bodies (N). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:40 + ///
+ /// float mMaxStrength = 100.0f + ///
+ ///
+ public void SetMaxStrength(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetMaxStrength(this, value); + + /// + /// + /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape + /// in local space. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:43 + ///
+ /// Vec3 mShapeOffset = Vec3::sZero() + ///
+ ///
+ public float3 GetShapeOffset() => Jolt.PInvoke.CharacterVirtualSettings_GetShapeOffset(this); + + /// + /// + /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape + /// in local space. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:43 + ///
+ /// Vec3 mShapeOffset = Vec3::sZero() + ///
+ ///
+ public void SetShapeOffset(float3 value) => Jolt.PInvoke.CharacterVirtualSettings_SetShapeOffset(this, value); + + /// + /// + /// When colliding with back faces, the character will not be able to move through back facing triangles. + /// Use this if you have triangles that need to collide on both sides. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:46 + ///
+ /// EBackFaceMode mBackFaceMode = EBackFaceMode::CollideWithBackFaces + ///
+ ///
+ /// + /// + /// @name Movement settings + /// + /// + public BackFaceMode GetBackFaceMode() => Jolt.PInvoke.CharacterVirtualSettings_GetBackFaceMode(this); + + /// + /// + /// When colliding with back faces, the character will not be able to move through back facing triangles. + /// Use this if you have triangles that need to collide on both sides. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:46 + ///
+ /// EBackFaceMode mBackFaceMode = EBackFaceMode::CollideWithBackFaces + ///
+ ///
+ /// + /// + /// @name Movement settings + /// + /// + public void SetBackFaceMode(BackFaceMode value) => + Jolt.PInvoke.CharacterVirtualSettings_SetBackFaceMode(this, value); + + /// + /// + /// How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the + /// character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too + /// high will cause ghost collisions. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:47 + ///
+ /// float mPredictiveContactDistance = 0.1f + ///
+ ///
+ public float GetPredictiveContactDistance() => + Jolt.PInvoke.CharacterVirtualSettings_GetPredictiveContactDistance(this); + + /// + /// + /// How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the + /// character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too + /// high will cause ghost collisions. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:47 + ///
+ /// float mPredictiveContactDistance = 0.1f + ///
+ ///
+ public void SetPredictiveContactDistance(float value) => + Jolt.PInvoke.CharacterVirtualSettings_SetPredictiveContactDistance(this, value); + + /// + /// + /// Max amount of collision loops + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:48 + ///
+ /// uint mMaxCollisionIterations = 5 + ///
+ ///
+ public uint GetMaxCollisionIterations() => + Jolt.PInvoke.CharacterVirtualSettings_GetMaxCollisionIterations(this); + + /// + /// + /// Max amount of collision loops + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:48 + ///
+ /// uint mMaxCollisionIterations = 5 + ///
+ ///
+ public void SetMaxCollisionIterations(uint value) => + Jolt.PInvoke.CharacterVirtualSettings_SetMaxCollisionIterations(this, value); + + /// + /// + /// How often to try stepping in the constraint solving + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:49 + ///
+ /// uint mMaxConstraintIterations = 15 + ///
+ ///
+ public uint GetMaxConstraintIterations() => + Jolt.PInvoke.CharacterVirtualSettings_GetMaxConstraintIterations(this); + + /// + /// + /// How often to try stepping in the constraint solving + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:49 + ///
+ /// uint mMaxConstraintIterations = 15 + ///
+ ///
+ public void SetMaxConstraintIterations(uint value) => + Jolt.PInvoke.CharacterVirtualSettings_SetMaxConstraintIterations(this, value); + + /// + /// + /// Early out condition: If this much time is left to simulate we are done + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:50 + ///
+ /// float mMinTimeRemaining = 1.0e-4f + ///
+ ///
+ public float GetMinTimeRemaining() => Jolt.PInvoke.CharacterVirtualSettings_GetMinTimeRemaining(this); + + /// + /// + /// Early out condition: If this much time is left to simulate we are done + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:50 + ///
+ /// float mMinTimeRemaining = 1.0e-4f + ///
+ ///
+ public void SetMinTimeRemaining(float value) => + Jolt.PInvoke.CharacterVirtualSettings_SetMinTimeRemaining(this, value); + + /// + /// + /// How far we're willing to penetrate geometry + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:51 + ///
+ /// float mCollisionTolerance = 1.0e-3f + ///
+ ///
+ public float GetCollisionTolerance() => Jolt.PInvoke.CharacterVirtualSettings_GetCollisionTolerance(this); + + /// + /// + /// How far we're willing to penetrate geometry + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:51 + ///
+ /// float mCollisionTolerance = 1.0e-3f + ///
+ ///
+ public void SetCollisionTolerance(float value) => + Jolt.PInvoke.CharacterVirtualSettings_SetCollisionTolerance(this, value); + + /// + /// + /// How far we try to stay away from the geometry, this ensures that the sweep will hit as little as + /// possible lowering the collision cost and reducing the risk of getting stuck + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:52 + ///
+ /// float mCharacterPadding = 0.02f + ///
+ ///
+ public float GetCharacterPadding() => Jolt.PInvoke.CharacterVirtualSettings_GetCharacterPadding(this); + + /// + /// + /// How far we try to stay away from the geometry, this ensures that the sweep will hit as little as + /// possible lowering the collision cost and reducing the risk of getting stuck + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:52 + ///
+ /// float mCharacterPadding = 0.02f + ///
+ ///
+ public void SetCharacterPadding(float value) => + Jolt.PInvoke.CharacterVirtualSettings_SetCharacterPadding(this, value); + + /// + /// + /// Max num hits to collect in order to avoid excess of contact points collection + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:53 + ///
+ /// uint mMaxNumHits = 256 + ///
+ ///
+ public uint GetMaxNumHits() => Jolt.PInvoke.CharacterVirtualSettings_GetMaxNumHits(this); + + /// + /// + /// Max num hits to collect in order to avoid excess of contact points collection + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:53 + ///
+ /// uint mMaxNumHits = 256 + ///
+ ///
+ public void SetMaxNumHits(uint value) => Jolt.PInvoke.CharacterVirtualSettings_SetMaxNumHits(this, value); + + /// + /// + /// Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be + /// merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:54 + ///
+ /// float mHitReductionCosMaxAngle = 0.999f + ///
+ ///
+ public float GetHitReductionCosMaxAngle() => + Jolt.PInvoke.CharacterVirtualSettings_GetHitReductionCosMaxAngle(this); + + /// + /// + /// Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be + /// merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:54 + ///
+ /// float mHitReductionCosMaxAngle = 0.999f + ///
+ ///
+ public void SetHitReductionCosMaxAngle(float value) => + Jolt.PInvoke.CharacterVirtualSettings_SetHitReductionCosMaxAngle(this, value); + + /// + /// + /// This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in + /// one update + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:55 + ///
+ /// float mPenetrationRecoverySpeed = 1.0f + ///
+ ///
+ public float GetPenetrationRecoverySpeed() => + Jolt.PInvoke.CharacterVirtualSettings_GetPenetrationRecoverySpeed(this); + + /// + /// + /// This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in + /// one update + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:55 + ///
+ /// float mPenetrationRecoverySpeed = 1.0f + ///
+ ///
+ public void SetPenetrationRecoverySpeed(float value) => + Jolt.PInvoke.CharacterVirtualSettings_SetPenetrationRecoverySpeed(this, value); + + /// + /// + /// This character can optionally have an inner rigid body. This rigid body can be used to give the + /// character presence in the world. When set it means that: - Regular collision checks (e.g. + /// NarrowPhaseQuery::CastRay) will collide with the rigid body (they cannot collide with CharacterVirtual + /// since it is not added to the broad phase) - Regular contact callbacks will be called through the + /// ContactListener (next to the ones that will be passed to the CharacterContactListener) - Fast moving + /// objects of motion quality LinearCast will not be able to pass through the CharacterVirtual in 1 time + /// step + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:61 + ///
+ /// RefConst<Shape> mInnerBodyShape + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetInnerBodyShape() => Jolt.PInvoke.CharacterVirtualSettings_GetInnerBodyShape(this); + + /// + /// + /// This character can optionally have an inner rigid body. This rigid body can be used to give the + /// character presence in the world. When set it means that: - Regular collision checks (e.g. + /// NarrowPhaseQuery::CastRay) will collide with the rigid body (they cannot collide with CharacterVirtual + /// since it is not added to the broad phase) - Regular contact callbacks will be called through the + /// ContactListener (next to the ones that will be passed to the CharacterContactListener) - Fast moving + /// objects of motion quality LinearCast will not be able to pass through the CharacterVirtual in 1 time + /// step + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:61 + ///
+ /// RefConst<Shape> mInnerBodyShape + ///
+ ///
+ public void SetInnerBodyShape(Shape value) => + Jolt.PInvoke.CharacterVirtualSettings_SetInnerBodyShape(this, value); + + /// + /// + /// For a deterministic simulation, it is important to have a deterministic body ID. When set and when + /// mInnerBodyShape is specified, the inner body will be created with this specified ID instead of a + /// generated ID. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:65 + ///
+ /// BodyID mInnerBodyIDOverride + ///
+ ///
+ public uint GetInnerBodyIDOverride() => Jolt.PInvoke.CharacterVirtualSettings_GetInnerBodyIDOverride(this); + + /// + /// + /// For a deterministic simulation, it is important to have a deterministic body ID. When set and when + /// mInnerBodyShape is specified, the inner body will be created with this specified ID instead of a + /// generated ID. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:65 + ///
+ /// BodyID mInnerBodyIDOverride + ///
+ ///
+ public void SetInnerBodyIDOverride(uint value) => + Jolt.PInvoke.CharacterVirtualSettings_SetInnerBodyIDOverride(this, value); + + /// + /// + /// Layer that the inner rigid body will be added to + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:68 + ///
+ /// ObjectLayer mInnerBodyLayer = 0 + ///
+ ///
+ public ushort GetInnerBodyLayer() => Jolt.PInvoke.CharacterVirtualSettings_GetInnerBodyLayer(this); + + /// + /// + /// Layer that the inner rigid body will be added to + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:68 + ///
+ /// ObjectLayer mInnerBodyLayer = 0 + ///
+ ///
+ public void SetInnerBodyLayer(ushort value) => + Jolt.PInvoke.CharacterVirtualSettings_SetInnerBodyLayer(this, value); + + public void AddRef() => ((CharacterBaseSettings)this).AddRef(); + + public void Release() => ((CharacterBaseSettings)this).Release(); + + public uint GetRefCount() => ((CharacterBaseSettings)this).GetRefCount(); + + public static implicit operator CharacterBaseSettings(CharacterVirtualSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public float3 GetUp() => ((CharacterBaseSettings)this).GetUp(); + + /// + public void SetUp(float3 value) => ((CharacterBaseSettings)this).SetUp(value); + + /// + public Plane GetSupportingVolume() => ((CharacterBaseSettings)this).GetSupportingVolume(); + + /// + public void SetSupportingVolume(Plane value) => ((CharacterBaseSettings)this).SetSupportingVolume(value); + + /// + public float GetMaxSlopeAngle() => ((CharacterBaseSettings)this).GetMaxSlopeAngle(); + + /// + public void SetMaxSlopeAngle(float value) => ((CharacterBaseSettings)this).SetMaxSlopeAngle(value); + + /// + public bool GetEnhancedInternalEdgeRemoval() => ((CharacterBaseSettings)this).GetEnhancedInternalEdgeRemoval(); + + /// + public void SetEnhancedInternalEdgeRemoval(bool value) => + ((CharacterBaseSettings)this).SetEnhancedInternalEdgeRemoval(value); + + /// + public Shape GetShape() => ((CharacterBaseSettings)this).GetShape(); + + /// + public void SetShape(Shape value) => ((CharacterBaseSettings)this).SetShape(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollision.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollision.gen.cs new file mode 100644 index 0000000..3bfee7e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollision.gen.cs @@ -0,0 +1,215 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Interface class that allows a CharacterVirtual to check collision with other CharacterVirtual instances. + /// Since CharacterVirtual instances are not registered anywhere, it is up to the application to test collision + /// against relevant characters. The characters could be stored in a tree structure to make this more efficient. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:219 + ///
+ /// class CharacterVsCharacterCollision : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterVsCharacterCollision + { + /// + /// + /// Collide a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:230 + ///
+ /// virtual void CollideCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Collide a character against other CharacterVirtuals. + /// @param inCharacter The character to collide. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inCollideShapeSettings Settings for the collision check. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Collects every hit into collidecharacterresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public unsafe uint CollideCharacter( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + Span results, + out uint totalHits + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CharacterVsCharacterCollision_CollideCharacter( + this, + character, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collide a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:230 + ///
+ /// virtual void CollideCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Collide a character against other CharacterVirtuals. + /// @param inCharacter The character to collide. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inCollideShapeSettings Settings for the collision check. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CollideCharacterClosest( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result + ) => + Jolt.PInvoke.CharacterVsCharacterCollision_CollideCharacterClosest( + this, + character, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + out result + ) != 0; + + /// + /// + /// Cast a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:239 + ///
+ /// virtual void CastCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Cast a character against other CharacterVirtuals. + /// @param inCharacter The character to cast. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inDirection Direction and length to cast in. + /// @param inShapeCastSettings Settings for the shape cast. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Collects every hit into castcharacterresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public unsafe uint CastCharacter( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + float3 direction, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + Span results, + out uint totalHits + ) + { + fixed (ShapeCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CharacterVsCharacterCollision_CastCharacter( + this, + character, + in centerOfMassTransform, + direction, + shapeCastSettings, + baseOffset, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:239 + ///
+ /// virtual void CastCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Cast a character against other CharacterVirtuals. + /// @param inCharacter The character to cast. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inDirection Direction and length to cast in. + /// @param inShapeCastSettings Settings for the shape cast. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastCharacterClosest( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + float3 direction, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result + ) => + Jolt.PInvoke.CharacterVsCharacterCollision_CastCharacterClosest( + this, + character, + in centerOfMassTransform, + direction, + shapeCastSettings, + baseOffset, + out result + ) != 0; + } +} diff --git a/Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollisionSimple.gen.cs b/Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollisionSimple.gen.cs new file mode 100644 index 0000000..719602b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CharacterVsCharacterCollisionSimple.gen.cs @@ -0,0 +1,162 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Simple collision checker that loops over all registered characters. This is a brute force checking + /// algorithm. If you have a lot of characters you may want to store your characters in a hierarchical structure + /// to make this more efficient. Note that this is not thread safe, so make sure that only one CharacterVirtual + /// is checking collision at a time. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:246 + ///
+ /// class CharacterVsCharacterCollisionSimple : public CharacterVsCharacterCollision + ///
+ ///
+ [InteropHandle] + public readonly partial struct CharacterVsCharacterCollisionSimple : IDisposable + { + public static CharacterVsCharacterCollisionSimple Create() => + Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Create(); + + /// + /// + /// Add a character to the list of characters to check collision against. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:250 + ///
+ /// void Add(CharacterVirtual *inCharacter) + ///
+ ///
+ public void Add(CharacterVirtual character) => + Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Add(this, character); + + /// + /// + /// Remove a character from the list of characters to check collision against. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:253 + ///
+ /// void Remove(const CharacterVirtual *inCharacter) + ///
+ ///
+ public void Remove(CharacterVirtual character) => + Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Remove(this, character); + + /// + public unsafe uint CollideCharacter( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + Span results, + out uint totalHits + ) => + ((CharacterVsCharacterCollision)this).CollideCharacter( + character, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + results, + out totalHits + ); + + /// + public bool CollideCharacterClosest( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result + ) => + ((CharacterVsCharacterCollision)this).CollideCharacterClosest( + character, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + out result + ); + + /// + public unsafe uint CastCharacter( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + float3 direction, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + Span results, + out uint totalHits + ) => + ((CharacterVsCharacterCollision)this).CastCharacter( + character, + in centerOfMassTransform, + direction, + shapeCastSettings, + baseOffset, + results, + out totalHits + ); + + /// + public bool CastCharacterClosest( + CharacterVirtual character, + in float4x4 centerOfMassTransform, + float3 direction, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result + ) => + ((CharacterVsCharacterCollision)this).CastCharacterClosest( + character, + in centerOfMassTransform, + direction, + shapeCastSettings, + baseOffset, + out result + ); + + /// + /// + /// The list of characters to check collision against + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:259 + ///
+ /// Array<CharacterVirtual *> mCharacters + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. The handles in it are borrowed from the + /// object that owns them: don't Dispose them, and don't read them once that owner is gone - the buffer + /// keeps the pointers alive, not the objects. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetCharacters() + { + Jolt.PInvoke.CharacterVsCharacterCollisionSimple_GetCharacters(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + public static implicit operator CharacterVsCharacterCollision(CharacterVsCharacterCollisionSimple value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.CharacterVsCharacterCollisionSimple_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollideConvexVsTriangles.gen.cs b/Brutal.Jolt/Generated/Classes/CollideConvexVsTriangles.gen.cs new file mode 100644 index 0000000..8a4a5de --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollideConvexVsTriangles.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision detection helper that collides a convex object vs one or more triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideConvexVsTriangles.h:17 + ///
+ /// class CollideConvexVsTriangles + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollideConvexVsTriangles + { + /// + /// + /// Collide convex object with a single triangle + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideConvexVsTriangles.h:36 + ///
+ /// void Collide(Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2) + ///
+ ///
+ /// + /// + /// Collide convex object with a single triangle + /// @param inV0 , inV1 , inV2: CCW triangle vertices + /// @param inActiveEdges bit 0 = edge v0..v1 is active, bit 1 = edge v1..v2 is active, bit 2 = edge v2..v0 is active + /// An active edge is an edge that is not connected to another triangle in such a way that it is impossible to collide with the edge + /// @param inSubShapeID2 The sub shape ID for the triangle + /// + /// + public void Collide(float3 v0, float3 v1, float3 v2, byte activeEdges, uint subShapeID2) => + Jolt.PInvoke.CollideConvexVsTriangles_Collide(this, v0, v1, v2, activeEdges, subShapeID2); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollideSettingsBase.gen.cs b/Brutal.Jolt/Generated/Classes/CollideSettingsBase.gen.cs new file mode 100644 index 0000000..feb9fc8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollideSettingsBase.gen.cs @@ -0,0 +1,175 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings to be passed with a collision query + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:71 + ///
+ /// class CollideSettingsBase + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollideSettingsBase : IDisposable + { + public static CollideSettingsBase Create() => Jolt.PInvoke.CollideSettingsBase_Create(); + + /// + /// + /// How active edges (edges that a moving object should bump into) are handled + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:77 + ///
+ /// EActiveEdgeMode mActiveEdgeMode = EActiveEdgeMode::CollideOnlyWithActive + ///
+ ///
+ public ActiveEdgeMode GetActiveEdgeMode() => Jolt.PInvoke.CollideSettingsBase_GetActiveEdgeMode(this); + + /// + /// + /// How active edges (edges that a moving object should bump into) are handled + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:77 + ///
+ /// EActiveEdgeMode mActiveEdgeMode = EActiveEdgeMode::CollideOnlyWithActive + ///
+ ///
+ public void SetActiveEdgeMode(ActiveEdgeMode value) => + Jolt.PInvoke.CollideSettingsBase_SetActiveEdgeMode(this, value); + + /// + /// + /// If colliding faces should be collected or only the collision point + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:80 + ///
+ /// ECollectFacesMode mCollectFacesMode = ECollectFacesMode::NoFaces + ///
+ ///
+ public CollectFacesMode GetCollectFacesMode() => Jolt.PInvoke.CollideSettingsBase_GetCollectFacesMode(this); + + /// + /// + /// If colliding faces should be collected or only the collision point + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:80 + ///
+ /// ECollectFacesMode mCollectFacesMode = ECollectFacesMode::NoFaces + ///
+ ///
+ public void SetCollectFacesMode(CollectFacesMode value) => + Jolt.PInvoke.CollideSettingsBase_SetCollectFacesMode(this, value); + + /// + /// + /// If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: + /// meter) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:83 + ///
+ /// float mCollisionTolerance = cDefaultCollisionTolerance + ///
+ ///
+ public float GetCollisionTolerance() => Jolt.PInvoke.CollideSettingsBase_GetCollisionTolerance(this); + + /// + /// + /// If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: + /// meter) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:83 + ///
+ /// float mCollisionTolerance = cDefaultCollisionTolerance + ///
+ ///
+ public void SetCollisionTolerance(float value) => + Jolt.PInvoke.CollideSettingsBase_SetCollisionTolerance(this, value); + + /// + /// + /// A factor that determines the accuracy of the penetration depth calculation. If the change of the squared + /// distance is less than tolerance * current_penetration_depth^2 the algorithm will terminate. (unit: + /// dimensionless) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:86 + ///
+ /// float mPenetrationTolerance = cDefaultPenetrationTolerance + ///
+ ///
+ public float GetPenetrationTolerance() => Jolt.PInvoke.CollideSettingsBase_GetPenetrationTolerance(this); + + /// + /// + /// A factor that determines the accuracy of the penetration depth calculation. If the change of the squared + /// distance is less than tolerance * current_penetration_depth^2 the algorithm will terminate. (unit: + /// dimensionless) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:86 + ///
+ /// float mPenetrationTolerance = cDefaultPenetrationTolerance + ///
+ ///
+ public void SetPenetrationTolerance(float value) => + Jolt.PInvoke.CollideSettingsBase_SetPenetrationTolerance(this, value); + + /// + /// + /// When mActiveEdgeMode is CollideOnlyWithActive a movement direction can be provided. When hitting an + /// inactive edge, the system will select the triangle normal as penetration depth only if it impedes the + /// movement less than with the calculated penetration depth. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:89 + ///
+ /// Vec3 mActiveEdgeMovementDirection = Vec3::sZero() + ///
+ ///
+ public float3 GetActiveEdgeMovementDirection() => + Jolt.PInvoke.CollideSettingsBase_GetActiveEdgeMovementDirection(this); + + /// + /// + /// When mActiveEdgeMode is CollideOnlyWithActive a movement direction can be provided. When hitting an + /// inactive edge, the system will select the triangle normal as penetration depth only if it impedes the + /// movement less than with the calculated penetration depth. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:89 + ///
+ /// Vec3 mActiveEdgeMovementDirection = Vec3::sZero() + ///
+ ///
+ public void SetActiveEdgeMovementDirection(float3 value) => + Jolt.PInvoke.CollideSettingsBase_SetActiveEdgeMovementDirection(this, value); + + public void Dispose() => Jolt.PInvoke.CollideSettingsBase_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollideShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CollideShapeSettings.gen.cs new file mode 100644 index 0000000..a258672 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollideShapeSettings.gen.cs @@ -0,0 +1,154 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings to be passed with a collision query + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:93 + ///
+ /// class CollideShapeSettings : public CollideSettingsBase + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollideShapeSettings : IDisposable + { + public static CollideShapeSettings Create() => Jolt.PInvoke.CollideShapeSettings_Create(); + + /// + /// + /// When > 0 contacts in the vicinity of the query shape can be found. All nearest contacts that are not + /// further away than this distance will be found. Note that in this case + /// CollideShapeResult::mPenetrationDepth can become negative to indicate that objects are not overlapping. + /// (unit: meter) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:100 + ///
+ /// float mMaxSeparationDistance = 0.0f + ///
+ ///
+ public float GetMaxSeparationDistance() => Jolt.PInvoke.CollideShapeSettings_GetMaxSeparationDistance(this); + + /// + /// + /// When > 0 contacts in the vicinity of the query shape can be found. All nearest contacts that are not + /// further away than this distance will be found. Note that in this case + /// CollideShapeResult::mPenetrationDepth can become negative to indicate that objects are not overlapping. + /// (unit: meter) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:100 + ///
+ /// float mMaxSeparationDistance = 0.0f + ///
+ ///
+ public void SetMaxSeparationDistance(float value) => + Jolt.PInvoke.CollideShapeSettings_SetMaxSeparationDistance(this, value); + + /// + /// + /// How backfacing triangles should be treated + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:103 + ///
+ /// EBackFaceMode mBackFaceMode = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public BackFaceMode GetBackFaceMode() => Jolt.PInvoke.CollideShapeSettings_GetBackFaceMode(this); + + /// + /// + /// How backfacing triangles should be treated + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:103 + ///
+ /// EBackFaceMode mBackFaceMode = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public void SetBackFaceMode(BackFaceMode value) => + Jolt.PInvoke.CollideShapeSettings_SetBackFaceMode(this, value); + + /// + /// + /// Max squared distance to consider a vertex to be the same as another vertex, used by the internal edge + /// removal algorithm to determine if two edges are shared. (unit: meter^2) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:106 + ///
+ /// float mInternalEdgeRemovalVertexToleranceSq = cDefaultInternalEdgeRemovalVertexToleranceSq + ///
+ ///
+ public float GetInternalEdgeRemovalVertexToleranceSq() => + Jolt.PInvoke.CollideShapeSettings_GetInternalEdgeRemovalVertexToleranceSq(this); + + /// + /// + /// Max squared distance to consider a vertex to be the same as another vertex, used by the internal edge + /// removal algorithm to determine if two edges are shared. (unit: meter^2) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:106 + ///
+ /// float mInternalEdgeRemovalVertexToleranceSq = cDefaultInternalEdgeRemovalVertexToleranceSq + ///
+ ///
+ public void SetInternalEdgeRemovalVertexToleranceSq(float value) => + Jolt.PInvoke.CollideShapeSettings_SetInternalEdgeRemovalVertexToleranceSq(this, value); + + public static implicit operator CollideSettingsBase(CollideShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.CollideShapeSettings_Destroy(this); + + /// + public ActiveEdgeMode GetActiveEdgeMode() => ((CollideSettingsBase)this).GetActiveEdgeMode(); + + /// + public void SetActiveEdgeMode(ActiveEdgeMode value) => ((CollideSettingsBase)this).SetActiveEdgeMode(value); + + /// + public CollectFacesMode GetCollectFacesMode() => ((CollideSettingsBase)this).GetCollectFacesMode(); + + /// + public void SetCollectFacesMode(CollectFacesMode value) => + ((CollideSettingsBase)this).SetCollectFacesMode(value); + + /// + public float GetCollisionTolerance() => ((CollideSettingsBase)this).GetCollisionTolerance(); + + /// + public void SetCollisionTolerance(float value) => ((CollideSettingsBase)this).SetCollisionTolerance(value); + + /// + public float GetPenetrationTolerance() => ((CollideSettingsBase)this).GetPenetrationTolerance(); + + /// + public void SetPenetrationTolerance(float value) => ((CollideSettingsBase)this).SetPenetrationTolerance(value); + + /// + public float3 GetActiveEdgeMovementDirection() => ((CollideSettingsBase)this).GetActiveEdgeMovementDirection(); + + /// + public void SetActiveEdgeMovementDirection(float3 value) => + ((CollideSettingsBase)this).SetActiveEdgeMovementDirection(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollideSoftBodyVertexIterator.gen.cs b/Brutal.Jolt/Generated/Classes/CollideSoftBodyVertexIterator.gen.cs new file mode 100644 index 0000000..29563e3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollideSoftBodyVertexIterator.gen.cs @@ -0,0 +1,115 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that allows iterating over the vertices of a soft body. It tracks the largest penetration and allows + /// storing the resulting collision in a different structure than the soft body vertex itself. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:14 + ///
+ /// class CollideSoftBodyVertexIterator + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollideSoftBodyVertexIterator : IDisposable + { + /// + /// + /// Default constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:18 + ///
+ /// CollideSoftBodyVertexIterator() = default + ///
+ ///
+ public static CollideSoftBodyVertexIterator Create() => Jolt.PInvoke.CollideSoftBodyVertexIterator_Create(); + + /// + /// + /// Construct using a soft body vertex + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:32 + ///
+ /// explicit CollideSoftBodyVertexIterator(SoftBodyVertex *inVertices) + ///
+ ///
+ public static unsafe CollideSoftBodyVertexIterator Create(Ptr vertices) => + Jolt.PInvoke.CollideSoftBodyVertexIterator_Create_2(vertices); + + /// + /// + /// Get the position of the current vertex + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:70 + ///
+ /// Vec3 GetPosition() const + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.CollideSoftBodyVertexIterator_GetPosition(this); + + /// + /// + /// Get the inverse mass of the current vertex + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:76 + ///
+ /// float GetInvMass() const + ///
+ ///
+ public float GetInvMass() => Jolt.PInvoke.CollideSoftBodyVertexIterator_GetInvMass(this); + + /// + /// + /// Update penetration of the current vertex + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:83 + ///
+ /// bool UpdatePenetration(float inLargestPenetration) const + ///
+ ///
+ /// + /// + /// Update penetration of the current vertex + /// @return Returns true if the vertex has the largest penetration so far, this means you need to follow up by calling SetCollision + /// + /// + public bool UpdatePenetration(float largestPenetration) => + Jolt.PInvoke.CollideSoftBodyVertexIterator_UpdatePenetration(this, largestPenetration); + + /// + /// + /// Update the collision of the current vertex + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h:93 + ///
+ /// void SetCollision(const Plane &inCollisionPlane, int inCollidingShapeIndex) const + ///
+ ///
+ public void SetCollision(in Plane collisionPlane, int collidingShapeIndex) => + Jolt.PInvoke.CollideSoftBodyVertexIterator_SetCollision(this, in collisionPlane, collidingShapeIndex); + + public void Dispose() => Jolt.PInvoke.CollideSoftBodyVertexIterator_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollideSphereVsTriangles.gen.cs b/Brutal.Jolt/Generated/Classes/CollideSphereVsTriangles.gen.cs new file mode 100644 index 0000000..c52e8ba --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollideSphereVsTriangles.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision detection helper that collides a sphere vs one or more triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSphereVsTriangles.h:16 + ///
+ /// class CollideSphereVsTriangles + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollideSphereVsTriangles + { + /// + /// + /// Collide sphere with a single triangle + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideSphereVsTriangles.h:35 + ///
+ /// void Collide(Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2) + ///
+ ///
+ /// + /// + /// Collide sphere with a single triangle + /// @param inV0 , inV1 , inV2: CCW triangle vertices + /// @param inActiveEdges bit 0 = edge v0..v1 is active, bit 1 = edge v1..v2 is active, bit 2 = edge v2..v0 is active + /// An active edge is an edge that is not connected to another triangle in such a way that it is impossible to collide with the edge + /// @param inSubShapeID2 The sub shape ID for the triangle + /// + /// + public void Collide(float3 v0, float3 v1, float3 v2, byte activeEdges, uint subShapeID2) => + Jolt.PInvoke.CollideSphereVsTriangles_Collide(this, v0, v1, v2, activeEdges, subShapeID2); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastRay.gen.cs b/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastRay.gen.cs new file mode 100644 index 0000000..e88dfae --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastRay.gen.cs @@ -0,0 +1,62 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Traits to use for CastRay + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:13 + ///
+ /// class CollisionCollectorTraitsCastRay + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollisionCollectorTraitsCastRay : IDisposable + { + public static CollisionCollectorTraitsCastRay Create() => Jolt.PInvoke.CollisionCollectorTraitsCastRay_Create(); + + /// + /// + /// Furthest hit: Fraction is 1 + epsilon + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:17 + ///
+ /// static constexpr float InitialEarlyOutFraction = 1.0f + FLT_EPSILON + ///
+ ///
+ /// + /// + /// For rays the early out fraction is the fraction along the line to order hits. + /// + /// + public static float GetInitialEarlyOutFraction() => + Jolt.PInvoke.CollisionCollectorTraitsCastRay_GetInitialEarlyOutFraction(); + + /// + /// + /// Closest hit: Fraction is 0 + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:18 + ///
+ /// static constexpr float ShouldEarlyOutFraction = 0.0f + ///
+ ///
+ public static float GetShouldEarlyOutFraction() => + Jolt.PInvoke.CollisionCollectorTraitsCastRay_GetShouldEarlyOutFraction(); + + public void Dispose() => Jolt.PInvoke.CollisionCollectorTraitsCastRay_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastShape.gen.cs b/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastShape.gen.cs new file mode 100644 index 0000000..20d81c1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCastShape.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Traits to use for CastShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:22 + ///
+ /// class CollisionCollectorTraitsCastShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollisionCollectorTraitsCastShape : IDisposable + { + public static CollisionCollectorTraitsCastShape Create() => + Jolt.PInvoke.CollisionCollectorTraitsCastShape_Create(); + + /// + /// + /// Furthest hit: Fraction is 1 + epsilon + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:26 + ///
+ /// static constexpr float InitialEarlyOutFraction = 1.0f + FLT_EPSILON + ///
+ ///
+ /// + /// + /// For rays the early out fraction is the fraction along the line to order hits. + /// + /// + public static float GetInitialEarlyOutFraction() => + Jolt.PInvoke.CollisionCollectorTraitsCastShape_GetInitialEarlyOutFraction(); + + /// + /// + /// Deepest hit: Penetration is infinite + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:27 + ///
+ /// static constexpr float ShouldEarlyOutFraction = -FLT_MAX + ///
+ ///
+ public static float GetShouldEarlyOutFraction() => + Jolt.PInvoke.CollisionCollectorTraitsCastShape_GetShouldEarlyOutFraction(); + + public void Dispose() => Jolt.PInvoke.CollisionCollectorTraitsCastShape_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCollideShape.gen.cs b/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCollideShape.gen.cs new file mode 100644 index 0000000..f465c95 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollisionCollectorTraitsCollideShape.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Traits to use for CollideShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:31 + ///
+ /// class CollisionCollectorTraitsCollideShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollisionCollectorTraitsCollideShape : IDisposable + { + public static CollisionCollectorTraitsCollideShape Create() => + Jolt.PInvoke.CollisionCollectorTraitsCollideShape_Create(); + + /// + /// + /// Most shallow hit: Separation is infinite + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:35 + ///
+ /// static constexpr float InitialEarlyOutFraction = FLT_MAX + ///
+ ///
+ /// + /// + /// For shape collisions we use -penetration depth to order hits. + /// + /// + public static float GetInitialEarlyOutFraction() => + Jolt.PInvoke.CollisionCollectorTraitsCollideShape_GetInitialEarlyOutFraction(); + + /// + /// + /// Deepest hit: Penetration is infinite + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionCollector.h:36 + ///
+ /// static constexpr float ShouldEarlyOutFraction = -FLT_MAX + ///
+ ///
+ public static float GetShouldEarlyOutFraction() => + Jolt.PInvoke.CollisionCollectorTraitsCollideShape_GetShouldEarlyOutFraction(); + + public void Dispose() => Jolt.PInvoke.CollisionCollectorTraitsCollideShape_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollisionDispatch.gen.cs b/Brutal.Jolt/Generated/Classes/CollisionDispatch.gen.cs new file mode 100644 index 0000000..bd9bd37 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollisionDispatch.gen.cs @@ -0,0 +1,593 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Dispatch function, main function to handle collisions between shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:18 + ///
+ /// class CollisionDispatch + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollisionDispatch : IDisposable + { + public static CollisionDispatch Create() => Jolt.PInvoke.CollisionDispatch_Create(); + + /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:33 + ///
+ /// static inline void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) + ///
+ ///
+ /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// @param inShape1 The first shape + /// @param inShape2 The second shape + /// @param inScale1 Local space scale of shape 1 (scales relative to its center of mass) + /// @param inScale2 Local space scale of shape 2 (scales relative to its center of mass) + /// @param inCenterOfMassTransform1 Transform to transform center of mass of shape 1 into world space + /// @param inCenterOfMassTransform2 Transform to transform center of mass of shape 2 into world space + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for shape 1 + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for shape 2 + /// @param inCollideShapeSettings Options for the CollideShape test + /// @param ioCollector The collector that receives the results. + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// + /// + /// Collects every hit into collideshapevsshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public static unsafe uint CollideShapeVsShape( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CollisionDispatch_CollideShapeVsShape( + shape1, + shape2, + scale1, + scale2, + in centerOfMassTransform1, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + collideShapeSettings, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:33 + ///
+ /// static inline void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) + ///
+ ///
+ /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// @param inShape1 The first shape + /// @param inShape2 The second shape + /// @param inScale1 Local space scale of shape 1 (scales relative to its center of mass) + /// @param inScale2 Local space scale of shape 2 (scales relative to its center of mass) + /// @param inCenterOfMassTransform1 Transform to transform center of mass of shape 1 into world space + /// @param inCenterOfMassTransform2 Transform to transform center of mass of shape 2 into world space + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for shape 1 + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for shape 2 + /// @param inCollideShapeSettings Options for the CollideShape test + /// @param ioCollector The collector that receives the results. + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public static bool CollideShapeVsShapeClosest( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.CollisionDispatch_CollideShapeVsShapeClosest( + shape1, + shape2, + scale1, + scale2, + in centerOfMassTransform1, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + collideShapeSettings, + out result, + shapeFilter + ) != 0; + + /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. Note: This version takes the + /// shape cast in local space relative to the center of mass of inShape, take a look at + /// sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:53 + ///
+ /// static inline void sCastShapeVsShapeLocalSpace(const ShapeCast &inShapeCastLocal, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. + /// Note: This version takes the shape cast in local space relative to the center of mass of inShape, take a look at sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// @param inShapeCastLocal The shape to cast against the other shape and its start and direction. + /// @param inShapeCastSettings Settings for performing the cast + /// @param inShape The shape to cast against. + /// @param inScale Local space scale for the shape to cast against (scales relative to its center of mass). + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// @param inCenterOfMassTransform2 Is the center of mass transform of shape 2 (excluding scale), this is used to provide a transform to the shape cast result so that local hit result quantities can be transformed into world space. + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for the casting shape + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for the shape we're casting against + /// @param ioCollector The collector that receives the results. + /// + /// + /// Collects every hit into castshapevsshapelocalspaceresults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static unsafe uint CastShapeVsShapeLocalSpace( + in ShapeCast shapeCastLocal, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + Span results, + out uint totalHits + ) + { + fixed (ShapeCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CollisionDispatch_CastShapeVsShapeLocalSpace( + in shapeCastLocal, + shapeCastSettings, + shape, + scale, + shapeFilter, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. Note: This version takes the + /// shape cast in local space relative to the center of mass of inShape, take a look at + /// sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:53 + ///
+ /// static inline void sCastShapeVsShapeLocalSpace(const ShapeCast &inShapeCastLocal, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. + /// Note: This version takes the shape cast in local space relative to the center of mass of inShape, take a look at sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// @param inShapeCastLocal The shape to cast against the other shape and its start and direction. + /// @param inShapeCastSettings Settings for performing the cast + /// @param inShape The shape to cast against. + /// @param inScale Local space scale for the shape to cast against (scales relative to its center of mass). + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// @param inCenterOfMassTransform2 Is the center of mass transform of shape 2 (excluding scale), this is used to provide a transform to the shape cast result so that local hit result quantities can be transformed into world space. + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for the casting shape + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for the shape we're casting against + /// @param ioCollector The collector that receives the results. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static bool CastShapeVsShapeLocalSpaceClosest( + in ShapeCast shapeCastLocal, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + out ShapeCastResult result + ) => + Jolt.PInvoke.CollisionDispatch_CastShapeVsShapeLocalSpaceClosest( + in shapeCastLocal, + shapeCastSettings, + shape, + scale, + shapeFilter, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + out result + ) != 0; + + /// + /// + /// See: sCastShapeVsShapeLocalSpace. The only difference is that the shape cast (inShapeCastWorld) is + /// provided in world space. Note: A shape cast contains the center of mass start of the shape, if you have + /// the world transform of the shape you probably want to construct it using ShapeCast::sFromWorldTransform. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:65 + ///
+ /// static inline void sCastShapeVsShapeWorldSpace(const ShapeCast &inShapeCastWorld, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Collects every hit into castshapevsshapeworldspaceresults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static unsafe uint CastShapeVsShapeWorldSpace( + in ShapeCast shapeCastWorld, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + Span results, + out uint totalHits + ) + { + fixed (ShapeCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CollisionDispatch_CastShapeVsShapeWorldSpace( + in shapeCastWorld, + shapeCastSettings, + shape, + scale, + shapeFilter, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// See: sCastShapeVsShapeLocalSpace. The only difference is that the shape cast (inShapeCastWorld) is + /// provided in world space. Note: A shape cast contains the center of mass start of the shape, if you have + /// the world transform of the shape you probably want to construct it using ShapeCast::sFromWorldTransform. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:65 + ///
+ /// static inline void sCastShapeVsShapeWorldSpace(const ShapeCast &inShapeCastWorld, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static bool CastShapeVsShapeWorldSpaceClosest( + in ShapeCast shapeCastWorld, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + out ShapeCastResult result + ) => + Jolt.PInvoke.CollisionDispatch_CastShapeVsShapeWorldSpaceClosest( + in shapeCastWorld, + shapeCastSettings, + shape, + scale, + shapeFilter, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + out result + ) != 0; + + /// + /// + /// Initialize all collision functions with a function that asserts and returns no collision + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:78 + ///
+ /// static void sInit() + ///
+ ///
+ public static void Init() => Jolt.PInvoke.CollisionDispatch_Init(); + + /// + /// + /// An implementation of CollideShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:87 + ///
+ /// static void sReversedCollideShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Collects every hit into reversedcollideshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static unsafe uint ReversedCollideShape( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + Span results, + out uint totalHits, + ShapeFilter shapeFilter + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CollisionDispatch_ReversedCollideShape( + shape1, + shape2, + scale1, + scale2, + in centerOfMassTransform1, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + collideShapeSettings, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// An implementation of CollideShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:87 + ///
+ /// static void sReversedCollideShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static bool ReversedCollideShapeClosest( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter + ) => + Jolt.PInvoke.CollisionDispatch_ReversedCollideShapeClosest( + shape1, + shape2, + scale1, + scale2, + in centerOfMassTransform1, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + collideShapeSettings, + out result, + shapeFilter + ) != 0; + + /// + /// + /// An implementation of CastShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:90 + ///
+ /// static void sReversedCastShape(const ShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Collects every hit into reversedcastshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static unsafe uint ReversedCastShape( + in ShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + Span results, + out uint totalHits + ) + { + fixed (ShapeCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.CollisionDispatch_ReversedCastShape( + in shapeCast, + shapeCastSettings, + shape, + scale, + shapeFilter, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// An implementation of CastShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:90 + ///
+ /// static void sReversedCastShape(const ShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static bool ReversedCastShapeClosest( + in ShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + out ShapeCastResult result + ) => + Jolt.PInvoke.CollisionDispatch_ReversedCastShapeClosest( + in shapeCast, + shapeCastSettings, + shape, + scale, + shapeFilter, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + out result + ) != 0; + + public void Dispose() => Jolt.PInvoke.CollisionDispatch_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CollisionGroup.gen.cs b/Brutal.Jolt/Generated/Classes/CollisionGroup.gen.cs new file mode 100644 index 0000000..57f6cd2 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CollisionGroup.gen.cs @@ -0,0 +1,210 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Two objects collide with each other if: - Both don't have a group filter - The first group filter says that + /// the objects can collide - Or if there's no filter for the first object, the second group filter says the + /// objects can collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:19 + ///
+ /// class CollisionGroup + ///
+ ///
+ [InteropHandle] + public readonly partial struct CollisionGroup : IDisposable + { + /// + /// + /// Default constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:31 + ///
+ /// CollisionGroup() = default + ///
+ ///
+ public static CollisionGroup Create() => Jolt.PInvoke.CollisionGroup_Create(); + + /// + /// + /// Construct with all properties + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:34 + ///
+ /// CollisionGroup(const GroupFilter *inFilter, GroupID inGroupID, SubGroupID inSubGroupID) + ///
+ ///
+ public static CollisionGroup Create(GroupFilter filter, uint groupID, uint subGroupID) => + Jolt.PInvoke.CollisionGroup_Create_2(filter, groupID, subGroupID); + + /// + /// + /// Set the collision group filter + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:49 + ///
+ /// inline void SetGroupFilter(const GroupFilter *inFilter) + ///
+ ///
+ public void SetGroupFilter(GroupFilter filter) => Jolt.PInvoke.CollisionGroup_SetGroupFilter(this, filter); + + /// + /// + /// Get the collision group filter + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:55 + ///
+ /// inline const GroupFilter *GetGroupFilter() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public GroupFilter GetGroupFilter() => Jolt.PInvoke.CollisionGroup_GetGroupFilter(this); + + /// + /// + /// Set the main group id for this object + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:61 + ///
+ /// inline void SetGroupID(GroupID inID) + ///
+ ///
+ public void SetGroupID(uint id) => Jolt.PInvoke.CollisionGroup_SetGroupID(this, id); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:66 + ///
+ /// inline GroupID GetGroupID() const + ///
+ ///
+ public uint GetGroupID() => Jolt.PInvoke.CollisionGroup_GetGroupID(this); + + /// + /// + /// Add this object to a sub group + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:72 + ///
+ /// inline void SetSubGroupID(SubGroupID inID) + ///
+ ///
+ public void SetSubGroupID(uint id) => Jolt.PInvoke.CollisionGroup_SetSubGroupID(this, id); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:77 + ///
+ /// inline SubGroupID GetSubGroupID() const + ///
+ ///
+ public uint GetSubGroupID() => Jolt.PInvoke.CollisionGroup_GetSubGroupID(this); + + /// + /// + /// Check if this object collides with another object + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:83 + ///
+ /// bool CanCollide(const CollisionGroup &inOther) const + ///
+ ///
+ public bool CanCollide(CollisionGroup other) => Jolt.PInvoke.CollisionGroup_CanCollide(this, other); + + /// + /// + /// Saves the state of this object in binary form to inStream. Does not save group filter. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:95 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.CollisionGroup_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. Does not save group filter. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:98 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.CollisionGroup_RestoreBinaryState(this, stream); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:27 + ///
+ /// static const GroupID cInvalidGroup = ~GroupID(0) + ///
+ ///
+ public static uint GetInvalidGroup() => Jolt.PInvoke.CollisionGroup_GetInvalidGroup(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:28 + ///
+ /// static const SubGroupID cInvalidSubGroup = ~SubGroupID(0) + ///
+ ///
+ public static uint GetInvalidSubGroup() => Jolt.PInvoke.CollisionGroup_GetInvalidSubGroup(); + + /// + /// + /// An invalid collision group + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionGroup.h:101 + ///
+ /// static const CollisionGroup sInvalid + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public static CollisionGroup GetInvalid() => Jolt.PInvoke.CollisionGroup_GetInvalid(); + + public void Dispose() => Jolt.PInvoke.CollisionGroup_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CompoundShape.gen.cs b/Brutal.Jolt/Generated/Classes/CompoundShape.gen.cs new file mode 100644 index 0000000..c19d699 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CompoundShape.gen.cs @@ -0,0 +1,643 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for a compound shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:52 + ///
+ /// class CompoundShape : public Shape + ///
+ ///
+ [InteropHandle] + public readonly partial struct CompoundShape : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:141 + ///
+ /// struct SubShape + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct SubShape + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:238 + ///
+ /// RefConst<Shape> mShape + ///
+ ///
+ [FieldOffset(0)] + public Shape Shape; + + /// + /// + /// Note: Position of center of mass of sub shape! + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:239 + ///
+ /// Float3 mPositionCOM + ///
+ ///
+ [FieldOffset(8)] + public float3 PositionCOM; + + /// + /// + /// Note: X, Y, Z of rotation quaternion - note we read 4 bytes beyond this so make sure there's + /// something there + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:240 + ///
+ /// Float3 mRotation + ///
+ ///
+ [FieldOffset(20)] + public float3 Rotation; + + /// + /// + /// User data value (put here because it falls in padding bytes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:241 + ///
+ /// uint32 mUserData + ///
+ ///
+ [FieldOffset(32)] + public uint UserData; + + /// + /// + /// If mRotation is close to identity (put here because it falls in padding bytes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:242 + ///
+ /// bool mIsRotationIdentity + ///
+ ///
+ [FieldOffset(36)] + public Brutal.Bool8 IsRotationIdentity; + } + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + /// + /// Get which sub shape's bounding boxes overlap with an axis aligned box + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:132 + ///
+ /// virtual int GetIntersectingSubShapes(const AABox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const = 0 + ///
+ ///
+ /// + /// + /// Get which sub shape's bounding boxes overlap with an axis aligned box + /// @param inBox The axis aligned box to test against (relative to the center of mass of this shape) + /// @param outSubShapeIndices Buffer where to place the indices of the sub shapes that intersect + /// @param inMaxSubShapeIndices How many indices will fit in the buffer (normally you'd provide a buffer of GetNumSubShapes() indices) + /// @return How many indices were placed in outSubShapeIndices + /// + /// + /// subShapeIndices is the buffer the native call works on, and its element count travels with it: the call + /// may write through the span, and only for the duration of the call. + /// + /// + public unsafe int GetIntersectingSubShapes(in AABox box, Span subShapeIndices) + { + fixed (uint* subShapeIndices_fixed = subShapeIndices) + { + return Jolt.PInvoke.CompoundShape_GetIntersectingSubShapes( + this, + in box, + subShapeIndices_fixed, + (int)subShapeIndices.Length + ); + } + } + + /// + /// + /// Get which sub shape's bounding boxes overlap with an axis aligned box + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:139 + ///
+ /// virtual int GetIntersectingSubShapes(const OrientedBox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const = 0 + ///
+ ///
+ /// + /// + /// Get which sub shape's bounding boxes overlap with an axis aligned box + /// @param inBox The axis aligned box to test against (relative to the center of mass of this shape) + /// @param outSubShapeIndices Buffer where to place the indices of the sub shapes that intersect + /// @param inMaxSubShapeIndices How many indices will fit in the buffer (normally you'd provide a buffer of GetNumSubShapes() indices) + /// @return How many indices were placed in outSubShapeIndices + /// + /// + /// subShapeIndices is the buffer the native call works on, and its element count travels with it: the call + /// may write through the span, and only for the duration of the call. + /// + /// + public unsafe int GetIntersectingSubShapes(OrientedBox box, Span subShapeIndices) + { + fixed (uint* subShapeIndices_fixed = subShapeIndices) + { + return Jolt.PInvoke.CompoundShape_GetIntersectingSubShapes_2( + this, + box, + subShapeIndices_fixed, + (int)subShapeIndices.Length + ); + } + } + + /// + /// + /// Access to the sub shapes of this compound + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:251 + ///
+ /// const SubShapes & GetSubShapes() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetSubShapes() + { + Jolt.PInvoke.CompoundShape_GetSubShapes(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Get the total number of sub shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:254 + ///
+ /// uint GetNumSubShapes() const + ///
+ ///
+ public uint GetNumSubShapes() => Jolt.PInvoke.CompoundShape_GetNumSubShapes(this); + + /// + /// + /// Access to a particular sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:257 + ///
+ /// const SubShape & GetSubShape(uint inIdx) const + ///
+ ///
+ /// + /// + /// The returned struct's handle fields are borrowed from the object it came from: don't Dispose them, and + /// don't read them after the owner is gone. + /// + /// + public CompoundShape.SubShape GetSubShape(uint idx) + { + Jolt.PInvoke.CompoundShape_GetSubShape(this, idx, out var _inRange, out var _outResult); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of sub shapes." + ); + return _outResult; + } + + /// + /// + /// Get the user data associated with a shape in this compound + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:260 + ///
+ /// uint32 GetCompoundUserData(uint inIdx) const + ///
+ ///
+ public uint GetCompoundUserData(uint idx) + { + var _result = Jolt.PInvoke.CompoundShape_GetCompoundUserData(this, idx, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of sub shapes." + ); + return _result; + } + + /// + /// + /// Set the user data associated with a shape in this compound + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:263 + ///
+ /// void SetCompoundUserData(uint inIdx, uint32 inUserData) + ///
+ ///
+ public void SetCompoundUserData(uint idx, uint userData) + { + Jolt.PInvoke.CompoundShape_SetCompoundUserData(this, idx, userData, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of sub shapes." + ); + } + + /// + /// + /// Check if a sub shape ID is still valid for this shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:268 + ///
+ /// inline bool IsSubShapeIDValid(SubShapeID inSubShapeID) const + ///
+ ///
+ /// + /// + /// Check if a sub shape ID is still valid for this shape + /// @param inSubShapeID Sub shape id that indicates the leaf shape relative to this shape + /// @return True if the ID is valid, false if not + /// + /// + public bool IsSubShapeIDValid(uint subShapeID) => + Jolt.PInvoke.CompoundShape_IsSubShapeIDValid(this, subShapeID); + + /// + /// + /// Convert SubShapeID to sub shape index + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:278 + ///
+ /// inline uint32 GetSubShapeIndexFromID(SubShapeID inSubShapeID, SubShapeID &outRemainder) const + ///
+ ///
+ /// + /// + /// Convert SubShapeID to sub shape index + /// @param inSubShapeID Sub shape id that indicates the leaf shape relative to this shape + /// @param outRemainder This is the sub shape ID for the sub shape of the compound after popping off the index + /// @return The index of the sub shape of this compound + /// + /// + public uint GetSubShapeIndexFromID(uint subShapeID, out uint remainder) => + Jolt.PInvoke.CompoundShape_GetSubShapeIndexFromID(this, subShapeID, out remainder); + + /// + /// + /// Convert a sub shape index to a sub shape ID + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:289 + ///
+ /// inline SubShapeIDCreator GetSubShapeIDFromIndex(int inIdx, const SubShapeIDCreator &inParentSubShapeID) const + ///
+ ///
+ /// + /// + /// @brief Convert a sub shape index to a sub shape ID + /// @param inIdx Index of the sub shape of this compound + /// @param inParentSubShapeID Parent SubShapeID (describing the path to the compound shape) + /// @return A sub shape ID creator that contains the full path to the sub shape with index inIdx + /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SubShapeIDCreator GetSubShapeIDFromIndex(int idx, SubShapeIDCreator parentSubShapeID) + { + var _result = Jolt.PInvoke.CompoundShape_GetSubShapeIDFromIndex( + this, + idx, + parentSubShapeID, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of sub shapes." + ); + return _result; + } + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:312 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.CompoundShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(CompoundShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CompoundShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CompoundShapeSettings.gen.cs new file mode 100644 index 0000000..1dd2202 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CompoundShapeSettings.gen.cs @@ -0,0 +1,197 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class settings to construct a compound shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:17 + ///
+ /// class CompoundShapeSettings : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct CompoundShapeSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:31 + ///
+ /// struct SubShapeSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct SubShapeSettings + { + /// + /// + /// Sub shape (either this or mShapePtr needs to be filled up) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:35 + ///
+ /// RefConst<ShapeSettings> mShape + ///
+ ///
+ [FieldOffset(0)] + public ShapeSettings Shape; + + /// + /// + /// Sub shape (either this or mShape needs to be filled up) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:36 + ///
+ /// RefConst<Shape> mShapePtr + ///
+ ///
+ [FieldOffset(8)] + public Shape ShapePtr; + + /// + /// + /// Position of the sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:37 + ///
+ /// Vec3 mPosition + ///
+ ///
+ [FieldOffset(16)] + public float3 Position; + + /// + /// + /// Rotation of the sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:38 + ///
+ /// Quat mRotation + ///
+ ///
+ [FieldOffset(32)] + public floatQuat Rotation; + + /// + /// + /// User data value (can be used by the application for any purpose). Note this value can be retrieved + /// through GetSubShape(...).mUserData, not through GetSubShapeUserData(...) as that returns + /// Shape::GetUserData() of the leaf shape. Use GetSubShapeIndexFromID get a shape index from a + /// SubShapeID to pass to GetSubShape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:43 + ///
+ /// uint32 mUserData = 0 + ///
+ ///
+ [FieldOffset(48)] + public uint UserData; + } + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + /// + /// Add a shape to the compound. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:26 + ///
+ /// void AddShape(Vec3Arg inPosition, QuatArg inRotation, const ShapeSettings *inShape, uint32 inUserData = 0) + ///
+ ///
+ public void AddShape(float3 position, floatQuat rotation, ShapeSettings shape, uint userData = 0) => + Jolt.PInvoke.CompoundShapeSettings_AddShape(this, position, rotation, shape, userData); + + /// + /// + /// Add a shape to the compound. Variant that uses a concrete shape, which means this object cannot be + /// serialized. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:29 + ///
+ /// void AddShape(Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape, uint32 inUserData = 0) + ///
+ ///
+ public void AddShape(float3 position, floatQuat rotation, Shape shape, uint userData = 0) => + Jolt.PInvoke.CompoundShapeSettings_AddShape_2(this, position, rotation, shape, userData); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CompoundShape.h:48 + ///
+ /// SubShapes mSubShapes + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetSubShapes() + { + Jolt.PInvoke.CompoundShapeSettings_GetSubShapes(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(CompoundShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConeConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/ConeConstraint.gen.cs new file mode 100644 index 0000000..bf6932e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConeConstraint.gen.cs @@ -0,0 +1,236 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A cone constraint constraints 2 bodies to a single point and limits the swing between the twist axis within + /// a cone: + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:69 + ///
+ /// class ConeConstraint final : public TwoBodyConstraint + ///
+ ///
+ /// + /// + /// A cone constraint constraints 2 bodies to a single point and limits the swing between the twist axis within a cone: + /// + /// t1 . t2 <= cos(theta) + /// + /// Where: + /// + /// t1 = twist axis of body 1. + /// t2 = twist axis of body 2. + /// theta = half cone angle (angle from the principal axis of the cone to the edge). + /// + /// Calculating the Jacobian: + /// + /// Constraint equation: + /// + /// C = t1 . t2 - cos(theta) + /// + /// Derivative: + /// + /// d/dt C = d/dt (t1 . t2) = (d/dt t1) . t2 + t1 . (d/dt t2) = (w1 x t1) . t2 + t1 . (w2 x t2) = (t1 x t2) . w1 + (t2 x t1) . w2 + /// + /// d/dt C = J v = [0, -t2 x t1, 0, t2 x t1] [v1, w1, v2, w2] + /// + /// Where J is the Jacobian. + /// + /// Note that this is the exact same equation as used in AngleConstraintPart if we use t2 x t1 as the world space axis + /// + /// + [InteropHandle] + public readonly partial struct ConeConstraint : IDisposable + { + /// + /// + /// Construct cone constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:75 + ///
+ /// ConeConstraint(Body &inBody1, Body &inBody2, const ConeConstraintSettings &inSettings) + ///
+ ///
+ public static ConeConstraint Create(Body body1, Body body2, ConeConstraintSettings settings) => + Jolt.PInvoke.ConeConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Update maximum angle between body 1 and 2 (see ConeConstraintSettings) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:98 + ///
+ /// void SetHalfConeAngle(float inHalfConeAngle) + ///
+ ///
+ public void SetHalfConeAngle(float halfConeAngle) => + Jolt.PInvoke.ConeConstraint_SetHalfConeAngle(this, halfConeAngle); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:99 + ///
+ /// float GetCosHalfConeAngle() const + ///
+ ///
+ public float GetCosHalfConeAngle() => Jolt.PInvoke.ConeConstraint_GetCosHalfConeAngle(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:102 + ///
+ /// inline Vec3 GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float3 GetTotalLambdaPosition() => Jolt.PInvoke.ConeConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:103 + ///
+ /// inline float GetTotalLambdaRotation() const + ///
+ ///
+ public float GetTotalLambdaRotation() => Jolt.PInvoke.ConeConstraint_GetTotalLambdaRotation(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(ConeConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(ConeConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConeConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ConeConstraintSettings.gen.cs new file mode 100644 index 0000000..f5e21a3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConeConstraintSettings.gen.cs @@ -0,0 +1,243 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Cone constraint settings, used to create a cone constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:14 + ///
+ /// class ConeConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConeConstraintSettings : IDisposable + { + public static ConeConstraintSettings Create() => Jolt.PInvoke.ConeConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:26 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.ConeConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:26 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.ConeConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:29 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint1() => Jolt.PInvoke.ConeConstraintSettings_GetPoint1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:29 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetPoint1(float3 value) => Jolt.PInvoke.ConeConstraintSettings_SetPoint1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:30 + ///
+ /// Vec3 mTwistAxis1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetTwistAxis1() => Jolt.PInvoke.ConeConstraintSettings_GetTwistAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:30 + ///
+ /// Vec3 mTwistAxis1 = Vec3::sAxisX() + ///
+ ///
+ public void SetTwistAxis1(float3 value) => Jolt.PInvoke.ConeConstraintSettings_SetTwistAxis1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:33 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint2() => Jolt.PInvoke.ConeConstraintSettings_GetPoint2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:33 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetPoint2(float3 value) => Jolt.PInvoke.ConeConstraintSettings_SetPoint2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:34 + ///
+ /// Vec3 mTwistAxis2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetTwistAxis2() => Jolt.PInvoke.ConeConstraintSettings_GetTwistAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:34 + ///
+ /// Vec3 mTwistAxis2 = Vec3::sAxisX() + ///
+ ///
+ public void SetTwistAxis2(float3 value) => Jolt.PInvoke.ConeConstraintSettings_SetTwistAxis2(this, value); + + /// + /// + /// Half of maximum angle between twist axis of body 1 and 2 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:37 + ///
+ /// float mHalfConeAngle = 0.0f + ///
+ ///
+ public float GetHalfConeAngle() => Jolt.PInvoke.ConeConstraintSettings_GetHalfConeAngle(this); + + /// + /// + /// Half of maximum angle between twist axis of body 1 and 2 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConeConstraint.h:37 + ///
+ /// float mHalfConeAngle = 0.0f + ///
+ ///
+ public void SetHalfConeAngle(float value) => Jolt.PInvoke.ConeConstraintSettings_SetHalfConeAngle(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(ConeConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(ConeConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Constraint.gen.cs b/Brutal.Jolt/Generated/Classes/Constraint.gen.cs new file mode 100644 index 0000000..6d7e367 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Constraint.gen.cs @@ -0,0 +1,516 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for all physics constraints. A constraint removes one or more degrees of freedom for a rigid + /// body. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:107 + ///
+ /// class Constraint : public RefTarget<Constraint>, public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct Constraint : IDisposable + { + /// + /// + /// Get the type of a constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:131 + ///
+ /// virtual EConstraintType GetType() const + ///
+ ///
+ public ConstraintType GetConstraintType() => Jolt.PInvoke.Constraint_GetConstraintType(this); + + /// + /// + /// Get the sub type of a constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:134 + ///
+ /// virtual EConstraintSubType GetSubType() const = 0 + ///
+ ///
+ public ConstraintSubType GetSubType() => Jolt.PInvoke.Constraint_GetSubType(this); + + /// + /// + /// Priority of the constraint when solving. Higher numbers have are more likely to be solved correctly. + /// Note that if you want a deterministic simulation and you cannot guarantee the order in which constraints + /// are added/removed, you can make the priority for all constraints unique to get a deterministic ordering. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:138 + ///
+ /// uint32 GetConstraintPriority() const + ///
+ ///
+ public uint GetConstraintPriority() => Jolt.PInvoke.Constraint_GetConstraintPriority(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:139 + ///
+ /// void SetConstraintPriority(uint32 inPriority) + ///
+ ///
+ public void SetConstraintPriority(uint priority) => + Jolt.PInvoke.Constraint_SetConstraintPriority(this, priority); + + /// + /// + /// Used only when the constraint is active. Override for the number of solver velocity iterations to run, 0 + /// means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use is the max + /// of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:142 + ///
+ /// void SetNumVelocityStepsOverride(uint inN) + ///
+ ///
+ public void SetNumVelocityStepsOverride(uint n) => Jolt.PInvoke.Constraint_SetNumVelocityStepsOverride(this, n); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:143 + ///
+ /// uint GetNumVelocityStepsOverride() const + ///
+ ///
+ public uint GetNumVelocityStepsOverride() => Jolt.PInvoke.Constraint_GetNumVelocityStepsOverride(this); + + /// + /// + /// Used only when the constraint is active. Override for the number of solver position iterations to run, 0 + /// means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use is the max + /// of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:146 + ///
+ /// void SetNumPositionStepsOverride(uint inN) + ///
+ ///
+ public void SetNumPositionStepsOverride(uint n) => Jolt.PInvoke.Constraint_SetNumPositionStepsOverride(this, n); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:147 + ///
+ /// uint GetNumPositionStepsOverride() const + ///
+ ///
+ public uint GetNumPositionStepsOverride() => Jolt.PInvoke.Constraint_GetNumPositionStepsOverride(this); + + /// + /// + /// Enable / disable this constraint. This can e.g. be used to implement a breakable constraint by detecting + /// that the constraint impulse (see e.g. PointConstraint::GetTotalLambdaPosition) went over a certain limit + /// and then disabling the constraint. Note that although a disabled constraint will not affect the + /// simulation in any way anymore, it does incur some processing overhead. Alternatively you can remove a + /// constraint from the constraint manager (which may be more costly if you want to disable the constraint + /// for a short while). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:153 + ///
+ /// void SetEnabled(bool inEnabled) + ///
+ ///
+ public void SetEnabled(bool enabled) => Jolt.PInvoke.Constraint_SetEnabled(this, enabled); + + /// + /// + /// Test if a constraint is enabled. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:156 + ///
+ /// bool GetEnabled() const + ///
+ ///
+ public bool GetEnabled() => Jolt.PInvoke.Constraint_GetEnabled(this); + + /// + /// + /// Access to the user data, can be used for anything by the application + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:159 + ///
+ /// uint64 GetUserData() const + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.Constraint_GetUserData(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:160 + ///
+ /// void SetUserData(uint64 inUserData) + ///
+ ///
+ public void SetUserData(ulong userData) => Jolt.PInvoke.Constraint_SetUserData(this, userData); + + /// + /// + /// Notify the constraint that the shape of a body has changed and that its center of mass has moved by + /// inDeltaCOM. Bodies don't know which constraints are connected to them so the user is responsible for + /// notifying the relevant constraints when a body changes. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:166 + ///
+ /// virtual void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inDeltaCOM) = 0 + ///
+ ///
+ /// + /// + /// Notify the constraint that the shape of a body has changed and that its center of mass has moved by inDeltaCOM. + /// Bodies don't know which constraints are connected to them so the user is responsible for notifying the relevant constraints when a body changes. + /// @param inBodyID ID of the body that has changed + /// @param inDeltaCOM The delta of the center of mass of the body (shape->GetCenterOfMass() - shape_before_change->GetCenterOfMass()) + /// + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + Jolt.PInvoke.Constraint_NotifyShapeChanged(this, bodyID, deltaCOM); + + /// + /// + /// Notify the system that the configuration of the bodies and/or constraint has changed enough so that the + /// warm start impulses should not be applied the next frame. You can use this function for example when + /// repositioning a ragdoll through Ragdoll::SetPose in such a way that the orientation of the bodies + /// completely changes so that the previous frame impulses are no longer a good approximation of what the + /// impulses will be in the next frame. Calling this function when there are no big changes will result in + /// the constraints being much 'softer' than usual so they are more easily violated (e.g. a long chain of + /// bodies might sag a bit if you call this every frame). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:172 + ///
+ /// virtual void ResetWarmStart() = 0 + ///
+ ///
+ public void ResetWarmStart() => Jolt.PInvoke.Constraint_ResetWarmStart(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:176 + ///
+ /// virtual bool IsActive() const + ///
+ ///
+ /// + /// + /// @name Solver interface + /// @{ + /// + /// + public bool IsActive() => Jolt.PInvoke.Constraint_IsActive(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:177 + ///
+ /// virtual void SetupVelocityConstraint(float inDeltaTime) = 0 + ///
+ ///
+ public void SetupVelocityConstraint(float deltaTime) => + Jolt.PInvoke.Constraint_SetupVelocityConstraint(this, deltaTime); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:178 + ///
+ /// virtual void WarmStartVelocityConstraint(float inWarmStartImpulseRatio) = 0 + ///
+ ///
+ public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + Jolt.PInvoke.Constraint_WarmStartVelocityConstraint(this, warmStartImpulseRatio); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:179 + ///
+ /// virtual bool SolveVelocityConstraint(float inDeltaTime) = 0 + ///
+ ///
+ public bool SolveVelocityConstraint(float deltaTime) => + Jolt.PInvoke.Constraint_SolveVelocityConstraint(this, deltaTime); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:180 + ///
+ /// virtual bool SolvePositionConstraint(float inDeltaTime, float inBaumgarte) = 0 + ///
+ ///
+ public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + Jolt.PInvoke.Constraint_SolvePositionConstraint(this, deltaTime, baumgarte); + + /// + /// + /// Link bodies that are connected by this constraint in the island builder + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:184 + ///
+ /// virtual void BuildIslands(uint32 inConstraintIndex, IslandBuilder &ioBuilder, BodyManager &inBodyManager) = 0 + ///
+ ///
+ public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + Jolt.PInvoke.Constraint_BuildIslands(this, constraintIndex, builder, bodyManager); + + /// + /// + /// Link bodies that are connected by this constraint in the same split. Returns the split index. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:187 + ///
+ /// virtual uint BuildIslandSplits(LargeIslandSplitter &ioSplitter) const = 0 + ///
+ ///
+ public uint BuildIslandSplits(LargeIslandSplitter splitter) => + Jolt.PInvoke.Constraint_BuildIslandSplits(this, splitter); + + /// + /// + /// Drawing interface + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:191 + ///
+ /// virtual void DrawConstraint(DebugRenderer *inRenderer) const = 0 + ///
+ ///
+ public void DrawConstraint(DebugRenderer renderer) => Jolt.PInvoke.Constraint_DrawConstraint(this, renderer); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:192 + ///
+ /// virtual void DrawConstraintLimits(DebugRenderer *inRenderer) const + ///
+ ///
+ public void DrawConstraintLimits(DebugRenderer renderer) => + Jolt.PInvoke.Constraint_DrawConstraintLimits(this, renderer); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:193 + ///
+ /// virtual void DrawConstraintReferenceFrame(DebugRenderer *inRenderer) const + ///
+ ///
+ public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + Jolt.PInvoke.Constraint_DrawConstraintReferenceFrame(this, renderer); + + /// + /// + /// Size of constraint when drawing it through the debug renderer + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:196 + ///
+ /// float GetDrawConstraintSize() const + ///
+ ///
+ public float GetDrawConstraintSize() => Jolt.PInvoke.Constraint_GetDrawConstraintSize(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:197 + ///
+ /// void SetDrawConstraintSize(float inSize) + ///
+ ///
+ public void SetDrawConstraintSize(float size) => Jolt.PInvoke.Constraint_SetDrawConstraintSize(this, size); + + /// + /// + /// Debug function to convert a constraint to its settings, note that this will not save to which bodies the + /// constraint is connected to + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:207 + ///
+ /// virtual Ref<ConstraintSettings> GetConstraintSettings() const = 0 + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public ConstraintSettings GetConstraintSettings() => Jolt.PInvoke.Constraint_GetConstraintSettings(this); + + /// + /// + /// Views this Constraint as the TwoBodyConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public TwoBodyConstraint AsTwoBodyConstraint() => Jolt.PInvoke.Constraint_AsTwoBodyConstraint(this); + + /// + /// + /// Views this Constraint as the FixedConstraint it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public FixedConstraint AsFixedConstraint() => Jolt.PInvoke.Constraint_AsFixedConstraint(this); + + /// + /// + /// Views this Constraint as the PointConstraint it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public PointConstraint AsPointConstraint() => Jolt.PInvoke.Constraint_AsPointConstraint(this); + + /// + /// + /// Views this Constraint as the HingeConstraint it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public HingeConstraint AsHingeConstraint() => Jolt.PInvoke.Constraint_AsHingeConstraint(this); + + /// + /// + /// Views this Constraint as the SliderConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public SliderConstraint AsSliderConstraint() => Jolt.PInvoke.Constraint_AsSliderConstraint(this); + + /// + /// + /// Views this Constraint as the DistanceConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public DistanceConstraint AsDistanceConstraint() => Jolt.PInvoke.Constraint_AsDistanceConstraint(this); + + /// + /// + /// Views this Constraint as the ConeConstraint it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public ConeConstraint AsConeConstraint() => Jolt.PInvoke.Constraint_AsConeConstraint(this); + + /// + /// + /// Views this Constraint as the SwingTwistConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public SwingTwistConstraint AsSwingTwistConstraint() => Jolt.PInvoke.Constraint_AsSwingTwistConstraint(this); + + /// + /// + /// Views this Constraint as the SixDOFConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public SixDOFConstraint AsSixDOFConstraint() => Jolt.PInvoke.Constraint_AsSixDOFConstraint(this); + + /// + /// + /// Views this Constraint as the PathConstraint it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public PathConstraint AsPathConstraint() => Jolt.PInvoke.Constraint_AsPathConstraint(this); + + /// + /// + /// Views this Constraint as the VehicleConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public VehicleConstraint AsVehicleConstraint() => Jolt.PInvoke.Constraint_AsVehicleConstraint(this); + + /// + /// + /// Views this Constraint as the RackAndPinionConstraint it is, or returns a null handle when it is a + /// different kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public RackAndPinionConstraint AsRackAndPinionConstraint() => + Jolt.PInvoke.Constraint_AsRackAndPinionConstraint(this); + + /// + /// + /// Views this Constraint as the GearConstraint it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public GearConstraint AsGearConstraint() => Jolt.PInvoke.Constraint_AsGearConstraint(this); + + /// + /// + /// Views this Constraint as the PulleyConstraint it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public PulleyConstraint AsPulleyConstraint() => Jolt.PInvoke.Constraint_AsPulleyConstraint(this); + + public void AddRef() => Jolt.PInvoke.Constraint_AddRef(this); + + public void Release() => Jolt.PInvoke.Constraint_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.Constraint_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConstraintManager.gen.cs b/Brutal.Jolt/Generated/Classes/ConstraintManager.gen.cs new file mode 100644 index 0000000..2daaa92 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConstraintManager.gen.cs @@ -0,0 +1,333 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A constraint manager manages all constraints of the same type + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:27 + ///
+ /// class ConstraintManager : public NonCopyable + ///
+ ///
+ /// + /// + /// A constraint manager manages all constraints of the same type + /// + /// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library. + /// Its functionality is exposed through PhysicsSystem and BodyInterface. + /// + /// + [InteropHandle] + public readonly partial struct ConstraintManager + { + /// + /// + /// Add a new constraint. This is thread safe. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:38 + ///
+ /// void Add(Constraint **inConstraints, int inNumber) + ///
+ ///
+ /// + /// + /// constraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public unsafe void Add(Ptr constraints, int number) => + Jolt.PInvoke.ConstraintManager_Add(this, constraints, number); + + /// + /// + /// Remove a constraint. This is thread safe. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:41 + ///
+ /// void Remove(Constraint **inConstraint, int inNumber) + ///
+ ///
+ /// + /// + /// constraint is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public unsafe void Remove(Ptr constraint, int number) => + Jolt.PInvoke.ConstraintManager_Remove(this, constraint, number); + + /// + /// + /// Get a list of all constraints + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:44 + ///
+ /// Constraints GetConstraints() const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetConstraints() => + new NativeArray(Jolt.PInvoke.ConstraintManager_GetConstraints(this)); + + /// + /// + /// Get total number of constraints + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:47 + ///
+ /// inline uint32 GetNumConstraints() const + ///
+ ///
+ public uint GetNumConstraints() => Jolt.PInvoke.ConstraintManager_GetNumConstraints(this); + + /// + /// + /// Determine the active constraints of a subset of the constraints + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:50 + ///
+ /// void GetActiveConstraints(uint32 inStartConstraintIdx, uint32 inEndConstraintIdx, Constraint **outActiveConstraints, uint32 &outNumActiveConstraints) const + ///
+ ///
+ /// + /// + /// activeConstraints is a buffer of Constraint handles you allocate and size; the handles the call writes + /// into it are borrowed from their owner - don't Dispose them. + /// + /// + public unsafe void GetActiveConstraints( + uint startConstraintIdx, + uint endConstraintIdx, + Ptr activeConstraints, + out uint numActiveConstraints + ) => + Jolt.PInvoke.ConstraintManager_GetActiveConstraints( + this, + startConstraintIdx, + endConstraintIdx, + activeConstraints, + out numActiveConstraints + ); + + /// + /// + /// Link bodies to form islands + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:53 + ///
+ /// static void sBuildIslands(Constraint **inActiveConstraints, uint32 inNumActiveConstraints, IslandBuilder &ioBuilder, BodyManager &inBodyManager) + ///
+ ///
+ /// + /// + /// activeConstraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public static unsafe void BuildIslands( + Ptr activeConstraints, + uint numActiveConstraints, + IslandBuilder builder, + BodyManager bodyManager + ) => Jolt.PInvoke.ConstraintManager_BuildIslands(activeConstraints, numActiveConstraints, builder, bodyManager); + + /// + /// + /// In order to have a deterministic simulation, we need to sort the constraints of an island before solving + /// them + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:56 + ///
+ /// static void sSortConstraints(Constraint **inActiveConstraints, uint32 *inConstraintIdxBegin, uint32 *inConstraintIdxEnd) + ///
+ ///
+ /// + /// + /// activeConstraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public static unsafe void SortConstraints( + Ptr activeConstraints, + Ptr constraintIdxBegin, + Ptr constraintIdxEnd + ) => Jolt.PInvoke.ConstraintManager_SortConstraints(activeConstraints, constraintIdxBegin, constraintIdxEnd); + + /// + /// + /// Prior to solving the velocity constraints, you must call SetupVelocityConstraints once to precalculate + /// values that are independent of velocity + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:59 + ///
+ /// static void sSetupVelocityConstraints(Constraint **inActiveConstraints, uint32 inNumActiveConstraints, float inDeltaTime) + ///
+ ///
+ /// + /// + /// activeConstraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public static unsafe void SetupVelocityConstraints( + Ptr activeConstraints, + uint numActiveConstraints, + float deltaTime + ) => + Jolt.PInvoke.ConstraintManager_SetupVelocityConstraints(activeConstraints, numActiveConstraints, deltaTime); + + /// + /// + /// This function is called multiple times to iteratively come to a solution that meets all velocity + /// constraints + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:66 + ///
+ /// static bool sSolveVelocityConstraints(Constraint **inActiveConstraints, const uint32 *inConstraintIdxBegin, const uint32 *inConstraintIdxEnd, float inDeltaTime) + ///
+ ///
+ /// + /// + /// activeConstraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public static unsafe bool SolveVelocityConstraints( + Ptr activeConstraints, + Ptr constraintIdxBegin, + Ptr constraintIdxEnd, + float deltaTime + ) => + Jolt.PInvoke.ConstraintManager_SolveVelocityConstraints( + activeConstraints, + constraintIdxBegin, + constraintIdxEnd, + deltaTime + ); + + /// + /// + /// This function is called multiple times to iteratively come to a solution that meets all position + /// constraints + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:69 + ///
+ /// static bool sSolvePositionConstraints(Constraint **inActiveConstraints, const uint32 *inConstraintIdxBegin, const uint32 *inConstraintIdxEnd, float inDeltaTime, float inBaumgarte) + ///
+ ///
+ /// + /// + /// activeConstraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public static unsafe bool SolvePositionConstraints( + Ptr activeConstraints, + Ptr constraintIdxBegin, + Ptr constraintIdxEnd, + float deltaTime, + float baumgarte + ) => + Jolt.PInvoke.ConstraintManager_SolvePositionConstraints( + activeConstraints, + constraintIdxBegin, + constraintIdxEnd, + deltaTime, + baumgarte + ); + + /// + /// + /// Draw all constraints + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:73 + ///
+ /// void DrawConstraints(DebugRenderer *inRenderer) const + ///
+ ///
+ public void DrawConstraints(DebugRenderer renderer) => + Jolt.PInvoke.ConstraintManager_DrawConstraints(this, renderer); + + /// + /// + /// Draw all constraint limits + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:76 + ///
+ /// void DrawConstraintLimits(DebugRenderer *inRenderer) const + ///
+ ///
+ public void DrawConstraintLimits(DebugRenderer renderer) => + Jolt.PInvoke.ConstraintManager_DrawConstraintLimits(this, renderer); + + /// + /// + /// Draw all constraint reference frames + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:79 + ///
+ /// void DrawConstraintReferenceFrame(DebugRenderer *inRenderer) const + ///
+ ///
+ public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + Jolt.PInvoke.ConstraintManager_DrawConstraintReferenceFrame(this, renderer); + + /// + /// + /// Lock all constraints. This should only be done during PhysicsSystem::Update(). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:89 + ///
+ /// void LockAllConstraints() + ///
+ ///
+ public void LockAllConstraints() => Jolt.PInvoke.ConstraintManager_LockAllConstraints(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintManager.h:90 + ///
+ /// void UnlockAllConstraints() + ///
+ ///
+ public void UnlockAllConstraints() => Jolt.PInvoke.ConstraintManager_UnlockAllConstraints(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ConstraintSettings.gen.cs new file mode 100644 index 0000000..c8eef14 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConstraintSettings.gen.cs @@ -0,0 +1,281 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class used to store the configuration of a constraint. Allows run-time creation of constraints. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:64 + ///
+ /// class ConstraintSettings : public SerializableObject, public RefTarget<ConstraintSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConstraintSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:66 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.ConstraintSettings_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:66 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.ConstraintSettings_CastTo(this, rtti); + + /// + /// + /// Saves the contents of the constraint settings in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:72 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.ConstraintSettings_SaveBinaryState(this, stream); + + /// + /// + /// Creates a constraint of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:75 + ///
+ /// static ConstraintResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static ConstraintSettings RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.ConstraintSettings_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Views this ConstraintSettings as the SwingTwistConstraintSettings it is, or returns a null handle when + /// it is a different kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public SwingTwistConstraintSettings AsSwingTwistConstraintSettings() => + Jolt.PInvoke.ConstraintSettings_AsSwingTwistConstraintSettings(this); + + /// + /// + /// If this constraint is enabled initially. Use Constraint::SetEnabled to toggle after creation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:78 + ///
+ /// bool mEnabled = true + ///
+ ///
+ public bool GetEnabled() => Jolt.PInvoke.ConstraintSettings_GetEnabled(this); + + /// + /// + /// If this constraint is enabled initially. Use Constraint::SetEnabled to toggle after creation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:78 + ///
+ /// bool mEnabled = true + ///
+ ///
+ public void SetEnabled(bool value) => Jolt.PInvoke.ConstraintSettings_SetEnabled(this, value); + + /// + /// + /// Priority of the constraint when solving. Higher numbers are more likely to be solved correctly. Note + /// that if you want a deterministic simulation and you cannot guarantee the order in which constraints are + /// added/removed, you can make the priority for all constraints unique to get a deterministic ordering. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:82 + ///
+ /// uint32 mConstraintPriority = 0 + ///
+ ///
+ public uint GetConstraintPriority() => Jolt.PInvoke.ConstraintSettings_GetConstraintPriority(this); + + /// + /// + /// Priority of the constraint when solving. Higher numbers are more likely to be solved correctly. Note + /// that if you want a deterministic simulation and you cannot guarantee the order in which constraints are + /// added/removed, you can make the priority for all constraints unique to get a deterministic ordering. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:82 + ///
+ /// uint32 mConstraintPriority = 0 + ///
+ ///
+ public void SetConstraintPriority(uint value) => + Jolt.PInvoke.ConstraintSettings_SetConstraintPriority(this, value); + + /// + /// + /// Used only when the constraint is active. Override for the number of solver velocity iterations to run, 0 + /// means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use is the max + /// of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:85 + ///
+ /// uint mNumVelocityStepsOverride = 0 + ///
+ ///
+ public uint GetNumVelocityStepsOverride() => Jolt.PInvoke.ConstraintSettings_GetNumVelocityStepsOverride(this); + + /// + /// + /// Used only when the constraint is active. Override for the number of solver velocity iterations to run, 0 + /// means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use is the max + /// of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:85 + ///
+ /// uint mNumVelocityStepsOverride = 0 + ///
+ ///
+ public void SetNumVelocityStepsOverride(uint value) => + Jolt.PInvoke.ConstraintSettings_SetNumVelocityStepsOverride(this, value); + + /// + /// + /// Used only when the constraint is active. Override for the number of solver position iterations to run, 0 + /// means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use is the max + /// of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:88 + ///
+ /// uint mNumPositionStepsOverride = 0 + ///
+ ///
+ public uint GetNumPositionStepsOverride() => Jolt.PInvoke.ConstraintSettings_GetNumPositionStepsOverride(this); + + /// + /// + /// Used only when the constraint is active. Override for the number of solver position iterations to run, 0 + /// means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use is the max + /// of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:88 + ///
+ /// uint mNumPositionStepsOverride = 0 + ///
+ ///
+ public void SetNumPositionStepsOverride(uint value) => + Jolt.PInvoke.ConstraintSettings_SetNumPositionStepsOverride(this, value); + + /// + /// + /// Size of constraint when drawing it through the debug renderer + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:91 + ///
+ /// float mDrawConstraintSize = 1.0f + ///
+ ///
+ public float GetDrawConstraintSize() => Jolt.PInvoke.ConstraintSettings_GetDrawConstraintSize(this); + + /// + /// + /// Size of constraint when drawing it through the debug renderer + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:91 + ///
+ /// float mDrawConstraintSize = 1.0f + ///
+ ///
+ public void SetDrawConstraintSize(float value) => + Jolt.PInvoke.ConstraintSettings_SetDrawConstraintSize(this, value); + + /// + /// + /// User data value (can be used by application) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:94 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.ConstraintSettings_GetUserData(this); + + /// + /// + /// User data value (can be used by application) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:94 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public void SetUserData(ulong value) => Jolt.PInvoke.ConstraintSettings_SetUserData(this, value); + + public void AddRef() => Jolt.PInvoke.ConstraintSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.ConstraintSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.ConstraintSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ContactListener.gen.cs b/Brutal.Jolt/Generated/Classes/ContactListener.gen.cs new file mode 100644 index 0000000..eca3b5c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ContactListener.gen.cs @@ -0,0 +1,184 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A listener class that receives collision contact events. It can be registered through + /// PhysicsSystem::SetContactListener. Only a single contact listener can be registered. A common pattern is to + /// create a contact listener that casts Body::GetUserData to a game object and then forwards the call to a + /// handler specific for that game object. Typically this is done on both objects involved in a collision event. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:78 + ///
+ /// class ContactListener + ///
+ ///
+ /// + /// + /// A listener class that receives collision contact events. It can be registered through PhysicsSystem::SetContactListener. + /// Only a single contact listener can be registered. A common pattern is to create a contact listener that casts Body::GetUserData + /// to a game object and then forwards the call to a handler specific for that game object. + /// Typically this is done on both objects involved in a collision event. + /// + /// Note that contact listener callbacks are called from multiple threads at the same time when all bodies are locked, this means you cannot + /// use PhysicsSystem::GetBodyInterface / PhysicsSystem::GetBodyLockInterface but must use PhysicsSystem::GetBodyInterfaceNoLock / PhysicsSystem::GetBodyLockInterfaceNoLock instead. + /// If you use a locking interface, the simulation will deadlock. You're only allowed to read from the bodies and you can't change physics state. + /// During OnContactRemoved you cannot access the bodies at all, see the comments at that function. + /// + /// While a callback can come from multiple threads, all callbacks relating to a single body pair are serialized. + /// For EMotionQuality::Discrete bodies, during every 'collision step' in a PhysicsSystem::Update, you will receive at most one OnContactAdded/Persisted/Removed call per body/sub shape pair. + /// For EMotionQuality::LinearCast bodies, you may get an OnContactAdded followed by an OnContactPersisted for the same body/sub shape pair. + /// This happens when a body collides both in the discrete and the continuous collision detection stage. + /// + /// + [InteropHandle] + public readonly partial struct ContactListener : IDisposable + { + public static ContactListener Create() => Jolt.PInvoke.ContactListener_Create(); + + /// + /// + /// Called after detecting a collision between a body pair, but before calling OnContactAdded and before + /// adding the contact constraint. If the function rejects the contact, the contact will not be processed by + /// the simulation. This is a rather expensive time to reject a contact point since a lot of the collision + /// detection has happened already, make sure you filter out the majority of undesired body pairs through + /// the ObjectLayerPairFilter that is registered on the PhysicsSystem. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:96 + ///
+ /// virtual ValidateResult OnContactValidate(const Body &inBody1, const Body &inBody2, RVec3Arg inBaseOffset, const CollideShapeResult &inCollisionResult) + ///
+ ///
+ /// + /// + /// Called after detecting a collision between a body pair, but before calling OnContactAdded and before adding the contact constraint. + /// If the function rejects the contact, the contact will not be processed by the simulation. + /// This is a rather expensive time to reject a contact point since a lot of the collision detection has happened already, make sure you + /// filter out the majority of undesired body pairs through the ObjectLayerPairFilter that is registered on the PhysicsSystem. + /// + /// This function may not be called again the next update if a contact persists and no new contact pairs between sub shapes are found. + /// + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! See detailed class description of ContactListener. + /// + /// Body 1 will have a motion type that is larger or equal than body 2's motion type (order from large to small: dynamic -> kinematic -> static). When motion types are equal, they are ordered by BodyID. + /// + /// The collision result (inCollisionResult) is reported relative to inBaseOffset. + /// + /// + public ValidateResult OnContactValidate( + Body body1, + Body body2, + float3 baseOffset, + in CollideShapeResult collisionResult + ) => Jolt.PInvoke.ContactListener_OnContactValidate(this, body1, body2, baseOffset, in collisionResult); + + /// + /// + /// Called whenever a new contact point is detected. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:110 + ///
+ /// virtual void OnContactAdded(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, ContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever a new contact point is detected. + /// + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! See detailed class description of ContactListener. + /// + /// Body 1 and 2 will be sorted such that body 1 ID < body 2 ID, so body 1 may not be dynamic. + /// + /// Note that only active bodies will report contacts, as soon as a body goes to sleep the contacts between that body and all other + /// bodies will receive an OnContactRemoved callback, if this is the case then Body::IsActive() will return false during the callback. + /// + /// When contacts are added, the constraint solver has not run yet, so the collision impulse is unknown at that point. + /// The velocities of inBody1 and inBody2 are the velocities before the contact has been resolved, so you can use this to + /// estimate the collision impulse to e.g. determine the volume of the impact sound to play (see: EstimateCollisionResponse). + /// + /// + public void OnContactAdded(Body body1, Body body2, in ContactManifold manifold, ref ContactSettings settings) => + Jolt.PInvoke.ContactListener_OnContactAdded(this, body1, body2, in manifold, ref settings); + + /// + /// + /// Called whenever a contact is detected that was also detected last update. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:123 + ///
+ /// virtual void OnContactPersisted(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, ContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever a contact is detected that was also detected last update. + /// + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! See detailed class description of ContactListener. + /// + /// Body 1 and 2 will be sorted such that body 1 ID < body 2 ID, so body 1 may not be dynamic. + /// + /// If the structure of the shape of a body changes between simulation steps (e.g. by adding/removing a child shape of a compound shape), + /// it is possible that the same sub shape ID used to identify the removed child shape is now reused for a different child shape. The physics + /// system cannot detect this, so may send a 'contact persisted' callback even though the contact is now on a different child shape. You can + /// detect this by keeping the old shape (before adding/removing a part) around until the next PhysicsSystem::Update (when the OnContactPersisted + /// callbacks are triggered) and resolving the sub shape ID against both the old and new shape to see if they still refer to the same child shape. + /// + /// + public void OnContactPersisted( + Body body1, + Body body2, + in ContactManifold manifold, + ref ContactSettings settings + ) => Jolt.PInvoke.ContactListener_OnContactPersisted(this, body1, body2, in manifold, ref settings); + + /// + /// + /// Called whenever a contact was detected last update but is not detected anymore. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:140 + ///
+ /// virtual void OnContactRemoved(const SubShapeIDPair &inSubShapePair) + ///
+ ///
+ /// + /// + /// Called whenever a contact was detected last update but is not detected anymore. + /// + /// You cannot access the bodies at the time of this callback because: + /// - All bodies are locked at the time of this callback. + /// - Some properties of the bodies are being modified from another thread at the same time. + /// - The body may have been removed and destroyed (you'll receive an OnContactRemoved callback in the PhysicsSystem::Update after the body has been removed). + /// + /// Cache what you need in the OnContactAdded and OnContactPersisted callbacks and store it in a separate structure to use during this callback. + /// Alternatively, you could just record that the contact was removed and process it after PhysicsSystem::Update. + /// + /// Body 1 and 2 will be sorted such that body 1 ID < body 2 ID, so body 1 may not be dynamic. + /// + /// The sub shape IDs were created in the previous simulation step, so if the structure of a shape changes (e.g. by adding/removing a child shape of a compound shape), + /// the sub shape ID may not be valid / may not point to the same sub shape anymore. + /// If you want to know if this is the last contact between the two bodies, use PhysicsSystem::WereBodiesInContact. + /// + /// + public void OnContactRemoved(in SubShapeIDPair subShapePair) => + Jolt.PInvoke.ContactListener_OnContactRemoved(this, in subShapePair); + + public void Dispose() => Jolt.PInvoke.ContactListener_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConvexHullBuilder.gen.cs b/Brutal.Jolt/Generated/Classes/ConvexHullBuilder.gen.cs new file mode 100644 index 0000000..40685c9 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConvexHullBuilder.gen.cs @@ -0,0 +1,222 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A convex hull builder that tries to create hulls as accurately as possible. Used for offline processing. + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:20 + ///
+ /// class ConvexHullBuilder : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConvexHullBuilder : IDisposable + { + /// + /// + /// Result enum that indicates how the hull got created + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:96 + ///
+ /// enum class EResult + ///
+ ///
+ public enum Result : int + { + /// + /// + /// Hull building finished successfully + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:98 + ///
+ /// Success + ///
+ ///
+ Success, + + /// + /// + /// Hull building finished successfully, but the desired accuracy was not reached because the max + /// vertices limit was reached + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:99 + ///
+ /// MaxVerticesReached + ///
+ ///
+ MaxVerticesReached, + + /// + /// + /// Too few points to create a hull + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:100 + ///
+ /// TooFewPoints + ///
+ ///
+ TooFewPoints, + + /// + /// + /// Too few faces in the created hull (signifies precision errors during building) + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:101 + ///
+ /// TooFewFaces + ///
+ ///
+ TooFewFaces, + + /// + /// + /// Degenerate hull detected + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:102 + ///
+ /// Degenerate + ///
+ ///
+ Degenerate, + } + + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:263 + ///
+ /// struct Coplanar + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct Coplanar + { + /// + /// + /// Index in mPositions + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:265 + ///
+ /// int mPositionIdx + ///
+ ///
+ [FieldOffset(0)] + public int PositionIdx; + + /// + /// + /// Distance to the edge of closest face (should be > 0) + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:266 + ///
+ /// float mDistanceSq + ///
+ ///
+ [FieldOffset(4)] + public float DistanceSq; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:90 + ///
+ /// explicit ConvexHullBuilder(const Positions &inPositions) + ///
+ ///
+ /// + /// + /// positions is copied into a native container the object keeps; the span is only read. + /// + /// + public static unsafe ConvexHullBuilder Create(ReadOnlySpan positions) + { + fixed (float3* positions_fixed = positions) + { + return Jolt.PInvoke.ConvexHullBuilder_Create(positions_fixed, (nuint)positions.Length); + } + } + + /// + /// + /// Returns the amount of vertices that are currently used by the hull + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:114 + ///
+ /// int GetNumVerticesUsed() const + ///
+ ///
+ public int GetNumVerticesUsed() => Jolt.PInvoke.ConvexHullBuilder_GetNumVerticesUsed(this); + + /// + /// + /// Returns true if the hull contains a polygon with inIndices (counter clockwise indices in mPositions) + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:117 + ///
+ /// bool ContainsFace(const Array<int> &inIndices) const + ///
+ ///
+ /// + /// + /// indices is copied into a native container for the call; the span is only read. + /// + /// + public unsafe bool ContainsFace(ReadOnlySpan indices) + { + fixed (int* indices_fixed = indices) + { + return Jolt.PInvoke.ConvexHullBuilder_ContainsFace(this, indices_fixed, (nuint)indices.Length); + } + } + + /// + /// + /// Calculate the center of mass and the volume of the current convex hull + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder.h:120 + ///
+ /// void GetCenterOfMassAndVolume(Vec3 &outCenterOfMass, float &outVolume) const + ///
+ ///
+ public void GetCenterOfMassAndVolume(out float3 centerOfMass, out float volume) => + Jolt.PInvoke.ConvexHullBuilder_GetCenterOfMassAndVolume(this, out centerOfMass, out volume); + + public void Dispose() => Jolt.PInvoke.ConvexHullBuilder_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConvexHullBuilder2D.gen.cs b/Brutal.Jolt/Generated/Classes/ConvexHullBuilder2D.gen.cs new file mode 100644 index 0000000..4de9fc1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConvexHullBuilder2D.gen.cs @@ -0,0 +1,144 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A convex hull builder that tries to create 2D hulls as accurately as possible. Used for offline processing. + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder2D.h:14 + ///
+ /// class ConvexHullBuilder2D : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConvexHullBuilder2D : IDisposable + { + /// + /// + /// Result enum that indicates how the hull got created + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder2D.h:28 + ///
+ /// enum class EResult + ///
+ ///
+ public enum Result : int + { + /// + /// + /// Hull building finished successfully + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder2D.h:30 + ///
+ /// Success + ///
+ ///
+ Success, + + /// + /// + /// Hull building finished successfully, but the desired accuracy was not reached because the max + /// vertices limit was reached + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder2D.h:31 + ///
+ /// MaxVerticesReached + ///
+ ///
+ MaxVerticesReached, + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder2D.h:22 + ///
+ /// explicit ConvexHullBuilder2D(const Positions &inPositions) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inPositions Positions used to make the hull. Uses X and Y component of Vec3 only! + /// + /// + /// positions is copied into a native container the object keeps; the span is only read. + /// + /// + public static unsafe ConvexHullBuilder2D Create(ReadOnlySpan positions) + { + fixed (float3* positions_fixed = positions) + { + return Jolt.PInvoke.ConvexHullBuilder2D_Create(positions_fixed, (nuint)positions.Length); + } + } + + /// + /// + /// Takes all positions as provided by the constructor and use them to build a hull Any points that are + /// closer to the hull than inTolerance will be discarded + /// + /// + /// C++: + /// Jolt/Geometry/ConvexHullBuilder2D.h:41 + ///
+ /// EResult Initialize(int inIdx1, int inIdx2, int inIdx3, int inMaxVertices, float inTolerance, Edges &outEdges) + ///
+ ///
+ /// + /// + /// Takes all positions as provided by the constructor and use them to build a hull + /// Any points that are closer to the hull than inTolerance will be discarded + /// @param inIdx1 , inIdx2 , inIdx3 The indices to use as initial hull (in any order) + /// @param inMaxVertices Max vertices to allow in the hull. Specify INT_MAX if there is no limit. + /// @param inTolerance Max distance that a point is allowed to be outside of the hull + /// @param outEdges On success this will contain the list of indices that form the hull (counter clockwise) + /// @return Status code that reports if the hull was created or not + /// + /// + /// edges is an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public ConvexHullBuilder2D.Result Initialize( + int idx1, + int idx2, + int idx3, + int maxVertices, + float tolerance, + out NativeArray edges + ) + { + var _result = Jolt.PInvoke.ConvexHullBuilder2D_Initialize( + this, + idx1, + idx2, + idx3, + maxVertices, + tolerance, + out var edges_raw + ); + edges = new NativeArray(edges_raw); + return _result; + } + + public void Dispose() => Jolt.PInvoke.ConvexHullBuilder2D_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConvexHullShape.gen.cs b/Brutal.Jolt/Generated/Classes/ConvexHullShape.gen.cs new file mode 100644 index 0000000..fa2c319 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConvexHullShape.gen.cs @@ -0,0 +1,645 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A convex hull + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:40 + ///
+ /// class ConvexHullShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConvexHullShape : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:167 + ///
+ /// struct Face + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct Face + { + /// + /// + /// First index in mVertexIdx to use + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:169 + ///
+ /// uint16 mFirstVertex + ///
+ ///
+ [FieldOffset(0)] + public ushort FirstVertex; + + /// + /// + /// Number of vertices in the mVertexIdx to use + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:170 + ///
+ /// uint16 mNumVertices = 0 + ///
+ ///
+ [FieldOffset(2)] + public ushort NumVertices; + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:176 + ///
+ /// struct Point + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct Point + { + /// + /// + /// Position of vertex + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:178 + ///
+ /// Vec3 mPosition + ///
+ ///
+ [FieldOffset(0)] + public float3 Position; + + /// + /// + /// Number of faces in the face array below + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:179 + ///
+ /// int mNumFaces = 0 + ///
+ ///
+ [FieldOffset(16)] + public int NumFaces; + + /// + /// + /// Indices of 3 neighboring faces with the biggest difference in normal (used to shift vertices for + /// convex radius) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:180 + ///
+ /// int mFaces[3] = { -1, -1, -1 } + ///
+ ///
+ [FieldOffset(20)] + public int_3 Faces; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:50 + ///
+ /// ConvexHullShape() + ///
+ ///
+ public static ConvexHullShape Create() => Jolt.PInvoke.ConvexHullShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:51 + ///
+ /// ConvexHullShape(const ConvexHullShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static ConvexHullShape Create(ConvexHullShapeSettings settings) + { + var _handle = Jolt.PInvoke.ConvexHullShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + /// + /// Debugging helper draw function that draws how all points are moved when a shape is shrunk by the convex + /// radius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:82 + ///
+ /// void DrawShrunkShape(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const + ///
+ ///
+ public void DrawShrunkShape(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + Jolt.PInvoke.ConvexHullShape_DrawShrunkShape(this, renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Get the convex radius of this convex hull + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:111 + ///
+ /// float GetConvexRadius() const + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.ConvexHullShape_GetConvexRadius(this); + + /// + /// + /// Get the planes of this convex hull + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:114 + ///
+ /// const Array<Plane> & GetPlanes() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetPlanes() + { + Jolt.PInvoke.ConvexHullShape_GetPlanes(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Get the number of vertices in this convex hull + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:117 + ///
+ /// inline uint GetNumPoints() const + ///
+ ///
+ public uint GetNumPoints() => Jolt.PInvoke.ConvexHullShape_GetNumPoints(this); + + /// + /// + /// Get a vertex of this convex hull relative to the center of mass + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:120 + ///
+ /// inline Vec3 GetPoint(uint inIndex) const + ///
+ ///
+ public float3 GetPoint(uint index) + { + var _result = Jolt.PInvoke.ConvexHullShape_GetPoint(this, index, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of points." + ); + return _result; + } + + /// + /// + /// Get the number of faces in this convex hull + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:123 + ///
+ /// inline uint GetNumFaces() const + ///
+ ///
+ public uint GetNumFaces() => Jolt.PInvoke.ConvexHullShape_GetNumFaces(this); + + /// + /// + /// Get the number of vertices in a face + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:126 + ///
+ /// inline uint GetNumVerticesInFace(uint inFaceIndex) const + ///
+ ///
+ public uint GetNumVerticesInFace(uint faceIndex) + { + var _result = Jolt.PInvoke.ConvexHullShape_GetNumVerticesInFace(this, faceIndex, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(faceIndex), + faceIndex, + "Expected an index below the number of faces." + ); + return _result; + } + + /// + /// + /// Get the vertices indices of a face + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:133 + ///
+ /// inline uint GetFaceVertices(uint inFaceIndex, uint inMaxVertices, uint *outVertices) const + ///
+ ///
+ /// + /// + /// Get the vertices indices of a face + /// @param inFaceIndex Index of the face. + /// @param inMaxVertices Maximum number of vertices to return. + /// @param outVertices Array of vertices indices, must be at least inMaxVertices in size, the vertices are returned in counter clockwise order and the positions can be obtained using GetPoint(index). + /// @return Number of vertices in face, if this is bigger than inMaxVertices, not all vertices were retrieved. + /// + /// + /// vertices is the buffer the native call fills, and its capacity travels with it: the call writes at most + /// as many elements as the span holds, and only for the duration of the call. + /// + /// + public unsafe uint GetFaceVertices(uint faceIndex, Span vertices) + { + fixed (uint* vertices_fixed = vertices) + { + var _result = Jolt.PInvoke.ConvexHullShape_GetFaceVertices( + this, + faceIndex, + (uint)vertices.Length, + vertices_fixed, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(faceIndex), + faceIndex, + "Expected an index below the number of faces." + ); + return _result; + } + } + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:144 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.ConvexHullShape_Register(); + + /// + /// + /// Maximum amount of points supported in a convex hull. Note that while constructing a hull, interior + /// points are discarded so you can provide more points. The ConvexHullShapeSettings::Create function will + /// return an error when too many points are provided. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:47 + ///
+ /// static constexpr int cMaxPointsInHull = 256 + ///
+ ///
+ public static int GetMaxPointsInHull() => Jolt.PInvoke.ConvexHullShape_GetMaxPointsInHull(); + + /// + /// + /// Draw the outlines of the faces of the convex hull when drawing the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:148 + ///
+ /// inline static bool sDrawFaceOutlines = false + ///
+ ///
+ public static bool GetDrawFaceOutlines() => Jolt.PInvoke.ConvexHullShape_GetDrawFaceOutlines(); + + /// + /// + /// Draw the outlines of the faces of the convex hull when drawing the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:148 + ///
+ /// inline static bool sDrawFaceOutlines = false + ///
+ ///
+ public static void SetDrawFaceOutlines(bool value) => Jolt.PInvoke.ConvexHullShape_SetDrawFaceOutlines(value); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(ConvexHullShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(ConvexHullShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConvexHullShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ConvexHullShapeSettings.gen.cs new file mode 100644 index 0000000..a3d9785 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConvexHullShapeSettings.gen.cs @@ -0,0 +1,241 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a ConvexHullShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:17 + ///
+ /// class ConvexHullShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConvexHullShapeSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:28 + ///
+ /// explicit ConvexHullShapeSettings(const Array<Vec3> &inPoints, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ /// + /// + /// points is copied into a native container for the call; the span is only read. + /// + /// + public static unsafe ConvexHullShapeSettings Create( + ReadOnlySpan points, + float convexRadius = 0.05f, + PhysicsMaterial material = default + ) + { + fixed (float3* points_fixed = points) + { + return Jolt.PInvoke.ConvexHullShapeSettings_Create( + points_fixed, + (nuint)points.Length, + convexRadius, + material + ); + } + } + + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:23 + ///
+ /// ConvexHullShapeSettings() = default + ///
+ ///
+ public static ConvexHullShapeSettings Create() => Jolt.PInvoke.ConvexHullShapeSettings_Create_2(); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Points to create the hull from. Note that these points don't need to be the vertices of the convex hull, + /// they can contain interior points or points on faces/edges. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:33 + ///
+ /// Array<Vec3> mPoints + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public NativeArray GetPoints() => + new NativeArray(Jolt.PInvoke.ConvexHullShapeSettings_GetPoints(this)); + + /// + /// + /// Points to create the hull from. Note that these points don't need to be the vertices of the convex hull, + /// they can contain interior points or points on faces/edges. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:33 + ///
+ /// Array<Vec3> mPoints + ///
+ ///
+ public unsafe void SetPoints(ReadOnlySpan value) + { + fixed (float3* value_fixed = value) + { + Jolt.PInvoke.ConvexHullShapeSettings_SetPoints(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Convex radius as supplied by the constructor. Note that during hull creation the convex radius can be + /// made smaller if the value is too big for the hull. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:34 + ///
+ /// float mMaxConvexRadius = 0.0f + ///
+ ///
+ public float GetMaxConvexRadius() => Jolt.PInvoke.ConvexHullShapeSettings_GetMaxConvexRadius(this); + + /// + /// + /// Convex radius as supplied by the constructor. Note that during hull creation the convex radius can be + /// made smaller if the value is too big for the hull. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:34 + ///
+ /// float mMaxConvexRadius = 0.0f + ///
+ ///
+ public void SetMaxConvexRadius(float value) => + Jolt.PInvoke.ConvexHullShapeSettings_SetMaxConvexRadius(this, value); + + /// + /// + /// Maximum distance between the shrunk hull + convex radius and the actual hull. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:35 + ///
+ /// float mMaxErrorConvexRadius = 0.05f + ///
+ ///
+ public float GetMaxErrorConvexRadius() => Jolt.PInvoke.ConvexHullShapeSettings_GetMaxErrorConvexRadius(this); + + /// + /// + /// Maximum distance between the shrunk hull + convex radius and the actual hull. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:35 + ///
+ /// float mMaxErrorConvexRadius = 0.05f + ///
+ ///
+ public void SetMaxErrorConvexRadius(float value) => + Jolt.PInvoke.ConvexHullShapeSettings_SetMaxErrorConvexRadius(this, value); + + /// + /// + /// Points are allowed this far outside of the hull (increasing this yields a hull with less vertices). Note + /// that the actual used value can be larger if the points of the hull are far apart. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:36 + ///
+ /// float mHullTolerance = 1.0e-3f + ///
+ ///
+ public float GetHullTolerance() => Jolt.PInvoke.ConvexHullShapeSettings_GetHullTolerance(this); + + /// + /// + /// Points are allowed this far outside of the hull (increasing this yields a hull with less vertices). Note + /// that the actual used value can be larger if the points of the hull are far apart. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:36 + ///
+ /// float mHullTolerance = 1.0e-3f + ///
+ ///
+ public void SetHullTolerance(float value) => Jolt.PInvoke.ConvexHullShapeSettings_SetHullTolerance(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(ConvexHullShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(ConvexHullShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConvexShape.gen.cs b/Brutal.Jolt/Generated/Classes/ConvexShape.gen.cs new file mode 100644 index 0000000..f299372 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConvexShape.gen.cs @@ -0,0 +1,407 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for all convex shapes. Defines a virtual interface. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:35 + ///
+ /// class ConvexShape : public Shape + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConvexShape : IDisposable + { + /// + /// + /// How the GetSupport function should behave + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:91 + ///
+ /// enum class ESupportMode + ///
+ ///
+ public enum SupportMode : int + { + /// + /// + /// Return the shape excluding the convex radius, Support::GetConvexRadius will return the convex radius + /// if there is one, but adding this radius may not result in the most accurate/efficient representation + /// of shapes with sharp edges + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:93 + ///
+ /// ExcludeConvexRadius + ///
+ ///
+ ExcludeConvexRadius, + + /// + /// + /// Return the shape including the convex radius, Support::GetSupport includes the convex radius if + /// there is one, Support::GetConvexRadius will return 0 + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:94 + ///
+ /// IncludeConvexRadius + ///
+ ///
+ IncludeConvexRadius, + + /// + /// + /// Use both Support::GetSupport add Support::GetConvexRadius to get a support point that matches the + /// original shape as accurately/efficiently as possible + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:95 + ///
+ /// Default + ///
+ ///
+ Default, + } + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:106 + ///
+ /// const PhysicsMaterial * GetMaterial() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial() => Jolt.PInvoke.ConvexShape_GetMaterial(this); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + /// + /// Material of the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:105 + ///
+ /// void SetMaterial(const PhysicsMaterial *inMaterial) + ///
+ ///
+ public void SetMaterial(PhysicsMaterial material) => Jolt.PInvoke.ConvexShape_SetMaterial(this, material); + + /// + /// + /// Set density of the shape (kg / m^3) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:109 + ///
+ /// void SetDensity(float inDensity) + ///
+ ///
+ public void SetDensity(float density) => Jolt.PInvoke.ConvexShape_SetDensity(this, density); + + /// + /// + /// Get density of the shape (kg / m^3) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:112 + ///
+ /// float GetDensity() const + ///
+ ///
+ public float GetDensity() => Jolt.PInvoke.ConvexShape_GetDensity(this); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:128 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.ConvexShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(ConvexShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ConvexShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ConvexShapeSettings.gen.cs new file mode 100644 index 0000000..997816b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ConvexShapeSettings.gen.cs @@ -0,0 +1,124 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a ConvexShape (abstract) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:17 + ///
+ /// class ConvexShapeSettings : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct ConvexShapeSettings : IDisposable + { + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + /// + /// Set the density of the object in kg / m^3 + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:27 + ///
+ /// void SetDensity(float inDensity) + ///
+ ///
+ public void SetDensity(float density) => Jolt.PInvoke.ConvexShapeSettings_SetDensity(this, density); + + /// + /// + /// Material assigned to this shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:30 + ///
+ /// RefConst<PhysicsMaterial> mMaterial + ///
+ ///
+ /// + /// + /// Properties + /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial() => Jolt.PInvoke.ConvexShapeSettings_GetMaterial(this); + + /// + /// + /// Material assigned to this shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:30 + ///
+ /// RefConst<PhysicsMaterial> mMaterial + ///
+ ///
+ /// + /// + /// Properties + /// + /// + public void SetMaterial(PhysicsMaterial value) => Jolt.PInvoke.ConvexShapeSettings_SetMaterial(this, value); + + /// + /// + /// Uniform density of the interior of the convex object (kg / m^3) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ConvexShape.h:31 + ///
+ /// float mDensity = 1000.0f + ///
+ ///
+ public float GetDensity() => Jolt.PInvoke.ConvexShapeSettings_GetDensity(this); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(ConvexShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CylinderShape.gen.cs b/Brutal.Jolt/Generated/Classes/CylinderShape.gen.cs new file mode 100644 index 0000000..e187ac8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CylinderShape.gen.cs @@ -0,0 +1,400 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:34 + ///
+ /// class CylinderShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct CylinderShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:40 + ///
+ /// CylinderShape() + ///
+ ///
+ public static CylinderShape Create() => Jolt.PInvoke.CylinderShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:41 + ///
+ /// CylinderShape(const CylinderShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static CylinderShape Create(CylinderShapeSettings settings) + { + var _handle = Jolt.PInvoke.CylinderShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create a shape centered around the origin with one top at (0, -inHalfHeight, 0) and the other at (0, + /// inHalfHeight, 0) and radius inRadius. (internally the convex radius will be subtracted from the cylinder + /// the total cylinder will not grow with the convex radius, but the edges of the cylinder will be rounded a + /// bit). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:45 + ///
+ /// CylinderShape(float inHalfHeight, float inRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static CylinderShape Create( + float halfHeight, + float radius, + float convexRadius = 0.05f, + PhysicsMaterial material = default + ) => Jolt.PInvoke.CylinderShape_Create_3(halfHeight, radius, convexRadius, material); + + /// + /// + /// Get half height of cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:48 + ///
+ /// float GetHalfHeight() const + ///
+ ///
+ public float GetHalfHeight() => Jolt.PInvoke.CylinderShape_GetHalfHeight(this); + + /// + /// + /// Get radius of cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:51 + ///
+ /// float GetRadius() const + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.CylinderShape_GetRadius(this); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Get the convex radius of this cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:102 + ///
+ /// float GetConvexRadius() const + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.CylinderShape_GetConvexRadius(this); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:111 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.CylinderShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(CylinderShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(CylinderShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/CylinderShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/CylinderShapeSettings.gen.cs new file mode 100644 index 0000000..b8edbc3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/CylinderShapeSettings.gen.cs @@ -0,0 +1,168 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a CylinderShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:13 + ///
+ /// class CylinderShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct CylinderShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:19 + ///
+ /// CylinderShapeSettings() = default + ///
+ ///
+ public static CylinderShapeSettings Create() => Jolt.PInvoke.CylinderShapeSettings_Create(); + + /// + /// + /// Create a shape centered around the origin with one top at (0, -inHalfHeight, 0) and the other at (0, + /// inHalfHeight, 0) and radius inRadius. (internally the convex radius will be subtracted from the cylinder + /// the total cylinder will not grow with the convex radius, but the edges of the cylinder will be rounded a + /// bit). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:23 + ///
+ /// CylinderShapeSettings(float inHalfHeight, float inRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static CylinderShapeSettings Create( + float halfHeight, + float radius, + float convexRadius = 0.05f, + PhysicsMaterial material = default + ) => Jolt.PInvoke.CylinderShapeSettings_Create_2(halfHeight, radius, convexRadius, material); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:28 + ///
+ /// float mHalfHeight = 0.0f + ///
+ ///
+ public float GetHalfHeight() => Jolt.PInvoke.CylinderShapeSettings_GetHalfHeight(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:28 + ///
+ /// float mHalfHeight = 0.0f + ///
+ ///
+ public void SetHalfHeight(float value) => Jolt.PInvoke.CylinderShapeSettings_SetHalfHeight(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:29 + ///
+ /// float mRadius = 0.0f + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.CylinderShapeSettings_GetRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:29 + ///
+ /// float mRadius = 0.0f + ///
+ ///
+ public void SetRadius(float value) => Jolt.PInvoke.CylinderShapeSettings_SetRadius(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:30 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.CylinderShapeSettings_GetConvexRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/CylinderShape.h:30 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public void SetConvexRadius(float value) => Jolt.PInvoke.CylinderShapeSettings_SetConvexRadius(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(CylinderShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(CylinderShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DebugRenderer.gen.cs b/Brutal.Jolt/Generated/Classes/DebugRenderer.gen.cs new file mode 100644 index 0000000..1bd5910 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DebugRenderer.gen.cs @@ -0,0 +1,904 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Simple triangle renderer for debugging purposes. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:46 + ///
+ /// class JPH_DEBUG_RENDERER_EXPORT DebugRenderer : public NonCopyable + ///
+ ///
+ /// + /// + /// Simple triangle renderer for debugging purposes. + /// + /// Inherit from this class to provide your own implementation. + /// + /// Implement the following virtual functions: + /// - DrawLine + /// - DrawTriangle + /// - DrawText3D + /// - CreateTriangleBatch + /// - DrawGeometry + /// + /// Make sure you call Initialize() from the constructor of your implementation. + /// + /// The CreateTriangleBatch is used to prepare a batch of triangles to be drawn by a single DrawGeometry call, + /// which means that Jolt can render a complex scene much more efficiently than when each triangle in that scene would have been drawn through DrawTriangle. + /// + /// Note that an implementation that implements CreateTriangleBatch and DrawGeometry is provided by DebugRendererSimple which can be used to start quickly. + /// + /// + [InteropHandle] + public readonly partial struct DebugRenderer + { + /// + /// + /// Enum that determines if a shadow should be cast or not + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:90 + ///
+ /// enum class ECastShadow + ///
+ ///
+ public enum CastShadow : int + { + /// + /// + /// This shape should cast a shadow + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:92 + ///
+ /// On + ///
+ ///
+ On, + + /// + /// + /// This shape should not cast a shadow + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:93 + ///
+ /// Off + ///
+ ///
+ Off, + } + + /// + /// + /// Determines how triangles are drawn + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:97 + ///
+ /// enum class EDrawMode + ///
+ ///
+ public enum DrawMode : int + { + /// + /// + /// Draw as a solid shape + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:99 + ///
+ /// Solid + ///
+ ///
+ Solid, + + /// + /// + /// Draw as wireframe + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:100 + ///
+ /// Wireframe + ///
+ ///
+ Wireframe, + } + + /// + /// + /// Determines which polygons are culled + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:265 + ///
+ /// enum class ECullMode + ///
+ ///
+ public enum CullMode : int + { + /// + /// + /// Don't draw backfacing polygons + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:267 + ///
+ /// CullBackFace + ///
+ ///
+ CullBackFace, + + /// + /// + /// Don't draw front facing polygons + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:268 + ///
+ /// CullFrontFace + ///
+ ///
+ CullFrontFace, + + /// + /// + /// Don't do culling and draw both sides + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:269 + ///
+ /// Off + ///
+ ///
+ Off, + } + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:317 + ///
+ /// struct SwingConeLimits + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct SwingConeLimits + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:325 + ///
+ /// float mSwingYHalfAngle + ///
+ ///
+ [FieldOffset(0)] + public float SwingYHalfAngle; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:326 + ///
+ /// float mSwingZHalfAngle + ///
+ ///
+ [FieldOffset(4)] + public float SwingZHalfAngle; + } + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:335 + ///
+ /// struct SwingPyramidLimits + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct SwingPyramidLimits + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:345 + ///
+ /// float mMinSwingYAngle + ///
+ ///
+ [FieldOffset(0)] + public float MinSwingYAngle; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:346 + ///
+ /// float mMaxSwingYAngle + ///
+ ///
+ [FieldOffset(4)] + public float MaxSwingYAngle; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:347 + ///
+ /// float mMinSwingZAngle + ///
+ ///
+ [FieldOffset(8)] + public float MinSwingZAngle; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:348 + ///
+ /// float mMaxSwingZAngle + ///
+ ///
+ [FieldOffset(12)] + public float MaxSwingZAngle; + } + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:361 + ///
+ /// struct TaperedCylinder + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct TaperedCylinder + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:371 + ///
+ /// float mTop + ///
+ ///
+ [FieldOffset(0)] + public float Top; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:372 + ///
+ /// float mBottom + ///
+ ///
+ [FieldOffset(4)] + public float Bottom; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:373 + ///
+ /// float mTopRadius + ///
+ ///
+ [FieldOffset(8)] + public float TopRadius; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:374 + ///
+ /// float mBottomRadius + ///
+ ///
+ [FieldOffset(12)] + public float BottomRadius; + } + + /// + /// + /// Call once after frame is complete. Releases unused dynamically generated geometry assets. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:56 + ///
+ /// void NextFrame() + ///
+ ///
+ public void NextFrame() => Jolt.PInvoke.DebugRenderer_NextFrame(this); + + /// + /// + /// Draw line + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:59 + ///
+ /// virtual void DrawLine(RVec3Arg inFrom, RVec3Arg inTo, ColorArg inColor) = 0 + ///
+ ///
+ public void DrawLine(float3 from, float3 to, uint color) => + Jolt.PInvoke.DebugRenderer_DrawLine(this, from, to, color); + + /// + /// + /// Draw wireframe box + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:62 + ///
+ /// void DrawWireBox(const AABox &inBox, ColorArg inColor) + ///
+ ///
+ public void DrawWireBox(in AABox box, uint color) => + Jolt.PInvoke.DebugRenderer_DrawWireBox(this, in box, color); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:63 + ///
+ /// void DrawWireBox(const OrientedBox &inBox, ColorArg inColor) + ///
+ ///
+ public void DrawWireBox(OrientedBox box, uint color) => + Jolt.PInvoke.DebugRenderer_DrawWireBox_2(this, box, color); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:64 + ///
+ /// void DrawWireBox(RMat44Arg inMatrix, const AABox &inBox, ColorArg inColor) + ///
+ ///
+ public void DrawWireBox(in float4x4 matrix, in AABox box, uint color) => + Jolt.PInvoke.DebugRenderer_DrawWireBox_3(this, in matrix, in box, color); + + /// + /// + /// Draw a marker on a position + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:67 + ///
+ /// void DrawMarker(RVec3Arg inPosition, ColorArg inColor, float inSize) + ///
+ ///
+ public void DrawMarker(float3 position, uint color, float size) => + Jolt.PInvoke.DebugRenderer_DrawMarker(this, position, color, size); + + /// + /// + /// Draw an arrow + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:70 + ///
+ /// void DrawArrow(RVec3Arg inFrom, RVec3Arg inTo, ColorArg inColor, float inSize) + ///
+ ///
+ public void DrawArrow(float3 from, float3 to, uint color, float size) => + Jolt.PInvoke.DebugRenderer_DrawArrow(this, from, to, color, size); + + /// + /// + /// Draw coordinate system (3 arrows, x = red, y = green, z = blue) + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:73 + ///
+ /// void DrawCoordinateSystem(RMat44Arg inTransform, float inSize = 1.0f) + ///
+ ///
+ public void DrawCoordinateSystem(in float4x4 transform, float size = 1f) => + Jolt.PInvoke.DebugRenderer_DrawCoordinateSystem(this, in transform, size); + + /// + /// + /// Draw a plane through inPoint with normal inNormal + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:76 + ///
+ /// void DrawPlane(RVec3Arg inPoint, Vec3Arg inNormal, ColorArg inColor, float inSize) + ///
+ ///
+ public void DrawPlane(float3 point, float3 normal, uint color, float size) => + Jolt.PInvoke.DebugRenderer_DrawPlane(this, point, normal, color, size); + + /// + /// + /// Draw wireframe triangle + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:79 + ///
+ /// void DrawWireTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor) + ///
+ ///
+ public void DrawWireTriangle(float3 v1, float3 v2, float3 v3, uint color) => + Jolt.PInvoke.DebugRenderer_DrawWireTriangle(this, v1, v2, v3, color); + + /// + /// + /// Draw wireframe sphere + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:86 + ///
+ /// void DrawWireSphere(RVec3Arg inCenter, float inRadius, ColorArg inColor, int inLevel = 3) + ///
+ ///
+ public void DrawWireSphere(float3 center, float radius, uint color, int level = 3) => + Jolt.PInvoke.DebugRenderer_DrawWireSphere(this, center, radius, color, level); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:87 + ///
+ /// void DrawWireUnitSphere(RMat44Arg inMatrix, ColorArg inColor, int inLevel = 3) + ///
+ ///
+ public void DrawWireUnitSphere(in float4x4 matrix, uint color, int level = 3) => + Jolt.PInvoke.DebugRenderer_DrawWireUnitSphere(this, in matrix, color, level); + + /// + /// + /// Draw a single back face culled triangle + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:104 + ///
+ /// virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::Off) = 0 + ///
+ ///
+ public void DrawTriangle( + float3 v1, + float3 v2, + float3 v3, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.Off + ) => Jolt.PInvoke.DebugRenderer_DrawTriangle(this, v1, v2, v3, color, castShadow); + + /// + /// + /// Draw a box + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:107 + ///
+ /// void DrawBox(const AABox &inBox, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ public void DrawBox( + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => Jolt.PInvoke.DebugRenderer_DrawBox(this, in box, color, castShadow, drawMode); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:108 + ///
+ /// void DrawBox(RMat44Arg inMatrix, const AABox &inBox, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ public void DrawBox( + in float4x4 matrix, + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => Jolt.PInvoke.DebugRenderer_DrawBox_2(this, in matrix, in box, color, castShadow, drawMode); + + /// + /// + /// Draw a sphere + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:111 + ///
+ /// void DrawSphere(RVec3Arg inCenter, float inRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ public void DrawSphere( + float3 center, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => Jolt.PInvoke.DebugRenderer_DrawSphere(this, center, radius, color, castShadow, drawMode); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:112 + ///
+ /// void DrawUnitSphere(RMat44Arg inMatrix, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ public void DrawUnitSphere( + in float4x4 matrix, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => Jolt.PInvoke.DebugRenderer_DrawUnitSphere(this, in matrix, color, castShadow, drawMode); + + /// + /// + /// Draw a capsule with one half sphere at (0, -inHalfHeightOfCylinder, 0) and the other half sphere at (0, + /// inHalfHeightOfCylinder, 0) and radius inRadius. The capsule will be transformed by inMatrix. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:116 + ///
+ /// void DrawCapsule(RMat44Arg inMatrix, float inHalfHeightOfCylinder, float inRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ public void DrawCapsule( + in float4x4 matrix, + float halfHeightOfCylinder, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + Jolt.PInvoke.DebugRenderer_DrawCapsule( + this, + in matrix, + halfHeightOfCylinder, + radius, + color, + castShadow, + drawMode + ); + + /// + /// + /// Draw a cylinder with top (0, inHalfHeight, 0) and bottom (0, -inHalfHeight, 0) and radius inRadius. The + /// cylinder will be transformed by inMatrix + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:120 + ///
+ /// void DrawCylinder(RMat44Arg inMatrix, float inHalfHeight, float inRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ public void DrawCylinder( + in float4x4 matrix, + float halfHeight, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => Jolt.PInvoke.DebugRenderer_DrawCylinder(this, in matrix, halfHeight, radius, color, castShadow, drawMode); + + /// + /// + /// Draw a bottomless cone. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:131 + ///
+ /// void DrawOpenCone(RVec3Arg inTop, Vec3Arg inAxis, Vec3Arg inPerpendicular, float inHalfAngle, float inLength, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ /// + /// + /// Draw a bottomless cone. + /// @param inTop Top of cone, center of base is at inTop + inAxis. + /// @param inAxis Height and direction of cone + /// @param inPerpendicular Perpendicular vector to inAxis. + /// @param inHalfAngle Specifies the cone angle in radians (angle measured between inAxis and cone surface). + /// @param inLength The length of the cone. + /// @param inColor Color to use for drawing the cone. + /// @param inCastShadow determines if this geometry should cast a shadow or not. + /// @param inDrawMode determines if we draw the geometry solid or in wireframe. + /// + /// + public void DrawOpenCone( + float3 top, + float3 axis, + float3 perpendicular, + float halfAngle, + float length, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + Jolt.PInvoke.DebugRenderer_DrawOpenCone( + this, + top, + axis, + perpendicular, + halfAngle, + length, + color, + castShadow, + drawMode + ); + + /// + /// + /// Draws cone rotation limits as used by the SwingTwistConstraintPart. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:141 + ///
+ /// void DrawSwingConeLimits(RMat44Arg inMatrix, float inSwingYHalfAngle, float inSwingZHalfAngle, float inEdgeLength, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ /// + /// + /// Draws cone rotation limits as used by the SwingTwistConstraintPart. + /// @param inMatrix Matrix that transforms from constraint space to world space + /// @param inSwingYHalfAngle See SwingTwistConstraintPart + /// @param inSwingZHalfAngle See SwingTwistConstraintPart + /// @param inEdgeLength Size of the edge of the cone shape + /// @param inColor Color to use for drawing the cone. + /// @param inCastShadow determines if this geometry should cast a shadow or not. + /// @param inDrawMode determines if we draw the geometry solid or in wireframe. + /// + /// + public void DrawSwingConeLimits( + in float4x4 matrix, + float swingYHalfAngle, + float swingZHalfAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + Jolt.PInvoke.DebugRenderer_DrawSwingConeLimits( + this, + in matrix, + swingYHalfAngle, + swingZHalfAngle, + edgeLength, + color, + castShadow, + drawMode + ); + + /// + /// + /// Draws rotation limits as used by the SwingTwistConstraintPart. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:153 + ///
+ /// void DrawSwingPyramidLimits(RMat44Arg inMatrix, float inMinSwingYAngle, float inMaxSwingYAngle, float inMinSwingZAngle, float inMaxSwingZAngle, float inEdgeLength, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ /// + /// + /// Draws rotation limits as used by the SwingTwistConstraintPart. + /// @param inMatrix Matrix that transforms from constraint space to world space + /// @param inMinSwingYAngle See SwingTwistConstraintPart + /// @param inMaxSwingYAngle See SwingTwistConstraintPart + /// @param inMinSwingZAngle See SwingTwistConstraintPart + /// @param inMaxSwingZAngle See SwingTwistConstraintPart + /// @param inEdgeLength Size of the edge of the cone shape + /// @param inColor Color to use for drawing the cone. + /// @param inCastShadow determines if this geometry should cast a shadow or not. + /// @param inDrawMode determines if we draw the geometry solid or in wireframe. + /// + /// + public void DrawSwingPyramidLimits( + in float4x4 matrix, + float minSwingYAngle, + float maxSwingYAngle, + float minSwingZAngle, + float maxSwingZAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + Jolt.PInvoke.DebugRenderer_DrawSwingPyramidLimits( + this, + in matrix, + minSwingYAngle, + maxSwingYAngle, + minSwingZAngle, + maxSwingZAngle, + edgeLength, + color, + castShadow, + drawMode + ); + + /// + /// + /// Draw a pie (part of a circle). + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:165 + ///
+ /// void DrawPie(RVec3Arg inCenter, float inRadius, Vec3Arg inNormal, Vec3Arg inAxis, float inMinAngle, float inMaxAngle, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ /// + /// + /// Draw a pie (part of a circle). + /// @param inCenter The center of the circle. + /// @param inRadius Radius of the circle. + /// @param inNormal The plane normal in which the pie resides. + /// @param inAxis The axis that defines an angle of 0 radians. + /// @param inMinAngle The pie will be drawn between [inMinAngle, inMaxAngle] (in radians). + /// @param inMaxAngle The pie will be drawn between [inMinAngle, inMaxAngle] (in radians). + /// @param inColor Color to use for drawing the pie. + /// @param inCastShadow determines if this geometry should cast a shadow or not. + /// @param inDrawMode determines if we draw the geometry solid or in wireframe. + /// + /// + public void DrawPie( + float3 center, + float radius, + float3 normal, + float3 axis, + float minAngle, + float maxAngle, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + Jolt.PInvoke.DebugRenderer_DrawPie( + this, + center, + radius, + normal, + axis, + minAngle, + maxAngle, + color, + castShadow, + drawMode + ); + + /// + /// + /// Draw a tapered cylinder + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:176 + ///
+ /// void DrawTaperedCylinder(RMat44Arg inMatrix, float inTop, float inBottom, float inTopRadius, float inBottomRadius, ColorArg inColor, ECastShadow inCastShadow = ECastShadow::On, EDrawMode inDrawMode = EDrawMode::Solid) + ///
+ ///
+ /// + /// + /// Draw a tapered cylinder + /// @param inMatrix Matrix that transforms the cylinder to world space. + /// @param inTop Top of cylinder (along Y axis) + /// @param inBottom Bottom of cylinder (along Y axis) + /// @param inTopRadius Radius at the top + /// @param inBottomRadius Radius at the bottom + /// @param inColor Color to use for drawing the pie. + /// @param inCastShadow determines if this geometry should cast a shadow or not. + /// @param inDrawMode determines if we draw the geometry solid or in wireframe. + /// + /// + public void DrawTaperedCylinder( + in float4x4 matrix, + float top, + float bottom, + float topRadius, + float bottomRadius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + Jolt.PInvoke.DebugRenderer_DrawTaperedCylinder( + this, + in matrix, + top, + bottom, + topRadius, + bottomRadius, + color, + castShadow, + drawMode + ); + + /// + /// + /// Draw text + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:285 + ///
+ /// virtual void DrawText3D(RVec3Arg inPosition, const string_view &inString, ColorArg inColor = Color::sWhite, float inHeight = 0.5f) = 0 + ///
+ ///
+ public unsafe void DrawText3D(float3 position, RefString8 @string, uint color, float height = 0.5f) + { + fixed (byte* @string_fixed = @string) + { + Jolt.PInvoke.DebugRenderer_DrawText3D(this, position, @string_fixed, color, height); + } + } + + /// + /// + /// Singleton instance + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:179 + ///
+ /// static DebugRenderer * sInstance + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public static DebugRenderer GetInstance() => Jolt.PInvoke.DebugRenderer_GetInstance(); + + /// + /// + /// Singleton instance + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:179 + ///
+ /// static DebugRenderer * sInstance + ///
+ ///
+ public static void SetInstance(DebugRenderer value) => Jolt.PInvoke.DebugRenderer_SetInstance(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DebugRendererPlayback.gen.cs b/Brutal.Jolt/Generated/Classes/DebugRendererPlayback.gen.cs new file mode 100644 index 0000000..efca6cd --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DebugRendererPlayback.gen.cs @@ -0,0 +1,80 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that can read a recorded stream from DebugRendererRecorder and plays it back trough a DebugRenderer + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererPlayback.h:18 + ///
+ /// class JPH_DEBUG_RENDERER_EXPORT DebugRendererPlayback + ///
+ ///
+ [InteropHandle] + public readonly partial struct DebugRendererPlayback : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererPlayback.h:22 + ///
+ /// DebugRendererPlayback(DebugRenderer &inRenderer) + ///
+ ///
+ public static DebugRendererPlayback Create(DebugRenderer renderer) => + Jolt.PInvoke.DebugRendererPlayback_Create(renderer); + + /// + /// + /// Parse a stream of frames + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererPlayback.h:25 + ///
+ /// void Parse(StreamIn &inStream) + ///
+ ///
+ public void Parse(StreamIn stream) => Jolt.PInvoke.DebugRendererPlayback_Parse(this, stream); + + /// + /// + /// Get the number of parsed frames + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererPlayback.h:28 + ///
+ /// uint GetNumFrames() const + ///
+ ///
+ public uint GetNumFrames() => Jolt.PInvoke.DebugRendererPlayback_GetNumFrames(this); + + /// + /// + /// Draw a frame + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererPlayback.h:31 + ///
+ /// void DrawFrame(uint inFrameNumber) const + ///
+ ///
+ public void DrawFrame(uint frameNumber) => Jolt.PInvoke.DebugRendererPlayback_DrawFrame(this, frameNumber); + + public void Dispose() => Jolt.PInvoke.DebugRendererPlayback_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DebugRendererRecorder.gen.cs b/Brutal.Jolt/Generated/Classes/DebugRendererRecorder.gen.cs new file mode 100644 index 0000000..28c2902 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DebugRendererRecorder.gen.cs @@ -0,0 +1,547 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of DebugRenderer that records the API invocations to be played back later + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:19 + ///
+ /// class JPH_DEBUG_RENDERER_EXPORT DebugRendererRecorder final : public DebugRenderer + ///
+ ///
+ [InteropHandle] + public readonly partial struct DebugRendererRecorder : IDisposable + { + /// + /// + /// Control commands written into the stream + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:39 + ///
+ /// enum class ECommand : uint8 + ///
+ ///
+ public enum Command : byte + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:41 + ///
+ /// CreateBatch + ///
+ ///
+ CreateBatch, + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:42 + ///
+ /// CreateBatchIndexed + ///
+ ///
+ CreateBatchIndexed, + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:43 + ///
+ /// CreateGeometry + ///
+ ///
+ CreateGeometry, + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:44 + ///
+ /// EndFrame + ///
+ ///
+ EndFrame, + } + + /// + /// + /// Holds a single line segment + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:48 + ///
+ /// struct LineBlob + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct LineBlob + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:50 + ///
+ /// RVec3 mFrom + ///
+ ///
+ [FieldOffset(0)] + public float3 From; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:51 + ///
+ /// RVec3 mTo + ///
+ ///
+ [FieldOffset(16)] + public float3 To; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:52 + ///
+ /// Color mColor + ///
+ ///
+ [FieldOffset(32)] + public uint Color; + } + + /// + /// + /// Holds a single triangle + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:56 + ///
+ /// struct TriangleBlob + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct TriangleBlob + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:58 + ///
+ /// RVec3 mV1 + ///
+ ///
+ [FieldOffset(0)] + public float3 V1; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:59 + ///
+ /// RVec3 mV2 + ///
+ ///
+ [FieldOffset(16)] + public float3 V2; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:60 + ///
+ /// RVec3 mV3 + ///
+ ///
+ [FieldOffset(32)] + public float3 V3; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:61 + ///
+ /// Color mColor + ///
+ ///
+ [FieldOffset(48)] + public uint Color; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:62 + ///
+ /// ECastShadow mCastShadow + ///
+ ///
+ [FieldOffset(52)] + public DebugRenderer.CastShadow CastShadow; + } + + /// + /// + /// Holds a single geometry draw call + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:78 + ///
+ /// struct GeometryBlob + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct GeometryBlob + { + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:80 + ///
+ /// RMat44 mModelMatrix + ///
+ ///
+ [FieldOffset(0)] + public float4x4 ModelMatrix; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:81 + ///
+ /// Color mModelColor + ///
+ ///
+ [FieldOffset(64)] + public uint ModelColor; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:82 + ///
+ /// uint32 mGeometryID + ///
+ ///
+ [FieldOffset(68)] + public uint GeometryID; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:83 + ///
+ /// ECullMode mCullMode + ///
+ ///
+ [FieldOffset(72)] + public DebugRenderer.CullMode CullMode; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:84 + ///
+ /// ECastShadow mCastShadow + ///
+ ///
+ [FieldOffset(76)] + public DebugRenderer.CastShadow CastShadow; + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:85 + ///
+ /// EDrawMode mDrawMode + ///
+ ///
+ [FieldOffset(80)] + public DebugRenderer.DrawMode DrawMode; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:25 + ///
+ /// DebugRendererRecorder(StreamOut &inStream) + ///
+ ///
+ public static DebugRendererRecorder Create(StreamOut stream) => + Jolt.PInvoke.DebugRendererRecorder_Create(stream); + + /// + public void DrawLine(float3 from, float3 to, uint color) => ((DebugRenderer)this).DrawLine(from, to, color); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:29 + ///
+ /// virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow) override + ///
+ ///
+ public void DrawTriangle(float3 v1, float3 v2, float3 v3, uint color, DebugRenderer.CastShadow castShadow) => + Jolt.PInvoke.DebugRendererRecorder_DrawTriangle(this, v1, v2, v3, color, castShadow); + + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:33 + ///
+ /// virtual void DrawText3D(RVec3Arg inPosition, const string_view &inString, ColorArg inColor, float inHeight) override + ///
+ ///
+ public unsafe void DrawText3D(float3 position, RefString8 @string, uint color, float height) + { + fixed (byte* @string_fixed = @string) + { + Jolt.PInvoke.DebugRendererRecorder_DrawText3D(this, position, @string_fixed, color, height); + } + } + + /// + /// + /// Mark the end of a frame + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererRecorder.h:36 + ///
+ /// void EndFrame() + ///
+ ///
+ public void EndFrame() => Jolt.PInvoke.DebugRendererRecorder_EndFrame(this); + + public static implicit operator DebugRenderer(DebugRendererRecorder value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.DebugRendererRecorder_Destroy(this); + + /// + public void NextFrame() => ((DebugRenderer)this).NextFrame(); + + /// + public void DrawWireBox(in AABox box, uint color) => ((DebugRenderer)this).DrawWireBox(in box, color); + + /// + public void DrawWireBox(OrientedBox box, uint color) => ((DebugRenderer)this).DrawWireBox(box, color); + + /// + public void DrawWireBox(in float4x4 matrix, in AABox box, uint color) => + ((DebugRenderer)this).DrawWireBox(in matrix, in box, color); + + /// + public void DrawMarker(float3 position, uint color, float size) => + ((DebugRenderer)this).DrawMarker(position, color, size); + + /// + public void DrawArrow(float3 from, float3 to, uint color, float size) => + ((DebugRenderer)this).DrawArrow(from, to, color, size); + + /// + public void DrawCoordinateSystem(in float4x4 transform, float size = 1f) => + ((DebugRenderer)this).DrawCoordinateSystem(in transform, size); + + /// + public void DrawPlane(float3 point, float3 normal, uint color, float size) => + ((DebugRenderer)this).DrawPlane(point, normal, color, size); + + /// + public void DrawWireTriangle(float3 v1, float3 v2, float3 v3, uint color) => + ((DebugRenderer)this).DrawWireTriangle(v1, v2, v3, color); + + /// + public void DrawWireSphere(float3 center, float radius, uint color, int level = 3) => + ((DebugRenderer)this).DrawWireSphere(center, radius, color, level); + + /// + public void DrawWireUnitSphere(in float4x4 matrix, uint color, int level = 3) => + ((DebugRenderer)this).DrawWireUnitSphere(in matrix, color, level); + + /// + public void DrawBox( + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawBox(in box, color, castShadow, drawMode); + + /// + public void DrawBox( + in float4x4 matrix, + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawBox(in matrix, in box, color, castShadow, drawMode); + + /// + public void DrawSphere( + float3 center, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawSphere(center, radius, color, castShadow, drawMode); + + /// + public void DrawUnitSphere( + in float4x4 matrix, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawUnitSphere(in matrix, color, castShadow, drawMode); + + /// + public void DrawCapsule( + in float4x4 matrix, + float halfHeightOfCylinder, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawCapsule(in matrix, halfHeightOfCylinder, radius, color, castShadow, drawMode); + + /// + public void DrawCylinder( + in float4x4 matrix, + float halfHeight, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawCylinder(in matrix, halfHeight, radius, color, castShadow, drawMode); + + /// + public void DrawOpenCone( + float3 top, + float3 axis, + float3 perpendicular, + float halfAngle, + float length, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawOpenCone( + top, + axis, + perpendicular, + halfAngle, + length, + color, + castShadow, + drawMode + ); + + /// + public void DrawSwingConeLimits( + in float4x4 matrix, + float swingYHalfAngle, + float swingZHalfAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawSwingConeLimits( + in matrix, + swingYHalfAngle, + swingZHalfAngle, + edgeLength, + color, + castShadow, + drawMode + ); + + /// + public void DrawSwingPyramidLimits( + in float4x4 matrix, + float minSwingYAngle, + float maxSwingYAngle, + float minSwingZAngle, + float maxSwingZAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawSwingPyramidLimits( + in matrix, + minSwingYAngle, + maxSwingYAngle, + minSwingZAngle, + maxSwingZAngle, + edgeLength, + color, + castShadow, + drawMode + ); + + /// + public void DrawPie( + float3 center, + float radius, + float3 normal, + float3 axis, + float minAngle, + float maxAngle, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawPie( + center, + radius, + normal, + axis, + minAngle, + maxAngle, + color, + castShadow, + drawMode + ); + + /// + public void DrawTaperedCylinder( + in float4x4 matrix, + float top, + float bottom, + float topRadius, + float bottomRadius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawTaperedCylinder( + in matrix, + top, + bottom, + topRadius, + bottomRadius, + color, + castShadow, + drawMode + ); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DebugRendererSimple.gen.cs b/Brutal.Jolt/Generated/Classes/DebugRendererSimple.gen.cs new file mode 100644 index 0000000..3590de8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DebugRendererSimple.gen.cs @@ -0,0 +1,297 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Inherit from this class to simplify implementing a debug renderer, start with this implementation: + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererSimple.h:37 + ///
+ /// class JPH_DEBUG_RENDERER_EXPORT DebugRendererSimple : public DebugRenderer + ///
+ ///
+ /// + /// + /// Inherit from this class to simplify implementing a debug renderer, start with this implementation: + /// + /// class MyDebugRenderer : public JPH::DebugRendererSimple + /// { + /// public: + /// virtual void DrawLine(JPH::RVec3Arg inFrom, JPH::RVec3Arg inTo, JPH::ColorArg inColor) override + /// { + /// // Implement + /// } + /// + /// virtual void DrawTriangle(JPH::RVec3Arg inV1, JPH::RVec3Arg inV2, JPH::RVec3Arg inV3, JPH::ColorArg inColor, ECastShadow inCastShadow) override + /// { + /// // Implement + /// } + /// + /// virtual void DrawText3D(JPH::RVec3Arg inPosition, const string_view &inString, JPH::ColorArg inColor, float inHeight) override + /// { + /// // Implement + /// } + /// }; + /// + /// Note that this class is meant to be a quick start for implementing a debug renderer, it is not the most efficient way to implement a debug renderer. + /// + /// + [InteropHandle] + public readonly partial struct DebugRendererSimple + { + /// + /// + /// Should be called every frame by the application to provide the camera position. This is used to + /// determine the correct LOD for rendering. + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererSimple.h:47 + ///
+ /// void SetCameraPos(RVec3Arg inCameraPos) + ///
+ ///
+ public void SetCameraPos(float3 cameraPos) => Jolt.PInvoke.DebugRendererSimple_SetCameraPos(this, cameraPos); + + /// + /// + /// Fallback implementation that uses DrawLine to draw a triangle (override this if you have a version that + /// renders solid triangles) + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererSimple.h:54 + ///
+ /// virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow) override + ///
+ ///
+ public void DrawTriangle(float3 v1, float3 v2, float3 v3, uint color, DebugRenderer.CastShadow castShadow) => + Jolt.PInvoke.DebugRendererSimple_DrawTriangle(this, v1, v2, v3, color, castShadow); + + public static implicit operator DebugRenderer(DebugRendererSimple value) => + Unsafe.BitCast(value); + + /// + public void NextFrame() => ((DebugRenderer)this).NextFrame(); + + /// + public void DrawLine(float3 from, float3 to, uint color) => ((DebugRenderer)this).DrawLine(from, to, color); + + /// + public void DrawWireBox(in AABox box, uint color) => ((DebugRenderer)this).DrawWireBox(in box, color); + + /// + public void DrawWireBox(OrientedBox box, uint color) => ((DebugRenderer)this).DrawWireBox(box, color); + + /// + public void DrawWireBox(in float4x4 matrix, in AABox box, uint color) => + ((DebugRenderer)this).DrawWireBox(in matrix, in box, color); + + /// + public void DrawMarker(float3 position, uint color, float size) => + ((DebugRenderer)this).DrawMarker(position, color, size); + + /// + public void DrawArrow(float3 from, float3 to, uint color, float size) => + ((DebugRenderer)this).DrawArrow(from, to, color, size); + + /// + public void DrawCoordinateSystem(in float4x4 transform, float size = 1f) => + ((DebugRenderer)this).DrawCoordinateSystem(in transform, size); + + /// + public void DrawPlane(float3 point, float3 normal, uint color, float size) => + ((DebugRenderer)this).DrawPlane(point, normal, color, size); + + /// + public void DrawWireTriangle(float3 v1, float3 v2, float3 v3, uint color) => + ((DebugRenderer)this).DrawWireTriangle(v1, v2, v3, color); + + /// + public void DrawWireSphere(float3 center, float radius, uint color, int level = 3) => + ((DebugRenderer)this).DrawWireSphere(center, radius, color, level); + + /// + public void DrawWireUnitSphere(in float4x4 matrix, uint color, int level = 3) => + ((DebugRenderer)this).DrawWireUnitSphere(in matrix, color, level); + + /// + public void DrawBox( + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawBox(in box, color, castShadow, drawMode); + + /// + public void DrawBox( + in float4x4 matrix, + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawBox(in matrix, in box, color, castShadow, drawMode); + + /// + public void DrawSphere( + float3 center, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawSphere(center, radius, color, castShadow, drawMode); + + /// + public void DrawUnitSphere( + in float4x4 matrix, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawUnitSphere(in matrix, color, castShadow, drawMode); + + /// + public void DrawCapsule( + in float4x4 matrix, + float halfHeightOfCylinder, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawCapsule(in matrix, halfHeightOfCylinder, radius, color, castShadow, drawMode); + + /// + public void DrawCylinder( + in float4x4 matrix, + float halfHeight, + float radius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => ((DebugRenderer)this).DrawCylinder(in matrix, halfHeight, radius, color, castShadow, drawMode); + + /// + public void DrawOpenCone( + float3 top, + float3 axis, + float3 perpendicular, + float halfAngle, + float length, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawOpenCone( + top, + axis, + perpendicular, + halfAngle, + length, + color, + castShadow, + drawMode + ); + + /// + public void DrawSwingConeLimits( + in float4x4 matrix, + float swingYHalfAngle, + float swingZHalfAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawSwingConeLimits( + in matrix, + swingYHalfAngle, + swingZHalfAngle, + edgeLength, + color, + castShadow, + drawMode + ); + + /// + public void DrawSwingPyramidLimits( + in float4x4 matrix, + float minSwingYAngle, + float maxSwingYAngle, + float minSwingZAngle, + float maxSwingZAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawSwingPyramidLimits( + in matrix, + minSwingYAngle, + maxSwingYAngle, + minSwingZAngle, + maxSwingZAngle, + edgeLength, + color, + castShadow, + drawMode + ); + + /// + public void DrawPie( + float3 center, + float radius, + float3 normal, + float3 axis, + float minAngle, + float maxAngle, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawPie( + center, + radius, + normal, + axis, + minAngle, + maxAngle, + color, + castShadow, + drawMode + ); + + /// + public void DrawTaperedCylinder( + in float4x4 matrix, + float top, + float bottom, + float topRadius, + float bottomRadius, + uint color, + DebugRenderer.CastShadow castShadow = DebugRenderer.CastShadow.On, + DebugRenderer.DrawMode drawMode = DebugRenderer.DrawMode.Solid + ) => + ((DebugRenderer)this).DrawTaperedCylinder( + in matrix, + top, + bottom, + topRadius, + bottomRadius, + color, + castShadow, + drawMode + ); + + /// + public unsafe void DrawText3D(float3 position, RefString8 @string, uint color, float height = 0.5f) => + ((DebugRenderer)this).DrawText3D(position, @string, color, height); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DecoratedShape.gen.cs b/Brutal.Jolt/Generated/Classes/DecoratedShape.gen.cs new file mode 100644 index 0000000..7c3fce5 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DecoratedShape.gen.cs @@ -0,0 +1,301 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for shapes that decorate another shape with extra functionality (e.g. scale, translation etc.) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:29 + ///
+ /// class DecoratedShape : public Shape + ///
+ ///
+ [InteropHandle] + public readonly partial struct DecoratedShape : IDisposable + { + /// + /// + /// Access to the decorated inner shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:40 + ///
+ /// const Shape * GetInnerShape() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetInnerShape() => Jolt.PInvoke.DecoratedShape_GetInnerShape(this); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(DecoratedShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DecoratedShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/DecoratedShapeSettings.gen.cs new file mode 100644 index 0000000..a40d306 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DecoratedShapeSettings.gen.cs @@ -0,0 +1,122 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a DecoratedShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:12 + ///
+ /// class DecoratedShapeSettings : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct DecoratedShapeSettings : IDisposable + { + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + /// + /// Sub shape (either this or mShapePtr needs to be filled up) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:24 + ///
+ /// RefConst<ShapeSettings> mInnerShape + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public ShapeSettings GetInnerShape() => Jolt.PInvoke.DecoratedShapeSettings_GetInnerShape(this); + + /// + /// + /// Sub shape (either this or mShapePtr needs to be filled up) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:24 + ///
+ /// RefConst<ShapeSettings> mInnerShape + ///
+ ///
+ public void SetInnerShape(ShapeSettings value) => + Jolt.PInvoke.DecoratedShapeSettings_SetInnerShape(this, value); + + /// + /// + /// Sub shape (either this or mShape needs to be filled up) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:25 + ///
+ /// RefConst<Shape> mInnerShapePtr + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetInnerShapePtr() => Jolt.PInvoke.DecoratedShapeSettings_GetInnerShapePtr(this); + + /// + /// + /// Sub shape (either this or mShape needs to be filled up) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/DecoratedShape.h:25 + ///
+ /// RefConst<Shape> mInnerShapePtr + ///
+ ///
+ public void SetInnerShapePtr(Shape value) => Jolt.PInvoke.DecoratedShapeSettings_SetInnerShapePtr(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(DecoratedShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DefaultBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/DefaultBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..e2b16c8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DefaultBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Default filter class that uses the pair filter in combination with a specified layer to filter layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:107 + ///
+ /// class DefaultBroadPhaseLayerFilter : public BroadPhaseLayerFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct DefaultBroadPhaseLayerFilter : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:111 + ///
+ /// DefaultBroadPhaseLayerFilter(const ObjectVsBroadPhaseLayerFilter &inObjectVsBroadPhaseLayerFilter, ObjectLayer inLayer) + ///
+ ///
+ public static DefaultBroadPhaseLayerFilter Create( + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ushort layer + ) => Jolt.PInvoke.DefaultBroadPhaseLayerFilter_Create(objectVsBroadPhaseLayerFilter, layer); + + /// + public bool ShouldCollide(byte layer) => ((BroadPhaseLayerFilter)this).ShouldCollide(layer); + + public static implicit operator BroadPhaseLayerFilter(DefaultBroadPhaseLayerFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.DefaultBroadPhaseLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DefaultObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/DefaultObjectLayerFilter.gen.cs new file mode 100644 index 0000000..4dda71c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DefaultObjectLayerFilter.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Default filter class that uses the pair filter in combination with a specified layer to filter layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:63 + ///
+ /// class DefaultObjectLayerFilter : public ObjectLayerFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct DefaultObjectLayerFilter : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:67 + ///
+ /// DefaultObjectLayerFilter(const ObjectLayerPairFilter &inObjectLayerPairFilter, ObjectLayer inLayer) + ///
+ ///
+ public static DefaultObjectLayerFilter Create(ObjectLayerPairFilter objectLayerPairFilter, ushort layer) => + Jolt.PInvoke.DefaultObjectLayerFilter_Create(objectLayerPairFilter, layer); + + /// + public bool ShouldCollide(ushort layer) => ((ObjectLayerFilter)this).ShouldCollide(layer); + + public static implicit operator ObjectLayerFilter(DefaultObjectLayerFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.DefaultObjectLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DistanceConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/DistanceConstraint.gen.cs new file mode 100644 index 0000000..e67c2ca --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DistanceConstraint.gen.cs @@ -0,0 +1,236 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This constraint is a stiff spring that holds 2 points at a fixed distance from each other + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:48 + ///
+ /// class DistanceConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct DistanceConstraint : IDisposable + { + /// + /// + /// Construct distance constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:54 + ///
+ /// DistanceConstraint(Body &inBody1, Body &inBody2, const DistanceConstraintSettings &inSettings) + ///
+ ///
+ public static DistanceConstraint Create(Body body1, Body body2, DistanceConstraintSettings settings) => + Jolt.PInvoke.DistanceConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Update the minimum and maximum distance for the constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:76 + ///
+ /// void SetDistance(float inMinDistance, float inMaxDistance) + ///
+ ///
+ public void SetDistance(float minDistance, float maxDistance) => + Jolt.PInvoke.DistanceConstraint_SetDistance(this, minDistance, maxDistance); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:77 + ///
+ /// float GetMinDistance() const + ///
+ ///
+ public float GetMinDistance() => Jolt.PInvoke.DistanceConstraint_GetMinDistance(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:78 + ///
+ /// float GetMaxDistance() const + ///
+ ///
+ public float GetMaxDistance() => Jolt.PInvoke.DistanceConstraint_GetMaxDistance(this); + + /// + /// + /// Update the limits spring settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:81 + ///
+ /// const SpringSettings & GetLimitsSpringSettings() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SpringSettings GetLimitsSpringSettings() => + Jolt.PInvoke.DistanceConstraint_GetLimitsSpringSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:83 + ///
+ /// void SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings) + ///
+ ///
+ public void SetLimitsSpringSettings(SpringSettings limitsSpringSettings) => + Jolt.PInvoke.DistanceConstraint_SetLimitsSpringSettings(this, limitsSpringSettings); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:86 + ///
+ /// inline float GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear impulse applied to satisfy the + /// constraint) + /// + /// + public float GetTotalLambdaPosition() => Jolt.PInvoke.DistanceConstraint_GetTotalLambdaPosition(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(DistanceConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(DistanceConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DistanceConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/DistanceConstraintSettings.gen.cs new file mode 100644 index 0000000..b3431ee --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DistanceConstraintSettings.gen.cs @@ -0,0 +1,271 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Distance constraint settings, used to create a distance constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:13 + ///
+ /// class DistanceConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct DistanceConstraintSettings : IDisposable + { + public static DistanceConstraintSettings Create() => Jolt.PInvoke.DistanceConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:25 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.DistanceConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:25 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.DistanceConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). Constraint will keep mPoint1 (a point on + /// body 1) and mPoint2 (a point on body 2) at the same distance. Note that this constraint can be used as a + /// cheap PointConstraint by setting mPoint1 = mPoint2 (but this removes only 1 degree of freedom instead of + /// 3). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:30 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint1() => Jolt.PInvoke.DistanceConstraintSettings_GetPoint1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). Constraint will keep mPoint1 (a point on + /// body 1) and mPoint2 (a point on body 2) at the same distance. Note that this constraint can be used as a + /// cheap PointConstraint by setting mPoint1 = mPoint2 (but this removes only 1 degree of freedom instead of + /// 3). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:30 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetPoint1(float3 value) => Jolt.PInvoke.DistanceConstraintSettings_SetPoint1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:33 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint2() => Jolt.PInvoke.DistanceConstraintSettings_GetPoint2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:33 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetPoint2(float3 value) => Jolt.PInvoke.DistanceConstraintSettings_SetPoint2(this, value); + + /// + /// + /// Ability to override the distance range at which the two points are kept apart. If the value is negative, + /// it will be replaced by the distance between mPoint1 and mPoint2 (works only if mSpace is world space). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:36 + ///
+ /// float mMinDistance = -1.0f + ///
+ ///
+ public float GetMinDistance() => Jolt.PInvoke.DistanceConstraintSettings_GetMinDistance(this); + + /// + /// + /// Ability to override the distance range at which the two points are kept apart. If the value is negative, + /// it will be replaced by the distance between mPoint1 and mPoint2 (works only if mSpace is world space). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:36 + ///
+ /// float mMinDistance = -1.0f + ///
+ ///
+ public void SetMinDistance(float value) => Jolt.PInvoke.DistanceConstraintSettings_SetMinDistance(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:37 + ///
+ /// float mMaxDistance = -1.0f + ///
+ ///
+ public float GetMaxDistance() => Jolt.PInvoke.DistanceConstraintSettings_GetMaxDistance(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:37 + ///
+ /// float mMaxDistance = -1.0f + ///
+ ///
+ public void SetMaxDistance(float value) => Jolt.PInvoke.DistanceConstraintSettings_SetMaxDistance(this, value); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:40 + ///
+ /// SpringSettings mLimitsSpringSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SpringSettings GetLimitsSpringSettings() => + Jolt.PInvoke.DistanceConstraintSettings_GetLimitsSpringSettings(this); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/DistanceConstraint.h:40 + ///
+ /// SpringSettings mLimitsSpringSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetLimitsSpringSettings(SpringSettings value) => + Jolt.PInvoke.DistanceConstraintSettings_SetLimitsSpringSettings(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(DistanceConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(DistanceConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DualAxisConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/DualAxisConstraintPart.gen.cs new file mode 100644 index 0000000..a7168d0 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DualAxisConstraintPart.gen.cs @@ -0,0 +1,129 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:47 + ///
+ /// class DualAxisConstraintPart + ///
+ ///
+ [InteropHandle] + public readonly partial struct DualAxisConstraintPart : IDisposable + { + public static DualAxisConstraintPart Create() => Jolt.PInvoke.DualAxisConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below All input vectors are in world space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:102 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, Vec3Arg inR1PlusU, const Body &inBody2, Mat44Arg inRotation2, Vec3Arg inR2, Vec3Arg inN1, Vec3Arg inN2) + ///
+ ///
+ public void CalculateConstraintProperties( + Body body1, + in float4x4 rotation1, + float3 r1PlusU, + Body body2, + in float4x4 rotation2, + float3 r2, + float3 n1, + float3 n2 + ) => + Jolt.PInvoke.DualAxisConstraintPart_CalculateConstraintProperties( + this, + body1, + in rotation1, + r1PlusU, + body2, + in rotation2, + r2, + n1, + n2 + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:158 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.DualAxisConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:165 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.DualAxisConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses All + /// input vectors are in world space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:172 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inWarmStartImpulseRatio) + ///
+ ///
+ public void WarmStart(Body body1, Body body2, float3 n1, float3 n2, float warmStartImpulseRatio) => + Jolt.PInvoke.DualAxisConstraintPart_WarmStart(this, body1, body2, n1, n2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. All input vectors are in world space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:180 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2) + ///
+ ///
+ public bool SolveVelocityConstraint(Body body1, Body body2, float3 n1, float3 n2) => + Jolt.PInvoke.DualAxisConstraintPart_SolveVelocityConstraint(this, body1, body2, n1, n2); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. All input vectors are in world space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h:193 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inU, Vec3Arg inN1, Vec3Arg inN2, float inBaumgarte) const + ///
+ ///
+ public bool SolvePositionConstraint(Body body1, Body body2, float3 u, float3 n1, float3 n2, float baumgarte) => + Jolt.PInvoke.DualAxisConstraintPart_SolvePositionConstraint(this, body1, body2, u, n1, n2, baumgarte); + + public void Dispose() => Jolt.PInvoke.DualAxisConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DummyCalculateSolverSteps.gen.cs b/Brutal.Jolt/Generated/Classes/DummyCalculateSolverSteps.gen.cs new file mode 100644 index 0000000..8ad0b77 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DummyCalculateSolverSteps.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Constraints/CalculateSolverSteps.h:59 + ///
+ /// class DummyCalculateSolverSteps + ///
+ ///
+ /// + /// + /// @cond INTERNAL + /// Dummy class to replace the steps calculator when we don't need the result + /// + /// + [InteropHandle] + public readonly partial struct DummyCalculateSolverSteps : IDisposable + { + public static DummyCalculateSolverSteps Create() => Jolt.PInvoke.DummyCalculateSolverSteps_Create(); + + public void Dispose() => Jolt.PInvoke.DummyCalculateSolverSteps_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/DynMatrix.gen.cs b/Brutal.Jolt/Generated/Classes/DynMatrix.gen.cs new file mode 100644 index 0000000..07c75c3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/DynMatrix.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Dynamic resizable matrix class + /// + /// + /// C++: + /// Jolt/Math/DynMatrix.h:10 + ///
+ /// class DynMatrix + ///
+ ///
+ [InteropHandle] + public readonly partial struct DynMatrix : IDisposable + { + /// + /// + /// C++: + /// Jolt/Math/DynMatrix.h:15 + ///
+ /// DynMatrix(uint inRows, uint inCols) + ///
+ ///
+ public static DynMatrix Create(uint rows, uint cols) => Jolt.PInvoke.DynMatrix_Create(rows, cols); + + /// + /// + /// Get dimensions + /// + /// + /// C++: + /// Jolt/Math/DynMatrix.h:22 + ///
+ /// uint GetCols() const + ///
+ ///
+ public uint GetCols() => Jolt.PInvoke.DynMatrix_GetCols(this); + + /// + /// + /// C++: + /// Jolt/Math/DynMatrix.h:23 + ///
+ /// uint GetRows() const + ///
+ ///
+ public uint GetRows() => Jolt.PInvoke.DynMatrix_GetRows(this); + + public void Dispose() => Jolt.PInvoke.DynMatrix_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/EPAConvexHullBuilder.gen.cs b/Brutal.Jolt/Generated/Classes/EPAConvexHullBuilder.gen.cs new file mode 100644 index 0000000..4f64940 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/EPAConvexHullBuilder.gen.cs @@ -0,0 +1,130 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A convex hull builder specifically made for the EPA penetration depth calculation. It trades accuracy for + /// speed and will simply abort of the hull forms defects due to numerical precision problems. + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:24 + ///
+ /// class EPAConvexHullBuilder : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct EPAConvexHullBuilder + { + /// + /// + /// Initialize the hull with 3 points + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:234 + ///
+ /// void Initialize(int inIdx1, int inIdx2, int inIdx3) + ///
+ ///
+ public void Initialize(int idx1, int idx2, int idx3) => + Jolt.PInvoke.EPAConvexHullBuilder_Initialize(this, idx1, idx2, idx3); + + /// + /// + /// Check if there's another triangle to process from the queue + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:262 + ///
+ /// bool HasNextTriangle() const + ///
+ ///
+ public bool HasNextTriangle() => Jolt.PInvoke.EPAConvexHullBuilder_HasNextTriangle(this); + + /// + /// + /// Max triangles in hull + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:36 + ///
+ /// static constexpr int cMaxTriangles = 256 + ///
+ ///
+ /// + /// + /// Due to the Euler characteristic (https://en.wikipedia.org/wiki/Euler_characteristic) we know that Vertices - Edges + Faces = 2 + /// In our case we only have triangles and they are always fully connected, so each edge is shared exactly between 2 faces: Edges = Faces * 3 / 2 + /// Substituting: Vertices = Faces / 2 + 2 which is approximately Faces / 2. + /// + /// + public static int GetMaxTriangles() => Jolt.PInvoke.EPAConvexHullBuilder_GetMaxTriangles(); + + /// + /// + /// Max number of points in hull + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:37 + ///
+ /// static constexpr int cMaxPoints = cMaxTriangles / 2 + ///
+ ///
+ public static int GetMaxPoints() => Jolt.PInvoke.EPAConvexHullBuilder_GetMaxPoints(); + + /// + /// + /// Max number of edges in FindEdge + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:40 + ///
+ /// static constexpr int cMaxEdgeLength = 128 + ///
+ ///
+ /// + /// + /// Constants + /// + /// + public static int GetMaxEdgeLength() => Jolt.PInvoke.EPAConvexHullBuilder_GetMaxEdgeLength(); + + /// + /// + /// Minimum area of a triangle before, if smaller than this it will not be added to the priority queue + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:41 + ///
+ /// static constexpr float cMinTriangleArea = 1.0e-10f + ///
+ ///
+ public static float GetMinTriangleArea() => Jolt.PInvoke.EPAConvexHullBuilder_GetMinTriangleArea(); + + /// + /// + /// Epsilon value used to determine if a point is in the interior of a triangle + /// + /// + /// C++: + /// Jolt/Geometry/EPAConvexHullBuilder.h:42 + ///
+ /// static constexpr float cBarycentricEpsilon = 1.0e-3f + ///
+ ///
+ public static float GetBarycentricEpsilon() => Jolt.PInvoke.EPAConvexHullBuilder_GetBarycentricEpsilon(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/EPAPenetrationDepth.gen.cs b/Brutal.Jolt/Generated/Classes/EPAPenetrationDepth.gen.cs new file mode 100644 index 0000000..f4e01ca --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/EPAPenetrationDepth.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of Expanding Polytope Algorithm as described in: + /// + /// + /// C++: + /// Jolt/Geometry/EPAPenetrationDepth.h:36 + ///
+ /// class EPAPenetrationDepth + ///
+ ///
+ /// + /// + /// Implementation of Expanding Polytope Algorithm as described in: + /// + /// Proximity Queries and Penetration Depth Computation on 3D Game Objects - Gino van den Bergen + /// + /// The implementation of this algorithm does not completely follow the article, instead of splitting + /// triangles at each edge as in fig. 7 in the article, we build a convex hull (removing any triangles that + /// are facing the new point, thereby avoiding the problem of getting really oblong triangles as mentioned in + /// the article). + /// + /// The algorithm roughly works like: + /// + /// - Start with a simplex of the Minkowski sum (difference) of two objects that was calculated by GJK + /// - This simplex should contain the origin (or else GJK would have reported: no collision) + /// - In cases where the simplex consists of 1 - 3 points, find some extra support points (of the Minkowski sum) to get to at least 4 points + /// - Convert this into a convex hull with non-zero volume (which includes the origin) + /// - A: Calculate the closest point to the origin for all triangles of the hull and take the closest one + /// - Calculate a new support point (of the Minkowski sum) in this direction and add this point to the convex hull + /// - This will remove all faces that are facing the new point and will create new triangles to fill up the hole + /// - Loop to A until no closer point found + /// - The closest point indicates the position / direction of least penetration + /// + /// + [InteropHandle] + public readonly partial struct EPAPenetrationDepth : IDisposable + { + /// + /// + /// Return code for GetPenetrationDepthStepGJK + /// + /// + /// C++: + /// Jolt/Geometry/EPAPenetrationDepth.h:85 + ///
+ /// enum class EStatus + ///
+ ///
+ public enum Status : int + { + /// + /// + /// Returned if the objects don't collide, in this case outPointA/outPointB are invalid + /// + /// + /// C++: + /// Jolt/Geometry/EPAPenetrationDepth.h:87 + ///
+ /// NotColliding + ///
+ ///
+ NotColliding, + + /// + /// + /// Returned if the objects penetrate + /// + /// + /// C++: + /// Jolt/Geometry/EPAPenetrationDepth.h:88 + ///
+ /// Colliding + ///
+ ///
+ Colliding, + + /// + /// + /// Returned if the objects penetrate further than the convex radius. In this case you need to call + /// GetPenetrationDepthStepEPA to get the actual penetration depth. + /// + /// + /// C++: + /// Jolt/Geometry/EPAPenetrationDepth.h:89 + ///
+ /// Indeterminate + ///
+ ///
+ Indeterminate, + } + + public static EPAPenetrationDepth Create() => Jolt.PInvoke.EPAPenetrationDepth_Create(); + + public void Dispose() => Jolt.PInvoke.EPAPenetrationDepth_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Ellipse.gen.cs b/Brutal.Jolt/Generated/Classes/Ellipse.gen.cs new file mode 100644 index 0000000..8dcb493 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Ellipse.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Ellipse centered around the origin + /// + /// + /// C++: + /// Jolt/Geometry/Ellipse.h:13 + ///
+ /// class Ellipse + ///
+ ///
+ /// + /// + /// Ellipse centered around the origin + /// @see https://en.wikipedia.org/wiki/Ellipse + /// + /// + [InteropHandle] + public readonly partial struct Ellipse : IDisposable + { + /// + /// + /// Construct ellipse with radius A along the X-axis and B along the Y-axis + /// + /// + /// C++: + /// Jolt/Geometry/Ellipse.h:19 + ///
+ /// Ellipse(float inA, float inB) + ///
+ ///
+ public static Ellipse Create(float a, float b) => Jolt.PInvoke.Ellipse_Create(a, b); + + /// + /// + /// Check if inPoint is inside the ellipse + /// + /// + /// C++: + /// Jolt/Geometry/Ellipse.h:22 + ///
+ /// bool IsInside(const Float2 &inPoint) const + ///
+ ///
+ public bool IsInside(float2 point) => Jolt.PInvoke.Ellipse_IsInside(this, point); + + /// + /// + /// Get the closest point on the ellipse to inPoint Assumes inPoint is outside the ellipse + /// + /// + /// C++: + /// Jolt/Geometry/Ellipse.h:30 + ///
+ /// Float2 GetClosestPoint(const Float2 &inPoint) const + ///
+ ///
+ /// + /// + /// Get the closest point on the ellipse to inPoint + /// Assumes inPoint is outside the ellipse + /// @see Rotation Joint Limits in Quaternion Space by Gino van den Bergen, section 10.1 in Game Engine Gems 3. + /// + /// + public float2 GetClosestPoint(float2 point) + { + Jolt.PInvoke.Ellipse_GetClosestPoint(this, point, out var _outResult); + return _outResult; + } + + /// + /// + /// Get normal at point inPoint (non-normalized vector) + /// + /// + /// C++: + /// Jolt/Geometry/Ellipse.h:66 + ///
+ /// Float2 GetNormal(const Float2 &inPoint) const + ///
+ ///
+ public float2 GetNormal(float2 point) + { + Jolt.PInvoke.Ellipse_GetNormal(this, point, out var _outResult); + return _outResult; + } + + public void Dispose() => Jolt.PInvoke.Ellipse_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/EmptyShape.gen.cs b/Brutal.Jolt/Generated/Classes/EmptyShape.gen.cs new file mode 100644 index 0000000..a6103e3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/EmptyShape.gen.cs @@ -0,0 +1,347 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// An empty shape that has no volume and collides with nothing. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:34 + ///
+ /// class EmptyShape final : public Shape + ///
+ ///
+ /// + /// + /// An empty shape that has no volume and collides with nothing. + /// + /// Possible use cases: + /// - As a placeholder for a shape that will be created later. E.g. if you first need to create a body and only then know what shape it will have. + /// - If you need a kinematic body to attach a constraint to, but you don't want the body to collide with anything. + /// + /// Note that, if possible, you should also put your body in an ObjectLayer that doesn't collide with anything. + /// This ensures that collisions will be filtered out at broad phase level instead of at narrow phase level, this is more efficient. + /// + /// + [InteropHandle] + public readonly partial struct EmptyShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:38 + ///
+ /// EmptyShape() + ///
+ ///
+ public static EmptyShape Create() => Jolt.PInvoke.EmptyShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:39 + ///
+ /// explicit EmptyShape(Vec3Arg inCenterOfMass) + ///
+ ///
+ public static EmptyShape Create(float3 centerOfMass) => Jolt.PInvoke.EmptyShape_Create_2(centerOfMass); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:40 + ///
+ /// EmptyShape(const EmptyShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static EmptyShape Create(EmptyShapeSettings settings) + { + var _handle = Jolt.PInvoke.EmptyShape_Create_3(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:69 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.EmptyShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(EmptyShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/EmptyShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/EmptyShapeSettings.gen.cs new file mode 100644 index 0000000..7bb8bef --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/EmptyShapeSettings.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs an EmptyShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:13 + ///
+ /// class EmptyShapeSettings final : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct EmptyShapeSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:18 + ///
+ /// EmptyShapeSettings() = default + ///
+ ///
+ public static EmptyShapeSettings Create() => Jolt.PInvoke.EmptyShapeSettings_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:19 + ///
+ /// explicit EmptyShapeSettings(Vec3Arg inCenterOfMass) + ///
+ ///
+ public static EmptyShapeSettings Create(float3 centerOfMass) => + Jolt.PInvoke.EmptyShapeSettings_Create_2(centerOfMass); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Determines the center of mass for this shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:23 + ///
+ /// Vec3 mCenterOfMass = Vec3::sZero() + ///
+ ///
+ public float3 GetCenterOfMass() => Jolt.PInvoke.EmptyShapeSettings_GetCenterOfMass(this); + + /// + /// + /// Determines the center of mass for this shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/EmptyShape.h:23 + ///
+ /// Vec3 mCenterOfMass = Vec3::sZero() + ///
+ ///
+ public void SetCenterOfMass(float3 value) => Jolt.PInvoke.EmptyShapeSettings_SetCenterOfMass(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(EmptyShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FPExceptionDisableDivByZero.gen.cs b/Brutal.Jolt/Generated/Classes/FPExceptionDisableDivByZero.gen.cs new file mode 100644 index 0000000..64bac30 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FPExceptionDisableDivByZero.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Core/FPException.h:91 + ///
+ /// class FPExceptionDisableDivByZero { } + ///
+ ///
+ [InteropHandle] + public readonly partial struct FPExceptionDisableDivByZero : IDisposable + { + public static FPExceptionDisableDivByZero Create() => Jolt.PInvoke.FPExceptionDisableDivByZero_Create(); + + public void Dispose() => Jolt.PInvoke.FPExceptionDisableDivByZero_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FPExceptionDisableInvalid.gen.cs b/Brutal.Jolt/Generated/Classes/FPExceptionDisableInvalid.gen.cs new file mode 100644 index 0000000..e3a40b8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FPExceptionDisableInvalid.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Core/FPException.h:90 + ///
+ /// class FPExceptionDisableInvalid { } + ///
+ ///
+ [InteropHandle] + public readonly partial struct FPExceptionDisableInvalid : IDisposable + { + public static FPExceptionDisableInvalid Create() => Jolt.PInvoke.FPExceptionDisableInvalid_Create(); + + public void Dispose() => Jolt.PInvoke.FPExceptionDisableInvalid_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FPExceptionDisableOverflow.gen.cs b/Brutal.Jolt/Generated/Classes/FPExceptionDisableOverflow.gen.cs new file mode 100644 index 0000000..fbe1467 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FPExceptionDisableOverflow.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Core/FPException.h:92 + ///
+ /// class FPExceptionDisableOverflow { } + ///
+ ///
+ [InteropHandle] + public readonly partial struct FPExceptionDisableOverflow : IDisposable + { + public static FPExceptionDisableOverflow Create() => Jolt.PInvoke.FPExceptionDisableOverflow_Create(); + + public void Dispose() => Jolt.PInvoke.FPExceptionDisableOverflow_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FPExceptionsEnable.gen.cs b/Brutal.Jolt/Generated/Classes/FPExceptionsEnable.gen.cs new file mode 100644 index 0000000..a681dfe --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FPExceptionsEnable.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Dummy implementations + /// + /// + /// C++: + /// Jolt/Core/FPException.h:89 + ///
+ /// class FPExceptionsEnable { } + ///
+ ///
+ [InteropHandle] + public readonly partial struct FPExceptionsEnable : IDisposable + { + public static FPExceptionsEnable Create() => Jolt.PInvoke.FPExceptionsEnable_Create(); + + public void Dispose() => Jolt.PInvoke.FPExceptionsEnable_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FPFlushDenormals.gen.cs b/Brutal.Jolt/Generated/Classes/FPFlushDenormals.gen.cs new file mode 100644 index 0000000..1f3bce0 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FPFlushDenormals.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Helper class that needs to be put on the stack to enable flushing denormals to zero This can make floating + /// point operations much faster when working with very small numbers + /// + /// + /// C++: + /// Jolt/Core/FPFlushDenormals.h:20 + ///
+ /// class FPFlushDenormals : public FPControlWord<_MM_FLUSH_ZERO_ON, _MM_FLUSH_ZERO_MASK> { } + ///
+ ///
+ [InteropHandle] + public readonly partial struct FPFlushDenormals : IDisposable + { + public static FPFlushDenormals Create() => Jolt.PInvoke.FPFlushDenormals_Create(); + + public void Dispose() => Jolt.PInvoke.FPFlushDenormals_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Factory.gen.cs b/Brutal.Jolt/Generated/Classes/Factory.gen.cs new file mode 100644 index 0000000..415022c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Factory.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class is responsible for creating instances of classes based on their name or hash and is mainly used + /// for deserialization of saved data. + /// + /// + /// C++: + /// Jolt/Core/Factory.h:13 + ///
+ /// class Factory + ///
+ ///
+ [InteropHandle] + public readonly partial struct Factory : IDisposable + { + public static Factory Create() => Jolt.PInvoke.Factory_Create(); + + /// + /// + /// Create an object + /// + /// + /// C++: + /// Jolt/Core/Factory.h:19 + ///
+ /// void * CreateObject(const char *inName) + ///
+ ///
+ public unsafe Ptr CreateObject(RefString8 name) + { + fixed (byte* name_fixed = name) + { + return Jolt.PInvoke.Factory_CreateObject(this, name_fixed); + } + } + + /// + /// + /// Find type info for a specific class by name + /// + /// + /// C++: + /// Jolt/Core/Factory.h:22 + ///
+ /// const RTTI * Find(const char *inName) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public unsafe RTTI Find(RefString8 name) + { + fixed (byte* name_fixed = name) + { + return Jolt.PInvoke.Factory_Find(this, name_fixed); + } + } + + /// + /// + /// Find type info for a specific class by hash + /// + /// + /// C++: + /// Jolt/Core/Factory.h:25 + ///
+ /// const RTTI * Find(uint32 inHash) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI Find(uint hash) => Jolt.PInvoke.Factory_Find_2(this, hash); + + /// + /// + /// Register an object with the factory. Returns false on failure. + /// + /// + /// C++: + /// Jolt/Core/Factory.h:28 + ///
+ /// bool Register(const RTTI *inRTTI) + ///
+ ///
+ public bool Register(RTTI rtti) => Jolt.PInvoke.Factory_Register(this, rtti); + + /// + /// + /// Register a list of objects with the factory. Returns false on failure. + /// + /// + /// C++: + /// Jolt/Core/Factory.h:31 + ///
+ /// bool Register(const RTTI **inRTTIs, uint inNumber) + ///
+ ///
+ /// + /// + /// rTTIs is a buffer of RTTI handles you allocate and size; the handles the call writes into it are + /// borrowed from their owner - don't Dispose them. + /// + /// + public unsafe bool Register(Ptr rTTIs, uint number) => + Jolt.PInvoke.Factory_Register_2(this, rTTIs, number); + + /// + /// + /// Unregisters all types + /// + /// + /// C++: + /// Jolt/Core/Factory.h:34 + ///
+ /// void Clear() + ///
+ ///
+ public void Clear() => Jolt.PInvoke.Factory_Clear(this); + + /// + /// + /// Get all registered classes + /// + /// + /// C++: + /// Jolt/Core/Factory.h:37 + ///
+ /// Array<const RTTI *> GetAllClasses() const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed from the object that owns them: don't Dispose them, and don't read them once + /// that owner is gone - the buffer keeps the pointers alive, not the objects. + /// + /// + public NativeArray GetAllClasses() => new NativeArray(Jolt.PInvoke.Factory_GetAllClasses(this)); + + /// + /// + /// Singleton factory instance + /// + /// + /// C++: + /// Jolt/Core/Factory.h:40 + ///
+ /// static Factory * sInstance + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + internal static Factory GetInstance() => Jolt.PInvoke.Factory_GetInstance(); + + /// + /// + /// Singleton factory instance + /// + /// + /// C++: + /// Jolt/Core/Factory.h:40 + ///
+ /// static Factory * sInstance + ///
+ ///
+ internal static void SetInstance(Factory value) => Jolt.PInvoke.Factory_SetInstance(value); + + public void Dispose() => Jolt.PInvoke.Factory_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FixedConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/FixedConstraint.gen.cs new file mode 100644 index 0000000..3c22e08 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FixedConstraint.gen.cs @@ -0,0 +1,183 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A fixed constraint welds two bodies together removing all degrees of freedom between them. This variant uses + /// Euler angles for the rotation constraint. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:48 + ///
+ /// class FixedConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct FixedConstraint : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:54 + ///
+ /// FixedConstraint(Body &inBody1, Body &inBody2, const FixedConstraintSettings &inSettings) + ///
+ ///
+ public static FixedConstraint Create(Body body1, Body body2, FixedConstraintSettings settings) => + Jolt.PInvoke.FixedConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:76 + ///
+ /// inline Vec3 GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float3 GetTotalLambdaPosition() => Jolt.PInvoke.FixedConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:77 + ///
+ /// inline Vec3 GetTotalLambdaRotation() const + ///
+ ///
+ public float3 GetTotalLambdaRotation() => Jolt.PInvoke.FixedConstraint_GetTotalLambdaRotation(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(FixedConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(FixedConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/FixedConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/FixedConstraintSettings.gen.cs new file mode 100644 index 0000000..224f0ae --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/FixedConstraintSettings.gen.cs @@ -0,0 +1,288 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Fixed constraint settings, used to create a fixed constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:14 + ///
+ /// class FixedConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct FixedConstraintSettings : IDisposable + { + public static FixedConstraintSettings Create() => Jolt.PInvoke.FixedConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:26 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.FixedConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:26 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.FixedConstraintSettings_SetSpace(this, value); + + /// + /// + /// When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions of + /// the bodies when the constraint is created (they will be fixated in their current relative + /// position/orientation). Set this to false if you want to supply the attachment points yourself. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:29 + ///
+ /// bool mAutoDetectPoint = false + ///
+ ///
+ public bool GetAutoDetectPoint() => Jolt.PInvoke.FixedConstraintSettings_GetAutoDetectPoint(this); + + /// + /// + /// When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions of + /// the bodies when the constraint is created (they will be fixated in their current relative + /// position/orientation). Set this to false if you want to supply the attachment points yourself. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:29 + ///
+ /// bool mAutoDetectPoint = false + ///
+ ///
+ public void SetAutoDetectPoint(bool value) => + Jolt.PInvoke.FixedConstraintSettings_SetAutoDetectPoint(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:32 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint1() => Jolt.PInvoke.FixedConstraintSettings_GetPoint1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:32 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetPoint1(float3 value) => Jolt.PInvoke.FixedConstraintSettings_SetPoint1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:33 + ///
+ /// Vec3 mAxisX1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetAxisX1() => Jolt.PInvoke.FixedConstraintSettings_GetAxisX1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:33 + ///
+ /// Vec3 mAxisX1 = Vec3::sAxisX() + ///
+ ///
+ public void SetAxisX1(float3 value) => Jolt.PInvoke.FixedConstraintSettings_SetAxisX1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:34 + ///
+ /// Vec3 mAxisY1 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetAxisY1() => Jolt.PInvoke.FixedConstraintSettings_GetAxisY1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:34 + ///
+ /// Vec3 mAxisY1 = Vec3::sAxisY() + ///
+ ///
+ public void SetAxisY1(float3 value) => Jolt.PInvoke.FixedConstraintSettings_SetAxisY1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:37 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint2() => Jolt.PInvoke.FixedConstraintSettings_GetPoint2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:37 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetPoint2(float3 value) => Jolt.PInvoke.FixedConstraintSettings_SetPoint2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:38 + ///
+ /// Vec3 mAxisX2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetAxisX2() => Jolt.PInvoke.FixedConstraintSettings_GetAxisX2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:38 + ///
+ /// Vec3 mAxisX2 = Vec3::sAxisX() + ///
+ ///
+ public void SetAxisX2(float3 value) => Jolt.PInvoke.FixedConstraintSettings_SetAxisX2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:39 + ///
+ /// Vec3 mAxisY2 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetAxisY2() => Jolt.PInvoke.FixedConstraintSettings_GetAxisY2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/FixedConstraint.h:39 + ///
+ /// Vec3 mAxisY2 = Vec3::sAxisY() + ///
+ ///
+ public void SetAxisY2(float3 value) => Jolt.PInvoke.FixedConstraintSettings_SetAxisY2(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(FixedConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(FixedConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GJKClosestPoint.gen.cs b/Brutal.Jolt/Generated/Classes/GJKClosestPoint.gen.cs new file mode 100644 index 0000000..4f58a69 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GJKClosestPoint.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Convex vs convex collision detection Based on: A Fast and Robust GJK Implementation for Collision Detection + /// of Convex Objects - Gino van den Bergen + /// + /// + /// C++: + /// Jolt/Geometry/GJKClosestPoint.h:21 + ///
+ /// class GJKClosestPoint : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct GJKClosestPoint : IDisposable + { + public static GJKClosestPoint Create() => Jolt.PInvoke.GJKClosestPoint_Create(); + + public void Dispose() => Jolt.PInvoke.GJKClosestPoint_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GearConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/GearConstraint.gen.cs new file mode 100644 index 0000000..37e0e6a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GearConstraint.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A gear constraint constrains the rotation of body1 to the rotation of body 2 using a gear. Note that this + /// constraint needs to be used in conjunction with a two hinge constraints. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:52 + ///
+ /// class GearConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct GearConstraint : IDisposable + { + /// + /// + /// Construct gear constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:58 + ///
+ /// GearConstraint(Body &inBody1, Body &inBody2, const GearConstraintSettings &inSettings) + ///
+ ///
+ public static GearConstraint Create(Body body1, Body body2, GearConstraintSettings settings) => + Jolt.PInvoke.GearConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// The constraints that constrain both gears (2 hinges), optional and used to calculate the rotation error + /// and fix numerical drift. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:80 + ///
+ /// void SetConstraints(const Constraint *inGear1, const Constraint *inGear2) + ///
+ ///
+ public void SetConstraints(Constraint gear1, Constraint gear2) => + Jolt.PInvoke.GearConstraint_SetConstraints(this, gear1, gear2); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:83 + ///
+ /// inline float GetTotalLambda() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the angular impulse applied to satisfy the + /// constraint) + /// + /// + public float GetTotalLambda() => Jolt.PInvoke.GearConstraint_GetTotalLambda(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(GearConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(GearConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GearConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/GearConstraintPart.gen.cs new file mode 100644 index 0000000..e3e2fd3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GearConstraintPart.gen.cs @@ -0,0 +1,219 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constraint that constrains two rotations using a gear (rotating in opposite direction) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:39 + ///
+ /// class GearConstraintPart + ///
+ ///
+ /// + /// + /// Constraint that constrains two rotations using a gear (rotating in opposite direction) + /// + /// Constraint equation: + /// + /// C = Rotation1(t) + r Rotation2(t) + /// + /// Derivative: + /// + /// d/dt C = 0 + /// <=> w1 . a + r w2 . b = 0 + /// + /// Jacobian: + /// + /// \f[J = \begin{bmatrix}0 & a^T & 0 & r b^T\end{bmatrix}\f] + /// + /// Used terms (here and below, everything in world space):\n + /// a = axis around which body 1 rotates (normalized).\n + /// b = axis along which body 2 slides (normalized).\n + /// Rotation1(t) = rotation around a of body 1.\n + /// Rotation2(t) = rotation around b of body 2.\n + /// r = ratio between rotation for body 1 and 2.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// \f$\beta\f$ = baumgarte constant. + /// + /// + [InteropHandle] + public readonly partial struct GearConstraintPart : IDisposable + { + public static GearConstraintPart Create() => Jolt.PInvoke.GearConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:69 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Vec3Arg inWorldSpaceHingeAxis1, const Body &inBody2, Vec3Arg inWorldSpaceHingeAxis2, float inRatio) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inWorldSpaceHingeAxis1 The axis around which body 1 rotates + /// @param inWorldSpaceHingeAxis2 The axis around which body 2 rotates + /// @param inRatio The ratio between rotation and translation + /// + /// + public void CalculateConstraintProperties( + Body body1, + float3 worldSpaceHingeAxis1, + Body body2, + float3 worldSpaceHingeAxis2, + float ratio + ) => + Jolt.PInvoke.GearConstraintPart_CalculateConstraintProperties( + this, + body1, + worldSpaceHingeAxis1, + body2, + worldSpaceHingeAxis2, + ratio + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:89 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.GearConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:96 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.GearConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:105 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame + /// + /// + public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.GearConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:117 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Vec3Arg inWorldSpaceHingeAxis1, Body &ioBody2, Vec3Arg inWorldSpaceHingeAxis2, float inRatio) + ///
+ ///
+ /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWorldSpaceHingeAxis1 The axis around which body 1 rotates + /// @param inWorldSpaceHingeAxis2 The axis around which body 2 rotates + /// @param inRatio The ratio between rotation and translation + /// + /// + public bool SolveVelocityConstraint( + Body body1, + float3 worldSpaceHingeAxis1, + Body body2, + float3 worldSpaceHingeAxis2, + float ratio + ) => + Jolt.PInvoke.GearConstraintPart_SolveVelocityConstraint( + this, + body1, + worldSpaceHingeAxis1, + body2, + worldSpaceHingeAxis2, + ratio + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:129 + ///
+ /// float GetTotalLambda() const + ///
+ ///
+ public float GetTotalLambda() => Jolt.PInvoke.GearConstraintPart_GetTotalLambda(this); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h:139 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inC, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inC Value of the constraint equation (C) + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint(Body body1, Body body2, float c, float baumgarte) => + Jolt.PInvoke.GearConstraintPart_SolvePositionConstraint(this, body1, body2, c, baumgarte); + + public void Dispose() => Jolt.PInvoke.GearConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GearConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/GearConstraintSettings.gen.cs new file mode 100644 index 0000000..861cc11 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GearConstraintSettings.gen.cs @@ -0,0 +1,226 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Gear constraint settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:13 + ///
+ /// class GearConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct GearConstraintSettings : IDisposable + { + public static GearConstraintSettings Create() => Jolt.PInvoke.GearConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// Defines the ratio between the rotation of both gears The ratio is defined as: Gear1Rotation(t) = -ratio + /// * Gear2Rotation(t) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:28 + ///
+ /// void SetRatio(int inNumTeethGear1, int inNumTeethGear2) + ///
+ ///
+ /// + /// + /// Defines the ratio between the rotation of both gears + /// The ratio is defined as: Gear1Rotation(t) = -ratio * Gear2Rotation(t) + /// @param inNumTeethGear1 Number of teeth that body 1 has + /// @param inNumTeethGear2 Number of teeth that body 2 has + /// + /// + public void SetRatio(int numTeethGear1, int numTeethGear2) => + Jolt.PInvoke.GearConstraintSettings_SetRatio(this, numTeethGear1, numTeethGear2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:34 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.GearConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:34 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.GearConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:37 + ///
+ /// Vec3 mHingeAxis1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetHingeAxis1() => Jolt.PInvoke.GearConstraintSettings_GetHingeAxis1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:37 + ///
+ /// Vec3 mHingeAxis1 = Vec3::sAxisX() + ///
+ ///
+ public void SetHingeAxis1(float3 value) => Jolt.PInvoke.GearConstraintSettings_SetHingeAxis1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:40 + ///
+ /// Vec3 mHingeAxis2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetHingeAxis2() => Jolt.PInvoke.GearConstraintSettings_GetHingeAxis2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:40 + ///
+ /// Vec3 mHingeAxis2 = Vec3::sAxisX() + ///
+ ///
+ public void SetHingeAxis2(float3 value) => Jolt.PInvoke.GearConstraintSettings_SetHingeAxis2(this, value); + + /// + /// + /// Ratio between both gears, see SetRatio. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:43 + ///
+ /// float mRatio = 1.0f + ///
+ ///
+ public float GetRatio() => Jolt.PInvoke.GearConstraintSettings_GetRatio(this); + + /// + /// + /// Ratio between both gears, see SetRatio. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/GearConstraint.h:43 + ///
+ /// float mRatio = 1.0f + ///
+ ///
+ public void SetRatio(float value) => Jolt.PInvoke.GearConstraintSettings_SetRatio_2(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(GearConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(GearConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GetTrianglesContextMultiVertexList.gen.cs b/Brutal.Jolt/Generated/Classes/GetTrianglesContextMultiVertexList.gen.cs new file mode 100644 index 0000000..c14faac --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GetTrianglesContextMultiVertexList.gen.cs @@ -0,0 +1,145 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of GetTrianglesStart/Next that uses a multiple fixed lists of vertices for the triangles. + /// These are transformed into world space when getting the triangles. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:150 + ///
+ /// class GetTrianglesContextMultiVertexList + ///
+ ///
+ [InteropHandle] + public readonly partial struct GetTrianglesContextMultiVertexList : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:234 + ///
+ /// struct Part + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 80)] + public partial struct Part + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:236 + ///
+ /// Mat44 mLocalToWorld + ///
+ ///
+ [FieldOffset(0)] + public float4x4 LocalToWorld; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:237 + ///
+ /// const Vec3 * mTriangleVertices + ///
+ ///
+ [FieldOffset(64)] + public Ptr TriangleVertices; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:238 + ///
+ /// size_t mNumTriangleVertices + ///
+ ///
+ [FieldOffset(72)] + public nuint NumTriangleVertices; + } + + /// + /// + /// Constructor, to be called in GetTrianglesStart + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:154 + ///
+ /// GetTrianglesContextMultiVertexList(bool inIsInsideOut, const PhysicsMaterial *inMaterial) + ///
+ ///
+ public static GetTrianglesContextMultiVertexList Create(bool isInsideOut, PhysicsMaterial material) => + Jolt.PInvoke.GetTrianglesContextMultiVertexList_Create(isInsideOut, material); + + /// + /// + /// Add a mesh part and its transform + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:163 + ///
+ /// void AddPart(Mat44Arg inLocalToWorld, const Vec3 *inTriangleVertices, size_t inNumTriangleVertices) + ///
+ ///
+ /// + /// + /// triangleVertices is copied into a native buffer the object keeps; the span is only read. + /// + /// + public unsafe void AddPart(in float4x4 localToWorld, ReadOnlySpan triangleVertices) + { + fixed (float3* triangleVertices_fixed = triangleVertices) + { + Jolt.PInvoke.GetTrianglesContextMultiVertexList_AddPart( + this, + in localToWorld, + triangleVertices_fixed, + (nuint)triangleVertices.Length + ); + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:171 + ///
+ /// int GetTrianglesNext(int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials) + ///
+ ///
+ /// + /// + /// @see Shape::GetTrianglesNext + /// + /// + /// materials is a buffer of PhysicsMaterial handles you allocate and size; the handles the call writes into + /// it are borrowed from their owner - don't Dispose them. + /// + /// + public unsafe int GetTrianglesNext( + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials + ) => + Jolt.PInvoke.GetTrianglesContextMultiVertexList_GetTrianglesNext( + this, + maxTrianglesRequested, + triangleVertices, + materials + ); + + public void Dispose() => Jolt.PInvoke.GetTrianglesContextMultiVertexList_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GetTrianglesContextVertexList.gen.cs b/Brutal.Jolt/Generated/Classes/GetTrianglesContextVertexList.gen.cs new file mode 100644 index 0000000..b6b01de --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GetTrianglesContextVertexList.gen.cs @@ -0,0 +1,96 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of GetTrianglesStart/Next that uses a fixed list of vertices for the triangles. These are + /// transformed into world space when getting the triangles. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:14 + ///
+ /// class GetTrianglesContextVertexList + ///
+ ///
+ [InteropHandle] + public readonly partial struct GetTrianglesContextVertexList : IDisposable + { + /// + /// + /// Constructor, to be called in GetTrianglesStart + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:18 + ///
+ /// GetTrianglesContextVertexList(Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, Mat44Arg inLocalTransform, const Vec3 *inTriangleVertices, size_t inNumTriangleVertices, const PhysicsMaterial *inMaterial) + ///
+ ///
+ /// + /// + /// triangleVertices is copied into a native container the object keeps; the span is only read. + /// + /// + public static unsafe GetTrianglesContextVertexList Create( + float3 positionCOM, + floatQuat rotation, + float3 scale, + in float4x4 localTransform, + ReadOnlySpan triangleVertices, + PhysicsMaterial material + ) + { + fixed (float3* triangleVertices_fixed = triangleVertices) + { + return Jolt.PInvoke.GetTrianglesContextVertexList_Create( + positionCOM, + rotation, + scale, + in localTransform, + triangleVertices_fixed, + (nuint)triangleVertices.Length, + material + ); + } + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/GetTrianglesContext.h:31 + ///
+ /// int GetTrianglesNext(int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials) + ///
+ ///
+ /// + /// + /// @see Shape::GetTrianglesNext + /// + /// + /// materials is a buffer of PhysicsMaterial handles you allocate and size; the handles the call writes into + /// it are borrowed from their owner - don't Dispose them. + /// + /// + public unsafe int GetTrianglesNext( + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials + ) => + Jolt.PInvoke.GetTrianglesContextVertexList_GetTrianglesNext( + this, + maxTrianglesRequested, + triangleVertices, + materials + ); + + public void Dispose() => Jolt.PInvoke.GetTrianglesContextVertexList_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/GroupFilter.gen.cs b/Brutal.Jolt/Generated/Classes/GroupFilter.gen.cs new file mode 100644 index 0000000..b4b54ba --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GroupFilter.gen.cs @@ -0,0 +1,114 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Abstract class that checks if two CollisionGroups collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:17 + ///
+ /// class GroupFilter : public SerializableObject, public RefTarget<GroupFilter> + ///
+ ///
+ [InteropHandle] + public readonly partial struct GroupFilter : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:19 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.GroupFilter_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:19 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.GroupFilter_CastTo(this, rtti); + + /// + /// + /// Check if two groups collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:26 + ///
+ /// virtual bool CanCollide(const CollisionGroup &inGroup1, const CollisionGroup &inGroup2) const = 0 + ///
+ ///
+ public bool CanCollide(CollisionGroup group1, CollisionGroup group2) => + Jolt.PInvoke.GroupFilter_CanCollide(this, group1, group2); + + /// + /// + /// Saves the contents of the group filter in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:29 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.GroupFilter_SaveBinaryState(this, stream); + + /// + /// + /// Creates a GroupFilter of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:34 + ///
+ /// static GroupFilterResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static GroupFilter RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.GroupFilter_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + public void AddRef() => Jolt.PInvoke.GroupFilter_AddRef(this); + + public void Release() => Jolt.PInvoke.GroupFilter_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.GroupFilter_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/GroupFilterTable.gen.cs b/Brutal.Jolt/Generated/Classes/GroupFilterTable.gen.cs new file mode 100644 index 0000000..710783f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GroupFilterTable.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of GroupFilter that stores a bit table with one bit per sub shape ID pair to determine if + /// they collide or not + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilterTable.h:35 + ///
+ /// class GroupFilterTable final : public GroupFilter + ///
+ ///
+ /// + /// + /// Implementation of GroupFilter that stores a bit table with one bit per sub shape ID pair to determine if they collide or not + /// + /// The collision rules: + /// - If one of the objects is in the cInvalidGroup the objects will collide. + /// - If the objects are in different groups they will collide. + /// - If they're in the same group but their collision filter is different they will not collide. + /// - If they're in the same group and their collision filters match, we'll use the SubGroupID and the table below. + /// + /// For N = 6 sub groups the table will look like: + /// + /// sub group 1 ---> + /// sub group 2 x..... + /// | ox.... + /// | oox... + /// V ooox.. + /// oooox. + /// ooooox + /// + /// * 'x' means sub group 1 == sub group 2 and we define this to never collide. + /// * 'o' is a bit that we have to store that defines if the sub groups collide or not. + /// * '.' is a bit we don't need to store because the table is symmetric, we take care that group 2 > group 1 by swapping sub group 1 and sub group 2 if needed. + /// + /// The total number of bits we need to store is (N * (N - 1)) / 2 + /// + /// + [InteropHandle] + public readonly partial struct GroupFilterTable : IDisposable + { + /// + /// + /// Constructs the table with inNumSubGroups subgroups, initially all collision pairs are enabled except + /// when the sub group ID is the same + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilterTable.h:62 + ///
+ /// explicit GroupFilterTable(uint inNumSubGroups = 0) + ///
+ ///
+ public static GroupFilterTable Create(uint numSubGroups = 0) => + Jolt.PInvoke.GroupFilterTable_Create(numSubGroups); + + /// + public RTTI GetRTTI() => ((GroupFilter)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((GroupFilter)this).CastTo(rtti); + + /// + /// + /// Disable collision between two sub groups + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilterTable.h:74 + ///
+ /// void DisableCollision(SubGroupID inSubGroup1, SubGroupID inSubGroup2) + ///
+ ///
+ public void DisableCollision(uint subGroup1, uint subGroup2) => + Jolt.PInvoke.GroupFilterTable_DisableCollision(this, subGroup1, subGroup2); + + /// + /// + /// Enable collision between two sub groups + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilterTable.h:81 + ///
+ /// void EnableCollision(SubGroupID inSubGroup1, SubGroupID inSubGroup2) + ///
+ ///
+ public void EnableCollision(uint subGroup1, uint subGroup2) => + Jolt.PInvoke.GroupFilterTable_EnableCollision(this, subGroup1, subGroup2); + + /// + /// + /// Check if the collision between two subgroups is enabled + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilterTable.h:88 + ///
+ /// inline bool IsCollisionEnabled(SubGroupID inSubGroup1, SubGroupID inSubGroup2) const + ///
+ ///
+ public bool IsCollisionEnabled(uint subGroup1, uint subGroup2) => + Jolt.PInvoke.GroupFilterTable_IsCollisionEnabled(this, subGroup1, subGroup2); + + /// + public bool CanCollide(CollisionGroup group1, CollisionGroup group2) => + ((GroupFilter)this).CanCollide(group1, group2); + + /// + public void SaveBinaryState(StreamOut stream) => ((GroupFilter)this).SaveBinaryState(stream); + + public void AddRef() => ((GroupFilter)this).AddRef(); + + public void Release() => ((GroupFilter)this).Release(); + + public uint GetRefCount() => ((GroupFilter)this).GetRefCount(); + + public static implicit operator GroupFilter(GroupFilterTable value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/GroupFilterToIDMap.gen.cs b/Brutal.Jolt/Generated/Classes/GroupFilterToIDMap.gen.cs new file mode 100644 index 0000000..93859e0 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/GroupFilterToIDMap.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The GroupFilter objects written so far and the ids they were given, for SaveWithChildren: pass the same map + /// to every save into one stream, so an object several of them share is written once. + /// + /// + [InteropHandle] + public readonly partial struct GroupFilterToIDMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static GroupFilterToIDMap Create() => Jolt.PInvoke.GroupFilterToIDMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.GroupFilterToIDMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.GroupFilterToIDMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/HeightFieldShape.gen.cs b/Brutal.Jolt/Generated/Classes/HeightFieldShape.gen.cs new file mode 100644 index 0000000..7f0411e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/HeightFieldShape.gen.cs @@ -0,0 +1,742 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A height field shape. Cannot be used as a dynamic object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:118 + ///
+ /// class HeightFieldShape final : public Shape + ///
+ ///
+ /// + /// + /// A height field shape. Cannot be used as a dynamic object. + /// + /// Note: If you're using HeightFieldShape and are querying data while modifying the shape you'll have a race condition. + /// In this case it is best to create a new HeightFieldShape using the Clone function. You replace the shape on a body using BodyInterface::SetShape. + /// If a query is still working on the old shape, it will have taken a reference and keep the old shape alive until the query finishes. + /// + /// + [InteropHandle] + public readonly partial struct HeightFieldShape : IDisposable + { + /// + /// + /// A block of 2x2 ranges used to form a hierarchical grid, ordered left top, right top, left bottom, right + /// bottom + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:340 + ///
+ /// struct alignas(16) RangeBlock + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct RangeBlock + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:342 + ///
+ /// uint16 mMin[4] + ///
+ ///
+ [FieldOffset(0)] + public ushort_4 Min; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:343 + ///
+ /// uint16 mMax[4] + ///
+ ///
+ [FieldOffset(8)] + public ushort_4 Max; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:124 + ///
+ /// HeightFieldShape() + ///
+ ///
+ public static HeightFieldShape Create() => Jolt.PInvoke.HeightFieldShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:125 + ///
+ /// HeightFieldShape(const HeightFieldShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static HeightFieldShape Create(HeightFieldShapeSettings settings) + { + var _handle = Jolt.PInvoke.HeightFieldShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Clone this shape. Can be used to avoid race conditions. See the documentation of this class for more + /// information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:129 + ///
+ /// Ref<HeightFieldShape> Clone() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public HeightFieldShape Clone() => Jolt.PInvoke.HeightFieldShape_Clone(this); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + /// + /// Get the size of the height field. Note that this will always be rounded up to the nearest multiple of + /// GetBlockSize(). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:135 + ///
+ /// inline uint GetSampleCount() const + ///
+ ///
+ public uint GetSampleCount() => Jolt.PInvoke.HeightFieldShape_GetSampleCount(this); + + /// + /// + /// Get the size of a block + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:138 + ///
+ /// inline uint GetBlockSize() const + ///
+ ///
+ public uint GetBlockSize() => Jolt.PInvoke.HeightFieldShape_GetBlockSize(this); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + /// + /// Overload to get the material at a particular location + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:156 + ///
+ /// const PhysicsMaterial * GetMaterial(uint inX, uint inY) const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial(uint x, uint y) => Jolt.PInvoke.HeightFieldShape_GetMaterial(this, x, y); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + /// + /// Get height field position at sampled location (inX, inY). where inX and inY are integers in the range + /// inX e [0, mSampleCount - 1] and inY e [0, mSampleCount - 1]. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:190 + ///
+ /// Vec3 GetPosition(uint inX, uint inY) const + ///
+ ///
+ public float3 GetPosition(uint x, uint y) => Jolt.PInvoke.HeightFieldShape_GetPosition(this, x, y); + + /// + /// + /// Check if height field at sampled location (inX, inY) has collision (has a hole or not) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:193 + ///
+ /// bool IsNoCollision(uint inX, uint inY) const + ///
+ ///
+ public bool IsNoCollision(uint x, uint y) => Jolt.PInvoke.HeightFieldShape_IsNoCollision(this, x, y); + + /// + /// + /// Projects inLocalPosition (a point in the space of the shape) along the Y axis onto the surface and + /// returns it in outSurfacePosition. When there is no surface position (because of a hole or because the + /// point is outside the heightfield) the function will return false. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:197 + ///
+ /// bool ProjectOntoSurface(Vec3Arg inLocalPosition, Vec3 &outSurfacePosition, SubShapeID &outSubShapeID) const + ///
+ ///
+ public bool ProjectOntoSurface(float3 localPosition, out float3 surfacePosition, out uint subShapeID) => + Jolt.PInvoke.HeightFieldShape_ProjectOntoSurface(this, localPosition, out surfacePosition, out subShapeID); + + /// + /// + /// Returns the coordinates of the triangle that a sub shape ID represents + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:204 + ///
+ /// void GetSubShapeCoordinates(const SubShapeID &inSubShapeID, uint &outX, uint &outY, uint &outTriangleIndex) const + ///
+ ///
+ /// + /// + /// Returns the coordinates of the triangle that a sub shape ID represents + /// @param inSubShapeID The sub shape ID to decode + /// @param outX X coordinate of the triangle (in the range [0, mSampleCount - 2]) + /// @param outY Y coordinate of the triangle (in the range [0, mSampleCount - 2]) + /// @param outTriangleIndex Triangle within the quad (0 = lower triangle or 1 = upper triangle) + /// + /// + public void GetSubShapeCoordinates(uint subShapeID, out uint x, out uint y, out uint triangleIndex) => + Jolt.PInvoke.HeightFieldShape_GetSubShapeCoordinates(this, subShapeID, out x, out y, out triangleIndex); + + /// + /// + /// Get the range of height values that this height field can encode. Can be used to determine the allowed + /// range when setting the height values with SetHeights. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:207 + ///
+ /// float GetMinHeightValue() const + ///
+ ///
+ public float GetMinHeightValue() => Jolt.PInvoke.HeightFieldShape_GetMinHeightValue(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:208 + ///
+ /// float GetMaxHeightValue() const + ///
+ ///
+ public float GetMaxHeightValue() => Jolt.PInvoke.HeightFieldShape_GetMaxHeightValue(this); + + /// + /// + /// Get the height values of a block of data. Note that the height values are decompressed so will be + /// slightly different from what the shape was originally created with. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:218 + ///
+ /// void GetHeights(uint inX, uint inY, uint inSizeX, uint inSizeY, float *outHeights, intptr_t inHeightsStride) const + ///
+ ///
+ /// + /// + /// Get the height values of a block of data. + /// Note that the height values are decompressed so will be slightly different from what the shape was originally created with. + /// @param inX Start X position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] + /// @param inY Start Y position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] + /// @param inSizeX Number of samples in X direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inX] + /// @param inSizeY Number of samples in Y direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inY] + /// @param outHeights Returned height values, must be at least inSizeX * inSizeY floats. Values are returned in x-major order and can be cNoCollisionValue. + /// @param inHeightsStride Stride in floats between two consecutive rows of outHeights (can be negative if the data is upside down). + /// + /// + public unsafe void GetHeights(uint x, uint y, uint sizeX, uint sizeY, Ptr heights, long heightsStride) => + Jolt.PInvoke.HeightFieldShape_GetHeights(this, x, y, sizeX, sizeY, heights, heightsStride); + + /// + /// + /// Set the height values of a block of data. Note that this requires decompressing and recompressing a + /// border of size mBlockSize in the negative x/y direction so will cause some precision loss. Beware this + /// can create a race condition if you're running collision queries in parallel. See class documentation for + /// more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:231 + ///
+ /// void SetHeights(uint inX, uint inY, uint inSizeX, uint inSizeY, const float *inHeights, intptr_t inHeightsStride, TempAllocator &inAllocator, float inActiveEdgeCosThresholdAngle = 0.996195f) + ///
+ ///
+ /// + /// + /// Set the height values of a block of data. + /// Note that this requires decompressing and recompressing a border of size mBlockSize in the negative x/y direction so will cause some precision loss. + /// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information. + /// @param inX Start X position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] + /// @param inY Start Y position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] + /// @param inSizeX Number of samples in X direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inX] + /// @param inSizeY Number of samples in Y direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inY] + /// @param inHeights The new height values to set, must be an array of inSizeX * inSizeY floats, can be cNoCollisionValue. Values outside of the range [GetMinHeightValue(), GetMaxHeightValue()] will be clamped. + /// @param inHeightsStride Stride in floats between two consecutive rows of inHeights (can be negative if the data is upside down). + /// @param inAllocator Allocator to use for temporary memory + /// @param inActiveEdgeCosThresholdAngle Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). + /// + /// + public unsafe void SetHeights( + uint x, + uint y, + uint sizeX, + uint sizeY, + Ptr heights, + long heightsStride, + TempAllocator allocator, + float activeEdgeCosThresholdAngle = 0.996195f + ) => + Jolt.PInvoke.HeightFieldShape_SetHeights( + this, + x, + y, + sizeX, + sizeY, + heights, + heightsStride, + allocator, + activeEdgeCosThresholdAngle + ); + + /// + /// + /// Get the current list of materials, the indices returned by GetMaterials() will index into this list. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:234 + ///
+ /// const PhysicsMaterialList & GetMaterialList() const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetMaterialList() => + new NativeArray(Jolt.PInvoke.HeightFieldShape_GetMaterialList(this)); + + /// + /// + /// Get the material indices of a block of data. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:243 + ///
+ /// void GetMaterials(uint inX, uint inY, uint inSizeX, uint inSizeY, uint8 *outMaterials, intptr_t inMaterialsStride) const + ///
+ ///
+ /// + /// + /// Get the material indices of a block of data. + /// @param inX Start X position, must in the range [0, mSampleCount - 1] + /// @param inY Start Y position, must in the range [0, mSampleCount - 1] + /// @param inSizeX Number of samples in X direction + /// @param inSizeY Number of samples in Y direction + /// @param outMaterials Returned material indices, must be at least inSizeX * inSizeY uint8s. Values are returned in x-major order. + /// @param inMaterialsStride Stride in uint8s between two consecutive rows of outMaterials (can be negative if the data is upside down). + /// + /// + public unsafe void GetMaterials( + uint x, + uint y, + uint sizeX, + uint sizeY, + Ptr materials, + long materialsStride + ) => Jolt.PInvoke.HeightFieldShape_GetMaterials(this, x, y, sizeX, sizeY, materials, materialsStride); + + /// + /// + /// Set the material indices of a block of data. Beware this can create a race condition if you're running + /// collision queries in parallel. See class documentation for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:256 + ///
+ /// bool SetMaterials(uint inX, uint inY, uint inSizeX, uint inSizeY, const uint8 *inMaterials, intptr_t inMaterialsStride, const PhysicsMaterialList *inMaterialList, TempAllocator &inAllocator) + ///
+ ///
+ /// + /// + /// Set the material indices of a block of data. + /// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information. + /// @param inX Start X position, must in the range [0, mSampleCount - 1] + /// @param inY Start Y position, must in the range [0, mSampleCount - 1] + /// @param inSizeX Number of samples in X direction + /// @param inSizeY Number of samples in Y direction + /// @param inMaterials The new material indices, must be at least inSizeX * inSizeY uint8s. Values are returned in x-major order. + /// @param inMaterialsStride Stride in uint8s between two consecutive rows of inMaterials (can be negative if the data is upside down). + /// @param inMaterialList The material list to use for the new material indices or nullptr if the material list should not be updated + /// @param inAllocator Allocator to use for temporary memory + /// @return True if the material indices were set, false if the total number of materials exceeded 256 + /// + /// + /// An empty materialList passes nullptr, which the callee reads as not given; otherwise it is copied into a + /// native container for the call. + /// + /// + public unsafe bool SetMaterials( + uint x, + uint y, + uint sizeX, + uint sizeY, + Ptr materials, + long materialsStride, + ReadOnlySpan materialList, + TempAllocator allocator + ) + { + fixed (PhysicsMaterial* materialList_fixed = materialList) + { + return Jolt.PInvoke.HeightFieldShape_SetMaterials( + this, + x, + y, + sizeX, + sizeY, + materials, + materialsStride, + materialList_fixed, + (nuint)materialList.Length, + allocator + ); + } + } + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:275 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.HeightFieldShape_Register(); + + /// + /// + /// Settings + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:271 + ///
+ /// static bool sDrawTriangleOutlines + ///
+ ///
+ public static bool GetDrawTriangleOutlines() => Jolt.PInvoke.HeightFieldShape_GetDrawTriangleOutlines(); + + /// + /// + /// Settings + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:271 + ///
+ /// static bool sDrawTriangleOutlines + ///
+ ///
+ public static void SetDrawTriangleOutlines(bool value) => + Jolt.PInvoke.HeightFieldShape_SetDrawTriangleOutlines(value); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(HeightFieldShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/HeightFieldShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/HeightFieldShapeSettings.gen.cs new file mode 100644 index 0000000..4efe6f5 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/HeightFieldShapeSettings.gen.cs @@ -0,0 +1,559 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a HeightFieldShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:42 + ///
+ /// class HeightFieldShapeSettings final : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct HeightFieldShapeSettings : IDisposable + { + /// + /// + /// Create a height field shape of inSampleCount * inSampleCount vertices. The height field is a surface + /// defined by: inOffset + inScale * (x, inSamples[y * inSampleCount + x], y). where x and y are integers in + /// the range x and y e [0, inSampleCount - 1]. inSampleCount: inSampleCount / mBlockSize must be minimally + /// 2 and a power of 2 is the most efficient in terms of performance and storage. inSamples: inSampleCount^2 + /// vertices. inMaterialIndices: (inSampleCount - 1)^2 indices that index into inMaterialList. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:56 + ///
+ /// HeightFieldShapeSettings(const float *inSamples, Vec3Arg inOffset, Vec3Arg inScale, uint32 inSampleCount, const uint8 *inMaterialIndices = nullptr, const PhysicsMaterialList &inMaterialList = PhysicsMaterialList()) + ///
+ ///
+ /// + /// + /// materialList is copied into a native container for the call; the span is only read. + /// + /// + public static unsafe HeightFieldShapeSettings Create( + Ptr samples, + float3 offset, + float3 scale, + uint sampleCount, + Ptr materialIndices, + ReadOnlySpan materialList + ) + { + fixed (PhysicsMaterial* materialList_fixed = materialList) + { + return Jolt.PInvoke.HeightFieldShapeSettings_Create( + samples, + offset, + scale, + sampleCount, + materialIndices, + materialList_fixed, + (nuint)materialList.Length + ); + } + } + + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:48 + ///
+ /// HeightFieldShapeSettings() = default + ///
+ ///
+ public static HeightFieldShapeSettings Create() => Jolt.PInvoke.HeightFieldShapeSettings_Create_2(); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Determine the minimal and maximal value of mHeightSamples (will ignore cNoCollisionValue) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:65 + ///
+ /// void DetermineMinAndMaxSample(float &outMinValue, float &outMaxValue, float &outQuantizationScale) const + ///
+ ///
+ /// + /// + /// Determine the minimal and maximal value of mHeightSamples (will ignore cNoCollisionValue) + /// @param outMinValue The minimal value of mHeightSamples or FLT_MAX if no samples have collision + /// @param outMaxValue The maximal value of mHeightSamples or -FLT_MAX if no samples have collision + /// @param outQuantizationScale (value - outMinValue) * outQuantizationScale quantizes a height sample to 16 bits + /// + /// + public void DetermineMinAndMaxSample(out float minValue, out float maxValue, out float quantizationScale) => + Jolt.PInvoke.HeightFieldShapeSettings_DetermineMinAndMaxSample( + this, + out minValue, + out maxValue, + out quantizationScale + ); + + /// + /// + /// Given mBlockSize, mSampleCount and mHeightSamples, calculate the amount of bits needed to stay below + /// absolute error inMaxError + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:70 + ///
+ /// uint32 CalculateBitsPerSampleForError(float inMaxError) const + ///
+ ///
+ /// + /// + /// Given mBlockSize, mSampleCount and mHeightSamples, calculate the amount of bits needed to stay below absolute error inMaxError + /// @param inMaxError Maximum allowed error in mHeightSamples after compression (note that this does not take mScale.Y into account) + /// @return Needed bits per sample in the range [1, 16]. + /// + /// + public uint CalculateBitsPerSampleForError(float maxError) => + Jolt.PInvoke.HeightFieldShapeSettings_CalculateBitsPerSampleForError(this, maxError); + + /// + /// + /// The height field is a surface defined by: mOffset + mScale * (x, mHeightSamples[y * mSampleCount + x], + /// y). where x and y are integers in the range x and y e [0, mSampleCount - 1]. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:74 + ///
+ /// Vec3 mOffset = Vec3::sZero() + ///
+ ///
+ public float3 GetOffset() => Jolt.PInvoke.HeightFieldShapeSettings_GetOffset(this); + + /// + /// + /// The height field is a surface defined by: mOffset + mScale * (x, mHeightSamples[y * mSampleCount + x], + /// y). where x and y are integers in the range x and y e [0, mSampleCount - 1]. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:74 + ///
+ /// Vec3 mOffset = Vec3::sZero() + ///
+ ///
+ public void SetOffset(float3 value) => Jolt.PInvoke.HeightFieldShapeSettings_SetOffset(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:75 + ///
+ /// Vec3 mScale = Vec3::sOne() + ///
+ ///
+ public float3 GetScale() => Jolt.PInvoke.HeightFieldShapeSettings_GetScale(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:75 + ///
+ /// Vec3 mScale = Vec3::sOne() + ///
+ ///
+ public void SetScale(float3 value) => Jolt.PInvoke.HeightFieldShapeSettings_SetScale(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:76 + ///
+ /// uint32 mSampleCount = 0 + ///
+ ///
+ public uint GetSampleCount() => Jolt.PInvoke.HeightFieldShapeSettings_GetSampleCount(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:76 + ///
+ /// uint32 mSampleCount = 0 + ///
+ ///
+ public void SetSampleCount(uint value) => Jolt.PInvoke.HeightFieldShapeSettings_SetSampleCount(this, value); + + /// + /// + /// Artificial minimal value of mHeightSamples, used for compression and can be used to update the terrain + /// after creating with lower height values. If there are any lower values in mHeightSamples, this value + /// will be ignored. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:79 + ///
+ /// float mMinHeightValue = cLargeFloat + ///
+ ///
+ public float GetMinHeightValue() => Jolt.PInvoke.HeightFieldShapeSettings_GetMinHeightValue(this); + + /// + /// + /// Artificial minimal value of mHeightSamples, used for compression and can be used to update the terrain + /// after creating with lower height values. If there are any lower values in mHeightSamples, this value + /// will be ignored. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:79 + ///
+ /// float mMinHeightValue = cLargeFloat + ///
+ ///
+ public void SetMinHeightValue(float value) => + Jolt.PInvoke.HeightFieldShapeSettings_SetMinHeightValue(this, value); + + /// + /// + /// Artificial maximum value of mHeightSamples, used for compression and can be used to update the terrain + /// after creating with higher height values. If there are any higher values in mHeightSamples, this value + /// will be ignored. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:82 + ///
+ /// float mMaxHeightValue = -cLargeFloat + ///
+ ///
+ public float GetMaxHeightValue() => Jolt.PInvoke.HeightFieldShapeSettings_GetMaxHeightValue(this); + + /// + /// + /// Artificial maximum value of mHeightSamples, used for compression and can be used to update the terrain + /// after creating with higher height values. If there are any higher values in mHeightSamples, this value + /// will be ignored. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:82 + ///
+ /// float mMaxHeightValue = -cLargeFloat + ///
+ ///
+ public void SetMaxHeightValue(float value) => + Jolt.PInvoke.HeightFieldShapeSettings_SetMaxHeightValue(this, value); + + /// + /// + /// When bigger than mMaterials.size() the internal material list will be preallocated to support this + /// number of materials. This avoids reallocations when calling HeightFieldShape::SetMaterials with new + /// materials later. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:86 + ///
+ /// uint32 mMaterialsCapacity = 0 + ///
+ ///
+ public uint GetMaterialsCapacity() => Jolt.PInvoke.HeightFieldShapeSettings_GetMaterialsCapacity(this); + + /// + /// + /// When bigger than mMaterials.size() the internal material list will be preallocated to support this + /// number of materials. This avoids reallocations when calling HeightFieldShape::SetMaterials with new + /// materials later. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:86 + ///
+ /// uint32 mMaterialsCapacity = 0 + ///
+ ///
+ public void SetMaterialsCapacity(uint value) => + Jolt.PInvoke.HeightFieldShapeSettings_SetMaterialsCapacity(this, value); + + /// + /// + /// The heightfield is divided in blocks of mBlockSize * mBlockSize * 2 triangles and the acceleration + /// structure culls blocks only, bigger block sizes reduce memory consumption but also reduce query + /// performance. Valid values are [2, 8], does not need to be a power of 2. Note that at run-time we'll + /// perform one more grid subdivision, so the effective block size is half of what is provided here. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:91 + ///
+ /// uint32 mBlockSize = 2 + ///
+ ///
+ public uint GetBlockSize() => Jolt.PInvoke.HeightFieldShapeSettings_GetBlockSize(this); + + /// + /// + /// The heightfield is divided in blocks of mBlockSize * mBlockSize * 2 triangles and the acceleration + /// structure culls blocks only, bigger block sizes reduce memory consumption but also reduce query + /// performance. Valid values are [2, 8], does not need to be a power of 2. Note that at run-time we'll + /// perform one more grid subdivision, so the effective block size is half of what is provided here. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:91 + ///
+ /// uint32 mBlockSize = 2 + ///
+ ///
+ public void SetBlockSize(uint value) => Jolt.PInvoke.HeightFieldShapeSettings_SetBlockSize(this, value); + + /// + /// + /// How many bits per sample to use to compress the height field. Can be in the range [1, 16]. Note that + /// each sample is compressed relative to the min/max value of its block of mBlockSize * mBlockSize samples + /// so the effective precision is higher. Also note that increasing mBlockSize saves more memory than + /// reducing the amount of bits per sample. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:96 + ///
+ /// uint32 mBitsPerSample = 8 + ///
+ ///
+ public uint GetBitsPerSample() => Jolt.PInvoke.HeightFieldShapeSettings_GetBitsPerSample(this); + + /// + /// + /// How many bits per sample to use to compress the height field. Can be in the range [1, 16]. Note that + /// each sample is compressed relative to the min/max value of its block of mBlockSize * mBlockSize samples + /// so the effective precision is higher. Also note that increasing mBlockSize saves more memory than + /// reducing the amount of bits per sample. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:96 + ///
+ /// uint32 mBitsPerSample = 8 + ///
+ ///
+ public void SetBitsPerSample(uint value) => Jolt.PInvoke.HeightFieldShapeSettings_SetBitsPerSample(this, value); + + /// + /// + /// An array of mSampleCount^2 height samples. Samples are stored in row major order, so the sample at (x, + /// y) is at index y * mSampleCount + x. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:99 + ///
+ /// Array<float> mHeightSamples + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetHeightSamples() + { + Jolt.PInvoke.HeightFieldShapeSettings_GetHeightSamples(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// An array of mSampleCount^2 height samples. Samples are stored in row major order, so the sample at (x, + /// y) is at index y * mSampleCount + x. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:99 + ///
+ /// Array<float> mHeightSamples + ///
+ ///
+ public unsafe void SetHeightSamples(ReadOnlySpan value) + { + fixed (float* value_fixed = value) + { + Jolt.PInvoke.HeightFieldShapeSettings_SetHeightSamples(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// An array of (mSampleCount - 1)^2 material indices. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:102 + ///
+ /// Array<uint8> mMaterialIndices + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetMaterialIndices() + { + Jolt.PInvoke.HeightFieldShapeSettings_GetMaterialIndices(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// An array of (mSampleCount - 1)^2 material indices. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:102 + ///
+ /// Array<uint8> mMaterialIndices + ///
+ ///
+ public unsafe void SetMaterialIndices(ReadOnlySpan value) + { + fixed (byte* value_fixed = value) + { + Jolt.PInvoke.HeightFieldShapeSettings_SetMaterialIndices(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The materials of square at (x, y) is: mMaterials[mMaterialIndices[x + y * (mSampleCount - 1)]] + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:105 + ///
+ /// PhysicsMaterialList mMaterials + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetMaterials() => + new NativeArray(Jolt.PInvoke.HeightFieldShapeSettings_GetMaterials(this)); + + /// + /// + /// The materials of square at (x, y) is: mMaterials[mMaterialIndices[x + y * (mSampleCount - 1)]] + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:105 + ///
+ /// PhysicsMaterialList mMaterials + ///
+ ///
+ public unsafe void SetMaterials(ReadOnlySpan value) + { + fixed (PhysicsMaterial* value_fixed = value) + { + Jolt.PInvoke.HeightFieldShapeSettings_SetMaterials(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// cos(5 degrees) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:110 + ///
+ /// float mActiveEdgeCosThresholdAngle = 0.996195f + ///
+ ///
+ /// + /// + /// Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). + /// Setting this value too small can cause ghost collisions with edges, setting it too big can cause depenetration artifacts (objects not depenetrating quickly). + /// Valid ranges are between cos(0 degrees) and cos(90 degrees). The default value is cos(5 degrees). + /// + /// + public float GetActiveEdgeCosThresholdAngle() => + Jolt.PInvoke.HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle(this); + + /// + /// + /// cos(5 degrees) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:110 + ///
+ /// float mActiveEdgeCosThresholdAngle = 0.996195f + ///
+ ///
+ /// + /// + /// Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). + /// Setting this value too small can cause ghost collisions with edges, setting it too big can cause depenetration artifacts (objects not depenetrating quickly). + /// Valid ranges are between cos(0 degrees) and cos(90 degrees). The default value is cos(5 degrees). + /// + /// + public void SetActiveEdgeCosThresholdAngle(float value) => + Jolt.PInvoke.HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(HeightFieldShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/HingeConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/HingeConstraint.gen.cs new file mode 100644 index 0000000..470aaef --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/HingeConstraint.gen.cs @@ -0,0 +1,493 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A hinge constraint constrains 2 bodies on a single point and allows only a single axis of rotation + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:65 + ///
+ /// class HingeConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct HingeConstraint : IDisposable + { + /// + /// + /// Construct hinge constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:71 + ///
+ /// HingeConstraint(Body &inBody1, Body &inBody2, const HingeConstraintSettings &inSettings) + ///
+ ///
+ public static HingeConstraint Create(Body body1, Body body2, HingeConstraintSettings settings) => + Jolt.PInvoke.HingeConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Get the attachment point for body 1 relative to body 1 COM (transform by Body::GetCenterOfMassTransform + /// to take to world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:94 + ///
+ /// inline Vec3 GetLocalSpacePoint1() const + ///
+ ///
+ public float3 GetLocalSpacePoint1() => Jolt.PInvoke.HingeConstraint_GetLocalSpacePoint1(this); + + /// + /// + /// Get the attachment point for body 2 relative to body 2 COM (transform by Body::GetCenterOfMassTransform + /// to take to world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:97 + ///
+ /// inline Vec3 GetLocalSpacePoint2() const + ///
+ ///
+ public float3 GetLocalSpacePoint2() => Jolt.PInvoke.HingeConstraint_GetLocalSpacePoint2(this); + + /// + /// + /// Local space hinge directions (transform direction by Body::GetCenterOfMassTransform to take to world + /// space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:100 + ///
+ /// Vec3 GetLocalSpaceHingeAxis1() const + ///
+ ///
+ public float3 GetLocalSpaceHingeAxis1() => Jolt.PInvoke.HingeConstraint_GetLocalSpaceHingeAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:101 + ///
+ /// Vec3 GetLocalSpaceHingeAxis2() const + ///
+ ///
+ public float3 GetLocalSpaceHingeAxis2() => Jolt.PInvoke.HingeConstraint_GetLocalSpaceHingeAxis2(this); + + /// + /// + /// Local space normal directions (transform direction by Body::GetCenterOfMassTransform to take to world + /// space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:104 + ///
+ /// Vec3 GetLocalSpaceNormalAxis1() const + ///
+ ///
+ public float3 GetLocalSpaceNormalAxis1() => Jolt.PInvoke.HingeConstraint_GetLocalSpaceNormalAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:105 + ///
+ /// Vec3 GetLocalSpaceNormalAxis2() const + ///
+ ///
+ public float3 GetLocalSpaceNormalAxis2() => Jolt.PInvoke.HingeConstraint_GetLocalSpaceNormalAxis2(this); + + /// + /// + /// Get the current rotation angle from the rest position + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:108 + ///
+ /// float GetCurrentAngle() const + ///
+ ///
+ public float GetCurrentAngle() => Jolt.PInvoke.HingeConstraint_GetCurrentAngle(this); + + /// + /// + /// Friction control + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:111 + ///
+ /// void SetMaxFrictionTorque(float inFrictionTorque) + ///
+ ///
+ public void SetMaxFrictionTorque(float frictionTorque) => + Jolt.PInvoke.HingeConstraint_SetMaxFrictionTorque(this, frictionTorque); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:112 + ///
+ /// float GetMaxFrictionTorque() const + ///
+ ///
+ public float GetMaxFrictionTorque() => Jolt.PInvoke.HingeConstraint_GetMaxFrictionTorque(this); + + /// + /// + /// Motor settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:115 + ///
+ /// MotorSettings & GetMotorSettings() + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetMotorSettings() => Jolt.PInvoke.HingeConstraint_GetMotorSettings(this); + + /// + /// + /// Motor controls + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:119 + ///
+ /// void SetMotorState(EMotorState inState) + ///
+ ///
+ public void SetMotorState(MotorState state) => Jolt.PInvoke.HingeConstraint_SetMotorState(this, state); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:120 + ///
+ /// EMotorState GetMotorState() const + ///
+ ///
+ public MotorState GetMotorState() => Jolt.PInvoke.HingeConstraint_GetMotorState(this); + + /// + /// + /// rad/s + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:121 + ///
+ /// void SetTargetAngularVelocity(float inAngularVelocity) + ///
+ ///
+ public void SetTargetAngularVelocity(float angularVelocity) => + Jolt.PInvoke.HingeConstraint_SetTargetAngularVelocity(this, angularVelocity); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:122 + ///
+ /// float GetTargetAngularVelocity() const + ///
+ ///
+ public float GetTargetAngularVelocity() => Jolt.PInvoke.HingeConstraint_GetTargetAngularVelocity(this); + + /// + /// + /// rad + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:123 + ///
+ /// void SetTargetAngle(float inAngle) + ///
+ ///
+ public void SetTargetAngle(float angle) => Jolt.PInvoke.HingeConstraint_SetTargetAngle(this, angle); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:124 + ///
+ /// float GetTargetAngle() const + ///
+ ///
+ public float GetTargetAngle() => Jolt.PInvoke.HingeConstraint_GetTargetAngle(this); + + /// + /// + /// Set the target orientation in body space (R2 = R1 * inOrientation, where R1 and R2 are the world space + /// rotations for body 1 and 2). Calculates the local space target angle and calls SetTargetAngle. Motor + /// state must be EMotorState::Position or EMotorState::PositionAndVelocity for this to have any effect. May + /// set the wrong angle if inOrientation contains large rotations around other axis than the hinge axis. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:129 + ///
+ /// void SetTargetOrientationBS(QuatArg inOrientation) + ///
+ ///
+ public void SetTargetOrientationBS(floatQuat orientation) => + Jolt.PInvoke.HingeConstraint_SetTargetOrientationBS(this, orientation); + + /// + /// + /// Update the rotation limits of the hinge, value in radians (see HingeConstraintSettings) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:132 + ///
+ /// void SetLimits(float inLimitsMin, float inLimitsMax) + ///
+ ///
+ public void SetLimits(float limitsMin, float limitsMax) => + Jolt.PInvoke.HingeConstraint_SetLimits(this, limitsMin, limitsMax); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:133 + ///
+ /// float GetLimitsMin() const + ///
+ ///
+ public float GetLimitsMin() => Jolt.PInvoke.HingeConstraint_GetLimitsMin(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:134 + ///
+ /// float GetLimitsMax() const + ///
+ ///
+ public float GetLimitsMax() => Jolt.PInvoke.HingeConstraint_GetLimitsMax(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:135 + ///
+ /// bool HasLimits() const + ///
+ ///
+ public bool HasLimits() => Jolt.PInvoke.HingeConstraint_HasLimits(this); + + /// + /// + /// Update the limits spring settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:138 + ///
+ /// const SpringSettings & GetLimitsSpringSettings() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SpringSettings GetLimitsSpringSettings() => Jolt.PInvoke.HingeConstraint_GetLimitsSpringSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:140 + ///
+ /// void SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings) + ///
+ ///
+ public void SetLimitsSpringSettings(SpringSettings limitsSpringSettings) => + Jolt.PInvoke.HingeConstraint_SetLimitsSpringSettings(this, limitsSpringSettings); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:143 + ///
+ /// inline Vec3 GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float3 GetTotalLambdaPosition() => Jolt.PInvoke.HingeConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:144 + ///
+ /// inline Vector<2> GetTotalLambdaRotation() const + ///
+ ///
+ public float2 GetTotalLambdaRotation() => Jolt.PInvoke.HingeConstraint_GetTotalLambdaRotation(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:145 + ///
+ /// inline float GetTotalLambdaRotationLimits() const + ///
+ ///
+ public float GetTotalLambdaRotationLimits() => Jolt.PInvoke.HingeConstraint_GetTotalLambdaRotationLimits(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:146 + ///
+ /// inline float GetTotalLambdaMotor() const + ///
+ ///
+ public float GetTotalLambdaMotor() => Jolt.PInvoke.HingeConstraint_GetTotalLambdaMotor(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(HingeConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(HingeConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/HingeConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/HingeConstraintSettings.gen.cs new file mode 100644 index 0000000..54b997a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/HingeConstraintSettings.gen.cs @@ -0,0 +1,419 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Hinge constraint settings, used to create a hinge constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:16 + ///
+ /// class HingeConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct HingeConstraintSettings : IDisposable + { + public static HingeConstraintSettings Create() => Jolt.PInvoke.HingeConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:28 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.HingeConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:28 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.HingeConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). Hinge axis is the axis where rotation is + /// allowed. When the normal axis of both bodies align in world space, the hinge angle is defined to be 0. + /// mHingeAxis1 and mNormalAxis1 should be perpendicular. mHingeAxis2 and mNormalAxis2 should also be + /// perpendicular. If you configure the joint in world space and create both bodies with a relative rotation + /// you want to be defined as zero, you can simply set mHingeAxis1 = mHingeAxis2 and mNormalAxis1 = + /// mNormalAxis2. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:36 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint1() => Jolt.PInvoke.HingeConstraintSettings_GetPoint1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). Hinge axis is the axis where rotation is + /// allowed. When the normal axis of both bodies align in world space, the hinge angle is defined to be 0. + /// mHingeAxis1 and mNormalAxis1 should be perpendicular. mHingeAxis2 and mNormalAxis2 should also be + /// perpendicular. If you configure the joint in world space and create both bodies with a relative rotation + /// you want to be defined as zero, you can simply set mHingeAxis1 = mHingeAxis2 and mNormalAxis1 = + /// mNormalAxis2. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:36 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetPoint1(float3 value) => Jolt.PInvoke.HingeConstraintSettings_SetPoint1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:37 + ///
+ /// Vec3 mHingeAxis1 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetHingeAxis1() => Jolt.PInvoke.HingeConstraintSettings_GetHingeAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:37 + ///
+ /// Vec3 mHingeAxis1 = Vec3::sAxisY() + ///
+ ///
+ public void SetHingeAxis1(float3 value) => Jolt.PInvoke.HingeConstraintSettings_SetHingeAxis1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:38 + ///
+ /// Vec3 mNormalAxis1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetNormalAxis1() => Jolt.PInvoke.HingeConstraintSettings_GetNormalAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:38 + ///
+ /// Vec3 mNormalAxis1 = Vec3::sAxisX() + ///
+ ///
+ public void SetNormalAxis1(float3 value) => Jolt.PInvoke.HingeConstraintSettings_SetNormalAxis1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:41 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint2() => Jolt.PInvoke.HingeConstraintSettings_GetPoint2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:41 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetPoint2(float3 value) => Jolt.PInvoke.HingeConstraintSettings_SetPoint2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:42 + ///
+ /// Vec3 mHingeAxis2 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetHingeAxis2() => Jolt.PInvoke.HingeConstraintSettings_GetHingeAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:42 + ///
+ /// Vec3 mHingeAxis2 = Vec3::sAxisY() + ///
+ ///
+ public void SetHingeAxis2(float3 value) => Jolt.PInvoke.HingeConstraintSettings_SetHingeAxis2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:43 + ///
+ /// Vec3 mNormalAxis2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetNormalAxis2() => Jolt.PInvoke.HingeConstraintSettings_GetNormalAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:43 + ///
+ /// Vec3 mNormalAxis2 = Vec3::sAxisX() + ///
+ ///
+ public void SetNormalAxis2(float3 value) => Jolt.PInvoke.HingeConstraintSettings_SetNormalAxis2(this, value); + + /// + /// + /// Rotation around the hinge axis will be limited between [mLimitsMin, mLimitsMax] where mLimitsMin e [-pi, + /// 0] and mLimitsMax e [0, pi]. Both angles are in radians. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:47 + ///
+ /// float mLimitsMin = -JPH_PI + ///
+ ///
+ public float GetLimitsMin() => Jolt.PInvoke.HingeConstraintSettings_GetLimitsMin(this); + + /// + /// + /// Rotation around the hinge axis will be limited between [mLimitsMin, mLimitsMax] where mLimitsMin e [-pi, + /// 0] and mLimitsMax e [0, pi]. Both angles are in radians. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:47 + ///
+ /// float mLimitsMin = -JPH_PI + ///
+ ///
+ public void SetLimitsMin(float value) => Jolt.PInvoke.HingeConstraintSettings_SetLimitsMin(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:48 + ///
+ /// float mLimitsMax = JPH_PI + ///
+ ///
+ public float GetLimitsMax() => Jolt.PInvoke.HingeConstraintSettings_GetLimitsMax(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:48 + ///
+ /// float mLimitsMax = JPH_PI + ///
+ ///
+ public void SetLimitsMax(float value) => Jolt.PInvoke.HingeConstraintSettings_SetLimitsMax(this, value); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:51 + ///
+ /// SpringSettings mLimitsSpringSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SpringSettings GetLimitsSpringSettings() => + Jolt.PInvoke.HingeConstraintSettings_GetLimitsSpringSettings(this); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:51 + ///
+ /// SpringSettings mLimitsSpringSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetLimitsSpringSettings(SpringSettings value) => + Jolt.PInvoke.HingeConstraintSettings_SetLimitsSpringSettings(this, value); + + /// + /// + /// Maximum amount of torque (N m) to apply as friction when the constraint is not powered by a motor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:54 + ///
+ /// float mMaxFrictionTorque = 0.0f + ///
+ ///
+ public float GetMaxFrictionTorque() => Jolt.PInvoke.HingeConstraintSettings_GetMaxFrictionTorque(this); + + /// + /// + /// Maximum amount of torque (N m) to apply as friction when the constraint is not powered by a motor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:54 + ///
+ /// float mMaxFrictionTorque = 0.0f + ///
+ ///
+ public void SetMaxFrictionTorque(float value) => + Jolt.PInvoke.HingeConstraintSettings_SetMaxFrictionTorque(this, value); + + /// + /// + /// In case the constraint is powered, this determines the motor settings around the hinge axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:57 + ///
+ /// MotorSettings mMotorSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MotorSettings GetMotorSettings() => Jolt.PInvoke.HingeConstraintSettings_GetMotorSettings(this); + + /// + /// + /// In case the constraint is powered, this determines the motor settings around the hinge axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/HingeConstraint.h:57 + ///
+ /// MotorSettings mMotorSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetMotorSettings(MotorSettings value) => + Jolt.PInvoke.HingeConstraintSettings_SetMotorSettings(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(HingeConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(HingeConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/HingeRotationConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/HingeRotationConstraintPart.gen.cs new file mode 100644 index 0000000..6e19b13 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/HingeRotationConstraintPart.gen.cs @@ -0,0 +1,111 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:43 + ///
+ /// class HingeRotationConstraintPart + ///
+ ///
+ [InteropHandle] + public readonly partial struct HingeRotationConstraintPart : IDisposable + { + public static HingeRotationConstraintPart Create() => Jolt.PInvoke.HingeRotationConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:76 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, Vec3Arg inWorldSpaceHingeAxis1, const Body &inBody2, Mat44Arg inRotation2, Vec3Arg inWorldSpaceHingeAxis2) + ///
+ ///
+ public void CalculateConstraintProperties( + Body body1, + in float4x4 rotation1, + float3 worldSpaceHingeAxis1, + Body body2, + in float4x4 rotation2, + float3 worldSpaceHingeAxis2 + ) => + Jolt.PInvoke.HingeRotationConstraintPart_CalculateConstraintProperties( + this, + body1, + in rotation1, + worldSpaceHingeAxis1, + body2, + in rotation2, + worldSpaceHingeAxis2 + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:119 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.HingeRotationConstraintPart_Deactivate(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:126 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.HingeRotationConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:133 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2) + ///
+ ///
+ public bool SolveVelocityConstraint(Body body1, Body body2) => + Jolt.PInvoke.HingeRotationConstraintPart_SolveVelocityConstraint(this, body1, body2); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h:151 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inBaumgarte) const + ///
+ ///
+ public bool SolvePositionConstraint(Body body1, Body body2, float baumgarte) => + Jolt.PInvoke.HingeRotationConstraintPart_SolvePositionConstraint(this, body1, body2, baumgarte); + + public void Dispose() => Jolt.PInvoke.HingeRotationConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IDToGroupFilterMap.gen.cs b/Brutal.Jolt/Generated/Classes/IDToGroupFilterMap.gen.cs new file mode 100644 index 0000000..308854c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IDToGroupFilterMap.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The GroupFilter objects read back so far, by id, for sRestoreWithChildren: pass the same map to every + /// restore from one stream, so a shared object comes back as one object. It holds a reference to each, which + /// Dispose releases. + /// + /// + [InteropHandle] + public readonly partial struct IDToGroupFilterMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static IDToGroupFilterMap Create() => Jolt.PInvoke.IDToGroupFilterMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.IDToGroupFilterMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.IDToGroupFilterMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IDToMaterialMap.gen.cs b/Brutal.Jolt/Generated/Classes/IDToMaterialMap.gen.cs new file mode 100644 index 0000000..08a6fca --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IDToMaterialMap.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The PhysicsMaterial objects read back so far, by id, for sRestoreWithChildren: pass the same map to every + /// restore from one stream, so a shared object comes back as one object. It holds a reference to each, which + /// Dispose releases. + /// + /// + [InteropHandle] + public readonly partial struct IDToMaterialMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static IDToMaterialMap Create() => Jolt.PInvoke.IDToMaterialMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.IDToMaterialMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.IDToMaterialMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IDToShapeMap.gen.cs b/Brutal.Jolt/Generated/Classes/IDToShapeMap.gen.cs new file mode 100644 index 0000000..0ad71ca --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IDToShapeMap.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The Shape objects read back so far, by id, for sRestoreWithChildren: pass the same map to every restore from + /// one stream, so a shared object comes back as one object. It holds a reference to each, which Dispose + /// releases. + /// + /// + [InteropHandle] + public readonly partial struct IDToShapeMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static IDToShapeMap Create() => Jolt.PInvoke.IDToShapeMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.IDToShapeMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.IDToShapeMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IDToSharedSettingsMap.gen.cs b/Brutal.Jolt/Generated/Classes/IDToSharedSettingsMap.gen.cs new file mode 100644 index 0000000..b95b77f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IDToSharedSettingsMap.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The SoftBodySharedSettings objects read back so far, by id, for sRestoreWithChildren: pass the same map to + /// every restore from one stream, so a shared object comes back as one object. It holds a reference to each, + /// which Dispose releases. + /// + /// + [InteropHandle] + public readonly partial struct IDToSharedSettingsMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static IDToSharedSettingsMap Create() => Jolt.PInvoke.IDToSharedSettingsMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.IDToSharedSettingsMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.IDToSharedSettingsMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IgnoreMultipleBodiesFilter.gen.cs b/Brutal.Jolt/Generated/Classes/IgnoreMultipleBodiesFilter.gen.cs new file mode 100644 index 0000000..5a3906f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IgnoreMultipleBodiesFilter.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A simple body filter implementation that ignores multiple, specified bodies + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:55 + ///
+ /// class IgnoreMultipleBodiesFilter : public BodyFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct IgnoreMultipleBodiesFilter : IDisposable + { + public static IgnoreMultipleBodiesFilter Create() => Jolt.PInvoke.IgnoreMultipleBodiesFilter_Create(); + + /// + /// + /// Remove all bodies from the filter + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:59 + ///
+ /// void Clear() + ///
+ ///
+ public void Clear() => Jolt.PInvoke.IgnoreMultipleBodiesFilter_Clear(this); + + /// + /// + /// Reserve space for inSize body ID's + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:65 + ///
+ /// void Reserve(uint inSize) + ///
+ ///
+ public void Reserve(uint size) => Jolt.PInvoke.IgnoreMultipleBodiesFilter_Reserve(this, size); + + /// + /// + /// Add a body to be ignored + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:71 + ///
+ /// void IgnoreBody(const BodyID &inBodyID) + ///
+ ///
+ public void IgnoreBody(uint bodyID) => Jolt.PInvoke.IgnoreMultipleBodiesFilter_IgnoreBody(this, bodyID); + + /// + public bool ShouldCollide(uint bodyID) => ((BodyFilter)this).ShouldCollide(bodyID); + + public static implicit operator BodyFilter(IgnoreMultipleBodiesFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.IgnoreMultipleBodiesFilter_Destroy(this); + + /// + public bool ShouldCollideLocked(Body body) => ((BodyFilter)this).ShouldCollideLocked(body); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilter.gen.cs b/Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilter.gen.cs new file mode 100644 index 0000000..e6e7de8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilter.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A simple body filter implementation that ignores a single, specified body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:35 + ///
+ /// class IgnoreSingleBodyFilter : public BodyFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct IgnoreSingleBodyFilter : IDisposable + { + /// + /// + /// Constructor, pass the body you want to ignore + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:39 + ///
+ /// explicit IgnoreSingleBodyFilter(const BodyID &inBodyID) + ///
+ ///
+ public static IgnoreSingleBodyFilter Create(uint bodyID) => Jolt.PInvoke.IgnoreSingleBodyFilter_Create(bodyID); + + /// + public bool ShouldCollide(uint bodyID) => ((BodyFilter)this).ShouldCollide(bodyID); + + public static implicit operator BodyFilter(IgnoreSingleBodyFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.IgnoreSingleBodyFilter_Destroy(this); + + /// + public bool ShouldCollideLocked(Body body) => ((BodyFilter)this).ShouldCollideLocked(body); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilterChained.gen.cs b/Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilterChained.gen.cs new file mode 100644 index 0000000..12a204c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IgnoreSingleBodyFilterChained.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Ignores a single body and chains the filter to another filter + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:87 + ///
+ /// class IgnoreSingleBodyFilterChained : public BodyFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct IgnoreSingleBodyFilterChained : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:91 + ///
+ /// explicit IgnoreSingleBodyFilterChained(const BodyID inBodyID, const BodyFilter &inFilter) + ///
+ ///
+ public static IgnoreSingleBodyFilterChained Create(uint bodyID, BodyFilter filter) => + Jolt.PInvoke.IgnoreSingleBodyFilterChained_Create(bodyID, filter); + + /// + public bool ShouldCollide(uint bodyID) => ((BodyFilter)this).ShouldCollide(bodyID); + + /// + public bool ShouldCollideLocked(Body body) => ((BodyFilter)this).ShouldCollideLocked(body); + + public static implicit operator BodyFilter(IgnoreSingleBodyFilterChained value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.IgnoreSingleBodyFilterChained_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/IndependentAxisConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/IndependentAxisConstraintPart.gen.cs new file mode 100644 index 0000000..620c973 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IndependentAxisConstraintPart.gen.cs @@ -0,0 +1,271 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constraint part to an AxisConstraintPart but both bodies have an independent axis on which the force is + /// applied. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:47 + ///
+ /// class IndependentAxisConstraintPart + ///
+ ///
+ /// + /// + /// Constraint part to an AxisConstraintPart but both bodies have an independent axis on which the force is applied. + /// + /// Constraint equation: + /// + /// \f[C = (x_1 + r_1 - f_1) . n_1 + r (x_2 + r_2 - f_2) \cdot n_2\f] + /// + /// Calculating the Jacobian: + /// + /// \f[dC/dt = (v_1 + w_1 \times r_1) \cdot n_1 + (x_1 + r_1 - f_1) \cdot d n_1/dt + r (v_2 + w_2 \times r_2) \cdot n_2 + r (x_2 + r_2 - f_2) \cdot d n_2/dt\f] + /// + /// Assuming that d n1/dt and d n2/dt are small this becomes: + /// + /// \f[(v_1 + w_1 \times r_1) \cdot n_1 + r (v_2 + w_2 \times r_2) \cdot n_2\f] + /// \f[= v_1 \cdot n_1 + r_1 \times n_1 \cdot w_1 + r v_2 \cdot n_2 + r r_2 \times n_2 \cdot w_2\f] + /// + /// Jacobian: + /// + /// \f[J = \begin{bmatrix}n_1 & r_1 \times n_1 & r n_2 & r r_2 \times n_2\end{bmatrix}\f] + /// + /// Effective mass: + /// + /// \f[K = m_1^{-1} + r_1 \times n_1 I_1^{-1} r_1 \times n_1 + r^2 m_2^{-1} + r^2 r_2 \times n_2 I_2^{-1} r_2 \times n_2\f] + /// + /// Used terms (here and below, everything in world space):\n + /// n1 = (x1 + r1 - f1) / |x1 + r1 - f1|, axis along which the force is applied for body 1\n + /// n2 = (x2 + r2 - f2) / |x2 + r2 - f2|, axis along which the force is applied for body 2\n + /// r = ratio how forces are applied between bodies.\n + /// x1, x2 = center of mass for the bodies.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// b = velocity bias.\n + /// \f$\beta\f$ = baumgarte constant. + /// + /// + [InteropHandle] + public readonly partial struct IndependentAxisConstraintPart : IDisposable + { + public static IndependentAxisConstraintPart Create() => Jolt.PInvoke.IndependentAxisConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:89 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, const Body &inBody2, Vec3Arg inR1, Vec3Arg inN1, Vec3Arg inR2, Vec3Arg inN2, float inRatio) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inR1 The position on which the constraint operates on body 1 relative to COM + /// @param inN1 The world space normal in which the constraint operates for body 1 + /// @param inR2 The position on which the constraint operates on body 1 relative to COM + /// @param inN2 The world space normal in which the constraint operates for body 2 + /// @param inRatio The ratio how forces are applied between bodies + /// + /// + public void CalculateConstraintProperties( + Body body1, + Body body2, + float3 r1, + float3 n1, + float3 r2, + float3 n2, + float ratio + ) => + Jolt.PInvoke.IndependentAxisConstraintPart_CalculateConstraintProperties( + this, + body1, + body2, + r1, + n1, + r2, + n2, + ratio + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:123 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.IndependentAxisConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:130 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.IndependentAxisConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:142 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inWarmStartImpulseRatio) + ///
+ ///
+ /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inN1 The world space normal in which the constraint operates for body 1 + /// @param inN2 The world space normal in which the constraint operates for body 2 + /// @param inRatio The ratio how forces are applied between bodies + /// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame + /// + /// + public void WarmStart(Body body1, Body body2, float3 n1, float3 n2, float ratio, float warmStartImpulseRatio) => + Jolt.PInvoke.IndependentAxisConstraintPart_WarmStart( + this, + body1, + body2, + n1, + n2, + ratio, + warmStartImpulseRatio + ); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:156 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inMinLambda, float inMaxLambda) + ///
+ ///
+ /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inN1 The world space normal in which the constraint operates for body 1 + /// @param inN2 The world space normal in which the constraint operates for body 2 + /// @param inRatio The ratio how forces are applied between bodies + /// @param inMinLambda Minimum angular impulse to apply (N m s) + /// @param inMaxLambda Maximum angular impulse to apply (N m s) + /// + /// + public bool SolveVelocityConstraint( + Body body1, + Body body2, + float3 n1, + float3 n2, + float ratio, + float minLambda, + float maxLambda + ) => + Jolt.PInvoke.IndependentAxisConstraintPart_SolveVelocityConstraint( + this, + body1, + body2, + n1, + n2, + ratio, + minLambda, + maxLambda + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:170 + ///
+ /// float GetTotalLambda() const + ///
+ ///
+ public float GetTotalLambda() => Jolt.PInvoke.IndependentAxisConstraintPart_GetTotalLambda(this); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h:183 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inC, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inN1 The world space normal in which the constraint operates for body 1 + /// @param inN2 The world space normal in which the constraint operates for body 2 + /// @param inRatio The ratio how forces are applied between bodies + /// @param inC Value of the constraint equation (C) + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint( + Body body1, + Body body2, + float3 n1, + float3 n2, + float ratio, + float c, + float baumgarte + ) => + Jolt.PInvoke.IndependentAxisConstraintPart_SolvePositionConstraint( + this, + body1, + body2, + n1, + n2, + ratio, + c, + baumgarte + ); + + public void Dispose() => Jolt.PInvoke.IndependentAxisConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/InternalEdgeRemovingCollector.gen.cs b/Brutal.Jolt/Generated/Classes/InternalEdgeRemovingCollector.gen.cs new file mode 100644 index 0000000..22ff453 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/InternalEdgeRemovingCollector.gen.cs @@ -0,0 +1,244 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Removes internal edges from collision results. Can be used to filter out 'ghost collisions'. Based on: + /// Contact generation for meshes - Pierre Terdiman (https://www.codercorner.com/MeshContacts.pdf) + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:24 + ///
+ /// class InternalEdgeRemovingCollector : public CollideShapeCollector + ///
+ ///
+ /// + /// + /// Removes internal edges from collision results. Can be used to filter out 'ghost collisions'. + /// Based on: Contact generation for meshes - Pierre Terdiman (https://www.codercorner.com/MeshContacts.pdf) + /// + /// Note that this class requires that CollideSettingsBase::mActiveEdgeMode == EActiveEdgeMode::CollideWithAll + /// and CollideSettingsBase::mCollectFacesMode == ECollectFacesMode::CollectFaces. + /// + /// + [InteropHandle] + public readonly partial struct InternalEdgeRemovingCollector + { + /// + /// + /// This algorithm tests a convex shape (shape 1) against a set of polygons (shape 2). This assumption + /// doesn't hold if the shape we're testing is a compound shape, so we must also store the sub shape ID and + /// ignore voided features that belong to another sub shape ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:267 + ///
+ /// struct Voided + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Voided + { + /// + /// + /// Feature that is voided (of shape 2). Read with Vec3::sLoadFloat3Unsafe so must not be the last + /// member. + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:269 + ///
+ /// Float3 mFeature + ///
+ ///
+ [FieldOffset(0)] + public float3 Feature; + + /// + /// + /// Sub shape ID of the shape that is colliding against the feature (of shape 1). + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:270 + ///
+ /// SubShapeID mSubShapeID + ///
+ ///
+ [FieldOffset(12)] + public uint SubShapeID; + } + + /// + /// + /// See: CollideShapeCollector::Reset + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:98 + ///
+ /// virtual void Reset() override + ///
+ ///
+ public void Reset() => Jolt.PInvoke.InternalEdgeRemovingCollector_Reset(this); + + /// + /// + /// See: CollideShapeCollector::OnBody + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:109 + ///
+ /// virtual void OnBody(const Body &inBody) override + ///
+ ///
+ public void OnBody(Body body) => Jolt.PInvoke.InternalEdgeRemovingCollector_OnBody(this, body); + + /// + /// + /// See: CollideShapeCollector::AddHit + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:116 + ///
+ /// virtual void AddHit(const CollideShapeResult &inResult) override + ///
+ ///
+ public void AddHit(in CollideShapeResult result) => + Jolt.PInvoke.InternalEdgeRemovingCollector_AddHit(this, in result); + + /// + /// + /// After all hits have been added, call this function to process the delayed results + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:140 + ///
+ /// void Flush() + ///
+ ///
+ public void Flush() => Jolt.PInvoke.InternalEdgeRemovingCollector_Flush(this); + + /// + /// + /// See: CollideShapeCollector::OnBodyEnd + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:238 + ///
+ /// virtual void OnBodyEnd() override + ///
+ ///
+ public void OnBodyEnd() => Jolt.PInvoke.InternalEdgeRemovingCollector_OnBodyEnd(this); + + /// + /// + /// Version of CollisionDispatch::sCollideShapeVsShape that removes internal edges + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:245 + ///
+ /// static void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { } + ///
+ ///
+ /// + /// + /// Collects every hit into collideshapevsshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the span's + /// length. + /// + /// + public static unsafe uint CollideShapeVsShape( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.InternalEdgeRemovingCollector_CollideShapeVsShape( + shape1, + shape2, + scale1, + scale2, + in centerOfMassTransform1, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + collideShapeSettings, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Version of CollisionDispatch::sCollideShapeVsShape that removes internal edges + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:245 + ///
+ /// static void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { } + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public static bool CollideShapeVsShapeClosest( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.InternalEdgeRemovingCollector_CollideShapeVsShapeClosest( + shape1, + shape2, + scale1, + scale2, + in centerOfMassTransform1, + in centerOfMassTransform2, + subShapeIDCreator1, + subShapeIDCreator2, + collideShapeSettings, + out result, + shapeFilter + ) != 0; + } +} diff --git a/Brutal.Jolt/Generated/Classes/IslandBuilder.gen.cs b/Brutal.Jolt/Generated/Classes/IslandBuilder.gen.cs new file mode 100644 index 0000000..ff438fa --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/IslandBuilder.gen.cs @@ -0,0 +1,211 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Keeps track of connected bodies and builds islands for multithreaded velocity/position update + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:18 + ///
+ /// class IslandBuilder : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct IslandBuilder : IDisposable + { + public static IslandBuilder Create() => Jolt.PInvoke.IslandBuilder_Create(); + + /// + /// + /// Initialize the island builder with the maximum amount of bodies that could be active + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:25 + ///
+ /// void Init(uint32 inMaxActiveBodies) + ///
+ ///
+ public void Init(uint maxActiveBodies) => Jolt.PInvoke.IslandBuilder_Init(this, maxActiveBodies); + + /// + /// + /// Prepare for simulation step by allocating space for the contact constraints + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:28 + ///
+ /// void PrepareContactConstraints(uint32 inMaxContactConstraints, TempAllocator *inTempAllocator) + ///
+ ///
+ public void PrepareContactConstraints(uint maxContactConstraints, TempAllocator tempAllocator) => + Jolt.PInvoke.IslandBuilder_PrepareContactConstraints(this, maxContactConstraints, tempAllocator); + + /// + /// + /// Prepare for simulation step by allocating space for the non-contact constraints + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:31 + ///
+ /// void PrepareNonContactConstraints(uint32 inNumConstraints, TempAllocator *inTempAllocator) + ///
+ ///
+ public void PrepareNonContactConstraints(uint numConstraints, TempAllocator tempAllocator) => + Jolt.PInvoke.IslandBuilder_PrepareNonContactConstraints(this, numConstraints, tempAllocator); + + /// + /// + /// Link two bodies by their index in the BodyManager::mActiveBodies list to form islands + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:34 + ///
+ /// void LinkBodies(uint32 inFirst, uint32 inSecond) + ///
+ ///
+ public void LinkBodies(uint first, uint second) => Jolt.PInvoke.IslandBuilder_LinkBodies(this, first, second); + + /// + /// + /// Link a constraint to a body by their index in the BodyManager::mActiveBodies + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:37 + ///
+ /// void LinkConstraint(uint32 inConstraintIndex, uint32 inIndexInActiveBodyList) + ///
+ ///
+ public void LinkConstraint(uint constraintIndex, uint indexInActiveBodyList) => + Jolt.PInvoke.IslandBuilder_LinkConstraint(this, constraintIndex, indexInActiveBodyList); + + /// + /// + /// Link a contact to a body by their index in the BodyManager::mActiveBodies + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:40 + ///
+ /// void LinkContact(uint32 inContactIndex, uint32 inIndexInActiveBodyList) + ///
+ ///
+ public void LinkContact(uint contactIndex, uint indexInActiveBodyList) => + Jolt.PInvoke.IslandBuilder_LinkContact(this, contactIndex, indexInActiveBodyList); + + /// + /// + /// Finalize the islands after all bodies have been Link()-ed + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:43 + ///
+ /// void Finalize(const BodyID *inActiveBodies, uint32 inNumActiveBodies, uint32 inNumContacts, TempAllocator *inTempAllocator) + ///
+ ///
+ /// + /// + /// activeBodies is the buffer the native call reads, and its element count travels with it: the span is + /// only read, and it is only read for the duration of the call. + /// + /// + public unsafe void Complete(ReadOnlySpan activeBodies, uint numContacts, TempAllocator tempAllocator) + { + fixed (uint* activeBodies_fixed = activeBodies) + { + Jolt.PInvoke.IslandBuilder_Complete( + this, + activeBodies_fixed, + (uint)activeBodies.Length, + numContacts, + tempAllocator + ); + } + } + + /// + /// + /// Get the amount of islands formed + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:46 + ///
+ /// uint32 GetNumIslands() const + ///
+ ///
+ public uint GetNumIslands() => Jolt.PInvoke.IslandBuilder_GetNumIslands(this); + + /// + /// + /// The number of position iterations for each island + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:54 + ///
+ /// void SetNumPositionSteps(uint32 inIslandIndex, uint inNumPositionSteps) + ///
+ ///
+ public void SetNumPositionSteps(uint islandIndex, uint numPositionSteps) + { + Jolt.PInvoke.IslandBuilder_SetNumPositionSteps(this, islandIndex, numPositionSteps, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(islandIndex), + islandIndex, + "Expected an index below the number of islands." + ); + } + + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:55 + ///
+ /// uint GetNumPositionSteps(uint32 inIslandIndex) const + ///
+ ///
+ public uint GetNumPositionSteps(uint islandIndex) + { + var _result = Jolt.PInvoke.IslandBuilder_GetNumPositionSteps(this, islandIndex, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(islandIndex), + islandIndex, + "Expected an index below the number of islands." + ); + return _result; + } + + /// + /// + /// After you're done calling the three functions above, call this function to free associated data + /// + /// + /// C++: + /// Jolt/Physics/IslandBuilder.h:73 + ///
+ /// void ResetIslands(TempAllocator *inTempAllocator) + ///
+ ///
+ public void ResetIslands(TempAllocator tempAllocator) => + Jolt.PInvoke.IslandBuilder_ResetIslands(this, tempAllocator); + + public void Dispose() => Jolt.PInvoke.IslandBuilder_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/JobSystem.gen.cs b/Brutal.Jolt/Generated/Classes/JobSystem.gen.cs new file mode 100644 index 0000000..7232445 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/JobSystem.gen.cs @@ -0,0 +1,96 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A class that allows units of work (Jobs) to be scheduled across multiple threads. It allows dependencies + /// between the jobs so that the jobs form a graph. + /// + /// + /// C++: + /// Jolt/Core/JobSystem.h:69 + ///
+ /// class JobSystem : public NonCopyable + ///
+ ///
+ /// + /// + /// A class that allows units of work (Jobs) to be scheduled across multiple threads. + /// It allows dependencies between the jobs so that the jobs form a graph. + /// + /// The pattern for using this class is: + /// + /// // Create job system + /// JobSystem *job_system = new JobSystemThreadPool(...); + /// + /// // Create some jobs + /// JobHandle second_job = job_system->CreateJob("SecondJob", Color::sRed, []() { ... }, 1); // Create a job with 1 dependency + /// JobHandle first_job = job_system->CreateJob("FirstJob", Color::sGreen, [second_job]() { ....; second_job.RemoveDependency(); }, 0); // Job can start immediately, will start second job when it's done + /// JobHandle third_job = job_system->CreateJob("ThirdJob", Color::sBlue, []() { ... }, 0); // This job can run immediately as well and can run in parallel to job 1 and 2 + /// + /// // Add the jobs to the barrier so that we can execute them while we're waiting + /// Barrier *barrier = job_system->CreateBarrier(); + /// barrier->AddJob(first_job); + /// barrier->AddJob(second_job); + /// barrier->AddJob(third_job); + /// job_system->WaitForJobs(barrier); + /// + /// // Clean up + /// job_system->DestroyBarrier(barrier); + /// delete job_system; + /// + /// Jobs are guaranteed to be started in the order that their dependency counter becomes zero (in case they're scheduled on a background thread) + /// or in the order they're added to the barrier (when dependency count is zero and when executing on the thread that calls WaitForJobs). + /// + /// If you want to implement your own job system, inherit from JobSystem and implement: + /// + /// * JobSystem::GetMaxConcurrency - This should return the maximum number of jobs that can run in parallel. + /// * JobSystem::CreateJob - This should create a Job object and return it to the caller. + /// * JobSystem::FreeJob - This should free the memory associated with the job object. It is called by the Job destructor when it is Release()-ed for the last time. + /// * JobSystem::QueueJob/QueueJobs - These should store the job pointer in an internal queue to run immediately (dependencies are tracked internally, this function is called when the job can run). + /// The Job objects are reference counted and are guaranteed to stay alive during the QueueJob(s) call. If you store the job in your own data structure you need to call AddRef() to take a reference. + /// After the job has been executed you need to call Release() to release the reference. Make sure you no longer dereference the job pointer after calling Release(). + /// + /// JobSystem::Barrier is used to track the completion of a set of jobs. Jobs will be created by other jobs and added to the barrier while it is being waited on. This means that you cannot + /// create a dependency graph beforehand as the graph changes while jobs are running. Implement the following functions: + /// + /// * Barrier::AddJob/AddJobs - Add a job to the barrier, any call to WaitForJobs will now also wait for this job to complete. + /// If you store the job in a data structure in the Barrier you need to call AddRef() on the job to keep it alive and Release() after you're done with it. + /// * Barrier::OnJobFinished - This function is called when a job has finished executing, you can use this to track completion and remove the job from the list of jobs to wait on. + /// + /// The functions on JobSystem that need to be implemented to support barriers are: + /// + /// * JobSystem::CreateBarrier - Create a new barrier. + /// * JobSystem::DestroyBarrier - Destroy a barrier. + /// * JobSystem::WaitForJobs - This is the main function that is used to wait for all jobs that have been added to a Barrier. WaitForJobs can execute jobs that have + /// been added to the barrier while waiting. It is not wise to execute other jobs that touch physics structures as this can cause race conditions and deadlocks. Please keep in mind that the barrier is + /// only intended to wait on the completion of the Jolt jobs added to it, if you scheduled any jobs in your engine's job system to execute the Jolt jobs as part of QueueJob/QueueJobs, you might still need + /// to wait for these in this function after the barrier is finished waiting. + /// + /// An example implementation is JobSystemThreadPool. If you don't want to write the Barrier class you can also inherit from JobSystemWithBarrier. + /// + /// + [InteropHandle] + public readonly partial struct JobSystem + { + /// + /// + /// Get maximum number of concurrently executing jobs + /// + /// + /// C++: + /// Jolt/Core/JobSystem.h:153 + ///
+ /// virtual int GetMaxConcurrency() const = 0 + ///
+ ///
+ public int GetMaxConcurrency() => Jolt.PInvoke.JobSystem_GetMaxConcurrency(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/JobSystemSingleThreaded.gen.cs b/Brutal.Jolt/Generated/Classes/JobSystemSingleThreaded.gen.cs new file mode 100644 index 0000000..6249d77 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/JobSystemSingleThreaded.gen.cs @@ -0,0 +1,76 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of a JobSystem without threads, runs jobs as soon as they are added + /// + /// + /// C++: + /// Jolt/Core/JobSystemSingleThreaded.h:13 + ///
+ /// class JobSystemSingleThreaded final : public JobSystem + ///
+ ///
+ [InteropHandle] + public readonly partial struct JobSystemSingleThreaded : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Core/JobSystemSingleThreaded.h:19 + ///
+ /// JobSystemSingleThreaded() = default + ///
+ ///
+ public static JobSystemSingleThreaded Create() => Jolt.PInvoke.JobSystemSingleThreaded_Create(); + + /// + /// + /// C++: + /// Jolt/Core/JobSystemSingleThreaded.h:20 + ///
+ /// explicit JobSystemSingleThreaded(uint inMaxJobs) + ///
+ ///
+ public static JobSystemSingleThreaded Create(uint maxJobs) => + Jolt.PInvoke.JobSystemSingleThreaded_Create_2(maxJobs); + + /// + /// + /// Initialize the job system + /// + /// + /// C++: + /// Jolt/Core/JobSystemSingleThreaded.h:24 + ///
+ /// void Init(uint inMaxJobs) + ///
+ ///
+ /// + /// + /// Initialize the job system + /// @param inMaxJobs Max number of jobs that can be allocated at any time + /// + /// + public void Init(uint maxJobs) => Jolt.PInvoke.JobSystemSingleThreaded_Init(this, maxJobs); + + /// + public int GetMaxConcurrency() => ((JobSystem)this).GetMaxConcurrency(); + + public static implicit operator JobSystem(JobSystemSingleThreaded value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.JobSystemSingleThreaded_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/JobSystemThreadPool.gen.cs b/Brutal.Jolt/Generated/Classes/JobSystemThreadPool.gen.cs new file mode 100644 index 0000000..579df93 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/JobSystemThreadPool.gen.cs @@ -0,0 +1,157 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of a JobSystem using a thread pool + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:25 + ///
+ /// class JobSystemThreadPool final : public JobSystemWithBarrier + ///
+ ///
+ /// + /// + /// Implementation of a JobSystem using a thread pool + /// + /// Note that this is considered an example implementation. It is expected that when you integrate + /// the physics engine into your own project that you'll provide your own implementation of the + /// JobSystem built on top of whatever job system your project uses. + /// + /// + [InteropHandle] + public readonly partial struct JobSystemThreadPool : IDisposable + { + /// + /// + /// Creates a thread pool. + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:32 + ///
+ /// JobSystemThreadPool(uint inMaxJobs, uint inMaxBarriers, int inNumThreads = -1) + ///
+ ///
+ /// + /// + /// Creates a thread pool. + /// @see JobSystemThreadPool::Init + /// + /// + public static JobSystemThreadPool Create(uint maxJobs, uint maxBarriers, int numThreads = -1) => + Jolt.PInvoke.JobSystemThreadPool_Create(maxJobs, maxBarriers, numThreads); + + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:33 + ///
+ /// JobSystemThreadPool() = default + ///
+ ///
+ public static JobSystemThreadPool Create() => Jolt.PInvoke.JobSystemThreadPool_Create_2(); + + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:38 + ///
+ /// void SetThreadInitFunction(const InitExitFunction &inInitFunction) + ///
+ ///
+ /// + /// + /// initFunction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Pass null for none. The callback and userData are retained by the native object until they are replaced + /// or the owner is destroyed - keep whatever userData points at (a GCHandle, an allocation) alive for at + /// least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetThreadInitFunction( + delegate* unmanaged[Cdecl] initFunction, + nint initFunctionUserData + ) => Jolt.PInvoke.JobSystemThreadPool_SetThreadInitFunction(this, initFunction, initFunctionUserData); + + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:39 + ///
+ /// void SetThreadExitFunction(const InitExitFunction &inExitFunction) + ///
+ ///
+ /// + /// + /// exitFunction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Pass null for none. The callback and userData are retained by the native object until they are replaced + /// or the owner is destroyed - keep whatever userData points at (a GCHandle, an allocation) alive for at + /// least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetThreadExitFunction( + delegate* unmanaged[Cdecl] exitFunction, + nint exitFunctionUserData + ) => Jolt.PInvoke.JobSystemThreadPool_SetThreadExitFunction(this, exitFunction, exitFunctionUserData); + + /// + /// + /// Initialize the thread pool + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:45 + ///
+ /// void Init(uint inMaxJobs, uint inMaxBarriers, int inNumThreads = -1) + ///
+ ///
+ /// + /// + /// Initialize the thread pool + /// @param inMaxJobs Max number of jobs that can be allocated at any time + /// @param inMaxBarriers Max number of barriers that can be allocated at any time + /// @param inNumThreads Number of threads to start (the number of concurrent jobs is 1 more because the main thread will also run jobs while waiting for a barrier to complete). Use -1 to auto detect the amount of CPU's. + /// + /// + public void Init(uint maxJobs, uint maxBarriers, int numThreads = -1) => + Jolt.PInvoke.JobSystemThreadPool_Init(this, maxJobs, maxBarriers, numThreads); + + /// + public int GetMaxConcurrency() => ((JobSystem)this).GetMaxConcurrency(); + + /// + /// + /// Change the max concurrency after initialization + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:52 + ///
+ /// void SetNumThreads(int inNumThreads) + ///
+ ///
+ public void SetNumThreads(int numThreads) => Jolt.PInvoke.JobSystemThreadPool_SetNumThreads(this, numThreads); + + public static implicit operator JobSystemWithBarrier(JobSystemThreadPool value) => + Unsafe.BitCast(value); + + public static implicit operator JobSystem(JobSystemThreadPool value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.JobSystemThreadPool_Destroy(this); + + /// + public void Init(uint maxBarriers) => ((JobSystemWithBarrier)this).Init(maxBarriers); + } +} diff --git a/Brutal.Jolt/Generated/Classes/JobSystemWithBarrier.gen.cs b/Brutal.Jolt/Generated/Classes/JobSystemWithBarrier.gen.cs new file mode 100644 index 0000000..ab72acb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/JobSystemWithBarrier.gen.cs @@ -0,0 +1,65 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of the Barrier class for a JobSystem + /// + /// + /// C++: + /// Jolt/Core/JobSystemWithBarrier.h:23 + ///
+ /// class JobSystemWithBarrier : public JobSystem + ///
+ ///
+ /// + /// + /// Implementation of the Barrier class for a JobSystem + /// + /// This class can be used to make it easier to create a new JobSystem implementation that integrates with your own job system. + /// It will implement all functionality relating to barriers, so the only functions that are left to be implemented are: + /// + /// * JobSystem::GetMaxConcurrency + /// * JobSystem::CreateJob + /// * JobSystem::FreeJob + /// * JobSystem::QueueJob/QueueJobs + /// + /// See instructions in JobSystem for more information on how to implement these. + /// + /// + [InteropHandle] + public readonly partial struct JobSystemWithBarrier + { + /// + /// + /// Initialize the barriers + /// + /// + /// C++: + /// Jolt/Core/JobSystemWithBarrier.h:36 + ///
+ /// void Init(uint inMaxBarriers) + ///
+ ///
+ /// + /// + /// Initialize the barriers + /// @param inMaxBarriers Max number of barriers that can be allocated at any time + /// + /// + public void Init(uint maxBarriers) => Jolt.PInvoke.JobSystemWithBarrier_Init(this, maxBarriers); + + public static implicit operator JobSystem(JobSystemWithBarrier value) => + Unsafe.BitCast(value); + + /// + public int GetMaxConcurrency() => ((JobSystem)this).GetMaxConcurrency(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/LFHMAllocator.gen.cs b/Brutal.Jolt/Generated/Classes/LFHMAllocator.gen.cs new file mode 100644 index 0000000..00ada8d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/LFHMAllocator.gen.cs @@ -0,0 +1,83 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Allocator for a lock free hash map + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:13 + ///
+ /// class LFHMAllocator : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct LFHMAllocator : IDisposable + { + public static LFHMAllocator Create() => Jolt.PInvoke.LFHMAllocator_Create(); + + /// + /// + /// Initialize the allocator + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:21 + ///
+ /// inline void Init(uint inObjectStoreSizeBytes) + ///
+ ///
+ /// + /// + /// Initialize the allocator + /// @param inObjectStoreSizeBytes Number of bytes to reserve for all key value pairs + /// + /// + public void Init(uint objectStoreSizeBytes) => Jolt.PInvoke.LFHMAllocator_Init(this, objectStoreSizeBytes); + + /// + /// + /// Clear all allocations + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:24 + ///
+ /// inline void Clear() + ///
+ ///
+ public void Clear() => Jolt.PInvoke.LFHMAllocator_Clear(this); + + /// + /// + /// Allocate a new block of data + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:30 + ///
+ /// inline void Allocate(uint32 inBlockSize, uint32 &ioBegin, uint32 &ioEnd) + ///
+ ///
+ /// + /// + /// Allocate a new block of data + /// @param inBlockSize Size of block to allocate (will potentially return a smaller block if memory is full). + /// @param ioBegin Should be the start of the first free byte in current memory block on input, will contain the start of the first free byte in allocated block on return. + /// @param ioEnd Should be the byte beyond the current memory block on input, will contain the byte beyond the allocated block on return. + /// + /// + public void Allocate(uint blockSize, ref uint begin, ref uint end) => + Jolt.PInvoke.LFHMAllocator_Allocate(this, blockSize, ref begin, ref end); + + public void Dispose() => Jolt.PInvoke.LFHMAllocator_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/LFHMAllocatorContext.gen.cs b/Brutal.Jolt/Generated/Classes/LFHMAllocatorContext.gen.cs new file mode 100644 index 0000000..d266d2e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/LFHMAllocatorContext.gen.cs @@ -0,0 +1,65 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Allocator context object for a lock free hash map that allocates a larger memory block at once and hands it + /// out in smaller portions. This avoids contention on the atomic LFHMAllocator::mWriteOffset. + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:48 + ///
+ /// class LFHMAllocatorContext : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct LFHMAllocatorContext : IDisposable + { + /// + /// + /// Construct a new allocator context + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:52 + ///
+ /// inline LFHMAllocatorContext(LFHMAllocator &inAllocator, uint32 inBlockSize) + ///
+ ///
+ public static LFHMAllocatorContext Create(LFHMAllocator allocator, uint blockSize) => + Jolt.PInvoke.LFHMAllocatorContext_Create(allocator, blockSize); + + /// + /// + /// Allocate data block + /// + /// + /// C++: + /// Jolt/Core/LockFreeHashMap.h:59 + ///
+ /// inline bool Allocate(uint32 inSize, uint32 inAlignment, uint32 &outWriteOffset) + ///
+ ///
+ /// + /// + /// @brief Allocate data block + /// @param inSize Size of block to allocate. + /// @param inAlignment Alignment of block to allocate. + /// @param outWriteOffset Offset in buffer where block is located + /// @return True if allocation succeeded + /// + /// + public bool Allocate(uint size, uint alignment, out uint writeOffset) => + Jolt.PInvoke.LFHMAllocatorContext_Allocate(this, size, alignment, out writeOffset); + + public void Dispose() => Jolt.PInvoke.LFHMAllocatorContext_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/LargeIslandSplitter.gen.cs b/Brutal.Jolt/Generated/Classes/LargeIslandSplitter.gen.cs new file mode 100644 index 0000000..a95a774 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/LargeIslandSplitter.gen.cs @@ -0,0 +1,280 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Assigns bodies in large islands to multiple groups that can run in parallel + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:26 + ///
+ /// class LargeIslandSplitter : public NonCopyable + ///
+ ///
+ /// + /// + /// Assigns bodies in large islands to multiple groups that can run in parallel + /// + /// This basically implements what is described in: High-Performance Physical Simulations on Next-Generation Architecture with Many Cores by Chen et al. + /// See: http://web.eecs.umich.edu/~msmelyan/papers/physsim_onmanycore_itj.pdf section "PARALLELIZATION METHODOLOGY" + /// + /// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library. + /// + /// + [InteropHandle] + public readonly partial struct LargeIslandSplitter : IDisposable + { + /// + /// + /// Status code for retrieving a batch + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:37 + ///
+ /// enum class EStatus + ///
+ ///
+ public enum Status : int + { + /// + /// + /// Work is expected to be available later + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:39 + ///
+ /// WaitingForBatch + ///
+ ///
+ WaitingForBatch, + + /// + /// + /// Work is being returned + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:40 + ///
+ /// BatchRetrieved + ///
+ ///
+ BatchRetrieved, + + /// + /// + /// No further work is expected from this + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:41 + ///
+ /// AllBatchesDone + ///
+ ///
+ AllBatchesDone, + } + + /// + /// + /// Describes a split of constraints and contacts + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:45 + ///
+ /// struct Split + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Split + { + /// + /// + /// Begin of the contact buffer (offset relative to mContactAndConstraintIndices) + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:51 + ///
+ /// uint32 mContactBufferBegin + ///
+ ///
+ [FieldOffset(0)] + public uint ContactBufferBegin; + + /// + /// + /// End of the contact buffer + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:52 + ///
+ /// uint32 mContactBufferEnd + ///
+ ///
+ [FieldOffset(4)] + public uint ContactBufferEnd; + + /// + /// + /// Begin of the constraint buffer (offset relative to mContactAndConstraintIndices) + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:54 + ///
+ /// uint32 mConstraintBufferBegin + ///
+ ///
+ [FieldOffset(8)] + public uint ConstraintBufferBegin; + + /// + /// + /// End of the constraint buffer + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:55 + ///
+ /// uint32 mConstraintBufferEnd + ///
+ ///
+ [FieldOffset(12)] + public uint ConstraintBufferEnd; + } + + public static LargeIslandSplitter Create() => Jolt.PInvoke.LargeIslandSplitter_Create(); + + /// + /// + /// Prepare the island splitter by allocating memory + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:139 + ///
+ /// void Prepare(const IslandBuilder &inIslandBuilder, uint32 inNumActiveBodies, TempAllocator *inTempAllocator) + ///
+ ///
+ public void Prepare(IslandBuilder islandBuilder, uint numActiveBodies, TempAllocator tempAllocator) => + Jolt.PInvoke.LargeIslandSplitter_Prepare(this, islandBuilder, numActiveBodies, tempAllocator); + + /// + /// + /// Assign two bodies to a split. Returns the split index. + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:142 + ///
+ /// uint AssignSplit(const Body *inBody1, const Body *inBody2) + ///
+ ///
+ public uint AssignSplit(Body body1, Body body2) => + Jolt.PInvoke.LargeIslandSplitter_AssignSplit(this, body1, body2); + + /// + /// + /// Force a body to be in a non parallel split. Returns the split index. + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:145 + ///
+ /// uint AssignToNonParallelSplit(const Body *inBody) + ///
+ ///
+ public uint AssignToNonParallelSplit(Body body) => + Jolt.PInvoke.LargeIslandSplitter_AssignToNonParallelSplit(this, body); + + /// + /// + /// Get the island index of the island that was split for a particular split island index + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:157 + ///
+ /// inline uint32 GetIslandIndex(uint inSplitIslandIndex) const + ///
+ ///
+ public uint GetIslandIndex(uint splitIslandIndex) => + Jolt.PInvoke.LargeIslandSplitter_GetIslandIndex(this, splitIslandIndex); + + /// + /// + /// Prepare the island splitter for iterating over the split islands again for position solving. Marks all + /// batches as startable. + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:164 + ///
+ /// void PrepareForSolvePositions() + ///
+ ///
+ public void PrepareForSolvePositions() => Jolt.PInvoke.LargeIslandSplitter_PrepareForSolvePositions(this); + + /// + /// + /// Reset the island splitter + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:167 + ///
+ /// void Reset(TempAllocator *inTempAllocator) + ///
+ ///
+ public void Reset(TempAllocator tempAllocator) => Jolt.PInvoke.LargeIslandSplitter_Reset(this, tempAllocator); + + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:32 + ///
+ /// static constexpr uint cNumSplits = sizeof(SplitMask) * 8 + ///
+ ///
+ public static uint GetNumSplits() => Jolt.PInvoke.LargeIslandSplitter_GetNumSplits(); + + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:33 + ///
+ /// static constexpr uint cNonParallelSplitIdx = cNumSplits - 1 + ///
+ ///
+ public static uint GetNonParallelSplitIdx() => Jolt.PInvoke.LargeIslandSplitter_GetNonParallelSplitIdx(); + + /// + /// + /// If the number of constraints + contacts in an island is larger than this, we will try to split the + /// island + /// + /// + /// C++: + /// Jolt/Physics/LargeIslandSplitter.h:34 + ///
+ /// static constexpr uint cLargeIslandTreshold = 128 + ///
+ ///
+ public static uint GetLargeIslandTreshold() => Jolt.PInvoke.LargeIslandSplitter_GetLargeIslandTreshold(); + + public void Dispose() => Jolt.PInvoke.LargeIslandSplitter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/LinearCurve.gen.cs b/Brutal.Jolt/Generated/Classes/LinearCurve.gen.cs new file mode 100644 index 0000000..b298670 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/LinearCurve.gen.cs @@ -0,0 +1,161 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A set of points (x, y) that form a linear curve + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:16 + ///
+ /// class LinearCurve + ///
+ ///
+ [InteropHandle] + public readonly partial struct LinearCurve : IDisposable + { + public static LinearCurve Create() => Jolt.PInvoke.LinearCurve_Create(); + + /// + /// + /// Remove all points + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:32 + ///
+ /// void Clear() + ///
+ ///
+ public void Clear() => Jolt.PInvoke.LinearCurve_Clear(this); + + /// + /// + /// Reserve memory for inNumPoints points + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:35 + ///
+ /// void Reserve(uint inNumPoints) + ///
+ ///
+ public void Reserve(uint numPoints) => Jolt.PInvoke.LinearCurve_Reserve(this, numPoints); + + /// + /// + /// Add a point to the curve. Points must be inserted in ascending X or Sort() needs to be called when all + /// points have been added. + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:40 + ///
+ /// void AddPoint(float inX, float inY) + ///
+ ///
+ /// + /// + /// Add a point to the curve. Points must be inserted in ascending X or Sort() needs to be called when all points have been added. + /// @param inX X value + /// @param inY Y value + /// + /// + public void AddPoint(float x, float y) => Jolt.PInvoke.LinearCurve_AddPoint(this, x, y); + + /// + /// + /// Sort the points on X ascending + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:43 + ///
+ /// void Sort() + ///
+ ///
+ public void Sort() => Jolt.PInvoke.LinearCurve_Sort(this); + + /// + /// + /// Get the lowest X value + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:46 + ///
+ /// float GetMinX() const + ///
+ ///
+ public float GetMinX() => Jolt.PInvoke.LinearCurve_GetMinX(this); + + /// + /// + /// Get the highest X value + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:49 + ///
+ /// float GetMaxX() const + ///
+ ///
+ public float GetMaxX() => Jolt.PInvoke.LinearCurve_GetMaxX(this); + + /// + /// + /// Sample value on the curve + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:54 + ///
+ /// float GetValue(float inX) const + ///
+ ///
+ /// + /// + /// Sample value on the curve + /// @param inX X value to sample at + /// @return Interpolated Y value + /// + /// + public float GetValue(float x) => Jolt.PInvoke.LinearCurve_GetValue(this, x); + + /// + /// + /// Saves the state of this object in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:57 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.LinearCurve_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. + /// + /// + /// C++: + /// Jolt/Core/LinearCurve.h:60 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.LinearCurve_RestoreBinaryState(this, stream); + + public void Dispose() => Jolt.PInvoke.LinearCurve_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedBodyActivationListener.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedBodyActivationListener.gen.cs new file mode 100644 index 0000000..a03c95e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedBodyActivationListener.gen.cs @@ -0,0 +1,233 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native BodyActivationListener subclass that forwards each virtual to this object, so it can + /// be passed anywhere a is expected. Dispose it only after the physics + /// system has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedBodyActivationListener : IDisposable + { + private GCHandle _self; + private nint _proxy; + private BodyActivationListener _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedBodyActivationListener); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedBodyActivationListener)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedBodyActivationListener() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.BodyActivationListener_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.BodyActivationListener_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "OnBodyActivated", [typeof(uint), typeof(ulong)])) + Jolt.PInvoke.BodyActivationListener_ProxySetOnBodyActivated(_proxy, &OnBodyActivatedThunk); + if (IsOverridden(type, "OnBodyDeactivated", [typeof(uint), typeof(ulong)])) + Jolt.PInvoke.BodyActivationListener_ProxySetOnBodyDeactivated(_proxy, &OnBodyDeactivatedThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.BodyActivationListener_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native BodyActivationListener this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public BodyActivationListener Handle => _base; + + public static implicit operator BodyActivationListener(ManagedBodyActivationListener listener) => + listener.Handle; + + private static ManagedBodyActivationListener Target(nint userData) => + (ManagedBodyActivationListener)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Called whenever a body activates, note this can be called from any thread so make sure your code is + /// thread safe. At the time of the callback the body inBodyID will be locked and no bodies can be + /// written/activated/deactivated from the callback. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyActivationListener.h:21 + ///
+ /// virtual void OnBodyActivated(const BodyID &inBodyID, uint64 inBodyUserData) = 0 + ///
+ ///
+ protected virtual void OnBodyActivated(uint bodyID, ulong bodyUserData) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnBodyActivatedThunk(uint bodyID, ulong bodyUserData, nint userData) + { + ManagedBodyActivationListener? self = null; + try + { + self = Target(userData); + self.OnBodyActivated(bodyID, bodyUserData); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Called whenever a body deactivates, note this can be called from any thread so make sure your code is + /// thread safe. At the time of the callback the body inBodyID will be locked and no bodies can be + /// written/activated/deactivated from the callback. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyActivationListener.h:25 + ///
+ /// virtual void OnBodyDeactivated(const BodyID &inBodyID, uint64 inBodyUserData) = 0 + ///
+ ///
+ protected virtual void OnBodyDeactivated(uint bodyID, ulong bodyUserData) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnBodyDeactivatedThunk(uint bodyID, ulong bodyUserData, nint userData) + { + ManagedBodyActivationListener? self = null; + try + { + self = Target(userData); + self.OnBodyDeactivated(bodyID, bodyUserData); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.BodyActivationListener_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedBodyDrawFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedBodyDrawFilter.gen.cs new file mode 100644 index 0000000..f5ca8f7 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedBodyDrawFilter.gen.cs @@ -0,0 +1,199 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The instance + /// owns a native BodyDrawFilter subclass that forwards each virtual to this object, so it can be passed + /// anywhere a is expected. Dispose it only after the physics system has stopped + /// using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedBodyDrawFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private BodyDrawFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedBodyDrawFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedBodyDrawFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedBodyDrawFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.BodyDrawFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.BodyDrawFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldDraw", [typeof(Body)])) + Jolt.PInvoke.BodyDrawFilter_ProxySetShouldDraw(_proxy, &ShouldDrawThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.BodyDrawFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native BodyDrawFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public BodyDrawFilter Handle => _base; + + public static implicit operator BodyDrawFilter(ManagedBodyDrawFilter listener) => listener.Handle; + + private static ManagedBodyDrawFilter Target(nint userData) => + (ManagedBodyDrawFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Filter function. Returns true if inBody should be rendered + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:123 + ///
+ /// virtual bool ShouldDraw(const Body& inBody) const + ///
+ ///
+ protected virtual bool ShouldDraw(Body body) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldDrawThunk(Body body, nint userData) + { + ManagedBodyDrawFilter? self = null; + try + { + self = Target(userData); + return self.ShouldDraw(body); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.BodyDrawFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedBodyFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedBodyFilter.gen.cs new file mode 100644 index 0000000..f6182fe --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedBodyFilter.gen.cs @@ -0,0 +1,231 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The instance owns + /// a native BodyFilter subclass that forwards each virtual to this object, so it can be passed anywhere a + /// is expected. Dispose it only after the physics system has stopped using it. + /// Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedBodyFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private BodyFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedBodyFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedBodyFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedBodyFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.BodyFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.BodyFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldCollide", [typeof(uint)])) + Jolt.PInvoke.BodyFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + if (IsOverridden(type, "ShouldCollideLocked", [typeof(Body)])) + Jolt.PInvoke.BodyFilter_ProxySetShouldCollideLocked(_proxy, &ShouldCollideLockedThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.BodyFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native BodyFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public BodyFilter Handle => _base; + + public static implicit operator BodyFilter(ManagedBodyFilter listener) => listener.Handle; + + private static ManagedBodyFilter Target(nint userData) => + (ManagedBodyFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Filter function. Returns true if we should collide with inBodyID + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:22 + ///
+ /// virtual bool ShouldCollide(const BodyID &inBodyID) const + ///
+ ///
+ protected virtual bool ShouldCollide(uint bodyID) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk(uint bodyID, nint userData) + { + ManagedBodyFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(bodyID); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Filter function. Returns true if we should collide with inBody (this is called after the body is locked + /// and makes it possible to filter based on body members) + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyFilter.h:28 + ///
+ /// virtual bool ShouldCollideLocked(const Body &inBody) const + ///
+ ///
+ protected virtual bool ShouldCollideLocked(Body body) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideLockedThunk(Body body, nint userData) + { + ManagedBodyFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollideLocked(body); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.BodyFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..5ed13bb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,200 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native BroadPhaseLayerFilter subclass that forwards each virtual to this object, so it can + /// be passed anywhere a is expected. Dispose it only after the physics + /// system has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedBroadPhaseLayerFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private BroadPhaseLayerFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedBroadPhaseLayerFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedBroadPhaseLayerFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedBroadPhaseLayerFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.BroadPhaseLayerFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.BroadPhaseLayerFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldCollide", [typeof(byte)])) + Jolt.PInvoke.BroadPhaseLayerFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.BroadPhaseLayerFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native BroadPhaseLayerFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public BroadPhaseLayerFilter Handle => _base; + + public static implicit operator BroadPhaseLayerFilter(ManagedBroadPhaseLayerFilter listener) => listener.Handle; + + private static ManagedBroadPhaseLayerFilter Target(nint userData) => + (ManagedBroadPhaseLayerFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Function to filter out broadphase layers when doing collision query test (return true to allow testing + /// against objects with this layer) + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:100 + ///
+ /// virtual bool ShouldCollide(BroadPhaseLayer inLayer) const + ///
+ ///
+ protected virtual bool ShouldCollide(byte layer) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk(byte layer, nint userData) + { + ManagedBroadPhaseLayerFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(layer); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.BroadPhaseLayerFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedCharacterContactListener.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedCharacterContactListener.gen.cs new file mode 100644 index 0000000..be16a8d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedCharacterContactListener.gen.cs @@ -0,0 +1,840 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native CharacterContactListener subclass that forwards each virtual to this object, so it + /// can be passed anywhere a is expected. Dispose it only after the + /// physics system has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedCharacterContactListener : IDisposable + { + private GCHandle _self; + private nint _proxy; + private CharacterContactListener _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedCharacterContactListener); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedCharacterContactListener)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedCharacterContactListener() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.CharacterContactListener_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.CharacterContactListener_ProxyGetBase(_proxy); + var type = GetType(); + if ( + IsOverridden( + type, + "OnAdjustBodyVelocity", + [typeof(CharacterVirtual), typeof(Body), typeof(float3*), typeof(float3*)] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnAdjustBodyVelocity( + _proxy, + &OnAdjustBodyVelocityThunk + ); + if ( + IsOverridden( + type, + "OnContactValidate", + [typeof(CharacterVirtual), typeof(CharacterContact).MakeByRefType()] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnContactValidate(_proxy, &OnContactValidateThunk); + if ( + IsOverridden( + type, + "OnContactAdded", + [ + typeof(CharacterVirtual), + typeof(CharacterContact).MakeByRefType(), + typeof(CharacterContactSettings).MakeByRefType(), + ] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnContactAdded(_proxy, &OnContactAddedThunk); + if ( + IsOverridden( + type, + "OnContactPersisted", + [ + typeof(CharacterVirtual), + typeof(CharacterContact).MakeByRefType(), + typeof(CharacterContactSettings).MakeByRefType(), + ] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnContactPersisted(_proxy, &OnContactPersistedThunk); + if (IsOverridden(type, "OnContactRemoved", [typeof(CharacterVirtual), typeof(uint), typeof(uint)])) + Jolt.PInvoke.CharacterContactListener_ProxySetOnContactRemoved(_proxy, &OnContactRemovedThunk); + if ( + IsOverridden( + type, + "OnCharacterContactValidate", + [typeof(CharacterVirtual), typeof(CharacterContact).MakeByRefType()] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnCharacterContactValidate( + _proxy, + &OnCharacterContactValidateThunk + ); + if ( + IsOverridden( + type, + "OnCharacterContactAdded", + [ + typeof(CharacterVirtual), + typeof(CharacterContact).MakeByRefType(), + typeof(CharacterContactSettings).MakeByRefType(), + ] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnCharacterContactAdded( + _proxy, + &OnCharacterContactAddedThunk + ); + if ( + IsOverridden( + type, + "OnCharacterContactPersisted", + [ + typeof(CharacterVirtual), + typeof(CharacterContact).MakeByRefType(), + typeof(CharacterContactSettings).MakeByRefType(), + ] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnCharacterContactPersisted( + _proxy, + &OnCharacterContactPersistedThunk + ); + if ( + IsOverridden( + type, + "OnCharacterContactRemoved", + [typeof(CharacterVirtual), typeof(uint), typeof(uint)] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnCharacterContactRemoved( + _proxy, + &OnCharacterContactRemovedThunk + ); + if ( + IsOverridden( + type, + "OnContactSolve", + [ + typeof(CharacterVirtual), + typeof(uint), + typeof(uint), + typeof(float3), + typeof(float3), + typeof(float3), + typeof(PhysicsMaterial), + typeof(float3), + typeof(float3*), + ] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnContactSolve(_proxy, &OnContactSolveThunk); + if ( + IsOverridden( + type, + "OnCharacterContactSolve", + [ + typeof(CharacterVirtual), + typeof(CharacterVirtual), + typeof(uint), + typeof(float3), + typeof(float3), + typeof(float3), + typeof(PhysicsMaterial), + typeof(float3), + typeof(float3*), + ] + ) + ) + Jolt.PInvoke.CharacterContactListener_ProxySetOnCharacterContactSolve( + _proxy, + &OnCharacterContactSolveThunk + ); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.CharacterContactListener_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native CharacterContactListener this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public CharacterContactListener Handle => _base; + + public static implicit operator CharacterContactListener(ManagedCharacterContactListener listener) => + listener.Handle; + + private static ManagedCharacterContactListener Target(nint userData) => + (ManagedCharacterContactListener)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Callback to adjust the velocity of a body as seen by the character. Can be adjusted to e.g. implement a + /// conveyor belt or an inertial dampener system of a sci-fi space ship. Note that inBody2 is locked during + /// the callback so you can read its properties freely. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:163 + ///
+ /// virtual void OnAdjustBodyVelocity(const CharacterVirtual *inCharacter, const Body &inBody2, Vec3 &ioLinearVelocity, Vec3 &ioAngularVelocity) + ///
+ ///
+ protected virtual void OnAdjustBodyVelocity( + CharacterVirtual character, + Body body2, + float3* linearVelocity, + float3* angularVelocity + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnAdjustBodyVelocityThunk( + CharacterVirtual character, + Body body2, + float3* linearVelocity, + float3* angularVelocity, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnAdjustBodyVelocity(character, body2, linearVelocity, angularVelocity); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Checks if a character can collide with specified body. Return true if the contact is valid. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:166 + ///
+ /// virtual bool OnContactValidate(const CharacterVirtual *inCharacter, const CharacterContact &inContact) + ///
+ ///
+ /// + /// + /// contact refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + protected virtual bool OnContactValidate(CharacterVirtual character, in CharacterContact contact) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 OnContactValidateThunk( + CharacterVirtual character, + CharacterContact* contact, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + return self.OnContactValidate(character, in *contact); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Called whenever the character collides with a body for the first time. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:172 + ///
+ /// virtual void OnContactAdded(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever the character collides with a body for the first time. + /// @param inCharacter Character that is being solved + /// @param inContact Contact that we're colliding against + /// @param ioSettings Settings returned by the contact callback to indicate how the character should behave + /// + /// + /// contact refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual void OnContactAdded( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactAddedThunk( + CharacterVirtual character, + CharacterContact* contact, + CharacterContactSettings* settings, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnContactAdded(character, in *contact, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Called whenever the character persists colliding with a body. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:178 + ///
+ /// virtual void OnContactPersisted(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever the character persists colliding with a body. + /// @param inCharacter Character that is being solved + /// @param inContact Contact that we're colliding against + /// @param ioSettings Settings returned by the contact callback to indicate how the character should behave + /// + /// + /// contact refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual void OnContactPersisted( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactPersistedThunk( + CharacterVirtual character, + CharacterContact* contact, + CharacterContactSettings* settings, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnContactPersisted(character, in *contact, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Called whenever the character loses contact with a body. Note that there is no guarantee that the body + /// or its sub shape still exists at this point. The body may have been deleted since the last update. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:185 + ///
+ /// virtual void OnContactRemoved(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2) + ///
+ ///
+ /// + /// + /// Called whenever the character loses contact with a body. + /// Note that there is no guarantee that the body or its sub shape still exists at this point. The body may have been deleted since the last update. + /// @param inCharacter Character that is being solved + /// @param inBodyID2 Body ID of body that is being hit + /// @param inSubShapeID2 Sub shape ID of shape that is being hit + /// + /// + protected virtual void OnContactRemoved(CharacterVirtual character, uint bodyID2, uint subShapeID2) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactRemovedThunk( + CharacterVirtual character, + uint bodyID2, + uint subShapeID2, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnContactRemoved(character, bodyID2, subShapeID2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Same as OnContactValidate but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:188 + ///
+ /// virtual bool OnCharacterContactValidate(const CharacterVirtual *inCharacter, const CharacterContact &inContact) + ///
+ ///
+ /// + /// + /// contact refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + protected virtual bool OnCharacterContactValidate(CharacterVirtual character, in CharacterContact contact) => + true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 OnCharacterContactValidateThunk( + CharacterVirtual character, + CharacterContact* contact, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + return self.OnCharacterContactValidate(character, in *contact); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Same as OnContactAdded but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:191 + ///
+ /// virtual void OnCharacterContactAdded(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// contact refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual void OnCharacterContactAdded( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnCharacterContactAddedThunk( + CharacterVirtual character, + CharacterContact* contact, + CharacterContactSettings* settings, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnCharacterContactAdded(character, in *contact, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Same as OnContactPersisted but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:194 + ///
+ /// virtual void OnCharacterContactPersisted(const CharacterVirtual *inCharacter, const CharacterContact &inContact, CharacterContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// contact refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual void OnCharacterContactPersisted( + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnCharacterContactPersistedThunk( + CharacterVirtual character, + CharacterContact* contact, + CharacterContactSettings* settings, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnCharacterContactPersisted(character, in *contact, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Same as OnContactRemoved but when colliding with a CharacterVirtual Note that inOtherCharacterID can be + /// the ID of a character that has been deleted. This happens if the character was in contact with this + /// character during the last update, but has been deleted since. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:198 + ///
+ /// virtual void OnCharacterContactRemoved(const CharacterVirtual *inCharacter, const CharacterID &inOtherCharacterID, const SubShapeID &inSubShapeID2) + ///
+ ///
+ protected virtual void OnCharacterContactRemoved( + CharacterVirtual character, + uint otherCharacterID, + uint subShapeID2 + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnCharacterContactRemovedThunk( + CharacterVirtual character, + uint otherCharacterID, + uint subShapeID2, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnCharacterContactRemoved(character, otherCharacterID, subShapeID2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Called whenever a contact is being used by the solver. Allows the listener to override the resulting + /// character velocity (e.g. by preventing sliding along certain surfaces). + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:210 + ///
+ /// virtual void OnContactSolve(const CharacterVirtual *inCharacter, const BodyID &inBodyID2, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, Vec3Arg inContactVelocity, const PhysicsMaterial *inContactMaterial, Vec3Arg inCharacterVelocity, Vec3 &ioNewCharacterVelocity) + ///
+ ///
+ /// + /// + /// Called whenever a contact is being used by the solver. Allows the listener to override the resulting character velocity (e.g. by preventing sliding along certain surfaces). + /// @param inCharacter Character that is being solved + /// @param inBodyID2 Body ID of body that is being hit + /// @param inSubShapeID2 Sub shape ID of shape that is being hit + /// @param inContactPosition World space contact position + /// @param inContactNormal World space contact normal + /// @param inContactVelocity World space velocity of contact point (e.g. for a moving platform) + /// @param inContactMaterial Material of contact point + /// @param inCharacterVelocity World space velocity of the character prior to hitting this contact + /// @param ioNewCharacterVelocity Contains the calculated world space velocity of the character after hitting this contact, this velocity slides along the surface of the contact. Can be modified by the listener to provide an alternative velocity. + /// + /// + protected virtual void OnContactSolve( + CharacterVirtual character, + uint bodyID2, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + float3* newCharacterVelocity + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactSolveThunk( + CharacterVirtual character, + uint bodyID2, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + float3* newCharacterVelocity, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnContactSolve( + character, + bodyID2, + subShapeID2, + contactPosition, + contactNormal, + contactVelocity, + contactMaterial, + characterVelocity, + newCharacterVelocity + ); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Same as OnContactSolve but when colliding with a CharacterVirtual + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:213 + ///
+ /// virtual void OnCharacterContactSolve(const CharacterVirtual *inCharacter, const CharacterVirtual *inOtherCharacter, const SubShapeID &inSubShapeID2, RVec3Arg inContactPosition, Vec3Arg inContactNormal, Vec3Arg inContactVelocity, const PhysicsMaterial *inContactMaterial, Vec3Arg inCharacterVelocity, Vec3 &ioNewCharacterVelocity) + ///
+ ///
+ protected virtual void OnCharacterContactSolve( + CharacterVirtual character, + CharacterVirtual otherCharacter, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + float3* newCharacterVelocity + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnCharacterContactSolveThunk( + CharacterVirtual character, + CharacterVirtual otherCharacter, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + float3* newCharacterVelocity, + nint userData + ) + { + ManagedCharacterContactListener? self = null; + try + { + self = Target(userData); + self.OnCharacterContactSolve( + character, + otherCharacter, + subShapeID2, + contactPosition, + contactNormal, + contactVelocity, + contactMaterial, + characterVelocity, + newCharacterVelocity + ); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.CharacterContactListener_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedContactListener.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedContactListener.gen.cs new file mode 100644 index 0000000..04dc016 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedContactListener.gen.cs @@ -0,0 +1,444 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The instance + /// owns a native ContactListener subclass that forwards each virtual to this object, so it can be passed + /// anywhere a is expected. Dispose it only after the physics system has stopped + /// using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedContactListener : IDisposable + { + private GCHandle _self; + private nint _proxy; + private ContactListener _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedContactListener); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedContactListener)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedContactListener() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.ContactListener_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.ContactListener_ProxyGetBase(_proxy); + var type = GetType(); + if ( + IsOverridden( + type, + "OnContactValidate", + [typeof(Body), typeof(Body), typeof(float3), typeof(CollideShapeResult).MakeByRefType()] + ) + ) + Jolt.PInvoke.ContactListener_ProxySetOnContactValidate(_proxy, &OnContactValidateThunk); + if ( + IsOverridden( + type, + "OnContactAdded", + [ + typeof(Body), + typeof(Body), + typeof(ContactManifold).MakeByRefType(), + typeof(ContactSettings).MakeByRefType(), + ] + ) + ) + Jolt.PInvoke.ContactListener_ProxySetOnContactAdded(_proxy, &OnContactAddedThunk); + if ( + IsOverridden( + type, + "OnContactPersisted", + [ + typeof(Body), + typeof(Body), + typeof(ContactManifold).MakeByRefType(), + typeof(ContactSettings).MakeByRefType(), + ] + ) + ) + Jolt.PInvoke.ContactListener_ProxySetOnContactPersisted(_proxy, &OnContactPersistedThunk); + if (IsOverridden(type, "OnContactRemoved", [typeof(SubShapeIDPair).MakeByRefType()])) + Jolt.PInvoke.ContactListener_ProxySetOnContactRemoved(_proxy, &OnContactRemovedThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.ContactListener_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native ContactListener this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public ContactListener Handle => _base; + + public static implicit operator ContactListener(ManagedContactListener listener) => listener.Handle; + + private static ManagedContactListener Target(nint userData) => + (ManagedContactListener)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Called after detecting a collision between a body pair, but before calling OnContactAdded and before + /// adding the contact constraint. If the function rejects the contact, the contact will not be processed by + /// the simulation. This is a rather expensive time to reject a contact point since a lot of the collision + /// detection has happened already, make sure you filter out the majority of undesired body pairs through + /// the ObjectLayerPairFilter that is registered on the PhysicsSystem. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:96 + ///
+ /// virtual ValidateResult OnContactValidate(const Body &inBody1, const Body &inBody2, RVec3Arg inBaseOffset, const CollideShapeResult &inCollisionResult) + ///
+ ///
+ /// + /// + /// Called after detecting a collision between a body pair, but before calling OnContactAdded and before adding the contact constraint. + /// If the function rejects the contact, the contact will not be processed by the simulation. + /// This is a rather expensive time to reject a contact point since a lot of the collision detection has happened already, make sure you + /// filter out the majority of undesired body pairs through the ObjectLayerPairFilter that is registered on the PhysicsSystem. + /// + /// This function may not be called again the next update if a contact persists and no new contact pairs between sub shapes are found. + /// + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! See detailed class description of ContactListener. + /// + /// Body 1 will have a motion type that is larger or equal than body 2's motion type (order from large to small: dynamic -> kinematic -> static). When motion types are equal, they are ordered by BodyID. + /// + /// The collision result (inCollisionResult) is reported relative to inBaseOffset. + /// + /// + /// collisionResult refers to Jolt's own value for the duration of the callback: copy it if you need it + /// after returning. + /// + /// + protected virtual ValidateResult OnContactValidate( + Body body1, + Body body2, + float3 baseOffset, + in CollideShapeResult collisionResult + ) => ValidateResult.AcceptAllContactsForThisBodyPair; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static ValidateResult OnContactValidateThunk( + Body body1, + Body body2, + float3 baseOffset, + CollideShapeResult* collisionResult, + nint userData + ) + { + ManagedContactListener? self = null; + try + { + self = Target(userData); + return self.OnContactValidate(body1, body2, baseOffset, in *collisionResult); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return ValidateResult.AcceptAllContactsForThisBodyPair; + } + } + + /// + /// + /// Called whenever a new contact point is detected. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:110 + ///
+ /// virtual void OnContactAdded(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, ContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever a new contact point is detected. + /// + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! See detailed class description of ContactListener. + /// + /// Body 1 and 2 will be sorted such that body 1 ID < body 2 ID, so body 1 may not be dynamic. + /// + /// Note that only active bodies will report contacts, as soon as a body goes to sleep the contacts between that body and all other + /// bodies will receive an OnContactRemoved callback, if this is the case then Body::IsActive() will return false during the callback. + /// + /// When contacts are added, the constraint solver has not run yet, so the collision impulse is unknown at that point. + /// The velocities of inBody1 and inBody2 are the velocities before the contact has been resolved, so you can use this to + /// estimate the collision impulse to e.g. determine the volume of the impact sound to play (see: EstimateCollisionResponse). + /// + /// + /// manifold refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual void OnContactAdded( + Body body1, + Body body2, + in ContactManifold manifold, + ref ContactSettings settings + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactAddedThunk( + Body body1, + Body body2, + ContactManifold* manifold, + ContactSettings* settings, + nint userData + ) + { + ManagedContactListener? self = null; + try + { + self = Target(userData); + self.OnContactAdded(body1, body2, in *manifold, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Called whenever a contact is detected that was also detected last update. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:123 + ///
+ /// virtual void OnContactPersisted(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, ContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever a contact is detected that was also detected last update. + /// + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! See detailed class description of ContactListener. + /// + /// Body 1 and 2 will be sorted such that body 1 ID < body 2 ID, so body 1 may not be dynamic. + /// + /// If the structure of the shape of a body changes between simulation steps (e.g. by adding/removing a child shape of a compound shape), + /// it is possible that the same sub shape ID used to identify the removed child shape is now reused for a different child shape. The physics + /// system cannot detect this, so may send a 'contact persisted' callback even though the contact is now on a different child shape. You can + /// detect this by keeping the old shape (before adding/removing a part) around until the next PhysicsSystem::Update (when the OnContactPersisted + /// callbacks are triggered) and resolving the sub shape ID against both the old and new shape to see if they still refer to the same child shape. + /// + /// + /// manifold refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual void OnContactPersisted( + Body body1, + Body body2, + in ContactManifold manifold, + ref ContactSettings settings + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactPersistedThunk( + Body body1, + Body body2, + ContactManifold* manifold, + ContactSettings* settings, + nint userData + ) + { + ManagedContactListener? self = null; + try + { + self = Target(userData); + self.OnContactPersisted(body1, body2, in *manifold, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Called whenever a contact was detected last update but is not detected anymore. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:140 + ///
+ /// virtual void OnContactRemoved(const SubShapeIDPair &inSubShapePair) + ///
+ ///
+ /// + /// + /// Called whenever a contact was detected last update but is not detected anymore. + /// + /// You cannot access the bodies at the time of this callback because: + /// - All bodies are locked at the time of this callback. + /// - Some properties of the bodies are being modified from another thread at the same time. + /// - The body may have been removed and destroyed (you'll receive an OnContactRemoved callback in the PhysicsSystem::Update after the body has been removed). + /// + /// Cache what you need in the OnContactAdded and OnContactPersisted callbacks and store it in a separate structure to use during this callback. + /// Alternatively, you could just record that the contact was removed and process it after PhysicsSystem::Update. + /// + /// Body 1 and 2 will be sorted such that body 1 ID < body 2 ID, so body 1 may not be dynamic. + /// + /// The sub shape IDs were created in the previous simulation step, so if the structure of a shape changes (e.g. by adding/removing a child shape of a compound shape), + /// the sub shape ID may not be valid / may not point to the same sub shape anymore. + /// If you want to know if this is the last contact between the two bodies, use PhysicsSystem::WereBodiesInContact. + /// + /// + /// subShapePair refers to Jolt's own value for the duration of the callback: copy it if you need it after + /// returning. + /// + /// + protected virtual void OnContactRemoved(in SubShapeIDPair subShapePair) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnContactRemovedThunk(SubShapeIDPair* subShapePair, nint userData) + { + ManagedContactListener? self = null; + try + { + self = Target(userData); + self.OnContactRemoved(in *subShapePair); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.ContactListener_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedDebugRendererSimple.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedDebugRendererSimple.gen.cs new file mode 100644 index 0000000..c8f8158 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedDebugRendererSimple.gen.cs @@ -0,0 +1,297 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native DebugRendererSimple subclass that forwards each virtual to this object, so it can be + /// passed anywhere a is expected. Dispose it only after the physics system + /// has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedDebugRendererSimple : IDisposable + { + private GCHandle _self; + private nint _proxy; + private DebugRendererSimple _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedDebugRendererSimple); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedDebugRendererSimple)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedDebugRendererSimple() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.DebugRendererSimple_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.DebugRendererSimple_ProxyGetBase(_proxy); + var type = GetType(); + if ( + IsOverridden( + type, + "DrawTriangle", + [typeof(float3), typeof(float3), typeof(float3), typeof(uint), typeof(DebugRenderer.CastShadow)] + ) + ) + Jolt.PInvoke.DebugRendererSimple_ProxySetDrawTriangle(_proxy, &DrawTriangleThunk); + if (IsOverridden(type, "DrawLine", [typeof(float3), typeof(float3), typeof(uint)])) + Jolt.PInvoke.DebugRendererSimple_ProxySetDrawLine(_proxy, &DrawLineThunk); + if ( + IsOverridden( + type, + "DrawText3D", + [typeof(float3), typeof(ReadOnlySpan), typeof(uint), typeof(float)] + ) + ) + Jolt.PInvoke.DebugRendererSimple_ProxySetDrawText3D(_proxy, &DrawText3DThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.DebugRendererSimple_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native DebugRendererSimple this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public DebugRendererSimple Handle => _base; + + public static implicit operator DebugRendererSimple(ManagedDebugRendererSimple listener) => listener.Handle; + + private static ManagedDebugRendererSimple Target(nint userData) => + (ManagedDebugRendererSimple)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Fallback implementation that uses DrawLine to draw a triangle (override this if you have a version that + /// renders solid triangles) + /// + /// + /// C++: + /// Jolt/Renderer/DebugRendererSimple.h:54 + ///
+ /// virtual void DrawTriangle(RVec3Arg inV1, RVec3Arg inV2, RVec3Arg inV3, ColorArg inColor, ECastShadow inCastShadow) override + ///
+ ///
+ protected virtual void DrawTriangle( + float3 v1, + float3 v2, + float3 v3, + uint color, + DebugRenderer.CastShadow castShadow + ) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void DrawTriangleThunk( + float3 v1, + float3 v2, + float3 v3, + uint color, + DebugRenderer.CastShadow castShadow, + nint userData + ) + { + ManagedDebugRendererSimple? self = null; + try + { + self = Target(userData); + self.DrawTriangle(v1, v2, v3, color, castShadow); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Draw line + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:59 + ///
+ /// virtual void DrawLine(RVec3Arg inFrom, RVec3Arg inTo, ColorArg inColor) = 0 + ///
+ ///
+ protected virtual void DrawLine(float3 from, float3 to, uint color) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void DrawLineThunk(float3 from, float3 to, uint color, nint userData) + { + ManagedDebugRendererSimple? self = null; + try + { + self = Target(userData); + self.DrawLine(from, to, color); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Draw text + /// + /// + /// C++: + /// Jolt/Renderer/DebugRenderer.h:285 + ///
+ /// virtual void DrawText3D(RVec3Arg inPosition, const string_view &inString, ColorArg inColor = Color::sWhite, float inHeight = 0.5f) = 0 + ///
+ ///
+ /// + /// + /// string is UTF-8 text borrowed from Jolt for the duration of the callback and is not null-terminated: + /// decode or copy it before returning. + /// + /// + protected virtual void DrawText3D(float3 position, ReadOnlySpan @string, uint color, float height) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void DrawText3DThunk( + float3 position, + byte* @string, + nuint stringLength, + uint color, + float height, + nint userData + ) + { + ManagedDebugRendererSimple? self = null; + try + { + self = Target(userData); + self.DrawText3D(position, new ReadOnlySpan(@string, checked((int)stringLength)), color, height); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.DebugRendererSimple_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedObjectLayerFilter.gen.cs new file mode 100644 index 0000000..b442345 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedObjectLayerFilter.gen.cs @@ -0,0 +1,200 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native ObjectLayerFilter subclass that forwards each virtual to this object, so it can be + /// passed anywhere a is expected. Dispose it only after the physics system has + /// stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedObjectLayerFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private ObjectLayerFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedObjectLayerFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedObjectLayerFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedObjectLayerFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.ObjectLayerFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.ObjectLayerFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldCollide", [typeof(ushort)])) + Jolt.PInvoke.ObjectLayerFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.ObjectLayerFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native ObjectLayerFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public ObjectLayerFilter Handle => _base; + + public static implicit operator ObjectLayerFilter(ManagedObjectLayerFilter listener) => listener.Handle; + + private static ManagedObjectLayerFilter Target(nint userData) => + (ManagedObjectLayerFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Function to filter out object layers when doing collision query test (return true to allow testing + /// against objects with this layer) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:34 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inLayer) const + ///
+ ///
+ protected virtual bool ShouldCollide(ushort layer) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk(ushort layer, nint userData) + { + ManagedObjectLayerFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(layer); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.ObjectLayerFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedObjectLayerPairFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedObjectLayerPairFilter.gen.cs new file mode 100644 index 0000000..c1c8d0d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedObjectLayerPairFilter.gen.cs @@ -0,0 +1,199 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native ObjectLayerPairFilter subclass that forwards each virtual to this object, so it can + /// be passed anywhere a is expected. Dispose it only after the physics + /// system has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedObjectLayerPairFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private ObjectLayerPairFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedObjectLayerPairFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedObjectLayerPairFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedObjectLayerPairFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.ObjectLayerPairFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.ObjectLayerPairFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldCollide", [typeof(ushort), typeof(ushort)])) + Jolt.PInvoke.ObjectLayerPairFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.ObjectLayerPairFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native ObjectLayerPairFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public ObjectLayerPairFilter Handle => _base; + + public static implicit operator ObjectLayerPairFilter(ManagedObjectLayerPairFilter listener) => listener.Handle; + + private static ManagedObjectLayerPairFilter Target(nint userData) => + (ManagedObjectLayerPairFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Returns true if two layers can collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:56 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inLayer1, ObjectLayer inLayer2) const + ///
+ ///
+ protected virtual bool ShouldCollide(ushort layer1, ushort layer2) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk(ushort layer1, ushort layer2, nint userData) + { + ManagedObjectLayerPairFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(layer1, layer2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.ObjectLayerPairFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedObjectVsBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedObjectVsBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..198abb4 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedObjectVsBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,201 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care + /// about. The instance owns a native ObjectVsBroadPhaseLayerFilter subclass that forwards each virtual to this + /// object, so it can be passed anywhere a is expected. Dispose it + /// only after the physics system has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedObjectVsBroadPhaseLayerFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private ObjectVsBroadPhaseLayerFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedObjectVsBroadPhaseLayerFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedObjectVsBroadPhaseLayerFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedObjectVsBroadPhaseLayerFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldCollide", [typeof(ushort), typeof(byte)])) + Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native ObjectVsBroadPhaseLayerFilter this object drives. It is owned by this instance - don't + /// Dispose it. + /// + /// + public ObjectVsBroadPhaseLayerFilter Handle => _base; + + public static implicit operator ObjectVsBroadPhaseLayerFilter(ManagedObjectVsBroadPhaseLayerFilter listener) => + listener.Handle; + + private static ManagedObjectVsBroadPhaseLayerFilter Target(nint userData) => + (ManagedObjectVsBroadPhaseLayerFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Returns true if an object layer should collide with a broadphase layer + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:86 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inLayer1, BroadPhaseLayer inLayer2) const + ///
+ ///
+ protected virtual bool ShouldCollide(ushort layer1, byte layer2) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk(ushort layer1, byte layer2, nint userData) + { + ManagedObjectVsBroadPhaseLayerFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(layer1, layer2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedPhysicsStepListener.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedPhysicsStepListener.gen.cs new file mode 100644 index 0000000..67af6ae --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedPhysicsStepListener.gen.cs @@ -0,0 +1,204 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native PhysicsStepListener subclass that forwards each virtual to this object, so it can be + /// passed anywhere a is expected. Dispose it only after the physics system + /// has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedPhysicsStepListener : IDisposable + { + private GCHandle _self; + private nint _proxy; + private PhysicsStepListener _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedPhysicsStepListener); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedPhysicsStepListener)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedPhysicsStepListener() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.PhysicsStepListener_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.PhysicsStepListener_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "OnStep", [typeof(PhysicsStepListenerContext)])) + Jolt.PInvoke.PhysicsStepListener_ProxySetOnStep(_proxy, &OnStepThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.PhysicsStepListener_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native PhysicsStepListener this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public PhysicsStepListener Handle => _base; + + public static implicit operator PhysicsStepListener(ManagedPhysicsStepListener listener) => listener.Handle; + + private static ManagedPhysicsStepListener Target(nint userData) => + (ManagedPhysicsStepListener)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Called before every simulation step (received inCollisionSteps times for every + /// PhysicsSystem::Update(...) call) This is called while all body and constraint mutexes are locked. You + /// can read/write bodies and constraints but not add/remove them. Multiple listeners can be executed in + /// parallel and it is the responsibility of the listener to avoid race conditions. The best way to do this + /// is to have each step listener operate on a subset of the bodies and constraints and making sure that + /// these bodies and constraints are not touched by any other step listener. Note that this function is not + /// called if there aren't any active bodies or when the physics system is updated with 0 delta time. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:34 + ///
+ /// virtual void OnStep(const PhysicsStepListenerContext &inContext) = 0 + ///
+ ///
+ protected virtual void OnStep(PhysicsStepListenerContext context) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnStepThunk(PhysicsStepListenerContext context, nint userData) + { + ManagedPhysicsStepListener? self = null; + try + { + self = Target(userData); + self.OnStep(context); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.PhysicsStepListener_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedShapeFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedShapeFilter.gen.cs new file mode 100644 index 0000000..a57381b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedShapeFilter.gen.cs @@ -0,0 +1,267 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The instance + /// owns a native ShapeFilter subclass that forwards each virtual to this object, so it can be passed anywhere a + /// is expected. Dispose it only after the physics system has stopped using it. + /// Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedShapeFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private ShapeFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedShapeFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedShapeFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedShapeFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.ShapeFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.ShapeFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldCollide", [typeof(Shape), typeof(uint)])) + Jolt.PInvoke.ShapeFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + if (IsOverridden(type, "ShouldCollide", [typeof(Shape), typeof(uint), typeof(Shape), typeof(uint)])) + Jolt.PInvoke.ShapeFilter_ProxySetShouldCollide2(_proxy, &ShouldCollide2Thunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.ShapeFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native ShapeFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public ShapeFilter Handle => _base; + + public static implicit operator ShapeFilter(ManagedShapeFilter listener) => listener.Handle; + + private static ManagedShapeFilter Target(nint userData) => + (ManagedShapeFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Filter function to determine if we should collide with a shape. Returns true if the filter passes. This + /// overload is called when the query doesn't have a source shape (e.g. ray cast / collide point) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:26 + ///
+ /// virtual bool ShouldCollide(const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const + ///
+ ///
+ /// + /// + /// Filter function to determine if we should collide with a shape. Returns true if the filter passes. + /// This overload is called when the query doesn't have a source shape (e.g. ray cast / collide point) + /// @param inShape2 Shape we're colliding against + /// @param inSubShapeIDOfShape2 The sub shape ID that will lead from the root shape to inShape2 (i.e. the shape of mBodyID2) + /// + /// + protected virtual bool ShouldCollide(Shape shape2, uint subShapeIDOfShape2) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk(Shape shape2, uint subShapeIDOfShape2, nint userData) + { + ManagedShapeFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(shape2, subShapeIDOfShape2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. This + /// overload is called when querying a shape vs a shape (e.g. collide object / cast object). It is called at + /// each level of the shape hierarchy, so if you have a compound shape with a box, this function will be + /// called twice. It will not be called on triangles that are part of another shape, i.e a mesh shape will + /// not trigger a callback per triangle. You can filter out individual triangles in the + /// CollisionCollector::AddHit function by their sub shape ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:39 + ///
+ /// virtual bool ShouldCollide(const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const + ///
+ ///
+ /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. + /// This overload is called when querying a shape vs a shape (e.g. collide object / cast object). + /// It is called at each level of the shape hierarchy, so if you have a compound shape with a box, this function will be called twice. + /// It will not be called on triangles that are part of another shape, i.e a mesh shape will not trigger a callback per triangle. You can filter out individual triangles in the CollisionCollector::AddHit function by their sub shape ID. + /// @param inShape1 1st shape that is colliding + /// @param inSubShapeIDOfShape1 The sub shape ID that will lead from the root shape to inShape1 (i.e. the shape that is used to collide or cast against shape 2) + /// @param inShape2 2nd shape that is colliding + /// @param inSubShapeIDOfShape2 The sub shape ID that will lead from the root shape to inShape2 (i.e. the shape of mBodyID2) + /// + /// + protected virtual bool ShouldCollide( + Shape shape1, + uint subShapeIDOfShape1, + Shape shape2, + uint subShapeIDOfShape2 + ) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollide2Thunk( + Shape shape1, + uint subShapeIDOfShape1, + Shape shape2, + uint subShapeIDOfShape2, + nint userData + ) + { + ManagedShapeFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(shape1, subShapeIDOfShape1, shape2, subShapeIDOfShape2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.ShapeFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedSimShapeFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedSimShapeFilter.gen.cs new file mode 100644 index 0000000..6c25192 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedSimShapeFilter.gen.cs @@ -0,0 +1,240 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The instance + /// owns a native SimShapeFilter subclass that forwards each virtual to this object, so it can be passed + /// anywhere a is expected. Dispose it only after the physics system has stopped + /// using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedSimShapeFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private SimShapeFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedSimShapeFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedSimShapeFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedSimShapeFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.SimShapeFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.SimShapeFilter_ProxyGetBase(_proxy); + var type = GetType(); + if ( + IsOverridden( + type, + "ShouldCollide", + [typeof(Body), typeof(Shape), typeof(uint), typeof(Body), typeof(Shape), typeof(uint)] + ) + ) + Jolt.PInvoke.SimShapeFilter_ProxySetShouldCollide(_proxy, &ShouldCollideThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.SimShapeFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native SimShapeFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public SimShapeFilter Handle => _base; + + public static implicit operator SimShapeFilter(ManagedSimShapeFilter listener) => listener.Handle; + + private static ManagedSimShapeFilter Target(nint userData) => + (ManagedSimShapeFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. This + /// overload is called during the simulation (PhysicsSystem::Update) and must be registered with + /// PhysicsSystem::SetSimShapeFilter. It is called at each level of the shape hierarchy, so if you have a + /// compound shape with a box, this function will be called twice. It will not be called on triangles that + /// are part of another shape, i.e a mesh shape will not trigger a callback per triangle. Note that this + /// function is called from multiple threads and must be thread safe. All properties are read only. + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilter.h:33 + ///
+ /// virtual bool ShouldCollide(const Body &inBody1, const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, + ///
+ ///
+ /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. + /// This overload is called during the simulation (PhysicsSystem::Update) and must be registered with PhysicsSystem::SetSimShapeFilter. + /// It is called at each level of the shape hierarchy, so if you have a compound shape with a box, this function will be called twice. + /// It will not be called on triangles that are part of another shape, i.e a mesh shape will not trigger a callback per triangle. + /// Note that this function is called from multiple threads and must be thread safe. All properties are read only. + /// @param inBody1 1st body that is colliding + /// @param inShape1 1st shape that is colliding + /// @param inSubShapeIDOfShape1 The sub shape ID that will lead from inBody1.GetShape() to inShape1 + /// @param inBody2 2nd body that is colliding + /// @param inShape2 2nd shape that is colliding + /// @param inSubShapeIDOfShape2 The sub shape ID that will lead from inBody2.GetShape() to inShape2 + /// + /// + protected virtual bool ShouldCollide( + Body body1, + Shape shape1, + uint subShapeIDOfShape1, + Body body2, + Shape shape2, + uint subShapeIDOfShape2 + ) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldCollideThunk( + Body body1, + Shape shape1, + uint subShapeIDOfShape1, + Body body2, + Shape shape2, + uint subShapeIDOfShape2, + nint userData + ) + { + ManagedSimShapeFilter? self = null; + try + { + self = Target(userData); + return self.ShouldCollide(body1, shape1, subShapeIDOfShape1, body2, shape2, subShapeIDOfShape2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.SimShapeFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedSoftBodyContactListener.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedSoftBodyContactListener.gen.cs new file mode 100644 index 0000000..6c9ace7 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedSoftBodyContactListener.gen.cs @@ -0,0 +1,281 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native SoftBodyContactListener subclass that forwards each virtual to this object, so it can + /// be passed anywhere a is expected. Dispose it only after the physics + /// system has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedSoftBodyContactListener : IDisposable + { + private GCHandle _self; + private nint _proxy; + private SoftBodyContactListener _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedSoftBodyContactListener); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedSoftBodyContactListener)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedSoftBodyContactListener() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.SoftBodyContactListener_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.SoftBodyContactListener_ProxyGetBase(_proxy); + var type = GetType(); + if ( + IsOverridden( + type, + "OnSoftBodyContactValidate", + [typeof(Body), typeof(Body), typeof(SoftBodyContactSettings).MakeByRefType()] + ) + ) + Jolt.PInvoke.SoftBodyContactListener_ProxySetOnSoftBodyContactValidate( + _proxy, + &OnSoftBodyContactValidateThunk + ); + if (IsOverridden(type, "OnSoftBodyContactAdded", [typeof(Body), typeof(SoftBodyManifold)])) + Jolt.PInvoke.SoftBodyContactListener_ProxySetOnSoftBodyContactAdded( + _proxy, + &OnSoftBodyContactAddedThunk + ); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.SoftBodyContactListener_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native SoftBodyContactListener this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public SoftBodyContactListener Handle => _base; + + public static implicit operator SoftBodyContactListener(ManagedSoftBodyContactListener listener) => + listener.Handle; + + private static ManagedSoftBodyContactListener Target(nint userData) => + (ManagedSoftBodyContactListener)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// Called whenever the soft body's aabox overlaps with another body's aabox (so receiving this callback + /// doesn't tell if any of the vertices will collide). This callback can be used to change the behavior of + /// the collision response for all vertices in the soft body or to completely reject the contact. Note that + /// this callback is called when all bodies are locked, so don't use any locking functions! + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:45 + ///
+ /// virtual SoftBodyValidateResult OnSoftBodyContactValidate(const Body &inSoftBody, const Body &inOtherBody, SoftBodyContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever the soft body's aabox overlaps with another body's aabox (so receiving this callback doesn't tell if any of the vertices will collide). + /// This callback can be used to change the behavior of the collision response for all vertices in the soft body or to completely reject the contact. + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! + /// @param inSoftBody The soft body that collided. It is safe to access this as the soft body is only updated on the current thread. + /// @param inOtherBody The other body that collided. Note that accessing the position/orientation/velocity of inOtherBody may result in a race condition as other threads may be modifying the body at the same time. + /// @param ioSettings The settings for all contact points that are generated by this collision. + /// @return Whether the contact should be processed or not. + /// + /// + /// settings refers to Jolt's own value for the duration of the callback, so writes go straight to Jolt; + /// copy it if you need it after returning. + /// + /// + protected virtual SoftBodyValidateResult OnSoftBodyContactValidate( + Body softBody, + Body otherBody, + ref SoftBodyContactSettings settings + ) => SoftBodyValidateResult.AcceptContact; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static SoftBodyValidateResult OnSoftBodyContactValidateThunk( + Body softBody, + Body otherBody, + SoftBodyContactSettings* settings, + nint userData + ) + { + ManagedSoftBodyContactListener? self = null; + try + { + self = Target(userData); + return self.OnSoftBodyContactValidate(softBody, otherBody, ref *settings); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return SoftBodyValidateResult.AcceptContact; + } + } + + /// + /// + /// Called after all contact points for a soft body have been handled. Note that this callback is called + /// when all bodies are locked, so don't use any locking functions! You will receive a single callback for a + /// soft body per simulation step for performance reasons, this callback will apply to all vertices in the + /// soft body. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:52 + ///
+ /// virtual void OnSoftBodyContactAdded(const Body &inSoftBody, const SoftBodyManifold &inManifold) + ///
+ ///
+ /// + /// + /// Called after all contact points for a soft body have been handled. + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! + /// You will receive a single callback for a soft body per simulation step for performance reasons, this callback will apply to all vertices in the soft body. + /// @param inSoftBody The soft body that collided. It is safe to access this as the soft body is only updated on the current thread. + /// @param inManifold The manifold that describes which vertices collide and with what body they collide. Other bodies may be modified by other threads during this callback. + /// + /// + protected virtual void OnSoftBodyContactAdded(Body softBody, SoftBodyManifold manifold) { } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void OnSoftBodyContactAddedThunk(Body softBody, SoftBodyManifold manifold, nint userData) + { + ManagedSoftBodyContactListener? self = null; + try + { + self = Target(userData); + self.OnSoftBodyContactAdded(softBody, manifold); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.SoftBodyContactListener_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ManagedStateRecorderFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ManagedStateRecorderFilter.gen.cs new file mode 100644 index 0000000..b0a141b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ManagedStateRecorderFilter.gen.cs @@ -0,0 +1,292 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A managed : subclass it and override the callbacks you care about. The + /// instance owns a native StateRecorderFilter subclass that forwards each virtual to this object, so it can be + /// passed anywhere a is expected. Dispose it only after the physics system + /// has stopped using it. Callbacks run on Jolt's worker threads. + /// + /// + /// + /// + /// Calling is REQUIRED. The instance pins itself with a strong GCHandle so that native + /// code can always find it, which means it is never garbage collected while the proxy is alive: forgetting to + /// dispose leaks the object and its native proxy for the life of the process. Dispose only once the physics + /// system no longer references it; disposing destroys the native proxy first, so no further callback can + /// arrive, and is safe to call more than once. + /// + /// + /// There is no finalizer: the strong self-GCHandle keeps the instance reachable, so it is not collectable until + /// it is disposed. Explicit is the only lifetime mechanism. + /// + /// + public abstract unsafe class ManagedStateRecorderFilter : IDisposable + { + private GCHandle _self; + private nint _proxy; + private StateRecorderFilter _base; + private Exception? _lastCallbackException; + + /// + /// + /// The first exception a callback threw since it was last taken. Exceptions can't cross the native frame, + /// so a throwing callback is swallowed and recorded here instead; check it after stepping if a callback may + /// fail. Callbacks run on Jolt's worker threads, so the first exception wins and later ones are dropped + /// until clears it. + /// + /// + public Exception? LastCallbackException => Volatile.Read(ref _lastCallbackException); + + /// + /// + /// Atomically returns the recorded callback exception and clears it, so the next callback failure is + /// recorded in turn. Returns null when no callback has thrown. + /// + /// + public Exception? TakeCallbackException() => Interlocked.Exchange(ref _lastCallbackException, null); + + // First exception wins: a later one would hide the cause while jobs keep running + private void RecordCallbackException(Exception exception) => + Interlocked.CompareExchange(ref _lastCallbackException, exception, null); + + // Installing a thunk costs a managed transition on every call, so only the virtuals this + // subclass overrode get one; the shim falls back to the base implementation for the rest. + // The match is on the exact signature AND on the override relationship: a member that merely + // hides one of these callbacks declares its own slot and is never what a thunk would reach. + private static bool IsOverridden(Type type, string name, Type[] parameterTypes) + { + const BindingFlags declared = + BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + for (var t = type; t is not null && t != typeof(ManagedStateRecorderFilter); t = t.BaseType) + { + foreach (var method in t.GetMethods(declared)) + { + if (method.Name != name || !Matches(method, parameterTypes)) + continue; + if (method.GetBaseDefinition().DeclaringType == typeof(ManagedStateRecorderFilter)) + return true; + } + } + return false; + } + + private static bool Matches(MethodInfo method, Type[] parameterTypes) + { + var parameters = method.GetParameters(); + if (parameters.Length != parameterTypes.Length) + return false; + for (var i = 0; i < parameters.Length; i++) + { + if (parameters[i].ParameterType != parameterTypes[i]) + return false; + } + return true; + } + + protected ManagedStateRecorderFilter() + { + _self = GCHandle.Alloc(this); + try + { + _proxy = Jolt.PInvoke.StateRecorderFilter_CreateProxy(GCHandle.ToIntPtr(_self)); + _base = Jolt.PInvoke.StateRecorderFilter_ProxyGetBase(_proxy); + var type = GetType(); + if (IsOverridden(type, "ShouldSaveBody", [typeof(Body)])) + Jolt.PInvoke.StateRecorderFilter_ProxySetShouldSaveBody(_proxy, &ShouldSaveBodyThunk); + if (IsOverridden(type, "ShouldSaveConstraint", [typeof(Constraint)])) + Jolt.PInvoke.StateRecorderFilter_ProxySetShouldSaveConstraint(_proxy, &ShouldSaveConstraintThunk); + if (IsOverridden(type, "ShouldSaveContact", [typeof(uint), typeof(uint)])) + Jolt.PInvoke.StateRecorderFilter_ProxySetShouldSaveContact(_proxy, &ShouldSaveContactThunk); + if (IsOverridden(type, "ShouldRestoreContact", [typeof(uint), typeof(uint)])) + Jolt.PInvoke.StateRecorderFilter_ProxySetShouldRestoreContact(_proxy, &ShouldRestoreContactThunk); + } + catch + { + if (_proxy != 0) + { + Jolt.PInvoke.StateRecorderFilter_DestroyProxy(_proxy); + _proxy = 0; + _base = default; + } + _self.Free(); + _self = default; + throw; + } + } + + /// + /// + /// The native StateRecorderFilter this object drives. It is owned by this instance - don't Dispose it. + /// + /// + public StateRecorderFilter Handle => _base; + + public static implicit operator StateRecorderFilter(ManagedStateRecorderFilter listener) => listener.Handle; + + private static ManagedStateRecorderFilter Target(nint userData) => + (ManagedStateRecorderFilter)GCHandle.FromIntPtr(userData).Target!; + + /// + /// + /// If the state of a specific body should be saved + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:88 + ///
+ /// virtual bool ShouldSaveBody(const Body &inBody) const + ///
+ ///
+ protected virtual bool ShouldSaveBody(Body body) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldSaveBodyThunk(Body body, nint userData) + { + ManagedStateRecorderFilter? self = null; + try + { + self = Target(userData); + return self.ShouldSaveBody(body); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// If the state of a specific constraint should be saved + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:91 + ///
+ /// virtual bool ShouldSaveConstraint(const Constraint &inConstraint) const + ///
+ ///
+ protected virtual bool ShouldSaveConstraint(Constraint constraint) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldSaveConstraintThunk(Constraint constraint, nint userData) + { + ManagedStateRecorderFilter? self = null; + try + { + self = Target(userData); + return self.ShouldSaveConstraint(constraint); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// If the state of a specific contact should be saved + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:94 + ///
+ /// virtual bool ShouldSaveContact(const BodyID &inBody1, const BodyID &inBody2) const + ///
+ ///
+ protected virtual bool ShouldSaveContact(uint body1, uint body2) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldSaveContactThunk(uint body1, uint body2, nint userData) + { + ManagedStateRecorderFilter? self = null; + try + { + self = Target(userData); + return self.ShouldSaveContact(body1, body2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// If the state of a specific contact should be restored + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:101 + ///
+ /// virtual bool ShouldRestoreContact(const BodyID &inBody1, const BodyID &inBody2) const + ///
+ ///
+ protected virtual bool ShouldRestoreContact(uint body1, uint body2) => true; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static Brutal.Bool8 ShouldRestoreContactThunk(uint body1, uint body2, nint userData) + { + ManagedStateRecorderFilter? self = null; + try + { + self = Target(userData); + return self.ShouldRestoreContact(body1, body2); + } + catch (Exception exception) + { + self?.RecordCallbackException(exception); + return true; + } + } + + /// + /// + /// Releases resources a subclass owns. Called once by Dispose(), after the native proxy has been destroyed, + /// so no callback can still be running - override this instead of hiding Dispose(). + /// + /// + protected virtual void DisposeManaged() { } + + /// + /// + /// Destroys the native proxy and releases the self-handle, then calls DisposeManaged() so a subclass can + /// release its own resources. Never call this while the listener is still installed; calling it more than + /// once, or from more than one thread, is harmless. + /// + /// + public void Dispose() + { + var proxy = Interlocked.Exchange(ref _proxy, 0); + if (proxy == 0) + return; + try + { + // The native proxy goes first, so no further callback can arrive into state + // DisposeManaged() is about to release + _base = default; + Jolt.PInvoke.StateRecorderFilter_DestroyProxy(proxy); + if (_self.IsAllocated) + _self.Free(); + _self = default; + } + finally + { + DisposeManaged(); + } + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/MassProperties.gen.cs b/Brutal.Jolt/Generated/Classes/MassProperties.gen.cs new file mode 100644 index 0000000..13dcf0b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MassProperties.gen.cs @@ -0,0 +1,211 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Describes the mass and inertia properties of a body. Used during body construction only. + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:15 + ///
+ /// class MassProperties + ///
+ ///
+ [InteropHandle] + public readonly partial struct MassProperties : IDisposable + { + public static MassProperties Create() => Jolt.PInvoke.MassProperties_Create(); + + /// + /// + /// Using eigendecomposition, decompose the inertia tensor into a diagonal matrix D and a right-handed + /// rotation matrix R so that the inertia tensor is \f$R \: D \: R^{-1}\f$. + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:36 + ///
+ /// bool DecomposePrincipalMomentsOfInertia(Mat44 &outRotation, Vec3 &outDiagonal) const + ///
+ ///
+ /// + /// + /// Using eigendecomposition, decompose the inertia tensor into a diagonal matrix D and a right-handed rotation matrix R so that the inertia tensor is \f$R \: D \: R^{-1}\f$. + /// @see https://en.wikipedia.org/wiki/Moment_of_inertia section 'Principal axes' + /// @param outRotation The rotation matrix R + /// @param outDiagonal The diagonal of the diagonal matrix D + /// @return True if successful, false if failed + /// + /// + public bool DecomposePrincipalMomentsOfInertia(out float4x4 rotation, out float3 diagonal) => + Jolt.PInvoke.MassProperties_DecomposePrincipalMomentsOfInertia(this, out rotation, out diagonal); + + /// + /// + /// Set the mass and inertia of a box with edge size inBoxSize and density inDensity + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:39 + ///
+ /// void SetMassAndInertiaOfSolidBox(Vec3Arg inBoxSize, float inDensity) + ///
+ ///
+ public void SetMassAndInertiaOfSolidBox(float3 boxSize, float density) => + Jolt.PInvoke.MassProperties_SetMassAndInertiaOfSolidBox(this, boxSize, density); + + /// + /// + /// Set the mass and scale the inertia tensor to match the mass + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:42 + ///
+ /// void ScaleToMass(float inMass) + ///
+ ///
+ public void ScaleToMass(float mass) => Jolt.PInvoke.MassProperties_ScaleToMass(this, mass); + + /// + /// + /// Calculates the size of the solid box that has an inertia tensor diagonal inInertiaDiagonal + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:45 + ///
+ /// static Vec3 sGetEquivalentSolidBoxSize(float inMass, Vec3Arg inInertiaDiagonal) + ///
+ ///
+ public static float3 GetEquivalentSolidBoxSize(float mass, float3 inertiaDiagonal) => + Jolt.PInvoke.MassProperties_GetEquivalentSolidBoxSize(mass, inertiaDiagonal); + + /// + /// + /// Rotate the inertia by 3x3 matrix inRotation + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:48 + ///
+ /// void Rotate(Mat44Arg inRotation) + ///
+ ///
+ public void Rotate(in float4x4 rotation) => Jolt.PInvoke.MassProperties_Rotate(this, in rotation); + + /// + /// + /// Translate the inertia by a vector inTranslation + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:51 + ///
+ /// void Translate(Vec3Arg inTranslation) + ///
+ ///
+ public void Translate(float3 translation) => Jolt.PInvoke.MassProperties_Translate(this, translation); + + /// + /// + /// Scale the mass and inertia by inScale, note that elements can be < 0 to flip the shape + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:54 + ///
+ /// void Scale(Vec3Arg inScale) + ///
+ ///
+ public void Scale(float3 scale) => Jolt.PInvoke.MassProperties_Scale(this, scale); + + /// + /// + /// Saves the state of this object in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:57 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.MassProperties_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:60 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.MassProperties_RestoreBinaryState(this, stream); + + /// + /// + /// Mass of the shape (kg) + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:63 + ///
+ /// float mMass = 0.0f + ///
+ ///
+ public float GetMass() => Jolt.PInvoke.MassProperties_GetMass(this); + + /// + /// + /// Mass of the shape (kg) + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:63 + ///
+ /// float mMass = 0.0f + ///
+ ///
+ public void SetMass(float value) => Jolt.PInvoke.MassProperties_SetMass(this, value); + + /// + /// + /// Inertia tensor of the shape (kg m^2) + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:66 + ///
+ /// Mat44 mInertia = Mat44::sZero() + ///
+ ///
+ public float4x4 GetInertia() => Jolt.PInvoke.MassProperties_GetInertia(this); + + /// + /// + /// Inertia tensor of the shape (kg m^2) + /// + /// + /// C++: + /// Jolt/Physics/Body/MassProperties.h:66 + ///
+ /// Mat44 mInertia = Mat44::sZero() + ///
+ ///
+ public void SetInertia(in float4x4 value) => Jolt.PInvoke.MassProperties_SetInertia(this, in value); + + public void Dispose() => Jolt.PInvoke.MassProperties_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MaterialToIDMap.gen.cs b/Brutal.Jolt/Generated/Classes/MaterialToIDMap.gen.cs new file mode 100644 index 0000000..2cfe050 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MaterialToIDMap.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The PhysicsMaterial objects written so far and the ids they were given, for SaveWithChildren: pass the same + /// map to every save into one stream, so an object several of them share is written once. + /// + /// + [InteropHandle] + public readonly partial struct MaterialToIDMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static MaterialToIDMap Create() => Jolt.PInvoke.MaterialToIDMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.MaterialToIDMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.MaterialToIDMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MeshShape.gen.cs b/Brutal.Jolt/Generated/Classes/MeshShape.gen.cs new file mode 100644 index 0000000..6ab7a45 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MeshShape.gen.cs @@ -0,0 +1,497 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A mesh shape, consisting of triangles. Mesh shapes are mostly used for static geometry. They can be used by + /// dynamic or kinematic objects but only if they don't collide with other mesh or heightfield shapes as those + /// collisions are currently not supported. Note that if you make a mesh shape a dynamic or kinematic object, + /// you need to provide a mass yourself as mesh shapes don't need to form a closed hull so don't have a well + /// defined volume from which the mass can be calculated. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:84 + ///
+ /// class MeshShape final : public Shape + ///
+ ///
+ [InteropHandle] + public readonly partial struct MeshShape : IDisposable + { + /// + /// + /// 8 bit flags stored per triangle + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:209 + ///
+ /// enum ETriangleFlags + ///
+ ///
+ public enum TriangleFlags : int + { + /// + /// + /// Material index + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:212 + ///
+ /// FLAGS_MATERIAL_BITS = 5 + ///
+ ///
+ FLAGS_MATERIAL_BITS = 5, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:213 + ///
+ /// FLAGS_MATERIAL_MASK = (1 << FLAGS_MATERIAL_BITS) - 1 + ///
+ ///
+ FLAGS_MATERIAL_MASK = 31, + + /// + /// + /// Active edge bits + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:216 + ///
+ /// FLAGS_ACTIVE_EGDE_SHIFT = FLAGS_MATERIAL_BITS + ///
+ ///
+ FLAGS_ACTIVE_EGDE_SHIFT = 5, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:217 + ///
+ /// FLAGS_ACTIVE_EDGE_BITS = 3 + ///
+ ///
+ FLAGS_ACTIVE_EDGE_BITS = 3, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:218 + ///
+ /// FLAGS_ACTIVE_EDGE_MASK = (1 << FLAGS_ACTIVE_EDGE_BITS) - 1 + ///
+ ///
+ FLAGS_ACTIVE_EDGE_MASK = 7, + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:90 + ///
+ /// MeshShape() + ///
+ ///
+ public static MeshShape Create() => Jolt.PInvoke.MeshShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:91 + ///
+ /// MeshShape(const MeshShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static MeshShape Create(MeshShapeSettings settings) + { + var _handle = Jolt.PInvoke.MeshShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + /// + /// Get the list of all materials + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:112 + ///
+ /// const PhysicsMaterialList & GetMaterialList() const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetMaterialList() => + new NativeArray(Jolt.PInvoke.MeshShape_GetMaterialList(this)); + + /// + /// + /// Determine which material index a particular sub shape uses (note that if there are no materials this + /// function will return 0 so check the array size) Note: This could for example be used to create a + /// decorator shape around a mesh shape that overrides the GetMaterial call to replace a material with + /// another material. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:116 + ///
+ /// uint GetMaterialIndex(const SubShapeID &inSubShapeID) const + ///
+ ///
+ public uint GetMaterialIndex(uint subShapeID) => Jolt.PInvoke.MeshShape_GetMaterialIndex(this, subShapeID); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// When MeshShape::mPerTriangleUserData is true, this function can be used to retrieve the user data that + /// was stored in the mesh shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:162 + ///
+ /// uint32 GetTriangleUserData(const SubShapeID &inSubShapeID) const + ///
+ ///
+ public uint GetTriangleUserData(uint subShapeID) => + Jolt.PInvoke.MeshShape_GetTriangleUserData(this, subShapeID); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:171 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.MeshShape_Register(); + + /// + /// + /// Settings + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:166 + ///
+ /// static bool sDrawTriangleGroups + ///
+ ///
+ public static bool GetDrawTriangleGroups() => Jolt.PInvoke.MeshShape_GetDrawTriangleGroups(); + + /// + /// + /// Settings + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:166 + ///
+ /// static bool sDrawTriangleGroups + ///
+ ///
+ public static void SetDrawTriangleGroups(bool value) => Jolt.PInvoke.MeshShape_SetDrawTriangleGroups(value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:167 + ///
+ /// static bool sDrawTriangleOutlines + ///
+ ///
+ public static bool GetDrawTriangleOutlines() => Jolt.PInvoke.MeshShape_GetDrawTriangleOutlines(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:167 + ///
+ /// static bool sDrawTriangleOutlines + ///
+ ///
+ public static void SetDrawTriangleOutlines(bool value) => Jolt.PInvoke.MeshShape_SetDrawTriangleOutlines(value); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(MeshShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MeshShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/MeshShapeSettings.gen.cs new file mode 100644 index 0000000..5d7c712 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MeshShapeSettings.gen.cs @@ -0,0 +1,478 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a MeshShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:22 + ///
+ /// class MeshShapeSettings final : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct MeshShapeSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:71 + ///
+ /// enum class EBuildQuality + ///
+ ///
+ public enum BuildQuality : int + { + /// + /// + /// Favor runtime performance, takes more time to build the MeshShape but performs better + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:73 + ///
+ /// FavorRuntimePerformance + ///
+ ///
+ FavorRuntimePerformance, + + /// + /// + /// Favor build speed, build the tree faster but the MeshShape will be slower + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:74 + ///
+ /// FavorBuildSpeed + ///
+ ///
+ FavorBuildSpeed, + } + + /// + /// + /// Create a mesh shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:31 + ///
+ /// explicit MeshShapeSettings(const TriangleList &inTriangles, PhysicsMaterialList inMaterials = PhysicsMaterialList()) + ///
+ ///
+ /// + /// + /// triangles is copied into a native container for the call; the span is only read. + /// + /// + /// materials is copied into a native container for the call; the span is only read. + /// + /// + public static unsafe MeshShapeSettings Create( + ReadOnlySpan triangles, + ReadOnlySpan materials + ) + { + fixed (PhysicsMaterial* materials_fixed = materials) + fixed (Triangle* triangles_fixed = triangles) + { + return Jolt.PInvoke.MeshShapeSettings_Create( + triangles_fixed, + (nuint)triangles.Length, + materials_fixed, + (nuint)materials.Length + ); + } + } + + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:28 + ///
+ /// MeshShapeSettings() = default + ///
+ ///
+ public static MeshShapeSettings Create() => Jolt.PInvoke.MeshShapeSettings_Create_2(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:32 + ///
+ /// MeshShapeSettings(VertexList inVertices, IndexedTriangleList inTriangles, PhysicsMaterialList inMaterials = PhysicsMaterialList()) + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + /// triangles is copied into a native container for the call; the span is only read. + /// + /// + /// materials is copied into a native container for the call; the span is only read. + /// + /// + public static unsafe MeshShapeSettings Create( + ReadOnlySpan vertices, + ReadOnlySpan triangles, + ReadOnlySpan materials + ) + { + fixed (PhysicsMaterial* materials_fixed = materials) + fixed (IndexedTriangle* triangles_fixed = triangles) + fixed (float3* vertices_fixed = vertices) + { + return Jolt.PInvoke.MeshShapeSettings_Create_3( + vertices_fixed, + (nuint)vertices.Length, + triangles_fixed, + (nuint)triangles.Length, + materials_fixed, + (nuint)materials.Length + ); + } + } + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + /// + /// Sanitize the mesh data. Remove duplicate and degenerate triangles. This is called automatically when + /// constructing the MeshShapeSettings with a list of (indexed-) triangles. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:35 + ///
+ /// void Sanitize() + ///
+ ///
+ public void Sanitize() => Jolt.PInvoke.MeshShapeSettings_Sanitize(this); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Vertices belonging to mIndexedTriangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:41 + ///
+ /// VertexList mTriangleVertices + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetTriangleVertices() + { + Jolt.PInvoke.MeshShapeSettings_GetTriangleVertices(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Vertices belonging to mIndexedTriangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:41 + ///
+ /// VertexList mTriangleVertices + ///
+ ///
+ public unsafe void SetTriangleVertices(ReadOnlySpan value) + { + fixed (float3* value_fixed = value) + { + Jolt.PInvoke.MeshShapeSettings_SetTriangleVertices(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Original list of indexed triangles (triangles will be reordered internally in the mesh shape). Triangles + /// must be provided in counter clockwise order. Degenerate triangles will automatically be removed during + /// mesh creation but no other mesh simplifications are performed, use an external library if this is + /// desired. For simulation, the triangles are considered to be single sided. For ray casts you can choose + /// to make triangles double sided by setting RayCastSettings::mBackFaceMode to + /// EBackFaceMode::CollideWithBackFaces. For collide shape tests you can use + /// CollideShapeSettings::mBackFaceMode and for shape casts you can use + /// ShapeCastSettings::mBackFaceModeTriangles. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:49 + ///
+ /// IndexedTriangleList mIndexedTriangles + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetIndexedTriangles() + { + Jolt.PInvoke.MeshShapeSettings_GetIndexedTriangles(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Original list of indexed triangles (triangles will be reordered internally in the mesh shape). Triangles + /// must be provided in counter clockwise order. Degenerate triangles will automatically be removed during + /// mesh creation but no other mesh simplifications are performed, use an external library if this is + /// desired. For simulation, the triangles are considered to be single sided. For ray casts you can choose + /// to make triangles double sided by setting RayCastSettings::mBackFaceMode to + /// EBackFaceMode::CollideWithBackFaces. For collide shape tests you can use + /// CollideShapeSettings::mBackFaceMode and for shape casts you can use + /// ShapeCastSettings::mBackFaceModeTriangles. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:49 + ///
+ /// IndexedTriangleList mIndexedTriangles + ///
+ ///
+ public unsafe void SetIndexedTriangles(ReadOnlySpan value) + { + fixed (IndexedTriangle* value_fixed = value) + { + Jolt.PInvoke.MeshShapeSettings_SetIndexedTriangles(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Materials assigned to the triangles. Each triangle specifies which material it uses through its + /// mMaterialIndex + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:52 + ///
+ /// PhysicsMaterialList mMaterials + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetMaterials() => + new NativeArray(Jolt.PInvoke.MeshShapeSettings_GetMaterials(this)); + + /// + /// + /// Materials assigned to the triangles. Each triangle specifies which material it uses through its + /// mMaterialIndex + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:52 + ///
+ /// PhysicsMaterialList mMaterials + ///
+ ///
+ public unsafe void SetMaterials(ReadOnlySpan value) + { + fixed (PhysicsMaterial* value_fixed = value) + { + Jolt.PInvoke.MeshShapeSettings_SetMaterials(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Maximum number of triangles in each leaf of the axis aligned box tree. This is a balance between memory + /// and performance. Can be in the range [1, MeshShape::MaxTrianglesPerLeaf]. Sensible values are between 4 + /// (for better performance) and 8 (for less memory usage). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:56 + ///
+ /// uint mMaxTrianglesPerLeaf = 8 + ///
+ ///
+ public uint GetMaxTrianglesPerLeaf() => Jolt.PInvoke.MeshShapeSettings_GetMaxTrianglesPerLeaf(this); + + /// + /// + /// Maximum number of triangles in each leaf of the axis aligned box tree. This is a balance between memory + /// and performance. Can be in the range [1, MeshShape::MaxTrianglesPerLeaf]. Sensible values are between 4 + /// (for better performance) and 8 (for less memory usage). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:56 + ///
+ /// uint mMaxTrianglesPerLeaf = 8 + ///
+ ///
+ public void SetMaxTrianglesPerLeaf(uint value) => + Jolt.PInvoke.MeshShapeSettings_SetMaxTrianglesPerLeaf(this, value); + + /// + /// + /// cos(5 degrees) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:63 + ///
+ /// float mActiveEdgeCosThresholdAngle = 0.996195f + ///
+ ///
+ /// + /// + /// Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). + /// Setting this value too small can cause ghost collisions with edges, setting it too big can cause depenetration artifacts (objects not depenetrating quickly). + /// Valid ranges are between cos(0 degrees) and cos(90 degrees). The default value is cos(5 degrees). + /// Negative values will make all edges active and causes EActiveEdgeMode::CollideOnlyWithActive to behave as EActiveEdgeMode::CollideWithAll. + /// This speeds up the build process but will require all bodies that can interact with the mesh to use BodyCreationSettings::mEnhancedInternalEdgeRemoval = true. + /// + /// + public float GetActiveEdgeCosThresholdAngle() => + Jolt.PInvoke.MeshShapeSettings_GetActiveEdgeCosThresholdAngle(this); + + /// + /// + /// cos(5 degrees) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:63 + ///
+ /// float mActiveEdgeCosThresholdAngle = 0.996195f + ///
+ ///
+ /// + /// + /// Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). + /// Setting this value too small can cause ghost collisions with edges, setting it too big can cause depenetration artifacts (objects not depenetrating quickly). + /// Valid ranges are between cos(0 degrees) and cos(90 degrees). The default value is cos(5 degrees). + /// Negative values will make all edges active and causes EActiveEdgeMode::CollideOnlyWithActive to behave as EActiveEdgeMode::CollideWithAll. + /// This speeds up the build process but will require all bodies that can interact with the mesh to use BodyCreationSettings::mEnhancedInternalEdgeRemoval = true. + /// + /// + public void SetActiveEdgeCosThresholdAngle(float value) => + Jolt.PInvoke.MeshShapeSettings_SetActiveEdgeCosThresholdAngle(this, value); + + /// + /// + /// When true, we store the user data coming from Triangle::mUserData or IndexedTriangle::mUserData in the + /// mesh shape. This can be used to store additional data like the original index of the triangle in the + /// mesh. Can be retrieved using MeshShape::GetTriangleUserData. Turning this on increases the memory used + /// by the MeshShape by roughly 25%. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:69 + ///
+ /// bool mPerTriangleUserData = false + ///
+ ///
+ public bool GetPerTriangleUserData() => Jolt.PInvoke.MeshShapeSettings_GetPerTriangleUserData(this); + + /// + /// + /// When true, we store the user data coming from Triangle::mUserData or IndexedTriangle::mUserData in the + /// mesh shape. This can be used to store additional data like the original index of the triangle in the + /// mesh. Can be retrieved using MeshShape::GetTriangleUserData. Turning this on increases the memory used + /// by the MeshShape by roughly 25%. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:69 + ///
+ /// bool mPerTriangleUserData = false + ///
+ ///
+ public void SetPerTriangleUserData(bool value) => + Jolt.PInvoke.MeshShapeSettings_SetPerTriangleUserData(this, value); + + /// + /// + /// Determines the quality of the tree building process. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:78 + ///
+ /// EBuildQuality mBuildQuality = EBuildQuality::FavorRuntimePerformance + ///
+ ///
+ public MeshShapeSettings.BuildQuality GetBuildQuality() => Jolt.PInvoke.MeshShapeSettings_GetBuildQuality(this); + + /// + /// + /// Determines the quality of the tree building process. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MeshShape.h:78 + ///
+ /// EBuildQuality mBuildQuality = EBuildQuality::FavorRuntimePerformance + ///
+ ///
+ public void SetBuildQuality(MeshShapeSettings.BuildQuality value) => + Jolt.PInvoke.MeshShapeSettings_SetBuildQuality(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(MeshShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MortonCode.gen.cs b/Brutal.Jolt/Generated/Classes/MortonCode.gen.cs new file mode 100644 index 0000000..adc77aa --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MortonCode.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Geometry/MortonCode.h:11 + ///
+ /// class MortonCode + ///
+ ///
+ [InteropHandle] + public readonly partial struct MortonCode : IDisposable + { + public static MortonCode Create() => Jolt.PInvoke.MortonCode_Create(); + + /// + /// + /// First converts a floating point value in the range [0, 1] to a 10 bit fixed point integer. Then expands + /// a 10-bit integer into 30 bits by inserting 2 zeros after each bit. + /// + /// + /// C++: + /// Jolt/Geometry/MortonCode.h:16 + ///
+ /// static uint32 sExpandBits(float inV) + ///
+ ///
+ public static uint ExpandBits(float v) => Jolt.PInvoke.MortonCode_ExpandBits(v); + + /// + /// + /// Calculate the morton code for inVector, given that all vectors lie in inVectorBounds + /// + /// + /// C++: + /// Jolt/Geometry/MortonCode.h:29 + ///
+ /// static uint32 sGetMortonCode(Vec3Arg inVector, const AABox &inVectorBounds) + ///
+ ///
+ public static uint GetMortonCode(float3 vector, in AABox vectorBounds) => + Jolt.PInvoke.MortonCode_GetMortonCode(vector, in vectorBounds); + + public void Dispose() => Jolt.PInvoke.MortonCode_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MotionProperties.gen.cs b/Brutal.Jolt/Generated/Classes/MotionProperties.gen.cs new file mode 100644 index 0000000..51e84fd --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MotionProperties.gen.cs @@ -0,0 +1,879 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// The Body class only keeps track of state for static bodies, the MotionProperties class keeps the additional + /// state needed for a moving Body. It has a 1-on-1 relationship with the body. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:28 + ///
+ /// class MotionProperties + ///
+ ///
+ [InteropHandle] + public readonly partial struct MotionProperties + { + /// + /// + /// Motion quality, or how well it detects collisions when it has a high velocity + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:34 + ///
+ /// EMotionQuality GetMotionQuality() const + ///
+ ///
+ public MotionQuality GetMotionQuality() => Jolt.PInvoke.MotionProperties_GetMotionQuality(this); + + /// + /// + /// Get the allowed degrees of freedom that this body has (this can be changed by calling SetMassProperties) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:37 + ///
+ /// inline EAllowedDOFs GetAllowedDOFs() const + ///
+ ///
+ public AllowedDOFs GetAllowedDOFs() => Jolt.PInvoke.MotionProperties_GetAllowedDOFs(this); + + /// + /// + /// If this body can go to sleep. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:40 + ///
+ /// inline bool GetAllowSleeping() const + ///
+ ///
+ public bool GetAllowSleeping() => Jolt.PInvoke.MotionProperties_GetAllowSleeping(this); + + /// + /// + /// Get world space linear velocity of the center of mass + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:43 + ///
+ /// inline Vec3 GetLinearVelocity() const + ///
+ ///
+ public float3 GetLinearVelocity() => Jolt.PInvoke.MotionProperties_GetLinearVelocity(this); + + /// + /// + /// Set world space linear velocity of the center of mass. Note that it is illegal to set a non-zero linear + /// velocity on a sleeping body without waking it up afterwards. If you want the body to wake up when it is + /// sleeping, use BodyInterface::SetLinearVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:48 + ///
+ /// void SetLinearVelocity(Vec3Arg inLinearVelocity) + ///
+ ///
+ public void SetLinearVelocity(float3 linearVelocity) => + Jolt.PInvoke.MotionProperties_SetLinearVelocity(this, linearVelocity); + + /// + /// + /// Set world space linear velocity of the center of mass, will make sure the value is clamped against the + /// maximum linear velocity. Note that it is illegal to set a non-zero linear velocity on a sleeping body + /// without waking it up afterwards. If you want the body to wake up when it is sleeping, use + /// BodyInterface::SetLinearVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:53 + ///
+ /// void SetLinearVelocityClamped(Vec3Arg inLinearVelocity) + ///
+ ///
+ public void SetLinearVelocityClamped(float3 linearVelocity) => + Jolt.PInvoke.MotionProperties_SetLinearVelocityClamped(this, linearVelocity); + + /// + /// + /// Get world space angular velocity of the center of mass + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:56 + ///
+ /// inline Vec3 GetAngularVelocity() const + ///
+ ///
+ public float3 GetAngularVelocity() => Jolt.PInvoke.MotionProperties_GetAngularVelocity(this); + + /// + /// + /// Set world space angular velocity of the center of mass. Note that it is illegal to set a non-zero + /// angular velocity on a sleeping body without waking it up afterwards. If you want the body to wake up + /// when it is sleeping, use BodyInterface::SetAngularVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:61 + ///
+ /// void SetAngularVelocity(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetAngularVelocity(float3 angularVelocity) => + Jolt.PInvoke.MotionProperties_SetAngularVelocity(this, angularVelocity); + + /// + /// + /// Set world space angular velocity of the center of mass, will make sure the value is clamped against the + /// maximum angular velocity. Note that it is illegal to set a non-zero angular velocity on a sleeping body + /// without waking it up afterwards. If you want the body to wake up when it is sleeping, use + /// BodyInterface::SetAngularVelocity instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:66 + ///
+ /// void SetAngularVelocityClamped(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetAngularVelocityClamped(float3 angularVelocity) => + Jolt.PInvoke.MotionProperties_SetAngularVelocityClamped(this, angularVelocity); + + /// + /// + /// Set velocity of body such that it will be rotate/translate by inDeltaPosition/Rotation in inDeltaTime + /// seconds. Note that it is illegal to provide non-zero delta position/rotation on a sleeping body without + /// waking it up afterwards. If you want the body to wake up when it is sleeping, use + /// BodyInterface::MoveKinematic instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:71 + ///
+ /// inline void MoveKinematic(Vec3Arg inDeltaPosition, QuatArg inDeltaRotation, float inDeltaTime) + ///
+ ///
+ public void MoveKinematic(float3 deltaPosition, floatQuat deltaRotation, float deltaTime) => + Jolt.PInvoke.MotionProperties_MoveKinematic(this, deltaPosition, deltaRotation, deltaTime); + + /// + /// + /// Maximum linear velocity that a body can achieve. Used to prevent the system from exploding. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:77 + ///
+ /// inline float GetMaxLinearVelocity() const + ///
+ ///
+ public float GetMaxLinearVelocity() => Jolt.PInvoke.MotionProperties_GetMaxLinearVelocity(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:78 + ///
+ /// inline void SetMaxLinearVelocity(float inLinearVelocity) + ///
+ ///
+ public void SetMaxLinearVelocity(float linearVelocity) => + Jolt.PInvoke.MotionProperties_SetMaxLinearVelocity(this, linearVelocity); + + /// + /// + /// Maximum angular velocity that a body can achieve. Used to prevent the system from exploding. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:81 + ///
+ /// inline float GetMaxAngularVelocity() const + ///
+ ///
+ public float GetMaxAngularVelocity() => Jolt.PInvoke.MotionProperties_GetMaxAngularVelocity(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:82 + ///
+ /// inline void SetMaxAngularVelocity(float inAngularVelocity) + ///
+ ///
+ public void SetMaxAngularVelocity(float angularVelocity) => + Jolt.PInvoke.MotionProperties_SetMaxAngularVelocity(this, angularVelocity); + + /// + /// + /// Clamp velocity according to limit + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:86 + ///
+ /// inline void ClampLinearVelocity() + ///
+ ///
+ public void ClampLinearVelocity() => Jolt.PInvoke.MotionProperties_ClampLinearVelocity(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:87 + ///
+ /// inline void ClampAngularVelocity() + ///
+ ///
+ public void ClampAngularVelocity() => Jolt.PInvoke.MotionProperties_ClampAngularVelocity(this); + + /// + /// + /// Get linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:90 + ///
+ /// inline float GetLinearDamping() const + ///
+ ///
+ public float GetLinearDamping() => Jolt.PInvoke.MotionProperties_GetLinearDamping(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:91 + ///
+ /// void SetLinearDamping(float inLinearDamping) + ///
+ ///
+ public void SetLinearDamping(float linearDamping) => + Jolt.PInvoke.MotionProperties_SetLinearDamping(this, linearDamping); + + /// + /// + /// Get angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:94 + ///
+ /// inline float GetAngularDamping() const + ///
+ ///
+ public float GetAngularDamping() => Jolt.PInvoke.MotionProperties_GetAngularDamping(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:95 + ///
+ /// void SetAngularDamping(float inAngularDamping) + ///
+ ///
+ public void SetAngularDamping(float angularDamping) => + Jolt.PInvoke.MotionProperties_SetAngularDamping(this, angularDamping); + + /// + /// + /// Get gravity factor (1 = normal gravity, 0 = no gravity) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:98 + ///
+ /// inline float GetGravityFactor() const + ///
+ ///
+ public float GetGravityFactor() => Jolt.PInvoke.MotionProperties_GetGravityFactor(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:99 + ///
+ /// void SetGravityFactor(float inGravityFactor) + ///
+ ///
+ public void SetGravityFactor(float gravityFactor) => + Jolt.PInvoke.MotionProperties_SetGravityFactor(this, gravityFactor); + + /// + /// + /// Set the mass and inertia tensor + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:102 + ///
+ /// void SetMassProperties(EAllowedDOFs inAllowedDOFs, const MassProperties &inMassProperties) + ///
+ ///
+ public void SetMassProperties(AllowedDOFs allowedDOFs, MassProperties massProperties) => + Jolt.PInvoke.MotionProperties_SetMassProperties(this, allowedDOFs, massProperties); + + /// + /// + /// Get inverse mass (1 / mass). Should only be called on a dynamic object (static or kinematic bodies have + /// infinite mass so should be treated as 1 / mass = 0) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:105 + ///
+ /// inline float GetInverseMass() const + ///
+ ///
+ public float GetInverseMass() => Jolt.PInvoke.MotionProperties_GetInverseMass(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:106 + ///
+ /// inline float GetInverseMassUnchecked() const + ///
+ ///
+ public float GetInverseMassUnchecked() => Jolt.PInvoke.MotionProperties_GetInverseMassUnchecked(this); + + /// + /// + /// Set the inverse mass (1 / mass). Note that mass and inertia are linearly related (e.g. inertia of a + /// sphere with mass m and radius r is \f$2/5 \: m \: r^2\f$). If you change mass, inertia should probably + /// change as well. You can use ScaleToMass to update mass and inertia at the same time. If all your + /// translation degrees of freedom are restricted, make sure this is zero (see EAllowedDOFs). + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:112 + ///
+ /// void SetInverseMass(float inInverseMass) + ///
+ ///
+ public void SetInverseMass(float inverseMass) => + Jolt.PInvoke.MotionProperties_SetInverseMass(this, inverseMass); + + /// + /// + /// Diagonal of inverse inertia matrix: D. Should only be called on a dynamic object (static or kinematic + /// bodies have infinite mass so should be treated as D = 0) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:115 + ///
+ /// inline Vec3 GetInverseInertiaDiagonal() const + ///
+ ///
+ public float3 GetInverseInertiaDiagonal() => Jolt.PInvoke.MotionProperties_GetInverseInertiaDiagonal(this); + + /// + /// + /// Rotation (R) that takes inverse inertia diagonal to local space: \f$I_{body}^{-1} = R \: D \: R^{-1}\f$ + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:118 + ///
+ /// inline Quat GetInertiaRotation() const + ///
+ ///
+ public floatQuat GetInertiaRotation() => Jolt.PInvoke.MotionProperties_GetInertiaRotation(this); + + /// + /// + /// Set the inverse inertia tensor in local space by setting the diagonal and the rotation: \f$I_{body}^{-1} + /// = R \: D \: R^{-1}\f$. Note that mass and inertia are linearly related (e.g. inertia of a sphere with + /// mass m and radius r is \f$2/5 \: m \: r^2\f$). If you change inertia, mass should probably change as + /// well. You can use ScaleToMass to update mass and inertia at the same time. If all your rotation degrees + /// of freedom are restricted, make sure this is zero (see EAllowedDOFs). + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:124 + ///
+ /// void SetInverseInertia(Vec3Arg inDiagonal, QuatArg inRot) + ///
+ ///
+ public void SetInverseInertia(float3 diagonal, floatQuat rot) => + Jolt.PInvoke.MotionProperties_SetInverseInertia(this, diagonal, rot); + + /// + /// + /// Sets the mass to inMass and scale the inertia tensor based on the ratio between the old and new mass. + /// Note that this only works when the current mass is finite (i.e. the body is dynamic and translational + /// degrees of freedom are not restricted). + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:128 + ///
+ /// void ScaleToMass(float inMass) + ///
+ ///
+ public void ScaleToMass(float mass) => Jolt.PInvoke.MotionProperties_ScaleToMass(this, mass); + + /// + /// + /// Get inverse inertia matrix (\f$I_{body}^{-1}\f$). Will be a matrix of zeros for a static or kinematic + /// object. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:131 + ///
+ /// inline Mat44 GetLocalSpaceInverseInertia() const + ///
+ ///
+ public float4x4 GetLocalSpaceInverseInertia() => + Jolt.PInvoke.MotionProperties_GetLocalSpaceInverseInertia(this); + + /// + /// + /// Same as GetLocalSpaceInverseInertia() but doesn't check if the body is dynamic + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:134 + ///
+ /// inline Mat44 GetLocalSpaceInverseInertiaUnchecked() const + ///
+ ///
+ public float4x4 GetLocalSpaceInverseInertiaUnchecked() => + Jolt.PInvoke.MotionProperties_GetLocalSpaceInverseInertiaUnchecked(this); + + /// + /// + /// Get inverse inertia matrix (\f$I^{-1}\f$) for a given object rotation (translation will be ignored). + /// Zero if object is static or kinematic. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:137 + ///
+ /// inline Mat44 GetInverseInertiaForRotation(Mat44Arg inRotation) const + ///
+ ///
+ public float4x4 GetInverseInertiaForRotation(in float4x4 rotation) => + Jolt.PInvoke.MotionProperties_GetInverseInertiaForRotation(this, in rotation); + + /// + /// + /// Multiply a vector with the inverse world space inertia tensor (\f$I_{world}^{-1}\f$). Zero if object is + /// static or kinematic. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:140 + ///
+ /// Vec3 MultiplyWorldSpaceInverseInertiaByVector(QuatArg inBodyRotation, Vec3Arg inV) const + ///
+ ///
+ public float3 MultiplyWorldSpaceInverseInertiaByVector(floatQuat bodyRotation, float3 v) => + Jolt.PInvoke.MotionProperties_MultiplyWorldSpaceInverseInertiaByVector(this, bodyRotation, v); + + /// + /// + /// Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (unit: + /// m/s) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:143 + ///
+ /// Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const + ///
+ ///
+ public float3 GetPointVelocityCOM(float3 pointRelativeToCOM) => + Jolt.PInvoke.MotionProperties_GetPointVelocityCOM(this, pointRelativeToCOM); + + /// + /// + /// Get the total amount of force applied to the center of mass this time step (through Body::AddForce + /// calls). Note that it will reset to zero after PhysicsSystem::Update. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:146 + ///
+ /// Vec3 GetAccumulatedForce() const + ///
+ ///
+ public float3 GetAccumulatedForce() => Jolt.PInvoke.MotionProperties_GetAccumulatedForce(this); + + /// + /// + /// Get the total amount of torque applied to the center of mass this time step (through + /// Body::AddForce/Body::AddTorque calls). Note that it will reset to zero after PhysicsSystem::Update. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:149 + ///
+ /// Vec3 GetAccumulatedTorque() const + ///
+ ///
+ public float3 GetAccumulatedTorque() => Jolt.PInvoke.MotionProperties_GetAccumulatedTorque(this); + + /// + /// + /// Reset the total accumulated force, note that this will be done automatically after every time step. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:152 + ///
+ /// void ResetForce() + ///
+ ///
+ public void ResetForce() => Jolt.PInvoke.MotionProperties_ResetForce(this); + + /// + /// + /// Reset the total accumulated torque, note that this will be done automatically after every time step. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:155 + ///
+ /// void ResetTorque() + ///
+ ///
+ public void ResetTorque() => Jolt.PInvoke.MotionProperties_ResetTorque(this); + + /// + /// + /// Reset the current velocity and accumulated force and torque. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:158 + ///
+ /// void ResetMotion() + ///
+ ///
+ public void ResetMotion() => Jolt.PInvoke.MotionProperties_ResetMotion(this); + + /// + /// + /// Returns a vector where the linear components that are not allowed by mAllowedDOFs are set to 0 and the + /// rest to 0xffffffff + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:166 + ///
+ /// UVec4 GetLinearDOFsMask() const + ///
+ ///
+ public uint4 GetLinearDOFsMask() => Jolt.PInvoke.MotionProperties_GetLinearDOFsMask(this); + + /// + /// + /// Takes a translation vector inV and returns a vector where the components that are not allowed by + /// mAllowedDOFs are set to 0 + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:173 + ///
+ /// Vec3 LockTranslation(Vec3Arg inV) const + ///
+ ///
+ public float3 LockTranslation(float3 v) => Jolt.PInvoke.MotionProperties_LockTranslation(this, v); + + /// + /// + /// Returns a vector where the angular components that are not allowed by mAllowedDOFs are set to 0 and the + /// rest to 0xffffffff + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:179 + ///
+ /// UVec4 GetAngularDOFsMask() const + ///
+ ///
+ public uint4 GetAngularDOFsMask() => Jolt.PInvoke.MotionProperties_GetAngularDOFsMask(this); + + /// + /// + /// Takes an angular velocity / torque vector inV and returns a vector where the components that are not + /// allowed by mAllowedDOFs are set to 0 + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:186 + ///
+ /// Vec3 LockAngular(Vec3Arg inV) const + ///
+ ///
+ public float3 LockAngular(float3 v) => Jolt.PInvoke.MotionProperties_LockAngular(this, v); + + /// + /// + /// Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations + /// to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use + /// is the max of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:192 + ///
+ /// void SetNumVelocityStepsOverride(uint inN) + ///
+ ///
+ public void SetNumVelocityStepsOverride(uint n) => + Jolt.PInvoke.MotionProperties_SetNumVelocityStepsOverride(this, n); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:193 + ///
+ /// uint GetNumVelocityStepsOverride() const + ///
+ ///
+ public uint GetNumVelocityStepsOverride() => Jolt.PInvoke.MotionProperties_GetNumVelocityStepsOverride(this); + + /// + /// + /// Used only when this body is dynamic and colliding. Override for the number of solver position iterations + /// to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use + /// is the max of all contacts and constraints in the island. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:196 + ///
+ /// void SetNumPositionStepsOverride(uint inN) + ///
+ ///
+ public void SetNumPositionStepsOverride(uint n) => + Jolt.PInvoke.MotionProperties_SetNumPositionStepsOverride(this, n); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:197 + ///
+ /// uint GetNumPositionStepsOverride() const + ///
+ ///
+ public uint GetNumPositionStepsOverride() => Jolt.PInvoke.MotionProperties_GetNumPositionStepsOverride(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:228 + ///
+ /// inline void ApplyLinearVelocityStep(Vec3Arg inLinearVelocity) + ///
+ ///
+ /// + /// + /// @name Update linear and angular velocity (used during constraint solving) + /// @{ + /// + /// + public void ApplyLinearVelocityStep(float3 linearVelocity) => + Jolt.PInvoke.MotionProperties_ApplyLinearVelocityStep(this, linearVelocity); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:236 + ///
+ /// inline void AddLinearVelocityStep(Vec3Arg inLinearVelocityChange) + ///
+ ///
+ public void AddLinearVelocityStep(float3 linearVelocityChange) => + Jolt.PInvoke.MotionProperties_AddLinearVelocityStep(this, linearVelocityChange); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:237 + ///
+ /// inline void SubLinearVelocityStep(Vec3Arg inLinearVelocityChange) + ///
+ ///
+ public void SubLinearVelocityStep(float3 linearVelocityChange) => + Jolt.PInvoke.MotionProperties_SubLinearVelocityStep(this, linearVelocityChange); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:239 + ///
+ /// inline void ApplyAngularVelocityStep(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void ApplyAngularVelocityStep(float3 angularVelocity) => + Jolt.PInvoke.MotionProperties_ApplyAngularVelocityStep(this, angularVelocity); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:247 + ///
+ /// inline void AddAngularVelocityStep(Vec3Arg inAngularVelocityChange) + ///
+ ///
+ public void AddAngularVelocityStep(float3 angularVelocityChange) => + Jolt.PInvoke.MotionProperties_AddAngularVelocityStep(this, angularVelocityChange); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:248 + ///
+ /// inline void SubAngularVelocityStep(Vec3Arg inAngularVelocityChange) + ///
+ ///
+ public void SubAngularVelocityStep(float3 angularVelocityChange) => + Jolt.PInvoke.MotionProperties_SubAngularVelocityStep(this, angularVelocityChange); + + /// + /// + /// Apply the gyroscopic force (aka Dzhanibekov effect, see + /// https://en.wikipedia.org/wiki/Tennis_racket_theorem) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:252 + ///
+ /// inline void ApplyGyroscopicForceInternal(QuatArg inBodyRotation, float inDeltaTime) + ///
+ ///
+ public void ApplyGyroscopicForceInternal(floatQuat bodyRotation, float deltaTime) => + Jolt.PInvoke.MotionProperties_ApplyGyroscopicForceInternal(this, bodyRotation, deltaTime); + + /// + /// + /// Apply all accumulated forces, torques and drag (should only be called by the PhysicsSystem) + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:255 + ///
+ /// inline void ApplyForceTorqueAndDragInternal(QuatArg inBodyRotation, Vec3Arg inGravity, float inDeltaTime) + ///
+ ///
+ public void ApplyForceTorqueAndDragInternal(floatQuat bodyRotation, float3 gravity, float deltaTime) => + Jolt.PInvoke.MotionProperties_ApplyForceTorqueAndDragInternal(this, bodyRotation, gravity, deltaTime); + + /// + /// + /// Access to the island index + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:258 + ///
+ /// uint32 GetIslandIndexInternal() const + ///
+ ///
+ public uint GetIslandIndexInternal() => Jolt.PInvoke.MotionProperties_GetIslandIndexInternal(this); + + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:259 + ///
+ /// void SetIslandIndexInternal(uint32 inIndex) + ///
+ ///
+ public void SetIslandIndexInternal(uint index) => + Jolt.PInvoke.MotionProperties_SetIslandIndexInternal(this, index); + + /// + /// + /// Access to the index in the active bodies array + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:262 + ///
+ /// uint32 GetIndexInActiveBodiesInternal() const + ///
+ ///
+ public uint GetIndexInActiveBodiesInternal() => + Jolt.PInvoke.MotionProperties_GetIndexInActiveBodiesInternal(this); + + /// + /// + /// Reset the sleep test timer without resetting the sleep test spheres + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:272 + ///
+ /// inline void ResetSleepTestTimer() + ///
+ ///
+ public void ResetSleepTestTimer() => Jolt.PInvoke.MotionProperties_ResetSleepTestTimer(this); + + /// + /// + /// Accumulate sleep time and return if a body can go to sleep + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:275 + ///
+ /// inline ECanSleep AccumulateSleepTime(float inDeltaTime, float inTimeBeforeSleep) + ///
+ ///
+ public CanSleep AccumulateSleepTime(float deltaTime, float timeBeforeSleep) => + Jolt.PInvoke.MotionProperties_AccumulateSleepTime(this, deltaTime, timeBeforeSleep); + + /// + /// + /// Resets the three sleep test spheres to the given points (the centre of mass, and two points along the + /// body), restarting the sleep timer. + /// + /// + public unsafe void ResetSleepTestSpheres(ReadOnlySpan points) + { + fixed (float3* points_fixed = points) + { + if (points.Length != 3) + throw new ArgumentException( + "Expected exactly 3 points, one per sleep test sphere.", + nameof(points) + ); + Jolt.PInvoke.MotionProperties_ResetSleepTestSpheres(this, points_fixed, (nuint)points.Length); + } + } + + /// + /// + /// Constant indicating that body is not active + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:283 + ///
+ /// static constexpr uint32 cInactiveIndex = uint32(-1) + ///
+ ///
+ public static uint GetInactiveIndex() => Jolt.PInvoke.MotionProperties_GetInactiveIndex(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MotorSettings.gen.cs b/Brutal.Jolt/Generated/Classes/MotorSettings.gen.cs new file mode 100644 index 0000000..06a005b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MotorSettings.gen.cs @@ -0,0 +1,334 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that contains the settings for a constraint motor. See the main page of the API documentation for more + /// information on how to configure a motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:39 + ///
+ /// class MotorSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct MotorSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:45 + ///
+ /// MotorSettings() = default + ///
+ ///
+ public static MotorSettings Create() => Jolt.PInvoke.MotorSettings_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:48 + ///
+ /// MotorSettings(ESpringMode inMode, float inFrequency, float inDamping) + ///
+ ///
+ public static MotorSettings Create(SpringMode mode, float frequency, float damping) => + Jolt.PInvoke.MotorSettings_Create_2(mode, frequency, damping); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:49 + ///
+ /// MotorSettings(float inFrequency, float inDamping) + ///
+ ///
+ public static MotorSettings Create(float frequency, float damping) => + Jolt.PInvoke.MotorSettings_Create_3(frequency, damping); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:50 + ///
+ /// MotorSettings(ESpringMode inMode, float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit) + ///
+ ///
+ public static MotorSettings Create( + SpringMode mode, + float frequency, + float damping, + float forceLimit, + float torqueLimit + ) => Jolt.PInvoke.MotorSettings_Create_4(mode, frequency, damping, forceLimit, torqueLimit); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:51 + ///
+ /// MotorSettings(float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit) + ///
+ ///
+ public static MotorSettings Create(float frequency, float damping, float forceLimit, float torqueLimit) => + Jolt.PInvoke.MotorSettings_Create_5(frequency, damping, forceLimit, torqueLimit); + + /// + /// + /// Set asymmetric force limits + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:54 + ///
+ /// void SetForceLimits(float inMin, float inMax) + ///
+ ///
+ public void SetForceLimits(float min, float max) => Jolt.PInvoke.MotorSettings_SetForceLimits(this, min, max); + + /// + /// + /// Set asymmetric torque limits + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:57 + ///
+ /// void SetTorqueLimits(float inMin, float inMax) + ///
+ ///
+ public void SetTorqueLimits(float min, float max) => Jolt.PInvoke.MotorSettings_SetTorqueLimits(this, min, max); + + /// + /// + /// Set symmetric force limits + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:60 + ///
+ /// void SetForceLimit(float inLimit) + ///
+ ///
+ public void SetForceLimit(float limit) => Jolt.PInvoke.MotorSettings_SetForceLimit(this, limit); + + /// + /// + /// Set symmetric torque limits + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:63 + ///
+ /// void SetTorqueLimit(float inLimit) + ///
+ ///
+ public void SetTorqueLimit(float limit) => Jolt.PInvoke.MotorSettings_SetTorqueLimit(this, limit); + + /// + /// + /// Check if settings are valid + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:66 + ///
+ /// bool IsValid() const + ///
+ ///
+ public bool IsValid() => Jolt.PInvoke.MotorSettings_IsValid(this); + + /// + /// + /// Saves the contents of the motor settings in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:69 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.MotorSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restores contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:72 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.MotorSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Settings for the spring that is used to drive to the position target (not used when motor is a velocity + /// motor). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:75 + ///
+ /// SpringSettings mSpringSettings { ESpringMode::FrequencyAndDamping, 2.0f, 1.0f } + ///
+ ///
+ /// + /// + /// Settings + /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SpringSettings GetSpringSettings() => Jolt.PInvoke.MotorSettings_GetSpringSettings(this); + + /// + /// + /// Settings for the spring that is used to drive to the position target (not used when motor is a velocity + /// motor). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:75 + ///
+ /// SpringSettings mSpringSettings { ESpringMode::FrequencyAndDamping, 2.0f, 1.0f } + ///
+ ///
+ /// + /// + /// Settings + /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetSpringSettings(SpringSettings value) => + Jolt.PInvoke.MotorSettings_SetSpringSettings(this, value); + + /// + /// + /// Minimum force to apply in case of a linear constraint (N). Usually this is -mMaxForceLimit unless you + /// want a motor that can e.g. push but not pull. Not used when motor is an angular motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:76 + ///
+ /// float mMinForceLimit = -FLT_MAX + ///
+ ///
+ public float GetMinForceLimit() => Jolt.PInvoke.MotorSettings_GetMinForceLimit(this); + + /// + /// + /// Minimum force to apply in case of a linear constraint (N). Usually this is -mMaxForceLimit unless you + /// want a motor that can e.g. push but not pull. Not used when motor is an angular motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:76 + ///
+ /// float mMinForceLimit = -FLT_MAX + ///
+ ///
+ public void SetMinForceLimit(float value) => Jolt.PInvoke.MotorSettings_SetMinForceLimit(this, value); + + /// + /// + /// Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:77 + ///
+ /// float mMaxForceLimit = FLT_MAX + ///
+ ///
+ public float GetMaxForceLimit() => Jolt.PInvoke.MotorSettings_GetMaxForceLimit(this); + + /// + /// + /// Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:77 + ///
+ /// float mMaxForceLimit = FLT_MAX + ///
+ ///
+ public void SetMaxForceLimit(float value) => Jolt.PInvoke.MotorSettings_SetMaxForceLimit(this, value); + + /// + /// + /// Minimum torque to apply in case of a angular constraint (N m). Usually this is -mMaxTorqueLimit unless + /// you want a motor that can e.g. push but not pull. Not used when motor is a linear motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:78 + ///
+ /// float mMinTorqueLimit = -FLT_MAX + ///
+ ///
+ public float GetMinTorqueLimit() => Jolt.PInvoke.MotorSettings_GetMinTorqueLimit(this); + + /// + /// + /// Minimum torque to apply in case of a angular constraint (N m). Usually this is -mMaxTorqueLimit unless + /// you want a motor that can e.g. push but not pull. Not used when motor is a linear motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:78 + ///
+ /// float mMinTorqueLimit = -FLT_MAX + ///
+ ///
+ public void SetMinTorqueLimit(float value) => Jolt.PInvoke.MotorSettings_SetMinTorqueLimit(this, value); + + /// + /// + /// Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a linear motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:79 + ///
+ /// float mMaxTorqueLimit = FLT_MAX + ///
+ ///
+ public float GetMaxTorqueLimit() => Jolt.PInvoke.MotorSettings_GetMaxTorqueLimit(this); + + /// + /// + /// Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a linear motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:79 + ///
+ /// float mMaxTorqueLimit = FLT_MAX + ///
+ ///
+ public void SetMaxTorqueLimit(float value) => Jolt.PInvoke.MotorSettings_SetMaxTorqueLimit(this, value); + + public void Dispose() => Jolt.PInvoke.MotorSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MotorcycleController.gen.cs b/Brutal.Jolt/Generated/Classes/MotorcycleController.gen.cs new file mode 100644 index 0000000..1485364 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MotorcycleController.gen.cs @@ -0,0 +1,339 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime controller class + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:44 + ///
+ /// class MotorcycleController : public WheeledVehicleController + ///
+ ///
+ [InteropHandle] + public readonly partial struct MotorcycleController : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:50 + ///
+ /// MotorcycleController(const MotorcycleControllerSettings &inSettings, VehicleConstraint &inConstraint) + ///
+ ///
+ public static MotorcycleController Create( + MotorcycleControllerSettings settings, + VehicleConstraint constraint + ) => Jolt.PInvoke.MotorcycleController_Create(settings, constraint); + + /// + /// + /// Get the distance between the front and back wheels + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:53 + ///
+ /// float GetWheelBase() const + ///
+ ///
+ public float GetWheelBase() => Jolt.PInvoke.MotorcycleController_GetWheelBase(this); + + /// + /// + /// Enable or disable the lean spring. This allows you to temporarily disable the lean spring to allow the + /// motorcycle to fall over. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:56 + ///
+ /// void EnableLeanController(bool inEnable) + ///
+ ///
+ public void EnableLeanController(bool enable) => + Jolt.PInvoke.MotorcycleController_EnableLeanController(this, enable); + + /// + /// + /// Check if the lean spring is enabled. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:59 + ///
+ /// bool IsLeanControllerEnabled() const + ///
+ ///
+ public bool IsLeanControllerEnabled() => Jolt.PInvoke.MotorcycleController_IsLeanControllerEnabled(this); + + /// + /// + /// Enable or disable the lean steering limit. When enabled (default) the steering angle is limited based on + /// the vehicle speed to prevent steering that would cause an inertial force that causes the motorcycle to + /// topple over. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:62 + ///
+ /// void EnableLeanSteeringLimit(bool inEnable) + ///
+ ///
+ public void EnableLeanSteeringLimit(bool enable) => + Jolt.PInvoke.MotorcycleController_EnableLeanSteeringLimit(this, enable); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:63 + ///
+ /// bool IsLeanSteeringLimitEnabled() const + ///
+ ///
+ public bool IsLeanSteeringLimitEnabled() => Jolt.PInvoke.MotorcycleController_IsLeanSteeringLimitEnabled(this); + + /// + /// + /// Spring constant for the lean spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:66 + ///
+ /// void SetLeanSpringConstant(float inConstant) + ///
+ ///
+ public void SetLeanSpringConstant(float constant) => + Jolt.PInvoke.MotorcycleController_SetLeanSpringConstant(this, constant); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:67 + ///
+ /// float GetLeanSpringConstant() const + ///
+ ///
+ public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleController_GetLeanSpringConstant(this); + + /// + /// + /// Spring damping constant for the lean spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:70 + ///
+ /// void SetLeanSpringDamping(float inDamping) + ///
+ ///
+ public void SetLeanSpringDamping(float damping) => + Jolt.PInvoke.MotorcycleController_SetLeanSpringDamping(this, damping); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:71 + ///
+ /// float GetLeanSpringDamping() const + ///
+ ///
+ public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleController_GetLeanSpringDamping(this); + + /// + /// + /// The lean spring applies an additional force equal to this coefficient * Integral(delta angle, 0, t), + /// this effectively makes the lean spring a PID controller + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:74 + ///
+ /// void SetLeanSpringIntegrationCoefficient(float inCoefficient) + ///
+ ///
+ public void SetLeanSpringIntegrationCoefficient(float coefficient) => + Jolt.PInvoke.MotorcycleController_SetLeanSpringIntegrationCoefficient(this, coefficient); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:75 + ///
+ /// float GetLeanSpringIntegrationCoefficient() const + ///
+ ///
+ public float GetLeanSpringIntegrationCoefficient() => + Jolt.PInvoke.MotorcycleController_GetLeanSpringIntegrationCoefficient(this); + + /// + /// + /// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay * + /// t) * initial_value + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:78 + ///
+ /// void SetLeanSpringIntegrationCoefficientDecay(float inDecay) + ///
+ ///
+ public void SetLeanSpringIntegrationCoefficientDecay(float decay) => + Jolt.PInvoke.MotorcycleController_SetLeanSpringIntegrationCoefficientDecay(this, decay); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:79 + ///
+ /// float GetLeanSpringIntegrationCoefficientDecay() const + ///
+ ///
+ public float GetLeanSpringIntegrationCoefficientDecay() => + Jolt.PInvoke.MotorcycleController_GetLeanSpringIntegrationCoefficientDecay(this); + + /// + /// + /// How much to smooth the lean angle (0 = no smoothing, 1 = lean angle never changes) Note that this is + /// frame rate dependent because the formula is: smoothing_factor * previous + (1 - smoothing_factor) * + /// current + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:83 + ///
+ /// void SetLeanSmoothingFactor(float inFactor) + ///
+ ///
+ public void SetLeanSmoothingFactor(float factor) => + Jolt.PInvoke.MotorcycleController_SetLeanSmoothingFactor(this, factor); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:84 + ///
+ /// float GetLeanSmoothingFactor() const + ///
+ ///
+ public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleController_GetLeanSmoothingFactor(this); + + /// + public VehicleControllerSettings GetSettings() => ((VehicleController)this).GetSettings(); + + public static implicit operator WheeledVehicleController(MotorcycleController value) => + Unsafe.BitCast(value); + + public static implicit operator VehicleController(MotorcycleController value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.MotorcycleController_Destroy(this); + + /// + public void SetDriverInput(float forward, float right, float brake, float handBrake) => + ((WheeledVehicleController)this).SetDriverInput(forward, right, brake, handBrake); + + /// + public void SetForwardInput(float forward) => ((WheeledVehicleController)this).SetForwardInput(forward); + + /// + public float GetForwardInput() => ((WheeledVehicleController)this).GetForwardInput(); + + /// + public void SetRightInput(float right) => ((WheeledVehicleController)this).SetRightInput(right); + + /// + public float GetRightInput() => ((WheeledVehicleController)this).GetRightInput(); + + /// + public void SetBrakeInput(float brake) => ((WheeledVehicleController)this).SetBrakeInput(brake); + + /// + public float GetBrakeInput() => ((WheeledVehicleController)this).GetBrakeInput(); + + /// + public void SetHandBrakeInput(float handBrake) => ((WheeledVehicleController)this).SetHandBrakeInput(handBrake); + + /// + public float GetHandBrakeInput() => ((WheeledVehicleController)this).GetHandBrakeInput(); + + /// + public VehicleEngine GetEngine() => ((WheeledVehicleController)this).GetEngine(); + + /// + public VehicleTransmission GetTransmission() => ((WheeledVehicleController)this).GetTransmission(); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetDifferentials() => + ((WheeledVehicleController)this).GetDifferentials(); + + /// + public float GetDifferentialLimitedSlipRatio() => + ((WheeledVehicleController)this).GetDifferentialLimitedSlipRatio(); + + /// + public void SetDifferentialLimitedSlipRatio(float v) => + ((WheeledVehicleController)this).SetDifferentialLimitedSlipRatio(v); + + /// + public float GetWheelSpeedAtClutch() => ((WheeledVehicleController)this).GetWheelSpeedAtClutch(); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:151 + ///
+ /// void SetTireMaxImpulseCallback(const TireMaxImpulseCallback &inTireMaxImpulseCallback) + ///
+ ///
+ /// + /// + /// tireMaxImpulseCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Jolt calls it without a null check, so null is rejected. The callback and userData are retained by the + /// native object until they are replaced or the owner is destroyed - keep whatever userData points at (a + /// GCHandle, an allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetTireMaxImpulseCallback( + delegate* unmanaged[Cdecl]< + uint, + float*, + float*, + float, + float, + float, + float, + float, + float, + nint, + void> tireMaxImpulseCallback, + nint tireMaxImpulseCallbackUserData + ) => + ((WheeledVehicleController)this).SetTireMaxImpulseCallback( + tireMaxImpulseCallback, + tireMaxImpulseCallbackUserData + ); + + /// + public void SetRPMMeter(float3 position, float size) => + ((WheeledVehicleController)this).SetRPMMeter(position, size); + + /// + public VehicleConstraint GetConstraint() => ((VehicleController)this).GetConstraint(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MotorcycleControllerSettings.gen.cs b/Brutal.Jolt/Generated/Classes/MotorcycleControllerSettings.gen.cs new file mode 100644 index 0000000..6f910fd --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MotorcycleControllerSettings.gen.cs @@ -0,0 +1,262 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings of a two wheeled motorcycle (adds a spring to balance the motorcycle) Note: The motor cycle + /// controller is still in development and may need a lot of tweaks/hacks to work properly! + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:13 + ///
+ /// class MotorcycleControllerSettings : public WheeledVehicleControllerSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct MotorcycleControllerSettings : IDisposable + { + public static MotorcycleControllerSettings Create() => Jolt.PInvoke.MotorcycleControllerSettings_Create(); + + /// + public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream); + + /// + /// + /// How far we're willing to make the bike lean over in turns (in radians) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:24 + ///
+ /// float mMaxLeanAngle = DegreesToRadians(45.0f) + ///
+ ///
+ public float GetMaxLeanAngle() => Jolt.PInvoke.MotorcycleControllerSettings_GetMaxLeanAngle(this); + + /// + /// + /// How far we're willing to make the bike lean over in turns (in radians) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:24 + ///
+ /// float mMaxLeanAngle = DegreesToRadians(45.0f) + ///
+ ///
+ public void SetMaxLeanAngle(float value) => + Jolt.PInvoke.MotorcycleControllerSettings_SetMaxLeanAngle(this, value); + + /// + /// + /// Spring constant for the lean spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:27 + ///
+ /// float mLeanSpringConstant = 5000.0f + ///
+ ///
+ public float GetLeanSpringConstant() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringConstant(this); + + /// + /// + /// Spring constant for the lean spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:27 + ///
+ /// float mLeanSpringConstant = 5000.0f + ///
+ ///
+ public void SetLeanSpringConstant(float value) => + Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringConstant(this, value); + + /// + /// + /// Spring damping constant for the lean spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:30 + ///
+ /// float mLeanSpringDamping = 1000.0f + ///
+ ///
+ public float GetLeanSpringDamping() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringDamping(this); + + /// + /// + /// Spring damping constant for the lean spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:30 + ///
+ /// float mLeanSpringDamping = 1000.0f + ///
+ ///
+ public void SetLeanSpringDamping(float value) => + Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringDamping(this, value); + + /// + /// + /// The lean spring applies an additional force equal to this coefficient * Integral(delta angle, 0, t), + /// this effectively makes the lean spring a PID controller + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:33 + ///
+ /// float mLeanSpringIntegrationCoefficient = 0.0f + ///
+ ///
+ public float GetLeanSpringIntegrationCoefficient() => + Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient(this); + + /// + /// + /// The lean spring applies an additional force equal to this coefficient * Integral(delta angle, 0, t), + /// this effectively makes the lean spring a PID controller + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:33 + ///
+ /// float mLeanSpringIntegrationCoefficient = 0.0f + ///
+ ///
+ public void SetLeanSpringIntegrationCoefficient(float value) => + Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient(this, value); + + /// + /// + /// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay * + /// t) * initial_value + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:36 + ///
+ /// float mLeanSpringIntegrationCoefficientDecay = 4.0f + ///
+ ///
+ public float GetLeanSpringIntegrationCoefficientDecay() => + Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay(this); + + /// + /// + /// How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-decay * + /// t) * initial_value + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:36 + ///
+ /// float mLeanSpringIntegrationCoefficientDecay = 4.0f + ///
+ ///
+ public void SetLeanSpringIntegrationCoefficientDecay(float value) => + Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay(this, value); + + /// + /// + /// How much to smooth the lean angle (0 = no smoothing, 1 = lean angle never changes) Note that this is + /// frame rate dependent because the formula is: smoothing_factor * previous + (1 - smoothing_factor) * + /// current + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:40 + ///
+ /// float mLeanSmoothingFactor = 0.8f + ///
+ ///
+ public float GetLeanSmoothingFactor() => Jolt.PInvoke.MotorcycleControllerSettings_GetLeanSmoothingFactor(this); + + /// + /// + /// How much to smooth the lean angle (0 = no smoothing, 1 = lean angle never changes) Note that this is + /// frame rate dependent because the formula is: smoothing_factor * previous + (1 - smoothing_factor) * + /// current + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/MotorcycleController.h:40 + ///
+ /// float mLeanSmoothingFactor = 0.8f + ///
+ ///
+ public void SetLeanSmoothingFactor(float value) => + Jolt.PInvoke.MotorcycleControllerSettings_SetLeanSmoothingFactor(this, value); + + public void AddRef() => ((VehicleControllerSettings)this).AddRef(); + + public void Release() => ((VehicleControllerSettings)this).Release(); + + public uint GetRefCount() => ((VehicleControllerSettings)this).GetRefCount(); + + public static implicit operator WheeledVehicleControllerSettings(MotorcycleControllerSettings value) => + Unsafe.BitCast(value); + + public static implicit operator VehicleControllerSettings(MotorcycleControllerSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public VehicleEngineSettings GetEngine() => ((WheeledVehicleControllerSettings)this).GetEngine(); + + /// + public void SetEngine(VehicleEngineSettings value) => ((WheeledVehicleControllerSettings)this).SetEngine(value); + + /// + public VehicleTransmissionSettings GetTransmission() => + ((WheeledVehicleControllerSettings)this).GetTransmission(); + + /// + public void SetTransmission(VehicleTransmissionSettings value) => + ((WheeledVehicleControllerSettings)this).SetTransmission(value); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetDifferentials() => + ((WheeledVehicleControllerSettings)this).GetDifferentials(); + + /// + public unsafe void SetDifferentials(ReadOnlySpan value) => + ((WheeledVehicleControllerSettings)this).SetDifferentials(value); + + /// + public float GetDifferentialLimitedSlipRatio() => + ((WheeledVehicleControllerSettings)this).GetDifferentialLimitedSlipRatio(); + + /// + public void SetDifferentialLimitedSlipRatio(float value) => + ((WheeledVehicleControllerSettings)this).SetDifferentialLimitedSlipRatio(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MutableCompoundShape.gen.cs b/Brutal.Jolt/Generated/Classes/MutableCompoundShape.gen.cs new file mode 100644 index 0000000..419a5ad --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MutableCompoundShape.gen.cs @@ -0,0 +1,632 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A compound shape, sub shapes can be rotated and translated. This shape is optimized for adding / removing + /// and changing the rotation / translation of sub shapes but is less efficient in querying. Shifts all child + /// objects so that they're centered around the center of mass (which needs to be kept up to date by calling + /// AdjustCenterOfMass). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:32 + ///
+ /// class MutableCompoundShape final : public CompoundShape + ///
+ ///
+ /// + /// + /// A compound shape, sub shapes can be rotated and translated. + /// This shape is optimized for adding / removing and changing the rotation / translation of sub shapes but is less efficient in querying. + /// Shifts all child objects so that they're centered around the center of mass (which needs to be kept up to date by calling AdjustCenterOfMass). + /// + /// Note: If you're using MutableCompoundShape and are querying data while modifying the shape you'll have a race condition. + /// In this case it is best to create a new MutableCompoundShape using the Clone function. You replace the shape on a body using BodyInterface::SetShape. + /// If a query is still working on the old shape, it will have taken a reference and keep the old shape alive until the query finishes. + /// + /// When you modify a MutableCompoundShape, beware that the SubShapeIDs of all other shapes can change. So be careful when storing SubShapeIDs. + /// + /// + [InteropHandle] + public readonly partial struct MutableCompoundShape : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:163 + ///
+ /// struct Bounds + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct Bounds + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:165 + ///
+ /// Vec4 mMinX + ///
+ ///
+ [FieldOffset(0)] + public float4 MinX; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:166 + ///
+ /// Vec4 mMinY + ///
+ ///
+ [FieldOffset(16)] + public float4 MinY; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:167 + ///
+ /// Vec4 mMinZ + ///
+ ///
+ [FieldOffset(32)] + public float4 MinZ; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:168 + ///
+ /// Vec4 mMaxX + ///
+ ///
+ [FieldOffset(48)] + public float4 MaxX; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:169 + ///
+ /// Vec4 mMaxY + ///
+ ///
+ [FieldOffset(64)] + public float4 MaxY; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:170 + ///
+ /// Vec4 mMaxZ + ///
+ ///
+ [FieldOffset(80)] + public float4 MaxZ; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:38 + ///
+ /// MutableCompoundShape() + ///
+ ///
+ public static MutableCompoundShape Create() => Jolt.PInvoke.MutableCompoundShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:39 + ///
+ /// MutableCompoundShape(const MutableCompoundShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static MutableCompoundShape Create(MutableCompoundShapeSettings settings) + { + var _handle = Jolt.PInvoke.MutableCompoundShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Clone this shape. Can be used to avoid race conditions. See the documentation of this class for more + /// information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:42 + ///
+ /// Ref<MutableCompoundShape> Clone() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public MutableCompoundShape Clone() => Jolt.PInvoke.MutableCompoundShape_Clone(this); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public unsafe int GetIntersectingSubShapes(in AABox box, Span subShapeIndices) => + ((CompoundShape)this).GetIntersectingSubShapes(in box, subShapeIndices); + + /// + public unsafe int GetIntersectingSubShapes(OrientedBox box, Span subShapeIndices) => + ((CompoundShape)this).GetIntersectingSubShapes(box, subShapeIndices); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + /// + /// Adding a new shape. Beware this can create a race condition if you're running collision queries in + /// parallel. See class documentation for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:77 + ///
+ /// uint AddShape(Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape, uint32 inUserData = 0, uint inIndex = UINT_MAX) + ///
+ ///
+ /// + /// + /// Adding a new shape. + /// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information. + /// @param inPosition The position of the new shape + /// @param inRotation The orientation of the new shape + /// @param inShape The shape to add + /// @param inUserData User data that will be stored with the shape and can be retrieved using GetCompoundUserData + /// @param inIndex Index where to insert the shape, UINT_MAX to add to the end + /// @return The index of the newly added shape + /// + /// + public uint AddShape( + float3 position, + floatQuat rotation, + Shape shape, + uint userData = 0, + uint index = uint.MaxValue + ) => Jolt.PInvoke.MutableCompoundShape_AddShape(this, position, rotation, shape, userData, index); + + /// + /// + /// Remove a shape by index. Beware this can create a race condition if you're running collision queries in + /// parallel. See class documentation for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:81 + ///
+ /// void RemoveShape(uint inIndex) + ///
+ ///
+ public void RemoveShape(uint index) + { + Jolt.PInvoke.MutableCompoundShape_RemoveShape(this, index, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of sub shapes." + ); + } + + /// + /// + /// Modify the position / orientation of a shape. Beware this can create a race condition if you're running + /// collision queries in parallel. See class documentation for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:85 + ///
+ /// void ModifyShape(uint inIndex, Vec3Arg inPosition, QuatArg inRotation) + ///
+ ///
+ public void ModifyShape(uint index, float3 position, floatQuat rotation) + { + Jolt.PInvoke.MutableCompoundShape_ModifyShape(this, index, position, rotation, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of sub shapes." + ); + } + + /// + /// + /// Modify the position / orientation and shape at the same time. Beware this can create a race condition if + /// you're running collision queries in parallel. See class documentation for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:89 + ///
+ /// void ModifyShape(uint inIndex, Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape) + ///
+ ///
+ public void ModifyShape(uint index, float3 position, floatQuat rotation, Shape shape) + { + Jolt.PInvoke.MutableCompoundShape_ModifyShape_2(this, index, position, rotation, shape, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of sub shapes." + ); + } + + /// + /// + /// Recalculate the center of mass and shift all objects so they're centered around it (this needs to be + /// done of dynamic bodies and if the center of mass changes significantly due to adding / removing / + /// repositioning sub shapes or else the simulation will look unnatural) Note that after adjusting the + /// center of mass of an object you need to call BodyInterface::NotifyShapeChanged and + /// Constraint::NotifyShapeChanged on the relevant bodies / constraints. Beware this can create a race + /// condition if you're running collision queries in parallel. See class documentation for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:105 + ///
+ /// void AdjustCenterOfMass() + ///
+ ///
+ public void AdjustCenterOfMass() => Jolt.PInvoke.MutableCompoundShape_AdjustCenterOfMass(this); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:110 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.MutableCompoundShape_Register(); + + /// + /// + /// Moves and rotates positions.Length sub shapes starting at startIndex in one call, then recalculates the + /// bounds once - much cheaper than ModifyShape per sub shape. Positions are in the compound's own space, as + /// AddShape takes them (the centre of mass isn't moved), and each rotation must be normalized. + /// + /// + public unsafe void ModifyShapes( + uint startIndex, + ReadOnlySpan positions, + ReadOnlySpan rotations + ) + { + fixed (floatQuat* rotations_fixed = rotations) + fixed (float3* positions_fixed = positions) + { + if (rotations.Length != positions.Length) + throw new ArgumentException("Expected one rotation per position.", nameof(rotations)); + if ((ulong)startIndex + (ulong)positions.Length > GetNumSubShapes()) + throw new ArgumentOutOfRangeException( + nameof(positions), + positions.Length, + "startIndex plus the span length runs past the sub shapes." + ); + Jolt.PInvoke.MutableCompoundShape_ModifyShapes( + this, + startIndex, + positions_fixed, + (nuint)positions.Length, + rotations_fixed, + (nuint)rotations.Length + ); + } + } + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator CompoundShape(MutableCompoundShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(MutableCompoundShape value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetSubShapes() => ((CompoundShape)this).GetSubShapes(); + + /// + public uint GetNumSubShapes() => ((CompoundShape)this).GetNumSubShapes(); + + /// + public CompoundShape.SubShape GetSubShape(uint idx) => ((CompoundShape)this).GetSubShape(idx); + + /// + public uint GetCompoundUserData(uint idx) => ((CompoundShape)this).GetCompoundUserData(idx); + + /// + public void SetCompoundUserData(uint idx, uint userData) => + ((CompoundShape)this).SetCompoundUserData(idx, userData); + + /// + public bool IsSubShapeIDValid(uint subShapeID) => ((CompoundShape)this).IsSubShapeIDValid(subShapeID); + + /// + public uint GetSubShapeIndexFromID(uint subShapeID, out uint remainder) => + ((CompoundShape)this).GetSubShapeIndexFromID(subShapeID, out remainder); + + /// + public SubShapeIDCreator GetSubShapeIDFromIndex(int idx, SubShapeIDCreator parentSubShapeID) => + ((CompoundShape)this).GetSubShapeIDFromIndex(idx, parentSubShapeID); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/MutableCompoundShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/MutableCompoundShapeSettings.gen.cs new file mode 100644 index 0000000..0bc2ff6 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/MutableCompoundShapeSettings.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a MutableCompoundShape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:14 + ///
+ /// class MutableCompoundShapeSettings final : public CompoundShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct MutableCompoundShapeSettings : IDisposable + { + public static MutableCompoundShapeSettings Create() => Jolt.PInvoke.MutableCompoundShapeSettings_Create(); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator CompoundShapeSettings(MutableCompoundShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(MutableCompoundShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void AddShape(float3 position, floatQuat rotation, ShapeSettings shape, uint userData = 0) => + ((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData); + + /// + public void AddShape(float3 position, floatQuat rotation, Shape shape, uint userData = 0) => + ((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetSubShapes() => + ((CompoundShapeSettings)this).GetSubShapes(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/NarrowPhaseQuery.gen.cs b/Brutal.Jolt/Generated/Classes/NarrowPhaseQuery.gen.cs new file mode 100644 index 0000000..53371d1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/NarrowPhaseQuery.gen.cs @@ -0,0 +1,645 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that provides an interface for doing precise collision detection against the broad and then the narrow + /// phase. Unlike a BroadPhaseQuery, the NarrowPhaseQuery will test against shapes and will return collision + /// information against triangles, spheres etc. + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:22 + ///
+ /// class NarrowPhaseQuery : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct NarrowPhaseQuery + { + /// + /// + /// Initialize the interface (should only be called by PhysicsSystem) + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:26 + ///
+ /// void Init(BodyLockInterface &inBodyLockInterface, BroadPhaseQuery &inBroadPhaseQuery) + ///
+ ///
+ public void Init(BodyLockInterface bodyLockInterface, BroadPhaseQuery broadPhaseQuery) => + Jolt.PInvoke.NarrowPhaseQuery_Init(this, bodyLockInterface, broadPhaseQuery); + + /// + /// + /// Cast a ray and find the closest hit. Returns true if it finds a hit. Hits further than ioHit.mFraction + /// will not be considered and in this case ioHit will remain unmodified (and the function will return + /// false). Convex objects will be treated as solid (meaning if the ray starts inside, you'll get a hit + /// fraction of 0) and back face hits against triangles are returned. If you want the surface normal of the + /// hit use Body::GetWorldSpaceSurfaceNormal(ioHit.mSubShapeID2, inRay.GetPointOnRay(ioHit.mFraction)) on + /// body with ID ioHit.mBodyID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:31 + ///
+ /// bool CastRay(const RRayCast &inRay, RayCastResult &ioHit, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }) const + ///
+ ///
+ public bool CastRay( + in RRayCast ray, + ref RayCastResult hit, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default + ) => + Jolt.PInvoke.NarrowPhaseQuery_CastRay( + this, + in ray, + ref hit, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter + ); + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also slightly + /// slower than the CastRay function that returns only a single hit. If you want the surface normal of the + /// hit use Body::GetWorldSpaceSurfaceNormal(collected sub shape ID, inRay.GetPointOnRay(collected + /// fraction)) on body with collected body ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:35 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastRay( + in RRayCast ray, + RayCastSettings rayCastSettings, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (RayCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.NarrowPhaseQuery_CastRay_2( + this, + in ray, + rayCastSettings, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Casts every ray in rays and writes each one's closest hit into results, in one native call. A ray that + /// hits nothing writes the default result, whose BodyID is invalid and fraction 1 + epsilon, as + /// CastRayClosest does. Returns how many rays hit. Every ray shares rayCastSettings and the filters, and + /// walks the broad phase on its own: what the batch saves is the managed-to-native crossing per ray. Only + /// as many elements as there are rays are written. + /// + /// + public unsafe uint CastRaysClosest( + ReadOnlySpan rays, + RayCastSettings rayCastSettings, + Span results, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (RayCastResult* results_fixed = results) + fixed (RRayCast* rays_fixed = rays) + { + if (results.Length < rays.Length) + throw new ArgumentException("results must hold at least one element per ray.", nameof(results)); + return Jolt.PInvoke.NarrowPhaseQuery_CastRaysClosest( + this, + rays_fixed, + (nuint)rays.Length, + rayCastSettings, + results_fixed, + (nuint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + } + } + + /// + /// + /// Casts every ray in rays and writes whether each hit anything into hits, stopping each ray at the first + /// hit it finds rather than looking for the closest - the cheap form for line-of-sight checks. Returns how + /// many rays hit. Every ray shares rayCastSettings and the filters, and walks the broad phase on its own: + /// what the batch saves is the managed-to-native crossing per ray. Only as many elements as there are rays + /// are written. + /// + /// + public unsafe uint CastRaysAny( + ReadOnlySpan rays, + RayCastSettings rayCastSettings, + Span hits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (bool* hits_fixed = hits) + fixed (RRayCast* rays_fixed = rays) + { + if (hits.Length < rays.Length) + throw new ArgumentException("hits must hold at least one element per ray.", nameof(hits)); + return Jolt.PInvoke.NarrowPhaseQuery_CastRaysAny( + this, + rays_fixed, + (nuint)rays.Length, + rayCastSettings, + hits_fixed, + (nuint)hits.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + } + } + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also slightly + /// slower than the CastRay function that returns only a single hit. If you want the surface normal of the + /// hit use Body::GetWorldSpaceSurfaceNormal(collected sub shape ID, inRay.GetPointOnRay(collected + /// fraction)) on body with collected body ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:35 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastRayClosest( + in RRayCast ray, + RayCastSettings rayCastSettings, + out RayCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.NarrowPhaseQuery_CastRayClosest( + this, + in ray, + rayCastSettings, + out result, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ) != 0; + + /// + /// + /// Check if inPoint is inside any shapes. For this tests all shapes are treated as if they were solid. For + /// a mesh shape, this test will only provide sensible information if the mesh is a closed manifold. For + /// each shape that collides, ioCollector will receive a hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:40 + ///
+ /// void CollidePoint(RVec3Arg inPoint, CollidePointCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollidePoint( + float3 point, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (CollidePointResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.NarrowPhaseQuery_CollidePoint( + this, + point, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collide a shape with the system + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:53 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape with the system + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inCenterOfMassTransform.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Collects every hit into collideshaperesults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollideShape( + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.NarrowPhaseQuery_CollideShape( + this, + shape, + shapeScale, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collide a shape with the system + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:53 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape with the system + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inCenterOfMassTransform.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CollideShapeClosest( + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.NarrowPhaseQuery_CollideShapeClosest( + this, + shape, + shapeScale, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + out result, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ) != 0; + + /// + /// + /// Same as CollideShape, but uses InternalEdgeRemovingCollector to remove internal edges from the collision + /// results (a.k.a. ghost collisions) + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:56 + ///
+ /// void CollideShapeWithInternalEdgeRemoval(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into collideshapewithinternaledgeremovalresults, which you allocate and size. Returns + /// how many were written; totalHits is how many the query found, so a larger span is needed when it exceeds + /// the span's length. + /// + /// + public unsafe uint CollideShapeWithInternalEdgeRemoval( + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.NarrowPhaseQuery_CollideShapeWithInternalEdgeRemoval( + this, + shape, + shapeScale, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Same as CollideShape, but uses InternalEdgeRemovingCollector to remove internal edges from the collision + /// results (a.k.a. ghost collisions) + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:56 + ///
+ /// void CollideShapeWithInternalEdgeRemoval(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CollideShapeWithInternalEdgeRemovalClosest( + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.NarrowPhaseQuery_CollideShapeWithInternalEdgeRemovalClosest( + this, + shape, + shapeScale, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + out result, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ) != 0; + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:67 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Collects every hit into castshaperesults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastShape( + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + Span results, + out uint totalHits, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) + { + fixed (ShapeCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.NarrowPhaseQuery_CastShape( + this, + in shapeCast, + shapeCastSettings, + baseOffset, + results_fixed, + (uint)results.Length, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:67 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastShapeClosest( + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.NarrowPhaseQuery_CastShapeClosest( + this, + in shapeCast, + shapeCastSettings, + baseOffset, + out result, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ) != 0; + + /// + /// + /// Collect all leaf transformed shapes that fall inside world space box inBox + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:70 + ///
+ /// void CollectTransformedShapes(const AABox &inBox, TransformedShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Returns every shape the query collected as an owned buffer of TransformedShape: Dispose it when done. It + /// holds a reference to each shape, so the handles it hands out stay valid until then even if the bodies go + /// - but they are borrowed from the buffer, so never Dispose one. + /// + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + BroadPhaseLayerFilter broadPhaseLayerFilter = default, + ObjectLayerFilter objectLayerFilter = default, + BodyFilter bodyFilter = default, + ShapeFilter shapeFilter = default + ) => + new NativeHandleArray( + Jolt.PInvoke.NarrowPhaseQuery_CollectTransformedShapes( + this, + in box, + broadPhaseLayerFilter, + objectLayerFilter, + bodyFilter, + shapeFilter + ) + ); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectLayerFilter.gen.cs new file mode 100644 index 0000000..256ff9c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectLayerFilter.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class for object layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:27 + ///
+ /// class ObjectLayerFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectLayerFilter : IDisposable + { + public static ObjectLayerFilter Create() => Jolt.PInvoke.ObjectLayerFilter_Create(); + + /// + /// + /// Function to filter out object layers when doing collision query test (return true to allow testing + /// against objects with this layer) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:34 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inLayer) const + ///
+ ///
+ public bool ShouldCollide(ushort layer) => Jolt.PInvoke.ObjectLayerFilter_ShouldCollide(this, layer); + + public void Dispose() => Jolt.PInvoke.ObjectLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilter.gen.cs new file mode 100644 index 0000000..1d14528 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilter.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class to test if two objects can collide based on their object layer. Used while finding collision + /// pairs. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:49 + ///
+ /// class ObjectLayerPairFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectLayerPairFilter : IDisposable + { + public static ObjectLayerPairFilter Create() => Jolt.PInvoke.ObjectLayerPairFilter_Create(); + + /// + /// + /// Returns true if two layers can collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:56 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inLayer1, ObjectLayer inLayer2) const + ///
+ ///
+ public bool ShouldCollide(ushort layer1, ushort layer2) => + Jolt.PInvoke.ObjectLayerPairFilter_ShouldCollide(this, layer1, layer2); + + public void Dispose() => Jolt.PInvoke.ObjectLayerPairFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterMask.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterMask.gen.cs new file mode 100644 index 0000000..9634faa --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterMask.gen.cs @@ -0,0 +1,112 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class to test if two objects can collide based on their object layer. Used while finding collision + /// pairs. Uses group bits and mask bits. Two layers can collide if Object1.Group & Object2.Mask is non-zero + /// and Object2.Group & Object1.Mask is non-zero. The behavior is similar to that in e.g. Bullet. This + /// implementation works together with BroadPhaseLayerInterfaceMask and ObjectVsBroadPhaseLayerFilterMask + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:15 + ///
+ /// class ObjectLayerPairFilterMask : public ObjectLayerPairFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectLayerPairFilterMask : IDisposable + { + public static ObjectLayerPairFilterMask Create() => Jolt.PInvoke.ObjectLayerPairFilterMask_Create(); + + /// + /// + /// Construct an ObjectLayer from a group and mask bits + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:25 + ///
+ /// static ObjectLayer sGetObjectLayer(uint32 inGroup, uint32 inMask = cMask) + ///
+ ///
+ public static ushort GetObjectLayer(uint group, uint mask = 255) => + Jolt.PInvoke.ObjectLayerPairFilterMask_GetObjectLayer(group, mask); + + /// + /// + /// Get the group bits from an ObjectLayer + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:33 + ///
+ /// static inline uint32 sGetGroup(ObjectLayer inObjectLayer) + ///
+ ///
+ public static uint GetGroup(ushort objectLayer) => Jolt.PInvoke.ObjectLayerPairFilterMask_GetGroup(objectLayer); + + /// + /// + /// Get the mask bits from an ObjectLayer + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:39 + ///
+ /// static inline uint32 sGetMask(ObjectLayer inObjectLayer) + ///
+ ///
+ public static uint GetMask(ushort objectLayer) => Jolt.PInvoke.ObjectLayerPairFilterMask_GetMask(objectLayer); + + /// + /// + /// Returns true if two layers can collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:45 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inObject1, ObjectLayer inObject2) const override + ///
+ ///
+ public bool ShouldCollide(ushort object1, ushort object2) => + Jolt.PInvoke.ObjectLayerPairFilterMask_ShouldCollide(this, object1, object2); + + /// + /// + /// Number of bits for the group and mask bits + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:21 + ///
+ /// static constexpr uint32 cNumBits = JPH_OBJECT_LAYER_BITS / 2 + ///
+ ///
+ public static uint GetNumBits() => Jolt.PInvoke.ObjectLayerPairFilterMask_GetNumBits(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterMask.h:22 + ///
+ /// static constexpr uint32 cMask = (1 << cNumBits) - 1 + ///
+ ///
+ public static uint GetMask() => Jolt.PInvoke.ObjectLayerPairFilterMask_GetMask_2(); + + public static implicit operator ObjectLayerPairFilter(ObjectLayerPairFilterMask value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.ObjectLayerPairFilterMask_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterTable.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterTable.gen.cs new file mode 100644 index 0000000..0217f6b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectLayerPairFilterTable.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class to test if two objects can collide based on their object layer. Used while finding collision + /// pairs. This implementation uses a table to determine if two layers can collide. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterTable.h:13 + ///
+ /// class ObjectLayerPairFilterTable : public ObjectLayerPairFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectLayerPairFilterTable : IDisposable + { + /// + /// + /// Constructs the table with inNumObjectLayers Layers, initially all layer pairs are disabled + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterTable.h:35 + ///
+ /// explicit ObjectLayerPairFilterTable(uint inNumObjectLayers) + ///
+ ///
+ public static ObjectLayerPairFilterTable Create(uint numObjectLayers) => + Jolt.PInvoke.ObjectLayerPairFilterTable_Create(numObjectLayers); + + /// + /// + /// Get the number of object layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterTable.h:46 + ///
+ /// uint GetNumObjectLayers() const + ///
+ ///
+ public uint GetNumObjectLayers() => Jolt.PInvoke.ObjectLayerPairFilterTable_GetNumObjectLayers(this); + + /// + /// + /// Disable collision between two object layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterTable.h:52 + ///
+ /// void DisableCollision(ObjectLayer inLayer1, ObjectLayer inLayer2) + ///
+ ///
+ public void DisableCollision(ushort layer1, ushort layer2) => + Jolt.PInvoke.ObjectLayerPairFilterTable_DisableCollision(this, layer1, layer2); + + /// + /// + /// Enable collision between two object layers + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterTable.h:59 + ///
+ /// void EnableCollision(ObjectLayer inLayer1, ObjectLayer inLayer2) + ///
+ ///
+ public void EnableCollision(ushort layer1, ushort layer2) => + Jolt.PInvoke.ObjectLayerPairFilterTable_EnableCollision(this, layer1, layer2); + + /// + /// + /// Returns true if two layers can collide + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayerPairFilterTable.h:66 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inObject1, ObjectLayer inObject2) const override + ///
+ ///
+ public bool ShouldCollide(ushort object1, ushort object2) => + Jolt.PInvoke.ObjectLayerPairFilterTable_ShouldCollide(this, object1, object2); + + public static implicit operator ObjectLayerPairFilter(ObjectLayerPairFilterTable value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.ObjectLayerPairFilterTable_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..afad822 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class to test if an object can collide with a broadphase layer. Used while finding collision pairs. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:79 + ///
+ /// class ObjectVsBroadPhaseLayerFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectVsBroadPhaseLayerFilter : IDisposable + { + public static ObjectVsBroadPhaseLayerFilter Create() => Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_Create(); + + /// + /// + /// Returns true if an object layer should collide with a broadphase layer + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:86 + ///
+ /// virtual bool ShouldCollide(ObjectLayer inLayer1, BroadPhaseLayer inLayer2) const + ///
+ ///
+ public bool ShouldCollide(ushort layer1, byte layer2) => + Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_ShouldCollide(this, layer1, layer2); + + public void Dispose() => Jolt.PInvoke.ObjectVsBroadPhaseLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterMask.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterMask.gen.cs new file mode 100644 index 0000000..bc1407c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterMask.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that determines if an object layer can collide with a broadphase layer. This implementation works + /// together with BroadPhaseLayerInterfaceMask and ObjectLayerPairFilterMask + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterMask.h:13 + ///
+ /// class ObjectVsBroadPhaseLayerFilterMask : public ObjectVsBroadPhaseLayerFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectVsBroadPhaseLayerFilterMask : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterMask.h:19 + ///
+ /// ObjectVsBroadPhaseLayerFilterMask(const BroadPhaseLayerInterfaceMask &inBroadPhaseLayerInterface) + ///
+ ///
+ public static ObjectVsBroadPhaseLayerFilterMask Create(BroadPhaseLayerInterfaceMask broadPhaseLayerInterface) => + Jolt.PInvoke.ObjectVsBroadPhaseLayerFilterMask_Create(broadPhaseLayerInterface); + + /// + public bool ShouldCollide(ushort layer1, byte layer2) => + ((ObjectVsBroadPhaseLayerFilter)this).ShouldCollide(layer1, layer2); + + public static implicit operator ObjectVsBroadPhaseLayerFilter(ObjectVsBroadPhaseLayerFilterMask value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.ObjectVsBroadPhaseLayerFilterMask_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterTable.gen.cs b/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterTable.gen.cs new file mode 100644 index 0000000..67ca563 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ObjectVsBroadPhaseLayerFilterTable.gen.cs @@ -0,0 +1,68 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that determines if an object layer can collide with a broadphase layer. This implementation uses a + /// table and constructs itself from an ObjectLayerPairFilter and a BroadPhaseLayerInterface. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterTable.h:13 + ///
+ /// class ObjectVsBroadPhaseLayerFilterTable : public ObjectVsBroadPhaseLayerFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct ObjectVsBroadPhaseLayerFilterTable : IDisposable + { + /// + /// + /// Construct the table + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterTable.h:31 + ///
+ /// ObjectVsBroadPhaseLayerFilterTable(const BroadPhaseLayerInterface &inBroadPhaseLayerInterface, uint inNumBroadPhaseLayers, const ObjectLayerPairFilter &inObjectLayerPairFilter, uint inNumObjectLayers) + ///
+ ///
+ /// + /// + /// Construct the table + /// @param inBroadPhaseLayerInterface The broad phase layer interface that maps object layers to broad phase layers + /// @param inNumBroadPhaseLayers Number of broad phase layers + /// @param inObjectLayerPairFilter The object layer pair filter that determines which object layers can collide + /// @param inNumObjectLayers Number of object layers + /// + /// + public static ObjectVsBroadPhaseLayerFilterTable Create( + BroadPhaseLayerInterface broadPhaseLayerInterface, + uint numBroadPhaseLayers, + ObjectLayerPairFilter objectLayerPairFilter, + uint numObjectLayers + ) => + Jolt.PInvoke.ObjectVsBroadPhaseLayerFilterTable_Create( + broadPhaseLayerInterface, + numBroadPhaseLayers, + objectLayerPairFilter, + numObjectLayers + ); + + /// + public bool ShouldCollide(ushort layer1, byte layer2) => + ((ObjectVsBroadPhaseLayerFilter)this).ShouldCollide(layer1, layer2); + + public static implicit operator ObjectVsBroadPhaseLayerFilter(ObjectVsBroadPhaseLayerFilterTable value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.ObjectVsBroadPhaseLayerFilterTable_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShape.gen.cs b/Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShape.gen.cs new file mode 100644 index 0000000..8317523 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShape.gen.cs @@ -0,0 +1,357 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This shape will shift the center of mass of a child shape, it can e.g. be used to lower the center of mass + /// of an unstable object like a boat to make it stable + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:35 + ///
+ /// class OffsetCenterOfMassShape final : public DecoratedShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct OffsetCenterOfMassShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:41 + ///
+ /// OffsetCenterOfMassShape() + ///
+ ///
+ public static OffsetCenterOfMassShape Create() => Jolt.PInvoke.OffsetCenterOfMassShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:42 + ///
+ /// OffsetCenterOfMassShape(const OffsetCenterOfMassShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static OffsetCenterOfMassShape Create(OffsetCenterOfMassShapeSettings settings) + { + var _handle = Jolt.PInvoke.OffsetCenterOfMassShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:43 + ///
+ /// OffsetCenterOfMassShape(const Shape *inShape, Vec3Arg inOffset) + ///
+ ///
+ public static OffsetCenterOfMassShape Create(Shape shape, float3 offset) => + Jolt.PInvoke.OffsetCenterOfMassShape_Create_3(shape, offset); + + /// + /// + /// Access the offset that is applied to the center of mass + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:46 + ///
+ /// Vec3 GetOffset() const + ///
+ ///
+ public float3 GetOffset() => Jolt.PInvoke.OffsetCenterOfMassShape_GetOffset(this); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:124 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.OffsetCenterOfMassShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator DecoratedShape(OffsetCenterOfMassShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(OffsetCenterOfMassShape value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Shape GetInnerShape() => ((DecoratedShape)this).GetInnerShape(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShapeSettings.gen.cs new file mode 100644 index 0000000..e1c1cca --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/OffsetCenterOfMassShapeSettings.gen.cs @@ -0,0 +1,141 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs an OffsetCenterOfMassShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:14 + ///
+ /// class OffsetCenterOfMassShapeSettings final : public DecoratedShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct OffsetCenterOfMassShapeSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:20 + ///
+ /// OffsetCenterOfMassShapeSettings() = default + ///
+ ///
+ public static OffsetCenterOfMassShapeSettings Create() => Jolt.PInvoke.OffsetCenterOfMassShapeSettings_Create(); + + /// + /// + /// Construct with shape settings, can be serialized. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:23 + ///
+ /// OffsetCenterOfMassShapeSettings(Vec3Arg inOffset, const ShapeSettings *inShape) + ///
+ ///
+ public static OffsetCenterOfMassShapeSettings Create(float3 offset, ShapeSettings shape) => + Jolt.PInvoke.OffsetCenterOfMassShapeSettings_Create_2(offset, shape); + + /// + /// + /// Variant that uses a concrete shape, which means this object cannot be serialized. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:26 + ///
+ /// OffsetCenterOfMassShapeSettings(Vec3Arg inOffset, const Shape *inShape) + ///
+ ///
+ public static OffsetCenterOfMassShapeSettings Create(float3 offset, Shape shape) => + Jolt.PInvoke.OffsetCenterOfMassShapeSettings_Create_3(offset, shape); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Offset to be applied to the center of mass of the child shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:31 + ///
+ /// Vec3 mOffset + ///
+ ///
+ public float3 GetOffset() => Jolt.PInvoke.OffsetCenterOfMassShapeSettings_GetOffset(this); + + /// + /// + /// Offset to be applied to the center of mass of the child shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h:31 + ///
+ /// Vec3 mOffset + ///
+ ///
+ public void SetOffset(float3 value) => Jolt.PInvoke.OffsetCenterOfMassShapeSettings_SetOffset(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator DecoratedShapeSettings(OffsetCenterOfMassShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(OffsetCenterOfMassShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeSettings GetInnerShape() => ((DecoratedShapeSettings)this).GetInnerShape(); + + /// + public void SetInnerShape(ShapeSettings value) => ((DecoratedShapeSettings)this).SetInnerShape(value); + + /// + public Shape GetInnerShapePtr() => ((DecoratedShapeSettings)this).GetInnerShapePtr(); + + /// + public void SetInnerShapePtr(Shape value) => ((DecoratedShapeSettings)this).SetInnerShapePtr(value); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/OrientedBox.gen.cs b/Brutal.Jolt/Generated/Classes/OrientedBox.gen.cs new file mode 100644 index 0000000..27e919a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/OrientedBox.gen.cs @@ -0,0 +1,146 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Oriented box + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:17 + ///
+ /// class JPH_EXPORT_GCC_BUG_WORKAROUND OrientedBox + ///
+ ///
+ [InteropHandle] + public readonly partial struct OrientedBox : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:23 + ///
+ /// OrientedBox() = default + ///
+ ///
+ public static OrientedBox Create() => Jolt.PInvoke.OrientedBox_Create(); + + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:24 + ///
+ /// OrientedBox(Mat44Arg inOrientation, Vec3Arg inHalfExtents) + ///
+ ///
+ public static OrientedBox Create(in float4x4 orientation, float3 halfExtents) => + Jolt.PInvoke.OrientedBox_Create_2(in orientation, halfExtents); + + /// + /// + /// Construct from axis aligned box and transform. Only works for rotation/translation matrix (no scaling / + /// shearing). + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:27 + ///
+ /// OrientedBox(Mat44Arg inOrientation, const AABox &inBox) + ///
+ ///
+ public static OrientedBox Create(in float4x4 orientation, in AABox box) => + Jolt.PInvoke.OrientedBox_Create_3(in orientation, in box); + + /// + /// + /// Test if oriented box overlaps with axis aligned box each other + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:30 + ///
+ /// bool Overlaps(const AABox &inBox, float inEpsilon = 1.0e-6f) const + ///
+ ///
+ public bool Overlaps(in AABox box, float epsilon = 1E-06f) => + Jolt.PInvoke.OrientedBox_Overlaps(this, in box, epsilon); + + /// + /// + /// Test if two oriented boxes overlap each other + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:33 + ///
+ /// bool Overlaps(const OrientedBox &inBox, float inEpsilon = 1.0e-6f) const + ///
+ ///
+ public bool Overlaps(OrientedBox box, float epsilon = 1E-06f) => + Jolt.PInvoke.OrientedBox_Overlaps_2(this, box, epsilon); + + /// + /// + /// Transform that positions and rotates the local space axis aligned box into world space + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:35 + ///
+ /// Mat44 mOrientation + ///
+ ///
+ public float4x4 GetOrientation() => Jolt.PInvoke.OrientedBox_GetOrientation(this); + + /// + /// + /// Transform that positions and rotates the local space axis aligned box into world space + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:35 + ///
+ /// Mat44 mOrientation + ///
+ ///
+ public void SetOrientation(in float4x4 value) => Jolt.PInvoke.OrientedBox_SetOrientation(this, in value); + + /// + /// + /// Half extents (half the size of the edge) of the local space axis aligned box + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:36 + ///
+ /// Vec3 mHalfExtents + ///
+ ///
+ public float3 GetHalfExtents() => Jolt.PInvoke.OrientedBox_GetHalfExtents(this); + + /// + /// + /// Half extents (half the size of the edge) of the local space axis aligned box + /// + /// + /// C++: + /// Jolt/Geometry/OrientedBox.h:36 + ///
+ /// Vec3 mHalfExtents + ///
+ ///
+ public void SetHalfExtents(float3 value) => Jolt.PInvoke.OrientedBox_SetHalfExtents(this, value); + + public void Dispose() => Jolt.PInvoke.OrientedBox_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PathConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/PathConstraint.gen.cs new file mode 100644 index 0000000..1e455ea --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PathConstraint.gen.cs @@ -0,0 +1,364 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Path constraint, used to constrain the degrees of freedom between two bodies to a path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:79 + ///
+ /// class PathConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct PathConstraint : IDisposable + { + /// + /// + /// Construct point constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:85 + ///
+ /// PathConstraint(Body &inBody1, Body &inBody2, const PathConstraintSettings &inSettings) + ///
+ ///
+ public static PathConstraint Create(Body body1, Body body2, PathConstraintSettings settings) => + Jolt.PInvoke.PathConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Update the path for this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:108 + ///
+ /// void SetPath(const PathConstraintPath *inPath, float inPathFraction) + ///
+ ///
+ public void SetPath(PathConstraintPath path, float pathFraction) => + Jolt.PInvoke.PathConstraint_SetPath(this, path, pathFraction); + + /// + /// + /// Access to the current path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:111 + ///
+ /// const PathConstraintPath * GetPath() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PathConstraintPath GetPath() => Jolt.PInvoke.PathConstraint_GetPath(this); + + /// + /// + /// Access to the current fraction along the path e [0, GetPath()->GetMaxPathFraction()] + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:114 + ///
+ /// float GetPathFraction() const + ///
+ ///
+ public float GetPathFraction() => Jolt.PInvoke.PathConstraint_GetPathFraction(this); + + /// + /// + /// Friction control + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:117 + ///
+ /// void SetMaxFrictionForce(float inFrictionForce) + ///
+ ///
+ public void SetMaxFrictionForce(float frictionForce) => + Jolt.PInvoke.PathConstraint_SetMaxFrictionForce(this, frictionForce); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:118 + ///
+ /// float GetMaxFrictionForce() const + ///
+ ///
+ public float GetMaxFrictionForce() => Jolt.PInvoke.PathConstraint_GetMaxFrictionForce(this); + + /// + /// + /// Position motor settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:121 + ///
+ /// MotorSettings & GetPositionMotorSettings() + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetPositionMotorSettings() => Jolt.PInvoke.PathConstraint_GetPositionMotorSettings(this); + + /// + /// + /// Position motor controls (drives body 2 along the path) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:125 + ///
+ /// void SetPositionMotorState(EMotorState inState) + ///
+ ///
+ public void SetPositionMotorState(MotorState state) => + Jolt.PInvoke.PathConstraint_SetPositionMotorState(this, state); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:126 + ///
+ /// EMotorState GetPositionMotorState() const + ///
+ ///
+ public MotorState GetPositionMotorState() => Jolt.PInvoke.PathConstraint_GetPositionMotorState(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:127 + ///
+ /// void SetTargetVelocity(float inVelocity) + ///
+ ///
+ public void SetTargetVelocity(float velocity) => Jolt.PInvoke.PathConstraint_SetTargetVelocity(this, velocity); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:128 + ///
+ /// float GetTargetVelocity() const + ///
+ ///
+ public float GetTargetVelocity() => Jolt.PInvoke.PathConstraint_GetTargetVelocity(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:129 + ///
+ /// void SetTargetPathFraction(float inFraction) + ///
+ ///
+ public void SetTargetPathFraction(float fraction) => + Jolt.PInvoke.PathConstraint_SetTargetPathFraction(this, fraction); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:130 + ///
+ /// float GetTargetPathFraction() const + ///
+ ///
+ public float GetTargetPathFraction() => Jolt.PInvoke.PathConstraint_GetTargetPathFraction(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:133 + ///
+ /// inline Vector<2> GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float2 GetTotalLambdaPosition() => Jolt.PInvoke.PathConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:134 + ///
+ /// inline float GetTotalLambdaPositionLimits() const + ///
+ ///
+ public float GetTotalLambdaPositionLimits() => Jolt.PInvoke.PathConstraint_GetTotalLambdaPositionLimits(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:135 + ///
+ /// inline float GetTotalLambdaMotor() const + ///
+ ///
+ public float GetTotalLambdaMotor() => Jolt.PInvoke.PathConstraint_GetTotalLambdaMotor(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:136 + ///
+ /// inline Vector<2> GetTotalLambdaRotationHinge() const + ///
+ ///
+ public float2 GetTotalLambdaRotationHinge() => Jolt.PInvoke.PathConstraint_GetTotalLambdaRotationHinge(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:137 + ///
+ /// inline Vec3 GetTotalLambdaRotation() const + ///
+ ///
+ public float3 GetTotalLambdaRotation() => Jolt.PInvoke.PathConstraint_GetTotalLambdaRotation(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(PathConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(PathConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PathConstraintPath.gen.cs b/Brutal.Jolt/Generated/Classes/PathConstraintPath.gen.cs new file mode 100644 index 0000000..a357167 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PathConstraintPath.gen.cs @@ -0,0 +1,211 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// The path for a path constraint. It allows attaching two bodies to each other while giving the second body + /// the freedom to move along a path relative to the first. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:20 + ///
+ /// class PathConstraintPath : public SerializableObject, public RefTarget<PathConstraintPath> + ///
+ ///
+ [InteropHandle] + public readonly partial struct PathConstraintPath : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:22 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.PathConstraintPath_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:22 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.PathConstraintPath_CastTo(this, rtti); + + /// + /// + /// Gets the max fraction along the path. I.e. sort of the length of the path. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:31 + ///
+ /// virtual float GetPathMaxFraction() const = 0 + ///
+ ///
+ public float GetPathMaxFraction() => Jolt.PInvoke.PathConstraintPath_GetPathMaxFraction(this); + + /// + /// + /// Get the globally closest point on the curve (Could be slow!) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:37 + ///
+ /// virtual float GetClosestPoint(Vec3Arg inPosition, float inFractionHint) const = 0 + ///
+ ///
+ /// + /// + /// Get the globally closest point on the curve (Could be slow!) + /// @param inPosition Position to find closest point for + /// @param inFractionHint Last known fraction along the path (can be used to speed up the search) + /// @return Fraction of closest point along the path + /// + /// + public float GetClosestPoint(float3 position, float fractionHint) => + Jolt.PInvoke.PathConstraintPath_GetClosestPoint(this, position, fractionHint); + + /// + /// + /// Given the fraction along the path, get the point, tangent and normal. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:45 + ///
+ /// virtual void GetPointOnPath(float inFraction, Vec3 &outPathPosition, Vec3 &outPathTangent, Vec3 &outPathNormal, Vec3 &outPathBinormal) const = 0 + ///
+ ///
+ /// + /// + /// Given the fraction along the path, get the point, tangent and normal. + /// @param inFraction Fraction along the path [0, GetPathMaxFraction()]. + /// @param outPathPosition Returns the closest position to inSearchPosition on the path. + /// @param outPathTangent Returns the tangent to the path at outPathPosition (the vector that follows the direction of the path) + /// @param outPathNormal Return the normal to the path at outPathPosition (a vector that's perpendicular to outPathTangent) + /// @param outPathBinormal Returns the binormal to the path at outPathPosition (a vector so that normal cross tangent = binormal) + /// + /// + public void GetPointOnPath( + float fraction, + out float3 pathPosition, + out float3 pathTangent, + out float3 pathNormal, + out float3 pathBinormal + ) => + Jolt.PInvoke.PathConstraintPath_GetPointOnPath( + this, + fraction, + out pathPosition, + out pathTangent, + out pathNormal, + out pathBinormal + ); + + /// + /// + /// If the path is looping or not. If a path is looping, the first and last point are automatically + /// connected to each other. They should not be the same points. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:48 + ///
+ /// void SetIsLooping(bool inIsLooping) + ///
+ ///
+ public void SetIsLooping(bool isLooping) => Jolt.PInvoke.PathConstraintPath_SetIsLooping(this, isLooping); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:49 + ///
+ /// bool IsLooping() const + ///
+ ///
+ public bool IsLooping() => Jolt.PInvoke.PathConstraintPath_IsLooping(this); + + /// + /// + /// Draw the path relative to inBaseTransform. Used for debug purposes. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:53 + ///
+ /// void DrawPath(DebugRenderer *inRenderer, RMat44Arg inBaseTransform) const + ///
+ ///
+ public void DrawPath(DebugRenderer renderer, in float4x4 baseTransform) => + Jolt.PInvoke.PathConstraintPath_DrawPath(this, renderer, in baseTransform); + + /// + /// + /// Saves the contents of the path in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:57 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PathConstraintPath_SaveBinaryState(this, stream); + + /// + /// + /// Creates a Shape of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:60 + ///
+ /// static PathResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static PathConstraintPath RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.PathConstraintPath_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + public void AddRef() => Jolt.PInvoke.PathConstraintPath_AddRef(this); + + public void Release() => Jolt.PInvoke.PathConstraintPath_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.PathConstraintPath_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/PathConstraintPathHermite.gen.cs b/Brutal.Jolt/Generated/Classes/PathConstraintPathHermite.gen.cs new file mode 100644 index 0000000..11c7c33 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PathConstraintPathHermite.gen.cs @@ -0,0 +1,153 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A path that follows a Hermite spline + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPathHermite.h:12 + ///
+ /// class PathConstraintPathHermite final : public PathConstraintPath + ///
+ ///
+ [InteropHandle] + public readonly partial struct PathConstraintPathHermite : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPathHermite.h:32 + ///
+ /// struct Point + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct Point + { + /// + /// + /// Position on the path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPathHermite.h:36 + ///
+ /// Vec3 mPosition + ///
+ ///
+ [FieldOffset(0)] + public float3 Position; + + /// + /// + /// Tangent of the path, does not need to be normalized (in the direction of the path) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPathHermite.h:37 + ///
+ /// Vec3 mTangent + ///
+ ///
+ [FieldOffset(16)] + public float3 Tangent; + + /// + /// + /// Normal of the path (together with the tangent along the curve this forms a basis for the constraint) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPathHermite.h:38 + ///
+ /// Vec3 mNormal + ///
+ ///
+ [FieldOffset(32)] + public float3 Normal; + } + + public static PathConstraintPathHermite Create() => Jolt.PInvoke.PathConstraintPathHermite_Create(); + + /// + public RTTI GetRTTI() => ((PathConstraintPath)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((PathConstraintPath)this).CastTo(rtti); + + /// + public float GetPathMaxFraction() => ((PathConstraintPath)this).GetPathMaxFraction(); + + /// + public float GetClosestPoint(float3 position, float fractionHint) => + ((PathConstraintPath)this).GetClosestPoint(position, fractionHint); + + /// + public void GetPointOnPath( + float fraction, + out float3 pathPosition, + out float3 pathTangent, + out float3 pathNormal, + out float3 pathBinormal + ) => + ((PathConstraintPath)this).GetPointOnPath( + fraction, + out pathPosition, + out pathTangent, + out pathNormal, + out pathBinormal + ); + + /// + /// + /// Adds a point to the path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPathHermite.h:27 + ///
+ /// void AddPoint(Vec3Arg inPosition, Vec3Arg inTangent, Vec3Arg inNormal) + ///
+ ///
+ public void AddPoint(float3 position, float3 tangent, float3 normal) => + Jolt.PInvoke.PathConstraintPathHermite_AddPoint(this, position, tangent, normal); + + /// + public void SaveBinaryState(StreamOut stream) => ((PathConstraintPath)this).SaveBinaryState(stream); + + public void AddRef() => ((PathConstraintPath)this).AddRef(); + + public void Release() => ((PathConstraintPath)this).Release(); + + public uint GetRefCount() => ((PathConstraintPath)this).GetRefCount(); + + public static implicit operator PathConstraintPath(PathConstraintPathHermite value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetIsLooping(bool isLooping) => ((PathConstraintPath)this).SetIsLooping(isLooping); + + /// + public bool IsLooping() => ((PathConstraintPath)this).IsLooping(); + + /// + public void DrawPath(DebugRenderer renderer, in float4x4 baseTransform) => + ((PathConstraintPath)this).DrawPath(renderer, in baseTransform); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PathConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/PathConstraintSettings.gen.cs new file mode 100644 index 0000000..1ed7ff9 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PathConstraintSettings.gen.cs @@ -0,0 +1,316 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Path constraint settings, used to constrain the degrees of freedom between two bodies to a path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:41 + ///
+ /// class PathConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ /// + /// + /// Path constraint settings, used to constrain the degrees of freedom between two bodies to a path + /// + /// The requirements of the path are that: + /// * Tangent, normal and bi-normal form an orthonormal basis with: tangent cross bi-normal = normal + /// * The path points along the tangent vector + /// * The path is continuous so doesn't contain any sharp corners + /// + /// The reason for all this is that the constraint acts like a slider constraint with the sliding axis being the tangent vector (the assumption here is that delta time will be small enough so that the path is linear for that delta time). + /// + /// + [InteropHandle] + public readonly partial struct PathConstraintSettings : IDisposable + { + public static PathConstraintSettings Create() => Jolt.PInvoke.PathConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// The path that constrains the two bodies + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:53 + ///
+ /// RefConst<PathConstraintPath> mPath + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PathConstraintPath GetPath() => Jolt.PInvoke.PathConstraintSettings_GetPath(this); + + /// + /// + /// The path that constrains the two bodies + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:53 + ///
+ /// RefConst<PathConstraintPath> mPath + ///
+ ///
+ public void SetPath(PathConstraintPath value) => Jolt.PInvoke.PathConstraintSettings_SetPath(this, value); + + /// + /// + /// The position of the path start relative to world transform of body 1 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:56 + ///
+ /// Vec3 mPathPosition = Vec3::sZero() + ///
+ ///
+ public float3 GetPathPosition() => Jolt.PInvoke.PathConstraintSettings_GetPathPosition(this); + + /// + /// + /// The position of the path start relative to world transform of body 1 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:56 + ///
+ /// Vec3 mPathPosition = Vec3::sZero() + ///
+ ///
+ public void SetPathPosition(float3 value) => Jolt.PInvoke.PathConstraintSettings_SetPathPosition(this, value); + + /// + /// + /// The rotation of the path start relative to world transform of body 1 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:59 + ///
+ /// Quat mPathRotation = Quat::sIdentity() + ///
+ ///
+ public floatQuat GetPathRotation() => Jolt.PInvoke.PathConstraintSettings_GetPathRotation(this); + + /// + /// + /// The rotation of the path start relative to world transform of body 1 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:59 + ///
+ /// Quat mPathRotation = Quat::sIdentity() + ///
+ ///
+ public void SetPathRotation(floatQuat value) => + Jolt.PInvoke.PathConstraintSettings_SetPathRotation(this, value); + + /// + /// + /// The fraction along the path that corresponds to the initial position of body 2. Usually this is 0, the + /// beginning of the path. But if you want to start an object halfway the path you can calculate this with + /// mPath->GetClosestPoint(point on path to attach body to). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:62 + ///
+ /// float mPathFraction = 0.0f + ///
+ ///
+ public float GetPathFraction() => Jolt.PInvoke.PathConstraintSettings_GetPathFraction(this); + + /// + /// + /// The fraction along the path that corresponds to the initial position of body 2. Usually this is 0, the + /// beginning of the path. But if you want to start an object halfway the path you can calculate this with + /// mPath->GetClosestPoint(point on path to attach body to). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:62 + ///
+ /// float mPathFraction = 0.0f + ///
+ ///
+ public void SetPathFraction(float value) => Jolt.PInvoke.PathConstraintSettings_SetPathFraction(this, value); + + /// + /// + /// Maximum amount of friction force to apply (N) when not driven by a motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:65 + ///
+ /// float mMaxFrictionForce = 0.0f + ///
+ ///
+ public float GetMaxFrictionForce() => Jolt.PInvoke.PathConstraintSettings_GetMaxFrictionForce(this); + + /// + /// + /// Maximum amount of friction force to apply (N) when not driven by a motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:65 + ///
+ /// float mMaxFrictionForce = 0.0f + ///
+ ///
+ public void SetMaxFrictionForce(float value) => + Jolt.PInvoke.PathConstraintSettings_SetMaxFrictionForce(this, value); + + /// + /// + /// In case the constraint is powered, this determines the motor settings along the path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:68 + ///
+ /// MotorSettings mPositionMotorSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MotorSettings GetPositionMotorSettings() => + Jolt.PInvoke.PathConstraintSettings_GetPositionMotorSettings(this); + + /// + /// + /// In case the constraint is powered, this determines the motor settings along the path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:68 + ///
+ /// MotorSettings mPositionMotorSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetPositionMotorSettings(MotorSettings value) => + Jolt.PInvoke.PathConstraintSettings_SetPositionMotorSettings(this, value); + + /// + /// + /// How to constrain the rotation of the body to the path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:71 + ///
+ /// EPathRotationConstraintType mRotationConstraintType = EPathRotationConstraintType::Free + ///
+ ///
+ public PathRotationConstraintType GetRotationConstraintType() => + Jolt.PInvoke.PathConstraintSettings_GetRotationConstraintType(this); + + /// + /// + /// How to constrain the rotation of the body to the path + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:71 + ///
+ /// EPathRotationConstraintType mRotationConstraintType = EPathRotationConstraintType::Free + ///
+ ///
+ public void SetRotationConstraintType(PathRotationConstraintType value) => + Jolt.PInvoke.PathConstraintSettings_SetRotationConstraintType(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(PathConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(PathConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsLock.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsLock.gen.cs new file mode 100644 index 0000000..c26de64 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsLock.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Helpers to safely lock the different mutexes that are part of the physics system while preventing deadlock + /// Class that keeps track per thread which lock are taken and if the order of locking is correct + /// + /// + /// C++: + /// Jolt/Physics/PhysicsLock.h:32 + ///
+ /// class PhysicsLock + ///
+ ///
+ [InteropHandle] + public readonly partial struct PhysicsLock : IDisposable + { + public static PhysicsLock Create() => Jolt.PInvoke.PhysicsLock_Create(); + + public void Dispose() => Jolt.PInvoke.PhysicsLock_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsMaterial.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsMaterial.gen.cs new file mode 100644 index 0000000..cfb5ddb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsMaterial.gen.cs @@ -0,0 +1,237 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This structure describes the surface of (part of) a shape. You should inherit from it to define additional + /// information that is interesting for the simulation. The 2 materials involved in a contact could be used to + /// decide which sound or particle effects to play. + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:22 + ///
+ /// class PhysicsMaterial : public SerializableObject, public RefTarget<PhysicsMaterial> + ///
+ ///
+ /// + /// + /// This structure describes the surface of (part of) a shape. You should inherit from it to define additional + /// information that is interesting for the simulation. The 2 materials involved in a contact could be used + /// to decide which sound or particle effects to play. + /// + /// If you inherit from this material, don't forget to create a suitable default material in sDefault + /// + /// + [InteropHandle] + public readonly partial struct PhysicsMaterial : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:28 + ///
+ /// PhysicsMaterial() = default + ///
+ ///
+ public static PhysicsMaterial Create() => Jolt.PInvoke.PhysicsMaterial_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:24 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.PhysicsMaterial_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:24 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.PhysicsMaterial_CastTo(this, rtti); + + /// + /// + /// Properties + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:35 + ///
+ /// virtual const char * GetDebugName() const + ///
+ ///
+ public unsafe RefString8 GetDebugName() => (Ptr)Jolt.PInvoke.PhysicsMaterial_GetDebugName(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:36 + ///
+ /// virtual Color GetDebugColor() const + ///
+ ///
+ public uint GetDebugColor() => Jolt.PInvoke.PhysicsMaterial_GetDebugColor(this); + + /// + /// + /// Saves the contents of the material in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:39 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PhysicsMaterial_SaveBinaryState(this, stream); + + /// + /// + /// Creates a PhysicsMaterial of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:44 + ///
+ /// static PhysicsMaterialResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static PhysicsMaterial RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.PhysicsMaterial_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Serialises this object (and everything it references) into buffer as a Jolt object stream, and returns + /// the total size of that stream. Nothing is written past the end of the buffer, so a return value larger + /// than buffer.Length means the buffer was too small and the call should be retried with one that size - + /// passing an empty span is how you ask for the size. Each call serialises the object's current state + /// independently and retains nothing after it returns. If the object grows between the size query and the + /// fill, use the fill's returned size to retry with a larger buffer. Text streams are human-readable and + /// portable; binary ones are smaller. Read one back with PhysicsMaterial.RestoreFromObjectStream. Throws + /// JoltException with Jolt's error message when the object can't be written, and + /// ArgumentOutOfRangeException when streamType is neither Text nor Binary. + /// + /// + public unsafe ByteSize SaveObjectStream(Span buffer, ObjectStreamType streamType = ObjectStreamType.Text) + { + fixed (byte* buffer_fixed = buffer) + { + if (streamType is not (ObjectStreamType.Text or ObjectStreamType.Binary)) + throw new ArgumentOutOfRangeException( + nameof(streamType), + streamType, + "Not an object stream format." + ); + var _size = Jolt.PInvoke.PhysicsMaterial_SaveObjectStream( + this, + buffer_fixed, + (nuint)buffer.Length, + streamType + ); + if (_size == 0) + throw JoltException.FromLastError(); + return (ByteSize)_size; + } + } + + /// + /// + /// Reads back an object stream written by SaveObjectStream (or by Jolt's own tools - the .tof and .bof + /// asset files), in either the text or the binary format: the stream's header says which. The factory has + /// to be up and RegisterTypes() called first, since class names are resolved through it. A stream that + /// isn't an object stream, is a different version, or holds a different type throws JoltException with + /// Jolt's error message. Truncation is NOT reliably caught: Jolt's reader treats running out of data as a + /// normal end of stream, so a stream cut off after the main object was read comes back as an object whose + /// unresolved references were silently set to null - code reading untrusted input has to validate what it + /// got. The returned handle is yours - it carries its own reference, so Dispose it once when you are done + /// with it. + /// + /// + public static unsafe PhysicsMaterial RestoreFromObjectStream(ReadOnlySpan data) + { + fixed (byte* data_fixed = data) + { + var _handle = Jolt.PInvoke.PhysicsMaterial_RestoreFromObjectStream(data_fixed, (nuint)data.Length); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + } + + /// + /// + /// Default material that is used when a shape has no materials defined + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:32 + ///
+ /// static RefConst<PhysicsMaterial> sDefault + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public static PhysicsMaterial GetDefault() => Jolt.PInvoke.PhysicsMaterial_GetDefault(); + + /// + /// + /// Default material that is used when a shape has no materials defined + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:32 + ///
+ /// static RefConst<PhysicsMaterial> sDefault + ///
+ ///
+ public static void SetDefault(PhysicsMaterial value) => Jolt.PInvoke.PhysicsMaterial_SetDefault(value); + + public void AddRef() => Jolt.PInvoke.PhysicsMaterial_AddRef(this); + + public void Release() => Jolt.PInvoke.PhysicsMaterial_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.PhysicsMaterial_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsMaterialSimple.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsMaterialSimple.gen.cs new file mode 100644 index 0000000..0d4fc5f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsMaterialSimple.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Sample implementation of PhysicsMaterial that just holds the needed properties directly + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterialSimple.h:12 + ///
+ /// class PhysicsMaterialSimple : public PhysicsMaterial + ///
+ ///
+ [InteropHandle] + public readonly partial struct PhysicsMaterialSimple : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterialSimple.h:18 + ///
+ /// PhysicsMaterialSimple() = default + ///
+ ///
+ public static PhysicsMaterialSimple Create() => Jolt.PInvoke.PhysicsMaterialSimple_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterialSimple.h:19 + ///
+ /// PhysicsMaterialSimple(const string_view &inName, ColorArg inColor) + ///
+ ///
+ public static unsafe PhysicsMaterialSimple Create(RefString8 name, uint color) + { + fixed (byte* name_fixed = name) + { + return Jolt.PInvoke.PhysicsMaterialSimple_Create_2(name_fixed, color); + } + } + + /// + public RTTI GetRTTI() => ((PhysicsMaterial)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((PhysicsMaterial)this).CastTo(rtti); + + /// + public unsafe RefString8 GetDebugName() => ((PhysicsMaterial)this).GetDebugName(); + + /// + public uint GetDebugColor() => ((PhysicsMaterial)this).GetDebugColor(); + + /// + public void SaveBinaryState(StreamOut stream) => ((PhysicsMaterial)this).SaveBinaryState(stream); + + public void AddRef() => ((PhysicsMaterial)this).AddRef(); + + public void Release() => ((PhysicsMaterial)this).Release(); + + public uint GetRefCount() => ((PhysicsMaterial)this).GetRefCount(); + + public static implicit operator PhysicsMaterial(PhysicsMaterialSimple value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public unsafe ByteSize SaveObjectStream( + Span buffer, + ObjectStreamType streamType = ObjectStreamType.Text + ) => ((PhysicsMaterial)this).SaveObjectStream(buffer, streamType); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsScene.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsScene.gen.cs new file mode 100644 index 0000000..3bad727 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsScene.gen.cs @@ -0,0 +1,418 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Contains the creation settings of a set of bodies + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:17 + ///
+ /// class PhysicsScene : public RefTarget<PhysicsScene> + ///
+ ///
+ [InteropHandle] + public readonly partial struct PhysicsScene : IDisposable + { + /// + /// + /// A constraint and how it is connected to the bodies in the scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:45 + ///
+ /// class ConnectedConstraint + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct ConnectedConstraint + { + /// + /// + /// Constraint settings + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:53 + ///
+ /// RefConst<TwoBodyConstraintSettings> mSettings + ///
+ ///
+ [FieldOffset(0)] + public TwoBodyConstraintSettings Settings; + + /// + /// + /// Index of first body (in mBodies) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:54 + ///
+ /// uint32 mBody1 + ///
+ ///
+ [FieldOffset(8)] + public uint Body1; + + /// + /// + /// Index of second body (in mBodies) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:55 + ///
+ /// uint32 mBody2 + ///
+ ///
+ [FieldOffset(12)] + public uint Body2; + } + + public static PhysicsScene Create() => Jolt.PInvoke.PhysicsScene_Create(); + + /// + /// + /// Add a body to the scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:23 + ///
+ /// void AddBody(const BodyCreationSettings &inBody) + ///
+ ///
+ public void AddBody(BodyCreationSettings body) => Jolt.PInvoke.PhysicsScene_AddBody(this, body); + + /// + /// + /// Add a constraint to the scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:32 + ///
+ /// void AddConstraint(const TwoBodyConstraintSettings *inConstraint, uint32 inBody1, uint32 inBody2) + ///
+ ///
+ /// + /// + /// Add a constraint to the scene + /// @param inConstraint Constraint settings + /// @param inBody1 Index in the bodies list of first body to attach constraint to + /// @param inBody2 Index in the bodies list of the second body to attach constraint to + /// + /// + public void AddConstraint(TwoBodyConstraintSettings constraint, uint body1, uint body2) => + Jolt.PInvoke.PhysicsScene_AddConstraint(this, constraint, body1, body2); + + /// + /// + /// Add a soft body to the scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:35 + ///
+ /// void AddSoftBody(const SoftBodyCreationSettings &inSoftBody) + ///
+ ///
+ public void AddSoftBody(SoftBodyCreationSettings softBody) => + Jolt.PInvoke.PhysicsScene_AddSoftBody(this, softBody); + + /// + /// + /// Get number of bodies in this scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:38 + ///
+ /// size_t GetNumBodies() const + ///
+ ///
+ public ElementCount GetNumBodies() => (ElementCount)Jolt.PInvoke.PhysicsScene_GetNumBodies(this); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:42 + ///
+ /// Array<BodyCreationSettings> & GetBodies() + ///
+ ///
+ /// + /// + /// The view is the container's own storage, not a copy: each handle it hands out points straight at the + /// element inside the owner, so writing through one edits the object that owns it. The handles are borrowed + /// - never Dispose one. The view is only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public NativeHandleSpan GetBodies() + { + Jolt.PInvoke.PhysicsScene_GetBodies(this, out var _outResult); + return new NativeHandleSpan(_outResult); + } + + /// + /// + /// Get number of constraints in this scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:59 + ///
+ /// size_t GetNumConstraints() const + ///
+ ///
+ public ElementCount GetNumConstraints() => (ElementCount)Jolt.PInvoke.PhysicsScene_GetNumConstraints(this); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:63 + ///
+ /// Array<ConnectedConstraint> & GetConstraints() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetConstraints() + { + Jolt.PInvoke.PhysicsScene_GetConstraints(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// Get number of bodies in this scene + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:66 + ///
+ /// size_t GetNumSoftBodies() const + ///
+ ///
+ public nuint GetNumSoftBodies() => Jolt.PInvoke.PhysicsScene_GetNumSoftBodies(this); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:70 + ///
+ /// Array<SoftBodyCreationSettings> & GetSoftBodies() + ///
+ ///
+ /// + /// + /// The view is the container's own storage, not a copy: each handle it hands out points straight at the + /// element inside the owner, so writing through one edits the object that owns it. The handles are borrowed + /// - never Dispose one. The view is only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public NativeHandleSpan GetSoftBodies() + { + Jolt.PInvoke.PhysicsScene_GetSoftBodies(this, out var _outResult); + return new NativeHandleSpan(_outResult); + } + + /// + /// + /// Instantiate all bodies, returns false if not all bodies could be created + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:73 + ///
+ /// bool CreateBodies(PhysicsSystem *inSystem) const + ///
+ ///
+ public bool CreateBodies(PhysicsSystem system) => Jolt.PInvoke.PhysicsScene_CreateBodies(this, system); + + /// + /// + /// Go through all body creation settings and fix shapes that are scaled incorrectly (note this will change + /// the scene a bit). + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:77 + ///
+ /// bool FixInvalidScales() + ///
+ ///
+ /// + /// + /// Go through all body creation settings and fix shapes that are scaled incorrectly (note this will change the scene a bit). + /// @return False when not all scales could be fixed. + /// + /// + public bool FixInvalidScales() => Jolt.PInvoke.PhysicsScene_FixInvalidScales(this); + + /// + /// + /// Saves the state of this object in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:83 + ///
+ /// void SaveBinaryState(StreamOut &inStream, bool inSaveShapes, bool inSaveGroupFilter) const + ///
+ ///
+ /// + /// + /// Saves the state of this object in binary form to inStream. + /// @param inStream The stream to save the state to + /// @param inSaveShapes If the shapes should be saved as well (these could be shared between physics scenes, in which case the calling application may want to write custom code to restore them) + /// @param inSaveGroupFilter If the group filter should be saved as well (these could be shared) + /// + /// + public void SaveBinaryState(StreamOut stream, bool saveShapes, bool saveGroupFilter) => + Jolt.PInvoke.PhysicsScene_SaveBinaryState(this, stream, saveShapes, saveGroupFilter); + + /// + /// + /// Restore a saved scene from inStream + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:88 + ///
+ /// static PhysicsSceneResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static PhysicsScene RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.PhysicsScene_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// For debugging purposes: Construct a scene from the current state of the physics system + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:91 + ///
+ /// void FromPhysicsSystem(const PhysicsSystem *inSystem) + ///
+ ///
+ public void FromPhysicsSystem(PhysicsSystem system) => + Jolt.PInvoke.PhysicsScene_FromPhysicsSystem(this, system); + + /// + /// + /// Serialises this object (and everything it references) into buffer as a Jolt object stream, and returns + /// the total size of that stream. Nothing is written past the end of the buffer, so a return value larger + /// than buffer.Length means the buffer was too small and the call should be retried with one that size - + /// passing an empty span is how you ask for the size. Each call serialises the object's current state + /// independently and retains nothing after it returns. If the object grows between the size query and the + /// fill, use the fill's returned size to retry with a larger buffer. Text streams are human-readable and + /// portable; binary ones are smaller. Read one back with PhysicsScene.RestoreFromObjectStream. Throws + /// JoltException with Jolt's error message when the object can't be written, and + /// ArgumentOutOfRangeException when streamType is neither Text nor Binary. + /// + /// + public unsafe ByteSize SaveObjectStream(Span buffer, ObjectStreamType streamType = ObjectStreamType.Text) + { + fixed (byte* buffer_fixed = buffer) + { + if (streamType is not (ObjectStreamType.Text or ObjectStreamType.Binary)) + throw new ArgumentOutOfRangeException( + nameof(streamType), + streamType, + "Not an object stream format." + ); + var _size = Jolt.PInvoke.PhysicsScene_SaveObjectStream( + this, + buffer_fixed, + (nuint)buffer.Length, + streamType + ); + if (_size == 0) + throw JoltException.FromLastError(); + return (ByteSize)_size; + } + } + + /// + /// + /// Reads back an object stream written by SaveObjectStream (or by Jolt's own tools - the .tof and .bof + /// asset files), in either the text or the binary format: the stream's header says which. The factory has + /// to be up and RegisterTypes() called first, since class names are resolved through it. A stream that + /// isn't an object stream, is a different version, or holds a different type throws JoltException with + /// Jolt's error message. Truncation is NOT reliably caught: Jolt's reader treats running out of data as a + /// normal end of stream, so a stream cut off after the main object was read comes back as an object whose + /// unresolved references were silently set to null - code reading untrusted input has to validate what it + /// got. The returned handle is yours - it carries its own reference, so Dispose it once when you are done + /// with it. + /// + /// + public static unsafe PhysicsScene RestoreFromObjectStream(ReadOnlySpan data) + { + fixed (byte* data_fixed = data) + { + var _handle = Jolt.PInvoke.PhysicsScene_RestoreFromObjectStream(data_fixed, (nuint)data.Length); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + } + + /// + /// + /// Body constant to use to indicate that the constraint is attached to the fixed world + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:26 + ///
+ /// static constexpr uint32 cFixedToWorld = 0xffffffff + ///
+ ///
+ public static uint GetFixedToWorld() => Jolt.PInvoke.PhysicsScene_GetFixedToWorld(); + + public void AddRef() => Jolt.PInvoke.PhysicsScene_AddRef(this); + + public void Release() => Jolt.PInvoke.PhysicsScene_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.PhysicsScene_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsStepListener.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsStepListener.gen.cs new file mode 100644 index 0000000..3998ae3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsStepListener.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A listener class that receives a callback before every physics simulation step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:22 + ///
+ /// class PhysicsStepListener + ///
+ ///
+ [InteropHandle] + public readonly partial struct PhysicsStepListener + { + /// + /// + /// Called before every simulation step (received inCollisionSteps times for every + /// PhysicsSystem::Update(...) call) This is called while all body and constraint mutexes are locked. You + /// can read/write bodies and constraints but not add/remove them. Multiple listeners can be executed in + /// parallel and it is the responsibility of the listener to avoid race conditions. The best way to do this + /// is to have each step listener operate on a subset of the bodies and constraints and making sure that + /// these bodies and constraints are not touched by any other step listener. Note that this function is not + /// called if there aren't any active bodies or when the physics system is updated with 0 delta time. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:34 + ///
+ /// virtual void OnStep(const PhysicsStepListenerContext &inContext) = 0 + ///
+ ///
+ public void OnStep(PhysicsStepListenerContext context) => + Jolt.PInvoke.PhysicsStepListener_OnStep(this, context); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsStepListenerContext.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsStepListenerContext.gen.cs new file mode 100644 index 0000000..f372bfd --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsStepListenerContext.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Context information for the step listener + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:12 + ///
+ /// class PhysicsStepListenerContext + ///
+ ///
+ [InteropHandle] + public readonly partial struct PhysicsStepListenerContext : IDisposable + { + public static PhysicsStepListenerContext Create() => Jolt.PInvoke.PhysicsStepListenerContext_Create(); + + /// + /// + /// Delta time of the current step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:15 + ///
+ /// float mDeltaTime + ///
+ ///
+ public float GetDeltaTime() => Jolt.PInvoke.PhysicsStepListenerContext_GetDeltaTime(this); + + /// + /// + /// Delta time of the current step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:15 + ///
+ /// float mDeltaTime + ///
+ ///
+ public void SetDeltaTime(float value) => Jolt.PInvoke.PhysicsStepListenerContext_SetDeltaTime(this, value); + + /// + /// + /// True if this is the first step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:16 + ///
+ /// bool mIsFirstStep + ///
+ ///
+ public bool GetIsFirstStep() => Jolt.PInvoke.PhysicsStepListenerContext_GetIsFirstStep(this); + + /// + /// + /// True if this is the first step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:16 + ///
+ /// bool mIsFirstStep + ///
+ ///
+ public void SetIsFirstStep(bool value) => Jolt.PInvoke.PhysicsStepListenerContext_SetIsFirstStep(this, value); + + /// + /// + /// True if this is the last step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:17 + ///
+ /// bool mIsLastStep + ///
+ ///
+ public bool GetIsLastStep() => Jolt.PInvoke.PhysicsStepListenerContext_GetIsLastStep(this); + + /// + /// + /// True if this is the last step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:17 + ///
+ /// bool mIsLastStep + ///
+ ///
+ public void SetIsLastStep(bool value) => Jolt.PInvoke.PhysicsStepListenerContext_SetIsLastStep(this, value); + + /// + /// + /// The physics system that is being stepped + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:18 + ///
+ /// PhysicsSystem * mPhysicsSystem + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public PhysicsSystem GetPhysicsSystem() => Jolt.PInvoke.PhysicsStepListenerContext_GetPhysicsSystem(this); + + /// + /// + /// The physics system that is being stepped + /// + /// + /// C++: + /// Jolt/Physics/PhysicsStepListener.h:18 + ///
+ /// PhysicsSystem * mPhysicsSystem + ///
+ ///
+ public void SetPhysicsSystem(PhysicsSystem value) => + Jolt.PInvoke.PhysicsStepListenerContext_SetPhysicsSystem(this, value); + + public void Dispose() => Jolt.PInvoke.PhysicsStepListenerContext_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsSystem.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsSystem.gen.cs new file mode 100644 index 0000000..745e11e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsSystem.gen.cs @@ -0,0 +1,1208 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// The main class for the physics system. It contains all rigid bodies and simulates them. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:29 + ///
+ /// class PhysicsSystem : public NonCopyable + ///
+ ///
+ /// + /// + /// The main class for the physics system. It contains all rigid bodies and simulates them. + /// + /// The main simulation is performed by the Update() call on multiple threads (if the JobSystem is configured to use them). Please refer to the general architecture overview in the Docs folder for more information. + /// + /// + [InteropHandle] + public readonly partial struct PhysicsSystem : IDisposable + { + /// + /// + /// Constructor / Destructor + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:35 + ///
+ /// PhysicsSystem() + ///
+ ///
+ public static PhysicsSystem Create() => Jolt.PInvoke.PhysicsSystem_Create(); + + /// + /// + /// Initialize the system. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:59 + ///
+ /// void Init(uint inMaxBodies, uint inNumBodyMutexes, uint inMaxBodyPairs, uint inMaxContactConstraints, const BroadPhaseLayerInterface &inBroadPhaseLayerInterface, const ObjectVsBroadPhaseLayerFilter &inObjectVsBroadPhaseLayerFilter, const ObjectLayerPairFilter &inObjectLayerPairFilter) + ///
+ ///
+ /// + /// + /// Initialize the system. + /// @param inMaxBodies Maximum number of bodies to support. + /// @param inNumBodyMutexes Number of body mutexes to use. Should be a power of 2 in the range [1, 64], use 0 to auto detect. + /// @param inMaxBodyPairs Maximum amount of body pairs to process (anything else will fall through the world), this number should generally be much higher than the max amount of contact points as there will be lots of bodies close that are not actually touching. + /// @param inMaxContactConstraints Maximum amount of contact constraints to process (anything else will fall through the world). + /// @param inBroadPhaseLayerInterface Information on the mapping of object layers to broad phase layers. Since this is a virtual interface, the instance needs to stay alive during the lifetime of the PhysicsSystem. + /// @param inObjectVsBroadPhaseLayerFilter Filter callback function that is used to determine if an object layer collides with a broad phase layer. Since this is a virtual interface, the instance needs to stay alive during the lifetime of the PhysicsSystem. + /// @param inObjectLayerPairFilter Filter callback function that is used to determine if two object layers collide. Since this is a virtual interface, the instance needs to stay alive during the lifetime of the PhysicsSystem. + /// + /// + public void Init( + uint maxBodies, + uint numBodyMutexes, + uint maxBodyPairs, + uint maxContactConstraints, + BroadPhaseLayerInterface broadPhaseLayerInterface, + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ObjectLayerPairFilter objectLayerPairFilter + ) => + Jolt.PInvoke.PhysicsSystem_Init( + this, + maxBodies, + numBodyMutexes, + maxBodyPairs, + maxContactConstraints, + broadPhaseLayerInterface, + objectVsBroadPhaseLayerFilter, + objectLayerPairFilter + ); + + /// + /// + /// Listener that is notified whenever a body is activated/deactivated + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:62 + ///
+ /// void SetBodyActivationListener(BodyActivationListener *inListener) + ///
+ ///
+ public void SetBodyActivationListener(BodyActivationListener listener) => + Jolt.PInvoke.PhysicsSystem_SetBodyActivationListener(this, listener); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:63 + ///
+ /// BodyActivationListener * GetBodyActivationListener() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyActivationListener GetBodyActivationListener() => + Jolt.PInvoke.PhysicsSystem_GetBodyActivationListener(this); + + /// + /// + /// Listener that is notified whenever a contact point between two bodies is added/updated/removed. You + /// can't change contact listener during PhysicsSystem::Update but it can be changed at any other time. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:67 + ///
+ /// void SetContactListener(ContactListener *inListener) + ///
+ ///
+ public void SetContactListener(ContactListener listener) => + Jolt.PInvoke.PhysicsSystem_SetContactListener(this, listener); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:68 + ///
+ /// ContactListener * GetContactListener() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public ContactListener GetContactListener() => Jolt.PInvoke.PhysicsSystem_GetContactListener(this); + + /// + /// + /// Listener that is notified whenever a contact point between a soft body and another body + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:71 + ///
+ /// void SetSoftBodyContactListener(SoftBodyContactListener *inListener) + ///
+ ///
+ public void SetSoftBodyContactListener(SoftBodyContactListener listener) => + Jolt.PInvoke.PhysicsSystem_SetSoftBodyContactListener(this, listener); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:72 + ///
+ /// SoftBodyContactListener * GetSoftBodyContactListener() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SoftBodyContactListener GetSoftBodyContactListener() => + Jolt.PInvoke.PhysicsSystem_GetSoftBodyContactListener(this); + + /// + /// + /// Set the function that combines the friction of two bodies and returns it Default method is the geometric + /// mean: sqrt(friction1 * friction2). + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:76 + ///
+ /// void SetCombineFriction(ContactConstraintManager::CombineFunction inCombineFriction) + ///
+ ///
+ /// + /// + /// combineFriction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Jolt calls it without a null check, so null is rejected. + /// + /// + public unsafe void SetCombineFriction( + delegate* unmanaged[Cdecl] combineFriction + ) + { + if (combineFriction == null) + throw new ArgumentNullException(nameof(combineFriction)); + Jolt.PInvoke.PhysicsSystem_SetCombineFriction(this, combineFriction); + } + + /// + /// + /// Set the function that combines the restitution of two bodies and returns it Default method is + /// max(restitution1, restitution1) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:81 + ///
+ /// void SetCombineRestitution(ContactConstraintManager::CombineFunction inCombineRestitution) + ///
+ ///
+ /// + /// + /// combineRestitution: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Jolt calls it without a null check, so null is rejected. + /// + /// + public unsafe void SetCombineRestitution( + delegate* unmanaged[Cdecl] combineRestitution + ) + { + if (combineRestitution == null) + throw new ArgumentNullException(nameof(combineRestitution)); + Jolt.PInvoke.PhysicsSystem_SetCombineRestitution(this, combineRestitution); + } + + /// + /// + /// Set/get the shape filter that will be used during simulation. This can be used to exclude shapes within + /// a body from colliding with each other. E.g. if you have a high detail and a low detail collision model, + /// you can attach them to the same body in a StaticCompoundShape and use the ShapeFilter to exclude the + /// high detail collision model when simulating and exclude the low detail collision model when casting + /// rays. Note that in this case you would need to pass the inverse of inShapeFilter to the CastRay + /// function. Pass a nullptr to disable the shape filter. The PhysicsSystem does not own the ShapeFilter, + /// make sure it stays alive during the lifetime of the PhysicsSystem. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:89 + ///
+ /// void SetSimShapeFilter(const SimShapeFilter *inShapeFilter) + ///
+ ///
+ public void SetSimShapeFilter(SimShapeFilter shapeFilter) => + Jolt.PInvoke.PhysicsSystem_SetSimShapeFilter(this, shapeFilter); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:90 + ///
+ /// const SimShapeFilter * GetSimShapeFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SimShapeFilter GetSimShapeFilter() => Jolt.PInvoke.PhysicsSystem_GetSimShapeFilter(this); + + /// + /// + /// Advanced use only: Default function that is used to collide two bodies during simulation. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:108 + ///
+ /// static void sDefaultSimCollideBodyVsBody(const Body &inBody1, const Body &inBody2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, CollideShapeSettings &ioCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Collects every hit into defaultsimcollidebodyvsbodyresults, which you allocate and size. Returns how + /// many were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static unsafe uint DefaultSimCollideBodyVsBody( + Body body1, + Body body2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + CollideShapeSettings collideShapeSettings, + Span results, + out uint totalHits, + ShapeFilter shapeFilter + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.PhysicsSystem_DefaultSimCollideBodyVsBody( + body1, + body2, + in centerOfMassTransform1, + in centerOfMassTransform2, + collideShapeSettings, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Advanced use only: Default function that is used to collide two bodies during simulation. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:108 + ///
+ /// static void sDefaultSimCollideBodyVsBody(const Body &inBody1, const Body &inBody2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, CollideShapeSettings &ioCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public static bool DefaultSimCollideBodyVsBodyClosest( + Body body1, + Body body2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter + ) => + Jolt.PInvoke.PhysicsSystem_DefaultSimCollideBodyVsBodyClosest( + body1, + body2, + in centerOfMassTransform1, + in centerOfMassTransform2, + collideShapeSettings, + out result, + shapeFilter + ) != 0; + + /// + /// + /// Control the main constants of the physics simulation + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:111 + ///
+ /// void SetPhysicsSettings(const PhysicsSettings &inSettings) + ///
+ ///
+ public void SetPhysicsSettings(in PhysicsSettings settings) => + Jolt.PInvoke.PhysicsSystem_SetPhysicsSettings(this, in settings); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:112 + ///
+ /// const PhysicsSettings & GetPhysicsSettings() const + ///
+ ///
+ public PhysicsSettings GetPhysicsSettings() + { + Jolt.PInvoke.PhysicsSystem_GetPhysicsSettings(this, out var _outResult); + return _outResult; + } + + /// + /// + /// Access to the body interface. This interface allows to to create / remove bodies and to change their + /// properties. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:115 + ///
+ /// const BodyInterface & GetBodyInterface() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyInterface GetBodyInterface() => Jolt.PInvoke.PhysicsSystem_GetBodyInterface(this); + + /// + /// + /// Version that does not lock the bodies, use with great care! + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:117 + ///
+ /// const BodyInterface & GetBodyInterfaceNoLock() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyInterface GetBodyInterfaceNoLock() => Jolt.PInvoke.PhysicsSystem_GetBodyInterfaceNoLock(this); + + /// + /// + /// Access to the broadphase interface that allows coarse collision queries + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:121 + ///
+ /// const BroadPhaseQuery & GetBroadPhaseQuery() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BroadPhaseQuery GetBroadPhaseQuery() => Jolt.PInvoke.PhysicsSystem_GetBroadPhaseQuery(this); + + /// + /// + /// Interface that allows fine collision queries against first the broad phase and then the narrow phase. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:124 + ///
+ /// const NarrowPhaseQuery & GetNarrowPhaseQuery() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public NarrowPhaseQuery GetNarrowPhaseQuery() => Jolt.PInvoke.PhysicsSystem_GetNarrowPhaseQuery(this); + + /// + /// + /// Version that does not lock the bodies, use with great care! + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:125 + ///
+ /// const NarrowPhaseQuery & GetNarrowPhaseQueryNoLock() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public NarrowPhaseQuery GetNarrowPhaseQueryNoLock() => + Jolt.PInvoke.PhysicsSystem_GetNarrowPhaseQueryNoLock(this); + + /// + /// + /// Add constraint to the world + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:128 + ///
+ /// void AddConstraint(Constraint *inConstraint) + ///
+ ///
+ public void AddConstraint(Constraint constraint) => Jolt.PInvoke.PhysicsSystem_AddConstraint(this, constraint); + + /// + /// + /// Remove constraint from the world + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:131 + ///
+ /// void RemoveConstraint(Constraint *inConstraint) + ///
+ ///
+ public void RemoveConstraint(Constraint constraint) => + Jolt.PInvoke.PhysicsSystem_RemoveConstraint(this, constraint); + + /// + /// + /// Batch add constraints. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:134 + ///
+ /// void AddConstraints(Constraint **inConstraints, int inNumber) + ///
+ ///
+ /// + /// + /// constraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public unsafe void AddConstraints(Ptr constraints, int number) => + Jolt.PInvoke.PhysicsSystem_AddConstraints(this, constraints, number); + + /// + /// + /// Batch remove constraints. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:137 + ///
+ /// void RemoveConstraints(Constraint **inConstraints, int inNumber) + ///
+ ///
+ /// + /// + /// constraints is a buffer of Constraint handles you allocate and size, read by the call. + /// + /// + public unsafe void RemoveConstraints(Ptr constraints, int number) => + Jolt.PInvoke.PhysicsSystem_RemoveConstraints(this, constraints, number); + + /// + /// + /// Get a list of all constraints + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:140 + ///
+ /// Constraints GetConstraints() const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetConstraints() => + new NativeArray(Jolt.PInvoke.PhysicsSystem_GetConstraints(this)); + + /// + /// + /// Optimize the broadphase, needed only if you've added many bodies prior to calling Update() for the first + /// time. Don't call this every frame as PhysicsSystem::Update spreads out the same work over multiple + /// frames. If you add many bodies through BodyInterface::AddBodiesPrepare/AddBodiesFinalize and if the + /// bodies in a batch are in a roughly unoccupied space (e.g. a new level section) then a call to + /// OptimizeBroadPhase is also not needed as batch adding creates an efficient bounding volume hierarchy. + /// Don't call this function while bodies are being modified from another thread or use the locking + /// BodyInterface to modify bodies. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:148 + ///
+ /// void OptimizeBroadPhase() + ///
+ ///
+ public void OptimizeBroadPhase() => Jolt.PInvoke.PhysicsSystem_OptimizeBroadPhase(this); + + /// + /// + /// Adds a new step listener + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:151 + ///
+ /// void AddStepListener(PhysicsStepListener *inListener) + ///
+ ///
+ public void AddStepListener(PhysicsStepListener listener) => + Jolt.PInvoke.PhysicsSystem_AddStepListener(this, listener); + + /// + /// + /// Removes a step listener + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:154 + ///
+ /// void RemoveStepListener(PhysicsStepListener *inListener) + ///
+ ///
+ public void RemoveStepListener(PhysicsStepListener listener) => + Jolt.PInvoke.PhysicsSystem_RemoveStepListener(this, listener); + + /// + /// + /// Simulate the system. The world steps for a total of inDeltaTime seconds. This is divided in + /// inCollisionSteps iterations. Each iteration consists of collision detection followed by an integration + /// step. This function internally spawns jobs using inJobSystem and waits for them to complete, so no jobs + /// will be running when this function returns. The temp allocator is used, for example, to store the list + /// of bodies that are in contact, how they form islands together and data to solve the contacts between + /// bodies. At the end of the Update call, all allocated memory will have been freed. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:162 + ///
+ /// EPhysicsUpdateError Update(float inDeltaTime, int inCollisionSteps, TempAllocator *inTempAllocator, JobSystem *inJobSystem) + ///
+ ///
+ public PhysicsUpdateError Update( + float deltaTime, + int collisionSteps, + TempAllocator tempAllocator, + JobSystem jobSystem + ) => Jolt.PInvoke.PhysicsSystem_Update(this, deltaTime, collisionSteps, tempAllocator, jobSystem); + + /// + /// + /// Saving state for replay + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:165 + ///
+ /// void SaveState(StateRecorder &inStream, EStateRecorderState inState = EStateRecorderState::All, const StateRecorderFilter *inFilter = nullptr) const + ///
+ ///
+ public void SaveState( + StateRecorder stream, + StateRecorderState state = StateRecorderState.All, + StateRecorderFilter filter = default + ) => Jolt.PInvoke.PhysicsSystem_SaveState(this, stream, state, filter); + + /// + /// + /// Restoring state for replay. Returns false if failed. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:168 + ///
+ /// bool RestoreState(StateRecorder &inStream, const StateRecorderFilter *inFilter = nullptr) + ///
+ ///
+ public bool RestoreState(StateRecorder stream, StateRecorderFilter filter = default) => + Jolt.PInvoke.PhysicsSystem_RestoreState(this, stream, filter); + + /// + /// + /// Saving state of a single body. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:171 + ///
+ /// void SaveBodyState(const Body &inBody, StateRecorder &inStream) const + ///
+ ///
+ public void SaveBodyState(Body body, StateRecorder stream) => + Jolt.PInvoke.PhysicsSystem_SaveBodyState(this, body, stream); + + /// + /// + /// Restoring state of a single body. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:174 + ///
+ /// void RestoreBodyState(Body &ioBody, StateRecorder &inStream) + ///
+ ///
+ public void RestoreBodyState(Body body, StateRecorder stream) => + Jolt.PInvoke.PhysicsSystem_RestoreBodyState(this, body, stream); + + /// + /// + /// Draw the state of the bodies (debugging purposes) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:181 + ///
+ /// void DrawBodies(const BodyManager::DrawSettings &inSettings, DebugRenderer *inRenderer, const BodyDrawFilter *inBodyFilter = nullptr) + ///
+ ///
+ public void DrawBodies( + in BodyManager.DrawSettings settings, + DebugRenderer renderer, + BodyDrawFilter bodyFilter = default + ) => Jolt.PInvoke.PhysicsSystem_DrawBodies(this, in settings, renderer, bodyFilter); + + /// + /// + /// Draw the constraints only (debugging purposes) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:184 + ///
+ /// void DrawConstraints(DebugRenderer *inRenderer) + ///
+ ///
+ public void DrawConstraints(DebugRenderer renderer) => + Jolt.PInvoke.PhysicsSystem_DrawConstraints(this, renderer); + + /// + /// + /// Draw the constraint limits only (debugging purposes) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:187 + ///
+ /// void DrawConstraintLimits(DebugRenderer *inRenderer) + ///
+ ///
+ public void DrawConstraintLimits(DebugRenderer renderer) => + Jolt.PInvoke.PhysicsSystem_DrawConstraintLimits(this, renderer); + + /// + /// + /// Draw the constraint reference frames only (debugging purposes) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:190 + ///
+ /// void DrawConstraintReferenceFrame(DebugRenderer *inRenderer) + ///
+ ///
+ public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + Jolt.PInvoke.PhysicsSystem_DrawConstraintReferenceFrame(this, renderer); + + /// + /// + /// Set gravity value + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:194 + ///
+ /// void SetGravity(Vec3Arg inGravity) + ///
+ ///
+ public void SetGravity(float3 gravity) => Jolt.PInvoke.PhysicsSystem_SetGravity(this, gravity); + + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:195 + ///
+ /// Vec3 GetGravity() const + ///
+ ///
+ public float3 GetGravity() => Jolt.PInvoke.PhysicsSystem_GetGravity(this); + + /// + /// + /// Returns a locking interface that won't actually lock the body. Use with great care! + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:198 + ///
+ /// inline const BodyLockInterfaceNoLock & GetBodyLockInterfaceNoLock() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyLockInterfaceNoLock GetBodyLockInterfaceNoLock() => + Jolt.PInvoke.PhysicsSystem_GetBodyLockInterfaceNoLock(this); + + /// + /// + /// Returns a locking interface that locks the body so other threads cannot modify it. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:201 + ///
+ /// inline const BodyLockInterfaceLocking & GetBodyLockInterface() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyLockInterfaceLocking GetBodyLockInterface() => Jolt.PInvoke.PhysicsSystem_GetBodyLockInterface(this); + + /// + /// + /// Return the BroadPhaseLayerInterface that this class has been initialized with + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:204 + ///
+ /// const BroadPhaseLayerInterface &GetBroadPhaseLayerInterface() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BroadPhaseLayerInterface GetBroadPhaseLayerInterface() => + Jolt.PInvoke.PhysicsSystem_GetBroadPhaseLayerInterface(this); + + /// + /// + /// Broadphase layer filter that decides if two objects can collide, this was passed to the Init function. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:207 + ///
+ /// const ObjectVsBroadPhaseLayerFilter &GetObjectVsBroadPhaseLayerFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public ObjectVsBroadPhaseLayerFilter GetObjectVsBroadPhaseLayerFilter() => + Jolt.PInvoke.PhysicsSystem_GetObjectVsBroadPhaseLayerFilter(this); + + /// + /// + /// Object layer filter that decides if two objects can collide, this was passed to the Init function. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:210 + ///
+ /// const ObjectLayerPairFilter &GetObjectLayerPairFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public ObjectLayerPairFilter GetObjectLayerPairFilter() => + Jolt.PInvoke.PhysicsSystem_GetObjectLayerPairFilter(this); + + /// + /// + /// Get an broadphase layer filter that uses the default pair filter and a specified object layer to + /// determine if broadphase layers collide + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:213 + ///
+ /// DefaultBroadPhaseLayerFilter GetDefaultBroadPhaseLayerFilter(ObjectLayer inLayer) const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public DefaultBroadPhaseLayerFilter GetDefaultBroadPhaseLayerFilter(ushort layer) => + Jolt.PInvoke.PhysicsSystem_GetDefaultBroadPhaseLayerFilter(this, layer); + + /// + /// + /// Get an object layer filter that uses the default pair filter and a specified layer to determine if + /// layers collide + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:216 + ///
+ /// DefaultObjectLayerFilter GetDefaultLayerFilter(ObjectLayer inLayer) const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public DefaultObjectLayerFilter GetDefaultLayerFilter(ushort layer) => + Jolt.PInvoke.PhysicsSystem_GetDefaultLayerFilter(this, layer); + + /// + /// + /// Gets the current amount of bodies that are in the body manager + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:219 + ///
+ /// uint GetNumBodies() const + ///
+ ///
+ public uint GetNumBodies() => Jolt.PInvoke.PhysicsSystem_GetNumBodies(this); + + /// + /// + /// Gets the current amount of active bodies that are in the body manager + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:222 + ///
+ /// uint32 GetNumActiveBodies(EBodyType inType) const + ///
+ ///
+ public uint GetNumActiveBodies(BodyType type) => Jolt.PInvoke.PhysicsSystem_GetNumActiveBodies(this, type); + + /// + /// + /// Get the maximum amount of bodies that this physics system supports + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:225 + ///
+ /// uint GetMaxBodies() const + ///
+ ///
+ public uint GetMaxBodies() => Jolt.PInvoke.PhysicsSystem_GetMaxBodies(this); + + /// + /// + /// Get stats about the bodies in the body manager (slow, iterates through all bodies) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:231 + ///
+ /// BodyStats GetBodyStats() const + ///
+ ///
+ public BodyManager.BodyStats GetBodyStats() + { + Jolt.PInvoke.PhysicsSystem_GetBodyStats(this, out var _outResult); + return _outResult; + } + + /// + /// + /// Get copy of the list of all bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:235 + ///
+ /// void GetBodies(BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Get copy of the list of all bodies under protection of a lock. + /// @param outBodyIDs On return, this will contain the list of BodyIDs + /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public NativeArray GetBodies() + { + Jolt.PInvoke.PhysicsSystem_GetBodies(this, out var bodyIDs_raw); + return new NativeArray(bodyIDs_raw); + } + + /// + /// + /// Get copy of the list of all bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:235 + ///
+ /// void GetBodies(BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Get copy of the list of all bodies under protection of a lock. + /// @param outBodyIDs On return, this will contain the list of BodyIDs + /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint GetBodies(Span results, out uint totalHits) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.PhysicsSystem_GetBodies_2(this, results_fixed, (uint)results.Length); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:240 + ///
+ /// void GetActiveBodies(EBodyType inType, BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// @param inType The type of bodies to get + /// @param outBodyIDs On return, this will contain the list of BodyIDs + /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public NativeArray GetActiveBodies(BodyType type) + { + Jolt.PInvoke.PhysicsSystem_GetActiveBodies(this, type, out var bodyIDs_raw); + return new NativeArray(bodyIDs_raw); + } + + /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:240 + ///
+ /// void GetActiveBodies(EBodyType inType, BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// @param inType The type of bodies to get + /// @param outBodyIDs On return, this will contain the list of BodyIDs + /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint GetActiveBodies(BodyType type, Span results, out uint totalHits) + { + fixed (uint* results_fixed = results) + { + totalHits = Jolt.PInvoke.PhysicsSystem_GetActiveBodies_2( + this, + type, + results_fixed, + (uint)results.Length + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Check if 2 bodies were in contact during the last simulation step. Since contacts are only detected + /// between active bodies, so at least one of the bodies must be active in order for this function to work. + /// It queries the state at the time of the last PhysicsSystem::Update and will return true if the bodies + /// were in contact, even if one of the bodies was moved / removed afterwards. This function can be called + /// from any thread when the PhysicsSystem::Update is not running. During PhysicsSystem::Update this + /// function is only valid during contact callbacks: - During the ContactListener::OnContactAdded callback + /// this function can be used to determine if a different contact pair between the bodies was active in the + /// previous simulation step (function returns true) or if this is the first step that the bodies are + /// touching (function returns false). - During the ContactListener::OnContactRemoved callback this function + /// can be used to determine if this is the last contact pair between the bodies (function returns false) or + /// if there are other contacts still present (function returns true). + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:251 + ///
+ /// bool WereBodiesInContact(const BodyID &inBody1ID, const BodyID &inBody2ID) const + ///
+ ///
+ public bool WereBodiesInContact(uint body1ID, uint body2ID) => + Jolt.PInvoke.PhysicsSystem_WereBodiesInContact(this, body1ID, body2ID); + + /// + /// + /// Get the bounding box of all bodies in the physics system. Deprecated: Use + /// GetBroadPhaseQuery().GetBounds() instead. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:255 + ///
+ /// AABox GetBounds() const + ///
+ ///
+ public AABox GetBounds() => Jolt.PInvoke.PhysicsSystem_GetBounds(this); + + /// + /// + /// The maximum value that can be passed to Init for inMaxBodies. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:39 + ///
+ /// static constexpr uint cMaxBodiesLimit = BodyID::cMaxBodyIndex + 1 + ///
+ ///
+ public static uint GetMaxBodiesLimit() => Jolt.PInvoke.PhysicsSystem_GetMaxBodiesLimit(); + + /// + /// + /// The maximum value that can be passed to Init for inMaxBodyPairs. Note you should really use a lower + /// value, using this value will cost a lot of memory! On a 32 bit platform, you'll run out of memory way + /// before you reach this limit. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:44 + ///
+ /// static constexpr uint cMaxBodyPairsLimit = ContactConstraintManager::cMaxBodyPairsLimit + ///
+ ///
+ public static uint GetMaxBodyPairsLimit() => Jolt.PInvoke.PhysicsSystem_GetMaxBodyPairsLimit(); + + /// + /// + /// The maximum value that can be passed to Init for inMaxContactConstraints. Note you should really use a + /// lower value, using this value will cost a lot of memory! On a 32 bit platform, you'll run out of memory + /// way before you reach this limit. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:49 + ///
+ /// static constexpr uint cMaxContactConstraintsLimit = ContactConstraintManager::cMaxContactConstraintsLimit + ///
+ ///
+ public static uint GetMaxContactConstraintsLimit() => + Jolt.PInvoke.PhysicsSystem_GetMaxContactConstraintsLimit(); + + /// + /// + /// Draw debug info for objects that perform continuous collision detection through the linear cast motion + /// quality + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:178 + ///
+ /// static bool sDrawMotionQualityLinearCast + ///
+ ///
+ /// + /// + /// Drawing properties + /// + /// + public static bool GetDrawMotionQualityLinearCast() => + Jolt.PInvoke.PhysicsSystem_GetDrawMotionQualityLinearCast(); + + /// + /// + /// Draw debug info for objects that perform continuous collision detection through the linear cast motion + /// quality + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:178 + ///
+ /// static bool sDrawMotionQualityLinearCast + ///
+ ///
+ /// + /// + /// Drawing properties + /// + /// + public static void SetDrawMotionQualityLinearCast(bool value) => + Jolt.PInvoke.PhysicsSystem_SetDrawMotionQualityLinearCast(value); + + public void Dispose() => Jolt.PInvoke.PhysicsSystem_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PhysicsUpdateContext.gen.cs b/Brutal.Jolt/Generated/Classes/PhysicsUpdateContext.gen.cs new file mode 100644 index 0000000..e3d8d65 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PhysicsUpdateContext.gen.cs @@ -0,0 +1,376 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:27 + ///
+ /// class PhysicsUpdateContext : public NonCopyable + ///
+ ///
+ /// + /// + /// @cond INTERNAL + /// Internal information used during the PhysicsSystem::Update call + /// + /// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library. + /// + /// + [InteropHandle] + public readonly partial struct PhysicsUpdateContext : IDisposable + { + /// + /// + /// Destructor + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:31 + ///
+ /// explicit PhysicsUpdateContext(TempAllocator &inTempAllocator) + ///
+ ///
+ public static PhysicsUpdateContext Create(TempAllocator tempAllocator) => + Jolt.PInvoke.PhysicsUpdateContext_Create(tempAllocator); + + /// + /// + /// Need to put max concurrency in temp var as min requires a reference + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:152 + ///
+ /// int GetMaxConcurrency() const + ///
+ ///
+ /// + /// + /// Maximum amount of concurrent jobs on this machine + /// + /// + public int GetMaxConcurrency() => Jolt.PInvoke.PhysicsUpdateContext_GetMaxConcurrency(this); + + /// + /// + /// Maximum supported amount of concurrent jobs + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:34 + ///
+ /// static constexpr int cMaxConcurrency = 32 + ///
+ ///
+ public static int GetCMaxConcurrency() => Jolt.PInvoke.PhysicsUpdateContext_GetCMaxConcurrency(); + + /// + /// + /// The physics system we belong to + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:154 + ///
+ /// PhysicsSystem * mPhysicsSystem + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public PhysicsSystem GetPhysicsSystem() => Jolt.PInvoke.PhysicsUpdateContext_GetPhysicsSystem(this); + + /// + /// + /// The physics system we belong to + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:154 + ///
+ /// PhysicsSystem * mPhysicsSystem + ///
+ ///
+ public void SetPhysicsSystem(PhysicsSystem value) => + Jolt.PInvoke.PhysicsUpdateContext_SetPhysicsSystem(this, value); + + /// + /// + /// Temporary allocator used during the update + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:155 + ///
+ /// TempAllocator * mTempAllocator + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public TempAllocator GetTempAllocator() => Jolt.PInvoke.PhysicsUpdateContext_GetTempAllocator(this); + + /// + /// + /// Temporary allocator used during the update + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:155 + ///
+ /// TempAllocator * mTempAllocator + ///
+ ///
+ public void SetTempAllocator(TempAllocator value) => + Jolt.PInvoke.PhysicsUpdateContext_SetTempAllocator(this, value); + + /// + /// + /// Job system that processes jobs + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:156 + ///
+ /// JobSystem * mJobSystem + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public JobSystem GetJobSystem() => Jolt.PInvoke.PhysicsUpdateContext_GetJobSystem(this); + + /// + /// + /// Job system that processes jobs + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:156 + ///
+ /// JobSystem * mJobSystem + ///
+ ///
+ public void SetJobSystem(JobSystem value) => Jolt.PInvoke.PhysicsUpdateContext_SetJobSystem(this, value); + + /// + /// + /// Delta time for a simulation step (collision step) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:159 + ///
+ /// float mStepDeltaTime + ///
+ ///
+ public float GetStepDeltaTime() => Jolt.PInvoke.PhysicsUpdateContext_GetStepDeltaTime(this); + + /// + /// + /// Delta time for a simulation step (collision step) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:159 + ///
+ /// float mStepDeltaTime + ///
+ ///
+ public void SetStepDeltaTime(float value) => Jolt.PInvoke.PhysicsUpdateContext_SetStepDeltaTime(this, value); + + /// + /// + /// Ratio of this step delta time vs last step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:160 + ///
+ /// float mWarmStartImpulseRatio + ///
+ ///
+ public float GetWarmStartImpulseRatio() => Jolt.PInvoke.PhysicsUpdateContext_GetWarmStartImpulseRatio(this); + + /// + /// + /// Ratio of this step delta time vs last step + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:160 + ///
+ /// float mWarmStartImpulseRatio + ///
+ ///
+ public void SetWarmStartImpulseRatio(float value) => + Jolt.PInvoke.PhysicsUpdateContext_SetWarmStartImpulseRatio(this, value); + + /// + /// + /// Constraints that were active at the start of the physics update step (activating bodies can activate + /// constraints and we need a consistent snapshot). Only these constraints will be resolved. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:163 + ///
+ /// Constraint ** mActiveConstraints = nullptr + ///
+ ///
+ public unsafe void SetActiveConstraints(Ptr value) => + Jolt.PInvoke.PhysicsUpdateContext_SetActiveConstraints(this, value); + + /// + /// + /// A list of body pairs found by the broadphase + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:165 + ///
+ /// BodyPair * mBodyPairs = nullptr + ///
+ ///
+ public unsafe void SetBodyPairs(Ptr value) => + Jolt.PInvoke.PhysicsUpdateContext_SetBodyPairs(this, value); + + /// + /// + /// Keeps track of all bodies in the simulation + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:167 + ///
+ /// BodyManager * mBodyManager + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyManager GetBodyManager() => Jolt.PInvoke.PhysicsUpdateContext_GetBodyManager(this); + + /// + /// + /// Keeps track of all bodies in the simulation + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:167 + ///
+ /// BodyManager * mBodyManager + ///
+ ///
+ public void SetBodyManager(BodyManager value) => Jolt.PInvoke.PhysicsUpdateContext_SetBodyManager(this, value); + + /// + /// + /// Keeps track of connected bodies and builds islands for multithreaded velocity/position update + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:168 + ///
+ /// IslandBuilder * mIslandBuilder + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public IslandBuilder GetIslandBuilder() => Jolt.PInvoke.PhysicsUpdateContext_GetIslandBuilder(this); + + /// + /// + /// Keeps track of connected bodies and builds islands for multithreaded velocity/position update + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:168 + ///
+ /// IslandBuilder * mIslandBuilder + ///
+ ///
+ public void SetIslandBuilder(IslandBuilder value) => + Jolt.PInvoke.PhysicsUpdateContext_SetIslandBuilder(this, value); + + /// + /// + /// Number of active soft bodies in the simulation + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:172 + ///
+ /// uint mNumSoftBodies + ///
+ ///
+ public uint GetNumSoftBodies() => Jolt.PInvoke.PhysicsUpdateContext_GetNumSoftBodies(this); + + /// + /// + /// Number of active soft bodies in the simulation + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:172 + ///
+ /// uint mNumSoftBodies + ///
+ ///
+ public void SetNumSoftBodies(uint value) => Jolt.PInvoke.PhysicsUpdateContext_SetNumSoftBodies(this, value); + + /// + /// + /// Contexts for updating soft bodies + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:173 + ///
+ /// SoftBodyUpdateContext * mSoftBodyUpdateContexts = nullptr + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SoftBodyUpdateContext GetSoftBodyUpdateContexts() => + Jolt.PInvoke.PhysicsUpdateContext_GetSoftBodyUpdateContexts(this); + + /// + /// + /// Contexts for updating soft bodies + /// + /// + /// C++: + /// Jolt/Physics/PhysicsUpdateContext.h:173 + ///
+ /// SoftBodyUpdateContext * mSoftBodyUpdateContexts = nullptr + ///
+ ///
+ public void SetSoftBodyUpdateContexts(SoftBodyUpdateContext value) => + Jolt.PInvoke.PhysicsUpdateContext_SetSoftBodyUpdateContexts(this, value); + + public void Dispose() => Jolt.PInvoke.PhysicsUpdateContext_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PlaneShape.gen.cs b/Brutal.Jolt/Generated/Classes/PlaneShape.gen.cs new file mode 100644 index 0000000..5508e72 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PlaneShape.gen.cs @@ -0,0 +1,394 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A plane shape. The negative half space is considered solid. Planes cannot be dynamic objects, only static or + /// kinematic. The plane is considered an infinite shape, but testing collision outside of its bounding box + /// (defined by the half-extent parameter) will not return a collision result. At the edge of the bounding box + /// collision with the plane will be inconsistent. If you need something of a well defined size, a box shape may + /// be better. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:42 + ///
+ /// class PlaneShape final : public Shape + ///
+ ///
+ [InteropHandle] + public readonly partial struct PlaneShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:48 + ///
+ /// PlaneShape() + ///
+ ///
+ public static PlaneShape Create() => Jolt.PInvoke.PlaneShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:49 + ///
+ /// explicit PlaneShape(const Plane &inPlane, const PhysicsMaterial *inMaterial = nullptr, float inHalfExtent = PlaneShapeSettings::cDefaultHalfExtent) + ///
+ ///
+ public static PlaneShape Create(in Plane plane, PhysicsMaterial material = default, float halfExtent = 1000f) => + Jolt.PInvoke.PlaneShape_Create_2(in plane, material, halfExtent); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:50 + ///
+ /// PlaneShape(const PlaneShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static PlaneShape Create(PlaneShapeSettings settings) + { + var _handle = Jolt.PInvoke.PlaneShape_Create_3(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Get the plane + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:53 + ///
+ /// const Plane & GetPlane() const + ///
+ ///
+ public Plane GetPlane() => Jolt.PInvoke.PlaneShape_GetPlane(this); + + /// + /// + /// Get the half-extent of the bounding box of the plane + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:56 + ///
+ /// float GetHalfExtent() const + ///
+ ///
+ public float GetHalfExtent() => Jolt.PInvoke.PlaneShape_GetHalfExtent(this); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:119 + ///
+ /// const PhysicsMaterial * GetMaterial() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial() => Jolt.PInvoke.PlaneShape_GetMaterial(this); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Material of the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:118 + ///
+ /// void SetMaterial(const PhysicsMaterial *inMaterial) + ///
+ ///
+ public void SetMaterial(PhysicsMaterial material) => Jolt.PInvoke.PlaneShape_SetMaterial(this, material); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:122 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.PlaneShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(PlaneShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PlaneShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/PlaneShapeSettings.gen.cs new file mode 100644 index 0000000..465a4c3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PlaneShapeSettings.gen.cs @@ -0,0 +1,187 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a PlaneShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:16 + ///
+ /// class PlaneShapeSettings final : public ShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct PlaneShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:22 + ///
+ /// PlaneShapeSettings() = default + ///
+ ///
+ public static PlaneShapeSettings Create() => Jolt.PInvoke.PlaneShapeSettings_Create(); + + /// + /// + /// Create a plane shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:25 + ///
+ /// explicit PlaneShapeSettings(const Plane &inPlane, const PhysicsMaterial *inMaterial = nullptr, float inHalfExtent = cDefaultHalfExtent) + ///
+ ///
+ public static PlaneShapeSettings Create( + in Plane plane, + PhysicsMaterial material = default, + float halfExtent = 1000f + ) => Jolt.PInvoke.PlaneShapeSettings_Create_2(in plane, material, halfExtent); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Plane that describes the shape. The negative half space is considered solid. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:30 + ///
+ /// Plane mPlane + ///
+ ///
+ public Plane GetPlane() => Jolt.PInvoke.PlaneShapeSettings_GetPlane(this); + + /// + /// + /// Plane that describes the shape. The negative half space is considered solid. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:30 + ///
+ /// Plane mPlane + ///
+ ///
+ public void SetPlane(Plane value) => Jolt.PInvoke.PlaneShapeSettings_SetPlane(this, value); + + /// + /// + /// Surface material of the plane + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:32 + ///
+ /// RefConst<PhysicsMaterial> mMaterial + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial() => Jolt.PInvoke.PlaneShapeSettings_GetMaterial(this); + + /// + /// + /// Surface material of the plane + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:32 + ///
+ /// RefConst<PhysicsMaterial> mMaterial + ///
+ ///
+ public void SetMaterial(PhysicsMaterial value) => Jolt.PInvoke.PlaneShapeSettings_SetMaterial(this, value); + + /// + /// + /// Default half-extent of the plane (total size along 1 axis will be 2 * half-extent) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:34 + ///
+ /// static constexpr float cDefaultHalfExtent = 1000.0f + ///
+ ///
+ public static float GetDefaultHalfExtent() => Jolt.PInvoke.PlaneShapeSettings_GetDefaultHalfExtent(); + + /// + /// + /// The bounding box of this plane will run from [-half_extent, half_extent]. Keep this as low as possible + /// for better broad phase performance. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:36 + ///
+ /// float mHalfExtent = cDefaultHalfExtent + ///
+ ///
+ public float GetHalfExtent() => Jolt.PInvoke.PlaneShapeSettings_GetHalfExtent(this); + + /// + /// + /// The bounding box of this plane will run from [-half_extent, half_extent]. Keep this as low as possible + /// for better broad phase performance. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PlaneShape.h:36 + ///
+ /// float mHalfExtent = cDefaultHalfExtent + ///
+ ///
+ public void SetHalfExtent(float value) => Jolt.PInvoke.PlaneShapeSettings_SetHalfExtent(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ShapeSettings(PlaneShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PointConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/PointConstraint.gen.cs new file mode 100644 index 0000000..73bfa7d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PointConstraint.gen.cs @@ -0,0 +1,228 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A point constraint constrains 2 bodies on a single point (removing 3 degrees of freedom) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:40 + ///
+ /// class PointConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct PointConstraint : IDisposable + { + /// + /// + /// Construct point constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:46 + ///
+ /// PointConstraint(Body &inBody1, Body &inBody2, const PointConstraintSettings &inSettings) + ///
+ ///
+ public static PointConstraint Create(Body body1, Body body2, PointConstraintSettings settings) => + Jolt.PInvoke.PointConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + /// + /// Update the attachment point for body 1 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:64 + ///
+ /// void SetPoint1(EConstraintSpace inSpace, RVec3Arg inPoint1) + ///
+ ///
+ public void SetPoint1(ConstraintSpace space, float3 point1) => + Jolt.PInvoke.PointConstraint_SetPoint1(this, space, point1); + + /// + /// + /// Update the attachment point for body 2 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:67 + ///
+ /// void SetPoint2(EConstraintSpace inSpace, RVec3Arg inPoint2) + ///
+ ///
+ public void SetPoint2(ConstraintSpace space, float3 point2) => + Jolt.PInvoke.PointConstraint_SetPoint2(this, space, point2); + + /// + /// + /// Get the attachment point for body 1 relative to body 1 COM (transform by Body::GetCenterOfMassTransform + /// to take to world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:70 + ///
+ /// inline Vec3 GetLocalSpacePoint1() const + ///
+ ///
+ public float3 GetLocalSpacePoint1() => Jolt.PInvoke.PointConstraint_GetLocalSpacePoint1(this); + + /// + /// + /// Get the attachment point for body 2 relative to body 2 COM (transform by Body::GetCenterOfMassTransform + /// to take to world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:73 + ///
+ /// inline Vec3 GetLocalSpacePoint2() const + ///
+ ///
+ public float3 GetLocalSpacePoint2() => Jolt.PInvoke.PointConstraint_GetLocalSpacePoint2(this); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:80 + ///
+ /// inline Vec3 GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear impulse applied to satisfy the + /// constraint) + /// + /// + public float3 GetTotalLambdaPosition() => Jolt.PInvoke.PointConstraint_GetTotalLambdaPosition(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(PointConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(PointConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PointConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/PointConstraintPart.gen.cs new file mode 100644 index 0000000..c842106 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PointConstraintPart.gen.cs @@ -0,0 +1,206 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constrains movement along 3 axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:40 + ///
+ /// class PointConstraintPart + ///
+ ///
+ /// + /// + /// Constrains movement along 3 axis + /// + /// @see "Constraints Derivation for Rigid Body Simulation in 3D" - Daniel Chappuis, section 2.2.1 + /// + /// Constraint equation (eq 45): + /// + /// \f[C = p_2 - p_1\f] + /// + /// Jacobian (transposed) (eq 47): + /// + /// \f[J^T = \begin{bmatrix}-E & r1x & E & -r2x^T\end{bmatrix} + /// = \begin{bmatrix}-E^T \\ r1x^T \\ E^T \\ -r2x^T\end{bmatrix} + /// = \begin{bmatrix}-E \\ -r1x \\ E \\ r2x\end{bmatrix}\f] + /// + /// Used terms (here and below, everything in world space):\n + /// p1, p2 = constraint points.\n + /// r1 = p1 - x1.\n + /// r2 = p2 - x2.\n + /// r1x = 3x3 matrix for which r1x v = r1 x v (cross product).\n + /// x1, x2 = center of mass for the bodies.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// b = velocity bias.\n + /// \f$\beta\f$ = baumgarte constant.\n + /// E = identity matrix. + /// + /// + [InteropHandle] + public readonly partial struct PointConstraintPart : IDisposable + { + public static PointConstraintPart Create() => Jolt.PInvoke.PointConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:80 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, Vec3Arg inR1, const Body &inBody2, Mat44Arg inRotation2, Vec3Arg inR2) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inRotation1 The 3x3 rotation matrix for body 1 (translation part is ignored) + /// @param inRotation2 The 3x3 rotation matrix for body 2 (translation part is ignored) + /// @param inR1 Local space vector from center of mass to constraint point for body 1 + /// @param inR2 Local space vector from center of mass to constraint point for body 2 + /// + /// + public void CalculateConstraintProperties( + Body body1, + in float4x4 rotation1, + float3 r1, + Body body2, + in float4x4 rotation2, + float3 r2 + ) => + Jolt.PInvoke.PointConstraintPart_CalculateConstraintProperties( + this, + body1, + in rotation1, + r1, + body2, + in rotation2, + r2 + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:129 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.PointConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:136 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.PointConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:145 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame + /// + /// + public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.PointConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:154 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2) + ///
+ ///
+ /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// + /// + public bool SolveVelocityConstraint(Body body1, Body body2) => + Jolt.PInvoke.PointConstraintPart_SolveVelocityConstraint(this, body1, body2); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:168 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint(Body body1, Body body2, float baumgarte) => + Jolt.PInvoke.PointConstraintPart_SolvePositionConstraint(this, body1, body2, baumgarte); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h:213 + ///
+ /// Vec3 GetTotalLambda() const + ///
+ ///
+ public float3 GetTotalLambda() => Jolt.PInvoke.PointConstraintPart_GetTotalLambda(this); + + public void Dispose() => Jolt.PInvoke.PointConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PointConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/PointConstraintSettings.gen.cs new file mode 100644 index 0000000..5b6da7e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PointConstraintSettings.gen.cs @@ -0,0 +1,179 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Point constraint settings, used to create a point constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:13 + ///
+ /// class PointConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct PointConstraintSettings : IDisposable + { + public static PointConstraintSettings Create() => Jolt.PInvoke.PointConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:25 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.PointConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:25 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.PointConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint position (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:28 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint1() => Jolt.PInvoke.PointConstraintSettings_GetPoint1(this); + + /// + /// + /// Body 1 constraint position (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:28 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetPoint1(float3 value) => Jolt.PInvoke.PointConstraintSettings_SetPoint1(this, value); + + /// + /// + /// Body 2 constraint position (space determined by mSpace). Note: Normally you would set mPoint1 = mPoint2 + /// if the bodies are already placed how you want to constrain them (if mSpace = world space). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:32 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint2() => Jolt.PInvoke.PointConstraintSettings_GetPoint2(this); + + /// + /// + /// Body 2 constraint position (space determined by mSpace). Note: Normally you would set mPoint1 = mPoint2 + /// if the bodies are already placed how you want to constrain them (if mSpace = world space). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PointConstraint.h:32 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetPoint2(float3 value) => Jolt.PInvoke.PointConstraintSettings_SetPoint2(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(PointConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(PointConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PolyhedronSubmergedVolumeCalculator.gen.cs b/Brutal.Jolt/Generated/Classes/PolyhedronSubmergedVolumeCalculator.gen.cs new file mode 100644 index 0000000..26869b7 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PolyhedronSubmergedVolumeCalculator.gen.cs @@ -0,0 +1,97 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class calculates the intersection between a fluid surface and a polyhedron and returns the submerged + /// volume and its center of buoyancy Construct this class and then one by one add all faces of the polyhedron + /// using the AddFace function. After all faces have been added the result can be gotten through GetResult. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h:17 + ///
+ /// class PolyhedronSubmergedVolumeCalculator + ///
+ ///
+ [InteropHandle] + public readonly partial struct PolyhedronSubmergedVolumeCalculator + { + /// + /// + /// Check if all points are above the surface. Should be used as early out. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h:204 + ///
+ /// inline bool AreAllAbove() const + ///
+ ///
+ public bool AreAllAbove() => Jolt.PInvoke.PolyhedronSubmergedVolumeCalculator_AreAllAbove(this); + + /// + /// + /// Check if all points are below the surface. Should be used as early out. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h:210 + ///
+ /// inline bool AreAllBelow() const + ///
+ ///
+ public bool AreAllBelow() => Jolt.PInvoke.PolyhedronSubmergedVolumeCalculator_AreAllBelow(this); + + /// + /// + /// Get the lowest point of the polyhedron. Used to form the 4th vertex to make a tetrahedron out of a + /// polyhedron face. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h:216 + ///
+ /// inline int GetReferencePointIdx() const + ///
+ ///
+ public int GetReferencePointIdx() => + Jolt.PInvoke.PolyhedronSubmergedVolumeCalculator_GetReferencePointIdx(this); + + /// + /// + /// Add a polyhedron face. Supply the indices of the points that form the face (in counter clockwise order). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h:222 + ///
+ /// void AddFace(int inIdx1, int inIdx2, int inIdx3) + ///
+ ///
+ public void AddFace(int idx1, int idx2, int idx3) => + Jolt.PInvoke.PolyhedronSubmergedVolumeCalculator_AddFace(this, idx1, idx2, idx3); + + /// + /// + /// Call after all faces have been added. Returns the submerged volume and the center of buoyancy for the + /// submerged volume. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h:292 + ///
+ /// void GetResult(float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy) const + ///
+ ///
+ public void GetResult(out float submergedVolume, out float3 centerOfBuoyancy) => + Jolt.PInvoke.PolyhedronSubmergedVolumeCalculator_GetResult(this, out submergedVolume, out centerOfBuoyancy); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PulleyConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/PulleyConstraint.gen.cs new file mode 100644 index 0000000..24ed195 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PulleyConstraint.gen.cs @@ -0,0 +1,219 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A pulley constraint. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:59 + ///
+ /// class PulleyConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct PulleyConstraint : IDisposable + { + /// + /// + /// Construct pulley constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:65 + ///
+ /// PulleyConstraint(Body &inBody1, Body &inBody2, const PulleyConstraintSettings &inSettings) + ///
+ ///
+ public static PulleyConstraint Create(Body body1, Body body2, PulleyConstraintSettings settings) => + Jolt.PInvoke.PulleyConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Update the minimum and maximum length for the constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:87 + ///
+ /// void SetLength(float inMinLength, float inMaxLength) + ///
+ ///
+ public void SetLength(float minLength, float maxLength) => + Jolt.PInvoke.PulleyConstraint_SetLength(this, minLength, maxLength); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:88 + ///
+ /// float GetMinLength() const + ///
+ ///
+ public float GetMinLength() => Jolt.PInvoke.PulleyConstraint_GetMinLength(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:89 + ///
+ /// float GetMaxLength() const + ///
+ ///
+ public float GetMaxLength() => Jolt.PInvoke.PulleyConstraint_GetMaxLength(this); + + /// + /// + /// Get the current length of both segments (multiplied by the ratio for segment 2) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:92 + ///
+ /// float GetCurrentLength() const + ///
+ ///
+ public float GetCurrentLength() => Jolt.PInvoke.PulleyConstraint_GetCurrentLength(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:95 + ///
+ /// inline float GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear impulse applied to satisfy the + /// constraint) + /// + /// + public float GetTotalLambdaPosition() => Jolt.PInvoke.PulleyConstraint_GetTotalLambdaPosition(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(PulleyConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(PulleyConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/PulleyConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/PulleyConstraintSettings.gen.cs new file mode 100644 index 0000000..2f7412d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/PulleyConstraintSettings.gen.cs @@ -0,0 +1,315 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Pulley constraint settings, used to create a pulley constraint. A pulley connects two bodies via two fixed + /// world points to each other similar to a distance constraint. We define Length1 = |BodyPoint1 - FixedPoint1| + /// where Body1 is a point on body 1 in world space and FixedPoint1 a fixed point in world space Length2 = + /// |BodyPoint2 - FixedPoint2| The constraint keeps the two line segments constrained so that MinDistance <= + /// Length1 + Ratio * Length2 <= MaxDistance + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:18 + ///
+ /// class PulleyConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct PulleyConstraintSettings : IDisposable + { + public static PulleyConstraintSettings Create() => Jolt.PInvoke.PulleyConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, specified properties below should be in the + /// specified space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:30 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.PulleyConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, specified properties below should be in the + /// specified space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:30 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.PulleyConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint attachment point (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:33 + ///
+ /// RVec3 mBodyPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetBodyPoint1() => Jolt.PInvoke.PulleyConstraintSettings_GetBodyPoint1(this); + + /// + /// + /// Body 1 constraint attachment point (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:33 + ///
+ /// RVec3 mBodyPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetBodyPoint1(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetBodyPoint1(this, value); + + /// + /// + /// Fixed world point to which body 1 is connected (always world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:36 + ///
+ /// RVec3 mFixedPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetFixedPoint1() => Jolt.PInvoke.PulleyConstraintSettings_GetFixedPoint1(this); + + /// + /// + /// Fixed world point to which body 1 is connected (always world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:36 + ///
+ /// RVec3 mFixedPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetFixedPoint1(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetFixedPoint1(this, value); + + /// + /// + /// Body 2 constraint attachment point (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:39 + ///
+ /// RVec3 mBodyPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetBodyPoint2() => Jolt.PInvoke.PulleyConstraintSettings_GetBodyPoint2(this); + + /// + /// + /// Body 2 constraint attachment point (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:39 + ///
+ /// RVec3 mBodyPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetBodyPoint2(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetBodyPoint2(this, value); + + /// + /// + /// Fixed world point to which body 2 is connected (always world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:42 + ///
+ /// RVec3 mFixedPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetFixedPoint2() => Jolt.PInvoke.PulleyConstraintSettings_GetFixedPoint2(this); + + /// + /// + /// Fixed world point to which body 2 is connected (always world space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:42 + ///
+ /// RVec3 mFixedPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetFixedPoint2(float3 value) => Jolt.PInvoke.PulleyConstraintSettings_SetFixedPoint2(this, value); + + /// + /// + /// Ratio between the two line segments (see formula above), can be used to create a block and tackle + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:45 + ///
+ /// float mRatio = 1.0f + ///
+ ///
+ public float GetRatio() => Jolt.PInvoke.PulleyConstraintSettings_GetRatio(this); + + /// + /// + /// Ratio between the two line segments (see formula above), can be used to create a block and tackle + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:45 + ///
+ /// float mRatio = 1.0f + ///
+ ///
+ public void SetRatio(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetRatio(this, value); + + /// + /// + /// The minimum length of the line segments (see formula above), use -1 to calculate the length based on the + /// positions of the objects when the constraint is created. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:48 + ///
+ /// float mMinLength = 0.0f + ///
+ ///
+ public float GetMinLength() => Jolt.PInvoke.PulleyConstraintSettings_GetMinLength(this); + + /// + /// + /// The minimum length of the line segments (see formula above), use -1 to calculate the length based on the + /// positions of the objects when the constraint is created. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:48 + ///
+ /// float mMinLength = 0.0f + ///
+ ///
+ public void SetMinLength(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetMinLength(this, value); + + /// + /// + /// The maximum length of the line segments (see formula above), use -1 to calculate the length based on the + /// positions of the objects when the constraint is created. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:51 + ///
+ /// float mMaxLength = -1.0f + ///
+ ///
+ public float GetMaxLength() => Jolt.PInvoke.PulleyConstraintSettings_GetMaxLength(this); + + /// + /// + /// The maximum length of the line segments (see formula above), use -1 to calculate the length based on the + /// positions of the objects when the constraint is created. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PulleyConstraint.h:51 + ///
+ /// float mMaxLength = -1.0f + ///
+ ///
+ public void SetMaxLength(float value) => Jolt.PInvoke.PulleyConstraintSettings_SetMaxLength(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(PulleyConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(PulleyConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/QuadTree.gen.cs b/Brutal.Jolt/Generated/Classes/QuadTree.gen.cs new file mode 100644 index 0000000..4f0a5c4 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/QuadTree.gen.cs @@ -0,0 +1,97 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Internal tree structure in broadphase, is essentially a quad AABB tree. Tree is lockless (except for + /// UpdatePrepare/Finalize() function), modifying objects in the tree will widen the aabbs of parent nodes to + /// make the node fit. During the UpdatePrepare/Finalize() call the tree is rebuilt to achieve a tight fit + /// again. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:20 + ///
+ /// class QuadTree : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct QuadTree : IDisposable + { + public static QuadTree Create() => Jolt.PInvoke.QuadTree_Create(); + + /// + /// + /// Check if there is anything in the tree + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:181 + ///
+ /// inline bool HasBodies() const + ///
+ ///
+ public bool HasBodies() => Jolt.PInvoke.QuadTree_HasBodies(this); + + /// + /// + /// Check if the tree needs an UpdatePrepare/Finalize() + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:184 + ///
+ /// inline bool IsDirty() const + ///
+ ///
+ public bool IsDirty() => Jolt.PInvoke.QuadTree_IsDirty(this); + + /// + /// + /// Check if this tree can get an UpdatePrepare/Finalize() or if it needs a DiscardOldTree() first + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:187 + ///
+ /// inline bool CanBeUpdated() const + ///
+ ///
+ public bool CanBeUpdated() => Jolt.PInvoke.QuadTree_CanBeUpdated(this); + + /// + /// + /// Will throw away the previous frame's nodes so that we can start building a new tree in the background + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:198 + ///
+ /// void DiscardOldTree() + ///
+ ///
+ public void DiscardOldTree() => Jolt.PInvoke.QuadTree_DiscardOldTree(this); + + /// + /// + /// Get the bounding box for this tree + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:201 + ///
+ /// AABox GetBounds() const + ///
+ ///
+ public AABox GetBounds() => Jolt.PInvoke.QuadTree_GetBounds(this); + + public void Dispose() => Jolt.PInvoke.QuadTree_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RTTI.gen.cs b/Brutal.Jolt/Generated/Classes/RTTI.gen.cs new file mode 100644 index 0000000..41d55bc --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RTTI.gen.cs @@ -0,0 +1,314 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Light weight runtime type information system. This way we don't need to turn on the default RTTI system of + /// the compiler (introducing a possible overhead for every class) + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:121 + ///
+ /// class RTTI + ///
+ ///
+ /// + /// + /// Light weight runtime type information system. This way we don't need to turn + /// on the default RTTI system of the compiler (introducing a possible overhead for every + /// class) + /// + /// Notes: + /// - An extra virtual member function is added. This adds 8 bytes to the size of + /// an instance of the class (unless you are already using virtual functions). + /// + /// To use RTTI on a specific class use: + /// + /// Header file: + /// + /// class Foo + /// { + /// JPH_DECLARE_RTTI_VIRTUAL_BASE(Foo) + /// } + /// + /// class Bar : public Foo + /// { + /// JPH_DECLARE_RTTI_VIRTUAL(Bar) + /// }; + /// + /// Implementation file: + /// + /// JPH_IMPLEMENT_RTTI_VIRTUAL_BASE(Foo) + /// { + /// } + /// + /// JPH_IMPLEMENT_RTTI_VIRTUAL(Bar) + /// { + /// JPH_ADD_BASE_CLASS(Bar, Foo) // Multiple inheritance is allowed, just do JPH_ADD_BASE_CLASS for every base class + /// } + /// + /// For abstract classes use: + /// + /// Header file: + /// + /// class Foo + /// { + /// JPH_DECLARE_RTTI_ABSTRACT_BASE(Foo) + /// + /// public: + /// virtual void AbstractFunction() = 0; + /// } + /// + /// class Bar : public Foo + /// { + /// JPH_DECLARE_RTTI_VIRTUAL(Bar) + /// + /// public: + /// virtual void AbstractFunction() { } // Function is now implemented so this class is no longer abstract + /// }; + /// + /// Implementation file: + /// + /// JPH_IMPLEMENT_RTTI_ABSTRACT_BASE(Foo) + /// { + /// } + /// + /// JPH_IMPLEMENT_RTTI_VIRTUAL(Bar) + /// { + /// JPH_ADD_BASE_CLASS(Bar, Foo) + /// } + /// + /// Example of usage in a program: + /// + /// Foo *foo_ptr = new Foo; + /// Foo *bar_ptr = new Bar; + /// + /// IsType(foo_ptr, RTTI(Bar)) returns false + /// IsType(bar_ptr, RTTI(Bar)) returns true + /// + /// IsKindOf(foo_ptr, RTTI(Bar)) returns false + /// IsKindOf(bar_ptr, RTTI(Foo)) returns true + /// IsKindOf(bar_ptr, RTTI(Bar)) returns true + /// + /// StaticCast<Bar>(foo_ptr) asserts and returns foo_ptr casted to Bar * + /// StaticCast<Bar>(bar_ptr) returns bar_ptr casted to Bar * + /// + /// DynamicCast<Bar>(foo_ptr) returns nullptr + /// DynamicCast<Bar>(bar_ptr) returns bar_ptr casted to Bar * + /// + /// Other feature of DynamicCast: + /// + /// class A { int data[5]; }; + /// class B { int data[7]; }; + /// class C : public A, public B { int data[9]; }; + /// + /// C *c = new C; + /// A *a = c; + /// + /// Note that: + /// + /// B *b = (B *)a; + /// + /// generates an invalid pointer, + /// + /// B *b = StaticCast<B>(a); + /// + /// doesn't compile, and + /// + /// B *b = DynamicCast<B>(a); + /// + /// does the correct cast + /// + /// + [InteropHandle] + public readonly partial struct RTTI + { + /// + /// + /// Base class information + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:174 + ///
+ /// struct BaseClass + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct BaseClass + { + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:176 + ///
+ /// const RTTI * mRTTI + ///
+ ///
+ [FieldOffset(0)] + public RTTI RTTI; + + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:177 + ///
+ /// int mOffset + ///
+ ///
+ [FieldOffset(8)] + public int Offset; + } + + /// + /// + /// Properties + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:138 + ///
+ /// inline const char * GetName() const + ///
+ ///
+ public unsafe RefString8 GetName() => (Ptr)Jolt.PInvoke.RTTI_GetName(this); + + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:140 + ///
+ /// inline int GetSize() const + ///
+ ///
+ public int GetSize() => Jolt.PInvoke.RTTI_GetSize(this); + + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:141 + ///
+ /// bool IsAbstract() const + ///
+ ///
+ public bool IsAbstract() => Jolt.PInvoke.RTTI_IsAbstract(this); + + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:142 + ///
+ /// int GetBaseClassCount() const + ///
+ ///
+ public int GetBaseClassCount() => Jolt.PInvoke.RTTI_GetBaseClassCount(this); + + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:143 + ///
+ /// const RTTI * GetBaseClass(int inIdx) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetBaseClass(int idx) + { + var _result = Jolt.PInvoke.RTTI_GetBaseClass(this, idx, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of base classes." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:144 + ///
+ /// uint32 GetHash() const + ///
+ ///
+ public uint GetHash() => Jolt.PInvoke.RTTI_GetHash(this); + + /// + /// + /// Create an object of this type (returns nullptr if the object is abstract) + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:147 + ///
+ /// void * CreateObject() const + ///
+ ///
+ public unsafe Ptr CreateObject() => Jolt.PInvoke.RTTI_CreateObject(this); + + /// + /// + /// Destruct object of this type (does nothing if the object is abstract) + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:150 + ///
+ /// void DestructObject(void *inObject) const + ///
+ ///
+ public unsafe void DestructObject(Ptr @object) => Jolt.PInvoke.RTTI_DestructObject(this, @object); + + /// + /// + /// Add base class + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:153 + ///
+ /// void AddBaseClass(const RTTI *inRTTI, int inOffset) + ///
+ ///
+ public void AddBaseClass(RTTI rtti, int offset) => Jolt.PInvoke.RTTI_AddBaseClass(this, rtti, offset); + + /// + /// + /// Test if this class is derived from class of type inRTTI + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:160 + ///
+ /// bool IsKindOf(const RTTI *inRTTI) const + ///
+ ///
+ public bool IsKindOf(RTTI rtti) => Jolt.PInvoke.RTTI_IsKindOf(this, rtti); + + /// + /// + /// Cast inObject of this type to object of type inRTTI, returns nullptr if the cast is unsuccessful + /// + /// + /// C++: + /// Jolt/Core/RTTI.h:163 + ///
+ /// const void * CastTo(const void *inObject, const RTTI *inRTTI) const + ///
+ ///
+ public unsafe Ptr CastTo(Ptr @object, RTTI rtti) => Jolt.PInvoke.RTTI_CastTo(this, @object, rtti); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RackAndPinionConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/RackAndPinionConstraint.gen.cs new file mode 100644 index 0000000..ee93c1c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RackAndPinionConstraint.gen.cs @@ -0,0 +1,192 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A rack and pinion constraint constrains the rotation of body1 to the translation of body 2. Note that this + /// constraint needs to be used in conjunction with a hinge constraint for body 1 and a slider constraint for + /// body 2. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:54 + ///
+ /// class RackAndPinionConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct RackAndPinionConstraint : IDisposable + { + /// + /// + /// Construct gear constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:60 + ///
+ /// RackAndPinionConstraint(Body &inBody1, Body &inBody2, const RackAndPinionConstraintSettings &inSettings) + ///
+ ///
+ public static RackAndPinionConstraint Create( + Body body1, + Body body2, + RackAndPinionConstraintSettings settings + ) => Jolt.PInvoke.RackAndPinionConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// The constraints that constrain the rack and pinion (a slider and a hinge), optional and used to + /// calculate the position error and fix numerical drift. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:82 + ///
+ /// void SetConstraints(const Constraint *inPinion, const Constraint *inRack) + ///
+ ///
+ public void SetConstraints(Constraint pinion, Constraint rack) => + Jolt.PInvoke.RackAndPinionConstraint_SetConstraints(this, pinion, rack); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:85 + ///
+ /// inline float GetTotalLambda() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float GetTotalLambda() => Jolt.PInvoke.RackAndPinionConstraint_GetTotalLambda(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(RackAndPinionConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(RackAndPinionConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RackAndPinionConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/RackAndPinionConstraintPart.gen.cs new file mode 100644 index 0000000..6fa0b47 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RackAndPinionConstraintPart.gen.cs @@ -0,0 +1,219 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constraint that constrains a rotation to a translation + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:39 + ///
+ /// class RackAndPinionConstraintPart + ///
+ ///
+ /// + /// + /// Constraint that constrains a rotation to a translation + /// + /// Constraint equation: + /// + /// C = Theta(t) - r d(t) + /// + /// Derivative: + /// + /// d/dt C = 0 + /// <=> w1 . a - r v2 . b = 0 + /// + /// Jacobian: + /// + /// \f[J = \begin{bmatrix}0 & a^T & -r b^T & 0\end{bmatrix}\f] + /// + /// Used terms (here and below, everything in world space):\n + /// a = axis around which body 1 rotates (normalized).\n + /// b = axis along which body 2 slides (normalized).\n + /// Theta(t) = rotation around a of body 1.\n + /// d(t) = distance body 2 slides.\n + /// r = ratio between rotation and translation.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// \f$\beta\f$ = baumgarte constant. + /// + /// + [InteropHandle] + public readonly partial struct RackAndPinionConstraintPart : IDisposable + { + public static RackAndPinionConstraintPart Create() => Jolt.PInvoke.RackAndPinionConstraintPart_Create(); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:69 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Vec3Arg inWorldSpaceHingeAxis, const Body &inBody2, Vec3Arg inWorldSpaceSliderAxis, float inRatio) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inWorldSpaceHingeAxis The axis around which body 1 rotates + /// @param inWorldSpaceSliderAxis The axis along which body 2 slides + /// @param inRatio The ratio between rotation and translation + /// + /// + public void CalculateConstraintProperties( + Body body1, + float3 worldSpaceHingeAxis, + Body body2, + float3 worldSpaceSliderAxis, + float ratio + ) => + Jolt.PInvoke.RackAndPinionConstraintPart_CalculateConstraintProperties( + this, + body1, + worldSpaceHingeAxis, + body2, + worldSpaceSliderAxis, + ratio + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:90 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.RackAndPinionConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:97 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.RackAndPinionConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:106 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWarmStartImpulseRatio Ratio of new step to old time step (dt_new / dt_old) for scaling the lagrange multiplier of the previous frame + /// + /// + public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.RackAndPinionConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:118 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Vec3Arg inWorldSpaceHingeAxis, Body &ioBody2, Vec3Arg inWorldSpaceSliderAxis, float inRatio) + ///
+ ///
+ /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equation. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inWorldSpaceHingeAxis The axis around which body 1 rotates + /// @param inWorldSpaceSliderAxis The axis along which body 2 slides + /// @param inRatio The ratio between rotation and translation + /// + /// + public bool SolveVelocityConstraint( + Body body1, + float3 worldSpaceHingeAxis, + Body body2, + float3 worldSpaceSliderAxis, + float ratio + ) => + Jolt.PInvoke.RackAndPinionConstraintPart_SolveVelocityConstraint( + this, + body1, + worldSpaceHingeAxis, + body2, + worldSpaceSliderAxis, + ratio + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:130 + ///
+ /// float GetTotalLambda() const + ///
+ ///
+ public float GetTotalLambda() => Jolt.PInvoke.RackAndPinionConstraintPart_GetTotalLambda(this); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h:140 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inC, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) == 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inC Value of the constraint equation (C) + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint(Body body1, Body body2, float c, float baumgarte) => + Jolt.PInvoke.RackAndPinionConstraintPart_SolvePositionConstraint(this, body1, body2, c, baumgarte); + + public void Dispose() => Jolt.PInvoke.RackAndPinionConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RackAndPinionConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/RackAndPinionConstraintSettings.gen.cs new file mode 100644 index 0000000..cc8baf1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RackAndPinionConstraintSettings.gen.cs @@ -0,0 +1,230 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Rack and pinion constraint (slider & gear) settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:13 + ///
+ /// class RackAndPinionConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct RackAndPinionConstraintSettings : IDisposable + { + public static RackAndPinionConstraintSettings Create() => Jolt.PInvoke.RackAndPinionConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// Defines the ratio between the rotation of the pinion and the translation of the rack. The ratio is + /// defined as: PinionRotation(t) = ratio * RackTranslation(t) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:30 + ///
+ /// void SetRatio(int inNumTeethRack, float inRackLength, int inNumTeethPinion) + ///
+ ///
+ /// + /// + /// Defines the ratio between the rotation of the pinion and the translation of the rack. + /// The ratio is defined as: PinionRotation(t) = ratio * RackTranslation(t) + /// @param inNumTeethRack Number of teeth that the rack has + /// @param inRackLength Length of the rack + /// @param inNumTeethPinion Number of teeth the pinion has + /// + /// + public void SetRatio(int numTeethRack, float rackLength, int numTeethPinion) => + Jolt.PInvoke.RackAndPinionConstraintSettings_SetRatio(this, numTeethRack, rackLength, numTeethPinion); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:36 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:36 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => + Jolt.PInvoke.RackAndPinionConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 (pinion) constraint reference frame (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:39 + ///
+ /// Vec3 mHingeAxis = Vec3::sAxisX() + ///
+ ///
+ public float3 GetHingeAxis() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetHingeAxis(this); + + /// + /// + /// Body 1 (pinion) constraint reference frame (space determined by mSpace). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:39 + ///
+ /// Vec3 mHingeAxis = Vec3::sAxisX() + ///
+ ///
+ public void SetHingeAxis(float3 value) => + Jolt.PInvoke.RackAndPinionConstraintSettings_SetHingeAxis(this, value); + + /// + /// + /// Body 2 (rack) constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:42 + ///
+ /// Vec3 mSliderAxis = Vec3::sAxisX() + ///
+ ///
+ public float3 GetSliderAxis() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetSliderAxis(this); + + /// + /// + /// Body 2 (rack) constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:42 + ///
+ /// Vec3 mSliderAxis = Vec3::sAxisX() + ///
+ ///
+ public void SetSliderAxis(float3 value) => + Jolt.PInvoke.RackAndPinionConstraintSettings_SetSliderAxis(this, value); + + /// + /// + /// Ratio between the rack and pinion, see SetRatio. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:45 + ///
+ /// float mRatio = 1.0f + ///
+ ///
+ public float GetRatio() => Jolt.PInvoke.RackAndPinionConstraintSettings_GetRatio(this); + + /// + /// + /// Ratio between the rack and pinion, see SetRatio. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/RackAndPinionConstraint.h:45 + ///
+ /// float mRatio = 1.0f + ///
+ ///
+ public void SetRatio(float value) => Jolt.PInvoke.RackAndPinionConstraintSettings_SetRatio_2(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(RackAndPinionConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(RackAndPinionConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Ragdoll.gen.cs b/Brutal.Jolt/Generated/Classes/Ragdoll.gen.cs new file mode 100644 index 0000000..f52e8b2 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Ragdoll.gen.cs @@ -0,0 +1,579 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime ragdoll information + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:136 + ///
+ /// class Ragdoll : public RefTarget<Ragdoll>, public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct Ragdoll : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:142 + ///
+ /// explicit Ragdoll(PhysicsSystem *inSystem) + ///
+ ///
+ public static Ragdoll Create(PhysicsSystem system) => Jolt.PInvoke.Ragdoll_Create(system); + + /// + /// + /// Add bodies and constraints to the system and optionally activate the bodies + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:148 + ///
+ /// void AddToPhysicsSystem(EActivation inActivationMode, bool inLockBodies = true) + ///
+ ///
+ public void AddToPhysicsSystem(Activation activationMode, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_AddToPhysicsSystem(this, activationMode, lockBodies); + + /// + /// + /// Remove bodies and constraints from the system + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:151 + ///
+ /// void RemoveFromPhysicsSystem(bool inLockBodies = true) + ///
+ ///
+ public void RemoveFromPhysicsSystem(bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_RemoveFromPhysicsSystem(this, lockBodies); + + /// + /// + /// Wake up all bodies in the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:154 + ///
+ /// void Activate(bool inLockBodies = true) + ///
+ ///
+ public void Activate(bool lockBodies = true) => Jolt.PInvoke.Ragdoll_Activate(this, lockBodies); + + /// + /// + /// Check if one or more of the bodies in the ragdoll are active. Note that this involves locking the bodies + /// (if inLockBodies is true) and looping over them. An alternative and possibly faster way could be to + /// install a BodyActivationListener and count the number of active bodies of a ragdoll as they're activated + /// / deactivated (basically check if the body that activates / deactivates is in GetBodyIDs() and increment + /// / decrement a counter). + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:160 + ///
+ /// bool IsActive(bool inLockBodies = true) const + ///
+ ///
+ public bool IsActive(bool lockBodies = true) => Jolt.PInvoke.Ragdoll_IsActive(this, lockBodies); + + /// + /// + /// Set the group ID on all bodies in the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:163 + ///
+ /// void SetGroupID(CollisionGroup::GroupID inGroupID, bool inLockBodies = true) + ///
+ ///
+ public void SetGroupID(uint groupID, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_SetGroupID(this, groupID, lockBodies); + + /// + /// + /// Set the ragdoll to a pose (calls BodyInterface::SetPositionAndRotation to instantly move the ragdoll) + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:166 + ///
+ /// void SetPose(const SkeletonPose &inPose, bool inLockBodies = true) + ///
+ ///
+ public void SetPose(SkeletonPose pose, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_SetPose(this, pose, lockBodies); + + /// + /// + /// Lower level version of SetPose that directly takes the world space joint matrices + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:169 + ///
+ /// void SetPose(RVec3Arg inRootOffset, const Mat44 *inJointMatrices, bool inLockBodies = true) + ///
+ ///
+ /// + /// + /// jointMatrices must hold exactly one element per body in the ragdoll - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. + /// + /// + public unsafe void SetPose(float3 rootOffset, ReadOnlySpan jointMatrices, bool lockBodies = true) + { + fixed (float4x4* jointMatrices_fixed = jointMatrices) + { + Jolt.PInvoke.Ragdoll_SetPose_2( + this, + rootOffset, + jointMatrices_fixed, + (uint)jointMatrices.Length, + lockBodies, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentOutOfRangeException( + nameof(jointMatrices), + jointMatrices.Length, + "Expected one element per body in the ragdoll." + ); + } + } + + /// + /// + /// Get the ragdoll pose (uses the world transform of the bodies to calculate the pose) + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:172 + ///
+ /// void GetPose(SkeletonPose &outPose, bool inLockBodies = true) + ///
+ ///
+ public void GetPose(SkeletonPose pose, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_GetPose(this, pose, lockBodies); + + /// + /// + /// Lower level version of GetPose that directly returns the world space joint matrices + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:175 + ///
+ /// void GetPose(RVec3 &outRootOffset, Mat44 *outJointMatrices, bool inLockBodies = true) + ///
+ ///
+ /// + /// + /// jointMatrices must hold exactly one element per body in the ragdoll - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. + /// + /// + public unsafe void GetPose(out float3 rootOffset, Span jointMatrices, bool lockBodies = true) + { + fixed (float4x4* jointMatrices_fixed = jointMatrices) + { + Jolt.PInvoke.Ragdoll_GetPose_2( + this, + out rootOffset, + jointMatrices_fixed, + (uint)jointMatrices.Length, + lockBodies, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentOutOfRangeException( + nameof(jointMatrices), + jointMatrices.Length, + "Expected one element per body in the ragdoll." + ); + } + } + + /// + /// + /// This function calls ResetWarmStart on all constraints. It can be used after calling SetPose to reset + /// previous frames impulses. See: Constraint::ResetWarmStart. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:178 + ///
+ /// void ResetWarmStart() + ///
+ ///
+ public void ResetWarmStart() => Jolt.PInvoke.Ragdoll_ResetWarmStart(this); + + /// + /// + /// Drive the ragdoll to a specific pose by setting velocities on each of the bodies so that it will reach + /// inPose in inDeltaTime + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:181 + ///
+ /// void DriveToPoseUsingKinematics(const SkeletonPose &inPose, float inDeltaTime, bool inLockBodies = true) + ///
+ ///
+ public void DriveToPoseUsingKinematics(SkeletonPose pose, float deltaTime, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_DriveToPoseUsingKinematics(this, pose, deltaTime, lockBodies); + + /// + /// + /// Lower level version of DriveToPoseUsingKinematics that directly takes the world space joint matrices + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:184 + ///
+ /// void DriveToPoseUsingKinematics(RVec3Arg inRootOffset, const Mat44 *inJointMatrices, float inDeltaTime, bool inLockBodies = true) + ///
+ ///
+ /// + /// + /// jointMatrices must hold exactly one element per body in the ragdoll - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. + /// + /// + public unsafe void DriveToPoseUsingKinematics( + float3 rootOffset, + ReadOnlySpan jointMatrices, + float deltaTime, + bool lockBodies = true + ) + { + fixed (float4x4* jointMatrices_fixed = jointMatrices) + { + Jolt.PInvoke.Ragdoll_DriveToPoseUsingKinematics_2( + this, + rootOffset, + jointMatrices_fixed, + (uint)jointMatrices.Length, + deltaTime, + lockBodies, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentOutOfRangeException( + nameof(jointMatrices), + jointMatrices.Length, + "Expected one element per body in the ragdoll." + ); + } + } + + /// + /// + /// Drive the ragdoll to a specific pose by activating the motors on each constraint. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:187 + ///
+ /// void DriveToPoseUsingMotors(const SkeletonPose &inPose) + ///
+ ///
+ /// + /// + /// Throws ArgumentException for pose: "pose must use the ragdoll's own skeleton (SkeletonPose.SetSkeleton + /// with RagdollSettings.GetSkeleton())." + /// + /// + public void DriveToPoseUsingMotors(SkeletonPose pose) + { + Jolt.PInvoke.Ragdoll_DriveToPoseUsingMotors(this, pose, out var _bufferCheck); + if (_bufferCheck == 1) + throw new ArgumentException( + "pose must use the ragdoll's own skeleton (SkeletonPose.SetSkeleton with RagdollSettings.GetSkeleton()).", + nameof(pose) + ); + } + + /// + /// + /// Drive the ragdoll to a specific pose by activating the motors on each constraint. Drives both to target + /// position and velocity. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:193 + ///
+ /// void DriveToPoseUsingMotors(const SkeletonPose &inPrevPose, const SkeletonPose &inPose, float inDeltaTime) + ///
+ ///
+ /// + /// + /// Drive the ragdoll to a specific pose by activating the motors on each constraint. Drives both to target position and velocity. + /// @param inPrevPose The previous pose of the ragdoll, used to calculate the target velocity for each motor + /// @param inPose The target pose of the ragdoll, used to calculate the target position for each motor + /// @param inDeltaTime The time between inPrevPose and inPose, used to calculate the target velocity for each motor + /// + /// + /// Throws ArgumentException for pose: "pose must use the ragdoll's own skeleton (SkeletonPose.SetSkeleton + /// with RagdollSettings.GetSkeleton())." Throws ArgumentException for prevPose: "prevPose must use the + /// ragdoll's own skeleton (SkeletonPose.SetSkeleton with RagdollSettings.GetSkeleton())." Throws + /// ArgumentException for deltaTime: "deltaTime must be greater than zero." + /// + /// + public void DriveToPoseUsingMotors(SkeletonPose prevPose, SkeletonPose pose, float deltaTime) + { + Jolt.PInvoke.Ragdoll_DriveToPoseUsingMotors_2(this, prevPose, pose, deltaTime, out var _bufferCheck); + if (_bufferCheck == 1) + throw new ArgumentException( + "pose must use the ragdoll's own skeleton (SkeletonPose.SetSkeleton with RagdollSettings.GetSkeleton()).", + nameof(pose) + ); + if (_bufferCheck == 2) + throw new ArgumentException( + "prevPose must use the ragdoll's own skeleton (SkeletonPose.SetSkeleton with RagdollSettings.GetSkeleton()).", + nameof(prevPose) + ); + if (_bufferCheck == 3) + throw new ArgumentException("deltaTime must be greater than zero.", nameof(deltaTime)); + } + + /// + /// + /// Control the linear and velocity of all bodies in the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:196 + ///
+ /// void SetLinearAndAngularVelocity(Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity, bool inLockBodies = true) + ///
+ ///
+ public void SetLinearAndAngularVelocity( + float3 linearVelocity, + float3 angularVelocity, + bool lockBodies = true + ) => Jolt.PInvoke.Ragdoll_SetLinearAndAngularVelocity(this, linearVelocity, angularVelocity, lockBodies); + + /// + /// + /// Set the world space linear velocity of all bodies in the ragdoll. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:199 + ///
+ /// void SetLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true) + ///
+ ///
+ public void SetLinearVelocity(float3 linearVelocity, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_SetLinearVelocity(this, linearVelocity, lockBodies); + + /// + /// + /// Add a world space velocity (in m/s) to all bodies in the ragdoll. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:202 + ///
+ /// void AddLinearVelocity(Vec3Arg inLinearVelocity, bool inLockBodies = true) + ///
+ ///
+ public void AddLinearVelocity(float3 linearVelocity, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_AddLinearVelocity(this, linearVelocity, lockBodies); + + /// + /// + /// Add impulse to all bodies of the ragdoll (center of mass of each of them) + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:205 + ///
+ /// void AddImpulse(Vec3Arg inImpulse, bool inLockBodies = true) + ///
+ ///
+ public void AddImpulse(float3 impulse, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_AddImpulse(this, impulse, lockBodies); + + /// + /// + /// Get the position and orientation of the root of the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:208 + ///
+ /// void GetRootTransform(RVec3 &outPosition, Quat &outRotation, bool inLockBodies = true) const + ///
+ ///
+ public void GetRootTransform(out float3 position, out floatQuat rotation, bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_GetRootTransform(this, out position, out rotation, lockBodies); + + /// + /// + /// Get number of bodies in the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:211 + ///
+ /// size_t GetBodyCount() const + ///
+ ///
+ public ElementCount GetBodyCount() => (ElementCount)Jolt.PInvoke.Ragdoll_GetBodyCount(this); + + /// + /// + /// Access a body ID + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:214 + ///
+ /// BodyID GetBodyID(int inBodyIndex) const + ///
+ ///
+ public uint GetBodyID(int bodyIndex) + { + var _result = Jolt.PInvoke.Ragdoll_GetBodyID(this, bodyIndex, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(bodyIndex), + bodyIndex, + "Expected an index below the number of bodies." + ); + return _result; + } + + /// + /// + /// Access to the array of body IDs + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:217 + ///
+ /// const Array<BodyID> & GetBodyIDs() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetBodyIDs() + { + Jolt.PInvoke.Ragdoll_GetBodyIDs(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Get number of constraints in the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:220 + ///
+ /// size_t GetConstraintCount() const + ///
+ ///
+ public ElementCount GetConstraintCount() => (ElementCount)Jolt.PInvoke.Ragdoll_GetConstraintCount(this); + + /// + /// + /// Access a constraint by index + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:223 + ///
+ /// TwoBodyConstraint * GetConstraint(int inConstraintIndex) + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public TwoBodyConstraint GetConstraint(int constraintIndex) + { + var _result = Jolt.PInvoke.Ragdoll_GetConstraint(this, constraintIndex, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(constraintIndex), + constraintIndex, + "Expected an index below the number of constraints." + ); + return _result; + } + + /// + /// + /// Get world space bounding box for all bodies of the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:229 + ///
+ /// AABox GetWorldSpaceBounds(bool inLockBodies = true) const + ///
+ ///
+ public AABox GetWorldSpaceBounds(bool lockBodies = true) => + Jolt.PInvoke.Ragdoll_GetWorldSpaceBounds(this, lockBodies); + + /// + /// + /// Get the settings object that created this ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:232 + ///
+ /// const RagdollSettings * GetRagdollSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public RagdollSettings GetRagdollSettings() => Jolt.PInvoke.Ragdoll_GetRagdollSettings(this); + + public void AddRef() => Jolt.PInvoke.Ragdoll_AddRef(this); + + public void Release() => Jolt.PInvoke.Ragdoll_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.Ragdoll_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/RagdollSettings.gen.cs b/Brutal.Jolt/Generated/Classes/RagdollSettings.gen.cs new file mode 100644 index 0000000..731a3d8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RagdollSettings.gen.cs @@ -0,0 +1,522 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Contains the structure of a ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:21 + ///
+ /// class RagdollSettings : public RefTarget<RagdollSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct RagdollSettings : IDisposable + { + public static RagdollSettings Create() => Jolt.PInvoke.RagdollSettings_Create(); + + /// + /// + /// Stabilize the constraints of the ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:28 + ///
+ /// bool Stabilize() + ///
+ ///
+ /// + /// + /// Stabilize the constraints of the ragdoll + /// @return True on success, false on failure. + /// + /// + public bool Stabilize() => Jolt.PInvoke.RagdollSettings_Stabilize(this); + + /// + /// + /// Initializes the constraint priorities so that constraints near the leaves of the ragdoll have a lower + /// priority than constraints near the root of the ragdoll. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:33 + ///
+ /// void CalculateConstraintPriorities(uint32 inBasePriority = 0) + ///
+ ///
+ /// + /// + /// Initializes the constraint priorities so that constraints near the leaves of the ragdoll have a lower priority + /// than constraints near the root of the ragdoll. + /// @param inBasePriority The lowest priority that will be used in the ragdoll. + /// + /// + public void CalculateConstraintPriorities(uint basePriority = 0) => + Jolt.PInvoke.RagdollSettings_CalculateConstraintPriorities(this, basePriority); + + /// + /// + /// After the ragdoll has been fully configured, call this function to automatically create and add a + /// GroupFilterTable collision filter to all bodies and configure them so that parent and children don't + /// collide. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:47 + ///
+ /// void DisableParentChildCollisions(const Mat44 *inJointMatrices = nullptr, float inMinSeparationDistance = 0.0f) + ///
+ ///
+ /// + /// + /// After the ragdoll has been fully configured, call this function to automatically create and add a GroupFilterTable collision filter to all bodies + /// and configure them so that parent and children don't collide. + /// + /// This will: + /// - Create a GroupFilterTable and assign it to all of the bodies in a ragdoll. + /// - Each body in your ragdoll will get a SubGroupID that is equal to the joint index in the Skeleton that it is attached to. + /// - Loop over all joints in the Skeleton and call GroupFilterTable::DisableCollision(joint index, parent joint index). + /// - When a pose is provided through inJointMatrices the function will detect collisions between joints + /// (they must be separated by more than inMinSeparationDistance to be treated as not colliding) and automatically disable collisions. + /// + /// When you create an instance using Ragdoll::CreateRagdoll pass in a unique GroupID for each ragdoll (e.g. a simple counter), note that this number + /// should be unique throughout the PhysicsSystem, so if you have different types of ragdolls they should not share the same GroupID. + /// + /// + /// jointMatrices must hold exactly one element per joint in the skeleton - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only + /// used for the duration of the call. Throws InvalidOperationException: "The ragdoll settings have no + /// skeleton. Set one with SetSkeleton before calling this." + /// + /// + public unsafe void DisableParentChildCollisions( + ReadOnlySpan jointMatrices = default, + float minSeparationDistance = 0f + ) + { + fixed (float4x4* jointMatrices_fixed = jointMatrices) + { + Jolt.PInvoke.RagdollSettings_DisableParentChildCollisions( + this, + jointMatrices_fixed, + (uint)jointMatrices.Length, + minSeparationDistance, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new InvalidOperationException( + "The ragdoll settings have no skeleton. Set one with SetSkeleton before calling this." + ); + if (_bufferCheck == 2) + throw new ArgumentOutOfRangeException( + nameof(jointMatrices), + jointMatrices.Length, + "Expected one element per joint in the skeleton, or an empty span." + ); + } + } + + /// + /// + /// Saves the state of this object in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:53 + ///
+ /// void SaveBinaryState(StreamOut &inStream, bool inSaveShapes, bool inSaveGroupFilter) const + ///
+ ///
+ /// + /// + /// Saves the state of this object in binary form to inStream. + /// @param inStream The stream to save the state to + /// @param inSaveShapes If the shapes should be saved as well (these could be shared between ragdolls, in which case the calling application may want to write custom code to restore them) + /// @param inSaveGroupFilter If the group filter should be saved as well (these could be shared) + /// + /// + public void SaveBinaryState(StreamOut stream, bool saveShapes, bool saveGroupFilter) => + Jolt.PInvoke.RagdollSettings_SaveBinaryState(this, stream, saveShapes, saveGroupFilter); + + /// + /// + /// Restore a saved ragdoll from inStream + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:58 + ///
+ /// static RagdollResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static RagdollSettings RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.RagdollSettings_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create ragdoll instance from these settings + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:62 + ///
+ /// Ragdoll * CreateRagdoll(CollisionGroup::GroupID inCollisionGroup, uint64 inUserData, PhysicsSystem *inSystem) const + ///
+ ///
+ /// + /// + /// Create ragdoll instance from these settings + /// @return Newly created ragdoll or null when out of bodies + /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. Throws + /// InvalidOperationException: "A part with a constraint to its parent has no parent joint created before + /// it. After loading ragdoll settings call Skeleton.CalculateParentJointIndices(), and order joints parents + /// first." Throws InvalidOperationException: "An additional constraint has no constraint settings, or names + /// a body index outside the parts." + /// + /// + public Ragdoll CreateRagdoll(uint collisionGroup, ulong userData, PhysicsSystem system) + { + var _result = Jolt.PInvoke.RagdollSettings_CreateRagdoll( + this, + collisionGroup, + userData, + system, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new InvalidOperationException( + "A part with a constraint to its parent has no parent joint created before it. After loading ragdoll settings call Skeleton.CalculateParentJointIndices(), and order joints parents first." + ); + if (_bufferCheck == 2) + throw new InvalidOperationException( + "An additional constraint has no constraint settings, or names a body index outside the parts." + ); + return _result; + } + + /// + /// + /// Access to the skeleton of this ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:65 + ///
+ /// const Skeleton * GetSkeleton() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Skeleton GetSkeleton() => Jolt.PInvoke.RagdollSettings_GetSkeleton(this); + + /// + /// + /// Calculate the map needed for GetBodyIndexToConstraintIndex() + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:69 + ///
+ /// void CalculateBodyIndexToConstraintIndex() + ///
+ ///
+ public void CalculateBodyIndexToConstraintIndex() => + Jolt.PInvoke.RagdollSettings_CalculateBodyIndexToConstraintIndex(this); + + /// + /// + /// Get table that maps a body index to the constraint index with which it is connected to its parent. -1 if + /// there is no constraint associated with the body. Note that this will only tell you which constraint + /// connects the body to its parent, it will not look in the additional constraint list. + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:73 + ///
+ /// const Array<int> & GetBodyIndexToConstraintIndex() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetBodyIndexToConstraintIndex() + { + Jolt.PInvoke.RagdollSettings_GetBodyIndexToConstraintIndex(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Map a single body index to a constraint index + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:76 + ///
+ /// int GetConstraintIndexForBodyIndex(int inBodyIndex) const + ///
+ ///
+ public int GetConstraintIndexForBodyIndex(int bodyIndex) + { + var _result = Jolt.PInvoke.RagdollSettings_GetConstraintIndexForBodyIndex( + this, + bodyIndex, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(bodyIndex), + bodyIndex, + "Expected an index below the number of bodies." + ); + return _result; + } + + /// + /// + /// Calculate the map needed for GetConstraintIndexToBodyIdxPair() + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:79 + ///
+ /// void CalculateConstraintIndexToBodyIdxPair() + ///
+ ///
+ public void CalculateConstraintIndexToBodyIdxPair() => + Jolt.PInvoke.RagdollSettings_CalculateConstraintIndexToBodyIdxPair(this); + + /// + /// + /// Table that maps a constraint index (index in mConstraints) to the indices of the bodies that the + /// constraint is connected to (index in mBodyIDs) + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:84 + ///
+ /// const Array<BodyIdxPair> & GetConstraintIndexToBodyIdxPair() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetConstraintIndexToBodyIdxPair() + { + Jolt.PInvoke.RagdollSettings_GetConstraintIndexToBodyIdxPair(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Map a single constraint index (index in mConstraints) to the indices of the bodies that the constraint + /// is connected to (index in mBodyIDs) + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:87 + ///
+ /// BodyIdxPair GetBodyIndicesForConstraintIndex(int inConstraintIndex) const + ///
+ ///
+ public int2 GetBodyIndicesForConstraintIndex(int constraintIndex) + { + var _result = Jolt.PInvoke.RagdollSettings_GetBodyIndicesForConstraintIndex( + this, + constraintIndex, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(constraintIndex), + constraintIndex, + "Expected an index below the number of constraints." + ); + return _result; + } + + /// + /// + /// Serialises this object (and everything it references) into buffer as a Jolt object stream, and returns + /// the total size of that stream. Nothing is written past the end of the buffer, so a return value larger + /// than buffer.Length means the buffer was too small and the call should be retried with one that size - + /// passing an empty span is how you ask for the size. Each call serialises the object's current state + /// independently and retains nothing after it returns. If the object grows between the size query and the + /// fill, use the fill's returned size to retry with a larger buffer. Text streams are human-readable and + /// portable; binary ones are smaller. Read one back with RagdollSettings.RestoreFromObjectStream. Throws + /// JoltException with Jolt's error message when the object can't be written, and + /// ArgumentOutOfRangeException when streamType is neither Text nor Binary. + /// + /// + public unsafe ByteSize SaveObjectStream(Span buffer, ObjectStreamType streamType = ObjectStreamType.Text) + { + fixed (byte* buffer_fixed = buffer) + { + if (streamType is not (ObjectStreamType.Text or ObjectStreamType.Binary)) + throw new ArgumentOutOfRangeException( + nameof(streamType), + streamType, + "Not an object stream format." + ); + var _size = Jolt.PInvoke.RagdollSettings_SaveObjectStream( + this, + buffer_fixed, + (nuint)buffer.Length, + streamType + ); + if (_size == 0) + throw JoltException.FromLastError(); + return (ByteSize)_size; + } + } + + /// + /// + /// Reads back an object stream written by SaveObjectStream (or by Jolt's own tools - the .tof and .bof + /// asset files), in either the text or the binary format: the stream's header says which. The factory has + /// to be up and RegisterTypes() called first, since class names are resolved through it. A stream that + /// isn't an object stream, is a different version, or holds a different type throws JoltException with + /// Jolt's error message. Truncation is NOT reliably caught: Jolt's reader treats running out of data as a + /// normal end of stream, so a stream cut off after the main object was read comes back as an object whose + /// unresolved references were silently set to null - code reading untrusted input has to validate what it + /// got. The returned handle is yours - it carries its own reference, so Dispose it once when you are done + /// with it. + /// + /// + public static unsafe RagdollSettings RestoreFromObjectStream(ReadOnlySpan data) + { + fixed (byte* data_fixed = data) + { + var _handle = Jolt.PInvoke.RagdollSettings_RestoreFromObjectStream(data_fixed, (nuint)data.Length); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + } + + /// + /// + /// Resizes the part list, one part per skeleton joint, new parts default-constructed. Any GetParts() view + /// taken before this is stale. + /// + /// + public void SetPartCount(int count) + { + if (count < 0) + throw new ArgumentOutOfRangeException(nameof(count), count, "Expected a count of 0 or more."); + Jolt.PInvoke.RagdollSettings_SetPartCount(this, count); + } + + /// + /// + /// The constraint joining part index to its parent, or a null handle for the root (or a part not given one + /// yet). + /// + /// + public TwoBodyConstraintSettings GetPartToParent(int index) + { + if (index < 0 || index >= GetParts().Count) + throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below the part count."); + return Jolt.PInvoke.RagdollSettings_GetPartToParent(this, index); + } + + /// + /// + /// Sets the constraint joining part index to its parent; the settings keep their own reference, so + /// constraint can be disposed afterwards. A null handle clears it, as the root part's is. + /// + /// + public void SetPartToParent(int index, TwoBodyConstraintSettings constraint) + { + if (index < 0 || index >= GetParts().Count) + throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below the part count."); + Jolt.PInvoke.RagdollSettings_SetPartToParent(this, index, constraint); + } + + /// + /// + /// The skeleton for this ragdoll + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:119 + ///
+ /// Ref<Skeleton> mSkeleton + ///
+ ///
+ public void SetSkeleton(Skeleton value) => Jolt.PInvoke.RagdollSettings_SetSkeleton(this, value); + + /// + /// + /// For each of the joints, the body and constraint attaching it to its parent body (1-on-1 with + /// mSkeleton.GetJoints()) + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:122 + ///
+ /// PartVector mParts + ///
+ ///
+ /// + /// + /// The view is the container's own storage, not a copy: each handle it hands out points straight at the + /// element inside the owner, so writing through one edits the object that owns it. The handles are borrowed + /// - never Dispose one. The view is only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public NativeHandleSpan GetParts() + { + Jolt.PInvoke.RagdollSettings_GetParts(this, out var _outResult); + return new NativeHandleSpan(_outResult); + } + + public void AddRef() => Jolt.PInvoke.RagdollSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.RagdollSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.RagdollSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/RayCastSettings.gen.cs b/Brutal.Jolt/Generated/Classes/RayCastSettings.gen.cs new file mode 100644 index 0000000..a36218e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RayCastSettings.gen.cs @@ -0,0 +1,127 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings to be passed with a ray cast + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:69 + ///
+ /// class RayCastSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct RayCastSettings : IDisposable + { + public static RayCastSettings Create() => Jolt.PInvoke.RayCastSettings_Create(); + + /// + /// + /// Set the backfacing mode for all shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:75 + ///
+ /// void SetBackFaceMode(EBackFaceMode inMode) + ///
+ ///
+ public void SetBackFaceMode(BackFaceMode mode) => Jolt.PInvoke.RayCastSettings_SetBackFaceMode(this, mode); + + /// + /// + /// How backfacing triangles should be treated (should we report back facing hits for triangle based shapes, + /// e.g. MeshShape/HeightFieldShape?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:78 + ///
+ /// EBackFaceMode mBackFaceModeTriangles = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public BackFaceMode GetBackFaceModeTriangles() => Jolt.PInvoke.RayCastSettings_GetBackFaceModeTriangles(this); + + /// + /// + /// How backfacing triangles should be treated (should we report back facing hits for triangle based shapes, + /// e.g. MeshShape/HeightFieldShape?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:78 + ///
+ /// EBackFaceMode mBackFaceModeTriangles = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public void SetBackFaceModeTriangles(BackFaceMode value) => + Jolt.PInvoke.RayCastSettings_SetBackFaceModeTriangles(this, value); + + /// + /// + /// How backfacing convex objects should be treated (should we report back facing hits for convex shapes?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:81 + ///
+ /// EBackFaceMode mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public BackFaceMode GetBackFaceModeConvex() => Jolt.PInvoke.RayCastSettings_GetBackFaceModeConvex(this); + + /// + /// + /// How backfacing convex objects should be treated (should we report back facing hits for convex shapes?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:81 + ///
+ /// EBackFaceMode mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public void SetBackFaceModeConvex(BackFaceMode value) => + Jolt.PInvoke.RayCastSettings_SetBackFaceModeConvex(this, value); + + /// + /// + /// If convex shapes should be treated as solid. When true, a ray starting inside a convex shape will + /// generate a hit at fraction 0. + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:84 + ///
+ /// bool mTreatConvexAsSolid = true + ///
+ ///
+ public bool GetTreatConvexAsSolid() => Jolt.PInvoke.RayCastSettings_GetTreatConvexAsSolid(this); + + /// + /// + /// If convex shapes should be treated as solid. When true, a ray starting inside a convex shape will + /// generate a hit at fraction 0. + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:84 + ///
+ /// bool mTreatConvexAsSolid = true + ///
+ ///
+ public void SetTreatConvexAsSolid(bool value) => + Jolt.PInvoke.RayCastSettings_SetTreatConvexAsSolid(this, value); + + public void Dispose() => Jolt.PInvoke.RayCastSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RayInvDirection.gen.cs b/Brutal.Jolt/Generated/Classes/RayInvDirection.gen.cs new file mode 100644 index 0000000..8890ae3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RayInvDirection.gen.cs @@ -0,0 +1,115 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Helper structure holding the reciprocal of a ray for Ray vs AABox testing + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:10 + ///
+ /// class RayInvDirection + ///
+ ///
+ [InteropHandle] + public readonly partial struct RayInvDirection : IDisposable + { + /// + /// + /// Constructors + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:14 + ///
+ /// inline RayInvDirection() = default + ///
+ ///
+ public static RayInvDirection Create() => Jolt.PInvoke.RayInvDirection_Create(); + + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:15 + ///
+ /// inline explicit RayInvDirection(Vec3Arg inDirection) + ///
+ ///
+ public static RayInvDirection Create(float3 direction) => Jolt.PInvoke.RayInvDirection_Create_2(direction); + + /// + /// + /// Set reciprocal from ray direction + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:18 + ///
+ /// inline void Set(Vec3Arg inDirection) + ///
+ ///
+ public void Set(float3 direction) => Jolt.PInvoke.RayInvDirection_Set(this, direction); + + /// + /// + /// 1 / ray direction + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:27 + ///
+ /// Vec3 mInvDirection + ///
+ ///
+ public float3 GetInvDirection() => Jolt.PInvoke.RayInvDirection_GetInvDirection(this); + + /// + /// + /// 1 / ray direction + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:27 + ///
+ /// Vec3 mInvDirection + ///
+ ///
+ public void SetInvDirection(float3 value) => Jolt.PInvoke.RayInvDirection_SetInvDirection(this, value); + + /// + /// + /// for each component if it is parallel to the coordinate axis + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:28 + ///
+ /// UVec4 mIsParallel + ///
+ ///
+ public uint4 GetIsParallel() => Jolt.PInvoke.RayInvDirection_GetIsParallel(this); + + /// + /// + /// for each component if it is parallel to the coordinate axis + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:28 + ///
+ /// UVec4 mIsParallel + ///
+ ///
+ public void SetIsParallel(uint4 value) => Jolt.PInvoke.RayInvDirection_SetIsParallel(this, value); + + public void Dispose() => Jolt.PInvoke.RayInvDirection_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ReversedShapeFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ReversedShapeFilter.gen.cs new file mode 100644 index 0000000..a28b98c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ReversedShapeFilter.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Helper class to reverse the order of the shapes in the ShouldCollide function + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:50 + ///
+ /// class ReversedShapeFilter : public ShapeFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct ReversedShapeFilter : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:54 + ///
+ /// explicit ReversedShapeFilter(const ShapeFilter &inFilter) + ///
+ ///
+ public static ReversedShapeFilter Create(ShapeFilter filter) => Jolt.PInvoke.ReversedShapeFilter_Create(filter); + + /// + public bool ShouldCollide(Shape shape2, uint subShapeIDOfShape2) => + ((ShapeFilter)this).ShouldCollide(shape2, subShapeIDOfShape2); + + /// + public bool ShouldCollide(Shape shape1, uint subShapeIDOfShape1, Shape shape2, uint subShapeIDOfShape2) => + ((ShapeFilter)this).ShouldCollide(shape1, subShapeIDOfShape1, shape2, subShapeIDOfShape2); + + public static implicit operator ShapeFilter(ReversedShapeFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.ReversedShapeFilter_Destroy(this); + + /// + public uint GetBodyID2() => ((ShapeFilter)this).GetBodyID2(); + + /// + public void SetBodyID2(uint value) => ((ShapeFilter)this).SetBodyID2(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RotatedTranslatedShape.gen.cs b/Brutal.Jolt/Generated/Classes/RotatedTranslatedShape.gen.cs new file mode 100644 index 0000000..e2815f8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RotatedTranslatedShape.gen.cs @@ -0,0 +1,383 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A rotated translated shape will rotate and translate a child shape. Shifts the child object so that it is + /// centered around the center of mass. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:38 + ///
+ /// class RotatedTranslatedShape final : public DecoratedShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct RotatedTranslatedShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:44 + ///
+ /// RotatedTranslatedShape() + ///
+ ///
+ public static RotatedTranslatedShape Create() => Jolt.PInvoke.RotatedTranslatedShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:45 + ///
+ /// RotatedTranslatedShape(const RotatedTranslatedShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static RotatedTranslatedShape Create(RotatedTranslatedShapeSettings settings) + { + var _handle = Jolt.PInvoke.RotatedTranslatedShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:46 + ///
+ /// RotatedTranslatedShape(Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape) + ///
+ ///
+ public static RotatedTranslatedShape Create(float3 position, floatQuat rotation, Shape shape) => + Jolt.PInvoke.RotatedTranslatedShape_Create_3(position, rotation, shape); + + /// + /// + /// Access the rotation that is applied to the inner shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:49 + ///
+ /// Quat GetRotation() const + ///
+ ///
+ public floatQuat GetRotation() => Jolt.PInvoke.RotatedTranslatedShape_GetRotation(this); + + /// + /// + /// Access the translation that has been applied to the inner shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:52 + ///
+ /// Vec3 GetPosition() const + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.RotatedTranslatedShape_GetPosition(this); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Transform the scale to the local space of the child shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:131 + ///
+ /// inline Vec3 TransformScale(Vec3Arg inScale) const + ///
+ ///
+ public float3 TransformScale(float3 scale) => Jolt.PInvoke.RotatedTranslatedShape_TransformScale(this, scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:141 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.RotatedTranslatedShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator DecoratedShape(RotatedTranslatedShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(RotatedTranslatedShape value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Shape GetInnerShape() => ((DecoratedShape)this).GetInnerShape(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RotatedTranslatedShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/RotatedTranslatedShapeSettings.gen.cs new file mode 100644 index 0000000..ac84f04 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RotatedTranslatedShapeSettings.gen.cs @@ -0,0 +1,168 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a RotatedTranslatedShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:15 + ///
+ /// class RotatedTranslatedShapeSettings final : public DecoratedShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct RotatedTranslatedShapeSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:21 + ///
+ /// RotatedTranslatedShapeSettings() = default + ///
+ ///
+ public static RotatedTranslatedShapeSettings Create() => Jolt.PInvoke.RotatedTranslatedShapeSettings_Create(); + + /// + /// + /// Construct with shape settings, can be serialized. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:24 + ///
+ /// RotatedTranslatedShapeSettings(Vec3Arg inPosition, QuatArg inRotation, const ShapeSettings *inShape) + ///
+ ///
+ public static RotatedTranslatedShapeSettings Create(float3 position, floatQuat rotation, ShapeSettings shape) => + Jolt.PInvoke.RotatedTranslatedShapeSettings_Create_2(position, rotation, shape); + + /// + /// + /// Variant that uses a concrete shape, which means this object cannot be serialized. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:27 + ///
+ /// RotatedTranslatedShapeSettings(Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape) + ///
+ ///
+ public static RotatedTranslatedShapeSettings Create(float3 position, floatQuat rotation, Shape shape) => + Jolt.PInvoke.RotatedTranslatedShapeSettings_Create_3(position, rotation, shape); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Position of the sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:32 + ///
+ /// Vec3 mPosition + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.RotatedTranslatedShapeSettings_GetPosition(this); + + /// + /// + /// Position of the sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:32 + ///
+ /// Vec3 mPosition + ///
+ ///
+ public void SetPosition(float3 value) => Jolt.PInvoke.RotatedTranslatedShapeSettings_SetPosition(this, value); + + /// + /// + /// Rotation of the sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:33 + ///
+ /// Quat mRotation + ///
+ ///
+ public floatQuat GetRotation() => Jolt.PInvoke.RotatedTranslatedShapeSettings_GetRotation(this); + + /// + /// + /// Rotation of the sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h:33 + ///
+ /// Quat mRotation + ///
+ ///
+ public void SetRotation(floatQuat value) => + Jolt.PInvoke.RotatedTranslatedShapeSettings_SetRotation(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator DecoratedShapeSettings(RotatedTranslatedShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(RotatedTranslatedShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeSettings GetInnerShape() => ((DecoratedShapeSettings)this).GetInnerShape(); + + /// + public void SetInnerShape(ShapeSettings value) => ((DecoratedShapeSettings)this).SetInnerShape(value); + + /// + public Shape GetInnerShapePtr() => ((DecoratedShapeSettings)this).GetInnerShapePtr(); + + /// + public void SetInnerShapePtr(Shape value) => ((DecoratedShapeSettings)this).SetInnerShapePtr(value); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RotationEulerConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/RotationEulerConstraintPart.gen.cs new file mode 100644 index 0000000..66846eb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RotationEulerConstraintPart.gen.cs @@ -0,0 +1,237 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constrains rotation around all axis so that only translation is allowed + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:35 + ///
+ /// class RotationEulerConstraintPart + ///
+ ///
+ /// + /// + /// Constrains rotation around all axis so that only translation is allowed + /// + /// Based on: "Constraints Derivation for Rigid Body Simulation in 3D" - Daniel Chappuis, section 2.5.1 + /// + /// Constraint equation (eq 129): + /// + /// \f[C = \begin{bmatrix}\Delta\theta_x, \Delta\theta_y, \Delta\theta_z\end{bmatrix}\f] + /// + /// Jacobian (eq 131): + /// + /// \f[J = \begin{bmatrix}0 & -E & 0 & E\end{bmatrix}\f] + /// + /// Used terms (here and below, everything in world space):\n + /// delta_theta_* = difference in rotation between initial rotation of bodies 1 and 2.\n + /// x1, x2 = center of mass for the bodies.\n + /// v = [v1, w1, v2, w2].\n + /// v1, v2 = linear velocity of body 1 and 2.\n + /// w1, w2 = angular velocity of body 1 and 2.\n + /// M = mass matrix, a diagonal matrix of the mass and inertia with diagonal [m1, I1, m2, I2].\n + /// \f$K^{-1} = \left( J M^{-1} J^T \right)^{-1}\f$ = effective mass.\n + /// b = velocity bias.\n + /// \f$\beta\f$ = baumgarte constant.\n + /// E = identity matrix.\n + /// + /// + [InteropHandle] + public readonly partial struct RotationEulerConstraintPart : IDisposable + { + public static RotationEulerConstraintPart Create() => Jolt.PInvoke.RotationEulerConstraintPart_Create(); + + /// + /// + /// Return inverse of initial rotation from body 1 to body 2 in body 1 space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:63 + ///
+ /// static Quat sGetInvInitialOrientation(const Body &inBody1, const Body &inBody2) + ///
+ ///
+ public static floatQuat GetInvInitialOrientation(Body body1, Body body2) => + Jolt.PInvoke.RotationEulerConstraintPart_GetInvInitialOrientation(body1, body2); + + /// + /// + /// Return inverse of initial rotation from body 1 to body 2 in body 1 space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:82 + ///
+ /// static Quat sGetInvInitialOrientationXY(Vec3Arg inAxisX1, Vec3Arg inAxisY1, Vec3Arg inAxisX2, Vec3Arg inAxisY2) + ///
+ ///
+ /// + /// + /// @brief Return inverse of initial rotation from body 1 to body 2 in body 1 space + /// @param inAxisX1 Reference axis X for body 1 + /// @param inAxisY1 Reference axis Y for body 1 + /// @param inAxisX2 Reference axis X for body 2 + /// @param inAxisY2 Reference axis Y for body 2 + /// + /// + public static floatQuat GetInvInitialOrientationXY( + float3 axisX1, + float3 axisY1, + float3 axisX2, + float3 axisY2 + ) => Jolt.PInvoke.RotationEulerConstraintPart_GetInvInitialOrientationXY(axisX1, axisY1, axisX2, axisY2); + + /// + /// + /// Return inverse of initial rotation from body 1 to body 2 in body 1 space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:123 + ///
+ /// static Quat sGetInvInitialOrientationXZ(Vec3Arg inAxisX1, Vec3Arg inAxisZ1, Vec3Arg inAxisX2, Vec3Arg inAxisZ2) + ///
+ ///
+ /// + /// + /// @brief Return inverse of initial rotation from body 1 to body 2 in body 1 space + /// @param inAxisX1 Reference axis X for body 1 + /// @param inAxisZ1 Reference axis Z for body 1 + /// @param inAxisX2 Reference axis X for body 2 + /// @param inAxisZ2 Reference axis Z for body 2 + /// + /// + public static floatQuat GetInvInitialOrientationXZ( + float3 axisX1, + float3 axisZ1, + float3 axisX2, + float3 axisZ2 + ) => Jolt.PInvoke.RotationEulerConstraintPart_GetInvInitialOrientationXZ(axisX1, axisZ1, axisX2, axisZ2); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:139 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, const Body &inBody2, Mat44Arg inRotation2) + ///
+ ///
+ public void CalculateConstraintProperties( + Body body1, + in float4x4 rotation1, + Body body2, + in float4x4 rotation2 + ) => + Jolt.PInvoke.RotationEulerConstraintPart_CalculateConstraintProperties( + this, + body1, + in rotation1, + body2, + in rotation2 + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:164 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.RotationEulerConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:171 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.RotationEulerConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:177 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.RotationEulerConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:184 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2) + ///
+ ///
+ public bool SolveVelocityConstraint(Body body1, Body body2) => + Jolt.PInvoke.RotationEulerConstraintPart_SolveVelocityConstraint(this, body1, body2); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:195 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, QuatArg inInvInitialOrientation, float inBaumgarte) const + ///
+ ///
+ public bool SolvePositionConstraint(Body body1, Body body2, floatQuat invInitialOrientation, float baumgarte) => + Jolt.PInvoke.RotationEulerConstraintPart_SolvePositionConstraint( + this, + body1, + body2, + invInitialOrientation, + baumgarte + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h:259 + ///
+ /// Vec3 GetTotalLambda() const + ///
+ ///
+ public float3 GetTotalLambda() => Jolt.PInvoke.RotationEulerConstraintPart_GetTotalLambda(this); + + public void Dispose() => Jolt.PInvoke.RotationEulerConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/RotationQuatConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/RotationQuatConstraintPart.gen.cs new file mode 100644 index 0000000..2f60b0f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/RotationQuatConstraintPart.gen.cs @@ -0,0 +1,236 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Quaternion based constraint that constrains rotation around all axis so that only translation is allowed. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:86 + ///
+ /// class RotationQuatConstraintPart + ///
+ ///
+ /// + /// + /// Quaternion based constraint that constrains rotation around all axis so that only translation is allowed. + /// + /// NOTE: This constraint part is more expensive than the RotationEulerConstraintPart and slightly more correct since + /// RotationEulerConstraintPart::SolvePositionConstraint contains an approximation. In practice the difference + /// is small, so the RotationEulerConstraintPart is probably the better choice. + /// + /// Rotation is fixed between bodies like this: + /// + /// q2 = q1 r0 + /// + /// Where: + /// q1, q2 = world space quaternions representing rotation of body 1 and 2. + /// r0 = initial rotation between bodies in local space of body 1, this can be calculated by: + /// + /// q20 = q10 r0 + /// <=> r0 = q10^* q20 + /// + /// Where: + /// q10, q20 = initial world space rotations of body 1 and 2. + /// q10^* = conjugate of quaternion q10 (which is the same as the inverse for a unit quaternion) + /// + /// We exclusively use the conjugate below: + /// + /// r0^* = q20^* q10 + /// + /// The error in the rotation is (in local space of body 1): + /// + /// q2 = q1 error r0 + /// <=> error = q1^* q2 r0^* + /// + /// The imaginary part of the quaternion represents the rotation axis * sin(angle / 2). The real part of the quaternion + /// does not add any additional information (we know the quaternion in normalized) and we're removing 3 degrees of freedom + /// so we want 3 parameters. Therefore we define the constraint equation like: + /// + /// C = A q1^* q2 r0^* = 0 + /// + /// Where (if you write a quaternion as [real-part, i-part, j-part, k-part]): + /// + /// [0, 1, 0, 0] + /// A = [0, 0, 1, 0] + /// [0, 0, 0, 1] + /// + /// or in our case since we store a quaternion like [i-part, j-part, k-part, real-part]: + /// + /// [1, 0, 0, 0] + /// A = [0, 1, 0, 0] + /// [0, 0, 1, 0] + /// + /// Time derivative: + /// + /// d/dt C = A (q1^* d/dt(q2) + d/dt(q1^*) q2) r0^* + /// = A (q1^* (1/2 W2 q2) + (1/2 W1 q1)^* q2) r0^* + /// = 1/2 A (q1^* W2 q2 + q1^* W1^* q2) r0^* + /// = 1/2 A (q1^* W2 q2 - q1^* W1 * q2) r0^* + /// = 1/2 A ML(q1^*) MR(q2 r0^*) (W2 - W1) + /// = 1/2 A ML(q1^*) MR(q2 r0^*) A^T (w2 - w1) + /// + /// Where: + /// W1 = [0, w1], W2 = [0, w2] (converting angular velocity to imaginary part of quaternion). + /// w1, w2 = angular velocity of body 1 and 2. + /// d/dt(q) = 1/2 W q (time derivative of a quaternion). + /// W^* = -W (conjugate negates angular velocity as quaternion). + /// ML(q): 4x4 matrix so that q * p = ML(q) * p, where q and p are quaternions. + /// MR(p): 4x4 matrix so that q * p = MR(p) * q, where q and p are quaternions. + /// A^T: Transpose of A. + /// + /// Jacobian: + /// + /// J = [0, -1/2 A ML(q1^*) MR(q2 r0^*) A^T, 0, 1/2 A ML(q1^*) MR(q2 r0^*) A^T] + /// = [0, -JP, 0, JP] + /// + /// Suggested reading: + /// - 3D Constraint Derivations for Impulse Solvers - Marijn Tamis + /// - Game Physics Pearls - Section 9 - Quaternion Based Constraints - Claude Lacoursiere + /// + /// + [InteropHandle] + public readonly partial struct RotationQuatConstraintPart : IDisposable + { + public static RotationQuatConstraintPart Create() => Jolt.PInvoke.RotationQuatConstraintPart_Create(); + + /// + /// + /// Return inverse of initial rotation from body 1 to body 2 in body 1 space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:114 + ///
+ /// static Quat sGetInvInitialOrientation(const Body &inBody1, const Body &inBody2) + ///
+ ///
+ public static floatQuat GetInvInitialOrientation(Body body1, Body body2) => + Jolt.PInvoke.RotationQuatConstraintPart_GetInvInitialOrientation(body1, body2); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:129 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, const Body &inBody2, Mat44Arg inRotation2, QuatArg inInvInitialOrientation) + ///
+ ///
+ public void CalculateConstraintProperties( + Body body1, + in float4x4 rotation1, + Body body2, + in float4x4 rotation2, + floatQuat invInitialOrientation + ) => + Jolt.PInvoke.RotationQuatConstraintPart_CalculateConstraintProperties( + this, + body1, + in rotation1, + body2, + in rotation2, + invInitialOrientation + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:150 + ///
+ /// inline void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.RotationQuatConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:158 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.RotationQuatConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:164 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.RotationQuatConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:171 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2) + ///
+ ///
+ public bool SolveVelocityConstraint(Body body1, Body body2) => + Jolt.PInvoke.RotationQuatConstraintPart_SolveVelocityConstraint(this, body1, body2); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:182 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, QuatArg inInvInitialOrientation, float inBaumgarte) const + ///
+ ///
+ public bool SolvePositionConstraint(Body body1, Body body2, floatQuat invInitialOrientation, float baumgarte) => + Jolt.PInvoke.RotationQuatConstraintPart_SolvePositionConstraint( + this, + body1, + body2, + invInitialOrientation, + baumgarte + ); + + /// + /// + /// Return lagrange multiplier + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h:221 + ///
+ /// Vec3 GetTotalLambda() const + ///
+ ///
+ public float3 GetTotalLambda() => Jolt.PInvoke.RotationQuatConstraintPart_GetTotalLambda(this); + + public void Dispose() => Jolt.PInvoke.RotationQuatConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ScaledShape.gen.cs b/Brutal.Jolt/Generated/Classes/ScaledShape.gen.cs new file mode 100644 index 0000000..cce5c9c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ScaledShape.gen.cs @@ -0,0 +1,358 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A shape that scales a child shape in local space of that shape. The scale can be non-uniform and can even + /// turn it inside out when one or three components of the scale are negative. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:37 + ///
+ /// class ScaledShape final : public DecoratedShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct ScaledShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:43 + ///
+ /// ScaledShape() + ///
+ ///
+ public static ScaledShape Create() => Jolt.PInvoke.ScaledShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:44 + ///
+ /// ScaledShape(const ScaledShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static ScaledShape Create(ScaledShapeSettings settings) + { + var _handle = Jolt.PInvoke.ScaledShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Constructor that decorates another shape with a scale + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:47 + ///
+ /// ScaledShape(const Shape *inShape, Vec3Arg inScale) + ///
+ ///
+ public static ScaledShape Create(Shape shape, float3 scale) => Jolt.PInvoke.ScaledShape_Create_3(shape, scale); + + /// + /// + /// Get the scale + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:50 + ///
+ /// Vec3 GetScale() const + ///
+ ///
+ public float3 GetScale() => Jolt.PInvoke.ScaledShape_GetScale(this); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:129 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.ScaledShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator DecoratedShape(ScaledShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(ScaledShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Shape GetInnerShape() => ((DecoratedShape)this).GetInnerShape(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ScaledShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ScaledShapeSettings.gen.cs new file mode 100644 index 0000000..c137417 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ScaledShapeSettings.gen.cs @@ -0,0 +1,135 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a ScaledShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:16 + ///
+ /// class ScaledShapeSettings final : public DecoratedShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct ScaledShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:22 + ///
+ /// ScaledShapeSettings() = default + ///
+ ///
+ public static ScaledShapeSettings Create() => Jolt.PInvoke.ScaledShapeSettings_Create(); + + /// + /// + /// Constructor that decorates another shape with a scale + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:25 + ///
+ /// ScaledShapeSettings(const ShapeSettings *inShape, Vec3Arg inScale) + ///
+ ///
+ public static ScaledShapeSettings Create(ShapeSettings shape, float3 scale) => + Jolt.PInvoke.ScaledShapeSettings_Create_2(shape, scale); + + /// + /// + /// Variant that uses a concrete shape, which means this object cannot be serialized. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:28 + ///
+ /// ScaledShapeSettings(const Shape *inShape, Vec3Arg inScale) + ///
+ ///
+ public static ScaledShapeSettings Create(Shape shape, float3 scale) => + Jolt.PInvoke.ScaledShapeSettings_Create_3(shape, scale); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:33 + ///
+ /// Vec3 mScale = Vec3(1, 1, 1) + ///
+ ///
+ public float3 GetScale() => Jolt.PInvoke.ScaledShapeSettings_GetScale(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/ScaledShape.h:33 + ///
+ /// Vec3 mScale = Vec3(1, 1, 1) + ///
+ ///
+ public void SetScale(float3 value) => Jolt.PInvoke.ScaledShapeSettings_SetScale(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator DecoratedShapeSettings(ScaledShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(ScaledShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeSettings GetInnerShape() => ((DecoratedShapeSettings)this).GetInnerShape(); + + /// + public void SetInnerShape(ShapeSettings value) => ((DecoratedShapeSettings)this).SetInnerShape(value); + + /// + public Shape GetInnerShapePtr() => ((DecoratedShapeSettings)this).GetInnerShapePtr(); + + /// + public void SetInnerShapePtr(Shape value) => ((DecoratedShapeSettings)this).SetInnerShapePtr(value); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Semaphore.gen.cs b/Brutal.Jolt/Generated/Classes/Semaphore.gen.cs new file mode 100644 index 0000000..afba401 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Semaphore.gen.cs @@ -0,0 +1,79 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implements a semaphore When we switch to C++20 we can use counting_semaphore to unify this + /// + /// + /// C++: + /// Jolt/Core/Semaphore.h:31 + ///
+ /// class Semaphore + ///
+ ///
+ [InteropHandle] + public readonly partial struct Semaphore : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Core/Semaphore.h:35 + ///
+ /// Semaphore() + ///
+ ///
+ public static Semaphore Create() => Jolt.PInvoke.Semaphore_Create(); + + /// + /// + /// Release the semaphore, signaling the thread waiting on the barrier that there may be work + /// + /// + /// C++: + /// Jolt/Core/Semaphore.h:39 + ///
+ /// void Release(uint inNumber = 1) + ///
+ ///
+ public void Release(uint number = 1) => Jolt.PInvoke.Semaphore_Release(this, number); + + /// + /// + /// Acquire the semaphore inNumber times + /// + /// + /// C++: + /// Jolt/Core/Semaphore.h:42 + ///
+ /// void Acquire(uint inNumber = 1) + ///
+ ///
+ public void Acquire(uint number = 1) => Jolt.PInvoke.Semaphore_Acquire(this, number); + + /// + /// + /// Get the current value of the semaphore + /// + /// + /// C++: + /// Jolt/Core/Semaphore.h:45 + ///
+ /// inline int GetValue() const + ///
+ ///
+ public int GetValue() => Jolt.PInvoke.Semaphore_GetValue(this); + + public void Dispose() => Jolt.PInvoke.Semaphore_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Shape.gen.cs b/Brutal.Jolt/Generated/Classes/Shape.gen.cs new file mode 100644 index 0000000..1b9af52 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Shape.gen.cs @@ -0,0 +1,1335 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for all shapes (collision volume of a body). Defines a virtual interface for collision detection. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:184 + ///
+ /// class Shape : public RefTarget<Shape>, public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct Shape : IDisposable + { + /// + /// + /// An opaque buffer that holds shape specific information during GetTrianglesStart/Next. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:347 + ///
+ /// struct alignas(16) GetTrianglesContext { uint8 mData[4288]; } + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 4288)] + public partial struct GetTrianglesContext + { + /// + /// + /// An opaque buffer that holds shape specific information during GetTrianglesStart/Next. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:347 + ///
+ /// uint8 mData[4288] + ///
+ ///
+ [FieldOffset(0)] + public byte_4288 Data; + } + + /// + /// + /// Class that holds information about the shape that can be used for logging / data collection purposes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:406 + ///
+ /// struct Stats + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Stats + { + /// + /// + /// Amount of memory used by this shape (size in bytes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:410 + ///
+ /// size_t mSizeBytes + ///
+ ///
+ [FieldOffset(0)] + public nuint SizeBytes; + + /// + /// + /// Number of triangles in this shape (when applicable) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:411 + ///
+ /// uint mNumTriangles + ///
+ ///
+ [FieldOffset(8)] + public uint NumTriangles; + } + + /// + /// + /// Get type + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:199 + ///
+ /// inline EShapeType GetType() const + ///
+ ///
+ public ShapeType GetShapeType() => Jolt.PInvoke.Shape_GetShapeType(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:200 + ///
+ /// inline EShapeSubType GetSubType() const + ///
+ ///
+ public ShapeSubType GetSubType() => Jolt.PInvoke.Shape_GetSubType(this); + + /// + /// + /// User data (to be used freely by the application) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:203 + ///
+ /// uint64 GetUserData() const + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.Shape_GetUserData(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:204 + ///
+ /// void SetUserData(uint64 inUserData) + ///
+ ///
+ public void SetUserData(ulong userData) => Jolt.PInvoke.Shape_SetUserData(this, userData); + + /// + /// + /// Check if this shape can only be used to create a static body or if it can also be dynamic/kinematic + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:207 + ///
+ /// virtual bool MustBeStatic() const + ///
+ ///
+ public bool MustBeStatic() => Jolt.PInvoke.Shape_MustBeStatic(this); + + /// + /// + /// All shapes are centered around their center of mass. This function returns the center of mass position + /// that needs to be applied to transform the shape to where it was created. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:210 + ///
+ /// virtual Vec3 GetCenterOfMass() const + ///
+ ///
+ public float3 GetCenterOfMass() => Jolt.PInvoke.Shape_GetCenterOfMass(this); + + /// + /// + /// Get local bounding box including convex radius, this box is centered around the center of mass rather + /// than the world transform + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:213 + ///
+ /// virtual AABox GetLocalBounds() const = 0 + ///
+ ///
+ public AABox GetLocalBounds() => Jolt.PInvoke.Shape_GetLocalBounds(this); + + /// + /// + /// Get the max number of sub shape ID bits that are needed to be able to address any leaf shape in this + /// shape. Used mainly for checking that it is smaller or equal than SubShapeID::MaxBits. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:216 + ///
+ /// virtual uint GetSubShapeIDBitsRecursive() const = 0 + ///
+ ///
+ public uint GetSubShapeIDBitsRecursive() => Jolt.PInvoke.Shape_GetSubShapeIDBitsRecursive(this); + + /// + /// + /// Get world space bounds including convex radius. This shape is scaled by inScale in local space first. + /// This function can be overridden to return a closer fitting world space bounding box, by default it will + /// just transform what GetLocalBounds() returns. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:221 + ///
+ /// virtual AABox GetWorldSpaceBounds(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale) const + ///
+ ///
+ public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + Jolt.PInvoke.Shape_GetWorldSpaceBounds(this, in centerOfMassTransform, scale); + + /// + /// + /// Get world space bounds including convex radius. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:224 + ///
+ /// AABox GetWorldSpaceBounds(DMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const + ///
+ ///
+ public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + Jolt.PInvoke.Shape_GetWorldSpaceBounds_2(this, in centerOfMassTransform, scale); + + /// + /// + /// Returns the radius of the biggest sphere that fits entirely in the shape. In case this shape consists of + /// multiple sub shapes, it returns the smallest sphere of the parts. This can be used as a measure of how + /// far the shape can be moved without risking going through geometry. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:237 + ///
+ /// virtual float GetInnerRadius() const = 0 + ///
+ ///
+ public float GetInnerRadius() => Jolt.PInvoke.Shape_GetInnerRadius(this); + + /// + /// + /// Calculate the mass and inertia of this shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:240 + ///
+ /// virtual MassProperties GetMassProperties() const = 0 + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MassProperties GetMassProperties() => Jolt.PInvoke.Shape_GetMassProperties(this); + + /// + /// + /// Get the leaf shape for a particular sub shape ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:246 + ///
+ /// virtual const Shape * GetLeafShape(const SubShapeID &inSubShapeID, SubShapeID &outRemainder) const + ///
+ ///
+ /// + /// + /// Get the leaf shape for a particular sub shape ID. + /// @param inSubShapeID The full sub shape ID that indicates the path to the leaf shape + /// @param outRemainder What remains of the sub shape ID after removing the path to the leaf shape (could e.g. refer to a triangle within a MeshShape) + /// @return The shape or null if the sub shape ID is invalid + /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + Jolt.PInvoke.Shape_GetLeafShape(this, subShapeID, out remainder); + + /// + /// + /// Get the material assigned to a particular sub shape ID + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:249 + ///
+ /// virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const = 0 + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.Shape_GetMaterial(this, subShapeID); + + /// + /// + /// Get the surface normal of a particular sub shape ID and point on surface (all vectors are relative to + /// center of mass for this shape). Note: When you have a CollideShapeResult or ShapeCastResult you should + /// use -mPenetrationAxis.Normalized() as contact normal as GetSurfaceNormal will only return face normals + /// (and not vertex or edge normals). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:253 + ///
+ /// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const = 0 + ///
+ ///
+ public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + Jolt.PInvoke.Shape_GetSurfaceNormal(this, subShapeID, localSurfacePosition); + + /// + /// + /// Get the vertices of the face that faces inDirection the most (includes any convex radius). Note that + /// this function can only return faces of convex shapes or triangles, which is why a sub shape ID to get to + /// that leaf must be provided. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:265 + ///
+ /// virtual void GetSupportingFace(const SubShapeID &inSubShapeID, Vec3Arg inDirection, Vec3Arg inScale, Mat44Arg inCenterOfMassTransform, SupportingFace &outVertices) const + ///
+ ///
+ /// + /// + /// Get the vertices of the face that faces inDirection the most (includes any convex radius). Note that this function can only return faces of + /// convex shapes or triangles, which is why a sub shape ID to get to that leaf must be provided. + /// @param inSubShapeID Sub shape ID of target shape + /// @param inDirection Direction that the face should be facing (in local space to this shape) + /// @param inCenterOfMassTransform Transform to transform outVertices with + /// @param inScale Scale in local space of the shape (scales relative to its center of mass) + /// @param outVertices Resulting face. The returned face can be empty if the shape doesn't have polygons to return (e.g. because it's a sphere). The face will be returned in world space. + /// + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => + Jolt.PInvoke.Shape_GetSupportingFace( + this, + subShapeID, + direction, + scale, + in centerOfMassTransform, + out vertices + ); + + /// + /// + /// Get the user data of a particular sub shape ID. Corresponds with the value stored in Shape::GetUserData + /// of the leaf shape pointed to by inSubShapeID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:268 + ///
+ /// virtual uint64 GetSubShapeUserData(const SubShapeID &inSubShapeID) const + ///
+ ///
+ public ulong GetSubShapeUserData(uint subShapeID) => Jolt.PInvoke.Shape_GetSubShapeUserData(this, subShapeID); + + /// + /// + /// Get the direct child sub shape and its transform for a sub shape ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:277 + ///
+ /// virtual TransformedShape GetSubShapeTransformedShape(const SubShapeID &inSubShapeID, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, SubShapeID &outRemainder) const + ///
+ ///
+ /// + /// + /// Get the direct child sub shape and its transform for a sub shape ID. + /// @param inSubShapeID Sub shape ID that indicates the path to the leaf shape + /// @param inPositionCOM The position of the center of mass of this shape + /// @param inRotation The orientation of this shape + /// @param inScale Scale in local space of the shape (scales relative to its center of mass) + /// @param outRemainder The remainder of the sub shape ID after removing the sub shape + /// @return Direct child sub shape and its transform, note that the body ID and sub shape ID will be invalid + /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => + Jolt.PInvoke.Shape_GetSubShapeTransformedShape( + this, + subShapeID, + positionCOM, + rotation, + scale, + out remainder + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:289 + ///
+ /// virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy + ///
+ ///
+ public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + Jolt.PInvoke.Shape_GetSubmergedVolume( + this, + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + /// + /// Draw the shape at a particular location with a particular color (debugging purposes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:297 + ///
+ /// virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const = 0 + ///
+ ///
+ public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => + Jolt.PInvoke.Shape_Draw( + this, + renderer, + in centerOfMassTransform, + scale, + color, + useMaterialColors, + drawWireframe + ); + + /// + /// + /// Draw the results of the GetSupportFunction with the convex radius added back on to show any errors + /// introduced by this process (only relevant for convex shapes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:300 + ///
+ /// virtual void DrawGetSupportFunction(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inDrawSupportDirection) const + ///
+ ///
+ public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + Jolt.PInvoke.Shape_DrawGetSupportFunction( + this, + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + /// + /// Draw the results of the GetSupportingFace function to show any errors introduced by this process (only + /// relevant for convex shapes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:303 + ///
+ /// virtual void DrawGetSupportingFace(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const + ///
+ ///
+ public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + Jolt.PInvoke.Shape_DrawGetSupportingFace(this, renderer, in centerOfMassTransform, scale); + + /// + /// + /// Cast a ray against this shape, returns true if it finds a hit closer than ioHit.mFraction and updates + /// that fraction. Otherwise ioHit is left untouched and the function returns false. Note that the ray + /// should be relative to the center of mass of this shape (i.e. subtract Shape::GetCenterOfMass() from + /// RayCast::mOrigin if you want to cast against the shape in the space it was created). Convex objects will + /// be treated as solid (meaning if the ray starts inside, you'll get a hit fraction of 0) and back face + /// hits against triangles are returned. If you want the surface normal of the hit use + /// GetSurfaceNormal(ioHit.mSubShapeID2, inRay.GetPointOnRay(ioHit.mFraction)). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:310 + ///
+ /// virtual bool CastRay(const RayCast &inRay, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) const = 0 + ///
+ ///
+ public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + Jolt.PInvoke.Shape_CastRay(this, in ray, subShapeIDCreator, ref hit); + + /// + /// + /// Cast a ray against this shape. Allows returning multiple hits through ioCollector. Note that this + /// version is more flexible but also slightly slower than the CastRay function that returns only a single + /// hit. If you want the surface normal of the hit use GetSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected faction)). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:314 + ///
+ /// virtual void CastRay(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (RayCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.Shape_CastRay_2( + this, + in ray, + rayCastSettings, + subShapeIDCreator, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a ray against this shape. Allows returning multiple hits through ioCollector. Note that this + /// version is more flexible but also slightly slower than the CastRay function that returns only a single + /// hit. If you want the surface normal of the hit use GetSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected faction)). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:314 + ///
+ /// virtual void CastRay(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.Shape_CastRayClosest(this, in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter) + != 0; + + /// + /// + /// Check if inPoint is inside this shape. For this tests all shapes are treated as if they were solid. Note + /// that inPoint should be relative to the center of mass of this shape (i.e. subtract + /// Shape::GetCenterOfMass() from inPoint if you want to test against the shape in the space it was + /// created). For a mesh shape, this test will only provide sensible information if the mesh is a closed + /// manifold. For each shape that collides, ioCollector will receive a hit. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:320 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, const SubShapeIDCreator &inSubShapeIDCreator, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (CollidePointResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.Shape_CollidePoint( + this, + point, + subShapeIDCreator, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collides all vertices of a soft body with this shape and updates SoftBodyVertex::mCollisionPlane, + /// SoftBodyVertex::mCollidingShapeIndex and SoftBodyVertex::mLargestPenetration if a collision with more + /// penetration was found. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:328 + ///
+ /// virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const = 0 + ///
+ ///
+ /// + /// + /// Collides all vertices of a soft body with this shape and updates SoftBodyVertex::mCollisionPlane, SoftBodyVertex::mCollidingShapeIndex and SoftBodyVertex::mLargestPenetration if a collision with more penetration was found. + /// @param inCenterOfMassTransform Center of mass transform for this shape relative to the vertices. + /// @param inScale Scale in local space of the shape (scales relative to its center of mass) + /// @param inVertices The vertices of the soft body + /// @param inNumVertices The number of vertices in inVertices + /// @param inCollidingShapeIndex Value to store in CollideSoftBodyVertexIterator::mCollidingShapeIndex when a collision was found + /// + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + Jolt.PInvoke.Shape_CollideSoftBodyVertices( + this, + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + /// + /// Collect the leaf transformed shapes of all leaf shapes of this shape. inBox is the world space axis + /// aligned box which leaf shapes should collide with. inPositionCOM/inRotation/inScale describes the + /// transform of this shape. inSubShapeIDCreator represents the current sub shape ID of this shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:334 + ///
+ /// virtual void CollectTransformedShapes(const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, const SubShapeIDCreator &inSubShapeIDCreator, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) const + ///
+ ///
+ /// + /// + /// Returns every shape the query collected as an owned buffer of TransformedShape: Dispose it when done. It + /// holds a reference to each shape, so the handles it hands out stay valid until then even if the bodies go + /// - but they are borrowed from the buffer, so never Dispose one. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + new NativeHandleArray( + Jolt.PInvoke.Shape_CollectTransformedShapes( + this, + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ) + ); + + /// + /// + /// Transforms this shape and all of its children with inTransform, resulting shape(s) are passed to + /// ioCollector. Note that not all shapes support all transforms (especially true for scaling), the + /// resulting shape will try to match the transform as accurately as possible. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:340 + ///
+ /// virtual void TransformShape(Mat44Arg inCenterOfMassTransform, TransformedShapeCollector &ioCollector) const + ///
+ ///
+ /// + /// + /// Transforms this shape and all of its children with inTransform, resulting shape(s) are passed to ioCollector. + /// Note that not all shapes support all transforms (especially true for scaling), the resulting shape will try to match the transform as accurately as possible. + /// @param inCenterOfMassTransform The transform (rotation, translation, scale) that the center of mass of the shape should get + /// @param ioCollector The transformed shapes will be passed to this collector + /// + /// + /// Returns every shape the query collected as an owned buffer of TransformedShape: Dispose it when done. It + /// holds a reference to each shape, so the handles it hands out stay valid until then even if the bodies go + /// - but they are borrowed from the buffer, so never Dispose one. + /// + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + new NativeHandleArray(Jolt.PInvoke.Shape_TransformShape(this, in centerOfMassTransform)); + + /// + /// + /// Scale this shape. Note that not all shapes support all scales, this will return a shape that matches the + /// scale as accurately as possible. See Shape::IsValidScale for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:344 + ///
+ /// ShapeResult ScaleShape(Vec3Arg inScale) const + ///
+ ///
+ /// + /// + /// Scale this shape. Note that not all shapes support all scales, this will return a shape that matches the scale as accurately as possible. See Shape::IsValidScale for more information. + /// @param inScale The scale to use for this shape (note: this scale is applied to the entire shape in the space it was created, most other functions apply the scale in the space of the leaf shapes and from the center of mass!) + /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public Shape ScaleShape(float3 scale) + { + var _handle = Jolt.PInvoke.Shape_ScaleShape(this, scale); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// To start iterating over triangles, call this function first. ioContext is a temporary buffer and should + /// remain untouched until the last call to GetTrianglesNext. inBox is the world space bounding in which you + /// want to get the triangles. inPositionCOM/inRotation/inScale describes the transform of this shape. To + /// get the actual triangles call GetTrianglesNext. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:357 + ///
+ /// virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const = 0 + ///
+ ///
+ public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => Jolt.PInvoke.Shape_GetTrianglesStart(this, ref context, in box, positionCOM, rotation, scale); + + /// + /// + /// Call this repeatedly to get all triangles in the box. outTriangleVertices should be large enough to hold + /// 3 * inMaxTriangleRequested entries. outMaterials (if it is not null) should contain + /// inMaxTrianglesRequested entries. The function returns the amount of triangles that it found (which will + /// be <= inMaxTrianglesRequested), or 0 if there are no more triangles. Note that the function can + /// return a value < inMaxTrianglesRequested and still have more triangles to process (triangles can be + /// returned in blocks). Note that the function may return triangles outside of the requested box, only + /// coarse culling is performed on the returned triangles. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:365 + ///
+ /// virtual int GetTrianglesNext(GetTrianglesContext &ioContext, int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials = nullptr) const = 0 + ///
+ ///
+ /// + /// + /// materials is a buffer of PhysicsMaterial handles you allocate and size; the handles the call writes into + /// it are borrowed from their owner - don't Dispose them. + /// + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => Jolt.PInvoke.Shape_GetTrianglesNext(this, ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + /// + /// Saves the contents of the shape in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:375 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.Shape_SaveBinaryState(this, stream); + + /// + /// + /// Creates a Shape of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:378 + ///
+ /// static ShapeResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static Shape RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.Shape_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Outputs the material references that this shape has to outMaterials. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:381 + ///
+ /// virtual void SaveMaterialState(PhysicsMaterialList &outMaterials) const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray SaveMaterialState() + { + Jolt.PInvoke.Shape_SaveMaterialState(this, out var materials_raw); + return new NativeArray(materials_raw); + } + + /// + /// + /// Restore the material references after calling sRestoreFromBinaryState. Note that the exact same + /// materials need to be provided in the same order as returned by SaveMaterialState. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:384 + ///
+ /// virtual void RestoreMaterialState(const PhysicsMaterialRefC *inMaterials, uint inNumMaterials) + ///
+ ///
+ /// + /// + /// materials is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) + { + fixed (PhysicsMaterial* materials_fixed = materials) + { + Jolt.PInvoke.Shape_RestoreMaterialState(this, materials_fixed, (uint)materials.Length); + } + } + + /// + /// + /// Outputs the shape references that this shape has to outSubShapes. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:387 + ///
+ /// virtual void SaveSubShapeState(ShapeList &outSubShapes) const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray SaveSubShapeState() + { + Jolt.PInvoke.Shape_SaveSubShapeState(this, out var subShapes_raw); + return new NativeArray(subShapes_raw); + } + + /// + /// + /// Restore the shape references after calling sRestoreFromBinaryState. Note that the exact same shapes need + /// to be provided in the same order as returned by SaveSubShapeState. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:390 + ///
+ /// virtual void RestoreSubShapeState(const ShapeRefC *inSubShapes, uint inNumShapes) + ///
+ ///
+ /// + /// + /// subShapes is the buffer the native call reads, and its element count travels with it: the span is only + /// read, and it is only read for the duration of the call. + /// + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) + { + fixed (Shape* subShapes_fixed = subShapes) + { + Jolt.PInvoke.Shape_RestoreSubShapeState(this, subShapes_fixed, (uint)subShapes.Length); + } + } + + /// + /// + /// Save this shape, all its children and its materials. Pass in an empty map in ioShapeMap / ioMaterialMap + /// or reuse the same map while saving multiple shapes to the same stream in order to avoid writing + /// duplicates. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:398 + ///
+ /// void SaveWithChildren(StreamOut &inStream, ShapeToIDMap &ioShapeMap, MaterialToIDMap &ioMaterialMap) const + ///
+ ///
+ public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + Jolt.PInvoke.Shape_SaveWithChildren(this, stream, shapeMap, materialMap); + + /// + /// + /// Restore a shape, all its children and materials. Pass in an empty map in ioShapeMap / ioMaterialMap or + /// reuse the same map while reading multiple shapes from the same stream in order to restore duplicates. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:401 + ///
+ /// static ShapeResult sRestoreWithChildren(StreamIn &inStream, IDToShapeMap &ioShapeMap, IDToMaterialMap &ioMaterialMap) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static Shape RestoreWithChildren(StreamIn stream, IDToShapeMap shapeMap, IDToMaterialMap materialMap) + { + var _handle = Jolt.PInvoke.Shape_RestoreWithChildren(stream, shapeMap, materialMap); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Get stats of this shape. Use for logging / data collection purposes only. Does not add values from child + /// shapes, use GetStatsRecursive for this. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:415 + ///
+ /// virtual Stats GetStats() const = 0 + ///
+ ///
+ public Shape.Stats GetStats() + { + Jolt.PInvoke.Shape_GetStats(this, out var _outResult); + return _outResult; + } + + /// + /// + /// < Volume of this shape (m^3). Note that for compound shapes the volume may be incorrect since child + /// shapes can overlap which is not accounted for. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:424 + ///
+ /// virtual float GetVolume() const = 0 + ///
+ ///
+ public float GetVolume() => Jolt.PInvoke.Shape_GetVolume(this); + + /// + /// + /// Test if inScale is a valid scale for this shape. Some shapes can only be scaled uniformly, compound + /// shapes cannot handle shapes being rotated and scaled (this would cause shearing), scale can never be + /// zero. When the scale is invalid, the function will return false. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:438 + ///
+ /// virtual bool IsValidScale(Vec3Arg inScale) const + ///
+ ///
+ /// + /// + /// Test if inScale is a valid scale for this shape. Some shapes can only be scaled uniformly, compound shapes cannot handle shapes + /// being rotated and scaled (this would cause shearing), scale can never be zero. When the scale is invalid, the function will return false. + /// + /// Here's a list of supported scales: + /// * SphereShape: Scale must be uniform (signs of scale are ignored). + /// * BoxShape: Any scale supported (signs of scale are ignored). + /// * TriangleShape: Any scale supported when convex radius is zero, otherwise only uniform scale supported. + /// * CapsuleShape: Scale must be uniform (signs of scale are ignored). + /// * TaperedCapsuleShape: Scale must be uniform (sign of Y scale can be used to flip the capsule). + /// * CylinderShape: Scale must be uniform in XZ plane, Y can scale independently (signs of scale are ignored). + /// * RotatedTranslatedShape: Scale must not cause shear in the child shape. + /// * CompoundShape: Scale must not cause shear in any of the child shapes. + /// + /// + public bool IsValidScale(float3 scale) => Jolt.PInvoke.Shape_IsValidScale(this, scale); + + /// + /// + /// This function will make sure that if you wrap this shape in a ScaledShape that the scale is valid. Note + /// that this involves discarding components of the scale that are invalid, so the resulting scaled shape + /// may be different than the requested scale. Compare the return value of this function with the scale you + /// passed in to detect major inconsistencies and possibly warn the user. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:445 + ///
+ /// virtual Vec3 MakeScaleValid(Vec3Arg inScale) const + ///
+ ///
+ /// + /// + /// This function will make sure that if you wrap this shape in a ScaledShape that the scale is valid. + /// Note that this involves discarding components of the scale that are invalid, so the resulting scaled shape may be different than the requested scale. + /// Compare the return value of this function with the scale you passed in to detect major inconsistencies and possibly warn the user. + /// @param inScale Local space scale for this shape. + /// @return Scale that can be used to wrap this shape in a ScaledShape. IsValidScale will return true for this scale. + /// + /// + public float3 MakeScaleValid(float3 scale) => Jolt.PInvoke.Shape_MakeScaleValid(this, scale); + + /// + /// + /// Views this Shape as the ConvexShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public ConvexShape AsConvexShape() => Jolt.PInvoke.Shape_AsConvexShape(this); + + /// + /// + /// Views this Shape as the CompoundShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public CompoundShape AsCompoundShape() => Jolt.PInvoke.Shape_AsCompoundShape(this); + + /// + /// + /// Views this Shape as the DecoratedShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public DecoratedShape AsDecoratedShape() => Jolt.PInvoke.Shape_AsDecoratedShape(this); + + /// + /// + /// Views this Shape as the SphereShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public SphereShape AsSphereShape() => Jolt.PInvoke.Shape_AsSphereShape(this); + + /// + /// + /// Views this Shape as the BoxShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public BoxShape AsBoxShape() => Jolt.PInvoke.Shape_AsBoxShape(this); + + /// + /// + /// Views this Shape as the TriangleShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public TriangleShape AsTriangleShape() => Jolt.PInvoke.Shape_AsTriangleShape(this); + + /// + /// + /// Views this Shape as the CapsuleShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public CapsuleShape AsCapsuleShape() => Jolt.PInvoke.Shape_AsCapsuleShape(this); + + /// + /// + /// Views this Shape as the TaperedCapsuleShape it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public TaperedCapsuleShape AsTaperedCapsuleShape() => Jolt.PInvoke.Shape_AsTaperedCapsuleShape(this); + + /// + /// + /// Views this Shape as the CylinderShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public CylinderShape AsCylinderShape() => Jolt.PInvoke.Shape_AsCylinderShape(this); + + /// + /// + /// Views this Shape as the TaperedCylinderShape it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public TaperedCylinderShape AsTaperedCylinderShape() => Jolt.PInvoke.Shape_AsTaperedCylinderShape(this); + + /// + /// + /// Views this Shape as the ConvexHullShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public ConvexHullShape AsConvexHullShape() => Jolt.PInvoke.Shape_AsConvexHullShape(this); + + /// + /// + /// Views this Shape as the StaticCompoundShape it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public StaticCompoundShape AsStaticCompoundShape() => Jolt.PInvoke.Shape_AsStaticCompoundShape(this); + + /// + /// + /// Views this Shape as the MutableCompoundShape it is, or returns a null handle when it is a different kind + /// - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public MutableCompoundShape AsMutableCompoundShape() => Jolt.PInvoke.Shape_AsMutableCompoundShape(this); + + /// + /// + /// Views this Shape as the RotatedTranslatedShape it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public RotatedTranslatedShape AsRotatedTranslatedShape() => Jolt.PInvoke.Shape_AsRotatedTranslatedShape(this); + + /// + /// + /// Views this Shape as the ScaledShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public ScaledShape AsScaledShape() => Jolt.PInvoke.Shape_AsScaledShape(this); + + /// + /// + /// Views this Shape as the OffsetCenterOfMassShape it is, or returns a null handle when it is a different + /// kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public OffsetCenterOfMassShape AsOffsetCenterOfMassShape() => + Jolt.PInvoke.Shape_AsOffsetCenterOfMassShape(this); + + /// + /// + /// Views this Shape as the MeshShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public MeshShape AsMeshShape() => Jolt.PInvoke.Shape_AsMeshShape(this); + + /// + /// + /// Views this Shape as the HeightFieldShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public HeightFieldShape AsHeightFieldShape() => Jolt.PInvoke.Shape_AsHeightFieldShape(this); + + /// + /// + /// Views this Shape as the SoftBodyShape it is, or returns a null handle when it is a different kind - + /// check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public SoftBodyShape AsSoftBodyShape() => Jolt.PInvoke.Shape_AsSoftBodyShape(this); + + /// + /// + /// Views this Shape as the PlaneShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public PlaneShape AsPlaneShape() => Jolt.PInvoke.Shape_AsPlaneShape(this); + + /// + /// + /// Views this Shape as the EmptyShape it is, or returns a null handle when it is a different kind - check + /// IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public EmptyShape AsEmptyShape() => Jolt.PInvoke.Shape_AsEmptyShape(this); + + /// + /// + /// This is the minimum amount of triangles that should be requested through GetTrianglesNext. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:350 + ///
+ /// static constexpr int cGetTrianglesMinTrianglesRequested = 32 + ///
+ ///
+ public static int GetGetTrianglesMinTrianglesRequested() => + Jolt.PInvoke.Shape_GetGetTrianglesMinTrianglesRequested(); + + /// + /// + /// Debug helper which draws the intersection between water and the shapes, the center of buoyancy and the + /// submerged volume + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:449 + ///
+ /// static bool sDrawSubmergedVolumes + ///
+ ///
+ public static bool GetDrawSubmergedVolumes() => Jolt.PInvoke.Shape_GetDrawSubmergedVolumes(); + + /// + /// + /// Debug helper which draws the intersection between water and the shapes, the center of buoyancy and the + /// submerged volume + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:449 + ///
+ /// static bool sDrawSubmergedVolumes + ///
+ ///
+ public static void SetDrawSubmergedVolumes(bool value) => Jolt.PInvoke.Shape_SetDrawSubmergedVolumes(value); + + public void AddRef() => Jolt.PInvoke.Shape_AddRef(this); + + public void Release() => Jolt.PInvoke.Shape_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.Shape_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ShapeCastSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ShapeCastSettings.gen.cs new file mode 100644 index 0000000..83a6447 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ShapeCastSettings.gen.cs @@ -0,0 +1,223 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings to be passed with a shape cast + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:91 + ///
+ /// class ShapeCastSettings : public CollideSettingsBase + ///
+ ///
+ [InteropHandle] + public readonly partial struct ShapeCastSettings : IDisposable + { + public static ShapeCastSettings Create() => Jolt.PInvoke.ShapeCastSettings_Create(); + + /// + /// + /// Set the backfacing mode for all shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:97 + ///
+ /// void SetBackFaceMode(EBackFaceMode inMode) + ///
+ ///
+ public void SetBackFaceMode(BackFaceMode mode) => Jolt.PInvoke.ShapeCastSettings_SetBackFaceMode(this, mode); + + /// + /// + /// When > 0 the query shape is inflated by an extra convex radius, this makes it bigger in every + /// direction by this margin. (unit: meter) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:100 + ///
+ /// float mExtraConvexRadius = 0.0f + ///
+ ///
+ public float GetExtraConvexRadius() => Jolt.PInvoke.ShapeCastSettings_GetExtraConvexRadius(this); + + /// + /// + /// When > 0 the query shape is inflated by an extra convex radius, this makes it bigger in every + /// direction by this margin. (unit: meter) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:100 + ///
+ /// float mExtraConvexRadius = 0.0f + ///
+ ///
+ public void SetExtraConvexRadius(float value) => + Jolt.PInvoke.ShapeCastSettings_SetExtraConvexRadius(this, value); + + /// + /// + /// How backfacing triangles should be treated (should we report moving from back to front for triangle + /// based shapes, e.g. for MeshShape/HeightFieldShape?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:103 + ///
+ /// EBackFaceMode mBackFaceModeTriangles = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public BackFaceMode GetBackFaceModeTriangles() => Jolt.PInvoke.ShapeCastSettings_GetBackFaceModeTriangles(this); + + /// + /// + /// How backfacing triangles should be treated (should we report moving from back to front for triangle + /// based shapes, e.g. for MeshShape/HeightFieldShape?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:103 + ///
+ /// EBackFaceMode mBackFaceModeTriangles = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public void SetBackFaceModeTriangles(BackFaceMode value) => + Jolt.PInvoke.ShapeCastSettings_SetBackFaceModeTriangles(this, value); + + /// + /// + /// How backfacing convex objects should be treated (should we report starting inside an object and moving + /// out?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:106 + ///
+ /// EBackFaceMode mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public BackFaceMode GetBackFaceModeConvex() => Jolt.PInvoke.ShapeCastSettings_GetBackFaceModeConvex(this); + + /// + /// + /// How backfacing convex objects should be treated (should we report starting inside an object and moving + /// out?) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:106 + ///
+ /// EBackFaceMode mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces + ///
+ ///
+ public void SetBackFaceModeConvex(BackFaceMode value) => + Jolt.PInvoke.ShapeCastSettings_SetBackFaceModeConvex(this, value); + + /// + /// + /// Indicates if we want to shrink the shape by the convex radius and then expand it again. This speeds up + /// collision detection and gives a more accurate normal at the cost of a more 'rounded' shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:109 + ///
+ /// bool mUseShrunkenShapeAndConvexRadius = false + ///
+ ///
+ public bool GetUseShrunkenShapeAndConvexRadius() => + Jolt.PInvoke.ShapeCastSettings_GetUseShrunkenShapeAndConvexRadius(this); + + /// + /// + /// Indicates if we want to shrink the shape by the convex radius and then expand it again. This speeds up + /// collision detection and gives a more accurate normal at the cost of a more 'rounded' shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:109 + ///
+ /// bool mUseShrunkenShapeAndConvexRadius = false + ///
+ ///
+ public void SetUseShrunkenShapeAndConvexRadius(bool value) => + Jolt.PInvoke.ShapeCastSettings_SetUseShrunkenShapeAndConvexRadius(this, value); + + /// + /// + /// When true, and the shape is intersecting at the beginning of the cast (fraction = 0) then this will + /// calculate the deepest penetration point (costing additional CPU time) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:112 + ///
+ /// bool mReturnDeepestPoint = false + ///
+ ///
+ public bool GetReturnDeepestPoint() => Jolt.PInvoke.ShapeCastSettings_GetReturnDeepestPoint(this); + + /// + /// + /// When true, and the shape is intersecting at the beginning of the cast (fraction = 0) then this will + /// calculate the deepest penetration point (costing additional CPU time) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:112 + ///
+ /// bool mReturnDeepestPoint = false + ///
+ ///
+ public void SetReturnDeepestPoint(bool value) => + Jolt.PInvoke.ShapeCastSettings_SetReturnDeepestPoint(this, value); + + public static implicit operator CollideSettingsBase(ShapeCastSettings value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.ShapeCastSettings_Destroy(this); + + /// + public ActiveEdgeMode GetActiveEdgeMode() => ((CollideSettingsBase)this).GetActiveEdgeMode(); + + /// + public void SetActiveEdgeMode(ActiveEdgeMode value) => ((CollideSettingsBase)this).SetActiveEdgeMode(value); + + /// + public CollectFacesMode GetCollectFacesMode() => ((CollideSettingsBase)this).GetCollectFacesMode(); + + /// + public void SetCollectFacesMode(CollectFacesMode value) => + ((CollideSettingsBase)this).SetCollectFacesMode(value); + + /// + public float GetCollisionTolerance() => ((CollideSettingsBase)this).GetCollisionTolerance(); + + /// + public void SetCollisionTolerance(float value) => ((CollideSettingsBase)this).SetCollisionTolerance(value); + + /// + public float GetPenetrationTolerance() => ((CollideSettingsBase)this).GetPenetrationTolerance(); + + /// + public void SetPenetrationTolerance(float value) => ((CollideSettingsBase)this).SetPenetrationTolerance(value); + + /// + public float3 GetActiveEdgeMovementDirection() => ((CollideSettingsBase)this).GetActiveEdgeMovementDirection(); + + /// + public void SetActiveEdgeMovementDirection(float3 value) => + ((CollideSettingsBase)this).SetActiveEdgeMovementDirection(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ShapeFilter.gen.cs b/Brutal.Jolt/Generated/Classes/ShapeFilter.gen.cs new file mode 100644 index 0000000..717da86 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ShapeFilter.gen.cs @@ -0,0 +1,111 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:16 + ///
+ /// class ShapeFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct ShapeFilter : IDisposable + { + public static ShapeFilter Create() => Jolt.PInvoke.ShapeFilter_Create(); + + /// + /// + /// Filter function to determine if we should collide with a shape. Returns true if the filter passes. This + /// overload is called when the query doesn't have a source shape (e.g. ray cast / collide point) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:26 + ///
+ /// virtual bool ShouldCollide(const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const + ///
+ ///
+ /// + /// + /// Filter function to determine if we should collide with a shape. Returns true if the filter passes. + /// This overload is called when the query doesn't have a source shape (e.g. ray cast / collide point) + /// @param inShape2 Shape we're colliding against + /// @param inSubShapeIDOfShape2 The sub shape ID that will lead from the root shape to inShape2 (i.e. the shape of mBodyID2) + /// + /// + public bool ShouldCollide(Shape shape2, uint subShapeIDOfShape2) => + Jolt.PInvoke.ShapeFilter_ShouldCollide(this, shape2, subShapeIDOfShape2); + + /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. This + /// overload is called when querying a shape vs a shape (e.g. collide object / cast object). It is called at + /// each level of the shape hierarchy, so if you have a compound shape with a box, this function will be + /// called twice. It will not be called on triangles that are part of another shape, i.e a mesh shape will + /// not trigger a callback per triangle. You can filter out individual triangles in the + /// CollisionCollector::AddHit function by their sub shape ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:39 + ///
+ /// virtual bool ShouldCollide(const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const + ///
+ ///
+ /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. + /// This overload is called when querying a shape vs a shape (e.g. collide object / cast object). + /// It is called at each level of the shape hierarchy, so if you have a compound shape with a box, this function will be called twice. + /// It will not be called on triangles that are part of another shape, i.e a mesh shape will not trigger a callback per triangle. You can filter out individual triangles in the CollisionCollector::AddHit function by their sub shape ID. + /// @param inShape1 1st shape that is colliding + /// @param inSubShapeIDOfShape1 The sub shape ID that will lead from the root shape to inShape1 (i.e. the shape that is used to collide or cast against shape 2) + /// @param inShape2 2nd shape that is colliding + /// @param inSubShapeIDOfShape2 The sub shape ID that will lead from the root shape to inShape2 (i.e. the shape of mBodyID2) + /// + /// + public bool ShouldCollide(Shape shape1, uint subShapeIDOfShape1, Shape shape2, uint subShapeIDOfShape2) => + Jolt.PInvoke.ShapeFilter_ShouldCollide_2(this, shape1, subShapeIDOfShape1, shape2, subShapeIDOfShape2); + + /// + /// + /// Used during NarrowPhase queries and TransformedShape queries. Set to the body ID of inShape2 before + /// calling ShouldCollide. Provides context to the filter to indicate which body is colliding. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:46 + ///
+ /// mutable BodyID mBodyID2 + ///
+ ///
+ public uint GetBodyID2() => Jolt.PInvoke.ShapeFilter_GetBodyID2(this); + + /// + /// + /// Used during NarrowPhase queries and TransformedShape queries. Set to the body ID of inShape2 before + /// calling ShouldCollide. Provides context to the filter to indicate which body is colliding. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeFilter.h:46 + ///
+ /// mutable BodyID mBodyID2 + ///
+ ///
+ public void SetBodyID2(uint value) => Jolt.PInvoke.ShapeFilter_SetBodyID2(this, value); + + public void Dispose() => Jolt.PInvoke.ShapeFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ShapeFunctions.gen.cs b/Brutal.Jolt/Generated/Classes/ShapeFunctions.gen.cs new file mode 100644 index 0000000..e650c20 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ShapeFunctions.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Function table for functions on shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:167 + ///
+ /// class ShapeFunctions + ///
+ ///
+ [InteropHandle] + public readonly partial struct ShapeFunctions : IDisposable + { + public static ShapeFunctions Create() => Jolt.PInvoke.ShapeFunctions_Create(); + + /// + /// + /// Get an entry in the registry for a particular sub type + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:177 + ///
+ /// static inline ShapeFunctions & sGet(EShapeSubType inSubType) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public static ShapeFunctions Get(ShapeSubType subType) => Jolt.PInvoke.ShapeFunctions_Get(subType); + + /// + /// + /// Color of the shape when drawing + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:174 + ///
+ /// Color mColor = Color::sBlack + ///
+ ///
+ public uint GetColor() => Jolt.PInvoke.ShapeFunctions_GetColor(this); + + public void Dispose() => Jolt.PInvoke.ShapeFunctions_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/ShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/ShapeSettings.gen.cs new file mode 100644 index 0000000..aa4f1a9 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ShapeSettings.gen.cs @@ -0,0 +1,132 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that can construct shapes and that is serializable using the ObjectStream system. Can be used to store + /// shape data in 'uncooked' form (i.e. in a form that is still human readable and authorable). Once the shape + /// has been created using the Create() function, the data will be moved into the Shape class in a form that is + /// optimized for collision detection. After this, the ShapeSettings object is no longer needed and can be + /// destroyed. Each shape class has a derived class of the ShapeSettings object to store shape specific data. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:145 + ///
+ /// class ShapeSettings : public SerializableObject, public RefTarget<ShapeSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct ShapeSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:147 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.ShapeSettings_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:147 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.ShapeSettings_CastTo(this, rtti); + + /// + /// + /// Create a shape according to the settings specified by this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:153 + ///
+ /// virtual ShapeResult Create() const = 0 + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public Shape CreateShape() + { + var _handle = Jolt.PInvoke.ShapeSettings_CreateShape(this); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// When creating a shape, the result is cached so that calling Create() again will return the same shape. + /// If you make changes to the ShapeSettings you need to call this function to clear the cached result to + /// allow Create() to build a new shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:157 + ///
+ /// void ClearCachedResult() + ///
+ ///
+ public void ClearCachedResult() => Jolt.PInvoke.ShapeSettings_ClearCachedResult(this); + + /// + /// + /// User data (to be used freely by the application) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:160 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.ShapeSettings_GetUserData(this); + + /// + /// + /// User data (to be used freely by the application) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:160 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public void SetUserData(ulong value) => Jolt.PInvoke.ShapeSettings_SetUserData(this, value); + + public void AddRef() => Jolt.PInvoke.ShapeSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.ShapeSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.ShapeSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/ShapeToIDMap.gen.cs b/Brutal.Jolt/Generated/Classes/ShapeToIDMap.gen.cs new file mode 100644 index 0000000..070c305 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/ShapeToIDMap.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The Shape objects written so far and the ids they were given, for SaveWithChildren: pass the same map to + /// every save into one stream, so an object several of them share is written once. + /// + /// + [InteropHandle] + public readonly partial struct ShapeToIDMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static ShapeToIDMap Create() => Jolt.PInvoke.ShapeToIDMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.ShapeToIDMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.ShapeToIDMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SharedSettingsToIDMap.gen.cs b/Brutal.Jolt/Generated/Classes/SharedSettingsToIDMap.gen.cs new file mode 100644 index 0000000..d7ed25f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SharedSettingsToIDMap.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.JoltApi +{ + /// + /// + /// The SoftBodySharedSettings objects written so far and the ids they were given, for SaveWithChildren: pass + /// the same map to every save into one stream, so an object several of them share is written once. + /// + /// + [InteropHandle] + public readonly partial struct SharedSettingsToIDMap : IDisposable + { + /// + /// + /// An empty map; Dispose it when the stream is done. + /// + /// + public static SharedSettingsToIDMap Create() => Jolt.PInvoke.SharedSettingsToIDMapCreate(); + + /// + /// + /// How many objects the map holds. + /// + /// + public uint GetCount() => Jolt.PInvoke.SharedSettingsToIDMapGetCount(this); + + public void Dispose() => Jolt.PInvoke.SharedSettingsToIDMapDestroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SimShapeFilter.gen.cs b/Brutal.Jolt/Generated/Classes/SimShapeFilter.gen.cs new file mode 100644 index 0000000..c64840a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SimShapeFilter.gen.cs @@ -0,0 +1,78 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Filter class used during the simulation (PhysicsSystem::Update) to filter out collisions at shape level + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilter.h:16 + ///
+ /// class SimShapeFilter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct SimShapeFilter : IDisposable + { + public static SimShapeFilter Create() => Jolt.PInvoke.SimShapeFilter_Create(); + + /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. This + /// overload is called during the simulation (PhysicsSystem::Update) and must be registered with + /// PhysicsSystem::SetSimShapeFilter. It is called at each level of the shape hierarchy, so if you have a + /// compound shape with a box, this function will be called twice. It will not be called on triangles that + /// are part of another shape, i.e a mesh shape will not trigger a callback per triangle. Note that this + /// function is called from multiple threads and must be thread safe. All properties are read only. + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilter.h:33 + ///
+ /// virtual bool ShouldCollide(const Body &inBody1, const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, + ///
+ ///
+ /// + /// + /// Filter function to determine if two shapes should collide. Returns true if the filter passes. + /// This overload is called during the simulation (PhysicsSystem::Update) and must be registered with PhysicsSystem::SetSimShapeFilter. + /// It is called at each level of the shape hierarchy, so if you have a compound shape with a box, this function will be called twice. + /// It will not be called on triangles that are part of another shape, i.e a mesh shape will not trigger a callback per triangle. + /// Note that this function is called from multiple threads and must be thread safe. All properties are read only. + /// @param inBody1 1st body that is colliding + /// @param inShape1 1st shape that is colliding + /// @param inSubShapeIDOfShape1 The sub shape ID that will lead from inBody1.GetShape() to inShape1 + /// @param inBody2 2nd body that is colliding + /// @param inShape2 2nd shape that is colliding + /// @param inSubShapeIDOfShape2 The sub shape ID that will lead from inBody2.GetShape() to inShape2 + /// + /// + public bool ShouldCollide( + Body body1, + Shape shape1, + uint subShapeIDOfShape1, + Body body2, + Shape shape2, + uint subShapeIDOfShape2 + ) => + Jolt.PInvoke.SimShapeFilter_ShouldCollide( + this, + body1, + shape1, + subShapeIDOfShape1, + body2, + shape2, + subShapeIDOfShape2 + ); + + public void Dispose() => Jolt.PInvoke.SimShapeFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SimShapeFilterWrapper.gen.cs b/Brutal.Jolt/Generated/Classes/SimShapeFilterWrapper.gen.cs new file mode 100644 index 0000000..7b1f304 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SimShapeFilterWrapper.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Helper class to forward ShapeFilter calls to a SimShapeFilter INTERNAL CLASS DO NOT USE! + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilterWrapper.h:14 + ///
+ /// class SimShapeFilterWrapper : private ShapeFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct SimShapeFilterWrapper : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilterWrapper.h:18 + ///
+ /// SimShapeFilterWrapper(const SimShapeFilter *inFilter, const Body *inBody1) + ///
+ ///
+ public static SimShapeFilterWrapper Create(SimShapeFilter filter, Body body1) => + Jolt.PInvoke.SimShapeFilterWrapper_Create(filter, body1); + + /// + /// + /// Forward to the simulation shape filter + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilterWrapper.h:27 + ///
+ /// virtual bool ShouldCollide(const Shape *inShape1, const SubShapeID &inSubShapeIDOfShape1, const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const override + ///
+ ///
+ public bool ShouldCollide(Shape shape1, uint subShapeIDOfShape1, Shape shape2, uint subShapeIDOfShape2) => + Jolt.PInvoke.SimShapeFilterWrapper_ShouldCollide( + this, + shape1, + subShapeIDOfShape1, + shape2, + subShapeIDOfShape2 + ); + + /// + /// + /// Forward to the simulation shape filter + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilterWrapper.h:33 + ///
+ /// virtual bool ShouldCollide(const Shape *inShape2, const SubShapeID &inSubShapeIDOfShape2) const override + ///
+ ///
+ public bool ShouldCollide(Shape shape2, uint subShapeIDOfShape2) => + Jolt.PInvoke.SimShapeFilterWrapper_ShouldCollide_2(this, shape2, subShapeIDOfShape2); + + /// + /// + /// Set the body we're colliding against + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilterWrapper.h:39 + ///
+ /// void SetBody2(const Body *inBody2) + ///
+ ///
+ public void SetBody2(Body body2) => Jolt.PInvoke.SimShapeFilterWrapper_SetBody2(this, body2); + + /// + /// + /// Returns the actual filter to use for collision detection + /// + /// + /// C++: + /// Jolt/Physics/Collision/SimShapeFilterWrapper.h:45 + ///
+ /// const ShapeFilter & GetFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public ShapeFilter GetFilter() => Jolt.PInvoke.SimShapeFilterWrapper_GetFilter(this); + + public void Dispose() => Jolt.PInvoke.SimShapeFilterWrapper_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SixDOFConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/SixDOFConstraint.gen.cs new file mode 100644 index 0000000..77eda31 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SixDOFConstraint.gen.cs @@ -0,0 +1,643 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// 6 Degree Of Freedom Constraint. Allows control over each of the 6 degrees of freedom. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:105 + ///
+ /// class SixDOFConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct SixDOFConstraint : IDisposable + { + /// + /// + /// Construct six DOF constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:114 + ///
+ /// SixDOFConstraint(Body &inBody1, Body &inBody2, const SixDOFConstraintSettings &inSettings) + ///
+ ///
+ public static SixDOFConstraint Create(Body body1, Body body2, SixDOFConstraintSettings settings) => + Jolt.PInvoke.SixDOFConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Update the translation limits for this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:137 + ///
+ /// void SetTranslationLimits(Vec3Arg inLimitMin, Vec3Arg inLimitMax) + ///
+ ///
+ public void SetTranslationLimits(float3 limitMin, float3 limitMax) => + Jolt.PInvoke.SixDOFConstraint_SetTranslationLimits(this, limitMin, limitMax); + + /// + /// + /// Update the rotational limits for this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:140 + ///
+ /// void SetRotationLimits(Vec3Arg inLimitMin, Vec3Arg inLimitMax) + ///
+ ///
+ public void SetRotationLimits(float3 limitMin, float3 limitMax) => + Jolt.PInvoke.SixDOFConstraint_SetRotationLimits(this, limitMin, limitMax); + + /// + /// + /// Get constraint Limits + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:143 + ///
+ /// float GetLimitsMin(EAxis inAxis) const + ///
+ ///
+ public float GetLimitsMin(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_GetLimitsMin(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:144 + ///
+ /// float GetLimitsMax(EAxis inAxis) const + ///
+ ///
+ public float GetLimitsMax(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_GetLimitsMax(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:145 + ///
+ /// Vec3 GetTranslationLimitsMin() const + ///
+ ///
+ public float3 GetTranslationLimitsMin() => Jolt.PInvoke.SixDOFConstraint_GetTranslationLimitsMin(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:146 + ///
+ /// Vec3 GetTranslationLimitsMax() const + ///
+ ///
+ public float3 GetTranslationLimitsMax() => Jolt.PInvoke.SixDOFConstraint_GetTranslationLimitsMax(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:147 + ///
+ /// Vec3 GetRotationLimitsMin() const + ///
+ ///
+ public float3 GetRotationLimitsMin() => Jolt.PInvoke.SixDOFConstraint_GetRotationLimitsMin(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:148 + ///
+ /// Vec3 GetRotationLimitsMax() const + ///
+ ///
+ public float3 GetRotationLimitsMax() => Jolt.PInvoke.SixDOFConstraint_GetRotationLimitsMax(this); + + /// + /// + /// Check which axis are fixed/free + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:151 + ///
+ /// inline bool IsFixedAxis(EAxis inAxis) const + ///
+ ///
+ public bool IsFixedAxis(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_IsFixedAxis(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:152 + ///
+ /// inline bool IsFreeAxis(EAxis inAxis) const + ///
+ ///
+ public bool IsFreeAxis(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_IsFreeAxis(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// Update the limits spring settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:155 + ///
+ /// const SpringSettings & GetLimitsSpringSettings(EAxis inAxis) const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SpringSettings GetLimitsSpringSettings(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_GetLimitsSpringSettings(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of translation axes." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:156 + ///
+ /// void SetLimitsSpringSettings(EAxis inAxis, const SpringSettings& inLimitsSpringSettings) + ///
+ ///
+ public void SetLimitsSpringSettings(SixDOFConstraintSettings.Axis axis, SpringSettings limitsSpringSettings) + { + Jolt.PInvoke.SixDOFConstraint_SetLimitsSpringSettings(this, axis, limitsSpringSettings, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of translation axes." + ); + } + + /// + /// + /// Set the max friction for each axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:159 + ///
+ /// void SetMaxFriction(EAxis inAxis, float inFriction) + ///
+ ///
+ public void SetMaxFriction(SixDOFConstraintSettings.Axis axis, float friction) + { + Jolt.PInvoke.SixDOFConstraint_SetMaxFriction(this, axis, friction, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:160 + ///
+ /// float GetMaxFriction(EAxis inAxis) const + ///
+ ///
+ public float GetMaxFriction(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_GetMaxFriction(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// Get rotation of constraint in constraint space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:163 + ///
+ /// Quat GetRotationInConstraintSpace() const + ///
+ ///
+ public floatQuat GetRotationInConstraintSpace() => + Jolt.PInvoke.SixDOFConstraint_GetRotationInConstraintSpace(this); + + /// + /// + /// Motor settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:166 + ///
+ /// MotorSettings & GetMotorSettings(EAxis inAxis) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetMotorSettings(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_GetMotorSettings(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// Motor controls. Translation motors work in constraint space of body 1. Rotation motors work in + /// constraint space of body 2 (!). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:172 + ///
+ /// void SetMotorState(EAxis inAxis, EMotorState inState) + ///
+ ///
+ public void SetMotorState(SixDOFConstraintSettings.Axis axis, MotorState state) + { + Jolt.PInvoke.SixDOFConstraint_SetMotorState(this, axis, state, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:173 + ///
+ /// EMotorState GetMotorState(EAxis inAxis) const + ///
+ ///
+ public MotorState GetMotorState(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraint_GetMotorState(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// Set the target velocity in body 1 constraint space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:176 + ///
+ /// Vec3 GetTargetVelocityCS() const + ///
+ ///
+ public float3 GetTargetVelocityCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetVelocityCS(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:177 + ///
+ /// void SetTargetVelocityCS(Vec3Arg inVelocity) + ///
+ ///
+ public void SetTargetVelocityCS(float3 velocity) => + Jolt.PInvoke.SixDOFConstraint_SetTargetVelocityCS(this, velocity); + + /// + /// + /// Set the target angular velocity in body 2 constraint space (!) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:180 + ///
+ /// void SetTargetAngularVelocityCS(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetTargetAngularVelocityCS(float3 angularVelocity) => + Jolt.PInvoke.SixDOFConstraint_SetTargetAngularVelocityCS(this, angularVelocity); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:181 + ///
+ /// Vec3 GetTargetAngularVelocityCS() const + ///
+ ///
+ public float3 GetTargetAngularVelocityCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetAngularVelocityCS(this); + + /// + /// + /// Set the target position in body 1 constraint space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:184 + ///
+ /// Vec3 GetTargetPositionCS() const + ///
+ ///
+ public float3 GetTargetPositionCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetPositionCS(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:185 + ///
+ /// void SetTargetPositionCS(Vec3Arg inPosition) + ///
+ ///
+ public void SetTargetPositionCS(float3 position) => + Jolt.PInvoke.SixDOFConstraint_SetTargetPositionCS(this, position); + + /// + /// + /// Set the target orientation in body 1 constraint space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:188 + ///
+ /// void SetTargetOrientationCS(QuatArg inOrientation) + ///
+ ///
+ public void SetTargetOrientationCS(floatQuat orientation) => + Jolt.PInvoke.SixDOFConstraint_SetTargetOrientationCS(this, orientation); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:189 + ///
+ /// Quat GetTargetOrientationCS() const + ///
+ ///
+ public floatQuat GetTargetOrientationCS() => Jolt.PInvoke.SixDOFConstraint_GetTargetOrientationCS(this); + + /// + /// + /// Set the target orientation in body space (R2 = R1 * inOrientation, where R1 and R2 are the world space + /// rotations for body 1 and 2). Solve: R2 * ConstraintToBody2 = R1 * ConstraintToBody1 * q (see + /// SwingTwistConstraint::GetSwingTwist) and R2 = R1 * inOrientation for q. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:193 + ///
+ /// void SetTargetOrientationBS(QuatArg inOrientation) + ///
+ ///
+ public void SetTargetOrientationBS(floatQuat orientation) => + Jolt.PInvoke.SixDOFConstraint_SetTargetOrientationBS(this, orientation); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:196 + ///
+ /// inline Vec3 GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float3 GetTotalLambdaPosition() => Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:197 + ///
+ /// inline Vec3 GetTotalLambdaRotation() const + ///
+ ///
+ public float3 GetTotalLambdaRotation() => Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaRotation(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:198 + ///
+ /// inline Vec3 GetTotalLambdaMotorTranslation() const + ///
+ ///
+ public float3 GetTotalLambdaMotorTranslation() => + Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaMotorTranslation(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:199 + ///
+ /// inline Vec3 GetTotalLambdaMotorRotation() const + ///
+ ///
+ public float3 GetTotalLambdaMotorRotation() => Jolt.PInvoke.SixDOFConstraint_GetTotalLambdaMotorRotation(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(SixDOFConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(SixDOFConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SixDOFConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SixDOFConstraintSettings.gen.cs new file mode 100644 index 0000000..d9922f6 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SixDOFConstraintSettings.gen.cs @@ -0,0 +1,531 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// 6 Degree Of Freedom Constraint setup structure. Allows control over each of the 6 degrees of freedom. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:18 + ///
+ /// class SixDOFConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct SixDOFConstraintSettings : IDisposable + { + /// + /// + /// Constraint is split up into translation/rotation around X, Y and Z axis. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:24 + ///
+ /// enum EAxis + ///
+ ///
+ public enum Axis : int + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:26 + ///
+ /// TranslationX + ///
+ ///
+ TranslationX, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:27 + ///
+ /// TranslationY + ///
+ ///
+ TranslationY, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:28 + ///
+ /// TranslationZ + ///
+ ///
+ TranslationZ, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:30 + ///
+ /// RotationX + ///
+ ///
+ RotationX, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:31 + ///
+ /// RotationY + ///
+ ///
+ RotationY, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:32 + ///
+ /// RotationZ + ///
+ ///
+ RotationZ, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:34 + ///
+ /// Num + ///
+ ///
+ Num, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:35 + ///
+ /// NumTranslation = TranslationZ + 1 + ///
+ ///
+ NumTranslation = 3, + } + + public static SixDOFConstraintSettings Create() => Jolt.PInvoke.SixDOFConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// Make axis free (unconstrained) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:86 + ///
+ /// void MakeFreeAxis(EAxis inAxis) + ///
+ ///
+ public void MakeFreeAxis(SixDOFConstraintSettings.Axis axis) + { + Jolt.PInvoke.SixDOFConstraintSettings_MakeFreeAxis(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:87 + ///
+ /// bool IsFreeAxis(EAxis inAxis) const + ///
+ ///
+ public bool IsFreeAxis(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraintSettings_IsFreeAxis(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// Make axis fixed (fixed at value 0) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:90 + ///
+ /// void MakeFixedAxis(EAxis inAxis) + ///
+ ///
+ public void MakeFixedAxis(SixDOFConstraintSettings.Axis axis) + { + Jolt.PInvoke.SixDOFConstraintSettings_MakeFixedAxis(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + } + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:91 + ///
+ /// bool IsFixedAxis(EAxis inAxis) const + ///
+ ///
+ public bool IsFixedAxis(SixDOFConstraintSettings.Axis axis) + { + var _result = Jolt.PInvoke.SixDOFConstraintSettings_IsFixedAxis(this, axis, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + return _result; + } + + /// + /// + /// Set a valid range for the constraint (if inMax < inMin, the axis will become fixed) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:94 + ///
+ /// void SetLimitedAxis(EAxis inAxis, float inMin, float inMax) + ///
+ ///
+ public void SetLimitedAxis(SixDOFConstraintSettings.Axis axis, float min, float max) + { + Jolt.PInvoke.SixDOFConstraintSettings_SetLimitedAxis(this, axis, min, max, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(axis), + axis, + "Expected an index below the number of axes." + ); + } + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:45 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.SixDOFConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:45 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.SixDOFConstraintSettings_SetSpace(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:48 + ///
+ /// RVec3 mPosition1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPosition1() => Jolt.PInvoke.SixDOFConstraintSettings_GetPosition1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:48 + ///
+ /// RVec3 mPosition1 = RVec3::sZero() + ///
+ ///
+ public void SetPosition1(float3 value) => Jolt.PInvoke.SixDOFConstraintSettings_SetPosition1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:49 + ///
+ /// Vec3 mAxisX1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetAxisX1() => Jolt.PInvoke.SixDOFConstraintSettings_GetAxisX1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:49 + ///
+ /// Vec3 mAxisX1 = Vec3::sAxisX() + ///
+ ///
+ public void SetAxisX1(float3 value) => Jolt.PInvoke.SixDOFConstraintSettings_SetAxisX1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:50 + ///
+ /// Vec3 mAxisY1 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetAxisY1() => Jolt.PInvoke.SixDOFConstraintSettings_GetAxisY1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:50 + ///
+ /// Vec3 mAxisY1 = Vec3::sAxisY() + ///
+ ///
+ public void SetAxisY1(float3 value) => Jolt.PInvoke.SixDOFConstraintSettings_SetAxisY1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:53 + ///
+ /// RVec3 mPosition2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPosition2() => Jolt.PInvoke.SixDOFConstraintSettings_GetPosition2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:53 + ///
+ /// RVec3 mPosition2 = RVec3::sZero() + ///
+ ///
+ public void SetPosition2(float3 value) => Jolt.PInvoke.SixDOFConstraintSettings_SetPosition2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:54 + ///
+ /// Vec3 mAxisX2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetAxisX2() => Jolt.PInvoke.SixDOFConstraintSettings_GetAxisX2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:54 + ///
+ /// Vec3 mAxisX2 = Vec3::sAxisX() + ///
+ ///
+ public void SetAxisX2(float3 value) => Jolt.PInvoke.SixDOFConstraintSettings_SetAxisX2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:55 + ///
+ /// Vec3 mAxisY2 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetAxisY2() => Jolt.PInvoke.SixDOFConstraintSettings_GetAxisY2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:55 + ///
+ /// Vec3 mAxisY2 = Vec3::sAxisY() + ///
+ ///
+ public void SetAxisY2(float3 value) => Jolt.PInvoke.SixDOFConstraintSettings_SetAxisY2(this, value); + + /// + /// + /// The type of swing constraint that we want to use. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:63 + ///
+ /// ESwingType mSwingType = ESwingType::Cone + ///
+ ///
+ public SwingType GetSwingType() => Jolt.PInvoke.SixDOFConstraintSettings_GetSwingType(this); + + /// + /// + /// The type of swing constraint that we want to use. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:63 + ///
+ /// ESwingType mSwingType = ESwingType::Cone + ///
+ ///
+ public void SetSwingType(SwingType value) => Jolt.PInvoke.SixDOFConstraintSettings_SetSwingType(this, value); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. Only soft translation limits are supported, soft rotation limits are not currently + /// supported. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:83 + ///
+ /// SpringSettings mLimitsSpringSettings[EAxis::NumTranslation] + ///
+ ///
+ /// + /// + /// One of the 3 elements, by index. The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SpringSettings GetLimitsSpringSettings(uint index) + { + if (index >= 3) + throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below 3."); + return Jolt.PInvoke.SixDOFConstraintSettings_GetLimitsSpringSettings(this, index); + } + + /// + /// + /// Motor settings for each axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SixDOFConstraint.h:97 + ///
+ /// MotorSettings mMotorSettings[EAxis::Num] + ///
+ ///
+ /// + /// + /// One of the 6 elements, by index. The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetMotorSettings(uint index) + { + if (index >= 6) + throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below 6."); + return Jolt.PInvoke.SixDOFConstraintSettings_GetMotorSettings(this, index); + } + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(SixDOFConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(SixDOFConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SkeletalAnimation.gen.cs b/Brutal.Jolt/Generated/Classes/SkeletalAnimation.gen.cs new file mode 100644 index 0000000..0738caa --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SkeletalAnimation.gen.cs @@ -0,0 +1,242 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Resource for a skinned animation + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:18 + ///
+ /// class SkeletalAnimation : public RefTarget<SkeletalAnimation> + ///
+ ///
+ [InteropHandle] + public readonly partial struct SkeletalAnimation : IDisposable + { + /// + /// + /// Contains the current state of a joint, a local space transformation relative to its parent joint + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:24 + ///
+ /// class JointState + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct JointState + { + /// + /// + /// Local space rotation of the joint + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:35 + ///
+ /// Quat mRotation = Quat::sIdentity() + ///
+ ///
+ [FieldOffset(0)] + public floatQuat Rotation; + + /// + /// + /// Local space translation of the joint + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:36 + ///
+ /// Vec3 mTranslation = Vec3::sZero() + ///
+ ///
+ [FieldOffset(16)] + public float3 Translation; + } + + public static SkeletalAnimation Create() => Jolt.PInvoke.SkeletalAnimation_Create(); + + /// + /// + /// Get the length (in seconds) of this animation + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:63 + ///
+ /// float GetDuration() const + ///
+ ///
+ public float GetDuration() => Jolt.PInvoke.SkeletalAnimation_GetDuration(this); + + /// + /// + /// Scale the size of all joints by inScale + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:66 + ///
+ /// void ScaleJoints(float inScale) + ///
+ ///
+ public void ScaleJoints(float scale) => Jolt.PInvoke.SkeletalAnimation_ScaleJoints(this, scale); + + /// + /// + /// If the animation is looping or not. If an animation is looping, the animation will continue playing + /// after completion + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:69 + ///
+ /// void SetIsLooping(bool inIsLooping) + ///
+ ///
+ public void SetIsLooping(bool isLooping) => Jolt.PInvoke.SkeletalAnimation_SetIsLooping(this, isLooping); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:70 + ///
+ /// bool IsLooping() const + ///
+ ///
+ public bool IsLooping() => Jolt.PInvoke.SkeletalAnimation_IsLooping(this); + + /// + /// + /// Get the (interpolated) joint transforms at time inTime + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:73 + ///
+ /// void Sample(float inTime, SkeletonPose &ioPose) const + ///
+ ///
+ public void Sample(float time, SkeletonPose pose) => Jolt.PInvoke.SkeletalAnimation_Sample(this, time, pose); + + /// + /// + /// Saves the state of this animation in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:80 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.SkeletalAnimation_SaveBinaryState(this, stream); + + /// + /// + /// Restore a saved ragdoll from inStream + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:85 + ///
+ /// static AnimationResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static SkeletalAnimation RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.SkeletalAnimation_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Serialises this object (and everything it references) into buffer as a Jolt object stream, and returns + /// the total size of that stream. Nothing is written past the end of the buffer, so a return value larger + /// than buffer.Length means the buffer was too small and the call should be retried with one that size - + /// passing an empty span is how you ask for the size. Each call serialises the object's current state + /// independently and retains nothing after it returns. If the object grows between the size query and the + /// fill, use the fill's returned size to retry with a larger buffer. Text streams are human-readable and + /// portable; binary ones are smaller. Read one back with SkeletalAnimation.RestoreFromObjectStream. Throws + /// JoltException with Jolt's error message when the object can't be written, and + /// ArgumentOutOfRangeException when streamType is neither Text nor Binary. + /// + /// + public unsafe ByteSize SaveObjectStream(Span buffer, ObjectStreamType streamType = ObjectStreamType.Text) + { + fixed (byte* buffer_fixed = buffer) + { + if (streamType is not (ObjectStreamType.Text or ObjectStreamType.Binary)) + throw new ArgumentOutOfRangeException( + nameof(streamType), + streamType, + "Not an object stream format." + ); + var _size = Jolt.PInvoke.SkeletalAnimation_SaveObjectStream( + this, + buffer_fixed, + (nuint)buffer.Length, + streamType + ); + if (_size == 0) + throw JoltException.FromLastError(); + return (ByteSize)_size; + } + } + + /// + /// + /// Reads back an object stream written by SaveObjectStream (or by Jolt's own tools - the .tof and .bof + /// asset files), in either the text or the binary format: the stream's header says which. The factory has + /// to be up and RegisterTypes() called first, since class names are resolved through it. A stream that + /// isn't an object stream, is a different version, or holds a different type throws JoltException with + /// Jolt's error message. Truncation is NOT reliably caught: Jolt's reader treats running out of data as a + /// normal end of stream, so a stream cut off after the main object was read comes back as an object whose + /// unresolved references were silently set to null - code reading untrusted input has to validate what it + /// got. The returned handle is yours - it carries its own reference, so Dispose it once when you are done + /// with it. + /// + /// + public static unsafe SkeletalAnimation RestoreFromObjectStream(ReadOnlySpan data) + { + fixed (byte* data_fixed = data) + { + var _handle = Jolt.PInvoke.SkeletalAnimation_RestoreFromObjectStream(data_fixed, (nuint)data.Length); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + } + + public void AddRef() => Jolt.PInvoke.SkeletalAnimation_AddRef(this); + + public void Release() => Jolt.PInvoke.SkeletalAnimation_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.SkeletalAnimation_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/Skeleton.gen.cs b/Brutal.Jolt/Generated/Classes/Skeleton.gen.cs new file mode 100644 index 0000000..6ea3cee --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Skeleton.gen.cs @@ -0,0 +1,237 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Resource that contains the joint hierarchy for a skeleton + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:17 + ///
+ /// class Skeleton : public RefTarget<Skeleton> + ///
+ ///
+ [InteropHandle] + public readonly partial struct Skeleton : IDisposable + { + public static Skeleton Create() => Jolt.PInvoke.Skeleton_Create(); + + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:44 + ///
+ /// int GetJointCount() const + ///
+ ///
+ public int GetJointCount() => Jolt.PInvoke.Skeleton_GetJointCount(this); + + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:47 + ///
+ /// uint AddJoint(const string_view &inName, const string_view &inParentName = string_view()) + ///
+ ///
+ public unsafe uint AddJoint(RefString8 name, RefString8 parentName) + { + fixed (byte* parentName_fixed = parentName) + fixed (byte* name_fixed = name) + { + return Jolt.PInvoke.Skeleton_AddJoint(this, name_fixed, parentName_fixed); + } + } + + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:48 + ///
+ /// uint AddJoint(const string_view &inName, int inParentIndex) + ///
+ ///
+ /// + /// + /// Throws ArgumentException for parentIndex: "parentIndex must be -1 (no parent) or the index of a joint + /// already added." + /// + /// + public unsafe uint AddJoint(RefString8 name, int parentIndex) + { + fixed (byte* name_fixed = name) + { + var _result = Jolt.PInvoke.Skeleton_AddJoint_2(this, name_fixed, parentIndex, out var _bufferCheck); + if (_bufferCheck == 1) + throw new ArgumentException( + "parentIndex must be -1 (no parent) or the index of a joint already added.", + nameof(parentIndex) + ); + return _result; + } + } + + /// + /// + /// Find joint by name + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:52 + ///
+ /// int GetJointIndex(const string_view &inName) const + ///
+ ///
+ public unsafe int GetJointIndex(RefString8 name) + { + fixed (byte* name_fixed = name) + { + return Jolt.PInvoke.Skeleton_GetJointIndex(this, name_fixed); + } + } + + /// + /// + /// Fill in parent joint indices based on name + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:55 + ///
+ /// void CalculateParentJointIndices() + ///
+ ///
+ public void CalculateParentJointIndices() => Jolt.PInvoke.Skeleton_CalculateParentJointIndices(this); + + /// + /// + /// Many of the algorithms that use the Skeleton class require that parent joints are in the mJoints array + /// before their children. This function returns true if this is the case, false if not. + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:59 + ///
+ /// bool AreJointsCorrectlyOrdered() const + ///
+ ///
+ public bool AreJointsCorrectlyOrdered() => Jolt.PInvoke.Skeleton_AreJointsCorrectlyOrdered(this); + + /// + /// + /// Saves the state of this object in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:62 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.Skeleton_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:65 + ///
+ /// static SkeletonResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static Skeleton RestoreFromBinaryState(StreamIn stream) + { + var _handle = Jolt.PInvoke.Skeleton_RestoreFromBinaryState(stream); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Serialises this object (and everything it references) into buffer as a Jolt object stream, and returns + /// the total size of that stream. Nothing is written past the end of the buffer, so a return value larger + /// than buffer.Length means the buffer was too small and the call should be retried with one that size - + /// passing an empty span is how you ask for the size. Each call serialises the object's current state + /// independently and retains nothing after it returns. If the object grows between the size query and the + /// fill, use the fill's returned size to retry with a larger buffer. Text streams are human-readable and + /// portable; binary ones are smaller. Read one back with Skeleton.RestoreFromObjectStream. Throws + /// JoltException with Jolt's error message when the object can't be written, and + /// ArgumentOutOfRangeException when streamType is neither Text nor Binary. + /// + /// + public unsafe ByteSize SaveObjectStream(Span buffer, ObjectStreamType streamType = ObjectStreamType.Text) + { + fixed (byte* buffer_fixed = buffer) + { + if (streamType is not (ObjectStreamType.Text or ObjectStreamType.Binary)) + throw new ArgumentOutOfRangeException( + nameof(streamType), + streamType, + "Not an object stream format." + ); + var _size = Jolt.PInvoke.Skeleton_SaveObjectStream( + this, + buffer_fixed, + (nuint)buffer.Length, + streamType + ); + if (_size == 0) + throw JoltException.FromLastError(); + return (ByteSize)_size; + } + } + + /// + /// + /// Reads back an object stream written by SaveObjectStream (or by Jolt's own tools - the .tof and .bof + /// asset files), in either the text or the binary format: the stream's header says which. The factory has + /// to be up and RegisterTypes() called first, since class names are resolved through it. A stream that + /// isn't an object stream, is a different version, or holds a different type throws JoltException with + /// Jolt's error message. Truncation is NOT reliably caught: Jolt's reader treats running out of data as a + /// normal end of stream, so a stream cut off after the main object was read comes back as an object whose + /// unresolved references were silently set to null - code reading untrusted input has to validate what it + /// got. The returned handle is yours - it carries its own reference, so Dispose it once when you are done + /// with it. + /// + /// + public static unsafe Skeleton RestoreFromObjectStream(ReadOnlySpan data) + { + fixed (byte* data_fixed = data) + { + var _handle = Jolt.PInvoke.Skeleton_RestoreFromObjectStream(data_fixed, (nuint)data.Length); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + } + + public void AddRef() => Jolt.PInvoke.Skeleton_AddRef(this); + + public void Release() => Jolt.PInvoke.Skeleton_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.Skeleton_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/SkeletonMapper.gen.cs b/Brutal.Jolt/Generated/Classes/SkeletonMapper.gen.cs new file mode 100644 index 0000000..3fc6eeb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SkeletonMapper.gen.cs @@ -0,0 +1,717 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that is able to map a low detail (ragdoll) skeleton to a high detail (animation) skeleton and vice + /// versa + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:13 + ///
+ /// class SkeletonMapper : public RefTarget<SkeletonMapper> + ///
+ ///
+ [InteropHandle] + public readonly partial struct SkeletonMapper : IDisposable + { + /// + /// + /// A joint that maps 1-on-1 to a joint in the other skeleton + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:17 + ///
+ /// class Mapping + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 144)] + public partial struct Mapping + { + /// + /// + /// Index of joint from skeleton 1 + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:27 + ///
+ /// int mJointIdx1 + ///
+ ///
+ [FieldOffset(0)] + public int JointIdx1; + + /// + /// + /// Corresponding index of joint from skeleton 2 + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:28 + ///
+ /// int mJointIdx2 + ///
+ ///
+ [FieldOffset(4)] + public int JointIdx2; + + /// + /// + /// Transforms this joint from skeleton 1 to 2 + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:29 + ///
+ /// Mat44 mJoint1To2 + ///
+ ///
+ [FieldOffset(16)] + public float4x4 Joint1To2; + + /// + /// + /// Inverse of the transform above + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:30 + ///
+ /// Mat44 mJoint2To1 + ///
+ ///
+ [FieldOffset(80)] + public float4x4 Joint2To1; + } + + /// + /// + /// Joints that could not be mapped from skeleton 1 to 2 + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:45 + ///
+ /// class Unmapped + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct Unmapped + { + /// + /// + /// Joint index of unmappable joint + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:51 + ///
+ /// int mJointIdx + ///
+ ///
+ [FieldOffset(0)] + public int JointIdx; + + /// + /// + /// Parent joint index of unmappable joint + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:52 + ///
+ /// int mParentJointIdx + ///
+ ///
+ [FieldOffset(4)] + public int ParentJointIdx; + } + + /// + /// + /// Joints that should have their translation locked (fixed) + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:56 + ///
+ /// class Locked + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct Locked + { + /// + /// + /// Joint index of joint with locked translation (in skeleton 2) + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:59 + ///
+ /// int mJointIdx + ///
+ ///
+ [FieldOffset(0)] + public int JointIdx; + + /// + /// + /// Parent joint index of joint with locked translation (in skeleton 2) + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:60 + ///
+ /// int mParentJointIdx + ///
+ ///
+ [FieldOffset(4)] + public int ParentJointIdx; + + /// + /// + /// Translation of neutral pose + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:61 + ///
+ /// Vec3 mTranslation + ///
+ ///
+ [FieldOffset(16)] + public float3 Translation; + } + + public static SkeletonMapper Create() => Jolt.PInvoke.SkeletonMapper_Create(); + + /// + /// + /// Default function that checks if the names of the joints are equal + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:68 + ///
+ /// static bool sDefaultCanMapJoint(const Skeleton *inSkeleton1, int inIndex1, const Skeleton *inSkeleton2, int inIndex2) + ///
+ ///
+ public static bool DefaultCanMapJoint(Skeleton skeleton1, int index1, Skeleton skeleton2, int index2) => + Jolt.PInvoke.SkeletonMapper_DefaultCanMapJoint(skeleton1, index1, skeleton2, index2); + + /// + /// + /// Initialize the skeleton mapper. Skeleton 1 should be the (low detail) ragdoll skeleton and skeleton 2 + /// the (high detail) animation skeleton. We assume that each joint in skeleton 1 can be mapped to a joint + /// in skeleton 2 (if not mapping from animation skeleton to ragdoll skeleton will be undefined). Skeleton 2 + /// should have the same hierarchy as skeleton 1 but can contain extra joints between those in skeleton 1 + /// and it can have extra joints at the root and leaves of the skeleton. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:81 + ///
+ /// void Initialize(const Skeleton *inSkeleton1, const Mat44 *inNeutralPose1, const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2, const CanMapJoint &inCanMapJoint = sDefaultCanMapJoint) + ///
+ ///
+ /// + /// + /// Initialize the skeleton mapper. Skeleton 1 should be the (low detail) ragdoll skeleton and skeleton 2 the (high detail) animation skeleton. + /// We assume that each joint in skeleton 1 can be mapped to a joint in skeleton 2 (if not mapping from animation skeleton to ragdoll skeleton will be undefined). + /// Skeleton 2 should have the same hierarchy as skeleton 1 but can contain extra joints between those in skeleton 1 and it can have extra joints at the root and leaves of the skeleton. + /// @param inSkeleton1 Source skeleton to map from. + /// @param inNeutralPose1 Neutral pose of the source skeleton (model space) + /// @param inSkeleton2 Target skeleton to map to. + /// @param inNeutralPose2 Neutral pose of the target skeleton (model space), inNeutralPose1 and inNeutralPose2 must match as closely as possible, preferably the position of the mappable joints should be identical. + /// @param inCanMapJoint Function that checks if joints in skeleton 1 and skeleton 2 are equal. + /// + /// + /// neutralPose1 must hold exactly one element per joint in skeleton 1 - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. A null skeleton1 throws ArgumentNullException. Throws ArgumentException + /// for skeleton1: "skeleton1 has a joint whose parent index isn't an earlier joint - parents must come + /// first, as Jolt requires." + /// + /// + /// neutralPose2 must hold exactly one element per joint in skeleton 2 - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. A null skeleton2 throws ArgumentNullException. Throws ArgumentException + /// for skeleton2: "skeleton2 has a joint whose parent index isn't an earlier joint - parents must come + /// first, as Jolt requires." + /// + /// + /// canMapJoint: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Pass null for Jolt's default (SkeletonMapper::sDefaultCanMapJoint). The callback and userData are used + /// only for the duration of this call; userData may be freed when it returns. + /// + /// + public unsafe void Initialize( + Skeleton skeleton1, + ReadOnlySpan neutralPose1, + Skeleton skeleton2, + ReadOnlySpan neutralPose2, + delegate* unmanaged[Cdecl] canMapJoint, + nint canMapJointUserData + ) + { + fixed (float4x4* neutralPose2_fixed = neutralPose2) + fixed (float4x4* neutralPose1_fixed = neutralPose1) + { + Jolt.PInvoke.SkeletonMapper_Initialize( + this, + skeleton1, + neutralPose1_fixed, + (uint)neutralPose1.Length, + skeleton2, + neutralPose2_fixed, + (uint)neutralPose2.Length, + canMapJoint, + canMapJointUserData, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentNullException(nameof(skeleton1), "The skeleton handle is null."); + if (_bufferCheck == 2) + throw new ArgumentException( + "skeleton1 has a joint whose parent index isn't an earlier joint - parents must come first, as Jolt requires.", + nameof(skeleton1) + ); + if (_bufferCheck == 3) + throw new ArgumentNullException(nameof(skeleton2), "The skeleton handle is null."); + if (_bufferCheck == 4) + throw new ArgumentException( + "skeleton2 has a joint whose parent index isn't an earlier joint - parents must come first, as Jolt requires.", + nameof(skeleton2) + ); + if (_bufferCheck == 5) + throw new ArgumentOutOfRangeException( + nameof(neutralPose1), + neutralPose1.Length, + "Expected one element per joint in skeleton 1." + ); + if (_bufferCheck == 6) + throw new ArgumentOutOfRangeException( + nameof(neutralPose2), + neutralPose2.Length, + "Expected one element per joint in skeleton 2." + ); + } + } + + /// + /// + /// This can be called so lock the translation of a specified set of joints in skeleton 2. Because + /// constraints are never 100% rigid, there's always a little bit of stretch in the ragdoll when the ragdoll + /// is under stress. Locking the translations of the pose will remove the visual stretch from the ragdoll + /// but will introduce a difference between the physical simulation and the visual representation. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:90 + ///
+ /// void LockTranslations(const Skeleton *inSkeleton2, const bool *inLockedTranslations, const Mat44 *inNeutralPose2) + ///
+ ///
+ /// + /// + /// This can be called so lock the translation of a specified set of joints in skeleton 2. + /// Because constraints are never 100% rigid, there's always a little bit of stretch in the ragdoll when the ragdoll is under stress. + /// Locking the translations of the pose will remove the visual stretch from the ragdoll but will introduce a difference between the + /// physical simulation and the visual representation. + /// @param inSkeleton2 Target skeleton to map to. + /// @param inLockedTranslations An array of bools the size of inSkeleton2->GetJointCount(), for each joint indicating if the joint is locked. + /// @param inNeutralPose2 Neutral pose to take reference translations from + /// + /// + /// lockedTranslations must hold exactly one element per joint in skeleton 2 - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only + /// used for the duration of the call. A null skeleton2 throws ArgumentNullException. Throws + /// ArgumentException for skeleton2: "skeleton2 has a joint whose parent index isn't an earlier joint - + /// parents must come first, as Jolt requires." Throws ArgumentException for lockedTranslations: "A root + /// joint (one with no parent) can't have its translation locked - it positions the whole skeleton." + /// + /// + /// neutralPose2 must hold exactly one element per joint in skeleton 2 - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. A null skeleton2 throws ArgumentNullException. + /// + /// + public unsafe void LockTranslations( + Skeleton skeleton2, + ReadOnlySpan lockedTranslations, + ReadOnlySpan neutralPose2 + ) + { + fixed (float4x4* neutralPose2_fixed = neutralPose2) + fixed (bool* lockedTranslations_fixed = lockedTranslations) + { + Jolt.PInvoke.SkeletonMapper_LockTranslations( + this, + skeleton2, + lockedTranslations_fixed, + (uint)lockedTranslations.Length, + neutralPose2_fixed, + (uint)neutralPose2.Length, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentNullException(nameof(skeleton2), "The skeleton handle is null."); + if (_bufferCheck == 2) + throw new ArgumentException( + "skeleton2 has a joint whose parent index isn't an earlier joint - parents must come first, as Jolt requires.", + nameof(skeleton2) + ); + if (_bufferCheck == 3) + throw new ArgumentException( + "A root joint (one with no parent) can't have its translation locked - it positions the whole skeleton.", + nameof(lockedTranslations) + ); + if (_bufferCheck == 4) + throw new ArgumentOutOfRangeException( + nameof(lockedTranslations), + lockedTranslations.Length, + "Expected one element per joint in skeleton 2." + ); + if (_bufferCheck == 5) + throw new ArgumentOutOfRangeException( + nameof(neutralPose2), + neutralPose2.Length, + "Expected one element per joint in skeleton 2." + ); + } + } + + /// + /// + /// After Initialize(), this can be called to lock the translation of all joints in skeleton 2 below the + /// first mapped joint to those of the neutral pose. Because constraints are never 100% rigid, there's + /// always a little bit of stretch in the ragdoll when the ragdoll is under stress. Locking the translations + /// of the pose will remove the visual stretch from the ragdoll but will introduce a difference between the + /// physical simulation and the visual representation. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:98 + ///
+ /// void LockAllTranslations(const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2) + ///
+ ///
+ /// + /// + /// After Initialize(), this can be called to lock the translation of all joints in skeleton 2 below the first mapped joint to those of the neutral pose. + /// Because constraints are never 100% rigid, there's always a little bit of stretch in the ragdoll when the ragdoll is under stress. + /// Locking the translations of the pose will remove the visual stretch from the ragdoll but will introduce a difference between the + /// physical simulation and the visual representation. + /// @param inSkeleton2 Target skeleton to map to. + /// @param inNeutralPose2 Neutral pose to take reference translations from + /// + /// + /// neutralPose2 must hold exactly one element per joint in skeleton 2 - the native count is read from the + /// object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used + /// for the duration of the call. A null skeleton2 throws ArgumentNullException. Throws ArgumentException + /// for skeleton2: "skeleton2 has a joint whose parent index isn't an earlier joint - parents must come + /// first, as Jolt requires." Throws InvalidOperationException: "The mapper has no mappings. Call Initialize + /// first." Throws ArgumentException for skeleton2: "skeleton2 is not the skeleton the mapper was + /// initialised with." + /// + /// + public unsafe void LockAllTranslations(Skeleton skeleton2, ReadOnlySpan neutralPose2) + { + fixed (float4x4* neutralPose2_fixed = neutralPose2) + { + Jolt.PInvoke.SkeletonMapper_LockAllTranslations( + this, + skeleton2, + neutralPose2_fixed, + (uint)neutralPose2.Length, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentNullException(nameof(skeleton2), "The skeleton handle is null."); + if (_bufferCheck == 2) + throw new ArgumentException( + "skeleton2 has a joint whose parent index isn't an earlier joint - parents must come first, as Jolt requires.", + nameof(skeleton2) + ); + if (_bufferCheck == 3) + throw new InvalidOperationException("The mapper has no mappings. Call Initialize first."); + if (_bufferCheck == 4) + throw new ArgumentException( + "skeleton2 is not the skeleton the mapper was initialised with.", + nameof(skeleton2) + ); + if (_bufferCheck == 5) + throw new ArgumentOutOfRangeException( + nameof(neutralPose2), + neutralPose2.Length, + "Expected one element per joint in skeleton 2." + ); + } + } + + /// + /// + /// Map a pose. Joints that were directly mappable will be copied in model space from pose 1 to pose 2. Any + /// joints that are only present in skeleton 2 will get their model space transform calculated through the + /// local space transforms of pose 2. Joints that are part of a joint chain between two mapped joints will + /// be reoriented towards the next joint in skeleton 1. This means that it is possible for unmapped joints + /// to have some animation, but very extreme animation poses will show artifacts. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:107 + ///
+ /// void Map(const Mat44 *inPose1ModelSpace, const Mat44 *inPose2LocalSpace, Mat44 *outPose2ModelSpace) const + ///
+ ///
+ /// + /// + /// Map a pose. Joints that were directly mappable will be copied in model space from pose 1 to pose 2. Any joints that are only present in skeleton 2 + /// will get their model space transform calculated through the local space transforms of pose 2. Joints that are part of a joint chain between two + /// mapped joints will be reoriented towards the next joint in skeleton 1. This means that it is possible for unmapped joints to have some animation, + /// but very extreme animation poses will show artifacts. + /// @param inPose1ModelSpace Pose on skeleton 1 in model space + /// @param inPose2LocalSpace Pose on skeleton 2 in local space (used for the joints that cannot be mapped) + /// @param outPose2ModelSpace Model space pose on skeleton 2 (the output of the mapping) + /// + /// + /// pose1ModelSpace must hold at least one element per mapped joint of skeleton 1 - the native count is read + /// from the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is + /// only used for the duration of the call. Throws InvalidOperationException: "The mapper holds a negative + /// joint index. Only an unmapped joint's ParentJointIdx may be -1." + /// + /// + /// pose2LocalSpace must hold at least one element per joint of skeleton 2 - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only + /// used for the duration of the call. + /// + /// + /// pose2ModelSpace must hold at least one element per joint of skeleton 2 - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only + /// used for the duration of the call. + /// + /// + public unsafe void Map( + ReadOnlySpan pose1ModelSpace, + ReadOnlySpan pose2LocalSpace, + Span pose2ModelSpace + ) + { + fixed (float4x4* pose2ModelSpace_fixed = pose2ModelSpace) + fixed (float4x4* pose2LocalSpace_fixed = pose2LocalSpace) + fixed (float4x4* pose1ModelSpace_fixed = pose1ModelSpace) + { + Jolt.PInvoke.SkeletonMapper_Map( + this, + pose1ModelSpace_fixed, + (uint)pose1ModelSpace.Length, + pose2LocalSpace_fixed, + (uint)pose2LocalSpace.Length, + pose2ModelSpace_fixed, + (uint)pose2ModelSpace.Length, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new InvalidOperationException( + "The mapper holds a negative joint index. Only an unmapped joint's ParentJointIdx may be -1." + ); + if (_bufferCheck == 2) + throw new ArgumentOutOfRangeException( + nameof(pose1ModelSpace), + pose1ModelSpace.Length, + "Expected at least one element per mapped joint of skeleton 1." + ); + if (_bufferCheck == 3) + throw new ArgumentOutOfRangeException( + nameof(pose2LocalSpace), + pose2LocalSpace.Length, + "Expected at least one element per joint of skeleton 2." + ); + if (_bufferCheck == 4) + throw new ArgumentOutOfRangeException( + nameof(pose2ModelSpace), + pose2ModelSpace.Length, + "Expected at least one element per joint of skeleton 2." + ); + } + } + + /// + /// + /// Reverse map a pose, this will only use the mappings and not the chains (it assumes that all joints in + /// skeleton 1 are mapped) + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:112 + ///
+ /// void MapReverse(const Mat44 *inPose2ModelSpace, Mat44 *outPose1ModelSpace) const + ///
+ ///
+ /// + /// + /// Reverse map a pose, this will only use the mappings and not the chains (it assumes that all joints in skeleton 1 are mapped) + /// @param inPose2ModelSpace Model space pose on skeleton 2 + /// @param outPose1ModelSpace When the function returns this will contain the model space pose for skeleton 1 + /// + /// + /// pose2ModelSpace must hold at least one element per joint of skeleton 2 - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only + /// used for the duration of the call. Throws InvalidOperationException: "The mapper holds a negative joint + /// index. Only an unmapped joint's ParentJointIdx may be -1." + /// + /// + /// pose1ModelSpace must hold at least one element per mapped joint of skeleton 1 - the native count is read + /// from the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is + /// only used for the duration of the call. + /// + /// + public unsafe void MapReverse(ReadOnlySpan pose2ModelSpace, Span pose1ModelSpace) + { + fixed (float4x4* pose1ModelSpace_fixed = pose1ModelSpace) + fixed (float4x4* pose2ModelSpace_fixed = pose2ModelSpace) + { + Jolt.PInvoke.SkeletonMapper_MapReverse( + this, + pose2ModelSpace_fixed, + (uint)pose2ModelSpace.Length, + pose1ModelSpace_fixed, + (uint)pose1ModelSpace.Length, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new InvalidOperationException( + "The mapper holds a negative joint index. Only an unmapped joint's ParentJointIdx may be -1." + ); + if (_bufferCheck == 2) + throw new ArgumentOutOfRangeException( + nameof(pose2ModelSpace), + pose2ModelSpace.Length, + "Expected at least one element per joint of skeleton 2." + ); + if (_bufferCheck == 3) + throw new ArgumentOutOfRangeException( + nameof(pose1ModelSpace), + pose1ModelSpace.Length, + "Expected at least one element per mapped joint of skeleton 1." + ); + } + } + + /// + /// + /// Search through the directly mapped joints (mMappings) and find inJoint1Idx, returns the corresponding + /// Joint2Idx or -1 if not found. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:115 + ///
+ /// int GetMappedJointIdx(int inJoint1Idx) const + ///
+ ///
+ public int GetMappedJointIdx(int joint1Idx) => Jolt.PInvoke.SkeletonMapper_GetMappedJointIdx(this, joint1Idx); + + /// + /// + /// Search through the locked translations (mLockedTranslations) and find if joint inJoint2Idx is locked. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:118 + ///
+ /// bool IsJointTranslationLocked(int inJoint2Idx) const + ///
+ ///
+ public bool IsJointTranslationLocked(int joint2Idx) => + Jolt.PInvoke.SkeletonMapper_IsJointTranslationLocked(this, joint2Idx); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:128 + ///
+ /// MappingVector & GetMappings() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetMappings() + { + Jolt.PInvoke.SkeletonMapper_GetMappings(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:132 + ///
+ /// UnmappedVector & GetUnmapped() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetUnmapped() + { + Jolt.PInvoke.SkeletonMapper_GetUnmapped(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:134 + ///
+ /// LockedVector & GetLockedTranslations() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetLockedTranslations() + { + Jolt.PInvoke.SkeletonMapper_GetLockedTranslations(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + public void AddRef() => Jolt.PInvoke.SkeletonMapper_AddRef(this); + + public void Release() => Jolt.PInvoke.SkeletonMapper_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.SkeletonMapper_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/SkeletonPose.gen.cs b/Brutal.Jolt/Generated/Classes/SkeletonPose.gen.cs new file mode 100644 index 0000000..998a69f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SkeletonPose.gen.cs @@ -0,0 +1,315 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Instance of a skeleton, contains the pose the current skeleton is in + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:17 + ///
+ /// class SkeletonPose + ///
+ ///
+ [InteropHandle] + public readonly partial struct SkeletonPose : IDisposable + { + /// + /// + /// Draw settings + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:64 + ///
+ /// struct DrawSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 3)] + public partial struct DrawSettings + { + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:66 + ///
+ /// bool mDrawJoints = true + ///
+ ///
+ [FieldOffset(0)] + public Brutal.Bool8 DrawJoints; + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:67 + ///
+ /// bool mDrawJointOrientations = true + ///
+ ///
+ [FieldOffset(1)] + public Brutal.Bool8 DrawJointOrientations; + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:68 + ///
+ /// bool mDrawJointNames = false + ///
+ ///
+ [FieldOffset(2)] + public Brutal.Bool8 DrawJointNames; + } + + public static SkeletonPose Create() => Jolt.PInvoke.SkeletonPose_Create(); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:28 + ///
+ /// void SetSkeleton(const Skeleton *inSkeleton) + ///
+ ///
+ /// + /// + /// @name Skeleton + /// @{ + /// + /// + public void SetSkeleton(Skeleton skeleton) => Jolt.PInvoke.SkeletonPose_SetSkeleton(this, skeleton); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:29 + ///
+ /// const Skeleton * GetSkeleton() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Skeleton GetSkeleton() => Jolt.PInvoke.SkeletonPose_GetSkeleton(this); + + /// + /// + /// Extra offset applied to the root (and therefore also to all of its children) + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:33 + ///
+ /// void SetRootOffset(RVec3Arg inOffset) + ///
+ ///
+ public void SetRootOffset(float3 offset) => Jolt.PInvoke.SkeletonPose_SetRootOffset(this, offset); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:34 + ///
+ /// RVec3 GetRootOffset() const + ///
+ ///
+ public float3 GetRootOffset() => Jolt.PInvoke.SkeletonPose_GetRootOffset(this); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:38 + ///
+ /// uint GetJointCount() const + ///
+ ///
+ /// + /// + /// @name Properties of the joints + /// @{ + /// + /// + public uint GetJointCount() => Jolt.PInvoke.SkeletonPose_GetJointCount(this); + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:40 + ///
+ /// JointStateVector & GetJoints() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetJoints() + { + Jolt.PInvoke.SkeletonPose_GetJoints(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:42 + ///
+ /// JointState & GetJoint(int inJoint) + ///
+ ///
+ /// + /// + /// Writes value into the element GetJoint returns, in place. The C++ getter hands out a reference; the C# + /// GetJoint can only return a copy, so this is how an edit reaches the object. + /// + /// + public void SetJoint(int joint, in SkeletalAnimation.JointState value) + { + Jolt.PInvoke.SkeletonPose_SetJoint(this, joint, in value, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(joint), + joint, + "Expected an index below the number of joints in the pose." + ); + } + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:48 + ///
+ /// Mat44Vector & GetJointMatrices() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetJointMatrices() + { + Jolt.PInvoke.SkeletonPose_GetJointMatrices(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:49 + ///
+ /// const Mat44 & GetJointMatrix(int inJoint) const + ///
+ ///
+ public float4x4 GetJointMatrix(int joint) + { + var _result = Jolt.PInvoke.SkeletonPose_GetJointMatrix(this, joint, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(joint), + joint, + "Expected an index below the number of joint matrices." + ); + return _result; + } + + /// + /// + /// Convert the joint states to joint matrices + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:54 + ///
+ /// void CalculateJointMatrices() + ///
+ ///
+ public void CalculateJointMatrices() => Jolt.PInvoke.SkeletonPose_CalculateJointMatrices(this); + + /// + /// + /// Convert joint matrices to joint states + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:57 + ///
+ /// void CalculateJointStates() + ///
+ ///
+ public void CalculateJointStates() => Jolt.PInvoke.SkeletonPose_CalculateJointStates(this); + + /// + /// + /// Outputs the joint matrices in local space (ensure that outMatrices has GetJointCount() elements, assumes + /// that values in GetJoints() is up to date) + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:60 + ///
+ /// void CalculateLocalSpaceJointMatrices(Mat44 *outMatrices) const + ///
+ ///
+ /// + /// + /// matrices must hold exactly one element per joint in the pose - the native count is read from the object + /// itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is only used for + /// the duration of the call. + /// + /// + public unsafe void CalculateLocalSpaceJointMatrices(Span matrices) + { + fixed (float4x4* matrices_fixed = matrices) + { + Jolt.PInvoke.SkeletonPose_CalculateLocalSpaceJointMatrices( + this, + matrices_fixed, + (uint)matrices.Length, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentOutOfRangeException( + nameof(matrices), + matrices.Length, + "Expected one element per joint in the pose." + ); + } + } + + /// + /// + /// Draw current pose + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonPose.h:72 + ///
+ /// void Draw(const DrawSettings &inDrawSettings, DebugRenderer *inRenderer, RMat44Arg inOffset = RMat44::sIdentity()) const + ///
+ ///
+ public void Draw(in SkeletonPose.DrawSettings drawSettings, DebugRenderer renderer, in float4x4 offset) => + Jolt.PInvoke.SkeletonPose_Draw(this, in drawSettings, renderer, in offset); + + public void Dispose() => Jolt.PInvoke.SkeletonPose_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SliderConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/SliderConstraint.gen.cs new file mode 100644 index 0000000..b20709f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SliderConstraint.gen.cs @@ -0,0 +1,395 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A slider constraint allows movement in only 1 axis (and no rotation). Also known as a prismatic constraint. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:67 + ///
+ /// class SliderConstraint final : public TwoBodyConstraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct SliderConstraint : IDisposable + { + /// + /// + /// Construct slider constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:73 + ///
+ /// SliderConstraint(Body &inBody1, Body &inBody2, const SliderConstraintSettings &inSettings) + ///
+ ///
+ public static SliderConstraint Create(Body body1, Body body2, SliderConstraintSettings settings) => + Jolt.PInvoke.SliderConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// Get the current distance from the rest position + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:96 + ///
+ /// float GetCurrentPosition() const + ///
+ ///
+ public float GetCurrentPosition() => Jolt.PInvoke.SliderConstraint_GetCurrentPosition(this); + + /// + /// + /// Friction control + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:99 + ///
+ /// void SetMaxFrictionForce(float inFrictionForce) + ///
+ ///
+ public void SetMaxFrictionForce(float frictionForce) => + Jolt.PInvoke.SliderConstraint_SetMaxFrictionForce(this, frictionForce); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:100 + ///
+ /// float GetMaxFrictionForce() const + ///
+ ///
+ public float GetMaxFrictionForce() => Jolt.PInvoke.SliderConstraint_GetMaxFrictionForce(this); + + /// + /// + /// Motor settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:103 + ///
+ /// MotorSettings & GetMotorSettings() + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetMotorSettings() => Jolt.PInvoke.SliderConstraint_GetMotorSettings(this); + + /// + /// + /// Motor controls + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:107 + ///
+ /// void SetMotorState(EMotorState inState) + ///
+ ///
+ public void SetMotorState(MotorState state) => Jolt.PInvoke.SliderConstraint_SetMotorState(this, state); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:108 + ///
+ /// EMotorState GetMotorState() const + ///
+ ///
+ public MotorState GetMotorState() => Jolt.PInvoke.SliderConstraint_GetMotorState(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:109 + ///
+ /// void SetTargetVelocity(float inVelocity) + ///
+ ///
+ public void SetTargetVelocity(float velocity) => + Jolt.PInvoke.SliderConstraint_SetTargetVelocity(this, velocity); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:110 + ///
+ /// float GetTargetVelocity() const + ///
+ ///
+ public float GetTargetVelocity() => Jolt.PInvoke.SliderConstraint_GetTargetVelocity(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:111 + ///
+ /// void SetTargetPosition(float inPosition) + ///
+ ///
+ public void SetTargetPosition(float position) => + Jolt.PInvoke.SliderConstraint_SetTargetPosition(this, position); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:112 + ///
+ /// float GetTargetPosition() const + ///
+ ///
+ public float GetTargetPosition() => Jolt.PInvoke.SliderConstraint_GetTargetPosition(this); + + /// + /// + /// Update the limits of the slider constraint (see SliderConstraintSettings) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:115 + ///
+ /// void SetLimits(float inLimitsMin, float inLimitsMax) + ///
+ ///
+ public void SetLimits(float limitsMin, float limitsMax) => + Jolt.PInvoke.SliderConstraint_SetLimits(this, limitsMin, limitsMax); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:116 + ///
+ /// float GetLimitsMin() const + ///
+ ///
+ public float GetLimitsMin() => Jolt.PInvoke.SliderConstraint_GetLimitsMin(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:117 + ///
+ /// float GetLimitsMax() const + ///
+ ///
+ public float GetLimitsMax() => Jolt.PInvoke.SliderConstraint_GetLimitsMax(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:118 + ///
+ /// bool HasLimits() const + ///
+ ///
+ public bool HasLimits() => Jolt.PInvoke.SliderConstraint_HasLimits(this); + + /// + /// + /// Update the limits spring settings + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:121 + ///
+ /// const SpringSettings & GetLimitsSpringSettings() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SpringSettings GetLimitsSpringSettings() => Jolt.PInvoke.SliderConstraint_GetLimitsSpringSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:123 + ///
+ /// void SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings) + ///
+ ///
+ public void SetLimitsSpringSettings(SpringSettings limitsSpringSettings) => + Jolt.PInvoke.SliderConstraint_SetLimitsSpringSettings(this, limitsSpringSettings); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:126 + ///
+ /// inline Vector<2> GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float2 GetTotalLambdaPosition() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:127 + ///
+ /// inline float GetTotalLambdaPositionLimits() const + ///
+ ///
+ public float GetTotalLambdaPositionLimits() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaPositionLimits(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:128 + ///
+ /// inline Vec3 GetTotalLambdaRotation() const + ///
+ ///
+ public float3 GetTotalLambdaRotation() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaRotation(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:129 + ///
+ /// inline float GetTotalLambdaMotor() const + ///
+ ///
+ public float GetTotalLambdaMotor() => Jolt.PInvoke.SliderConstraint_GetTotalLambdaMotor(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(SliderConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(SliderConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SliderConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SliderConstraintSettings.gen.cs new file mode 100644 index 0000000..64c5f65 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SliderConstraintSettings.gen.cs @@ -0,0 +1,459 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Slider constraint settings, used to create a slider constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:16 + ///
+ /// class SliderConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct SliderConstraintSettings : IDisposable + { + public static SliderConstraintSettings Create() => Jolt.PInvoke.SliderConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// Simple way of setting the slider and normal axis in world space (assumes the bodies are already oriented + /// correctly when the constraint is created) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:29 + ///
+ /// void SetSliderAxis(Vec3Arg inSliderAxis) + ///
+ ///
+ public void SetSliderAxis(float3 sliderAxis) => + Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis(this, sliderAxis); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:32 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.SliderConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:32 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.SliderConstraintSettings_SetSpace(this, value); + + /// + /// + /// When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions of + /// the bodies when the constraint is created (the current relative position/orientation is chosen as the + /// '0' position). Set this to false if you want to supply the attachment points yourself. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:35 + ///
+ /// bool mAutoDetectPoint = false + ///
+ ///
+ public bool GetAutoDetectPoint() => Jolt.PInvoke.SliderConstraintSettings_GetAutoDetectPoint(this); + + /// + /// + /// When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions of + /// the bodies when the constraint is created (the current relative position/orientation is chosen as the + /// '0' position). Set this to false if you want to supply the attachment points yourself. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:35 + ///
+ /// bool mAutoDetectPoint = false + ///
+ ///
+ public void SetAutoDetectPoint(bool value) => + Jolt.PInvoke.SliderConstraintSettings_SetAutoDetectPoint(this, value); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). Slider axis is the axis along which + /// movement is possible (direction), normal axis is a perpendicular vector to define the frame. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:39 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint1() => Jolt.PInvoke.SliderConstraintSettings_GetPoint1(this); + + /// + /// + /// Body 1 constraint reference frame (space determined by mSpace). Slider axis is the axis along which + /// movement is possible (direction), normal axis is a perpendicular vector to define the frame. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:39 + ///
+ /// RVec3 mPoint1 = RVec3::sZero() + ///
+ ///
+ public void SetPoint1(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetPoint1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:40 + ///
+ /// Vec3 mSliderAxis1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetSliderAxis1() => Jolt.PInvoke.SliderConstraintSettings_GetSliderAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:40 + ///
+ /// Vec3 mSliderAxis1 = Vec3::sAxisX() + ///
+ ///
+ public void SetSliderAxis1(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:41 + ///
+ /// Vec3 mNormalAxis1 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetNormalAxis1() => Jolt.PInvoke.SliderConstraintSettings_GetNormalAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:41 + ///
+ /// Vec3 mNormalAxis1 = Vec3::sAxisY() + ///
+ ///
+ public void SetNormalAxis1(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetNormalAxis1(this, value); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:44 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public float3 GetPoint2() => Jolt.PInvoke.SliderConstraintSettings_GetPoint2(this); + + /// + /// + /// Body 2 constraint reference frame (space determined by mSpace) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:44 + ///
+ /// RVec3 mPoint2 = RVec3::sZero() + ///
+ ///
+ public void SetPoint2(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetPoint2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:45 + ///
+ /// Vec3 mSliderAxis2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetSliderAxis2() => Jolt.PInvoke.SliderConstraintSettings_GetSliderAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:45 + ///
+ /// Vec3 mSliderAxis2 = Vec3::sAxisX() + ///
+ ///
+ public void SetSliderAxis2(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetSliderAxis2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:46 + ///
+ /// Vec3 mNormalAxis2 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetNormalAxis2() => Jolt.PInvoke.SliderConstraintSettings_GetNormalAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:46 + ///
+ /// Vec3 mNormalAxis2 = Vec3::sAxisY() + ///
+ ///
+ public void SetNormalAxis2(float3 value) => Jolt.PInvoke.SliderConstraintSettings_SetNormalAxis2(this, value); + + /// + /// + /// When the bodies move so that mPoint1 coincides with mPoint2 the slider position is defined to be 0, + /// movement will be limited between [mLimitsMin, mLimitsMax] where mLimitsMin e [-inf, 0] and mLimitsMax e + /// [0, inf] + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:49 + ///
+ /// float mLimitsMin = -FLT_MAX + ///
+ ///
+ public float GetLimitsMin() => Jolt.PInvoke.SliderConstraintSettings_GetLimitsMin(this); + + /// + /// + /// When the bodies move so that mPoint1 coincides with mPoint2 the slider position is defined to be 0, + /// movement will be limited between [mLimitsMin, mLimitsMax] where mLimitsMin e [-inf, 0] and mLimitsMax e + /// [0, inf] + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:49 + ///
+ /// float mLimitsMin = -FLT_MAX + ///
+ ///
+ public void SetLimitsMin(float value) => Jolt.PInvoke.SliderConstraintSettings_SetLimitsMin(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:50 + ///
+ /// float mLimitsMax = FLT_MAX + ///
+ ///
+ public float GetLimitsMax() => Jolt.PInvoke.SliderConstraintSettings_GetLimitsMax(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:50 + ///
+ /// float mLimitsMax = FLT_MAX + ///
+ ///
+ public void SetLimitsMax(float value) => Jolt.PInvoke.SliderConstraintSettings_SetLimitsMax(this, value); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:53 + ///
+ /// SpringSettings mLimitsSpringSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SpringSettings GetLimitsSpringSettings() => + Jolt.PInvoke.SliderConstraintSettings_GetLimitsSpringSettings(this); + + /// + /// + /// When enabled, this makes the limits soft. When the constraint exceeds the limits, a spring force will + /// pull it back. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:53 + ///
+ /// SpringSettings mLimitsSpringSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetLimitsSpringSettings(SpringSettings value) => + Jolt.PInvoke.SliderConstraintSettings_SetLimitsSpringSettings(this, value); + + /// + /// + /// Maximum amount of friction force to apply (N) when not driven by a motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:56 + ///
+ /// float mMaxFrictionForce = 0.0f + ///
+ ///
+ public float GetMaxFrictionForce() => Jolt.PInvoke.SliderConstraintSettings_GetMaxFrictionForce(this); + + /// + /// + /// Maximum amount of friction force to apply (N) when not driven by a motor. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:56 + ///
+ /// float mMaxFrictionForce = 0.0f + ///
+ ///
+ public void SetMaxFrictionForce(float value) => + Jolt.PInvoke.SliderConstraintSettings_SetMaxFrictionForce(this, value); + + /// + /// + /// In case the constraint is powered, this determines the motor settings around the sliding axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:59 + ///
+ /// MotorSettings mMotorSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MotorSettings GetMotorSettings() => Jolt.PInvoke.SliderConstraintSettings_GetMotorSettings(this); + + /// + /// + /// In case the constraint is powered, this determines the motor settings around the sliding axis + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SliderConstraint.h:59 + ///
+ /// MotorSettings mMotorSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetMotorSettings(MotorSettings value) => + Jolt.PInvoke.SliderConstraintSettings_SetMotorSettings(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(SliderConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(SliderConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodyContactListener.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodyContactListener.gen.cs new file mode 100644 index 0000000..1da30d8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodyContactListener.gen.cs @@ -0,0 +1,87 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A listener class that receives collision contact events for soft bodies against rigid bodies. It can be + /// registered with the PhysicsSystem. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:32 + ///
+ /// class SoftBodyContactListener + ///
+ ///
+ [InteropHandle] + public readonly partial struct SoftBodyContactListener : IDisposable + { + public static SoftBodyContactListener Create() => Jolt.PInvoke.SoftBodyContactListener_Create(); + + /// + /// + /// Called whenever the soft body's aabox overlaps with another body's aabox (so receiving this callback + /// doesn't tell if any of the vertices will collide). This callback can be used to change the behavior of + /// the collision response for all vertices in the soft body or to completely reject the contact. Note that + /// this callback is called when all bodies are locked, so don't use any locking functions! + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:45 + ///
+ /// virtual SoftBodyValidateResult OnSoftBodyContactValidate(const Body &inSoftBody, const Body &inOtherBody, SoftBodyContactSettings &ioSettings) + ///
+ ///
+ /// + /// + /// Called whenever the soft body's aabox overlaps with another body's aabox (so receiving this callback doesn't tell if any of the vertices will collide). + /// This callback can be used to change the behavior of the collision response for all vertices in the soft body or to completely reject the contact. + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! + /// @param inSoftBody The soft body that collided. It is safe to access this as the soft body is only updated on the current thread. + /// @param inOtherBody The other body that collided. Note that accessing the position/orientation/velocity of inOtherBody may result in a race condition as other threads may be modifying the body at the same time. + /// @param ioSettings The settings for all contact points that are generated by this collision. + /// @return Whether the contact should be processed or not. + /// + /// + public SoftBodyValidateResult OnSoftBodyContactValidate( + Body softBody, + Body otherBody, + ref SoftBodyContactSettings settings + ) => Jolt.PInvoke.SoftBodyContactListener_OnSoftBodyContactValidate(this, softBody, otherBody, ref settings); + + /// + /// + /// Called after all contact points for a soft body have been handled. Note that this callback is called + /// when all bodies are locked, so don't use any locking functions! You will receive a single callback for a + /// soft body per simulation step for performance reasons, this callback will apply to all vertices in the + /// soft body. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:52 + ///
+ /// virtual void OnSoftBodyContactAdded(const Body &inSoftBody, const SoftBodyManifold &inManifold) + ///
+ ///
+ /// + /// + /// Called after all contact points for a soft body have been handled. + /// Note that this callback is called when all bodies are locked, so don't use any locking functions! + /// You will receive a single callback for a soft body per simulation step for performance reasons, this callback will apply to all vertices in the soft body. + /// @param inSoftBody The soft body that collided. It is safe to access this as the soft body is only updated on the current thread. + /// @param inManifold The manifold that describes which vertices collide and with what body they collide. Other bodies may be modified by other threads during this callback. + /// + /// + public void OnSoftBodyContactAdded(Body softBody, SoftBodyManifold manifold) => + Jolt.PInvoke.SoftBodyContactListener_OnSoftBodyContactAdded(this, softBody, manifold); + + public void Dispose() => Jolt.PInvoke.SoftBodyContactListener_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodyCreationSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodyCreationSettings.gen.cs new file mode 100644 index 0000000..ef45aea --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodyCreationSettings.gen.cs @@ -0,0 +1,677 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class contains the information needed to create a soft body object Note: Soft bodies are still in + /// development and come with several caveats. Read the Architecture and API documentation for more information! + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:17 + ///
+ /// class SoftBodyCreationSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct SoftBodyCreationSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:23 + ///
+ /// SoftBodyCreationSettings() = default + ///
+ ///
+ public static SoftBodyCreationSettings Create() => Jolt.PInvoke.SoftBodyCreationSettings_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:24 + ///
+ /// SoftBodyCreationSettings(const SoftBodySharedSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, ObjectLayer inObjectLayer) + ///
+ ///
+ public static SoftBodyCreationSettings Create( + SoftBodySharedSettings settings, + float3 position, + floatQuat rotation, + ushort objectLayer + ) => Jolt.PInvoke.SoftBodyCreationSettings_Create_2(settings, position, rotation, objectLayer); + + /// + /// + /// Saves the state of this object in binary form to inStream. Doesn't store the shared settings nor the + /// group filter. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:27 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.SoftBodyCreationSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. Doesn't restore the shared settings nor the group + /// filter. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:30 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.SoftBodyCreationSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Save this body creation settings, its shared settings and group filter. Pass in an empty map in + /// ioSharedSettingsMap / ioMaterialMap / ioGroupFilterMap or reuse the same map while saving multiple + /// shapes to the same stream in order to avoid writing duplicates. Pass nullptr to ioSharedSettingsMap and + /// ioMaterial map to skip saving shared settings and materials Pass nullptr to ioGroupFilterMap to skip + /// saving group filters + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:42 + ///
+ /// void SaveWithChildren(StreamOut &inStream, SharedSettingsToIDMap *ioSharedSettingsMap, MaterialToIDMap *ioMaterialMap, GroupFilterToIDMap *ioGroupFilterMap) const + ///
+ ///
+ /// + /// + /// A null sharedSettingsMap leaves the objects it covers out of the stream: Jolt writes them as null (a + /// body's shape needs both its shape and material maps). + /// + /// + /// A null materialMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's + /// shape needs both its shape and material maps). + /// + /// + /// A null groupFilterMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's + /// shape needs both its shape and material maps). + /// + /// + public void SaveWithChildren( + StreamOut stream, + SharedSettingsToIDMap sharedSettingsMap, + MaterialToIDMap materialMap, + GroupFilterToIDMap groupFilterMap + ) => + Jolt.PInvoke.SoftBodyCreationSettings_SaveWithChildren( + this, + stream, + sharedSettingsMap, + materialMap, + groupFilterMap + ); + + /// + /// + /// Restore a shape, all its children and materials. Pass in an empty map in ioSharedSettingsMap / + /// ioMaterialMap / ioGroupFilterMap or reuse the same map while reading multiple shapes from the same + /// stream in order to restore duplicates. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:47 + ///
+ /// static SBCSResult sRestoreWithChildren(StreamIn &inStream, IDToSharedSettingsMap &ioSharedSettingsMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. The returned handle is an owned + /// copy; Dispose it when you're done with it. + /// + /// + public static SoftBodyCreationSettings RestoreWithChildren( + StreamIn stream, + IDToSharedSettingsMap sharedSettingsMap, + IDToMaterialMap materialMap, + IDToGroupFilterMap groupFilterMap + ) + { + var _handle = Jolt.PInvoke.SoftBodyCreationSettings_RestoreWithChildren( + stream, + sharedSettingsMap, + materialMap, + groupFilterMap + ); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Defines the configuration of this soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:49 + ///
+ /// RefConst<SoftBodySharedSettings> mSettings + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public SoftBodySharedSettings GetSettings() => Jolt.PInvoke.SoftBodyCreationSettings_GetSettings(this); + + /// + /// + /// Defines the configuration of this soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:49 + ///
+ /// RefConst<SoftBodySharedSettings> mSettings + ///
+ ///
+ public void SetSettings(SoftBodySharedSettings value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetSettings(this, value); + + /// + /// + /// Initial position of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:51 + ///
+ /// RVec3 mPosition { RVec3::sZero() } + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.SoftBodyCreationSettings_GetPosition(this); + + /// + /// + /// Initial position of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:51 + ///
+ /// RVec3 mPosition { RVec3::sZero() } + ///
+ ///
+ public void SetPosition(float3 value) => Jolt.PInvoke.SoftBodyCreationSettings_SetPosition(this, value); + + /// + /// + /// Initial rotation of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:52 + ///
+ /// Quat mRotation { Quat::sIdentity() } + ///
+ ///
+ public floatQuat GetRotation() => Jolt.PInvoke.SoftBodyCreationSettings_GetRotation(this); + + /// + /// + /// Initial rotation of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:52 + ///
+ /// Quat mRotation { Quat::sIdentity() } + ///
+ ///
+ public void SetRotation(floatQuat value) => Jolt.PInvoke.SoftBodyCreationSettings_SetRotation(this, value); + + /// + /// + /// User data value (can be used by application) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:55 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public ulong GetUserData() => Jolt.PInvoke.SoftBodyCreationSettings_GetUserData(this); + + /// + /// + /// User data value (can be used by application) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:55 + ///
+ /// uint64 mUserData = 0 + ///
+ ///
+ public void SetUserData(ulong value) => Jolt.PInvoke.SoftBodyCreationSettings_SetUserData(this, value); + + /// + /// + /// The collision layer this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:58 + ///
+ /// ObjectLayer mObjectLayer = 0 + ///
+ ///
+ /// + /// + /// @name Collision settings + /// + /// + public ushort GetObjectLayer() => Jolt.PInvoke.SoftBodyCreationSettings_GetObjectLayer(this); + + /// + /// + /// The collision layer this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:58 + ///
+ /// ObjectLayer mObjectLayer = 0 + ///
+ ///
+ /// + /// + /// @name Collision settings + /// + /// + public void SetObjectLayer(ushort value) => Jolt.PInvoke.SoftBodyCreationSettings_SetObjectLayer(this, value); + + /// + /// + /// The collision group this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:59 + ///
+ /// CollisionGroup mCollisionGroup + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public CollisionGroup GetCollisionGroup() => Jolt.PInvoke.SoftBodyCreationSettings_GetCollisionGroup(this); + + /// + /// + /// The collision group this body belongs to (determines if two objects can collide) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:59 + ///
+ /// CollisionGroup mCollisionGroup + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetCollisionGroup(CollisionGroup value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetCollisionGroup(this, value); + + /// + /// + /// Number of solver iterations + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:61 + ///
+ /// uint32 mNumIterations = 5 + ///
+ ///
+ public uint GetNumIterations() => Jolt.PInvoke.SoftBodyCreationSettings_GetNumIterations(this); + + /// + /// + /// Number of solver iterations + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:61 + ///
+ /// uint32 mNumIterations = 5 + ///
+ ///
+ public void SetNumIterations(uint value) => Jolt.PInvoke.SoftBodyCreationSettings_SetNumIterations(this, value); + + /// + /// + /// Linear damping: dv/dt = -mLinearDamping * v. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:62 + ///
+ /// float mLinearDamping = 0.1f + ///
+ ///
+ public float GetLinearDamping() => Jolt.PInvoke.SoftBodyCreationSettings_GetLinearDamping(this); + + /// + /// + /// Linear damping: dv/dt = -mLinearDamping * v. Value should be zero or positive and is usually close to 0. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:62 + ///
+ /// float mLinearDamping = 0.1f + ///
+ ///
+ public void SetLinearDamping(float value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetLinearDamping(this, value); + + /// + /// + /// Maximum linear velocity that a vertex can reach (m/s) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:63 + ///
+ /// float mMaxLinearVelocity = 500.0f + ///
+ ///
+ public float GetMaxLinearVelocity() => Jolt.PInvoke.SoftBodyCreationSettings_GetMaxLinearVelocity(this); + + /// + /// + /// Maximum linear velocity that a vertex can reach (m/s) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:63 + ///
+ /// float mMaxLinearVelocity = 500.0f + ///
+ ///
+ public void SetMaxLinearVelocity(float value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetMaxLinearVelocity(this, value); + + /// + /// + /// Restitution when colliding + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:64 + ///
+ /// float mRestitution = 0.0f + ///
+ ///
+ public float GetRestitution() => Jolt.PInvoke.SoftBodyCreationSettings_GetRestitution(this); + + /// + /// + /// Restitution when colliding + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:64 + ///
+ /// float mRestitution = 0.0f + ///
+ ///
+ public void SetRestitution(float value) => Jolt.PInvoke.SoftBodyCreationSettings_SetRestitution(this, value); + + /// + /// + /// Friction coefficient when colliding + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:65 + ///
+ /// float mFriction = 0.2f + ///
+ ///
+ public float GetFriction() => Jolt.PInvoke.SoftBodyCreationSettings_GetFriction(this); + + /// + /// + /// Friction coefficient when colliding + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:65 + ///
+ /// float mFriction = 0.2f + ///
+ ///
+ public void SetFriction(float value) => Jolt.PInvoke.SoftBodyCreationSettings_SetFriction(this, value); + + /// + /// + /// n * R * T, amount of substance * ideal gas constant * absolute temperature, see + /// https://en.wikipedia.org/wiki/Pressure + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:66 + ///
+ /// float mPressure = 0.0f + ///
+ ///
+ public float GetPressure() => Jolt.PInvoke.SoftBodyCreationSettings_GetPressure(this); + + /// + /// + /// n * R * T, amount of substance * ideal gas constant * absolute temperature, see + /// https://en.wikipedia.org/wiki/Pressure + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:66 + ///
+ /// float mPressure = 0.0f + ///
+ ///
+ public void SetPressure(float value) => Jolt.PInvoke.SoftBodyCreationSettings_SetPressure(this, value); + + /// + /// + /// Value to multiply gravity with for this body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:67 + ///
+ /// float mGravityFactor = 1.0f + ///
+ ///
+ public float GetGravityFactor() => Jolt.PInvoke.SoftBodyCreationSettings_GetGravityFactor(this); + + /// + /// + /// Value to multiply gravity with for this body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:67 + ///
+ /// float mGravityFactor = 1.0f + ///
+ ///
+ public void SetGravityFactor(float value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetGravityFactor(this, value); + + /// + /// + /// How big the particles are, can be used to push the vertices a little bit away from the surface of other + /// bodies to prevent z-fighting + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:68 + ///
+ /// float mVertexRadius = 0.0f + ///
+ ///
+ public float GetVertexRadius() => Jolt.PInvoke.SoftBodyCreationSettings_GetVertexRadius(this); + + /// + /// + /// How big the particles are, can be used to push the vertices a little bit away from the surface of other + /// bodies to prevent z-fighting + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:68 + ///
+ /// float mVertexRadius = 0.0f + ///
+ ///
+ public void SetVertexRadius(float value) => Jolt.PInvoke.SoftBodyCreationSettings_SetVertexRadius(this, value); + + /// + /// + /// Update the position of the body while simulating (set to false for something that is attached to the + /// static world) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:69 + ///
+ /// bool mUpdatePosition = true + ///
+ ///
+ public bool GetUpdatePosition() => Jolt.PInvoke.SoftBodyCreationSettings_GetUpdatePosition(this); + + /// + /// + /// Update the position of the body while simulating (set to false for something that is attached to the + /// static world) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:69 + ///
+ /// bool mUpdatePosition = true + ///
+ ///
+ public void SetUpdatePosition(bool value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetUpdatePosition(this, value); + + /// + /// + /// Bake specified mRotation in the vertices and set the body rotation to identity (simulation is slightly + /// more accurate if the rotation of a soft body is kept to identity) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:70 + ///
+ /// bool mMakeRotationIdentity = true + ///
+ ///
+ public bool GetMakeRotationIdentity() => Jolt.PInvoke.SoftBodyCreationSettings_GetMakeRotationIdentity(this); + + /// + /// + /// Bake specified mRotation in the vertices and set the body rotation to identity (simulation is slightly + /// more accurate if the rotation of a soft body is kept to identity) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:70 + ///
+ /// bool mMakeRotationIdentity = true + ///
+ ///
+ public void SetMakeRotationIdentity(bool value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetMakeRotationIdentity(this, value); + + /// + /// + /// If this body can go to sleep or not + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:71 + ///
+ /// bool mAllowSleeping = true + ///
+ ///
+ public bool GetAllowSleeping() => Jolt.PInvoke.SoftBodyCreationSettings_GetAllowSleeping(this); + + /// + /// + /// If this body can go to sleep or not + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:71 + ///
+ /// bool mAllowSleeping = true + ///
+ ///
+ public void SetAllowSleeping(bool value) => Jolt.PInvoke.SoftBodyCreationSettings_SetAllowSleeping(this, value); + + /// + /// + /// If the faces in this soft body should be treated as double sided for the purpose of collision detection + /// (ray cast / collide shape / cast shape) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:72 + ///
+ /// bool mFacesDoubleSided = false + ///
+ ///
+ public bool GetFacesDoubleSided() => Jolt.PInvoke.SoftBodyCreationSettings_GetFacesDoubleSided(this); + + /// + /// + /// If the faces in this soft body should be treated as double sided for the purpose of collision detection + /// (ray cast / collide shape / cast shape) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:72 + ///
+ /// bool mFacesDoubleSided = false + ///
+ ///
+ public void SetFacesDoubleSided(bool value) => + Jolt.PInvoke.SoftBodyCreationSettings_SetFacesDoubleSided(this, value); + + public void Dispose() => Jolt.PInvoke.SoftBodyCreationSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodyManifold.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodyManifold.gen.cs new file mode 100644 index 0000000..15564d7 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodyManifold.gen.cs @@ -0,0 +1,141 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// An interface to query which vertices of a soft body are colliding with other bodies + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:12 + ///
+ /// class SoftBodyManifold + ///
+ ///
+ [InteropHandle] + public readonly partial struct SoftBodyManifold + { + /// + /// + /// Get the vertices of the soft body for iterating + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:16 + ///
+ /// const Array<SoftBodyVertex> & GetVertices() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetVertices() + { + Jolt.PInvoke.SoftBodyManifold_GetVertices(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Check if a vertex has collided with something in this update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:19 + ///
+ /// bool HasContact(const SoftBodyVertex &inVertex) const + ///
+ ///
+ public bool HasContact(in SoftBodyVertex vertex) => Jolt.PInvoke.SoftBodyManifold_HasContact(this, in vertex); + + /// + /// + /// Get the local space contact point (multiply by GetCenterOfMassTransform() of the soft body to get world + /// space) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:25 + ///
+ /// Vec3 GetLocalContactPoint(const SoftBodyVertex &inVertex) const + ///
+ ///
+ public float3 GetLocalContactPoint(in SoftBodyVertex vertex) => + Jolt.PInvoke.SoftBodyManifold_GetLocalContactPoint(this, in vertex); + + /// + /// + /// Get the contact normal for the vertex (assumes there is a contact). + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:31 + ///
+ /// Vec3 GetContactNormal(const SoftBodyVertex &inVertex) const + ///
+ ///
+ public float3 GetContactNormal(in SoftBodyVertex vertex) => + Jolt.PInvoke.SoftBodyManifold_GetContactNormal(this, in vertex); + + /// + /// + /// Get the body with which the vertex has collided in this update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:37 + ///
+ /// BodyID GetContactBodyID(const SoftBodyVertex &inVertex) const + ///
+ ///
+ public uint GetContactBodyID(in SoftBodyVertex vertex) => + Jolt.PInvoke.SoftBodyManifold_GetContactBodyID(this, in vertex); + + /// + /// + /// Get the number of sensors that are in contact with the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:51 + ///
+ /// uint GetNumSensorContacts() const + ///
+ ///
+ public uint GetNumSensorContacts() => Jolt.PInvoke.SoftBodyManifold_GetNumSensorContacts(this); + + /// + /// + /// Get the i-th sensor that is in contact with the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyManifold.h:57 + ///
+ /// BodyID GetSensorContactBodyID(uint inIndex) const + ///
+ ///
+ public uint GetSensorContactBodyID(uint index) + { + var _result = Jolt.PInvoke.SoftBodyManifold_GetSensorContactBodyID(this, index, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of sensor contacts." + ); + return _result; + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodyMotionProperties.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodyMotionProperties.gen.cs new file mode 100644 index 0000000..f059cf3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodyMotionProperties.gen.cs @@ -0,0 +1,1249 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class contains the runtime information of a soft body. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:34 + ///
+ /// class SoftBodyMotionProperties : public MotionProperties + ///
+ ///
+ /// + /// + /// This class contains the runtime information of a soft body. + /// + /// Based on: XPBD, Extended Position Based Dynamics, Matthias Muller, Ten Minute Physics + /// See: https://matthias-research.github.io/pages/tenMinutePhysics/09-xpbd.pdf + /// + /// + [InteropHandle] + public readonly partial struct SoftBodyMotionProperties : IDisposable + { + /// + /// + /// Return code for ParallelUpdate + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:166 + ///
+ /// enum class EStatus + ///
+ ///
+ [Flags] + public enum Status : int + { + /// + /// + /// No work was done because other threads were still working on a batch that cannot run concurrently + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:168 + ///
+ /// NoWork = 1 << 0 + ///
+ ///
+ NoWork = 1, + + /// + /// + /// Work was done to progress the update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:169 + ///
+ /// DidWork = 1 << 1 + ///
+ ///
+ DidWork = 2, + + /// + /// + /// All work is done + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:170 + ///
+ /// Done = 1 << 2 + ///
+ ///
+ Done = 4, + } + + /// + /// + /// Information about a leaf shape that we're colliding with + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:187 + ///
+ /// struct LeafShape + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 96)] + public partial struct LeafShape + { + /// + /// + /// Transform of the shape relative to the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:192 + ///
+ /// Mat44 mTransform + ///
+ ///
+ [FieldOffset(0)] + public float4x4 Transform; + + /// + /// + /// Scale of the shape + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:193 + ///
+ /// Vec3 mScale + ///
+ ///
+ [FieldOffset(64)] + public float3 Scale; + + /// + /// + /// Shape + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:194 + ///
+ /// RefConst<Shape> mShape + ///
+ ///
+ [FieldOffset(80)] + public Shape Shape; + } + + /// + /// + /// Information about the current state of a rod. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:232 + ///
+ /// struct RodState + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct RodState + { + /// + /// + /// Rotation of the rod, relative to center of mass transform + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:234 + ///
+ /// Quat mRotation + ///
+ ///
+ [FieldOffset(0)] + public floatQuat Rotation; + } + + /// + /// + /// Information about the state of all skinned vertices + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:243 + ///
+ /// struct SkinState + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct SkinState + { + /// + /// + /// Previous position of the skinned vertex, used to interpolate between the previous and current + /// position + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:245 + ///
+ /// Vec3 mPreviousPosition = Vec3::sZero() + ///
+ ///
+ [FieldOffset(0)] + public float3 PreviousPosition; + + /// + /// + /// Current position of the skinned vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:246 + ///
+ /// Vec3 mPosition = Vec3::sNaN() + ///
+ ///
+ [FieldOffset(16)] + public float3 Position; + + /// + /// + /// Normal of the skinned vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:247 + ///
+ /// Vec3 mNormal = Vec3::sNaN() + ///
+ ///
+ [FieldOffset(32)] + public float3 Normal; + } + + public static SoftBodyMotionProperties Create() => Jolt.PInvoke.SoftBodyMotionProperties_Create(); + + /// + /// + /// Initialize the soft body motion properties + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:50 + ///
+ /// void Initialize(const SoftBodyCreationSettings &inSettings) + ///
+ ///
+ public void Initialize(SoftBodyCreationSettings settings) => + Jolt.PInvoke.SoftBodyMotionProperties_Initialize(this, settings); + + /// + /// + /// Get the shared settings of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:53 + ///
+ /// const SoftBodySharedSettings * GetSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public SoftBodySharedSettings GetSettings() => Jolt.PInvoke.SoftBodyMotionProperties_GetSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:57 + ///
+ /// Array<Vertex> & GetVertices() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetVertices() + { + Jolt.PInvoke.SoftBodyMotionProperties_GetVertices(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Access an individual vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:60 + ///
+ /// const Vertex & GetVertex(uint inIndex) const + ///
+ ///
+ public SoftBodyVertex GetVertex(uint index) + { + var _result = Jolt.PInvoke.SoftBodyMotionProperties_GetVertex(this, index, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of vertices." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:61 + ///
+ /// Vertex & GetVertex(uint inIndex) + ///
+ ///
+ /// + /// + /// Writes value into the element GetVertex returns, in place. The C++ getter hands out a reference; the C# + /// GetVertex can only return a copy, so this is how an edit reaches the object. + /// + /// + public void SetVertex(uint index, in SoftBodyVertex value) + { + Jolt.PInvoke.SoftBodyMotionProperties_SetVertex(this, index, in value, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of vertices." + ); + } + + /// + /// + /// Writes a run of elements through GetVertex in one call, starting at startIndex - the same per-element + /// write SetVertex does, without a boundary crossing each. Writes value.Length elements, and throws + /// ArgumentOutOfRangeException if that run would reach past the last of the vertices. + /// + /// + public unsafe void SetVertices(ReadOnlySpan value, uint startIndex = 0) + { + fixed (SoftBodyVertex* value_fixed = value) + { + Jolt.PInvoke.SoftBodyMotionProperties_SetVertices( + this, + value_fixed, + (nuint)value.Length, + startIndex, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(startIndex), + startIndex, + "Expected startIndex and value.Length to describe a run inside the vertices." + ); + } + } + + /// + /// + /// Access to the state of rods + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:64 + ///
+ /// Quat GetRodRotation(uint inIndex) const + ///
+ ///
+ public floatQuat GetRodRotation(uint index) + { + var _result = Jolt.PInvoke.SoftBodyMotionProperties_GetRodRotation(this, index, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of rods." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:65 + ///
+ /// Vec3 GetRodAngularVelocity(uint inIndex) const + ///
+ ///
+ public float3 GetRodAngularVelocity(uint index) + { + var _result = Jolt.PInvoke.SoftBodyMotionProperties_GetRodAngularVelocity(this, index, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of rods." + ); + return _result; + } + + /// + /// + /// Get the materials of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:68 + ///
+ /// const PhysicsMaterialList & GetMaterials() const + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetMaterials() => + new NativeArray(Jolt.PInvoke.SoftBodyMotionProperties_GetMaterials(this)); + + /// + /// + /// Get the faces of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:71 + ///
+ /// const Array<Face> & GetFaces() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetFaces() + { + Jolt.PInvoke.SoftBodyMotionProperties_GetFaces(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// Access to an individual face + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:74 + ///
+ /// const Face & GetFace(uint inIndex) const + ///
+ ///
+ public SoftBodySharedSettings.Face GetFace(uint index) + { + Jolt.PInvoke.SoftBodyMotionProperties_GetFace(this, index, out var _inRange, out var _outResult); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + "Expected an index below the number of faces." + ); + return _outResult; + } + + /// + /// + /// Get the number of solver iterations + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:77 + ///
+ /// uint32 GetNumIterations() const + ///
+ ///
+ public uint GetNumIterations() => Jolt.PInvoke.SoftBodyMotionProperties_GetNumIterations(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:78 + ///
+ /// void SetNumIterations(uint32 inNumIterations) + ///
+ ///
+ public void SetNumIterations(uint numIterations) => + Jolt.PInvoke.SoftBodyMotionProperties_SetNumIterations(this, numIterations); + + /// + /// + /// Get the pressure of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:81 + ///
+ /// float GetPressure() const + ///
+ ///
+ public float GetPressure() => Jolt.PInvoke.SoftBodyMotionProperties_GetPressure(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:82 + ///
+ /// void SetPressure(float inPressure) + ///
+ ///
+ public void SetPressure(float pressure) => Jolt.PInvoke.SoftBodyMotionProperties_SetPressure(this, pressure); + + /// + /// + /// Update the position of the body while simulating (set to false for something that is attached to the + /// static world) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:85 + ///
+ /// bool GetUpdatePosition() const + ///
+ ///
+ public bool GetUpdatePosition() => Jolt.PInvoke.SoftBodyMotionProperties_GetUpdatePosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:86 + ///
+ /// void SetUpdatePosition(bool inUpdatePosition) + ///
+ ///
+ public void SetUpdatePosition(bool updatePosition) => + Jolt.PInvoke.SoftBodyMotionProperties_SetUpdatePosition(this, updatePosition); + + /// + /// + /// If the faces in this soft body should be treated as double sided for the purpose of collision detection + /// (ray cast / collide shape / cast shape) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:89 + ///
+ /// bool GetFacesDoubleSided() const + ///
+ ///
+ public bool GetFacesDoubleSided() => Jolt.PInvoke.SoftBodyMotionProperties_GetFacesDoubleSided(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:90 + ///
+ /// void SetFacesDoubleSided(bool inDoubleSided) + ///
+ ///
+ public void SetFacesDoubleSided(bool doubleSided) => + Jolt.PInvoke.SoftBodyMotionProperties_SetFacesDoubleSided(this, doubleSided); + + /// + /// + /// Global setting to turn on/off skin constraints + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:93 + ///
+ /// bool GetEnableSkinConstraints() const + ///
+ ///
+ public bool GetEnableSkinConstraints() => Jolt.PInvoke.SoftBodyMotionProperties_GetEnableSkinConstraints(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:94 + ///
+ /// void SetEnableSkinConstraints(bool inEnableSkinConstraints) + ///
+ ///
+ public void SetEnableSkinConstraints(bool enableSkinConstraints) => + Jolt.PInvoke.SoftBodyMotionProperties_SetEnableSkinConstraints(this, enableSkinConstraints); + + /// + /// + /// Multiplier applied to Skinned::mMaxDistance to allow tightening or loosening of the skin constraints. 0 + /// to hard skin all vertices. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:97 + ///
+ /// float GetSkinnedMaxDistanceMultiplier() const + ///
+ ///
+ public float GetSkinnedMaxDistanceMultiplier() => + Jolt.PInvoke.SoftBodyMotionProperties_GetSkinnedMaxDistanceMultiplier(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:98 + ///
+ /// void SetSkinnedMaxDistanceMultiplier(float inSkinnedMaxDistanceMultiplier) + ///
+ ///
+ public void SetSkinnedMaxDistanceMultiplier(float skinnedMaxDistanceMultiplier) => + Jolt.PInvoke.SoftBodyMotionProperties_SetSkinnedMaxDistanceMultiplier(this, skinnedMaxDistanceMultiplier); + + /// + /// + /// How big the particles are, can be used to push the vertices a little bit away from the surface of other + /// bodies to prevent z-fighting + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:101 + ///
+ /// float GetVertexRadius() const + ///
+ ///
+ public float GetVertexRadius() => Jolt.PInvoke.SoftBodyMotionProperties_GetVertexRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:102 + ///
+ /// void SetVertexRadius(float inVertexRadius) + ///
+ ///
+ public void SetVertexRadius(float vertexRadius) => + Jolt.PInvoke.SoftBodyMotionProperties_SetVertexRadius(this, vertexRadius); + + /// + /// + /// Get local bounding box + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:105 + ///
+ /// const AABox & GetLocalBounds() const + ///
+ ///
+ public AABox GetLocalBounds() => Jolt.PInvoke.SoftBodyMotionProperties_GetLocalBounds(this); + + /// + /// + /// Get the volume of the soft body. Note can become negative if the shape is inside out! + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:108 + ///
+ /// float GetVolume() const + ///
+ ///
+ public float GetVolume() => Jolt.PInvoke.SoftBodyMotionProperties_GetVolume(this); + + /// + /// + /// Calculate the total mass and inertia of this body based on the current state of the vertices + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:111 + ///
+ /// void CalculateMassAndInertia() + ///
+ ///
+ public void CalculateMassAndInertia() => Jolt.PInvoke.SoftBodyMotionProperties_CalculateMassAndInertia(this); + + /// + /// + /// Draw the state of a soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:115 + ///
+ /// void DrawVertices(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const + ///
+ ///
+ public void DrawVertices(DebugRenderer renderer, in float4x4 centerOfMassTransform) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawVertices(this, renderer, in centerOfMassTransform); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:116 + ///
+ /// void DrawVertexVelocities(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const + ///
+ ///
+ public void DrawVertexVelocities(DebugRenderer renderer, in float4x4 centerOfMassTransform) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawVertexVelocities(this, renderer, in centerOfMassTransform); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:117 + ///
+ /// void DrawEdgeConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawEdgeConstraints( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawEdgeConstraints( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:118 + ///
+ /// void DrawRods(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawRods( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => Jolt.PInvoke.SoftBodyMotionProperties_DrawRods(this, renderer, in centerOfMassTransform, constraintColor); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:119 + ///
+ /// void DrawRodStates(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawRodStates( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawRodStates( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:120 + ///
+ /// void DrawRodBendTwistConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawRodBendTwistConstraints( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawRodBendTwistConstraints( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:121 + ///
+ /// void DrawBendConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawBendConstraints( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawBendConstraints( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:122 + ///
+ /// void DrawVolumeConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawVolumeConstraints( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawVolumeConstraints( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:123 + ///
+ /// void DrawSkinConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawSkinConstraints( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawSkinConstraints( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:124 + ///
+ /// void DrawLRAConstraints(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const + ///
+ ///
+ public void DrawLRAConstraints( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawLRAConstraints( + this, + renderer, + in centerOfMassTransform, + constraintColor + ); + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:125 + ///
+ /// void DrawPredictedBounds(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const + ///
+ ///
+ public void DrawPredictedBounds(DebugRenderer renderer, in float4x4 centerOfMassTransform) => + Jolt.PInvoke.SoftBodyMotionProperties_DrawPredictedBounds(this, renderer, in centerOfMassTransform); + + /// + /// + /// Skin vertices to supplied joints, information is used by the skinned constraints. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:140 + ///
+ /// void SkinVertices(RMat44Arg inCenterOfMassTransform, const Mat44 *inJointMatrices, uint inNumJoints, bool inHardSkinAll, TempAllocator &ioTempAllocator) + ///
+ ///
+ /// + /// + /// Skin vertices to supplied joints, information is used by the skinned constraints. + /// @param inCenterOfMassTransform Value of Body::GetCenterOfMassTransform(). + /// @param inJointMatrices The joint matrices must be expressed relative to inCenterOfMassTransform. + /// @param inNumJoints Indicates how large the inJointMatrices array is (used only for validating out of bounds). + /// @param inHardSkinAll Can be used to position all vertices on the skinned vertices and can be used to hard reset the soft body. + /// @param ioTempAllocator Allocator. + /// + /// + /// jointMatrices must hold at least one element per joint the skin's inverse bind matrices reference - the + /// native count is read from the object itself and a span that doesn't match it throws + /// ArgumentOutOfRangeException. The span is only used for the duration of the call. Throws + /// InvalidOperationException: "The motion properties have no soft body settings." + /// + /// + public unsafe void SkinVertices( + in float4x4 centerOfMassTransform, + ReadOnlySpan jointMatrices, + bool hardSkinAll, + TempAllocator tempAllocator + ) + { + fixed (float4x4* jointMatrices_fixed = jointMatrices) + { + Jolt.PInvoke.SoftBodyMotionProperties_SkinVertices( + this, + in centerOfMassTransform, + jointMatrices_fixed, + (uint)jointMatrices.Length, + hardSkinAll, + tempAllocator, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new InvalidOperationException("The motion properties have no soft body settings."); + if (_bufferCheck == 2) + throw new ArgumentOutOfRangeException( + nameof(jointMatrices), + jointMatrices.Length, + "Expected at least one element per joint the skin's inverse bind matrices reference." + ); + } + } + + /// + /// + /// This function allows you to update the soft body immediately without going through the PhysicsSystem. + /// This is useful if the soft body is teleported and needs to 'settle' or it can be used if a the soft body + /// is not added to the PhysicsSystem and needs to be updated manually. One reason for not adding it to the + /// PhysicsSystem is that you might want to update a soft body immediately after updating an animated object + /// that has the soft body attached to it. If the soft body is added to the PhysicsSystem it will be updated + /// by it, so calling this function will effectively update it twice. Note that when you use this function, + /// only the current thread will be used, whereas if you update through the PhysicsSystem, multiple threads + /// may be used. Note that this will bypass any sleep checks. Since the dynamic objects that the soft body + /// touches will not move during this call, there can be simulation artifacts if you call this function + /// multiple times without running the physics simulation step. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:153 + ///
+ /// void CustomUpdate(float inDeltaTime, Body &ioSoftBody, PhysicsSystem &inSystem) + ///
+ ///
+ public void CustomUpdate(float deltaTime, Body softBody, PhysicsSystem system) => + Jolt.PInvoke.SoftBodyMotionProperties_CustomUpdate(this, deltaTime, softBody, system); + + /// + /// + /// Initialize the update context. Not part of the public API. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:160 + ///
+ /// void InitializeUpdateContext(float inDeltaTime, Body &inSoftBody, const PhysicsSystem &inSystem, SoftBodyUpdateContext &ioContext) + ///
+ ///
+ public void InitializeUpdateContext( + float deltaTime, + Body softBody, + PhysicsSystem system, + SoftBodyUpdateContext context + ) => Jolt.PInvoke.SoftBodyMotionProperties_InitializeUpdateContext(this, deltaTime, softBody, system, context); + + /// + /// + /// Do a broad phase check and collect all bodies that can possibly collide with this soft body. Not part of + /// the public API. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:163 + ///
+ /// void DetermineCollidingShapes(const SoftBodyUpdateContext &inContext, const PhysicsSystem &inSystem, const BodyLockInterface &inBodyLockInterface) + ///
+ ///
+ public void DetermineCollidingShapes( + SoftBodyUpdateContext context, + PhysicsSystem system, + BodyLockInterface bodyLockInterface + ) => Jolt.PInvoke.SoftBodyMotionProperties_DetermineCollidingShapes(this, context, system, bodyLockInterface); + + /// + /// + /// Update the soft body, will process a batch of work. Not part of the public API. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:174 + ///
+ /// EStatus ParallelUpdate(SoftBodyUpdateContext &ioContext, const PhysicsSettings &inPhysicsSettings) + ///
+ ///
+ public SoftBodyMotionProperties.Status ParallelUpdate( + SoftBodyUpdateContext context, + in PhysicsSettings physicsSettings + ) => Jolt.PInvoke.SoftBodyMotionProperties_ParallelUpdate(this, context, in physicsSettings); + + /// + /// + /// Update the velocities of all rigid bodies that we collided with. Not part of the public API. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:177 + ///
+ /// void UpdateRigidBodyVelocities(const SoftBodyUpdateContext &inContext, BodyInterface &inBodyInterface) + ///
+ ///
+ public void UpdateRigidBodyVelocities(SoftBodyUpdateContext context, BodyInterface bodyInterface) => + Jolt.PInvoke.SoftBodyMotionProperties_UpdateRigidBodyVelocities(this, context, bodyInterface); + + /// + /// + /// Set a flag to indicate that the ContactListener::OnSoftBodyContactAdded should be called + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyMotionProperties.h:180 + ///
+ /// inline void RequestContactCallback() + ///
+ ///
+ public void RequestContactCallback() => Jolt.PInvoke.SoftBodyMotionProperties_RequestContactCallback(this); + + public static implicit operator MotionProperties(SoftBodyMotionProperties value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.SoftBodyMotionProperties_Destroy(this); + + /// + public MotionQuality GetMotionQuality() => ((MotionProperties)this).GetMotionQuality(); + + /// + public AllowedDOFs GetAllowedDOFs() => ((MotionProperties)this).GetAllowedDOFs(); + + /// + public bool GetAllowSleeping() => ((MotionProperties)this).GetAllowSleeping(); + + /// + public float3 GetLinearVelocity() => ((MotionProperties)this).GetLinearVelocity(); + + /// + public void SetLinearVelocity(float3 linearVelocity) => + ((MotionProperties)this).SetLinearVelocity(linearVelocity); + + /// + public void SetLinearVelocityClamped(float3 linearVelocity) => + ((MotionProperties)this).SetLinearVelocityClamped(linearVelocity); + + /// + public float3 GetAngularVelocity() => ((MotionProperties)this).GetAngularVelocity(); + + /// + public void SetAngularVelocity(float3 angularVelocity) => + ((MotionProperties)this).SetAngularVelocity(angularVelocity); + + /// + public void SetAngularVelocityClamped(float3 angularVelocity) => + ((MotionProperties)this).SetAngularVelocityClamped(angularVelocity); + + /// + public void MoveKinematic(float3 deltaPosition, floatQuat deltaRotation, float deltaTime) => + ((MotionProperties)this).MoveKinematic(deltaPosition, deltaRotation, deltaTime); + + /// + public float GetMaxLinearVelocity() => ((MotionProperties)this).GetMaxLinearVelocity(); + + /// + public void SetMaxLinearVelocity(float linearVelocity) => + ((MotionProperties)this).SetMaxLinearVelocity(linearVelocity); + + /// + public float GetMaxAngularVelocity() => ((MotionProperties)this).GetMaxAngularVelocity(); + + /// + public void SetMaxAngularVelocity(float angularVelocity) => + ((MotionProperties)this).SetMaxAngularVelocity(angularVelocity); + + /// + public void ClampLinearVelocity() => ((MotionProperties)this).ClampLinearVelocity(); + + /// + public void ClampAngularVelocity() => ((MotionProperties)this).ClampAngularVelocity(); + + /// + public float GetLinearDamping() => ((MotionProperties)this).GetLinearDamping(); + + /// + public void SetLinearDamping(float linearDamping) => ((MotionProperties)this).SetLinearDamping(linearDamping); + + /// + public float GetAngularDamping() => ((MotionProperties)this).GetAngularDamping(); + + /// + public void SetAngularDamping(float angularDamping) => + ((MotionProperties)this).SetAngularDamping(angularDamping); + + /// + public float GetGravityFactor() => ((MotionProperties)this).GetGravityFactor(); + + /// + public void SetGravityFactor(float gravityFactor) => ((MotionProperties)this).SetGravityFactor(gravityFactor); + + /// + public void SetMassProperties(AllowedDOFs allowedDOFs, MassProperties massProperties) => + ((MotionProperties)this).SetMassProperties(allowedDOFs, massProperties); + + /// + public float GetInverseMass() => ((MotionProperties)this).GetInverseMass(); + + /// + public float GetInverseMassUnchecked() => ((MotionProperties)this).GetInverseMassUnchecked(); + + /// + public void SetInverseMass(float inverseMass) => ((MotionProperties)this).SetInverseMass(inverseMass); + + /// + public float3 GetInverseInertiaDiagonal() => ((MotionProperties)this).GetInverseInertiaDiagonal(); + + /// + public floatQuat GetInertiaRotation() => ((MotionProperties)this).GetInertiaRotation(); + + /// + public void SetInverseInertia(float3 diagonal, floatQuat rot) => + ((MotionProperties)this).SetInverseInertia(diagonal, rot); + + /// + public void ScaleToMass(float mass) => ((MotionProperties)this).ScaleToMass(mass); + + /// + public float4x4 GetLocalSpaceInverseInertia() => ((MotionProperties)this).GetLocalSpaceInverseInertia(); + + /// + public float4x4 GetLocalSpaceInverseInertiaUnchecked() => + ((MotionProperties)this).GetLocalSpaceInverseInertiaUnchecked(); + + /// + public float4x4 GetInverseInertiaForRotation(in float4x4 rotation) => + ((MotionProperties)this).GetInverseInertiaForRotation(in rotation); + + /// + public float3 MultiplyWorldSpaceInverseInertiaByVector(floatQuat bodyRotation, float3 v) => + ((MotionProperties)this).MultiplyWorldSpaceInverseInertiaByVector(bodyRotation, v); + + /// + public float3 GetPointVelocityCOM(float3 pointRelativeToCOM) => + ((MotionProperties)this).GetPointVelocityCOM(pointRelativeToCOM); + + /// + public float3 GetAccumulatedForce() => ((MotionProperties)this).GetAccumulatedForce(); + + /// + public float3 GetAccumulatedTorque() => ((MotionProperties)this).GetAccumulatedTorque(); + + /// + public void ResetForce() => ((MotionProperties)this).ResetForce(); + + /// + public void ResetTorque() => ((MotionProperties)this).ResetTorque(); + + /// + public void ResetMotion() => ((MotionProperties)this).ResetMotion(); + + /// + public uint4 GetLinearDOFsMask() => ((MotionProperties)this).GetLinearDOFsMask(); + + /// + public float3 LockTranslation(float3 v) => ((MotionProperties)this).LockTranslation(v); + + /// + public uint4 GetAngularDOFsMask() => ((MotionProperties)this).GetAngularDOFsMask(); + + /// + public float3 LockAngular(float3 v) => ((MotionProperties)this).LockAngular(v); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((MotionProperties)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((MotionProperties)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((MotionProperties)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((MotionProperties)this).GetNumPositionStepsOverride(); + + /// + public void ApplyLinearVelocityStep(float3 linearVelocity) => + ((MotionProperties)this).ApplyLinearVelocityStep(linearVelocity); + + /// + public void AddLinearVelocityStep(float3 linearVelocityChange) => + ((MotionProperties)this).AddLinearVelocityStep(linearVelocityChange); + + /// + public void SubLinearVelocityStep(float3 linearVelocityChange) => + ((MotionProperties)this).SubLinearVelocityStep(linearVelocityChange); + + /// + public void ApplyAngularVelocityStep(float3 angularVelocity) => + ((MotionProperties)this).ApplyAngularVelocityStep(angularVelocity); + + /// + public void AddAngularVelocityStep(float3 angularVelocityChange) => + ((MotionProperties)this).AddAngularVelocityStep(angularVelocityChange); + + /// + public void SubAngularVelocityStep(float3 angularVelocityChange) => + ((MotionProperties)this).SubAngularVelocityStep(angularVelocityChange); + + /// + public void ApplyGyroscopicForceInternal(floatQuat bodyRotation, float deltaTime) => + ((MotionProperties)this).ApplyGyroscopicForceInternal(bodyRotation, deltaTime); + + /// + public void ApplyForceTorqueAndDragInternal(floatQuat bodyRotation, float3 gravity, float deltaTime) => + ((MotionProperties)this).ApplyForceTorqueAndDragInternal(bodyRotation, gravity, deltaTime); + + /// + public uint GetIslandIndexInternal() => ((MotionProperties)this).GetIslandIndexInternal(); + + /// + public void SetIslandIndexInternal(uint index) => ((MotionProperties)this).SetIslandIndexInternal(index); + + /// + public uint GetIndexInActiveBodiesInternal() => ((MotionProperties)this).GetIndexInActiveBodiesInternal(); + + /// + public void ResetSleepTestTimer() => ((MotionProperties)this).ResetSleepTestTimer(); + + /// + public CanSleep AccumulateSleepTime(float deltaTime, float timeBeforeSleep) => + ((MotionProperties)this).AccumulateSleepTime(deltaTime, timeBeforeSleep); + + /// + public unsafe void ResetSleepTestSpheres(ReadOnlySpan points) => + ((MotionProperties)this).ResetSleepTestSpheres(points); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodyShape.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodyShape.gen.cs new file mode 100644 index 0000000..e4733ff --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodyShape.gen.cs @@ -0,0 +1,335 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Shape used exclusively for soft bodies. Adds the ability to perform collision checks against soft bodies. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyShape.h:15 + ///
+ /// class SoftBodyShape final : public Shape + ///
+ ///
+ [InteropHandle] + public readonly partial struct SoftBodyShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyShape.h:21 + ///
+ /// SoftBodyShape() + ///
+ ///
+ public static SoftBodyShape Create() => Jolt.PInvoke.SoftBodyShape_Create(); + + /// + /// + /// Determine amount of bits needed to encode sub shape id + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyShape.h:24 + ///
+ /// uint GetSubShapeIDBits() const + ///
+ ///
+ public uint GetSubShapeIDBits() => Jolt.PInvoke.SoftBodyShape_GetSubShapeIDBits(this); + + /// + /// + /// Convert a sub shape ID back to a face index + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyShape.h:27 + ///
+ /// uint32 GetFaceIndex(const SubShapeID &inSubShapeID) const + ///
+ ///
+ public uint GetFaceIndex(uint subShapeID) => Jolt.PInvoke.SoftBodyShape_GetFaceIndex(this, subShapeID); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyShape.h:57 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.SoftBodyShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator Shape(SoftBodyShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodySharedSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodySharedSettings.gen.cs new file mode 100644 index 0000000..12a1a7f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodySharedSettings.gen.cs @@ -0,0 +1,1751 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class defines the setup of all particles and their constraints. It is used during the simulation and + /// can be shared between multiple soft bodies. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:15 + ///
+ /// class SoftBodySharedSettings : public RefTarget<SoftBodySharedSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct SoftBodySharedSettings : IDisposable + { + /// + /// + /// Which type of bend constraint should be created + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:21 + ///
+ /// enum class EBendType + ///
+ ///
+ public enum BendType : int + { + /// + /// + /// No bend constraints will be created + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:23 + ///
+ /// None + ///
+ ///
+ None, + + /// + /// + /// A simple distance constraint + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:24 + ///
+ /// Distance + ///
+ ///
+ Distance, + + /// + /// + /// A dihedral bend constraint (most expensive, but also supports triangles that are initially not in + /// the same plane) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:25 + ///
+ /// Dihedral + ///
+ ///
+ Dihedral, + } + + /// + /// + /// The type of long range attachment constraint to create + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:29 + ///
+ /// enum class ELRAType + ///
+ ///
+ public enum LRAType : int + { + /// + /// + /// Don't create a LRA constraint + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:31 + ///
+ /// None + ///
+ ///
+ None, + + /// + /// + /// Create a LRA constraint based on Euclidean distance between the closest kinematic vertex and this + /// vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:32 + ///
+ /// EuclideanDistance + ///
+ ///
+ EuclideanDistance, + + /// + /// + /// Create a LRA constraint based on the geodesic distance between the closest kinematic vertex and this + /// vertex (follows the edge constraints) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:33 + ///
+ /// GeodesicDistance + ///
+ ///
+ GeodesicDistance, + } + + /// + /// + /// Per vertex attributes used during the CreateConstraints function. For an edge or shear constraint, the + /// compliance is averaged between the two attached vertices. For a bend constraint, the compliance is + /// averaged between the two vertices on the shared edge. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:39 + ///
+ /// struct VertexAttributes + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VertexAttributes + { + /// + /// + /// The compliance of the normal edges. Set to FLT_MAX to disable regular edges for any edge involving + /// this vertex. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:45 + ///
+ /// float mCompliance = 0.0f + ///
+ ///
+ [FieldOffset(0)] + public float Compliance; + + /// + /// + /// The compliance of the shear edges. Set to FLT_MAX to disable shear edges for any edge involving this + /// vertex. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:46 + ///
+ /// float mShearCompliance = 0.0f + ///
+ ///
+ [FieldOffset(4)] + public float ShearCompliance; + + /// + /// + /// The compliance of the bend edges. Set to FLT_MAX to disable bend edges for any bend constraint + /// involving this vertex. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:47 + ///
+ /// float mBendCompliance = FLT_MAX + ///
+ ///
+ [FieldOffset(8)] + public float BendCompliance; + + /// + /// + /// The type of long range attachment constraint to create. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:48 + ///
+ /// ELRAType mLRAType = ELRAType::None + ///
+ ///
+ [FieldOffset(12)] + public SoftBodySharedSettings.LRAType LRAType; + + /// + /// + /// Multiplier for the max distance of the LRA constraint, e.g. 1.01 means the max distance is 1% longer + /// than the calculated distance in the rest pose. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:49 + ///
+ /// float mLRAMaxDistanceMultiplier = 1.0f + ///
+ ///
+ [FieldOffset(16)] + public float LRAMaxDistanceMultiplier; + } + + /// + /// + /// A vertex is a particle, the data in this structure is only used during creation of the soft body and not + /// during simulation + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:127 + ///
+ /// struct Vertex + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct Vertex + { + /// + /// + /// Initial position of the vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:135 + ///
+ /// Float3 mPosition { 0, 0, 0 } + ///
+ ///
+ [FieldOffset(0)] + public float3 Position; + + /// + /// + /// Initial velocity of the vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:136 + ///
+ /// Float3 mVelocity { 0, 0, 0 } + ///
+ ///
+ [FieldOffset(12)] + public float3 Velocity; + + /// + /// + /// Initial inverse of the mass of the vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:137 + ///
+ /// float mInvMass = 1.0f + ///
+ ///
+ [FieldOffset(24)] + public float InvMass; + } + + /// + /// + /// A face defines the surface of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:141 + ///
+ /// struct Face + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Face + { + /// + /// + /// Indices of the vertices that form the face + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:152 + ///
+ /// uint32 mVertex[3] + ///
+ ///
+ [FieldOffset(0)] + public uint_3 Vertex; + + /// + /// + /// Index of the material of the face in SoftBodySharedSettings::mMaterials + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:153 + ///
+ /// uint32 mMaterialIndex = 0 + ///
+ ///
+ [FieldOffset(12)] + public uint MaterialIndex; + } + + /// + /// + /// An edge keeps two vertices at a constant distance using a spring: |x1 - x2| = rest length + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:157 + ///
+ /// struct Edge + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Edge + { + /// + /// + /// Indices of the vertices that form the edge + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:168 + ///
+ /// uint32 mVertex[2] + ///
+ ///
+ [FieldOffset(0)] + public uint_2 Vertex; + + /// + /// + /// Rest length of the spring, calculated by CalculateEdgeLengths + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:169 + ///
+ /// float mRestLength = 1.0f + ///
+ ///
+ [FieldOffset(8)] + public float RestLength; + + /// + /// + /// Inverse of the stiffness of the spring + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:170 + ///
+ /// float mCompliance = 0.0f + ///
+ ///
+ [FieldOffset(12)] + public float Compliance; + } + + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:191 + ///
+ /// struct DihedralBend + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct DihedralBend + { + /// + /// + /// Indices of the vertices of the 2 triangles that share an edge (the first 2 vertices are the shared + /// edge) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:202 + ///
+ /// uint32 mVertex[4] + ///
+ ///
+ [FieldOffset(0)] + public uint_4 Vertex; + + /// + /// + /// Inverse of the stiffness of the constraint + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:203 + ///
+ /// float mCompliance = 0.0f + ///
+ ///
+ [FieldOffset(16)] + public float Compliance; + + /// + /// + /// Initial angle between the normals of the triangles (pi - dihedral angle), calculated by + /// CalculateBendConstraintConstants + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:204 + ///
+ /// float mInitialAngle = 0.0f + ///
+ ///
+ [FieldOffset(20)] + public float InitialAngle; + } + + /// + /// + /// Volume constraint, keeps the volume of a tetrahedron constant + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:208 + ///
+ /// struct Volume + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct Volume + { + /// + /// + /// Indices of the vertices that form the tetrahedron + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:219 + ///
+ /// uint32 mVertex[4] + ///
+ ///
+ [FieldOffset(0)] + public uint_4 Vertex; + + /// + /// + /// 6 times the rest volume of the tetrahedron, calculated by CalculateVolumeConstraintVolumes + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:220 + ///
+ /// float mSixRestVolume = 1.0f + ///
+ ///
+ [FieldOffset(16)] + public float SixRestVolume; + + /// + /// + /// Inverse of the stiffness of the constraint + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:221 + ///
+ /// float mCompliance = 0.0f + ///
+ ///
+ [FieldOffset(20)] + public float Compliance; + } + + /// + /// + /// An inverse bind matrix take a skinned vertex from its bind pose into joint local space + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:225 + ///
+ /// class InvBind + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 80)] + public partial struct InvBind + { + /// + /// + /// Joint index to which this is attached + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:234 + ///
+ /// uint32 mJointIndex = 0 + ///
+ ///
+ [FieldOffset(0)] + public uint JointIndex; + + /// + /// + /// The inverse bind matrix, this takes a vertex in its bind pose (Vertex::mPosition) to joint local + /// space + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:235 + ///
+ /// Mat44 mInvBind = Mat44::sIdentity() + ///
+ ///
+ [FieldOffset(16)] + public float4x4 mInvBind; + } + + /// + /// + /// A joint and its skin weight + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:239 + ///
+ /// class SkinWeight + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct SkinWeight + { + /// + /// + /// Index in mInvBindMatrices + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:248 + ///
+ /// uint32 mInvBindIndex = 0 + ///
+ ///
+ [FieldOffset(0)] + public uint InvBindIndex; + + /// + /// + /// Weight with which it is skinned + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:249 + ///
+ /// float mWeight = 0.0f + ///
+ ///
+ [FieldOffset(4)] + public float Weight; + } + + /// + /// + /// A constraint that skins a vertex to joints and limits the distance that the simulated vertex can travel + /// from this vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:253 + ///
+ /// class Skinned + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 52)] + public partial struct Skinned + { + /// + /// + /// Index in mVertices which indicates which vertex is being skinned + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:279 + ///
+ /// uint32 mVertex = 0 + ///
+ ///
+ [FieldOffset(0)] + public uint Vertex; + + /// + /// + /// Skin weights, the bind pose of the vertex is assumed to be stored in Vertex::mPosition. The first + /// weight that is zero indicates the end of the list. Weights should add up to 1. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:280 + ///
+ /// SkinWeight mWeights[cMaxSkinWeights] + ///
+ ///
+ [FieldOffset(4)] + public SkinWeight_4 Weights; + + /// + /// + /// Maximum distance that this vertex can reach from the skinned vertex, disabled when FLT_MAX. 0 when + /// you want to hard skin the vertex to the skinned vertex. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:281 + ///
+ /// float mMaxDistance = FLT_MAX + ///
+ ///
+ [FieldOffset(36)] + public float MaxDistance; + + /// + /// + /// Disabled if mBackStopDistance >= mMaxDistance. The faces surrounding mVertex determine an average + /// normal. mBackStopDistance behind the vertex in the opposite direction of this normal, the back stop + /// sphere starts. The simulated vertex will be pushed out of this sphere and it can be used to + /// approximate the volume of the skinned mesh behind the skinned vertex. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:282 + ///
+ /// float mBackStopDistance = FLT_MAX + ///
+ ///
+ [FieldOffset(40)] + public float BackStopDistance; + + /// + /// + /// Radius of the backstop sphere. By default this is a fairly large radius so the sphere approximates a + /// plane. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:283 + ///
+ /// float mBackStopRadius = 40.0f + ///
+ ///
+ [FieldOffset(44)] + public float BackStopRadius; + + /// + /// + /// Information needed to calculate the normal of this vertex, lowest 24 bit is start index in + /// mSkinnedConstraintNormals, highest 8 bit is number of faces (generated by + /// CalculateSkinnedConstraintNormals) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:284 + ///
+ /// uint32 mNormalInfo = 0 + ///
+ ///
+ [FieldOffset(48)] + public uint NormalInfo; + } + + /// + /// + /// A discrete Cosserat rod connects two particles with a rigid rod that has fixed length and inertia. A rod + /// can be used instead of an Edge to constraint two vertices. The orientation of the rod can be used to + /// orient geometry attached to the rod (e.g. a plant leaf). Note that each rod needs to be constrained by + /// at least one RodBendTwist constraint in order to constrain the rotation of the rod. If you don't do this + /// then the orientation is likely to rotate around the rod axis with constant velocity. Based on "Position + /// and Orientation Based Cosserat Rods" - Kugelstadt and Schoemer - SIGGRAPH 2016 See: + /// https://www.researchgate.net/publication/325597548_Position_and_Orientation_Based_Cosserat_Rods + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:312 + ///
+ /// struct RodStretchShear + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct RodStretchShear + { + /// + /// + /// Indices of the vertices that form the rod + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:323 + ///
+ /// uint32 mVertex[2] + ///
+ ///
+ [FieldOffset(0)] + public uint_2 Vertex; + + /// + /// + /// Fixed length of the rod, calculated by CalculateRodProperties + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:324 + ///
+ /// float mLength = 1.0f + ///
+ ///
+ [FieldOffset(8)] + public float Length; + + /// + /// + /// Inverse of the mass of the rod (0 for static rods), calculated by CalculateRodProperties but can be + /// overridden afterwards + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:325 + ///
+ /// float mInvMass = 1.0f + ///
+ ///
+ [FieldOffset(12)] + public float InvMass; + + /// + /// + /// Inverse of the stiffness of the rod + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:326 + ///
+ /// float mCompliance = 0.0f + ///
+ ///
+ [FieldOffset(16)] + public float Compliance; + + /// + /// + /// The Bishop frame of the rod (the rotation of the rod in its rest pose so that it has zero twist + /// towards adjacent rods), calculated by CalculateRodProperties + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:327 + ///
+ /// Quat mBishop = Quat::sZero() + ///
+ ///
+ [FieldOffset(32)] + public floatQuat Bishop; + } + + /// + /// + /// A constraint that connects two Cosserat rods and limits bend and twist between the rods. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:331 + ///
+ /// struct RodBendTwist + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct RodBendTwist + { + /// + /// + /// Indices of rods that are constrained (index in mRodStretchShearConstraints) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:339 + ///
+ /// uint32 mRod[2] + ///
+ ///
+ [FieldOffset(0)] + public uint_2 Rod; + + /// + /// + /// Inverse of the stiffness of the rod + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:340 + ///
+ /// float mCompliance = 0.0f + ///
+ ///
+ [FieldOffset(8)] + public float Compliance; + + /// + /// + /// The initial rotation between the rods: rod1.mBishop.Conjugated() * rod2.mBishop, calculated by + /// CalculateRodProperties + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:341 + ///
+ /// Quat mOmega0 = Quat::sZero() + ///
+ ///
+ [FieldOffset(16)] + public floatQuat Omega0; + } + + /// + /// + /// Tracks the closest kinematic vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:366 + ///
+ /// struct ClosestKinematic + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct ClosestKinematic + { + /// + /// + /// Vertex index of closest kinematic vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:368 + ///
+ /// uint32 mVertex = 0xffffffff + ///
+ ///
+ [FieldOffset(0)] + public uint Vertex; + + /// + /// + /// Number of hops to the closest kinematic vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:369 + ///
+ /// uint32 mHops = 0xffffffff + ///
+ ///
+ [FieldOffset(4)] + public uint Hops; + + /// + /// + /// Distance to the closest kinematic vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:370 + ///
+ /// float mDistance = FLT_MAX + ///
+ ///
+ [FieldOffset(8)] + public float Distance; + } + + /// + /// + /// Tracks the end indices of the various constraint groups + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:374 + ///
+ /// struct UpdateGroup + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct UpdateGroup + { + /// + /// + /// The end index of the edge constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:376 + ///
+ /// uint mEdgeEndIndex + ///
+ ///
+ [FieldOffset(0)] + public uint EdgeEndIndex; + + /// + /// + /// The end index of the LRA constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:377 + ///
+ /// uint mLRAEndIndex + ///
+ ///
+ [FieldOffset(4)] + public uint LRAEndIndex; + + /// + /// + /// The end index of the rod stretch shear constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:378 + ///
+ /// uint mRodStretchShearEndIndex + ///
+ ///
+ [FieldOffset(8)] + public uint RodStretchShearEndIndex; + + /// + /// + /// The end index of the rod bend twist constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:379 + ///
+ /// uint mRodBendTwistEndIndex + ///
+ ///
+ [FieldOffset(12)] + public uint RodBendTwistEndIndex; + + /// + /// + /// The end index of the dihedral bend constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:380 + ///
+ /// uint mDihedralBendEndIndex + ///
+ ///
+ [FieldOffset(16)] + public uint DihedralBendEndIndex; + + /// + /// + /// The end index of the volume constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:381 + ///
+ /// uint mVolumeEndIndex + ///
+ ///
+ [FieldOffset(20)] + public uint VolumeEndIndex; + + /// + /// + /// The end index of the skinned constraints in this group + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:382 + ///
+ /// uint mSkinnedEndIndex + ///
+ ///
+ [FieldOffset(24)] + public uint SkinnedEndIndex; + } + + public static SoftBodySharedSettings Create() => Jolt.PInvoke.SoftBodySharedSettings_Create(); + + /// + /// + /// Automatically create constraints based on the faces of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:57 + ///
+ /// void CreateConstraints(const VertexAttributes *inVertexAttributes, uint inVertexAttributesLength, EBendType inBendType = EBendType::Distance, float inAngleTolerance = DegreesToRadians(8.0f)) + ///
+ ///
+ /// + /// + /// Automatically create constraints based on the faces of the soft body + /// @param inVertexAttributes A list of attributes for each vertex (1-on-1 with mVertices, note that if the list is smaller than mVertices the last element will be repeated). This defines the properties of the constraints that are created. + /// @param inVertexAttributesLength The length of inVertexAttributes + /// @param inBendType The type of bend constraint to create + /// @param inAngleTolerance Shear edges are created when two connected triangles form a quad (are roughly in the same plane and form a square with roughly 90 degree angles). This defines the tolerance (in radians). + /// + /// + /// vertexAttributes is the buffer the native call reads, and its element count travels with it: the span is + /// only read, and it is only read for the duration of the call. + /// + /// + public unsafe void CreateConstraints( + ReadOnlySpan vertexAttributes, + SoftBodySharedSettings.BendType bendType = SoftBodySharedSettings.BendType.Distance, + float angleTolerance = 0.13962634f + ) + { + fixed (SoftBodySharedSettings.VertexAttributes* vertexAttributes_fixed = vertexAttributes) + { + Jolt.PInvoke.SoftBodySharedSettings_CreateConstraints( + this, + vertexAttributes_fixed, + (uint)vertexAttributes.Length, + bendType, + angleTolerance + ); + } + } + + /// + /// + /// Calculate the initial lengths of all springs of the edges of this soft body (if you use + /// CreateConstraint, this is already done) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:60 + ///
+ /// void CalculateEdgeLengths() + ///
+ ///
+ public void CalculateEdgeLengths() => Jolt.PInvoke.SoftBodySharedSettings_CalculateEdgeLengths(this); + + /// + /// + /// Calculate the properties of the rods Note that this can swap mVertex of the RodStretchShear constraints + /// if two rods are connected through a RodBendTwist constraint but point in opposite directions. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:64 + ///
+ /// void CalculateRodProperties() + ///
+ ///
+ public void CalculateRodProperties() => Jolt.PInvoke.SoftBodySharedSettings_CalculateRodProperties(this); + + /// + /// + /// Calculate the max lengths for the long range attachment constraints based on Euclidean distance (if you + /// use CreateConstraints, this is already done) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:68 + ///
+ /// void CalculateLRALengths(float inMaxDistanceMultiplier = 1.0f) + ///
+ ///
+ /// + /// + /// Calculate the max lengths for the long range attachment constraints based on Euclidean distance (if you use CreateConstraints, this is already done) + /// @param inMaxDistanceMultiplier Multiplier for the max distance of the LRA constraint, e.g. 1.01 means the max distance is 1% longer than the calculated distance in the rest pose. + /// + /// + public void CalculateLRALengths(float maxDistanceMultiplier = 1f) => + Jolt.PInvoke.SoftBodySharedSettings_CalculateLRALengths(this, maxDistanceMultiplier); + + /// + /// + /// Calculate the constants for the bend constraints (if you use CreateConstraints, this is already done) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:71 + ///
+ /// void CalculateBendConstraintConstants() + ///
+ ///
+ public void CalculateBendConstraintConstants() => + Jolt.PInvoke.SoftBodySharedSettings_CalculateBendConstraintConstants(this); + + /// + /// + /// Calculates the initial volume of all tetrahedra of this soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:74 + ///
+ /// void CalculateVolumeConstraintVolumes() + ///
+ ///
+ public void CalculateVolumeConstraintVolumes() => + Jolt.PInvoke.SoftBodySharedSettings_CalculateVolumeConstraintVolumes(this); + + /// + /// + /// Calculate information needed to be able to calculate the skinned constraint normals at run-time + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:77 + ///
+ /// void CalculateSkinnedConstraintNormals() + ///
+ ///
+ public void CalculateSkinnedConstraintNormals() => + Jolt.PInvoke.SoftBodySharedSettings_CalculateSkinnedConstraintNormals(this); + + /// + /// + /// Optimize the soft body settings without results + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:96 + ///
+ /// void Optimize() + ///
+ ///
+ public void Optimize() => Jolt.PInvoke.SoftBodySharedSettings_Optimize(this); + + /// + /// + /// Clone this object + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:99 + ///
+ /// Ref<SoftBodySharedSettings> Clone() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public SoftBodySharedSettings Clone() => Jolt.PInvoke.SoftBodySharedSettings_Clone(this); + + /// + /// + /// Saves the state of this object in binary form to inStream. Doesn't store the material list. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:102 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.SoftBodySharedSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restore the state of this object from inStream. Doesn't restore the material list. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:105 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.SoftBodySharedSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Save this shared settings and its materials. Pass in an empty map ioSettingsMap / ioMaterialMap or reuse + /// the same map while saving multiple settings objects to the same stream in order to avoid writing + /// duplicates. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:113 + ///
+ /// void SaveWithMaterials(StreamOut &inStream, SharedSettingsToIDMap &ioSettingsMap, MaterialToIDMap &ioMaterialMap) const + ///
+ ///
+ public void SaveWithMaterials( + StreamOut stream, + SharedSettingsToIDMap settingsMap, + MaterialToIDMap materialMap + ) => Jolt.PInvoke.SoftBodySharedSettings_SaveWithMaterials(this, stream, settingsMap, materialMap); + + /// + /// + /// Restore a shape and materials. Pass in an empty map in ioSettingsMap / ioMaterialMap or reuse the same + /// map while reading multiple settings objects from the same stream in order to restore duplicates. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:118 + ///
+ /// static SettingsResult sRestoreWithMaterials(StreamIn &inStream, IDToSharedSettingsMap &ioSettingsMap, IDToMaterialMap &ioMaterialMap) + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public static SoftBodySharedSettings RestoreWithMaterials( + StreamIn stream, + IDToSharedSettingsMap settingsMap, + IDToMaterialMap materialMap + ) + { + var _handle = Jolt.PInvoke.SoftBodySharedSettings_RestoreWithMaterials(stream, settingsMap, materialMap); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create a cube. This can be used to create a simple soft body for testing purposes. It will contain edge + /// constraints, volume constraints and faces. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:124 + ///
+ /// static Ref<SoftBodySharedSettings> sCreateCube(uint inGridSize, float inGridSpacing) + ///
+ ///
+ /// + /// + /// Create a cube. This can be used to create a simple soft body for testing purposes. + /// It will contain edge constraints, volume constraints and faces. + /// @param inGridSize Number of points along each axis + /// @param inGridSpacing Distance between points + /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public static SoftBodySharedSettings CreateCube(uint gridSize, float gridSpacing) => + Jolt.PInvoke.SoftBodySharedSettings_CreateCube(gridSize, gridSpacing); + + /// + /// + /// Add a face to this soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:345 + ///
+ /// void AddFace(const Face &inFace) + ///
+ ///
+ public void AddFace(in SoftBodySharedSettings.Face face) => + Jolt.PInvoke.SoftBodySharedSettings_AddFace(this, in face); + + /// + /// + /// The list of vertices or particles of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:347 + ///
+ /// Array<Vertex> mVertices + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetVertices() + { + Jolt.PInvoke.SoftBodySharedSettings_GetVertices(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// The list of vertices or particles of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:347 + ///
+ /// Array<Vertex> mVertices + ///
+ ///
+ public unsafe void SetVertices(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.Vertex* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetVertices(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of faces of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:348 + ///
+ /// Array<Face> mFaces + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetFaces() + { + Jolt.PInvoke.SoftBodySharedSettings_GetFaces(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// The list of faces of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:348 + ///
+ /// Array<Face> mFaces + ///
+ ///
+ public unsafe void SetFaces(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.Face* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetFaces(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of edges or springs of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:349 + ///
+ /// Array<Edge> mEdgeConstraints + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetEdgeConstraints() + { + Jolt.PInvoke.SoftBodySharedSettings_GetEdgeConstraints(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// The list of edges or springs of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:349 + ///
+ /// Array<Edge> mEdgeConstraints + ///
+ ///
+ public unsafe void SetEdgeConstraints(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.Edge* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetEdgeConstraints(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of dihedral bend constraints of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:350 + ///
+ /// Array<DihedralBend> mDihedralBendConstraints + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetDihedralBendConstraints() + { + Jolt.PInvoke.SoftBodySharedSettings_GetDihedralBendConstraints(this, out var _outResult); + return new Span( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// The list of dihedral bend constraints of the body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:350 + ///
+ /// Array<DihedralBend> mDihedralBendConstraints + ///
+ ///
+ public unsafe void SetDihedralBendConstraints(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.DihedralBend* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetDihedralBendConstraints(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of volume constraints of the body that keep the volume of tetrahedra in the soft body constant + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:351 + ///
+ /// Array<Volume> mVolumeConstraints + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetVolumeConstraints() + { + Jolt.PInvoke.SoftBodySharedSettings_GetVolumeConstraints(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// The list of volume constraints of the body that keep the volume of tetrahedra in the soft body constant + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:351 + ///
+ /// Array<Volume> mVolumeConstraints + ///
+ ///
+ public unsafe void SetVolumeConstraints(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.Volume* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetVolumeConstraints(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of vertices that are constrained to a skinned vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:352 + ///
+ /// Array<Skinned> mSkinnedConstraints + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetSkinnedConstraints() + { + Jolt.PInvoke.SoftBodySharedSettings_GetSkinnedConstraints(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// The list of vertices that are constrained to a skinned vertex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:352 + ///
+ /// Array<Skinned> mSkinnedConstraints + ///
+ ///
+ public unsafe void SetSkinnedConstraints(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.Skinned* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetSkinnedConstraints(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of inverse bind matrices for skinning vertices + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:353 + ///
+ /// Array<InvBind> mInvBindMatrices + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetInvBindMatrices() + { + Jolt.PInvoke.SoftBodySharedSettings_GetInvBindMatrices(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// The list of inverse bind matrices for skinning vertices + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:353 + ///
+ /// Array<InvBind> mInvBindMatrices + ///
+ ///
+ public unsafe void SetInvBindMatrices(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.InvBind* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetInvBindMatrices(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The list of Cosserat rod constraints that connect two vertices and that limit stretch and shear + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:355 + ///
+ /// Array<RodStretchShear> mRodStretchShearConstraints + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetRodStretchShearConstraints() + { + Jolt.PInvoke.SoftBodySharedSettings_GetRodStretchShearConstraints(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// The list of Cosserat rod constraints that connect two vertices and that limit stretch and shear + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:355 + ///
+ /// Array<RodStretchShear> mRodStretchShearConstraints + ///
+ ///
+ public unsafe void SetRodStretchShearConstraints(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.RodStretchShear* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetRodStretchShearConstraints( + this, + value_fixed, + (nuint)value.Length + ); + } + } + + /// + /// + /// The list of Cosserat rod constraints that connect two rods and limit the bend and twist + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:356 + ///
+ /// Array<RodBendTwist> mRodBendTwistConstraints + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetRodBendTwistConstraints() + { + Jolt.PInvoke.SoftBodySharedSettings_GetRodBendTwistConstraints(this, out var _outResult); + return new ReadOnlySpan( + (void*)_outResult.Data, + checked((int)_outResult.Count) + ); + } + + /// + /// + /// The list of Cosserat rod constraints that connect two rods and limit the bend and twist + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:356 + ///
+ /// Array<RodBendTwist> mRodBendTwistConstraints + ///
+ ///
+ public unsafe void SetRodBendTwistConstraints(ReadOnlySpan value) + { + fixed (SoftBodySharedSettings.RodBendTwist* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetRodBendTwistConstraints(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// The materials of the faces of the body, referenced by Face::mMaterialIndex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:357 + ///
+ /// PhysicsMaterialList mMaterials { PhysicsMaterial::sDefault } + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetMaterials() => + new NativeArray(Jolt.PInvoke.SoftBodySharedSettings_GetMaterials(this)); + + /// + /// + /// The materials of the faces of the body, referenced by Face::mMaterialIndex + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:357 + ///
+ /// PhysicsMaterialList mMaterials { PhysicsMaterial::sDefault } + ///
+ ///
+ public unsafe void SetMaterials(ReadOnlySpan value) + { + fixed (PhysicsMaterial* value_fixed = value) + { + Jolt.PInvoke.SoftBodySharedSettings_SetMaterials(this, value_fixed, (nuint)value.Length); + } + } + + public void AddRef() => Jolt.PInvoke.SoftBodySharedSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.SoftBodySharedSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.SoftBodySharedSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/SoftBodyUpdateContext.gen.cs b/Brutal.Jolt/Generated/Classes/SoftBodyUpdateContext.gen.cs new file mode 100644 index 0000000..bc16c9a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SoftBodyUpdateContext.gen.cs @@ -0,0 +1,459 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:21 + ///
+ /// class SoftBodyUpdateContext : public NonCopyable + ///
+ ///
+ /// + /// + /// @cond INTERNAL + /// Temporary data used by the update of a soft body + /// + /// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library. + /// + /// + [InteropHandle] + public readonly partial struct SoftBodyUpdateContext : IDisposable + { + /// + /// + /// Describes progress in the current update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:39 + ///
+ /// enum class EState + ///
+ ///
+ public enum State : int + { + /// + /// + /// Determine collision planes for vertices in parallel + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:41 + ///
+ /// DetermineCollisionPlanes + ///
+ ///
+ DetermineCollisionPlanes, + + /// + /// + /// Determine collisions with sensors in parallel + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:42 + ///
+ /// DetermineSensorCollisions + ///
+ ///
+ DetermineSensorCollisions, + + /// + /// + /// Apply constraints in parallel + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:43 + ///
+ /// ApplyConstraints + ///
+ ///
+ ApplyConstraints, + + /// + /// + /// Update is finished + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:44 + ///
+ /// Done + ///
+ ///
+ Done, + } + + public static SoftBodyUpdateContext Create() => Jolt.PInvoke.SoftBodyUpdateContext_Create(); + + /// + /// + /// Number of vertices to process in a batch in DetermineCollisionPlanes + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:24 + ///
+ /// static constexpr uint cVertexCollisionBatch = 64 + ///
+ ///
+ public static uint GetVertexCollisionBatch() => Jolt.PInvoke.SoftBodyUpdateContext_GetVertexCollisionBatch(); + + /// + /// + /// Number of vertices to group for processing batches of constraints in ApplyEdgeConstraints + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:25 + ///
+ /// static constexpr uint cVertexConstraintBatch = 256 + ///
+ ///
+ public static uint GetVertexConstraintBatch() => Jolt.PInvoke.SoftBodyUpdateContext_GetVertexConstraintBatch(); + + /// + /// + /// Body that is being updated + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:28 + ///
+ /// Body * mBody + ///
+ ///
+ /// + /// + /// Input + /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body GetBody() => Jolt.PInvoke.SoftBodyUpdateContext_GetBody(this); + + /// + /// + /// Body that is being updated + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:28 + ///
+ /// Body * mBody + ///
+ ///
+ /// + /// + /// Input + /// + /// + public void SetBody(Body value) => Jolt.PInvoke.SoftBodyUpdateContext_SetBody(this, value); + + /// + /// + /// Motion properties of that body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:29 + ///
+ /// SoftBodyMotionProperties * mMotionProperties + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SoftBodyMotionProperties GetMotionProperties() => + Jolt.PInvoke.SoftBodyUpdateContext_GetMotionProperties(this); + + /// + /// + /// Motion properties of that body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:29 + ///
+ /// SoftBodyMotionProperties * mMotionProperties + ///
+ ///
+ public void SetMotionProperties(SoftBodyMotionProperties value) => + Jolt.PInvoke.SoftBodyUpdateContext_SetMotionProperties(this, value); + + /// + /// + /// Contact listener to fire callbacks to + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:30 + ///
+ /// SoftBodyContactListener * mContactListener + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SoftBodyContactListener GetContactListener() => + Jolt.PInvoke.SoftBodyUpdateContext_GetContactListener(this); + + /// + /// + /// Contact listener to fire callbacks to + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:30 + ///
+ /// SoftBodyContactListener * mContactListener + ///
+ ///
+ public void SetContactListener(SoftBodyContactListener value) => + Jolt.PInvoke.SoftBodyUpdateContext_SetContactListener(this, value); + + /// + /// + /// Shape filter to use for collision detection + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:31 + ///
+ /// const SimShapeFilter * mSimShapeFilter + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public SimShapeFilter GetSimShapeFilter() => Jolt.PInvoke.SoftBodyUpdateContext_GetSimShapeFilter(this); + + /// + /// + /// Shape filter to use for collision detection + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:31 + ///
+ /// const SimShapeFilter * mSimShapeFilter + ///
+ ///
+ public void SetSimShapeFilter(SimShapeFilter value) => + Jolt.PInvoke.SoftBodyUpdateContext_SetSimShapeFilter(this, value); + + /// + /// + /// Transform of the body relative to the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:32 + ///
+ /// RMat44 mCenterOfMassTransform + ///
+ ///
+ public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.SoftBodyUpdateContext_GetCenterOfMassTransform(this); + + /// + /// + /// Transform of the body relative to the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:32 + ///
+ /// RMat44 mCenterOfMassTransform + ///
+ ///
+ public void SetCenterOfMassTransform(in float4x4 value) => + Jolt.PInvoke.SoftBodyUpdateContext_SetCenterOfMassTransform(this, in value); + + /// + /// + /// Gravity vector in local space of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:33 + ///
+ /// Vec3 mGravity + ///
+ ///
+ public float3 GetGravity() => Jolt.PInvoke.SoftBodyUpdateContext_GetGravity(this); + + /// + /// + /// Gravity vector in local space of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:33 + ///
+ /// Vec3 mGravity + ///
+ ///
+ public void SetGravity(float3 value) => Jolt.PInvoke.SoftBodyUpdateContext_SetGravity(this, value); + + /// + /// + /// Displacement of the center of mass due to gravity in the current time step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:34 + ///
+ /// Vec3 mDisplacementDueToGravity + ///
+ ///
+ public float3 GetDisplacementDueToGravity() => + Jolt.PInvoke.SoftBodyUpdateContext_GetDisplacementDueToGravity(this); + + /// + /// + /// Displacement of the center of mass due to gravity in the current time step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:34 + ///
+ /// Vec3 mDisplacementDueToGravity + ///
+ ///
+ public void SetDisplacementDueToGravity(float3 value) => + Jolt.PInvoke.SoftBodyUpdateContext_SetDisplacementDueToGravity(this, value); + + /// + /// + /// Delta time for the current time step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:35 + ///
+ /// float mDeltaTime + ///
+ ///
+ public float GetDeltaTime() => Jolt.PInvoke.SoftBodyUpdateContext_GetDeltaTime(this); + + /// + /// + /// Delta time for the current time step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:35 + ///
+ /// float mDeltaTime + ///
+ ///
+ public void SetDeltaTime(float value) => Jolt.PInvoke.SoftBodyUpdateContext_SetDeltaTime(this, value); + + /// + /// + /// Delta time for each sub step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:36 + ///
+ /// float mSubStepDeltaTime + ///
+ ///
+ public float GetSubStepDeltaTime() => Jolt.PInvoke.SoftBodyUpdateContext_GetSubStepDeltaTime(this); + + /// + /// + /// Delta time for each sub step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:36 + ///
+ /// float mSubStepDeltaTime + ///
+ ///
+ public void SetSubStepDeltaTime(float value) => + Jolt.PInvoke.SoftBodyUpdateContext_SetSubStepDeltaTime(this, value); + + /// + /// + /// Delta position of the body in the current time step, should be applied after the update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:58 + ///
+ /// Vec3 mDeltaPosition + ///
+ ///
+ /// + /// + /// Output + /// + /// + public float3 GetDeltaPosition() => Jolt.PInvoke.SoftBodyUpdateContext_GetDeltaPosition(this); + + /// + /// + /// Delta position of the body in the current time step, should be applied after the update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:58 + ///
+ /// Vec3 mDeltaPosition + ///
+ ///
+ /// + /// + /// Output + /// + /// + public void SetDeltaPosition(float3 value) => Jolt.PInvoke.SoftBodyUpdateContext_SetDeltaPosition(this, value); + + /// + /// + /// Can the body sleep? Should be applied after the update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:59 + ///
+ /// ECanSleep mCanSleep + ///
+ ///
+ public CanSleep GetCanSleep() => Jolt.PInvoke.SoftBodyUpdateContext_GetCanSleep(this); + + /// + /// + /// Can the body sleep? Should be applied after the update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyUpdateContext.h:59 + ///
+ /// ECanSleep mCanSleep + ///
+ ///
+ public void SetCanSleep(CanSleep value) => Jolt.PInvoke.SoftBodyUpdateContext_SetCanSleep(this, value); + + public void Dispose() => Jolt.PInvoke.SoftBodyUpdateContext_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SpecifiedBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/SpecifiedBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..85cc564 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SpecifiedBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Allows objects from a specific broad phase layer only + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:129 + ///
+ /// class SpecifiedBroadPhaseLayerFilter : public BroadPhaseLayerFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct SpecifiedBroadPhaseLayerFilter : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h:133 + ///
+ /// explicit SpecifiedBroadPhaseLayerFilter(BroadPhaseLayer inLayer) + ///
+ ///
+ public static SpecifiedBroadPhaseLayerFilter Create(byte layer) => + Jolt.PInvoke.SpecifiedBroadPhaseLayerFilter_Create(layer); + + /// + public bool ShouldCollide(byte layer) => ((BroadPhaseLayerFilter)this).ShouldCollide(layer); + + public static implicit operator BroadPhaseLayerFilter(SpecifiedBroadPhaseLayerFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.SpecifiedBroadPhaseLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SpecifiedObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/Classes/SpecifiedObjectLayerFilter.gen.cs new file mode 100644 index 0000000..48fa94d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SpecifiedObjectLayerFilter.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Allows objects from a specific layer only + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:92 + ///
+ /// class SpecifiedObjectLayerFilter : public ObjectLayerFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct SpecifiedObjectLayerFilter : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/ObjectLayer.h:96 + ///
+ /// explicit SpecifiedObjectLayerFilter(ObjectLayer inLayer) + ///
+ ///
+ public static SpecifiedObjectLayerFilter Create(ushort layer) => + Jolt.PInvoke.SpecifiedObjectLayerFilter_Create(layer); + + /// + public bool ShouldCollide(ushort layer) => ((ObjectLayerFilter)this).ShouldCollide(layer); + + public static implicit operator ObjectLayerFilter(SpecifiedObjectLayerFilter value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.SpecifiedObjectLayerFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Sphere.gen.cs b/Brutal.Jolt/Generated/Classes/Sphere.gen.cs new file mode 100644 index 0000000..c7ffaaf --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Sphere.gen.cs @@ -0,0 +1,122 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:11 + ///
+ /// class Sphere + ///
+ ///
+ [InteropHandle] + public readonly partial struct Sphere : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:17 + ///
+ /// inline Sphere() = default + ///
+ ///
+ public static Sphere Create() => Jolt.PInvoke.Sphere_Create(); + + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:18 + ///
+ /// inline Sphere(const Float3 &inCenter, float inRadius) + ///
+ ///
+ public static Sphere Create(float3 center, float radius) => Jolt.PInvoke.Sphere_Create_2(center, radius); + + /// + /// + /// Calculate the support vector for this convex shape. + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:22 + ///
+ /// inline Vec3 GetSupport(Vec3Arg inDirection) const + ///
+ ///
+ public float3 GetSupport(float3 direction) => Jolt.PInvoke.Sphere_GetSupport(this, direction); + + /// + /// + /// Properties + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:29 + ///
+ /// inline Vec3 GetCenter() const + ///
+ ///
+ public float3 GetCenter() => Jolt.PInvoke.Sphere_GetCenter(this); + + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:30 + ///
+ /// inline float GetRadius() const + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.Sphere_GetRadius(this); + + /// + /// + /// Test if two spheres overlap + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:33 + ///
+ /// inline bool Overlaps(const Sphere &inB) const + ///
+ ///
+ public bool Overlaps(Sphere b) => Jolt.PInvoke.Sphere_Overlaps(this, b); + + /// + /// + /// Check if this sphere overlaps with a box + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:39 + ///
+ /// inline bool Overlaps(const AABox &inOther) const + ///
+ ///
+ public bool Overlaps(in AABox other) => Jolt.PInvoke.Sphere_Overlaps_2(this, in other); + + /// + /// + /// Create the minimal sphere that encapsulates this sphere and inPoint + /// + /// + /// C++: + /// Jolt/Geometry/Sphere.h:45 + ///
+ /// inline void EncapsulatePoint(Vec3Arg inPoint) + ///
+ ///
+ public void EncapsulatePoint(float3 point) => Jolt.PInvoke.Sphere_EncapsulatePoint(this, point); + + public void Dispose() => Jolt.PInvoke.Sphere_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SphereShape.gen.cs b/Brutal.Jolt/Generated/Classes/SphereShape.gen.cs new file mode 100644 index 0000000..a921e69 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SphereShape.gen.cs @@ -0,0 +1,367 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A sphere, centered around the origin. Note that it is implemented as a point with convex radius. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:31 + ///
+ /// class SphereShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct SphereShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:37 + ///
+ /// SphereShape() + ///
+ ///
+ public static SphereShape Create() => Jolt.PInvoke.SphereShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:38 + ///
+ /// SphereShape(const SphereShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static SphereShape Create(SphereShapeSettings settings) + { + var _handle = Jolt.PInvoke.SphereShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create a sphere with radius inRadius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:41 + ///
+ /// explicit SphereShape(float inRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static SphereShape Create(float radius, PhysicsMaterial material = default) => + Jolt.PInvoke.SphereShape_Create_3(radius, material); + + /// + /// + /// Radius of the sphere + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:44 + ///
+ /// float GetRadius() const + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.SphereShape_GetRadius(this); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:108 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.SphereShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(SphereShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(SphereShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SphereShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SphereShapeSettings.gen.cs new file mode 100644 index 0000000..c117b52 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SphereShapeSettings.gen.cs @@ -0,0 +1,121 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a SphereShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:12 + ///
+ /// class SphereShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct SphereShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:18 + ///
+ /// SphereShapeSettings() = default + ///
+ ///
+ public static SphereShapeSettings Create() => Jolt.PInvoke.SphereShapeSettings_Create(); + + /// + /// + /// Create a sphere with radius inRadius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:21 + ///
+ /// explicit SphereShapeSettings(float inRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static SphereShapeSettings Create(float radius, PhysicsMaterial material = default) => + Jolt.PInvoke.SphereShapeSettings_Create_2(radius, material); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:26 + ///
+ /// float mRadius = 0.0f + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.SphereShapeSettings_GetRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SphereShape.h:26 + ///
+ /// float mRadius = 0.0f + ///
+ ///
+ public void SetRadius(float value) => Jolt.PInvoke.SphereShapeSettings_SetRadius(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(SphereShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(SphereShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SpringPart.gen.cs b/Brutal.Jolt/Generated/Classes/SpringPart.gen.cs new file mode 100644 index 0000000..9a82f55 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SpringPart.gen.cs @@ -0,0 +1,242 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class used in other constraint parts to calculate the required bias factor in the lagrange multiplier for + /// creating springs + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:15 + ///
+ /// class SpringPart + ///
+ ///
+ [InteropHandle] + public readonly partial struct SpringPart : IDisposable + { + public static SpringPart Create() => Jolt.PInvoke.SpringPart_Create(); + + /// + /// + /// Turn off the spring and set a bias only + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:21 + ///
+ /// void CalculateSpringPropertiesWithBias(float inBias) + ///
+ ///
+ /// + /// + /// Turn off the spring and set a bias only + /// + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// + /// + public void CalculateSpringPropertiesWithBias(float bias) => + Jolt.PInvoke.SpringPart_CalculateSpringPropertiesWithBias(this, bias); + + /// + /// + /// Calculate spring properties with spring Stiffness (k) and damping (c), this is based on the spring + /// equation: F = -k * x - c * v + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:36 + ///
+ /// void CalculateSpringPropertiesWithStiffnessAndDamping(float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inStiffness, float inDamping, float &outEffectiveMass) + ///
+ ///
+ /// + /// + /// Calculate spring properties with spring Stiffness (k) and damping (c), this is based on the spring equation: F = -k * x - c * v + /// + /// @param inDeltaTime Time step + /// @param inInvEffectiveMass Inverse effective mass K + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C). + /// @param inStiffness Spring stiffness k. + /// @param inDamping Spring damping coefficient c. + /// @param outEffectiveMass On return, this contains the new effective mass K^-1 + /// + /// + public void CalculateSpringPropertiesWithStiffnessAndDamping( + float deltaTime, + float invEffectiveMass, + float bias, + float c, + float stiffness, + float damping, + out float effectiveMass + ) => + Jolt.PInvoke.SpringPart_CalculateSpringPropertiesWithStiffnessAndDamping( + this, + deltaTime, + invEffectiveMass, + bias, + c, + stiffness, + damping, + out effectiveMass + ); + + /// + /// + /// Calculate spring properties based on frequency and damping ratio + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:98 + ///
+ /// void CalculateSpringPropertiesWithFrequencyAndDamping(float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inFrequency, float inDamping, float &outEffectiveMass) + ///
+ ///
+ /// + /// + /// Calculate spring properties based on frequency and damping ratio + /// + /// @param inDeltaTime Time step + /// @param inInvEffectiveMass Inverse effective mass K + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C). + /// @param inFrequency Oscillation frequency (Hz). + /// @param inDamping Damping factor (0 = no damping, 1 = critical damping). + /// @param outEffectiveMass On return, this contains the new effective mass K^-1 + /// + /// + public void CalculateSpringPropertiesWithFrequencyAndDamping( + float deltaTime, + float invEffectiveMass, + float bias, + float c, + float frequency, + float damping, + out float effectiveMass + ) => + Jolt.PInvoke.SpringPart_CalculateSpringPropertiesWithFrequencyAndDamping( + this, + deltaTime, + invEffectiveMass, + bias, + c, + frequency, + damping, + out effectiveMass + ); + + /// + /// + /// Calculate spring properties with spring stiffness (k) and damping (c) in acceleration mode, this is + /// based on the spring equation: F = m_eff * (-k * x - c * v) where m_eff is the effective mass of the + /// constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:123 + ///
+ /// void CalculateSpringPropertiesWithMassNormalizedStiffnessAndDamping(float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inStiffness, float inDamping, float &outEffectiveMass) + ///
+ ///
+ /// + /// + /// Calculate spring properties with spring stiffness (k) and damping (c) in acceleration mode, this is based on the spring equation: F = m_eff * (-k * x - c * v) where m_eff is the effective mass of the constraint + /// + /// @param inDeltaTime Time step + /// @param inInvEffectiveMass Inverse effective mass K + /// @param inBias Bias term (b) for the constraint impulse: lambda = J v + b + /// @param inC Value of the constraint equation (C). + /// @param inStiffness Spring stiffness k. + /// @param inDamping Spring damping coefficient c. + /// @param outEffectiveMass On return, this contains the new effective mass K^-1 + /// + /// + public void CalculateSpringPropertiesWithMassNormalizedStiffnessAndDamping( + float deltaTime, + float invEffectiveMass, + float bias, + float c, + float stiffness, + float damping, + out float effectiveMass + ) => + Jolt.PInvoke.SpringPart_CalculateSpringPropertiesWithMassNormalizedStiffnessAndDamping( + this, + deltaTime, + invEffectiveMass, + bias, + c, + stiffness, + damping, + out effectiveMass + ); + + /// + /// + /// Calculate spring properties based on SpringSettings object. Assumes the spring has either stiffness or + /// damping. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:130 + ///
+ /// void CalculateSpringPropertiesWithSettings(float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, const SpringSettings &inSpringSettings, float &outEffectiveMass) + ///
+ ///
+ public void CalculateSpringPropertiesWithSettings( + float deltaTime, + float invEffectiveMass, + float bias, + float c, + SpringSettings springSettings, + out float effectiveMass + ) => + Jolt.PInvoke.SpringPart_CalculateSpringPropertiesWithSettings( + this, + deltaTime, + invEffectiveMass, + bias, + c, + springSettings, + out effectiveMass + ); + + /// + /// + /// Returns if this spring is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:147 + ///
+ /// bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.SpringPart_IsActive(this); + + /// + /// + /// Get total bias b, including supplied bias and bias for spring: lambda = J v + b + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SpringPart.h:153 + ///
+ /// float GetBias(float inTotalLambda) const + ///
+ ///
+ public float GetBias(float totalLambda) => Jolt.PInvoke.SpringPart_GetBias(this, totalLambda); + + public void Dispose() => Jolt.PInvoke.SpringPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SpringSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SpringSettings.gen.cs new file mode 100644 index 0000000..9920391 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SpringSettings.gen.cs @@ -0,0 +1,285 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings for a linear or angular spring + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:23 + ///
+ /// class SpringSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct SpringSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:29 + ///
+ /// SpringSettings() = default + ///
+ ///
+ public static SpringSettings Create() => Jolt.PInvoke.SpringSettings_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:32 + ///
+ /// SpringSettings(ESpringMode inMode, float inFrequencyOrStiffness, float inDamping) + ///
+ ///
+ public static SpringSettings Create(SpringMode mode, float frequencyOrStiffness, float damping) => + Jolt.PInvoke.SpringSettings_Create_2(mode, frequencyOrStiffness, damping); + + /// + /// + /// Saves the contents of the spring settings in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:35 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.SpringSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restores contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:38 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.SpringSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Check if the spring has a valid frequency / stiffness, if not the spring will be hard + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:41 + ///
+ /// inline bool HasStiffness() const + ///
+ ///
+ public bool HasStiffness() => Jolt.PInvoke.SpringSettings_HasStiffness(this); + + /// + /// + /// Check if this spring has stiffness or damping (making it active), if not the constraint will be hard + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:44 + ///
+ /// inline bool HasStiffnessOrDamping() const + ///
+ ///
+ public bool HasStiffnessOrDamping() => Jolt.PInvoke.SpringSettings_HasStiffnessOrDamping(this); + + /// + /// + /// Valid when mMode = ESpringMode::FrequencyAndDamping. If > 0 the constraint will be soft and this + /// specifies the oscillation frequency in Hz. If <= 0, mDamping is ignored and the constraint will have + /// hard limits (as hard as the time step / the number of velocity / position solver steps allows). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:54 + ///
+ /// float mFrequency = 0.0f + ///
+ ///
+ public float GetFrequency() => Jolt.PInvoke.SpringSettings_GetFrequency(this); + + /// + /// + /// Valid when mMode = ESpringMode::FrequencyAndDamping. If > 0 the constraint will be soft and this + /// specifies the oscillation frequency in Hz. If <= 0, mDamping is ignored and the constraint will have + /// hard limits (as hard as the time step / the number of velocity / position solver steps allows). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:54 + ///
+ /// float mFrequency = 0.0f + ///
+ ///
+ public void SetFrequency(float value) => Jolt.PInvoke.SpringSettings_SetFrequency(this, value); + + /// + /// + /// When mMode = ESpringMode::StiffnessAndDamping: Specifies the stiffness (k) in the spring equation F = -k + /// * x - c * v for a linear or T = -k * theta - c * w for an angular spring. Units are N / m for a linear + /// spring and N m / rad for an angular spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:70 + ///
+ /// float mStiffness + ///
+ ///
+ /// + /// + /// When mMode = ESpringMode::StiffnessAndDamping: + /// Specifies the stiffness (k) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring. + /// Units are N / m for a linear spring and N m / rad for an angular spring. + /// + /// Note that stiffness values are large numbers. To calculate a ballpark value for the needed stiffness you can use: + /// force = stiffness * delta_spring_length = mass * gravity <=> stiffness = mass * gravity / delta_spring_length. + /// So if your object weighs 1500 kg and the spring compresses by 2 meters, you need a stiffness in the order of 1500 * 9.81 / 2 ~ 7500 N/m. + /// + /// When mMode = ESpringMode::MassNormalizedStiffnessAndDamping: + /// Specifies the stiffness (k) in the spring equation F = m_eff * (-k * x - c * v) for a linear or T = i_eff * (-k * theta - c * w) for an angular spring. + /// m_eff / i_eff is the effective mass / inertia of the constraint. + /// Units are 1 / s^2 for a linear spring and 1 / rad s^2 for an angular spring. + /// + /// Since the stiffness is multiplied by the effective mass / inertia of the constraint, you can use much smaller stiffness values and they will be mass independent. + /// + /// + public float GetStiffness() => Jolt.PInvoke.SpringSettings_GetStiffness(this); + + /// + /// + /// When mMode = ESpringMode::StiffnessAndDamping: Specifies the stiffness (k) in the spring equation F = -k + /// * x - c * v for a linear or T = -k * theta - c * w for an angular spring. Units are N / m for a linear + /// spring and N m / rad for an angular spring. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:70 + ///
+ /// float mStiffness + ///
+ ///
+ /// + /// + /// When mMode = ESpringMode::StiffnessAndDamping: + /// Specifies the stiffness (k) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring. + /// Units are N / m for a linear spring and N m / rad for an angular spring. + /// + /// Note that stiffness values are large numbers. To calculate a ballpark value for the needed stiffness you can use: + /// force = stiffness * delta_spring_length = mass * gravity <=> stiffness = mass * gravity / delta_spring_length. + /// So if your object weighs 1500 kg and the spring compresses by 2 meters, you need a stiffness in the order of 1500 * 9.81 / 2 ~ 7500 N/m. + /// + /// When mMode = ESpringMode::MassNormalizedStiffnessAndDamping: + /// Specifies the stiffness (k) in the spring equation F = m_eff * (-k * x - c * v) for a linear or T = i_eff * (-k * theta - c * w) for an angular spring. + /// m_eff / i_eff is the effective mass / inertia of the constraint. + /// Units are 1 / s^2 for a linear spring and 1 / rad s^2 for an angular spring. + /// + /// Since the stiffness is multiplied by the effective mass / inertia of the constraint, you can use much smaller stiffness values and they will be mass independent. + /// + /// + public void SetStiffness(float value) => Jolt.PInvoke.SpringSettings_SetStiffness(this, value); + + /// + /// + /// Selects the way in which the spring is defined. See the descriptions of the mFrequency, mStiffness and + /// mDamping properties. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:47 + ///
+ /// ESpringMode mMode = ESpringMode::FrequencyAndDamping + ///
+ ///
+ public SpringMode GetMode() => Jolt.PInvoke.SpringSettings_GetMode(this); + + /// + /// + /// Selects the way in which the spring is defined. See the descriptions of the mFrequency, mStiffness and + /// mDamping properties. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:47 + ///
+ /// ESpringMode mMode = ESpringMode::FrequencyAndDamping + ///
+ ///
+ public void SetMode(SpringMode value) => Jolt.PInvoke.SpringSettings_SetMode(this, value); + + /// + /// + /// When mMode = ESpringMode::FrequencyAndDamping this is the damping ratio (0 = no damping, 1 = critical + /// damping). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:84 + ///
+ /// float mDamping = 0.0f + ///
+ ///
+ /// + /// + /// When mMode = ESpringMode::FrequencyAndDamping this is the damping ratio (0 = no damping, 1 = critical damping). + /// + /// When mMode = ESpringMode::StiffnessAndDamping this is the damping (c) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring. + /// Units are N s / m for a linear spring and N s m / rad for an angular spring. + /// + /// When mMode = ESpringMode::MassNormalizedStiffnessAndDamping this is the damping (c) in the spring equation F = m_eff * (-k * x - c * v) for a linear or T = i_eff * (-k * theta - c * w) for an angular spring. + /// m_eff / i_eff is the effective mass / inertia of the constraint. + /// Units are 1 / s for a linear spring and 1 / rad s for an angular spring. + /// + /// Note that if you set this to 0, you will not get an infinite oscillation. Because we integrate physics using an explicit Euler scheme, there is always energy loss. + /// This is done to keep the simulation from exploding, because with a damping of 0 and even the slightest rounding error, the oscillation could become bigger and bigger until the simulation explodes. + /// + /// + public float GetDamping() => Jolt.PInvoke.SpringSettings_GetDamping(this); + + /// + /// + /// When mMode = ESpringMode::FrequencyAndDamping this is the damping ratio (0 = no damping, 1 = critical + /// damping). + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:84 + ///
+ /// float mDamping = 0.0f + ///
+ ///
+ /// + /// + /// When mMode = ESpringMode::FrequencyAndDamping this is the damping ratio (0 = no damping, 1 = critical damping). + /// + /// When mMode = ESpringMode::StiffnessAndDamping this is the damping (c) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring. + /// Units are N s / m for a linear spring and N s m / rad for an angular spring. + /// + /// When mMode = ESpringMode::MassNormalizedStiffnessAndDamping this is the damping (c) in the spring equation F = m_eff * (-k * x - c * v) for a linear or T = i_eff * (-k * theta - c * w) for an angular spring. + /// m_eff / i_eff is the effective mass / inertia of the constraint. + /// Units are 1 / s for a linear spring and 1 / rad s for an angular spring. + /// + /// Note that if you set this to 0, you will not get an infinite oscillation. Because we integrate physics using an explicit Euler scheme, there is always energy loss. + /// This is done to keep the simulation from exploding, because with a damping of 0 and even the slightest rounding error, the oscillation could become bigger and bigger until the simulation explodes. + /// + /// + public void SetDamping(float value) => Jolt.PInvoke.SpringSettings_SetDamping(this, value); + + public void Dispose() => Jolt.PInvoke.SpringSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StateRecorder.gen.cs b/Brutal.Jolt/Generated/Classes/StateRecorder.gen.cs new file mode 100644 index 0000000..6dcb631 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StateRecorder.gen.cs @@ -0,0 +1,117 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that records the state of a physics system. Can be used to check if the simulation is deterministic by + /// putting the recorder in validation mode. Can be used to restore the state to an earlier point in time. Note + /// that only the state that is modified by the simulation is saved, configuration settings like body friction + /// or restitution, motion quality etc. are not saved and need to be saved by the user if desired. + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:109 + ///
+ /// class StateRecorder : public StreamIn, public StreamOut + ///
+ ///
+ [InteropHandle] + public readonly partial struct StateRecorder + { + /// + /// + /// Sets the stream in validation mode. In this case the physics system ensures that before it calls + /// ReadBytes that it will ensure that those bytes contain the current state. This makes it possible to step + /// and save the state, restore to the previous step and step again and when the recorded state is not the + /// same it can restore the expected state and any byte that changes due to a ReadBytes function can be + /// caught to find out which part of the simulation is not deterministic. Note that validation only works + /// when saving the full state of the simulation (EStateRecorderState::All, StateRecorderFilter == nullptr). + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:121 + ///
+ /// void SetValidating(bool inValidating) + ///
+ ///
+ public void SetValidating(bool validating) => Jolt.PInvoke.StateRecorder_SetValidating(this, validating); + + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:122 + ///
+ /// bool IsValidating() const + ///
+ ///
+ public bool IsValidating() => Jolt.PInvoke.StateRecorder_IsValidating(this); + + /// + /// + /// This allows splitting the state in multiple parts. While restoring, only the last part should have this + /// flag set to true. Note that you should ensure that the different parts contain information for disjoint + /// sets of bodies, constraints and contacts. E.g. if you restore the same contact twice, you get undefined + /// behavior. In order to create disjoint sets you can use the StateRecorderFilter. Note that validation is + /// not compatible with restoring a simulation state in multiple parts. + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:128 + ///
+ /// void SetIsLastPart(bool inIsLastPart) + ///
+ ///
+ public void SetIsLastPart(bool isLastPart) => Jolt.PInvoke.StateRecorder_SetIsLastPart(this, isLastPart); + + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:129 + ///
+ /// bool IsLastPart() const + ///
+ ///
+ public bool IsLastPart() => Jolt.PInvoke.StateRecorder_IsLastPart(this); + + public static implicit operator StreamIn(StateRecorder value) => Unsafe.BitCast(value); + + public static implicit operator StreamOut(StateRecorder value) => Jolt.PInvoke.StateRecorder_AsStreamOut(value); + + /// + public unsafe void ReadBytes(Ptr data, ByteSize numBytes) => ((StreamIn)this).ReadBytes(data, numBytes); + + /// + public bool IsEOF() => ((StreamIn)this).IsEOF(); + + /// + public bool IsFailed() => ((StreamIn)this).IsFailed(); + + /// + public void Read(out float3 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Read(out double3 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Read(out double4x4 vec) => ((StreamIn)this).Read(out vec); + + /// + public unsafe void WriteBytes(Ptr data, ByteSize numBytes) => ((StreamOut)this).WriteBytes(data, numBytes); + + /// + public void Write(float3 vec) => ((StreamOut)this).Write(vec); + + /// + public void Write(double3 vec) => ((StreamOut)this).Write(vec); + + /// + public void Write(in double4x4 vec) => ((StreamOut)this).Write(in vec); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StateRecorderFilter.gen.cs b/Brutal.Jolt/Generated/Classes/StateRecorderFilter.gen.cs new file mode 100644 index 0000000..91a9fa4 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StateRecorderFilter.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// User callbacks that allow determining which parts of the simulation should be saved by a StateRecorder + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:78 + ///
+ /// class StateRecorderFilter + ///
+ ///
+ [InteropHandle] + public readonly partial struct StateRecorderFilter : IDisposable + { + public static StateRecorderFilter Create() => Jolt.PInvoke.StateRecorderFilter_Create(); + + /// + /// + /// If the state of a specific body should be saved + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:88 + ///
+ /// virtual bool ShouldSaveBody(const Body &inBody) const + ///
+ ///
+ public bool ShouldSaveBody(Body body) => Jolt.PInvoke.StateRecorderFilter_ShouldSaveBody(this, body); + + /// + /// + /// If the state of a specific constraint should be saved + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:91 + ///
+ /// virtual bool ShouldSaveConstraint(const Constraint &inConstraint) const + ///
+ ///
+ public bool ShouldSaveConstraint(Constraint constraint) => + Jolt.PInvoke.StateRecorderFilter_ShouldSaveConstraint(this, constraint); + + /// + /// + /// If the state of a specific contact should be saved + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:94 + ///
+ /// virtual bool ShouldSaveContact(const BodyID &inBody1, const BodyID &inBody2) const + ///
+ ///
+ public bool ShouldSaveContact(uint body1, uint body2) => + Jolt.PInvoke.StateRecorderFilter_ShouldSaveContact(this, body1, body2); + + /// + /// + /// If the state of a specific contact should be restored + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:101 + ///
+ /// virtual bool ShouldRestoreContact(const BodyID &inBody1, const BodyID &inBody2) const + ///
+ ///
+ public bool ShouldRestoreContact(uint body1, uint body2) => + Jolt.PInvoke.StateRecorderFilter_ShouldRestoreContact(this, body1, body2); + + public void Dispose() => Jolt.PInvoke.StateRecorderFilter_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StateRecorderImpl.gen.cs b/Brutal.Jolt/Generated/Classes/StateRecorderImpl.gen.cs new file mode 100644 index 0000000..a94fdce --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StateRecorderImpl.gen.cs @@ -0,0 +1,187 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of the StateRecorder class that uses a stringstream as underlying store and that implements + /// checking if the state doesn't change upon reading + /// + /// + /// C++: + /// Jolt/Physics/StateRecorderImpl.h:12 + ///
+ /// class StateRecorderImpl final : public StateRecorder + ///
+ ///
+ [InteropHandle] + public readonly partial struct StateRecorderImpl : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/StateRecorderImpl.h:16 + ///
+ /// StateRecorderImpl() = default + ///
+ ///
+ public static StateRecorderImpl Create() => Jolt.PInvoke.StateRecorderImpl_Create(); + + /// + public unsafe void WriteBytes(Ptr data, ByteSize numBytes) => ((StreamOut)this).WriteBytes(data, numBytes); + + /// + /// + /// Rewind the stream for reading + /// + /// + /// C++: + /// Jolt/Physics/StateRecorderImpl.h:23 + ///
+ /// void Rewind() + ///
+ ///
+ /// + /// + /// Resets only the read position; it does not discard previously written data. To reuse a recorder for a + /// fresh save, call Clear() before writing to it, not Rewind(). + /// + /// + public void Rewind() => Jolt.PInvoke.StateRecorderImpl_Rewind(this); + + /// + /// + /// Clear the stream for reuse + /// + /// + /// C++: + /// Jolt/Physics/StateRecorderImpl.h:26 + ///
+ /// void Clear() + ///
+ ///
+ /// + /// + /// Resets both the read and write positions, discarding any previously recorded state. The sequence for + /// reusing a recorder is Clear(), then write the new state, then Rewind(), then RestoreState. + /// + /// + public void Clear() => Jolt.PInvoke.StateRecorderImpl_Clear(this); + + /// + public unsafe void ReadBytes(Ptr data, ByteSize numBytes) => ((StreamIn)this).ReadBytes(data, numBytes); + + /// + public bool IsEOF() => ((StreamIn)this).IsEOF(); + + /// + public bool IsFailed() => ((StreamIn)this).IsFailed(); + + /// + /// + /// Compare this state with a reference state and ensure they are the same + /// + /// + /// C++: + /// Jolt/Physics/StateRecorderImpl.h:38 + ///
+ /// bool IsEqual(StateRecorderImpl &inReference) + ///
+ ///
+ public bool IsEqual(StateRecorderImpl reference) => Jolt.PInvoke.StateRecorderImpl_IsEqual(this, reference); + + /// + /// + /// Get size of the binary data in bytes + /// + /// + /// C++: + /// Jolt/Physics/StateRecorderImpl.h:44 + ///
+ /// size_t GetDataSize() + ///
+ ///
+ public nuint GetDataSize() => Jolt.PInvoke.StateRecorderImpl_GetDataSize(this); + + /// + /// + /// Copies the recorded state into buffer and returns the total size of the state. Nothing is copied past + /// the end of the buffer, so a return value larger than buffer.Length means the buffer was too small and + /// the call should be retried with one that size. The recorder is left exactly as it was found - the read + /// position doesn't move - so this is safe to call part-way through a restore. + /// + /// + public unsafe ByteSize GetData(Span buffer) + { + fixed (byte* buffer_fixed = buffer) + { + return (ByteSize)Jolt.PInvoke.StateRecorderImpl_GetDataBytes(this, buffer_fixed, (nuint)buffer.Length); + } + } + + /// + /// + /// Writes a block of bytes into the stream (this is the load side of GetData). It appends at the current + /// put position, so call Clear() first if the recorder already holds a previous save, then Rewind() before + /// reading the new state back with RestoreState. + /// + /// + public unsafe void WriteBytes(ReadOnlySpan data) + { + fixed (byte* data_fixed = data) + { + Jolt.PInvoke.StateRecorderImpl_WriteByteSpan(this, data_fixed, (nuint)data.Length); + } + } + + public static implicit operator StateRecorder(StateRecorderImpl value) => + Unsafe.BitCast(value); + + public static implicit operator StreamIn(StateRecorderImpl value) => + Unsafe.BitCast(value); + + public static implicit operator StreamOut(StateRecorderImpl value) => + Jolt.PInvoke.StateRecorderImpl_AsStreamOut(value); + + public void Dispose() => Jolt.PInvoke.StateRecorderImpl_Destroy(this); + + /// + public void SetValidating(bool validating) => ((StateRecorder)this).SetValidating(validating); + + /// + public bool IsValidating() => ((StateRecorder)this).IsValidating(); + + /// + public void SetIsLastPart(bool isLastPart) => ((StateRecorder)this).SetIsLastPart(isLastPart); + + /// + public bool IsLastPart() => ((StateRecorder)this).IsLastPart(); + + /// + public void Read(out float3 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Read(out double3 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Read(out double4x4 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Write(float3 vec) => ((StreamOut)this).Write(vec); + + /// + public void Write(double3 vec) => ((StreamOut)this).Write(vec); + + /// + public void Write(in double4x4 vec) => ((StreamOut)this).Write(in vec); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StaticCompoundShape.gen.cs b/Brutal.Jolt/Generated/Classes/StaticCompoundShape.gen.cs new file mode 100644 index 0000000..5970ced --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StaticCompoundShape.gen.cs @@ -0,0 +1,464 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A compound shape, sub shapes can be rotated and translated. Sub shapes cannot be modified once the shape is + /// constructed. Shifts all child objects so that they're centered around the center of mass. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:33 + ///
+ /// class StaticCompoundShape final : public CompoundShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct StaticCompoundShape : IDisposable + { + /// + /// + /// Node structure + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:119 + ///
+ /// struct Node + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct Node + { + /// + /// + /// 4 child bounding boxes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:124 + ///
+ /// HalfFloat mBoundsMinX[4] + ///
+ ///
+ [FieldOffset(0)] + public ushort_4 BoundsMinX; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:125 + ///
+ /// HalfFloat mBoundsMinY[4] + ///
+ ///
+ [FieldOffset(8)] + public ushort_4 BoundsMinY; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:126 + ///
+ /// HalfFloat mBoundsMinZ[4] + ///
+ ///
+ [FieldOffset(16)] + public ushort_4 BoundsMinZ; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:127 + ///
+ /// HalfFloat mBoundsMaxX[4] + ///
+ ///
+ [FieldOffset(24)] + public ushort_4 BoundsMaxX; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:128 + ///
+ /// HalfFloat mBoundsMaxY[4] + ///
+ ///
+ [FieldOffset(32)] + public ushort_4 BoundsMaxY; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:129 + ///
+ /// HalfFloat mBoundsMaxZ[4] + ///
+ ///
+ [FieldOffset(40)] + public ushort_4 BoundsMaxZ; + + /// + /// + /// 4 child node properties + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:130 + ///
+ /// uint32 mNodeProperties[4] + ///
+ ///
+ [FieldOffset(48)] + public uint_4 NodeProperties; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:39 + ///
+ /// StaticCompoundShape() + ///
+ ///
+ public static StaticCompoundShape Create() => Jolt.PInvoke.StaticCompoundShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:40 + ///
+ /// StaticCompoundShape(const StaticCompoundShapeSettings &inSettings, TempAllocator &inTempAllocator, ShapeResult &outResult) + ///
+ ///
+ public static StaticCompoundShape Create(StaticCompoundShapeSettings settings, TempAllocator tempAllocator) + { + var _handle = Jolt.PInvoke.StaticCompoundShape_Create_2(settings, tempAllocator); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public unsafe int GetIntersectingSubShapes(in AABox box, Span subShapeIndices) => + ((CompoundShape)this).GetIntersectingSubShapes(in box, subShapeIndices); + + /// + public unsafe int GetIntersectingSubShapes(OrientedBox box, Span subShapeIndices) => + ((CompoundShape)this).GetIntersectingSubShapes(box, subShapeIndices); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:65 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.StaticCompoundShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator CompoundShape(StaticCompoundShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(StaticCompoundShape value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetSubShapes() => ((CompoundShape)this).GetSubShapes(); + + /// + public uint GetNumSubShapes() => ((CompoundShape)this).GetNumSubShapes(); + + /// + public CompoundShape.SubShape GetSubShape(uint idx) => ((CompoundShape)this).GetSubShape(idx); + + /// + public uint GetCompoundUserData(uint idx) => ((CompoundShape)this).GetCompoundUserData(idx); + + /// + public void SetCompoundUserData(uint idx, uint userData) => + ((CompoundShape)this).SetCompoundUserData(idx, userData); + + /// + public bool IsSubShapeIDValid(uint subShapeID) => ((CompoundShape)this).IsSubShapeIDValid(subShapeID); + + /// + public uint GetSubShapeIndexFromID(uint subShapeID, out uint remainder) => + ((CompoundShape)this).GetSubShapeIndexFromID(subShapeID, out remainder); + + /// + public SubShapeIDCreator GetSubShapeIDFromIndex(int idx, SubShapeIDCreator parentSubShapeID) => + ((CompoundShape)this).GetSubShapeIDFromIndex(idx, parentSubShapeID); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StaticCompoundShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/StaticCompoundShapeSettings.gen.cs new file mode 100644 index 0000000..53dffa8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StaticCompoundShapeSettings.gen.cs @@ -0,0 +1,103 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a StaticCompoundShape. Note that if you only want a compound of 1 shape, use a + /// RotatedTranslatedShape instead. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:17 + ///
+ /// class StaticCompoundShapeSettings final : public CompoundShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct StaticCompoundShapeSettings : IDisposable + { + public static StaticCompoundShapeSettings Create() => Jolt.PInvoke.StaticCompoundShapeSettings_Create(); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// Specialization of Create() function that allows specifying a temp allocator to avoid temporary memory + /// allocations on the heap + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:27 + ///
+ /// ShapeResult Create(TempAllocator &inTempAllocator) const + ///
+ ///
+ /// + /// + /// Throws JoltException with Jolt's error message when the operation fails. + /// + /// + public Shape CreateShape(TempAllocator tempAllocator) + { + var _handle = Jolt.PInvoke.StaticCompoundShapeSettings_CreateShape(this, tempAllocator); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator CompoundShapeSettings(StaticCompoundShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(StaticCompoundShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void AddShape(float3 position, floatQuat rotation, ShapeSettings shape, uint userData = 0) => + ((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData); + + /// + public void AddShape(float3 position, floatQuat rotation, Shape shape, uint userData = 0) => + ((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetSubShapes() => + ((CompoundShapeSettings)this).GetSubShapes(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StreamIn.gen.cs b/Brutal.Jolt/Generated/Classes/StreamIn.gen.cs new file mode 100644 index 0000000..d5febdf --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StreamIn.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Simple binary input stream + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:12 + ///
+ /// class StreamIn : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct StreamIn + { + /// + /// + /// Read a string of bytes from the binary stream + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:19 + ///
+ /// virtual void ReadBytes(void *outData, size_t inNumBytes) = 0 + ///
+ ///
+ public unsafe void ReadBytes(Ptr data, ByteSize numBytes) => + Jolt.PInvoke.StreamIn_ReadBytes(this, data, (nuint)numBytes); + + /// + /// + /// Returns true when an attempt has been made to read past the end of the file. Note that this follows the + /// convention of std::basic_ios::eof which only returns true when an attempt is made to read past the end, + /// not when the read pointer is at the end. + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:23 + ///
+ /// virtual bool IsEOF() const = 0 + ///
+ ///
+ public bool IsEOF() => Jolt.PInvoke.StreamIn_IsEOF(this); + + /// + /// + /// Returns true if there was an IO failure + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:26 + ///
+ /// virtual bool IsFailed() const = 0 + ///
+ ///
+ public bool IsFailed() => Jolt.PInvoke.StreamIn_IsFailed(this); + + /// + /// + /// Read a Vec3 (don't read W) + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:92 + ///
+ /// void Read(Vec3 &outVec) + ///
+ ///
+ public void Read(out float3 vec) => Jolt.PInvoke.StreamIn_Read(this, out vec); + + /// + /// + /// Read a DVec3 (don't read W) + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:99 + ///
+ /// void Read(DVec3 &outVec) + ///
+ ///
+ public void Read(out double3 vec) => Jolt.PInvoke.StreamIn_Read_2(this, out vec); + + /// + /// + /// Read a DMat44 (don't read W component of translation) + /// + /// + /// C++: + /// Jolt/Core/StreamIn.h:106 + ///
+ /// void Read(DMat44 &outVec) + ///
+ ///
+ public void Read(out double4x4 vec) => Jolt.PInvoke.StreamIn_Read_3(this, out vec); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StreamInWrapper.gen.cs b/Brutal.Jolt/Generated/Classes/StreamInWrapper.gen.cs new file mode 100644 index 0000000..5d93495 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StreamInWrapper.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Wrapper around std::istream + /// + /// + /// C++: + /// Jolt/Core/StreamWrapper.h:34 + ///
+ /// class StreamInWrapper : public StreamIn + ///
+ ///
+ [InteropHandle] + public readonly partial struct StreamInWrapper + { + /// + /// + /// Write a string of bytes to the binary stream + /// + /// + /// C++: + /// Jolt/Core/StreamWrapper.h:41 + ///
+ /// virtual void ReadBytes(void *outData, size_t inNumBytes) override + ///
+ ///
+ public unsafe void ReadBytes(Ptr data, nuint numBytes) => + Jolt.PInvoke.StreamInWrapper_ReadBytes(this, data, numBytes); + + /// + public bool IsEOF() => ((StreamIn)this).IsEOF(); + + /// + public bool IsFailed() => ((StreamIn)this).IsFailed(); + + public static implicit operator StreamIn(StreamInWrapper value) => + Unsafe.BitCast(value); + + /// + public unsafe void ReadBytes(Ptr data, ByteSize numBytes) => ((StreamIn)this).ReadBytes(data, numBytes); + + /// + public void Read(out float3 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Read(out double3 vec) => ((StreamIn)this).Read(out vec); + + /// + public void Read(out double4x4 vec) => ((StreamIn)this).Read(out vec); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StreamOut.gen.cs b/Brutal.Jolt/Generated/Classes/StreamOut.gen.cs new file mode 100644 index 0000000..ec59de1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StreamOut.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Simple binary output stream + /// + /// + /// C++: + /// Jolt/Core/StreamOut.h:12 + ///
+ /// class StreamOut : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct StreamOut + { + /// + /// + /// Write a string of bytes to the binary stream + /// + /// + /// C++: + /// Jolt/Core/StreamOut.h:19 + ///
+ /// virtual void WriteBytes(const void *inData, size_t inNumBytes) = 0 + ///
+ ///
+ public unsafe void WriteBytes(Ptr data, ByteSize numBytes) => + Jolt.PInvoke.StreamOut_WriteBytes(this, data, (nuint)numBytes); + + /// + /// + /// Returns true if there was an IO failure + /// + /// + /// C++: + /// Jolt/Core/StreamOut.h:22 + ///
+ /// virtual bool IsFailed() const = 0 + ///
+ ///
+ public bool IsFailed() => Jolt.PInvoke.StreamOut_IsFailed(this); + + /// + /// + /// Write a Vec3 (don't write W) + /// + /// + /// C++: + /// Jolt/Core/StreamOut.h:75 + ///
+ /// void Write(const Vec3 &inVec) + ///
+ ///
+ public void Write(float3 vec) => Jolt.PInvoke.StreamOut_Write(this, vec); + + /// + /// + /// Write a DVec3 (don't write W) + /// + /// + /// C++: + /// Jolt/Core/StreamOut.h:81 + ///
+ /// void Write(const DVec3 &inVec) + ///
+ ///
+ public void Write(double3 vec) => Jolt.PInvoke.StreamOut_Write_2(this, vec); + + /// + /// + /// Write a DMat44 (don't write W component of translation) + /// + /// + /// C++: + /// Jolt/Core/StreamOut.h:87 + ///
+ /// void Write(const DMat44 &inVec) + ///
+ ///
+ public void Write(in double4x4 vec) => Jolt.PInvoke.StreamOut_Write_3(this, in vec); + } +} diff --git a/Brutal.Jolt/Generated/Classes/StreamOutWrapper.gen.cs b/Brutal.Jolt/Generated/Classes/StreamOutWrapper.gen.cs new file mode 100644 index 0000000..c3f379b --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/StreamOutWrapper.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Wrapper around std::ostream + /// + /// + /// C++: + /// Jolt/Core/StreamWrapper.h:17 + ///
+ /// class StreamOutWrapper : public StreamOut + ///
+ ///
+ [InteropHandle] + public readonly partial struct StreamOutWrapper + { + /// + /// + /// Write a string of bytes to the binary stream + /// + /// + /// C++: + /// Jolt/Core/StreamWrapper.h:24 + ///
+ /// virtual void WriteBytes(const void *inData, size_t inNumBytes) override + ///
+ ///
+ public unsafe void WriteBytes(Ptr data, nuint numBytes) => + Jolt.PInvoke.StreamOutWrapper_WriteBytes(this, data, numBytes); + + /// + public bool IsFailed() => ((StreamOut)this).IsFailed(); + + public static implicit operator StreamOut(StreamOutWrapper value) => + Unsafe.BitCast(value); + + /// + public unsafe void WriteBytes(Ptr data, ByteSize numBytes) => ((StreamOut)this).WriteBytes(data, numBytes); + + /// + public void Write(float3 vec) => ((StreamOut)this).Write(vec); + + /// + public void Write(double3 vec) => ((StreamOut)this).Write(vec); + + /// + public void Write(in double4x4 vec) => ((StreamOut)this).Write(in vec); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SubShapeIDCreator.gen.cs b/Brutal.Jolt/Generated/Classes/SubShapeIDCreator.gen.cs new file mode 100644 index 0000000..9539e0f --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SubShapeIDCreator.gen.cs @@ -0,0 +1,75 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A sub shape id creator can be used to create a new sub shape id by recursing through the shape hierarchy and + /// pushing new ID's onto the chain + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeID.h:107 + ///
+ /// class SubShapeIDCreator + ///
+ ///
+ [InteropHandle] + public readonly partial struct SubShapeIDCreator : IDisposable + { + public static SubShapeIDCreator Create() => Jolt.PInvoke.SubShapeIDCreator_Create(); + + /// + /// + /// Add a new id to the chain of id's and return it + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeID.h:111 + ///
+ /// SubShapeIDCreator PushID(uint inValue, uint inBits) const + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SubShapeIDCreator PushID(uint value, uint bits) => + Jolt.PInvoke.SubShapeIDCreator_PushID(this, value, bits); + + /// + /// + /// Get the resulting sub shape ID + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeID.h:122 + ///
+ /// const SubShapeID & GetID() const + ///
+ ///
+ public uint GetID() => Jolt.PInvoke.SubShapeIDCreator_GetID(this); + + /// + /// + /// Get the number of bits that have been written to the sub shape ID so far + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeID.h:128 + ///
+ /// inline uint GetNumBitsWritten() const + ///
+ ///
+ public uint GetNumBitsWritten() => Jolt.PInvoke.SubShapeIDCreator_GetNumBitsWritten(this); + + public void Dispose() => Jolt.PInvoke.SubShapeIDCreator_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SwingTwistConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/SwingTwistConstraint.gen.cs new file mode 100644 index 0000000..745775e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SwingTwistConstraint.gen.cs @@ -0,0 +1,550 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A swing twist constraint is a specialized constraint for humanoid ragdolls that allows limited rotation only + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:70 + ///
+ /// class SwingTwistConstraint final : public TwoBodyConstraint + ///
+ ///
+ /// + /// + /// A swing twist constraint is a specialized constraint for humanoid ragdolls that allows limited rotation only + /// + /// @see SwingTwistConstraintSettings for a description of the limits + /// + /// + [InteropHandle] + public readonly partial struct SwingTwistConstraint : IDisposable + { + /// + /// + /// Construct swing twist constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:76 + ///
+ /// SwingTwistConstraint(Body &inBody1, Body &inBody2, const SwingTwistConstraintSettings &inSettings) + ///
+ ///
+ public static SwingTwistConstraint Create(Body body1, Body body2, SwingTwistConstraintSettings settings) => + Jolt.PInvoke.SwingTwistConstraint_Create(body1, body2, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + /// + public float4x4 GetConstraintToBody1Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody1Matrix(); + + /// + public float4x4 GetConstraintToBody2Matrix() => ((TwoBodyConstraint)this).GetConstraintToBody2Matrix(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:99 + ///
+ /// inline Vec3 GetLocalSpacePosition1() const + ///
+ ///
+ /// + /// + /// @name Constraint reference frame + /// + /// + public float3 GetLocalSpacePosition1() => Jolt.PInvoke.SwingTwistConstraint_GetLocalSpacePosition1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:100 + ///
+ /// inline Vec3 GetLocalSpacePosition2() const + ///
+ ///
+ public float3 GetLocalSpacePosition2() => Jolt.PInvoke.SwingTwistConstraint_GetLocalSpacePosition2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:101 + ///
+ /// inline Quat GetConstraintToBody1() const + ///
+ ///
+ public floatQuat GetConstraintToBody1() => Jolt.PInvoke.SwingTwistConstraint_GetConstraintToBody1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:102 + ///
+ /// inline Quat GetConstraintToBody2() const + ///
+ ///
+ public floatQuat GetConstraintToBody2() => Jolt.PInvoke.SwingTwistConstraint_GetConstraintToBody2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:105 + ///
+ /// inline float GetNormalHalfConeAngle() const + ///
+ ///
+ /// + /// + /// @name Constraint limits + /// + /// + public float GetNormalHalfConeAngle() => Jolt.PInvoke.SwingTwistConstraint_GetNormalHalfConeAngle(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:106 + ///
+ /// inline void SetNormalHalfConeAngle(float inAngle) + ///
+ ///
+ public void SetNormalHalfConeAngle(float angle) => + Jolt.PInvoke.SwingTwistConstraint_SetNormalHalfConeAngle(this, angle); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:107 + ///
+ /// inline float GetPlaneHalfConeAngle() const + ///
+ ///
+ public float GetPlaneHalfConeAngle() => Jolt.PInvoke.SwingTwistConstraint_GetPlaneHalfConeAngle(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:108 + ///
+ /// inline void SetPlaneHalfConeAngle(float inAngle) + ///
+ ///
+ public void SetPlaneHalfConeAngle(float angle) => + Jolt.PInvoke.SwingTwistConstraint_SetPlaneHalfConeAngle(this, angle); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:109 + ///
+ /// inline float GetTwistMinAngle() const + ///
+ ///
+ public float GetTwistMinAngle() => Jolt.PInvoke.SwingTwistConstraint_GetTwistMinAngle(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:110 + ///
+ /// inline void SetTwistMinAngle(float inAngle) + ///
+ ///
+ public void SetTwistMinAngle(float angle) => Jolt.PInvoke.SwingTwistConstraint_SetTwistMinAngle(this, angle); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:111 + ///
+ /// inline float GetTwistMaxAngle() const + ///
+ ///
+ public float GetTwistMaxAngle() => Jolt.PInvoke.SwingTwistConstraint_GetTwistMaxAngle(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:112 + ///
+ /// inline void SetTwistMaxAngle(float inAngle) + ///
+ ///
+ public void SetTwistMaxAngle(float angle) => Jolt.PInvoke.SwingTwistConstraint_SetTwistMaxAngle(this, angle); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:115 + ///
+ /// const MotorSettings & GetSwingMotorSettings() const + ///
+ ///
+ /// + /// + /// @name Motor settings + /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetSwingMotorSettings() => Jolt.PInvoke.SwingTwistConstraint_GetSwingMotorSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:117 + ///
+ /// const MotorSettings & GetTwistMotorSettings() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public MotorSettings GetTwistMotorSettings() => Jolt.PInvoke.SwingTwistConstraint_GetTwistMotorSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:121 + ///
+ /// void SetMaxFrictionTorque(float inFrictionTorque) + ///
+ ///
+ /// + /// + /// @name Friction control + /// + /// + public void SetMaxFrictionTorque(float frictionTorque) => + Jolt.PInvoke.SwingTwistConstraint_SetMaxFrictionTorque(this, frictionTorque); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:122 + ///
+ /// float GetMaxFrictionTorque() const + ///
+ ///
+ public float GetMaxFrictionTorque() => Jolt.PInvoke.SwingTwistConstraint_GetMaxFrictionTorque(this); + + /// + /// + /// Controls if the motors are on or off + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:127 + ///
+ /// void SetSwingMotorState(EMotorState inState) + ///
+ ///
+ public void SetSwingMotorState(MotorState state) => + Jolt.PInvoke.SwingTwistConstraint_SetSwingMotorState(this, state); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:128 + ///
+ /// EMotorState GetSwingMotorState() const + ///
+ ///
+ public MotorState GetSwingMotorState() => Jolt.PInvoke.SwingTwistConstraint_GetSwingMotorState(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:129 + ///
+ /// void SetTwistMotorState(EMotorState inState) + ///
+ ///
+ public void SetTwistMotorState(MotorState state) => + Jolt.PInvoke.SwingTwistConstraint_SetTwistMotorState(this, state); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:130 + ///
+ /// EMotorState GetTwistMotorState() const + ///
+ ///
+ public MotorState GetTwistMotorState() => Jolt.PInvoke.SwingTwistConstraint_GetTwistMotorState(this); + + /// + /// + /// Set the target angular velocity of body 2 in constraint space of body 2 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:133 + ///
+ /// void SetTargetAngularVelocityCS(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetTargetAngularVelocityCS(float3 angularVelocity) => + Jolt.PInvoke.SwingTwistConstraint_SetTargetAngularVelocityCS(this, angularVelocity); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:134 + ///
+ /// Vec3 GetTargetAngularVelocityCS() const + ///
+ ///
+ public float3 GetTargetAngularVelocityCS() => + Jolt.PInvoke.SwingTwistConstraint_GetTargetAngularVelocityCS(this); + + /// + /// + /// Set the target angular velocity of body 2 in body 2 space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:137 + ///
+ /// void SetTargetAngularVelocityBS(Vec3Arg inAngularVelocity) + ///
+ ///
+ public void SetTargetAngularVelocityBS(float3 angularVelocity) => + Jolt.PInvoke.SwingTwistConstraint_SetTargetAngularVelocityBS(this, angularVelocity); + + /// + /// + /// Set the target orientation in constraint space (drives constraint to: GetRotationInConstraintSpace() == + /// inOrientation) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:140 + ///
+ /// void SetTargetOrientationCS(QuatArg inOrientation) + ///
+ ///
+ public void SetTargetOrientationCS(floatQuat orientation) => + Jolt.PInvoke.SwingTwistConstraint_SetTargetOrientationCS(this, orientation); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:141 + ///
+ /// Quat GetTargetOrientationCS() const + ///
+ ///
+ public floatQuat GetTargetOrientationCS() => Jolt.PInvoke.SwingTwistConstraint_GetTargetOrientationCS(this); + + /// + /// + /// Set the target orientation in body space (R2 = R1 * inOrientation, where R1 and R2 are the world space + /// rotations for body 1 and 2). Solve: R2 * ConstraintToBody2 = R1 * ConstraintToBody1 * q (see + /// SwingTwistConstraint::GetSwingTwist) and R2 = R1 * inOrientation for q. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:145 + ///
+ /// void SetTargetOrientationBS(QuatArg inOrientation) + ///
+ ///
+ public void SetTargetOrientationBS(floatQuat orientation) => + Jolt.PInvoke.SwingTwistConstraint_SetTargetOrientationBS(this, orientation); + + /// + /// + /// Get current rotation of constraint in constraint space. Solve: R2 * ConstraintToBody2 = R1 * + /// ConstraintToBody1 * q for q. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:149 + ///
+ /// Quat GetRotationInConstraintSpace() const + ///
+ ///
+ public floatQuat GetRotationInConstraintSpace() => + Jolt.PInvoke.SwingTwistConstraint_GetRotationInConstraintSpace(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:152 + ///
+ /// inline Vec3 GetTotalLambdaPosition() const + ///
+ ///
+ /// + /// + /// @name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy + /// the constraint) + /// + /// + public float3 GetTotalLambdaPosition() => Jolt.PInvoke.SwingTwistConstraint_GetTotalLambdaPosition(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:153 + ///
+ /// inline float GetTotalLambdaTwist() const + ///
+ ///
+ public float GetTotalLambdaTwist() => Jolt.PInvoke.SwingTwistConstraint_GetTotalLambdaTwist(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:154 + ///
+ /// inline float GetTotalLambdaSwingY() const + ///
+ ///
+ public float GetTotalLambdaSwingY() => Jolt.PInvoke.SwingTwistConstraint_GetTotalLambdaSwingY(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:155 + ///
+ /// inline float GetTotalLambdaSwingZ() const + ///
+ ///
+ public float GetTotalLambdaSwingZ() => Jolt.PInvoke.SwingTwistConstraint_GetTotalLambdaSwingZ(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:156 + ///
+ /// inline Vec3 GetTotalLambdaMotor() const + ///
+ ///
+ public float3 GetTotalLambdaMotor() => Jolt.PInvoke.SwingTwistConstraint_GetTotalLambdaMotor(this); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator TwoBodyConstraint(SwingTwistConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator Constraint(SwingTwistConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public Body GetBody1() => ((TwoBodyConstraint)this).GetBody1(); + + /// + public Body GetBody2() => ((TwoBodyConstraint)this).GetBody2(); + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SwingTwistConstraintPart.gen.cs b/Brutal.Jolt/Generated/Classes/SwingTwistConstraintPart.gen.cs new file mode 100644 index 0000000..14c05b0 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SwingTwistConstraintPart.gen.cs @@ -0,0 +1,446 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Quaternion based constraint that decomposes the rotation in constraint space in swing and twist: q = q_swing + /// * q_twist where q_swing.x = 0 and where q_twist.y = q_twist.z = 0 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:32 + ///
+ /// class SwingTwistConstraintPart + ///
+ ///
+ /// + /// + /// Quaternion based constraint that decomposes the rotation in constraint space in swing and twist: q = q_swing * q_twist + /// where q_swing.x = 0 and where q_twist.y = q_twist.z = 0 + /// + /// - Rotation around the twist (x-axis) is within [inTwistMinAngle, inTwistMaxAngle]. + /// - Rotation around the swing axis (y and z axis) are limited to an ellipsoid in quaternion space formed by the equation: + /// + /// (q_swing.y / sin(inSwingYHalfAngle / 2))^2 + (q_swing.z / sin(inSwingZHalfAngle / 2))^2 <= 1 + /// + /// Which roughly corresponds to an elliptic cone shape with major axis (inSwingYHalfAngle, inSwingZHalfAngle). + /// + /// In case inSwingYHalfAngle = 0, the rotation around Y will be constrained to 0 and the rotation around Z + /// will be constrained between [-inSwingZHalfAngle, inSwingZHalfAngle]. Vice versa if inSwingZHalfAngle = 0. + /// + /// + [InteropHandle] + public readonly partial struct SwingTwistConstraintPart : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:549 + ///
+ /// enum ERotationFlags + ///
+ ///
+ [Flags] + public enum RotationFlags : int + { + /// + /// + /// Indicates that axis is completely locked (cannot rotate around this axis) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:552 + ///
+ /// TwistXLocked = 1 << 0 + ///
+ ///
+ TwistXLocked = 1, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:553 + ///
+ /// SwingYLocked = 1 << 1 + ///
+ ///
+ SwingYLocked = 2, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:554 + ///
+ /// SwingZLocked = 1 << 2 + ///
+ ///
+ SwingZLocked = 4, + + /// + /// + /// Indicates that axis is completely free (can rotate around without limits) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:557 + ///
+ /// TwistXFree = 1 << 3 + ///
+ ///
+ TwistXFree = 8, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:558 + ///
+ /// SwingYFree = 1 << 4 + ///
+ ///
+ SwingYFree = 16, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:559 + ///
+ /// SwingZFree = 1 << 5 + ///
+ ///
+ SwingZFree = 32, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:560 + ///
+ /// SwingYZFree = SwingYFree | SwingZFree + ///
+ ///
+ SwingYZFree = 48, + } + + public static SwingTwistConstraintPart Create() => Jolt.PInvoke.SwingTwistConstraintPart_Create(); + + /// + /// + /// Override the swing type + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:36 + ///
+ /// void SetSwingType(ESwingType inSwingType) + ///
+ ///
+ public void SetSwingType(SwingType swingType) => + Jolt.PInvoke.SwingTwistConstraintPart_SetSwingType(this, swingType); + + /// + /// + /// Get the swing type for this part + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:42 + ///
+ /// ESwingType GetSwingType() const + ///
+ ///
+ public SwingType GetSwingType() => Jolt.PInvoke.SwingTwistConstraintPart_GetSwingType(this); + + /// + /// + /// Set limits for this constraint (see description above for parameters) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:48 + ///
+ /// void SetLimits(float inTwistMinAngle, float inTwistMaxAngle, float inSwingYMinAngle, float inSwingYMaxAngle, float inSwingZMinAngle, float inSwingZMaxAngle) + ///
+ ///
+ public void SetLimits( + float twistMinAngle, + float twistMaxAngle, + float swingYMinAngle, + float swingYMaxAngle, + float swingZMinAngle, + float swingZMaxAngle + ) => + Jolt.PInvoke.SwingTwistConstraintPart_SetLimits( + this, + twistMinAngle, + twistMaxAngle, + swingYMinAngle, + swingYMaxAngle, + swingZMinAngle, + swingZMaxAngle + ); + + /// + /// + /// Helper function to determine if we're clamped against the min or max limit + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:160 + ///
+ /// static bool sDistanceToMinShorter(float inDeltaMin, float inDeltaMax) + ///
+ ///
+ public static bool DistanceToMinShorter(float deltaMin, float deltaMax) => + Jolt.PInvoke.SwingTwistConstraintPart_DistanceToMinShorter(deltaMin, deltaMax); + + /// + /// + /// Clamp twist and swing against the constraint limits, returns which parts were clamped (everything + /// assumed in constraint space) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:175 + ///
+ /// inline void ClampSwingTwist(Quat &ioSwing, Quat &ioTwist, uint &outClampedAxis) const + ///
+ ///
+ public void ClampSwingTwist(ref floatQuat swing, ref floatQuat twist, out uint clampedAxis) => + Jolt.PInvoke.SwingTwistConstraintPart_ClampSwingTwist(this, ref swing, ref twist, out clampedAxis); + + /// + /// + /// Calculate properties used during the functions below + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:337 + ///
+ /// inline void CalculateConstraintProperties(const Body &inBody1, const Body &inBody2, QuatArg inConstraintRotation, QuatArg inConstraintToWorld) + ///
+ ///
+ /// + /// + /// Calculate properties used during the functions below + /// @param inBody1 The first body that this constraint is attached to + /// @param inBody2 The second body that this constraint is attached to + /// @param inConstraintRotation The current rotation of the constraint in constraint space + /// @param inConstraintToWorld Rotates from constraint space into world space + /// + /// + public void CalculateConstraintProperties( + Body body1, + Body body2, + floatQuat constraintRotation, + floatQuat constraintToWorld + ) => + Jolt.PInvoke.SwingTwistConstraintPart_CalculateConstraintProperties( + this, + body1, + body2, + constraintRotation, + constraintToWorld + ); + + /// + /// + /// Deactivate this constraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:447 + ///
+ /// void Deactivate() + ///
+ ///
+ public void Deactivate() => Jolt.PInvoke.SwingTwistConstraintPart_Deactivate(this); + + /// + /// + /// Check if constraint is active + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:455 + ///
+ /// inline bool IsActive() const + ///
+ ///
+ public bool IsActive() => Jolt.PInvoke.SwingTwistConstraintPart_IsActive(this); + + /// + /// + /// Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:461 + ///
+ /// inline void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio) + ///
+ ///
+ public void WarmStart(Body body1, Body body2, float warmStartImpulseRatio) => + Jolt.PInvoke.SwingTwistConstraintPart_WarmStart(this, body1, body2, warmStartImpulseRatio); + + /// + /// + /// Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint + /// equation. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:469 + ///
+ /// inline bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2) + ///
+ ///
+ public bool SolveVelocityConstraint(Body body1, Body body2) => + Jolt.PInvoke.SwingTwistConstraintPart_SolveVelocityConstraint(this, body1, body2); + + /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:493 + ///
+ /// inline bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, QuatArg inConstraintRotation, QuatArg inConstraintToBody1, QuatArg inConstraintToBody2, float inBaumgarte) const + ///
+ ///
+ /// + /// + /// Iteratively update the position constraint. Makes sure C(...) = 0. + /// @param ioBody1 The first body that this constraint is attached to + /// @param ioBody2 The second body that this constraint is attached to + /// @param inConstraintRotation The current rotation of the constraint in constraint space + /// @param inConstraintToBody1 , inConstraintToBody2 Rotates from constraint space to body 1/2 space + /// @param inBaumgarte Baumgarte constant (fraction of the error to correct) + /// + /// + public bool SolvePositionConstraint( + Body body1, + Body body2, + floatQuat constraintRotation, + floatQuat constraintToBody1, + floatQuat constraintToBody2, + float baumgarte + ) => + Jolt.PInvoke.SwingTwistConstraintPart_SolvePositionConstraint( + this, + body1, + body2, + constraintRotation, + constraintToBody1, + constraintToBody2, + baumgarte + ); + + /// + /// + /// Return lagrange multiplier for swing + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:514 + ///
+ /// inline float GetTotalSwingYLambda() const + ///
+ ///
+ public float GetTotalSwingYLambda() => Jolt.PInvoke.SwingTwistConstraintPart_GetTotalSwingYLambda(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:519 + ///
+ /// inline float GetTotalSwingZLambda() const + ///
+ ///
+ public float GetTotalSwingZLambda() => Jolt.PInvoke.SwingTwistConstraintPart_GetTotalSwingZLambda(this); + + /// + /// + /// Return lagrange multiplier for twist + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:525 + ///
+ /// inline float GetTotalTwistLambda() const + ///
+ ///
+ public float GetTotalTwistLambda() => Jolt.PInvoke.SwingTwistConstraintPart_GetTotalTwistLambda(this); + + /// + /// + /// Flags to indicate which axis got clamped by ClampSwingTwist + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:152 + ///
+ /// static constexpr uint cClampedTwistMin = 1 << 0 + ///
+ ///
+ public static uint GetClampedTwistMin() => Jolt.PInvoke.SwingTwistConstraintPart_GetClampedTwistMin(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:153 + ///
+ /// static constexpr uint cClampedTwistMax = 1 << 1 + ///
+ ///
+ public static uint GetClampedTwistMax() => Jolt.PInvoke.SwingTwistConstraintPart_GetClampedTwistMax(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:154 + ///
+ /// static constexpr uint cClampedSwingYMin = 1 << 2 + ///
+ ///
+ public static uint GetClampedSwingYMin() => Jolt.PInvoke.SwingTwistConstraintPart_GetClampedSwingYMin(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:155 + ///
+ /// static constexpr uint cClampedSwingYMax = 1 << 3 + ///
+ ///
+ public static uint GetClampedSwingYMax() => Jolt.PInvoke.SwingTwistConstraintPart_GetClampedSwingYMax(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:156 + ///
+ /// static constexpr uint cClampedSwingZMin = 1 << 4 + ///
+ ///
+ public static uint GetClampedSwingZMin() => Jolt.PInvoke.SwingTwistConstraintPart_GetClampedSwingZMin(); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:157 + ///
+ /// static constexpr uint cClampedSwingZMax = 1 << 5 + ///
+ ///
+ public static uint GetClampedSwingZMax() => Jolt.PInvoke.SwingTwistConstraintPart_GetClampedSwingZMax(); + + public void Dispose() => Jolt.PInvoke.SwingTwistConstraintPart_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/SwingTwistConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/SwingTwistConstraintSettings.gen.cs new file mode 100644 index 0000000..ce13d8d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/SwingTwistConstraintSettings.gen.cs @@ -0,0 +1,539 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Swing twist constraint settings, used to create a swing twist constraint All values in this structure are + /// copied to the swing twist constraint and the settings object is no longer needed afterwards. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:20 + ///
+ /// class SwingTwistConstraintSettings final : public TwoBodyConstraintSettings + ///
+ ///
+ /// + /// + /// Swing twist constraint settings, used to create a swing twist constraint + /// All values in this structure are copied to the swing twist constraint and the settings object is no longer needed afterwards. + /// + /// This image describes the limit settings: + /// @image html Docs/SwingTwistConstraint.png + /// + /// + [InteropHandle] + public readonly partial struct SwingTwistConstraintSettings : IDisposable + { + public static SwingTwistConstraintSettings Create() => Jolt.PInvoke.SwingTwistConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + ((TwoBodyConstraintSettings)this).Create(body1, body2); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:32 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public ConstraintSpace GetSpace() => Jolt.PInvoke.SwingTwistConstraintSettings_GetSpace(this); + + /// + /// + /// This determines in which space the constraint is setup, all properties below should be in the specified + /// space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:32 + ///
+ /// EConstraintSpace mSpace = EConstraintSpace::WorldSpace + ///
+ ///
+ public void SetSpace(ConstraintSpace value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetSpace(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:35 + ///
+ /// RVec3 mPosition1 = RVec3::sZero() + ///
+ ///
+ /// + /// + /// @name Body 1 constraint reference frame (space determined by mSpace) + /// + /// + public float3 GetPosition1() => Jolt.PInvoke.SwingTwistConstraintSettings_GetPosition1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:35 + ///
+ /// RVec3 mPosition1 = RVec3::sZero() + ///
+ ///
+ /// + /// + /// @name Body 1 constraint reference frame (space determined by mSpace) + /// + /// + public void SetPosition1(float3 value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetPosition1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:36 + ///
+ /// Vec3 mTwistAxis1 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetTwistAxis1() => Jolt.PInvoke.SwingTwistConstraintSettings_GetTwistAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:36 + ///
+ /// Vec3 mTwistAxis1 = Vec3::sAxisX() + ///
+ ///
+ public void SetTwistAxis1(float3 value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetTwistAxis1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:37 + ///
+ /// Vec3 mPlaneAxis1 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetPlaneAxis1() => Jolt.PInvoke.SwingTwistConstraintSettings_GetPlaneAxis1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:37 + ///
+ /// Vec3 mPlaneAxis1 = Vec3::sAxisY() + ///
+ ///
+ public void SetPlaneAxis1(float3 value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetPlaneAxis1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:40 + ///
+ /// RVec3 mPosition2 = RVec3::sZero() + ///
+ ///
+ /// + /// + /// @name Body 2 constraint reference frame (space determined by mSpace) + /// + /// + public float3 GetPosition2() => Jolt.PInvoke.SwingTwistConstraintSettings_GetPosition2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:40 + ///
+ /// RVec3 mPosition2 = RVec3::sZero() + ///
+ ///
+ /// + /// + /// @name Body 2 constraint reference frame (space determined by mSpace) + /// + /// + public void SetPosition2(float3 value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetPosition2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:41 + ///
+ /// Vec3 mTwistAxis2 = Vec3::sAxisX() + ///
+ ///
+ public float3 GetTwistAxis2() => Jolt.PInvoke.SwingTwistConstraintSettings_GetTwistAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:41 + ///
+ /// Vec3 mTwistAxis2 = Vec3::sAxisX() + ///
+ ///
+ public void SetTwistAxis2(float3 value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetTwistAxis2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:42 + ///
+ /// Vec3 mPlaneAxis2 = Vec3::sAxisY() + ///
+ ///
+ public float3 GetPlaneAxis2() => Jolt.PInvoke.SwingTwistConstraintSettings_GetPlaneAxis2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:42 + ///
+ /// Vec3 mPlaneAxis2 = Vec3::sAxisY() + ///
+ ///
+ public void SetPlaneAxis2(float3 value) => Jolt.PInvoke.SwingTwistConstraintSettings_SetPlaneAxis2(this, value); + + /// + /// + /// The type of swing constraint that we want to use. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:45 + ///
+ /// ESwingType mSwingType = ESwingType::Cone + ///
+ ///
+ public SwingType GetSwingType() => Jolt.PInvoke.SwingTwistConstraintSettings_GetSwingType(this); + + /// + /// + /// The type of swing constraint that we want to use. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:45 + ///
+ /// ESwingType mSwingType = ESwingType::Cone + ///
+ ///
+ public void SetSwingType(SwingType value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetSwingType(this, value); + + /// + /// + /// See image at Detailed Description. Angle in radians. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:48 + ///
+ /// float mNormalHalfConeAngle = 0.0f + ///
+ ///
+ /// + /// + /// @name Swing rotation limits + /// + /// + public float GetNormalHalfConeAngle() => Jolt.PInvoke.SwingTwistConstraintSettings_GetNormalHalfConeAngle(this); + + /// + /// + /// See image at Detailed Description. Angle in radians. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:48 + ///
+ /// float mNormalHalfConeAngle = 0.0f + ///
+ ///
+ /// + /// + /// @name Swing rotation limits + /// + /// + public void SetNormalHalfConeAngle(float value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetNormalHalfConeAngle(this, value); + + /// + /// + /// See image at Detailed Description. Angle in radians. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:49 + ///
+ /// float mPlaneHalfConeAngle = 0.0f + ///
+ ///
+ public float GetPlaneHalfConeAngle() => Jolt.PInvoke.SwingTwistConstraintSettings_GetPlaneHalfConeAngle(this); + + /// + /// + /// See image at Detailed Description. Angle in radians. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:49 + ///
+ /// float mPlaneHalfConeAngle = 0.0f + ///
+ ///
+ public void SetPlaneHalfConeAngle(float value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetPlaneHalfConeAngle(this, value); + + /// + /// + /// See image at Detailed Description. Angle in radians. Should be \f$\in [-\pi, \pi]\f$. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:52 + ///
+ /// float mTwistMinAngle = 0.0f + ///
+ ///
+ /// + /// + /// @name Twist rotation limits + /// + /// + public float GetTwistMinAngle() => Jolt.PInvoke.SwingTwistConstraintSettings_GetTwistMinAngle(this); + + /// + /// + /// See image at Detailed Description. Angle in radians. Should be \f$\in [-\pi, \pi]\f$. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:52 + ///
+ /// float mTwistMinAngle = 0.0f + ///
+ ///
+ /// + /// + /// @name Twist rotation limits + /// + /// + public void SetTwistMinAngle(float value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetTwistMinAngle(this, value); + + /// + /// + /// See image at Detailed Description. Angle in radians. Should be \f$\in [-\pi, \pi]\f$. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:53 + ///
+ /// float mTwistMaxAngle = 0.0f + ///
+ ///
+ public float GetTwistMaxAngle() => Jolt.PInvoke.SwingTwistConstraintSettings_GetTwistMaxAngle(this); + + /// + /// + /// See image at Detailed Description. Angle in radians. Should be \f$\in [-\pi, \pi]\f$. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:53 + ///
+ /// float mTwistMaxAngle = 0.0f + ///
+ ///
+ public void SetTwistMaxAngle(float value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetTwistMaxAngle(this, value); + + /// + /// + /// Maximum amount of torque (N m) to apply as friction when the constraint is not powered by a motor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:56 + ///
+ /// float mMaxFrictionTorque = 0.0f + ///
+ ///
+ /// + /// + /// @name Friction + /// + /// + public float GetMaxFrictionTorque() => Jolt.PInvoke.SwingTwistConstraintSettings_GetMaxFrictionTorque(this); + + /// + /// + /// Maximum amount of torque (N m) to apply as friction when the constraint is not powered by a motor + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:56 + ///
+ /// float mMaxFrictionTorque = 0.0f + ///
+ ///
+ /// + /// + /// @name Friction + /// + /// + public void SetMaxFrictionTorque(float value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetMaxFrictionTorque(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:59 + ///
+ /// MotorSettings mSwingMotorSettings + ///
+ ///
+ /// + /// + /// @name In case the constraint is powered, this determines the motor settings around the swing and twist + /// axis + /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MotorSettings GetSwingMotorSettings() => + Jolt.PInvoke.SwingTwistConstraintSettings_GetSwingMotorSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:59 + ///
+ /// MotorSettings mSwingMotorSettings + ///
+ ///
+ /// + /// + /// @name In case the constraint is powered, this determines the motor settings around the swing and twist + /// axis + /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetSwingMotorSettings(MotorSettings value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetSwingMotorSettings(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:60 + ///
+ /// MotorSettings mTwistMotorSettings + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public MotorSettings GetTwistMotorSettings() => + Jolt.PInvoke.SwingTwistConstraintSettings_GetTwistMotorSettings(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SwingTwistConstraint.h:60 + ///
+ /// MotorSettings mTwistMotorSettings + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetTwistMotorSettings(MotorSettings value) => + Jolt.PInvoke.SwingTwistConstraintSettings_SetTwistMotorSettings(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator TwoBodyConstraintSettings(SwingTwistConstraintSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ConstraintSettings(SwingTwistConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TaperedCapsuleShape.gen.cs b/Brutal.Jolt/Generated/Classes/TaperedCapsuleShape.gen.cs new file mode 100644 index 0000000..1cea022 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TaperedCapsuleShape.gen.cs @@ -0,0 +1,380 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A capsule with different top and bottom radii + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:42 + ///
+ /// class TaperedCapsuleShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct TaperedCapsuleShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:48 + ///
+ /// TaperedCapsuleShape() + ///
+ ///
+ public static TaperedCapsuleShape Create() => Jolt.PInvoke.TaperedCapsuleShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:49 + ///
+ /// TaperedCapsuleShape(const TaperedCapsuleShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static TaperedCapsuleShape Create(TaperedCapsuleShapeSettings settings) + { + var _handle = Jolt.PInvoke.TaperedCapsuleShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Get top radius of the tapered capsule + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:52 + ///
+ /// inline float GetTopRadius() const + ///
+ ///
+ public float GetTopRadius() => Jolt.PInvoke.TaperedCapsuleShape_GetTopRadius(this); + + /// + /// + /// Get bottom radius of the tapered capsule + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:55 + ///
+ /// inline float GetBottomRadius() const + ///
+ ///
+ public float GetBottomRadius() => Jolt.PInvoke.TaperedCapsuleShape_GetBottomRadius(this); + + /// + /// + /// Get half height between the top and bottom sphere center + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:58 + ///
+ /// inline float GetHalfHeight() const + ///
+ ///
+ public float GetHalfHeight() => Jolt.PInvoke.TaperedCapsuleShape_GetHalfHeight(this); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:109 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.TaperedCapsuleShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(TaperedCapsuleShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(TaperedCapsuleShape value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TaperedCapsuleShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/TaperedCapsuleShapeSettings.gen.cs new file mode 100644 index 0000000..2fe9297 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TaperedCapsuleShapeSettings.gen.cs @@ -0,0 +1,202 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a TaperedCapsuleShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:15 + ///
+ /// class TaperedCapsuleShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct TaperedCapsuleShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:21 + ///
+ /// TaperedCapsuleShapeSettings() = default + ///
+ ///
+ public static TaperedCapsuleShapeSettings Create() => Jolt.PInvoke.TaperedCapsuleShapeSettings_Create(); + + /// + /// + /// Create a tapered capsule centered around the origin with one sphere cap at (0, + /// -inHalfHeightOfTaperedCylinder, 0) with radius inBottomRadius and the other at (0, + /// inHalfHeightOfTaperedCylinder, 0) with radius inTopRadius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:24 + ///
+ /// TaperedCapsuleShapeSettings(float inHalfHeightOfTaperedCylinder, float inTopRadius, float inBottomRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static TaperedCapsuleShapeSettings Create( + float halfHeightOfTaperedCylinder, + float topRadius, + float bottomRadius, + PhysicsMaterial material = default + ) => + Jolt.PInvoke.TaperedCapsuleShapeSettings_Create_2( + halfHeightOfTaperedCylinder, + topRadius, + bottomRadius, + material + ); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + /// + /// Check if the settings are valid + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:27 + ///
+ /// bool IsValid() const + ///
+ ///
+ public bool IsValid() => Jolt.PInvoke.TaperedCapsuleShapeSettings_IsValid(this); + + /// + /// + /// Checks if the settings of this tapered capsule make this shape a sphere + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:30 + ///
+ /// bool IsSphere() const + ///
+ ///
+ public bool IsSphere() => Jolt.PInvoke.TaperedCapsuleShapeSettings_IsSphere(this); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:36 + ///
+ /// float mHalfHeightOfTaperedCylinder = 0.0f + ///
+ ///
+ public float GetHalfHeightOfTaperedCylinder() => + Jolt.PInvoke.TaperedCapsuleShapeSettings_GetHalfHeightOfTaperedCylinder(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:36 + ///
+ /// float mHalfHeightOfTaperedCylinder = 0.0f + ///
+ ///
+ public void SetHalfHeightOfTaperedCylinder(float value) => + Jolt.PInvoke.TaperedCapsuleShapeSettings_SetHalfHeightOfTaperedCylinder(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:37 + ///
+ /// float mTopRadius = 0.0f + ///
+ ///
+ public float GetTopRadius() => Jolt.PInvoke.TaperedCapsuleShapeSettings_GetTopRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:37 + ///
+ /// float mTopRadius = 0.0f + ///
+ ///
+ public void SetTopRadius(float value) => Jolt.PInvoke.TaperedCapsuleShapeSettings_SetTopRadius(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:38 + ///
+ /// float mBottomRadius = 0.0f + ///
+ ///
+ public float GetBottomRadius() => Jolt.PInvoke.TaperedCapsuleShapeSettings_GetBottomRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h:38 + ///
+ /// float mBottomRadius = 0.0f + ///
+ ///
+ public void SetBottomRadius(float value) => + Jolt.PInvoke.TaperedCapsuleShapeSettings_SetBottomRadius(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(TaperedCapsuleShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(TaperedCapsuleShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TaperedCylinderShape.gen.cs b/Brutal.Jolt/Generated/Classes/TaperedCylinderShape.gen.cs new file mode 100644 index 0000000..697a060 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TaperedCylinderShape.gen.cs @@ -0,0 +1,393 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A cylinder with different top and bottom radii + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:35 + ///
+ /// class TaperedCylinderShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct TaperedCylinderShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:41 + ///
+ /// TaperedCylinderShape() + ///
+ ///
+ public static TaperedCylinderShape Create() => Jolt.PInvoke.TaperedCylinderShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:42 + ///
+ /// TaperedCylinderShape(const TaperedCylinderShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static TaperedCylinderShape Create(TaperedCylinderShapeSettings settings) + { + var _handle = Jolt.PInvoke.TaperedCylinderShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Get top radius of the tapered cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:45 + ///
+ /// inline float GetTopRadius() const + ///
+ ///
+ public float GetTopRadius() => Jolt.PInvoke.TaperedCylinderShape_GetTopRadius(this); + + /// + /// + /// Get bottom radius of the tapered cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:48 + ///
+ /// inline float GetBottomRadius() const + ///
+ ///
+ public float GetBottomRadius() => Jolt.PInvoke.TaperedCylinderShape_GetBottomRadius(this); + + /// + /// + /// Get convex radius of the tapered cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:51 + ///
+ /// inline float GetConvexRadius() const + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.TaperedCylinderShape_GetConvexRadius(this); + + /// + /// + /// Get half height of the tapered cylinder + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:54 + ///
+ /// inline float GetHalfHeight() const + ///
+ ///
+ public float GetHalfHeight() => Jolt.PInvoke.TaperedCylinderShape_GetHalfHeight(this); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:110 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.TaperedCylinderShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(TaperedCylinderShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(TaperedCylinderShape value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TaperedCylinderShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/TaperedCylinderShapeSettings.gen.cs new file mode 100644 index 0000000..df91cc3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TaperedCylinderShapeSettings.gen.cs @@ -0,0 +1,196 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a TaperedCylinderShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:13 + ///
+ /// class TaperedCylinderShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct TaperedCylinderShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:19 + ///
+ /// TaperedCylinderShapeSettings() = default + ///
+ ///
+ public static TaperedCylinderShapeSettings Create() => Jolt.PInvoke.TaperedCylinderShapeSettings_Create(); + + /// + /// + /// Create a tapered cylinder centered around the origin with bottom at (0, -inHalfHeightOfTaperedCylinder, + /// 0) with radius inBottomRadius and top at (0, inHalfHeightOfTaperedCylinder, 0) with radius inTopRadius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:22 + ///
+ /// TaperedCylinderShapeSettings(float inHalfHeightOfTaperedCylinder, float inTopRadius, float inBottomRadius, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static TaperedCylinderShapeSettings Create( + float halfHeightOfTaperedCylinder, + float topRadius, + float bottomRadius, + float convexRadius = 0.05f, + PhysicsMaterial material = default + ) => + Jolt.PInvoke.TaperedCylinderShapeSettings_Create_2( + halfHeightOfTaperedCylinder, + topRadius, + bottomRadius, + convexRadius, + material + ); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:28 + ///
+ /// float mHalfHeight = 0.0f + ///
+ ///
+ public float GetHalfHeight() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetHalfHeight(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:28 + ///
+ /// float mHalfHeight = 0.0f + ///
+ ///
+ public void SetHalfHeight(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetHalfHeight(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:29 + ///
+ /// float mTopRadius = 0.0f + ///
+ ///
+ public float GetTopRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetTopRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:29 + ///
+ /// float mTopRadius = 0.0f + ///
+ ///
+ public void SetTopRadius(float value) => Jolt.PInvoke.TaperedCylinderShapeSettings_SetTopRadius(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:30 + ///
+ /// float mBottomRadius = 0.0f + ///
+ ///
+ public float GetBottomRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetBottomRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:30 + ///
+ /// float mBottomRadius = 0.0f + ///
+ ///
+ public void SetBottomRadius(float value) => + Jolt.PInvoke.TaperedCylinderShapeSettings_SetBottomRadius(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:31 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.TaperedCylinderShapeSettings_GetConvexRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TaperedCylinderShape.h:31 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public void SetConvexRadius(float value) => + Jolt.PInvoke.TaperedCylinderShapeSettings_SetConvexRadius(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(TaperedCylinderShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(TaperedCylinderShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TempAllocator.gen.cs b/Brutal.Jolt/Generated/Classes/TempAllocator.gen.cs new file mode 100644 index 0000000..200c2a3 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TempAllocator.gen.cs @@ -0,0 +1,68 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Allocator for temporary allocations. This allocator works as a stack: The blocks must always be freed in the + /// reverse order as they are allocated. Note that allocations and frees can take place from different threads, + /// but the order is guaranteed though job dependencies, so it is not needed to use any form of locking. + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:15 + ///
+ /// class TempAllocator : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct TempAllocator + { + /// + /// + /// Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:27 + ///
+ /// virtual void * Allocate(uint inSize) = 0 + ///
+ ///
+ public unsafe Ptr Allocate(ByteSize size) => Jolt.PInvoke.TempAllocator_Allocate(this, (uint)size); + + /// + /// + /// Frees inSize bytes of memory located at inAddress + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:30 + ///
+ /// virtual void Free(void *inAddress, uint inSize) = 0 + ///
+ ///
+ public unsafe void Free(Ptr address, ByteSize size) => + Jolt.PInvoke.TempAllocator_Free(this, address, (uint)size); + + /// + /// + /// If this allocator needs to fall back to aligned allocations because JPH_RVECTOR_ALIGNMENT is bigger than + /// the platform default + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:21 + ///
+ /// static constexpr bool needs_aligned_allocate = JPH_RVECTOR_ALIGNMENT > JPH_DEFAULT_ALLOCATE_ALIGNMENT + ///
+ ///
+ public static bool GetNeeds_aligned_allocate() => Jolt.PInvoke.TempAllocator_GetNeeds_aligned_allocate(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TempAllocatorImpl.gen.cs b/Brutal.Jolt/Generated/Classes/TempAllocatorImpl.gen.cs new file mode 100644 index 0000000..0deb5e1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TempAllocatorImpl.gen.cs @@ -0,0 +1,140 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Default implementation of the temp allocator that allocates a large block through malloc upfront + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:34 + ///
+ /// class TempAllocatorImpl final : public TempAllocator + ///
+ ///
+ [InteropHandle] + public readonly partial struct TempAllocatorImpl : IDisposable + { + /// + /// + /// Constructs the allocator with a maximum allocatable size of inSize + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:40 + ///
+ /// explicit TempAllocatorImpl(size_t inSize) + ///
+ ///
+ public static TempAllocatorImpl Create(nuint size) => Jolt.PInvoke.TempAllocatorImpl_Create(size); + + /// + /// + /// See: TempAllocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:59 + ///
+ /// virtual void * Allocate(uint inSize) override + ///
+ ///
+ public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorImpl_Allocate(this, size); + + /// + /// + /// See: TempAllocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:80 + ///
+ /// virtual void Free(void *inAddress, uint inSize) override + ///
+ ///
+ public unsafe void Free(Ptr address, uint size) => Jolt.PInvoke.TempAllocatorImpl_Free(this, address, size); + + /// + /// + /// Check if no allocations have been made + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:98 + ///
+ /// bool IsEmpty() const + ///
+ ///
+ public bool IsEmpty() => Jolt.PInvoke.TempAllocatorImpl_IsEmpty(this); + + /// + /// + /// Get the total size of the fixed buffer + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:104 + ///
+ /// size_t GetSize() const + ///
+ ///
+ public ByteSize GetSize() => (ByteSize)Jolt.PInvoke.TempAllocatorImpl_GetSize(this); + + /// + /// + /// Get current usage in bytes of the buffer + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:110 + ///
+ /// size_t GetUsage() const + ///
+ ///
+ public ByteSize GetUsage() => (ByteSize)Jolt.PInvoke.TempAllocatorImpl_GetUsage(this); + + /// + /// + /// Check if an allocation of inSize can be made in this fixed buffer allocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:116 + ///
+ /// bool CanAllocate(uint inSize) const + ///
+ ///
+ public bool CanAllocate(uint size) => Jolt.PInvoke.TempAllocatorImpl_CanAllocate(this, size); + + /// + /// + /// Check if memory block at inAddress is owned by this allocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:122 + ///
+ /// bool OwnsMemory(const void *inAddress) const + ///
+ ///
+ public unsafe bool OwnsMemory(Ptr address) => Jolt.PInvoke.TempAllocatorImpl_OwnsMemory(this, address); + + public static implicit operator TempAllocator(TempAllocatorImpl value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.TempAllocatorImpl_Destroy(this); + + /// + public unsafe Ptr Allocate(ByteSize size) => ((TempAllocator)this).Allocate(size); + + /// + public unsafe void Free(Ptr address, ByteSize size) => ((TempAllocator)this).Free(address, size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TempAllocatorImplWithMallocFallback.gen.cs b/Brutal.Jolt/Generated/Classes/TempAllocatorImplWithMallocFallback.gen.cs new file mode 100644 index 0000000..8bda914 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TempAllocatorImplWithMallocFallback.gen.cs @@ -0,0 +1,78 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of the TempAllocator that tries to allocate from a large preallocated block, but falls back + /// to malloc when it is exhausted + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:168 + ///
+ /// class TempAllocatorImplWithMallocFallback final : public TempAllocator + ///
+ ///
+ [InteropHandle] + public readonly partial struct TempAllocatorImplWithMallocFallback : IDisposable + { + /// + /// + /// Constructs the allocator with an initial fixed block if inSize + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:174 + ///
+ /// explicit TempAllocatorImplWithMallocFallback(uint inSize) + ///
+ ///
+ public static TempAllocatorImplWithMallocFallback Create(uint size) => + Jolt.PInvoke.TempAllocatorImplWithMallocFallback_Create(size); + + /// + /// + /// See: TempAllocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:180 + ///
+ /// virtual void * Allocate(uint inSize) override + ///
+ ///
+ public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorImplWithMallocFallback_Allocate(this, size); + + /// + /// + /// See: TempAllocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:189 + ///
+ /// virtual void Free(void *inAddress, uint inSize) override + ///
+ ///
+ public unsafe void Free(Ptr address, uint size) => + Jolt.PInvoke.TempAllocatorImplWithMallocFallback_Free(this, address, size); + + public static implicit operator TempAllocator(TempAllocatorImplWithMallocFallback value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.TempAllocatorImplWithMallocFallback_Destroy(this); + + /// + public unsafe Ptr Allocate(ByteSize size) => ((TempAllocator)this).Allocate(size); + + /// + public unsafe void Free(Ptr address, ByteSize size) => ((TempAllocator)this).Free(address, size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs b/Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs new file mode 100644 index 0000000..1047efb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs @@ -0,0 +1,65 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Implementation of the TempAllocator that just falls back to malloc/free Note: This can be quite slow when + /// running in the debugger as large memory blocks need to be initialized with 0xcd + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:135 + ///
+ /// class TempAllocatorMalloc final : public TempAllocator + ///
+ ///
+ [InteropHandle] + public readonly partial struct TempAllocatorMalloc : IDisposable + { + public static TempAllocatorMalloc Create() => Jolt.PInvoke.TempAllocatorMalloc_Create(); + + /// + /// + /// See: TempAllocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:141 + ///
+ /// virtual void * Allocate(uint inSize) override + ///
+ ///
+ public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorMalloc_Allocate(this, size); + + /// + /// + /// See: TempAllocator + /// + /// + /// C++: + /// Jolt/Core/TempAllocator.h:155 + ///
+ /// virtual void Free(void *inAddress, uint inSize) override + ///
+ ///
+ public unsafe void Free(Ptr address, uint size) => Jolt.PInvoke.TempAllocatorMalloc_Free(this, address, size); + + public static implicit operator TempAllocator(TempAllocatorMalloc value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.TempAllocatorMalloc_Destroy(this); + + /// + public unsafe Ptr Allocate(ByteSize size) => ((TempAllocator)this).Allocate(size); + + /// + public unsafe void Free(Ptr address, ByteSize size) => ((TempAllocator)this).Free(address, size); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TrackedVehicleController.gen.cs b/Brutal.Jolt/Generated/Classes/TrackedVehicleController.gen.cs new file mode 100644 index 0000000..a35de38 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TrackedVehicleController.gen.cs @@ -0,0 +1,246 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime controller class for vehicle with tank tracks + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:78 + ///
+ /// class TrackedVehicleController : public VehicleController + ///
+ ///
+ [InteropHandle] + public readonly partial struct TrackedVehicleController : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:84 + ///
+ /// TrackedVehicleController(const TrackedVehicleControllerSettings &inSettings, VehicleConstraint &inConstraint) + ///
+ ///
+ public static TrackedVehicleController Create( + TrackedVehicleControllerSettings settings, + VehicleConstraint constraint + ) => Jolt.PInvoke.TrackedVehicleController_Create(settings, constraint); + + /// + /// + /// Set input from driver + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:91 + ///
+ /// void SetDriverInput(float inForward, float inLeftRatio, float inRightRatio, float inBrake) + ///
+ ///
+ /// + /// + /// Set input from driver + /// @param inForward Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving direction and amount the gas pedal is pressed + /// @param inLeftRatio Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used for steering) + /// @param inRightRatio Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used for steering) + /// @param inBrake Value between 0 and 1 indicating how strong the brake pedal is pressed + /// + /// + public void SetDriverInput(float forward, float leftRatio, float rightRatio, float brake) => + Jolt.PInvoke.TrackedVehicleController_SetDriverInput(this, forward, leftRatio, rightRatio, brake); + + /// + /// + /// Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving + /// direction and amount the gas pedal is pressed + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:94 + ///
+ /// void SetForwardInput(float inForward) + ///
+ ///
+ public void SetForwardInput(float forward) => + Jolt.PInvoke.TrackedVehicleController_SetForwardInput(this, forward); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:95 + ///
+ /// float GetForwardInput() const + ///
+ ///
+ public float GetForwardInput() => Jolt.PInvoke.TrackedVehicleController_GetForwardInput(this); + + /// + /// + /// Value between -1 and 1 indicating an extra multiplier to the rotation rate of the left track (used for + /// steering) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:98 + ///
+ /// void SetLeftRatio(float inLeftRatio) + ///
+ ///
+ public void SetLeftRatio(float leftRatio) => + Jolt.PInvoke.TrackedVehicleController_SetLeftRatio(this, leftRatio); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:99 + ///
+ /// float GetLeftRatio() const + ///
+ ///
+ public float GetLeftRatio() => Jolt.PInvoke.TrackedVehicleController_GetLeftRatio(this); + + /// + /// + /// Value between -1 and 1 indicating an extra multiplier to the rotation rate of the right track (used for + /// steering) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:102 + ///
+ /// void SetRightRatio(float inRightRatio) + ///
+ ///
+ public void SetRightRatio(float rightRatio) => + Jolt.PInvoke.TrackedVehicleController_SetRightRatio(this, rightRatio); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:103 + ///
+ /// float GetRightRatio() const + ///
+ ///
+ public float GetRightRatio() => Jolt.PInvoke.TrackedVehicleController_GetRightRatio(this); + + /// + /// + /// Value between 0 and 1 indicating how strong the brake pedal is pressed + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:106 + ///
+ /// void SetBrakeInput(float inBrake) + ///
+ ///
+ public void SetBrakeInput(float brake) => Jolt.PInvoke.TrackedVehicleController_SetBrakeInput(this, brake); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:107 + ///
+ /// float GetBrakeInput() const + ///
+ ///
+ public float GetBrakeInput() => Jolt.PInvoke.TrackedVehicleController_GetBrakeInput(this); + + /// + /// + /// Get current engine state + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:110 + ///
+ /// const VehicleEngine & GetEngine() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleEngine GetEngine() => Jolt.PInvoke.TrackedVehicleController_GetEngine(this); + + /// + /// + /// Get current transmission state + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:116 + ///
+ /// const VehicleTransmission & GetTransmission() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleTransmission GetTransmission() => Jolt.PInvoke.TrackedVehicleController_GetTransmission(this); + + /// + /// + /// Get the tracks this vehicle has + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:122 + ///
+ /// const VehicleTracks & GetTracks() const + ///
+ ///
+ /// + /// + /// One of the 2 elements, by index. The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleTrack GetTracks(uint index) + { + if (index >= 2) + throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below 2."); + return Jolt.PInvoke.TrackedVehicleController_GetTracks(this, index); + } + + /// + /// + /// Debug drawing of RPM meter + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:129 + ///
+ /// void SetRPMMeter(Vec3Arg inPosition, float inSize) + ///
+ ///
+ public void SetRPMMeter(float3 position, float size) => + Jolt.PInvoke.TrackedVehicleController_SetRPMMeter(this, position, size); + + /// + public VehicleControllerSettings GetSettings() => ((VehicleController)this).GetSettings(); + + public static implicit operator VehicleController(TrackedVehicleController value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.TrackedVehicleController_Destroy(this); + + /// + public VehicleConstraint GetConstraint() => ((VehicleController)this).GetConstraint(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TrackedVehicleControllerSettings.gen.cs b/Brutal.Jolt/Generated/Classes/TrackedVehicleControllerSettings.gen.cs new file mode 100644 index 0000000..8ffea22 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TrackedVehicleControllerSettings.gen.cs @@ -0,0 +1,173 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings of a vehicle with tank tracks + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:59 + ///
+ /// class TrackedVehicleControllerSettings : public VehicleControllerSettings + ///
+ ///
+ /// + /// + /// Settings of a vehicle with tank tracks + /// + /// Default settings are based around what I could find about the M1 Abrams tank. + /// Note to avoid issues with very heavy objects vs very light objects the mass of the tank should be a lot lower (say 10x) than that of a real tank. That means that the engine/brake torque is also 10x less. + /// + /// + [InteropHandle] + public readonly partial struct TrackedVehicleControllerSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:65 + ///
+ /// TrackedVehicleControllerSettings() + ///
+ ///
+ public static TrackedVehicleControllerSettings Create() => + Jolt.PInvoke.TrackedVehicleControllerSettings_Create(); + + /// + public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream); + + /// + /// + /// The properties of the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:72 + ///
+ /// VehicleEngineSettings mEngine + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public VehicleEngineSettings GetEngine() => Jolt.PInvoke.TrackedVehicleControllerSettings_GetEngine(this); + + /// + /// + /// The properties of the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:72 + ///
+ /// VehicleEngineSettings mEngine + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetEngine(VehicleEngineSettings value) => + Jolt.PInvoke.TrackedVehicleControllerSettings_SetEngine(this, value); + + /// + /// + /// The properties of the transmission (aka gear box) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:73 + ///
+ /// VehicleTransmissionSettings mTransmission + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public VehicleTransmissionSettings GetTransmission() => + Jolt.PInvoke.TrackedVehicleControllerSettings_GetTransmission(this); + + /// + /// + /// The properties of the transmission (aka gear box) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:73 + ///
+ /// VehicleTransmissionSettings mTransmission + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetTransmission(VehicleTransmissionSettings value) => + Jolt.PInvoke.TrackedVehicleControllerSettings_SetTransmission(this, value); + + /// + /// + /// List of tracks and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:74 + ///
+ /// VehicleTrackSettings mTracks[(int)ETrackSide::Num] + ///
+ ///
+ /// + /// + /// One of the 2 elements, by index. The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleTrackSettings GetTracks(uint index) + { + if (index >= 2) + throw new ArgumentOutOfRangeException(nameof(index), index, "Expected an index below 2."); + return Jolt.PInvoke.TrackedVehicleControllerSettings_GetTracks(this, index); + } + + public void AddRef() => ((VehicleControllerSettings)this).AddRef(); + + public void Release() => ((VehicleControllerSettings)this).Release(); + + public uint GetRefCount() => ((VehicleControllerSettings)this).GetRefCount(); + + public static implicit operator VehicleControllerSettings(TrackedVehicleControllerSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/TransformedShape.gen.cs b/Brutal.Jolt/Generated/Classes/TransformedShape.gen.cs new file mode 100644 index 0000000..1e3c10c --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TransformedShape.gen.cs @@ -0,0 +1,854 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Temporary data structure that contains a shape and a transform. This structure can be obtained from a body + /// (e.g. after a broad phase query) under lock protection. The lock can then be released and collision + /// detection operations can be safely performed since the class takes a reference on the shape and does not use + /// anything from the body anymore. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:25 + ///
+ /// class TransformedShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct TransformedShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:31 + ///
+ /// TransformedShape() = default + ///
+ ///
+ public static TransformedShape Create() => Jolt.PInvoke.TransformedShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:32 + ///
+ /// TransformedShape(RVec3Arg inPositionCOM, QuatArg inRotation, const Shape *inShape, const BodyID &inBodyID, const SubShapeIDCreator &inSubShapeIDCreator = SubShapeIDCreator()) + ///
+ ///
+ public static TransformedShape Create( + float3 positionCOM, + floatQuat rotation, + Shape shape, + uint bodyID, + SubShapeIDCreator subShapeIDCreator + ) => Jolt.PInvoke.TransformedShape_Create_2(positionCOM, rotation, shape, bodyID, subShapeIDCreator); + + /// + /// + /// Cast a ray and find the closest hit. Returns true if it finds a hit. Hits further than ioHit.mFraction + /// will not be considered and in this case ioHit will remain unmodified (and the function will return + /// false). Convex objects will be treated as solid (meaning if the ray starts inside, you'll get a hit + /// fraction of 0) and back face hits are returned. If you want the surface normal of the hit use + /// GetWorldSpaceSurfaceNormal(ioHit.mSubShapeID2, inRay.GetPointOnRay(ioHit.mFraction)) on this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:37 + ///
+ /// bool CastRay(const RRayCast &inRay, RayCastResult &ioHit) const + ///
+ ///
+ public bool CastRay(in RRayCast ray, ref RayCastResult hit) => + Jolt.PInvoke.TransformedShape_CastRay(this, in ray, ref hit); + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also slightly + /// slower than the CastRay function that returns only a single hit. If you want the surface normal of the + /// hit use GetWorldSpaceSurfaceNormal(collected sub shape ID, inRay.GetPointOnRay(collected fraction)) on + /// this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:41 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastRay( + in RRayCast ray, + RayCastSettings rayCastSettings, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (RayCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.TransformedShape_CastRay_2( + this, + in ray, + rayCastSettings, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also slightly + /// slower than the CastRay function that returns only a single hit. If you want the surface normal of the + /// hit use GetWorldSpaceSurfaceNormal(collected sub shape ID, inRay.GetPointOnRay(collected fraction)) on + /// this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:41 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastRayClosest( + in RRayCast ray, + RayCastSettings rayCastSettings, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => Jolt.PInvoke.TransformedShape_CastRayClosest(this, in ray, rayCastSettings, out result, shapeFilter) != 0; + + /// + /// + /// Check if inPoint is inside any shapes. For this tests all shapes are treated as if they were solid. For + /// a mesh shape, this test will only provide sensible information if the mesh is a closed manifold. For + /// each shape that collides, ioCollector will receive a hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:46 + ///
+ /// void CollidePoint(RVec3Arg inPoint, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollidePoint( + float3 point, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (CollidePointResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.TransformedShape_CollidePoint( + this, + point, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collide a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:56 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape and report any hits to ioCollector + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Collects every hit into collideshaperesults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CollideShape( + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (CollideShapeResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.TransformedShape_CollideShape( + this, + shape, + shapeScale, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Collide a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:56 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape and report any hits to ioCollector + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CollideShapeClosest( + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.TransformedShape_CollideShapeClosest( + this, + shape, + shapeScale, + in centerOfMassTransform, + collideShapeSettings, + baseOffset, + out result, + shapeFilter + ) != 0; + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:64 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM or inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Collects every hit into castshaperesults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + public unsafe uint CastShape( + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) + { + fixed (ShapeCastResult* results_fixed = results) + { + totalHits = Jolt.PInvoke.TransformedShape_CastShape( + this, + in shapeCast, + shapeCastSettings, + baseOffset, + results_fixed, + (uint)results.Length, + shapeFilter + ); + return totalHits < (uint)results.Length ? totalHits : (uint)results.Length; + } + } + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:64 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM or inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed result + /// (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + public bool CastShapeClosest( + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result, + ShapeFilter shapeFilter = default + ) => + Jolt.PInvoke.TransformedShape_CastShapeClosest( + this, + in shapeCast, + shapeCastSettings, + baseOffset, + out result, + shapeFilter + ) != 0; + + /// + /// + /// Collect the leaf transformed shapes of all leaf shapes of this shape inBox is the world space axis + /// aligned box which leaf shapes should collide with + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:68 + ///
+ /// void CollectTransformedShapes(const AABox &inBox, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Returns every shape the query collected as an owned buffer of TransformedShape: Dispose it when done. It + /// holds a reference to each shape, so the handles it hands out stay valid until then even if the bodies go + /// - but they are borrowed from the buffer, so never Dispose one. + /// + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + ShapeFilter shapeFilter = default + ) => + new NativeHandleArray( + Jolt.PInvoke.TransformedShape_CollectTransformedShapes(this, in box, shapeFilter) + ); + + /// + /// + /// To start iterating over triangles, call this function first. To get the actual triangles call + /// GetTrianglesNext. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:78 + ///
+ /// void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, RVec3Arg inBaseOffset) const + ///
+ ///
+ /// + /// + /// To start iterating over triangles, call this function first. + /// To get the actual triangles call GetTrianglesNext. + /// @param ioContext A temporary buffer and should remain untouched until the last call to GetTrianglesNext. + /// @param inBox The world space bounding in which you want to get the triangles. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inBox.GetCenter() since floats are most accurate near the origin + /// + /// + public void GetTrianglesStart(ref Shape.GetTrianglesContext context, in AABox box, float3 baseOffset) => + Jolt.PInvoke.TransformedShape_GetTrianglesStart(this, ref context, in box, baseOffset); + + /// + /// + /// Call this repeatedly to get all triangles in the box. outTriangleVertices should be large enough to hold + /// 3 * inMaxTriangleRequested entries outMaterials (if it is not null) should contain + /// inMaxTrianglesRequested entries The function returns the amount of triangles that it found (which will + /// be <= inMaxTrianglesRequested), or 0 if there are no more triangles. Note that the function can + /// return a value < inMaxTrianglesRequested and still have more triangles to process (triangles can be + /// returned in blocks) Note that the function may return triangles outside of the requested box, only + /// coarse culling is performed on the returned triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:86 + ///
+ /// int GetTrianglesNext(GetTrianglesContext &ioContext, int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials = nullptr) const + ///
+ ///
+ /// + /// + /// materials is a buffer of PhysicsMaterial handles you allocate and size; the handles the call writes into + /// it are borrowed from their owner - don't Dispose them. + /// + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => + Jolt.PInvoke.TransformedShape_GetTrianglesNext( + this, + ref context, + maxTrianglesRequested, + triangleVertices, + materials + ); + + /// + /// + /// Get/set the scale of the shape as a Vec3 + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:89 + ///
+ /// inline Vec3 GetShapeScale() const + ///
+ ///
+ public float3 GetShapeScale() => Jolt.PInvoke.TransformedShape_GetShapeScale(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:90 + ///
+ /// inline void SetShapeScale(Vec3Arg inScale) + ///
+ ///
+ public void SetShapeScale(float3 scale) => Jolt.PInvoke.TransformedShape_SetShapeScale(this, scale); + + /// + /// + /// Calculates the transform for this shape's center of mass (excluding scale) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:93 + ///
+ /// inline RMat44 GetCenterOfMassTransform() const + ///
+ ///
+ public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.TransformedShape_GetCenterOfMassTransform(this); + + /// + /// + /// Calculates the inverse of the transform for this shape's center of mass (excluding scale) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:96 + ///
+ /// inline RMat44 GetInverseCenterOfMassTransform() const + ///
+ ///
+ public float4x4 GetInverseCenterOfMassTransform() => + Jolt.PInvoke.TransformedShape_GetInverseCenterOfMassTransform(this); + + /// + /// + /// Sets the world transform (including scale) of this transformed shape (not from the center of mass but in + /// the space the shape was created) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:99 + ///
+ /// inline void SetWorldTransform(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inScale) + ///
+ ///
+ public void SetWorldTransform(float3 position, floatQuat rotation, float3 scale) => + Jolt.PInvoke.TransformedShape_SetWorldTransform(this, position, rotation, scale); + + /// + /// + /// Sets the world transform (including scale) of this transformed shape (not from the center of mass but in + /// the space the shape was created) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:107 + ///
+ /// inline void SetWorldTransform(RMat44Arg inTransform) + ///
+ ///
+ public void SetWorldTransform(in float4x4 transform) => + Jolt.PInvoke.TransformedShape_SetWorldTransform_2(this, in transform); + + /// + /// + /// Calculates the world transform including scale of this shape (not from the center of mass but in the + /// space the shape was created) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:115 + ///
+ /// inline RMat44 GetWorldTransform() const + ///
+ ///
+ public float4x4 GetWorldTransform() => Jolt.PInvoke.TransformedShape_GetWorldTransform(this); + + /// + /// + /// Get the world space bounding box for this transformed shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:123 + ///
+ /// AABox GetWorldSpaceBounds() const + ///
+ ///
+ public AABox GetWorldSpaceBounds() => Jolt.PInvoke.TransformedShape_GetWorldSpaceBounds(this); + + /// + /// + /// Make inSubShapeID relative to mShape. When mSubShapeIDCreator is not empty, this is needed in order to + /// get the correct path to the sub shape. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:126 + ///
+ /// inline SubShapeID MakeSubShapeIDRelativeToShape(const SubShapeID &inSubShapeID) const + ///
+ ///
+ public uint MakeSubShapeIDRelativeToShape(uint subShapeID) => + Jolt.PInvoke.TransformedShape_MakeSubShapeIDRelativeToShape(this, subShapeID); + + /// + /// + /// Get surface normal of a particular sub shape and its world space surface position on this body. Note: + /// When you have a CollideShapeResult or ShapeCastResult you should use -mPenetrationAxis.Normalized() as + /// contact normal as GetWorldSpaceSurfaceNormal will only return face normals (and not vertex or edge + /// normals). + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:138 + ///
+ /// inline Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const + ///
+ ///
+ public float3 GetWorldSpaceSurfaceNormal(uint subShapeID, float3 position) => + Jolt.PInvoke.TransformedShape_GetWorldSpaceSurfaceNormal(this, subShapeID, position); + + /// + /// + /// Get the vertices of the face that faces inDirection the most (includes any convex radius). Note that + /// this function can only return faces of convex shapes or triangles, which is why a sub shape ID to get to + /// that leaf must be provided. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:151 + ///
+ /// void GetSupportingFace(const SubShapeID &inSubShapeID, Vec3Arg inDirection, RVec3Arg inBaseOffset, Shape::SupportingFace &outVertices) const + ///
+ ///
+ /// + /// + /// Get the vertices of the face that faces inDirection the most (includes any convex radius). Note that this function can only return faces of + /// convex shapes or triangles, which is why a sub shape ID to get to that leaf must be provided. + /// @param inSubShapeID Sub shape ID of target shape + /// @param inDirection Direction that the face should be facing (in world space) + /// @param inBaseOffset The vertices will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM since floats are most accurate near the origin + /// @param outVertices Resulting face. Note the returned face can have a single point if the shape doesn't have polygons to return (e.g. because it's a sphere). The face will be returned in world space. + /// + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 baseOffset, + out StaticArrayVec3_32 vertices + ) => Jolt.PInvoke.TransformedShape_GetSupportingFace(this, subShapeID, direction, baseOffset, out vertices); + + /// + /// + /// Get material of a particular sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:158 + ///
+ /// inline const PhysicsMaterial *GetMaterial(const SubShapeID &inSubShapeID) const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => + Jolt.PInvoke.TransformedShape_GetMaterial(this, subShapeID); + + /// + /// + /// Get the user data of a particular sub shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:164 + ///
+ /// inline uint64 GetSubShapeUserData(const SubShapeID &inSubShapeID) const + ///
+ ///
+ public ulong GetSubShapeUserData(uint subShapeID) => + Jolt.PInvoke.TransformedShape_GetSubShapeUserData(this, subShapeID); + + /// + /// + /// Get the direct child sub shape and its transform for a sub shape ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:173 + ///
+ /// TransformedShape GetSubShapeTransformedShape(const SubShapeID &inSubShapeID, SubShapeID &outRemainder) const + ///
+ ///
+ /// + /// + /// Get the direct child sub shape and its transform for a sub shape ID. + /// @param inSubShapeID Sub shape ID that indicates the path to the leaf shape + /// @param outRemainder The remainder of the sub shape ID after removing the sub shape + /// @return Direct child sub shape and its transform, note that the body ID and sub shape ID will be invalid + /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public TransformedShape GetSubShapeTransformedShape(uint subShapeID, out uint remainder) => + Jolt.PInvoke.TransformedShape_GetSubShapeTransformedShape(this, subShapeID, out remainder); + + /// + /// + /// Helper function to return the body id from a transformed shape. If the transformed shape is null an + /// invalid body ID will be returned. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:181 + ///
+ /// inline static BodyID sGetBodyID(const TransformedShape *inTS) + ///
+ ///
+ public static uint sGetBodyID(TransformedShape ts) => Jolt.PInvoke.TransformedShape_sGetBodyID(ts); + + /// + /// + /// Center of mass world position of the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:183 + ///
+ /// RVec3 mShapePositionCOM + ///
+ ///
+ public float3 GetShapePositionCOM() => Jolt.PInvoke.TransformedShape_GetShapePositionCOM(this); + + /// + /// + /// Center of mass world position of the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:183 + ///
+ /// RVec3 mShapePositionCOM + ///
+ ///
+ public void SetShapePositionCOM(float3 value) => Jolt.PInvoke.TransformedShape_SetShapePositionCOM(this, value); + + /// + /// + /// Rotation of the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:184 + ///
+ /// Quat mShapeRotation + ///
+ ///
+ public floatQuat GetShapeRotation() => Jolt.PInvoke.TransformedShape_GetShapeRotation(this); + + /// + /// + /// Rotation of the shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:184 + ///
+ /// Quat mShapeRotation + ///
+ ///
+ public void SetShapeRotation(floatQuat value) => Jolt.PInvoke.TransformedShape_SetShapeRotation(this, value); + + /// + /// + /// The shape itself + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:185 + ///
+ /// RefConst<Shape> mShape + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public Shape GetShape() => Jolt.PInvoke.TransformedShape_GetShape(this); + + /// + /// + /// The shape itself + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:185 + ///
+ /// RefConst<Shape> mShape + ///
+ ///
+ public void SetShape(Shape value) => Jolt.PInvoke.TransformedShape_SetShape(this, value); + + /// + /// + /// Optional body ID from which this shape comes + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:187 + ///
+ /// BodyID mBodyID + ///
+ ///
+ public uint GetBodyID() => Jolt.PInvoke.TransformedShape_GetBodyID(this); + + /// + /// + /// Optional body ID from which this shape comes + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:187 + ///
+ /// BodyID mBodyID + ///
+ ///
+ public void SetBodyID(uint value) => Jolt.PInvoke.TransformedShape_SetBodyID(this, value); + + /// + /// + /// Optional sub shape ID creator for the shape (can be used when expanding compound shapes into multiple + /// transformed shapes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:188 + ///
+ /// SubShapeIDCreator mSubShapeIDCreator + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SubShapeIDCreator GetSubShapeIDCreator() => Jolt.PInvoke.TransformedShape_GetSubShapeIDCreator(this); + + /// + /// + /// Optional sub shape ID creator for the shape (can be used when expanding compound shapes into multiple + /// transformed shapes) + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:188 + ///
+ /// SubShapeIDCreator mSubShapeIDCreator + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetSubShapeIDCreator(SubShapeIDCreator value) => + Jolt.PInvoke.TransformedShape_SetSubShapeIDCreator(this, value); + + public void Dispose() => Jolt.PInvoke.TransformedShape_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TriangleShape.gen.cs b/Brutal.Jolt/Generated/Classes/TriangleShape.gen.cs new file mode 100644 index 0000000..c997d70 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TriangleShape.gen.cs @@ -0,0 +1,408 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A single triangle, not the most efficient way of creating a world filled with triangles but can be used as a + /// query shape for example. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:34 + ///
+ /// class TriangleShape final : public ConvexShape + ///
+ ///
+ [InteropHandle] + public readonly partial struct TriangleShape : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:40 + ///
+ /// TriangleShape() + ///
+ ///
+ public static TriangleShape Create() => Jolt.PInvoke.TriangleShape_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:41 + ///
+ /// TriangleShape(const TriangleShapeSettings &inSettings, ShapeResult &outResult) + ///
+ ///
+ public static TriangleShape Create(TriangleShapeSettings settings) + { + var _handle = Jolt.PInvoke.TriangleShape_Create_2(settings); + if (_handle.IsNull()) + throw JoltException.FromLastError(); + return _handle; + } + + /// + /// + /// Create a triangle with points (inV1, inV2, inV3) (counter clockwise) and convex radius inConvexRadius. + /// Note that the convex radius is currently only used for shape vs shape collision, for all other purposes + /// the triangle is infinitely thin. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:45 + ///
+ /// TriangleShape(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, float inConvexRadius = 0.0f, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static TriangleShape Create( + float3 v1, + float3 v2, + float3 v3, + float convexRadius = 0f, + PhysicsMaterial material = default + ) => Jolt.PInvoke.TriangleShape_Create_3(v1, v2, v3, convexRadius, material); + + /// + /// + /// Get the vertices of the triangle + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:48 + ///
+ /// inline Vec3 GetVertex1() const + ///
+ ///
+ public float3 GetVertex1() => Jolt.PInvoke.TriangleShape_GetVertex1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:49 + ///
+ /// inline Vec3 GetVertex2() const + ///
+ ///
+ public float3 GetVertex2() => Jolt.PInvoke.TriangleShape_GetVertex2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:50 + ///
+ /// inline Vec3 GetVertex3() const + ///
+ ///
+ public float3 GetVertex3() => Jolt.PInvoke.TriangleShape_GetVertex3(this); + + /// + /// + /// Convex radius + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:53 + ///
+ /// float GetConvexRadius() const + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.TriangleShape_GetConvexRadius(this); + + /// + public AABox GetLocalBounds() => ((Shape)this).GetLocalBounds(); + + /// + public AABox GetWorldSpaceBounds(in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public float GetInnerRadius() => ((Shape)this).GetInnerRadius(); + + /// + public MassProperties GetMassProperties() => ((Shape)this).GetMassProperties(); + + /// + public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => + ((Shape)this).GetSurfaceNormal(subShapeID, localSurfacePosition); + + /// + public void GetSupportingFace( + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ) => ((Shape)this).GetSupportingFace(subShapeID, direction, scale, in centerOfMassTransform, out vertices); + + /// + public void GetSubmergedVolume( + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ) => + ((Shape)this).GetSubmergedVolume( + in centerOfMassTransform, + scale, + in surface, + out totalVolume, + out submergedVolume, + out centerOfBuoyancy, + baseOffset + ); + + /// + public void Draw( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool useMaterialColors, + bool drawWireframe + ) => ((Shape)this).Draw(renderer, in centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); + + /// + public bool CastRay(in RayCast ray, SubShapeIDCreator subShapeIDCreator, ref RayCastResult hit) => + ((Shape)this).CastRay(in ray, subShapeIDCreator, ref hit); + + /// + public unsafe uint CastRay( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRay(in ray, rayCastSettings, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public bool CastRayClosest( + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CastRayClosest(in ray, rayCastSettings, subShapeIDCreator, out result, shapeFilter); + + /// + public unsafe uint CollidePoint( + float3 point, + SubShapeIDCreator subShapeIDCreator, + Span results, + out uint totalHits, + ShapeFilter shapeFilter = default + ) => ((Shape)this).CollidePoint(point, subShapeIDCreator, results, out totalHits, shapeFilter); + + /// + public void CollideSoftBodyVertices( + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ) => + ((Shape)this).CollideSoftBodyVertices( + in centerOfMassTransform, + scale, + vertices, + numVertices, + collidingShapeIndex + ); + + /// + public void GetTrianglesStart( + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ) => ((Shape)this).GetTrianglesStart(ref context, in box, positionCOM, rotation, scale); + + /// + public unsafe int GetTrianglesNext( + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + Ptr triangleVertices, + Ptr materials = default + ) => ((Shape)this).GetTrianglesNext(ref context, maxTrianglesRequested, triangleVertices, materials); + + /// + public void SaveBinaryState(StreamOut stream) => ((Shape)this).SaveBinaryState(stream); + + /// + public Shape.Stats GetStats() => ((Shape)this).GetStats(); + + /// + public float GetVolume() => ((Shape)this).GetVolume(); + + /// + public bool IsValidScale(float3 scale) => ((Shape)this).IsValidScale(scale); + + /// + public float3 MakeScaleValid(float3 scale) => ((Shape)this).MakeScaleValid(scale); + + /// + /// + /// Register shape functions with the registry + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:117 + ///
+ /// static void sRegister() + ///
+ ///
+ public static void Register() => Jolt.PInvoke.TriangleShape_Register(); + + public void AddRef() => ((Shape)this).AddRef(); + + public void Release() => ((Shape)this).Release(); + + public uint GetRefCount() => ((Shape)this).GetRefCount(); + + public static implicit operator ConvexShape(TriangleShape value) => + Unsafe.BitCast(value); + + public static implicit operator Shape(TriangleShape value) => Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShape)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial material) => ((ConvexShape)this).SetMaterial(material); + + /// + public void SetDensity(float density) => ((ConvexShape)this).SetDensity(density); + + /// + public float GetDensity() => ((ConvexShape)this).GetDensity(); + + /// + public ShapeType GetShapeType() => ((Shape)this).GetShapeType(); + + /// + public ShapeSubType GetSubType() => ((Shape)this).GetSubType(); + + /// + public ulong GetUserData() => ((Shape)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Shape)this).SetUserData(userData); + + /// + public bool MustBeStatic() => ((Shape)this).MustBeStatic(); + + /// + public float3 GetCenterOfMass() => ((Shape)this).GetCenterOfMass(); + + /// + public uint GetSubShapeIDBitsRecursive() => ((Shape)this).GetSubShapeIDBitsRecursive(); + + /// + public AABox GetWorldSpaceBounds(in double4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).GetWorldSpaceBounds(in centerOfMassTransform, scale); + + /// + public Shape GetLeafShape(uint subShapeID, out uint remainder) => + ((Shape)this).GetLeafShape(subShapeID, out remainder); + + /// + public PhysicsMaterial GetMaterial(uint subShapeID) => ((Shape)this).GetMaterial(subShapeID); + + /// + public ulong GetSubShapeUserData(uint subShapeID) => ((Shape)this).GetSubShapeUserData(subShapeID); + + /// + public TransformedShape GetSubShapeTransformedShape( + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ) => ((Shape)this).GetSubShapeTransformedShape(subShapeID, positionCOM, rotation, scale, out remainder); + + /// + public void DrawGetSupportFunction( + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + bool drawSupportDirection + ) => + ((Shape)this).DrawGetSupportFunction( + renderer, + in centerOfMassTransform, + scale, + color, + drawSupportDirection + ); + + /// + public void DrawGetSupportingFace(DebugRenderer renderer, in float4x4 centerOfMassTransform, float3 scale) => + ((Shape)this).DrawGetSupportingFace(renderer, in centerOfMassTransform, scale); + + /// + public NativeHandleArray CollectTransformedShapes( + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ) => + ((Shape)this).CollectTransformedShapes( + in box, + positionCOM, + rotation, + scale, + subShapeIDCreator, + shapeFilter + ); + + /// + public NativeHandleArray TransformShape(in float4x4 centerOfMassTransform) => + ((Shape)this).TransformShape(in centerOfMassTransform); + + /// + public Shape ScaleShape(float3 scale) => ((Shape)this).ScaleShape(scale); + + /// + public NativeArray SaveMaterialState() => ((Shape)this).SaveMaterialState(); + + /// + public unsafe void RestoreMaterialState(ReadOnlySpan materials) => + ((Shape)this).RestoreMaterialState(materials); + + /// + public NativeArray SaveSubShapeState() => ((Shape)this).SaveSubShapeState(); + + /// + public unsafe void RestoreSubShapeState(ReadOnlySpan subShapes) => + ((Shape)this).RestoreSubShapeState(subShapes); + + /// + public void SaveWithChildren(StreamOut stream, ShapeToIDMap shapeMap, MaterialToIDMap materialMap) => + ((Shape)this).SaveWithChildren(stream, shapeMap, materialMap); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TriangleShapeSettings.gen.cs b/Brutal.Jolt/Generated/Classes/TriangleShapeSettings.gen.cs new file mode 100644 index 0000000..8a663a9 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TriangleShapeSettings.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that constructs a TriangleShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:12 + ///
+ /// class TriangleShapeSettings final : public ConvexShapeSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct TriangleShapeSettings : IDisposable + { + /// + /// + /// Default constructor for deserialization + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:18 + ///
+ /// TriangleShapeSettings() = default + ///
+ ///
+ public static TriangleShapeSettings Create() => Jolt.PInvoke.TriangleShapeSettings_Create(); + + /// + /// + /// Create a triangle with points (inV1, inV2, inV3) (counter clockwise) and convex radius inConvexRadius. + /// Note that the convex radius is currently only used for shape vs shape collision, for all other purposes + /// the triangle is infinitely thin. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:22 + ///
+ /// TriangleShapeSettings(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, float inConvexRadius = 0.0f, const PhysicsMaterial *inMaterial = nullptr) + ///
+ ///
+ public static TriangleShapeSettings Create( + float3 v1, + float3 v2, + float3 v3, + float convexRadius = 0f, + PhysicsMaterial material = default + ) => Jolt.PInvoke.TriangleShapeSettings_Create_2(v1, v2, v3, convexRadius, material); + + /// + public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); + + /// + public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:27 + ///
+ /// Vec3 mV1 + ///
+ ///
+ public float3 GetV1() => Jolt.PInvoke.TriangleShapeSettings_GetV1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:27 + ///
+ /// Vec3 mV1 + ///
+ ///
+ public void SetV1(float3 value) => Jolt.PInvoke.TriangleShapeSettings_SetV1(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:28 + ///
+ /// Vec3 mV2 + ///
+ ///
+ public float3 GetV2() => Jolt.PInvoke.TriangleShapeSettings_GetV2(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:28 + ///
+ /// Vec3 mV2 + ///
+ ///
+ public void SetV2(float3 value) => Jolt.PInvoke.TriangleShapeSettings_SetV2(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:29 + ///
+ /// Vec3 mV3 + ///
+ ///
+ public float3 GetV3() => Jolt.PInvoke.TriangleShapeSettings_GetV3(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:29 + ///
+ /// Vec3 mV3 + ///
+ ///
+ public void SetV3(float3 value) => Jolt.PInvoke.TriangleShapeSettings_SetV3(this, value); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:30 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public float GetConvexRadius() => Jolt.PInvoke.TriangleShapeSettings_GetConvexRadius(this); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/TriangleShape.h:30 + ///
+ /// float mConvexRadius = 0.0f + ///
+ ///
+ public void SetConvexRadius(float value) => Jolt.PInvoke.TriangleShapeSettings_SetConvexRadius(this, value); + + public void AddRef() => ((ShapeSettings)this).AddRef(); + + public void Release() => ((ShapeSettings)this).Release(); + + public uint GetRefCount() => ((ShapeSettings)this).GetRefCount(); + + public static implicit operator ConvexShapeSettings(TriangleShapeSettings value) => + Unsafe.BitCast(value); + + public static implicit operator ShapeSettings(TriangleShapeSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density); + + /// + public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial(); + + /// + public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value); + + /// + public float GetDensity() => ((ConvexShapeSettings)this).GetDensity(); + + /// + public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); + + /// + public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TriangleSplitter.gen.cs b/Brutal.Jolt/Generated/Classes/TriangleSplitter.gen.cs new file mode 100644 index 0000000..b909413 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TriangleSplitter.gen.cs @@ -0,0 +1,203 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A class that splits a triangle list into two parts for building a tree + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:13 + ///
+ /// class TriangleSplitter : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct TriangleSplitter + { + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:22 + ///
+ /// struct Stats + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Stats + { + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:24 + ///
+ /// const char * mSplitterName = nullptr + ///
+ ///
+ [FieldOffset(0)] + public Ptr SplitterName; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:25 + ///
+ /// int mLeafSize = 0 + ///
+ ///
+ [FieldOffset(8)] + public int LeafSize; + } + + /// + /// + /// Helper struct to indicate triangle range before and after the split + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:32 + ///
+ /// struct Range + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct Range + { + /// + /// + /// Start and end index (end = 1 beyond end) + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:45 + ///
+ /// uint mBegin + ///
+ ///
+ [FieldOffset(0)] + public uint Begin; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:46 + ///
+ /// uint mEnd + ///
+ ///
+ [FieldOffset(4)] + public uint End; + } + + /// + /// + /// Get stats of splitter + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:29 + ///
+ /// virtual void GetStats(Stats &outStats) const = 0 + ///
+ ///
+ public void GetStats(ref TriangleSplitter.Stats stats) => + Jolt.PInvoke.TriangleSplitter_GetStats(this, ref stats); + + /// + /// + /// Range of triangles to start with + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:50 + ///
+ /// Range GetInitialRange() const + ///
+ ///
+ public TriangleSplitter.Range GetInitialRange() + { + Jolt.PInvoke.TriangleSplitter_GetInitialRange(this, out var _outResult); + return _outResult; + } + + /// + /// + /// Split triangles into two groups left and right, returns false if no split could be made + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:60 + ///
+ /// virtual bool Split(const Range &inTriangles, Range &outLeft, Range &outRight) = 0 + ///
+ ///
+ /// + /// + /// Split triangles into two groups left and right, returns false if no split could be made + /// @param inTriangles The range of triangles (in mSortedTriangleIdx) to process + /// @param outLeft On return this will contain the ranges for the left subpart. mSortedTriangleIdx may have been shuffled. + /// @param outRight On return this will contain the ranges for the right subpart. mSortedTriangleIdx may have been shuffled. + /// @return Returns true when a split was found + /// + /// + public bool Split( + in TriangleSplitter.Range triangles, + ref TriangleSplitter.Range left, + ref TriangleSplitter.Range right + ) => Jolt.PInvoke.TriangleSplitter_Split(this, in triangles, ref left, ref right); + + /// + /// + /// Get the list of vertices + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:63 + ///
+ /// const VertexList & GetVertices() const + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetVertices() + { + Jolt.PInvoke.TriangleSplitter_GetVertices(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Get triangle by index + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitter.h:69 + ///
+ /// const IndexedTriangle & GetTriangle(uint inIdx) const + ///
+ ///
+ public IndexedTriangle GetTriangle(uint idx) + { + Jolt.PInvoke.TriangleSplitter_GetTriangle(this, idx, out var _inRange, out var _outResult); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of triangles." + ); + return _outResult; + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/TriangleSplitterBinning.gen.cs b/Brutal.Jolt/Generated/Classes/TriangleSplitterBinning.gen.cs new file mode 100644 index 0000000..b017be1 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TriangleSplitterBinning.gen.cs @@ -0,0 +1,188 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Binning splitter approach taken from: Realtime Ray Tracing on GPU with BVH-based Packet Traversal by + /// Johannes Gunther et al. + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:13 + ///
+ /// class TriangleSplitterBinning : public TriangleSplitter + ///
+ ///
+ [InteropHandle] + public readonly partial struct TriangleSplitterBinning : IDisposable + { + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:34 + ///
+ /// struct Bin + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 128)] + public partial struct Bin + { + /// + /// + /// Properties of this bin + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:37 + ///
+ /// AABox mBounds + ///
+ ///
+ [FieldOffset(0)] + public AABox Bounds; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:38 + ///
+ /// float mMinCentroid + ///
+ ///
+ [FieldOffset(32)] + public float MinCentroid; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:39 + ///
+ /// uint mNumTriangles + ///
+ ///
+ [FieldOffset(36)] + public uint NumTriangles; + + /// + /// + /// Accumulated data from left most / right most bin to current (including this bin) + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:42 + ///
+ /// AABox mBoundsAccumulatedLeft + ///
+ ///
+ [FieldOffset(48)] + public AABox BoundsAccumulatedLeft; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:43 + ///
+ /// AABox mBoundsAccumulatedRight + ///
+ ///
+ [FieldOffset(80)] + public AABox BoundsAccumulatedRight; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:44 + ///
+ /// uint mNumTrianglesAccumulatedLeft + ///
+ ///
+ [FieldOffset(112)] + public uint NumTrianglesAccumulatedLeft; + + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:45 + ///
+ /// uint mNumTrianglesAccumulatedRight + ///
+ ///
+ [FieldOffset(116)] + public uint NumTrianglesAccumulatedRight; + } + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterBinning.h:17 + ///
+ /// TriangleSplitterBinning(const VertexList &inVertices, const IndexedTriangleList &inTriangles, uint inMinNumBins = 8, uint inMaxNumBins = 128, uint inNumTrianglesPerBin = 6) + ///
+ ///
+ /// + /// + /// vertices is copied into a native container the object keeps; the span is only read. + /// + /// + /// triangles is copied into a native container the object keeps; the span is only read. + /// + /// + public static unsafe TriangleSplitterBinning Create( + ReadOnlySpan vertices, + ReadOnlySpan triangles, + uint minNumBins = 8, + uint maxNumBins = 128, + uint numTrianglesPerBin = 6 + ) + { + fixed (IndexedTriangle* triangles_fixed = triangles) + fixed (float3* vertices_fixed = vertices) + { + return Jolt.PInvoke.TriangleSplitterBinning_Create( + vertices_fixed, + (nuint)vertices.Length, + triangles_fixed, + (nuint)triangles.Length, + minNumBins, + maxNumBins, + numTrianglesPerBin + ); + } + } + + /// + public void GetStats(ref TriangleSplitter.Stats stats) => ((TriangleSplitter)this).GetStats(ref stats); + + /// + public bool Split( + in TriangleSplitter.Range triangles, + ref TriangleSplitter.Range left, + ref TriangleSplitter.Range right + ) => ((TriangleSplitter)this).Split(in triangles, ref left, ref right); + + public static implicit operator TriangleSplitter(TriangleSplitterBinning value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.TriangleSplitterBinning_Destroy(this); + + /// + public TriangleSplitter.Range GetInitialRange() => ((TriangleSplitter)this).GetInitialRange(); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetVertices() => ((TriangleSplitter)this).GetVertices(); + + /// + public IndexedTriangle GetTriangle(uint idx) => ((TriangleSplitter)this).GetTriangle(idx); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TriangleSplitterMean.gen.cs b/Brutal.Jolt/Generated/Classes/TriangleSplitterMean.gen.cs new file mode 100644 index 0000000..053d379 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TriangleSplitterMean.gen.cs @@ -0,0 +1,86 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Splitter using mean of axis with biggest centroid deviation + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterMean.h:12 + ///
+ /// class TriangleSplitterMean : public TriangleSplitter + ///
+ ///
+ [InteropHandle] + public readonly partial struct TriangleSplitterMean : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/TriangleSplitter/TriangleSplitterMean.h:16 + ///
+ /// TriangleSplitterMean(const VertexList &inVertices, const IndexedTriangleList &inTriangles) + ///
+ ///
+ /// + /// + /// vertices is copied into a native container the object keeps; the span is only read. + /// + /// + /// triangles is copied into a native container the object keeps; the span is only read. + /// + /// + public static unsafe TriangleSplitterMean Create( + ReadOnlySpan vertices, + ReadOnlySpan triangles + ) + { + fixed (IndexedTriangle* triangles_fixed = triangles) + fixed (float3* vertices_fixed = vertices) + { + return Jolt.PInvoke.TriangleSplitterMean_Create( + vertices_fixed, + (nuint)vertices.Length, + triangles_fixed, + (nuint)triangles.Length + ); + } + } + + /// + public void GetStats(ref TriangleSplitter.Stats stats) => ((TriangleSplitter)this).GetStats(ref stats); + + /// + public bool Split( + in TriangleSplitter.Range triangles, + ref TriangleSplitter.Range left, + ref TriangleSplitter.Range right + ) => ((TriangleSplitter)this).Split(in triangles, ref left, ref right); + + public static implicit operator TriangleSplitter(TriangleSplitterMean value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.TriangleSplitterMean_Destroy(this); + + /// + public TriangleSplitter.Range GetInitialRange() => ((TriangleSplitter)this).GetInitialRange(); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetVertices() => ((TriangleSplitter)this).GetVertices(); + + /// + public IndexedTriangle GetTriangle(uint idx) => ((TriangleSplitter)this).GetTriangle(idx); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TwoBodyConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/TwoBodyConstraint.gen.cs new file mode 100644 index 0000000..8dc48e7 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TwoBodyConstraint.gen.cs @@ -0,0 +1,191 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for all constraints that involve 2 bodies. Body1 is usually considered the parent, Body2 the + /// child. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:26 + ///
+ /// class TwoBodyConstraint : public Constraint + ///
+ ///
+ [InteropHandle] + public readonly partial struct TwoBodyConstraint : IDisposable + { + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + /// + /// Access to the connected bodies + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:44 + ///
+ /// Body * GetBody1() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body GetBody1() => Jolt.PInvoke.TwoBodyConstraint_GetBody1(this); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:45 + ///
+ /// Body * GetBody2() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body GetBody2() => Jolt.PInvoke.TwoBodyConstraint_GetBody2(this); + + /// + /// + /// Calculates the transform that transforms from constraint space to body 1 space. The first column of the + /// matrix is the primary constraint axis (e.g. the hinge axis / slider direction), second column the + /// secondary etc. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:48 + ///
+ /// virtual Mat44 GetConstraintToBody1Matrix() const = 0 + ///
+ ///
+ public float4x4 GetConstraintToBody1Matrix() => Jolt.PInvoke.TwoBodyConstraint_GetConstraintToBody1Matrix(this); + + /// + /// + /// Calculates the transform that transforms from constraint space to body 2 space. The first column of the + /// matrix is the primary constraint axis (e.g. the hinge axis / slider direction), second column the + /// secondary etc. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:51 + ///
+ /// virtual Mat44 GetConstraintToBody2Matrix() const = 0 + ///
+ ///
+ public float4x4 GetConstraintToBody2Matrix() => Jolt.PInvoke.TwoBodyConstraint_GetConstraintToBody2Matrix(this); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator Constraint(TwoBodyConstraint value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/TwoBodyConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/TwoBodyConstraintSettings.gen.cs new file mode 100644 index 0000000..ff71316 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/TwoBodyConstraintSettings.gen.cs @@ -0,0 +1,108 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for settings for all constraints that involve 2 bodies + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:15 + ///
+ /// class TwoBodyConstraintSettings : public ConstraintSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct TwoBodyConstraintSettings : IDisposable + { + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + /// + /// Create an instance of this constraint You can use Body::sFixedToWorld for inBody1 if you want to attach + /// inBody2 to the world + /// + /// + /// C++: + /// Jolt/Physics/Constraints/TwoBodyConstraint.h:22 + ///
+ /// virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const = 0 + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public TwoBodyConstraint Create(Body body1, Body body2) => + Jolt.PInvoke.TwoBodyConstraintSettings_Create(this, body1, body2); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator ConstraintSettings(TwoBodyConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleCollisionTester.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleCollisionTester.gen.cs new file mode 100644 index 0000000..d684743 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleCollisionTester.gen.cs @@ -0,0 +1,282 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that does collision detection between wheels and ground + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:19 + ///
+ /// class VehicleCollisionTester : public RefTarget<VehicleCollisionTester>, public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleCollisionTester : IDisposable + { + /// + /// + /// Object layer to use for collision detection, this is used when the filters are not overridden + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:32 + ///
+ /// ObjectLayer GetObjectLayer() const + ///
+ ///
+ public ushort GetObjectLayer() => Jolt.PInvoke.VehicleCollisionTester_GetObjectLayer(this); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:33 + ///
+ /// void SetObjectLayer(ObjectLayer inObjectLayer) + ///
+ ///
+ public void SetObjectLayer(ushort objectLayer) => + Jolt.PInvoke.VehicleCollisionTester_SetObjectLayer(this, objectLayer); + + /// + /// + /// Access to the broad phase layer filter, when set this overrides the object layer supplied in the + /// constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:36 + ///
+ /// void SetBroadPhaseLayerFilter(const BroadPhaseLayerFilter *inFilter) + ///
+ ///
+ public void SetBroadPhaseLayerFilter(BroadPhaseLayerFilter filter) => + Jolt.PInvoke.VehicleCollisionTester_SetBroadPhaseLayerFilter(this, filter); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:37 + ///
+ /// const BroadPhaseLayerFilter * GetBroadPhaseLayerFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BroadPhaseLayerFilter GetBroadPhaseLayerFilter() => + Jolt.PInvoke.VehicleCollisionTester_GetBroadPhaseLayerFilter(this); + + /// + /// + /// Access to the object layer filter, when set this overrides the object layer supplied in the constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:40 + ///
+ /// void SetObjectLayerFilter(const ObjectLayerFilter *inFilter) + ///
+ ///
+ public void SetObjectLayerFilter(ObjectLayerFilter filter) => + Jolt.PInvoke.VehicleCollisionTester_SetObjectLayerFilter(this, filter); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:41 + ///
+ /// const ObjectLayerFilter * GetObjectLayerFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public ObjectLayerFilter GetObjectLayerFilter() => + Jolt.PInvoke.VehicleCollisionTester_GetObjectLayerFilter(this); + + /// + /// + /// Access to the body filter, when set this overrides the default filter that filters out the vehicle body + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:44 + ///
+ /// void SetBodyFilter(const BodyFilter *inFilter) + ///
+ ///
+ public void SetBodyFilter(BodyFilter filter) => Jolt.PInvoke.VehicleCollisionTester_SetBodyFilter(this, filter); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:45 + ///
+ /// const BodyFilter * GetBodyFilter() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public BodyFilter GetBodyFilter() => Jolt.PInvoke.VehicleCollisionTester_GetBodyFilter(this); + + /// + /// + /// Do a collision test with the world + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:60 + ///
+ /// virtual bool Collide(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&outBody, SubShapeID &outSubShapeID, RVec3 &outContactPosition, Vec3 &outContactNormal, float &outSuspensionLength) const = 0 + ///
+ ///
+ /// + /// + /// Do a collision test with the world + /// @param inPhysicsSystem The physics system that should be tested against + /// @param inVehicleConstraint The vehicle constraint + /// @param inWheelIndex Index of the wheel that we're testing collision for + /// @param inOrigin Origin for the test, corresponds to the world space position for the suspension attachment point + /// @param inDirection Direction for the test (unit vector, world space) + /// @param inVehicleBodyID This body should be filtered out during collision detection to avoid self collisions + /// @param outBody Body that the wheel collided with + /// @param outSubShapeID Sub shape ID that the wheel collided with + /// @param outContactPosition Contact point between wheel and floor, in world space + /// @param outContactNormal Contact normal between wheel and floor, pointing away from the floor + /// @param outSuspensionLength New length of the suspension [0, inSuspensionMaxLength] + /// @return True when collision found, false if not + /// + /// + public bool Collide( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + out Body body, + out uint subShapeID, + out float3 contactPosition, + out float3 contactNormal, + out float suspensionLength + ) + { + var _result = Jolt.PInvoke.VehicleCollisionTester_Collide( + this, + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + out body, + out subShapeID, + out contactPosition, + out contactNormal, + out suspensionLength, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(wheelIndex), + wheelIndex, + "Expected an index below the number of wheels." + ); + return _result; + } + + /// + /// + /// Do a cheap contact properties prediction based on the contact properties from the last collision test + /// (provided as input parameters) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:74 + ///
+ /// virtual void PredictContactProperties(PhysicsSystem &inPhysicsSystem, const VehicleConstraint &inVehicleConstraint, uint inWheelIndex, RVec3Arg inOrigin, Vec3Arg inDirection, const BodyID &inVehicleBodyID, Body *&ioBody, SubShapeID &ioSubShapeID, RVec3 &ioContactPosition, Vec3 &ioContactNormal, float &ioSuspensionLength) const = 0 + ///
+ ///
+ /// + /// + /// Do a cheap contact properties prediction based on the contact properties from the last collision test (provided as input parameters) + /// @param inPhysicsSystem The physics system that should be tested against + /// @param inVehicleConstraint The vehicle constraint + /// @param inWheelIndex Index of the wheel that we're testing collision for + /// @param inOrigin Origin for the test, corresponds to the world space position for the suspension attachment point + /// @param inDirection Direction for the test (unit vector, world space) + /// @param inVehicleBodyID The body ID for the vehicle itself + /// @param ioBody Body that the wheel previously collided with + /// @param ioSubShapeID Sub shape ID that the wheel collided with during the last check + /// @param ioContactPosition Contact point between wheel and floor during the last check, in world space + /// @param ioContactNormal Contact normal between wheel and floor during the last check, pointing away from the floor + /// @param ioSuspensionLength New length of the suspension [0, inSuspensionMaxLength] + /// + /// + public void PredictContactProperties( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + ref Body body, + ref uint subShapeID, + ref float3 contactPosition, + ref float3 contactNormal, + ref float suspensionLength + ) + { + Jolt.PInvoke.VehicleCollisionTester_PredictContactProperties( + this, + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + ref body, + ref subShapeID, + ref contactPosition, + ref contactNormal, + ref suspensionLength, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(wheelIndex), + wheelIndex, + "Expected an index below the number of wheels." + ); + } + + public void AddRef() => Jolt.PInvoke.VehicleCollisionTester_AddRef(this); + + public void Release() => Jolt.PInvoke.VehicleCollisionTester_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.VehicleCollisionTester_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastCylinder.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastCylinder.gen.cs new file mode 100644 index 0000000..baa1c89 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastCylinder.gen.cs @@ -0,0 +1,147 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision tester that tests collision using a cylinder shape + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:128 + ///
+ /// class VehicleCollisionTesterCastCylinder : public VehicleCollisionTester + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleCollisionTesterCastCylinder : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:136 + ///
+ /// explicit VehicleCollisionTesterCastCylinder(ObjectLayer inObjectLayer, float inConvexRadiusFraction = 0.1f) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inObjectLayer Object layer to test collision with + /// @param inConvexRadiusFraction Fraction of half the wheel width (or wheel radius if it is smaller) that is used as the convex radius + /// + /// + public static VehicleCollisionTesterCastCylinder Create( + ushort objectLayer, + float convexRadiusFraction = 0.1f + ) => Jolt.PInvoke.VehicleCollisionTesterCastCylinder_Create(objectLayer, convexRadiusFraction); + + /// + public bool Collide( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + out Body body, + out uint subShapeID, + out float3 contactPosition, + out float3 contactNormal, + out float suspensionLength + ) => + ((VehicleCollisionTester)this).Collide( + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + out body, + out subShapeID, + out contactPosition, + out contactNormal, + out suspensionLength + ); + + /// + public void PredictContactProperties( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + ref Body body, + ref uint subShapeID, + ref float3 contactPosition, + ref float3 contactNormal, + ref float suspensionLength + ) => + ((VehicleCollisionTester)this).PredictContactProperties( + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + ref body, + ref subShapeID, + ref contactPosition, + ref contactNormal, + ref suspensionLength + ); + + public void AddRef() => ((VehicleCollisionTester)this).AddRef(); + + public void Release() => ((VehicleCollisionTester)this).Release(); + + public uint GetRefCount() => ((VehicleCollisionTester)this).GetRefCount(); + + public static implicit operator VehicleCollisionTester(VehicleCollisionTesterCastCylinder value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ushort GetObjectLayer() => ((VehicleCollisionTester)this).GetObjectLayer(); + + /// + public void SetObjectLayer(ushort objectLayer) => ((VehicleCollisionTester)this).SetObjectLayer(objectLayer); + + /// + public void SetBroadPhaseLayerFilter(BroadPhaseLayerFilter filter) => + ((VehicleCollisionTester)this).SetBroadPhaseLayerFilter(filter); + + /// + public BroadPhaseLayerFilter GetBroadPhaseLayerFilter() => + ((VehicleCollisionTester)this).GetBroadPhaseLayerFilter(); + + /// + public void SetObjectLayerFilter(ObjectLayerFilter filter) => + ((VehicleCollisionTester)this).SetObjectLayerFilter(filter); + + /// + public ObjectLayerFilter GetObjectLayerFilter() => ((VehicleCollisionTester)this).GetObjectLayerFilter(); + + /// + public void SetBodyFilter(BodyFilter filter) => ((VehicleCollisionTester)this).SetBodyFilter(filter); + + /// + public BodyFilter GetBodyFilter() => ((VehicleCollisionTester)this).GetBodyFilter(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastSphere.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastSphere.gen.cs new file mode 100644 index 0000000..df6eeb5 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterCastSphere.gen.cs @@ -0,0 +1,151 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision tester that tests collision using a sphere cast + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:105 + ///
+ /// class VehicleCollisionTesterCastSphere : public VehicleCollisionTester + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleCollisionTesterCastSphere : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:115 + ///
+ /// VehicleCollisionTesterCastSphere(ObjectLayer inObjectLayer, float inRadius, Vec3Arg inUp = Vec3::sAxisY(), float inMaxSlopeAngle = DegreesToRadians(80.0f)) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inObjectLayer Object layer to test collision with + /// @param inUp World space up vector, used to avoid colliding with vertical walls. + /// @param inRadius Radius of sphere + /// @param inMaxSlopeAngle Max angle (rad) that is considered for colliding wheels. This is to avoid colliding with vertical walls. + /// + /// + public static VehicleCollisionTesterCastSphere Create( + ushort objectLayer, + float radius, + float3 up, + float maxSlopeAngle = 1.3962634f + ) => Jolt.PInvoke.VehicleCollisionTesterCastSphere_Create(objectLayer, radius, up, maxSlopeAngle); + + /// + public bool Collide( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + out Body body, + out uint subShapeID, + out float3 contactPosition, + out float3 contactNormal, + out float suspensionLength + ) => + ((VehicleCollisionTester)this).Collide( + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + out body, + out subShapeID, + out contactPosition, + out contactNormal, + out suspensionLength + ); + + /// + public void PredictContactProperties( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + ref Body body, + ref uint subShapeID, + ref float3 contactPosition, + ref float3 contactNormal, + ref float suspensionLength + ) => + ((VehicleCollisionTester)this).PredictContactProperties( + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + ref body, + ref subShapeID, + ref contactPosition, + ref contactNormal, + ref suspensionLength + ); + + public void AddRef() => ((VehicleCollisionTester)this).AddRef(); + + public void Release() => ((VehicleCollisionTester)this).Release(); + + public uint GetRefCount() => ((VehicleCollisionTester)this).GetRefCount(); + + public static implicit operator VehicleCollisionTester(VehicleCollisionTesterCastSphere value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ushort GetObjectLayer() => ((VehicleCollisionTester)this).GetObjectLayer(); + + /// + public void SetObjectLayer(ushort objectLayer) => ((VehicleCollisionTester)this).SetObjectLayer(objectLayer); + + /// + public void SetBroadPhaseLayerFilter(BroadPhaseLayerFilter filter) => + ((VehicleCollisionTester)this).SetBroadPhaseLayerFilter(filter); + + /// + public BroadPhaseLayerFilter GetBroadPhaseLayerFilter() => + ((VehicleCollisionTester)this).GetBroadPhaseLayerFilter(); + + /// + public void SetObjectLayerFilter(ObjectLayerFilter filter) => + ((VehicleCollisionTester)this).SetObjectLayerFilter(filter); + + /// + public ObjectLayerFilter GetObjectLayerFilter() => ((VehicleCollisionTester)this).GetObjectLayerFilter(); + + /// + public void SetBodyFilter(BodyFilter filter) => ((VehicleCollisionTester)this).SetBodyFilter(filter); + + /// + public BodyFilter GetBodyFilter() => ((VehicleCollisionTester)this).GetBodyFilter(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterRay.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterRay.gen.cs new file mode 100644 index 0000000..ff6b0a8 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleCollisionTesterRay.gen.cs @@ -0,0 +1,149 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Collision tester that tests collision using a raycast + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:84 + ///
+ /// class VehicleCollisionTesterRay : public VehicleCollisionTester + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleCollisionTesterRay : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleCollisionTester.h:93 + ///
+ /// explicit VehicleCollisionTesterRay(ObjectLayer inObjectLayer, Vec3Arg inUp = Vec3::sAxisY(), float inMaxSlopeAngle = DegreesToRadians(80.0f)) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inObjectLayer Object layer to test collision with + /// @param inUp World space up vector, used to avoid colliding with vertical walls. + /// @param inMaxSlopeAngle Max angle (rad) that is considered for colliding wheels. This is to avoid colliding with vertical walls. + /// + /// + public static VehicleCollisionTesterRay Create( + ushort objectLayer, + float3 up, + float maxSlopeAngle = 1.3962634f + ) => Jolt.PInvoke.VehicleCollisionTesterRay_Create(objectLayer, up, maxSlopeAngle); + + /// + public bool Collide( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + out Body body, + out uint subShapeID, + out float3 contactPosition, + out float3 contactNormal, + out float suspensionLength + ) => + ((VehicleCollisionTester)this).Collide( + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + out body, + out subShapeID, + out contactPosition, + out contactNormal, + out suspensionLength + ); + + /// + public void PredictContactProperties( + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + ref Body body, + ref uint subShapeID, + ref float3 contactPosition, + ref float3 contactNormal, + ref float suspensionLength + ) => + ((VehicleCollisionTester)this).PredictContactProperties( + physicsSystem, + vehicleConstraint, + wheelIndex, + origin, + direction, + vehicleBodyID, + ref body, + ref subShapeID, + ref contactPosition, + ref contactNormal, + ref suspensionLength + ); + + public void AddRef() => ((VehicleCollisionTester)this).AddRef(); + + public void Release() => ((VehicleCollisionTester)this).Release(); + + public uint GetRefCount() => ((VehicleCollisionTester)this).GetRefCount(); + + public static implicit operator VehicleCollisionTester(VehicleCollisionTesterRay value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ushort GetObjectLayer() => ((VehicleCollisionTester)this).GetObjectLayer(); + + /// + public void SetObjectLayer(ushort objectLayer) => ((VehicleCollisionTester)this).SetObjectLayer(objectLayer); + + /// + public void SetBroadPhaseLayerFilter(BroadPhaseLayerFilter filter) => + ((VehicleCollisionTester)this).SetBroadPhaseLayerFilter(filter); + + /// + public BroadPhaseLayerFilter GetBroadPhaseLayerFilter() => + ((VehicleCollisionTester)this).GetBroadPhaseLayerFilter(); + + /// + public void SetObjectLayerFilter(ObjectLayerFilter filter) => + ((VehicleCollisionTester)this).SetObjectLayerFilter(filter); + + /// + public ObjectLayerFilter GetObjectLayerFilter() => ((VehicleCollisionTester)this).GetObjectLayerFilter(); + + /// + public void SetBodyFilter(BodyFilter filter) => ((VehicleCollisionTester)this).SetBodyFilter(filter); + + /// + public BodyFilter GetBodyFilter() => ((VehicleCollisionTester)this).GetBodyFilter(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleConstraint.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleConstraint.gen.cs new file mode 100644 index 0000000..9c4b78e --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleConstraint.gen.cs @@ -0,0 +1,691 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Constraint that simulates a vehicle Note: Don't forget to register the constraint as a StepListener with the + /// PhysicsSystem! + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:65 + ///
+ /// class VehicleConstraint : public Constraint, public PhysicsStepListener + ///
+ ///
+ /// + /// + /// Constraint that simulates a vehicle + /// Note: Don't forget to register the constraint as a StepListener with the PhysicsSystem! + /// + /// When the vehicle drives over very light objects (rubble) you may see the car body dip down. This is a known issue and is an artifact of the iterative solver that Jolt is using. + /// Basically if a light object is sandwiched between two heavy objects (the static floor and the car body), the light object is not able to transfer enough force from the ground to + /// the car body to keep the car body up. You can see this effect in the HeavyOnLightTest sample, the boxes on the right have a lot of penetration because they're on top of light objects. + /// + /// There are a couple of ways to improve this: + /// + /// 1. You can increase the number of velocity steps (global settings PhysicsSettings::mNumVelocitySteps or if you only want to increase it on + /// the vehicle you can use VehicleConstraintSettings::mNumVelocityStepsOverride). E.g. going from 10 to 30 steps in the HeavyOnLightTest sample makes the penetration a lot less. + /// The number of position steps can also be increased (the first prevents the body from going down, the second corrects it if the problem did + /// occur which inevitably happens due to numerical drift). This solution costs CPU cycles. + /// + /// 2. You can reduce the mass difference between the vehicle body and the rubble on the floor (by making the rubble heavier or the car lighter). + /// + /// 3. You could filter out collisions between the vehicle collision test and the rubble completely. This would make the wheels ignore the rubble but would cause the vehicle to drive + /// through it as if nothing happened. You could create fake wheels (keyframed bodies) that move along with the vehicle and that only collide with rubble (and not the vehicle or the ground). + /// This would cause the vehicle to push away the rubble without the rubble being able to affect the vehicle (unless it hits the main body of course). + /// + /// Note that when driving over rubble, you may see the wheel jump up and down quite quickly because one frame a collision is found and the next frame not. + /// To alleviate this, it may be needed to smooth the motion of the visual mesh for the wheel. + /// + /// + [InteropHandle] + public readonly partial struct VehicleConstraint : IDisposable + { + /// + /// + /// Constructor / destructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:69 + ///
+ /// VehicleConstraint(Body &inVehicleBody, const VehicleConstraintSettings &inSettings) + ///
+ ///
+ public static VehicleConstraint Create(Body vehicleBody, VehicleConstraintSettings settings) => + Jolt.PInvoke.VehicleConstraint_Create(vehicleBody, settings); + + /// + public ConstraintSubType GetSubType() => ((Constraint)this).GetSubType(); + + /// + /// + /// Defines the maximum pitch/roll angle (rad), can be used to avoid the car from getting upside down. The + /// vehicle up direction will stay within a cone centered around the up axis with half top angle + /// mMaxPitchRollAngle, set to pi to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:76 + ///
+ /// void SetMaxPitchRollAngle(float inMaxPitchRollAngle) + ///
+ ///
+ public void SetMaxPitchRollAngle(float maxPitchRollAngle) => + Jolt.PInvoke.VehicleConstraint_SetMaxPitchRollAngle(this, maxPitchRollAngle); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:77 + ///
+ /// float GetMaxPitchRollAngle() const + ///
+ ///
+ public float GetMaxPitchRollAngle() => Jolt.PInvoke.VehicleConstraint_GetMaxPitchRollAngle(this); + + /// + /// + /// Set the interface that tests collision between wheel and ground + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:80 + ///
+ /// void SetVehicleCollisionTester(const VehicleCollisionTester *inTester) + ///
+ ///
+ public void SetVehicleCollisionTester(VehicleCollisionTester tester) => + Jolt.PInvoke.VehicleConstraint_SetVehicleCollisionTester(this, tester); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:81 + ///
+ /// const VehicleCollisionTester *GetVehicleCollisionTester() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public VehicleCollisionTester GetVehicleCollisionTester() => + Jolt.PInvoke.VehicleConstraint_GetVehicleCollisionTester(this); + + /// + /// + /// Set the function that combines the friction of two bodies and returns it Default method is the geometric + /// mean: sqrt(friction1 * friction2). + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:89 + ///
+ /// void SetCombineFriction(const CombineFunction &inCombineFriction) + ///
+ ///
+ /// + /// + /// combineFriction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Jolt calls it without a null check, so null is rejected. The callback and userData are retained by the + /// native object until they are replaced or the owner is destroyed - keep whatever userData points at (a + /// GCHandle, an allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetCombineFriction( + delegate* unmanaged[Cdecl] combineFriction, + nint combineFrictionUserData + ) + { + if (combineFriction == null) + throw new ArgumentNullException(nameof(combineFriction)); + Jolt.PInvoke.VehicleConstraint_SetCombineFriction(this, combineFriction, combineFrictionUserData); + } + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:99 + ///
+ /// void SetPreStepCallback(const StepCallback &inPreStepCallback) + ///
+ ///
+ /// + /// + /// preStepCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Pass null to clear it. The callback and userData are retained by the native object until they are + /// replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an allocation) alive + /// for at least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetPreStepCallback( + delegate* unmanaged[Cdecl] preStepCallback, + nint preStepCallbackUserData + ) => Jolt.PInvoke.VehicleConstraint_SetPreStepCallback(this, preStepCallback, preStepCallbackUserData); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:105 + ///
+ /// void SetPostCollideCallback(const StepCallback &inPostCollideCallback) + ///
+ ///
+ /// + /// + /// postCollideCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Pass null to clear it. The callback and userData are retained by the native object until they are + /// replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an allocation) alive + /// for at least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetPostCollideCallback( + delegate* unmanaged[Cdecl] postCollideCallback, + nint postCollideCallbackUserData + ) => + Jolt.PInvoke.VehicleConstraint_SetPostCollideCallback( + this, + postCollideCallback, + postCollideCallbackUserData + ); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:111 + ///
+ /// void SetPostStepCallback(const StepCallback &inPostStepCallback) + ///
+ ///
+ /// + /// + /// postStepCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Pass null to clear it. The callback and userData are retained by the native object until they are + /// replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an allocation) alive + /// for at least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetPostStepCallback( + delegate* unmanaged[Cdecl] postStepCallback, + nint postStepCallbackUserData + ) => Jolt.PInvoke.VehicleConstraint_SetPostStepCallback(this, postStepCallback, postStepCallbackUserData); + + /// + /// + /// Override gravity for this vehicle. Note that overriding gravity will set the gravity factor of the + /// vehicle body to 0 and apply gravity in the PhysicsStepListener instead. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:114 + ///
+ /// void OverrideGravity(Vec3Arg inGravity) + ///
+ ///
+ public void OverrideGravity(float3 gravity) => Jolt.PInvoke.VehicleConstraint_OverrideGravity(this, gravity); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:115 + ///
+ /// bool IsGravityOverridden() const + ///
+ ///
+ public bool IsGravityOverridden() => Jolt.PInvoke.VehicleConstraint_IsGravityOverridden(this); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:116 + ///
+ /// Vec3 GetGravityOverride() const + ///
+ ///
+ public float3 GetGravityOverride() => Jolt.PInvoke.VehicleConstraint_GetGravityOverride(this); + + /// + /// + /// Note that resetting the gravity override will restore the gravity factor of the vehicle body to 1. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:117 + ///
+ /// void ResetGravityOverride() + ///
+ ///
+ public void ResetGravityOverride() => Jolt.PInvoke.VehicleConstraint_ResetGravityOverride(this); + + /// + /// + /// Get the local space forward vector of the vehicle + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:120 + ///
+ /// Vec3 GetLocalForward() const + ///
+ ///
+ public float3 GetLocalForward() => Jolt.PInvoke.VehicleConstraint_GetLocalForward(this); + + /// + /// + /// Get the local space up vector of the vehicle + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:123 + ///
+ /// Vec3 GetLocalUp() const + ///
+ ///
+ public float3 GetLocalUp() => Jolt.PInvoke.VehicleConstraint_GetLocalUp(this); + + /// + /// + /// Vector indicating the world space up direction (used to limit vehicle pitch/roll), calculated every + /// frame by inverting gravity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:126 + ///
+ /// Vec3 GetWorldUp() const + ///
+ ///
+ public float3 GetWorldUp() => Jolt.PInvoke.VehicleConstraint_GetWorldUp(this); + + /// + /// + /// Access to the vehicle body + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:129 + ///
+ /// Body * GetVehicleBody() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Body GetVehicleBody() => Jolt.PInvoke.VehicleConstraint_GetVehicleBody(this); + + /// + /// + /// Access to the vehicle controller interface (determines acceleration / deceleration) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:132 + ///
+ /// const VehicleController * GetController() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleController GetController() => Jolt.PInvoke.VehicleConstraint_GetController(this); + + /// + /// + /// Get the state of a wheels (writable interface, allows you to make changes to the configuration which + /// will take effect the next time step) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:141 + ///
+ /// Wheels & GetWheels() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only + /// valid until that container is resized or its owner is destroyed. The handles in it are borrowed from the + /// object that owns them: don't Dispose them, and don't read them once that owner is gone - the buffer + /// keeps the pointers alive, not the objects. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan GetWheels() + { + Jolt.PInvoke.VehicleConstraint_GetWheels(this, out var _outResult); + return new ReadOnlySpan((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Get the state of a wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:144 + ///
+ /// Wheel * GetWheel(uint inIdx) + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public Wheel GetWheel(uint idx) + { + var _result = Jolt.PInvoke.VehicleConstraint_GetWheel(this, idx, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(idx), + idx, + "Expected an index below the number of wheels." + ); + return _result; + } + + /// + /// + /// Get the basis vectors for the wheel in local space to the vehicle body (note: basis does not rotate when + /// the wheel rotates around its axis) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:152 + ///
+ /// void GetWheelLocalBasis(const Wheel *inWheel, Vec3 &outForward, Vec3 &outUp, Vec3 &outRight) const + ///
+ ///
+ /// + /// + /// Get the basis vectors for the wheel in local space to the vehicle body (note: basis does not rotate when the wheel rotates around its axis) + /// @param inWheel Wheel to fetch basis for + /// @param outForward Forward vector for the wheel + /// @param outUp Up vector for the wheel + /// @param outRight Right vector for the wheel + /// + /// + public void GetWheelLocalBasis(Wheel wheel, out float3 forward, out float3 up, out float3 right) => + Jolt.PInvoke.VehicleConstraint_GetWheelLocalBasis(this, wheel, out forward, out up, out right); + + /// + /// + /// Get the transform of a wheel in local space to the vehicle body, returns a matrix that transforms a + /// cylinder aligned with the Y axis in body space (not COM space) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:158 + ///
+ /// Mat44 GetWheelLocalTransform(uint inWheelIndex, Vec3Arg inWheelRight, Vec3Arg inWheelUp) const + ///
+ ///
+ /// + /// + /// Get the transform of a wheel in local space to the vehicle body, returns a matrix that transforms a cylinder aligned with the Y axis in body space (not COM space) + /// @param inWheelIndex Index of the wheel to fetch + /// @param inWheelRight Unit vector that indicates right in model space of the wheel (so if you only have 1 wheel model, you probably want to specify the opposite direction for the left and right wheels) + /// @param inWheelUp Unit vector that indicates up in model space of the wheel + /// + /// + public float4x4 GetWheelLocalTransform(uint wheelIndex, float3 wheelRight, float3 wheelUp) + { + var _result = Jolt.PInvoke.VehicleConstraint_GetWheelLocalTransform( + this, + wheelIndex, + wheelRight, + wheelUp, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(wheelIndex), + wheelIndex, + "Expected an index below the number of wheels." + ); + return _result; + } + + /// + /// + /// Get the transform of a wheel in world space, returns a matrix that transforms a cylinder aligned with + /// the Y axis in world space + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:164 + ///
+ /// RMat44 GetWheelWorldTransform(uint inWheelIndex, Vec3Arg inWheelRight, Vec3Arg inWheelUp) const + ///
+ ///
+ /// + /// + /// Get the transform of a wheel in world space, returns a matrix that transforms a cylinder aligned with the Y axis in world space + /// @param inWheelIndex Index of the wheel to fetch + /// @param inWheelRight Unit vector that indicates right in model space of the wheel (so if you only have 1 wheel model, you probably want to specify the opposite direction for the left and right wheels) + /// @param inWheelUp Unit vector that indicates up in model space of the wheel + /// + /// + public float4x4 GetWheelWorldTransform(uint wheelIndex, float3 wheelRight, float3 wheelUp) + { + var _result = Jolt.PInvoke.VehicleConstraint_GetWheelWorldTransform( + this, + wheelIndex, + wheelRight, + wheelUp, + out var _inRange + ); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(wheelIndex), + wheelIndex, + "Expected an index below the number of wheels." + ); + return _result; + } + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:168 + ///
+ /// VehicleAntiRollBars & GetAntiRollBars() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetAntiRollBars() + { + Jolt.PInvoke.VehicleConstraint_GetAntiRollBars(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Number of simulation steps between wheel collision tests when the vehicle is active. Default is 1. 0 = + /// never, 1 = every step, 2 = every other step, etc. Note that if a vehicle has multiple wheels and the + /// number of steps > 1, the wheels will be tested in a round robin fashion. If there are multiple + /// vehicles, the tests will be spread out based on the BodyID of the vehicle. If you set this to test less + /// than every step, you may see simulation artifacts. This setting can be used to reduce the cost of + /// simulating vehicles in the distance. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:174 + ///
+ /// void SetNumStepsBetweenCollisionTestActive(uint inSteps) + ///
+ ///
+ public void SetNumStepsBetweenCollisionTestActive(uint steps) => + Jolt.PInvoke.VehicleConstraint_SetNumStepsBetweenCollisionTestActive(this, steps); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:175 + ///
+ /// uint GetNumStepsBetweenCollisionTestActive() const + ///
+ ///
+ public uint GetNumStepsBetweenCollisionTestActive() => + Jolt.PInvoke.VehicleConstraint_GetNumStepsBetweenCollisionTestActive(this); + + /// + /// + /// Number of simulation steps between wheel collision tests when the vehicle is inactive. Default is 1. 0 = + /// never, 1 = every step, 2 = every other step, etc. Note that if a vehicle has multiple wheels and the + /// number of steps > 1, the wheels will be tested in a round robin fashion. If there are multiple + /// vehicles, the tests will be spread out based on the BodyID of the vehicle. This number can be lower than + /// the number of steps when the vehicle is active as the only purpose of this test is to allow the vehicle + /// to wake up in response to bodies moving into the wheels but not touching the body of the vehicle. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:182 + ///
+ /// void SetNumStepsBetweenCollisionTestInactive(uint inSteps) + ///
+ ///
+ public void SetNumStepsBetweenCollisionTestInactive(uint steps) => + Jolt.PInvoke.VehicleConstraint_SetNumStepsBetweenCollisionTestInactive(this, steps); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:183 + ///
+ /// uint GetNumStepsBetweenCollisionTestInactive() const + ///
+ ///
+ public uint GetNumStepsBetweenCollisionTestInactive() => + Jolt.PInvoke.VehicleConstraint_GetNumStepsBetweenCollisionTestInactive(this); + + /// + public bool IsActive() => ((Constraint)this).IsActive(); + + /// + public void NotifyShapeChanged(uint bodyID, float3 deltaCOM) => + ((Constraint)this).NotifyShapeChanged(bodyID, deltaCOM); + + /// + public void SetupVelocityConstraint(float deltaTime) => ((Constraint)this).SetupVelocityConstraint(deltaTime); + + /// + public void ResetWarmStart() => ((Constraint)this).ResetWarmStart(); + + /// + public void WarmStartVelocityConstraint(float warmStartImpulseRatio) => + ((Constraint)this).WarmStartVelocityConstraint(warmStartImpulseRatio); + + /// + public bool SolveVelocityConstraint(float deltaTime) => ((Constraint)this).SolveVelocityConstraint(deltaTime); + + /// + public bool SolvePositionConstraint(float deltaTime, float baumgarte) => + ((Constraint)this).SolvePositionConstraint(deltaTime, baumgarte); + + /// + public void BuildIslands(uint constraintIndex, IslandBuilder builder, BodyManager bodyManager) => + ((Constraint)this).BuildIslands(constraintIndex, builder, bodyManager); + + /// + public uint BuildIslandSplits(LargeIslandSplitter splitter) => ((Constraint)this).BuildIslandSplits(splitter); + + /// + public void DrawConstraint(DebugRenderer renderer) => ((Constraint)this).DrawConstraint(renderer); + + /// + public void DrawConstraintLimits(DebugRenderer renderer) => ((Constraint)this).DrawConstraintLimits(renderer); + + /// + public ConstraintSettings GetConstraintSettings() => ((Constraint)this).GetConstraintSettings(); + + public void AddRef() => ((Constraint)this).AddRef(); + + public void Release() => ((Constraint)this).Release(); + + public uint GetRefCount() => ((Constraint)this).GetRefCount(); + + public static implicit operator Constraint(VehicleConstraint value) => + Unsafe.BitCast(value); + + public static implicit operator PhysicsStepListener(VehicleConstraint value) => + Jolt.PInvoke.VehicleConstraint_AsPhysicsStepListener(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public ConstraintType GetConstraintType() => ((Constraint)this).GetConstraintType(); + + /// + public uint GetConstraintPriority() => ((Constraint)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint priority) => ((Constraint)this).SetConstraintPriority(priority); + + /// + public void SetNumVelocityStepsOverride(uint n) => ((Constraint)this).SetNumVelocityStepsOverride(n); + + /// + public uint GetNumVelocityStepsOverride() => ((Constraint)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint n) => ((Constraint)this).SetNumPositionStepsOverride(n); + + /// + public uint GetNumPositionStepsOverride() => ((Constraint)this).GetNumPositionStepsOverride(); + + /// + public void SetEnabled(bool enabled) => ((Constraint)this).SetEnabled(enabled); + + /// + public bool GetEnabled() => ((Constraint)this).GetEnabled(); + + /// + public ulong GetUserData() => ((Constraint)this).GetUserData(); + + /// + public void SetUserData(ulong userData) => ((Constraint)this).SetUserData(userData); + + /// + public void DrawConstraintReferenceFrame(DebugRenderer renderer) => + ((Constraint)this).DrawConstraintReferenceFrame(renderer); + + /// + public float GetDrawConstraintSize() => ((Constraint)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float size) => ((Constraint)this).SetDrawConstraintSize(size); + + /// + public void OnStep(PhysicsStepListenerContext context) => ((PhysicsStepListener)this).OnStep(context); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleConstraintSettings.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleConstraintSettings.gen.cs new file mode 100644 index 0000000..5a42c24 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleConstraintSettings.gen.cs @@ -0,0 +1,296 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Configuration for constraint that simulates a wheeled vehicle. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:23 + ///
+ /// class VehicleConstraintSettings : public ConstraintSettings + ///
+ ///
+ /// + /// + /// Configuration for constraint that simulates a wheeled vehicle. + /// + /// The properties in this constraint are largely based on "Car Physics for Games" by Marco Monster. + /// See: https://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html + /// + /// + [InteropHandle] + public readonly partial struct VehicleConstraintSettings : IDisposable + { + public static VehicleConstraintSettings Create() => Jolt.PInvoke.VehicleConstraintSettings_Create(); + + /// + public RTTI GetRTTI() => ((ConstraintSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((ConstraintSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((ConstraintSettings)this).SaveBinaryState(stream); + + /// + /// + /// Vector indicating the up direction of the vehicle (in local space to the body) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:31 + ///
+ /// Vec3 mUp { 0, 1, 0 } + ///
+ ///
+ public float3 GetUp() => Jolt.PInvoke.VehicleConstraintSettings_GetUp(this); + + /// + /// + /// Vector indicating the up direction of the vehicle (in local space to the body) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:31 + ///
+ /// Vec3 mUp { 0, 1, 0 } + ///
+ ///
+ public void SetUp(float3 value) => Jolt.PInvoke.VehicleConstraintSettings_SetUp(this, value); + + /// + /// + /// Vector indicating forward direction of the vehicle (in local space to the body) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:32 + ///
+ /// Vec3 mForward { 0, 0, 1 } + ///
+ ///
+ public float3 GetForward() => Jolt.PInvoke.VehicleConstraintSettings_GetForward(this); + + /// + /// + /// Vector indicating forward direction of the vehicle (in local space to the body) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:32 + ///
+ /// Vec3 mForward { 0, 0, 1 } + ///
+ ///
+ public void SetForward(float3 value) => Jolt.PInvoke.VehicleConstraintSettings_SetForward(this, value); + + /// + /// + /// Defines the maximum pitch/roll angle (rad), can be used to avoid the car from getting upside down. The + /// vehicle up direction will stay within a cone centered around the up axis with half top angle + /// mMaxPitchRollAngle, set to pi to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:33 + ///
+ /// float mMaxPitchRollAngle = JPH_PI + ///
+ ///
+ public float GetMaxPitchRollAngle() => Jolt.PInvoke.VehicleConstraintSettings_GetMaxPitchRollAngle(this); + + /// + /// + /// Defines the maximum pitch/roll angle (rad), can be used to avoid the car from getting upside down. The + /// vehicle up direction will stay within a cone centered around the up axis with half top angle + /// mMaxPitchRollAngle, set to pi to turn off. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:33 + ///
+ /// float mMaxPitchRollAngle = JPH_PI + ///
+ ///
+ public void SetMaxPitchRollAngle(float value) => + Jolt.PInvoke.VehicleConstraintSettings_SetMaxPitchRollAngle(this, value); + + /// + /// + /// List of wheels and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:34 + ///
+ /// Array<Ref<WheelSettings>> mWheels + ///
+ ///
+ /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The + /// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed + /// themselves. + /// + /// + public NativeArray GetWheels() => + new NativeArray(Jolt.PInvoke.VehicleConstraintSettings_GetWheels(this)); + + /// + /// + /// List of wheels and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:34 + ///
+ /// Array<Ref<WheelSettings>> mWheels + ///
+ ///
+ public unsafe void SetWheels(ReadOnlySpan value) + { + fixed (WheelSettings* value_fixed = value) + { + Jolt.PInvoke.VehicleConstraintSettings_SetWheels(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// List of anti rollbars and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:35 + ///
+ /// VehicleAntiRollBars mAntiRollBars + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetAntiRollBars() + { + Jolt.PInvoke.VehicleConstraintSettings_GetAntiRollBars(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// List of anti rollbars and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:35 + ///
+ /// VehicleAntiRollBars mAntiRollBars + ///
+ ///
+ public unsafe void SetAntiRollBars(ReadOnlySpan value) + { + fixed (VehicleAntiRollBar* value_fixed = value) + { + Jolt.PInvoke.VehicleConstraintSettings_SetAntiRollBars(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Defines how the vehicle can accelerate / decelerate + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:36 + ///
+ /// Ref<VehicleControllerSettings> mController + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public VehicleControllerSettings GetController() => Jolt.PInvoke.VehicleConstraintSettings_GetController(this); + + /// + /// + /// Defines how the vehicle can accelerate / decelerate + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:36 + ///
+ /// Ref<VehicleControllerSettings> mController + ///
+ ///
+ public void SetController(VehicleControllerSettings value) => + Jolt.PInvoke.VehicleConstraintSettings_SetController(this, value); + + public void AddRef() => ((ConstraintSettings)this).AddRef(); + + public void Release() => ((ConstraintSettings)this).Release(); + + public uint GetRefCount() => ((ConstraintSettings)this).GetRefCount(); + + public static implicit operator ConstraintSettings(VehicleConstraintSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public bool GetEnabled() => ((ConstraintSettings)this).GetEnabled(); + + /// + public void SetEnabled(bool value) => ((ConstraintSettings)this).SetEnabled(value); + + /// + public uint GetConstraintPriority() => ((ConstraintSettings)this).GetConstraintPriority(); + + /// + public void SetConstraintPriority(uint value) => ((ConstraintSettings)this).SetConstraintPriority(value); + + /// + public uint GetNumVelocityStepsOverride() => ((ConstraintSettings)this).GetNumVelocityStepsOverride(); + + /// + public void SetNumVelocityStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumVelocityStepsOverride(value); + + /// + public uint GetNumPositionStepsOverride() => ((ConstraintSettings)this).GetNumPositionStepsOverride(); + + /// + public void SetNumPositionStepsOverride(uint value) => + ((ConstraintSettings)this).SetNumPositionStepsOverride(value); + + /// + public float GetDrawConstraintSize() => ((ConstraintSettings)this).GetDrawConstraintSize(); + + /// + public void SetDrawConstraintSize(float value) => ((ConstraintSettings)this).SetDrawConstraintSize(value); + + /// + public ulong GetUserData() => ((ConstraintSettings)this).GetUserData(); + + /// + public void SetUserData(ulong value) => ((ConstraintSettings)this).SetUserData(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleController.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleController.gen.cs new file mode 100644 index 0000000..04cc4a5 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleController.gen.cs @@ -0,0 +1,88 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime data for interface that controls acceleration / deceleration of the vehicle + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:40 + ///
+ /// class VehicleController : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleController + { + /// + /// + /// Access the vehicle constraint that this controller is part of + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:50 + ///
+ /// VehicleConstraint & GetConstraint() + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public VehicleConstraint GetConstraint() => Jolt.PInvoke.VehicleController_GetConstraint(this); + + /// + /// + /// Recreate the settings for this controller + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:54 + ///
+ /// virtual Ref<VehicleControllerSettings> GetSettings() const = 0 + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public VehicleControllerSettings GetSettings() => Jolt.PInvoke.VehicleController_GetSettings(this); + + /// + /// + /// Views this VehicleController as the WheeledVehicleController it is, or returns a null handle when it is + /// a different kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public WheeledVehicleController AsWheeledVehicleController() => + Jolt.PInvoke.VehicleController_AsWheeledVehicleController(this); + + /// + /// + /// Views this VehicleController as the MotorcycleController it is, or returns a null handle when it is a + /// different kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public MotorcycleController AsMotorcycleController() => + Jolt.PInvoke.VehicleController_AsMotorcycleController(this); + + /// + /// + /// Views this VehicleController as the TrackedVehicleController it is, or returns a null handle when it is + /// a different kind - check IsNull(). The same object, not a new reference: never Dispose the result. + /// + /// + public TrackedVehicleController AsTrackedVehicleController() => + Jolt.PInvoke.VehicleController_AsTrackedVehicleController(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleControllerSettings.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleControllerSettings.gen.cs new file mode 100644 index 0000000..b63a668 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleControllerSettings.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Basic settings object for interface that controls acceleration / deceleration of the vehicle + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:24 + ///
+ /// class VehicleControllerSettings : public SerializableObject, public RefTarget<VehicleControllerSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleControllerSettings : IDisposable + { + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:26 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.VehicleControllerSettings_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:26 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.VehicleControllerSettings_CastTo(this, rtti); + + /// + /// + /// Saves the contents of the controller settings in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:30 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const = 0 + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.VehicleControllerSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restore the contents of the controller settings in binary form from inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleController.h:33 + ///
+ /// virtual void RestoreBinaryState(StreamIn &inStream) = 0 + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.VehicleControllerSettings_RestoreBinaryState(this, stream); + + public void AddRef() => Jolt.PInvoke.VehicleControllerSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.VehicleControllerSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.VehicleControllerSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleEngine.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleEngine.gen.cs new file mode 100644 index 0000000..93c2b90 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleEngine.gen.cs @@ -0,0 +1,245 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime data for engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:43 + ///
+ /// class VehicleEngine : public VehicleEngineSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleEngine : IDisposable + { + public static VehicleEngine Create() => Jolt.PInvoke.VehicleEngine_Create(); + + /// + /// + /// Clamp the RPM between min and max RPM + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:50 + ///
+ /// inline void ClampRPM() + ///
+ ///
+ public void ClampRPM() => Jolt.PInvoke.VehicleEngine_ClampRPM(this); + + /// + /// + /// Current rotation speed of engine in rounds per minute + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:53 + ///
+ /// float GetCurrentRPM() const + ///
+ ///
+ public float GetCurrentRPM() => Jolt.PInvoke.VehicleEngine_GetCurrentRPM(this); + + /// + /// + /// Update rotation speed of engine in rounds per minute + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:56 + ///
+ /// void SetCurrentRPM(float inRPM) + ///
+ ///
+ public void SetCurrentRPM(float rpm) => Jolt.PInvoke.VehicleEngine_SetCurrentRPM(this, rpm); + + /// + /// + /// Get current angular velocity of the engine in radians / second + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:59 + ///
+ /// inline float GetAngularVelocity() const + ///
+ ///
+ public float GetAngularVelocity() => Jolt.PInvoke.VehicleEngine_GetAngularVelocity(this); + + /// + /// + /// Get the amount of torque (N m) that the engine can supply + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:63 + ///
+ /// float GetTorque(float inAcceleration) const + ///
+ ///
+ /// + /// + /// Get the amount of torque (N m) that the engine can supply + /// @param inAcceleration How much the gas pedal is pressed [0, 1] + /// + /// + public float GetTorque(float acceleration) => Jolt.PInvoke.VehicleEngine_GetTorque(this, acceleration); + + /// + /// + /// Apply a torque to the engine rotation speed + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:68 + ///
+ /// void ApplyTorque(float inTorque, float inDeltaTime) + ///
+ ///
+ /// + /// + /// Apply a torque to the engine rotation speed + /// @param inTorque Torque in N m + /// @param inDeltaTime Delta time in seconds + /// + /// + public void ApplyTorque(float torque, float deltaTime) => + Jolt.PInvoke.VehicleEngine_ApplyTorque(this, torque, deltaTime); + + /// + /// + /// Update the engine RPM for damping + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:72 + ///
+ /// void ApplyDamping(float inDeltaTime) + ///
+ ///
+ /// + /// + /// Update the engine RPM for damping + /// @param inDeltaTime Delta time in seconds + /// + /// + public void ApplyDamping(float deltaTime) => Jolt.PInvoke.VehicleEngine_ApplyDamping(this, deltaTime); + + /// + /// + /// Function that converts RPM to an angle in radians for debugging purposes + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:76 + ///
+ /// float ConvertRPMToAngle(float inRPM) const + ///
+ ///
+ public float ConvertRPMToAngle(float rpm) => Jolt.PInvoke.VehicleEngine_ConvertRPMToAngle(this, rpm); + + /// + /// + /// Debug draw a RPM meter + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:79 + ///
+ /// void DrawRPM(DebugRenderer *inRenderer, RVec3Arg inPosition, Vec3Arg inForward, Vec3Arg inUp, float inSize, float inShiftDownRPM, float inShiftUpRPM) const + ///
+ ///
+ public void DrawRPM( + DebugRenderer renderer, + float3 position, + float3 forward, + float3 up, + float size, + float shiftDownRPM, + float shiftUpRPM + ) => Jolt.PInvoke.VehicleEngine_DrawRPM(this, renderer, position, forward, up, size, shiftDownRPM, shiftUpRPM); + + /// + /// + /// If the engine is idle we allow the vehicle to sleep + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:83 + ///
+ /// bool AllowSleep() const + ///
+ ///
+ public bool AllowSleep() => Jolt.PInvoke.VehicleEngine_AllowSleep(this); + + /// + /// + /// Multiply an angular velocity (rad/s) with this value to get rounds per minute (RPM) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:47 + ///
+ /// static constexpr float cAngularVelocityToRPM = 60.0f / (2.0f * JPH_PI) + ///
+ ///
+ public static float GetAngularVelocityToRPM() => Jolt.PInvoke.VehicleEngine_GetAngularVelocityToRPM(); + + public static implicit operator VehicleEngineSettings(VehicleEngine value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.VehicleEngine_Destroy(this); + + /// + public void SaveBinaryState(StreamOut stream) => ((VehicleEngineSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((VehicleEngineSettings)this).RestoreBinaryState(stream); + + /// + public float GetMaxTorque() => ((VehicleEngineSettings)this).GetMaxTorque(); + + /// + public void SetMaxTorque(float value) => ((VehicleEngineSettings)this).SetMaxTorque(value); + + /// + public float GetMinRPM() => ((VehicleEngineSettings)this).GetMinRPM(); + + /// + public void SetMinRPM(float value) => ((VehicleEngineSettings)this).SetMinRPM(value); + + /// + public float GetMaxRPM() => ((VehicleEngineSettings)this).GetMaxRPM(); + + /// + public void SetMaxRPM(float value) => ((VehicleEngineSettings)this).SetMaxRPM(value); + + /// + public LinearCurve GetNormalizedTorque() => ((VehicleEngineSettings)this).GetNormalizedTorque(); + + /// + public void SetNormalizedTorque(LinearCurve value) => ((VehicleEngineSettings)this).SetNormalizedTorque(value); + + /// + public float GetInertia() => ((VehicleEngineSettings)this).GetInertia(); + + /// + public void SetInertia(float value) => ((VehicleEngineSettings)this).SetInertia(value); + + /// + public float GetAngularDamping() => ((VehicleEngineSettings)this).GetAngularDamping(); + + /// + public void SetAngularDamping(float value) => ((VehicleEngineSettings)this).SetAngularDamping(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleEngineSettings.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleEngineSettings.gen.cs new file mode 100644 index 0000000..d69ed82 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleEngineSettings.gen.cs @@ -0,0 +1,239 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Generic properties for a vehicle engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:20 + ///
+ /// class VehicleEngineSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleEngineSettings : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:26 + ///
+ /// VehicleEngineSettings() + ///
+ ///
+ public static VehicleEngineSettings Create() => Jolt.PInvoke.VehicleEngineSettings_Create(); + + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:29 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.VehicleEngineSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:32 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.VehicleEngineSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Max amount of torque (Nm) that the engine can deliver + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:34 + ///
+ /// float mMaxTorque = 500.0f + ///
+ ///
+ public float GetMaxTorque() => Jolt.PInvoke.VehicleEngineSettings_GetMaxTorque(this); + + /// + /// + /// Max amount of torque (Nm) that the engine can deliver + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:34 + ///
+ /// float mMaxTorque = 500.0f + ///
+ ///
+ public void SetMaxTorque(float value) => Jolt.PInvoke.VehicleEngineSettings_SetMaxTorque(this, value); + + /// + /// + /// Min amount of revolutions per minute (rpm) the engine can produce without stalling + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:35 + ///
+ /// float mMinRPM = 1000.0f + ///
+ ///
+ public float GetMinRPM() => Jolt.PInvoke.VehicleEngineSettings_GetMinRPM(this); + + /// + /// + /// Min amount of revolutions per minute (rpm) the engine can produce without stalling + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:35 + ///
+ /// float mMinRPM = 1000.0f + ///
+ ///
+ public void SetMinRPM(float value) => Jolt.PInvoke.VehicleEngineSettings_SetMinRPM(this, value); + + /// + /// + /// Max amount of revolutions per minute (rpm) the engine can generate + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:36 + ///
+ /// float mMaxRPM = 6000.0f + ///
+ ///
+ public float GetMaxRPM() => Jolt.PInvoke.VehicleEngineSettings_GetMaxRPM(this); + + /// + /// + /// Max amount of revolutions per minute (rpm) the engine can generate + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:36 + ///
+ /// float mMaxRPM = 6000.0f + ///
+ ///
+ public void SetMaxRPM(float value) => Jolt.PInvoke.VehicleEngineSettings_SetMaxRPM(this, value); + + /// + /// + /// Y-axis: Curve that describes a ratio of the max torque the engine can produce (0 = 0, 1 = mMaxTorque). + /// X-axis: the fraction of the RPM of the engine (0 = mMinRPM, 1 = mMaxRPM) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:37 + ///
+ /// LinearCurve mNormalizedTorque + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public LinearCurve GetNormalizedTorque() => Jolt.PInvoke.VehicleEngineSettings_GetNormalizedTorque(this); + + /// + /// + /// Y-axis: Curve that describes a ratio of the max torque the engine can produce (0 = 0, 1 = mMaxTorque). + /// X-axis: the fraction of the RPM of the engine (0 = mMinRPM, 1 = mMaxRPM) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:37 + ///
+ /// LinearCurve mNormalizedTorque + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetNormalizedTorque(LinearCurve value) => + Jolt.PInvoke.VehicleEngineSettings_SetNormalizedTorque(this, value); + + /// + /// + /// Moment of inertia (kg m^2) of the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:38 + ///
+ /// float mInertia = 0.5f + ///
+ ///
+ public float GetInertia() => Jolt.PInvoke.VehicleEngineSettings_GetInertia(this); + + /// + /// + /// Moment of inertia (kg m^2) of the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:38 + ///
+ /// float mInertia = 0.5f + ///
+ ///
+ public void SetInertia(float value) => Jolt.PInvoke.VehicleEngineSettings_SetInertia(this, value); + + /// + /// + /// Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually + /// close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:39 + ///
+ /// float mAngularDamping = 0.2f + ///
+ ///
+ public float GetAngularDamping() => Jolt.PInvoke.VehicleEngineSettings_GetAngularDamping(this); + + /// + /// + /// Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually + /// close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleEngine.h:39 + ///
+ /// float mAngularDamping = 0.2f + ///
+ ///
+ public void SetAngularDamping(float value) => Jolt.PInvoke.VehicleEngineSettings_SetAngularDamping(this, value); + + public void Dispose() => Jolt.PInvoke.VehicleEngineSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleTrack.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleTrack.gen.cs new file mode 100644 index 0000000..b2aeb0a --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleTrack.gen.cs @@ -0,0 +1,101 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime data for tank tracks + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:44 + ///
+ /// class VehicleTrack : public VehicleTrackSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleTrack : IDisposable + { + public static VehicleTrack Create() => Jolt.PInvoke.VehicleTrack_Create(); + + /// + /// + /// Angular velocity of the driven wheel, will determine the speed of the entire track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:51 + ///
+ /// float mAngularVelocity = 0.0f + ///
+ ///
+ public float GetAngularVelocity() => Jolt.PInvoke.VehicleTrack_GetAngularVelocity(this); + + /// + /// + /// Angular velocity of the driven wheel, will determine the speed of the entire track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:51 + ///
+ /// float mAngularVelocity = 0.0f + ///
+ ///
+ public void SetAngularVelocity(float value) => Jolt.PInvoke.VehicleTrack_SetAngularVelocity(this, value); + + public static implicit operator VehicleTrackSettings(VehicleTrack value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.VehicleTrack_Destroy(this); + + /// + public void SaveBinaryState(StreamOut stream) => ((VehicleTrackSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((VehicleTrackSettings)this).RestoreBinaryState(stream); + + /// + public uint GetDrivenWheel() => ((VehicleTrackSettings)this).GetDrivenWheel(); + + /// + public void SetDrivenWheel(uint value) => ((VehicleTrackSettings)this).SetDrivenWheel(value); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetWheels() => ((VehicleTrackSettings)this).GetWheels(); + + /// + public unsafe void SetWheels(ReadOnlySpan value) => ((VehicleTrackSettings)this).SetWheels(value); + + /// + public float GetInertia() => ((VehicleTrackSettings)this).GetInertia(); + + /// + public void SetInertia(float value) => ((VehicleTrackSettings)this).SetInertia(value); + + /// + public float GetAngularDamping() => ((VehicleTrackSettings)this).GetAngularDamping(); + + /// + public void SetAngularDamping(float value) => ((VehicleTrackSettings)this).SetAngularDamping(value); + + /// + public float GetMaxBrakeTorque() => ((VehicleTrackSettings)this).GetMaxBrakeTorque(); + + /// + public void SetMaxBrakeTorque(float value) => ((VehicleTrackSettings)this).SetMaxBrakeTorque(value); + + /// + public float GetDifferentialRatio() => ((VehicleTrackSettings)this).GetDifferentialRatio(); + + /// + public void SetDifferentialRatio(float value) => ((VehicleTrackSettings)this).SetDifferentialRatio(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleTrackSettings.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleTrackSettings.gen.cs new file mode 100644 index 0000000..e10426d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleTrackSettings.gen.cs @@ -0,0 +1,231 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Generic properties for tank tracks + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:24 + ///
+ /// class VehicleTrackSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleTrackSettings : IDisposable + { + public static VehicleTrackSettings Create() => Jolt.PInvoke.VehicleTrackSettings_Create(); + + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:30 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.VehicleTrackSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:33 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.VehicleTrackSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Which wheel on the track is connected to the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:35 + ///
+ /// uint mDrivenWheel + ///
+ ///
+ public uint GetDrivenWheel() => Jolt.PInvoke.VehicleTrackSettings_GetDrivenWheel(this); + + /// + /// + /// Which wheel on the track is connected to the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:35 + ///
+ /// uint mDrivenWheel + ///
+ ///
+ public void SetDrivenWheel(uint value) => Jolt.PInvoke.VehicleTrackSettings_SetDrivenWheel(this, value); + + /// + /// + /// Indices of wheels that are inside this track, should include the driven wheel too + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:36 + ///
+ /// Array<uint> mWheels + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetWheels() + { + Jolt.PInvoke.VehicleTrackSettings_GetWheels(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Indices of wheels that are inside this track, should include the driven wheel too + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:36 + ///
+ /// Array<uint> mWheels + ///
+ ///
+ public unsafe void SetWheels(ReadOnlySpan value) + { + fixed (uint* value_fixed = value) + { + Jolt.PInvoke.VehicleTrackSettings_SetWheels(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Moment of inertia (kg m^2) of the track and its wheels as seen on the driven wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:37 + ///
+ /// float mInertia = 10.0f + ///
+ ///
+ public float GetInertia() => Jolt.PInvoke.VehicleTrackSettings_GetInertia(this); + + /// + /// + /// Moment of inertia (kg m^2) of the track and its wheels as seen on the driven wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:37 + ///
+ /// float mInertia = 10.0f + ///
+ ///
+ public void SetInertia(float value) => Jolt.PInvoke.VehicleTrackSettings_SetInertia(this, value); + + /// + /// + /// Damping factor of track and its wheels: dw/dt = -c * w as seen on the driven wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:38 + ///
+ /// float mAngularDamping = 0.5f + ///
+ ///
+ public float GetAngularDamping() => Jolt.PInvoke.VehicleTrackSettings_GetAngularDamping(this); + + /// + /// + /// Damping factor of track and its wheels: dw/dt = -c * w as seen on the driven wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:38 + ///
+ /// float mAngularDamping = 0.5f + ///
+ ///
+ public void SetAngularDamping(float value) => Jolt.PInvoke.VehicleTrackSettings_SetAngularDamping(this, value); + + /// + /// + /// How much torque (Nm) the brakes can apply on the driven wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:39 + ///
+ /// float mMaxBrakeTorque = 15000.0f + ///
+ ///
+ public float GetMaxBrakeTorque() => Jolt.PInvoke.VehicleTrackSettings_GetMaxBrakeTorque(this); + + /// + /// + /// How much torque (Nm) the brakes can apply on the driven wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:39 + ///
+ /// float mMaxBrakeTorque = 15000.0f + ///
+ ///
+ public void SetMaxBrakeTorque(float value) => Jolt.PInvoke.VehicleTrackSettings_SetMaxBrakeTorque(this, value); + + /// + /// + /// Ratio between rotation speed of gear box and driven wheel of track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:40 + ///
+ /// float mDifferentialRatio = 6.0f + ///
+ ///
+ public float GetDifferentialRatio() => Jolt.PInvoke.VehicleTrackSettings_GetDifferentialRatio(this); + + /// + /// + /// Ratio between rotation speed of gear box and driven wheel of track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:40 + ///
+ /// float mDifferentialRatio = 6.0f + ///
+ ///
+ public void SetDifferentialRatio(float value) => + Jolt.PInvoke.VehicleTrackSettings_SetDifferentialRatio(this, value); + + public void Dispose() => Jolt.PInvoke.VehicleTrackSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleTransmission.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleTransmission.gen.cs new file mode 100644 index 0000000..b9cc9bb --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleTransmission.gen.cs @@ -0,0 +1,207 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime data for transmission + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:45 + ///
+ /// class VehicleTransmission : public VehicleTransmissionSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleTransmission : IDisposable + { + public static VehicleTransmission Create() => Jolt.PInvoke.VehicleTransmission_Create(); + + /// + /// + /// Set input from driver regarding the transmission (only relevant when transmission is set to manual mode) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:51 + ///
+ /// void Set(int inCurrentGear, float inClutchFriction) + ///
+ ///
+ /// + /// + /// Set input from driver regarding the transmission (only relevant when transmission is set to manual mode) + /// @param inCurrentGear Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc. + /// @param inClutchFriction Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction) + /// + /// + public void Set(int currentGear, float clutchFriction) => + Jolt.PInvoke.VehicleTransmission_Set(this, currentGear, clutchFriction); + + /// + /// + /// Update the current gear and clutch friction if the transmission is in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:58 + ///
+ /// void Update(float inDeltaTime, float inCurrentRPM, float inForwardInput, bool inCanShiftUp) + ///
+ ///
+ /// + /// + /// Update the current gear and clutch friction if the transmission is in auto mode + /// @param inDeltaTime Time step delta time in s + /// @param inCurrentRPM Current RPM for engine + /// @param inForwardInput Hint if the user wants to drive forward (> 0) or backwards (< 0) + /// @param inCanShiftUp Indicates if we want to allow the transmission to shift up (e.g. pass false if wheels are slipping) + /// + /// + public void Update(float deltaTime, float currentRPM, float forwardInput, bool canShiftUp) => + Jolt.PInvoke.VehicleTransmission_Update(this, deltaTime, currentRPM, forwardInput, canShiftUp); + + /// + /// + /// Current gear, -1 = reverse, 0 = neutral, 1 = 1st gear etc. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:61 + ///
+ /// int GetCurrentGear() const + ///
+ ///
+ public int GetCurrentGear() => Jolt.PInvoke.VehicleTransmission_GetCurrentGear(this); + + /// + /// + /// Value between 0 and 1 indicating how much friction the clutch gives (0 = no friction, 1 = full friction) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:64 + ///
+ /// float GetClutchFriction() const + ///
+ ///
+ public float GetClutchFriction() => Jolt.PInvoke.VehicleTransmission_GetClutchFriction(this); + + /// + /// + /// If the auto box is currently switching gears + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:67 + ///
+ /// bool IsSwitchingGear() const + ///
+ ///
+ public bool IsSwitchingGear() => Jolt.PInvoke.VehicleTransmission_IsSwitchingGear(this); + + /// + /// + /// Return the transmission ratio based on the current gear (ratio between engine and differential) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:70 + ///
+ /// float GetCurrentRatio() const + ///
+ ///
+ public float GetCurrentRatio() => Jolt.PInvoke.VehicleTransmission_GetCurrentRatio(this); + + /// + /// + /// Only allow sleeping when the transmission is idle + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:73 + ///
+ /// bool AllowSleep() const + ///
+ ///
+ public bool AllowSleep() => Jolt.PInvoke.VehicleTransmission_AllowSleep(this); + + public static implicit operator VehicleTransmissionSettings(VehicleTransmission value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.VehicleTransmission_Destroy(this); + + /// + public void SaveBinaryState(StreamOut stream) => ((VehicleTransmissionSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => + ((VehicleTransmissionSettings)this).RestoreBinaryState(stream); + + /// + public TransmissionMode GetMode() => ((VehicleTransmissionSettings)this).GetMode(); + + /// + public void SetMode(TransmissionMode value) => ((VehicleTransmissionSettings)this).SetMode(value); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetGearRatios() => ((VehicleTransmissionSettings)this).GetGearRatios(); + + /// + public unsafe void SetGearRatios(ReadOnlySpan value) => + ((VehicleTransmissionSettings)this).SetGearRatios(value); + + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetReverseGearRatios() => ((VehicleTransmissionSettings)this).GetReverseGearRatios(); + + /// + public unsafe void SetReverseGearRatios(ReadOnlySpan value) => + ((VehicleTransmissionSettings)this).SetReverseGearRatios(value); + + /// + public float GetSwitchTime() => ((VehicleTransmissionSettings)this).GetSwitchTime(); + + /// + public void SetSwitchTime(float value) => ((VehicleTransmissionSettings)this).SetSwitchTime(value); + + /// + public float GetClutchReleaseTime() => ((VehicleTransmissionSettings)this).GetClutchReleaseTime(); + + /// + public void SetClutchReleaseTime(float value) => + ((VehicleTransmissionSettings)this).SetClutchReleaseTime(value); + + /// + public float GetSwitchLatency() => ((VehicleTransmissionSettings)this).GetSwitchLatency(); + + /// + public void SetSwitchLatency(float value) => ((VehicleTransmissionSettings)this).SetSwitchLatency(value); + + /// + public float GetShiftUpRPM() => ((VehicleTransmissionSettings)this).GetShiftUpRPM(); + + /// + public void SetShiftUpRPM(float value) => ((VehicleTransmissionSettings)this).SetShiftUpRPM(value); + + /// + public float GetShiftDownRPM() => ((VehicleTransmissionSettings)this).GetShiftDownRPM(); + + /// + public void SetShiftDownRPM(float value) => ((VehicleTransmissionSettings)this).SetShiftDownRPM(value); + + /// + public float GetClutchStrength() => ((VehicleTransmissionSettings)this).GetClutchStrength(); + + /// + public void SetClutchStrength(float value) => ((VehicleTransmissionSettings)this).SetClutchStrength(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/VehicleTransmissionSettings.gen.cs b/Brutal.Jolt/Generated/Classes/VehicleTransmissionSettings.gen.cs new file mode 100644 index 0000000..5eaa5a4 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/VehicleTransmissionSettings.gen.cs @@ -0,0 +1,333 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Configuration for the transmission of a vehicle (gear box) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:22 + ///
+ /// class VehicleTransmissionSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct VehicleTransmissionSettings : IDisposable + { + public static VehicleTransmissionSettings Create() => Jolt.PInvoke.VehicleTransmissionSettings_Create(); + + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:28 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.VehicleTransmissionSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:31 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.VehicleTransmissionSettings_RestoreBinaryState(this, stream); + + /// + /// + /// How to switch gears + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:33 + ///
+ /// ETransmissionMode mMode = ETransmissionMode::Auto + ///
+ ///
+ public TransmissionMode GetMode() => Jolt.PInvoke.VehicleTransmissionSettings_GetMode(this); + + /// + /// + /// How to switch gears + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:33 + ///
+ /// ETransmissionMode mMode = ETransmissionMode::Auto + ///
+ ///
+ public void SetMode(TransmissionMode value) => Jolt.PInvoke.VehicleTransmissionSettings_SetMode(this, value); + + /// + /// + /// Ratio in rotation rate between engine and gear box, first element is 1st gear, 2nd element 2nd gear etc. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:34 + ///
+ /// Array<float> mGearRatios { 2.66f, 1.78f, 1.3f, 1.0f, 0.74f } + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetGearRatios() + { + Jolt.PInvoke.VehicleTransmissionSettings_GetGearRatios(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Ratio in rotation rate between engine and gear box, first element is 1st gear, 2nd element 2nd gear etc. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:34 + ///
+ /// Array<float> mGearRatios { 2.66f, 1.78f, 1.3f, 1.0f, 0.74f } + ///
+ ///
+ public unsafe void SetGearRatios(ReadOnlySpan value) + { + fixed (float* value_fixed = value) + { + Jolt.PInvoke.VehicleTransmissionSettings_SetGearRatios(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Ratio in rotation rate between engine and gear box when driving in reverse + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:35 + ///
+ /// Array<float> mReverseGearRatios { -2.90f } + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetReverseGearRatios() + { + Jolt.PInvoke.VehicleTransmissionSettings_GetReverseGearRatios(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Ratio in rotation rate between engine and gear box when driving in reverse + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:35 + ///
+ /// Array<float> mReverseGearRatios { -2.90f } + ///
+ ///
+ public unsafe void SetReverseGearRatios(ReadOnlySpan value) + { + fixed (float* value_fixed = value) + { + Jolt.PInvoke.VehicleTransmissionSettings_SetReverseGearRatios(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// How long it takes to switch gears (s), only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:36 + ///
+ /// float mSwitchTime = 0.5f + ///
+ ///
+ public float GetSwitchTime() => Jolt.PInvoke.VehicleTransmissionSettings_GetSwitchTime(this); + + /// + /// + /// How long it takes to switch gears (s), only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:36 + ///
+ /// float mSwitchTime = 0.5f + ///
+ ///
+ public void SetSwitchTime(float value) => Jolt.PInvoke.VehicleTransmissionSettings_SetSwitchTime(this, value); + + /// + /// + /// How long it takes to release the clutch (go to full friction), only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:37 + ///
+ /// float mClutchReleaseTime = 0.3f + ///
+ ///
+ public float GetClutchReleaseTime() => Jolt.PInvoke.VehicleTransmissionSettings_GetClutchReleaseTime(this); + + /// + /// + /// How long it takes to release the clutch (go to full friction), only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:37 + ///
+ /// float mClutchReleaseTime = 0.3f + ///
+ ///
+ public void SetClutchReleaseTime(float value) => + Jolt.PInvoke.VehicleTransmissionSettings_SetClutchReleaseTime(this, value); + + /// + /// + /// How long to wait after releasing the clutch before another switch is attempted (s), only used in auto + /// mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:38 + ///
+ /// float mSwitchLatency = 0.5f + ///
+ ///
+ public float GetSwitchLatency() => Jolt.PInvoke.VehicleTransmissionSettings_GetSwitchLatency(this); + + /// + /// + /// How long to wait after releasing the clutch before another switch is attempted (s), only used in auto + /// mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:38 + ///
+ /// float mSwitchLatency = 0.5f + ///
+ ///
+ public void SetSwitchLatency(float value) => + Jolt.PInvoke.VehicleTransmissionSettings_SetSwitchLatency(this, value); + + /// + /// + /// If RPM of engine is bigger then this we will shift a gear up, only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:39 + ///
+ /// float mShiftUpRPM = 4000.0f + ///
+ ///
+ public float GetShiftUpRPM() => Jolt.PInvoke.VehicleTransmissionSettings_GetShiftUpRPM(this); + + /// + /// + /// If RPM of engine is bigger then this we will shift a gear up, only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:39 + ///
+ /// float mShiftUpRPM = 4000.0f + ///
+ ///
+ public void SetShiftUpRPM(float value) => Jolt.PInvoke.VehicleTransmissionSettings_SetShiftUpRPM(this, value); + + /// + /// + /// If RPM of engine is smaller then this we will shift a gear down, only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:40 + ///
+ /// float mShiftDownRPM = 2000.0f + ///
+ ///
+ public float GetShiftDownRPM() => Jolt.PInvoke.VehicleTransmissionSettings_GetShiftDownRPM(this); + + /// + /// + /// If RPM of engine is smaller then this we will shift a gear down, only used in auto mode + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:40 + ///
+ /// float mShiftDownRPM = 2000.0f + ///
+ ///
+ public void SetShiftDownRPM(float value) => + Jolt.PInvoke.VehicleTransmissionSettings_SetShiftDownRPM(this, value); + + /// + /// + /// Strength of the clutch when fully engaged. Total torque a clutch applies is Torque = ClutchStrength * + /// (Velocity Engine - Avg Velocity Wheels At Clutch) (units: k m^2 s^-1) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:41 + ///
+ /// float mClutchStrength = 10.0f + ///
+ ///
+ public float GetClutchStrength() => Jolt.PInvoke.VehicleTransmissionSettings_GetClutchStrength(this); + + /// + /// + /// Strength of the clutch when fully engaged. Total torque a clutch applies is Torque = ClutchStrength * + /// (Velocity Engine - Avg Velocity Wheels At Clutch) (units: k m^2 s^-1) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:41 + ///
+ /// float mClutchStrength = 10.0f + ///
+ ///
+ public void SetClutchStrength(float value) => + Jolt.PInvoke.VehicleTransmissionSettings_SetClutchStrength(this, value); + + public void Dispose() => Jolt.PInvoke.VehicleTransmissionSettings_Destroy(this); + } +} diff --git a/Brutal.Jolt/Generated/Classes/Wheel.gen.cs b/Brutal.Jolt/Generated/Classes/Wheel.gen.cs new file mode 100644 index 0000000..f2fa7f4 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/Wheel.gen.cs @@ -0,0 +1,325 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for runtime data for a wheel, each VehicleController can implement a derived class of this + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:45 + ///
+ /// class Wheel : public NonCopyable + ///
+ ///
+ [InteropHandle] + public readonly partial struct Wheel + { + /// + /// + /// Get settings for the wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:55 + ///
+ /// const WheelSettings * GetSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public WheelSettings GetSettings() => Jolt.PInvoke.Wheel_GetSettings(this); + + /// + /// + /// Get the angular velocity (rad/s) for this wheel, note that positive means the wheel is rotating such + /// that the car moves forward + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:58 + ///
+ /// float GetAngularVelocity() const + ///
+ ///
+ public float GetAngularVelocity() => Jolt.PInvoke.Wheel_GetAngularVelocity(this); + + /// + /// + /// Update the angular velocity (rad/s) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:61 + ///
+ /// void SetAngularVelocity(float inVel) + ///
+ ///
+ public void SetAngularVelocity(float vel) => Jolt.PInvoke.Wheel_SetAngularVelocity(this, vel); + + /// + /// + /// Get the current rotation angle of the wheel in radians [0, 2 pi] + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:64 + ///
+ /// float GetRotationAngle() const + ///
+ ///
+ public float GetRotationAngle() => Jolt.PInvoke.Wheel_GetRotationAngle(this); + + /// + /// + /// Set the current rotation angle of the wheel in radians [0, 2 pi] + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:67 + ///
+ /// void SetRotationAngle(float inAngle) + ///
+ ///
+ public void SetRotationAngle(float angle) => Jolt.PInvoke.Wheel_SetRotationAngle(this, angle); + + /// + /// + /// Get the current steer angle of the wheel in radians [-pi, pi], positive is to the left + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:70 + ///
+ /// float GetSteerAngle() const + ///
+ ///
+ public float GetSteerAngle() => Jolt.PInvoke.Wheel_GetSteerAngle(this); + + /// + /// + /// Set the current steer angle of the wheel in radians [-pi, pi] + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:73 + ///
+ /// void SetSteerAngle(float inAngle) + ///
+ ///
+ public void SetSteerAngle(float angle) => Jolt.PInvoke.Wheel_SetSteerAngle(this, angle); + + /// + /// + /// Returns true if the wheel is touching an object + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:76 + ///
+ /// inline bool HasContact() const + ///
+ ///
+ public bool HasContact() => Jolt.PInvoke.Wheel_HasContact(this); + + /// + /// + /// Returns the body ID of the body that this wheel is touching + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:79 + ///
+ /// BodyID GetContactBodyID() const + ///
+ ///
+ public uint GetContactBodyID() => Jolt.PInvoke.Wheel_GetContactBodyID(this); + + /// + /// + /// Returns the sub shape ID where we're contacting the body + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:82 + ///
+ /// SubShapeID GetContactSubShapeID() const + ///
+ ///
+ public uint GetContactSubShapeID() => Jolt.PInvoke.Wheel_GetContactSubShapeID(this); + + /// + /// + /// Returns the current contact position in world space (note by the time you call this the vehicle has + /// moved) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:85 + ///
+ /// RVec3 GetContactPosition() const + ///
+ ///
+ public float3 GetContactPosition() => Jolt.PInvoke.Wheel_GetContactPosition(this); + + /// + /// + /// Velocity of the contact point (m / s, not relative to the wheel but in world space) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:88 + ///
+ /// Vec3 GetContactPointVelocity() const + ///
+ ///
+ public float3 GetContactPointVelocity() => Jolt.PInvoke.Wheel_GetContactPointVelocity(this); + + /// + /// + /// Returns the current contact normal in world space (note by the time you call this the vehicle has moved) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:91 + ///
+ /// Vec3 GetContactNormal() const + ///
+ ///
+ public float3 GetContactNormal() => Jolt.PInvoke.Wheel_GetContactNormal(this); + + /// + /// + /// Returns longitudinal direction (direction along the wheel relative to floor) in world space (note by the + /// time you call this the vehicle has moved) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:94 + ///
+ /// Vec3 GetContactLongitudinal() const + ///
+ ///
+ public float3 GetContactLongitudinal() => Jolt.PInvoke.Wheel_GetContactLongitudinal(this); + + /// + /// + /// Returns lateral direction (sideways direction) in world space (note by the time you call this the + /// vehicle has moved) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:97 + ///
+ /// Vec3 GetContactLateral() const + ///
+ ///
+ public float3 GetContactLateral() => Jolt.PInvoke.Wheel_GetContactLateral(this); + + /// + /// + /// Get the length of the suspension for a wheel (m) relative to the suspension attachment point (hard + /// point) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:100 + ///
+ /// float GetSuspensionLength() const + ///
+ ///
+ public float GetSuspensionLength() => Jolt.PInvoke.Wheel_GetSuspensionLength(this); + + /// + /// + /// Check if the suspension hit its upper limit + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:103 + ///
+ /// bool HasHitHardPoint() const + ///
+ ///
+ public bool HasHitHardPoint() => Jolt.PInvoke.Wheel_HasHitHardPoint(this); + + /// + /// + /// Get the total impulse (N s) that was applied by the suspension + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:106 + ///
+ /// float GetSuspensionLambda() const + ///
+ ///
+ public float GetSuspensionLambda() => Jolt.PInvoke.Wheel_GetSuspensionLambda(this); + + /// + /// + /// Get total impulse (N s) applied along the forward direction of the wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:109 + ///
+ /// float GetLongitudinalLambda() const + ///
+ ///
+ public float GetLongitudinalLambda() => Jolt.PInvoke.Wheel_GetLongitudinalLambda(this); + + /// + /// + /// Get total impulse (N s) applied along the sideways direction of the wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:112 + ///
+ /// float GetLateralLambda() const + ///
+ ///
+ public float GetLateralLambda() => Jolt.PInvoke.Wheel_GetLateralLambda(this); + + /// + /// + /// Internal function that should only be called by the controller. Used to apply impulses in the forward + /// direction of the vehicle. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:115 + ///
+ /// bool SolveLongitudinalConstraintPart(const VehicleConstraint &inConstraint, float inMinImpulse, float inMaxImpulse) + ///
+ ///
+ public bool SolveLongitudinalConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => + Jolt.PInvoke.Wheel_SolveLongitudinalConstraintPart(this, constraint, minImpulse, maxImpulse); + + /// + /// + /// Internal function that should only be called by the controller. Used to apply impulses in the sideways + /// direction of the vehicle. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:118 + ///
+ /// bool SolveLateralConstraintPart(const VehicleConstraint &inConstraint, float inMinImpulse, float inMaxImpulse) + ///
+ ///
+ public bool SolveLateralConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => + Jolt.PInvoke.Wheel_SolveLateralConstraintPart(this, constraint, minImpulse, maxImpulse); + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheelSettings.gen.cs b/Brutal.Jolt/Generated/Classes/WheelSettings.gen.cs new file mode 100644 index 0000000..6c7dbf7 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheelSettings.gen.cs @@ -0,0 +1,468 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Base class for wheel settings, each VehicleController can implement a derived class of this + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:18 + ///
+ /// class WheelSettings : public SerializableObject, public RefTarget<WheelSettings> + ///
+ ///
+ [InteropHandle] + public readonly partial struct WheelSettings : IDisposable + { + public static WheelSettings Create() => Jolt.PInvoke.WheelSettings_Create(); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:20 + ///
+ /// + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public RTTI GetRTTI() => Jolt.PInvoke.WheelSettings_GetRTTI(this); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:20 + ///
+ /// + ///
+ ///
+ public unsafe Ptr CastTo(RTTI rtti) => Jolt.PInvoke.WheelSettings_CastTo(this, rtti); + + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:24 + ///
+ /// virtual void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.WheelSettings_SaveBinaryState(this, stream); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:27 + ///
+ /// virtual void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.WheelSettings_RestoreBinaryState(this, stream); + + /// + /// + /// Attachment point of wheel suspension in local space of the body + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:29 + ///
+ /// Vec3 mPosition { 0, 0, 0 } + ///
+ ///
+ public float3 GetPosition() => Jolt.PInvoke.WheelSettings_GetPosition(this); + + /// + /// + /// Attachment point of wheel suspension in local space of the body + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:29 + ///
+ /// Vec3 mPosition { 0, 0, 0 } + ///
+ ///
+ public void SetPosition(float3 value) => Jolt.PInvoke.WheelSettings_SetPosition(this, value); + + /// + /// + /// Where tire forces (suspension and traction) are applied, in local space of the body. A good default is + /// the center of the wheel in its neutral pose. See mEnableSuspensionForcePoint. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:30 + ///
+ /// Vec3 mSuspensionForcePoint { 0, 0, 0 } + ///
+ ///
+ public float3 GetSuspensionForcePoint() => Jolt.PInvoke.WheelSettings_GetSuspensionForcePoint(this); + + /// + /// + /// Where tire forces (suspension and traction) are applied, in local space of the body. A good default is + /// the center of the wheel in its neutral pose. See mEnableSuspensionForcePoint. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:30 + ///
+ /// Vec3 mSuspensionForcePoint { 0, 0, 0 } + ///
+ ///
+ public void SetSuspensionForcePoint(float3 value) => + Jolt.PInvoke.WheelSettings_SetSuspensionForcePoint(this, value); + + /// + /// + /// Direction of the suspension in local space of the body, should point down + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:31 + ///
+ /// Vec3 mSuspensionDirection { 0, -1, 0 } + ///
+ ///
+ public float3 GetSuspensionDirection() => Jolt.PInvoke.WheelSettings_GetSuspensionDirection(this); + + /// + /// + /// Direction of the suspension in local space of the body, should point down + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:31 + ///
+ /// Vec3 mSuspensionDirection { 0, -1, 0 } + ///
+ ///
+ public void SetSuspensionDirection(float3 value) => + Jolt.PInvoke.WheelSettings_SetSuspensionDirection(this, value); + + /// + /// + /// Direction of the steering axis in local space of the body, should point up (e.g. for a bike would be + /// -mSuspensionDirection) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:32 + ///
+ /// Vec3 mSteeringAxis { 0, 1, 0 } + ///
+ ///
+ public float3 GetSteeringAxis() => Jolt.PInvoke.WheelSettings_GetSteeringAxis(this); + + /// + /// + /// Direction of the steering axis in local space of the body, should point up (e.g. for a bike would be + /// -mSuspensionDirection) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:32 + ///
+ /// Vec3 mSteeringAxis { 0, 1, 0 } + ///
+ ///
+ public void SetSteeringAxis(float3 value) => Jolt.PInvoke.WheelSettings_SetSteeringAxis(this, value); + + /// + /// + /// Up direction when the wheel is in the neutral steering position (usually VehicleConstraintSettings::mUp + /// but can be used to give the wheel camber or for a bike would be -mSuspensionDirection) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:33 + ///
+ /// Vec3 mWheelUp { 0, 1, 0 } + ///
+ ///
+ public float3 GetWheelUp() => Jolt.PInvoke.WheelSettings_GetWheelUp(this); + + /// + /// + /// Up direction when the wheel is in the neutral steering position (usually VehicleConstraintSettings::mUp + /// but can be used to give the wheel camber or for a bike would be -mSuspensionDirection) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:33 + ///
+ /// Vec3 mWheelUp { 0, 1, 0 } + ///
+ ///
+ public void SetWheelUp(float3 value) => Jolt.PInvoke.WheelSettings_SetWheelUp(this, value); + + /// + /// + /// Forward direction when the wheel is in the neutral steering position (usually + /// VehicleConstraintSettings::mForward but can be used to give the wheel toe, does not need to be + /// perpendicular to mWheelUp) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:34 + ///
+ /// Vec3 mWheelForward { 0, 0, 1 } + ///
+ ///
+ public float3 GetWheelForward() => Jolt.PInvoke.WheelSettings_GetWheelForward(this); + + /// + /// + /// Forward direction when the wheel is in the neutral steering position (usually + /// VehicleConstraintSettings::mForward but can be used to give the wheel toe, does not need to be + /// perpendicular to mWheelUp) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:34 + ///
+ /// Vec3 mWheelForward { 0, 0, 1 } + ///
+ ///
+ public void SetWheelForward(float3 value) => Jolt.PInvoke.WheelSettings_SetWheelForward(this, value); + + /// + /// + /// How long the suspension is in max raised position relative to the attachment point (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:35 + ///
+ /// float mSuspensionMinLength = 0.3f + ///
+ ///
+ public float GetSuspensionMinLength() => Jolt.PInvoke.WheelSettings_GetSuspensionMinLength(this); + + /// + /// + /// How long the suspension is in max raised position relative to the attachment point (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:35 + ///
+ /// float mSuspensionMinLength = 0.3f + ///
+ ///
+ public void SetSuspensionMinLength(float value) => + Jolt.PInvoke.WheelSettings_SetSuspensionMinLength(this, value); + + /// + /// + /// How long the suspension is in max droop position relative to the attachment point (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:36 + ///
+ /// float mSuspensionMaxLength = 0.5f + ///
+ ///
+ public float GetSuspensionMaxLength() => Jolt.PInvoke.WheelSettings_GetSuspensionMaxLength(this); + + /// + /// + /// How long the suspension is in max droop position relative to the attachment point (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:36 + ///
+ /// float mSuspensionMaxLength = 0.5f + ///
+ ///
+ public void SetSuspensionMaxLength(float value) => + Jolt.PInvoke.WheelSettings_SetSuspensionMaxLength(this, value); + + /// + /// + /// The natural length (m) of the suspension spring is defined as mSuspensionMaxLength + + /// mSuspensionPreloadLength. Can be used to preload the suspension as the spring is compressed by + /// mSuspensionPreloadLength when the suspension is in max droop position. Note that this means when the + /// vehicle touches the ground there is a discontinuity so it will also make the vehicle more bouncy as + /// we're updating with discrete time steps. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:37 + ///
+ /// float mSuspensionPreloadLength = 0.0f + ///
+ ///
+ public float GetSuspensionPreloadLength() => Jolt.PInvoke.WheelSettings_GetSuspensionPreloadLength(this); + + /// + /// + /// The natural length (m) of the suspension spring is defined as mSuspensionMaxLength + + /// mSuspensionPreloadLength. Can be used to preload the suspension as the spring is compressed by + /// mSuspensionPreloadLength when the suspension is in max droop position. Note that this means when the + /// vehicle touches the ground there is a discontinuity so it will also make the vehicle more bouncy as + /// we're updating with discrete time steps. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:37 + ///
+ /// float mSuspensionPreloadLength = 0.0f + ///
+ ///
+ public void SetSuspensionPreloadLength(float value) => + Jolt.PInvoke.WheelSettings_SetSuspensionPreloadLength(this, value); + + /// + /// + /// Settings for the suspension spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:38 + ///
+ /// SpringSettings mSuspensionSpring { ESpringMode::FrequencyAndDamping, 1.5f, 0.5f } + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public SpringSettings GetSuspensionSpring() => Jolt.PInvoke.WheelSettings_GetSuspensionSpring(this); + + /// + /// + /// Settings for the suspension spring + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:38 + ///
+ /// SpringSettings mSuspensionSpring { ESpringMode::FrequencyAndDamping, 1.5f, 0.5f } + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetSuspensionSpring(SpringSettings value) => + Jolt.PInvoke.WheelSettings_SetSuspensionSpring(this, value); + + /// + /// + /// Radius of the wheel (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:39 + ///
+ /// float mRadius = 0.3f + ///
+ ///
+ public float GetRadius() => Jolt.PInvoke.WheelSettings_GetRadius(this); + + /// + /// + /// Radius of the wheel (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:39 + ///
+ /// float mRadius = 0.3f + ///
+ ///
+ public void SetRadius(float value) => Jolt.PInvoke.WheelSettings_SetRadius(this, value); + + /// + /// + /// Width of the wheel (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:40 + ///
+ /// float mWidth = 0.1f + ///
+ ///
+ public float GetWidth() => Jolt.PInvoke.WheelSettings_GetWidth(this); + + /// + /// + /// Width of the wheel (m) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:40 + ///
+ /// float mWidth = 0.1f + ///
+ ///
+ public void SetWidth(float value) => Jolt.PInvoke.WheelSettings_SetWidth(this, value); + + /// + /// + /// Enables mSuspensionForcePoint, if disabled, the forces are applied at the collision contact point. This + /// leads to a more accurate simulation when interacting with dynamic objects but makes the vehicle less + /// stable. When setting this to true, all forces will be applied to a fixed point on the vehicle body. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:41 + ///
+ /// bool mEnableSuspensionForcePoint = false + ///
+ ///
+ public bool GetEnableSuspensionForcePoint() => Jolt.PInvoke.WheelSettings_GetEnableSuspensionForcePoint(this); + + /// + /// + /// Enables mSuspensionForcePoint, if disabled, the forces are applied at the collision contact point. This + /// leads to a more accurate simulation when interacting with dynamic objects but makes the vehicle less + /// stable. When setting this to true, all forces will be applied to a fixed point on the vehicle body. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/Wheel.h:41 + ///
+ /// bool mEnableSuspensionForcePoint = false + ///
+ ///
+ public void SetEnableSuspensionForcePoint(bool value) => + Jolt.PInvoke.WheelSettings_SetEnableSuspensionForcePoint(this, value); + + public void AddRef() => Jolt.PInvoke.WheelSettings_AddRef(this); + + public void Release() => Jolt.PInvoke.WheelSettings_Release(this); + + public uint GetRefCount() => Jolt.PInvoke.WheelSettings_GetRefCount(this); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheelSettingsTV.gen.cs b/Brutal.Jolt/Generated/Classes/WheelSettingsTV.gen.cs new file mode 100644 index 0000000..90d5097 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheelSettingsTV.gen.cs @@ -0,0 +1,187 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// WheelSettings object specifically for TrackedVehicleController + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:18 + ///
+ /// class WheelSettingsTV : public WheelSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct WheelSettingsTV : IDisposable + { + public static WheelSettingsTV Create() => Jolt.PInvoke.WheelSettingsTV_Create(); + + /// + public RTTI GetRTTI() => ((WheelSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((WheelSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((WheelSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((WheelSettings)this).RestoreBinaryState(stream); + + /// + /// + /// Friction in forward direction of tire + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:27 + ///
+ /// float mLongitudinalFriction = 4.0f + ///
+ ///
+ public float GetLongitudinalFriction() => Jolt.PInvoke.WheelSettingsTV_GetLongitudinalFriction(this); + + /// + /// + /// Friction in forward direction of tire + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:27 + ///
+ /// float mLongitudinalFriction = 4.0f + ///
+ ///
+ public void SetLongitudinalFriction(float value) => + Jolt.PInvoke.WheelSettingsTV_SetLongitudinalFriction(this, value); + + /// + /// + /// Friction in sideways direction of tire + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:28 + ///
+ /// float mLateralFriction = 2.0f + ///
+ ///
+ public float GetLateralFriction() => Jolt.PInvoke.WheelSettingsTV_GetLateralFriction(this); + + /// + /// + /// Friction in sideways direction of tire + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:28 + ///
+ /// float mLateralFriction = 2.0f + ///
+ ///
+ public void SetLateralFriction(float value) => Jolt.PInvoke.WheelSettingsTV_SetLateralFriction(this, value); + + public void AddRef() => ((WheelSettings)this).AddRef(); + + public void Release() => ((WheelSettings)this).Release(); + + public uint GetRefCount() => ((WheelSettings)this).GetRefCount(); + + public static implicit operator WheelSettings(WheelSettingsTV value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public float3 GetPosition() => ((WheelSettings)this).GetPosition(); + + /// + public void SetPosition(float3 value) => ((WheelSettings)this).SetPosition(value); + + /// + public float3 GetSuspensionForcePoint() => ((WheelSettings)this).GetSuspensionForcePoint(); + + /// + public void SetSuspensionForcePoint(float3 value) => ((WheelSettings)this).SetSuspensionForcePoint(value); + + /// + public float3 GetSuspensionDirection() => ((WheelSettings)this).GetSuspensionDirection(); + + /// + public void SetSuspensionDirection(float3 value) => ((WheelSettings)this).SetSuspensionDirection(value); + + /// + public float3 GetSteeringAxis() => ((WheelSettings)this).GetSteeringAxis(); + + /// + public void SetSteeringAxis(float3 value) => ((WheelSettings)this).SetSteeringAxis(value); + + /// + public float3 GetWheelUp() => ((WheelSettings)this).GetWheelUp(); + + /// + public void SetWheelUp(float3 value) => ((WheelSettings)this).SetWheelUp(value); + + /// + public float3 GetWheelForward() => ((WheelSettings)this).GetWheelForward(); + + /// + public void SetWheelForward(float3 value) => ((WheelSettings)this).SetWheelForward(value); + + /// + public float GetSuspensionMinLength() => ((WheelSettings)this).GetSuspensionMinLength(); + + /// + public void SetSuspensionMinLength(float value) => ((WheelSettings)this).SetSuspensionMinLength(value); + + /// + public float GetSuspensionMaxLength() => ((WheelSettings)this).GetSuspensionMaxLength(); + + /// + public void SetSuspensionMaxLength(float value) => ((WheelSettings)this).SetSuspensionMaxLength(value); + + /// + public float GetSuspensionPreloadLength() => ((WheelSettings)this).GetSuspensionPreloadLength(); + + /// + public void SetSuspensionPreloadLength(float value) => ((WheelSettings)this).SetSuspensionPreloadLength(value); + + /// + public SpringSettings GetSuspensionSpring() => ((WheelSettings)this).GetSuspensionSpring(); + + /// + public void SetSuspensionSpring(SpringSettings value) => ((WheelSettings)this).SetSuspensionSpring(value); + + /// + public float GetRadius() => ((WheelSettings)this).GetRadius(); + + /// + public void SetRadius(float value) => ((WheelSettings)this).SetRadius(value); + + /// + public float GetWidth() => ((WheelSettings)this).GetWidth(); + + /// + public void SetWidth(float value) => ((WheelSettings)this).SetWidth(value); + + /// + public bool GetEnableSuspensionForcePoint() => ((WheelSettings)this).GetEnableSuspensionForcePoint(); + + /// + public void SetEnableSuspensionForcePoint(bool value) => + ((WheelSettings)this).SetEnableSuspensionForcePoint(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheelSettingsWV.gen.cs b/Brutal.Jolt/Generated/Classes/WheelSettingsWV.gen.cs new file mode 100644 index 0000000..f4c58b0 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheelSettingsWV.gen.cs @@ -0,0 +1,370 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// WheelSettings object specifically for WheeledVehicleController + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:19 + ///
+ /// class WheelSettingsWV : public WheelSettings + ///
+ ///
+ [InteropHandle] + public readonly partial struct WheelSettingsWV : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:25 + ///
+ /// WheelSettingsWV() + ///
+ ///
+ public static WheelSettingsWV Create() => Jolt.PInvoke.WheelSettingsWV_Create(); + + /// + public RTTI GetRTTI() => ((WheelSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((WheelSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((WheelSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((WheelSettings)this).RestoreBinaryState(stream); + + /// + /// + /// Moment of inertia (kg m^2), for a cylinder this would be 0.5 * M * R^2 which is 0.9 for a wheel with a + /// mass of 20 kg and radius 0.3 m + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:31 + ///
+ /// float mInertia = 0.9f + ///
+ ///
+ public float GetInertia() => Jolt.PInvoke.WheelSettingsWV_GetInertia(this); + + /// + /// + /// Moment of inertia (kg m^2), for a cylinder this would be 0.5 * M * R^2 which is 0.9 for a wheel with a + /// mass of 20 kg and radius 0.3 m + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:31 + ///
+ /// float mInertia = 0.9f + ///
+ ///
+ public void SetInertia(float value) => Jolt.PInvoke.WheelSettingsWV_SetInertia(this, value); + + /// + /// + /// Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually + /// close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:32 + ///
+ /// float mAngularDamping = 0.2f + ///
+ ///
+ public float GetAngularDamping() => Jolt.PInvoke.WheelSettingsWV_GetAngularDamping(this); + + /// + /// + /// Angular damping factor of the wheel: dw/dt = -c * w. Value should be zero or positive and is usually + /// close to 0. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:32 + ///
+ /// float mAngularDamping = 0.2f + ///
+ ///
+ public void SetAngularDamping(float value) => Jolt.PInvoke.WheelSettingsWV_SetAngularDamping(this, value); + + /// + /// + /// How much this wheel can steer (radians) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:33 + ///
+ /// float mMaxSteerAngle = DegreesToRadians(70.0f) + ///
+ ///
+ public float GetMaxSteerAngle() => Jolt.PInvoke.WheelSettingsWV_GetMaxSteerAngle(this); + + /// + /// + /// How much this wheel can steer (radians) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:33 + ///
+ /// float mMaxSteerAngle = DegreesToRadians(70.0f) + ///
+ ///
+ public void SetMaxSteerAngle(float value) => Jolt.PInvoke.WheelSettingsWV_SetMaxSteerAngle(this, value); + + /// + /// + /// On the Y-axis: friction in the forward direction of the tire. Friction is normally between 0 (no + /// friction) and 1 (full friction) although friction can be a little bit higher than 1 because of the + /// profile of a tire. On the X-axis: the slip ratio (fraction) defined as (omega_wheel * r_wheel - + /// v_longitudinal) / |v_longitudinal|. You can see slip ratio as the amount the wheel is spinning relative + /// to the floor: 0 means the wheel has full traction and is rolling perfectly in sync with the ground, 1 is + /// for example when the wheel is locked and sliding over the ground. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:34 + ///
+ /// LinearCurve mLongitudinalFriction + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public LinearCurve GetLongitudinalFriction() => Jolt.PInvoke.WheelSettingsWV_GetLongitudinalFriction(this); + + /// + /// + /// On the Y-axis: friction in the forward direction of the tire. Friction is normally between 0 (no + /// friction) and 1 (full friction) although friction can be a little bit higher than 1 because of the + /// profile of a tire. On the X-axis: the slip ratio (fraction) defined as (omega_wheel * r_wheel - + /// v_longitudinal) / |v_longitudinal|. You can see slip ratio as the amount the wheel is spinning relative + /// to the floor: 0 means the wheel has full traction and is rolling perfectly in sync with the ground, 1 is + /// for example when the wheel is locked and sliding over the ground. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:34 + ///
+ /// LinearCurve mLongitudinalFriction + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetLongitudinalFriction(LinearCurve value) => + Jolt.PInvoke.WheelSettingsWV_SetLongitudinalFriction(this, value); + + /// + /// + /// On the Y-axis: friction in the sideways direction of the tire. Friction is normally between 0 (no + /// friction) and 1 (full friction) although friction can be a little bit higher than 1 because of the + /// profile of a tire. On the X-axis: the slip angle (degrees) defined as angle between relative contact + /// velocity and tire direction. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:35 + ///
+ /// LinearCurve mLateralFriction + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public LinearCurve GetLateralFriction() => Jolt.PInvoke.WheelSettingsWV_GetLateralFriction(this); + + /// + /// + /// On the Y-axis: friction in the sideways direction of the tire. Friction is normally between 0 (no + /// friction) and 1 (full friction) although friction can be a little bit higher than 1 because of the + /// profile of a tire. On the X-axis: the slip angle (degrees) defined as angle between relative contact + /// velocity and tire direction. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:35 + ///
+ /// LinearCurve mLateralFriction + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetLateralFriction(LinearCurve value) => + Jolt.PInvoke.WheelSettingsWV_SetLateralFriction(this, value); + + /// + /// + /// How much torque (Nm) the brakes can apply to this wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:36 + ///
+ /// float mMaxBrakeTorque = 1500.0f + ///
+ ///
+ public float GetMaxBrakeTorque() => Jolt.PInvoke.WheelSettingsWV_GetMaxBrakeTorque(this); + + /// + /// + /// How much torque (Nm) the brakes can apply to this wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:36 + ///
+ /// float mMaxBrakeTorque = 1500.0f + ///
+ ///
+ public void SetMaxBrakeTorque(float value) => Jolt.PInvoke.WheelSettingsWV_SetMaxBrakeTorque(this, value); + + /// + /// + /// How much torque (Nm) the hand brake can apply to this wheel (usually only applied to the rear wheels) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:37 + ///
+ /// float mMaxHandBrakeTorque = 4000.0f + ///
+ ///
+ public float GetMaxHandBrakeTorque() => Jolt.PInvoke.WheelSettingsWV_GetMaxHandBrakeTorque(this); + + /// + /// + /// How much torque (Nm) the hand brake can apply to this wheel (usually only applied to the rear wheels) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:37 + ///
+ /// float mMaxHandBrakeTorque = 4000.0f + ///
+ ///
+ public void SetMaxHandBrakeTorque(float value) => + Jolt.PInvoke.WheelSettingsWV_SetMaxHandBrakeTorque(this, value); + + public void AddRef() => ((WheelSettings)this).AddRef(); + + public void Release() => ((WheelSettings)this).Release(); + + public uint GetRefCount() => ((WheelSettings)this).GetRefCount(); + + public static implicit operator WheelSettings(WheelSettingsWV value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + + /// + public float3 GetPosition() => ((WheelSettings)this).GetPosition(); + + /// + public void SetPosition(float3 value) => ((WheelSettings)this).SetPosition(value); + + /// + public float3 GetSuspensionForcePoint() => ((WheelSettings)this).GetSuspensionForcePoint(); + + /// + public void SetSuspensionForcePoint(float3 value) => ((WheelSettings)this).SetSuspensionForcePoint(value); + + /// + public float3 GetSuspensionDirection() => ((WheelSettings)this).GetSuspensionDirection(); + + /// + public void SetSuspensionDirection(float3 value) => ((WheelSettings)this).SetSuspensionDirection(value); + + /// + public float3 GetSteeringAxis() => ((WheelSettings)this).GetSteeringAxis(); + + /// + public void SetSteeringAxis(float3 value) => ((WheelSettings)this).SetSteeringAxis(value); + + /// + public float3 GetWheelUp() => ((WheelSettings)this).GetWheelUp(); + + /// + public void SetWheelUp(float3 value) => ((WheelSettings)this).SetWheelUp(value); + + /// + public float3 GetWheelForward() => ((WheelSettings)this).GetWheelForward(); + + /// + public void SetWheelForward(float3 value) => ((WheelSettings)this).SetWheelForward(value); + + /// + public float GetSuspensionMinLength() => ((WheelSettings)this).GetSuspensionMinLength(); + + /// + public void SetSuspensionMinLength(float value) => ((WheelSettings)this).SetSuspensionMinLength(value); + + /// + public float GetSuspensionMaxLength() => ((WheelSettings)this).GetSuspensionMaxLength(); + + /// + public void SetSuspensionMaxLength(float value) => ((WheelSettings)this).SetSuspensionMaxLength(value); + + /// + public float GetSuspensionPreloadLength() => ((WheelSettings)this).GetSuspensionPreloadLength(); + + /// + public void SetSuspensionPreloadLength(float value) => ((WheelSettings)this).SetSuspensionPreloadLength(value); + + /// + public SpringSettings GetSuspensionSpring() => ((WheelSettings)this).GetSuspensionSpring(); + + /// + public void SetSuspensionSpring(SpringSettings value) => ((WheelSettings)this).SetSuspensionSpring(value); + + /// + public float GetRadius() => ((WheelSettings)this).GetRadius(); + + /// + public void SetRadius(float value) => ((WheelSettings)this).SetRadius(value); + + /// + public float GetWidth() => ((WheelSettings)this).GetWidth(); + + /// + public void SetWidth(float value) => ((WheelSettings)this).SetWidth(value); + + /// + public bool GetEnableSuspensionForcePoint() => ((WheelSettings)this).GetEnableSuspensionForcePoint(); + + /// + public void SetEnableSuspensionForcePoint(bool value) => + ((WheelSettings)this).SetEnableSuspensionForcePoint(value); + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheelTV.gen.cs b/Brutal.Jolt/Generated/Classes/WheelTV.gen.cs new file mode 100644 index 0000000..c71e31d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheelTV.gen.cs @@ -0,0 +1,269 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Wheel object specifically for TrackedVehicleController + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:32 + ///
+ /// class WheelTV : public Wheel + ///
+ ///
+ [InteropHandle] + public readonly partial struct WheelTV : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:38 + ///
+ /// explicit WheelTV(const WheelSettingsTV &inWheel) + ///
+ ///
+ public static WheelTV Create(WheelSettingsTV wheel) => Jolt.PInvoke.WheelTV_Create(wheel); + + /// + /// + /// Override GetSettings and cast to the correct class + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:41 + ///
+ /// const WheelSettingsTV * GetSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public WheelSettingsTV GetSettings() => Jolt.PInvoke.WheelTV_GetSettings(this); + + /// + /// + /// Update the angular velocity of the wheel based on the angular velocity of the track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:44 + ///
+ /// void CalculateAngularVelocity(const VehicleConstraint &inConstraint) + ///
+ ///
+ public void CalculateAngularVelocity(VehicleConstraint constraint) => + Jolt.PInvoke.WheelTV_CalculateAngularVelocity(this, constraint); + + /// + /// + /// Update the wheel rotation based on the current angular velocity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:47 + ///
+ /// void Update(uint inWheelIndex, float inDeltaTime, const VehicleConstraint &inConstraint) + ///
+ ///
+ public void Update(uint wheelIndex, float deltaTime, VehicleConstraint constraint) + { + Jolt.PInvoke.WheelTV_Update(this, wheelIndex, deltaTime, constraint, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(wheelIndex), + wheelIndex, + "Expected an index below the number of wheels." + ); + } + + /// + /// + /// Index in mTracks to which this wheel is attached (calculated on initialization) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:49 + ///
+ /// int mTrackIndex = -1 + ///
+ ///
+ public int GetTrackIndex() => Jolt.PInvoke.WheelTV_GetTrackIndex(this); + + /// + /// + /// Index in mTracks to which this wheel is attached (calculated on initialization) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:49 + ///
+ /// int mTrackIndex = -1 + ///
+ ///
+ public void SetTrackIndex(int value) => Jolt.PInvoke.WheelTV_SetTrackIndex(this, value); + + /// + /// + /// Combined friction coefficient in longitudinal direction (combines terrain and track) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:50 + ///
+ /// float mCombinedLongitudinalFriction = 0.0f + ///
+ ///
+ public float GetCombinedLongitudinalFriction() => Jolt.PInvoke.WheelTV_GetCombinedLongitudinalFriction(this); + + /// + /// + /// Combined friction coefficient in longitudinal direction (combines terrain and track) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:50 + ///
+ /// float mCombinedLongitudinalFriction = 0.0f + ///
+ ///
+ public void SetCombinedLongitudinalFriction(float value) => + Jolt.PInvoke.WheelTV_SetCombinedLongitudinalFriction(this, value); + + /// + /// + /// Combined friction coefficient in lateral direction (combines terrain and track) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:51 + ///
+ /// float mCombinedLateralFriction = 0.0f + ///
+ ///
+ public float GetCombinedLateralFriction() => Jolt.PInvoke.WheelTV_GetCombinedLateralFriction(this); + + /// + /// + /// Combined friction coefficient in lateral direction (combines terrain and track) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:51 + ///
+ /// float mCombinedLateralFriction = 0.0f + ///
+ ///
+ public void SetCombinedLateralFriction(float value) => + Jolt.PInvoke.WheelTV_SetCombinedLateralFriction(this, value); + + /// + /// + /// Amount of impulse that the brakes can apply to the floor (excluding friction), spread out from brake + /// impulse applied on track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:52 + ///
+ /// float mBrakeImpulse = 0.0f + ///
+ ///
+ public float GetBrakeImpulse() => Jolt.PInvoke.WheelTV_GetBrakeImpulse(this); + + /// + /// + /// Amount of impulse that the brakes can apply to the floor (excluding friction), spread out from brake + /// impulse applied on track + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/TrackedVehicleController.h:52 + ///
+ /// float mBrakeImpulse = 0.0f + ///
+ ///
+ public void SetBrakeImpulse(float value) => Jolt.PInvoke.WheelTV_SetBrakeImpulse(this, value); + + public static implicit operator Wheel(WheelTV value) => Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.WheelTV_Destroy(this); + + /// + public float GetAngularVelocity() => ((Wheel)this).GetAngularVelocity(); + + /// + public void SetAngularVelocity(float vel) => ((Wheel)this).SetAngularVelocity(vel); + + /// + public float GetRotationAngle() => ((Wheel)this).GetRotationAngle(); + + /// + public void SetRotationAngle(float angle) => ((Wheel)this).SetRotationAngle(angle); + + /// + public float GetSteerAngle() => ((Wheel)this).GetSteerAngle(); + + /// + public void SetSteerAngle(float angle) => ((Wheel)this).SetSteerAngle(angle); + + /// + public bool HasContact() => ((Wheel)this).HasContact(); + + /// + public uint GetContactBodyID() => ((Wheel)this).GetContactBodyID(); + + /// + public uint GetContactSubShapeID() => ((Wheel)this).GetContactSubShapeID(); + + /// + public float3 GetContactPosition() => ((Wheel)this).GetContactPosition(); + + /// + public float3 GetContactPointVelocity() => ((Wheel)this).GetContactPointVelocity(); + + /// + public float3 GetContactNormal() => ((Wheel)this).GetContactNormal(); + + /// + public float3 GetContactLongitudinal() => ((Wheel)this).GetContactLongitudinal(); + + /// + public float3 GetContactLateral() => ((Wheel)this).GetContactLateral(); + + /// + public float GetSuspensionLength() => ((Wheel)this).GetSuspensionLength(); + + /// + public bool HasHitHardPoint() => ((Wheel)this).HasHitHardPoint(); + + /// + public float GetSuspensionLambda() => ((Wheel)this).GetSuspensionLambda(); + + /// + public float GetLongitudinalLambda() => ((Wheel)this).GetLongitudinalLambda(); + + /// + public float GetLateralLambda() => ((Wheel)this).GetLateralLambda(); + + /// + public bool SolveLongitudinalConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => + ((Wheel)this).SolveLongitudinalConstraintPart(constraint, minImpulse, maxImpulse); + + /// + public bool SolveLateralConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => + ((Wheel)this).SolveLateralConstraintPart(constraint, minImpulse, maxImpulse); + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheelWV.gen.cs b/Brutal.Jolt/Generated/Classes/WheelWV.gen.cs new file mode 100644 index 0000000..bd84b5d --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheelWV.gen.cs @@ -0,0 +1,293 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Wheel object specifically for WheeledVehicleController + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:41 + ///
+ /// class WheelWV : public Wheel + ///
+ ///
+ [InteropHandle] + public readonly partial struct WheelWV : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:47 + ///
+ /// explicit WheelWV(const WheelSettingsWV &inWheel) + ///
+ ///
+ public static WheelWV Create(WheelSettingsWV wheel) => Jolt.PInvoke.WheelWV_Create(wheel); + + /// + /// + /// Override GetSettings and cast to the correct class + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:50 + ///
+ /// const WheelSettingsWV * GetSettings() const + ///
+ ///
+ /// + /// + /// The returned handle carries its own reference; Dispose it once when you're done. + /// + /// + public WheelSettingsWV GetSettings() => Jolt.PInvoke.WheelWV_GetSettings(this); + + /// + /// + /// Apply a torque (N m) to the wheel for a particular delta time + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:53 + ///
+ /// void ApplyTorque(float inTorque, float inDeltaTime) + ///
+ ///
+ public void ApplyTorque(float torque, float deltaTime) => + Jolt.PInvoke.WheelWV_ApplyTorque(this, torque, deltaTime); + + /// + /// + /// Update the wheel rotation based on the current angular velocity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:59 + ///
+ /// void Update(uint inWheelIndex, float inDeltaTime, const VehicleConstraint &inConstraint) + ///
+ ///
+ public void Update(uint wheelIndex, float deltaTime, VehicleConstraint constraint) + { + Jolt.PInvoke.WheelWV_Update(this, wheelIndex, deltaTime, constraint, out var _inRange); + if (_inRange == 0) + throw new ArgumentOutOfRangeException( + nameof(wheelIndex), + wheelIndex, + "Expected an index below the number of wheels." + ); + } + + /// + /// + /// Velocity difference between ground and wheel relative to ground velocity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:61 + ///
+ /// float mLongitudinalSlip = 0.0f + ///
+ ///
+ public float GetLongitudinalSlip() => Jolt.PInvoke.WheelWV_GetLongitudinalSlip(this); + + /// + /// + /// Velocity difference between ground and wheel relative to ground velocity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:61 + ///
+ /// float mLongitudinalSlip = 0.0f + ///
+ ///
+ public void SetLongitudinalSlip(float value) => Jolt.PInvoke.WheelWV_SetLongitudinalSlip(this, value); + + /// + /// + /// Angular difference (in radians) between ground and wheel relative to ground velocity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:62 + ///
+ /// float mLateralSlip = 0.0f + ///
+ ///
+ public float GetLateralSlip() => Jolt.PInvoke.WheelWV_GetLateralSlip(this); + + /// + /// + /// Angular difference (in radians) between ground and wheel relative to ground velocity + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:62 + ///
+ /// float mLateralSlip = 0.0f + ///
+ ///
+ public void SetLateralSlip(float value) => Jolt.PInvoke.WheelWV_SetLateralSlip(this, value); + + /// + /// + /// Combined friction coefficient in longitudinal direction (combines terrain and tires) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:63 + ///
+ /// float mCombinedLongitudinalFriction = 0.0f + ///
+ ///
+ public float GetCombinedLongitudinalFriction() => Jolt.PInvoke.WheelWV_GetCombinedLongitudinalFriction(this); + + /// + /// + /// Combined friction coefficient in longitudinal direction (combines terrain and tires) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:63 + ///
+ /// float mCombinedLongitudinalFriction = 0.0f + ///
+ ///
+ public void SetCombinedLongitudinalFriction(float value) => + Jolt.PInvoke.WheelWV_SetCombinedLongitudinalFriction(this, value); + + /// + /// + /// Combined friction coefficient in lateral direction (combines terrain and tires) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:64 + ///
+ /// float mCombinedLateralFriction = 0.0f + ///
+ ///
+ public float GetCombinedLateralFriction() => Jolt.PInvoke.WheelWV_GetCombinedLateralFriction(this); + + /// + /// + /// Combined friction coefficient in lateral direction (combines terrain and tires) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:64 + ///
+ /// float mCombinedLateralFriction = 0.0f + ///
+ ///
+ public void SetCombinedLateralFriction(float value) => + Jolt.PInvoke.WheelWV_SetCombinedLateralFriction(this, value); + + /// + /// + /// Amount of impulse that the brakes can apply to the floor (excluding friction) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:65 + ///
+ /// float mBrakeImpulse = 0.0f + ///
+ ///
+ public float GetBrakeImpulse() => Jolt.PInvoke.WheelWV_GetBrakeImpulse(this); + + /// + /// + /// Amount of impulse that the brakes can apply to the floor (excluding friction) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:65 + ///
+ /// float mBrakeImpulse = 0.0f + ///
+ ///
+ public void SetBrakeImpulse(float value) => Jolt.PInvoke.WheelWV_SetBrakeImpulse(this, value); + + public static implicit operator Wheel(WheelWV value) => Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.WheelWV_Destroy(this); + + /// + public float GetAngularVelocity() => ((Wheel)this).GetAngularVelocity(); + + /// + public void SetAngularVelocity(float vel) => ((Wheel)this).SetAngularVelocity(vel); + + /// + public float GetRotationAngle() => ((Wheel)this).GetRotationAngle(); + + /// + public void SetRotationAngle(float angle) => ((Wheel)this).SetRotationAngle(angle); + + /// + public float GetSteerAngle() => ((Wheel)this).GetSteerAngle(); + + /// + public void SetSteerAngle(float angle) => ((Wheel)this).SetSteerAngle(angle); + + /// + public bool HasContact() => ((Wheel)this).HasContact(); + + /// + public uint GetContactBodyID() => ((Wheel)this).GetContactBodyID(); + + /// + public uint GetContactSubShapeID() => ((Wheel)this).GetContactSubShapeID(); + + /// + public float3 GetContactPosition() => ((Wheel)this).GetContactPosition(); + + /// + public float3 GetContactPointVelocity() => ((Wheel)this).GetContactPointVelocity(); + + /// + public float3 GetContactNormal() => ((Wheel)this).GetContactNormal(); + + /// + public float3 GetContactLongitudinal() => ((Wheel)this).GetContactLongitudinal(); + + /// + public float3 GetContactLateral() => ((Wheel)this).GetContactLateral(); + + /// + public float GetSuspensionLength() => ((Wheel)this).GetSuspensionLength(); + + /// + public bool HasHitHardPoint() => ((Wheel)this).HasHitHardPoint(); + + /// + public float GetSuspensionLambda() => ((Wheel)this).GetSuspensionLambda(); + + /// + public float GetLongitudinalLambda() => ((Wheel)this).GetLongitudinalLambda(); + + /// + public float GetLateralLambda() => ((Wheel)this).GetLateralLambda(); + + /// + public bool SolveLongitudinalConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => + ((Wheel)this).SolveLongitudinalConstraintPart(constraint, minImpulse, maxImpulse); + + /// + public bool SolveLateralConstraintPart(VehicleConstraint constraint, float minImpulse, float maxImpulse) => + ((Wheel)this).SolveLateralConstraintPart(constraint, minImpulse, maxImpulse); + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheeledVehicleController.gen.cs b/Brutal.Jolt/Generated/Classes/WheeledVehicleController.gen.cs new file mode 100644 index 0000000..8e79f11 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheeledVehicleController.gen.cs @@ -0,0 +1,325 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Runtime controller class + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:89 + ///
+ /// class WheeledVehicleController : public VehicleController + ///
+ ///
+ [InteropHandle] + public readonly partial struct WheeledVehicleController : IDisposable + { + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:95 + ///
+ /// WheeledVehicleController(const WheeledVehicleControllerSettings &inSettings, VehicleConstraint &inConstraint) + ///
+ ///
+ public static WheeledVehicleController Create( + WheeledVehicleControllerSettings settings, + VehicleConstraint constraint + ) => Jolt.PInvoke.WheeledVehicleController_Create(settings, constraint); + + /// + /// + /// Set input from driver + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:105 + ///
+ /// void SetDriverInput(float inForward, float inRight, float inBrake, float inHandBrake) + ///
+ ///
+ /// + /// + /// Set input from driver + /// @param inForward Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving direction and amount the gas pedal is pressed + /// @param inRight Value between -1 and 1 indicating desired steering angle (1 = right) + /// @param inBrake Value between 0 and 1 indicating how strong the brake pedal is pressed + /// @param inHandBrake Value between 0 and 1 indicating how strong the hand brake is pulled + /// + /// + public void SetDriverInput(float forward, float right, float brake, float handBrake) => + Jolt.PInvoke.WheeledVehicleController_SetDriverInput(this, forward, right, brake, handBrake); + + /// + /// + /// Value between -1 and 1 for auto transmission and value between 0 and 1 indicating desired driving + /// direction and amount the gas pedal is pressed + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:108 + ///
+ /// void SetForwardInput(float inForward) + ///
+ ///
+ public void SetForwardInput(float forward) => + Jolt.PInvoke.WheeledVehicleController_SetForwardInput(this, forward); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:109 + ///
+ /// float GetForwardInput() const + ///
+ ///
+ public float GetForwardInput() => Jolt.PInvoke.WheeledVehicleController_GetForwardInput(this); + + /// + /// + /// Value between -1 and 1 indicating desired steering angle (1 = right) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:112 + ///
+ /// void SetRightInput(float inRight) + ///
+ ///
+ public void SetRightInput(float right) => Jolt.PInvoke.WheeledVehicleController_SetRightInput(this, right); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:113 + ///
+ /// float GetRightInput() const + ///
+ ///
+ public float GetRightInput() => Jolt.PInvoke.WheeledVehicleController_GetRightInput(this); + + /// + /// + /// Value between 0 and 1 indicating how strong the brake pedal is pressed + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:116 + ///
+ /// void SetBrakeInput(float inBrake) + ///
+ ///
+ public void SetBrakeInput(float brake) => Jolt.PInvoke.WheeledVehicleController_SetBrakeInput(this, brake); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:117 + ///
+ /// float GetBrakeInput() const + ///
+ ///
+ public float GetBrakeInput() => Jolt.PInvoke.WheeledVehicleController_GetBrakeInput(this); + + /// + /// + /// Value between 0 and 1 indicating how strong the hand brake is pulled + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:120 + ///
+ /// void SetHandBrakeInput(float inHandBrake) + ///
+ ///
+ public void SetHandBrakeInput(float handBrake) => + Jolt.PInvoke.WheeledVehicleController_SetHandBrakeInput(this, handBrake); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:121 + ///
+ /// float GetHandBrakeInput() const + ///
+ ///
+ public float GetHandBrakeInput() => Jolt.PInvoke.WheeledVehicleController_GetHandBrakeInput(this); + + /// + /// + /// Get current engine state + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:124 + ///
+ /// const VehicleEngine & GetEngine() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleEngine GetEngine() => Jolt.PInvoke.WheeledVehicleController_GetEngine(this); + + /// + /// + /// Get current transmission state + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:130 + ///
+ /// const VehicleTransmission & GetTransmission() const + ///
+ ///
+ /// + /// + /// The returned handle is borrowed from its owner; don't Dispose it. + /// + /// + public VehicleTransmission GetTransmission() => Jolt.PInvoke.WheeledVehicleController_GetTransmission(this); + + /// + /// + /// Get the differentials this vehicle has (writable interface, allows you to make changes to the + /// configuration which will take effect the next time step) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:139 + ///
+ /// Differentials & GetDifferentials() + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetDifferentials() + { + Jolt.PInvoke.WheeledVehicleController_GetDifferentials(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// Ratio max / min average wheel speed of each differential (measured at the clutch). + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:142 + ///
+ /// float GetDifferentialLimitedSlipRatio() const + ///
+ ///
+ public float GetDifferentialLimitedSlipRatio() => + Jolt.PInvoke.WheeledVehicleController_GetDifferentialLimitedSlipRatio(this); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:143 + ///
+ /// void SetDifferentialLimitedSlipRatio(float inV) + ///
+ ///
+ public void SetDifferentialLimitedSlipRatio(float v) => + Jolt.PInvoke.WheeledVehicleController_SetDifferentialLimitedSlipRatio(this, v); + + /// + /// + /// Get the average wheel speed of all driven wheels (measured at the clutch) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:146 + ///
+ /// float GetWheelSpeedAtClutch() const + ///
+ ///
+ public float GetWheelSpeedAtClutch() => Jolt.PInvoke.WheeledVehicleController_GetWheelSpeedAtClutch(this); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:151 + ///
+ /// void SetTireMaxImpulseCallback(const TireMaxImpulseCallback &inTireMaxImpulseCallback) + ///
+ ///
+ /// + /// + /// tireMaxImpulseCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it verbatim. + /// Jolt calls it without a null check, so null is rejected. The callback and userData are retained by the + /// native object until they are replaced or the owner is destroyed - keep whatever userData points at (a + /// GCHandle, an allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + public unsafe void SetTireMaxImpulseCallback( + delegate* unmanaged[Cdecl]< + uint, + float*, + float*, + float, + float, + float, + float, + float, + float, + nint, + void> tireMaxImpulseCallback, + nint tireMaxImpulseCallbackUserData + ) + { + if (tireMaxImpulseCallback == null) + throw new ArgumentNullException(nameof(tireMaxImpulseCallback)); + Jolt.PInvoke.WheeledVehicleController_SetTireMaxImpulseCallback( + this, + tireMaxImpulseCallback, + tireMaxImpulseCallbackUserData + ); + } + + /// + /// + /// Debug drawing of RPM meter + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:155 + ///
+ /// void SetRPMMeter(Vec3Arg inPosition, float inSize) + ///
+ ///
+ public void SetRPMMeter(float3 position, float size) => + Jolt.PInvoke.WheeledVehicleController_SetRPMMeter(this, position, size); + + /// + public VehicleControllerSettings GetSettings() => ((VehicleController)this).GetSettings(); + + public static implicit operator VehicleController(WheeledVehicleController value) => + Unsafe.BitCast(value); + + public void Dispose() => Jolt.PInvoke.WheeledVehicleController_Destroy(this); + + /// + public VehicleConstraint GetConstraint() => ((VehicleController)this).GetConstraint(); + } +} diff --git a/Brutal.Jolt/Generated/Classes/WheeledVehicleControllerSettings.gen.cs b/Brutal.Jolt/Generated/Classes/WheeledVehicleControllerSettings.gen.cs new file mode 100644 index 0000000..af51766 --- /dev/null +++ b/Brutal.Jolt/Generated/Classes/WheeledVehicleControllerSettings.gen.cs @@ -0,0 +1,216 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Settings of a vehicle with regular wheels + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:72 + ///
+ /// class WheeledVehicleControllerSettings : public VehicleControllerSettings + ///
+ ///
+ /// + /// + /// Settings of a vehicle with regular wheels + /// + /// The properties in this controller are largely based on "Car Physics for Games" by Marco Monster. + /// See: https://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html + /// + /// + [InteropHandle] + public readonly partial struct WheeledVehicleControllerSettings : IDisposable + { + public static WheeledVehicleControllerSettings Create() => + Jolt.PInvoke.WheeledVehicleControllerSettings_Create(); + + /// + public RTTI GetRTTI() => ((VehicleControllerSettings)this).GetRTTI(); + + /// + public unsafe Ptr CastTo(RTTI rtti) => ((VehicleControllerSettings)this).CastTo(rtti); + + /// + public void SaveBinaryState(StreamOut stream) => ((VehicleControllerSettings)this).SaveBinaryState(stream); + + /// + public void RestoreBinaryState(StreamIn stream) => ((VehicleControllerSettings)this).RestoreBinaryState(stream); + + /// + /// + /// The properties of the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:82 + ///
+ /// VehicleEngineSettings mEngine + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public VehicleEngineSettings GetEngine() => Jolt.PInvoke.WheeledVehicleControllerSettings_GetEngine(this); + + /// + /// + /// The properties of the engine + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:82 + ///
+ /// VehicleEngineSettings mEngine + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetEngine(VehicleEngineSettings value) => + Jolt.PInvoke.WheeledVehicleControllerSettings_SetEngine(this, value); + + /// + /// + /// The properties of the transmission (aka gear box) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:83 + ///
+ /// VehicleTransmissionSettings mTransmission + ///
+ ///
+ /// + /// + /// The returned handle is an owned copy; Dispose it when you're done with it. + /// + /// + public VehicleTransmissionSettings GetTransmission() => + Jolt.PInvoke.WheeledVehicleControllerSettings_GetTransmission(this); + + /// + /// + /// The properties of the transmission (aka gear box) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:83 + ///
+ /// VehicleTransmissionSettings mTransmission + ///
+ ///
+ /// + /// + /// The value is copied into the field; the handle you pass stays yours to Dispose. + /// + /// + public void SetTransmission(VehicleTransmissionSettings value) => + Jolt.PInvoke.WheeledVehicleControllerSettings_SetTransmission(this, value); + + /// + /// + /// List of differentials and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:84 + ///
+ /// Array<VehicleDifferentialSettings> mDifferentials + ///
+ ///
+ /// + /// + /// The span is a view of the container's own storage, not a copy: edits land in the object that owns it. + /// It's only valid until that container is resized or its owner is destroyed. + /// + /// + [return: Brutal.Attributes.Fixed] + public unsafe Span GetDifferentials() + { + Jolt.PInvoke.WheeledVehicleControllerSettings_GetDifferentials(this, out var _outResult); + return new Span((void*)_outResult.Data, checked((int)_outResult.Count)); + } + + /// + /// + /// List of differentials and their properties + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:84 + ///
+ /// Array<VehicleDifferentialSettings> mDifferentials + ///
+ ///
+ public unsafe void SetDifferentials(ReadOnlySpan value) + { + fixed (VehicleDifferentialSettings* value_fixed = value) + { + Jolt.PInvoke.WheeledVehicleControllerSettings_SetDifferentials(this, value_fixed, (nuint)value.Length); + } + } + + /// + /// + /// Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is + /// exceeded all torque gets distributed to the differential with the minimal average velocity. This allows + /// implementing a limited slip differential between differentials. Set to FLT_MAX for an open differential. + /// Value should be > 1. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:85 + ///
+ /// float mDifferentialLimitedSlipRatio = 1.4f + ///
+ ///
+ public float GetDifferentialLimitedSlipRatio() => + Jolt.PInvoke.WheeledVehicleControllerSettings_GetDifferentialLimitedSlipRatio(this); + + /// + /// + /// Ratio max / min average wheel speed of each differential (measured at the clutch). When the ratio is + /// exceeded all torque gets distributed to the differential with the minimal average velocity. This allows + /// implementing a limited slip differential between differentials. Set to FLT_MAX for an open differential. + /// Value should be > 1. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:85 + ///
+ /// float mDifferentialLimitedSlipRatio = 1.4f + ///
+ ///
+ public void SetDifferentialLimitedSlipRatio(float value) => + Jolt.PInvoke.WheeledVehicleControllerSettings_SetDifferentialLimitedSlipRatio(this, value); + + public void AddRef() => ((VehicleControllerSettings)this).AddRef(); + + public void Release() => ((VehicleControllerSettings)this).Release(); + + public uint GetRefCount() => ((VehicleControllerSettings)this).GetRefCount(); + + public static implicit operator VehicleControllerSettings(WheeledVehicleControllerSettings value) => + Unsafe.BitCast(value); + + public void Dispose() + { + if (IsNull()) + return; + Release(); + } + } +} diff --git a/Brutal.Jolt/Generated/Enums/Activation.gen.cs b/Brutal.Jolt/Generated/Enums/Activation.gen.cs new file mode 100644 index 0000000..2ab5f5b --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/Activation.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum used by AddBody to determine if the body needs to be initially active + /// + /// + /// C++: + /// Jolt/Physics/EActivation.h:10 + ///
+ /// enum class EActivation + ///
+ ///
+ public enum Activation : int + { + /// + /// + /// Activate the body, making it part of the simulation + /// + /// + /// C++: + /// Jolt/Physics/EActivation.h:12 + ///
+ /// Activate + ///
+ ///
+ Activate, + + /// + /// + /// Leave activation state as it is (will not deactivate an active body) + /// + /// + /// C++: + /// Jolt/Physics/EActivation.h:13 + ///
+ /// DontActivate + ///
+ ///
+ DontActivate, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ActiveEdgeMode.gen.cs b/Brutal.Jolt/Generated/Enums/ActiveEdgeMode.gen.cs new file mode 100644 index 0000000..72a373c --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ActiveEdgeMode.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// How to treat active/inactive edges. An active edge is an edge that either has no neighbouring edge or if the + /// angle between the two connecting faces is too large, see: ActiveEdges + /// + /// + /// C++: + /// Jolt/Physics/Collision/ActiveEdgeMode.h:11 + ///
+ /// enum class EActiveEdgeMode : uint8 + ///
+ ///
+ public enum ActiveEdgeMode : byte + { + /// + /// + /// Do not collide with inactive edges. For physics simulation, this gives less ghost collisions. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ActiveEdgeMode.h:13 + ///
+ /// CollideOnlyWithActive + ///
+ ///
+ CollideOnlyWithActive, + + /// + /// + /// Collide with all edges. Use this when you're interested in all collisions. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ActiveEdgeMode.h:14 + ///
+ /// CollideWithAll + ///
+ ///
+ CollideWithAll, + } +} diff --git a/Brutal.Jolt/Generated/Enums/AllowedDOFs.gen.cs b/Brutal.Jolt/Generated/Enums/AllowedDOFs.gen.cs new file mode 100644 index 0000000..ff2c652 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/AllowedDOFs.gen.cs @@ -0,0 +1,138 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum used in BodyCreationSettings and MotionProperties to indicate which degrees of freedom a body has + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:10 + ///
+ /// enum class EAllowedDOFs : uint8 + ///
+ ///
+ public enum AllowedDOFs : byte + { + /// + /// + /// No degrees of freedom are allowed. Note that this is not valid and will crash. Use a static body + /// instead. + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:12 + ///
+ /// None = 0b000000 + ///
+ ///
+ None = 0, + + /// + /// + /// All degrees of freedom are allowed + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:13 + ///
+ /// All = 0b111111 + ///
+ ///
+ All = 63, + + /// + /// + /// Body can move in world space X axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:14 + ///
+ /// TranslationX = 0b000001 + ///
+ ///
+ TranslationX = 1, + + /// + /// + /// Body can move in world space Y axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:15 + ///
+ /// TranslationY = 0b000010 + ///
+ ///
+ TranslationY = 2, + + /// + /// + /// Body can move in world space Z axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:16 + ///
+ /// TranslationZ = 0b000100 + ///
+ ///
+ TranslationZ = 4, + + /// + /// + /// Body can rotate around world space X axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:17 + ///
+ /// RotationX = 0b001000 + ///
+ ///
+ RotationX = 8, + + /// + /// + /// Body can rotate around world space Y axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:18 + ///
+ /// RotationY = 0b010000 + ///
+ ///
+ RotationY = 16, + + /// + /// + /// Body can rotate around world space Z axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:19 + ///
+ /// RotationZ = 0b100000 + ///
+ ///
+ RotationZ = 32, + + /// + /// + /// Body can only move in X and Y axis and rotate around Z axis + /// + /// + /// C++: + /// Jolt/Physics/Body/AllowedDOFs.h:20 + ///
+ /// Plane2D = TranslationX | TranslationY | RotationZ + ///
+ ///
+ Plane2D = 35, + } +} diff --git a/Brutal.Jolt/Generated/Enums/BackFaceMode.gen.cs b/Brutal.Jolt/Generated/Enums/BackFaceMode.gen.cs new file mode 100644 index 0000000..9a0ec8e --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/BackFaceMode.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// How collision detection functions will treat back facing triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/BackFaceMode.h:10 + ///
+ /// enum class EBackFaceMode : uint8 + ///
+ ///
+ public enum BackFaceMode : byte + { + /// + /// + /// Ignore collision with back facing surfaces/triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/BackFaceMode.h:12 + ///
+ /// IgnoreBackFaces + ///
+ ///
+ IgnoreBackFaces, + + /// + /// + /// Collide with back facing surfaces/triangles + /// + /// + /// C++: + /// Jolt/Physics/Collision/BackFaceMode.h:13 + ///
+ /// CollideWithBackFaces + ///
+ ///
+ CollideWithBackFaces, + } +} diff --git a/Brutal.Jolt/Generated/Enums/BodyType.gen.cs b/Brutal.Jolt/Generated/Enums/BodyType.gen.cs new file mode 100644 index 0000000..5354617 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/BodyType.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Type of body + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyType.h:10 + ///
+ /// enum class EBodyType : uint8 + ///
+ ///
+ public enum BodyType : byte + { + /// + /// + /// Rigid body consisting of a rigid shape + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyType.h:12 + ///
+ /// RigidBody + ///
+ ///
+ RigidBody, + + /// + /// + /// Soft body consisting of a deformable shape + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyType.h:13 + ///
+ /// SoftBody + ///
+ ///
+ SoftBody, + } +} diff --git a/Brutal.Jolt/Generated/Enums/CanSleep.gen.cs b/Brutal.Jolt/Generated/Enums/CanSleep.gen.cs new file mode 100644 index 0000000..bbd0024 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/CanSleep.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum that determines if an object can go to sleep + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:21 + ///
+ /// enum class ECanSleep + ///
+ ///
+ public enum CanSleep : int + { + /// + /// + /// Object cannot go to sleep + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:23 + ///
+ /// CannotSleep = 0 + ///
+ ///
+ CannotSleep = 0, + + /// + /// + /// Object can go to sleep + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionProperties.h:24 + ///
+ /// CanSleep = 1 + ///
+ ///
+ CanSleep = 1, + } +} diff --git a/Brutal.Jolt/Generated/Enums/CollectFacesMode.gen.cs b/Brutal.Jolt/Generated/Enums/CollectFacesMode.gen.cs new file mode 100644 index 0000000..0842d11 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/CollectFacesMode.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Whether or not to collect faces, used by CastShape and CollideShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollectFacesMode.h:10 + ///
+ /// enum class ECollectFacesMode : uint8 + ///
+ ///
+ public enum CollectFacesMode : byte + { + /// + /// + /// mShape1/2Face is desired + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollectFacesMode.h:12 + ///
+ /// CollectFaces + ///
+ ///
+ CollectFaces, + + /// + /// + /// mShape1/2Face is not desired + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollectFacesMode.h:13 + ///
+ /// NoFaces + ///
+ ///
+ NoFaces, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ConstraintSpace.gen.cs b/Brutal.Jolt/Generated/Enums/ConstraintSpace.gen.cs new file mode 100644 index 0000000..f6db73e --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ConstraintSpace.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Certain constraints support setting them up in local or world space. This governs what is used. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:57 + ///
+ /// enum class EConstraintSpace + ///
+ ///
+ public enum ConstraintSpace : int + { + /// + /// + /// All constraint properties are specified in local space to center of mass of the bodies that are being + /// constrained (so e.g. 'constraint position 1' will be local to body 1 COM, 'constraint position 2' will + /// be local to body 2 COM). Note that this means you need to subtract Shape::GetCenterOfMass() from + /// positions! + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:59 + ///
+ /// LocalToBodyCOM + ///
+ ///
+ LocalToBodyCOM, + + /// + /// + /// All constraint properties are specified in world space + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:60 + ///
+ /// WorldSpace + ///
+ ///
+ WorldSpace, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ConstraintSubType.gen.cs b/Brutal.Jolt/Generated/Enums/ConstraintSubType.gen.cs new file mode 100644 index 0000000..8703fa2 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ConstraintSubType.gen.cs @@ -0,0 +1,193 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum to identify constraint sub type + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:33 + ///
+ /// enum class EConstraintSubType + ///
+ ///
+ public enum ConstraintSubType : int + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:35 + ///
+ /// Fixed + ///
+ ///
+ Fixed, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:36 + ///
+ /// Point + ///
+ ///
+ Point, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:37 + ///
+ /// Hinge + ///
+ ///
+ Hinge, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:38 + ///
+ /// Slider + ///
+ ///
+ Slider, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:39 + ///
+ /// Distance + ///
+ ///
+ Distance, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:40 + ///
+ /// Cone + ///
+ ///
+ Cone, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:41 + ///
+ /// SwingTwist + ///
+ ///
+ SwingTwist, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:42 + ///
+ /// SixDOF + ///
+ ///
+ SixDOF, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:43 + ///
+ /// Path + ///
+ ///
+ Path, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:44 + ///
+ /// Vehicle + ///
+ ///
+ Vehicle, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:45 + ///
+ /// RackAndPinion + ///
+ ///
+ RackAndPinion, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:46 + ///
+ /// Gear + ///
+ ///
+ Gear, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:47 + ///
+ /// Pulley + ///
+ ///
+ Pulley, + + /// + /// + /// User defined constraint types start here + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:50 + ///
+ /// User1 + ///
+ ///
+ User1, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:51 + ///
+ /// User2 + ///
+ ///
+ User2, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:52 + ///
+ /// User3 + ///
+ ///
+ User3, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:53 + ///
+ /// User4 + ///
+ ///
+ User4, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ConstraintType.gen.cs b/Brutal.Jolt/Generated/Enums/ConstraintType.gen.cs new file mode 100644 index 0000000..8deedf7 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ConstraintType.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum to identify constraint type + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:26 + ///
+ /// enum class EConstraintType + ///
+ ///
+ public enum ConstraintType : int + { + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:28 + ///
+ /// Constraint + ///
+ ///
+ Constraint, + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:29 + ///
+ /// TwoBodyConstraint + ///
+ ///
+ TwoBodyConstraint, + } +} diff --git a/Brutal.Jolt/Generated/Enums/MotionQuality.gen.cs b/Brutal.Jolt/Generated/Enums/MotionQuality.gen.cs new file mode 100644 index 0000000..8c2303e --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/MotionQuality.gen.cs @@ -0,0 +1,69 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Motion quality, or how well it detects collisions when it has a high velocity + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionQuality.h:10 + ///
+ /// enum class EMotionQuality : uint8 + ///
+ ///
+ public enum MotionQuality : byte + { + /// + /// + /// Update the body in discrete steps. Body will tunnel through thin objects if its velocity is high enough. + /// This is the cheapest way of simulating a body. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionQuality.h:14 + ///
+ /// Discrete + ///
+ ///
+ Discrete, + + /// + /// + /// Update the body using linear casting. When stepping the body, its collision shape is cast from start to + /// destination using the starting rotation. The body will not be able to tunnel through thin objects at + /// high velocity, but tunneling is still possible if the body is long and thin and has high angular + /// velocity. Time is stolen from the object (which means it will move up to the first collision and will + /// not bounce off the surface until the next integration step). This will make the body appear to go slower + /// when it collides with high velocity. In order to not get stuck, the body is always allowed to move by a + /// fraction of it's inner radius, which may eventually lead it to pass through geometry. + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionQuality.h:28 + ///
+ /// LinearCast + ///
+ ///
+ /// + /// + /// Update the body using linear casting. When stepping the body, its collision shape is cast from + /// start to destination using the starting rotation. The body will not be able to tunnel through thin + /// objects at high velocity, but tunneling is still possible if the body is long and thin and has high + /// angular velocity. Time is stolen from the object (which means it will move up to the first collision + /// and will not bounce off the surface until the next integration step). This will make the body appear + /// to go slower when it collides with high velocity. In order to not get stuck, the body is always + /// allowed to move by a fraction of it's inner radius, which may eventually lead it to pass through geometry. + /// + /// Note that if you're using a collision listener, you can receive contact added/persisted notifications of contacts + /// that may in the end not happen. This happens between bodies that are using casting: If bodies A and B collide at t1 + /// and B and C collide at t2 where t2 < t1 and A and C don't collide. In this case you may receive an incorrect contact + /// point added callback between A and B (which will be removed the next frame). + /// + /// + LinearCast, + } +} diff --git a/Brutal.Jolt/Generated/Enums/MotionType.gen.cs b/Brutal.Jolt/Generated/Enums/MotionType.gen.cs new file mode 100644 index 0000000..050ee9e --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/MotionType.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Motion type of a physics body + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionType.h:10 + ///
+ /// enum class EMotionType : uint8 + ///
+ ///
+ public enum MotionType : byte + { + /// + /// + /// Non movable + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionType.h:12 + ///
+ /// Static + ///
+ ///
+ Static, + + /// + /// + /// Movable using velocities only, does not respond to forces + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionType.h:13 + ///
+ /// Kinematic + ///
+ ///
+ Kinematic, + + /// + /// + /// Responds to forces as a normal physics object + /// + /// + /// C++: + /// Jolt/Physics/Body/MotionType.h:14 + ///
+ /// Dynamic + ///
+ ///
+ Dynamic, + } +} diff --git a/Brutal.Jolt/Generated/Enums/MotorState.gen.cs b/Brutal.Jolt/Generated/Enums/MotorState.gen.cs new file mode 100644 index 0000000..dc4393d --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/MotorState.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:16 + ///
+ /// enum class EMotorState + ///
+ ///
+ public enum MotorState : int + { + /// + /// + /// Motor is off + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:18 + ///
+ /// Off + ///
+ ///
+ Off, + + /// + /// + /// Motor will drive to target velocity limited only by max force/torque that the motor can apply + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:19 + ///
+ /// Velocity + ///
+ ///
+ Velocity, + + /// + /// + /// Motor will drive to target position using: force = stiffness * (target_position - current_position) - + /// damping * current_velocity + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:20 + ///
+ /// Position + ///
+ ///
+ Position, + + /// + /// + /// Motor will drive both to target position and velocity using: force = stiffness * (target_position - + /// current_position) + damping * (target_velocity - current_velocity) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:21 + ///
+ /// PositionAndVelocity + ///
+ ///
+ PositionAndVelocity, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ObjectStreamType.gen.cs b/Brutal.Jolt/Generated/Enums/ObjectStreamType.gen.cs new file mode 100644 index 0000000..08f5b5f --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ObjectStreamType.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Which of the two object-stream formats to write: Text is human-readable and diffable, Binary is smaller. + /// Reading needs no format: the stream's own header says which it is. Mirrors JPH::ObjectStream::EStreamType. + /// + /// + public enum ObjectStreamType + { + Text, + Binary, + } +} diff --git a/Brutal.Jolt/Generated/Enums/OverrideMassProperties.gen.cs b/Brutal.Jolt/Generated/Enums/OverrideMassProperties.gen.cs new file mode 100644 index 0000000..742a5cc --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/OverrideMassProperties.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum used in BodyCreationSettings to indicate how mass and inertia should be calculated + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:22 + ///
+ /// enum class EOverrideMassProperties : uint8 + ///
+ ///
+ public enum OverrideMassProperties : byte + { + /// + /// + /// Tells the system to calculate the mass and inertia based on density + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:24 + ///
+ /// CalculateMassAndInertia + ///
+ ///
+ CalculateMassAndInertia, + + /// + /// + /// Tells the system to take the mass from mMassPropertiesOverride and to calculate the inertia based on + /// density of the shapes and to scale it to the provided mass + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:25 + ///
+ /// CalculateInertia + ///
+ ///
+ CalculateInertia, + + /// + /// + /// Tells the system to take the mass and inertia from mMassPropertiesOverride + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:26 + ///
+ /// MassAndInertiaProvided + ///
+ ///
+ MassAndInertiaProvided, + } +} diff --git a/Brutal.Jolt/Generated/Enums/PathRotationConstraintType.gen.cs b/Brutal.Jolt/Generated/Enums/PathRotationConstraintType.gen.cs new file mode 100644 index 0000000..5ca01f5 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/PathRotationConstraintType.gen.cs @@ -0,0 +1,98 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// How to constrain the rotation of the body to a PathConstraint + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:21 + ///
+ /// enum class EPathRotationConstraintType + ///
+ ///
+ public enum PathRotationConstraintType : int + { + /// + /// + /// Do not constrain the rotation of the body at all + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:23 + ///
+ /// Free + ///
+ ///
+ Free, + + /// + /// + /// Only allow rotation around the tangent vector (following the path) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:24 + ///
+ /// ConstrainAroundTangent + ///
+ ///
+ ConstrainAroundTangent, + + /// + /// + /// Only allow rotation around the normal vector (perpendicular to the path) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:25 + ///
+ /// ConstrainAroundNormal + ///
+ ///
+ ConstrainAroundNormal, + + /// + /// + /// Only allow rotation around the binormal vector (perpendicular to the path) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:26 + ///
+ /// ConstrainAroundBinormal + ///
+ ///
+ ConstrainAroundBinormal, + + /// + /// + /// Fully constrain the rotation of body 2 to the path (following the tangent and normal of the path) + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:27 + ///
+ /// ConstrainToPath + ///
+ ///
+ ConstrainToPath, + + /// + /// + /// Fully constrain the rotation of the body 2 to the rotation of body 1 + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraint.h:28 + ///
+ /// FullyConstrained + ///
+ ///
+ FullyConstrained, + } +} diff --git a/Brutal.Jolt/Generated/Enums/PhysicsUpdateError.gen.cs b/Brutal.Jolt/Generated/Enums/PhysicsUpdateError.gen.cs new file mode 100644 index 0000000..b6bc855 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/PhysicsUpdateError.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum used by PhysicsSystem to report error conditions during the PhysicsSystem::Update call. This is a bit + /// field, multiple errors can trigger in the same update. + /// + /// + /// C++: + /// Jolt/Physics/EPhysicsUpdateError.h:10 + ///
+ /// enum class EPhysicsUpdateError : uint32 + ///
+ ///
+ [Flags] + public enum PhysicsUpdateError : uint + { + /// + /// + /// No errors + /// + /// + /// C++: + /// Jolt/Physics/EPhysicsUpdateError.h:12 + ///
+ /// None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// The manifold cache is full, this means that the total number of contacts between bodies is too high. + /// Some contacts were ignored. Increase inMaxContactConstraints in PhysicsSystem::Init. + /// + /// + /// C++: + /// Jolt/Physics/EPhysicsUpdateError.h:13 + ///
+ /// ManifoldCacheFull = 1 << 0 + ///
+ ///
+ ManifoldCacheFull = 1, + + /// + /// + /// The body pair cache is full, this means that too many bodies contacted. Some contacts were ignored. + /// Increase inMaxBodyPairs in PhysicsSystem::Init. + /// + /// + /// C++: + /// Jolt/Physics/EPhysicsUpdateError.h:14 + ///
+ /// BodyPairCacheFull = 1 << 1 + ///
+ ///
+ BodyPairCacheFull = 2, + + /// + /// + /// The contact constraints buffer is full. Some contacts were ignored. Increase inMaxContactConstraints in + /// PhysicsSystem::Init. + /// + /// + /// C++: + /// Jolt/Physics/EPhysicsUpdateError.h:15 + ///
+ /// ContactConstraintsFull = 1 << 2 + ///
+ ///
+ ContactConstraintsFull = 4, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ShapeSubType.gen.cs b/Brutal.Jolt/Generated/Enums/ShapeSubType.gen.cs new file mode 100644 index 0000000..6161ecd --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ShapeSubType.gen.cs @@ -0,0 +1,381 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// This enumerates all shape types, each shape can return its type through Shape::GetSubType + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:75 + ///
+ /// enum class EShapeSubType : uint8 + ///
+ ///
+ public enum ShapeSubType : byte + { + /// + /// + /// Convex shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:78 + ///
+ /// Sphere + ///
+ ///
+ Sphere, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:79 + ///
+ /// Box + ///
+ ///
+ Box, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:80 + ///
+ /// Triangle + ///
+ ///
+ Triangle, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:81 + ///
+ /// Capsule + ///
+ ///
+ Capsule, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:82 + ///
+ /// TaperedCapsule + ///
+ ///
+ TaperedCapsule, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:83 + ///
+ /// Cylinder + ///
+ ///
+ Cylinder, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:84 + ///
+ /// ConvexHull + ///
+ ///
+ ConvexHull, + + /// + /// + /// Compound shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:87 + ///
+ /// StaticCompound + ///
+ ///
+ StaticCompound, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:88 + ///
+ /// MutableCompound + ///
+ ///
+ MutableCompound, + + /// + /// + /// Decorated shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:91 + ///
+ /// RotatedTranslated + ///
+ ///
+ RotatedTranslated, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:92 + ///
+ /// Scaled + ///
+ ///
+ Scaled, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:93 + ///
+ /// OffsetCenterOfMass + ///
+ ///
+ OffsetCenterOfMass, + + /// + /// + /// Other shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:96 + ///
+ /// Mesh + ///
+ ///
+ Mesh, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:97 + ///
+ /// HeightField + ///
+ ///
+ HeightField, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:98 + ///
+ /// SoftBody + ///
+ ///
+ SoftBody, + + /// + /// + /// User defined shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:101 + ///
+ /// User1 + ///
+ ///
+ User1, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:102 + ///
+ /// User2 + ///
+ ///
+ User2, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:103 + ///
+ /// User3 + ///
+ ///
+ User3, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:104 + ///
+ /// User4 + ///
+ ///
+ User4, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:105 + ///
+ /// User5 + ///
+ ///
+ User5, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:106 + ///
+ /// User6 + ///
+ ///
+ User6, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:107 + ///
+ /// User7 + ///
+ ///
+ User7, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:108 + ///
+ /// User8 + ///
+ ///
+ User8, + + /// + /// + /// User defined convex shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:111 + ///
+ /// UserConvex1 + ///
+ ///
+ UserConvex1, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:112 + ///
+ /// UserConvex2 + ///
+ ///
+ UserConvex2, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:113 + ///
+ /// UserConvex3 + ///
+ ///
+ UserConvex3, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:114 + ///
+ /// UserConvex4 + ///
+ ///
+ UserConvex4, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:115 + ///
+ /// UserConvex5 + ///
+ ///
+ UserConvex5, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:116 + ///
+ /// UserConvex6 + ///
+ ///
+ UserConvex6, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:117 + ///
+ /// UserConvex7 + ///
+ ///
+ UserConvex7, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:118 + ///
+ /// UserConvex8 + ///
+ ///
+ UserConvex8, + + /// + /// + /// Other shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:121 + ///
+ /// Plane + ///
+ ///
+ Plane, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:122 + ///
+ /// TaperedCylinder + ///
+ ///
+ TaperedCylinder, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:123 + ///
+ /// Empty + ///
+ ///
+ Empty, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ShapeType.gen.cs b/Brutal.Jolt/Generated/Enums/ShapeType.gen.cs new file mode 100644 index 0000000..6e0acfb --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ShapeType.gen.cs @@ -0,0 +1,169 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Shapes are categorized in groups, each shape can return which group it belongs to through its Shape::GetType + /// function. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:55 + ///
+ /// enum class EShapeType : uint8 + ///
+ ///
+ public enum ShapeType : byte + { + /// + /// + /// Used by ConvexShape, all shapes that use the generic convex vs convex collision detection system (box, + /// sphere, capsule, tapered capsule, cylinder, triangle) + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:57 + ///
+ /// Convex + ///
+ ///
+ Convex, + + /// + /// + /// Used by CompoundShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:58 + ///
+ /// Compound + ///
+ ///
+ Compound, + + /// + /// + /// Used by DecoratedShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:59 + ///
+ /// Decorated + ///
+ ///
+ Decorated, + + /// + /// + /// Used by MeshShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:60 + ///
+ /// Mesh + ///
+ ///
+ Mesh, + + /// + /// + /// Used by HeightFieldShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:61 + ///
+ /// HeightField + ///
+ ///
+ HeightField, + + /// + /// + /// Used by SoftBodyShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:62 + ///
+ /// SoftBody + ///
+ ///
+ SoftBody, + + /// + /// + /// User defined shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:65 + ///
+ /// User1 + ///
+ ///
+ User1, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:66 + ///
+ /// User2 + ///
+ ///
+ User2, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:67 + ///
+ /// User3 + ///
+ ///
+ User3, + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:68 + ///
+ /// User4 + ///
+ ///
+ User4, + + /// + /// + /// Used by PlaneShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:70 + ///
+ /// Plane + ///
+ ///
+ Plane, + + /// + /// + /// Used by EmptyShape + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:71 + ///
+ /// Empty + ///
+ ///
+ Empty, + } +} diff --git a/Brutal.Jolt/Generated/Enums/SoftBodyConstraintColor.gen.cs b/Brutal.Jolt/Generated/Enums/SoftBodyConstraintColor.gen.cs new file mode 100644 index 0000000..c165dfc --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/SoftBodyConstraintColor.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Defines how to color soft body constraints + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:27 + ///
+ /// enum class ESoftBodyConstraintColor + ///
+ ///
+ public enum SoftBodyConstraintColor : int + { + /// + /// + /// Draw different types of constraints in different colors + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:29 + ///
+ /// ConstraintType + ///
+ ///
+ ConstraintType, + + /// + /// + /// Draw constraints in the same group in the same color, non-parallel group will be red + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:30 + ///
+ /// ConstraintGroup + ///
+ ///
+ ConstraintGroup, + + /// + /// + /// Draw constraints in the same group in the same color, non-parallel group will be red, and order within + /// each group will be indicated with gradient + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:31 + ///
+ /// ConstraintOrder + ///
+ ///
+ ConstraintOrder, + } +} diff --git a/Brutal.Jolt/Generated/Enums/SoftBodyValidateResult.gen.cs b/Brutal.Jolt/Generated/Enums/SoftBodyValidateResult.gen.cs new file mode 100644 index 0000000..0c66f71 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/SoftBodyValidateResult.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Return value for the OnSoftBodyContactValidate callback. Determines if the contact will be processed or not. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:13 + ///
+ /// enum class SoftBodyValidateResult + ///
+ ///
+ public enum SoftBodyValidateResult : int + { + /// + /// + /// Accept this contact + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:15 + ///
+ /// AcceptContact + ///
+ ///
+ AcceptContact, + + /// + /// + /// Reject this contact + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:16 + ///
+ /// RejectContact + ///
+ ///
+ RejectContact, + } +} diff --git a/Brutal.Jolt/Generated/Enums/SpringMode.gen.cs b/Brutal.Jolt/Generated/Enums/SpringMode.gen.cs new file mode 100644 index 0000000..56be2e6 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/SpringMode.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Enum used by constraints to specify how the spring is defined + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:15 + ///
+ /// enum class ESpringMode : uint8 + ///
+ ///
+ public enum SpringMode : byte + { + /// + /// + /// Frequency and damping are specified. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:17 + ///
+ /// FrequencyAndDamping + ///
+ ///
+ FrequencyAndDamping, + + /// + /// + /// Stiffness and damping are specified. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:18 + ///
+ /// StiffnessAndDamping + ///
+ ///
+ StiffnessAndDamping, + + /// + /// + /// Stiffness and damping divided by mass / inertia are specified (also known as acceleration mode). This + /// makes it easier to tune the spring and makes it mass independent. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/SpringSettings.h:19 + ///
+ /// MassNormalizedStiffnessAndDamping + ///
+ ///
+ MassNormalizedStiffnessAndDamping, + } +} diff --git a/Brutal.Jolt/Generated/Enums/StateRecorderState.gen.cs b/Brutal.Jolt/Generated/Enums/StateRecorderState.gen.cs new file mode 100644 index 0000000..2d7ae7f --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/StateRecorderState.gen.cs @@ -0,0 +1,98 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// A bit field that determines which aspects of the simulation to save + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:20 + ///
+ /// enum class EStateRecorderState : uint8 + ///
+ ///
+ public enum StateRecorderState : byte + { + /// + /// + /// Save nothing + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:22 + ///
+ /// None = 0 + ///
+ ///
+ None = 0, + + /// + /// + /// Save global physics system state (delta time, gravity, etc.) + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:23 + ///
+ /// Global = 1 + ///
+ ///
+ Global = 1, + + /// + /// + /// Save the state of bodies + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:24 + ///
+ /// Bodies = 2 + ///
+ ///
+ Bodies = 2, + + /// + /// + /// Save the state of contacts + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:25 + ///
+ /// Contacts = 4 + ///
+ ///
+ Contacts = 4, + + /// + /// + /// Save the state of constraints + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:26 + ///
+ /// Constraints = 8 + ///
+ ///
+ Constraints = 8, + + /// + /// + /// Save all state + /// + /// + /// C++: + /// Jolt/Physics/StateRecorder.h:27 + ///
+ /// All = Global | Bodies | Contacts | Constraints + ///
+ ///
+ All = 15, + } +} diff --git a/Brutal.Jolt/Generated/Enums/SwingType.gen.cs b/Brutal.Jolt/Generated/Enums/SwingType.gen.cs new file mode 100644 index 0000000..96ca4dd --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/SwingType.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// How the swing limit behaves + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:14 + ///
+ /// enum class ESwingType : uint8 + ///
+ ///
+ public enum SwingType : byte + { + /// + /// + /// Swing is limited by a cone shape, note that this cone starts to deform for larger swing angles. Cone + /// limits only support limits that are symmetric around 0. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:16 + ///
+ /// Cone + ///
+ ///
+ Cone, + + /// + /// + /// Swing is limited by a pyramid shape, note that this pyramid starts to deform for larger swing angles. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h:17 + ///
+ /// Pyramid + ///
+ ///
+ Pyramid, + } +} diff --git a/Brutal.Jolt/Generated/Enums/TrackSide.gen.cs b/Brutal.Jolt/Generated/Enums/TrackSide.gen.cs new file mode 100644 index 0000000..047989d --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/TrackSide.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// On which side of the vehicle the track is located (for steering) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:16 + ///
+ /// enum class ETrackSide : uint + ///
+ ///
+ public enum TrackSide : uint + { + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:18 + ///
+ /// Left = 0 + ///
+ ///
+ Left = 0, + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:19 + ///
+ /// Right = 1 + ///
+ ///
+ Right = 1, + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTrack.h:20 + ///
+ /// Num = 2 + ///
+ ///
+ Num = 2, + } +} diff --git a/Brutal.Jolt/Generated/Enums/TransmissionMode.gen.cs b/Brutal.Jolt/Generated/Enums/TransmissionMode.gen.cs new file mode 100644 index 0000000..2c464a6 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/TransmissionMode.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// How gears are shifted + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:15 + ///
+ /// enum class ETransmissionMode : uint8 + ///
+ ///
+ public enum TransmissionMode : byte + { + /// + /// + /// Automatically shift gear up and down + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:17 + ///
+ /// Auto + ///
+ ///
+ Auto, + + /// + /// + /// Manual gear shift (call SetTransmissionInput) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleTransmission.h:18 + ///
+ /// Manual + ///
+ ///
+ Manual, + } +} diff --git a/Brutal.Jolt/Generated/Enums/ValidateResult.gen.cs b/Brutal.Jolt/Generated/Enums/ValidateResult.gen.cs new file mode 100644 index 0000000..f4f4b64 --- /dev/null +++ b/Brutal.Jolt/Generated/Enums/ValidateResult.gen.cs @@ -0,0 +1,75 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// + /// + /// Return value for the OnContactValidate callback. Determines if the contact is being processed or not. + /// Results are ordered so that the strongest accept has the lowest number and the strongest reject the highest + /// number (which allows for easy combining of results) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:56 + ///
+ /// enum class ValidateResult + ///
+ ///
+ public enum ValidateResult : int + { + /// + /// + /// Accept this and any further contact points for this body pair + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:58 + ///
+ /// AcceptAllContactsForThisBodyPair + ///
+ ///
+ AcceptAllContactsForThisBodyPair, + + /// + /// + /// Accept this contact only (and continue calling this callback for every contact manifold for the same + /// body pair) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:59 + ///
+ /// AcceptContact + ///
+ ///
+ AcceptContact, + + /// + /// + /// Reject this contact only (but process any other contact manifolds for the same body pair) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:60 + ///
+ /// RejectContact + ///
+ ///
+ RejectContact, + + /// + /// + /// Rejects this and any further contact points for this body pair + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:61 + ///
+ /// RejectAllContactsForThisBodyPair + ///
+ ///
+ RejectAllContactsForThisBodyPair, + } +} diff --git a/Brutal.Jolt/Generated/GlobalUsings.gen.cs b/Brutal.Jolt/Generated/GlobalUsings.gen.cs new file mode 100644 index 0000000..09fd7f9 --- /dev/null +++ b/Brutal.Jolt/Generated/GlobalUsings.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +global using BiggerType = ulong; +global using ColorArg = uint; +global using difference_type = long; +global using GroupID = uint; +global using HalfFloat = ushort; +global using int32 = int; +global using int64 = long; +global using JobMask = uint; +global using MutexMask = ulong; +global using ObjectLayer = ushort; +global using Real = float; +global using SplitMask = uint; +global using SubGroupID = uint; +global using uint16 = ushort; +global using uint32 = uint; +global using uint64 = ulong; +global using uint8 = byte; +global using AddState = nint; +global using AlignedAllocateFunction = nint; +global using AlignedFreeFunction = nint; +global using AllocateFunction = nint; +global using ArgType = Brutal.Numerics.float3; +global using BodyPairHandle = nint; +global using CanMapJoint = nint; +global using CastShape = nint; +global using CollideShape = nint; +global using CollisionCollectorTraitsCollidePoint = Brutal.JoltApi.CollisionCollectorTraitsCollideShape; +global using CombineFunction = nint; +global using FreeFunction = nint; +global using IDToObjectMap = nint; +global using InitExitFunction = nint; +global using JobFunction = nint; +global using pCreateObjectFunction = nint; +global using pCreateRTTIFunction = nint; +global using pDestructObjectFunction = nint; +global using QuatArg = Brutal.Numerics.floatQuat; +global using Real3 = Brutal.Numerics.float3; +global using ReallocateFunction = nint; +global using Result = Brutal.Numerics.uint4; +global using RMat44 = Brutal.Numerics.float4x4; +global using RMat44Arg = Brutal.Numerics.float4x4; +global using RVec3 = Brutal.Numerics.float3; +global using RVec3Arg = Brutal.Numerics.float3; +global using SemaphoreType = nint; +global using SimCollideBodyVsBody = nint; +global using size_type = nuint; +global using StepCallback = nint; +global using SupportFunction = nint; +global using TireMaxImpulseCallback = nint; +global using TraceFunction = nint; +global using UVec4Arg = Brutal.Numerics.uint4; +global using Vec3Arg = Brutal.Numerics.float3; +global using Vec4Arg = Brutal.Numerics.float4; +global using Vertex = Brutal.JoltApi.SoftBodyVertex; diff --git a/Brutal.Jolt/Generated/InlineArrays.gen.cs b/Brutal.Jolt/Generated/InlineArrays.gen.cs new file mode 100644 index 0000000..870d650 --- /dev/null +++ b/Brutal.Jolt/Generated/InlineArrays.gen.cs @@ -0,0 +1,261 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// Represents an inline array of byte with a fixed size of 4288. + /// + [InlineArray(4288)] + public struct byte_4288 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 4288; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte Items; + } + + /// + /// Represents an inline array of float with a fixed size of 64. + /// + [InlineArray(64)] + public struct float_64 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 64; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float Items; + } + + /// + /// Represents an inline array of float3 with a fixed size of 3. + /// + [InlineArray(3)] + public struct float3_3 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 3; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float3 Items; + } + + /// + /// Represents an inline array of float4 with a fixed size of 32. + /// + [InlineArray(32)] + public struct float4_32 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 32; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float4 Items; + } + + /// + /// Represents an inline array of float4 with a fixed size of 64. + /// + [InlineArray(64)] + public struct float4_64 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 64; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public float4 Items; + } + + /// + /// Represents an inline array of int with a fixed size of 3. + /// + [InlineArray(3)] + public struct int_3 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 3; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public int Items; + } + + /// + /// Represents an inline array of nint with a fixed size of 4. + /// + [InlineArray(4)] + public struct nint_4 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 4; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public nint Items; + } + + /// + /// Represents an inline array of SoftBodySharedSettings.SkinWeight with a fixed size of 4. + /// + [InlineArray(4)] + public struct SkinWeight_4 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 4; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public SoftBodySharedSettings.SkinWeight Items; + } + + /// + /// Represents an inline array of uint with a fixed size of 2. + /// + [InlineArray(2)] + public struct uint_2 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 2; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public uint Items; + } + + /// + /// Represents an inline array of uint with a fixed size of 3. + /// + [InlineArray(3)] + public struct uint_3 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 3; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public uint Items; + } + + /// + /// Represents an inline array of uint with a fixed size of 4. + /// + [InlineArray(4)] + public struct uint_4 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 4; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public uint Items; + } + + /// + /// Represents an inline array of ushort with a fixed size of 4. + /// + [InlineArray(4)] + public struct ushort_4 + { + /// + /// The number of elements in the inline array. + /// + public const int Length = 4; + + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ushort Items; + } + + /// + /// + /// A fixed-capacity JPH::StaticArray<float, 64>: the first Size entries of Elements are live. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 260)] + public struct StaticArrayFloat_64 + { + [FieldOffset(0)] + public uint Size; + + [FieldOffset(4)] + public float_64 Elements; + } + + /// + /// + /// A fixed-capacity JPH::StaticArray<Vec3, 32>: the first Size entries of Elements are live. Each slot is + /// a 16-byte Vec3, so xyz is the vector and w is padding. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 528)] + public struct StaticArrayVec3_32 + { + [FieldOffset(0)] + public uint Size; + + [FieldOffset(16)] + public float4_32 Elements; + } + + /// + /// + /// A fixed-capacity JPH::StaticArray<Vec3, 64>: the first Size entries of Elements are live. Each slot is + /// a 16-byte Vec3, so xyz is the vector and w is padding. + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 1040)] + public struct StaticArrayVec3_64 + { + [FieldOffset(0)] + public uint Size; + + [FieldOffset(16)] + public float4_64 Elements; + } +} diff --git a/Brutal.Jolt/Generated/Jolt.gen.cs b/Brutal.Jolt/Generated/Jolt.gen.cs new file mode 100644 index 0000000..925777a --- /dev/null +++ b/Brutal.Jolt/Generated/Jolt.gen.cs @@ -0,0 +1,1276 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + /// + /// + /// Register platform default allocation / free functions + /// + /// + /// C++: + /// Jolt/Core/Memory.h:35 + ///
+ /// void RegisterDefaultAllocator() + ///
+ ///
+ public static void RegisterDefaultAllocator() => Jolt.PInvoke.RegisterDefaultAllocator(); + + /// + /// + /// Implements the FNV-1a hash algorithm + /// + /// + /// C++: + /// Jolt/Core/HashCombine.h:15 + ///
+ /// inline uint64 HashBytes(const void *inData, uint inSize, uint64 inSeed = 0xcbf29ce484222325UL) + ///
+ ///
+ /// + /// + /// Implements the FNV-1a hash algorithm + /// @see https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + /// @param inData Data block of bytes + /// @param inSize Number of bytes + /// @param inSeed Seed of the hash (can be used to pass in the hash of a previous operation, otherwise leave default) + /// @return Hash + /// + /// + public static unsafe ulong HashBytes(Ptr data, ByteSize size, ulong seed) => + Jolt.PInvoke.HashBytes(data, (uint)size, seed); + + /// + /// + /// Calculate the FNV-1a hash of inString. + /// + /// + /// C++: + /// Jolt/Core/HashCombine.h:28 + ///
+ /// constexpr uint64 HashString(const char *inString, uint64 inSeed = 0xcbf29ce484222325UL) + ///
+ ///
+ /// + /// + /// Calculate the FNV-1a hash of inString. + /// @see https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + /// + /// + public static unsafe ulong HashString(RefString8 @string, ulong seed) + { + fixed (byte* @string_fixed = @string) + { + return Jolt.PInvoke.HashString(@string_fixed, seed); + } + } + + /// + /// + /// A 64 bit hash function by Thomas Wang, Jan 1997 See: + /// http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm + /// + /// + /// C++: + /// Jolt/Core/HashCombine.h:43 + ///
+ /// inline uint64 Hash64(uint64 inValue) + ///
+ ///
+ /// + /// + /// A 64 bit hash function by Thomas Wang, Jan 1997 + /// See: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm + /// @param inValue Value to hash + /// @return Hash + /// + /// + public static ulong Hash64(ulong value) => Jolt.PInvoke.Hash64(value); + + /// + /// + /// Convert a value from degrees to radians + /// + /// + /// C++: + /// Jolt/Math/Math.h:16 + ///
+ /// constexpr float DegreesToRadians(float inV) + ///
+ ///
+ public static float DegreesToRadians(float v) => Jolt.PInvoke.DegreesToRadians(v); + + /// + /// + /// Convert a value from radians to degrees + /// + /// + /// C++: + /// Jolt/Math/Math.h:22 + ///
+ /// constexpr float RadiansToDegrees(float inV) + ///
+ ///
+ public static float RadiansToDegrees(float v) => Jolt.PInvoke.RadiansToDegrees(v); + + /// + /// + /// Convert angle in radians to the range \f$[-\pi, \pi]\f$ + /// + /// + /// C++: + /// Jolt/Math/Math.h:28 + ///
+ /// inline float CenterAngleAroundZero(float inV) + ///
+ ///
+ public static float CenterAngleAroundZero(float v) => Jolt.PInvoke.CenterAngleAroundZero(v); + + /// + /// + /// Calculates inA * inB - inC * inD with higher accuracy when fused multiply add instructions are + /// available. If inA * inB and inC * inD are large, the subtraction can cause a large loss of precision + /// when the result is small. See: https://pharr.org/matt/blog/2019/11/03/difference-of-floats (or search + /// for Kahan's algorithm) + /// + /// + /// C++: + /// Jolt/Math/Math.h:49 + ///
+ /// float DifferenceOfProducts(float inA, float inB, float inC, float inD) + ///
+ ///
+ public static float DifferenceOfProducts(float a, float b, float c, float d) => + Jolt.PInvoke.DifferenceOfProducts(a, b, c, d); + + /// + /// + /// Take the square root of a float value + /// + /// + /// C++: + /// Jolt/Math/Math.h:76 + ///
+ /// float Sqrt(float inV) + ///
+ ///
+ public static float Sqrt(float v) => Jolt.PInvoke.Sqrt(v); + + /// + /// + /// Take the square root of a double value + /// + /// + /// C++: + /// Jolt/Math/Math.h:92 + ///
+ /// double Sqrt(double inV) + ///
+ ///
+ public static double Sqrt(double v) => Jolt.PInvoke.Sqrt_2(v); + + /// + /// + /// Compute number of trailing zero bits (how many low bits are zero) + /// + /// + /// C++: + /// Jolt/Math/Math.h:145 + ///
+ /// inline uint CountTrailingZeros(uint32 inValue) + ///
+ ///
+ public static uint CountTrailingZeros(uint value) => Jolt.PInvoke.CountTrailingZeros(value); + + /// + /// + /// Compute the number of leading zero bits (how many high bits are zero) + /// + /// + /// C++: + /// Jolt/Math/Math.h:181 + ///
+ /// inline uint CountLeadingZeros(uint32 inValue) + ///
+ ///
+ public static uint CountLeadingZeros(uint value) => Jolt.PInvoke.CountLeadingZeros(value); + + /// + /// + /// Count the number of 1 bits in a value + /// + /// + /// C++: + /// Jolt/Math/Math.h:211 + ///
+ /// inline uint CountBits(uint32 inValue) + ///
+ ///
+ public static uint CountBits(uint value) => Jolt.PInvoke.CountBits(value); + + /// + /// + /// Get the next higher power of 2 of a value, or the value itself if the value is already a power of 2 + /// + /// + /// C++: + /// Jolt/Math/Math.h:232 + ///
+ /// inline uint32 GetNextPowerOf2(uint32 inValue) + ///
+ ///
+ public static uint GetNextPowerOf2(uint value) => Jolt.PInvoke.GetNextPowerOf2(value); + + /// + /// + /// Sine of x (input in radians) + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:12 + ///
+ /// float Sin(float inX) + ///
+ ///
+ public static float Sin(float x) => Jolt.PInvoke.Sin(x); + + /// + /// + /// Cosine of x (input in radians) + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:20 + ///
+ /// float Cos(float inX) + ///
+ ///
+ public static float Cos(float x) => Jolt.PInvoke.Cos(x); + + /// + /// + /// Tangent of x (input in radians) + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:28 + ///
+ /// float Tan(float inX) + ///
+ ///
+ public static float Tan(float x) => Jolt.PInvoke.Tan(x); + + /// + /// + /// Arc sine of x (returns value in the range [-PI / 2, PI / 2]) Note that all input values will be clamped + /// to the range [-1, 1] and this function will not return NaNs like std::asin + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:35 + ///
+ /// float ASin(float inX) + ///
+ ///
+ public static float ASin(float x) => Jolt.PInvoke.ASin(x); + + /// + /// + /// Arc cosine of x (returns value in the range [0, PI]) Note that all input values will be clamped to the + /// range [-1, 1] and this function will not return NaNs like std::acos + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:42 + ///
+ /// float ACos(float inX) + ///
+ ///
+ public static float ACos(float x) => Jolt.PInvoke.ACos(x); + + /// + /// + /// An approximation of ACos, max error is 4.2e-3 over the entire range [-1, 1], is approximately 2.5x + /// faster than ACos + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:48 + ///
+ /// float ACosApproximate(float inX) + ///
+ ///
+ public static float ACosApproximate(float x) => Jolt.PInvoke.ACosApproximate(x); + + /// + /// + /// Arc tangent of x (returns value in the range [-PI / 2, PI / 2]) + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:68 + ///
+ /// float ATan(float inX) + ///
+ ///
+ public static float ATan(float x) => Jolt.PInvoke.ATan(x); + + /// + /// + /// Arc tangent of y / x using the signs of the arguments to determine the correct quadrant (returns value + /// in the range [-PI, PI]) + /// + /// + /// C++: + /// Jolt/Math/Trigonometry.h:74 + ///
+ /// float ATan2(float inY, float inX) + ///
+ ///
+ public static float ATan2(float y, float x) => Jolt.PInvoke.ATan2(y, x); + + /// + /// + /// Intersect ray with triangle, returns closest point or FLT_MAX if no hit (branch less version) Adapted + /// from: http://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm + /// + /// + /// C++: + /// Jolt/Geometry/RayTriangle.h:11 + ///
+ /// float RayTriangle(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2) + ///
+ ///
+ public static float RayTriangle(float3 origin, float3 direction, float3 v0, float3 v1, float3 v2) => + Jolt.PInvoke.RayTriangle(origin, direction, v0, v1, v2); + + /// + /// + /// Intersect ray with 4 triangles in SOA format, returns 4 vector of closest points or FLT_MAX if no hit + /// (uses bit tricks to do less divisions) + /// + /// + /// C++: + /// Jolt/Geometry/RayTriangle.h:76 + ///
+ /// Vec4 RayTriangle4(Vec3Arg inOrigin, Vec3Arg inDirection, Vec4Arg inV0X, Vec4Arg inV0Y, Vec4Arg inV0Z, Vec4Arg inV1X, Vec4Arg inV1Y, Vec4Arg inV1Z, Vec4Arg inV2X, Vec4Arg inV2Y, Vec4Arg inV2Z) + ///
+ ///
+ public static float4 RayTriangle4( + float3 origin, + float3 direction, + float4 v0x, + float4 v0y, + float4 v0z, + float4 v1x, + float4 v1y, + float4 v1z, + float4 v2x, + float4 v2y, + float4 v2z + ) => Jolt.PInvoke.RayTriangle4(origin, direction, v0x, v0y, v0z, v1x, v1y, v1z, v2x, v2y, v2z); + + /// + /// + /// Construct a string that lists the most important configuration settings + /// + /// + /// C++: + /// Jolt/ConfigurationString.h:10 + ///
+ /// inline const char *GetConfigurationString() + ///
+ ///
+ public static unsafe RefString8 GetConfigurationString() => (Ptr)Jolt.PInvoke.GetConfigurationString(); + + /// + /// + /// Functionality to get the processors cycle counter + /// + /// + /// C++: + /// Jolt/Core/TickCounter.h:28 + ///
+ /// uint64 GetProcessorTickCount() + ///
+ ///
+ public static ulong GetProcessorTickCount() => Jolt.PInvoke.GetProcessorTickCount(); + + /// + /// + /// Convert a string to lower case + /// + /// + /// C++: + /// Jolt/Core/StringTools.h:33 + ///
+ /// String ToLower(const string_view &inString) + ///
+ ///
+ /// + /// + /// The text is copied into a managed string; the native buffer behind it is reused by the next + /// string-returning call on this thread. + /// + /// + public static unsafe string ToLower(RefString8 @string) + { + fixed (byte* @string_fixed = @string) + { + return Marshal.PtrToStringUTF8(Jolt.PInvoke.ToLower(@string_fixed)) ?? string.Empty; + } + } + + /// + /// + /// Converts the lower 4 bits of inNibble to a string that represents the number in binary format + /// + /// + /// C++: + /// Jolt/Core/StringTools.h:36 + ///
+ /// const char *NibbleToBinary(uint32 inNibble) + ///
+ ///
+ public static unsafe RefString8 NibbleToBinary(uint nibble) => (Ptr)Jolt.PInvoke.NibbleToBinary(nibble); + + /// + /// + /// Helper functions that process 4 axis aligned boxes at the same time using SIMD Test if 4 bounding boxes + /// overlap with 1 bounding box, splat 1 box + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:13 + ///
+ /// UVec4 AABox4VsBox(const AABox &inBox1, Vec4Arg inBox2MinX, Vec4Arg inBox2MinY, Vec4Arg inBox2MinZ, Vec4Arg inBox2MaxX, Vec4Arg inBox2MaxY, Vec4Arg inBox2MaxZ) + ///
+ ///
+ public static uint4 AABox4VsBox( + in AABox box1, + float4 box2MinX, + float4 box2MinY, + float4 box2MinZ, + float4 box2MaxX, + float4 box2MaxY, + float4 box2MaxZ + ) => Jolt.PInvoke.AABox4VsBox(in box1, box2MinX, box2MinY, box2MinZ, box2MaxX, box2MaxY, box2MaxZ); + + /// + /// + /// Test if 4 bounding boxes overlap with an oriented box + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:88 + ///
+ /// UVec4 AABox4VsBox(Mat44Arg inOrientation, Vec3Arg inHalfExtents, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ, float inEpsilon = 1.0e-6f) + ///
+ ///
+ public static uint4 AABox4VsBox( + in float4x4 orientation, + float3 halfExtents, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ, + float epsilon = 1E-06f + ) => + Jolt.PInvoke.AABox4VsBox_2( + in orientation, + halfExtents, + boxMinX, + boxMinY, + boxMinZ, + boxMaxX, + boxMaxY, + boxMaxZ, + epsilon + ); + + /// + /// + /// Convenience function that tests 4 AABoxes vs OrientedBox + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:187 + ///
+ /// UVec4 AABox4VsBox(const OrientedBox &inBox, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ, float inEpsilon = 1.0e-6f) + ///
+ ///
+ public static uint4 AABox4VsBox( + OrientedBox box, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ, + float epsilon = 1E-06f + ) => Jolt.PInvoke.AABox4VsBox_3(box, boxMinX, boxMinY, boxMinZ, boxMaxX, boxMaxY, boxMaxZ, epsilon); + + /// + /// + /// Test if 4 bounding boxes overlap with a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:71 + ///
+ /// UVec4 AABox4VsPoint(Vec3Arg inPoint, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ) + ///
+ ///
+ public static uint4 AABox4VsPoint( + float3 point, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ) => Jolt.PInvoke.AABox4VsPoint(point, boxMinX, boxMinY, boxMinZ, boxMaxX, boxMaxY, boxMaxZ); + + /// + /// + /// Get the squared distance between 4 AABoxes and a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:193 + ///
+ /// Vec4 AABox4DistanceSqToPoint(Vec4Arg inPointX, Vec4Arg inPointY, Vec4Arg inPointZ, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ) + ///
+ ///
+ public static float4 AABox4DistanceSqToPoint( + float4 pointX, + float4 pointY, + float4 pointZ, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ) => + Jolt.PInvoke.AABox4DistanceSqToPoint( + pointX, + pointY, + pointZ, + boxMinX, + boxMinY, + boxMinZ, + boxMaxX, + boxMaxY, + boxMaxZ + ); + + /// + /// + /// Get the squared distance between 4 AABoxes and a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:205 + ///
+ /// Vec4 AABox4DistanceSqToPoint(Vec3 inPoint, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ) + ///
+ ///
+ public static float4 AABox4DistanceSqToPoint( + float3 point, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ) => Jolt.PInvoke.AABox4DistanceSqToPoint_2(point, boxMinX, boxMinY, boxMinZ, boxMaxX, boxMaxY, boxMaxZ); + + /// + /// + /// Test 4 AABoxes vs a sphere + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:211 + ///
+ /// UVec4 AABox4VsSphere(Vec4Arg inCenterX, Vec4Arg inCenterY, Vec4Arg inCenterZ, Vec4Arg inRadiusSq, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ) + ///
+ ///
+ public static uint4 AABox4VsSphere( + float4 centerX, + float4 centerY, + float4 centerZ, + float4 radiusSq, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ) => + Jolt.PInvoke.AABox4VsSphere( + centerX, + centerY, + centerZ, + radiusSq, + boxMinX, + boxMinY, + boxMinZ, + boxMaxX, + boxMaxY, + boxMaxZ + ); + + /// + /// + /// Test 4 AABoxes vs a sphere + /// + /// + /// C++: + /// Jolt/Geometry/AABox4.h:219 + ///
+ /// UVec4 AABox4VsSphere(Vec3Arg inCenter, float inRadiusSq, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ) + ///
+ ///
+ public static uint4 AABox4VsSphere( + float3 center, + float radiusSq, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ) => Jolt.PInvoke.AABox4VsSphere_2(center, radiusSq, boxMinX, boxMinY, boxMinZ, boxMaxX, boxMaxY, boxMaxZ); + + /// + /// + /// Take a list of triangles and get the unique set of vertices and use them to create indexed triangles. + /// Vertices that are less than inVertexWeldDistance apart will be combined to a single vertex. + /// + /// + /// C++: + /// Jolt/Geometry/Indexify.h:14 + ///
+ /// void Indexify(const TriangleList &inTriangles, VertexList &outVertices, IndexedTriangleList &outTriangles, float inVertexWeldDistance = 1.0e-4f) + ///
+ ///
+ /// + /// + /// inTriangles is copied into a native container for the call; the span is only read. + /// + /// + /// outVertices is an owned native buffer - read it through AsSpan() and Dispose it when you are done with + /// it. + /// + /// + /// outTriangles is an owned native buffer - read it through AsSpan() and Dispose it when you are done with + /// it. + /// + /// + public static unsafe void Indexify( + ReadOnlySpan inTriangles, + out NativeArray outVertices, + out NativeArray outTriangles, + float inVertexWeldDistance = 0.0001f + ) + { + fixed (Triangle* inTriangles_fixed = inTriangles) + { + Jolt.PInvoke.Indexify( + inTriangles_fixed, + (nuint)inTriangles.Length, + out var outVertices_raw, + out var outTriangles_raw, + inVertexWeldDistance + ); + outVertices = new NativeArray(outVertices_raw); + outTriangles = new NativeArray(outTriangles_raw); + } + } + + /// + /// + /// Take a list of indexed triangles and unpack them + /// + /// + /// C++: + /// Jolt/Geometry/Indexify.h:17 + ///
+ /// void Deindexify(const VertexList &inVertices, const IndexedTriangleList &inTriangles, TriangleList &outTriangles) + ///
+ ///
+ /// + /// + /// inVertices is copied into a native container for the call; the span is only read. + /// + /// + /// inTriangles is copied into a native container for the call; the span is only read. + /// + /// + /// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. + /// + /// + public static unsafe NativeArray Deindexify( + ReadOnlySpan inVertices, + ReadOnlySpan inTriangles + ) + { + fixed (IndexedTriangle* inTriangles_fixed = inTriangles) + fixed (float3* inVertices_fixed = inVertices) + { + Jolt.PInvoke.Deindexify( + inVertices_fixed, + (nuint)inVertices.Length, + inTriangles_fixed, + (nuint)inTriangles.Length, + out var outTriangles_raw + ); + return new NativeArray(outTriangles_raw); + } + } + + /// + /// + /// Intersect AABB with ray, returns minimal distance along ray or FLT_MAX if no hit Note: Can return + /// negative value if ray starts in box + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:33 + ///
+ /// float RayAABox(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax) + ///
+ ///
+ public static float RayAABox(float3 origin, RayInvDirection invDirection, float3 boundsMin, float3 boundsMax) => + Jolt.PInvoke.RayAABox(origin, invDirection, boundsMin, boundsMax); + + /// + /// + /// Intersect AABB with ray, returns minimal and maximal distance along ray or FLT_MAX, -FLT_MAX if no hit + /// Note: Can return negative value for outMin if ray starts in box + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:136 + ///
+ /// void RayAABox(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax, float &outMin, float &outMax) + ///
+ ///
+ public static void RayAABox( + float3 origin, + RayInvDirection invDirection, + float3 boundsMin, + float3 boundsMax, + out float min, + out float max + ) => Jolt.PInvoke.RayAABox_2(origin, invDirection, boundsMin, boundsMax, out min, out max); + + /// + /// + /// Intersect 4 AABBs with ray, returns minimal distance along ray or FLT_MAX if no hit Note: Can return + /// negative value if ray starts in box + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:72 + ///
+ /// Vec4 RayAABox4(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec4Arg inBoundsMinX, Vec4Arg inBoundsMinY, Vec4Arg inBoundsMinZ, Vec4Arg inBoundsMaxX, Vec4Arg inBoundsMaxY, Vec4Arg inBoundsMaxZ) + ///
+ ///
+ public static float4 RayAABox4( + float3 origin, + RayInvDirection invDirection, + float4 boundsMinX, + float4 boundsMinY, + float4 boundsMinZ, + float4 boundsMaxX, + float4 boundsMaxY, + float4 boundsMaxZ + ) => + Jolt.PInvoke.RayAABox4( + origin, + invDirection, + boundsMinX, + boundsMinY, + boundsMinZ, + boundsMaxX, + boundsMaxY, + boundsMaxZ + ); + + /// + /// + /// Intersect AABB with ray, returns true if there is a hit closer than inClosest + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:175 + ///
+ /// bool RayAABoxHits(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax, float inClosest) + ///
+ ///
+ public static bool RayAABoxHits( + float3 origin, + RayInvDirection invDirection, + float3 boundsMin, + float3 boundsMax, + float closest + ) => Jolt.PInvoke.RayAABoxHits(origin, invDirection, boundsMin, boundsMax, closest); + + /// + /// + /// Intersect AABB with ray without hit fraction, based on separating axis test + /// + /// + /// C++: + /// Jolt/Geometry/RayAABox.h:216 + ///
+ /// bool RayAABoxHits(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax) + ///
+ ///
+ /// + /// + /// Intersect AABB with ray without hit fraction, based on separating axis test + /// @see http://www.codercorner.com/RayAABB.cpp + /// + /// + public static bool RayAABoxHits(float3 origin, float3 direction, float3 boundsMin, float3 boundsMax) => + Jolt.PInvoke.RayAABoxHits_2(origin, direction, boundsMin, boundsMax); + + /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against an infinite + /// cylinder centered along the Y axis + /// + /// + /// C++: + /// Jolt/Geometry/RayCylinder.h:17 + ///
+ /// float RayCylinder(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCylinderRadius) + ///
+ ///
+ /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection + /// against an infinite cylinder centered along the Y axis + /// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray. + /// @param inRayDirection Direction of the ray. Does not need to be normalized. + /// @param inRayOrigin Origin of the ray. If the ray starts inside the cylinder, the returned fraction will be 0. + /// @param inCylinderRadius Radius of the infinite cylinder + /// + /// + public static float RayCylinder(float3 rayOrigin, float3 rayDirection, float cylinderRadius) => + Jolt.PInvoke.RayCylinder(rayOrigin, rayDirection, cylinderRadius); + + /// + /// + /// Test a ray against a cylinder centered around the origin with its axis along the Y axis and half height + /// specified. + /// + /// + /// C++: + /// Jolt/Geometry/RayCylinder.h:57 + ///
+ /// float RayCylinder(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCylinderHalfHeight, float inCylinderRadius) + ///
+ ///
+ /// + /// + /// Test a ray against a cylinder centered around the origin with its axis along the Y axis and half height specified. + /// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray. + /// @param inRayDirection Ray direction. Does not need to be normalized. + /// @param inRayOrigin Origin of the ray. If the ray starts inside the cylinder, the returned fraction will be 0. + /// @param inCylinderRadius Radius of the cylinder + /// @param inCylinderHalfHeight Distance from the origin to the top (or bottom) of the cylinder + /// + /// + public static float RayCylinder( + float3 rayOrigin, + float3 rayDirection, + float cylinderHalfHeight, + float cylinderRadius + ) => Jolt.PInvoke.RayCylinder_2(rayOrigin, rayDirection, cylinderHalfHeight, cylinderRadius); + + /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a sphere, + /// + /// + /// C++: + /// Jolt/Geometry/RaySphere.h:17 + ///
+ /// float RaySphere(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, Vec3Arg inSphereCenter, float inSphereRadius) + ///
+ ///
+ /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a sphere, + /// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray. + /// @param inRayOrigin Ray origin. If the ray starts inside the sphere, the returned fraction will be 0. + /// @param inRayDirection Ray direction. Does not need to be normalized. + /// @param inSphereCenter Position of the center of the sphere + /// @param inSphereRadius Radius of the sphere + /// + /// + public static float RaySphere(float3 rayOrigin, float3 rayDirection, float3 sphereCenter, float sphereRadius) => + Jolt.PInvoke.RaySphere(rayOrigin, rayDirection, sphereCenter, sphereRadius); + + /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a sphere. Outputs + /// entry and exit points (outMinFraction and outMaxFraction) along the ray (which could be negative if the + /// hit point is before the start of the ray). + /// + /// + /// C++: + /// Jolt/Geometry/RaySphere.h:54 + ///
+ /// int RaySphere(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, Vec3Arg inSphereCenter, float inSphereRadius, float &outMinFraction, float &outMaxFraction) + ///
+ ///
+ /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a sphere. + /// Outputs entry and exit points (outMinFraction and outMaxFraction) along the ray (which could be negative if the hit point is before the start of the ray). + /// @param inRayOrigin Ray origin. If the ray starts inside the sphere, the returned fraction will be 0. + /// @param inRayDirection Ray direction. Does not need to be normalized. + /// @param inSphereCenter Position of the center of the sphere. + /// @param inSphereRadius Radius of the sphere. + /// @param outMinFraction Returned lowest intersection fraction + /// @param outMaxFraction Returned highest intersection fraction + /// @return The amount of intersections with the sphere. + /// If 1 intersection is returned outMinFraction will be equal to outMaxFraction + /// + /// + public static int RaySphere( + float3 rayOrigin, + float3 rayDirection, + float3 sphereCenter, + float sphereRadius, + out float minFraction, + out float maxFraction + ) => + Jolt.PInvoke.RaySphere_2( + rayOrigin, + rayDirection, + sphereCenter, + sphereRadius, + out minFraction, + out maxFraction + ); + + /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a capsule + /// centered around the origin with its axis along the Y axis and half height specified. + /// + /// + /// C++: + /// Jolt/Geometry/RayCapsule.h:19 + ///
+ /// float RayCapsule(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCapsuleHalfHeight, float inCapsuleRadius) + ///
+ ///
+ /// + /// + /// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection + /// against a capsule centered around the origin with its axis along the Y axis and half height specified. + /// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray. + /// @param inRayDirection Ray direction. Does not need to be normalized. + /// @param inRayOrigin Origin of the ray. If the ray starts inside the capsule, the returned fraction will be 0. + /// @param inCapsuleHalfHeight Distance from the origin to the center of the top sphere (or that of the bottom) + /// @param inCapsuleRadius Radius of the top/bottom sphere + /// + /// + public static float RayCapsule( + float3 rayOrigin, + float3 rayDirection, + float capsuleHalfHeight, + float capsuleRadius + ) => Jolt.PInvoke.RayCapsule(rayOrigin, rayDirection, capsuleHalfHeight, capsuleRadius); + + /// + /// + /// This function estimates the contact impulses and body velocity changes as a result of a collision. It + /// can be used in the ContactListener::OnContactAdded to determine the strength of the collision to e.g. + /// play a sound or trigger a particle system. This function is accurate when two bodies collide but will + /// not be accurate when more than 2 bodies collide at the same time as it does not know about these other + /// collisions. + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:42 + ///
+ /// void EstimateCollisionResponse(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, CollisionEstimationResult &outResult, float inCombinedFriction, float inCombinedRestitution, float inMinVelocityForRestitution = 1.0f, uint inNumIterations = 10) + ///
+ ///
+ /// + /// + /// This function estimates the contact impulses and body velocity changes as a result of a collision. + /// It can be used in the ContactListener::OnContactAdded to determine the strength of the collision to e.g. play a sound or trigger a particle system. + /// This function is accurate when two bodies collide but will not be accurate when more than 2 bodies collide at the same time as it does not know about these other collisions. + /// + /// @param inBody1 Colliding body 1 + /// @param inBody2 Colliding body 2 + /// @param inManifold The collision manifold + /// @param outResult A structure that contains the estimated contact and friction impulses and the resulting body velocities + /// @param inCombinedFriction The combined friction of body 1 and body 2 (see ContactSettings::mCombinedFriction) + /// @param inCombinedRestitution The combined restitution of body 1 and body 2 (see ContactSettings::mCombinedRestitution) + /// @param inMinVelocityForRestitution Minimal velocity required for restitution to be applied (see PhysicsSettings::mMinVelocityForRestitution) + /// @param inNumIterations Number of iterations to use for the impulse estimation (see PhysicsSettings::mNumVelocitySteps, note you can probably use a lower number for a decent estimate). If you set the number of iterations to 1 then no friction will be calculated. + /// + /// + public static void EstimateCollisionResponse( + Body body1, + Body body2, + in ContactManifold manifold, + ref CollisionEstimationResult result, + float combinedFriction, + float combinedRestitution, + float minVelocityForRestitution = 1f, + uint numIterations = 10 + ) => + Jolt.PInvoke.EstimateCollisionResponse( + body1, + body2, + in manifold, + ref result, + combinedFriction, + combinedRestitution, + minVelocityForRestitution, + numIterations + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h:20 + ///
+ /// void PruneContactPoints(Vec3Arg inPenetrationAxis, ContactPoints &ioContactPointsOn1, ContactPoints &ioContactPointsOn2 + ///
+ ///
+ /// + /// + /// Throws ArgumentException for contactPointsOn1: "contactPointsOn1 must hold more than 4 points (at most + /// 64); with 4 or fewer there's nothing to prune." Throws ArgumentException for contactPointsOn2: + /// "contactPointsOn2 must hold as many points as contactPointsOn1." + /// + /// + public static void PruneContactPoints( + float3 penetrationAxis, + ref StaticArrayVec3_64 contactPointsOn1, + ref StaticArrayVec3_64 contactPointsOn2, + float3 centerOfMass + ) + { + Jolt.PInvoke.PruneContactPoints( + penetrationAxis, + ref contactPointsOn1, + ref contactPointsOn2, + centerOfMass, + out var _bufferCheck + ); + if (_bufferCheck == 1) + throw new ArgumentException( + "contactPointsOn1 must hold more than 4 points (at most 64); with 4 or fewer there's nothing to prune.", + nameof(contactPointsOn1) + ); + if (_bufferCheck == 2) + throw new ArgumentException( + "contactPointsOn2 must hold as many points as contactPointsOn1.", + nameof(contactPointsOn2) + ); + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h:38 + ///
+ /// void ManifoldBetweenTwoFaces(Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inPenetrationAxis, float inMaxContactDistance, const ConvexShape::SupportingFace &inShape1Face, const ConvexShape::SupportingFace &inShape2Face, ContactPoints &outContactPoints1, ContactPoints &outContactPoints2 + ///
+ ///
+ /// + /// + /// shape1Face is copied into a fixed 32-element native container for the call; anything past that is + /// ignored. + /// + /// + /// shape2Face is copied into a fixed 32-element native container for the call; anything past that is + /// ignored. + /// + /// + public static unsafe void ManifoldBetweenTwoFaces( + float3 contactPoint1, + float3 contactPoint2, + float3 penetrationAxis, + float maxContactDistance, + ReadOnlySpan shape1Face, + ReadOnlySpan shape2Face, + out StaticArrayVec3_64 contactPoints1, + out StaticArrayVec3_64 contactPoints2, + float3 centerOfMass + ) + { + fixed (float3* shape2Face_fixed = shape2Face) + fixed (float3* shape1Face_fixed = shape1Face) + { + Jolt.PInvoke.ManifoldBetweenTwoFaces( + contactPoint1, + contactPoint2, + penetrationAxis, + maxContactDistance, + shape1Face_fixed, + (nuint)shape1Face.Length, + shape2Face_fixed, + (nuint)shape2Face.Length, + out contactPoints1, + out contactPoints2, + centerOfMass + ); + } + } + + /// + /// + /// Ability to check if position/velocity is enabled for a motor state + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:25 + ///
+ /// constexpr bool IsVelocityMotor(EMotorState inMotorState) { return (int(inMotorState) & int(EMotorState::Velocity)) != 0; } + ///
+ ///
+ public static bool IsVelocityMotor(MotorState motorState) => Jolt.PInvoke.IsVelocityMotor(motorState); + + /// + /// + /// C++: + /// Jolt/Physics/Constraints/MotorSettings.h:26 + ///
+ /// constexpr bool IsPositionMotor(EMotorState inMotorState) { return (int(inMotorState) & int(EMotorState::Position)) != 0; } + ///
+ ///
+ public static bool IsPositionMotor(MotorState motorState) => Jolt.PInvoke.IsPositionMotor(motorState); + + /// + /// + /// Internal helper function + /// + /// + /// C++: + /// Jolt/RegisterTypes.h:10 + ///
+ /// extern bool VerifyJoltVersionIDInternal(uint64 inVersionID) + ///
+ ///
+ public static bool VerifyJoltVersionIDInternal(ulong versionID) => + Jolt.PInvoke.VerifyJoltVersionIDInternal(versionID); + + /// + /// + /// This function can be used to verify the library ABI is compatible with your application. Use it in this + /// way: `assert(VerifyJoltVersionID());`. Returns `false` if the library used is not compatible with your + /// app. + /// + /// + /// C++: + /// Jolt/RegisterTypes.h:16 + ///
+ /// bool VerifyJoltVersionID() + ///
+ ///
+ public static bool VerifyJoltVersionID() => Jolt.PInvoke.VerifyJoltVersionID(); + + /// + /// + /// Internal helper function + /// + /// + /// C++: + /// Jolt/RegisterTypes.h:19 + ///
+ /// extern void RegisterTypesInternal(uint64 inVersionID) + ///
+ ///
+ public static void RegisterTypesInternal(ulong versionID) => Jolt.PInvoke.RegisterTypesInternal(versionID); + + /// + /// + /// Register all physics types with the factory and install their collision handlers with the + /// CollisionDispatch class. If you have your own custom shape types you probably need to register their + /// handlers with the CollisionDispatch before calling this function. If you implement your own default + /// material (PhysicsMaterial::sDefault) make sure to initialize it before this function or else this + /// function will create one for you. + /// + /// + /// C++: + /// Jolt/RegisterTypes.h:24 + ///
+ /// void RegisterTypes() + ///
+ ///
+ public static void RegisterTypes() => Jolt.PInvoke.RegisterTypes(); + + /// + /// + /// Unregisters all types with the factory and cleans up the default material + /// + /// + /// C++: + /// Jolt/RegisterTypes.h:27 + ///
+ /// extern void UnregisterTypes() + ///
+ ///
+ public static void UnregisterTypes() => Jolt.PInvoke.UnregisterTypes(); + + /// + /// + /// The error message from the most recent failed Result-returning call on this thread, the text the + /// throwing wrappers (ShapeSettings.CreateShape and friends) report. + /// + /// + public static string GetLastError() => Marshal.PtrToStringUTF8(Jolt.PInvoke.GetLastError()) ?? string.Empty; + + /// + /// + /// Installs the function Jolt calls when one of its asserts fails, and returns whether the loaded natives + /// have asserts at all - only Debug natives, or ones built with JOLT_DEBUG, do. The handler gets the failed + /// expression, an optional message (may be null), and the file and line as UTF-8 C strings; returning true + /// breaks into the debugger, false carries on as a release build would. It runs on whichever thread + /// asserted, Jolt's workers included, so it must be a static method marked [UnmanagedCallersOnly(CallConvs + /// = [typeof(CallConvCdecl)])] and must not throw. Pass null to put back Jolt's default, which breaks. Jolt + /// reads the hook unsynchronised, so set it while no physics update is running. + /// + /// + public static unsafe bool SetAssertHandler( + delegate* unmanaged[Cdecl] handler + ) => Jolt.PInvoke.SetAssertHandler(handler); + + /// + /// + /// Installs the function Jolt's log messages go to, as a formatted UTF-8 C string (at most 1023 bytes). It + /// runs on whichever thread logged, Jolt's workers included, so it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], thread-safe, and must not throw. Pass null + /// to drop the messages. Either way Jolt's own default, which asserts, is replaced - so natives built with + /// asserts don't treat a log line as a failure. Call it before the first physics update: swapping handlers + /// later is safe, but the first call installs Jolt's trace hook, which Jolt itself only expects to change + /// while nothing is running. + /// + /// + public static unsafe void SetTraceHandler(delegate* unmanaged[Cdecl] handler) => + Jolt.PInvoke.SetTraceHandler(handler); + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/AABBTreeBuilder.gen.cs b/Brutal.Jolt/Generated/PInvoke/AABBTreeBuilder.gen.cs new file mode 100644 index 0000000..19cd0ba --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/AABBTreeBuilder.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "AABBTreeBuilder_Create")] + public static partial AABBTreeBuilder AABBTreeBuilder_Create( + TriangleSplitter splitter, + uint maxTrianglesPerLeaf + ); + + [LibraryImport("jolt", EntryPoint = "AABBTreeBuilder_Destroy")] + public static partial void AABBTreeBuilder_Destroy(AABBTreeBuilder self); + + /// + [LibraryImport("jolt", EntryPoint = "AABBTreeBuilder_GetTriangles")] + public static partial void AABBTreeBuilder_GetTriangles(AABBTreeBuilder self, out NativeSpanView outResult); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/AABox.gen.cs b/Brutal.Jolt/Generated/PInvoke/AABox.gen.cs new file mode 100644 index 0000000..a44e464 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/AABox.gen.cs @@ -0,0 +1,435 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "AABox_Create")] + public static partial AABox AABox_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "AABox_Create_2")] + public static partial AABox AABox_Create_2(float3 min, float3 max); + + /// + [LibraryImport("jolt", EntryPoint = "AABox_Create_3")] + public static partial AABox AABox_Create_3(double3 min, double3 max); + + /// + [LibraryImport("jolt", EntryPoint = "AABox_Create_4")] + public static partial AABox AABox_Create_4(float3 center, float radius); + + /// + [LibraryImport("jolt", EntryPoint = "AABox_FromTwoPoints")] + public static partial AABox AABox_FromTwoPoints(float3 p1, float3 p2); + + /// + [LibraryImport("jolt", EntryPoint = "AABox_FromTriangle")] + public static partial AABox AABox_FromTriangle( + float3* vertices, + nuint verticesCount, + in IndexedTriangle triangle + ); + + /// + [LibraryImport("jolt", EntryPoint = "AABox_Biggest")] + public static partial AABox AABox_Biggest(); + + /// + /// + /// Reset the bounding box to an empty bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:49 + ///
+ /// void SetEmpty() + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_SetEmpty")] + public static partial void AABox_SetEmpty(ref AABox self); + + /// + /// + /// Check if the bounding box is valid (max >= min) + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:56 + ///
+ /// bool IsValid() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_IsValid")] + public static partial Brutal.Bool8 AABox_IsValid(ref AABox self); + + /// + /// + /// Encapsulate triangle in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:87 + ///
+ /// void Encapsulate(const VertexList &inVertices, const IndexedTriangle &inTriangle) + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + [LibraryImport("jolt", EntryPoint = "AABox_Encapsulate")] + public static partial void AABox_Encapsulate( + ref AABox self, + float3* vertices, + nuint verticesCount, + in IndexedTriangle triangle + ); + + /// + /// + /// Encapsulate point in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:62 + ///
+ /// void Encapsulate(Vec3Arg inPos) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Encapsulate_2")] + public static partial void AABox_Encapsulate_2(ref AABox self, float3 pos); + + /// + /// + /// Encapsulate bounding box in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:69 + ///
+ /// void Encapsulate(const AABox &inRHS) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Encapsulate_3")] + public static partial void AABox_Encapsulate_3(ref AABox self, in AABox rhs); + + /// + /// + /// Encapsulate triangle in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:76 + ///
+ /// void Encapsulate(const Triangle &inRHS) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Encapsulate_4")] + public static partial void AABox_Encapsulate_4(ref AABox self, in Triangle rhs); + + /// + /// + /// Intersect this bounding box with inOther, returns the intersection + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:94 + ///
+ /// AABox Intersect(const AABox &inOther) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Intersect")] + public static partial AABox AABox_Intersect(ref AABox self, in AABox other); + + /// + /// + /// Make sure that each edge of the bounding box has a minimal length + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:100 + ///
+ /// void EnsureMinimalEdgeLength(float inMinEdgeLength) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_EnsureMinimalEdgeLength")] + public static partial void AABox_EnsureMinimalEdgeLength(ref AABox self, float minEdgeLength); + + /// + /// + /// Widen the box on both sides by inVector + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:107 + ///
+ /// void ExpandBy(Vec3Arg inVector) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_ExpandBy")] + public static partial void AABox_ExpandBy(ref AABox self, float3 vector); + + /// + /// + /// Get center of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:114 + ///
+ /// Vec3 GetCenter() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetCenter")] + public static partial float3 AABox_GetCenter(ref AABox self); + + /// + /// + /// Get extent of bounding box (half of the size) + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:120 + ///
+ /// Vec3 GetExtent() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetExtent")] + public static partial float3 AABox_GetExtent(ref AABox self); + + /// + /// + /// Get size of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:126 + ///
+ /// Vec3 GetSize() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetSize")] + public static partial float3 AABox_GetSize(ref AABox self); + + /// + /// + /// Get surface area of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:132 + ///
+ /// float GetSurfaceArea() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetSurfaceArea")] + public static partial float AABox_GetSurfaceArea(ref AABox self); + + /// + /// + /// Get volume of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:139 + ///
+ /// float GetVolume() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetVolume")] + public static partial float AABox_GetVolume(ref AABox self); + + /// + /// + /// Check if this box contains another box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:146 + ///
+ /// bool Contains(const AABox &inOther) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Contains")] + public static partial Brutal.Bool8 AABox_Contains(ref AABox self, in AABox other); + + /// + /// + /// Check if this box contains a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:152 + ///
+ /// bool Contains(Vec3Arg inOther) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Contains_2")] + public static partial Brutal.Bool8 AABox_Contains_2(ref AABox self, float3 other); + + /// + /// + /// Check if this box contains a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:158 + ///
+ /// bool Contains(DVec3Arg inOther) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Contains_3")] + public static partial Brutal.Bool8 AABox_Contains_3(ref AABox self, double3 other); + + /// + /// + /// Check if this box overlaps with another box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:164 + ///
+ /// bool Overlaps(const AABox &inOther) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Overlaps")] + public static partial Brutal.Bool8 AABox_Overlaps(ref AABox self, in AABox other); + + /// + /// + /// Check if this box overlaps with a plane + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:170 + ///
+ /// bool Overlaps(const Plane &inPlane) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Overlaps_2")] + public static partial Brutal.Bool8 AABox_Overlaps_2(ref AABox self, in Plane plane); + + /// + /// + /// Translate bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:179 + ///
+ /// void Translate(Vec3Arg inTranslation) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Translate")] + public static partial void AABox_Translate(ref AABox self, float3 translation); + + /// + /// + /// Translate bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:186 + ///
+ /// void Translate(DVec3Arg inTranslation) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Translate_2")] + public static partial void AABox_Translate_2(ref AABox self, double3 translation); + + /// + /// + /// Transform bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:193 + ///
+ /// AABox Transformed(Mat44Arg inMatrix) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Transformed")] + public static partial AABox AABox_Transformed(ref AABox self, in float4x4 matrix); + + /// + /// + /// Transform bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:216 + ///
+ /// AABox Transformed(DMat44Arg inMatrix) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Transformed_2")] + public static partial AABox AABox_Transformed_2(ref AABox self, in double4x4 matrix); + + /// + /// + /// Scale this bounding box, can handle non-uniform and negative scaling + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:224 + ///
+ /// AABox Scaled(Vec3Arg inScale) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_Scaled")] + public static partial AABox AABox_Scaled(ref AABox self, float3 scale); + + /// + /// + /// Calculate the support vector for this convex shape. + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:230 + ///
+ /// Vec3 GetSupport(Vec3Arg inDirection) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetSupport")] + public static partial float3 AABox_GetSupport(ref AABox self, float3 direction); + + /// + /// + /// Get the closest point on or in this box to inPoint + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:297 + ///
+ /// Vec3 GetClosestPoint(Vec3Arg inPoint) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetClosestPoint")] + public static partial float3 AABox_GetClosestPoint(ref AABox self, float3 point); + + /// + /// + /// Get the squared distance between inPoint and this box (will be 0 if in Point is inside the box) + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:303 + ///
+ /// inline float GetSqDistanceTo(Vec3Arg inPoint) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "AABox_GetSqDistanceTo")] + public static partial float AABox_GetSqDistanceTo(ref AABox self, float3 point); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/AngleConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/AngleConstraintPart.gen.cs new file mode 100644 index 0000000..4b184b8 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/AngleConstraintPart.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_Create")] + public static partial AngleConstraintPart AngleConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_Destroy")] + public static partial void AngleConstraintPart_Destroy(AngleConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_CalculateConstraintProperties")] + public static partial void AngleConstraintPart_CalculateConstraintProperties( + AngleConstraintPart self, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "AngleConstraintPart_CalculateConstraintPropertiesWithFrequencyAndDamping" + )] + public static partial void AngleConstraintPart_CalculateConstraintPropertiesWithFrequencyAndDamping( + AngleConstraintPart self, + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + float frequency, + float damping + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "AngleConstraintPart_CalculateConstraintPropertiesWithStiffnessAndDamping" + )] + public static partial void AngleConstraintPart_CalculateConstraintPropertiesWithStiffnessAndDamping( + AngleConstraintPart self, + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + float stiffness, + float damping + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "AngleConstraintPart_CalculateConstraintPropertiesWithSettingsForLimit" + )] + public static partial void AngleConstraintPart_CalculateConstraintPropertiesWithSettingsForLimit( + AngleConstraintPart self, + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "AngleConstraintPart_CalculateConstraintPropertiesWithSettingsForMotor" + )] + public static partial void AngleConstraintPart_CalculateConstraintPropertiesWithSettingsForMotor( + AngleConstraintPart self, + float deltaTime, + Body body1, + Body body2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_Deactivate")] + public static partial void AngleConstraintPart_Deactivate(AngleConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_IsActive")] + public static partial Brutal.Bool8 AngleConstraintPart_IsActive(AngleConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_WarmStart")] + public static partial void AngleConstraintPart_WarmStart( + AngleConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 AngleConstraintPart_SolveVelocityConstraint( + AngleConstraintPart self, + Body body1, + Body body2, + float3 worldSpaceAxis, + float minLambda, + float maxLambda + ); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_GetTotalLambda")] + public static partial float AngleConstraintPart_GetTotalLambda(AngleConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AngleConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 AngleConstraintPart_SolvePositionConstraint( + AngleConstraintPart self, + Body body1, + Body body2, + float c, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/AxisConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/AxisConstraintPart.gen.cs new file mode 100644 index 0000000..2864232 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/AxisConstraintPart.gen.cs @@ -0,0 +1,145 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_Create")] + public static partial AxisConstraintPart AxisConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_Destroy")] + public static partial void AxisConstraintPart_Destroy(AxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_CalculateConstraintProperties")] + public static partial void AxisConstraintPart_CalculateConstraintProperties( + AxisConstraintPart self, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "AxisConstraintPart_CalculateConstraintPropertiesWithFrequencyAndDamping" + )] + public static partial void AxisConstraintPart_CalculateConstraintPropertiesWithFrequencyAndDamping( + AxisConstraintPart self, + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + float frequency, + float damping + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "AxisConstraintPart_CalculateConstraintPropertiesWithStiffnessAndDamping" + )] + public static partial void AxisConstraintPart_CalculateConstraintPropertiesWithStiffnessAndDamping( + AxisConstraintPart self, + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + float stiffness, + float damping + ); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_CalculateConstraintPropertiesWithSettingsForLimit")] + public static partial void AxisConstraintPart_CalculateConstraintPropertiesWithSettingsForLimit( + AxisConstraintPart self, + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_CalculateConstraintPropertiesWithSettingsForMotor")] + public static partial void AxisConstraintPart_CalculateConstraintPropertiesWithSettingsForMotor( + AxisConstraintPart self, + float deltaTime, + Body body1, + float3 r1PlusU, + Body body2, + float3 r2, + float3 worldSpaceAxis, + float bias, + float c, + SpringSettings springSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_Deactivate")] + public static partial void AxisConstraintPart_Deactivate(AxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_IsActive")] + public static partial Brutal.Bool8 AxisConstraintPart_IsActive(AxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_WarmStart")] + public static partial void AxisConstraintPart_WarmStart( + AxisConstraintPart self, + Body body1, + Body body2, + float3 worldSpaceAxis, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 AxisConstraintPart_SolveVelocityConstraint( + AxisConstraintPart self, + Body body1, + Body body2, + float3 worldSpaceAxis, + float minLambda, + float maxLambda + ); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_GetTotalLambda")] + public static partial float AxisConstraintPart_GetTotalLambda(AxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "AxisConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 AxisConstraintPart_SolvePositionConstraint( + AxisConstraintPart self, + Body body1, + Body body2, + float3 worldSpaceAxis, + float c, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Body.gen.cs b/Brutal.Jolt/Generated/PInvoke/Body.gen.cs new file mode 100644 index 0000000..762ef0d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Body.gen.cs @@ -0,0 +1,454 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Body_GetID")] + public static partial uint Body_GetID(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetBodyType")] + public static partial BodyType Body_GetBodyType(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsRigidBody")] + public static partial Brutal.Bool8 Body_IsRigidBody(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsSoftBody")] + public static partial Brutal.Bool8 Body_IsSoftBody(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsActive")] + public static partial Brutal.Bool8 Body_IsActive(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsStatic")] + public static partial Brutal.Bool8 Body_IsStatic(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsKinematic")] + public static partial Brutal.Bool8 Body_IsKinematic(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsDynamic")] + public static partial Brutal.Bool8 Body_IsDynamic(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_CanBeKinematicOrDynamic")] + public static partial Brutal.Bool8 Body_CanBeKinematicOrDynamic(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetIsSensor")] + public static partial void Body_SetIsSensor(Body self, Brutal.Bool8 isSensor); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsSensor")] + public static partial Brutal.Bool8 Body_IsSensor(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetCollideKinematicVsNonDynamic")] + public static partial void Body_SetCollideKinematicVsNonDynamic(Body self, Brutal.Bool8 collide); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetCollideKinematicVsNonDynamic")] + public static partial Brutal.Bool8 Body_GetCollideKinematicVsNonDynamic(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetUseManifoldReduction")] + public static partial void Body_SetUseManifoldReduction(Body self, Brutal.Bool8 useReduction); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetUseManifoldReduction")] + public static partial Brutal.Bool8 Body_GetUseManifoldReduction(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetUseManifoldReductionWithBody")] + public static partial Brutal.Bool8 Body_GetUseManifoldReductionWithBody(Body self, Body body2); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetApplyGyroscopicForce")] + public static partial void Body_SetApplyGyroscopicForce(Body self, Brutal.Bool8 apply); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetApplyGyroscopicForce")] + public static partial Brutal.Bool8 Body_GetApplyGyroscopicForce(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetEnhancedInternalEdgeRemoval")] + public static partial void Body_SetEnhancedInternalEdgeRemoval(Body self, Brutal.Bool8 apply); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetEnhancedInternalEdgeRemoval")] + public static partial Brutal.Bool8 Body_GetEnhancedInternalEdgeRemoval(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetEnhancedInternalEdgeRemovalWithBody")] + public static partial Brutal.Bool8 Body_GetEnhancedInternalEdgeRemovalWithBody(Body self, Body body2); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetMotionType")] + public static partial MotionType Body_GetMotionType(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetMotionType")] + public static partial void Body_SetMotionType(Body self, MotionType motionType); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetBroadPhaseLayer")] + public static partial byte Body_GetBroadPhaseLayer(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetObjectLayer")] + public static partial ushort Body_GetObjectLayer(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetCollisionGroup")] + public static partial CollisionGroup Body_GetCollisionGroup(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetCollisionGroup")] + public static partial void Body_SetCollisionGroup(Body self, CollisionGroup group); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetAllowSleeping")] + public static partial Brutal.Bool8 Body_GetAllowSleeping(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetAllowSleeping")] + public static partial void Body_SetAllowSleeping(Body self, Brutal.Bool8 allow); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ResetSleepTimer")] + public static partial void Body_ResetSleepTimer(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetFriction")] + public static partial float Body_GetFriction(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetFriction")] + public static partial void Body_SetFriction(Body self, float friction); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetRestitution")] + public static partial float Body_GetRestitution(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetRestitution")] + public static partial void Body_SetRestitution(Body self, float restitution); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetLinearVelocity")] + public static partial float3 Body_GetLinearVelocity(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetLinearVelocity")] + public static partial void Body_SetLinearVelocity(Body self, float3 linearVelocity); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetLinearVelocityClamped")] + public static partial void Body_SetLinearVelocityClamped(Body self, float3 linearVelocity); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetAngularVelocity")] + public static partial float3 Body_GetAngularVelocity(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetAngularVelocity")] + public static partial void Body_SetAngularVelocity(Body self, float3 angularVelocity); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetAngularVelocityClamped")] + public static partial void Body_SetAngularVelocityClamped(Body self, float3 angularVelocity); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetPointVelocityCOM")] + public static partial float3 Body_GetPointVelocityCOM(Body self, float3 pointRelativeToCOM); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetPointVelocity")] + public static partial float3 Body_GetPointVelocity(Body self, float3 point); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddForce")] + public static partial void Body_AddForce(Body self, float3 force); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddForce_2")] + public static partial void Body_AddForce_2(Body self, float3 force, float3 position); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddTorque")] + public static partial void Body_AddTorque(Body self, float3 torque); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetAccumulatedForce")] + public static partial float3 Body_GetAccumulatedForce(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetAccumulatedTorque")] + public static partial float3 Body_GetAccumulatedTorque(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ResetForce")] + public static partial void Body_ResetForce(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ResetTorque")] + public static partial void Body_ResetTorque(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ResetMotion")] + public static partial void Body_ResetMotion(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetInverseInertia")] + public static partial float4x4 Body_GetInverseInertia(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddImpulse")] + public static partial void Body_AddImpulse(Body self, float3 impulse); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddImpulse_2")] + public static partial void Body_AddImpulse_2(Body self, float3 impulse, float3 position); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddAngularImpulse")] + public static partial void Body_AddAngularImpulse(Body self, float3 angularImpulse); + + /// + [LibraryImport("jolt", EntryPoint = "Body_MoveKinematic")] + public static partial void Body_MoveKinematic( + Body self, + float3 targetPosition, + floatQuat targetRotation, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetSubmergedVolume")] + public static partial void Body_GetSubmergedVolume( + Body self, + float3 surfacePosition, + float3 surfaceNormal, + out float totalVolume, + out float submergedVolume, + out float3 relativeCenterOfBuoyancy + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ApplyBuoyancyImpulse")] + public static partial Brutal.Bool8 Body_ApplyBuoyancyImpulse( + Body self, + float3 surfacePosition, + float3 surfaceNormal, + float buoyancy, + float linearDrag, + float angularDrag, + float3 fluidVelocity, + float3 gravity, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ApplyBuoyancyImpulse_2")] + public static partial Brutal.Bool8 Body_ApplyBuoyancyImpulse_2( + Body self, + float totalVolume, + float submergedVolume, + float3 relativeCenterOfBuoyancy, + float buoyancy, + float linearDrag, + float angularDrag, + float3 fluidVelocity, + float3 gravity, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsInBroadPhase")] + public static partial Brutal.Bool8 Body_IsInBroadPhase(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_IsCollisionCacheInvalid")] + public static partial Brutal.Bool8 Body_IsCollisionCacheInvalid(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetShape")] + public static partial Shape Body_GetShape(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetPosition")] + public static partial float3 Body_GetPosition(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetRotation")] + public static partial floatQuat Body_GetRotation(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetWorldTransform")] + public static partial float4x4 Body_GetWorldTransform(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetCenterOfMassPosition")] + public static partial float3 Body_GetCenterOfMassPosition(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetCenterOfMassTransform")] + public static partial float4x4 Body_GetCenterOfMassTransform(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetInverseCenterOfMassTransform")] + public static partial float4x4 Body_GetInverseCenterOfMassTransform(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetWorldSpaceBounds")] + public static partial AABox Body_GetWorldSpaceBounds(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetMotionProperties")] + public static partial MotionProperties Body_GetMotionProperties(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetMotionPropertiesUnchecked")] + public static partial MotionProperties Body_GetMotionPropertiesUnchecked(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetUserData")] + public static partial ulong Body_GetUserData(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetUserData")] + public static partial void Body_SetUserData(Body self, ulong userData); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetWorldSpaceSurfaceNormal")] + public static partial float3 Body_GetWorldSpaceSurfaceNormal(Body self, uint subShapeID, float3 position); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetTransformedShape")] + public static partial TransformedShape Body_GetTransformedShape(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetBodyCreationSettings")] + public static partial BodyCreationSettings Body_GetBodyCreationSettings(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ApplyBodyCreationSettings")] + public static partial void Body_ApplyBodyCreationSettings( + Body self, + BodyCreationSettings bodyCreationSettings, + BroadPhaseLayerInterface bPLInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetSoftBodyCreationSettings")] + public static partial SoftBodyCreationSettings Body_GetSoftBodyCreationSettings(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ApplySoftBodyCreationSettings")] + public static partial void Body_ApplySoftBodyCreationSettings( + Body self, + SoftBodyCreationSettings softBodyCreationSettings, + BroadPhaseLayerInterface bPLInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_FindCollidingPairsCanCollide")] + public static partial Brutal.Bool8 Body_FindCollidingPairsCanCollide(Body body1, Body body2); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddPositionStep")] + public static partial void Body_AddPositionStep(Body self, float3 linearVelocityTimesDeltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SubPositionStep")] + public static partial void Body_SubPositionStep(Body self, float3 linearVelocityTimesDeltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "Body_AddRotationStep")] + public static partial void Body_AddRotationStep(Body self, float3 angularVelocityTimesDeltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SubRotationStep")] + public static partial void Body_SubRotationStep(Body self, float3 angularVelocityTimesDeltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetObjectLayerInternal")] + public static partial void Body_SetObjectLayerInternal( + Body self, + ushort layer, + BroadPhaseLayerInterface bPLInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetInBroadPhaseInternal")] + public static partial void Body_SetInBroadPhaseInternal(Body self, Brutal.Bool8 inBroadPhase); + + /// + [LibraryImport("jolt", EntryPoint = "Body_InvalidateContactCacheInternal")] + public static partial Brutal.Bool8 Body_InvalidateContactCacheInternal(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_ValidateContactCacheInternal")] + public static partial void Body_ValidateContactCacheInternal(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_CalculateWorldSpaceBoundsInternal")] + public static partial void Body_CalculateWorldSpaceBoundsInternal(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetPositionAndRotationInternal")] + public static partial void Body_SetPositionAndRotationInternal( + Body self, + float3 position, + floatQuat rotation, + Brutal.Bool8 resetSleepTimer + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_UpdateCenterOfMassInternal")] + public static partial void Body_UpdateCenterOfMassInternal( + Body self, + float3 previousCenterOfMass, + Brutal.Bool8 updateMassProperties + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_SetShapeInternal")] + public static partial void Body_SetShapeInternal(Body self, Shape shape, Brutal.Bool8 updateMassProperties); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetIndexInActiveBodiesInternal")] + public static partial uint Body_GetIndexInActiveBodiesInternal(Body self); + + /// + [LibraryImport("jolt", EntryPoint = "Body_UpdateSleepStateInternal")] + public static partial CanSleep Body_UpdateSleepStateInternal( + Body self, + float deltaTime, + float maxMovement, + float timeBeforeSleep + ); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetFixedToWorld")] + public static partial Body Body_GetFixedToWorld(); + + /// + [LibraryImport("jolt", EntryPoint = "Body_GetInactiveIndex")] + public static partial uint Body_GetInactiveIndex(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyActivationListener.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyActivationListener.gen.cs new file mode 100644 index 0000000..8d0645a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyActivationListener.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_OnBodyActivated")] + public static partial void BodyActivationListener_OnBodyActivated( + BodyActivationListener self, + uint bodyID, + ulong bodyUserData + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_OnBodyDeactivated")] + public static partial void BodyActivationListener_OnBodyDeactivated( + BodyActivationListener self, + uint bodyID, + ulong bodyUserData + ); + + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_CreateProxy")] + public static partial nint BodyActivationListener_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_DestroyProxy")] + public static partial void BodyActivationListener_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_ProxyGetBase")] + public static partial BodyActivationListener BodyActivationListener_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_ProxySetOnBodyActivated")] + public static partial void BodyActivationListener_ProxySetOnBodyActivated( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "BodyActivationListener_ProxySetOnBodyDeactivated")] + public static partial void BodyActivationListener_ProxySetOnBodyDeactivated( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyCreationSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyCreationSettings.gen.cs new file mode 100644 index 0000000..7fc465e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyCreationSettings.gen.cs @@ -0,0 +1,483 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_Create")] + public static partial BodyCreationSettings BodyCreationSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_Create_2")] + public static partial BodyCreationSettings BodyCreationSettings_Create_2( + ShapeSettings shape, + float3 position, + floatQuat rotation, + MotionType motionType, + ushort objectLayer + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_Create_3")] + public static partial BodyCreationSettings BodyCreationSettings_Create_3( + Shape shape, + float3 position, + floatQuat rotation, + MotionType motionType, + ushort objectLayer + ); + + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_Destroy")] + public static partial void BodyCreationSettings_Destroy(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetShapeSettings")] + public static partial ShapeSettings BodyCreationSettings_GetShapeSettings(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetShapeSettings")] + public static partial void BodyCreationSettings_SetShapeSettings( + BodyCreationSettings self, + ShapeSettings shape + ); + + /// + /// + /// Convert ShapeSettings object into a Shape object. This will free the ShapeSettings object and make + /// the object ready for runtime. Serialization is no longer possible after this. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:49 + ///
+ /// Shape::ShapeResult ConvertShapeSettings() + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_ConvertShapeSettings")] + public static partial Shape BodyCreationSettings_ConvertShapeSettings(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetShape")] + public static partial Shape BodyCreationSettings_GetShape(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetShape")] + public static partial void BodyCreationSettings_SetShape(BodyCreationSettings self, Shape shape); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_HasMassProperties")] + public static partial Brutal.Bool8 BodyCreationSettings_HasMassProperties(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetMassProperties")] + public static partial MassProperties BodyCreationSettings_GetMassProperties(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SaveBinaryState")] + public static partial void BodyCreationSettings_SaveBinaryState( + BodyCreationSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_RestoreBinaryState")] + public static partial void BodyCreationSettings_RestoreBinaryState( + BodyCreationSettings self, + StreamIn stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SaveWithChildren")] + public static partial void BodyCreationSettings_SaveWithChildren( + BodyCreationSettings self, + StreamOut stream, + ShapeToIDMap shapeMap, + MaterialToIDMap materialMap, + GroupFilterToIDMap groupFilterMap + ); + + /// + /// + /// Restore body creation settings, its shape, materials and group filter. Pass in an empty map in + /// ioShapeMap / ioMaterialMap / ioGroupFilterMap or reuse the same map while reading multiple shapes + /// from the same stream in order to restore duplicates. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyCreationSettings.h:82 + ///
+ /// static BCSResult sRestoreWithChildren(StreamIn &inStream, IDToShapeMap &ioShapeMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_RestoreWithChildren")] + public static partial BodyCreationSettings BodyCreationSettings_RestoreWithChildren( + StreamIn stream, + IDToShapeMap shapeMap, + IDToMaterialMap materialMap, + IDToGroupFilterMap groupFilterMap + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetPosition")] + [SuppressGCTransition] + public static partial float3 BodyCreationSettings_GetPosition(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetPosition")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetPosition(BodyCreationSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetRotation")] + [SuppressGCTransition] + public static partial floatQuat BodyCreationSettings_GetRotation(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetRotation")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetRotation(BodyCreationSettings self, floatQuat value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetLinearVelocity")] + [SuppressGCTransition] + public static partial float3 BodyCreationSettings_GetLinearVelocity(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetLinearVelocity")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetLinearVelocity(BodyCreationSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetAngularVelocity")] + [SuppressGCTransition] + public static partial float3 BodyCreationSettings_GetAngularVelocity(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetAngularVelocity")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetAngularVelocity(BodyCreationSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetUserData")] + [SuppressGCTransition] + public static partial ulong BodyCreationSettings_GetUserData(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetUserData")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetUserData(BodyCreationSettings self, ulong value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetObjectLayer")] + [SuppressGCTransition] + public static partial ushort BodyCreationSettings_GetObjectLayer(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetObjectLayer")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetObjectLayer(BodyCreationSettings self, ushort value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetCollisionGroup")] + public static partial CollisionGroup BodyCreationSettings_GetCollisionGroup(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetCollisionGroup")] + public static partial void BodyCreationSettings_SetCollisionGroup( + BodyCreationSettings self, + CollisionGroup value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetMotionType")] + [SuppressGCTransition] + public static partial MotionType BodyCreationSettings_GetMotionType(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetMotionType")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetMotionType(BodyCreationSettings self, MotionType value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetAllowedDOFs")] + [SuppressGCTransition] + public static partial AllowedDOFs BodyCreationSettings_GetAllowedDOFs(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetAllowedDOFs")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetAllowedDOFs( + BodyCreationSettings self, + AllowedDOFs value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetAllowDynamicOrKinematic")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetAllowDynamicOrKinematic( + BodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetAllowDynamicOrKinematic")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetAllowDynamicOrKinematic( + BodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetIsSensor")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetIsSensor(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetIsSensor")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetIsSensor(BodyCreationSettings self, Brutal.Bool8 value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetCollideKinematicVsNonDynamic")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetCollideKinematicVsNonDynamic( + BodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetCollideKinematicVsNonDynamic")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetCollideKinematicVsNonDynamic( + BodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetUseManifoldReduction")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetUseManifoldReduction(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetUseManifoldReduction")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetUseManifoldReduction( + BodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetApplyGyroscopicForce")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetApplyGyroscopicForce(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetApplyGyroscopicForce")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetApplyGyroscopicForce( + BodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetMotionQuality")] + [SuppressGCTransition] + public static partial MotionQuality BodyCreationSettings_GetMotionQuality(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetMotionQuality")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetMotionQuality( + BodyCreationSettings self, + MotionQuality value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetEnhancedInternalEdgeRemoval")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetEnhancedInternalEdgeRemoval( + BodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetEnhancedInternalEdgeRemoval")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetEnhancedInternalEdgeRemoval( + BodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetAllowSleeping")] + [SuppressGCTransition] + public static partial Brutal.Bool8 BodyCreationSettings_GetAllowSleeping(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetAllowSleeping")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetAllowSleeping( + BodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetFriction")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetFriction(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetFriction")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetFriction(BodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetRestitution")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetRestitution(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetRestitution")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetRestitution(BodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetLinearDamping")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetLinearDamping(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetLinearDamping")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetLinearDamping(BodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetAngularDamping")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetAngularDamping(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetAngularDamping")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetAngularDamping(BodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetMaxLinearVelocity")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetMaxLinearVelocity(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetMaxLinearVelocity")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetMaxLinearVelocity( + BodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetMaxAngularVelocity")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetMaxAngularVelocity(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetMaxAngularVelocity")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetMaxAngularVelocity( + BodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetGravityFactor")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetGravityFactor(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetGravityFactor")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetGravityFactor(BodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetNumVelocityStepsOverride")] + [SuppressGCTransition] + public static partial uint BodyCreationSettings_GetNumVelocityStepsOverride(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetNumVelocityStepsOverride")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetNumVelocityStepsOverride( + BodyCreationSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetNumPositionStepsOverride")] + [SuppressGCTransition] + public static partial uint BodyCreationSettings_GetNumPositionStepsOverride(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetNumPositionStepsOverride")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetNumPositionStepsOverride( + BodyCreationSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetOverrideMassProperties")] + [SuppressGCTransition] + public static partial OverrideMassProperties BodyCreationSettings_GetOverrideMassProperties( + BodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetOverrideMassProperties")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetOverrideMassProperties( + BodyCreationSettings self, + OverrideMassProperties value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetInertiaMultiplier")] + [SuppressGCTransition] + public static partial float BodyCreationSettings_GetInertiaMultiplier(BodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetInertiaMultiplier")] + [SuppressGCTransition] + public static partial void BodyCreationSettings_SetInertiaMultiplier( + BodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_GetMassPropertiesOverride")] + public static partial MassProperties BodyCreationSettings_GetMassPropertiesOverride( + BodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyCreationSettings_SetMassPropertiesOverride")] + public static partial void BodyCreationSettings_SetMassPropertiesOverride( + BodyCreationSettings self, + MassProperties value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyDrawFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyDrawFilter.gen.cs new file mode 100644 index 0000000..0ecd776 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyDrawFilter.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_Create")] + public static partial BodyDrawFilter BodyDrawFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_Destroy")] + public static partial void BodyDrawFilter_Destroy(BodyDrawFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_ShouldDraw")] + public static partial Brutal.Bool8 BodyDrawFilter_ShouldDraw(BodyDrawFilter self, Body body); + + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_CreateProxy")] + public static partial nint BodyDrawFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_DestroyProxy")] + public static partial void BodyDrawFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_ProxyGetBase")] + public static partial BodyDrawFilter BodyDrawFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "BodyDrawFilter_ProxySetShouldDraw")] + public static partial void BodyDrawFilter_ProxySetShouldDraw( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyFilter.gen.cs new file mode 100644 index 0000000..8342f17 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyFilter.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BodyFilter_Create")] + public static partial BodyFilter BodyFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "BodyFilter_Destroy")] + public static partial void BodyFilter_Destroy(BodyFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyFilter_ShouldCollide")] + public static partial Brutal.Bool8 BodyFilter_ShouldCollide(BodyFilter self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyFilter_ShouldCollideLocked")] + public static partial Brutal.Bool8 BodyFilter_ShouldCollideLocked(BodyFilter self, Body body); + + [LibraryImport("jolt", EntryPoint = "BodyFilter_CreateProxy")] + public static partial nint BodyFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "BodyFilter_DestroyProxy")] + public static partial void BodyFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "BodyFilter_ProxyGetBase")] + public static partial BodyFilter BodyFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "BodyFilter_ProxySetShouldCollide")] + public static partial void BodyFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "BodyFilter_ProxySetShouldCollideLocked")] + public static partial void BodyFilter_ProxySetShouldCollideLocked( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyInterface.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyInterface.gen.cs new file mode 100644 index 0000000..f2e44a8 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyInterface.gen.cs @@ -0,0 +1,657 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_Init")] + public static partial void BodyInterface_Init( + BodyInterface self, + BodyLockInterface bodyLockInterface, + BodyManager bodyManager, + BroadPhase broadPhase + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateBody")] + public static partial Body BodyInterface_CreateBody(BodyInterface self, BodyCreationSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateSoftBody")] + public static partial Body BodyInterface_CreateSoftBody( + BodyInterface self, + SoftBodyCreationSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateBodyWithID")] + public static partial Body BodyInterface_CreateBodyWithID( + BodyInterface self, + uint bodyID, + BodyCreationSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateSoftBodyWithID")] + public static partial Body BodyInterface_CreateSoftBodyWithID( + BodyInterface self, + uint bodyID, + SoftBodyCreationSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateBodyWithoutID")] + public static partial Body BodyInterface_CreateBodyWithoutID( + BodyInterface self, + BodyCreationSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateSoftBodyWithoutID")] + public static partial Body BodyInterface_CreateSoftBodyWithoutID( + BodyInterface self, + SoftBodyCreationSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_DestroyBodyWithoutID")] + public static partial void BodyInterface_DestroyBodyWithoutID(BodyInterface self, Body body); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AssignBodyID")] + public static partial Brutal.Bool8 BodyInterface_AssignBodyID(BodyInterface self, Body body); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AssignBodyID_2")] + public static partial Brutal.Bool8 BodyInterface_AssignBodyID_2(BodyInterface self, Body body, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_UnassignBodyID")] + public static partial Body BodyInterface_UnassignBodyID(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_UnassignBodyIDs")] + public static partial void BodyInterface_UnassignBodyIDs( + BodyInterface self, + uint* bodyIDs, + int number, + Body* bodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_DestroyBody")] + public static partial void BodyInterface_DestroyBody(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_DestroyBodies")] + public static partial void BodyInterface_DestroyBodies(BodyInterface self, uint* bodyIDs, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddBody")] + public static partial void BodyInterface_AddBody( + BodyInterface self, + uint bodyID, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_RemoveBody")] + public static partial void BodyInterface_RemoveBody(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_IsAdded")] + public static partial Brutal.Bool8 BodyInterface_IsAdded(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateAndAddBody")] + public static partial uint BodyInterface_CreateAndAddBody( + BodyInterface self, + BodyCreationSettings settings, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateAndAddSoftBody")] + public static partial uint BodyInterface_CreateAndAddSoftBody( + BodyInterface self, + SoftBodyCreationSettings settings, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_RemoveBodies")] + public static partial void BodyInterface_RemoveBodies(BodyInterface self, uint* bodies, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_ActivateBody")] + public static partial void BodyInterface_ActivateBody(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_ActivateBodies")] + public static partial void BodyInterface_ActivateBodies(BodyInterface self, uint* bodyIDs, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_ActivateBodiesInAABox")] + public static partial void BodyInterface_ActivateBodiesInAABox( + BodyInterface self, + in AABox box, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_DeactivateBody")] + public static partial void BodyInterface_DeactivateBody(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_DeactivateBodies")] + public static partial void BodyInterface_DeactivateBodies(BodyInterface self, uint* bodyIDs, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_IsActive")] + public static partial Brutal.Bool8 BodyInterface_IsActive(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_ResetSleepTimer")] + public static partial void BodyInterface_ResetSleepTimer(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_CreateConstraint")] + public static partial TwoBodyConstraint BodyInterface_CreateConstraint( + BodyInterface self, + TwoBodyConstraintSettings settings, + uint bodyID1, + uint bodyID2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_ActivateConstraint")] + public static partial void BodyInterface_ActivateConstraint( + BodyInterface self, + TwoBodyConstraint constraint + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetShape")] + public static partial Shape BodyInterface_GetShape(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetShape")] + public static partial void BodyInterface_SetShape( + BodyInterface self, + uint bodyID, + Shape shape, + Brutal.Bool8 updateMassProperties, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_NotifyShapeChanged")] + public static partial void BodyInterface_NotifyShapeChanged( + BodyInterface self, + uint bodyID, + float3 previousCenterOfMass, + Brutal.Bool8 updateMassProperties, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetObjectLayer")] + public static partial void BodyInterface_SetObjectLayer(BodyInterface self, uint bodyID, ushort layer); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetObjectLayer")] + public static partial ushort BodyInterface_GetObjectLayer(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetPositionAndRotation")] + public static partial void BodyInterface_SetPositionAndRotation( + BodyInterface self, + uint bodyID, + float3 position, + floatQuat rotation, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetPositionAndRotationWhenChanged")] + public static partial void BodyInterface_SetPositionAndRotationWhenChanged( + BodyInterface self, + uint bodyID, + float3 position, + floatQuat rotation, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetPositionAndRotation")] + public static partial void BodyInterface_GetPositionAndRotation( + BodyInterface self, + uint bodyID, + out float3 position, + out floatQuat rotation + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetPosition")] + public static partial void BodyInterface_SetPosition( + BodyInterface self, + uint bodyID, + float3 position, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetPosition")] + public static partial float3 BodyInterface_GetPosition(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetCenterOfMassPosition")] + public static partial float3 BodyInterface_GetCenterOfMassPosition(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetRotation")] + public static partial void BodyInterface_SetRotation( + BodyInterface self, + uint bodyID, + floatQuat rotation, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetRotation")] + public static partial floatQuat BodyInterface_GetRotation(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetWorldTransform")] + public static partial float4x4 BodyInterface_GetWorldTransform(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetCenterOfMassTransform")] + public static partial float4x4 BodyInterface_GetCenterOfMassTransform(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_MoveKinematic")] + public static partial void BodyInterface_MoveKinematic( + BodyInterface self, + uint bodyID, + float3 targetPosition, + floatQuat targetRotation, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetLinearAndAngularVelocity")] + public static partial void BodyInterface_SetLinearAndAngularVelocity( + BodyInterface self, + uint bodyID, + float3 linearVelocity, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetLinearAndAngularVelocity")] + public static partial void BodyInterface_GetLinearAndAngularVelocity( + BodyInterface self, + uint bodyID, + out float3 linearVelocity, + out float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetLinearVelocity")] + public static partial void BodyInterface_SetLinearVelocity( + BodyInterface self, + uint bodyID, + float3 linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetLinearVelocity")] + public static partial float3 BodyInterface_GetLinearVelocity(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddLinearVelocity")] + public static partial void BodyInterface_AddLinearVelocity( + BodyInterface self, + uint bodyID, + float3 linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddLinearAndAngularVelocity")] + public static partial void BodyInterface_AddLinearAndAngularVelocity( + BodyInterface self, + uint bodyID, + float3 linearVelocity, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetAngularVelocity")] + public static partial void BodyInterface_SetAngularVelocity( + BodyInterface self, + uint bodyID, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetAngularVelocity")] + public static partial float3 BodyInterface_GetAngularVelocity(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetPointVelocity")] + public static partial float3 BodyInterface_GetPointVelocity(BodyInterface self, uint bodyID, float3 point); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetPositionRotationAndVelocity")] + public static partial void BodyInterface_SetPositionRotationAndVelocity( + BodyInterface self, + uint bodyID, + float3 position, + floatQuat rotation, + float3 linearVelocity, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddForce")] + public static partial void BodyInterface_AddForce( + BodyInterface self, + uint bodyID, + float3 force, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddForce_2")] + public static partial void BodyInterface_AddForce_2( + BodyInterface self, + uint bodyID, + float3 force, + float3 point, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddTorque")] + public static partial void BodyInterface_AddTorque( + BodyInterface self, + uint bodyID, + float3 torque, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddForceAndTorque")] + public static partial void BodyInterface_AddForceAndTorque( + BodyInterface self, + uint bodyID, + float3 force, + float3 torque, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddImpulse")] + public static partial void BodyInterface_AddImpulse(BodyInterface self, uint bodyID, float3 impulse); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddImpulse_2")] + public static partial void BodyInterface_AddImpulse_2( + BodyInterface self, + uint bodyID, + float3 impulse, + float3 point + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddAngularImpulse")] + public static partial void BodyInterface_AddAngularImpulse( + BodyInterface self, + uint bodyID, + float3 angularImpulse + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_ApplyBuoyancyImpulse")] + public static partial Brutal.Bool8 BodyInterface_ApplyBuoyancyImpulse( + BodyInterface self, + uint bodyID, + float3 surfacePosition, + float3 surfaceNormal, + float buoyancy, + float linearDrag, + float angularDrag, + float3 fluidVelocity, + float3 gravity, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetBodyType")] + public static partial BodyType BodyInterface_GetBodyType(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetMotionType")] + public static partial void BodyInterface_SetMotionType( + BodyInterface self, + uint bodyID, + MotionType motionType, + Activation activationMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetMotionType")] + public static partial MotionType BodyInterface_GetMotionType(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetMotionQuality")] + public static partial void BodyInterface_SetMotionQuality( + BodyInterface self, + uint bodyID, + MotionQuality motionQuality + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetMotionQuality")] + public static partial MotionQuality BodyInterface_GetMotionQuality(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetInverseInertia")] + public static partial float4x4 BodyInterface_GetInverseInertia(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetRestitution")] + public static partial void BodyInterface_SetRestitution(BodyInterface self, uint bodyID, float restitution); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetRestitution")] + public static partial float BodyInterface_GetRestitution(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetFriction")] + public static partial void BodyInterface_SetFriction(BodyInterface self, uint bodyID, float friction); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetFriction")] + public static partial float BodyInterface_GetFriction(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetGravityFactor")] + public static partial void BodyInterface_SetGravityFactor( + BodyInterface self, + uint bodyID, + float gravityFactor + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetGravityFactor")] + public static partial float BodyInterface_GetGravityFactor(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetMaxLinearVelocity")] + public static partial void BodyInterface_SetMaxLinearVelocity( + BodyInterface self, + uint bodyID, + float linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetMaxLinearVelocity")] + public static partial float BodyInterface_GetMaxLinearVelocity(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetMaxAngularVelocity")] + public static partial void BodyInterface_SetMaxAngularVelocity( + BodyInterface self, + uint bodyID, + float angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetMaxAngularVelocity")] + public static partial float BodyInterface_GetMaxAngularVelocity(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetUseManifoldReduction")] + public static partial void BodyInterface_SetUseManifoldReduction( + BodyInterface self, + uint bodyID, + Brutal.Bool8 useReduction + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetUseManifoldReduction")] + public static partial Brutal.Bool8 BodyInterface_GetUseManifoldReduction(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetIsSensor")] + public static partial void BodyInterface_SetIsSensor( + BodyInterface self, + uint bodyID, + Brutal.Bool8 isSensor + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_IsSensor")] + public static partial Brutal.Bool8 BodyInterface_IsSensor(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetCollisionGroup")] + public static partial void BodyInterface_SetCollisionGroup( + BodyInterface self, + uint bodyID, + CollisionGroup collisionGroup + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetCollisionGroup")] + public static partial CollisionGroup BodyInterface_GetCollisionGroup(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetTransformedShape")] + public static partial TransformedShape BodyInterface_GetTransformedShape(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetUserData")] + public static partial ulong BodyInterface_GetUserData(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetUserData")] + public static partial void BodyInterface_SetUserData(BodyInterface self, uint bodyID, ulong userData); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_GetMaterial")] + public static partial PhysicsMaterial BodyInterface_GetMaterial( + BodyInterface self, + uint bodyID, + uint subShapeID + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_InvalidateContactCache")] + public static partial void BodyInterface_InvalidateContactCache(BodyInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetPositionsAndRotations")] + public static partial void BodyInterface_SetPositionsAndRotations( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount, + Activation activation + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetPositionsAndRotationsWhenChanged")] + public static partial void BodyInterface_SetPositionsAndRotationsWhenChanged( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount, + Activation activation + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_MoveKinematics")] + public static partial void BodyInterface_MoveKinematics( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_SetLinearAndAngularVelocities")] + public static partial void BodyInterface_SetLinearAndAngularVelocities( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* linearVelocities, + nuint linearVelocitiesCount, + float3* angularVelocities, + nuint angularVelocitiesCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddForces")] + public static partial void BodyInterface_AddForces( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* forces, + nuint forcesCount, + Activation activation + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_AddImpulses")] + public static partial void BodyInterface_AddImpulses( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* impulses, + nuint impulsesCount + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyLockInterface.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyLockInterface.gen.cs new file mode 100644 index 0000000..026b12b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyLockInterface.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterface_TryGetBody")] + public static partial Body BodyLockInterface_TryGetBody(BodyLockInterface self, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterface_GetWorldTransforms")] + public static partial void BodyLockInterface_GetWorldTransforms( + BodyLockInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float4x4* transforms, + nuint transformsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterface_GetPositionsAndRotations")] + public static partial void BodyLockInterface_GetPositionsAndRotations( + BodyLockInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterface_GetLinearAndAngularVelocities")] + public static partial void BodyLockInterface_GetLinearAndAngularVelocities( + BodyLockInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* linearVelocities, + nuint linearVelocitiesCount, + float3* angularVelocities, + nuint angularVelocitiesCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterface_GetBodyStates")] + public static partial void BodyLockInterface_GetBodyStates( + BodyLockInterface self, + uint* bodyIDs, + nuint bodyIDsCount, + BodyState* states, + nuint statesCount + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceLocking.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceLocking.gen.cs new file mode 100644 index 0000000..e2468b1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceLocking.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceLocking_GetWorldTransforms")] + public static partial void BodyLockInterfaceLocking_GetWorldTransforms( + BodyLockInterfaceLocking self, + uint* bodyIDs, + nuint bodyIDsCount, + float4x4* transforms, + nuint transformsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceLocking_GetPositionsAndRotations")] + public static partial void BodyLockInterfaceLocking_GetPositionsAndRotations( + BodyLockInterfaceLocking self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceLocking_GetLinearAndAngularVelocities")] + public static partial void BodyLockInterfaceLocking_GetLinearAndAngularVelocities( + BodyLockInterfaceLocking self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* linearVelocities, + nuint linearVelocitiesCount, + float3* angularVelocities, + nuint angularVelocitiesCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceLocking_GetBodyStates")] + public static partial void BodyLockInterfaceLocking_GetBodyStates( + BodyLockInterfaceLocking self, + uint* bodyIDs, + nuint bodyIDsCount, + BodyState* states, + nuint statesCount + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceNoLock.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceNoLock.gen.cs new file mode 100644 index 0000000..9e9aed7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyLockInterfaceNoLock.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceNoLock_GetWorldTransforms")] + public static partial void BodyLockInterfaceNoLock_GetWorldTransforms( + BodyLockInterfaceNoLock self, + uint* bodyIDs, + nuint bodyIDsCount, + float4x4* transforms, + nuint transformsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceNoLock_GetPositionsAndRotations")] + public static partial void BodyLockInterfaceNoLock_GetPositionsAndRotations( + BodyLockInterfaceNoLock self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceNoLock_GetLinearAndAngularVelocities")] + public static partial void BodyLockInterfaceNoLock_GetLinearAndAngularVelocities( + BodyLockInterfaceNoLock self, + uint* bodyIDs, + nuint bodyIDsCount, + float3* linearVelocities, + nuint linearVelocitiesCount, + float3* angularVelocities, + nuint angularVelocitiesCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockInterfaceNoLock_GetBodyStates")] + public static partial void BodyLockInterfaceNoLock_GetBodyStates( + BodyLockInterfaceNoLock self, + uint* bodyIDs, + nuint bodyIDsCount, + BodyState* states, + nuint statesCount + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyLockRead.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyLockRead.gen.cs new file mode 100644 index 0000000..15d9e6f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyLockRead.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BodyLockRead_Destroy")] + public static partial void BodyLockRead_Destroy(BodyLockRead self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockRead_Create")] + public static partial BodyLockRead BodyLockRead_Create(BodyLockInterface lockInterface, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockRead_Succeeded")] + public static partial Brutal.Bool8 BodyLockRead_Succeeded(BodyLockRead self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockRead_SucceededAndIsInBroadPhase")] + public static partial Brutal.Bool8 BodyLockRead_SucceededAndIsInBroadPhase(BodyLockRead self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockRead_GetBody")] + public static partial Body BodyLockRead_GetBody(BodyLockRead self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockRead_ReleaseLock")] + public static partial void BodyLockRead_ReleaseLock(BodyLockRead self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyLockWrite.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyLockWrite.gen.cs new file mode 100644 index 0000000..dfec4b5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyLockWrite.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BodyLockWrite_Destroy")] + public static partial void BodyLockWrite_Destroy(BodyLockWrite self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockWrite_Create")] + public static partial BodyLockWrite BodyLockWrite_Create(BodyLockInterface lockInterface, uint bodyID); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockWrite_Succeeded")] + public static partial Brutal.Bool8 BodyLockWrite_Succeeded(BodyLockWrite self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockWrite_SucceededAndIsInBroadPhase")] + public static partial Brutal.Bool8 BodyLockWrite_SucceededAndIsInBroadPhase(BodyLockWrite self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockWrite_GetBody")] + public static partial Body BodyLockWrite_GetBody(BodyLockWrite self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyLockWrite_ReleaseLock")] + public static partial void BodyLockWrite_ReleaseLock(BodyLockWrite self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BodyManager.gen.cs b/Brutal.Jolt/Generated/PInvoke/BodyManager.gen.cs new file mode 100644 index 0000000..fbfe51c --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BodyManager.gen.cs @@ -0,0 +1,223 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_Init")] + public static partial void BodyManager_Init( + BodyManager self, + uint maxBodies, + uint numBodyMutexes, + BroadPhaseLayerInterface layerInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetNumBodies")] + public static partial uint BodyManager_GetNumBodies(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetMaxBodies")] + public static partial uint BodyManager_GetMaxBodies(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBodyStats")] + public static partial void BodyManager_GetBodyStats(BodyManager self, out BodyManager.BodyStats outResult); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_AllocateBody")] + public static partial Body BodyManager_AllocateBody( + BodyManager self, + BodyCreationSettings bodyCreationSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_AllocateSoftBody")] + public static partial Body BodyManager_AllocateSoftBody( + BodyManager self, + SoftBodyCreationSettings softBodyCreationSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_FreeBody")] + public static partial void BodyManager_FreeBody(BodyManager self, Body body); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_AddBody")] + public static partial Brutal.Bool8 BodyManager_AddBody(BodyManager self, Body body); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_AddBodyWithCustomID")] + public static partial Brutal.Bool8 BodyManager_AddBodyWithCustomID( + BodyManager self, + Body body, + uint bodyID + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_RemoveBodies")] + public static partial void BodyManager_RemoveBodies( + BodyManager self, + uint* bodyIDs, + int number, + Body* bodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_DestroyBodies")] + public static partial void BodyManager_DestroyBodies(BodyManager self, uint* bodyIDs, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_ActivateBodies")] + public static partial void BodyManager_ActivateBodies(BodyManager self, uint* bodyIDs, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_DeactivateBodies")] + public static partial void BodyManager_DeactivateBodies(BodyManager self, uint* bodyIDs, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_SetMotionQuality")] + public static partial void BodyManager_SetMotionQuality( + BodyManager self, + Body body, + MotionQuality motionQuality + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetActiveBodies")] + public static partial void BodyManager_GetActiveBodies(BodyManager self, BodyType type, out nint bodyIDs); + + /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:117 + ///
+ /// void GetActiveBodies(EBodyType inType, BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetActiveBodies_2")] + public static partial uint BodyManager_GetActiveBodies_2( + BodyManager self, + BodyType type, + uint* buffer, + uint capacity + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetNumActiveBodies")] + public static partial uint BodyManager_GetNumActiveBodies(BodyManager self, BodyType type); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetNumActiveCCDBodies")] + public static partial uint BodyManager_GetNumActiveCCDBodies(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_SetBodyActivationListener")] + public static partial void BodyManager_SetBodyActivationListener( + BodyManager self, + BodyActivationListener listener + ); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBodyActivationListener")] + public static partial BodyActivationListener BodyManager_GetBodyActivationListener(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_IsValidBodyPointer")] + public static partial Brutal.Bool8 BodyManager_IsValidBodyPointer(Body body); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBodies")] + public static partial void BodyManager_GetBodies(BodyManager self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBodyIDs")] + public static partial void BodyManager_GetBodyIDs(BodyManager self, out nint bodies); + + /// + /// + /// Get all body IDs under the protection of a lock + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyManager.h:142 + ///
+ /// void GetBodyIDs(BodyIDVector &outBodies) const + ///
+ ///
+ /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBodyIDs_2")] + public static partial uint BodyManager_GetBodyIDs_2(BodyManager self, uint* buffer, uint capacity); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBody")] + public static partial Body BodyManager_GetBody(BodyManager self, uint id); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_TryGetBody")] + public static partial Body BodyManager_TryGetBody(BodyManager self, uint id); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_LockAllBodies")] + public static partial void BodyManager_LockAllBodies(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_UnlockAllBodies")] + public static partial void BodyManager_UnlockAllBodies(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_InvalidateContactCacheForBody")] + public static partial void BodyManager_InvalidateContactCacheForBody(BodyManager self, Body body); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_ValidateContactCacheForAllBodies")] + public static partial void BodyManager_ValidateContactCacheForAllBodies(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_GetBroadPhaseLayerInterface")] + public static partial BroadPhaseLayerInterface BodyManager_GetBroadPhaseLayerInterface(BodyManager self); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_SaveBodyState")] + public static partial void BodyManager_SaveBodyState(BodyManager self, Body body, StateRecorder stream); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_RestoreBodyState")] + public static partial void BodyManager_RestoreBodyState(BodyManager self, Body body, StateRecorder stream); + + /// + [LibraryImport("jolt", EntryPoint = "BodyManager_Draw")] + public static partial void BodyManager_Draw( + BodyManager self, + in BodyManager.DrawSettings settings, + in PhysicsSettings physicsSettings, + DebugRenderer renderer, + BodyDrawFilter bodyFilter + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BoxShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/BoxShape.gen.cs new file mode 100644 index 0000000..48095a2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BoxShape.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BoxShape_Create")] + public static partial BoxShape BoxShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShape_Create_2")] + public static partial BoxShape BoxShape_Create_2(BoxShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShape_Create_3")] + public static partial BoxShape BoxShape_Create_3( + float3 halfExtent, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShape_GetHalfExtent")] + public static partial float3 BoxShape_GetHalfExtent(BoxShape self); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShape_GetConvexRadius")] + public static partial float BoxShape_GetConvexRadius(BoxShape self); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShape_Register")] + public static partial void BoxShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BoxShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/BoxShapeSettings.gen.cs new file mode 100644 index 0000000..f1a2cb5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BoxShapeSettings.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BoxShapeSettings_Create")] + public static partial BoxShapeSettings BoxShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShapeSettings_Create_2")] + public static partial BoxShapeSettings BoxShapeSettings_Create_2( + float3 halfExtent, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShapeSettings_GetHalfExtent")] + [SuppressGCTransition] + public static partial float3 BoxShapeSettings_GetHalfExtent(BoxShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShapeSettings_SetHalfExtent")] + [SuppressGCTransition] + public static partial void BoxShapeSettings_SetHalfExtent(BoxShapeSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShapeSettings_GetConvexRadius")] + [SuppressGCTransition] + public static partial float BoxShapeSettings_GetConvexRadius(BoxShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "BoxShapeSettings_SetConvexRadius")] + [SuppressGCTransition] + public static partial void BoxShapeSettings_SetConvexRadius(BoxShapeSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhase.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhase.gen.cs new file mode 100644 index 0000000..0c36d93 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhase.gen.cs @@ -0,0 +1,170 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_Init")] + public static partial void BroadPhase_Init( + BroadPhase self, + BodyManager bodyManager, + BroadPhaseLayerInterface layerInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_Optimize")] + public static partial void BroadPhase_Optimize(BroadPhase self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_FrameSync")] + public static partial void BroadPhase_FrameSync(BroadPhase self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_LockModifications")] + public static partial void BroadPhase_LockModifications(BroadPhase self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_UnlockModifications")] + public static partial void BroadPhase_UnlockModifications(BroadPhase self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_RemoveBodies")] + public static partial void BroadPhase_RemoveBodies(BroadPhase self, uint* bodies, int number); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_NotifyBodiesAABBChanged")] + public static partial void BroadPhase_NotifyBodiesAABBChanged( + BroadPhase self, + uint* bodies, + int number, + Brutal.Bool8 takeLock + ); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_NotifyBodiesLayerChanged")] + public static partial void BroadPhase_NotifyBodiesLayerChanged(BroadPhase self, uint* bodies, int number); + + /// + /// + /// Find all colliding pairs between dynamic bodies Note that this function is very specifically + /// tailored for the PhysicsSystem::Update function, hence it is not part of the BroadPhaseQuery + /// interface. One of the assumptions it can make is that no locking is needed during the query as it + /// will only be called during a very particular part of the update. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:93 + ///
+ /// virtual void FindCollidingPairs(BodyID *ioActiveBodies, int inNumActiveBodies, float inSpeculativeContactDistance, const ObjectVsBroadPhaseLayerFilter &inObjectVsBroadPhaseLayerFilter, const ObjectLayerPairFilter &inObjectLayerPairFilter, BodyPairCollector &ioPairCollector) const = 0 + ///
+ ///
+ /// + /// + /// Find all colliding pairs between dynamic bodies + /// Note that this function is very specifically tailored for the PhysicsSystem::Update function, hence it is not part of the BroadPhaseQuery interface. + /// One of the assumptions it can make is that no locking is needed during the query as it will only be called during a very particular part of the update. + /// @param ioActiveBodies is a list of bodies for which we need to find colliding pairs (this function can change the order of the ioActiveBodies array). This can be a subset of the set of active bodies in the system. + /// @param inNumActiveBodies is the size of the ioActiveBodies array. + /// @param inSpeculativeContactDistance Distance at which speculative contact points will be created. + /// @param inObjectVsBroadPhaseLayerFilter is the filter that determines if an object can collide with a broadphase layer. + /// @param inObjectLayerPairFilter is the filter that determines if two objects can collide. + /// @param ioPairCollector receives callbacks for every body pair found. + /// + /// + /// Collects every hit into findcollidingpairsresults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// activeBodies is the buffer the native call works on, and its element count travels with it: the call + /// may write through the span, and only for the duration of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_FindCollidingPairs")] + public static partial uint BroadPhase_FindCollidingPairs( + BroadPhase self, + uint* activeBodies, + int numActiveBodies, + float speculativeContactDistance, + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ObjectLayerPairFilter objectLayerPairFilter, + BodyPair* buffer, + uint capacity + ); + + /// + /// + /// Same as BroadPhaseQuery::CastAABox but can be implemented in a way to take no broad phase locks. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:96 + ///
+ /// virtual void CastAABoxNoLock(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxnolockresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_CastAABoxNoLock")] + public static partial uint BroadPhase_CastAABoxNoLock( + BroadPhase self, + in AABoxCast box, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Same as BroadPhaseQuery::CastAABox but can be implemented in a way to take no broad phase locks. + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhase.h:96 + ///
+ /// virtual void CastAABoxNoLock(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhase_CastAABoxNoLockClosest")] + public static partial uint BroadPhase_CastAABoxNoLockClosest( + BroadPhase self, + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseBruteForce.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseBruteForce.gen.cs new file mode 100644 index 0000000..90f8f84 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseBruteForce.gen.cs @@ -0,0 +1,274 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_Create")] + public static partial BroadPhaseBruteForce BroadPhaseBruteForce_Create(); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_Destroy")] + public static partial void BroadPhaseBruteForce_Destroy(BroadPhaseBruteForce self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_NotifyBodiesAABBChanged")] + public static partial void BroadPhaseBruteForce_NotifyBodiesAABBChanged( + BroadPhaseBruteForce self, + uint* bodies, + int number, + Brutal.Bool8 takeLock + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:23 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CastRay")] + public static partial uint BroadPhaseBruteForce_CastRay( + BroadPhaseBruteForce self, + in RayCast ray, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:23 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CastRayClosest")] + public static partial uint BroadPhaseBruteForce_CastRayClosest( + BroadPhaseBruteForce self, + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:24 + ///
+ /// virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideaaboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CollideAABox")] + public static partial uint BroadPhaseBruteForce_CollideAABox( + BroadPhaseBruteForce self, + in AABox box, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:25 + ///
+ /// virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidesphereresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CollideSphere")] + public static partial uint BroadPhaseBruteForce_CollideSphere( + BroadPhaseBruteForce self, + float3 center, + float radius, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:26 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CollidePoint")] + public static partial uint BroadPhaseBruteForce_CollidePoint( + BroadPhaseBruteForce self, + float3 point, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:27 + ///
+ /// virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideorientedboxresults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CollideOrientedBox")] + public static partial uint BroadPhaseBruteForce_CollideOrientedBox( + BroadPhaseBruteForce self, + OrientedBox box, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:29 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CastAABox")] + public static partial uint BroadPhaseBruteForce_CastAABox( + BroadPhaseBruteForce self, + in AABoxCast box, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h:29 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseBruteForce_CastAABoxClosest")] + public static partial uint BroadPhaseBruteForce_CastAABoxClosest( + BroadPhaseBruteForce self, + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseCastResult.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseCastResult.gen.cs new file mode 100644 index 0000000..978ed57 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseCastResult.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. + /// For rays/cast shapes we can just use the collision fraction. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:19 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "BroadPhaseCastResult_GetEarlyOutFraction")] + public static partial float BroadPhaseCastResult_GetEarlyOutFraction(ref BroadPhaseCastResult self); + + /// + /// + /// Reset this result so it can be reused for a new cast. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:22 + ///
+ /// inline void Reset() + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "BroadPhaseCastResult_Reset")] + public static partial void BroadPhaseCastResult_Reset(ref BroadPhaseCastResult self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..52f83d1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerFilter.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_Create")] + public static partial BroadPhaseLayerFilter BroadPhaseLayerFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_Destroy")] + public static partial void BroadPhaseLayerFilter_Destroy(BroadPhaseLayerFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_ShouldCollide")] + public static partial Brutal.Bool8 BroadPhaseLayerFilter_ShouldCollide( + BroadPhaseLayerFilter self, + byte layer + ); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_CreateProxy")] + public static partial nint BroadPhaseLayerFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_DestroyProxy")] + public static partial void BroadPhaseLayerFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_ProxyGetBase")] + public static partial BroadPhaseLayerFilter BroadPhaseLayerFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerFilter_ProxySetShouldCollide")] + public static partial void BroadPhaseLayerFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterface.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterface.gen.cs new file mode 100644 index 0000000..7b86771 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterface.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterface_GetNumBroadPhaseLayers")] + public static partial uint BroadPhaseLayerInterface_GetNumBroadPhaseLayers(BroadPhaseLayerInterface self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterface_GetBroadPhaseLayer")] + public static partial byte BroadPhaseLayerInterface_GetBroadPhaseLayer( + BroadPhaseLayerInterface self, + ushort layer + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceMask.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceMask.gen.cs new file mode 100644 index 0000000..32799e8 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceMask.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceMask_Create")] + public static partial BroadPhaseLayerInterfaceMask BroadPhaseLayerInterfaceMask_Create( + uint numBroadPhaseLayers + ); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceMask_Destroy")] + public static partial void BroadPhaseLayerInterfaceMask_Destroy(BroadPhaseLayerInterfaceMask self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceMask_ConfigureLayer")] + public static partial void BroadPhaseLayerInterfaceMask_ConfigureLayer( + BroadPhaseLayerInterfaceMask self, + byte broadPhaseLayer, + uint groupsToInclude, + uint groupsToExclude + ); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceMask_ShouldCollide")] + public static partial Brutal.Bool8 BroadPhaseLayerInterfaceMask_ShouldCollide( + BroadPhaseLayerInterfaceMask self, + ushort layer1, + byte layer2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceTable.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceTable.gen.cs new file mode 100644 index 0000000..9fb3fee --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseLayerInterfaceTable.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceTable_Create")] + public static partial BroadPhaseLayerInterfaceTable BroadPhaseLayerInterfaceTable_Create( + uint numObjectLayers, + uint numBroadPhaseLayers + ); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceTable_Destroy")] + public static partial void BroadPhaseLayerInterfaceTable_Destroy(BroadPhaseLayerInterfaceTable self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseLayerInterfaceTable_MapObjectToBroadPhaseLayer")] + public static partial void BroadPhaseLayerInterfaceTable_MapObjectToBroadPhaseLayer( + BroadPhaseLayerInterfaceTable self, + ushort objectLayer, + byte broadPhaseLayer + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseQuadTree.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseQuadTree.gen.cs new file mode 100644 index 0000000..7cc8bda --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseQuadTree.gen.cs @@ -0,0 +1,274 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_Create")] + public static partial BroadPhaseQuadTree BroadPhaseQuadTree_Create(); + + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_Destroy")] + public static partial void BroadPhaseQuadTree_Destroy(BroadPhaseQuadTree self); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_NotifyBodiesAABBChanged")] + public static partial void BroadPhaseQuadTree_NotifyBodiesAABBChanged( + BroadPhaseQuadTree self, + uint* bodies, + int number, + Brutal.Bool8 takeLock + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:36 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CastRay")] + public static partial uint BroadPhaseQuadTree_CastRay( + BroadPhaseQuadTree self, + in RayCast ray, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:36 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CastRayClosest")] + public static partial uint BroadPhaseQuadTree_CastRayClosest( + BroadPhaseQuadTree self, + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:37 + ///
+ /// virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideaaboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CollideAABox")] + public static partial uint BroadPhaseQuadTree_CollideAABox( + BroadPhaseQuadTree self, + in AABox box, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:38 + ///
+ /// virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidesphereresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CollideSphere")] + public static partial uint BroadPhaseQuadTree_CollideSphere( + BroadPhaseQuadTree self, + float3 center, + float radius, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:39 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CollidePoint")] + public static partial uint BroadPhaseQuadTree_CollidePoint( + BroadPhaseQuadTree self, + float3 point, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:40 + ///
+ /// virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into collideorientedboxresults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CollideOrientedBox")] + public static partial uint BroadPhaseQuadTree_CollideOrientedBox( + BroadPhaseQuadTree self, + OrientedBox box, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:42 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CastAABox")] + public static partial uint BroadPhaseQuadTree_CastAABox( + BroadPhaseQuadTree self, + in AABoxCast box, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h:42 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) const override + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuadTree_CastAABoxClosest")] + public static partial uint BroadPhaseQuadTree_CastAABoxClosest( + BroadPhaseQuadTree self, + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/BroadPhaseQuery.gen.cs b/Brutal.Jolt/Generated/PInvoke/BroadPhaseQuery.gen.cs new file mode 100644 index 0000000..25792b8 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/BroadPhaseQuery.gen.cs @@ -0,0 +1,239 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Cast a ray and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:35 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CastRay")] + public static partial uint BroadPhaseQuery_CastRay( + BroadPhaseQuery self, + in RayCast ray, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Cast a ray and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:35 + ///
+ /// virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CastRayClosest")] + public static partial uint BroadPhaseQuery_CastRayClosest( + BroadPhaseQuery self, + in RayCast ray, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Get bodies intersecting with inBox and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:38 + ///
+ /// virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collideaaboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CollideAABox")] + public static partial uint BroadPhaseQuery_CollideAABox( + BroadPhaseQuery self, + in AABox box, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Get bodies intersecting with a sphere and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:41 + ///
+ /// virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collidesphereresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CollideSphere")] + public static partial uint BroadPhaseQuery_CollideSphere( + BroadPhaseQuery self, + float3 center, + float radius, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Get bodies intersecting with a point and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:44 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CollidePoint")] + public static partial uint BroadPhaseQuery_CollidePoint( + BroadPhaseQuery self, + float3 point, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Get bodies intersecting with an oriented box and any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:47 + ///
+ /// virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collideorientedboxresults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CollideOrientedBox")] + public static partial uint BroadPhaseQuery_CollideOrientedBox( + BroadPhaseQuery self, + OrientedBox box, + uint* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Cast a box and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:50 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castaaboxresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CastAABox")] + public static partial uint BroadPhaseQuery_CastAABox( + BroadPhaseQuery self, + in AABoxCast box, + BroadPhaseCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + /// + /// Cast a box and add any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h:50 + ///
+ /// virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_CastAABoxClosest")] + public static partial uint BroadPhaseQuery_CastAABoxClosest( + BroadPhaseQuery self, + in AABoxCast box, + out BroadPhaseCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "BroadPhaseQuery_GetBounds")] + public static partial AABox BroadPhaseQuery_GetBounds(BroadPhaseQuery self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ByteBuffer.gen.cs b/Brutal.Jolt/Generated/PInvoke/ByteBuffer.gen.cs new file mode 100644 index 0000000..bfc5741 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ByteBuffer.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ByteBuffer_Create")] + public static partial ByteBuffer ByteBuffer_Create(); + + [LibraryImport("jolt", EntryPoint = "ByteBuffer_Destroy")] + public static partial void ByteBuffer_Destroy(ByteBuffer self); + + /// + [LibraryImport("jolt", EntryPoint = "ByteBuffer_Align")] + public static partial nuint ByteBuffer_Align(ByteBuffer self, nuint size); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CalculateSolverSteps.gen.cs b/Brutal.Jolt/Generated/PInvoke/CalculateSolverSteps.gen.cs new file mode 100644 index 0000000..4e6a0e4 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CalculateSolverSteps.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CalculateSolverSteps_Create")] + public static partial CalculateSolverSteps CalculateSolverSteps_Create(in PhysicsSettings settings); + + [LibraryImport("jolt", EntryPoint = "CalculateSolverSteps_Destroy")] + public static partial void CalculateSolverSteps_Destroy(CalculateSolverSteps self); + + /// + [LibraryImport("jolt", EntryPoint = "CalculateSolverSteps_Complete")] + public static partial void CalculateSolverSteps_Complete(CalculateSolverSteps self); + + /// + [LibraryImport("jolt", EntryPoint = "CalculateSolverSteps_GetNumPositionSteps")] + public static partial uint CalculateSolverSteps_GetNumPositionSteps(CalculateSolverSteps self); + + /// + [LibraryImport("jolt", EntryPoint = "CalculateSolverSteps_GetNumVelocitySteps")] + public static partial uint CalculateSolverSteps_GetNumVelocitySteps(CalculateSolverSteps self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CapsuleShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/CapsuleShape.gen.cs new file mode 100644 index 0000000..0ab9e4b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CapsuleShape.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShape_Create")] + public static partial CapsuleShape CapsuleShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShape_Create_2")] + public static partial CapsuleShape CapsuleShape_Create_2(CapsuleShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShape_Create_3")] + public static partial CapsuleShape CapsuleShape_Create_3( + float halfHeightOfCylinder, + float radius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShape_GetRadius")] + public static partial float CapsuleShape_GetRadius(CapsuleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShape_GetHalfHeightOfCylinder")] + public static partial float CapsuleShape_GetHalfHeightOfCylinder(CapsuleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShape_Register")] + public static partial void CapsuleShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CapsuleShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CapsuleShapeSettings.gen.cs new file mode 100644 index 0000000..3ad5297 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CapsuleShapeSettings.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_Create")] + public static partial CapsuleShapeSettings CapsuleShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_Create_2")] + public static partial CapsuleShapeSettings CapsuleShapeSettings_Create_2( + float halfHeightOfCylinder, + float radius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_IsValid")] + public static partial Brutal.Bool8 CapsuleShapeSettings_IsValid(CapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_IsSphere")] + public static partial Brutal.Bool8 CapsuleShapeSettings_IsSphere(CapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_GetRadius")] + [SuppressGCTransition] + public static partial float CapsuleShapeSettings_GetRadius(CapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_SetRadius")] + [SuppressGCTransition] + public static partial void CapsuleShapeSettings_SetRadius(CapsuleShapeSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_GetHalfHeightOfCylinder")] + [SuppressGCTransition] + public static partial float CapsuleShapeSettings_GetHalfHeightOfCylinder(CapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CapsuleShapeSettings_SetHalfHeightOfCylinder")] + [SuppressGCTransition] + public static partial void CapsuleShapeSettings_SetHalfHeightOfCylinder( + CapsuleShapeSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CastConvexVsTriangles.gen.cs b/Brutal.Jolt/Generated/PInvoke/CastConvexVsTriangles.gen.cs new file mode 100644 index 0000000..33ffa45 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CastConvexVsTriangles.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CastConvexVsTriangles_Cast")] + public static partial void CastConvexVsTriangles_Cast( + CastConvexVsTriangles self, + float3 v0, + float3 v1, + float3 v2, + byte activeEdges, + uint subShapeID2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CastSphereVsTriangles.gen.cs b/Brutal.Jolt/Generated/PInvoke/CastSphereVsTriangles.gen.cs new file mode 100644 index 0000000..e787d32 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CastSphereVsTriangles.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CastSphereVsTriangles_Cast")] + public static partial void CastSphereVsTriangles_Cast( + CastSphereVsTriangles self, + float3 v0, + float3 v1, + float3 v2, + byte activeEdges, + uint subShapeID2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Character.gen.cs b/Brutal.Jolt/Generated/PInvoke/Character.gen.cs new file mode 100644 index 0000000..9169620 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Character.gen.cs @@ -0,0 +1,254 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Character_Create")] + public static partial Character Character_Create( + CharacterSettings settings, + float3 position, + floatQuat rotation, + ulong userData, + PhysicsSystem system + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_AddToPhysicsSystem")] + public static partial void Character_AddToPhysicsSystem( + Character self, + Activation activationMode, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_RemoveFromPhysicsSystem")] + public static partial void Character_RemoveFromPhysicsSystem(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_Activate")] + public static partial void Character_Activate(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_PostSimulation")] + public static partial void Character_PostSimulation( + Character self, + float maxSeparationDistance, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetLinearAndAngularVelocity")] + public static partial void Character_SetLinearAndAngularVelocity( + Character self, + float3 linearVelocity, + float3 angularVelocity, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetLinearVelocity")] + public static partial float3 Character_GetLinearVelocity(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetLinearVelocity")] + public static partial void Character_SetLinearVelocity( + Character self, + float3 linearVelocity, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_AddLinearVelocity")] + public static partial void Character_AddLinearVelocity( + Character self, + float3 linearVelocity, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_AddImpulse")] + public static partial void Character_AddImpulse(Character self, float3 impulse, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetBodyID")] + public static partial uint Character_GetBodyID(Character self); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetPositionAndRotation")] + public static partial void Character_GetPositionAndRotation( + Character self, + out float3 position, + out floatQuat rotation, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetPositionAndRotation")] + public static partial void Character_SetPositionAndRotation( + Character self, + float3 position, + floatQuat rotation, + Activation activationMode, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetPosition")] + public static partial float3 Character_GetPosition(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetPosition")] + public static partial void Character_SetPosition( + Character self, + float3 position, + Activation activationMode, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetRotation")] + public static partial floatQuat Character_GetRotation(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetRotation")] + public static partial void Character_SetRotation( + Character self, + floatQuat rotation, + Activation activationMode, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetCenterOfMassPosition")] + public static partial float3 Character_GetCenterOfMassPosition(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetWorldTransform")] + public static partial float4x4 Character_GetWorldTransform(Character self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetLayer")] + public static partial ushort Character_GetLayer(Character self); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetLayer")] + public static partial void Character_SetLayer(Character self, ushort layer, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Character_SetShape")] + public static partial Brutal.Bool8 Character_SetShape( + Character self, + Shape shape, + float maxPenetrationDepth, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetTransformedShape")] + public static partial TransformedShape Character_GetTransformedShape( + Character self, + Brutal.Bool8 lockBodies + ); + + /// + /// + /// Get all contacts for the character at a particular location + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:140 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, bool inLockBodies = true) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location + /// @param inPosition Position to test. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inLockBodies If the collision query should use the locking body interface (true) or the non locking body interface (false) + /// + /// + /// Collects every hit into checkcollisionresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "Character_CheckCollision")] + public static partial uint Character_CheckCollision( + Character self, + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + CollideShapeResult* buffer, + uint capacity, + Brutal.Bool8 lockBodies + ); + + /// + /// + /// Get all contacts for the character at a particular location + /// + /// + /// C++: + /// Jolt/Physics/Character/Character.h:140 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, bool inLockBodies = true) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location + /// @param inPosition Position to test. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inLockBodies If the collision query should use the locking body interface (true) or the non locking body interface (false) + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "Character_CheckCollisionClosest")] + public static partial uint Character_CheckCollisionClosest( + Character self, + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + out CollideShapeResult result, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Character_GetCharacterSettings")] + public static partial CharacterSettings Character_GetCharacterSettings( + Character self, + Brutal.Bool8 lockBodies + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterBase.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterBase.gen.cs new file mode 100644 index 0000000..69c9bdd --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterBase.gen.cs @@ -0,0 +1,111 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_Create")] + public static partial CharacterBase CharacterBase_Create( + CharacterBaseSettings settings, + PhysicsSystem system + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_SetMaxSlopeAngle")] + public static partial void CharacterBase_SetMaxSlopeAngle(CharacterBase self, float maxSlopeAngle); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetCosMaxSlopeAngle")] + public static partial float CharacterBase_GetCosMaxSlopeAngle(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_SetUp")] + public static partial void CharacterBase_SetUp(CharacterBase self, float3 up); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetUp")] + public static partial float3 CharacterBase_GetUp(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetSupportingVolume")] + public static partial Plane CharacterBase_GetSupportingVolume(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_SetSupportingVolume")] + public static partial void CharacterBase_SetSupportingVolume(CharacterBase self, in Plane plane); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_IsSlopeTooSteep")] + public static partial Brutal.Bool8 CharacterBase_IsSlopeTooSteep(CharacterBase self, float3 normal); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetShape")] + public static partial Shape CharacterBase_GetShape(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_ToDisplayString")] + public static partial byte* CharacterBase_ToDisplayString(CharacterBase.GroundState state); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundState")] + public static partial CharacterBase.GroundState CharacterBase_GetGroundState(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_IsSupported")] + public static partial Brutal.Bool8 CharacterBase_IsSupported(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundPosition")] + public static partial float3 CharacterBase_GetGroundPosition(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundNormal")] + public static partial float3 CharacterBase_GetGroundNormal(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundVelocity")] + public static partial float3 CharacterBase_GetGroundVelocity(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundMaterial")] + public static partial PhysicsMaterial CharacterBase_GetGroundMaterial(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundBodyID")] + public static partial uint CharacterBase_GetGroundBodyID(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundSubShapeID")] + public static partial uint CharacterBase_GetGroundSubShapeID(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetGroundUserData")] + public static partial ulong CharacterBase_GetGroundUserData(CharacterBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_SaveState")] + public static partial void CharacterBase_SaveState(CharacterBase self, StateRecorder stream); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBase_RestoreState")] + public static partial void CharacterBase_RestoreState(CharacterBase self, StateRecorder stream); + + [LibraryImport("jolt", EntryPoint = "CharacterBase_AddRef")] + public static partial void CharacterBase_AddRef(CharacterBase self); + + [LibraryImport("jolt", EntryPoint = "CharacterBase_Release")] + public static partial void CharacterBase_Release(CharacterBase self); + + [LibraryImport("jolt", EntryPoint = "CharacterBase_GetRefCount")] + public static partial uint CharacterBase_GetRefCount(CharacterBase self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterBaseSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterBaseSettings.gen.cs new file mode 100644 index 0000000..6423b75 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterBaseSettings.gen.cs @@ -0,0 +1,82 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_Create")] + public static partial CharacterBaseSettings CharacterBaseSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_GetUp")] + [SuppressGCTransition] + public static partial float3 CharacterBaseSettings_GetUp(CharacterBaseSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_SetUp")] + [SuppressGCTransition] + public static partial void CharacterBaseSettings_SetUp(CharacterBaseSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_GetSupportingVolume")] + public static partial Plane CharacterBaseSettings_GetSupportingVolume(CharacterBaseSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_SetSupportingVolume")] + public static partial void CharacterBaseSettings_SetSupportingVolume( + CharacterBaseSettings self, + Plane value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_GetMaxSlopeAngle")] + [SuppressGCTransition] + public static partial float CharacterBaseSettings_GetMaxSlopeAngle(CharacterBaseSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_SetMaxSlopeAngle")] + [SuppressGCTransition] + public static partial void CharacterBaseSettings_SetMaxSlopeAngle(CharacterBaseSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_GetEnhancedInternalEdgeRemoval")] + [SuppressGCTransition] + public static partial Brutal.Bool8 CharacterBaseSettings_GetEnhancedInternalEdgeRemoval( + CharacterBaseSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_SetEnhancedInternalEdgeRemoval")] + [SuppressGCTransition] + public static partial void CharacterBaseSettings_SetEnhancedInternalEdgeRemoval( + CharacterBaseSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_GetShape")] + public static partial Shape CharacterBaseSettings_GetShape(CharacterBaseSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_SetShape")] + public static partial void CharacterBaseSettings_SetShape(CharacterBaseSettings self, Shape value); + + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_AddRef")] + public static partial void CharacterBaseSettings_AddRef(CharacterBaseSettings self); + + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_Release")] + public static partial void CharacterBaseSettings_Release(CharacterBaseSettings self); + + [LibraryImport("jolt", EntryPoint = "CharacterBaseSettings_GetRefCount")] + public static partial uint CharacterBaseSettings_GetRefCount(CharacterBaseSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterContact.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterContact.gen.cs new file mode 100644 index 0000000..ccce17f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterContact.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Saving / restoring state for replay + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:133 + ///
+ /// void SaveState(StateRecorder &inStream) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CharacterContact_SaveState")] + public static partial void CharacterContact_SaveState(ref CharacterContact self, StateRecorder stream); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:134 + ///
+ /// void RestoreState(StateRecorder &inStream) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CharacterContact_RestoreState")] + public static partial void CharacterContact_RestoreState(ref CharacterContact self, StateRecorder stream); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterContactKey.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterContactKey.gen.cs new file mode 100644 index 0000000..5f45c29 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterContactKey.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactKey_Create")] + public static partial void CharacterContactKey_Create(out CharacterContactKey outResult); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactKey_Create_2")] + public static partial void CharacterContactKey_Create_2( + uint bodyB, + uint subShapeID, + out CharacterContactKey outResult + ); + + /// + /// + /// Checks if two contacts refer to the same body (or virtual character) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:96 + ///
+ /// inline bool IsSameBody(const CharacterContactKey &inOther) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CharacterContactKey_IsSameBody")] + public static partial Brutal.Bool8 CharacterContactKey_IsSameBody( + ref CharacterContactKey self, + in CharacterContactKey other + ); + + /// + /// + /// Hash of this structure + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:113 + ///
+ /// inline uint64 GetHash() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CharacterContactKey_GetHash")] + public static partial ulong CharacterContactKey_GetHash(ref CharacterContactKey self); + + /// + /// + /// Saving / restoring state for replay + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:120 + ///
+ /// void SaveState(StateRecorder &inStream) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CharacterContactKey_SaveState")] + public static partial void CharacterContactKey_SaveState( + ref CharacterContactKey self, + StateRecorder stream + ); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:121 + ///
+ /// void RestoreState(StateRecorder &inStream) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CharacterContactKey_RestoreState")] + public static partial void CharacterContactKey_RestoreState( + ref CharacterContactKey self, + StateRecorder stream + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterContactListener.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterContactListener.gen.cs new file mode 100644 index 0000000..3e78d91 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterContactListener.gen.cs @@ -0,0 +1,248 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_Create")] + public static partial CharacterContactListener CharacterContactListener_Create(); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_Destroy")] + public static partial void CharacterContactListener_Destroy(CharacterContactListener self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnAdjustBodyVelocity")] + public static partial void CharacterContactListener_OnAdjustBodyVelocity( + CharacterContactListener self, + CharacterVirtual character, + Body body2, + ref float3 linearVelocity, + ref float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnContactValidate")] + public static partial Brutal.Bool8 CharacterContactListener_OnContactValidate( + CharacterContactListener self, + CharacterVirtual character, + in CharacterContact contact + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnContactAdded")] + public static partial void CharacterContactListener_OnContactAdded( + CharacterContactListener self, + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnContactPersisted")] + public static partial void CharacterContactListener_OnContactPersisted( + CharacterContactListener self, + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnContactRemoved")] + public static partial void CharacterContactListener_OnContactRemoved( + CharacterContactListener self, + CharacterVirtual character, + uint bodyID2, + uint subShapeID2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnCharacterContactValidate")] + public static partial Brutal.Bool8 CharacterContactListener_OnCharacterContactValidate( + CharacterContactListener self, + CharacterVirtual character, + in CharacterContact contact + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnCharacterContactAdded")] + public static partial void CharacterContactListener_OnCharacterContactAdded( + CharacterContactListener self, + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnCharacterContactPersisted")] + public static partial void CharacterContactListener_OnCharacterContactPersisted( + CharacterContactListener self, + CharacterVirtual character, + in CharacterContact contact, + ref CharacterContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnCharacterContactRemoved")] + public static partial void CharacterContactListener_OnCharacterContactRemoved( + CharacterContactListener self, + CharacterVirtual character, + uint otherCharacterID, + uint subShapeID2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnContactSolve")] + public static partial void CharacterContactListener_OnContactSolve( + CharacterContactListener self, + CharacterVirtual character, + uint bodyID2, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + ref float3 newCharacterVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_OnCharacterContactSolve")] + public static partial void CharacterContactListener_OnCharacterContactSolve( + CharacterContactListener self, + CharacterVirtual character, + CharacterVirtual otherCharacter, + uint subShapeID2, + float3 contactPosition, + float3 contactNormal, + float3 contactVelocity, + PhysicsMaterial contactMaterial, + float3 characterVelocity, + ref float3 newCharacterVelocity + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_CreateProxy")] + public static partial nint CharacterContactListener_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_DestroyProxy")] + public static partial void CharacterContactListener_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxyGetBase")] + public static partial CharacterContactListener CharacterContactListener_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnAdjustBodyVelocity")] + public static partial void CharacterContactListener_ProxySetOnAdjustBodyVelocity( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnContactValidate")] + public static partial void CharacterContactListener_ProxySetOnContactValidate( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnContactAdded")] + public static partial void CharacterContactListener_ProxySetOnContactAdded( + nint self, + delegate* unmanaged[Cdecl]< + CharacterVirtual, + CharacterContact*, + CharacterContactSettings*, + nint, + void> callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnContactPersisted")] + public static partial void CharacterContactListener_ProxySetOnContactPersisted( + nint self, + delegate* unmanaged[Cdecl]< + CharacterVirtual, + CharacterContact*, + CharacterContactSettings*, + nint, + void> callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnContactRemoved")] + public static partial void CharacterContactListener_ProxySetOnContactRemoved( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnCharacterContactValidate")] + public static partial void CharacterContactListener_ProxySetOnCharacterContactValidate( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnCharacterContactAdded")] + public static partial void CharacterContactListener_ProxySetOnCharacterContactAdded( + nint self, + delegate* unmanaged[Cdecl]< + CharacterVirtual, + CharacterContact*, + CharacterContactSettings*, + nint, + void> callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnCharacterContactPersisted")] + public static partial void CharacterContactListener_ProxySetOnCharacterContactPersisted( + nint self, + delegate* unmanaged[Cdecl]< + CharacterVirtual, + CharacterContact*, + CharacterContactSettings*, + nint, + void> callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnCharacterContactRemoved")] + public static partial void CharacterContactListener_ProxySetOnCharacterContactRemoved( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnContactSolve")] + public static partial void CharacterContactListener_ProxySetOnContactSolve( + nint self, + delegate* unmanaged[Cdecl]< + CharacterVirtual, + uint, + uint, + float3, + float3, + float3, + PhysicsMaterial, + float3, + float3*, + nint, + void> callback + ); + + [LibraryImport("jolt", EntryPoint = "CharacterContactListener_ProxySetOnCharacterContactSolve")] + public static partial void CharacterContactListener_ProxySetOnCharacterContactSolve( + nint self, + delegate* unmanaged[Cdecl]< + CharacterVirtual, + CharacterVirtual, + uint, + float3, + float3, + float3, + PhysicsMaterial, + float3, + float3*, + nint, + void> callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterSettings.gen.cs new file mode 100644 index 0000000..460c8b6 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterSettings.gen.cs @@ -0,0 +1,69 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_Create")] + public static partial CharacterSettings CharacterSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_GetLayer")] + [SuppressGCTransition] + public static partial ushort CharacterSettings_GetLayer(CharacterSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_SetLayer")] + [SuppressGCTransition] + public static partial void CharacterSettings_SetLayer(CharacterSettings self, ushort value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_GetMass")] + [SuppressGCTransition] + public static partial float CharacterSettings_GetMass(CharacterSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_SetMass")] + [SuppressGCTransition] + public static partial void CharacterSettings_SetMass(CharacterSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_GetFriction")] + [SuppressGCTransition] + public static partial float CharacterSettings_GetFriction(CharacterSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_SetFriction")] + [SuppressGCTransition] + public static partial void CharacterSettings_SetFriction(CharacterSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_GetGravityFactor")] + [SuppressGCTransition] + public static partial float CharacterSettings_GetGravityFactor(CharacterSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_SetGravityFactor")] + [SuppressGCTransition] + public static partial void CharacterSettings_SetGravityFactor(CharacterSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_GetAllowedDOFs")] + [SuppressGCTransition] + public static partial AllowedDOFs CharacterSettings_GetAllowedDOFs(CharacterSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterSettings_SetAllowedDOFs")] + [SuppressGCTransition] + public static partial void CharacterSettings_SetAllowedDOFs(CharacterSettings self, AllowedDOFs value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterVirtual.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterVirtual.gen.cs new file mode 100644 index 0000000..6e1da9e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterVirtual.gen.cs @@ -0,0 +1,469 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_Create")] + public static partial CharacterVirtual CharacterVirtual_Create( + CharacterVirtualSettings settings, + float3 position, + floatQuat rotation, + ulong userData, + PhysicsSystem system + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_Create_2")] + public static partial CharacterVirtual CharacterVirtual_Create_2( + CharacterVirtualSettings settings, + float3 position, + floatQuat rotation, + PhysicsSystem system + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetID")] + public static partial uint CharacterVirtual_GetID(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetListener")] + public static partial void CharacterVirtual_SetListener( + CharacterVirtual self, + CharacterContactListener listener + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetListener")] + public static partial CharacterContactListener CharacterVirtual_GetListener(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetCharacterVsCharacterCollision")] + public static partial void CharacterVirtual_SetCharacterVsCharacterCollision( + CharacterVirtual self, + CharacterVsCharacterCollision characterVsCharacterCollision + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetLinearVelocity")] + public static partial float3 CharacterVirtual_GetLinearVelocity(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetLinearVelocity")] + public static partial void CharacterVirtual_SetLinearVelocity(CharacterVirtual self, float3 linearVelocity); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetPosition")] + public static partial float3 CharacterVirtual_GetPosition(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetPosition")] + public static partial void CharacterVirtual_SetPosition(CharacterVirtual self, float3 position); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetRotation")] + public static partial floatQuat CharacterVirtual_GetRotation(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetRotation")] + public static partial void CharacterVirtual_SetRotation(CharacterVirtual self, floatQuat rotation); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetCenterOfMassPosition")] + public static partial float3 CharacterVirtual_GetCenterOfMassPosition(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetWorldTransform")] + public static partial float4x4 CharacterVirtual_GetWorldTransform(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetCenterOfMassTransform")] + public static partial float4x4 CharacterVirtual_GetCenterOfMassTransform(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetMass")] + public static partial float CharacterVirtual_GetMass(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetMass")] + public static partial void CharacterVirtual_SetMass(CharacterVirtual self, float mass); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetMaxStrength")] + public static partial float CharacterVirtual_GetMaxStrength(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetMaxStrength")] + public static partial void CharacterVirtual_SetMaxStrength(CharacterVirtual self, float maxStrength); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetPenetrationRecoverySpeed")] + public static partial float CharacterVirtual_GetPenetrationRecoverySpeed(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetPenetrationRecoverySpeed")] + public static partial void CharacterVirtual_SetPenetrationRecoverySpeed(CharacterVirtual self, float speed); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetEnhancedInternalEdgeRemoval")] + public static partial Brutal.Bool8 CharacterVirtual_GetEnhancedInternalEdgeRemoval(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetEnhancedInternalEdgeRemoval")] + public static partial void CharacterVirtual_SetEnhancedInternalEdgeRemoval( + CharacterVirtual self, + Brutal.Bool8 apply + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetCharacterPadding")] + public static partial float CharacterVirtual_GetCharacterPadding(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetMaxNumHits")] + public static partial uint CharacterVirtual_GetMaxNumHits(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetMaxNumHits")] + public static partial void CharacterVirtual_SetMaxNumHits(CharacterVirtual self, uint maxHits); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetHitReductionCosMaxAngle")] + public static partial float CharacterVirtual_GetHitReductionCosMaxAngle(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetHitReductionCosMaxAngle")] + public static partial void CharacterVirtual_SetHitReductionCosMaxAngle( + CharacterVirtual self, + float cosMaxAngle + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetMaxHitsExceeded")] + public static partial Brutal.Bool8 CharacterVirtual_GetMaxHitsExceeded(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetShapeOffset")] + public static partial float3 CharacterVirtual_GetShapeOffset(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetShapeOffset")] + public static partial void CharacterVirtual_SetShapeOffset(CharacterVirtual self, float3 shapeOffset); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetUserData")] + public static partial ulong CharacterVirtual_GetUserData(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetUserData")] + public static partial void CharacterVirtual_SetUserData(CharacterVirtual self, ulong userData); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetInnerBodyID")] + public static partial uint CharacterVirtual_GetInnerBodyID(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_CancelVelocityTowardsSteepSlopes")] + public static partial float3 CharacterVirtual_CancelVelocityTowardsSteepSlopes( + CharacterVirtual self, + float3 desiredVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_StartTrackingContactChanges")] + public static partial void CharacterVirtual_StartTrackingContactChanges(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_FinishTrackingContactChanges")] + public static partial void CharacterVirtual_FinishTrackingContactChanges(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_Update")] + public static partial void CharacterVirtual_Update( + CharacterVirtual self, + float deltaTime, + float3 gravity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_CanWalkStairs")] + public static partial Brutal.Bool8 CharacterVirtual_CanWalkStairs( + CharacterVirtual self, + float3 linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_WalkStairs")] + public static partial Brutal.Bool8 CharacterVirtual_WalkStairs( + CharacterVirtual self, + float deltaTime, + float3 stepUp, + float3 stepForward, + float3 stepForwardTest, + float3 stepDownExtra, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_StickToFloor")] + public static partial Brutal.Bool8 CharacterVirtual_StickToFloor( + CharacterVirtual self, + float3 stepDown, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_ExtendedUpdate")] + public static partial void CharacterVirtual_ExtendedUpdate( + CharacterVirtual self, + float deltaTime, + float3 gravity, + in CharacterVirtual.ExtendedUpdateSettings settings, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_RefreshContacts")] + public static partial void CharacterVirtual_RefreshContacts( + CharacterVirtual self, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_UpdateGroundVelocity")] + public static partial void CharacterVirtual_UpdateGroundVelocity(CharacterVirtual self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetShape")] + public static partial Brutal.Bool8 CharacterVirtual_SetShape( + CharacterVirtual self, + Shape shape, + float maxPenetrationDepth, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetInnerBodyShape")] + public static partial void CharacterVirtual_SetInnerBodyShape(CharacterVirtual self, Shape shape); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetTransformedShape")] + public static partial TransformedShape CharacterVirtual_GetTransformedShape(CharacterVirtual self); + + /// + /// + /// Get all contacts for the character at a particular location. When colliding with another character + /// virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a + /// hit. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:490 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location. + /// When colliding with another character virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a hit. + /// @param inPosition Position to test, note that this position will be corrected for the character padding. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// + /// + /// Collects every hit into checkcollisionresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_CheckCollision")] + public static partial uint CharacterVirtual_CheckCollision( + CharacterVirtual self, + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + CollideShapeResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Get all contacts for the character at a particular location. When colliding with another character + /// virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a + /// hit. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:490 + ///
+ /// void CheckCollision(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter, const BodyFilter &inBodyFilter, const ShapeFilter &inShapeFilter) const + ///
+ ///
+ /// + /// + /// @brief Get all contacts for the character at a particular location. + /// When colliding with another character virtual, this pointer will be provided through CollideShapeCollector::SetUserContext before adding a hit. + /// @param inPosition Position to test, note that this position will be corrected for the character padding. + /// @param inRotation Rotation at which to test the shape. + /// @param inMovementDirection A hint in which direction the character is moving, will be used to calculate a proper normal. + /// @param inMaxSeparationDistance How much distance around the character you want to report contacts in (can be 0 to match the character exactly). + /// @param inShape Shape to test collision with. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// @param inBroadPhaseLayerFilter Filter that is used to check if the character collides with something in the broadphase. + /// @param inObjectLayerFilter Filter that is used to check if a character collides with a layer. + /// @param inBodyFilter Filter that is used to check if a character collides with a body. + /// @param inShapeFilter Filter that is used to check if a character collides with a subshape. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for broadPhaseLayerFilter to filter nothing out. + /// + /// + /// Pass default for objectLayerFilter to filter nothing out. + /// + /// + /// Pass default for bodyFilter to filter nothing out. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_CheckCollisionClosest")] + public static partial uint CharacterVirtual_CheckCollisionClosest( + CharacterVirtual self, + float3 position, + floatQuat rotation, + float3 movementDirection, + float maxSeparationDistance, + Shape shape, + float3 baseOffset, + out CollideShapeResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetCharacterVirtualSettings")] + public static partial CharacterVirtualSettings CharacterVirtual_GetCharacterVirtualSettings( + CharacterVirtual self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetActiveContacts")] + public static partial void CharacterVirtual_GetActiveContacts( + CharacterVirtual self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_HasCollidedWith")] + public static partial Brutal.Bool8 CharacterVirtual_HasCollidedWith(CharacterVirtual self, uint body); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_HasCollidedWith_2")] + public static partial Brutal.Bool8 CharacterVirtual_HasCollidedWith_2( + CharacterVirtual self, + CharacterVirtual character + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetDrawConstraints")] + public static partial Brutal.Bool8 CharacterVirtual_GetDrawConstraints(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetDrawConstraints")] + public static partial void CharacterVirtual_SetDrawConstraints(Brutal.Bool8 value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetDrawWalkStairs")] + public static partial Brutal.Bool8 CharacterVirtual_GetDrawWalkStairs(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetDrawWalkStairs")] + public static partial void CharacterVirtual_SetDrawWalkStairs(Brutal.Bool8 value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetDrawStickToFloor")] + public static partial Brutal.Bool8 CharacterVirtual_GetDrawStickToFloor(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetDrawStickToFloor")] + public static partial void CharacterVirtual_SetDrawStickToFloor(Brutal.Bool8 value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_GetDrawSupportingVolume")] + public static partial Brutal.Bool8 CharacterVirtual_GetDrawSupportingVolume(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtual_SetDrawSupportingVolume")] + public static partial void CharacterVirtual_SetDrawSupportingVolume(Brutal.Bool8 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterVirtualSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterVirtualSettings.gen.cs new file mode 100644 index 0000000..39000af --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterVirtualSettings.gen.cs @@ -0,0 +1,241 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_Create")] + public static partial CharacterVirtualSettings CharacterVirtualSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetID")] + [SuppressGCTransition] + public static partial uint CharacterVirtualSettings_GetID(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetID")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetID(CharacterVirtualSettings self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetMass")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetMass(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetMass")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetMass(CharacterVirtualSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetMaxStrength")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetMaxStrength(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetMaxStrength")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetMaxStrength( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetShapeOffset")] + [SuppressGCTransition] + public static partial float3 CharacterVirtualSettings_GetShapeOffset(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetShapeOffset")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetShapeOffset( + CharacterVirtualSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetBackFaceMode")] + [SuppressGCTransition] + public static partial BackFaceMode CharacterVirtualSettings_GetBackFaceMode(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetBackFaceMode")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetBackFaceMode( + CharacterVirtualSettings self, + BackFaceMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetPredictiveContactDistance")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetPredictiveContactDistance( + CharacterVirtualSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetPredictiveContactDistance")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetPredictiveContactDistance( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetMaxCollisionIterations")] + [SuppressGCTransition] + public static partial uint CharacterVirtualSettings_GetMaxCollisionIterations( + CharacterVirtualSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetMaxCollisionIterations")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetMaxCollisionIterations( + CharacterVirtualSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetMaxConstraintIterations")] + [SuppressGCTransition] + public static partial uint CharacterVirtualSettings_GetMaxConstraintIterations( + CharacterVirtualSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetMaxConstraintIterations")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetMaxConstraintIterations( + CharacterVirtualSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetMinTimeRemaining")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetMinTimeRemaining(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetMinTimeRemaining")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetMinTimeRemaining( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetCollisionTolerance")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetCollisionTolerance(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetCollisionTolerance")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetCollisionTolerance( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetCharacterPadding")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetCharacterPadding(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetCharacterPadding")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetCharacterPadding( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetMaxNumHits")] + [SuppressGCTransition] + public static partial uint CharacterVirtualSettings_GetMaxNumHits(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetMaxNumHits")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetMaxNumHits( + CharacterVirtualSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetHitReductionCosMaxAngle")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetHitReductionCosMaxAngle( + CharacterVirtualSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetHitReductionCosMaxAngle")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetHitReductionCosMaxAngle( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetPenetrationRecoverySpeed")] + [SuppressGCTransition] + public static partial float CharacterVirtualSettings_GetPenetrationRecoverySpeed( + CharacterVirtualSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetPenetrationRecoverySpeed")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetPenetrationRecoverySpeed( + CharacterVirtualSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetInnerBodyShape")] + public static partial Shape CharacterVirtualSettings_GetInnerBodyShape(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetInnerBodyShape")] + public static partial void CharacterVirtualSettings_SetInnerBodyShape( + CharacterVirtualSettings self, + Shape value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetInnerBodyIDOverride")] + [SuppressGCTransition] + public static partial uint CharacterVirtualSettings_GetInnerBodyIDOverride(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetInnerBodyIDOverride")] + public static partial void CharacterVirtualSettings_SetInnerBodyIDOverride( + CharacterVirtualSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_GetInnerBodyLayer")] + [SuppressGCTransition] + public static partial ushort CharacterVirtualSettings_GetInnerBodyLayer(CharacterVirtualSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVirtualSettings_SetInnerBodyLayer")] + [SuppressGCTransition] + public static partial void CharacterVirtualSettings_SetInnerBodyLayer( + CharacterVirtualSettings self, + ushort value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollision.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollision.gen.cs new file mode 100644 index 0000000..28a5348 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollision.gen.cs @@ -0,0 +1,163 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Collide a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:230 + ///
+ /// virtual void CollideCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Collide a character against other CharacterVirtuals. + /// @param inCharacter The character to collide. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inCollideShapeSettings Settings for the collision check. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Collects every hit into collidecharacterresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollision_CollideCharacter")] + public static partial uint CharacterVsCharacterCollision_CollideCharacter( + CharacterVsCharacterCollision self, + CharacterVirtual character, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + CollideShapeResult* buffer, + uint capacity + ); + + /// + /// + /// Collide a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:230 + ///
+ /// virtual void CollideCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Collide a character against other CharacterVirtuals. + /// @param inCharacter The character to collide. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inCollideShapeSettings Settings for the collision check. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollision_CollideCharacterClosest")] + public static partial uint CharacterVsCharacterCollision_CollideCharacterClosest( + CharacterVsCharacterCollision self, + CharacterVirtual character, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result + ); + + /// + /// + /// Cast a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:239 + ///
+ /// virtual void CastCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Cast a character against other CharacterVirtuals. + /// @param inCharacter The character to cast. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inDirection Direction and length to cast in. + /// @param inShapeCastSettings Settings for the shape cast. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Collects every hit into castcharacterresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollision_CastCharacter")] + public static partial uint CharacterVsCharacterCollision_CastCharacter( + CharacterVsCharacterCollision self, + CharacterVirtual character, + in float4x4 centerOfMassTransform, + float3 direction, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + ShapeCastResult* buffer, + uint capacity + ); + + /// + /// + /// Cast a character against other CharacterVirtuals. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:239 + ///
+ /// virtual void CastCharacter(const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const = 0 + ///
+ ///
+ /// + /// + /// Cast a character against other CharacterVirtuals. + /// @param inCharacter The character to cast. + /// @param inCenterOfMassTransform Center of mass transform for this character. + /// @param inDirection Direction and length to cast in. + /// @param inShapeCastSettings Settings for the shape cast. + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin + /// @param ioCollector Collision collector that receives the collision results. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollision_CastCharacterClosest")] + public static partial uint CharacterVsCharacterCollision_CastCharacterClosest( + CharacterVsCharacterCollision self, + CharacterVirtual character, + in float4x4 centerOfMassTransform, + float3 direction, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollisionSimple.gen.cs b/Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollisionSimple.gen.cs new file mode 100644 index 0000000..5dbb1b6 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CharacterVsCharacterCollisionSimple.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollisionSimple_Create")] + public static partial CharacterVsCharacterCollisionSimple CharacterVsCharacterCollisionSimple_Create(); + + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollisionSimple_Destroy")] + public static partial void CharacterVsCharacterCollisionSimple_Destroy( + CharacterVsCharacterCollisionSimple self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollisionSimple_Add")] + public static partial void CharacterVsCharacterCollisionSimple_Add( + CharacterVsCharacterCollisionSimple self, + CharacterVirtual character + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollisionSimple_Remove")] + public static partial void CharacterVsCharacterCollisionSimple_Remove( + CharacterVsCharacterCollisionSimple self, + CharacterVirtual character + ); + + /// + [LibraryImport("jolt", EntryPoint = "CharacterVsCharacterCollisionSimple_GetCharacters")] + public static partial void CharacterVsCharacterCollisionSimple_GetCharacters( + CharacterVsCharacterCollisionSimple self, + out NativeSpanView outResult + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollideConvexVsTriangles.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollideConvexVsTriangles.gen.cs new file mode 100644 index 0000000..317f8a1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollideConvexVsTriangles.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CollideConvexVsTriangles_Collide")] + public static partial void CollideConvexVsTriangles_Collide( + CollideConvexVsTriangles self, + float3 v0, + float3 v1, + float3 v2, + byte activeEdges, + uint subShapeID2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollidePointResult.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollidePointResult.gen.cs new file mode 100644 index 0000000..ea803b3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollidePointResult.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. + /// For point queries there is no sensible return value. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollidePointResult.h:19 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CollidePointResult_GetEarlyOutFraction")] + public static partial float CollidePointResult_GetEarlyOutFraction(ref CollidePointResult self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollideSettingsBase.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollideSettingsBase.gen.cs new file mode 100644 index 0000000..646b539 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollideSettingsBase.gen.cs @@ -0,0 +1,83 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_Create")] + public static partial CollideSettingsBase CollideSettingsBase_Create(); + + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_Destroy")] + public static partial void CollideSettingsBase_Destroy(CollideSettingsBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_GetActiveEdgeMode")] + [SuppressGCTransition] + public static partial ActiveEdgeMode CollideSettingsBase_GetActiveEdgeMode(CollideSettingsBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_SetActiveEdgeMode")] + [SuppressGCTransition] + public static partial void CollideSettingsBase_SetActiveEdgeMode( + CollideSettingsBase self, + ActiveEdgeMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_GetCollectFacesMode")] + [SuppressGCTransition] + public static partial CollectFacesMode CollideSettingsBase_GetCollectFacesMode(CollideSettingsBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_SetCollectFacesMode")] + [SuppressGCTransition] + public static partial void CollideSettingsBase_SetCollectFacesMode( + CollideSettingsBase self, + CollectFacesMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_GetCollisionTolerance")] + [SuppressGCTransition] + public static partial float CollideSettingsBase_GetCollisionTolerance(CollideSettingsBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_SetCollisionTolerance")] + [SuppressGCTransition] + public static partial void CollideSettingsBase_SetCollisionTolerance(CollideSettingsBase self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_GetPenetrationTolerance")] + [SuppressGCTransition] + public static partial float CollideSettingsBase_GetPenetrationTolerance(CollideSettingsBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_SetPenetrationTolerance")] + [SuppressGCTransition] + public static partial void CollideSettingsBase_SetPenetrationTolerance( + CollideSettingsBase self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_GetActiveEdgeMovementDirection")] + [SuppressGCTransition] + public static partial float3 CollideSettingsBase_GetActiveEdgeMovementDirection(CollideSettingsBase self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSettingsBase_SetActiveEdgeMovementDirection")] + [SuppressGCTransition] + public static partial void CollideSettingsBase_SetActiveEdgeMovementDirection( + CollideSettingsBase self, + float3 value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollideShapeResult.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollideShapeResult.gen.cs new file mode 100644 index 0000000..fc9755b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollideShapeResult.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeResult_Create")] + public static partial CollideShapeResult CollideShapeResult_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeResult_Create_2")] + public static partial CollideShapeResult CollideShapeResult_Create_2( + float3 contactPointOn1, + float3 contactPointOn2, + float3 penetrationAxis, + float penetrationDepth, + uint subShapeID1, + uint subShapeID2, + uint bodyID2 + ); + + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. + /// We use -penetration depth to get the hit with the biggest penetration depth + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:39 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CollideShapeResult_GetEarlyOutFraction")] + public static partial float CollideShapeResult_GetEarlyOutFraction(ref CollideShapeResult self); + + /// + /// + /// Reverses the hit result, swapping contact point 1 with contact point 2 etc. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:42 + ///
+ /// inline CollideShapeResult Reversed() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "CollideShapeResult_Reversed")] + public static partial CollideShapeResult CollideShapeResult_Reversed(ref CollideShapeResult self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollideShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollideShapeSettings.gen.cs new file mode 100644 index 0000000..c35881f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollideShapeSettings.gen.cs @@ -0,0 +1,62 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_Create")] + public static partial CollideShapeSettings CollideShapeSettings_Create(); + + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_Destroy")] + public static partial void CollideShapeSettings_Destroy(CollideShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_GetMaxSeparationDistance")] + [SuppressGCTransition] + public static partial float CollideShapeSettings_GetMaxSeparationDistance(CollideShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_SetMaxSeparationDistance")] + [SuppressGCTransition] + public static partial void CollideShapeSettings_SetMaxSeparationDistance( + CollideShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_GetBackFaceMode")] + [SuppressGCTransition] + public static partial BackFaceMode CollideShapeSettings_GetBackFaceMode(CollideShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_SetBackFaceMode")] + [SuppressGCTransition] + public static partial void CollideShapeSettings_SetBackFaceMode( + CollideShapeSettings self, + BackFaceMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_GetInternalEdgeRemovalVertexToleranceSq")] + [SuppressGCTransition] + public static partial float CollideShapeSettings_GetInternalEdgeRemovalVertexToleranceSq( + CollideShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideShapeSettings_SetInternalEdgeRemovalVertexToleranceSq")] + [SuppressGCTransition] + public static partial void CollideShapeSettings_SetInternalEdgeRemovalVertexToleranceSq( + CollideShapeSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollideSoftBodyVertexIterator.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollideSoftBodyVertexIterator.gen.cs new file mode 100644 index 0000000..81d32e2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollideSoftBodyVertexIterator.gen.cs @@ -0,0 +1,51 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_Create")] + public static partial CollideSoftBodyVertexIterator CollideSoftBodyVertexIterator_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_Create_2")] + public static partial CollideSoftBodyVertexIterator CollideSoftBodyVertexIterator_Create_2( + SoftBodyVertex* vertices + ); + + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_Destroy")] + public static partial void CollideSoftBodyVertexIterator_Destroy(CollideSoftBodyVertexIterator self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_GetPosition")] + public static partial float3 CollideSoftBodyVertexIterator_GetPosition(CollideSoftBodyVertexIterator self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_GetInvMass")] + public static partial float CollideSoftBodyVertexIterator_GetInvMass(CollideSoftBodyVertexIterator self); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_UpdatePenetration")] + public static partial Brutal.Bool8 CollideSoftBodyVertexIterator_UpdatePenetration( + CollideSoftBodyVertexIterator self, + float largestPenetration + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollideSoftBodyVertexIterator_SetCollision")] + public static partial void CollideSoftBodyVertexIterator_SetCollision( + CollideSoftBodyVertexIterator self, + in Plane collisionPlane, + int collidingShapeIndex + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollideSphereVsTriangles.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollideSphereVsTriangles.gen.cs new file mode 100644 index 0000000..390833b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollideSphereVsTriangles.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CollideSphereVsTriangles_Collide")] + public static partial void CollideSphereVsTriangles_Collide( + CollideSphereVsTriangles self, + float3 v0, + float3 v1, + float3 v2, + byte activeEdges, + uint subShapeID2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastRay.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastRay.gen.cs new file mode 100644 index 0000000..e624b80 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastRay.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastRay_Create")] + public static partial CollisionCollectorTraitsCastRay CollisionCollectorTraitsCastRay_Create(); + + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastRay_Destroy")] + public static partial void CollisionCollectorTraitsCastRay_Destroy(CollisionCollectorTraitsCastRay self); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastRay_GetInitialEarlyOutFraction")] + public static partial float CollisionCollectorTraitsCastRay_GetInitialEarlyOutFraction(); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastRay_GetShouldEarlyOutFraction")] + public static partial float CollisionCollectorTraitsCastRay_GetShouldEarlyOutFraction(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastShape.gen.cs new file mode 100644 index 0000000..50aa5ee --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCastShape.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastShape_Create")] + public static partial CollisionCollectorTraitsCastShape CollisionCollectorTraitsCastShape_Create(); + + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastShape_Destroy")] + public static partial void CollisionCollectorTraitsCastShape_Destroy( + CollisionCollectorTraitsCastShape self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastShape_GetInitialEarlyOutFraction")] + public static partial float CollisionCollectorTraitsCastShape_GetInitialEarlyOutFraction(); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCastShape_GetShouldEarlyOutFraction")] + public static partial float CollisionCollectorTraitsCastShape_GetShouldEarlyOutFraction(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCollideShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCollideShape.gen.cs new file mode 100644 index 0000000..cc4c05f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollisionCollectorTraitsCollideShape.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCollideShape_Create")] + public static partial CollisionCollectorTraitsCollideShape CollisionCollectorTraitsCollideShape_Create(); + + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCollideShape_Destroy")] + public static partial void CollisionCollectorTraitsCollideShape_Destroy( + CollisionCollectorTraitsCollideShape self + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCollideShape_GetInitialEarlyOutFraction")] + public static partial float CollisionCollectorTraitsCollideShape_GetInitialEarlyOutFraction(); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionCollectorTraitsCollideShape_GetShouldEarlyOutFraction")] + public static partial float CollisionCollectorTraitsCollideShape_GetShouldEarlyOutFraction(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollisionDispatch.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollisionDispatch.gen.cs new file mode 100644 index 0000000..20c36cd --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollisionDispatch.gen.cs @@ -0,0 +1,435 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_Create")] + public static partial CollisionDispatch CollisionDispatch_Create(); + + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_Destroy")] + public static partial void CollisionDispatch_Destroy(CollisionDispatch self); + + /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:33 + ///
+ /// static inline void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) + ///
+ ///
+ /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// @param inShape1 The first shape + /// @param inShape2 The second shape + /// @param inScale1 Local space scale of shape 1 (scales relative to its center of mass) + /// @param inScale2 Local space scale of shape 2 (scales relative to its center of mass) + /// @param inCenterOfMassTransform1 Transform to transform center of mass of shape 1 into world space + /// @param inCenterOfMassTransform2 Transform to transform center of mass of shape 2 into world space + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for shape 1 + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for shape 2 + /// @param inCollideShapeSettings Options for the CollideShape test + /// @param ioCollector The collector that receives the results. + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// + /// + /// Collects every hit into collideshapevsshaperesults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_CollideShapeVsShape")] + public static partial uint CollisionDispatch_CollideShapeVsShape( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + CollideShapeResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:33 + ///
+ /// static inline void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) + ///
+ ///
+ /// + /// + /// Collide 2 shapes and pass any collision on to ioCollector + /// @param inShape1 The first shape + /// @param inShape2 The second shape + /// @param inScale1 Local space scale of shape 1 (scales relative to its center of mass) + /// @param inScale2 Local space scale of shape 2 (scales relative to its center of mass) + /// @param inCenterOfMassTransform1 Transform to transform center of mass of shape 1 into world space + /// @param inCenterOfMassTransform2 Transform to transform center of mass of shape 2 into world space + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for shape 1 + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for shape 2 + /// @param inCollideShapeSettings Options for the CollideShape test + /// @param ioCollector The collector that receives the results. + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_CollideShapeVsShapeClosest")] + public static partial uint CollisionDispatch_CollideShapeVsShapeClosest( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. Note: This version takes the + /// shape cast in local space relative to the center of mass of inShape, take a look at + /// sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:53 + ///
+ /// static inline void sCastShapeVsShapeLocalSpace(const ShapeCast &inShapeCastLocal, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. + /// Note: This version takes the shape cast in local space relative to the center of mass of inShape, take a look at sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// @param inShapeCastLocal The shape to cast against the other shape and its start and direction. + /// @param inShapeCastSettings Settings for performing the cast + /// @param inShape The shape to cast against. + /// @param inScale Local space scale for the shape to cast against (scales relative to its center of mass). + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// @param inCenterOfMassTransform2 Is the center of mass transform of shape 2 (excluding scale), this is used to provide a transform to the shape cast result so that local hit result quantities can be transformed into world space. + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for the casting shape + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for the shape we're casting against + /// @param ioCollector The collector that receives the results. + /// + /// + /// Collects every hit into castshapevsshapelocalspaceresults, which you allocate and size. Returns how + /// many were written; totalHits is how many the query found, so a larger span is needed when it exceeds + /// the span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_CastShapeVsShapeLocalSpace")] + public static partial uint CollisionDispatch_CastShapeVsShapeLocalSpace( + in ShapeCast shapeCastLocal, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + ShapeCastResult* buffer, + uint capacity + ); + + /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. Note: This version takes the + /// shape cast in local space relative to the center of mass of inShape, take a look at + /// sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:53 + ///
+ /// static inline void sCastShapeVsShapeLocalSpace(const ShapeCast &inShapeCastLocal, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Cast a shape against this shape, passes any hits found to ioCollector. + /// Note: This version takes the shape cast in local space relative to the center of mass of inShape, take a look at sCastShapeVsShapeWorldSpace if you have a shape cast in world space. + /// @param inShapeCastLocal The shape to cast against the other shape and its start and direction. + /// @param inShapeCastSettings Settings for performing the cast + /// @param inShape The shape to cast against. + /// @param inScale Local space scale for the shape to cast against (scales relative to its center of mass). + /// @param inShapeFilter allows selectively disabling collisions between pairs of (sub) shapes. + /// @param inCenterOfMassTransform2 Is the center of mass transform of shape 2 (excluding scale), this is used to provide a transform to the shape cast result so that local hit result quantities can be transformed into world space. + /// @param inSubShapeIDCreator1 Class that tracks the current sub shape ID for the casting shape + /// @param inSubShapeIDCreator2 Class that tracks the current sub shape ID for the shape we're casting against + /// @param ioCollector The collector that receives the results. + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_CastShapeVsShapeLocalSpaceClosest")] + public static partial uint CollisionDispatch_CastShapeVsShapeLocalSpaceClosest( + in ShapeCast shapeCastLocal, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + out ShapeCastResult result + ); + + /// + /// + /// See: sCastShapeVsShapeLocalSpace. The only difference is that the shape cast (inShapeCastWorld) is + /// provided in world space. Note: A shape cast contains the center of mass start of the shape, if you + /// have the world transform of the shape you probably want to construct it using + /// ShapeCast::sFromWorldTransform. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:65 + ///
+ /// static inline void sCastShapeVsShapeWorldSpace(const ShapeCast &inShapeCastWorld, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Collects every hit into castshapevsshapeworldspaceresults, which you allocate and size. Returns how + /// many were written; totalHits is how many the query found, so a larger span is needed when it exceeds + /// the span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_CastShapeVsShapeWorldSpace")] + public static partial uint CollisionDispatch_CastShapeVsShapeWorldSpace( + in ShapeCast shapeCastWorld, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + ShapeCastResult* buffer, + uint capacity + ); + + /// + /// + /// See: sCastShapeVsShapeLocalSpace. The only difference is that the shape cast (inShapeCastWorld) is + /// provided in world space. Note: A shape cast contains the center of mass start of the shape, if you + /// have the world transform of the shape you probably want to construct it using + /// ShapeCast::sFromWorldTransform. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:65 + ///
+ /// static inline void sCastShapeVsShapeWorldSpace(const ShapeCast &inShapeCastWorld, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_CastShapeVsShapeWorldSpaceClosest")] + public static partial uint CollisionDispatch_CastShapeVsShapeWorldSpaceClosest( + in ShapeCast shapeCastWorld, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + out ShapeCastResult result + ); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_Init")] + public static partial void CollisionDispatch_Init(); + + /// + /// + /// An implementation of CollideShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:87 + ///
+ /// static void sReversedCollideShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Collects every hit into reversedcollideshaperesults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_ReversedCollideShape")] + public static partial uint CollisionDispatch_ReversedCollideShape( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + CollideShapeResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// An implementation of CollideShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:87 + ///
+ /// static void sReversedCollideShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_ReversedCollideShapeClosest")] + public static partial uint CollisionDispatch_ReversedCollideShapeClosest( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter + ); + + /// + /// + /// An implementation of CastShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:90 + ///
+ /// static void sReversedCastShape(const ShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Collects every hit into reversedcastshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_ReversedCastShape")] + public static partial uint CollisionDispatch_ReversedCastShape( + in ShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + ShapeCastResult* buffer, + uint capacity + ); + + /// + /// + /// An implementation of CastShape that swaps inShape1 and inShape2 and swaps the result back, can be + /// registered if the collision function only exists the other way around + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollisionDispatch.h:90 + ///
+ /// static void sReversedCastShape(const ShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, const Shape *inShape, Vec3Arg inScale, const ShapeFilter &inShapeFilter, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, CastShapeCollector &ioCollector) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "CollisionDispatch_ReversedCastShapeClosest")] + public static partial uint CollisionDispatch_ReversedCastShapeClosest( + in ShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + Shape shape, + float3 scale, + ShapeFilter shapeFilter, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + out ShapeCastResult result + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CollisionGroup.gen.cs b/Brutal.Jolt/Generated/PInvoke/CollisionGroup.gen.cs new file mode 100644 index 0000000..7655310 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CollisionGroup.gen.cs @@ -0,0 +1,78 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_Create")] + public static partial CollisionGroup CollisionGroup_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_Create_2")] + public static partial CollisionGroup CollisionGroup_Create_2( + GroupFilter filter, + uint groupID, + uint subGroupID + ); + + [LibraryImport("jolt", EntryPoint = "CollisionGroup_Destroy")] + public static partial void CollisionGroup_Destroy(CollisionGroup self); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_SetGroupFilter")] + public static partial void CollisionGroup_SetGroupFilter(CollisionGroup self, GroupFilter filter); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_GetGroupFilter")] + public static partial GroupFilter CollisionGroup_GetGroupFilter(CollisionGroup self); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_SetGroupID")] + public static partial void CollisionGroup_SetGroupID(CollisionGroup self, uint id); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_GetGroupID")] + public static partial uint CollisionGroup_GetGroupID(CollisionGroup self); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_SetSubGroupID")] + public static partial void CollisionGroup_SetSubGroupID(CollisionGroup self, uint id); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_GetSubGroupID")] + public static partial uint CollisionGroup_GetSubGroupID(CollisionGroup self); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_CanCollide")] + public static partial Brutal.Bool8 CollisionGroup_CanCollide(CollisionGroup self, CollisionGroup other); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_SaveBinaryState")] + public static partial void CollisionGroup_SaveBinaryState(CollisionGroup self, StreamOut stream); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_RestoreBinaryState")] + public static partial void CollisionGroup_RestoreBinaryState(CollisionGroup self, StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_GetInvalidGroup")] + public static partial uint CollisionGroup_GetInvalidGroup(); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_GetInvalidSubGroup")] + public static partial uint CollisionGroup_GetInvalidSubGroup(); + + /// + [LibraryImport("jolt", EntryPoint = "CollisionGroup_GetInvalid")] + public static partial CollisionGroup CollisionGroup_GetInvalid(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CompoundShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/CompoundShape.gen.cs new file mode 100644 index 0000000..acc7f79 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CompoundShape.gen.cs @@ -0,0 +1,92 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetIntersectingSubShapes")] + public static partial int CompoundShape_GetIntersectingSubShapes( + CompoundShape self, + in AABox box, + uint* subShapeIndices, + int maxSubShapeIndices + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetIntersectingSubShapes_2")] + public static partial int CompoundShape_GetIntersectingSubShapes_2( + CompoundShape self, + OrientedBox box, + uint* subShapeIndices, + int maxSubShapeIndices + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetSubShapes")] + public static partial void CompoundShape_GetSubShapes(CompoundShape self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetNumSubShapes")] + public static partial uint CompoundShape_GetNumSubShapes(CompoundShape self); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetSubShape")] + public static partial void CompoundShape_GetSubShape( + CompoundShape self, + uint idx, + out uint outInRange, + out CompoundShape.SubShape outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetCompoundUserData")] + public static partial uint CompoundShape_GetCompoundUserData( + CompoundShape self, + uint idx, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_SetCompoundUserData")] + public static partial void CompoundShape_SetCompoundUserData( + CompoundShape self, + uint idx, + uint userData, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_IsSubShapeIDValid")] + public static partial Brutal.Bool8 CompoundShape_IsSubShapeIDValid(CompoundShape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetSubShapeIndexFromID")] + public static partial uint CompoundShape_GetSubShapeIndexFromID( + CompoundShape self, + uint subShapeID, + out uint remainder + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_GetSubShapeIDFromIndex")] + public static partial SubShapeIDCreator CompoundShape_GetSubShapeIDFromIndex( + CompoundShape self, + int idx, + SubShapeIDCreator parentSubShapeID, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShape_Register")] + public static partial void CompoundShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CompoundShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CompoundShapeSettings.gen.cs new file mode 100644 index 0000000..9b9f4fe --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CompoundShapeSettings.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CompoundShapeSettings_AddShape")] + public static partial void CompoundShapeSettings_AddShape( + CompoundShapeSettings self, + float3 position, + floatQuat rotation, + ShapeSettings shape, + uint userData + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShapeSettings_AddShape_2")] + public static partial void CompoundShapeSettings_AddShape_2( + CompoundShapeSettings self, + float3 position, + floatQuat rotation, + Shape shape, + uint userData + ); + + /// + [LibraryImport("jolt", EntryPoint = "CompoundShapeSettings_GetSubShapes")] + public static partial void CompoundShapeSettings_GetSubShapes( + CompoundShapeSettings self, + out NativeSpanView outResult + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConeConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConeConstraint.gen.cs new file mode 100644 index 0000000..7eeaf82 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConeConstraint.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraint_Create")] + public static partial ConeConstraint ConeConstraint_Create( + Body body1, + Body body2, + ConeConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraint_SetHalfConeAngle")] + public static partial void ConeConstraint_SetHalfConeAngle(ConeConstraint self, float halfConeAngle); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraint_GetCosHalfConeAngle")] + public static partial float ConeConstraint_GetCosHalfConeAngle(ConeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraint_GetTotalLambdaPosition")] + public static partial float3 ConeConstraint_GetTotalLambdaPosition(ConeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraint_GetTotalLambdaRotation")] + public static partial float ConeConstraint_GetTotalLambdaRotation(ConeConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConeConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConeConstraintSettings.gen.cs new file mode 100644 index 0000000..6c66e78 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConeConstraintSettings.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_Create")] + public static partial ConeConstraintSettings ConeConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace ConeConstraintSettings_GetSpace(ConeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void ConeConstraintSettings_SetSpace( + ConeConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_GetPoint1")] + [SuppressGCTransition] + public static partial float3 ConeConstraintSettings_GetPoint1(ConeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_SetPoint1")] + [SuppressGCTransition] + public static partial void ConeConstraintSettings_SetPoint1(ConeConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_GetTwistAxis1")] + [SuppressGCTransition] + public static partial float3 ConeConstraintSettings_GetTwistAxis1(ConeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_SetTwistAxis1")] + [SuppressGCTransition] + public static partial void ConeConstraintSettings_SetTwistAxis1(ConeConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_GetPoint2")] + [SuppressGCTransition] + public static partial float3 ConeConstraintSettings_GetPoint2(ConeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_SetPoint2")] + [SuppressGCTransition] + public static partial void ConeConstraintSettings_SetPoint2(ConeConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_GetTwistAxis2")] + [SuppressGCTransition] + public static partial float3 ConeConstraintSettings_GetTwistAxis2(ConeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_SetTwistAxis2")] + [SuppressGCTransition] + public static partial void ConeConstraintSettings_SetTwistAxis2(ConeConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_GetHalfConeAngle")] + [SuppressGCTransition] + public static partial float ConeConstraintSettings_GetHalfConeAngle(ConeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConeConstraintSettings_SetHalfConeAngle")] + [SuppressGCTransition] + public static partial void ConeConstraintSettings_SetHalfConeAngle( + ConeConstraintSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Constraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/Constraint.gen.cs new file mode 100644 index 0000000..87e748e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Constraint.gen.cs @@ -0,0 +1,200 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetConstraintType")] + public static partial ConstraintType Constraint_GetConstraintType(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetSubType")] + public static partial ConstraintSubType Constraint_GetSubType(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetConstraintPriority")] + public static partial uint Constraint_GetConstraintPriority(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetConstraintPriority")] + public static partial void Constraint_SetConstraintPriority(Constraint self, uint priority); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetNumVelocityStepsOverride")] + public static partial void Constraint_SetNumVelocityStepsOverride(Constraint self, uint n); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetNumVelocityStepsOverride")] + public static partial uint Constraint_GetNumVelocityStepsOverride(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetNumPositionStepsOverride")] + public static partial void Constraint_SetNumPositionStepsOverride(Constraint self, uint n); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetNumPositionStepsOverride")] + public static partial uint Constraint_GetNumPositionStepsOverride(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetEnabled")] + public static partial void Constraint_SetEnabled(Constraint self, Brutal.Bool8 enabled); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetEnabled")] + public static partial Brutal.Bool8 Constraint_GetEnabled(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetUserData")] + public static partial ulong Constraint_GetUserData(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetUserData")] + public static partial void Constraint_SetUserData(Constraint self, ulong userData); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_NotifyShapeChanged")] + public static partial void Constraint_NotifyShapeChanged(Constraint self, uint bodyID, float3 deltaCOM); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_ResetWarmStart")] + public static partial void Constraint_ResetWarmStart(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_IsActive")] + public static partial Brutal.Bool8 Constraint_IsActive(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetupVelocityConstraint")] + public static partial void Constraint_SetupVelocityConstraint(Constraint self, float deltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_WarmStartVelocityConstraint")] + public static partial void Constraint_WarmStartVelocityConstraint( + Constraint self, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SolveVelocityConstraint")] + public static partial Brutal.Bool8 Constraint_SolveVelocityConstraint(Constraint self, float deltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SolvePositionConstraint")] + public static partial Brutal.Bool8 Constraint_SolvePositionConstraint( + Constraint self, + float deltaTime, + float baumgarte + ); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_BuildIslands")] + public static partial void Constraint_BuildIslands( + Constraint self, + uint constraintIndex, + IslandBuilder builder, + BodyManager bodyManager + ); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_BuildIslandSplits")] + public static partial uint Constraint_BuildIslandSplits(Constraint self, LargeIslandSplitter splitter); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_DrawConstraint")] + public static partial void Constraint_DrawConstraint(Constraint self, DebugRenderer renderer); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_DrawConstraintLimits")] + public static partial void Constraint_DrawConstraintLimits(Constraint self, DebugRenderer renderer); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_DrawConstraintReferenceFrame")] + public static partial void Constraint_DrawConstraintReferenceFrame(Constraint self, DebugRenderer renderer); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetDrawConstraintSize")] + public static partial float Constraint_GetDrawConstraintSize(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_SetDrawConstraintSize")] + public static partial void Constraint_SetDrawConstraintSize(Constraint self, float size); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_GetConstraintSettings")] + public static partial ConstraintSettings Constraint_GetConstraintSettings(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsTwoBodyConstraint")] + public static partial TwoBodyConstraint Constraint_AsTwoBodyConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsFixedConstraint")] + public static partial FixedConstraint Constraint_AsFixedConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsPointConstraint")] + public static partial PointConstraint Constraint_AsPointConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsHingeConstraint")] + public static partial HingeConstraint Constraint_AsHingeConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsSliderConstraint")] + public static partial SliderConstraint Constraint_AsSliderConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsDistanceConstraint")] + public static partial DistanceConstraint Constraint_AsDistanceConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsConeConstraint")] + public static partial ConeConstraint Constraint_AsConeConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsSwingTwistConstraint")] + public static partial SwingTwistConstraint Constraint_AsSwingTwistConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsSixDOFConstraint")] + public static partial SixDOFConstraint Constraint_AsSixDOFConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsPathConstraint")] + public static partial PathConstraint Constraint_AsPathConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsVehicleConstraint")] + public static partial VehicleConstraint Constraint_AsVehicleConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsRackAndPinionConstraint")] + public static partial RackAndPinionConstraint Constraint_AsRackAndPinionConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsGearConstraint")] + public static partial GearConstraint Constraint_AsGearConstraint(Constraint self); + + /// + [LibraryImport("jolt", EntryPoint = "Constraint_AsPulleyConstraint")] + public static partial PulleyConstraint Constraint_AsPulleyConstraint(Constraint self); + + [LibraryImport("jolt", EntryPoint = "Constraint_AddRef")] + public static partial void Constraint_AddRef(Constraint self); + + [LibraryImport("jolt", EntryPoint = "Constraint_Release")] + public static partial void Constraint_Release(Constraint self); + + [LibraryImport("jolt", EntryPoint = "Constraint_GetRefCount")] + public static partial uint Constraint_GetRefCount(Constraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConstraintManager.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConstraintManager.gen.cs new file mode 100644 index 0000000..ea53f7b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConstraintManager.gen.cs @@ -0,0 +1,122 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_Add")] + public static partial void ConstraintManager_Add( + ConstraintManager self, + Constraint* constraints, + int number + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_Remove")] + public static partial void ConstraintManager_Remove( + ConstraintManager self, + Constraint* constraint, + int number + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_GetConstraints")] + public static partial nint ConstraintManager_GetConstraints(ConstraintManager self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_GetNumConstraints")] + public static partial uint ConstraintManager_GetNumConstraints(ConstraintManager self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_GetActiveConstraints")] + public static partial void ConstraintManager_GetActiveConstraints( + ConstraintManager self, + uint startConstraintIdx, + uint endConstraintIdx, + Constraint* activeConstraints, + out uint numActiveConstraints + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_BuildIslands")] + public static partial void ConstraintManager_BuildIslands( + Constraint* activeConstraints, + uint numActiveConstraints, + IslandBuilder builder, + BodyManager bodyManager + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_SortConstraints")] + public static partial void ConstraintManager_SortConstraints( + Constraint* activeConstraints, + uint* constraintIdxBegin, + uint* constraintIdxEnd + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_SetupVelocityConstraints")] + public static partial void ConstraintManager_SetupVelocityConstraints( + Constraint* activeConstraints, + uint numActiveConstraints, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_SolveVelocityConstraints")] + public static partial Brutal.Bool8 ConstraintManager_SolveVelocityConstraints( + Constraint* activeConstraints, + uint* constraintIdxBegin, + uint* constraintIdxEnd, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_SolvePositionConstraints")] + public static partial Brutal.Bool8 ConstraintManager_SolvePositionConstraints( + Constraint* activeConstraints, + uint* constraintIdxBegin, + uint* constraintIdxEnd, + float deltaTime, + float baumgarte + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_DrawConstraints")] + public static partial void ConstraintManager_DrawConstraints( + ConstraintManager self, + DebugRenderer renderer + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_DrawConstraintLimits")] + public static partial void ConstraintManager_DrawConstraintLimits( + ConstraintManager self, + DebugRenderer renderer + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_DrawConstraintReferenceFrame")] + public static partial void ConstraintManager_DrawConstraintReferenceFrame( + ConstraintManager self, + DebugRenderer renderer + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_LockAllConstraints")] + public static partial void ConstraintManager_LockAllConstraints(ConstraintManager self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintManager_UnlockAllConstraints")] + public static partial void ConstraintManager_UnlockAllConstraints(ConstraintManager self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConstraintSettings.gen.cs new file mode 100644 index 0000000..c607826 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConstraintSettings.gen.cs @@ -0,0 +1,127 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetRTTI")] + public static partial RTTI ConstraintSettings_GetRTTI(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_CastTo")] + public static partial void* ConstraintSettings_CastTo(ConstraintSettings self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SaveBinaryState")] + public static partial void ConstraintSettings_SaveBinaryState(ConstraintSettings self, StreamOut stream); + + /// + /// + /// Creates a constraint of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/Constraint.h:75 + ///
+ /// static ConstraintResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_RestoreFromBinaryState")] + public static partial ConstraintSettings ConstraintSettings_RestoreFromBinaryState(StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_AsSwingTwistConstraintSettings")] + public static partial SwingTwistConstraintSettings ConstraintSettings_AsSwingTwistConstraintSettings( + ConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetEnabled")] + [SuppressGCTransition] + public static partial Brutal.Bool8 ConstraintSettings_GetEnabled(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SetEnabled")] + [SuppressGCTransition] + public static partial void ConstraintSettings_SetEnabled(ConstraintSettings self, Brutal.Bool8 value); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetConstraintPriority")] + [SuppressGCTransition] + public static partial uint ConstraintSettings_GetConstraintPriority(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SetConstraintPriority")] + [SuppressGCTransition] + public static partial void ConstraintSettings_SetConstraintPriority(ConstraintSettings self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetNumVelocityStepsOverride")] + [SuppressGCTransition] + public static partial uint ConstraintSettings_GetNumVelocityStepsOverride(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SetNumVelocityStepsOverride")] + [SuppressGCTransition] + public static partial void ConstraintSettings_SetNumVelocityStepsOverride( + ConstraintSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetNumPositionStepsOverride")] + [SuppressGCTransition] + public static partial uint ConstraintSettings_GetNumPositionStepsOverride(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SetNumPositionStepsOverride")] + [SuppressGCTransition] + public static partial void ConstraintSettings_SetNumPositionStepsOverride( + ConstraintSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetDrawConstraintSize")] + [SuppressGCTransition] + public static partial float ConstraintSettings_GetDrawConstraintSize(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SetDrawConstraintSize")] + [SuppressGCTransition] + public static partial void ConstraintSettings_SetDrawConstraintSize(ConstraintSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetUserData")] + [SuppressGCTransition] + public static partial ulong ConstraintSettings_GetUserData(ConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_SetUserData")] + [SuppressGCTransition] + public static partial void ConstraintSettings_SetUserData(ConstraintSettings self, ulong value); + + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_AddRef")] + public static partial void ConstraintSettings_AddRef(ConstraintSettings self); + + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_Release")] + public static partial void ConstraintSettings_Release(ConstraintSettings self); + + [LibraryImport("jolt", EntryPoint = "ConstraintSettings_GetRefCount")] + public static partial uint ConstraintSettings_GetRefCount(ConstraintSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ContactListener.gen.cs b/Brutal.Jolt/Generated/PInvoke/ContactListener.gen.cs new file mode 100644 index 0000000..71a9e2b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ContactListener.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ContactListener_Create")] + public static partial ContactListener ContactListener_Create(); + + [LibraryImport("jolt", EntryPoint = "ContactListener_Destroy")] + public static partial void ContactListener_Destroy(ContactListener self); + + /// + [LibraryImport("jolt", EntryPoint = "ContactListener_OnContactValidate")] + public static partial ValidateResult ContactListener_OnContactValidate( + ContactListener self, + Body body1, + Body body2, + float3 baseOffset, + in CollideShapeResult collisionResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "ContactListener_OnContactAdded")] + public static partial void ContactListener_OnContactAdded( + ContactListener self, + Body body1, + Body body2, + in ContactManifold manifold, + ref ContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "ContactListener_OnContactPersisted")] + public static partial void ContactListener_OnContactPersisted( + ContactListener self, + Body body1, + Body body2, + in ContactManifold manifold, + ref ContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "ContactListener_OnContactRemoved")] + public static partial void ContactListener_OnContactRemoved( + ContactListener self, + in SubShapeIDPair subShapePair + ); + + [LibraryImport("jolt", EntryPoint = "ContactListener_CreateProxy")] + public static partial nint ContactListener_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "ContactListener_DestroyProxy")] + public static partial void ContactListener_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "ContactListener_ProxyGetBase")] + public static partial ContactListener ContactListener_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "ContactListener_ProxySetOnContactValidate")] + public static partial void ContactListener_ProxySetOnContactValidate( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "ContactListener_ProxySetOnContactAdded")] + public static partial void ContactListener_ProxySetOnContactAdded( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "ContactListener_ProxySetOnContactPersisted")] + public static partial void ContactListener_ProxySetOnContactPersisted( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "ContactListener_ProxySetOnContactRemoved")] + public static partial void ContactListener_ProxySetOnContactRemoved( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ContactManifold.gen.cs b/Brutal.Jolt/Generated/PInvoke/ContactManifold.gen.cs new file mode 100644 index 0000000..e1d8a91 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ContactManifold.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Swaps shape 1 and 2 + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:23 + ///
+ /// ContactManifold SwapShapes() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "ContactManifold_SwapShapes")] + public static partial ContactManifold ContactManifold_SwapShapes(ref ContactManifold self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder.gen.cs new file mode 100644 index 0000000..52af93b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder.gen.cs @@ -0,0 +1,42 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder_Create")] + public static partial ConvexHullBuilder ConvexHullBuilder_Create(float3* positions, nuint positionsCount); + + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder_Destroy")] + public static partial void ConvexHullBuilder_Destroy(ConvexHullBuilder self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder_GetNumVerticesUsed")] + public static partial int ConvexHullBuilder_GetNumVerticesUsed(ConvexHullBuilder self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder_ContainsFace")] + public static partial Brutal.Bool8 ConvexHullBuilder_ContainsFace( + ConvexHullBuilder self, + int* indices, + nuint indicesCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder_GetCenterOfMassAndVolume")] + public static partial void ConvexHullBuilder_GetCenterOfMassAndVolume( + ConvexHullBuilder self, + out float3 centerOfMass, + out float volume + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder2D.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder2D.gen.cs new file mode 100644 index 0000000..d1bdd38 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConvexHullBuilder2D.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder2D_Create")] + public static partial ConvexHullBuilder2D ConvexHullBuilder2D_Create( + float3* positions, + nuint positionsCount + ); + + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder2D_Destroy")] + public static partial void ConvexHullBuilder2D_Destroy(ConvexHullBuilder2D self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullBuilder2D_Initialize")] + public static partial ConvexHullBuilder2D.Result ConvexHullBuilder2D_Initialize( + ConvexHullBuilder2D self, + int idx1, + int idx2, + int idx3, + int maxVertices, + float tolerance, + out nint edges + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConvexHullShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConvexHullShape.gen.cs new file mode 100644 index 0000000..5e88b8e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConvexHullShape.gen.cs @@ -0,0 +1,90 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_Create")] + public static partial ConvexHullShape ConvexHullShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_Create_2")] + public static partial ConvexHullShape ConvexHullShape_Create_2(ConvexHullShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_DrawShrunkShape")] + public static partial void ConvexHullShape_DrawShrunkShape( + ConvexHullShape self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetConvexRadius")] + public static partial float ConvexHullShape_GetConvexRadius(ConvexHullShape self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetPlanes")] + public static partial void ConvexHullShape_GetPlanes(ConvexHullShape self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetNumPoints")] + public static partial uint ConvexHullShape_GetNumPoints(ConvexHullShape self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetPoint")] + public static partial float3 ConvexHullShape_GetPoint( + ConvexHullShape self, + uint index, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetNumFaces")] + public static partial uint ConvexHullShape_GetNumFaces(ConvexHullShape self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetNumVerticesInFace")] + public static partial uint ConvexHullShape_GetNumVerticesInFace( + ConvexHullShape self, + uint faceIndex, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetFaceVertices")] + public static partial uint ConvexHullShape_GetFaceVertices( + ConvexHullShape self, + uint faceIndex, + uint maxVertices, + uint* vertices, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_Register")] + public static partial void ConvexHullShape_Register(); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetMaxPointsInHull")] + public static partial int ConvexHullShape_GetMaxPointsInHull(); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_GetDrawFaceOutlines")] + public static partial Brutal.Bool8 ConvexHullShape_GetDrawFaceOutlines(); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShape_SetDrawFaceOutlines")] + public static partial void ConvexHullShape_SetDrawFaceOutlines(Brutal.Bool8 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConvexHullShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConvexHullShapeSettings.gen.cs new file mode 100644 index 0000000..bd14fdc --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConvexHullShapeSettings.gen.cs @@ -0,0 +1,79 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_Create")] + public static partial ConvexHullShapeSettings ConvexHullShapeSettings_Create( + float3* points, + nuint pointsCount, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_Create_2")] + public static partial ConvexHullShapeSettings ConvexHullShapeSettings_Create_2(); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_GetPoints")] + public static partial nint ConvexHullShapeSettings_GetPoints(ConvexHullShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_SetPoints")] + public static partial void ConvexHullShapeSettings_SetPoints( + ConvexHullShapeSettings self, + float3* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_GetMaxConvexRadius")] + [SuppressGCTransition] + public static partial float ConvexHullShapeSettings_GetMaxConvexRadius(ConvexHullShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_SetMaxConvexRadius")] + [SuppressGCTransition] + public static partial void ConvexHullShapeSettings_SetMaxConvexRadius( + ConvexHullShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_GetMaxErrorConvexRadius")] + [SuppressGCTransition] + public static partial float ConvexHullShapeSettings_GetMaxErrorConvexRadius(ConvexHullShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_SetMaxErrorConvexRadius")] + [SuppressGCTransition] + public static partial void ConvexHullShapeSettings_SetMaxErrorConvexRadius( + ConvexHullShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_GetHullTolerance")] + [SuppressGCTransition] + public static partial float ConvexHullShapeSettings_GetHullTolerance(ConvexHullShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexHullShapeSettings_SetHullTolerance")] + [SuppressGCTransition] + public static partial void ConvexHullShapeSettings_SetHullTolerance( + ConvexHullShapeSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConvexShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConvexShape.gen.cs new file mode 100644 index 0000000..258ae8d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConvexShape.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConvexShape_GetMaterial")] + public static partial PhysicsMaterial ConvexShape_GetMaterial(ConvexShape self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShape_SetMaterial")] + public static partial void ConvexShape_SetMaterial(ConvexShape self, PhysicsMaterial material); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShape_SetDensity")] + public static partial void ConvexShape_SetDensity(ConvexShape self, float density); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShape_GetDensity")] + public static partial float ConvexShape_GetDensity(ConvexShape self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShape_Register")] + public static partial void ConvexShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ConvexShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ConvexShapeSettings.gen.cs new file mode 100644 index 0000000..f844ec7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ConvexShapeSettings.gen.cs @@ -0,0 +1,32 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ConvexShapeSettings_SetDensity")] + public static partial void ConvexShapeSettings_SetDensity(ConvexShapeSettings self, float density); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShapeSettings_GetMaterial")] + public static partial PhysicsMaterial ConvexShapeSettings_GetMaterial(ConvexShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShapeSettings_SetMaterial")] + public static partial void ConvexShapeSettings_SetMaterial(ConvexShapeSettings self, PhysicsMaterial value); + + /// + [LibraryImport("jolt", EntryPoint = "ConvexShapeSettings_GetDensity")] + [SuppressGCTransition] + public static partial float ConvexShapeSettings_GetDensity(ConvexShapeSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CylinderShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/CylinderShape.gen.cs new file mode 100644 index 0000000..d7e34d0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CylinderShape.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_Create")] + public static partial CylinderShape CylinderShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_Create_2")] + public static partial CylinderShape CylinderShape_Create_2(CylinderShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_Create_3")] + public static partial CylinderShape CylinderShape_Create_3( + float halfHeight, + float radius, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_GetHalfHeight")] + public static partial float CylinderShape_GetHalfHeight(CylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_GetRadius")] + public static partial float CylinderShape_GetRadius(CylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_GetConvexRadius")] + public static partial float CylinderShape_GetConvexRadius(CylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShape_Register")] + public static partial void CylinderShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/CylinderShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/CylinderShapeSettings.gen.cs new file mode 100644 index 0000000..4ace6b0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/CylinderShapeSettings.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_Create")] + public static partial CylinderShapeSettings CylinderShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_Create_2")] + public static partial CylinderShapeSettings CylinderShapeSettings_Create_2( + float halfHeight, + float radius, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_GetHalfHeight")] + [SuppressGCTransition] + public static partial float CylinderShapeSettings_GetHalfHeight(CylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_SetHalfHeight")] + [SuppressGCTransition] + public static partial void CylinderShapeSettings_SetHalfHeight(CylinderShapeSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_GetRadius")] + [SuppressGCTransition] + public static partial float CylinderShapeSettings_GetRadius(CylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_SetRadius")] + [SuppressGCTransition] + public static partial void CylinderShapeSettings_SetRadius(CylinderShapeSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_GetConvexRadius")] + [SuppressGCTransition] + public static partial float CylinderShapeSettings_GetConvexRadius(CylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "CylinderShapeSettings_SetConvexRadius")] + [SuppressGCTransition] + public static partial void CylinderShapeSettings_SetConvexRadius(CylinderShapeSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DebugRenderer.gen.cs b/Brutal.Jolt/Generated/PInvoke/DebugRenderer.gen.cs new file mode 100644 index 0000000..0566a8f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DebugRenderer.gen.cs @@ -0,0 +1,272 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_NextFrame")] + public static partial void DebugRenderer_NextFrame(DebugRenderer self); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawLine")] + public static partial void DebugRenderer_DrawLine(DebugRenderer self, float3 from, float3 to, uint color); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawWireBox")] + public static partial void DebugRenderer_DrawWireBox(DebugRenderer self, in AABox box, uint color); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawWireBox_2")] + public static partial void DebugRenderer_DrawWireBox_2(DebugRenderer self, OrientedBox box, uint color); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawWireBox_3")] + public static partial void DebugRenderer_DrawWireBox_3( + DebugRenderer self, + in float4x4 matrix, + in AABox box, + uint color + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawMarker")] + public static partial void DebugRenderer_DrawMarker( + DebugRenderer self, + float3 position, + uint color, + float size + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawArrow")] + public static partial void DebugRenderer_DrawArrow( + DebugRenderer self, + float3 from, + float3 to, + uint color, + float size + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawCoordinateSystem")] + public static partial void DebugRenderer_DrawCoordinateSystem( + DebugRenderer self, + in float4x4 transform, + float size + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawPlane")] + public static partial void DebugRenderer_DrawPlane( + DebugRenderer self, + float3 point, + float3 normal, + uint color, + float size + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawWireTriangle")] + public static partial void DebugRenderer_DrawWireTriangle( + DebugRenderer self, + float3 v1, + float3 v2, + float3 v3, + uint color + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawWireSphere")] + public static partial void DebugRenderer_DrawWireSphere( + DebugRenderer self, + float3 center, + float radius, + uint color, + int level + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawWireUnitSphere")] + public static partial void DebugRenderer_DrawWireUnitSphere( + DebugRenderer self, + in float4x4 matrix, + uint color, + int level + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawTriangle")] + public static partial void DebugRenderer_DrawTriangle( + DebugRenderer self, + float3 v1, + float3 v2, + float3 v3, + uint color, + DebugRenderer.CastShadow castShadow + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawBox")] + public static partial void DebugRenderer_DrawBox( + DebugRenderer self, + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawBox_2")] + public static partial void DebugRenderer_DrawBox_2( + DebugRenderer self, + in float4x4 matrix, + in AABox box, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawSphere")] + public static partial void DebugRenderer_DrawSphere( + DebugRenderer self, + float3 center, + float radius, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawUnitSphere")] + public static partial void DebugRenderer_DrawUnitSphere( + DebugRenderer self, + in float4x4 matrix, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawCapsule")] + public static partial void DebugRenderer_DrawCapsule( + DebugRenderer self, + in float4x4 matrix, + float halfHeightOfCylinder, + float radius, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawCylinder")] + public static partial void DebugRenderer_DrawCylinder( + DebugRenderer self, + in float4x4 matrix, + float halfHeight, + float radius, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawOpenCone")] + public static partial void DebugRenderer_DrawOpenCone( + DebugRenderer self, + float3 top, + float3 axis, + float3 perpendicular, + float halfAngle, + float length, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawSwingConeLimits")] + public static partial void DebugRenderer_DrawSwingConeLimits( + DebugRenderer self, + in float4x4 matrix, + float swingYHalfAngle, + float swingZHalfAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawSwingPyramidLimits")] + public static partial void DebugRenderer_DrawSwingPyramidLimits( + DebugRenderer self, + in float4x4 matrix, + float minSwingYAngle, + float maxSwingYAngle, + float minSwingZAngle, + float maxSwingZAngle, + float edgeLength, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawPie")] + public static partial void DebugRenderer_DrawPie( + DebugRenderer self, + float3 center, + float radius, + float3 normal, + float3 axis, + float minAngle, + float maxAngle, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawTaperedCylinder")] + public static partial void DebugRenderer_DrawTaperedCylinder( + DebugRenderer self, + in float4x4 matrix, + float top, + float bottom, + float topRadius, + float bottomRadius, + uint color, + DebugRenderer.CastShadow castShadow, + DebugRenderer.DrawMode drawMode + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_DrawText3D")] + public static partial void DebugRenderer_DrawText3D( + DebugRenderer self, + float3 position, + byte* @string, + uint color, + float height + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_GetInstance")] + public static partial DebugRenderer DebugRenderer_GetInstance(); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRenderer_SetInstance")] + public static partial void DebugRenderer_SetInstance(DebugRenderer value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DebugRendererPlayback.gen.cs b/Brutal.Jolt/Generated/PInvoke/DebugRendererPlayback.gen.cs new file mode 100644 index 0000000..2b97cd1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DebugRendererPlayback.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererPlayback_Create")] + public static partial DebugRendererPlayback DebugRendererPlayback_Create(DebugRenderer renderer); + + [LibraryImport("jolt", EntryPoint = "DebugRendererPlayback_Destroy")] + public static partial void DebugRendererPlayback_Destroy(DebugRendererPlayback self); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererPlayback_Parse")] + public static partial void DebugRendererPlayback_Parse(DebugRendererPlayback self, StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererPlayback_GetNumFrames")] + public static partial uint DebugRendererPlayback_GetNumFrames(DebugRendererPlayback self); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererPlayback_DrawFrame")] + public static partial void DebugRendererPlayback_DrawFrame(DebugRendererPlayback self, uint frameNumber); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DebugRendererRecorder.gen.cs b/Brutal.Jolt/Generated/PInvoke/DebugRendererRecorder.gen.cs new file mode 100644 index 0000000..21ba85e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DebugRendererRecorder.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererRecorder_Create")] + public static partial DebugRendererRecorder DebugRendererRecorder_Create(StreamOut stream); + + [LibraryImport("jolt", EntryPoint = "DebugRendererRecorder_Destroy")] + public static partial void DebugRendererRecorder_Destroy(DebugRendererRecorder self); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererRecorder_DrawTriangle")] + public static partial void DebugRendererRecorder_DrawTriangle( + DebugRendererRecorder self, + float3 v1, + float3 v2, + float3 v3, + uint color, + DebugRenderer.CastShadow castShadow + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererRecorder_DrawText3D")] + public static partial void DebugRendererRecorder_DrawText3D( + DebugRendererRecorder self, + float3 position, + byte* @string, + uint color, + float height + ); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererRecorder_EndFrame")] + public static partial void DebugRendererRecorder_EndFrame(DebugRendererRecorder self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DebugRendererSimple.gen.cs b/Brutal.Jolt/Generated/PInvoke/DebugRendererSimple.gen.cs new file mode 100644 index 0000000..7f87fbd --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DebugRendererSimple.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_SetCameraPos")] + public static partial void DebugRendererSimple_SetCameraPos(DebugRendererSimple self, float3 cameraPos); + + /// + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_DrawTriangle")] + public static partial void DebugRendererSimple_DrawTriangle( + DebugRendererSimple self, + float3 v1, + float3 v2, + float3 v3, + uint color, + DebugRenderer.CastShadow castShadow + ); + + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_CreateProxy")] + public static partial nint DebugRendererSimple_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_DestroyProxy")] + public static partial void DebugRendererSimple_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_ProxyGetBase")] + public static partial DebugRendererSimple DebugRendererSimple_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_ProxySetDrawTriangle")] + public static partial void DebugRendererSimple_ProxySetDrawTriangle( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_ProxySetDrawLine")] + public static partial void DebugRendererSimple_ProxySetDrawLine( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "DebugRendererSimple_ProxySetDrawText3D")] + public static partial void DebugRendererSimple_ProxySetDrawText3D( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DecoratedShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/DecoratedShape.gen.cs new file mode 100644 index 0000000..dda61d5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DecoratedShape.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DecoratedShape_GetInnerShape")] + public static partial Shape DecoratedShape_GetInnerShape(DecoratedShape self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DecoratedShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/DecoratedShapeSettings.gen.cs new file mode 100644 index 0000000..a5ecd12 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DecoratedShapeSettings.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DecoratedShapeSettings_GetInnerShape")] + public static partial ShapeSettings DecoratedShapeSettings_GetInnerShape(DecoratedShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DecoratedShapeSettings_SetInnerShape")] + public static partial void DecoratedShapeSettings_SetInnerShape( + DecoratedShapeSettings self, + ShapeSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "DecoratedShapeSettings_GetInnerShapePtr")] + public static partial Shape DecoratedShapeSettings_GetInnerShapePtr(DecoratedShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DecoratedShapeSettings_SetInnerShapePtr")] + public static partial void DecoratedShapeSettings_SetInnerShapePtr( + DecoratedShapeSettings self, + Shape value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DefaultBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/DefaultBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..c8cb588 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DefaultBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DefaultBroadPhaseLayerFilter_Create")] + public static partial DefaultBroadPhaseLayerFilter DefaultBroadPhaseLayerFilter_Create( + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ushort layer + ); + + [LibraryImport("jolt", EntryPoint = "DefaultBroadPhaseLayerFilter_Destroy")] + public static partial void DefaultBroadPhaseLayerFilter_Destroy(DefaultBroadPhaseLayerFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DefaultObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/DefaultObjectLayerFilter.gen.cs new file mode 100644 index 0000000..8eef0d1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DefaultObjectLayerFilter.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DefaultObjectLayerFilter_Create")] + public static partial DefaultObjectLayerFilter DefaultObjectLayerFilter_Create( + ObjectLayerPairFilter objectLayerPairFilter, + ushort layer + ); + + [LibraryImport("jolt", EntryPoint = "DefaultObjectLayerFilter_Destroy")] + public static partial void DefaultObjectLayerFilter_Destroy(DefaultObjectLayerFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DistanceConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/DistanceConstraint.gen.cs new file mode 100644 index 0000000..9a0c110 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DistanceConstraint.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_Create")] + public static partial DistanceConstraint DistanceConstraint_Create( + Body body1, + Body body2, + DistanceConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_SetDistance")] + public static partial void DistanceConstraint_SetDistance( + DistanceConstraint self, + float minDistance, + float maxDistance + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_GetMinDistance")] + public static partial float DistanceConstraint_GetMinDistance(DistanceConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_GetMaxDistance")] + public static partial float DistanceConstraint_GetMaxDistance(DistanceConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_GetLimitsSpringSettings")] + public static partial SpringSettings DistanceConstraint_GetLimitsSpringSettings(DistanceConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_SetLimitsSpringSettings")] + public static partial void DistanceConstraint_SetLimitsSpringSettings( + DistanceConstraint self, + SpringSettings limitsSpringSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraint_GetTotalLambdaPosition")] + public static partial float DistanceConstraint_GetTotalLambdaPosition(DistanceConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DistanceConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/DistanceConstraintSettings.gen.cs new file mode 100644 index 0000000..5d730a6 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DistanceConstraintSettings.gen.cs @@ -0,0 +1,96 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_Create")] + public static partial DistanceConstraintSettings DistanceConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace DistanceConstraintSettings_GetSpace(DistanceConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void DistanceConstraintSettings_SetSpace( + DistanceConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_GetPoint1")] + [SuppressGCTransition] + public static partial float3 DistanceConstraintSettings_GetPoint1(DistanceConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_SetPoint1")] + [SuppressGCTransition] + public static partial void DistanceConstraintSettings_SetPoint1( + DistanceConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_GetPoint2")] + [SuppressGCTransition] + public static partial float3 DistanceConstraintSettings_GetPoint2(DistanceConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_SetPoint2")] + [SuppressGCTransition] + public static partial void DistanceConstraintSettings_SetPoint2( + DistanceConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_GetMinDistance")] + [SuppressGCTransition] + public static partial float DistanceConstraintSettings_GetMinDistance(DistanceConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_SetMinDistance")] + [SuppressGCTransition] + public static partial void DistanceConstraintSettings_SetMinDistance( + DistanceConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_GetMaxDistance")] + [SuppressGCTransition] + public static partial float DistanceConstraintSettings_GetMaxDistance(DistanceConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_SetMaxDistance")] + [SuppressGCTransition] + public static partial void DistanceConstraintSettings_SetMaxDistance( + DistanceConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_GetLimitsSpringSettings")] + public static partial SpringSettings DistanceConstraintSettings_GetLimitsSpringSettings( + DistanceConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "DistanceConstraintSettings_SetLimitsSpringSettings")] + public static partial void DistanceConstraintSettings_SetLimitsSpringSettings( + DistanceConstraintSettings self, + SpringSettings value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DualAxisConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/DualAxisConstraintPart.gen.cs new file mode 100644 index 0000000..f191966 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DualAxisConstraintPart.gen.cs @@ -0,0 +1,76 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_Create")] + public static partial DualAxisConstraintPart DualAxisConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_Destroy")] + public static partial void DualAxisConstraintPart_Destroy(DualAxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_CalculateConstraintProperties")] + public static partial void DualAxisConstraintPart_CalculateConstraintProperties( + DualAxisConstraintPart self, + Body body1, + in float4x4 rotation1, + float3 r1PlusU, + Body body2, + in float4x4 rotation2, + float3 r2, + float3 n1, + float3 n2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_Deactivate")] + public static partial void DualAxisConstraintPart_Deactivate(DualAxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_IsActive")] + public static partial Brutal.Bool8 DualAxisConstraintPart_IsActive(DualAxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_WarmStart")] + public static partial void DualAxisConstraintPart_WarmStart( + DualAxisConstraintPart self, + Body body1, + Body body2, + float3 n1, + float3 n2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 DualAxisConstraintPart_SolveVelocityConstraint( + DualAxisConstraintPart self, + Body body1, + Body body2, + float3 n1, + float3 n2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "DualAxisConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 DualAxisConstraintPart_SolvePositionConstraint( + DualAxisConstraintPart self, + Body body1, + Body body2, + float3 u, + float3 n1, + float3 n2, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DummyCalculateSolverSteps.gen.cs b/Brutal.Jolt/Generated/PInvoke/DummyCalculateSolverSteps.gen.cs new file mode 100644 index 0000000..c31fe2d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DummyCalculateSolverSteps.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "DummyCalculateSolverSteps_Create")] + public static partial DummyCalculateSolverSteps DummyCalculateSolverSteps_Create(); + + [LibraryImport("jolt", EntryPoint = "DummyCalculateSolverSteps_Destroy")] + public static partial void DummyCalculateSolverSteps_Destroy(DummyCalculateSolverSteps self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/DynMatrix.gen.cs b/Brutal.Jolt/Generated/PInvoke/DynMatrix.gen.cs new file mode 100644 index 0000000..86171d3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/DynMatrix.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "DynMatrix_Create")] + public static partial DynMatrix DynMatrix_Create(uint rows, uint cols); + + [LibraryImport("jolt", EntryPoint = "DynMatrix_Destroy")] + public static partial void DynMatrix_Destroy(DynMatrix self); + + /// + [LibraryImport("jolt", EntryPoint = "DynMatrix_GetCols")] + public static partial uint DynMatrix_GetCols(DynMatrix self); + + /// + [LibraryImport("jolt", EntryPoint = "DynMatrix_GetRows")] + public static partial uint DynMatrix_GetRows(DynMatrix self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/EPAConvexHullBuilder.gen.cs b/Brutal.Jolt/Generated/PInvoke/EPAConvexHullBuilder.gen.cs new file mode 100644 index 0000000..e8515f3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/EPAConvexHullBuilder.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_Initialize")] + public static partial void EPAConvexHullBuilder_Initialize( + EPAConvexHullBuilder self, + int idx1, + int idx2, + int idx3 + ); + + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_HasNextTriangle")] + public static partial Brutal.Bool8 EPAConvexHullBuilder_HasNextTriangle(EPAConvexHullBuilder self); + + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_GetMaxTriangles")] + public static partial int EPAConvexHullBuilder_GetMaxTriangles(); + + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_GetMaxPoints")] + public static partial int EPAConvexHullBuilder_GetMaxPoints(); + + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_GetMaxEdgeLength")] + public static partial int EPAConvexHullBuilder_GetMaxEdgeLength(); + + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_GetMinTriangleArea")] + public static partial float EPAConvexHullBuilder_GetMinTriangleArea(); + + /// + [LibraryImport("jolt", EntryPoint = "EPAConvexHullBuilder_GetBarycentricEpsilon")] + public static partial float EPAConvexHullBuilder_GetBarycentricEpsilon(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/EPAPenetrationDepth.gen.cs b/Brutal.Jolt/Generated/PInvoke/EPAPenetrationDepth.gen.cs new file mode 100644 index 0000000..7517646 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/EPAPenetrationDepth.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "EPAPenetrationDepth_Create")] + public static partial EPAPenetrationDepth EPAPenetrationDepth_Create(); + + [LibraryImport("jolt", EntryPoint = "EPAPenetrationDepth_Destroy")] + public static partial void EPAPenetrationDepth_Destroy(EPAPenetrationDepth self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Ellipse.gen.cs b/Brutal.Jolt/Generated/PInvoke/Ellipse.gen.cs new file mode 100644 index 0000000..77d3aa7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Ellipse.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Ellipse_Create")] + public static partial Ellipse Ellipse_Create(float a, float b); + + [LibraryImport("jolt", EntryPoint = "Ellipse_Destroy")] + public static partial void Ellipse_Destroy(Ellipse self); + + /// + [LibraryImport("jolt", EntryPoint = "Ellipse_IsInside")] + public static partial Brutal.Bool8 Ellipse_IsInside(Ellipse self, float2 point); + + /// + [LibraryImport("jolt", EntryPoint = "Ellipse_GetClosestPoint")] + public static partial void Ellipse_GetClosestPoint(Ellipse self, float2 point, out float2 outResult); + + /// + [LibraryImport("jolt", EntryPoint = "Ellipse_GetNormal")] + public static partial void Ellipse_GetNormal(Ellipse self, float2 point, out float2 outResult); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/EmptyShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/EmptyShape.gen.cs new file mode 100644 index 0000000..bf57c3c --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/EmptyShape.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "EmptyShape_Create")] + public static partial EmptyShape EmptyShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "EmptyShape_Create_2")] + public static partial EmptyShape EmptyShape_Create_2(float3 centerOfMass); + + /// + [LibraryImport("jolt", EntryPoint = "EmptyShape_Create_3")] + public static partial EmptyShape EmptyShape_Create_3(EmptyShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "EmptyShape_Register")] + public static partial void EmptyShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/EmptyShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/EmptyShapeSettings.gen.cs new file mode 100644 index 0000000..ce7cc40 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/EmptyShapeSettings.gen.cs @@ -0,0 +1,33 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "EmptyShapeSettings_Create")] + public static partial EmptyShapeSettings EmptyShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "EmptyShapeSettings_Create_2")] + public static partial EmptyShapeSettings EmptyShapeSettings_Create_2(float3 centerOfMass); + + /// + [LibraryImport("jolt", EntryPoint = "EmptyShapeSettings_GetCenterOfMass")] + [SuppressGCTransition] + public static partial float3 EmptyShapeSettings_GetCenterOfMass(EmptyShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "EmptyShapeSettings_SetCenterOfMass")] + [SuppressGCTransition] + public static partial void EmptyShapeSettings_SetCenterOfMass(EmptyShapeSettings self, float3 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableDivByZero.gen.cs b/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableDivByZero.gen.cs new file mode 100644 index 0000000..f8ad561 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableDivByZero.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "FPExceptionDisableDivByZero_Create")] + public static partial FPExceptionDisableDivByZero FPExceptionDisableDivByZero_Create(); + + [LibraryImport("jolt", EntryPoint = "FPExceptionDisableDivByZero_Destroy")] + public static partial void FPExceptionDisableDivByZero_Destroy(FPExceptionDisableDivByZero self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableInvalid.gen.cs b/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableInvalid.gen.cs new file mode 100644 index 0000000..f4a06b7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableInvalid.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "FPExceptionDisableInvalid_Create")] + public static partial FPExceptionDisableInvalid FPExceptionDisableInvalid_Create(); + + [LibraryImport("jolt", EntryPoint = "FPExceptionDisableInvalid_Destroy")] + public static partial void FPExceptionDisableInvalid_Destroy(FPExceptionDisableInvalid self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableOverflow.gen.cs b/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableOverflow.gen.cs new file mode 100644 index 0000000..eee3e45 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FPExceptionDisableOverflow.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "FPExceptionDisableOverflow_Create")] + public static partial FPExceptionDisableOverflow FPExceptionDisableOverflow_Create(); + + [LibraryImport("jolt", EntryPoint = "FPExceptionDisableOverflow_Destroy")] + public static partial void FPExceptionDisableOverflow_Destroy(FPExceptionDisableOverflow self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FPExceptionsEnable.gen.cs b/Brutal.Jolt/Generated/PInvoke/FPExceptionsEnable.gen.cs new file mode 100644 index 0000000..dc83009 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FPExceptionsEnable.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "FPExceptionsEnable_Create")] + public static partial FPExceptionsEnable FPExceptionsEnable_Create(); + + [LibraryImport("jolt", EntryPoint = "FPExceptionsEnable_Destroy")] + public static partial void FPExceptionsEnable_Destroy(FPExceptionsEnable self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FPFlushDenormals.gen.cs b/Brutal.Jolt/Generated/PInvoke/FPFlushDenormals.gen.cs new file mode 100644 index 0000000..0ad0f98 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FPFlushDenormals.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "FPFlushDenormals_Create")] + public static partial FPFlushDenormals FPFlushDenormals_Create(); + + [LibraryImport("jolt", EntryPoint = "FPFlushDenormals_Destroy")] + public static partial void FPFlushDenormals_Destroy(FPFlushDenormals self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Factory.gen.cs b/Brutal.Jolt/Generated/PInvoke/Factory.gen.cs new file mode 100644 index 0000000..b7ef25d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Factory.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "Factory_Create")] + public static partial Factory Factory_Create(); + + [LibraryImport("jolt", EntryPoint = "Factory_Destroy")] + public static partial void Factory_Destroy(Factory self); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_CreateObject")] + public static partial void* Factory_CreateObject(Factory self, byte* name); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_Find")] + public static partial RTTI Factory_Find(Factory self, byte* name); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_Find_2")] + public static partial RTTI Factory_Find_2(Factory self, uint hash); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_Register")] + public static partial Brutal.Bool8 Factory_Register(Factory self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_Register_2")] + public static partial Brutal.Bool8 Factory_Register_2(Factory self, RTTI* rTTIs, uint number); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_Clear")] + public static partial void Factory_Clear(Factory self); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_GetAllClasses")] + public static partial nint Factory_GetAllClasses(Factory self); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_GetInstance")] + public static partial Factory Factory_GetInstance(); + + /// + [LibraryImport("jolt", EntryPoint = "Factory_SetInstance")] + public static partial void Factory_SetInstance(Factory value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FixedConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/FixedConstraint.gen.cs new file mode 100644 index 0000000..0134c43 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FixedConstraint.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraint_Create")] + public static partial FixedConstraint FixedConstraint_Create( + Body body1, + Body body2, + FixedConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraint_GetTotalLambdaPosition")] + public static partial float3 FixedConstraint_GetTotalLambdaPosition(FixedConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraint_GetTotalLambdaRotation")] + public static partial float3 FixedConstraint_GetTotalLambdaRotation(FixedConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/FixedConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/FixedConstraintSettings.gen.cs new file mode 100644 index 0000000..634ef52 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/FixedConstraintSettings.gen.cs @@ -0,0 +1,104 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_Create")] + public static partial FixedConstraintSettings FixedConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace FixedConstraintSettings_GetSpace(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetSpace( + FixedConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetAutoDetectPoint")] + [SuppressGCTransition] + public static partial Brutal.Bool8 FixedConstraintSettings_GetAutoDetectPoint(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetAutoDetectPoint")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetAutoDetectPoint( + FixedConstraintSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetPoint1")] + [SuppressGCTransition] + public static partial float3 FixedConstraintSettings_GetPoint1(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetPoint1")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetPoint1(FixedConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetAxisX1")] + [SuppressGCTransition] + public static partial float3 FixedConstraintSettings_GetAxisX1(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetAxisX1")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetAxisX1(FixedConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetAxisY1")] + [SuppressGCTransition] + public static partial float3 FixedConstraintSettings_GetAxisY1(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetAxisY1")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetAxisY1(FixedConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetPoint2")] + [SuppressGCTransition] + public static partial float3 FixedConstraintSettings_GetPoint2(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetPoint2")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetPoint2(FixedConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetAxisX2")] + [SuppressGCTransition] + public static partial float3 FixedConstraintSettings_GetAxisX2(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetAxisX2")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetAxisX2(FixedConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_GetAxisY2")] + [SuppressGCTransition] + public static partial float3 FixedConstraintSettings_GetAxisY2(FixedConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "FixedConstraintSettings_SetAxisY2")] + [SuppressGCTransition] + public static partial void FixedConstraintSettings_SetAxisY2(FixedConstraintSettings self, float3 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GJKClosestPoint.gen.cs b/Brutal.Jolt/Generated/PInvoke/GJKClosestPoint.gen.cs new file mode 100644 index 0000000..951e4d2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GJKClosestPoint.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "GJKClosestPoint_Create")] + public static partial GJKClosestPoint GJKClosestPoint_Create(); + + [LibraryImport("jolt", EntryPoint = "GJKClosestPoint_Destroy")] + public static partial void GJKClosestPoint_Destroy(GJKClosestPoint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GearConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/GearConstraint.gen.cs new file mode 100644 index 0000000..737e5f7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GearConstraint.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "GearConstraint_Create")] + public static partial GearConstraint GearConstraint_Create( + Body body1, + Body body2, + GearConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraint_SetConstraints")] + public static partial void GearConstraint_SetConstraints( + GearConstraint self, + Constraint gear1, + Constraint gear2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraint_GetTotalLambda")] + public static partial float GearConstraint_GetTotalLambda(GearConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GearConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/GearConstraintPart.gen.cs new file mode 100644 index 0000000..5b0f799 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GearConstraintPart.gen.cs @@ -0,0 +1,74 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_Create")] + public static partial GearConstraintPart GearConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_Destroy")] + public static partial void GearConstraintPart_Destroy(GearConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_CalculateConstraintProperties")] + public static partial void GearConstraintPart_CalculateConstraintProperties( + GearConstraintPart self, + Body body1, + float3 worldSpaceHingeAxis1, + Body body2, + float3 worldSpaceHingeAxis2, + float ratio + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_Deactivate")] + public static partial void GearConstraintPart_Deactivate(GearConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_IsActive")] + public static partial Brutal.Bool8 GearConstraintPart_IsActive(GearConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_WarmStart")] + public static partial void GearConstraintPart_WarmStart( + GearConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 GearConstraintPart_SolveVelocityConstraint( + GearConstraintPart self, + Body body1, + float3 worldSpaceHingeAxis1, + Body body2, + float3 worldSpaceHingeAxis2, + float ratio + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_GetTotalLambda")] + public static partial float GearConstraintPart_GetTotalLambda(GearConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 GearConstraintPart_SolvePositionConstraint( + GearConstraintPart self, + Body body1, + Body body2, + float c, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GearConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/GearConstraintSettings.gen.cs new file mode 100644 index 0000000..f1c6939 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GearConstraintSettings.gen.cs @@ -0,0 +1,69 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_Create")] + public static partial GearConstraintSettings GearConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_SetRatio")] + public static partial void GearConstraintSettings_SetRatio( + GearConstraintSettings self, + int numTeethGear1, + int numTeethGear2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace GearConstraintSettings_GetSpace(GearConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void GearConstraintSettings_SetSpace( + GearConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_GetHingeAxis1")] + [SuppressGCTransition] + public static partial float3 GearConstraintSettings_GetHingeAxis1(GearConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_SetHingeAxis1")] + [SuppressGCTransition] + public static partial void GearConstraintSettings_SetHingeAxis1(GearConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_GetHingeAxis2")] + [SuppressGCTransition] + public static partial float3 GearConstraintSettings_GetHingeAxis2(GearConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_SetHingeAxis2")] + [SuppressGCTransition] + public static partial void GearConstraintSettings_SetHingeAxis2(GearConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_GetRatio")] + [SuppressGCTransition] + public static partial float GearConstraintSettings_GetRatio(GearConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "GearConstraintSettings_SetRatio_2")] + [SuppressGCTransition] + public static partial void GearConstraintSettings_SetRatio_2(GearConstraintSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GetTrianglesContextMultiVertexList.gen.cs b/Brutal.Jolt/Generated/PInvoke/GetTrianglesContextMultiVertexList.gen.cs new file mode 100644 index 0000000..23d7d5a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GetTrianglesContextMultiVertexList.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextMultiVertexList_Create")] + public static partial GetTrianglesContextMultiVertexList GetTrianglesContextMultiVertexList_Create( + Brutal.Bool8 isInsideOut, + PhysicsMaterial material + ); + + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextMultiVertexList_Destroy")] + public static partial void GetTrianglesContextMultiVertexList_Destroy( + GetTrianglesContextMultiVertexList self + ); + + /// + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextMultiVertexList_AddPart")] + public static partial void GetTrianglesContextMultiVertexList_AddPart( + GetTrianglesContextMultiVertexList self, + in float4x4 localToWorld, + float3* triangleVertices, + nuint numTriangleVertices + ); + + /// + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextMultiVertexList_GetTrianglesNext")] + public static partial int GetTrianglesContextMultiVertexList_GetTrianglesNext( + GetTrianglesContextMultiVertexList self, + int maxTrianglesRequested, + float3* triangleVertices, + PhysicsMaterial* materials + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GetTrianglesContextVertexList.gen.cs b/Brutal.Jolt/Generated/PInvoke/GetTrianglesContextVertexList.gen.cs new file mode 100644 index 0000000..5618449 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GetTrianglesContextVertexList.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextVertexList_Create")] + public static partial GetTrianglesContextVertexList GetTrianglesContextVertexList_Create( + float3 positionCOM, + floatQuat rotation, + float3 scale, + in float4x4 localTransform, + float3* triangleVertices, + nuint numTriangleVertices, + PhysicsMaterial material + ); + + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextVertexList_Destroy")] + public static partial void GetTrianglesContextVertexList_Destroy(GetTrianglesContextVertexList self); + + /// + [LibraryImport("jolt", EntryPoint = "GetTrianglesContextVertexList_GetTrianglesNext")] + public static partial int GetTrianglesContextVertexList_GetTrianglesNext( + GetTrianglesContextVertexList self, + int maxTrianglesRequested, + float3* triangleVertices, + PhysicsMaterial* materials + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GroupFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/GroupFilter.gen.cs new file mode 100644 index 0000000..e231a0f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GroupFilter.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "GroupFilter_GetRTTI")] + public static partial RTTI GroupFilter_GetRTTI(GroupFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "GroupFilter_CastTo")] + public static partial void* GroupFilter_CastTo(GroupFilter self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "GroupFilter_CanCollide")] + public static partial Brutal.Bool8 GroupFilter_CanCollide( + GroupFilter self, + CollisionGroup group1, + CollisionGroup group2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "GroupFilter_SaveBinaryState")] + public static partial void GroupFilter_SaveBinaryState(GroupFilter self, StreamOut stream); + + /// + /// + /// Creates a GroupFilter of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/GroupFilter.h:34 + ///
+ /// static GroupFilterResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "GroupFilter_RestoreFromBinaryState")] + public static partial GroupFilter GroupFilter_RestoreFromBinaryState(StreamIn stream); + + [LibraryImport("jolt", EntryPoint = "GroupFilter_AddRef")] + public static partial void GroupFilter_AddRef(GroupFilter self); + + [LibraryImport("jolt", EntryPoint = "GroupFilter_Release")] + public static partial void GroupFilter_Release(GroupFilter self); + + [LibraryImport("jolt", EntryPoint = "GroupFilter_GetRefCount")] + public static partial uint GroupFilter_GetRefCount(GroupFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/GroupFilterTable.gen.cs b/Brutal.Jolt/Generated/PInvoke/GroupFilterTable.gen.cs new file mode 100644 index 0000000..11a18c2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/GroupFilterTable.gen.cs @@ -0,0 +1,43 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "GroupFilterTable_Create")] + public static partial GroupFilterTable GroupFilterTable_Create(uint numSubGroups); + + /// + [LibraryImport("jolt", EntryPoint = "GroupFilterTable_DisableCollision")] + public static partial void GroupFilterTable_DisableCollision( + GroupFilterTable self, + uint subGroup1, + uint subGroup2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "GroupFilterTable_EnableCollision")] + public static partial void GroupFilterTable_EnableCollision( + GroupFilterTable self, + uint subGroup1, + uint subGroup2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "GroupFilterTable_IsCollisionEnabled")] + public static partial Brutal.Bool8 GroupFilterTable_IsCollisionEnabled( + GroupFilterTable self, + uint subGroup1, + uint subGroup2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/HeightFieldShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/HeightFieldShape.gen.cs new file mode 100644 index 0000000..5d23577 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/HeightFieldShape.gen.cs @@ -0,0 +1,143 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Create")] + public static partial HeightFieldShape HeightFieldShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Create_2")] + public static partial HeightFieldShape HeightFieldShape_Create_2(HeightFieldShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Clone")] + public static partial HeightFieldShape HeightFieldShape_Clone(HeightFieldShape self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetSampleCount")] + public static partial uint HeightFieldShape_GetSampleCount(HeightFieldShape self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetBlockSize")] + public static partial uint HeightFieldShape_GetBlockSize(HeightFieldShape self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaterial")] + public static partial PhysicsMaterial HeightFieldShape_GetMaterial(HeightFieldShape self, uint x, uint y); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetPosition")] + public static partial float3 HeightFieldShape_GetPosition(HeightFieldShape self, uint x, uint y); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_IsNoCollision")] + public static partial Brutal.Bool8 HeightFieldShape_IsNoCollision(HeightFieldShape self, uint x, uint y); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_ProjectOntoSurface")] + public static partial Brutal.Bool8 HeightFieldShape_ProjectOntoSurface( + HeightFieldShape self, + float3 localPosition, + out float3 surfacePosition, + out uint subShapeID + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetSubShapeCoordinates")] + public static partial void HeightFieldShape_GetSubShapeCoordinates( + HeightFieldShape self, + uint subShapeID, + out uint x, + out uint y, + out uint triangleIndex + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMinHeightValue")] + public static partial float HeightFieldShape_GetMinHeightValue(HeightFieldShape self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaxHeightValue")] + public static partial float HeightFieldShape_GetMaxHeightValue(HeightFieldShape self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetHeights")] + public static partial void HeightFieldShape_GetHeights( + HeightFieldShape self, + uint x, + uint y, + uint sizeX, + uint sizeY, + float* heights, + long heightsStride + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_SetHeights")] + public static partial void HeightFieldShape_SetHeights( + HeightFieldShape self, + uint x, + uint y, + uint sizeX, + uint sizeY, + float* heights, + long heightsStride, + TempAllocator allocator, + float activeEdgeCosThresholdAngle + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaterialList")] + public static partial nint HeightFieldShape_GetMaterialList(HeightFieldShape self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaterials")] + public static partial void HeightFieldShape_GetMaterials( + HeightFieldShape self, + uint x, + uint y, + uint sizeX, + uint sizeY, + byte* materials, + long materialsStride + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_SetMaterials")] + public static partial Brutal.Bool8 HeightFieldShape_SetMaterials( + HeightFieldShape self, + uint x, + uint y, + uint sizeX, + uint sizeY, + byte* materials, + long materialsStride, + PhysicsMaterial* materialList, + nuint materialListCount, + TempAllocator allocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Register")] + public static partial void HeightFieldShape_Register(); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetDrawTriangleOutlines")] + public static partial Brutal.Bool8 HeightFieldShape_GetDrawTriangleOutlines(); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShape_SetDrawTriangleOutlines")] + public static partial void HeightFieldShape_SetDrawTriangleOutlines(Brutal.Bool8 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/HeightFieldShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/HeightFieldShapeSettings.gen.cs new file mode 100644 index 0000000..3979bf9 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/HeightFieldShapeSettings.gen.cs @@ -0,0 +1,199 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_Create")] + public static partial HeightFieldShapeSettings HeightFieldShapeSettings_Create( + float* samples, + float3 offset, + float3 scale, + uint sampleCount, + byte* materialIndices, + PhysicsMaterial* materialList, + nuint materialListCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_Create_2")] + public static partial HeightFieldShapeSettings HeightFieldShapeSettings_Create_2(); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_DetermineMinAndMaxSample")] + public static partial void HeightFieldShapeSettings_DetermineMinAndMaxSample( + HeightFieldShapeSettings self, + out float minValue, + out float maxValue, + out float quantizationScale + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_CalculateBitsPerSampleForError")] + public static partial uint HeightFieldShapeSettings_CalculateBitsPerSampleForError( + HeightFieldShapeSettings self, + float maxError + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetOffset")] + [SuppressGCTransition] + public static partial float3 HeightFieldShapeSettings_GetOffset(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetOffset")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetOffset(HeightFieldShapeSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetScale")] + [SuppressGCTransition] + public static partial float3 HeightFieldShapeSettings_GetScale(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetScale")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetScale(HeightFieldShapeSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetSampleCount")] + [SuppressGCTransition] + public static partial uint HeightFieldShapeSettings_GetSampleCount(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetSampleCount")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetSampleCount( + HeightFieldShapeSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMinHeightValue")] + [SuppressGCTransition] + public static partial float HeightFieldShapeSettings_GetMinHeightValue(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMinHeightValue")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetMinHeightValue( + HeightFieldShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMaxHeightValue")] + [SuppressGCTransition] + public static partial float HeightFieldShapeSettings_GetMaxHeightValue(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMaxHeightValue")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetMaxHeightValue( + HeightFieldShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMaterialsCapacity")] + [SuppressGCTransition] + public static partial uint HeightFieldShapeSettings_GetMaterialsCapacity(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMaterialsCapacity")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetMaterialsCapacity( + HeightFieldShapeSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetBlockSize")] + [SuppressGCTransition] + public static partial uint HeightFieldShapeSettings_GetBlockSize(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetBlockSize")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetBlockSize(HeightFieldShapeSettings self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetBitsPerSample")] + [SuppressGCTransition] + public static partial uint HeightFieldShapeSettings_GetBitsPerSample(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetBitsPerSample")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetBitsPerSample( + HeightFieldShapeSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetHeightSamples")] + public static partial void HeightFieldShapeSettings_GetHeightSamples( + HeightFieldShapeSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetHeightSamples")] + public static partial void HeightFieldShapeSettings_SetHeightSamples( + HeightFieldShapeSettings self, + float* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMaterialIndices")] + public static partial void HeightFieldShapeSettings_GetMaterialIndices( + HeightFieldShapeSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMaterialIndices")] + public static partial void HeightFieldShapeSettings_SetMaterialIndices( + HeightFieldShapeSettings self, + byte* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMaterials")] + public static partial nint HeightFieldShapeSettings_GetMaterials(HeightFieldShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMaterials")] + public static partial void HeightFieldShapeSettings_SetMaterials( + HeightFieldShapeSettings self, + PhysicsMaterial* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle")] + [SuppressGCTransition] + public static partial float HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle( + HeightFieldShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle")] + [SuppressGCTransition] + public static partial void HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle( + HeightFieldShapeSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/HingeConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/HingeConstraint.gen.cs new file mode 100644 index 0000000..d76344d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/HingeConstraint.gen.cs @@ -0,0 +1,144 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_Create")] + public static partial HingeConstraint HingeConstraint_Create( + Body body1, + Body body2, + HingeConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLocalSpacePoint1")] + public static partial float3 HingeConstraint_GetLocalSpacePoint1(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLocalSpacePoint2")] + public static partial float3 HingeConstraint_GetLocalSpacePoint2(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLocalSpaceHingeAxis1")] + public static partial float3 HingeConstraint_GetLocalSpaceHingeAxis1(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLocalSpaceHingeAxis2")] + public static partial float3 HingeConstraint_GetLocalSpaceHingeAxis2(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLocalSpaceNormalAxis1")] + public static partial float3 HingeConstraint_GetLocalSpaceNormalAxis1(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLocalSpaceNormalAxis2")] + public static partial float3 HingeConstraint_GetLocalSpaceNormalAxis2(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetCurrentAngle")] + public static partial float HingeConstraint_GetCurrentAngle(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetMaxFrictionTorque")] + public static partial void HingeConstraint_SetMaxFrictionTorque(HingeConstraint self, float frictionTorque); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetMaxFrictionTorque")] + public static partial float HingeConstraint_GetMaxFrictionTorque(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetMotorSettings")] + public static partial MotorSettings HingeConstraint_GetMotorSettings(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetMotorState")] + public static partial void HingeConstraint_SetMotorState(HingeConstraint self, MotorState state); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetMotorState")] + public static partial MotorState HingeConstraint_GetMotorState(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetTargetAngularVelocity")] + public static partial void HingeConstraint_SetTargetAngularVelocity( + HingeConstraint self, + float angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetTargetAngularVelocity")] + public static partial float HingeConstraint_GetTargetAngularVelocity(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetTargetAngle")] + public static partial void HingeConstraint_SetTargetAngle(HingeConstraint self, float angle); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetTargetAngle")] + public static partial float HingeConstraint_GetTargetAngle(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetTargetOrientationBS")] + public static partial void HingeConstraint_SetTargetOrientationBS( + HingeConstraint self, + floatQuat orientation + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetLimits")] + public static partial void HingeConstraint_SetLimits( + HingeConstraint self, + float limitsMin, + float limitsMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLimitsMin")] + public static partial float HingeConstraint_GetLimitsMin(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLimitsMax")] + public static partial float HingeConstraint_GetLimitsMax(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_HasLimits")] + public static partial Brutal.Bool8 HingeConstraint_HasLimits(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetLimitsSpringSettings")] + public static partial SpringSettings HingeConstraint_GetLimitsSpringSettings(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_SetLimitsSpringSettings")] + public static partial void HingeConstraint_SetLimitsSpringSettings( + HingeConstraint self, + SpringSettings limitsSpringSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetTotalLambdaPosition")] + public static partial float3 HingeConstraint_GetTotalLambdaPosition(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetTotalLambdaRotation")] + public static partial float2 HingeConstraint_GetTotalLambdaRotation(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetTotalLambdaRotationLimits")] + public static partial float HingeConstraint_GetTotalLambdaRotationLimits(HingeConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraint_GetTotalLambdaMotor")] + public static partial float HingeConstraint_GetTotalLambdaMotor(HingeConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/HingeConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/HingeConstraintSettings.gen.cs new file mode 100644 index 0000000..f950163 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/HingeConstraintSettings.gen.cs @@ -0,0 +1,160 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_Create")] + public static partial HingeConstraintSettings HingeConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace HingeConstraintSettings_GetSpace(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetSpace( + HingeConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetPoint1")] + [SuppressGCTransition] + public static partial float3 HingeConstraintSettings_GetPoint1(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetPoint1")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetPoint1(HingeConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetHingeAxis1")] + [SuppressGCTransition] + public static partial float3 HingeConstraintSettings_GetHingeAxis1(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetHingeAxis1")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetHingeAxis1( + HingeConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetNormalAxis1")] + [SuppressGCTransition] + public static partial float3 HingeConstraintSettings_GetNormalAxis1(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetNormalAxis1")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetNormalAxis1( + HingeConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetPoint2")] + [SuppressGCTransition] + public static partial float3 HingeConstraintSettings_GetPoint2(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetPoint2")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetPoint2(HingeConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetHingeAxis2")] + [SuppressGCTransition] + public static partial float3 HingeConstraintSettings_GetHingeAxis2(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetHingeAxis2")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetHingeAxis2( + HingeConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetNormalAxis2")] + [SuppressGCTransition] + public static partial float3 HingeConstraintSettings_GetNormalAxis2(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetNormalAxis2")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetNormalAxis2( + HingeConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetLimitsMin")] + [SuppressGCTransition] + public static partial float HingeConstraintSettings_GetLimitsMin(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetLimitsMin")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetLimitsMin(HingeConstraintSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetLimitsMax")] + [SuppressGCTransition] + public static partial float HingeConstraintSettings_GetLimitsMax(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetLimitsMax")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetLimitsMax(HingeConstraintSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetLimitsSpringSettings")] + public static partial SpringSettings HingeConstraintSettings_GetLimitsSpringSettings( + HingeConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetLimitsSpringSettings")] + public static partial void HingeConstraintSettings_SetLimitsSpringSettings( + HingeConstraintSettings self, + SpringSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetMaxFrictionTorque")] + [SuppressGCTransition] + public static partial float HingeConstraintSettings_GetMaxFrictionTorque(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetMaxFrictionTorque")] + [SuppressGCTransition] + public static partial void HingeConstraintSettings_SetMaxFrictionTorque( + HingeConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_GetMotorSettings")] + public static partial MotorSettings HingeConstraintSettings_GetMotorSettings(HingeConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeConstraintSettings_SetMotorSettings")] + public static partial void HingeConstraintSettings_SetMotorSettings( + HingeConstraintSettings self, + MotorSettings value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/HingeRotationConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/HingeRotationConstraintPart.gen.cs new file mode 100644 index 0000000..4c6e7b2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/HingeRotationConstraintPart.gen.cs @@ -0,0 +1,63 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_Create")] + public static partial HingeRotationConstraintPart HingeRotationConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_Destroy")] + public static partial void HingeRotationConstraintPart_Destroy(HingeRotationConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_CalculateConstraintProperties")] + public static partial void HingeRotationConstraintPart_CalculateConstraintProperties( + HingeRotationConstraintPart self, + Body body1, + in float4x4 rotation1, + float3 worldSpaceHingeAxis1, + Body body2, + in float4x4 rotation2, + float3 worldSpaceHingeAxis2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_Deactivate")] + public static partial void HingeRotationConstraintPart_Deactivate(HingeRotationConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_WarmStart")] + public static partial void HingeRotationConstraintPart_WarmStart( + HingeRotationConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 HingeRotationConstraintPart_SolveVelocityConstraint( + HingeRotationConstraintPart self, + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "HingeRotationConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 HingeRotationConstraintPart_SolvePositionConstraint( + HingeRotationConstraintPart self, + Body body1, + Body body2, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IgnoreMultipleBodiesFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/IgnoreMultipleBodiesFilter.gen.cs new file mode 100644 index 0000000..48befce --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IgnoreMultipleBodiesFilter.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "IgnoreMultipleBodiesFilter_Create")] + public static partial IgnoreMultipleBodiesFilter IgnoreMultipleBodiesFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "IgnoreMultipleBodiesFilter_Destroy")] + public static partial void IgnoreMultipleBodiesFilter_Destroy(IgnoreMultipleBodiesFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "IgnoreMultipleBodiesFilter_Clear")] + public static partial void IgnoreMultipleBodiesFilter_Clear(IgnoreMultipleBodiesFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "IgnoreMultipleBodiesFilter_Reserve")] + public static partial void IgnoreMultipleBodiesFilter_Reserve(IgnoreMultipleBodiesFilter self, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "IgnoreMultipleBodiesFilter_IgnoreBody")] + public static partial void IgnoreMultipleBodiesFilter_IgnoreBody( + IgnoreMultipleBodiesFilter self, + uint bodyID + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilter.gen.cs new file mode 100644 index 0000000..48e4ef1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "IgnoreSingleBodyFilter_Create")] + public static partial IgnoreSingleBodyFilter IgnoreSingleBodyFilter_Create(uint bodyID); + + [LibraryImport("jolt", EntryPoint = "IgnoreSingleBodyFilter_Destroy")] + public static partial void IgnoreSingleBodyFilter_Destroy(IgnoreSingleBodyFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilterChained.gen.cs b/Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilterChained.gen.cs new file mode 100644 index 0000000..59df0ac --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IgnoreSingleBodyFilterChained.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "IgnoreSingleBodyFilterChained_Create")] + public static partial IgnoreSingleBodyFilterChained IgnoreSingleBodyFilterChained_Create( + uint bodyID, + BodyFilter filter + ); + + [LibraryImport("jolt", EntryPoint = "IgnoreSingleBodyFilterChained_Destroy")] + public static partial void IgnoreSingleBodyFilterChained_Destroy(IgnoreSingleBodyFilterChained self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IndependentAxisConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/IndependentAxisConstraintPart.gen.cs new file mode 100644 index 0000000..e22cbe5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IndependentAxisConstraintPart.gen.cs @@ -0,0 +1,88 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_Create")] + public static partial IndependentAxisConstraintPart IndependentAxisConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_Destroy")] + public static partial void IndependentAxisConstraintPart_Destroy(IndependentAxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_CalculateConstraintProperties")] + public static partial void IndependentAxisConstraintPart_CalculateConstraintProperties( + IndependentAxisConstraintPart self, + Body body1, + Body body2, + float3 r1, + float3 n1, + float3 r2, + float3 n2, + float ratio + ); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_Deactivate")] + public static partial void IndependentAxisConstraintPart_Deactivate(IndependentAxisConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_IsActive")] + public static partial Brutal.Bool8 IndependentAxisConstraintPart_IsActive( + IndependentAxisConstraintPart self + ); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_WarmStart")] + public static partial void IndependentAxisConstraintPart_WarmStart( + IndependentAxisConstraintPart self, + Body body1, + Body body2, + float3 n1, + float3 n2, + float ratio, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 IndependentAxisConstraintPart_SolveVelocityConstraint( + IndependentAxisConstraintPart self, + Body body1, + Body body2, + float3 n1, + float3 n2, + float ratio, + float minLambda, + float maxLambda + ); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_GetTotalLambda")] + public static partial float IndependentAxisConstraintPart_GetTotalLambda( + IndependentAxisConstraintPart self + ); + + /// + [LibraryImport("jolt", EntryPoint = "IndependentAxisConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 IndependentAxisConstraintPart_SolvePositionConstraint( + IndependentAxisConstraintPart self, + Body body1, + Body body2, + float3 n1, + float3 n2, + float ratio, + float c, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IndexedTriangle.gen.cs b/Brutal.Jolt/Generated/PInvoke/IndexedTriangle.gen.cs new file mode 100644 index 0000000..f26fb40 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IndexedTriangle.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "IndexedTriangle_Create")] + public static partial void IndexedTriangle_Create( + uint i1, + uint i2, + uint i3, + uint materialIndex, + uint userData, + out IndexedTriangle outResult + ); + + /// + /// + /// Rotate the vertices so that the lowest vertex becomes the first. This does not change the + /// represented triangle. + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:94 + ///
+ /// IndexedTriangle GetLowestIndexFirst() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "IndexedTriangle_GetLowestIndexFirst")] + public static partial void IndexedTriangle_GetLowestIndexFirst( + ref IndexedTriangle self, + out IndexedTriangle outResult + ); + + /// + /// + /// Get the hash value of this structure + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:113 + ///
+ /// uint64 GetHash() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "IndexedTriangle_GetHash")] + public static partial ulong IndexedTriangle_GetHash(ref IndexedTriangle self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IndexedTriangleNoMaterial.gen.cs b/Brutal.Jolt/Generated/PInvoke/IndexedTriangleNoMaterial.gen.cs new file mode 100644 index 0000000..dc2d987 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IndexedTriangleNoMaterial.gen.cs @@ -0,0 +1,137 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_Create")] + public static partial void IndexedTriangleNoMaterial_Create(out IndexedTriangleNoMaterial outResult); + + /// + [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_Create_2")] + public static partial void IndexedTriangleNoMaterial_Create_2( + uint i1, + uint i2, + uint i3, + out IndexedTriangleNoMaterial outResult + ); + + /// + /// + /// Check if two triangles are equivalent (using the same vertices) + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:28 + ///
+ /// bool IsEquivalent(const IndexedTriangleNoMaterial &inRHS) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_IsEquivalent")] + public static partial Brutal.Bool8 IndexedTriangleNoMaterial_IsEquivalent( + ref IndexedTriangleNoMaterial self, + in IndexedTriangleNoMaterial rhs + ); + + /// + /// + /// Check if two triangles are opposite (using the same vertices but in opposing order) + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:36 + ///
+ /// bool IsOpposite(const IndexedTriangleNoMaterial &inRHS) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_IsOpposite")] + public static partial Brutal.Bool8 IndexedTriangleNoMaterial_IsOpposite( + ref IndexedTriangleNoMaterial self, + in IndexedTriangleNoMaterial rhs + ); + + /// + /// + /// Check if triangle is degenerate + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:44 + ///
+ /// bool IsDegenerate(const VertexList &inVertices) const + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_IsDegenerate")] + public static partial Brutal.Bool8 IndexedTriangleNoMaterial_IsDegenerate( + ref IndexedTriangleNoMaterial self, + float3* vertices, + nuint verticesCount + ); + + /// + /// + /// Rotate the vertices so that the second vertex becomes first etc. This does not change the + /// represented triangle. + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:54 + ///
+ /// void Rotate() + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_Rotate")] + public static partial void IndexedTriangleNoMaterial_Rotate(ref IndexedTriangleNoMaterial self); + + /// + /// + /// Get center of triangle + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:63 + ///
+ /// Vec3 GetCentroid(const VertexList &inVertices) const + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_GetCentroid")] + public static partial float3 IndexedTriangleNoMaterial_GetCentroid( + ref IndexedTriangleNoMaterial self, + float3* vertices, + nuint verticesCount + ); + + /// + /// + /// Get the hash value of this structure + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:69 + ///
+ /// uint64 GetHash() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "IndexedTriangleNoMaterial_GetHash")] + public static partial ulong IndexedTriangleNoMaterial_GetHash(ref IndexedTriangleNoMaterial self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/InternalEdgeRemovingCollector.gen.cs b/Brutal.Jolt/Generated/PInvoke/InternalEdgeRemovingCollector.gen.cs new file mode 100644 index 0000000..204ab4e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/InternalEdgeRemovingCollector.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_Reset")] + public static partial void InternalEdgeRemovingCollector_Reset(InternalEdgeRemovingCollector self); + + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_OnBody")] + public static partial void InternalEdgeRemovingCollector_OnBody( + InternalEdgeRemovingCollector self, + Body body + ); + + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_AddHit")] + public static partial void InternalEdgeRemovingCollector_AddHit( + InternalEdgeRemovingCollector self, + in CollideShapeResult result + ); + + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_Flush")] + public static partial void InternalEdgeRemovingCollector_Flush(InternalEdgeRemovingCollector self); + + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_OnBodyEnd")] + public static partial void InternalEdgeRemovingCollector_OnBodyEnd(InternalEdgeRemovingCollector self); + + /// + /// + /// Version of CollisionDispatch::sCollideShapeVsShape that removes internal edges + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:245 + ///
+ /// static void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { } + ///
+ ///
+ /// + /// + /// Collects every hit into collideshapevsshaperesults, which you allocate and size. Returns how many + /// were written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_CollideShapeVsShape")] + public static partial uint InternalEdgeRemovingCollector_CollideShapeVsShape( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + CollideShapeResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Version of CollisionDispatch::sCollideShapeVsShape that removes internal edges + /// + /// + /// C++: + /// Jolt/Physics/Collision/InternalEdgeRemovingCollector.h:245 + ///
+ /// static void sCollideShapeVsShape(const Shape *inShape1, const Shape *inShape2, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, const SubShapeIDCreator &inSubShapeIDCreator2, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { } + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "InternalEdgeRemovingCollector_CollideShapeVsShapeClosest")] + public static partial uint InternalEdgeRemovingCollector_CollideShapeVsShapeClosest( + Shape shape1, + Shape shape2, + float3 scale1, + float3 scale2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + SubShapeIDCreator subShapeIDCreator1, + SubShapeIDCreator subShapeIDCreator2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/IslandBuilder.gen.cs b/Brutal.Jolt/Generated/PInvoke/IslandBuilder.gen.cs new file mode 100644 index 0000000..6b48da1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/IslandBuilder.gen.cs @@ -0,0 +1,96 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "IslandBuilder_Create")] + public static partial IslandBuilder IslandBuilder_Create(); + + [LibraryImport("jolt", EntryPoint = "IslandBuilder_Destroy")] + public static partial void IslandBuilder_Destroy(IslandBuilder self); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_Init")] + public static partial void IslandBuilder_Init(IslandBuilder self, uint maxActiveBodies); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_PrepareContactConstraints")] + public static partial void IslandBuilder_PrepareContactConstraints( + IslandBuilder self, + uint maxContactConstraints, + TempAllocator tempAllocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_PrepareNonContactConstraints")] + public static partial void IslandBuilder_PrepareNonContactConstraints( + IslandBuilder self, + uint numConstraints, + TempAllocator tempAllocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_LinkBodies")] + public static partial void IslandBuilder_LinkBodies(IslandBuilder self, uint first, uint second); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_LinkConstraint")] + public static partial void IslandBuilder_LinkConstraint( + IslandBuilder self, + uint constraintIndex, + uint indexInActiveBodyList + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_LinkContact")] + public static partial void IslandBuilder_LinkContact( + IslandBuilder self, + uint contactIndex, + uint indexInActiveBodyList + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_Complete")] + public static partial void IslandBuilder_Complete( + IslandBuilder self, + uint* activeBodies, + uint numActiveBodies, + uint numContacts, + TempAllocator tempAllocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_GetNumIslands")] + public static partial uint IslandBuilder_GetNumIslands(IslandBuilder self); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_SetNumPositionSteps")] + public static partial void IslandBuilder_SetNumPositionSteps( + IslandBuilder self, + uint islandIndex, + uint numPositionSteps, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_GetNumPositionSteps")] + public static partial uint IslandBuilder_GetNumPositionSteps( + IslandBuilder self, + uint islandIndex, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "IslandBuilder_ResetIslands")] + public static partial void IslandBuilder_ResetIslands(IslandBuilder self, TempAllocator tempAllocator); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/JobSystem.gen.cs b/Brutal.Jolt/Generated/PInvoke/JobSystem.gen.cs new file mode 100644 index 0000000..414612a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/JobSystem.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "JobSystem_GetMaxConcurrency")] + public static partial int JobSystem_GetMaxConcurrency(JobSystem self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/JobSystemSingleThreaded.gen.cs b/Brutal.Jolt/Generated/PInvoke/JobSystemSingleThreaded.gen.cs new file mode 100644 index 0000000..aea5ed5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/JobSystemSingleThreaded.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "JobSystemSingleThreaded_Create")] + public static partial JobSystemSingleThreaded JobSystemSingleThreaded_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "JobSystemSingleThreaded_Create_2")] + public static partial JobSystemSingleThreaded JobSystemSingleThreaded_Create_2(uint maxJobs); + + [LibraryImport("jolt", EntryPoint = "JobSystemSingleThreaded_Destroy")] + public static partial void JobSystemSingleThreaded_Destroy(JobSystemSingleThreaded self); + + /// + [LibraryImport("jolt", EntryPoint = "JobSystemSingleThreaded_Init")] + public static partial void JobSystemSingleThreaded_Init(JobSystemSingleThreaded self, uint maxJobs); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/JobSystemThreadPool.gen.cs b/Brutal.Jolt/Generated/PInvoke/JobSystemThreadPool.gen.cs new file mode 100644 index 0000000..234c86e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/JobSystemThreadPool.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_Create")] + public static partial JobSystemThreadPool JobSystemThreadPool_Create( + uint maxJobs, + uint maxBarriers, + int numThreads + ); + + /// + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_Create_2")] + public static partial JobSystemThreadPool JobSystemThreadPool_Create_2(); + + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_Destroy")] + public static partial void JobSystemThreadPool_Destroy(JobSystemThreadPool self); + + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:38 + ///
+ /// void SetThreadInitFunction(const InitExitFunction &inInitFunction) + ///
+ ///
+ /// + /// + /// initFunction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Pass null for none. The callback and userData are retained by the native object until they + /// are replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an + /// allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_SetThreadInitFunction")] + public static partial void JobSystemThreadPool_SetThreadInitFunction( + JobSystemThreadPool self, + delegate* unmanaged[Cdecl] initFunction, + nint initFunctionUserData + ); + + /// + /// + /// C++: + /// Jolt/Core/JobSystemThreadPool.h:39 + ///
+ /// void SetThreadExitFunction(const InitExitFunction &inExitFunction) + ///
+ ///
+ /// + /// + /// exitFunction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Pass null for none. The callback and userData are retained by the native object until they + /// are replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an + /// allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_SetThreadExitFunction")] + public static partial void JobSystemThreadPool_SetThreadExitFunction( + JobSystemThreadPool self, + delegate* unmanaged[Cdecl] exitFunction, + nint exitFunctionUserData + ); + + /// + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_Init")] + public static partial void JobSystemThreadPool_Init( + JobSystemThreadPool self, + uint maxJobs, + uint maxBarriers, + int numThreads + ); + + /// + [LibraryImport("jolt", EntryPoint = "JobSystemThreadPool_SetNumThreads")] + public static partial void JobSystemThreadPool_SetNumThreads(JobSystemThreadPool self, int numThreads); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/JobSystemWithBarrier.gen.cs b/Brutal.Jolt/Generated/PInvoke/JobSystemWithBarrier.gen.cs new file mode 100644 index 0000000..6eda1f1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/JobSystemWithBarrier.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "JobSystemWithBarrier_Init")] + public static partial void JobSystemWithBarrier_Init(JobSystemWithBarrier self, uint maxBarriers); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Jolt.gen.cs b/Brutal.Jolt/Generated/PInvoke/Jolt.gen.cs new file mode 100644 index 0000000..0f0a8ce --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Jolt.gen.cs @@ -0,0 +1,565 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RegisterDefaultAllocator")] + public static partial void RegisterDefaultAllocator(); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_HashBytes")] + public static partial ulong HashBytes(void* data, uint size, ulong seed); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_HashString")] + public static partial ulong HashString(byte* @string, ulong seed); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Hash64")] + public static partial ulong Hash64(ulong value); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_DegreesToRadians")] + public static partial float DegreesToRadians(float v); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RadiansToDegrees")] + public static partial float RadiansToDegrees(float v); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_CenterAngleAroundZero")] + public static partial float CenterAngleAroundZero(float v); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_DifferenceOfProducts")] + public static partial float DifferenceOfProducts(float a, float b, float c, float d); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Sqrt")] + public static partial float Sqrt(float v); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Sqrt_2")] + public static partial double Sqrt_2(double v); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_CountTrailingZeros")] + public static partial uint CountTrailingZeros(uint value); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_CountLeadingZeros")] + public static partial uint CountLeadingZeros(uint value); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_CountBits")] + public static partial uint CountBits(uint value); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_GetNextPowerOf2")] + public static partial uint GetNextPowerOf2(uint value); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Sin")] + public static partial float Sin(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Cos")] + public static partial float Cos(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Tan")] + public static partial float Tan(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ASin")] + public static partial float ASin(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ACos")] + public static partial float ACos(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ACosApproximate")] + public static partial float ACosApproximate(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ATan")] + public static partial float ATan(float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ATan2")] + public static partial float ATan2(float y, float x); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayTriangle")] + public static partial float RayTriangle(float3 origin, float3 direction, float3 v0, float3 v1, float3 v2); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayTriangle4")] + public static partial float4 RayTriangle4( + float3 origin, + float3 direction, + float4 v0x, + float4 v0y, + float4 v0z, + float4 v1x, + float4 v1y, + float4 v1z, + float4 v2x, + float4 v2y, + float4 v2z + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_GetConfigurationString")] + public static partial byte* GetConfigurationString(); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_GetProcessorTickCount")] + public static partial ulong GetProcessorTickCount(); + + /// + /// + /// Convert a string to lower case + /// + /// + /// C++: + /// Jolt/Core/StringTools.h:33 + ///
+ /// String ToLower(const string_view &inString) + ///
+ ///
+ /// + /// + /// Returns a pointer into a thread-local buffer the next string-returning call on this thread + /// overwrites. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ToLower")] + public static partial nint ToLower(byte* @string); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_NibbleToBinary")] + public static partial byte* NibbleToBinary(uint nibble); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4VsBox")] + public static partial uint4 AABox4VsBox( + in AABox box1, + float4 box2MinX, + float4 box2MinY, + float4 box2MinZ, + float4 box2MaxX, + float4 box2MaxY, + float4 box2MaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4VsBox_2")] + public static partial uint4 AABox4VsBox_2( + in float4x4 orientation, + float3 halfExtents, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ, + float epsilon + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4VsBox_3")] + public static partial uint4 AABox4VsBox_3( + OrientedBox box, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ, + float epsilon + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4VsPoint")] + public static partial uint4 AABox4VsPoint( + float3 point, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4DistanceSqToPoint")] + public static partial float4 AABox4DistanceSqToPoint( + float4 pointX, + float4 pointY, + float4 pointZ, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4DistanceSqToPoint_2")] + public static partial float4 AABox4DistanceSqToPoint_2( + float3 point, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4VsSphere")] + public static partial uint4 AABox4VsSphere( + float4 centerX, + float4 centerY, + float4 centerZ, + float4 radiusSq, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_AABox4VsSphere_2")] + public static partial uint4 AABox4VsSphere_2( + float3 center, + float radiusSq, + float4 boxMinX, + float4 boxMinY, + float4 boxMinZ, + float4 boxMaxX, + float4 boxMaxY, + float4 boxMaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Indexify")] + public static partial void Indexify( + Triangle* inTriangles, + nuint inTrianglesCount, + out nint outVertices, + out nint outTriangles, + float inVertexWeldDistance + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_Deindexify")] + public static partial void Deindexify( + float3* inVertices, + nuint inVerticesCount, + IndexedTriangle* inTriangles, + nuint inTrianglesCount, + out nint outTriangles + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayAABox")] + public static partial float RayAABox( + float3 origin, + RayInvDirection invDirection, + float3 boundsMin, + float3 boundsMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayAABox_2")] + public static partial void RayAABox_2( + float3 origin, + RayInvDirection invDirection, + float3 boundsMin, + float3 boundsMax, + out float min, + out float max + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayAABox4")] + public static partial float4 RayAABox4( + float3 origin, + RayInvDirection invDirection, + float4 boundsMinX, + float4 boundsMinY, + float4 boundsMinZ, + float4 boundsMaxX, + float4 boundsMaxY, + float4 boundsMaxZ + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayAABoxHits")] + public static partial Brutal.Bool8 RayAABoxHits( + float3 origin, + RayInvDirection invDirection, + float3 boundsMin, + float3 boundsMax, + float closest + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayAABoxHits_2")] + public static partial Brutal.Bool8 RayAABoxHits_2( + float3 origin, + float3 direction, + float3 boundsMin, + float3 boundsMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayCylinder")] + public static partial float RayCylinder(float3 rayOrigin, float3 rayDirection, float cylinderRadius); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayCylinder_2")] + public static partial float RayCylinder_2( + float3 rayOrigin, + float3 rayDirection, + float cylinderHalfHeight, + float cylinderRadius + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RaySphere")] + public static partial float RaySphere( + float3 rayOrigin, + float3 rayDirection, + float3 sphereCenter, + float sphereRadius + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RaySphere_2")] + public static partial int RaySphere_2( + float3 rayOrigin, + float3 rayDirection, + float3 sphereCenter, + float sphereRadius, + out float minFraction, + out float maxFraction + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RayCapsule")] + public static partial float RayCapsule( + float3 rayOrigin, + float3 rayDirection, + float capsuleHalfHeight, + float capsuleRadius + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_EstimateCollisionResponse")] + public static partial void EstimateCollisionResponse( + Body body1, + Body body2, + in ContactManifold manifold, + ref CollisionEstimationResult result, + float combinedFriction, + float combinedRestitution, + float minVelocityForRestitution, + uint numIterations + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_PruneContactPoints")] + public static partial void PruneContactPoints( + float3 penetrationAxis, + ref StaticArrayVec3_64 contactPointsOn1, + ref StaticArrayVec3_64 contactPointsOn2, + float3 centerOfMass, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ManifoldBetweenTwoFaces")] + public static partial void ManifoldBetweenTwoFaces( + float3 contactPoint1, + float3 contactPoint2, + float3 penetrationAxis, + float maxContactDistance, + float3* shape1Face, + nuint shape1FaceCount, + float3* shape2Face, + nuint shape2FaceCount, + out StaticArrayVec3_64 contactPoints1, + out StaticArrayVec3_64 contactPoints2, + float3 centerOfMass + ); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_IsVelocityMotor")] + public static partial Brutal.Bool8 IsVelocityMotor(MotorState motorState); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_IsPositionMotor")] + public static partial Brutal.Bool8 IsPositionMotor(MotorState motorState); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_VerifyJoltVersionIDInternal")] + public static partial Brutal.Bool8 VerifyJoltVersionIDInternal(ulong versionID); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_VerifyJoltVersionID")] + public static partial Brutal.Bool8 VerifyJoltVersionID(); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RegisterTypesInternal")] + public static partial void RegisterTypesInternal(ulong versionID); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_RegisterTypes")] + public static partial void RegisterTypes(); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_UnregisterTypes")] + public static partial void UnregisterTypes(); + + /// + /// + /// Frees an owned native buffer, releasing its elements first when they are ref-counted. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_NativeArrayDestroy")] + public static partial void NativeArrayDestroy(nint block); + + [LibraryImport("jolt", EntryPoint = "Jolt_ShapeToIDMapCreate")] + public static partial ShapeToIDMap ShapeToIDMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_ShapeToIDMapGetCount")] + public static partial uint ShapeToIDMapGetCount(ShapeToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_ShapeToIDMapDestroy")] + public static partial void ShapeToIDMapDestroy(ShapeToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToShapeMapCreate")] + public static partial IDToShapeMap IDToShapeMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToShapeMapGetCount")] + public static partial uint IDToShapeMapGetCount(IDToShapeMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToShapeMapDestroy")] + public static partial void IDToShapeMapDestroy(IDToShapeMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_MaterialToIDMapCreate")] + public static partial MaterialToIDMap MaterialToIDMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_MaterialToIDMapGetCount")] + public static partial uint MaterialToIDMapGetCount(MaterialToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_MaterialToIDMapDestroy")] + public static partial void MaterialToIDMapDestroy(MaterialToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToMaterialMapCreate")] + public static partial IDToMaterialMap IDToMaterialMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToMaterialMapGetCount")] + public static partial uint IDToMaterialMapGetCount(IDToMaterialMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToMaterialMapDestroy")] + public static partial void IDToMaterialMapDestroy(IDToMaterialMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_GroupFilterToIDMapCreate")] + public static partial GroupFilterToIDMap GroupFilterToIDMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_GroupFilterToIDMapGetCount")] + public static partial uint GroupFilterToIDMapGetCount(GroupFilterToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_GroupFilterToIDMapDestroy")] + public static partial void GroupFilterToIDMapDestroy(GroupFilterToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToGroupFilterMapCreate")] + public static partial IDToGroupFilterMap IDToGroupFilterMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToGroupFilterMapGetCount")] + public static partial uint IDToGroupFilterMapGetCount(IDToGroupFilterMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToGroupFilterMapDestroy")] + public static partial void IDToGroupFilterMapDestroy(IDToGroupFilterMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_SharedSettingsToIDMapCreate")] + public static partial SharedSettingsToIDMap SharedSettingsToIDMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_SharedSettingsToIDMapGetCount")] + public static partial uint SharedSettingsToIDMapGetCount(SharedSettingsToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_SharedSettingsToIDMapDestroy")] + public static partial void SharedSettingsToIDMapDestroy(SharedSettingsToIDMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToSharedSettingsMapCreate")] + public static partial IDToSharedSettingsMap IDToSharedSettingsMapCreate(); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToSharedSettingsMapGetCount")] + public static partial uint IDToSharedSettingsMapGetCount(IDToSharedSettingsMap map); + + [LibraryImport("jolt", EntryPoint = "Jolt_IDToSharedSettingsMapDestroy")] + public static partial void IDToSharedSettingsMapDestroy(IDToSharedSettingsMap map); + + /// + /// + /// 1 when the handle up-cast at this index really is address-identity natively, so the managed bit copy + /// is correct; 0 when it is not, or the index is out of range. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_UpCastIsIdentity")] + public static partial uint UpCastIsIdentity(uint index); + + /// + [LibraryImport("jolt", EntryPoint = "Jolt_GetLastError")] + public static partial nint GetLastError(); + + /// + /// + /// Installs the function Jolt calls when one of its asserts fails, and returns whether the loaded + /// natives have asserts at all - only Debug natives, or ones built with JOLT_DEBUG, do. The handler + /// gets the failed expression, an optional message (may be null), and the file and line as UTF-8 C + /// strings; returning true breaks into the debugger, false carries on as a release build would. It runs + /// on whichever thread asserted, Jolt's workers included, so it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] and must not throw. Pass null to put + /// back Jolt's default, which breaks. Jolt reads the hook unsynchronised, so set it while no physics + /// update is running. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_SetAssertHandler")] + public static partial Brutal.Bool8 SetAssertHandler( + delegate* unmanaged[Cdecl] handler + ); + + /// + /// + /// Installs the function Jolt's log messages go to, as a formatted UTF-8 C string (at most 1023 bytes). + /// It runs on whichever thread logged, Jolt's workers included, so it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], thread-safe, and must not throw. Pass + /// null to drop the messages. Either way Jolt's own default, which asserts, is replaced - so natives + /// built with asserts don't treat a log line as a failure. Call it before the first physics update: + /// swapping handlers later is safe, but the first call installs Jolt's trace hook, which Jolt itself + /// only expects to change while nothing is running. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_SetTraceHandler")] + public static partial void SetTraceHandler(delegate* unmanaged[Cdecl] handler); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/LFHMAllocator.gen.cs b/Brutal.Jolt/Generated/PInvoke/LFHMAllocator.gen.cs new file mode 100644 index 0000000..b79993a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/LFHMAllocator.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "LFHMAllocator_Create")] + public static partial LFHMAllocator LFHMAllocator_Create(); + + [LibraryImport("jolt", EntryPoint = "LFHMAllocator_Destroy")] + public static partial void LFHMAllocator_Destroy(LFHMAllocator self); + + /// + [LibraryImport("jolt", EntryPoint = "LFHMAllocator_Init")] + public static partial void LFHMAllocator_Init(LFHMAllocator self, uint objectStoreSizeBytes); + + /// + [LibraryImport("jolt", EntryPoint = "LFHMAllocator_Clear")] + public static partial void LFHMAllocator_Clear(LFHMAllocator self); + + /// + [LibraryImport("jolt", EntryPoint = "LFHMAllocator_Allocate")] + public static partial void LFHMAllocator_Allocate( + LFHMAllocator self, + uint blockSize, + ref uint begin, + ref uint end + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/LFHMAllocatorContext.gen.cs b/Brutal.Jolt/Generated/PInvoke/LFHMAllocatorContext.gen.cs new file mode 100644 index 0000000..f9243e3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/LFHMAllocatorContext.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "LFHMAllocatorContext_Create")] + public static partial LFHMAllocatorContext LFHMAllocatorContext_Create( + LFHMAllocator allocator, + uint blockSize + ); + + [LibraryImport("jolt", EntryPoint = "LFHMAllocatorContext_Destroy")] + public static partial void LFHMAllocatorContext_Destroy(LFHMAllocatorContext self); + + /// + [LibraryImport("jolt", EntryPoint = "LFHMAllocatorContext_Allocate")] + public static partial Brutal.Bool8 LFHMAllocatorContext_Allocate( + LFHMAllocatorContext self, + uint size, + uint alignment, + out uint writeOffset + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/LargeIslandSplitter.gen.cs b/Brutal.Jolt/Generated/PInvoke/LargeIslandSplitter.gen.cs new file mode 100644 index 0000000..de9ca01 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/LargeIslandSplitter.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_Create")] + public static partial LargeIslandSplitter LargeIslandSplitter_Create(); + + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_Destroy")] + public static partial void LargeIslandSplitter_Destroy(LargeIslandSplitter self); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_Prepare")] + public static partial void LargeIslandSplitter_Prepare( + LargeIslandSplitter self, + IslandBuilder islandBuilder, + uint numActiveBodies, + TempAllocator tempAllocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_AssignSplit")] + public static partial uint LargeIslandSplitter_AssignSplit( + LargeIslandSplitter self, + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_AssignToNonParallelSplit")] + public static partial uint LargeIslandSplitter_AssignToNonParallelSplit( + LargeIslandSplitter self, + Body body + ); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_GetIslandIndex")] + public static partial uint LargeIslandSplitter_GetIslandIndex( + LargeIslandSplitter self, + uint splitIslandIndex + ); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_PrepareForSolvePositions")] + public static partial void LargeIslandSplitter_PrepareForSolvePositions(LargeIslandSplitter self); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_Reset")] + public static partial void LargeIslandSplitter_Reset(LargeIslandSplitter self, TempAllocator tempAllocator); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_GetNumSplits")] + public static partial uint LargeIslandSplitter_GetNumSplits(); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_GetNonParallelSplitIdx")] + public static partial uint LargeIslandSplitter_GetNonParallelSplitIdx(); + + /// + [LibraryImport("jolt", EntryPoint = "LargeIslandSplitter_GetLargeIslandTreshold")] + public static partial uint LargeIslandSplitter_GetLargeIslandTreshold(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/LinearCurve.gen.cs b/Brutal.Jolt/Generated/PInvoke/LinearCurve.gen.cs new file mode 100644 index 0000000..354f8d2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/LinearCurve.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "LinearCurve_Create")] + public static partial LinearCurve LinearCurve_Create(); + + [LibraryImport("jolt", EntryPoint = "LinearCurve_Destroy")] + public static partial void LinearCurve_Destroy(LinearCurve self); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_Clear")] + public static partial void LinearCurve_Clear(LinearCurve self); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_Reserve")] + public static partial void LinearCurve_Reserve(LinearCurve self, uint numPoints); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_AddPoint")] + public static partial void LinearCurve_AddPoint(LinearCurve self, float x, float y); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_Sort")] + public static partial void LinearCurve_Sort(LinearCurve self); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_GetMinX")] + public static partial float LinearCurve_GetMinX(LinearCurve self); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_GetMaxX")] + public static partial float LinearCurve_GetMaxX(LinearCurve self); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_GetValue")] + public static partial float LinearCurve_GetValue(LinearCurve self, float x); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_SaveBinaryState")] + public static partial void LinearCurve_SaveBinaryState(LinearCurve self, StreamOut stream); + + /// + [LibraryImport("jolt", EntryPoint = "LinearCurve_RestoreBinaryState")] + public static partial void LinearCurve_RestoreBinaryState(LinearCurve self, StreamIn stream); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MassProperties.gen.cs b/Brutal.Jolt/Generated/PInvoke/MassProperties.gen.cs new file mode 100644 index 0000000..68735e0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MassProperties.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "MassProperties_Create")] + public static partial MassProperties MassProperties_Create(); + + [LibraryImport("jolt", EntryPoint = "MassProperties_Destroy")] + public static partial void MassProperties_Destroy(MassProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_DecomposePrincipalMomentsOfInertia")] + public static partial Brutal.Bool8 MassProperties_DecomposePrincipalMomentsOfInertia( + MassProperties self, + out float4x4 rotation, + out float3 diagonal + ); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_SetMassAndInertiaOfSolidBox")] + public static partial void MassProperties_SetMassAndInertiaOfSolidBox( + MassProperties self, + float3 boxSize, + float density + ); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_ScaleToMass")] + public static partial void MassProperties_ScaleToMass(MassProperties self, float mass); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_GetEquivalentSolidBoxSize")] + public static partial float3 MassProperties_GetEquivalentSolidBoxSize(float mass, float3 inertiaDiagonal); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_Rotate")] + public static partial void MassProperties_Rotate(MassProperties self, in float4x4 rotation); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_Translate")] + public static partial void MassProperties_Translate(MassProperties self, float3 translation); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_Scale")] + public static partial void MassProperties_Scale(MassProperties self, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_SaveBinaryState")] + public static partial void MassProperties_SaveBinaryState(MassProperties self, StreamOut stream); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_RestoreBinaryState")] + public static partial void MassProperties_RestoreBinaryState(MassProperties self, StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_GetMass")] + [SuppressGCTransition] + public static partial float MassProperties_GetMass(MassProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_SetMass")] + [SuppressGCTransition] + public static partial void MassProperties_SetMass(MassProperties self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_GetInertia")] + [SuppressGCTransition] + public static partial float4x4 MassProperties_GetInertia(MassProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MassProperties_SetInertia")] + [SuppressGCTransition] + public static partial void MassProperties_SetInertia(MassProperties self, in float4x4 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MeshShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/MeshShape.gen.cs new file mode 100644 index 0000000..0a08359 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MeshShape.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_Create")] + public static partial MeshShape MeshShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_Create_2")] + public static partial MeshShape MeshShape_Create_2(MeshShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_GetMaterialList")] + public static partial nint MeshShape_GetMaterialList(MeshShape self); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_GetMaterialIndex")] + public static partial uint MeshShape_GetMaterialIndex(MeshShape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_GetTriangleUserData")] + public static partial uint MeshShape_GetTriangleUserData(MeshShape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_Register")] + public static partial void MeshShape_Register(); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_GetDrawTriangleGroups")] + public static partial Brutal.Bool8 MeshShape_GetDrawTriangleGroups(); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_SetDrawTriangleGroups")] + public static partial void MeshShape_SetDrawTriangleGroups(Brutal.Bool8 value); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_GetDrawTriangleOutlines")] + public static partial Brutal.Bool8 MeshShape_GetDrawTriangleOutlines(); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShape_SetDrawTriangleOutlines")] + public static partial void MeshShape_SetDrawTriangleOutlines(Brutal.Bool8 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MeshShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/MeshShapeSettings.gen.cs new file mode 100644 index 0000000..e6d56a3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MeshShapeSettings.gen.cs @@ -0,0 +1,136 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_Create")] + public static partial MeshShapeSettings MeshShapeSettings_Create( + Triangle* triangles, + nuint trianglesCount, + PhysicsMaterial* materials, + nuint materialsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_Create_2")] + public static partial MeshShapeSettings MeshShapeSettings_Create_2(); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_Create_3")] + public static partial MeshShapeSettings MeshShapeSettings_Create_3( + float3* vertices, + nuint verticesCount, + IndexedTriangle* triangles, + nuint trianglesCount, + PhysicsMaterial* materials, + nuint materialsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_Sanitize")] + public static partial void MeshShapeSettings_Sanitize(MeshShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetTriangleVertices")] + public static partial void MeshShapeSettings_GetTriangleVertices( + MeshShapeSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetTriangleVertices")] + public static partial void MeshShapeSettings_SetTriangleVertices( + MeshShapeSettings self, + float3* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetIndexedTriangles")] + public static partial void MeshShapeSettings_GetIndexedTriangles( + MeshShapeSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetIndexedTriangles")] + public static partial void MeshShapeSettings_SetIndexedTriangles( + MeshShapeSettings self, + IndexedTriangle* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetMaterials")] + public static partial nint MeshShapeSettings_GetMaterials(MeshShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetMaterials")] + public static partial void MeshShapeSettings_SetMaterials( + MeshShapeSettings self, + PhysicsMaterial* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetMaxTrianglesPerLeaf")] + [SuppressGCTransition] + public static partial uint MeshShapeSettings_GetMaxTrianglesPerLeaf(MeshShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetMaxTrianglesPerLeaf")] + [SuppressGCTransition] + public static partial void MeshShapeSettings_SetMaxTrianglesPerLeaf(MeshShapeSettings self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetActiveEdgeCosThresholdAngle")] + [SuppressGCTransition] + public static partial float MeshShapeSettings_GetActiveEdgeCosThresholdAngle(MeshShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetActiveEdgeCosThresholdAngle")] + [SuppressGCTransition] + public static partial void MeshShapeSettings_SetActiveEdgeCosThresholdAngle( + MeshShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetPerTriangleUserData")] + [SuppressGCTransition] + public static partial Brutal.Bool8 MeshShapeSettings_GetPerTriangleUserData(MeshShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetPerTriangleUserData")] + [SuppressGCTransition] + public static partial void MeshShapeSettings_SetPerTriangleUserData( + MeshShapeSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_GetBuildQuality")] + [SuppressGCTransition] + public static partial MeshShapeSettings.BuildQuality MeshShapeSettings_GetBuildQuality( + MeshShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MeshShapeSettings_SetBuildQuality")] + [SuppressGCTransition] + public static partial void MeshShapeSettings_SetBuildQuality( + MeshShapeSettings self, + MeshShapeSettings.BuildQuality value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MortonCode.gen.cs b/Brutal.Jolt/Generated/PInvoke/MortonCode.gen.cs new file mode 100644 index 0000000..92b2b44 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MortonCode.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "MortonCode_Create")] + public static partial MortonCode MortonCode_Create(); + + [LibraryImport("jolt", EntryPoint = "MortonCode_Destroy")] + public static partial void MortonCode_Destroy(MortonCode self); + + /// + [LibraryImport("jolt", EntryPoint = "MortonCode_ExpandBits")] + public static partial uint MortonCode_ExpandBits(float v); + + /// + [LibraryImport("jolt", EntryPoint = "MortonCode_GetMortonCode")] + public static partial uint MortonCode_GetMortonCode(float3 vector, in AABox vectorBounds); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MotionProperties.gen.cs b/Brutal.Jolt/Generated/PInvoke/MotionProperties.gen.cs new file mode 100644 index 0000000..b65ec1d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MotionProperties.gen.cs @@ -0,0 +1,340 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetMotionQuality")] + public static partial MotionQuality MotionProperties_GetMotionQuality(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAllowedDOFs")] + public static partial AllowedDOFs MotionProperties_GetAllowedDOFs(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAllowSleeping")] + public static partial Brutal.Bool8 MotionProperties_GetAllowSleeping(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetLinearVelocity")] + public static partial float3 MotionProperties_GetLinearVelocity(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetLinearVelocity")] + public static partial void MotionProperties_SetLinearVelocity(MotionProperties self, float3 linearVelocity); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetLinearVelocityClamped")] + public static partial void MotionProperties_SetLinearVelocityClamped( + MotionProperties self, + float3 linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAngularVelocity")] + public static partial float3 MotionProperties_GetAngularVelocity(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetAngularVelocity")] + public static partial void MotionProperties_SetAngularVelocity( + MotionProperties self, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetAngularVelocityClamped")] + public static partial void MotionProperties_SetAngularVelocityClamped( + MotionProperties self, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_MoveKinematic")] + public static partial void MotionProperties_MoveKinematic( + MotionProperties self, + float3 deltaPosition, + floatQuat deltaRotation, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetMaxLinearVelocity")] + public static partial float MotionProperties_GetMaxLinearVelocity(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetMaxLinearVelocity")] + public static partial void MotionProperties_SetMaxLinearVelocity( + MotionProperties self, + float linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetMaxAngularVelocity")] + public static partial float MotionProperties_GetMaxAngularVelocity(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetMaxAngularVelocity")] + public static partial void MotionProperties_SetMaxAngularVelocity( + MotionProperties self, + float angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ClampLinearVelocity")] + public static partial void MotionProperties_ClampLinearVelocity(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ClampAngularVelocity")] + public static partial void MotionProperties_ClampAngularVelocity(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetLinearDamping")] + public static partial float MotionProperties_GetLinearDamping(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetLinearDamping")] + public static partial void MotionProperties_SetLinearDamping(MotionProperties self, float linearDamping); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAngularDamping")] + public static partial float MotionProperties_GetAngularDamping(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetAngularDamping")] + public static partial void MotionProperties_SetAngularDamping(MotionProperties self, float angularDamping); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetGravityFactor")] + public static partial float MotionProperties_GetGravityFactor(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetGravityFactor")] + public static partial void MotionProperties_SetGravityFactor(MotionProperties self, float gravityFactor); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetMassProperties")] + public static partial void MotionProperties_SetMassProperties( + MotionProperties self, + AllowedDOFs allowedDOFs, + MassProperties massProperties + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetInverseMass")] + public static partial float MotionProperties_GetInverseMass(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetInverseMassUnchecked")] + public static partial float MotionProperties_GetInverseMassUnchecked(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetInverseMass")] + public static partial void MotionProperties_SetInverseMass(MotionProperties self, float inverseMass); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetInverseInertiaDiagonal")] + public static partial float3 MotionProperties_GetInverseInertiaDiagonal(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetInertiaRotation")] + public static partial floatQuat MotionProperties_GetInertiaRotation(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetInverseInertia")] + public static partial void MotionProperties_SetInverseInertia( + MotionProperties self, + float3 diagonal, + floatQuat rot + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ScaleToMass")] + public static partial void MotionProperties_ScaleToMass(MotionProperties self, float mass); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetLocalSpaceInverseInertia")] + public static partial float4x4 MotionProperties_GetLocalSpaceInverseInertia(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetLocalSpaceInverseInertiaUnchecked")] + public static partial float4x4 MotionProperties_GetLocalSpaceInverseInertiaUnchecked(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetInverseInertiaForRotation")] + public static partial float4x4 MotionProperties_GetInverseInertiaForRotation( + MotionProperties self, + in float4x4 rotation + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_MultiplyWorldSpaceInverseInertiaByVector")] + public static partial float3 MotionProperties_MultiplyWorldSpaceInverseInertiaByVector( + MotionProperties self, + floatQuat bodyRotation, + float3 v + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetPointVelocityCOM")] + public static partial float3 MotionProperties_GetPointVelocityCOM( + MotionProperties self, + float3 pointRelativeToCOM + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAccumulatedForce")] + public static partial float3 MotionProperties_GetAccumulatedForce(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAccumulatedTorque")] + public static partial float3 MotionProperties_GetAccumulatedTorque(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ResetForce")] + public static partial void MotionProperties_ResetForce(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ResetTorque")] + public static partial void MotionProperties_ResetTorque(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ResetMotion")] + public static partial void MotionProperties_ResetMotion(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetLinearDOFsMask")] + public static partial uint4 MotionProperties_GetLinearDOFsMask(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_LockTranslation")] + public static partial float3 MotionProperties_LockTranslation(MotionProperties self, float3 v); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetAngularDOFsMask")] + public static partial uint4 MotionProperties_GetAngularDOFsMask(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_LockAngular")] + public static partial float3 MotionProperties_LockAngular(MotionProperties self, float3 v); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetNumVelocityStepsOverride")] + public static partial void MotionProperties_SetNumVelocityStepsOverride(MotionProperties self, uint n); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetNumVelocityStepsOverride")] + public static partial uint MotionProperties_GetNumVelocityStepsOverride(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetNumPositionStepsOverride")] + public static partial void MotionProperties_SetNumPositionStepsOverride(MotionProperties self, uint n); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetNumPositionStepsOverride")] + public static partial uint MotionProperties_GetNumPositionStepsOverride(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ApplyLinearVelocityStep")] + public static partial void MotionProperties_ApplyLinearVelocityStep( + MotionProperties self, + float3 linearVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_AddLinearVelocityStep")] + public static partial void MotionProperties_AddLinearVelocityStep( + MotionProperties self, + float3 linearVelocityChange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SubLinearVelocityStep")] + public static partial void MotionProperties_SubLinearVelocityStep( + MotionProperties self, + float3 linearVelocityChange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ApplyAngularVelocityStep")] + public static partial void MotionProperties_ApplyAngularVelocityStep( + MotionProperties self, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_AddAngularVelocityStep")] + public static partial void MotionProperties_AddAngularVelocityStep( + MotionProperties self, + float3 angularVelocityChange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SubAngularVelocityStep")] + public static partial void MotionProperties_SubAngularVelocityStep( + MotionProperties self, + float3 angularVelocityChange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ApplyGyroscopicForceInternal")] + public static partial void MotionProperties_ApplyGyroscopicForceInternal( + MotionProperties self, + floatQuat bodyRotation, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ApplyForceTorqueAndDragInternal")] + public static partial void MotionProperties_ApplyForceTorqueAndDragInternal( + MotionProperties self, + floatQuat bodyRotation, + float3 gravity, + float deltaTime + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetIslandIndexInternal")] + public static partial uint MotionProperties_GetIslandIndexInternal(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_SetIslandIndexInternal")] + public static partial void MotionProperties_SetIslandIndexInternal(MotionProperties self, uint index); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetIndexInActiveBodiesInternal")] + public static partial uint MotionProperties_GetIndexInActiveBodiesInternal(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ResetSleepTestTimer")] + public static partial void MotionProperties_ResetSleepTestTimer(MotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_AccumulateSleepTime")] + public static partial CanSleep MotionProperties_AccumulateSleepTime( + MotionProperties self, + float deltaTime, + float timeBeforeSleep + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_ResetSleepTestSpheres")] + public static partial void MotionProperties_ResetSleepTestSpheres( + MotionProperties self, + float3* points, + nuint pointsCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotionProperties_GetInactiveIndex")] + public static partial uint MotionProperties_GetInactiveIndex(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MotorSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/MotorSettings.gen.cs new file mode 100644 index 0000000..8391624 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MotorSettings.gen.cs @@ -0,0 +1,125 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_Create")] + public static partial MotorSettings MotorSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_Create_2")] + public static partial MotorSettings MotorSettings_Create_2(SpringMode mode, float frequency, float damping); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_Create_3")] + public static partial MotorSettings MotorSettings_Create_3(float frequency, float damping); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_Create_4")] + public static partial MotorSettings MotorSettings_Create_4( + SpringMode mode, + float frequency, + float damping, + float forceLimit, + float torqueLimit + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_Create_5")] + public static partial MotorSettings MotorSettings_Create_5( + float frequency, + float damping, + float forceLimit, + float torqueLimit + ); + + [LibraryImport("jolt", EntryPoint = "MotorSettings_Destroy")] + public static partial void MotorSettings_Destroy(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetForceLimits")] + public static partial void MotorSettings_SetForceLimits(MotorSettings self, float min, float max); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetTorqueLimits")] + public static partial void MotorSettings_SetTorqueLimits(MotorSettings self, float min, float max); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetForceLimit")] + public static partial void MotorSettings_SetForceLimit(MotorSettings self, float limit); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetTorqueLimit")] + public static partial void MotorSettings_SetTorqueLimit(MotorSettings self, float limit); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_IsValid")] + public static partial Brutal.Bool8 MotorSettings_IsValid(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SaveBinaryState")] + public static partial void MotorSettings_SaveBinaryState(MotorSettings self, StreamOut stream); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_RestoreBinaryState")] + public static partial void MotorSettings_RestoreBinaryState(MotorSettings self, StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_GetSpringSettings")] + public static partial SpringSettings MotorSettings_GetSpringSettings(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetSpringSettings")] + public static partial void MotorSettings_SetSpringSettings(MotorSettings self, SpringSettings value); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_GetMinForceLimit")] + [SuppressGCTransition] + public static partial float MotorSettings_GetMinForceLimit(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetMinForceLimit")] + [SuppressGCTransition] + public static partial void MotorSettings_SetMinForceLimit(MotorSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_GetMaxForceLimit")] + [SuppressGCTransition] + public static partial float MotorSettings_GetMaxForceLimit(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetMaxForceLimit")] + [SuppressGCTransition] + public static partial void MotorSettings_SetMaxForceLimit(MotorSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_GetMinTorqueLimit")] + [SuppressGCTransition] + public static partial float MotorSettings_GetMinTorqueLimit(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetMinTorqueLimit")] + [SuppressGCTransition] + public static partial void MotorSettings_SetMinTorqueLimit(MotorSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_GetMaxTorqueLimit")] + [SuppressGCTransition] + public static partial float MotorSettings_GetMaxTorqueLimit(MotorSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorSettings_SetMaxTorqueLimit")] + [SuppressGCTransition] + public static partial void MotorSettings_SetMaxTorqueLimit(MotorSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MotorcycleController.gen.cs b/Brutal.Jolt/Generated/PInvoke/MotorcycleController.gen.cs new file mode 100644 index 0000000..3a91181 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MotorcycleController.gen.cs @@ -0,0 +1,112 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_Create")] + public static partial MotorcycleController MotorcycleController_Create( + MotorcycleControllerSettings settings, + VehicleConstraint constraint + ); + + [LibraryImport("jolt", EntryPoint = "MotorcycleController_Destroy")] + public static partial void MotorcycleController_Destroy(MotorcycleController self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_GetWheelBase")] + public static partial float MotorcycleController_GetWheelBase(MotorcycleController self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_EnableLeanController")] + public static partial void MotorcycleController_EnableLeanController( + MotorcycleController self, + Brutal.Bool8 enable + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_IsLeanControllerEnabled")] + public static partial Brutal.Bool8 MotorcycleController_IsLeanControllerEnabled(MotorcycleController self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_EnableLeanSteeringLimit")] + public static partial void MotorcycleController_EnableLeanSteeringLimit( + MotorcycleController self, + Brutal.Bool8 enable + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_IsLeanSteeringLimitEnabled")] + public static partial Brutal.Bool8 MotorcycleController_IsLeanSteeringLimitEnabled( + MotorcycleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_SetLeanSpringConstant")] + public static partial void MotorcycleController_SetLeanSpringConstant( + MotorcycleController self, + float constant + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_GetLeanSpringConstant")] + public static partial float MotorcycleController_GetLeanSpringConstant(MotorcycleController self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_SetLeanSpringDamping")] + public static partial void MotorcycleController_SetLeanSpringDamping( + MotorcycleController self, + float damping + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_GetLeanSpringDamping")] + public static partial float MotorcycleController_GetLeanSpringDamping(MotorcycleController self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_SetLeanSpringIntegrationCoefficient")] + public static partial void MotorcycleController_SetLeanSpringIntegrationCoefficient( + MotorcycleController self, + float coefficient + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_GetLeanSpringIntegrationCoefficient")] + public static partial float MotorcycleController_GetLeanSpringIntegrationCoefficient( + MotorcycleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_SetLeanSpringIntegrationCoefficientDecay")] + public static partial void MotorcycleController_SetLeanSpringIntegrationCoefficientDecay( + MotorcycleController self, + float decay + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_GetLeanSpringIntegrationCoefficientDecay")] + public static partial float MotorcycleController_GetLeanSpringIntegrationCoefficientDecay( + MotorcycleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_SetLeanSmoothingFactor")] + public static partial void MotorcycleController_SetLeanSmoothingFactor( + MotorcycleController self, + float factor + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleController_GetLeanSmoothingFactor")] + public static partial float MotorcycleController_GetLeanSmoothingFactor(MotorcycleController self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MotorcycleControllerSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/MotorcycleControllerSettings.gen.cs new file mode 100644 index 0000000..2f68983 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MotorcycleControllerSettings.gen.cs @@ -0,0 +1,112 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_Create")] + public static partial MotorcycleControllerSettings MotorcycleControllerSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_GetMaxLeanAngle")] + [SuppressGCTransition] + public static partial float MotorcycleControllerSettings_GetMaxLeanAngle(MotorcycleControllerSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_SetMaxLeanAngle")] + [SuppressGCTransition] + public static partial void MotorcycleControllerSettings_SetMaxLeanAngle( + MotorcycleControllerSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_GetLeanSpringConstant")] + [SuppressGCTransition] + public static partial float MotorcycleControllerSettings_GetLeanSpringConstant( + MotorcycleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_SetLeanSpringConstant")] + [SuppressGCTransition] + public static partial void MotorcycleControllerSettings_SetLeanSpringConstant( + MotorcycleControllerSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_GetLeanSpringDamping")] + [SuppressGCTransition] + public static partial float MotorcycleControllerSettings_GetLeanSpringDamping( + MotorcycleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_SetLeanSpringDamping")] + [SuppressGCTransition] + public static partial void MotorcycleControllerSettings_SetLeanSpringDamping( + MotorcycleControllerSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient")] + [SuppressGCTransition] + public static partial float MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficient( + MotorcycleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient")] + [SuppressGCTransition] + public static partial void MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficient( + MotorcycleControllerSettings self, + float value + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay" + )] + [SuppressGCTransition] + public static partial float MotorcycleControllerSettings_GetLeanSpringIntegrationCoefficientDecay( + MotorcycleControllerSettings self + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay" + )] + [SuppressGCTransition] + public static partial void MotorcycleControllerSettings_SetLeanSpringIntegrationCoefficientDecay( + MotorcycleControllerSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_GetLeanSmoothingFactor")] + [SuppressGCTransition] + public static partial float MotorcycleControllerSettings_GetLeanSmoothingFactor( + MotorcycleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "MotorcycleControllerSettings_SetLeanSmoothingFactor")] + [SuppressGCTransition] + public static partial void MotorcycleControllerSettings_SetLeanSmoothingFactor( + MotorcycleControllerSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MutableCompoundShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/MutableCompoundShape.gen.cs new file mode 100644 index 0000000..a4ceb44 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MutableCompoundShape.gen.cs @@ -0,0 +1,88 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_Create")] + public static partial MutableCompoundShape MutableCompoundShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_Create_2")] + public static partial MutableCompoundShape MutableCompoundShape_Create_2( + MutableCompoundShapeSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_Clone")] + public static partial MutableCompoundShape MutableCompoundShape_Clone(MutableCompoundShape self); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_AddShape")] + public static partial uint MutableCompoundShape_AddShape( + MutableCompoundShape self, + float3 position, + floatQuat rotation, + Shape shape, + uint userData, + uint index + ); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_RemoveShape")] + public static partial void MutableCompoundShape_RemoveShape( + MutableCompoundShape self, + uint index, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_ModifyShape")] + public static partial void MutableCompoundShape_ModifyShape( + MutableCompoundShape self, + uint index, + float3 position, + floatQuat rotation, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_ModifyShape_2")] + public static partial void MutableCompoundShape_ModifyShape_2( + MutableCompoundShape self, + uint index, + float3 position, + floatQuat rotation, + Shape shape, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_AdjustCenterOfMass")] + public static partial void MutableCompoundShape_AdjustCenterOfMass(MutableCompoundShape self); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_Register")] + public static partial void MutableCompoundShape_Register(); + + /// + [LibraryImport("jolt", EntryPoint = "MutableCompoundShape_ModifyShapes")] + public static partial void MutableCompoundShape_ModifyShapes( + MutableCompoundShape self, + uint startIndex, + float3* positions, + nuint positionsCount, + floatQuat* rotations, + nuint rotationsCount + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/MutableCompoundShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/MutableCompoundShapeSettings.gen.cs new file mode 100644 index 0000000..db309cb --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/MutableCompoundShapeSettings.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "MutableCompoundShapeSettings_Create")] + public static partial MutableCompoundShapeSettings MutableCompoundShapeSettings_Create(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/NarrowPhaseQuery.gen.cs b/Brutal.Jolt/Generated/PInvoke/NarrowPhaseQuery.gen.cs new file mode 100644 index 0000000..90d6678 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/NarrowPhaseQuery.gen.cs @@ -0,0 +1,416 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_Init")] + public static partial void NarrowPhaseQuery_Init( + NarrowPhaseQuery self, + BodyLockInterface bodyLockInterface, + BroadPhaseQuery broadPhaseQuery + ); + + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastRay")] + public static partial Brutal.Bool8 NarrowPhaseQuery_CastRay( + NarrowPhaseQuery self, + in RRayCast ray, + ref RayCastResult hit, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter + ); + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also + /// slightly slower than the CastRay function that returns only a single hit. If you want the surface + /// normal of the hit use Body::GetWorldSpaceSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected fraction)) on body with collected body ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:35 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastRay_2")] + public static partial uint NarrowPhaseQuery_CastRay_2( + NarrowPhaseQuery self, + in RRayCast ray, + RayCastSettings rayCastSettings, + RayCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastRaysClosest")] + public static partial uint NarrowPhaseQuery_CastRaysClosest( + NarrowPhaseQuery self, + RRayCast* rays, + nuint raysCount, + RayCastSettings rayCastSettings, + RayCastResult* results, + nuint resultsCount, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastRaysAny")] + public static partial uint NarrowPhaseQuery_CastRaysAny( + NarrowPhaseQuery self, + RRayCast* rays, + nuint raysCount, + RayCastSettings rayCastSettings, + bool* hits, + nuint hitsCount, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also + /// slightly slower than the CastRay function that returns only a single hit. If you want the surface + /// normal of the hit use Body::GetWorldSpaceSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected fraction)) on body with collected body ID. + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:35 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastRayClosest")] + public static partial uint NarrowPhaseQuery_CastRayClosest( + NarrowPhaseQuery self, + in RRayCast ray, + RayCastSettings rayCastSettings, + out RayCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Check if inPoint is inside any shapes. For this tests all shapes are treated as if they were solid. + /// For a mesh shape, this test will only provide sensible information if the mesh is a closed manifold. + /// For each shape that collides, ioCollector will receive a hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:40 + ///
+ /// void CollidePoint(RVec3Arg inPoint, CollidePointCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CollidePoint")] + public static partial uint NarrowPhaseQuery_CollidePoint( + NarrowPhaseQuery self, + float3 point, + CollidePointResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Collide a shape with the system + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:53 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape with the system + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inCenterOfMassTransform.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Collects every hit into collideshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CollideShape")] + public static partial uint NarrowPhaseQuery_CollideShape( + NarrowPhaseQuery self, + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + CollideShapeResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Collide a shape with the system + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:53 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape with the system + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inCenterOfMassTransform.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CollideShapeClosest")] + public static partial uint NarrowPhaseQuery_CollideShapeClosest( + NarrowPhaseQuery self, + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Same as CollideShape, but uses InternalEdgeRemovingCollector to remove internal edges from the + /// collision results (a.k.a. ghost collisions) + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:56 + ///
+ /// void CollideShapeWithInternalEdgeRemoval(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into collideshapewithinternaledgeremovalresults, which you allocate and size. + /// Returns how many were written; totalHits is how many the query found, so a larger span is needed + /// when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CollideShapeWithInternalEdgeRemoval")] + public static partial uint NarrowPhaseQuery_CollideShapeWithInternalEdgeRemoval( + NarrowPhaseQuery self, + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + CollideShapeResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Same as CollideShape, but uses InternalEdgeRemovingCollector to remove internal edges from the + /// collision results (a.k.a. ghost collisions) + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:56 + ///
+ /// void CollideShapeWithInternalEdgeRemoval(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CollideShapeWithInternalEdgeRemovalClosest")] + public static partial uint NarrowPhaseQuery_CollideShapeWithInternalEdgeRemovalClosest( + NarrowPhaseQuery self, + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:67 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Collects every hit into castshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastShape")] + public static partial uint NarrowPhaseQuery_CastShape( + NarrowPhaseQuery self, + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + ShapeCastResult* buffer, + uint capacity, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/NarrowPhaseQuery.h:67 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }, const BodyFilter &inBodyFilter = { }, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inBroadPhaseLayerFilter Filter that filters at broadphase level + /// @param inObjectLayerFilter Filter that filters at layer level + /// @param inBodyFilter Filter that filters at body level + /// @param inShapeFilter Filter that filters at shape level + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CastShapeClosest")] + public static partial uint NarrowPhaseQuery_CastShapeClosest( + NarrowPhaseQuery self, + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "NarrowPhaseQuery_CollectTransformedShapes")] + public static partial nint NarrowPhaseQuery_CollectTransformedShapes( + NarrowPhaseQuery self, + in AABox box, + BroadPhaseLayerFilter broadPhaseLayerFilter, + ObjectLayerFilter objectLayerFilter, + BodyFilter bodyFilter, + ShapeFilter shapeFilter + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectLayerFilter.gen.cs new file mode 100644 index 0000000..8d83411 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectLayerFilter.gen.cs @@ -0,0 +1,40 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_Create")] + public static partial ObjectLayerFilter ObjectLayerFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_Destroy")] + public static partial void ObjectLayerFilter_Destroy(ObjectLayerFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_ShouldCollide")] + public static partial Brutal.Bool8 ObjectLayerFilter_ShouldCollide(ObjectLayerFilter self, ushort layer); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_CreateProxy")] + public static partial nint ObjectLayerFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_DestroyProxy")] + public static partial void ObjectLayerFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_ProxyGetBase")] + public static partial ObjectLayerFilter ObjectLayerFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerFilter_ProxySetShouldCollide")] + public static partial void ObjectLayerFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilter.gen.cs new file mode 100644 index 0000000..2f9da8b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilter.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_Create")] + public static partial ObjectLayerPairFilter ObjectLayerPairFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_Destroy")] + public static partial void ObjectLayerPairFilter_Destroy(ObjectLayerPairFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_ShouldCollide")] + public static partial Brutal.Bool8 ObjectLayerPairFilter_ShouldCollide( + ObjectLayerPairFilter self, + ushort layer1, + ushort layer2 + ); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_CreateProxy")] + public static partial nint ObjectLayerPairFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_DestroyProxy")] + public static partial void ObjectLayerPairFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_ProxyGetBase")] + public static partial ObjectLayerPairFilter ObjectLayerPairFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilter_ProxySetShouldCollide")] + public static partial void ObjectLayerPairFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterMask.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterMask.gen.cs new file mode 100644 index 0000000..d492212 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterMask.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_Create")] + public static partial ObjectLayerPairFilterMask ObjectLayerPairFilterMask_Create(); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_Destroy")] + public static partial void ObjectLayerPairFilterMask_Destroy(ObjectLayerPairFilterMask self); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_GetObjectLayer")] + public static partial ushort ObjectLayerPairFilterMask_GetObjectLayer(uint group, uint mask); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_GetGroup")] + public static partial uint ObjectLayerPairFilterMask_GetGroup(ushort objectLayer); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_GetMask")] + public static partial uint ObjectLayerPairFilterMask_GetMask(ushort objectLayer); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_ShouldCollide")] + public static partial Brutal.Bool8 ObjectLayerPairFilterMask_ShouldCollide( + ObjectLayerPairFilterMask self, + ushort object1, + ushort object2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_GetNumBits")] + public static partial uint ObjectLayerPairFilterMask_GetNumBits(); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterMask_GetMask_2")] + public static partial uint ObjectLayerPairFilterMask_GetMask_2(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterTable.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterTable.gen.cs new file mode 100644 index 0000000..8eade2e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectLayerPairFilterTable.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterTable_Create")] + public static partial ObjectLayerPairFilterTable ObjectLayerPairFilterTable_Create(uint numObjectLayers); + + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterTable_Destroy")] + public static partial void ObjectLayerPairFilterTable_Destroy(ObjectLayerPairFilterTable self); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterTable_GetNumObjectLayers")] + public static partial uint ObjectLayerPairFilterTable_GetNumObjectLayers(ObjectLayerPairFilterTable self); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterTable_DisableCollision")] + public static partial void ObjectLayerPairFilterTable_DisableCollision( + ObjectLayerPairFilterTable self, + ushort layer1, + ushort layer2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterTable_EnableCollision")] + public static partial void ObjectLayerPairFilterTable_EnableCollision( + ObjectLayerPairFilterTable self, + ushort layer1, + ushort layer2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectLayerPairFilterTable_ShouldCollide")] + public static partial Brutal.Bool8 ObjectLayerPairFilterTable_ShouldCollide( + ObjectLayerPairFilterTable self, + ushort object1, + ushort object2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..b1dd4fa --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_Create")] + public static partial ObjectVsBroadPhaseLayerFilter ObjectVsBroadPhaseLayerFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_Destroy")] + public static partial void ObjectVsBroadPhaseLayerFilter_Destroy(ObjectVsBroadPhaseLayerFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_ShouldCollide")] + public static partial Brutal.Bool8 ObjectVsBroadPhaseLayerFilter_ShouldCollide( + ObjectVsBroadPhaseLayerFilter self, + ushort layer1, + byte layer2 + ); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_CreateProxy")] + public static partial nint ObjectVsBroadPhaseLayerFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_DestroyProxy")] + public static partial void ObjectVsBroadPhaseLayerFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_ProxyGetBase")] + public static partial ObjectVsBroadPhaseLayerFilter ObjectVsBroadPhaseLayerFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilter_ProxySetShouldCollide")] + public static partial void ObjectVsBroadPhaseLayerFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterMask.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterMask.gen.cs new file mode 100644 index 0000000..398e25f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterMask.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilterMask_Create")] + public static partial ObjectVsBroadPhaseLayerFilterMask ObjectVsBroadPhaseLayerFilterMask_Create( + BroadPhaseLayerInterfaceMask broadPhaseLayerInterface + ); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilterMask_Destroy")] + public static partial void ObjectVsBroadPhaseLayerFilterMask_Destroy( + ObjectVsBroadPhaseLayerFilterMask self + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterTable.gen.cs b/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterTable.gen.cs new file mode 100644 index 0000000..6659f8f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ObjectVsBroadPhaseLayerFilterTable.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilterTable_Create")] + public static partial ObjectVsBroadPhaseLayerFilterTable ObjectVsBroadPhaseLayerFilterTable_Create( + BroadPhaseLayerInterface broadPhaseLayerInterface, + uint numBroadPhaseLayers, + ObjectLayerPairFilter objectLayerPairFilter, + uint numObjectLayers + ); + + [LibraryImport("jolt", EntryPoint = "ObjectVsBroadPhaseLayerFilterTable_Destroy")] + public static partial void ObjectVsBroadPhaseLayerFilterTable_Destroy( + ObjectVsBroadPhaseLayerFilterTable self + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShape.gen.cs new file mode 100644 index 0000000..d0d83e5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShape.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShape_Create")] + public static partial OffsetCenterOfMassShape OffsetCenterOfMassShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShape_Create_2")] + public static partial OffsetCenterOfMassShape OffsetCenterOfMassShape_Create_2( + OffsetCenterOfMassShapeSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShape_Create_3")] + public static partial OffsetCenterOfMassShape OffsetCenterOfMassShape_Create_3(Shape shape, float3 offset); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShape_GetOffset")] + public static partial float3 OffsetCenterOfMassShape_GetOffset(OffsetCenterOfMassShape self); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShape_Register")] + public static partial void OffsetCenterOfMassShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShapeSettings.gen.cs new file mode 100644 index 0000000..bf26a26 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/OffsetCenterOfMassShapeSettings.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShapeSettings_Create")] + public static partial OffsetCenterOfMassShapeSettings OffsetCenterOfMassShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShapeSettings_Create_2")] + public static partial OffsetCenterOfMassShapeSettings OffsetCenterOfMassShapeSettings_Create_2( + float3 offset, + ShapeSettings shape + ); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShapeSettings_Create_3")] + public static partial OffsetCenterOfMassShapeSettings OffsetCenterOfMassShapeSettings_Create_3( + float3 offset, + Shape shape + ); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShapeSettings_GetOffset")] + [SuppressGCTransition] + public static partial float3 OffsetCenterOfMassShapeSettings_GetOffset( + OffsetCenterOfMassShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "OffsetCenterOfMassShapeSettings_SetOffset")] + [SuppressGCTransition] + public static partial void OffsetCenterOfMassShapeSettings_SetOffset( + OffsetCenterOfMassShapeSettings self, + float3 value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/OrientedBox.gen.cs b/Brutal.Jolt/Generated/PInvoke/OrientedBox.gen.cs new file mode 100644 index 0000000..0b70b98 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/OrientedBox.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_Create")] + public static partial OrientedBox OrientedBox_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_Create_2")] + public static partial OrientedBox OrientedBox_Create_2(in float4x4 orientation, float3 halfExtents); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_Create_3")] + public static partial OrientedBox OrientedBox_Create_3(in float4x4 orientation, in AABox box); + + [LibraryImport("jolt", EntryPoint = "OrientedBox_Destroy")] + public static partial void OrientedBox_Destroy(OrientedBox self); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_Overlaps")] + public static partial Brutal.Bool8 OrientedBox_Overlaps(OrientedBox self, in AABox box, float epsilon); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_Overlaps_2")] + public static partial Brutal.Bool8 OrientedBox_Overlaps_2(OrientedBox self, OrientedBox box, float epsilon); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_GetOrientation")] + [SuppressGCTransition] + public static partial float4x4 OrientedBox_GetOrientation(OrientedBox self); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_SetOrientation")] + [SuppressGCTransition] + public static partial void OrientedBox_SetOrientation(OrientedBox self, in float4x4 value); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_GetHalfExtents")] + [SuppressGCTransition] + public static partial float3 OrientedBox_GetHalfExtents(OrientedBox self); + + /// + [LibraryImport("jolt", EntryPoint = "OrientedBox_SetHalfExtents")] + [SuppressGCTransition] + public static partial void OrientedBox_SetHalfExtents(OrientedBox self, float3 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PathConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/PathConstraint.gen.cs new file mode 100644 index 0000000..339f410 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PathConstraint.gen.cs @@ -0,0 +1,95 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_Create")] + public static partial PathConstraint PathConstraint_Create( + Body body1, + Body body2, + PathConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_SetPath")] + public static partial void PathConstraint_SetPath( + PathConstraint self, + PathConstraintPath path, + float pathFraction + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetPath")] + public static partial PathConstraintPath PathConstraint_GetPath(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetPathFraction")] + public static partial float PathConstraint_GetPathFraction(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_SetMaxFrictionForce")] + public static partial void PathConstraint_SetMaxFrictionForce(PathConstraint self, float frictionForce); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetMaxFrictionForce")] + public static partial float PathConstraint_GetMaxFrictionForce(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetPositionMotorSettings")] + public static partial MotorSettings PathConstraint_GetPositionMotorSettings(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_SetPositionMotorState")] + public static partial void PathConstraint_SetPositionMotorState(PathConstraint self, MotorState state); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetPositionMotorState")] + public static partial MotorState PathConstraint_GetPositionMotorState(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_SetTargetVelocity")] + public static partial void PathConstraint_SetTargetVelocity(PathConstraint self, float velocity); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTargetVelocity")] + public static partial float PathConstraint_GetTargetVelocity(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_SetTargetPathFraction")] + public static partial void PathConstraint_SetTargetPathFraction(PathConstraint self, float fraction); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTargetPathFraction")] + public static partial float PathConstraint_GetTargetPathFraction(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTotalLambdaPosition")] + public static partial float2 PathConstraint_GetTotalLambdaPosition(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTotalLambdaPositionLimits")] + public static partial float PathConstraint_GetTotalLambdaPositionLimits(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTotalLambdaMotor")] + public static partial float PathConstraint_GetTotalLambdaMotor(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTotalLambdaRotationHinge")] + public static partial float2 PathConstraint_GetTotalLambdaRotationHinge(PathConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraint_GetTotalLambdaRotation")] + public static partial float3 PathConstraint_GetTotalLambdaRotation(PathConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PathConstraintPath.gen.cs b/Brutal.Jolt/Generated/PInvoke/PathConstraintPath.gen.cs new file mode 100644 index 0000000..624857b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PathConstraintPath.gen.cs @@ -0,0 +1,94 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_GetRTTI")] + public static partial RTTI PathConstraintPath_GetRTTI(PathConstraintPath self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_CastTo")] + public static partial void* PathConstraintPath_CastTo(PathConstraintPath self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_GetPathMaxFraction")] + public static partial float PathConstraintPath_GetPathMaxFraction(PathConstraintPath self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_GetClosestPoint")] + public static partial float PathConstraintPath_GetClosestPoint( + PathConstraintPath self, + float3 position, + float fractionHint + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_GetPointOnPath")] + public static partial void PathConstraintPath_GetPointOnPath( + PathConstraintPath self, + float fraction, + out float3 pathPosition, + out float3 pathTangent, + out float3 pathNormal, + out float3 pathBinormal + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_SetIsLooping")] + public static partial void PathConstraintPath_SetIsLooping(PathConstraintPath self, Brutal.Bool8 isLooping); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_IsLooping")] + public static partial Brutal.Bool8 PathConstraintPath_IsLooping(PathConstraintPath self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_DrawPath")] + public static partial void PathConstraintPath_DrawPath( + PathConstraintPath self, + DebugRenderer renderer, + in float4x4 baseTransform + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_SaveBinaryState")] + public static partial void PathConstraintPath_SaveBinaryState(PathConstraintPath self, StreamOut stream); + + /// + /// + /// Creates a Shape of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Constraints/PathConstraintPath.h:60 + ///
+ /// static PathResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_RestoreFromBinaryState")] + public static partial PathConstraintPath PathConstraintPath_RestoreFromBinaryState(StreamIn stream); + + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_AddRef")] + public static partial void PathConstraintPath_AddRef(PathConstraintPath self); + + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_Release")] + public static partial void PathConstraintPath_Release(PathConstraintPath self); + + [LibraryImport("jolt", EntryPoint = "PathConstraintPath_GetRefCount")] + public static partial uint PathConstraintPath_GetRefCount(PathConstraintPath self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PathConstraintPathHermite.gen.cs b/Brutal.Jolt/Generated/PInvoke/PathConstraintPathHermite.gen.cs new file mode 100644 index 0000000..bd53957 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PathConstraintPathHermite.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PathConstraintPathHermite_Create")] + public static partial PathConstraintPathHermite PathConstraintPathHermite_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintPathHermite_AddPoint")] + public static partial void PathConstraintPathHermite_AddPoint( + PathConstraintPathHermite self, + float3 position, + float3 tangent, + float3 normal + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PathConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/PathConstraintSettings.gen.cs new file mode 100644 index 0000000..21a570c --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PathConstraintSettings.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_Create")] + public static partial PathConstraintSettings PathConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetPath")] + public static partial PathConstraintPath PathConstraintSettings_GetPath(PathConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetPath")] + public static partial void PathConstraintSettings_SetPath( + PathConstraintSettings self, + PathConstraintPath value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetPathPosition")] + [SuppressGCTransition] + public static partial float3 PathConstraintSettings_GetPathPosition(PathConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetPathPosition")] + [SuppressGCTransition] + public static partial void PathConstraintSettings_SetPathPosition( + PathConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetPathRotation")] + [SuppressGCTransition] + public static partial floatQuat PathConstraintSettings_GetPathRotation(PathConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetPathRotation")] + [SuppressGCTransition] + public static partial void PathConstraintSettings_SetPathRotation( + PathConstraintSettings self, + floatQuat value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetPathFraction")] + [SuppressGCTransition] + public static partial float PathConstraintSettings_GetPathFraction(PathConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetPathFraction")] + [SuppressGCTransition] + public static partial void PathConstraintSettings_SetPathFraction(PathConstraintSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetMaxFrictionForce")] + [SuppressGCTransition] + public static partial float PathConstraintSettings_GetMaxFrictionForce(PathConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetMaxFrictionForce")] + [SuppressGCTransition] + public static partial void PathConstraintSettings_SetMaxFrictionForce( + PathConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetPositionMotorSettings")] + public static partial MotorSettings PathConstraintSettings_GetPositionMotorSettings( + PathConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetPositionMotorSettings")] + public static partial void PathConstraintSettings_SetPositionMotorSettings( + PathConstraintSettings self, + MotorSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_GetRotationConstraintType")] + [SuppressGCTransition] + public static partial PathRotationConstraintType PathConstraintSettings_GetRotationConstraintType( + PathConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PathConstraintSettings_SetRotationConstraintType")] + [SuppressGCTransition] + public static partial void PathConstraintSettings_SetRotationConstraintType( + PathConstraintSettings self, + PathRotationConstraintType value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsLock.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsLock.gen.cs new file mode 100644 index 0000000..617e2c3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsLock.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PhysicsLock_Create")] + public static partial PhysicsLock PhysicsLock_Create(); + + [LibraryImport("jolt", EntryPoint = "PhysicsLock_Destroy")] + public static partial void PhysicsLock_Destroy(PhysicsLock self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsMaterial.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsMaterial.gen.cs new file mode 100644 index 0000000..3daaa1c --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsMaterial.gen.cs @@ -0,0 +1,101 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_Create")] + public static partial PhysicsMaterial PhysicsMaterial_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_GetRTTI")] + public static partial RTTI PhysicsMaterial_GetRTTI(PhysicsMaterial self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_CastTo")] + public static partial void* PhysicsMaterial_CastTo(PhysicsMaterial self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_GetDebugName")] + public static partial byte* PhysicsMaterial_GetDebugName(PhysicsMaterial self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_GetDebugColor")] + public static partial uint PhysicsMaterial_GetDebugColor(PhysicsMaterial self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_SaveBinaryState")] + public static partial void PhysicsMaterial_SaveBinaryState(PhysicsMaterial self, StreamOut stream); + + /// + /// + /// Creates a PhysicsMaterial of the correct type and restores its contents from the binary stream + /// inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/PhysicsMaterial.h:44 + ///
+ /// static PhysicsMaterialResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_RestoreFromBinaryState")] + public static partial PhysicsMaterial PhysicsMaterial_RestoreFromBinaryState(StreamIn stream); + + /// + /// + /// Serialises this object into buffer as a Jolt object stream and returns the total size of that + /// stream; nothing is written past the end of the buffer. Returns 0 when the object can't be written; + /// call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_SaveObjectStream")] + public static partial nuint PhysicsMaterial_SaveObjectStream( + PhysicsMaterial self, + byte* buffer, + nuint bufferCount, + ObjectStreamType streamType + ); + + /// + /// + /// Reads a text or binary object stream and returns a null handle when it can't be read; call + /// Jolt.GetLastError() for Jolt's error message. A truncated stream can still read back as an object + /// with null references. A non-null return carries a reference the caller owns. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_RestoreFromObjectStream")] + public static partial PhysicsMaterial PhysicsMaterial_RestoreFromObjectStream(byte* data, nuint dataCount); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_GetDefault")] + public static partial PhysicsMaterial PhysicsMaterial_GetDefault(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_SetDefault")] + public static partial void PhysicsMaterial_SetDefault(PhysicsMaterial value); + + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_AddRef")] + public static partial void PhysicsMaterial_AddRef(PhysicsMaterial self); + + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_Release")] + public static partial void PhysicsMaterial_Release(PhysicsMaterial self); + + [LibraryImport("jolt", EntryPoint = "PhysicsMaterial_GetRefCount")] + public static partial uint PhysicsMaterial_GetRefCount(PhysicsMaterial self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsMaterialSimple.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsMaterialSimple.gen.cs new file mode 100644 index 0000000..23c28c0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsMaterialSimple.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterialSimple_Create")] + public static partial PhysicsMaterialSimple PhysicsMaterialSimple_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsMaterialSimple_Create_2")] + public static partial PhysicsMaterialSimple PhysicsMaterialSimple_Create_2(byte* name, uint color); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsScene.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsScene.gen.cs new file mode 100644 index 0000000..61ee406 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsScene.gen.cs @@ -0,0 +1,137 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PhysicsScene_Create")] + public static partial PhysicsScene PhysicsScene_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_AddBody")] + public static partial void PhysicsScene_AddBody(PhysicsScene self, BodyCreationSettings body); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_AddConstraint")] + public static partial void PhysicsScene_AddConstraint( + PhysicsScene self, + TwoBodyConstraintSettings constraint, + uint body1, + uint body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_AddSoftBody")] + public static partial void PhysicsScene_AddSoftBody(PhysicsScene self, SoftBodyCreationSettings softBody); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumBodies")] + public static partial nuint PhysicsScene_GetNumBodies(PhysicsScene self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetBodies")] + public static partial void PhysicsScene_GetBodies(PhysicsScene self, out NativeStridedView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumConstraints")] + public static partial nuint PhysicsScene_GetNumConstraints(PhysicsScene self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetConstraints")] + public static partial void PhysicsScene_GetConstraints(PhysicsScene self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetNumSoftBodies")] + public static partial nuint PhysicsScene_GetNumSoftBodies(PhysicsScene self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetSoftBodies")] + public static partial void PhysicsScene_GetSoftBodies(PhysicsScene self, out NativeStridedView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_CreateBodies")] + public static partial Brutal.Bool8 PhysicsScene_CreateBodies(PhysicsScene self, PhysicsSystem system); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_FixInvalidScales")] + public static partial Brutal.Bool8 PhysicsScene_FixInvalidScales(PhysicsScene self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_SaveBinaryState")] + public static partial void PhysicsScene_SaveBinaryState( + PhysicsScene self, + StreamOut stream, + Brutal.Bool8 saveShapes, + Brutal.Bool8 saveGroupFilter + ); + + /// + /// + /// Restore a saved scene from inStream + /// + /// + /// C++: + /// Jolt/Physics/PhysicsScene.h:88 + ///
+ /// static PhysicsSceneResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_RestoreFromBinaryState")] + public static partial PhysicsScene PhysicsScene_RestoreFromBinaryState(StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_FromPhysicsSystem")] + public static partial void PhysicsScene_FromPhysicsSystem(PhysicsScene self, PhysicsSystem system); + + /// + /// + /// Serialises this object into buffer as a Jolt object stream and returns the total size of that + /// stream; nothing is written past the end of the buffer. Returns 0 when the object can't be written; + /// call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_SaveObjectStream")] + public static partial nuint PhysicsScene_SaveObjectStream( + PhysicsScene self, + byte* buffer, + nuint bufferCount, + ObjectStreamType streamType + ); + + /// + /// + /// Reads a text or binary object stream and returns a null handle when it can't be read; call + /// Jolt.GetLastError() for Jolt's error message. A truncated stream can still read back as an object + /// with null references. A non-null return carries a reference the caller owns. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_RestoreFromObjectStream")] + public static partial PhysicsScene PhysicsScene_RestoreFromObjectStream(byte* data, nuint dataCount); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetFixedToWorld")] + public static partial uint PhysicsScene_GetFixedToWorld(); + + [LibraryImport("jolt", EntryPoint = "PhysicsScene_AddRef")] + public static partial void PhysicsScene_AddRef(PhysicsScene self); + + [LibraryImport("jolt", EntryPoint = "PhysicsScene_Release")] + public static partial void PhysicsScene_Release(PhysicsScene self); + + [LibraryImport("jolt", EntryPoint = "PhysicsScene_GetRefCount")] + public static partial uint PhysicsScene_GetRefCount(PhysicsScene self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsStepListener.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsStepListener.gen.cs new file mode 100644 index 0000000..51f3f39 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsStepListener.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListener_OnStep")] + public static partial void PhysicsStepListener_OnStep( + PhysicsStepListener self, + PhysicsStepListenerContext context + ); + + [LibraryImport("jolt", EntryPoint = "PhysicsStepListener_CreateProxy")] + public static partial nint PhysicsStepListener_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "PhysicsStepListener_DestroyProxy")] + public static partial void PhysicsStepListener_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "PhysicsStepListener_ProxyGetBase")] + public static partial PhysicsStepListener PhysicsStepListener_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "PhysicsStepListener_ProxySetOnStep")] + public static partial void PhysicsStepListener_ProxySetOnStep( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsStepListenerContext.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsStepListenerContext.gen.cs new file mode 100644 index 0000000..1eba335 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsStepListenerContext.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_Create")] + public static partial PhysicsStepListenerContext PhysicsStepListenerContext_Create(); + + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_Destroy")] + public static partial void PhysicsStepListenerContext_Destroy(PhysicsStepListenerContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_GetDeltaTime")] + [SuppressGCTransition] + public static partial float PhysicsStepListenerContext_GetDeltaTime(PhysicsStepListenerContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_SetDeltaTime")] + [SuppressGCTransition] + public static partial void PhysicsStepListenerContext_SetDeltaTime( + PhysicsStepListenerContext self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_GetIsFirstStep")] + [SuppressGCTransition] + public static partial Brutal.Bool8 PhysicsStepListenerContext_GetIsFirstStep( + PhysicsStepListenerContext self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_SetIsFirstStep")] + [SuppressGCTransition] + public static partial void PhysicsStepListenerContext_SetIsFirstStep( + PhysicsStepListenerContext self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_GetIsLastStep")] + [SuppressGCTransition] + public static partial Brutal.Bool8 PhysicsStepListenerContext_GetIsLastStep( + PhysicsStepListenerContext self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_SetIsLastStep")] + [SuppressGCTransition] + public static partial void PhysicsStepListenerContext_SetIsLastStep( + PhysicsStepListenerContext self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_GetPhysicsSystem")] + public static partial PhysicsSystem PhysicsStepListenerContext_GetPhysicsSystem( + PhysicsStepListenerContext self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsStepListenerContext_SetPhysicsSystem")] + public static partial void PhysicsStepListenerContext_SetPhysicsSystem( + PhysicsStepListenerContext self, + PhysicsSystem value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsSystem.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsSystem.gen.cs new file mode 100644 index 0000000..933933d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsSystem.gen.cs @@ -0,0 +1,492 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_Create")] + public static partial PhysicsSystem PhysicsSystem_Create(); + + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_Destroy")] + public static partial void PhysicsSystem_Destroy(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_Init")] + public static partial void PhysicsSystem_Init( + PhysicsSystem self, + uint maxBodies, + uint numBodyMutexes, + uint maxBodyPairs, + uint maxContactConstraints, + BroadPhaseLayerInterface broadPhaseLayerInterface, + ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, + ObjectLayerPairFilter objectLayerPairFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetBodyActivationListener")] + public static partial void PhysicsSystem_SetBodyActivationListener( + PhysicsSystem self, + BodyActivationListener listener + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodyActivationListener")] + public static partial BodyActivationListener PhysicsSystem_GetBodyActivationListener(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetContactListener")] + public static partial void PhysicsSystem_SetContactListener(PhysicsSystem self, ContactListener listener); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetContactListener")] + public static partial ContactListener PhysicsSystem_GetContactListener(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetSoftBodyContactListener")] + public static partial void PhysicsSystem_SetSoftBodyContactListener( + PhysicsSystem self, + SoftBodyContactListener listener + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetSoftBodyContactListener")] + public static partial SoftBodyContactListener PhysicsSystem_GetSoftBodyContactListener(PhysicsSystem self); + + /// + /// + /// Set the function that combines the friction of two bodies and returns it Default method is the + /// geometric mean: sqrt(friction1 * friction2). + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:76 + ///
+ /// void SetCombineFriction(ContactConstraintManager::CombineFunction inCombineFriction) + ///
+ ///
+ /// + /// + /// combineFriction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Jolt calls it without a null check, so null is rejected. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetCombineFriction")] + public static partial void PhysicsSystem_SetCombineFriction( + PhysicsSystem self, + delegate* unmanaged[Cdecl] combineFriction + ); + + /// + /// + /// Set the function that combines the restitution of two bodies and returns it Default method is + /// max(restitution1, restitution1) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:81 + ///
+ /// void SetCombineRestitution(ContactConstraintManager::CombineFunction inCombineRestitution) + ///
+ ///
+ /// + /// + /// combineRestitution: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Jolt calls it without a null check, so null is rejected. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetCombineRestitution")] + public static partial void PhysicsSystem_SetCombineRestitution( + PhysicsSystem self, + delegate* unmanaged[Cdecl] combineRestitution + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetSimShapeFilter")] + public static partial void PhysicsSystem_SetSimShapeFilter(PhysicsSystem self, SimShapeFilter shapeFilter); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetSimShapeFilter")] + public static partial SimShapeFilter PhysicsSystem_GetSimShapeFilter(PhysicsSystem self); + + /// + /// + /// Advanced use only: Default function that is used to collide two bodies during simulation. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:108 + ///
+ /// static void sDefaultSimCollideBodyVsBody(const Body &inBody1, const Body &inBody2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, CollideShapeSettings &ioCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Collects every hit into defaultsimcollidebodyvsbodyresults, which you allocate and size. Returns how + /// many were written; totalHits is how many the query found, so a larger span is needed when it exceeds + /// the span's length. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_DefaultSimCollideBodyVsBody")] + public static partial uint PhysicsSystem_DefaultSimCollideBodyVsBody( + Body body1, + Body body2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + CollideShapeSettings collideShapeSettings, + CollideShapeResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Advanced use only: Default function that is used to collide two bodies during simulation. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:108 + ///
+ /// static void sDefaultSimCollideBodyVsBody(const Body &inBody1, const Body &inBody2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, CollideShapeSettings &ioCollideShapeSettings, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + /// Pass default for shapeFilter to filter nothing out. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_DefaultSimCollideBodyVsBodyClosest")] + public static partial uint PhysicsSystem_DefaultSimCollideBodyVsBodyClosest( + Body body1, + Body body2, + in float4x4 centerOfMassTransform1, + in float4x4 centerOfMassTransform2, + CollideShapeSettings collideShapeSettings, + out CollideShapeResult result, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetPhysicsSettings")] + public static partial void PhysicsSystem_SetPhysicsSettings( + PhysicsSystem self, + in PhysicsSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetPhysicsSettings")] + public static partial void PhysicsSystem_GetPhysicsSettings( + PhysicsSystem self, + out PhysicsSettings outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodyInterface")] + public static partial BodyInterface PhysicsSystem_GetBodyInterface(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodyInterfaceNoLock")] + public static partial BodyInterface PhysicsSystem_GetBodyInterfaceNoLock(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBroadPhaseQuery")] + public static partial BroadPhaseQuery PhysicsSystem_GetBroadPhaseQuery(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetNarrowPhaseQuery")] + public static partial NarrowPhaseQuery PhysicsSystem_GetNarrowPhaseQuery(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetNarrowPhaseQueryNoLock")] + public static partial NarrowPhaseQuery PhysicsSystem_GetNarrowPhaseQueryNoLock(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_AddConstraint")] + public static partial void PhysicsSystem_AddConstraint(PhysicsSystem self, Constraint constraint); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_RemoveConstraint")] + public static partial void PhysicsSystem_RemoveConstraint(PhysicsSystem self, Constraint constraint); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_AddConstraints")] + public static partial void PhysicsSystem_AddConstraints( + PhysicsSystem self, + Constraint* constraints, + int number + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_RemoveConstraints")] + public static partial void PhysicsSystem_RemoveConstraints( + PhysicsSystem self, + Constraint* constraints, + int number + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetConstraints")] + public static partial nint PhysicsSystem_GetConstraints(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_OptimizeBroadPhase")] + public static partial void PhysicsSystem_OptimizeBroadPhase(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_AddStepListener")] + public static partial void PhysicsSystem_AddStepListener(PhysicsSystem self, PhysicsStepListener listener); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_RemoveStepListener")] + public static partial void PhysicsSystem_RemoveStepListener( + PhysicsSystem self, + PhysicsStepListener listener + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_Update")] + public static partial PhysicsUpdateError PhysicsSystem_Update( + PhysicsSystem self, + float deltaTime, + int collisionSteps, + TempAllocator tempAllocator, + JobSystem jobSystem + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SaveState")] + public static partial void PhysicsSystem_SaveState( + PhysicsSystem self, + StateRecorder stream, + StateRecorderState state, + StateRecorderFilter filter + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_RestoreState")] + public static partial Brutal.Bool8 PhysicsSystem_RestoreState( + PhysicsSystem self, + StateRecorder stream, + StateRecorderFilter filter + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SaveBodyState")] + public static partial void PhysicsSystem_SaveBodyState(PhysicsSystem self, Body body, StateRecorder stream); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_RestoreBodyState")] + public static partial void PhysicsSystem_RestoreBodyState( + PhysicsSystem self, + Body body, + StateRecorder stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_DrawBodies")] + public static partial void PhysicsSystem_DrawBodies( + PhysicsSystem self, + in BodyManager.DrawSettings settings, + DebugRenderer renderer, + BodyDrawFilter bodyFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_DrawConstraints")] + public static partial void PhysicsSystem_DrawConstraints(PhysicsSystem self, DebugRenderer renderer); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_DrawConstraintLimits")] + public static partial void PhysicsSystem_DrawConstraintLimits(PhysicsSystem self, DebugRenderer renderer); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_DrawConstraintReferenceFrame")] + public static partial void PhysicsSystem_DrawConstraintReferenceFrame( + PhysicsSystem self, + DebugRenderer renderer + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetGravity")] + public static partial void PhysicsSystem_SetGravity(PhysicsSystem self, float3 gravity); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetGravity")] + public static partial float3 PhysicsSystem_GetGravity(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodyLockInterfaceNoLock")] + public static partial BodyLockInterfaceNoLock PhysicsSystem_GetBodyLockInterfaceNoLock(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodyLockInterface")] + public static partial BodyLockInterfaceLocking PhysicsSystem_GetBodyLockInterface(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBroadPhaseLayerInterface")] + public static partial BroadPhaseLayerInterface PhysicsSystem_GetBroadPhaseLayerInterface( + PhysicsSystem self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetObjectVsBroadPhaseLayerFilter")] + public static partial ObjectVsBroadPhaseLayerFilter PhysicsSystem_GetObjectVsBroadPhaseLayerFilter( + PhysicsSystem self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetObjectLayerPairFilter")] + public static partial ObjectLayerPairFilter PhysicsSystem_GetObjectLayerPairFilter(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetDefaultBroadPhaseLayerFilter")] + public static partial DefaultBroadPhaseLayerFilter PhysicsSystem_GetDefaultBroadPhaseLayerFilter( + PhysicsSystem self, + ushort layer + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetDefaultLayerFilter")] + public static partial DefaultObjectLayerFilter PhysicsSystem_GetDefaultLayerFilter( + PhysicsSystem self, + ushort layer + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetNumBodies")] + public static partial uint PhysicsSystem_GetNumBodies(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetNumActiveBodies")] + public static partial uint PhysicsSystem_GetNumActiveBodies(PhysicsSystem self, BodyType type); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetMaxBodies")] + public static partial uint PhysicsSystem_GetMaxBodies(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodyStats")] + public static partial void PhysicsSystem_GetBodyStats( + PhysicsSystem self, + out BodyManager.BodyStats outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodies")] + public static partial void PhysicsSystem_GetBodies(PhysicsSystem self, out nint bodyIDs); + + /// + /// + /// Get copy of the list of all bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:235 + ///
+ /// void GetBodies(BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Get copy of the list of all bodies under protection of a lock. + /// @param outBodyIDs On return, this will contain the list of BodyIDs + /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBodies_2")] + public static partial uint PhysicsSystem_GetBodies_2(PhysicsSystem self, uint* buffer, uint capacity); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetActiveBodies")] + public static partial void PhysicsSystem_GetActiveBodies( + PhysicsSystem self, + BodyType type, + out nint bodyIDs + ); + + /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSystem.h:240 + ///
+ /// void GetActiveBodies(EBodyType inType, BodyIDVector &outBodyIDs) const + ///
+ ///
+ /// + /// + /// Get copy of the list of active bodies under protection of a lock. + /// @param inType The type of bodies to get + /// @param outBodyIDs On return, this will contain the list of BodyIDs + /// + /// + /// Copies the contents into results, which you allocate and size - the allocation-free form of the + /// NativeArray overload beside this one. Returns how many elements were written; totalHits is how many + /// there were, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetActiveBodies_2")] + public static partial uint PhysicsSystem_GetActiveBodies_2( + PhysicsSystem self, + BodyType type, + uint* buffer, + uint capacity + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_WereBodiesInContact")] + public static partial Brutal.Bool8 PhysicsSystem_WereBodiesInContact( + PhysicsSystem self, + uint body1ID, + uint body2ID + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetBounds")] + public static partial AABox PhysicsSystem_GetBounds(PhysicsSystem self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetMaxBodiesLimit")] + public static partial uint PhysicsSystem_GetMaxBodiesLimit(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetMaxBodyPairsLimit")] + public static partial uint PhysicsSystem_GetMaxBodyPairsLimit(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetMaxContactConstraintsLimit")] + public static partial uint PhysicsSystem_GetMaxContactConstraintsLimit(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_GetDrawMotionQualityLinearCast")] + public static partial Brutal.Bool8 PhysicsSystem_GetDrawMotionQualityLinearCast(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsSystem_SetDrawMotionQualityLinearCast")] + public static partial void PhysicsSystem_SetDrawMotionQualityLinearCast(Brutal.Bool8 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PhysicsUpdateContext.gen.cs b/Brutal.Jolt/Generated/PInvoke/PhysicsUpdateContext.gen.cs new file mode 100644 index 0000000..dd32212 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PhysicsUpdateContext.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_Create")] + public static partial PhysicsUpdateContext PhysicsUpdateContext_Create(TempAllocator tempAllocator); + + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_Destroy")] + public static partial void PhysicsUpdateContext_Destroy(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetMaxConcurrency")] + public static partial int PhysicsUpdateContext_GetMaxConcurrency(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetCMaxConcurrency")] + public static partial int PhysicsUpdateContext_GetCMaxConcurrency(); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetPhysicsSystem")] + public static partial PhysicsSystem PhysicsUpdateContext_GetPhysicsSystem(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetPhysicsSystem")] + public static partial void PhysicsUpdateContext_SetPhysicsSystem( + PhysicsUpdateContext self, + PhysicsSystem value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetTempAllocator")] + public static partial TempAllocator PhysicsUpdateContext_GetTempAllocator(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetTempAllocator")] + public static partial void PhysicsUpdateContext_SetTempAllocator( + PhysicsUpdateContext self, + TempAllocator value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetJobSystem")] + public static partial JobSystem PhysicsUpdateContext_GetJobSystem(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetJobSystem")] + public static partial void PhysicsUpdateContext_SetJobSystem(PhysicsUpdateContext self, JobSystem value); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetStepDeltaTime")] + [SuppressGCTransition] + public static partial float PhysicsUpdateContext_GetStepDeltaTime(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetStepDeltaTime")] + [SuppressGCTransition] + public static partial void PhysicsUpdateContext_SetStepDeltaTime(PhysicsUpdateContext self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetWarmStartImpulseRatio")] + [SuppressGCTransition] + public static partial float PhysicsUpdateContext_GetWarmStartImpulseRatio(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetWarmStartImpulseRatio")] + [SuppressGCTransition] + public static partial void PhysicsUpdateContext_SetWarmStartImpulseRatio( + PhysicsUpdateContext self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetActiveConstraints")] + public static partial void PhysicsUpdateContext_SetActiveConstraints( + PhysicsUpdateContext self, + Constraint* value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetBodyPairs")] + public static partial void PhysicsUpdateContext_SetBodyPairs(PhysicsUpdateContext self, BodyPair* value); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetBodyManager")] + public static partial BodyManager PhysicsUpdateContext_GetBodyManager(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetBodyManager")] + public static partial void PhysicsUpdateContext_SetBodyManager( + PhysicsUpdateContext self, + BodyManager value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetIslandBuilder")] + public static partial IslandBuilder PhysicsUpdateContext_GetIslandBuilder(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetIslandBuilder")] + public static partial void PhysicsUpdateContext_SetIslandBuilder( + PhysicsUpdateContext self, + IslandBuilder value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetNumSoftBodies")] + [SuppressGCTransition] + public static partial uint PhysicsUpdateContext_GetNumSoftBodies(PhysicsUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetNumSoftBodies")] + [SuppressGCTransition] + public static partial void PhysicsUpdateContext_SetNumSoftBodies(PhysicsUpdateContext self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_GetSoftBodyUpdateContexts")] + public static partial SoftBodyUpdateContext PhysicsUpdateContext_GetSoftBodyUpdateContexts( + PhysicsUpdateContext self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PhysicsUpdateContext_SetSoftBodyUpdateContexts")] + public static partial void PhysicsUpdateContext_SetSoftBodyUpdateContexts( + PhysicsUpdateContext self, + SoftBodyUpdateContext value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Plane.gen.cs b/Brutal.Jolt/Generated/PInvoke/Plane.gen.cs new file mode 100644 index 0000000..d1cb4df --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Plane.gen.cs @@ -0,0 +1,179 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Plane_Create")] + public static partial Plane Plane_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "Plane_Create_2")] + public static partial Plane Plane_Create_2(float4 normalAndConstant); + + /// + [LibraryImport("jolt", EntryPoint = "Plane_Create_3")] + public static partial Plane Plane_Create_3(float3 normal, float constant); + + /// + [LibraryImport("jolt", EntryPoint = "Plane_FromPointAndNormal")] + public static partial Plane Plane_FromPointAndNormal(float3 point, float3 normal); + + /// + [LibraryImport("jolt", EntryPoint = "Plane_FromPointAndNormal_2")] + public static partial Plane Plane_FromPointAndNormal_2(double3 point, float3 normal); + + /// + [LibraryImport("jolt", EntryPoint = "Plane_FromPointsCCW")] + public static partial Plane Plane_FromPointsCCW(float3 v1, float3 v2, float3 v3); + + /// + /// + /// Properties + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:30 + ///
+ /// Vec3 GetNormal() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_GetNormal")] + public static partial float3 Plane_GetNormal(ref Plane self); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:31 + ///
+ /// void SetNormal(Vec3Arg inNormal) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_SetNormal")] + public static partial void Plane_SetNormal(ref Plane self, float3 normal); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:32 + ///
+ /// float GetConstant() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_GetConstant")] + public static partial float Plane_GetConstant(ref Plane self); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:33 + ///
+ /// void SetConstant(float inConstant) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_SetConstant")] + public static partial void Plane_SetConstant(ref Plane self, float constant); + + /// + /// + /// Store as 4 floats + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:36 + ///
+ /// void StoreFloat4(Float4 *outV) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_StoreFloat4")] + public static partial void Plane_StoreFloat4(ref Plane self, float4* v); + + /// + /// + /// Offset the plane (positive value means move it in the direction of the plane normal) + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:39 + ///
+ /// Plane Offset(float inDistance) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_Offset")] + public static partial Plane Plane_Offset(ref Plane self, float distance); + + /// + /// + /// Transform the plane by a matrix + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:42 + ///
+ /// inline Plane GetTransformed(Mat44Arg inTransform) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_GetTransformed")] + public static partial Plane Plane_GetTransformed(ref Plane self, in float4x4 transform); + + /// + /// + /// Scale the plane, can handle non-uniform and negative scaling + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:49 + ///
+ /// inline Plane Scaled(Vec3Arg inScale) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_Scaled")] + public static partial Plane Plane_Scaled(ref Plane self, float3 scale); + + /// + /// + /// Distance point to plane + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:57 + ///
+ /// float SignedDistance(Vec3Arg inPoint) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_SignedDistance")] + public static partial float Plane_SignedDistance(ref Plane self, float3 point); + + /// + /// + /// Project inPoint onto the plane + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:60 + ///
+ /// Vec3 ProjectPointOnPlane(Vec3Arg inPoint) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Plane_ProjectPointOnPlane")] + public static partial float3 Plane_ProjectPointOnPlane(ref Plane self, float3 point); + + /// + [LibraryImport("jolt", EntryPoint = "Plane_IntersectPlanes")] + public static partial Brutal.Bool8 Plane_IntersectPlanes( + in Plane p1, + in Plane p2, + in Plane p3, + out float3 point + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PlaneShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/PlaneShape.gen.cs new file mode 100644 index 0000000..8a510ba --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PlaneShape.gen.cs @@ -0,0 +1,51 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_Create")] + public static partial PlaneShape PlaneShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_Create_2")] + public static partial PlaneShape PlaneShape_Create_2( + in Plane plane, + PhysicsMaterial material, + float halfExtent + ); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_Create_3")] + public static partial PlaneShape PlaneShape_Create_3(PlaneShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_GetPlane")] + public static partial Plane PlaneShape_GetPlane(PlaneShape self); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_GetHalfExtent")] + public static partial float PlaneShape_GetHalfExtent(PlaneShape self); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_GetMaterial")] + public static partial PhysicsMaterial PlaneShape_GetMaterial(PlaneShape self); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_SetMaterial")] + public static partial void PlaneShape_SetMaterial(PlaneShape self, PhysicsMaterial material); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShape_Register")] + public static partial void PlaneShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PlaneShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/PlaneShapeSettings.gen.cs new file mode 100644 index 0000000..9584cbf --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PlaneShapeSettings.gen.cs @@ -0,0 +1,57 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_Create")] + public static partial PlaneShapeSettings PlaneShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_Create_2")] + public static partial PlaneShapeSettings PlaneShapeSettings_Create_2( + in Plane plane, + PhysicsMaterial material, + float halfExtent + ); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_GetPlane")] + public static partial Plane PlaneShapeSettings_GetPlane(PlaneShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_SetPlane")] + public static partial void PlaneShapeSettings_SetPlane(PlaneShapeSettings self, Plane value); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_GetMaterial")] + public static partial PhysicsMaterial PlaneShapeSettings_GetMaterial(PlaneShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_SetMaterial")] + public static partial void PlaneShapeSettings_SetMaterial(PlaneShapeSettings self, PhysicsMaterial value); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_GetDefaultHalfExtent")] + public static partial float PlaneShapeSettings_GetDefaultHalfExtent(); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_GetHalfExtent")] + [SuppressGCTransition] + public static partial float PlaneShapeSettings_GetHalfExtent(PlaneShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PlaneShapeSettings_SetHalfExtent")] + [SuppressGCTransition] + public static partial void PlaneShapeSettings_SetHalfExtent(PlaneShapeSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PointConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/PointConstraint.gen.cs new file mode 100644 index 0000000..65938d9 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PointConstraint.gen.cs @@ -0,0 +1,51 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PointConstraint_Create")] + public static partial PointConstraint PointConstraint_Create( + Body body1, + Body body2, + PointConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraint_SetPoint1")] + public static partial void PointConstraint_SetPoint1( + PointConstraint self, + ConstraintSpace space, + float3 point1 + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraint_SetPoint2")] + public static partial void PointConstraint_SetPoint2( + PointConstraint self, + ConstraintSpace space, + float3 point2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraint_GetLocalSpacePoint1")] + public static partial float3 PointConstraint_GetLocalSpacePoint1(PointConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraint_GetLocalSpacePoint2")] + public static partial float3 PointConstraint_GetLocalSpacePoint2(PointConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraint_GetTotalLambdaPosition")] + public static partial float3 PointConstraint_GetTotalLambdaPosition(PointConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PointConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/PointConstraintPart.gen.cs new file mode 100644 index 0000000..820ff5b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PointConstraintPart.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_Create")] + public static partial PointConstraintPart PointConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_Destroy")] + public static partial void PointConstraintPart_Destroy(PointConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_CalculateConstraintProperties")] + public static partial void PointConstraintPart_CalculateConstraintProperties( + PointConstraintPart self, + Body body1, + in float4x4 rotation1, + float3 r1, + Body body2, + in float4x4 rotation2, + float3 r2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_Deactivate")] + public static partial void PointConstraintPart_Deactivate(PointConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_IsActive")] + public static partial Brutal.Bool8 PointConstraintPart_IsActive(PointConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_WarmStart")] + public static partial void PointConstraintPart_WarmStart( + PointConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 PointConstraintPart_SolveVelocityConstraint( + PointConstraintPart self, + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 PointConstraintPart_SolvePositionConstraint( + PointConstraintPart self, + Body body1, + Body body2, + float baumgarte + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintPart_GetTotalLambda")] + public static partial float3 PointConstraintPart_GetTotalLambda(PointConstraintPart self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PointConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/PointConstraintSettings.gen.cs new file mode 100644 index 0000000..e7f6031 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PointConstraintSettings.gen.cs @@ -0,0 +1,51 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_Create")] + public static partial PointConstraintSettings PointConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace PointConstraintSettings_GetSpace(PointConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void PointConstraintSettings_SetSpace( + PointConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_GetPoint1")] + [SuppressGCTransition] + public static partial float3 PointConstraintSettings_GetPoint1(PointConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_SetPoint1")] + [SuppressGCTransition] + public static partial void PointConstraintSettings_SetPoint1(PointConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_GetPoint2")] + [SuppressGCTransition] + public static partial float3 PointConstraintSettings_GetPoint2(PointConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PointConstraintSettings_SetPoint2")] + [SuppressGCTransition] + public static partial void PointConstraintSettings_SetPoint2(PointConstraintSettings self, float3 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PolyhedronSubmergedVolumeCalculator.gen.cs b/Brutal.Jolt/Generated/PInvoke/PolyhedronSubmergedVolumeCalculator.gen.cs new file mode 100644 index 0000000..934e61a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PolyhedronSubmergedVolumeCalculator.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PolyhedronSubmergedVolumeCalculator_AreAllAbove")] + public static partial Brutal.Bool8 PolyhedronSubmergedVolumeCalculator_AreAllAbove( + PolyhedronSubmergedVolumeCalculator self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PolyhedronSubmergedVolumeCalculator_AreAllBelow")] + public static partial Brutal.Bool8 PolyhedronSubmergedVolumeCalculator_AreAllBelow( + PolyhedronSubmergedVolumeCalculator self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PolyhedronSubmergedVolumeCalculator_GetReferencePointIdx")] + public static partial int PolyhedronSubmergedVolumeCalculator_GetReferencePointIdx( + PolyhedronSubmergedVolumeCalculator self + ); + + /// + [LibraryImport("jolt", EntryPoint = "PolyhedronSubmergedVolumeCalculator_AddFace")] + public static partial void PolyhedronSubmergedVolumeCalculator_AddFace( + PolyhedronSubmergedVolumeCalculator self, + int idx1, + int idx2, + int idx3 + ); + + /// + [LibraryImport("jolt", EntryPoint = "PolyhedronSubmergedVolumeCalculator_GetResult")] + public static partial void PolyhedronSubmergedVolumeCalculator_GetResult( + PolyhedronSubmergedVolumeCalculator self, + out float submergedVolume, + out float3 centerOfBuoyancy + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PulleyConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/PulleyConstraint.gen.cs new file mode 100644 index 0000000..d64389f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PulleyConstraint.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraint_Create")] + public static partial PulleyConstraint PulleyConstraint_Create( + Body body1, + Body body2, + PulleyConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraint_SetLength")] + public static partial void PulleyConstraint_SetLength( + PulleyConstraint self, + float minLength, + float maxLength + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraint_GetMinLength")] + public static partial float PulleyConstraint_GetMinLength(PulleyConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraint_GetMaxLength")] + public static partial float PulleyConstraint_GetMaxLength(PulleyConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraint_GetCurrentLength")] + public static partial float PulleyConstraint_GetCurrentLength(PulleyConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraint_GetTotalLambdaPosition")] + public static partial float PulleyConstraint_GetTotalLambdaPosition(PulleyConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/PulleyConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/PulleyConstraintSettings.gen.cs new file mode 100644 index 0000000..e6d3c8c --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/PulleyConstraintSettings.gen.cs @@ -0,0 +1,119 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_Create")] + public static partial PulleyConstraintSettings PulleyConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace PulleyConstraintSettings_GetSpace(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetSpace( + PulleyConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetBodyPoint1")] + [SuppressGCTransition] + public static partial float3 PulleyConstraintSettings_GetBodyPoint1(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetBodyPoint1")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetBodyPoint1( + PulleyConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetFixedPoint1")] + [SuppressGCTransition] + public static partial float3 PulleyConstraintSettings_GetFixedPoint1(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetFixedPoint1")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetFixedPoint1( + PulleyConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetBodyPoint2")] + [SuppressGCTransition] + public static partial float3 PulleyConstraintSettings_GetBodyPoint2(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetBodyPoint2")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetBodyPoint2( + PulleyConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetFixedPoint2")] + [SuppressGCTransition] + public static partial float3 PulleyConstraintSettings_GetFixedPoint2(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetFixedPoint2")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetFixedPoint2( + PulleyConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetRatio")] + [SuppressGCTransition] + public static partial float PulleyConstraintSettings_GetRatio(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetRatio")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetRatio(PulleyConstraintSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetMinLength")] + [SuppressGCTransition] + public static partial float PulleyConstraintSettings_GetMinLength(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetMinLength")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetMinLength( + PulleyConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_GetMaxLength")] + [SuppressGCTransition] + public static partial float PulleyConstraintSettings_GetMaxLength(PulleyConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "PulleyConstraintSettings_SetMaxLength")] + [SuppressGCTransition] + public static partial void PulleyConstraintSettings_SetMaxLength( + PulleyConstraintSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/QuadTree.gen.cs b/Brutal.Jolt/Generated/PInvoke/QuadTree.gen.cs new file mode 100644 index 0000000..117aee2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/QuadTree.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "QuadTree_Create")] + public static partial QuadTree QuadTree_Create(); + + [LibraryImport("jolt", EntryPoint = "QuadTree_Destroy")] + public static partial void QuadTree_Destroy(QuadTree self); + + /// + [LibraryImport("jolt", EntryPoint = "QuadTree_HasBodies")] + public static partial Brutal.Bool8 QuadTree_HasBodies(QuadTree self); + + /// + [LibraryImport("jolt", EntryPoint = "QuadTree_IsDirty")] + public static partial Brutal.Bool8 QuadTree_IsDirty(QuadTree self); + + /// + [LibraryImport("jolt", EntryPoint = "QuadTree_CanBeUpdated")] + public static partial Brutal.Bool8 QuadTree_CanBeUpdated(QuadTree self); + + /// + [LibraryImport("jolt", EntryPoint = "QuadTree_DiscardOldTree")] + public static partial void QuadTree_DiscardOldTree(QuadTree self); + + /// + [LibraryImport("jolt", EntryPoint = "QuadTree_GetBounds")] + public static partial AABox QuadTree_GetBounds(QuadTree self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RTTI.gen.cs b/Brutal.Jolt/Generated/PInvoke/RTTI.gen.cs new file mode 100644 index 0000000..01415bc --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RTTI.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "RTTI_GetName")] + public static partial byte* RTTI_GetName(RTTI self); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_GetSize")] + public static partial int RTTI_GetSize(RTTI self); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_IsAbstract")] + public static partial Brutal.Bool8 RTTI_IsAbstract(RTTI self); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_GetBaseClassCount")] + public static partial int RTTI_GetBaseClassCount(RTTI self); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_GetBaseClass")] + public static partial RTTI RTTI_GetBaseClass(RTTI self, int idx, out uint outInRange); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_GetHash")] + public static partial uint RTTI_GetHash(RTTI self); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_CreateObject")] + public static partial void* RTTI_CreateObject(RTTI self); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_DestructObject")] + public static partial void RTTI_DestructObject(RTTI self, void* @object); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_AddBaseClass")] + public static partial void RTTI_AddBaseClass(RTTI self, RTTI rtti, int offset); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_IsKindOf")] + public static partial Brutal.Bool8 RTTI_IsKindOf(RTTI self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "RTTI_CastTo")] + public static partial void* RTTI_CastTo(RTTI self, void* @object, RTTI rtti); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraint.gen.cs new file mode 100644 index 0000000..fc10e0a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraint.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraint_Create")] + public static partial RackAndPinionConstraint RackAndPinionConstraint_Create( + Body body1, + Body body2, + RackAndPinionConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraint_SetConstraints")] + public static partial void RackAndPinionConstraint_SetConstraints( + RackAndPinionConstraint self, + Constraint pinion, + Constraint rack + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraint_GetTotalLambda")] + public static partial float RackAndPinionConstraint_GetTotalLambda(RackAndPinionConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintPart.gen.cs new file mode 100644 index 0000000..c904fda --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintPart.gen.cs @@ -0,0 +1,74 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_Create")] + public static partial RackAndPinionConstraintPart RackAndPinionConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_Destroy")] + public static partial void RackAndPinionConstraintPart_Destroy(RackAndPinionConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_CalculateConstraintProperties")] + public static partial void RackAndPinionConstraintPart_CalculateConstraintProperties( + RackAndPinionConstraintPart self, + Body body1, + float3 worldSpaceHingeAxis, + Body body2, + float3 worldSpaceSliderAxis, + float ratio + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_Deactivate")] + public static partial void RackAndPinionConstraintPart_Deactivate(RackAndPinionConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_IsActive")] + public static partial Brutal.Bool8 RackAndPinionConstraintPart_IsActive(RackAndPinionConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_WarmStart")] + public static partial void RackAndPinionConstraintPart_WarmStart( + RackAndPinionConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 RackAndPinionConstraintPart_SolveVelocityConstraint( + RackAndPinionConstraintPart self, + Body body1, + float3 worldSpaceHingeAxis, + Body body2, + float3 worldSpaceSliderAxis, + float ratio + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_GetTotalLambda")] + public static partial float RackAndPinionConstraintPart_GetTotalLambda(RackAndPinionConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 RackAndPinionConstraintPart_SolvePositionConstraint( + RackAndPinionConstraintPart self, + Body body1, + Body body2, + float c, + float baumgarte + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintSettings.gen.cs new file mode 100644 index 0000000..32c559a --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RackAndPinionConstraintSettings.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_Create")] + public static partial RackAndPinionConstraintSettings RackAndPinionConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_SetRatio")] + public static partial void RackAndPinionConstraintSettings_SetRatio( + RackAndPinionConstraintSettings self, + int numTeethRack, + float rackLength, + int numTeethPinion + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace RackAndPinionConstraintSettings_GetSpace( + RackAndPinionConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void RackAndPinionConstraintSettings_SetSpace( + RackAndPinionConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_GetHingeAxis")] + [SuppressGCTransition] + public static partial float3 RackAndPinionConstraintSettings_GetHingeAxis( + RackAndPinionConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_SetHingeAxis")] + [SuppressGCTransition] + public static partial void RackAndPinionConstraintSettings_SetHingeAxis( + RackAndPinionConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_GetSliderAxis")] + [SuppressGCTransition] + public static partial float3 RackAndPinionConstraintSettings_GetSliderAxis( + RackAndPinionConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_SetSliderAxis")] + [SuppressGCTransition] + public static partial void RackAndPinionConstraintSettings_SetSliderAxis( + RackAndPinionConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_GetRatio")] + [SuppressGCTransition] + public static partial float RackAndPinionConstraintSettings_GetRatio(RackAndPinionConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RackAndPinionConstraintSettings_SetRatio_2")] + [SuppressGCTransition] + public static partial void RackAndPinionConstraintSettings_SetRatio_2( + RackAndPinionConstraintSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Ragdoll.gen.cs b/Brutal.Jolt/Generated/PInvoke/Ragdoll.gen.cs new file mode 100644 index 0000000..95cce0d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Ragdoll.gen.cs @@ -0,0 +1,195 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_Create")] + public static partial Ragdoll Ragdoll_Create(PhysicsSystem system); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_AddToPhysicsSystem")] + public static partial void Ragdoll_AddToPhysicsSystem( + Ragdoll self, + Activation activationMode, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_RemoveFromPhysicsSystem")] + public static partial void Ragdoll_RemoveFromPhysicsSystem(Ragdoll self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_Activate")] + public static partial void Ragdoll_Activate(Ragdoll self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_IsActive")] + public static partial Brutal.Bool8 Ragdoll_IsActive(Ragdoll self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_SetGroupID")] + public static partial void Ragdoll_SetGroupID(Ragdoll self, uint groupID, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_SetPose")] + public static partial void Ragdoll_SetPose(Ragdoll self, SkeletonPose pose, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_SetPose_2")] + public static partial void Ragdoll_SetPose_2( + Ragdoll self, + float3 rootOffset, + float4x4* jointMatrices, + uint jointMatricesCount, + Brutal.Bool8 lockBodies, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetPose")] + public static partial void Ragdoll_GetPose(Ragdoll self, SkeletonPose pose, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetPose_2")] + public static partial void Ragdoll_GetPose_2( + Ragdoll self, + out float3 rootOffset, + float4x4* jointMatrices, + uint jointMatricesCount, + Brutal.Bool8 lockBodies, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_ResetWarmStart")] + public static partial void Ragdoll_ResetWarmStart(Ragdoll self); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_DriveToPoseUsingKinematics")] + public static partial void Ragdoll_DriveToPoseUsingKinematics( + Ragdoll self, + SkeletonPose pose, + float deltaTime, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_DriveToPoseUsingKinematics_2")] + public static partial void Ragdoll_DriveToPoseUsingKinematics_2( + Ragdoll self, + float3 rootOffset, + float4x4* jointMatrices, + uint jointMatricesCount, + float deltaTime, + Brutal.Bool8 lockBodies, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_DriveToPoseUsingMotors")] + public static partial void Ragdoll_DriveToPoseUsingMotors( + Ragdoll self, + SkeletonPose pose, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_DriveToPoseUsingMotors_2")] + public static partial void Ragdoll_DriveToPoseUsingMotors_2( + Ragdoll self, + SkeletonPose prevPose, + SkeletonPose pose, + float deltaTime, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_SetLinearAndAngularVelocity")] + public static partial void Ragdoll_SetLinearAndAngularVelocity( + Ragdoll self, + float3 linearVelocity, + float3 angularVelocity, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_SetLinearVelocity")] + public static partial void Ragdoll_SetLinearVelocity( + Ragdoll self, + float3 linearVelocity, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_AddLinearVelocity")] + public static partial void Ragdoll_AddLinearVelocity( + Ragdoll self, + float3 linearVelocity, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_AddImpulse")] + public static partial void Ragdoll_AddImpulse(Ragdoll self, float3 impulse, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetRootTransform")] + public static partial void Ragdoll_GetRootTransform( + Ragdoll self, + out float3 position, + out floatQuat rotation, + Brutal.Bool8 lockBodies + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetBodyCount")] + public static partial nuint Ragdoll_GetBodyCount(Ragdoll self); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetBodyID")] + public static partial uint Ragdoll_GetBodyID(Ragdoll self, int bodyIndex, out uint outInRange); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetBodyIDs")] + public static partial void Ragdoll_GetBodyIDs(Ragdoll self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetConstraintCount")] + public static partial nuint Ragdoll_GetConstraintCount(Ragdoll self); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetConstraint")] + public static partial TwoBodyConstraint Ragdoll_GetConstraint( + Ragdoll self, + int constraintIndex, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetWorldSpaceBounds")] + public static partial AABox Ragdoll_GetWorldSpaceBounds(Ragdoll self, Brutal.Bool8 lockBodies); + + /// + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetRagdollSettings")] + public static partial RagdollSettings Ragdoll_GetRagdollSettings(Ragdoll self); + + [LibraryImport("jolt", EntryPoint = "Ragdoll_AddRef")] + public static partial void Ragdoll_AddRef(Ragdoll self); + + [LibraryImport("jolt", EntryPoint = "Ragdoll_Release")] + public static partial void Ragdoll_Release(Ragdoll self); + + [LibraryImport("jolt", EntryPoint = "Ragdoll_GetRefCount")] + public static partial uint Ragdoll_GetRefCount(Ragdoll self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RagdollSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/RagdollSettings.gen.cs new file mode 100644 index 0000000..b6ddd06 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RagdollSettings.gen.cs @@ -0,0 +1,180 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "RagdollSettings_Create")] + public static partial RagdollSettings RagdollSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_Stabilize")] + public static partial Brutal.Bool8 RagdollSettings_Stabilize(RagdollSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_CalculateConstraintPriorities")] + public static partial void RagdollSettings_CalculateConstraintPriorities( + RagdollSettings self, + uint basePriority + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_DisableParentChildCollisions")] + public static partial void RagdollSettings_DisableParentChildCollisions( + RagdollSettings self, + float4x4* jointMatrices, + uint jointMatricesCount, + float minSeparationDistance, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_SaveBinaryState")] + public static partial void RagdollSettings_SaveBinaryState( + RagdollSettings self, + StreamOut stream, + Brutal.Bool8 saveShapes, + Brutal.Bool8 saveGroupFilter + ); + + /// + /// + /// Restore a saved ragdoll from inStream + /// + /// + /// C++: + /// Jolt/Physics/Ragdoll/Ragdoll.h:58 + ///
+ /// static RagdollResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_RestoreFromBinaryState")] + public static partial RagdollSettings RagdollSettings_RestoreFromBinaryState(StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_CreateRagdoll")] + public static partial Ragdoll RagdollSettings_CreateRagdoll( + RagdollSettings self, + uint collisionGroup, + ulong userData, + PhysicsSystem system, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetSkeleton")] + public static partial Skeleton RagdollSettings_GetSkeleton(RagdollSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_CalculateBodyIndexToConstraintIndex")] + public static partial void RagdollSettings_CalculateBodyIndexToConstraintIndex(RagdollSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetBodyIndexToConstraintIndex")] + public static partial void RagdollSettings_GetBodyIndexToConstraintIndex( + RagdollSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetConstraintIndexForBodyIndex")] + public static partial int RagdollSettings_GetConstraintIndexForBodyIndex( + RagdollSettings self, + int bodyIndex, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_CalculateConstraintIndexToBodyIdxPair")] + public static partial void RagdollSettings_CalculateConstraintIndexToBodyIdxPair(RagdollSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetConstraintIndexToBodyIdxPair")] + public static partial void RagdollSettings_GetConstraintIndexToBodyIdxPair( + RagdollSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetBodyIndicesForConstraintIndex")] + public static partial int2 RagdollSettings_GetBodyIndicesForConstraintIndex( + RagdollSettings self, + int constraintIndex, + out uint outInRange + ); + + /// + /// + /// Serialises this object into buffer as a Jolt object stream and returns the total size of that + /// stream; nothing is written past the end of the buffer. Returns 0 when the object can't be written; + /// call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_SaveObjectStream")] + public static partial nuint RagdollSettings_SaveObjectStream( + RagdollSettings self, + byte* buffer, + nuint bufferCount, + ObjectStreamType streamType + ); + + /// + /// + /// Reads a text or binary object stream and returns a null handle when it can't be read; call + /// Jolt.GetLastError() for Jolt's error message. A truncated stream can still read back as an object + /// with null references. A non-null return carries a reference the caller owns. + /// + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_RestoreFromObjectStream")] + public static partial RagdollSettings RagdollSettings_RestoreFromObjectStream(byte* data, nuint dataCount); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_SetPartCount")] + public static partial void RagdollSettings_SetPartCount(RagdollSettings self, int count); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetPartToParent")] + public static partial TwoBodyConstraintSettings RagdollSettings_GetPartToParent( + RagdollSettings self, + int index + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_SetPartToParent")] + public static partial void RagdollSettings_SetPartToParent( + RagdollSettings self, + int index, + TwoBodyConstraintSettings constraint + ); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_SetSkeleton")] + public static partial void RagdollSettings_SetSkeleton(RagdollSettings self, Skeleton value); + + /// + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetParts")] + public static partial void RagdollSettings_GetParts(RagdollSettings self, out NativeStridedView outResult); + + [LibraryImport("jolt", EntryPoint = "RagdollSettings_AddRef")] + public static partial void RagdollSettings_AddRef(RagdollSettings self); + + [LibraryImport("jolt", EntryPoint = "RagdollSettings_Release")] + public static partial void RagdollSettings_Release(RagdollSettings self); + + [LibraryImport("jolt", EntryPoint = "RagdollSettings_GetRefCount")] + public static partial uint RagdollSettings_GetRefCount(RagdollSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RayCastSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/RayCastSettings.gen.cs new file mode 100644 index 0000000..cfbe264 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RayCastSettings.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "RayCastSettings_Create")] + public static partial RayCastSettings RayCastSettings_Create(); + + [LibraryImport("jolt", EntryPoint = "RayCastSettings_Destroy")] + public static partial void RayCastSettings_Destroy(RayCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_SetBackFaceMode")] + public static partial void RayCastSettings_SetBackFaceMode(RayCastSettings self, BackFaceMode mode); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_GetBackFaceModeTriangles")] + [SuppressGCTransition] + public static partial BackFaceMode RayCastSettings_GetBackFaceModeTriangles(RayCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_SetBackFaceModeTriangles")] + [SuppressGCTransition] + public static partial void RayCastSettings_SetBackFaceModeTriangles( + RayCastSettings self, + BackFaceMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_GetBackFaceModeConvex")] + [SuppressGCTransition] + public static partial BackFaceMode RayCastSettings_GetBackFaceModeConvex(RayCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_SetBackFaceModeConvex")] + [SuppressGCTransition] + public static partial void RayCastSettings_SetBackFaceModeConvex(RayCastSettings self, BackFaceMode value); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_GetTreatConvexAsSolid")] + [SuppressGCTransition] + public static partial Brutal.Bool8 RayCastSettings_GetTreatConvexAsSolid(RayCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "RayCastSettings_SetTreatConvexAsSolid")] + [SuppressGCTransition] + public static partial void RayCastSettings_SetTreatConvexAsSolid(RayCastSettings self, Brutal.Bool8 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RayInvDirection.gen.cs b/Brutal.Jolt/Generated/PInvoke/RayInvDirection.gen.cs new file mode 100644 index 0000000..4b9afc5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RayInvDirection.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_Create")] + public static partial RayInvDirection RayInvDirection_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_Create_2")] + public static partial RayInvDirection RayInvDirection_Create_2(float3 direction); + + [LibraryImport("jolt", EntryPoint = "RayInvDirection_Destroy")] + public static partial void RayInvDirection_Destroy(RayInvDirection self); + + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_Set")] + public static partial void RayInvDirection_Set(RayInvDirection self, float3 direction); + + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_GetInvDirection")] + [SuppressGCTransition] + public static partial float3 RayInvDirection_GetInvDirection(RayInvDirection self); + + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_SetInvDirection")] + [SuppressGCTransition] + public static partial void RayInvDirection_SetInvDirection(RayInvDirection self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_GetIsParallel")] + [SuppressGCTransition] + public static partial uint4 RayInvDirection_GetIsParallel(RayInvDirection self); + + /// + [LibraryImport("jolt", EntryPoint = "RayInvDirection_SetIsParallel")] + [SuppressGCTransition] + public static partial void RayInvDirection_SetIsParallel(RayInvDirection self, uint4 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ReversedShapeFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/ReversedShapeFilter.gen.cs new file mode 100644 index 0000000..7efc2ff --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ReversedShapeFilter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ReversedShapeFilter_Create")] + public static partial ReversedShapeFilter ReversedShapeFilter_Create(ShapeFilter filter); + + [LibraryImport("jolt", EntryPoint = "ReversedShapeFilter_Destroy")] + public static partial void ReversedShapeFilter_Destroy(ReversedShapeFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShape.gen.cs new file mode 100644 index 0000000..cdd1602 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShape.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_Create")] + public static partial RotatedTranslatedShape RotatedTranslatedShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_Create_2")] + public static partial RotatedTranslatedShape RotatedTranslatedShape_Create_2( + RotatedTranslatedShapeSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_Create_3")] + public static partial RotatedTranslatedShape RotatedTranslatedShape_Create_3( + float3 position, + floatQuat rotation, + Shape shape + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_GetRotation")] + public static partial floatQuat RotatedTranslatedShape_GetRotation(RotatedTranslatedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_GetPosition")] + public static partial float3 RotatedTranslatedShape_GetPosition(RotatedTranslatedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_TransformScale")] + public static partial float3 RotatedTranslatedShape_TransformScale( + RotatedTranslatedShape self, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShape_Register")] + public static partial void RotatedTranslatedShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShapeSettings.gen.cs new file mode 100644 index 0000000..b88ad84 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RotatedTranslatedShapeSettings.gen.cs @@ -0,0 +1,65 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_Create")] + public static partial RotatedTranslatedShapeSettings RotatedTranslatedShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_Create_2")] + public static partial RotatedTranslatedShapeSettings RotatedTranslatedShapeSettings_Create_2( + float3 position, + floatQuat rotation, + ShapeSettings shape + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_Create_3")] + public static partial RotatedTranslatedShapeSettings RotatedTranslatedShapeSettings_Create_3( + float3 position, + floatQuat rotation, + Shape shape + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_GetPosition")] + [SuppressGCTransition] + public static partial float3 RotatedTranslatedShapeSettings_GetPosition( + RotatedTranslatedShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_SetPosition")] + [SuppressGCTransition] + public static partial void RotatedTranslatedShapeSettings_SetPosition( + RotatedTranslatedShapeSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_GetRotation")] + [SuppressGCTransition] + public static partial floatQuat RotatedTranslatedShapeSettings_GetRotation( + RotatedTranslatedShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotatedTranslatedShapeSettings_SetRotation")] + [SuppressGCTransition] + public static partial void RotatedTranslatedShapeSettings_SetRotation( + RotatedTranslatedShapeSettings self, + floatQuat value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RotationEulerConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/RotationEulerConstraintPart.gen.cs new file mode 100644 index 0000000..8c550ec --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RotationEulerConstraintPart.gen.cs @@ -0,0 +1,95 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_Create")] + public static partial RotationEulerConstraintPart RotationEulerConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_Destroy")] + public static partial void RotationEulerConstraintPart_Destroy(RotationEulerConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_GetInvInitialOrientation")] + public static partial floatQuat RotationEulerConstraintPart_GetInvInitialOrientation( + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_GetInvInitialOrientationXY")] + public static partial floatQuat RotationEulerConstraintPart_GetInvInitialOrientationXY( + float3 axisX1, + float3 axisY1, + float3 axisX2, + float3 axisY2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_GetInvInitialOrientationXZ")] + public static partial floatQuat RotationEulerConstraintPart_GetInvInitialOrientationXZ( + float3 axisX1, + float3 axisZ1, + float3 axisX2, + float3 axisZ2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_CalculateConstraintProperties")] + public static partial void RotationEulerConstraintPart_CalculateConstraintProperties( + RotationEulerConstraintPart self, + Body body1, + in float4x4 rotation1, + Body body2, + in float4x4 rotation2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_Deactivate")] + public static partial void RotationEulerConstraintPart_Deactivate(RotationEulerConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_IsActive")] + public static partial Brutal.Bool8 RotationEulerConstraintPart_IsActive(RotationEulerConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_WarmStart")] + public static partial void RotationEulerConstraintPart_WarmStart( + RotationEulerConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 RotationEulerConstraintPart_SolveVelocityConstraint( + RotationEulerConstraintPart self, + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 RotationEulerConstraintPart_SolvePositionConstraint( + RotationEulerConstraintPart self, + Body body1, + Body body2, + floatQuat invInitialOrientation, + float baumgarte + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationEulerConstraintPart_GetTotalLambda")] + public static partial float3 RotationEulerConstraintPart_GetTotalLambda(RotationEulerConstraintPart self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/RotationQuatConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/RotationQuatConstraintPart.gen.cs new file mode 100644 index 0000000..a5d5579 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/RotationQuatConstraintPart.gen.cs @@ -0,0 +1,75 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_Create")] + public static partial RotationQuatConstraintPart RotationQuatConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_Destroy")] + public static partial void RotationQuatConstraintPart_Destroy(RotationQuatConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_GetInvInitialOrientation")] + public static partial floatQuat RotationQuatConstraintPart_GetInvInitialOrientation(Body body1, Body body2); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_CalculateConstraintProperties")] + public static partial void RotationQuatConstraintPart_CalculateConstraintProperties( + RotationQuatConstraintPart self, + Body body1, + in float4x4 rotation1, + Body body2, + in float4x4 rotation2, + floatQuat invInitialOrientation + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_Deactivate")] + public static partial void RotationQuatConstraintPart_Deactivate(RotationQuatConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_IsActive")] + public static partial Brutal.Bool8 RotationQuatConstraintPart_IsActive(RotationQuatConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_WarmStart")] + public static partial void RotationQuatConstraintPart_WarmStart( + RotationQuatConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 RotationQuatConstraintPart_SolveVelocityConstraint( + RotationQuatConstraintPart self, + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 RotationQuatConstraintPart_SolvePositionConstraint( + RotationQuatConstraintPart self, + Body body1, + Body body2, + floatQuat invInitialOrientation, + float baumgarte + ); + + /// + [LibraryImport("jolt", EntryPoint = "RotationQuatConstraintPart_GetTotalLambda")] + public static partial float3 RotationQuatConstraintPart_GetTotalLambda(RotationQuatConstraintPart self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ScaledShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/ScaledShape.gen.cs new file mode 100644 index 0000000..00f8a98 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ScaledShape.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ScaledShape_Create")] + public static partial ScaledShape ScaledShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShape_Create_2")] + public static partial ScaledShape ScaledShape_Create_2(ScaledShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShape_Create_3")] + public static partial ScaledShape ScaledShape_Create_3(Shape shape, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShape_GetScale")] + public static partial float3 ScaledShape_GetScale(ScaledShape self); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShape_Register")] + public static partial void ScaledShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ScaledShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ScaledShapeSettings.gen.cs new file mode 100644 index 0000000..d8abf61 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ScaledShapeSettings.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ScaledShapeSettings_Create")] + public static partial ScaledShapeSettings ScaledShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShapeSettings_Create_2")] + public static partial ScaledShapeSettings ScaledShapeSettings_Create_2(ShapeSettings shape, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShapeSettings_Create_3")] + public static partial ScaledShapeSettings ScaledShapeSettings_Create_3(Shape shape, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShapeSettings_GetScale")] + [SuppressGCTransition] + public static partial float3 ScaledShapeSettings_GetScale(ScaledShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ScaledShapeSettings_SetScale")] + [SuppressGCTransition] + public static partial void ScaledShapeSettings_SetScale(ScaledShapeSettings self, float3 value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Semaphore.gen.cs b/Brutal.Jolt/Generated/PInvoke/Semaphore.gen.cs new file mode 100644 index 0000000..a5728b7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Semaphore.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Semaphore_Create")] + public static partial Semaphore Semaphore_Create(); + + [LibraryImport("jolt", EntryPoint = "Semaphore_Destroy")] + public static partial void Semaphore_Destroy(Semaphore self); + + /// + [LibraryImport("jolt", EntryPoint = "Semaphore_Release")] + public static partial void Semaphore_Release(Semaphore self, uint number); + + /// + [LibraryImport("jolt", EntryPoint = "Semaphore_Acquire")] + public static partial void Semaphore_Acquire(Semaphore self, uint number); + + /// + [LibraryImport("jolt", EntryPoint = "Semaphore_GetValue")] + public static partial int Semaphore_GetValue(Semaphore self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Shape.gen.cs b/Brutal.Jolt/Generated/PInvoke/Shape.gen.cs new file mode 100644 index 0000000..6a3d386 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Shape.gen.cs @@ -0,0 +1,530 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetShapeType")] + public static partial ShapeType Shape_GetShapeType(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSubType")] + public static partial ShapeSubType Shape_GetSubType(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetUserData")] + public static partial ulong Shape_GetUserData(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_SetUserData")] + public static partial void Shape_SetUserData(Shape self, ulong userData); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_MustBeStatic")] + public static partial Brutal.Bool8 Shape_MustBeStatic(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetCenterOfMass")] + public static partial float3 Shape_GetCenterOfMass(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetLocalBounds")] + public static partial AABox Shape_GetLocalBounds(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSubShapeIDBitsRecursive")] + public static partial uint Shape_GetSubShapeIDBitsRecursive(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetWorldSpaceBounds")] + public static partial AABox Shape_GetWorldSpaceBounds( + Shape self, + in float4x4 centerOfMassTransform, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetWorldSpaceBounds_2")] + public static partial AABox Shape_GetWorldSpaceBounds_2( + Shape self, + in double4x4 centerOfMassTransform, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetInnerRadius")] + public static partial float Shape_GetInnerRadius(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetMassProperties")] + public static partial MassProperties Shape_GetMassProperties(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetLeafShape")] + public static partial Shape Shape_GetLeafShape(Shape self, uint subShapeID, out uint remainder); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetMaterial")] + public static partial PhysicsMaterial Shape_GetMaterial(Shape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSurfaceNormal")] + public static partial float3 Shape_GetSurfaceNormal( + Shape self, + uint subShapeID, + float3 localSurfacePosition + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSupportingFace")] + public static partial void Shape_GetSupportingFace( + Shape self, + uint subShapeID, + float3 direction, + float3 scale, + in float4x4 centerOfMassTransform, + out StaticArrayVec3_32 vertices + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSubShapeUserData")] + public static partial ulong Shape_GetSubShapeUserData(Shape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSubShapeTransformedShape")] + public static partial TransformedShape Shape_GetSubShapeTransformedShape( + Shape self, + uint subShapeID, + float3 positionCOM, + floatQuat rotation, + float3 scale, + out uint remainder + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetSubmergedVolume")] + public static partial void Shape_GetSubmergedVolume( + Shape self, + in float4x4 centerOfMassTransform, + float3 scale, + in Plane surface, + out float totalVolume, + out float submergedVolume, + out float3 centerOfBuoyancy, + float3 baseOffset + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_Draw")] + public static partial void Shape_Draw( + Shape self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + Brutal.Bool8 useMaterialColors, + Brutal.Bool8 drawWireframe + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_DrawGetSupportFunction")] + public static partial void Shape_DrawGetSupportFunction( + Shape self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale, + uint color, + Brutal.Bool8 drawSupportDirection + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_DrawGetSupportingFace")] + public static partial void Shape_DrawGetSupportingFace( + Shape self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_CastRay")] + public static partial Brutal.Bool8 Shape_CastRay( + Shape self, + in RayCast ray, + SubShapeIDCreator subShapeIDCreator, + ref RayCastResult hit + ); + + /// + /// + /// Cast a ray against this shape. Allows returning multiple hits through ioCollector. Note that this + /// version is more flexible but also slightly slower than the CastRay function that returns only a + /// single hit. If you want the surface normal of the hit use GetSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected faction)). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:314 + ///
+ /// virtual void CastRay(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "Shape_CastRay_2")] + public static partial uint Shape_CastRay_2( + Shape self, + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + RayCastResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a ray against this shape. Allows returning multiple hits through ioCollector. Note that this + /// version is more flexible but also slightly slower than the CastRay function that returns only a + /// single hit. If you want the surface normal of the hit use GetSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected faction)). + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:314 + ///
+ /// virtual void CastRay(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "Shape_CastRayClosest")] + public static partial uint Shape_CastRayClosest( + Shape self, + in RayCast ray, + RayCastSettings rayCastSettings, + SubShapeIDCreator subShapeIDCreator, + out RayCastResult result, + ShapeFilter shapeFilter + ); + + /// + /// + /// Check if inPoint is inside this shape. For this tests all shapes are treated as if they were solid. + /// Note that inPoint should be relative to the center of mass of this shape (i.e. subtract + /// Shape::GetCenterOfMass() from inPoint if you want to test against the shape in the space it was + /// created). For a mesh shape, this test will only provide sensible information if the mesh is a closed + /// manifold. For each shape that collides, ioCollector will receive a hit. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:320 + ///
+ /// virtual void CollidePoint(Vec3Arg inPoint, const SubShapeIDCreator &inSubShapeIDCreator, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const = 0 + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "Shape_CollidePoint")] + public static partial uint Shape_CollidePoint( + Shape self, + float3 point, + SubShapeIDCreator subShapeIDCreator, + CollidePointResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_CollideSoftBodyVertices")] + public static partial void Shape_CollideSoftBodyVertices( + Shape self, + in float4x4 centerOfMassTransform, + float3 scale, + CollideSoftBodyVertexIterator vertices, + uint numVertices, + int collidingShapeIndex + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_CollectTransformedShapes")] + public static partial nint Shape_CollectTransformedShapes( + Shape self, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale, + SubShapeIDCreator subShapeIDCreator, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_TransformShape")] + public static partial nint Shape_TransformShape(Shape self, in float4x4 centerOfMassTransform); + + /// + /// + /// Scale this shape. Note that not all shapes support all scales, this will return a shape that matches + /// the scale as accurately as possible. See Shape::IsValidScale for more information. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:344 + ///
+ /// ShapeResult ScaleShape(Vec3Arg inScale) const + ///
+ ///
+ /// + /// + /// Scale this shape. Note that not all shapes support all scales, this will return a shape that matches the scale as accurately as possible. See Shape::IsValidScale for more information. + /// @param inScale The scale to use for this shape (note: this scale is applied to the entire shape in the space it was created, most other functions apply the scale in the space of the leaf shapes and from the center of mass!) + /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "Shape_ScaleShape")] + public static partial Shape Shape_ScaleShape(Shape self, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetTrianglesStart")] + public static partial void Shape_GetTrianglesStart( + Shape self, + ref Shape.GetTrianglesContext context, + in AABox box, + float3 positionCOM, + floatQuat rotation, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetTrianglesNext")] + public static partial int Shape_GetTrianglesNext( + Shape self, + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + float3* triangleVertices, + PhysicsMaterial* materials + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_SaveBinaryState")] + public static partial void Shape_SaveBinaryState(Shape self, StreamOut stream); + + /// + /// + /// Creates a Shape of the correct type and restores its contents from the binary stream inStream. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:378 + ///
+ /// static ShapeResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "Shape_RestoreFromBinaryState")] + public static partial Shape Shape_RestoreFromBinaryState(StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_SaveMaterialState")] + public static partial void Shape_SaveMaterialState(Shape self, out nint materials); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_RestoreMaterialState")] + public static partial void Shape_RestoreMaterialState( + Shape self, + PhysicsMaterial* materials, + uint numMaterials + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_SaveSubShapeState")] + public static partial void Shape_SaveSubShapeState(Shape self, out nint subShapes); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_RestoreSubShapeState")] + public static partial void Shape_RestoreSubShapeState(Shape self, Shape* subShapes, uint numShapes); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_SaveWithChildren")] + public static partial void Shape_SaveWithChildren( + Shape self, + StreamOut stream, + ShapeToIDMap shapeMap, + MaterialToIDMap materialMap + ); + + /// + /// + /// Restore a shape, all its children and materials. Pass in an empty map in ioShapeMap / ioMaterialMap + /// or reuse the same map while reading multiple shapes from the same stream in order to restore + /// duplicates. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:401 + ///
+ /// static ShapeResult sRestoreWithChildren(StreamIn &inStream, IDToShapeMap &ioShapeMap, IDToMaterialMap &ioMaterialMap) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "Shape_RestoreWithChildren")] + public static partial Shape Shape_RestoreWithChildren( + StreamIn stream, + IDToShapeMap shapeMap, + IDToMaterialMap materialMap + ); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetStats")] + public static partial void Shape_GetStats(Shape self, out Shape.Stats outResult); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetVolume")] + public static partial float Shape_GetVolume(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_IsValidScale")] + public static partial Brutal.Bool8 Shape_IsValidScale(Shape self, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_MakeScaleValid")] + public static partial float3 Shape_MakeScaleValid(Shape self, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsConvexShape")] + public static partial ConvexShape Shape_AsConvexShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsCompoundShape")] + public static partial CompoundShape Shape_AsCompoundShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsDecoratedShape")] + public static partial DecoratedShape Shape_AsDecoratedShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsSphereShape")] + public static partial SphereShape Shape_AsSphereShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsBoxShape")] + public static partial BoxShape Shape_AsBoxShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsTriangleShape")] + public static partial TriangleShape Shape_AsTriangleShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsCapsuleShape")] + public static partial CapsuleShape Shape_AsCapsuleShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsTaperedCapsuleShape")] + public static partial TaperedCapsuleShape Shape_AsTaperedCapsuleShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsCylinderShape")] + public static partial CylinderShape Shape_AsCylinderShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsTaperedCylinderShape")] + public static partial TaperedCylinderShape Shape_AsTaperedCylinderShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsConvexHullShape")] + public static partial ConvexHullShape Shape_AsConvexHullShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsStaticCompoundShape")] + public static partial StaticCompoundShape Shape_AsStaticCompoundShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsMutableCompoundShape")] + public static partial MutableCompoundShape Shape_AsMutableCompoundShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsRotatedTranslatedShape")] + public static partial RotatedTranslatedShape Shape_AsRotatedTranslatedShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsScaledShape")] + public static partial ScaledShape Shape_AsScaledShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsOffsetCenterOfMassShape")] + public static partial OffsetCenterOfMassShape Shape_AsOffsetCenterOfMassShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsMeshShape")] + public static partial MeshShape Shape_AsMeshShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsHeightFieldShape")] + public static partial HeightFieldShape Shape_AsHeightFieldShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsSoftBodyShape")] + public static partial SoftBodyShape Shape_AsSoftBodyShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsPlaneShape")] + public static partial PlaneShape Shape_AsPlaneShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_AsEmptyShape")] + public static partial EmptyShape Shape_AsEmptyShape(Shape self); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetGetTrianglesMinTrianglesRequested")] + public static partial int Shape_GetGetTrianglesMinTrianglesRequested(); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_GetDrawSubmergedVolumes")] + public static partial Brutal.Bool8 Shape_GetDrawSubmergedVolumes(); + + /// + [LibraryImport("jolt", EntryPoint = "Shape_SetDrawSubmergedVolumes")] + public static partial void Shape_SetDrawSubmergedVolumes(Brutal.Bool8 value); + + [LibraryImport("jolt", EntryPoint = "Shape_AddRef")] + public static partial void Shape_AddRef(Shape self); + + [LibraryImport("jolt", EntryPoint = "Shape_Release")] + public static partial void Shape_Release(Shape self); + + [LibraryImport("jolt", EntryPoint = "Shape_GetRefCount")] + public static partial uint Shape_GetRefCount(Shape self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ShapeCastResult.gen.cs b/Brutal.Jolt/Generated/PInvoke/ShapeCastResult.gen.cs new file mode 100644 index 0000000..17924be --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ShapeCastResult.gen.cs @@ -0,0 +1,71 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastResult_Create")] + public static partial ShapeCastResult ShapeCastResult_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastResult_Create_2")] + public static partial ShapeCastResult ShapeCastResult_Create_2( + float fraction, + float3 contactPoint1, + float3 contactPoint2, + float3 contactNormalOrPenetrationDepth, + Brutal.Bool8 backFaceHit, + uint subShapeID1, + uint subShapeID2, + uint bodyID2 + ); + + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. + /// For rays/cast shapes we can just use the collision fraction. The fraction and penetration depth are + /// combined in such a way that deeper hits at fraction 0 go first. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:141 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "ShapeCastResult_GetEarlyOutFraction")] + public static partial float ShapeCastResult_GetEarlyOutFraction(ref ShapeCastResult self); + + /// + /// + /// Reverses the hit result, swapping contact point 1 with contact point 2 etc. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:145 + ///
+ /// ShapeCastResult Reversed(Vec3Arg inWorldSpaceCastDirection) const + ///
+ ///
+ /// + /// + /// Reverses the hit result, swapping contact point 1 with contact point 2 etc. + /// @param inWorldSpaceCastDirection Direction of the shape cast in world space + /// + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastResult_Reversed")] + public static partial ShapeCastResult ShapeCastResult_Reversed( + ref ShapeCastResult self, + float3 worldSpaceCastDirection + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ShapeCastSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ShapeCastSettings.gen.cs new file mode 100644 index 0000000..a7f8729 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ShapeCastSettings.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_Create")] + public static partial ShapeCastSettings ShapeCastSettings_Create(); + + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_Destroy")] + public static partial void ShapeCastSettings_Destroy(ShapeCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_SetBackFaceMode")] + public static partial void ShapeCastSettings_SetBackFaceMode(ShapeCastSettings self, BackFaceMode mode); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_GetExtraConvexRadius")] + [SuppressGCTransition] + public static partial float ShapeCastSettings_GetExtraConvexRadius(ShapeCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_SetExtraConvexRadius")] + [SuppressGCTransition] + public static partial void ShapeCastSettings_SetExtraConvexRadius(ShapeCastSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_GetBackFaceModeTriangles")] + [SuppressGCTransition] + public static partial BackFaceMode ShapeCastSettings_GetBackFaceModeTriangles(ShapeCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_SetBackFaceModeTriangles")] + [SuppressGCTransition] + public static partial void ShapeCastSettings_SetBackFaceModeTriangles( + ShapeCastSettings self, + BackFaceMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_GetBackFaceModeConvex")] + [SuppressGCTransition] + public static partial BackFaceMode ShapeCastSettings_GetBackFaceModeConvex(ShapeCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_SetBackFaceModeConvex")] + [SuppressGCTransition] + public static partial void ShapeCastSettings_SetBackFaceModeConvex( + ShapeCastSettings self, + BackFaceMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_GetUseShrunkenShapeAndConvexRadius")] + [SuppressGCTransition] + public static partial Brutal.Bool8 ShapeCastSettings_GetUseShrunkenShapeAndConvexRadius( + ShapeCastSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_SetUseShrunkenShapeAndConvexRadius")] + [SuppressGCTransition] + public static partial void ShapeCastSettings_SetUseShrunkenShapeAndConvexRadius( + ShapeCastSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_GetReturnDeepestPoint")] + [SuppressGCTransition] + public static partial Brutal.Bool8 ShapeCastSettings_GetReturnDeepestPoint(ShapeCastSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeCastSettings_SetReturnDeepestPoint")] + [SuppressGCTransition] + public static partial void ShapeCastSettings_SetReturnDeepestPoint( + ShapeCastSettings self, + Brutal.Bool8 value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ShapeFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/ShapeFilter.gen.cs new file mode 100644 index 0000000..5aea030 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ShapeFilter.gen.cs @@ -0,0 +1,69 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ShapeFilter_Create")] + public static partial ShapeFilter ShapeFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "ShapeFilter_Destroy")] + public static partial void ShapeFilter_Destroy(ShapeFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeFilter_ShouldCollide")] + public static partial Brutal.Bool8 ShapeFilter_ShouldCollide( + ShapeFilter self, + Shape shape2, + uint subShapeIDOfShape2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeFilter_ShouldCollide_2")] + public static partial Brutal.Bool8 ShapeFilter_ShouldCollide_2( + ShapeFilter self, + Shape shape1, + uint subShapeIDOfShape1, + Shape shape2, + uint subShapeIDOfShape2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeFilter_GetBodyID2")] + [SuppressGCTransition] + public static partial uint ShapeFilter_GetBodyID2(ShapeFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeFilter_SetBodyID2")] + public static partial void ShapeFilter_SetBodyID2(ShapeFilter self, uint value); + + [LibraryImport("jolt", EntryPoint = "ShapeFilter_CreateProxy")] + public static partial nint ShapeFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "ShapeFilter_DestroyProxy")] + public static partial void ShapeFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "ShapeFilter_ProxyGetBase")] + public static partial ShapeFilter ShapeFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "ShapeFilter_ProxySetShouldCollide")] + public static partial void ShapeFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "ShapeFilter_ProxySetShouldCollide2")] + public static partial void ShapeFilter_ProxySetShouldCollide2( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ShapeFunctions.gen.cs b/Brutal.Jolt/Generated/PInvoke/ShapeFunctions.gen.cs new file mode 100644 index 0000000..a365fec --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ShapeFunctions.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "ShapeFunctions_Create")] + public static partial ShapeFunctions ShapeFunctions_Create(); + + [LibraryImport("jolt", EntryPoint = "ShapeFunctions_Destroy")] + public static partial void ShapeFunctions_Destroy(ShapeFunctions self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeFunctions_Get")] + public static partial ShapeFunctions ShapeFunctions_Get(ShapeSubType subType); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeFunctions_GetColor")] + public static partial uint ShapeFunctions_GetColor(ShapeFunctions self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/ShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/ShapeSettings.gen.cs new file mode 100644 index 0000000..eae5616 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/ShapeSettings.gen.cs @@ -0,0 +1,65 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "ShapeSettings_GetRTTI")] + public static partial RTTI ShapeSettings_GetRTTI(ShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeSettings_CastTo")] + public static partial void* ShapeSettings_CastTo(ShapeSettings self, RTTI rtti); + + /// + /// + /// Create a shape according to the settings specified by this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/Shape.h:153 + ///
+ /// virtual ShapeResult Create() const = 0 + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "ShapeSettings_CreateShape")] + public static partial Shape ShapeSettings_CreateShape(ShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeSettings_ClearCachedResult")] + public static partial void ShapeSettings_ClearCachedResult(ShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeSettings_GetUserData")] + [SuppressGCTransition] + public static partial ulong ShapeSettings_GetUserData(ShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "ShapeSettings_SetUserData")] + [SuppressGCTransition] + public static partial void ShapeSettings_SetUserData(ShapeSettings self, ulong value); + + [LibraryImport("jolt", EntryPoint = "ShapeSettings_AddRef")] + public static partial void ShapeSettings_AddRef(ShapeSettings self); + + [LibraryImport("jolt", EntryPoint = "ShapeSettings_Release")] + public static partial void ShapeSettings_Release(ShapeSettings self); + + [LibraryImport("jolt", EntryPoint = "ShapeSettings_GetRefCount")] + public static partial uint ShapeSettings_GetRefCount(ShapeSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SimShapeFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/SimShapeFilter.gen.cs new file mode 100644 index 0000000..8e72b11 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SimShapeFilter.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_Create")] + public static partial SimShapeFilter SimShapeFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_Destroy")] + public static partial void SimShapeFilter_Destroy(SimShapeFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_ShouldCollide")] + public static partial Brutal.Bool8 SimShapeFilter_ShouldCollide( + SimShapeFilter self, + Body body1, + Shape shape1, + uint subShapeIDOfShape1, + Body body2, + Shape shape2, + uint subShapeIDOfShape2 + ); + + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_CreateProxy")] + public static partial nint SimShapeFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_DestroyProxy")] + public static partial void SimShapeFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_ProxyGetBase")] + public static partial SimShapeFilter SimShapeFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "SimShapeFilter_ProxySetShouldCollide")] + public static partial void SimShapeFilter_ProxySetShouldCollide( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SimShapeFilterWrapper.gen.cs b/Brutal.Jolt/Generated/PInvoke/SimShapeFilterWrapper.gen.cs new file mode 100644 index 0000000..7eb3bd1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SimShapeFilterWrapper.gen.cs @@ -0,0 +1,48 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SimShapeFilterWrapper_Create")] + public static partial SimShapeFilterWrapper SimShapeFilterWrapper_Create(SimShapeFilter filter, Body body1); + + [LibraryImport("jolt", EntryPoint = "SimShapeFilterWrapper_Destroy")] + public static partial void SimShapeFilterWrapper_Destroy(SimShapeFilterWrapper self); + + /// + [LibraryImport("jolt", EntryPoint = "SimShapeFilterWrapper_ShouldCollide")] + public static partial Brutal.Bool8 SimShapeFilterWrapper_ShouldCollide( + SimShapeFilterWrapper self, + Shape shape1, + uint subShapeIDOfShape1, + Shape shape2, + uint subShapeIDOfShape2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "SimShapeFilterWrapper_ShouldCollide_2")] + public static partial Brutal.Bool8 SimShapeFilterWrapper_ShouldCollide_2( + SimShapeFilterWrapper self, + Shape shape2, + uint subShapeIDOfShape2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "SimShapeFilterWrapper_SetBody2")] + public static partial void SimShapeFilterWrapper_SetBody2(SimShapeFilterWrapper self, Body body2); + + /// + [LibraryImport("jolt", EntryPoint = "SimShapeFilterWrapper_GetFilter")] + public static partial ShapeFilter SimShapeFilterWrapper_GetFilter(SimShapeFilterWrapper self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SixDOFConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/SixDOFConstraint.gen.cs new file mode 100644 index 0000000..d7e5435 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SixDOFConstraint.gen.cs @@ -0,0 +1,211 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_Create")] + public static partial SixDOFConstraint SixDOFConstraint_Create( + Body body1, + Body body2, + SixDOFConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetTranslationLimits")] + public static partial void SixDOFConstraint_SetTranslationLimits( + SixDOFConstraint self, + float3 limitMin, + float3 limitMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetRotationLimits")] + public static partial void SixDOFConstraint_SetRotationLimits( + SixDOFConstraint self, + float3 limitMin, + float3 limitMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetLimitsMin")] + public static partial float SixDOFConstraint_GetLimitsMin( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetLimitsMax")] + public static partial float SixDOFConstraint_GetLimitsMax( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTranslationLimitsMin")] + public static partial float3 SixDOFConstraint_GetTranslationLimitsMin(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTranslationLimitsMax")] + public static partial float3 SixDOFConstraint_GetTranslationLimitsMax(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetRotationLimitsMin")] + public static partial float3 SixDOFConstraint_GetRotationLimitsMin(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetRotationLimitsMax")] + public static partial float3 SixDOFConstraint_GetRotationLimitsMax(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_IsFixedAxis")] + public static partial Brutal.Bool8 SixDOFConstraint_IsFixedAxis( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_IsFreeAxis")] + public static partial Brutal.Bool8 SixDOFConstraint_IsFreeAxis( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetLimitsSpringSettings")] + public static partial SpringSettings SixDOFConstraint_GetLimitsSpringSettings( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetLimitsSpringSettings")] + public static partial void SixDOFConstraint_SetLimitsSpringSettings( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + SpringSettings limitsSpringSettings, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetMaxFriction")] + public static partial void SixDOFConstraint_SetMaxFriction( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + float friction, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetMaxFriction")] + public static partial float SixDOFConstraint_GetMaxFriction( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetRotationInConstraintSpace")] + public static partial floatQuat SixDOFConstraint_GetRotationInConstraintSpace(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetMotorSettings")] + public static partial MotorSettings SixDOFConstraint_GetMotorSettings( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetMotorState")] + public static partial void SixDOFConstraint_SetMotorState( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + MotorState state, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetMotorState")] + public static partial MotorState SixDOFConstraint_GetMotorState( + SixDOFConstraint self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTargetVelocityCS")] + public static partial float3 SixDOFConstraint_GetTargetVelocityCS(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetTargetVelocityCS")] + public static partial void SixDOFConstraint_SetTargetVelocityCS(SixDOFConstraint self, float3 velocity); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetTargetAngularVelocityCS")] + public static partial void SixDOFConstraint_SetTargetAngularVelocityCS( + SixDOFConstraint self, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTargetAngularVelocityCS")] + public static partial float3 SixDOFConstraint_GetTargetAngularVelocityCS(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTargetPositionCS")] + public static partial float3 SixDOFConstraint_GetTargetPositionCS(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetTargetPositionCS")] + public static partial void SixDOFConstraint_SetTargetPositionCS(SixDOFConstraint self, float3 position); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetTargetOrientationCS")] + public static partial void SixDOFConstraint_SetTargetOrientationCS( + SixDOFConstraint self, + floatQuat orientation + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTargetOrientationCS")] + public static partial floatQuat SixDOFConstraint_GetTargetOrientationCS(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_SetTargetOrientationBS")] + public static partial void SixDOFConstraint_SetTargetOrientationBS( + SixDOFConstraint self, + floatQuat orientation + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTotalLambdaPosition")] + public static partial float3 SixDOFConstraint_GetTotalLambdaPosition(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTotalLambdaRotation")] + public static partial float3 SixDOFConstraint_GetTotalLambdaRotation(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTotalLambdaMotorTranslation")] + public static partial float3 SixDOFConstraint_GetTotalLambdaMotorTranslation(SixDOFConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraint_GetTotalLambdaMotorRotation")] + public static partial float3 SixDOFConstraint_GetTotalLambdaMotorRotation(SixDOFConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SixDOFConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SixDOFConstraintSettings.gen.cs new file mode 100644 index 0000000..a019304 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SixDOFConstraintSettings.gen.cs @@ -0,0 +1,166 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_Create")] + public static partial SixDOFConstraintSettings SixDOFConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_MakeFreeAxis")] + public static partial void SixDOFConstraintSettings_MakeFreeAxis( + SixDOFConstraintSettings self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_IsFreeAxis")] + public static partial Brutal.Bool8 SixDOFConstraintSettings_IsFreeAxis( + SixDOFConstraintSettings self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_MakeFixedAxis")] + public static partial void SixDOFConstraintSettings_MakeFixedAxis( + SixDOFConstraintSettings self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_IsFixedAxis")] + public static partial Brutal.Bool8 SixDOFConstraintSettings_IsFixedAxis( + SixDOFConstraintSettings self, + SixDOFConstraintSettings.Axis axis, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetLimitedAxis")] + public static partial void SixDOFConstraintSettings_SetLimitedAxis( + SixDOFConstraintSettings self, + SixDOFConstraintSettings.Axis axis, + float min, + float max, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace SixDOFConstraintSettings_GetSpace(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetSpace( + SixDOFConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetPosition1")] + [SuppressGCTransition] + public static partial float3 SixDOFConstraintSettings_GetPosition1(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetPosition1")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetPosition1( + SixDOFConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetAxisX1")] + [SuppressGCTransition] + public static partial float3 SixDOFConstraintSettings_GetAxisX1(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetAxisX1")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetAxisX1(SixDOFConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetAxisY1")] + [SuppressGCTransition] + public static partial float3 SixDOFConstraintSettings_GetAxisY1(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetAxisY1")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetAxisY1(SixDOFConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetPosition2")] + [SuppressGCTransition] + public static partial float3 SixDOFConstraintSettings_GetPosition2(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetPosition2")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetPosition2( + SixDOFConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetAxisX2")] + [SuppressGCTransition] + public static partial float3 SixDOFConstraintSettings_GetAxisX2(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetAxisX2")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetAxisX2(SixDOFConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetAxisY2")] + [SuppressGCTransition] + public static partial float3 SixDOFConstraintSettings_GetAxisY2(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetAxisY2")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetAxisY2(SixDOFConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetSwingType")] + [SuppressGCTransition] + public static partial SwingType SixDOFConstraintSettings_GetSwingType(SixDOFConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_SetSwingType")] + [SuppressGCTransition] + public static partial void SixDOFConstraintSettings_SetSwingType( + SixDOFConstraintSettings self, + SwingType value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetLimitsSpringSettings")] + public static partial SpringSettings SixDOFConstraintSettings_GetLimitsSpringSettings( + SixDOFConstraintSettings self, + uint index + ); + + /// + [LibraryImport("jolt", EntryPoint = "SixDOFConstraintSettings_GetMotorSettings")] + public static partial MotorSettings SixDOFConstraintSettings_GetMotorSettings( + SixDOFConstraintSettings self, + uint index + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SkeletalAnimation.gen.cs b/Brutal.Jolt/Generated/PInvoke/SkeletalAnimation.gen.cs new file mode 100644 index 0000000..4ca29a2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SkeletalAnimation.gen.cs @@ -0,0 +1,98 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_Create")] + public static partial SkeletalAnimation SkeletalAnimation_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_GetDuration")] + public static partial float SkeletalAnimation_GetDuration(SkeletalAnimation self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_ScaleJoints")] + public static partial void SkeletalAnimation_ScaleJoints(SkeletalAnimation self, float scale); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_SetIsLooping")] + public static partial void SkeletalAnimation_SetIsLooping(SkeletalAnimation self, Brutal.Bool8 isLooping); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_IsLooping")] + public static partial Brutal.Bool8 SkeletalAnimation_IsLooping(SkeletalAnimation self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_Sample")] + public static partial void SkeletalAnimation_Sample(SkeletalAnimation self, float time, SkeletonPose pose); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_SaveBinaryState")] + public static partial void SkeletalAnimation_SaveBinaryState(SkeletalAnimation self, StreamOut stream); + + /// + /// + /// Restore a saved ragdoll from inStream + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletalAnimation.h:85 + ///
+ /// static AnimationResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_RestoreFromBinaryState")] + public static partial SkeletalAnimation SkeletalAnimation_RestoreFromBinaryState(StreamIn stream); + + /// + /// + /// Serialises this object into buffer as a Jolt object stream and returns the total size of that + /// stream; nothing is written past the end of the buffer. Returns 0 when the object can't be written; + /// call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_SaveObjectStream")] + public static partial nuint SkeletalAnimation_SaveObjectStream( + SkeletalAnimation self, + byte* buffer, + nuint bufferCount, + ObjectStreamType streamType + ); + + /// + /// + /// Reads a text or binary object stream and returns a null handle when it can't be read; call + /// Jolt.GetLastError() for Jolt's error message. A truncated stream can still read back as an object + /// with null references. A non-null return carries a reference the caller owns. + /// + /// + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_RestoreFromObjectStream")] + public static partial SkeletalAnimation SkeletalAnimation_RestoreFromObjectStream( + byte* data, + nuint dataCount + ); + + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_AddRef")] + public static partial void SkeletalAnimation_AddRef(SkeletalAnimation self); + + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_Release")] + public static partial void SkeletalAnimation_Release(SkeletalAnimation self); + + [LibraryImport("jolt", EntryPoint = "SkeletalAnimation_GetRefCount")] + public static partial uint SkeletalAnimation_GetRefCount(SkeletalAnimation self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Skeleton.gen.cs b/Brutal.Jolt/Generated/PInvoke/Skeleton.gen.cs new file mode 100644 index 0000000..1fede36 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Skeleton.gen.cs @@ -0,0 +1,104 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "Skeleton_Create")] + public static partial Skeleton Skeleton_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_GetJointCount")] + public static partial int Skeleton_GetJointCount(Skeleton self); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_AddJoint")] + public static partial uint Skeleton_AddJoint(Skeleton self, byte* name, byte* parentName); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_AddJoint_2")] + public static partial uint Skeleton_AddJoint_2( + Skeleton self, + byte* name, + int parentIndex, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_GetJointIndex")] + public static partial int Skeleton_GetJointIndex(Skeleton self, byte* name); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_CalculateParentJointIndices")] + public static partial void Skeleton_CalculateParentJointIndices(Skeleton self); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_AreJointsCorrectlyOrdered")] + public static partial Brutal.Bool8 Skeleton_AreJointsCorrectlyOrdered(Skeleton self); + + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_SaveBinaryState")] + public static partial void Skeleton_SaveBinaryState(Skeleton self, StreamOut stream); + + /// + /// + /// Restore the state of this object from inStream. + /// + /// + /// C++: + /// Jolt/Skeleton/Skeleton.h:65 + ///
+ /// static SkeletonResult sRestoreFromBinaryState(StreamIn &inStream) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_RestoreFromBinaryState")] + public static partial Skeleton Skeleton_RestoreFromBinaryState(StreamIn stream); + + /// + /// + /// Serialises this object into buffer as a Jolt object stream and returns the total size of that + /// stream; nothing is written past the end of the buffer. Returns 0 when the object can't be written; + /// call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_SaveObjectStream")] + public static partial nuint Skeleton_SaveObjectStream( + Skeleton self, + byte* buffer, + nuint bufferCount, + ObjectStreamType streamType + ); + + /// + /// + /// Reads a text or binary object stream and returns a null handle when it can't be read; call + /// Jolt.GetLastError() for Jolt's error message. A truncated stream can still read back as an object + /// with null references. A non-null return carries a reference the caller owns. + /// + /// + [LibraryImport("jolt", EntryPoint = "Skeleton_RestoreFromObjectStream")] + public static partial Skeleton Skeleton_RestoreFromObjectStream(byte* data, nuint dataCount); + + [LibraryImport("jolt", EntryPoint = "Skeleton_AddRef")] + public static partial void Skeleton_AddRef(Skeleton self); + + [LibraryImport("jolt", EntryPoint = "Skeleton_Release")] + public static partial void Skeleton_Release(Skeleton self); + + [LibraryImport("jolt", EntryPoint = "Skeleton_GetRefCount")] + public static partial uint Skeleton_GetRefCount(Skeleton self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SkeletonMapper.gen.cs b/Brutal.Jolt/Generated/PInvoke/SkeletonMapper.gen.cs new file mode 100644 index 0000000..7582685 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SkeletonMapper.gen.cs @@ -0,0 +1,169 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_Create")] + public static partial SkeletonMapper SkeletonMapper_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_DefaultCanMapJoint")] + public static partial Brutal.Bool8 SkeletonMapper_DefaultCanMapJoint( + Skeleton skeleton1, + int index1, + Skeleton skeleton2, + int index2 + ); + + /// + /// + /// Initialize the skeleton mapper. Skeleton 1 should be the (low detail) ragdoll skeleton and skeleton + /// 2 the (high detail) animation skeleton. We assume that each joint in skeleton 1 can be mapped to a + /// joint in skeleton 2 (if not mapping from animation skeleton to ragdoll skeleton will be undefined). + /// Skeleton 2 should have the same hierarchy as skeleton 1 but can contain extra joints between those + /// in skeleton 1 and it can have extra joints at the root and leaves of the skeleton. + /// + /// + /// C++: + /// Jolt/Skeleton/SkeletonMapper.h:81 + ///
+ /// void Initialize(const Skeleton *inSkeleton1, const Mat44 *inNeutralPose1, const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2, const CanMapJoint &inCanMapJoint = sDefaultCanMapJoint) + ///
+ ///
+ /// + /// + /// Initialize the skeleton mapper. Skeleton 1 should be the (low detail) ragdoll skeleton and skeleton 2 the (high detail) animation skeleton. + /// We assume that each joint in skeleton 1 can be mapped to a joint in skeleton 2 (if not mapping from animation skeleton to ragdoll skeleton will be undefined). + /// Skeleton 2 should have the same hierarchy as skeleton 1 but can contain extra joints between those in skeleton 1 and it can have extra joints at the root and leaves of the skeleton. + /// @param inSkeleton1 Source skeleton to map from. + /// @param inNeutralPose1 Neutral pose of the source skeleton (model space) + /// @param inSkeleton2 Target skeleton to map to. + /// @param inNeutralPose2 Neutral pose of the target skeleton (model space), inNeutralPose1 and inNeutralPose2 must match as closely as possible, preferably the position of the mappable joints should be identical. + /// @param inCanMapJoint Function that checks if joints in skeleton 1 and skeleton 2 are equal. + /// + /// + /// neutralPose1 must hold exactly one element per joint in skeleton 1 - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is + /// only used for the duration of the call. A null skeleton1 throws ArgumentNullException. Throws + /// ArgumentException for skeleton1: "skeleton1 has a joint whose parent index isn't an earlier joint - + /// parents must come first, as Jolt requires." + /// + /// + /// neutralPose2 must hold exactly one element per joint in skeleton 2 - the native count is read from + /// the object itself and a span that doesn't match it throws ArgumentOutOfRangeException. The span is + /// only used for the duration of the call. A null skeleton2 throws ArgumentNullException. Throws + /// ArgumentException for skeleton2: "skeleton2 has a joint whose parent index isn't an earlier joint - + /// parents must come first, as Jolt requires." + /// + /// + /// canMapJoint: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Pass null for Jolt's default (SkeletonMapper::sDefaultCanMapJoint). The callback and + /// userData are used only for the duration of this call; userData may be freed when it returns. + /// + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_Initialize")] + public static partial void SkeletonMapper_Initialize( + SkeletonMapper self, + Skeleton skeleton1, + float4x4* neutralPose1, + uint neutralPose1Count, + Skeleton skeleton2, + float4x4* neutralPose2, + uint neutralPose2Count, + delegate* unmanaged[Cdecl] canMapJoint, + nint canMapJointUserData, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_LockTranslations")] + public static partial void SkeletonMapper_LockTranslations( + SkeletonMapper self, + Skeleton skeleton2, + bool* lockedTranslations, + uint lockedTranslationsCount, + float4x4* neutralPose2, + uint neutralPose2Count, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_LockAllTranslations")] + public static partial void SkeletonMapper_LockAllTranslations( + SkeletonMapper self, + Skeleton skeleton2, + float4x4* neutralPose2, + uint neutralPose2Count, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_Map")] + public static partial void SkeletonMapper_Map( + SkeletonMapper self, + float4x4* pose1ModelSpace, + uint pose1ModelSpaceCount, + float4x4* pose2LocalSpace, + uint pose2LocalSpaceCount, + float4x4* pose2ModelSpace, + uint pose2ModelSpaceCount, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_MapReverse")] + public static partial void SkeletonMapper_MapReverse( + SkeletonMapper self, + float4x4* pose2ModelSpace, + uint pose2ModelSpaceCount, + float4x4* pose1ModelSpace, + uint pose1ModelSpaceCount, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetMappedJointIdx")] + public static partial int SkeletonMapper_GetMappedJointIdx(SkeletonMapper self, int joint1Idx); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_IsJointTranslationLocked")] + public static partial Brutal.Bool8 SkeletonMapper_IsJointTranslationLocked( + SkeletonMapper self, + int joint2Idx + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetMappings")] + public static partial void SkeletonMapper_GetMappings(SkeletonMapper self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetUnmapped")] + public static partial void SkeletonMapper_GetUnmapped(SkeletonMapper self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetLockedTranslations")] + public static partial void SkeletonMapper_GetLockedTranslations( + SkeletonMapper self, + out NativeSpanView outResult + ); + + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_AddRef")] + public static partial void SkeletonMapper_AddRef(SkeletonMapper self); + + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_Release")] + public static partial void SkeletonMapper_Release(SkeletonMapper self); + + [LibraryImport("jolt", EntryPoint = "SkeletonMapper_GetRefCount")] + public static partial uint SkeletonMapper_GetRefCount(SkeletonMapper self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SkeletonPose.gen.cs b/Brutal.Jolt/Generated/PInvoke/SkeletonPose.gen.cs new file mode 100644 index 0000000..0726965 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SkeletonPose.gen.cs @@ -0,0 +1,92 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SkeletonPose_Create")] + public static partial SkeletonPose SkeletonPose_Create(); + + [LibraryImport("jolt", EntryPoint = "SkeletonPose_Destroy")] + public static partial void SkeletonPose_Destroy(SkeletonPose self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_SetSkeleton")] + public static partial void SkeletonPose_SetSkeleton(SkeletonPose self, Skeleton skeleton); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_GetSkeleton")] + public static partial Skeleton SkeletonPose_GetSkeleton(SkeletonPose self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_SetRootOffset")] + public static partial void SkeletonPose_SetRootOffset(SkeletonPose self, float3 offset); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_GetRootOffset")] + public static partial float3 SkeletonPose_GetRootOffset(SkeletonPose self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_GetJointCount")] + public static partial uint SkeletonPose_GetJointCount(SkeletonPose self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_GetJoints")] + public static partial void SkeletonPose_GetJoints(SkeletonPose self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_SetJoint")] + public static partial void SkeletonPose_SetJoint( + SkeletonPose self, + int joint, + in SkeletalAnimation.JointState value, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_GetJointMatrices")] + public static partial void SkeletonPose_GetJointMatrices(SkeletonPose self, out NativeSpanView outResult); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_GetJointMatrix")] + public static partial float4x4 SkeletonPose_GetJointMatrix( + SkeletonPose self, + int joint, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_CalculateJointMatrices")] + public static partial void SkeletonPose_CalculateJointMatrices(SkeletonPose self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_CalculateJointStates")] + public static partial void SkeletonPose_CalculateJointStates(SkeletonPose self); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_CalculateLocalSpaceJointMatrices")] + public static partial void SkeletonPose_CalculateLocalSpaceJointMatrices( + SkeletonPose self, + float4x4* matrices, + uint matricesCount, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SkeletonPose_Draw")] + public static partial void SkeletonPose_Draw( + SkeletonPose self, + in SkeletonPose.DrawSettings drawSettings, + DebugRenderer renderer, + in float4x4 offset + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SliderConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/SliderConstraint.gen.cs new file mode 100644 index 0000000..4064894 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SliderConstraint.gen.cs @@ -0,0 +1,110 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_Create")] + public static partial SliderConstraint SliderConstraint_Create( + Body body1, + Body body2, + SliderConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetCurrentPosition")] + public static partial float SliderConstraint_GetCurrentPosition(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_SetMaxFrictionForce")] + public static partial void SliderConstraint_SetMaxFrictionForce(SliderConstraint self, float frictionForce); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetMaxFrictionForce")] + public static partial float SliderConstraint_GetMaxFrictionForce(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetMotorSettings")] + public static partial MotorSettings SliderConstraint_GetMotorSettings(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_SetMotorState")] + public static partial void SliderConstraint_SetMotorState(SliderConstraint self, MotorState state); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetMotorState")] + public static partial MotorState SliderConstraint_GetMotorState(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_SetTargetVelocity")] + public static partial void SliderConstraint_SetTargetVelocity(SliderConstraint self, float velocity); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetTargetVelocity")] + public static partial float SliderConstraint_GetTargetVelocity(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_SetTargetPosition")] + public static partial void SliderConstraint_SetTargetPosition(SliderConstraint self, float position); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetTargetPosition")] + public static partial float SliderConstraint_GetTargetPosition(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_SetLimits")] + public static partial void SliderConstraint_SetLimits( + SliderConstraint self, + float limitsMin, + float limitsMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetLimitsMin")] + public static partial float SliderConstraint_GetLimitsMin(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetLimitsMax")] + public static partial float SliderConstraint_GetLimitsMax(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_HasLimits")] + public static partial Brutal.Bool8 SliderConstraint_HasLimits(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetLimitsSpringSettings")] + public static partial SpringSettings SliderConstraint_GetLimitsSpringSettings(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_SetLimitsSpringSettings")] + public static partial void SliderConstraint_SetLimitsSpringSettings( + SliderConstraint self, + SpringSettings limitsSpringSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetTotalLambdaPosition")] + public static partial float2 SliderConstraint_GetTotalLambdaPosition(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetTotalLambdaPositionLimits")] + public static partial float SliderConstraint_GetTotalLambdaPositionLimits(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetTotalLambdaRotation")] + public static partial float3 SliderConstraint_GetTotalLambdaRotation(SliderConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraint_GetTotalLambdaMotor")] + public static partial float SliderConstraint_GetTotalLambdaMotor(SliderConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SliderConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SliderConstraintSettings.gen.cs new file mode 100644 index 0000000..5f43ef5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SliderConstraintSettings.gen.cs @@ -0,0 +1,190 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_Create")] + public static partial SliderConstraintSettings SliderConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetSliderAxis")] + public static partial void SliderConstraintSettings_SetSliderAxis( + SliderConstraintSettings self, + float3 sliderAxis + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace SliderConstraintSettings_GetSpace(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetSpace( + SliderConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetAutoDetectPoint")] + [SuppressGCTransition] + public static partial Brutal.Bool8 SliderConstraintSettings_GetAutoDetectPoint( + SliderConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetAutoDetectPoint")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetAutoDetectPoint( + SliderConstraintSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetPoint1")] + [SuppressGCTransition] + public static partial float3 SliderConstraintSettings_GetPoint1(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetPoint1")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetPoint1(SliderConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetSliderAxis1")] + [SuppressGCTransition] + public static partial float3 SliderConstraintSettings_GetSliderAxis1(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetSliderAxis1")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetSliderAxis1( + SliderConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetNormalAxis1")] + [SuppressGCTransition] + public static partial float3 SliderConstraintSettings_GetNormalAxis1(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetNormalAxis1")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetNormalAxis1( + SliderConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetPoint2")] + [SuppressGCTransition] + public static partial float3 SliderConstraintSettings_GetPoint2(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetPoint2")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetPoint2(SliderConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetSliderAxis2")] + [SuppressGCTransition] + public static partial float3 SliderConstraintSettings_GetSliderAxis2(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetSliderAxis2")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetSliderAxis2( + SliderConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetNormalAxis2")] + [SuppressGCTransition] + public static partial float3 SliderConstraintSettings_GetNormalAxis2(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetNormalAxis2")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetNormalAxis2( + SliderConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetLimitsMin")] + [SuppressGCTransition] + public static partial float SliderConstraintSettings_GetLimitsMin(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetLimitsMin")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetLimitsMin( + SliderConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetLimitsMax")] + [SuppressGCTransition] + public static partial float SliderConstraintSettings_GetLimitsMax(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetLimitsMax")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetLimitsMax( + SliderConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetLimitsSpringSettings")] + public static partial SpringSettings SliderConstraintSettings_GetLimitsSpringSettings( + SliderConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetLimitsSpringSettings")] + public static partial void SliderConstraintSettings_SetLimitsSpringSettings( + SliderConstraintSettings self, + SpringSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetMaxFrictionForce")] + [SuppressGCTransition] + public static partial float SliderConstraintSettings_GetMaxFrictionForce(SliderConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetMaxFrictionForce")] + [SuppressGCTransition] + public static partial void SliderConstraintSettings_SetMaxFrictionForce( + SliderConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_GetMotorSettings")] + public static partial MotorSettings SliderConstraintSettings_GetMotorSettings( + SliderConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SliderConstraintSettings_SetMotorSettings")] + public static partial void SliderConstraintSettings_SetMotorSettings( + SliderConstraintSettings self, + MotorSettings value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyContactListener.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyContactListener.gen.cs new file mode 100644 index 0000000..188cbc0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyContactListener.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_Create")] + public static partial SoftBodyContactListener SoftBodyContactListener_Create(); + + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_Destroy")] + public static partial void SoftBodyContactListener_Destroy(SoftBodyContactListener self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_OnSoftBodyContactValidate")] + public static partial SoftBodyValidateResult SoftBodyContactListener_OnSoftBodyContactValidate( + SoftBodyContactListener self, + Body softBody, + Body otherBody, + ref SoftBodyContactSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_OnSoftBodyContactAdded")] + public static partial void SoftBodyContactListener_OnSoftBodyContactAdded( + SoftBodyContactListener self, + Body softBody, + SoftBodyManifold manifold + ); + + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_CreateProxy")] + public static partial nint SoftBodyContactListener_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_DestroyProxy")] + public static partial void SoftBodyContactListener_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_ProxyGetBase")] + public static partial SoftBodyContactListener SoftBodyContactListener_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_ProxySetOnSoftBodyContactValidate")] + public static partial void SoftBodyContactListener_ProxySetOnSoftBodyContactValidate( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "SoftBodyContactListener_ProxySetOnSoftBodyContactAdded")] + public static partial void SoftBodyContactListener_ProxySetOnSoftBodyContactAdded( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyCreationSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyCreationSettings.gen.cs new file mode 100644 index 0000000..588695e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyCreationSettings.gen.cs @@ -0,0 +1,312 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_Create")] + public static partial SoftBodyCreationSettings SoftBodyCreationSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_Create_2")] + public static partial SoftBodyCreationSettings SoftBodyCreationSettings_Create_2( + SoftBodySharedSettings settings, + float3 position, + floatQuat rotation, + ushort objectLayer + ); + + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_Destroy")] + public static partial void SoftBodyCreationSettings_Destroy(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SaveBinaryState")] + public static partial void SoftBodyCreationSettings_SaveBinaryState( + SoftBodyCreationSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_RestoreBinaryState")] + public static partial void SoftBodyCreationSettings_RestoreBinaryState( + SoftBodyCreationSettings self, + StreamIn stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SaveWithChildren")] + public static partial void SoftBodyCreationSettings_SaveWithChildren( + SoftBodyCreationSettings self, + StreamOut stream, + SharedSettingsToIDMap sharedSettingsMap, + MaterialToIDMap materialMap, + GroupFilterToIDMap groupFilterMap + ); + + /// + /// + /// Restore a shape, all its children and materials. Pass in an empty map in ioSharedSettingsMap / + /// ioMaterialMap / ioGroupFilterMap or reuse the same map while reading multiple shapes from the same + /// stream in order to restore duplicates. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyCreationSettings.h:47 + ///
+ /// static SBCSResult sRestoreWithChildren(StreamIn &inStream, IDToSharedSettingsMap &ioSharedSettingsMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_RestoreWithChildren")] + public static partial SoftBodyCreationSettings SoftBodyCreationSettings_RestoreWithChildren( + StreamIn stream, + IDToSharedSettingsMap sharedSettingsMap, + IDToMaterialMap materialMap, + IDToGroupFilterMap groupFilterMap + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetSettings")] + public static partial SoftBodySharedSettings SoftBodyCreationSettings_GetSettings( + SoftBodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetSettings")] + public static partial void SoftBodyCreationSettings_SetSettings( + SoftBodyCreationSettings self, + SoftBodySharedSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetPosition")] + [SuppressGCTransition] + public static partial float3 SoftBodyCreationSettings_GetPosition(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetPosition")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetPosition( + SoftBodyCreationSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetRotation")] + [SuppressGCTransition] + public static partial floatQuat SoftBodyCreationSettings_GetRotation(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetRotation")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetRotation( + SoftBodyCreationSettings self, + floatQuat value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetUserData")] + [SuppressGCTransition] + public static partial ulong SoftBodyCreationSettings_GetUserData(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetUserData")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetUserData(SoftBodyCreationSettings self, ulong value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetObjectLayer")] + [SuppressGCTransition] + public static partial ushort SoftBodyCreationSettings_GetObjectLayer(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetObjectLayer")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetObjectLayer( + SoftBodyCreationSettings self, + ushort value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetCollisionGroup")] + public static partial CollisionGroup SoftBodyCreationSettings_GetCollisionGroup( + SoftBodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetCollisionGroup")] + public static partial void SoftBodyCreationSettings_SetCollisionGroup( + SoftBodyCreationSettings self, + CollisionGroup value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetNumIterations")] + [SuppressGCTransition] + public static partial uint SoftBodyCreationSettings_GetNumIterations(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetNumIterations")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetNumIterations( + SoftBodyCreationSettings self, + uint value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetLinearDamping")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetLinearDamping(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetLinearDamping")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetLinearDamping( + SoftBodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetMaxLinearVelocity")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetMaxLinearVelocity(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetMaxLinearVelocity")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetMaxLinearVelocity( + SoftBodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetRestitution")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetRestitution(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetRestitution")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetRestitution( + SoftBodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetFriction")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetFriction(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetFriction")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetFriction(SoftBodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetPressure")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetPressure(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetPressure")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetPressure(SoftBodyCreationSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetGravityFactor")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetGravityFactor(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetGravityFactor")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetGravityFactor( + SoftBodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetVertexRadius")] + [SuppressGCTransition] + public static partial float SoftBodyCreationSettings_GetVertexRadius(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetVertexRadius")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetVertexRadius( + SoftBodyCreationSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetUpdatePosition")] + [SuppressGCTransition] + public static partial Brutal.Bool8 SoftBodyCreationSettings_GetUpdatePosition( + SoftBodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetUpdatePosition")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetUpdatePosition( + SoftBodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetMakeRotationIdentity")] + [SuppressGCTransition] + public static partial Brutal.Bool8 SoftBodyCreationSettings_GetMakeRotationIdentity( + SoftBodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetMakeRotationIdentity")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetMakeRotationIdentity( + SoftBodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetAllowSleeping")] + [SuppressGCTransition] + public static partial Brutal.Bool8 SoftBodyCreationSettings_GetAllowSleeping(SoftBodyCreationSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetAllowSleeping")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetAllowSleeping( + SoftBodyCreationSettings self, + Brutal.Bool8 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_GetFacesDoubleSided")] + [SuppressGCTransition] + public static partial Brutal.Bool8 SoftBodyCreationSettings_GetFacesDoubleSided( + SoftBodyCreationSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyCreationSettings_SetFacesDoubleSided")] + [SuppressGCTransition] + public static partial void SoftBodyCreationSettings_SetFacesDoubleSided( + SoftBodyCreationSettings self, + Brutal.Bool8 value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyManifold.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyManifold.gen.cs new file mode 100644 index 0000000..fb57b3b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyManifold.gen.cs @@ -0,0 +1,62 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_GetVertices")] + public static partial void SoftBodyManifold_GetVertices( + SoftBodyManifold self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_HasContact")] + public static partial Brutal.Bool8 SoftBodyManifold_HasContact( + SoftBodyManifold self, + in SoftBodyVertex vertex + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_GetLocalContactPoint")] + public static partial float3 SoftBodyManifold_GetLocalContactPoint( + SoftBodyManifold self, + in SoftBodyVertex vertex + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_GetContactNormal")] + public static partial float3 SoftBodyManifold_GetContactNormal( + SoftBodyManifold self, + in SoftBodyVertex vertex + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_GetContactBodyID")] + public static partial uint SoftBodyManifold_GetContactBodyID( + SoftBodyManifold self, + in SoftBodyVertex vertex + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_GetNumSensorContacts")] + public static partial uint SoftBodyManifold_GetNumSensorContacts(SoftBodyManifold self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyManifold_GetSensorContactBodyID")] + public static partial uint SoftBodyManifold_GetSensorContactBodyID( + SoftBodyManifold self, + uint index, + out uint outInRange + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyMotionProperties.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyMotionProperties.gen.cs new file mode 100644 index 0000000..8ca2a7f --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyMotionProperties.gen.cs @@ -0,0 +1,357 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_Create")] + public static partial SoftBodyMotionProperties SoftBodyMotionProperties_Create(); + + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_Destroy")] + public static partial void SoftBodyMotionProperties_Destroy(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_Initialize")] + public static partial void SoftBodyMotionProperties_Initialize( + SoftBodyMotionProperties self, + SoftBodyCreationSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetSettings")] + public static partial SoftBodySharedSettings SoftBodyMotionProperties_GetSettings( + SoftBodyMotionProperties self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetVertices")] + public static partial void SoftBodyMotionProperties_GetVertices( + SoftBodyMotionProperties self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetVertex")] + public static partial SoftBodyVertex SoftBodyMotionProperties_GetVertex( + SoftBodyMotionProperties self, + uint index, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetVertex")] + public static partial void SoftBodyMotionProperties_SetVertex( + SoftBodyMotionProperties self, + uint index, + in SoftBodyVertex value, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetVertices")] + public static partial void SoftBodyMotionProperties_SetVertices( + SoftBodyMotionProperties self, + SoftBodyVertex* value, + nuint valueCount, + uint startIndex, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetRodRotation")] + public static partial floatQuat SoftBodyMotionProperties_GetRodRotation( + SoftBodyMotionProperties self, + uint index, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetRodAngularVelocity")] + public static partial float3 SoftBodyMotionProperties_GetRodAngularVelocity( + SoftBodyMotionProperties self, + uint index, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetMaterials")] + public static partial nint SoftBodyMotionProperties_GetMaterials(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetFaces")] + public static partial void SoftBodyMotionProperties_GetFaces( + SoftBodyMotionProperties self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetFace")] + public static partial void SoftBodyMotionProperties_GetFace( + SoftBodyMotionProperties self, + uint index, + out uint outInRange, + out SoftBodySharedSettings.Face outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetNumIterations")] + public static partial uint SoftBodyMotionProperties_GetNumIterations(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetNumIterations")] + public static partial void SoftBodyMotionProperties_SetNumIterations( + SoftBodyMotionProperties self, + uint numIterations + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetPressure")] + public static partial float SoftBodyMotionProperties_GetPressure(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetPressure")] + public static partial void SoftBodyMotionProperties_SetPressure( + SoftBodyMotionProperties self, + float pressure + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetUpdatePosition")] + public static partial Brutal.Bool8 SoftBodyMotionProperties_GetUpdatePosition( + SoftBodyMotionProperties self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetUpdatePosition")] + public static partial void SoftBodyMotionProperties_SetUpdatePosition( + SoftBodyMotionProperties self, + Brutal.Bool8 updatePosition + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetFacesDoubleSided")] + public static partial Brutal.Bool8 SoftBodyMotionProperties_GetFacesDoubleSided( + SoftBodyMotionProperties self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetFacesDoubleSided")] + public static partial void SoftBodyMotionProperties_SetFacesDoubleSided( + SoftBodyMotionProperties self, + Brutal.Bool8 doubleSided + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetEnableSkinConstraints")] + public static partial Brutal.Bool8 SoftBodyMotionProperties_GetEnableSkinConstraints( + SoftBodyMotionProperties self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetEnableSkinConstraints")] + public static partial void SoftBodyMotionProperties_SetEnableSkinConstraints( + SoftBodyMotionProperties self, + Brutal.Bool8 enableSkinConstraints + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetSkinnedMaxDistanceMultiplier")] + public static partial float SoftBodyMotionProperties_GetSkinnedMaxDistanceMultiplier( + SoftBodyMotionProperties self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetSkinnedMaxDistanceMultiplier")] + public static partial void SoftBodyMotionProperties_SetSkinnedMaxDistanceMultiplier( + SoftBodyMotionProperties self, + float skinnedMaxDistanceMultiplier + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetVertexRadius")] + public static partial float SoftBodyMotionProperties_GetVertexRadius(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SetVertexRadius")] + public static partial void SoftBodyMotionProperties_SetVertexRadius( + SoftBodyMotionProperties self, + float vertexRadius + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetLocalBounds")] + public static partial AABox SoftBodyMotionProperties_GetLocalBounds(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_GetVolume")] + public static partial float SoftBodyMotionProperties_GetVolume(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_CalculateMassAndInertia")] + public static partial void SoftBodyMotionProperties_CalculateMassAndInertia(SoftBodyMotionProperties self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawVertices")] + public static partial void SoftBodyMotionProperties_DrawVertices( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawVertexVelocities")] + public static partial void SoftBodyMotionProperties_DrawVertexVelocities( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawEdgeConstraints")] + public static partial void SoftBodyMotionProperties_DrawEdgeConstraints( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawRods")] + public static partial void SoftBodyMotionProperties_DrawRods( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawRodStates")] + public static partial void SoftBodyMotionProperties_DrawRodStates( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawRodBendTwistConstraints")] + public static partial void SoftBodyMotionProperties_DrawRodBendTwistConstraints( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawBendConstraints")] + public static partial void SoftBodyMotionProperties_DrawBendConstraints( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawVolumeConstraints")] + public static partial void SoftBodyMotionProperties_DrawVolumeConstraints( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawSkinConstraints")] + public static partial void SoftBodyMotionProperties_DrawSkinConstraints( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawLRAConstraints")] + public static partial void SoftBodyMotionProperties_DrawLRAConstraints( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform, + SoftBodyConstraintColor constraintColor + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DrawPredictedBounds")] + public static partial void SoftBodyMotionProperties_DrawPredictedBounds( + SoftBodyMotionProperties self, + DebugRenderer renderer, + in float4x4 centerOfMassTransform + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_SkinVertices")] + public static partial void SoftBodyMotionProperties_SkinVertices( + SoftBodyMotionProperties self, + in float4x4 centerOfMassTransform, + float4x4* jointMatrices, + uint jointMatricesCount, + Brutal.Bool8 hardSkinAll, + TempAllocator tempAllocator, + out uint outBufferCheck + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_CustomUpdate")] + public static partial void SoftBodyMotionProperties_CustomUpdate( + SoftBodyMotionProperties self, + float deltaTime, + Body softBody, + PhysicsSystem system + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_InitializeUpdateContext")] + public static partial void SoftBodyMotionProperties_InitializeUpdateContext( + SoftBodyMotionProperties self, + float deltaTime, + Body softBody, + PhysicsSystem system, + SoftBodyUpdateContext context + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_DetermineCollidingShapes")] + public static partial void SoftBodyMotionProperties_DetermineCollidingShapes( + SoftBodyMotionProperties self, + SoftBodyUpdateContext context, + PhysicsSystem system, + BodyLockInterface bodyLockInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_ParallelUpdate")] + public static partial SoftBodyMotionProperties.Status SoftBodyMotionProperties_ParallelUpdate( + SoftBodyMotionProperties self, + SoftBodyUpdateContext context, + in PhysicsSettings physicsSettings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_UpdateRigidBodyVelocities")] + public static partial void SoftBodyMotionProperties_UpdateRigidBodyVelocities( + SoftBodyMotionProperties self, + SoftBodyUpdateContext context, + BodyInterface bodyInterface + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyMotionProperties_RequestContactCallback")] + public static partial void SoftBodyMotionProperties_RequestContactCallback(SoftBodyMotionProperties self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyShape.gen.cs new file mode 100644 index 0000000..20ab47b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyShape.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyShape_Create")] + public static partial SoftBodyShape SoftBodyShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyShape_GetSubShapeIDBits")] + public static partial uint SoftBodyShape_GetSubShapeIDBits(SoftBodyShape self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyShape_GetFaceIndex")] + public static partial uint SoftBodyShape_GetFaceIndex(SoftBodyShape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyShape_Register")] + public static partial void SoftBodyShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodySharedSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodySharedSettings.gen.cs new file mode 100644 index 0000000..cb39842 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodySharedSettings.gen.cs @@ -0,0 +1,287 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_Create")] + public static partial SoftBodySharedSettings SoftBodySharedSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CreateConstraints")] + public static partial void SoftBodySharedSettings_CreateConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.VertexAttributes* vertexAttributes, + uint vertexAttributesLength, + SoftBodySharedSettings.BendType bendType, + float angleTolerance + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CalculateEdgeLengths")] + public static partial void SoftBodySharedSettings_CalculateEdgeLengths(SoftBodySharedSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CalculateRodProperties")] + public static partial void SoftBodySharedSettings_CalculateRodProperties(SoftBodySharedSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CalculateLRALengths")] + public static partial void SoftBodySharedSettings_CalculateLRALengths( + SoftBodySharedSettings self, + float maxDistanceMultiplier + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CalculateBendConstraintConstants")] + public static partial void SoftBodySharedSettings_CalculateBendConstraintConstants( + SoftBodySharedSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CalculateVolumeConstraintVolumes")] + public static partial void SoftBodySharedSettings_CalculateVolumeConstraintVolumes( + SoftBodySharedSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CalculateSkinnedConstraintNormals")] + public static partial void SoftBodySharedSettings_CalculateSkinnedConstraintNormals( + SoftBodySharedSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_Optimize")] + public static partial void SoftBodySharedSettings_Optimize(SoftBodySharedSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_Clone")] + public static partial SoftBodySharedSettings SoftBodySharedSettings_Clone(SoftBodySharedSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SaveBinaryState")] + public static partial void SoftBodySharedSettings_SaveBinaryState( + SoftBodySharedSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_RestoreBinaryState")] + public static partial void SoftBodySharedSettings_RestoreBinaryState( + SoftBodySharedSettings self, + StreamIn stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SaveWithMaterials")] + public static partial void SoftBodySharedSettings_SaveWithMaterials( + SoftBodySharedSettings self, + StreamOut stream, + SharedSettingsToIDMap settingsMap, + MaterialToIDMap materialMap + ); + + /// + /// + /// Restore a shape and materials. Pass in an empty map in ioSettingsMap / ioMaterialMap or reuse the + /// same map while reading multiple settings objects from the same stream in order to restore + /// duplicates. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodySharedSettings.h:118 + ///
+ /// static SettingsResult sRestoreWithMaterials(StreamIn &inStream, IDToSharedSettingsMap &ioSettingsMap, IDToMaterialMap &ioMaterialMap) + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_RestoreWithMaterials")] + public static partial SoftBodySharedSettings SoftBodySharedSettings_RestoreWithMaterials( + StreamIn stream, + IDToSharedSettingsMap settingsMap, + IDToMaterialMap materialMap + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_CreateCube")] + public static partial SoftBodySharedSettings SoftBodySharedSettings_CreateCube( + uint gridSize, + float gridSpacing + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_AddFace")] + public static partial void SoftBodySharedSettings_AddFace( + SoftBodySharedSettings self, + in SoftBodySharedSettings.Face face + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetVertices")] + public static partial void SoftBodySharedSettings_GetVertices( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetVertices")] + public static partial void SoftBodySharedSettings_SetVertices( + SoftBodySharedSettings self, + SoftBodySharedSettings.Vertex* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetFaces")] + public static partial void SoftBodySharedSettings_GetFaces( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetFaces")] + public static partial void SoftBodySharedSettings_SetFaces( + SoftBodySharedSettings self, + SoftBodySharedSettings.Face* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetEdgeConstraints")] + public static partial void SoftBodySharedSettings_GetEdgeConstraints( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetEdgeConstraints")] + public static partial void SoftBodySharedSettings_SetEdgeConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.Edge* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetDihedralBendConstraints")] + public static partial void SoftBodySharedSettings_GetDihedralBendConstraints( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetDihedralBendConstraints")] + public static partial void SoftBodySharedSettings_SetDihedralBendConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.DihedralBend* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetVolumeConstraints")] + public static partial void SoftBodySharedSettings_GetVolumeConstraints( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetVolumeConstraints")] + public static partial void SoftBodySharedSettings_SetVolumeConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.Volume* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetSkinnedConstraints")] + public static partial void SoftBodySharedSettings_GetSkinnedConstraints( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetSkinnedConstraints")] + public static partial void SoftBodySharedSettings_SetSkinnedConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.Skinned* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetInvBindMatrices")] + public static partial void SoftBodySharedSettings_GetInvBindMatrices( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetInvBindMatrices")] + public static partial void SoftBodySharedSettings_SetInvBindMatrices( + SoftBodySharedSettings self, + SoftBodySharedSettings.InvBind* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetRodStretchShearConstraints")] + public static partial void SoftBodySharedSettings_GetRodStretchShearConstraints( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetRodStretchShearConstraints")] + public static partial void SoftBodySharedSettings_SetRodStretchShearConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.RodStretchShear* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetRodBendTwistConstraints")] + public static partial void SoftBodySharedSettings_GetRodBendTwistConstraints( + SoftBodySharedSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetRodBendTwistConstraints")] + public static partial void SoftBodySharedSettings_SetRodBendTwistConstraints( + SoftBodySharedSettings self, + SoftBodySharedSettings.RodBendTwist* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetMaterials")] + public static partial nint SoftBodySharedSettings_GetMaterials(SoftBodySharedSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_SetMaterials")] + public static partial void SoftBodySharedSettings_SetMaterials( + SoftBodySharedSettings self, + PhysicsMaterial* value, + nuint valueCount + ); + + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_AddRef")] + public static partial void SoftBodySharedSettings_AddRef(SoftBodySharedSettings self); + + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_Release")] + public static partial void SoftBodySharedSettings_Release(SoftBodySharedSettings self); + + [LibraryImport("jolt", EntryPoint = "SoftBodySharedSettings_GetRefCount")] + public static partial uint SoftBodySharedSettings_GetRefCount(SoftBodySharedSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyUpdateContext.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyUpdateContext.gen.cs new file mode 100644 index 0000000..3159ce5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyUpdateContext.gen.cs @@ -0,0 +1,153 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_Create")] + public static partial SoftBodyUpdateContext SoftBodyUpdateContext_Create(); + + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_Destroy")] + public static partial void SoftBodyUpdateContext_Destroy(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetVertexCollisionBatch")] + public static partial uint SoftBodyUpdateContext_GetVertexCollisionBatch(); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetVertexConstraintBatch")] + public static partial uint SoftBodyUpdateContext_GetVertexConstraintBatch(); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetBody")] + public static partial Body SoftBodyUpdateContext_GetBody(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetBody")] + public static partial void SoftBodyUpdateContext_SetBody(SoftBodyUpdateContext self, Body value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetMotionProperties")] + public static partial SoftBodyMotionProperties SoftBodyUpdateContext_GetMotionProperties( + SoftBodyUpdateContext self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetMotionProperties")] + public static partial void SoftBodyUpdateContext_SetMotionProperties( + SoftBodyUpdateContext self, + SoftBodyMotionProperties value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetContactListener")] + public static partial SoftBodyContactListener SoftBodyUpdateContext_GetContactListener( + SoftBodyUpdateContext self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetContactListener")] + public static partial void SoftBodyUpdateContext_SetContactListener( + SoftBodyUpdateContext self, + SoftBodyContactListener value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetSimShapeFilter")] + public static partial SimShapeFilter SoftBodyUpdateContext_GetSimShapeFilter(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetSimShapeFilter")] + public static partial void SoftBodyUpdateContext_SetSimShapeFilter( + SoftBodyUpdateContext self, + SimShapeFilter value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetCenterOfMassTransform")] + [SuppressGCTransition] + public static partial float4x4 SoftBodyUpdateContext_GetCenterOfMassTransform(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetCenterOfMassTransform")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetCenterOfMassTransform( + SoftBodyUpdateContext self, + in float4x4 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetGravity")] + [SuppressGCTransition] + public static partial float3 SoftBodyUpdateContext_GetGravity(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetGravity")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetGravity(SoftBodyUpdateContext self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetDisplacementDueToGravity")] + [SuppressGCTransition] + public static partial float3 SoftBodyUpdateContext_GetDisplacementDueToGravity(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetDisplacementDueToGravity")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetDisplacementDueToGravity( + SoftBodyUpdateContext self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetDeltaTime")] + [SuppressGCTransition] + public static partial float SoftBodyUpdateContext_GetDeltaTime(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetDeltaTime")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetDeltaTime(SoftBodyUpdateContext self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetSubStepDeltaTime")] + [SuppressGCTransition] + public static partial float SoftBodyUpdateContext_GetSubStepDeltaTime(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetSubStepDeltaTime")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetSubStepDeltaTime( + SoftBodyUpdateContext self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetDeltaPosition")] + [SuppressGCTransition] + public static partial float3 SoftBodyUpdateContext_GetDeltaPosition(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetDeltaPosition")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetDeltaPosition(SoftBodyUpdateContext self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_GetCanSleep")] + [SuppressGCTransition] + public static partial CanSleep SoftBodyUpdateContext_GetCanSleep(SoftBodyUpdateContext self); + + /// + [LibraryImport("jolt", EntryPoint = "SoftBodyUpdateContext_SetCanSleep")] + [SuppressGCTransition] + public static partial void SoftBodyUpdateContext_SetCanSleep(SoftBodyUpdateContext self, CanSleep value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SoftBodyVertex.gen.cs b/Brutal.Jolt/Generated/PInvoke/SoftBodyVertex.gen.cs new file mode 100644 index 0000000..529d8e2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SoftBodyVertex.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Reset collision information to prepare for a new collision check + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:19 + ///
+ /// inline void ResetCollision() + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SoftBodyVertex_ResetCollision")] + public static partial void SoftBodyVertex_ResetCollision(ref SoftBodyVertex self); + + /// + /// + /// Mark this vertex as being in contact with inBodyID + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:27 + ///
+ /// inline void MarkCCDContact(const BodyID &inBodyID, const Plane &inContactPlane) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SoftBodyVertex_MarkCCDContact")] + public static partial void SoftBodyVertex_MarkCCDContact( + ref SoftBodyVertex self, + uint bodyID, + in Plane contactPlane + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SpecifiedBroadPhaseLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/SpecifiedBroadPhaseLayerFilter.gen.cs new file mode 100644 index 0000000..c6f4bba --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SpecifiedBroadPhaseLayerFilter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SpecifiedBroadPhaseLayerFilter_Create")] + public static partial SpecifiedBroadPhaseLayerFilter SpecifiedBroadPhaseLayerFilter_Create(byte layer); + + [LibraryImport("jolt", EntryPoint = "SpecifiedBroadPhaseLayerFilter_Destroy")] + public static partial void SpecifiedBroadPhaseLayerFilter_Destroy(SpecifiedBroadPhaseLayerFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SpecifiedObjectLayerFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/SpecifiedObjectLayerFilter.gen.cs new file mode 100644 index 0000000..306adcc --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SpecifiedObjectLayerFilter.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SpecifiedObjectLayerFilter_Create")] + public static partial SpecifiedObjectLayerFilter SpecifiedObjectLayerFilter_Create(ushort layer); + + [LibraryImport("jolt", EntryPoint = "SpecifiedObjectLayerFilter_Destroy")] + public static partial void SpecifiedObjectLayerFilter_Destroy(SpecifiedObjectLayerFilter self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Sphere.gen.cs b/Brutal.Jolt/Generated/PInvoke/Sphere.gen.cs new file mode 100644 index 0000000..1474d5b --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Sphere.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Sphere_Create")] + public static partial Sphere Sphere_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_Create_2")] + public static partial Sphere Sphere_Create_2(float3 center, float radius); + + [LibraryImport("jolt", EntryPoint = "Sphere_Destroy")] + public static partial void Sphere_Destroy(Sphere self); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_GetSupport")] + public static partial float3 Sphere_GetSupport(Sphere self, float3 direction); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_GetCenter")] + public static partial float3 Sphere_GetCenter(Sphere self); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_GetRadius")] + public static partial float Sphere_GetRadius(Sphere self); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_Overlaps")] + public static partial Brutal.Bool8 Sphere_Overlaps(Sphere self, Sphere b); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_Overlaps_2")] + public static partial Brutal.Bool8 Sphere_Overlaps_2(Sphere self, in AABox other); + + /// + [LibraryImport("jolt", EntryPoint = "Sphere_EncapsulatePoint")] + public static partial void Sphere_EncapsulatePoint(Sphere self, float3 point); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SphereShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/SphereShape.gen.cs new file mode 100644 index 0000000..5c2d0a6 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SphereShape.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SphereShape_Create")] + public static partial SphereShape SphereShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShape_Create_2")] + public static partial SphereShape SphereShape_Create_2(SphereShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShape_Create_3")] + public static partial SphereShape SphereShape_Create_3(float radius, PhysicsMaterial material); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShape_GetRadius")] + public static partial float SphereShape_GetRadius(SphereShape self); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShape_Register")] + public static partial void SphereShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SphereShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SphereShapeSettings.gen.cs new file mode 100644 index 0000000..546e815 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SphereShapeSettings.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SphereShapeSettings_Create")] + public static partial SphereShapeSettings SphereShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShapeSettings_Create_2")] + public static partial SphereShapeSettings SphereShapeSettings_Create_2( + float radius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShapeSettings_GetRadius")] + [SuppressGCTransition] + public static partial float SphereShapeSettings_GetRadius(SphereShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SphereShapeSettings_SetRadius")] + [SuppressGCTransition] + public static partial void SphereShapeSettings_SetRadius(SphereShapeSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SpringPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/SpringPart.gen.cs new file mode 100644 index 0000000..d520f11 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SpringPart.gen.cs @@ -0,0 +1,87 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SpringPart_Create")] + public static partial SpringPart SpringPart_Create(); + + [LibraryImport("jolt", EntryPoint = "SpringPart_Destroy")] + public static partial void SpringPart_Destroy(SpringPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringPart_CalculateSpringPropertiesWithBias")] + public static partial void SpringPart_CalculateSpringPropertiesWithBias(SpringPart self, float bias); + + /// + [LibraryImport("jolt", EntryPoint = "SpringPart_CalculateSpringPropertiesWithStiffnessAndDamping")] + public static partial void SpringPart_CalculateSpringPropertiesWithStiffnessAndDamping( + SpringPart self, + float deltaTime, + float invEffectiveMass, + float bias, + float c, + float stiffness, + float damping, + out float effectiveMass + ); + + /// + [LibraryImport("jolt", EntryPoint = "SpringPart_CalculateSpringPropertiesWithFrequencyAndDamping")] + public static partial void SpringPart_CalculateSpringPropertiesWithFrequencyAndDamping( + SpringPart self, + float deltaTime, + float invEffectiveMass, + float bias, + float c, + float frequency, + float damping, + out float effectiveMass + ); + + /// + [LibraryImport( + "jolt", + EntryPoint = "SpringPart_CalculateSpringPropertiesWithMassNormalizedStiffnessAndDamping" + )] + public static partial void SpringPart_CalculateSpringPropertiesWithMassNormalizedStiffnessAndDamping( + SpringPart self, + float deltaTime, + float invEffectiveMass, + float bias, + float c, + float stiffness, + float damping, + out float effectiveMass + ); + + /// + [LibraryImport("jolt", EntryPoint = "SpringPart_CalculateSpringPropertiesWithSettings")] + public static partial void SpringPart_CalculateSpringPropertiesWithSettings( + SpringPart self, + float deltaTime, + float invEffectiveMass, + float bias, + float c, + SpringSettings springSettings, + out float effectiveMass + ); + + /// + [LibraryImport("jolt", EntryPoint = "SpringPart_IsActive")] + public static partial Brutal.Bool8 SpringPart_IsActive(SpringPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringPart_GetBias")] + public static partial float SpringPart_GetBias(SpringPart self, float totalLambda); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SpringSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SpringSettings.gen.cs new file mode 100644 index 0000000..dab60ef --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SpringSettings.gen.cs @@ -0,0 +1,86 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_Create")] + public static partial SpringSettings SpringSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_Create_2")] + public static partial SpringSettings SpringSettings_Create_2( + SpringMode mode, + float frequencyOrStiffness, + float damping + ); + + [LibraryImport("jolt", EntryPoint = "SpringSettings_Destroy")] + public static partial void SpringSettings_Destroy(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_SaveBinaryState")] + public static partial void SpringSettings_SaveBinaryState(SpringSettings self, StreamOut stream); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_RestoreBinaryState")] + public static partial void SpringSettings_RestoreBinaryState(SpringSettings self, StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_HasStiffness")] + public static partial Brutal.Bool8 SpringSettings_HasStiffness(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_HasStiffnessOrDamping")] + public static partial Brutal.Bool8 SpringSettings_HasStiffnessOrDamping(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_GetFrequency")] + [SuppressGCTransition] + public static partial float SpringSettings_GetFrequency(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_SetFrequency")] + [SuppressGCTransition] + public static partial void SpringSettings_SetFrequency(SpringSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_GetStiffness")] + [SuppressGCTransition] + public static partial float SpringSettings_GetStiffness(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_SetStiffness")] + [SuppressGCTransition] + public static partial void SpringSettings_SetStiffness(SpringSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_GetMode")] + [SuppressGCTransition] + public static partial SpringMode SpringSettings_GetMode(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_SetMode")] + [SuppressGCTransition] + public static partial void SpringSettings_SetMode(SpringSettings self, SpringMode value); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_GetDamping")] + [SuppressGCTransition] + public static partial float SpringSettings_GetDamping(SpringSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SpringSettings_SetDamping")] + [SuppressGCTransition] + public static partial void SpringSettings_SetDamping(SpringSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StateRecorder.gen.cs b/Brutal.Jolt/Generated/PInvoke/StateRecorder.gen.cs new file mode 100644 index 0000000..77f41fc --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StateRecorder.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StateRecorder_SetValidating")] + public static partial void StateRecorder_SetValidating(StateRecorder self, Brutal.Bool8 validating); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorder_IsValidating")] + public static partial Brutal.Bool8 StateRecorder_IsValidating(StateRecorder self); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorder_SetIsLastPart")] + public static partial void StateRecorder_SetIsLastPart(StateRecorder self, Brutal.Bool8 isLastPart); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorder_IsLastPart")] + public static partial Brutal.Bool8 StateRecorder_IsLastPart(StateRecorder self); + + [LibraryImport("jolt", EntryPoint = "StateRecorder_AsStreamOut")] + public static partial StreamOut StateRecorder_AsStreamOut(StateRecorder self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StateRecorderFilter.gen.cs b/Brutal.Jolt/Generated/PInvoke/StateRecorderFilter.gen.cs new file mode 100644 index 0000000..b9bc3d3 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StateRecorderFilter.gen.cs @@ -0,0 +1,81 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_Create")] + public static partial StateRecorderFilter StateRecorderFilter_Create(); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_Destroy")] + public static partial void StateRecorderFilter_Destroy(StateRecorderFilter self); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ShouldSaveBody")] + public static partial Brutal.Bool8 StateRecorderFilter_ShouldSaveBody(StateRecorderFilter self, Body body); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ShouldSaveConstraint")] + public static partial Brutal.Bool8 StateRecorderFilter_ShouldSaveConstraint( + StateRecorderFilter self, + Constraint constraint + ); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ShouldSaveContact")] + public static partial Brutal.Bool8 StateRecorderFilter_ShouldSaveContact( + StateRecorderFilter self, + uint body1, + uint body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ShouldRestoreContact")] + public static partial Brutal.Bool8 StateRecorderFilter_ShouldRestoreContact( + StateRecorderFilter self, + uint body1, + uint body2 + ); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_CreateProxy")] + public static partial nint StateRecorderFilter_CreateProxy(nint userData); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_DestroyProxy")] + public static partial void StateRecorderFilter_DestroyProxy(nint self); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ProxyGetBase")] + public static partial StateRecorderFilter StateRecorderFilter_ProxyGetBase(nint self); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ProxySetShouldSaveBody")] + public static partial void StateRecorderFilter_ProxySetShouldSaveBody( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ProxySetShouldSaveConstraint")] + public static partial void StateRecorderFilter_ProxySetShouldSaveConstraint( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ProxySetShouldSaveContact")] + public static partial void StateRecorderFilter_ProxySetShouldSaveContact( + nint self, + delegate* unmanaged[Cdecl] callback + ); + + [LibraryImport("jolt", EntryPoint = "StateRecorderFilter_ProxySetShouldRestoreContact")] + public static partial void StateRecorderFilter_ProxySetShouldRestoreContact( + nint self, + delegate* unmanaged[Cdecl] callback + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StateRecorderImpl.gen.cs b/Brutal.Jolt/Generated/PInvoke/StateRecorderImpl.gen.cs new file mode 100644 index 0000000..4a87d29 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StateRecorderImpl.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_Create")] + public static partial StateRecorderImpl StateRecorderImpl_Create(); + + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_Destroy")] + public static partial void StateRecorderImpl_Destroy(StateRecorderImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_Rewind")] + public static partial void StateRecorderImpl_Rewind(StateRecorderImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_Clear")] + public static partial void StateRecorderImpl_Clear(StateRecorderImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_IsEqual")] + public static partial Brutal.Bool8 StateRecorderImpl_IsEqual( + StateRecorderImpl self, + StateRecorderImpl reference + ); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_GetDataSize")] + public static partial nuint StateRecorderImpl_GetDataSize(StateRecorderImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_GetDataBytes")] + public static partial nuint StateRecorderImpl_GetDataBytes( + StateRecorderImpl self, + byte* buffer, + nuint bufferCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_WriteByteSpan")] + public static partial void StateRecorderImpl_WriteByteSpan( + StateRecorderImpl self, + byte* data, + nuint dataCount + ); + + [LibraryImport("jolt", EntryPoint = "StateRecorderImpl_AsStreamOut")] + public static partial StreamOut StateRecorderImpl_AsStreamOut(StateRecorderImpl self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StaticCompoundShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/StaticCompoundShape.gen.cs new file mode 100644 index 0000000..45c7613 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StaticCompoundShape.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StaticCompoundShape_Create")] + public static partial StaticCompoundShape StaticCompoundShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "StaticCompoundShape_Create_2")] + public static partial StaticCompoundShape StaticCompoundShape_Create_2( + StaticCompoundShapeSettings settings, + TempAllocator tempAllocator + ); + + /// + [LibraryImport("jolt", EntryPoint = "StaticCompoundShape_Register")] + public static partial void StaticCompoundShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StaticCompoundShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/StaticCompoundShapeSettings.gen.cs new file mode 100644 index 0000000..f423900 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StaticCompoundShapeSettings.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "StaticCompoundShapeSettings_Create")] + public static partial StaticCompoundShapeSettings StaticCompoundShapeSettings_Create(); + + /// + /// + /// Specialization of Create() function that allows specifying a temp allocator to avoid temporary + /// memory allocations on the heap + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:27 + ///
+ /// ShapeResult Create(TempAllocator &inTempAllocator) const + ///
+ ///
+ /// + /// + /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. + /// + /// + [LibraryImport("jolt", EntryPoint = "StaticCompoundShapeSettings_CreateShape")] + public static partial Shape StaticCompoundShapeSettings_CreateShape( + StaticCompoundShapeSettings self, + TempAllocator tempAllocator + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StreamIn.gen.cs b/Brutal.Jolt/Generated/PInvoke/StreamIn.gen.cs new file mode 100644 index 0000000..74c9c85 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StreamIn.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StreamIn_ReadBytes")] + public static partial void StreamIn_ReadBytes(StreamIn self, void* data, nuint numBytes); + + /// + [LibraryImport("jolt", EntryPoint = "StreamIn_IsEOF")] + public static partial Brutal.Bool8 StreamIn_IsEOF(StreamIn self); + + /// + [LibraryImport("jolt", EntryPoint = "StreamIn_IsFailed")] + public static partial Brutal.Bool8 StreamIn_IsFailed(StreamIn self); + + /// + [LibraryImport("jolt", EntryPoint = "StreamIn_Read")] + public static partial void StreamIn_Read(StreamIn self, out float3 vec); + + /// + [LibraryImport("jolt", EntryPoint = "StreamIn_Read_2")] + public static partial void StreamIn_Read_2(StreamIn self, out double3 vec); + + /// + [LibraryImport("jolt", EntryPoint = "StreamIn_Read_3")] + public static partial void StreamIn_Read_3(StreamIn self, out double4x4 vec); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StreamInWrapper.gen.cs b/Brutal.Jolt/Generated/PInvoke/StreamInWrapper.gen.cs new file mode 100644 index 0000000..9ecad76 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StreamInWrapper.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StreamInWrapper_ReadBytes")] + public static partial void StreamInWrapper_ReadBytes(StreamInWrapper self, void* data, nuint numBytes); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StreamOut.gen.cs b/Brutal.Jolt/Generated/PInvoke/StreamOut.gen.cs new file mode 100644 index 0000000..4689d0d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StreamOut.gen.cs @@ -0,0 +1,35 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StreamOut_WriteBytes")] + public static partial void StreamOut_WriteBytes(StreamOut self, void* data, nuint numBytes); + + /// + [LibraryImport("jolt", EntryPoint = "StreamOut_IsFailed")] + public static partial Brutal.Bool8 StreamOut_IsFailed(StreamOut self); + + /// + [LibraryImport("jolt", EntryPoint = "StreamOut_Write")] + public static partial void StreamOut_Write(StreamOut self, float3 vec); + + /// + [LibraryImport("jolt", EntryPoint = "StreamOut_Write_2")] + public static partial void StreamOut_Write_2(StreamOut self, double3 vec); + + /// + [LibraryImport("jolt", EntryPoint = "StreamOut_Write_3")] + public static partial void StreamOut_Write_3(StreamOut self, in double4x4 vec); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/StreamOutWrapper.gen.cs b/Brutal.Jolt/Generated/PInvoke/StreamOutWrapper.gen.cs new file mode 100644 index 0000000..fba0c87 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/StreamOutWrapper.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "StreamOutWrapper_WriteBytes")] + public static partial void StreamOutWrapper_WriteBytes(StreamOutWrapper self, void* data, nuint numBytes); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SubShapeIDCreator.gen.cs b/Brutal.Jolt/Generated/PInvoke/SubShapeIDCreator.gen.cs new file mode 100644 index 0000000..285a3c7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SubShapeIDCreator.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SubShapeIDCreator_Create")] + public static partial SubShapeIDCreator SubShapeIDCreator_Create(); + + [LibraryImport("jolt", EntryPoint = "SubShapeIDCreator_Destroy")] + public static partial void SubShapeIDCreator_Destroy(SubShapeIDCreator self); + + /// + [LibraryImport("jolt", EntryPoint = "SubShapeIDCreator_PushID")] + public static partial SubShapeIDCreator SubShapeIDCreator_PushID( + SubShapeIDCreator self, + uint value, + uint bits + ); + + /// + [LibraryImport("jolt", EntryPoint = "SubShapeIDCreator_GetID")] + public static partial uint SubShapeIDCreator_GetID(SubShapeIDCreator self); + + /// + [LibraryImport("jolt", EntryPoint = "SubShapeIDCreator_GetNumBitsWritten")] + public static partial uint SubShapeIDCreator_GetNumBitsWritten(SubShapeIDCreator self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SubShapeIDPair.gen.cs b/Brutal.Jolt/Generated/PInvoke/SubShapeIDPair.gen.cs new file mode 100644 index 0000000..c4f1b37 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SubShapeIDPair.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_Create")] + public static partial void SubShapeIDPair_Create(out SubShapeIDPair outResult); + + /// + [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_Create_2")] + public static partial void SubShapeIDPair_Create_2( + uint body1ID, + uint subShapeID1, + uint body2ID, + uint subShapeID2, + out SubShapeIDPair outResult + ); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:46 + ///
+ /// const BodyID & GetBody1ID() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_GetBody1ID")] + public static partial uint SubShapeIDPair_GetBody1ID(ref SubShapeIDPair self); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:47 + ///
+ /// const SubShapeID & GetSubShapeID1() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_GetSubShapeID1")] + public static partial uint SubShapeIDPair_GetSubShapeID1(ref SubShapeIDPair self); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:48 + ///
+ /// const BodyID & GetBody2ID() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_GetBody2ID")] + public static partial uint SubShapeIDPair_GetBody2ID(ref SubShapeIDPair self); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:49 + ///
+ /// const SubShapeID & GetSubShapeID2() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_GetSubShapeID2")] + public static partial uint SubShapeIDPair_GetSubShapeID2(ref SubShapeIDPair self); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:51 + ///
+ /// uint64 GetHash() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "SubShapeIDPair_GetHash")] + public static partial ulong SubShapeIDPair_GetHash(ref SubShapeIDPair self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraint.gen.cs new file mode 100644 index 0000000..1b5fefb --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraint.gen.cs @@ -0,0 +1,180 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_Create")] + public static partial SwingTwistConstraint SwingTwistConstraint_Create( + Body body1, + Body body2, + SwingTwistConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetLocalSpacePosition1")] + public static partial float3 SwingTwistConstraint_GetLocalSpacePosition1(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetLocalSpacePosition2")] + public static partial float3 SwingTwistConstraint_GetLocalSpacePosition2(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetConstraintToBody1")] + public static partial floatQuat SwingTwistConstraint_GetConstraintToBody1(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetConstraintToBody2")] + public static partial floatQuat SwingTwistConstraint_GetConstraintToBody2(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetNormalHalfConeAngle")] + public static partial float SwingTwistConstraint_GetNormalHalfConeAngle(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetNormalHalfConeAngle")] + public static partial void SwingTwistConstraint_SetNormalHalfConeAngle( + SwingTwistConstraint self, + float angle + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetPlaneHalfConeAngle")] + public static partial float SwingTwistConstraint_GetPlaneHalfConeAngle(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetPlaneHalfConeAngle")] + public static partial void SwingTwistConstraint_SetPlaneHalfConeAngle( + SwingTwistConstraint self, + float angle + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTwistMinAngle")] + public static partial float SwingTwistConstraint_GetTwistMinAngle(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTwistMinAngle")] + public static partial void SwingTwistConstraint_SetTwistMinAngle(SwingTwistConstraint self, float angle); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTwistMaxAngle")] + public static partial float SwingTwistConstraint_GetTwistMaxAngle(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTwistMaxAngle")] + public static partial void SwingTwistConstraint_SetTwistMaxAngle(SwingTwistConstraint self, float angle); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetSwingMotorSettings")] + public static partial MotorSettings SwingTwistConstraint_GetSwingMotorSettings(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTwistMotorSettings")] + public static partial MotorSettings SwingTwistConstraint_GetTwistMotorSettings(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetMaxFrictionTorque")] + public static partial void SwingTwistConstraint_SetMaxFrictionTorque( + SwingTwistConstraint self, + float frictionTorque + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetMaxFrictionTorque")] + public static partial float SwingTwistConstraint_GetMaxFrictionTorque(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetSwingMotorState")] + public static partial void SwingTwistConstraint_SetSwingMotorState( + SwingTwistConstraint self, + MotorState state + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetSwingMotorState")] + public static partial MotorState SwingTwistConstraint_GetSwingMotorState(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTwistMotorState")] + public static partial void SwingTwistConstraint_SetTwistMotorState( + SwingTwistConstraint self, + MotorState state + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTwistMotorState")] + public static partial MotorState SwingTwistConstraint_GetTwistMotorState(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTargetAngularVelocityCS")] + public static partial void SwingTwistConstraint_SetTargetAngularVelocityCS( + SwingTwistConstraint self, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTargetAngularVelocityCS")] + public static partial float3 SwingTwistConstraint_GetTargetAngularVelocityCS(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTargetAngularVelocityBS")] + public static partial void SwingTwistConstraint_SetTargetAngularVelocityBS( + SwingTwistConstraint self, + float3 angularVelocity + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTargetOrientationCS")] + public static partial void SwingTwistConstraint_SetTargetOrientationCS( + SwingTwistConstraint self, + floatQuat orientation + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTargetOrientationCS")] + public static partial floatQuat SwingTwistConstraint_GetTargetOrientationCS(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_SetTargetOrientationBS")] + public static partial void SwingTwistConstraint_SetTargetOrientationBS( + SwingTwistConstraint self, + floatQuat orientation + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetRotationInConstraintSpace")] + public static partial floatQuat SwingTwistConstraint_GetRotationInConstraintSpace( + SwingTwistConstraint self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTotalLambdaPosition")] + public static partial float3 SwingTwistConstraint_GetTotalLambdaPosition(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTotalLambdaTwist")] + public static partial float SwingTwistConstraint_GetTotalLambdaTwist(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTotalLambdaSwingY")] + public static partial float SwingTwistConstraint_GetTotalLambdaSwingY(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTotalLambdaSwingZ")] + public static partial float SwingTwistConstraint_GetTotalLambdaSwingZ(SwingTwistConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraint_GetTotalLambdaMotor")] + public static partial float3 SwingTwistConstraint_GetTotalLambdaMotor(SwingTwistConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintPart.gen.cs b/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintPart.gen.cs new file mode 100644 index 0000000..08f47a4 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintPart.gen.cs @@ -0,0 +1,143 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_Create")] + public static partial SwingTwistConstraintPart SwingTwistConstraintPart_Create(); + + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_Destroy")] + public static partial void SwingTwistConstraintPart_Destroy(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_SetSwingType")] + public static partial void SwingTwistConstraintPart_SetSwingType( + SwingTwistConstraintPart self, + SwingType swingType + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetSwingType")] + public static partial SwingType SwingTwistConstraintPart_GetSwingType(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_SetLimits")] + public static partial void SwingTwistConstraintPart_SetLimits( + SwingTwistConstraintPart self, + float twistMinAngle, + float twistMaxAngle, + float swingYMinAngle, + float swingYMaxAngle, + float swingZMinAngle, + float swingZMaxAngle + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_DistanceToMinShorter")] + public static partial Brutal.Bool8 SwingTwistConstraintPart_DistanceToMinShorter( + float deltaMin, + float deltaMax + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_ClampSwingTwist")] + public static partial void SwingTwistConstraintPart_ClampSwingTwist( + SwingTwistConstraintPart self, + ref floatQuat swing, + ref floatQuat twist, + out uint clampedAxis + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_CalculateConstraintProperties")] + public static partial void SwingTwistConstraintPart_CalculateConstraintProperties( + SwingTwistConstraintPart self, + Body body1, + Body body2, + floatQuat constraintRotation, + floatQuat constraintToWorld + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_Deactivate")] + public static partial void SwingTwistConstraintPart_Deactivate(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_IsActive")] + public static partial Brutal.Bool8 SwingTwistConstraintPart_IsActive(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_WarmStart")] + public static partial void SwingTwistConstraintPart_WarmStart( + SwingTwistConstraintPart self, + Body body1, + Body body2, + float warmStartImpulseRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_SolveVelocityConstraint")] + public static partial Brutal.Bool8 SwingTwistConstraintPart_SolveVelocityConstraint( + SwingTwistConstraintPart self, + Body body1, + Body body2 + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_SolvePositionConstraint")] + public static partial Brutal.Bool8 SwingTwistConstraintPart_SolvePositionConstraint( + SwingTwistConstraintPart self, + Body body1, + Body body2, + floatQuat constraintRotation, + floatQuat constraintToBody1, + floatQuat constraintToBody2, + float baumgarte + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetTotalSwingYLambda")] + public static partial float SwingTwistConstraintPart_GetTotalSwingYLambda(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetTotalSwingZLambda")] + public static partial float SwingTwistConstraintPart_GetTotalSwingZLambda(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetTotalTwistLambda")] + public static partial float SwingTwistConstraintPart_GetTotalTwistLambda(SwingTwistConstraintPart self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetClampedTwistMin")] + public static partial uint SwingTwistConstraintPart_GetClampedTwistMin(); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetClampedTwistMax")] + public static partial uint SwingTwistConstraintPart_GetClampedTwistMax(); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetClampedSwingYMin")] + public static partial uint SwingTwistConstraintPart_GetClampedSwingYMin(); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetClampedSwingYMax")] + public static partial uint SwingTwistConstraintPart_GetClampedSwingYMax(); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetClampedSwingZMin")] + public static partial uint SwingTwistConstraintPart_GetClampedSwingZMin(); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintPart_GetClampedSwingZMax")] + public static partial uint SwingTwistConstraintPart_GetClampedSwingZMax(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintSettings.gen.cs new file mode 100644 index 0000000..130c807 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/SwingTwistConstraintSettings.gen.cs @@ -0,0 +1,227 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_Create")] + public static partial SwingTwistConstraintSettings SwingTwistConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetSpace")] + [SuppressGCTransition] + public static partial ConstraintSpace SwingTwistConstraintSettings_GetSpace( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetSpace")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetSpace( + SwingTwistConstraintSettings self, + ConstraintSpace value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetPosition1")] + [SuppressGCTransition] + public static partial float3 SwingTwistConstraintSettings_GetPosition1(SwingTwistConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetPosition1")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetPosition1( + SwingTwistConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetTwistAxis1")] + [SuppressGCTransition] + public static partial float3 SwingTwistConstraintSettings_GetTwistAxis1(SwingTwistConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetTwistAxis1")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetTwistAxis1( + SwingTwistConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetPlaneAxis1")] + [SuppressGCTransition] + public static partial float3 SwingTwistConstraintSettings_GetPlaneAxis1(SwingTwistConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetPlaneAxis1")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetPlaneAxis1( + SwingTwistConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetPosition2")] + [SuppressGCTransition] + public static partial float3 SwingTwistConstraintSettings_GetPosition2(SwingTwistConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetPosition2")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetPosition2( + SwingTwistConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetTwistAxis2")] + [SuppressGCTransition] + public static partial float3 SwingTwistConstraintSettings_GetTwistAxis2(SwingTwistConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetTwistAxis2")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetTwistAxis2( + SwingTwistConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetPlaneAxis2")] + [SuppressGCTransition] + public static partial float3 SwingTwistConstraintSettings_GetPlaneAxis2(SwingTwistConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetPlaneAxis2")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetPlaneAxis2( + SwingTwistConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetSwingType")] + [SuppressGCTransition] + public static partial SwingType SwingTwistConstraintSettings_GetSwingType( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetSwingType")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetSwingType( + SwingTwistConstraintSettings self, + SwingType value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetNormalHalfConeAngle")] + [SuppressGCTransition] + public static partial float SwingTwistConstraintSettings_GetNormalHalfConeAngle( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetNormalHalfConeAngle")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetNormalHalfConeAngle( + SwingTwistConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetPlaneHalfConeAngle")] + [SuppressGCTransition] + public static partial float SwingTwistConstraintSettings_GetPlaneHalfConeAngle( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetPlaneHalfConeAngle")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetPlaneHalfConeAngle( + SwingTwistConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetTwistMinAngle")] + [SuppressGCTransition] + public static partial float SwingTwistConstraintSettings_GetTwistMinAngle( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetTwistMinAngle")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetTwistMinAngle( + SwingTwistConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetTwistMaxAngle")] + [SuppressGCTransition] + public static partial float SwingTwistConstraintSettings_GetTwistMaxAngle( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetTwistMaxAngle")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetTwistMaxAngle( + SwingTwistConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetMaxFrictionTorque")] + [SuppressGCTransition] + public static partial float SwingTwistConstraintSettings_GetMaxFrictionTorque( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetMaxFrictionTorque")] + [SuppressGCTransition] + public static partial void SwingTwistConstraintSettings_SetMaxFrictionTorque( + SwingTwistConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetSwingMotorSettings")] + public static partial MotorSettings SwingTwistConstraintSettings_GetSwingMotorSettings( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetSwingMotorSettings")] + public static partial void SwingTwistConstraintSettings_SetSwingMotorSettings( + SwingTwistConstraintSettings self, + MotorSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_GetTwistMotorSettings")] + public static partial MotorSettings SwingTwistConstraintSettings_GetTwistMotorSettings( + SwingTwistConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "SwingTwistConstraintSettings_SetTwistMotorSettings")] + public static partial void SwingTwistConstraintSettings_SetTwistMotorSettings( + SwingTwistConstraintSettings self, + MotorSettings value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShape.gen.cs new file mode 100644 index 0000000..11323be --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShape.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShape_Create")] + public static partial TaperedCapsuleShape TaperedCapsuleShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShape_Create_2")] + public static partial TaperedCapsuleShape TaperedCapsuleShape_Create_2( + TaperedCapsuleShapeSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShape_GetTopRadius")] + public static partial float TaperedCapsuleShape_GetTopRadius(TaperedCapsuleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShape_GetBottomRadius")] + public static partial float TaperedCapsuleShape_GetBottomRadius(TaperedCapsuleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShape_GetHalfHeight")] + public static partial float TaperedCapsuleShape_GetHalfHeight(TaperedCapsuleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShape_Register")] + public static partial void TaperedCapsuleShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShapeSettings.gen.cs new file mode 100644 index 0000000..f536ecb --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TaperedCapsuleShapeSettings.gen.cs @@ -0,0 +1,77 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_Create")] + public static partial TaperedCapsuleShapeSettings TaperedCapsuleShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_Create_2")] + public static partial TaperedCapsuleShapeSettings TaperedCapsuleShapeSettings_Create_2( + float halfHeightOfTaperedCylinder, + float topRadius, + float bottomRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_IsValid")] + public static partial Brutal.Bool8 TaperedCapsuleShapeSettings_IsValid(TaperedCapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_IsSphere")] + public static partial Brutal.Bool8 TaperedCapsuleShapeSettings_IsSphere(TaperedCapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_GetHalfHeightOfTaperedCylinder")] + [SuppressGCTransition] + public static partial float TaperedCapsuleShapeSettings_GetHalfHeightOfTaperedCylinder( + TaperedCapsuleShapeSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_SetHalfHeightOfTaperedCylinder")] + [SuppressGCTransition] + public static partial void TaperedCapsuleShapeSettings_SetHalfHeightOfTaperedCylinder( + TaperedCapsuleShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_GetTopRadius")] + [SuppressGCTransition] + public static partial float TaperedCapsuleShapeSettings_GetTopRadius(TaperedCapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_SetTopRadius")] + [SuppressGCTransition] + public static partial void TaperedCapsuleShapeSettings_SetTopRadius( + TaperedCapsuleShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_GetBottomRadius")] + [SuppressGCTransition] + public static partial float TaperedCapsuleShapeSettings_GetBottomRadius(TaperedCapsuleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCapsuleShapeSettings_SetBottomRadius")] + [SuppressGCTransition] + public static partial void TaperedCapsuleShapeSettings_SetBottomRadius( + TaperedCapsuleShapeSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TaperedCylinderShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/TaperedCylinderShape.gen.cs new file mode 100644 index 0000000..f75bd37 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TaperedCylinderShape.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_Create")] + public static partial TaperedCylinderShape TaperedCylinderShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_Create_2")] + public static partial TaperedCylinderShape TaperedCylinderShape_Create_2( + TaperedCylinderShapeSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_GetTopRadius")] + public static partial float TaperedCylinderShape_GetTopRadius(TaperedCylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_GetBottomRadius")] + public static partial float TaperedCylinderShape_GetBottomRadius(TaperedCylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_GetConvexRadius")] + public static partial float TaperedCylinderShape_GetConvexRadius(TaperedCylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_GetHalfHeight")] + public static partial float TaperedCylinderShape_GetHalfHeight(TaperedCylinderShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShape_Register")] + public static partial void TaperedCylinderShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TaperedCylinderShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/TaperedCylinderShapeSettings.gen.cs new file mode 100644 index 0000000..4e4a9c0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TaperedCylinderShapeSettings.gen.cs @@ -0,0 +1,81 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_Create")] + public static partial TaperedCylinderShapeSettings TaperedCylinderShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_Create_2")] + public static partial TaperedCylinderShapeSettings TaperedCylinderShapeSettings_Create_2( + float halfHeightOfTaperedCylinder, + float topRadius, + float bottomRadius, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_GetHalfHeight")] + [SuppressGCTransition] + public static partial float TaperedCylinderShapeSettings_GetHalfHeight(TaperedCylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_SetHalfHeight")] + [SuppressGCTransition] + public static partial void TaperedCylinderShapeSettings_SetHalfHeight( + TaperedCylinderShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_GetTopRadius")] + [SuppressGCTransition] + public static partial float TaperedCylinderShapeSettings_GetTopRadius(TaperedCylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_SetTopRadius")] + [SuppressGCTransition] + public static partial void TaperedCylinderShapeSettings_SetTopRadius( + TaperedCylinderShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_GetBottomRadius")] + [SuppressGCTransition] + public static partial float TaperedCylinderShapeSettings_GetBottomRadius(TaperedCylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_SetBottomRadius")] + [SuppressGCTransition] + public static partial void TaperedCylinderShapeSettings_SetBottomRadius( + TaperedCylinderShapeSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_GetConvexRadius")] + [SuppressGCTransition] + public static partial float TaperedCylinderShapeSettings_GetConvexRadius(TaperedCylinderShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TaperedCylinderShapeSettings_SetConvexRadius")] + [SuppressGCTransition] + public static partial void TaperedCylinderShapeSettings_SetConvexRadius( + TaperedCylinderShapeSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TempAllocator.gen.cs b/Brutal.Jolt/Generated/PInvoke/TempAllocator.gen.cs new file mode 100644 index 0000000..ff68979 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TempAllocator.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TempAllocator_Allocate")] + public static partial void* TempAllocator_Allocate(TempAllocator self, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocator_Free")] + public static partial void TempAllocator_Free(TempAllocator self, void* address, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocator_GetNeeds_aligned_allocate")] + public static partial Brutal.Bool8 TempAllocator_GetNeeds_aligned_allocate(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TempAllocatorImpl.gen.cs b/Brutal.Jolt/Generated/PInvoke/TempAllocatorImpl.gen.cs new file mode 100644 index 0000000..fce1f76 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TempAllocatorImpl.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_Create")] + public static partial TempAllocatorImpl TempAllocatorImpl_Create(nuint size); + + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_Destroy")] + public static partial void TempAllocatorImpl_Destroy(TempAllocatorImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_Allocate")] + public static partial void* TempAllocatorImpl_Allocate(TempAllocatorImpl self, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_Free")] + public static partial void TempAllocatorImpl_Free(TempAllocatorImpl self, void* address, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_IsEmpty")] + public static partial Brutal.Bool8 TempAllocatorImpl_IsEmpty(TempAllocatorImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_GetSize")] + public static partial nuint TempAllocatorImpl_GetSize(TempAllocatorImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_GetUsage")] + public static partial nuint TempAllocatorImpl_GetUsage(TempAllocatorImpl self); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_CanAllocate")] + public static partial Brutal.Bool8 TempAllocatorImpl_CanAllocate(TempAllocatorImpl self, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImpl_OwnsMemory")] + public static partial Brutal.Bool8 TempAllocatorImpl_OwnsMemory(TempAllocatorImpl self, void* address); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TempAllocatorImplWithMallocFallback.gen.cs b/Brutal.Jolt/Generated/PInvoke/TempAllocatorImplWithMallocFallback.gen.cs new file mode 100644 index 0000000..c4f0e34 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TempAllocatorImplWithMallocFallback.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImplWithMallocFallback_Create")] + public static partial TempAllocatorImplWithMallocFallback TempAllocatorImplWithMallocFallback_Create( + uint size + ); + + [LibraryImport("jolt", EntryPoint = "TempAllocatorImplWithMallocFallback_Destroy")] + public static partial void TempAllocatorImplWithMallocFallback_Destroy( + TempAllocatorImplWithMallocFallback self + ); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImplWithMallocFallback_Allocate")] + public static partial void* TempAllocatorImplWithMallocFallback_Allocate( + TempAllocatorImplWithMallocFallback self, + uint size + ); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorImplWithMallocFallback_Free")] + public static partial void TempAllocatorImplWithMallocFallback_Free( + TempAllocatorImplWithMallocFallback self, + void* address, + uint size + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TempAllocatorMalloc.gen.cs b/Brutal.Jolt/Generated/PInvoke/TempAllocatorMalloc.gen.cs new file mode 100644 index 0000000..3baec94 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TempAllocatorMalloc.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "TempAllocatorMalloc_Create")] + public static partial TempAllocatorMalloc TempAllocatorMalloc_Create(); + + [LibraryImport("jolt", EntryPoint = "TempAllocatorMalloc_Destroy")] + public static partial void TempAllocatorMalloc_Destroy(TempAllocatorMalloc self); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorMalloc_Allocate")] + public static partial void* TempAllocatorMalloc_Allocate(TempAllocatorMalloc self, uint size); + + /// + [LibraryImport("jolt", EntryPoint = "TempAllocatorMalloc_Free")] + public static partial void TempAllocatorMalloc_Free(TempAllocatorMalloc self, void* address, uint size); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TrackedVehicleController.gen.cs b/Brutal.Jolt/Generated/PInvoke/TrackedVehicleController.gen.cs new file mode 100644 index 0000000..ce63c00 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TrackedVehicleController.gen.cs @@ -0,0 +1,104 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_Create")] + public static partial TrackedVehicleController TrackedVehicleController_Create( + TrackedVehicleControllerSettings settings, + VehicleConstraint constraint + ); + + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_Destroy")] + public static partial void TrackedVehicleController_Destroy(TrackedVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_SetDriverInput")] + public static partial void TrackedVehicleController_SetDriverInput( + TrackedVehicleController self, + float forward, + float leftRatio, + float rightRatio, + float brake + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_SetForwardInput")] + public static partial void TrackedVehicleController_SetForwardInput( + TrackedVehicleController self, + float forward + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetForwardInput")] + public static partial float TrackedVehicleController_GetForwardInput(TrackedVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_SetLeftRatio")] + public static partial void TrackedVehicleController_SetLeftRatio( + TrackedVehicleController self, + float leftRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetLeftRatio")] + public static partial float TrackedVehicleController_GetLeftRatio(TrackedVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_SetRightRatio")] + public static partial void TrackedVehicleController_SetRightRatio( + TrackedVehicleController self, + float rightRatio + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetRightRatio")] + public static partial float TrackedVehicleController_GetRightRatio(TrackedVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_SetBrakeInput")] + public static partial void TrackedVehicleController_SetBrakeInput( + TrackedVehicleController self, + float brake + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetBrakeInput")] + public static partial float TrackedVehicleController_GetBrakeInput(TrackedVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetEngine")] + public static partial VehicleEngine TrackedVehicleController_GetEngine(TrackedVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetTransmission")] + public static partial VehicleTransmission TrackedVehicleController_GetTransmission( + TrackedVehicleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_GetTracks")] + public static partial VehicleTrack TrackedVehicleController_GetTracks( + TrackedVehicleController self, + uint index + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleController_SetRPMMeter")] + public static partial void TrackedVehicleController_SetRPMMeter( + TrackedVehicleController self, + float3 position, + float size + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TrackedVehicleControllerSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/TrackedVehicleControllerSettings.gen.cs new file mode 100644 index 0000000..9b1536e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TrackedVehicleControllerSettings.gen.cs @@ -0,0 +1,52 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleControllerSettings_Create")] + public static partial TrackedVehicleControllerSettings TrackedVehicleControllerSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleControllerSettings_GetEngine")] + public static partial VehicleEngineSettings TrackedVehicleControllerSettings_GetEngine( + TrackedVehicleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleControllerSettings_SetEngine")] + public static partial void TrackedVehicleControllerSettings_SetEngine( + TrackedVehicleControllerSettings self, + VehicleEngineSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleControllerSettings_GetTransmission")] + public static partial VehicleTransmissionSettings TrackedVehicleControllerSettings_GetTransmission( + TrackedVehicleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleControllerSettings_SetTransmission")] + public static partial void TrackedVehicleControllerSettings_SetTransmission( + TrackedVehicleControllerSettings self, + VehicleTransmissionSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "TrackedVehicleControllerSettings_GetTracks")] + public static partial VehicleTrackSettings TrackedVehicleControllerSettings_GetTracks( + TrackedVehicleControllerSettings self, + uint index + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TransformedShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/TransformedShape.gen.cs new file mode 100644 index 0000000..b0f4c65 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TransformedShape.gen.cs @@ -0,0 +1,440 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_Create")] + public static partial TransformedShape TransformedShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_Create_2")] + public static partial TransformedShape TransformedShape_Create_2( + float3 positionCOM, + floatQuat rotation, + Shape shape, + uint bodyID, + SubShapeIDCreator subShapeIDCreator + ); + + [LibraryImport("jolt", EntryPoint = "TransformedShape_Destroy")] + public static partial void TransformedShape_Destroy(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CastRay")] + public static partial Brutal.Bool8 TransformedShape_CastRay( + TransformedShape self, + in RRayCast ray, + ref RayCastResult hit + ); + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also + /// slightly slower than the CastRay function that returns only a single hit. If you want the surface + /// normal of the hit use GetWorldSpaceSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected fraction)) on this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:41 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into castrayresults, which you allocate and size. Returns how many were written; + /// totalHits is how many the query found, so a larger span is needed when it exceeds the span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CastRay_2")] + public static partial uint TransformedShape_CastRay_2( + TransformedShape self, + in RRayCast ray, + RayCastSettings rayCastSettings, + RayCastResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a ray, allows collecting multiple hits. Note that this version is more flexible but also + /// slightly slower than the CastRay function that returns only a single hit. If you want the surface + /// normal of the hit use GetWorldSpaceSurfaceNormal(collected sub shape ID, + /// inRay.GetPointOnRay(collected fraction)) on this object. + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:41 + ///
+ /// void CastRay(const RRayCast &inRay, const RayCastSettings &inRayCastSettings, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CastRayClosest")] + public static partial uint TransformedShape_CastRayClosest( + TransformedShape self, + in RRayCast ray, + RayCastSettings rayCastSettings, + out RayCastResult result, + ShapeFilter shapeFilter + ); + + /// + /// + /// Check if inPoint is inside any shapes. For this tests all shapes are treated as if they were solid. + /// For a mesh shape, this test will only provide sensible information if the mesh is a closed manifold. + /// For each shape that collides, ioCollector will receive a hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:46 + ///
+ /// void CollidePoint(RVec3Arg inPoint, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collects every hit into collidepointresults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CollidePoint")] + public static partial uint TransformedShape_CollidePoint( + TransformedShape self, + float3 point, + CollidePointResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Collide a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:56 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape and report any hits to ioCollector + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Collects every hit into collideshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CollideShape")] + public static partial uint TransformedShape_CollideShape( + TransformedShape self, + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + CollideShapeResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Collide a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:56 + ///
+ /// void CollideShape(const Shape *inShape, Vec3Arg inShapeScale, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Collide a shape and report any hits to ioCollector + /// @param inShape Shape to test + /// @param inShapeScale Scale in local space of shape + /// @param inCenterOfMassTransform Center of mass transform for the shape + /// @param inCollideShapeSettings Settings + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CollideShapeClosest")] + public static partial uint TransformedShape_CollideShapeClosest( + TransformedShape self, + Shape shape, + float3 shapeScale, + in float4x4 centerOfMassTransform, + CollideShapeSettings collideShapeSettings, + float3 baseOffset, + out CollideShapeResult result, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:64 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM or inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Collects every hit into castshaperesults, which you allocate and size. Returns how many were + /// written; totalHits is how many the query found, so a larger span is needed when it exceeds the + /// span's length. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CastShape")] + public static partial uint TransformedShape_CastShape( + TransformedShape self, + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + ShapeCastResult* buffer, + uint capacity, + ShapeFilter shapeFilter + ); + + /// + /// + /// Cast a shape and report any hits to ioCollector + /// + /// + /// C++: + /// Jolt/Physics/Collision/TransformedShape.h:64 + ///
+ /// void CastShape(const RShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector, const ShapeFilter &inShapeFilter = { }) const + ///
+ ///
+ /// + /// + /// Cast a shape and report any hits to ioCollector + /// @param inShapeCast The shape cast and its position and direction + /// @param inShapeCastSettings Settings for the shape cast + /// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. mShapePositionCOM or inShapeCast.mCenterOfMassStart.GetTranslation() since floats are most accurate near the origin + /// @param ioCollector Collector that receives the hits + /// @param inShapeFilter Filter that allows you to reject collisions + /// + /// + /// Keeps only the closest (or deepest) hit. Returns false, and writes a native default-constructed + /// result (e.g. RayCastResult's fraction is 1 + epsilon), when nothing was hit. + /// + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CastShapeClosest")] + public static partial uint TransformedShape_CastShapeClosest( + TransformedShape self, + in RShapeCast shapeCast, + ShapeCastSettings shapeCastSettings, + float3 baseOffset, + out ShapeCastResult result, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_CollectTransformedShapes")] + public static partial nint TransformedShape_CollectTransformedShapes( + TransformedShape self, + in AABox box, + ShapeFilter shapeFilter + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetTrianglesStart")] + public static partial void TransformedShape_GetTrianglesStart( + TransformedShape self, + ref Shape.GetTrianglesContext context, + in AABox box, + float3 baseOffset + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetTrianglesNext")] + public static partial int TransformedShape_GetTrianglesNext( + TransformedShape self, + ref Shape.GetTrianglesContext context, + int maxTrianglesRequested, + float3* triangleVertices, + PhysicsMaterial* materials + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetShapeScale")] + public static partial float3 TransformedShape_GetShapeScale(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetShapeScale")] + public static partial void TransformedShape_SetShapeScale(TransformedShape self, float3 scale); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetCenterOfMassTransform")] + public static partial float4x4 TransformedShape_GetCenterOfMassTransform(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetInverseCenterOfMassTransform")] + public static partial float4x4 TransformedShape_GetInverseCenterOfMassTransform(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetWorldTransform")] + public static partial void TransformedShape_SetWorldTransform( + TransformedShape self, + float3 position, + floatQuat rotation, + float3 scale + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetWorldTransform_2")] + public static partial void TransformedShape_SetWorldTransform_2( + TransformedShape self, + in float4x4 transform + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetWorldTransform")] + public static partial float4x4 TransformedShape_GetWorldTransform(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetWorldSpaceBounds")] + public static partial AABox TransformedShape_GetWorldSpaceBounds(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_MakeSubShapeIDRelativeToShape")] + public static partial uint TransformedShape_MakeSubShapeIDRelativeToShape( + TransformedShape self, + uint subShapeID + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetWorldSpaceSurfaceNormal")] + public static partial float3 TransformedShape_GetWorldSpaceSurfaceNormal( + TransformedShape self, + uint subShapeID, + float3 position + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetSupportingFace")] + public static partial void TransformedShape_GetSupportingFace( + TransformedShape self, + uint subShapeID, + float3 direction, + float3 baseOffset, + out StaticArrayVec3_32 vertices + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetMaterial")] + public static partial PhysicsMaterial TransformedShape_GetMaterial(TransformedShape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetSubShapeUserData")] + public static partial ulong TransformedShape_GetSubShapeUserData(TransformedShape self, uint subShapeID); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetSubShapeTransformedShape")] + public static partial TransformedShape TransformedShape_GetSubShapeTransformedShape( + TransformedShape self, + uint subShapeID, + out uint remainder + ); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_sGetBodyID")] + public static partial uint TransformedShape_sGetBodyID(TransformedShape ts); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetShapePositionCOM")] + [SuppressGCTransition] + public static partial float3 TransformedShape_GetShapePositionCOM(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetShapePositionCOM")] + [SuppressGCTransition] + public static partial void TransformedShape_SetShapePositionCOM(TransformedShape self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetShapeRotation")] + [SuppressGCTransition] + public static partial floatQuat TransformedShape_GetShapeRotation(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetShapeRotation")] + [SuppressGCTransition] + public static partial void TransformedShape_SetShapeRotation(TransformedShape self, floatQuat value); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetShape")] + public static partial Shape TransformedShape_GetShape(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetShape")] + public static partial void TransformedShape_SetShape(TransformedShape self, Shape value); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetBodyID")] + [SuppressGCTransition] + public static partial uint TransformedShape_GetBodyID(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetBodyID")] + public static partial void TransformedShape_SetBodyID(TransformedShape self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_GetSubShapeIDCreator")] + public static partial SubShapeIDCreator TransformedShape_GetSubShapeIDCreator(TransformedShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TransformedShape_SetSubShapeIDCreator")] + public static partial void TransformedShape_SetSubShapeIDCreator( + TransformedShape self, + SubShapeIDCreator value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Triangle.gen.cs b/Brutal.Jolt/Generated/PInvoke/Triangle.gen.cs new file mode 100644 index 0000000..ea81021 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Triangle.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Triangle_Create")] + public static partial void Triangle_Create(out Triangle outResult); + + /// + [LibraryImport("jolt", EntryPoint = "Triangle_Create_2")] + public static partial void Triangle_Create_2( + float3 v1, + float3 v2, + float3 v3, + uint materialIndex, + uint userData, + out Triangle outResult + ); + + /// + /// + /// Get center of triangle + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:21 + ///
+ /// Vec3 GetCentroid() const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "Triangle_GetCentroid")] + public static partial float3 Triangle_GetCentroid(ref Triangle self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TriangleShape.gen.cs b/Brutal.Jolt/Generated/PInvoke/TriangleShape.gen.cs new file mode 100644 index 0000000..c9ac4ac --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TriangleShape.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_Create")] + public static partial TriangleShape TriangleShape_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_Create_2")] + public static partial TriangleShape TriangleShape_Create_2(TriangleShapeSettings settings); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_Create_3")] + public static partial TriangleShape TriangleShape_Create_3( + float3 v1, + float3 v2, + float3 v3, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_GetVertex1")] + public static partial float3 TriangleShape_GetVertex1(TriangleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_GetVertex2")] + public static partial float3 TriangleShape_GetVertex2(TriangleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_GetVertex3")] + public static partial float3 TriangleShape_GetVertex3(TriangleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_GetConvexRadius")] + public static partial float TriangleShape_GetConvexRadius(TriangleShape self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShape_Register")] + public static partial void TriangleShape_Register(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TriangleShapeSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/TriangleShapeSettings.gen.cs new file mode 100644 index 0000000..0944676 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TriangleShapeSettings.gen.cs @@ -0,0 +1,69 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_Create")] + public static partial TriangleShapeSettings TriangleShapeSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_Create_2")] + public static partial TriangleShapeSettings TriangleShapeSettings_Create_2( + float3 v1, + float3 v2, + float3 v3, + float convexRadius, + PhysicsMaterial material + ); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_GetV1")] + [SuppressGCTransition] + public static partial float3 TriangleShapeSettings_GetV1(TriangleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_SetV1")] + [SuppressGCTransition] + public static partial void TriangleShapeSettings_SetV1(TriangleShapeSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_GetV2")] + [SuppressGCTransition] + public static partial float3 TriangleShapeSettings_GetV2(TriangleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_SetV2")] + [SuppressGCTransition] + public static partial void TriangleShapeSettings_SetV2(TriangleShapeSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_GetV3")] + [SuppressGCTransition] + public static partial float3 TriangleShapeSettings_GetV3(TriangleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_SetV3")] + [SuppressGCTransition] + public static partial void TriangleShapeSettings_SetV3(TriangleShapeSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_GetConvexRadius")] + [SuppressGCTransition] + public static partial float TriangleShapeSettings_GetConvexRadius(TriangleShapeSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleShapeSettings_SetConvexRadius")] + [SuppressGCTransition] + public static partial void TriangleShapeSettings_SetConvexRadius(TriangleShapeSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TriangleSplitter.gen.cs b/Brutal.Jolt/Generated/PInvoke/TriangleSplitter.gen.cs new file mode 100644 index 0000000..9f6ca1d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TriangleSplitter.gen.cs @@ -0,0 +1,54 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitter_GetStats")] + public static partial void TriangleSplitter_GetStats( + TriangleSplitter self, + ref TriangleSplitter.Stats stats + ); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitter_GetInitialRange")] + public static partial void TriangleSplitter_GetInitialRange( + TriangleSplitter self, + out TriangleSplitter.Range outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitter_Split")] + public static partial Brutal.Bool8 TriangleSplitter_Split( + TriangleSplitter self, + in TriangleSplitter.Range triangles, + ref TriangleSplitter.Range left, + ref TriangleSplitter.Range right + ); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitter_GetVertices")] + public static partial void TriangleSplitter_GetVertices( + TriangleSplitter self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitter_GetTriangle")] + public static partial void TriangleSplitter_GetTriangle( + TriangleSplitter self, + uint idx, + out uint outInRange, + out IndexedTriangle outResult + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TriangleSplitterBinning.gen.cs b/Brutal.Jolt/Generated/PInvoke/TriangleSplitterBinning.gen.cs new file mode 100644 index 0000000..a0f3277 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TriangleSplitterBinning.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitterBinning_Create")] + public static partial TriangleSplitterBinning TriangleSplitterBinning_Create( + float3* vertices, + nuint verticesCount, + IndexedTriangle* triangles, + nuint trianglesCount, + uint minNumBins, + uint maxNumBins, + uint numTrianglesPerBin + ); + + [LibraryImport("jolt", EntryPoint = "TriangleSplitterBinning_Destroy")] + public static partial void TriangleSplitterBinning_Destroy(TriangleSplitterBinning self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TriangleSplitterMean.gen.cs b/Brutal.Jolt/Generated/PInvoke/TriangleSplitterMean.gen.cs new file mode 100644 index 0000000..834eec8 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TriangleSplitterMean.gen.cs @@ -0,0 +1,27 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TriangleSplitterMean_Create")] + public static partial TriangleSplitterMean TriangleSplitterMean_Create( + float3* vertices, + nuint verticesCount, + IndexedTriangle* triangles, + nuint trianglesCount + ); + + [LibraryImport("jolt", EntryPoint = "TriangleSplitterMean_Destroy")] + public static partial void TriangleSplitterMean_Destroy(TriangleSplitterMean self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TwoBodyConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/TwoBodyConstraint.gen.cs new file mode 100644 index 0000000..f6d0c38 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TwoBodyConstraint.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TwoBodyConstraint_GetBody1")] + public static partial Body TwoBodyConstraint_GetBody1(TwoBodyConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "TwoBodyConstraint_GetBody2")] + public static partial Body TwoBodyConstraint_GetBody2(TwoBodyConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "TwoBodyConstraint_GetConstraintToBody1Matrix")] + public static partial float4x4 TwoBodyConstraint_GetConstraintToBody1Matrix(TwoBodyConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "TwoBodyConstraint_GetConstraintToBody2Matrix")] + public static partial float4x4 TwoBodyConstraint_GetConstraintToBody2Matrix(TwoBodyConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/TwoBodyConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/TwoBodyConstraintSettings.gen.cs new file mode 100644 index 0000000..f77ac73 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/TwoBodyConstraintSettings.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "TwoBodyConstraintSettings_Create")] + public static partial TwoBodyConstraint TwoBodyConstraintSettings_Create( + TwoBodyConstraintSettings self, + Body body1, + Body body2 + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleAntiRollBar.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleAntiRollBar.gen.cs new file mode 100644 index 0000000..4f3764e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleAntiRollBar.gen.cs @@ -0,0 +1,49 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:21 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "VehicleAntiRollBar_SaveBinaryState")] + public static partial void VehicleAntiRollBar_SaveBinaryState( + ref VehicleAntiRollBar self, + StreamOut stream + ); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:24 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "VehicleAntiRollBar_RestoreBinaryState")] + public static partial void VehicleAntiRollBar_RestoreBinaryState( + ref VehicleAntiRollBar self, + StreamIn stream + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTester.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTester.gen.cs new file mode 100644 index 0000000..27153d8 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTester.gen.cs @@ -0,0 +1,108 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_GetObjectLayer")] + public static partial ushort VehicleCollisionTester_GetObjectLayer(VehicleCollisionTester self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_SetObjectLayer")] + public static partial void VehicleCollisionTester_SetObjectLayer( + VehicleCollisionTester self, + ushort objectLayer + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_SetBroadPhaseLayerFilter")] + public static partial void VehicleCollisionTester_SetBroadPhaseLayerFilter( + VehicleCollisionTester self, + BroadPhaseLayerFilter filter + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_GetBroadPhaseLayerFilter")] + public static partial BroadPhaseLayerFilter VehicleCollisionTester_GetBroadPhaseLayerFilter( + VehicleCollisionTester self + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_SetObjectLayerFilter")] + public static partial void VehicleCollisionTester_SetObjectLayerFilter( + VehicleCollisionTester self, + ObjectLayerFilter filter + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_GetObjectLayerFilter")] + public static partial ObjectLayerFilter VehicleCollisionTester_GetObjectLayerFilter( + VehicleCollisionTester self + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_SetBodyFilter")] + public static partial void VehicleCollisionTester_SetBodyFilter( + VehicleCollisionTester self, + BodyFilter filter + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_GetBodyFilter")] + public static partial BodyFilter VehicleCollisionTester_GetBodyFilter(VehicleCollisionTester self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_Collide")] + public static partial Brutal.Bool8 VehicleCollisionTester_Collide( + VehicleCollisionTester self, + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + out Body body, + out uint subShapeID, + out float3 contactPosition, + out float3 contactNormal, + out float suspensionLength, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_PredictContactProperties")] + public static partial void VehicleCollisionTester_PredictContactProperties( + VehicleCollisionTester self, + PhysicsSystem physicsSystem, + VehicleConstraint vehicleConstraint, + uint wheelIndex, + float3 origin, + float3 direction, + uint vehicleBodyID, + ref Body body, + ref uint subShapeID, + ref float3 contactPosition, + ref float3 contactNormal, + ref float suspensionLength, + out uint outInRange + ); + + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_AddRef")] + public static partial void VehicleCollisionTester_AddRef(VehicleCollisionTester self); + + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_Release")] + public static partial void VehicleCollisionTester_Release(VehicleCollisionTester self); + + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTester_GetRefCount")] + public static partial uint VehicleCollisionTester_GetRefCount(VehicleCollisionTester self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastCylinder.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastCylinder.gen.cs new file mode 100644 index 0000000..11aaae5 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastCylinder.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTesterCastCylinder_Create")] + public static partial VehicleCollisionTesterCastCylinder VehicleCollisionTesterCastCylinder_Create( + ushort objectLayer, + float convexRadiusFraction + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastSphere.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastSphere.gen.cs new file mode 100644 index 0000000..019ad1d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterCastSphere.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTesterCastSphere_Create")] + public static partial VehicleCollisionTesterCastSphere VehicleCollisionTesterCastSphere_Create( + ushort objectLayer, + float radius, + float3 up, + float maxSlopeAngle + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterRay.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterRay.gen.cs new file mode 100644 index 0000000..a7f1961 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleCollisionTesterRay.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleCollisionTesterRay_Create")] + public static partial VehicleCollisionTesterRay VehicleCollisionTesterRay_Create( + ushort objectLayer, + float3 up, + float maxSlopeAngle + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleConstraint.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleConstraint.gen.cs new file mode 100644 index 0000000..dfa9d80 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleConstraint.gen.cs @@ -0,0 +1,266 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_Create")] + public static partial VehicleConstraint VehicleConstraint_Create( + Body vehicleBody, + VehicleConstraintSettings settings + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetMaxPitchRollAngle")] + public static partial void VehicleConstraint_SetMaxPitchRollAngle( + VehicleConstraint self, + float maxPitchRollAngle + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetMaxPitchRollAngle")] + public static partial float VehicleConstraint_GetMaxPitchRollAngle(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetVehicleCollisionTester")] + public static partial void VehicleConstraint_SetVehicleCollisionTester( + VehicleConstraint self, + VehicleCollisionTester tester + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetVehicleCollisionTester")] + public static partial VehicleCollisionTester VehicleConstraint_GetVehicleCollisionTester( + VehicleConstraint self + ); + + /// + /// + /// Set the function that combines the friction of two bodies and returns it Default method is the + /// geometric mean: sqrt(friction1 * friction2). + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:89 + ///
+ /// void SetCombineFriction(const CombineFunction &inCombineFriction) + ///
+ ///
+ /// + /// + /// combineFriction: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Jolt calls it without a null check, so null is rejected. The callback and userData are + /// retained by the native object until they are replaced or the owner is destroyed - keep whatever + /// userData points at (a GCHandle, an allocation) alive for at least that long, and don't free it at + /// the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetCombineFriction")] + public static partial void VehicleConstraint_SetCombineFriction( + VehicleConstraint self, + delegate* unmanaged[Cdecl] combineFriction, + nint combineFrictionUserData + ); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:99 + ///
+ /// void SetPreStepCallback(const StepCallback &inPreStepCallback) + ///
+ ///
+ /// + /// + /// preStepCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Pass null to clear it. The callback and userData are retained by the native object until + /// they are replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an + /// allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetPreStepCallback")] + public static partial void VehicleConstraint_SetPreStepCallback( + VehicleConstraint self, + delegate* unmanaged[Cdecl] preStepCallback, + nint preStepCallbackUserData + ); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:105 + ///
+ /// void SetPostCollideCallback(const StepCallback &inPostCollideCallback) + ///
+ ///
+ /// + /// + /// postCollideCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Pass null to clear it. The callback and userData are retained by the native object until + /// they are replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an + /// allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetPostCollideCallback")] + public static partial void VehicleConstraint_SetPostCollideCallback( + VehicleConstraint self, + delegate* unmanaged[Cdecl]< + VehicleConstraint, + PhysicsStepListenerContext, + nint, + void> postCollideCallback, + nint postCollideCallbackUserData + ); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleConstraint.h:111 + ///
+ /// void SetPostStepCallback(const StepCallback &inPostStepCallback) + ///
+ ///
+ /// + /// + /// postStepCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Pass null to clear it. The callback and userData are retained by the native object until + /// they are replaced or the owner is destroyed - keep whatever userData points at (a GCHandle, an + /// allocation) alive for at least that long, and don't free it at the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetPostStepCallback")] + public static partial void VehicleConstraint_SetPostStepCallback( + VehicleConstraint self, + delegate* unmanaged[Cdecl] postStepCallback, + nint postStepCallbackUserData + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_OverrideGravity")] + public static partial void VehicleConstraint_OverrideGravity(VehicleConstraint self, float3 gravity); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_IsGravityOverridden")] + public static partial Brutal.Bool8 VehicleConstraint_IsGravityOverridden(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetGravityOverride")] + public static partial float3 VehicleConstraint_GetGravityOverride(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_ResetGravityOverride")] + public static partial void VehicleConstraint_ResetGravityOverride(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetLocalForward")] + public static partial float3 VehicleConstraint_GetLocalForward(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetLocalUp")] + public static partial float3 VehicleConstraint_GetLocalUp(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetWorldUp")] + public static partial float3 VehicleConstraint_GetWorldUp(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetVehicleBody")] + public static partial Body VehicleConstraint_GetVehicleBody(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetController")] + public static partial VehicleController VehicleConstraint_GetController(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetWheels")] + public static partial void VehicleConstraint_GetWheels( + VehicleConstraint self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetWheel")] + public static partial Wheel VehicleConstraint_GetWheel( + VehicleConstraint self, + uint idx, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetWheelLocalBasis")] + public static partial void VehicleConstraint_GetWheelLocalBasis( + VehicleConstraint self, + Wheel wheel, + out float3 forward, + out float3 up, + out float3 right + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetWheelLocalTransform")] + public static partial float4x4 VehicleConstraint_GetWheelLocalTransform( + VehicleConstraint self, + uint wheelIndex, + float3 wheelRight, + float3 wheelUp, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetWheelWorldTransform")] + public static partial float4x4 VehicleConstraint_GetWheelWorldTransform( + VehicleConstraint self, + uint wheelIndex, + float3 wheelRight, + float3 wheelUp, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetAntiRollBars")] + public static partial void VehicleConstraint_GetAntiRollBars( + VehicleConstraint self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetNumStepsBetweenCollisionTestActive")] + public static partial void VehicleConstraint_SetNumStepsBetweenCollisionTestActive( + VehicleConstraint self, + uint steps + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetNumStepsBetweenCollisionTestActive")] + public static partial uint VehicleConstraint_GetNumStepsBetweenCollisionTestActive(VehicleConstraint self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_SetNumStepsBetweenCollisionTestInactive")] + public static partial void VehicleConstraint_SetNumStepsBetweenCollisionTestInactive( + VehicleConstraint self, + uint steps + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_GetNumStepsBetweenCollisionTestInactive")] + public static partial uint VehicleConstraint_GetNumStepsBetweenCollisionTestInactive( + VehicleConstraint self + ); + + [LibraryImport("jolt", EntryPoint = "VehicleConstraint_AsPhysicsStepListener")] + public static partial PhysicsStepListener VehicleConstraint_AsPhysicsStepListener(VehicleConstraint self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleConstraintSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleConstraintSettings.gen.cs new file mode 100644 index 0000000..924dd89 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleConstraintSettings.gen.cs @@ -0,0 +1,94 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_Create")] + public static partial VehicleConstraintSettings VehicleConstraintSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_GetUp")] + [SuppressGCTransition] + public static partial float3 VehicleConstraintSettings_GetUp(VehicleConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_SetUp")] + [SuppressGCTransition] + public static partial void VehicleConstraintSettings_SetUp(VehicleConstraintSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_GetForward")] + [SuppressGCTransition] + public static partial float3 VehicleConstraintSettings_GetForward(VehicleConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_SetForward")] + [SuppressGCTransition] + public static partial void VehicleConstraintSettings_SetForward( + VehicleConstraintSettings self, + float3 value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_GetMaxPitchRollAngle")] + [SuppressGCTransition] + public static partial float VehicleConstraintSettings_GetMaxPitchRollAngle(VehicleConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_SetMaxPitchRollAngle")] + [SuppressGCTransition] + public static partial void VehicleConstraintSettings_SetMaxPitchRollAngle( + VehicleConstraintSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_GetWheels")] + public static partial nint VehicleConstraintSettings_GetWheels(VehicleConstraintSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_SetWheels")] + public static partial void VehicleConstraintSettings_SetWheels( + VehicleConstraintSettings self, + WheelSettings* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_GetAntiRollBars")] + public static partial void VehicleConstraintSettings_GetAntiRollBars( + VehicleConstraintSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_SetAntiRollBars")] + public static partial void VehicleConstraintSettings_SetAntiRollBars( + VehicleConstraintSettings self, + VehicleAntiRollBar* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_GetController")] + public static partial VehicleControllerSettings VehicleConstraintSettings_GetController( + VehicleConstraintSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleConstraintSettings_SetController")] + public static partial void VehicleConstraintSettings_SetController( + VehicleConstraintSettings self, + VehicleControllerSettings value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleController.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleController.gen.cs new file mode 100644 index 0000000..52dad60 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleController.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleController_GetConstraint")] + public static partial VehicleConstraint VehicleController_GetConstraint(VehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleController_GetSettings")] + public static partial VehicleControllerSettings VehicleController_GetSettings(VehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleController_AsWheeledVehicleController")] + public static partial WheeledVehicleController VehicleController_AsWheeledVehicleController( + VehicleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleController_AsMotorcycleController")] + public static partial MotorcycleController VehicleController_AsMotorcycleController(VehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleController_AsTrackedVehicleController")] + public static partial TrackedVehicleController VehicleController_AsTrackedVehicleController( + VehicleController self + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleControllerSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleControllerSettings.gen.cs new file mode 100644 index 0000000..420a0f0 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleControllerSettings.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_GetRTTI")] + public static partial RTTI VehicleControllerSettings_GetRTTI(VehicleControllerSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_CastTo")] + public static partial void* VehicleControllerSettings_CastTo(VehicleControllerSettings self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_SaveBinaryState")] + public static partial void VehicleControllerSettings_SaveBinaryState( + VehicleControllerSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_RestoreBinaryState")] + public static partial void VehicleControllerSettings_RestoreBinaryState( + VehicleControllerSettings self, + StreamIn stream + ); + + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_AddRef")] + public static partial void VehicleControllerSettings_AddRef(VehicleControllerSettings self); + + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_Release")] + public static partial void VehicleControllerSettings_Release(VehicleControllerSettings self); + + [LibraryImport("jolt", EntryPoint = "VehicleControllerSettings_GetRefCount")] + public static partial uint VehicleControllerSettings_GetRefCount(VehicleControllerSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleDifferentialSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleDifferentialSettings.gen.cs new file mode 100644 index 0000000..2182476 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleDifferentialSettings.gen.cs @@ -0,0 +1,78 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:19 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "VehicleDifferentialSettings_SaveBinaryState")] + public static partial void VehicleDifferentialSettings_SaveBinaryState( + ref VehicleDifferentialSettings self, + StreamOut stream + ); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:22 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ [LibraryImport("jolt", EntryPoint = "VehicleDifferentialSettings_RestoreBinaryState")] + public static partial void VehicleDifferentialSettings_RestoreBinaryState( + ref VehicleDifferentialSettings self, + StreamIn stream + ); + + /// + /// + /// Calculate the torque ratio between left and right wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:29 + ///
+ /// void CalculateTorqueRatio(float inLeftAngularVelocity, float inRightAngularVelocity, float &outLeftTorqueFraction, float &outRightTorqueFraction) const + ///
+ ///
+ /// + /// + /// Calculate the torque ratio between left and right wheel + /// @param inLeftAngularVelocity Angular velocity of left wheel (rad / s) + /// @param inRightAngularVelocity Angular velocity of right wheel (rad / s) + /// @param outLeftTorqueFraction Fraction of torque that should go to the left wheel + /// @param outRightTorqueFraction Fraction of torque that should go to the right wheel + /// + /// + [LibraryImport("jolt", EntryPoint = "VehicleDifferentialSettings_CalculateTorqueRatio")] + public static partial void VehicleDifferentialSettings_CalculateTorqueRatio( + ref VehicleDifferentialSettings self, + float leftAngularVelocity, + float rightAngularVelocity, + out float leftTorqueFraction, + out float rightTorqueFraction + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleEngine.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleEngine.gen.cs new file mode 100644 index 0000000..e2f8c8e --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleEngine.gen.cs @@ -0,0 +1,74 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "VehicleEngine_Create")] + public static partial VehicleEngine VehicleEngine_Create(); + + [LibraryImport("jolt", EntryPoint = "VehicleEngine_Destroy")] + public static partial void VehicleEngine_Destroy(VehicleEngine self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_ClampRPM")] + public static partial void VehicleEngine_ClampRPM(VehicleEngine self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_GetCurrentRPM")] + public static partial float VehicleEngine_GetCurrentRPM(VehicleEngine self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_SetCurrentRPM")] + public static partial void VehicleEngine_SetCurrentRPM(VehicleEngine self, float rpm); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_GetAngularVelocity")] + public static partial float VehicleEngine_GetAngularVelocity(VehicleEngine self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_GetTorque")] + public static partial float VehicleEngine_GetTorque(VehicleEngine self, float acceleration); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_ApplyTorque")] + public static partial void VehicleEngine_ApplyTorque(VehicleEngine self, float torque, float deltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_ApplyDamping")] + public static partial void VehicleEngine_ApplyDamping(VehicleEngine self, float deltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_ConvertRPMToAngle")] + public static partial float VehicleEngine_ConvertRPMToAngle(VehicleEngine self, float rpm); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_DrawRPM")] + public static partial void VehicleEngine_DrawRPM( + VehicleEngine self, + DebugRenderer renderer, + float3 position, + float3 forward, + float3 up, + float size, + float shiftDownRPM, + float shiftUpRPM + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_AllowSleep")] + public static partial Brutal.Bool8 VehicleEngine_AllowSleep(VehicleEngine self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngine_GetAngularVelocityToRPM")] + public static partial float VehicleEngine_GetAngularVelocityToRPM(); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleEngineSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleEngineSettings.gen.cs new file mode 100644 index 0000000..11c4644 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleEngineSettings.gen.cs @@ -0,0 +1,97 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_Create")] + public static partial VehicleEngineSettings VehicleEngineSettings_Create(); + + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_Destroy")] + public static partial void VehicleEngineSettings_Destroy(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SaveBinaryState")] + public static partial void VehicleEngineSettings_SaveBinaryState( + VehicleEngineSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_RestoreBinaryState")] + public static partial void VehicleEngineSettings_RestoreBinaryState( + VehicleEngineSettings self, + StreamIn stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_GetMaxTorque")] + [SuppressGCTransition] + public static partial float VehicleEngineSettings_GetMaxTorque(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SetMaxTorque")] + [SuppressGCTransition] + public static partial void VehicleEngineSettings_SetMaxTorque(VehicleEngineSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_GetMinRPM")] + [SuppressGCTransition] + public static partial float VehicleEngineSettings_GetMinRPM(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SetMinRPM")] + [SuppressGCTransition] + public static partial void VehicleEngineSettings_SetMinRPM(VehicleEngineSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_GetMaxRPM")] + [SuppressGCTransition] + public static partial float VehicleEngineSettings_GetMaxRPM(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SetMaxRPM")] + [SuppressGCTransition] + public static partial void VehicleEngineSettings_SetMaxRPM(VehicleEngineSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_GetNormalizedTorque")] + public static partial LinearCurve VehicleEngineSettings_GetNormalizedTorque(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SetNormalizedTorque")] + public static partial void VehicleEngineSettings_SetNormalizedTorque( + VehicleEngineSettings self, + LinearCurve value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_GetInertia")] + [SuppressGCTransition] + public static partial float VehicleEngineSettings_GetInertia(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SetInertia")] + [SuppressGCTransition] + public static partial void VehicleEngineSettings_SetInertia(VehicleEngineSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_GetAngularDamping")] + [SuppressGCTransition] + public static partial float VehicleEngineSettings_GetAngularDamping(VehicleEngineSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleEngineSettings_SetAngularDamping")] + [SuppressGCTransition] + public static partial void VehicleEngineSettings_SetAngularDamping(VehicleEngineSettings self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleTrack.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleTrack.gen.cs new file mode 100644 index 0000000..c46f8f1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleTrack.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "VehicleTrack_Create")] + public static partial VehicleTrack VehicleTrack_Create(); + + [LibraryImport("jolt", EntryPoint = "VehicleTrack_Destroy")] + public static partial void VehicleTrack_Destroy(VehicleTrack self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrack_GetAngularVelocity")] + [SuppressGCTransition] + public static partial float VehicleTrack_GetAngularVelocity(VehicleTrack self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrack_SetAngularVelocity")] + [SuppressGCTransition] + public static partial void VehicleTrack_SetAngularVelocity(VehicleTrack self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleTrackSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleTrackSettings.gen.cs new file mode 100644 index 0000000..f82a776 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleTrackSettings.gen.cs @@ -0,0 +1,103 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_Create")] + public static partial VehicleTrackSettings VehicleTrackSettings_Create(); + + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_Destroy")] + public static partial void VehicleTrackSettings_Destroy(VehicleTrackSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SaveBinaryState")] + public static partial void VehicleTrackSettings_SaveBinaryState( + VehicleTrackSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_RestoreBinaryState")] + public static partial void VehicleTrackSettings_RestoreBinaryState( + VehicleTrackSettings self, + StreamIn stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_GetDrivenWheel")] + [SuppressGCTransition] + public static partial uint VehicleTrackSettings_GetDrivenWheel(VehicleTrackSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SetDrivenWheel")] + [SuppressGCTransition] + public static partial void VehicleTrackSettings_SetDrivenWheel(VehicleTrackSettings self, uint value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_GetWheels")] + public static partial void VehicleTrackSettings_GetWheels( + VehicleTrackSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SetWheels")] + public static partial void VehicleTrackSettings_SetWheels( + VehicleTrackSettings self, + uint* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_GetInertia")] + [SuppressGCTransition] + public static partial float VehicleTrackSettings_GetInertia(VehicleTrackSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SetInertia")] + [SuppressGCTransition] + public static partial void VehicleTrackSettings_SetInertia(VehicleTrackSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_GetAngularDamping")] + [SuppressGCTransition] + public static partial float VehicleTrackSettings_GetAngularDamping(VehicleTrackSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SetAngularDamping")] + [SuppressGCTransition] + public static partial void VehicleTrackSettings_SetAngularDamping(VehicleTrackSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_GetMaxBrakeTorque")] + [SuppressGCTransition] + public static partial float VehicleTrackSettings_GetMaxBrakeTorque(VehicleTrackSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SetMaxBrakeTorque")] + [SuppressGCTransition] + public static partial void VehicleTrackSettings_SetMaxBrakeTorque(VehicleTrackSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_GetDifferentialRatio")] + [SuppressGCTransition] + public static partial float VehicleTrackSettings_GetDifferentialRatio(VehicleTrackSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTrackSettings_SetDifferentialRatio")] + [SuppressGCTransition] + public static partial void VehicleTrackSettings_SetDifferentialRatio( + VehicleTrackSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleTransmission.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleTransmission.gen.cs new file mode 100644 index 0000000..df467a7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleTransmission.gen.cs @@ -0,0 +1,59 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_Create")] + public static partial VehicleTransmission VehicleTransmission_Create(); + + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_Destroy")] + public static partial void VehicleTransmission_Destroy(VehicleTransmission self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_Set")] + public static partial void VehicleTransmission_Set( + VehicleTransmission self, + int currentGear, + float clutchFriction + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_Update")] + public static partial void VehicleTransmission_Update( + VehicleTransmission self, + float deltaTime, + float currentRPM, + float forwardInput, + Brutal.Bool8 canShiftUp + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_GetCurrentGear")] + public static partial int VehicleTransmission_GetCurrentGear(VehicleTransmission self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_GetClutchFriction")] + public static partial float VehicleTransmission_GetClutchFriction(VehicleTransmission self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_IsSwitchingGear")] + public static partial Brutal.Bool8 VehicleTransmission_IsSwitchingGear(VehicleTransmission self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_GetCurrentRatio")] + public static partial float VehicleTransmission_GetCurrentRatio(VehicleTransmission self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmission_AllowSleep")] + public static partial Brutal.Bool8 VehicleTransmission_AllowSleep(VehicleTransmission self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/VehicleTransmissionSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/VehicleTransmissionSettings.gen.cs new file mode 100644 index 0000000..7511bf2 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/VehicleTransmissionSettings.gen.cs @@ -0,0 +1,160 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_Create")] + public static partial VehicleTransmissionSettings VehicleTransmissionSettings_Create(); + + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_Destroy")] + public static partial void VehicleTransmissionSettings_Destroy(VehicleTransmissionSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SaveBinaryState")] + public static partial void VehicleTransmissionSettings_SaveBinaryState( + VehicleTransmissionSettings self, + StreamOut stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_RestoreBinaryState")] + public static partial void VehicleTransmissionSettings_RestoreBinaryState( + VehicleTransmissionSettings self, + StreamIn stream + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetMode")] + [SuppressGCTransition] + public static partial TransmissionMode VehicleTransmissionSettings_GetMode( + VehicleTransmissionSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetMode")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetMode( + VehicleTransmissionSettings self, + TransmissionMode value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetGearRatios")] + public static partial void VehicleTransmissionSettings_GetGearRatios( + VehicleTransmissionSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetGearRatios")] + public static partial void VehicleTransmissionSettings_SetGearRatios( + VehicleTransmissionSettings self, + float* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetReverseGearRatios")] + public static partial void VehicleTransmissionSettings_GetReverseGearRatios( + VehicleTransmissionSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetReverseGearRatios")] + public static partial void VehicleTransmissionSettings_SetReverseGearRatios( + VehicleTransmissionSettings self, + float* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetSwitchTime")] + [SuppressGCTransition] + public static partial float VehicleTransmissionSettings_GetSwitchTime(VehicleTransmissionSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetSwitchTime")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetSwitchTime( + VehicleTransmissionSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetClutchReleaseTime")] + [SuppressGCTransition] + public static partial float VehicleTransmissionSettings_GetClutchReleaseTime( + VehicleTransmissionSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetClutchReleaseTime")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetClutchReleaseTime( + VehicleTransmissionSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetSwitchLatency")] + [SuppressGCTransition] + public static partial float VehicleTransmissionSettings_GetSwitchLatency(VehicleTransmissionSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetSwitchLatency")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetSwitchLatency( + VehicleTransmissionSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetShiftUpRPM")] + [SuppressGCTransition] + public static partial float VehicleTransmissionSettings_GetShiftUpRPM(VehicleTransmissionSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetShiftUpRPM")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetShiftUpRPM( + VehicleTransmissionSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetShiftDownRPM")] + [SuppressGCTransition] + public static partial float VehicleTransmissionSettings_GetShiftDownRPM(VehicleTransmissionSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetShiftDownRPM")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetShiftDownRPM( + VehicleTransmissionSettings self, + float value + ); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_GetClutchStrength")] + [SuppressGCTransition] + public static partial float VehicleTransmissionSettings_GetClutchStrength(VehicleTransmissionSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "VehicleTransmissionSettings_SetClutchStrength")] + [SuppressGCTransition] + public static partial void VehicleTransmissionSettings_SetClutchStrength( + VehicleTransmissionSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/Wheel.gen.cs b/Brutal.Jolt/Generated/PInvoke/Wheel.gen.cs new file mode 100644 index 0000000..4dcd38d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/Wheel.gen.cs @@ -0,0 +1,113 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetSettings")] + public static partial WheelSettings Wheel_GetSettings(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetAngularVelocity")] + public static partial float Wheel_GetAngularVelocity(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_SetAngularVelocity")] + public static partial void Wheel_SetAngularVelocity(Wheel self, float vel); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetRotationAngle")] + public static partial float Wheel_GetRotationAngle(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_SetRotationAngle")] + public static partial void Wheel_SetRotationAngle(Wheel self, float angle); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetSteerAngle")] + public static partial float Wheel_GetSteerAngle(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_SetSteerAngle")] + public static partial void Wheel_SetSteerAngle(Wheel self, float angle); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_HasContact")] + public static partial Brutal.Bool8 Wheel_HasContact(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactBodyID")] + public static partial uint Wheel_GetContactBodyID(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactSubShapeID")] + public static partial uint Wheel_GetContactSubShapeID(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactPosition")] + public static partial float3 Wheel_GetContactPosition(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactPointVelocity")] + public static partial float3 Wheel_GetContactPointVelocity(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactNormal")] + public static partial float3 Wheel_GetContactNormal(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactLongitudinal")] + public static partial float3 Wheel_GetContactLongitudinal(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetContactLateral")] + public static partial float3 Wheel_GetContactLateral(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetSuspensionLength")] + public static partial float Wheel_GetSuspensionLength(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_HasHitHardPoint")] + public static partial Brutal.Bool8 Wheel_HasHitHardPoint(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetSuspensionLambda")] + public static partial float Wheel_GetSuspensionLambda(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetLongitudinalLambda")] + public static partial float Wheel_GetLongitudinalLambda(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_GetLateralLambda")] + public static partial float Wheel_GetLateralLambda(Wheel self); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_SolveLongitudinalConstraintPart")] + public static partial Brutal.Bool8 Wheel_SolveLongitudinalConstraintPart( + Wheel self, + VehicleConstraint constraint, + float minImpulse, + float maxImpulse + ); + + /// + [LibraryImport("jolt", EntryPoint = "Wheel_SolveLateralConstraintPart")] + public static partial Brutal.Bool8 Wheel_SolveLateralConstraintPart( + Wheel self, + VehicleConstraint constraint, + float minImpulse, + float maxImpulse + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheelSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheelSettings.gen.cs new file mode 100644 index 0000000..6cada51 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheelSettings.gen.cs @@ -0,0 +1,174 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "WheelSettings_Create")] + public static partial WheelSettings WheelSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetRTTI")] + public static partial RTTI WheelSettings_GetRTTI(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_CastTo")] + public static partial void* WheelSettings_CastTo(WheelSettings self, RTTI rtti); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SaveBinaryState")] + public static partial void WheelSettings_SaveBinaryState(WheelSettings self, StreamOut stream); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_RestoreBinaryState")] + public static partial void WheelSettings_RestoreBinaryState(WheelSettings self, StreamIn stream); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetPosition")] + [SuppressGCTransition] + public static partial float3 WheelSettings_GetPosition(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetPosition")] + [SuppressGCTransition] + public static partial void WheelSettings_SetPosition(WheelSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSuspensionForcePoint")] + [SuppressGCTransition] + public static partial float3 WheelSettings_GetSuspensionForcePoint(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSuspensionForcePoint")] + [SuppressGCTransition] + public static partial void WheelSettings_SetSuspensionForcePoint(WheelSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSuspensionDirection")] + [SuppressGCTransition] + public static partial float3 WheelSettings_GetSuspensionDirection(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSuspensionDirection")] + [SuppressGCTransition] + public static partial void WheelSettings_SetSuspensionDirection(WheelSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSteeringAxis")] + [SuppressGCTransition] + public static partial float3 WheelSettings_GetSteeringAxis(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSteeringAxis")] + [SuppressGCTransition] + public static partial void WheelSettings_SetSteeringAxis(WheelSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetWheelUp")] + [SuppressGCTransition] + public static partial float3 WheelSettings_GetWheelUp(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetWheelUp")] + [SuppressGCTransition] + public static partial void WheelSettings_SetWheelUp(WheelSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetWheelForward")] + [SuppressGCTransition] + public static partial float3 WheelSettings_GetWheelForward(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetWheelForward")] + [SuppressGCTransition] + public static partial void WheelSettings_SetWheelForward(WheelSettings self, float3 value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSuspensionMinLength")] + [SuppressGCTransition] + public static partial float WheelSettings_GetSuspensionMinLength(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSuspensionMinLength")] + [SuppressGCTransition] + public static partial void WheelSettings_SetSuspensionMinLength(WheelSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSuspensionMaxLength")] + [SuppressGCTransition] + public static partial float WheelSettings_GetSuspensionMaxLength(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSuspensionMaxLength")] + [SuppressGCTransition] + public static partial void WheelSettings_SetSuspensionMaxLength(WheelSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSuspensionPreloadLength")] + [SuppressGCTransition] + public static partial float WheelSettings_GetSuspensionPreloadLength(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSuspensionPreloadLength")] + [SuppressGCTransition] + public static partial void WheelSettings_SetSuspensionPreloadLength(WheelSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetSuspensionSpring")] + public static partial SpringSettings WheelSettings_GetSuspensionSpring(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetSuspensionSpring")] + public static partial void WheelSettings_SetSuspensionSpring(WheelSettings self, SpringSettings value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetRadius")] + [SuppressGCTransition] + public static partial float WheelSettings_GetRadius(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetRadius")] + [SuppressGCTransition] + public static partial void WheelSettings_SetRadius(WheelSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetWidth")] + [SuppressGCTransition] + public static partial float WheelSettings_GetWidth(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetWidth")] + [SuppressGCTransition] + public static partial void WheelSettings_SetWidth(WheelSettings self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetEnableSuspensionForcePoint")] + [SuppressGCTransition] + public static partial Brutal.Bool8 WheelSettings_GetEnableSuspensionForcePoint(WheelSettings self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettings_SetEnableSuspensionForcePoint")] + [SuppressGCTransition] + public static partial void WheelSettings_SetEnableSuspensionForcePoint( + WheelSettings self, + Brutal.Bool8 value + ); + + [LibraryImport("jolt", EntryPoint = "WheelSettings_AddRef")] + public static partial void WheelSettings_AddRef(WheelSettings self); + + [LibraryImport("jolt", EntryPoint = "WheelSettings_Release")] + public static partial void WheelSettings_Release(WheelSettings self); + + [LibraryImport("jolt", EntryPoint = "WheelSettings_GetRefCount")] + public static partial uint WheelSettings_GetRefCount(WheelSettings self); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheelSettingsTV.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheelSettingsTV.gen.cs new file mode 100644 index 0000000..3a18c26 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheelSettingsTV.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "WheelSettingsTV_Create")] + public static partial WheelSettingsTV WheelSettingsTV_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsTV_GetLongitudinalFriction")] + [SuppressGCTransition] + public static partial float WheelSettingsTV_GetLongitudinalFriction(WheelSettingsTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsTV_SetLongitudinalFriction")] + [SuppressGCTransition] + public static partial void WheelSettingsTV_SetLongitudinalFriction(WheelSettingsTV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsTV_GetLateralFriction")] + [SuppressGCTransition] + public static partial float WheelSettingsTV_GetLateralFriction(WheelSettingsTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsTV_SetLateralFriction")] + [SuppressGCTransition] + public static partial void WheelSettingsTV_SetLateralFriction(WheelSettingsTV self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheelSettingsWV.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheelSettingsWV.gen.cs new file mode 100644 index 0000000..4e765b7 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheelSettingsWV.gen.cs @@ -0,0 +1,85 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_Create")] + public static partial WheelSettingsWV WheelSettingsWV_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetInertia")] + [SuppressGCTransition] + public static partial float WheelSettingsWV_GetInertia(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetInertia")] + [SuppressGCTransition] + public static partial void WheelSettingsWV_SetInertia(WheelSettingsWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetAngularDamping")] + [SuppressGCTransition] + public static partial float WheelSettingsWV_GetAngularDamping(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetAngularDamping")] + [SuppressGCTransition] + public static partial void WheelSettingsWV_SetAngularDamping(WheelSettingsWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetMaxSteerAngle")] + [SuppressGCTransition] + public static partial float WheelSettingsWV_GetMaxSteerAngle(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetMaxSteerAngle")] + [SuppressGCTransition] + public static partial void WheelSettingsWV_SetMaxSteerAngle(WheelSettingsWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetLongitudinalFriction")] + public static partial LinearCurve WheelSettingsWV_GetLongitudinalFriction(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetLongitudinalFriction")] + public static partial void WheelSettingsWV_SetLongitudinalFriction(WheelSettingsWV self, LinearCurve value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetLateralFriction")] + public static partial LinearCurve WheelSettingsWV_GetLateralFriction(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetLateralFriction")] + public static partial void WheelSettingsWV_SetLateralFriction(WheelSettingsWV self, LinearCurve value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetMaxBrakeTorque")] + [SuppressGCTransition] + public static partial float WheelSettingsWV_GetMaxBrakeTorque(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetMaxBrakeTorque")] + [SuppressGCTransition] + public static partial void WheelSettingsWV_SetMaxBrakeTorque(WheelSettingsWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_GetMaxHandBrakeTorque")] + [SuppressGCTransition] + public static partial float WheelSettingsWV_GetMaxHandBrakeTorque(WheelSettingsWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelSettingsWV_SetMaxHandBrakeTorque")] + [SuppressGCTransition] + public static partial void WheelSettingsWV_SetMaxHandBrakeTorque(WheelSettingsWV self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheelTV.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheelTV.gen.cs new file mode 100644 index 0000000..55d5650 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheelTV.gen.cs @@ -0,0 +1,80 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_Create")] + public static partial WheelTV WheelTV_Create(WheelSettingsTV wheel); + + [LibraryImport("jolt", EntryPoint = "WheelTV_Destroy")] + public static partial void WheelTV_Destroy(WheelTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_GetSettings")] + public static partial WheelSettingsTV WheelTV_GetSettings(WheelTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_CalculateAngularVelocity")] + public static partial void WheelTV_CalculateAngularVelocity(WheelTV self, VehicleConstraint constraint); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_Update")] + public static partial void WheelTV_Update( + WheelTV self, + uint wheelIndex, + float deltaTime, + VehicleConstraint constraint, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_GetTrackIndex")] + [SuppressGCTransition] + public static partial int WheelTV_GetTrackIndex(WheelTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_SetTrackIndex")] + [SuppressGCTransition] + public static partial void WheelTV_SetTrackIndex(WheelTV self, int value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_GetCombinedLongitudinalFriction")] + [SuppressGCTransition] + public static partial float WheelTV_GetCombinedLongitudinalFriction(WheelTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_SetCombinedLongitudinalFriction")] + [SuppressGCTransition] + public static partial void WheelTV_SetCombinedLongitudinalFriction(WheelTV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_GetCombinedLateralFriction")] + [SuppressGCTransition] + public static partial float WheelTV_GetCombinedLateralFriction(WheelTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_SetCombinedLateralFriction")] + [SuppressGCTransition] + public static partial void WheelTV_SetCombinedLateralFriction(WheelTV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_GetBrakeImpulse")] + [SuppressGCTransition] + public static partial float WheelTV_GetBrakeImpulse(WheelTV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelTV_SetBrakeImpulse")] + [SuppressGCTransition] + public static partial void WheelTV_SetBrakeImpulse(WheelTV self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheelWV.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheelWV.gen.cs new file mode 100644 index 0000000..997e7b1 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheelWV.gen.cs @@ -0,0 +1,90 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_Create")] + public static partial WheelWV WheelWV_Create(WheelSettingsWV wheel); + + [LibraryImport("jolt", EntryPoint = "WheelWV_Destroy")] + public static partial void WheelWV_Destroy(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_GetSettings")] + public static partial WheelSettingsWV WheelWV_GetSettings(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_ApplyTorque")] + public static partial void WheelWV_ApplyTorque(WheelWV self, float torque, float deltaTime); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_Update")] + public static partial void WheelWV_Update( + WheelWV self, + uint wheelIndex, + float deltaTime, + VehicleConstraint constraint, + out uint outInRange + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_GetLongitudinalSlip")] + [SuppressGCTransition] + public static partial float WheelWV_GetLongitudinalSlip(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_SetLongitudinalSlip")] + [SuppressGCTransition] + public static partial void WheelWV_SetLongitudinalSlip(WheelWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_GetLateralSlip")] + [SuppressGCTransition] + public static partial float WheelWV_GetLateralSlip(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_SetLateralSlip")] + [SuppressGCTransition] + public static partial void WheelWV_SetLateralSlip(WheelWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_GetCombinedLongitudinalFriction")] + [SuppressGCTransition] + public static partial float WheelWV_GetCombinedLongitudinalFriction(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_SetCombinedLongitudinalFriction")] + [SuppressGCTransition] + public static partial void WheelWV_SetCombinedLongitudinalFriction(WheelWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_GetCombinedLateralFriction")] + [SuppressGCTransition] + public static partial float WheelWV_GetCombinedLateralFriction(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_SetCombinedLateralFriction")] + [SuppressGCTransition] + public static partial void WheelWV_SetCombinedLateralFriction(WheelWV self, float value); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_GetBrakeImpulse")] + [SuppressGCTransition] + public static partial float WheelWV_GetBrakeImpulse(WheelWV self); + + /// + [LibraryImport("jolt", EntryPoint = "WheelWV_SetBrakeImpulse")] + [SuppressGCTransition] + public static partial void WheelWV_SetBrakeImpulse(WheelWV self, float value); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheeledVehicleController.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheeledVehicleController.gen.cs new file mode 100644 index 0000000..82ca50d --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheeledVehicleController.gen.cs @@ -0,0 +1,157 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_Create")] + public static partial WheeledVehicleController WheeledVehicleController_Create( + WheeledVehicleControllerSettings settings, + VehicleConstraint constraint + ); + + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_Destroy")] + public static partial void WheeledVehicleController_Destroy(WheeledVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetDriverInput")] + public static partial void WheeledVehicleController_SetDriverInput( + WheeledVehicleController self, + float forward, + float right, + float brake, + float handBrake + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetForwardInput")] + public static partial void WheeledVehicleController_SetForwardInput( + WheeledVehicleController self, + float forward + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetForwardInput")] + public static partial float WheeledVehicleController_GetForwardInput(WheeledVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetRightInput")] + public static partial void WheeledVehicleController_SetRightInput( + WheeledVehicleController self, + float right + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetRightInput")] + public static partial float WheeledVehicleController_GetRightInput(WheeledVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetBrakeInput")] + public static partial void WheeledVehicleController_SetBrakeInput( + WheeledVehicleController self, + float brake + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetBrakeInput")] + public static partial float WheeledVehicleController_GetBrakeInput(WheeledVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetHandBrakeInput")] + public static partial void WheeledVehicleController_SetHandBrakeInput( + WheeledVehicleController self, + float handBrake + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetHandBrakeInput")] + public static partial float WheeledVehicleController_GetHandBrakeInput(WheeledVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetEngine")] + public static partial VehicleEngine WheeledVehicleController_GetEngine(WheeledVehicleController self); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetTransmission")] + public static partial VehicleTransmission WheeledVehicleController_GetTransmission( + WheeledVehicleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetDifferentials")] + public static partial void WheeledVehicleController_GetDifferentials( + WheeledVehicleController self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetDifferentialLimitedSlipRatio")] + public static partial float WheeledVehicleController_GetDifferentialLimitedSlipRatio( + WheeledVehicleController self + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetDifferentialLimitedSlipRatio")] + public static partial void WheeledVehicleController_SetDifferentialLimitedSlipRatio( + WheeledVehicleController self, + float v + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_GetWheelSpeedAtClutch")] + public static partial float WheeledVehicleController_GetWheelSpeedAtClutch(WheeledVehicleController self); + + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/WheeledVehicleController.h:151 + ///
+ /// void SetTireMaxImpulseCallback(const TireMaxImpulseCallback &inTireMaxImpulseCallback) + ///
+ ///
+ /// + /// + /// tireMaxImpulseCallback: The callback is invoked from native code: it must be a static method marked + /// [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], and userData is passed back to it + /// verbatim. Jolt calls it without a null check, so null is rejected. The callback and userData are + /// retained by the native object until they are replaced or the owner is destroyed - keep whatever + /// userData points at (a GCHandle, an allocation) alive for at least that long, and don't free it at + /// the end of the call. + /// + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetTireMaxImpulseCallback")] + public static partial void WheeledVehicleController_SetTireMaxImpulseCallback( + WheeledVehicleController self, + delegate* unmanaged[Cdecl]< + uint, + float*, + float*, + float, + float, + float, + float, + float, + float, + nint, + void> tireMaxImpulseCallback, + nint tireMaxImpulseCallbackUserData + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleController_SetRPMMeter")] + public static partial void WheeledVehicleController_SetRPMMeter( + WheeledVehicleController self, + float3 position, + float size + ); + } + } +} diff --git a/Brutal.Jolt/Generated/PInvoke/WheeledVehicleControllerSettings.gen.cs b/Brutal.Jolt/Generated/PInvoke/WheeledVehicleControllerSettings.gen.cs new file mode 100644 index 0000000..ab8b844 --- /dev/null +++ b/Brutal.Jolt/Generated/PInvoke/WheeledVehicleControllerSettings.gen.cs @@ -0,0 +1,74 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + public static partial class Jolt + { + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_Create")] + public static partial WheeledVehicleControllerSettings WheeledVehicleControllerSettings_Create(); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_GetEngine")] + public static partial VehicleEngineSettings WheeledVehicleControllerSettings_GetEngine( + WheeledVehicleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_SetEngine")] + public static partial void WheeledVehicleControllerSettings_SetEngine( + WheeledVehicleControllerSettings self, + VehicleEngineSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_GetTransmission")] + public static partial VehicleTransmissionSettings WheeledVehicleControllerSettings_GetTransmission( + WheeledVehicleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_SetTransmission")] + public static partial void WheeledVehicleControllerSettings_SetTransmission( + WheeledVehicleControllerSettings self, + VehicleTransmissionSettings value + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_GetDifferentials")] + public static partial void WheeledVehicleControllerSettings_GetDifferentials( + WheeledVehicleControllerSettings self, + out NativeSpanView outResult + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_SetDifferentials")] + public static partial void WheeledVehicleControllerSettings_SetDifferentials( + WheeledVehicleControllerSettings self, + VehicleDifferentialSettings* value, + nuint valueCount + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_GetDifferentialLimitedSlipRatio")] + [SuppressGCTransition] + public static partial float WheeledVehicleControllerSettings_GetDifferentialLimitedSlipRatio( + WheeledVehicleControllerSettings self + ); + + /// + [LibraryImport("jolt", EntryPoint = "WheeledVehicleControllerSettings_SetDifferentialLimitedSlipRatio")] + [SuppressGCTransition] + public static partial void WheeledVehicleControllerSettings_SetDifferentialLimitedSlipRatio( + WheeledVehicleControllerSettings self, + float value + ); + } + } +} diff --git a/Brutal.Jolt/Generated/Structs/AABBTreeBuilderStats.gen.cs b/Brutal.Jolt/Generated/Structs/AABBTreeBuilderStats.gen.cs new file mode 100644 index 0000000..5496153 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/AABBTreeBuilderStats.gen.cs @@ -0,0 +1,182 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:13 + ///
+ /// struct AABBTreeBuilderStats + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct AABBTreeBuilderStats + { + /// + /// + /// Stats returned by the triangle splitter algorithm + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:16 + ///
+ /// TriangleSplitter::Stats mSplitterStats + ///
+ ///
+ /// + /// + /// @name Splitter stats + /// + /// + [FieldOffset(0)] + public TriangleSplitter.Stats SplitterStats; + + /// + /// + /// Surface Area Heuristic cost of this tree + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:19 + ///
+ /// float mSAHCost = 0.0f + ///
+ ///
+ /// + /// + /// @name Tree structure + /// + /// + [FieldOffset(16)] + public float SAHCost; + + /// + /// + /// Minimal depth of tree (number of nodes) + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:20 + ///
+ /// int mMinDepth = 0 + ///
+ ///
+ [FieldOffset(20)] + public int MinDepth; + + /// + /// + /// Maximum depth of tree (number of nodes) + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:21 + ///
+ /// int mMaxDepth = 0 + ///
+ ///
+ [FieldOffset(24)] + public int MaxDepth; + + /// + /// + /// Number of nodes in the tree + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:22 + ///
+ /// int mNodeCount = 0 + ///
+ ///
+ [FieldOffset(28)] + public int NodeCount; + + /// + /// + /// Number of leaf nodes (that contain triangles) + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:23 + ///
+ /// int mLeafNodeCount = 0 + ///
+ ///
+ [FieldOffset(32)] + public int LeafNodeCount; + + /// + /// + /// Configured max triangles per leaf + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:26 + ///
+ /// int mMaxTrianglesPerLeaf = 0 + ///
+ ///
+ /// + /// + /// @name Configured stats + /// + /// + [FieldOffset(36)] + public int MaxTrianglesPerLeaf; + + /// + /// + /// Minimal amount of triangles in a leaf + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:29 + ///
+ /// int mTreeMinTrianglesPerLeaf = 0 + ///
+ ///
+ /// + /// + /// @name Actual stats + /// + /// + [FieldOffset(40)] + public int TreeMinTrianglesPerLeaf; + + /// + /// + /// Maximal amount of triangles in a leaf + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:30 + ///
+ /// int mTreeMaxTrianglesPerLeaf = 0 + ///
+ ///
+ [FieldOffset(44)] + public int TreeMaxTrianglesPerLeaf; + + /// + /// + /// Average amount of triangles in leaf nodes + /// + /// + /// C++: + /// Jolt/AABBTree/AABBTreeBuilder.h:31 + ///
+ /// float mTreeAvgTrianglesPerLeaf = 0.0f + ///
+ ///
+ [FieldOffset(48)] + public float TreeAvgTrianglesPerLeaf; + } +} diff --git a/Brutal.Jolt/Generated/Structs/AABox.gen.cs b/Brutal.Jolt/Generated/Structs/AABox.gen.cs new file mode 100644 index 0000000..059f768 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/AABox.gen.cs @@ -0,0 +1,515 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Axis aligned box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:15 + ///
+ /// class AABox + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct AABox + { + /// + /// + /// Bounding box min and max + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:309 + ///
+ /// Vec3 mMin + ///
+ ///
+ [FieldOffset(0)] + public float3 Min; + + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:310 + ///
+ /// Vec3 mMax + ///
+ ///
+ [FieldOffset(16)] + public float3 Max; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:21 + ///
+ /// AABox() + ///
+ ///
+ public static AABox Create() => Jolt.PInvoke.AABox_Create(); + + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:22 + ///
+ /// AABox(Vec3Arg inMin, Vec3Arg inMax) + ///
+ ///
+ public static AABox Create(float3 min, float3 max) => Jolt.PInvoke.AABox_Create_2(min, max); + + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:23 + ///
+ /// AABox(DVec3Arg inMin, DVec3Arg inMax) + ///
+ ///
+ public static AABox Create(double3 min, double3 max) => Jolt.PInvoke.AABox_Create_3(min, max); + + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:24 + ///
+ /// AABox(Vec3Arg inCenter, float inRadius) + ///
+ ///
+ public static AABox Create(float3 center, float radius) => Jolt.PInvoke.AABox_Create_4(center, radius); + + /// + /// + /// Create box from 2 points + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:27 + ///
+ /// static AABox sFromTwoPoints(Vec3Arg inP1, Vec3Arg inP2) + ///
+ ///
+ public static AABox FromTwoPoints(float3 p1, float3 p2) => Jolt.PInvoke.AABox_FromTwoPoints(p1, p2); + + /// + /// + /// Create box from indexed triangle + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:30 + ///
+ /// static AABox sFromTriangle(const VertexList &inVertices, const IndexedTriangle &inTriangle) + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + public static unsafe AABox FromTriangle(ReadOnlySpan vertices, in IndexedTriangle triangle) + { + fixed (float3* vertices_fixed = vertices) + { + return Jolt.PInvoke.AABox_FromTriangle(vertices_fixed, (nuint)vertices.Length, in triangle); + } + } + + /// + /// + /// Get bounding box of size FLT_MAX + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:38 + ///
+ /// static AABox sBiggest() + ///
+ ///
+ public static AABox Biggest() => Jolt.PInvoke.AABox_Biggest(); + + /// + /// + /// Reset the bounding box to an empty bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:49 + ///
+ /// void SetEmpty() + ///
+ ///
+ public void SetEmpty() => Jolt.PInvoke.AABox_SetEmpty(ref this); + + /// + /// + /// Check if the bounding box is valid (max >= min) + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:56 + ///
+ /// bool IsValid() const + ///
+ ///
+ public readonly bool IsValid() => Jolt.PInvoke.AABox_IsValid(ref Unsafe.AsRef(in this)); + + /// + /// + /// Encapsulate triangle in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:87 + ///
+ /// void Encapsulate(const VertexList &inVertices, const IndexedTriangle &inTriangle) + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + public unsafe void Encapsulate(ReadOnlySpan vertices, in IndexedTriangle triangle) + { + fixed (float3* vertices_fixed = vertices) + { + Jolt.PInvoke.AABox_Encapsulate(ref this, vertices_fixed, (nuint)vertices.Length, in triangle); + } + } + + /// + /// + /// Encapsulate point in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:62 + ///
+ /// void Encapsulate(Vec3Arg inPos) + ///
+ ///
+ public void Encapsulate(float3 pos) => Jolt.PInvoke.AABox_Encapsulate_2(ref this, pos); + + /// + /// + /// Encapsulate bounding box in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:69 + ///
+ /// void Encapsulate(const AABox &inRHS) + ///
+ ///
+ public void Encapsulate(in AABox rhs) => Jolt.PInvoke.AABox_Encapsulate_3(ref this, in rhs); + + /// + /// + /// Encapsulate triangle in bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:76 + ///
+ /// void Encapsulate(const Triangle &inRHS) + ///
+ ///
+ public void Encapsulate(in Triangle rhs) => Jolt.PInvoke.AABox_Encapsulate_4(ref this, in rhs); + + /// + /// + /// Intersect this bounding box with inOther, returns the intersection + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:94 + ///
+ /// AABox Intersect(const AABox &inOther) const + ///
+ ///
+ public readonly AABox Intersect(in AABox other) => + Jolt.PInvoke.AABox_Intersect(ref Unsafe.AsRef(in this), in other); + + /// + /// + /// Make sure that each edge of the bounding box has a minimal length + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:100 + ///
+ /// void EnsureMinimalEdgeLength(float inMinEdgeLength) + ///
+ ///
+ public void EnsureMinimalEdgeLength(float minEdgeLength) => + Jolt.PInvoke.AABox_EnsureMinimalEdgeLength(ref this, minEdgeLength); + + /// + /// + /// Widen the box on both sides by inVector + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:107 + ///
+ /// void ExpandBy(Vec3Arg inVector) + ///
+ ///
+ public void ExpandBy(float3 vector) => Jolt.PInvoke.AABox_ExpandBy(ref this, vector); + + /// + /// + /// Get center of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:114 + ///
+ /// Vec3 GetCenter() const + ///
+ ///
+ public readonly float3 GetCenter() => Jolt.PInvoke.AABox_GetCenter(ref Unsafe.AsRef(in this)); + + /// + /// + /// Get extent of bounding box (half of the size) + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:120 + ///
+ /// Vec3 GetExtent() const + ///
+ ///
+ public readonly float3 GetExtent() => Jolt.PInvoke.AABox_GetExtent(ref Unsafe.AsRef(in this)); + + /// + /// + /// Get size of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:126 + ///
+ /// Vec3 GetSize() const + ///
+ ///
+ public readonly float3 GetSize() => Jolt.PInvoke.AABox_GetSize(ref Unsafe.AsRef(in this)); + + /// + /// + /// Get surface area of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:132 + ///
+ /// float GetSurfaceArea() const + ///
+ ///
+ public readonly float GetSurfaceArea() => Jolt.PInvoke.AABox_GetSurfaceArea(ref Unsafe.AsRef(in this)); + + /// + /// + /// Get volume of bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:139 + ///
+ /// float GetVolume() const + ///
+ ///
+ public readonly float GetVolume() => Jolt.PInvoke.AABox_GetVolume(ref Unsafe.AsRef(in this)); + + /// + /// + /// Check if this box contains another box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:146 + ///
+ /// bool Contains(const AABox &inOther) const + ///
+ ///
+ public readonly bool Contains(in AABox other) => + Jolt.PInvoke.AABox_Contains(ref Unsafe.AsRef(in this), in other); + + /// + /// + /// Check if this box contains a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:152 + ///
+ /// bool Contains(Vec3Arg inOther) const + ///
+ ///
+ public readonly bool Contains(float3 other) => Jolt.PInvoke.AABox_Contains_2(ref Unsafe.AsRef(in this), other); + + /// + /// + /// Check if this box contains a point + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:158 + ///
+ /// bool Contains(DVec3Arg inOther) const + ///
+ ///
+ public readonly bool Contains(double3 other) => Jolt.PInvoke.AABox_Contains_3(ref Unsafe.AsRef(in this), other); + + /// + /// + /// Check if this box overlaps with another box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:164 + ///
+ /// bool Overlaps(const AABox &inOther) const + ///
+ ///
+ public readonly bool Overlaps(in AABox other) => + Jolt.PInvoke.AABox_Overlaps(ref Unsafe.AsRef(in this), in other); + + /// + /// + /// Check if this box overlaps with a plane + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:170 + ///
+ /// bool Overlaps(const Plane &inPlane) const + ///
+ ///
+ public readonly bool Overlaps(in Plane plane) => + Jolt.PInvoke.AABox_Overlaps_2(ref Unsafe.AsRef(in this), in plane); + + /// + /// + /// Translate bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:179 + ///
+ /// void Translate(Vec3Arg inTranslation) + ///
+ ///
+ public void Translate(float3 translation) => Jolt.PInvoke.AABox_Translate(ref this, translation); + + /// + /// + /// Translate bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:186 + ///
+ /// void Translate(DVec3Arg inTranslation) + ///
+ ///
+ public void Translate(double3 translation) => Jolt.PInvoke.AABox_Translate_2(ref this, translation); + + /// + /// + /// Transform bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:193 + ///
+ /// AABox Transformed(Mat44Arg inMatrix) const + ///
+ ///
+ public readonly AABox Transformed(in float4x4 matrix) => + Jolt.PInvoke.AABox_Transformed(ref Unsafe.AsRef(in this), in matrix); + + /// + /// + /// Transform bounding box + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:216 + ///
+ /// AABox Transformed(DMat44Arg inMatrix) const + ///
+ ///
+ public readonly AABox Transformed(in double4x4 matrix) => + Jolt.PInvoke.AABox_Transformed_2(ref Unsafe.AsRef(in this), in matrix); + + /// + /// + /// Scale this bounding box, can handle non-uniform and negative scaling + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:224 + ///
+ /// AABox Scaled(Vec3Arg inScale) const + ///
+ ///
+ public readonly AABox Scaled(float3 scale) => Jolt.PInvoke.AABox_Scaled(ref Unsafe.AsRef(in this), scale); + + /// + /// + /// Calculate the support vector for this convex shape. + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:230 + ///
+ /// Vec3 GetSupport(Vec3Arg inDirection) const + ///
+ ///
+ public readonly float3 GetSupport(float3 direction) => + Jolt.PInvoke.AABox_GetSupport(ref Unsafe.AsRef(in this), direction); + + /// + /// + /// Get the closest point on or in this box to inPoint + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:297 + ///
+ /// Vec3 GetClosestPoint(Vec3Arg inPoint) const + ///
+ ///
+ public readonly float3 GetClosestPoint(float3 point) => + Jolt.PInvoke.AABox_GetClosestPoint(ref Unsafe.AsRef(in this), point); + + /// + /// + /// Get the squared distance between inPoint and this box (will be 0 if in Point is inside the box) + /// + /// + /// C++: + /// Jolt/Geometry/AABox.h:303 + ///
+ /// inline float GetSqDistanceTo(Vec3Arg inPoint) const + ///
+ ///
+ public readonly float GetSqDistanceTo(float3 point) => + Jolt.PInvoke.AABox_GetSqDistanceTo(ref Unsafe.AsRef(in this), point); + } +} diff --git a/Brutal.Jolt/Generated/Structs/AABoxCast.gen.cs b/Brutal.Jolt/Generated/Structs/AABoxCast.gen.cs new file mode 100644 index 0000000..9776b8a --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/AABoxCast.gen.cs @@ -0,0 +1,53 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Structure that holds AABox moving linearly through 3d space + /// + /// + /// C++: + /// Jolt/Physics/Collision/AABoxCast.h:12 + ///
+ /// struct AABoxCast + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct AABoxCast + { + /// + /// + /// Axis aligned box at starting location + /// + /// + /// C++: + /// Jolt/Physics/Collision/AABoxCast.h:16 + ///
+ /// AABox mBox + ///
+ ///
+ [FieldOffset(0)] + public AABox Box; + + /// + /// + /// Direction and length of the cast (anything beyond this length will not be reported as a hit) + /// + /// + /// C++: + /// Jolt/Physics/Collision/AABoxCast.h:17 + ///
+ /// Vec3 mDirection + ///
+ ///
+ [FieldOffset(32)] + public float3 Direction; + } +} diff --git a/Brutal.Jolt/Generated/Structs/BodyPair.gen.cs b/Brutal.Jolt/Generated/Structs/BodyPair.gen.cs new file mode 100644 index 0000000..5af6ac3 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/BodyPair.gen.cs @@ -0,0 +1,47 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Structure that holds a body pair + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyPair.h:13 + ///
+ /// struct alignas(uint64) BodyPair + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct BodyPair + { + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyPair.h:30 + ///
+ /// BodyID mBodyA + ///
+ ///
+ [FieldOffset(0)] + public uint BodyA; + + /// + /// + /// C++: + /// Jolt/Physics/Body/BodyPair.h:31 + ///
+ /// BodyID mBodyB + ///
+ ///
+ [FieldOffset(4)] + public uint BodyB; + } +} diff --git a/Brutal.Jolt/Generated/Structs/BroadPhaseCastResult.gen.cs b/Brutal.Jolt/Generated/Structs/BroadPhaseCastResult.gen.cs new file mode 100644 index 0000000..bbf9d6f --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/BroadPhaseCastResult.gen.cs @@ -0,0 +1,81 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Structure that holds a ray cast or other object cast hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:13 + ///
+ /// class BroadPhaseCastResult + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct BroadPhaseCastResult + { + /// + /// + /// Body that was hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:24 + ///
+ /// BodyID mBodyID + ///
+ ///
+ [FieldOffset(0)] + public uint BodyID; + + /// + /// + /// Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:25 + ///
+ /// float mFraction = 1.0f + FLT_EPSILON + ///
+ ///
+ [FieldOffset(4)] + public float Fraction; + + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For + /// rays/cast shapes we can just use the collision fraction. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:19 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ public readonly float GetEarlyOutFraction() => + Jolt.PInvoke.BroadPhaseCastResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this)); + + /// + /// + /// Reset this result so it can be reused for a new cast. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:22 + ///
+ /// inline void Reset() + ///
+ ///
+ public void Reset() => Jolt.PInvoke.BroadPhaseCastResult_Reset(ref this); + } +} diff --git a/Brutal.Jolt/Generated/Structs/CharacterContact.gen.cs b/Brutal.Jolt/Generated/Structs/CharacterContact.gen.cs new file mode 100644 index 0000000..677b937 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/CharacterContact.gen.cs @@ -0,0 +1,271 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Encapsulates a collision contact between a character and another rigid body / character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:129 + ///
+ /// class CharacterContact : public CharacterContactKey + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 128)] + public partial struct CharacterContact + { + [FieldOffset(0)] + public uint BodyB; + + [FieldOffset(4)] + public uint CharacterIDB; + + [FieldOffset(8)] + public uint SubShapeIDB; + + /// + /// + /// Position where the character makes contact + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:136 + ///
+ /// RVec3 mPosition + ///
+ ///
+ [FieldOffset(16)] + public float3 Position; + + /// + /// + /// Velocity of the contact point + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:137 + ///
+ /// Vec3 mLinearVelocity + ///
+ ///
+ [FieldOffset(32)] + public float3 LinearVelocity; + + /// + /// + /// Contact normal, pointing towards the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:138 + ///
+ /// Vec3 mContactNormal + ///
+ ///
+ [FieldOffset(48)] + public float3 ContactNormal; + + /// + /// + /// Surface normal of the contact. Has been flipped if the contact is back facing (mIsBackFacingContact) and + /// is equal to the contact normal if the contact normal is pointing up more. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:139 + ///
+ /// Vec3 mSurfaceNormal + ///
+ ///
+ [FieldOffset(64)] + public float3 SurfaceNormal; + + /// + /// + /// Distance to the contact <= 0 means that it is an actual contact, > 0 means predictive + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:140 + ///
+ /// float mDistance + ///
+ ///
+ [FieldOffset(80)] + public float Distance; + + /// + /// + /// Fraction along the path where this contact takes place + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:141 + ///
+ /// float mFraction + ///
+ ///
+ [FieldOffset(84)] + public float Fraction; + + /// + /// + /// Motion type of B, used to determine the priority of the contact + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:142 + ///
+ /// EMotionType mMotionTypeB + ///
+ ///
+ [FieldOffset(88)] + public MotionType MotionTypeB; + + /// + /// + /// If B is a sensor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:143 + ///
+ /// bool mIsSensorB + ///
+ ///
+ [FieldOffset(89)] + public Brutal.Bool8 IsSensorB; + + /// + /// + /// Character we're colliding with (if not nullptr). Note that this may be a dangling pointer when accessed + /// through GetActiveContacts(), use mCharacterIDB instead. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:144 + ///
+ /// const CharacterVirtual * mCharacterB = nullptr + ///
+ ///
+ [FieldOffset(96)] + public CharacterVirtual CharacterB; + + /// + /// + /// User data of B + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:145 + ///
+ /// uint64 mUserData + ///
+ ///
+ [FieldOffset(104)] + public ulong UserData; + + /// + /// + /// Material of B + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:146 + ///
+ /// const PhysicsMaterial * mMaterial + ///
+ ///
+ [FieldOffset(112)] + public PhysicsMaterial Material; + + /// + /// + /// If the character actually collided with the contact (can be false if a predictive contact never becomes + /// a real one) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:147 + ///
+ /// bool mHadCollision = false + ///
+ ///
+ [FieldOffset(120)] + public Brutal.Bool8 HadCollision; + + /// + /// + /// If the contact validate callback chose to discard this contact or when the body is a sensor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:148 + ///
+ /// bool mWasDiscarded = false + ///
+ ///
+ [FieldOffset(121)] + public Brutal.Bool8 WasDiscarded; + + /// + /// + /// When true, the velocity of the contact point can push the character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:149 + ///
+ /// bool mCanPushCharacter = true + ///
+ ///
+ [FieldOffset(122)] + public Brutal.Bool8 CanPushCharacter; + + /// + /// + /// If this contact came from a back facing triangle / collision shape + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:150 + ///
+ /// bool mIsBackFacingContact = false + ///
+ ///
+ [FieldOffset(123)] + public Brutal.Bool8 IsBackFacingContact; + + /// + /// + /// Saving / restoring state for replay + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:133 + ///
+ /// void SaveState(StateRecorder &inStream) const + ///
+ ///
+ public readonly void SaveState(StateRecorder stream) => + Jolt.PInvoke.CharacterContact_SaveState(ref Unsafe.AsRef(in this), stream); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:134 + ///
+ /// void RestoreState(StateRecorder &inStream) + ///
+ ///
+ public void RestoreState(StateRecorder stream) => Jolt.PInvoke.CharacterContact_RestoreState(ref this, stream); + } +} diff --git a/Brutal.Jolt/Generated/Structs/CharacterContactKey.gen.cs b/Brutal.Jolt/Generated/Structs/CharacterContactKey.gen.cs new file mode 100644 index 0000000..1f7262b --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/CharacterContactKey.gen.cs @@ -0,0 +1,150 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Uniquely identifies a contact between a character and another body or character + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:85 + ///
+ /// class CharacterContactKey + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct CharacterContactKey + { + /// + /// + /// ID of body we're colliding with (if not invalid) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:123 + ///
+ /// BodyID mBodyB + ///
+ ///
+ [FieldOffset(0)] + public uint BodyB; + + /// + /// + /// Character we're colliding with (if not invalid) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:124 + ///
+ /// CharacterID mCharacterIDB + ///
+ ///
+ [FieldOffset(4)] + public uint CharacterIDB; + + /// + /// + /// Sub shape ID of body or character we're colliding with + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:125 + ///
+ /// SubShapeID mSubShapeIDB + ///
+ ///
+ [FieldOffset(8)] + public uint SubShapeIDB; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:89 + ///
+ /// CharacterContactKey() = default + ///
+ ///
+ public static CharacterContactKey Create() + { + Jolt.PInvoke.CharacterContactKey_Create(out var _outResult); + return _outResult; + } + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:91 + ///
+ /// CharacterContactKey(const BodyID &inBodyB, const SubShapeID &inSubShapeID) + ///
+ ///
+ public static CharacterContactKey Create(uint bodyB, uint subShapeID) + { + Jolt.PInvoke.CharacterContactKey_Create_2(bodyB, subShapeID, out var _outResult); + return _outResult; + } + + /// + /// + /// Checks if two contacts refer to the same body (or virtual character) + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:96 + ///
+ /// inline bool IsSameBody(const CharacterContactKey &inOther) const + ///
+ ///
+ public readonly bool IsSameBody(in CharacterContactKey other) => + Jolt.PInvoke.CharacterContactKey_IsSameBody(ref Unsafe.AsRef(in this), in other); + + /// + /// + /// Hash of this structure + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:113 + ///
+ /// inline uint64 GetHash() const + ///
+ ///
+ public readonly ulong GetHash() => Jolt.PInvoke.CharacterContactKey_GetHash(ref Unsafe.AsRef(in this)); + + /// + /// + /// Saving / restoring state for replay + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:120 + ///
+ /// void SaveState(StateRecorder &inStream) const + ///
+ ///
+ public readonly void SaveState(StateRecorder stream) => + Jolt.PInvoke.CharacterContactKey_SaveState(ref Unsafe.AsRef(in this), stream); + + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:121 + ///
+ /// void RestoreState(StateRecorder &inStream) + ///
+ ///
+ public void RestoreState(StateRecorder stream) => + Jolt.PInvoke.CharacterContactKey_RestoreState(ref this, stream); + } +} diff --git a/Brutal.Jolt/Generated/Structs/CharacterContactSettings.gen.cs b/Brutal.Jolt/Generated/Structs/CharacterContactSettings.gen.cs new file mode 100644 index 0000000..b85ebe0 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/CharacterContactSettings.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// This class contains settings that allow you to override the behavior of a character's collision response + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:72 + ///
+ /// class CharacterContactSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 2)] + public partial struct CharacterContactSettings + { + /// + /// + /// True when the object can push the virtual character. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:76 + ///
+ /// bool mCanPushCharacter = true + ///
+ ///
+ [FieldOffset(0)] + public Brutal.Bool8 CanPushCharacter; + + /// + /// + /// True when the virtual character can apply impulses (push) the body. Note that this only works against + /// rigid bodies. Other CharacterVirtual objects can only be moved in their own update, so you must ensure + /// that in their OnCharacterContactAdded mCanPushCharacter is true. + /// + /// + /// C++: + /// Jolt/Physics/Character/CharacterVirtual.h:81 + ///
+ /// bool mCanReceiveImpulses = true + ///
+ ///
+ [FieldOffset(1)] + public Brutal.Bool8 CanReceiveImpulses; + } +} diff --git a/Brutal.Jolt/Generated/Structs/CollidePointResult.gen.cs b/Brutal.Jolt/Generated/Structs/CollidePointResult.gen.cs new file mode 100644 index 0000000..fc5766b --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/CollidePointResult.gen.cs @@ -0,0 +1,68 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Structure that holds the result of colliding a point against a shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollidePointResult.h:13 + ///
+ /// class CollidePointResult + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct CollidePointResult + { + /// + /// + /// Body that was hit + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollidePointResult.h:21 + ///
+ /// BodyID mBodyID + ///
+ ///
+ [FieldOffset(0)] + public uint BodyID; + + /// + /// + /// Sub shape ID of shape that we collided against + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollidePointResult.h:22 + ///
+ /// SubShapeID mSubShapeID2 + ///
+ ///
+ [FieldOffset(4)] + public uint SubShapeID2; + + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For + /// point queries there is no sensible return value. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollidePointResult.h:19 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ public readonly float GetEarlyOutFraction() => + Jolt.PInvoke.CollidePointResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/CollideShapeResult.gen.cs b/Brutal.Jolt/Generated/Structs/CollideShapeResult.gen.cs new file mode 100644 index 0000000..39bc9fa --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/CollideShapeResult.gen.cs @@ -0,0 +1,227 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that contains all information of two colliding shapes + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:18 + ///
+ /// class CollideShapeResult + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 1120)] + public partial struct CollideShapeResult + { + /// + /// + /// Contact point on the surface of shape 1 (in world space or relative to base offset) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:59 + ///
+ /// Vec3 mContactPointOn1 + ///
+ ///
+ [FieldOffset(0)] + public float3 ContactPointOn1; + + /// + /// + /// Contact point on the surface of shape 2 (in world space or relative to base offset). If the penetration + /// depth is 0, this will be the same as mContactPointOn1. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:60 + ///
+ /// Vec3 mContactPointOn2 + ///
+ ///
+ [FieldOffset(16)] + public float3 ContactPointOn2; + + /// + /// + /// Direction to move shape 2 out of collision along the shortest path (magnitude is meaningless, in world + /// space). You can use -mPenetrationAxis.Normalized() as contact normal. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:61 + ///
+ /// Vec3 mPenetrationAxis + ///
+ ///
+ [FieldOffset(32)] + public float3 PenetrationAxis; + + /// + /// + /// Penetration depth (move shape 2 by this distance to resolve the collision). If + /// CollideShapeSettings::mMaxSeparationDistance > 0 this number can be negative to indicate that the + /// objects are separated by -mPenetrationDepth. The contact points are the closest points in that case. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:62 + ///
+ /// float mPenetrationDepth + ///
+ ///
+ [FieldOffset(48)] + public float PenetrationDepth; + + /// + /// + /// Sub shape ID that identifies the face on shape 1 + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:63 + ///
+ /// SubShapeID mSubShapeID1 + ///
+ ///
+ [FieldOffset(52)] + public uint SubShapeID1; + + /// + /// + /// Sub shape ID that identifies the face on shape 2 + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:64 + ///
+ /// SubShapeID mSubShapeID2 + ///
+ ///
+ [FieldOffset(56)] + public uint SubShapeID2; + + /// + /// + /// BodyID to which shape 2 belongs to + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:65 + ///
+ /// BodyID mBodyID2 + ///
+ ///
+ [FieldOffset(60)] + public uint BodyID2; + + /// + /// + /// Colliding face on shape 1 (optional result, in world space or relative to base offset) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:66 + ///
+ /// Face mShape1Face + ///
+ ///
+ [FieldOffset(64)] + public StaticArrayVec3_32 Shape1Face; + + /// + /// + /// Colliding face on shape 2 (optional result, in world space or relative to base offset) + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:67 + ///
+ /// Face mShape2Face + ///
+ ///
+ [FieldOffset(592)] + public StaticArrayVec3_32 Shape2Face; + + /// + /// + /// Default constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:24 + ///
+ /// CollideShapeResult() = default + ///
+ ///
+ public static CollideShapeResult Create() => Jolt.PInvoke.CollideShapeResult_Create(); + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:27 + ///
+ /// CollideShapeResult(Vec3Arg inContactPointOn1, Vec3Arg inContactPointOn2, Vec3Arg inPenetrationAxis, float inPenetrationDepth, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2) + ///
+ ///
+ public static CollideShapeResult Create( + float3 contactPointOn1, + float3 contactPointOn2, + float3 penetrationAxis, + float penetrationDepth, + uint subShapeID1, + uint subShapeID2, + uint bodyID2 + ) => + Jolt.PInvoke.CollideShapeResult_Create_2( + contactPointOn1, + contactPointOn2, + penetrationAxis, + penetrationDepth, + subShapeID1, + subShapeID2, + bodyID2 + ); + + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. We + /// use -penetration depth to get the hit with the biggest penetration depth + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:39 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ public readonly float GetEarlyOutFraction() => + Jolt.PInvoke.CollideShapeResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this)); + + /// + /// + /// Reverses the hit result, swapping contact point 1 with contact point 2 etc. + /// + /// + /// C++: + /// Jolt/Physics/Collision/CollideShape.h:42 + ///
+ /// inline CollideShapeResult Reversed() const + ///
+ ///
+ public readonly CollideShapeResult Reversed() => + Jolt.PInvoke.CollideShapeResult_Reversed(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/CollisionEstimationResult.gen.cs b/Brutal.Jolt/Generated/Structs/CollisionEstimationResult.gen.cs new file mode 100644 index 0000000..1029b18 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/CollisionEstimationResult.gen.cs @@ -0,0 +1,179 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A structure that contains the estimated contact and friction impulses and the resulting body velocities + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:12 + ///
+ /// struct CollisionEstimationResult + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 384)] + public partial struct CollisionEstimationResult + { + /// + /// + /// The estimated linear velocity of body 1 after collision + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:14 + ///
+ /// Vec3 mLinearVelocity1 + ///
+ ///
+ [FieldOffset(0)] + public float3 LinearVelocity1; + + /// + /// + /// The estimated angular velocity of body 1 after collision + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:15 + ///
+ /// Vec3 mAngularVelocity1 + ///
+ ///
+ [FieldOffset(16)] + public float3 AngularVelocity1; + + /// + /// + /// The estimated linear velocity of body 2 after collision + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:16 + ///
+ /// Vec3 mLinearVelocity2 + ///
+ ///
+ [FieldOffset(32)] + public float3 LinearVelocity2; + + /// + /// + /// The estimated angular velocity of body 2 after collision + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:17 + ///
+ /// Vec3 mAngularVelocity2 + ///
+ ///
+ [FieldOffset(48)] + public float3 AngularVelocity2; + + /// + /// + /// Point at which friction was applied (relative to mBaseOffset of the manifold) + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:19 + ///
+ /// Vec3 mFrictionPoint + ///
+ ///
+ [FieldOffset(64)] + public float3 FrictionPoint; + + /// + /// + /// Normalized tangent of contact normal + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:20 + ///
+ /// Vec3 mTangent1 + ///
+ ///
+ [FieldOffset(80)] + public float3 Tangent1; + + /// + /// + /// Second normalized tangent of contact normal (forms a basis with mTangent1 and mWorldSpaceNormal) + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:21 + ///
+ /// Vec3 mTangent2 + ///
+ ///
+ [FieldOffset(96)] + public float3 Tangent2; + + /// + /// + /// Estimated friction impulses in the direction of tangent 1 (kg m / s) + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:23 + ///
+ /// float mFrictionImpulse1 = 0 + ///
+ ///
+ [FieldOffset(112)] + public float FrictionImpulse1; + + /// + /// + /// Estimated friction impulses in the direction of tangent 2 (kg m / s) + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:24 + ///
+ /// float mFrictionImpulse2 = 0 + ///
+ ///
+ [FieldOffset(116)] + public float FrictionImpulse2; + + /// + /// + /// Estimated angular friction impulse around the world space normal (kg m^2 / s) + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:25 + ///
+ /// float mAngularFrictionImpulse = 0 + ///
+ ///
+ [FieldOffset(120)] + public float AngularFrictionImpulse; + + /// + /// + /// Estimated contact impulses (kg m / s) + /// + /// + /// C++: + /// Jolt/Physics/Collision/EstimateCollisionResponse.h:27 + ///
+ /// StaticArray<float, ContactPoints::Capacity> mContactImpulse + ///
+ ///
+ [FieldOffset(124)] + public StaticArrayFloat_64 ContactImpulse; + } +} diff --git a/Brutal.Jolt/Generated/Structs/ContactManifold.gen.cs b/Brutal.Jolt/Generated/Structs/ContactManifold.gen.cs new file mode 100644 index 0000000..bce801d --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/ContactManifold.gen.cs @@ -0,0 +1,139 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Manifold class, describes the contact surface between two bodies + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:19 + ///
+ /// class ContactManifold + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 2128)] + public partial struct ContactManifold + { + /// + /// + /// Offset to which all the contact points are relative + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:29 + ///
+ /// RVec3 mBaseOffset + ///
+ ///
+ [FieldOffset(0)] + public float3 BaseOffset; + + /// + /// + /// Normal for this manifold, direction along which to move body 2 out of collision along the shortest path + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:30 + ///
+ /// Vec3 mWorldSpaceNormal + ///
+ ///
+ [FieldOffset(16)] + public float3 WorldSpaceNormal; + + /// + /// + /// Penetration depth (move shape 2 by this distance to resolve the collision). If this value is negative, + /// this is a speculative contact point and may not actually result in a velocity change as during solving + /// the bodies may not actually collide. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:31 + ///
+ /// float mPenetrationDepth + ///
+ ///
+ [FieldOffset(32)] + public float PenetrationDepth; + + /// + /// + /// Sub shapes that formed this manifold (note that when multiple manifolds are combined because they're + /// coplanar, we lose some information here because we only keep track of one sub shape pair that we + /// encounter, see description at Body::SetUseManifoldReduction) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:32 + ///
+ /// SubShapeID mSubShapeID1 + ///
+ ///
+ [FieldOffset(36)] + public uint SubShapeID1; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:33 + ///
+ /// SubShapeID mSubShapeID2 + ///
+ ///
+ [FieldOffset(40)] + public uint SubShapeID2; + + /// + /// + /// Contact points on the surface of shape 1 relative to mBaseOffset. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:34 + ///
+ /// ContactPoints mRelativeContactPointsOn1 + ///
+ ///
+ [FieldOffset(48)] + public StaticArrayVec3_64 RelativeContactPointsOn1; + + /// + /// + /// Contact points on the surface of shape 2 relative to mBaseOffset. If there's no penetration, this will + /// be the same as mRelativeContactPointsOn1. If there is penetration they will be different. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:35 + ///
+ /// ContactPoints mRelativeContactPointsOn2 + ///
+ ///
+ [FieldOffset(1088)] + public StaticArrayVec3_64 RelativeContactPointsOn2; + + /// + /// + /// Swaps shape 1 and 2 + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:23 + ///
+ /// ContactManifold SwapShapes() const + ///
+ ///
+ public readonly ContactManifold SwapShapes() => + Jolt.PInvoke.ContactManifold_SwapShapes(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/ContactSettings.gen.cs b/Brutal.Jolt/Generated/Structs/ContactSettings.gen.cs new file mode 100644 index 0000000..1921355 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/ContactSettings.gen.cs @@ -0,0 +1,160 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// When a contact point is added or persisted, the callback gets a chance to override certain properties of the + /// contact constraint. The values are filled in with their defaults by the system so the callback doesn't need + /// to modify anything, but it can if it wants to. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:40 + ///
+ /// class ContactSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct ContactSettings + { + /// + /// + /// Combined friction for the body pair (see: PhysicsSystem::SetCombineFriction) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:43 + ///
+ /// float mCombinedFriction + ///
+ ///
+ [FieldOffset(0)] + public float CombinedFriction; + + /// + /// + /// Combined restitution for the body pair (see: PhysicsSystem::SetCombineRestitution) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:44 + ///
+ /// float mCombinedRestitution + ///
+ ///
+ [FieldOffset(4)] + public float CombinedRestitution; + + /// + /// + /// Scale factor for the inverse mass of body 1 (0 = infinite mass, 1 = use original mass, 2 = body has half + /// the mass). For the same contact pair, you should strive to keep the value the same over time. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:45 + ///
+ /// float mInvMassScale1 = 1.0f + ///
+ ///
+ [FieldOffset(8)] + public float InvMassScale1; + + /// + /// + /// Scale factor for the inverse inertia of body 1 (usually same as mInvMassScale1) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:46 + ///
+ /// float mInvInertiaScale1 = 1.0f + ///
+ ///
+ [FieldOffset(12)] + public float InvInertiaScale1; + + /// + /// + /// Scale factor for the inverse mass of body 2 (0 = infinite mass, 1 = use original mass, 2 = body has half + /// the mass). For the same contact pair, you should strive to keep the value the same over time. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:47 + ///
+ /// float mInvMassScale2 = 1.0f + ///
+ ///
+ [FieldOffset(16)] + public float InvMassScale2; + + /// + /// + /// Scale factor for the inverse inertia of body 2 (usually same as mInvMassScale2) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:48 + ///
+ /// float mInvInertiaScale2 = 1.0f + ///
+ ///
+ [FieldOffset(20)] + public float InvInertiaScale2; + + /// + /// + /// If the contact should be treated as a sensor vs body contact (no collision response) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:49 + ///
+ /// bool mIsSensor + ///
+ ///
+ [FieldOffset(24)] + public Brutal.Bool8 IsSensor; + + /// + /// + /// Relative linear surface velocity between the bodies (world space surface velocity of body 2 - world + /// space surface velocity of body 1), can be used to create a conveyor belt effect + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:50 + ///
+ /// Vec3 mRelativeLinearSurfaceVelocity = Vec3::sZero() + ///
+ ///
+ [FieldOffset(32)] + public float3 RelativeLinearSurfaceVelocity; + + /// + /// + /// Relative angular surface velocity between the bodies (world space angular surface velocity of body 2 - + /// world space angular surface velocity of body 1). Note that this angular velocity is relative to the + /// center of mass of body 1, so if you want it relative to body 2's center of mass you need to add body 2 + /// angular velocity x (body 1 world space center of mass - body 2 world space center of mass) to + /// mRelativeLinearSurfaceVelocity. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ContactListener.h:51 + ///
+ /// Vec3 mRelativeAngularSurfaceVelocity = Vec3::sZero() + ///
+ ///
+ [FieldOffset(48)] + public float3 RelativeAngularSurfaceVelocity; + } +} diff --git a/Brutal.Jolt/Generated/Structs/IndexedTriangle.gen.cs b/Brutal.Jolt/Generated/Structs/IndexedTriangle.gen.cs new file mode 100644 index 0000000..7f1c1e9 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/IndexedTriangle.gen.cs @@ -0,0 +1,102 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Triangle with 32-bit indices and material index + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:79 + ///
+ /// class IndexedTriangle : public IndexedTriangleNoMaterial + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct IndexedTriangle + { + [FieldOffset(0)] + public uint_3 Idx; + + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:119 + ///
+ /// uint32 mMaterialIndex = 0 + ///
+ ///
+ [FieldOffset(12)] + public uint MaterialIndex; + + /// + /// + /// User data that can be used for anything by the application, e.g. for tracking the original index of the + /// triangle + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:120 + ///
+ /// uint32 mUserData = 0 + ///
+ ///
+ [FieldOffset(16)] + public uint UserData; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:85 + ///
+ /// constexpr IndexedTriangle(uint32 inI1, uint32 inI2, uint32 inI3, uint32 inMaterialIndex, uint inUserData = 0) : IndexedTriangleNoMaterial(inI1, inI2, inI3), mMaterialIndex(inMaterialIndex), mUserData(inUserData) { } + ///
+ ///
+ public static IndexedTriangle Create(uint i1, uint i2, uint i3, uint materialIndex, uint userData = 0) + { + Jolt.PInvoke.IndexedTriangle_Create(i1, i2, i3, materialIndex, userData, out var _outResult); + return _outResult; + } + + /// + /// + /// Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented + /// triangle. + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:94 + ///
+ /// IndexedTriangle GetLowestIndexFirst() const + ///
+ ///
+ public readonly IndexedTriangle GetLowestIndexFirst() + { + Jolt.PInvoke.IndexedTriangle_GetLowestIndexFirst(ref Unsafe.AsRef(in this), out var _outResult); + return _outResult; + } + + /// + /// + /// Get the hash value of this structure + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:113 + ///
+ /// uint64 GetHash() const + ///
+ ///
+ public readonly ulong GetHash() => Jolt.PInvoke.IndexedTriangle_GetHash(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/IndexedTriangleNoMaterial.gen.cs b/Brutal.Jolt/Generated/Structs/IndexedTriangleNoMaterial.gen.cs new file mode 100644 index 0000000..6b264f4 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/IndexedTriangleNoMaterial.gen.cs @@ -0,0 +1,178 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Triangle with 32-bit indices + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:12 + ///
+ /// class IndexedTriangleNoMaterial + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct IndexedTriangleNoMaterial + { + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:75 + ///
+ /// uint32 mIdx[3] + ///
+ ///
+ [FieldOffset(0)] + public uint_3 Idx; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:18 + ///
+ /// IndexedTriangleNoMaterial() = default + ///
+ ///
+ public static IndexedTriangleNoMaterial Create() + { + Jolt.PInvoke.IndexedTriangleNoMaterial_Create(out var _outResult); + return _outResult; + } + + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:19 + ///
+ /// constexpr IndexedTriangleNoMaterial(uint32 inI1, uint32 inI2, uint32 inI3) : mIdx { inI1, inI2, inI3 } { } + ///
+ ///
+ public static IndexedTriangleNoMaterial Create(uint i1, uint i2, uint i3) + { + Jolt.PInvoke.IndexedTriangleNoMaterial_Create_2(i1, i2, i3, out var _outResult); + return _outResult; + } + + /// + /// + /// Check if two triangles are equivalent (using the same vertices) + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:28 + ///
+ /// bool IsEquivalent(const IndexedTriangleNoMaterial &inRHS) const + ///
+ ///
+ public readonly bool IsEquivalent(in IndexedTriangleNoMaterial rhs) => + Jolt.PInvoke.IndexedTriangleNoMaterial_IsEquivalent(ref Unsafe.AsRef(in this), in rhs); + + /// + /// + /// Check if two triangles are opposite (using the same vertices but in opposing order) + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:36 + ///
+ /// bool IsOpposite(const IndexedTriangleNoMaterial &inRHS) const + ///
+ ///
+ public readonly bool IsOpposite(in IndexedTriangleNoMaterial rhs) => + Jolt.PInvoke.IndexedTriangleNoMaterial_IsOpposite(ref Unsafe.AsRef(in this), in rhs); + + /// + /// + /// Check if triangle is degenerate + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:44 + ///
+ /// bool IsDegenerate(const VertexList &inVertices) const + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + public readonly unsafe bool IsDegenerate(ReadOnlySpan vertices) + { + fixed (float3* vertices_fixed = vertices) + { + return Jolt.PInvoke.IndexedTriangleNoMaterial_IsDegenerate( + ref Unsafe.AsRef(in this), + vertices_fixed, + (nuint)vertices.Length + ); + } + } + + /// + /// + /// Rotate the vertices so that the second vertex becomes first etc. This does not change the represented + /// triangle. + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:54 + ///
+ /// void Rotate() + ///
+ ///
+ public void Rotate() => Jolt.PInvoke.IndexedTriangleNoMaterial_Rotate(ref this); + + /// + /// + /// Get center of triangle + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:63 + ///
+ /// Vec3 GetCentroid(const VertexList &inVertices) const + ///
+ ///
+ /// + /// + /// vertices is copied into a native container for the call; the span is only read. + /// + /// + public readonly unsafe float3 GetCentroid(ReadOnlySpan vertices) + { + fixed (float3* vertices_fixed = vertices) + { + return Jolt.PInvoke.IndexedTriangleNoMaterial_GetCentroid( + ref Unsafe.AsRef(in this), + vertices_fixed, + (nuint)vertices.Length + ); + } + } + + /// + /// + /// Get the hash value of this structure + /// + /// + /// C++: + /// Jolt/Geometry/IndexedTriangle.h:69 + ///
+ /// uint64 GetHash() const + ///
+ ///
+ public readonly ulong GetHash() => Jolt.PInvoke.IndexedTriangleNoMaterial_GetHash(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/NativeSpanView.gen.cs b/Brutal.Jolt/Generated/Structs/NativeSpanView.gen.cs new file mode 100644 index 0000000..4c0196a --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/NativeSpanView.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// A borrowed view of a native container: its element storage and count. Only the raw imports use it; the wrappers hand out a span over it. + public readonly struct NativeSpanView + { + public readonly nint Data; + public readonly ulong Count; + } +} diff --git a/Brutal.Jolt/Generated/Structs/NativeStridedView.gen.cs b/Brutal.Jolt/Generated/Structs/NativeStridedView.gen.cs new file mode 100644 index 0000000..4af0dc7 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/NativeStridedView.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.JoltApi +{ + /// A borrowed view of a native container whose elements are objects C# only sees as handles: the element storage, the count and the native element stride. Only the raw imports use it; the wrappers hand out a over it. + public readonly struct NativeStridedView + { + public readonly nint Data; + public readonly ulong Count; + public readonly ulong Stride; + } +} diff --git a/Brutal.Jolt/Generated/Structs/PhysicsSettings.gen.cs b/Brutal.Jolt/Generated/Structs/PhysicsSettings.gen.cs new file mode 100644 index 0000000..d0b19de --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/PhysicsSettings.gen.cs @@ -0,0 +1,444 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:30 + ///
+ /// struct PhysicsSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 88)] + public partial struct PhysicsSettings + { + /// + /// + /// Size of body pairs array, corresponds to the maximum amount of potential body pairs that can be in + /// flight at any time. Setting this to a low value will use less memory but slow down simulation as threads + /// may run out of narrow phase work. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:36 + ///
+ /// int mMaxInFlightBodyPairs = 16384 + ///
+ ///
+ [FieldOffset(0)] + public int MaxInFlightBodyPairs; + + /// + /// + /// How many PhysicsStepListeners to notify in 1 batch + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:39 + ///
+ /// int mStepListenersBatchSize = 8 + ///
+ ///
+ [FieldOffset(4)] + public int StepListenersBatchSize; + + /// + /// + /// How many step listener batches are needed before spawning another job (set to INT_MAX if no parallelism + /// is desired) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:42 + ///
+ /// int mStepListenerBatchesPerJob = 1 + ///
+ ///
+ [FieldOffset(8)] + public int StepListenerBatchesPerJob; + + /// + /// + /// Baumgarte stabilization factor (how much of the position error to 'fix' in 1 update) (unit: + /// dimensionless, 0 = nothing, 1 = 100%) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:45 + ///
+ /// float mBaumgarte = 0.2f + ///
+ ///
+ [FieldOffset(12)] + public float Baumgarte; + + /// + /// + /// Radius around objects inside which speculative contact points will be detected. Note that if this is too + /// big you will get ghost collisions as speculative contacts are based on the closest points during the + /// collision detection step which may not be the actual closest points by the time the two objects hit + /// (unit: meters) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:50 + ///
+ /// float mSpeculativeContactDistance = 0.02f + ///
+ ///
+ [FieldOffset(16)] + public float SpeculativeContactDistance; + + /// + /// + /// How much bodies are allowed to sink into each other (unit: meters) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:53 + ///
+ /// float mPenetrationSlop = 0.02f + ///
+ ///
+ [FieldOffset(20)] + public float PenetrationSlop; + + /// + /// + /// Fraction of its inner radius a body must move per step to enable casting for the LinearCast motion + /// quality + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:56 + ///
+ /// float mLinearCastThreshold = 0.75f + ///
+ ///
+ [FieldOffset(24)] + public float LinearCastThreshold; + + /// + /// + /// Fraction of its inner radius a body may penetrate another body for the LinearCast motion quality + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:59 + ///
+ /// float mLinearCastMaxPenetration = 0.25f + ///
+ ///
+ [FieldOffset(28)] + public float LinearCastMaxPenetration; + + /// + /// + /// Max distance to use to determine if two points are on the same plane for determining the contact + /// manifold between two shape faces (unit: meter) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:62 + ///
+ /// float mManifoldTolerance = 1.0e-3f + ///
+ ///
+ [FieldOffset(32)] + public float ManifoldTolerance; + + /// + /// + /// Maximum distance to correct in a single iteration when solving position constraints (unit: meters) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:65 + ///
+ /// float mMaxPenetrationDistance = 0.2f + ///
+ ///
+ [FieldOffset(36)] + public float MaxPenetrationDistance; + + /// + /// + /// 1 mm + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:68 + ///
+ /// float mBodyPairCacheMaxDeltaPositionSq = Square(0.001f) + ///
+ ///
+ /// + /// + /// Maximum relative delta position for body pairs to be able to reuse collision results from last frame + /// (units: meter^2) + /// + /// + [FieldOffset(40)] + public float BodyPairCacheMaxDeltaPositionSq; + + /// + /// + /// cos(2 degrees / 2) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:71 + ///
+ /// float mBodyPairCacheCosMaxDeltaRotationDiv2 = 0.99984769515639123915701155881391f + ///
+ ///
+ /// + /// + /// Maximum relative delta orientation for body pairs to be able to reuse collision results from last frame, + /// stored as cos(max angle / 2) + /// + /// + [FieldOffset(44)] + public float BodyPairCacheCosMaxDeltaRotationDiv2; + + /// + /// + /// cos(5 degree) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:74 + ///
+ /// float mContactNormalCosMaxDeltaRotation = 0.99619469809174553229501040247389f + ///
+ ///
+ /// + /// + /// Maximum angle between normals that allows manifolds between different sub shapes of the same body pair + /// to be combined + /// + /// + [FieldOffset(48)] + public float ContactNormalCosMaxDeltaRotation; + + /// + /// + /// 1 cm + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:77 + ///
+ /// float mContactPointPreserveLambdaMaxDistSq = Square(0.01f) + ///
+ ///
+ /// + /// + /// Maximum allowed distance between old and new contact point to preserve contact forces for warm start + /// (units: meter^2) + /// + /// + [FieldOffset(52)] + public float ContactPointPreserveLambdaMaxDistSq; + + /// + /// + /// Max squared distance to consider a vertex to be the same as another vertex, used by the internal edge + /// removal algorithm to determine if two edges are shared. (unit: meter^2) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:80 + ///
+ /// float mInternalEdgeRemovalVertexToleranceSq = cDefaultInternalEdgeRemovalVertexToleranceSq + ///
+ ///
+ [FieldOffset(56)] + public float InternalEdgeRemovalVertexToleranceSq; + + /// + /// + /// Number of solver velocity iterations to run Note that this needs to be >= 2 in order for friction to + /// work (friction is applied using the non-penetration impulse from the previous iteration) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:84 + ///
+ /// uint mNumVelocitySteps = 10 + ///
+ ///
+ [FieldOffset(60)] + public uint NumVelocitySteps; + + /// + /// + /// Number of solver position iterations to run + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:87 + ///
+ /// uint mNumPositionSteps = 2 + ///
+ ///
+ [FieldOffset(64)] + public uint NumPositionSteps; + + /// + /// + /// Minimal velocity needed before a collision can be elastic. If the relative velocity between colliding + /// objects in the direction of the contact normal is lower than this, the restitution will be zero + /// regardless of the configured value. This lets an object settle sooner. Must be a positive number. (unit: + /// m) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:92 + ///
+ /// float mMinVelocityForRestitution = 1.0f + ///
+ ///
+ [FieldOffset(68)] + public float MinVelocityForRestitution; + + /// + /// + /// Time before object is allowed to go to sleep (unit: seconds) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:95 + ///
+ /// float mTimeBeforeSleep = 0.5f + ///
+ ///
+ [FieldOffset(72)] + public float TimeBeforeSleep; + + /// + /// + /// To detect if an object is sleeping, we use 3 points: - The center of mass. - The centers of the faces of + /// the bounding box that are furthest away from the center. The movement of these points is tracked and if + /// the velocity of all 3 points is lower than this value, the object is allowed to go to sleep. Must be a + /// positive number. (unit: m/s) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:102 + ///
+ /// float mPointVelocitySleepThreshold = 0.03f + ///
+ ///
+ [FieldOffset(76)] + public float PointVelocitySleepThreshold; + + /// + /// + /// By default the simulation is deterministic, it is possible to turn this off by setting this setting to + /// false. This will make the simulation run faster but it will no longer be deterministic. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:105 + ///
+ /// bool mDeterministicSimulation = true + ///
+ ///
+ [FieldOffset(80)] + public Brutal.Bool8 DeterministicSimulation; + + /// + /// + /// Whether or not to use warm starting for constraints (initially applying previous frames impulses) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:111 + ///
+ /// bool mConstraintWarmStart = true + ///
+ ///
+ [FieldOffset(81)] + public Brutal.Bool8 ConstraintWarmStart; + + /// + /// + /// Whether or not to use the body pair cache, which removes the need for narrow phase collision detection + /// when orientation between two bodies didn't change + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:114 + ///
+ /// bool mUseBodyPairContactCache = true + ///
+ ///
+ [FieldOffset(82)] + public Brutal.Bool8 UseBodyPairContactCache; + + /// + /// + /// Whether or not to reduce manifolds with similar contact normals into one contact manifold (see + /// description at Body::SetUseManifoldReduction) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:117 + ///
+ /// bool mUseManifoldReduction = true + ///
+ ///
+ [FieldOffset(83)] + public Brutal.Bool8 UseManifoldReduction; + + /// + /// + /// If we split up large islands into smaller parallel batches of work (to improve performance) + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:120 + ///
+ /// bool mUseLargeIslandSplitter = true + ///
+ ///
+ [FieldOffset(84)] + public Brutal.Bool8 UseLargeIslandSplitter; + + /// + /// + /// If objects can go to sleep or not + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:123 + ///
+ /// bool mAllowSleeping = true + ///
+ ///
+ [FieldOffset(85)] + public Brutal.Bool8 AllowSleeping; + + /// + /// + /// When false, we prevent collision against non-active (shared) edges. Mainly for debugging the algorithm. + /// + /// + /// C++: + /// Jolt/Physics/PhysicsSettings.h:126 + ///
+ /// bool mCheckActiveEdges = true + ///
+ ///
+ [FieldOffset(86)] + public Brutal.Bool8 CheckActiveEdges; + } +} diff --git a/Brutal.Jolt/Generated/Structs/Plane.gen.cs b/Brutal.Jolt/Generated/Structs/Plane.gen.cs new file mode 100644 index 0000000..eecec62 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/Plane.gen.cs @@ -0,0 +1,254 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// An infinite plane described by the formula X . Normal + Constant = 0. + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:10 + ///
+ /// class Plane + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct Plane + { + /// + /// + /// XYZ = normal, W = constant, plane: x . normal + constant = 0 + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:101 + ///
+ /// Vec4 mNormalAndConstant + ///
+ ///
+ [FieldOffset(0)] + public float4 NormalAndConstant; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:16 + ///
+ /// Plane() = default + ///
+ ///
+ public static Plane Create() => Jolt.PInvoke.Plane_Create(); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:17 + ///
+ /// explicit Plane(Vec4Arg inNormalAndConstant) + ///
+ ///
+ public static Plane Create(float4 normalAndConstant) => Jolt.PInvoke.Plane_Create_2(normalAndConstant); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:18 + ///
+ /// Plane(Vec3Arg inNormal, float inConstant) + ///
+ ///
+ public static Plane Create(float3 normal, float constant) => Jolt.PInvoke.Plane_Create_3(normal, constant); + + /// + /// + /// Create from point and normal + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:21 + ///
+ /// static Plane sFromPointAndNormal(Vec3Arg inPoint, Vec3Arg inNormal) + ///
+ ///
+ public static Plane FromPointAndNormal(float3 point, float3 normal) => + Jolt.PInvoke.Plane_FromPointAndNormal(point, normal); + + /// + /// + /// Create from point and normal, double precision version that more accurately calculates the plane + /// constant + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:24 + ///
+ /// static Plane sFromPointAndNormal(DVec3Arg inPoint, Vec3Arg inNormal) + ///
+ ///
+ public static Plane FromPointAndNormal(double3 point, float3 normal) => + Jolt.PInvoke.Plane_FromPointAndNormal_2(point, normal); + + /// + /// + /// Create from 3 counter clockwise points + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:27 + ///
+ /// static Plane sFromPointsCCW(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3) + ///
+ ///
+ public static Plane FromPointsCCW(float3 v1, float3 v2, float3 v3) => + Jolt.PInvoke.Plane_FromPointsCCW(v1, v2, v3); + + /// + /// + /// Properties + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:30 + ///
+ /// Vec3 GetNormal() const + ///
+ ///
+ public readonly float3 GetNormal() => Jolt.PInvoke.Plane_GetNormal(ref Unsafe.AsRef(in this)); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:31 + ///
+ /// void SetNormal(Vec3Arg inNormal) + ///
+ ///
+ public void SetNormal(float3 normal) => Jolt.PInvoke.Plane_SetNormal(ref this, normal); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:32 + ///
+ /// float GetConstant() const + ///
+ ///
+ public readonly float GetConstant() => Jolt.PInvoke.Plane_GetConstant(ref Unsafe.AsRef(in this)); + + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:33 + ///
+ /// void SetConstant(float inConstant) + ///
+ ///
+ public void SetConstant(float constant) => Jolt.PInvoke.Plane_SetConstant(ref this, constant); + + /// + /// + /// Store as 4 floats + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:36 + ///
+ /// void StoreFloat4(Float4 *outV) const + ///
+ ///
+ public readonly unsafe void StoreFloat4(Ptr v) => + Jolt.PInvoke.Plane_StoreFloat4(ref Unsafe.AsRef(in this), v); + + /// + /// + /// Offset the plane (positive value means move it in the direction of the plane normal) + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:39 + ///
+ /// Plane Offset(float inDistance) const + ///
+ ///
+ public readonly Plane Offset(float distance) => Jolt.PInvoke.Plane_Offset(ref Unsafe.AsRef(in this), distance); + + /// + /// + /// Transform the plane by a matrix + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:42 + ///
+ /// inline Plane GetTransformed(Mat44Arg inTransform) const + ///
+ ///
+ public readonly Plane GetTransformed(in float4x4 transform) => + Jolt.PInvoke.Plane_GetTransformed(ref Unsafe.AsRef(in this), in transform); + + /// + /// + /// Scale the plane, can handle non-uniform and negative scaling + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:49 + ///
+ /// inline Plane Scaled(Vec3Arg inScale) const + ///
+ ///
+ public readonly Plane Scaled(float3 scale) => Jolt.PInvoke.Plane_Scaled(ref Unsafe.AsRef(in this), scale); + + /// + /// + /// Distance point to plane + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:57 + ///
+ /// float SignedDistance(Vec3Arg inPoint) const + ///
+ ///
+ public readonly float SignedDistance(float3 point) => + Jolt.PInvoke.Plane_SignedDistance(ref Unsafe.AsRef(in this), point); + + /// + /// + /// Project inPoint onto the plane + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:60 + ///
+ /// Vec3 ProjectPointOnPlane(Vec3Arg inPoint) const + ///
+ ///
+ public readonly float3 ProjectPointOnPlane(float3 point) => + Jolt.PInvoke.Plane_ProjectPointOnPlane(ref Unsafe.AsRef(in this), point); + + /// + /// + /// Returns intersection point between 3 planes + /// + /// + /// C++: + /// Jolt/Geometry/Plane.h:63 + ///
+ /// static bool sIntersectPlanes(const Plane &inP1, const Plane &inP2, const Plane &inP3, Vec3 &outPoint) + ///
+ ///
+ public static bool IntersectPlanes(in Plane p1, in Plane p2, in Plane p3, out float3 point) => + Jolt.PInvoke.Plane_IntersectPlanes(in p1, in p2, in p3, out point); + } +} diff --git a/Brutal.Jolt/Generated/Structs/PointConvexSupport.gen.cs b/Brutal.Jolt/Generated/Structs/PointConvexSupport.gen.cs new file mode 100644 index 0000000..ebb56c1 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/PointConvexSupport.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that wraps a point so that it can be used with convex collision detection + /// + /// + /// C++: + /// Jolt/Geometry/ConvexSupport.h:85 + ///
+ /// struct PointConvexSupport + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct PointConvexSupport + { + /// + /// + /// C++: + /// Jolt/Geometry/ConvexSupport.h:93 + ///
+ /// Vec3 mPoint + ///
+ ///
+ [FieldOffset(0)] + public float3 Point; + } +} diff --git a/Brutal.Jolt/Generated/Structs/RRayCast.gen.cs b/Brutal.Jolt/Generated/Structs/RRayCast.gen.cs new file mode 100644 index 0000000..f39b463 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/RRayCast.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:51 + ///
+ /// struct RRayCast : public RayCastT<RVec3, RMat44, RRayCast> + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct RRayCast + { + [FieldOffset(0)] + public float3 Origin; + + [FieldOffset(16)] + public float3 Direction; + } +} diff --git a/Brutal.Jolt/Generated/Structs/RShapeCast.gen.cs b/Brutal.Jolt/Generated/Structs/RShapeCast.gen.cs new file mode 100644 index 0000000..de442c5 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/RShapeCast.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:73 + ///
+ /// struct RShapeCast : public ShapeCastT<RVec3, RMat44, RShapeCast> + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 144)] + public partial struct RShapeCast + { + [FieldOffset(0)] + public Shape Shape; + + [FieldOffset(16)] + public /* const */ + float3 Scale; + + [FieldOffset(32)] + public /* const */ + float4x4 CenterOfMassStart; + + [FieldOffset(96)] + public /* const */ + float3 Direction; + + [FieldOffset(112)] + public /* const */ + AABox ShapeWorldBounds; + } +} diff --git a/Brutal.Jolt/Generated/Structs/RayCast.gen.cs b/Brutal.Jolt/Generated/Structs/RayCast.gen.cs new file mode 100644 index 0000000..c768202 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/RayCast.gen.cs @@ -0,0 +1,28 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Collision/RayCast.h:46 + ///
+ /// struct RayCast : public RayCastT<Vec3, Mat44, RayCast> + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct RayCast + { + [FieldOffset(0)] + public float3 Origin; + + [FieldOffset(16)] + public float3 Direction; + } +} diff --git a/Brutal.Jolt/Generated/Structs/RayCastResult.gen.cs b/Brutal.Jolt/Generated/Structs/RayCastResult.gen.cs new file mode 100644 index 0000000..645e034 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/RayCastResult.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Specialization of cast result against a shape + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:29 + ///
+ /// class RayCastResult : public BroadPhaseCastResult + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct RayCastResult + { + [FieldOffset(0)] + public uint BodyID; + + [FieldOffset(4)] + public float Fraction; + + /// + /// + /// Sub shape ID of shape that we collided against + /// + /// + /// C++: + /// Jolt/Physics/Collision/CastResult.h:34 + ///
+ /// SubShapeID mSubShapeID2 + ///
+ ///
+ [FieldOffset(8)] + public uint SubShapeID2; + } +} diff --git a/Brutal.Jolt/Generated/Structs/ShapeCast.gen.cs b/Brutal.Jolt/Generated/Structs/ShapeCast.gen.cs new file mode 100644 index 0000000..dbaf99f --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/ShapeCast.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:68 + ///
+ /// struct ShapeCast : public ShapeCastT<Vec3, Mat44, ShapeCast> + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 144)] + public partial struct ShapeCast + { + [FieldOffset(0)] + public Shape Shape; + + [FieldOffset(16)] + public /* const */ + float3 Scale; + + [FieldOffset(32)] + public /* const */ + float4x4 CenterOfMassStart; + + [FieldOffset(96)] + public /* const */ + float3 Direction; + + [FieldOffset(112)] + public /* const */ + AABox ShapeWorldBounds; + } +} diff --git a/Brutal.Jolt/Generated/Structs/ShapeCastResult.gen.cs b/Brutal.Jolt/Generated/Structs/ShapeCastResult.gen.cs new file mode 100644 index 0000000..d6b146b --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/ShapeCastResult.gen.cs @@ -0,0 +1,175 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Result of a shape cast test + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:116 + ///
+ /// class ShapeCastResult : public CollideShapeResult + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 1136)] + public partial struct ShapeCastResult + { + [FieldOffset(0)] + public float3 ContactPointOn1; + + [FieldOffset(16)] + public float3 ContactPointOn2; + + [FieldOffset(32)] + public float3 PenetrationAxis; + + [FieldOffset(48)] + public float PenetrationDepth; + + [FieldOffset(52)] + public uint SubShapeID1; + + [FieldOffset(56)] + public uint SubShapeID2; + + [FieldOffset(60)] + public uint BodyID2; + + [FieldOffset(64)] + public StaticArrayVec3_32 Shape1Face; + + [FieldOffset(592)] + public StaticArrayVec3_32 Shape2Face; + + /// + /// + /// This is the fraction where the shape hit the other shape: CenterOfMassOnHit = Start + value * (End - + /// Start) + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:172 + ///
+ /// float mFraction + ///
+ ///
+ [FieldOffset(1120)] + public float Fraction; + + /// + /// + /// True if the shape was hit from the back side + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:173 + ///
+ /// bool mIsBackFaceHit + ///
+ ///
+ [FieldOffset(1124)] + public Brutal.Bool8 IsBackFaceHit; + + /// + /// + /// Default constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:122 + ///
+ /// ShapeCastResult() = default + ///
+ ///
+ public static ShapeCastResult Create() => Jolt.PInvoke.ShapeCastResult_Create(); + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:133 + ///
+ /// ShapeCastResult(float inFraction, Vec3Arg inContactPoint1, Vec3Arg inContactPoint2, Vec3Arg inContactNormalOrPenetrationDepth, bool inBackFaceHit, const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2, const BodyID &inBodyID2) + ///
+ ///
+ /// + /// + /// Constructor + /// @param inFraction Fraction at which the cast hit + /// @param inContactPoint1 Contact point on shape 1 + /// @param inContactPoint2 Contact point on shape 2 + /// @param inContactNormalOrPenetrationDepth Contact normal pointing from shape 1 to 2 or penetration depth vector when the objects are penetrating (also from 1 to 2) + /// @param inBackFaceHit If this hit was a back face hit + /// @param inSubShapeID1 Sub shape id for shape 1 + /// @param inSubShapeID2 Sub shape id for shape 2 + /// @param inBodyID2 BodyID that was hit + /// + /// + public static ShapeCastResult Create( + float fraction, + float3 contactPoint1, + float3 contactPoint2, + float3 contactNormalOrPenetrationDepth, + bool backFaceHit, + uint subShapeID1, + uint subShapeID2, + uint bodyID2 + ) => + Jolt.PInvoke.ShapeCastResult_Create_2( + fraction, + contactPoint1, + contactPoint2, + contactNormalOrPenetrationDepth, + backFaceHit, + subShapeID1, + subShapeID2, + bodyID2 + ); + + /// + /// + /// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For + /// rays/cast shapes we can just use the collision fraction. The fraction and penetration depth are combined + /// in such a way that deeper hits at fraction 0 go first. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:141 + ///
+ /// inline float GetEarlyOutFraction() const + ///
+ ///
+ public readonly float GetEarlyOutFraction() => + Jolt.PInvoke.ShapeCastResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this)); + + /// + /// + /// Reverses the hit result, swapping contact point 1 with contact point 2 etc. + /// + /// + /// C++: + /// Jolt/Physics/Collision/ShapeCast.h:145 + ///
+ /// ShapeCastResult Reversed(Vec3Arg inWorldSpaceCastDirection) const + ///
+ ///
+ /// + /// + /// Reverses the hit result, swapping contact point 1 with contact point 2 etc. + /// @param inWorldSpaceCastDirection Direction of the shape cast in world space + /// + /// + public readonly ShapeCastResult Reversed(float3 worldSpaceCastDirection) => + Jolt.PInvoke.ShapeCastResult_Reversed(ref Unsafe.AsRef(in this), worldSpaceCastDirection); + } +} diff --git a/Brutal.Jolt/Generated/Structs/SoftBodyContactSettings.gen.cs b/Brutal.Jolt/Generated/Structs/SoftBodyContactSettings.gen.cs new file mode 100644 index 0000000..bcaa006 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/SoftBodyContactSettings.gen.cs @@ -0,0 +1,84 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Contact settings for a soft body contact. The values are filled in with their defaults by the system so the + /// callback doesn't need to modify anything, but it can if it wants to. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:21 + ///
+ /// class SoftBodyContactSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct SoftBodyContactSettings + { + /// + /// + /// Scale factor for the inverse mass of the soft body (0 = infinite mass, 1 = use original mass, 2 = body + /// has half the mass). For the same contact pair, you should strive to keep the value the same over time. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:24 + ///
+ /// float mInvMassScale1 = 1.0f + ///
+ ///
+ [FieldOffset(0)] + public float InvMassScale1; + + /// + /// + /// Scale factor for the inverse mass of the other body (0 = infinite mass, 1 = use original mass, 2 = body + /// has half the mass). For the same contact pair, you should strive to keep the value the same over time. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:25 + ///
+ /// float mInvMassScale2 = 1.0f + ///
+ ///
+ [FieldOffset(4)] + public float InvMassScale2; + + /// + /// + /// Scale factor for the inverse inertia of the other body (usually same as mInvMassScale2) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:26 + ///
+ /// float mInvInertiaScale2 = 1.0f + ///
+ ///
+ [FieldOffset(8)] + public float InvInertiaScale2; + + /// + /// + /// If the contact should be treated as a sensor vs body contact (no collision response) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyContactListener.h:27 + ///
+ /// bool mIsSensor + ///
+ ///
+ [FieldOffset(12)] + public Brutal.Bool8 IsSensor; + } +} diff --git a/Brutal.Jolt/Generated/Structs/SoftBodyVertex.gen.cs b/Brutal.Jolt/Generated/Structs/SoftBodyVertex.gen.cs new file mode 100644 index 0000000..6f8b007 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/SoftBodyVertex.gen.cs @@ -0,0 +1,166 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Run time information for a single particle of a soft body Note that at run-time you should only modify the + /// inverse mass and/or velocity of a vertex to control the soft body. Modifying the position can lead to missed + /// collisions. The other members are used internally by the soft body solver. + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:15 + ///
+ /// class SoftBodyVertex + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 80)] + public partial struct SoftBodyVertex + { + /// + /// + /// Internal use only. Position at the previous time step + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:34 + ///
+ /// Vec3 mPreviousPosition + ///
+ ///
+ [FieldOffset(0)] + public float3 PreviousPosition; + + /// + /// + /// Position, relative to the center of mass of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:35 + ///
+ /// Vec3 mPosition + ///
+ ///
+ [FieldOffset(16)] + public float3 Position; + + /// + /// + /// Velocity, relative to the center of mass of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:36 + ///
+ /// Vec3 mVelocity + ///
+ ///
+ [FieldOffset(32)] + public float3 Velocity; + + /// + /// + /// Internal use only. Nearest collision plane, relative to the center of mass of the soft body + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:37 + ///
+ /// Plane mCollisionPlane + ///
+ ///
+ [FieldOffset(48)] + public Plane CollisionPlane; + + /// + /// + /// Internal use only. Index in the colliding shapes list of the body we may collide with + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:38 + ///
+ /// int mCollidingShapeIndex + ///
+ ///
+ [FieldOffset(64)] + public int CollidingShapeIndex; + + /// + /// + /// True if the vertex has collided with anything in the last update + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:39 + ///
+ /// bool mHasContact + ///
+ ///
+ [FieldOffset(68)] + public Brutal.Bool8 HasContact; + + /// + /// + /// Internal use only. Used while finding the collision plane, stores the largest penetration found so far + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:40 + ///
+ /// float mLargestPenetration + ///
+ ///
+ [FieldOffset(72)] + public float LargestPenetration; + + /// + /// + /// Inverse mass (1 / mass) + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:41 + ///
+ /// float mInvMass + ///
+ ///
+ [FieldOffset(76)] + public float InvMass; + + /// + /// + /// Reset collision information to prepare for a new collision check + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:19 + ///
+ /// inline void ResetCollision() + ///
+ ///
+ public void ResetCollision() => Jolt.PInvoke.SoftBodyVertex_ResetCollision(ref this); + + /// + /// + /// Mark this vertex as being in contact with inBodyID + /// + /// + /// C++: + /// Jolt/Physics/SoftBody/SoftBodyVertex.h:27 + ///
+ /// inline void MarkCCDContact(const BodyID &inBodyID, const Plane &inContactPlane) + ///
+ ///
+ public void MarkCCDContact(uint bodyID, in Plane contactPlane) => + Jolt.PInvoke.SoftBodyVertex_MarkCCDContact(ref this, bodyID, in contactPlane); + } +} diff --git a/Brutal.Jolt/Generated/Structs/SubShapeIDPair.gen.cs b/Brutal.Jolt/Generated/Structs/SubShapeIDPair.gen.cs new file mode 100644 index 0000000..bdfa818 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/SubShapeIDPair.gen.cs @@ -0,0 +1,150 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A pair of bodies and their sub shape ID's. Can be used as a key in a map to find a contact point. + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:14 + ///
+ /// class SubShapeIDPair + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct SubShapeIDPair + { + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:54 + ///
+ /// BodyID mBody1ID + ///
+ ///
+ [FieldOffset(0)] + public uint Body1ID; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:55 + ///
+ /// SubShapeID mSubShapeID1 + ///
+ ///
+ [FieldOffset(4)] + public uint SubShapeID1; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:56 + ///
+ /// BodyID mBody2ID + ///
+ ///
+ [FieldOffset(8)] + public uint Body2ID; + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:57 + ///
+ /// SubShapeID mSubShapeID2 + ///
+ ///
+ [FieldOffset(12)] + public uint SubShapeID2; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:20 + ///
+ /// SubShapeIDPair() = default + ///
+ ///
+ public static SubShapeIDPair Create() + { + Jolt.PInvoke.SubShapeIDPair_Create(out var _outResult); + return _outResult; + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:21 + ///
+ /// SubShapeIDPair(const BodyID &inBody1ID, const SubShapeID &inSubShapeID1, const BodyID &inBody2ID, const SubShapeID &inSubShapeID2) + ///
+ ///
+ public static SubShapeIDPair Create(uint body1ID, uint subShapeID1, uint body2ID, uint subShapeID2) + { + Jolt.PInvoke.SubShapeIDPair_Create_2(body1ID, subShapeID1, body2ID, subShapeID2, out var _outResult); + return _outResult; + } + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:46 + ///
+ /// const BodyID & GetBody1ID() const + ///
+ ///
+ public readonly uint GetBody1ID() => Jolt.PInvoke.SubShapeIDPair_GetBody1ID(ref Unsafe.AsRef(in this)); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:47 + ///
+ /// const SubShapeID & GetSubShapeID1() const + ///
+ ///
+ public readonly uint GetSubShapeID1() => Jolt.PInvoke.SubShapeIDPair_GetSubShapeID1(ref Unsafe.AsRef(in this)); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:48 + ///
+ /// const BodyID & GetBody2ID() const + ///
+ ///
+ public readonly uint GetBody2ID() => Jolt.PInvoke.SubShapeIDPair_GetBody2ID(ref Unsafe.AsRef(in this)); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:49 + ///
+ /// const SubShapeID & GetSubShapeID2() const + ///
+ ///
+ public readonly uint GetSubShapeID2() => Jolt.PInvoke.SubShapeIDPair_GetSubShapeID2(ref Unsafe.AsRef(in this)); + + /// + /// + /// C++: + /// Jolt/Physics/Collision/Shape/SubShapeIDPair.h:51 + ///
+ /// uint64 GetHash() const + ///
+ ///
+ public readonly ulong GetHash() => Jolt.PInvoke.SubShapeIDPair_GetHash(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/Triangle.gen.cs b/Brutal.Jolt/Generated/Structs/Triangle.gen.cs new file mode 100644 index 0000000..0a234d7 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/Triangle.gen.cs @@ -0,0 +1,112 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// A simple triangle and its material + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:10 + ///
+ /// class Triangle + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 44)] + public partial struct Triangle + { + /// + /// + /// Vertices + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:27 + ///
+ /// Float3 mV[3] + ///
+ ///
+ [FieldOffset(0)] + public float3_3 V; + + /// + /// + /// Follows mV[3] so that we can read mV as 4 vectors + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:28 + ///
+ /// uint32 mMaterialIndex = 0 + ///
+ ///
+ [FieldOffset(36)] + public uint MaterialIndex; + + /// + /// + /// User data that can be used for anything by the application, e.g. for tracking the original index of the + /// triangle + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:29 + ///
+ /// uint32 mUserData = 0 + ///
+ ///
+ [FieldOffset(40)] + public uint UserData; + + /// + /// + /// Constructor + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:16 + ///
+ /// Triangle() = default + ///
+ ///
+ public static Triangle Create() + { + Jolt.PInvoke.Triangle_Create(out var _outResult); + return _outResult; + } + + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:17 + ///
+ /// Triangle(const Float3 &inV1, const Float3 &inV2, const Float3 &inV3, uint32 inMaterialIndex = 0, uint32 inUserData = 0) + ///
+ ///
+ public static Triangle Create(float3 v1, float3 v2, float3 v3, uint materialIndex = 0, uint userData = 0) + { + Jolt.PInvoke.Triangle_Create_2(v1, v2, v3, materialIndex, userData, out var _outResult); + return _outResult; + } + + /// + /// + /// Get center of triangle + /// + /// + /// C++: + /// Jolt/Geometry/Triangle.h:21 + ///
+ /// Vec3 GetCentroid() const + ///
+ ///
+ public readonly float3 GetCentroid() => Jolt.PInvoke.Triangle_GetCentroid(ref Unsafe.AsRef(in this)); + } +} diff --git a/Brutal.Jolt/Generated/Structs/TriangleConvexSupport.gen.cs b/Brutal.Jolt/Generated/Structs/TriangleConvexSupport.gen.cs new file mode 100644 index 0000000..a4f51a8 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/TriangleConvexSupport.gen.cs @@ -0,0 +1,61 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// Class that wraps a triangle so that it can used with convex collision detection + /// + /// + /// C++: + /// Jolt/Geometry/ConvexSupport.h:97 + ///
+ /// struct TriangleConvexSupport + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct TriangleConvexSupport + { + /// + /// + /// The three vertices of the triangle + /// + /// + /// C++: + /// Jolt/Geometry/ConvexSupport.h:142 + ///
+ /// Vec3 mV1 + ///
+ ///
+ [FieldOffset(0)] + public float3 V1; + + /// + /// + /// C++: + /// Jolt/Geometry/ConvexSupport.h:143 + ///
+ /// Vec3 mV2 + ///
+ ///
+ [FieldOffset(16)] + public float3 V2; + + /// + /// + /// C++: + /// Jolt/Geometry/ConvexSupport.h:144 + ///
+ /// Vec3 mV3 + ///
+ ///
+ [FieldOffset(32)] + public float3 V3; + } +} diff --git a/Brutal.Jolt/Generated/Structs/VehicleAntiRollBar.gen.cs b/Brutal.Jolt/Generated/Structs/VehicleAntiRollBar.gen.cs new file mode 100644 index 0000000..ae30d11 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/VehicleAntiRollBar.gen.cs @@ -0,0 +1,96 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// An anti rollbar is a stiff spring that connects two wheels to reduce the amount of roll the vehicle makes in + /// sharp corners See: https://en.wikipedia.org/wiki/Anti-roll_bar + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:15 + ///
+ /// class VehicleAntiRollBar + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VehicleAntiRollBar + { + /// + /// + /// Index (in mWheels) that represents the left wheel of this anti-rollbar + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:26 + ///
+ /// int mLeftWheel = 0 + ///
+ ///
+ [FieldOffset(0)] + public int LeftWheel; + + /// + /// + /// Index (in mWheels) that represents the right wheel of this anti-rollbar + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:27 + ///
+ /// int mRightWheel = 1 + ///
+ ///
+ [FieldOffset(4)] + public int RightWheel; + + /// + /// + /// Stiffness (spring constant in N/m) of anti rollbar, can be 0 to disable the anti-rollbar + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:28 + ///
+ /// float mStiffness = 1000.0f + ///
+ ///
+ [FieldOffset(8)] + public float Stiffness; + + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:21 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public readonly void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.VehicleAntiRollBar_SaveBinaryState(ref Unsafe.AsRef(in this), stream); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleAntiRollBar.h:24 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.VehicleAntiRollBar_RestoreBinaryState(ref this, stream); + } +} diff --git a/Brutal.Jolt/Generated/Structs/VehicleDifferentialSettings.gen.cs b/Brutal.Jolt/Generated/Structs/VehicleDifferentialSettings.gen.cs new file mode 100644 index 0000000..386e483 --- /dev/null +++ b/Brutal.Jolt/Generated/Structs/VehicleDifferentialSettings.gen.cs @@ -0,0 +1,172 @@ +// +// Generated by Brutal.Jolt.Generate; do not edit by hand. +#nullable enable + +using System.Runtime.CompilerServices; +using Brutal.Interop; +using Brutal.Numerics; + +namespace Brutal.JoltApi +{ + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:13 + ///
+ /// class VehicleDifferentialSettings + ///
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VehicleDifferentialSettings + { + /// + /// + /// Index (in mWheels) that represents the left wheel of this differential (can be -1 to indicate no wheel) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:31 + ///
+ /// int mLeftWheel = -1 + ///
+ ///
+ [FieldOffset(0)] + public int LeftWheel; + + /// + /// + /// Index (in mWheels) that represents the right wheel of this differential (can be -1 to indicate no wheel) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:32 + ///
+ /// int mRightWheel = -1 + ///
+ ///
+ [FieldOffset(4)] + public int RightWheel; + + /// + /// + /// Ratio between rotation speed of gear box and wheels + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:33 + ///
+ /// float mDifferentialRatio = 3.42f + ///
+ ///
+ [FieldOffset(8)] + public float DifferentialRatio; + + /// + /// + /// Defines how the engine torque is split across the left and right wheel (0 = left, 0.5 = center, 1 = + /// right) + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:34 + ///
+ /// float mLeftRightSplit = 0.5f + ///
+ ///
+ [FieldOffset(12)] + public float LeftRightSplit; + + /// + /// + /// Ratio max / min wheel speed. When this ratio is exceeded, all torque gets distributed to the slowest + /// moving wheel. This allows implementing a limited slip differential. Set to FLT_MAX for an open + /// differential. Value should be > 1. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:35 + ///
+ /// float mLimitedSlipRatio = 1.4f + ///
+ ///
+ [FieldOffset(16)] + public float LimitedSlipRatio; + + /// + /// + /// How much of the engines torque is applied to this differential (0 = none, 1 = full), make sure the sum + /// of all differentials is 1. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:36 + ///
+ /// float mEngineTorqueRatio = 1.0f + ///
+ ///
+ [FieldOffset(20)] + public float EngineTorqueRatio; + + /// + /// + /// Saves the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:19 + ///
+ /// void SaveBinaryState(StreamOut &inStream) const + ///
+ ///
+ public readonly void SaveBinaryState(StreamOut stream) => + Jolt.PInvoke.VehicleDifferentialSettings_SaveBinaryState(ref Unsafe.AsRef(in this), stream); + + /// + /// + /// Restores the contents in binary form to inStream. + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:22 + ///
+ /// void RestoreBinaryState(StreamIn &inStream) + ///
+ ///
+ public void RestoreBinaryState(StreamIn stream) => + Jolt.PInvoke.VehicleDifferentialSettings_RestoreBinaryState(ref this, stream); + + /// + /// + /// Calculate the torque ratio between left and right wheel + /// + /// + /// C++: + /// Jolt/Physics/Vehicle/VehicleDifferential.h:29 + ///
+ /// void CalculateTorqueRatio(float inLeftAngularVelocity, float inRightAngularVelocity, float &outLeftTorqueFraction, float &outRightTorqueFraction) const + ///
+ ///
+ /// + /// + /// Calculate the torque ratio between left and right wheel + /// @param inLeftAngularVelocity Angular velocity of left wheel (rad / s) + /// @param inRightAngularVelocity Angular velocity of right wheel (rad / s) + /// @param outLeftTorqueFraction Fraction of torque that should go to the left wheel + /// @param outRightTorqueFraction Fraction of torque that should go to the right wheel + /// + /// + public readonly void CalculateTorqueRatio( + float leftAngularVelocity, + float rightAngularVelocity, + out float leftTorqueFraction, + out float rightTorqueFraction + ) => + Jolt.PInvoke.VehicleDifferentialSettings_CalculateTorqueRatio( + ref Unsafe.AsRef(in this), + leftAngularVelocity, + rightAngularVelocity, + out leftTorqueFraction, + out rightTorqueFraction + ); + } +} diff --git a/Brutal.Jolt/GlobalUsings.cs b/Brutal.Jolt/GlobalUsings.cs new file mode 100644 index 0000000..cf2cef9 --- /dev/null +++ b/Brutal.Jolt/GlobalUsings.cs @@ -0,0 +1,7 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.Memory; +global using Brutal.Numerics; +global using Brutal.Pointers; +global using Brutal.Pointers.Extensions; +global using Brutal.Strings; diff --git a/Brutal.Jolt/LICENSES/BRUTAL-JOLT-THIRD-PARTY-NOTICES.txt b/Brutal.Jolt/LICENSES/BRUTAL-JOLT-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..f3c3882 --- /dev/null +++ b/Brutal.Jolt/LICENSES/BRUTAL-JOLT-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,16 @@ +Brutal.Jolt uses third-party material as listed below. The attached notices are +provided for informational purposes only. + +============================================================ +Jolt Physics +============================================================ + +MIT License + +Copyright 2021 Jorrit Rouwe + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Brutal.Jolt/Manual/BodyAddBatch.cs b/Brutal.Jolt/Manual/BodyAddBatch.cs new file mode 100644 index 0000000..6c4cd17 --- /dev/null +++ b/Brutal.Jolt/Manual/BodyAddBatch.cs @@ -0,0 +1,58 @@ +namespace Brutal.JoltApi; + +/// +/// A batch of created bodies being added to the physics system in one go, from +/// . adds them; frees the +/// batch, and aborts the add first if it was never committed. Dispose it either way. +/// +/// +/// Adding bodies in a batch builds their broad-phase nodes once for the whole set, which is much cheaper than one +/// per body, and the prepare step can run on a background thread. The batch +/// keeps its own copy of the IDs, in the order Jolt prepared them. It holds on to the body interface it came from, +/// so dispose it before the physics system goes; it has no finalizer for that reason. and +/// are safe to call from different threads: whichever runs second sees the first's result. +/// +public sealed class BodyAddBatch : IDisposable, INullable +{ + // Commit and Dispose both reach the native batch, so they take turns: Dispose can't free it mid-commit + private readonly Lock _gate = new(); + private nint _batch; + private bool _committed; + + internal BodyAddBatch(nint batch) => _batch = batch; + + /// Whether this is the empty (already disposed) batch. + public bool IsNull() => _batch == 0; + + /// Whether has run; until then, aborts the add. + public bool IsCommitted => _committed; + + /// + /// Adds every body in the batch to the physics system, under one lock. Committing again does nothing. + /// + /// Whether the bodies start active. + /// The batch has been disposed. + public void Commit(Activation activation = Activation.Activate) + { + lock (_gate) + { + ObjectDisposedException.ThrowIf(_batch == 0, this); + if (_committed) + return; + Jolt.PInvoke.BodyAddBatchCommit(_batch, activation); + _committed = true; + } + } + + /// Frees the batch, aborting the add if it was never committed. Idempotent. + public void Dispose() + { + lock (_gate) + { + if (_batch == 0) + return; + Jolt.PInvoke.BodyAddBatchDestroy(_batch); + _batch = 0; + } + } +} diff --git a/Brutal.Jolt/Manual/BodyInterface.PrepareAddBodies.cs b/Brutal.Jolt/Manual/BodyInterface.PrepareAddBodies.cs new file mode 100644 index 0000000..828b7c6 --- /dev/null +++ b/Brutal.Jolt/Manual/BodyInterface.PrepareAddBodies.cs @@ -0,0 +1,24 @@ +namespace Brutal.JoltApi; + +// Hand-written wrapper for BodyInterface.PrepareAddBodies (the batch add API from JoltBodies.h). +public readonly partial struct BodyInterface +{ + /// + /// + /// Starts adding many created bodies to the physics system at once, which is much cheaper than adding them + /// one at a time. The IDs are copied, so bodyIDs can be reused straight away. Preparing touches nothing the + /// simulation reads, so it can run on a background thread; BodyAddBatch.Commit then adds them all under one + /// lock. Bodies must have been created (CreateBody) and not added yet. + /// + /// + /// The returned batch is yours: Commit it, then Dispose it (Dispose alone aborts the add). + public unsafe BodyAddBatch PrepareAddBodies(ReadOnlySpan bodyIDs) + { + fixed (uint* bodyIDs_fixed = bodyIDs) + { + return new BodyAddBatch( + Jolt.PInvoke.BodyInterface_PrepareAddBodies(this, bodyIDs_fixed, (nuint)bodyIDs.Length) + ); + } + } +} diff --git a/Brutal.Jolt/Manual/BodyState.cs b/Brutal.Jolt/Manual/BodyState.cs new file mode 100644 index 0000000..9d77c0f --- /dev/null +++ b/Brutal.Jolt/Manual/BodyState.cs @@ -0,0 +1,60 @@ +namespace Brutal.JoltApi; + +/// What says about the body it was read from. +[Flags] +public enum BodyStateFlags : uint +{ + /// The ID named no body (removed, or a stale sequence number); the rest of the state is zeroed. + None = 0, + + /// The ID named a body and the state was read from it. + Valid = 1, + + /// The body is awake and being simulated. + Active = 2, +} + +/// +/// One body's pose, velocities, user data and activation, as reads them +/// for many bodies under one lock. +/// +/// +/// A snapshot for syncing an ECS, a network state or render interpolation from the simulation. A static body reads +/// as zero velocity. An ID that no longer names a body reads as the origin with the identity rotation and +/// clear of . +/// +[StructLayout(LayoutKind.Explicit, Size = 64)] +public struct BodyState +{ + // Laid out like the shim's JoltBodyState, 64 bytes (asserted there and in the tests) + + /// The body's position (its centre of mass is offset from this by the shape). + [FieldOffset(0)] + public float3 Position; + + /// Whether the ID named a body, and whether that body is active. + [FieldOffset(12)] + public BodyStateFlags Flags; + + /// The body's rotation. + [FieldOffset(16)] + public floatQuat Rotation; + + /// Linear velocity of the centre of mass, in m/s. + [FieldOffset(32)] + public float3 LinearVelocity; + + /// Angular velocity, in rad/s. + [FieldOffset(44)] + public float3 AngularVelocity; + + /// The body's user data, as reads it. + [FieldOffset(56)] + public ulong UserData; + + /// Whether the ID named a body. + public readonly bool IsValid => (Flags & BodyStateFlags.Valid) != 0; + + /// Whether the body is awake and being simulated. + public readonly bool IsActive => (Flags & BodyStateFlags.Active) != 0; +} diff --git a/Brutal.Jolt/Manual/ClosestPoint.cs b/Brutal.Jolt/Manual/ClosestPoint.cs new file mode 100644 index 0000000..5f0402c --- /dev/null +++ b/Brutal.Jolt/Manual/ClosestPoint.cs @@ -0,0 +1,51 @@ +using Brutal.Numerics; + +namespace Brutal.JoltApi; + +// Hand-written wrappers for JPH::ClosestPoint free functions (templates the parse can't bind). +public static partial class Jolt +{ + /// + /// + /// The barycentric coordinates of the point on segment ab closest to the origin, so that u * a + v * b is + /// that point. False when the segment is degenerate, which leaves the closest vertex. + /// + /// + public static bool GetBaryCentricCoordinates(float3 a, float3 b, out float u, out float v) => + Jolt.PInvoke.ClosestPointGetBaryCentricCoordinates(a, b, out u, out v); + + /// + /// + /// The barycentric coordinates of the origin projected onto triangle abc, so that u * a + v * b + w * c is + /// that point. False when the triangle is degenerate. + /// + /// + public static bool GetBaryCentricCoordinates(float3 a, float3 b, float3 c, out float u, out float v, out float w) => + Jolt.PInvoke.ClosestPointGetBaryCentricCoordinates_2(a, b, c, out u, out v, out w); + + /// + /// + /// The point on segment ab closest to the origin; set gets a bit per vertex that is part of the result (1 = + /// a, 2 = b). + /// + /// + public static float3 GetClosestPointOnLine(float3 a, float3 b, out uint set) => + Jolt.PInvoke.ClosestPointGetClosestPointOnLine(a, b, out set); + + /// + /// + /// The point on triangle abc closest to the origin; set gets a bit per vertex that is part of the result. + /// + /// + public static float3 GetClosestPointOnTriangle(float3 a, float3 b, float3 c, out uint set) => + Jolt.PInvoke.ClosestPointGetClosestPointOnTriangle(a, b, c, out set); + + /// + /// + /// The point on (or in) tetrahedron abcd closest to the origin; set gets a bit per vertex that is part of + /// the result, all four when the origin is inside. + /// + /// + public static float3 GetClosestPointOnTetrahedron(float3 a, float3 b, float3 c, float3 d, out uint set) => + Jolt.PInvoke.ClosestPointGetClosestPointOnTetrahedron(a, b, c, d, out set); +} diff --git a/Brutal.Jolt/Manual/ContactEvent.cs b/Brutal.Jolt/Manual/ContactEvent.cs new file mode 100644 index 0000000..8c01e13 --- /dev/null +++ b/Brutal.Jolt/Manual/ContactEvent.cs @@ -0,0 +1,89 @@ +namespace Brutal.JoltApi; + +/// Which contact callback a was recorded from. +public enum ContactEventKind : uint +{ + /// Two bodies started touching (). + Added = 0, + + /// Two bodies are still touching (). + Persisted = 1, + + /// Two bodies stopped touching (). + Removed = 2, +} + +/// Which kinds of event a records. +[Flags] +public enum ContactEventMask : uint +{ + /// Nothing. + None = 0, + + /// Contacts starting. + Added = 1 << (int)ContactEventKind.Added, + + /// Contacts continuing, one event per touching pair per step: the noisy one. + Persisted = 1 << (int)ContactEventKind.Persisted, + + /// Contacts ending. + Removed = 1 << (int)ContactEventKind.Removed, + + /// Contacts starting and ending, without the per-step persisted events. + AddedAndRemoved = Added | Removed, + + /// Every kind. + All = Added | Persisted | Removed, +} + +/// One contact event, as hands it back. +/// +/// Everything is copied at the time of the callback, so an event stays valid after the bodies move or go away. +/// A event only carries the body and sub-shape IDs, since that's all Jolt +/// reports when a contact ends; its geometry and user data are zero. +/// +[StructLayout(LayoutKind.Explicit, Size = 64)] +public struct ContactEvent +{ + // Laid out like the shim's JoltContactEvent, 64 bytes (asserted there and in the tests) + + /// Whether the contact started, continued or ended. + [FieldOffset(0)] + public ContactEventKind Kind; + + /// The first body's ID. + [FieldOffset(4)] + public uint Body1; + + /// The second body's ID. + [FieldOffset(8)] + public uint Body2; + + /// The sub-shape of the first body that's touching. + [FieldOffset(12)] + public uint SubShape1; + + /// The sub-shape of the second body that's touching. + [FieldOffset(16)] + public uint SubShape2; + + /// How far the shapes overlap along . + [FieldOffset(20)] + public float PenetrationDepth; + + /// The contact normal in world space, pointing from body 1 towards body 2. + [FieldOffset(24)] + public float3 Normal; + + /// The first contact point, on body 1, in world space. + [FieldOffset(36)] + public float3 Point; + + /// The first body's user data. + [FieldOffset(48)] + public ulong UserData1; + + /// The second body's user data. + [FieldOffset(56)] + public ulong UserData2; +} diff --git a/Brutal.Jolt/Manual/ContactEventListener.cs b/Brutal.Jolt/Manual/ContactEventListener.cs new file mode 100644 index 0000000..7a8cb6d --- /dev/null +++ b/Brutal.Jolt/Manual/ContactEventListener.cs @@ -0,0 +1,94 @@ +namespace Brutal.JoltApi; + +/// +/// A contact listener that records contacts natively for you to after +/// , instead of calling into C# for every contact. +/// +/// +/// +/// Observe-only: it can't reject a contact or change its . Use a +/// for that. What it saves is the managed callback per contact, which Jolt makes +/// from its worker threads while holding body locks, so it suits audio, damage, sensors and gameplay triggers. +/// +/// +/// Install with . The buffer holds +/// events; ones past that are counted in and lost, so size it for your +/// busiest step or drain every step. Drain, and must only be called between +/// updates, never while one is running. Take the listener off the system before disposing it; it has no finalizer +/// for that reason. +/// +/// +public sealed unsafe class ContactEventListener : IDisposable, INullable +{ + private nint _listener; + + /// Creates a listener buffering up to events of the kinds in + /// . + /// How many events the buffer holds between drains. + /// Which kinds to record. Leaving out keeps only + /// the starts and ends of contacts, which is usually what gameplay wants. + /// is zero. + public ContactEventListener(uint capacity, ContactEventMask mask = ContactEventMask.AddedAndRemoved) + { + ArgumentOutOfRangeException.ThrowIfZero(capacity); + _listener = Jolt.PInvoke.ContactEventListenerCreate(capacity, (uint)mask); + Handle = Jolt.PInvoke.ContactEventListenerGetBase(_listener); + Mask = mask; + } + + /// The listener as the + /// takes. Borrowed from this listener: don't Dispose it. + public ContactListener Handle { get; private set; } + + /// Which kinds of event are recorded. + public ContactEventMask Mask { get; } + + /// Whether this listener has been disposed. + public bool IsNull() => _listener == 0; + + /// How many events the buffer holds. + public uint Capacity => Jolt.PInvoke.ContactEventListenerGetCapacity(Live()); + + /// How many events are waiting to be drained. + public uint Pending => Jolt.PInvoke.ContactEventListenerGetPending(Live()); + + /// How many events were lost over this listener's life because the buffer was full. It only grows, + /// so compare it with the last value you read. + public uint Dropped => Jolt.PInvoke.ContactEventListenerGetDropped(Live()); + + /// + /// Copies pending events into , oldest first, and returns how many were copied. What + /// doesn't fit stays for the next call, so draining in a loop until is zero is fine. + /// + /// Where to copy the events. + /// How many events are still pending after this call. + public uint Drain(Span events, out uint remaining) + { + var listener = Live(); + fixed (ContactEvent* eventsFixed = events) + fixed (uint* remainingFixed = &remaining) + return Jolt.PInvoke.ContactEventListenerDrain(listener, eventsFixed, (uint)events.Length, remainingFixed); + } + + /// Throws away every pending event. + public void Clear() => Jolt.PInvoke.ContactEventListenerClear(Live()); + + /// Frees the listener. It must not still be installed on a physics system. Idempotent. + public void Dispose() + { + var listener = Interlocked.Exchange(ref _listener, 0); + if (listener == 0) + return; + Handle = default; + Jolt.PInvoke.ContactEventListenerDestroy(listener); + } + + /// The listener as the a physics system takes. + public static implicit operator ContactListener(ContactEventListener listener) => listener.Handle; + + private nint Live() + { + ObjectDisposedException.ThrowIf(_listener == 0, this); + return _listener; + } +} diff --git a/Brutal.Jolt/Manual/ContactManifold.cs b/Brutal.Jolt/Manual/ContactManifold.cs new file mode 100644 index 0000000..075d007 --- /dev/null +++ b/Brutal.Jolt/Manual/ContactManifold.cs @@ -0,0 +1,28 @@ +namespace Brutal.JoltApi; + +// Jolt's inline world-space accessors, done in C# over the fields the struct already holds rather than a native +// call per point. The generator leaves them out (see _manualValueMembers). +public partial struct ContactManifold +{ + /// The world-space position of contact point on shape 1. + /// The index is at or past the live contact point count. + public readonly float3 GetWorldSpaceContactPointOn1(uint index) => + BaseOffset + PointAt(in RelativeContactPointsOn1, index, "contact points on shape 1"); + + /// The world-space position of contact point on shape 2. + /// The index is at or past the live contact point count. + public readonly float3 GetWorldSpaceContactPointOn2(uint index) => + BaseOffset + PointAt(in RelativeContactPointsOn2, index, "contact points on shape 2"); + + // Only the first Size slots are live, so the bound is the count rather than the 64-slot capacity + private static float3 PointAt(in StaticArrayVec3_64 points, uint index, string what) + { + if (index >= points.Size) + throw new ArgumentOutOfRangeException( + nameof(index), + index, + $"Expected an index below the number of {what}." + ); + return points.Elements[(int)index].XYZ; + } +} diff --git a/Brutal.Jolt/Manual/ConvexObject.cs b/Brutal.Jolt/Manual/ConvexObject.cs new file mode 100644 index 0000000..8b0f8aa --- /dev/null +++ b/Brutal.Jolt/Manual/ConvexObject.cs @@ -0,0 +1,63 @@ +using System.Runtime.InteropServices; + +namespace Brutal.JoltApi; + +/// +/// A convex object for : a box (with an optional convex radius), a sphere, or a +/// point with a radius, placed by a transform. +/// +/// +/// A sphere and a point with a radius describe the same volume, but the solver sees them differently: the sphere is +/// one support shape, the point hands the radius to GJK as a convex radius, the way Jolt's own shapes do. +/// +[StructLayout(LayoutKind.Sequential)] +public readonly struct ConvexObject +{ + // Laid out like the shim's JoltConvexObject, 112 bytes (asserted there and in the tests) + private readonly uint _kind; + private readonly float _radius; + private readonly float _convexRadius; + private readonly float4x4 _transform; + private readonly float3 _center; + private readonly float3 _min; + private readonly float3 _max; + + private ConvexObject( + uint kind, + float radius, + float convexRadius, + float4x4 transform, + float3 center, + float3 min, + float3 max + ) + { + _kind = kind; + _radius = radius; + _convexRadius = convexRadius; + _transform = transform; + _center = center; + _min = min; + _max = max; + } + + /// A box from to in 's space, + /// grown by . + public static ConvexObject Box(float3 min, float3 max, float4x4 transform, float convexRadius = 0f) => + new(0, 0f, convexRadius, transform, float3.Zero, min, max); + + /// A box in 's space, grown by . + public static ConvexObject Box(AABox box, float4x4 transform, float convexRadius = 0f) => + Box(box.Min, box.Max, transform, convexRadius); + + /// A sphere in 's space. + public static ConvexObject Sphere(float3 center, float radius, float4x4 transform) => + new(1, radius, 0f, transform, center, float3.Zero, float3.Zero); + + /// A sphere in world space. + public static ConvexObject Sphere(float3 center, float radius) => Sphere(center, radius, float4x4.Identity); + + /// A point in world space, grown by as a convex radius. + public static ConvexObject Point(float3 position, float radius) => + new(2, radius, 0f, float4x4.Identity, position, float3.Zero, float3.Zero); +} diff --git a/Brutal.Jolt/Manual/Handles.cs b/Brutal.Jolt/Manual/Handles.cs new file mode 100644 index 0000000..6afb56d --- /dev/null +++ b/Brutal.Jolt/Manual/Handles.cs @@ -0,0 +1,40 @@ +namespace Brutal.JoltApi; + +// Hand-written bits the generator can't express (see Generator.Interop.cs for what it does emit): +// Factory.Instance, and the one down-cast Jolt keeps no type information for (the checked AsX() casts on +// Shape, Constraint and VehicleController are generated). + +public readonly partial struct Factory +{ + /// Mirrors JPH::Factory::sInstance. + /// + /// Assigning hands the factory to the global, and the getter borrows it back. Tear it down with + /// ; never Dispose the handle you assigned or the one you get back. + /// + public static Factory Instance + { + get => GetInstance(); + set => SetInstance(value); + } + + /// Deletes the global factory instance and clears . + public static void DestroyInstance() + { + var instance = GetInstance(); + if (!instance.IsNull()) + instance.Dispose(); + SetInstance(default); + } +} + +public readonly partial struct MotionProperties +{ + /// Views these motion properties as the soft-body ones they are. + /// + /// hands back the base type, so this is how a soft body's + /// vertices are reached. Same handle, not a new reference, so don't Dispose it. Unchecked: + /// only valid on a soft body. + /// + public SoftBodyMotionProperties AsSoftBodyMotionProperties() => + Unsafe.BitCast(this); +} diff --git a/Brutal.Jolt/Manual/JoltException.cs b/Brutal.Jolt/Manual/JoltException.cs new file mode 100644 index 0000000..b6ae229 --- /dev/null +++ b/Brutal.Jolt/Manual/JoltException.cs @@ -0,0 +1,30 @@ +namespace Brutal.JoltApi; + +/// +/// The exception thrown when a Jolt operation fails - a shape, constraint or settings object that won't build, or +/// an object stream that won't restore. Its carries the error text Jolt reported +/// () at the point of failure. +/// +/// +/// A bad argument the binding catches before calling into Jolt still throws the usual +/// or ; this one means Jolt itself refused. +/// +public class JoltException : Exception +{ + /// Initializes a new with the given message. + /// The failure description, typically Jolt's own error text. + public JoltException(string message) + : base(message) { } + + /// Initializes a new with the given message and inner exception. + /// The failure description, typically Jolt's own error text. + /// The underlying exception that caused this failure. + public JoltException(string message, Exception innerException) + : base(message, innerException) { } + + /// + /// Creates a whose message is the calling thread's last Jolt error + /// (). + /// + public static JoltException FromLastError() => new(Jolt.GetLastError()); +} diff --git a/Brutal.Jolt/Manual/NativeArray.cs b/Brutal.Jolt/Manual/NativeArray.cs new file mode 100644 index 0000000..b5487a2 --- /dev/null +++ b/Brutal.Jolt/Manual/NativeArray.cs @@ -0,0 +1,65 @@ +namespace Brutal.JoltApi; + +/// A contiguous buffer of the native side allocated for this call. +/// +/// +/// A copy of a native JPH::Array, so it stays valid after the physics system moves on. This object +/// is the block's sole owner: (idempotent) frees it, after which every span from +/// dangles and the buffer reads as empty. Never dispose one while a span it handed out is +/// still in use. +/// +/// +/// There is no finalizer, so an undisposed buffer leaks rather than being freed behind a span that's still +/// being read. Dispose every one, typically with using. +/// +/// +/// When is a handle, what the buffer holds depends on how Jolt stored it. A +/// container of Ref<T> is copied with its references intact, so the handles live as long as the +/// buffer. A container of raw pointers is copied as pointers only - those handles belong to whatever owned +/// them originally (the PhysicsSystem, the Factory) and die with it, buffer or no buffer. +/// Either way the handles are borrowed: never dispose one individually. +/// +/// +/// The block is freed through Jolt's allocator, so dispose every buffer before +/// / . +/// +/// +public sealed class NativeArray : IDisposable, INullable + where T : unmanaged +{ + private nint _block; + + // Read once from the block's header: both are fixed for the life of the block, and holding them here means + // nothing reads the header again once Dispose has freed it + private readonly unsafe T* _data; + private readonly int _length; + + internal unsafe NativeArray(nint block) + { + _block = block; + if (block == 0) + return; + + var header = (NativeArrayBlock*)block; + _data = (T*)header->Data; + _length = checked((int)header->Count); + } + + /// Whether this is the empty (never allocated, or already disposed) buffer. + public bool IsNull() => _block == 0; + + /// The number of elements in the buffer; 0 once it has been disposed. + public int Length => _block == 0 ? 0 : _length; + + /// The buffer's contents, valid until ; empty afterwards. + [return: Brutal.Attributes.Fixed] + public unsafe ReadOnlySpan AsSpan() => _block == 0 ? default : new ReadOnlySpan(_data, _length); + + /// Frees the buffer. Idempotent; the spans it handed out are dangling afterwards. + public void Dispose() + { + var block = Interlocked.Exchange(ref _block, 0); + if (block != 0) + Jolt.PInvoke.NativeArrayDestroy(block); + } +} diff --git a/Brutal.Jolt/Manual/NativeArrayBlock.cs b/Brutal.Jolt/Manual/NativeArrayBlock.cs new file mode 100644 index 0000000..7260b37 --- /dev/null +++ b/Brutal.Jolt/Manual/NativeArrayBlock.cs @@ -0,0 +1,13 @@ +namespace Brutal.JoltApi; + +// The shim's JoltArrayBlock header (Generated/Shim/JoltInterop.h, which static_asserts this layout), read in place +// by NativeArray and NativeHandleArray instead of a native call per field +[StructLayout(LayoutKind.Sequential)] +internal struct NativeArrayBlock +{ + public nint Data; + public ulong Count; + public nint Owner; + public nint Destroy; + public ulong Stride; +} diff --git a/Brutal.Jolt/Manual/NativeHandleArray.cs b/Brutal.Jolt/Manual/NativeHandleArray.cs new file mode 100644 index 0000000..b06c6a6 --- /dev/null +++ b/Brutal.Jolt/Manual/NativeHandleArray.cs @@ -0,0 +1,67 @@ +namespace Brutal.JoltApi; + +/// +/// An owned native buffer of objects Jolt stores by value and C# sees as handles - a query's +/// hits, for one. Dispose it when done. +/// +/// +/// +/// The buffer owns its elements, and whatever they reference: a holds a reference to +/// its shape, so the shapes stay alive until the buffer is disposed even if the bodies they came from are gone. +/// +/// +/// The handles it hands out are borrowed - each points at an element inside the buffer, so never Dispose one, and +/// don't use one after the buffer is disposed. +/// +/// +/// There is no finalizer, so an undisposed buffer leaks rather than being freed behind a handle that's still in +/// use. Dispose every one, typically with using, and before / +/// , since the block is freed through Jolt's allocator. +/// +/// +public sealed class NativeHandleArray : IDisposable, INullable + where T : unmanaged +{ + private nint _block; + + // Read once: data, count and stride are fixed for the life of the block + private readonly nint _data; + private readonly int _length; + private readonly int _stride; + + internal unsafe NativeHandleArray(nint block) + { + _block = block; + if (block == 0) + return; + + var header = (NativeArrayBlock*)block; + _data = header->Data; + _length = checked((int)header->Count); + _stride = checked((int)header->Stride); + } + + /// Whether this is the empty (never allocated, or already disposed) buffer. + public bool IsNull() => _block == 0; + + /// The number of elements; 0 once the buffer has been disposed. + public int Length => _block == 0 ? 0 : _length; + + /// A borrowed handle onto element . + /// The index is outside the buffer. + public T this[int index] => AsSpan()[index]; + + /// The elements as borrowed handles, valid until ; empty afterwards. + public NativeHandleSpan AsSpan() => _block == 0 ? default : new NativeHandleSpan(_data, _length, _stride); + + /// Walks the elements in order, as borrowed handles. + public NativeHandleSpan.Enumerator GetEnumerator() => AsSpan().GetEnumerator(); + + /// Frees the buffer and releases what its elements reference. Idempotent. + public void Dispose() + { + var block = Interlocked.Exchange(ref _block, 0); + if (block != 0) + Jolt.PInvoke.NativeArrayDestroy(block); + } +} diff --git a/Brutal.Jolt/Manual/NativeHandleSpan.cs b/Brutal.Jolt/Manual/NativeHandleSpan.cs new file mode 100644 index 0000000..a3259ea --- /dev/null +++ b/Brutal.Jolt/Manual/NativeHandleSpan.cs @@ -0,0 +1,105 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.JoltApi; + +/// +/// A borrowed view over a native container that stores by value, handing +/// out one borrowed handle per element. +/// +/// +/// +/// Jolt stores some containers as whole objects laid end to end (PhysicsScene's body settings, for +/// instance), while C# only ever sees those types as handles - an address. A of +/// handles would be wrong, because the memory holds N objects of the native element size rather than N +/// pointers, and a copied buffer would be worse: an edit through a copy never reaches the container. So +/// this type keeps the storage base together with the element stride the native side measured, and +/// forms the handle for element i as base + i * stride. Reading or +/// writing through that handle touches the owner's own element. +/// +/// +/// Every handle it hands out is borrowed: it belongs to the container, so it must never be +/// disposed. Dispose on one of these handles is a native delete, and the pointer is an +/// element inside the container's own allocation rather than an object of its own, so deleting it +/// corrupts the heap. Never write using var settings = scene.GetBodies()[0]; and never pass one to +/// anything that takes ownership - the same rule every borrowed handle in this binding carries +/// (, BodyManager.GetBodies(), and every getter whose doc says "the +/// returned handle is borrowed from its owner"). +/// +/// +/// A handle also dangles the moment the container is resized (anything that adds or removes elements) or +/// its owner is destroyed. The view itself has the same lifetime: being a ref struct keeps it off +/// the heap and out of closures, but the compiler can't prove the owner outlives the stack frame, so treat +/// it exactly like a [Fixed] span - read it inside the scope that produced it, and take it again +/// after anything that could have grown the container rather than reusing the old one. +/// +/// +public readonly ref struct NativeHandleSpan + where T : unmanaged +{ + private readonly nint _data; + private readonly int _count; + private readonly int _stride; + + internal NativeHandleSpan(NativeStridedView view) + { + _data = view.Data; + _count = view.Data == 0 ? 0 : checked((int)view.Count); + _stride = checked((int)view.Stride); + } + + // A view of an owned NativeHandleArray's storage + internal NativeHandleSpan(nint data, int count, int stride) + { + _data = data; + _count = data == 0 ? 0 : count; + _stride = stride; + } + + /// The number of elements the container holds. + public int Count => _count; + + /// Whether the container is empty (or the view was never filled). + public bool IsEmpty => _count == 0; + + /// + /// A borrowed handle onto element of the container's own storage. Writing + /// through it edits the container; never Dispose it - the handle addresses an element inside the + /// container's allocation, so deleting it corrupts the heap. + /// + /// The index is outside the container. + public T this[int index] + { + get + { + if ((uint)index >= (uint)_count) + throw new ArgumentOutOfRangeException(nameof(index), index, $"Expected an index below {_count}."); + // Every handle struct is a single nint, so the bit cast is the whole conversion + return Unsafe.BitCast(_data + (nint)index * _stride); + } + } + + /// Walks the elements in order, yielding the same borrowed handles as . + public Enumerator GetEnumerator() => new(this); + + /// + /// Enumerates a . Each is the same borrowed + /// handle the indexer gives: never Dispose one, so never foreach with a using body. + /// + public ref struct Enumerator + { + private readonly NativeHandleSpan _view; + private int _index; + + internal Enumerator(NativeHandleSpan view) + { + _view = view; + _index = -1; + } + + /// The borrowed handle at the current position; never Dispose it. + public readonly T Current => _view[_index]; + + /// Advances to the next element; false at the end. + public bool MoveNext() => ++_index < _view.Count; + } +} diff --git a/Brutal.Jolt/Manual/PInvoke.BodyAddBatch.cs b/Brutal.Jolt/Manual/PInvoke.BodyAddBatch.cs new file mode 100644 index 0000000..e33b303 --- /dev/null +++ b/Brutal.Jolt/Manual/PInvoke.BodyAddBatch.cs @@ -0,0 +1,42 @@ +using System.Runtime.InteropServices; + +namespace Brutal.JoltApi; + +// Hand-written LibraryImports for the batch body add (JoltBodyAddBatchShim.cpp). +// PrepareAddBodies is on BodyInterface; Commit and Destroy are free functions. +public static partial class Jolt +{ + public static unsafe partial class PInvoke + { + /// + /// + /// Starts adding many created bodies to the physics system at once, which is much cheaper than adding them + /// one at a time. The IDs are copied, so bodyIDs can be reused straight away. Preparing touches nothing the + /// simulation reads, so it can run on a background thread; BodyAddBatch.Commit then adds them all under one + /// lock. Bodies must have been created (CreateBody) and not added yet. + /// + /// + [LibraryImport("jolt", EntryPoint = "BodyInterface_PrepareAddBodies")] + public static partial nint BodyInterface_PrepareAddBodies( + BodyInterface self, + uint* bodyIDs, + nuint bodyIDsCount + ); + + /// + /// + /// Finalizes a prepared batch add; a batch already committed is left alone. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_BodyAddBatchCommit")] + public static partial void BodyAddBatchCommit(nint batch, Activation activation); + + /// + /// + /// Frees a batch add, aborting it first when it was never committed. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_BodyAddBatchDestroy")] + public static partial void BodyAddBatchDestroy(nint batch); + } +} diff --git a/Brutal.Jolt/Manual/PInvoke.ClosestPoint.cs b/Brutal.Jolt/Manual/PInvoke.ClosestPoint.cs new file mode 100644 index 0000000..1332aca --- /dev/null +++ b/Brutal.Jolt/Manual/PInvoke.ClosestPoint.cs @@ -0,0 +1,45 @@ +using System.Runtime.InteropServices; +using Brutal.Numerics; + +namespace Brutal.JoltApi; + +// Hand-written LibraryImports for JPH::ClosestPoint free functions (JoltClosestPointShim.cpp). +// These are templates the parse can't bind. +public static partial class Jolt +{ + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "Jolt_ClosestPointGetBaryCentricCoordinates")] + public static partial Brutal.Bool8 ClosestPointGetBaryCentricCoordinates( + float3 a, + float3 b, + out float u, + out float v + ); + + [LibraryImport("jolt", EntryPoint = "Jolt_ClosestPointGetBaryCentricCoordinates_2")] + public static partial Brutal.Bool8 ClosestPointGetBaryCentricCoordinates_2( + float3 a, + float3 b, + float3 c, + out float u, + out float v, + out float w + ); + + [LibraryImport("jolt", EntryPoint = "Jolt_ClosestPointGetClosestPointOnLine")] + public static partial float3 ClosestPointGetClosestPointOnLine(float3 a, float3 b, out uint set); + + [LibraryImport("jolt", EntryPoint = "Jolt_ClosestPointGetClosestPointOnTriangle")] + public static partial float3 ClosestPointGetClosestPointOnTriangle(float3 a, float3 b, float3 c, out uint set); + + [LibraryImport("jolt", EntryPoint = "Jolt_ClosestPointGetClosestPointOnTetrahedron")] + public static partial float3 ClosestPointGetClosestPointOnTetrahedron( + float3 a, + float3 b, + float3 c, + float3 d, + out uint set + ); + } +} diff --git a/Brutal.Jolt/Manual/PInvoke.ContactEvents.cs b/Brutal.Jolt/Manual/PInvoke.ContactEvents.cs new file mode 100644 index 0000000..060b684 --- /dev/null +++ b/Brutal.Jolt/Manual/PInvoke.ContactEvents.cs @@ -0,0 +1,80 @@ +using System.Runtime.InteropServices; + +namespace Brutal.JoltApi; + +// Hand-written LibraryImports for the contact event listener (JoltContactEventsShim.cpp). +// These are fixed-shape, not derived from the parse. +public static partial class Jolt +{ + public static unsafe partial class PInvoke + { + /// + /// + /// Creates a buffering contact listener holding up to capacity events of the kinds in mask. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerCreate")] + public static partial nint ContactEventListenerCreate(uint capacity, uint mask); + + /// + /// + /// Frees a buffering contact listener. It must not be installed on a physics system. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerDestroy")] + public static partial void ContactEventListenerDestroy(nint listener); + + /// + /// + /// The listener as the ContactListener PhysicsSystem.SetContactListener takes; borrowed from it. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerGetBase")] + public static partial ContactListener ContactEventListenerGetBase(nint listener); + + /// + /// + /// Copies up to capacity pending events into events, oldest first, and returns how many were copied. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerDrain")] + public static partial uint ContactEventListenerDrain( + nint listener, + ContactEvent* events, + uint capacity, + uint* remaining + ); + + /// + /// + /// Throws away every pending event. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerClear")] + public static partial void ContactEventListenerClear(nint listener); + + /// + /// + /// How many events are waiting to be drained. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerGetPending")] + public static partial uint ContactEventListenerGetPending(nint listener); + + /// + /// + /// How many events were dropped over the listener's life because the buffer was full. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerGetDropped")] + public static partial uint ContactEventListenerGetDropped(nint listener); + + /// + /// + /// How many events the buffer holds. + /// + /// + [LibraryImport("jolt", EntryPoint = "Jolt_ContactEventListenerGetCapacity")] + public static partial uint ContactEventListenerGetCapacity(nint listener); + } +} diff --git a/Brutal.Jolt/Manual/PInvoke.PenetrationDepth.cs b/Brutal.Jolt/Manual/PInvoke.PenetrationDepth.cs new file mode 100644 index 0000000..a30d6a3 --- /dev/null +++ b/Brutal.Jolt/Manual/PInvoke.PenetrationDepth.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; +using Brutal.Numerics; + +namespace Brutal.JoltApi; + +// Hand-written LibraryImport for the GJK/EPA penetration depth test (JoltPenetrationDepthShim.cpp). +// EPAPenetrationDepth is a template the parse can't bind. +public static partial class Jolt +{ + public static unsafe partial class PInvoke + { + [LibraryImport("jolt", EntryPoint = "Jolt_GetPenetrationDepth")] + public static partial Brutal.Bool8 GetPenetrationDepth( + ref ConvexObject a, + ref ConvexObject b, + float collisionToleranceSq, + float penetrationTolerance, + ref float3 v, + out float3 pointA, + out float3 pointB + ); + } +} diff --git a/Brutal.Jolt/Manual/PenetrationDepth.cs b/Brutal.Jolt/Manual/PenetrationDepth.cs new file mode 100644 index 0000000..ded3c9a --- /dev/null +++ b/Brutal.Jolt/Manual/PenetrationDepth.cs @@ -0,0 +1,44 @@ +using Brutal.Numerics; + +namespace Brutal.JoltApi; + +// Hand-written wrapper for GetPenetrationDepth (EPAPenetrationDepth is a template the parse can't bind). +public static partial class Jolt +{ + /// + /// + /// Whether two convex objects intersect, by GJK and then EPA when GJK can't tell, and if so the + /// penetration: v is the separating direction (initialise it to any non-zero guess, it is refined in + /// place), pointA and pointB the deepest points on each (zero when they don't intersect). + /// collisionToleranceSq is the squared distance counted as touching, penetrationTolerance the EPA + /// convergence tolerance (at least FLT_EPSILON, 1.1920929E-07; C#'s float.Epsilon is far smaller and + /// throws). + /// + /// + public static bool GetPenetrationDepth( + ConvexObject a, + ConvexObject b, + float collisionToleranceSq, + float penetrationTolerance, + ref float3 v, + out float3 pointA, + out float3 pointB + ) + { + if (!(penetrationTolerance >= 1.1920929E-07f)) + throw new ArgumentOutOfRangeException( + nameof(penetrationTolerance), + penetrationTolerance, + "Expected at least FLT_EPSILON (1.1920929E-07) - float.Epsilon is far smaller." + ); + return Jolt.PInvoke.GetPenetrationDepth( + ref a, + ref b, + collisionToleranceSq, + penetrationTolerance, + ref v, + out pointA, + out pointB + ); + } +} diff --git a/Brutal.Ktx/Abstractions/GpuUploadUtils.cs b/Brutal.Ktx/Abstractions/GpuUploadUtils.cs new file mode 100644 index 0000000..5d24431 --- /dev/null +++ b/Brutal.Ktx/Abstractions/GpuUploadUtils.cs @@ -0,0 +1,18 @@ +namespace Brutal.KtxApi.Abstractions; + +public static class GpuUploadUtils +{ + public static bool IsRowSize4BytePadded(KtxTextureHandle textureHandle, int level) + { + if (textureHandle.ClassId == ClassId.Texture2C) + return false; + + // Catches compressed textures (All multiple of 4 in element size), and uncompressed with 4 byte elements + if (textureHandle.GetElementSize() % 4 == 0) + return false; + + var levelPixelWidth = textureHandle.BaseWidth >> level; + + return textureHandle.GetRowPitch((uint)level) != textureHandle.GetElementSize() * levelPixelWidth; + } +} diff --git a/Brutal.Ktx/Abstractions/KtxAstcParamsPartial.cs b/Brutal.Ktx/Abstractions/KtxAstcParamsPartial.cs new file mode 100644 index 0000000..9855c42 --- /dev/null +++ b/Brutal.Ktx/Abstractions/KtxAstcParamsPartial.cs @@ -0,0 +1,25 @@ +namespace Brutal.KtxApi; + +public partial struct KtxAstcParams +{ + /// + /// Initialises the StructSize field to the correct value. + /// + /// + /// This constructor only runs when you call new KtxAstcParams() explicitly - it is + /// bypassed by default(KtxAstcParams), array elements (new KtxAstcParams[n]), + /// and struct fields in other types, all of which leave StructSize at 0. Prefer + /// when you're not immediately assigning every field via an object + /// initializer. + /// + public unsafe KtxAstcParams() + { + StructSize = (uint)sizeof(KtxAstcParams); + } + + /// + /// Creates a KtxAstcParams with StructSize correctly initialised. Preferred over + /// default(KtxAstcParams) or array/field initialization, which leave StructSize at 0. + /// + public static KtxAstcParams Create() => new(); +} diff --git a/Brutal.Ktx/Abstractions/KtxBasisParamsPartial.cs b/Brutal.Ktx/Abstractions/KtxBasisParamsPartial.cs new file mode 100644 index 0000000..88f1b40 --- /dev/null +++ b/Brutal.Ktx/Abstractions/KtxBasisParamsPartial.cs @@ -0,0 +1,25 @@ +namespace Brutal.KtxApi; + +public partial struct KtxBasisParams +{ + /// + /// Initialises the StructSize field to the correct value. + /// + /// + /// This constructor only runs when you call new KtxBasisParams() explicitly - it is + /// bypassed by default(KtxBasisParams), array elements (new KtxBasisParams[n]), + /// and struct fields in other types, all of which leave StructSize at 0. Prefer + /// when you're not immediately assigning every field via an object + /// initializer. + /// + public unsafe KtxBasisParams() + { + StructSize = (uint)sizeof(KtxBasisParams); + } + + /// + /// Creates a KtxBasisParams with StructSize correctly initialised. Preferred over + /// default(KtxBasisParams) or array/field initialization, which leave StructSize at 0. + /// + public static KtxBasisParams Create() => new(); +} diff --git a/Brutal.Ktx/Abstractions/KtxNativeBuffer.cs b/Brutal.Ktx/Abstractions/KtxNativeBuffer.cs new file mode 100644 index 0000000..63df167 --- /dev/null +++ b/Brutal.Ktx/Abstractions/KtxNativeBuffer.cs @@ -0,0 +1,40 @@ +namespace Brutal.KtxApi; + +/// +/// Owns a native buffer returned by WriteToMemory/WriteKtx2ToMemory. The buffer is allocated with +/// malloc() inside the native KTX library, so it must be freed with the matching native free() - +/// Dispose() does this for you. Do not free the underlying pointer with any other allocator (e.g. +/// Brutal.Memory.Mem.Free), as that frees memory with a different allocator than the one that +/// allocated it, corrupting the heap. +/// +public unsafe struct KtxNativeBuffer : IDisposable +{ + private byte* _pointer; + + /// The size of the buffer in bytes. + public ulong Length { get; } + + /// Raw pointer to the native buffer. + public byte* Pointer => _pointer; + + /// + /// A read-only view of the buffer. Throws if Length exceeds int.MaxValue, since Span<T> + /// cannot address more than 2GiB - use Pointer and Length directly for buffers that large. + /// + public ReadOnlySpan Span => new(_pointer, checked((int)Length)); + + internal KtxNativeBuffer(byte* pointer, ulong length) + { + _pointer = pointer; + Length = length; + } + + public void Dispose() + { + if (_pointer is null) + return; + + KtxNativeMemory.Free(_pointer); + _pointer = null; + } +} diff --git a/Brutal.Ktx/Abstractions/KtxNativeMemory.cs b/Brutal.Ktx/Abstractions/KtxNativeMemory.cs new file mode 100644 index 0000000..5a3f0da --- /dev/null +++ b/Brutal.Ktx/Abstractions/KtxNativeMemory.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi; + +/// +/// Binds to the native free() used by the KTX library itself, for releasing buffers it allocated +/// with malloc() (e.g. via WriteToMemory/WriteKtx2ToMemory). See KtxNativeBuffer. +/// +internal static unsafe partial class KtxNativeMemory +{ + [LibraryImport("Ktx", EntryPoint = "ktx_FreeWriteToMemoryBuffer1")] + public static partial void Free(void* ptr); +} diff --git a/Brutal.Ktx/Abstractions/KtxTextureExtensions.cs b/Brutal.Ktx/Abstractions/KtxTextureExtensions.cs new file mode 100644 index 0000000..ad6dfad --- /dev/null +++ b/Brutal.Ktx/Abstractions/KtxTextureExtensions.cs @@ -0,0 +1,137 @@ +using System.Text; +using Brutal.Numerics; + +namespace Brutal.KtxApi.Abstractions; + +/// +/// Provides useful extensions to the KTX texture types. +/// +public static class KtxTextureExtensions +{ + #region File IO + + public static KtxErrorCode WriteToNamedFile(this KtxTexture2Handle textureHandle, string filePath) => + textureHandle.WriteToNamedFile(Encoding.UTF8.GetBytes(filePath + "\0")); + + public static KtxErrorCode WriteToNamedFile(this KtxTexture1Handle textureHandle, string filePath) => + textureHandle.WriteToNamedFile(Encoding.UTF8.GetBytes(filePath + "\0")); + + public static KtxErrorCode WriteToNamedFile(this KtxTextureHandle textureHandle, string filePath) => + textureHandle.WriteToNamedFile(Encoding.UTF8.GetBytes(filePath + "\0")); + + #endregion + + #region Data Access + /// + /// Returns a span covering the image data for a given level, layer and face. + /// + /// Handle to KTX texture of any version + /// The mip level to retrieve data for + /// The layer + /// The face if this is cubemap texture + /// + /// KtxErrorCode for the result the function + public static unsafe KtxErrorCode GetImageData( + this KtxTextureHandle textureHandle, + uint level, + uint layer, + uint faceSlice, + out Span data + ) + { + var result = textureHandle.GetImageOffset(level, layer, faceSlice, out var imageOffset); + if (result != KtxErrorCode.Success) + { + data = new Span(); + return result; + } + + data = new Span(textureHandle.GetData() + imageOffset, (int)textureHandle.GetImageSize(level)); + return KtxErrorCode.Success; + } + + /// + /// Returns a span of the image data for a given level, layer and face for a v2 texture. + /// + /// Handle to version 2 KTX texture + /// The mip level to retrieve data for + /// The layer + /// The face if this is cubemap texture + /// + /// KtxErrorCode for the result the function + public static KtxErrorCode GetImageData( + this KtxTexture2Handle textureHandle, + uint level, + uint layer, + uint faceSlice, + out Span data + ) + { + return ((KtxTextureHandle)textureHandle).GetImageData(level, layer, faceSlice, out data); + } + + #endregion + + /// + /// Returns a span of the image data for a given level, layer and face for a v1 texture. + /// + /// Handle to version 1 KTX texture + /// The mip level to retrieve data for + /// The layer + /// The face if this is cubemap texture + /// + /// KtxErrorCode for the result the function + public static KtxErrorCode GetImageData( + this KtxTexture1Handle textureHandle, + uint level, + uint layer, + uint faceSlice, + out Span data + ) + { + return ((KtxTextureHandle)textureHandle).GetImageData(level, layer, faceSlice, out data); + } + + public static unsafe int3 GetBlockExtent(this KtxTextureHandle textureHandle) + { + return new( + (int)textureHandle.Protected->FormatSize.BlockWidth, + (int)textureHandle.Protected->FormatSize.BlockHeight, + (int)textureHandle.Protected->FormatSize.BlockDepth + ); + } + + #region Texture Version Conversion + + /// + /// Converts a generic KtxTextureHandle to a KtxTexture2Handle if the underlying texture is a version 2 + /// texture. + /// + /// Handle to the version agnostic KTX texture + /// The KtxTexture2Handle of the texture + /// Thrown if the texture is not a version 2 texture + public static KtxTexture2Handle AsKtxTexture2Handle(this KtxTextureHandle handle) + { + if (handle.ClassId != ClassId.Texture2C) + throw new InvalidCastException($"Texture is not a v2 texture"); + + return new KtxTexture2Handle(handle.Impl); + } + + /// + /// Converts a generic KtxTextureHandle to a KtxTexture1Handle if the underlying texture is a version 1 + /// texture. + /// + /// Handle to the version agnostic KTX texture + /// The KtxTexture1Handle of the texture + /// Thrown if the texture is not a version 1 texture + public static KtxTexture1Handle AsKtxTexture1Handle(this KtxTextureHandle handle) + { + if (handle.ClassId != ClassId.Texture1C) + throw new InvalidCastException($"Texture is not a v1 texture"); + + return new KtxTexture1Handle(handle.Impl); + } + + #endregion +} diff --git a/Brutal.Ktx/Generated/ClassId.gen.cs b/Brutal.Ktx/Generated/ClassId.gen.cs new file mode 100644 index 0000000..0487846 --- /dev/null +++ b/Brutal.Ktx/Generated/ClassId.gen.cs @@ -0,0 +1,12 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum ClassId : int + { + Texture1C = 1, + Texture2C = 2, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/IterateCallbackDelegate.gen.cs b/Brutal.Ktx/Generated/IterateCallbackDelegate.gen.cs new file mode 100644 index 0000000..39b37ec --- /dev/null +++ b/Brutal.Ktx/Generated/IterateCallbackDelegate.gen.cs @@ -0,0 +1,18 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate KtxErrorCode IterateCallbackDelegate( + int miplevel, + int face, + int width, + int height, + int depth, + ulong faceLodSize, + IntPtr pixels, + IntPtr userdata + ); +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KhrDfModel.gen.cs b/Brutal.Ktx/Generated/KhrDfModel.gen.cs new file mode 100644 index 0000000..16746c1 --- /dev/null +++ b/Brutal.Ktx/Generated/KhrDfModel.gen.cs @@ -0,0 +1,152 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KhrDfModel : int + { + /// No interpretation of color channels defined + Unspecified = 0, + + /// Color primaries (red, green, blue) + alpha, depth and stencil + Rgbsda = 1, + + /// Color differences (Y', Cb, Cr) + alpha, depth and stencil + Yuvsda = 2, + + /// Color differences (Y', I, Q) + alpha, depth and stencil + Yiqsda = 3, + + /// Perceptual color (CIE L*a*b*) + alpha, depth and stencil + Labsda = 4, + + /// Subtractive colors (cyan, magenta, yellow, black) + alpha + Cmyka = 5, + + /// Non-color coordinate data (X, Y, Z, W) + Xyzw = 6, + + /// Hue, saturation, value, hue angle on color circle, plus alpha + HsvaAng = 7, + + /// Hue, saturation, lightness, hue angle on color circle, plus alpha + HslaAng = 8, + + /// Hue, saturation, value, hue on color hexagon, plus alpha + HsvaHex = 9, + + /// Hue, saturation, lightness, hue on color hexagon, plus alpha + HslaHex = 10, + + /// Lightweight approximate color difference (luma, orange, green) + Ycgcoa = 11, + + /// ITU BT.2020 constant luminance YcCbcCrc + Yccbccrc = 12, + + /// ITU BT.2100 constant intensity ICtCp + Ictcp = 13, + + /// CIE 1931 XYZ color coordinates (X, Y, Z) + Ciexyz = 14, + + /// CIE 1931 xyY color coordinates (X, Y, Y) + Ciexyy = 15, + + /// Compressed formats start at 128. + /// These compressed formats should generally have a single sample,sited at the 0,0 position of the texel block. Where multiplechannels are used to distinguish formats, these should be cosited. + /// Direct3D (and S3) compressed formats + /// Note that premultiplied status is recorded separately + /// DXT1 "channels" are RGB (0), Alpha (1) + /// DXT1/BC1 with one channel is opaque + /// DXT1/BC1 with a cosited alpha sample is transparent + Dxt1A = 128, + + /// Compressed formats start at 128. + /// These compressed formats should generally have a single sample,sited at the 0,0 position of the texel block. Where multiplechannels are used to distinguish formats, these should be cosited. + /// Direct3D (and S3) compressed formats + /// Note that premultiplied status is recorded separately + /// DXT1 "channels" are RGB (0), Alpha (1) + /// DXT1/BC1 with one channel is opaque + /// DXT1/BC1 with a cosited alpha sample is transparent + Bc1A = 128, + + /// DXT2/DXT3/BC2, with explicit 4-bit alpha + Dxt2 = 129, + + /// DXT2/DXT3/BC2, with explicit 4-bit alpha + Dxt3 = 129, + + /// DXT2/DXT3/BC2, with explicit 4-bit alpha + Bc2 = 129, + + /// DXT4/DXT5/BC3, with interpolated alpha + Dxt4 = 130, + + /// DXT4/DXT5/BC3, with interpolated alpha + Dxt5 = 130, + + /// DXT4/DXT5/BC3, with interpolated alpha + Bc3 = 130, + + /// ATI1n/DXT5A/BC4 - single channel interpolated 8-bit data + /// (The UNORM/SNORM variation is recorded in the channel data) + Ati1N = 131, + + /// ATI1n/DXT5A/BC4 - single channel interpolated 8-bit data + /// (The UNORM/SNORM variation is recorded in the channel data) + Dxt5A = 131, + + /// ATI1n/DXT5A/BC4 - single channel interpolated 8-bit data + /// (The UNORM/SNORM variation is recorded in the channel data) + Bc4 = 131, + + /// ATI2n_XY/DXN/BC5 - two channel interpolated 8-bit data + /// (The UNORM/SNORM variation is recorded in the channel data) + Ati2NXy = 132, + + /// ATI2n_XY/DXN/BC5 - two channel interpolated 8-bit data + /// (The UNORM/SNORM variation is recorded in the channel data) + Dxn = 132, + + /// ATI2n_XY/DXN/BC5 - two channel interpolated 8-bit data + /// (The UNORM/SNORM variation is recorded in the channel data) + Bc5 = 132, + + /// BC6H - DX11 format for 16-bit float channels + Bc6H = 133, + + /// BC7 - DX11 format + Bc7 = 134, + + /// Mobile compressed formats follow + /// A format of ETC1 indicates that the format shall be decodableby an ETC1-compliant decoder and not rely on ETC2 features + Etc1 = 160, + + /// A format of ETC2 is permitted to use ETC2 encodings on top ofthe baseline ETC1 specification + /// The ETC2 format has channels "red", "green", "RGB" and "alpha",which should be cosited samples + /// Punch-through alpha can be distinguished from full alpha bythe plane size in bytes required for the texel block + Etc2 = 161, + + /// Adaptive Scalable Texture Compression + /// ASTC HDR vs LDR is determined by the float flag in the channel + /// ASTC block size can be distinguished by texel block size + Astc = 162, + + /// ETC1S is a simplified subset of ETC1 + Etc1S = 163, + + /// PowerVR Texture Compression + Pvrtc = 164, + + /// PowerVR Texture Compression + Pvrtc2 = 165, + + /// PowerVR Texture Compression + Uastc = 166, + + /// Proprietary formats (ATITC, etc.) should follow + Max = 255, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KhrDfPrimaries.gen.cs b/Brutal.Ktx/Generated/KhrDfPrimaries.gen.cs new file mode 100644 index 0000000..4188797 --- /dev/null +++ b/Brutal.Ktx/Generated/KhrDfPrimaries.gen.cs @@ -0,0 +1,54 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KhrDfPrimaries : int + { + /// No color primaries defined + Unspecified = 0, + + /// Color primaries of ITU-R BT.709 and sRGB + Bt709 = 1, + + /// Synonym for KHR_DF_PRIMARIES_BT709 + Srgb = 1, + + /// Color primaries of ITU-R BT.601 (625-line EBU variant) + Bt601Ebu = 2, + + /// Color primaries of ITU-R BT.601 (525-line SMPTE C variant) + Bt601Smpte = 3, + + /// Color primaries of ITU-R BT.2020 + Bt2020 = 4, + + /// ITU-R BT.2100 uses the same primaries as BT.2020 + Bt2100 = 4, + + /// CIE theoretical color coordinate space + Ciexyz = 5, + + /// Academy Color Encoding System primaries + Aces = 6, + + /// Color primaries of ACEScc + Acescc = 7, + + /// Legacy NTSC 1953 primaries + Ntsc1953 = 8, + + /// Legacy PAL 525-line primaries + Pal525 = 9, + + /// Color primaries of Display P3 + Displayp3 = 10, + + /// Color primaries of Adobe RGB (1998) + Adobergb = 11, + + /// Color primaries of Adobe RGB (1998) + Max = 255, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KhrDfTransfer.gen.cs b/Brutal.Ktx/Generated/KhrDfTransfer.gen.cs new file mode 100644 index 0000000..87c6439 --- /dev/null +++ b/Brutal.Ktx/Generated/KhrDfTransfer.gen.cs @@ -0,0 +1,141 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KhrDfTransfer : int + { + /// No transfer function defined + Unspecified = 0, + + /// Linear transfer function (value proportional to intensity) + Linear = 1, + + /// Perceptually-linear transfer function of sRGB (~2.2); also used for scRGB + Srgb = 2, + + /// Perceptually-linear transfer function of sRGB (~2.2); also used for scRGB + SrgbEotf = 2, + + /// Perceptually-linear transfer function of sRGB (~2.2); also used for scRGB + Scrgb = 2, + + /// Perceptually-linear transfer function of sRGB (~2.2); also used for scRGB + ScrgbEotf = 2, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Itu = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + ItuOetf = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Bt601 = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Bt601Oetf = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Bt709 = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Bt709Oetf = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Bt2020 = 3, + + /// Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45) + Bt2020Oetf = 3, + + /// SMTPE170M (digital NTSC) defines an alias for the ITU transfer function (~1/.45) and a linear OOTF + Smtpe170M = 3, + + /// SMTPE170M (digital NTSC) defines an alias for the ITU transfer function (~1/.45) and a linear OOTF + Smtpe170MOetf = 3, + + /// SMTPE170M (digital NTSC) defines an alias for the ITU transfer function (~1/.45) and a linear OOTF + Smtpe170MEotf = 3, + + /// Perceptually-linear gamma function of original NTSC (simple 2.2 gamma) + Ntsc = 4, + + /// Perceptually-linear gamma function of original NTSC (simple 2.2 gamma) + NtscEotf = 4, + + /// Sony S-log used by Sony video cameras + Slog = 5, + + /// Sony S-log used by Sony video cameras + SlogOetf = 5, + + /// Sony S-log 2 used by Sony video cameras + Slog2 = 6, + + /// Sony S-log 2 used by Sony video cameras + Slog2Oetf = 6, + + /// ITU BT.1886 EOTF + Bt1886 = 7, + + /// ITU BT.1886 EOTF + Bt1886Eotf = 7, + + /// ITU BT.2100 HLG OETF (typical scene-referred content), linear light normalized 0..1 + HlgOetf = 8, + + /// ITU BT.2100 HLG EOTF (nominal HDR display of HLG content), linear light normalized 0..1 + HlgEotf = 9, + + /// ITU BT.2100 PQ EOTF (typical HDR display-referred PQ content) + PqEotf = 10, + + /// ITU BT.2100 PQ OETF (nominal scene described by PQ HDR content) + PqOetf = 11, + + /// DCI P3 transfer function + Dcip3 = 12, + + /// DCI P3 transfer function + Dcip3Eotf = 12, + + /// Legacy PAL OETF + PalOetf = 13, + + /// Legacy PAL 625-line EOTF + Pal625Eotf = 14, + + /// Legacy ST240 transfer function + St240 = 15, + + /// Legacy ST240 transfer function + St240Oetf = 15, + + /// Legacy ST240 transfer function + St240Eotf = 15, + + /// ACEScc transfer function + Acescc = 16, + + /// ACEScc transfer function + AcesccOetf = 16, + + /// ACEScct transfer function + Acescct = 17, + + /// ACEScct transfer function + AcescctOetf = 17, + + /// Adobe RGB (1998) transfer function + Adobergb = 18, + + /// Adobe RGB (1998) transfer function + AdobergbEotf = 18, + + /// Legacy ITU BT.2100 HLG OETF (typical scene-referred content), linear light normalized 0..12 + HlgUnnormalizedOetf = 19, + + /// Legacy ITU BT.2100 HLG OETF (typical scene-referred content), linear light normalized 0..12 + Max = 255, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxAstcParams.gen.cs b/Brutal.Ktx/Generated/KtxAstcParams.gen.cs new file mode 100644 index 0000000..f962aa0 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxAstcParams.gen.cs @@ -0,0 +1,38 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 4)] + public unsafe partial struct KtxAstcParams + { + [FieldOffset(0)] + public uint StructSize; + + [FieldOffset(4)] + public Bool8 Verbose; + + [FieldOffset(8)] + public uint ThreadCount; + + /// astcenc params + [FieldOffset(12)] + public uint BlockDimension; + + [FieldOffset(16)] + public uint Mode; + + [FieldOffset(20)] + public uint QualityLevel; + + [FieldOffset(24)] + public Bool8 NormalMap; + + [FieldOffset(25)] + public Bool8 Perceptual; + + [FieldOffset(26)] + public unsafe fixed byte InputSwizzle[4]; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxBasisParams.gen.cs b/Brutal.Ktx/Generated/KtxBasisParams.gen.cs new file mode 100644 index 0000000..f11fd18 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxBasisParams.gen.cs @@ -0,0 +1,87 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 4)] + public unsafe partial struct KtxBasisParams + { + [FieldOffset(0)] + public uint StructSize; + + [FieldOffset(4)] + public Bool8 Uastc; + + [FieldOffset(5)] + public Bool8 Verbose; + + [FieldOffset(6)] + public Bool8 NoSse; + + [FieldOffset(8)] + public uint ThreadCount; + + /// ETC1S params + [FieldOffset(12)] + public uint CompressionLevel; + + [FieldOffset(16)] + public uint QualityLevel; + + [FieldOffset(20)] + public uint MaxEndpoints; + + [FieldOffset(24)] + public float EndpointRdoThreshold; + + [FieldOffset(28)] + public uint MaxSelectors; + + [FieldOffset(32)] + public float SelectorRdoThreshold; + + [FieldOffset(36)] + public unsafe fixed byte InputSwizzle[4]; + + [FieldOffset(40)] + public Bool8 NormalMap; + + [FieldOffset(41)] + public Bool8 SeparateRgtORgbA; + + [FieldOffset(42)] + public Bool8 PreSwizzle; + + [FieldOffset(43)] + public Bool8 NoEndpointRdo; + + [FieldOffset(44)] + public Bool8 NoSelectorRdo; + + /// UASTC params + [FieldOffset(48)] + public KtxPackUastcFlagBits UastcFlags; + + [FieldOffset(52)] + public Bool8 UastcRdo; + + [FieldOffset(56)] + public float UastcRdoQualityScalar; + + [FieldOffset(60)] + public uint UastcRdoDictSize; + + [FieldOffset(64)] + public float UastcRdoMaxSmoothBlockErrorScale; + + [FieldOffset(68)] + public float UastcRdoMaxSmoothBlockStdDev; + + [FieldOffset(72)] + public Bool8 UastcRdoDontFavorSimplerModes; + + [FieldOffset(73)] + public Bool8 UastcRdoNoMultithreading; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxErrorCode.gen.cs b/Brutal.Ktx/Generated/KtxErrorCode.gen.cs new file mode 100644 index 0000000..b5ac1e9 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxErrorCode.gen.cs @@ -0,0 +1,75 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KtxErrorCode : int + { + /// Operation was successful. + Success = 0, + + /// The data in the file is inconsistent with the spec. + FileDataError, + + /// The file is a pipe or named pipe. + FileIspipe, + + /// The target file could not be opened. + FileOpenFailed, + + /// The operation would exceed the max file size. + FileOverflow, + + /// An error occurred while reading from the file. + FileReadError, + + /// An error occurred while seeking in the file. + FileSeekError, + + /// File does not have enough data to satisfy request. + FileUnexpectedEof, + + /// An error occurred while writing to the file. + FileWriteError, + + /// GL operations resulted in an error. + GlError, + + /// The operation is not allowed in the current state. + InvalidOperation, + + /// A parameter value was not valid. + InvalidValue, + + /// Requested metadata key or required dynamically loaded GPU function was not found. + NotFound, + + /// Not enough memory to complete the operation. + OutOfMemory, + + /// Transcoding of block compressed texture failed. + TranscodeFailed, + + /// The file not a KTX file + UnknownFileFormat, + + /// The KTX file specifies an unsupported texture type. + UnsupportedTextureType, + + /// Feature not included in in-use library or not yet implemented. + UnsupportedFeature, + + /// Library dependency (OpenGL or Vulkan) not linked into application. + LibraryNotLinked, + + /// Decompressed byte count does not match expected byte size + DecompressLengthError, + + /// Checksum mismatch when decompressing + DecompressChecksumError, + + /// For safety checks. + ErrorMaxEnum = 20, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxFormatSize.gen.cs b/Brutal.Ktx/Generated/KtxFormatSize.gen.cs new file mode 100644 index 0000000..1ef6bf9 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxFormatSize.gen.cs @@ -0,0 +1,39 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 4)] + public unsafe partial struct KtxFormatSize + { + [FieldOffset(0)] + public readonly uint Flags; + + /// For KTX1. + [FieldOffset(4)] + public readonly uint PaletteSizeInBits; + + [FieldOffset(8)] + public readonly uint BlockSizeInBits; + + /// in texels + [FieldOffset(12)] + public readonly uint BlockWidth; + + /// in texels + [FieldOffset(16)] + public readonly uint BlockHeight; + + /// in texels + [FieldOffset(20)] + public readonly uint BlockDepth; + + /// Minimum required number of blocks + [FieldOffset(24)] + public readonly uint MinBlocksX; + + [FieldOffset(28)] + public readonly uint MinBlocksY; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxPackAstcBlockDimension.gen.cs b/Brutal.Ktx/Generated/KtxPackAstcBlockDimension.gen.cs new file mode 100644 index 0000000..a2bea3f --- /dev/null +++ b/Brutal.Ktx/Generated/KtxPackAstcBlockDimension.gen.cs @@ -0,0 +1,82 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KtxPackAstcBlockDimension : int + { + /// : 8.00 bpp + BlockDimension4X4, + + /// : 6.40 bpp + BlockDimension5X4, + + /// : 5.12 bpp + BlockDimension5X5, + + /// : 4.27 bpp + BlockDimension6X5, + + /// : 3.56 bpp + BlockDimension6X6, + + /// : 3.20 bpp + BlockDimension8X5, + + /// : 2.67 bpp + BlockDimension8X6, + + /// : 2.56 bpp + BlockDimension10X5, + + /// : 2.13 bpp + BlockDimension10X6, + + /// : 2.00 bpp + BlockDimension8X8, + + /// : 1.60 bpp + BlockDimension10X8, + + /// : 1.28 bpp + BlockDimension10X10, + + /// : 1.07 bpp + BlockDimension12X10, + + /// : 0.89 bpp + BlockDimension12X12, + + /// : 4.74 bpp + BlockDimension3X3X3, + + /// : 3.56 bpp + BlockDimension4X3X3, + + /// : 2.67 bpp + BlockDimension4X4X3, + + /// : 2.00 bpp + BlockDimension4X4X4, + + /// : 1.60 bpp + BlockDimension5X4X4, + + /// : 1.28 bpp + BlockDimension5X5X4, + + /// : 1.02 bpp + BlockDimension5X5X5, + + /// : 0.85 bpp + BlockDimension6X5X5, + + /// : 0.71 bpp + BlockDimension6X6X5, + + /// : 0.59 bpp + BlockDimension6X6X6, + BlockDimensionMax = 23, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxPackAstcQualityLevels.gen.cs b/Brutal.Ktx/Generated/KtxPackAstcQualityLevels.gen.cs new file mode 100644 index 0000000..b102304 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxPackAstcQualityLevels.gen.cs @@ -0,0 +1,16 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KtxPackAstcQualityLevels : int + { + Fastest = 0, + Fast = 10, + Medium = 60, + Thorough = 98, + Exhaustive = 100, + Max = 100, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxPackUastcFlagBits.gen.cs b/Brutal.Ktx/Generated/KtxPackUastcFlagBits.gen.cs new file mode 100644 index 0000000..5f5702a --- /dev/null +++ b/Brutal.Ktx/Generated/KtxPackUastcFlagBits.gen.cs @@ -0,0 +1,23 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [System.Flags] + public enum KtxPackUastcFlagBits : int + { + LevelFastest = 0, + LevelFaster = 1, + LevelDefault = 2, + LevelSlower = 3, + LevelVeryslow = 4, + MaxLevel = 4, + LevelMask = 15, + FavorUastcError = 8, + FavorBc7Error = 16, + Etc1FasterHints = 64, + Etc1FastestHints = 128, + Etc1DisableFlipAndIndividual = 256, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxSupercmpScheme.gen.cs b/Brutal.Ktx/Generated/KtxSupercmpScheme.gen.cs new file mode 100644 index 0000000..16c792a --- /dev/null +++ b/Brutal.Ktx/Generated/KtxSupercmpScheme.gen.cs @@ -0,0 +1,26 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KtxSupercmpScheme : int + { + /// No supercompression. + None = 0, + + /// Basis LZ supercompression. + BasisLz = 1, + + /// ZStd supercompression. + Zstd = 2, + + /// ZLIB supercompression. + Zlib = 3, + BeginRange = 0, + EndRange = 3, + BeginVendorRange = 65536, + EndVendorRange = 131071, + BeginReserved = 131072, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture.gen.cs b/Brutal.Ktx/Generated/KtxTexture.gen.cs new file mode 100644 index 0000000..67eb1b1 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture.gen.cs @@ -0,0 +1,171 @@ +#pragma warning disable 1591 +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Pointers.Extensions; + +namespace Brutal.KtxApi +{ + public static unsafe partial class KtxTexture + { + [LibraryImport("Ktx", EntryPoint = "ktxTexture_CreateFromNamedFile1")] + public static unsafe partial KtxErrorCode CreateFromNamedFile( + ReadOnlySpan filename, + KtxTextureCreateFlagBits createFlags, + out KtxTextureHandle newTex + ); + + public static unsafe KtxErrorCode CreateFromMemory( + ReadOnlySpan bytes, + KtxTextureCreateFlagBits createFlags, + out KtxTextureHandle newTex + ) + { + return CreateFromMemoryRealInterop( + ref Unsafe.AsRef(bytes.AsPointer()), + bytes.AsPointer() is not null ? (ulong)bytes.Length : 0, + createFlags, + out newTex + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_CreateFromMemory1")] + private static unsafe partial KtxErrorCode CreateFromMemoryRealInterop( + ref readonly byte bytes, + ulong size, + KtxTextureCreateFlagBits createFlags, + out KtxTextureHandle newTex + ); + + /// Returns a pointer to the image data of a ktxTexture object. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetData1")] + public static unsafe partial byte* GetData(this KtxTextureHandle thisParam); + + /// Returns the pitch of a row of an image at the specified level.Similar to the rowPitch in a VkSubResourceLayout. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetRowPitch1")] + public static unsafe partial uint GetRowPitch(this KtxTextureHandle thisParam, uint level); + + /// Return the element size of the texture's images. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetElementSize1")] + public static unsafe partial uint GetElementSize(this KtxTextureHandle thisParam); + + /// Returns the size of all the image data of a ktxTexture object in bytes. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetDataSize1")] + public static unsafe partial ulong GetDataSize(this KtxTextureHandle thisParam); + + /// Iterate over the levels or faces in a ktxTexture object. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLevelFaces1")] + public static unsafe partial KtxErrorCode IterateLevelFaces( + this KtxTextureHandle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetVkFormat1")] + public static unsafe partial VkFormat GetVkFormat(this KtxTextureHandle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_Destroy1")] + public static unsafe partial void Destroy(this KtxTextureHandle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetImageOffset1")] + public static unsafe partial KtxErrorCode GetImageOffset( + this KtxTextureHandle thisParam, + uint level, + uint layer, + uint faceSlice, + out ulong pOffset + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetDataSizeUncompressed1")] + public static unsafe partial ulong GetDataSizeUncompressed(this KtxTextureHandle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetImageSize1")] + public static unsafe partial ulong GetImageSize(this KtxTextureHandle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetLevelSize1")] + public static unsafe partial ulong GetLevelSize(this KtxTextureHandle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLevels1")] + public static unsafe partial KtxErrorCode IterateLevels( + this KtxTextureHandle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLoadLevelFaces1")] + public static unsafe partial KtxErrorCode IterateLoadLevelFaces( + this KtxTextureHandle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_NeedsTranscoding1")] + public static unsafe partial Bool8 NeedsTranscoding(this KtxTextureHandle thisParam); + + public static unsafe KtxErrorCode LoadImageData(this KtxTextureHandle thisParam, Span pBuffer) + { + return LoadImageDataRealInterop( + thisParam, + ref *pBuffer.AsPointer(), + pBuffer.AsPointer() is not null ? (ulong)pBuffer.Length : 0 + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_LoadImageData1")] + private static unsafe partial KtxErrorCode LoadImageDataRealInterop( + this KtxTextureHandle thisParam, + ref byte pBuffer, + ulong bufSize + ); + + public static unsafe KtxErrorCode SetImageFromMemory( + this KtxTextureHandle thisParam, + uint level, + uint layer, + uint faceSlice, + ReadOnlySpan src + ) + { + return SetImageFromMemoryRealInterop( + thisParam, + level, + layer, + faceSlice, + ref *src.AsPointer(), + (ulong)src.Length + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_SetImageFromMemory1")] + private static unsafe partial KtxErrorCode SetImageFromMemoryRealInterop( + this KtxTextureHandle thisParam, + uint level, + uint layer, + uint faceSlice, + ref readonly byte src, + ulong srcSize + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_WriteToNamedFile1")] + public static unsafe partial KtxErrorCode WriteToNamedFile( + this KtxTextureHandle thisParam, + ReadOnlySpan dstname + ); + + public static unsafe KtxErrorCode WriteToMemory(this KtxTextureHandle thisParam, out KtxNativeBuffer bytes) + { + byte* mem; + ulong size; + var returnValue = WriteToMemoryRealInterop(thisParam, out mem, out size); + bytes = new KtxNativeBuffer(mem, size); + return returnValue; + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_WriteToMemory1")] + private static unsafe partial KtxErrorCode WriteToMemoryRealInterop( + this KtxTextureHandle thisParam, + out byte* bytes, + out ulong size + ); + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture1.gen.cs b/Brutal.Ktx/Generated/KtxTexture1.gen.cs new file mode 100644 index 0000000..e8a730f --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture1.gen.cs @@ -0,0 +1,201 @@ +#pragma warning disable 1591 +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Pointers.Extensions; + +namespace Brutal.KtxApi +{ + public static unsafe partial class KtxTexture1 + { + [LibraryImport("Ktx", EntryPoint = "ktxTexture1_CreateFromNamedFile1")] + public static unsafe partial KtxErrorCode CreateFromNamedFile( + ReadOnlySpan filename, + KtxTextureCreateFlagBits createFlags, + out KtxTexture1Handle newTex + ); + + public static unsafe KtxErrorCode CreateFromMemory( + ReadOnlySpan bytes, + KtxTextureCreateFlagBits createFlags, + out KtxTexture1Handle newTex + ) + { + return CreateFromMemoryRealInterop( + ref Unsafe.AsRef(bytes.AsPointer()), + bytes.AsPointer() is not null ? (ulong)bytes.Length : 0, + createFlags, + out newTex + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture1_CreateFromMemory1")] + private static unsafe partial KtxErrorCode CreateFromMemoryRealInterop( + ref readonly byte bytes, + ulong size, + KtxTextureCreateFlagBits createFlags, + out KtxTexture1Handle newTex + ); + + /// Create a new ktxTexture1. + [LibraryImport("Ktx", EntryPoint = "ktxTexture1_Create1")] + public static unsafe partial KtxErrorCode Create( + ref readonly KtxTextureCreateInfo createInfo, + KtxTextureCreateStorageEnum storageAllocation, + out KtxTexture1Handle newTex + ); + + /// Returns a pointer to the image data of a ktxTexture object. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetData1")] + public static unsafe partial byte* GetData(this KtxTexture1Handle thisParam); + + /// Returns the pitch of a row of an image at the specified level.Similar to the rowPitch in a VkSubResourceLayout. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetRowPitch1")] + public static unsafe partial uint GetRowPitch(this KtxTexture1Handle thisParam, uint level); + + /// Return the element size of the texture's images. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetElementSize1")] + public static unsafe partial uint GetElementSize(this KtxTexture1Handle thisParam); + + /// Returns the size of all the image data of a ktxTexture object in bytes. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetDataSize1")] + public static unsafe partial ulong GetDataSize(this KtxTexture1Handle thisParam); + + /// Iterate over the levels or faces in a ktxTexture object. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLevelFaces1")] + public static unsafe partial KtxErrorCode IterateLevelFaces( + this KtxTexture1Handle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture1_GetVkFormat1")] + public static unsafe partial VkFormat GetVkFormat(this KtxTexture1Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_Destroy1")] + public static unsafe partial void Destroy(this KtxTexture1Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetImageOffset1")] + public static unsafe partial KtxErrorCode GetImageOffset( + this KtxTexture1Handle thisParam, + uint level, + uint layer, + uint faceSlice, + out ulong pOffset + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetDataSizeUncompressed1")] + public static unsafe partial ulong GetDataSizeUncompressed(this KtxTexture1Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetImageSize1")] + public static unsafe partial ulong GetImageSize(this KtxTexture1Handle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetLevelSize1")] + public static unsafe partial ulong GetLevelSize(this KtxTexture1Handle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLevels1")] + public static unsafe partial KtxErrorCode IterateLevels( + this KtxTexture1Handle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLoadLevelFaces1")] + public static unsafe partial KtxErrorCode IterateLoadLevelFaces( + this KtxTexture1Handle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_NeedsTranscoding1")] + public static unsafe partial Bool8 NeedsTranscoding(this KtxTexture1Handle thisParam); + + public static unsafe KtxErrorCode LoadImageData(this KtxTexture1Handle thisParam, Span pBuffer) + { + return LoadImageDataRealInterop( + thisParam, + ref *pBuffer.AsPointer(), + pBuffer.AsPointer() is not null ? (ulong)pBuffer.Length : 0 + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_LoadImageData1")] + private static unsafe partial KtxErrorCode LoadImageDataRealInterop( + this KtxTexture1Handle thisParam, + ref byte pBuffer, + ulong bufSize + ); + + public static unsafe KtxErrorCode SetImageFromMemory( + this KtxTexture1Handle thisParam, + uint level, + uint layer, + uint faceSlice, + ReadOnlySpan src + ) + { + return SetImageFromMemoryRealInterop( + thisParam, + level, + layer, + faceSlice, + ref *src.AsPointer(), + (ulong)src.Length + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_SetImageFromMemory1")] + private static unsafe partial KtxErrorCode SetImageFromMemoryRealInterop( + this KtxTexture1Handle thisParam, + uint level, + uint layer, + uint faceSlice, + ref readonly byte src, + ulong srcSize + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_WriteToNamedFile1")] + public static unsafe partial KtxErrorCode WriteToNamedFile( + this KtxTexture1Handle thisParam, + ReadOnlySpan dstname + ); + + public static unsafe KtxErrorCode WriteToMemory(this KtxTexture1Handle thisParam, out KtxNativeBuffer bytes) + { + byte* mem; + ulong size; + var returnValue = WriteToMemoryRealInterop(thisParam, out mem, out size); + bytes = new KtxNativeBuffer(mem, size); + return returnValue; + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_WriteToMemory1")] + private static unsafe partial KtxErrorCode WriteToMemoryRealInterop( + this KtxTexture1Handle thisParam, + out byte* bytes, + out ulong size + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture1_WriteKTX2ToNamedFile1")] + public static unsafe partial KtxErrorCode WriteKtx2ToNamedFile( + this KtxTexture1Handle thisParam, + ReadOnlySpan dstname + ); + + public static unsafe KtxErrorCode WriteKtx2ToMemory(this KtxTexture1Handle thisParam, out KtxNativeBuffer bytes) + { + byte* mem; + ulong size; + var returnValue = WriteKtx2ToMemoryRealInterop(thisParam, out mem, out size); + bytes = new KtxNativeBuffer(mem, size); + return returnValue; + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture1_WriteKTX2ToMemory1")] + private static unsafe partial KtxErrorCode WriteKtx2ToMemoryRealInterop( + this KtxTexture1Handle thisParam, + out byte* bytes, + out ulong size + ); + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture1Handle.gen.cs b/Brutal.Ktx/Generated/KtxTexture1Handle.gen.cs new file mode 100644 index 0000000..cce0bb3 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture1Handle.gen.cs @@ -0,0 +1,55 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public partial struct KtxTexture1Handle : INullable, IDisposable + { + public KtxTexture1Handle(nint impl) + { + _impl = impl; + } + + /// Returns whether the handle has been initialised or not. + public bool IsNull() => _impl is 0; + + internal nint Impl => _impl; + + public void Dispose() => Release(); + + public static implicit operator KtxTextureHandle(KtxTexture1Handle handle) => new KtxTextureHandle(handle.Impl); + + public unsafe ref KtxTexture1Native Ptr => ref *(KtxTexture1Native*)_impl; + public ClassId ClassId => Ptr.ClassId; + public unsafe KtxTextureProtected* Protected => Ptr.Protected; + public Bool8 IsArray => Ptr.IsArray; + public Bool8 IsCubemap => Ptr.IsCubemap; + public Bool8 IsCompressed => Ptr.IsCompressed; + public Bool8 GenerateMipmaps => Ptr.GenerateMipmaps; + public uint BaseWidth => Ptr.BaseWidth; + public uint BaseHeight => Ptr.BaseHeight; + public uint BaseDepth => Ptr.BaseDepth; + public uint NumDimensions => Ptr.NumDimensions; + public uint NumLevels => Ptr.NumLevels; + public uint NumLayers => Ptr.NumLayers; + public uint NumFaces => Ptr.NumFaces; + public Orientation Orientation => Ptr.Orientation; + public ulong DataSize => Ptr.DataSize; + public unsafe byte* PData => Ptr.PData; + public uint GlFormat => Ptr.GlFormat; + public uint GlInternalformat => Ptr.GlInternalformat; + public uint GlBaseInternalformat => Ptr.GlBaseInternalformat; + public uint GlType => Ptr.GlType; + + private void Release() + { + var impl = Interlocked.Exchange(ref _impl, 0); + if (impl == 0) + return; + KtxTexture1.Destroy(new(impl)); + } + + private nint _impl; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture1Native.gen.cs b/Brutal.Ktx/Generated/KtxTexture1Native.gen.cs new file mode 100644 index 0000000..f15da1d --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture1Native.gen.cs @@ -0,0 +1,74 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 8)] + public unsafe partial struct KtxTexture1Native + { + [FieldOffset(0)] + public readonly ClassId ClassId; + + [FieldOffset(24)] + public readonly KtxTextureProtected* Protected; + + [FieldOffset(32)] + public readonly Bool8 IsArray; + + [FieldOffset(33)] + public readonly Bool8 IsCubemap; + + [FieldOffset(34)] + public readonly Bool8 IsCompressed; + + [FieldOffset(35)] + public readonly Bool8 GenerateMipmaps; + + [FieldOffset(36)] + public readonly uint BaseWidth; + + [FieldOffset(40)] + public readonly uint BaseHeight; + + [FieldOffset(44)] + public readonly uint BaseDepth; + + [FieldOffset(48)] + public readonly uint NumDimensions; + + [FieldOffset(52)] + public readonly uint NumLevels; + + [FieldOffset(56)] + public readonly uint NumLayers; + + [FieldOffset(60)] + public readonly uint NumFaces; + + [FieldOffset(64)] + public readonly Orientation Orientation; + + [FieldOffset(104)] + public readonly ulong DataSize; + + [FieldOffset(112)] + public readonly byte* PData; + + /// Format of the texture data, e.g., GL_RGB. + [FieldOffset(120)] + public readonly uint GlFormat; + + /// Internal format of the texture data,e.g., GL_RGB8. + [FieldOffset(124)] + public readonly uint GlInternalformat; + + /// Base format of the texture data,e.g., GL_RGB. + [FieldOffset(128)] + public readonly uint GlBaseInternalformat; + + /// Type of the texture data, e.g, GL_UNSIGNED_BYTE. + [FieldOffset(132)] + public readonly uint GlType; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture2.gen.cs b/Brutal.Ktx/Generated/KtxTexture2.gen.cs new file mode 100644 index 0000000..b1265a5 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture2.gen.cs @@ -0,0 +1,283 @@ +#pragma warning disable 1591 +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Pointers.Extensions; + +namespace Brutal.KtxApi +{ + public static unsafe partial class KtxTexture2 + { + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CreateFromNamedFile1")] + public static unsafe partial KtxErrorCode CreateFromNamedFile( + ReadOnlySpan filename, + KtxTextureCreateFlagBits createFlags, + out KtxTexture2Handle newTex + ); + + public static unsafe KtxErrorCode CreateFromMemory( + ReadOnlySpan bytes, + KtxTextureCreateFlagBits createFlags, + out KtxTexture2Handle newTex + ) + { + return CreateFromMemoryRealInterop( + ref Unsafe.AsRef(bytes.AsPointer()), + bytes.AsPointer() is not null ? (ulong)bytes.Length : 0, + createFlags, + out newTex + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CreateFromMemory1")] + private static unsafe partial KtxErrorCode CreateFromMemoryRealInterop( + ref readonly byte bytes, + ulong size, + KtxTextureCreateFlagBits createFlags, + out KtxTexture2Handle newTex + ); + + /// Create a new ktxTexture2. + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_Create1")] + public static unsafe partial KtxErrorCode Create( + ref readonly KtxTextureCreateInfo createInfo, + KtxTextureCreateStorageEnum storageAllocation, + out KtxTexture2Handle newTex + ); + + /// Returns a pointer to the image data of a ktxTexture object. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetData1")] + public static unsafe partial byte* GetData(this KtxTexture2Handle thisParam); + + /// Returns the pitch of a row of an image at the specified level.Similar to the rowPitch in a VkSubResourceLayout. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetRowPitch1")] + public static unsafe partial uint GetRowPitch(this KtxTexture2Handle thisParam, uint level); + + /// Return the element size of the texture's images. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetElementSize1")] + public static unsafe partial uint GetElementSize(this KtxTexture2Handle thisParam); + + /// Returns the size of all the image data of a ktxTexture object in bytes. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetDataSize1")] + public static unsafe partial ulong GetDataSize(this KtxTexture2Handle thisParam); + + /// Iterate over the levels or faces in a ktxTexture object. + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLevelFaces1")] + public static unsafe partial KtxErrorCode IterateLevelFaces( + this KtxTexture2Handle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetVkFormat1")] + public static unsafe partial VkFormat GetVkFormat(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_Destroy1")] + public static unsafe partial void Destroy(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetImageOffset1")] + public static unsafe partial KtxErrorCode GetImageOffset( + this KtxTexture2Handle thisParam, + uint level, + uint layer, + uint faceSlice, + out ulong pOffset + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetDataSizeUncompressed1")] + public static unsafe partial ulong GetDataSizeUncompressed(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetImageSize1")] + public static unsafe partial ulong GetImageSize(this KtxTexture2Handle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_GetLevelSize1")] + public static unsafe partial ulong GetLevelSize(this KtxTexture2Handle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLevels1")] + public static unsafe partial KtxErrorCode IterateLevels( + this KtxTexture2Handle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_IterateLoadLevelFaces1")] + public static unsafe partial KtxErrorCode IterateLoadLevelFaces( + this KtxTexture2Handle thisParam, + IterateCallbackDelegate iterCb, + IntPtr userdata + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_NeedsTranscoding1")] + public static unsafe partial Bool8 NeedsTranscoding(this KtxTexture2Handle thisParam); + + public static unsafe KtxErrorCode LoadImageData(this KtxTexture2Handle thisParam, Span pBuffer) + { + return LoadImageDataRealInterop( + thisParam, + ref *pBuffer.AsPointer(), + pBuffer.AsPointer() is not null ? (ulong)pBuffer.Length : 0 + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_LoadImageData1")] + private static unsafe partial KtxErrorCode LoadImageDataRealInterop( + this KtxTexture2Handle thisParam, + ref byte pBuffer, + ulong bufSize + ); + + public static unsafe KtxErrorCode SetImageFromMemory( + this KtxTexture2Handle thisParam, + uint level, + uint layer, + uint faceSlice, + ReadOnlySpan src + ) + { + return SetImageFromMemoryRealInterop( + thisParam, + level, + layer, + faceSlice, + ref *src.AsPointer(), + (ulong)src.Length + ); + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_SetImageFromMemory1")] + private static unsafe partial KtxErrorCode SetImageFromMemoryRealInterop( + this KtxTexture2Handle thisParam, + uint level, + uint layer, + uint faceSlice, + ref readonly byte src, + ulong srcSize + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_WriteToNamedFile1")] + public static unsafe partial KtxErrorCode WriteToNamedFile( + this KtxTexture2Handle thisParam, + ReadOnlySpan dstname + ); + + public static unsafe KtxErrorCode WriteToMemory(this KtxTexture2Handle thisParam, out KtxNativeBuffer bytes) + { + byte* mem; + ulong size; + var returnValue = WriteToMemoryRealInterop(thisParam, out mem, out size); + bytes = new KtxNativeBuffer(mem, size); + return returnValue; + } + + [LibraryImport("Ktx", EntryPoint = "ktxTexture_WriteToMemory1")] + private static unsafe partial KtxErrorCode WriteToMemoryRealInterop( + this KtxTexture2Handle thisParam, + out byte* bytes, + out ulong size + ); + + /// Create a new ktxTexture2 as a copy of an existing texture. + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CreateCopy1")] + public static unsafe partial KtxErrorCode CreateCopy(this KtxTexture2Handle orig, out KtxTexture2Handle newTex); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CompressBasis1")] + public static unsafe partial KtxErrorCode CompressBasis(this KtxTexture2Handle thisParam, uint quality); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CompressBasisEx1")] + public static unsafe partial KtxErrorCode CompressBasisEx( + this KtxTexture2Handle thisParam, + ref readonly KtxBasisParams basisParams + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_DeflateZstd1")] + public static unsafe partial KtxErrorCode DeflateZstd(this KtxTexture2Handle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_DeflateZLIB1")] + public static unsafe partial KtxErrorCode DeflateZlib(this KtxTexture2Handle thisParam, uint level); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetComponentInfo1")] + public static unsafe partial void GetComponentInfo( + this KtxTexture2Handle thisParam, + out uint numComponents, + out uint componentByteLength + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetNumComponents1")] + public static unsafe partial uint GetNumComponents(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetTransferFunction_e1")] + public static unsafe partial KhrDfTransfer GetTransferFunctionE(this KtxTexture2Handle thisParam); + + /// For backward compatibility. + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetOETF_e1")] + public static unsafe partial KhrDfTransfer GetOetfE(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetOETF1")] + public static unsafe partial uint GetOetf(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetColorModel_e1")] + public static unsafe partial KhrDfModel GetColorModelE(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetPremultipliedAlpha1")] + public static unsafe partial Bool8 GetPremultipliedAlpha(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_GetPrimaries_e1")] + public static unsafe partial KhrDfPrimaries GetPrimariesE(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_SetTransferFunction1")] + public static unsafe partial KtxErrorCode SetTransferFunction( + this KtxTexture2Handle thisParam, + KhrDfTransfer tf + ); + + /// For backward compatibility. + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_SetOETF1")] + public static unsafe partial KtxErrorCode SetOetf(this KtxTexture2Handle thisParam, KhrDfTransfer oetf); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_SetPrimaries1")] + public static unsafe partial KtxErrorCode SetPrimaries( + this KtxTexture2Handle thisParam, + KhrDfPrimaries primaries + ); + + /// For rare testing scenarios. Use ktxTexture2_LoadImageData. + public static unsafe KtxErrorCode LoadDeflatedImageData(this KtxTexture2Handle thisParam, Span pBuffer) + { + return LoadDeflatedImageDataRealInterop( + thisParam, + ref *pBuffer.AsPointer(), + pBuffer.AsPointer() is not null ? (ulong)pBuffer.Length : 0 + ); + } + + /// For rare testing scenarios. Use ktxTexture2_LoadImageData. + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_LoadDeflatedImageData1")] + private static unsafe partial KtxErrorCode LoadDeflatedImageDataRealInterop( + this KtxTexture2Handle thisParam, + ref byte pBuffer, + ulong bufSize + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_TranscodeBasis1")] + public static unsafe partial KtxErrorCode TranscodeBasis( + this KtxTexture2Handle thisParam, + KtxTranscodeFmt fmt, + KtxTranscodeFlagBits transcodeFlags + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CompressAstcEx1")] + public static unsafe partial KtxErrorCode CompressAstcEx( + this KtxTexture2Handle thisParam, + ref readonly KtxAstcParams basisParams + ); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_DecodeAstc1")] + public static unsafe partial KtxErrorCode DecodeAstc(this KtxTexture2Handle thisParam); + + [LibraryImport("Ktx", EntryPoint = "ktxTexture2_CompressAstc1")] + public static unsafe partial KtxErrorCode CompressAstc( + this KtxTexture2Handle thisParam, + KtxPackAstcQualityLevels quality + ); + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture2Handle.gen.cs b/Brutal.Ktx/Generated/KtxTexture2Handle.gen.cs new file mode 100644 index 0000000..726655f --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture2Handle.gen.cs @@ -0,0 +1,58 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public partial struct KtxTexture2Handle : INullable, IDisposable + { + public KtxTexture2Handle(nint impl) + { + _impl = impl; + } + + /// Returns whether the handle has been initialised or not. + public bool IsNull() => _impl is 0; + + internal nint Impl => _impl; + + public void Dispose() => Release(); + + public static implicit operator KtxTextureHandle(KtxTexture2Handle handle) => new KtxTextureHandle(handle.Impl); + + public unsafe ref KtxTexture2Native Ptr => ref *(KtxTexture2Native*)_impl; + public ClassId ClassId => Ptr.ClassId; + public unsafe KtxTextureProtected* Protected => Ptr.Protected; + public Bool8 IsArray => Ptr.IsArray; + public Bool8 IsCubemap => Ptr.IsCubemap; + public Bool8 IsCompressed => Ptr.IsCompressed; + public Bool8 GenerateMipmaps => Ptr.GenerateMipmaps; + public uint BaseWidth => Ptr.BaseWidth; + public uint BaseHeight => Ptr.BaseHeight; + public uint BaseDepth => Ptr.BaseDepth; + public uint NumDimensions => Ptr.NumDimensions; + public uint NumLevels => Ptr.NumLevels; + public uint NumLayers => Ptr.NumLayers; + public uint NumFaces => Ptr.NumFaces; + public Orientation Orientation => Ptr.Orientation; + public ulong DataSize => Ptr.DataSize; + public unsafe byte* PData => Ptr.PData; + public uint VkFormat => Ptr.VkFormat; + public unsafe uint* PDfd => Ptr.PDfd; + public KtxSupercmpScheme SupercompressionScheme => Ptr.SupercompressionScheme; + public Bool8 IsVideo => Ptr.IsVideo; + public uint Duration => Ptr.Duration; + public uint Timescale => Ptr.Timescale; + public uint Loopcount => Ptr.Loopcount; + + private void Release() + { + var impl = Interlocked.Exchange(ref _impl, 0); + if (impl == 0) + return; + KtxTexture2.Destroy(new(impl)); + } + + private nint _impl; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTexture2Native.gen.cs b/Brutal.Ktx/Generated/KtxTexture2Native.gen.cs new file mode 100644 index 0000000..2e80e9a --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTexture2Native.gen.cs @@ -0,0 +1,79 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 8)] + public unsafe partial struct KtxTexture2Native + { + [FieldOffset(0)] + public readonly ClassId ClassId; + + [FieldOffset(24)] + public readonly KtxTextureProtected* Protected; + + [FieldOffset(32)] + public readonly Bool8 IsArray; + + [FieldOffset(33)] + public readonly Bool8 IsCubemap; + + [FieldOffset(34)] + public readonly Bool8 IsCompressed; + + [FieldOffset(35)] + public readonly Bool8 GenerateMipmaps; + + [FieldOffset(36)] + public readonly uint BaseWidth; + + [FieldOffset(40)] + public readonly uint BaseHeight; + + [FieldOffset(44)] + public readonly uint BaseDepth; + + [FieldOffset(48)] + public readonly uint NumDimensions; + + [FieldOffset(52)] + public readonly uint NumLevels; + + [FieldOffset(56)] + public readonly uint NumLayers; + + [FieldOffset(60)] + public readonly uint NumFaces; + + [FieldOffset(64)] + public readonly Orientation Orientation; + + [FieldOffset(104)] + public readonly ulong DataSize; + + [FieldOffset(112)] + public readonly byte* PData; + + [FieldOffset(120)] + public readonly uint VkFormat; + + [FieldOffset(128)] + public readonly uint* PDfd; + + [FieldOffset(136)] + public readonly KtxSupercmpScheme SupercompressionScheme; + + [FieldOffset(140)] + public readonly Bool8 IsVideo; + + [FieldOffset(144)] + public readonly uint Duration; + + [FieldOffset(148)] + public readonly uint Timescale; + + [FieldOffset(152)] + public readonly uint Loopcount; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTextureCreateFlagBits.gen.cs b/Brutal.Ktx/Generated/KtxTextureCreateFlagBits.gen.cs new file mode 100644 index 0000000..549e4fe --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTextureCreateFlagBits.gen.cs @@ -0,0 +1,16 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [System.Flags] + public enum KtxTextureCreateFlagBits : int + { + NoFlags = 0, + LoadImageDataBit = 1, + RawKvdataBit = 2, + SkipKvdataBit = 4, + CheckGltfBasisuBit = 8, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTextureCreateInfo.gen.cs b/Brutal.Ktx/Generated/KtxTextureCreateInfo.gen.cs new file mode 100644 index 0000000..bce2be3 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTextureCreateInfo.gen.cs @@ -0,0 +1,58 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 8)] + public unsafe partial struct KtxTextureCreateInfo + { + /// Internal format for the texture, e.g.,GL_RGB8. Ignored when creating aktxTexture2. + [FieldOffset(0)] + public uint GlInternalformat; + + /// VkFormat for texture. Ignored when creating aktxTexture1. + [FieldOffset(4)] + public uint VkFormat; + + /// Pointer to DFD. Used only when creating aktxTexture2 and only if vkFormat isVK_FORMAT_UNDEFINED. + [FieldOffset(8)] + public uint* PDfd; + + /// Width of the base level of the texture. + [FieldOffset(16)] + public uint BaseWidth; + + /// Height of the base level of the texture. + [FieldOffset(20)] + public uint BaseHeight; + + /// Depth of the base level of the texture. + [FieldOffset(24)] + public uint BaseDepth; + + /// Number of dimensions in the texture, 1, 2or 3. + [FieldOffset(28)] + public uint NumDimensions; + + /// Number of mip levels in the texture. Should be1 if @c generateMipmaps is KTX_TRUE; + [FieldOffset(32)] + public uint NumLevels; + + /// Number of array layers in the texture. + [FieldOffset(36)] + public uint NumLayers; + + /// Number of faces: 6 for cube maps, 1 otherwise. + [FieldOffset(40)] + public uint NumFaces; + + /// Set to KTX_TRUE if the texture is to be anarray texture. Means OpenGL will use aGL_TEXTURE_*_ARRAY target. + [FieldOffset(44)] + public Bool8 IsArray; + + /// Set to KTX_TRUE if mipmaps should begenerated for the texture when loadinginto a 3D API. + [FieldOffset(45)] + public Bool8 GenerateMipmaps; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTextureCreateStorageEnum.gen.cs b/Brutal.Ktx/Generated/KtxTextureCreateStorageEnum.gen.cs new file mode 100644 index 0000000..b1bdd07 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTextureCreateStorageEnum.gen.cs @@ -0,0 +1,15 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KtxTextureCreateStorageEnum : int + { + /// Don't allocate any image storage. + TextureCreateNoStorage = 0, + + /// Allocate image storage. + TextureCreateAllocStorage = 1, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTextureHandle.gen.cs b/Brutal.Ktx/Generated/KtxTextureHandle.gen.cs new file mode 100644 index 0000000..3d1de85 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTextureHandle.gen.cs @@ -0,0 +1,49 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public partial struct KtxTextureHandle : INullable, IDisposable + { + public KtxTextureHandle(nint impl) + { + _impl = impl; + } + + /// Returns whether the handle has been initialised or not. + public bool IsNull() => _impl is 0; + + internal nint Impl => _impl; + + public void Dispose() => Release(); + + public unsafe ref KtxTextureNative Ptr => ref *(KtxTextureNative*)_impl; + public ClassId ClassId => Ptr.ClassId; + public unsafe KtxTextureProtected* Protected => Ptr.Protected; + public Bool8 IsArray => Ptr.IsArray; + public Bool8 IsCubemap => Ptr.IsCubemap; + public Bool8 IsCompressed => Ptr.IsCompressed; + public Bool8 GenerateMipmaps => Ptr.GenerateMipmaps; + public uint BaseWidth => Ptr.BaseWidth; + public uint BaseHeight => Ptr.BaseHeight; + public uint BaseDepth => Ptr.BaseDepth; + public uint NumDimensions => Ptr.NumDimensions; + public uint NumLevels => Ptr.NumLevels; + public uint NumLayers => Ptr.NumLayers; + public uint NumFaces => Ptr.NumFaces; + public Orientation Orientation => Ptr.Orientation; + public ulong DataSize => Ptr.DataSize; + public unsafe byte* PData => Ptr.PData; + + private void Release() + { + var impl = Interlocked.Exchange(ref _impl, 0); + if (impl == 0) + return; + KtxTexture.Destroy(new(impl)); + } + + private nint _impl; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTextureNative.gen.cs b/Brutal.Ktx/Generated/KtxTextureNative.gen.cs new file mode 100644 index 0000000..d8f06a6 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTextureNative.gen.cs @@ -0,0 +1,58 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 8)] + public unsafe partial struct KtxTextureNative + { + [FieldOffset(0)] + public readonly ClassId ClassId; + + [FieldOffset(24)] + public readonly KtxTextureProtected* Protected; + + [FieldOffset(32)] + public readonly Bool8 IsArray; + + [FieldOffset(33)] + public readonly Bool8 IsCubemap; + + [FieldOffset(34)] + public readonly Bool8 IsCompressed; + + [FieldOffset(35)] + public readonly Bool8 GenerateMipmaps; + + [FieldOffset(36)] + public readonly uint BaseWidth; + + [FieldOffset(40)] + public readonly uint BaseHeight; + + [FieldOffset(44)] + public readonly uint BaseDepth; + + [FieldOffset(48)] + public readonly uint NumDimensions; + + [FieldOffset(52)] + public readonly uint NumLevels; + + [FieldOffset(56)] + public readonly uint NumLayers; + + [FieldOffset(60)] + public readonly uint NumFaces; + + [FieldOffset(64)] + public readonly Orientation Orientation; + + [FieldOffset(104)] + public readonly ulong DataSize; + + [FieldOffset(112)] + public readonly byte* PData; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTextureProtected.gen.cs b/Brutal.Ktx/Generated/KtxTextureProtected.gen.cs new file mode 100644 index 0000000..b752190 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTextureProtected.gen.cs @@ -0,0 +1,13 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 8)] + public unsafe partial struct KtxTextureProtected + { + [FieldOffset(24)] + public readonly KtxFormatSize FormatSize; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTranscodeFlagBits.gen.cs b/Brutal.Ktx/Generated/KtxTranscodeFlagBits.gen.cs new file mode 100644 index 0000000..7798d66 --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTranscodeFlagBits.gen.cs @@ -0,0 +1,14 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [System.Flags] + public enum KtxTranscodeFlagBits : int + { + PvrtcDecodeToNextPow2 = 2, + TranscodeAlphaDataToOpaqueFormats = 4, + HighQuality = 32, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/KtxTranscodeFmt.gen.cs b/Brutal.Ktx/Generated/KtxTranscodeFmt.gen.cs new file mode 100644 index 0000000..c5f2e3c --- /dev/null +++ b/Brutal.Ktx/Generated/KtxTranscodeFmt.gen.cs @@ -0,0 +1,56 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum KtxTranscodeFmt : int + { + /// ETC1-2 + Etc1Rgb = 0, + Etc2Rgba = 1, + + /// BC1-5, BC7 (desktop, some mobile devices) + Bc1Rgb = 2, + Bc3Rgba = 3, + Bc4R = 4, + Bc5Rg = 5, + Bc7Rgba = 6, + + /// PVRTC1 4bpp (mobile, PowerVR devices) + Pvrtc14Rgb = 8, + Pvrtc14Rgba = 9, + + /// ASTC (mobile, Intel devices, hopefully all desktop GPU's one day) + Astc4X4Rgba = 10, + + /// ATC and FXT1 formats are not supported by KTX2 as thereare no equivalent VkFormats. + Pvrtc24Rgb = 18, + Pvrtc24Rgba = 19, + Etc2EacR11 = 20, + Etc2EacRg11 = 21, + + /// Uncompressed (raw pixel) formats + Rgba32 = 13, + Rgb565 = 14, + Bgr565 = 15, + Rgba4444 = 16, + + /// Values for automatic selection of RGB or RGBA depending if alphapresent. + Etc = 22, + Bc1Or3 = 23, + Noselection = 2147483647, + + /// Old enums for compatibility with code compiled against previousversions of libktx. + Etc1 = 0, + Etc2 = 22, + Bc1 = 2, + Bc3 = 3, + Bc4 = 4, + Bc5 = 5, + Bc7M6Rgb = 6, + Bc7M5Rgba = 6, + Bc7M6OpaqueOnly = 6, + Pvrtc14OpaqueOnly = 8, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/Orientation.gen.cs b/Brutal.Ktx/Generated/Orientation.gen.cs new file mode 100644 index 0000000..51e0f08 --- /dev/null +++ b/Brutal.Ktx/Generated/Orientation.gen.cs @@ -0,0 +1,22 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + [StructLayout(LayoutKind.Explicit, Pack = 4)] + public unsafe partial struct Orientation + { + /// Orientation in X + [FieldOffset(0)] + public readonly OrientationX X; + + /// Orientation in Y + [FieldOffset(4)] + public readonly OrientationY Y; + + /// Orientation in Z + [FieldOffset(8)] + public readonly OrientationZ Z; + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/OrientationX.gen.cs b/Brutal.Ktx/Generated/OrientationX.gen.cs new file mode 100644 index 0000000..53e3022 --- /dev/null +++ b/Brutal.Ktx/Generated/OrientationX.gen.cs @@ -0,0 +1,12 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum OrientationX : int + { + OrientXLeft = 108, + OrientXRight = 114, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/OrientationY.gen.cs b/Brutal.Ktx/Generated/OrientationY.gen.cs new file mode 100644 index 0000000..9d269fc --- /dev/null +++ b/Brutal.Ktx/Generated/OrientationY.gen.cs @@ -0,0 +1,12 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum OrientationY : int + { + OrientYUp = 117, + OrientYDown = 100, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/OrientationZ.gen.cs b/Brutal.Ktx/Generated/OrientationZ.gen.cs new file mode 100644 index 0000000..6ffea83 --- /dev/null +++ b/Brutal.Ktx/Generated/OrientationZ.gen.cs @@ -0,0 +1,12 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum OrientationZ : int + { + OrientZIn = 105, + OrientZOut = 111, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/Strings.gen.cs b/Brutal.Ktx/Generated/Strings.gen.cs new file mode 100644 index 0000000..7af03af --- /dev/null +++ b/Brutal.Ktx/Generated/Strings.gen.cs @@ -0,0 +1,21 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public static unsafe partial class Strings + { + /// Returns a string corresponding to a KTX error code. + [LibraryImport("Ktx", EntryPoint = "ktxErrorString1")] + public static partial byte* KtxErrorString(KtxErrorCode error); + + /// Returns a string corresponding to a supercompression scheme. + [LibraryImport("Ktx", EntryPoint = "ktxSupercompressionSchemeString1")] + public static partial byte* KtxSupercompressionSchemeString(KtxSupercmpScheme scheme); + + /// Returns a string corresponding to a transcode target format. + [LibraryImport("Ktx", EntryPoint = "ktxTranscodeFormatString1")] + public static partial byte* KtxTranscodeFormatString(KtxTranscodeFmt format); + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/Generated/VkFormat.gen.cs b/Brutal.Ktx/Generated/VkFormat.gen.cs new file mode 100644 index 0000000..c8c109e --- /dev/null +++ b/Brutal.Ktx/Generated/VkFormat.gen.cs @@ -0,0 +1,346 @@ +#pragma warning disable 1591 +using System.Runtime.InteropServices; + +namespace Brutal.KtxApi +{ + public enum VkFormat : int + { + Undefined = 0, + R4G4UnormPack8 = 1, + R4G4B4A4UnormPack16 = 2, + B4G4R4A4UnormPack16 = 3, + R5G6B5UnormPack16 = 4, + B5G6R5UnormPack16 = 5, + R5G5B5A1UnormPack16 = 6, + B5G5R5A1UnormPack16 = 7, + A1R5G5B5UnormPack16 = 8, + R8Unorm = 9, + R8Snorm = 10, + R8Uscaled = 11, + R8Sscaled = 12, + R8Uint = 13, + R8Sint = 14, + R8Srgb = 15, + R8G8Unorm = 16, + R8G8Snorm = 17, + R8G8Uscaled = 18, + R8G8Sscaled = 19, + R8G8Uint = 20, + R8G8Sint = 21, + R8G8Srgb = 22, + R8G8B8Unorm = 23, + R8G8B8Snorm = 24, + R8G8B8Uscaled = 25, + R8G8B8Sscaled = 26, + R8G8B8Uint = 27, + R8G8B8Sint = 28, + R8G8B8Srgb = 29, + B8G8R8Unorm = 30, + B8G8R8Snorm = 31, + B8G8R8Uscaled = 32, + B8G8R8Sscaled = 33, + B8G8R8Uint = 34, + B8G8R8Sint = 35, + B8G8R8Srgb = 36, + R8G8B8A8Unorm = 37, + R8G8B8A8Snorm = 38, + R8G8B8A8Uscaled = 39, + R8G8B8A8Sscaled = 40, + R8G8B8A8Uint = 41, + R8G8B8A8Sint = 42, + R8G8B8A8Srgb = 43, + B8G8R8A8Unorm = 44, + B8G8R8A8Snorm = 45, + B8G8R8A8Uscaled = 46, + B8G8R8A8Sscaled = 47, + B8G8R8A8Uint = 48, + B8G8R8A8Sint = 49, + B8G8R8A8Srgb = 50, + A8B8G8R8UnormPack32 = 51, + A8B8G8R8SnormPack32 = 52, + A8B8G8R8UscaledPack32 = 53, + A8B8G8R8SscaledPack32 = 54, + A8B8G8R8UintPack32 = 55, + A8B8G8R8SintPack32 = 56, + A8B8G8R8SrgbPack32 = 57, + A2R10G10B10UnormPack32 = 58, + A2R10G10B10SnormPack32 = 59, + A2R10G10B10UscaledPack32 = 60, + A2R10G10B10SscaledPack32 = 61, + A2R10G10B10UintPack32 = 62, + A2R10G10B10SintPack32 = 63, + A2B10G10R10UnormPack32 = 64, + A2B10G10R10SnormPack32 = 65, + A2B10G10R10UscaledPack32 = 66, + A2B10G10R10SscaledPack32 = 67, + A2B10G10R10UintPack32 = 68, + A2B10G10R10SintPack32 = 69, + R16Unorm = 70, + R16Snorm = 71, + R16Uscaled = 72, + R16Sscaled = 73, + R16Uint = 74, + R16Sint = 75, + R16Sfloat = 76, + R16G16Unorm = 77, + R16G16Snorm = 78, + R16G16Uscaled = 79, + R16G16Sscaled = 80, + R16G16Uint = 81, + R16G16Sint = 82, + R16G16Sfloat = 83, + R16G16B16Unorm = 84, + R16G16B16Snorm = 85, + R16G16B16Uscaled = 86, + R16G16B16Sscaled = 87, + R16G16B16Uint = 88, + R16G16B16Sint = 89, + R16G16B16Sfloat = 90, + R16G16B16A16Unorm = 91, + R16G16B16A16Snorm = 92, + R16G16B16A16Uscaled = 93, + R16G16B16A16Sscaled = 94, + R16G16B16A16Uint = 95, + R16G16B16A16Sint = 96, + R16G16B16A16Sfloat = 97, + R32Uint = 98, + R32Sint = 99, + R32Sfloat = 100, + R32G32Uint = 101, + R32G32Sint = 102, + R32G32Sfloat = 103, + R32G32B32Uint = 104, + R32G32B32Sint = 105, + R32G32B32Sfloat = 106, + R32G32B32A32Uint = 107, + R32G32B32A32Sint = 108, + R32G32B32A32Sfloat = 109, + R64Uint = 110, + R64Sint = 111, + R64Sfloat = 112, + R64G64Uint = 113, + R64G64Sint = 114, + R64G64Sfloat = 115, + R64G64B64Uint = 116, + R64G64B64Sint = 117, + R64G64B64Sfloat = 118, + R64G64B64A64Uint = 119, + R64G64B64A64Sint = 120, + R64G64B64A64Sfloat = 121, + B10G11R11UfloatPack32 = 122, + E5B9G9R9UfloatPack32 = 123, + D16Unorm = 124, + X8D24UnormPack32 = 125, + D32Sfloat = 126, + S8Uint = 127, + D16UnormS8Uint = 128, + D24UnormS8Uint = 129, + D32SfloatS8Uint = 130, + Bc1RgbUnormBlock = 131, + Bc1RgbSrgbBlock = 132, + Bc1RgbaUnormBlock = 133, + Bc1RgbaSrgbBlock = 134, + Bc2UnormBlock = 135, + Bc2SrgbBlock = 136, + Bc3UnormBlock = 137, + Bc3SrgbBlock = 138, + Bc4UnormBlock = 139, + Bc4SnormBlock = 140, + Bc5UnormBlock = 141, + Bc5SnormBlock = 142, + Bc6HUfloatBlock = 143, + Bc6HSfloatBlock = 144, + Bc7UnormBlock = 145, + Bc7SrgbBlock = 146, + Etc2R8G8B8UnormBlock = 147, + Etc2R8G8B8SrgbBlock = 148, + Etc2R8G8B8A1UnormBlock = 149, + Etc2R8G8B8A1SrgbBlock = 150, + Etc2R8G8B8A8UnormBlock = 151, + Etc2R8G8B8A8SrgbBlock = 152, + EacR11UnormBlock = 153, + EacR11SnormBlock = 154, + EacR11G11UnormBlock = 155, + EacR11G11SnormBlock = 156, + Astc4X4UnormBlock = 157, + Astc4X4SrgbBlock = 158, + Astc5X4UnormBlock = 159, + Astc5X4SrgbBlock = 160, + Astc5X5UnormBlock = 161, + Astc5X5SrgbBlock = 162, + Astc6X5UnormBlock = 163, + Astc6X5SrgbBlock = 164, + Astc6X6UnormBlock = 165, + Astc6X6SrgbBlock = 166, + Astc8X5UnormBlock = 167, + Astc8X5SrgbBlock = 168, + Astc8X6UnormBlock = 169, + Astc8X6SrgbBlock = 170, + Astc8X8UnormBlock = 171, + Astc8X8SrgbBlock = 172, + Astc10X5UnormBlock = 173, + Astc10X5SrgbBlock = 174, + Astc10X6UnormBlock = 175, + Astc10X6SrgbBlock = 176, + Astc10X8UnormBlock = 177, + Astc10X8SrgbBlock = 178, + Astc10X10UnormBlock = 179, + Astc10X10SrgbBlock = 180, + Astc12X10UnormBlock = 181, + Astc12X10SrgbBlock = 182, + Astc12X12UnormBlock = 183, + Astc12X12SrgbBlock = 184, + G8B8G8R8422Unorm = 1000156000, + B8G8R8G8422Unorm = 1000156001, + G8B8R83Plane420Unorm = 1000156002, + G8B8R82Plane420Unorm = 1000156003, + G8B8R83Plane422Unorm = 1000156004, + G8B8R82Plane422Unorm = 1000156005, + G8B8R83Plane444Unorm = 1000156006, + R10X6UnormPack16 = 1000156007, + R10X6G10X6Unorm2Pack16 = 1000156008, + R10X6G10X6B10X6A10X6Unorm4Pack16 = 1000156009, + G10X6B10X6G10X6R10X6422Unorm4Pack16 = 1000156010, + B10X6G10X6R10X6G10X6422Unorm4Pack16 = 1000156011, + G10X6B10X6R10X63Plane420Unorm3Pack16 = 1000156012, + G10X6B10X6R10X62Plane420Unorm3Pack16 = 1000156013, + G10X6B10X6R10X63Plane422Unorm3Pack16 = 1000156014, + G10X6B10X6R10X62Plane422Unorm3Pack16 = 1000156015, + G10X6B10X6R10X63Plane444Unorm3Pack16 = 1000156016, + R12X4UnormPack16 = 1000156017, + R12X4G12X4Unorm2Pack16 = 1000156018, + R12X4G12X4B12X4A12X4Unorm4Pack16 = 1000156019, + G12X4B12X4G12X4R12X4422Unorm4Pack16 = 1000156020, + B12X4G12X4R12X4G12X4422Unorm4Pack16 = 1000156021, + G12X4B12X4R12X43Plane420Unorm3Pack16 = 1000156022, + G12X4B12X4R12X42Plane420Unorm3Pack16 = 1000156023, + G12X4B12X4R12X43Plane422Unorm3Pack16 = 1000156024, + G12X4B12X4R12X42Plane422Unorm3Pack16 = 1000156025, + G12X4B12X4R12X43Plane444Unorm3Pack16 = 1000156026, + G16B16G16R16422Unorm = 1000156027, + B16G16R16G16422Unorm = 1000156028, + G16B16R163Plane420Unorm = 1000156029, + G16B16R162Plane420Unorm = 1000156030, + G16B16R163Plane422Unorm = 1000156031, + G16B16R162Plane422Unorm = 1000156032, + G16B16R163Plane444Unorm = 1000156033, + G8B8R82Plane444Unorm = 1000330000, + G10X6B10X6R10X62Plane444Unorm3Pack16 = 1000330001, + G12X4B12X4R12X42Plane444Unorm3Pack16 = 1000330002, + G16B16R162Plane444Unorm = 1000330003, + A4R4G4B4UnormPack16 = 1000340000, + A4B4G4R4UnormPack16 = 1000340001, + Astc4X4SfloatBlock = 1000066000, + Astc5X4SfloatBlock = 1000066001, + Astc5X5SfloatBlock = 1000066002, + Astc6X5SfloatBlock = 1000066003, + Astc6X6SfloatBlock = 1000066004, + Astc8X5SfloatBlock = 1000066005, + Astc8X6SfloatBlock = 1000066006, + Astc8X8SfloatBlock = 1000066007, + Astc10X5SfloatBlock = 1000066008, + Astc10X6SfloatBlock = 1000066009, + Astc10X8SfloatBlock = 1000066010, + Astc10X10SfloatBlock = 1000066011, + Astc12X10SfloatBlock = 1000066012, + Astc12X12SfloatBlock = 1000066013, + Pvrtc12BppUnormBlockImg = 1000054000, + Pvrtc14BppUnormBlockImg = 1000054001, + Pvrtc22BppUnormBlockImg = 1000054002, + Pvrtc24BppUnormBlockImg = 1000054003, + Pvrtc12BppSrgbBlockImg = 1000054004, + Pvrtc14BppSrgbBlockImg = 1000054005, + Pvrtc22BppSrgbBlockImg = 1000054006, + Pvrtc24BppSrgbBlockImg = 1000054007, + Astc3X3X3UnormBlockExt = 1000288000, + Astc3X3X3SrgbBlockExt = 1000288001, + Astc3X3X3SfloatBlockExt = 1000288002, + Astc4X3X3UnormBlockExt = 1000288003, + Astc4X3X3SrgbBlockExt = 1000288004, + Astc4X3X3SfloatBlockExt = 1000288005, + Astc4X4X3UnormBlockExt = 1000288006, + Astc4X4X3SrgbBlockExt = 1000288007, + Astc4X4X3SfloatBlockExt = 1000288008, + Astc4X4X4UnormBlockExt = 1000288009, + Astc4X4X4SrgbBlockExt = 1000288010, + Astc4X4X4SfloatBlockExt = 1000288011, + Astc5X4X4UnormBlockExt = 1000288012, + Astc5X4X4SrgbBlockExt = 1000288013, + Astc5X4X4SfloatBlockExt = 1000288014, + Astc5X5X4UnormBlockExt = 1000288015, + Astc5X5X4SrgbBlockExt = 1000288016, + Astc5X5X4SfloatBlockExt = 1000288017, + Astc5X5X5UnormBlockExt = 1000288018, + Astc5X5X5SrgbBlockExt = 1000288019, + Astc5X5X5SfloatBlockExt = 1000288020, + Astc6X5X5UnormBlockExt = 1000288021, + Astc6X5X5SrgbBlockExt = 1000288022, + Astc6X5X5SfloatBlockExt = 1000288023, + Astc6X6X5UnormBlockExt = 1000288024, + Astc6X6X5SrgbBlockExt = 1000288025, + Astc6X6X5SfloatBlockExt = 1000288026, + Astc6X6X6UnormBlockExt = 1000288027, + Astc6X6X6SrgbBlockExt = 1000288028, + Astc6X6X6SfloatBlockExt = 1000288029, + R16G16Sfixed5Nv = 1000464000, + A1B5G5R5UnormPack16Khr = 1000470000, + A8UnormKhr = 1000470001, + Astc4X4SfloatBlockExt = 1000066000, + Astc5X4SfloatBlockExt = 1000066001, + Astc5X5SfloatBlockExt = 1000066002, + Astc6X5SfloatBlockExt = 1000066003, + Astc6X6SfloatBlockExt = 1000066004, + Astc8X5SfloatBlockExt = 1000066005, + Astc8X6SfloatBlockExt = 1000066006, + Astc8X8SfloatBlockExt = 1000066007, + Astc10X5SfloatBlockExt = 1000066008, + Astc10X6SfloatBlockExt = 1000066009, + Astc10X8SfloatBlockExt = 1000066010, + Astc10X10SfloatBlockExt = 1000066011, + Astc12X10SfloatBlockExt = 1000066012, + Astc12X12SfloatBlockExt = 1000066013, + G8B8G8R8422UnormKhr = 1000156000, + B8G8R8G8422UnormKhr = 1000156001, + G8B8R83Plane420UnormKhr = 1000156002, + G8B8R82Plane420UnormKhr = 1000156003, + G8B8R83Plane422UnormKhr = 1000156004, + G8B8R82Plane422UnormKhr = 1000156005, + G8B8R83Plane444UnormKhr = 1000156006, + R10X6UnormPack16Khr = 1000156007, + R10X6G10X6Unorm2Pack16Khr = 1000156008, + R10X6G10X6B10X6A10X6Unorm4Pack16Khr = 1000156009, + G10X6B10X6G10X6R10X6422Unorm4Pack16Khr = 1000156010, + B10X6G10X6R10X6G10X6422Unorm4Pack16Khr = 1000156011, + G10X6B10X6R10X63Plane420Unorm3Pack16Khr = 1000156012, + G10X6B10X6R10X62Plane420Unorm3Pack16Khr = 1000156013, + G10X6B10X6R10X63Plane422Unorm3Pack16Khr = 1000156014, + G10X6B10X6R10X62Plane422Unorm3Pack16Khr = 1000156015, + G10X6B10X6R10X63Plane444Unorm3Pack16Khr = 1000156016, + R12X4UnormPack16Khr = 1000156017, + R12X4G12X4Unorm2Pack16Khr = 1000156018, + R12X4G12X4B12X4A12X4Unorm4Pack16Khr = 1000156019, + G12X4B12X4G12X4R12X4422Unorm4Pack16Khr = 1000156020, + B12X4G12X4R12X4G12X4422Unorm4Pack16Khr = 1000156021, + G12X4B12X4R12X43Plane420Unorm3Pack16Khr = 1000156022, + G12X4B12X4R12X42Plane420Unorm3Pack16Khr = 1000156023, + G12X4B12X4R12X43Plane422Unorm3Pack16Khr = 1000156024, + G12X4B12X4R12X42Plane422Unorm3Pack16Khr = 1000156025, + G12X4B12X4R12X43Plane444Unorm3Pack16Khr = 1000156026, + G16B16G16R16422UnormKhr = 1000156027, + B16G16R16G16422UnormKhr = 1000156028, + G16B16R163Plane420UnormKhr = 1000156029, + G16B16R162Plane420UnormKhr = 1000156030, + G16B16R163Plane422UnormKhr = 1000156031, + G16B16R162Plane422UnormKhr = 1000156032, + G16B16R163Plane444UnormKhr = 1000156033, + G8B8R82Plane444UnormExt = 1000330000, + G10X6B10X6R10X62Plane444Unorm3Pack16Ext = 1000330001, + G12X4B12X4R12X42Plane444Unorm3Pack16Ext = 1000330002, + G16B16R162Plane444UnormExt = 1000330003, + A4R4G4B4UnormPack16Ext = 1000340000, + A4B4G4R4UnormPack16Ext = 1000340001, + R16G16S105Nv = 1000464000, + MaxEnum = 2147483647, + } +} +#pragma warning restore 1591 diff --git a/Brutal.Ktx/LICENSES/BRUTAL-KTX-THIRD-PARTY-NOTICES.txt b/Brutal.Ktx/LICENSES/BRUTAL-KTX-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..3b7e918 --- /dev/null +++ b/Brutal.Ktx/LICENSES/BRUTAL-KTX-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,332 @@ +Brutal.Ktx redistributes the third-party components listed below. Each is +reproduced with the license that governs it. + +Every component below is statically linked into the native libraries that ship in +this package: + + Ktx.dll (win-x64) / libKtx.so (linux-x64) / libKtx.dylib (osx-arm64) + +Six of the seven components are licensed under the Apache License 2.0. That text +is reproduced once, in full, as Appendix A -- Apache-2.0 section 4(a) requires a +copy of the license per distribution, not per component. Zstandard is +BSD-3-Clause and its text is reproduced in full in its own section below. + +============================================================ +KTX-Software (libktx) 4.4.0-28-g60cf5413 +Apache-2.0 -- https://github.com/KhronosGroup/KTX-Software +============================================================ + +Upstream's NOTICE file contains one line, "LICENSE.md". The attribution notices +it points at are reproduced below. They are quoted verbatim, so "this repository" +there means the KTX-Software repository named above, not this package: + + Files unique to this repository generally fall under the Apache 2.0 license + with copyright holders including Mark Callow, the KTX-Software author; The + Khronos Group Inc., which has supported KTX development; and other + contributors to the KTX project. + +License text: Appendix A. + +============================================================ +Basis Universal 1.16 +Apache-2.0 -- https://github.com/BinomialLLC/basis_universal +============================================================ + +Both the transcoder and the encoder are linked in. + +License text: Appendix A. + +============================================================ +miniz v1.15 (Basis Universal fork) +Apache-2.0 -- https://github.com/BinomialLLC/basis_universal +============================================================ + +Copyright (C) 2019-2021 Binomial LLC. All Rights Reserved. + +Carried inside Basis Universal as a single header, and described there as forked +from the public-domain/unlicense miniz v1.15. The fork is Apache-2.0. + +License text: Appendix A. + +============================================================ +Zstandard 1.5.5 +BSD-3-Clause -- https://github.com/facebook/zstd +============================================================ + +Vendored inside Basis Universal as a single-file amalgamation, and used for the +KTX2 Zstandard supercompression scheme. Zstandard is offered under a choice of +the BSD license below or GPLv2; the BSD license is the one taken here. + +BSD License + +For Zstandard software + +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================ +astc-encoder 5.3.0 +Apache-2.0 -- https://github.com/ARM-software/astc-encoder +============================================================ + +License text: Appendix A. + +============================================================ +dfdutils +Apache-2.0 -- https://github.com/KhronosGroup/dfdutils +============================================================ + +Khronos data-format-descriptor utilities. Vendored inside KTX-Software +4.4.0-28-g60cf5413; upstream publishes no version tags. + +License text: Appendix A. + +============================================================ +Vulkan headers +Apache-2.0 -- https://github.com/KhronosGroup/Vulkan-Headers +============================================================ + +Vulkan format enumerations and structure definitions reach these binaries +through dfdutils, which carries its own copy of vulkan_core.h. No version is +stated because the copy is vendored rather than taken from a tagged release. + +License text: Appendix A. + +============================================================ +Appendix A -- Apache License 2.0 +Applies to: KTX-Software, Basis Universal, miniz, astc-encoder, dfdutils, + Vulkan headers +============================================================ + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, +AND DISTRIBUTION + + 1. Definitions. + + + +"License" shall mean the terms and conditions for use, reproduction, and distribution +as defined by Sections 1 through 9 of this document. + + + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + + + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct +or indirect, to cause the direction or management of such entity, whether +by contract or otherwise, or (ii) ownership of fifty percent (50%) or more +of the outstanding shares, or (iii) beneficial ownership of such entity. + + + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions +granted by this License. + + + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + + + +"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. + + + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that +is included in or attached to the work (an example is provided in the Appendix +below). + + + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative +Works shall not include works that remain separable from, or merely link (or +bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative +Works thereof, that is intentionally submitted to Licensor for inclusion in +the Work by the copyright owner or by an individual or Legal Entity authorized +to submit on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication +sent to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + + + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently incorporated +within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable copyright license to reproduce, prepare +Derivative Works of, publicly display, publicly perform, sublicense, and distribute +the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, +each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) patent +license to make, have made, use, offer to sell, sell, import, and otherwise +transfer the Work, where such license applies only to those patent claims +licensable by such Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation against +any entity (including a cross-claim or counterclaim in a lawsuit) alleging +that the Work or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses granted to You +under this License for that Work shall terminate as of the date such litigation +is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and +in Source or Object form, provided that You meet the following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a copy +of this License; and + +(b) You must cause any modified files to carry prominent notices stating that +You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source +form of the Work, excluding those notices that do not pertain to any part +of the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding those +notices that do not pertain to any part of the Derivative Works, in at least +one of the following places: within a NOTICE text file distributed as part +of the Derivative Works; within the Source form or documentation, if provided +along with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works +that You distribute, alongside or as an addendum to the NOTICE text from the +Work, provided that such additional attribution notices cannot be construed +as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, +or distribution of Your modifications, or for any such Derivative Works as +a whole, provided Your use, reproduction, and distribution of the Work otherwise +complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without +any additional terms or conditions. Notwithstanding the above, nothing herein +shall supersede or modify the terms of any separate license agreement you +may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of the Licensor, except as required +for reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to +in writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR +A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness +of using or redistributing the Work and assume any risks associated with Your +exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether +in tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to +in writing, shall any Contributor be liable to You for damages, including +any direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability +to use the Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all other commercial +damages or losses), even if such Contributor has been advised of the possibility +of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work +or Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such obligations, +You may act only on Your own behalf and on Your sole responsibility, not on +behalf of any other Contributor, and only if You agree to indemnify, defend, +and hold each Contributor harmless for any liability incurred by, or claims +asserted against, such Contributor by reason of your accepting any such warranty +or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own identifying +information. (Don't include the brackets!) The text should be enclosed in +the appropriate comment syntax for the file format. We also recommend that +a file or class name and description of purpose be included on the same "printed +page" as the copyright notice for easier identification within third-party +archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. diff --git a/Brutal.Localization/Buffers/FixedMemoryWriterLengthHint.cs b/Brutal.Localization/Buffers/FixedMemoryWriterLengthHint.cs new file mode 100644 index 0000000..8608af0 --- /dev/null +++ b/Brutal.Localization/Buffers/FixedMemoryWriterLengthHint.cs @@ -0,0 +1,16 @@ +namespace Brutal.Localization.FixedBuffers; + +public static class LengthHint +{ + /// + /// Pass this to or + /// to request the largest available span size the writer can return. + /// + public static readonly ElementCount MaxLengthHint = int.MinValue + 1; + + /// + /// Pass this to or + /// to request any span size greater than or equal to one. + /// + public static readonly ElementCount NonZeroLengthHint = int.MinValue; +} diff --git a/Brutal.Localization/Buffers/IFixedBufferWriter.cs b/Brutal.Localization/Buffers/IFixedBufferWriter.cs new file mode 100644 index 0000000..58f3aff --- /dev/null +++ b/Brutal.Localization/Buffers/IFixedBufferWriter.cs @@ -0,0 +1,39 @@ +namespace Brutal.Localization.FixedBuffers; + +/// +/// Interface for types that provide fixed writable buffers. +/// A fixed buffer must not be movable by the GC. For example a stackalloc'd buffer +/// or an array you have manually fixed. +/// +/// The type of the elements stored in the buffer. +public interface IFixedBufferWriter +{ + /// + /// Tells the buffer writer that a number of elements have been written and the buffer writer + /// should advance its write position. + /// + /// The number of elements that were written. + /// Thrown if count moves the write position past the end of the writer's maximum position, or + /// if count is negative. + public void Advance(ElementCount count); + + /// + /// Get a Span that can hold at least a specified number of elements. + /// + /// One of either: + /// + /// LengthHint.NonZeroLengthHint: Request a non-empty Span of unspecified length. + /// LengthHint.MaxLengthHint: Request the largest Span possible. + /// Otherwise, a specific Span length to return. + /// + /// A Span of the requested length or greater. Must never return an empty Span but can throw if the request cannot be fulfilled. + public Span GetSpan(ElementCount lengthHint); + + /// + /// Try to get a Span that can hold at least a specified number of elements, returning whether it succeeded or not. + /// + /// + /// When this method returns, if successful, contains a Span of the requested length or greater . If not successful will contain the largest Span that could have been returned. + /// true if a Span of the requested length or greater is returned. Otherwise, false. + public bool TryGetSpan(ElementCount lengthHint, out Span spanOut); +} diff --git a/Brutal.Localization/Buffers/RingBufferWriter.cs b/Brutal.Localization/Buffers/RingBufferWriter.cs new file mode 100644 index 0000000..86894f5 --- /dev/null +++ b/Brutal.Localization/Buffers/RingBufferWriter.cs @@ -0,0 +1,109 @@ +using System.Diagnostics; +using Brutal.Attributes; + +namespace Brutal.Localization.FixedBuffers; + +/// +/// An IFixedBufferWriter that will wrap around and reuse its storage if the length requested for a Span is greater than +/// the remaining storage but less than or equal to its capacity. If you ask for lengths that fit within it's remaining +/// storage it will return part or all of it's remaining storage depending on the length hint. However, if you ask for +/// or a specific size that's larger than the remaining storage, it can give you up +/// to its Capacity by wrapping around. Using with a essentially gives you a writer that will automatically +/// reuse its storage each time you call GetSpan or TryGetSpan. +/// +/// The element type stored in the RingBufferWriter. +/// Instantiating a default instance of is an error due to no specification +/// of the underlying buffer. Calls to or will throw in this case. +public ref struct RingBufferWriter : IFixedBufferWriter +{ + /// + /// Create a RingBufferWriter from a Span. + /// + /// The to use as the underlying storage. + /// Thrown if span is empty. + public RingBufferWriter(Span span) + { + if (span.IsEmpty) + throw new ArgumentException("Span must not be empty", nameof(span)); + + _span = span; + _pos = 0; + } + + /// + public void Advance(ElementCount count) + { + if (count < 0 || (count > 0 && count > RemainingLength)) + throw new ArgumentOutOfRangeException( + nameof(count), + $"Advance count out of range. Valid values are 0-{RemainingLength}" + ); + _pos += count; + } + + /// + /// Thrown if requested length is zero. This limitation may be removed at a later date. + /// Instantiating a default instance of is an error due to no specification + /// of the underlying buffer. Calls to or will throw in this case. + public Span GetSpan(ElementCount lengthHint) + { + if (lengthHint == 0) + throw new ArgumentOutOfRangeException( + nameof(lengthHint), + "Cannot request a zero length span." + ); + + if (!TryGetSpan(lengthHint, out var spanOut)) + throw new ArgumentException( + $"Out of buffer. requested:{lengthHint} available:{spanOut.Length}", + nameof(lengthHint) + ); + return spanOut; + } + + /// + /// Instantiating a default instance of is an error due to no specification + /// of the underlying buffer. Calls to or will throw in this case. + public bool TryGetSpan(ElementCount lengthHint, out Span spanOut) + { + ThrowIfNoCapacity(); + + var returnLength = lengthHint; + if (lengthHint == LengthHint.NonZeroLengthHint) + returnLength = RemainingLength != 0 ? RemainingLength : Capacity; + else if (lengthHint == LengthHint.MaxLengthHint || lengthHint > Capacity) + returnLength = Capacity; + else if (lengthHint < 0) + throw new ArgumentOutOfRangeException( + nameof(lengthHint), + "lengthHint cannot be negative." + ); + + Debug.Assert(returnLength <= Capacity); + + if (returnLength > RemainingLength) + Reset(); + + spanOut = RemainingSpan; + return lengthHint == LengthHint.NonZeroLengthHint + || lengthHint == LengthHint.MaxLengthHint + || spanOut.Length >= lengthHint; + } + + private void ThrowIfNoCapacity() + { + if (Capacity < 1) + throw new InvalidOperationException( + $"Invalid Capacity (0). Did you create a default instance of this writer without a Span?" + ); + } + + private Span RemainingSpan => _span.Slice(_pos, RemainingLength); + + private void Reset() => _pos = 0; + + private int RemainingLength => _span.Length - _pos; + private int Capacity => _span.Length; + private int _pos; + private readonly Span _span; +} diff --git a/Brutal.Localization/Buffers/TryWriteInterpolatedStringHandlerExtensions.cs b/Brutal.Localization/Buffers/TryWriteInterpolatedStringHandlerExtensions.cs new file mode 100644 index 0000000..368e5d2 --- /dev/null +++ b/Brutal.Localization/Buffers/TryWriteInterpolatedStringHandlerExtensions.cs @@ -0,0 +1,21 @@ +using System.Diagnostics; + +namespace Brutal.Localization.FixedBuffers; + +public static class TryWriteInterpolatedStringHandlerExtensions +{ + extension(MemoryExtensions.TryWriteInterpolatedStringHandler handler) + { + /// + /// Returns the number of elements currently written to a TryWriteInterpolatedStringHandler. + /// + /// The number of elements written. + public int ElementsWritten() + { + var shouldBeTrue = MemoryExtensions.TryWrite([], ref handler, out var elementsWritten); + Debug.Assert(shouldBeTrue, "TryWrite with empty collection should always succeed."); + + return elementsWritten; + } + } +} diff --git a/Brutal.Localization/DefaultOptions.cs b/Brutal.Localization/DefaultOptions.cs new file mode 100644 index 0000000..37c7687 --- /dev/null +++ b/Brutal.Localization/DefaultOptions.cs @@ -0,0 +1,24 @@ +using System.Text.RegularExpressions; + +namespace Brutal.Localization; + +/// +/// The default values used by various parts of Brutal.Localization. +/// +public static partial class DefaultOptions +{ + private const string RegexExpression = @"([{]_*\p{Lu}[\p{Lu}\p{Ll}_\d]*[}])"; + + /// + /// The Regex pattern to use to match replacement variables in localizable strings. If you wish to use a different pattern + /// set this field before creating instances. + /// + [GeneratedRegex(RegexExpression, RegexOptions.IgnoreCase, "en-US")] + public static partial Regex ReplacementPattern(); + + /// + /// The initial span length that any of the methods will request from the . + /// For more information on how this value is used see . + /// + public static readonly ElementCount FormatInitialSpanLength = 256; +} diff --git a/Brutal.Localization/LICENSES/BRUTAL-LOCALIZATION-THIRD-PARTY-NOTICES.txt b/Brutal.Localization/LICENSES/BRUTAL-LOCALIZATION-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..afd0b6c --- /dev/null +++ b/Brutal.Localization/LICENSES/BRUTAL-LOCALIZATION-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,47 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Localization + +This package redistributes the third-party component listed below. It is reproduced +with the license that governs it. + + +============================================================================== +ResX.NET +============================================================================== + + Name ResX.NET, by winscripter + Version 1.0.0, the version upstream states for itself. Upstream publishes + no tagged release. + Upstream https://github.com/winscripter/resx-net + SPDX MIT + Shipped as C# source compiled into Brutal.Localization.dll, as the types in the + Brutal.Localization.ResX namespace + + The code has been modified: it was moved into the namespace above, and has since + received bug fixes. + + Separately, this package writes the ResX 2.0 schema header into the .resx files it + produces. That header is part of the ResX file format and originates with it. + +MIT License + +Copyright (c) 2024 winscripter + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Brutal.Localization/LString.Format.cs b/Brutal.Localization/LString.Format.cs new file mode 100644 index 0000000..c3b4491 --- /dev/null +++ b/Brutal.Localization/LString.Format.cs @@ -0,0 +1,72 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Brutal.Localization; + +public partial class LString +{ + /// + /// Takes a single argument and formats it into the buffer of a DefaultInterpolatedStringHandler + /// + /// The object to format. + /// The index of the replaceable the argument is for. + /// The interpolated string handler to use for formatting. + /// The type of arg. + /// Thrown if the replacement type of the argument is not handled. + private bool TryFormatReplacement( + T arg, + int replaceableIndex, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + var localizedSpan = _localizedString.AsSpan(); + var replacementsSpan = CollectionsMarshal.AsSpan(_replacements); + ref var replacement = ref replacementsSpan[replaceableIndex]; + + var success = true; + if (replacement.HasPrecedingLiteral) + success &= h.AppendFormatted( + localizedSpan[ + replacement.LiteralRange.Start.Value..replacement.LiteralRange.End.Value + ] + ); + + return success & h.AppendFormatted(arg); + } + + /// + /// Takes a single argument and formats it into the buffer of a DefaultInterpolatedStringHandler + /// + /// The object to format. + /// The index of the replaceable the argument is for. + /// The interpolated string handler to use for formatting. + /// The type of arg. + /// Thrown if the replacement type of the argument is not handled. + private void FormatReplacement( + in T arg, + int replaceableIndex, + ref DefaultInterpolatedStringHandler h + ) + { + var localizedSpan = _localizedString.AsSpan(); + var replacementsSpan = CollectionsMarshal.AsSpan(_replacements); + ref var replacement = ref replacementsSpan[replaceableIndex]; + + if (replacement.HasPrecedingLiteral) + h.AppendFormatted( + localizedSpan[ + replacement.LiteralRange.Start.Value..replacement.LiteralRange.End.Value + ] + ); + + h.AppendFormatted(arg); + } + + private void ValidateReplacementCount(int numberOfPassedArguments) + { + if (_replacements.Count != numberOfPassedArguments) + throw new ArgumentException( + $"Incorrect number of replacement values passed to LString {Id}. expected:{_replacements.Count} passed:{numberOfPassedArguments}" + ); + } +} diff --git a/Brutal.Localization/LString.Format.gen.cs b/Brutal.Localization/LString.Format.gen.cs new file mode 100644 index 0000000..ac7672e --- /dev/null +++ b/Brutal.Localization/LString.Format.gen.cs @@ -0,0 +1,3117 @@ +/* + This file is generated by the T4 generator. + See LString.Format.gen.tt + + IBufferWriter notes, and why didn't we use that? + + It forces a managed API via GetMemory. + It only has "give me memory of X size or greater" and "Give me at least 1". It cannot + do "Give me X or smaller" which is more useful for LString so we can be more confident + in a single TryWrite() call being enough. + GetSpan can't return an empty span to say "no memory", so all we can do is throw if out of buffer. + + We want to ask for some size we think is enough (e.g. 128 elements) but not run risk of choosing too low. If there's not enough, a smaller might be OK + but GetSpan can only throw in this case. We could start small and go up and it's possible we only need a tiny amount, say 4 characters, but what smallest size do we choose to start + because we don't want to TryWrite and request multiple times. + +*/ +using System.Diagnostics; +using System.Runtime.CompilerServices; +using Brutal.Localization.FixedBuffers; + +namespace Brutal.Localization; + +public partial class LString +{ + /// + /// Format the localized version of an LString that has 0 replacement variables. + /// + /// The localized string + /// Thrown if the template string does not have 0 replacement variables. + public string Format() + { + ValidateReplacementCount(0); + + return _localizedString; + } + + /// + /// Format the localized version of an LString that has 0 replacement variables, into an . + /// + /// The span to format the LString to. + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 0 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format(TWriter spanWriter) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(0); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= h.AppendFormatted(_localizedString); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + /// + /// Format the localized version of an LString that has 1 replacement variable. + /// + /// The argument to format into replacement variable #1 + /// Type of replacement1 + /// The localized string + /// Thrown if the template string does not have 1 replacement variable. + public string Format(in T0 replacement1) + { + ValidateReplacementCount(1); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement1(0, in replacement1, ref h); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 1 replacement variable, into an . + /// + /// The argument to format into replacement variable #1 + /// The span to format the LString to. + /// Type of replacement1 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 1 replacement variable or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format(TWriter spanWriter, in T0 replacement1) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(1); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement1(0, in replacement1, ref h); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement1( + int replacementIndex, + ref readonly T0 replacement1, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 1); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{1} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement1( + int replacementIndex, + ref readonly T0 replacement1, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 1); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{1} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 2 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// Type of replacement1 + /// Type of replacement2 + /// The localized string + /// Thrown if the template string does not have 2 replacement variables. + public string Format(in T0 replacement1, in T1 replacement2) + { + ValidateReplacementCount(2); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement2(0, in replacement1, in replacement2, ref h); + FormatReplacement2(1, in replacement1, in replacement2, ref h); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 2 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 2 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(2); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement2(0, in replacement1, in replacement2, ref h); + success &= TryFormatReplacement2(1, in replacement1, in replacement2, ref h); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement2( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 2); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{2} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement2( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 2); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{2} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 3 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// The localized string + /// Thrown if the template string does not have 3 replacement variables. + public string Format(in T0 replacement1, in T1 replacement2, in T2 replacement3) + { + ValidateReplacementCount(3); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement3(0, in replacement1, in replacement2, in replacement3, ref h); + FormatReplacement3(1, in replacement1, in replacement2, in replacement3, ref h); + FormatReplacement3(2, in replacement1, in replacement2, in replacement3, ref h); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 3 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 3 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(3); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement3( + 0, + in replacement1, + in replacement2, + in replacement3, + ref h + ); + success &= TryFormatReplacement3( + 1, + in replacement1, + in replacement2, + in replacement3, + ref h + ); + success &= TryFormatReplacement3( + 2, + in replacement1, + in replacement2, + in replacement3, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement3( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 3); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{3} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement3( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 3); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{3} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 4 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// The localized string + /// Thrown if the template string does not have 4 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4 + ) + { + ValidateReplacementCount(4); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement4( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + FormatReplacement4( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + FormatReplacement4( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + FormatReplacement4( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 4 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 4 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(4); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement4( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + success &= TryFormatReplacement4( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + success &= TryFormatReplacement4( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + success &= TryFormatReplacement4( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement4( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 4); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{4} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement4( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 4); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{4} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 5 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// The localized string + /// Thrown if the template string does not have 5 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5 + ) + { + ValidateReplacementCount(5); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement5( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + FormatReplacement5( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + FormatReplacement5( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + FormatReplacement5( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + FormatReplacement5( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 5 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 5 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(5); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement5( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + success &= TryFormatReplacement5( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + success &= TryFormatReplacement5( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + success &= TryFormatReplacement5( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + success &= TryFormatReplacement5( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement5( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 5); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + case 4: + return TryFormatReplacement(replacement5, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{5} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement5( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 5); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + case 4: + FormatReplacement(replacement5, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{5} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 6 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// The localized string + /// Thrown if the template string does not have 6 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6 + ) + { + ValidateReplacementCount(6); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement6( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + FormatReplacement6( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + FormatReplacement6( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + FormatReplacement6( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + FormatReplacement6( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + FormatReplacement6( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 6 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 6 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(6); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement6( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + success &= TryFormatReplacement6( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + success &= TryFormatReplacement6( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + success &= TryFormatReplacement6( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + success &= TryFormatReplacement6( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + success &= TryFormatReplacement6( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement6( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 6); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + case 4: + return TryFormatReplacement(replacement5, replacementIndex, ref h); + case 5: + return TryFormatReplacement(replacement6, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{6} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement6( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 6); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + case 4: + FormatReplacement(replacement5, replacementIndex, ref h); + return; + case 5: + FormatReplacement(replacement6, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{6} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 7 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// The localized string + /// Thrown if the template string does not have 7 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7 + ) + { + ValidateReplacementCount(7); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement7( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + FormatReplacement7( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + FormatReplacement7( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + FormatReplacement7( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + FormatReplacement7( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + FormatReplacement7( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + FormatReplacement7( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 7 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 7 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(7); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement7( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + success &= TryFormatReplacement7( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + success &= TryFormatReplacement7( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + success &= TryFormatReplacement7( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + success &= TryFormatReplacement7( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + success &= TryFormatReplacement7( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + success &= TryFormatReplacement7( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement7( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 7); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + case 4: + return TryFormatReplacement(replacement5, replacementIndex, ref h); + case 5: + return TryFormatReplacement(replacement6, replacementIndex, ref h); + case 6: + return TryFormatReplacement(replacement7, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{7} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement7( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 7); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + case 4: + FormatReplacement(replacement5, replacementIndex, ref h); + return; + case 5: + FormatReplacement(replacement6, replacementIndex, ref h); + return; + case 6: + FormatReplacement(replacement7, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{7} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 8 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The argument to format into replacement variable #8 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// Type of replacement8 + /// The localized string + /// Thrown if the template string does not have 8 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7, + in T7 replacement8 + ) + { + ValidateReplacementCount(8); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement8( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + FormatReplacement8( + 7, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 8 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The argument to format into replacement variable #8 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// Type of replacement8 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 8 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7, + in T7 replacement8 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(8); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement8( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + success &= TryFormatReplacement8( + 7, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement8( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref readonly T7 replacement8, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 8); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + case 4: + return TryFormatReplacement(replacement5, replacementIndex, ref h); + case 5: + return TryFormatReplacement(replacement6, replacementIndex, ref h); + case 6: + return TryFormatReplacement(replacement7, replacementIndex, ref h); + case 7: + return TryFormatReplacement(replacement8, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{8} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement8( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref readonly T7 replacement8, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 8); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + case 4: + FormatReplacement(replacement5, replacementIndex, ref h); + return; + case 5: + FormatReplacement(replacement6, replacementIndex, ref h); + return; + case 6: + FormatReplacement(replacement7, replacementIndex, ref h); + return; + case 7: + FormatReplacement(replacement8, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{8} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 9 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The argument to format into replacement variable #8 + /// The argument to format into replacement variable #9 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// Type of replacement8 + /// Type of replacement9 + /// The localized string + /// Thrown if the template string does not have 9 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7, + in T7 replacement8, + in T8 replacement9 + ) + { + ValidateReplacementCount(9); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement9( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 7, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + FormatReplacement9( + 8, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 9 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The argument to format into replacement variable #8 + /// The argument to format into replacement variable #9 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// Type of replacement8 + /// Type of replacement9 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 9 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7, + in T7 replacement8, + in T8 replacement9 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(9); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement9( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 7, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + success &= TryFormatReplacement9( + 8, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement9( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref readonly T7 replacement8, + ref readonly T8 replacement9, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 9); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + case 4: + return TryFormatReplacement(replacement5, replacementIndex, ref h); + case 5: + return TryFormatReplacement(replacement6, replacementIndex, ref h); + case 6: + return TryFormatReplacement(replacement7, replacementIndex, ref h); + case 7: + return TryFormatReplacement(replacement8, replacementIndex, ref h); + case 8: + return TryFormatReplacement(replacement9, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{9} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement9( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref readonly T7 replacement8, + ref readonly T8 replacement9, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 9); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + case 4: + FormatReplacement(replacement5, replacementIndex, ref h); + return; + case 5: + FormatReplacement(replacement6, replacementIndex, ref h); + return; + case 6: + FormatReplacement(replacement7, replacementIndex, ref h); + return; + case 7: + FormatReplacement(replacement8, replacementIndex, ref h); + return; + case 8: + FormatReplacement(replacement9, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{9} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + /// + /// Format the localized version of an LString that has 10 replacement variables. + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The argument to format into replacement variable #8 + /// The argument to format into replacement variable #9 + /// The argument to format into replacement variable #10 + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// Type of replacement8 + /// Type of replacement9 + /// Type of replacement10 + /// The localized string + /// Thrown if the template string does not have 10 replacement variables. + public string Format( + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7, + in T7 replacement8, + in T8 replacement9, + in T9 replacement10 + ) + { + ValidateReplacementCount(10); + + Span span = stackalloc char[LStringGlobalOptions.FormatInitialSpanLength]; + var h = new DefaultInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + null, + span + ); + + FormatReplacement10( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 7, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 8, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + FormatReplacement10( + 9, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + return h.ToStringAndClear(); + } + + /// + /// Format the localized version of an LString that has 10 replacement variables, into an . + /// + /// The argument to format into replacement variable #1 + /// The argument to format into replacement variable #2 + /// The argument to format into replacement variable #3 + /// The argument to format into replacement variable #4 + /// The argument to format into replacement variable #5 + /// The argument to format into replacement variable #6 + /// The argument to format into replacement variable #7 + /// The argument to format into replacement variable #8 + /// The argument to format into replacement variable #9 + /// The argument to format into replacement variable #10 + /// The span to format the LString to. + /// Type of replacement1 + /// Type of replacement2 + /// Type of replacement3 + /// Type of replacement4 + /// Type of replacement5 + /// Type of replacement6 + /// Type of replacement7 + /// Type of replacement8 + /// Type of replacement9 + /// Type of replacement10 + /// The IFixedBufferWriter to write the output to. + /// spanWriter with its contents changed to the formatted LString. + /// Thrown if the template string does not have 10 replacement variables or spanWriter does not have enough space to hold the formatted string. + /// Formatting to an initially requests a Span of length from the + /// passed in and attempts to format into that. If there is not enough space it will increase its + /// requested Span length and repeat. This continues until it succeeds in formatting or runs out of buffer storage. + /// You can change the value of but if it's too small, Format may try to format more times than you expect. + /// If you will be formatting very large LStrings, then increase this value and ensure that your can provide + /// a Span of at least that length. + /// + public Span Format( + TWriter spanWriter, + in T0 replacement1, + in T1 replacement2, + in T2 replacement3, + in T3 replacement4, + in T4 replacement5, + in T5 replacement6, + in T6 replacement7, + in T7 replacement8, + in T8 replacement9, + in T9 replacement10 + ) + where TWriter : IFixedBufferWriter, allows ref struct + { + ValidateReplacementCount(10); + var spanLengthToRequest = LStringGlobalOptions.FormatInitialSpanLength; + + while (true) + { + if (!spanWriter.TryGetSpan(spanLengthToRequest, out var span) && span.IsEmpty) + throw new ArgumentException($"Out of buffer."); + + var gotWhatWeRequested = span.Length >= spanLengthToRequest; + + var h = new MemoryExtensions.TryWriteInterpolatedStringHandler( + _literalCharCount, + _replacements.Count, + span, + out var mightBeAbleToFit + ); + + if (!mightBeAbleToFit) + ThrowOutOfBufferException(span); + + var success = true; + success &= TryFormatReplacement10( + 0, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 1, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 2, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 3, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 4, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 5, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 6, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 7, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 8, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + success &= TryFormatReplacement10( + 9, + in replacement1, + in replacement2, + in replacement3, + in replacement4, + in replacement5, + in replacement6, + in replacement7, + in replacement8, + in replacement9, + in replacement10, + ref h + ); + + if (_endLiteralStart < _localizedString.Length) + success &= h.AppendFormatted(_localizedString.AsSpan()[_endLiteralStart..]); + + if (success) + { + var elementsWritten = h.ElementsWritten(); + spanWriter.Advance(elementsWritten); + return span[..elementsWritten]; + } + + if (!gotWhatWeRequested) + ThrowOutOfBufferException(span); + + spanLengthToRequest *= 2; + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private bool TryFormatReplacement10( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref readonly T7 replacement8, + ref readonly T8 replacement9, + ref readonly T9 replacement10, + ref MemoryExtensions.TryWriteInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 10); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + return TryFormatReplacement(replacement1, replacementIndex, ref h); + case 1: + return TryFormatReplacement(replacement2, replacementIndex, ref h); + case 2: + return TryFormatReplacement(replacement3, replacementIndex, ref h); + case 3: + return TryFormatReplacement(replacement4, replacementIndex, ref h); + case 4: + return TryFormatReplacement(replacement5, replacementIndex, ref h); + case 5: + return TryFormatReplacement(replacement6, replacementIndex, ref h); + case 6: + return TryFormatReplacement(replacement7, replacementIndex, ref h); + case 7: + return TryFormatReplacement(replacement8, replacementIndex, ref h); + case 8: + return TryFormatReplacement(replacement9, replacementIndex, ref h); + case 9: + return TryFormatReplacement(replacement10, replacementIndex, ref h); + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{10} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + private void FormatReplacement10( + int replacementIndex, + ref readonly T0 replacement1, + ref readonly T1 replacement2, + ref readonly T2 replacement3, + ref readonly T3 replacement4, + ref readonly T4 replacement5, + ref readonly T5 replacement6, + ref readonly T6 replacement7, + ref readonly T7 replacement8, + ref readonly T8 replacement9, + ref readonly T9 replacement10, + ref DefaultInterpolatedStringHandler h + ) + { + Debug.Assert(_replacements.Count == 10); + switch (_replacements[replacementIndex].TemplateReplacementIndex) + { + case 0: + FormatReplacement(replacement1, replacementIndex, ref h); + return; + case 1: + FormatReplacement(replacement2, replacementIndex, ref h); + return; + case 2: + FormatReplacement(replacement3, replacementIndex, ref h); + return; + case 3: + FormatReplacement(replacement4, replacementIndex, ref h); + return; + case 4: + FormatReplacement(replacement5, replacementIndex, ref h); + return; + case 5: + FormatReplacement(replacement6, replacementIndex, ref h); + return; + case 6: + FormatReplacement(replacement7, replacementIndex, ref h); + return; + case 7: + FormatReplacement(replacement8, replacementIndex, ref h); + return; + case 8: + FormatReplacement(replacement9, replacementIndex, ref h); + return; + case 9: + FormatReplacement(replacement10, replacementIndex, ref h); + return; + default: + throw new ArgumentOutOfRangeException( + $"ArgumentIndex out of range. maximum:{10} provided:{_replacements[replacementIndex].TemplateReplacementIndex}" + ); + } + } + + private static void ThrowOutOfBufferException(Span span) + { + throw new ArgumentException( + $"Out of buffer. {span.Length} elements was too small for string interpolation." + ); + } + + private const int MaxReplacementCount = 10; +} diff --git a/Brutal.Localization/LString.cs b/Brutal.Localization/LString.cs new file mode 100644 index 0000000..ea202df --- /dev/null +++ b/Brutal.Localization/LString.cs @@ -0,0 +1,209 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; + +namespace Brutal.Localization; + +/// +/// A class that represents a localizable string. +/// +public partial class LString +{ + /// + /// Create a localizable string from a template string. The format of the template will depend on the Regex assigned + /// to ReplacementPattern. + /// Upon creation the LString is NOT localized. Therefore, calling any of the + /// methods before it has been localized will return the templateString. + /// + /// An immutable, unique id that identifies this LString. + /// The string to use as a template for the localized string. Can be empty. + /// The Regex to use to match replacement variables. If null, uses + public LString(LStringId id, string templateString, Regex? replacementPattern = null) + { + Id = id; + _replacements = new List(MaxReplacementCount); + _templateString = templateString; + _replacementPattern = replacementPattern ?? DefaultOptions.ReplacementPattern(); + _localizedString = templateString; + BuildReplacements(true); + } + + /// + /// Thrown if id is null or empty. + public LString(string id, string templateString, Regex? replacementPattern = null) + : this(LStringId.From(id), templateString, replacementPattern) { } + + /// + /// Returns the unique id of the LString. + /// + public LStringId Id { get; } + + /// + /// Returns the string used as the template string when creating this instance + /// of LString. + /// + public string Template => _templateString; + + /// + /// Returns the current localized string for this LString or returns Template if this LString has not been localized yet. + /// + public string Localized => _localizedString; + + /// + /// Localizes the LString with specified content. + /// localizedString is validated to ensure it meets the criteria of the template string. + /// e.g., it must have the same number and names of replacement variables. + /// + /// The localized version of the template string + /// Thrown if localizedString does not have the correct number and names of replacement variables. + /// Thrown if localizedString is null. + public void Localize(string localizedString) + { + Update(localizedString); + } + + /// + /// Clears the localized version of the string, thereby returning it + /// to its template string. + /// + public void RemoveLocalization() + { + Update(_templateString); + } + + /// + /// Returns the Regex used by this LString to match replacement variables. + /// + public Regex ReplacementPattern => _replacementPattern; + + #region Private + + [MemberNotNull(nameof(_localizedString))] + private void Update(string localizedString) + { + _localizedString = + localizedString ?? throw new ArgumentNullException(nameof(localizedString)); + BuildReplacements(false); + } + + private void BuildReplacements(bool isInitialBuild) + { + _literalCharCount = 0; + _endLiteralStart = 0; + var matches = _replacementPattern.EnumerateMatches(_localizedString); + var nextPossibleLiteralStart = 0; + ushort replacementCount = 0; + foreach (var match in matches) + { + if (!isInitialBuild && replacementCount >= _replacements.Count) + throw IncorrectReplacementCountException(Template, _localizedString); + + var matchPos = match.Index; + var templateReplacementIndex = isInitialBuild + ? replacementCount + : GetTemplateStringReplacementIndex( + _localizedString.AsSpan()[matchPos..(matchPos + match.Length)] + ); + + _literalCharCount += matchPos - nextPossibleLiteralStart; + var replacementRange = new Range(matchPos, matchPos + match.Length); + var literalRange = + matchPos > nextPossibleLiteralStart + ? new Range(nextPossibleLiteralStart, matchPos) + : default; + + if (isInitialBuild) + _replacements.Add( + new Replacement() + { + TemplateRange = replacementRange, + LiteralRange = literalRange, + TemplateReplacementIndex = templateReplacementIndex, + } + ); + else + _replacements[replacementCount] = _replacements[replacementCount] with + { + LiteralRange = literalRange, + TemplateReplacementIndex = templateReplacementIndex, + }; + + nextPossibleLiteralStart = replacementRange.End.Value; + ++replacementCount; + } + + if (!isInitialBuild && replacementCount != _replacements.Count) + throw IncorrectReplacementCountException(Template, _localizedString); + + _endLiteralStart = + nextPossibleLiteralStart == 0 ? _localizedString.Length : nextPossibleLiteralStart; + } + + private ushort GetTemplateStringReplacementIndex(ReadOnlySpan replacementText) + { + for ( + ushort existingReplacementIndex = 0; + existingReplacementIndex < _replacements.Count; + ++existingReplacementIndex + ) + { + var templateReplacement = Template.AsSpan()[ + _replacements[existingReplacementIndex].TemplateRange + ]; + if (templateReplacement.SequenceEqual(replacementText)) + return existingReplacementIndex; + } + throw UnknownReplacementVariableException(Template, replacementText); + } + + private static ArgumentException UnknownReplacementVariableException( + string template, + ReadOnlySpan replacementText + ) + { + return new ArgumentException( + $"Unknown replacement variable: {replacementText}. Did not exist in LString {template}" + ); + } + + private static Exception IncorrectReplacementCountException( + string template, + string localizedString + ) + { + return new ArgumentException( + $"Incorrect replacement count for localized string {localizedString}. Template was {template}" + ); + } + + private readonly struct Replacement + { + /// + /// Original Range within the template string of this Replacement. Retrieve the template string with + /// the property. + /// + public required Range TemplateRange { get; init; } + + /// + /// The index of the replacement inside the original Template string. + /// + public required ushort TemplateReplacementIndex { get; init; } + + /// + /// Returns whether this replacement has a preceding literal. + /// + public bool HasPrecedingLiteral => LiteralRange.End.Value > LiteralRange.Start.Value; + public required Range LiteralRange { get; init; } // The range of any literal preceding this Replacement + } + + private readonly string _templateString; // The original template string + private string _localizedString; // localized template string + + private readonly List _replacements; + private int _endLiteralStart; // if _endLiteralStart < length of _localizedString, there's a literal past the last replacement (Or _localizedString only a literal) + private int _literalCharCount; // How many literal characters in the localized string? The interpolated string handlers need this. + + private readonly Regex _replacementPattern; + #endregion +} diff --git a/Brutal.Localization/LStringGlobalOptions.cs b/Brutal.Localization/LStringGlobalOptions.cs new file mode 100644 index 0000000..d75d58f --- /dev/null +++ b/Brutal.Localization/LStringGlobalOptions.cs @@ -0,0 +1,15 @@ +namespace Brutal.Localization; + +/// +/// Global options used by LString. +/// +public static class LStringGlobalOptions +{ + /// + /// The initial span length that any of the methods will request from the . + /// For more information on how this value is used see . + /// + /// + public static ElementCount FormatInitialSpanLength { get; set; } = + DefaultOptions.FormatInitialSpanLength; +} diff --git a/Brutal.Localization/LStringId.cs b/Brutal.Localization/LStringId.cs new file mode 100644 index 0000000..11415b8 --- /dev/null +++ b/Brutal.Localization/LStringId.cs @@ -0,0 +1,54 @@ +namespace Brutal.Localization; + +/// +/// Strongly typed id for a LString created from a string or ReadOnlySpan{char}. +/// LStringId objects are case-sensitive. +/// The strings or ReadOnlySpans passed to the constructor cannot be null or empty. +/// +public readonly record struct LStringId +{ + /// + /// Helper to create a LStringId from a string. + /// + /// The case-sensitive string version of the id. + /// The created LStringId. + /// Thrown if id is null or empty. + public static LStringId From(string id) + { + return new LStringId(id); + } + + /// + /// Create a LStringId from a ReadOnlySpan. + /// + /// NOTE: LStringId objects are case-insensitive. + /// The ReadOnlySpan of chars of the LStringId to create. + /// Thrown if the ReadOnlySpan is empty. + public LStringId(ReadOnlySpan id) + { + if (id.IsEmpty) + throw new ArgumentException($"Invalid LStringId '{id}'", nameof(id)); + + _value = id.ToString(); + } + + /// + /// Create a LStringId from a string. + /// + /// The case-sensitive string to use for the LStringId. + /// Thrown if id is null or empty. + public LStringId(string id) + { + if (string.IsNullOrEmpty(id)) + throw new ArgumentException($"Invalid LStringId '{id}'"); + + _value = id; + } + + /// + /// The string value of the LStringId. + /// + public override string ToString() => _value; + + private readonly string _value; +} diff --git a/Brutal.Localization/LStrings.cs b/Brutal.Localization/LStrings.cs new file mode 100644 index 0000000..50e45e1 --- /dev/null +++ b/Brutal.Localization/LStrings.cs @@ -0,0 +1,96 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; + +namespace Brutal.Localization; + +/// +/// LStrings is a convenience static wrapper around a singleton-like instance of LocalizedStrings. +/// For use if you don't like typing LocalizedStrings.Shared.Method(). +/// Investigation showed that this redirection does not introduce extra jumps and returns. +/// +// TODO:AKB - Add analyser to check all methods from LocalizedStrings are in here as well. I did add a UnitTest to check for signatures which is a start. +public static class LStrings +{ + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLocalizedStringProvider( + LocalizedStrings.GetLocalizedStringDelegate stringProvider + ) => Shared.SetLocalizedStringProvider(stringProvider); + + /// + /// Returns the delegate that is currently providing localized versions of LString instances. + /// + /// The or null if one is not set. + public static LocalizedStrings.GetLocalizedStringDelegate? LocalizedStringProvider => + Shared.LocalizedStringProvider; + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveLocalizedStringProvider() => Shared.RemoveLocalizedStringProvider(); + + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static LString Create(string id, string templateString) => + Shared.Create(LStringId.From(id), templateString); + + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static LString Create(LStringId id, string templateString) => + Shared.Create(id, templateString); + + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static LString GetOrCreate(LStringId id, string templateString) => + Shared.GetOrCreate(id, templateString); + + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static LString GetOrCreate(string id, string templateString) => + Shared.GetOrCreate(LStringId.From(id), templateString); + + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool Remove(LStringId id) => Shared.Remove(id); + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveAll() => Shared.RemoveAll(); + + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryGet(LStringId id, [NotNullWhen(true)] out LString? localizedString) => + Shared.TryGet(id, out localizedString); + + /// + /// + /// + public static IReadOnlyDictionary LStringInstances => + Shared.LStringInstances; + + private static readonly LocalizedStrings Shared = new(LStringsOptions.ReplacementPattern); +} diff --git a/Brutal.Localization/LStringsOptions.cs b/Brutal.Localization/LStringsOptions.cs new file mode 100644 index 0000000..9fbf08d --- /dev/null +++ b/Brutal.Localization/LStringsOptions.cs @@ -0,0 +1,16 @@ +using System.Text.RegularExpressions; + +namespace Brutal.Localization; + +/// +/// Options used by the static wrapper, . Set these options before the first instance of an is +/// created through with . +/// +public static class LStringsOptions +{ + /// + /// The Regex pattern to use to match replacement variables in localizable strings. If you wish to use a different pattern + /// set this field before creating instances. + /// + public static Regex ReplacementPattern = DefaultOptions.ReplacementPattern(); +} diff --git a/Brutal.Localization/LocalizedStrings.cs b/Brutal.Localization/LocalizedStrings.cs new file mode 100644 index 0000000..9465a9d --- /dev/null +++ b/Brutal.Localization/LocalizedStrings.cs @@ -0,0 +1,216 @@ +using System.Diagnostics.CodeAnalysis; +using System.Text.RegularExpressions; +using Brutal.Logging; + +namespace Brutal.Localization; + +/// +/// Class for managing localization of strings via LString instances. You can create multiple instances of +/// LocalizedStrings and each will act without interfering with any other instances. +/// Typically, however, you will use a single static instance which can be used simply by calling the static +/// methods in LStrings. The LStrings methods all simply redirect to a shared instance of LocalizedStrings. +/// +public class LocalizedStrings +{ + /// + /// A delegate that takes a and return a localized version of that LString's template string. + /// In typical use, this delegate acts as a language provider. + /// Your implementation of must set localizedTemplateString to a non-null + /// string if you return true (Indicating that a string was found). + /// + /// The LString whose localized string has been requested. + /// The out variable that is set if this method returns true. + /// true if the delegate found and returned a string. Otherwise, false. + public delegate bool GetLocalizedStringDelegate( + LString lString, + [NotNullWhen(true)] out string? localizedTemplateString + ); + + /// + /// Construct a new instance of LocalizedStrings. Each instance is its own string localization environment. + /// + /// The Regex to use to match replacement variables in LStrings created by this LocalizedStrings instance. If null, uses + public LocalizedStrings(Regex? replacementPattern = null) + { + _lStringProvider = null; + _stringInstances = new(); + _replacementPattern = replacementPattern ?? DefaultOptions.ReplacementPattern(); + } + + /// + /// Set the GetLocalizedStringDelegate that the Brutal localization system will use to look up localized strings. This function + /// will also localize all existing LString instances with the new provider. + /// + /// + /// A that the localization system will use to look up strings. + public void SetLocalizedStringProvider(GetLocalizedStringDelegate stringProvider) + { + if (stringProvider is null) + throw new ArgumentNullException(nameof(stringProvider), @"Null stringProvider"); + + lock (_lock) + { + _lStringProvider = stringProvider; + foreach (var (key, lString) in _stringInstances) + { + if (!_lStringProvider(lString, out var localizedString)) + { + lString.RemoveLocalization(); + continue; + } + + lString.Localize(localizedString); + } + } + } + + /// + /// Returns the delegate that is currently providing localized versions of LString instances. + /// + /// The or null if one is not set. + public GetLocalizedStringDelegate? LocalizedStringProvider => _lStringProvider; + + /// + /// Removes the provider of localized strings. After calling + /// LString instances will return their template string from calls to Format. + /// + public void RemoveLocalizedStringProvider() + { + lock (_lock) + { + _lStringProvider = null; + foreach (var (_, lString) in _stringInstances) + lString.RemoveLocalization(); + } + } + + /// + /// Instantiates a new, unique LString instance with a template string. If there is a string provider + /// currently set, the LString will also be localized to the current language. + /// + /// A string representing a unique of the LString to create. + /// The string that defines the non-localized string contents + /// The newly created LString. + /// Thrown if a LString with the same id already exists. + /// Thrown if templateString is null. + public LString Create(string id, string templateString) + { + return Create(LStringId.From(id), templateString); + } + + /// + /// Instantiates a new, unique LString instance with a template string. If there is a GetLocalizedStringDelegate + /// currently set, the LString will also be localized to the current language with a language string with the same id. + /// + /// The unique of the LString to create. + /// The string that defines the non-localized string contents + /// The newly created LString. + /// Thrown if a LString with the same id already exists. + /// Thrown if templateString is null. + public LString Create(LStringId id, string templateString) + { + if (templateString is null) + throw new ArgumentNullException(nameof(templateString), @"Null template string"); + + lock (_lock) + { + var lString = new LString(id, templateString, _replacementPattern); + if (!_stringInstances.TryAdd(lString.Id, lString)) + throw new ArgumentException($"Duplicate LString with id {id}"); + + if (!HasStringProvider) + return lString; + + if (!_lStringProvider!(lString, out var localizedString)) + { + DefaultCategory.Log.Debug($"Missing string with id {lString.Id}"); + return lString; + } + + lString.Localize(localizedString); + return lString; + } + } + + /// + /// Attempts to get a LString with the given id. If it doesn't exist, it will be created and returned. + /// + /// The of the LString to find or create. + /// The templateString to use for the new LString if a new LString is created. + /// The LString instance found or created. + public LString GetOrCreate(LStringId id, string templateString) + { + lock (_lock) + { + if (TryGet(id, out var localizedString)) + return localizedString; + + return Create(id, templateString); + } + } + + /// + public LString GetOrCreate(string id, string templateString) + { + return GetOrCreate(LStringId.From(id), templateString); + } + + /// + /// Removes a LString from the set of localized strings. + /// + /// The identifier of the LString to remove. + /// true if the LString was successfully removed; otherwise, false. + public bool Remove(LStringId id) + { + lock (_lock) + { + return _stringInstances.Remove(id); + } + } + + /// + /// Removes all LString instances. + /// + public void RemoveAll() + { + lock (_lock) + { + _stringInstances.Clear(); + } + } + + /// + /// Attempt to get a LString with the given id and returns whether it was found. + /// + /// The of the LString to get. + /// The LString that is set, if found. Otherwise undefined. + /// True if the LStringId was found. Otherwise, false. + public bool TryGet(LStringId id, [NotNullWhen(true)] out LString? localizedString) + { + lock (_lock) + { + return _stringInstances.TryGetValue(id, out localizedString); + } + } + + /// + /// Returns an IReadOnlyDictionary of all LString instances created through Brutal.Localization. + /// Instances of LString created manually (via new()) are not included in here. + /// + /// This is a lightweight call and does not copy the set of strings. However, the returned reference + /// is NOT thread-safe. If the underlying collection is modified (e.g., with calls to Create methods of ) then the underlying collection + /// will be modified and will generate errors if you are iterating the collection at the time. + /// + public IReadOnlyDictionary LStringInstances => + _stringInstances.AsReadOnly(); + + #region Private + private bool HasStringProvider => _lStringProvider is not null; + + private GetLocalizedStringDelegate? _lStringProvider; + private readonly Dictionary _stringInstances; + private readonly Lock _lock = new(); + private readonly Regex _replacementPattern; + + #endregion +} diff --git a/Brutal.Localization/Resources/ResX.NET/ResXBadRootTagException.cs b/Brutal.Localization/Resources/ResX.NET/ResXBadRootTagException.cs new file mode 100644 index 0000000..6061814 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXBadRootTagException.cs @@ -0,0 +1,28 @@ +namespace Brutal.Localization.ResX +{ + /// + /// Thrown when the root tag of the ResX file is not <root>. + /// + public class ResXBadRootTagException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public ResXBadRootTagException() { } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message + public ResXBadRootTagException(string message) + : base(message) { } + + /// + /// Initializes a new instance of the class. + /// + /// Exception messsage + /// Inner exception (if any.) + public ResXBadRootTagException(string message, Exception innerException) + : base(message, innerException) { } + } +} diff --git a/Brutal.Localization/Resources/ResX.NET/ResXConvert.cs b/Brutal.Localization/Resources/ResX.NET/ResXConvert.cs new file mode 100644 index 0000000..bfdf328 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXConvert.cs @@ -0,0 +1,180 @@ +using System.Text; +using System.Text.Encodings.Web; +using System.Text.Json; + +namespace Brutal.Localization.ResX +{ + /// + /// Converts ResX files to other formats. + /// + public static class ResXConvert + { + private static readonly JsonSerializerOptions s_indentedWriter = new() + { + WriteIndented = true, + }; + private static readonly JsonWriterOptions s_unsafeEncoder = new() + { + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, + }; + private static readonly JsonWriterOptions s_defaultEncoder = new() + { + Encoder = JavaScriptEncoder.Default, + }; + + /// + /// Converts the ResX file to JSON. + /// + /// Input ResX file. + /// Set to true if ResX file may contain characters other than English. + /// Set to true if you don't want the output JSON file to be minified. + /// JSON representation of the ResX file. + public static string ToJson(ResXFile resx, bool unsafeEncoder = true, bool prettify = false) + { + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter( + stream, + unsafeEncoder ? s_unsafeEncoder : s_defaultEncoder + ); + + writer.WriteStartArray(); + + foreach (var data in resx.DataDictionary.Values) + { + writer.WriteStartObject(); + + writer.WriteString("name"u8, data.Name); + writer.WriteString("value"u8, data.Value); + writer.WriteString("comment"u8, data.Comment); + + writer.WriteEndObject(); + } + + writer.WriteEndArray(); + writer.Flush(); + return JsonPrettify(Encoding.UTF8.GetString(stream.ToArray()), prettify); + } + + /// + /// Converts the ResX file to JSON, asynchronously. + /// + /// Input ResX file. + /// Set to true if ResX file may contain characters other than English. + /// Set to true if you don't want the output JSON file to be minified. + /// JSON representation of the ResX file. + public static async Task ToJsonAsync( + ResXFile resx, + bool unsafeEncoder = true, + bool prettify = false + ) + { + await using var stream = new MemoryStream(); + await using var writer = new Utf8JsonWriter( + stream, + unsafeEncoder ? s_unsafeEncoder : s_defaultEncoder + ); + + writer.WriteStartArray(); + + foreach (var data in resx.DataDictionary.Values) + { + writer.WriteStartObject(); + + writer.WriteString("name"u8, data.Name); + writer.WriteString("value"u8, data.Value); + writer.WriteString("comment"u8, data.Comment); + + writer.WriteEndObject(); + } + + writer.WriteEndArray(); + await writer.FlushAsync(); + return JsonPrettify(Encoding.UTF8.GetString(stream.ToArray()), prettify); + } + + /// + /// Converts the ResX file to Markdown. + /// + /// Input ResX file. + /// A Markdown representation of the ResX document. + public static string ToMarkdown(ResXFile resx) + { + var builder = new StringBuilder(); + builder.AppendLine("# Converted result from a ResX file"); + builder.AppendLine("*Auto-generated by ResXNET v1.0.0*"); + + foreach (var data in resx.DataDictionary.Values) + { + builder.AppendLine($"### {data.Name}"); + builder.AppendLine( + $"*Value*: **{data.Value}**; *comment*: **{data.Comment ?? "null"}**" + ); + } + + return builder.ToString(); + } + + /// + /// Converts the ResX file to C#. + /// + /// Input ResX file to process. + /// C# representation of all data fields of the ResX file. + public static string ToCSharp(ResXFile resx) + { + var builder = new StringBuilder(); + builder.AppendLine("internal class Class1"); + builder.AppendLine("{"); + foreach (var data in resx.DataDictionary.Values) + { + if (data.Comment != null) + { + builder.AppendLine(" /// "); + builder.AppendLine($" /// {data.Comment}"); + builder.AppendLine(" /// "); + } + string name = new( + Capitalize(data.Name) + .Where(ch => + ( + !char.IsWhiteSpace(ch) + && !char.IsPunctuation(ch) + && !char.IsControl(ch) + ) + || ch == '_' + ) + .ToArray() + ); + + builder.AppendLine($" public string {Capitalize(name)} = \"{data.Value}\";"); + } + return builder.ToString(); + } + + // source: + // https://stackoverflow.com/a/4405876/21072788 + // CC BY-SA 4.0 + private static string Capitalize(this string input) => + input switch + { + null => throw new ArgumentNullException(nameof(input)), + "" => throw new ArgumentException( + $"{nameof(input)} cannot be empty", + nameof(input) + ), + _ => string.Concat(input[0].ToString().ToUpper(), input.AsSpan(1)), + }; + + // source: https://stackoverflow.com/a/67928315/21072788 + // CC BY-SA 4.0 + private static string JsonPrettify(this string json, bool reallyPrettify = true) + { + if (!reallyPrettify) + { + return json; + } + + using var jDoc = JsonDocument.Parse(json); + return JsonSerializer.Serialize(jDoc, s_indentedWriter); + } + } +} diff --git a/Brutal.Localization/Resources/ResX.NET/ResXData.cs b/Brutal.Localization/Resources/ResX.NET/ResXData.cs new file mode 100644 index 0000000..b526212 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXData.cs @@ -0,0 +1,9 @@ +namespace Brutal.Localization.ResX; + +/// +/// Represents a single <data> tag in a text ResX file. +/// +/// Name of the data. +/// Value of the data. +/// Optional comment to go along with the data. +public record ResXData(string Name, string Value, string? Comment); diff --git a/Brutal.Localization/Resources/ResX.NET/ResXFile.RootHeader.cs b/Brutal.Localization/Resources/ResX.NET/ResXFile.RootHeader.cs new file mode 100644 index 0000000..07f7966 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXFile.RootHeader.cs @@ -0,0 +1,130 @@ +// NOTE: RootHeader is a multi-line verbatim literal, so its compiled value embeds the +// source file's line endings. It must stay LF to match the public API baseline - +// enforced by .gitattributes (*.cs text eol=lf). +namespace Brutal.Localization.ResX +{ + public partial class ResXFile + { + /// + /// The header of the <root> tag. + /// + public const string RootHeader = + @" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + +"; + } +} diff --git a/Brutal.Localization/Resources/ResX.NET/ResXFile.cs b/Brutal.Localization/Resources/ResX.NET/ResXFile.cs new file mode 100644 index 0000000..7d59048 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXFile.cs @@ -0,0 +1,184 @@ +using System.Text; +using System.Xml; +using System.Xml.Linq; + +namespace Brutal.Localization.ResX +{ + // The ResX reading and writing code is taken from a github project. It should be thought of as + // a temporary solution to reading and writing ResX files that support strings only. + // https://github.com/winscripter/resx-net + // The source code is under the MIT License. See the file ResX.Net.LICENSE under the Resources.ResX.NET folder. + + /// + /// Parses and builds a ResX file. This class cannot be inherited. + /// + /// + /// The code for ResX reading and writing is provided by github project https://github.com/winscripter/resx-net under + /// the following license. + /// + /// MIT License + /// + /// Copyright (c) 2024 winscripter + /// + /// Permission is hereby granted, free of charge, to any person obtaining a copy + /// of this software and associated documentation files (the "Software"), to deal + /// in the Software without restriction, including without limitation the rights + /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + /// copies of the Software, and to permit persons to whom the Software is + /// furnished to do so, subject to the following conditions: + /// + /// The above copyright notice and this permission notice shall be included in all + /// copies or substantial portions of the Software. + /// + /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + /// SOFTWARE. + /// + public sealed partial class ResXFile + { + /// + /// A list of descendant ResX data tags. + /// + /// inside an IResourceWriter etc. + public Dictionary DataDictionary { get; private set; } + + /// + /// Create a ResXFile instance and populate it with data from an IEnumerable. + /// + /// IEnumerable<> to populate with. + public ResXFile(IEnumerable dataList) + { + DataDictionary = dataList.ToDictionary(item => item.Name); + } + + /// + /// Create a ResXFile instance and populate it with data from Dictionary. + /// + /// Dictionary<string, > to populate with. + public ResXFile(Dictionary dataList) + { + DataDictionary = dataList; + } + + /// + /// Initializes a new instance of the class. + /// + public ResXFile() + : this(new List()) { } + + /// + /// Builds a ResX formatted string from the contents of the . + /// + /// string content of ResX. + public string Build() + { + var builder = new StringBuilder(); + builder.AppendLine(""); + builder.AppendLine(""); + + builder.AppendLine( + string.Join( + "\r\n", + RootHeader + .Split(["\r\n"], StringSplitOptions.None) + .Select(line => + { + var nestedBuilder = new StringBuilder(); + nestedBuilder.Append(" "); + nestedBuilder.Append(line); + return nestedBuilder.ToString(); + }) + ) + ); + + foreach (var data in DataDictionary.Values) + { + var dataElement = new XElement( + "data", + new XAttribute("name", data.Name), + new XAttribute(XNamespace.Xml + "space", "preserve"), + new XElement("value", data.Value) + ); + if (data.Comment is not null) + { + dataElement.Add(new XElement("comment", data.Comment)); + } + + builder.AppendLine(dataElement.ToString()); + } + + builder.AppendLine(""); + return builder.ToString(); + } + + /// + /// Parses the raw plain text of the ResX file into an enumerable of + /// . + /// + /// Input plain text of the ResX file. + /// An enumerable of . + /// In this method, thrown when the root tag is missing. + /// In this method, thrown when the root tag name is not "root". + /// In this method, thrown when the data tag does not have the required attribute. + /// In this method, thrown when the data tag does not have a child <value> tag. + public static Dictionary Parse(string rawText) + { + var rootTag = + XDocument.Parse(rawText).Root ?? throw new XmlException("Root tag is missing"); + if (!rootTag.Name.LocalName.Equals("root", StringComparison.CurrentCultureIgnoreCase)) + { + throw new ResXBadRootTagException( + $"Root tag of the ResX file is \"{rootTag.Name.LocalName}\", but expected \"root\"" + ); + } + + var resxData = new Dictionary(); + foreach (var descendant in rootTag.Elements()) + { + if ( + !descendant.Name.LocalName.Equals( + "data", + StringComparison.CurrentCultureIgnoreCase + ) + ) + { + continue; + } + + var nameAttribute = + descendant.Attribute("name")?.Value + ?? throw new ResXNoAttributeException("No attribute named \"name\""); + var value = + descendant + .Descendants() + .FirstOrDefault(tag => + tag.Name.LocalName.Equals( + "value", + StringComparison.CurrentCultureIgnoreCase + ) + ) + ?.Value + ?? throw new ResXNoValueException( + "Data does not have descendant element of type \"value\"" + ); + var comment = descendant + .Descendants() + .FirstOrDefault(tag => + tag.Name.LocalName.Equals( + "comment", + StringComparison.CurrentCultureIgnoreCase + ) + ) + ?.Value; + + resxData.Add(nameAttribute, new ResXData(nameAttribute, value, comment)); + } + + return resxData; + } + } +} diff --git a/Brutal.Localization/Resources/ResX.NET/ResXNoAttributeException.cs b/Brutal.Localization/Resources/ResX.NET/ResXNoAttributeException.cs new file mode 100644 index 0000000..4f37013 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXNoAttributeException.cs @@ -0,0 +1,28 @@ +namespace Brutal.Localization.ResX +{ + /// + /// Thrown when a ResX <data> tag has no crucial attribute. + /// + public class ResXNoAttributeException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public ResXNoAttributeException() { } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + public ResXNoAttributeException(string? message) + : base(message) { } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + /// Inner exception (if any.) + public ResXNoAttributeException(string? message, Exception? innerException) + : base(message, innerException) { } + } +} diff --git a/Brutal.Localization/Resources/ResX.NET/ResXNoValueException.cs b/Brutal.Localization/Resources/ResX.NET/ResXNoValueException.cs new file mode 100644 index 0000000..a0781d1 --- /dev/null +++ b/Brutal.Localization/Resources/ResX.NET/ResXNoValueException.cs @@ -0,0 +1,28 @@ +namespace Brutal.Localization.ResX +{ + /// + /// Thrown when a ResX <data> tag has no descendant XML tag of type <value>. + /// + public class ResXNoValueException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public ResXNoValueException() { } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + public ResXNoValueException(string? message) + : base(message) { } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + /// Inner exception (if any.) + public ResXNoValueException(string? message, Exception? innerException) + : base(message, innerException) { } + } +} diff --git a/Brutal.Localization/Resources/ResXReader.cs b/Brutal.Localization/Resources/ResXReader.cs new file mode 100644 index 0000000..86a8e59 --- /dev/null +++ b/Brutal.Localization/Resources/ResXReader.cs @@ -0,0 +1,114 @@ +using System.Collections; +using System.Diagnostics; +using System.Resources; +using Brutal.Localization.ResX; + +namespace Brutal.Localization.ResX; + +/// +/// A ResX reader to replace the defunct ResXResourceReader that no longer works in +/// .NET Core. Supports only strings at present. +/// +public class ResXReader : IResourceReader +{ + /// + /// Create a ResXReader from a file path to a .resx file. + /// + /// Path to the file. Can be relative or absolute. + public ResXReader(string filePath) + { + _data = []; + _reader = new StreamReader(filePath); + } + + /// + /// Create a ResX reader that reads from a TextReader. + /// + /// + public ResXReader(TextReader reader) + { + _data = []; + _reader = reader; + } + + /// + /// Returns a read-only collection of the current resource data. + /// + public IReadOnlyDictionary Data + { + get + { + if (IsClosed) + throw new InvalidOperationException("Reader is already closed"); + + EnsureLoaded(); + return _data; + } + } + + #region System.Resources.IResourceReader + + /// + /// Close the reader + /// + public void Close() + { + if (IsClosed) + return; + + _reader!.Close(); + _reader = null; + } + + /// + /// Return the IDictionaryEnumerator of the currently loaded data. + /// + /// The IDictionaryEnumerator of the currently loaded data. + /// Thrown if the ResXReader is closed. + public IDictionaryEnumerator GetEnumerator() + { + if (IsClosed) + throw new InvalidOperationException("Reader is already closed"); + + EnsureLoaded(); + return _data.GetEnumerator(); + } + + /// + /// Dispose of the ResXReader, closing the file in the process. + /// + public void Dispose() + { + Close(); + GC.SuppressFinalize(this); + } + + #endregion + + #region IEnumerable + IEnumerator IEnumerable.GetEnumerator() + { + if (IsClosed) + throw new InvalidOperationException("Reader is already closed"); + + return GetEnumerator(); + } + #endregion + + private void EnsureLoaded() + { + Debug.Assert(_reader is not null); + Debug.Assert(!IsClosed); + + if (_loaded) + return; + + _data = ResXFile.Parse(_reader.ReadToEnd()); + _loaded = true; + } + + private bool IsClosed => _reader is null; + private bool _loaded; + private Dictionary _data; + private TextReader? _reader; +} diff --git a/Brutal.Localization/Resources/ResXWriter.cs b/Brutal.Localization/Resources/ResXWriter.cs new file mode 100644 index 0000000..c537510 --- /dev/null +++ b/Brutal.Localization/Resources/ResXWriter.cs @@ -0,0 +1,78 @@ +using Brutal.Localization.ResX; + +namespace Brutal.Localization.ResX; + +/// +/// A ResX writer to replace the defunct ResXResourceWriter that no longer works in +/// .NET Core. Supports only strings at present. +/// +public class ResXWriter : IDisposable +{ + /// + /// Create a ResXWriter that writes to a file. + /// + /// Path to the file. Can be relative or absolute. + public ResXWriter(string filePath) + { + _writer = new StreamWriter(filePath); + _resXFile = new(); + } + + /// + /// Create a ResX writer that writes to a TextWriter. + /// + /// The writer to write ResX data to. + public ResXWriter(TextWriter writer) + { + _writer = writer; + _resXFile = new(); + } + + /// + /// Adds a string along with a value and options comment. + /// + /// The key for the value in the ResX. + /// The value of the string + /// A user supplied comment + public void AddString(string name, string value, string? comment = null) + { + _resXFile.DataDictionary.Add(name, new ResXData(name, value, comment)); + } + + /// + /// Close a ResXWriter, writing all content first. + /// + public void Close() + { + if (_closed) + return; + + Generate(); + _writer!.Flush(); + _writer.Close(); + _closed = true; + } + + /// + /// Close and dispose of the ResXWriter. + /// + public void Dispose() + { + Close(); + _writer?.Dispose(); + GC.SuppressFinalize(this); + } + + private void Generate() + { + if (_writer is null) + throw new InvalidOperationException("ResXWriter already closed"); + + var content = _resXFile.Build(); + _writer.Write(content); + } + + private readonly ResXFile _resXFile; + private readonly TextWriter? _writer; + private bool _closed; +} diff --git a/Brutal.Logging/DefaultCategory.cs b/Brutal.Logging/DefaultCategory.cs new file mode 100644 index 0000000..21fc9cb --- /dev/null +++ b/Brutal.Logging/DefaultCategory.cs @@ -0,0 +1,18 @@ +namespace Brutal.Logging; + +/// +/// A default log category to use when no other is specified +/// +/// +/// The following code demonstrates how to import the default logger globally: +/// +/// global using static Brutal.Logging.DefaultCategory; +/// +/// +public static class DefaultCategory +{ + /// + /// A default log category + /// + public static readonly LogCategory Log = LogCategory.Make("Default"); +} diff --git a/Brutal.Logging/LogCategory.cs b/Brutal.Logging/LogCategory.cs new file mode 100644 index 0000000..39c1dfd --- /dev/null +++ b/Brutal.Logging/LogCategory.cs @@ -0,0 +1,267 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using Brutal.Logging.Internal; +using Microsoft.Extensions.Logging; + +namespace Brutal.Logging; + +/// +/// Represents an abstract logging category that provides methods for structured logging. +/// +/// +/// A logging category is designed to group related logging messages and control the logging level. +/// This class provides various logging methods to handle message logging at different levels. +/// Implementations of this abstract class define specific behavior for each category. +/// +public sealed class LogCategory +{ + #region Categories + + internal static readonly Dictionary Categories = []; + + /// + /// Gets a logging category by name. + /// + /// Thrown if the category does not exist. + public static LogCategory Get(string categoryName) + { + return Categories[categoryName]; + } + + /// + /// Tries to get a logging category by name. + /// + public static bool TryGet(string categoryName, [MaybeNullWhen(false)] out LogCategory category) + { + return Categories.TryGetValue(categoryName, out category); + } + + /// + /// Tries to get a logging category by name, or creates it if it does not exist. + /// + public static LogCategory Make(string categoryName) + { + if (Categories.TryGetValue(categoryName, out var category)) + return category; + + category = new LogCategory(categoryName) { Logger = LogSystem.Factory?.CreateLogger(categoryName) }; + + Categories[categoryName] = category; + return category; + } + + #endregion + + /// + /// Represents the name of the logging category. + /// This property is used to uniquely identify a specific logging category, allowing + /// for categorization and filtering of logged messages. + /// + public string Name { get; } + + /// + /// Represents whether this category is enabled and will display logs + /// + public bool IsCategoryEnabled = true; + + /// + /// Represents whether the caller info (member name, file path, line number) should be displayed in the logs + /// + public bool AppendCallerInfo = false; + + public ILogger? Logger { get; internal set; } + + /// + /// Represents a logging category that provides methods for structured and leveled logging. + /// + /// + /// A logging category is a logical grouping for log entries, enabling control over log level filtering and organization. + /// The class serves as a base for defining specific logging behavior. + /// + private LogCategory(string name) + { + Name = name; + } + + /// + /// Logging will be skipped for this category if these conditions are not met + /// + private bool LoggingEnabled => LogSystem.IsEnabled && IsCategoryEnabled; + + /// + /// Is logging enabled for this category at this level? + /// + public bool IsEnabled(LogLevel level) => + LogSystem.IsEnabled && IsCategoryEnabled && Logger?.IsEnabled(level) == true; + + /// + /// Logs a message at the given level, with optional details about the source member, file, and line number. + /// + /// The level to log on. + /// The message to log. + /// The name of the method that invokes this log call. Automatically populated by the CallerMemberName attribute if not specified. + /// The file path of the caller. Automatically populated by the CallerFilePath attribute if not specified. + /// The line number in the source file where the log call originates. Automatically populated by the CallerLineNumber attribute if not specified. + /// For internal use, to forcibly append caller information even if is false. + /// Defaults to null i.e. follow . + private void Log( + LogLevel logLevel, + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0, + bool? appendCallerInfo = null + ) + where TLevel : unmanaged, ILogLevel + { + // Thread-safety paranoia: drain the handler first to avoid leaking the rented StringBuilder + // in case a guard below mismatches due to a race condition + // (level/logger state flipped on another thread between ctor and here). + var messageString = message.ToStringAndClear(); + + if (!LoggingEnabled) + return; + + if (Logger is null) + throw new LogNotInitializedException(); + + if (!Logger.IsEnabled(logLevel)) + return; + + // A span pass-through materializes only now: unlike the rented SB drained above it holds + // no pooled resource, so deferring past the guards keeps suppressed logs allocation-free. + messageString ??= message.Span.ToString(); + + if (appendCallerInfo ?? AppendCallerInfo) + { + Logger.Log( + logLevel, + "{Message} {SourceMemberName} (in {SourceFilePath}:{SourceLineNumber})", + messageString, + sourceMemberName, + sourceFilePath, + sourceLineNumber + ); + } + else + Logger.Log(logLevel, messageString); + } + + /// + public void Log( + LogLevel logLevel, + [InterpolatedStringHandlerArgument("", nameof(logLevel))] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(logLevel, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + + /// + public void Trace( + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(LogLevel.Trace, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + + /// + public void Debug( + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(LogLevel.Debug, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + + /// + public void Info( + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(LogLevel.Information, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + + /// + public void Warning( + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(LogLevel.Warning, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + + /// + public void Error( + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(LogLevel.Error, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + + /// + public void Critical( + [InterpolatedStringHandlerArgument("")] LogString message = default, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log(LogLevel.Critical, message, sourceMemberName, sourceFilePath, sourceLineNumber); + } + +#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do) + /// + /// The exception object containing details for the logged error message. + public void Error( + Exception exception, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log( + LogLevel.Error, + $"{exception}", + sourceMemberName, + sourceFilePath, + sourceLineNumber, + appendCallerInfo: true + ); + } + + /// + /// The exception object containing details for the logged critical message. + public void Critical( + Exception exception, + [CallerMemberName] string sourceMemberName = "", + [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0 + ) + { + Log( + LogLevel.Critical, + $"{exception}", + sourceMemberName, + sourceFilePath, + sourceLineNumber, + appendCallerInfo: true + ); + } +#pragma warning restore CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do) +} diff --git a/Brutal.Logging/LogString.cs b/Brutal.Logging/LogString.cs new file mode 100644 index 0000000..d38b066 --- /dev/null +++ b/Brutal.Logging/LogString.cs @@ -0,0 +1,136 @@ +using System.ComponentModel; +using System.Runtime.CompilerServices; +using Brutal.Strings; +using Microsoft.Extensions.Logging; + +namespace Brutal.Logging.Internal; + +// NOTE: purposely not using static abstract here for potential .NET Standard compatibility. +[EditorBrowsable(EditorBrowsableState.Never)] +public interface ILogLevel +{ + LogLevel Level { get; } +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Trace : ILogLevel +{ + public LogLevel Level => LogLevel.Trace; +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Debug : ILogLevel +{ + public LogLevel Level => LogLevel.Debug; +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Information : ILogLevel +{ + public LogLevel Level => LogLevel.Information; +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Warning : ILogLevel +{ + public LogLevel Level => LogLevel.Warning; +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Error : ILogLevel +{ + public LogLevel Level => LogLevel.Error; +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Critical : ILogLevel +{ + public LogLevel Level => LogLevel.Critical; +} + +[EditorBrowsable(EditorBrowsableState.Never)] +public readonly struct Dynamic : ILogLevel +{ + public LogLevel Level => + throw new InvalidOperationException( + "LogString must receive its LogLevel via the 5-param ctor; never call default(Dynamic).Level." + ); +} + +/// Conditionally suppresses interpolation when the category is disabled. Compiler-only - not for manual construction. +[InterpolatedStringHandler, EditorBrowsable(EditorBrowsableState.Never)] +public readonly ref struct LogString + where TLevel : unmanaged, ILogLevel +{ + private readonly StringBuilder? _sb; + + public LogString( + int literalLength, + int formattedCount, + LogCategory category, + LogLevel logLevel, + out bool shouldAppend + ) + { + shouldAppend = category.IsEnabled(logLevel); + _sb = shouldAppend ? StringBuilderPool.Shared.Get() : null; + } + + public LogString(int literalLength, int formattedCount, LogCategory category, out bool shouldAppend) + : this(literalLength, formattedCount, category, default(TLevel).Level, out shouldAppend) { } + + public void AppendLiteral(string value) => _sb?.Append(value); + + public void AppendFormatted(T value, int alignment = 0, string? format = null) => + _sb?.Append(value, alignment, format); + + // ref-struct holes can't flow through AppendFormatted (no `allows ref struct`). + public void AppendFormatted(ReadOnlySpan value, int alignment = 0, string? format = null) => + _sb?.Append(value, alignment); + + public void AppendFormatted(ReadOnlySpan value, int alignment = 0, string? format = null) => + _sb?.Append(value, alignment); + + public void AppendFormatted(string? value, int alignment = 0, string? format = null) => + _sb?.Append(value, alignment); + + #region string pass-through + + private readonly string? _message; + + private LogString(string message) => _message = message; + + public static implicit operator LogString(string message) => new(message); + + #endregion + + #region span pass-through + + private readonly ReadOnlySpan _span; + + private LogString(ReadOnlySpan message) => _span = message; + + public static implicit operator LogString(ReadOnlySpan message) => new(message); + + /* Exposed as a raw span, not a "SpanToString"-style method: unlike ToStringAndClear, which + LogCategory.Log must call unconditionally before the enabled guards (pool-return paranoia), + a span holds no pooled resource, so its .ToString() can - and must - wait until after the + guards, or every suppressed log pays for a string it never uses. */ + internal ReadOnlySpan Span => _span; + + #endregion + + /// Don't call this twice as the StringBuilder will be returned to the pool. + internal string? ToStringAndClear() + { + if (_message != null) + return _message; + + if (_sb is null) + return null; + + var result = _sb.WrittenSpan.ToString(); + StringBuilderPool.Shared.Return(_sb); + return result; + } +} diff --git a/Brutal.Logging/LogSystem.cs b/Brutal.Logging/LogSystem.cs new file mode 100644 index 0000000..43dec2a --- /dev/null +++ b/Brutal.Logging/LogSystem.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.Logging; + +namespace Brutal.Logging; + +/// +/// Base class for all logging exceptions +/// +public class LogException(string message) : Exception(message); + +/// +/// Exception thrown when the logging system is used before being initialized +/// +public class LogNotInitializedException() + : LogException("Log not initialized. Call Log.Initialize before using the logging system."); + +/// +/// Static class for handling logging functionality across the framework. +/// Provides methods for initializing, printing, and managing log messages +/// with different log levels, as well as interacting with external configurations. +/// +public static class LogSystem +{ + internal static ILoggerFactory? Factory; + + /// + /// Enable or Disable all logging completely + /// + public static bool IsEnabled = false; + + /// + /// Initialize and enable the log system + /// + public static void Initialize(Action builder) + { + IsEnabled = true; + Factory = LoggerFactory.Create(builder); + foreach (var (categoryName, category) in LogCategory.Categories) + category.Logger = Factory.CreateLogger(categoryName); + } +} diff --git a/Brutal.Maths/RandomExtensions.cs b/Brutal.Maths/RandomExtensions.cs new file mode 100644 index 0000000..239326f --- /dev/null +++ b/Brutal.Maths/RandomExtensions.cs @@ -0,0 +1,214 @@ +using Brutal.Numerics; + +namespace Brutal.Maths; + +/// +/// Extension class providing additional methods for Random +/// +public static class RandomExtensions +{ + /// + /// Returns the next value that is greater than or equal to 0 and less than the specified maximum value. + /// + /// The random number generator. + /// The exclusive upper bound of the random number returned. + /// maxValue is less than 0. + public static float NextSingle(this Random random, float maxValue) + { + if (maxValue < 0) + throw new ArgumentOutOfRangeException(nameof(maxValue), @"maxValue must be greater than or equal to 0"); + + return random.NextSingle() * maxValue; + } + + /// + public static double NextDouble(this Random random, double maxValue) + { + if (maxValue < 0) + throw new ArgumentOutOfRangeException(nameof(maxValue), @"maxValue must be greater than or equal to 0"); + + return random.NextDouble() * maxValue; + } + + /// + /// Returns the next value that is greater than or equal to a specified minimum value and less than a specified maximum + /// value. + /// + /// The random number generator. + /// The inclusive lower bound of the random number returned. + /// The exclusive upper bound of the random number returned. + /// minValue is greater than maxValue. + public static float NextSingle(this Random random, float minValue, float maxValue) + { + if (minValue > maxValue) + throw new ArgumentOutOfRangeException(nameof(minValue), @"minValue must be less than or equal to maxValue"); + + return random.NextSingle() * (maxValue - minValue) + minValue; + } + + /// + public static double NextDouble(this Random random, double minValue, double maxValue) + { + if (minValue > maxValue) + throw new ArgumentOutOfRangeException(nameof(minValue), @"minValue must be less than or equal to maxValue"); + + return random.NextDouble() * (maxValue - minValue) + minValue; + } + + /// + /// Generates a random point within a uniform 2D square of the specified length. + /// + /// The random number generator. + /// The uniform length of one side of the square. Defaults to 1. Must be greater than or equal to 0. + /// Thrown if the length is less than 0. + public static float2 NextSinglePointInSquare(this Random random, float xySize = 1) + { + return random.NextSinglePointInRectangle(xySize, xySize); + } + + /// + public static double2 NextDoublePointInSquare(this Random random, double xySize = 1) + { + return random.NextDoublePointInRectangle(xySize, xySize); + } + + /// + /// Generates a random point within a 2D rectangle of the specified length and width. + /// + /// The random number generator. + /// The length of the rectangle. Must be greater than or equal to 0. + /// The width of the rectangle. Must be greater than or equal to 0. + /// Thrown if the length or width is less than 0. + public static float2 NextSinglePointInRectangle(this Random random, float xSize, float ySize) + { + return new float2(random.NextSingle(xSize), random.NextSingle(ySize)); + } + + /// + public static double2 NextDoublePointInRectangle(this Random random, double xSize, double ySize) + { + return new double2(random.NextDouble(xSize), random.NextDouble(ySize)); + } + + /// + /// Generates a random point within a uniformly-sized 3D box of the specified length. + /// + /// The random number generator. + /// The uniform length of all box sides. Defaults to 1. Must be greater than or equal to 0. + /// Thrown if the length is less than 0. + public static float3 NextSinglePointInBox(this Random random, float xyzSize = 1) + { + return random.NextSinglePointInBox(xyzSize, xyzSize, xyzSize); + } + + /// + public static double3 NextDoublePointInBox(this Random random, double xyzSize = 1) + { + return random.NextDoublePointInBox(xyzSize, xyzSize, xyzSize); + } + + /// + /// Generates a random point within a 3D box of the specified length, width, and height. + /// + /// The random number generator. + /// The length of the X dimension. Must be greater than or equal to 0. + /// The length of the Y dimension. Must be greater than or equal to 0. + /// The length of the Z dimension. Must be greater than or equal to 0. + /// Thrown if the length is less than 0. + public static float3 NextSinglePointInBox(this Random random, float xSize, float ySize, float zSize) + { + return new float3(random.NextSingle(xSize), random.NextSingle(ySize), random.NextSingle(zSize)); + } + + /// + public static double3 NextDoublePointInBox(this Random random, double xSize, double ySize, double zSize) + { + return new double3(random.NextDouble(xSize), random.NextDouble(ySize), random.NextDouble(zSize)); + } + + /// + /// Generates a random point within a 2D circle of the specified radius. + /// + /// The random number generator. + /// The radius of the circle. Defaults to 1. + /// Thrown if the radius is less than 0. + public static float2 NextSinglePointInCircle(this Random random, float radius = 1) + { + if (radius < 0) + throw new ArgumentOutOfRangeException(nameof(radius), @"radius must be greater than or equal to 0"); + + var r = float.Sqrt(random.NextSingle()) * radius; + return r * random.NextSingleUnit2(); + } + + /// + public static double2 NextDoublePointInCircle(this Random random, double radius = 1) + { + if (radius < 0) + throw new ArgumentOutOfRangeException(nameof(radius), @"radius must be greater than or equal to 0"); + + var r = double.Sqrt(random.NextDouble()) * radius; + return r * random.NextDoubleUnit2(); + } + + /// + /// Generates a random point within a 3D sphere of the specified radius. + /// + /// The random number generator. + /// The radius of the sphere. Defaults to 1. + /// Thrown if the radius is less than 0. + public static float3 NextSinglePointInSphere(this Random random, float radius = 1) + { + if (radius < 0) + throw new ArgumentOutOfRangeException(nameof(radius), @"radius must be greater than or equal to 0"); + + var r = float.Sqrt(random.NextSingle()) * radius; + return r * random.NextSingleUnit3(); + } + + /// + public static double3 NextDoublePointInSphere(this Random random, double radius = 1) + { + if (radius < 0) + throw new ArgumentOutOfRangeException(nameof(radius), @"radius must be greater than or equal to 0"); + + var r = double.Sqrt(random.NextDouble()) * radius; + return r * random.NextDoubleUnit3(); + } + + /// + /// Generates a random 2D unit vector + /// + /// The random number generator. + public static float2 NextSingleUnit2(this Random random) + { + var theta = random.NextSingle(float.Tau); + return new float2(float.Cos(theta), float.Sin(theta)); + } + + /// + public static double2 NextDoubleUnit2(this Random random) + { + var theta = random.NextDouble(float.Tau); + return new double2(double.Cos(theta), double.Sin(theta)); + } + + /// + /// Generates a random 3D unit vector + /// + /// The random number generator. + public static float3 NextSingleUnit3(this Random random) + { + var theta = random.NextSingle(float.Tau); + var phi = random.NextSingle(float.Pi); + return new float3(float.Sin(phi) * float.Cos(theta), float.Sin(phi) * float.Sin(theta), float.Cos(phi)); + } + + /// + public static double3 NextDoubleUnit3(this Random random) + { + var theta = random.NextDouble(double.Tau); + var phi = random.NextDouble(double.Pi); + return new double3(double.Sin(phi) * double.Cos(theta), double.Sin(phi) * double.Sin(theta), double.Cos(phi)); + } +} diff --git a/Brutal.Memory/Mem.cs b/Brutal.Memory/Mem.cs new file mode 100644 index 0000000..7e03fcd --- /dev/null +++ b/Brutal.Memory/Mem.cs @@ -0,0 +1,219 @@ +using System.Runtime.InteropServices; +using Brutal.Pointers; +using Brutal.Pointers.Extensions; + +namespace Brutal.Memory; + +/// +/// Memory management utilities for unmanaged memory operations. +/// +public static class Mem +{ + #region Byte + /// + /// Creates a new allocation for a specified number of bytes + /// + public static unsafe Ptr Alloc(ByteSize byteSize) + { + return NativeMemory.Alloc((nuint)byteSize); + } + + /// + /// Creates a new allocation for a specified number of elements of a specified size + /// + public static unsafe Ptr Alloc(ElementCount count, ByteSize stride) + { + return NativeMemory.Alloc((nuint)count, (nuint)stride); + } + + /// + /// Creates a new zeroed allocation for a specified number of bytes + /// + public static unsafe Ptr AllocZeroed(ByteSize byteSize) + { + return NativeMemory.AllocZeroed((nuint)byteSize); + } + + /// + /// Creates a new zeroed allocation for a specified number of elements of a specified size + /// + public static unsafe Ptr AllocZeroed(ElementCount count, ByteSize stride) + { + return NativeMemory.AllocZeroed((nuint)count, (nuint)stride); + } + + /// + /// Copies a specified number of bytes from source to destination + /// + public static unsafe void Copy(Ptr source, Ptr destination, ByteSize byteSize) + { + NativeMemory.Copy(source, destination, (nuint)byteSize); + } + + /// + /// Fills a specified number of bytes at destination with value + /// + public static unsafe void Fill(Ptr destination, ByteSize byteSize, byte value) + { + NativeMemory.Fill(destination, (nuint)byteSize, value); + } + + /// + /// Clears a specified number of bytes at destination + /// + public static unsafe void Clear(Ptr destination, ByteSize byteSize) + { + NativeMemory.Clear(destination, (nuint)byteSize); + } + + /// + /// Reallocates the given pointer to hold a specified number of bytes + /// + public static unsafe Ptr Realloc(Ptr source, ByteSize byteSize) + { + return NativeMemory.Realloc(source, (nuint)byteSize); + } + #endregion + + /// + /// Creates a new allocation for a single instance of T and copies val into it + /// + public static Ptr AllocAndCopy(T val) + where T : unmanaged + { + var ptr = Alloc(); + ptr.Value = val; + return ptr; + } + + /// + /// Creates a new allocation for a single instance of T + /// + public static Ptr Alloc() + where T : unmanaged + { + return Alloc(ByteSize.Of()).Cast(); + } + + /// + /// Creates a new allocation for elementCount instances of T and returns it as a span + /// + public static Span Alloc(ElementCount count) + where T : unmanaged + { + return Alloc(count, ByteSize.Of()).AsSpan(count); + } + + /// + /// Creates a new zeroed allocation for a single instance of T + /// + public static Ptr AllocZeroed() + where T : unmanaged + { + return AllocZeroed(ByteSize.Of()).Cast(); + } + + /// + /// Creates a new zeroed allocation for elementCount instances of T and returns it as a span + /// + public static Span AllocZeroed(ElementCount count) + where T : unmanaged + { + return AllocZeroed(count, ByteSize.Of()).AsSpan(count); + } + + /// + /// Reallocates the given pointer to hold numElements instances of T + /// + public static Ptr Realloc(Ptr source, ElementCount count) + where T : unmanaged + { + return Realloc(source, ByteSize.Of(count)).Cast(); + } + + public static void Clear(Ptr source, ElementCount count) + where T : unmanaged + { + Clear(source, ByteSize.Of(count)); + } + + public static unsafe void Clear(ReadOnlySpan span) + where T : unmanaged + { + fixed (T* pSpan = span) + Clear(pSpan, ByteSize.Of(span)); + } + + /// + /// Frees a previously allocated pointer + /// + public static unsafe void Free(Ptr ptr) + { + NativeMemory.Free(ptr); + } + + /// + /// Frees a previously allocated span + /// + public static unsafe void Free(Span ptr) + where T : unmanaged + { + NativeMemory.Free(ptr.AsPointer()); + } + + /// + /// Copies elementCount elements of type T from source to destination + /// + public static void Copy(Ptr source, Ptr destination, ElementCount count) + where T : unmanaged + { + Copy(source.AsSpan(count), destination.AsSpan(count)); + } + + /// + /// Creates a new allocation for values.Length instances of T, copies the values into it, and returns it as a span + /// + public static Span AllocAndCopy(ReadOnlySpan values) + where T : unmanaged + { + var memory = Alloc(values.Length); + values.CopyTo(memory); + return memory; + } + + /// + /// Creates a new allocation for values.Length instances of T, copies the values into it, and returns it as a span + /// + public static Span AllocAndCopy(Span values) + where T : unmanaged + { + return AllocAndCopy((ReadOnlySpan)values); + } + + /// + /// Copies the elements of source to destination + /// + /// If the destination span is not long enough to hold the source span + public static unsafe void Copy(ReadOnlySpan source, Span destination) + where T : unmanaged + { + if (source.Length > destination.Length) + throw new ArgumentException("Destination span is not long enough to hold the source span."); + + fixed (T* pSource = source) + fixed (T* pDestination = destination) + { + NativeMemory.Copy(pSource, pDestination, (nuint)ByteSize.Of(source.Length)); + } + } + + /// + /// Copies the elements of source to destination + /// + /// If the destination span is not long enough to hold the source span + public static void Copy(Span source, Span destination) + where T : unmanaged + { + Copy((ReadOnlySpan)source, destination); + } +} diff --git a/Brutal.Memory/Partition/IPartitioner.cs b/Brutal.Memory/Partition/IPartitioner.cs new file mode 100644 index 0000000..1c29419 --- /dev/null +++ b/Brutal.Memory/Partition/IPartitioner.cs @@ -0,0 +1,28 @@ +namespace Brutal.Memory; + +/// +/// Interface for an object that has a size (Eg: a buffer) +/// +public interface ISize +{ + /// + /// Size of the object's internals + /// + public int Size { get; } +} + +/// +/// Interface for an object that has a 2D size (Eg: a texture) +/// +public interface ISize2D +{ + /// + /// Width of the object + /// + public int Width { get; } + + /// + /// Height of the object + /// + public int Height { get; } +} diff --git a/Brutal.Memory/PtrOwner.cs b/Brutal.Memory/PtrOwner.cs new file mode 100644 index 0000000..7e48306 --- /dev/null +++ b/Brutal.Memory/PtrOwner.cs @@ -0,0 +1,141 @@ +using Brutal.Attributes; +using Brutal.Pointers; +using Brutal.Pointers.Extensions; + +namespace Brutal.Memory; + +/// +/// A variant of Ptr that owns the memory and frees it automatically when disposed or finalized +/// +/// The struct type we want to create unmanaged memory pointing to +public class PtrOwner : IDisposable, INullable + where TValueType : unmanaged +{ + /// + /// The owned pointer. + /// + public Ptr Ptr { get; private set; } + + /// + /// Get the value of the pointer as a reference + /// + public ref TValueType Value => ref Ptr.Value; + + public PtrOwner(TValueType value) + { + Ptr = Mem.AllocAndCopy(value); + } + + public PtrOwner(Ptr ptr) + { + Ptr = ptr; + } + + /// + /// Dispose resources, freeing the memory and preventing further use. + /// + /// + /// ONLY call this if you are sure you don't need the PtrOwner anymore. + /// + public void Dispose() + { + Mem.Free(Ptr); + Ptr = null; + GC.SuppressFinalize(this); + } + + /// + /// A finalizer that frees the memory, in case the object was not disposed. + /// + ~PtrOwner() + { + Mem.Free(Ptr); + } + + /// + public bool IsNull() + { + return Ptr.IsNull(); + } + + /// + /// Returns a new that points to the same memory as this one, but with an offset in elements of . + /// + public Ptr Offset(int count) + { + return Ptr.Offset(count); + } + + /// + /// Convert the pointer to a span of type TValueType with the given length. + /// + [return: Fixed] + public Span AsSpan(int length) + { + return Ptr.AsSpan(length); + } + + /// + /// Gets a reference to the element at the specified index. + /// + public ref TValueType this[int index] => ref Ptr[index]; + + /// + /// Swap the pointer with another one. + /// + /// + /// + public Ptr Swap(Ptr newPointer) + { + var oldPointer = Ptr; + Ptr = newPointer; + return oldPointer; + } + + /// + /// Release the pointer and return it to the caller. + /// + /// + /// If you don't need the PtrOwner anymore, call Dispose() instead. + /// + public Ptr Release() + { + return Swap(null); + } + + /// + /// Frees any existing pointer and resets it to the given value. + /// + /// + /// This PtrOwner will now own the memory of the given value. + /// + public void Reset(Ptr newValue = default) + { + Release(); + Swap(newValue); + } + + /// + /// Implicit cast to . + /// + public static implicit operator Ptr(PtrOwner? inPtrOwner) + { + return inPtrOwner?.Ptr ?? null; + } + + /// + /// Implicit cast to *. + /// + public static unsafe implicit operator TValueType*(PtrOwner? inPtrOwner) + { + return inPtrOwner?.Ptr ?? null; + } + + /// + /// Explicit cast to nint. + /// + public static explicit operator nint(PtrOwner ptr) + { + return (nint)ptr.Ptr; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Enums.cs b/Brutal.MeshOptimizer/Generated/Enums.cs new file mode 100644 index 0000000..671b1b1 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Enums.cs @@ -0,0 +1,43 @@ +namespace Brutal.MeshOptimizer +{ + /// + /// Vertex buffer filter encoders + /// These functions can be used to encode data in a format that meshopt_decodeFilter can decode + /// + /// + /// + /// meshopt_encodeFilterOct encodes unit vectors with K-bit (2 <= K <= 16) signed X/Y as an output. + /// Each component is stored as an 8-bit or 16-bit normalized integer; stride must be equal to 4 or 8. Z will store 1.0f, W is preserved as is. + /// Input data must contain 4 floats for every vector (count*4 total). + /// + /// + /// meshopt_encodeFilterQuat encodes unit quaternions with K-bit (4 <= K <= 16) component encoding. + /// Each component is stored as an 16-bit integer; stride must be equal to 8. + /// Input data must contain 4 floats for every quaternion (count*4 total). + /// + /// + /// meshopt_encodeFilterExp encodes arbitrary (finite) floating-point data with 8-bit exponent and K-bit integer mantissa (1 <= K <= 24). + /// Exponent can be shared between all components of a given vector as defined by stride or all values of a given component; stride must be divisible by 4. + /// Input data must contain stride/4 floats for every vector (count*stride/4 total). + /// + /// + /// meshopt_encodeFilterColor encodes RGBA color data by converting RGB to YCoCg color space with K-bit (2 <= K <= 16) component encoding; A is stored using K-1 bits. + /// Each component is stored as an 8-bit or 16-bit integer; stride must be equal to 4 or 8. + /// Input data must contain 4 floats for every color (count*4 total). + /// + /// + public enum MeshOptEncodeExpMode + { + /// When encoding exponents, use separate values for each component (maximum quality) + EncodeExpSeparate, + + /// When encoding exponents, use shared value for all components of each vector (better compression) + EncodeExpSharedVector, + + /// When encoding exponents, use shared value for each component of all vectors (best compression) + EncodeExpSharedComponent, + + /// When encoding exponents, use separate values for each component, but clamp to 0 (good quality if very small values are not important) + EncodeExpClamped, + } +} diff --git a/Brutal.MeshOptimizer/Generated/MeshOptimizer.cs b/Brutal.MeshOptimizer/Generated/MeshOptimizer.cs new file mode 100644 index 0000000..76ba1e1 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/MeshOptimizer.cs @@ -0,0 +1,1524 @@ +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + public static partial class MeshOptimizer + { + /// + /// Generates a vertex remap table from the vertex buffer and an optional index buffer and returns number of unique vertices + /// As a result, all vertices that are binary equivalent map to the same (new) location, with no gaps in the resulting sequence. + /// Resulting remap table maps old vertices to new vertices and can be used in meshopt_remapVertexBuffer/meshopt_remapIndexBuffer. + /// Note that binary equivalence considers all vertex_size bytes, including padding which should be zero-initialized. + /// + /// + /// + /// destination must contain enough space for the resulting remap table (vertex_count elements) + /// indices can be NULL if the input is unindexed + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateVertexRemap")] + public static partial ByteSize64 GenerateVertexRemap( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize + ); + + /// + /// Generates a vertex remap table from multiple vertex streams and an optional index buffer and returns number of unique vertices + /// As a result, all vertices that are binary equivalent map to the same (new) location, with no gaps in the resulting sequence. + /// Resulting remap table maps old vertices to new vertices and can be used in meshopt_remapVertexBuffer/meshopt_remapIndexBuffer. + /// To remap vertex buffers, you will need to call meshopt_remapVertexBuffer for each vertex stream. + /// Note that binary equivalence considers all size bytes in each stream, including padding which should be zero-initialized. + /// + /// + /// + /// destination must contain enough space for the resulting remap table (vertex_count elements) + /// indices can be NULL if the input is unindexed + /// stream_count must be <= 16 + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateVertexRemapMulti")] + public static partial ByteSize64 GenerateVertexRemapMulti( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount, + Ptr streams, + long streamCount + ); + + /// + /// Generates a vertex remap table from the vertex buffer and an optional index buffer and returns number of unique vertices + /// As a result, all vertices that are equivalent map to the same (new) location, with no gaps in the resulting sequence. + /// Equivalence is checked in two steps: vertex positions are compared for equality, and then the user-specified equality function is called (if provided). + /// Resulting remap table maps old vertices to new vertices and can be used in meshopt_remapVertexBuffer/meshopt_remapIndexBuffer. + /// + /// + /// + /// destination must contain enough space for the resulting remap table (vertex_count elements) + /// indices can be NULL if the input is unindexed + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// callback can be NULL if no additional equality check is needed; otherwise, it should return 1 if vertices with specified indices are equivalent and 0 if they are not + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateVertexRemapCustom")] + public static unsafe partial ByteSize64 GenerateVertexRemapCustom( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + delegate* unmanaged[Cdecl] callback, + Ptr context + ); + + /// + /// Generates vertex buffer from the source vertex buffer and remap table generated by meshopt_generateVertexRemap + /// + /// + /// + /// destination must contain enough space for the resulting vertex buffer (unique_vertex_count elements, returned by meshopt_generateVertexRemap) + /// vertex_count should be the initial vertex count and not the value returned by meshopt_generateVertexRemap + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_remapVertexBuffer")] + public static partial void RemapVertexBuffer( + Ptr destination, + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize, + Ptr remap + ); + + /// + /// Generate index buffer from the source index buffer and remap table generated by meshopt_generateVertexRemap + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// indices can be NULL if the input is unindexed + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_remapIndexBuffer")] + public static partial void RemapIndexBuffer( + Ptr destination, + Ptr indices, + long indexCount, + Ptr remap + ); + + /// + /// Generate index buffer that can be used for more efficient rendering when only a subset of the vertex attributes is necessary + /// All vertices that are binary equivalent (wrt first vertex_size bytes) map to the first vertex in the original vertex buffer. + /// This makes it possible to use the index buffer for Z pre-pass or shadowmap rendering, while using the original index buffer for regular rendering. + /// Note that binary equivalence considers all vertex_size bytes, including padding which should be zero-initialized. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateShadowIndexBuffer")] + public static partial void GenerateShadowIndexBuffer( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize, + ByteSize64 vertexStride + ); + + /// + /// Generate index buffer that can be used for more efficient rendering when only a subset of the vertex attributes is necessary + /// All vertices that are binary equivalent (wrt specified streams) map to the first vertex in the original vertex buffer. + /// This makes it possible to use the index buffer for Z pre-pass or shadowmap rendering, while using the original index buffer for regular rendering. + /// Note that binary equivalence considers all size bytes in each stream, including padding which should be zero-initialized. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// stream_count must be <= 16 + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateShadowIndexBufferMulti")] + public static partial void GenerateShadowIndexBufferMulti( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount, + Ptr streams, + long streamCount + ); + + /// + /// Generates a remap table that maps all vertices with the same position to the same (existing) index. + /// Similarly to meshopt_generateShadowIndexBuffer, this can be helpful to pre-process meshes for position-only rendering. + /// This can also be used to implement algorithms that require positional-only connectivity, such as hierarchical simplification. + /// + /// + /// + /// destination must contain enough space for the resulting remap table (vertex_count elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generatePositionRemap")] + public static partial void GeneratePositionRemap( + Ptr destination, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Generate index buffer that can be used as a geometry shader input with triangle adjacency topology + /// Each triangle is converted into a 6-vertex patch with the following layout: + /// - 0, 2, 4: original triangle vertices + /// - 1, 3, 5: vertices adjacent to edges 02, 24 and 40 + /// The resulting patch can be rendered with geometry shaders using e.g. VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY. + /// This can be used to implement algorithms like silhouette detection/expansion and other forms of GS-driven rendering. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count*2 elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateAdjacencyIndexBuffer")] + public static partial void GenerateAdjacencyIndexBuffer( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Generate index buffer that can be used for PN-AEN tessellation with crack-free displacement + /// Each triangle is converted into a 12-vertex patch with the following layout: + /// - 0, 1, 2: original triangle vertices + /// - 3, 4: opposing edge for edge 0, 1 + /// - 5, 6: opposing edge for edge 1, 2 + /// - 7, 8: opposing edge for edge 2, 0 + /// - 9, 10, 11: dominant vertices for corners 0, 1, 2 + /// The resulting patch can be rendered with hardware tessellation using PN-AEN and displacement mapping. + /// See "Tessellation on Any Budget" (John McDonald, GDC 2011) for implementation details. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count*4 elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateTessellationIndexBuffer")] + public static partial void GenerateTessellationIndexBuffer( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Generate index buffer that can be used for visibility buffer rendering and returns the size of the reorder table + /// Each triangle's provoking vertex index is equal to primitive id; this allows passing it to the fragment shader using flat/nointerpolation attribute. + /// This is important for performance on hardware where primitive id can't be accessed efficiently in fragment shader. + /// The reorder table stores the original vertex id for each vertex in the new index buffer, and should be used in the vertex shader to load vertex data. + /// The provoking vertex is assumed to be the first vertex in the triangle; if this is not the case (OpenGL), rotate each triangle (abc -> bca) before rendering. + /// For maximum efficiency the input index buffer should be optimized for vertex cache first. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// reorder must contain enough space for the worst case reorder table (vertex_count + index_count/3 elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateProvokingIndexBuffer")] + public static partial ByteSize64 GenerateProvokingIndexBuffer( + Ptr destination, + Ptr reorder, + Ptr indices, + long indexCount, + long vertexCount + ); + + /// + /// Vertex transform cache optimizer + /// Reorders indices to reduce the number of GPU vertex shader invocations + /// If index buffer contains multiple ranges for multiple draw calls, this function needs to be called on each range individually. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeVertexCache")] + public static partial void OptimizeVertexCache( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount + ); + + /// + /// Vertex transform cache optimizer for strip-like caches + /// Produces inferior results to meshopt_optimizeVertexCache from the GPU vertex cache perspective + /// However, the resulting index order is more optimal if the goal is to reduce the triangle strip length or improve compression efficiency + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeVertexCacheStrip")] + public static partial void OptimizeVertexCacheStrip( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount + ); + + /// + /// Vertex transform cache optimizer for FIFO caches + /// Reorders indices to reduce the number of GPU vertex shader invocations + /// Generally takes ~3x less time to optimize meshes but produces inferior results compared to meshopt_optimizeVertexCache + /// If index buffer contains multiple ranges for multiple draw calls, this function needs to be called on each range individually. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// cache_size should be less than the actual GPU cache size to avoid cache thrashing + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeVertexCacheFifo")] + public static partial void OptimizeVertexCacheFifo( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount, + int cacheSize + ); + + /// + /// Overdraw optimizer + /// Reorders indices to reduce the number of GPU vertex shader invocations and the pixel overdraw + /// If index buffer contains multiple ranges for multiple draw calls, this function needs to be called on each range individually. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// indices must contain index data that is the result of meshopt_optimizeVertexCache (not the original mesh indices!) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// threshold indicates how much the overdraw optimizer can degrade vertex cache efficiency (1.05 = up to 5%) to reduce overdraw more efficiently + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeOverdraw")] + public static partial void OptimizeOverdraw( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + float threshold + ); + + /// + /// Vertex fetch cache optimizer + /// Reorders vertices and changes indices to reduce the amount of GPU memory fetches during vertex processing + /// Returns the number of unique vertices, which is the same as input vertex count unless some vertices are unused + /// This function works for a single vertex stream; for multiple vertex streams, use meshopt_optimizeVertexFetchRemap + meshopt_remapVertexBuffer for each stream. + /// + /// + /// + /// destination must contain enough space for the resulting vertex buffer (vertex_count elements) + /// indices is used both as an input and as an output index buffer + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeVertexFetch")] + public static partial ByteSize64 OptimizeVertexFetch( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize + ); + + /// + /// Vertex fetch cache optimizer + /// Generates vertex remap to reduce the amount of GPU memory fetches during vertex processing + /// Returns the number of unique vertices, which is the same as input vertex count unless some vertices are unused + /// The resulting remap table should be used to reorder vertex/index buffers using meshopt_remapVertexBuffer/meshopt_remapIndexBuffer + /// + /// + /// + /// destination must contain enough space for the resulting remap table (vertex_count elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeVertexFetchRemap")] + public static partial ByteSize64 OptimizeVertexFetchRemap( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount + ); + + /// + /// Index buffer encoder + /// Encodes index data into an array of bytes that is generally much smaller (<1.5 bytes/triangle) and compresses better (<1 bytes/triangle) compared to original. + /// Input index buffer must represent a triangle list. + /// Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn't have enough space + /// For maximum efficiency the index buffer being encoded has to be optimized for vertex cache and vertex fetch first. + /// + /// + /// + /// buffer must contain enough space for the encoded index buffer (use meshopt_encodeIndexBufferBound to compute worst case size) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeIndexBuffer")] + public static partial ByteSize64 EncodeIndexBuffer( + Ptr buffer, + ByteSize64 bufferSize, + Ptr indices, + long indexCount + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeIndexBufferBound")] + public static partial ByteSize64 EncodeIndexBufferBound(long indexCount, long vertexCount); + + /// + /// Set index encoder format version (defaults to 1) + /// + /// + /// + /// version must specify the data format version to encode; valid values are 0 (decodable by all library versions) and 1 (decodable by 0.14+) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeIndexVersion")] + public static partial void EncodeIndexVersion(int version); + + /// + /// Index buffer decoder + /// Decodes index data from an array of bytes generated by meshopt_encodeIndexBuffer + /// Returns 0 if decoding was successful, and an error code otherwise + /// The decoder is safe to use for untrusted input, but it may produce garbage data (e.g. out of range indices). + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeIndexBuffer")] + public static partial int DecodeIndexBuffer( + Ptr destination, + long indexCount, + ByteSize64 indexSize, + Ptr buffer, + ByteSize64 bufferSize + ); + + /// + /// Get encoded index format version + /// Returns format version of the encoded index buffer/sequence, or -1 if the buffer header is invalid + /// Note that a non-negative value doesn't guarantee that the buffer will be decoded correctly if the input is malformed. + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeIndexVersion")] + public static partial int DecodeIndexVersion(Ptr buffer, ByteSize64 bufferSize); + + /// + /// Index sequence encoder + /// Encodes index sequence into an array of bytes that is generally smaller and compresses better compared to original. + /// Input index sequence can represent arbitrary topology; for triangle lists meshopt_encodeIndexBuffer is likely to be better. + /// Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn't have enough space + /// + /// + /// + /// buffer must contain enough space for the encoded index sequence (use meshopt_encodeIndexSequenceBound to compute worst case size) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeIndexSequence")] + public static partial ByteSize64 EncodeIndexSequence( + Ptr buffer, + ByteSize64 bufferSize, + Ptr indices, + long indexCount + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeIndexSequenceBound")] + public static partial ByteSize64 EncodeIndexSequenceBound(long indexCount, long vertexCount); + + /// + /// Index sequence decoder + /// Decodes index data from an array of bytes generated by meshopt_encodeIndexSequence + /// Returns 0 if decoding was successful, and an error code otherwise + /// The decoder is safe to use for untrusted input, but it may produce garbage data (e.g. out of range indices). + /// + /// + /// + /// destination must contain enough space for the resulting index sequence (index_count elements) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeIndexSequence")] + public static partial int DecodeIndexSequence( + Ptr destination, + long indexCount, + ByteSize64 indexSize, + Ptr buffer, + ByteSize64 bufferSize + ); + + /// + /// Experimental: Meshlet encoder + /// Encodes meshlet data into an array of bytes that is generally smaller and compresses better compared to original. + /// Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn't have enough space + /// This function encodes a single meshlet; when encoding multiple meshlets, additional headers may be necessary to store vertex/triangle count and encoded size. + /// For maximum efficiency the meshlet being encoded should be optimized using meshopt_optimizeMeshletLevel with level 1+ (3 recommended); additionally, vertex reference data should be optimized for locality (fetch). + /// + /// + /// + /// buffer must contain enough space for the encoded meshlet (use meshopt_encodeMeshletBound to compute worst case size) + /// vertices may be NULL, in which case vertex_count must be 0 and only triangle data is encoded + /// vertex_count and triangle_count must be <= 256. + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeMeshlet")] + public static partial ByteSize64 EncodeMeshlet( + Ptr buffer, + ByteSize64 bufferSize, + Ptr vertices, + long vertexCount, + Ptr triangles, + long triangleCount + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeMeshletBound")] + public static partial ByteSize64 EncodeMeshletBound(ByteSize64 maxVertices, ByteSize64 maxTriangles); + + /// + /// Experimental: Meshlet decoder + /// Decodes meshlet data from an array of bytes generated by meshopt_encodeMeshlet + /// Returns 0 if decoding was successful, and an error code otherwise + /// The decoder is safe to use for untrusted input, but it may produce garbage data. + /// + /// + /// + /// vertices must contain enough space for the resulting vertex data, aligned to 4 bytes (align(vertex_count * vertex_size, 4) bytes) + /// vertex_size must be 2 (16-bit vertex references) or 4 (32-bit vertex references) + /// triangles must contain enough space for the resulting triangle data, aligned to 4 bytes (align(triangle_count * triangle_size, 4) bytes) + /// triangle_size must be 3 (8-bit triangle indices) or 4 (32-bit packed triangles, stored as (a) | (b << 8) | (c << 16)) + /// vertex_count, triangle_count match those used during encoding exactly; buffer_size must be equal to the encoded size returned by meshopt_encodeMeshlet. + /// vertices may be NULL, in which case vertex_count must be 0 and the meshlet must contain just triangle data + /// + /// + /// When using "raw" decoding (meshopt_decodeMeshletRaw), both vertices and triangles should have available space further aligned to 16 bytes for efficient SIMD decoding. + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeMeshlet")] + public static partial int DecodeMeshlet( + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize, + Ptr triangles, + long triangleCount, + ByteSize64 triangleSize, + Ptr buffer, + ByteSize64 bufferSize + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeMeshletRaw")] + public static partial int DecodeMeshletRaw( + Ptr vertices, + long vertexCount, + Ptr triangles, + long triangleCount, + Ptr buffer, + ByteSize64 bufferSize + ); + + /// + /// Vertex buffer encoder + /// Encodes vertex data into an array of bytes that is generally smaller and compresses better compared to original. + /// Returns encoded data size on success, 0 on error; the only error condition is if buffer doesn't have enough space + /// This function works for a single vertex stream; for multiple vertex streams, call meshopt_encodeVertexBuffer for each stream. + /// Note that all vertex_size bytes of each vertex are encoded verbatim, including padding which should be zero-initialized. + /// For maximum efficiency the vertex buffer being encoded has to be quantized and optimized for locality of reference (cache/fetch) first. + /// + /// + /// + /// buffer must contain enough space for the encoded vertex buffer (use meshopt_encodeVertexBufferBound to compute worst case size) + /// vertex_size must be a multiple of 4 (and <= 256) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeVertexBuffer")] + public static partial ByteSize64 EncodeVertexBuffer( + Ptr buffer, + ByteSize64 bufferSize, + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeVertexBufferBound")] + public static partial ByteSize64 EncodeVertexBufferBound(long vertexCount, ByteSize64 vertexSize); + + /// + /// Vertex buffer encoder + /// Encodes vertex data just like meshopt_encodeVertexBuffer, but allows to override compression level. + /// For compression level to take effect, the vertex encoding version must be set to 1. + /// The default compression level implied by meshopt_encodeVertexBuffer is 2. + /// + /// + /// + /// buffer must contain enough space for the encoded vertex buffer (use meshopt_encodeVertexBufferBound to compute worst case size) + /// vertex_size must be a multiple of 4 (and <= 256) + /// level should be in the range [0, 3] with 0 being the fastest and 3 being the slowest and producing the best compression ratio. + /// version should be -1 to use the default version (specified via meshopt_encodeVertexVersion), or 0/1 to override the version; per above, level won't take effect if version is 0. + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeVertexBufferLevel")] + public static partial ByteSize64 EncodeVertexBufferLevel( + Ptr buffer, + ByteSize64 bufferSize, + Ptr vertices, + long vertexCount, + ByteSize64 vertexSize, + int level, + int version + ); + + /// + /// Set vertex encoder format version (defaults to 1) + /// + /// + /// + /// version must specify the data format version to encode; valid values are 0 (decodable by all library versions) and 1 (decodable by 0.23+) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeVertexVersion")] + public static partial void EncodeVertexVersion(int version); + + /// + /// Vertex buffer decoder + /// Decodes vertex data from an array of bytes generated by meshopt_encodeVertexBuffer + /// Returns 0 if decoding was successful, and an error code otherwise + /// The decoder is safe to use for untrusted input, but it may produce garbage data. + /// + /// + /// + /// destination must contain enough space for the resulting vertex buffer (vertex_count * vertex_size bytes) + /// vertex_size must be a multiple of 4 (and <= 256) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeVertexBuffer")] + public static partial int DecodeVertexBuffer( + Ptr destination, + long vertexCount, + ByteSize64 vertexSize, + Ptr buffer, + ByteSize64 bufferSize + ); + + /// + /// Get encoded vertex format version + /// Returns format version of the encoded vertex buffer, or -1 if the buffer header is invalid + /// Note that a non-negative value doesn't guarantee that the buffer will be decoded correctly if the input is malformed. + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeVertexVersion")] + public static partial int DecodeVertexVersion(Ptr buffer, ByteSize64 bufferSize); + + /// + /// Vertex buffer filters + /// These functions can be used to filter output of meshopt_decodeVertexBuffer in-place. + /// + /// + /// + /// meshopt_decodeFilterOct decodes octahedral encoding of a unit vector with K-bit signed X/Y as an input; Z must store 1.0f. + /// Each component is stored as an 8-bit or 16-bit normalized integer; stride must be equal to 4 or 8. W is preserved as is. + /// + /// + /// meshopt_decodeFilterQuat decodes 3-component quaternion encoding with K-bit component encoding and a 2-bit component index indicating which component to reconstruct. + /// Each component is stored as an 16-bit integer; stride must be equal to 8. + /// + /// + /// meshopt_decodeFilterExp decodes exponential encoding of floating-point data with 8-bit exponent and 24-bit integer mantissa as 2^E*M. + /// Each 32-bit component is decoded in isolation; stride must be divisible by 4. + /// + /// + /// meshopt_decodeFilterColor decodes RGBA colors from YCoCg (+A) color encoding where RGB is converted to YCoCg space with K-bit component encoding, and A is stored using K-1 bits. + /// Each component is stored as an 8-bit or 16-bit normalized integer; stride must be equal to 4 or 8. + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeFilterOct")] + public static partial void DecodeFilterOct(Ptr buffer, long count, ByteSize64 stride); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeFilterQuat")] + public static partial void DecodeFilterQuat(Ptr buffer, long count, ByteSize64 stride); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeFilterExp")] + public static partial void DecodeFilterExp(Ptr buffer, long count, ByteSize64 stride); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_decodeFilterColor")] + public static partial void DecodeFilterColor(Ptr buffer, long count, ByteSize64 stride); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeFilterOct")] + public static partial void EncodeFilterOct( + Ptr destination, + long count, + ByteSize64 stride, + int bits, + Ptr data + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeFilterQuat")] + public static partial void EncodeFilterQuat( + Ptr destination, + long count, + ByteSize64 stride, + int bits, + Ptr data + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeFilterExp")] + public static partial void EncodeFilterExp( + Ptr destination, + long count, + ByteSize64 stride, + int bits, + Ptr data, + MeshOptEncodeExpMode mode + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_encodeFilterColor")] + public static partial void EncodeFilterColor( + Ptr destination, + long count, + ByteSize64 stride, + int bits, + Ptr data + ); + + /// + /// Mesh simplifier + /// Reduces the number of triangles in the mesh, attempting to preserve mesh appearance as much as possible + /// The algorithm tries to preserve mesh topology and can stop short of the target goal based on topology constraints or target error. + /// If not all attributes from the input mesh are needed, it's recommended to reindex the mesh without them prior to simplification. + /// Returns the number of indices after simplification, with destination containing new index data + /// + /// + /// + /// The resulting index buffer references vertices from the original vertex buffer. + /// If the original vertex data isn't needed, creating a compact vertex buffer using meshopt_optimizeVertexFetch is recommended. + /// + /// + /// destination must contain enough space for the target index buffer, worst case is index_count elements (not target_index_count)! + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// target_error represents the error relative to mesh extents that can be tolerated, e.g. 0.01 = 1% deformation; value range [0..1] + /// options must be a bitmask composed of meshopt_SimplifyX options; 0 is a safe default + /// result_error can be NULL; when it's not NULL, it will contain the resulting (relative) error after simplification + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplify")] + public static partial ByteSize64 Simplify( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + long targetIndexCount, + float targetError, + int options, + Ptr resultError + ); + + /// + /// Mesh simplifier with attribute metric + /// Reduces the number of triangles in the mesh, attempting to preserve mesh appearance as much as possible. + /// Similar to meshopt_simplify, but incorporates attribute values into the error metric used to prioritize simplification order. + /// The algorithm tries to preserve mesh topology and can stop short of the target goal based on topology constraints or target error. + /// If not all attributes from the input mesh are needed, it's recommended to reindex the mesh without them prior to simplification. + /// Returns the number of indices after simplification, with destination containing new index data + /// + /// + /// + /// The resulting index buffer references vertices from the original vertex buffer. + /// If the original vertex data isn't needed, creating a compact vertex buffer using meshopt_optimizeVertexFetch is recommended. + /// Note that the number of attributes with non-zero weights affects memory requirements and running time. + /// + /// + /// destination must contain enough space for the target index buffer, worst case is index_count elements (not target_index_count)! + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// vertex_attributes should have attribute_count floats for each vertex + /// attribute_weights should have attribute_count floats in total; the weights determine relative priority of attributes between each other and wrt position + /// attribute_count must be <= 32 + /// vertex_lock can be NULL; when it's not NULL, it should have a value for each vertex composed of meshopt_SimplifyVertex_* flags + /// target_error represents the error relative to mesh extents that can be tolerated, e.g. 0.01 = 1% deformation; value range [0..1] + /// options must be a bitmask composed of meshopt_SimplifyX options; 0 is a safe default + /// result_error can be NULL; when it's not NULL, it will contain the resulting (relative) error after simplification + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplifyWithAttributes")] + public static partial ByteSize64 SimplifyWithAttributes( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + Ptr vertexAttributes, + ByteSize64 vertexAttributesStride, + Ptr attributeWeights, + long attributeCount, + Ptr vertexLock, + long targetIndexCount, + float targetError, + int options, + Ptr resultError + ); + + /// + /// Mesh simplifier with position/attribute update + /// Reduces the number of triangles in the mesh, attempting to preserve mesh appearance as much as possible. + /// Similar to meshopt_simplifyWithAttributes, but destructively updates positions and attribute values for optimal appearance. + /// The algorithm tries to preserve mesh topology and can stop short of the target goal based on topology constraints or target error. + /// If not all attributes from the input mesh are needed, it's recommended to reindex the mesh without them prior to simplification. + /// Returns the number of indices after simplification, indices are destructively updated with new index data + /// + /// + /// + /// The updated index buffer references vertices from the original vertex buffer, however the vertex positions and attributes are updated in-place. + /// Creating a compact vertex buffer using meshopt_optimizeVertexFetch is recommended; if the original vertex data is needed, it should be copied before simplification. + /// Note that the number of attributes with non-zero weights affects memory requirements and running time. Attributes with zero weights are not updated. + /// + /// + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// vertex_attributes should have attribute_count floats for each vertex + /// attribute_weights should have attribute_count floats in total; the weights determine relative priority of attributes between each other and wrt position + /// attribute_count must be <= 32 + /// vertex_lock can be NULL; when it's not NULL, it should have a value for each vertex composed of meshopt_SimplifyVertex_* flags + /// target_error represents the error relative to mesh extents that can be tolerated, e.g. 0.01 = 1% deformation; value range [0..1] + /// options must be a bitmask composed of meshopt_SimplifyX options; 0 is a safe default + /// result_error can be NULL; when it's not NULL, it will contain the resulting (relative) error after simplification + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplifyWithUpdate")] + public static partial ByteSize64 SimplifyWithUpdate( + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + Ptr vertexAttributes, + ByteSize64 vertexAttributesStride, + Ptr attributeWeights, + long attributeCount, + Ptr vertexLock, + long targetIndexCount, + float targetError, + int options, + Ptr resultError + ); + + /// + /// Mesh simplifier (sloppy) + /// Reduces the number of triangles in the mesh, sacrificing mesh appearance for simplification performance + /// The algorithm doesn't preserve mesh topology but can stop short of the target goal based on target error. + /// Returns the number of indices after simplification, with destination containing new index data + /// The resulting index buffer references vertices from the original vertex buffer. + /// If the original vertex data isn't needed, creating a compact vertex buffer using meshopt_optimizeVertexFetch is recommended. + /// + /// + /// + /// destination must contain enough space for the target index buffer, worst case is index_count elements (not target_index_count)! + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// vertex_lock can be NULL; when it's not NULL, it should have a value for each vertex; vertices that can't be moved should set 1 consistently for all indices with the same position + /// target_error represents the error relative to mesh extents that can be tolerated, e.g. 0.01 = 1% deformation; value range [0..1] + /// result_error can be NULL; when it's not NULL, it will contain the resulting (relative) error after simplification + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplifySloppy")] + public static partial ByteSize64 SimplifySloppy( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + Ptr vertexLock, + long targetIndexCount, + float targetError, + Ptr resultError + ); + + /// + /// Mesh simplifier (pruner) + /// Reduces the number of triangles in the mesh by removing small isolated parts of the mesh + /// Returns the number of indices after simplification, with destination containing new index data + /// The resulting index buffer references vertices from the original vertex buffer. + /// If the original vertex data isn't needed, creating a compact vertex buffer using meshopt_optimizeVertexFetch is recommended. + /// + /// + /// + /// destination must contain enough space for the target index buffer, worst case is index_count elements + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// target_error represents the error relative to mesh extents that can be tolerated, e.g. 0.01 = 1% deformation; value range [0..1] + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplifyPrune")] + public static partial ByteSize64 SimplifyPrune( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + float targetError + ); + + /// + /// Point cloud simplifier + /// Reduces the number of points in the cloud to reach the given target + /// Returns the number of points after simplification, with destination containing new index data + /// The resulting index buffer references vertices from the original vertex buffer. + /// If the original vertex data isn't needed, creating a compact vertex buffer using meshopt_optimizeVertexFetch is recommended. + /// + /// + /// + /// destination must contain enough space for the target index buffer (target_vertex_count elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// vertex_colors can be NULL; when it's not NULL, it should have float3 color in the first 12 bytes of each vertex + /// color_weight determines relative priority of color wrt position; 1.0 is a safe default + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplifyPoints")] + public static partial ByteSize64 SimplifyPoints( + Ptr destination, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + Ptr vertexColors, + ByteSize64 vertexColorsStride, + float colorWeight, + long targetVertexCount + ); + + /// + /// Returns the error scaling factor used by the simplifier to convert between absolute and relative extents + /// + /// + /// + /// Absolute error must be divided by the scaling factor before passing it to meshopt_simplify as target_error + /// Relative error returned by meshopt_simplify via result_error must be multiplied by the scaling factor to get absolute error. + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_simplifyScale")] + public static partial float SimplifyScale( + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Mesh stripifier + /// Converts a previously vertex cache optimized triangle list to triangle strip, stitching strips using restart index or degenerate triangles + /// Returns the number of indices in the resulting strip, with destination containing new index data + /// For maximum efficiency the index buffer being converted has to be optimized for vertex cache first. + /// Using restart indices can result in ~10% smaller index buffers, but on some GPUs restart indices may result in decreased performance. + /// + /// + /// + /// destination must contain enough space for the target index buffer, worst case can be computed with meshopt_stripifyBound + /// restart_index should be 0xffff or 0xffffffff depending on index size, or 0 to use degenerate triangles + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_stripify")] + public static partial ByteSize64 Stripify( + Ptr destination, + Ptr indices, + long indexCount, + long vertexCount, + int restartIndex + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_stripifyBound")] + public static partial ByteSize64 StripifyBound(long indexCount); + + /// + /// Mesh unstripifier + /// Converts a triangle strip to a triangle list + /// Returns the number of indices in the resulting list, with destination containing new index data + /// + /// + /// + /// destination must contain enough space for the target index buffer, worst case can be computed with meshopt_unstripifyBound + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_unstripify")] + public static partial ByteSize64 Unstripify( + Ptr destination, + Ptr indices, + long indexCount, + int restartIndex + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_unstripifyBound")] + public static partial ByteSize64 UnstripifyBound(long indexCount); + + /// + /// Vertex transform cache analyzer + /// Returns cache hit statistics using a simplified FIFO model + /// Results may not match actual GPU performance + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_analyzeVertexCache")] + public static partial MeshOptVertexCacheStatistics AnalyzeVertexCache( + Ptr indices, + long indexCount, + long vertexCount, + int cacheSize, + int warpSize, + int primgroupSize + ); + + /// + /// Vertex fetch cache analyzer + /// Returns cache hit statistics using a simplified direct mapped model + /// Results may not match actual GPU performance + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_analyzeVertexFetch")] + public static partial MeshOptVertexFetchStatistics AnalyzeVertexFetch( + Ptr indices, + long indexCount, + long vertexCount, + ByteSize64 vertexSize + ); + + /// + /// Overdraw analyzer + /// Returns overdraw statistics using a software rasterizer + /// Results may not match actual GPU performance + /// + /// + /// + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_analyzeOverdraw")] + public static partial MeshOptOverdrawStatistics AnalyzeOverdraw( + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Coverage analyzer + /// Returns coverage statistics (ratio of viewport pixels covered from each axis) using a software rasterizer + /// + /// + /// + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_analyzeCoverage")] + public static partial MeshOptCoverageStatistics AnalyzeCoverage( + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Meshlet builder + /// Splits the mesh into a set of meshlets where each meshlet has a micro index buffer indexing into meshlet vertices that refer to the original vertex buffer + /// The resulting data can be used to render meshes using NVidia programmable mesh shading pipeline, or in other cluster-based renderers. + /// When targeting mesh shading hardware, for maximum efficiency meshlets should be further optimized using meshopt_optimizeMeshlet. + /// When using buildMeshlets, vertex positions need to be provided to minimize the size of the resulting clusters. + /// When using buildMeshletsScan, for maximum efficiency the index buffer being converted has to be optimized for vertex cache first. + /// + /// + /// + /// meshlets must contain enough space for all meshlets, worst case size can be computed with meshopt_buildMeshletsBound + /// meshlet_vertices must contain enough space for all meshlets, worst case is index_count elements (not vertex_count!) + /// meshlet_triangles must contain enough space for all meshlets, worst case is index_count elements + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// max_vertices and max_triangles must not exceed implementation limits (max_vertices <= 256, max_triangles <= 512) + /// cone_weight should be set to 0 when cone culling is not used, and a value between 0 and 1 otherwise to balance between cluster size and cone culling efficiency + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_buildMeshlets")] + public static partial ByteSize64 BuildMeshlets( + Ptr meshlets, + Ptr meshletVertices, + Ptr meshletTriangles, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + ByteSize64 maxVertices, + ByteSize64 maxTriangles, + float coneWeight + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_buildMeshletsScan")] + public static partial ByteSize64 BuildMeshletsScan( + Ptr meshlets, + Ptr meshletVertices, + Ptr meshletTriangles, + Ptr indices, + long indexCount, + long vertexCount, + ByteSize64 maxVertices, + ByteSize64 maxTriangles + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_buildMeshletsBound")] + public static partial ByteSize64 BuildMeshletsBound( + long indexCount, + ByteSize64 maxVertices, + ByteSize64 maxTriangles + ); + + /// + /// Meshlet builder with flexible cluster sizes + /// Splits the mesh into a set of meshlets, similarly to meshopt_buildMeshlets, but allows to specify minimum and maximum number of triangles per meshlet. + /// Clusters between min and max triangle counts are split when the cluster size would have exceeded the expected cluster size by more than split_factor. + /// + /// + /// + /// meshlets must contain enough space for all meshlets, worst case size can be computed with meshopt_buildMeshletsBound using min_triangles (not max!) + /// meshlet_vertices must contain enough space for all meshlets, worst case is index_count elements (not vertex_count!) + /// meshlet_triangles must contain enough space for all meshlets, worst case is index_count elements + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// max_vertices, min_triangles and max_triangles must not exceed implementation limits (max_vertices <= 256, max_triangles <= 512; min_triangles <= max_triangles) + /// cone_weight should be set to 0 when cone culling is not used, and a value between 0 and 1 otherwise to balance between cluster size and cone culling efficiency + /// split_factor should be set to a non-negative value; when greater than 0, clusters that have large bounds may be split unless they are under the min_triangles threshold + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_buildMeshletsFlex")] + public static partial ByteSize64 BuildMeshletsFlex( + Ptr meshlets, + Ptr meshletVertices, + Ptr meshletTriangles, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + ByteSize64 maxVertices, + ByteSize64 minTriangles, + ByteSize64 maxTriangles, + float coneWeight, + float splitFactor + ); + + /// + /// Meshlet builder that produces clusters optimized for raytracing + /// Splits the mesh into a set of meshlets, similarly to meshopt_buildMeshlets, but optimizes cluster subdivision for raytracing and allows to specify minimum and maximum number of triangles per meshlet. + /// + /// + /// + /// meshlets must contain enough space for all meshlets, worst case size can be computed with meshopt_buildMeshletsBound using min_triangles (not max!) + /// meshlet_vertices must contain enough space for all meshlets, worst case is index_count elements (not vertex_count!) + /// meshlet_triangles must contain enough space for all meshlets, worst case is index_count elements + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// max_vertices, min_triangles and max_triangles must not exceed implementation limits (max_vertices <= 256, max_triangles <= 512; min_triangles <= max_triangles) + /// fill_weight allows to prioritize clusters that are closer to maximum size at some cost to SAH quality; 0.5 is a safe default + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_buildMeshletsSpatial")] + public static partial ByteSize64 BuildMeshletsSpatial( + Ptr meshlets, + Ptr meshletVertices, + Ptr meshletTriangles, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + ByteSize64 maxVertices, + ByteSize64 minTriangles, + ByteSize64 maxTriangles, + float fillWeight + ); + + /// + /// Meshlet optimizer + /// Reorders meshlet vertices and triangles to maximize locality which can improve rasterizer throughput or ray tracing performance when using fast-build modes. + /// + /// + /// + /// meshlet_triangles and meshlet_vertices must refer to meshlet data; when buildMeshlets* is used, these need to be computed from meshlet's vertex_offset and triangle_offset + /// triangle_count and vertex_count must not exceed implementation limits (vertex_count <= 256, triangle_count <= 512) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeMeshlet")] + public static partial void OptimizeMeshlet( + Ptr meshletVertices, + Ptr meshletTriangles, + long triangleCount, + long vertexCount + ); + + /// + /// Experimental: Meshlet optimizer + /// Reorders meshlet vertices and triangles to maximize locality, with higher levels resulting in smaller compressed size at the cost of optimization time. + /// At level 0 the result is equivalent to meshopt_optimizeMeshlet; levels >= 1 may rotate triangle corners to improve compression (which can change provoking vertex and affect OMM data). + /// + /// + /// + /// level should be in the range [0, 9] with 0 equivalent to meshopt_optimizeMeshlet and 9 being the slowest; the sweet spot for compression ratio is around 3 + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_optimizeMeshletLevel")] + public static partial void OptimizeMeshletLevel( + Ptr meshletVertices, + long vertexCount, + Ptr meshletTriangles, + long triangleCount, + int level + ); + + /// + /// Cluster bounds generator + /// Creates bounding volumes that can be used for frustum, backface and occlusion culling. + /// + /// + /// + /// For backface culling with orthographic projection, use the following formula to reject backfacing clusters: + /// dot(view, cone_axis) >= cone_cutoff + /// + /// + /// For perspective projection, you can use the formula that needs cone apex in addition to axis & cutoff: + /// dot(normalize(cone_apex - camera_position), cone_axis) >= cone_cutoff + /// + /// + /// Alternatively, you can use the formula that doesn't need cone apex and uses bounding sphere instead: + /// dot(normalize(center - camera_position), cone_axis) >= cone_cutoff + radius / length(center - camera_position) + /// or an equivalent formula that doesn't have a singularity at center = camera_position: + /// dot(center - camera_position, cone_axis) >= cone_cutoff * length(center - camera_position) + radius + /// + /// + /// The formula that uses the apex is slightly more accurate but needs the apex; if you are already using bounding sphere + /// to do frustum/occlusion culling, the formula that doesn't use the apex may be preferable (for derivation see + /// Real-Time Rendering 4th Edition, section 19.3). + /// + /// + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// vertex_count should specify the number of vertices in the entire mesh, not cluster or meshlet + /// indices should have at most 256 unique vertex indices + /// index_count/3 and triangle_count must not exceed implementation limits (<= 512) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_computeClusterBounds")] + public static partial MeshOptBounds ComputeClusterBounds( + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_computeMeshletBounds")] + public static partial MeshOptBounds ComputeMeshletBounds( + Ptr meshletVertices, + Ptr meshletTriangles, + long triangleCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Sphere bounds generator + /// Creates bounding sphere around a set of points or a set of spheres; returns the center and radius of the sphere, with other fields of the result set to 0. + /// + /// + /// + /// positions should have float3 position in the first 12 bytes of each element + /// radii can be NULL; when it's not NULL, it should have a non-negative float radius in the first 4 bytes of each element + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_computeSphereBounds")] + public static partial MeshOptBounds ComputeSphereBounds( + Ptr positions, + long count, + ByteSize64 positionsStride, + Ptr radii, + ByteSize64 radiiStride + ); + + /// + /// Experimental: Extract meshlet-local vertex and triangle indices from absolute cluster indices. + /// Fills triangles[] and vertices[] such that vertices[triangles[i]] == indices[i], and returns the number of unique vertices. + /// + /// + /// + /// indices should have at most 256 unique vertex indices + /// index_count/3 must not exceed implementation limits (<= 512) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_extractMeshletIndices")] + public static partial ByteSize64 ExtractMeshletIndices( + Ptr vertices, + Ptr triangles, + Ptr indices, + long indexCount + ); + + /// + /// Cluster partitioner + /// Partitions clusters into groups of similar size, prioritizing grouping clusters that share vertices or are close to each other. + /// When vertex positions are not provided, only clusters that share vertices will be grouped together, which may result in small partitions for some inputs. + /// + /// + /// + /// destination must contain enough space for the resulting partition data (cluster_count elements) + /// destination[i] will contain the partition id for cluster i, with the total number of partitions returned by the function + /// cluster_indices should have the vertex indices referenced by each cluster, stored sequentially + /// cluster_index_counts should have the number of indices in each cluster; sum of all cluster_index_counts must be equal to total_index_count + /// vertex_positions can be NULL; when it's not NULL, it should have float3 position in the first 12 bytes of each vertex + /// target_partition_size is a target size for each partition, in clusters; the resulting partitions may be smaller or larger (up to target + target/3) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_partitionClusters")] + public static partial ByteSize64 PartitionClusters( + Ptr destination, + Ptr clusterIndices, + long totalIndexCount, + Ptr clusterIndexCounts, + long clusterCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + ByteSize64 targetPartitionSize + ); + + /// + /// Spatial sorter + /// Generates a remap table that can be used to reorder points for spatial locality. + /// Resulting remap table maps old vertices to new vertices and can be used in meshopt_remapVertexBuffer. + /// + /// + /// + /// destination must contain enough space for the resulting remap table (vertex_count elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_spatialSortRemap")] + public static partial void SpatialSortRemap( + Ptr destination, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Spatial sorter + /// Reorders triangles for spatial locality, and generates a new index buffer. The resulting index buffer can be used with other functions like optimizeVertexCache. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (index_count elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_spatialSortTriangles")] + public static partial void SpatialSortTriangles( + Ptr destination, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride + ); + + /// + /// Spatial clusterizer + /// Reorders points into clusters optimized for spatial locality, and generates a new index buffer. + /// Ensures the output can be split into cluster_size chunks where each chunk has good positional locality. Only the last chunk will be smaller than cluster_size. + /// + /// + /// + /// destination must contain enough space for the resulting index buffer (vertex_count elements) + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_spatialClusterPoints")] + public static partial void SpatialClusterPoints( + Ptr destination, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + ByteSize64 clusterSize + ); + + /// + /// Experimental: Opacity micromap generator (measure) + /// Computes a subdivision level for each input triangle, as well as deduplicating the triangles that reference the same UVs to reduce rasterization requests. + /// Returns the number of OMM entries. + /// + /// + /// + /// levels and sources must contain enough space for the worst case output (index_count/3 elements, one per resulting OMM entry) + /// levels[i] will contain the subdivision level for entry i, with the total number of entries returned by the function; each entry should be rasterized from triangle index sources[i] + /// omm_indices must contain enough space for the resulting OMM indices (index_count/3 elements, one per triangle) + /// vertex_uvs should have float2 texture coordinate in the first 8 bytes of each vertex + /// max_level specifies the maximum subdivision level (0..12) + /// target_edge can be 0; when >0, triangle subdivision is adaptive and targets target_edge^2 texel area + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_opacityMapMeasure")] + public static partial ByteSize64 OpacityMapMeasure( + Ptr levels, + Ptr sources, + Ptr ommIndices, + Ptr indices, + long indexCount, + Ptr vertexUvs, + long vertexCount, + ByteSize64 vertexUvsStride, + int textureWidth, + int textureHeight, + int maxLevel, + float targetEdge + ); + + /// + /// Experimental: Opacity micromap generator (rasterize) + /// Rasterizes opacity state for a single triangle entry by sampling the alpha texture, using bilinear filtering and 0.5 alpha cutoff. + /// + /// + /// + /// result should contain enough space for the output opacity data (which can be computed using meshopt_opacityMapEntrySize) + /// level specifies the subdivision level (0..12) + /// states should be 2 for 2-state format (opaque/transparent) and 4 for 4-state format (opaque/transparent/unknown) + /// uv0/uv1/uv2 should refer to a float2 texture coordinate for each triangle corner; note that micromap data is sensitive to the corner order + /// texture_data should point to the alpha channel of the first pixel, encoded as UNORM8 + /// texture_stride specifies the distance in bytes between consecutive pixels, e.g. 4 for RGBA input + /// texture_pitch specifies the distance in bytes between consecutive rows, e.g. 4*texture_width for tightly packed RGBA input + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_opacityMapRasterize")] + public static partial void OpacityMapRasterize( + Ptr result, + int level, + int states, + Ptr uv0, + Ptr uv1, + Ptr uv2, + Ptr textureData, + ByteSize64 textureStride, + ByteSize64 texturePitch, + int textureWidth, + int textureHeight + ); + + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_opacityMapEntrySize")] + public static partial ByteSize64 OpacityMapEntrySize(int level, int states); + + /// + /// Experimental: Opacity micromap generator (compact) + /// Compacts and deduplicates opacity data, merging identical micromap entries and replacing micromap states with special indices (-4..-1) when possible. + /// Returns the number of OMM entries after compaction; the data array should be trimmed using the last offset/size. + /// + /// + /// + /// data should contain opacity data for all input/output entries + /// levels should contain subdivision levels for all input/output entries + /// offsets should contain offset into data[] for each entry + /// levels[i] and offsets[i] will be updated with post-compaction level/offset for entry i, with the total number of entries returned by the function + /// omm_indices should contain indices into the original OMM data, and will be updated with a new index or a special index (-4..-1) when possible + /// states should be 2 for 2-state format (opaque/transparent) and 4 for 4-state format (opaque/transparent/unknown) + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_opacityMapCompact")] + public static partial ByteSize64 OpacityMapCompact( + Ptr data, + ByteSize64 dataSize, + Ptr levels, + Ptr offsets, + long ommCount, + Ptr ommIndices, + long triangleCount, + int states + ); + + /// + /// Experimental: Tangent space generator + /// Computes per-corner tangent vectors; for each corner, computes normalized tangent vector (xyz) and orientation (w, +/-1). + /// Bitangent can be reconstructed via cross(normal, tangent.xyz) * tangent.w. + /// To apply tangents to the mesh, either deindex and reindex it with the tangent stream, or copy tangents to existing vertex data while duplicating + /// vertices with different tangent vectors (e.g. on UV mirror seams). + /// Input can be indexed or unindexed (indices=NULL); this does not affect the resulting tangents, but indexed inputs are ~30% faster to process. + /// + /// + /// + /// result must contain enough space for the output tangent data (index_count*4 elements) + /// indices can be NULL if the input is unindexed + /// vertex_positions should have float3 position in the first 12 bytes of each vertex + /// vertex_normals should have unit float3 normal in the first 12 bytes of each vertex + /// vertex_uvs should have float2 texture coordinate in the first 8 bytes of each vertex + /// + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_generateTangents")] + public static partial void GenerateTangents( + Ptr result, + Ptr indices, + long indexCount, + Ptr vertexPositions, + long vertexCount, + ByteSize64 vertexPositionsStride, + Ptr vertexNormals, + ByteSize64 vertexNormalsStride, + Ptr vertexUvs, + ByteSize64 vertexUvsStride, + int options + ); + + /// + /// Quantize a float into half-precision (as defined by IEEE-754 fp16) floating point value + /// Generates +-inf for overflow, preserves NaN, flushes denormals to zero, rounds to nearest + /// Representable magnitude range: [6e-5; 65504] + /// Maximum relative reconstruction error: 5e-4 + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_quantizeHalf")] + public static partial ushort QuantizeHalf(float v); + + /// + /// Quantize a float into a floating point value with a limited number of significant mantissa bits, preserving the IEEE-754 fp32 binary representation + /// Preserves infinities/NaN, flushes denormals to zero, rounds to nearest + /// Assumes N is in a valid mantissa precision range, which is 1..23 + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_quantizeFloat")] + public static partial float QuantizeFloat(float v, int n); + + /// + /// Reverse quantization of a half-precision (as defined by IEEE-754 fp16) floating point value + /// Preserves Inf/NaN, flushes denormals to zero + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_dequantizeHalf")] + public static partial float DequantizeHalf(ushort h); + + /// + /// Set allocation callbacks + /// These callbacks will be used instead of the default operator new/operator delete for all temporary allocations in the library. + /// Note that all algorithms only allocate memory for temporary use. + /// allocate/deallocate are always called in a stack-like order - last pointer to be allocated is deallocated first. + /// + [LibraryImport("meshoptimizer", EntryPoint = "meshopt_setAllocator")] + public static unsafe partial void SetAllocator( + delegate* unmanaged[Cdecl] allocate, + delegate* unmanaged[Cdecl] deallocate + ); + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptBounds.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptBounds.cs new file mode 100644 index 0000000..5366371 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptBounds.cs @@ -0,0 +1,35 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct MeshOptBounds + { + /// bounding sphere, useful for frustum and occlusion culling + [FieldOffset(0)] + public float3 Center; + + [FieldOffset(12)] + public float Radius; + + /// normal cone, useful for backface culling + [FieldOffset(16)] + public float3 ConeApex; + + [FieldOffset(28)] + public float3 ConeAxis; + + /// = cos(angle/2) + [FieldOffset(40)] + public float ConeCutoff; + + /// normal cone axis and cutoff, stored in 8-bit SNORM format; decode using x/127.0 + [FieldOffset(44)] + public byte3 ConeAxisS8; + + [FieldOffset(47)] + public byte ConeCutoffS8; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptCoverageStatistics.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptCoverageStatistics.cs new file mode 100644 index 0000000..2d138c7 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptCoverageStatistics.cs @@ -0,0 +1,17 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct MeshOptCoverageStatistics + { + [FieldOffset(0)] + public float3 Coverage; + + /// viewport size in mesh coordinates + [FieldOffset(12)] + public float Extent; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptMeshlet.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptMeshlet.cs new file mode 100644 index 0000000..5997c62 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptMeshlet.cs @@ -0,0 +1,24 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct MeshOptMeshlet + { + /// offsets within meshlet_vertices and meshlet_triangles arrays with meshlet data + [FieldOffset(0)] + public int VertexOffset; + + [FieldOffset(4)] + public int TriangleOffset; + + /// number of vertices and triangles used in the meshlet; data is stored in consecutive range [offset..offset+count) for vertices and [offset..offset+count*3) for triangles + [FieldOffset(8)] + public int VertexCount; + + [FieldOffset(12)] + public int TriangleCount; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptOverdrawStatistics.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptOverdrawStatistics.cs new file mode 100644 index 0000000..c248529 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptOverdrawStatistics.cs @@ -0,0 +1,20 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 12)] + public unsafe partial struct MeshOptOverdrawStatistics + { + [FieldOffset(0)] + public int PixelsCovered; + + [FieldOffset(4)] + public int PixelsShaded; + + /// shaded pixels / covered pixels; best case 1.0 + [FieldOffset(8)] + public float Overdraw; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptStream.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptStream.cs new file mode 100644 index 0000000..95d6463 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptStream.cs @@ -0,0 +1,19 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct MeshOptStream + { + [FieldOffset(0)] + public Ptr Data; + + [FieldOffset(8)] + public ByteSize64 Size; + + [FieldOffset(16)] + public ByteSize64 Stride; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexCacheStatistics.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexCacheStatistics.cs new file mode 100644 index 0000000..a5b9a85 --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexCacheStatistics.cs @@ -0,0 +1,24 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct MeshOptVertexCacheStatistics + { + [FieldOffset(0)] + public int VerticesTransformed; + + [FieldOffset(4)] + public int WarpsExecuted; + + /// transformed vertices / triangle count; best case 0.5, worst case 3.0, optimum depends on topology + [FieldOffset(8)] + public float Acmr; + + /// transformed vertices / vertex count; best case 1.0, worst case 6.0, optimum is 1.0 (each vertex is transformed once) + [FieldOffset(12)] + public float Atvr; + } +} diff --git a/Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexFetchStatistics.cs b/Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexFetchStatistics.cs new file mode 100644 index 0000000..92292cd --- /dev/null +++ b/Brutal.MeshOptimizer/Generated/Structs/MeshOptVertexFetchStatistics.cs @@ -0,0 +1,17 @@ +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; + +namespace Brutal.MeshOptimizer +{ + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct MeshOptVertexFetchStatistics + { + [FieldOffset(0)] + public int BytesFetched; + + /// fetched bytes / vertex buffer size; best case 1.0 (each byte is fetched once) + [FieldOffset(4)] + public float Overfetch; + } +} diff --git a/Brutal.MeshOptimizer/GlobalUsings.cs b/Brutal.MeshOptimizer/GlobalUsings.cs new file mode 100644 index 0000000..253a5dd --- /dev/null +++ b/Brutal.MeshOptimizer/GlobalUsings.cs @@ -0,0 +1 @@ +global using System.Runtime.InteropServices; diff --git a/Brutal.MeshOptimizer/LICENSES/BRUTAL-MESHOPTIMIZER-THIRD-PARTY-NOTICES.txt b/Brutal.MeshOptimizer/LICENSES/BRUTAL-MESHOPTIMIZER-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..efdb35c --- /dev/null +++ b/Brutal.MeshOptimizer/LICENSES/BRUTAL-MESHOPTIMIZER-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,44 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.MeshOptimizer + +Brutal.MeshOptimizer redistributes one third-party component, meshoptimizer, as native +libraries on every runtime identifier it supports. It is reproduced below with the +license that governs it. + +============================================================================== +meshoptimizer +============================================================================== + + Name meshoptimizer, a mesh optimisation library + Version 1.1 + built from upstream v1.1.1-36-gc8359675 + Upstream https://github.com/zeux/meshoptimizer + SPDX MIT + Shipped as meshoptimizer.dll (win-x64), libmeshoptimizer.so (linux-x64), + libmeshoptimizer.dylib (osx-arm64) + + Built from meshoptimizer's own sources only. The upstream project also carries cgltf, + fast_obj and sdefl; all three belong to gltfpack, a separate executable this build + does not produce, so none of them reaches the library shipped here. + +MIT License + +Copyright (c) 2016-2026 Arseny Kapoulkine + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Brutal.Monitor.Common/CrashTail.cs b/Brutal.Monitor.Common/CrashTail.cs new file mode 100644 index 0000000..9eb5c61 --- /dev/null +++ b/Brutal.Monitor.Common/CrashTail.cs @@ -0,0 +1,250 @@ +using System.Buffers; +using System.IO.MemoryMappedFiles; +using System.Text; +using System.Text.Unicode; + +namespace Brutal.Monitor.Common; + +/// +/// Ring buffer of the most recent log lines in a memory-mapped file, so the log tail +/// survives a crash that kills the host before it flushes. Written by the host, read by +/// the monitor subprocess. +/// +internal sealed class CrashTailRing : IDisposable +{ + // Layout: header, then slotCount slots of [long seq][int length][utf8 payload] + internal const long Magic = 0x4C49_4154_5242_4D42; + internal const int Version = 1; + internal const int HeaderSize = 64; + internal const int SlotHeaderSize = 12; + + internal const int DefaultSlotCount = 1024; + + // A logged exception's stack trace runs to several KB, and a clipped one is worth little here + internal const int DefaultSlotSize = 4096; + + // Kept at the end of a slot so a clipped line says so rather than looking complete + private static ReadOnlySpan TruncatedMarker => " [truncated]"u8; + + private readonly MemoryMappedFile _file; + private readonly MemoryMappedViewAccessor _accessor; + private readonly int _slotCount; + private readonly int _slotSize; + private long _sequence; + private int _disposed; + + // Set when the host is dying, so disposal leaves the tail behind instead of retiring it + private volatile bool _preserve; + + public string FilePath { get; } + + /// Total records ever written; the ring holds the most recent SlotCount. + public long Sequence => Interlocked.Read(ref _sequence); + + public int SlotCount => _slotCount; + public int SlotSize => _slotSize; + + public CrashTailRing(string filePath, int slotCount = DefaultSlotCount, int slotSize = DefaultSlotSize) + { + ArgumentOutOfRangeException.ThrowIfLessThan(slotCount, 1); + + // A slot has to hold its header, the truncation marker and some of a line + ArgumentOutOfRangeException.ThrowIfLessThan(slotSize, SlotHeaderSize + TruncatedMarker.Length + 1); + + FilePath = filePath; + _slotCount = slotCount; + _slotSize = slotSize; + + // Shared so the subprocess can map the ring while we hold it open + var stream = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); + var size = HeaderSize + (long)slotCount * slotSize; + _file = MemoryMappedFile.CreateFromFile( + stream, + null, + size, + MemoryMappedFileAccess.ReadWrite, + HandleInheritability.None, + leaveOpen: false + ); + _accessor = _file.CreateViewAccessor(); + + _accessor.Write(0, Magic); + _accessor.Write(8, Version); + _accessor.Write(12, slotCount); + _accessor.Write(16, slotSize); + } + + /// + /// Write a log line straight into the mapped memory, allocation-free and safe from any + /// thread. A writer preempted for a full ring of messages can cost one line of tail. + /// + public unsafe void Write(string message) + { + var seq = Interlocked.Increment(ref _sequence); + var slot = (int)((seq - 1) % _slotCount); + var offset = HeaderSize + (long)slot * _slotSize; + + // Acquire/Release pins the mapping so a concurrent Dispose can't pull it from under us + var handle = _accessor.SafeMemoryMappedViewHandle; + byte* pointer = null; + handle.AcquirePointer(ref pointer); + try + { + // Seqlock write: invalidate the slot, fill it, then publish the new sequence + var slotPointer = pointer + _accessor.PointerOffset + offset; + + // Full-fence store, so the payload below cannot reorder ahead of the invalidation + Interlocked.Exchange(ref *(long*)slotPointer, 0); + + // Encoded short of the marker's room, so a clipped line is marked instead of lost quietly + var payload = new Span(slotPointer + SlotHeaderSize, _slotSize - SlotHeaderSize); + var status = Utf8.FromUtf16(message, payload[..^TruncatedMarker.Length], out _, out var length); + if (status == OperationStatus.DestinationTooSmall) + { + TruncatedMarker.CopyTo(payload[length..]); + length += TruncatedMarker.Length; + } + + *(int*)(slotPointer + 8) = length; + + // No barrier needed here: this release store already orders the payload ahead of itself + Volatile.Write(ref *(long*)slotPointer, seq); + } + finally + { + handle.ReleasePointer(); + } + } + + /// Keep the ring on disposal, so a crash unwinding through the host's cleanup leaves its tail. + public void Preserve() + { + _preserve = true; + } + + public void Dispose() + { + // Idempotent - shutdown paths can overlap, and a second pass must not throw + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + // Only a clean exit retires the tail; a crash leaves it readable for the next run + if (!_preserve) + { + // Invalidated first so nothing can be recovered even if the delete below fails + try + { + _accessor.Write(0, 0L); + _accessor.Flush(); + } + catch (Exception) { } + } + + _accessor.Dispose(); + _file.Dispose(); + + if (_preserve) + return; + + // Best effort - if the subprocess still maps it, the next instance's sweep removes it + try + { + File.Delete(FilePath); + } + catch (IOException) { } + catch (UnauthorizedAccessException) { } + } +} + +/// +/// Reads a CrashTailRing and writes its surviving records, oldest first, as plain text, +/// under a header saying how many lines these are and where the full log lives. +/// +public static class CrashTailSnapshot +{ + /// Nothing to recover: the ring is missing, foreign, or was cleanly retired. + public const int NoTail = -1; + + /// The snapshot failed, so the ring may still hold a recoverable tail. + public const int SnapshotFailed = -2; + + /// + /// Returns the number of log lines recovered, NoTail, or SnapshotFailed. Writes no file + /// when there is nothing to recover. + /// + public static int TryWrite(string ringPath, string outputPath) + { + try + { + if (!File.Exists(ringPath)) + return NoTail; + + using var stream = new FileStream(ringPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + using var file = MemoryMappedFile.CreateFromFile( + stream, + null, + 0, + MemoryMappedFileAccess.Read, + HandleInheritability.None, + leaveOpen: false + ); + using var accessor = file.CreateViewAccessor(0, 0, MemoryMappedFileAccess.Read); + + if (accessor.ReadInt64(0) != CrashTailRing.Magic || accessor.ReadInt32(8) != CrashTailRing.Version) + return NoTail; + var slotCount = accessor.ReadInt32(12); + var slotSize = accessor.ReadInt32(16); + if (slotCount <= 0 || slotSize <= CrashTailRing.SlotHeaderSize) + return NoTail; + + var records = new List<(long Seq, string Line)>(slotCount); + var payload = new byte[slotSize - CrashTailRing.SlotHeaderSize]; + + for (int slot = 0; slot < slotCount; slot++) + { + var offset = CrashTailRing.HeaderSize + (long)slot * slotSize; + + // Seqlock read: a slot whose seq moves under us is mid-write, so skip it + var seqBefore = accessor.ReadInt64(offset); + if (seqBefore <= 0) + continue; + + // The seq read must land before the payload reads, or a torn line can pass the recheck + Thread.MemoryBarrier(); + + var length = accessor.ReadInt32(offset + 8); + if (length <= 0 || length > payload.Length) + continue; + + accessor.ReadArray(offset + CrashTailRing.SlotHeaderSize, payload, 0, length); + Thread.MemoryBarrier(); + if (accessor.ReadInt64(offset) != seqBefore) + continue; + + records.Add((seqBefore, Encoding.UTF8.GetString(payload, 0, length))); + } + + records.Sort((a, b) => a.Seq.CompareTo(b.Seq)); + + // An empty file would read as a lost tail rather than no tail + if (records.Count == 0) + return 0; + + using var writer = File.CreateText(outputPath); + + // These are only the last lines of a run, so say so and point at the whole log + var logName = Path.GetFileNameWithoutExtension(ringPath); + writer.WriteLine($"[Brutal.Monitor] the most recent {records.Count} log lines - full history in {logName}"); + + foreach (var record in records) + writer.WriteLine(record.Line); + + return records.Count; + } + catch (Exception) + { + // Best effort - a failed snapshot must never break dump collection + return SnapshotFailed; + } + } +} diff --git a/Brutal.Monitor.Common/MonitorFileNames.cs b/Brutal.Monitor.Common/MonitorFileNames.cs new file mode 100644 index 0000000..c6c4e7e --- /dev/null +++ b/Brutal.Monitor.Common/MonitorFileNames.cs @@ -0,0 +1,74 @@ +using System.Diagnostics; +using System.Globalization; + +namespace Brutal.Monitor.Common; + +/// +/// Naming shared by everything one run produces: every file carries "<name>.<start time>.<pid>", +/// so a dump can be matched to its log and instances or reused pids never collide. +/// +internal static class MonitorFileNames +{ + // Local time; the dash keeps a run's suffix distinct from an archive's all-numeric "." + internal const string StampFormat = "yyMMdd-HHmmss"; + + /// This process's start time as a stamp; the subprocess is handed the host's, never its own. + public static string ProcessStamp { get; } = Stamp(CurrentProcessStart()); + + /// One run's file stem: "<name>.<stamp>.<pid>", the identity all its files carry. + public static string Stem(string name, string stamp, int processId) + { + return $"{name}.{stamp}.{processId}"; + } + + /// Format a start time as a stem's timestamp part. + public static string Stamp(DateTime startTime) + { + return startTime.ToString(StampFormat, CultureInfo.InvariantCulture); + } + + /// True when this suffix part is a run stamp, so stray files never parse as runs. + public static bool IsStamp(string part) + { + return DateTime.TryParseExact(part, StampFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out _); + } + + /// + /// The dot-separated parts following "<name>." in a file's name, or null when the file + /// doesn't belong to that name. Directory globs are not enough on their own, since + /// "Gruntz.*" also matches Gruntz.client's files. + /// + public static string[]? OwnedSuffix(string fileName, string name) + { + var stem = Path.GetFileNameWithoutExtension(fileName); + if (!stem.StartsWith(name + ".", StringComparison.Ordinal)) + return null; + + return stem[(name.Length + 1)..].Split('.'); + } + + /// Match an archive named "<name>.<yyMMdd>.<index>". + public static bool TryParseArchive(string fileName, string name, out int timeStamp, out int index) + { + timeStamp = 0; + index = 0; + + return OwnedSuffix(fileName, name) is { Length: 2 } suffix + && int.TryParse(suffix[0], out timeStamp) + && int.TryParse(suffix[1], out index); + } + + private static DateTime CurrentProcessStart() + { + try + { + using var process = Process.GetCurrentProcess(); + return process.StartTime; + } + catch (Exception) + { + // A start time the OS will not give still has to name this run's files + return DateTime.Now; + } + } +} diff --git a/Brutal.Monitor.Common/ProcessExtension.cs b/Brutal.Monitor.Common/ProcessExtension.cs new file mode 100644 index 0000000..258243d --- /dev/null +++ b/Brutal.Monitor.Common/ProcessExtension.cs @@ -0,0 +1,20 @@ +using System.Diagnostics; + +namespace Brutal.Monitor.Common +{ + internal static class ProcessExtension + { + public static void WriteLineSync(this Process process, string line) + { + // Called from crash handlers, so a dead child's broken pipe must never throw + try + { + lock (process.StandardInput) + process.StandardInput.WriteLine(line); + } + catch (IOException) { } + catch (ObjectDisposedException) { } + catch (InvalidOperationException) { } + } + } +} diff --git a/Brutal.Monitor.Common/ProcessResponseReader.cs b/Brutal.Monitor.Common/ProcessResponseReader.cs new file mode 100644 index 0000000..e4e6b1c --- /dev/null +++ b/Brutal.Monitor.Common/ProcessResponseReader.cs @@ -0,0 +1,106 @@ +using System.Collections.Concurrent; +using System.Diagnostics; + +namespace Brutal.Monitor.Common; + +/// +/// Reads tagged response lines from a child process on its own thread and hands them out by +/// command name. Waiting is a memory poll against a deadline, so a silent child can never +/// block the caller the way reading the stream directly would. Each command has its own +/// slot, so concurrent waiters cannot consume each other's replies. +/// +internal sealed class ProcessResponseReader : IDisposable +{ + private const int PollMs = 5; + + private readonly Process _process; + private readonly ConcurrentDictionary _responses = new(StringComparer.Ordinal); + private readonly Thread _thread; + private volatile bool _stopping; + + // Set once stdout is closed, so waiters stop counting down a deadline nothing will answer + private volatile bool _finished; + + public ProcessResponseReader(Process process) + { + _process = process; + _thread = new Thread(ReadLoop) { Name = "Brutal.Monitor.ResponseReader", IsBackground = true }; + _thread.Start(); + } + + private void ReadLoop() + { + try + { + while (!_stopping) + { + // Blocks here, not in the caller, and ends when the child closes stdout + var line = _process.StandardOutput.ReadLine(); + if (line is null) + break; + + if (TrySplitResponse(line, out var command, out var response)) + _responses[command] = response; + } + } + catch (Exception) + { + // The child went away mid-read; waiters give up as soon as they see this + } + finally + { + // Published after any final response, so a waiter that sees this still finds it + _finished = true; + } + } + + /// + /// Split "FirstChance OK path" into its command tag and the rest. + /// + internal static bool TrySplitResponse(string? line, out string command, out string response) + { + command = string.Empty; + response = string.Empty; + if (string.IsNullOrEmpty(line)) + return false; + + var space = line.IndexOf(' '); + if (space < 0) + { + command = line; + return true; + } + + command = line[..space]; + response = line[(space + 1)..]; + return command.Length > 0; + } + + /// + /// Wait for this command's response, or null if none arrived before the timeout. Returns + /// as soon as the child closes stdout, so a dead subprocess costs no wait at all. + /// + public string? WaitFor(string command, int timeOut) + { + var deadline = Environment.TickCount64 + timeOut; + while (true) + { + if (_responses.TryRemove(command, out var response)) + return response; + + // A closed stdout or a disposed reader will never answer, so the rest of the deadline is a pure stall + if (_finished || _stopping) + return _responses.TryRemove(command, out var last) ? last : null; + + if (Environment.TickCount64 >= deadline) + return null; + + Thread.Sleep(PollMs); + } + } + + public void Dispose() + { + _stopping = true; + } +} diff --git a/Brutal.Monitor.Common/Shared.cs b/Brutal.Monitor.Common/Shared.cs new file mode 100644 index 0000000..e94bdbb --- /dev/null +++ b/Brutal.Monitor.Common/Shared.cs @@ -0,0 +1,48 @@ +namespace Brutal.Monitor.Common; + +public enum DumpType +{ + None = 0, + Triage, + Mini, + Full, + Heap, +} + +public struct CollectorOptions +{ + /// Directory dumps are written under, in FirstChance and LastChance subfolders. Must already exist. + public string DumpPath = ""; + + public DumpType FirstChance = DumpType.None; + public DumpType LastChance = DumpType.None; + + public int KeepCount = 5; // number of dumps to keep + + /// + /// Milliseconds allowed for writing a crash dump, which a dying host waits out. + /// + public int DumpTimeoutMs = 60000; + + public CollectorOptions() { } +} + +public struct LoggerOptions +{ + /// Directory the log file ("<name>.<stamp>.<pid>.log") is created in. Must already exist. + public string LogDirectory = ""; + + /// + /// How often buffered log lines are flushed to the OS page cache, bounding what a hard + /// crash loses from the log file. Floors at 100ms. + /// + public int FlushIntervalMs = 100; + + /// + /// Archived logs and recovered crash tails to retain per name. Zero keeps every one, + /// which grows without bound, so the default is a real number a shipped game can live with. + /// + public int MaxArchives = 10; + + public LoggerOptions() { } +} diff --git a/Brutal.Monitor.Host/Logging/BackgroundLogWriter.cs b/Brutal.Monitor.Host/Logging/BackgroundLogWriter.cs new file mode 100644 index 0000000..14df160 --- /dev/null +++ b/Brutal.Monitor.Host/Logging/BackgroundLogWriter.cs @@ -0,0 +1,516 @@ +using System.Globalization; +using System.Text; +using System.Threading.Channels; +using Brutal.Monitor.Common; +using Microsoft.Extensions.Logging; + +namespace Brutal.Monitor.Logging; + +/// +/// Writes log lines to file from a background thread fed by a bounded channel, so a log +/// call only ever touches memory. On overflow the oldest lines are dropped and counted. +/// Custom formatting runs on the writer thread, never the caller's. +/// +internal sealed class BackgroundLogWriter : IDisposable +{ + private const int QueueCapacity = 8192; + private const int DrainWaitMs = 100; + + // Platform newline as UTF-8, appended after each encoded line + private static readonly byte[] NewLineBytes = Encoding.UTF8.GetBytes(Environment.NewLine); + + // A raw line (null category) skips the formatter: markers and recovery notes + private readonly record struct Entry(LogLevel Level, string? Category, string Message); + + private readonly Channel _queue; + + private FileStream? _file; + private byte[] _lineBuffer = new byte[8192]; // Writer-thread only, grown geometrically to fit the largest line seen + private Thread? _thread; + private long _totalDropped; + private long _reportedDropped; // Writer-thread only: drops already reported into the log + private long _linesWritten; + private long _bytesWritten; + private long _linesDiscarded; // Writer-thread only: lines drained with no file to take them + private volatile bool _writerFailed; + private int _disposed; + + public BackgroundLogWriter() + { + // DropOldest counts each eviction, and a completed channel refuses writes quietly. + // One atomic per drop: the writer thread works out what is new to report from the total + _queue = Channel.CreateBounded( + new BoundedChannelOptions(QueueCapacity) + { + FullMode = BoundedChannelFullMode.DropOldest, + SingleReader = true, + }, + _ => Interlocked.Increment(ref _totalDropped) + ); + } + + /// Lines waiting for the writer thread, cheap enough to poll per frame. + public int QueueDepth => _queue.Reader.Count; + + /// Lines the queue holds before the oldest are dropped. + public int Capacity => QueueCapacity; + + /// Lines written to the log file so far. + public long LinesWritten => Interlocked.Read(ref _linesWritten); + + /// UTF-8 bytes written to the log file so far. + public long BytesWritten => Interlocked.Read(ref _bytesWritten); + + /// Lines lost to queue overflow so far. + public long LinesDropped => Interlocked.Read(ref _totalDropped); + + /// Lines that reached the writer thread with no log file to take them. + public long LinesDiscarded => Interlocked.Read(ref _linesDiscarded); + + /// True once the log file was given up after a write or flush failure. + public bool WriterFailed => _writerFailed; + + /// Queue a raw line. Never blocks or throws; drops the oldest line when full. + public void Add(string message) + { + _queue.Writer.TryWrite(new Entry(LogLevel.None, null, message)); + } + + /// + /// Queue a log message. Formatting happens later on the writer thread. + /// + public void Add(LogLevel level, string category, string message) + { + _queue.Writer.TryWrite(new Entry(level, category, message)); + } + + /// Path being written to. Null if no file could be opened. + public string? LogFilePath { get; private set; } + + /// Optional line formatter, read on the writer thread so it never costs a caller. + public Func? LogFormatter { get; set; } + + /// + /// Sweep dead runs' leftovers, then open this run's log file ("<name>.<stamp>.<pid>.log") + /// and start the writer thread. The directory must already exist. + /// + public void Open(LoggerOptions options, string name) + { + if (_thread is not null) + throw new InvalidOperationException("BackgroundLogWriter is already open"); + + // The caller creates the directory; resolved to a full path so the subprocess's own cwd never matters + var directory = Path.GetFullPath(options.LogDirectory); + if (!Directory.Exists(directory)) + throw new DirectoryNotFoundException($"Log directory '{directory}' does not exist."); + + // Nothing past this point may throw into startup; housekeeping is best effort + try + { + SweepDeadRuns(directory, name, options.MaxArchives); + } + catch (Exception) { } + + var stem = MonitorFileNames.Stem(name, MonitorFileNames.ProcessStamp, Environment.ProcessId); + var logFilePath = Path.Combine(directory, $"{stem}.log"); + try + { + // Unix would let the open succeed on a held file, so ownership is probed explicitly + if (File.Exists(logFilePath) && !LogArchiver.IsUnheld(logFilePath)) + throw new IOException($"{logFilePath} already has a live writer"); + + // A raw stream: lines are encoded to UTF-8 once here, so a StreamWriter would only re-encode + _file = new FileStream(logFilePath, FileMode.Create, FileAccess.Write, FileShare.Read); + LogFilePath = logFilePath; + } + catch (IOException) { } + catch (UnauthorizedAccessException) { } + + var flushInterval = Math.Max(options.FlushIntervalMs, DrainWaitMs); + _thread = new Thread(() => WriteLoop(flushInterval)) { Name = "Brutal.Monitor.LogWriter", IsBackground = true }; + _thread.Start(); + + // Hosts that never dispose the Monitor would otherwise lose the queue tail + AppDomain.CurrentDomain.ProcessExit += OnProcessExit; + } + + private void OnProcessExit(object? sender, EventArgs e) + { + Dispose(); + } + + /// + /// Recover dead runs' crash tails and archive their logs; files held by a live holder are left alone. + /// + private void SweepDeadRuns(string directory, string name, int maxArchives) + { + foreach (var ring in Directory.GetFiles(directory, $"{name}.*.ring")) + { + // A ring is named ...log.ring, so two extensions off gives the stem + var stem = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(ring)); + if (!IsRunFile(stem + ".log", name) || !LogArchiver.IsUnheld(ring)) + continue; + + var recovered = CrashTailSnapshot.TryWrite(ring, Path.Combine(directory, $"{stem}.previous-crash.log")); + if (recovered > 0) + Add($"[Brutal.Monitor] recovered {recovered} log lines from {Path.GetFileName(ring)}"); + + // A failed snapshot leaves the only copy of the tail in the ring; keep it for the next run to retry + if (recovered == CrashTailSnapshot.SnapshotFailed) + continue; + + try + { + File.Delete(ring); + } + catch (IOException) { } + catch (UnauthorizedAccessException) { } + } + + foreach (var log in Directory.GetFiles(directory, $"{name}.*.log")) + { + // A locked log fails rotation and belongs to a live instance anyway + if (IsRunFile(log, name)) + LogArchiver.TryRotate(log, name, maxArchives); + } + + PruneRecoveredTails(directory, name, maxArchives); + } + + /// + /// Tails recovered from dead runs pile up beside the logs, so they get the same retention + /// as archives: the newest maxArchives are kept, and zero keeps every one. + /// + private static void PruneRecoveredTails(string directory, string name, int maxArchives) + { + if (maxArchives <= 0) + return; + + var tails = new List(); + foreach (var path in Directory.GetFiles(directory, $"{name}.*.log")) + { + if (IsRecoveredTail(path, name)) + tails.Add(new FileInfo(path)); + } + + foreach (var expired in tails.OrderByDescending(tail => tail.LastWriteTimeUtc).Skip(maxArchives)) + { + try + { + expired.Delete(); + } + catch (IOException) { } + catch (UnauthorizedAccessException) { } + } + } + + // "...previous-crash.log" and "....abnormal-exit.log" + private static bool IsRecoveredTail(string fileName, string name) + { + return MonitorFileNames.OwnedSuffix(fileName, name) is { Length: >= 3 } suffix + && MonitorFileNames.IsStamp(suffix[0]) + && int.TryParse(suffix[1], out _) + && suffix[^1] is "previous-crash" or "abnormal-exit"; + } + + // Matches ".." and nothing looser, so a stray user file is never archived + private static bool IsRunFile(string fileName, string name) + { + return MonitorFileNames.OwnedSuffix(fileName, name) is { Length: 2 } suffix + && MonitorFileNames.IsStamp(suffix[0]) + && int.TryParse(suffix[1], out _); + } + + private void WriteLoop(int flushInterval) + { + // Nothing may escape: an unhandled exception here would take the game down + try + { + DrainLoop(flushInterval); + } + catch (Exception) { } + finally + { + // The writer thread owns closing the file, so a Dispose that gave up waiting can't leak it + DisableWriter(); + } + } + + private void DrainLoop(int flushInterval) + { + var reader = _queue.Reader; + var pendingFlush = false; + var lastFlush = Environment.TickCount64; + + // One outstanding wait at a time, kept across timeouts so idle flushes still happen + Task? waiting = null; + while (true) + { + waiting ??= reader.WaitToReadAsync().AsTask(); + + // The timeout is only there to flush what is buffered, so an idle writer waits for a line + var waitMs = pendingFlush ? DrainWaitMs : Timeout.Infinite; + if (waiting.Wait(waitMs)) + { + var hasLines = waiting.Result; + waiting = null; + if (!hasLines) + break; // Completed and fully drained + + // Bounded, so producers that outpace the writer can't starve the drop report and flush below + var batch = 0; + while (batch++ < QueueCapacity && reader.TryRead(out var entry)) + WriteLine(entry); + pendingFlush = true; + } + + if (ReportDrops()) + pendingFlush = true; + + // Flush is page-cache only, so a short cadence is cheap + if (pendingFlush && Environment.TickCount64 - lastFlush >= flushInterval) + { + Flush(); + pendingFlush = false; + lastFlush = Environment.TickCount64; + } + } + + ReportDrops(); + Flush(); + } + + private void WriteLine(in Entry entry) + { + // Counted, so a file that died mid-session shows in the stats instead of losing lines silently + if (_file is null) + { + _linesDiscarded++; + return; + } + + var line = FormatLine(entry); + try + { + // One UTF-8 pass per line: encode into a reusable buffer, and the same pass yields the byte stat + var maxBytes = Encoding.UTF8.GetMaxByteCount(line.Length) + NewLineBytes.Length; + if (_lineBuffer.Length < maxBytes) + { + var doubled = (int)Math.Min((long)_lineBuffer.Length * 2, Array.MaxLength); + _lineBuffer = new byte[Math.Max(maxBytes, doubled)]; + } + + var byteCount = Encoding.UTF8.GetBytes(line.AsSpan(), _lineBuffer); + NewLineBytes.CopyTo(_lineBuffer.AsSpan(byteCount)); + byteCount += NewLineBytes.Length; + _file.Write(_lineBuffer, 0, byteCount); + + // Only this thread writes these; readers take a whole 64-bit value via Interlocked.Read + _linesWritten++; + _bytesWritten += byteCount; + } + catch (Exception) + { + // A full or disconnected disk gives up the file, not the process + FailWriter(); + } + } + + private string FormatLine(in Entry entry) + { + // A custom formatter runs here so its strings never cost a game thread + var formatter = LogFormatter; + if (entry.Category is null || formatter is null) + return entry.Message; + + try + { + // A formatter returning null would otherwise disable the log file for good + return formatter(entry.Level, entry.Category, entry.Message) ?? entry.Message; + } + catch (Exception) + { + // A broken formatter costs its decoration, not the log + return entry.Message; + } + } + + private void Flush() + { + try + { + _file?.Flush(); + } + catch (Exception) + { + FailWriter(); + } + } + + // A failure gives up the file like a normal close does, but leaves a mark the stats can show + private void FailWriter() + { + _writerFailed = true; + DisableWriter(); + } + + // Give up on the log file and keep draining, so producers never block or throw + private void DisableWriter() + { + var file = Interlocked.Exchange(ref _file, null); + if (file is null) + return; + + try + { + file.Dispose(); + } + catch (Exception) { } + } + + // True when a report was written, since that line needs flushing like any other + private bool ReportDrops() + { + var dropped = Interlocked.Read(ref _totalDropped) - _reportedDropped; + if (dropped <= 0) + return false; + + WriteLine(new Entry(LogLevel.None, null, $"[Brutal.Monitor] dropped {dropped} log messages (queue overflow)")); + _reportedDropped += dropped; + return true; + } + + public void Dispose() + { + // Idempotent - reached from both Monitor disposal and the ProcessExit hook + if (Interlocked.Exchange(ref _disposed, 1) != 0) + return; + + AppDomain.CurrentDomain.ProcessExit -= OnProcessExit; + _queue.Writer.TryComplete(); + + // Bounded so a stuck disk can't stall process exit; the writer thread closes the file either way + if (_thread is null) + DisableWriter(); + else + _thread.Join(TimeSpan.FromSeconds(2)); + } +} + +/// +/// Moves a finished log into an Archives folder as <archive name>.yyMMdd.n.log, +/// keeping at most maxArchives per name (zero keeps all). +/// +internal static class LogArchiver +{ + // FileShare.None maps to an exclusive flock on Unix, so a live holder conflicts on every platform + internal static bool IsUnheld(string path) + { + try + { + using var probe = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); + return true; + } + catch (FileNotFoundException) + { + // Deleted between the caller's existence check and this probe: no file, no holder + return true; + } + catch (IOException) + { + return false; + } + catch (UnauthorizedAccessException) + { + return false; + } + } + + /// Returns false when the log could not be archived, so the caller can move on. + public static bool TryRotate(string logFilePath, string archiveName, int maxArchives) + { + try + { + Rotate(logFilePath, archiveName, maxArchives); + return true; + } + catch (IOException) + { + return false; + } + catch (UnauthorizedAccessException) + { + return false; + } + } + + public static void Rotate(string logFilePath, string archiveName, int maxArchives) + { + if (!File.Exists(logFilePath)) + return; + + // Unix happily renames an open file, so a held log must be refused here, not by the move + if (!IsUnheld(logFilePath)) + throw new IOException($"{logFilePath} is held open by a live instance"); + + var directory = Path.GetDirectoryName(logFilePath)!; + var currentFile = new FileInfo(logFilePath); + var currentFileTimeStamp = currentFile.LastWriteTime.ToString("yyMMdd", CultureInfo.InvariantCulture); + var archiveDirectory = Path.Combine(directory, "Archives"); + var extension = Path.GetExtension(logFilePath); + + if (!Directory.Exists(archiveDirectory)) + Directory.CreateDirectory(archiveDirectory); + + // Only this name's own archives, so names sharing a folder keep separate histories + var archives = new List<(string Path, int TimeStamp, int Index)>(); + foreach (var path in Directory.GetFiles(archiveDirectory, $"{archiveName}.*{extension}")) + { + if (MonitorFileNames.TryParseArchive(path, archiveName, out var timeStamp, out var index)) + archives.Add((path, timeStamp, index)); + } + archives.Sort((a, b) => a.TimeStamp != b.TimeStamp ? a.TimeStamp - b.TimeStamp : a.Index - b.Index); + + // Suffix an index when today already has an archive + var archiveIndex = 0; + foreach (var archive in archives) + { + if (archive.TimeStamp.ToString("D6") == currentFileTimeStamp) + archiveIndex = Math.Max(archiveIndex, archive.Index + 1); + } + + // Another instance sweeping the same folder can claim an index first, so a collision retries the next + for (var attempt = 0; ; attempt++) + { + var archivePath = Path.Combine( + archiveDirectory, + $"{archiveName}.{currentFileTimeStamp}.{archiveIndex}{extension}" + ); + try + { + currentFile.MoveTo(archivePath); + break; + } + catch (IOException) when (attempt < 5 && File.Exists(archivePath)) + { + archiveIndex++; + } + } + + if (maxArchives <= 0) + return; + + // Counts the archive just added, so the folder settles at maxArchives + var toDelete = archives.Count + 1 - maxArchives; + for (int i = 0; i < toDelete && i < archives.Count; i++) + { + // A stale archive we cannot delete is not worth failing startup over + try + { + File.Delete(archives[i].Path); + } + catch (IOException) { } + catch (UnauthorizedAccessException) { } + } + } +} diff --git a/Brutal.Monitor.Host/Logging/MonitorLogger.cs b/Brutal.Monitor.Host/Logging/MonitorLogger.cs new file mode 100644 index 0000000..58c613a --- /dev/null +++ b/Brutal.Monitor.Host/Logging/MonitorLogger.cs @@ -0,0 +1,243 @@ +using Brutal.Monitor.Common; +using Microsoft.Extensions.Logging; + +namespace Brutal.Monitor.Logging; + +/// +/// Provides the MonitorLogger. Messages are queued for the background writer and mirrored +/// into the crash-tail ring, so a log call only ever touches memory. +/// +public class MonitorLoggerProvider : ILoggerProvider +{ + private readonly BackgroundLogWriter _writer = new(); + private CrashTailRing? _tailRing; + private volatile bool _disposed; + + // Backed by an int so the hot-path read is a plain load rather than a property call on an enum field + private volatile int _minimumLevel = (int)LogLevel.Trace; + + public MonitorLoggerProvider() { } + + public MonitorLoggerProvider(LogLevel minimumLevel) + { + MinimumLevel = minimumLevel; + } + + /// + /// Messages below this level are dropped before anything is formatted, so trace spam + /// costs a compare instead of a string, a ring write and a queue slot. Defaults to Trace. + /// + public LogLevel MinimumLevel + { + get => (LogLevel)_minimumLevel; + set => _minimumLevel = (int)value; + } + + /// True when this level is worth building a message for. + public bool IsEnabled(LogLevel level) + { + return level != LogLevel.None && (int)level >= _minimumLevel; + } + + /// + /// Optional formatter for log file lines, given the level, category and message. Runs on + /// the background writer thread, so its strings never cost a game thread, and the + /// crash-tail ring always gets the plain message. Set it before logging starts. + /// + public Func? LogFormatter + { + get => _writer.LogFormatter; + set => _writer.LogFormatter = value; + } + + /// Crash-tail ring path, once file logging is configured. + public string? CrashTailPath => _tailRing?.FilePath; + + /// This run's log file path, once file logging is configured. + public string? LogFilePath => _writer.LogFilePath; + + /// Counters for the logging pipeline, cheap enough to poll every frame. + public MonitorLoggingStats GetStats() + { + return new MonitorLoggingStats + { + QueueDepth = _writer.QueueDepth, + QueueCapacity = _writer.Capacity, + LinesWritten = _writer.LinesWritten, + BytesWritten = _writer.BytesWritten, + LinesDropped = _writer.LinesDropped, + LinesDiscarded = _writer.LinesDiscarded, + WriterFailed = _writer.WriterFailed, + RingSequence = _tailRing?.Sequence ?? 0, + RingSlotCount = _tailRing?.SlotCount ?? 0, + RingSlotSize = _tailRing?.SlotSize ?? 0, + }; + } + + /// + /// Open the log file and start the background writer, flushing anything already queued. + /// Call once, during startup. + /// + public void Configure(LoggerOptions options, string name) + { + _writer.Open(options, name); + + // The ring carries the log file's name, so the subprocess can match the two + var logFilePath = _writer.LogFilePath; + if (logFilePath is null) + return; + + try + { + _tailRing = new CrashTailRing(logFilePath + ".ring"); + } + catch (Exception) + { + // Any unusable path or mapping loses the crash tail; none of it may fail startup + _tailRing = null; + } + + // A host that exits without disposing must still retire the ring, or a clean exit reads as a crash next run + if (_tailRing is not null) + { + AppDomain.CurrentDomain.ProcessExit += OnProcessExit; + + // A crash unwinds through Dispose even without last-chance dumps, so the ring is preserved here too + AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; + } + } + + private void OnProcessExit(object? sender, EventArgs e) + { + Dispose(); + } + + // The subscription cannot be exercised in-process without dying, so tests call this directly + internal void OnUnhandledException(object? sender, UnhandledExceptionEventArgs e) + { + PreserveCrashTail(); + } + + /// Keep this run's crash tail for the next run; a dying host unwinds through this disposal. + internal void PreserveCrashTail() + { + _tailRing?.Preserve(); + } + + public ILogger CreateLogger(string categoryName) + { + return new MonitorLogger(categoryName, this); + } + + public void AddMessage(string message) + { + AddMessage(LogLevel.None, null, message); + } + + /// + /// Queue a log message. The ring gets the plain message; formatting happens at the writer. + /// + public void AddMessage(LogLevel level, string? category, string message) + { + if (_disposed) + return; + + // Raw lines (null category) are markers and recovery notes, so they are never filtered + if (category is not null && !IsEnabled(level)) + return; + + // Threads can still be logging while another disposes, and ILogger.Log must not throw + try + { + _tailRing?.Write(message); + if (category is null) + _writer.Add(message); + else + _writer.Add(level, category, message); + } + catch (ObjectDisposedException) { } + } + + public void Dispose() + { + _disposed = true; + AppDomain.CurrentDomain.ProcessExit -= OnProcessExit; + AppDomain.CurrentDomain.UnhandledException -= OnUnhandledException; + _writer.Dispose(); + _tailRing?.Dispose(); + } +} + +/// Counters describing the logging pipeline's current state. +public struct MonitorLoggingStats +{ + public int QueueDepth; + public int QueueCapacity; + public long LinesWritten; + public long BytesWritten; + public long LinesDropped; + + // Lines drained with no usable log file, and whether the file was lost to a write failure + public long LinesDiscarded; + public bool WriterFailed; + + public long RingSequence; + public int RingSlotCount; + public int RingSlotSize; + + public MonitorLoggingStats() { } +} + +/// +/// This logger queues messages for the background writer and crash-tail ring +/// +internal sealed class MonitorLogger : ILogger +{ + private readonly string _categoryName; + private readonly MonitorLoggerProvider _provider; + + public MonitorLogger(string categoryName, MonitorLoggerProvider provider) + { + _provider = provider; + _categoryName = categoryName; + } + + public void Dispose() { } + + public void Log( + LogLevel logLevel, + EventId eventId, + TState state, + Exception? exception, + Func formatter + ) + { + // Gated before the formatter runs, so a filtered-out call allocates nothing at all + if (!_provider.IsEnabled(logLevel)) + return; + + // A throwing ToString in the state or exception costs its line, never the game thread + try + { + var message = formatter(state, exception); + + // The default formatter leaves the exception out, and a crash log without the stack is useless + if (exception is not null) + message = $"{message}{Environment.NewLine}{exception}"; + + _provider.AddMessage(logLevel, _categoryName, message); + } + catch (Exception) { } + } + + public bool IsEnabled(LogLevel logLevel) + { + return _provider.IsEnabled(logLevel); + } + + public IDisposable? BeginScope(TState state) + where TState : notnull + { + return null; + } +} diff --git a/Brutal.Monitor.Host/Monitor.cs b/Brutal.Monitor.Host/Monitor.cs new file mode 100644 index 0000000..b444552 --- /dev/null +++ b/Brutal.Monitor.Host/Monitor.cs @@ -0,0 +1,447 @@ +using System.ComponentModel; +using System.Diagnostics; +using System.Runtime.ExceptionServices; +using Brutal.Logging; +using Brutal.Monitor.Common; +using Brutal.Monitor.Logging; +using Microsoft.Extensions.Logging; + +namespace Brutal.Monitor +{ + public class Monitor : IDisposable + { + private const int ThrottleExpirationMs = 10000; // Minimum milliseconds between first-chance collections + private const int TimeOutMs = 1000; // Timeout for subprocess command acknowledgements + private const int DefaultDumpTimeOutMs = 60000; // Matches CollectorOptions.DumpTimeoutMs + + // Bounded, so a best-effort dump still writing cannot make shutdown look hung + private const int ShutdownGraceMs = 2000; + + private Process? _monitorProcess; + private ProcessResponseReader? _responses; + private long _nextFirstChance; // Earliest TickCount64 the next first-chance collection may start + private volatile bool _firstChancePending; + private volatile bool _subprocessExited; + + // Set before the subprocess is told to stop, so a crash handler already past its guard turns back + private volatile bool _stopping; + + // Captured the moment the subprocess exits, so reading it later cannot race or throw + private volatile int _subprocessExitCode = -1; + private readonly LogCategory _monitorLog; + private readonly string _name; + + /// The ILoggerProvider this Monitor logs through, owned and disposed by it. + public MonitorLoggerProvider LogProvider { get; } + + private CollectorOptions? _collectorOptions = null; + + // Tracked via the Exited event so the first-chance path checks a field, not the process + public bool SubprocessRunning => _monitorProcess != null && !_subprocessExited; + + /// Exit code of the subprocess once it has exited, or -1 while it is still running. + public int SubprocessExitCode => _subprocessExitCode; + + /// + /// The name (like "Gruntz.client") plus this run's start time and pid names every + /// file this run produces, so instances sharing a folder never collide. It must be + /// usable as a plain file name. Messages below minimumLevel are dropped before + /// anything is formatted, which is where trace spam gets expensive. + /// + public Monitor(string name, LogLevel minimumLevel = LogLevel.Trace) + { + ArgumentException.ThrowIfNullOrEmpty(name); + + // The name seeds file names and retention globs, so wildcards or separators could sweep others' files + if (name.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0 || name.IndexOfAny(['*', '?', '/', '\\']) >= 0) + throw new ArgumentException( + $"Monitor name '{name}' must be usable as a plain file name, without wildcards or separators.", + nameof(name) + ); + + _name = name; + _monitorLog = LogCategory.Make("Monitor"); + LogProvider = new MonitorLoggerProvider(minimumLevel); + + Start(); + } + + public void Dispose() + { + Stop(); + + LogProvider.Dispose(); + } + + public void AddLogger(LoggerOptions loggerOptions) + { + // In-process logging, so this works with or without the subprocess + LogProvider.Configure(loggerOptions, _name); + + // An unusable path disables file logging rather than failing, so it is reported here + if (LogProvider.LogFilePath is null) + _monitorLog.Warning( + $"Monitor could not open a log file in '{loggerOptions.LogDirectory}'. " + + "File logging is disabled for this session." + ); + + // Read once: Stop can null the field between this and the write + var process = _monitorProcess; + if (process != null && !_subprocessExited && LogProvider.CrashTailPath is not null) + { + process.WriteLineSync($"LogTail\t{LogProvider.CrashTailPath}"); + _monitorLog.Info($"Monitor subprocess log tail: {WaitFor("LogTail", TimeOutMs) ?? "no response"}."); + } + } + + public void AddCollector(CollectorOptions collectorOptions) + { + // The game creates the directory; resolved to a full path so the subprocess's own cwd never matters + collectorOptions.DumpPath = Path.GetFullPath(collectorOptions.DumpPath); + if (!Directory.Exists(collectorOptions.DumpPath)) + throw new DirectoryNotFoundException($"Dump directory '{collectorOptions.DumpPath}' does not exist."); + + _collectorOptions = collectorOptions; + + // Detach first, so configuring twice replaces the handlers instead of doubling them + DetachCollectorHandlers(); + if (_collectorOptions.Value.FirstChance != DumpType.None) + AppDomain.CurrentDomain.FirstChanceException += OnFirstChance; + if (_collectorOptions.Value.LastChance != DumpType.None) + AppDomain.CurrentDomain.UnhandledException += OnLastChance; + + // Read once: Stop can null the field between this and the write + var process = _monitorProcess; + if (process == null || _subprocessExited) + return; + + // Tab-separated because dump paths contain spaces + process.WriteLineSync( + $"AddCollector\t{collectorOptions.DumpPath}\t{(int)collectorOptions.FirstChance}" + + $"\t{(int)collectorOptions.LastChance}\t{collectorOptions.KeepCount}" + + $"\t{collectorOptions.DumpTimeoutMs}" + ); + _monitorLog.Info($"Monitor subprocess collector: {WaitFor("AddCollector", TimeOutMs) ?? "no response"}."); + } + + private void Start() + { + var rid = "win-x64"; + if (OperatingSystem.IsLinux()) + rid = "linux-x64"; + else if (OperatingSystem.IsMacOS()) + rid = "osx-arm64"; + + var thisDirectory = Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory); + var subprocessName = "Brutal.Monitor.Subprocess"; + var extension = OperatingSystem.IsWindows() ? ".exe" : ""; + + var monitorExe = FindSubprocessExecutable(thisDirectory, rid, subprocessName + extension); + if (monitorExe is null) + { + _monitorLog.Error( + $"Brutal.Monitor subprocess was not found beside the application or in " + + $"runtimes/{rid}/native. Crash dump collection is disabled." + ); + return; + } + + _monitorLog.Info($"Running Monitor subprocess from {thisDirectory}."); + var startInfo = new ProcessStartInfo() + { + CreateNoWindow = true, + FileName = monitorExe, + RedirectStandardError = true, + RedirectStandardInput = true, + RedirectStandardOutput = true, + UseShellExecute = false, + WindowStyle = ProcessWindowStyle.Hidden, + WorkingDirectory = thisDirectory, + }; + + // The subprocess names its dumps and tails from these, matching this run's log + startInfo.ArgumentList.Add($"{Environment.ProcessId}"); + startInfo.ArgumentList.Add(_name); + startInfo.ArgumentList.Add(MonitorFileNames.ProcessStamp); + + try + { + _monitorProcess = Process.Start(startInfo); + } + catch (Win32Exception) + { + _monitorProcess = null; + } + + if (_monitorProcess == null) + { + _monitorLog.Warning( + $"Monitor subprocess ({monitorExe}) could not be started. " + + "Falling back to logging and crash handling from the main process." + ); + return; + } + + // Subscribed before events are enabled, or an already-dead subprocess fires Exited into no handler + _subprocessExited = false; + _monitorProcess.Exited += OnMonitorExit; + _monitorProcess.EnableRaisingEvents = true; + + // Owns the only reader of the subprocess's stdout + _responses = new ProcessResponseReader(_monitorProcess); + + _monitorLog.Info("Monitor subprocess started successfully"); + + // Redirect the error stream to Log as Errors instead + _monitorProcess + .StandardError.ReadToEndAsync() + .ContinueWith(task => + { + // Touching Exception observes a torn-down stream instead of raising UnobservedTaskException + if (task.Exception is not null || !task.IsCompletedSuccessfully) + return; + + var errorOutput = task.Result; + if (!string.IsNullOrEmpty(errorOutput)) + { + _monitorLog.Warning($"Monitor subprocess error output: {errorOutput}"); + } + }); + } + + public void Stop() + { + // Closes the collect paths first, so a handler that entered before this cannot + // write a command to a subprocess that is already on its way out + _stopping = true; + + // Even when no subprocess started, or the handlers would root this Monitor for the process lifetime + DetachCollectorHandlers(); + + var process = _monitorProcess; + if (process != null) + { + process.Exited -= OnMonitorExit; + + // This runs from Dispose, so shutting the subprocess down must always finish + try + { + if (!_subprocessExited) + { + process.WriteLineSync("Stop"); + _monitorLog.Info($"Monitor subprocess stop: {WaitFor("Stop", TimeOutMs) ?? "no response"}."); + } + + // A first-chance dump still writing is best effort, so shutdown abandons it + // rather than waiting out its whole budget and looking hung + if (process.WaitForExit(ShutdownGraceMs)) + RecordExit(process); + else + Terminate(process); + } + catch (Exception) { } + finally + { + _responses?.Dispose(); + _responses = null; + process.Dispose(); + _monitorProcess = null; + } + } + } + + private void RecordExit(Process process) + { + // Safe to read here: the wait returning means it has exited + _subprocessExitCode = process.ExitCode; + if (_subprocessExitCode != 0) + _monitorLog.Error($"Monitor process {process.Id} exited with error {_subprocessExitCode}"); + else + _monitorLog.Info($"Monitor process {process.Id} exited successfully."); + } + + // The subprocess can exit before the kill lands, so Kill throwing is normal and the wait is bounded + private void Terminate(Process process) + { + _monitorLog.Info($"Monitor process {process.Id} exit timeout. Force termination."); + + try + { + process.Kill(true); + } + catch (Exception) { } + + // Kill is asynchronous, and touching ExitCode before it lands throws + try + { + if (process.WaitForExit(TimeOutMs)) + RecordExit(process); + else + _monitorLog.Warning($"Monitor process {process.Id} did not exit after being terminated."); + } + catch (Exception) { } + } + + // Removing a handler that was never added is a no-op, so this is safe to call any time + private void DetachCollectorHandlers() + { + AppDomain.CurrentDomain.FirstChanceException -= OnFirstChance; + AppDomain.CurrentDomain.UnhandledException -= OnLastChance; + } + + private void OnMonitorExit(object? sender, EventArgs e) + { + _subprocessExited = true; + + // Nothing may escape a runtime callback; a dead subprocess costs crash dumps, not the application + try + { + // The sender is the process that just exited, so this never races Stop for the field + if (sender is Process exited) + _subprocessExitCode = exited.ExitCode; + + _monitorLog.Warning( + $"Monitor subprocess exited early with exit code {_subprocessExitCode}. " + + "Crash dump collection is disabled for the rest of this session." + ); + } + catch (Exception) { } + } + + private void OnFirstChance(object? sender, FirstChanceExceptionEventArgs e) + { + // Runs on every exception in the process, so the throttled path is a read and a compare + var now = Environment.TickCount64; + var next = Volatile.Read(ref _nextFirstChance); + if (now < next) + return; + + // One winner per window; a loser was beaten by a concurrent exception this same instant + if (Interlocked.CompareExchange(ref _nextFirstChance, now + ThrottleExpirationMs, next) != next) + return; + + if (_collectorOptions == null || _collectorOptions.Value.FirstChance == DumpType.None) + return; + + if (!SubprocessRunning) + return; + + try + { + CollectFirstChanceDump(e.Exception); + } + catch (Exception) { } + } + + private void OnLastChance(object? sender, UnhandledExceptionEventArgs e) + { + // A main-thread crash runs this Monitor's Dispose on the way out, which would retire the ring + LogProvider.PreserveCrashTail(); + + if (_collectorOptions == null || _collectorOptions.Value.LastChance == DumpType.None) + return; + + // Guarded so a throwing ToString on the dying exception cannot suppress the dump + try + { + _monitorLog.Error($"Unhandled exception {e.ExceptionObject}."); + } + catch (Exception) { } + + if (!SubprocessRunning) + return; + + // Unthrottled: sharing the first-chance permit let a benign throw skip the real dump + try + { + CollectLastChanceDump(); + } + catch (Exception) { } + } + + /// Commands are serial, so the budget covers a first-chance dump ahead of us, if enabled. + internal static int LastChanceWait(CollectorOptions? collectorOptions) + { + var dumpTimeOut = collectorOptions?.DumpTimeoutMs ?? DefaultDumpTimeOutMs; + var firstChanceCanQueue = collectorOptions is { } options && options.FirstChance != DumpType.None; + + return firstChanceCanQueue ? dumpTimeOut * 2 + TimeOutMs : dumpTimeOut + TimeOutMs; + } + + private int LastChanceWaitMs => LastChanceWait(_collectorOptions); + + private string? WaitFor(string command, int timeOut) => _responses?.WaitFor(command, timeOut); + + private void CollectFirstChanceDump(Exception exception) + { + // Read once: Stop can null the field between this and the write + var process = _monitorProcess; + if (_stopping || process == null || _subprocessExited) + return; + + // One dump in flight at a time, or a burst of throws pushes the fatal dump past its wait budget + if (_firstChancePending) + { + if (WaitFor("FirstChance", 0) is null) + return; + _firstChancePending = false; + } + + // Never wait: the throwing thread is not dying, so blocking it is a frame hitch for nothing + process.WriteLineSync("FirstChance"); + _firstChancePending = true; + + // Formatted only for the exception being dumped, and a throwing ToString costs the line, not the dump + try + { + _monitorLog.Error($"First chance dump requested for {exception}."); + } + catch (Exception) { } + } + + private void CollectLastChanceDump() + { + // Read once: Stop can null the field between the check and the write + var process = _monitorProcess; + + // A subprocess already told to stop will never answer, and waiting on it would stall the dying process + if (_stopping || process == null || _subprocessExited) + { + _monitorLog.Warning("Last chance dump: the monitor subprocess is shutting down or gone."); + return; + } + + // This wait is what keeps the dying process alive long enough to be dumped + process.WriteLineSync("LastChance"); + LogCollectResponse("Last chance dump", WaitFor("LastChance", LastChanceWaitMs)); + } + + private void LogCollectResponse(string kind, string? response) + { + if (string.IsNullOrEmpty(response)) + { + _monitorLog.Warning($"{kind}: no response from the monitor subprocess."); + return; + } + + if (response.StartsWith("Failed", StringComparison.Ordinal) || response == "timed out") + _monitorLog.Warning($"{kind}: {response}."); + else + _monitorLog.Info($"{kind}: {response}."); + } + + /// + /// Locate the subprocess executable: beside the app for local builds, or under + /// runtimes/<rid>/native as the package delivers it. Returns null if neither exists. + /// + private static string? FindSubprocessExecutable(string baseDirectory, string rid, string fileName) + { + var beside = Path.Combine(baseDirectory, fileName); + if (File.Exists(beside)) + return beside; + + var packaged = Path.Combine(baseDirectory, "runtimes", rid, "native", fileName); + return File.Exists(packaged) ? packaged : null; + } + } +} diff --git a/Brutal.NativeFileDialog/LICENSES/BRUTAL-NATIVEFILEDIALOG-THIRD-PARTY-NOTICES.txt b/Brutal.NativeFileDialog/LICENSES/BRUTAL-NATIVEFILEDIALOG-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..b0d6dee --- /dev/null +++ b/Brutal.NativeFileDialog/LICENSES/BRUTAL-NATIVEFILEDIALOG-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,32 @@ +Brutal.NativeFileDialog redistributes the third-party components listed below. +Each is reproduced with the license that governs it. + +============================================================ +nativefiledialog-extended +============================================================ + + Name nativefiledialog-extended + Version v1.2.1-10-g6db343a, commit 6db343ad341ba2d7166f1a71b5b182a380e5bc08 + Upstream https://github.com/btzy/nativefiledialog-extended + SPDX Zlib + Shipped as the nfd native library + +Upstream names no copyright holder. Its LICENSE file carries the zlib license +text and no copyright line, and it is reproduced below as upstream states it. + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + diff --git a/Brutal.NativeFileDialog/NativeFileDialog.cs b/Brutal.NativeFileDialog/NativeFileDialog.cs new file mode 100644 index 0000000..30668fc --- /dev/null +++ b/Brutal.NativeFileDialog/NativeFileDialog.cs @@ -0,0 +1,402 @@ +using System.Buffers; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Pointers.Extensions; +using Brutal.Strings; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.NativeFileDialogApi; + +/// +/// Implements a native file dialog interface for opening files, picking folders, and saving files. +/// +public static partial class NativeFileDialog +{ + /// + /// Describes the result of a native file dialog operation. + /// + public enum Result + { + /// + /// A programmatic error occurred, such as a memory allocation failure. + /// + Error, + + /// + /// Successful operation, the user selected a file or folder. + /// + Okay, + + /// + /// The user canceled the operation, such as by pressing the cancel button or closing the dialog. + /// + Cancel, + } + + /// + /// Initialize NativeFileDialog + /// + public static void Initialize() + { + Native.Init(); + } + + /// + /// Shutdown NativeFileDialog + /// + public static void Shutdown() + { + Native.Quit(); + } + + /// + /// Single file open dialog, with additional parameters. + /// + /// controls the dialog behavior + /// the result of the dialog + /// The selected string + public static unsafe string OpenDialog(FileDialogInfo inArgs, out Result result) + { + using var bytes = SpanOwner.Allocate(1024, AllocationMode.Clear); + var writtenCount = 0; + + var nfdFilterItems = stackalloc NfdFilterItem[inArgs.FilterList.Length]; + for (var i = 0; i < inArgs.FilterList.Length; i++) + { + var filter = inArgs.FilterList[i]; + + if (filter.Name.Length == 0) + throw new ArgumentException("Filter name is empty"); + if (filter.Spec.Length == 0) + throw new ArgumentException("Filter spec is empty"); + + var name = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(filter.Name, name); + bytes.Span[writtenCount++] = 0; // Null-terminate + + var spec = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(filter.Spec, spec); + bytes.Span[writtenCount++] = 0; // Null-terminate + + nfdFilterItems[i] = new NfdFilterItem { Name = name.AsPointer(), Spec = spec.AsPointer() }; + } + + // TODO + NfdWindowHandle nfdHandle = new(); + + var defaultPath = bytes.Span[writtenCount..]; + Utf8.GetBytes(inArgs.DefaultPath, defaultPath); + + var nfdArgs = new NfdOpenDialogArgs + { + FilterList = nfdFilterItems, + FilterCount = inArgs.FilterList.Length, + DefaultPath = defaultPath.AsPointer(), + ParentWindow = nfdHandle, + }; + + byte* pathPtr; + result = Native.OpenDialog(Native.INTERFACE_VERSION, &pathPtr, &nfdArgs); + return result == Result.Okay ? Utf8.GetString(pathPtr) : string.Empty; + } + + /// + /// Single file open dialog, with additional parameters. + /// + /// controls the dialog behavior + /// The selected string + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string OpenDialog(FileDialogInfo inArgs = default) + { + return OpenDialog(inArgs, out _); + } + + /// + /// Multiple file open dialog + /// + /// controls the dialog behavior + /// the result of the dialog + /// The selected paths + public static unsafe string[] OpenDialog(MultipleFileDialogInfo inArgs, out Result result) + { + using var bytes = SpanOwner.Allocate(1024, AllocationMode.Clear); + var writtenCount = 0; + + var nfdFilterItems = stackalloc NfdFilterItem[inArgs.FilterList.Length]; + for (var i = 0; i < inArgs.FilterList.Length; i++) + { + var filter = inArgs.FilterList[i]; + + if (filter.Name.Length == 0) + throw new ArgumentException("Filter name is empty"); + if (filter.Spec.Length == 0) + throw new ArgumentException("Filter spec is empty"); + + var name = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(filter.Name, name); + bytes.Span[writtenCount++] = 0; // Null-terminate + + var spec = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(filter.Spec, spec); + bytes.Span[writtenCount++] = 0; // Null-terminate + + nfdFilterItems[i] = new NfdFilterItem { Name = name.AsPointer(), Spec = spec.AsPointer() }; + } + + // TODO + NfdWindowHandle nfdHandle = new(); + + var defaultPath = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(inArgs.DefaultPath, defaultPath); + bytes.Span[writtenCount] = 0; // Null-terminate + + var nfdArgs = new NfdOpenDialogArgs + { + FilterList = nfdFilterItems, + FilterCount = inArgs.FilterList.Length, + DefaultPath = defaultPath.AsPointer(), + ParentWindow = nfdHandle, + }; + + NfdPathSet* pathSet; + result = Native.OpenDialogMultiple(Native.INTERFACE_VERSION, &pathSet, &nfdArgs); + + if (result != Result.Okay) + return []; + + return LoadPathSet(pathSet); + } + + /// + /// Multiple file open dialog + /// + /// controls the dialog behavior + /// The selected paths + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string[] OpenDialog(MultipleFileDialogInfo inArgs = default) + { + return OpenDialog(inArgs, out _); + } + + /// + /// Pick a folder + /// + /// controls the dialog behavior + /// the result of the dialog + /// The selected path + public static unsafe string OpenDialog(FolderDialogInfo inArgs, out Result result) + { + using var bytes = SpanOwner.Allocate(256, AllocationMode.Clear); + int writtenCount = 0; + + // TODO + NfdWindowHandle nfdHandle = new(); + + var defaultPath = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(inArgs.DefaultPath, defaultPath); + bytes.Span[writtenCount] = 0; // Null-terminate + + var nfdArgs = new NfdPickFolderArgs { DefaultPath = defaultPath.AsPointer(), ParentWindow = nfdHandle }; + + byte* pathPtr; + result = Native.PickFolder(Native.INTERFACE_VERSION, &pathPtr, &nfdArgs); + + if (result == Result.Okay) + { + var path = Utf8.GetString(pathPtr, Utf8.GetByteCount(pathPtr)); + Native.FreePath(pathPtr); + return path; + } + + return string.Empty; + } + + /// + /// Pick a folder + /// + /// controls the dialog behavior + /// The selected path + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string OpenDialog(FolderDialogInfo inArgs = default) + { + return OpenDialog(inArgs, out _); + } + + /// + /// Pick multiple folder(s) + /// + /// controls the dialog behavior + /// the result of the dialog + /// The selected path + public static unsafe string[] OpenDialog(MultipleFolderDialogInfo inArgs, out Result result) + { + using var bytes = SpanOwner.Allocate(256, AllocationMode.Clear); + int writtenCount = 0; + + // TODO + NfdWindowHandle nfdHandle = new(); + + var defaultPath = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(inArgs.DefaultPath, defaultPath); + bytes.Span[writtenCount] = 0; // Null-terminate + + var nfdArgs = new NfdPickFolderArgs { DefaultPath = defaultPath.AsPointer(), ParentWindow = nfdHandle }; + + NfdPathSet* pathSet; + result = Native.PickFolderMultiple(Native.INTERFACE_VERSION, &pathSet, &nfdArgs); + + return result != Result.Okay ? [] : LoadPathSet(pathSet); + } + + /// + /// Pick multiple folder(s) + /// + /// controls the dialog behavior + /// The selected path + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string[] OpenDialog(MultipleFolderDialogInfo inArgs = default) + { + return OpenDialog(inArgs, out _); + } + + /// + /// Pick a file for saving + /// + /// controls the dialog behavior + /// the result of the dialog + /// The selected path + public static unsafe string OpenDialog(SaveFileDialogInfo inArgs, out Result result) + { + using var bytes = SpanOwner.Allocate(1024, AllocationMode.Clear); + int writtenCount = 0; + + var nfdFilterItems = stackalloc NfdFilterItem[inArgs.FilterList.Length]; + for (var i = 0; i < inArgs.FilterList.Length; i++) + { + var filter = inArgs.FilterList[i]; + + if (filter.Name.Length == 0) + throw new ArgumentException("Filter name is empty"); + if (filter.Spec.Length == 0) + throw new ArgumentException("Filter spec is empty"); + + var name = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(filter.Name, name); + bytes.Span[writtenCount++] = 0; // Null-terminate + + var spec = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(filter.Spec, spec); + bytes.Span[writtenCount++] = 0; // Null-terminate + + nfdFilterItems[i] = new NfdFilterItem { Name = name.AsPointer(), Spec = spec.AsPointer() }; + } + + // TODO + NfdWindowHandle nfdHandle = new(); + + var defaultPath = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(inArgs.DefaultPath, defaultPath); + bytes.Span[writtenCount++] = 0; // Null-terminate + + var defaultName = bytes.Span[writtenCount..]; + writtenCount += Utf8.GetBytes(inArgs.DefaultName, defaultName); + bytes.Span[writtenCount] = 0; // Null-terminate + + var nfdArgs = new NfdSaveDialogArgs + { + DefaultPath = defaultPath.AsPointer(), + DefaultName = defaultName.AsPointer(), + FilterList = nfdFilterItems, + FilterCount = inArgs.FilterList.Length, + ParentWindow = nfdHandle, + }; + + byte* pathPtr; + result = Native.SaveDialog(Native.INTERFACE_VERSION, &pathPtr, &nfdArgs); + + return result == Result.Okay ? Utf8.GetString(pathPtr, Utf8.GetByteCount(pathPtr)) : string.Empty; + } + + /// + /// Pick a file for saving + /// + /// controls the dialog behavior + /// The selected path + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string OpenDialog(SaveFileDialogInfo inArgs = default) + { + return OpenDialog(inArgs, out _); + } + + internal static unsafe string[] LoadPathSet(NfdPathSet* pathSet) + { + uint count; + if (Native.PathSet_GetCount(pathSet, &count) != Result.Okay) + return []; + + var paths = new string[count]; + for (uint i = 0; i < count; i++) + { + byte* pathPtr; + if (Native.PathSet_GetPath(pathSet, i, &pathPtr) != Result.Okay) + paths[i] = string.Empty; + else + { + paths[i] = Utf8.GetString(pathPtr, Utf8.GetByteCount(pathPtr)); + Native.PathSet_FreePath(pathPtr); + } + } + + return paths; + } + + internal static partial class Native + { + public const string DLL = "nfd"; + public const int INTERFACE_VERSION = 1; + + [LibraryImport(DLL, EntryPoint = "NFD_Init")] + public static partial Result Init(); + + [LibraryImport(DLL, EntryPoint = "NFD_Quit")] + public static partial Result Quit(); + + [LibraryImport(DLL, EntryPoint = "NFD_GetError")] + public static unsafe partial byte* GetError(); + + [LibraryImport(DLL, EntryPoint = "NFD_FreePathU8")] + public static unsafe partial void FreePath(byte* filePath); + + [LibraryImport(DLL, EntryPoint = "NFD_OpenDialogU8_With_Impl")] + public static unsafe partial Result OpenDialog(nuint version, byte** outPath, NfdOpenDialogArgs* args); + + [LibraryImport(DLL, EntryPoint = "NFD_OpenDialogMultipleU8_With_Impl")] + public static unsafe partial Result OpenDialogMultiple( + nuint version, + NfdPathSet** outPaths, + NfdOpenDialogArgs* args + ); + + [LibraryImport(DLL, EntryPoint = "NFD_PathSet_GetCount")] + public static unsafe partial Result PathSet_GetCount(NfdPathSet* pathSet, uint* count); + + [LibraryImport(DLL, EntryPoint = "NFD_PathSet_GetPathU8")] + public static unsafe partial Result PathSet_GetPath(NfdPathSet* pathSet, uint index, byte** outPath); + + [LibraryImport(DLL, EntryPoint = "NFD_PathSet_FreePathU8")] + public static unsafe partial void PathSet_FreePath(byte* filePath); + + [LibraryImport(DLL, EntryPoint = "NFD_PickFolderU8_With_Impl")] + public static unsafe partial Result PickFolder(nuint version, byte** outPath, NfdPickFolderArgs* args); + + [LibraryImport(DLL, EntryPoint = "NFD_PickFolderMultipleU8_With_Impl")] + public static unsafe partial Result PickFolderMultiple( + nuint version, + NfdPathSet** outPaths, + NfdPickFolderArgs* args + ); + + [LibraryImport(DLL, EntryPoint = "NFD_SaveDialogU8_With_Impl")] + public static unsafe partial Result SaveDialog(nuint version, byte** outPath, NfdSaveDialogArgs* args); + } +} diff --git a/Brutal.NativeFileDialog/NativeFileDialogTypes.cs b/Brutal.NativeFileDialog/NativeFileDialogTypes.cs new file mode 100644 index 0000000..2588ef9 --- /dev/null +++ b/Brutal.NativeFileDialog/NativeFileDialogTypes.cs @@ -0,0 +1,157 @@ +using System; + +namespace Brutal.NativeFileDialogApi +{ + internal unsafe struct NfdFilterItem + { + public byte* Name; + public byte* Spec; + } + + internal unsafe struct NfdWindowHandle + { + public ulong Type; + public void* Handle; + } + + internal unsafe struct NfdOpenDialogArgs + { + public NfdFilterItem* FilterList; + public int FilterCount; + public byte* DefaultPath; + public NfdWindowHandle ParentWindow; + } + + internal unsafe struct NfdSaveDialogArgs + { + public NfdFilterItem* FilterList; + public int FilterCount; + public byte* DefaultPath; + public byte* DefaultName; + public NfdWindowHandle ParentWindow; + } + + internal unsafe struct NfdPickFolderArgs + { + public byte* DefaultPath; + public NfdWindowHandle ParentWindow; + } + + internal struct NfdPathSet; + + /// + /// Filter for a dialog + /// + public struct FilterItem() + { + /// + /// The user-readable name of the filter + /// + public string Name = ""; + + /// + /// The specification for the filter + /// + public string Spec = ""; + } + + /// + /// Arguments for a dialog opening file(s) + /// + public ref struct FileDialogInfo() + { + /// + /// A pointer to a list of filters + /// + public ReadOnlySpan FilterList = []; + + /// + /// The default path to open + /// + public string DefaultPath = ""; + + /// + /// A handle to the parent window + /// + public nint ParentWindow = 0; + } + + /// + /// Arguments for a dialog opening file(s) + /// + public ref struct MultipleFileDialogInfo() + { + /// + /// A pointer to a list of filters + /// + public ReadOnlySpan FilterList = []; + + /// + /// The default path to open + /// + public string DefaultPath = ""; + + /// + /// A handle to the parent window + /// + public nint ParentWindow = 0; + } + + /// + /// Arguments for a dialog saving a file + /// + public ref struct SaveFileDialogInfo() + { + /// + /// A pointer to a list of filters + /// + public ReadOnlySpan FilterList = []; + + /// + /// The default path to save to + /// + public string DefaultPath = ""; + + /// + /// The default name of the file + /// + public string DefaultName = ""; + + /// + /// A handle to the parent window + /// + public nint ParentWindow = 0; + } + + /// + /// Arguments for a dialog picking folder(s) + /// + public struct FolderDialogInfo() + { + /// + /// The default path to open from + /// + public string DefaultPath = ""; + + /// + /// A handle to the parent window + /// + public nint ParentWindow = 0; + } + + /// + /// Arguments for a dialog picking folder(s) + /// + public struct MultipleFolderDialogInfo() + { + /// + /// The default path to open from + /// + public string DefaultPath = ""; + + /// + /// A handle to the parent window + /// + public nint ParentWindow = 0; + } +} diff --git a/Brutal.NotCurses/Generated/Constants.gen.cs b/Brutal.NotCurses/Generated/Constants.gen.cs new file mode 100644 index 0000000..b9b5c42 --- /dev/null +++ b/Brutal.NotCurses/Generated/Constants.gen.cs @@ -0,0 +1,291 @@ +namespace Brutal.NotCursesApi +{ + public static partial class NotCurses + { + public static class Constants + { + public const ulong ALPHA_BLEND = 0x10000000UL; + public const ulong ALPHA_HIGHCONTRAST = 0x30000000UL; + public const ulong ALPHA_OPAQUE = 0x00000000UL; + public const ulong ALPHA_TRANSPARENT = 0x20000000UL; + public const string ANGLESBL = "🭌🭍🭎🭏🭐🭑🬼🬽🬾🬿🭀"; + public const string ANGLESBR = "🭁🭂🭃🭄🭅🭆🭇🭈🭉🭊🭋"; + public const string ANGLESTL = "🭝🭞🭟🭠🭡🭜🭗🭘🭙🭚🭛"; + public const string ANGLESTR = "🭒🭓🭔🭕🭖🭧🭢🭣🭤🭥🭦"; + public const string ARROWANTICLOCKW = "⮏⮍⮎⮌"; + public const string ARROWCIRCLEDW = "⮉⮋⮈⮊"; + public const string ARROWDASHEDW = "⭫⭭⭪⭬"; + public const string ARROWDOUBLEW = "⮅⮇⮄⮆"; + public const string ARROWW = "⭡⭣⭠⭢⭧⭩⭦⭨"; + public const string ASTERISKS5 = "🞯🞰🞱🞲🞳🞴"; + public const string ASTERISKS6 = "🞵🞶🞷🞸🞹🞺"; + public const string ASTERISKS8 = "🞻🞼✳🞽🞾🞿"; + public const string BLACKARROWHEADSW = "⮝⮟⮜⮞"; + public const string BLACKTRIANGLESW = "◢◣◥◤"; + public const string BOXASCII = "/\\\\/-|"; + public const string BOXASCIIW = "/\\\\/-|"; + public const int BOXCORNER_MASK = 0x0300; + public const uint BOXCORNER_SHIFT = 8U; + public const string BOXDOUBLE = "╔╗╚╝═║"; + public const string BOXDOUBLEW = "╔╗╚╝═║"; + public const string BOXDRAWHEAVYW = "╹╻╸╺"; + public const string BOXDRAWW = "╵╷╴╶"; + public const int BOXGRAD_BOTTOM = 0x0040; + public const int BOXGRAD_LEFT = 0x0080; + public const int BOXGRAD_RIGHT = 0x0020; + public const int BOXGRAD_TOP = 0x0010; + public const string BOXHEAVY = "┏┓┗┛━┃"; + public const string BOXHEAVYW = "┏┓┗┛━┃"; + public const string BOXLIGHT = "┌┐└┘─│"; + public const string BOXLIGHTW = "┌┐└┘─│"; + public const int BOXMASK_BOTTOM = 0x0004; + public const int BOXMASK_LEFT = 0x0008; + public const int BOXMASK_RIGHT = 0x0002; + public const int BOXMASK_TOP = 0x0001; + public const string BOXOUTER = "🭽🭾🭼🭿▁🭵🭶🭰"; + public const string BOXOUTERW = "🭽🭾🭼🭿▁🭵🭶🭰"; + public const string BOXROUND = "╭╮╰╯─│"; + public const string BOXROUNDW = "╭╮╰╯─│"; + public const int BPREFIXCOLUMNS = 9; + public const string BRAILLEEGCS = "\u2800\u2801\u2808\u2809\u2802\u2803\u280a\u280b\u2810\u2811\u2818\u2819\u2812\u2813\u281a\u281b\u2804\u2805\u280c\u280d\u2806\u2807\u280e\u280f\u2814\u2815\u281c\u281d\u2816\u2817\u281e\u281f\u2820\u2821\u2828\u2829\u2822\u2823\u282a\u282b\u2830\u2831\u2838\u2839\u2832\u2833\u283a\u283b\u2824\u2825\u282c\u282d\u2826\u2827\u282e\u282f\u2834\u2835\u283c\u283d\u2836\u2837\u283e\u283f\u2840\u2841\u2848\u2849\u2842\u2843\u284a\u284b\u2850\u2851\u2858\u2859\u2852\u2853\u285a\u285b\u2844\u2845\u284c\u284d\u2846\u2847\u284e\u284f\u2854\u2855\u285c\u285d\u2856\u2857\u285e\u285f\u2860\u2861\u2868\u2869\u2862\u2863\u286a\u286b\u2870\u2871\u2878\u2879\u2872\u2873\u287a\u287b\u2864\u2865\u286c\u286d\u2866\u2867\u286e\u286f\u2874\u2875\u287c\u287d\u2876\u2877\u287e\u287f\u2880\u2881\u2888\u2889\u2882\u2883\u288a\u288b\u2890\u2891\u2898\u2899\u2892\u2893\u289a\u289b\u2884\u2885\u288c\u288d\u2886\u2887\u288e\u288f\u2894\u2895\u289c\u289d\u2896\u2897\u289e\u289f\u28a0\u28a1\u28a8\u28a9\u28a2\u28a3\u28aa\u28ab\u28b0\u28b1\u28b8\u28b9\u28b2\u28b3\u28ba\u28bb\u28a4\u28a5\u28ac\u28ad\u28a6\u28a7\u28ae\u28af\u28b4\u28b5\u28bc\u28bd\u28b6\u28b7\u28be\u28bf\u28c0\u28c1\u28c8\u28c9\u28c2\u28c3\u28ca\u28cb\u28d0\u28d1\u28d8\u28d9\u28d2\u28d3\u28da\u28db\u28c4\u28c5\u28cc\u28cd\u28c6\u28c7\u28ce\u28cf\u28d4\u28d5\u28dc\u28dd\u28d6\u28d7\u28de\u28df\u28e0\u28e1\u28e8\u28e9\u28e2\u28e3\u28ea\u28eb\u28f0\u28f1\u28f8\u28f9\u28f2\u28f3\u28fa\u28fb\u28e4\u28e5\u28ec\u28ed\u28e6\u28e7\u28ee\u28ef\u28f4\u28f5\u28fc\u28fd\u28f6\u28f7\u28fe\u28ff"; + public const string CHESSBLACK = "\u265f\u265c\u265e\u265d\u265b\u265a"; + public const string CHESSWHITE = "\u2659\u2656\u2658\u2657\u2655\u2654"; + public const string CIRCULARARCSW = "◜◝◟◞"; + public const string DIAGONALSW = "🮣🮠🮡🮢🮤🮥🮦🮧"; + public const string DICE = "\u2680\u2681\u2682\u2683\u2684\u2685"; + public const string DIGITSSUBW = "₀₁₂₃₄₅₆₇₈₉"; + public const string DIGITSSUPERW = "⁰¹²³⁴⁵⁶⁷⁸⁹"; + public const ulong DIRECT_OPTION_DRAIN_INPUT = 0x0004UL; + public const ulong DIRECT_OPTION_INHIBIT_CBREAK = 0x0002UL; + public const ulong DIRECT_OPTION_INHIBIT_SETLOCALE = 0x0001UL; + public const ulong DIRECT_OPTION_NO_QUIT_SIGHANDLERS = 0x0008UL; + public const ulong DIRECT_OPTION_VERBOSE = 0x0010UL; + public const ulong DIRECT_OPTION_VERY_VERBOSE = 0x0020UL; + public const string EIGHTHSB = " ▁▂▃▄▅▆▇█"; + public const string EIGHTHSL = "▏▎▍▌▋▊▉█"; + public const string EIGHTHSR = "▕🮇🮈▐🮉🮊🮋█"; + public const string EIGHTHST = " ▔🮂🮃▀🮄🮅🮆█"; + public const string HALFBLOCKS = " ▀▄█"; + public const int INPUT_MAX_EFF_TEXT_CODEPOINTS = 4; + public const int IPREFIXCOLUMNS = 8; + public const int KEY_BACKSPACE = 1115008; + public const int KEY_BEGIN = 1115128; + public const int KEY_BUTTON1 = 1115201; + public const int KEY_BUTTON10 = 1115210; + public const int KEY_BUTTON11 = 1115211; + public const int KEY_BUTTON2 = 1115202; + public const int KEY_BUTTON3 = 1115203; + public const int KEY_BUTTON4 = 1115204; + public const int KEY_BUTTON5 = 1115205; + public const int KEY_BUTTON6 = 1115206; + public const int KEY_BUTTON7 = 1115207; + public const int KEY_BUTTON8 = 1115208; + public const int KEY_BUTTON9 = 1115209; + public const int KEY_CANCEL = 1115129; + public const int KEY_CAPS_LOCK = 1115150; + public const int KEY_CENTER = 1115127; + public const int KEY_CLOSE = 1115130; + public const int KEY_CLS = 1115122; + public const int KEY_COMMAND = 1115131; + public const int KEY_COPY = 1115132; + public const int KEY_DEL = 1115007; + public const int KEY_DLEFT = 1115123; + public const int KEY_DOWN = 1115004; + public const int KEY_DRIGHT = 1115124; + public const int KEY_END = 1115012; + public const int KEY_ENTER = 1115121; + public const int KEY_EOF = 1115500; + public const int KEY_ESC = 0x1b; + public const int KEY_EXIT = 1115133; + public const int KEY_F00 = 1115020; + public const int KEY_F01 = 1115021; + public const int KEY_F02 = 1115022; + public const int KEY_F03 = 1115023; + public const int KEY_F04 = 1115024; + public const int KEY_F05 = 1115025; + public const int KEY_F06 = 1115026; + public const int KEY_F07 = 1115027; + public const int KEY_F08 = 1115028; + public const int KEY_F09 = 1115029; + public const int KEY_F10 = 1115030; + public const int KEY_F11 = 1115031; + public const int KEY_F12 = 1115032; + public const int KEY_F13 = 1115033; + public const int KEY_F14 = 1115034; + public const int KEY_F15 = 1115035; + public const int KEY_F16 = 1115036; + public const int KEY_F17 = 1115037; + public const int KEY_F18 = 1115038; + public const int KEY_F19 = 1115039; + public const int KEY_F20 = 1115040; + public const int KEY_F21 = 1115041; + public const int KEY_F22 = 1115042; + public const int KEY_F23 = 1115043; + public const int KEY_F24 = 1115044; + public const int KEY_F25 = 1115045; + public const int KEY_F26 = 1115046; + public const int KEY_F27 = 1115047; + public const int KEY_F28 = 1115048; + public const int KEY_F29 = 1115049; + public const int KEY_F30 = 1115050; + public const int KEY_F31 = 1115051; + public const int KEY_F32 = 1115052; + public const int KEY_F33 = 1115053; + public const int KEY_F34 = 1115054; + public const int KEY_F35 = 1115055; + public const int KEY_F36 = 1115056; + public const int KEY_F37 = 1115057; + public const int KEY_F38 = 1115058; + public const int KEY_F39 = 1115059; + public const int KEY_F40 = 1115060; + public const int KEY_F41 = 1115061; + public const int KEY_F42 = 1115062; + public const int KEY_F43 = 1115063; + public const int KEY_F44 = 1115064; + public const int KEY_F45 = 1115065; + public const int KEY_F46 = 1115066; + public const int KEY_F47 = 1115067; + public const int KEY_F48 = 1115068; + public const int KEY_F49 = 1115069; + public const int KEY_F50 = 1115070; + public const int KEY_F51 = 1115071; + public const int KEY_F52 = 1115072; + public const int KEY_F53 = 1115073; + public const int KEY_F54 = 1115074; + public const int KEY_F55 = 1115075; + public const int KEY_F56 = 1115076; + public const int KEY_F57 = 1115077; + public const int KEY_F58 = 1115078; + public const int KEY_F59 = 1115079; + public const int KEY_F60 = 1115080; + public const int KEY_HOME = 1115011; + public const int KEY_INS = 1115006; + public const int KEY_INVALID = 1115000; + public const int KEY_L3SHIFT = 1115183; + public const int KEY_L5SHIFT = 1115184; + public const int KEY_LALT = 1115173; + public const int KEY_LCTRL = 1115172; + public const int KEY_LEFT = 1115005; + public const int KEY_LHYPER = 1115175; + public const int KEY_LMETA = 1115176; + public const int KEY_LSHIFT = 1115171; + public const int KEY_LSUPER = 1115174; + public const int KEY_MEDIA_FF = 1115163; + public const int KEY_MEDIA_LVOL = 1115168; + public const int KEY_MEDIA_MUTE = 1115170; + public const int KEY_MEDIA_NEXT = 1115165; + public const int KEY_MEDIA_PAUSE = 1115159; + public const int KEY_MEDIA_PLAY = 1115158; + public const int KEY_MEDIA_PPAUSE = 1115160; + public const int KEY_MEDIA_PREV = 1115166; + public const int KEY_MEDIA_RECORD = 1115167; + public const int KEY_MEDIA_REV = 1115161; + public const int KEY_MEDIA_REWIND = 1115164; + public const int KEY_MEDIA_RVOL = 1115169; + public const int KEY_MEDIA_STOP = 1115162; + public const int KEY_MENU = 1115155; + public const int KEY_MOD_ALT = 2; + public const int KEY_MOD_CAPSLOCK = 64; + public const int KEY_MOD_CTRL = 4; + public const int KEY_MOD_HYPER = 16; + public const int KEY_MOD_META = 32; + public const int KEY_MOD_NUMLOCK = 128; + public const int KEY_MOD_SHIFT = 1; + public const int KEY_MOD_SUPER = 8; + public const int KEY_MOTION = 1115200; + public const int KEY_NUM_LOCK = 1115152; + public const int KEY_PAUSE = 1115154; + public const int KEY_PGDOWN = 1115009; + public const int KEY_PGUP = 1115010; + public const int KEY_PRINT = 1115134; + public const int KEY_PRINT_SCREEN = 1115153; + public const int KEY_RALT = 1115179; + public const int KEY_RCTRL = 1115178; + public const int KEY_REFRESH = 1115135; + public const int KEY_RESIZE = 1115001; + public const int KEY_RHYPER = 1115181; + public const int KEY_RIGHT = 1115003; + public const int KEY_RMETA = 1115182; + public const int KEY_RSHIFT = 1115177; + public const int KEY_RSUPER = 1115180; + public const int KEY_SCROLL_LOCK = 1115151; + public const int KEY_SEPARATOR = 1115136; + public const int KEY_SIGNAL = 1115400; + public const int KEY_SPACE = 0x20; + public const int KEY_TAB = 0x09; + public const int KEY_ULEFT = 1115125; + public const int KEY_UP = 1115002; + public const int KEY_URIGHT = 1115126; + public const string LIGHTARROWHEADSW = "⮙⮛⮘⮚"; + public const ulong MENU_OPTION_BOTTOM = 0x0001UL; + public const ulong MENU_OPTION_HIDING = 0x0002UL; + public const int MICE_ALL_EVENTS = 0x7; + public const int MICE_BUTTON_EVENT = 0x2; + public const int MICE_DRAG_EVENT = 0x4; + public const int MICE_MOVE_EVENT = 0x1; + public const int MICE_NO_EVENTS = 0; + public const string MUSICSYM = "\u2669\u266A\u266B\u266C\u266D\u266E\u266F"; + public const string OCTBLOCKS = " \U0001CEA8\U0001CEAB\U0001FB82\U0001CD00\U00002598\U0001CD01\U0001CD02\U0001CD03\U0001CD04\U0000259D\U0001CD05\U0001CD06\U0001CD07\U0001CD08\U00002580\U0001CD09\U0001CD0A\U0001CD0B\U0001CD0C\U0001FBE6\U0001CD0D\U0001CD0E\U0001CD0F\U0001CD10\U0001CD11\U0001CD12\U0001CD13\U0001CD14\U0001CD15\U0001CD16\U0001CD17\U0001CD18\U0001CD19\U0001CD1A\U0001CD1B\U0001CD1C\U0001CD1D\U0001CD1E\U0001CD1F\U0001FBE7\U0001CD20\U0001CD21\U0001CD22\U0001CD23\U0001CD24\U0001CD25\U0001CD26\U0001CD27\U0001CD28\U0001CD29\U0001CD2A\U0001CD2B\U0001CD2C\U0001CD2D\U0001CD2E\U0001CD2F\U0001CD30\U0001CD31\U0001CD32\U0001CD33\U0001CD34\U0001CD35\U0001FB85\U0001CEA3\U0001CD36\U0001CD37\U0001CD38\U0001CD39\U0001CD3A\U0001CD3B\U0001CD3C\U0001CD3D\U0001CD3E\U0001CD3F\U0001CD40\U0001CD41\U0001CD42\U0001CD43\U0001CD44\U00002596\U0001CD45\U0001CD46\U0001CD47\U0001CD48\U0000258C\U0001CD49\U0001CD4A\U0001CD4B\U0001CD4C\U0000259E\U0001CD4D\U0001CD4E\U0001CD4F\U0001CD50\U0000259B\U0001CD51\U0001CD52\U0001CD53\U0001CD54\U0001CD55\U0001CD56\U0001CD57\U0001CD58\U0001CD59\U0001CD5A\U0001CD5B\U0001CD5C\U0001CD5D\U0001CD5E\U0001CD5F\U0001CD60\U0001CD61\U0001CD62\U0001CD63\U0001CD64\U0001CD65\U0001CD66\U0001CD67\U0001CD68\U0001CD69\U0001CD6A\U0001CD6B\U0001CD6C\U0001CD6D\U0001CD6E\U0001CD6F\U0001CD70\U0001CEA0\U0001CD71\U0001CD72\U0001CD73\U0001CD74\U0001CD75\U0001CD76\U0001CD77\U0001CD78\U0001CD79\U0001CD7A\U0001CD7B\U0001CD7C\U0001CD7D\U0001CD7E\U0001CD7F\U0001CD80\U0001CD81\U0001CD82\U0001CD83\U0001CD84\U0001CD85\U0001CD86\U0001CD87\U0001CD88\U0001CD89\U0001CD8A\U0001CD8B\U0001CD8C\U0001CD8D\U0001CD8E\U0001CD8F\U00002597\U0001CD90\U0001CD91\U0001CD92\U0001CD93\U0000259A\U0001CD94\U0001CD95\U0001CD96\U0001CD97\U00002590\U0001CD98\U0001CD99\U0001CD9A\U0001CD9B\U0000259C\U0001CD9C\U0001CD9D\U0001CD9E\U0001CD9F\U0001CDA0\U0001CDA1\U0001CDA2\U0001CDA3\U0001CDA4\U0001CDA5\U0001CDA6\U0001CDA7\U0001CDA8\U0001CDA9\U0001CDAA\U0001CDAB\U00002582\U0001CDAC\U0001CDAD\U0001CDAE\U0001CDAF\U0001CDB0\U0001CDB1\U0001CDB2\U0001CDB3\U0001CDB4\U0001CDB5\U0001CDB6\U0001CDB7\U0001CDB8\U0001CDB9\U0001CDBA\U0001CDBB\U0001CDBC\U0001CDBD\U0001CDBE\U0001CDBF\U0001CDC0\U0001CDC1\U0001CDC2\U0001CDC3\U0001CDC4\U0001CDC5\U0001CDC6\U0001CDC7\U0001CDC8\U0001CDC9\U0001CDCA\U0001CDCB\U0001CDCC\U0001CDCD\U0001CDCE\U0001CDCF\U0001CDD0\U0001CDD1\U0001CDD2\U0001CDD3\U0001CDD4\U0001CDD5\U0001CDD6\U0001CDD7\U0001CDD8\U0001CDD9\U0001CDDA\U00002584\U0001CDDB\U0001CDDC\U0001CDDD\U0001CDDE\U00002599\U0001CDDF\U0001CDE0\U0001CDE1\U0001CDE2\U0000259F\U0001CDE3\U00002586\U0001CDE4\U0001CDE5\U00002588"; + public const ulong OPTION_DRAIN_INPUT = 0x0100UL; + public const ulong OPTION_INHIBIT_SETLOCALE = 0x0001UL; + public const ulong OPTION_NO_ALTERNATE_SCREEN = 0x0040UL; + public const ulong OPTION_NO_CLEAR_BITMAPS = 0x0002UL; + public const ulong OPTION_NO_FONT_CHANGES = 0x0080UL; + public const ulong OPTION_NO_QUIT_SIGHANDLERS = 0x0008UL; + public const ulong OPTION_NO_WINCH_SIGHANDLER = 0x0004UL; + public const ulong OPTION_PRESERVE_CURSOR = 0x0010UL; + public const ulong OPTION_SCROLLING = 0x0200UL; + public const ulong OPTION_SUPPRESS_BANNERS = 0x0020UL; + public const int PALETTESIZE = 256; + public const ulong PLANE_OPTION_AUTOGROW = 0x0010UL; + public const ulong PLANE_OPTION_FIXED = 0x0008UL; + public const ulong PLANE_OPTION_HORALIGNED = 0x0001UL; + public const ulong PLANE_OPTION_MARGINALIZED = 0x0004UL; + public const ulong PLANE_OPTION_VERALIGNED = 0x0002UL; + public const ulong PLANE_OPTION_VSCROLL = 0x0020UL; + public const uint PLOT_OPTION_DETECTMAXONLY = 0x0010U; + public const uint PLOT_OPTION_EXPONENTIALD = 0x0002U; + public const uint PLOT_OPTION_LABELTICKSD = 0x0001U; + public const uint PLOT_OPTION_NODEGRADE = 0x0008U; + public const uint PLOT_OPTION_PRINTSAMPLE = 0x0020U; + public const uint PLOT_OPTION_VERTICALI = 0x0004U; + public const int PREFIXCOLUMNS = 7; + public const uint PROGBAR_OPTION_RETROGRADE = 0x0001U; + public const string QUADBLOCKS = " ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█"; + public const ulong READER_OPTION_CURSOR = 0x0008UL; + public const ulong READER_OPTION_HORSCROLL = 0x0001UL; + public const ulong READER_OPTION_NOCMDKEYS = 0x0004UL; + public const ulong READER_OPTION_VERSCROLL = 0x0002UL; + public const ulong REEL_OPTION_CIRCULAR = 0x0002UL; + public const ulong REEL_OPTION_INFINITESCROLL = 0x0001UL; + public const string SEGDIGITS = "\U0001FBF0\U0001FBF1\U0001FBF2\U0001FBF3\U0001FBF4\U0001FBF5\U0001FBF6\U0001FBF7\U0001FBF8\U0001FBF9"; + public const string SEXBLOCKS = " 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓▌🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞🬟🬠🬡🬢🬣🬤🬥🬦🬧▐🬨🬩🬪🬫🬬🬭🬮🬯🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻█"; + public const string SHADETRIANGLESW = "🮞🮟🮝🮜"; + public const uint STYLE_BOLD = 0x0002U; + public const uint STYLE_ITALIC = 0x0010U; + public const uint STYLE_MASK = 0xffffU; + public const int STYLE_NONE = 0; + public const uint STYLE_STRUCK = 0x0001U; + public const uint STYLE_UNDERCURL = 0x0004U; + public const uint STYLE_UNDERLINE = 0x0008U; + public const string SUITSBLACK = "\u2660\u2663\u2665\u2666"; + public const string SUITSWHITE = "\u2661\u2662\u2664\u2667"; + public const ulong TABBED_OPTION_BOTTOM = 0x0001UL; + public const ulong VISUAL_OPTION_ADDALPHA = 0x0010UL; + public const ulong VISUAL_OPTION_BLEND = 0x0002UL; + public const ulong VISUAL_OPTION_CHILDPLANE = 0x0020UL; + public const ulong VISUAL_OPTION_HORALIGNED = 0x0004UL; + public const ulong VISUAL_OPTION_NODEGRADE = 0x0001UL; + public const ulong VISUAL_OPTION_NOINTERPOLATE = 0x0040UL; + public const ulong VISUAL_OPTION_VERALIGNED = 0x0008UL; + public const string WHITECIRCLESW = "◶◵◷◴"; + public const string WHITESQUARESW = "◲◱◳◰"; + public const string WHITETRIANGLESW = "◿◺◹◸"; + public const ulong BGDEFAULT_MASK = 0x0000000040000000UL; + public const ulong BG_ALPHA_MASK = 0x30000000UL; + public const ulong BG_PALETTE = 0x0000000008000000UL; + public const ulong BG_RGB_MASK = 0x0000000000ffffffUL; + public const ulong NOBACKGROUND_MASK = 0x8700000000000000UL; + } + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcAlign.gen.cs b/Brutal.NotCurses/Generated/Enums/NcAlign.gen.cs new file mode 100644 index 0000000..a009add --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcAlign.gen.cs @@ -0,0 +1,12 @@ +using System; +namespace Brutal.NotCursesApi +{ + /// Alignment within a plane or terminal. Left/right-justified, or centered. + public enum NcAlign + { + Unaligned, + Left, + Center, + Right, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcAlpha.gen.cs b/Brutal.NotCurses/Generated/Enums/NcAlpha.gen.cs new file mode 100644 index 0000000..64bdc36 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcAlpha.gen.cs @@ -0,0 +1,12 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcAlpha : ulong + { + Blend = 0x10000000UL, + HighContrast = 0x30000000UL, + Opaque = 0x00000000UL, + Transparent = 0x20000000UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcBlitter.gen.cs b/Brutal.NotCurses/Generated/Enums/NcBlitter.gen.cs new file mode 100644 index 0000000..aaf308a --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcBlitter.gen.cs @@ -0,0 +1,20 @@ +using System; +namespace Brutal.NotCursesApi +{ + /// we never blit full blocks, but instead spaces (more efficient) with the + /// background set to the desired foreground. these need be kept in the same + /// order as the blitters[] definition in lib/blit.c. + public enum NcBlitter + { + Default, // let the ncvisual pick + _1x1, // space, compatible with ASCII + _2x1, // halves + 1x1 (space) ▄▀ + _2x2, // quadrants + 2x1 ▗▐ ▖▀▟▌▙ + _3x2, // sextants + 2x1 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞 + _4x2, // octants + 2x2 there are a great many octants + Braille, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿ + Pixel, // pixel graphics + _4x1, // four vertical levels █▆▄▂ + _8x1, // eight vertical levels █▇▆▅▄▃▂▁ + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcBoxOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcBoxOption.gen.cs new file mode 100644 index 0000000..4d4255c --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcBoxOption.gen.cs @@ -0,0 +1,16 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcBoxOption + { + GradBottom = 0x0040, + GradLeft = 0x0080, + GradRight = 0x0020, + GradTop = 0x0010, + MaskBottom = 0x0004, + MaskLeft = 0x0008, + MaskRight = 0x0002, + MaskTop = 0x0001, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcDirectOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcDirectOption.gen.cs new file mode 100644 index 0000000..afad2fd --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcDirectOption.gen.cs @@ -0,0 +1,14 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcDirectOption : ulong + { + DrainInput = 0x0004UL, + InhibitCBreak = 0x0002UL, + InhibitSetLocale = 0x0001UL, + NoQuitSigHandlers = 0x0008UL, + Verbose = 0x0010UL, + VeryVerbose = 0x0020UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcInType.gen.cs b/Brutal.NotCurses/Generated/Enums/NcInType.gen.cs new file mode 100644 index 0000000..2308d03 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcInType.gen.cs @@ -0,0 +1,11 @@ +using System; +namespace Brutal.NotCursesApi +{ + public enum NcInType + { + Unknown, + Press, + Repeat, + Release, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcKeyModifier.gen.cs b/Brutal.NotCurses/Generated/Enums/NcKeyModifier.gen.cs new file mode 100644 index 0000000..15e48f7 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcKeyModifier.gen.cs @@ -0,0 +1,16 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcKeyModifier + { + Alt = 2, + Capslock = 64, + Ctrl = 4, + Hyper = 16, + Meta = 32, + Numlock = 128, + Shift = 1, + Super = 8, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcLogLevel.gen.cs b/Brutal.NotCurses/Generated/Enums/NcLogLevel.gen.cs new file mode 100644 index 0000000..bef3d9d --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcLogLevel.gen.cs @@ -0,0 +1,22 @@ +using System; +namespace Brutal.NotCursesApi +{ + /// These log levels consciously map cleanly to those of libav; Notcurses itself + /// does not use this full granularity. The log level does not affect the opening + /// and closing banners, which can be disabled via the notcurses_option struct's + /// 'suppress_banner'. Note that if stderr is connected to the same terminal on + /// which we're rendering, any kind of logging will disrupt the output (which is + /// undesirable). The "default" zero value is NCLOGLEVEL_PANIC. + public enum NcLogLevel + { + Silent = -1, // default. print nothing once fullscreen service begins + Panic = 0, // print diagnostics related to catastrophic failure + Fatal = 1, // we're hanging around, but we've had a horrible fault + Error = 2, // we can't keep doing this, but we can do other things + Warning = 3, // you probably don't want what's happening to happen + Info = 4, // "standard information" + Verbose = 5, // "detailed information" + Debug = 6, // this is honestly a bit much + Trace = 7, // there's probably a better way to do what you want + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcMenuOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcMenuOption.gen.cs new file mode 100644 index 0000000..36c3ae4 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcMenuOption.gen.cs @@ -0,0 +1,10 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcMenuOption : ulong + { + Bottom = 0x0001UL, + Hiding = 0x0002UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcMiceEvent.gen.cs b/Brutal.NotCurses/Generated/Enums/NcMiceEvent.gen.cs new file mode 100644 index 0000000..16067af --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcMiceEvent.gen.cs @@ -0,0 +1,13 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcMiceEvent + { + AllEvents = 0x7, + ButtonEvent = 0x2, + DragEvent = 0x4, + MoveEvent = 0x1, + NoEvents = 0, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcPixelImpl.gen.cs b/Brutal.NotCurses/Generated/Enums/NcPixelImpl.gen.cs new file mode 100644 index 0000000..75a0fb5 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcPixelImpl.gen.cs @@ -0,0 +1,26 @@ +using System; +namespace Brutal.NotCursesApi +{ + /// pixel blitting implementations. informative only; don't special-case + /// based off any of this information! + public enum NcPixelImpl + { + None = 0, + Sixel, // sixel + LinuxFb, // linux framebuffer + ITerm2, // iTerm2 + /// C=1 (disabling scrolling) was only introduced in 0.20.0, at the same + /// time as animation. prior to this, graphics had to be entirely redrawn + /// on any change, and it wasn't possible to use the bottom line. + KittyStatic, + /// until 0.22.0's introduction of 'a=c' for self-referential composition, we + /// had to keep a complete copy of the RGBA data, in case a wiped cell needed + /// to be rebuilt. we'd otherwise have to unpack the glyph and store it into + /// the auxvec on the fly. + KittyAnimated, + /// with 0.22.0, we only ever write transparent cells after writing the + /// original image (which we now deflate, since we needn't unpack it later). + /// the only data we need keep is the auxvecs. + KittySelfRef, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcPlaneOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcPlaneOption.gen.cs new file mode 100644 index 0000000..ab19580 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcPlaneOption.gen.cs @@ -0,0 +1,14 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcPlaneOption : ulong + { + Autogrow = 0x0010UL, + Fixed = 0x0008UL, + HorAligned = 0x0001UL, + Marginalized = 0x0004UL, + VerAligned = 0x0002UL, + Vscroll = 0x0020UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcPlotOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcPlotOption.gen.cs new file mode 100644 index 0000000..ebeaf7c --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcPlotOption.gen.cs @@ -0,0 +1,14 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcPlotOption : uint + { + DetectMaxOnly = 0x0010U, + ExponentialD = 0x0002U, + LabelTicksD = 0x0001U, + NoDegrade = 0x0008U, + PrintSample = 0x0020U, + VerticalI = 0x0004U, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcProgbarOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcProgbarOption.gen.cs new file mode 100644 index 0000000..78435b6 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcProgbarOption.gen.cs @@ -0,0 +1,9 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcProgbarOption : uint + { + Retrograde = 0x0001U, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcReaderOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcReaderOption.gen.cs new file mode 100644 index 0000000..a523cf4 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcReaderOption.gen.cs @@ -0,0 +1,12 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcReaderOption : ulong + { + Cursor = 0x0008UL, + Horscroll = 0x0001UL, + Nocmdkeys = 0x0004UL, + Verscroll = 0x0002UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcReelOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcReelOption.gen.cs new file mode 100644 index 0000000..e2a3e7f --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcReelOption.gen.cs @@ -0,0 +1,10 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcReelOption : ulong + { + Circular = 0x0002UL, + Infinitescroll = 0x0001UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcScale.gen.cs b/Brutal.NotCurses/Generated/Enums/NcScale.gen.cs new file mode 100644 index 0000000..ee4db72 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcScale.gen.cs @@ -0,0 +1,18 @@ +using System; +namespace Brutal.NotCursesApi +{ + /// How to scale an ncvisual during rendering. NCSCALE_NONE will apply no + /// scaling. NCSCALE_SCALE scales a visual to the plane's size, maintaining + /// aspect ratio. NCSCALE_STRETCH stretches and scales the image in an attempt + /// to fill the entirety of the plane. NCSCALE_NONE_HIRES and + /// NCSCALE_SCALE_HIRES behave like their counterparts, but admit blitters + /// which don't preserve aspect ratio. + public enum NcScale + { + None, + Scale, + Stretch, + NoneHires, + ScaleHires, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcStyle.gen.cs b/Brutal.NotCurses/Generated/Enums/NcStyle.gen.cs new file mode 100644 index 0000000..28e3c6b --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcStyle.gen.cs @@ -0,0 +1,15 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcStyle : uint + { + Bold = 0x0002U, + Italic = 0x0010U, + Mask = 0xffffU, + None = 0, + Struck = 0x0001U, + Undercurl = 0x0004U, + Underline = 0x0008U, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcTabbedOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcTabbedOption.gen.cs new file mode 100644 index 0000000..1797e2d --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcTabbedOption.gen.cs @@ -0,0 +1,9 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcTabbedOption : ulong + { + Bottom = 0x0001UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NcVisualOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NcVisualOption.gen.cs new file mode 100644 index 0000000..056e0b6 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NcVisualOption.gen.cs @@ -0,0 +1,15 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NcVisualOption : ulong + { + AddAlpha = 0x0010UL, + Blend = 0x0002UL, + ChildPlane = 0x0020UL, + HorAligned = 0x0004UL, + NoDegrade = 0x0001UL, + NoInterpolate = 0x0040UL, + VerAligned = 0x0008UL, + } +} diff --git a/Brutal.NotCurses/Generated/Enums/NotCursesOption.gen.cs b/Brutal.NotCurses/Generated/Enums/NotCursesOption.gen.cs new file mode 100644 index 0000000..a6798d4 --- /dev/null +++ b/Brutal.NotCurses/Generated/Enums/NotCursesOption.gen.cs @@ -0,0 +1,18 @@ +using System; +namespace Brutal.NotCursesApi +{ + [Flags] + public enum NotCursesOption : ulong + { + DrainInput = 0x0100UL, + InhibitSetLocale = 0x0001UL, + NoAlternateScreen = 0x0040UL, + NoClearBitmaps = 0x0002UL, + NoFontChanges = 0x0080UL, + NoQuitSigHandlers = 0x0008UL, + NoWinchSigHandler = 0x0004UL, + PreserveCursor = 0x0010UL, + Scrolling = 0x0200UL, + SuppressBanners = 0x0020UL, + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcDPlotHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcDPlotHandle.gen.cs new file mode 100644 index 0000000..d87b193 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcDPlotHandle.gen.cs @@ -0,0 +1,37 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcDPlotHandle + { + } + public unsafe readonly partial struct NcDPlotHandle + { + public void AddSample(ulong x, double y) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_add_sample(this, x, y); + if (__r != 0) throw new NcResultException("ncdplot_add_sample", __r); + } + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_destroy(this); + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_plane(this); + public double Sample(ulong x) + { + double y = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_sample(this, x, new Ptr(&y)); + if (__r != 0) throw new NcResultException("ncdplot_sample", __r); + return y; + } + public void SetSample(ulong x, double y) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_set_sample(this, x, y); + if (__r != 0) throw new NcResultException("ncdplot_set_sample", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcDirectHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcDirectHandle.gen.cs new file mode 100644 index 0000000..c424247 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcDirectHandle.gen.cs @@ -0,0 +1,342 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcDirectHandle + { + } + public unsafe readonly partial struct NcDirectHandle + { + public void AsciiBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_ascii_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncdirect_ascii_box", __r); + } + public Bool8 CanBraille() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canbraille(this); + public Bool8 CanChangeColor() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canchangecolor(this); + public Bool8 CanFade() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canfade(this); + public Bool8 CanGetCursor() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canget_cursor(this); + public Bool8 CanHalfBlock() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canhalfblock(this); + public Bool8 CanOctant() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canoctant(this); + public Bool8 CanOpenImages() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canopen_images(this); + public Bool8 CanOpenVideos() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canopen_videos(this); + public Bool8 CanQuadrant() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canquadrant(this); + public Bool8 CanSextant() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cansextant(this); + public Bool8 CanTrueColor() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cantruecolor(this); + public Bool8 CanUtf8() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canutf8(this); + public Ptr Capabilities() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_capabilities(this); + public int CheckPixelSupport() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_check_pixel_support(this); + public void Clear() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_clear(this); + if (__r != 0) throw new NcResultException("ncdirect_clear", __r); + } + public void CursorDisable() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_disable(this); + if (__r != 0) throw new NcResultException("ncdirect_cursor_disable", __r); + } + public void CursorDown(int num) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_down(this, num); + if (__r != 0) throw new NcResultException("ncdirect_cursor_down", __r); + } + public void CursorEnable() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_enable(this); + if (__r != 0) throw new NcResultException("ncdirect_cursor_enable", __r); + } + public void CursorLeft(int num) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_left(this, num); + if (__r != 0) throw new NcResultException("ncdirect_cursor_left", __r); + } + public void CursorMove(int2 xy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_move_yx(this, xy.Y, xy.X); + if (__r != 0) throw new NcResultException("ncdirect_cursor_move_yx", __r); + } + public void CursorPop() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_pop(this); + if (__r != 0) throw new NcResultException("ncdirect_cursor_pop", __r); + } + public void CursorPush() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_push(this); + if (__r != 0) throw new NcResultException("ncdirect_cursor_push", __r); + } + public void CursorRight(int num) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_right(this, num); + if (__r != 0) throw new NcResultException("ncdirect_cursor_right", __r); + } + public void CursorUp(int num) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_up(this, num); + if (__r != 0) throw new NcResultException("ncdirect_cursor_up", __r); + } + public void CursorYx(Ptr y, Ptr x) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_yx(this, y, x); + if (__r != 0) throw new NcResultException("ncdirect_cursor_yx", __r); + } + public void Cursor(out uint2 xy) + { + uint xyY = default; + uint xyX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + if (__r != 0) throw new NcResultException("ncdirect_cursor_yx", __r); + xy = new uint2(xyX, xyY); + } + public string DetectedTerminal() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_detected_terminal(this); + public uint DimX() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_dim_x(this); + public uint DimY() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_dim_y(this); + public void DoubleBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_double_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncdirect_double_box", __r); + } + public void Flush() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_flush(this); + if (__r != 0) throw new NcResultException("ncdirect_flush", __r); + } + public uint Get(Ptr absdl, Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get(this, absdl, ni); + public uint Get(out TimeSpec absdl, out NcInput ni) + { + absdl = default; + ni = default; + fixed (TimeSpec* absdlPtr = &absdl) + { + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get(this, new Ptr(absdlPtr), new Ptr(niPtr)); + } + } + } + public uint GetBlocking(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_blocking(this, ni); + public uint GetBlocking(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_blocking(this, new Ptr(niPtr)); + } + } + public uint GetNblock(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_nblock(this, ni); + public uint GetNblock(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_nblock(this, new Ptr(niPtr)); + } + } + public void HeavyBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_heavy_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncdirect_heavy_box", __r); + } + public void HlineInterp(Ptr egc, uint len, ulong h1, ulong h2) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_hline_interp(this, egc, len, h1, h2); + if (__r != 0) throw new NcResultException("ncdirect_hline_interp", __r); + } + public void InputReadyFd() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_inputready_fd(this); + if (__r != 0) throw new NcResultException("ncdirect_inputready_fd", __r); + } + public void LightBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_light_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncdirect_light_box", __r); + } + public void OffStyles(uint styleBits) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_off_styles(this, styleBits); + if (__r != 0) throw new NcResultException("ncdirect_off_styles", __r); + } + public void OnStyles(uint styleBits) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_on_styles(this, styleBits); + if (__r != 0) throw new NcResultException("ncdirect_on_styles", __r); + } + public uint PaletteSize() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_palette_size(this); + public void PrintfAligned(int y, NcAlign align, RefString8 fmt) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_printf_aligned(this, y, align, fmt); + if (__r != 0) throw new NcResultException("ncdirect_printf_aligned", __r); + } + public int PutEgc(ulong channels, RefString8 utf8, Ptr sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_putegc(this, channels, utf8, sBytes); + if (__r < 0) throw new NcResultException("ncdirect_putegc", __r); + return __r; + } + public int PutEgc(ulong channels, RefString8 utf8, out int sBytes) + { + sBytes = default; + fixed (int* sBytesPtr = &sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_putegc(this, channels, utf8, new Ptr(sBytesPtr)); + if (__r < 0) throw new NcResultException("ncdirect_putegc", __r); + return __r; + } + } + public int PutStr(ulong channels, RefString8 utf8) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_putstr(this, channels, utf8); + if (__r < 0) throw new NcResultException("ncdirect_putstr", __r); + return __r; + } + public void RasterFrame(NcPlaneHandle ncdv, NcAlign align) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_raster_frame(this, ncdv, align); + if (__r != 0) throw new NcResultException("ncdirect_raster_frame", __r); + } + public string ReadLine(RefString8 prompt) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_readline(this, prompt); + public NcPlaneHandle RenderFrame(RefString8 filename, NcBlitter blitter, NcScale scale, int2 max) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_render_frame(this, filename, blitter, scale, max.Y, max.X); + public void RenderImage(RefString8 filename, NcAlign align, NcBlitter blitter, NcScale scale) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_render_image(this, filename, align, blitter, scale); + if (__r != 0) throw new NcResultException("ncdirect_render_image", __r); + } + public void RoundedBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_rounded_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncdirect_rounded_box", __r); + } + public void SetBgDefault() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_default(this); + if (__r != 0) throw new NcResultException("ncdirect_set_bg_default", __r); + } + public void SetBgPalindex(int pIdx) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_palindex(this, pIdx); + if (__r != 0) throw new NcResultException("ncdirect_set_bg_palindex", __r); + } + public void SetBgRgb(uint rgb) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_rgb(this, rgb); + if (__r != 0) throw new NcResultException("ncdirect_set_bg_rgb", __r); + } + public void SetBgRgb8(uint r, uint g, uint b) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_rgb8(this, r, g, b); + if (__r != 0) throw new NcResultException("ncdirect_set_bg_rgb8", __r); + } + public void SetFgDefault() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_default(this); + if (__r != 0) throw new NcResultException("ncdirect_set_fg_default", __r); + } + public void SetFgPalindex(int pIdx) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_palindex(this, pIdx); + if (__r != 0) throw new NcResultException("ncdirect_set_fg_palindex", __r); + } + public void SetFgRgb(uint rgb) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_rgb(this, rgb); + if (__r != 0) throw new NcResultException("ncdirect_set_fg_rgb", __r); + } + public void SetFgRgb8(uint r, uint g, uint b) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_rgb8(this, r, g, b); + if (__r != 0) throw new NcResultException("ncdirect_set_fg_rgb8", __r); + } + public void SetStyles(uint styleBits) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_styles(this, styleBits); + if (__r != 0) throw new NcResultException("ncdirect_set_styles", __r); + } + public void Stop() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_stop(this); + if (__r != 0) throw new NcResultException("ncdirect_stop", __r); + } + public void Stream(RefString8 filename, delegate* unmanaged[Cdecl], Ptr, Ptr, int> streamer, Ptr vopts, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_stream(this, filename, streamer, vopts, currY); + if (__r != 0) throw new NcResultException("ncdirect_stream", __r); + } + public ushort Styles() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_styles(this); + public ushort SupportedStyles() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_supported_styles(this); + public void VlineInterp(Ptr egc, uint len, ulong h1, ulong h2) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_vline_interp(this, egc, len, h1, h2); + if (__r != 0) throw new NcResultException("ncdirect_vline_interp", __r); + } + } + public static unsafe partial class StringExtensions + { + public static void PrintfAligned(this NcDirectHandle self, int y, NcAlign align, string fmt) + { + using var fmtBuf = new ScratchBuffer(fmt, stackalloc byte[256]); + self.PrintfAligned(y, align, fmtBuf.Bytes); + } + public static int PutEgc(this NcDirectHandle self, ulong channels, string utf8, Ptr sBytes) + { + using var utf8Buf = new ScratchBuffer(utf8, stackalloc byte[256]); + return self.PutEgc(channels, utf8Buf.Bytes, sBytes); + } + public static int PutStr(this NcDirectHandle self, ulong channels, string utf8) + { + using var utf8Buf = new ScratchBuffer(utf8, stackalloc byte[256]); + return self.PutStr(channels, utf8Buf.Bytes); + } + public static string ReadLine(this NcDirectHandle self, string prompt) + { + using var promptBuf = new ScratchBuffer(prompt, stackalloc byte[256]); + return self.ReadLine(promptBuf.Bytes); + } + public static NcPlaneHandle RenderFrame(this NcDirectHandle self, string filename, NcBlitter blitter, NcScale scale, int2 max) + { + using var filenameBuf = new ScratchBuffer(filename, stackalloc byte[256]); + return self.RenderFrame(filenameBuf.Bytes, blitter, scale, max); + } + public static void RenderImage(this NcDirectHandle self, string filename, NcAlign align, NcBlitter blitter, NcScale scale) + { + using var filenameBuf = new ScratchBuffer(filename, stackalloc byte[256]); + self.RenderImage(filenameBuf.Bytes, align, blitter, scale); + } + public static void Stream(this NcDirectHandle self, string filename, delegate* unmanaged[Cdecl], Ptr, Ptr, int> streamer, Ptr vopts, Ptr currY) + { + using var filenameBuf = new ScratchBuffer(filename, stackalloc byte[256]); + self.Stream(filenameBuf.Bytes, streamer, vopts, currY); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcFadectxHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcFadectxHandle.gen.cs new file mode 100644 index 0000000..bdd420a --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcFadectxHandle.gen.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcFadectxHandle + { + } + public unsafe readonly partial struct NcFadectxHandle + { + public void Free() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfadectx_free(this); + public void Iterations() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfadectx_iterations(this); + if (__r != 0) throw new NcResultException("ncfadectx_iterations", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcFdPlaneHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcFdPlaneHandle.gen.cs new file mode 100644 index 0000000..f0b9c2b --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcFdPlaneHandle.gen.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcFdPlaneHandle + { + } + public unsafe readonly partial struct NcFdPlaneHandle + { + public void Destroy() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfdplane_destroy(this); + if (__r != 0) throw new NcResultException("ncfdplane_destroy", __r); + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfdplane_plane(this); + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcMenuHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcMenuHandle.gen.cs new file mode 100644 index 0000000..6876c71 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcMenuHandle.gen.cs @@ -0,0 +1,98 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcMenuHandle + { + } + public unsafe readonly partial struct NcMenuHandle + { + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_destroy(this); + public void ItemSetStatus(RefString8 section, RefString8 item, Bool8 enabled) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_item_set_status(this, section, item, enabled); + if (__r != 0) throw new NcResultException("ncmenu_item_set_status", __r); + } + public string MouseSelected(Ptr click, Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_mouse_selected(this, click, ni); + public string MouseSelected(out NcInput click, out NcInput ni) + { + click = default; + ni = default; + fixed (NcInput* clickPtr = &click) + { + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_mouse_selected(this, new Ptr(clickPtr), new Ptr(niPtr)); + } + } + } + public void NextItem() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_nextitem(this); + if (__r != 0) throw new NcResultException("ncmenu_nextitem", __r); + } + public void NextSection() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_nextsection(this); + if (__r != 0) throw new NcResultException("ncmenu_nextsection", __r); + } + public Bool8 OfferInput(Ptr nc) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_offer_input(this, nc); + public Bool8 OfferInput(out NcInput nc) + { + nc = default; + fixed (NcInput* ncPtr = &nc) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_offer_input(this, new Ptr(ncPtr)); + } + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_plane(this); + public void PrevItem() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_previtem(this); + if (__r != 0) throw new NcResultException("ncmenu_previtem", __r); + } + public void PrevSection() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_prevsection(this); + if (__r != 0) throw new NcResultException("ncmenu_prevsection", __r); + } + public void RollUp() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_rollup(this); + if (__r != 0) throw new NcResultException("ncmenu_rollup", __r); + } + public string Selected(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_selected(this, ni); + public string Selected(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_selected(this, new Ptr(niPtr)); + } + } + public void Unroll(int sectionIdx) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_unroll(this, sectionIdx); + if (__r != 0) throw new NcResultException("ncmenu_unroll", __r); + } + } + public static unsafe partial class StringExtensions + { + public static void ItemSetStatus(this NcMenuHandle self, string section, string item, Bool8 enabled) + { + using var sectionBuf = new ScratchBuffer(section, stackalloc byte[256]); + using var itemBuf = new ScratchBuffer(item, stackalloc byte[256]); + self.ItemSetStatus(sectionBuf.Bytes, itemBuf.Bytes, enabled); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcMultiSelectorHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcMultiSelectorHandle.gen.cs new file mode 100644 index 0000000..d1709df --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcMultiSelectorHandle.gen.cs @@ -0,0 +1,35 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcMultiSelectorHandle + { + } + public unsafe readonly partial struct NcMultiSelectorHandle + { + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_destroy(this); + public Bool8 OfferInput(Ptr nc) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_offer_input(this, nc); + public Bool8 OfferInput(out NcInput nc) + { + nc = default; + fixed (NcInput* ncPtr = &nc) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_offer_input(this, new Ptr(ncPtr)); + } + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_plane(this); + public void Selected(Ptr selected, uint count) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_selected(this, selected, count); + if (__r != 0) throw new NcResultException("ncmultiselector_selected", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcPlaneHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcPlaneHandle.gen.cs new file mode 100644 index 0000000..3c872be --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcPlaneHandle.gen.cs @@ -0,0 +1,953 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcPlaneHandle + { + } + public unsafe readonly partial struct NcPlaneHandle + { + public NcPlaneHandle Above() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_above(this); + public void AbsX() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_x(this); + if (__r != 0) throw new NcResultException("ncplane_abs_x", __r); + } + public void AbsY() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_y(this); + if (__r != 0) throw new NcResultException("ncplane_abs_y", __r); + } + public void AbsYx(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_yx(this, y, x); + public void Abs(out int2 xy) + { + int xyY = default; + int xyX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new int2(xyX, xyY); + } + public Ptr AsRgba(NcBlitter blit, int2 beg, uint2 len, Ptr pxDimY, Ptr pxDimX) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_as_rgba(this, blit, beg.Y, beg.X, len.Y, len.X, pxDimY, pxDimX); + public Ptr AsRgba(NcBlitter blit, int begY, int begX, uint lenY, uint lenX, out uint2 pxDim) + { + uint pxDimY = default; + uint pxDimX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_as_rgba(this, blit, begY, begX, lenY, lenX, new Ptr(&pxDimY), new Ptr(&pxDimX)); + pxDim = new uint2(pxDimX, pxDimY); + return __r; + } + public void AsciiBox(ushort styles, ulong channels, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_ascii_box(this, styles, channels, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_ascii_box", __r); + } + public string AtCursor(Ptr stylemask, Ptr channels) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_cursor(this, stylemask, channels); + public string AtCursor(out ushort stylemask, out ulong channels) + { + stylemask = default; + channels = default; + fixed (ushort* stylemaskPtr = &stylemask) + { + fixed (ulong* channelsPtr = &channels) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_cursor(this, new Ptr(stylemaskPtr), new Ptr(channelsPtr)); + } + } + } + public NcCell AtCursorCell() + { + NcCell c = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_cursor_cell(this, new Ptr(&c)); + if (__r != 0) throw new NcResultException("ncplane_at_cursor_cell", __r); + return c; + } + public string At(int2 xy, Ptr stylemask, Ptr channels) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_yx(this, xy.Y, xy.X, stylemask, channels); + public string AtYx(int y, int x, out ushort stylemask, out ulong channels) + { + stylemask = default; + channels = default; + fixed (ushort* stylemaskPtr = &stylemask) + { + fixed (ulong* channelsPtr = &channels) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_yx(this, y, x, new Ptr(stylemaskPtr), new Ptr(channelsPtr)); + } + } + } + public NcCell AtYxCell(int2 xy) + { + NcCell c = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_yx_cell(this, xy.Y, xy.X, new Ptr(&c)); + if (__r != 0) throw new NcResultException("ncplane_at_yx_cell", __r); + return c; + } + public Bool8 AutogrowP() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_autogrow_p(this); + public NcCell Base() + { + NcCell c = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_base(this, new Ptr(&c)); + if (__r != 0) throw new NcResultException("ncplane_base", __r); + return c; + } + public uint BChannel() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bchannel(this); + public NcPlaneHandle Below() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_below(this); + public uint BgAlpha() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_alpha(this); + public Bool8 BgDefaultP() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_default_p(this); + public uint BgRgb() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_rgb(this); + public uint BgRgb8(Ptr r, Ptr g, Ptr b) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_rgb8(this, r, g, b); + public uint BgRgb8(out uint r, out uint g, out uint b) + { + r = default; + g = default; + b = default; + fixed (uint* rPtr = &r) + { + fixed (uint* gPtr = &g) + { + fixed (uint* bPtr = &b) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_rgb8(this, new Ptr(rPtr), new Ptr(gPtr), new Ptr(bPtr)); + } + } + } + } + public void Box(Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hline, Ptr vline, uint2 stop, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_box(this, ul, ur, ll, lr, hline, vline, stop.Y, stop.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_box", __r); + } + public void BoxSized(Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hline, Ptr vline, uint2 stop, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_box_sized(this, ul, ur, ll, lr, hline, vline, stop.Y, stop.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_box_sized", __r); + } + public void CenterAbs(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_center_abs(this, y, x); + public void CenterAbs(out int2 xy) + { + int xyY = default; + int xyX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_center_abs(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new int2(xyX, xyY); + } + public ulong Channels() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_channels(this); + public string Contents(int2 beg, uint2 len) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_contents(this, beg.Y, beg.X, len.Y, len.X); + public NcPlaneHandle Create(Ptr nopts) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_create(this, nopts); + public NcPlaneHandle Create(out NcPlaneOptions nopts) + { + nopts = default; + fixed (NcPlaneOptions* noptsPtr = &nopts) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_create(this, new Ptr(noptsPtr)); + } + } + public void CursorMoveRel(int2 xy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_move_rel(this, xy.Y, xy.X); + if (__r != 0) throw new NcResultException("ncplane_cursor_move_rel", __r); + } + public void CursorMove(int2 xy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_move_yx(this, xy.Y, xy.X); + if (__r != 0) throw new NcResultException("ncplane_cursor_move_yx", __r); + } + public uint CursorX() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_x(this); + public uint CursorY() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_y(this); + public void CursorYx(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_yx(this, y, x); + public void Cursor(out uint2 xy) + { + uint xyY = default; + uint xyX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new uint2(xyX, xyY); + } + public void DescendantP(NcPlaneHandle ancestor) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_descendant_p(this, ancestor); + if (__r != 0) throw new NcResultException("ncplane_descendant_p", __r); + } + public void Destroy() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_destroy(this); + if (__r != 0) throw new NcResultException("ncplane_destroy", __r); + } + public uint DimX() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_x(this); + public uint DimY() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_y(this); + public void DimYx(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_yx(this, y, x); + public void Dim(out uint2 xy) + { + uint xyY = default; + uint xyX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new uint2(xyX, xyY); + } + public void DoubleBox(ushort styles, ulong channels, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_double_box(this, styles, channels, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_double_box", __r); + } + public void DoubleBoxSized(ushort styles, ulong channels, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_double_box_sized(this, styles, channels, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_double_box_sized", __r); + } + public NcPlaneHandle Dup(Ptr opaque) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dup(this, opaque); + public void Erase() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_erase(this); + public void EraseRegion(int2 start, int2 len) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_erase_region(this, start.Y, start.X, len.Y, len.X); + if (__r != 0) throw new NcResultException("ncplane_erase_region", __r); + } + public void FadeIn(Ptr ts, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadein(this, ts, fader, currY); + if (__r != 0) throw new NcResultException("ncplane_fadein", __r); + } + public void FadeInIteration(NcFadectxHandle nctX, int iter, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadein_iteration(this, nctX, iter, fader, currY); + if (__r != 0) throw new NcResultException("ncplane_fadein_iteration", __r); + } + public void FadeOut(Ptr ts, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadeout(this, ts, fader, currY); + if (__r != 0) throw new NcResultException("ncplane_fadeout", __r); + } + public void FadeOutIteration(NcFadectxHandle nctX, int iter, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadeout_iteration(this, nctX, iter, fader, currY); + if (__r != 0) throw new NcResultException("ncplane_fadeout_iteration", __r); + } + public void FamilyDestroy() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_family_destroy(this); + if (__r != 0) throw new NcResultException("ncplane_family_destroy", __r); + } + public uint FChannel() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fchannel(this); + public uint FgAlpha() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_alpha(this); + public Bool8 FgDefaultP() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_default_p(this); + public uint FgRgb() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_rgb(this); + public uint FgRgb8(Ptr r, Ptr g, Ptr b) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_rgb8(this, r, g, b); + public uint FgRgb8(out uint r, out uint g, out uint b) + { + r = default; + g = default; + b = default; + fixed (uint* rPtr = &r) + { + fixed (uint* gPtr = &g) + { + fixed (uint* bPtr = &b) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_rgb8(this, new Ptr(rPtr), new Ptr(gPtr), new Ptr(bPtr)); + } + } + } + } + public void Format(int2 xy, uint2 len, ushort stylemask) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_format(this, xy.Y, xy.X, len.Y, len.X, stylemask); + if (__r != 0) throw new NcResultException("ncplane_format", __r); + } + public void Gradient(int2 xy, uint2 len, RefString8 egc, ushort styles, ulong ul, ulong ur, ulong ll, ulong lr) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_gradient(this, xy.Y, xy.X, len.Y, len.X, egc, styles, ul, ur, ll, lr); + if (__r != 0) throw new NcResultException("ncplane_gradient", __r); + } + public void Gradient2x1(int2 xy, uint2 len, uint ul, uint ur, uint ll, uint lr) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_gradient2x1(this, xy.Y, xy.X, len.Y, len.X, ul, ur, ll, lr); + if (__r != 0) throw new NcResultException("ncplane_gradient2x1", __r); + } + public void Greyscale() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_greyscale(this); + public void HAlign(NcAlign align, int c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_halign(this, align, c); + if (__r != 0) throw new NcResultException("ncplane_halign", __r); + } + public void Hline(Ptr c, uint len) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_hline(this, c, len); + if (__r != 0) throw new NcResultException("ncplane_hline", __r); + } + public void HlineInterp(Ptr c, uint len, ulong c1, ulong c2) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_hline_interp(this, c, len, c1, c2); + if (__r != 0) throw new NcResultException("ncplane_hline_interp", __r); + } + public void Home() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_home(this); + public void MergeDown(NcPlaneHandle dst, int2 begSrc, uint2 len, int2 dstXy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_mergedown(this, dst, begSrc.Y, begSrc.X, len.Y, len.X, dstXy.Y, dstXy.X); + if (__r != 0) throw new NcResultException("ncplane_mergedown", __r); + } + public void MergeDownSimple(NcPlaneHandle dst) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_mergedown_simple(this, dst); + if (__r != 0) throw new NcResultException("ncplane_mergedown_simple", __r); + } + public void MoveAbove(NcPlaneHandle above) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_above(this, above); + if (__r != 0) throw new NcResultException("ncplane_move_above", __r); + } + public void MoveBelow(NcPlaneHandle below) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_below(this, below); + if (__r != 0) throw new NcResultException("ncplane_move_below", __r); + } + public void MoveBottom() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_bottom(this); + public void MoveFamilyAbove(NcPlaneHandle targ) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_above(this, targ); + if (__r != 0) throw new NcResultException("ncplane_move_family_above", __r); + } + public void MoveFamilyBelow(NcPlaneHandle targ) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_below(this, targ); + if (__r != 0) throw new NcResultException("ncplane_move_family_below", __r); + } + public void MoveFamilyBottom() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_bottom(this); + public void MoveFamilyTop() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_top(this); + public void MoveRel(int2 xy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_rel(this, xy.Y, xy.X); + if (__r != 0) throw new NcResultException("ncplane_move_rel", __r); + } + public void MoveTop() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_top(this); + public void Move(int2 xy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_yx(this, xy.Y, xy.X); + if (__r != 0) throw new NcResultException("ncplane_move_yx", __r); + } + public string Name() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_name(this); + public NotCursesHandle NotCurses() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_notcurses(this); + public NotCursesHandle NotCursesConst() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_notcurses_const(this); + public void OffStyles(uint styleBits) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_off_styles(this, styleBits); + public void OnStyles(uint styleBits) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_on_styles(this, styleBits); + public NcPlaneHandle Parent() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_parent(this); + public NcPlaneHandle ParentConst() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_parent_const(this); + public void Perimeter(Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hline, Ptr vline, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_perimeter(this, ul, ur, ll, lr, hline, vline, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_perimeter", __r); + } + public void PerimeterDouble(ushort stylemask, ulong channels, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_perimeter_double(this, stylemask, channels, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_perimeter_double", __r); + } + public void PerimeterRounded(ushort stylemask, ulong channels, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_perimeter_rounded(this, stylemask, channels, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_perimeter_rounded", __r); + } + public void PixelGeom(Ptr pxY, Ptr pxX, Ptr cellDimY, Ptr cellDimX, Ptr maxBmapY, Ptr maxBmapX) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pixel_geom(this, pxY, pxX, cellDimY, cellDimX, maxBmapY, maxBmapX); + public void PixelGeom(out uint2 px, out uint2 cellDim, out uint2 maxBmap) + { + uint pxY = default; + uint pxX = default; + uint cellDimY = default; + uint cellDimX = default; + uint maxBmapY = default; + uint maxBmapX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pixel_geom(this, new Ptr(&pxY), new Ptr(&pxX), new Ptr(&cellDimY), new Ptr(&cellDimX), new Ptr(&maxBmapY), new Ptr(&maxBmapX)); + px = new uint2(pxX, pxY); + cellDim = new uint2(cellDimX, cellDimY); + maxBmap = new uint2(maxBmapX, maxBmapY); + } + public NcCell Polyfill(int2 xy) + { + NcCell c = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_polyfill_yx(this, xy.Y, xy.X, new Ptr(&c)); + if (__r != 0) throw new NcResultException("ncplane_polyfill_yx", __r); + return c; + } + public void Printf(RefString8 format) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf(this, format); + if (__r != 0) throw new NcResultException("ncplane_printf", __r); + } + public void PrintfAligned(int y, NcAlign align, RefString8 format) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf_aligned(this, y, align, format); + if (__r != 0) throw new NcResultException("ncplane_printf_aligned", __r); + } + public void PrintfStained(RefString8 format) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf_stained(this, format); + if (__r != 0) throw new NcResultException("ncplane_printf_stained", __r); + } + public void Printf(int2 xy, RefString8 format) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf_yx(this, xy.Y, xy.X, format); + if (__r != 0) throw new NcResultException("ncplane_printf_yx", __r); + } + public void Pulse(Ptr ts, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pulse(this, ts, fader, currY); + if (__r != 0) throw new NcResultException("ncplane_pulse", __r); + } + public int Putc(Ptr c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc(this, c); + if (__r < 0) throw new NcResultException("ncplane_putc", __r); + return __r; + } + public int Putc(out NcCell c) + { + c = default; + fixed (NcCell* cPtr = &c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc(this, new Ptr(cPtr)); + if (__r < 0) throw new NcResultException("ncplane_putc", __r); + return __r; + } + } + public int Putc(int2 xy, Ptr c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc_yx(this, xy.Y, xy.X, c); + if (__r < 0) throw new NcResultException("ncplane_putc_yx", __r); + return __r; + } + public int PutcYx(int y, int x, out NcCell c) + { + c = default; + fixed (NcCell* cPtr = &c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc_yx(this, y, x, new Ptr(cPtr)); + if (__r < 0) throw new NcResultException("ncplane_putc_yx", __r); + return __r; + } + } + public int PutChar(byte c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putchar(this, c); + if (__r < 0) throw new NcResultException("ncplane_putchar", __r); + return __r; + } + public int PutCharStained(byte c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putchar_stained(this, c); + if (__r < 0) throw new NcResultException("ncplane_putchar_stained", __r); + return __r; + } + public int PutChar(int2 xy, byte c) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putchar_yx(this, xy.Y, xy.X, c); + if (__r < 0) throw new NcResultException("ncplane_putchar_yx", __r); + return __r; + } + public int PutEgc(RefString8 gclust, Ptr sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc(this, gclust, sBytes); + if (__r < 0) throw new NcResultException("ncplane_putegc", __r); + return __r; + } + public int PutEgc(RefString8 gclust, out ByteSize64 sBytes) + { + sBytes = default; + fixed (ByteSize64* sBytesPtr = &sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc(this, gclust, new Ptr(sBytesPtr)); + if (__r < 0) throw new NcResultException("ncplane_putegc", __r); + return __r; + } + } + public int PutEgcStained(RefString8 gclust, Ptr sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_stained(this, gclust, sBytes); + if (__r < 0) throw new NcResultException("ncplane_putegc_stained", __r); + return __r; + } + public int PutEgcStained(RefString8 gclust, out ByteSize64 sBytes) + { + sBytes = default; + fixed (ByteSize64* sBytesPtr = &sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_stained(this, gclust, new Ptr(sBytesPtr)); + if (__r < 0) throw new NcResultException("ncplane_putegc_stained", __r); + return __r; + } + } + public int PutEgc(int2 xy, RefString8 gclust, Ptr sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_yx(this, xy.Y, xy.X, gclust, sBytes); + if (__r < 0) throw new NcResultException("ncplane_putegc_yx", __r); + return __r; + } + public int PutEgcYx(int y, int x, RefString8 gclust, out ByteSize64 sBytes) + { + sBytes = default; + fixed (ByteSize64* sBytesPtr = &sBytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_yx(this, y, x, gclust, new Ptr(sBytesPtr)); + if (__r < 0) throw new NcResultException("ncplane_putegc_yx", __r); + return __r; + } + } + public int PutNStr(ByteSize64 s, RefString8 gclustarr) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putnstr(this, s, gclustarr); + if (__r < 0) throw new NcResultException("ncplane_putnstr", __r); + return __r; + } + public int PutNStrAligned(int y, NcAlign align, ByteSize64 s, RefString8 str) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putnstr_aligned(this, y, align, s, str); + if (__r < 0) throw new NcResultException("ncplane_putnstr_aligned", __r); + return __r; + } + public int PutNStr(int2 xy, ByteSize64 s, RefString8 gclusters) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putnstr_yx(this, xy.Y, xy.X, s, gclusters); + if (__r < 0) throw new NcResultException("ncplane_putnstr_yx", __r); + return __r; + } + public int PutStr(RefString8 gclustarr) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr(this, gclustarr); + if (__r < 0) throw new NcResultException("ncplane_putstr", __r); + return __r; + } + public int PutStrAligned(int y, NcAlign align, RefString8 s) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr_aligned(this, y, align, s); + if (__r < 0) throw new NcResultException("ncplane_putstr_aligned", __r); + return __r; + } + public int PutStrStained(RefString8 gclusters) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr_stained(this, gclusters); + if (__r < 0) throw new NcResultException("ncplane_putstr_stained", __r); + return __r; + } + public int PutStr(int2 xy, RefString8 gclusters) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr_yx(this, xy.Y, xy.X, gclusters); + if (__r < 0) throw new NcResultException("ncplane_putstr_yx", __r); + return __r; + } + public int PutText(int y, NcAlign align, RefString8 text, Ptr bytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_puttext(this, y, align, text, bytes); + if (__r < 0) throw new NcResultException("ncplane_puttext", __r); + return __r; + } + public int PutText(int y, NcAlign align, RefString8 text, out ByteSize64 bytes) + { + bytes = default; + fixed (ByteSize64* bytesPtr = &bytes) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_puttext(this, y, align, text, new Ptr(bytesPtr)); + if (__r < 0) throw new NcResultException("ncplane_puttext", __r); + return __r; + } + } + public int PutUtf32(int2 xy, uint u) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pututf32_yx(this, xy.Y, xy.X, u); + if (__r < 0) throw new NcResultException("ncplane_pututf32_yx", __r); + return __r; + } + public void QrCode(Ptr yMaX, Ptr xMaX, Ptr data, ByteSize64 len) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_qrcode(this, yMaX, xMaX, data, len); + if (__r != 0) throw new NcResultException("ncplane_qrcode", __r); + } + public NcPlaneHandle Reparent(NcPlaneHandle newparent) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_reparent(this, newparent); + public NcPlaneHandle ReparentFamily(NcPlaneHandle newparent) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_reparent_family(this, newparent); + public void Resize(int2 keep, uint2 keepLen, int2 off, uint2 len) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize(this, keep.Y, keep.X, keepLen.Y, keepLen.X, off.Y, off.X, len.Y, len.X); + if (__r != 0) throw new NcResultException("ncplane_resize", __r); + } + public void ResizeMarginalized() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_marginalized(this); + if (__r != 0) throw new NcResultException("ncplane_resize_marginalized", __r); + } + public void ResizeMaximize() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_maximize(this); + if (__r != 0) throw new NcResultException("ncplane_resize_maximize", __r); + } + public void ResizePlacewithin() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_placewithin(this); + if (__r != 0) throw new NcResultException("ncplane_resize_placewithin", __r); + } + public void ResizeRealign() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_realign(this); + if (__r != 0) throw new NcResultException("ncplane_resize_realign", __r); + } + public void ResizeSimple(uint2 len) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_simple(this, len.Y, len.X); + if (__r != 0) throw new NcResultException("ncplane_resize_simple", __r); + } + public delegate* unmanaged[Cdecl] ResizeCb(NcPlaneHandle n) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resizecb(this, n); + public void RotateCcw() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rotate_ccw(this); + if (__r != 0) throw new NcResultException("ncplane_rotate_ccw", __r); + } + public void RotateCw() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rotate_cw(this); + if (__r != 0) throw new NcResultException("ncplane_rotate_cw", __r); + } + public void RoundedBox(ushort styles, ulong channels, uint2 stop, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rounded_box(this, styles, channels, stop.Y, stop.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_rounded_box", __r); + } + public void RoundedBoxSized(ushort styles, ulong channels, uint2 len, uint ctlWord) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rounded_box_sized(this, styles, channels, len.Y, len.X, ctlWord); + if (__r != 0) throw new NcResultException("ncplane_rounded_box_sized", __r); + } + public Bool8 ScrollingP() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_scrolling_p(this); + public void ScrollUp(int r) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_scrollup(this, r); + if (__r != 0) throw new NcResultException("ncplane_scrollup", __r); + } + public void ScrollUpChild(NcPlaneHandle child) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_scrollup_child(this, child); + if (__r != 0) throw new NcResultException("ncplane_scrollup_child", __r); + } + public Bool8 SetAutogrow(uint growP) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_autogrow(this, growP); + public void SetBase(RefString8 egc, ushort stylemask, ulong channels) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_base(this, egc, stylemask, channels); + if (__r != 0) throw new NcResultException("ncplane_set_base", __r); + } + public NcCell SetBaseCell() + { + NcCell c = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_base_cell(this, new Ptr(&c)); + if (__r != 0) throw new NcResultException("ncplane_set_base_cell", __r); + return c; + } + public ulong SetBChannel(uint channel) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bchannel(this, channel); + public void SetBgAlpha(int alpha) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_alpha(this, alpha); + if (__r != 0) throw new NcResultException("ncplane_set_bg_alpha", __r); + } + public void SetBgDefault() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_default(this); + public void SetBgPalindex(uint idx) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_palindex(this, idx); + if (__r != 0) throw new NcResultException("ncplane_set_bg_palindex", __r); + } + public void SetBgRgb(uint channel) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_rgb(this, channel); + if (__r != 0) throw new NcResultException("ncplane_set_bg_rgb", __r); + } + public void SetBgRgb8(uint r, uint g, uint b) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_rgb8(this, r, g, b); + if (__r != 0) throw new NcResultException("ncplane_set_bg_rgb8", __r); + } + public void SetBgRgb8Clipped(int r, int g, int b) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_rgb8_clipped(this, r, g, b); + public void SetChannels(ulong channels) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_channels(this, channels); + public ulong SetFChannel(uint channel) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fchannel(this, channel); + public void SetFgAlpha(int alpha) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_alpha(this, alpha); + if (__r != 0) throw new NcResultException("ncplane_set_fg_alpha", __r); + } + public void SetFgDefault() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_default(this); + public void SetFgPalindex(uint idx) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_palindex(this, idx); + if (__r != 0) throw new NcResultException("ncplane_set_fg_palindex", __r); + } + public void SetFgRgb(uint channel) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_rgb(this, channel); + if (__r != 0) throw new NcResultException("ncplane_set_fg_rgb", __r); + } + public void SetFgRgb8(uint r, uint g, uint b) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_rgb8(this, r, g, b); + if (__r != 0) throw new NcResultException("ncplane_set_fg_rgb8", __r); + } + public void SetFgRgb8Clipped(int r, int g, int b) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_rgb8_clipped(this, r, g, b); + public void SetName(RefString8 name) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_name(this, name); + if (__r != 0) throw new NcResultException("ncplane_set_name", __r); + } + public void SetResizeCb(delegate* unmanaged[Cdecl] resizeCb) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_resizecb(this, resizeCb); + public Bool8 SetScrolling(uint scrollP) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_scrolling(this, scrollP); + public void SetStyles(uint styleBits) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_styles(this, styleBits); + public Ptr SetUserPtr(Ptr opaque) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_userptr(this, opaque); + public void Stain(int2 xy, uint2 len, ulong ul, ulong ur, ulong ll, ulong lr) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_stain(this, xy.Y, xy.X, len.Y, len.X, ul, ur, ll, lr); + if (__r != 0) throw new NcResultException("ncplane_stain", __r); + } + public ushort Styles() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_styles(this); + public void Translate(NcPlaneHandle dst, Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate(this, dst, y, x); + public void Translate(NcPlaneHandle dst, out int2 xy) + { + int xyY = default; + int xyX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate(this, dst, new Ptr(&xyY), new Ptr(&xyX)); + xy = new int2(xyX, xyY); + } + public Bool8 TranslateAbs(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate_abs(this, y, x); + public Bool8 TranslateAbs(out int2 xy) + { + int xyY = default; + int xyX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate_abs(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new int2(xyX, xyY); + return __r; + } + public Ptr UserPtr() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_userptr(this); + public void VAlign(NcAlign align, int r) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_valign(this, align, r); + if (__r != 0) throw new NcResultException("ncplane_valign", __r); + } + public void Vline(Ptr c, uint len) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vline(this, c, len); + if (__r != 0) throw new NcResultException("ncplane_vline", __r); + } + public void VlineInterp(Ptr c, uint len, ulong c1, ulong c2) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vline_interp(this, c, len, c1, c2); + if (__r != 0) throw new NcResultException("ncplane_vline_interp", __r); + } + public void VPrintf(RefString8 format, RefString8 ap) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf(this, format, ap); + if (__r != 0) throw new NcResultException("ncplane_vprintf", __r); + } + public void VPrintfAligned(int y, NcAlign align, RefString8 format, RefString8 ap) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf_aligned(this, y, align, format, ap); + if (__r != 0) throw new NcResultException("ncplane_vprintf_aligned", __r); + } + public void VPrintfStained(RefString8 format, RefString8 ap) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf_stained(this, format, ap); + if (__r != 0) throw new NcResultException("ncplane_vprintf_stained", __r); + } + public void VPrintf(int2 xy, RefString8 format, RefString8 ap) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf_yx(this, xy.Y, xy.X, format, ap); + if (__r != 0) throw new NcResultException("ncplane_vprintf_yx", __r); + } + public void X() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_x(this); + if (__r != 0) throw new NcResultException("ncplane_x", __r); + } + public void Y() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_y(this); + if (__r != 0) throw new NcResultException("ncplane_y", __r); + } + public void Yx(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_yx(this, y, x); + public void Yx(out int2 xy) + { + int xyY = default; + int xyX = default; + global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new int2(xyX, xyY); + } + } + public static unsafe partial class StringExtensions + { + public static void Gradient(this NcPlaneHandle self, int2 xy, uint2 len, string egc, ushort styles, ulong ul, ulong ur, ulong ll, ulong lr) + { + using var egcBuf = new ScratchBuffer(egc, stackalloc byte[256]); + self.Gradient(xy, len, egcBuf.Bytes, styles, ul, ur, ll, lr); + } + public static void Printf(this NcPlaneHandle self, string format) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + self.Printf(formatBuf.Bytes); + } + public static void PrintfAligned(this NcPlaneHandle self, int y, NcAlign align, string format) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + self.PrintfAligned(y, align, formatBuf.Bytes); + } + public static void PrintfStained(this NcPlaneHandle self, string format) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + self.PrintfStained(formatBuf.Bytes); + } + public static void Printf(this NcPlaneHandle self, int2 xy, string format) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + self.Printf(xy, formatBuf.Bytes); + } + public static int PutEgc(this NcPlaneHandle self, string gclust, Ptr sBytes) + { + using var gclustBuf = new ScratchBuffer(gclust, stackalloc byte[256]); + return self.PutEgc(gclustBuf.Bytes, sBytes); + } + public static int PutEgcStained(this NcPlaneHandle self, string gclust, Ptr sBytes) + { + using var gclustBuf = new ScratchBuffer(gclust, stackalloc byte[256]); + return self.PutEgcStained(gclustBuf.Bytes, sBytes); + } + public static int PutEgc(this NcPlaneHandle self, int2 xy, string gclust, Ptr sBytes) + { + using var gclustBuf = new ScratchBuffer(gclust, stackalloc byte[256]); + return self.PutEgc(xy, gclustBuf.Bytes, sBytes); + } + public static int PutNStr(this NcPlaneHandle self, ByteSize64 s, string gclustarr) + { + using var gclustarrBuf = new ScratchBuffer(gclustarr, stackalloc byte[256]); + return self.PutNStr(s, gclustarrBuf.Bytes); + } + public static int PutNStrAligned(this NcPlaneHandle self, int y, NcAlign align, ByteSize64 s, string str) + { + using var strBuf = new ScratchBuffer(str, stackalloc byte[256]); + return self.PutNStrAligned(y, align, s, strBuf.Bytes); + } + public static int PutNStr(this NcPlaneHandle self, int2 xy, ByteSize64 s, string gclusters) + { + using var gclustersBuf = new ScratchBuffer(gclusters, stackalloc byte[256]); + return self.PutNStr(xy, s, gclustersBuf.Bytes); + } + public static int PutStr(this NcPlaneHandle self, string gclustarr) + { + using var gclustarrBuf = new ScratchBuffer(gclustarr, stackalloc byte[256]); + return self.PutStr(gclustarrBuf.Bytes); + } + public static int PutStrAligned(this NcPlaneHandle self, int y, NcAlign align, string s) + { + using var sBuf = new ScratchBuffer(s, stackalloc byte[256]); + return self.PutStrAligned(y, align, sBuf.Bytes); + } + public static int PutStrStained(this NcPlaneHandle self, string gclusters) + { + using var gclustersBuf = new ScratchBuffer(gclusters, stackalloc byte[256]); + return self.PutStrStained(gclustersBuf.Bytes); + } + public static int PutStr(this NcPlaneHandle self, int2 xy, string gclusters) + { + using var gclustersBuf = new ScratchBuffer(gclusters, stackalloc byte[256]); + return self.PutStr(xy, gclustersBuf.Bytes); + } + public static int PutText(this NcPlaneHandle self, int y, NcAlign align, string text, Ptr bytes) + { + using var textBuf = new ScratchBuffer(text, stackalloc byte[256]); + return self.PutText(y, align, textBuf.Bytes, bytes); + } + public static void SetBase(this NcPlaneHandle self, string egc, ushort stylemask, ulong channels) + { + using var egcBuf = new ScratchBuffer(egc, stackalloc byte[256]); + self.SetBase(egcBuf.Bytes, stylemask, channels); + } + public static void SetName(this NcPlaneHandle self, string name) + { + using var nameBuf = new ScratchBuffer(name, stackalloc byte[256]); + self.SetName(nameBuf.Bytes); + } + public static void VPrintf(this NcPlaneHandle self, string format, string ap) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]); + self.VPrintf(formatBuf.Bytes, apBuf.Bytes); + } + public static void VPrintfAligned(this NcPlaneHandle self, int y, NcAlign align, string format, string ap) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]); + self.VPrintfAligned(y, align, formatBuf.Bytes, apBuf.Bytes); + } + public static void VPrintfStained(this NcPlaneHandle self, string format, string ap) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]); + self.VPrintfStained(formatBuf.Bytes, apBuf.Bytes); + } + public static void VPrintf(this NcPlaneHandle self, int2 xy, string format, string ap) + { + using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]); + using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]); + self.VPrintf(xy, formatBuf.Bytes, apBuf.Bytes); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcProgBarHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcProgBarHandle.gen.cs new file mode 100644 index 0000000..6f622bf --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcProgBarHandle.gen.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcProgBarHandle + { + } + public unsafe readonly partial struct NcProgBarHandle + { + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_destroy(this); + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_plane(this); + public double Progress() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_progress(this); + public void SetProgress(double p) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_set_progress(this, p); + if (__r != 0) throw new NcResultException("ncprogbar_set_progress", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcReaderHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcReaderHandle.gen.cs new file mode 100644 index 0000000..044c4e4 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcReaderHandle.gen.cs @@ -0,0 +1,70 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcReaderHandle + { + } + public unsafe readonly partial struct NcReaderHandle + { + public void Clear() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_clear(this); + if (__r != 0) throw new NcResultException("ncreader_clear", __r); + } + public string Contents() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_contents(this); + public void Destroy(Ptr> contents) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_destroy(this, contents); + public void MoveDown() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_down(this); + if (__r != 0) throw new NcResultException("ncreader_move_down", __r); + } + public void MoveLeft() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_left(this); + if (__r != 0) throw new NcResultException("ncreader_move_left", __r); + } + public void MoveRight() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_right(this); + if (__r != 0) throw new NcResultException("ncreader_move_right", __r); + } + public void MoveUp() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_up(this); + if (__r != 0) throw new NcResultException("ncreader_move_up", __r); + } + public Bool8 OfferInput(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_offer_input(this, ni); + public Bool8 OfferInput(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_offer_input(this, new Ptr(niPtr)); + } + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_plane(this); + public void WriteEgc(RefString8 egc) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_write_egc(this, egc); + if (__r != 0) throw new NcResultException("ncreader_write_egc", __r); + } + } + public static unsafe partial class StringExtensions + { + public static void WriteEgc(this NcReaderHandle self, string egc) + { + using var egcBuf = new ScratchBuffer(egc, stackalloc byte[256]); + self.WriteEgc(egcBuf.Bytes); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcReelHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcReelHandle.gen.cs new file mode 100644 index 0000000..60b6840 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcReelHandle.gen.cs @@ -0,0 +1,53 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcReelHandle + { + } + public unsafe readonly partial struct NcReelHandle + { + public NcTabletHandle Add(NcTabletHandle after, NcTabletHandle before, delegate* unmanaged[Cdecl] cb, Ptr opaque) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_add(this, after, before, cb, opaque); + public void Del(NcTabletHandle t) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_del(this, t); + if (__r != 0) throw new NcResultException("ncreel_del", __r); + } + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_destroy(this); + public NcTabletHandle Focused() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_focused(this); + public NcTabletHandle Next() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_next(this); + public Bool8 OfferInput(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_offer_input(this, ni); + public Bool8 OfferInput(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_offer_input(this, new Ptr(niPtr)); + } + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_plane(this); + public NcTabletHandle Prev() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_prev(this); + public void Redraw() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_redraw(this); + if (__r != 0) throw new NcResultException("ncreel_redraw", __r); + } + public void TabletCount() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_tabletcount(this); + if (__r != 0) throw new NcResultException("ncreel_tabletcount", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcSelectorHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcSelectorHandle.gen.cs new file mode 100644 index 0000000..b7fb0a8 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcSelectorHandle.gen.cs @@ -0,0 +1,56 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcSelectorHandle + { + } + public unsafe readonly partial struct NcSelectorHandle + { + public NcSelectorItem AddItem() + { + NcSelectorItem item = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_additem(this, new Ptr(&item)); + if (__r != 0) throw new NcResultException("ncselector_additem", __r); + return item; + } + public void DelItem(RefString8 item) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_delitem(this, item); + if (__r != 0) throw new NcResultException("ncselector_delitem", __r); + } + public void Destroy(Ptr> item) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_destroy(this, item); + public string NextItem() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_nextitem(this); + public Bool8 OfferInput(Ptr nc) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_offer_input(this, nc); + public Bool8 OfferInput(out NcInput nc) + { + nc = default; + fixed (NcInput* ncPtr = &nc) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_offer_input(this, new Ptr(ncPtr)); + } + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_plane(this); + public string PrevItem() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_previtem(this); + public string Selected() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_selected(this); + } + public static unsafe partial class StringExtensions + { + public static void DelItem(this NcSelectorHandle self, string item) + { + using var itemBuf = new ScratchBuffer(item, stackalloc byte[256]); + self.DelItem(itemBuf.Bytes); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcSubProcHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcSubProcHandle.gen.cs new file mode 100644 index 0000000..2d46a60 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcSubProcHandle.gen.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcSubProcHandle + { + } + public unsafe readonly partial struct NcSubProcHandle + { + public void Destroy() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncsubproc_destroy(this); + if (__r != 0) throw new NcResultException("ncsubproc_destroy", __r); + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncsubproc_plane(this); + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcTabHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcTabHandle.gen.cs new file mode 100644 index 0000000..4021f79 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcTabHandle.gen.cs @@ -0,0 +1,48 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcTabHandle + { + } + public unsafe readonly partial struct NcTabHandle + { + public delegate* unmanaged[Cdecl] Cb() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_cb(this); + public string Name() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_name(this); + public void NameWidth() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_name_width(this); + if (__r != 0) throw new NcResultException("nctab_name_width", __r); + } + public NcTabHandle Next() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_next(this); + public NcTabHandle Prev() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_prev(this); + public delegate* unmanaged[Cdecl] SetCb(delegate* unmanaged[Cdecl] newcb) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_set_cb(this, newcb); + public void SetName(RefString8 newname) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_set_name(this, newname); + if (__r != 0) throw new NcResultException("nctab_set_name", __r); + } + public Ptr SetUserPtr(Ptr newopaque) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_set_userptr(this, newopaque); + public Ptr UserPtr() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_userptr(this); + } + public static unsafe partial class StringExtensions + { + public static void SetName(this NcTabHandle self, string newname) + { + using var newnameBuf = new ScratchBuffer(newname, stackalloc byte[256]); + self.SetName(newnameBuf.Bytes); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcTabbedHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcTabbedHandle.gen.cs new file mode 100644 index 0000000..ebbca5d --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcTabbedHandle.gen.cs @@ -0,0 +1,105 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcTabbedHandle + { + } + public unsafe readonly partial struct NcTabbedHandle + { + public NcTabHandle Add(NcTabHandle after, NcTabHandle before, delegate* unmanaged[Cdecl] tcb, RefString8 name, Ptr opaque) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_add(this, after, before, tcb, name, opaque); + public void Channels(Ptr hdrChan, Ptr selChan, Ptr sepChan) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_channels(this, hdrChan, selChan, sepChan); + public void Channels(out ulong hdrChan, out ulong selChan, out ulong sepChan) + { + hdrChan = default; + selChan = default; + sepChan = default; + fixed (ulong* hdrChanPtr = &hdrChan) + { + fixed (ulong* selChanPtr = &selChan) + { + fixed (ulong* sepChanPtr = &sepChan) + { + global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_channels(this, new Ptr(hdrChanPtr), new Ptr(selChanPtr), new Ptr(sepChanPtr)); + } + } + } + } + public NcPlaneHandle ContentPlane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_content_plane(this); + public void Del(NcTabHandle t) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_del(this, t); + if (__r != 0) throw new NcResultException("nctabbed_del", __r); + } + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_destroy(this); + public void EnsureSelectedHeaderVisible() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_ensure_selected_header_visible(this); + public ulong HdrChan() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_hdrchan(this); + public NcTabHandle Leftmost() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_leftmost(this); + public NcTabHandle Next() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_next(this); + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_plane(this); + public NcTabHandle Prev() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_prev(this); + public void Redraw() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_redraw(this); + public void Rotate(int amt) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_rotate(this, amt); + public ulong SelChan() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_selchan(this); + public NcTabHandle Select(NcTabHandle t) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_select(this, t); + public NcTabHandle Selected() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_selected(this); + public string Separator() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_separator(this); + public void SeparatorWidth() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_separator_width(this); + if (__r != 0) throw new NcResultException("nctabbed_separator_width", __r); + } + public ulong SepChan() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_sepchan(this); + public void SetHdrChan(ulong chan) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_hdrchan(this, chan); + public void SetSelChan(ulong chan) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_selchan(this, chan); + public void SetSeparator(RefString8 separator) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_separator(this, separator); + if (__r != 0) throw new NcResultException("nctabbed_set_separator", __r); + } + public void SetSepChan(ulong chan) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_sepchan(this, chan); + public void TabCount() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_tabcount(this); + if (__r != 0) throw new NcResultException("nctabbed_tabcount", __r); + } + } + public static unsafe partial class StringExtensions + { + public static NcTabHandle Add(this NcTabbedHandle self, NcTabHandle after, NcTabHandle before, delegate* unmanaged[Cdecl] tcb, string name, Ptr opaque) + { + using var nameBuf = new ScratchBuffer(name, stackalloc byte[256]); + return self.Add(after, before, tcb, nameBuf.Bytes, opaque); + } + public static void SetSeparator(this NcTabbedHandle self, string separator) + { + using var separatorBuf = new ScratchBuffer(separator, stackalloc byte[256]); + self.SetSeparator(separatorBuf.Bytes); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcTabletHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcTabletHandle.gen.cs new file mode 100644 index 0000000..ecedc50 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcTabletHandle.gen.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcTabletHandle + { + } + public unsafe readonly partial struct NcTabletHandle + { + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctablet_plane(this); + public Ptr UserPtr() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctablet_userptr(this); + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcTreeHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcTreeHandle.gen.cs new file mode 100644 index 0000000..eebb88c --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcTreeHandle.gen.cs @@ -0,0 +1,80 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcTreeHandle + { + } + public unsafe readonly partial struct NcTreeHandle + { + public void Add(Ptr spec, Ptr add) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_add(this, spec, add); + if (__r != 0) throw new NcResultException("nctree_add", __r); + } + public void Add(out uint spec, out NcTreeItem add) + { + spec = default; + add = default; + fixed (uint* specPtr = &spec) + { + fixed (NcTreeItem* addPtr = &add) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_add(this, new Ptr(specPtr), new Ptr(addPtr)); + if (__r != 0) throw new NcResultException("nctree_add", __r); + } + } + } + public uint Del() + { + uint spec = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_del(this, new Ptr(&spec)); + if (__r != 0) throw new NcResultException("nctree_del", __r); + return spec; + } + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_destroy(this); + public Ptr Focused() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_focused(this); + public Ptr Goto(Ptr spec, Ptr failSpec) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_goto(this, spec, failSpec); + public Ptr Goto(out uint spec, out int failSpec) + { + spec = default; + failSpec = default; + fixed (uint* specPtr = &spec) + { + fixed (int* failSpecPtr = &failSpec) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_goto(this, new Ptr(specPtr), new Ptr(failSpecPtr)); + } + } + } + public Ptr Next() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_next(this); + public Bool8 OfferInput(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_offer_input(this, ni); + public Bool8 OfferInput(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_offer_input(this, new Ptr(niPtr)); + } + } + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_plane(this); + public Ptr Prev() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_prev(this); + public void Redraw() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_redraw(this); + if (__r != 0) throw new NcResultException("nctree_redraw", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcUPlotHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcUPlotHandle.gen.cs new file mode 100644 index 0000000..aeccbfc --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcUPlotHandle.gen.cs @@ -0,0 +1,37 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcUPlotHandle + { + } + public unsafe readonly partial struct NcUPlotHandle + { + public void AddSample(ulong x, ulong y) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_add_sample(this, x, y); + if (__r != 0) throw new NcResultException("ncuplot_add_sample", __r); + } + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_destroy(this); + public NcPlaneHandle Plane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_plane(this); + public ulong Sample(ulong x) + { + ulong y = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_sample(this, x, new Ptr(&y)); + if (__r != 0) throw new NcResultException("ncuplot_sample", __r); + return y; + } + public void SetSample(ulong x, ulong y) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_set_sample(this, x, y); + if (__r != 0) throw new NcResultException("ncuplot_set_sample", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NcVisualHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NcVisualHandle.gen.cs new file mode 100644 index 0000000..fa94737 --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NcVisualHandle.gen.cs @@ -0,0 +1,67 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NcVisualHandle + { + } + public unsafe readonly partial struct NcVisualHandle + { + public void Free() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirectf_free(this); + public uint At(uint2 xy) + { + uint pixel = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_at_yx(this, xy.Y, xy.X, new Ptr(&pixel)); + if (__r != 0) throw new NcResultException("ncvisual_at_yx", __r); + return pixel; + } + public void Decode() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_decode(this); + if (__r != 0) throw new NcResultException("ncvisual_decode", __r); + } + public void DecodeLoop() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_decode_loop(this); + if (__r != 0) throw new NcResultException("ncvisual_decode_loop", __r); + } + public void Destroy() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_destroy(this); + public void Polyfill(uint2 xy, uint rgba) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_polyfill_yx(this, xy.Y, xy.X, rgba); + if (__r != 0) throw new NcResultException("ncvisual_polyfill_yx", __r); + } + public void Resize(int rows, int cols) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_resize(this, rows, cols); + if (__r != 0) throw new NcResultException("ncvisual_resize", __r); + } + public void ResizeNoninterpolative(int rows, int cols) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_resize_noninterpolative(this, rows, cols); + if (__r != 0) throw new NcResultException("ncvisual_resize_noninterpolative", __r); + } + public void Rotate(double rads) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_rotate(this, rads); + if (__r != 0) throw new NcResultException("ncvisual_rotate", __r); + } + public void Set(uint2 xy, uint pixel) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_set_yx(this, xy.Y, xy.X, pixel); + if (__r != 0) throw new NcResultException("ncvisual_set_yx", __r); + } + public void SimpleStreamer(Ptr vopts, Ptr tspec, Ptr currY) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_simple_streamer(this, vopts, tspec, currY); + if (__r != 0) throw new NcResultException("ncvisual_simple_streamer", __r); + } + } +} diff --git a/Brutal.NotCurses/Generated/Handles/NotCursesHandle.gen.cs b/Brutal.NotCurses/Generated/Handles/NotCursesHandle.gen.cs new file mode 100644 index 0000000..0eea2ad --- /dev/null +++ b/Brutal.NotCurses/Generated/Handles/NotCursesHandle.gen.cs @@ -0,0 +1,266 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Numerics; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + [InteropHandle] + public unsafe readonly partial struct NotCursesHandle + { + } + public unsafe readonly partial struct NotCursesHandle + { + public string At(uint2 off, Ptr stylemask, Ptr channels) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_at_yx(this, off.Y, off.X, stylemask, channels); + public string AtYx(uint yOff, uint xOff, out ushort stylemask, out ulong channels) + { + stylemask = default; + channels = default; + fixed (ushort* stylemaskPtr = &stylemask) + { + fixed (ulong* channelsPtr = &channels) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_at_yx(this, yOff, xOff, new Ptr(stylemaskPtr), new Ptr(channelsPtr)); + } + } + } + public NcPlaneHandle Bottom() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_bottom(this); + public Bool8 CanBraille() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canbraille(this); + public Bool8 CanChangeColor() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canchangecolor(this); + public Bool8 CanFade() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canfade(this); + public Bool8 CanHalfBlock() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canhalfblock(this); + public Bool8 CanOctant() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canoctant(this); + public Bool8 CanOpenImages() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canopen_images(this); + public Bool8 CanOpenVideos() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canopen_videos(this); + public Bool8 CanPixel() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canpixel(this); + public Bool8 CanQuadrant() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canquadrant(this); + public Bool8 CanSextant() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cansextant(this); + public Bool8 CanTrueColor() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cantruecolor(this); + public Bool8 CanUtf8() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canutf8(this); + public Ptr Capabilities() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_capabilities(this); + public NcPixelImpl CheckPixelSupport() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_check_pixel_support(this); + public void CursorDisable() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_disable(this); + if (__r != 0) throw new NcResultException("notcurses_cursor_disable", __r); + } + public void CursorEnable(int2 xy) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_enable(this, xy.Y, xy.X); + if (__r != 0) throw new NcResultException("notcurses_cursor_enable", __r); + } + public void CursorYx(Ptr y, Ptr x) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_yx(this, y, x); + if (__r != 0) throw new NcResultException("notcurses_cursor_yx", __r); + } + public void Cursor(out int2 xy) + { + int xyY = default; + int xyX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + if (__r != 0) throw new NcResultException("notcurses_cursor_yx", __r); + xy = new int2(xyX, xyY); + } + public void Debug(Ptr debugfp) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_debug(this, debugfp); + public uint DefaultBackground() + { + uint bg = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_default_background(this, new Ptr(&bg)); + if (__r != 0) throw new NcResultException("notcurses_default_background", __r); + return bg; + } + public uint DefaultForeground() + { + uint fg = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_default_foreground(this, new Ptr(&fg)); + if (__r != 0) throw new NcResultException("notcurses_default_foreground", __r); + return fg; + } + public string DetectedTerminal() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_detected_terminal(this); + public void DropPlanes() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_drop_planes(this); + public void EnterAlternateScreen() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_enter_alternate_screen(this); + if (__r != 0) throw new NcResultException("notcurses_enter_alternate_screen", __r); + } + public uint Get(Ptr ts, Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get(this, ts, ni); + public uint Get(out TimeSpec ts, out NcInput ni) + { + ts = default; + ni = default; + fixed (TimeSpec* tsPtr = &ts) + { + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get(this, new Ptr(tsPtr), new Ptr(niPtr)); + } + } + } + public uint GetBlocking(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_blocking(this, ni); + public uint GetBlocking(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_blocking(this, new Ptr(niPtr)); + } + } + public uint GetNblock(Ptr ni) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_nblock(this, ni); + public uint GetNblock(out NcInput ni) + { + ni = default; + fixed (NcInput* niPtr = &ni) + { + return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_nblock(this, new Ptr(niPtr)); + } + } + public void GetVec(Ptr ts, Ptr ni, int vCount) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_getvec(this, ts, ni, vCount); + if (__r != 0) throw new NcResultException("notcurses_getvec", __r); + } + public void InputReadyFd() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_inputready_fd(this); + if (__r != 0) throw new NcResultException("notcurses_inputready_fd", __r); + } + public void LeaveAlternateScreen() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_leave_alternate_screen(this); + if (__r != 0) throw new NcResultException("notcurses_leave_alternate_screen", __r); + } + public void LineSigsDisable() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_linesigs_disable(this); + if (__r != 0) throw new NcResultException("notcurses_linesigs_disable", __r); + } + public void LineSigsEnable() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_linesigs_enable(this); + if (__r != 0) throw new NcResultException("notcurses_linesigs_enable", __r); + } + public void MiceDisable() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_mice_disable(this); + if (__r != 0) throw new NcResultException("notcurses_mice_disable", __r); + } + public void MiceEnable(uint eventMask) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_mice_enable(this, eventMask); + if (__r != 0) throw new NcResultException("notcurses_mice_enable", __r); + } + public uint PaletteSize() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_palette_size(this); + public void Refresh(Ptr y, Ptr x) + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_refresh(this, y, x); + if (__r != 0) throw new NcResultException("notcurses_refresh", __r); + } + public void Refresh(out uint2 xy) + { + uint xyY = default; + uint xyX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_refresh(this, new Ptr(&xyY), new Ptr(&xyX)); + if (__r != 0) throw new NcResultException("notcurses_refresh", __r); + xy = new uint2(xyX, xyY); + } + public void Render() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_render(this); + if (__r != 0) throw new NcResultException("notcurses_render", __r); + } + public void Stats(Ptr stats) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats(this, stats); + public void Stats(out NcStats stats) + { + stats = default; + fixed (NcStats* statsPtr = &stats) + { + global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats(this, new Ptr(statsPtr)); + } + } + public Ptr StatsAlloc() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats_alloc(this); + public void StatsReset(Ptr stats) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats_reset(this, stats); + public void StatsReset(out NcStats stats) + { + stats = default; + fixed (NcStats* statsPtr = &stats) + { + global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats_reset(this, new Ptr(statsPtr)); + } + } + public NcPlaneHandle StdDimYx(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx(this, y, x); + public NcPlaneHandle StdDim(out uint2 xy) + { + uint xyY = default; + uint xyX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new uint2(xyX, xyY); + return __r; + } + public NcPlaneHandle StdDimYxConst(Ptr y, Ptr x) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx_const(this, y, x); + public NcPlaneHandle StdDimYxConst(out uint2 xy) + { + uint xyY = default; + uint xyX = default; + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx_const(this, new Ptr(&xyY), new Ptr(&xyX)); + xy = new uint2(xyX, xyY); + return __r; + } + public NcPlaneHandle StdPlane() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stdplane(this); + public NcPlaneHandle StdPlaneConst() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stdplane_const(this); + public void Stop() + { + var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stop(this); + if (__r != 0) throw new NcResultException("notcurses_stop", __r); + } + public ushort SupportedStyles() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_supported_styles(this); + public void TermDimYx(Ptr rows, Ptr cols) + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_term_dim_yx(this, rows, cols); + public void TermDimYx(out uint rows, out uint cols) + { + rows = default; + cols = default; + fixed (uint* rowsPtr = &rows) + { + fixed (uint* colsPtr = &cols) + { + global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_term_dim_yx(this, new Ptr(rowsPtr), new Ptr(colsPtr)); + } + } + } + public NcPlaneHandle Top() + => global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_top(this); + } +} diff --git a/Brutal.NotCurses/Generated/NotCurses.gen.cs b/Brutal.NotCurses/Generated/NotCurses.gen.cs new file mode 100644 index 0000000..e2cd005 --- /dev/null +++ b/Brutal.NotCurses/Generated/NotCurses.gen.cs @@ -0,0 +1,1202 @@ +using System.Runtime.InteropServices; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +using Brutal.Strings; +namespace Brutal.NotCursesApi +{ + public static partial class NotCurses + { + public static unsafe partial class PInvoke + { + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nckey_synthesized_p(uint w); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nckey_pua_p(uint w); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nckey_supppuaa_p(uint w); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nckey_supppuab_p(uint w); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_version(); + [LibraryImport("notcurses-core")] + public static partial void notcurses_version_components(Ptr major, Ptr minor, Ptr patch, Ptr tweak); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_alpha(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannel_set_alpha(Ptr channel, uint alpha); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannel_default_p(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_set_default(Ptr channel); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannel_palindex_p(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_palindex(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannel_set_palindex(Ptr channel, uint idx); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannel_rgb_p(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_r(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_g(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_b(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_rgb(uint channel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannel_rgb8(uint channel, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannel_set_rgb8(Ptr channel, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannel_set(Ptr channel, uint rgb); + [LibraryImport("notcurses-ffi")] + public static partial void ncchannel_set_rgb8_clipped(Ptr channel, int r, int g, int b); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_bchannel(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_fchannel(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_channels(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannels_bg_rgb_p(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannels_fg_rgb_p(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_bg_alpha(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_set_bchannel(Ptr channels, uint channel); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_set_fchannel(Ptr channels, uint channel); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_set_channels(Ptr dst, ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_bg_alpha(Ptr channels, uint alpha); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_fg_alpha(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_fg_alpha(Ptr channels, uint alpha); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_reverse(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_combine(uint fchan, uint bchan); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_fg_palindex(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_bg_palindex(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_fg_rgb(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_bg_rgb(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_fg_rgb8(ulong channels, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-ffi")] + public static partial uint ncchannels_bg_rgb8(ulong channels, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_fg_rgb8(Ptr channels, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial void ncchannels_set_fg_rgb8_clipped(Ptr channels, int r, int g, int b); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_fg_palindex(Ptr channels, uint idx); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_fg_rgb(Ptr channels, uint rgb); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_bg_rgb8(Ptr channels, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial void ncchannels_set_bg_rgb8_clipped(Ptr channels, int r, int g, int b); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_bg_palindex(Ptr channels, uint idx); + [LibraryImport("notcurses-ffi")] + public static partial int ncchannels_set_bg_rgb(Ptr channels, uint rgb); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannels_fg_default_p(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannels_fg_palindex_p(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannels_bg_default_p(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncchannels_bg_palindex_p(ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_set_fg_default(Ptr channels); + [LibraryImport("notcurses-ffi")] + public static partial ulong ncchannels_set_bg_default(Ptr channels); + [LibraryImport("notcurses-core")] + public static partial int ncstrwidth(RefString8 egcs, Ptr validbytes, Ptr validwidth); + [LibraryImport("notcurses-core")] + public static partial int notcurses_ucs32_to_utf8(Ptr ucs32, uint ucs32count, RefString8 resultbuf, ByteSize64 buflen); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_init(Ptr c); + [LibraryImport("notcurses-core")] + public static partial int nccell_load(NcPlaneHandle n, Ptr c, RefString8 gcluster); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_prime(NcPlaneHandle n, Ptr c, RefString8 gcluster, ushort stylemask, ulong channels); + [LibraryImport("notcurses-core")] + public static partial int nccell_duplicate(NcPlaneHandle n, Ptr targ, Ptr c); + [LibraryImport("notcurses-core")] + public static partial void nccell_release(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_set_styles(Ptr c, uint styleBits); + [LibraryImport("notcurses-ffi")] + public static partial ushort nccell_styles(Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_on_styles(Ptr c, uint styleBits); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_off_styles(Ptr c, uint styleBits); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_set_fg_default(Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_set_bg_default(Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_fg_alpha(Ptr c, uint alpha); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_bg_alpha(Ptr c, uint alpha); + [LibraryImport("notcurses-ffi")] + public static partial ulong nccell_set_bchannel(Ptr c, uint channel); + [LibraryImport("notcurses-ffi")] + public static partial ulong nccell_set_fchannel(Ptr c, uint channel); + [LibraryImport("notcurses-ffi")] + public static partial ulong nccell_set_channels(Ptr c, ulong channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_double_wide_p(Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_wide_right_p(Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_wide_left_p(Ptr c); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string nccell_extended_gcluster(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial ulong nccell_channels(Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_bchannel(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_fchannel(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_cols(Ptr c); + [LibraryImport("notcurses-ffi", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string nccell_strdup(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-ffi", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string nccell_extract(NcPlaneHandle n, Ptr c, Ptr stylemask, Ptr channels); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccellcmp(NcPlaneHandle n1, Ptr c1, NcPlaneHandle n2, Ptr c2); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_load_char(NcPlaneHandle n, Ptr c, byte ch); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_load_egc32(NcPlaneHandle n, Ptr c, uint egc); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_load_ucs32(NcPlaneHandle n, Ptr c, uint u); + [LibraryImport("notcurses-core")] + public static partial int notcurses_lex_margins(RefString8 op, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial int notcurses_lex_blitter(RefString8 op, Ptr blitter); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_str_blitter(NcBlitter blitter); + [LibraryImport("notcurses-core")] + public static partial int notcurses_lex_scalemode(RefString8 op, Ptr scalemode); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_str_scalemode(NcScale scalemode); + [LibraryImport("notcurses-core")] + public static partial NotCursesHandle notcurses_core_init(Ptr opts, Ptr fp); + [LibraryImport("notcurses-core")] + public static partial int notcurses_stop(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial int notcurses_enter_alternate_screen(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial int notcurses_leave_alternate_screen(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle notcurses_stdplane(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle notcurses_stdplane_const(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncpile_top(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncpile_bottom(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial NcPlaneHandle notcurses_top(NotCursesHandle n); + [LibraryImport("notcurses-ffi")] + public static partial NcPlaneHandle notcurses_bottom(NotCursesHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncpile_render(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncpile_rasterize(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial int notcurses_render(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncpile_render_to_buffer(NcPlaneHandle p, Ptr> buf, Ptr buflen); + [LibraryImport("notcurses-core")] + public static partial int ncpile_render_to_file(NcPlaneHandle p, Ptr fp); + [LibraryImport("notcurses-core")] + public static partial void notcurses_drop_planes(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nckey_mouse_p(uint r); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_shift_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_ctrl_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_alt_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_meta_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_super_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_hyper_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_capslock_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_numlock_p(Ptr n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_equal_p(Ptr n1, Ptr n2); + [LibraryImport("notcurses-core")] + public static partial uint notcurses_get(NotCursesHandle n, Ptr ts, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial int notcurses_getvec(NotCursesHandle n, Ptr ts, Ptr ni, int vCount); + [LibraryImport("notcurses-core")] + public static partial int notcurses_inputready_fd(NotCursesHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint notcurses_get_nblock(NotCursesHandle n, Ptr ni); + [LibraryImport("notcurses-ffi")] + public static partial uint notcurses_get_blocking(NotCursesHandle n, Ptr ni); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncinput_nomod_p(Ptr ni); + [LibraryImport("notcurses-core")] + public static partial int notcurses_mice_enable(NotCursesHandle n, uint eventMask); + [LibraryImport("notcurses-ffi")] + public static partial int notcurses_mice_disable(NotCursesHandle n); + [LibraryImport("notcurses-core")] + public static partial int notcurses_linesigs_disable(NotCursesHandle n); + [LibraryImport("notcurses-core")] + public static partial int notcurses_linesigs_enable(NotCursesHandle n); + [LibraryImport("notcurses-core")] + public static partial int notcurses_refresh(NotCursesHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial NotCursesHandle ncplane_notcurses(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NotCursesHandle ncplane_notcurses_const(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_dim_yx(NcPlaneHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-ffi")] + public static partial NcPlaneHandle notcurses_stddim_yx(NotCursesHandle nc, Ptr y, Ptr x); + [LibraryImport("notcurses-ffi")] + public static partial NcPlaneHandle notcurses_stddim_yx_const(NotCursesHandle nc, Ptr y, Ptr x); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_dim_y(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_dim_x(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_pixel_geom(NcPlaneHandle n, Ptr pxY, Ptr pxX, Ptr cellDimY, Ptr cellDimX, Ptr maxBmapY, Ptr maxBmapX); + [LibraryImport("notcurses-ffi")] + public static partial void notcurses_term_dim_yx(NotCursesHandle n, Ptr rows, Ptr cols); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_at_yx(NotCursesHandle nc, uint yOff, uint xOff, Ptr stylemask, Ptr channels); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_create(NcPlaneHandle n, Ptr nopts); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncpile_create(NotCursesHandle nc, Ptr nopts); + [LibraryImport("notcurses-core")] + public static partial int ncplane_resize_maximize(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_resize_marginalized(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_resize_realign(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_resize_placewithin(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_resizecb(NcPlaneHandle n, delegate* unmanaged[Cdecl] resizeCb); + [LibraryImport("notcurses-core")] + public static partial delegate* unmanaged[Cdecl] ncplane_resizecb(NcPlaneHandle arg0, NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_name(NcPlaneHandle n, RefString8 name); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncplane_name(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_reparent(NcPlaneHandle n, NcPlaneHandle newparent); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_reparent_family(NcPlaneHandle n, NcPlaneHandle newparent); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_dup(NcPlaneHandle n, Ptr opaque); + [LibraryImport("notcurses-core")] + public static partial void ncplane_translate(NcPlaneHandle src, NcPlaneHandle dst, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncplane_translate_abs(NcPlaneHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncplane_set_scrolling(NcPlaneHandle n, uint scrollP); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncplane_scrolling_p(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncplane_set_autogrow(NcPlaneHandle n, uint growP); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncplane_autogrow_p(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial Ptr ncpalette_new(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncpalette_use(NotCursesHandle nc, Ptr p); + [LibraryImport("notcurses-ffi")] + public static partial int ncpalette_set_rgb8(Ptr p, int idx, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial int ncpalette_set(Ptr p, int idx, uint rgb); + [LibraryImport("notcurses-ffi")] + public static partial int ncpalette_get(Ptr p, int idx, Ptr palent); + [LibraryImport("notcurses-ffi")] + public static partial int ncpalette_get_rgb8(Ptr p, int idx, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-core")] + public static partial void ncpalette_free(Ptr p); + [LibraryImport("notcurses-core")] + public static partial ushort notcurses_supported_styles(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial uint notcurses_palette_size(NotCursesHandle nc); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_detected_terminal(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial Ptr notcurses_capabilities(NotCursesHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPixelImpl notcurses_check_pixel_support(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccapability_canchangecolor(Ptr caps); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_cantruecolor(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canchangecolor(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canfade(NotCursesHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 notcurses_canopen_images(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial Bool8 notcurses_canopen_videos(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canutf8(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canhalfblock(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canquadrant(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_cansextant(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canoctant(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canbraille(NotCursesHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 notcurses_canpixel(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial Ptr notcurses_stats_alloc(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial void notcurses_stats(NotCursesHandle nc, Ptr stats); + [LibraryImport("notcurses-core")] + public static partial void notcurses_stats_reset(NotCursesHandle nc, Ptr stats); + [LibraryImport("notcurses-core")] + public static partial int ncplane_resize(NcPlaneHandle n, int keepY, int keepX, uint keepLenY, uint keepLenX, int yOff, int xOff, uint yLen, uint xLen); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_resize_simple(NcPlaneHandle n, uint yLen, uint xLen); + [LibraryImport("notcurses-core")] + public static partial int ncplane_destroy(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_base_cell(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_base(NcPlaneHandle n, RefString8 egc, ushort stylemask, ulong channels); + [LibraryImport("notcurses-core")] + public static partial int ncplane_base(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-core")] + public static partial void ncplane_yx(NcPlaneHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial int ncplane_y(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_x(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_move_yx(NcPlaneHandle n, int y, int x); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_move_rel(NcPlaneHandle n, int y, int x); + [LibraryImport("notcurses-core")] + public static partial void ncplane_abs_yx(NcPlaneHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial int ncplane_abs_y(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_abs_x(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_parent(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_parent_const(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_descendant_p(NcPlaneHandle n, NcPlaneHandle ancestor); + [LibraryImport("notcurses-core")] + public static partial int ncplane_move_above(NcPlaneHandle n, NcPlaneHandle above); + [LibraryImport("notcurses-core")] + public static partial int ncplane_move_below(NcPlaneHandle n, NcPlaneHandle below); + [LibraryImport("notcurses-ffi")] + public static partial void ncplane_move_top(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial void ncplane_move_bottom(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_move_family_above(NcPlaneHandle n, NcPlaneHandle targ); + [LibraryImport("notcurses-core")] + public static partial int ncplane_move_family_below(NcPlaneHandle n, NcPlaneHandle targ); + [LibraryImport("notcurses-ffi")] + public static partial void ncplane_move_family_top(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial void ncplane_move_family_bottom(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_family_destroy(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_below(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncplane_above(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_scrollup(NcPlaneHandle n, int r); + [LibraryImport("notcurses-core")] + public static partial int ncplane_scrollup_child(NcPlaneHandle n, NcPlaneHandle child); + [LibraryImport("notcurses-core")] + public static partial int ncplane_rotate_cw(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_rotate_ccw(NcPlaneHandle n); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncplane_at_cursor(NcPlaneHandle n, Ptr stylemask, Ptr channels); + [LibraryImport("notcurses-core")] + public static partial int ncplane_at_cursor_cell(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncplane_at_yx(NcPlaneHandle n, int y, int x, Ptr stylemask, Ptr channels); + [LibraryImport("notcurses-core")] + public static partial int ncplane_at_yx_cell(NcPlaneHandle n, int y, int x, Ptr c); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncplane_contents(NcPlaneHandle n, int begY, int begX, uint lenY, uint lenX); + [LibraryImport("notcurses-core")] + public static partial Ptr ncplane_set_userptr(NcPlaneHandle n, Ptr opaque); + [LibraryImport("notcurses-core")] + public static partial Ptr ncplane_userptr(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_center_abs(NcPlaneHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial Ptr ncplane_as_rgba(NcPlaneHandle n, NcBlitter blit, int begY, int begX, uint lenY, uint lenX, Ptr pxDimY, Ptr pxDimX); + [LibraryImport("notcurses-ffi")] + public static partial int notcurses_align(int availu, NcAlign align, int u); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_halign(NcPlaneHandle n, NcAlign align, int c); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_valign(NcPlaneHandle n, NcAlign align, int r); + [LibraryImport("notcurses-core")] + public static partial int ncplane_cursor_move_yx(NcPlaneHandle n, int y, int x); + [LibraryImport("notcurses-core")] + public static partial int ncplane_cursor_move_rel(NcPlaneHandle n, int y, int x); + [LibraryImport("notcurses-core")] + public static partial void ncplane_home(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_cursor_yx(NcPlaneHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_cursor_y(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_cursor_x(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial ulong ncplane_channels(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial ushort ncplane_styles(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_putc_yx(NcPlaneHandle n, int y, int x, Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putc(NcPlaneHandle n, Ptr c); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putchar_yx(NcPlaneHandle n, int y, int x, byte c); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putchar(NcPlaneHandle n, byte c); + [LibraryImport("notcurses-core")] + public static partial int ncplane_putchar_stained(NcPlaneHandle n, byte c); + [LibraryImport("notcurses-core")] + public static partial int ncplane_putegc_yx(NcPlaneHandle n, int y, int x, RefString8 gclust, Ptr sBytes); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putegc(NcPlaneHandle n, RefString8 gclust, Ptr sBytes); + [LibraryImport("notcurses-core")] + public static partial int ncplane_putegc_stained(NcPlaneHandle n, RefString8 gclust, Ptr sBytes); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putstr_yx(NcPlaneHandle n, int y, int x, RefString8 gclusters); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putstr(NcPlaneHandle n, RefString8 gclustarr); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putstr_aligned(NcPlaneHandle n, int y, NcAlign align, RefString8 s); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putstr_stained(NcPlaneHandle n, RefString8 gclusters); + [LibraryImport("notcurses-core")] + public static partial int ncplane_putnstr_aligned(NcPlaneHandle n, int y, NcAlign align, ByteSize64 s, RefString8 str); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putnstr_yx(NcPlaneHandle n, int y, int x, ByteSize64 s, RefString8 gclusters); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_putnstr(NcPlaneHandle n, ByteSize64 s, RefString8 gclustarr); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_pututf32_yx(NcPlaneHandle n, int y, int x, uint u); + [LibraryImport("notcurses-core")] + public static partial int ncplane_vprintf_aligned(NcPlaneHandle n, int y, NcAlign align, RefString8 format, RefString8 ap); + [LibraryImport("notcurses-core")] + public static partial int ncplane_vprintf_yx(NcPlaneHandle n, int y, int x, RefString8 format, RefString8 ap); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_vprintf(NcPlaneHandle n, RefString8 format, RefString8 ap); + [LibraryImport("notcurses-core")] + public static partial int ncplane_vprintf_stained(NcPlaneHandle n, RefString8 format, RefString8 ap); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_printf(NcPlaneHandle n, RefString8 format); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_printf_yx(NcPlaneHandle n, int y, int x, RefString8 format); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_printf_aligned(NcPlaneHandle n, int y, NcAlign align, RefString8 format); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_printf_stained(NcPlaneHandle n, RefString8 format); + [LibraryImport("notcurses-core")] + public static partial int ncplane_puttext(NcPlaneHandle n, int y, NcAlign align, RefString8 text, Ptr bytes); + [LibraryImport("notcurses-core")] + public static partial int ncplane_hline_interp(NcPlaneHandle n, Ptr c, uint len, ulong c1, ulong c2); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_hline(NcPlaneHandle n, Ptr c, uint len); + [LibraryImport("notcurses-core")] + public static partial int ncplane_vline_interp(NcPlaneHandle n, Ptr c, uint len, ulong c1, ulong c2); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_vline(NcPlaneHandle n, Ptr c, uint len); + [LibraryImport("notcurses-core")] + public static partial int ncplane_box(NcPlaneHandle n, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hline, Ptr vline, uint yStop, uint xStop, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_box_sized(NcPlaneHandle n, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hline, Ptr vline, uint yStop, uint xStop, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_perimeter(NcPlaneHandle n, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hline, Ptr vline, uint ctlWord); + [LibraryImport("notcurses-core")] + public static partial int ncplane_polyfill_yx(NcPlaneHandle n, int y, int x, Ptr c); + [LibraryImport("notcurses-core")] + public static partial int ncplane_gradient(NcPlaneHandle n, int y, int x, uint yLen, uint xLen, RefString8 egc, ushort styles, ulong ul, ulong ur, ulong ll, ulong lr); + [LibraryImport("notcurses-core")] + public static partial int ncplane_gradient2x1(NcPlaneHandle n, int y, int x, uint yLen, uint xLen, uint ul, uint ur, uint ll, uint lr); + [LibraryImport("notcurses-core")] + public static partial int ncplane_format(NcPlaneHandle n, int y, int x, uint yLen, uint xLen, ushort stylemask); + [LibraryImport("notcurses-core")] + public static partial int ncplane_stain(NcPlaneHandle n, int y, int x, uint yLen, uint xLen, ulong ul, ulong ur, ulong ll, ulong lr); + [LibraryImport("notcurses-core")] + public static partial int ncplane_mergedown_simple(NcPlaneHandle src, NcPlaneHandle dst); + [LibraryImport("notcurses-core")] + public static partial int ncplane_mergedown(NcPlaneHandle src, NcPlaneHandle dst, int begSrcY, int begSrcX, uint lenY, uint lenX, int dstY, int dstX); + [LibraryImport("notcurses-core")] + public static partial void ncplane_erase(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_erase_region(NcPlaneHandle n, int yStart, int xStart, int yLen, int xLen); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_fg_rgb(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_bg_rgb(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_fg_alpha(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_bg_alpha(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_fg_rgb8(Ptr cl, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_bg_rgb8(Ptr cl, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_fg_rgb8(Ptr cl, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_set_fg_rgb8_clipped(Ptr cl, int r, int g, int b); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_fg_rgb(Ptr c, uint channel); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_fg_palindex(Ptr cl, uint idx); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_fg_palindex(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_bg_rgb8(Ptr cl, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial void nccell_set_bg_rgb8_clipped(Ptr cl, int r, int g, int b); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_bg_rgb(Ptr c, uint channel); + [LibraryImport("notcurses-ffi")] + public static partial int nccell_set_bg_palindex(Ptr cl, uint idx); + [LibraryImport("notcurses-ffi")] + public static partial uint nccell_bg_palindex(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_fg_default_p(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_fg_palindex_p(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_bg_default_p(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 nccell_bg_palindex_p(Ptr cl); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_bchannel(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_fchannel(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_channels(NcPlaneHandle n, ulong channels); + [LibraryImport("notcurses-core")] + public static partial ulong ncplane_set_bchannel(NcPlaneHandle n, uint channel); + [LibraryImport("notcurses-core")] + public static partial ulong ncplane_set_fchannel(NcPlaneHandle n, uint channel); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_styles(NcPlaneHandle n, uint styleBits); + [LibraryImport("notcurses-core")] + public static partial void ncplane_on_styles(NcPlaneHandle n, uint styleBits); + [LibraryImport("notcurses-core")] + public static partial void ncplane_off_styles(NcPlaneHandle n, uint styleBits); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_fg_rgb(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_bg_rgb(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_fg_alpha(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncplane_fg_default_p(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_bg_alpha(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncplane_bg_default_p(NcPlaneHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_fg_rgb8(NcPlaneHandle n, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-ffi")] + public static partial uint ncplane_bg_rgb8(NcPlaneHandle n, Ptr r, Ptr g, Ptr b); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_fg_rgb8(NcPlaneHandle n, uint r, uint g, uint b); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_bg_rgb8(NcPlaneHandle n, uint r, uint g, uint b); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_bg_rgb8_clipped(NcPlaneHandle n, int r, int g, int b); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_fg_rgb8_clipped(NcPlaneHandle n, int r, int g, int b); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_fg_rgb(NcPlaneHandle n, uint channel); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_bg_rgb(NcPlaneHandle n, uint channel); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_fg_default(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncplane_set_bg_default(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_fg_palindex(NcPlaneHandle n, uint idx); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_bg_palindex(NcPlaneHandle n, uint idx); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_fg_alpha(NcPlaneHandle n, int alpha); + [LibraryImport("notcurses-core")] + public static partial int ncplane_set_bg_alpha(NcPlaneHandle n, int alpha); + [LibraryImport("notcurses-core")] + public static partial int ncplane_fadeout(NcPlaneHandle n, Ptr ts, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial int ncplane_fadein(NcPlaneHandle n, Ptr ts, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial NcFadectxHandle ncfadectx_setup(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncfadectx_iterations(NcFadectxHandle nctX); + [LibraryImport("notcurses-core")] + public static partial int ncplane_fadeout_iteration(NcPlaneHandle n, NcFadectxHandle nctX, int iter, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial int ncplane_fadein_iteration(NcPlaneHandle n, NcFadectxHandle nctX, int iter, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial int ncplane_pulse(NcPlaneHandle n, Ptr ts, delegate* unmanaged[Cdecl], Ptr, int> fader, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial void ncfadectx_free(NcFadectxHandle nctX); + [LibraryImport("notcurses-ffi")] + public static partial int nccells_load_box(NcPlaneHandle n, ushort styles, ulong channels, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hl, Ptr vl, RefString8 gclusters); + [LibraryImport("notcurses-ffi")] + public static partial int nccells_ascii_box(NcPlaneHandle n, ushort attr, ulong channels, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hl, Ptr vl); + [LibraryImport("notcurses-ffi")] + public static partial int nccells_double_box(NcPlaneHandle n, ushort attr, ulong channels, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hl, Ptr vl); + [LibraryImport("notcurses-ffi")] + public static partial int nccells_rounded_box(NcPlaneHandle n, ushort attr, ulong channels, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hl, Ptr vl); + [LibraryImport("notcurses-ffi")] + public static partial int nccells_light_box(NcPlaneHandle n, ushort attr, ulong channels, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hl, Ptr vl); + [LibraryImport("notcurses-ffi")] + public static partial int nccells_heavy_box(NcPlaneHandle n, ushort attr, ulong channels, Ptr ul, Ptr ur, Ptr ll, Ptr lr, Ptr hl, Ptr vl); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_rounded_box(NcPlaneHandle n, ushort styles, ulong channels, uint yStop, uint xStop, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_perimeter_rounded(NcPlaneHandle n, ushort stylemask, ulong channels, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_rounded_box_sized(NcPlaneHandle n, ushort styles, ulong channels, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_double_box(NcPlaneHandle n, ushort styles, ulong channels, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_ascii_box(NcPlaneHandle n, ushort styles, ulong channels, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_perimeter_double(NcPlaneHandle n, ushort stylemask, ulong channels, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncplane_double_box_sized(NcPlaneHandle n, ushort styles, ulong channels, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_file(RefString8 file); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_rgba(Ptr rgba, int rows, int rowstride, int cols); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_rgb_packed(Ptr rgba, int rows, int rowstride, int cols, int alpha); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_rgb_loose(Ptr rgba, int rows, int rowstride, int cols, int alpha); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_bgra(Ptr bgra, int rows, int rowstride, int cols); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_palidx(Ptr data, int rows, int rowstride, int cols, int palsize, int pstride, Ptr palette); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_plane(NcPlaneHandle n, NcBlitter blit, int begY, int begX, uint lenY, uint lenX); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncvisual_from_sixel(RefString8 s, uint lenY, uint lenX); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_geom(NotCursesHandle nc, NcVisualHandle n, Ptr vopts, Ptr geom); + [LibraryImport("notcurses-core")] + public static partial void ncvisual_destroy(NcVisualHandle ncv); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_decode(NcVisualHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_decode_loop(NcVisualHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_rotate(NcVisualHandle n, double rads); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_resize(NcVisualHandle n, int rows, int cols); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_resize_noninterpolative(NcVisualHandle n, int rows, int cols); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_polyfill_yx(NcVisualHandle n, uint y, uint x, uint rgba); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_at_yx(NcVisualHandle n, uint y, uint x, Ptr pixel); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_set_yx(NcVisualHandle n, uint y, uint x, uint pixel); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncvisual_blit(NotCursesHandle nc, NcVisualHandle ncv, Ptr vopts); + [LibraryImport("notcurses-ffi")] + public static partial NcPlaneHandle ncvisualplane_create(NotCursesHandle nc, Ptr opts, NcVisualHandle ncv, Ptr vopts); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncvisual_subtitle_plane(NcPlaneHandle parent, NcVisualHandle ncv); + [LibraryImport("notcurses-core")] + public static partial NcBlitter ncvisual_media_defblitter(NotCursesHandle nc, NcScale scale); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_simple_streamer(NcVisualHandle ncv, Ptr vopts, Ptr tspec, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial int ncvisual_stream(NotCursesHandle nc, NcVisualHandle ncv, float timescale, delegate* unmanaged[Cdecl], Ptr, Ptr, int> streamer, Ptr vopts, Ptr currY); + [LibraryImport("notcurses-core")] + public static partial int ncblit_rgba(Ptr data, int linesize, Ptr vopts); + [LibraryImport("notcurses-core")] + public static partial int ncblit_bgrx(Ptr data, int linesize, Ptr vopts); + [LibraryImport("notcurses-core")] + public static partial int ncblit_rgb_packed(Ptr data, int linesize, Ptr vopts, int alpha); + [LibraryImport("notcurses-core")] + public static partial int ncblit_rgb_loose(Ptr data, int linesize, Ptr vopts, int alpha); + [LibraryImport("notcurses-ffi")] + public static partial uint ncpixel_a(uint pixel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncpixel_r(uint pixel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncpixel_g(uint pixel); + [LibraryImport("notcurses-ffi")] + public static partial uint ncpixel_b(uint pixel); + [LibraryImport("notcurses-ffi")] + public static partial int ncpixel_set_a(Ptr pixel, uint a); + [LibraryImport("notcurses-ffi")] + public static partial int ncpixel_set_r(Ptr pixel, uint r); + [LibraryImport("notcurses-ffi")] + public static partial int ncpixel_set_g(Ptr pixel, uint g); + [LibraryImport("notcurses-ffi")] + public static partial int ncpixel_set_b(Ptr pixel, uint b); + [LibraryImport("notcurses-ffi")] + public static partial uint ncpixel(uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial int ncpixel_set_rgb8(Ptr pixel, uint r, uint g, uint b); + [LibraryImport("notcurses-core")] + public static partial NcReelHandle ncreel_create(NcPlaneHandle n, Ptr popts); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncreel_plane(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial NcTabletHandle ncreel_add(NcReelHandle nr, NcTabletHandle after, NcTabletHandle before, delegate* unmanaged[Cdecl] cb, Ptr opaque); + [LibraryImport("notcurses-core")] + public static partial int ncreel_tabletcount(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial int ncreel_del(NcReelHandle nr, NcTabletHandle t); + [LibraryImport("notcurses-core")] + public static partial int ncreel_redraw(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncreel_offer_input(NcReelHandle nr, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial NcTabletHandle ncreel_focused(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial NcTabletHandle ncreel_next(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial NcTabletHandle ncreel_prev(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial void ncreel_destroy(NcReelHandle nr); + [LibraryImport("notcurses-core")] + public static partial Ptr nctablet_userptr(NcTabletHandle t); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle nctablet_plane(NcTabletHandle t); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncnmetric(ulong val, ByteSize64 s, ulong @decimal, RefString8 buf, int omitdec, ulong mult, int uprefiX); + [LibraryImport("notcurses-ffi", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncqprefix(ulong val, ulong @decimal, RefString8 buf, int omitdec); + [LibraryImport("notcurses-ffi", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string nciprefix(ulong val, ulong @decimal, RefString8 buf, int omitdec); + [LibraryImport("notcurses-ffi", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncbprefix(ulong val, ulong @decimal, RefString8 buf, int omitdec); + [LibraryImport("notcurses-core")] + public static partial int notcurses_default_foreground(NotCursesHandle nc, Ptr fg); + [LibraryImport("notcurses-core")] + public static partial int notcurses_default_background(NotCursesHandle nc, Ptr bg); + [LibraryImport("notcurses-core")] + public static partial int notcurses_cursor_enable(NotCursesHandle nc, int y, int x); + [LibraryImport("notcurses-core")] + public static partial int notcurses_cursor_disable(NotCursesHandle nc); + [LibraryImport("notcurses-core")] + public static partial int notcurses_cursor_yx(NotCursesHandle nc, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial void ncplane_greyscale(NcPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcSelectorHandle ncselector_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial int ncselector_additem(NcSelectorHandle n, Ptr item); + [LibraryImport("notcurses-core")] + public static partial int ncselector_delitem(NcSelectorHandle n, RefString8 item); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncselector_selected(NcSelectorHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncselector_plane(NcSelectorHandle n); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncselector_previtem(NcSelectorHandle n); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncselector_nextitem(NcSelectorHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncselector_offer_input(NcSelectorHandle n, Ptr nc); + [LibraryImport("notcurses-core")] + public static partial void ncselector_destroy(NcSelectorHandle n, Ptr> item); + [LibraryImport("notcurses-core")] + public static partial NcMultiSelectorHandle ncmultiselector_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial int ncmultiselector_selected(NcMultiSelectorHandle n, Ptr selected, uint count); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncmultiselector_plane(NcMultiSelectorHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncmultiselector_offer_input(NcMultiSelectorHandle n, Ptr nc); + [LibraryImport("notcurses-core")] + public static partial void ncmultiselector_destroy(NcMultiSelectorHandle n); + [LibraryImport("notcurses-core")] + public static partial NcTreeHandle nctree_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle nctree_plane(NcTreeHandle n); + [LibraryImport("notcurses-core")] + public static partial int nctree_redraw(NcTreeHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 nctree_offer_input(NcTreeHandle n, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial Ptr nctree_focused(NcTreeHandle n); + [LibraryImport("notcurses-core")] + public static partial Ptr nctree_next(NcTreeHandle n); + [LibraryImport("notcurses-core")] + public static partial Ptr nctree_prev(NcTreeHandle n); + [LibraryImport("notcurses-core")] + public static partial Ptr nctree_goto(NcTreeHandle n, Ptr spec, Ptr failSpec); + [LibraryImport("notcurses-core")] + public static partial int nctree_add(NcTreeHandle n, Ptr spec, Ptr add); + [LibraryImport("notcurses-core")] + public static partial int nctree_del(NcTreeHandle n, Ptr spec); + [LibraryImport("notcurses-core")] + public static partial void nctree_destroy(NcTreeHandle n); + [LibraryImport("notcurses-core")] + public static partial NcMenuHandle ncmenu_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_unroll(NcMenuHandle n, int sectionIdx); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_rollup(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_nextsection(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_prevsection(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_nextitem(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_previtem(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncmenu_item_set_status(NcMenuHandle n, RefString8 section, RefString8 item, Bool8 enabled); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncmenu_selected(NcMenuHandle n, Ptr ni); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncmenu_mouse_selected(NcMenuHandle n, Ptr click, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncmenu_plane(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncmenu_offer_input(NcMenuHandle n, Ptr nc); + [LibraryImport("notcurses-core")] + public static partial void ncmenu_destroy(NcMenuHandle n); + [LibraryImport("notcurses-core")] + public static partial NcProgBarHandle ncprogbar_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncprogbar_plane(NcProgBarHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncprogbar_set_progress(NcProgBarHandle n, double p); + [LibraryImport("notcurses-core")] + public static partial double ncprogbar_progress(NcProgBarHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncprogbar_destroy(NcProgBarHandle n); + [LibraryImport("notcurses-core")] + public static partial NcTabbedHandle nctabbed_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_destroy(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_redraw(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_ensure_selected_header_visible(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctabbed_selected(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctabbed_leftmost(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial int nctabbed_tabcount(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle nctabbed_plane(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle nctabbed_content_plane(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial delegate* unmanaged[Cdecl] nctab_cb(NcTabHandle t); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string nctab_name(NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial int nctab_name_width(NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial Ptr nctab_userptr(NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctab_next(NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctab_prev(NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctabbed_add(NcTabbedHandle nt, NcTabHandle after, NcTabHandle before, delegate* unmanaged[Cdecl] tcb, RefString8 name, Ptr opaque); + [LibraryImport("notcurses-core")] + public static partial int nctabbed_del(NcTabbedHandle nt, NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial int nctab_move(NcTabbedHandle nt, NcTabHandle t, NcTabHandle after, NcTabHandle before); + [LibraryImport("notcurses-core")] + public static partial void nctab_move_right(NcTabbedHandle nt, NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial void nctab_move_left(NcTabbedHandle nt, NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_rotate(NcTabbedHandle nt, int amt); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctabbed_next(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctabbed_prev(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial NcTabHandle nctabbed_select(NcTabbedHandle nt, NcTabHandle t); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_channels(NcTabbedHandle nt, Ptr hdrChan, Ptr selChan, Ptr sepChan); + [LibraryImport("notcurses-ffi")] + public static partial ulong nctabbed_hdrchan(NcTabbedHandle nt); + [LibraryImport("notcurses-ffi")] + public static partial ulong nctabbed_selchan(NcTabbedHandle nt); + [LibraryImport("notcurses-ffi")] + public static partial ulong nctabbed_sepchan(NcTabbedHandle nt); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string nctabbed_separator(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial int nctabbed_separator_width(NcTabbedHandle nt); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_set_hdrchan(NcTabbedHandle nt, ulong chan); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_set_selchan(NcTabbedHandle nt, ulong chan); + [LibraryImport("notcurses-core")] + public static partial void nctabbed_set_sepchan(NcTabbedHandle nt, ulong chan); + [LibraryImport("notcurses-core")] + public static partial delegate* unmanaged[Cdecl] nctab_set_cb(NcTabHandle t, delegate* unmanaged[Cdecl] newcb); + [LibraryImport("notcurses-core")] + public static partial int nctab_set_name(NcTabHandle t, RefString8 newname); + [LibraryImport("notcurses-core")] + public static partial Ptr nctab_set_userptr(NcTabHandle t, Ptr newopaque); + [LibraryImport("notcurses-core")] + public static partial int nctabbed_set_separator(NcTabbedHandle nt, RefString8 separator); + [LibraryImport("notcurses-core")] + public static partial NcUPlotHandle ncuplot_create(NcPlaneHandle n, Ptr opts, ulong minY, ulong maxY); + [LibraryImport("notcurses-core")] + public static partial NcDPlotHandle ncdplot_create(NcPlaneHandle n, Ptr opts, double minY, double maxY); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncuplot_plane(NcUPlotHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncdplot_plane(NcDPlotHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncuplot_add_sample(NcUPlotHandle n, ulong x, ulong y); + [LibraryImport("notcurses-core")] + public static partial int ncdplot_add_sample(NcDPlotHandle n, ulong x, double y); + [LibraryImport("notcurses-core")] + public static partial int ncuplot_set_sample(NcUPlotHandle n, ulong x, ulong y); + [LibraryImport("notcurses-core")] + public static partial int ncdplot_set_sample(NcDPlotHandle n, ulong x, double y); + [LibraryImport("notcurses-core")] + public static partial int ncuplot_sample(NcUPlotHandle n, ulong x, Ptr y); + [LibraryImport("notcurses-core")] + public static partial int ncdplot_sample(NcDPlotHandle n, ulong x, Ptr y); + [LibraryImport("notcurses-core")] + public static partial void ncuplot_destroy(NcUPlotHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncdplot_destroy(NcDPlotHandle n); + [LibraryImport("notcurses-core")] + public static partial NcFdPlaneHandle ncfdplane_create(NcPlaneHandle n, Ptr opts, int fd, delegate* unmanaged[Cdecl] cbfxn, delegate* unmanaged[Cdecl] donecbfxn); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncfdplane_plane(NcFdPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncfdplane_destroy(NcFdPlaneHandle n); + [LibraryImport("notcurses-core")] + public static partial NcSubProcHandle ncsubproc_createv(NcPlaneHandle n, Ptr opts, RefString8 bin, Ptr> arg, delegate* unmanaged[Cdecl] cbfxn, delegate* unmanaged[Cdecl] donecbfxn); + [LibraryImport("notcurses-core")] + public static partial NcSubProcHandle ncsubproc_createvp(NcPlaneHandle n, Ptr opts, RefString8 bin, Ptr> arg, delegate* unmanaged[Cdecl] cbfxn, delegate* unmanaged[Cdecl] donecbfxn); + [LibraryImport("notcurses-core")] + public static partial NcSubProcHandle ncsubproc_createvpe(NcPlaneHandle n, Ptr opts, RefString8 bin, Ptr> arg, Ptr> env, delegate* unmanaged[Cdecl] cbfxn, delegate* unmanaged[Cdecl] donecbfxn); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncsubproc_plane(NcSubProcHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncsubproc_destroy(NcSubProcHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncplane_qrcode(NcPlaneHandle n, Ptr yMaX, Ptr xMaX, Ptr data, ByteSize64 len); + [LibraryImport("notcurses-core")] + public static partial NcReaderHandle ncreader_create(NcPlaneHandle n, Ptr opts); + [LibraryImport("notcurses-core")] + public static partial int ncreader_clear(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncreader_plane(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncreader_offer_input(NcReaderHandle n, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial int ncreader_move_left(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncreader_move_right(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncreader_move_up(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncreader_move_down(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncreader_write_egc(NcReaderHandle n, RefString8 egc); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncreader_contents(NcReaderHandle n); + [LibraryImport("notcurses-core")] + public static partial void ncreader_destroy(NcReaderHandle n, Ptr> contents); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_accountname(); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_hostname(); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string notcurses_osversion(); + [LibraryImport("notcurses-core")] + public static partial void notcurses_debug(NotCursesHandle nc, Ptr debugfp); + [LibraryImport("notcurses-core")] + public static partial NcDirectHandle ncdirect_core_init(RefString8 termtype, Ptr fp, NcDirectOption flags); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncdirect_readline(NcDirectHandle nc, RefString8 prompt); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_fg_rgb(NcDirectHandle nc, uint rgb); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_bg_rgb(NcDirectHandle nc, uint rgb); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_fg_palindex(NcDirectHandle nc, int pIdx); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_bg_palindex(NcDirectHandle nc, int pIdx); + [LibraryImport("notcurses-core")] + public static partial uint ncdirect_palette_size(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_putstr(NcDirectHandle nc, ulong channels, RefString8 utf8); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_putegc(NcDirectHandle nc, ulong channels, RefString8 utf8, Ptr sBytes); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_printf_aligned(NcDirectHandle n, int y, NcAlign align, RefString8 fmt); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_flush(NcDirectHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial int ncdirect_set_bg_rgb8(NcDirectHandle nc, uint r, uint g, uint b); + [LibraryImport("notcurses-ffi")] + public static partial int ncdirect_set_fg_rgb8(NcDirectHandle nc, uint r, uint g, uint b); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_fg_default(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_bg_default(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial uint ncdirect_dim_x(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial uint ncdirect_dim_y(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial ushort ncdirect_supported_styles(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_set_styles(NcDirectHandle n, uint styleBits); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_on_styles(NcDirectHandle n, uint styleBits); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_off_styles(NcDirectHandle n, uint styleBits); + [LibraryImport("notcurses-core")] + public static partial ushort ncdirect_styles(NcDirectHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_move_yx(NcDirectHandle n, int y, int x); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_enable(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_disable(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_up(NcDirectHandle nc, int num); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_left(NcDirectHandle nc, int num); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_right(NcDirectHandle nc, int num); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_down(NcDirectHandle nc, int num); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_yx(NcDirectHandle n, Ptr y, Ptr x); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_push(NcDirectHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_cursor_pop(NcDirectHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_clear(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial Ptr ncdirect_capabilities(NcDirectHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_hline_interp(NcDirectHandle n, Ptr egc, uint len, ulong h1, ulong h2); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_vline_interp(NcDirectHandle n, Ptr egc, uint len, ulong h1, ulong h2); + [LibraryImport("notcurses-ffi")] + public static partial int ncdirect_light_box(NcDirectHandle n, ulong ul, ulong ur, ulong ll, ulong lr, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncdirect_heavy_box(NcDirectHandle n, ulong ul, ulong ur, ulong ll, ulong lr, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-ffi")] + public static partial int ncdirect_ascii_box(NcDirectHandle n, ulong ul, ulong ur, ulong ll, ulong lr, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_rounded_box(NcDirectHandle n, ulong ul, ulong ur, ulong ll, ulong lr, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_double_box(NcDirectHandle n, ulong ul, ulong ur, ulong ll, ulong lr, uint yLen, uint xLen, uint ctlWord); + [LibraryImport("notcurses-core")] + public static partial uint ncdirect_get(NcDirectHandle n, Ptr absdl, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_inputready_fd(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial uint ncdirect_get_nblock(NcDirectHandle n, Ptr ni); + [LibraryImport("notcurses-ffi")] + public static partial uint ncdirect_get_blocking(NcDirectHandle n, Ptr ni); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_stop(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_render_image(NcDirectHandle n, RefString8 filename, NcAlign align, NcBlitter blitter, NcScale scale); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncdirect_render_frame(NcDirectHandle n, RefString8 filename, NcBlitter blitter, NcScale scale, int maxY, int maxX); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_raster_frame(NcDirectHandle n, NcPlaneHandle ncdv, NcAlign align); + [LibraryImport("notcurses-core")] + public static partial NcVisualHandle ncdirectf_from_file(NcDirectHandle n, RefString8 filename); + [LibraryImport("notcurses-core")] + public static partial void ncdirectf_free(NcVisualHandle frame); + [LibraryImport("notcurses-core")] + public static partial NcPlaneHandle ncdirectf_render(NcDirectHandle n, NcVisualHandle frame, Ptr vopts); + [LibraryImport("notcurses-core")] + public static partial int ncdirectf_geom(NcDirectHandle n, NcVisualHandle frame, Ptr vopts, Ptr geom); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_stream(NcDirectHandle n, RefString8 filename, delegate* unmanaged[Cdecl], Ptr, Ptr, int> streamer, Ptr vopts, Ptr currY); + [LibraryImport("notcurses-core", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(InteropStringMarshaller))] + public static partial string ncdirect_detected_terminal(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_cantruecolor(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canchangecolor(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canfade(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canopen_images(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canopen_videos(NcDirectHandle n); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncdirect_canutf8(NcDirectHandle n); + [LibraryImport("notcurses-core")] + public static partial int ncdirect_check_pixel_support(NcDirectHandle n); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canhalfblock(NcDirectHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canquadrant(NcDirectHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_cansextant(NcDirectHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canoctant(NcDirectHandle nc); + [LibraryImport("notcurses-ffi")] + public static partial Bool8 ncdirect_canbraille(NcDirectHandle nc); + [LibraryImport("notcurses-core")] + public static partial Bool8 ncdirect_canget_cursor(NcDirectHandle nc); + } + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcCapabilities.gen.cs b/Brutal.NotCurses/Generated/Structs/NcCapabilities.gen.cs new file mode 100644 index 0000000..4f5f2f9 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcCapabilities.gen.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// Capabilities, derived from terminfo, environment variables, and queries + public unsafe partial struct NcCapabilities + { + public uint Colors; // size of palette for indexed colors + public Bool8 Utf8; // are we using utf-8 encoding? from nl_langinfo(3) + public Bool8 Rgb; // 24bit color? COLORTERM/heuristics/terminfo 'rgb' + public Bool8 CanChangeColors; // can we change the palette? terminfo 'ccc' + public Bool8 Halfblocks; // we assume halfblocks, but some are known to lack them + public Bool8 Quadrants; // do we have (good, vetted) Unicode 1 quadrant support? + public Bool8 Sextants; // do we have (good, vetted) Unicode 13 sextant support? + public Bool8 Octants; // do we have (good, vetted) Unicode 16 octant support? + public Bool8 Braille; // do we have Braille support? (linux console does not) + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcCell.gen.cs b/Brutal.NotCurses/Generated/Structs/NcCell.gen.cs new file mode 100644 index 0000000..8468fa5 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcCell.gen.cs @@ -0,0 +1,65 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// An nccell corresponds to a single character cell on some plane, which can be + /// occupied by a single grapheme cluster (some root spacing glyph, along with + /// possible combining characters, which might span multiple columns). At any + /// cell, we can have a theoretically arbitrarily long UTF-8 EGC, a foreground + /// color, a background color, and an attribute set. Valid grapheme cluster + /// contents include: + /// + /// * A NUL terminator, + /// * A single control character, followed by a NUL terminator, + /// * At most one spacing character, followed by zero or more nonspacing + /// characters, followed by a NUL terminator. + /// + /// Multi-column characters can only have a single style/color throughout. + /// Existence is suffering, and thus wcwidth() is not reliable. It's just + /// quoting whether or not the EGC contains a "Wide Asian" double-width + /// character. This is set for some things, like most emoji, and not set for + /// other things, like cuneiform. True display width is a *function of the + /// font and terminal*. Among the longest Unicode codepoints is + /// + /// U+FDFD ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM ﷽ + /// + /// wcwidth() rather optimistically claims this most exalted glyph to occupy + /// a single column. BiDi text is too complicated for me to even get into here. + /// Be assured there are no easy answers; ours is indeed a disturbing Universe. + /// + /// Each nccell occupies 16 static bytes (128 bits). The surface is thus ~1.6MB + /// for a (pretty large) 500x200 terminal. At 80x43, it's less than 64KB. + /// Dynamic requirements (the egcpool) can add up to 16MB to an ncplane, but + /// such large pools are unlikely in common use. + /// + /// We implement some small alpha compositing. Foreground and background both + /// have two bits of inverted alpha. The actual grapheme written to a cell is + /// the topmost non-zero grapheme. If its alpha is 00, its foreground color is + /// used unchanged. If its alpha is 10, its foreground color is derived entirely + /// from cells underneath it. Otherwise, the result will be a composite. + /// Likewise for the background. If the bottom of a coordinate's zbuffer is + /// reached with a cumulative alpha of zero, the default is used. In this way, + /// a terminal configured with transparent background can be supported through + /// multiple occluding ncplanes. A foreground alpha of 11 requests high-contrast + /// text (relative to the computed background). A background alpha of 11 is + /// currently forbidden. + /// + /// Default color takes precedence over palette or RGB, and cannot be used with + /// transparency. Indexed palette takes precedence over RGB. It cannot + /// meaningfully set transparency, but it can be mixed into a cascading color. + /// RGB is used if neither default terminal colors nor palette indexing are in + /// play, and fully supports all transparency options. + /// + /// This structure is exposed only so that most functions can be inlined. Do not + /// directly modify or access the fields of this structure; use the API. + public unsafe partial struct NcCell + { + public uint Gcluster; // 4B → 4B little endian EGC + public byte GclusterBackstop; // 1B → 5B (8 bits of zero) + public byte Width; // 1B → 6B (8 bits of EGC column width) + public ushort Stylemask; // 2B → 8B (16 bits of NCSTYLE_* attributes) + public ulong Channels; // + 8B == 16B + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcFdPlaneOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcFdPlaneOptions.gen.cs new file mode 100644 index 0000000..aecb0b3 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcFdPlaneOptions.gen.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// read from an fd until EOF (or beyond, if follow is set), invoking the user's + /// callback each time. runs in its own context. on EOF or error, the finalizer + /// callback will be invoked, and the user ought destroy the ncfdplane. the + /// data is *not* guaranteed to be nul-terminated, and may contain arbitrary + /// zeroes. + public unsafe partial struct NcFdPlaneOptions + { + public Ptr Curry; // parameter provided to callbacks + public Bool8 Follow; // keep reading after hitting end? (think tail -f) + public ulong Flags; // bitfield over NCOPTION_FDPLANE_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcInput.gen.cs b/Brutal.NotCurses/Generated/Structs/NcInput.gen.cs new file mode 100644 index 0000000..9a064fa --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcInput.gen.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// An input event. Cell coordinates are currently defined only for mouse + /// events. It is not guaranteed that we can set the modifiers for a given + /// ncinput. We encompass single Unicode codepoints, not complete EGCs. + /// FIXME for abi4, combine the bools into |modifiers| + public unsafe partial struct NcInput + { + public uint Id; // Unicode codepoint or synthesized NCKEY event + public int Y; // y/x cell coordinate of event, -1 for undefined + public int X; // y/x cell coordinate of event, -1 for undefined + public fixed byte Utf8[5]; // utf8 representation, if one exists + public Bool8 Alt; // was alt held? + public Bool8 Shift; // was shift held? + public Bool8 Ctrl; // was ctrl held? + /// END DEPRECATION + public NcInType Evtype; + public uint Modifiers; // bitmask over NCKEY_MOD_* + public int Ypx; // pixel offsets within cell, -1 for undefined + public int Xpx; // pixel offsets within cell, -1 for undefined + public fixed uint EffText[4]; // Effective + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcMSelectorItem.gen.cs b/Brutal.NotCurses/Generated/Structs/NcMSelectorItem.gen.cs new file mode 100644 index 0000000..6b468c3 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcMSelectorItem.gen.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcMSelectorItem + { + public Ptr Option; + public Ptr Desc; + public Bool8 Selected; + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcMenuItem.gen.cs b/Brutal.NotCurses/Generated/Structs/NcMenuItem.gen.cs new file mode 100644 index 0000000..9b2590b --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcMenuItem.gen.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// Menus. Horizontal menu bars are supported, on the top and/or bottom rows. + /// If the menu bar is longer than the screen, it will be only partially + /// visible. Menus may be either visible or invisible by default. In the event of + /// a plane resize, menus will be automatically moved/resized. Elements can be + /// dynamically enabled or disabled at all levels (menu, section, and item), + public unsafe partial struct NcMenuItem + { + public Ptr Desc; // utf-8 menu item, NULL for horizontal separator + public NcInput Shortcut; // shortcut, all should be distinct + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcMenuOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcMenuOptions.gen.cs new file mode 100644 index 0000000..b92d676 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcMenuOptions.gen.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcMenuOptions + { + public Ptr Sections; // array of 'sectioncount' menu_sections + public int Sectioncount; // must be positive + public ulong Headerchannels; // styling for header + public ulong Sectionchannels; // styling for sections + public NcMenuOption Flags; // flag word of NCMENU_OPTION_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcMenuSection.gen.cs b/Brutal.NotCurses/Generated/Structs/NcMenuSection.gen.cs new file mode 100644 index 0000000..72c4939 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcMenuSection.gen.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcMenuSection + { + public Ptr Name; // utf-8 c string + public int Itemcount; + public Ptr Items; + public NcInput Shortcut; // shortcut, will be underlined if present in name + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcMultiSelectorOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcMultiSelectorOptions.gen.cs new file mode 100644 index 0000000..62aa945 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcMultiSelectorOptions.gen.cs @@ -0,0 +1,26 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// multiselection widget -- a selector supporting multiple selections. + /// + /// Unlike the selector widget, zero to all of the items can be selected, but + /// also the widget does not support adding or removing items at runtime. + public unsafe partial struct NcMultiSelectorOptions + { + public Ptr Title; // title may be NULL, inhibiting riser, saving two rows. + public Ptr Secondary; // secondary may be NULL + public Ptr Footer; // footer may be NULL + public Ptr Items; // initial items, descriptions, and statuses + /// maximum number of options to display at once, 0 to use all available space + public uint Maxdisplay; + public ulong Opchannels; // option channels + public ulong Descchannels; // description channels + public ulong Titlechannels; // title channels + public ulong Footchannels; // secondary and footer channels + public ulong Boxchannels; // border channels + public ulong Flags; // bitfield of NCMULTISELECTOR_OPTION_*, currently unused + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcPalette.gen.cs b/Brutal.NotCurses/Generated/Structs/NcPalette.gen.cs new file mode 100644 index 0000000..cb2e98e --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcPalette.gen.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// Palette API. Some terminals only support 256 colors, but allow the full + /// palette to be specified with arbitrary RGB colors. In all cases, it's more + /// performant to use indexed colors, since it's much less data to write to the + /// terminal. If you can limit yourself to 256 colors, that's probably best. + public unsafe partial struct NcPalette + { + public fixed uint Chans[256]; // RGB values as regular ol' channels + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcPlaneOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcPlaneOptions.gen.cs new file mode 100644 index 0000000..5107958 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcPlaneOptions.gen.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcPlaneOptions + { + public int Y; // vertical placement relative to parent plane + public int X; // horizontal placement relative to parent plane + public uint Rows; // rows, must be >0 unless NCPLANE_OPTION_MARGINALIZED + public uint Cols; // columns, must be >0 unless NCPLANE_OPTION_MARGINALIZED + public Ptr UserPtr; // user curry, may be NULL + public Ptr Name; // name (used only for debugging), may be NULL + public delegate* unmanaged[Cdecl] ResizeCb; // callback when parent is resized + public NcPlaneOption Flags; // closure over NCPLANE_OPTION_* + public uint MarginB; // margins (require NCPLANE_OPTION_MARGINALIZED) + public uint MarginR; // margins (require NCPLANE_OPTION_MARGINALIZED) + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcPlotOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcPlotOptions.gen.cs new file mode 100644 index 0000000..649bc75 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcPlotOptions.gen.cs @@ -0,0 +1,24 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcPlotOptions + { + /// channels for the maximum and minimum levels. linear or exponential + /// interpolation will be applied across the domain between these two. + public ulong Maxchannels; + public ulong Minchannels; + /// styling used for the legend, if NCPLOT_OPTION_LABELTICKSD is set + public ushort Legendstyle; + public NcBlitter Gridtype; // number of "pixels" per row x column + /// independent variable can either be a contiguous range, or a finite set + /// of keys. for a time range, say the previous hour sampled with second + /// resolution, the independent variable would be the range [0..3600): 3600. + /// if rangex is 0, it is dynamically set to the number of columns. + public int Rangex; + public Ptr Title; // optional, printed by the labels + public NcPlotOption Flags; // bitfield over NCPLOT_OPTION_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcProgBarOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcProgBarOptions.gen.cs new file mode 100644 index 0000000..1b9e40d --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcProgBarOptions.gen.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcProgBarOptions + { + public uint Ulchannel; // upper-left channel. in the context of a progress bar, + public uint Urchannel; // "up" is the direction we are progressing towards, and + public uint Blchannel; // "bottom" is the direction of origin. for monochromatic + public uint Brchannel; // bar, all four channels ought be the same. + public NcProgbarOption Flags; + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcReaderOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcReaderOptions.gen.cs new file mode 100644 index 0000000..29b36d5 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcReaderOptions.gen.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcReaderOptions + { + public ulong Tchannels; // channels used for input + public uint Tattrword; // attributes used for input + public NcReaderOption Flags; // bitfield of NCREADER_OPTION_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcReelOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcReelOptions.gen.cs new file mode 100644 index 0000000..c294c5a --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcReelOptions.gen.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcReelOptions + { + public uint Bordermask; // bitfield; 1s will not be drawn (see bordermaskbits) + public ulong Borderchan; // attributes used for ncreel border + public uint Tabletmask; // bitfield; same as bordermask but for tablet borders + public ulong Tabletchan; // tablet border styling channel + public ulong Focusedchan; // focused tablet border styling channel + public NcReelOption Flags; // bitfield over NCREEL_OPTION_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcSelectorItem.gen.cs b/Brutal.NotCurses/Generated/Structs/NcSelectorItem.gen.cs new file mode 100644 index 0000000..429a7ab --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcSelectorItem.gen.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// selection widget -- an ncplane with a title header and a body section. the + /// body section supports infinite scrolling up and down. + /// + /// At all times, exactly one item is selected. + public unsafe partial struct NcSelectorItem + { + public Ptr Option; + public Ptr Desc; + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcSelectorOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcSelectorOptions.gen.cs new file mode 100644 index 0000000..b5d5798 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcSelectorOptions.gen.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcSelectorOptions + { + public Ptr Title; // title may be NULL, inhibiting riser, saving two rows. + public Ptr Secondary; // secondary may be NULL + public Ptr Footer; // footer may be NULL + public Ptr Items; // initial items and descriptions + /// default item (selected at start), must be < itemcount unless itemcount is + /// 0, in which case 'defidx' must also be 0 + public uint Defidx; + /// maximum number of options to display at once, 0 to use all available space + public uint Maxdisplay; + public ulong Opchannels; // option channels + public ulong Descchannels; // description channels + public ulong Titlechannels; // title channels + public ulong Footchannels; // secondary and footer channels + public ulong Boxchannels; // border channels + public ulong Flags; // bitfield of NCSELECTOR_OPTION_*, currently unused + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcStats.gen.cs b/Brutal.NotCurses/Generated/Structs/NcStats.gen.cs new file mode 100644 index 0000000..1338914 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcStats.gen.cs @@ -0,0 +1,48 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// whenever a new field is added here, ensure we add the proper rule to + /// notcurses_stats_reset(), so that values are preserved in the stash stats. + public unsafe partial struct NcStats + { + public ulong Renders; // successful ncpile_render() runs + public ulong Writeouts; // successful ncpile_rasterize() runs + public ulong FailedRenders; // aborted renders, should be 0 + public ulong FailedWriteouts; // aborted writes + public ulong RasterBytes; // bytes emitted to ttyfp + public long RasterMaxBytes; // max bytes emitted for a frame + public long RasterMinBytes; // min bytes emitted for a frame + public ulong RenderNs; // nanoseconds spent rendering + public long RenderMaxNs; // max ns spent in render for a frame + public long RenderMinNs; // min ns spent in render for a frame + public ulong RasterNs; // nanoseconds spent rasterizing + public long RasterMaxNs; // max ns spent in raster for a frame + public long RasterMinNs; // min ns spent in raster for a frame + public ulong WriteoutNs; // nanoseconds spent writing frames to terminal + public long WriteoutMaxNs; // max ns spent writing out a frame + public long WriteoutMinNs; // min ns spent writing out a frame + public ulong Cellelisions; // cells we elided entirely thanks to damage maps + public ulong Cellemissions; // total number of cells emitted to terminal + public ulong Fgelisions; // RGB fg elision count + public ulong Fgemissions; // RGB fg emissions + public ulong Bgelisions; // RGB bg elision count + public ulong Bgemissions; // RGB bg emissions + public ulong Defaultelisions; // default color was emitted + public ulong Defaultemissions; // default color was elided + public ulong Refreshes; // refresh requests (non-optimized redraw) + public ulong Sprixelemissions; // sprixel draw count + public ulong Sprixelelisions; // sprixel elision count + public ulong Sprixelbytes; // sprixel bytes emitted + public ulong AppsyncUpdates; // how many application-synchronized updates? + public ulong InputErrors; // errors processing control sequences/utf8 + public ulong InputEvents; // characters returned to userspace + public ulong HpaGratuitous; // unnecessary hpas issued + public ulong CellGeoChanges; // cell geometry changes (resizes) + public ulong PixelGeoChanges; // pixel geometry changes (font resize) + public ulong Fbbytes; // total bytes devoted to all active framebuffers + public uint Planes; // number of planes currently in existence + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcSubProcOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcSubProcOptions.gen.cs new file mode 100644 index 0000000..1b060c5 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcSubProcOptions.gen.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcSubProcOptions + { + public Ptr Curry; + public ulong RestartPeriod; // restart this many seconds after an exit (watch) + public ulong Flags; // bitfield over NCOPTION_SUBPROC_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcTabbedOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcTabbedOptions.gen.cs new file mode 100644 index 0000000..641be39 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcTabbedOptions.gen.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcTabbedOptions + { + public ulong SelChan; // channel for the selected tab header + public ulong HdrChan; // channel for unselected tab headers + public ulong SepChan; // channel for the tab separator + public Ptr Separator; // separator string (copied by nctabbed_create()) + public NcTabbedOption Flags; // bitmask of NCTABBED_OPTION_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcTreeItem.gen.cs b/Brutal.NotCurses/Generated/Structs/NcTreeItem.gen.cs new file mode 100644 index 0000000..41596fe --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcTreeItem.gen.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// each item has a curry, and zero or more subitems. + public unsafe partial struct NcTreeItem + { + public Ptr Curry; + public Ptr Subs; + public uint Subcount; + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcTreeOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcTreeOptions.gen.cs new file mode 100644 index 0000000..d066f30 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcTreeOptions.gen.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcTreeOptions + { + public Ptr Items; // top-level nctree_item array + public uint Count; // size of |items| + public delegate* unmanaged[Cdecl] Nctreecb; // item callback function + public int Indentcols; // columns to indent per level of hierarchy + public ulong Flags; // bitfield of NCTREE_OPTION_* + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcVGeom.gen.cs b/Brutal.NotCurses/Generated/Structs/NcVGeom.gen.cs new file mode 100644 index 0000000..fd2f444 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcVGeom.gen.cs @@ -0,0 +1,43 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// describes all geometries of an ncvisual: those which are inherent, and those + /// dependent upon a given rendering regime. pixy and pixx are the true internal + /// pixel geometry, taken directly from the load (and updated by + /// ncvisual_resize()). cdimy/cdimx are the cell-pixel geometry *at the time + /// of this call* (it can change with a font change, in which case all values + /// other than pixy/pixx are invalidated). rpixy/rpixx are the pixel geometry as + /// handed to the blitter, following any scaling. scaley/scalex are the number + /// of input pixels drawn to a single cell; when using NCBLIT_PIXEL, they are + /// equivalent to cdimy/cdimx. rcelly/rcellx are the cell geometry as written by + /// the blitter, following any padding (there is padding whenever rpix{y, x} is + /// not evenly divided by scale{y, x}, and also sometimes for Sixel). + /// maxpixely/maxpixelx are defined only when NCBLIT_PIXEL is used, and specify + /// the largest bitmap that the terminal is willing to accept. blitter is the + /// blitter which will be used, a function of the requested blitter and the + /// blitters actually supported by this environment. if no ncvisual was + /// supplied, only cdimy/cdimx are filled in. + public unsafe partial struct NcVGeom + { + public uint Pixy; // true pixel geometry of ncvisual data + public uint Pixx; // true pixel geometry of ncvisual data + public uint Cdimy; // terminal cell geometry when this was calculated + public uint Cdimx; // terminal cell geometry when this was calculated + public uint Rpixy; // rendered pixel geometry (per visual_options) + public uint Rpixx; // rendered pixel geometry (per visual_options) + public uint Rcelly; // rendered cell geometry (per visual_options) + public uint Rcellx; // rendered cell geometry (per visual_options) + public uint Scaley; // source pixels per filled cell + public uint Scalex; // source pixels per filled cell + public uint Begy; // upper-left corner of used region + public uint Begx; // upper-left corner of used region + public uint Leny; // geometry of used region + public uint Lenx; // geometry of used region + public uint Maxpixely; // only defined for NCBLIT_PIXEL + public uint Maxpixelx; // only defined for NCBLIT_PIXEL + public NcBlitter Blitter; // blitter that will be used + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NcVisualOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NcVisualOptions.gen.cs new file mode 100644 index 0000000..fdbbc30 --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NcVisualOptions.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + public unsafe partial struct NcVisualOptions + { + /// if no ncplane is provided, one will be created using the exact size + /// necessary to render the source with perfect fidelity (this might be + /// smaller or larger than the rendering area). if NCVISUAL_OPTION_CHILDPLANE + /// is provided, this must be non-NULL, and will be interpreted as the parent. + public NcPlaneHandle N; + /// the scaling is ignored if no ncplane is provided (it ought be NCSCALE_NONE + /// in this case). otherwise, the source is stretched/scaled relative to the + /// provided ncplane. + public NcScale Scaling; + /// if an ncplane is provided, y and x specify where the visual will be + /// rendered on that plane. otherwise, they specify where the created ncplane + /// will be placed relative to the standard plane's origin. x is an ncalign_e + /// value if NCVISUAL_OPTION_HORALIGNED is provided. y is an ncalign_e if + /// NCVISUAL_OPTION_VERALIGNED is provided. + public int Y; + /// if an ncplane is provided, y and x specify where the visual will be + /// rendered on that plane. otherwise, they specify where the created ncplane + /// will be placed relative to the standard plane's origin. x is an ncalign_e + /// value if NCVISUAL_OPTION_HORALIGNED is provided. y is an ncalign_e if + /// NCVISUAL_OPTION_VERALIGNED is provided. + public int X; + public uint Begy; // origin of rendered region in pixels + public uint Begx; // origin of rendered region in pixels + public uint Leny; // size of rendered region in pixels + public uint Lenx; // size of rendered region in pixels + public NcBlitter Blitter; // glyph set to use (maps input to output cells) + public NcVisualOption Flags; // bitmask over NCVISUAL_OPTION_* + public uint Transcolor; // treat this color as transparent under NCVISUAL_OPTION_ADDALPHA + /// pixel offsets within the cell. if NCBLIT_PIXEL is used, the bitmap will + /// be drawn offset from the upper-left cell's origin by these amounts. it is + /// an error if either number exceeds the cell-pixel geometry in its + /// dimension. if NCBLIT_PIXEL is not used, these fields are ignored. + /// this functionality can be used for smooth bitmap movement. + public uint Pxoffy; + /// pixel offsets within the cell. if NCBLIT_PIXEL is used, the bitmap will + /// be drawn offset from the upper-left cell's origin by these amounts. it is + /// an error if either number exceeds the cell-pixel geometry in its + /// dimension. if NCBLIT_PIXEL is not used, these fields are ignored. + /// this functionality can be used for smooth bitmap movement. + public uint Pxoffx; + } +} diff --git a/Brutal.NotCurses/Generated/Structs/NotCursesOptions.gen.cs b/Brutal.NotCurses/Generated/Structs/NotCursesOptions.gen.cs new file mode 100644 index 0000000..40b937f --- /dev/null +++ b/Brutal.NotCurses/Generated/Structs/NotCursesOptions.gen.cs @@ -0,0 +1,42 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal; +using Brutal.Interop; +using Brutal.Pointers; +namespace Brutal.NotCursesApi +{ + /// Configuration for notcurses_init(). + public unsafe partial struct NotCursesOptions + { + /// The name of the terminfo database entry describing this terminal. If NULL, + /// the environment variable TERM is used. Failure to open the terminal + /// definition will result in failure to initialize notcurses. + public Ptr Termtype; + /// Progressively higher log levels result in more logging to stderr. By + /// default, nothing is printed to stderr once fullscreen service begins. + public NcLogLevel Loglevel; + /// Desirable margins. If all are 0 (default), we will render to the entirety + /// of the screen. If the screen is too small, we do what we can--this is + /// strictly best-effort. Absolute coordinates are relative to the rendering + /// area ((0, 0) is always the origin of the rendering area). + public uint MarginT; + /// Desirable margins. If all are 0 (default), we will render to the entirety + /// of the screen. If the screen is too small, we do what we can--this is + /// strictly best-effort. Absolute coordinates are relative to the rendering + /// area ((0, 0) is always the origin of the rendering area). + public uint MarginR; + /// Desirable margins. If all are 0 (default), we will render to the entirety + /// of the screen. If the screen is too small, we do what we can--this is + /// strictly best-effort. Absolute coordinates are relative to the rendering + /// area ((0, 0) is always the origin of the rendering area). + public uint MarginB; + /// Desirable margins. If all are 0 (default), we will render to the entirety + /// of the screen. If the screen is too small, we do what we can--this is + /// strictly best-effort. Absolute coordinates are relative to the rendering + /// area ((0, 0) is always the origin of the rendering area). + public uint MarginL; + /// General flags; see NCOPTION_*. This is expressed as a bitfield so that + /// future options can be added without reshaping the struct. Undefined bits + /// must be set to 0. + public NotCursesOption Flags; + } +} diff --git a/Brutal.NotCurses/LICENSES/BRUTAL-NOTCURSES-THIRD-PARTY-NOTICES.txt b/Brutal.NotCurses/LICENSES/BRUTAL-NOTCURSES-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..cca5840 --- /dev/null +++ b/Brutal.NotCurses/LICENSES/BRUTAL-NOTCURSES-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,1292 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.NotCurses + +This package ships three third-party components on macOS and Linux and four on Windows: notcurses, +plus the parts of its dependency closure that are not part of the operating system. + + The managed assembly is in scope as well as the native libraries. The notcurses + constants, enumerations, struct layouts and entry-point signatures in + Brutal.NotCurses.dll are generated from notcurses's public C headers, and many of + the documentation comments carried in Brutal.NotCurses.xml are taken word for word + from the comments in those headers. + + zlib is not built or shipped by this package on any platform. It is supplied by the + RocketWerkz.Brutal.ZLib package, which this package depends on and whose own notices + file covers it. The terminfo database is read from the host and is not shipped. + + Upstream states a second license over one file that this package does not build. It + is accounted for in the closing section rather than passed over, so that a reader who + opens upstream's own copyright file does not read the difference as a cut. Nothing + below is abridged. + + +============================================================================== +notcurses +============================================================================== + + Name notcurses, described by upstream as a TUI library for modern terminal + emulators + Version 3.0.17, the version the shipped libraries report and carry in their file + names. Upstream has not tagged the commit this package was built from, + which is later than the v3.0.17 release + Upstream https://github.com/dankamongmen/notcurses + SPDX Apache-2.0 + Shipped as notcurses-core.dll and notcurses-ffi.dll (win-x64); libnotcurses-core.so, + libnotcurses-core.so.3 and libnotcurses-core.so.3.0.17, and + libnotcurses-ffi.so, libnotcurses-ffi.so.3 and libnotcurses-ffi.so.3.0.17 + (linux-x64); libnotcurses-core.dylib, libnotcurses-core.3.dylib and + libnotcurses-core.3.0.17.dylib, and libnotcurses-ffi.dylib, + libnotcurses-ffi.3.dylib and libnotcurses-ffi.3.0.17.dylib (osx-arm64) -- + each versioned name shipped as a copy rather than a symlink; 14 native + files in all + + Both libraries are build outputs of one upstream project under one license, so the + text below is reproduced once and covers both. + + Reproduced below in full, exactly as upstream wrote it: first upstream's own + copyright file, which names the holders and states how upstream applies the license + to notcurses, and then the license itself. + +Copyright 2019-2026 Nick Black +Copyright 2019-2021 Marek Habersack +Copyright 2020-2021 José Luis Cruz +Copyright 2020-2021 igo95862 +Copyright 2021 Łukasz Drukała + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +============================================================================== +ncurses +============================================================================== + + Name ncurses + Version 6.6, snapshot 20260905 + Upstream https://github.com/ThomasDickey/ncurses-snapshots (mirror of + https://invisible-island.net/ncurses/) + SPDX X11 (ncurses's MIT-style license) + Shipped as libncursesw6.dll (win-x64); libncursesw.so, libncursesw.so.6 and + libncursesw.so.6.6 (linux-x64); libncursesw.dylib and + libncursesw.6.dylib (osx-arm64); each versioned name is shipped as + a copy rather than a symlink + + Reproduced below in full, exactly as upstream wrote it. + +Copyright 2018-2025,2026 Thomas E. Dickey +Copyright 1998-2017,2018 Free Software Foundation, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, distribute with modifications, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name(s) of the above copyright +holders shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization. + +-- vile:txtmode fc=72 +-- $Id: COPYING,v 1.15 2026/01/04 00:58:57 tom Exp $ + + +============================================================================== +libunistring +============================================================================== + + Name libunistring + Version 1.4 + Upstream https://www.gnu.org/software/libunistring/ + SPDX LGPL-3.0-or-later OR GPL-2.0-or-later (distributed here under + LGPL-3.0-or-later) + Shipped as libunistring-5.dll (win-x64); libunistring.so, libunistring.so.5 + and libunistring.so.5.2.1 (linux-x64); + libunistring.dylib and libunistring.5.dylib (osx-arm64); each + versioned name is shipped as a copy rather than a symlink + + Upstream's README states the dual license as follows: + +The libunistring library and its header files are dual-licensed under +"the GNU LGPLv3+ or the GNU GPLv2+". This means, you can use it under either + - the terms of the GNU Lesser General Public License (LGPL) version 3 or + (at your option) any later version, or + - the terms of the GNU General Public License (GPL) version 2 or + (at your option) any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + +You find the GNU LGPL version 3 in the file COPYING.LIB. This license is +based on the GNU GPL version 3, see file COPYING. + +You can find the GNU GPL version 2 at +. + +Note: This dual license makes it possible for the libunistring library +to be used by packages under GPLv2 or GPLv2+ licenses, in particular. See +the table in . + + This package distributes libunistring under LGPL-3.0-or-later. The LGPL + incorporates GPL-3.0 by reference, so both license documents are given below, + first COPYING.LIB and then COPYING. + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + + +============================================================================== +winpthreads (mingw-w64) +============================================================================== + + Name winpthreads (mingw-w64) + Version as packaged by MSYS2 (mingw-w64-ucrt-x86_64-libwinpthread) on the + build host; the DLL carries no version resource + Upstream https://www.mingw-w64.org + SPDX MIT AND BSD-3-Clause + Shipped as libwinpthread-1.dll (win-x64 only) + +Copyright (c) 2011 mingw-w64 project + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +/* + * Parts of this library are derived by: + * + * Posix Threads library for Microsoft Windows + * + * Use at own risk, there is no implied warranty to this code. + * It uses undocumented features of Microsoft Windows that can change + * at any time in the future. + * + * (C) 2010 Lockless Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Lockless Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AN + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +============================================================================== +notcurses -- a second license, over a file this package does not build +============================================================================== + + Upstream's copyright file carries an MIT grant after the text above, over a single + file, in these words: + + The contents of src/fetch/ncart.c are extracted from Neofetch, + copyright 2015-2025 Dylan Araps under the MIT License: + + That file is compiled only into a command-line tool. This package builds the two + notcurses libraries with upstream's executables switched off, and the tool is not in + the package -- there are no executables in it at all. + + The libraries were then read directly rather than the build being taken at its word. + Six distinct strings from that file -- the names it holds for AOSC_OS_Retro, + Antergos, Apricity, ArchStrike, ARCHlabs and ArcoLinux -- were searched for in all + six shipped native libraries, on all three platforms, and none was found. As a + control in the same search, a string from a file that does ship, "Already defined + escape", was found in each of the three core libraries and, correctly, in none of the + three ffi libraries, which are built from different sources. The MIT text is not + reproduced here on those two grounds: upstream's own statement of what the grant + covers, and that measurement. diff --git a/Brutal.NotCurses/NcDirectHandle.cs b/Brutal.NotCurses/NcDirectHandle.cs new file mode 100644 index 0000000..5984d59 --- /dev/null +++ b/Brutal.NotCurses/NcDirectHandle.cs @@ -0,0 +1,45 @@ +using Brutal.Strings; + +namespace Brutal.NotCursesApi; + +/// +/// Hand-written ergonomics for the notcurses direct-mode handle. Most instance methods are +/// auto-generated by Brutal.NotCurses.Generate (see Generated/Wrappers.gen.cs); +/// only the things the generator can't infer (static factory, IDisposable, convenience overloads) live here. +/// +/// +/// Direct mode doesn't take over the terminal. It lets you write colored/styled output inline. +/// Init once at the start, write what you need, then . +/// +public readonly unsafe partial struct NcDirectHandle : IDisposable +{ + /// Initializes notcurses in direct mode against stdout. Throws on init failure. + /// The terminfo entry to use; default (default) reads $TERM. + /// Bitmask of flags. + public static NcDirectHandle Init(RefString8 termtype = default, NcDirectOption flags = default) + { + var d = NotCurses.PInvoke.ncdirect_core_init(termtype, default, flags); + if (d.IsNull()) + throw new InvalidOperationException("ncdirect_core_init failed."); + return d; + } + + /// string overload of ; encodes via . + public static NcDirectHandle Init(string? termtype, NcDirectOption flags = default) + { + if (termtype is null) + return Init(default(RefString8), flags); + using var buf = new ScratchBuffer(termtype, stackalloc byte[256]); + return Init(buf.Bytes, flags); + } + + /// Convenience overload: write a UTF-8 string with default terminal colors (channels = 0). + public void PutStr(string text) + { + using var buf = new ScratchBuffer(text, stackalloc byte[256]); + PutStr(0, buf.Bytes); + } + + /// Tears down direct mode and restores any modified terminal state. Calls . + public void Dispose() => Stop(); +} diff --git a/Brutal.NotCurses/NcResultException.cs b/Brutal.NotCurses/NcResultException.cs new file mode 100644 index 0000000..e75b2ca --- /dev/null +++ b/Brutal.NotCurses/NcResultException.cs @@ -0,0 +1,17 @@ +namespace Brutal.NotCursesApi; + +/// +/// Thrown by generated wrappers when a notcurses C function returns a failure result. +/// +public class NcResultException : Exception +{ + public int Result { get; } + public string FunctionName { get; } + + public NcResultException(string functionName, int result) + : base($"{functionName} failed with result {result}.") + { + FunctionName = functionName; + Result = result; + } +} diff --git a/Brutal.NotCurses/NcVisualHandle.cs b/Brutal.NotCurses/NcVisualHandle.cs new file mode 100644 index 0000000..58c176c --- /dev/null +++ b/Brutal.NotCurses/NcVisualHandle.cs @@ -0,0 +1,37 @@ +using Brutal.Pointers; + +namespace Brutal.NotCursesApi; + +/// +/// Hand-written ergonomics for the notcurses visual handle. Most instance methods (incl. +/// ) are auto-generated in Generated/Wrappers.gen.cs; this file adds +/// the static factory for raw RGBA pixel data and the contract. +/// +public readonly unsafe partial struct NcVisualHandle : IDisposable +{ + /// + /// Creates a visual from a flat row-major RGBA8888 pixel buffer. The buffer is copied internally, + /// so the caller doesn't need to keep it alive. + /// + /// Pixel data, × × 4 bytes. + /// Image height in pixels. + /// Image width in pixels. + public static NcVisualHandle FromRgba(ReadOnlySpan rgba, int rows, int cols) + { + if (rgba.Length < rows * cols * 4) + throw new ArgumentException( + $"RGBA buffer is {rgba.Length} bytes but {rows * cols * 4} were expected.", + nameof(rgba) + ); + fixed (byte* p = rgba) + { + var v = NotCurses.PInvoke.ncvisual_from_rgba(new Ptr(p), rows, cols * 4, cols); + if (v.IsNull()) + throw new InvalidOperationException("ncvisual_from_rgba failed."); + return v; + } + } + + /// Releases the visual and any plane it owns. Calls . + public void Dispose() => Destroy(); +} diff --git a/Brutal.NotCurses/NotCurses.cs b/Brutal.NotCurses/NotCurses.cs new file mode 100644 index 0000000..f953363 --- /dev/null +++ b/Brutal.NotCurses/NotCurses.cs @@ -0,0 +1,14 @@ +namespace Brutal.NotCursesApi; + +/// +/// Managed entry point for the notcurses API. The generated P/Invoke surface lives in the +/// nested PInvoke class (see Generated/NotCurses.gen.cs); hand-written convenience +/// wrappers go here. +/// +public static partial class NotCurses +{ + private const string Dll = "notcurses-core"; + + /// The running notcurses library version, e.g. "3.0.17". + public static string Version => PInvoke.notcurses_version(); +} diff --git a/Brutal.NotCurses/NotCursesHandle.cs b/Brutal.NotCurses/NotCursesHandle.cs new file mode 100644 index 0000000..480b534 --- /dev/null +++ b/Brutal.NotCurses/NotCursesHandle.cs @@ -0,0 +1,36 @@ +using Brutal.Pointers; + +namespace Brutal.NotCursesApi; + +/// +/// Hand-written ergonomics for the notcurses fullscreen-mode handle. Most methods on this handle +/// are auto-generated by Brutal.NotCurses.Generate (see Generated/Wrappers.gen.cs); +/// only the things the generator can't infer (static factories, the IDisposable contract) live here. +/// +public readonly unsafe partial struct NotCursesHandle : IDisposable +{ + /// + /// Initializes notcurses in fullscreen mode, writing to stdout. Throws if the terminal + /// is incompatible. Dispose (or call ) to restore the terminal. + /// + public static NotCursesHandle Init(NotCursesOptions options = default) + { + var nc = NotCurses.PInvoke.notcurses_core_init(new Ptr(&options), default); + if (nc.IsNull()) + throw new InvalidOperationException( + "notcurses_core_init failed (terminal incompatible or already in fullscreen mode)." + ); + return nc; + } + + /// Restores the terminal and tears down notcurses state. Calls . + public void Dispose() => Stop(); + + /// + /// Blits to a fresh child plane and returns that plane. Auto-generation + /// skipped this one because its C name (ncvisual_blit) doesn't carry the notcurses_ + /// owner prefix even though it takes a notcurses handle first. + /// + public NcPlaneHandle Blit(NcVisualHandle visual, NcVisualOptions options = default) => + NotCurses.PInvoke.ncvisual_blit(this, visual, new Ptr(&options)); +} diff --git a/Brutal.NotCurses/ScratchBuffer.cs b/Brutal.NotCurses/ScratchBuffer.cs new file mode 100644 index 0000000..1f789be --- /dev/null +++ b/Brutal.NotCurses/ScratchBuffer.cs @@ -0,0 +1,53 @@ +using System.Buffers; +using System.Text; +using Brutal.Strings; + +namespace Brutal.NotCursesApi; + +/// +/// UTF-8 encoded scratch buffer for marshalling C# strings across the cgo +/// boundary. Stack-allocated for short strings, pool-rented for long ones. +/// excludes the trailing NUL, which lives at Bytes.Length in the underlying storage. +/// +internal ref struct ScratchBuffer : IDisposable +{ + public readonly byte[]? Allocation; + public Span Bytes; + public int BytesWritten; + + public ScratchBuffer(string text, Span stackAlloc) + { + // HOT PATH: Try to encode directly into the stack allocation, assuming it will work the first time + if (Encoding.UTF8.TryGetBytes(text, stackAlloc, out BytesWritten)) + { + // Handle the edge case where the stack allocation is exactly the right size, but does not have enough + // room for the null terminator. + if (BytesWritten == stackAlloc.Length) + { + Bytes = Allocation = ArrayPool.Shared.Rent(BytesWritten + 1); + stackAlloc.CopyTo(Bytes); + } + else + { + Bytes = stackAlloc; + } + } + else + { + // Fallback to pool allocation if encoding fails + var maxRequired = Utf8.GetMaxByteCount(text.Length) + 1; + Bytes = Allocation = ArrayPool.Shared.Rent(maxRequired); + BytesWritten = Utf8.GetBytes(text, Bytes); + } + + // Ensure the buffer is always null-terminated and sliced to the length of the string excluding the terminator. + Bytes[BytesWritten] = 0; + Bytes = Bytes[..BytesWritten]; + } + + public void Dispose() + { + if (Allocation != null) + ArrayPool.Shared.Return(Allocation); + } +} diff --git a/Brutal.NotCurses/TimeSpec.cs b/Brutal.NotCurses/TimeSpec.cs new file mode 100644 index 0000000..6262043 --- /dev/null +++ b/Brutal.NotCurses/TimeSpec.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Brutal.NotCursesApi; + +/// +/// Blittable mirror of POSIX struct timespec. notcurses uses it for input timeouts +/// (, , fade durations). +/// +/// +/// The layout (two s, 16 bytes total) matches Linux/macOS exactly: there +/// time_t and long tv_nsec are both 8 bytes. On Windows-MinGW tv_nsec is +/// 4 bytes natively followed by 4 bytes of struct padding; input values whose nanoseconds fit +/// in 32 bits (true for every valid nanosecond) marshal correctly because the low 32 bits land +/// in the right slot. notcurses uses const struct timespec* exclusively (input-only), +/// so the high 32 bits of are ignored by the native side. +/// +[StructLayout(LayoutKind.Sequential)] +public struct TimeSpec +{ + /// Seconds (time_t). + public long Sec; + + /// Nanoseconds (long tv_nsec; only the low 32 bits are read on Windows-MinGW). + public long Nsec; +} diff --git a/Brutal.Numerics/Color/Color.Preset.cs b/Brutal.Numerics/Color/Color.Preset.cs new file mode 100644 index 0000000..707f3f4 --- /dev/null +++ b/Brutal.Numerics/Color/Color.Preset.cs @@ -0,0 +1,104 @@ +namespace Brutal.Numerics; + +/// +/// Manages colour globals, and some utilities +/// +public static partial class Color +{ + /// + /// Struct storing a default colour value in a variety of formats + /// + [StructLayout(LayoutKind.Explicit)] + public readonly struct Preset + { + /// + /// Construct a preset from a float4 colour + /// + /// color + public Preset(float4 color) + { + AsFloat4 = color; + + AsUShort4 = ushort4.Pack(AsFloat4, Pack.Float.Normalize); + AsByte4 = byte4.Pack(AsFloat4, Pack.Float.Normalize); + } + + [FieldOffset(0)] + public readonly float4 AsFloat4; + + [FieldOffset(0)] + public readonly float3 AsFloat3; + + [FieldOffset(16)] + public readonly ushort4 AsUShort4; + + [FieldOffset(16)] + public readonly ushort3 AsUShort3; + + [FieldOffset(24)] + public readonly byte4 AsByte4; + + [FieldOffset(24)] + public readonly byte3 AsByte3; + + public static implicit operator byte3(in Preset preset) + { + return preset.AsByte3; + } + + public static implicit operator byte4(in Preset preset) + { + return preset.AsByte4; + } + + public static implicit operator ushort3(in Preset preset) + { + return preset.AsUShort3; + } + + public static implicit operator ushort4(in Preset preset) + { + return preset.AsUShort4; + } + + public static implicit operator float3(in Preset preset) + { + return preset.AsFloat3; + } + + public static implicit operator float4(in Preset preset) + { + return preset.AsFloat4; + } + + public static implicit operator Preset(in float4 vector) + { + return new Preset(vector); + } + + public static implicit operator Preset(in float3 vector) + { + return new Preset(new float4(vector, 1)); + } + + public static implicit operator Preset(in byte3 vector) + { + return new byte4(vector, byte.MaxValue); + } + + public static implicit operator Preset(in byte4 vector) + { + return new Preset(float4.Unpack(vector, Unpack.Float.Normalize)); + } + + public static implicit operator Preset(in ushort3 vector) + { + return new ushort4(vector, ushort.MaxValue); + } + + public static implicit operator Preset(in ushort4 vector) + { + return new Preset(float4.Unpack(vector, Unpack.Float.Normalize)); + } + } +} diff --git a/Brutal.Numerics/Color/Color.cs b/Brutal.Numerics/Color/Color.cs new file mode 100644 index 0000000..7981e78 --- /dev/null +++ b/Brutal.Numerics/Color/Color.cs @@ -0,0 +1,20 @@ +namespace Brutal.Numerics; + +/// +/// Manages colour globals, and some utilities +/// +public static partial class Color +{ + public static readonly Preset Black = byte3.Grayscale(0); + public static readonly Preset White = byte3.Grayscale(0xFF); + public static readonly Preset Gray = float3.Grayscale(0.5f); + public static readonly Preset Clear = byte4.HexColor(0x000000000); + + public static readonly Preset Red = byte3.HexColor(0xFF0000); + public static readonly Preset Green = byte3.HexColor(0x00FF00); + public static readonly Preset Blue = byte3.HexColor(0x0000FF); + + public static readonly Preset Cyan = byte3.HexColor(0x00FFFF); + public static readonly Preset Magenta = byte3.HexColor(0xFF00FF); + public static readonly Preset Yellow = byte3.HexColor(0xFFFF00); +} diff --git a/Brutal.Numerics/GlobalUsings.cs b/Brutal.Numerics/GlobalUsings.cs new file mode 100644 index 0000000..71089be --- /dev/null +++ b/Brutal.Numerics/GlobalUsings.cs @@ -0,0 +1,9 @@ +global using System.Diagnostics; +global using System.Diagnostics.CodeAnalysis; +global using System.Globalization; +global using System.Numerics; +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using System.Runtime.Intrinsics; +global using System.Text.Unicode; +global using System.Xml.Serialization; diff --git a/Brutal.Numerics/Matrix/IMatrix.cs b/Brutal.Numerics/Matrix/IMatrix.cs new file mode 100644 index 0000000..1e15920 --- /dev/null +++ b/Brutal.Numerics/Matrix/IMatrix.cs @@ -0,0 +1,318 @@ +namespace Brutal.Numerics; + +/// Defines a generic matrix type. +/// The type that implements the interface. +/// The component type. +public interface IMatrix : IEquatable, IFormattable + where TSelf : IMatrix +{ + /// Gets the stride of one component in bytes. + static abstract int ComponentSize { get; } + + /// Gets the number of rows. + static abstract int RowCount { get; } + + /// Gets the number of columns. + static abstract int ColumnCount { get; } + + /// Gets or sets the element at the specified row and column. + /// The row of the element to get or set. + /// The column of the element to get or set. + /// The element at , . + /// + /// was less than zero or greater than the number of + /// rows. + /// + /// + /// was less than zero or greater than the number + /// of columns. + /// + T this[int row, int column] { get; set; } + + /// Gets the identity matrix. + static abstract TSelf Identity { get; } + + /// Returns true if this matrix is the identity matrix. + bool IsIdentity { get; } + + /// Construct a matrix of this type from a span + static abstract TSelf Create(ReadOnlySpan span); + + /// Cast this value to a span + Span AsSpan(); + + /// A read-only view over the elements, safe in the readonly contexts where would view a defensive copy. + ReadOnlySpan AsReadOnlySpan(); +} + +/// Everything a 3x2 (2D affine) floating-point matrix can do. +/// Multiplying by a yields a . +public interface IFloatingMatrix3x2 + : IMatrix, + IMultiplyOperators + where TSelf : IFloatingMatrix3x2 +{ + /// Static-method twin of the matrix * vector2 operator (expands to 3 components). + static abstract TVector3 Multiply(TSelf matrix, TVector2 vector); + + /// + TVector2 Translation { get; } + + /// + TComponent GetDeterminant(); + + /// + static abstract bool Invert(TSelf matrix, out TSelf result); + + /// + static abstract TSelf CreateRotation(TComponent radians); + + /// + static abstract TSelf CreateSkew(TComponent radiansX, TComponent radiansY); + + /// + static abstract TSelf CreateSkew(TComponent radiansX, TComponent radiansY, TVector2 centerPoint); +} + +/// Everything a 4x4 floating-point matrix can do. +/// The operators and factories are declared inline for the same CS0695 reason as the vector bundles. +/// CreateReflection/CreateShadow are absent: they take a plane, and planes have no interface yet. +public interface IFloatingMatrix4x4 : IMatrix + where TSelf : IFloatingMatrix4x4 +{ + /// + TVector3 Translation { get; } + + /// + TComponent GetDeterminant(); + + /// + static abstract TSelf operator +(TSelf left, TSelf right); + + /// + static abstract TSelf operator -(TSelf left, TSelf right); + + /// + static abstract TSelf operator -(TSelf value); + + /// + static abstract TSelf operator *(TSelf left, TSelf right); + + /// + static abstract TSelf operator *(TSelf left, TComponent right); + + /// Multiplies a matrix by a column vector: each result component is the dot of a row with the vector. + /// The W-row translation is not applied; transform points with vector-times-matrix, which is the row-vector product. + static abstract TVector4 operator *(TSelf matrix, TVector4 vector); + + /// + static abstract TVector4 Multiply(TSelf matrix, TVector4 vector); + + /// + static abstract TSelf Lerp(TSelf a, TSelf b, TComponent amount); + + /// + static abstract TSelf Transpose(TSelf matrix); + + /// + static abstract TSelf Transform(TSelf value, TQuaternion rotation); + + /// + static abstract bool Invert(TSelf matrix, out TSelf result); + + /// + static abstract bool Decompose( + TSelf matrix, + out TVector3 scale, + out TQuaternion rotation, + out TVector3 translation + ); + + /// + static abstract TSelf CreateBillboard( + TVector3 objectPosition, + TVector3 cameraPosition, + TVector3 cameraUpVector, + TVector3 cameraForwardVector + ); + + /// + static abstract TSelf CreateConstrainedBillboard( + TVector3 objectPosition, + TVector3 cameraPosition, + TVector3 rotateAxis, + TVector3 cameraForwardVector, + TVector3 objectForwardVector + ); + + /// + static abstract TSelf CreateFromAxisAngle(TVector3 axis, TComponent angle); + + /// + static abstract TSelf CreateFromQuaternion(TQuaternion quaternion); + + /// + static abstract TSelf CreateFromYawPitchRoll(TComponent yaw, TComponent pitch, TComponent roll); + + /// + static abstract TSelf CreateLookAt(TVector3 cameraPosition, TVector3 cameraTarget, TVector3 cameraUpVector); + + /// + static abstract TSelf CreateLookAtLeftHanded( + TVector3 cameraPosition, + TVector3 cameraTarget, + TVector3 cameraUpVector + ); + + /// + static abstract TSelf CreateLookTo(TVector3 cameraPosition, TVector3 cameraDirection, TVector3 cameraUpVector); + + /// + static abstract TSelf CreateLookToLeftHanded( + TVector3 cameraPosition, + TVector3 cameraDirection, + TVector3 cameraUpVector + ); + + /// + static abstract TSelf CreateOrthographic( + TComponent width, + TComponent height, + TComponent zNearPlane, + TComponent zFarPlane + ); + + /// + static abstract TSelf CreateOrthographicOffCenter( + TComponent left, + TComponent right, + TComponent bottom, + TComponent top, + TComponent zNearPlane, + TComponent zFarPlane + ); + + /// + static abstract TSelf CreateOrthographicOffCenterLeftHanded( + TComponent left, + TComponent right, + TComponent bottom, + TComponent top, + TComponent zNearPlane, + TComponent zFarPlane + ); + + /// + static abstract TSelf CreatePerspective( + TComponent width, + TComponent height, + TComponent nearPlaneDistance, + TComponent farPlaneDistance + ); + + /// + static abstract TSelf CreatePerspectiveLeftHanded( + TComponent width, + TComponent height, + TComponent nearPlaneDistance, + TComponent farPlaneDistance + ); + + /// + static abstract TSelf CreatePerspectiveFieldOfView( + TComponent fieldOfView, + TComponent aspectRatio, + TComponent nearPlaneDistance, + TComponent farPlaneDistance + ); + + /// + static abstract TSelf CreatePerspectiveFieldOfViewLeftHanded( + TComponent fieldOfView, + TComponent aspectRatio, + TComponent nearPlaneDistance, + TComponent farPlaneDistance + ); + + /// + static abstract TSelf CreatePerspectiveOffCenter( + TComponent left, + TComponent right, + TComponent bottom, + TComponent top, + TComponent nearPlaneDistance, + TComponent farPlaneDistance + ); + + /// + static abstract TSelf CreatePerspectiveOffCenterLeftHanded( + TComponent left, + TComponent right, + TComponent bottom, + TComponent top, + TComponent nearPlaneDistance, + TComponent farPlaneDistance + ); + + /// + static abstract TSelf CreateRotationX(TComponent radians); + + /// + static abstract TSelf CreateRotationX(TComponent radians, TVector3 centerPoint); + + /// + static abstract TSelf CreateRotationY(TComponent radians); + + /// + static abstract TSelf CreateRotationY(TComponent radians, TVector3 centerPoint); + + /// + static abstract TSelf CreateRotationZ(TComponent radians); + + /// + static abstract TSelf CreateRotationZ(TComponent radians, TVector3 centerPoint); + + /// + static abstract TSelf CreateScale(TComponent xScale, TComponent yScale, TComponent zScale); + + /// + static abstract TSelf CreateScale(TComponent xScale, TComponent yScale, TComponent zScale, TVector3 centerPoint); + + /// + static abstract TSelf CreateScale(TVector3 scales); + + /// + static abstract TSelf CreateScale(TComponent scale); + + /// + static abstract TSelf CreateScale(TComponent scale, TVector3 centerPoint); + + /// + static abstract TSelf CreateTranslation(TComponent xPosition, TComponent yPosition, TComponent zPosition); + + /// + static abstract TSelf CreateTranslation(TVector3 position); + + /// + static abstract TSelf CreateViewport( + TComponent x, + TComponent y, + TComponent width, + TComponent height, + TComponent minDepth, + TComponent maxDepth + ); + + /// + static abstract TSelf CreateViewportLeftHanded( + TComponent x, + TComponent y, + TComponent width, + TComponent height, + TComponent minDepth, + TComponent maxDepth + ); + + /// + static abstract TSelf CreateWorld(TVector3 position, TVector3 forward, TVector3 up); +} diff --git a/Brutal.Numerics/Matrix/Unsupported.double.cs b/Brutal.Numerics/Matrix/Unsupported.double.cs new file mode 100644 index 0000000..5a75423 --- /dev/null +++ b/Brutal.Numerics/Matrix/Unsupported.double.cs @@ -0,0 +1,60 @@ +// ReSharper disable InconsistentNaming + +namespace Brutal.Numerics; + +// These types are not well-supported in Brutal, yet. +// They are provided for completeness, but they may not have full functionality. +// FEEL FREE TO IMPLEMENT THEM IF YOU NEED THEM + +public struct double2x2(double2 x, double2 y) +{ + public static readonly double2x2 Identity = new(new(1, 0), new(0, 1)); + + public double2 X = x; + public double2 Y = y; +} + +public struct double3x3(double3 x, double3 y, double3 z) +{ + public static readonly double3x3 Identity = new(new(1, 0, 0), new(0, 1, 0), new(0, 0, 1)); + + public double3 X = x; + public double3 Y = y; + public double3 Z = z; +} + +public struct double2x3(double2 x, double2 y, double2 z) +{ + public double2 X = x; + public double2 Y = y; + public double2 Z = z; +} + +public struct double2x4(double4 x, double4 y) +{ + public double4 X = x; + public double4 Y = y; +} + +public struct double4x2(double2 x, double2 y, double2 z, double2 w) +{ + public double2 X = x; + public double2 Y = y; + public double2 Z = z; + public double2 W = w; +} + +public struct double3x4(double4 x, double4 y, double4 z) +{ + public double4 X = x; + public double4 Y = y; + public double4 Z = z; +} + +public struct double4x3(double3 x, double3 y, double3 z, double3 w) +{ + public double3 X = x; + public double3 Y = y; + public double3 Z = z; + public double3 W = w; +} diff --git a/Brutal.Numerics/Matrix/Unsupported.float.cs b/Brutal.Numerics/Matrix/Unsupported.float.cs new file mode 100644 index 0000000..2c75461 --- /dev/null +++ b/Brutal.Numerics/Matrix/Unsupported.float.cs @@ -0,0 +1,60 @@ +// ReSharper disable InconsistentNaming + +namespace Brutal.Numerics; + +// These types are not well-supported in Brutal, yet. +// They are provided for completeness, but they may not have full functionality. +// FEEL FREE TO IMPLEMENT THEM IF YOU NEED THEM + +public struct float2x2(float2 x, float2 y) +{ + public static readonly float2x2 Identity = new(new(1, 0), new(0, 1)); + + public float2 X = x; + public float2 Y = y; +} + +public struct float3x3(float3 x, float3 y, float3 z) +{ + public static readonly float3x3 Identity = new(new(1, 0, 0), new(0, 1, 0), new(0, 0, 1)); + + public float3 X = x; + public float3 Y = y; + public float3 Z = z; +} + +public struct float2x3(float2 x, float2 y, float2 z) +{ + public float2 X = x; + public float2 Y = y; + public float2 Z = z; +} + +public struct float2x4(float4 x, float4 y) +{ + public float4 X = x; + public float4 Y = y; +} + +public struct float4x2(float2 x, float2 y, float2 z, float2 w) +{ + public float2 X = x; + public float2 Y = y; + public float2 Z = z; + public float2 W = w; +} + +public struct float3x4(float4 x, float4 y, float4 z) +{ + public float4 X = x; + public float4 Y = y; + public float4 Z = z; +} + +public struct float4x3(float3 x, float3 y, float3 z, float3 w) +{ + public float3 X = x; + public float3 Y = y; + public float3 Z = z; + public float3 W = w; +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.access.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.access.gen.cs new file mode 100644 index 0000000..4cc3b51 --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.access.gen.cs @@ -0,0 +1,47 @@ +// - edit Matrix.access.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + /// + public double this[int row, int column] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), row)[column]; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + Unsafe.Add(ref X, row)[column] = value; + } + } + + public readonly void Deconstruct(out double2 x, out double2 y, out double2 z) + { + x = X; + y = Y; + z = Z; + } + + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 6); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 6); + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.equality.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.equality.gen.cs new file mode 100644 index 0000000..e9d5836 --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.equality.gen.cs @@ -0,0 +1,31 @@ +// - edit Matrix.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly bool Equals([NotNullWhen(true)] object? obj) + { + return obj is double3x2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(double3x2 other) + { + // This function needs to account for floating-point equality around NaN + // and so must behave equivalently to the underlying double/double.Equals + + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.format.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.format.gen.cs new file mode 100644 index 0000000..e3ecc7e --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.format.gen.cs @@ -0,0 +1,19 @@ +// - edit Matrix.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + return $"{{ X:{X.ToString(format, formatProvider)}, Y:{Y.ToString(format, formatProvider)}, Z:{Z.ToString(format, formatProvider)} }}"; + } + + /// + public readonly override string ToString() + { + return $"{{ X:{X}, Y:{Y}, Z:{Z} }}"; + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.gen.cs new file mode 100644 index 0000000..e7bb90c --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.gen.cs @@ -0,0 +1,93 @@ +// - edit Matrix.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3x2 matrix with double components. +/// +[DebuggerTypeProxy(typeof(DebugView))] +public partial struct double3x2 : IMatrix + , IFloatingMatrix3x2 +{ + internal class DebugView(double3x2 m) + { + public double2 X => m.X; + public double2 Y => m.Y; + public double2 Z => m.Z; + } + + /// The first row of the matrix. + [XmlIgnore] + public double2 X; + + /// The second row of the matrix. + [XmlIgnore] + public double2 Y; + + /// The third row of the matrix. + [XmlIgnore] + public double2 Z; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2( + double m11, + double m12, + double m21, + double m22, + double m31, + double m32 + ) + { + X = new double2(m11, m12); + Y = new double2(m21, m22); + Z = new double2(m31, m32); + } + + /// Creates a matrix from the leading 6 elements of a span, row by row. + /// The elements to read; must contain at least 6, and any beyond that are ignored. + /// holds fewer than 6 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(ReadOnlySpan span) + { + if (span.Length < 6) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 6."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + static double3x2 IMatrix.Create(ReadOnlySpan span) => new(span); + + /// + public static double3x2 Identity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + double3x2 result; + + result.X = double2.UnitX; + result.Y = double2.UnitY; + result.Z = double2.Zero; + + return result; + } + } + + /// + public static int ComponentSize => sizeof(double); + + /// + public static int RowCount => 3; + + /// + public static int ColumnCount => 2; + + /// + public readonly bool IsIdentity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => X == double2.UnitX && Y == double2.UnitY && Z == double2.Zero; + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.numerics.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.numerics.gen.cs new file mode 100644 index 0000000..b302718 --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.numerics.gen.cs @@ -0,0 +1,381 @@ +// - edit Matrix.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + private const double RotationEpsilon = 0.001 * double.Pi / 180; // 0.1% of a degree + + /// + [XmlIgnore] + public double2 Translation + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => Z; + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => Z = value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateRotation(double radians) + { + radians = double.Ieee754Remainder(radians, double.Pi * 2); + + double c; + double s; + + if (radians > -RotationEpsilon && radians < RotationEpsilon) + { + // Exact case for zero rotation. + c = 1; + s = 0; + } + else if (radians > double.Pi / 2 - RotationEpsilon && radians < double.Pi / 2 + RotationEpsilon) + { + // Exact case for 90 degree rotation. + c = 0; + s = 1; + } + else if (radians < -double.Pi + RotationEpsilon || radians > double.Pi - RotationEpsilon) + { + // Exact case for 180 degree rotation. + c = -1; + s = 0; + } + else if (radians > -double.Pi / 2 - RotationEpsilon && radians < -double.Pi / 2 + RotationEpsilon) + { + // Exact case for 270 degree rotation. + c = 0; + s = -1; + } + else + { + // Arbitrary rotation. + (s, c) = double.SinCos(radians); + } + + // [ c s ] + // [ -s c ] + // [ 0 0 ] + + double3x2 result; + + result.X = new double2(c, s); + result.Y = new double2(-s, c); + result.Z = double2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateRotation(double radians, double2 centerPoint) + { + radians = double.Ieee754Remainder(radians, double.Pi * 2); + + double c, + s; + + if (radians > -RotationEpsilon && radians < RotationEpsilon) + { + // Exact case for zero rotation. + c = 1; + s = 0; + } + else if (radians > double.Pi / 2 - RotationEpsilon && radians < double.Pi / 2 + RotationEpsilon) + { + // Exact case for 90 degree rotation. + c = 0; + s = 1; + } + else if (radians < -double.Pi + RotationEpsilon || radians > double.Pi - RotationEpsilon) + { + // Exact case for 180 degree rotation. + c = -1; + s = 0; + } + else if (radians > -double.Pi / 2 - RotationEpsilon && radians < -double.Pi / 2 + RotationEpsilon) + { + // Exact case for 270 degree rotation. + c = 0; + s = -1; + } + else + { + // Arbitrary rotation. + (s, c) = double.SinCos(radians); + } + + var x = centerPoint.X * (1 - c) + centerPoint.Y * s; + var y = centerPoint.Y * (1 - c) - centerPoint.X * s; + + // [ c s ] + // [ -s c ] + // [ x y ] + + double3x2 result; + + result.X = new double2(c, s); + result.Y = new double2(-s, c); + result.Z = new double2(x, y); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateScale(double2 scales) + { + double3x2 result; + + result.X = new double2(scales.X, 0); + result.Y = new double2(0, scales.Y); + result.Z = double2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateScale(double scaleX, double scaleY) + { + double3x2 result; + + result.X = new double2(scaleX, 0); + result.Y = new double2(0, scaleY); + result.Z = double2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateScale(double scaleX, double scaleY, double2 centerPoint) + { + double3x2 result; + + result.X = new double2(scaleX, 0); + result.Y = new double2(0, scaleY); + result.Z = centerPoint * (double2.One - new double2(scaleX, scaleY)); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateScale(double2 scales, double2 centerPoint) + { + double3x2 result; + + result.X = new double2(scales.X, 0); + result.Y = new double2(0, scales.Y); + result.Z = centerPoint * (double2.One - scales); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateScale(double scale) + { + double3x2 result; + + result.X = new double2(scale, 0); + result.Y = new double2(0, scale); + result.Z = double2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateScale(double scale, double2 centerPoint) + { + double3x2 result; + + result.X = new double2(scale, 0); + result.Y = new double2(0, scale); + result.Z = centerPoint * (double2.One - new double2(scale)); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateSkew(double radiansX, double radiansY) + { + double3x2 result; + + result.X = new double2(1, double.Tan(radiansY)); + result.Y = new double2(double.Tan(radiansX), 1); + result.Z = double2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateSkew(double radiansX, double radiansY, double2 centerPoint) + { + var xTan = double.Tan(radiansX); + var yTan = double.Tan(radiansY); + + var tx = -centerPoint.Y * xTan; + var ty = -centerPoint.X * yTan; + + double3x2 result; + + result.X = new double2(1, yTan); + result.Y = new double2(xTan, 1); + result.Z = new double2(tx, ty); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateTranslation(double2 position) + { + double3x2 result; + + result.X = double2.UnitX; + result.Y = double2.UnitY; + result.Z = position; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 CreateTranslation(double positionX, double positionY) + { + double3x2 result; + + result.X = double2.UnitX; + result.Y = double2.UnitY; + result.Z = new double2(positionX, positionY); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool Invert(double3x2 matrix, out double3x2 result) + { + var det = matrix.X.X * matrix.Y.Y - matrix.Y.X * matrix.X.Y; + + if (double.Abs(det) < double.Epsilon) + { + var vNaN = new double2(double.NaN); + + result.X = vNaN; + result.Y = vNaN; + result.Z = vNaN; + + return false; + } + + var invDet = 1.0 / det; + + result.X = new double2(+matrix.Y.Y * invDet, -matrix.X.Y * invDet); + result.Y = new double2(-matrix.Y.X * invDet, +matrix.X.X * invDet); + result.Z = new double2( + (matrix.Y.X * matrix.Z.Y - matrix.Z.X * matrix.Y.Y) * invDet, + (matrix.Z.X * matrix.X.Y - matrix.X.X * matrix.Z.Y) * invDet + ); + + return true; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 Lerp(double3x2 a, double3x2 b, double amount) + { + double3x2 result; + + result.X = double2.Lerp(a.X, b.X, amount); + result.Y = double2.Lerp(a.Y, b.Y, amount); + result.Z = double2.Lerp(a.Z, b.Z, amount); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double GetDeterminant() + { + // There isn't actually any such thing as a determinant for a non-square matrix, + // but this 3x2 type is really just an optimization of a 3x3 where we happen to + // know the rightmost column is always (0, 0, 1). So we expand to 3x3 format: + // + // [ X.X, X.Y, 0 ] + // [ Y.X, Y.Y, 0 ] + // [ Z.X, Z.Y, 1 ] + // + // Sum the diagonal products: + // (X.X * Y.Y * 1) + (X.Y * 0 * Z.X) + (0 * Y.X * Z.Y) + // + // Subtract the opposite diagonal products: + // (Z.X * Y.Y * 0) + (Z.Y * 0 * X.X) + (1 * Y.X * X.Y) + // + // Collapse out the constants and oh look, this is just a 2x2 determinant! + + return X.X * Y.Y - Y.X * X.Y; + } + + /// Performs matrix multiplication to multiply a matrix by a vector to compute the product. + /// The matrix. + /// The vector. + /// The product vector. + /// + /// The method defines the operation + /// of the multiplication operator for objects. + /// + public static double3 Multiply(double3x2 matrix, double2 vector) + { + double3 result; + + result.X = double2.Dot(matrix.X, vector); + result.Y = double2.Dot(matrix.Y, vector); + result.Z = double2.Dot(matrix.Z, vector); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 Add(double3x2 a, double3x2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 Multiply(double3x2 a, double3x2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 Multiply(double3x2 a, double b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 Negate(double3x2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 Subtract(double3x2 a, double3x2 b) + { + return a - b; + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.operators.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.operators.gen.cs new file mode 100644 index 0000000..28d972c --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.operators.gen.cs @@ -0,0 +1,102 @@ +// - edit Matrix.operators.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator +(double3x2 left, double3x2 right) + { + double3x2 result; + + result.X = left.X + right.X; + result.Y = left.Y + right.Y; + result.Z = left.Z + right.Z; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(double3x2 left, double3x2 right) + { + return left.X == right.X && left.Y == right.Y && left.Z == right.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(double3x2 left, double3x2 right) + { + return left.X != right.X || left.Y != right.Y || left.Z != right.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator *(double3x2 left, double3x2 right) + { + double3x2 result; + + result.X = new double2( + left.X.X * right.X.X + left.X.Y * right.Y.X, + left.X.X * right.X.Y + left.X.Y * right.Y.Y + ); + result.Y = new double2( + left.Y.X * right.X.X + left.Y.Y * right.Y.X, + left.Y.X * right.X.Y + left.Y.Y * right.Y.Y + ); + result.Z = new double2( + left.Z.X * right.X.X + left.Z.Y * right.Y.X + right.Z.X, + left.Z.X * right.X.Y + left.Z.Y * right.Y.Y + right.Z.Y + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator *(double3x2 matrix, double2 vector) + { + return Multiply(matrix, vector); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator *(double3x2 left, double right) + { + double3x2 result; + + result.X = left.X * right; + result.Y = left.Y * right; + result.Z = left.Z * right; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator -(double3x2 left, double3x2 right) + { + double3x2 result; + + result.X = left.X - right.X; + result.Y = left.Y - right.Y; + result.Z = left.Z - right.Z; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator -(double3x2 value) + { + double3x2 result; + + result.X = -value.X; + result.Y = -value.Y; + result.Z = -value.Z; + + return result; + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.pack.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.pack.gen.cs new file mode 100644 index 0000000..c4a1273 --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.pack.gen.cs @@ -0,0 +1,32 @@ +// - edit Matrix.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + public static double3x2 Unpack(in float3x2 vector, Func elementConverter) + { + MatrixPack.Pack(vector, out double3x2 result, elementConverter); + return result; + } + + public static void Unpack( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + MatrixPack.Pack(source, destination, elementConverter); + } + + public static double3x2 Unpack(in float3x2 vector) + { + return Unpack(vector, f => f); + } + + public static void Unpack(in ReadOnlySpan source, Span destination) + { + Unpack(source, destination, f => f); + } +} diff --git a/Brutal.Numerics/Matrix/double3x2/double3x2.swizzle.gen.cs b/Brutal.Numerics/Matrix/double3x2/double3x2.swizzle.gen.cs new file mode 100644 index 0000000..2ee6438 --- /dev/null +++ b/Brutal.Numerics/Matrix/double3x2/double3x2.swizzle.gen.cs @@ -0,0 +1,55 @@ +// - edit Matrix.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3x2 +{ + /// + [XmlAttribute] + public double M11 + { + readonly get => X.X; + set => X.X = value; + } + + /// + [XmlAttribute] + public double M12 + { + readonly get => X.Y; + set => X.Y = value; + } + + /// + [XmlAttribute] + public double M21 + { + readonly get => Y.X; + set => Y.X = value; + } + + /// + [XmlAttribute] + public double M22 + { + readonly get => Y.Y; + set => Y.Y = value; + } + + /// + [XmlAttribute] + public double M31 + { + readonly get => Z.X; + set => Z.X = value; + } + + /// + [XmlAttribute] + public double M32 + { + readonly get => Z.Y; + set => Z.Y = value; + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.access.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.access.gen.cs new file mode 100644 index 0000000..0dfded4 --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.access.gen.cs @@ -0,0 +1,48 @@ +// - edit Matrix.access.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + /// + public double this[int row, int column] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), row)[column]; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + Unsafe.Add(ref X, row)[column] = value; + } + } + + public readonly void Deconstruct(out double4 x, out double4 y, out double4 z, out double4 w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 16); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 16); + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.equality.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.equality.gen.cs new file mode 100644 index 0000000..eacb853 --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.equality.gen.cs @@ -0,0 +1,31 @@ +// - edit Matrix.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly bool Equals([NotNullWhen(true)] object? obj) + { + return obj is double4x4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(double4x4 other) + { + // This function needs to account for floating-point equality around NaN + // and so must behave equivalently to the underlying double/double.Equals + + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.format.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.format.gen.cs new file mode 100644 index 0000000..1cf329f --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.format.gen.cs @@ -0,0 +1,19 @@ +// - edit Matrix.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + return $"{{ X:{X.ToString(format, formatProvider)}, Y:{Y.ToString(format, formatProvider)}, Z:{Z.ToString(format, formatProvider)}, W:{W.ToString(format, formatProvider)} }}"; + } + + /// + public readonly override string ToString() + { + return $"{{ X:{X}, Y:{Y}, Z:{Z}, W:{W} }}"; + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.gen.cs new file mode 100644 index 0000000..83f9ee2 --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.gen.cs @@ -0,0 +1,189 @@ +// - edit Matrix.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4x4 matrix with double components. +/// +[DebuggerTypeProxy(typeof(DebugView))] +public partial struct double4x4 : IMatrix + , IFloatingMatrix4x4 +{ + internal class DebugView(double4x4 m) + { + public double4 X => m.X; + public double4 Y => m.Y; + public double4 Z => m.Z; + public double4 W => m.W; + } + + /// The first row of the matrix. + [XmlIgnore] + public double4 X; + + /// The second row of the matrix. + [XmlIgnore] + public double4 Y; + + /// The third row of the matrix. + [XmlIgnore] + public double4 Z; + + /// The fourth row of the matrix. + [XmlIgnore] + public double4 W; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4( + double m11, + double m12, + double m13, + double m14, + double m21, + double m22, + double m23, + double m24, + double m31, + double m32, + double m33, + double m34, + double m41, + double m42, + double m43, + double m44 + ) + { + X = new double4(m11, m12, m13, m14); + Y = new double4(m21, m22, m23, m24); + Z = new double4(m31, m32, m33, m34); + W = new double4(m41, m42, m43, m44); + } + + /// Creates a matrix from the leading 16 elements of a span, row by row. + /// The elements to read; must contain at least 16, and any beyond that are ignored. + /// holds fewer than 16 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(ReadOnlySpan span) + { + if (span.Length < 16) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 16."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(double3x2 value) + { + X = new double4(value.X, 0, 0); + Y = new double4(value.Y, 0, 0); + Z = double4.UnitZ; + W = new double4(value.Z, 0, 1); + } + + static double4x4 IMatrix.Create(ReadOnlySpan span) => new(span); + + /// + public static double4x4 Identity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + double4x4 result; + + result.X = double4.UnitX; + result.Y = double4.UnitY; + result.Z = double4.UnitZ; + result.W = double4.UnitW; + + return result; + } + } + + /// + public static int ComponentSize => sizeof(double); + + /// + public static int RowCount => 4; + + /// + public static int ColumnCount => 4; + + /// + public readonly bool IsIdentity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => X == double4.UnitX && Y == double4.UnitY && Z == double4.UnitZ && W == double4.UnitW; + } + + /// The kernel view: the same 64/128 bytes as the row fields, seen as SIMD vectors. + private readonly struct Rows(Vector256 x, Vector256 y, Vector256 z, Vector256 w) + { + public readonly Vector256 X = x, Y = y, Z = z, W = w; + + /// One row through this whole matrix: one multiply, three fused-estimate accumulations. + // fused-estimate is permitted to fuse: results may differ by an ulp between FMA and non-FMA hardware + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly Vector256 Transform(Vector256 row) + { + var result = X * row.GetElement(0); + result = Vector256.MultiplyAddEstimate(Y, Vector256.Create(row.GetElement(1)), result); + result = Vector256.MultiplyAddEstimate(Z, Vector256.Create(row.GetElement(2)), result); + result = Vector256.MultiplyAddEstimate(W, Vector256.Create(row.GetElement(3)), result); + return result; + } + } + + [UnscopedRef] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private readonly ref readonly Rows AsRows() + { + return ref Unsafe.As(ref Unsafe.AsRef(in this)); + } + + + /// The half-matrix view: rows 01 and 23 as one vector each - the width where a two-source lane mix is a single permute. + private readonly struct Halves(Vector512 lo, Vector512 hi) + { + public readonly Vector512 Lo = lo, Hi = hi; + } + + /// Transpose in registers. net10 has no two-source shuffle (Zips are net11), so this rides WIDTH instead: at double the row width each transposed half is one permute per source half plus a blend. + // one index constant serves both sources - the don't-care lanes land under the blend mask; + // every arm is a JIT constant, so exactly one survives per machine + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static double4x4 TransposeKernel(in double4x4 matrix) + { + if (Vector512.IsHardwareAccelerated) + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ref readonly Halves AsHalves(in double4x4 value) + { + return ref Unsafe.As(ref Unsafe.AsRef(in value)); + } + + ref readonly var halves = ref AsHalves(in matrix); + + var idxLo = Vector512.Create(0, 4, 0, 4, 1, 5, 1, 5); + var idxHi = Vector512.Create(2, 6, 2, 6, 3, 7, 3, 7); + var takeHi = Vector512.Create(0, 0, -1, -1, 0, 0, -1, -1).AsDouble(); + + var transposed = new Halves( + Vector512.ConditionalSelect(takeHi, Vector512.ShuffleNative(halves.Hi, idxLo), Vector512.ShuffleNative(halves.Lo, idxLo)), + Vector512.ConditionalSelect(takeHi, Vector512.ShuffleNative(halves.Hi, idxHi), Vector512.ShuffleNative(halves.Lo, idxHi))); + return Unsafe.BitCast(transposed); + } + + // no accelerated width to widen into (arm64 tops out at V128): plain field shuffle + double4x4 result; + + result.X = new double4(matrix.X.X, matrix.Y.X, matrix.Z.X, matrix.W.X); + result.Y = new double4(matrix.X.Y, matrix.Y.Y, matrix.Z.Y, matrix.W.Y); + result.Z = new double4(matrix.X.Z, matrix.Y.Z, matrix.Z.Z, matrix.W.Z); + result.W = new double4(matrix.X.W, matrix.Y.W, matrix.Z.W, matrix.W.W); + + return result; + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs new file mode 100644 index 0000000..9d7e6e2 --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs @@ -0,0 +1,1667 @@ +// - edit Matrix.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + private const double BillboardEpsilon = 1e-4; + private const double BillboardMinAngle = 1.0 - 0.1 * (double.Pi / 180.0); // 0.1 degrees + private const double DecomposeEpsilon = 0.0001; + + /// + [XmlIgnore] + public double3 Translation + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W.X, W.Y, W.Z); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => W = new double4(value, W.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateBillboard( + double3 objectPosition, + double3 cameraPosition, + double3 cameraUpVector, + double3 cameraForwardVector + ) + { + var axisZ = objectPosition - cameraPosition; + var norm = axisZ.LengthSquared(); + + if (norm < BillboardEpsilon) + axisZ = -cameraForwardVector; + else + axisZ = double3.Multiply(axisZ, 1.0 / double.Sqrt(norm)); + + var axisX = double3.Normalize(double3.Cross(cameraUpVector, axisZ)); + var axisY = double3.Cross(axisZ, axisX); + + double4x4 result; + + result.X = new double4(axisX, 0); + result.Y = new double4(axisY, 0); + result.Z = new double4(axisZ, 0); + result.W = new double4(objectPosition, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateConstrainedBillboard( + double3 objectPosition, + double3 cameraPosition, + double3 rotateAxis, + double3 cameraForwardVector, + double3 objectForwardVector + ) + { + // Treat the case when object and camera positions are too close. + var faceDir = objectPosition - cameraPosition; + var norm = faceDir.LengthSquared(); + + if (norm < BillboardEpsilon) + faceDir = -cameraForwardVector; + else + faceDir = double3.Multiply(faceDir, 1.0 / double.Sqrt(norm)); + + var axisY = rotateAxis; + + // Treat the case when angle between faceDir and rotateAxis is too close to 0. + var dot = double3.Dot(axisY, faceDir); + + if (double.Abs(dot) > BillboardMinAngle) + { + faceDir = objectForwardVector; + + // Make sure passed values are useful for compute. + dot = double3.Dot(axisY, faceDir); + + if (double.Abs(dot) > BillboardMinAngle) + faceDir = double.Abs(axisY.Z) > BillboardMinAngle ? double3.UnitX : new double3(0, 0, -1); + } + + var axisX = double3.Normalize(double3.Cross(axisY, faceDir)); + var axisZ = double3.Normalize(double3.Cross(axisX, axisY)); + + double4x4 result; + + result.X = new double4(axisX, 0); + result.Y = new double4(axisY, 0); + result.Z = new double4(axisZ, 0); + result.W = new double4(objectPosition, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateFromAxisAngle(double3 axis, double angle) + { + var (value, w) = double.SinCos(angle * 0.5); + return CreateFromQuaternion(new doubleQuat(axis.X * value, axis.Y * value, axis.Z * value, w)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateFromQuaternion(doubleQuat quaternion) + { + var xx = quaternion.X * quaternion.X; + var yy = quaternion.Y * quaternion.Y; + var zz = quaternion.Z * quaternion.Z; + + var xy = quaternion.X * quaternion.Y; + var wz = quaternion.Z * quaternion.W; + var xz = quaternion.Z * quaternion.X; + var wy = quaternion.Y * quaternion.W; + var yz = quaternion.Y * quaternion.Z; + var wx = quaternion.X * quaternion.W; + + double4x4 result; + + result.X = new double4(1.0 - 2.0 * (yy + zz), 2.0 * (xy + wz), 2.0 * (xz - wy), 0); + result.Y = new double4(2.0 * (xy - wz), 1.0 - 2.0 * (zz + xx), 2.0 * (yz + wx), 0); + result.Z = new double4(2.0 * (xz + wy), 2.0 * (yz - wx), 1.0 - 2.0 * (yy + xx), 0); + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateFromYawPitchRoll(double yaw, double pitch, double roll) + { + var q = doubleQuat.CreateFromYawPitchRoll(yaw, pitch, roll); + return CreateFromQuaternion(q); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateLookTo(double3 cameraPosition, double3 cameraDirection, double3 cameraUpVector) + { + var axisZ = double3.Normalize(-cameraDirection); + var axisX = double3.Normalize(double3.Cross(cameraUpVector, axisZ)); + var axisY = double3.Cross(axisZ, axisX); + var negativeCameraPosition = -cameraPosition; + + double4x4 result; + + result.X = new double4(axisX.X, axisY.X, axisZ.X, 0); + result.Y = new double4(axisX.Y, axisY.Y, axisZ.Y, 0); + result.Z = new double4(axisX.Z, axisY.Z, axisZ.Z, 0); + result.W = new double4( + double3.Dot(axisX, negativeCameraPosition), + double3.Dot(axisY, negativeCameraPosition), + double3.Dot(axisZ, negativeCameraPosition), + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateLookToLeftHanded( + double3 cameraPosition, + double3 cameraDirection, + double3 cameraUpVector + ) + { + var axisZ = double3.Normalize(cameraDirection); + var axisX = double3.Normalize(double3.Cross(cameraUpVector, axisZ)); + var axisY = double3.Cross(axisZ, axisX); + var negativeCameraPosition = -cameraPosition; + + double4x4 result; + + result.X = new double4(axisX.X, axisY.X, axisZ.X, 0); + result.Y = new double4(axisX.Y, axisY.Y, axisZ.Y, 0); + result.Z = new double4(axisX.Z, axisY.Z, axisZ.Z, 0); + result.W = new double4( + double3.Dot(axisX, negativeCameraPosition), + double3.Dot(axisY, negativeCameraPosition), + double3.Dot(axisZ, negativeCameraPosition), + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateOrthographic(double width, double height, double zNearPlane, double zFarPlane) + { + var range = 1.0 / (zNearPlane - zFarPlane); + + double4x4 result; + + result.X = new double4(2.0 / width, 0, 0, 0); + result.Y = new double4(0, 2.0 / height, 0, 0); + result.Z = new double4(0, 0, range, 0); + result.W = new double4(0, 0, range * zNearPlane, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateOrthographicLeftHanded( + double width, + double height, + double zNearPlane, + double zFarPlane + ) + { + var range = 1.0 / (zFarPlane - zNearPlane); + + double4x4 result; + + result.X = new double4(2.0 / width, 0, 0, 0); + result.Y = new double4(0, 2.0 / height, 0, 0); + result.Z = new double4(0, 0, range, 0); + result.W = new double4(0, 0, -range * zNearPlane, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateOrthographicOffCenter( + double left, + double right, + double bottom, + double top, + double zNearPlane, + double zFarPlane + ) + { + var reciprocalWidth = 1.0 / (right - left); + var reciprocalHeight = 1.0 / (top - bottom); + var range = 1.0 / (zNearPlane - zFarPlane); + + double4x4 result; + + result.X = new double4(reciprocalWidth + reciprocalWidth, 0, 0, 0); + result.Y = new double4(0, reciprocalHeight + reciprocalHeight, 0, 0); + result.Z = new double4(0, 0, range, 0); + result.W = new double4( + -(left + right) * reciprocalWidth, + -(top + bottom) * reciprocalHeight, + range * zNearPlane, + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateOrthographicOffCenterLeftHanded( + double left, + double right, + double bottom, + double top, + double zNearPlane, + double zFarPlane + ) + { + var reciprocalWidth = 1.0 / (right - left); + var reciprocalHeight = 1.0 / (top - bottom); + var range = 1.0 / (zFarPlane - zNearPlane); + + double4x4 result; + + result.X = new double4(reciprocalWidth + reciprocalWidth, 0, 0, 0); + result.Y = new double4(0, reciprocalHeight + reciprocalHeight, 0, 0); + result.Z = new double4(0, 0, range, 0); + result.W = new double4( + -(left + right) * reciprocalWidth, + -(top + bottom) * reciprocalHeight, + -range * zNearPlane, + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreatePerspective( + double width, + double height, + double nearPlaneDistance, + double farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var range = double.IsPositiveInfinity(farPlaneDistance) + ? -1.0 + : farPlaneDistance / (nearPlaneDistance - farPlaneDistance); + + double4x4 result; + + result.X = new double4(dblNearPlaneDistance / width, 0, 0, 0); + result.Y = new double4(0, dblNearPlaneDistance / height, 0, 0); + result.Z = new double4(0, 0, range, -1.0); + result.W = new double4(0, 0, range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreatePerspectiveLeftHanded( + double width, + double height, + double nearPlaneDistance, + double farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var range = double.IsPositiveInfinity(farPlaneDistance) + ? 1.0 + : farPlaneDistance / (farPlaneDistance - nearPlaneDistance); + + double4x4 result; + + result.X = new double4(dblNearPlaneDistance / width, 0, 0, 0); + result.Y = new double4(0, dblNearPlaneDistance / height, 0, 0); + result.Z = new double4(0, 0, range, 1.0); + result.W = new double4(0, 0, -range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreatePerspectiveFieldOfView( + double fieldOfView, + double aspectRatio, + double nearPlaneDistance, + double farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(fieldOfView, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(fieldOfView, double.Pi); + + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var height = 1.0 / double.Tan(fieldOfView * 0.5); + var width = height / aspectRatio; + var range = double.IsPositiveInfinity(farPlaneDistance) + ? -1.0 + : farPlaneDistance / (nearPlaneDistance - farPlaneDistance); + + double4x4 result; + + result.X = new double4(width, 0, 0, 0); + result.Y = new double4(0, height, 0, 0); + result.Z = new double4(0, 0, range, -1.0); + result.W = new double4(0, 0, range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreatePerspectiveFieldOfViewLeftHanded( + double fieldOfView, + double aspectRatio, + double nearPlaneDistance, + double farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(fieldOfView, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(fieldOfView, double.Pi); + + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var height = 1.0 / double.Tan(fieldOfView * 0.5); + var width = height / aspectRatio; + var range = double.IsPositiveInfinity(farPlaneDistance) + ? 1.0 + : farPlaneDistance / (farPlaneDistance - nearPlaneDistance); + + double4x4 result; + + result.X = new double4(width, 0, 0, 0); + result.Y = new double4(0, height, 0, 0); + result.Z = new double4(0, 0, range, 1.0); + result.W = new double4(0, 0, -range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreatePerspectiveOffCenter( + double left, + double right, + double bottom, + double top, + double nearPlaneDistance, + double farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var reciprocalWidth = 1.0 / (right - left); + var reciprocalHeight = 1.0 / (top - bottom); + var range = double.IsPositiveInfinity(farPlaneDistance) + ? -1.0 + : farPlaneDistance / (nearPlaneDistance - farPlaneDistance); + + double4x4 result; + + result.X = new double4(dblNearPlaneDistance * reciprocalWidth, 0, 0, 0); + result.Y = new double4(0, dblNearPlaneDistance * reciprocalHeight, 0, 0); + result.Z = new double4((left + right) * reciprocalWidth, (top + bottom) * reciprocalHeight, range, -1.0); + result.W = new double4(0, 0, range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreatePerspectiveOffCenterLeftHanded( + double left, + double right, + double bottom, + double top, + double nearPlaneDistance, + double farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var reciprocalWidth = 1.0 / (right - left); + var reciprocalHeight = 1.0 / (top - bottom); + var range = double.IsPositiveInfinity(farPlaneDistance) + ? 1.0 + : farPlaneDistance / (farPlaneDistance - nearPlaneDistance); + + double4x4 result; + + result.X = new double4(dblNearPlaneDistance * reciprocalWidth, 0, 0, 0); + result.Y = new double4(0, dblNearPlaneDistance * reciprocalHeight, 0, 0); + result.Z = new double4(-(left + right) * reciprocalWidth, -(top + bottom) * reciprocalHeight, range, 1.0); + result.W = new double4(0, 0, -range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateReflection(doublePlane value) + { + var plane = doublePlane.Normalize(value); + var vector = plane.Normal * -2.0; + + double4x4 result; + + result.X = new double4(vector * plane.Normal.X, 0) + double4.UnitX; + result.Y = new double4(vector * plane.Normal.Y, 0) + double4.UnitY; + result.Z = new double4(vector * plane.Normal.Z, 0) + double4.UnitZ; + result.W = new double4(vector * plane.D, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateRotationX(double radians) + { + var (s, c) = double.SinCos(radians); + + // [ 1 0 0 0 ] + // [ 0 c s 0 ] + // [ 0 -s c 0 ] + // [ 0 0 0 1 ] + + double4x4 result; + + result.X = double4.UnitX; + result.Y = new double4(0, c, s, 0); + result.Z = new double4(0, -s, c, 0); + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateRotationX(double radians, double3 centerPoint) + { + var (s, c) = double.SinCos(radians); + + var y = centerPoint.Y * (1 - c) + centerPoint.Z * s; + var z = centerPoint.Z * (1 - c) - centerPoint.Y * s; + + // [ 1 0 0 0 ] + // [ 0 c s 0 ] + // [ 0 -s c 0 ] + // [ 0 y z 1 ] + + double4x4 result; + + result.X = double4.UnitX; + result.Y = new double4(0, c, s, 0); + result.Z = new double4(0, -s, c, 0); + result.W = new double4(0, y, z, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateRotationY(double radians) + { + var (s, c) = double.SinCos(radians); + + // [ c 0 -s 0 ] + // [ 0 1 0 0 ] + // [ s 0 c 0 ] + // [ 0 0 0 1 ] + + double4x4 result; + + result.X = new double4(c, 0, -s, 0); + result.Y = double4.UnitY; + result.Z = new double4(s, 0, c, 0); + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateRotationY(double radians, double3 centerPoint) + { + var (s, c) = double.SinCos(radians); + + var x = centerPoint.X * (1 - c) - centerPoint.Z * s; + var z = centerPoint.Z * (1 - c) + centerPoint.X * s; + + // [ c 0 -s 0 ] + // [ 0 1 0 0 ] + // [ s 0 c 0 ] + // [ x 0 z 1 ] + + double4x4 result; + + result.X = new double4(c, 0, -s, 0); + result.Y = double4.UnitY; + result.Z = new double4(s, 0, c, 0); + result.W = new double4(x, 0, z, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateRotationZ(double radians) + { + var (s, c) = double.SinCos(radians); + + // [ c s 0 0 ] + // [ -s c 0 0 ] + // [ 0 0 1 0 ] + // [ 0 0 0 1 ] + + double4x4 result; + + result.X = new double4(c, s, 0, 0); + result.Y = new double4(-s, c, 0, 0); + result.Z = double4.UnitZ; + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateRotationZ(double radians, double3 centerPoint) + { + var (s, c) = double.SinCos(radians); + + var x = centerPoint.X * (1 - c) + centerPoint.Y * s; + var y = centerPoint.Y * (1 - c) - centerPoint.X * s; + + // [ c s 0 0 ] + // [ -s c 0 0 ] + // [ 0 0 1 0 ] + // [ x y 0 1 ] + + double4x4 result; + + result.X = new double4(c, s, 0, 0); + result.Y = new double4(-s, c, 0, 0); + result.Z = double4.UnitZ; + result.W = new double4(x, y, 0, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateScale(double scaleX, double scaleY, double scaleZ) + { + double4x4 result; + + result.X = new double4(scaleX, 0, 0, 0); + result.Y = new double4(0, scaleY, 0, 0); + result.Z = new double4(0, 0, scaleZ, 0); + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateScale(double scaleX, double scaleY, double scaleZ, double3 centerPoint) + { + double4x4 result; + + result.X = new double4(scaleX, 0, 0, 0); + result.Y = new double4(0, scaleY, 0, 0); + result.Z = new double4(0, 0, scaleZ, 0); + result.W = new double4(centerPoint * (double3.One - new double3(scaleX, scaleY, scaleZ)), 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateScale(double3 scales) + { + double4x4 result; + + result.X = new double4(scales.X, 0, 0, 0); + result.Y = new double4(0, scales.Y, 0, 0); + result.Z = new double4(0, 0, scales.Z, 0); + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateScale(double3 scales, double3 centerPoint) + { + double4x4 result; + + result.X = new double4(scales.X, 0, 0, 0); + result.Y = new double4(0, scales.Y, 0, 0); + result.Z = new double4(0, 0, scales.Z, 0); + result.W = new double4(centerPoint * (double3.One - scales), 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateScale(double scale) + { + double4x4 result; + + result.X = new double4(scale, 0, 0, 0); + result.Y = new double4(0, scale, 0, 0); + result.Z = new double4(0, 0, scale, 0); + result.W = double4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateScale(double scale, double3 centerPoint) + { + double4x4 result; + + result.X = new double4(scale, 0, 0, 0); + result.Y = new double4(0, scale, 0, 0); + result.Z = new double4(0, 0, scale, 0); + result.W = new double4(centerPoint * (double3.One - new double3(scale)), 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateShadow(double3 lightDirection, doublePlane plane) + { + var p = doublePlane.Normalize(plane); + var dot = double3.Dot(lightDirection, p.Normal); + + var normal = -p.Normal; + + double4x4 result; + + result.X = new double4(lightDirection * normal.X, 0) + new double4(dot, 0, 0, 0); + result.Y = new double4(lightDirection * normal.Y, 0) + new double4(0, dot, 0, 0); + result.Z = new double4(lightDirection * normal.Z, 0) + new double4(0, 0, dot, 0); + result.W = new double4(lightDirection * -p.D, dot); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateTranslation(double3 position) + { + double4x4 result; + + result.X = double4.UnitX; + result.Y = double4.UnitY; + result.Z = double4.UnitZ; + result.W = new double4(position, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateTranslation(double positionX, double positionY, double positionZ) + { + double4x4 result; + + result.X = double4.UnitX; + result.Y = double4.UnitY; + result.Z = double4.UnitZ; + result.W = new double4(positionX, positionY, positionZ, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateViewport( + double x, + double y, + double width, + double height, + double minDepth, + double maxDepth + ) + { + double4x4 result; + + // 4x SIMD fields to get a lot better codegen + result.W = new double4(width, height, 0, 0); + result.W *= new double4(0.5, 0.5, 0, 0); + + result.X = new double4(result.W.X, 0, 0, 0); + result.Y = new double4(0, -result.W.Y, 0, 0); + result.Z = new double4(0, 0, minDepth - maxDepth, 0); + result.W += new double4(x, y, minDepth, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateViewportLeftHanded( + double x, + double y, + double width, + double height, + double minDepth, + double maxDepth + ) + { + double4x4 result; + + // 4x SIMD fields to get a lot better codegen + result.W = new double4(width, height, 0, 0); + result.W *= new double4(0.5, 0.5, 0, 0); + + result.X = new double4(result.W.X, 0, 0, 0); + result.Y = new double4(0, -result.W.Y, 0, 0); + result.Z = new double4(0, 0, maxDepth - minDepth, 0); + result.W += new double4(x, y, minDepth, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 CreateWorld(double3 position, double3 forward, double3 up) + { + var axisZ = double3.Normalize(-forward); + var axisX = double3.Normalize(double3.Cross(up, axisZ)); + var axisY = double3.Cross(axisZ, axisX); + + double4x4 result; + + result.X = new double4(axisX, 0); + result.Y = new double4(axisY, 0); + result.Z = new double4(axisZ, 0); + result.W = new double4(position, 1); + + return result; + } + + /// + // deliberately not AggressiveInlining: ~200 expanded call sites + public static bool Decompose( + double4x4 matrix, + out double3 scale, + out doubleQuat rotation, + out double3 translation + ) + { + // well-formed scales stay in registers; anything degenerate falls through to the scalar body + if (Vector256.IsHardwareAccelerated) + { + ref readonly var rows = ref matrix.AsRows(); + var basisMask = Vector256.Create(-1, -1, -1, 0).AsDouble(); + var x = rows.X & basisMask; + var y = rows.Y & basisMask; + var z = rows.Z & basisMask; + + var scaleX = double.Sqrt(Vector256.Dot(x, x)); + var scaleY = double.Sqrt(Vector256.Dot(y, y)); + var scaleZ = double.Sqrt(Vector256.Dot(z, z)); + + if (scaleX >= DecomposeEpsilon && scaleY >= DecomposeEpsilon && scaleZ >= DecomposeEpsilon) + { + x /= Vector256.Create(scaleX); + y /= Vector256.Create(scaleY); + z /= Vector256.Create(scaleZ); + + var det = Vector256.Dot(x, Cross3(y, z)); + + if (det < 0) + { + /* handedness flip on the LARGEST-scale axis, matching the scalar body's + * ranking (its `a` is the max; ties resolve to the lower index there and + * here alike): negating any single axis flips det, but which axis carries + * the sign is observable in the outputs */ + if (scaleX >= scaleY && scaleX >= scaleZ) + { + scaleX = -scaleX; + x = -x; + } + else if (scaleY >= scaleZ) + { + scaleY = -scaleY; + y = -y; + } + else + { + scaleZ = -scaleZ; + z = -z; + } + + det = -det; + } + + translation = new double3(matrix.W.X, matrix.W.Y, matrix.W.Z); + scale = new double3(scaleX, scaleY, scaleZ); + + det -= 1; + det *= det; + + if (DecomposeEpsilon < det) + { + // Non-SRT matrix encountered + rotation = doubleQuat.Identity; + return false; + } + + var basis = new Rows(x, y, z, Vector256.Create(0.0, 0, 0, 1)); + rotation = doubleQuat.CreateFromRotationMatrix(Unsafe.BitCast(basis)); + return true; + } + } + + return DecomposeDegenerate(in matrix, out scale, out rotation, out translation); + + /* Cross product of two rows' xyz, lane 3 riding along (zero in, zero out) - the + * register-resident twin of double3.Cross. Local because the handedness + * test is its only caller. */ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static Vector256 Cross3(Vector256 a, Vector256 b) + { + var ayzx = Vector256.ShuffleNative(a, Vector256.Create(1, 2, 0, 3)); + var azxy = Vector256.ShuffleNative(a, Vector256.Create(2, 0, 1, 3)); + var byzx = Vector256.ShuffleNative(b, Vector256.Create(1, 2, 0, 3)); + var bzxy = Vector256.ShuffleNative(b, Vector256.Create(2, 0, 1, 3)); + return ayzx * bzxy - azxy * byzx; + } + } + + // out of line deliberately: its `fixed` pins the out params, which the fast path must not pay for + [MethodImpl(MethodImplOptions.NoInlining)] + private static unsafe bool DecomposeDegenerate( + in double4x4 matrix, + out double3 scale, + out doubleQuat rotation, + out double3 translation + ) + { + var result = true; + + fixed (double3* scaleBase = &scale) + { + var pfScales = (double*)scaleBase; + double det; + + VectorBasis vectorBasis; + var pVectorBasis = (double3**)&vectorBasis; + + var matTemp = Identity; + CanonicalBasis canonicalBasis = default; + var pCanonicalBasis = &canonicalBasis.Row0; + + canonicalBasis.Row0 = new double3(1.0, 0.0, 0.0); + canonicalBasis.Row1 = new double3(0.0, 1.0, 0.0); + canonicalBasis.Row2 = new double3(0.0, 0.0, 1.0); + + translation = new double3(matrix.W.X, matrix.W.Y, matrix.W.Z); + + pVectorBasis[0] = (double3*)&matTemp.X; + pVectorBasis[1] = (double3*)&matTemp.Y; + pVectorBasis[2] = (double3*)&matTemp.Z; + + *pVectorBasis[0] = new double3(matrix.X.X, matrix.X.Y, matrix.X.Z); + *pVectorBasis[1] = new double3(matrix.Y.X, matrix.Y.Y, matrix.Y.Z); + *pVectorBasis[2] = new double3(matrix.Z.X, matrix.Z.Y, matrix.Z.Z); + + scale.X = pVectorBasis[0]->Length(); + scale.Y = pVectorBasis[1]->Length(); + scale.Z = pVectorBasis[2]->Length(); + + uint a, + b, + c; + + #region Ranking + + var x = pfScales[0]; + var y = pfScales[1]; + var z = pfScales[2]; + + if (x < y) + { + if (y < z) + { + a = 2; + b = 1; + c = 0; + } + else + { + a = 1; + + if (x < z) + { + b = 2; + c = 0; + } + else + { + b = 0; + c = 2; + } + } + } + else + { + if (x < z) + { + a = 2; + b = 0; + c = 1; + } + else + { + a = 0; + + if (y < z) + { + b = 2; + c = 1; + } + else + { + b = 1; + c = 2; + } + } + } + + #endregion + + if (pfScales[a] < DecomposeEpsilon) + *pVectorBasis[a] = pCanonicalBasis[a]; + + *pVectorBasis[a] = double3.Normalize(*pVectorBasis[a]); + + if (pfScales[b] < DecomposeEpsilon) + { + uint cc; + double fAbsX, + fAbsY, + fAbsZ; + + fAbsX = double.Abs(pVectorBasis[a]->X); + fAbsY = double.Abs(pVectorBasis[a]->Y); + fAbsZ = double.Abs(pVectorBasis[a]->Z); + + #region Ranking + + if (fAbsX < fAbsY) + { + if (fAbsY < fAbsZ) + { + cc = 0; + } + else + { + if (fAbsX < fAbsZ) + cc = 0; + else + cc = 2; + } + } + else + { + if (fAbsX < fAbsZ) + { + cc = 1; + } + else + { + if (fAbsY < fAbsZ) + cc = 1; + else + cc = 2; + } + } + + #endregion + + *pVectorBasis[b] = double3.Cross(*pVectorBasis[a], *(pCanonicalBasis + cc)); + } + + *pVectorBasis[b] = double3.Normalize(*pVectorBasis[b]); + + if (pfScales[c] < DecomposeEpsilon) + *pVectorBasis[c] = double3.Cross(*pVectorBasis[a], *pVectorBasis[b]); + + *pVectorBasis[c] = double3.Normalize(*pVectorBasis[c]); + + det = matTemp.GetDeterminant(); + + // use Kramer's rule to check for handedness of coordinate system + if (det < 0.0) + { + // switch coordinate system by negating the scale and inverting the basis vector on the x-axis + pfScales[a] = -pfScales[a]; + *pVectorBasis[a] = -(*pVectorBasis[a]); + + det = -det; + } + + det -= 1.0; + det *= det; + + if (DecomposeEpsilon < det) + { + // Non-SRT matrix encountered + rotation = doubleQuat.Identity; + result = false; + } + else + { + // generate the quaternion from the matrix + rotation = doubleQuat.CreateFromRotationMatrix(matTemp); + } + } + + return result; + } + + /// + // deliberately not AggressiveInlining: ~330 expanded call sites + public static bool Invert(double4x4 matrix, out double4x4 result) + { + // This implementation is based on the DirectX Math Library XMMatrixInverse method + // https://github.com/microsoft/DirectXMath/blob/master/Inc/DirectXMathMatrix.inl + + // the BCL SseImpl respelled onto portable shuffles; fused-estimate as in the original, + // so results may differ by an ulp between FMA and non-FMA hardware + if (Vector256.IsHardwareAccelerated) + { + var transposed = TransposeKernel(in matrix); + ref readonly var t = ref transposed.AsRows(); + var row1 = t.X; + var row2 = t.Y; + var row3 = t.Z; + var row4 = t.W; + + var V00 = Vector256.ShuffleNative(row3, Vector256.Create(0, 0, 1, 1)); + var V10 = Vector256.ShuffleNative(row4, Vector256.Create(2, 3, 2, 3)); + var V01 = Vector256.ShuffleNative(row1, Vector256.Create(0, 0, 1, 1)); + var V11 = Vector256.ShuffleNative(row2, Vector256.Create(2, 3, 2, 3)); + var V02 = Vector256.Shuffle2(row3, row1, 0, 2, 0, 2); + var V12 = Vector256.Shuffle2(row4, row2, 1, 3, 1, 3); + + var D0 = V00 * V10; + var D1 = V01 * V11; + var D2 = V02 * V12; + + V00 = Vector256.ShuffleNative(row3, Vector256.Create(2, 3, 2, 3)); + V10 = Vector256.ShuffleNative(row4, Vector256.Create(0, 0, 1, 1)); + V01 = Vector256.ShuffleNative(row1, Vector256.Create(2, 3, 2, 3)); + V11 = Vector256.ShuffleNative(row2, Vector256.Create(0, 0, 1, 1)); + V02 = Vector256.Shuffle2(row3, row1, 1, 3, 1, 3); + V12 = Vector256.Shuffle2(row4, row2, 0, 2, 0, 2); + + D0 = Vector256.MultiplyAddEstimate(-V00, V10, D0); + D1 = Vector256.MultiplyAddEstimate(-V01, V11, D1); + D2 = Vector256.MultiplyAddEstimate(-V02, V12, D2); + + // V11 = D0Y,D0W,D2Y,D2Y + V11 = Vector256.Shuffle2(D0, D2, 1, 3, 1, 1); + V00 = Vector256.ShuffleNative(row2, Vector256.Create(1, 2, 0, 1)); + V10 = Vector256.Shuffle2(V11, D0, 2, 0, 3, 0); + V01 = Vector256.ShuffleNative(row1, Vector256.Create(2, 0, 1, 0)); + V11 = Vector256.Shuffle2(V11, D0, 1, 2, 1, 2); + + // V13 = D1Y,D1W,D2W,D2W + var V13 = Vector256.Shuffle2(D1, D2, 1, 3, 3, 3); + V02 = Vector256.ShuffleNative(row4, Vector256.Create(1, 2, 0, 1)); + V12 = Vector256.Shuffle2(V13, D1, 2, 0, 3, 0); + var V03 = Vector256.ShuffleNative(row3, Vector256.Create(2, 0, 1, 0)); + V13 = Vector256.Shuffle2(V13, D1, 1, 2, 1, 2); + + var C0 = V00 * V10; + var C2 = V01 * V11; + var C4 = V02 * V12; + var C6 = V03 * V13; + + // V11 = D0X,D0Y,D2X,D2X + V11 = Vector256.Shuffle2(D0, D2, 0, 1, 0, 0); + V00 = Vector256.ShuffleNative(row2, Vector256.Create(2, 3, 1, 2)); + V10 = Vector256.Shuffle2(D0, V11, 3, 0, 1, 2); + V01 = Vector256.ShuffleNative(row1, Vector256.Create(3, 2, 3, 1)); + V11 = Vector256.Shuffle2(D0, V11, 2, 1, 2, 0); + + // V13 = D1X,D1Y,D2Z,D2Z + V13 = Vector256.Shuffle2(D1, D2, 0, 1, 2, 2); + V02 = Vector256.ShuffleNative(row4, Vector256.Create(2, 3, 1, 2)); + V12 = Vector256.Shuffle2(D1, V13, 3, 0, 1, 2); + V03 = Vector256.ShuffleNative(row3, Vector256.Create(3, 2, 3, 1)); + V13 = Vector256.Shuffle2(D1, V13, 2, 1, 2, 0); + + C0 = Vector256.MultiplyAddEstimate(-V00, V10, C0); + C2 = Vector256.MultiplyAddEstimate(-V01, V11, C2); + C4 = Vector256.MultiplyAddEstimate(-V02, V12, C4); + C6 = Vector256.MultiplyAddEstimate(-V03, V13, C6); + + V00 = Vector256.ShuffleNative(row2, Vector256.Create(3, 0, 3, 0)); + + // V10 = D0Z,D0Z,D2X,D2Y + V10 = Vector256.Shuffle2(D0, D2, 2, 2, 0, 1); + V10 = Vector256.ShuffleNative(V10, Vector256.Create(0, 3, 2, 0)); + V01 = Vector256.ShuffleNative(row1, Vector256.Create(1, 3, 0, 2)); + + // V11 = D0X,D0W,D2X,D2Y + V11 = Vector256.Shuffle2(D0, D2, 0, 3, 0, 1); + V11 = Vector256.ShuffleNative(V11, Vector256.Create(3, 0, 1, 2)); + V02 = Vector256.ShuffleNative(row4, Vector256.Create(3, 0, 3, 0)); + + // V12 = D1Z,D1Z,D2Z,D2W + V12 = Vector256.Shuffle2(D1, D2, 2, 2, 2, 3); + V12 = Vector256.ShuffleNative(V12, Vector256.Create(0, 3, 2, 0)); + V03 = Vector256.ShuffleNative(row3, Vector256.Create(1, 3, 0, 2)); + + // V13 = D1X,D1W,D2Z,D2W + V13 = Vector256.Shuffle2(D1, D2, 0, 3, 2, 3); + V13 = Vector256.ShuffleNative(V13, Vector256.Create(3, 0, 1, 2)); + + V00 *= V10; + V01 *= V11; + V02 *= V12; + V03 *= V13; + + var C1 = C0 - V00; + C0 += V00; + + var C3 = C2 + V01; + C2 -= V01; + + var C5 = C4 - V02; + C4 += V02; + + var C7 = C6 + V03; + C6 -= V03; + + C0 = Vector256.Shuffle2(C0, C1, 0, 2, 1, 3); + C2 = Vector256.Shuffle2(C2, C3, 0, 2, 1, 3); + C4 = Vector256.Shuffle2(C4, C5, 0, 2, 1, 3); + C6 = Vector256.Shuffle2(C6, C7, 0, 2, 1, 3); + + C0 = Vector256.ShuffleNative(C0, Vector256.Create(0, 2, 1, 3)); + C2 = Vector256.ShuffleNative(C2, Vector256.Create(0, 2, 1, 3)); + C4 = Vector256.ShuffleNative(C4, Vector256.Create(0, 2, 1, 3)); + C6 = Vector256.ShuffleNative(C6, Vector256.Create(0, 2, 1, 3)); + + var det = Vector256.Dot(C0, row1); + + if (double.Abs(det) < double.Epsilon) + { + var vNaN = Vector256.Create(double.NaN); + + var nan = new Rows(vNaN, vNaN, vNaN, vNaN); + result = Unsafe.BitCast(nan); + + return false; + } + + var invDet = Vector256.One / det; + + var inverted = new Rows(C0 * invDet, C2 * invDet, C4 * invDet, C6 * invDet); + result = Unsafe.BitCast(inverted); + + return true; + } + + return SoftwareFallback(in matrix, out result); + + static bool SoftwareFallback(in double4x4 matrix, out double4x4 result) + { + // -1 + // If you have matrix M, inverse Matrix M can compute + // + // -1 1 + // M = --------- A + // det(M) + // + // A is adjugate (adjoint) of M, where, + // + // T + // A = C + // + // C is Cofactor matrix of M, where, + // i + j + // C = (-1) * det(M ) + // ij ij + // + // [ a b c d ] + // M = [ e f g h ] + // [ i j k l ] + // [ m n o p ] + // + // First Row + // 2 | f g h | + // C = (-1) | j k l | = + ( f ( kp - lo ) - g ( jp - ln ) + h ( jo - kn ) ) + // 11 | n o p | + // + // 3 | e g h | + // C = (-1) | i k l | = - ( e ( kp - lo ) - g ( ip - lm ) + h ( io - km ) ) + // 12 | m o p | + // + // 4 | e f h | + // C = (-1) | i j l | = + ( e ( jp - ln ) - f ( ip - lm ) + h ( in - jm ) ) + // 13 | m n p | + // + // 5 | e f g | + // C = (-1) | i j k | = - ( e ( jo - kn ) - f ( io - km ) + g ( in - jm ) ) + // 14 | m n o | + // + // Second Row + // 3 | b c d | + // C = (-1) | j k l | = - ( b ( kp - lo ) - c ( jp - ln ) + d ( jo - kn ) ) + // 21 | n o p | + // + // 4 | a c d | + // C = (-1) | i k l | = + ( a ( kp - lo ) - c ( ip - lm ) + d ( io - km ) ) + // 22 | m o p | + // + // 5 | a b d | + // C = (-1) | i j l | = - ( a ( jp - ln ) - b ( ip - lm ) + d ( in - jm ) ) + // 23 | m n p | + // + // 6 | a b c | + // C = (-1) | i j k | = + ( a ( jo - kn ) - b ( io - km ) + c ( in - jm ) ) + // 24 | m n o | + // + // Third Row + // 4 | b c d | + // C = (-1) | f g h | = + ( b ( gp - ho ) - c ( fp - hn ) + d ( fo - gn ) ) + // 31 | n o p | + // + // 5 | a c d | + // C = (-1) | e g h | = - ( a ( gp - ho ) - c ( ep - hm ) + d ( eo - gm ) ) + // 32 | m o p | + // + // 6 | a b d | + // C = (-1) | e f h | = + ( a ( fp - hn ) - b ( ep - hm ) + d ( en - fm ) ) + // 33 | m n p | + // + // 7 | a b c | + // C = (-1) | e f g | = - ( a ( fo - gn ) - b ( eo - gm ) + c ( en - fm ) ) + // 34 | m n o | + // + // Fourth Row + // 5 | b c d | + // C = (-1) | f g h | = - ( b ( gl - hk ) - c ( fl - hj ) + d ( fk - gj ) ) + // 41 | j k l | + // + // 6 | a c d | + // C = (-1) | e g h | = + ( a ( gl - hk ) - c ( el - hi ) + d ( ek - gi ) ) + // 42 | i k l | + // + // 7 | a b d | + // C = (-1) | e f h | = - ( a ( fl - hj ) - b ( el - hi ) + d ( ej - fi ) ) + // 43 | i j l | + // + // 8 | a b c | + // C = (-1) | e f g | = + ( a ( fk - gj ) - b ( ek - gi ) + c ( ej - fi ) ) + // 44 | i j k | + // + // Cost of operation + // 53 adds, 104 muls, and 1 div. + + double a = matrix.X.X, + b = matrix.X.Y, + c = matrix.X.Z, + d = matrix.X.W; + double e = matrix.Y.X, + f = matrix.Y.Y, + g = matrix.Y.Z, + h = matrix.Y.W; + double i = matrix.Z.X, + j = matrix.Z.Y, + k = matrix.Z.Z, + l = matrix.Z.W; + double m = matrix.W.X, + n = matrix.W.Y, + o = matrix.W.Z, + p = matrix.W.W; + + var kp_lo = k * p - l * o; + var jp_ln = j * p - l * n; + var jo_kn = j * o - k * n; + var ip_lm = i * p - l * m; + var io_km = i * o - k * m; + var in_jm = i * n - j * m; + + var a11 = +(f * kp_lo - g * jp_ln + h * jo_kn); + var a12 = -(e * kp_lo - g * ip_lm + h * io_km); + var a13 = +(e * jp_ln - f * ip_lm + h * in_jm); + var a14 = -(e * jo_kn - f * io_km + g * in_jm); + + var det = a * a11 + b * a12 + c * a13 + d * a14; + + if (double.Abs(det) < double.Epsilon) + { + var vNaN = new double4(double.NaN); + + result.X = vNaN; + result.Y = vNaN; + result.Z = vNaN; + result.W = vNaN; + + return false; + } + + var invDet = 1.0 / det; + + result.X.X = a11 * invDet; + result.Y.X = a12 * invDet; + result.Z.X = a13 * invDet; + result.W.X = a14 * invDet; + + result.X.Y = -(b * kp_lo - c * jp_ln + d * jo_kn) * invDet; + result.Y.Y = +(a * kp_lo - c * ip_lm + d * io_km) * invDet; + result.Z.Y = -(a * jp_ln - b * ip_lm + d * in_jm) * invDet; + result.W.Y = +(a * jo_kn - b * io_km + c * in_jm) * invDet; + + var gp_ho = g * p - h * o; + var fp_hn = f * p - h * n; + var fo_gn = f * o - g * n; + var ep_hm = e * p - h * m; + var eo_gm = e * o - g * m; + var en_fm = e * n - f * m; + + result.X.Z = +(b * gp_ho - c * fp_hn + d * fo_gn) * invDet; + result.Y.Z = -(a * gp_ho - c * ep_hm + d * eo_gm) * invDet; + result.Z.Z = +(a * fp_hn - b * ep_hm + d * en_fm) * invDet; + result.W.Z = -(a * fo_gn - b * eo_gm + c * en_fm) * invDet; + + var gl_hk = g * l - h * k; + var fl_hj = f * l - h * j; + var fk_gj = f * k - g * j; + var el_hi = e * l - h * i; + var ek_gi = e * k - g * i; + var ej_fi = e * j - f * i; + + result.X.W = -(b * gl_hk - c * fl_hj + d * fk_gj) * invDet; + result.Y.W = +(a * gl_hk - c * el_hi + d * ek_gi) * invDet; + result.Z.W = -(a * fl_hj - b * el_hi + d * ej_fi) * invDet; + result.W.W = +(a * fk_gj - b * ek_gi + c * ej_fi) * invDet; + + return true; + } + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Lerp(double4x4 a, double4x4 b, double amount) + { + double4x4 result; + + result.X = double4.Lerp(a.X, b.X, amount); + result.Y = double4.Lerp(a.Y, b.Y, amount); + result.Z = double4.Lerp(a.Z, b.Z, amount); + result.W = double4.Lerp(a.W, b.W, amount); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Transform(double4x4 value, doubleQuat rotation) + { + // Compute rotation matrix. + var x2 = rotation.X + rotation.X; + var y2 = rotation.Y + rotation.Y; + var z2 = rotation.Z + rotation.Z; + + var wx2 = rotation.W * x2; + var wy2 = rotation.W * y2; + var wz2 = rotation.W * z2; + + var xx2 = rotation.X * x2; + var xy2 = rotation.X * y2; + var xz2 = rotation.X * z2; + + var yy2 = rotation.Y * y2; + var yz2 = rotation.Y * z2; + var zz2 = rotation.Z * z2; + + var q11 = 1.0 - yy2 - zz2; + var q21 = xy2 - wz2; + var q31 = xz2 + wy2; + + var q12 = xy2 + wz2; + var q22 = 1.0 - xx2 - zz2; + var q32 = yz2 - wx2; + + var q13 = xz2 - wy2; + var q23 = yz2 + wx2; + var q33 = 1.0 - xx2 - yy2; + + double4x4 result; + + result.X = new double4( + value.X.X * q11 + value.X.Y * q21 + value.X.Z * q31, + value.X.X * q12 + value.X.Y * q22 + value.X.Z * q32, + value.X.X * q13 + value.X.Y * q23 + value.X.Z * q33, + value.X.W + ); + result.Y = new double4( + value.Y.X * q11 + value.Y.Y * q21 + value.Y.Z * q31, + value.Y.X * q12 + value.Y.Y * q22 + value.Y.Z * q32, + value.Y.X * q13 + value.Y.Y * q23 + value.Y.Z * q33, + value.Y.W + ); + result.Z = new double4( + value.Z.X * q11 + value.Z.Y * q21 + value.Z.Z * q31, + value.Z.X * q12 + value.Z.Y * q22 + value.Z.Z * q32, + value.Z.X * q13 + value.Z.Y * q23 + value.Z.Z * q33, + value.Z.W + ); + result.W = new double4( + value.W.X * q11 + value.W.Y * q21 + value.W.Z * q31, + value.W.X * q12 + value.W.Y * q22 + value.W.Z * q32, + value.W.X * q13 + value.W.Y * q23 + value.W.Z * q33, + value.W.W + ); + + return result; + } + + /// + public static double4 Transform(double4x4 matrix, double4 vector) + { + return Multiply(matrix, vector); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Transpose(double4x4 matrix) + { + return TransposeKernel(in matrix); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double GetDeterminant() + { + // | a b c d | | f g h | | e g h | | e f h | | e f g | + // | e f g h | = a | j k l | - b | i k l | + c | i j l | - d | i j k | + // | i j k l | | n o p | | m o p | | m n p | | m n o | + // | m n o p | + // + // | f g h | + // a | j k l | = a ( f ( kp - lo ) - g ( jp - ln ) + h ( jo - kn ) ) + // | n o p | + // + // | e g h | + // b | i k l | = b ( e ( kp - lo ) - g ( ip - lm ) + h ( io - km ) ) + // | m o p | + // + // | e f h | + // c | i j l | = c ( e ( jp - ln ) - f ( ip - lm ) + h ( in - jm ) ) + // | m n p | + // + // | e f g | + // d | i j k | = d ( e ( jo - kn ) - f ( io - km ) + g ( in - jm ) ) + // | m n o | + // + // Cost of operation + // 17 adds and 28 muls. + // + // add: 6 + 8 + 3 = 17 + // mul: 12 + 16 = 28 + + double a = X.X, + b = X.Y, + c = X.Z, + d = X.W; + double e = Y.X, + f = Y.Y, + g = Y.Z, + h = Y.W; + double i = Z.X, + j = Z.Y, + k = Z.Z, + l = Z.W; + double m = W.X, + n = W.Y, + o = W.Z, + p = W.W; + + var kp_lo = k * p - l * o; + var jp_ln = j * p - l * n; + var jo_kn = j * o - k * n; + var ip_lm = i * p - l * m; + var io_km = i * o - k * m; + var in_jm = i * n - j * m; + + return a * (f * kp_lo - g * jp_ln + h * jo_kn) + - b * (e * kp_lo - g * ip_lm + h * io_km) + + c * (e * jp_ln - f * ip_lm + h * in_jm) + - d * (e * jo_kn - f * io_km + g * in_jm); + } + + private struct CanonicalBasis + { + public double3 Row0; + public double3 Row1; + public double3 Row2; + } + + private unsafe struct VectorBasis + { +#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value + public double3* Element0; + public double3* Element1; + public double3* Element2; +#pragma warning restore CS0649 // Field is never assigned to, and will always have its default value + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Add(double4x4 a, double4x4 b) + { + return a + b; + } + + /// + public static double4x4 Multiply(double4x4 a, double4x4 b) + { + return a * b; + } + + /// Performs matrix multiplication to multiply a matrix by a vector to compute the product. + /// The matrix. + /// The vector. + /// The product vector. + /// + /// The method defines the operation + /// of the multiplication operator for objects. + /// + public static double4 Multiply(double4x4 matrix, double4 vector) + { + double4 result; + + result.X = double4.Dot(matrix.X, vector); + result.Y = double4.Dot(matrix.Y, vector); + result.Z = double4.Dot(matrix.Z, vector); + result.W = double4.Dot(matrix.W, vector); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Multiply(double4x4 a, double b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Negate(double4x4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 Subtract(double4x4 a, double4x4 b) + { + return a - b; + } + + /// + public static double4x4 CreateLookAt(double3 cameraPosition, double3 cameraTarget, double3 cameraUpVector) + { + var cameraDirection = cameraTarget - cameraPosition; + return CreateLookTo(cameraPosition, cameraDirection, cameraUpVector); + } + + /// + public static double4x4 CreateLookAtLeftHanded(double3 cameraPosition, double3 cameraTarget, double3 cameraUpVector) + { + var cameraDirection = cameraTarget - cameraPosition; + return CreateLookToLeftHanded(cameraPosition, cameraDirection, cameraUpVector); + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.operators.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.operators.gen.cs new file mode 100644 index 0000000..67f300a --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.operators.gen.cs @@ -0,0 +1,100 @@ +// - edit Matrix.operators.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator +(double4x4 left, double4x4 right) + { + double4x4 result; + + result.X = left.X + right.X; + result.Y = left.Y + right.Y; + result.Z = left.Z + right.Z; + result.W = left.W + right.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(double4x4 left, double4x4 right) + { + return left.X == right.X && left.Y == right.Y && left.Z == right.Z && left.W == right.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(double4x4 left, double4x4 right) + { + return left.X != right.X || left.Y != right.Y || left.Z != right.Z || left.W != right.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator *(double4x4 left, double4x4 right) + { + ref readonly var l = ref left.AsRows(); + ref readonly var r = ref right.AsRows(); + + var result = new Rows( + r.Transform(l.X), + r.Transform(l.Y), + r.Transform(l.Z), + r.Transform(l.W)); + + return Unsafe.BitCast(result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator *(double4x4 matrix, double4 vector) + { + return Multiply(matrix, vector); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator *(double4x4 left, double right) + { + double4x4 result; + + result.X = left.X * right; + result.Y = left.Y * right; + result.Z = left.Z * right; + result.W = left.W * right; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator -(double4x4 left, double4x4 right) + { + double4x4 result; + + result.X = left.X - right.X; + result.Y = left.Y - right.Y; + result.Z = left.Z - right.Z; + result.W = left.W - right.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator -(double4x4 value) + { + double4x4 result; + + result.X = -value.X; + result.Y = -value.Y; + result.Z = -value.Z; + result.W = -value.W; + + return result; + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.pack.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.pack.gen.cs new file mode 100644 index 0000000..cd063f3 --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.pack.gen.cs @@ -0,0 +1,32 @@ +// - edit Matrix.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + public static double4x4 Unpack(in float4x4 vector, Func elementConverter) + { + MatrixPack.Pack(vector, out double4x4 result, elementConverter); + return result; + } + + public static void Unpack( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + MatrixPack.Pack(source, destination, elementConverter); + } + + public static double4x4 Unpack(in float4x4 vector) + { + return Unpack(vector, f => f); + } + + public static void Unpack(in ReadOnlySpan source, Span destination) + { + Unpack(source, destination, f => f); + } +} diff --git a/Brutal.Numerics/Matrix/double4x4/double4x4.swizzle.gen.cs b/Brutal.Numerics/Matrix/double4x4/double4x4.swizzle.gen.cs new file mode 100644 index 0000000..b424a8a --- /dev/null +++ b/Brutal.Numerics/Matrix/double4x4/double4x4.swizzle.gen.cs @@ -0,0 +1,135 @@ +// - edit Matrix.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4x4 +{ + /// + [XmlAttribute] + public double M11 + { + readonly get => X.X; + set => X.X = value; + } + + /// + [XmlAttribute] + public double M12 + { + readonly get => X.Y; + set => X.Y = value; + } + + /// + [XmlAttribute] + public double M13 + { + readonly get => X.Z; + set => X.Z = value; + } + + /// + [XmlAttribute] + public double M14 + { + readonly get => X.W; + set => X.W = value; + } + + /// + [XmlAttribute] + public double M21 + { + readonly get => Y.X; + set => Y.X = value; + } + + /// + [XmlAttribute] + public double M22 + { + readonly get => Y.Y; + set => Y.Y = value; + } + + /// + [XmlAttribute] + public double M23 + { + readonly get => Y.Z; + set => Y.Z = value; + } + + /// + [XmlAttribute] + public double M24 + { + readonly get => Y.W; + set => Y.W = value; + } + + /// + [XmlAttribute] + public double M31 + { + readonly get => Z.X; + set => Z.X = value; + } + + /// + [XmlAttribute] + public double M32 + { + readonly get => Z.Y; + set => Z.Y = value; + } + + /// + [XmlAttribute] + public double M33 + { + readonly get => Z.Z; + set => Z.Z = value; + } + + /// + [XmlAttribute] + public double M34 + { + readonly get => Z.W; + set => Z.W = value; + } + + /// + [XmlAttribute] + public double M41 + { + readonly get => W.X; + set => W.X = value; + } + + /// + [XmlAttribute] + public double M42 + { + readonly get => W.Y; + set => W.Y = value; + } + + /// + [XmlAttribute] + public double M43 + { + readonly get => W.Z; + set => W.Z = value; + } + + /// + [XmlAttribute] + public double M44 + { + readonly get => W.W; + set => W.W = value; + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.access.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.access.gen.cs new file mode 100644 index 0000000..acbc4b8 --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.access.gen.cs @@ -0,0 +1,47 @@ +// - edit Matrix.access.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + /// + public float this[int row, int column] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), row)[column]; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + Unsafe.Add(ref X, row)[column] = value; + } + } + + public readonly void Deconstruct(out float2 x, out float2 y, out float2 z) + { + x = X; + y = Y; + z = Z; + } + + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 6); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 6); + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.equality.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.equality.gen.cs new file mode 100644 index 0000000..05697c4 --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.equality.gen.cs @@ -0,0 +1,31 @@ +// - edit Matrix.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly bool Equals([NotNullWhen(true)] object? obj) + { + return obj is float3x2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(float3x2 other) + { + // This function needs to account for floating-point equality around NaN + // and so must behave equivalently to the underlying float/float.Equals + + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.format.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.format.gen.cs new file mode 100644 index 0000000..c17f682 --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.format.gen.cs @@ -0,0 +1,19 @@ +// - edit Matrix.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + return $"{{ X:{X.ToString(format, formatProvider)}, Y:{Y.ToString(format, formatProvider)}, Z:{Z.ToString(format, formatProvider)} }}"; + } + + /// + public readonly override string ToString() + { + return $"{{ X:{X}, Y:{Y}, Z:{Z} }}"; + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.gen.cs new file mode 100644 index 0000000..feab957 --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.gen.cs @@ -0,0 +1,93 @@ +// - edit Matrix.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3x2 matrix with float components. +/// +[DebuggerTypeProxy(typeof(DebugView))] +public partial struct float3x2 : IMatrix + , IFloatingMatrix3x2 +{ + internal class DebugView(float3x2 m) + { + public float2 X => m.X; + public float2 Y => m.Y; + public float2 Z => m.Z; + } + + /// The first row of the matrix. + [XmlIgnore] + public float2 X; + + /// The second row of the matrix. + [XmlIgnore] + public float2 Y; + + /// The third row of the matrix. + [XmlIgnore] + public float2 Z; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2( + float m11, + float m12, + float m21, + float m22, + float m31, + float m32 + ) + { + X = new float2(m11, m12); + Y = new float2(m21, m22); + Z = new float2(m31, m32); + } + + /// Creates a matrix from the leading 6 elements of a span, row by row. + /// The elements to read; must contain at least 6, and any beyond that are ignored. + /// holds fewer than 6 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(ReadOnlySpan span) + { + if (span.Length < 6) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 6."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + static float3x2 IMatrix.Create(ReadOnlySpan span) => new(span); + + /// + public static float3x2 Identity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + float3x2 result; + + result.X = float2.UnitX; + result.Y = float2.UnitY; + result.Z = float2.Zero; + + return result; + } + } + + /// + public static int ComponentSize => sizeof(float); + + /// + public static int RowCount => 3; + + /// + public static int ColumnCount => 2; + + /// + public readonly bool IsIdentity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => X == float2.UnitX && Y == float2.UnitY && Z == float2.Zero; + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.numerics.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.numerics.gen.cs new file mode 100644 index 0000000..319487a --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.numerics.gen.cs @@ -0,0 +1,381 @@ +// - edit Matrix.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + private const float RotationEpsilon = 0.001f * float.Pi / 180f; // 0.1% of a degree + + /// + [XmlIgnore] + public float2 Translation + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => Z; + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => Z = value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateRotation(float radians) + { + radians = float.Ieee754Remainder(radians, float.Pi * 2); + + float c; + float s; + + if (radians > -RotationEpsilon && radians < RotationEpsilon) + { + // Exact case for zero rotation. + c = 1; + s = 0; + } + else if (radians > float.Pi / 2 - RotationEpsilon && radians < float.Pi / 2 + RotationEpsilon) + { + // Exact case for 90 degree rotation. + c = 0; + s = 1; + } + else if (radians < -float.Pi + RotationEpsilon || radians > float.Pi - RotationEpsilon) + { + // Exact case for 180 degree rotation. + c = -1; + s = 0; + } + else if (radians > -float.Pi / 2 - RotationEpsilon && radians < -float.Pi / 2 + RotationEpsilon) + { + // Exact case for 270 degree rotation. + c = 0; + s = -1; + } + else + { + // Arbitrary rotation. + (s, c) = float.SinCos(radians); + } + + // [ c s ] + // [ -s c ] + // [ 0 0 ] + + float3x2 result; + + result.X = new float2(c, s); + result.Y = new float2(-s, c); + result.Z = float2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateRotation(float radians, float2 centerPoint) + { + radians = float.Ieee754Remainder(radians, float.Pi * 2); + + float c, + s; + + if (radians > -RotationEpsilon && radians < RotationEpsilon) + { + // Exact case for zero rotation. + c = 1; + s = 0; + } + else if (radians > float.Pi / 2 - RotationEpsilon && radians < float.Pi / 2 + RotationEpsilon) + { + // Exact case for 90 degree rotation. + c = 0; + s = 1; + } + else if (radians < -float.Pi + RotationEpsilon || radians > float.Pi - RotationEpsilon) + { + // Exact case for 180 degree rotation. + c = -1; + s = 0; + } + else if (radians > -float.Pi / 2 - RotationEpsilon && radians < -float.Pi / 2 + RotationEpsilon) + { + // Exact case for 270 degree rotation. + c = 0; + s = -1; + } + else + { + // Arbitrary rotation. + (s, c) = float.SinCos(radians); + } + + var x = centerPoint.X * (1 - c) + centerPoint.Y * s; + var y = centerPoint.Y * (1 - c) - centerPoint.X * s; + + // [ c s ] + // [ -s c ] + // [ x y ] + + float3x2 result; + + result.X = new float2(c, s); + result.Y = new float2(-s, c); + result.Z = new float2(x, y); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateScale(float2 scales) + { + float3x2 result; + + result.X = new float2(scales.X, 0); + result.Y = new float2(0, scales.Y); + result.Z = float2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateScale(float scaleX, float scaleY) + { + float3x2 result; + + result.X = new float2(scaleX, 0); + result.Y = new float2(0, scaleY); + result.Z = float2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateScale(float scaleX, float scaleY, float2 centerPoint) + { + float3x2 result; + + result.X = new float2(scaleX, 0); + result.Y = new float2(0, scaleY); + result.Z = centerPoint * (float2.One - new float2(scaleX, scaleY)); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateScale(float2 scales, float2 centerPoint) + { + float3x2 result; + + result.X = new float2(scales.X, 0); + result.Y = new float2(0, scales.Y); + result.Z = centerPoint * (float2.One - scales); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateScale(float scale) + { + float3x2 result; + + result.X = new float2(scale, 0); + result.Y = new float2(0, scale); + result.Z = float2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateScale(float scale, float2 centerPoint) + { + float3x2 result; + + result.X = new float2(scale, 0); + result.Y = new float2(0, scale); + result.Z = centerPoint * (float2.One - new float2(scale)); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateSkew(float radiansX, float radiansY) + { + float3x2 result; + + result.X = new float2(1, float.Tan(radiansY)); + result.Y = new float2(float.Tan(radiansX), 1); + result.Z = float2.Zero; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateSkew(float radiansX, float radiansY, float2 centerPoint) + { + var xTan = float.Tan(radiansX); + var yTan = float.Tan(radiansY); + + var tx = -centerPoint.Y * xTan; + var ty = -centerPoint.X * yTan; + + float3x2 result; + + result.X = new float2(1, yTan); + result.Y = new float2(xTan, 1); + result.Z = new float2(tx, ty); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateTranslation(float2 position) + { + float3x2 result; + + result.X = float2.UnitX; + result.Y = float2.UnitY; + result.Z = position; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 CreateTranslation(float positionX, float positionY) + { + float3x2 result; + + result.X = float2.UnitX; + result.Y = float2.UnitY; + result.Z = new float2(positionX, positionY); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool Invert(float3x2 matrix, out float3x2 result) + { + var det = matrix.X.X * matrix.Y.Y - matrix.Y.X * matrix.X.Y; + + if (float.Abs(det) < float.Epsilon) + { + var vNaN = new float2(float.NaN); + + result.X = vNaN; + result.Y = vNaN; + result.Z = vNaN; + + return false; + } + + var invDet = 1.0f / det; + + result.X = new float2(+matrix.Y.Y * invDet, -matrix.X.Y * invDet); + result.Y = new float2(-matrix.Y.X * invDet, +matrix.X.X * invDet); + result.Z = new float2( + (matrix.Y.X * matrix.Z.Y - matrix.Z.X * matrix.Y.Y) * invDet, + (matrix.Z.X * matrix.X.Y - matrix.X.X * matrix.Z.Y) * invDet + ); + + return true; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 Lerp(float3x2 a, float3x2 b, float amount) + { + float3x2 result; + + result.X = float2.Lerp(a.X, b.X, amount); + result.Y = float2.Lerp(a.Y, b.Y, amount); + result.Z = float2.Lerp(a.Z, b.Z, amount); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float GetDeterminant() + { + // There isn't actually any such thing as a determinant for a non-square matrix, + // but this 3x2 type is really just an optimization of a 3x3 where we happen to + // know the rightmost column is always (0, 0, 1). So we expand to 3x3 format: + // + // [ X.X, X.Y, 0 ] + // [ Y.X, Y.Y, 0 ] + // [ Z.X, Z.Y, 1 ] + // + // Sum the diagonal products: + // (X.X * Y.Y * 1) + (X.Y * 0 * Z.X) + (0 * Y.X * Z.Y) + // + // Subtract the opposite diagonal products: + // (Z.X * Y.Y * 0) + (Z.Y * 0 * X.X) + (1 * Y.X * X.Y) + // + // Collapse out the constants and oh look, this is just a 2x2 determinant! + + return X.X * Y.Y - Y.X * X.Y; + } + + /// Performs matrix multiplication to multiply a matrix by a vector to compute the product. + /// The matrix. + /// The vector. + /// The product vector. + /// + /// The method defines the operation + /// of the multiplication operator for objects. + /// + public static float3 Multiply(float3x2 matrix, float2 vector) + { + float3 result; + + result.X = float2.Dot(matrix.X, vector); + result.Y = float2.Dot(matrix.Y, vector); + result.Z = float2.Dot(matrix.Z, vector); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 Add(float3x2 a, float3x2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 Multiply(float3x2 a, float3x2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 Multiply(float3x2 a, float b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 Negate(float3x2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 Subtract(float3x2 a, float3x2 b) + { + return a - b; + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.operators.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.operators.gen.cs new file mode 100644 index 0000000..423398b --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.operators.gen.cs @@ -0,0 +1,102 @@ +// - edit Matrix.operators.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator +(float3x2 left, float3x2 right) + { + float3x2 result; + + result.X = left.X + right.X; + result.Y = left.Y + right.Y; + result.Z = left.Z + right.Z; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(float3x2 left, float3x2 right) + { + return left.X == right.X && left.Y == right.Y && left.Z == right.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(float3x2 left, float3x2 right) + { + return left.X != right.X || left.Y != right.Y || left.Z != right.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator *(float3x2 left, float3x2 right) + { + float3x2 result; + + result.X = new float2( + left.X.X * right.X.X + left.X.Y * right.Y.X, + left.X.X * right.X.Y + left.X.Y * right.Y.Y + ); + result.Y = new float2( + left.Y.X * right.X.X + left.Y.Y * right.Y.X, + left.Y.X * right.X.Y + left.Y.Y * right.Y.Y + ); + result.Z = new float2( + left.Z.X * right.X.X + left.Z.Y * right.Y.X + right.Z.X, + left.Z.X * right.X.Y + left.Z.Y * right.Y.Y + right.Z.Y + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator *(float3x2 matrix, float2 vector) + { + return Multiply(matrix, vector); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator *(float3x2 left, float right) + { + float3x2 result; + + result.X = left.X * right; + result.Y = left.Y * right; + result.Z = left.Z * right; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator -(float3x2 left, float3x2 right) + { + float3x2 result; + + result.X = left.X - right.X; + result.Y = left.Y - right.Y; + result.Z = left.Z - right.Z; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator -(float3x2 value) + { + float3x2 result; + + result.X = -value.X; + result.Y = -value.Y; + result.Z = -value.Z; + + return result; + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.pack.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.pack.gen.cs new file mode 100644 index 0000000..79e155d --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.pack.gen.cs @@ -0,0 +1,32 @@ +// - edit Matrix.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + public static float3x2 Pack(in double3x2 vector, Func elementConverter) + { + MatrixPack.Pack(vector, out float3x2 result, elementConverter); + return result; + } + + public static void Pack( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + MatrixPack.Pack(source, destination, elementConverter); + } + + public static float3x2 Pack(in double3x2 vector) + { + return Pack(vector, f => (float)f); + } + + public static void Pack(in ReadOnlySpan source, Span destination) + { + Pack(source, destination, f => (float)f); + } +} diff --git a/Brutal.Numerics/Matrix/float3x2/float3x2.swizzle.gen.cs b/Brutal.Numerics/Matrix/float3x2/float3x2.swizzle.gen.cs new file mode 100644 index 0000000..5806333 --- /dev/null +++ b/Brutal.Numerics/Matrix/float3x2/float3x2.swizzle.gen.cs @@ -0,0 +1,55 @@ +// - edit Matrix.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3x2 +{ + /// + [XmlAttribute] + public float M11 + { + readonly get => X.X; + set => X.X = value; + } + + /// + [XmlAttribute] + public float M12 + { + readonly get => X.Y; + set => X.Y = value; + } + + /// + [XmlAttribute] + public float M21 + { + readonly get => Y.X; + set => Y.X = value; + } + + /// + [XmlAttribute] + public float M22 + { + readonly get => Y.Y; + set => Y.Y = value; + } + + /// + [XmlAttribute] + public float M31 + { + readonly get => Z.X; + set => Z.X = value; + } + + /// + [XmlAttribute] + public float M32 + { + readonly get => Z.Y; + set => Z.Y = value; + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.access.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.access.gen.cs new file mode 100644 index 0000000..d3e0898 --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.access.gen.cs @@ -0,0 +1,48 @@ +// - edit Matrix.access.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + /// + public float this[int row, int column] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), row)[column]; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)row >= RowCount) + throw new ArgumentOutOfRangeException(nameof(row)); + + Unsafe.Add(ref X, row)[column] = value; + } + } + + public readonly void Deconstruct(out float4 x, out float4 y, out float4 z, out float4 w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 16); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 16); + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.equality.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.equality.gen.cs new file mode 100644 index 0000000..6049a2d --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.equality.gen.cs @@ -0,0 +1,31 @@ +// - edit Matrix.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly bool Equals([NotNullWhen(true)] object? obj) + { + return obj is float4x4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(float4x4 other) + { + // This function needs to account for floating-point equality around NaN + // and so must behave equivalently to the underlying float/float.Equals + + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.format.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.format.gen.cs new file mode 100644 index 0000000..4d9e6c5 --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.format.gen.cs @@ -0,0 +1,19 @@ +// - edit Matrix.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + return $"{{ X:{X.ToString(format, formatProvider)}, Y:{Y.ToString(format, formatProvider)}, Z:{Z.ToString(format, formatProvider)}, W:{W.ToString(format, formatProvider)} }}"; + } + + /// + public readonly override string ToString() + { + return $"{{ X:{X}, Y:{Y}, Z:{Z}, W:{W} }}"; + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.gen.cs new file mode 100644 index 0000000..5d3b80d --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.gen.cs @@ -0,0 +1,197 @@ +// - edit Matrix.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4x4 matrix with float components. +/// +[DebuggerTypeProxy(typeof(DebugView))] +public partial struct float4x4 : IMatrix + , IFloatingMatrix4x4 +{ + internal class DebugView(float4x4 m) + { + public float4 X => m.X; + public float4 Y => m.Y; + public float4 Z => m.Z; + public float4 W => m.W; + } + + /// The first row of the matrix. + [XmlIgnore] + public float4 X; + + /// The second row of the matrix. + [XmlIgnore] + public float4 Y; + + /// The third row of the matrix. + [XmlIgnore] + public float4 Z; + + /// The fourth row of the matrix. + [XmlIgnore] + public float4 W; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4( + float m11, + float m12, + float m13, + float m14, + float m21, + float m22, + float m23, + float m24, + float m31, + float m32, + float m33, + float m34, + float m41, + float m42, + float m43, + float m44 + ) + { + X = new float4(m11, m12, m13, m14); + Y = new float4(m21, m22, m23, m24); + Z = new float4(m31, m32, m33, m34); + W = new float4(m41, m42, m43, m44); + } + + /// Creates a matrix from the leading 16 elements of a span, row by row. + /// The elements to read; must contain at least 16, and any beyond that are ignored. + /// holds fewer than 16 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(ReadOnlySpan span) + { + if (span.Length < 16) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 16."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(float3x2 value) + { + X = new float4(value.X, 0, 0); + Y = new float4(value.Y, 0, 0); + Z = float4.UnitZ; + W = new float4(value.Z, 0, 1); + } + + static float4x4 IMatrix.Create(ReadOnlySpan span) => new(span); + + /// + public static float4x4 Identity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + float4x4 result; + + result.X = float4.UnitX; + result.Y = float4.UnitY; + result.Z = float4.UnitZ; + result.W = float4.UnitW; + + return result; + } + } + + /// + public static int ComponentSize => sizeof(float); + + /// + public static int RowCount => 4; + + /// + public static int ColumnCount => 4; + + /// + public readonly bool IsIdentity + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => X == float4.UnitX && Y == float4.UnitY && Z == float4.UnitZ && W == float4.UnitW; + } + + /// The kernel view: the same 64/128 bytes as the row fields, seen as SIMD vectors. + private readonly struct Rows(Vector128 x, Vector128 y, Vector128 z, Vector128 w) + { + public readonly Vector128 X = x, Y = y, Z = z, W = w; + + /// One row through this whole matrix: one multiply, three fused-estimate accumulations. + // fused-estimate is permitted to fuse: results may differ by an ulp between FMA and non-FMA hardware + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly Vector128 Transform(Vector128 row) + { + var result = X * row.GetElement(0); + result = Vector128.MultiplyAddEstimate(Y, Vector128.Create(row.GetElement(1)), result); + result = Vector128.MultiplyAddEstimate(Z, Vector128.Create(row.GetElement(2)), result); + result = Vector128.MultiplyAddEstimate(W, Vector128.Create(row.GetElement(3)), result); + return result; + } + } + + [UnscopedRef] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private readonly ref readonly Rows AsRows() + { + return ref Unsafe.As(ref Unsafe.AsRef(in this)); + } + + + /// The half-matrix view: rows 01 and 23 as one vector each - the width where a two-source lane mix is a single permute. + private readonly struct Halves(Vector256 lo, Vector256 hi) + { + public readonly Vector256 Lo = lo, Hi = hi; + } + + /// Transpose in registers. net10 has no two-source shuffle (Zips are net11), so this rides WIDTH instead: at double the row width each transposed half is one permute per source half plus a blend. + // one index constant serves both sources - the don't-care lanes land under the blend mask; + // every arm is a JIT constant, so exactly one survives per machine + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static float4x4 TransposeKernel(in float4x4 matrix) + { + if (Vector512.IsHardwareAccelerated) + { + // the whole matrix is one Vector512: transpose is ONE 16-lane permute + var whole = Unsafe.As>(ref Unsafe.AsRef(in matrix)); + var transposed = Vector512.ShuffleNative(whole, Vector512.Create(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15)); + return Unsafe.BitCast, float4x4>(transposed); + } + + if (Vector256.IsHardwareAccelerated) + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ref readonly Halves AsHalves(in float4x4 value) + { + return ref Unsafe.As(ref Unsafe.AsRef(in value)); + } + + ref readonly var halves = ref AsHalves(in matrix); + + var idxLo = Vector256.Create(0, 4, 0, 4, 1, 5, 1, 5); + var idxHi = Vector256.Create(2, 6, 2, 6, 3, 7, 3, 7); + var takeHi = Vector256.Create(0, 0, -1, -1, 0, 0, -1, -1).AsSingle(); + + var transposed = new Halves( + Vector256.ConditionalSelect(takeHi, Vector256.ShuffleNative(halves.Hi, idxLo), Vector256.ShuffleNative(halves.Lo, idxLo)), + Vector256.ConditionalSelect(takeHi, Vector256.ShuffleNative(halves.Hi, idxHi), Vector256.ShuffleNative(halves.Lo, idxHi))); + return Unsafe.BitCast(transposed); + } + + // no accelerated width to widen into (arm64 tops out at V128): plain field shuffle + float4x4 result; + + result.X = new float4(matrix.X.X, matrix.Y.X, matrix.Z.X, matrix.W.X); + result.Y = new float4(matrix.X.Y, matrix.Y.Y, matrix.Z.Y, matrix.W.Y); + result.Z = new float4(matrix.X.Z, matrix.Y.Z, matrix.Z.Z, matrix.W.Z); + result.W = new float4(matrix.X.W, matrix.Y.W, matrix.Z.W, matrix.W.W); + + return result; + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.numerics.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.numerics.gen.cs new file mode 100644 index 0000000..fffb5af --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.numerics.gen.cs @@ -0,0 +1,1667 @@ +// - edit Matrix.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + private const float BillboardEpsilon = 1e-4f; + private const float BillboardMinAngle = 1.0f - 0.1f * (float.Pi / 180.0f); // 0.1 degrees + private const float DecomposeEpsilon = 0.0001f; + + /// + [XmlIgnore] + public float3 Translation + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W.X, W.Y, W.Z); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set => W = new float4(value, W.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateBillboard( + float3 objectPosition, + float3 cameraPosition, + float3 cameraUpVector, + float3 cameraForwardVector + ) + { + var axisZ = objectPosition - cameraPosition; + var norm = axisZ.LengthSquared(); + + if (norm < BillboardEpsilon) + axisZ = -cameraForwardVector; + else + axisZ = float3.Multiply(axisZ, 1.0f / float.Sqrt(norm)); + + var axisX = float3.Normalize(float3.Cross(cameraUpVector, axisZ)); + var axisY = float3.Cross(axisZ, axisX); + + float4x4 result; + + result.X = new float4(axisX, 0); + result.Y = new float4(axisY, 0); + result.Z = new float4(axisZ, 0); + result.W = new float4(objectPosition, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateConstrainedBillboard( + float3 objectPosition, + float3 cameraPosition, + float3 rotateAxis, + float3 cameraForwardVector, + float3 objectForwardVector + ) + { + // Treat the case when object and camera positions are too close. + var faceDir = objectPosition - cameraPosition; + var norm = faceDir.LengthSquared(); + + if (norm < BillboardEpsilon) + faceDir = -cameraForwardVector; + else + faceDir = float3.Multiply(faceDir, 1.0f / float.Sqrt(norm)); + + var axisY = rotateAxis; + + // Treat the case when angle between faceDir and rotateAxis is too close to 0. + var dot = float3.Dot(axisY, faceDir); + + if (float.Abs(dot) > BillboardMinAngle) + { + faceDir = objectForwardVector; + + // Make sure passed values are useful for compute. + dot = float3.Dot(axisY, faceDir); + + if (float.Abs(dot) > BillboardMinAngle) + faceDir = float.Abs(axisY.Z) > BillboardMinAngle ? float3.UnitX : new float3(0, 0, -1); + } + + var axisX = float3.Normalize(float3.Cross(axisY, faceDir)); + var axisZ = float3.Normalize(float3.Cross(axisX, axisY)); + + float4x4 result; + + result.X = new float4(axisX, 0); + result.Y = new float4(axisY, 0); + result.Z = new float4(axisZ, 0); + result.W = new float4(objectPosition, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateFromAxisAngle(float3 axis, float angle) + { + var (value, w) = float.SinCos(angle * 0.5f); + return CreateFromQuaternion(new floatQuat(axis.X * value, axis.Y * value, axis.Z * value, w)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateFromQuaternion(floatQuat quaternion) + { + var xx = quaternion.X * quaternion.X; + var yy = quaternion.Y * quaternion.Y; + var zz = quaternion.Z * quaternion.Z; + + var xy = quaternion.X * quaternion.Y; + var wz = quaternion.Z * quaternion.W; + var xz = quaternion.Z * quaternion.X; + var wy = quaternion.Y * quaternion.W; + var yz = quaternion.Y * quaternion.Z; + var wx = quaternion.X * quaternion.W; + + float4x4 result; + + result.X = new float4(1.0f - 2.0f * (yy + zz), 2.0f * (xy + wz), 2.0f * (xz - wy), 0); + result.Y = new float4(2.0f * (xy - wz), 1.0f - 2.0f * (zz + xx), 2.0f * (yz + wx), 0); + result.Z = new float4(2.0f * (xz + wy), 2.0f * (yz - wx), 1.0f - 2.0f * (yy + xx), 0); + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateFromYawPitchRoll(float yaw, float pitch, float roll) + { + var q = floatQuat.CreateFromYawPitchRoll(yaw, pitch, roll); + return CreateFromQuaternion(q); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateLookTo(float3 cameraPosition, float3 cameraDirection, float3 cameraUpVector) + { + var axisZ = float3.Normalize(-cameraDirection); + var axisX = float3.Normalize(float3.Cross(cameraUpVector, axisZ)); + var axisY = float3.Cross(axisZ, axisX); + var negativeCameraPosition = -cameraPosition; + + float4x4 result; + + result.X = new float4(axisX.X, axisY.X, axisZ.X, 0); + result.Y = new float4(axisX.Y, axisY.Y, axisZ.Y, 0); + result.Z = new float4(axisX.Z, axisY.Z, axisZ.Z, 0); + result.W = new float4( + float3.Dot(axisX, negativeCameraPosition), + float3.Dot(axisY, negativeCameraPosition), + float3.Dot(axisZ, negativeCameraPosition), + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateLookToLeftHanded( + float3 cameraPosition, + float3 cameraDirection, + float3 cameraUpVector + ) + { + var axisZ = float3.Normalize(cameraDirection); + var axisX = float3.Normalize(float3.Cross(cameraUpVector, axisZ)); + var axisY = float3.Cross(axisZ, axisX); + var negativeCameraPosition = -cameraPosition; + + float4x4 result; + + result.X = new float4(axisX.X, axisY.X, axisZ.X, 0); + result.Y = new float4(axisX.Y, axisY.Y, axisZ.Y, 0); + result.Z = new float4(axisX.Z, axisY.Z, axisZ.Z, 0); + result.W = new float4( + float3.Dot(axisX, negativeCameraPosition), + float3.Dot(axisY, negativeCameraPosition), + float3.Dot(axisZ, negativeCameraPosition), + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane) + { + var range = 1.0f / (zNearPlane - zFarPlane); + + float4x4 result; + + result.X = new float4(2.0f / width, 0, 0, 0); + result.Y = new float4(0, 2.0f / height, 0, 0); + result.Z = new float4(0, 0, range, 0); + result.W = new float4(0, 0, range * zNearPlane, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateOrthographicLeftHanded( + float width, + float height, + float zNearPlane, + float zFarPlane + ) + { + var range = 1.0f / (zFarPlane - zNearPlane); + + float4x4 result; + + result.X = new float4(2.0f / width, 0, 0, 0); + result.Y = new float4(0, 2.0f / height, 0, 0); + result.Z = new float4(0, 0, range, 0); + result.W = new float4(0, 0, -range * zNearPlane, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateOrthographicOffCenter( + float left, + float right, + float bottom, + float top, + float zNearPlane, + float zFarPlane + ) + { + var reciprocalWidth = 1.0f / (right - left); + var reciprocalHeight = 1.0f / (top - bottom); + var range = 1.0f / (zNearPlane - zFarPlane); + + float4x4 result; + + result.X = new float4(reciprocalWidth + reciprocalWidth, 0, 0, 0); + result.Y = new float4(0, reciprocalHeight + reciprocalHeight, 0, 0); + result.Z = new float4(0, 0, range, 0); + result.W = new float4( + -(left + right) * reciprocalWidth, + -(top + bottom) * reciprocalHeight, + range * zNearPlane, + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateOrthographicOffCenterLeftHanded( + float left, + float right, + float bottom, + float top, + float zNearPlane, + float zFarPlane + ) + { + var reciprocalWidth = 1.0f / (right - left); + var reciprocalHeight = 1.0f / (top - bottom); + var range = 1.0f / (zFarPlane - zNearPlane); + + float4x4 result; + + result.X = new float4(reciprocalWidth + reciprocalWidth, 0, 0, 0); + result.Y = new float4(0, reciprocalHeight + reciprocalHeight, 0, 0); + result.Z = new float4(0, 0, range, 0); + result.W = new float4( + -(left + right) * reciprocalWidth, + -(top + bottom) * reciprocalHeight, + -range * zNearPlane, + 1 + ); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreatePerspective( + float width, + float height, + float nearPlaneDistance, + float farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var range = float.IsPositiveInfinity(farPlaneDistance) + ? -1.0f + : farPlaneDistance / (nearPlaneDistance - farPlaneDistance); + + float4x4 result; + + result.X = new float4(dblNearPlaneDistance / width, 0, 0, 0); + result.Y = new float4(0, dblNearPlaneDistance / height, 0, 0); + result.Z = new float4(0, 0, range, -1.0f); + result.W = new float4(0, 0, range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreatePerspectiveLeftHanded( + float width, + float height, + float nearPlaneDistance, + float farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var range = float.IsPositiveInfinity(farPlaneDistance) + ? 1.0f + : farPlaneDistance / (farPlaneDistance - nearPlaneDistance); + + float4x4 result; + + result.X = new float4(dblNearPlaneDistance / width, 0, 0, 0); + result.Y = new float4(0, dblNearPlaneDistance / height, 0, 0); + result.Z = new float4(0, 0, range, 1.0f); + result.W = new float4(0, 0, -range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreatePerspectiveFieldOfView( + float fieldOfView, + float aspectRatio, + float nearPlaneDistance, + float farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(fieldOfView, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(fieldOfView, float.Pi); + + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var height = 1.0f / float.Tan(fieldOfView * 0.5f); + var width = height / aspectRatio; + var range = float.IsPositiveInfinity(farPlaneDistance) + ? -1.0f + : farPlaneDistance / (nearPlaneDistance - farPlaneDistance); + + float4x4 result; + + result.X = new float4(width, 0, 0, 0); + result.Y = new float4(0, height, 0, 0); + result.Z = new float4(0, 0, range, -1.0f); + result.W = new float4(0, 0, range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreatePerspectiveFieldOfViewLeftHanded( + float fieldOfView, + float aspectRatio, + float nearPlaneDistance, + float farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(fieldOfView, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(fieldOfView, float.Pi); + + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var height = 1.0f / float.Tan(fieldOfView * 0.5f); + var width = height / aspectRatio; + var range = float.IsPositiveInfinity(farPlaneDistance) + ? 1.0f + : farPlaneDistance / (farPlaneDistance - nearPlaneDistance); + + float4x4 result; + + result.X = new float4(width, 0, 0, 0); + result.Y = new float4(0, height, 0, 0); + result.Z = new float4(0, 0, range, 1.0f); + result.W = new float4(0, 0, -range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreatePerspectiveOffCenter( + float left, + float right, + float bottom, + float top, + float nearPlaneDistance, + float farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var reciprocalWidth = 1.0f / (right - left); + var reciprocalHeight = 1.0f / (top - bottom); + var range = float.IsPositiveInfinity(farPlaneDistance) + ? -1.0f + : farPlaneDistance / (nearPlaneDistance - farPlaneDistance); + + float4x4 result; + + result.X = new float4(dblNearPlaneDistance * reciprocalWidth, 0, 0, 0); + result.Y = new float4(0, dblNearPlaneDistance * reciprocalHeight, 0, 0); + result.Z = new float4((left + right) * reciprocalWidth, (top + bottom) * reciprocalHeight, range, -1.0f); + result.W = new float4(0, 0, range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreatePerspectiveOffCenterLeftHanded( + float left, + float right, + float bottom, + float top, + float nearPlaneDistance, + float farPlaneDistance + ) + { + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(nearPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(farPlaneDistance, 0.0f); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(nearPlaneDistance, farPlaneDistance); + + var dblNearPlaneDistance = nearPlaneDistance + nearPlaneDistance; + var reciprocalWidth = 1.0f / (right - left); + var reciprocalHeight = 1.0f / (top - bottom); + var range = float.IsPositiveInfinity(farPlaneDistance) + ? 1.0f + : farPlaneDistance / (farPlaneDistance - nearPlaneDistance); + + float4x4 result; + + result.X = new float4(dblNearPlaneDistance * reciprocalWidth, 0, 0, 0); + result.Y = new float4(0, dblNearPlaneDistance * reciprocalHeight, 0, 0); + result.Z = new float4(-(left + right) * reciprocalWidth, -(top + bottom) * reciprocalHeight, range, 1.0f); + result.W = new float4(0, 0, -range * nearPlaneDistance, 0); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateReflection(floatPlane value) + { + var plane = floatPlane.Normalize(value); + var vector = plane.Normal * -2.0f; + + float4x4 result; + + result.X = new float4(vector * plane.Normal.X, 0) + float4.UnitX; + result.Y = new float4(vector * plane.Normal.Y, 0) + float4.UnitY; + result.Z = new float4(vector * plane.Normal.Z, 0) + float4.UnitZ; + result.W = new float4(vector * plane.D, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateRotationX(float radians) + { + var (s, c) = float.SinCos(radians); + + // [ 1 0 0 0 ] + // [ 0 c s 0 ] + // [ 0 -s c 0 ] + // [ 0 0 0 1 ] + + float4x4 result; + + result.X = float4.UnitX; + result.Y = new float4(0, c, s, 0); + result.Z = new float4(0, -s, c, 0); + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateRotationX(float radians, float3 centerPoint) + { + var (s, c) = float.SinCos(radians); + + var y = centerPoint.Y * (1 - c) + centerPoint.Z * s; + var z = centerPoint.Z * (1 - c) - centerPoint.Y * s; + + // [ 1 0 0 0 ] + // [ 0 c s 0 ] + // [ 0 -s c 0 ] + // [ 0 y z 1 ] + + float4x4 result; + + result.X = float4.UnitX; + result.Y = new float4(0, c, s, 0); + result.Z = new float4(0, -s, c, 0); + result.W = new float4(0, y, z, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateRotationY(float radians) + { + var (s, c) = float.SinCos(radians); + + // [ c 0 -s 0 ] + // [ 0 1 0 0 ] + // [ s 0 c 0 ] + // [ 0 0 0 1 ] + + float4x4 result; + + result.X = new float4(c, 0, -s, 0); + result.Y = float4.UnitY; + result.Z = new float4(s, 0, c, 0); + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateRotationY(float radians, float3 centerPoint) + { + var (s, c) = float.SinCos(radians); + + var x = centerPoint.X * (1 - c) - centerPoint.Z * s; + var z = centerPoint.Z * (1 - c) + centerPoint.X * s; + + // [ c 0 -s 0 ] + // [ 0 1 0 0 ] + // [ s 0 c 0 ] + // [ x 0 z 1 ] + + float4x4 result; + + result.X = new float4(c, 0, -s, 0); + result.Y = float4.UnitY; + result.Z = new float4(s, 0, c, 0); + result.W = new float4(x, 0, z, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateRotationZ(float radians) + { + var (s, c) = float.SinCos(radians); + + // [ c s 0 0 ] + // [ -s c 0 0 ] + // [ 0 0 1 0 ] + // [ 0 0 0 1 ] + + float4x4 result; + + result.X = new float4(c, s, 0, 0); + result.Y = new float4(-s, c, 0, 0); + result.Z = float4.UnitZ; + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateRotationZ(float radians, float3 centerPoint) + { + var (s, c) = float.SinCos(radians); + + var x = centerPoint.X * (1 - c) + centerPoint.Y * s; + var y = centerPoint.Y * (1 - c) - centerPoint.X * s; + + // [ c s 0 0 ] + // [ -s c 0 0 ] + // [ 0 0 1 0 ] + // [ x y 0 1 ] + + float4x4 result; + + result.X = new float4(c, s, 0, 0); + result.Y = new float4(-s, c, 0, 0); + result.Z = float4.UnitZ; + result.W = new float4(x, y, 0, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateScale(float scaleX, float scaleY, float scaleZ) + { + float4x4 result; + + result.X = new float4(scaleX, 0, 0, 0); + result.Y = new float4(0, scaleY, 0, 0); + result.Z = new float4(0, 0, scaleZ, 0); + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateScale(float scaleX, float scaleY, float scaleZ, float3 centerPoint) + { + float4x4 result; + + result.X = new float4(scaleX, 0, 0, 0); + result.Y = new float4(0, scaleY, 0, 0); + result.Z = new float4(0, 0, scaleZ, 0); + result.W = new float4(centerPoint * (float3.One - new float3(scaleX, scaleY, scaleZ)), 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateScale(float3 scales) + { + float4x4 result; + + result.X = new float4(scales.X, 0, 0, 0); + result.Y = new float4(0, scales.Y, 0, 0); + result.Z = new float4(0, 0, scales.Z, 0); + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateScale(float3 scales, float3 centerPoint) + { + float4x4 result; + + result.X = new float4(scales.X, 0, 0, 0); + result.Y = new float4(0, scales.Y, 0, 0); + result.Z = new float4(0, 0, scales.Z, 0); + result.W = new float4(centerPoint * (float3.One - scales), 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateScale(float scale) + { + float4x4 result; + + result.X = new float4(scale, 0, 0, 0); + result.Y = new float4(0, scale, 0, 0); + result.Z = new float4(0, 0, scale, 0); + result.W = float4.UnitW; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateScale(float scale, float3 centerPoint) + { + float4x4 result; + + result.X = new float4(scale, 0, 0, 0); + result.Y = new float4(0, scale, 0, 0); + result.Z = new float4(0, 0, scale, 0); + result.W = new float4(centerPoint * (float3.One - new float3(scale)), 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateShadow(float3 lightDirection, floatPlane plane) + { + var p = floatPlane.Normalize(plane); + var dot = float3.Dot(lightDirection, p.Normal); + + var normal = -p.Normal; + + float4x4 result; + + result.X = new float4(lightDirection * normal.X, 0) + new float4(dot, 0, 0, 0); + result.Y = new float4(lightDirection * normal.Y, 0) + new float4(0, dot, 0, 0); + result.Z = new float4(lightDirection * normal.Z, 0) + new float4(0, 0, dot, 0); + result.W = new float4(lightDirection * -p.D, dot); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateTranslation(float3 position) + { + float4x4 result; + + result.X = float4.UnitX; + result.Y = float4.UnitY; + result.Z = float4.UnitZ; + result.W = new float4(position, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateTranslation(float positionX, float positionY, float positionZ) + { + float4x4 result; + + result.X = float4.UnitX; + result.Y = float4.UnitY; + result.Z = float4.UnitZ; + result.W = new float4(positionX, positionY, positionZ, 1); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateViewport( + float x, + float y, + float width, + float height, + float minDepth, + float maxDepth + ) + { + float4x4 result; + + // 4x SIMD fields to get a lot better codegen + result.W = new float4(width, height, 0, 0); + result.W *= new float4(0.5f, 0.5f, 0, 0); + + result.X = new float4(result.W.X, 0, 0, 0); + result.Y = new float4(0, -result.W.Y, 0, 0); + result.Z = new float4(0, 0, minDepth - maxDepth, 0); + result.W += new float4(x, y, minDepth, 1f); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateViewportLeftHanded( + float x, + float y, + float width, + float height, + float minDepth, + float maxDepth + ) + { + float4x4 result; + + // 4x SIMD fields to get a lot better codegen + result.W = new float4(width, height, 0, 0); + result.W *= new float4(0.5f, 0.5f, 0, 0); + + result.X = new float4(result.W.X, 0, 0, 0); + result.Y = new float4(0, -result.W.Y, 0, 0); + result.Z = new float4(0, 0, maxDepth - minDepth, 0); + result.W += new float4(x, y, minDepth, 1f); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 CreateWorld(float3 position, float3 forward, float3 up) + { + var axisZ = float3.Normalize(-forward); + var axisX = float3.Normalize(float3.Cross(up, axisZ)); + var axisY = float3.Cross(axisZ, axisX); + + float4x4 result; + + result.X = new float4(axisX, 0); + result.Y = new float4(axisY, 0); + result.Z = new float4(axisZ, 0); + result.W = new float4(position, 1); + + return result; + } + + /// + // deliberately not AggressiveInlining: ~200 expanded call sites + public static bool Decompose( + float4x4 matrix, + out float3 scale, + out floatQuat rotation, + out float3 translation + ) + { + // well-formed scales stay in registers; anything degenerate falls through to the scalar body + if (Vector128.IsHardwareAccelerated) + { + ref readonly var rows = ref matrix.AsRows(); + var basisMask = Vector128.Create(-1, -1, -1, 0).AsSingle(); + var x = rows.X & basisMask; + var y = rows.Y & basisMask; + var z = rows.Z & basisMask; + + var scaleX = float.Sqrt(Vector128.Dot(x, x)); + var scaleY = float.Sqrt(Vector128.Dot(y, y)); + var scaleZ = float.Sqrt(Vector128.Dot(z, z)); + + if (scaleX >= DecomposeEpsilon && scaleY >= DecomposeEpsilon && scaleZ >= DecomposeEpsilon) + { + x /= Vector128.Create(scaleX); + y /= Vector128.Create(scaleY); + z /= Vector128.Create(scaleZ); + + var det = Vector128.Dot(x, Cross3(y, z)); + + if (det < 0) + { + /* handedness flip on the LARGEST-scale axis, matching the scalar body's + * ranking (its `a` is the max; ties resolve to the lower index there and + * here alike): negating any single axis flips det, but which axis carries + * the sign is observable in the outputs */ + if (scaleX >= scaleY && scaleX >= scaleZ) + { + scaleX = -scaleX; + x = -x; + } + else if (scaleY >= scaleZ) + { + scaleY = -scaleY; + y = -y; + } + else + { + scaleZ = -scaleZ; + z = -z; + } + + det = -det; + } + + translation = new float3(matrix.W.X, matrix.W.Y, matrix.W.Z); + scale = new float3(scaleX, scaleY, scaleZ); + + det -= 1; + det *= det; + + if (DecomposeEpsilon < det) + { + // Non-SRT matrix encountered + rotation = floatQuat.Identity; + return false; + } + + var basis = new Rows(x, y, z, Vector128.Create(0.0f, 0, 0, 1)); + rotation = floatQuat.CreateFromRotationMatrix(Unsafe.BitCast(basis)); + return true; + } + } + + return DecomposeDegenerate(in matrix, out scale, out rotation, out translation); + + /* Cross product of two rows' xyz, lane 3 riding along (zero in, zero out) - the + * register-resident twin of float3.Cross. Local because the handedness + * test is its only caller. */ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static Vector128 Cross3(Vector128 a, Vector128 b) + { + var ayzx = Vector128.ShuffleNative(a, Vector128.Create(1, 2, 0, 3)); + var azxy = Vector128.ShuffleNative(a, Vector128.Create(2, 0, 1, 3)); + var byzx = Vector128.ShuffleNative(b, Vector128.Create(1, 2, 0, 3)); + var bzxy = Vector128.ShuffleNative(b, Vector128.Create(2, 0, 1, 3)); + return ayzx * bzxy - azxy * byzx; + } + } + + // out of line deliberately: its `fixed` pins the out params, which the fast path must not pay for + [MethodImpl(MethodImplOptions.NoInlining)] + private static unsafe bool DecomposeDegenerate( + in float4x4 matrix, + out float3 scale, + out floatQuat rotation, + out float3 translation + ) + { + var result = true; + + fixed (float3* scaleBase = &scale) + { + var pfScales = (float*)scaleBase; + float det; + + VectorBasis vectorBasis; + var pVectorBasis = (float3**)&vectorBasis; + + var matTemp = Identity; + CanonicalBasis canonicalBasis = default; + var pCanonicalBasis = &canonicalBasis.Row0; + + canonicalBasis.Row0 = new float3(1.0f, 0.0f, 0.0f); + canonicalBasis.Row1 = new float3(0.0f, 1.0f, 0.0f); + canonicalBasis.Row2 = new float3(0.0f, 0.0f, 1.0f); + + translation = new float3(matrix.W.X, matrix.W.Y, matrix.W.Z); + + pVectorBasis[0] = (float3*)&matTemp.X; + pVectorBasis[1] = (float3*)&matTemp.Y; + pVectorBasis[2] = (float3*)&matTemp.Z; + + *pVectorBasis[0] = new float3(matrix.X.X, matrix.X.Y, matrix.X.Z); + *pVectorBasis[1] = new float3(matrix.Y.X, matrix.Y.Y, matrix.Y.Z); + *pVectorBasis[2] = new float3(matrix.Z.X, matrix.Z.Y, matrix.Z.Z); + + scale.X = pVectorBasis[0]->Length(); + scale.Y = pVectorBasis[1]->Length(); + scale.Z = pVectorBasis[2]->Length(); + + uint a, + b, + c; + + #region Ranking + + var x = pfScales[0]; + var y = pfScales[1]; + var z = pfScales[2]; + + if (x < y) + { + if (y < z) + { + a = 2; + b = 1; + c = 0; + } + else + { + a = 1; + + if (x < z) + { + b = 2; + c = 0; + } + else + { + b = 0; + c = 2; + } + } + } + else + { + if (x < z) + { + a = 2; + b = 0; + c = 1; + } + else + { + a = 0; + + if (y < z) + { + b = 2; + c = 1; + } + else + { + b = 1; + c = 2; + } + } + } + + #endregion + + if (pfScales[a] < DecomposeEpsilon) + *pVectorBasis[a] = pCanonicalBasis[a]; + + *pVectorBasis[a] = float3.Normalize(*pVectorBasis[a]); + + if (pfScales[b] < DecomposeEpsilon) + { + uint cc; + float fAbsX, + fAbsY, + fAbsZ; + + fAbsX = float.Abs(pVectorBasis[a]->X); + fAbsY = float.Abs(pVectorBasis[a]->Y); + fAbsZ = float.Abs(pVectorBasis[a]->Z); + + #region Ranking + + if (fAbsX < fAbsY) + { + if (fAbsY < fAbsZ) + { + cc = 0; + } + else + { + if (fAbsX < fAbsZ) + cc = 0; + else + cc = 2; + } + } + else + { + if (fAbsX < fAbsZ) + { + cc = 1; + } + else + { + if (fAbsY < fAbsZ) + cc = 1; + else + cc = 2; + } + } + + #endregion + + *pVectorBasis[b] = float3.Cross(*pVectorBasis[a], *(pCanonicalBasis + cc)); + } + + *pVectorBasis[b] = float3.Normalize(*pVectorBasis[b]); + + if (pfScales[c] < DecomposeEpsilon) + *pVectorBasis[c] = float3.Cross(*pVectorBasis[a], *pVectorBasis[b]); + + *pVectorBasis[c] = float3.Normalize(*pVectorBasis[c]); + + det = matTemp.GetDeterminant(); + + // use Kramer's rule to check for handedness of coordinate system + if (det < 0.0f) + { + // switch coordinate system by negating the scale and inverting the basis vector on the x-axis + pfScales[a] = -pfScales[a]; + *pVectorBasis[a] = -(*pVectorBasis[a]); + + det = -det; + } + + det -= 1.0f; + det *= det; + + if (DecomposeEpsilon < det) + { + // Non-SRT matrix encountered + rotation = floatQuat.Identity; + result = false; + } + else + { + // generate the quaternion from the matrix + rotation = floatQuat.CreateFromRotationMatrix(matTemp); + } + } + + return result; + } + + /// + // deliberately not AggressiveInlining: ~330 expanded call sites + public static bool Invert(float4x4 matrix, out float4x4 result) + { + // This implementation is based on the DirectX Math Library XMMatrixInverse method + // https://github.com/microsoft/DirectXMath/blob/master/Inc/DirectXMathMatrix.inl + + // the BCL SseImpl respelled onto portable shuffles; fused-estimate as in the original, + // so results may differ by an ulp between FMA and non-FMA hardware + if (Vector128.IsHardwareAccelerated) + { + var transposed = TransposeKernel(in matrix); + ref readonly var t = ref transposed.AsRows(); + var row1 = t.X; + var row2 = t.Y; + var row3 = t.Z; + var row4 = t.W; + + var V00 = Vector128.ShuffleNative(row3, Vector128.Create(0, 0, 1, 1)); + var V10 = Vector128.ShuffleNative(row4, Vector128.Create(2, 3, 2, 3)); + var V01 = Vector128.ShuffleNative(row1, Vector128.Create(0, 0, 1, 1)); + var V11 = Vector128.ShuffleNative(row2, Vector128.Create(2, 3, 2, 3)); + var V02 = Vector128.Shuffle2(row3, row1, 0, 2, 0, 2); + var V12 = Vector128.Shuffle2(row4, row2, 1, 3, 1, 3); + + var D0 = V00 * V10; + var D1 = V01 * V11; + var D2 = V02 * V12; + + V00 = Vector128.ShuffleNative(row3, Vector128.Create(2, 3, 2, 3)); + V10 = Vector128.ShuffleNative(row4, Vector128.Create(0, 0, 1, 1)); + V01 = Vector128.ShuffleNative(row1, Vector128.Create(2, 3, 2, 3)); + V11 = Vector128.ShuffleNative(row2, Vector128.Create(0, 0, 1, 1)); + V02 = Vector128.Shuffle2(row3, row1, 1, 3, 1, 3); + V12 = Vector128.Shuffle2(row4, row2, 0, 2, 0, 2); + + D0 = Vector128.MultiplyAddEstimate(-V00, V10, D0); + D1 = Vector128.MultiplyAddEstimate(-V01, V11, D1); + D2 = Vector128.MultiplyAddEstimate(-V02, V12, D2); + + // V11 = D0Y,D0W,D2Y,D2Y + V11 = Vector128.Shuffle2(D0, D2, 1, 3, 1, 1); + V00 = Vector128.ShuffleNative(row2, Vector128.Create(1, 2, 0, 1)); + V10 = Vector128.Shuffle2(V11, D0, 2, 0, 3, 0); + V01 = Vector128.ShuffleNative(row1, Vector128.Create(2, 0, 1, 0)); + V11 = Vector128.Shuffle2(V11, D0, 1, 2, 1, 2); + + // V13 = D1Y,D1W,D2W,D2W + var V13 = Vector128.Shuffle2(D1, D2, 1, 3, 3, 3); + V02 = Vector128.ShuffleNative(row4, Vector128.Create(1, 2, 0, 1)); + V12 = Vector128.Shuffle2(V13, D1, 2, 0, 3, 0); + var V03 = Vector128.ShuffleNative(row3, Vector128.Create(2, 0, 1, 0)); + V13 = Vector128.Shuffle2(V13, D1, 1, 2, 1, 2); + + var C0 = V00 * V10; + var C2 = V01 * V11; + var C4 = V02 * V12; + var C6 = V03 * V13; + + // V11 = D0X,D0Y,D2X,D2X + V11 = Vector128.Shuffle2(D0, D2, 0, 1, 0, 0); + V00 = Vector128.ShuffleNative(row2, Vector128.Create(2, 3, 1, 2)); + V10 = Vector128.Shuffle2(D0, V11, 3, 0, 1, 2); + V01 = Vector128.ShuffleNative(row1, Vector128.Create(3, 2, 3, 1)); + V11 = Vector128.Shuffle2(D0, V11, 2, 1, 2, 0); + + // V13 = D1X,D1Y,D2Z,D2Z + V13 = Vector128.Shuffle2(D1, D2, 0, 1, 2, 2); + V02 = Vector128.ShuffleNative(row4, Vector128.Create(2, 3, 1, 2)); + V12 = Vector128.Shuffle2(D1, V13, 3, 0, 1, 2); + V03 = Vector128.ShuffleNative(row3, Vector128.Create(3, 2, 3, 1)); + V13 = Vector128.Shuffle2(D1, V13, 2, 1, 2, 0); + + C0 = Vector128.MultiplyAddEstimate(-V00, V10, C0); + C2 = Vector128.MultiplyAddEstimate(-V01, V11, C2); + C4 = Vector128.MultiplyAddEstimate(-V02, V12, C4); + C6 = Vector128.MultiplyAddEstimate(-V03, V13, C6); + + V00 = Vector128.ShuffleNative(row2, Vector128.Create(3, 0, 3, 0)); + + // V10 = D0Z,D0Z,D2X,D2Y + V10 = Vector128.Shuffle2(D0, D2, 2, 2, 0, 1); + V10 = Vector128.ShuffleNative(V10, Vector128.Create(0, 3, 2, 0)); + V01 = Vector128.ShuffleNative(row1, Vector128.Create(1, 3, 0, 2)); + + // V11 = D0X,D0W,D2X,D2Y + V11 = Vector128.Shuffle2(D0, D2, 0, 3, 0, 1); + V11 = Vector128.ShuffleNative(V11, Vector128.Create(3, 0, 1, 2)); + V02 = Vector128.ShuffleNative(row4, Vector128.Create(3, 0, 3, 0)); + + // V12 = D1Z,D1Z,D2Z,D2W + V12 = Vector128.Shuffle2(D1, D2, 2, 2, 2, 3); + V12 = Vector128.ShuffleNative(V12, Vector128.Create(0, 3, 2, 0)); + V03 = Vector128.ShuffleNative(row3, Vector128.Create(1, 3, 0, 2)); + + // V13 = D1X,D1W,D2Z,D2W + V13 = Vector128.Shuffle2(D1, D2, 0, 3, 2, 3); + V13 = Vector128.ShuffleNative(V13, Vector128.Create(3, 0, 1, 2)); + + V00 *= V10; + V01 *= V11; + V02 *= V12; + V03 *= V13; + + var C1 = C0 - V00; + C0 += V00; + + var C3 = C2 + V01; + C2 -= V01; + + var C5 = C4 - V02; + C4 += V02; + + var C7 = C6 + V03; + C6 -= V03; + + C0 = Vector128.Shuffle2(C0, C1, 0, 2, 1, 3); + C2 = Vector128.Shuffle2(C2, C3, 0, 2, 1, 3); + C4 = Vector128.Shuffle2(C4, C5, 0, 2, 1, 3); + C6 = Vector128.Shuffle2(C6, C7, 0, 2, 1, 3); + + C0 = Vector128.ShuffleNative(C0, Vector128.Create(0, 2, 1, 3)); + C2 = Vector128.ShuffleNative(C2, Vector128.Create(0, 2, 1, 3)); + C4 = Vector128.ShuffleNative(C4, Vector128.Create(0, 2, 1, 3)); + C6 = Vector128.ShuffleNative(C6, Vector128.Create(0, 2, 1, 3)); + + var det = Vector128.Dot(C0, row1); + + if (float.Abs(det) < float.Epsilon) + { + var vNaN = Vector128.Create(float.NaN); + + var nan = new Rows(vNaN, vNaN, vNaN, vNaN); + result = Unsafe.BitCast(nan); + + return false; + } + + var invDet = Vector128.One / det; + + var inverted = new Rows(C0 * invDet, C2 * invDet, C4 * invDet, C6 * invDet); + result = Unsafe.BitCast(inverted); + + return true; + } + + return SoftwareFallback(in matrix, out result); + + static bool SoftwareFallback(in float4x4 matrix, out float4x4 result) + { + // -1 + // If you have matrix M, inverse Matrix M can compute + // + // -1 1 + // M = --------- A + // det(M) + // + // A is adjugate (adjoint) of M, where, + // + // T + // A = C + // + // C is Cofactor matrix of M, where, + // i + j + // C = (-1) * det(M ) + // ij ij + // + // [ a b c d ] + // M = [ e f g h ] + // [ i j k l ] + // [ m n o p ] + // + // First Row + // 2 | f g h | + // C = (-1) | j k l | = + ( f ( kp - lo ) - g ( jp - ln ) + h ( jo - kn ) ) + // 11 | n o p | + // + // 3 | e g h | + // C = (-1) | i k l | = - ( e ( kp - lo ) - g ( ip - lm ) + h ( io - km ) ) + // 12 | m o p | + // + // 4 | e f h | + // C = (-1) | i j l | = + ( e ( jp - ln ) - f ( ip - lm ) + h ( in - jm ) ) + // 13 | m n p | + // + // 5 | e f g | + // C = (-1) | i j k | = - ( e ( jo - kn ) - f ( io - km ) + g ( in - jm ) ) + // 14 | m n o | + // + // Second Row + // 3 | b c d | + // C = (-1) | j k l | = - ( b ( kp - lo ) - c ( jp - ln ) + d ( jo - kn ) ) + // 21 | n o p | + // + // 4 | a c d | + // C = (-1) | i k l | = + ( a ( kp - lo ) - c ( ip - lm ) + d ( io - km ) ) + // 22 | m o p | + // + // 5 | a b d | + // C = (-1) | i j l | = - ( a ( jp - ln ) - b ( ip - lm ) + d ( in - jm ) ) + // 23 | m n p | + // + // 6 | a b c | + // C = (-1) | i j k | = + ( a ( jo - kn ) - b ( io - km ) + c ( in - jm ) ) + // 24 | m n o | + // + // Third Row + // 4 | b c d | + // C = (-1) | f g h | = + ( b ( gp - ho ) - c ( fp - hn ) + d ( fo - gn ) ) + // 31 | n o p | + // + // 5 | a c d | + // C = (-1) | e g h | = - ( a ( gp - ho ) - c ( ep - hm ) + d ( eo - gm ) ) + // 32 | m o p | + // + // 6 | a b d | + // C = (-1) | e f h | = + ( a ( fp - hn ) - b ( ep - hm ) + d ( en - fm ) ) + // 33 | m n p | + // + // 7 | a b c | + // C = (-1) | e f g | = - ( a ( fo - gn ) - b ( eo - gm ) + c ( en - fm ) ) + // 34 | m n o | + // + // Fourth Row + // 5 | b c d | + // C = (-1) | f g h | = - ( b ( gl - hk ) - c ( fl - hj ) + d ( fk - gj ) ) + // 41 | j k l | + // + // 6 | a c d | + // C = (-1) | e g h | = + ( a ( gl - hk ) - c ( el - hi ) + d ( ek - gi ) ) + // 42 | i k l | + // + // 7 | a b d | + // C = (-1) | e f h | = - ( a ( fl - hj ) - b ( el - hi ) + d ( ej - fi ) ) + // 43 | i j l | + // + // 8 | a b c | + // C = (-1) | e f g | = + ( a ( fk - gj ) - b ( ek - gi ) + c ( ej - fi ) ) + // 44 | i j k | + // + // Cost of operation + // 53 adds, 104 muls, and 1 div. + + float a = matrix.X.X, + b = matrix.X.Y, + c = matrix.X.Z, + d = matrix.X.W; + float e = matrix.Y.X, + f = matrix.Y.Y, + g = matrix.Y.Z, + h = matrix.Y.W; + float i = matrix.Z.X, + j = matrix.Z.Y, + k = matrix.Z.Z, + l = matrix.Z.W; + float m = matrix.W.X, + n = matrix.W.Y, + o = matrix.W.Z, + p = matrix.W.W; + + var kp_lo = k * p - l * o; + var jp_ln = j * p - l * n; + var jo_kn = j * o - k * n; + var ip_lm = i * p - l * m; + var io_km = i * o - k * m; + var in_jm = i * n - j * m; + + var a11 = +(f * kp_lo - g * jp_ln + h * jo_kn); + var a12 = -(e * kp_lo - g * ip_lm + h * io_km); + var a13 = +(e * jp_ln - f * ip_lm + h * in_jm); + var a14 = -(e * jo_kn - f * io_km + g * in_jm); + + var det = a * a11 + b * a12 + c * a13 + d * a14; + + if (float.Abs(det) < float.Epsilon) + { + var vNaN = new float4(float.NaN); + + result.X = vNaN; + result.Y = vNaN; + result.Z = vNaN; + result.W = vNaN; + + return false; + } + + var invDet = 1.0f / det; + + result.X.X = a11 * invDet; + result.Y.X = a12 * invDet; + result.Z.X = a13 * invDet; + result.W.X = a14 * invDet; + + result.X.Y = -(b * kp_lo - c * jp_ln + d * jo_kn) * invDet; + result.Y.Y = +(a * kp_lo - c * ip_lm + d * io_km) * invDet; + result.Z.Y = -(a * jp_ln - b * ip_lm + d * in_jm) * invDet; + result.W.Y = +(a * jo_kn - b * io_km + c * in_jm) * invDet; + + var gp_ho = g * p - h * o; + var fp_hn = f * p - h * n; + var fo_gn = f * o - g * n; + var ep_hm = e * p - h * m; + var eo_gm = e * o - g * m; + var en_fm = e * n - f * m; + + result.X.Z = +(b * gp_ho - c * fp_hn + d * fo_gn) * invDet; + result.Y.Z = -(a * gp_ho - c * ep_hm + d * eo_gm) * invDet; + result.Z.Z = +(a * fp_hn - b * ep_hm + d * en_fm) * invDet; + result.W.Z = -(a * fo_gn - b * eo_gm + c * en_fm) * invDet; + + var gl_hk = g * l - h * k; + var fl_hj = f * l - h * j; + var fk_gj = f * k - g * j; + var el_hi = e * l - h * i; + var ek_gi = e * k - g * i; + var ej_fi = e * j - f * i; + + result.X.W = -(b * gl_hk - c * fl_hj + d * fk_gj) * invDet; + result.Y.W = +(a * gl_hk - c * el_hi + d * ek_gi) * invDet; + result.Z.W = -(a * fl_hj - b * el_hi + d * ej_fi) * invDet; + result.W.W = +(a * fk_gj - b * ek_gi + c * ej_fi) * invDet; + + return true; + } + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Lerp(float4x4 a, float4x4 b, float amount) + { + float4x4 result; + + result.X = float4.Lerp(a.X, b.X, amount); + result.Y = float4.Lerp(a.Y, b.Y, amount); + result.Z = float4.Lerp(a.Z, b.Z, amount); + result.W = float4.Lerp(a.W, b.W, amount); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Transform(float4x4 value, floatQuat rotation) + { + // Compute rotation matrix. + var x2 = rotation.X + rotation.X; + var y2 = rotation.Y + rotation.Y; + var z2 = rotation.Z + rotation.Z; + + var wx2 = rotation.W * x2; + var wy2 = rotation.W * y2; + var wz2 = rotation.W * z2; + + var xx2 = rotation.X * x2; + var xy2 = rotation.X * y2; + var xz2 = rotation.X * z2; + + var yy2 = rotation.Y * y2; + var yz2 = rotation.Y * z2; + var zz2 = rotation.Z * z2; + + var q11 = 1.0f - yy2 - zz2; + var q21 = xy2 - wz2; + var q31 = xz2 + wy2; + + var q12 = xy2 + wz2; + var q22 = 1.0f - xx2 - zz2; + var q32 = yz2 - wx2; + + var q13 = xz2 - wy2; + var q23 = yz2 + wx2; + var q33 = 1.0f - xx2 - yy2; + + float4x4 result; + + result.X = new float4( + value.X.X * q11 + value.X.Y * q21 + value.X.Z * q31, + value.X.X * q12 + value.X.Y * q22 + value.X.Z * q32, + value.X.X * q13 + value.X.Y * q23 + value.X.Z * q33, + value.X.W + ); + result.Y = new float4( + value.Y.X * q11 + value.Y.Y * q21 + value.Y.Z * q31, + value.Y.X * q12 + value.Y.Y * q22 + value.Y.Z * q32, + value.Y.X * q13 + value.Y.Y * q23 + value.Y.Z * q33, + value.Y.W + ); + result.Z = new float4( + value.Z.X * q11 + value.Z.Y * q21 + value.Z.Z * q31, + value.Z.X * q12 + value.Z.Y * q22 + value.Z.Z * q32, + value.Z.X * q13 + value.Z.Y * q23 + value.Z.Z * q33, + value.Z.W + ); + result.W = new float4( + value.W.X * q11 + value.W.Y * q21 + value.W.Z * q31, + value.W.X * q12 + value.W.Y * q22 + value.W.Z * q32, + value.W.X * q13 + value.W.Y * q23 + value.W.Z * q33, + value.W.W + ); + + return result; + } + + /// + public static float4 Transform(float4x4 matrix, float4 vector) + { + return Multiply(matrix, vector); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Transpose(float4x4 matrix) + { + return TransposeKernel(in matrix); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float GetDeterminant() + { + // | a b c d | | f g h | | e g h | | e f h | | e f g | + // | e f g h | = a | j k l | - b | i k l | + c | i j l | - d | i j k | + // | i j k l | | n o p | | m o p | | m n p | | m n o | + // | m n o p | + // + // | f g h | + // a | j k l | = a ( f ( kp - lo ) - g ( jp - ln ) + h ( jo - kn ) ) + // | n o p | + // + // | e g h | + // b | i k l | = b ( e ( kp - lo ) - g ( ip - lm ) + h ( io - km ) ) + // | m o p | + // + // | e f h | + // c | i j l | = c ( e ( jp - ln ) - f ( ip - lm ) + h ( in - jm ) ) + // | m n p | + // + // | e f g | + // d | i j k | = d ( e ( jo - kn ) - f ( io - km ) + g ( in - jm ) ) + // | m n o | + // + // Cost of operation + // 17 adds and 28 muls. + // + // add: 6 + 8 + 3 = 17 + // mul: 12 + 16 = 28 + + float a = X.X, + b = X.Y, + c = X.Z, + d = X.W; + float e = Y.X, + f = Y.Y, + g = Y.Z, + h = Y.W; + float i = Z.X, + j = Z.Y, + k = Z.Z, + l = Z.W; + float m = W.X, + n = W.Y, + o = W.Z, + p = W.W; + + var kp_lo = k * p - l * o; + var jp_ln = j * p - l * n; + var jo_kn = j * o - k * n; + var ip_lm = i * p - l * m; + var io_km = i * o - k * m; + var in_jm = i * n - j * m; + + return a * (f * kp_lo - g * jp_ln + h * jo_kn) + - b * (e * kp_lo - g * ip_lm + h * io_km) + + c * (e * jp_ln - f * ip_lm + h * in_jm) + - d * (e * jo_kn - f * io_km + g * in_jm); + } + + private struct CanonicalBasis + { + public float3 Row0; + public float3 Row1; + public float3 Row2; + } + + private unsafe struct VectorBasis + { +#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value + public float3* Element0; + public float3* Element1; + public float3* Element2; +#pragma warning restore CS0649 // Field is never assigned to, and will always have its default value + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Add(float4x4 a, float4x4 b) + { + return a + b; + } + + /// + public static float4x4 Multiply(float4x4 a, float4x4 b) + { + return a * b; + } + + /// Performs matrix multiplication to multiply a matrix by a vector to compute the product. + /// The matrix. + /// The vector. + /// The product vector. + /// + /// The method defines the operation + /// of the multiplication operator for objects. + /// + public static float4 Multiply(float4x4 matrix, float4 vector) + { + float4 result; + + result.X = float4.Dot(matrix.X, vector); + result.Y = float4.Dot(matrix.Y, vector); + result.Z = float4.Dot(matrix.Z, vector); + result.W = float4.Dot(matrix.W, vector); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Multiply(float4x4 a, float b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Negate(float4x4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Subtract(float4x4 a, float4x4 b) + { + return a - b; + } + + /// + public static float4x4 CreateLookAt(float3 cameraPosition, float3 cameraTarget, float3 cameraUpVector) + { + var cameraDirection = cameraTarget - cameraPosition; + return CreateLookTo(cameraPosition, cameraDirection, cameraUpVector); + } + + /// + public static float4x4 CreateLookAtLeftHanded(float3 cameraPosition, float3 cameraTarget, float3 cameraUpVector) + { + var cameraDirection = cameraTarget - cameraPosition; + return CreateLookToLeftHanded(cameraPosition, cameraDirection, cameraUpVector); + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.operators.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.operators.gen.cs new file mode 100644 index 0000000..81661e3 --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.operators.gen.cs @@ -0,0 +1,100 @@ +// - edit Matrix.operators.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator +(float4x4 left, float4x4 right) + { + float4x4 result; + + result.X = left.X + right.X; + result.Y = left.Y + right.Y; + result.Z = left.Z + right.Z; + result.W = left.W + right.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(float4x4 left, float4x4 right) + { + return left.X == right.X && left.Y == right.Y && left.Z == right.Z && left.W == right.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(float4x4 left, float4x4 right) + { + return left.X != right.X || left.Y != right.Y || left.Z != right.Z || left.W != right.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator *(float4x4 left, float4x4 right) + { + ref readonly var l = ref left.AsRows(); + ref readonly var r = ref right.AsRows(); + + var result = new Rows( + r.Transform(l.X), + r.Transform(l.Y), + r.Transform(l.Z), + r.Transform(l.W)); + + return Unsafe.BitCast(result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator *(float4x4 matrix, float4 vector) + { + return Multiply(matrix, vector); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator *(float4x4 left, float right) + { + float4x4 result; + + result.X = left.X * right; + result.Y = left.Y * right; + result.Z = left.Z * right; + result.W = left.W * right; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator -(float4x4 left, float4x4 right) + { + float4x4 result; + + result.X = left.X - right.X; + result.Y = left.Y - right.Y; + result.Z = left.Z - right.Z; + result.W = left.W - right.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator -(float4x4 value) + { + float4x4 result; + + result.X = -value.X; + result.Y = -value.Y; + result.Z = -value.Z; + result.W = -value.W; + + return result; + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.pack.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.pack.gen.cs new file mode 100644 index 0000000..8e28771 --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.pack.gen.cs @@ -0,0 +1,32 @@ +// - edit Matrix.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + public static float4x4 Pack(in double4x4 vector, Func elementConverter) + { + MatrixPack.Pack(vector, out float4x4 result, elementConverter); + return result; + } + + public static void Pack( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + MatrixPack.Pack(source, destination, elementConverter); + } + + public static float4x4 Pack(in double4x4 vector) + { + return Pack(vector, f => (float)f); + } + + public static void Pack(in ReadOnlySpan source, Span destination) + { + Pack(source, destination, f => (float)f); + } +} diff --git a/Brutal.Numerics/Matrix/float4x4/float4x4.swizzle.gen.cs b/Brutal.Numerics/Matrix/float4x4/float4x4.swizzle.gen.cs new file mode 100644 index 0000000..4955a78 --- /dev/null +++ b/Brutal.Numerics/Matrix/float4x4/float4x4.swizzle.gen.cs @@ -0,0 +1,135 @@ +// - edit Matrix.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4x4 +{ + /// + [XmlAttribute] + public float M11 + { + readonly get => X.X; + set => X.X = value; + } + + /// + [XmlAttribute] + public float M12 + { + readonly get => X.Y; + set => X.Y = value; + } + + /// + [XmlAttribute] + public float M13 + { + readonly get => X.Z; + set => X.Z = value; + } + + /// + [XmlAttribute] + public float M14 + { + readonly get => X.W; + set => X.W = value; + } + + /// + [XmlAttribute] + public float M21 + { + readonly get => Y.X; + set => Y.X = value; + } + + /// + [XmlAttribute] + public float M22 + { + readonly get => Y.Y; + set => Y.Y = value; + } + + /// + [XmlAttribute] + public float M23 + { + readonly get => Y.Z; + set => Y.Z = value; + } + + /// + [XmlAttribute] + public float M24 + { + readonly get => Y.W; + set => Y.W = value; + } + + /// + [XmlAttribute] + public float M31 + { + readonly get => Z.X; + set => Z.X = value; + } + + /// + [XmlAttribute] + public float M32 + { + readonly get => Z.Y; + set => Z.Y = value; + } + + /// + [XmlAttribute] + public float M33 + { + readonly get => Z.Z; + set => Z.Z = value; + } + + /// + [XmlAttribute] + public float M34 + { + readonly get => Z.W; + set => Z.W = value; + } + + /// + [XmlAttribute] + public float M41 + { + readonly get => W.X; + set => W.X = value; + } + + /// + [XmlAttribute] + public float M42 + { + readonly get => W.Y; + set => W.Y = value; + } + + /// + [XmlAttribute] + public float M43 + { + readonly get => W.Z; + set => W.Z = value; + } + + /// + [XmlAttribute] + public float M44 + { + readonly get => W.W; + set => W.W = value; + } +} diff --git a/Brutal.Numerics/Packing/MatrixPack.cs b/Brutal.Numerics/Packing/MatrixPack.cs new file mode 100644 index 0000000..9996d6d --- /dev/null +++ b/Brutal.Numerics/Packing/MatrixPack.cs @@ -0,0 +1,86 @@ +using CommunityToolkit.HighPerformance; + +namespace Brutal.Numerics; + +/// +/// Packing utilities for converting between matrix types +/// +public static class MatrixPack +{ + /// + /// Convert a span of matrices of one type to another using a per-element delegate converter function + /// + /// Source span of matrices + /// Destination span of matrices + /// Delegate for converting between source and destination elements + /// Source element type + /// Destination element type + /// Source matrix type + /// Destination matrix type + /// + /// Source and destination matrix types have different element counts, or are different + /// length spans + /// + public static void Pack( + ReadOnlySpan source, + Span destination, + Func elementConverter + ) + where TSourceMatrix : unmanaged, IMatrix + where TDestinationMatrix : unmanaged, IMatrix + where TSourceType : unmanaged + where TDestinationElement : unmanaged + { + if (destination.Length < source.Length) + throw new ArgumentException("Destination span is not long enough to hold the converted matrices"); + if ( + TSourceMatrix.RowCount != TDestinationMatrix.RowCount + || TSourceMatrix.ColumnCount != TDestinationMatrix.ColumnCount + ) + throw new ArgumentException("Source and destination matrix types have different element counts"); + + var src = source.Cast(); + var dst = destination.Cast(); + + for (var i = 0; i < src.Length; i++) + dst[i] = elementConverter(src[i]); + } + + /// + /// Convert a source matrix (cast as a span of elements) to a destination matrix (created from a span of elements) + /// using a per-element delegate converter function + /// This slightly quirky signature is a workaround to avoid generics hell where you have to explicitly write each type + /// + /// Source matrix + /// Destination matrix, created from a span of elements + /// Per-element conversion delegate + /// Element type of input span + /// Element type of output matrix + /// Type of input matrix + /// Type of output matrix + public static void Pack( + in TSourceMatrix source, + out TDestinationMatrix destination, + Func elementConverter + ) + where TSourceType : unmanaged + where TDestinationType : unmanaged + where TSourceMatrix : unmanaged, IMatrix + where TDestinationMatrix : unmanaged, IMatrix + { + if ( + TSourceMatrix.RowCount != TDestinationMatrix.RowCount + || TSourceMatrix.ColumnCount != TDestinationMatrix.ColumnCount + ) + throw new ArgumentException("Source and destination matrix types have different element counts"); + + var src = source.AsSpan(); + Span dst = + stackalloc TDestinationType[TDestinationMatrix.RowCount * TDestinationMatrix.ColumnCount]; + + for (var i = 0; i < src.Length; i++) + dst[i] = elementConverter(src[i]); + + destination = TDestinationMatrix.Create(dst); + } +} diff --git a/Brutal.Numerics/Packing/PackUtils.cs b/Brutal.Numerics/Packing/PackUtils.cs new file mode 100644 index 0000000..3e8a2a7 --- /dev/null +++ b/Brutal.Numerics/Packing/PackUtils.cs @@ -0,0 +1,1067 @@ +namespace Brutal.Numerics; + +/// +/// TODO +/// +public static class PackModes +{ + /// + /// Will simply cast the value into the new target type, maintaining the original value. + /// + public const int Cast = 0; + + /// + /// Will clamp the original value onto the range of the target type before casting. + /// + public const int Clamp = 1; + + /// + /// Will map the value to the range [0, 1] and then multiply by the max value of the target type. + /// The value should be in the range [0, 1] for unsigned conversions, and [-1, 1] for signed conversions. + /// Invalid for integer to integer conversions. + /// + public const int Normalize = 2; + + /// + /// For floating-point to integer conversions, we will round to the nearest integer. + /// Invalid for integer to integer conversions. + /// + public const int Round = 3; + + /// + /// For floating-point to integer conversions, we will clamp to the target range and then truncate the decimal part. + /// Invalid for integer to integer conversions. + /// + public const int Floor = 4; +} + +public static class Pack +{ + /// + /// TODO + /// + public enum Float + { + /// + Truncate = PackModes.Cast, + + /// + Clamp = PackModes.Clamp, + + /// + Normalize = PackModes.Normalize, + + /// + Round = PackModes.Round, + + /// + Floor = PackModes.Floor, + } + + /// + /// TODO + /// + public enum Integer + { + /// + Cast = PackModes.Cast, + + /// + Clamp = PackModes.Clamp, + + /// + Scale = PackModes.Normalize, + } + + /// + /// TODO + /// + public enum IntegerMixed + { + /// + Cast = PackModes.Cast, + + /// + Clamp = PackModes.Clamp, + } +} + +public static class Unpack +{ + /// + /// TODO + /// + public enum Float + { + /// + Cast = PackModes.Cast, + + /// + Normalize = PackModes.Normalize, + } + + /// + /// TODO + /// + public enum Integer + { + /// + Cast = PackModes.Cast, + + /// + Scale = PackModes.Normalize, + } + + /// + /// TODO + /// + public enum IntegerMixed + { + /// + Cast = PackModes.Cast, + } +} + +public static class PackUtils +{ + public static class SByte + { + public static Func ToByte(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => (byte)input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Unpack.Integer mode) + { + return mode switch + { + Unpack.Integer.Cast => static input => (byte)input, + Unpack.Integer.Scale => static input => + input > 0 + ? (short)float.Round(input * (float)short.MaxValue / sbyte.MaxValue) + : (short)float.Round(input * (float)short.MinValue / sbyte.MinValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => (ushort)input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Unpack.Integer mode) + { + return mode switch + { + Unpack.Integer.Cast => static input => input, + Unpack.Integer.Scale => static input => (int)float.Round(input * (float)int.MaxValue / sbyte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => (byte)input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => + input >= 0 ? input / (float)sbyte.MaxValue : -(input / (float)sbyte.MinValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => + input >= 0 ? input / (double)sbyte.MaxValue : -(input / (double)sbyte.MinValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static byte ToByte(sbyte value, Unpack.IntegerMixed mode) + { + return ToByte(mode)(value); + } + + public static short ToShort(sbyte value, Unpack.Integer mode) + { + return ToShort(mode)(value); + } + + public static ushort ToUShort(sbyte value, Unpack.IntegerMixed mode) + { + return ToUShort(mode)(value); + } + + public static int ToInt(sbyte value, Unpack.Integer mode) + { + return ToInt(mode)(value); + } + + public static uint ToUInt(sbyte value, Unpack.IntegerMixed mode) + { + return ToUInt(mode)(value); + } + + public static float ToFloat(sbyte value, Unpack.Float mode) + { + return ToFloat(mode)(value); + } + + public static double ToDouble(sbyte value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class Byte + { + public static Func ToSByte(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (sbyte)input, + Pack.IntegerMixed.Clamp => static input => + (sbyte)byte.Clamp(input, byte.MinValue, (byte)sbyte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Unpack.Integer mode) + { + return mode switch + { + Unpack.Integer.Cast => static input => input, + Unpack.Integer.Scale => static input => + (ushort)float.Round(input * (float)ushort.MaxValue / byte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Unpack.Integer mode) + { + return mode switch + { + Unpack.Integer.Cast => static input => input, + Unpack.Integer.Scale => static input => (uint)float.Round(input * (float)uint.MaxValue / byte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => input / (float)byte.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => input / (double)byte.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(byte value, Pack.IntegerMixed mode) + { + return ToSByte(mode)(value); + } + + public static short ToShort(byte value, Unpack.IntegerMixed mode) + { + return ToShort(mode)(value); + } + + public static ushort ToUShort(byte value, Unpack.Integer mode) + { + return ToUShort(mode)(value); + } + + public static int ToInt(byte value, Unpack.IntegerMixed mode) + { + return ToInt(mode)(value); + } + + public static uint ToUInt(byte value, Unpack.Integer mode) + { + return ToUInt(mode)(value); + } + + public static float ToFloat(byte value, Unpack.Float mode) + { + return ToFloat(mode)(value); + } + + public static double ToDouble(byte value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class Short + { + public static Func ToSByte(Pack.Integer mode) + { + return mode switch + { + Pack.Integer.Cast => static input => (sbyte)input, + Pack.Integer.Clamp => static input => (sbyte)short.Clamp(input, sbyte.MinValue, sbyte.MaxValue), + Pack.Integer.Scale => static input => + input > 0 + ? (sbyte)float.Round(input * (float)sbyte.MaxValue / short.MaxValue) + : (sbyte)float.Round(input * (float)sbyte.MinValue / short.MinValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToByte(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (byte)input, + Pack.IntegerMixed.Clamp => static input => (byte)short.Clamp(input, byte.MinValue, byte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => (ushort)input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Unpack.Integer mode) + { + return mode switch + { + Unpack.Integer.Cast => static input => input, + Unpack.Integer.Scale => static input => (int)float.Round(input * (float)int.MaxValue / short.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => (uint)input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => input / (float)short.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => input / (double)short.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(short value, Pack.Integer mode) + { + return ToSByte(mode)(value); + } + + public static byte ToByte(short value, Pack.IntegerMixed mode) + { + return ToByte(mode)(value); + } + + public static ushort ToUShort(short value, Unpack.IntegerMixed mode) + { + return ToUShort(mode)(value); + } + + public static int ToInt(short value, Unpack.Integer mode) + { + return ToInt(mode)(value); + } + + public static uint ToUInt(short value, Unpack.IntegerMixed mode) + { + return ToUInt(mode)(value); + } + + public static float ToFloat(short value, Unpack.Float mode) + { + return ToFloat(mode)(value); + } + + public static double ToDouble(short value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class UShort + { + public static Func ToSByte(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (sbyte)input, + Pack.IntegerMixed.Clamp => static input => (sbyte)float.Clamp(input, ushort.MinValue, sbyte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToByte(Pack.Integer mode) + { + return mode switch + { + Pack.Integer.Cast => static input => (byte)input, + Pack.Integer.Clamp => static input => (byte)ushort.Min(input, byte.MaxValue), + Pack.Integer.Scale => static input => (byte)float.Round(input * (float)byte.MaxValue / ushort.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (short)input, + Pack.IntegerMixed.Clamp => static input => (short)float.Clamp(input, ushort.MinValue, short.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Unpack.Integer mode) + { + return mode switch + { + Unpack.Integer.Cast => static input => input, + Unpack.Integer.Scale => static input => + (uint)float.Round(input * (float)uint.MaxValue / ushort.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => input / (float)ushort.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + Unpack.Float.Normalize => static input => input / (double)ushort.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(ushort value, Pack.IntegerMixed mode) + { + return ToSByte(mode)(value); + } + + public static byte ToByte(ushort value, Pack.Integer mode) + { + return ToByte(mode)(value); + } + + public static short ToShort(ushort value, Pack.IntegerMixed mode) + { + return ToShort(mode)(value); + } + + public static int ToInt(ushort value, Unpack.IntegerMixed mode) + { + return ToInt(mode)(value); + } + + public static uint ToUInt(ushort value, Unpack.Integer mode) + { + return ToUInt(mode)(value); + } + + public static float ToFloat(ushort value, Unpack.Float mode) + { + return ToFloat(mode)(value); + } + + public static double ToDouble(ushort value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class Int + { + public static Func ToSByte(Pack.Integer mode) + { + return mode switch + { + Pack.Integer.Cast => static input => (sbyte)input, + Pack.Integer.Clamp => static input => (sbyte)int.Clamp(input, sbyte.MinValue, sbyte.MaxValue), + Pack.Integer.Scale => static input => + input > 0 + ? (sbyte)float.Round(input * (float)sbyte.MaxValue / int.MaxValue) + : (sbyte)float.Round(input * (float)sbyte.MinValue / int.MinValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToByte(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (byte)input, + Pack.IntegerMixed.Clamp => static input => (byte)int.Clamp(input, byte.MinValue, byte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Pack.Integer mode) + { + return mode switch + { + Pack.Integer.Cast => static input => (short)input, + Pack.Integer.Clamp => static input => (short)int.Clamp(input, short.MinValue, short.MaxValue), + Pack.Integer.Scale => static input => + input > 0 + ? (short)float.Round(input * (float)short.MaxValue / int.MaxValue) + : (short)float.Round(input * (float)short.MinValue / int.MinValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (ushort)input, + Pack.IntegerMixed.Clamp => static input => (ushort)int.Clamp(input, ushort.MinValue, ushort.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Unpack.IntegerMixed mode) + { + return mode switch + { + Unpack.IntegerMixed.Cast => static input => (uint)input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static i => i, + Unpack.Float.Normalize => static i => i / (float)int.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static i => i, + Unpack.Float.Normalize => static i => i / (double)int.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(int value, Pack.Integer mode) + { + return ToSByte(mode)(value); + } + + public static byte ToByte(int value, Pack.IntegerMixed mode) + { + return ToByte(mode)(value); + } + + public static short ToShort(int value, Pack.Integer mode) + { + return ToShort(mode)(value); + } + + public static ushort ToUShort(int value, Pack.IntegerMixed mode) + { + return ToUShort(mode)(value); + } + + public static uint ToUInt(int value, Unpack.IntegerMixed mode) + { + return ToUInt(mode)(value); + } + + public static float ToFloat(int value, Unpack.Float mode) + { + return ToFloat(mode)(value); + } + + public static double ToDouble(int value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class UInt + { + public static Func ToSByte(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (sbyte)input, + Pack.IntegerMixed.Clamp => static input => (sbyte)float.Clamp(input, uint.MinValue, sbyte.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToByte(Pack.Integer mode) + { + return mode switch + { + Pack.Integer.Cast => static input => (byte)input, + Pack.Integer.Clamp => static input => (byte)float.Clamp(input, byte.MinValue, byte.MaxValue), + Pack.Integer.Scale => static input => (byte)float.Round(input * (float)byte.MaxValue / uint.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (short)input, + Pack.IntegerMixed.Clamp => static input => (short)float.Clamp(input, uint.MinValue, short.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Pack.Integer mode) + { + return mode switch + { + Pack.Integer.Cast => static input => (ushort)input, + Pack.Integer.Clamp => static input => (ushort)float.Clamp(input, ushort.MinValue, ushort.MaxValue), + Pack.Integer.Scale => static input => + (ushort)float.Round(input * (float)ushort.MaxValue / uint.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Pack.IntegerMixed mode) + { + return mode switch + { + Pack.IntegerMixed.Cast => static input => (int)input, + Pack.IntegerMixed.Clamp => static input => (int)float.Clamp(input, uint.MinValue, int.MaxValue), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static i => i, + Unpack.Float.Normalize => static i => i / (float)int.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static i => i, + Unpack.Float.Normalize => static i => i / (double)int.MaxValue, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(uint value, Pack.IntegerMixed mode) + { + return ToSByte(mode)(value); + } + + public static byte ToByte(uint value, Pack.Integer mode) + { + return ToByte(mode)(value); + } + + public static short ToShort(uint value, Pack.IntegerMixed mode) + { + return ToShort(mode)(value); + } + + public static ushort ToUShort(uint value, Pack.Integer mode) + { + return ToUShort(mode)(value); + } + + public static int ToInt(uint value, Pack.IntegerMixed mode) + { + return ToInt(mode)(value); + } + + public static float ToFloat(uint value, Unpack.Float mode) + { + return ToFloat(mode)(value); + } + + public static double ToDouble(uint value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class Float + { + public static Func ToSByte(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (sbyte)input, + Pack.Float.Normalize => static input => + (sbyte)float.Min(sbyte.MaxValue, float.Floor(float.Clamp(input, 0, 1) * (sbyte.MaxValue + 1))), + Pack.Float.Clamp => static input => (sbyte)float.Clamp(input, sbyte.MinValue, sbyte.MaxValue), + Pack.Float.Round => static input => + (sbyte)float.Round(float.Clamp(input, sbyte.MinValue, sbyte.MaxValue)), + Pack.Float.Floor => static input => + (sbyte)float.Floor(float.Clamp(input, sbyte.MinValue, sbyte.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToByte(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (byte)input, + Pack.Float.Normalize => static input => + (byte)float.Min(byte.MaxValue, float.Floor(float.Clamp(input, 0, 1) * (byte.MaxValue + 1))), + Pack.Float.Clamp => static input => (byte)float.Clamp(input, byte.MinValue, byte.MaxValue), + Pack.Float.Round => static input => (byte)float.Round(float.Clamp(input, byte.MinValue, byte.MaxValue)), + Pack.Float.Floor => static input => (byte)float.Floor(float.Clamp(input, byte.MinValue, byte.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (short)input, + Pack.Float.Normalize => static input => + (short)float.Min(short.MaxValue, float.Floor(float.Clamp(input, 0, 1) * (short.MaxValue + 1))), + Pack.Float.Clamp => static input => (short)float.Clamp(input, short.MinValue, short.MaxValue), + Pack.Float.Round => static input => + (short)float.Round(float.Clamp(input, short.MinValue, short.MaxValue)), + Pack.Float.Floor => static input => + (short)float.Floor(float.Clamp(input, short.MinValue, short.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (ushort)input, + Pack.Float.Normalize => static input => + (ushort)float.Min(ushort.MaxValue, float.Floor(float.Clamp(input, 0, 1) * (ushort.MaxValue + 1))), + Pack.Float.Clamp => static input => (ushort)float.Clamp(input, ushort.MinValue, ushort.MaxValue), + Pack.Float.Round => static input => + (ushort)float.Round(float.Clamp(input, ushort.MinValue, ushort.MaxValue)), + Pack.Float.Floor => static input => + (ushort)float.Floor(float.Clamp(input, ushort.MinValue, ushort.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (int)input, + Pack.Float.Normalize => static input => + (int)float.Min(int.MaxValue, float.Floor(float.Clamp(input, 0, 1) * ((long)int.MaxValue + 1))), + Pack.Float.Clamp => static input => (int)float.Clamp(input, int.MinValue, int.MaxValue), + Pack.Float.Round => static input => (int)float.Round(float.Clamp(input, int.MinValue, int.MaxValue)), + Pack.Float.Floor => static input => (int)float.Floor(float.Clamp(input, int.MinValue, int.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (uint)input, + Pack.Float.Normalize => static input => + (uint)float.Min(uint.MaxValue, float.Floor(float.Clamp(input, 0, 1) * ((ulong)uint.MaxValue + 1))), + Pack.Float.Clamp => static input => (uint)float.Clamp(input, uint.MinValue, uint.MaxValue), + Pack.Float.Round => static input => (uint)float.Round(float.Clamp(input, uint.MinValue, uint.MaxValue)), + Pack.Float.Floor => static input => (uint)float.Floor(float.Clamp(input, uint.MinValue, uint.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToDouble(Unpack.Float mode) + { + return mode switch + { + Unpack.Float.Cast => static input => input, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(float value, Pack.Float mode) + { + return ToSByte(mode)(value); + } + + public static byte ToByte(float value, Pack.Float mode) + { + return ToByte(mode)(value); + } + + public static short ToShort(float value, Pack.Float mode) + { + return ToShort(mode)(value); + } + + public static ushort ToUShort(float value, Pack.Float mode) + { + return ToUShort(mode)(value); + } + + public static int ToInt(float value, Pack.Float mode) + { + return ToInt(mode)(value); + } + + public static uint ToUInt(float value, Pack.Float mode) + { + return ToUInt(mode)(value); + } + + public static double ToDouble(float value, Unpack.Float mode) + { + return ToDouble(mode)(value); + } + } + + public static class Double + { + public static Func ToSByte(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (sbyte)input, + Pack.Float.Normalize => static input => (sbyte)double.Floor(input * sbyte.MaxValue), + Pack.Float.Clamp => static input => (sbyte)double.Clamp(input, sbyte.MinValue, sbyte.MaxValue), + Pack.Float.Round => static input => + (sbyte)double.Round(double.Clamp(input, sbyte.MinValue, sbyte.MaxValue)), + Pack.Float.Floor => static input => + (sbyte)double.Floor(double.Clamp(input, sbyte.MinValue, sbyte.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToByte(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (byte)input, + Pack.Float.Normalize => static input => (byte)double.Floor(input * byte.MaxValue), + Pack.Float.Clamp => static input => (byte)double.Clamp(input, byte.MinValue, byte.MaxValue), + Pack.Float.Round => static input => + (byte)double.Round(double.Clamp(input, byte.MinValue, byte.MaxValue)), + Pack.Float.Floor => static input => + (byte)double.Floor(double.Clamp(input, byte.MinValue, byte.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToShort(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (short)input, + Pack.Float.Normalize => static input => (short)double.Floor(input * short.MaxValue), + Pack.Float.Clamp => static input => (short)double.Clamp(input, short.MinValue, short.MaxValue), + Pack.Float.Round => static input => + (short)double.Round(double.Clamp(input, short.MinValue, short.MaxValue)), + Pack.Float.Floor => static input => + (short)double.Floor(double.Clamp(input, short.MinValue, short.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUShort(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (ushort)input, + Pack.Float.Normalize => static input => (ushort)double.Floor(input * ushort.MaxValue), + Pack.Float.Clamp => static input => (ushort)double.Clamp(input, ushort.MinValue, ushort.MaxValue), + Pack.Float.Round => static input => + (ushort)double.Round(double.Clamp(input, ushort.MinValue, ushort.MaxValue)), + Pack.Float.Floor => static input => + (ushort)double.Floor(double.Clamp(input, ushort.MinValue, ushort.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToInt(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (int)input, + Pack.Float.Normalize => static input => (int)double.Floor(input * int.MaxValue), + Pack.Float.Clamp => static input => (int)double.Clamp(input, int.MinValue, int.MaxValue), + Pack.Float.Round => static input => (int)double.Round(double.Clamp(input, int.MinValue, int.MaxValue)), + Pack.Float.Floor => static input => (int)double.Floor(double.Clamp(input, int.MinValue, int.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToUInt(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (uint)input, + Pack.Float.Normalize => static input => (uint)double.Floor(input * uint.MaxValue), + Pack.Float.Clamp => static input => (uint)double.Clamp(input, uint.MinValue, uint.MaxValue), + Pack.Float.Round => static input => + (uint)double.Round(double.Clamp(input, uint.MinValue, uint.MaxValue)), + Pack.Float.Floor => static input => + (uint)double.Floor(double.Clamp(input, uint.MinValue, uint.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static Func ToFloat(Pack.Float mode) + { + return mode switch + { + Pack.Float.Truncate => static input => (float)input, + Pack.Float.Normalize => static input => (float)input, + Pack.Float.Clamp => static input => (float)double.Clamp(input, float.MinValue, float.MaxValue), + Pack.Float.Round => static input => + (float)double.Round(double.Clamp(input, float.MinValue, float.MaxValue)), + Pack.Float.Floor => static input => + (float)double.Floor(double.Clamp(input, float.MinValue, float.MaxValue)), + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static sbyte ToSByte(double value, Pack.Float mode) + { + return ToSByte(mode)(value); + } + + public static byte ToByte(double value, Pack.Float mode) + { + return ToByte(mode)(value); + } + + public static short ToShort(double value, Pack.Float mode) + { + return ToShort(mode)(value); + } + + public static ushort ToUShort(double value, Pack.Float mode) + { + return ToUShort(mode)(value); + } + + public static int ToInt(double value, Pack.Float mode) + { + return ToInt(mode)(value); + } + + public static uint ToUInt(double value, Pack.Float mode) + { + return ToUInt(mode)(value); + } + + public static double ToFloat(double value, Pack.Float mode) + { + return ToFloat(mode)(value); + } + } +} diff --git a/Brutal.Numerics/Packing/QuaternionPack.cs b/Brutal.Numerics/Packing/QuaternionPack.cs new file mode 100644 index 0000000..bd53b27 --- /dev/null +++ b/Brutal.Numerics/Packing/QuaternionPack.cs @@ -0,0 +1,79 @@ +using CommunityToolkit.HighPerformance; + +namespace Brutal.Numerics; + +/// +/// Packing utilities for converting between vector types +/// +public static class QuaternionPack +{ + /// + /// Convert a span of vectors of one type to another using a per-element delegate converter function + /// + /// Source span of vectors + /// Destination span of vectors + /// Delegate for converting between source and destination elements + /// Source element type + /// Destination element type + /// Source vector type + /// Destination vector type + /// + /// Source and destination vector types have different element counts, or are different + /// length spans + /// + public static void Pack( + ReadOnlySpan source, + Span destination, + Func elementConverter + ) + where TSourceQuaternion : unmanaged, IQuaternion + where TDestinationQuaternion : unmanaged, IQuaternion + where TSourceType : unmanaged + where TDestinationElement : unmanaged + { + if (destination.Length < source.Length) + throw new ArgumentException("Destination span is not long enough to hold the converted vectors"); + if (TSourceQuaternion.ComponentCount != TDestinationQuaternion.ComponentCount) + throw new ArgumentException("Source and destination vector types have different element counts"); + + var src = source.Cast(); + var dst = destination.Cast(); + + for (var i = 0; i < src.Length; i++) + dst[i] = elementConverter(src[i]); + } + + /// + /// Convert a source vector (cast as a span of elements) to a destination vector (created from a span of elements) + /// using a per-element delegate converter function + /// This slightly quirky signature is a workaround to avoid generics hell where you have to explicitly write each type + /// + /// Source vector + /// Destination vector, created from a span of elements + /// Per-element conversion delegate + /// Element type of input span + /// Element type of output vector + /// Type of input vector + /// Type of output vector + public static void Pack( + in TSourceQuaternion source, + out TDestinationQuaternion destination, + Func elementConverter + ) + where TSourceType : unmanaged + where TDestinationType : unmanaged + where TSourceQuaternion : unmanaged, IQuaternion + where TDestinationQuaternion : unmanaged, IQuaternion + { + if (TDestinationQuaternion.ComponentCount < TSourceQuaternion.ComponentCount) + throw new ArgumentException("Destination vector type has fewer elements than source vector type"); + + var src = source.AsSpan(); + Span dst = stackalloc TDestinationType[TDestinationQuaternion.ComponentCount]; + + for (var i = 0; i < src.Length; i++) + dst[i] = elementConverter(src[i]); + + destination = TDestinationQuaternion.Create(dst); + } +} diff --git a/Brutal.Numerics/Packing/VectorPack.cs b/Brutal.Numerics/Packing/VectorPack.cs new file mode 100644 index 0000000..6d1a3fd --- /dev/null +++ b/Brutal.Numerics/Packing/VectorPack.cs @@ -0,0 +1,79 @@ +using CommunityToolkit.HighPerformance; + +namespace Brutal.Numerics; + +/// +/// Packing utilities for converting between vector types +/// +public static class VectorPack +{ + /// + /// Convert a span of vectors of one type to another using a per-element delegate converter function + /// + /// Source span of vectors + /// Destination span of vectors + /// Delegate for converting between source and destination elements + /// Source element type + /// Destination element type + /// Source vector type + /// Destination vector type + /// + /// Source and destination vector types have different element counts, or are different + /// length spans + /// + public static void Pack( + ReadOnlySpan source, + Span destination, + Func elementConverter + ) + where TSourceVector : unmanaged, IVector + where TDestinationVector : unmanaged, IVector + where TSourceType : unmanaged + where TDestinationElement : unmanaged + { + if (destination.Length < source.Length) + throw new ArgumentException("Destination span is not long enough to hold the converted vectors"); + if (TSourceVector.ComponentCount != TDestinationVector.ComponentCount) + throw new ArgumentException("Source and destination vector types have different element counts"); + + var src = source.Cast(); + var dst = destination.Cast(); + + for (var i = 0; i < src.Length; i++) + dst[i] = elementConverter(src[i]); + } + + /// + /// Convert a source vector (cast as a span of elements) to a destination vector (created from a span of elements) + /// using a per-element delegate converter function + /// This slightly quirky signature is a workaround to avoid generics hell where you have to explicitly write each type + /// + /// Source vector + /// Destination vector, created from a span of elements + /// Per-element conversion delegate + /// Element type of input span + /// Element type of output vector + /// Type of input vector + /// Type of output vector + public static void Pack( + in TSourceVector source, + out TDestinationVector destination, + Func elementConverter + ) + where TSourceType : unmanaged + where TDestinationType : unmanaged + where TSourceVector : unmanaged, IVector + where TDestinationVector : unmanaged, IVector + { + if (TDestinationVector.ComponentCount < TSourceVector.ComponentCount) + throw new ArgumentException("Destination vector type has fewer elements than source vector type"); + + var src = source.AsSpan(); + Span dst = stackalloc TDestinationType[TDestinationVector.ComponentCount]; + + for (var i = 0; i < src.Length; i++) + dst[i] = elementConverter(src[i]); + + destination = TDestinationVector.Create(dst); + } +} diff --git a/Brutal.Numerics/Plane/IPlane.cs b/Brutal.Numerics/Plane/IPlane.cs new file mode 100644 index 0000000..8c27c79 --- /dev/null +++ b/Brutal.Numerics/Plane/IPlane.cs @@ -0,0 +1,32 @@ +// ReSharper disable InconsistentNaming + +namespace Brutal.Numerics; + +/// Defines a generic plane type. +/// The type that implements the interface. +/// The normal vector type +/// The component type. +public interface IPlane : IEquatable, IFormattable + where TSelf : IPlane +{ + public TVectorType Normal { get; } + public T D { get; } + + /// Construct a plane of this type from a span (normal xyz, then d). + static abstract TSelf Create(ReadOnlySpan span); +} + +internal class PlaneDebugView(IPlane p) + where TSelf : IPlane +{ + /// + public TVectorType Normal => p.Normal; + + /// + public T D => p.D; + + public override string? ToString() + { + return p.ToString(); + } +} diff --git a/Brutal.Numerics/Plane/doublePlane/doublePlane.gen.cs b/Brutal.Numerics/Plane/doublePlane/doublePlane.gen.cs new file mode 100644 index 0000000..be00c26 --- /dev/null +++ b/Brutal.Numerics/Plane/doublePlane/doublePlane.gen.cs @@ -0,0 +1,149 @@ +// - edit Plane.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Represents a plane in three-dimensional space, with double components. +/// +[DebuggerTypeProxy(typeof(PlaneDebugView))] +public partial struct doublePlane : IPlane +{ + /// + public double3 Normal { get; set; } + + /// + public double D { get; set; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doublePlane(double x, double y, double z, double d) + { + Normal = new double3(x, y, z); + D = d; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doublePlane(double3 normal, double d) + { + Normal = normal; + D = d; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doublePlane(double4 value) + { + Normal = value.XYZ; + D = value.W; + } + + /// A mutable view over the 4 components: normal xyz, then d. + /// + /// Deliberately NOT a readonly member, because it hands out a writable view. The consequence is that + /// calling it on a readonly field or an parameter gets you a span over a + /// defensive COPY, so writes there are silently lost - reach for instead. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// A read-only view over the 4 components, safe in the readonly contexts where would view a copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } + + /// Construct a plane of this type from the leading 4 elements of a span (normal xyz, then d). + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doublePlane(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// Construct a plane of this type from a span (normal xyz, then d). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static doublePlane IPlane.Create(ReadOnlySpan span) => new(span); +} + +// Operators +public partial struct doublePlane +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(doublePlane a, doublePlane b) + { + // IEEE like the vector ==; Equals stays NaN-reflexive (see Vector.equality.tt) + return a.Normal == b.Normal && a.D == b.D; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(doublePlane a, doublePlane b) + { + return !(a == b); + } +} + +// IEquatable +public partial struct doublePlane +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly bool Equals([NotNullWhen(true)] object? obj) + { + return obj is doublePlane other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(doublePlane other) + { + return Normal.Equals(other.Normal) && D.Equals(other.D); + } + + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(Normal, D); + } +} + +// String +public partial struct doublePlane +{ + /// + public readonly override string ToString() + { + return $"{{ Normal:{Normal} D:{D} }}"; + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + return $"{{ Normal:{Normal.ToString(format, formatProvider)} D:{D.ToString(format, formatProvider)} }}"; + } + + /// Reinterpret as the matching vector4 - xyz+d in the same order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private readonly double4 AsDouble4() + { + return Unsafe.BitCast(this); + } + + /// Reinterpret a vector4 as a plane. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static doublePlane FromDouble4(double4 value) + { + return Unsafe.BitCast(value); + } +} diff --git a/Brutal.Numerics/Plane/doublePlane/doublePlane.numerics.gen.cs b/Brutal.Numerics/Plane/doublePlane/doublePlane.numerics.gen.cs new file mode 100644 index 0000000..40dd7c1 --- /dev/null +++ b/Brutal.Numerics/Plane/doublePlane/doublePlane.numerics.gen.cs @@ -0,0 +1,80 @@ +// - edit Plane.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doublePlane +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doublePlane CreateFromVertices(double3 point1, double3 point2, double3 point3) + { + var normal = double3.Normalize(double3.Cross(point2 - point1, point3 - point1)); + + return new doublePlane(normal, -double3.Dot(normal, point1)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Dot(doublePlane plane, double4 value) + { + return double4.Dot(plane.AsDouble4(), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double DotCoordinate(doublePlane plane, double3 value) + { + return Dot(plane, new double4(value, 1)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double DotNormal(doublePlane plane, double3 value) + { + return double3.Dot(plane.Normal, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doublePlane Normalize(doublePlane value) + { + var lengthSquared = value.Normal.LengthSquared(); + if (lengthSquared == double.PositiveInfinity) + return default; + + var length = double.Sqrt(lengthSquared); + return new doublePlane(value.Normal / length, value.D / length); + } + + /// + /// Returns a zero plane if the input plane is zero + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doublePlane NormalizeOrZero(doublePlane value) + { + var normalLengthSquared = value.Normal.LengthSquared(); + if (normalLengthSquared == 0) + return new doublePlane(double3.Zero, 0); + + if (normalLengthSquared == double.PositiveInfinity) + return default; + + var length = double.Sqrt(normalLengthSquared); + return new doublePlane(value.Normal / length, value.D / length); + } + + /// + // deliberately not AggressiveInlining, either overload: this one composes a full matrix Invert + public static doublePlane Transform(doublePlane plane, double4x4 matrix) + { + double4x4.Invert(matrix, out var inverseMatrix); + return FromDouble4(double4.Transform(plane.AsDouble4(), double4x4.Transpose(inverseMatrix))); + } + + /// + public static doublePlane Transform(doublePlane plane, doubleQuat rotation) + { + return FromDouble4(double4.Transform(plane.AsDouble4(), rotation)); + } +} + diff --git a/Brutal.Numerics/Plane/floatPlane/floatPlane.gen.cs b/Brutal.Numerics/Plane/floatPlane/floatPlane.gen.cs new file mode 100644 index 0000000..94a545e --- /dev/null +++ b/Brutal.Numerics/Plane/floatPlane/floatPlane.gen.cs @@ -0,0 +1,149 @@ +// - edit Plane.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Represents a plane in three-dimensional space, with float components. +/// +[DebuggerTypeProxy(typeof(PlaneDebugView))] +public partial struct floatPlane : IPlane +{ + /// + public float3 Normal { get; set; } + + /// + public float D { get; set; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatPlane(float x, float y, float z, float d) + { + Normal = new float3(x, y, z); + D = d; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatPlane(float3 normal, float d) + { + Normal = normal; + D = d; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatPlane(float4 value) + { + Normal = value.XYZ; + D = value.W; + } + + /// A mutable view over the 4 components: normal xyz, then d. + /// + /// Deliberately NOT a readonly member, because it hands out a writable view. The consequence is that + /// calling it on a readonly field or an parameter gets you a span over a + /// defensive COPY, so writes there are silently lost - reach for instead. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// A read-only view over the 4 components, safe in the readonly contexts where would view a copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } + + /// Construct a plane of this type from the leading 4 elements of a span (normal xyz, then d). + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatPlane(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// Construct a plane of this type from a span (normal xyz, then d). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static floatPlane IPlane.Create(ReadOnlySpan span) => new(span); +} + +// Operators +public partial struct floatPlane +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(floatPlane a, floatPlane b) + { + // IEEE like the vector ==; Equals stays NaN-reflexive (see Vector.equality.tt) + return a.Normal == b.Normal && a.D == b.D; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(floatPlane a, floatPlane b) + { + return !(a == b); + } +} + +// IEquatable +public partial struct floatPlane +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override readonly bool Equals([NotNullWhen(true)] object? obj) + { + return obj is floatPlane other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(floatPlane other) + { + return Normal.Equals(other.Normal) && D.Equals(other.D); + } + + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(Normal, D); + } +} + +// String +public partial struct floatPlane +{ + /// + public readonly override string ToString() + { + return $"{{ Normal:{Normal} D:{D} }}"; + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + return $"{{ Normal:{Normal.ToString(format, formatProvider)} D:{D.ToString(format, formatProvider)} }}"; + } + + /// Reinterpret as the matching vector4 - xyz+d in the same order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private readonly float4 AsFloat4() + { + return Unsafe.BitCast(this); + } + + /// Reinterpret a vector4 as a plane. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static floatPlane FromFloat4(float4 value) + { + return Unsafe.BitCast(value); + } +} diff --git a/Brutal.Numerics/Plane/floatPlane/floatPlane.numerics.gen.cs b/Brutal.Numerics/Plane/floatPlane/floatPlane.numerics.gen.cs new file mode 100644 index 0000000..bfc7ad0 --- /dev/null +++ b/Brutal.Numerics/Plane/floatPlane/floatPlane.numerics.gen.cs @@ -0,0 +1,80 @@ +// - edit Plane.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatPlane +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatPlane CreateFromVertices(float3 point1, float3 point2, float3 point3) + { + var normal = float3.Normalize(float3.Cross(point2 - point1, point3 - point1)); + + return new floatPlane(normal, -float3.Dot(normal, point1)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Dot(floatPlane plane, float4 value) + { + return float4.Dot(plane.AsFloat4(), value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float DotCoordinate(floatPlane plane, float3 value) + { + return Dot(plane, new float4(value, 1)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float DotNormal(floatPlane plane, float3 value) + { + return float3.Dot(plane.Normal, value); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatPlane Normalize(floatPlane value) + { + var lengthSquared = value.Normal.LengthSquared(); + if (lengthSquared == float.PositiveInfinity) + return default; + + var length = float.Sqrt(lengthSquared); + return new floatPlane(value.Normal / length, value.D / length); + } + + /// + /// Returns a zero plane if the input plane is zero + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatPlane NormalizeOrZero(floatPlane value) + { + var normalLengthSquared = value.Normal.LengthSquared(); + if (normalLengthSquared == 0) + return new floatPlane(float3.Zero, 0); + + if (normalLengthSquared == float.PositiveInfinity) + return default; + + var length = float.Sqrt(normalLengthSquared); + return new floatPlane(value.Normal / length, value.D / length); + } + + /// + // deliberately not AggressiveInlining, either overload: this one composes a full matrix Invert + public static floatPlane Transform(floatPlane plane, float4x4 matrix) + { + float4x4.Invert(matrix, out var inverseMatrix); + return FromFloat4(float4.Transform(plane.AsFloat4(), float4x4.Transpose(inverseMatrix))); + } + + /// + public static floatPlane Transform(floatPlane plane, floatQuat rotation) + { + return FromFloat4(float4.Transform(plane.AsFloat4(), rotation)); + } +} + diff --git a/Brutal.Numerics/Quaternion/IQuaternion.cs b/Brutal.Numerics/Quaternion/IQuaternion.cs new file mode 100644 index 0000000..115ae1f --- /dev/null +++ b/Brutal.Numerics/Quaternion/IQuaternion.cs @@ -0,0 +1,110 @@ +// ReSharper disable InconsistentNaming + +namespace Brutal.Numerics; + +/// Defines a generic quaternion type. +/// The type that implements the interface. +/// The component type. +/* A quaternion IS a component tuple - four lanes of T, indexable, spannable, constructible from a + * span - and used to restate ComponentSize, ComponentCount, the indexer, Create, AsSpan, IEquatable + * and IFormattable verbatim rather than inherit them. + * + * It reaches the function axis the same way, by inheriting rather than redeclaring: a quaternion + * has a dot product and a magnitude, which is exactly why those interfaces carry no family in their + * names. It has NO IDistance, and that omission is the point - Euclidean distance is not the metric + * on rotations. */ +public interface IQuaternion : IComponentTuple, IDotProduct, IMagnitude + where TSelf : IQuaternion +{ + /// + static abstract TSelf Zero { get; } + + /// + static abstract TSelf Identity { get; } + + /// + bool IsIdentity { get; } + + /* The static algebra surface: exposes the statics that already exist on every quaternion + * type, so generic code can call them through the interface (satisfied implicitly). + * Cross-type members (CreateFromAxisAngle and friends) live on IQuaternionFactories below, + * which is where the axis and matrix type parameters they need are paid for. */ + + /// + static abstract TSelf Add(TSelf left, TSelf right); + + /// + static abstract TSelf Subtract(TSelf left, TSelf right); + + /// + static abstract TSelf Multiply(TSelf left, TSelf right); + + /// + static abstract TSelf Multiply(TSelf left, T right); + + /// + static abstract TSelf Negate(TSelf value); + + /// + static abstract TSelf Concatenate(TSelf first, TSelf second); + + /// + static abstract TSelf Conjugate(TSelf value); + + /// + static abstract TSelf Inverse(TSelf value); + + /// + static abstract TSelf Normalize(TSelf value); + + /// + /// Returns a zero quaternion if the input quaternion is zero + static abstract TSelf NormalizeOrZero(TSelf value); + + /// + static abstract TSelf Lerp(TSelf a, TSelf b, T t); + + /// + static abstract TSelf Slerp(TSelf a, TSelf b, T t); +} + +internal class QuaternionDebugView(IQuaternion q) + where TSelf : IQuaternion +{ + public T X => q[0]; + public T Y => q[1]; + public T Z => q[2]; + public T W => q[3]; + + public override string? ToString() + { + return q.ToString(); + } +} + +/// The named ways of constructing a rotation. +/// The type that implements the interface. +/// The component type. +/// The axis type of . +/// The matrix type of . +/* One interface for the three factories rather than one per verb: they are quaternion-only, so by + * family they belong on IQuaternion itself - but they drag in two more type parameters, and making + * every caller that just wants a quaternion name four types is the wrong trade. So they group by + * CONCERN, construction, and the extra parameters are paid only by whoever wants them. + * + * Its one consumer is the quaternion differential suite, which is also why the three interfaces it + * replaces existed - so a suite could reach the members generically. That remains the open question + * about whether "so a test can reach it" justifies an interface; grouping them at least means the + * answer costs one name rather than three. */ +public interface IQuaternionFactories + where TSelf : IQuaternionFactories +{ + /// + static abstract TSelf CreateFromAxisAngle(TVector3 axis, T angle); + + /// + static abstract TSelf CreateFromYawPitchRoll(T yaw, T pitch, T roll); + + /// + static abstract TSelf CreateFromRotationMatrix(TMatrix4x4 matrix); +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.copy.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.copy.gen.cs new file mode 100644 index 0000000..66307e5 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doubleQuat +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.equality.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.equality.gen.cs new file mode 100644 index 0000000..9908d29 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doubleQuat +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(doubleQuat other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is doubleQuat other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(doubleQuat a, doubleQuat b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(doubleQuat a, doubleQuat b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.format.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.format.gen.cs new file mode 100644 index 0000000..7d66599 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.format.gen.cs @@ -0,0 +1,144 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doubleQuat : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + // the handler takes a string format (an IFormattable legacy) - null on the default path stays alloc-free + var formatString = format.IsEmpty ? null : format.ToString(); + var handler = new MemoryExtensions.TryWriteInterpolatedStringHandler(5, 7, destination, provider, out var shouldAppend); + _ = shouldAppend + && handler.AppendLiteral("<") + && handler.AppendFormatted(X, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Y, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Z, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(W, formatString) + && handler.AppendLiteral(">"); + return destination.TryWrite(ref handler, out charsWritten); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + // the handler takes a string format (an IFormattable legacy) - null on the default path stays alloc-free + var formatString = format.IsEmpty ? null : format.ToString(); + var handler = new Utf8.TryWriteInterpolatedStringHandler(5, 7, destination, provider, out var shouldAppend); + _ = shouldAppend + && handler.AppendLiteral("<") + && handler.AppendFormatted(X, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Y, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Z, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(W, formatString) + && handler.AppendLiteral(">"); + return Utf8.TryWrite(destination, ref handler, out bytesWritten); + } + + /// + public static doubleQuat Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static doubleQuat Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static doubleQuat Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static doubleQuat Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid doubleQuat format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out doubleQuat result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out doubleQuat result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out doubleQuat result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a doubleQuat. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out doubleQuat result) + { + result = default; + s = s.Trim(); + if (s.Length < 2 || s[0] != '<' || s[^1] != '>') + return false; + s = s[1..^1]; + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + var separatorIndex = s.IndexOf(separator); + // trimmed: TryFormat writes "separator + space", which must not demand AllowLeadingWhite + if (separatorIndex < 0 || !double.TryParse(s[..separatorIndex].Trim(), style, provider, out var x)) + return false; + s = s[(separatorIndex + separator.Length)..]; + separatorIndex = s.IndexOf(separator); + // trimmed: TryFormat writes "separator + space", which must not demand AllowLeadingWhite + if (separatorIndex < 0 || !double.TryParse(s[..separatorIndex].Trim(), style, provider, out var y)) + return false; + s = s[(separatorIndex + separator.Length)..]; + separatorIndex = s.IndexOf(separator); + // trimmed: TryFormat writes "separator + space", which must not demand AllowLeadingWhite + if (separatorIndex < 0 || !double.TryParse(s[..separatorIndex].Trim(), style, provider, out var z)) + return false; + s = s[(separatorIndex + separator.Length)..]; + if (!double.TryParse(s.Trim(), style, provider, out var w)) + return false; + result = new(x, y, z, w); + return true; + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.gen.cs new file mode 100644 index 0000000..ea87f17 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.gen.cs @@ -0,0 +1,116 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a quaternion with double components. +/// +[DebuggerTypeProxy(typeof(QuaternionDebugView))] +public partial struct doubleQuat : IQuaternion + , IMultiplyOperators + , IMultiplyOperators + , IMultiplyOperators + , IQuaternionFactories +{ + /// + public static int ComponentSize => sizeof(double); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public double X; + + /// + [XmlAttribute] + public double Y; + + /// + [XmlAttribute] + public double Z; + + /// + [XmlAttribute] + public double W; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doubleQuat(double x, double y, double z, double w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doubleQuat(double3 vectorPart, double scalarPart) + { + X = vectorPart.X; + Y = vectorPart.Y; + Z = vectorPart.Z; + W = scalarPart; + } + + /// Creates a quaternion from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public doubleQuat(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static doubleQuat IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public double this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out double x, out double y, out double z, out double w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math-metric.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math-metric.gen.cs new file mode 100644 index 0000000..a1ba394 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math-metric.gen.cs @@ -0,0 +1,48 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doubleQuat +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return double.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Dot(doubleQuat a, doubleQuat b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } + + /// + /// Thrown when the input quaternion is a zero quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Normalize(doubleQuat value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / double.Sqrt(lengthSquared); + } + + /// + /// Returns zero if the input quaternion is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat NormalizeOrZero(doubleQuat value) + { + var length = double.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math.gen.cs new file mode 100644 index 0000000..4bdafc9 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.math.gen.cs @@ -0,0 +1,200 @@ +// - edit Quat.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doubleQuat +{ + /// + public readonly bool IsIdentity => this == Identity; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Concatenate(doubleQuat a, doubleQuat b) + { + return b * a; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Conjugate(doubleQuat value) + { + if (!Vector256.IsHardwareAccelerated) + return new(-value.X, -value.Y, -value.Z, value.W); + + // -x, -y, -z, w + return Unsafe.BitCast, doubleQuat>(Unsafe.BitCast>(value) ^ Vector256.Create(-0.0, -0.0, -0.0, 0.0)); + } + + /// + public static doubleQuat CreateFromAxisAngle(double3 axis, double angle) + { + doubleQuat ans; + + var halfAngle = angle * 0.5; + var (s, c) = double.SinCos(halfAngle); + + ans.X = axis.X * s; + ans.Y = axis.Y * s; + ans.Z = axis.Z * s; + ans.W = c; + + return ans; + } + + /// + public static doubleQuat CreateFromRotationMatrix(double4x4 matrix) + { + var trace = matrix.M11 + matrix.M22 + matrix.M33; + + doubleQuat q = default; + + if (trace > 0.0) + { + var s = double.Sqrt(trace + 1); + q.W = s * 0.5; + s = 0.5 / s; + q.X = (matrix.M23 - matrix.M32) * s; + q.Y = (matrix.M31 - matrix.M13) * s; + q.Z = (matrix.M12 - matrix.M21) * s; + } + else + { + if (matrix.M11 >= matrix.M22 && matrix.M11 >= matrix.M33) + { + var s = double.Sqrt(1 + matrix.M11 - matrix.M22 - matrix.M33); + var invS = 0.5 / s; + q.X = 0.5 * s; + q.Y = (matrix.M12 + matrix.M21) * invS; + q.Z = (matrix.M13 + matrix.M31) * invS; + q.W = (matrix.M23 - matrix.M32) * invS; + } + else if (matrix.M22 > matrix.M33) + { + var s = double.Sqrt(1 + matrix.M22 - matrix.M11 - matrix.M33); + var invS = 0.5 / s; + q.X = (matrix.M21 + matrix.M12) * invS; + q.Y = 0.5 * s; + q.Z = (matrix.M32 + matrix.M23) * invS; + q.W = (matrix.M31 - matrix.M13) * invS; + } + else + { + var s = double.Sqrt(1 + matrix.M33 - matrix.M11 - matrix.M22); + var invS = 0.5 / s; + q.X = (matrix.M31 + matrix.M13) * invS; + q.Y = (matrix.M32 + matrix.M23) * invS; + q.Z = 0.5 * s; + q.W = (matrix.M12 - matrix.M21) * invS; + } + } + + return q; + } + + /// + public static doubleQuat CreateFromYawPitchRoll(double yaw, double pitch, double roll) + { + // Roll first, about axis the object is facing, then + // pitch upward, then yaw to face into the new heading + var (sr, cr) = double.SinCos(roll * 0.5); + var (sp, cp) = double.SinCos(pitch * 0.5); + var (sy, cy) = double.SinCos(yaw * 0.5); + + doubleQuat result; + + result.X = cy * sp * cr + sy * cp * sr; + result.Y = sy * cp * cr - cy * sp * sr; + result.Z = cy * cp * sr - sy * sp * cr; + result.W = cy * cp * cr + sy * sp * sr; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Inverse(doubleQuat value) + { + // -1 ( a -v ) + // q = ( ------------- ------------- ) + // ( a^2 + |v|^2 , a^2 + |v|^2 ) + + return Conjugate(value) / value.LengthSquared(); + } + + /// + public static doubleQuat Lerp(doubleQuat a, doubleQuat b, double amount) + { + var t = amount; + var t1 = 1 - t; + + var dot = Dot(a, b); + + var r = dot >= 0 + ? a * t1 + b * t + : a * t1 - b * t; + + // Normalize it. + var invNorm = 1 / double.Sqrt(r.LengthSquared()); + return r * invNorm; + } + + private const double SlerpEpsilon = 1e-12; + + /// + public static doubleQuat Slerp(doubleQuat a, doubleQuat b, double amount) + { + var t = amount; + + var cosOmega = Dot(a, b); + + var flip = false; + + if (cosOmega < 0) + { + flip = true; + cosOmega = -cosOmega; + } + + double s1, + s2; + + if (cosOmega > 1 - SlerpEpsilon) + { + // Too close, do straight linear interpolation. + s1 = 1 - t; + s2 = flip ? -t : t; + } + else + { + var omega = double.Acos(cosOmega); + var invSinOmega = 1 / double.Sin(omega); + + s1 = double.Sin((1 - t) * omega) * invSinOmega; + s2 = flip ? -double.Sin(t * omega) * invSinOmega : double.Sin(t * omega) * invSinOmega; + } + + return a * s1 + b * s2; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator *(doubleQuat rotation, double2 vector) + { + return double2.Transform(vector, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator *(doubleQuat rotation, double3 vector) + { + return double3.Transform(vector, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator *(doubleQuat rotation, double4 vector) + { + return double4.Transform(vector, rotation); + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.numerics.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.numerics.gen.cs new file mode 100644 index 0000000..b49df42 --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.numerics.gen.cs @@ -0,0 +1,515 @@ +// - edit Quat.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct doubleQuat : INumberBase +{ + /// + public static doubleQuat Zero => default; + + /// + public static doubleQuat Identity => new(0, 0, 0, 1); + + /* One is the multiplicative identity - the identity quaternion - which the concrete API + * already names Identity; a public One would read as all-ones. */ + static doubleQuat INumberBase.One => Identity; + + static doubleQuat IAdditiveIdentity.AdditiveIdentity => Zero; + + static doubleQuat IMultiplicativeIdentity.MultiplicativeIdentity => Identity; + + static int INumberBase.Radix => 2; + + // Abs is the norm, embedded on the real axis as a scalar quaternion (cf. Complex.Abs) + static doubleQuat INumberBase.Abs(doubleQuat value) => new(0, 0, 0, value.Length()); + + static bool INumberBase.IsCanonical(doubleQuat value) => true; + + static bool INumberBase.IsComplexNumber(doubleQuat value) => + value.W != 0 && !(value.X == 0 && value.Y == 0 && value.Z == 0); + + static bool INumberBase.IsImaginaryNumber(doubleQuat value) => + value.W == 0 && double.IsRealNumber(value.X) && double.IsRealNumber(value.Y) && double.IsRealNumber(value.Z); + + static bool INumberBase.IsRealNumber(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsRealNumber(value.W); + + /// Determines if a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsZero(doubleQuat value) + { + return value == Zero; + } + + static bool INumberBase.IsEvenInteger(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsEvenInteger(value.W); + + static bool INumberBase.IsOddInteger(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsOddInteger(value.W); + + static bool INumberBase.IsInteger(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsInteger(value.W); + + static bool INumberBase.IsNegative(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsRealNumber(value.W) && double.IsNegative(value.W); + + static bool INumberBase.IsPositive(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsRealNumber(value.W) && double.IsPositive(value.W); + + static bool INumberBase.IsFinite(doubleQuat value) => + double.IsFinite(value.X) && double.IsFinite(value.Y) && double.IsFinite(value.Z) && double.IsFinite(value.W); + + static bool INumberBase.IsInfinity(doubleQuat value) => + double.IsInfinity(value.X) || double.IsInfinity(value.Y) || double.IsInfinity(value.Z) || double.IsInfinity(value.W); + + static bool INumberBase.IsNegativeInfinity(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsNegativeInfinity(value.W); + + static bool INumberBase.IsPositiveInfinity(doubleQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && double.IsPositiveInfinity(value.W); + + // NaN present and no infinity - infinity dominates, per Complex + static bool INumberBase.IsNaN(doubleQuat value) => + (double.IsNaN(value.X) || double.IsNaN(value.Y) || double.IsNaN(value.Z) || double.IsNaN(value.W)) + && !(double.IsInfinity(value.X) || double.IsInfinity(value.Y) || double.IsInfinity(value.Z) || double.IsInfinity(value.W)); + + static bool INumberBase.IsNormal(doubleQuat value) => + double.IsNormal(value.W) + && (value.X == 0 && value.Y == 0 && value.Z == 0 || (double.IsNormal(value.X) && double.IsNormal(value.Y) && double.IsNormal(value.Z))); + + static bool INumberBase.IsSubnormal(doubleQuat value) => + double.IsSubnormal(value.X) || double.IsSubnormal(value.Y) || double.IsSubnormal(value.Z) || double.IsSubnormal(value.W); + + static doubleQuat INumberBase.MaxMagnitude(doubleQuat a, doubleQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (double.IsNaN(magnitudeA)) + return a; + if (double.IsNaN(magnitudeB)) + return b; + return magnitudeA >= magnitudeB ? a : b; + } + + static doubleQuat INumberBase.MaxMagnitudeNumber(doubleQuat a, doubleQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (double.IsNaN(magnitudeA)) + return b; + if (double.IsNaN(magnitudeB)) + return a; + return magnitudeA >= magnitudeB ? a : b; + } + + static doubleQuat INumberBase.MinMagnitude(doubleQuat a, doubleQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (double.IsNaN(magnitudeA)) + return a; + if (double.IsNaN(magnitudeB)) + return b; + return magnitudeA <= magnitudeB ? a : b; + } + + static doubleQuat INumberBase.MinMagnitudeNumber(doubleQuat a, doubleQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (double.IsNaN(magnitudeA)) + return b; + if (double.IsNaN(magnitudeB)) + return a; + return magnitudeA <= magnitudeB ? a : b; + } + + /* ++/-- add/subtract One = Identity, bumping W - exactly what Complex does. Generic-plane + * only: a footgun on a concrete quat. */ + + static doubleQuat IIncrementOperators.operator ++(doubleQuat value) => value + Identity; + + static doubleQuat IDecrementOperators.operator --(doubleQuat value) => value - Identity; + + static bool INumberBase.TryConvertFromChecked(TOther value, out doubleQuat result) + { + if (typeof(TOther) == typeof(doubleQuat)) + { + result = (doubleQuat)(object)value!; + return true; + } + if (typeof(TOther) == typeof(floatQuat)) + { + var other = (floatQuat)(object)value!; + result = new(double.CreateChecked(other.X), double.CreateChecked(other.Y), double.CreateChecked(other.Z), double.CreateChecked(other.W)); + return true; + } + if (typeof(TOther) == typeof(sbyte)) + { + result = new(0, 0, 0, double.CreateChecked((sbyte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(byte)) + { + result = new(0, 0, 0, double.CreateChecked((byte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(short)) + { + result = new(0, 0, 0, double.CreateChecked((short)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ushort)) + { + result = new(0, 0, 0, double.CreateChecked((ushort)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(int)) + { + result = new(0, 0, 0, double.CreateChecked((int)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(uint)) + { + result = new(0, 0, 0, double.CreateChecked((uint)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(long)) + { + result = new(0, 0, 0, double.CreateChecked((long)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ulong)) + { + result = new(0, 0, 0, double.CreateChecked((ulong)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(float)) + { + result = new(0, 0, 0, double.CreateChecked((float)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(double)) + { + result = new(0, 0, 0, double.CreateChecked((double)(object)value!)); + return true; + } + result = default; + return false; + } + + static bool INumberBase.TryConvertToChecked(doubleQuat value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out doubleQuat result) + { + if (typeof(TOther) == typeof(doubleQuat)) + { + result = (doubleQuat)(object)value!; + return true; + } + if (typeof(TOther) == typeof(floatQuat)) + { + var other = (floatQuat)(object)value!; + result = new(double.CreateSaturating(other.X), double.CreateSaturating(other.Y), double.CreateSaturating(other.Z), double.CreateSaturating(other.W)); + return true; + } + if (typeof(TOther) == typeof(sbyte)) + { + result = new(0, 0, 0, double.CreateSaturating((sbyte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(byte)) + { + result = new(0, 0, 0, double.CreateSaturating((byte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(short)) + { + result = new(0, 0, 0, double.CreateSaturating((short)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ushort)) + { + result = new(0, 0, 0, double.CreateSaturating((ushort)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(int)) + { + result = new(0, 0, 0, double.CreateSaturating((int)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(uint)) + { + result = new(0, 0, 0, double.CreateSaturating((uint)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(long)) + { + result = new(0, 0, 0, double.CreateSaturating((long)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ulong)) + { + result = new(0, 0, 0, double.CreateSaturating((ulong)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(float)) + { + result = new(0, 0, 0, double.CreateSaturating((float)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(double)) + { + result = new(0, 0, 0, double.CreateSaturating((double)(object)value!)); + return true; + } + result = default; + return false; + } + + static bool INumberBase.TryConvertToSaturating(doubleQuat value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out doubleQuat result) + { + if (typeof(TOther) == typeof(doubleQuat)) + { + result = (doubleQuat)(object)value!; + return true; + } + if (typeof(TOther) == typeof(floatQuat)) + { + var other = (floatQuat)(object)value!; + result = new(double.CreateTruncating(other.X), double.CreateTruncating(other.Y), double.CreateTruncating(other.Z), double.CreateTruncating(other.W)); + return true; + } + if (typeof(TOther) == typeof(sbyte)) + { + result = new(0, 0, 0, double.CreateTruncating((sbyte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(byte)) + { + result = new(0, 0, 0, double.CreateTruncating((byte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(short)) + { + result = new(0, 0, 0, double.CreateTruncating((short)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ushort)) + { + result = new(0, 0, 0, double.CreateTruncating((ushort)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(int)) + { + result = new(0, 0, 0, double.CreateTruncating((int)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(uint)) + { + result = new(0, 0, 0, double.CreateTruncating((uint)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(long)) + { + result = new(0, 0, 0, double.CreateTruncating((long)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ulong)) + { + result = new(0, 0, 0, double.CreateTruncating((ulong)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(float)) + { + result = new(0, 0, 0, double.CreateTruncating((float)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(double)) + { + result = new(0, 0, 0, double.CreateTruncating((double)(object)value!)); + return true; + } + result = default; + return false; + } + + static bool INumberBase.TryConvertToTruncating(doubleQuat value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Add(doubleQuat a, doubleQuat b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Divide(doubleQuat a, doubleQuat b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Multiply(doubleQuat a, doubleQuat b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Negate(doubleQuat value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Subtract(doubleQuat a, doubleQuat b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat operator +(doubleQuat a, doubleQuat b) + { + if (!Vector256.IsHardwareAccelerated) + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + + return Unsafe.BitCast, doubleQuat>(Unsafe.BitCast>(a) + Unsafe.BitCast>(b)); + } + + /// + public static doubleQuat operator /(doubleQuat a, doubleQuat b) + { + doubleQuat ans; + + var ax = a.X; + var ay = a.Y; + var az = a.Z; + var aw = a.W; + + //------------------------------------- + // Inverse part. + var ls = b.X * b.X + b.Y * b.Y + b.Z * b.Z + b.W * b.W; + var invNorm = 1 / ls; + + var bx = -b.X * invNorm; + var by = -b.Y * invNorm; + var bz = -b.Z * invNorm; + var bw = b.W * invNorm; + + //------------------------------------- + // Multiply part. + + // cross(av, bv) + var cx = ay * bz - az * by; + var cy = az * bx - ax * bz; + var cz = ax * by - ay * bx; + + var dot = ax * bx + ay * by + az * bz; + + ans.X = ax * bw + bx * aw + cx; + ans.Y = ay * bw + by * aw + cy; + ans.Z = az * bw + bz * aw + cz; + ans.W = aw * bw - dot; + + return ans; + } + + /// + public static doubleQuat operator *(doubleQuat a, doubleQuat b) + { + // off AVX2: scalar arm, in the kernel's accumulation order + if (!Vector256.IsHardwareAccelerated) + return new doubleQuat( + b.X * a.W + b.W * a.X + b.Z * a.Y - b.Y * a.Z, + b.Y * a.W - b.Z * a.X + b.W * a.Y + b.X * a.Z, + b.Z * a.W + b.Y * a.X - b.X * a.Y + b.W * a.Z, + b.W * a.W - b.X * a.X - b.Y * a.Y - b.Z * a.Z); + + var left = Unsafe.BitCast>(a); + var right = Unsafe.BitCast>(b); + + var result = right * left.GetElement(3); + result = Vector256.MultiplyAddEstimate(Vector256.ShuffleNative(right, Vector256.Create(3L, 2L, 1L, 0L)) * left.GetElement(0), Vector256.Create(+1.0, -1.0, +1.0, -1.0), result); + result = Vector256.MultiplyAddEstimate(Vector256.ShuffleNative(right, Vector256.Create(2L, 3L, 0L, 1L)) * left.GetElement(1), Vector256.Create(+1.0, +1.0, -1.0, -1.0), result); + result = Vector256.MultiplyAddEstimate(Vector256.ShuffleNative(right, Vector256.Create(1L, 0L, 3L, 2L)) * left.GetElement(2), Vector256.Create(-1.0, +1.0, +1.0, -1.0), result); + return Unsafe.BitCast, doubleQuat>(result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat operator -(doubleQuat a, doubleQuat b) + { + if (!Vector256.IsHardwareAccelerated) + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + + return Unsafe.BitCast, doubleQuat>(Unsafe.BitCast>(a) - Unsafe.BitCast>(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat operator -(doubleQuat value) + { + return Zero - value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat operator +(doubleQuat value) + { + return value; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct doubleQuat + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat Multiply(doubleQuat a, double b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat operator *(doubleQuat a, double b) + { + if (!Vector256.IsHardwareAccelerated) + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + + return Unsafe.BitCast, doubleQuat>(Unsafe.BitCast>(a) * Vector256.Create(b)); + } + + /// Divides a quaternion by a scalar, componentwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static doubleQuat operator /(doubleQuat a, double b) + { + if (!Vector256.IsHardwareAccelerated) + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + + return Unsafe.BitCast, doubleQuat>(Unsafe.BitCast>(a) / Vector256.Create(b)); + } +} diff --git a/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.pack.gen.cs b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.pack.gen.cs new file mode 100644 index 0000000..cf60d9d --- /dev/null +++ b/Brutal.Numerics/Quaternion/doubleQuat/doubleQuat.pack.gen.cs @@ -0,0 +1,36 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct doubleQuat +{ + public static doubleQuat Unpack(in floatQuat vector, Func elementConverter) + { + QuaternionPack.Pack(vector, out doubleQuat result, elementConverter); + return result; + } + + public static doubleQuat Unpack(in floatQuat vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Float.ToDouble(mode)); + } + + public static void Unpack( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + QuaternionPack.Pack(source, destination, elementConverter); + } + + public static void Unpack( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + Unpack(source, destination, PackUtils.Float.ToDouble(mode)); + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.copy.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.copy.gen.cs new file mode 100644 index 0000000..6ca5474 --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatQuat +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.equality.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.equality.gen.cs new file mode 100644 index 0000000..e6b7d45 --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatQuat +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(floatQuat other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is floatQuat other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(floatQuat a, floatQuat b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(floatQuat a, floatQuat b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.format.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.format.gen.cs new file mode 100644 index 0000000..ba0db86 --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.format.gen.cs @@ -0,0 +1,144 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatQuat : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + // the handler takes a string format (an IFormattable legacy) - null on the default path stays alloc-free + var formatString = format.IsEmpty ? null : format.ToString(); + var handler = new MemoryExtensions.TryWriteInterpolatedStringHandler(5, 7, destination, provider, out var shouldAppend); + _ = shouldAppend + && handler.AppendLiteral("<") + && handler.AppendFormatted(X, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Y, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Z, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(W, formatString) + && handler.AppendLiteral(">"); + return destination.TryWrite(ref handler, out charsWritten); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + // the handler takes a string format (an IFormattable legacy) - null on the default path stays alloc-free + var formatString = format.IsEmpty ? null : format.ToString(); + var handler = new Utf8.TryWriteInterpolatedStringHandler(5, 7, destination, provider, out var shouldAppend); + _ = shouldAppend + && handler.AppendLiteral("<") + && handler.AppendFormatted(X, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Y, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(Z, formatString) + && handler.AppendFormatted(separator) && handler.AppendLiteral(" ") + && handler.AppendFormatted(W, formatString) + && handler.AppendLiteral(">"); + return Utf8.TryWrite(destination, ref handler, out bytesWritten); + } + + /// + public static floatQuat Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static floatQuat Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static floatQuat Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static floatQuat Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid floatQuat format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out floatQuat result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out floatQuat result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out floatQuat result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a floatQuat. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out floatQuat result) + { + result = default; + s = s.Trim(); + if (s.Length < 2 || s[0] != '<' || s[^1] != '>') + return false; + s = s[1..^1]; + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + var separatorIndex = s.IndexOf(separator); + // trimmed: TryFormat writes "separator + space", which must not demand AllowLeadingWhite + if (separatorIndex < 0 || !float.TryParse(s[..separatorIndex].Trim(), style, provider, out var x)) + return false; + s = s[(separatorIndex + separator.Length)..]; + separatorIndex = s.IndexOf(separator); + // trimmed: TryFormat writes "separator + space", which must not demand AllowLeadingWhite + if (separatorIndex < 0 || !float.TryParse(s[..separatorIndex].Trim(), style, provider, out var y)) + return false; + s = s[(separatorIndex + separator.Length)..]; + separatorIndex = s.IndexOf(separator); + // trimmed: TryFormat writes "separator + space", which must not demand AllowLeadingWhite + if (separatorIndex < 0 || !float.TryParse(s[..separatorIndex].Trim(), style, provider, out var z)) + return false; + s = s[(separatorIndex + separator.Length)..]; + if (!float.TryParse(s.Trim(), style, provider, out var w)) + return false; + result = new(x, y, z, w); + return true; + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.gen.cs new file mode 100644 index 0000000..9ceacd4 --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.gen.cs @@ -0,0 +1,116 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a quaternion with float components. +/// +[DebuggerTypeProxy(typeof(QuaternionDebugView))] +public partial struct floatQuat : IQuaternion + , IMultiplyOperators + , IMultiplyOperators + , IMultiplyOperators + , IQuaternionFactories +{ + /// + public static int ComponentSize => sizeof(float); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public float X; + + /// + [XmlAttribute] + public float Y; + + /// + [XmlAttribute] + public float Z; + + /// + [XmlAttribute] + public float W; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatQuat(float x, float y, float z, float w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatQuat(float3 vectorPart, float scalarPart) + { + X = vectorPart.X; + Y = vectorPart.Y; + Z = vectorPart.Z; + W = scalarPart; + } + + /// Creates a quaternion from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public floatQuat(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static floatQuat IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public float this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out float x, out float y, out float z, out float w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.math-metric.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.math-metric.gen.cs new file mode 100644 index 0000000..aabb287 --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.math-metric.gen.cs @@ -0,0 +1,48 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatQuat +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return float.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Dot(floatQuat a, floatQuat b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } + + /// + /// Thrown when the input quaternion is a zero quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Normalize(floatQuat value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / float.Sqrt(lengthSquared); + } + + /// + /// Returns zero if the input quaternion is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat NormalizeOrZero(floatQuat value) + { + var length = float.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.math.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.math.gen.cs new file mode 100644 index 0000000..4f9065c --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.math.gen.cs @@ -0,0 +1,197 @@ +// - edit Quat.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatQuat +{ + /// + public readonly bool IsIdentity => this == Identity; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Concatenate(floatQuat a, floatQuat b) + { + return b * a; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Conjugate(floatQuat value) + { + // -x, -y, -z, w + return Unsafe.BitCast, floatQuat>(Unsafe.BitCast>(value) ^ Vector128.Create(-0.0f, -0.0f, -0.0f, 0.0f)); + } + + /// + public static floatQuat CreateFromAxisAngle(float3 axis, float angle) + { + floatQuat ans; + + var halfAngle = angle * 0.5f; + var (s, c) = float.SinCos(halfAngle); + + ans.X = axis.X * s; + ans.Y = axis.Y * s; + ans.Z = axis.Z * s; + ans.W = c; + + return ans; + } + + /// + public static floatQuat CreateFromRotationMatrix(float4x4 matrix) + { + var trace = matrix.M11 + matrix.M22 + matrix.M33; + + floatQuat q = default; + + if (trace > 0.0) + { + var s = float.Sqrt(trace + 1); + q.W = s * 0.5f; + s = 0.5f / s; + q.X = (matrix.M23 - matrix.M32) * s; + q.Y = (matrix.M31 - matrix.M13) * s; + q.Z = (matrix.M12 - matrix.M21) * s; + } + else + { + if (matrix.M11 >= matrix.M22 && matrix.M11 >= matrix.M33) + { + var s = float.Sqrt(1 + matrix.M11 - matrix.M22 - matrix.M33); + var invS = 0.5f / s; + q.X = 0.5f * s; + q.Y = (matrix.M12 + matrix.M21) * invS; + q.Z = (matrix.M13 + matrix.M31) * invS; + q.W = (matrix.M23 - matrix.M32) * invS; + } + else if (matrix.M22 > matrix.M33) + { + var s = float.Sqrt(1 + matrix.M22 - matrix.M11 - matrix.M33); + var invS = 0.5f / s; + q.X = (matrix.M21 + matrix.M12) * invS; + q.Y = 0.5f * s; + q.Z = (matrix.M32 + matrix.M23) * invS; + q.W = (matrix.M31 - matrix.M13) * invS; + } + else + { + var s = float.Sqrt(1 + matrix.M33 - matrix.M11 - matrix.M22); + var invS = 0.5f / s; + q.X = (matrix.M31 + matrix.M13) * invS; + q.Y = (matrix.M32 + matrix.M23) * invS; + q.Z = 0.5f * s; + q.W = (matrix.M12 - matrix.M21) * invS; + } + } + + return q; + } + + /// + public static floatQuat CreateFromYawPitchRoll(float yaw, float pitch, float roll) + { + // Roll first, about axis the object is facing, then + // pitch upward, then yaw to face into the new heading + var (sr, cr) = float.SinCos(roll * 0.5f); + var (sp, cp) = float.SinCos(pitch * 0.5f); + var (sy, cy) = float.SinCos(yaw * 0.5f); + + floatQuat result; + + result.X = cy * sp * cr + sy * cp * sr; + result.Y = sy * cp * cr - cy * sp * sr; + result.Z = cy * cp * sr - sy * sp * cr; + result.W = cy * cp * cr + sy * sp * sr; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Inverse(floatQuat value) + { + // -1 ( a -v ) + // q = ( ------------- ------------- ) + // ( a^2 + |v|^2 , a^2 + |v|^2 ) + + return Conjugate(value) / value.LengthSquared(); + } + + /// + public static floatQuat Lerp(floatQuat a, floatQuat b, float amount) + { + var t = amount; + var t1 = 1 - t; + + var dot = Dot(a, b); + + var r = dot >= 0 + ? a * t1 + b * t + : a * t1 - b * t; + + // Normalize it. + var invNorm = 1 / float.Sqrt(r.LengthSquared()); + return r * invNorm; + } + + private const float SlerpEpsilon = 1e-6f; + + /// + public static floatQuat Slerp(floatQuat a, floatQuat b, float amount) + { + var t = amount; + + var cosOmega = Dot(a, b); + + var flip = false; + + if (cosOmega < 0) + { + flip = true; + cosOmega = -cosOmega; + } + + float s1, + s2; + + if (cosOmega > 1 - SlerpEpsilon) + { + // Too close, do straight linear interpolation. + s1 = 1 - t; + s2 = flip ? -t : t; + } + else + { + var omega = float.Acos(cosOmega); + var invSinOmega = 1 / float.Sin(omega); + + s1 = float.Sin((1 - t) * omega) * invSinOmega; + s2 = flip ? -float.Sin(t * omega) * invSinOmega : float.Sin(t * omega) * invSinOmega; + } + + return a * s1 + b * s2; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator *(floatQuat rotation, float2 vector) + { + return float2.Transform(vector, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator *(floatQuat rotation, float3 vector) + { + return float3.Transform(vector, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator *(floatQuat rotation, float4 vector) + { + return float4.Transform(vector, rotation); + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.numerics.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.numerics.gen.cs new file mode 100644 index 0000000..a926626 --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.numerics.gen.cs @@ -0,0 +1,496 @@ +// - edit Quat.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct floatQuat : INumberBase +{ + /// + public static floatQuat Zero => default; + + /// + public static floatQuat Identity => new(0, 0, 0, 1); + + /* One is the multiplicative identity - the identity quaternion - which the concrete API + * already names Identity; a public One would read as all-ones. */ + static floatQuat INumberBase.One => Identity; + + static floatQuat IAdditiveIdentity.AdditiveIdentity => Zero; + + static floatQuat IMultiplicativeIdentity.MultiplicativeIdentity => Identity; + + static int INumberBase.Radix => 2; + + // Abs is the norm, embedded on the real axis as a scalar quaternion (cf. Complex.Abs) + static floatQuat INumberBase.Abs(floatQuat value) => new(0, 0, 0, value.Length()); + + static bool INumberBase.IsCanonical(floatQuat value) => true; + + static bool INumberBase.IsComplexNumber(floatQuat value) => + value.W != 0 && !(value.X == 0 && value.Y == 0 && value.Z == 0); + + static bool INumberBase.IsImaginaryNumber(floatQuat value) => + value.W == 0 && float.IsRealNumber(value.X) && float.IsRealNumber(value.Y) && float.IsRealNumber(value.Z); + + static bool INumberBase.IsRealNumber(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsRealNumber(value.W); + + /// Determines if a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsZero(floatQuat value) + { + return value == Zero; + } + + static bool INumberBase.IsEvenInteger(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsEvenInteger(value.W); + + static bool INumberBase.IsOddInteger(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsOddInteger(value.W); + + static bool INumberBase.IsInteger(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsInteger(value.W); + + static bool INumberBase.IsNegative(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsRealNumber(value.W) && float.IsNegative(value.W); + + static bool INumberBase.IsPositive(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsRealNumber(value.W) && float.IsPositive(value.W); + + static bool INumberBase.IsFinite(floatQuat value) => + float.IsFinite(value.X) && float.IsFinite(value.Y) && float.IsFinite(value.Z) && float.IsFinite(value.W); + + static bool INumberBase.IsInfinity(floatQuat value) => + float.IsInfinity(value.X) || float.IsInfinity(value.Y) || float.IsInfinity(value.Z) || float.IsInfinity(value.W); + + static bool INumberBase.IsNegativeInfinity(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsNegativeInfinity(value.W); + + static bool INumberBase.IsPositiveInfinity(floatQuat value) => + value.X == 0 && value.Y == 0 && value.Z == 0 && float.IsPositiveInfinity(value.W); + + // NaN present and no infinity - infinity dominates, per Complex + static bool INumberBase.IsNaN(floatQuat value) => + (float.IsNaN(value.X) || float.IsNaN(value.Y) || float.IsNaN(value.Z) || float.IsNaN(value.W)) + && !(float.IsInfinity(value.X) || float.IsInfinity(value.Y) || float.IsInfinity(value.Z) || float.IsInfinity(value.W)); + + static bool INumberBase.IsNormal(floatQuat value) => + float.IsNormal(value.W) + && (value.X == 0 && value.Y == 0 && value.Z == 0 || (float.IsNormal(value.X) && float.IsNormal(value.Y) && float.IsNormal(value.Z))); + + static bool INumberBase.IsSubnormal(floatQuat value) => + float.IsSubnormal(value.X) || float.IsSubnormal(value.Y) || float.IsSubnormal(value.Z) || float.IsSubnormal(value.W); + + static floatQuat INumberBase.MaxMagnitude(floatQuat a, floatQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (float.IsNaN(magnitudeA)) + return a; + if (float.IsNaN(magnitudeB)) + return b; + return magnitudeA >= magnitudeB ? a : b; + } + + static floatQuat INumberBase.MaxMagnitudeNumber(floatQuat a, floatQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (float.IsNaN(magnitudeA)) + return b; + if (float.IsNaN(magnitudeB)) + return a; + return magnitudeA >= magnitudeB ? a : b; + } + + static floatQuat INumberBase.MinMagnitude(floatQuat a, floatQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (float.IsNaN(magnitudeA)) + return a; + if (float.IsNaN(magnitudeB)) + return b; + return magnitudeA <= magnitudeB ? a : b; + } + + static floatQuat INumberBase.MinMagnitudeNumber(floatQuat a, floatQuat b) + { + var magnitudeA = a.LengthSquared(); + var magnitudeB = b.LengthSquared(); + if (float.IsNaN(magnitudeA)) + return b; + if (float.IsNaN(magnitudeB)) + return a; + return magnitudeA <= magnitudeB ? a : b; + } + + /* ++/-- add/subtract One = Identity, bumping W - exactly what Complex does. Generic-plane + * only: a footgun on a concrete quat. */ + + static floatQuat IIncrementOperators.operator ++(floatQuat value) => value + Identity; + + static floatQuat IDecrementOperators.operator --(floatQuat value) => value - Identity; + + static bool INumberBase.TryConvertFromChecked(TOther value, out floatQuat result) + { + if (typeof(TOther) == typeof(floatQuat)) + { + result = (floatQuat)(object)value!; + return true; + } + if (typeof(TOther) == typeof(doubleQuat)) + { + var other = (doubleQuat)(object)value!; + result = new(float.CreateChecked(other.X), float.CreateChecked(other.Y), float.CreateChecked(other.Z), float.CreateChecked(other.W)); + return true; + } + if (typeof(TOther) == typeof(sbyte)) + { + result = new(0, 0, 0, float.CreateChecked((sbyte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(byte)) + { + result = new(0, 0, 0, float.CreateChecked((byte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(short)) + { + result = new(0, 0, 0, float.CreateChecked((short)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ushort)) + { + result = new(0, 0, 0, float.CreateChecked((ushort)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(int)) + { + result = new(0, 0, 0, float.CreateChecked((int)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(uint)) + { + result = new(0, 0, 0, float.CreateChecked((uint)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(long)) + { + result = new(0, 0, 0, float.CreateChecked((long)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ulong)) + { + result = new(0, 0, 0, float.CreateChecked((ulong)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(float)) + { + result = new(0, 0, 0, float.CreateChecked((float)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(double)) + { + result = new(0, 0, 0, float.CreateChecked((double)(object)value!)); + return true; + } + result = default; + return false; + } + + static bool INumberBase.TryConvertToChecked(floatQuat value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out floatQuat result) + { + if (typeof(TOther) == typeof(floatQuat)) + { + result = (floatQuat)(object)value!; + return true; + } + if (typeof(TOther) == typeof(doubleQuat)) + { + var other = (doubleQuat)(object)value!; + result = new(float.CreateSaturating(other.X), float.CreateSaturating(other.Y), float.CreateSaturating(other.Z), float.CreateSaturating(other.W)); + return true; + } + if (typeof(TOther) == typeof(sbyte)) + { + result = new(0, 0, 0, float.CreateSaturating((sbyte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(byte)) + { + result = new(0, 0, 0, float.CreateSaturating((byte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(short)) + { + result = new(0, 0, 0, float.CreateSaturating((short)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ushort)) + { + result = new(0, 0, 0, float.CreateSaturating((ushort)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(int)) + { + result = new(0, 0, 0, float.CreateSaturating((int)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(uint)) + { + result = new(0, 0, 0, float.CreateSaturating((uint)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(long)) + { + result = new(0, 0, 0, float.CreateSaturating((long)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ulong)) + { + result = new(0, 0, 0, float.CreateSaturating((ulong)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(float)) + { + result = new(0, 0, 0, float.CreateSaturating((float)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(double)) + { + result = new(0, 0, 0, float.CreateSaturating((double)(object)value!)); + return true; + } + result = default; + return false; + } + + static bool INumberBase.TryConvertToSaturating(floatQuat value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out floatQuat result) + { + if (typeof(TOther) == typeof(floatQuat)) + { + result = (floatQuat)(object)value!; + return true; + } + if (typeof(TOther) == typeof(doubleQuat)) + { + var other = (doubleQuat)(object)value!; + result = new(float.CreateTruncating(other.X), float.CreateTruncating(other.Y), float.CreateTruncating(other.Z), float.CreateTruncating(other.W)); + return true; + } + if (typeof(TOther) == typeof(sbyte)) + { + result = new(0, 0, 0, float.CreateTruncating((sbyte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(byte)) + { + result = new(0, 0, 0, float.CreateTruncating((byte)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(short)) + { + result = new(0, 0, 0, float.CreateTruncating((short)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ushort)) + { + result = new(0, 0, 0, float.CreateTruncating((ushort)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(int)) + { + result = new(0, 0, 0, float.CreateTruncating((int)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(uint)) + { + result = new(0, 0, 0, float.CreateTruncating((uint)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(long)) + { + result = new(0, 0, 0, float.CreateTruncating((long)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(ulong)) + { + result = new(0, 0, 0, float.CreateTruncating((ulong)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(float)) + { + result = new(0, 0, 0, float.CreateTruncating((float)(object)value!)); + return true; + } + if (typeof(TOther) == typeof(double)) + { + result = new(0, 0, 0, float.CreateTruncating((double)(object)value!)); + return true; + } + result = default; + return false; + } + + static bool INumberBase.TryConvertToTruncating(floatQuat value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Add(floatQuat a, floatQuat b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Divide(floatQuat a, floatQuat b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Multiply(floatQuat a, floatQuat b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Negate(floatQuat value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Subtract(floatQuat a, floatQuat b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator +(floatQuat a, floatQuat b) + { + return Unsafe.BitCast, floatQuat>(Unsafe.BitCast>(a) + Unsafe.BitCast>(b)); + } + + /// + public static floatQuat operator /(floatQuat a, floatQuat b) + { + floatQuat ans; + + var ax = a.X; + var ay = a.Y; + var az = a.Z; + var aw = a.W; + + //------------------------------------- + // Inverse part. + var ls = b.X * b.X + b.Y * b.Y + b.Z * b.Z + b.W * b.W; + var invNorm = 1 / ls; + + var bx = -b.X * invNorm; + var by = -b.Y * invNorm; + var bz = -b.Z * invNorm; + var bw = b.W * invNorm; + + //------------------------------------- + // Multiply part. + + // cross(av, bv) + var cx = ay * bz - az * by; + var cy = az * bx - ax * bz; + var cz = ax * by - ay * bx; + + var dot = ax * bx + ay * by + az * bz; + + ans.X = ax * bw + bx * aw + cx; + ans.Y = ay * bw + by * aw + cy; + ans.Z = az * bw + bz * aw + cz; + ans.W = aw * bw - dot; + + return ans; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator *(floatQuat a, floatQuat b) + { + var left = Unsafe.BitCast>(a); + var right = Unsafe.BitCast>(b); + + var result = right * left.GetElement(3); + result = Vector128.MultiplyAddEstimate(Vector128.ShuffleNative(right, Vector128.Create(3, 2, 1, 0)) * left.GetElement(0), Vector128.Create(+1.0f, -1.0f, +1.0f, -1.0f), result); + result = Vector128.MultiplyAddEstimate(Vector128.ShuffleNative(right, Vector128.Create(2, 3, 0, 1)) * left.GetElement(1), Vector128.Create(+1.0f, +1.0f, -1.0f, -1.0f), result); + result = Vector128.MultiplyAddEstimate(Vector128.ShuffleNative(right, Vector128.Create(1, 0, 3, 2)) * left.GetElement(2), Vector128.Create(-1.0f, +1.0f, +1.0f, -1.0f), result); + return Unsafe.BitCast, floatQuat>(result); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator -(floatQuat a, floatQuat b) + { + return Unsafe.BitCast, floatQuat>(Unsafe.BitCast>(a) - Unsafe.BitCast>(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator -(floatQuat value) + { + return Zero - value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator +(floatQuat value) + { + return value; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct floatQuat + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat Multiply(floatQuat a, float b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator *(floatQuat a, float b) + { + return Unsafe.BitCast, floatQuat>(Unsafe.BitCast>(a) * Vector128.Create(b)); + } + + /// Divides a quaternion by a scalar, componentwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static floatQuat operator /(floatQuat a, float b) + { + return Unsafe.BitCast, floatQuat>(Unsafe.BitCast>(a) / Vector128.Create(b)); + } +} diff --git a/Brutal.Numerics/Quaternion/floatQuat/floatQuat.pack.gen.cs b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.pack.gen.cs new file mode 100644 index 0000000..a03f86f --- /dev/null +++ b/Brutal.Numerics/Quaternion/floatQuat/floatQuat.pack.gen.cs @@ -0,0 +1,36 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct floatQuat +{ + public static floatQuat Pack(in doubleQuat vector, Func elementConverter) + { + QuaternionPack.Pack(vector, out floatQuat result, elementConverter); + return result; + } + + public static floatQuat Pack(in doubleQuat vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToFloat(mode)); + } + + public static void Pack( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + QuaternionPack.Pack(source, destination, elementConverter); + } + + public static void Pack( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + Pack(source, destination, PackUtils.Double.ToFloat(mode)); + } +} diff --git a/Brutal.Numerics/Rect/doubleRect/doubleRect.gen.cs b/Brutal.Numerics/Rect/doubleRect/doubleRect.gen.cs new file mode 100644 index 0000000..003b8ac --- /dev/null +++ b/Brutal.Numerics/Rect/doubleRect/doubleRect.gen.cs @@ -0,0 +1,68 @@ +// - edit Rect.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D rectangle with double components +/// +public struct doubleRect +{ + /// + /// The start of the rectangle. + /// + public double2 Min; + + /// + /// The end of the rectangle. + /// + public double2 Max; + + /// A mutable view over the 4 components: min xy, then max xy. + /// + /// Deliberately NOT a readonly member, because it hands out a writable view. The consequence is that + /// calling it on a readonly field or an parameter gets you a span over a + /// defensive COPY, so writes there are silently lost - reach for instead. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// A read-only view over the 4 components, safe in the readonly contexts where would view a copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } + + static doubleRect() + { + if (Unsafe.SizeOf() != 4 * sizeof(double)) + throw new Exception("doubleRect is not the right size!"); + } + + /// + /// The center of the rectangle. + /// + public double2 Center + { + readonly get => (Min + Max) / 2; + set + { + var half = Extent / 2; + Min = value - half; + Max = value + half; + } + } + + /// + /// The size of the rectangle. + /// + public double2 Extent + { + readonly get => Max - Min; + set => Max = Min + value; + } +} diff --git a/Brutal.Numerics/Rect/floatRect/floatRect.gen.cs b/Brutal.Numerics/Rect/floatRect/floatRect.gen.cs new file mode 100644 index 0000000..7dc5004 --- /dev/null +++ b/Brutal.Numerics/Rect/floatRect/floatRect.gen.cs @@ -0,0 +1,62 @@ +// - edit Rect.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D rectangle with float components +/// +public struct floatRect +{ + /// + /// The start of the rectangle. + /// + public float2 Min; + + /// + /// The end of the rectangle. + /// + public float2 Max; + + /// A mutable view over the 4 components: min xy, then max xy. + /// + /// Deliberately NOT a readonly member, because it hands out a writable view. The consequence is that + /// calling it on a readonly field or an parameter gets you a span over a + /// defensive COPY, so writes there are silently lost - reach for instead. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// A read-only view over the 4 components, safe in the readonly contexts where would view a copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } + + /// + /// The center of the rectangle. + /// + public float2 Center + { + readonly get => (Min + Max) / 2; + set + { + var half = Extent / 2; + Min = value - half; + Max = value + half; + } + } + + /// + /// The size of the rectangle. + /// + public float2 Extent + { + readonly get => Max - Min; + set => Max = Min + value; + } +} diff --git a/Brutal.Numerics/StringHelpers.cs b/Brutal.Numerics/StringHelpers.cs new file mode 100644 index 0000000..47047a1 --- /dev/null +++ b/Brutal.Numerics/StringHelpers.cs @@ -0,0 +1,104 @@ +namespace Brutal.Numerics; + +/// Shared implementations backing the generated .format partials (TryFormat/TryParse). +internal static class StringHelpers +{ + /// Formats a vector as <1, 2, 3>, the shape its TryParse accepts back. + /// false if is too small. + public static bool TryFormat( + TVector value, + Span destination, + out int charsWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + where TVector : unmanaged, IVector + { + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + var formatString = format.IsEmpty ? null : format.ToString(); // the handler takes a string format (an IFormattable legacy) - null on the default path stays alloc-free + var handler = new MemoryExtensions.TryWriteInterpolatedStringHandler( + TVector.ComponentCount + 1, + 2 * TVector.ComponentCount - 1, + destination, + provider, + out var b + ); + b = b && handler.AppendLiteral("<"); + for (var i = 0; i < TVector.ComponentCount; i++) + { + b = b && handler.AppendFormatted(value[i], formatString); + if (i != TVector.ComponentCount - 1) + b = b && handler.AppendFormatted(separator) && handler.AppendLiteral(" "); + } + _ = b && handler.AppendLiteral(">"); + return destination.TryWrite(ref handler, out charsWritten); + } + + /// + public static bool TryFormat( + TVector value, + Span destination, + out int bytesWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + where TVector : unmanaged, IVector + { + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + var formatString = format.IsEmpty ? null : format.ToString(); // the handler takes a string format (an IFormattable legacy) - null on the default path stays alloc-free + var handler = new Utf8.TryWriteInterpolatedStringHandler( + TVector.ComponentCount + 1, + 2 * TVector.ComponentCount - 1, + destination, + provider, + out var b + ); + b = b && handler.AppendLiteral("<"); + for (var i = 0; i < TVector.ComponentCount; i++) + { + b = b && handler.AppendFormatted(value[i], formatString); + if (i != TVector.ComponentCount - 1) + b = b && handler.AppendFormatted(separator) && handler.AppendLiteral(" "); + } + _ = b && handler.AppendLiteral(">"); + return Utf8.TryWrite(destination, ref handler, out bytesWritten); + } + + /// Parses a vector from the shape, <1, 2, 3>. + /// true if the input parsed as a TVector. + public static bool TryParse( + ReadOnlySpan s, + NumberStyles style, + IFormatProvider? provider, + out TVector result + ) + where TVector : unmanaged, IVector + where TComponent : INumberBase + { + result = default; + s = s.Trim(); + if (s.Length < 2 || s[0] != '<' || s[^1] != '>') + return false; + s = s[1..^1]; + var separator = NumberFormatInfo.GetInstance(provider).NumberGroupSeparator; + var value = default(TVector); // built in a local so a mid-parse failure leaves result untouched + for (var i = 0; i < TVector.ComponentCount - 1; i++) + { + var separatorIndex = s.IndexOf(separator); + // trimmed because TryFormat writes "separator + space": the slice must parse under + // caller-supplied NumberStyles without demanding AllowLeadingWhite for OUR whitespace + if ( + separatorIndex < 0 + || !TComponent.TryParse(s[..separatorIndex].Trim(), style, provider, out var component) + ) + return false; + value[i] = component; + s = s[(separatorIndex + separator.Length)..]; + } + if (!TComponent.TryParse(s.Trim(), style, provider, out var last)) + return false; + value[TVector.ComponentCount - 1] = last; + result = value; + return true; + } +} diff --git a/Brutal.Numerics/Vector/IVector.cs b/Brutal.Numerics/Vector/IVector.cs new file mode 100644 index 0000000..e8e426d --- /dev/null +++ b/Brutal.Numerics/Vector/IVector.cs @@ -0,0 +1,610 @@ +// ReSharper disable InconsistentNaming + +namespace Brutal.Numerics; + +/// Shape shared by every numerics value: a fixed-width run of identically-typed components. +/* Non-generic, so shape can be asked about without naming a component type. Says nothing about + * vectors or numbers - a matrix, a plane and a rect are component tuples too. */ +public interface IComponentTuple +{ + /// Gets the stride of one component in bytes. + static abstract int ComponentSize { get; } + + /// Gets the number of components. + static abstract int ComponentCount { get; } +} + +/// +/// The component type. +public interface IComponentTuple : IComponentTuple +{ + /// Gets or sets the element at the specified index. + /// The index of the element to get or set. + /// The element at . + /// + /// was less than zero or greater than the number + /// of elements. + /// + T this[int index] { get; set; } + + /// A mutable view over the components. + /// + /// Deliberately NOT a readonly member, because it hands out a writable view. The consequence is that + /// calling it on a readonly field or an parameter gets you a span over a + /// defensive COPY, so writes there are silently lost - reach for instead. + /// + Span AsSpan(); + + /// A read-only view over the components, safe in the readonly contexts where would view a copy. + ReadOnlySpan AsReadOnlySpan(); + + /// + /// Copies the vector to the given .The length of the destination span must be at least + /// as long as there are elements in the source vector. + /// + /// The destination span which the values are copied into. + /// + /// If number of elements in source vector is greater than those available in + /// destination span. + /// + void CopyTo(Span destination); + + /// + /// Attempts to copy the vector to the given . The length of the destination span must + /// be at least as long as there are elements in the source vector. + /// + /// The destination span which the values are copied into. + /// + /// if the source vector was successfully copied to . + /// if is not large enough to hold the source vector. + /// + bool TryCopyTo(Span destination); +} + +/// +/// The type that implements the interface. +/// The component type. +/* The rung where a component tuple knows its own type, so it can be constructed and compared. + * Everything above this point is layout and says nothing about being a vector. */ +public interface IComponentTuple : IComponentTuple, IEquatable, IFormattable + where TSelf : IComponentTuple +{ + /// Constructs a value from the leading components of a span. + /// A span of at least components. + static abstract TSelf Create(ReadOnlySpan span); +} + +/* --------------------------------------------------------------------------- + * FUNCTION. Reductions collapse lanes, so they are not layout - which is why they moved off + * IComponentTuple. Split where PRESENCE differs rather than per verb: a quaternion has Dot, + * LengthSquared and Length, and deliberately has no Distance, because Euclidean distance is not the + * metric on rotations. Each carries its own result type, since a squared reduction and a square root + * cannot agree on one. + * --------------------------------------------------------------------------- */ + +/// The dot product. +/// The type that implements the interface. +/// What the reduction returns; wider than the component where the +/// component cannot carry the result. +/* No family in the name: quaternions have a dot product too, and are not vectors. LengthSquared + * lives here rather than beside Length because it is the SELF-dot - the same reduction, so it cannot + * have a different result type. */ +public interface IDotProduct + where TSelf : IDotProduct +{ + /// The dot product. + static abstract TResult Dot(TSelf a, TSelf b); + + /// The squared magnitude, avoiding the square root. + TResult LengthSquared(); +} + +/// The magnitude: a square root, so its result type is its own. +public interface IMagnitude + where TSelf : IMagnitude +{ + /// The magnitude. + TRoot Length(); +} + +/// Distance between two values, where a Euclidean metric is the right one. +public interface IDistance + where TSelf : IDistance +{ + /// The distance between two values. + static abstract TRoot Distance(TSelf a, TSelf b); + + /// The squared distance, avoiding the square root. + static abstract TSquared DistanceSquared(TSelf a, TSelf b); +} + +/* INumber forces scalar <, <=, > and >= into existence; R^n has no total order, so ours throw. + * The componentwise forms here are the answers that exist - one bool per lane, reduced by the + * caller with Any/All, as every shader language spells it. Only one of the two occupies the + * public slot: the throwing pair is an EXPLICIT implementation of IComparisonOperators, reachable + * only from code that asked for a total order by naming it. + * INHERITING IComparisonOperators is load-bearing: without it, constraining on BOTH this + * interface and INumber makes every comparison CS9342-ambiguous (measured); with it, the + * redeclarations HIDE the scalar pair and the mask form wins. Pinned in ComparisonDispatchTests. */ + +/// Defines componentwise relational operators, each returning a per-component mask. +/// The type that implements the interface. +/// The boolean vector of matching arity. +public interface IComponentwiseComparison : IComparisonOperators + where TSelf : IComponentwiseComparison +{ + /// Compares each pair of components for less-than. + static abstract TMask operator <(TSelf a, TSelf b); + + /// Compares each pair of components for less-than-or-equal. + static abstract TMask operator <=(TSelf a, TSelf b); + + /// Compares each pair of components for greater-than. + static abstract TMask operator >(TSelf a, TSelf b); + + /// Compares each pair of components for greater-than-or-equal. + static abstract TMask operator >=(TSelf a, TSelf b); +} + +/// Defines a generic vector type. +/// The type that implements the interface. +/// The component type. +/* Inherits IEqualityOperators so the ==/!= below are REDECLARATIONS that hide it - the same + * CS9342 cure as IComponentwiseComparison, needed the moment any second route brings + * IEqualityOperators into a constraint closure alongside this interface (the bundles do, through + * IComparisonOperators; INumberBase does for any caller naming both). */ +public interface IVector : IComponentTuple, IEqualityOperators + where TSelf : IVector +{ + /// Gets the zero vector. + static abstract TSelf Zero { get; } + + /// Gets the one vector. + static abstract TSelf One { get; } + + /// Returns a value that indicates whether each pair of elements in two specified vectors is equal. + /// The first vector to compare. + /// The second vector to compare. + /// + /// if and are equal; otherwise, + /// . + /// + public static abstract bool operator ==(TSelf left, TSelf right); + + /// Returns a value that indicates whether two specified vectors are not equal. + /// The first vector to compare. + /// The second vector to compare. + /// + /// if and are not equal; otherwise, + /// . + /// + public static abstract bool operator !=(TSelf left, TSelf right); +} + +/// Defines a integer vector type. +public interface INumericVector + where TSelf : INumericVector +{ + /// Adds two vectors together. + /// The first vector to add. + /// The second vector to add. + /// The summed vector. + public static abstract TSelf operator +(TSelf left, TSelf right); + + /// Subtracts the second vector from the first. + /// The first vector. + /// The second vector. + public static abstract TSelf operator -(TSelf left, TSelf right); + + /// Returns a new vector whose values are the product of each pair of elements in two specified vectors. + /// The first vector. + /// The second vector. + /// The element-wise product vector. + public static abstract TSelf operator *(TSelf left, TSelf right); + + /// Divides the first vector by the second. + /// The first vector. + /// The second vector. + public static abstract TSelf operator /(TSelf left, TSelf right); + + /// Multiplies the specified vector by the specified scalar value. + /// The vector. + /// The scalar value. + /// The scaled vector. + public static abstract TSelf operator *(TSelf left, T right); + + /// Divides the specified vector by a specified scalar value. + /// The vector. + /// The scalar value. + /// The result of the division. + public static abstract TSelf operator /(TSelf value1, T value2); + + /// Multiplies the scalar value by the specified vector. + /// The vector. + /// The scalar value. + /// The scaled vector. + public static abstract TSelf operator *(T left, TSelf right); + + /// Negates the specified vector. + /// The vector to negate. + /// The negated vector. + public static abstract TSelf operator -(TSelf value); +} + +/// Defines a integer vector type. +public interface IBooleanVector : IVector + where TSelf : IBooleanVector +{ + /// OR operation + public static abstract TSelf operator |(TSelf a, TSelf b); + + /// AND operation + public static abstract TSelf operator &(TSelf a, TSelf b); + + /// Whether any component is true. + bool Any { get; } + + /// Whether every component is true. + bool All { get; } +} + +/* TResult is what C# promotion gives the component: int for sbyte, byte, short and ushort, and the + * component itself for int, uint, long and ulong. The square roots are TRoot, since a sqrt has no + * integer answer: float for the 4-byte-and-under components, double for the 8-byte ones, whose + * magnitude float cannot hold. + * T is no longer contravariant, because the magnitude returns TRoot and the reductions return + * TResult; variance never applied to the struct implementers anyway. */ + +/// Defines a integer vector type. +/// The type that implements the interface. +/// The component type. +/// What a reduction returns: the C# promotion of . +/// What a square root returns: float, or double for the 8-byte components. +public interface IIntegerVector + : INumericVector, + IDotProduct, + IMagnitude, + IDistance + where TSelf : IIntegerVector +{ + /* The half of IBinaryInteger that means something for a vector. The other ten members are the + * scalar wire-encoding suite and are undefined here - nothing says whether a big-endian int3 + * byte-swaps each component, reverses component order, or both - so taking the whole interface + * would mean inventing a contract to satisfy something nothing constrains on. Every integer + * family has all five, so it is a family trait and belongs here rather than in a name of its + * own. */ + + /// + static abstract TSelf PopCount(TSelf value); + + /// + static abstract TSelf LeadingZeroCount(TSelf value); + + /// + static abstract TSelf TrailingZeroCount(TSelf value); + + /// + static abstract TSelf RotateLeft(TSelf value, int rotateAmount); + + /// + static abstract TSelf RotateRight(TSelf value, int rotateAmount); +} + +/// +/* Inherits rather than paralleling it: a signed integer vector IS an integer vector, and the two + * were siblings only because neither declared anything to share. Now that the bit-counting members + * live on the base, the difference is exactly Abs. */ +public interface ISignedIntegerVector : IIntegerVector + where TSelf : ISignedIntegerVector +{ + /// Returns a vector whose elements are the absolute values of each of the specified vector's elements. + /// A vector. + /// The absolute value vector. + public static abstract TSelf Abs(TSelf value); +} + +/// Defines a floating vector type. +/* Named for the FAMILY, not for a BCL rung: it carries the family's math, and the rung the concrete + * types reach (IFloatingPointIeee754) is declared on them, not here. "Floating" rather than + * "FloatingPoint" so the four family names share one shape - IIntegerVector, ISignedIntegerVector, + * IBooleanVector, IFloatingVector - and so the only one colliding with a real BCL interface name + * stops doing so. */ +public interface IFloatingVector + : INumericVector, + IDotProduct, + IMagnitude, + IDistance + where TSelf : IFloatingVector +{ + /// Reflects a vector about a surface normal. + /* Every floating vector has one at every arity, so it is a family trait. It was its own name + * only while arity 4 lacked it - Vector4 has no Reflect, which looked like a rule and was an + * omission. */ + static abstract TSelf Reflect(TSelf vector, TSelf normal); + + /// + /// Thrown when the input vector is a zero vector. + static abstract TSelf Normalize(TSelf value); + + /// + /// Will return a zero vector if the input vector is a zero vector. + static abstract TSelf NormalizeOrZero(TSelf value); + + /* The static algebra surface: exposes the statics that already exist on every floating-point + * vector type, so generic code can call them through the interface (satisfied implicitly). + * Dot, Distance and DistanceSquared are no longer here - they are inherited from the reduction + * interfaces above, which quaternions share and which carry their own result types. */ + + /// + static abstract TSelf Add(TSelf left, TSelf right); + + /// + static abstract TSelf Subtract(TSelf left, TSelf right); + + /// + static abstract TSelf Multiply(TSelf left, TSelf right); + + /// + static abstract TSelf Multiply(TSelf left, T right); + + /// + static abstract TSelf Multiply(T left, TSelf right); + + /// + static abstract TSelf Divide(TSelf left, TSelf right); + + /// + static abstract TSelf Divide(TSelf left, T divisor); + + /// + static abstract TSelf Negate(TSelf value); + + /// + static abstract TSelf Abs(TSelf value); + + /// + static abstract TSelf SquareRoot(TSelf value); + + /// + static abstract TSelf Min(TSelf a, TSelf b); + + /// + static abstract TSelf Max(TSelf a, TSelf b); + + /// + static abstract TSelf Clamp(TSelf value, TSelf min, TSelf max); + + /// + static abstract TSelf Lerp(TSelf a, TSelf b, T t); +} + +/* The arities are SIBLINGS, not a chain. They used to inherit - IVector4 : IVector3 : IVector2 - + * which meant a float4 satisfied `where TSelf : IVector2`, so arity stopped being a proof + * of anything and a two-component constraint silently accepted four. Each one now states its own + * full axis set instead of collecting them on the way down. */ + +/// Defines a vector2 type. +public interface IVector2 : IVector + where TSelf : IVector2 +{ + /* The components by name. They are FIELDS on the concrete types, and a field cannot + * implement a property, so each type carries an explicit forwarder - generated, one line + * each. Worth it because X/Y/Z is how the domain spells a component; the indexer stays for + * code that walks them. */ + /// Gets or sets the x component. + T X { get; set; } + + /// Gets or sets the y component. + T Y { get; set; } + + /// Gets the unit x vector. + static abstract TSelf UnitX { get; } + + /// Gets the unit y vector. + static abstract TSelf UnitY { get; } +} + +/// Defines a vector3 type. +public interface IVector3 : IVector + where TSelf : IVector3 +{ + /// Gets or sets the x component. + T X { get; set; } + + /// Gets or sets the y component. + T Y { get; set; } + + /// Gets or sets the z component. + T Z { get; set; } + + /// + static abstract TSelf UnitX { get; } + + /// + static abstract TSelf UnitY { get; } + + /// Gets the unit z vector. + static abstract TSelf UnitZ { get; } +} + +/// Defines a vector4 type. +public interface IVector4 : IVector + where TSelf : IVector4 +{ + /// Gets or sets the x component. + T X { get; set; } + + /// Gets or sets the y component. + T Y { get; set; } + + /// Gets or sets the z component. + T Z { get; set; } + + /// Gets or sets the w component. + T W { get; set; } + + /// + static abstract TSelf UnitX { get; } + + /// + static abstract TSelf UnitY { get; } + + /// + static abstract TSelf UnitZ { get; } + + /// Gets the unit w vector. + static abstract TSelf UnitW { get; } +} + +internal class VectorDebugView2(TSelf v) + where TSelf : IVector2, IMagnitude +{ + public T X => v[0]; + public T Y => v[1]; + public TRoot Length => v.Length(); + + public override string? ToString() + { + return v.ToString(); + } +} + +internal class VectorDebugView3(TSelf v) + where TSelf : IVector3, IMagnitude +{ + public T X => v[0]; + public T Y => v[1]; + public T Z => v[2]; + public TRoot Length => v.Length(); + + public override string? ToString() + { + return v.ToString(); + } +} + +internal class VectorDebugView4(TSelf v) + where TSelf : IVector4, IMagnitude +{ + public T X => v[0]; + public T Y => v[1]; + public T Z => v[2]; + public T W => v[3]; + public TRoot Length => v.Length(); + + public override string? ToString() + { + return v.ToString(); + } +} + +/// Defines the cross product. +public interface ICrossProduct + where TSelf : ICrossProduct +{ + /// + static abstract TSelf Cross(TSelf left, TSelf right); +} + +/* ---------------------------------------------------------------------------- + * Per-arity floating bundles. Each composes the two axes - the arity interface for layout, the + * family interface for math - and adds only what neither can carry: the transforms, which name a + * matrix or a quaternion the vector itself knows nothing about. + * + * WHY THE TRANSFORMS ARE DECLARED INLINE rather than composed from ITransform + * capability interfaces. CS0695: a generic type cannot inherit two instantiations of one generic + * interface if they MAY unify under substitution, and nothing proves TMatrix4x4 != TQuaternion. + * Probed 2026-08-24, all three cases: + * + * inherit ONE generic instantiation ITransform compiles + * inherit TWO generic instantiations ... TMatrix and ... TQuat CS0695 + * inherit TWO CONCRETE instantiations ... float4x4 and ... floatQuat compiles + * + * So the escape hatch is real but useless here: a bundle hardcoding float4x4 cannot serve double3, + * and the differential suites are one generic body over float and double. Every vector needs at + * least two transforms (by matrix and by rotation), so no generic bundle can compose them. + * + * The alternative was measured rather than assumed: attaching the capabilities to the concrete + * types instead works and keeps this file free of members it does not own, but moves the cost to + * every consumer - the arity-4 differential constraint went from one name to ten. Overloads within + * one interface are fine, so the bundle pays once, here. + * ---------------------------------------------------------------------------- */ + +/// Everything a 2-component floating-point vector can do. +public interface IFloatingVector2 + : IVector2, + IFloatingVector, + IComponentwiseComparison + where TSelf : IFloatingVector2 +{ + /// + static abstract TSelf Transform(TSelf position, TMatrix3x2 matrix); + + /// + static abstract TSelf Transform(TSelf position, TMatrix4x4 matrix); + + /// + static abstract TSelf Transform(TSelf value, TQuaternion rotation); + + /// + static abstract TSelf TransformNormal(TSelf normal, TMatrix3x2 matrix); + + /// + static abstract TSelf TransformNormal(TSelf normal, TMatrix4x4 matrix); +} + +/// Everything a 3-component floating-point vector can do. +/// is the result of the matrix3x2 projection. +public interface IFloatingVector3 + : IVector3, + IFloatingVector, + ICrossProduct, + IComponentwiseComparison, + IMultiplyOperators + where TSelf : IFloatingVector3 +{ + /// Static-method twin of the vector * matrix3x2 operator (projects to 2 components). + static abstract TVector2 Multiply(TSelf vector, TMatrix3x2 matrix); + + /// + static abstract TSelf Transform(TSelf position, TMatrix4x4 matrix); + + /// + static abstract TSelf Transform(TSelf value, TQuaternion rotation); + + /// + static abstract TSelf TransformNormal(TSelf normal, TMatrix4x4 matrix); +} + +/// Everything a 4-component floating-point vector can do. +/// / are the cross-dimension transform inputs. +public interface IFloatingVector4 + : IVector4, + IFloatingVector, + IComponentwiseComparison, + IMultiplyOperators + where TSelf : IFloatingVector4 +{ + /// Static-method twin of the vector * matrix4x4 operator. + static abstract TSelf Multiply(TSelf vector, TMatrix4x4 matrix); + + /// + static abstract TSelf Transform(TSelf vector, TMatrix4x4 matrix); + + /// + static abstract TSelf Transform(TSelf value, TQuaternion rotation); + + // cross-dimension: 2/3-component input transformed up to a 4-component result + + /// + static abstract TSelf Transform(TVector2 position, TMatrix4x4 matrix); + + /// + static abstract TSelf Transform(TVector2 value, TQuaternion rotation); + + /// + static abstract TSelf Transform(TVector3 position, TMatrix4x4 matrix); + + /// + static abstract TSelf Transform(TVector3 value, TQuaternion rotation); +} diff --git a/Brutal.Numerics/Vector/NumberConversion.cs b/Brutal.Numerics/Vector/NumberConversion.cs new file mode 100644 index 0000000..2e96412 --- /dev/null +++ b/Brutal.Numerics/Vector/NumberConversion.cs @@ -0,0 +1,279 @@ +namespace Brutal.Numerics; + +/* One shared body for the vectors' INumberBase TryConvertFrom* protocol - the per-type explicit + * implementations are one-line forwards into TryConvertFrom, with the overflow policy carried as + * a generic marker struct. Deduplicated for assembly size: the typeof dispatch below exists once + * instead of once per vector type x policy (it was ~27% of the library's IL as generated code), + * and still JIT-folds to the single live branch per instantiation - the BCL's own pattern. + * + * Semantics (also documented in Vector.numerics.tt): scalars embed along One - a broadcast; a + * sibling vector converts per lane when the arities match (the lane-count check inside FromLanes + * rejects a cross-arity pair). Quaternions embed scalars on the real axis instead, so they keep + * their own generated protocol. */ +internal static class NumberConversion +{ + /// The overflow policy of one TryConvertFrom flavor, as a JIT-foldable marker struct. + internal interface IPolicy + { + static abstract TComponent Convert(TOther value) + where TComponent : INumberBase + where TOther : INumberBase; + } + + internal readonly struct Checked : IPolicy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TComponent Convert(TOther value) + where TComponent : INumberBase + where TOther : INumberBase + { + return TComponent.CreateChecked(value); + } + } + + internal readonly struct Saturating : IPolicy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TComponent Convert(TOther value) + where TComponent : INumberBase + where TOther : INumberBase + { + return TComponent.CreateSaturating(value); + } + } + + internal readonly struct Truncating : IPolicy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TComponent Convert(TOther value) + where TComponent : INumberBase + where TOther : INumberBase + { + return TComponent.CreateTruncating(value); + } + } + + // the supported-set dispatch: self, then the 8 scalar component types, then every non-bool + // vector type (cross-arity pairs fall out via the lane-count check) + internal static bool TryConvertFrom(TOther value, out TVector result) + where TVector : unmanaged, IVector + where TComponent : unmanaged, INumberBase + where TOther : INumberBase + where TPolicy : IPolicy + { + if (typeof(TOther) == typeof(TVector)) + { + result = (TVector)(object)value!; + return true; + } + + if (typeof(TOther) == typeof(sbyte)) + return Broadcast((sbyte)(object)value!, out result); + if (typeof(TOther) == typeof(byte)) + return Broadcast((byte)(object)value!, out result); + if (typeof(TOther) == typeof(short)) + return Broadcast((short)(object)value!, out result); + if (typeof(TOther) == typeof(ushort)) + return Broadcast((ushort)(object)value!, out result); + if (typeof(TOther) == typeof(int)) + return Broadcast((int)(object)value!, out result); + if (typeof(TOther) == typeof(uint)) + return Broadcast((uint)(object)value!, out result); + if (typeof(TOther) == typeof(long)) + return Broadcast((long)(object)value!, out result); + if (typeof(TOther) == typeof(ulong)) + return Broadcast((ulong)(object)value!, out result); + if (typeof(TOther) == typeof(float)) + return Broadcast((float)(object)value!, out result); + if (typeof(TOther) == typeof(double)) + return Broadcast((double)(object)value!, out result); + + if (typeof(TOther) == typeof(sbyte2)) + { + var other = (sbyte2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(sbyte3)) + { + var other = (sbyte3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(sbyte4)) + { + var other = (sbyte4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(byte2)) + { + var other = (byte2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(byte3)) + { + var other = (byte3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(byte4)) + { + var other = (byte4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(short2)) + { + var other = (short2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(short3)) + { + var other = (short3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(short4)) + { + var other = (short4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(ushort2)) + { + var other = (ushort2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(ushort3)) + { + var other = (ushort3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(ushort4)) + { + var other = (ushort4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(int2)) + { + var other = (int2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(int3)) + { + var other = (int3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(int4)) + { + var other = (int4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(uint2)) + { + var other = (uint2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(uint3)) + { + var other = (uint3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(uint4)) + { + var other = (uint4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(long2)) + { + var other = (long2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(long3)) + { + var other = (long3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(long4)) + { + var other = (long4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(ulong2)) + { + var other = (ulong2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(ulong3)) + { + var other = (ulong3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(ulong4)) + { + var other = (ulong4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(float2)) + { + var other = (float2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(float3)) + { + var other = (float3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(float4)) + { + var other = (float4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(double2)) + { + var other = (double2)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(double3)) + { + var other = (double3)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + if (typeof(TOther) == typeof(double4)) + { + var other = (double4)(object)value!; + return FromLanes(other.AsSpan(), out result); + } + + result = default; + return false; + } + + private static bool Broadcast(TSource value, out TVector result) + where TVector : unmanaged, IVector + where TComponent : unmanaged, INumberBase + where TSource : INumberBase + where TPolicy : IPolicy + { + var converted = TPolicy.Convert(value); + Span lanes = stackalloc TComponent[TVector.ComponentCount]; + lanes.Fill(converted); + result = TVector.Create(lanes); + return true; + } + + private static bool FromLanes( + ReadOnlySpan source, + out TVector result + ) + where TVector : unmanaged, IVector + where TComponent : unmanaged, INumberBase + where TSource : INumberBase + where TPolicy : IPolicy + { + if (source.Length != TVector.ComponentCount) + { + result = default; + return false; + } + Span lanes = stackalloc TComponent[source.Length]; + for (var i = 0; i < source.Length; i++) + lanes[i] = TPolicy.Convert(source[i]); + result = TVector.Create(lanes); + return true; + } +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.copy.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.copy.gen.cs new file mode 100644 index 0000000..bf7e678 --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.equality.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.equality.gen.cs new file mode 100644 index 0000000..b1f8569 --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(bool2 other) + { + return X == other.X && Y == other.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is bool2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(bool2 a, bool2 b) + { + return a.Equals(b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(bool2 a, bool2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.format.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.format.gen.cs new file mode 100644 index 0000000..7d6b89f --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.format.gen.cs @@ -0,0 +1,38 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool2 : ISpanFormattable, IUtf8SpanFormattable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString()}{separator} {Y.ToString()}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.gen.cs new file mode 100644 index 0000000..15f7841 --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.gen.cs @@ -0,0 +1,105 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with bool components. +/// +public partial struct bool2 : IVector2 + , IBooleanVector +{ + /// + public static int ComponentSize => sizeof(bool); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public bool X; + + /// + [XmlAttribute] + public bool Y; + + bool IVector2.X { readonly get => X; set => X = value; } + + bool IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2(bool x, bool y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2(bool xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static bool2 UnitX => new(true, false); + + /// + public static bool2 UnitY => new(false, true); + + /// + public bool this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out bool x, out bool y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.math.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.math.gen.cs new file mode 100644 index 0000000..52c4aa8 --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.math.gen.cs @@ -0,0 +1,13 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool2 +{ + /// + public readonly bool Any => X || Y; + + /// + public readonly bool All => X && Y; +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.numerics.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.numerics.gen.cs new file mode 100644 index 0000000..f154875 --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.numerics.gen.cs @@ -0,0 +1,53 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct bool2 +{ + /// + public static bool2 Zero => new(false); + + /// + public static bool2 One => new(true); +} + +// IBitwiseOperators +public partial struct bool2 : IBitwiseOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator |(bool2 a, bool2 b) + { + return new bool2(a.X | b.X, a.Y | b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator &(bool2 a, bool2 b) + { + return new bool2(a.X & b.X, a.Y & b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator ^(bool2 a, bool2 b) + { + return new bool2(a.X ^ b.X, a.Y ^ b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator !(bool2 value) + { + return new bool2(!value.X, !value.Y); + } + + // bool has no ~; the interface's complement is componentwise logical not + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool2 IBitwiseOperators.operator ~(bool2 value) + { + return !value; + } +} diff --git a/Brutal.Numerics/Vector/bool2/bool2.swizzle.gen.cs b/Brutal.Numerics/Vector/bool2/bool2.swizzle.gen.cs new file mode 100644 index 0000000..ec3a8cf --- /dev/null +++ b/Brutal.Numerics/Vector/bool2/bool2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public bool2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public bool2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct bool2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public bool R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public bool G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public bool2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public bool2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.copy.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.copy.gen.cs new file mode 100644 index 0000000..c5a2099 --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.equality.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.equality.gen.cs new file mode 100644 index 0000000..5e9cedc --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(bool3 other) + { + return X == other.X && Y == other.Y && Z == other.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is bool3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(bool3 a, bool3 b) + { + return a.Equals(b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(bool3 a, bool3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.format.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.format.gen.cs new file mode 100644 index 0000000..9c8fdf6 --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.format.gen.cs @@ -0,0 +1,38 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool3 : ISpanFormattable, IUtf8SpanFormattable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString()}{separator} {Y.ToString()}{separator} {Z.ToString()}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.gen.cs new file mode 100644 index 0000000..99ce84c --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.gen.cs @@ -0,0 +1,121 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with bool components. +/// +public partial struct bool3 : IVector3 + , IBooleanVector +{ + /// + public static int ComponentSize => sizeof(bool); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public bool X; + + /// + [XmlAttribute] + public bool Y; + + /// + [XmlAttribute] + public bool Z; + + bool IVector3.X { readonly get => X; set => X = value; } + + bool IVector3.Y { readonly get => Y; set => Y = value; } + + bool IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool x, bool y, bool z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool2 xy, bool z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static bool3 UnitX => new(true, false, false); + + /// + public static bool3 UnitY => new(false, true, false); + + /// + public static bool3 UnitZ => new(false, false, true); + + /// + public bool this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out bool x, out bool y, out bool z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.math.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.math.gen.cs new file mode 100644 index 0000000..ea1863c --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.math.gen.cs @@ -0,0 +1,13 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool3 +{ + /// + public readonly bool Any => X || Y || Z; + + /// + public readonly bool All => X && Y && Z; +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.numerics.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.numerics.gen.cs new file mode 100644 index 0000000..c0c6533 --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.numerics.gen.cs @@ -0,0 +1,53 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct bool3 +{ + /// + public static bool3 Zero => new(false); + + /// + public static bool3 One => new(true); +} + +// IBitwiseOperators +public partial struct bool3 : IBitwiseOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator |(bool3 a, bool3 b) + { + return new bool3(a.X | b.X, a.Y | b.Y, a.Z | b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator &(bool3 a, bool3 b) + { + return new bool3(a.X & b.X, a.Y & b.Y, a.Z & b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator ^(bool3 a, bool3 b) + { + return new bool3(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator !(bool3 value) + { + return new bool3(!value.X, !value.Y, !value.Z); + } + + // bool has no ~; the interface's complement is componentwise logical not + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool3 IBitwiseOperators.operator ~(bool3 value) + { + return !value; + } +} diff --git a/Brutal.Numerics/Vector/bool3/bool3.swizzle.gen.cs b/Brutal.Numerics/Vector/bool3/bool3.swizzle.gen.cs new file mode 100644 index 0000000..da470af --- /dev/null +++ b/Brutal.Numerics/Vector/bool3/bool3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public bool2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public bool2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public bool2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public bool2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public bool2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public bool2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public bool3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public bool3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public bool3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public bool3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public bool3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public bool3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct bool3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public bool R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public bool G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public bool B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public bool2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public bool2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public bool2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public bool2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public bool2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public bool2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public bool3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public bool3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public bool3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public bool3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.copy.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.copy.gen.cs new file mode 100644 index 0000000..4999548 --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.equality.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.equality.gen.cs new file mode 100644 index 0000000..8edb474 --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(bool4 other) + { + return X == other.X && Y == other.Y && Z == other.Z && W == other.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is bool4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(bool4 a, bool4 b) + { + return a.Equals(b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(bool4 a, bool4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.format.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.format.gen.cs new file mode 100644 index 0000000..db51cac --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.format.gen.cs @@ -0,0 +1,38 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool4 : ISpanFormattable, IUtf8SpanFormattable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString()}{separator} {Y.ToString()}{separator} {Z.ToString()}{separator} {W.ToString()}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.gen.cs new file mode 100644 index 0000000..c251d7c --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.gen.cs @@ -0,0 +1,146 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with bool components. +/// +public partial struct bool4 : IVector4 + , IBooleanVector +{ + /// + public static int ComponentSize => sizeof(bool); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public bool X; + + /// + [XmlAttribute] + public bool Y; + + /// + [XmlAttribute] + public bool Z; + + /// + [XmlAttribute] + public bool W; + + bool IVector4.X { readonly get => X; set => X = value; } + + bool IVector4.Y { readonly get => Y; set => Y = value; } + + bool IVector4.Z { readonly get => Z; set => Z = value; } + + bool IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool x, bool y, bool z, bool w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool3 xyz, bool w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool2 xy, bool2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool2 xy, bool z, bool w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static bool4 UnitX => new(true, false, false, false); + + /// + public static bool4 UnitY => new(false, true, false, false); + + /// + public static bool4 UnitZ => new(false, false, true, false); + + /// + public static bool4 UnitW => new(false, false, false, true); + + /// + public bool this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out bool x, out bool y, out bool z, out bool w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.math.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.math.gen.cs new file mode 100644 index 0000000..8ed05cb --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.math.gen.cs @@ -0,0 +1,13 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool4 +{ + /// + public readonly bool Any => X || Y || Z || W; + + /// + public readonly bool All => X && Y && Z && W; +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs new file mode 100644 index 0000000..bd9c10f --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs @@ -0,0 +1,53 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct bool4 +{ + /// + public static bool4 Zero => new(false); + + /// + public static bool4 One => new(true); +} + +// IBitwiseOperators +public partial struct bool4 : IBitwiseOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator |(bool4 a, bool4 b) + { + return new bool4(a.X | b.X, a.Y | b.Y, a.Z | b.Z, a.W | b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator &(bool4 a, bool4 b) + { + return new bool4(a.X & b.X, a.Y & b.Y, a.Z & b.Z, a.W & b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator ^(bool4 a, bool4 b) + { + return new bool4(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z, a.W ^ b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator !(bool4 value) + { + return new bool4(!value.X, !value.Y, !value.Z, !value.W); + } + + // bool has no ~; the interface's complement is componentwise logical not + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool4 IBitwiseOperators.operator ~(bool4 value) + { + return !value; + } +} diff --git a/Brutal.Numerics/Vector/bool4/bool4.swizzle.gen.cs b/Brutal.Numerics/Vector/bool4/bool4.swizzle.gen.cs new file mode 100644 index 0000000..3bf6890 --- /dev/null +++ b/Brutal.Numerics/Vector/bool4/bool4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct bool4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public bool2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public bool2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public bool2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public bool2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public bool2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public bool2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public bool2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public bool2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public bool2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public bool2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public bool2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public bool2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public bool3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public bool3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public bool3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public bool3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public bool3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public bool3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public bool3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public bool3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public bool3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public bool3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public bool3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public bool3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public bool3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public bool3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public bool3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public bool3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public bool3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public bool3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public bool3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public bool3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public bool3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public bool3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public bool3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public bool3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public bool4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public bool4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public bool4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public bool4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public bool4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public bool4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public bool4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public bool4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public bool4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public bool4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public bool4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public bool4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public bool4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public bool4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public bool4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public bool4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public bool4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public bool4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public bool4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public bool4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public bool4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public bool4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public bool4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct bool4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public bool R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public bool G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public bool B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public bool A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public bool2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public bool2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public bool2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public bool2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public bool2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public bool2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public bool2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public bool2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public bool2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public bool2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public bool2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public bool2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public bool3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public bool3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public bool3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public bool3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public bool3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public bool3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public bool3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public bool3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public bool3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public bool3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public bool3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public bool3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public bool3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public bool3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public bool3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public bool3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public bool3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public bool3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public bool3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public bool4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public bool4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A, B); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public bool4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G, A); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public bool4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A, G); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public bool4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G, B); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public bool4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B, G); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public bool4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B, A); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public bool4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A, B); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public bool4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R, A); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public bool4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A, R); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public bool4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R, B); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public bool4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B, R); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public bool4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G, A); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public bool4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A, G); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public bool4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R, A); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public bool4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A, R); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public bool4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R, G); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public bool4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G, R); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public bool4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G, B); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public bool4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B, G); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public bool4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R, B); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public bool4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B, R); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public bool4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R, G); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public bool4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G, R); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.copy.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.copy.gen.cs new file mode 100644 index 0000000..5ea09d1 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.equality.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.equality.gen.cs new file mode 100644 index 0000000..d08065b --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(byte2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is byte2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(byte2 a, byte2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(byte2 a, byte2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.format.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.format.gen.cs new file mode 100644 index 0000000..1eaca14 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static byte2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static byte2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static byte2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static byte2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid byte2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out byte2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out byte2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out byte2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a byte2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out byte2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.gen.cs new file mode 100644 index 0000000..7ca3c44 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with byte components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct byte2 : IVector2 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(byte); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public byte X; + + /// + [XmlAttribute] + public byte Y; + + byte IVector2.X { readonly get => X; set => X = value; } + + byte IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte2(byte x, byte y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte2(byte xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static byte2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static byte2 UnitX => new(1, 0); + + /// + public static byte2 UnitY => new(0, 1); + + /// + public byte this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out byte x, out byte y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.math-metric.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.math-metric.gen.cs new file mode 100644 index 0000000..557a4e7 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(byte2 a, byte2 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(byte2 a, byte2 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(byte2 a, byte2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.numerics-binary.gen.cs new file mode 100644 index 0000000..46d80a6 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct byte2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(byte2 value) + { + return byte.IsPow2(value.X) && byte.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Log2(byte2 value) + { + return new byte2(byte.Log2(value.X), byte.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator &(byte2 a, byte2 b) + { + return new((byte)(a.X & b.X), (byte)(a.Y & b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator |(byte2 a, byte2 b) + { + return new((byte)(a.X | b.X), (byte)(a.Y | b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator ^(byte2 a, byte2 b) + { + return new((byte)(a.X ^ b.X), (byte)(a.Y ^ b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator ~(byte2 value) + { + return new((byte)(~value.X), (byte)(~value.Y)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct byte2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(byte2 value) + { + return new bool2(byte.IsPow2(value.X), byte.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct byte2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 PopCount(byte2 value) + { + return new byte2(byte.PopCount(value.X), byte.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 LeadingZeroCount(byte2 value) + { + return new byte2(byte.LeadingZeroCount(value.X), byte.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 TrailingZeroCount(byte2 value) + { + return new byte2(byte.TrailingZeroCount(value.X), byte.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 RotateLeft(byte2 value, int rotateAmount) + { + return new byte2(byte.RotateLeft(value.X, rotateAmount), byte.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 RotateRight(byte2 value, int rotateAmount) + { + return new byte2(byte.RotateRight(value.X, rotateAmount), byte.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.numerics.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.numerics.gen.cs new file mode 100644 index 0000000..c6772d4 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct byte2 : INumberBase +{ + /// + public static byte2 Zero => new(0); + + /// + public static byte2 One => new(1); + + static byte2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static byte2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static byte2 INumberBase.Abs(byte2 value) => value; + + static bool INumberBase.IsCanonical(byte2 value) => true; + + static bool INumberBase.IsComplexNumber(byte2 value) => false; + + static bool INumberBase.IsImaginaryNumber(byte2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(byte2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(byte2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(byte2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + static bool INumberBase.IsNegative(byte2 value) => false; + + static bool INumberBase.IsPositive(byte2 value) => true; + + static bool INumberBase.IsFinite(byte2 value) => true; + + static bool INumberBase.IsInfinity(byte2 value) => false; + + static bool INumberBase.IsNegativeInfinity(byte2 value) => false; + + static bool INumberBase.IsPositiveInfinity(byte2 value) => false; + + static bool INumberBase.IsInteger(byte2 value) => true; + + static bool INumberBase.IsRealNumber(byte2 value) => true; + + static bool INumberBase.IsNaN(byte2 value) => false; + + static bool INumberBase.IsNormal(byte2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(byte2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 MaxMagnitude(byte2 a, byte2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 MaxMagnitudeNumber(byte2 a, byte2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 MinMagnitude(byte2 a, byte2 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 MinMagnitudeNumber(byte2 a, byte2 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Add(byte2 a, byte2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Divide(byte2 a, byte2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Multiply(byte2 a, byte2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Negate(byte2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Subtract(byte2 a, byte2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator +(byte2 a, byte2 b) + { + return new((byte)(a.X + b.X), (byte)(a.Y + b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator -(byte2 a, byte2 b) + { + return new((byte)(a.X - b.X), (byte)(a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator *(byte2 a, byte2 b) + { + return new((byte)(a.X * b.X), (byte)(a.Y * b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator /(byte2 a, byte2 b) + { + return new((byte)(a.X / b.X), (byte)(a.Y / b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator -(byte2 a) + { + return new((byte)(0 - a.X), (byte)(0 - a.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator +(byte2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static byte2 IIncrementOperators.operator ++(byte2 value) => value + One; + + static byte2 IDecrementOperators.operator --(byte2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out byte2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(byte2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out byte2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(byte2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out byte2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(byte2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct byte2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Divide(byte2 a, byte b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Multiply(byte2 a, byte b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Multiply(byte a, byte2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator *(byte2 a, byte b) + { + return new((byte)(a.X * b), (byte)(a.Y * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator /(byte2 a, byte b) + { + return new((byte)(a.X / b), (byte)(a.Y / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator *(byte a, byte2 b) + { + return new((byte)(a * b.X), (byte)(a * b.Y)); + } +} + +// INumber +public partial struct byte2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Clamp(byte2 value, byte2 min, byte2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Max(byte2 a, byte2 b) + { + return new(byte.Max(a.X, b.X), byte.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 Min(byte2 a, byte2 b) + { + return new(byte.Min(a.X, b.X), byte.Min(a.Y, b.Y)); + } + + static byte2 INumber.MaxNumber(byte2 a, byte2 b) => Max(a, b); + + static byte2 INumber.MinNumber(byte2 a, byte2 b) => Min(a, b); + + static byte2 INumber.CopySign(byte2 value, byte2 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static byte2 INumber.ClampNative(byte2 value, byte2 min, byte2 max) => Clamp(value, min, max); + + static byte2 INumber.MaxNative(byte2 a, byte2 b) => Max(a, b); + + static byte2 INumber.MinNative(byte2 a, byte2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(byte2 value) => + throw new NotSupportedException($"{nameof(byte2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte2 operator %(byte2 a, byte2 b) + { + return new byte2((byte)(a.X % b.X), (byte)(a.Y % b.Y)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(byte2)} has no total order."); + + int IComparable.CompareTo(byte2 other) => + throw new NotSupportedException($"{nameof(byte2)} has no total order."); + + static bool IComparisonOperators.operator <(byte2 a, byte2 b) => + throw new NotSupportedException($"{nameof(byte2)} has no total order."); + + static bool IComparisonOperators.operator <=(byte2 a, byte2 b) => + throw new NotSupportedException($"{nameof(byte2)} has no total order."); + + static bool IComparisonOperators.operator >(byte2 a, byte2 b) => + throw new NotSupportedException($"{nameof(byte2)} has no total order."); + + static bool IComparisonOperators.operator >=(byte2 a, byte2 b) => + throw new NotSupportedException($"{nameof(byte2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct byte2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(byte2 a, byte2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(byte2 a, byte2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(byte2 a, byte2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(byte2 a, byte2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(byte2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(byte2 value) + { + return new bool2(byte.IsEvenInteger(value.X), byte.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(byte2 value) + { + return new bool2(byte.IsOddInteger(value.X), byte.IsOddInteger(value.Y)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct byte2 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/byte2/byte2.pack.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.pack.gen.cs new file mode 100644 index 0000000..2553d68 --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte2 +{ + public static byte2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Pack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Pack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Pack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Pack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Pack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte2 result, elementConverter); + return result; + } + + public static byte2 Unpack(in sbyte2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToByte(mode)); + } + + public static byte2 Pack(in short2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Short.ToByte(mode)); + } + + public static byte2 Pack(in ushort2 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UShort.ToByte(mode)); + } + + public static byte2 Pack(in int2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Int.ToByte(mode)); + } + + public static byte2 Pack(in uint2 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UInt.ToByte(mode)); + } + + public static byte2 Pack(in float2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToByte(mode)); + } + + public static byte2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToByte(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Short.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToByte(mode)); + } +} diff --git a/Brutal.Numerics/Vector/byte2/byte2.swizzle.gen.cs b/Brutal.Numerics/Vector/byte2/byte2.swizzle.gen.cs new file mode 100644 index 0000000..1f601fa --- /dev/null +++ b/Brutal.Numerics/Vector/byte2/byte2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public byte2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public byte2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct byte2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public byte R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public byte G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public byte2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public byte2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.color.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.color.gen.cs new file mode 100644 index 0000000..f1e03bd --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.color.gen.cs @@ -0,0 +1,87 @@ +// - edit Vector.color.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + /// + /// Constructs a byte3 vector representing an RGB color. + /// + /// Red component. + /// Green component. + /// Blue component. + /// A byte3 color with the specified RGB values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Rgb(byte r, byte g, byte b) + { + return new byte3(r, g, b); + } + + /// + /// Constructs a byte3 vector representing a grayscale color. + /// + /// Single value used for red, green, and blue components. + /// A byte3 grayscale color with the specified value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Grayscale(byte v) + { + return new byte3(v, v, v); + } +} + +// Specialized for byte3 +public partial struct byte3 +{ + /// + /// Construct a byte3 vector from a uint hex value + /// + /// Color value as a uint + /// A byte3 color with the specified RGB values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Hex(uint hex) + { + return new byte3((byte)(hex >> 16), (byte)(hex >> 8), (byte)(hex >> 0)); + } + + /// + /// Construct a byte3 vector in a RGB color context, from a uint hex value + /// + /// uint value + /// A byte3 color with the specified RGB values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 HexColor(uint hex) + { + return Hex(hex); + } + + /// + /// Construct a byte3 vector from a uint hex value string + /// + /// Hexadecimal string representation in 0xRRGGBBAA format. + /// vector + public static byte3 Hex(ReadOnlySpan hex) + { + if (hex.Length != 8 || hex[0] != '0' || hex[1] != 'x') + throw new FormatException("Invalid hex format"); + return Hex(uint.Parse(hex[2..], NumberStyles.HexNumber)); + } + + /// + /// Construct a byte3 vector in an RGB color context, from a uint hex value string + /// + /// Hexadecimal string representation in 0xRRGGBBAA format. + /// vector + public static byte3 HexColor(ReadOnlySpan hex) + { + return Hex(hex); + } + + /// + /// Converts the byte3 color to a hexadecimal string. + /// + public readonly string ToHexString() + { + return $"0x{R:X2}{G:X2}{B:X2}"; + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.copy.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.copy.gen.cs new file mode 100644 index 0000000..4271777 --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.equality.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.equality.gen.cs new file mode 100644 index 0000000..e6e45ff --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(byte3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is byte3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(byte3 a, byte3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(byte3 a, byte3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.format.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.format.gen.cs new file mode 100644 index 0000000..dd2664b --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static byte3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static byte3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static byte3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static byte3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid byte3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out byte3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out byte3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out byte3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a byte3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out byte3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.gen.cs new file mode 100644 index 0000000..00634eb --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with byte components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct byte3 : IVector3 + , IIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(byte); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public byte X; + + /// + [XmlAttribute] + public byte Y; + + /// + [XmlAttribute] + public byte Z; + + byte IVector3.X { readonly get => X; set => X = value; } + + byte IVector3.Y { readonly get => Y; set => Y = value; } + + byte IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte3(byte x, byte y, byte z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte3(byte xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte3(byte2 xy, byte z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static byte3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static byte3 UnitX => new(1, 0, 0); + + /// + public static byte3 UnitY => new(0, 1, 0); + + /// + public static byte3 UnitZ => new(0, 0, 1); + + /// + public byte this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out byte x, out byte y, out byte z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.math-metric.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.math-metric.gen.cs new file mode 100644 index 0000000..626c444 --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(byte3 a, byte3 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(byte3 a, byte3 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(byte3 a, byte3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.math.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.math.gen.cs new file mode 100644 index 0000000..c8781eb --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Cross(byte3 a, byte3 b) + { + return new( + (byte)(a.Y * b.Z - a.Z * b.Y), + (byte)(a.Z * b.X - a.X * b.Z), + (byte)(a.X * b.Y - a.Y * b.X)); + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.numerics-binary.gen.cs new file mode 100644 index 0000000..b42f385 --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct byte3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(byte3 value) + { + return byte.IsPow2(value.X) && byte.IsPow2(value.Y) && byte.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Log2(byte3 value) + { + return new byte3(byte.Log2(value.X), byte.Log2(value.Y), byte.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator &(byte3 a, byte3 b) + { + return new((byte)(a.X & b.X), (byte)(a.Y & b.Y), (byte)(a.Z & b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator |(byte3 a, byte3 b) + { + return new((byte)(a.X | b.X), (byte)(a.Y | b.Y), (byte)(a.Z | b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator ^(byte3 a, byte3 b) + { + return new((byte)(a.X ^ b.X), (byte)(a.Y ^ b.Y), (byte)(a.Z ^ b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator ~(byte3 value) + { + return new((byte)(~value.X), (byte)(~value.Y), (byte)(~value.Z)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct byte3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(byte3 value) + { + return new bool3(byte.IsPow2(value.X), byte.IsPow2(value.Y), byte.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct byte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 PopCount(byte3 value) + { + return new byte3(byte.PopCount(value.X), byte.PopCount(value.Y), byte.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 LeadingZeroCount(byte3 value) + { + return new byte3(byte.LeadingZeroCount(value.X), byte.LeadingZeroCount(value.Y), byte.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 TrailingZeroCount(byte3 value) + { + return new byte3(byte.TrailingZeroCount(value.X), byte.TrailingZeroCount(value.Y), byte.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 RotateLeft(byte3 value, int rotateAmount) + { + return new byte3(byte.RotateLeft(value.X, rotateAmount), byte.RotateLeft(value.Y, rotateAmount), byte.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 RotateRight(byte3 value, int rotateAmount) + { + return new byte3(byte.RotateRight(value.X, rotateAmount), byte.RotateRight(value.Y, rotateAmount), byte.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.numerics.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.numerics.gen.cs new file mode 100644 index 0000000..9c34f2e --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct byte3 : INumberBase +{ + /// + public static byte3 Zero => new(0); + + /// + public static byte3 One => new(1); + + static byte3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static byte3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static byte3 INumberBase.Abs(byte3 value) => value; + + static bool INumberBase.IsCanonical(byte3 value) => true; + + static bool INumberBase.IsComplexNumber(byte3 value) => false; + + static bool INumberBase.IsImaginaryNumber(byte3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(byte3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(byte3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(byte3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + static bool INumberBase.IsNegative(byte3 value) => false; + + static bool INumberBase.IsPositive(byte3 value) => true; + + static bool INumberBase.IsFinite(byte3 value) => true; + + static bool INumberBase.IsInfinity(byte3 value) => false; + + static bool INumberBase.IsNegativeInfinity(byte3 value) => false; + + static bool INumberBase.IsPositiveInfinity(byte3 value) => false; + + static bool INumberBase.IsInteger(byte3 value) => true; + + static bool INumberBase.IsRealNumber(byte3 value) => true; + + static bool INumberBase.IsNaN(byte3 value) => false; + + static bool INumberBase.IsNormal(byte3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(byte3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 MaxMagnitude(byte3 a, byte3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 MaxMagnitudeNumber(byte3 a, byte3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 MinMagnitude(byte3 a, byte3 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 MinMagnitudeNumber(byte3 a, byte3 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Add(byte3 a, byte3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Divide(byte3 a, byte3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Multiply(byte3 a, byte3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Negate(byte3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Subtract(byte3 a, byte3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator +(byte3 a, byte3 b) + { + return new((byte)(a.X + b.X), (byte)(a.Y + b.Y), (byte)(a.Z + b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator -(byte3 a, byte3 b) + { + return new((byte)(a.X - b.X), (byte)(a.Y - b.Y), (byte)(a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator *(byte3 a, byte3 b) + { + return new((byte)(a.X * b.X), (byte)(a.Y * b.Y), (byte)(a.Z * b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator /(byte3 a, byte3 b) + { + return new((byte)(a.X / b.X), (byte)(a.Y / b.Y), (byte)(a.Z / b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator -(byte3 a) + { + return new((byte)(0 - a.X), (byte)(0 - a.Y), (byte)(0 - a.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator +(byte3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static byte3 IIncrementOperators.operator ++(byte3 value) => value + One; + + static byte3 IDecrementOperators.operator --(byte3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out byte3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(byte3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out byte3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(byte3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out byte3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(byte3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct byte3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Divide(byte3 a, byte b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Multiply(byte3 a, byte b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Multiply(byte a, byte3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator *(byte3 a, byte b) + { + return new((byte)(a.X * b), (byte)(a.Y * b), (byte)(a.Z * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator /(byte3 a, byte b) + { + return new((byte)(a.X / b), (byte)(a.Y / b), (byte)(a.Z / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator *(byte a, byte3 b) + { + return new((byte)(a * b.X), (byte)(a * b.Y), (byte)(a * b.Z)); + } +} + +// INumber +public partial struct byte3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Clamp(byte3 value, byte3 min, byte3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Max(byte3 a, byte3 b) + { + return new(byte.Max(a.X, b.X), byte.Max(a.Y, b.Y), byte.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 Min(byte3 a, byte3 b) + { + return new(byte.Min(a.X, b.X), byte.Min(a.Y, b.Y), byte.Min(a.Z, b.Z)); + } + + static byte3 INumber.MaxNumber(byte3 a, byte3 b) => Max(a, b); + + static byte3 INumber.MinNumber(byte3 a, byte3 b) => Min(a, b); + + static byte3 INumber.CopySign(byte3 value, byte3 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static byte3 INumber.ClampNative(byte3 value, byte3 min, byte3 max) => Clamp(value, min, max); + + static byte3 INumber.MaxNative(byte3 a, byte3 b) => Max(a, b); + + static byte3 INumber.MinNative(byte3 a, byte3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(byte3 value) => + throw new NotSupportedException($"{nameof(byte3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte3 operator %(byte3 a, byte3 b) + { + return new byte3((byte)(a.X % b.X), (byte)(a.Y % b.Y), (byte)(a.Z % b.Z)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(byte3)} has no total order."); + + int IComparable.CompareTo(byte3 other) => + throw new NotSupportedException($"{nameof(byte3)} has no total order."); + + static bool IComparisonOperators.operator <(byte3 a, byte3 b) => + throw new NotSupportedException($"{nameof(byte3)} has no total order."); + + static bool IComparisonOperators.operator <=(byte3 a, byte3 b) => + throw new NotSupportedException($"{nameof(byte3)} has no total order."); + + static bool IComparisonOperators.operator >(byte3 a, byte3 b) => + throw new NotSupportedException($"{nameof(byte3)} has no total order."); + + static bool IComparisonOperators.operator >=(byte3 a, byte3 b) => + throw new NotSupportedException($"{nameof(byte3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct byte3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(byte3 a, byte3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(byte3 a, byte3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(byte3 a, byte3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(byte3 a, byte3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(byte3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(byte3 value) + { + return new bool3(byte.IsEvenInteger(value.X), byte.IsEvenInteger(value.Y), byte.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(byte3 value) + { + return new bool3(byte.IsOddInteger(value.X), byte.IsOddInteger(value.Y), byte.IsOddInteger(value.Z)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct byte3 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/byte3/byte3.pack.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.pack.gen.cs new file mode 100644 index 0000000..0b9233f --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + public static byte3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Pack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Pack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Pack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Pack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Pack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte3 result, elementConverter); + return result; + } + + public static byte3 Unpack(in sbyte3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToByte(mode)); + } + + public static byte3 Pack(in short3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Short.ToByte(mode)); + } + + public static byte3 Pack(in ushort3 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UShort.ToByte(mode)); + } + + public static byte3 Pack(in int3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Int.ToByte(mode)); + } + + public static byte3 Pack(in uint3 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UInt.ToByte(mode)); + } + + public static byte3 Pack(in float3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToByte(mode)); + } + + public static byte3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToByte(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Short.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToByte(mode)); + } +} diff --git a/Brutal.Numerics/Vector/byte3/byte3.swizzle.gen.cs b/Brutal.Numerics/Vector/byte3/byte3.swizzle.gen.cs new file mode 100644 index 0000000..7f3972f --- /dev/null +++ b/Brutal.Numerics/Vector/byte3/byte3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public byte2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public byte2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public byte2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public byte2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public byte2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public byte2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public byte3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public byte3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public byte3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public byte3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public byte3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public byte3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct byte3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public byte R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public byte G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public byte B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public byte2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public byte2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public byte2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public byte2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public byte2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public byte2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public byte3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public byte3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public byte3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public byte3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.color.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.color.gen.cs new file mode 100644 index 0000000..ebf6376 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.color.gen.cs @@ -0,0 +1,113 @@ +// - edit Vector.color.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 +{ + /// + /// Constructs a byte4 vector representing an RGB color with full opacity (alpha = 255). + /// + /// Red component. + /// Green component. + /// Blue component. + /// A byte4 color with the specified RGB values and alpha set to 255. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Rgb(byte r, byte g, byte b) + { + return new byte4(r, g, b, 255); + } + + /// + /// Constructs a byte4 vector representing a grayscale color with full opacity (alpha = 255). + /// + /// Single value used for red, green, and blue components. + /// A byte4 grayscale color with the specified value and alpha set to 255. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Grayscale(byte v) + { + return new byte4(v, v, v, 255); + } + + /// + /// Constructs a byte4 vector representing an RGBA color. + /// + /// Red component. + /// Green component. + /// Blue component. + /// Alpha component. + /// A byte4 color with the specified RGBA values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Rgba(byte r, byte g, byte b, byte a) + { + return new byte4(r, g, b, a); + } + + /// + /// Constructs a byte4 vector representing a grayscale color with a specified alpha value. + /// + /// Single value used for red, green, and blue components. + /// Alpha component. + /// A byte4 grayscale color with the specified value and alpha. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Grayscale(byte v, byte a) + { + return new byte4(v, v, v, a); + } +} + +// Specialized for byte4 +public partial struct byte4 +{ + /// + /// Construct a byte4 vector from a uint hex value + /// + /// Color value as a uint + /// A byte4 color with the specified RGBA values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Hex(uint hex) + { + return new byte4((byte)(hex >> 24), (byte)(hex >> 16), (byte)(hex >> 8), (byte)(hex >> 0)); + } + + /// + /// Construct a byte4 vector in a RGBA color context, from a uint hex value + /// + /// uint value + /// A byte4 color with the specified RGBA values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 HexColor(uint hex) + { + return Hex(hex); + } + + /// + /// Construct a byte4 vector from a uint hex value string + /// + /// Hexadecimal string representation in 0xRRGGBBAA format. + /// vector + public static byte4 Hex(ReadOnlySpan hex) + { + if (hex.Length != 10 || hex[0] != '0' || hex[1] != 'x') + throw new FormatException("Invalid hex format"); + return Hex(uint.Parse(hex[2..], NumberStyles.HexNumber)); + } + + /// + /// Construct a byte4 vector in an RGBA color context, from a uint hex value string + /// + /// Hexadecimal string representation in 0xRRGGBBAA format. + /// vector + public static byte4 HexColor(ReadOnlySpan hex) + { + return Hex(hex); + } + + /// + /// Converts the byte4 color to a hexadecimal string. + /// + public readonly string ToHexString() + { + return $"0x{R:X2}{G:X2}{B:X2}{A:X2}"; + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.copy.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.copy.gen.cs new file mode 100644 index 0000000..84ae6e3 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.equality.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.equality.gen.cs new file mode 100644 index 0000000..95075a4 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(byte4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is byte4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(byte4 a, byte4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(byte4 a, byte4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.format.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.format.gen.cs new file mode 100644 index 0000000..10364bf --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static byte4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static byte4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static byte4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static byte4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid byte4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out byte4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out byte4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out byte4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a byte4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out byte4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.gen.cs new file mode 100644 index 0000000..3717fe9 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with byte components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct byte4 : IVector4 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(byte); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public byte X; + + /// + [XmlAttribute] + public byte Y; + + /// + [XmlAttribute] + public byte Z; + + /// + [XmlAttribute] + public byte W; + + byte IVector4.X { readonly get => X; set => X = value; } + + byte IVector4.Y { readonly get => Y; set => Y = value; } + + byte IVector4.Z { readonly get => Z; set => Z = value; } + + byte IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte4(byte x, byte y, byte z, byte w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte4(byte xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte4(byte3 xyz, byte w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte4(byte2 xy, byte2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte4(byte2 xy, byte z, byte w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public byte4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static byte4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static byte4 UnitX => new(1, 0, 0, 0); + + /// + public static byte4 UnitY => new(0, 1, 0, 0); + + /// + public static byte4 UnitZ => new(0, 0, 1, 0); + + /// + public static byte4 UnitW => new(0, 0, 0, 1); + + /// + public byte this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out byte x, out byte y, out byte z, out byte w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.math-metric.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.math-metric.gen.cs new file mode 100644 index 0000000..8dd2545 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(byte4 a, byte4 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(byte4 a, byte4 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z) + (a.W - b.W) * (a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(byte4 a, byte4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.numerics-binary.gen.cs new file mode 100644 index 0000000..6b8e3c0 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct byte4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(byte4 value) + { + return byte.IsPow2(value.X) && byte.IsPow2(value.Y) && byte.IsPow2(value.Z) && byte.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Log2(byte4 value) + { + return new byte4(byte.Log2(value.X), byte.Log2(value.Y), byte.Log2(value.Z), byte.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator &(byte4 a, byte4 b) + { + return new((byte)(a.X & b.X), (byte)(a.Y & b.Y), (byte)(a.Z & b.Z), (byte)(a.W & b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator |(byte4 a, byte4 b) + { + return new((byte)(a.X | b.X), (byte)(a.Y | b.Y), (byte)(a.Z | b.Z), (byte)(a.W | b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator ^(byte4 a, byte4 b) + { + return new((byte)(a.X ^ b.X), (byte)(a.Y ^ b.Y), (byte)(a.Z ^ b.Z), (byte)(a.W ^ b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator ~(byte4 value) + { + return new((byte)(~value.X), (byte)(~value.Y), (byte)(~value.Z), (byte)(~value.W)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct byte4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(byte4 value) + { + return new bool4(byte.IsPow2(value.X), byte.IsPow2(value.Y), byte.IsPow2(value.Z), byte.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct byte4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 PopCount(byte4 value) + { + return new byte4(byte.PopCount(value.X), byte.PopCount(value.Y), byte.PopCount(value.Z), byte.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 LeadingZeroCount(byte4 value) + { + return new byte4(byte.LeadingZeroCount(value.X), byte.LeadingZeroCount(value.Y), byte.LeadingZeroCount(value.Z), byte.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 TrailingZeroCount(byte4 value) + { + return new byte4(byte.TrailingZeroCount(value.X), byte.TrailingZeroCount(value.Y), byte.TrailingZeroCount(value.Z), byte.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 RotateLeft(byte4 value, int rotateAmount) + { + return new byte4(byte.RotateLeft(value.X, rotateAmount), byte.RotateLeft(value.Y, rotateAmount), byte.RotateLeft(value.Z, rotateAmount), byte.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 RotateRight(byte4 value, int rotateAmount) + { + return new byte4(byte.RotateRight(value.X, rotateAmount), byte.RotateRight(value.Y, rotateAmount), byte.RotateRight(value.Z, rotateAmount), byte.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.numerics.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.numerics.gen.cs new file mode 100644 index 0000000..8d140f7 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct byte4 : INumberBase +{ + /// + public static byte4 Zero => new(0); + + /// + public static byte4 One => new(1); + + static byte4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static byte4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static byte4 INumberBase.Abs(byte4 value) => value; + + static bool INumberBase.IsCanonical(byte4 value) => true; + + static bool INumberBase.IsComplexNumber(byte4 value) => false; + + static bool INumberBase.IsImaginaryNumber(byte4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(byte4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(byte4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(byte4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + static bool INumberBase.IsNegative(byte4 value) => false; + + static bool INumberBase.IsPositive(byte4 value) => true; + + static bool INumberBase.IsFinite(byte4 value) => true; + + static bool INumberBase.IsInfinity(byte4 value) => false; + + static bool INumberBase.IsNegativeInfinity(byte4 value) => false; + + static bool INumberBase.IsPositiveInfinity(byte4 value) => false; + + static bool INumberBase.IsInteger(byte4 value) => true; + + static bool INumberBase.IsRealNumber(byte4 value) => true; + + static bool INumberBase.IsNaN(byte4 value) => false; + + static bool INumberBase.IsNormal(byte4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(byte4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 MaxMagnitude(byte4 a, byte4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 MaxMagnitudeNumber(byte4 a, byte4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 MinMagnitude(byte4 a, byte4 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 MinMagnitudeNumber(byte4 a, byte4 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Add(byte4 a, byte4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Divide(byte4 a, byte4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Multiply(byte4 a, byte4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Negate(byte4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Subtract(byte4 a, byte4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator +(byte4 a, byte4 b) + { + return new((byte)(a.X + b.X), (byte)(a.Y + b.Y), (byte)(a.Z + b.Z), (byte)(a.W + b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator -(byte4 a, byte4 b) + { + return new((byte)(a.X - b.X), (byte)(a.Y - b.Y), (byte)(a.Z - b.Z), (byte)(a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator *(byte4 a, byte4 b) + { + return new((byte)(a.X * b.X), (byte)(a.Y * b.Y), (byte)(a.Z * b.Z), (byte)(a.W * b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator /(byte4 a, byte4 b) + { + return new((byte)(a.X / b.X), (byte)(a.Y / b.Y), (byte)(a.Z / b.Z), (byte)(a.W / b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator -(byte4 a) + { + return new((byte)(0 - a.X), (byte)(0 - a.Y), (byte)(0 - a.Z), (byte)(0 - a.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator +(byte4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static byte4 IIncrementOperators.operator ++(byte4 value) => value + One; + + static byte4 IDecrementOperators.operator --(byte4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out byte4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(byte4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out byte4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(byte4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out byte4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(byte4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct byte4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Divide(byte4 a, byte b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Multiply(byte4 a, byte b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Multiply(byte a, byte4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator *(byte4 a, byte b) + { + return new((byte)(a.X * b), (byte)(a.Y * b), (byte)(a.Z * b), (byte)(a.W * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator /(byte4 a, byte b) + { + return new((byte)(a.X / b), (byte)(a.Y / b), (byte)(a.Z / b), (byte)(a.W / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator *(byte a, byte4 b) + { + return new((byte)(a * b.X), (byte)(a * b.Y), (byte)(a * b.Z), (byte)(a * b.W)); + } +} + +// INumber +public partial struct byte4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Clamp(byte4 value, byte4 min, byte4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Max(byte4 a, byte4 b) + { + return new(byte.Max(a.X, b.X), byte.Max(a.Y, b.Y), byte.Max(a.Z, b.Z), byte.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 Min(byte4 a, byte4 b) + { + return new(byte.Min(a.X, b.X), byte.Min(a.Y, b.Y), byte.Min(a.Z, b.Z), byte.Min(a.W, b.W)); + } + + static byte4 INumber.MaxNumber(byte4 a, byte4 b) => Max(a, b); + + static byte4 INumber.MinNumber(byte4 a, byte4 b) => Min(a, b); + + static byte4 INumber.CopySign(byte4 value, byte4 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static byte4 INumber.ClampNative(byte4 value, byte4 min, byte4 max) => Clamp(value, min, max); + + static byte4 INumber.MaxNative(byte4 a, byte4 b) => Max(a, b); + + static byte4 INumber.MinNative(byte4 a, byte4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(byte4 value) => + throw new NotSupportedException($"{nameof(byte4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte4 operator %(byte4 a, byte4 b) + { + return new byte4((byte)(a.X % b.X), (byte)(a.Y % b.Y), (byte)(a.Z % b.Z), (byte)(a.W % b.W)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(byte4)} has no total order."); + + int IComparable.CompareTo(byte4 other) => + throw new NotSupportedException($"{nameof(byte4)} has no total order."); + + static bool IComparisonOperators.operator <(byte4 a, byte4 b) => + throw new NotSupportedException($"{nameof(byte4)} has no total order."); + + static bool IComparisonOperators.operator <=(byte4 a, byte4 b) => + throw new NotSupportedException($"{nameof(byte4)} has no total order."); + + static bool IComparisonOperators.operator >(byte4 a, byte4 b) => + throw new NotSupportedException($"{nameof(byte4)} has no total order."); + + static bool IComparisonOperators.operator >=(byte4 a, byte4 b) => + throw new NotSupportedException($"{nameof(byte4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct byte4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(byte4 a, byte4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(byte4 a, byte4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(byte4 a, byte4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(byte4 a, byte4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(byte4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(byte4 value) + { + return new bool4(byte.IsEvenInteger(value.X), byte.IsEvenInteger(value.Y), byte.IsEvenInteger(value.Z), byte.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(byte4 value) + { + return new bool4(byte.IsOddInteger(value.X), byte.IsOddInteger(value.Y), byte.IsOddInteger(value.Z), byte.IsOddInteger(value.W)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct byte4 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/byte4/byte4.pack.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.pack.gen.cs new file mode 100644 index 0000000..ee327d0 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.pack.gen.cs @@ -0,0 +1,217 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 +{ + public static byte4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Pack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Pack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Pack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Pack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Pack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out byte4 result, elementConverter); + return result; + } + + public static byte4 Unpack(in sbyte4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToByte(mode)); + } + + public static byte4 Pack(in short4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Short.ToByte(mode)); + } + + public static byte4 Pack(in ushort4 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UShort.ToByte(mode)); + } + + public static byte4 Pack(in int4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Int.ToByte(mode)); + } + + public static byte4 Pack(in uint4 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UInt.ToByte(mode)); + } + + public static byte4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToByte(mode)); + } + + public static byte4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToByte(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Short.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToByte(mode)); + } + + // the packed-RGBA8888 color affordance (byte4 is the RGBA byte color); implicitness to revisit with the Color milestone + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint(byte4 v) + { + return Unsafe.BitCast(v); + } +} diff --git a/Brutal.Numerics/Vector/byte4/byte4.swizzle.gen.cs b/Brutal.Numerics/Vector/byte4/byte4.swizzle.gen.cs new file mode 100644 index 0000000..070a3f4 --- /dev/null +++ b/Brutal.Numerics/Vector/byte4/byte4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct byte4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public byte2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public byte2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public byte2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public byte2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public byte2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public byte2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public byte2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public byte2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public byte2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public byte2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public byte2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public byte2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public byte3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public byte3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public byte3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public byte3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public byte3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public byte3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public byte3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public byte3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public byte3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public byte3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public byte3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public byte3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public byte3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public byte3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public byte3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public byte3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public byte3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public byte3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public byte3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public byte3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public byte3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public byte3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public byte3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public byte3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public byte4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public byte4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public byte4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public byte4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public byte4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public byte4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public byte4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public byte4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public byte4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public byte4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public byte4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public byte4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public byte4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public byte4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public byte4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public byte4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public byte4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public byte4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public byte4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public byte4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public byte4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public byte4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public byte4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct byte4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public byte R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public byte G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public byte B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public byte A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public byte2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public byte2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public byte2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public byte2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public byte2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public byte2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public byte2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public byte2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public byte2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public byte2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public byte2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public byte2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public byte3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public byte3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public byte3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public byte3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public byte3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public byte3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public byte3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public byte3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public byte3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public byte3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public byte3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public byte3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public byte3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public byte3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public byte3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public byte3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public byte3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public byte3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public byte3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public byte4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public byte4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public byte4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public byte4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public byte4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public byte4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public byte4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public byte4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public byte4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public byte4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public byte4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public byte4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public byte4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public byte4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public byte4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public byte4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public byte4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public byte4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public byte4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public byte4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public byte4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public byte4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public byte4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public byte4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.copy.gen.cs b/Brutal.Numerics/Vector/double2/double2.copy.gen.cs new file mode 100644 index 0000000..87f1a1b --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.equality.gen.cs b/Brutal.Numerics/Vector/double2/double2.equality.gen.cs new file mode 100644 index 0000000..9780be4 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(double2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is double2 other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(double2 a, double2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(double2 a, double2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.format.gen.cs b/Brutal.Numerics/Vector/double2/double2.format.gen.cs new file mode 100644 index 0000000..12886b6 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static double2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static double2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static double2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static double2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid double2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out double2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out double2 result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out double2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a double2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out double2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.gen.cs b/Brutal.Numerics/Vector/double2/double2.gen.cs new file mode 100644 index 0000000..0d41e5e --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.gen.cs @@ -0,0 +1,107 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with double components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct double2 : IVector2 + , IFloatingVector + , IFloatingVector2 +{ + /// + public static int ComponentSize => sizeof(double); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public double X; + + /// + [XmlAttribute] + public double Y; + + double IVector2.X { readonly get => X; set => X = value; } + + double IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(double x, double y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(double xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static double2 UnitX => new(1, 0); + + /// + public static double2 UnitY => new(0, 1); + + /// + public double this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out double x, out double y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.math-metric.gen.cs b/Brutal.Numerics/Vector/double2/double2.math-metric.gen.cs new file mode 100644 index 0000000..4f9259f --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.math-metric.gen.cs @@ -0,0 +1,62 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return double.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(double2 a, double2 b) + { + return double.Sqrt(DistanceSquared(a, b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double DistanceSquared(double2 a, double2 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Dot(double2 a, double2 b) + { + return a.X * b.X + a.Y * b.Y; + } + + /// + /// Thrown when the input vector is a zero vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Normalize(double2 value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / double.Sqrt(lengthSquared); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 NormalizeOrZero(double2 value) + { + var length = double.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.math.gen.cs b/Brutal.Numerics/Vector/double2/double2.math.gen.cs new file mode 100644 index 0000000..dfab6fe --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.math.gen.cs @@ -0,0 +1,60 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Reflect(double2 vector, double2 normal) + { + return vector - 2 * Dot(vector, normal) * normal; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Transform(double2 position, double3x2 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.Z; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Transform(double2 position, double4x4 matrix) + { + return double4.Transform(position, matrix).XY; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Transform(double2 value, doubleQuat rotation) + { + return double4.Transform(value, rotation).XY; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 TransformNormal(double2 normal, double3x2 matrix) + { + var result = matrix.X * normal.X; + result += matrix.Y * normal.Y; + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 TransformNormal(double2 normal, double4x4 matrix) + { + var result = matrix.X * normal.X; + + result += matrix.Y * normal.Y; + + return result.XY; + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/double2/double2.numerics-binary.gen.cs new file mode 100644 index 0000000..0b063d6 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.numerics-binary.gen.cs @@ -0,0 +1,54 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct double2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(double2 value) + { + return double.IsPow2(value.X) && double.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double2 IBitwiseOperators.operator &(double2 a, double2 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) & Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double2 IBitwiseOperators.operator |(double2 a, double2 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) | Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double2 IBitwiseOperators.operator ^(double2 a, double2 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) ^ Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double2 IBitwiseOperators.operator ~(double2 value) + { + return Unsafe.BitCast(~Unsafe.BitCast(value)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct double2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(double2 value) + { + return new bool2(double.IsPow2(value.X), double.IsPow2(value.Y)); + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.numerics-floating.gen.cs b/Brutal.Numerics/Vector/double2/double2.numerics-floating.gen.cs new file mode 100644 index 0000000..54c5838 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.numerics-floating.gen.cs @@ -0,0 +1,441 @@ +// - edit Vector.numerics-floating.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IFloatingPointConstants +public partial struct double2 : IFloatingPointConstants +{ + /// + public static double2 E => new(double.E); + + /// + public static double2 Pi => new(double.Pi); + + /// + public static double2 Tau => new(double.Tau); +} + +// IExponentialFunctions +public partial struct double2 : IExponentialFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Exp(double2 value) + { + return new(double.Exp(value.X), double.Exp(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Exp2(double2 value) + { + return new double2(double.Exp2(value.X), double.Exp2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Exp10(double2 value) + { + return new double2(double.Exp10(value.X), double.Exp10(value.Y)); + } +} + +// ILogarithmicFunctions +public partial struct double2 : ILogarithmicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Log(double2 value) + { + return new(double.Log(value.X), double.Log(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Log(double2 value, double2 newBase) + { + return new double2(double.Log(value.X, newBase.X), double.Log(value.Y, newBase.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Log2(double2 value) + { + return new(double.Log2(value.X), double.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Log10(double2 value) + { + return new double2(double.Log10(value.X), double.Log10(value.Y)); + } +} + +// IPowerFunctions +public partial struct double2 : IPowerFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Pow(double2 value, double2 power) + { + return new double2(double.Pow(value.X, power.X), double.Pow(value.Y, power.Y)); + } +} + +// IRootFunctions +public partial struct double2 : IRootFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Cbrt(double2 value) + { + return new double2(double.Cbrt(value.X), double.Cbrt(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Hypot(double2 a, double2 b) + { + return new(double.Hypot(a.X, b.X), double.Hypot(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 RootN(double2 value, int n) + { + return new double2(double.RootN(value.X, n), double.RootN(value.Y, n)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Sqrt(double2 value) + { + return new(double.Sqrt(value.X), double.Sqrt(value.Y)); + } +} + +// ITrigonometricFunctions +public partial struct double2 : ITrigonometricFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Sin(double2 value) + { + return new(double.Sin(value.X), double.Sin(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Cos(double2 value) + { + return new(double.Cos(value.X), double.Cos(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (double2 Sin, double2 Cos) SinCos(double2 value) + { + var (sinX, cosX) = double.SinCos(value.X); + var (sinY, cosY) = double.SinCos(value.Y); + return (new(sinX, sinY), new(cosX, cosY)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Tan(double2 value) + { + return new double2(double.Tan(value.X), double.Tan(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Asin(double2 value) + { + return new double2(double.Asin(value.X), double.Asin(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Acos(double2 value) + { + return new double2(double.Acos(value.X), double.Acos(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Atan(double2 value) + { + return new double2(double.Atan(value.X), double.Atan(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 SinPi(double2 value) + { + return new double2(double.SinPi(value.X), double.SinPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 CosPi(double2 value) + { + return new double2(double.CosPi(value.X), double.CosPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 TanPi(double2 value) + { + return new double2(double.TanPi(value.X), double.TanPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 AsinPi(double2 value) + { + return new double2(double.AsinPi(value.X), double.AsinPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 AcosPi(double2 value) + { + return new double2(double.AcosPi(value.X), double.AcosPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 AtanPi(double2 value) + { + return new double2(double.AtanPi(value.X), double.AtanPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (double2 SinPi, double2 CosPi) SinCosPi(double2 value) + { + return (SinPi(value), CosPi(value)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 DegreesToRadians(double2 degrees) + { + return new(double.DegreesToRadians(degrees.X), double.DegreesToRadians(degrees.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 RadiansToDegrees(double2 radians) + { + return new(double.RadiansToDegrees(radians.X), double.RadiansToDegrees(radians.Y)); + } +} + +// IHyperbolicFunctions +public partial struct double2 : IHyperbolicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Sinh(double2 value) + { + return new double2(double.Sinh(value.X), double.Sinh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Cosh(double2 value) + { + return new double2(double.Cosh(value.X), double.Cosh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Tanh(double2 value) + { + return new double2(double.Tanh(value.X), double.Tanh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Asinh(double2 value) + { + return new double2(double.Asinh(value.X), double.Asinh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Acosh(double2 value) + { + return new double2(double.Acosh(value.X), double.Acosh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Atanh(double2 value) + { + return new double2(double.Atanh(value.X), double.Atanh(value.Y)); + } +} + +// IFloatingPoint +public partial struct double2 : IFloatingPoint +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Floor(double2 value) + { + return new(double.Floor(value.X), double.Floor(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Ceiling(double2 value) + { + return new(double.Ceiling(value.X), double.Ceiling(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Round(double2 value) + { + return new(double.Round(value.X), double.Round(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Truncate(double2 value) + { + return new(double.Truncate(value.X), double.Truncate(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Round(double2 value, int digits, MidpointRounding mode) + { + return new double2(double.Round(value.X, digits, mode), double.Round(value.Y, digits, mode)); + } + + // One exponent and significand PER LANE, so there is no single honest answer: explicit and throwing. + + int IFloatingPoint.GetExponentByteCount() => + throw new NotSupportedException($"{nameof(double2)} has one exponent per component."); + + int IFloatingPoint.GetExponentShortestBitLength() => + throw new NotSupportedException($"{nameof(double2)} has one exponent per component."); + + int IFloatingPoint.GetSignificandBitLength() => + throw new NotSupportedException($"{nameof(double2)} has one significand per component."); + + int IFloatingPoint.GetSignificandByteCount() => + throw new NotSupportedException($"{nameof(double2)} has one significand per component."); + + bool IFloatingPoint.TryWriteExponentBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double2)} has one exponent per component."); + + bool IFloatingPoint.TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double2)} has one exponent per component."); + + bool IFloatingPoint.TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double2)} has one significand per component."); + + bool IFloatingPoint.TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double2)} has one significand per component."); +} + +// IFloatingPointIeee754 +public partial struct double2 : IFloatingPointIeee754 +{ + /// Gets a vector whose components are NaN. + public static double2 NaN => new(double.NaN); + + /// + public static double2 Epsilon => new(double.Epsilon); + + /// + public static double2 NegativeZero => new(double.NegativeZero); + + /// + public static double2 PositiveInfinity => new(double.PositiveInfinity); + + /// + public static double2 NegativeInfinity => new(double.NegativeInfinity); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Atan2(double2 y, double2 x) + { + return new double2(double.Atan2(y.X, x.X), double.Atan2(y.Y, x.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Atan2Pi(double2 y, double2 x) + { + return new double2(double.Atan2Pi(y.X, x.X), double.Atan2Pi(y.Y, x.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 BitDecrement(double2 value) + { + return new double2(double.BitDecrement(value.X), double.BitDecrement(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 BitIncrement(double2 value) + { + return new double2(double.BitIncrement(value.X), double.BitIncrement(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 FusedMultiplyAdd(double2 a, double2 b, double2 addend) + { + return new(double.FusedMultiplyAdd(a.X, b.X, addend.X), double.FusedMultiplyAdd(a.Y, b.Y, addend.Y)); + } + + /// + /// Permitted but not required to fuse; use where the single rounding is required. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MultiplyAddEstimate(double2 a, double2 b, double2 addend) + { + return new(double.MultiplyAddEstimate(a.X, b.X, addend.X), double.MultiplyAddEstimate(a.Y, b.Y, addend.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Ieee754Remainder(double2 a, double2 b) + { + return new double2(double.Ieee754Remainder(a.X, b.X), double.Ieee754Remainder(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 ScaleB(double2 value, int n) + { + return new double2(double.ScaleB(value.X, n), double.ScaleB(value.Y, n)); + } + + // ILogB's int return cannot hold one exponent per lane - same shape as Sign + static int IFloatingPointIeee754.ILogB(double2 value) => + throw new NotSupportedException($"{nameof(double2)} has one exponent per component."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Lerp(double2 a, double2 b, double amount) + { + return new(double.Lerp(a.X, b.X, amount), double.Lerp(a.Y, b.Y, amount)); + } + + /// + [Obsolete("Renamed to Sqrt (the generic-math name; SquareRoot was the System.Numerics vector spelling).")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 SquareRoot(double2 value) + { + return Sqrt(value); + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.numerics.gen.cs b/Brutal.Numerics/Vector/double2/double2.numerics.gen.cs new file mode 100644 index 0000000..49dd5d6 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.numerics.gen.cs @@ -0,0 +1,545 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct double2 : INumberBase +{ + /// + public static double2 Zero => new(0); + + /// + public static double2 One => new(1); + + static double2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static double2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Abs(double2 value) + { + return new(double.Abs(value.X), double.Abs(value.Y)); + } + + static bool INumberBase.IsCanonical(double2 value) => true; + + static bool INumberBase.IsComplexNumber(double2 value) => false; + + static bool INumberBase.IsImaginaryNumber(double2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(double2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(double2 value) + { + return double.IsEvenInteger(value.X) && double.IsEvenInteger(value.Y); + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(double2 value) + { + return double.IsOddInteger(value.X) && double.IsOddInteger(value.Y); + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(double2 value) + { + return double.IsNegative(value.X) && double.IsNegative(value.Y); + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(double2 value) + { + return double.IsPositive(value.X) && double.IsPositive(value.Y); + } + + /// Determines if every component of a value is finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsFinite(double2 value) + { + return double.IsFinite(value.X) && double.IsFinite(value.Y); + } + + /// Determines if every component of a value is infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInfinity(double2 value) + { + return double.IsInfinity(value.X) && double.IsInfinity(value.Y); + } + + /// Determines if every component of a value is negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegativeInfinity(double2 value) + { + return double.IsNegativeInfinity(value.X) && double.IsNegativeInfinity(value.Y); + } + + /// Determines if every component of a value is positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositiveInfinity(double2 value) + { + return double.IsPositiveInfinity(value.X) && double.IsPositiveInfinity(value.Y); + } + + /// Determines if every component of a value is an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInteger(double2 value) + { + return double.IsInteger(value.X) && double.IsInteger(value.Y); + } + + /// Determines if every component of a value is a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsRealNumber(double2 value) + { + return double.IsRealNumber(value.X) && double.IsRealNumber(value.Y); + } + + /// Determines if any component of a value is NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNaN(double2 value) + { + return double.IsNaN(value.X) || double.IsNaN(value.Y); + } + + /// Determines if every component of a value is normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNormal(double2 value) + { + return double.IsNormal(value.X) && double.IsNormal(value.Y); + } + + /// Determines if every component of a value is subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsSubnormal(double2 value) + { + return double.IsSubnormal(value.X) && double.IsSubnormal(value.Y); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MaxMagnitude(double2 a, double2 b) + { + return new(double.MaxMagnitude(a.X, b.X), double.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is greater, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MaxMagnitudeNumber(double2 a, double2 b) + { + return new(double.MaxMagnitudeNumber(a.X, b.X), double.MaxMagnitudeNumber(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MinMagnitude(double2 a, double2 b) + { + return new(double.MinMagnitude(a.X, b.X), double.MinMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MinMagnitudeNumber(double2 a, double2 b) + { + return new(double.MinMagnitudeNumber(a.X, b.X), double.MinMagnitudeNumber(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Add(double2 a, double2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Divide(double2 a, double2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Multiply(double2 a, double2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Negate(double2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Subtract(double2 a, double2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator +(double2 a, double2 b) + { + return new(a.X + b.X, a.Y + b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator -(double2 a, double2 b) + { + return new(a.X - b.X, a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator *(double2 a, double2 b) + { + return new(a.X * b.X, a.Y * b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator /(double2 a, double2 b) + { + return new(a.X / b.X, a.Y / b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator -(double2 a) + { + return new(-a.X, -a.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator +(double2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static double2 IIncrementOperators.operator ++(double2 value) => value + One; + + static double2 IDecrementOperators.operator --(double2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out double2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(double2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out double2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(double2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out double2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(double2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct double2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Divide(double2 a, double b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Multiply(double2 a, double b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Multiply(double a, double2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator *(double2 a, double b) + { + return new(a.X * b, a.Y * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator /(double2 a, double b) + { + return new(a.X / b, a.Y / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator *(double a, double2 b) + { + return new(a * b.X, a * b.Y); + } +} + +// INumber +public partial struct double2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Clamp(double2 value, double2 min, double2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Max(double2 a, double2 b) + { + return new(double.Max(a.X, b.X), double.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Min(double2 a, double2 b) + { + return new(double.Min(a.X, b.X), double.Min(a.Y, b.Y)); + } + + /// Selects, componentwise, the larger value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MaxNumber(double2 a, double2 b) + { + return new(double.MaxNumber(a.X, b.X), double.MaxNumber(a.Y, b.Y)); + } + + /// Selects, componentwise, the smaller value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 MinNumber(double2 a, double2 b) + { + return new(double.MinNumber(a.X, b.X), double.MinNumber(a.Y, b.Y)); + } + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 CopySign(double2 value, double2 sign) + { + return new(double.CopySign(value.X, sign.X), double.CopySign(value.Y, sign.Y)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static double2 INumber.ClampNative(double2 value, double2 min, double2 max) => Clamp(value, min, max); + + static double2 INumber.MaxNative(double2 a, double2 b) => Max(a, b); + + static double2 INumber.MinNative(double2 a, double2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(double2 value) => + throw new NotSupportedException($"{nameof(double2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator %(double2 a, double2 b) + { + return new double2(a.X % b.X, a.Y % b.Y); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(double2)} has no total order."); + + int IComparable.CompareTo(double2 other) => + throw new NotSupportedException($"{nameof(double2)} has no total order."); + + static bool IComparisonOperators.operator <(double2 a, double2 b) => + throw new NotSupportedException($"{nameof(double2)} has no total order."); + + static bool IComparisonOperators.operator <=(double2 a, double2 b) => + throw new NotSupportedException($"{nameof(double2)} has no total order."); + + static bool IComparisonOperators.operator >(double2 a, double2 b) => + throw new NotSupportedException($"{nameof(double2)} has no total order."); + + static bool IComparisonOperators.operator >=(double2 a, double2 b) => + throw new NotSupportedException($"{nameof(double2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct double2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(double2 a, double2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(double2 a, double2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(double2 a, double2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(double2 a, double2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(double2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(double2 value) + { + return new bool2(double.IsEvenInteger(value.X), double.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(double2 value) + { + return new bool2(double.IsOddInteger(value.X), double.IsOddInteger(value.Y)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegative(double2 value) + { + return new bool2(double.IsNegative(value.X), double.IsNegative(value.Y)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositive(double2 value) + { + return new bool2(double.IsPositive(value.X), double.IsPositive(value.Y)); + } + + /// Determines which components of a value are finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsFinite(double2 value) + { + return new bool2(double.IsFinite(value.X), double.IsFinite(value.Y)); + } + + /// Determines which components of a value are infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsInfinity(double2 value) + { + return new bool2(double.IsInfinity(value.X), double.IsInfinity(value.Y)); + } + + /// Determines which components of a value are negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegativeInfinity(double2 value) + { + return new bool2(double.IsNegativeInfinity(value.X), double.IsNegativeInfinity(value.Y)); + } + + /// Determines which components of a value are positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositiveInfinity(double2 value) + { + return new bool2(double.IsPositiveInfinity(value.X), double.IsPositiveInfinity(value.Y)); + } + + /// Determines which components of a value are an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsInteger(double2 value) + { + return new bool2(double.IsInteger(value.X), double.IsInteger(value.Y)); + } + + /// Determines which components of a value are a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsRealNumber(double2 value) + { + return new bool2(double.IsRealNumber(value.X), double.IsRealNumber(value.Y)); + } + + /// Determines which components of a value are NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNaN(double2 value) + { + return new bool2(double.IsNaN(value.X), double.IsNaN(value.Y)); + } + + /// Determines which components of a value are normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNormal(double2 value) + { + return new bool2(double.IsNormal(value.X), double.IsNormal(value.Y)); + } + + /// Determines which components of a value are subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsSubnormal(double2 value) + { + return new bool2(double.IsSubnormal(value.X), double.IsSubnormal(value.Y)); + } +} + +// ISignedNumber +public partial struct double2 : ISignedNumber +{ + /// + public static double2 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/double2/double2.pack.gen.cs b/Brutal.Numerics/Vector/double2/double2.pack.gen.cs new file mode 100644 index 0000000..996a4d3 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 +{ + public static double2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double2 result, elementConverter); + return result; + } + + public static double2 Unpack(in sbyte2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.SByte.ToDouble(mode)); + } + + public static double2 Unpack(in byte2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Byte.ToDouble(mode)); + } + + public static double2 Unpack(in short2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Short.ToDouble(mode)); + } + + public static double2 Unpack(in ushort2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UShort.ToDouble(mode)); + } + + public static double2 Unpack(in int2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Int.ToDouble(mode)); + } + + public static double2 Unpack(in uint2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UInt.ToDouble(mode)); + } + + public static double2 Unpack(in float2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Float.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UInt.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Float.ToDouble(mode)); + } +} diff --git a/Brutal.Numerics/Vector/double2/double2.swizzle.gen.cs b/Brutal.Numerics/Vector/double2/double2.swizzle.gen.cs new file mode 100644 index 0000000..f992f48 --- /dev/null +++ b/Brutal.Numerics/Vector/double2/double2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public double2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public double2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct double2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public double R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public double G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public double2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public double2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.copy.gen.cs b/Brutal.Numerics/Vector/double3/double3.copy.gen.cs new file mode 100644 index 0000000..433d2ff --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.equality.gen.cs b/Brutal.Numerics/Vector/double3/double3.equality.gen.cs new file mode 100644 index 0000000..783cab6 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(double3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is double3 other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(double3 a, double3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(double3 a, double3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.format.gen.cs b/Brutal.Numerics/Vector/double3/double3.format.gen.cs new file mode 100644 index 0000000..204fd27 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static double3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static double3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static double3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static double3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid double3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out double3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out double3 result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out double3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a double3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out double3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.gen.cs b/Brutal.Numerics/Vector/double3/double3.gen.cs new file mode 100644 index 0000000..ce57543 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with double components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct double3 : IVector3 + , IFloatingVector + , IFloatingVector3 +{ + /// + public static int ComponentSize => sizeof(double); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public double X; + + /// + [XmlAttribute] + public double Y; + + /// + [XmlAttribute] + public double Z; + + double IVector3.X { readonly get => X; set => X = value; } + + double IVector3.Y { readonly get => Y; set => Y = value; } + + double IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double x, double y, double z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double2 xy, double z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static double3 UnitX => new(1, 0, 0); + + /// + public static double3 UnitY => new(0, 1, 0); + + /// + public static double3 UnitZ => new(0, 0, 1); + + /// + public double this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out double x, out double y, out double z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.math-metric.gen.cs b/Brutal.Numerics/Vector/double3/double3.math-metric.gen.cs new file mode 100644 index 0000000..d6c31f9 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.math-metric.gen.cs @@ -0,0 +1,62 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return double.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(double3 a, double3 b) + { + return double.Sqrt(DistanceSquared(a, b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double DistanceSquared(double3 a, double3 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Dot(double3 a, double3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } + + /// + /// Thrown when the input vector is a zero vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Normalize(double3 value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / double.Sqrt(lengthSquared); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 NormalizeOrZero(double3 value) + { + var length = double.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.math.gen.cs b/Brutal.Numerics/Vector/double3/double3.math.gen.cs new file mode 100644 index 0000000..9b36ab9 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.math.gen.cs @@ -0,0 +1,75 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Cross(double3 a, double3 b) + { + return new( + a.Y * b.Z - a.Z * b.Y, + a.Z * b.X - a.X * b.Z, + a.X * b.Y - a.Y * b.X); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 Multiply(double3 vector, double3x2 matrix) + { + double2 result = default; + + result.X = Dot(vector, new double3(matrix.M11, matrix.M21, matrix.M31)); + result.Y = Dot(vector, new double3(matrix.M12, matrix.M22, matrix.M32)); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator *(double3 vector, double3x2 matrix) + { + return Multiply(vector, matrix); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Reflect(double3 vector, double3 normal) + { + return vector - 2 * Dot(vector, normal) * normal; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Transform(double3 position, double4x4 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.Z * position.Z; + result += matrix.W; + + return result.XYZ; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Transform(double3 value, doubleQuat rotation) + { + return double4.Transform(value, rotation).XYZ; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 TransformNormal(double3 normal, double4x4 matrix) + { + var result = matrix.X * normal.X; + + result += matrix.Y * normal.Y; + result += matrix.Z * normal.Z; + + return result.XYZ; + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/double3/double3.numerics-binary.gen.cs new file mode 100644 index 0000000..2839876 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.numerics-binary.gen.cs @@ -0,0 +1,54 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct double3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(double3 value) + { + return double.IsPow2(value.X) && double.IsPow2(value.Y) && double.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double3 IBitwiseOperators.operator &(double3 a, double3 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) & Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double3 IBitwiseOperators.operator |(double3 a, double3 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) | Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double3 IBitwiseOperators.operator ^(double3 a, double3 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) ^ Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double3 IBitwiseOperators.operator ~(double3 value) + { + return Unsafe.BitCast(~Unsafe.BitCast(value)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct double3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(double3 value) + { + return new bool3(double.IsPow2(value.X), double.IsPow2(value.Y), double.IsPow2(value.Z)); + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.numerics-floating.gen.cs b/Brutal.Numerics/Vector/double3/double3.numerics-floating.gen.cs new file mode 100644 index 0000000..a1c22a2 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.numerics-floating.gen.cs @@ -0,0 +1,442 @@ +// - edit Vector.numerics-floating.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IFloatingPointConstants +public partial struct double3 : IFloatingPointConstants +{ + /// + public static double3 E => new(double.E); + + /// + public static double3 Pi => new(double.Pi); + + /// + public static double3 Tau => new(double.Tau); +} + +// IExponentialFunctions +public partial struct double3 : IExponentialFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Exp(double3 value) + { + return new(double.Exp(value.X), double.Exp(value.Y), double.Exp(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Exp2(double3 value) + { + return new double3(double.Exp2(value.X), double.Exp2(value.Y), double.Exp2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Exp10(double3 value) + { + return new double3(double.Exp10(value.X), double.Exp10(value.Y), double.Exp10(value.Z)); + } +} + +// ILogarithmicFunctions +public partial struct double3 : ILogarithmicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Log(double3 value) + { + return new(double.Log(value.X), double.Log(value.Y), double.Log(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Log(double3 value, double3 newBase) + { + return new double3(double.Log(value.X, newBase.X), double.Log(value.Y, newBase.Y), double.Log(value.Z, newBase.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Log2(double3 value) + { + return new(double.Log2(value.X), double.Log2(value.Y), double.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Log10(double3 value) + { + return new double3(double.Log10(value.X), double.Log10(value.Y), double.Log10(value.Z)); + } +} + +// IPowerFunctions +public partial struct double3 : IPowerFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Pow(double3 value, double3 power) + { + return new double3(double.Pow(value.X, power.X), double.Pow(value.Y, power.Y), double.Pow(value.Z, power.Z)); + } +} + +// IRootFunctions +public partial struct double3 : IRootFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Cbrt(double3 value) + { + return new double3(double.Cbrt(value.X), double.Cbrt(value.Y), double.Cbrt(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Hypot(double3 a, double3 b) + { + return new(double.Hypot(a.X, b.X), double.Hypot(a.Y, b.Y), double.Hypot(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 RootN(double3 value, int n) + { + return new double3(double.RootN(value.X, n), double.RootN(value.Y, n), double.RootN(value.Z, n)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Sqrt(double3 value) + { + return new(double.Sqrt(value.X), double.Sqrt(value.Y), double.Sqrt(value.Z)); + } +} + +// ITrigonometricFunctions +public partial struct double3 : ITrigonometricFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Sin(double3 value) + { + return new(double.Sin(value.X), double.Sin(value.Y), double.Sin(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Cos(double3 value) + { + return new(double.Cos(value.X), double.Cos(value.Y), double.Cos(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (double3 Sin, double3 Cos) SinCos(double3 value) + { + var (sinX, cosX) = double.SinCos(value.X); + var (sinY, cosY) = double.SinCos(value.Y); + var (sinZ, cosZ) = double.SinCos(value.Z); + return (new(sinX, sinY, sinZ), new(cosX, cosY, cosZ)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Tan(double3 value) + { + return new double3(double.Tan(value.X), double.Tan(value.Y), double.Tan(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Asin(double3 value) + { + return new double3(double.Asin(value.X), double.Asin(value.Y), double.Asin(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Acos(double3 value) + { + return new double3(double.Acos(value.X), double.Acos(value.Y), double.Acos(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Atan(double3 value) + { + return new double3(double.Atan(value.X), double.Atan(value.Y), double.Atan(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 SinPi(double3 value) + { + return new double3(double.SinPi(value.X), double.SinPi(value.Y), double.SinPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 CosPi(double3 value) + { + return new double3(double.CosPi(value.X), double.CosPi(value.Y), double.CosPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 TanPi(double3 value) + { + return new double3(double.TanPi(value.X), double.TanPi(value.Y), double.TanPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 AsinPi(double3 value) + { + return new double3(double.AsinPi(value.X), double.AsinPi(value.Y), double.AsinPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 AcosPi(double3 value) + { + return new double3(double.AcosPi(value.X), double.AcosPi(value.Y), double.AcosPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 AtanPi(double3 value) + { + return new double3(double.AtanPi(value.X), double.AtanPi(value.Y), double.AtanPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (double3 SinPi, double3 CosPi) SinCosPi(double3 value) + { + return (SinPi(value), CosPi(value)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 DegreesToRadians(double3 degrees) + { + return new(double.DegreesToRadians(degrees.X), double.DegreesToRadians(degrees.Y), double.DegreesToRadians(degrees.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 RadiansToDegrees(double3 radians) + { + return new(double.RadiansToDegrees(radians.X), double.RadiansToDegrees(radians.Y), double.RadiansToDegrees(radians.Z)); + } +} + +// IHyperbolicFunctions +public partial struct double3 : IHyperbolicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Sinh(double3 value) + { + return new double3(double.Sinh(value.X), double.Sinh(value.Y), double.Sinh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Cosh(double3 value) + { + return new double3(double.Cosh(value.X), double.Cosh(value.Y), double.Cosh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Tanh(double3 value) + { + return new double3(double.Tanh(value.X), double.Tanh(value.Y), double.Tanh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Asinh(double3 value) + { + return new double3(double.Asinh(value.X), double.Asinh(value.Y), double.Asinh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Acosh(double3 value) + { + return new double3(double.Acosh(value.X), double.Acosh(value.Y), double.Acosh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Atanh(double3 value) + { + return new double3(double.Atanh(value.X), double.Atanh(value.Y), double.Atanh(value.Z)); + } +} + +// IFloatingPoint +public partial struct double3 : IFloatingPoint +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Floor(double3 value) + { + return new(double.Floor(value.X), double.Floor(value.Y), double.Floor(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Ceiling(double3 value) + { + return new(double.Ceiling(value.X), double.Ceiling(value.Y), double.Ceiling(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Round(double3 value) + { + return new(double.Round(value.X), double.Round(value.Y), double.Round(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Truncate(double3 value) + { + return new(double.Truncate(value.X), double.Truncate(value.Y), double.Truncate(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Round(double3 value, int digits, MidpointRounding mode) + { + return new double3(double.Round(value.X, digits, mode), double.Round(value.Y, digits, mode), double.Round(value.Z, digits, mode)); + } + + // One exponent and significand PER LANE, so there is no single honest answer: explicit and throwing. + + int IFloatingPoint.GetExponentByteCount() => + throw new NotSupportedException($"{nameof(double3)} has one exponent per component."); + + int IFloatingPoint.GetExponentShortestBitLength() => + throw new NotSupportedException($"{nameof(double3)} has one exponent per component."); + + int IFloatingPoint.GetSignificandBitLength() => + throw new NotSupportedException($"{nameof(double3)} has one significand per component."); + + int IFloatingPoint.GetSignificandByteCount() => + throw new NotSupportedException($"{nameof(double3)} has one significand per component."); + + bool IFloatingPoint.TryWriteExponentBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double3)} has one exponent per component."); + + bool IFloatingPoint.TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double3)} has one exponent per component."); + + bool IFloatingPoint.TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double3)} has one significand per component."); + + bool IFloatingPoint.TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double3)} has one significand per component."); +} + +// IFloatingPointIeee754 +public partial struct double3 : IFloatingPointIeee754 +{ + /// Gets a vector whose components are NaN. + public static double3 NaN => new(double.NaN); + + /// + public static double3 Epsilon => new(double.Epsilon); + + /// + public static double3 NegativeZero => new(double.NegativeZero); + + /// + public static double3 PositiveInfinity => new(double.PositiveInfinity); + + /// + public static double3 NegativeInfinity => new(double.NegativeInfinity); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Atan2(double3 y, double3 x) + { + return new double3(double.Atan2(y.X, x.X), double.Atan2(y.Y, x.Y), double.Atan2(y.Z, x.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Atan2Pi(double3 y, double3 x) + { + return new double3(double.Atan2Pi(y.X, x.X), double.Atan2Pi(y.Y, x.Y), double.Atan2Pi(y.Z, x.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 BitDecrement(double3 value) + { + return new double3(double.BitDecrement(value.X), double.BitDecrement(value.Y), double.BitDecrement(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 BitIncrement(double3 value) + { + return new double3(double.BitIncrement(value.X), double.BitIncrement(value.Y), double.BitIncrement(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 FusedMultiplyAdd(double3 a, double3 b, double3 addend) + { + return new(double.FusedMultiplyAdd(a.X, b.X, addend.X), double.FusedMultiplyAdd(a.Y, b.Y, addend.Y), double.FusedMultiplyAdd(a.Z, b.Z, addend.Z)); + } + + /// + /// Permitted but not required to fuse; use where the single rounding is required. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MultiplyAddEstimate(double3 a, double3 b, double3 addend) + { + return new(double.MultiplyAddEstimate(a.X, b.X, addend.X), double.MultiplyAddEstimate(a.Y, b.Y, addend.Y), double.MultiplyAddEstimate(a.Z, b.Z, addend.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Ieee754Remainder(double3 a, double3 b) + { + return new double3(double.Ieee754Remainder(a.X, b.X), double.Ieee754Remainder(a.Y, b.Y), double.Ieee754Remainder(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 ScaleB(double3 value, int n) + { + return new double3(double.ScaleB(value.X, n), double.ScaleB(value.Y, n), double.ScaleB(value.Z, n)); + } + + // ILogB's int return cannot hold one exponent per lane - same shape as Sign + static int IFloatingPointIeee754.ILogB(double3 value) => + throw new NotSupportedException($"{nameof(double3)} has one exponent per component."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Lerp(double3 a, double3 b, double amount) + { + return new(double.Lerp(a.X, b.X, amount), double.Lerp(a.Y, b.Y, amount), double.Lerp(a.Z, b.Z, amount)); + } + + /// + [Obsolete("Renamed to Sqrt (the generic-math name; SquareRoot was the System.Numerics vector spelling).")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 SquareRoot(double3 value) + { + return Sqrt(value); + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.numerics.gen.cs b/Brutal.Numerics/Vector/double3/double3.numerics.gen.cs new file mode 100644 index 0000000..5be2b45 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.numerics.gen.cs @@ -0,0 +1,545 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct double3 : INumberBase +{ + /// + public static double3 Zero => new(0); + + /// + public static double3 One => new(1); + + static double3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static double3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Abs(double3 value) + { + return new(double.Abs(value.X), double.Abs(value.Y), double.Abs(value.Z)); + } + + static bool INumberBase.IsCanonical(double3 value) => true; + + static bool INumberBase.IsComplexNumber(double3 value) => false; + + static bool INumberBase.IsImaginaryNumber(double3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(double3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(double3 value) + { + return double.IsEvenInteger(value.X) && double.IsEvenInteger(value.Y) && double.IsEvenInteger(value.Z); + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(double3 value) + { + return double.IsOddInteger(value.X) && double.IsOddInteger(value.Y) && double.IsOddInteger(value.Z); + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(double3 value) + { + return double.IsNegative(value.X) && double.IsNegative(value.Y) && double.IsNegative(value.Z); + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(double3 value) + { + return double.IsPositive(value.X) && double.IsPositive(value.Y) && double.IsPositive(value.Z); + } + + /// Determines if every component of a value is finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsFinite(double3 value) + { + return double.IsFinite(value.X) && double.IsFinite(value.Y) && double.IsFinite(value.Z); + } + + /// Determines if every component of a value is infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInfinity(double3 value) + { + return double.IsInfinity(value.X) && double.IsInfinity(value.Y) && double.IsInfinity(value.Z); + } + + /// Determines if every component of a value is negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegativeInfinity(double3 value) + { + return double.IsNegativeInfinity(value.X) && double.IsNegativeInfinity(value.Y) && double.IsNegativeInfinity(value.Z); + } + + /// Determines if every component of a value is positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositiveInfinity(double3 value) + { + return double.IsPositiveInfinity(value.X) && double.IsPositiveInfinity(value.Y) && double.IsPositiveInfinity(value.Z); + } + + /// Determines if every component of a value is an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInteger(double3 value) + { + return double.IsInteger(value.X) && double.IsInteger(value.Y) && double.IsInteger(value.Z); + } + + /// Determines if every component of a value is a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsRealNumber(double3 value) + { + return double.IsRealNumber(value.X) && double.IsRealNumber(value.Y) && double.IsRealNumber(value.Z); + } + + /// Determines if any component of a value is NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNaN(double3 value) + { + return double.IsNaN(value.X) || double.IsNaN(value.Y) || double.IsNaN(value.Z); + } + + /// Determines if every component of a value is normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNormal(double3 value) + { + return double.IsNormal(value.X) && double.IsNormal(value.Y) && double.IsNormal(value.Z); + } + + /// Determines if every component of a value is subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsSubnormal(double3 value) + { + return double.IsSubnormal(value.X) && double.IsSubnormal(value.Y) && double.IsSubnormal(value.Z); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MaxMagnitude(double3 a, double3 b) + { + return new(double.MaxMagnitude(a.X, b.X), double.MaxMagnitude(a.Y, b.Y), double.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is greater, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MaxMagnitudeNumber(double3 a, double3 b) + { + return new(double.MaxMagnitudeNumber(a.X, b.X), double.MaxMagnitudeNumber(a.Y, b.Y), double.MaxMagnitudeNumber(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MinMagnitude(double3 a, double3 b) + { + return new(double.MinMagnitude(a.X, b.X), double.MinMagnitude(a.Y, b.Y), double.MinMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MinMagnitudeNumber(double3 a, double3 b) + { + return new(double.MinMagnitudeNumber(a.X, b.X), double.MinMagnitudeNumber(a.Y, b.Y), double.MinMagnitudeNumber(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Add(double3 a, double3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Divide(double3 a, double3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Multiply(double3 a, double3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Negate(double3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Subtract(double3 a, double3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator +(double3 a, double3 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator -(double3 a, double3 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator *(double3 a, double3 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator /(double3 a, double3 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator -(double3 a) + { + return new(-a.X, -a.Y, -a.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator +(double3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static double3 IIncrementOperators.operator ++(double3 value) => value + One; + + static double3 IDecrementOperators.operator --(double3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out double3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(double3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out double3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(double3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out double3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(double3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct double3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Divide(double3 a, double b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Multiply(double3 a, double b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Multiply(double a, double3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator *(double3 a, double b) + { + return new(a.X * b, a.Y * b, a.Z * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator /(double3 a, double b) + { + return new(a.X / b, a.Y / b, a.Z / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator *(double a, double3 b) + { + return new(a * b.X, a * b.Y, a * b.Z); + } +} + +// INumber +public partial struct double3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Clamp(double3 value, double3 min, double3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Max(double3 a, double3 b) + { + return new(double.Max(a.X, b.X), double.Max(a.Y, b.Y), double.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 Min(double3 a, double3 b) + { + return new(double.Min(a.X, b.X), double.Min(a.Y, b.Y), double.Min(a.Z, b.Z)); + } + + /// Selects, componentwise, the larger value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MaxNumber(double3 a, double3 b) + { + return new(double.MaxNumber(a.X, b.X), double.MaxNumber(a.Y, b.Y), double.MaxNumber(a.Z, b.Z)); + } + + /// Selects, componentwise, the smaller value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 MinNumber(double3 a, double3 b) + { + return new(double.MinNumber(a.X, b.X), double.MinNumber(a.Y, b.Y), double.MinNumber(a.Z, b.Z)); + } + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 CopySign(double3 value, double3 sign) + { + return new(double.CopySign(value.X, sign.X), double.CopySign(value.Y, sign.Y), double.CopySign(value.Z, sign.Z)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static double3 INumber.ClampNative(double3 value, double3 min, double3 max) => Clamp(value, min, max); + + static double3 INumber.MaxNative(double3 a, double3 b) => Max(a, b); + + static double3 INumber.MinNative(double3 a, double3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(double3 value) => + throw new NotSupportedException($"{nameof(double3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator %(double3 a, double3 b) + { + return new double3(a.X % b.X, a.Y % b.Y, a.Z % b.Z); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(double3)} has no total order."); + + int IComparable.CompareTo(double3 other) => + throw new NotSupportedException($"{nameof(double3)} has no total order."); + + static bool IComparisonOperators.operator <(double3 a, double3 b) => + throw new NotSupportedException($"{nameof(double3)} has no total order."); + + static bool IComparisonOperators.operator <=(double3 a, double3 b) => + throw new NotSupportedException($"{nameof(double3)} has no total order."); + + static bool IComparisonOperators.operator >(double3 a, double3 b) => + throw new NotSupportedException($"{nameof(double3)} has no total order."); + + static bool IComparisonOperators.operator >=(double3 a, double3 b) => + throw new NotSupportedException($"{nameof(double3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct double3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(double3 a, double3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(double3 a, double3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(double3 a, double3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(double3 a, double3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(double3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(double3 value) + { + return new bool3(double.IsEvenInteger(value.X), double.IsEvenInteger(value.Y), double.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(double3 value) + { + return new bool3(double.IsOddInteger(value.X), double.IsOddInteger(value.Y), double.IsOddInteger(value.Z)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegative(double3 value) + { + return new bool3(double.IsNegative(value.X), double.IsNegative(value.Y), double.IsNegative(value.Z)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositive(double3 value) + { + return new bool3(double.IsPositive(value.X), double.IsPositive(value.Y), double.IsPositive(value.Z)); + } + + /// Determines which components of a value are finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsFinite(double3 value) + { + return new bool3(double.IsFinite(value.X), double.IsFinite(value.Y), double.IsFinite(value.Z)); + } + + /// Determines which components of a value are infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsInfinity(double3 value) + { + return new bool3(double.IsInfinity(value.X), double.IsInfinity(value.Y), double.IsInfinity(value.Z)); + } + + /// Determines which components of a value are negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegativeInfinity(double3 value) + { + return new bool3(double.IsNegativeInfinity(value.X), double.IsNegativeInfinity(value.Y), double.IsNegativeInfinity(value.Z)); + } + + /// Determines which components of a value are positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositiveInfinity(double3 value) + { + return new bool3(double.IsPositiveInfinity(value.X), double.IsPositiveInfinity(value.Y), double.IsPositiveInfinity(value.Z)); + } + + /// Determines which components of a value are an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsInteger(double3 value) + { + return new bool3(double.IsInteger(value.X), double.IsInteger(value.Y), double.IsInteger(value.Z)); + } + + /// Determines which components of a value are a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsRealNumber(double3 value) + { + return new bool3(double.IsRealNumber(value.X), double.IsRealNumber(value.Y), double.IsRealNumber(value.Z)); + } + + /// Determines which components of a value are NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNaN(double3 value) + { + return new bool3(double.IsNaN(value.X), double.IsNaN(value.Y), double.IsNaN(value.Z)); + } + + /// Determines which components of a value are normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNormal(double3 value) + { + return new bool3(double.IsNormal(value.X), double.IsNormal(value.Y), double.IsNormal(value.Z)); + } + + /// Determines which components of a value are subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsSubnormal(double3 value) + { + return new bool3(double.IsSubnormal(value.X), double.IsSubnormal(value.Y), double.IsSubnormal(value.Z)); + } +} + +// ISignedNumber +public partial struct double3 : ISignedNumber +{ + /// + public static double3 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/double3/double3.pack.gen.cs b/Brutal.Numerics/Vector/double3/double3.pack.gen.cs new file mode 100644 index 0000000..6e57c89 --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 +{ + public static double3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double3 result, elementConverter); + return result; + } + + public static double3 Unpack(in sbyte3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.SByte.ToDouble(mode)); + } + + public static double3 Unpack(in byte3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Byte.ToDouble(mode)); + } + + public static double3 Unpack(in short3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Short.ToDouble(mode)); + } + + public static double3 Unpack(in ushort3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UShort.ToDouble(mode)); + } + + public static double3 Unpack(in int3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Int.ToDouble(mode)); + } + + public static double3 Unpack(in uint3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UInt.ToDouble(mode)); + } + + public static double3 Unpack(in float3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Float.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UInt.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Float.ToDouble(mode)); + } +} diff --git a/Brutal.Numerics/Vector/double3/double3.swizzle.gen.cs b/Brutal.Numerics/Vector/double3/double3.swizzle.gen.cs new file mode 100644 index 0000000..d2a248f --- /dev/null +++ b/Brutal.Numerics/Vector/double3/double3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public double2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public double2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public double2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public double2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public double2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public double2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public double3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public double3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public double3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public double3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public double3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public double3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct double3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public double R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public double G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public double B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public double2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public double2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public double2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public double2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public double2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public double2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public double3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public double3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public double3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public double3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public double3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public double3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.copy.gen.cs b/Brutal.Numerics/Vector/double4/double4.copy.gen.cs new file mode 100644 index 0000000..f8681c4 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.equality.gen.cs b/Brutal.Numerics/Vector/double4/double4.equality.gen.cs new file mode 100644 index 0000000..8d76f49 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(double4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is double4 other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(double4 a, double4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(double4 a, double4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.format.gen.cs b/Brutal.Numerics/Vector/double4/double4.format.gen.cs new file mode 100644 index 0000000..871dd5a --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static double4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static double4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static double4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static double4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid double4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out double4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out double4 result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out double4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a double4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out double4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.gen.cs b/Brutal.Numerics/Vector/double4/double4.gen.cs new file mode 100644 index 0000000..3fcddc1 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.gen.cs @@ -0,0 +1,148 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with double components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct double4 : IVector4 + , IFloatingVector + , IFloatingVector4 +{ + /// + public static int ComponentSize => sizeof(double); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public double X; + + /// + [XmlAttribute] + public double Y; + + /// + [XmlAttribute] + public double Z; + + /// + [XmlAttribute] + public double W; + + double IVector4.X { readonly get => X; set => X = value; } + + double IVector4.Y { readonly get => Y; set => Y = value; } + + double IVector4.Z { readonly get => Z; set => Z = value; } + + double IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double x, double y, double z, double w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double3 xyz, double w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double2 xy, double2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double2 xy, double z, double w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static double4 UnitX => new(1, 0, 0, 0); + + /// + public static double4 UnitY => new(0, 1, 0, 0); + + /// + public static double4 UnitZ => new(0, 0, 1, 0); + + /// + public static double4 UnitW => new(0, 0, 0, 1); + + /// + public double this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out double x, out double y, out double z, out double w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.math-metric.gen.cs b/Brutal.Numerics/Vector/double4/double4.math-metric.gen.cs new file mode 100644 index 0000000..5024a28 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.math-metric.gen.cs @@ -0,0 +1,62 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return double.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(double4 a, double4 b) + { + return double.Sqrt(DistanceSquared(a, b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double DistanceSquared(double4 a, double4 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Dot(double4 a, double4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } + + /// + /// Thrown when the input vector is a zero vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Normalize(double4 value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / double.Sqrt(lengthSquared); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 NormalizeOrZero(double4 value) + { + var length = double.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.math.gen.cs b/Brutal.Numerics/Vector/double4/double4.math.gen.cs new file mode 100644 index 0000000..ef7bf5c --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.math.gen.cs @@ -0,0 +1,97 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Multiply(double4 vector, double4x4 matrix) + { + var result = matrix.X * vector.X; + + result += matrix.Y * vector.Y; + result += matrix.Z * vector.Z; + result += matrix.W * vector.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator *(double4 vector, double4x4 matrix) + { + return Multiply(vector, matrix); + } + + /// Reflects a vector off the hyperplane with the given unit normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Reflect(double4 vector, double4 normal) + { + return vector - 2 * Dot(vector, normal) * normal; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Transform(double2 position, double4x4 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Transform(double2 value, doubleQuat rotation) + { + // widen in a register: x, y, 0, 1 + var wide = Vector256.IsHardwareAccelerated + ? Unsafe.BitCast, double4>(Vector256.Create(value.X, value.Y, 0.0, 1.0)) + : new double4(value, 0, 1); + return Transform(wide, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Transform(double3 position, double4x4 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.Z * position.Z; + result += matrix.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Transform(double3 value, doubleQuat rotation) + { + // widen in a register: x, y, z, 1 + var wide = Vector256.IsHardwareAccelerated + ? Unsafe.BitCast, double4>(Vector256.Create(value.X, value.Y, value.Z, 1.0)) + : new double4(value, 1); + return Transform(wide, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Transform(double4 vector, double4x4 matrix) + { + return Multiply(vector, matrix); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Transform(double4 value, doubleQuat rotation) + { + var conjugate = doubleQuat.Conjugate(rotation); + var temp = doubleQuat.Concatenate(conjugate, Unsafe.BitCast(value)); + return Unsafe.BitCast(doubleQuat.Concatenate(temp, rotation)); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/double4/double4.numerics-binary.gen.cs new file mode 100644 index 0000000..dc05f78 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.numerics-binary.gen.cs @@ -0,0 +1,54 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct double4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(double4 value) + { + return double.IsPow2(value.X) && double.IsPow2(value.Y) && double.IsPow2(value.Z) && double.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double4 IBitwiseOperators.operator &(double4 a, double4 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) & Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double4 IBitwiseOperators.operator |(double4 a, double4 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) | Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double4 IBitwiseOperators.operator ^(double4 a, double4 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) ^ Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static double4 IBitwiseOperators.operator ~(double4 value) + { + return Unsafe.BitCast(~Unsafe.BitCast(value)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct double4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(double4 value) + { + return new bool4(double.IsPow2(value.X), double.IsPow2(value.Y), double.IsPow2(value.Z), double.IsPow2(value.W)); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.numerics-floating.gen.cs b/Brutal.Numerics/Vector/double4/double4.numerics-floating.gen.cs new file mode 100644 index 0000000..6d5738e --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.numerics-floating.gen.cs @@ -0,0 +1,443 @@ +// - edit Vector.numerics-floating.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IFloatingPointConstants +public partial struct double4 : IFloatingPointConstants +{ + /// + public static double4 E => new(double.E); + + /// + public static double4 Pi => new(double.Pi); + + /// + public static double4 Tau => new(double.Tau); +} + +// IExponentialFunctions +public partial struct double4 : IExponentialFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Exp(double4 value) + { + return new(double.Exp(value.X), double.Exp(value.Y), double.Exp(value.Z), double.Exp(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Exp2(double4 value) + { + return new double4(double.Exp2(value.X), double.Exp2(value.Y), double.Exp2(value.Z), double.Exp2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Exp10(double4 value) + { + return new double4(double.Exp10(value.X), double.Exp10(value.Y), double.Exp10(value.Z), double.Exp10(value.W)); + } +} + +// ILogarithmicFunctions +public partial struct double4 : ILogarithmicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Log(double4 value) + { + return new(double.Log(value.X), double.Log(value.Y), double.Log(value.Z), double.Log(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Log(double4 value, double4 newBase) + { + return new double4(double.Log(value.X, newBase.X), double.Log(value.Y, newBase.Y), double.Log(value.Z, newBase.Z), double.Log(value.W, newBase.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Log2(double4 value) + { + return new(double.Log2(value.X), double.Log2(value.Y), double.Log2(value.Z), double.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Log10(double4 value) + { + return new double4(double.Log10(value.X), double.Log10(value.Y), double.Log10(value.Z), double.Log10(value.W)); + } +} + +// IPowerFunctions +public partial struct double4 : IPowerFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Pow(double4 value, double4 power) + { + return new double4(double.Pow(value.X, power.X), double.Pow(value.Y, power.Y), double.Pow(value.Z, power.Z), double.Pow(value.W, power.W)); + } +} + +// IRootFunctions +public partial struct double4 : IRootFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Cbrt(double4 value) + { + return new double4(double.Cbrt(value.X), double.Cbrt(value.Y), double.Cbrt(value.Z), double.Cbrt(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Hypot(double4 a, double4 b) + { + return new(double.Hypot(a.X, b.X), double.Hypot(a.Y, b.Y), double.Hypot(a.Z, b.Z), double.Hypot(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 RootN(double4 value, int n) + { + return new double4(double.RootN(value.X, n), double.RootN(value.Y, n), double.RootN(value.Z, n), double.RootN(value.W, n)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Sqrt(double4 value) + { + return new(double.Sqrt(value.X), double.Sqrt(value.Y), double.Sqrt(value.Z), double.Sqrt(value.W)); + } +} + +// ITrigonometricFunctions +public partial struct double4 : ITrigonometricFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Sin(double4 value) + { + return new(double.Sin(value.X), double.Sin(value.Y), double.Sin(value.Z), double.Sin(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Cos(double4 value) + { + return new(double.Cos(value.X), double.Cos(value.Y), double.Cos(value.Z), double.Cos(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (double4 Sin, double4 Cos) SinCos(double4 value) + { + var (sinX, cosX) = double.SinCos(value.X); + var (sinY, cosY) = double.SinCos(value.Y); + var (sinZ, cosZ) = double.SinCos(value.Z); + var (sinW, cosW) = double.SinCos(value.W); + return (new(sinX, sinY, sinZ, sinW), new(cosX, cosY, cosZ, cosW)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Tan(double4 value) + { + return new double4(double.Tan(value.X), double.Tan(value.Y), double.Tan(value.Z), double.Tan(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Asin(double4 value) + { + return new double4(double.Asin(value.X), double.Asin(value.Y), double.Asin(value.Z), double.Asin(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Acos(double4 value) + { + return new double4(double.Acos(value.X), double.Acos(value.Y), double.Acos(value.Z), double.Acos(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Atan(double4 value) + { + return new double4(double.Atan(value.X), double.Atan(value.Y), double.Atan(value.Z), double.Atan(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 SinPi(double4 value) + { + return new double4(double.SinPi(value.X), double.SinPi(value.Y), double.SinPi(value.Z), double.SinPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 CosPi(double4 value) + { + return new double4(double.CosPi(value.X), double.CosPi(value.Y), double.CosPi(value.Z), double.CosPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 TanPi(double4 value) + { + return new double4(double.TanPi(value.X), double.TanPi(value.Y), double.TanPi(value.Z), double.TanPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 AsinPi(double4 value) + { + return new double4(double.AsinPi(value.X), double.AsinPi(value.Y), double.AsinPi(value.Z), double.AsinPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 AcosPi(double4 value) + { + return new double4(double.AcosPi(value.X), double.AcosPi(value.Y), double.AcosPi(value.Z), double.AcosPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 AtanPi(double4 value) + { + return new double4(double.AtanPi(value.X), double.AtanPi(value.Y), double.AtanPi(value.Z), double.AtanPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (double4 SinPi, double4 CosPi) SinCosPi(double4 value) + { + return (SinPi(value), CosPi(value)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 DegreesToRadians(double4 degrees) + { + return new(double.DegreesToRadians(degrees.X), double.DegreesToRadians(degrees.Y), double.DegreesToRadians(degrees.Z), double.DegreesToRadians(degrees.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 RadiansToDegrees(double4 radians) + { + return new(double.RadiansToDegrees(radians.X), double.RadiansToDegrees(radians.Y), double.RadiansToDegrees(radians.Z), double.RadiansToDegrees(radians.W)); + } +} + +// IHyperbolicFunctions +public partial struct double4 : IHyperbolicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Sinh(double4 value) + { + return new double4(double.Sinh(value.X), double.Sinh(value.Y), double.Sinh(value.Z), double.Sinh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Cosh(double4 value) + { + return new double4(double.Cosh(value.X), double.Cosh(value.Y), double.Cosh(value.Z), double.Cosh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Tanh(double4 value) + { + return new double4(double.Tanh(value.X), double.Tanh(value.Y), double.Tanh(value.Z), double.Tanh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Asinh(double4 value) + { + return new double4(double.Asinh(value.X), double.Asinh(value.Y), double.Asinh(value.Z), double.Asinh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Acosh(double4 value) + { + return new double4(double.Acosh(value.X), double.Acosh(value.Y), double.Acosh(value.Z), double.Acosh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Atanh(double4 value) + { + return new double4(double.Atanh(value.X), double.Atanh(value.Y), double.Atanh(value.Z), double.Atanh(value.W)); + } +} + +// IFloatingPoint +public partial struct double4 : IFloatingPoint +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Floor(double4 value) + { + return new(double.Floor(value.X), double.Floor(value.Y), double.Floor(value.Z), double.Floor(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Ceiling(double4 value) + { + return new(double.Ceiling(value.X), double.Ceiling(value.Y), double.Ceiling(value.Z), double.Ceiling(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Round(double4 value) + { + return new(double.Round(value.X), double.Round(value.Y), double.Round(value.Z), double.Round(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Truncate(double4 value) + { + return new(double.Truncate(value.X), double.Truncate(value.Y), double.Truncate(value.Z), double.Truncate(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Round(double4 value, int digits, MidpointRounding mode) + { + return new double4(double.Round(value.X, digits, mode), double.Round(value.Y, digits, mode), double.Round(value.Z, digits, mode), double.Round(value.W, digits, mode)); + } + + // One exponent and significand PER LANE, so there is no single honest answer: explicit and throwing. + + int IFloatingPoint.GetExponentByteCount() => + throw new NotSupportedException($"{nameof(double4)} has one exponent per component."); + + int IFloatingPoint.GetExponentShortestBitLength() => + throw new NotSupportedException($"{nameof(double4)} has one exponent per component."); + + int IFloatingPoint.GetSignificandBitLength() => + throw new NotSupportedException($"{nameof(double4)} has one significand per component."); + + int IFloatingPoint.GetSignificandByteCount() => + throw new NotSupportedException($"{nameof(double4)} has one significand per component."); + + bool IFloatingPoint.TryWriteExponentBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double4)} has one exponent per component."); + + bool IFloatingPoint.TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double4)} has one exponent per component."); + + bool IFloatingPoint.TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double4)} has one significand per component."); + + bool IFloatingPoint.TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(double4)} has one significand per component."); +} + +// IFloatingPointIeee754 +public partial struct double4 : IFloatingPointIeee754 +{ + /// Gets a vector whose components are NaN. + public static double4 NaN => new(double.NaN); + + /// + public static double4 Epsilon => new(double.Epsilon); + + /// + public static double4 NegativeZero => new(double.NegativeZero); + + /// + public static double4 PositiveInfinity => new(double.PositiveInfinity); + + /// + public static double4 NegativeInfinity => new(double.NegativeInfinity); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Atan2(double4 y, double4 x) + { + return new double4(double.Atan2(y.X, x.X), double.Atan2(y.Y, x.Y), double.Atan2(y.Z, x.Z), double.Atan2(y.W, x.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Atan2Pi(double4 y, double4 x) + { + return new double4(double.Atan2Pi(y.X, x.X), double.Atan2Pi(y.Y, x.Y), double.Atan2Pi(y.Z, x.Z), double.Atan2Pi(y.W, x.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 BitDecrement(double4 value) + { + return new double4(double.BitDecrement(value.X), double.BitDecrement(value.Y), double.BitDecrement(value.Z), double.BitDecrement(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 BitIncrement(double4 value) + { + return new double4(double.BitIncrement(value.X), double.BitIncrement(value.Y), double.BitIncrement(value.Z), double.BitIncrement(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 FusedMultiplyAdd(double4 a, double4 b, double4 addend) + { + return new(double.FusedMultiplyAdd(a.X, b.X, addend.X), double.FusedMultiplyAdd(a.Y, b.Y, addend.Y), double.FusedMultiplyAdd(a.Z, b.Z, addend.Z), double.FusedMultiplyAdd(a.W, b.W, addend.W)); + } + + /// + /// Permitted but not required to fuse; use where the single rounding is required. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MultiplyAddEstimate(double4 a, double4 b, double4 addend) + { + return new(double.MultiplyAddEstimate(a.X, b.X, addend.X), double.MultiplyAddEstimate(a.Y, b.Y, addend.Y), double.MultiplyAddEstimate(a.Z, b.Z, addend.Z), double.MultiplyAddEstimate(a.W, b.W, addend.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Ieee754Remainder(double4 a, double4 b) + { + return new double4(double.Ieee754Remainder(a.X, b.X), double.Ieee754Remainder(a.Y, b.Y), double.Ieee754Remainder(a.Z, b.Z), double.Ieee754Remainder(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 ScaleB(double4 value, int n) + { + return new double4(double.ScaleB(value.X, n), double.ScaleB(value.Y, n), double.ScaleB(value.Z, n), double.ScaleB(value.W, n)); + } + + // ILogB's int return cannot hold one exponent per lane - same shape as Sign + static int IFloatingPointIeee754.ILogB(double4 value) => + throw new NotSupportedException($"{nameof(double4)} has one exponent per component."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Lerp(double4 a, double4 b, double amount) + { + return new(double.Lerp(a.X, b.X, amount), double.Lerp(a.Y, b.Y, amount), double.Lerp(a.Z, b.Z, amount), double.Lerp(a.W, b.W, amount)); + } + + /// + [Obsolete("Renamed to Sqrt (the generic-math name; SquareRoot was the System.Numerics vector spelling).")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 SquareRoot(double4 value) + { + return Sqrt(value); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.numerics.gen.cs b/Brutal.Numerics/Vector/double4/double4.numerics.gen.cs new file mode 100644 index 0000000..233f6e6 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.numerics.gen.cs @@ -0,0 +1,545 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct double4 : INumberBase +{ + /// + public static double4 Zero => new(0); + + /// + public static double4 One => new(1); + + static double4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static double4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Abs(double4 value) + { + return new(double.Abs(value.X), double.Abs(value.Y), double.Abs(value.Z), double.Abs(value.W)); + } + + static bool INumberBase.IsCanonical(double4 value) => true; + + static bool INumberBase.IsComplexNumber(double4 value) => false; + + static bool INumberBase.IsImaginaryNumber(double4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(double4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(double4 value) + { + return double.IsEvenInteger(value.X) && double.IsEvenInteger(value.Y) && double.IsEvenInteger(value.Z) && double.IsEvenInteger(value.W); + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(double4 value) + { + return double.IsOddInteger(value.X) && double.IsOddInteger(value.Y) && double.IsOddInteger(value.Z) && double.IsOddInteger(value.W); + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(double4 value) + { + return double.IsNegative(value.X) && double.IsNegative(value.Y) && double.IsNegative(value.Z) && double.IsNegative(value.W); + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(double4 value) + { + return double.IsPositive(value.X) && double.IsPositive(value.Y) && double.IsPositive(value.Z) && double.IsPositive(value.W); + } + + /// Determines if every component of a value is finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsFinite(double4 value) + { + return double.IsFinite(value.X) && double.IsFinite(value.Y) && double.IsFinite(value.Z) && double.IsFinite(value.W); + } + + /// Determines if every component of a value is infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInfinity(double4 value) + { + return double.IsInfinity(value.X) && double.IsInfinity(value.Y) && double.IsInfinity(value.Z) && double.IsInfinity(value.W); + } + + /// Determines if every component of a value is negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegativeInfinity(double4 value) + { + return double.IsNegativeInfinity(value.X) && double.IsNegativeInfinity(value.Y) && double.IsNegativeInfinity(value.Z) && double.IsNegativeInfinity(value.W); + } + + /// Determines if every component of a value is positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositiveInfinity(double4 value) + { + return double.IsPositiveInfinity(value.X) && double.IsPositiveInfinity(value.Y) && double.IsPositiveInfinity(value.Z) && double.IsPositiveInfinity(value.W); + } + + /// Determines if every component of a value is an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInteger(double4 value) + { + return double.IsInteger(value.X) && double.IsInteger(value.Y) && double.IsInteger(value.Z) && double.IsInteger(value.W); + } + + /// Determines if every component of a value is a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsRealNumber(double4 value) + { + return double.IsRealNumber(value.X) && double.IsRealNumber(value.Y) && double.IsRealNumber(value.Z) && double.IsRealNumber(value.W); + } + + /// Determines if any component of a value is NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNaN(double4 value) + { + return double.IsNaN(value.X) || double.IsNaN(value.Y) || double.IsNaN(value.Z) || double.IsNaN(value.W); + } + + /// Determines if every component of a value is normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNormal(double4 value) + { + return double.IsNormal(value.X) && double.IsNormal(value.Y) && double.IsNormal(value.Z) && double.IsNormal(value.W); + } + + /// Determines if every component of a value is subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsSubnormal(double4 value) + { + return double.IsSubnormal(value.X) && double.IsSubnormal(value.Y) && double.IsSubnormal(value.Z) && double.IsSubnormal(value.W); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MaxMagnitude(double4 a, double4 b) + { + return new(double.MaxMagnitude(a.X, b.X), double.MaxMagnitude(a.Y, b.Y), double.MaxMagnitude(a.Z, b.Z), double.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is greater, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MaxMagnitudeNumber(double4 a, double4 b) + { + return new(double.MaxMagnitudeNumber(a.X, b.X), double.MaxMagnitudeNumber(a.Y, b.Y), double.MaxMagnitudeNumber(a.Z, b.Z), double.MaxMagnitudeNumber(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MinMagnitude(double4 a, double4 b) + { + return new(double.MinMagnitude(a.X, b.X), double.MinMagnitude(a.Y, b.Y), double.MinMagnitude(a.Z, b.Z), double.MinMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MinMagnitudeNumber(double4 a, double4 b) + { + return new(double.MinMagnitudeNumber(a.X, b.X), double.MinMagnitudeNumber(a.Y, b.Y), double.MinMagnitudeNumber(a.Z, b.Z), double.MinMagnitudeNumber(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Add(double4 a, double4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Divide(double4 a, double4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Multiply(double4 a, double4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Negate(double4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Subtract(double4 a, double4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator +(double4 a, double4 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator -(double4 a, double4 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator *(double4 a, double4 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z, a.W * b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator /(double4 a, double4 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z, a.W / b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator -(double4 a) + { + return new(-a.X, -a.Y, -a.Z, -a.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator +(double4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static double4 IIncrementOperators.operator ++(double4 value) => value + One; + + static double4 IDecrementOperators.operator --(double4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out double4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(double4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out double4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(double4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out double4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(double4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct double4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Divide(double4 a, double b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Multiply(double4 a, double b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Multiply(double a, double4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator *(double4 a, double b) + { + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator /(double4 a, double b) + { + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator *(double a, double4 b) + { + return new(a * b.X, a * b.Y, a * b.Z, a * b.W); + } +} + +// INumber +public partial struct double4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Clamp(double4 value, double4 min, double4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Max(double4 a, double4 b) + { + return new(double.Max(a.X, b.X), double.Max(a.Y, b.Y), double.Max(a.Z, b.Z), double.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 Min(double4 a, double4 b) + { + return new(double.Min(a.X, b.X), double.Min(a.Y, b.Y), double.Min(a.Z, b.Z), double.Min(a.W, b.W)); + } + + /// Selects, componentwise, the larger value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MaxNumber(double4 a, double4 b) + { + return new(double.MaxNumber(a.X, b.X), double.MaxNumber(a.Y, b.Y), double.MaxNumber(a.Z, b.Z), double.MaxNumber(a.W, b.W)); + } + + /// Selects, componentwise, the smaller value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 MinNumber(double4 a, double4 b) + { + return new(double.MinNumber(a.X, b.X), double.MinNumber(a.Y, b.Y), double.MinNumber(a.Z, b.Z), double.MinNumber(a.W, b.W)); + } + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 CopySign(double4 value, double4 sign) + { + return new(double.CopySign(value.X, sign.X), double.CopySign(value.Y, sign.Y), double.CopySign(value.Z, sign.Z), double.CopySign(value.W, sign.W)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static double4 INumber.ClampNative(double4 value, double4 min, double4 max) => Clamp(value, min, max); + + static double4 INumber.MaxNative(double4 a, double4 b) => Max(a, b); + + static double4 INumber.MinNative(double4 a, double4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(double4 value) => + throw new NotSupportedException($"{nameof(double4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator %(double4 a, double4 b) + { + return new double4(a.X % b.X, a.Y % b.Y, a.Z % b.Z, a.W % b.W); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(double4)} has no total order."); + + int IComparable.CompareTo(double4 other) => + throw new NotSupportedException($"{nameof(double4)} has no total order."); + + static bool IComparisonOperators.operator <(double4 a, double4 b) => + throw new NotSupportedException($"{nameof(double4)} has no total order."); + + static bool IComparisonOperators.operator <=(double4 a, double4 b) => + throw new NotSupportedException($"{nameof(double4)} has no total order."); + + static bool IComparisonOperators.operator >(double4 a, double4 b) => + throw new NotSupportedException($"{nameof(double4)} has no total order."); + + static bool IComparisonOperators.operator >=(double4 a, double4 b) => + throw new NotSupportedException($"{nameof(double4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct double4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(double4 a, double4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(double4 a, double4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(double4 a, double4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(double4 a, double4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(double4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(double4 value) + { + return new bool4(double.IsEvenInteger(value.X), double.IsEvenInteger(value.Y), double.IsEvenInteger(value.Z), double.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(double4 value) + { + return new bool4(double.IsOddInteger(value.X), double.IsOddInteger(value.Y), double.IsOddInteger(value.Z), double.IsOddInteger(value.W)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegative(double4 value) + { + return new bool4(double.IsNegative(value.X), double.IsNegative(value.Y), double.IsNegative(value.Z), double.IsNegative(value.W)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositive(double4 value) + { + return new bool4(double.IsPositive(value.X), double.IsPositive(value.Y), double.IsPositive(value.Z), double.IsPositive(value.W)); + } + + /// Determines which components of a value are finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsFinite(double4 value) + { + return new bool4(double.IsFinite(value.X), double.IsFinite(value.Y), double.IsFinite(value.Z), double.IsFinite(value.W)); + } + + /// Determines which components of a value are infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsInfinity(double4 value) + { + return new bool4(double.IsInfinity(value.X), double.IsInfinity(value.Y), double.IsInfinity(value.Z), double.IsInfinity(value.W)); + } + + /// Determines which components of a value are negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegativeInfinity(double4 value) + { + return new bool4(double.IsNegativeInfinity(value.X), double.IsNegativeInfinity(value.Y), double.IsNegativeInfinity(value.Z), double.IsNegativeInfinity(value.W)); + } + + /// Determines which components of a value are positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositiveInfinity(double4 value) + { + return new bool4(double.IsPositiveInfinity(value.X), double.IsPositiveInfinity(value.Y), double.IsPositiveInfinity(value.Z), double.IsPositiveInfinity(value.W)); + } + + /// Determines which components of a value are an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsInteger(double4 value) + { + return new bool4(double.IsInteger(value.X), double.IsInteger(value.Y), double.IsInteger(value.Z), double.IsInteger(value.W)); + } + + /// Determines which components of a value are a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsRealNumber(double4 value) + { + return new bool4(double.IsRealNumber(value.X), double.IsRealNumber(value.Y), double.IsRealNumber(value.Z), double.IsRealNumber(value.W)); + } + + /// Determines which components of a value are NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNaN(double4 value) + { + return new bool4(double.IsNaN(value.X), double.IsNaN(value.Y), double.IsNaN(value.Z), double.IsNaN(value.W)); + } + + /// Determines which components of a value are normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNormal(double4 value) + { + return new bool4(double.IsNormal(value.X), double.IsNormal(value.Y), double.IsNormal(value.Z), double.IsNormal(value.W)); + } + + /// Determines which components of a value are subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsSubnormal(double4 value) + { + return new bool4(double.IsSubnormal(value.X), double.IsSubnormal(value.Y), double.IsSubnormal(value.Z), double.IsSubnormal(value.W)); + } +} + +// ISignedNumber +public partial struct double4 : ISignedNumber +{ + /// + public static double4 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/double4/double4.pack.gen.cs b/Brutal.Numerics/Vector/double4/double4.pack.gen.cs new file mode 100644 index 0000000..cd71c4f --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 +{ + public static double4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out double4 result, elementConverter); + return result; + } + + public static double4 Unpack(in sbyte4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.SByte.ToDouble(mode)); + } + + public static double4 Unpack(in byte4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Byte.ToDouble(mode)); + } + + public static double4 Unpack(in short4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Short.ToDouble(mode)); + } + + public static double4 Unpack(in ushort4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UShort.ToDouble(mode)); + } + + public static double4 Unpack(in int4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Int.ToDouble(mode)); + } + + public static double4 Unpack(in uint4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UInt.ToDouble(mode)); + } + + public static double4 Unpack(in float4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Float.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UInt.ToDouble(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Float.ToDouble(mode)); + } +} diff --git a/Brutal.Numerics/Vector/double4/double4.swizzle.gen.cs b/Brutal.Numerics/Vector/double4/double4.swizzle.gen.cs new file mode 100644 index 0000000..de75169 --- /dev/null +++ b/Brutal.Numerics/Vector/double4/double4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct double4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public double2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public double2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public double2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public double2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public double2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public double2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public double2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public double2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public double2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public double2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public double2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public double2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public double3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public double3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public double3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public double3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public double3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public double3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public double3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public double3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public double3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public double3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public double3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public double3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public double3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public double3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public double3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public double3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public double3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public double3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public double3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public double3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public double3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public double3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public double3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public double3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public double4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public double4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public double4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public double4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public double4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public double4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public double4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public double4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public double4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public double4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public double4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public double4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public double4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public double4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public double4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public double4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public double4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public double4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public double4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public double4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public double4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public double4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public double4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct double4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public double R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public double G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public double B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public double A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public double2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public double2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public double2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public double2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public double2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public double2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public double2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public double2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public double2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public double2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public double2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public double2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public double3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public double3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public double3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public double3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public double3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public double3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public double3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public double3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public double3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public double3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public double3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public double3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public double3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public double3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public double3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public double3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public double3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public double3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public double3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public double3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public double3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public double3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public double3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public double3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public double4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public double4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public double4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public double4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public double4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public double4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public double4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public double4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public double4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public double4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public double4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public double4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public double4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public double4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public double4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public double4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public double4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public double4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public double4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public double4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public double4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public double4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public double4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public double4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.copy.gen.cs b/Brutal.Numerics/Vector/float2/float2.copy.gen.cs new file mode 100644 index 0000000..06f172a --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.equality.gen.cs b/Brutal.Numerics/Vector/float2/float2.equality.gen.cs new file mode 100644 index 0000000..71b1dc0 --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(float2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is float2 other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(float2 a, float2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(float2 a, float2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.format.gen.cs b/Brutal.Numerics/Vector/float2/float2.format.gen.cs new file mode 100644 index 0000000..c076323 --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static float2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static float2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static float2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static float2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid float2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out float2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out float2 result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out float2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a float2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out float2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.gen.cs b/Brutal.Numerics/Vector/float2/float2.gen.cs new file mode 100644 index 0000000..b68603d --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.gen.cs @@ -0,0 +1,107 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with float components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct float2 : IVector2 + , IFloatingVector + , IFloatingVector2 +{ + /// + public static int ComponentSize => sizeof(float); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public float X; + + /// + [XmlAttribute] + public float Y; + + float IVector2.X { readonly get => X; set => X = value; } + + float IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(float x, float y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(float xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static float2 UnitX => new(1, 0); + + /// + public static float2 UnitY => new(0, 1); + + /// + public float this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out float x, out float y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.math-metric.gen.cs b/Brutal.Numerics/Vector/float2/float2.math-metric.gen.cs new file mode 100644 index 0000000..9e6ea6a --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.math-metric.gen.cs @@ -0,0 +1,62 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return float.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(float2 a, float2 b) + { + return float.Sqrt(DistanceSquared(a, b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float DistanceSquared(float2 a, float2 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Dot(float2 a, float2 b) + { + return a.X * b.X + a.Y * b.Y; + } + + /// + /// Thrown when the input vector is a zero vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Normalize(float2 value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / float.Sqrt(lengthSquared); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 NormalizeOrZero(float2 value) + { + var length = float.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.math.gen.cs b/Brutal.Numerics/Vector/float2/float2.math.gen.cs new file mode 100644 index 0000000..46302a3 --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.math.gen.cs @@ -0,0 +1,60 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Reflect(float2 vector, float2 normal) + { + return vector - 2 * Dot(vector, normal) * normal; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Transform(float2 position, float3x2 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.Z; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Transform(float2 position, float4x4 matrix) + { + return float4.Transform(position, matrix).XY; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Transform(float2 value, floatQuat rotation) + { + return float4.Transform(value, rotation).XY; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 TransformNormal(float2 normal, float3x2 matrix) + { + var result = matrix.X * normal.X; + result += matrix.Y * normal.Y; + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 TransformNormal(float2 normal, float4x4 matrix) + { + var result = matrix.X * normal.X; + + result += matrix.Y * normal.Y; + + return result.XY; + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/float2/float2.numerics-binary.gen.cs new file mode 100644 index 0000000..e64e89a --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.numerics-binary.gen.cs @@ -0,0 +1,54 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct float2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(float2 value) + { + return float.IsPow2(value.X) && float.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float2 IBitwiseOperators.operator &(float2 a, float2 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) & Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float2 IBitwiseOperators.operator |(float2 a, float2 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) | Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float2 IBitwiseOperators.operator ^(float2 a, float2 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) ^ Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float2 IBitwiseOperators.operator ~(float2 value) + { + return Unsafe.BitCast(~Unsafe.BitCast(value)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct float2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(float2 value) + { + return new bool2(float.IsPow2(value.X), float.IsPow2(value.Y)); + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.numerics-floating.gen.cs b/Brutal.Numerics/Vector/float2/float2.numerics-floating.gen.cs new file mode 100644 index 0000000..d3903ca --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.numerics-floating.gen.cs @@ -0,0 +1,445 @@ +// - edit Vector.numerics-floating.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IFloatingPointConstants +public partial struct float2 : IFloatingPointConstants +{ + /// + public static float2 E => new(float.E); + + /// + public static float2 Pi => new(float.Pi); + + /// + public static float2 Tau => new(float.Tau); +} + +// IExponentialFunctions +public partial struct float2 : IExponentialFunctions +{ + /// + /// NOTE: the vectorized float kernel is not exact at zero. + /// It returns 1 ulp above One, so Exp(Zero) does not give back One. + /// Legal under the vectorized-math accuracy contract, and the double kernel is exact. + /// Upstream: https://github.com/dotnet/runtime/issues/118841. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Exp(float2 value) + { + return new(float.Exp(value.X), float.Exp(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Exp2(float2 value) + { + return new float2(float.Exp2(value.X), float.Exp2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Exp10(float2 value) + { + return new float2(float.Exp10(value.X), float.Exp10(value.Y)); + } +} + +// ILogarithmicFunctions +public partial struct float2 : ILogarithmicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Log(float2 value) + { + return new(float.Log(value.X), float.Log(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Log(float2 value, float2 newBase) + { + return new float2(float.Log(value.X, newBase.X), float.Log(value.Y, newBase.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Log2(float2 value) + { + return new(float.Log2(value.X), float.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Log10(float2 value) + { + return new float2(float.Log10(value.X), float.Log10(value.Y)); + } +} + +// IPowerFunctions +public partial struct float2 : IPowerFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Pow(float2 value, float2 power) + { + return new float2(float.Pow(value.X, power.X), float.Pow(value.Y, power.Y)); + } +} + +// IRootFunctions +public partial struct float2 : IRootFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Cbrt(float2 value) + { + return new float2(float.Cbrt(value.X), float.Cbrt(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Hypot(float2 a, float2 b) + { + return new(float.Hypot(a.X, b.X), float.Hypot(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 RootN(float2 value, int n) + { + return new float2(float.RootN(value.X, n), float.RootN(value.Y, n)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Sqrt(float2 value) + { + return new(float.Sqrt(value.X), float.Sqrt(value.Y)); + } +} + +// ITrigonometricFunctions +public partial struct float2 : ITrigonometricFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Sin(float2 value) + { + return new(float.Sin(value.X), float.Sin(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Cos(float2 value) + { + return new(float.Cos(value.X), float.Cos(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (float2 Sin, float2 Cos) SinCos(float2 value) + { + var (sinX, cosX) = float.SinCos(value.X); + var (sinY, cosY) = float.SinCos(value.Y); + return (new(sinX, sinY), new(cosX, cosY)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Tan(float2 value) + { + return new float2(float.Tan(value.X), float.Tan(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Asin(float2 value) + { + return new float2(float.Asin(value.X), float.Asin(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Acos(float2 value) + { + return new float2(float.Acos(value.X), float.Acos(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Atan(float2 value) + { + return new float2(float.Atan(value.X), float.Atan(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 SinPi(float2 value) + { + return new float2(float.SinPi(value.X), float.SinPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 CosPi(float2 value) + { + return new float2(float.CosPi(value.X), float.CosPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 TanPi(float2 value) + { + return new float2(float.TanPi(value.X), float.TanPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 AsinPi(float2 value) + { + return new float2(float.AsinPi(value.X), float.AsinPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 AcosPi(float2 value) + { + return new float2(float.AcosPi(value.X), float.AcosPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 AtanPi(float2 value) + { + return new float2(float.AtanPi(value.X), float.AtanPi(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (float2 SinPi, float2 CosPi) SinCosPi(float2 value) + { + return (SinPi(value), CosPi(value)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 DegreesToRadians(float2 degrees) + { + return new(float.DegreesToRadians(degrees.X), float.DegreesToRadians(degrees.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 RadiansToDegrees(float2 radians) + { + return new(float.RadiansToDegrees(radians.X), float.RadiansToDegrees(radians.Y)); + } +} + +// IHyperbolicFunctions +public partial struct float2 : IHyperbolicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Sinh(float2 value) + { + return new float2(float.Sinh(value.X), float.Sinh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Cosh(float2 value) + { + return new float2(float.Cosh(value.X), float.Cosh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Tanh(float2 value) + { + return new float2(float.Tanh(value.X), float.Tanh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Asinh(float2 value) + { + return new float2(float.Asinh(value.X), float.Asinh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Acosh(float2 value) + { + return new float2(float.Acosh(value.X), float.Acosh(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Atanh(float2 value) + { + return new float2(float.Atanh(value.X), float.Atanh(value.Y)); + } +} + +// IFloatingPoint +public partial struct float2 : IFloatingPoint +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Floor(float2 value) + { + return new(float.Floor(value.X), float.Floor(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Ceiling(float2 value) + { + return new(float.Ceiling(value.X), float.Ceiling(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Round(float2 value) + { + return new(float.Round(value.X), float.Round(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Truncate(float2 value) + { + return new(float.Truncate(value.X), float.Truncate(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Round(float2 value, int digits, MidpointRounding mode) + { + return new float2(float.Round(value.X, digits, mode), float.Round(value.Y, digits, mode)); + } + + // One exponent and significand PER LANE, so there is no single honest answer: explicit and throwing. + + int IFloatingPoint.GetExponentByteCount() => + throw new NotSupportedException($"{nameof(float2)} has one exponent per component."); + + int IFloatingPoint.GetExponentShortestBitLength() => + throw new NotSupportedException($"{nameof(float2)} has one exponent per component."); + + int IFloatingPoint.GetSignificandBitLength() => + throw new NotSupportedException($"{nameof(float2)} has one significand per component."); + + int IFloatingPoint.GetSignificandByteCount() => + throw new NotSupportedException($"{nameof(float2)} has one significand per component."); + + bool IFloatingPoint.TryWriteExponentBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float2)} has one exponent per component."); + + bool IFloatingPoint.TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float2)} has one exponent per component."); + + bool IFloatingPoint.TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float2)} has one significand per component."); + + bool IFloatingPoint.TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float2)} has one significand per component."); +} + +// IFloatingPointIeee754 +public partial struct float2 : IFloatingPointIeee754 +{ + /// Gets a vector whose components are NaN. + public static float2 NaN => new(float.NaN); + + /// + public static float2 Epsilon => new(float.Epsilon); + + /// + public static float2 NegativeZero => new(float.NegativeZero); + + /// + public static float2 PositiveInfinity => new(float.PositiveInfinity); + + /// + public static float2 NegativeInfinity => new(float.NegativeInfinity); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Atan2(float2 y, float2 x) + { + return new float2(float.Atan2(y.X, x.X), float.Atan2(y.Y, x.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Atan2Pi(float2 y, float2 x) + { + return new float2(float.Atan2Pi(y.X, x.X), float.Atan2Pi(y.Y, x.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 BitDecrement(float2 value) + { + return new float2(float.BitDecrement(value.X), float.BitDecrement(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 BitIncrement(float2 value) + { + return new float2(float.BitIncrement(value.X), float.BitIncrement(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 FusedMultiplyAdd(float2 a, float2 b, float2 addend) + { + return new(float.FusedMultiplyAdd(a.X, b.X, addend.X), float.FusedMultiplyAdd(a.Y, b.Y, addend.Y)); + } + + /// + /// Permitted but not required to fuse; use where the single rounding is required. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MultiplyAddEstimate(float2 a, float2 b, float2 addend) + { + return new(float.MultiplyAddEstimate(a.X, b.X, addend.X), float.MultiplyAddEstimate(a.Y, b.Y, addend.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Ieee754Remainder(float2 a, float2 b) + { + return new float2(float.Ieee754Remainder(a.X, b.X), float.Ieee754Remainder(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 ScaleB(float2 value, int n) + { + return new float2(float.ScaleB(value.X, n), float.ScaleB(value.Y, n)); + } + + // ILogB's int return cannot hold one exponent per lane - same shape as Sign + static int IFloatingPointIeee754.ILogB(float2 value) => + throw new NotSupportedException($"{nameof(float2)} has one exponent per component."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Lerp(float2 a, float2 b, float amount) + { + return new(float.Lerp(a.X, b.X, amount), float.Lerp(a.Y, b.Y, amount)); + } + + /// + [Obsolete("Renamed to Sqrt (the generic-math name; SquareRoot was the System.Numerics vector spelling).")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 SquareRoot(float2 value) + { + return Sqrt(value); + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.numerics.gen.cs b/Brutal.Numerics/Vector/float2/float2.numerics.gen.cs new file mode 100644 index 0000000..1810a49 --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.numerics.gen.cs @@ -0,0 +1,545 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct float2 : INumberBase +{ + /// + public static float2 Zero => new(0); + + /// + public static float2 One => new(1); + + static float2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static float2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Abs(float2 value) + { + return new(float.Abs(value.X), float.Abs(value.Y)); + } + + static bool INumberBase.IsCanonical(float2 value) => true; + + static bool INumberBase.IsComplexNumber(float2 value) => false; + + static bool INumberBase.IsImaginaryNumber(float2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(float2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(float2 value) + { + return float.IsEvenInteger(value.X) && float.IsEvenInteger(value.Y); + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(float2 value) + { + return float.IsOddInteger(value.X) && float.IsOddInteger(value.Y); + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(float2 value) + { + return float.IsNegative(value.X) && float.IsNegative(value.Y); + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(float2 value) + { + return float.IsPositive(value.X) && float.IsPositive(value.Y); + } + + /// Determines if every component of a value is finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsFinite(float2 value) + { + return float.IsFinite(value.X) && float.IsFinite(value.Y); + } + + /// Determines if every component of a value is infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInfinity(float2 value) + { + return float.IsInfinity(value.X) && float.IsInfinity(value.Y); + } + + /// Determines if every component of a value is negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegativeInfinity(float2 value) + { + return float.IsNegativeInfinity(value.X) && float.IsNegativeInfinity(value.Y); + } + + /// Determines if every component of a value is positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositiveInfinity(float2 value) + { + return float.IsPositiveInfinity(value.X) && float.IsPositiveInfinity(value.Y); + } + + /// Determines if every component of a value is an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInteger(float2 value) + { + return float.IsInteger(value.X) && float.IsInteger(value.Y); + } + + /// Determines if every component of a value is a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsRealNumber(float2 value) + { + return float.IsRealNumber(value.X) && float.IsRealNumber(value.Y); + } + + /// Determines if any component of a value is NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNaN(float2 value) + { + return float.IsNaN(value.X) || float.IsNaN(value.Y); + } + + /// Determines if every component of a value is normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNormal(float2 value) + { + return float.IsNormal(value.X) && float.IsNormal(value.Y); + } + + /// Determines if every component of a value is subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsSubnormal(float2 value) + { + return float.IsSubnormal(value.X) && float.IsSubnormal(value.Y); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MaxMagnitude(float2 a, float2 b) + { + return new(float.MaxMagnitude(a.X, b.X), float.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is greater, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MaxMagnitudeNumber(float2 a, float2 b) + { + return new(float.MaxMagnitudeNumber(a.X, b.X), float.MaxMagnitudeNumber(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MinMagnitude(float2 a, float2 b) + { + return new(float.MinMagnitude(a.X, b.X), float.MinMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MinMagnitudeNumber(float2 a, float2 b) + { + return new(float.MinMagnitudeNumber(a.X, b.X), float.MinMagnitudeNumber(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Add(float2 a, float2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Divide(float2 a, float2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Multiply(float2 a, float2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Negate(float2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Subtract(float2 a, float2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator +(float2 a, float2 b) + { + return new(a.X + b.X, a.Y + b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator -(float2 a, float2 b) + { + return new(a.X - b.X, a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator *(float2 a, float2 b) + { + return new(a.X * b.X, a.Y * b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator /(float2 a, float2 b) + { + return new(a.X / b.X, a.Y / b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator -(float2 a) + { + return new(-a.X, -a.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator +(float2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static float2 IIncrementOperators.operator ++(float2 value) => value + One; + + static float2 IDecrementOperators.operator --(float2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out float2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(float2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out float2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(float2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out float2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(float2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct float2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Divide(float2 a, float b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Multiply(float2 a, float b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Multiply(float a, float2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator *(float2 a, float b) + { + return new(a.X * b, a.Y * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator /(float2 a, float b) + { + return new(a.X / b, a.Y / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator *(float a, float2 b) + { + return new(a * b.X, a * b.Y); + } +} + +// INumber +public partial struct float2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Clamp(float2 value, float2 min, float2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Max(float2 a, float2 b) + { + return new(float.Max(a.X, b.X), float.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Min(float2 a, float2 b) + { + return new(float.Min(a.X, b.X), float.Min(a.Y, b.Y)); + } + + /// Selects, componentwise, the larger value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MaxNumber(float2 a, float2 b) + { + return new(float.MaxNumber(a.X, b.X), float.MaxNumber(a.Y, b.Y)); + } + + /// Selects, componentwise, the smaller value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 MinNumber(float2 a, float2 b) + { + return new(float.MinNumber(a.X, b.X), float.MinNumber(a.Y, b.Y)); + } + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 CopySign(float2 value, float2 sign) + { + return new(float.CopySign(value.X, sign.X), float.CopySign(value.Y, sign.Y)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static float2 INumber.ClampNative(float2 value, float2 min, float2 max) => Clamp(value, min, max); + + static float2 INumber.MaxNative(float2 a, float2 b) => Max(a, b); + + static float2 INumber.MinNative(float2 a, float2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(float2 value) => + throw new NotSupportedException($"{nameof(float2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator %(float2 a, float2 b) + { + return new float2(a.X % b.X, a.Y % b.Y); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(float2)} has no total order."); + + int IComparable.CompareTo(float2 other) => + throw new NotSupportedException($"{nameof(float2)} has no total order."); + + static bool IComparisonOperators.operator <(float2 a, float2 b) => + throw new NotSupportedException($"{nameof(float2)} has no total order."); + + static bool IComparisonOperators.operator <=(float2 a, float2 b) => + throw new NotSupportedException($"{nameof(float2)} has no total order."); + + static bool IComparisonOperators.operator >(float2 a, float2 b) => + throw new NotSupportedException($"{nameof(float2)} has no total order."); + + static bool IComparisonOperators.operator >=(float2 a, float2 b) => + throw new NotSupportedException($"{nameof(float2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct float2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(float2 a, float2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(float2 a, float2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(float2 a, float2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(float2 a, float2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(float2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(float2 value) + { + return new bool2(float.IsEvenInteger(value.X), float.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(float2 value) + { + return new bool2(float.IsOddInteger(value.X), float.IsOddInteger(value.Y)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegative(float2 value) + { + return new bool2(float.IsNegative(value.X), float.IsNegative(value.Y)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositive(float2 value) + { + return new bool2(float.IsPositive(value.X), float.IsPositive(value.Y)); + } + + /// Determines which components of a value are finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsFinite(float2 value) + { + return new bool2(float.IsFinite(value.X), float.IsFinite(value.Y)); + } + + /// Determines which components of a value are infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsInfinity(float2 value) + { + return new bool2(float.IsInfinity(value.X), float.IsInfinity(value.Y)); + } + + /// Determines which components of a value are negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegativeInfinity(float2 value) + { + return new bool2(float.IsNegativeInfinity(value.X), float.IsNegativeInfinity(value.Y)); + } + + /// Determines which components of a value are positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositiveInfinity(float2 value) + { + return new bool2(float.IsPositiveInfinity(value.X), float.IsPositiveInfinity(value.Y)); + } + + /// Determines which components of a value are an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsInteger(float2 value) + { + return new bool2(float.IsInteger(value.X), float.IsInteger(value.Y)); + } + + /// Determines which components of a value are a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsRealNumber(float2 value) + { + return new bool2(float.IsRealNumber(value.X), float.IsRealNumber(value.Y)); + } + + /// Determines which components of a value are NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNaN(float2 value) + { + return new bool2(float.IsNaN(value.X), float.IsNaN(value.Y)); + } + + /// Determines which components of a value are normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNormal(float2 value) + { + return new bool2(float.IsNormal(value.X), float.IsNormal(value.Y)); + } + + /// Determines which components of a value are subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsSubnormal(float2 value) + { + return new bool2(float.IsSubnormal(value.X), float.IsSubnormal(value.Y)); + } +} + +// ISignedNumber +public partial struct float2 : ISignedNumber +{ + /// + public static float2 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/float2/float2.pack.gen.cs b/Brutal.Numerics/Vector/float2/float2.pack.gen.cs new file mode 100644 index 0000000..930841c --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 +{ + public static float2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Unpack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Unpack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Unpack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Unpack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Unpack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float2 result, elementConverter); + return result; + } + + public static float2 Unpack(in sbyte2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.SByte.ToFloat(mode)); + } + + public static float2 Unpack(in byte2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Byte.ToFloat(mode)); + } + + public static float2 Unpack(in short2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Short.ToFloat(mode)); + } + + public static float2 Unpack(in ushort2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UShort.ToFloat(mode)); + } + + public static float2 Unpack(in int2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Int.ToFloat(mode)); + } + + public static float2 Unpack(in uint2 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UInt.ToFloat(mode)); + } + + public static float2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UInt.ToFloat(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToFloat(mode)); + } +} diff --git a/Brutal.Numerics/Vector/float2/float2.swizzle.gen.cs b/Brutal.Numerics/Vector/float2/float2.swizzle.gen.cs new file mode 100644 index 0000000..9e0a3c0 --- /dev/null +++ b/Brutal.Numerics/Vector/float2/float2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public float2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public float2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct float2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public float R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public float G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public float2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public float2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.color.gen.cs b/Brutal.Numerics/Vector/float3/float3.color.gen.cs new file mode 100644 index 0000000..a38a4b4 --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.color.gen.cs @@ -0,0 +1,31 @@ +// - edit Vector.color.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + /// + /// Constructs a float3 vector representing an RGB color. + /// + /// Red component (0.0 - 1.0). + /// Green component (0.0 - 1.0). + /// Blue component (0.0 - 1.0). + /// A float3 color with the specified RGB values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Rgb(float r, float g, float b) + { + return new float3(r, g, b); + } + + /// + /// Constructs a float3 vector representing a grayscale color. + /// + /// Single value used for red, green, and blue components (0.0 - 1.0). + /// A float3 grayscale color with the specified value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Grayscale(float v) + { + return new float3(v, v, v); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.copy.gen.cs b/Brutal.Numerics/Vector/float3/float3.copy.gen.cs new file mode 100644 index 0000000..d70c746 --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.equality.gen.cs b/Brutal.Numerics/Vector/float3/float3.equality.gen.cs new file mode 100644 index 0000000..6b7e3e0 --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(float3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is float3 other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(float3 a, float3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(float3 a, float3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.format.gen.cs b/Brutal.Numerics/Vector/float3/float3.format.gen.cs new file mode 100644 index 0000000..9eaa6a2 --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static float3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static float3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static float3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static float3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid float3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out float3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out float3 result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out float3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a float3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out float3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.gen.cs b/Brutal.Numerics/Vector/float3/float3.gen.cs new file mode 100644 index 0000000..7fd770d --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with float components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct float3 : IVector3 + , IFloatingVector + , IFloatingVector3 +{ + /// + public static int ComponentSize => sizeof(float); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public float X; + + /// + [XmlAttribute] + public float Y; + + /// + [XmlAttribute] + public float Z; + + float IVector3.X { readonly get => X; set => X = value; } + + float IVector3.Y { readonly get => Y; set => Y = value; } + + float IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float x, float y, float z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float2 xy, float z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static float3 UnitX => new(1, 0, 0); + + /// + public static float3 UnitY => new(0, 1, 0); + + /// + public static float3 UnitZ => new(0, 0, 1); + + /// + public float this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out float x, out float y, out float z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.math-metric.gen.cs b/Brutal.Numerics/Vector/float3/float3.math-metric.gen.cs new file mode 100644 index 0000000..8eae59b --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.math-metric.gen.cs @@ -0,0 +1,62 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return float.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(float3 a, float3 b) + { + return float.Sqrt(DistanceSquared(a, b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float DistanceSquared(float3 a, float3 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Dot(float3 a, float3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } + + /// + /// Thrown when the input vector is a zero vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Normalize(float3 value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / float.Sqrt(lengthSquared); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 NormalizeOrZero(float3 value) + { + var length = float.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.math.gen.cs b/Brutal.Numerics/Vector/float3/float3.math.gen.cs new file mode 100644 index 0000000..a48735a --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.math.gen.cs @@ -0,0 +1,75 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Cross(float3 a, float3 b) + { + return new( + a.Y * b.Z - a.Z * b.Y, + a.Z * b.X - a.X * b.Z, + a.X * b.Y - a.Y * b.X); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 Multiply(float3 vector, float3x2 matrix) + { + float2 result = default; + + result.X = Dot(vector, new float3(matrix.M11, matrix.M21, matrix.M31)); + result.Y = Dot(vector, new float3(matrix.M12, matrix.M22, matrix.M32)); + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator *(float3 vector, float3x2 matrix) + { + return Multiply(vector, matrix); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Reflect(float3 vector, float3 normal) + { + return vector - 2 * Dot(vector, normal) * normal; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Transform(float3 position, float4x4 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.Z * position.Z; + result += matrix.W; + + return result.XYZ; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Transform(float3 value, floatQuat rotation) + { + return float4.Transform(value, rotation).XYZ; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 TransformNormal(float3 normal, float4x4 matrix) + { + var result = matrix.X * normal.X; + + result += matrix.Y * normal.Y; + result += matrix.Z * normal.Z; + + return result.XYZ; + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/float3/float3.numerics-binary.gen.cs new file mode 100644 index 0000000..df214dc --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.numerics-binary.gen.cs @@ -0,0 +1,54 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct float3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(float3 value) + { + return float.IsPow2(value.X) && float.IsPow2(value.Y) && float.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 IBitwiseOperators.operator &(float3 a, float3 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) & Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 IBitwiseOperators.operator |(float3 a, float3 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) | Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 IBitwiseOperators.operator ^(float3 a, float3 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) ^ Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 IBitwiseOperators.operator ~(float3 value) + { + return Unsafe.BitCast(~Unsafe.BitCast(value)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct float3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(float3 value) + { + return new bool3(float.IsPow2(value.X), float.IsPow2(value.Y), float.IsPow2(value.Z)); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.numerics-floating.gen.cs b/Brutal.Numerics/Vector/float3/float3.numerics-floating.gen.cs new file mode 100644 index 0000000..a88c75b --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.numerics-floating.gen.cs @@ -0,0 +1,446 @@ +// - edit Vector.numerics-floating.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IFloatingPointConstants +public partial struct float3 : IFloatingPointConstants +{ + /// + public static float3 E => new(float.E); + + /// + public static float3 Pi => new(float.Pi); + + /// + public static float3 Tau => new(float.Tau); +} + +// IExponentialFunctions +public partial struct float3 : IExponentialFunctions +{ + /// + /// NOTE: the vectorized float kernel is not exact at zero. + /// It returns 1 ulp above One, so Exp(Zero) does not give back One. + /// Legal under the vectorized-math accuracy contract, and the double kernel is exact. + /// Upstream: https://github.com/dotnet/runtime/issues/118841. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Exp(float3 value) + { + return new(float.Exp(value.X), float.Exp(value.Y), float.Exp(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Exp2(float3 value) + { + return new float3(float.Exp2(value.X), float.Exp2(value.Y), float.Exp2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Exp10(float3 value) + { + return new float3(float.Exp10(value.X), float.Exp10(value.Y), float.Exp10(value.Z)); + } +} + +// ILogarithmicFunctions +public partial struct float3 : ILogarithmicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Log(float3 value) + { + return new(float.Log(value.X), float.Log(value.Y), float.Log(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Log(float3 value, float3 newBase) + { + return new float3(float.Log(value.X, newBase.X), float.Log(value.Y, newBase.Y), float.Log(value.Z, newBase.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Log2(float3 value) + { + return new(float.Log2(value.X), float.Log2(value.Y), float.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Log10(float3 value) + { + return new float3(float.Log10(value.X), float.Log10(value.Y), float.Log10(value.Z)); + } +} + +// IPowerFunctions +public partial struct float3 : IPowerFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Pow(float3 value, float3 power) + { + return new float3(float.Pow(value.X, power.X), float.Pow(value.Y, power.Y), float.Pow(value.Z, power.Z)); + } +} + +// IRootFunctions +public partial struct float3 : IRootFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Cbrt(float3 value) + { + return new float3(float.Cbrt(value.X), float.Cbrt(value.Y), float.Cbrt(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Hypot(float3 a, float3 b) + { + return new(float.Hypot(a.X, b.X), float.Hypot(a.Y, b.Y), float.Hypot(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 RootN(float3 value, int n) + { + return new float3(float.RootN(value.X, n), float.RootN(value.Y, n), float.RootN(value.Z, n)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Sqrt(float3 value) + { + return new(float.Sqrt(value.X), float.Sqrt(value.Y), float.Sqrt(value.Z)); + } +} + +// ITrigonometricFunctions +public partial struct float3 : ITrigonometricFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Sin(float3 value) + { + return new(float.Sin(value.X), float.Sin(value.Y), float.Sin(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Cos(float3 value) + { + return new(float.Cos(value.X), float.Cos(value.Y), float.Cos(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (float3 Sin, float3 Cos) SinCos(float3 value) + { + var (sinX, cosX) = float.SinCos(value.X); + var (sinY, cosY) = float.SinCos(value.Y); + var (sinZ, cosZ) = float.SinCos(value.Z); + return (new(sinX, sinY, sinZ), new(cosX, cosY, cosZ)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Tan(float3 value) + { + return new float3(float.Tan(value.X), float.Tan(value.Y), float.Tan(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Asin(float3 value) + { + return new float3(float.Asin(value.X), float.Asin(value.Y), float.Asin(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Acos(float3 value) + { + return new float3(float.Acos(value.X), float.Acos(value.Y), float.Acos(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Atan(float3 value) + { + return new float3(float.Atan(value.X), float.Atan(value.Y), float.Atan(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 SinPi(float3 value) + { + return new float3(float.SinPi(value.X), float.SinPi(value.Y), float.SinPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 CosPi(float3 value) + { + return new float3(float.CosPi(value.X), float.CosPi(value.Y), float.CosPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 TanPi(float3 value) + { + return new float3(float.TanPi(value.X), float.TanPi(value.Y), float.TanPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 AsinPi(float3 value) + { + return new float3(float.AsinPi(value.X), float.AsinPi(value.Y), float.AsinPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 AcosPi(float3 value) + { + return new float3(float.AcosPi(value.X), float.AcosPi(value.Y), float.AcosPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 AtanPi(float3 value) + { + return new float3(float.AtanPi(value.X), float.AtanPi(value.Y), float.AtanPi(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (float3 SinPi, float3 CosPi) SinCosPi(float3 value) + { + return (SinPi(value), CosPi(value)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 DegreesToRadians(float3 degrees) + { + return new(float.DegreesToRadians(degrees.X), float.DegreesToRadians(degrees.Y), float.DegreesToRadians(degrees.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 RadiansToDegrees(float3 radians) + { + return new(float.RadiansToDegrees(radians.X), float.RadiansToDegrees(radians.Y), float.RadiansToDegrees(radians.Z)); + } +} + +// IHyperbolicFunctions +public partial struct float3 : IHyperbolicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Sinh(float3 value) + { + return new float3(float.Sinh(value.X), float.Sinh(value.Y), float.Sinh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Cosh(float3 value) + { + return new float3(float.Cosh(value.X), float.Cosh(value.Y), float.Cosh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Tanh(float3 value) + { + return new float3(float.Tanh(value.X), float.Tanh(value.Y), float.Tanh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Asinh(float3 value) + { + return new float3(float.Asinh(value.X), float.Asinh(value.Y), float.Asinh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Acosh(float3 value) + { + return new float3(float.Acosh(value.X), float.Acosh(value.Y), float.Acosh(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Atanh(float3 value) + { + return new float3(float.Atanh(value.X), float.Atanh(value.Y), float.Atanh(value.Z)); + } +} + +// IFloatingPoint +public partial struct float3 : IFloatingPoint +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Floor(float3 value) + { + return new(float.Floor(value.X), float.Floor(value.Y), float.Floor(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Ceiling(float3 value) + { + return new(float.Ceiling(value.X), float.Ceiling(value.Y), float.Ceiling(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Round(float3 value) + { + return new(float.Round(value.X), float.Round(value.Y), float.Round(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Truncate(float3 value) + { + return new(float.Truncate(value.X), float.Truncate(value.Y), float.Truncate(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Round(float3 value, int digits, MidpointRounding mode) + { + return new float3(float.Round(value.X, digits, mode), float.Round(value.Y, digits, mode), float.Round(value.Z, digits, mode)); + } + + // One exponent and significand PER LANE, so there is no single honest answer: explicit and throwing. + + int IFloatingPoint.GetExponentByteCount() => + throw new NotSupportedException($"{nameof(float3)} has one exponent per component."); + + int IFloatingPoint.GetExponentShortestBitLength() => + throw new NotSupportedException($"{nameof(float3)} has one exponent per component."); + + int IFloatingPoint.GetSignificandBitLength() => + throw new NotSupportedException($"{nameof(float3)} has one significand per component."); + + int IFloatingPoint.GetSignificandByteCount() => + throw new NotSupportedException($"{nameof(float3)} has one significand per component."); + + bool IFloatingPoint.TryWriteExponentBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float3)} has one exponent per component."); + + bool IFloatingPoint.TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float3)} has one exponent per component."); + + bool IFloatingPoint.TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float3)} has one significand per component."); + + bool IFloatingPoint.TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float3)} has one significand per component."); +} + +// IFloatingPointIeee754 +public partial struct float3 : IFloatingPointIeee754 +{ + /// Gets a vector whose components are NaN. + public static float3 NaN => new(float.NaN); + + /// + public static float3 Epsilon => new(float.Epsilon); + + /// + public static float3 NegativeZero => new(float.NegativeZero); + + /// + public static float3 PositiveInfinity => new(float.PositiveInfinity); + + /// + public static float3 NegativeInfinity => new(float.NegativeInfinity); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Atan2(float3 y, float3 x) + { + return new float3(float.Atan2(y.X, x.X), float.Atan2(y.Y, x.Y), float.Atan2(y.Z, x.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Atan2Pi(float3 y, float3 x) + { + return new float3(float.Atan2Pi(y.X, x.X), float.Atan2Pi(y.Y, x.Y), float.Atan2Pi(y.Z, x.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 BitDecrement(float3 value) + { + return new float3(float.BitDecrement(value.X), float.BitDecrement(value.Y), float.BitDecrement(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 BitIncrement(float3 value) + { + return new float3(float.BitIncrement(value.X), float.BitIncrement(value.Y), float.BitIncrement(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 FusedMultiplyAdd(float3 a, float3 b, float3 addend) + { + return new(float.FusedMultiplyAdd(a.X, b.X, addend.X), float.FusedMultiplyAdd(a.Y, b.Y, addend.Y), float.FusedMultiplyAdd(a.Z, b.Z, addend.Z)); + } + + /// + /// Permitted but not required to fuse; use where the single rounding is required. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MultiplyAddEstimate(float3 a, float3 b, float3 addend) + { + return new(float.MultiplyAddEstimate(a.X, b.X, addend.X), float.MultiplyAddEstimate(a.Y, b.Y, addend.Y), float.MultiplyAddEstimate(a.Z, b.Z, addend.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Ieee754Remainder(float3 a, float3 b) + { + return new float3(float.Ieee754Remainder(a.X, b.X), float.Ieee754Remainder(a.Y, b.Y), float.Ieee754Remainder(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 ScaleB(float3 value, int n) + { + return new float3(float.ScaleB(value.X, n), float.ScaleB(value.Y, n), float.ScaleB(value.Z, n)); + } + + // ILogB's int return cannot hold one exponent per lane - same shape as Sign + static int IFloatingPointIeee754.ILogB(float3 value) => + throw new NotSupportedException($"{nameof(float3)} has one exponent per component."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Lerp(float3 a, float3 b, float amount) + { + return new(float.Lerp(a.X, b.X, amount), float.Lerp(a.Y, b.Y, amount), float.Lerp(a.Z, b.Z, amount)); + } + + /// + [Obsolete("Renamed to Sqrt (the generic-math name; SquareRoot was the System.Numerics vector spelling).")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 SquareRoot(float3 value) + { + return Sqrt(value); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.numerics.gen.cs b/Brutal.Numerics/Vector/float3/float3.numerics.gen.cs new file mode 100644 index 0000000..bf072fc --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.numerics.gen.cs @@ -0,0 +1,545 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct float3 : INumberBase +{ + /// + public static float3 Zero => new(0); + + /// + public static float3 One => new(1); + + static float3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static float3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Abs(float3 value) + { + return new(float.Abs(value.X), float.Abs(value.Y), float.Abs(value.Z)); + } + + static bool INumberBase.IsCanonical(float3 value) => true; + + static bool INumberBase.IsComplexNumber(float3 value) => false; + + static bool INumberBase.IsImaginaryNumber(float3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(float3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(float3 value) + { + return float.IsEvenInteger(value.X) && float.IsEvenInteger(value.Y) && float.IsEvenInteger(value.Z); + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(float3 value) + { + return float.IsOddInteger(value.X) && float.IsOddInteger(value.Y) && float.IsOddInteger(value.Z); + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(float3 value) + { + return float.IsNegative(value.X) && float.IsNegative(value.Y) && float.IsNegative(value.Z); + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(float3 value) + { + return float.IsPositive(value.X) && float.IsPositive(value.Y) && float.IsPositive(value.Z); + } + + /// Determines if every component of a value is finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsFinite(float3 value) + { + return float.IsFinite(value.X) && float.IsFinite(value.Y) && float.IsFinite(value.Z); + } + + /// Determines if every component of a value is infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInfinity(float3 value) + { + return float.IsInfinity(value.X) && float.IsInfinity(value.Y) && float.IsInfinity(value.Z); + } + + /// Determines if every component of a value is negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegativeInfinity(float3 value) + { + return float.IsNegativeInfinity(value.X) && float.IsNegativeInfinity(value.Y) && float.IsNegativeInfinity(value.Z); + } + + /// Determines if every component of a value is positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositiveInfinity(float3 value) + { + return float.IsPositiveInfinity(value.X) && float.IsPositiveInfinity(value.Y) && float.IsPositiveInfinity(value.Z); + } + + /// Determines if every component of a value is an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInteger(float3 value) + { + return float.IsInteger(value.X) && float.IsInteger(value.Y) && float.IsInteger(value.Z); + } + + /// Determines if every component of a value is a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsRealNumber(float3 value) + { + return float.IsRealNumber(value.X) && float.IsRealNumber(value.Y) && float.IsRealNumber(value.Z); + } + + /// Determines if any component of a value is NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNaN(float3 value) + { + return float.IsNaN(value.X) || float.IsNaN(value.Y) || float.IsNaN(value.Z); + } + + /// Determines if every component of a value is normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNormal(float3 value) + { + return float.IsNormal(value.X) && float.IsNormal(value.Y) && float.IsNormal(value.Z); + } + + /// Determines if every component of a value is subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsSubnormal(float3 value) + { + return float.IsSubnormal(value.X) && float.IsSubnormal(value.Y) && float.IsSubnormal(value.Z); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MaxMagnitude(float3 a, float3 b) + { + return new(float.MaxMagnitude(a.X, b.X), float.MaxMagnitude(a.Y, b.Y), float.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is greater, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MaxMagnitudeNumber(float3 a, float3 b) + { + return new(float.MaxMagnitudeNumber(a.X, b.X), float.MaxMagnitudeNumber(a.Y, b.Y), float.MaxMagnitudeNumber(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MinMagnitude(float3 a, float3 b) + { + return new(float.MinMagnitude(a.X, b.X), float.MinMagnitude(a.Y, b.Y), float.MinMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MinMagnitudeNumber(float3 a, float3 b) + { + return new(float.MinMagnitudeNumber(a.X, b.X), float.MinMagnitudeNumber(a.Y, b.Y), float.MinMagnitudeNumber(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Add(float3 a, float3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Divide(float3 a, float3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Multiply(float3 a, float3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Negate(float3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Subtract(float3 a, float3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator +(float3 a, float3 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator -(float3 a, float3 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator *(float3 a, float3 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator /(float3 a, float3 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator -(float3 a) + { + return new(-a.X, -a.Y, -a.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator +(float3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static float3 IIncrementOperators.operator ++(float3 value) => value + One; + + static float3 IDecrementOperators.operator --(float3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out float3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(float3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out float3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(float3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out float3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(float3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct float3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Divide(float3 a, float b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Multiply(float3 a, float b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Multiply(float a, float3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator *(float3 a, float b) + { + return new(a.X * b, a.Y * b, a.Z * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator /(float3 a, float b) + { + return new(a.X / b, a.Y / b, a.Z / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator *(float a, float3 b) + { + return new(a * b.X, a * b.Y, a * b.Z); + } +} + +// INumber +public partial struct float3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Clamp(float3 value, float3 min, float3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Max(float3 a, float3 b) + { + return new(float.Max(a.X, b.X), float.Max(a.Y, b.Y), float.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Min(float3 a, float3 b) + { + return new(float.Min(a.X, b.X), float.Min(a.Y, b.Y), float.Min(a.Z, b.Z)); + } + + /// Selects, componentwise, the larger value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MaxNumber(float3 a, float3 b) + { + return new(float.MaxNumber(a.X, b.X), float.MaxNumber(a.Y, b.Y), float.MaxNumber(a.Z, b.Z)); + } + + /// Selects, componentwise, the smaller value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 MinNumber(float3 a, float3 b) + { + return new(float.MinNumber(a.X, b.X), float.MinNumber(a.Y, b.Y), float.MinNumber(a.Z, b.Z)); + } + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 CopySign(float3 value, float3 sign) + { + return new(float.CopySign(value.X, sign.X), float.CopySign(value.Y, sign.Y), float.CopySign(value.Z, sign.Z)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static float3 INumber.ClampNative(float3 value, float3 min, float3 max) => Clamp(value, min, max); + + static float3 INumber.MaxNative(float3 a, float3 b) => Max(a, b); + + static float3 INumber.MinNative(float3 a, float3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(float3 value) => + throw new NotSupportedException($"{nameof(float3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator %(float3 a, float3 b) + { + return new float3(a.X % b.X, a.Y % b.Y, a.Z % b.Z); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(float3)} has no total order."); + + int IComparable.CompareTo(float3 other) => + throw new NotSupportedException($"{nameof(float3)} has no total order."); + + static bool IComparisonOperators.operator <(float3 a, float3 b) => + throw new NotSupportedException($"{nameof(float3)} has no total order."); + + static bool IComparisonOperators.operator <=(float3 a, float3 b) => + throw new NotSupportedException($"{nameof(float3)} has no total order."); + + static bool IComparisonOperators.operator >(float3 a, float3 b) => + throw new NotSupportedException($"{nameof(float3)} has no total order."); + + static bool IComparisonOperators.operator >=(float3 a, float3 b) => + throw new NotSupportedException($"{nameof(float3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct float3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(float3 a, float3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(float3 a, float3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(float3 a, float3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(float3 a, float3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(float3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(float3 value) + { + return new bool3(float.IsEvenInteger(value.X), float.IsEvenInteger(value.Y), float.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(float3 value) + { + return new bool3(float.IsOddInteger(value.X), float.IsOddInteger(value.Y), float.IsOddInteger(value.Z)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegative(float3 value) + { + return new bool3(float.IsNegative(value.X), float.IsNegative(value.Y), float.IsNegative(value.Z)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositive(float3 value) + { + return new bool3(float.IsPositive(value.X), float.IsPositive(value.Y), float.IsPositive(value.Z)); + } + + /// Determines which components of a value are finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsFinite(float3 value) + { + return new bool3(float.IsFinite(value.X), float.IsFinite(value.Y), float.IsFinite(value.Z)); + } + + /// Determines which components of a value are infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsInfinity(float3 value) + { + return new bool3(float.IsInfinity(value.X), float.IsInfinity(value.Y), float.IsInfinity(value.Z)); + } + + /// Determines which components of a value are negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegativeInfinity(float3 value) + { + return new bool3(float.IsNegativeInfinity(value.X), float.IsNegativeInfinity(value.Y), float.IsNegativeInfinity(value.Z)); + } + + /// Determines which components of a value are positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositiveInfinity(float3 value) + { + return new bool3(float.IsPositiveInfinity(value.X), float.IsPositiveInfinity(value.Y), float.IsPositiveInfinity(value.Z)); + } + + /// Determines which components of a value are an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsInteger(float3 value) + { + return new bool3(float.IsInteger(value.X), float.IsInteger(value.Y), float.IsInteger(value.Z)); + } + + /// Determines which components of a value are a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsRealNumber(float3 value) + { + return new bool3(float.IsRealNumber(value.X), float.IsRealNumber(value.Y), float.IsRealNumber(value.Z)); + } + + /// Determines which components of a value are NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNaN(float3 value) + { + return new bool3(float.IsNaN(value.X), float.IsNaN(value.Y), float.IsNaN(value.Z)); + } + + /// Determines which components of a value are normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNormal(float3 value) + { + return new bool3(float.IsNormal(value.X), float.IsNormal(value.Y), float.IsNormal(value.Z)); + } + + /// Determines which components of a value are subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsSubnormal(float3 value) + { + return new bool3(float.IsSubnormal(value.X), float.IsSubnormal(value.Y), float.IsSubnormal(value.Z)); + } +} + +// ISignedNumber +public partial struct float3 : ISignedNumber +{ + /// + public static float3 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/float3/float3.pack.gen.cs b/Brutal.Numerics/Vector/float3/float3.pack.gen.cs new file mode 100644 index 0000000..cc3443c --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + public static float3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Unpack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Unpack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Unpack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Unpack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Unpack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float3 result, elementConverter); + return result; + } + + public static float3 Unpack(in sbyte3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.SByte.ToFloat(mode)); + } + + public static float3 Unpack(in byte3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Byte.ToFloat(mode)); + } + + public static float3 Unpack(in short3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Short.ToFloat(mode)); + } + + public static float3 Unpack(in ushort3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UShort.ToFloat(mode)); + } + + public static float3 Unpack(in int3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Int.ToFloat(mode)); + } + + public static float3 Unpack(in uint3 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UInt.ToFloat(mode)); + } + + public static float3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UInt.ToFloat(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToFloat(mode)); + } +} diff --git a/Brutal.Numerics/Vector/float3/float3.swizzle.gen.cs b/Brutal.Numerics/Vector/float3/float3.swizzle.gen.cs new file mode 100644 index 0000000..7c94e45 --- /dev/null +++ b/Brutal.Numerics/Vector/float3/float3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public float2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public float2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public float2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public float2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public float2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public float2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public float3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public float3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public float3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public float3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public float3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public float3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct float3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public float R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public float G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public float B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public float2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public float2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public float2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public float2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public float2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public float2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public float3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public float3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public float3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public float3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public float3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public float3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.color.gen.cs b/Brutal.Numerics/Vector/float4/float4.color.gen.cs new file mode 100644 index 0000000..a117613 --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.color.gen.cs @@ -0,0 +1,57 @@ +// - edit Vector.color.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + /// + /// Constructs a float4 vector representing an RGB color with full opacity (alpha = 1). + /// + /// Red component (0.0 - 1.0). + /// Green component (0.0 - 1.0). + /// Blue component (0.0 - 1.0). + /// A float4 color with the specified RGB values and alpha set to 1. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Rgb(float r, float g, float b) + { + return new float4(r, g, b, 1); + } + + /// + /// Constructs a float4 vector representing a grayscale color with full opacity (alpha = 1). + /// + /// Single value used for red, green, and blue components (0.0 - 1.0). + /// A float4 grayscale color with the specified value and alpha set to 1. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Grayscale(float v) + { + return new float4(v, v, v, 1); + } + + /// + /// Constructs a float4 vector representing an RGBA color. + /// + /// Red component (0.0 - 1.0). + /// Green component (0.0 - 1.0). + /// Blue component (0.0 - 1.0). + /// Alpha component (0.0 - 1.0). + /// A float4 color with the specified RGBA values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Rgba(float r, float g, float b, float a) + { + return new float4(r, g, b, a); + } + + /// + /// Constructs a float4 vector representing a grayscale color with a specified alpha value. + /// + /// Single value used for red, green, and blue components (0.0 - 1.0). + /// Alpha component (0.0 - 1.0). + /// A float4 grayscale color with the specified value and alpha. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Grayscale(float v, float a) + { + return new float4(v, v, v, a); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.copy.gen.cs b/Brutal.Numerics/Vector/float4/float4.copy.gen.cs new file mode 100644 index 0000000..c96a459 --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.equality.gen.cs b/Brutal.Numerics/Vector/float4/float4.equality.gen.cs new file mode 100644 index 0000000..7b231be --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(float4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is float4 other && Equals(other); + } + + /// IEEE lane-wise equality over every component: any NaN component makes this false (contrast , which is NaN-reflexive), and -0 equals +0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(float4 a, float4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(float4 a, float4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.format.gen.cs b/Brutal.Numerics/Vector/float4/float4.format.gen.cs new file mode 100644 index 0000000..c810571 --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static float4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Float, provider); + } + + /// + public static float4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Float, provider); + } + + /// + public static float4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static float4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid float4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out float4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out float4 result) + { + return TryParse(s, NumberStyles.Float, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out float4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a float4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out float4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.gen.cs b/Brutal.Numerics/Vector/float4/float4.gen.cs new file mode 100644 index 0000000..87d4ec4 --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.gen.cs @@ -0,0 +1,148 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with float components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct float4 : IVector4 + , IFloatingVector + , IFloatingVector4 +{ + /// + public static int ComponentSize => sizeof(float); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public float X; + + /// + [XmlAttribute] + public float Y; + + /// + [XmlAttribute] + public float Z; + + /// + [XmlAttribute] + public float W; + + float IVector4.X { readonly get => X; set => X = value; } + + float IVector4.Y { readonly get => Y; set => Y = value; } + + float IVector4.Z { readonly get => Z; set => Z = value; } + + float IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float x, float y, float z, float w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float3 xyz, float w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float2 xy, float2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float2 xy, float z, float w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static float4 UnitX => new(1, 0, 0, 0); + + /// + public static float4 UnitY => new(0, 1, 0, 0); + + /// + public static float4 UnitZ => new(0, 0, 1, 0); + + /// + public static float4 UnitW => new(0, 0, 0, 1); + + /// + public float this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out float x, out float y, out float z, out float w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.math-metric.gen.cs b/Brutal.Numerics/Vector/float4/float4.math-metric.gen.cs new file mode 100644 index 0000000..b33dd7a --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.math-metric.gen.cs @@ -0,0 +1,62 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return float.Sqrt(LengthSquared()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(float4 a, float4 b) + { + return float.Sqrt(DistanceSquared(a, b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float DistanceSquared(float4 a, float4 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Dot(float4 a, float4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } + + /// + /// Thrown when the input vector is a zero vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Normalize(float4 value) + { + var lengthSquared = Dot(value, value); + if (lengthSquared == 0) + throw new DivideByZeroException(); + return value / float.Sqrt(lengthSquared); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 NormalizeOrZero(float4 value) + { + var length = float.Sqrt(Dot(value, value)); + return length == 0 ? Zero : value / length; + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.math.gen.cs b/Brutal.Numerics/Vector/float4/float4.math.gen.cs new file mode 100644 index 0000000..5ebc1bc --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.math.gen.cs @@ -0,0 +1,93 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Multiply(float4 vector, float4x4 matrix) + { + var result = matrix.X * vector.X; + + result += matrix.Y * vector.Y; + result += matrix.Z * vector.Z; + result += matrix.W * vector.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator *(float4 vector, float4x4 matrix) + { + return Multiply(vector, matrix); + } + + /// Reflects a vector off the hyperplane with the given unit normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Reflect(float4 vector, float4 normal) + { + return vector - 2 * Dot(vector, normal) * normal; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Transform(float2 position, float4x4 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Transform(float2 value, floatQuat rotation) + { + // widen in a register: x, y, 0, 1 + var wide = Unsafe.BitCast, float4>(Vector128.Create(value.X, value.Y, 0.0f, 1.0f)); + return Transform(wide, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Transform(float3 position, float4x4 matrix) + { + var result = matrix.X * position.X; + + result += matrix.Y * position.Y; + result += matrix.Z * position.Z; + result += matrix.W; + + return result; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Transform(float3 value, floatQuat rotation) + { + // widen in a register: x, y, z, 1 + var wide = Unsafe.BitCast, float4>(Vector128.Create(value.X, value.Y, value.Z, 1.0f)); + return Transform(wide, rotation); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Transform(float4 vector, float4x4 matrix) + { + return Multiply(vector, matrix); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Transform(float4 value, floatQuat rotation) + { + var conjugate = floatQuat.Conjugate(rotation); + var temp = floatQuat.Concatenate(conjugate, Unsafe.BitCast(value)); + return Unsafe.BitCast(floatQuat.Concatenate(temp, rotation)); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/float4/float4.numerics-binary.gen.cs new file mode 100644 index 0000000..903eeff --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.numerics-binary.gen.cs @@ -0,0 +1,54 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct float4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(float4 value) + { + return float.IsPow2(value.X) && float.IsPow2(value.Y) && float.IsPow2(value.Z) && float.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float4 IBitwiseOperators.operator &(float4 a, float4 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) & Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float4 IBitwiseOperators.operator |(float4 a, float4 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) | Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float4 IBitwiseOperators.operator ^(float4 a, float4 b) + { + return Unsafe.BitCast(Unsafe.BitCast(a) ^ Unsafe.BitCast(b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float4 IBitwiseOperators.operator ~(float4 value) + { + return Unsafe.BitCast(~Unsafe.BitCast(value)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct float4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(float4 value) + { + return new bool4(float.IsPow2(value.X), float.IsPow2(value.Y), float.IsPow2(value.Z), float.IsPow2(value.W)); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.numerics-floating.gen.cs b/Brutal.Numerics/Vector/float4/float4.numerics-floating.gen.cs new file mode 100644 index 0000000..d1242c8 --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.numerics-floating.gen.cs @@ -0,0 +1,447 @@ +// - edit Vector.numerics-floating.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IFloatingPointConstants +public partial struct float4 : IFloatingPointConstants +{ + /// + public static float4 E => new(float.E); + + /// + public static float4 Pi => new(float.Pi); + + /// + public static float4 Tau => new(float.Tau); +} + +// IExponentialFunctions +public partial struct float4 : IExponentialFunctions +{ + /// + /// NOTE: the vectorized float kernel is not exact at zero. + /// It returns 1 ulp above One, so Exp(Zero) does not give back One. + /// Legal under the vectorized-math accuracy contract, and the double kernel is exact. + /// Upstream: https://github.com/dotnet/runtime/issues/118841. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Exp(float4 value) + { + return new(float.Exp(value.X), float.Exp(value.Y), float.Exp(value.Z), float.Exp(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Exp2(float4 value) + { + return new float4(float.Exp2(value.X), float.Exp2(value.Y), float.Exp2(value.Z), float.Exp2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Exp10(float4 value) + { + return new float4(float.Exp10(value.X), float.Exp10(value.Y), float.Exp10(value.Z), float.Exp10(value.W)); + } +} + +// ILogarithmicFunctions +public partial struct float4 : ILogarithmicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Log(float4 value) + { + return new(float.Log(value.X), float.Log(value.Y), float.Log(value.Z), float.Log(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Log(float4 value, float4 newBase) + { + return new float4(float.Log(value.X, newBase.X), float.Log(value.Y, newBase.Y), float.Log(value.Z, newBase.Z), float.Log(value.W, newBase.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Log2(float4 value) + { + return new(float.Log2(value.X), float.Log2(value.Y), float.Log2(value.Z), float.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Log10(float4 value) + { + return new float4(float.Log10(value.X), float.Log10(value.Y), float.Log10(value.Z), float.Log10(value.W)); + } +} + +// IPowerFunctions +public partial struct float4 : IPowerFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Pow(float4 value, float4 power) + { + return new float4(float.Pow(value.X, power.X), float.Pow(value.Y, power.Y), float.Pow(value.Z, power.Z), float.Pow(value.W, power.W)); + } +} + +// IRootFunctions +public partial struct float4 : IRootFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Cbrt(float4 value) + { + return new float4(float.Cbrt(value.X), float.Cbrt(value.Y), float.Cbrt(value.Z), float.Cbrt(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Hypot(float4 a, float4 b) + { + return new(float.Hypot(a.X, b.X), float.Hypot(a.Y, b.Y), float.Hypot(a.Z, b.Z), float.Hypot(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 RootN(float4 value, int n) + { + return new float4(float.RootN(value.X, n), float.RootN(value.Y, n), float.RootN(value.Z, n), float.RootN(value.W, n)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Sqrt(float4 value) + { + return new(float.Sqrt(value.X), float.Sqrt(value.Y), float.Sqrt(value.Z), float.Sqrt(value.W)); + } +} + +// ITrigonometricFunctions +public partial struct float4 : ITrigonometricFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Sin(float4 value) + { + return new(float.Sin(value.X), float.Sin(value.Y), float.Sin(value.Z), float.Sin(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Cos(float4 value) + { + return new(float.Cos(value.X), float.Cos(value.Y), float.Cos(value.Z), float.Cos(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (float4 Sin, float4 Cos) SinCos(float4 value) + { + var (sinX, cosX) = float.SinCos(value.X); + var (sinY, cosY) = float.SinCos(value.Y); + var (sinZ, cosZ) = float.SinCos(value.Z); + var (sinW, cosW) = float.SinCos(value.W); + return (new(sinX, sinY, sinZ, sinW), new(cosX, cosY, cosZ, cosW)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Tan(float4 value) + { + return new float4(float.Tan(value.X), float.Tan(value.Y), float.Tan(value.Z), float.Tan(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Asin(float4 value) + { + return new float4(float.Asin(value.X), float.Asin(value.Y), float.Asin(value.Z), float.Asin(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Acos(float4 value) + { + return new float4(float.Acos(value.X), float.Acos(value.Y), float.Acos(value.Z), float.Acos(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Atan(float4 value) + { + return new float4(float.Atan(value.X), float.Atan(value.Y), float.Atan(value.Z), float.Atan(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 SinPi(float4 value) + { + return new float4(float.SinPi(value.X), float.SinPi(value.Y), float.SinPi(value.Z), float.SinPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 CosPi(float4 value) + { + return new float4(float.CosPi(value.X), float.CosPi(value.Y), float.CosPi(value.Z), float.CosPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 TanPi(float4 value) + { + return new float4(float.TanPi(value.X), float.TanPi(value.Y), float.TanPi(value.Z), float.TanPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 AsinPi(float4 value) + { + return new float4(float.AsinPi(value.X), float.AsinPi(value.Y), float.AsinPi(value.Z), float.AsinPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 AcosPi(float4 value) + { + return new float4(float.AcosPi(value.X), float.AcosPi(value.Y), float.AcosPi(value.Z), float.AcosPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 AtanPi(float4 value) + { + return new float4(float.AtanPi(value.X), float.AtanPi(value.Y), float.AtanPi(value.Z), float.AtanPi(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static (float4 SinPi, float4 CosPi) SinCosPi(float4 value) + { + return (SinPi(value), CosPi(value)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 DegreesToRadians(float4 degrees) + { + return new(float.DegreesToRadians(degrees.X), float.DegreesToRadians(degrees.Y), float.DegreesToRadians(degrees.Z), float.DegreesToRadians(degrees.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 RadiansToDegrees(float4 radians) + { + return new(float.RadiansToDegrees(radians.X), float.RadiansToDegrees(radians.Y), float.RadiansToDegrees(radians.Z), float.RadiansToDegrees(radians.W)); + } +} + +// IHyperbolicFunctions +public partial struct float4 : IHyperbolicFunctions +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Sinh(float4 value) + { + return new float4(float.Sinh(value.X), float.Sinh(value.Y), float.Sinh(value.Z), float.Sinh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Cosh(float4 value) + { + return new float4(float.Cosh(value.X), float.Cosh(value.Y), float.Cosh(value.Z), float.Cosh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Tanh(float4 value) + { + return new float4(float.Tanh(value.X), float.Tanh(value.Y), float.Tanh(value.Z), float.Tanh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Asinh(float4 value) + { + return new float4(float.Asinh(value.X), float.Asinh(value.Y), float.Asinh(value.Z), float.Asinh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Acosh(float4 value) + { + return new float4(float.Acosh(value.X), float.Acosh(value.Y), float.Acosh(value.Z), float.Acosh(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Atanh(float4 value) + { + return new float4(float.Atanh(value.X), float.Atanh(value.Y), float.Atanh(value.Z), float.Atanh(value.W)); + } +} + +// IFloatingPoint +public partial struct float4 : IFloatingPoint +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Floor(float4 value) + { + return new(float.Floor(value.X), float.Floor(value.Y), float.Floor(value.Z), float.Floor(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Ceiling(float4 value) + { + return new(float.Ceiling(value.X), float.Ceiling(value.Y), float.Ceiling(value.Z), float.Ceiling(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Round(float4 value) + { + return new(float.Round(value.X), float.Round(value.Y), float.Round(value.Z), float.Round(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Truncate(float4 value) + { + return new(float.Truncate(value.X), float.Truncate(value.Y), float.Truncate(value.Z), float.Truncate(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Round(float4 value, int digits, MidpointRounding mode) + { + return new float4(float.Round(value.X, digits, mode), float.Round(value.Y, digits, mode), float.Round(value.Z, digits, mode), float.Round(value.W, digits, mode)); + } + + // One exponent and significand PER LANE, so there is no single honest answer: explicit and throwing. + + int IFloatingPoint.GetExponentByteCount() => + throw new NotSupportedException($"{nameof(float4)} has one exponent per component."); + + int IFloatingPoint.GetExponentShortestBitLength() => + throw new NotSupportedException($"{nameof(float4)} has one exponent per component."); + + int IFloatingPoint.GetSignificandBitLength() => + throw new NotSupportedException($"{nameof(float4)} has one significand per component."); + + int IFloatingPoint.GetSignificandByteCount() => + throw new NotSupportedException($"{nameof(float4)} has one significand per component."); + + bool IFloatingPoint.TryWriteExponentBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float4)} has one exponent per component."); + + bool IFloatingPoint.TryWriteExponentLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float4)} has one exponent per component."); + + bool IFloatingPoint.TryWriteSignificandBigEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float4)} has one significand per component."); + + bool IFloatingPoint.TryWriteSignificandLittleEndian(Span destination, out int bytesWritten) => + throw new NotSupportedException($"{nameof(float4)} has one significand per component."); +} + +// IFloatingPointIeee754 +public partial struct float4 : IFloatingPointIeee754 +{ + /// Gets a vector whose components are NaN. + public static float4 NaN => new(float.NaN); + + /// + public static float4 Epsilon => new(float.Epsilon); + + /// + public static float4 NegativeZero => new(float.NegativeZero); + + /// + public static float4 PositiveInfinity => new(float.PositiveInfinity); + + /// + public static float4 NegativeInfinity => new(float.NegativeInfinity); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Atan2(float4 y, float4 x) + { + return new float4(float.Atan2(y.X, x.X), float.Atan2(y.Y, x.Y), float.Atan2(y.Z, x.Z), float.Atan2(y.W, x.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Atan2Pi(float4 y, float4 x) + { + return new float4(float.Atan2Pi(y.X, x.X), float.Atan2Pi(y.Y, x.Y), float.Atan2Pi(y.Z, x.Z), float.Atan2Pi(y.W, x.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 BitDecrement(float4 value) + { + return new float4(float.BitDecrement(value.X), float.BitDecrement(value.Y), float.BitDecrement(value.Z), float.BitDecrement(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 BitIncrement(float4 value) + { + return new float4(float.BitIncrement(value.X), float.BitIncrement(value.Y), float.BitIncrement(value.Z), float.BitIncrement(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 FusedMultiplyAdd(float4 a, float4 b, float4 addend) + { + return new(float.FusedMultiplyAdd(a.X, b.X, addend.X), float.FusedMultiplyAdd(a.Y, b.Y, addend.Y), float.FusedMultiplyAdd(a.Z, b.Z, addend.Z), float.FusedMultiplyAdd(a.W, b.W, addend.W)); + } + + /// + /// Permitted but not required to fuse; use where the single rounding is required. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MultiplyAddEstimate(float4 a, float4 b, float4 addend) + { + return new(float.MultiplyAddEstimate(a.X, b.X, addend.X), float.MultiplyAddEstimate(a.Y, b.Y, addend.Y), float.MultiplyAddEstimate(a.Z, b.Z, addend.Z), float.MultiplyAddEstimate(a.W, b.W, addend.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Ieee754Remainder(float4 a, float4 b) + { + return new float4(float.Ieee754Remainder(a.X, b.X), float.Ieee754Remainder(a.Y, b.Y), float.Ieee754Remainder(a.Z, b.Z), float.Ieee754Remainder(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 ScaleB(float4 value, int n) + { + return new float4(float.ScaleB(value.X, n), float.ScaleB(value.Y, n), float.ScaleB(value.Z, n), float.ScaleB(value.W, n)); + } + + // ILogB's int return cannot hold one exponent per lane - same shape as Sign + static int IFloatingPointIeee754.ILogB(float4 value) => + throw new NotSupportedException($"{nameof(float4)} has one exponent per component."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Lerp(float4 a, float4 b, float amount) + { + return new(float.Lerp(a.X, b.X, amount), float.Lerp(a.Y, b.Y, amount), float.Lerp(a.Z, b.Z, amount), float.Lerp(a.W, b.W, amount)); + } + + /// + [Obsolete("Renamed to Sqrt (the generic-math name; SquareRoot was the System.Numerics vector spelling).")] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 SquareRoot(float4 value) + { + return Sqrt(value); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.numerics.gen.cs b/Brutal.Numerics/Vector/float4/float4.numerics.gen.cs new file mode 100644 index 0000000..6c9508d --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.numerics.gen.cs @@ -0,0 +1,545 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct float4 : INumberBase +{ + /// + public static float4 Zero => new(0); + + /// + public static float4 One => new(1); + + static float4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static float4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Abs(float4 value) + { + return new(float.Abs(value.X), float.Abs(value.Y), float.Abs(value.Z), float.Abs(value.W)); + } + + static bool INumberBase.IsCanonical(float4 value) => true; + + static bool INumberBase.IsComplexNumber(float4 value) => false; + + static bool INumberBase.IsImaginaryNumber(float4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(float4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(float4 value) + { + return float.IsEvenInteger(value.X) && float.IsEvenInteger(value.Y) && float.IsEvenInteger(value.Z) && float.IsEvenInteger(value.W); + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(float4 value) + { + return float.IsOddInteger(value.X) && float.IsOddInteger(value.Y) && float.IsOddInteger(value.Z) && float.IsOddInteger(value.W); + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(float4 value) + { + return float.IsNegative(value.X) && float.IsNegative(value.Y) && float.IsNegative(value.Z) && float.IsNegative(value.W); + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(float4 value) + { + return float.IsPositive(value.X) && float.IsPositive(value.Y) && float.IsPositive(value.Z) && float.IsPositive(value.W); + } + + /// Determines if every component of a value is finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsFinite(float4 value) + { + return float.IsFinite(value.X) && float.IsFinite(value.Y) && float.IsFinite(value.Z) && float.IsFinite(value.W); + } + + /// Determines if every component of a value is infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInfinity(float4 value) + { + return float.IsInfinity(value.X) && float.IsInfinity(value.Y) && float.IsInfinity(value.Z) && float.IsInfinity(value.W); + } + + /// Determines if every component of a value is negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegativeInfinity(float4 value) + { + return float.IsNegativeInfinity(value.X) && float.IsNegativeInfinity(value.Y) && float.IsNegativeInfinity(value.Z) && float.IsNegativeInfinity(value.W); + } + + /// Determines if every component of a value is positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositiveInfinity(float4 value) + { + return float.IsPositiveInfinity(value.X) && float.IsPositiveInfinity(value.Y) && float.IsPositiveInfinity(value.Z) && float.IsPositiveInfinity(value.W); + } + + /// Determines if every component of a value is an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsInteger(float4 value) + { + return float.IsInteger(value.X) && float.IsInteger(value.Y) && float.IsInteger(value.Z) && float.IsInteger(value.W); + } + + /// Determines if every component of a value is a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsRealNumber(float4 value) + { + return float.IsRealNumber(value.X) && float.IsRealNumber(value.Y) && float.IsRealNumber(value.Z) && float.IsRealNumber(value.W); + } + + /// Determines if any component of a value is NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNaN(float4 value) + { + return float.IsNaN(value.X) || float.IsNaN(value.Y) || float.IsNaN(value.Z) || float.IsNaN(value.W); + } + + /// Determines if every component of a value is normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNormal(float4 value) + { + return float.IsNormal(value.X) && float.IsNormal(value.Y) && float.IsNormal(value.Z) && float.IsNormal(value.W); + } + + /// Determines if every component of a value is subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsSubnormal(float4 value) + { + return float.IsSubnormal(value.X) && float.IsSubnormal(value.Y) && float.IsSubnormal(value.Z) && float.IsSubnormal(value.W); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MaxMagnitude(float4 a, float4 b) + { + return new(float.MaxMagnitude(a.X, b.X), float.MaxMagnitude(a.Y, b.Y), float.MaxMagnitude(a.Z, b.Z), float.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is greater, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MaxMagnitudeNumber(float4 a, float4 b) + { + return new(float.MaxMagnitudeNumber(a.X, b.X), float.MaxMagnitudeNumber(a.Y, b.Y), float.MaxMagnitudeNumber(a.Z, b.Z), float.MaxMagnitudeNumber(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MinMagnitude(float4 a, float4 b) + { + return new(float.MinMagnitude(a.X, b.X), float.MinMagnitude(a.Y, b.Y), float.MinMagnitude(a.Z, b.Z), float.MinMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MinMagnitudeNumber(float4 a, float4 b) + { + return new(float.MinMagnitudeNumber(a.X, b.X), float.MinMagnitudeNumber(a.Y, b.Y), float.MinMagnitudeNumber(a.Z, b.Z), float.MinMagnitudeNumber(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Add(float4 a, float4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Divide(float4 a, float4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Multiply(float4 a, float4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Negate(float4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Subtract(float4 a, float4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator +(float4 a, float4 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator -(float4 a, float4 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator *(float4 a, float4 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z, a.W * b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator /(float4 a, float4 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z, a.W / b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator -(float4 a) + { + return new(-a.X, -a.Y, -a.Z, -a.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator +(float4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static float4 IIncrementOperators.operator ++(float4 value) => value + One; + + static float4 IDecrementOperators.operator --(float4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out float4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(float4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out float4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(float4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out float4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(float4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct float4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Divide(float4 a, float b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Multiply(float4 a, float b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Multiply(float a, float4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator *(float4 a, float b) + { + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator /(float4 a, float b) + { + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator *(float a, float4 b) + { + return new(a * b.X, a * b.Y, a * b.Z, a * b.W); + } +} + +// INumber +public partial struct float4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Clamp(float4 value, float4 min, float4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Max(float4 a, float4 b) + { + return new(float.Max(a.X, b.X), float.Max(a.Y, b.Y), float.Max(a.Z, b.Z), float.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 Min(float4 a, float4 b) + { + return new(float.Min(a.X, b.X), float.Min(a.Y, b.Y), float.Min(a.Z, b.Z), float.Min(a.W, b.W)); + } + + /// Selects, componentwise, the larger value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MaxNumber(float4 a, float4 b) + { + return new(float.MaxNumber(a.X, b.X), float.MaxNumber(a.Y, b.Y), float.MaxNumber(a.Z, b.Z), float.MaxNumber(a.W, b.W)); + } + + /// Selects, componentwise, the smaller value, preferring numbers over NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 MinNumber(float4 a, float4 b) + { + return new(float.MinNumber(a.X, b.X), float.MinNumber(a.Y, b.Y), float.MinNumber(a.Z, b.Z), float.MinNumber(a.W, b.W)); + } + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 CopySign(float4 value, float4 sign) + { + return new(float.CopySign(value.X, sign.X), float.CopySign(value.Y, sign.Y), float.CopySign(value.Z, sign.Z), float.CopySign(value.W, sign.W)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static float4 INumber.ClampNative(float4 value, float4 min, float4 max) => Clamp(value, min, max); + + static float4 INumber.MaxNative(float4 a, float4 b) => Max(a, b); + + static float4 INumber.MinNative(float4 a, float4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(float4 value) => + throw new NotSupportedException($"{nameof(float4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator %(float4 a, float4 b) + { + return new float4(a.X % b.X, a.Y % b.Y, a.Z % b.Z, a.W % b.W); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(float4)} has no total order."); + + int IComparable.CompareTo(float4 other) => + throw new NotSupportedException($"{nameof(float4)} has no total order."); + + static bool IComparisonOperators.operator <(float4 a, float4 b) => + throw new NotSupportedException($"{nameof(float4)} has no total order."); + + static bool IComparisonOperators.operator <=(float4 a, float4 b) => + throw new NotSupportedException($"{nameof(float4)} has no total order."); + + static bool IComparisonOperators.operator >(float4 a, float4 b) => + throw new NotSupportedException($"{nameof(float4)} has no total order."); + + static bool IComparisonOperators.operator >=(float4 a, float4 b) => + throw new NotSupportedException($"{nameof(float4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct float4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(float4 a, float4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(float4 a, float4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(float4 a, float4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(float4 a, float4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(float4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(float4 value) + { + return new bool4(float.IsEvenInteger(value.X), float.IsEvenInteger(value.Y), float.IsEvenInteger(value.Z), float.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(float4 value) + { + return new bool4(float.IsOddInteger(value.X), float.IsOddInteger(value.Y), float.IsOddInteger(value.Z), float.IsOddInteger(value.W)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegative(float4 value) + { + return new bool4(float.IsNegative(value.X), float.IsNegative(value.Y), float.IsNegative(value.Z), float.IsNegative(value.W)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositive(float4 value) + { + return new bool4(float.IsPositive(value.X), float.IsPositive(value.Y), float.IsPositive(value.Z), float.IsPositive(value.W)); + } + + /// Determines which components of a value are finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsFinite(float4 value) + { + return new bool4(float.IsFinite(value.X), float.IsFinite(value.Y), float.IsFinite(value.Z), float.IsFinite(value.W)); + } + + /// Determines which components of a value are infinite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsInfinity(float4 value) + { + return new bool4(float.IsInfinity(value.X), float.IsInfinity(value.Y), float.IsInfinity(value.Z), float.IsInfinity(value.W)); + } + + /// Determines which components of a value are negative infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegativeInfinity(float4 value) + { + return new bool4(float.IsNegativeInfinity(value.X), float.IsNegativeInfinity(value.Y), float.IsNegativeInfinity(value.Z), float.IsNegativeInfinity(value.W)); + } + + /// Determines which components of a value are positive infinity. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositiveInfinity(float4 value) + { + return new bool4(float.IsPositiveInfinity(value.X), float.IsPositiveInfinity(value.Y), float.IsPositiveInfinity(value.Z), float.IsPositiveInfinity(value.W)); + } + + /// Determines which components of a value are an integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsInteger(float4 value) + { + return new bool4(float.IsInteger(value.X), float.IsInteger(value.Y), float.IsInteger(value.Z), float.IsInteger(value.W)); + } + + /// Determines which components of a value are a real value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsRealNumber(float4 value) + { + return new bool4(float.IsRealNumber(value.X), float.IsRealNumber(value.Y), float.IsRealNumber(value.Z), float.IsRealNumber(value.W)); + } + + /// Determines which components of a value are NaN. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNaN(float4 value) + { + return new bool4(float.IsNaN(value.X), float.IsNaN(value.Y), float.IsNaN(value.Z), float.IsNaN(value.W)); + } + + /// Determines which components of a value are normal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNormal(float4 value) + { + return new bool4(float.IsNormal(value.X), float.IsNormal(value.Y), float.IsNormal(value.Z), float.IsNormal(value.W)); + } + + /// Determines which components of a value are subnormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsSubnormal(float4 value) + { + return new bool4(float.IsSubnormal(value.X), float.IsSubnormal(value.Y), float.IsSubnormal(value.Z), float.IsSubnormal(value.W)); + } +} + +// ISignedNumber +public partial struct float4 : ISignedNumber +{ + /// + public static float4 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/float4/float4.pack.gen.cs b/Brutal.Numerics/Vector/float4/float4.pack.gen.cs new file mode 100644 index 0000000..582aae1 --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + public static float4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Unpack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Unpack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Unpack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Unpack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Unpack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out float4 result, elementConverter); + return result; + } + + public static float4 Unpack(in sbyte4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.SByte.ToFloat(mode)); + } + + public static float4 Unpack(in byte4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Byte.ToFloat(mode)); + } + + public static float4 Unpack(in short4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Short.ToFloat(mode)); + } + + public static float4 Unpack(in ushort4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UShort.ToFloat(mode)); + } + + public static float4 Unpack(in int4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.Int.ToFloat(mode)); + } + + public static float4 Unpack(in uint4 vector, Unpack.Float mode = Numerics.Unpack.Float.Cast) + { + return Unpack(vector, PackUtils.UInt.ToFloat(mode)); + } + + public static float4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToFloat(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Float mode = Numerics.Unpack.Float.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UInt.ToFloat(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToFloat(mode)); + } +} diff --git a/Brutal.Numerics/Vector/float4/float4.swizzle.gen.cs b/Brutal.Numerics/Vector/float4/float4.swizzle.gen.cs new file mode 100644 index 0000000..ddacded --- /dev/null +++ b/Brutal.Numerics/Vector/float4/float4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct float4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public float2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public float2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public float2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public float2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public float2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public float2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public float2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public float2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public float2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public float2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public float2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public float2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public float3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public float3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public float3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public float3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public float3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public float3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public float3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public float3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public float3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public float3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public float3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public float3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public float3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public float3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public float3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public float3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public float3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public float3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public float3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public float3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public float3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public float3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public float3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public float3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public float4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public float4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public float4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public float4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public float4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public float4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public float4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public float4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public float4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public float4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public float4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public float4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public float4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public float4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public float4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public float4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public float4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public float4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public float4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public float4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public float4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public float4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public float4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct float4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public float R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public float G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public float B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public float A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public float2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public float2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public float2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public float2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public float2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public float2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public float2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public float2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public float2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public float2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public float2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public float2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public float3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public float3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public float3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public float3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public float3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public float3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public float3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public float3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public float3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public float3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public float3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public float3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public float3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public float3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public float3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public float3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public float3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public float3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public float3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public float3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public float3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public float3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public float3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public float3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public float4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public float4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public float4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public float4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public float4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public float4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public float4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public float4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public float4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public float4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public float4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public float4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public float4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public float4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public float4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public float4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public float4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public float4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public float4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public float4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public float4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public float4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public float4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public float4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.copy.gen.cs b/Brutal.Numerics/Vector/int2/int2.copy.gen.cs new file mode 100644 index 0000000..39d5b8a --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.equality.gen.cs b/Brutal.Numerics/Vector/int2/int2.equality.gen.cs new file mode 100644 index 0000000..28da073 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(int2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is int2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(int2 a, int2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(int2 a, int2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.format.gen.cs b/Brutal.Numerics/Vector/int2/int2.format.gen.cs new file mode 100644 index 0000000..2478d44 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static int2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static int2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static int2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static int2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid int2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out int2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out int2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out int2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a int2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out int2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.gen.cs b/Brutal.Numerics/Vector/int2/int2.gen.cs new file mode 100644 index 0000000..e1c063b --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with int components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct int2 : IVector2 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(int); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public int X; + + /// + [XmlAttribute] + public int Y; + + int IVector2.X { readonly get => X; set => X = value; } + + int IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(int x, int y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(int xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static int2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static int2 UnitX => new(1, 0); + + /// + public static int2 UnitY => new(0, 1); + + /// + public int this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out int x, out int y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.math-metric.gen.cs b/Brutal.Numerics/Vector/int2/int2.math-metric.gen.cs new file mode 100644 index 0000000..36ef7d6 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.math-metric.gen.cs @@ -0,0 +1,43 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(int2 a, int2 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(int2 a, int2 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(int2 a, int2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/int2/int2.numerics-binary.gen.cs new file mode 100644 index 0000000..855aae7 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct int2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(int2 value) + { + return int.IsPow2(value.X) && int.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Log2(int2 value) + { + return new int2(int.Log2(value.X), int.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator &(int2 a, int2 b) + { + return new(a.X & b.X, a.Y & b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator |(int2 a, int2 b) + { + return new(a.X | b.X, a.Y | b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ^(int2 a, int2 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ~(int2 value) + { + return new(~value.X, ~value.Y); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct int2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(int2 value) + { + return new bool2(int.IsPow2(value.X), int.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct int2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 PopCount(int2 value) + { + return new int2(int.PopCount(value.X), int.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 LeadingZeroCount(int2 value) + { + return new int2(int.LeadingZeroCount(value.X), int.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 TrailingZeroCount(int2 value) + { + return new int2(int.TrailingZeroCount(value.X), int.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 RotateLeft(int2 value, int rotateAmount) + { + return new int2(int.RotateLeft(value.X, rotateAmount), int.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 RotateRight(int2 value, int rotateAmount) + { + return new int2(int.RotateRight(value.X, rotateAmount), int.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.numerics.gen.cs b/Brutal.Numerics/Vector/int2/int2.numerics.gen.cs new file mode 100644 index 0000000..2640a06 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct int2 : INumberBase +{ + /// + public static int2 Zero => new(0); + + /// + public static int2 One => new(1); + + static int2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static int2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Abs(int2 value) + { + return new int2(WrappingAbs(value.X), WrappingAbs(value.Y)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static int WrappingAbs(int value) => + unchecked(value < 0 ? -value : value); + + static bool INumberBase.IsCanonical(int2 value) => true; + + static bool INumberBase.IsComplexNumber(int2 value) => false; + + static bool INumberBase.IsImaginaryNumber(int2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(int2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(int2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(int2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(int2 value) + { + return value.X < 0 && value.Y < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(int2 value) + { + return value.X >= 0 && value.Y >= 0; + } + + static bool INumberBase.IsFinite(int2 value) => true; + + static bool INumberBase.IsInfinity(int2 value) => false; + + static bool INumberBase.IsNegativeInfinity(int2 value) => false; + + static bool INumberBase.IsPositiveInfinity(int2 value) => false; + + static bool INumberBase.IsInteger(int2 value) => true; + + static bool INumberBase.IsRealNumber(int2 value) => true; + + static bool INumberBase.IsNaN(int2 value) => false; + + static bool INumberBase.IsNormal(int2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(int2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 MaxMagnitude(int2 a, int2 b) + { + return new int2(int.MaxMagnitude(a.X, b.X), int.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 MaxMagnitudeNumber(int2 a, int2 b) + { + return new int2(int.MaxMagnitude(a.X, b.X), int.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 MinMagnitude(int2 a, int2 b) + { + return new int2(int.MinMagnitude(a.X, b.X), int.MinMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 MinMagnitudeNumber(int2 a, int2 b) + { + return new int2(int.MinMagnitude(a.X, b.X), int.MinMagnitude(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Add(int2 a, int2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Divide(int2 a, int2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Multiply(int2 a, int2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Negate(int2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Subtract(int2 a, int2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator +(int2 a, int2 b) + { + return new(a.X + b.X, a.Y + b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator -(int2 a, int2 b) + { + return new(a.X - b.X, a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator *(int2 a, int2 b) + { + return new(a.X * b.X, a.Y * b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator /(int2 a, int2 b) + { + return new(a.X / b.X, a.Y / b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator -(int2 a) + { + return new(-a.X, -a.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator +(int2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static int2 IIncrementOperators.operator ++(int2 value) => value + One; + + static int2 IDecrementOperators.operator --(int2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out int2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(int2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out int2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(int2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out int2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(int2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct int2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Divide(int2 a, int b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Multiply(int2 a, int b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Multiply(int a, int2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator *(int2 a, int b) + { + return new(a.X * b, a.Y * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator /(int2 a, int b) + { + return new(a.X / b, a.Y / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator *(int a, int2 b) + { + return new(a * b.X, a * b.Y); + } +} + +// INumber +public partial struct int2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Clamp(int2 value, int2 min, int2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Max(int2 a, int2 b) + { + return new(int.Max(a.X, b.X), int.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 Min(int2 a, int2 b) + { + return new(int.Min(a.X, b.X), int.Min(a.Y, b.Y)); + } + + static int2 INumber.MaxNumber(int2 a, int2 b) => Max(a, b); + + static int2 INumber.MinNumber(int2 a, int2 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 CopySign(int2 value, int2 sign) + { + return new int2(int.CopySign(value.X, sign.X), int.CopySign(value.Y, sign.Y)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static int2 INumber.ClampNative(int2 value, int2 min, int2 max) => Clamp(value, min, max); + + static int2 INumber.MaxNative(int2 a, int2 b) => Max(a, b); + + static int2 INumber.MinNative(int2 a, int2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(int2 value) => + throw new NotSupportedException($"{nameof(int2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator %(int2 a, int2 b) + { + return new int2(a.X % b.X, a.Y % b.Y); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(int2)} has no total order."); + + int IComparable.CompareTo(int2 other) => + throw new NotSupportedException($"{nameof(int2)} has no total order."); + + static bool IComparisonOperators.operator <(int2 a, int2 b) => + throw new NotSupportedException($"{nameof(int2)} has no total order."); + + static bool IComparisonOperators.operator <=(int2 a, int2 b) => + throw new NotSupportedException($"{nameof(int2)} has no total order."); + + static bool IComparisonOperators.operator >(int2 a, int2 b) => + throw new NotSupportedException($"{nameof(int2)} has no total order."); + + static bool IComparisonOperators.operator >=(int2 a, int2 b) => + throw new NotSupportedException($"{nameof(int2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct int2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(int2 a, int2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(int2 a, int2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(int2 a, int2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(int2 a, int2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(int2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(int2 value) + { + return new bool2(int.IsEvenInteger(value.X), int.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(int2 value) + { + return new bool2(int.IsOddInteger(value.X), int.IsOddInteger(value.Y)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegative(int2 value) + { + return new bool2(int.IsNegative(value.X), int.IsNegative(value.Y)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositive(int2 value) + { + return new bool2(int.IsPositive(value.X), int.IsPositive(value.Y)); + } +} + +// ISignedNumber +public partial struct int2 : ISignedNumber +{ + /// + public static int2 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/int2/int2.pack.gen.cs b/Brutal.Numerics/Vector/int2/int2.pack.gen.cs new file mode 100644 index 0000000..bf82f91 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int2 +{ + public static int2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Unpack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Unpack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Unpack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Pack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Pack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int2 result, elementConverter); + return result; + } + + public static int2 Unpack(in sbyte2 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.SByte.ToInt(mode)); + } + + public static int2 Unpack(in byte2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Byte.ToInt(mode)); + } + + public static int2 Unpack(in short2 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Short.ToInt(mode)); + } + + public static int2 Unpack(in ushort2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.UShort.ToInt(mode)); + } + + public static int2 Pack(in uint2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToInt(mode)); + } + + public static int2 Pack(in float2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToInt(mode)); + } + + public static int2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToInt(mode)); + } +} diff --git a/Brutal.Numerics/Vector/int2/int2.swizzle.gen.cs b/Brutal.Numerics/Vector/int2/int2.swizzle.gen.cs new file mode 100644 index 0000000..fdfa490 --- /dev/null +++ b/Brutal.Numerics/Vector/int2/int2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public int2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public int2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct int2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public int R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public int G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public int2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public int2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.copy.gen.cs b/Brutal.Numerics/Vector/int3/int3.copy.gen.cs new file mode 100644 index 0000000..ea9803e --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.equality.gen.cs b/Brutal.Numerics/Vector/int3/int3.equality.gen.cs new file mode 100644 index 0000000..21d888b --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(int3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is int3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(int3 a, int3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(int3 a, int3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.format.gen.cs b/Brutal.Numerics/Vector/int3/int3.format.gen.cs new file mode 100644 index 0000000..a786482 --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static int3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static int3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static int3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static int3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid int3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out int3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out int3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out int3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a int3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out int3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.gen.cs b/Brutal.Numerics/Vector/int3/int3.gen.cs new file mode 100644 index 0000000..c5871ac --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with int components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct int3 : IVector3 + , ISignedIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(int); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public int X; + + /// + [XmlAttribute] + public int Y; + + /// + [XmlAttribute] + public int Z; + + int IVector3.X { readonly get => X; set => X = value; } + + int IVector3.Y { readonly get => Y; set => Y = value; } + + int IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int x, int y, int z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int2 xy, int z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static int3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static int3 UnitX => new(1, 0, 0); + + /// + public static int3 UnitY => new(0, 1, 0); + + /// + public static int3 UnitZ => new(0, 0, 1); + + /// + public int this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out int x, out int y, out int z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.math-metric.gen.cs b/Brutal.Numerics/Vector/int3/int3.math-metric.gen.cs new file mode 100644 index 0000000..1506ea7 --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.math-metric.gen.cs @@ -0,0 +1,43 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(int3 a, int3 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(int3 a, int3 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(int3 a, int3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.math.gen.cs b/Brutal.Numerics/Vector/int3/int3.math.gen.cs new file mode 100644 index 0000000..8e1f9b7 --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Cross(int3 a, int3 b) + { + return new( + a.Y * b.Z - a.Z * b.Y, + a.Z * b.X - a.X * b.Z, + a.X * b.Y - a.Y * b.X); + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/int3/int3.numerics-binary.gen.cs new file mode 100644 index 0000000..0019dc5 --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct int3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(int3 value) + { + return int.IsPow2(value.X) && int.IsPow2(value.Y) && int.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Log2(int3 value) + { + return new int3(int.Log2(value.X), int.Log2(value.Y), int.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator &(int3 a, int3 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator |(int3 a, int3 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ^(int3 a, int3 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ~(int3 value) + { + return new(~value.X, ~value.Y, ~value.Z); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct int3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(int3 value) + { + return new bool3(int.IsPow2(value.X), int.IsPow2(value.Y), int.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct int3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 PopCount(int3 value) + { + return new int3(int.PopCount(value.X), int.PopCount(value.Y), int.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 LeadingZeroCount(int3 value) + { + return new int3(int.LeadingZeroCount(value.X), int.LeadingZeroCount(value.Y), int.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 TrailingZeroCount(int3 value) + { + return new int3(int.TrailingZeroCount(value.X), int.TrailingZeroCount(value.Y), int.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 RotateLeft(int3 value, int rotateAmount) + { + return new int3(int.RotateLeft(value.X, rotateAmount), int.RotateLeft(value.Y, rotateAmount), int.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 RotateRight(int3 value, int rotateAmount) + { + return new int3(int.RotateRight(value.X, rotateAmount), int.RotateRight(value.Y, rotateAmount), int.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.numerics.gen.cs b/Brutal.Numerics/Vector/int3/int3.numerics.gen.cs new file mode 100644 index 0000000..aa283dd --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct int3 : INumberBase +{ + /// + public static int3 Zero => new(0); + + /// + public static int3 One => new(1); + + static int3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static int3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Abs(int3 value) + { + return new int3(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static int WrappingAbs(int value) => + unchecked(value < 0 ? -value : value); + + static bool INumberBase.IsCanonical(int3 value) => true; + + static bool INumberBase.IsComplexNumber(int3 value) => false; + + static bool INumberBase.IsImaginaryNumber(int3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(int3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(int3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(int3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(int3 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(int3 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0; + } + + static bool INumberBase.IsFinite(int3 value) => true; + + static bool INumberBase.IsInfinity(int3 value) => false; + + static bool INumberBase.IsNegativeInfinity(int3 value) => false; + + static bool INumberBase.IsPositiveInfinity(int3 value) => false; + + static bool INumberBase.IsInteger(int3 value) => true; + + static bool INumberBase.IsRealNumber(int3 value) => true; + + static bool INumberBase.IsNaN(int3 value) => false; + + static bool INumberBase.IsNormal(int3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(int3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 MaxMagnitude(int3 a, int3 b) + { + return new int3(int.MaxMagnitude(a.X, b.X), int.MaxMagnitude(a.Y, b.Y), int.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 MaxMagnitudeNumber(int3 a, int3 b) + { + return new int3(int.MaxMagnitude(a.X, b.X), int.MaxMagnitude(a.Y, b.Y), int.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 MinMagnitude(int3 a, int3 b) + { + return new int3(int.MinMagnitude(a.X, b.X), int.MinMagnitude(a.Y, b.Y), int.MinMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 MinMagnitudeNumber(int3 a, int3 b) + { + return new int3(int.MinMagnitude(a.X, b.X), int.MinMagnitude(a.Y, b.Y), int.MinMagnitude(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Add(int3 a, int3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Divide(int3 a, int3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Multiply(int3 a, int3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Negate(int3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Subtract(int3 a, int3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator +(int3 a, int3 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator -(int3 a, int3 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator *(int3 a, int3 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator /(int3 a, int3 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator -(int3 a) + { + return new(-a.X, -a.Y, -a.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator +(int3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static int3 IIncrementOperators.operator ++(int3 value) => value + One; + + static int3 IDecrementOperators.operator --(int3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out int3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(int3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out int3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(int3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out int3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(int3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct int3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Divide(int3 a, int b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Multiply(int3 a, int b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Multiply(int a, int3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator *(int3 a, int b) + { + return new(a.X * b, a.Y * b, a.Z * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator /(int3 a, int b) + { + return new(a.X / b, a.Y / b, a.Z / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator *(int a, int3 b) + { + return new(a * b.X, a * b.Y, a * b.Z); + } +} + +// INumber +public partial struct int3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Clamp(int3 value, int3 min, int3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Max(int3 a, int3 b) + { + return new(int.Max(a.X, b.X), int.Max(a.Y, b.Y), int.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 Min(int3 a, int3 b) + { + return new(int.Min(a.X, b.X), int.Min(a.Y, b.Y), int.Min(a.Z, b.Z)); + } + + static int3 INumber.MaxNumber(int3 a, int3 b) => Max(a, b); + + static int3 INumber.MinNumber(int3 a, int3 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 CopySign(int3 value, int3 sign) + { + return new int3(int.CopySign(value.X, sign.X), int.CopySign(value.Y, sign.Y), int.CopySign(value.Z, sign.Z)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static int3 INumber.ClampNative(int3 value, int3 min, int3 max) => Clamp(value, min, max); + + static int3 INumber.MaxNative(int3 a, int3 b) => Max(a, b); + + static int3 INumber.MinNative(int3 a, int3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(int3 value) => + throw new NotSupportedException($"{nameof(int3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator %(int3 a, int3 b) + { + return new int3(a.X % b.X, a.Y % b.Y, a.Z % b.Z); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(int3)} has no total order."); + + int IComparable.CompareTo(int3 other) => + throw new NotSupportedException($"{nameof(int3)} has no total order."); + + static bool IComparisonOperators.operator <(int3 a, int3 b) => + throw new NotSupportedException($"{nameof(int3)} has no total order."); + + static bool IComparisonOperators.operator <=(int3 a, int3 b) => + throw new NotSupportedException($"{nameof(int3)} has no total order."); + + static bool IComparisonOperators.operator >(int3 a, int3 b) => + throw new NotSupportedException($"{nameof(int3)} has no total order."); + + static bool IComparisonOperators.operator >=(int3 a, int3 b) => + throw new NotSupportedException($"{nameof(int3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct int3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(int3 a, int3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(int3 a, int3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(int3 a, int3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(int3 a, int3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(int3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(int3 value) + { + return new bool3(int.IsEvenInteger(value.X), int.IsEvenInteger(value.Y), int.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(int3 value) + { + return new bool3(int.IsOddInteger(value.X), int.IsOddInteger(value.Y), int.IsOddInteger(value.Z)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegative(int3 value) + { + return new bool3(int.IsNegative(value.X), int.IsNegative(value.Y), int.IsNegative(value.Z)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositive(int3 value) + { + return new bool3(int.IsPositive(value.X), int.IsPositive(value.Y), int.IsPositive(value.Z)); + } +} + +// ISignedNumber +public partial struct int3 : ISignedNumber +{ + /// + public static int3 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/int3/int3.pack.gen.cs b/Brutal.Numerics/Vector/int3/int3.pack.gen.cs new file mode 100644 index 0000000..da985b5 --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 +{ + public static int3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Unpack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Unpack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Unpack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Pack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Pack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int3 result, elementConverter); + return result; + } + + public static int3 Unpack(in sbyte3 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.SByte.ToInt(mode)); + } + + public static int3 Unpack(in byte3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Byte.ToInt(mode)); + } + + public static int3 Unpack(in short3 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Short.ToInt(mode)); + } + + public static int3 Unpack(in ushort3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.UShort.ToInt(mode)); + } + + public static int3 Pack(in uint3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToInt(mode)); + } + + public static int3 Pack(in float3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToInt(mode)); + } + + public static int3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToInt(mode)); + } +} diff --git a/Brutal.Numerics/Vector/int3/int3.swizzle.gen.cs b/Brutal.Numerics/Vector/int3/int3.swizzle.gen.cs new file mode 100644 index 0000000..2197bad --- /dev/null +++ b/Brutal.Numerics/Vector/int3/int3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public int2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public int2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public int2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public int2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public int2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public int2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public int3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public int3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public int3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public int3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public int3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public int3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct int3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public int R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public int G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public int B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public int2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public int2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public int2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public int2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public int2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public int2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public int3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public int3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public int3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public int3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public int3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public int3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.copy.gen.cs b/Brutal.Numerics/Vector/int4/int4.copy.gen.cs new file mode 100644 index 0000000..35a2944 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.equality.gen.cs b/Brutal.Numerics/Vector/int4/int4.equality.gen.cs new file mode 100644 index 0000000..4704721 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(int4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is int4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(int4 a, int4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(int4 a, int4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.format.gen.cs b/Brutal.Numerics/Vector/int4/int4.format.gen.cs new file mode 100644 index 0000000..28c6bd7 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static int4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static int4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static int4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static int4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid int4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out int4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out int4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out int4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a int4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out int4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.gen.cs b/Brutal.Numerics/Vector/int4/int4.gen.cs new file mode 100644 index 0000000..03558b0 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with int components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct int4 : IVector4 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(int); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public int X; + + /// + [XmlAttribute] + public int Y; + + /// + [XmlAttribute] + public int Z; + + /// + [XmlAttribute] + public int W; + + int IVector4.X { readonly get => X; set => X = value; } + + int IVector4.Y { readonly get => Y; set => Y = value; } + + int IVector4.Z { readonly get => Z; set => Z = value; } + + int IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int x, int y, int z, int w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int3 xyz, int w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int2 xy, int2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int2 xy, int z, int w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static int4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static int4 UnitX => new(1, 0, 0, 0); + + /// + public static int4 UnitY => new(0, 1, 0, 0); + + /// + public static int4 UnitZ => new(0, 0, 1, 0); + + /// + public static int4 UnitW => new(0, 0, 0, 1); + + /// + public int this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out int x, out int y, out int z, out int w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.math-metric.gen.cs b/Brutal.Numerics/Vector/int4/int4.math-metric.gen.cs new file mode 100644 index 0000000..1b54b85 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.math-metric.gen.cs @@ -0,0 +1,43 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(int4 a, int4 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(int4 a, int4 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(int4 a, int4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/int4/int4.numerics-binary.gen.cs new file mode 100644 index 0000000..c98d303 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct int4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(int4 value) + { + return int.IsPow2(value.X) && int.IsPow2(value.Y) && int.IsPow2(value.Z) && int.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Log2(int4 value) + { + return new int4(int.Log2(value.X), int.Log2(value.Y), int.Log2(value.Z), int.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator &(int4 a, int4 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z, a.W & b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator |(int4 a, int4 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z, a.W | b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ^(int4 a, int4 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z, a.W ^ b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ~(int4 value) + { + return new(~value.X, ~value.Y, ~value.Z, ~value.W); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct int4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(int4 value) + { + return new bool4(int.IsPow2(value.X), int.IsPow2(value.Y), int.IsPow2(value.Z), int.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct int4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 PopCount(int4 value) + { + return new int4(int.PopCount(value.X), int.PopCount(value.Y), int.PopCount(value.Z), int.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 LeadingZeroCount(int4 value) + { + return new int4(int.LeadingZeroCount(value.X), int.LeadingZeroCount(value.Y), int.LeadingZeroCount(value.Z), int.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 TrailingZeroCount(int4 value) + { + return new int4(int.TrailingZeroCount(value.X), int.TrailingZeroCount(value.Y), int.TrailingZeroCount(value.Z), int.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 RotateLeft(int4 value, int rotateAmount) + { + return new int4(int.RotateLeft(value.X, rotateAmount), int.RotateLeft(value.Y, rotateAmount), int.RotateLeft(value.Z, rotateAmount), int.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 RotateRight(int4 value, int rotateAmount) + { + return new int4(int.RotateRight(value.X, rotateAmount), int.RotateRight(value.Y, rotateAmount), int.RotateRight(value.Z, rotateAmount), int.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.numerics.gen.cs b/Brutal.Numerics/Vector/int4/int4.numerics.gen.cs new file mode 100644 index 0000000..a26b8c2 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct int4 : INumberBase +{ + /// + public static int4 Zero => new(0); + + /// + public static int4 One => new(1); + + static int4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static int4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Abs(int4 value) + { + return new int4(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z), WrappingAbs(value.W)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static int WrappingAbs(int value) => + unchecked(value < 0 ? -value : value); + + static bool INumberBase.IsCanonical(int4 value) => true; + + static bool INumberBase.IsComplexNumber(int4 value) => false; + + static bool INumberBase.IsImaginaryNumber(int4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(int4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(int4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(int4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(int4 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0 && value.W < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(int4 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0 && value.W >= 0; + } + + static bool INumberBase.IsFinite(int4 value) => true; + + static bool INumberBase.IsInfinity(int4 value) => false; + + static bool INumberBase.IsNegativeInfinity(int4 value) => false; + + static bool INumberBase.IsPositiveInfinity(int4 value) => false; + + static bool INumberBase.IsInteger(int4 value) => true; + + static bool INumberBase.IsRealNumber(int4 value) => true; + + static bool INumberBase.IsNaN(int4 value) => false; + + static bool INumberBase.IsNormal(int4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(int4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 MaxMagnitude(int4 a, int4 b) + { + return new int4(int.MaxMagnitude(a.X, b.X), int.MaxMagnitude(a.Y, b.Y), int.MaxMagnitude(a.Z, b.Z), int.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 MaxMagnitudeNumber(int4 a, int4 b) + { + return new int4(int.MaxMagnitude(a.X, b.X), int.MaxMagnitude(a.Y, b.Y), int.MaxMagnitude(a.Z, b.Z), int.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 MinMagnitude(int4 a, int4 b) + { + return new int4(int.MinMagnitude(a.X, b.X), int.MinMagnitude(a.Y, b.Y), int.MinMagnitude(a.Z, b.Z), int.MinMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 MinMagnitudeNumber(int4 a, int4 b) + { + return new int4(int.MinMagnitude(a.X, b.X), int.MinMagnitude(a.Y, b.Y), int.MinMagnitude(a.Z, b.Z), int.MinMagnitude(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Add(int4 a, int4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Divide(int4 a, int4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Multiply(int4 a, int4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Negate(int4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Subtract(int4 a, int4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator +(int4 a, int4 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator -(int4 a, int4 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator *(int4 a, int4 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z, a.W * b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator /(int4 a, int4 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z, a.W / b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator -(int4 a) + { + return new(-a.X, -a.Y, -a.Z, -a.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator +(int4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static int4 IIncrementOperators.operator ++(int4 value) => value + One; + + static int4 IDecrementOperators.operator --(int4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out int4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(int4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out int4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(int4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out int4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(int4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct int4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Divide(int4 a, int b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Multiply(int4 a, int b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Multiply(int a, int4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator *(int4 a, int b) + { + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator /(int4 a, int b) + { + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator *(int a, int4 b) + { + return new(a * b.X, a * b.Y, a * b.Z, a * b.W); + } +} + +// INumber +public partial struct int4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Clamp(int4 value, int4 min, int4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Max(int4 a, int4 b) + { + return new(int.Max(a.X, b.X), int.Max(a.Y, b.Y), int.Max(a.Z, b.Z), int.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 Min(int4 a, int4 b) + { + return new(int.Min(a.X, b.X), int.Min(a.Y, b.Y), int.Min(a.Z, b.Z), int.Min(a.W, b.W)); + } + + static int4 INumber.MaxNumber(int4 a, int4 b) => Max(a, b); + + static int4 INumber.MinNumber(int4 a, int4 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 CopySign(int4 value, int4 sign) + { + return new int4(int.CopySign(value.X, sign.X), int.CopySign(value.Y, sign.Y), int.CopySign(value.Z, sign.Z), int.CopySign(value.W, sign.W)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static int4 INumber.ClampNative(int4 value, int4 min, int4 max) => Clamp(value, min, max); + + static int4 INumber.MaxNative(int4 a, int4 b) => Max(a, b); + + static int4 INumber.MinNative(int4 a, int4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(int4 value) => + throw new NotSupportedException($"{nameof(int4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator %(int4 a, int4 b) + { + return new int4(a.X % b.X, a.Y % b.Y, a.Z % b.Z, a.W % b.W); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(int4)} has no total order."); + + int IComparable.CompareTo(int4 other) => + throw new NotSupportedException($"{nameof(int4)} has no total order."); + + static bool IComparisonOperators.operator <(int4 a, int4 b) => + throw new NotSupportedException($"{nameof(int4)} has no total order."); + + static bool IComparisonOperators.operator <=(int4 a, int4 b) => + throw new NotSupportedException($"{nameof(int4)} has no total order."); + + static bool IComparisonOperators.operator >(int4 a, int4 b) => + throw new NotSupportedException($"{nameof(int4)} has no total order."); + + static bool IComparisonOperators.operator >=(int4 a, int4 b) => + throw new NotSupportedException($"{nameof(int4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct int4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(int4 a, int4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(int4 a, int4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(int4 a, int4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(int4 a, int4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(int4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(int4 value) + { + return new bool4(int.IsEvenInteger(value.X), int.IsEvenInteger(value.Y), int.IsEvenInteger(value.Z), int.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(int4 value) + { + return new bool4(int.IsOddInteger(value.X), int.IsOddInteger(value.Y), int.IsOddInteger(value.Z), int.IsOddInteger(value.W)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegative(int4 value) + { + return new bool4(int.IsNegative(value.X), int.IsNegative(value.Y), int.IsNegative(value.Z), int.IsNegative(value.W)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositive(int4 value) + { + return new bool4(int.IsPositive(value.X), int.IsPositive(value.Y), int.IsPositive(value.Z), int.IsPositive(value.W)); + } +} + +// ISignedNumber +public partial struct int4 : ISignedNumber +{ + /// + public static int4 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/int4/int4.pack.gen.cs b/Brutal.Numerics/Vector/int4/int4.pack.gen.cs new file mode 100644 index 0000000..c1aa94b --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int4 +{ + public static int4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Unpack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Unpack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Unpack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Pack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Pack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out int4 result, elementConverter); + return result; + } + + public static int4 Unpack(in sbyte4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.SByte.ToInt(mode)); + } + + public static int4 Unpack(in byte4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Byte.ToInt(mode)); + } + + public static int4 Unpack(in short4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Short.ToInt(mode)); + } + + public static int4 Unpack(in ushort4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.UShort.ToInt(mode)); + } + + public static int4 Pack(in uint4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToInt(mode)); + } + + public static int4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToInt(mode)); + } + + public static int4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToInt(mode)); + } +} diff --git a/Brutal.Numerics/Vector/int4/int4.swizzle.gen.cs b/Brutal.Numerics/Vector/int4/int4.swizzle.gen.cs new file mode 100644 index 0000000..c55a664 --- /dev/null +++ b/Brutal.Numerics/Vector/int4/int4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct int4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public int2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public int2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public int2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public int2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public int2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public int2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public int2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public int2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public int2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public int2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public int2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public int2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public int3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public int3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public int3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public int3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public int3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public int3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public int3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public int3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public int3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public int3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public int3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public int3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public int3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public int3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public int3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public int3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public int3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public int3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public int3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public int3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public int3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public int3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public int3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public int3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public int4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public int4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public int4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public int4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public int4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public int4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public int4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public int4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public int4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public int4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public int4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public int4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public int4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public int4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public int4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public int4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public int4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public int4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public int4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public int4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public int4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public int4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public int4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct int4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public int R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public int G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public int B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public int A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public int2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public int2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public int2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public int2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public int2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public int2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public int2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public int2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public int2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public int2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public int2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public int2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public int3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public int3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public int3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public int3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public int3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public int3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public int3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public int3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public int3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public int3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public int3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public int3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public int3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public int3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public int3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public int3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public int3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public int3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public int3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public int3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public int3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public int3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public int3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public int3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public int4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public int4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public int4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public int4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public int4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public int4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public int4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public int4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public int4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public int4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public int4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public int4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public int4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public int4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public int4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public int4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public int4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public int4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public int4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public int4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public int4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public int4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public int4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public int4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.copy.gen.cs b/Brutal.Numerics/Vector/long2/long2.copy.gen.cs new file mode 100644 index 0000000..92c1def --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.equality.gen.cs b/Brutal.Numerics/Vector/long2/long2.equality.gen.cs new file mode 100644 index 0000000..a901500 --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(long2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is long2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(long2 a, long2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(long2 a, long2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.format.gen.cs b/Brutal.Numerics/Vector/long2/long2.format.gen.cs new file mode 100644 index 0000000..0285e02 --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static long2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static long2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static long2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static long2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid long2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out long2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out long2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out long2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a long2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out long2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.gen.cs b/Brutal.Numerics/Vector/long2/long2.gen.cs new file mode 100644 index 0000000..f4e90ae --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with long components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct long2 : IVector2 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(long); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public long X; + + /// + [XmlAttribute] + public long Y; + + long IVector2.X { readonly get => X; set => X = value; } + + long IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long2(long x, long y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long2(long xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static long2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static long2 UnitX => new(1, 0); + + /// + public static long2 UnitY => new(0, 1); + + /// + public long this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out long x, out long y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.math-metric.gen.cs b/Brutal.Numerics/Vector/long2/long2.math-metric.gen.cs new file mode 100644 index 0000000..4c2b764 --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return (double)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly long LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(long2 a, long2 b) + { + return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long DistanceSquared(long2 a, long2 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long Dot(long2 a, long2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/long2/long2.numerics-binary.gen.cs new file mode 100644 index 0000000..475a450 --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct long2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(long2 value) + { + return long.IsPow2(value.X) && long.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Log2(long2 value) + { + return new long2(long.Log2(value.X), long.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator &(long2 a, long2 b) + { + return new(a.X & b.X, a.Y & b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator |(long2 a, long2 b) + { + return new(a.X | b.X, a.Y | b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator ^(long2 a, long2 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator ~(long2 value) + { + return new(~value.X, ~value.Y); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct long2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(long2 value) + { + return new bool2(long.IsPow2(value.X), long.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct long2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 PopCount(long2 value) + { + return new long2(long.PopCount(value.X), long.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 LeadingZeroCount(long2 value) + { + return new long2(long.LeadingZeroCount(value.X), long.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 TrailingZeroCount(long2 value) + { + return new long2(long.TrailingZeroCount(value.X), long.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 RotateLeft(long2 value, int rotateAmount) + { + return new long2(long.RotateLeft(value.X, rotateAmount), long.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 RotateRight(long2 value, int rotateAmount) + { + return new long2(long.RotateRight(value.X, rotateAmount), long.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/long2/long2.numerics.gen.cs b/Brutal.Numerics/Vector/long2/long2.numerics.gen.cs new file mode 100644 index 0000000..b0ca134 --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct long2 : INumberBase +{ + /// + public static long2 Zero => new(0); + + /// + public static long2 One => new(1); + + static long2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static long2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Abs(long2 value) + { + return new long2(WrappingAbs(value.X), WrappingAbs(value.Y)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static long WrappingAbs(long value) => + unchecked(value < 0 ? -value : value); + + static bool INumberBase.IsCanonical(long2 value) => true; + + static bool INumberBase.IsComplexNumber(long2 value) => false; + + static bool INumberBase.IsImaginaryNumber(long2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(long2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(long2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(long2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(long2 value) + { + return value.X < 0 && value.Y < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(long2 value) + { + return value.X >= 0 && value.Y >= 0; + } + + static bool INumberBase.IsFinite(long2 value) => true; + + static bool INumberBase.IsInfinity(long2 value) => false; + + static bool INumberBase.IsNegativeInfinity(long2 value) => false; + + static bool INumberBase.IsPositiveInfinity(long2 value) => false; + + static bool INumberBase.IsInteger(long2 value) => true; + + static bool INumberBase.IsRealNumber(long2 value) => true; + + static bool INumberBase.IsNaN(long2 value) => false; + + static bool INumberBase.IsNormal(long2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(long2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 MaxMagnitude(long2 a, long2 b) + { + return new long2(long.MaxMagnitude(a.X, b.X), long.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 MaxMagnitudeNumber(long2 a, long2 b) + { + return new long2(long.MaxMagnitude(a.X, b.X), long.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 MinMagnitude(long2 a, long2 b) + { + return new long2(long.MinMagnitude(a.X, b.X), long.MinMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 MinMagnitudeNumber(long2 a, long2 b) + { + return new long2(long.MinMagnitude(a.X, b.X), long.MinMagnitude(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Add(long2 a, long2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Divide(long2 a, long2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Multiply(long2 a, long2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Negate(long2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Subtract(long2 a, long2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator +(long2 a, long2 b) + { + return new(a.X + b.X, a.Y + b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator -(long2 a, long2 b) + { + return new(a.X - b.X, a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator *(long2 a, long2 b) + { + return new(a.X * b.X, a.Y * b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator /(long2 a, long2 b) + { + return new(a.X / b.X, a.Y / b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator -(long2 a) + { + return new(-a.X, -a.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator +(long2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static long2 IIncrementOperators.operator ++(long2 value) => value + One; + + static long2 IDecrementOperators.operator --(long2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out long2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(long2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out long2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(long2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out long2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(long2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct long2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Divide(long2 a, long b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Multiply(long2 a, long b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Multiply(long a, long2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator *(long2 a, long b) + { + return new(a.X * b, a.Y * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator /(long2 a, long b) + { + return new(a.X / b, a.Y / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator *(long a, long2 b) + { + return new(a * b.X, a * b.Y); + } +} + +// INumber +public partial struct long2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Clamp(long2 value, long2 min, long2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Max(long2 a, long2 b) + { + return new(long.Max(a.X, b.X), long.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 Min(long2 a, long2 b) + { + return new(long.Min(a.X, b.X), long.Min(a.Y, b.Y)); + } + + static long2 INumber.MaxNumber(long2 a, long2 b) => Max(a, b); + + static long2 INumber.MinNumber(long2 a, long2 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 CopySign(long2 value, long2 sign) + { + return new long2(long.CopySign(value.X, sign.X), long.CopySign(value.Y, sign.Y)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static long2 INumber.ClampNative(long2 value, long2 min, long2 max) => Clamp(value, min, max); + + static long2 INumber.MaxNative(long2 a, long2 b) => Max(a, b); + + static long2 INumber.MinNative(long2 a, long2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(long2 value) => + throw new NotSupportedException($"{nameof(long2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long2 operator %(long2 a, long2 b) + { + return new long2(a.X % b.X, a.Y % b.Y); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(long2)} has no total order."); + + int IComparable.CompareTo(long2 other) => + throw new NotSupportedException($"{nameof(long2)} has no total order."); + + static bool IComparisonOperators.operator <(long2 a, long2 b) => + throw new NotSupportedException($"{nameof(long2)} has no total order."); + + static bool IComparisonOperators.operator <=(long2 a, long2 b) => + throw new NotSupportedException($"{nameof(long2)} has no total order."); + + static bool IComparisonOperators.operator >(long2 a, long2 b) => + throw new NotSupportedException($"{nameof(long2)} has no total order."); + + static bool IComparisonOperators.operator >=(long2 a, long2 b) => + throw new NotSupportedException($"{nameof(long2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct long2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(long2 a, long2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(long2 a, long2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(long2 a, long2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(long2 a, long2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(long2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(long2 value) + { + return new bool2(long.IsEvenInteger(value.X), long.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(long2 value) + { + return new bool2(long.IsOddInteger(value.X), long.IsOddInteger(value.Y)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegative(long2 value) + { + return new bool2(long.IsNegative(value.X), long.IsNegative(value.Y)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositive(long2 value) + { + return new bool2(long.IsPositive(value.X), long.IsPositive(value.Y)); + } +} + +// ISignedNumber +public partial struct long2 : ISignedNumber +{ + /// + public static long2 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/long2/long2.swizzle.gen.cs b/Brutal.Numerics/Vector/long2/long2.swizzle.gen.cs new file mode 100644 index 0000000..23f4594 --- /dev/null +++ b/Brutal.Numerics/Vector/long2/long2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public long2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public long2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct long2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public long R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public long G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public long2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public long2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.copy.gen.cs b/Brutal.Numerics/Vector/long3/long3.copy.gen.cs new file mode 100644 index 0000000..2344d7b --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.equality.gen.cs b/Brutal.Numerics/Vector/long3/long3.equality.gen.cs new file mode 100644 index 0000000..05fd5b1 --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(long3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is long3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(long3 a, long3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(long3 a, long3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.format.gen.cs b/Brutal.Numerics/Vector/long3/long3.format.gen.cs new file mode 100644 index 0000000..3bd16a8 --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static long3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static long3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static long3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static long3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid long3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out long3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out long3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out long3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a long3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out long3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.gen.cs b/Brutal.Numerics/Vector/long3/long3.gen.cs new file mode 100644 index 0000000..4c3bd46 --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with long components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct long3 : IVector3 + , ISignedIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(long); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public long X; + + /// + [XmlAttribute] + public long Y; + + /// + [XmlAttribute] + public long Z; + + long IVector3.X { readonly get => X; set => X = value; } + + long IVector3.Y { readonly get => Y; set => Y = value; } + + long IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long3(long x, long y, long z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long3(long xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long3(long2 xy, long z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static long3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static long3 UnitX => new(1, 0, 0); + + /// + public static long3 UnitY => new(0, 1, 0); + + /// + public static long3 UnitZ => new(0, 0, 1); + + /// + public long this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out long x, out long y, out long z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.math-metric.gen.cs b/Brutal.Numerics/Vector/long3/long3.math-metric.gen.cs new file mode 100644 index 0000000..65f025d --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return (double)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly long LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(long3 a, long3 b) + { + return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long DistanceSquared(long3 a, long3 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long Dot(long3 a, long3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.math.gen.cs b/Brutal.Numerics/Vector/long3/long3.math.gen.cs new file mode 100644 index 0000000..0798ea1 --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Cross(long3 a, long3 b) + { + return new( + a.Y * b.Z - a.Z * b.Y, + a.Z * b.X - a.X * b.Z, + a.X * b.Y - a.Y * b.X); + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/long3/long3.numerics-binary.gen.cs new file mode 100644 index 0000000..44af278 --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct long3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(long3 value) + { + return long.IsPow2(value.X) && long.IsPow2(value.Y) && long.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Log2(long3 value) + { + return new long3(long.Log2(value.X), long.Log2(value.Y), long.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator &(long3 a, long3 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator |(long3 a, long3 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator ^(long3 a, long3 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator ~(long3 value) + { + return new(~value.X, ~value.Y, ~value.Z); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct long3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(long3 value) + { + return new bool3(long.IsPow2(value.X), long.IsPow2(value.Y), long.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct long3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 PopCount(long3 value) + { + return new long3(long.PopCount(value.X), long.PopCount(value.Y), long.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 LeadingZeroCount(long3 value) + { + return new long3(long.LeadingZeroCount(value.X), long.LeadingZeroCount(value.Y), long.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 TrailingZeroCount(long3 value) + { + return new long3(long.TrailingZeroCount(value.X), long.TrailingZeroCount(value.Y), long.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 RotateLeft(long3 value, int rotateAmount) + { + return new long3(long.RotateLeft(value.X, rotateAmount), long.RotateLeft(value.Y, rotateAmount), long.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 RotateRight(long3 value, int rotateAmount) + { + return new long3(long.RotateRight(value.X, rotateAmount), long.RotateRight(value.Y, rotateAmount), long.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/long3/long3.numerics.gen.cs b/Brutal.Numerics/Vector/long3/long3.numerics.gen.cs new file mode 100644 index 0000000..3b9457c --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct long3 : INumberBase +{ + /// + public static long3 Zero => new(0); + + /// + public static long3 One => new(1); + + static long3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static long3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Abs(long3 value) + { + return new long3(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static long WrappingAbs(long value) => + unchecked(value < 0 ? -value : value); + + static bool INumberBase.IsCanonical(long3 value) => true; + + static bool INumberBase.IsComplexNumber(long3 value) => false; + + static bool INumberBase.IsImaginaryNumber(long3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(long3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(long3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(long3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(long3 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(long3 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0; + } + + static bool INumberBase.IsFinite(long3 value) => true; + + static bool INumberBase.IsInfinity(long3 value) => false; + + static bool INumberBase.IsNegativeInfinity(long3 value) => false; + + static bool INumberBase.IsPositiveInfinity(long3 value) => false; + + static bool INumberBase.IsInteger(long3 value) => true; + + static bool INumberBase.IsRealNumber(long3 value) => true; + + static bool INumberBase.IsNaN(long3 value) => false; + + static bool INumberBase.IsNormal(long3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(long3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 MaxMagnitude(long3 a, long3 b) + { + return new long3(long.MaxMagnitude(a.X, b.X), long.MaxMagnitude(a.Y, b.Y), long.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 MaxMagnitudeNumber(long3 a, long3 b) + { + return new long3(long.MaxMagnitude(a.X, b.X), long.MaxMagnitude(a.Y, b.Y), long.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 MinMagnitude(long3 a, long3 b) + { + return new long3(long.MinMagnitude(a.X, b.X), long.MinMagnitude(a.Y, b.Y), long.MinMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 MinMagnitudeNumber(long3 a, long3 b) + { + return new long3(long.MinMagnitude(a.X, b.X), long.MinMagnitude(a.Y, b.Y), long.MinMagnitude(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Add(long3 a, long3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Divide(long3 a, long3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Multiply(long3 a, long3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Negate(long3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Subtract(long3 a, long3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator +(long3 a, long3 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator -(long3 a, long3 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator *(long3 a, long3 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator /(long3 a, long3 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator -(long3 a) + { + return new(-a.X, -a.Y, -a.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator +(long3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static long3 IIncrementOperators.operator ++(long3 value) => value + One; + + static long3 IDecrementOperators.operator --(long3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out long3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(long3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out long3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(long3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out long3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(long3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct long3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Divide(long3 a, long b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Multiply(long3 a, long b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Multiply(long a, long3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator *(long3 a, long b) + { + return new(a.X * b, a.Y * b, a.Z * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator /(long3 a, long b) + { + return new(a.X / b, a.Y / b, a.Z / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator *(long a, long3 b) + { + return new(a * b.X, a * b.Y, a * b.Z); + } +} + +// INumber +public partial struct long3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Clamp(long3 value, long3 min, long3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Max(long3 a, long3 b) + { + return new(long.Max(a.X, b.X), long.Max(a.Y, b.Y), long.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 Min(long3 a, long3 b) + { + return new(long.Min(a.X, b.X), long.Min(a.Y, b.Y), long.Min(a.Z, b.Z)); + } + + static long3 INumber.MaxNumber(long3 a, long3 b) => Max(a, b); + + static long3 INumber.MinNumber(long3 a, long3 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 CopySign(long3 value, long3 sign) + { + return new long3(long.CopySign(value.X, sign.X), long.CopySign(value.Y, sign.Y), long.CopySign(value.Z, sign.Z)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static long3 INumber.ClampNative(long3 value, long3 min, long3 max) => Clamp(value, min, max); + + static long3 INumber.MaxNative(long3 a, long3 b) => Max(a, b); + + static long3 INumber.MinNative(long3 a, long3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(long3 value) => + throw new NotSupportedException($"{nameof(long3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long3 operator %(long3 a, long3 b) + { + return new long3(a.X % b.X, a.Y % b.Y, a.Z % b.Z); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(long3)} has no total order."); + + int IComparable.CompareTo(long3 other) => + throw new NotSupportedException($"{nameof(long3)} has no total order."); + + static bool IComparisonOperators.operator <(long3 a, long3 b) => + throw new NotSupportedException($"{nameof(long3)} has no total order."); + + static bool IComparisonOperators.operator <=(long3 a, long3 b) => + throw new NotSupportedException($"{nameof(long3)} has no total order."); + + static bool IComparisonOperators.operator >(long3 a, long3 b) => + throw new NotSupportedException($"{nameof(long3)} has no total order."); + + static bool IComparisonOperators.operator >=(long3 a, long3 b) => + throw new NotSupportedException($"{nameof(long3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct long3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(long3 a, long3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(long3 a, long3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(long3 a, long3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(long3 a, long3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(long3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(long3 value) + { + return new bool3(long.IsEvenInteger(value.X), long.IsEvenInteger(value.Y), long.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(long3 value) + { + return new bool3(long.IsOddInteger(value.X), long.IsOddInteger(value.Y), long.IsOddInteger(value.Z)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegative(long3 value) + { + return new bool3(long.IsNegative(value.X), long.IsNegative(value.Y), long.IsNegative(value.Z)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositive(long3 value) + { + return new bool3(long.IsPositive(value.X), long.IsPositive(value.Y), long.IsPositive(value.Z)); + } +} + +// ISignedNumber +public partial struct long3 : ISignedNumber +{ + /// + public static long3 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/long3/long3.swizzle.gen.cs b/Brutal.Numerics/Vector/long3/long3.swizzle.gen.cs new file mode 100644 index 0000000..b521cd5 --- /dev/null +++ b/Brutal.Numerics/Vector/long3/long3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public long2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public long2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public long2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public long2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public long2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public long2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public long3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public long3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public long3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public long3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public long3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public long3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct long3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public long R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public long G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public long B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public long2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public long2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public long2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public long2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public long2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public long2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public long3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public long3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public long3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public long3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public long3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public long3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.copy.gen.cs b/Brutal.Numerics/Vector/long4/long4.copy.gen.cs new file mode 100644 index 0000000..901fa01 --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.equality.gen.cs b/Brutal.Numerics/Vector/long4/long4.equality.gen.cs new file mode 100644 index 0000000..3286e2d --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(long4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is long4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(long4 a, long4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(long4 a, long4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.format.gen.cs b/Brutal.Numerics/Vector/long4/long4.format.gen.cs new file mode 100644 index 0000000..1946a61 --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static long4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static long4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static long4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static long4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid long4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out long4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out long4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out long4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a long4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out long4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.gen.cs b/Brutal.Numerics/Vector/long4/long4.gen.cs new file mode 100644 index 0000000..0573a0e --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with long components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct long4 : IVector4 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(long); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public long X; + + /// + [XmlAttribute] + public long Y; + + /// + [XmlAttribute] + public long Z; + + /// + [XmlAttribute] + public long W; + + long IVector4.X { readonly get => X; set => X = value; } + + long IVector4.Y { readonly get => Y; set => Y = value; } + + long IVector4.Z { readonly get => Z; set => Z = value; } + + long IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long4(long x, long y, long z, long w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long4(long xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long4(long3 xyz, long w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long4(long2 xy, long2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long4(long2 xy, long z, long w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public long4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static long4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static long4 UnitX => new(1, 0, 0, 0); + + /// + public static long4 UnitY => new(0, 1, 0, 0); + + /// + public static long4 UnitZ => new(0, 0, 1, 0); + + /// + public static long4 UnitW => new(0, 0, 0, 1); + + /// + public long this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out long x, out long y, out long z, out long w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.math-metric.gen.cs b/Brutal.Numerics/Vector/long4/long4.math-metric.gen.cs new file mode 100644 index 0000000..625f510 --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return (double)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly long LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(long4 a, long4 b) + { + return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long DistanceSquared(long4 a, long4 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z) + (a.W - b.W) * (a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long Dot(long4 a, long4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/long4/long4.numerics-binary.gen.cs new file mode 100644 index 0000000..e0d4c7b --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct long4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(long4 value) + { + return long.IsPow2(value.X) && long.IsPow2(value.Y) && long.IsPow2(value.Z) && long.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Log2(long4 value) + { + return new long4(long.Log2(value.X), long.Log2(value.Y), long.Log2(value.Z), long.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator &(long4 a, long4 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z, a.W & b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator |(long4 a, long4 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z, a.W | b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator ^(long4 a, long4 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z, a.W ^ b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator ~(long4 value) + { + return new(~value.X, ~value.Y, ~value.Z, ~value.W); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct long4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(long4 value) + { + return new bool4(long.IsPow2(value.X), long.IsPow2(value.Y), long.IsPow2(value.Z), long.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct long4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 PopCount(long4 value) + { + return new long4(long.PopCount(value.X), long.PopCount(value.Y), long.PopCount(value.Z), long.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 LeadingZeroCount(long4 value) + { + return new long4(long.LeadingZeroCount(value.X), long.LeadingZeroCount(value.Y), long.LeadingZeroCount(value.Z), long.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 TrailingZeroCount(long4 value) + { + return new long4(long.TrailingZeroCount(value.X), long.TrailingZeroCount(value.Y), long.TrailingZeroCount(value.Z), long.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 RotateLeft(long4 value, int rotateAmount) + { + return new long4(long.RotateLeft(value.X, rotateAmount), long.RotateLeft(value.Y, rotateAmount), long.RotateLeft(value.Z, rotateAmount), long.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 RotateRight(long4 value, int rotateAmount) + { + return new long4(long.RotateRight(value.X, rotateAmount), long.RotateRight(value.Y, rotateAmount), long.RotateRight(value.Z, rotateAmount), long.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/long4/long4.numerics.gen.cs b/Brutal.Numerics/Vector/long4/long4.numerics.gen.cs new file mode 100644 index 0000000..d59dc15 --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct long4 : INumberBase +{ + /// + public static long4 Zero => new(0); + + /// + public static long4 One => new(1); + + static long4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static long4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Abs(long4 value) + { + return new long4(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z), WrappingAbs(value.W)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static long WrappingAbs(long value) => + unchecked(value < 0 ? -value : value); + + static bool INumberBase.IsCanonical(long4 value) => true; + + static bool INumberBase.IsComplexNumber(long4 value) => false; + + static bool INumberBase.IsImaginaryNumber(long4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(long4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(long4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(long4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(long4 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0 && value.W < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(long4 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0 && value.W >= 0; + } + + static bool INumberBase.IsFinite(long4 value) => true; + + static bool INumberBase.IsInfinity(long4 value) => false; + + static bool INumberBase.IsNegativeInfinity(long4 value) => false; + + static bool INumberBase.IsPositiveInfinity(long4 value) => false; + + static bool INumberBase.IsInteger(long4 value) => true; + + static bool INumberBase.IsRealNumber(long4 value) => true; + + static bool INumberBase.IsNaN(long4 value) => false; + + static bool INumberBase.IsNormal(long4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(long4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 MaxMagnitude(long4 a, long4 b) + { + return new long4(long.MaxMagnitude(a.X, b.X), long.MaxMagnitude(a.Y, b.Y), long.MaxMagnitude(a.Z, b.Z), long.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 MaxMagnitudeNumber(long4 a, long4 b) + { + return new long4(long.MaxMagnitude(a.X, b.X), long.MaxMagnitude(a.Y, b.Y), long.MaxMagnitude(a.Z, b.Z), long.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 MinMagnitude(long4 a, long4 b) + { + return new long4(long.MinMagnitude(a.X, b.X), long.MinMagnitude(a.Y, b.Y), long.MinMagnitude(a.Z, b.Z), long.MinMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 MinMagnitudeNumber(long4 a, long4 b) + { + return new long4(long.MinMagnitude(a.X, b.X), long.MinMagnitude(a.Y, b.Y), long.MinMagnitude(a.Z, b.Z), long.MinMagnitude(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Add(long4 a, long4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Divide(long4 a, long4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Multiply(long4 a, long4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Negate(long4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Subtract(long4 a, long4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator +(long4 a, long4 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator -(long4 a, long4 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator *(long4 a, long4 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z, a.W * b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator /(long4 a, long4 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z, a.W / b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator -(long4 a) + { + return new(-a.X, -a.Y, -a.Z, -a.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator +(long4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static long4 IIncrementOperators.operator ++(long4 value) => value + One; + + static long4 IDecrementOperators.operator --(long4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out long4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(long4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out long4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(long4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out long4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(long4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct long4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Divide(long4 a, long b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Multiply(long4 a, long b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Multiply(long a, long4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator *(long4 a, long b) + { + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator /(long4 a, long b) + { + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator *(long a, long4 b) + { + return new(a * b.X, a * b.Y, a * b.Z, a * b.W); + } +} + +// INumber +public partial struct long4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Clamp(long4 value, long4 min, long4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Max(long4 a, long4 b) + { + return new(long.Max(a.X, b.X), long.Max(a.Y, b.Y), long.Max(a.Z, b.Z), long.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 Min(long4 a, long4 b) + { + return new(long.Min(a.X, b.X), long.Min(a.Y, b.Y), long.Min(a.Z, b.Z), long.Min(a.W, b.W)); + } + + static long4 INumber.MaxNumber(long4 a, long4 b) => Max(a, b); + + static long4 INumber.MinNumber(long4 a, long4 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 CopySign(long4 value, long4 sign) + { + return new long4(long.CopySign(value.X, sign.X), long.CopySign(value.Y, sign.Y), long.CopySign(value.Z, sign.Z), long.CopySign(value.W, sign.W)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static long4 INumber.ClampNative(long4 value, long4 min, long4 max) => Clamp(value, min, max); + + static long4 INumber.MaxNative(long4 a, long4 b) => Max(a, b); + + static long4 INumber.MinNative(long4 a, long4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(long4 value) => + throw new NotSupportedException($"{nameof(long4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long4 operator %(long4 a, long4 b) + { + return new long4(a.X % b.X, a.Y % b.Y, a.Z % b.Z, a.W % b.W); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(long4)} has no total order."); + + int IComparable.CompareTo(long4 other) => + throw new NotSupportedException($"{nameof(long4)} has no total order."); + + static bool IComparisonOperators.operator <(long4 a, long4 b) => + throw new NotSupportedException($"{nameof(long4)} has no total order."); + + static bool IComparisonOperators.operator <=(long4 a, long4 b) => + throw new NotSupportedException($"{nameof(long4)} has no total order."); + + static bool IComparisonOperators.operator >(long4 a, long4 b) => + throw new NotSupportedException($"{nameof(long4)} has no total order."); + + static bool IComparisonOperators.operator >=(long4 a, long4 b) => + throw new NotSupportedException($"{nameof(long4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct long4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(long4 a, long4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(long4 a, long4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(long4 a, long4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(long4 a, long4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(long4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(long4 value) + { + return new bool4(long.IsEvenInteger(value.X), long.IsEvenInteger(value.Y), long.IsEvenInteger(value.Z), long.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(long4 value) + { + return new bool4(long.IsOddInteger(value.X), long.IsOddInteger(value.Y), long.IsOddInteger(value.Z), long.IsOddInteger(value.W)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegative(long4 value) + { + return new bool4(long.IsNegative(value.X), long.IsNegative(value.Y), long.IsNegative(value.Z), long.IsNegative(value.W)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositive(long4 value) + { + return new bool4(long.IsPositive(value.X), long.IsPositive(value.Y), long.IsPositive(value.Z), long.IsPositive(value.W)); + } +} + +// ISignedNumber +public partial struct long4 : ISignedNumber +{ + /// + public static long4 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/long4/long4.swizzle.gen.cs b/Brutal.Numerics/Vector/long4/long4.swizzle.gen.cs new file mode 100644 index 0000000..cb32877 --- /dev/null +++ b/Brutal.Numerics/Vector/long4/long4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct long4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public long2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public long2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public long2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public long2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public long2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public long2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public long2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public long2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public long2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public long2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public long2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public long2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public long3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public long3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public long3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public long3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public long3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public long3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public long3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public long3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public long3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public long3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public long3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public long3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public long3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public long3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public long3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public long3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public long3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public long3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public long3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public long3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public long3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public long3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public long3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public long3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public long4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public long4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public long4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public long4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public long4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public long4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public long4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public long4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public long4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public long4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public long4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public long4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public long4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public long4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public long4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public long4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public long4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public long4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public long4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public long4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public long4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public long4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public long4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct long4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public long R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public long G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public long B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public long A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public long2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public long2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public long2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public long2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public long2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public long2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public long2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public long2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public long2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public long2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public long2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public long2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public long3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public long3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public long3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public long3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public long3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public long3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public long3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public long3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public long3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public long3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public long3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public long3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public long3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public long3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public long3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public long3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public long3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public long3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public long3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public long3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public long3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public long3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public long3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public long3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public long4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public long4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public long4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public long4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public long4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public long4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public long4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public long4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public long4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public long4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public long4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public long4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public long4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public long4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public long4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public long4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public long4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public long4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public long4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public long4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public long4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public long4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public long4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public long4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.copy.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.copy.gen.cs new file mode 100644 index 0000000..7cc61fa --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.equality.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.equality.gen.cs new file mode 100644 index 0000000..12faa95 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(sbyte2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is sbyte2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(sbyte2 a, sbyte2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(sbyte2 a, sbyte2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.format.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.format.gen.cs new file mode 100644 index 0000000..4ba77c9 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static sbyte2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static sbyte2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static sbyte2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static sbyte2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid sbyte2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out sbyte2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out sbyte2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out sbyte2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a sbyte2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out sbyte2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.gen.cs new file mode 100644 index 0000000..218c486 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with sbyte components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct sbyte2 : IVector2 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(sbyte); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public sbyte X; + + /// + [XmlAttribute] + public sbyte Y; + + sbyte IVector2.X { readonly get => X; set => X = value; } + + sbyte IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte2(sbyte x, sbyte y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte2(sbyte xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static sbyte2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static sbyte2 UnitX => new(1, 0); + + /// + public static sbyte2 UnitY => new(0, 1); + + /// + public sbyte this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out sbyte x, out sbyte y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.math-metric.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.math-metric.gen.cs new file mode 100644 index 0000000..387bf10 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(sbyte2 a, sbyte2 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(sbyte2 a, sbyte2 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(sbyte2 a, sbyte2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.numerics-binary.gen.cs new file mode 100644 index 0000000..ec462c7 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct sbyte2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(sbyte2 value) + { + return sbyte.IsPow2(value.X) && sbyte.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Log2(sbyte2 value) + { + return new sbyte2(sbyte.Log2(value.X), sbyte.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator &(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X & b.X), (sbyte)(a.Y & b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator |(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X | b.X), (sbyte)(a.Y | b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator ^(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X ^ b.X), (sbyte)(a.Y ^ b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator ~(sbyte2 value) + { + return new((sbyte)(~value.X), (sbyte)(~value.Y)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct sbyte2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(sbyte2 value) + { + return new bool2(sbyte.IsPow2(value.X), sbyte.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct sbyte2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 PopCount(sbyte2 value) + { + return new sbyte2(sbyte.PopCount(value.X), sbyte.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 LeadingZeroCount(sbyte2 value) + { + return new sbyte2(sbyte.LeadingZeroCount(value.X), sbyte.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 TrailingZeroCount(sbyte2 value) + { + return new sbyte2(sbyte.TrailingZeroCount(value.X), sbyte.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 RotateLeft(sbyte2 value, int rotateAmount) + { + return new sbyte2(sbyte.RotateLeft(value.X, rotateAmount), sbyte.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 RotateRight(sbyte2 value, int rotateAmount) + { + return new sbyte2(sbyte.RotateRight(value.X, rotateAmount), sbyte.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.numerics.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.numerics.gen.cs new file mode 100644 index 0000000..297c3f2 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct sbyte2 : INumberBase +{ + /// + public static sbyte2 Zero => new(0); + + /// + public static sbyte2 One => new(1); + + static sbyte2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static sbyte2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Abs(sbyte2 value) + { + return new sbyte2(WrappingAbs(value.X), WrappingAbs(value.Y)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static sbyte WrappingAbs(sbyte value) => + unchecked((sbyte)(value < 0 ? -value : value)); + + static bool INumberBase.IsCanonical(sbyte2 value) => true; + + static bool INumberBase.IsComplexNumber(sbyte2 value) => false; + + static bool INumberBase.IsImaginaryNumber(sbyte2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(sbyte2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(sbyte2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(sbyte2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(sbyte2 value) + { + return value.X < 0 && value.Y < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(sbyte2 value) + { + return value.X >= 0 && value.Y >= 0; + } + + static bool INumberBase.IsFinite(sbyte2 value) => true; + + static bool INumberBase.IsInfinity(sbyte2 value) => false; + + static bool INumberBase.IsNegativeInfinity(sbyte2 value) => false; + + static bool INumberBase.IsPositiveInfinity(sbyte2 value) => false; + + static bool INumberBase.IsInteger(sbyte2 value) => true; + + static bool INumberBase.IsRealNumber(sbyte2 value) => true; + + static bool INumberBase.IsNaN(sbyte2 value) => false; + + static bool INumberBase.IsNormal(sbyte2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(sbyte2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 MaxMagnitude(sbyte2 a, sbyte2 b) + { + return new sbyte2(sbyte.MaxMagnitude(a.X, b.X), sbyte.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 MaxMagnitudeNumber(sbyte2 a, sbyte2 b) + { + return new sbyte2(sbyte.MaxMagnitude(a.X, b.X), sbyte.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 MinMagnitude(sbyte2 a, sbyte2 b) + { + return new sbyte2(sbyte.MinMagnitude(a.X, b.X), sbyte.MinMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 MinMagnitudeNumber(sbyte2 a, sbyte2 b) + { + return new sbyte2(sbyte.MinMagnitude(a.X, b.X), sbyte.MinMagnitude(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Add(sbyte2 a, sbyte2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Divide(sbyte2 a, sbyte2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Multiply(sbyte2 a, sbyte2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Negate(sbyte2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Subtract(sbyte2 a, sbyte2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator +(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X + b.X), (sbyte)(a.Y + b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator -(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X - b.X), (sbyte)(a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator *(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X * b.X), (sbyte)(a.Y * b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator /(sbyte2 a, sbyte2 b) + { + return new((sbyte)(a.X / b.X), (sbyte)(a.Y / b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator -(sbyte2 a) + { + return new((sbyte)(-a.X), (sbyte)(-a.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator +(sbyte2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static sbyte2 IIncrementOperators.operator ++(sbyte2 value) => value + One; + + static sbyte2 IDecrementOperators.operator --(sbyte2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out sbyte2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(sbyte2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out sbyte2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(sbyte2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out sbyte2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(sbyte2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct sbyte2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Divide(sbyte2 a, sbyte b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Multiply(sbyte2 a, sbyte b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Multiply(sbyte a, sbyte2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator *(sbyte2 a, sbyte b) + { + return new((sbyte)(a.X * b), (sbyte)(a.Y * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator /(sbyte2 a, sbyte b) + { + return new((sbyte)(a.X / b), (sbyte)(a.Y / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator *(sbyte a, sbyte2 b) + { + return new((sbyte)(a * b.X), (sbyte)(a * b.Y)); + } +} + +// INumber +public partial struct sbyte2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Clamp(sbyte2 value, sbyte2 min, sbyte2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Max(sbyte2 a, sbyte2 b) + { + return new(sbyte.Max(a.X, b.X), sbyte.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 Min(sbyte2 a, sbyte2 b) + { + return new(sbyte.Min(a.X, b.X), sbyte.Min(a.Y, b.Y)); + } + + static sbyte2 INumber.MaxNumber(sbyte2 a, sbyte2 b) => Max(a, b); + + static sbyte2 INumber.MinNumber(sbyte2 a, sbyte2 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 CopySign(sbyte2 value, sbyte2 sign) + { + return new sbyte2(sbyte.CopySign(value.X, sign.X), sbyte.CopySign(value.Y, sign.Y)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static sbyte2 INumber.ClampNative(sbyte2 value, sbyte2 min, sbyte2 max) => Clamp(value, min, max); + + static sbyte2 INumber.MaxNative(sbyte2 a, sbyte2 b) => Max(a, b); + + static sbyte2 INumber.MinNative(sbyte2 a, sbyte2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(sbyte2 value) => + throw new NotSupportedException($"{nameof(sbyte2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte2 operator %(sbyte2 a, sbyte2 b) + { + return new sbyte2((sbyte)(a.X % b.X), (sbyte)(a.Y % b.Y)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(sbyte2)} has no total order."); + + int IComparable.CompareTo(sbyte2 other) => + throw new NotSupportedException($"{nameof(sbyte2)} has no total order."); + + static bool IComparisonOperators.operator <(sbyte2 a, sbyte2 b) => + throw new NotSupportedException($"{nameof(sbyte2)} has no total order."); + + static bool IComparisonOperators.operator <=(sbyte2 a, sbyte2 b) => + throw new NotSupportedException($"{nameof(sbyte2)} has no total order."); + + static bool IComparisonOperators.operator >(sbyte2 a, sbyte2 b) => + throw new NotSupportedException($"{nameof(sbyte2)} has no total order."); + + static bool IComparisonOperators.operator >=(sbyte2 a, sbyte2 b) => + throw new NotSupportedException($"{nameof(sbyte2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct sbyte2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(sbyte2 a, sbyte2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(sbyte2 a, sbyte2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(sbyte2 a, sbyte2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(sbyte2 a, sbyte2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(sbyte2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(sbyte2 value) + { + return new bool2(sbyte.IsEvenInteger(value.X), sbyte.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(sbyte2 value) + { + return new bool2(sbyte.IsOddInteger(value.X), sbyte.IsOddInteger(value.Y)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegative(sbyte2 value) + { + return new bool2(sbyte.IsNegative(value.X), sbyte.IsNegative(value.Y)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositive(sbyte2 value) + { + return new bool2(sbyte.IsPositive(value.X), sbyte.IsPositive(value.Y)); + } +} + +// ISignedNumber +public partial struct sbyte2 : ISignedNumber +{ + /// + public static sbyte2 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.pack.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.pack.gen.cs new file mode 100644 index 0000000..6565f5e --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte2 +{ + public static sbyte2 Pack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte2 result, elementConverter); + return result; + } + + public static sbyte2 Pack(in byte2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Byte.ToSByte(mode)); + } + + public static sbyte2 Pack(in short2 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Short.ToSByte(mode)); + } + + public static sbyte2 Pack(in ushort2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UShort.ToSByte(mode)); + } + + public static sbyte2 Pack(in int2 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Int.ToSByte(mode)); + } + + public static sbyte2 Pack(in uint2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToSByte(mode)); + } + + public static sbyte2 Pack(in float2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToSByte(mode)); + } + + public static sbyte2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Byte.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Short.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToSByte(mode)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte2/sbyte2.swizzle.gen.cs b/Brutal.Numerics/Vector/sbyte2/sbyte2.swizzle.gen.cs new file mode 100644 index 0000000..82ca4b5 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte2/sbyte2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public sbyte2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public sbyte2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct sbyte2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public sbyte R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public sbyte G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public sbyte2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public sbyte2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.copy.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.copy.gen.cs new file mode 100644 index 0000000..a72fcbe --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.equality.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.equality.gen.cs new file mode 100644 index 0000000..b755ef2 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(sbyte3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is sbyte3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(sbyte3 a, sbyte3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(sbyte3 a, sbyte3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.format.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.format.gen.cs new file mode 100644 index 0000000..960547d --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static sbyte3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static sbyte3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static sbyte3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static sbyte3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid sbyte3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out sbyte3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out sbyte3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out sbyte3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a sbyte3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out sbyte3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.gen.cs new file mode 100644 index 0000000..8b8b83d --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with sbyte components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct sbyte3 : IVector3 + , ISignedIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(sbyte); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public sbyte X; + + /// + [XmlAttribute] + public sbyte Y; + + /// + [XmlAttribute] + public sbyte Z; + + sbyte IVector3.X { readonly get => X; set => X = value; } + + sbyte IVector3.Y { readonly get => Y; set => Y = value; } + + sbyte IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte3(sbyte x, sbyte y, sbyte z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte3(sbyte xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte3(sbyte2 xy, sbyte z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static sbyte3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static sbyte3 UnitX => new(1, 0, 0); + + /// + public static sbyte3 UnitY => new(0, 1, 0); + + /// + public static sbyte3 UnitZ => new(0, 0, 1); + + /// + public sbyte this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out sbyte x, out sbyte y, out sbyte z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.math-metric.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.math-metric.gen.cs new file mode 100644 index 0000000..f37d841 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(sbyte3 a, sbyte3 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(sbyte3 a, sbyte3 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(sbyte3 a, sbyte3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.math.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.math.gen.cs new file mode 100644 index 0000000..b843f7d --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Cross(sbyte3 a, sbyte3 b) + { + return new( + (sbyte)(a.Y * b.Z - a.Z * b.Y), + (sbyte)(a.Z * b.X - a.X * b.Z), + (sbyte)(a.X * b.Y - a.Y * b.X)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.numerics-binary.gen.cs new file mode 100644 index 0000000..9c6fe4e --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct sbyte3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(sbyte3 value) + { + return sbyte.IsPow2(value.X) && sbyte.IsPow2(value.Y) && sbyte.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Log2(sbyte3 value) + { + return new sbyte3(sbyte.Log2(value.X), sbyte.Log2(value.Y), sbyte.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator &(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X & b.X), (sbyte)(a.Y & b.Y), (sbyte)(a.Z & b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator |(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X | b.X), (sbyte)(a.Y | b.Y), (sbyte)(a.Z | b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator ^(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X ^ b.X), (sbyte)(a.Y ^ b.Y), (sbyte)(a.Z ^ b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator ~(sbyte3 value) + { + return new((sbyte)(~value.X), (sbyte)(~value.Y), (sbyte)(~value.Z)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct sbyte3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(sbyte3 value) + { + return new bool3(sbyte.IsPow2(value.X), sbyte.IsPow2(value.Y), sbyte.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct sbyte3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 PopCount(sbyte3 value) + { + return new sbyte3(sbyte.PopCount(value.X), sbyte.PopCount(value.Y), sbyte.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 LeadingZeroCount(sbyte3 value) + { + return new sbyte3(sbyte.LeadingZeroCount(value.X), sbyte.LeadingZeroCount(value.Y), sbyte.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 TrailingZeroCount(sbyte3 value) + { + return new sbyte3(sbyte.TrailingZeroCount(value.X), sbyte.TrailingZeroCount(value.Y), sbyte.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 RotateLeft(sbyte3 value, int rotateAmount) + { + return new sbyte3(sbyte.RotateLeft(value.X, rotateAmount), sbyte.RotateLeft(value.Y, rotateAmount), sbyte.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 RotateRight(sbyte3 value, int rotateAmount) + { + return new sbyte3(sbyte.RotateRight(value.X, rotateAmount), sbyte.RotateRight(value.Y, rotateAmount), sbyte.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.numerics.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.numerics.gen.cs new file mode 100644 index 0000000..d9f3de3 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct sbyte3 : INumberBase +{ + /// + public static sbyte3 Zero => new(0); + + /// + public static sbyte3 One => new(1); + + static sbyte3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static sbyte3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Abs(sbyte3 value) + { + return new sbyte3(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static sbyte WrappingAbs(sbyte value) => + unchecked((sbyte)(value < 0 ? -value : value)); + + static bool INumberBase.IsCanonical(sbyte3 value) => true; + + static bool INumberBase.IsComplexNumber(sbyte3 value) => false; + + static bool INumberBase.IsImaginaryNumber(sbyte3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(sbyte3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(sbyte3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(sbyte3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(sbyte3 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(sbyte3 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0; + } + + static bool INumberBase.IsFinite(sbyte3 value) => true; + + static bool INumberBase.IsInfinity(sbyte3 value) => false; + + static bool INumberBase.IsNegativeInfinity(sbyte3 value) => false; + + static bool INumberBase.IsPositiveInfinity(sbyte3 value) => false; + + static bool INumberBase.IsInteger(sbyte3 value) => true; + + static bool INumberBase.IsRealNumber(sbyte3 value) => true; + + static bool INumberBase.IsNaN(sbyte3 value) => false; + + static bool INumberBase.IsNormal(sbyte3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(sbyte3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 MaxMagnitude(sbyte3 a, sbyte3 b) + { + return new sbyte3(sbyte.MaxMagnitude(a.X, b.X), sbyte.MaxMagnitude(a.Y, b.Y), sbyte.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 MaxMagnitudeNumber(sbyte3 a, sbyte3 b) + { + return new sbyte3(sbyte.MaxMagnitude(a.X, b.X), sbyte.MaxMagnitude(a.Y, b.Y), sbyte.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 MinMagnitude(sbyte3 a, sbyte3 b) + { + return new sbyte3(sbyte.MinMagnitude(a.X, b.X), sbyte.MinMagnitude(a.Y, b.Y), sbyte.MinMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 MinMagnitudeNumber(sbyte3 a, sbyte3 b) + { + return new sbyte3(sbyte.MinMagnitude(a.X, b.X), sbyte.MinMagnitude(a.Y, b.Y), sbyte.MinMagnitude(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Add(sbyte3 a, sbyte3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Divide(sbyte3 a, sbyte3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Multiply(sbyte3 a, sbyte3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Negate(sbyte3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Subtract(sbyte3 a, sbyte3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator +(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X + b.X), (sbyte)(a.Y + b.Y), (sbyte)(a.Z + b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator -(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X - b.X), (sbyte)(a.Y - b.Y), (sbyte)(a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator *(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X * b.X), (sbyte)(a.Y * b.Y), (sbyte)(a.Z * b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator /(sbyte3 a, sbyte3 b) + { + return new((sbyte)(a.X / b.X), (sbyte)(a.Y / b.Y), (sbyte)(a.Z / b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator -(sbyte3 a) + { + return new((sbyte)(-a.X), (sbyte)(-a.Y), (sbyte)(-a.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator +(sbyte3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static sbyte3 IIncrementOperators.operator ++(sbyte3 value) => value + One; + + static sbyte3 IDecrementOperators.operator --(sbyte3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out sbyte3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(sbyte3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out sbyte3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(sbyte3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out sbyte3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(sbyte3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct sbyte3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Divide(sbyte3 a, sbyte b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Multiply(sbyte3 a, sbyte b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Multiply(sbyte a, sbyte3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator *(sbyte3 a, sbyte b) + { + return new((sbyte)(a.X * b), (sbyte)(a.Y * b), (sbyte)(a.Z * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator /(sbyte3 a, sbyte b) + { + return new((sbyte)(a.X / b), (sbyte)(a.Y / b), (sbyte)(a.Z / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator *(sbyte a, sbyte3 b) + { + return new((sbyte)(a * b.X), (sbyte)(a * b.Y), (sbyte)(a * b.Z)); + } +} + +// INumber +public partial struct sbyte3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Clamp(sbyte3 value, sbyte3 min, sbyte3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Max(sbyte3 a, sbyte3 b) + { + return new(sbyte.Max(a.X, b.X), sbyte.Max(a.Y, b.Y), sbyte.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 Min(sbyte3 a, sbyte3 b) + { + return new(sbyte.Min(a.X, b.X), sbyte.Min(a.Y, b.Y), sbyte.Min(a.Z, b.Z)); + } + + static sbyte3 INumber.MaxNumber(sbyte3 a, sbyte3 b) => Max(a, b); + + static sbyte3 INumber.MinNumber(sbyte3 a, sbyte3 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 CopySign(sbyte3 value, sbyte3 sign) + { + return new sbyte3(sbyte.CopySign(value.X, sign.X), sbyte.CopySign(value.Y, sign.Y), sbyte.CopySign(value.Z, sign.Z)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static sbyte3 INumber.ClampNative(sbyte3 value, sbyte3 min, sbyte3 max) => Clamp(value, min, max); + + static sbyte3 INumber.MaxNative(sbyte3 a, sbyte3 b) => Max(a, b); + + static sbyte3 INumber.MinNative(sbyte3 a, sbyte3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(sbyte3 value) => + throw new NotSupportedException($"{nameof(sbyte3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte3 operator %(sbyte3 a, sbyte3 b) + { + return new sbyte3((sbyte)(a.X % b.X), (sbyte)(a.Y % b.Y), (sbyte)(a.Z % b.Z)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(sbyte3)} has no total order."); + + int IComparable.CompareTo(sbyte3 other) => + throw new NotSupportedException($"{nameof(sbyte3)} has no total order."); + + static bool IComparisonOperators.operator <(sbyte3 a, sbyte3 b) => + throw new NotSupportedException($"{nameof(sbyte3)} has no total order."); + + static bool IComparisonOperators.operator <=(sbyte3 a, sbyte3 b) => + throw new NotSupportedException($"{nameof(sbyte3)} has no total order."); + + static bool IComparisonOperators.operator >(sbyte3 a, sbyte3 b) => + throw new NotSupportedException($"{nameof(sbyte3)} has no total order."); + + static bool IComparisonOperators.operator >=(sbyte3 a, sbyte3 b) => + throw new NotSupportedException($"{nameof(sbyte3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct sbyte3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(sbyte3 a, sbyte3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(sbyte3 a, sbyte3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(sbyte3 a, sbyte3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(sbyte3 a, sbyte3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(sbyte3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(sbyte3 value) + { + return new bool3(sbyte.IsEvenInteger(value.X), sbyte.IsEvenInteger(value.Y), sbyte.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(sbyte3 value) + { + return new bool3(sbyte.IsOddInteger(value.X), sbyte.IsOddInteger(value.Y), sbyte.IsOddInteger(value.Z)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegative(sbyte3 value) + { + return new bool3(sbyte.IsNegative(value.X), sbyte.IsNegative(value.Y), sbyte.IsNegative(value.Z)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositive(sbyte3 value) + { + return new bool3(sbyte.IsPositive(value.X), sbyte.IsPositive(value.Y), sbyte.IsPositive(value.Z)); + } +} + +// ISignedNumber +public partial struct sbyte3 : ISignedNumber +{ + /// + public static sbyte3 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.pack.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.pack.gen.cs new file mode 100644 index 0000000..43e67f9 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 +{ + public static sbyte3 Pack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte3 result, elementConverter); + return result; + } + + public static sbyte3 Pack(in byte3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Byte.ToSByte(mode)); + } + + public static sbyte3 Pack(in short3 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Short.ToSByte(mode)); + } + + public static sbyte3 Pack(in ushort3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UShort.ToSByte(mode)); + } + + public static sbyte3 Pack(in int3 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Int.ToSByte(mode)); + } + + public static sbyte3 Pack(in uint3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToSByte(mode)); + } + + public static sbyte3 Pack(in float3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToSByte(mode)); + } + + public static sbyte3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Byte.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Short.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToSByte(mode)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte3/sbyte3.swizzle.gen.cs b/Brutal.Numerics/Vector/sbyte3/sbyte3.swizzle.gen.cs new file mode 100644 index 0000000..448c77a --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte3/sbyte3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public sbyte2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public sbyte2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public sbyte2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public sbyte2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public sbyte2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public sbyte3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public sbyte3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct sbyte3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public sbyte R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public sbyte G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public sbyte B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public sbyte2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public sbyte2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public sbyte2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public sbyte2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public sbyte2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public sbyte2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.copy.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.copy.gen.cs new file mode 100644 index 0000000..fdbede0 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.equality.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.equality.gen.cs new file mode 100644 index 0000000..2fb8337 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(sbyte4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is sbyte4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(sbyte4 a, sbyte4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(sbyte4 a, sbyte4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.format.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.format.gen.cs new file mode 100644 index 0000000..f1474ea --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static sbyte4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static sbyte4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static sbyte4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static sbyte4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid sbyte4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out sbyte4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out sbyte4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out sbyte4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a sbyte4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out sbyte4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.gen.cs new file mode 100644 index 0000000..dfd0df1 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with sbyte components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct sbyte4 : IVector4 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(sbyte); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public sbyte X; + + /// + [XmlAttribute] + public sbyte Y; + + /// + [XmlAttribute] + public sbyte Z; + + /// + [XmlAttribute] + public sbyte W; + + sbyte IVector4.X { readonly get => X; set => X = value; } + + sbyte IVector4.Y { readonly get => Y; set => Y = value; } + + sbyte IVector4.Z { readonly get => Z; set => Z = value; } + + sbyte IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte4(sbyte x, sbyte y, sbyte z, sbyte w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte4(sbyte xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte4(sbyte3 xyz, sbyte w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte4(sbyte2 xy, sbyte2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte4(sbyte2 xy, sbyte z, sbyte w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static sbyte4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static sbyte4 UnitX => new(1, 0, 0, 0); + + /// + public static sbyte4 UnitY => new(0, 1, 0, 0); + + /// + public static sbyte4 UnitZ => new(0, 0, 1, 0); + + /// + public static sbyte4 UnitW => new(0, 0, 0, 1); + + /// + public sbyte this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out sbyte x, out sbyte y, out sbyte z, out sbyte w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.math-metric.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.math-metric.gen.cs new file mode 100644 index 0000000..561da6b --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(sbyte4 a, sbyte4 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(sbyte4 a, sbyte4 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z) + (a.W - b.W) * (a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(sbyte4 a, sbyte4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.numerics-binary.gen.cs new file mode 100644 index 0000000..7313618 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct sbyte4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(sbyte4 value) + { + return sbyte.IsPow2(value.X) && sbyte.IsPow2(value.Y) && sbyte.IsPow2(value.Z) && sbyte.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Log2(sbyte4 value) + { + return new sbyte4(sbyte.Log2(value.X), sbyte.Log2(value.Y), sbyte.Log2(value.Z), sbyte.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator &(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X & b.X), (sbyte)(a.Y & b.Y), (sbyte)(a.Z & b.Z), (sbyte)(a.W & b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator |(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X | b.X), (sbyte)(a.Y | b.Y), (sbyte)(a.Z | b.Z), (sbyte)(a.W | b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator ^(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X ^ b.X), (sbyte)(a.Y ^ b.Y), (sbyte)(a.Z ^ b.Z), (sbyte)(a.W ^ b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator ~(sbyte4 value) + { + return new((sbyte)(~value.X), (sbyte)(~value.Y), (sbyte)(~value.Z), (sbyte)(~value.W)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct sbyte4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(sbyte4 value) + { + return new bool4(sbyte.IsPow2(value.X), sbyte.IsPow2(value.Y), sbyte.IsPow2(value.Z), sbyte.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct sbyte4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 PopCount(sbyte4 value) + { + return new sbyte4(sbyte.PopCount(value.X), sbyte.PopCount(value.Y), sbyte.PopCount(value.Z), sbyte.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 LeadingZeroCount(sbyte4 value) + { + return new sbyte4(sbyte.LeadingZeroCount(value.X), sbyte.LeadingZeroCount(value.Y), sbyte.LeadingZeroCount(value.Z), sbyte.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 TrailingZeroCount(sbyte4 value) + { + return new sbyte4(sbyte.TrailingZeroCount(value.X), sbyte.TrailingZeroCount(value.Y), sbyte.TrailingZeroCount(value.Z), sbyte.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 RotateLeft(sbyte4 value, int rotateAmount) + { + return new sbyte4(sbyte.RotateLeft(value.X, rotateAmount), sbyte.RotateLeft(value.Y, rotateAmount), sbyte.RotateLeft(value.Z, rotateAmount), sbyte.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 RotateRight(sbyte4 value, int rotateAmount) + { + return new sbyte4(sbyte.RotateRight(value.X, rotateAmount), sbyte.RotateRight(value.Y, rotateAmount), sbyte.RotateRight(value.Z, rotateAmount), sbyte.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.numerics.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.numerics.gen.cs new file mode 100644 index 0000000..159e143 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct sbyte4 : INumberBase +{ + /// + public static sbyte4 Zero => new(0); + + /// + public static sbyte4 One => new(1); + + static sbyte4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static sbyte4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Abs(sbyte4 value) + { + return new sbyte4(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z), WrappingAbs(value.W)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static sbyte WrappingAbs(sbyte value) => + unchecked((sbyte)(value < 0 ? -value : value)); + + static bool INumberBase.IsCanonical(sbyte4 value) => true; + + static bool INumberBase.IsComplexNumber(sbyte4 value) => false; + + static bool INumberBase.IsImaginaryNumber(sbyte4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(sbyte4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(sbyte4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(sbyte4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(sbyte4 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0 && value.W < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(sbyte4 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0 && value.W >= 0; + } + + static bool INumberBase.IsFinite(sbyte4 value) => true; + + static bool INumberBase.IsInfinity(sbyte4 value) => false; + + static bool INumberBase.IsNegativeInfinity(sbyte4 value) => false; + + static bool INumberBase.IsPositiveInfinity(sbyte4 value) => false; + + static bool INumberBase.IsInteger(sbyte4 value) => true; + + static bool INumberBase.IsRealNumber(sbyte4 value) => true; + + static bool INumberBase.IsNaN(sbyte4 value) => false; + + static bool INumberBase.IsNormal(sbyte4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(sbyte4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 MaxMagnitude(sbyte4 a, sbyte4 b) + { + return new sbyte4(sbyte.MaxMagnitude(a.X, b.X), sbyte.MaxMagnitude(a.Y, b.Y), sbyte.MaxMagnitude(a.Z, b.Z), sbyte.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 MaxMagnitudeNumber(sbyte4 a, sbyte4 b) + { + return new sbyte4(sbyte.MaxMagnitude(a.X, b.X), sbyte.MaxMagnitude(a.Y, b.Y), sbyte.MaxMagnitude(a.Z, b.Z), sbyte.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 MinMagnitude(sbyte4 a, sbyte4 b) + { + return new sbyte4(sbyte.MinMagnitude(a.X, b.X), sbyte.MinMagnitude(a.Y, b.Y), sbyte.MinMagnitude(a.Z, b.Z), sbyte.MinMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 MinMagnitudeNumber(sbyte4 a, sbyte4 b) + { + return new sbyte4(sbyte.MinMagnitude(a.X, b.X), sbyte.MinMagnitude(a.Y, b.Y), sbyte.MinMagnitude(a.Z, b.Z), sbyte.MinMagnitude(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Add(sbyte4 a, sbyte4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Divide(sbyte4 a, sbyte4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Multiply(sbyte4 a, sbyte4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Negate(sbyte4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Subtract(sbyte4 a, sbyte4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator +(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X + b.X), (sbyte)(a.Y + b.Y), (sbyte)(a.Z + b.Z), (sbyte)(a.W + b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator -(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X - b.X), (sbyte)(a.Y - b.Y), (sbyte)(a.Z - b.Z), (sbyte)(a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator *(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X * b.X), (sbyte)(a.Y * b.Y), (sbyte)(a.Z * b.Z), (sbyte)(a.W * b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator /(sbyte4 a, sbyte4 b) + { + return new((sbyte)(a.X / b.X), (sbyte)(a.Y / b.Y), (sbyte)(a.Z / b.Z), (sbyte)(a.W / b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator -(sbyte4 a) + { + return new((sbyte)(-a.X), (sbyte)(-a.Y), (sbyte)(-a.Z), (sbyte)(-a.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator +(sbyte4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static sbyte4 IIncrementOperators.operator ++(sbyte4 value) => value + One; + + static sbyte4 IDecrementOperators.operator --(sbyte4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out sbyte4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(sbyte4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out sbyte4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(sbyte4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out sbyte4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(sbyte4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct sbyte4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Divide(sbyte4 a, sbyte b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Multiply(sbyte4 a, sbyte b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Multiply(sbyte a, sbyte4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator *(sbyte4 a, sbyte b) + { + return new((sbyte)(a.X * b), (sbyte)(a.Y * b), (sbyte)(a.Z * b), (sbyte)(a.W * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator /(sbyte4 a, sbyte b) + { + return new((sbyte)(a.X / b), (sbyte)(a.Y / b), (sbyte)(a.Z / b), (sbyte)(a.W / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator *(sbyte a, sbyte4 b) + { + return new((sbyte)(a * b.X), (sbyte)(a * b.Y), (sbyte)(a * b.Z), (sbyte)(a * b.W)); + } +} + +// INumber +public partial struct sbyte4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Clamp(sbyte4 value, sbyte4 min, sbyte4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Max(sbyte4 a, sbyte4 b) + { + return new(sbyte.Max(a.X, b.X), sbyte.Max(a.Y, b.Y), sbyte.Max(a.Z, b.Z), sbyte.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 Min(sbyte4 a, sbyte4 b) + { + return new(sbyte.Min(a.X, b.X), sbyte.Min(a.Y, b.Y), sbyte.Min(a.Z, b.Z), sbyte.Min(a.W, b.W)); + } + + static sbyte4 INumber.MaxNumber(sbyte4 a, sbyte4 b) => Max(a, b); + + static sbyte4 INumber.MinNumber(sbyte4 a, sbyte4 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 CopySign(sbyte4 value, sbyte4 sign) + { + return new sbyte4(sbyte.CopySign(value.X, sign.X), sbyte.CopySign(value.Y, sign.Y), sbyte.CopySign(value.Z, sign.Z), sbyte.CopySign(value.W, sign.W)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static sbyte4 INumber.ClampNative(sbyte4 value, sbyte4 min, sbyte4 max) => Clamp(value, min, max); + + static sbyte4 INumber.MaxNative(sbyte4 a, sbyte4 b) => Max(a, b); + + static sbyte4 INumber.MinNative(sbyte4 a, sbyte4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(sbyte4 value) => + throw new NotSupportedException($"{nameof(sbyte4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static sbyte4 operator %(sbyte4 a, sbyte4 b) + { + return new sbyte4((sbyte)(a.X % b.X), (sbyte)(a.Y % b.Y), (sbyte)(a.Z % b.Z), (sbyte)(a.W % b.W)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(sbyte4)} has no total order."); + + int IComparable.CompareTo(sbyte4 other) => + throw new NotSupportedException($"{nameof(sbyte4)} has no total order."); + + static bool IComparisonOperators.operator <(sbyte4 a, sbyte4 b) => + throw new NotSupportedException($"{nameof(sbyte4)} has no total order."); + + static bool IComparisonOperators.operator <=(sbyte4 a, sbyte4 b) => + throw new NotSupportedException($"{nameof(sbyte4)} has no total order."); + + static bool IComparisonOperators.operator >(sbyte4 a, sbyte4 b) => + throw new NotSupportedException($"{nameof(sbyte4)} has no total order."); + + static bool IComparisonOperators.operator >=(sbyte4 a, sbyte4 b) => + throw new NotSupportedException($"{nameof(sbyte4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct sbyte4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(sbyte4 a, sbyte4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(sbyte4 a, sbyte4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(sbyte4 a, sbyte4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(sbyte4 a, sbyte4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(sbyte4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(sbyte4 value) + { + return new bool4(sbyte.IsEvenInteger(value.X), sbyte.IsEvenInteger(value.Y), sbyte.IsEvenInteger(value.Z), sbyte.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(sbyte4 value) + { + return new bool4(sbyte.IsOddInteger(value.X), sbyte.IsOddInteger(value.Y), sbyte.IsOddInteger(value.Z), sbyte.IsOddInteger(value.W)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegative(sbyte4 value) + { + return new bool4(sbyte.IsNegative(value.X), sbyte.IsNegative(value.Y), sbyte.IsNegative(value.Z), sbyte.IsNegative(value.W)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositive(sbyte4 value) + { + return new bool4(sbyte.IsPositive(value.X), sbyte.IsPositive(value.Y), sbyte.IsPositive(value.Z), sbyte.IsPositive(value.W)); + } +} + +// ISignedNumber +public partial struct sbyte4 : ISignedNumber +{ + /// + public static sbyte4 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.pack.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.pack.gen.cs new file mode 100644 index 0000000..fe761ef --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte4 +{ + public static sbyte4 Pack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out sbyte4 result, elementConverter); + return result; + } + + public static sbyte4 Pack(in byte4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Byte.ToSByte(mode)); + } + + public static sbyte4 Pack(in short4 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Short.ToSByte(mode)); + } + + public static sbyte4 Pack(in ushort4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UShort.ToSByte(mode)); + } + + public static sbyte4 Pack(in int4 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Int.ToSByte(mode)); + } + + public static sbyte4 Pack(in uint4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToSByte(mode)); + } + + public static sbyte4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToSByte(mode)); + } + + public static sbyte4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Byte.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Short.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToSByte(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToSByte(mode)); + } +} diff --git a/Brutal.Numerics/Vector/sbyte4/sbyte4.swizzle.gen.cs b/Brutal.Numerics/Vector/sbyte4/sbyte4.swizzle.gen.cs new file mode 100644 index 0000000..68457b7 --- /dev/null +++ b/Brutal.Numerics/Vector/sbyte4/sbyte4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct sbyte4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public sbyte2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public sbyte2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public sbyte2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public sbyte2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public sbyte2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public sbyte2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public sbyte2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public sbyte2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public sbyte2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public sbyte2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public sbyte2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public sbyte3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public sbyte3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public sbyte3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public sbyte3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public sbyte3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public sbyte3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public sbyte3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public sbyte3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public sbyte3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public sbyte3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public sbyte3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public sbyte3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public sbyte3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public sbyte3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public sbyte4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public sbyte4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public sbyte4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public sbyte4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public sbyte4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public sbyte4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public sbyte4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public sbyte4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public sbyte4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public sbyte4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public sbyte4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public sbyte4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public sbyte4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public sbyte4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public sbyte4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public sbyte4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public sbyte4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public sbyte4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public sbyte4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public sbyte4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public sbyte4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public sbyte4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct sbyte4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public sbyte R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public sbyte G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public sbyte B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public sbyte A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public sbyte2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public sbyte2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public sbyte2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public sbyte2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public sbyte2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public sbyte2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public sbyte2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public sbyte2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public sbyte2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public sbyte3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public sbyte3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public sbyte4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public sbyte4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public sbyte4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public sbyte4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public sbyte4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public sbyte4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public sbyte4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public sbyte4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public sbyte4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public sbyte4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public sbyte4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public sbyte4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public sbyte4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public sbyte4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.copy.gen.cs b/Brutal.Numerics/Vector/short2/short2.copy.gen.cs new file mode 100644 index 0000000..0564bb2 --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.equality.gen.cs b/Brutal.Numerics/Vector/short2/short2.equality.gen.cs new file mode 100644 index 0000000..2ce8c58 --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(short2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is short2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(short2 a, short2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(short2 a, short2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.format.gen.cs b/Brutal.Numerics/Vector/short2/short2.format.gen.cs new file mode 100644 index 0000000..bd9c973 --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static short2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static short2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static short2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static short2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid short2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out short2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out short2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out short2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a short2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out short2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.gen.cs b/Brutal.Numerics/Vector/short2/short2.gen.cs new file mode 100644 index 0000000..f785dc9 --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with short components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct short2 : IVector2 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(short); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public short X; + + /// + [XmlAttribute] + public short Y; + + short IVector2.X { readonly get => X; set => X = value; } + + short IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short2(short x, short y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short2(short xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static short2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static short2 UnitX => new(1, 0); + + /// + public static short2 UnitY => new(0, 1); + + /// + public short this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out short x, out short y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.math-metric.gen.cs b/Brutal.Numerics/Vector/short2/short2.math-metric.gen.cs new file mode 100644 index 0000000..feec6fe --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(short2 a, short2 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(short2 a, short2 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(short2 a, short2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/short2/short2.numerics-binary.gen.cs new file mode 100644 index 0000000..d031c05 --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct short2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(short2 value) + { + return short.IsPow2(value.X) && short.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Log2(short2 value) + { + return new short2(short.Log2(value.X), short.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator &(short2 a, short2 b) + { + return new((short)(a.X & b.X), (short)(a.Y & b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator |(short2 a, short2 b) + { + return new((short)(a.X | b.X), (short)(a.Y | b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator ^(short2 a, short2 b) + { + return new((short)(a.X ^ b.X), (short)(a.Y ^ b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator ~(short2 value) + { + return new((short)(~value.X), (short)(~value.Y)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct short2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(short2 value) + { + return new bool2(short.IsPow2(value.X), short.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct short2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 PopCount(short2 value) + { + return new short2(short.PopCount(value.X), short.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 LeadingZeroCount(short2 value) + { + return new short2(short.LeadingZeroCount(value.X), short.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 TrailingZeroCount(short2 value) + { + return new short2(short.TrailingZeroCount(value.X), short.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 RotateLeft(short2 value, int rotateAmount) + { + return new short2(short.RotateLeft(value.X, rotateAmount), short.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 RotateRight(short2 value, int rotateAmount) + { + return new short2(short.RotateRight(value.X, rotateAmount), short.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.numerics.gen.cs b/Brutal.Numerics/Vector/short2/short2.numerics.gen.cs new file mode 100644 index 0000000..8f7256a --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct short2 : INumberBase +{ + /// + public static short2 Zero => new(0); + + /// + public static short2 One => new(1); + + static short2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static short2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Abs(short2 value) + { + return new short2(WrappingAbs(value.X), WrappingAbs(value.Y)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static short WrappingAbs(short value) => + unchecked((short)(value < 0 ? -value : value)); + + static bool INumberBase.IsCanonical(short2 value) => true; + + static bool INumberBase.IsComplexNumber(short2 value) => false; + + static bool INumberBase.IsImaginaryNumber(short2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(short2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(short2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(short2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(short2 value) + { + return value.X < 0 && value.Y < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(short2 value) + { + return value.X >= 0 && value.Y >= 0; + } + + static bool INumberBase.IsFinite(short2 value) => true; + + static bool INumberBase.IsInfinity(short2 value) => false; + + static bool INumberBase.IsNegativeInfinity(short2 value) => false; + + static bool INumberBase.IsPositiveInfinity(short2 value) => false; + + static bool INumberBase.IsInteger(short2 value) => true; + + static bool INumberBase.IsRealNumber(short2 value) => true; + + static bool INumberBase.IsNaN(short2 value) => false; + + static bool INumberBase.IsNormal(short2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(short2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 MaxMagnitude(short2 a, short2 b) + { + return new short2(short.MaxMagnitude(a.X, b.X), short.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 MaxMagnitudeNumber(short2 a, short2 b) + { + return new short2(short.MaxMagnitude(a.X, b.X), short.MaxMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 MinMagnitude(short2 a, short2 b) + { + return new short2(short.MinMagnitude(a.X, b.X), short.MinMagnitude(a.Y, b.Y)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 MinMagnitudeNumber(short2 a, short2 b) + { + return new short2(short.MinMagnitude(a.X, b.X), short.MinMagnitude(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Add(short2 a, short2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Divide(short2 a, short2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Multiply(short2 a, short2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Negate(short2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Subtract(short2 a, short2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator +(short2 a, short2 b) + { + return new((short)(a.X + b.X), (short)(a.Y + b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator -(short2 a, short2 b) + { + return new((short)(a.X - b.X), (short)(a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator *(short2 a, short2 b) + { + return new((short)(a.X * b.X), (short)(a.Y * b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator /(short2 a, short2 b) + { + return new((short)(a.X / b.X), (short)(a.Y / b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator -(short2 a) + { + return new((short)(-a.X), (short)(-a.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator +(short2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static short2 IIncrementOperators.operator ++(short2 value) => value + One; + + static short2 IDecrementOperators.operator --(short2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out short2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(short2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out short2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(short2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out short2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(short2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct short2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Divide(short2 a, short b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Multiply(short2 a, short b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Multiply(short a, short2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator *(short2 a, short b) + { + return new((short)(a.X * b), (short)(a.Y * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator /(short2 a, short b) + { + return new((short)(a.X / b), (short)(a.Y / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator *(short a, short2 b) + { + return new((short)(a * b.X), (short)(a * b.Y)); + } +} + +// INumber +public partial struct short2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Clamp(short2 value, short2 min, short2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Max(short2 a, short2 b) + { + return new(short.Max(a.X, b.X), short.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 Min(short2 a, short2 b) + { + return new(short.Min(a.X, b.X), short.Min(a.Y, b.Y)); + } + + static short2 INumber.MaxNumber(short2 a, short2 b) => Max(a, b); + + static short2 INumber.MinNumber(short2 a, short2 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 CopySign(short2 value, short2 sign) + { + return new short2(short.CopySign(value.X, sign.X), short.CopySign(value.Y, sign.Y)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static short2 INumber.ClampNative(short2 value, short2 min, short2 max) => Clamp(value, min, max); + + static short2 INumber.MaxNative(short2 a, short2 b) => Max(a, b); + + static short2 INumber.MinNative(short2 a, short2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(short2 value) => + throw new NotSupportedException($"{nameof(short2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short2 operator %(short2 a, short2 b) + { + return new short2((short)(a.X % b.X), (short)(a.Y % b.Y)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(short2)} has no total order."); + + int IComparable.CompareTo(short2 other) => + throw new NotSupportedException($"{nameof(short2)} has no total order."); + + static bool IComparisonOperators.operator <(short2 a, short2 b) => + throw new NotSupportedException($"{nameof(short2)} has no total order."); + + static bool IComparisonOperators.operator <=(short2 a, short2 b) => + throw new NotSupportedException($"{nameof(short2)} has no total order."); + + static bool IComparisonOperators.operator >(short2 a, short2 b) => + throw new NotSupportedException($"{nameof(short2)} has no total order."); + + static bool IComparisonOperators.operator >=(short2 a, short2 b) => + throw new NotSupportedException($"{nameof(short2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct short2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(short2 a, short2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(short2 a, short2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(short2 a, short2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(short2 a, short2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(short2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(short2 value) + { + return new bool2(short.IsEvenInteger(value.X), short.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(short2 value) + { + return new bool2(short.IsOddInteger(value.X), short.IsOddInteger(value.Y)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsNegative(short2 value) + { + return new bool2(short.IsNegative(value.X), short.IsNegative(value.Y)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPositive(short2 value) + { + return new bool2(short.IsPositive(value.X), short.IsPositive(value.Y)); + } +} + +// ISignedNumber +public partial struct short2 : ISignedNumber +{ + /// + public static short2 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/short2/short2.pack.gen.cs b/Brutal.Numerics/Vector/short2/short2.pack.gen.cs new file mode 100644 index 0000000..84da6a3 --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short2 +{ + public static short2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Unpack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Pack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Pack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Pack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Pack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short2 result, elementConverter); + return result; + } + + public static short2 Unpack(in sbyte2 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.SByte.ToShort(mode)); + } + + public static short2 Unpack(in byte2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Byte.ToShort(mode)); + } + + public static short2 Pack(in ushort2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UShort.ToShort(mode)); + } + + public static short2 Pack(in int2 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Int.ToShort(mode)); + } + + public static short2 Pack(in uint2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToShort(mode)); + } + + public static short2 Pack(in float2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToShort(mode)); + } + + public static short2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToShort(mode)); + } +} diff --git a/Brutal.Numerics/Vector/short2/short2.swizzle.gen.cs b/Brutal.Numerics/Vector/short2/short2.swizzle.gen.cs new file mode 100644 index 0000000..36c5bff --- /dev/null +++ b/Brutal.Numerics/Vector/short2/short2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public short2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public short2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct short2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public short R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public short G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public short2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public short2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.copy.gen.cs b/Brutal.Numerics/Vector/short3/short3.copy.gen.cs new file mode 100644 index 0000000..760b562 --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.equality.gen.cs b/Brutal.Numerics/Vector/short3/short3.equality.gen.cs new file mode 100644 index 0000000..724c45a --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(short3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is short3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(short3 a, short3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(short3 a, short3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.format.gen.cs b/Brutal.Numerics/Vector/short3/short3.format.gen.cs new file mode 100644 index 0000000..c445b97 --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static short3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static short3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static short3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static short3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid short3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out short3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out short3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out short3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a short3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out short3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.gen.cs b/Brutal.Numerics/Vector/short3/short3.gen.cs new file mode 100644 index 0000000..1d4920b --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with short components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct short3 : IVector3 + , ISignedIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(short); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public short X; + + /// + [XmlAttribute] + public short Y; + + /// + [XmlAttribute] + public short Z; + + short IVector3.X { readonly get => X; set => X = value; } + + short IVector3.Y { readonly get => Y; set => Y = value; } + + short IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short3(short x, short y, short z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short3(short xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short3(short2 xy, short z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static short3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static short3 UnitX => new(1, 0, 0); + + /// + public static short3 UnitY => new(0, 1, 0); + + /// + public static short3 UnitZ => new(0, 0, 1); + + /// + public short this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out short x, out short y, out short z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.math-metric.gen.cs b/Brutal.Numerics/Vector/short3/short3.math-metric.gen.cs new file mode 100644 index 0000000..06611f8 --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(short3 a, short3 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(short3 a, short3 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(short3 a, short3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.math.gen.cs b/Brutal.Numerics/Vector/short3/short3.math.gen.cs new file mode 100644 index 0000000..e6848e6 --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Cross(short3 a, short3 b) + { + return new( + (short)(a.Y * b.Z - a.Z * b.Y), + (short)(a.Z * b.X - a.X * b.Z), + (short)(a.X * b.Y - a.Y * b.X)); + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/short3/short3.numerics-binary.gen.cs new file mode 100644 index 0000000..b2e55eb --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct short3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(short3 value) + { + return short.IsPow2(value.X) && short.IsPow2(value.Y) && short.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Log2(short3 value) + { + return new short3(short.Log2(value.X), short.Log2(value.Y), short.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator &(short3 a, short3 b) + { + return new((short)(a.X & b.X), (short)(a.Y & b.Y), (short)(a.Z & b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator |(short3 a, short3 b) + { + return new((short)(a.X | b.X), (short)(a.Y | b.Y), (short)(a.Z | b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator ^(short3 a, short3 b) + { + return new((short)(a.X ^ b.X), (short)(a.Y ^ b.Y), (short)(a.Z ^ b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator ~(short3 value) + { + return new((short)(~value.X), (short)(~value.Y), (short)(~value.Z)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct short3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(short3 value) + { + return new bool3(short.IsPow2(value.X), short.IsPow2(value.Y), short.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct short3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 PopCount(short3 value) + { + return new short3(short.PopCount(value.X), short.PopCount(value.Y), short.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 LeadingZeroCount(short3 value) + { + return new short3(short.LeadingZeroCount(value.X), short.LeadingZeroCount(value.Y), short.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 TrailingZeroCount(short3 value) + { + return new short3(short.TrailingZeroCount(value.X), short.TrailingZeroCount(value.Y), short.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 RotateLeft(short3 value, int rotateAmount) + { + return new short3(short.RotateLeft(value.X, rotateAmount), short.RotateLeft(value.Y, rotateAmount), short.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 RotateRight(short3 value, int rotateAmount) + { + return new short3(short.RotateRight(value.X, rotateAmount), short.RotateRight(value.Y, rotateAmount), short.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.numerics.gen.cs b/Brutal.Numerics/Vector/short3/short3.numerics.gen.cs new file mode 100644 index 0000000..b539c4d --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct short3 : INumberBase +{ + /// + public static short3 Zero => new(0); + + /// + public static short3 One => new(1); + + static short3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static short3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Abs(short3 value) + { + return new short3(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static short WrappingAbs(short value) => + unchecked((short)(value < 0 ? -value : value)); + + static bool INumberBase.IsCanonical(short3 value) => true; + + static bool INumberBase.IsComplexNumber(short3 value) => false; + + static bool INumberBase.IsImaginaryNumber(short3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(short3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(short3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(short3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(short3 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(short3 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0; + } + + static bool INumberBase.IsFinite(short3 value) => true; + + static bool INumberBase.IsInfinity(short3 value) => false; + + static bool INumberBase.IsNegativeInfinity(short3 value) => false; + + static bool INumberBase.IsPositiveInfinity(short3 value) => false; + + static bool INumberBase.IsInteger(short3 value) => true; + + static bool INumberBase.IsRealNumber(short3 value) => true; + + static bool INumberBase.IsNaN(short3 value) => false; + + static bool INumberBase.IsNormal(short3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(short3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 MaxMagnitude(short3 a, short3 b) + { + return new short3(short.MaxMagnitude(a.X, b.X), short.MaxMagnitude(a.Y, b.Y), short.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 MaxMagnitudeNumber(short3 a, short3 b) + { + return new short3(short.MaxMagnitude(a.X, b.X), short.MaxMagnitude(a.Y, b.Y), short.MaxMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 MinMagnitude(short3 a, short3 b) + { + return new short3(short.MinMagnitude(a.X, b.X), short.MinMagnitude(a.Y, b.Y), short.MinMagnitude(a.Z, b.Z)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 MinMagnitudeNumber(short3 a, short3 b) + { + return new short3(short.MinMagnitude(a.X, b.X), short.MinMagnitude(a.Y, b.Y), short.MinMagnitude(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Add(short3 a, short3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Divide(short3 a, short3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Multiply(short3 a, short3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Negate(short3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Subtract(short3 a, short3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator +(short3 a, short3 b) + { + return new((short)(a.X + b.X), (short)(a.Y + b.Y), (short)(a.Z + b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator -(short3 a, short3 b) + { + return new((short)(a.X - b.X), (short)(a.Y - b.Y), (short)(a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator *(short3 a, short3 b) + { + return new((short)(a.X * b.X), (short)(a.Y * b.Y), (short)(a.Z * b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator /(short3 a, short3 b) + { + return new((short)(a.X / b.X), (short)(a.Y / b.Y), (short)(a.Z / b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator -(short3 a) + { + return new((short)(-a.X), (short)(-a.Y), (short)(-a.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator +(short3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static short3 IIncrementOperators.operator ++(short3 value) => value + One; + + static short3 IDecrementOperators.operator --(short3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out short3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(short3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out short3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(short3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out short3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(short3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct short3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Divide(short3 a, short b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Multiply(short3 a, short b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Multiply(short a, short3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator *(short3 a, short b) + { + return new((short)(a.X * b), (short)(a.Y * b), (short)(a.Z * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator /(short3 a, short b) + { + return new((short)(a.X / b), (short)(a.Y / b), (short)(a.Z / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator *(short a, short3 b) + { + return new((short)(a * b.X), (short)(a * b.Y), (short)(a * b.Z)); + } +} + +// INumber +public partial struct short3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Clamp(short3 value, short3 min, short3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Max(short3 a, short3 b) + { + return new(short.Max(a.X, b.X), short.Max(a.Y, b.Y), short.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 Min(short3 a, short3 b) + { + return new(short.Min(a.X, b.X), short.Min(a.Y, b.Y), short.Min(a.Z, b.Z)); + } + + static short3 INumber.MaxNumber(short3 a, short3 b) => Max(a, b); + + static short3 INumber.MinNumber(short3 a, short3 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 CopySign(short3 value, short3 sign) + { + return new short3(short.CopySign(value.X, sign.X), short.CopySign(value.Y, sign.Y), short.CopySign(value.Z, sign.Z)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static short3 INumber.ClampNative(short3 value, short3 min, short3 max) => Clamp(value, min, max); + + static short3 INumber.MaxNative(short3 a, short3 b) => Max(a, b); + + static short3 INumber.MinNative(short3 a, short3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(short3 value) => + throw new NotSupportedException($"{nameof(short3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short3 operator %(short3 a, short3 b) + { + return new short3((short)(a.X % b.X), (short)(a.Y % b.Y), (short)(a.Z % b.Z)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(short3)} has no total order."); + + int IComparable.CompareTo(short3 other) => + throw new NotSupportedException($"{nameof(short3)} has no total order."); + + static bool IComparisonOperators.operator <(short3 a, short3 b) => + throw new NotSupportedException($"{nameof(short3)} has no total order."); + + static bool IComparisonOperators.operator <=(short3 a, short3 b) => + throw new NotSupportedException($"{nameof(short3)} has no total order."); + + static bool IComparisonOperators.operator >(short3 a, short3 b) => + throw new NotSupportedException($"{nameof(short3)} has no total order."); + + static bool IComparisonOperators.operator >=(short3 a, short3 b) => + throw new NotSupportedException($"{nameof(short3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct short3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(short3 a, short3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(short3 a, short3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(short3 a, short3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(short3 a, short3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(short3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(short3 value) + { + return new bool3(short.IsEvenInteger(value.X), short.IsEvenInteger(value.Y), short.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(short3 value) + { + return new bool3(short.IsOddInteger(value.X), short.IsOddInteger(value.Y), short.IsOddInteger(value.Z)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsNegative(short3 value) + { + return new bool3(short.IsNegative(value.X), short.IsNegative(value.Y), short.IsNegative(value.Z)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPositive(short3 value) + { + return new bool3(short.IsPositive(value.X), short.IsPositive(value.Y), short.IsPositive(value.Z)); + } +} + +// ISignedNumber +public partial struct short3 : ISignedNumber +{ + /// + public static short3 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/short3/short3.pack.gen.cs b/Brutal.Numerics/Vector/short3/short3.pack.gen.cs new file mode 100644 index 0000000..17c6f38 --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 +{ + public static short3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Unpack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Pack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Pack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Pack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Pack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short3 result, elementConverter); + return result; + } + + public static short3 Unpack(in sbyte3 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.SByte.ToShort(mode)); + } + + public static short3 Unpack(in byte3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Byte.ToShort(mode)); + } + + public static short3 Pack(in ushort3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UShort.ToShort(mode)); + } + + public static short3 Pack(in int3 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Int.ToShort(mode)); + } + + public static short3 Pack(in uint3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToShort(mode)); + } + + public static short3 Pack(in float3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToShort(mode)); + } + + public static short3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToShort(mode)); + } +} diff --git a/Brutal.Numerics/Vector/short3/short3.swizzle.gen.cs b/Brutal.Numerics/Vector/short3/short3.swizzle.gen.cs new file mode 100644 index 0000000..d213505 --- /dev/null +++ b/Brutal.Numerics/Vector/short3/short3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public short2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public short2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public short2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public short2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public short2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public short2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public short3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public short3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public short3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public short3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public short3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public short3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct short3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public short R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public short G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public short B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public short2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public short2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public short2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public short2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public short2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public short2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public short3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public short3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public short3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public short3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public short3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public short3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.copy.gen.cs b/Brutal.Numerics/Vector/short4/short4.copy.gen.cs new file mode 100644 index 0000000..e0d9497 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.equality.gen.cs b/Brutal.Numerics/Vector/short4/short4.equality.gen.cs new file mode 100644 index 0000000..5c1d2c1 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(short4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is short4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(short4 a, short4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(short4 a, short4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.format.gen.cs b/Brutal.Numerics/Vector/short4/short4.format.gen.cs new file mode 100644 index 0000000..1259518 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static short4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static short4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static short4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static short4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid short4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out short4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out short4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out short4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a short4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out short4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.gen.cs b/Brutal.Numerics/Vector/short4/short4.gen.cs new file mode 100644 index 0000000..f46d51b --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with short components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct short4 : IVector4 + , ISignedIntegerVector +{ + /// + public static int ComponentSize => sizeof(short); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public short X; + + /// + [XmlAttribute] + public short Y; + + /// + [XmlAttribute] + public short Z; + + /// + [XmlAttribute] + public short W; + + short IVector4.X { readonly get => X; set => X = value; } + + short IVector4.Y { readonly get => Y; set => Y = value; } + + short IVector4.Z { readonly get => Z; set => Z = value; } + + short IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short4(short x, short y, short z, short w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short4(short xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short4(short3 xyz, short w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short4(short2 xy, short2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short4(short2 xy, short z, short w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public short4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static short4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static short4 UnitX => new(1, 0, 0, 0); + + /// + public static short4 UnitY => new(0, 1, 0, 0); + + /// + public static short4 UnitZ => new(0, 0, 1, 0); + + /// + public static short4 UnitW => new(0, 0, 0, 1); + + /// + public short this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out short x, out short y, out short z, out short w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.math-metric.gen.cs b/Brutal.Numerics/Vector/short4/short4.math-metric.gen.cs new file mode 100644 index 0000000..060bfe1 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(short4 a, short4 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(short4 a, short4 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z) + (a.W - b.W) * (a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(short4 a, short4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/short4/short4.numerics-binary.gen.cs new file mode 100644 index 0000000..3b8ea90 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct short4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(short4 value) + { + return short.IsPow2(value.X) && short.IsPow2(value.Y) && short.IsPow2(value.Z) && short.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Log2(short4 value) + { + return new short4(short.Log2(value.X), short.Log2(value.Y), short.Log2(value.Z), short.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator &(short4 a, short4 b) + { + return new((short)(a.X & b.X), (short)(a.Y & b.Y), (short)(a.Z & b.Z), (short)(a.W & b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator |(short4 a, short4 b) + { + return new((short)(a.X | b.X), (short)(a.Y | b.Y), (short)(a.Z | b.Z), (short)(a.W | b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator ^(short4 a, short4 b) + { + return new((short)(a.X ^ b.X), (short)(a.Y ^ b.Y), (short)(a.Z ^ b.Z), (short)(a.W ^ b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator ~(short4 value) + { + return new((short)(~value.X), (short)(~value.Y), (short)(~value.Z), (short)(~value.W)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct short4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(short4 value) + { + return new bool4(short.IsPow2(value.X), short.IsPow2(value.Y), short.IsPow2(value.Z), short.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct short4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 PopCount(short4 value) + { + return new short4(short.PopCount(value.X), short.PopCount(value.Y), short.PopCount(value.Z), short.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 LeadingZeroCount(short4 value) + { + return new short4(short.LeadingZeroCount(value.X), short.LeadingZeroCount(value.Y), short.LeadingZeroCount(value.Z), short.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 TrailingZeroCount(short4 value) + { + return new short4(short.TrailingZeroCount(value.X), short.TrailingZeroCount(value.Y), short.TrailingZeroCount(value.Z), short.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 RotateLeft(short4 value, int rotateAmount) + { + return new short4(short.RotateLeft(value.X, rotateAmount), short.RotateLeft(value.Y, rotateAmount), short.RotateLeft(value.Z, rotateAmount), short.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 RotateRight(short4 value, int rotateAmount) + { + return new short4(short.RotateRight(value.X, rotateAmount), short.RotateRight(value.Y, rotateAmount), short.RotateRight(value.Z, rotateAmount), short.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.numerics.gen.cs b/Brutal.Numerics/Vector/short4/short4.numerics.gen.cs new file mode 100644 index 0000000..2acf0f2 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.numerics.gen.cs @@ -0,0 +1,438 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct short4 : INumberBase +{ + /// + public static short4 Zero => new(0); + + /// + public static short4 One => new(1); + + static short4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static short4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Abs(short4 value) + { + return new short4(WrappingAbs(value.X), WrappingAbs(value.Y), WrappingAbs(value.Z), WrappingAbs(value.W)); + } + + /* |MinValue| is unrepresentable, so that lane keeps MinValue and Abs can return a NEGATIVE + * number. Deliberate, settled 2026-08-25: Math.Abs throws there instead, which kills a whole + * vector for one pathological lane. Everyone else wraps - HLSL, GLSL, SPIR-V SAbs, LLVM's + * llvm.abs on its non-poison branch, and .NET's own Vector128.Abs, whose Scalar.Abs even + * carries the comment "avoid Math.Abs for integers since it throws for MinValue". + * unchecked is explicit because the wrap IS the contract here: on the narrow types the + * truncating cast is what performs it (-short.MinValue widens to 32768, which no short holds), + * so this must not depend on the project's overflow setting. */ + private static short WrappingAbs(short value) => + unchecked((short)(value < 0 ? -value : value)); + + static bool INumberBase.IsCanonical(short4 value) => true; + + static bool INumberBase.IsComplexNumber(short4 value) => false; + + static bool INumberBase.IsImaginaryNumber(short4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(short4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(short4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(short4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + /// Determines if every component of a value is negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsNegative(short4 value) + { + return value.X < 0 && value.Y < 0 && value.Z < 0 && value.W < 0; + } + + /// Determines if every component of a value is positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsPositive(short4 value) + { + return value.X >= 0 && value.Y >= 0 && value.Z >= 0 && value.W >= 0; + } + + static bool INumberBase.IsFinite(short4 value) => true; + + static bool INumberBase.IsInfinity(short4 value) => false; + + static bool INumberBase.IsNegativeInfinity(short4 value) => false; + + static bool INumberBase.IsPositiveInfinity(short4 value) => false; + + static bool INumberBase.IsInteger(short4 value) => true; + + static bool INumberBase.IsRealNumber(short4 value) => true; + + static bool INumberBase.IsNaN(short4 value) => false; + + static bool INumberBase.IsNormal(short4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(short4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 MaxMagnitude(short4 a, short4 b) + { + return new short4(short.MaxMagnitude(a.X, b.X), short.MaxMagnitude(a.Y, b.Y), short.MaxMagnitude(a.Z, b.Z), short.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 MaxMagnitudeNumber(short4 a, short4 b) + { + return new short4(short.MaxMagnitude(a.X, b.X), short.MaxMagnitude(a.Y, b.Y), short.MaxMagnitude(a.Z, b.Z), short.MaxMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 MinMagnitude(short4 a, short4 b) + { + return new short4(short.MinMagnitude(a.X, b.X), short.MinMagnitude(a.Y, b.Y), short.MinMagnitude(a.Z, b.Z), short.MinMagnitude(a.W, b.W)); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 MinMagnitudeNumber(short4 a, short4 b) + { + return new short4(short.MinMagnitude(a.X, b.X), short.MinMagnitude(a.Y, b.Y), short.MinMagnitude(a.Z, b.Z), short.MinMagnitude(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Add(short4 a, short4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Divide(short4 a, short4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Multiply(short4 a, short4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Negate(short4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Subtract(short4 a, short4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator +(short4 a, short4 b) + { + return new((short)(a.X + b.X), (short)(a.Y + b.Y), (short)(a.Z + b.Z), (short)(a.W + b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator -(short4 a, short4 b) + { + return new((short)(a.X - b.X), (short)(a.Y - b.Y), (short)(a.Z - b.Z), (short)(a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator *(short4 a, short4 b) + { + return new((short)(a.X * b.X), (short)(a.Y * b.Y), (short)(a.Z * b.Z), (short)(a.W * b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator /(short4 a, short4 b) + { + return new((short)(a.X / b.X), (short)(a.Y / b.Y), (short)(a.Z / b.Z), (short)(a.W / b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator -(short4 a) + { + return new((short)(-a.X), (short)(-a.Y), (short)(-a.Z), (short)(-a.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator +(short4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static short4 IIncrementOperators.operator ++(short4 value) => value + One; + + static short4 IDecrementOperators.operator --(short4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out short4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(short4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out short4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(short4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out short4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(short4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct short4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Divide(short4 a, short b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Multiply(short4 a, short b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Multiply(short a, short4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator *(short4 a, short b) + { + return new((short)(a.X * b), (short)(a.Y * b), (short)(a.Z * b), (short)(a.W * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator /(short4 a, short b) + { + return new((short)(a.X / b), (short)(a.Y / b), (short)(a.Z / b), (short)(a.W / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator *(short a, short4 b) + { + return new((short)(a * b.X), (short)(a * b.Y), (short)(a * b.Z), (short)(a * b.W)); + } +} + +// INumber +public partial struct short4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Clamp(short4 value, short4 min, short4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Max(short4 a, short4 b) + { + return new(short.Max(a.X, b.X), short.Max(a.Y, b.Y), short.Max(a.Z, b.Z), short.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 Min(short4 a, short4 b) + { + return new(short.Min(a.X, b.X), short.Min(a.Y, b.Y), short.Min(a.Z, b.Z), short.Min(a.W, b.W)); + } + + static short4 INumber.MaxNumber(short4 a, short4 b) => Max(a, b); + + static short4 INumber.MinNumber(short4 a, short4 b) => Min(a, b); + + /// Copies, componentwise, the sign of onto the magnitude of . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 CopySign(short4 value, short4 sign) + { + return new short4(short.CopySign(value.X, sign.X), short.CopySign(value.Y, sign.Y), short.CopySign(value.Z, sign.Z), short.CopySign(value.W, sign.W)); + } + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static short4 INumber.ClampNative(short4 value, short4 min, short4 max) => Clamp(value, min, max); + + static short4 INumber.MaxNative(short4 a, short4 b) => Max(a, b); + + static short4 INumber.MinNative(short4 a, short4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(short4 value) => + throw new NotSupportedException($"{nameof(short4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short4 operator %(short4 a, short4 b) + { + return new short4((short)(a.X % b.X), (short)(a.Y % b.Y), (short)(a.Z % b.Z), (short)(a.W % b.W)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(short4)} has no total order."); + + int IComparable.CompareTo(short4 other) => + throw new NotSupportedException($"{nameof(short4)} has no total order."); + + static bool IComparisonOperators.operator <(short4 a, short4 b) => + throw new NotSupportedException($"{nameof(short4)} has no total order."); + + static bool IComparisonOperators.operator <=(short4 a, short4 b) => + throw new NotSupportedException($"{nameof(short4)} has no total order."); + + static bool IComparisonOperators.operator >(short4 a, short4 b) => + throw new NotSupportedException($"{nameof(short4)} has no total order."); + + static bool IComparisonOperators.operator >=(short4 a, short4 b) => + throw new NotSupportedException($"{nameof(short4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct short4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(short4 a, short4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(short4 a, short4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(short4 a, short4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(short4 a, short4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(short4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(short4 value) + { + return new bool4(short.IsEvenInteger(value.X), short.IsEvenInteger(value.Y), short.IsEvenInteger(value.Z), short.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(short4 value) + { + return new bool4(short.IsOddInteger(value.X), short.IsOddInteger(value.Y), short.IsOddInteger(value.Z), short.IsOddInteger(value.W)); + } + + /// Determines which components of a value are negative. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsNegative(short4 value) + { + return new bool4(short.IsNegative(value.X), short.IsNegative(value.Y), short.IsNegative(value.Z), short.IsNegative(value.W)); + } + + /// Determines which components of a value are positive. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPositive(short4 value) + { + return new bool4(short.IsPositive(value.X), short.IsPositive(value.Y), short.IsPositive(value.Z), short.IsPositive(value.W)); + } +} + +// ISignedNumber +public partial struct short4 : ISignedNumber +{ + /// + public static short4 NegativeOne => new(-1); +} diff --git a/Brutal.Numerics/Vector/short4/short4.pack.gen.cs b/Brutal.Numerics/Vector/short4/short4.pack.gen.cs new file mode 100644 index 0000000..9714a2c --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short4 +{ + public static short4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Unpack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Pack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Pack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Pack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Pack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out short4 result, elementConverter); + return result; + } + + public static short4 Unpack(in sbyte4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.SByte.ToShort(mode)); + } + + public static short4 Unpack(in byte4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Byte.ToShort(mode)); + } + + public static short4 Pack(in ushort4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UShort.ToShort(mode)); + } + + public static short4 Pack(in int4 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.Int.ToShort(mode)); + } + + public static short4 Pack(in uint4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.UInt.ToShort(mode)); + } + + public static short4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToShort(mode)); + } + + public static short4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UShort.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToShort(mode)); + } +} diff --git a/Brutal.Numerics/Vector/short4/short4.swizzle.gen.cs b/Brutal.Numerics/Vector/short4/short4.swizzle.gen.cs new file mode 100644 index 0000000..3ef4e96 --- /dev/null +++ b/Brutal.Numerics/Vector/short4/short4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct short4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public short2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public short2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public short2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public short2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public short2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public short2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public short2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public short2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public short2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public short2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public short2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public short2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public short3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public short3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public short3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public short3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public short3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public short3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public short3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public short3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public short3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public short3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public short3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public short3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public short3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public short3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public short3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public short3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public short3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public short3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public short3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public short3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public short3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public short3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public short3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public short3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public short4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public short4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public short4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public short4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public short4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public short4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public short4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public short4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public short4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public short4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public short4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public short4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public short4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public short4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public short4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public short4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public short4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public short4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public short4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public short4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public short4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public short4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public short4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct short4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public short R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public short G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public short B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public short A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public short2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public short2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public short2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public short2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public short2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public short2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public short2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public short2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public short2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public short2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public short2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public short2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public short3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public short3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public short3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public short3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public short3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public short3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public short3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public short3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public short3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public short3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public short3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public short3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public short3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public short3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public short3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public short3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public short3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public short3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public short3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public short3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public short3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public short3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public short3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public short3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public short4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public short4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public short4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public short4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public short4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public short4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public short4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public short4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public short4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public short4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public short4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public short4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public short4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public short4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public short4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public short4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public short4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public short4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public short4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public short4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public short4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public short4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public short4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public short4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.copy.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.copy.gen.cs new file mode 100644 index 0000000..f5ddfe5 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.equality.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.equality.gen.cs new file mode 100644 index 0000000..2dfdd87 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(uint2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is uint2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(uint2 a, uint2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(uint2 a, uint2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.format.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.format.gen.cs new file mode 100644 index 0000000..4d41be8 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static uint2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static uint2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static uint2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static uint2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid uint2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out uint2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out uint2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out uint2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a uint2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out uint2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.gen.cs new file mode 100644 index 0000000..bcd8fe1 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with uint components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct uint2 : IVector2 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(uint); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public uint X; + + /// + [XmlAttribute] + public uint Y; + + uint IVector2.X { readonly get => X; set => X = value; } + + uint IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(uint x, uint y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(uint xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static uint2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static uint2 UnitX => new(1, 0); + + /// + public static uint2 UnitY => new(0, 1); + + /// + public uint this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out uint x, out uint y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.math-metric.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.math-metric.gen.cs new file mode 100644 index 0000000..8aaac30 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.math-metric.gen.cs @@ -0,0 +1,43 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly uint LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(uint2 a, uint2 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint DistanceSquared(uint2 a, uint2 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint Dot(uint2 a, uint2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.numerics-binary.gen.cs new file mode 100644 index 0000000..91a4ac1 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct uint2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(uint2 value) + { + return uint.IsPow2(value.X) && uint.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Log2(uint2 value) + { + return new uint2(uint.Log2(value.X), uint.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator &(uint2 a, uint2 b) + { + return new(a.X & b.X, a.Y & b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator |(uint2 a, uint2 b) + { + return new(a.X | b.X, a.Y | b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ^(uint2 a, uint2 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ~(uint2 value) + { + return new(~value.X, ~value.Y); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct uint2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(uint2 value) + { + return new bool2(uint.IsPow2(value.X), uint.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct uint2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 PopCount(uint2 value) + { + return new uint2(uint.PopCount(value.X), uint.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 LeadingZeroCount(uint2 value) + { + return new uint2(uint.LeadingZeroCount(value.X), uint.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 TrailingZeroCount(uint2 value) + { + return new uint2(uint.TrailingZeroCount(value.X), uint.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 RotateLeft(uint2 value, int rotateAmount) + { + return new uint2(uint.RotateLeft(value.X, rotateAmount), uint.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 RotateRight(uint2 value, int rotateAmount) + { + return new uint2(uint.RotateRight(value.X, rotateAmount), uint.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.numerics.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.numerics.gen.cs new file mode 100644 index 0000000..19033f6 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct uint2 : INumberBase +{ + /// + public static uint2 Zero => new(0); + + /// + public static uint2 One => new(1); + + static uint2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static uint2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static uint2 INumberBase.Abs(uint2 value) => value; + + static bool INumberBase.IsCanonical(uint2 value) => true; + + static bool INumberBase.IsComplexNumber(uint2 value) => false; + + static bool INumberBase.IsImaginaryNumber(uint2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(uint2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(uint2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(uint2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + static bool INumberBase.IsNegative(uint2 value) => false; + + static bool INumberBase.IsPositive(uint2 value) => true; + + static bool INumberBase.IsFinite(uint2 value) => true; + + static bool INumberBase.IsInfinity(uint2 value) => false; + + static bool INumberBase.IsNegativeInfinity(uint2 value) => false; + + static bool INumberBase.IsPositiveInfinity(uint2 value) => false; + + static bool INumberBase.IsInteger(uint2 value) => true; + + static bool INumberBase.IsRealNumber(uint2 value) => true; + + static bool INumberBase.IsNaN(uint2 value) => false; + + static bool INumberBase.IsNormal(uint2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(uint2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 MaxMagnitude(uint2 a, uint2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 MaxMagnitudeNumber(uint2 a, uint2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 MinMagnitude(uint2 a, uint2 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 MinMagnitudeNumber(uint2 a, uint2 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Add(uint2 a, uint2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Divide(uint2 a, uint2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Multiply(uint2 a, uint2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Negate(uint2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Subtract(uint2 a, uint2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator +(uint2 a, uint2 b) + { + return new(a.X + b.X, a.Y + b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator -(uint2 a, uint2 b) + { + return new(a.X - b.X, a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator *(uint2 a, uint2 b) + { + return new(a.X * b.X, a.Y * b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator /(uint2 a, uint2 b) + { + return new(a.X / b.X, a.Y / b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator -(uint2 a) + { + return new(0 - a.X, 0 - a.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator +(uint2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static uint2 IIncrementOperators.operator ++(uint2 value) => value + One; + + static uint2 IDecrementOperators.operator --(uint2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out uint2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(uint2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out uint2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(uint2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out uint2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(uint2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct uint2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Divide(uint2 a, uint b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Multiply(uint2 a, uint b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Multiply(uint a, uint2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator *(uint2 a, uint b) + { + return new(a.X * b, a.Y * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator /(uint2 a, uint b) + { + return new(a.X / b, a.Y / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator *(uint a, uint2 b) + { + return new(a * b.X, a * b.Y); + } +} + +// INumber +public partial struct uint2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Clamp(uint2 value, uint2 min, uint2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Max(uint2 a, uint2 b) + { + return new(uint.Max(a.X, b.X), uint.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 Min(uint2 a, uint2 b) + { + return new(uint.Min(a.X, b.X), uint.Min(a.Y, b.Y)); + } + + static uint2 INumber.MaxNumber(uint2 a, uint2 b) => Max(a, b); + + static uint2 INumber.MinNumber(uint2 a, uint2 b) => Min(a, b); + + static uint2 INumber.CopySign(uint2 value, uint2 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static uint2 INumber.ClampNative(uint2 value, uint2 min, uint2 max) => Clamp(value, min, max); + + static uint2 INumber.MaxNative(uint2 a, uint2 b) => Max(a, b); + + static uint2 INumber.MinNative(uint2 a, uint2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(uint2 value) => + throw new NotSupportedException($"{nameof(uint2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator %(uint2 a, uint2 b) + { + return new uint2(a.X % b.X, a.Y % b.Y); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(uint2)} has no total order."); + + int IComparable.CompareTo(uint2 other) => + throw new NotSupportedException($"{nameof(uint2)} has no total order."); + + static bool IComparisonOperators.operator <(uint2 a, uint2 b) => + throw new NotSupportedException($"{nameof(uint2)} has no total order."); + + static bool IComparisonOperators.operator <=(uint2 a, uint2 b) => + throw new NotSupportedException($"{nameof(uint2)} has no total order."); + + static bool IComparisonOperators.operator >(uint2 a, uint2 b) => + throw new NotSupportedException($"{nameof(uint2)} has no total order."); + + static bool IComparisonOperators.operator >=(uint2 a, uint2 b) => + throw new NotSupportedException($"{nameof(uint2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct uint2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(uint2 a, uint2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(uint2 a, uint2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(uint2 a, uint2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(uint2 a, uint2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(uint2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(uint2 value) + { + return new bool2(uint.IsEvenInteger(value.X), uint.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(uint2 value) + { + return new bool2(uint.IsOddInteger(value.X), uint.IsOddInteger(value.Y)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct uint2 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/uint2/uint2.pack.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.pack.gen.cs new file mode 100644 index 0000000..2fb1607 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint2 +{ + public static uint2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Unpack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Unpack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Unpack(in ushort2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Unpack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Pack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint2 result, elementConverter); + return result; + } + + public static uint2 Unpack(in sbyte2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToUInt(mode)); + } + + public static uint2 Unpack(in byte2 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Byte.ToUInt(mode)); + } + + public static uint2 Unpack(in short2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Short.ToUInt(mode)); + } + + public static uint2 Unpack(in ushort2 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.UShort.ToUInt(mode)); + } + + public static uint2 Unpack(in int2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Int.ToUInt(mode)); + } + + public static uint2 Pack(in float2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToUInt(mode)); + } + + public static uint2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToUInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToUInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToUInt(mode)); + } +} diff --git a/Brutal.Numerics/Vector/uint2/uint2.swizzle.gen.cs b/Brutal.Numerics/Vector/uint2/uint2.swizzle.gen.cs new file mode 100644 index 0000000..af6f3e8 --- /dev/null +++ b/Brutal.Numerics/Vector/uint2/uint2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public uint2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public uint2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct uint2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public uint R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public uint G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public uint2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public uint2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.copy.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.copy.gen.cs new file mode 100644 index 0000000..4ca1d97 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.equality.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.equality.gen.cs new file mode 100644 index 0000000..c1edb3a --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(uint3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is uint3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(uint3 a, uint3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(uint3 a, uint3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.format.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.format.gen.cs new file mode 100644 index 0000000..ac1738a --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static uint3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static uint3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static uint3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static uint3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid uint3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out uint3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out uint3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out uint3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a uint3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out uint3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.gen.cs new file mode 100644 index 0000000..721e564 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with uint components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct uint3 : IVector3 + , IIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(uint); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public uint X; + + /// + [XmlAttribute] + public uint Y; + + /// + [XmlAttribute] + public uint Z; + + uint IVector3.X { readonly get => X; set => X = value; } + + uint IVector3.Y { readonly get => Y; set => Y = value; } + + uint IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint x, uint y, uint z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint2 xy, uint z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static uint3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static uint3 UnitX => new(1, 0, 0); + + /// + public static uint3 UnitY => new(0, 1, 0); + + /// + public static uint3 UnitZ => new(0, 0, 1); + + /// + public uint this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out uint x, out uint y, out uint z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.math-metric.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.math-metric.gen.cs new file mode 100644 index 0000000..1aaaf28 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.math-metric.gen.cs @@ -0,0 +1,43 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly uint LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(uint3 a, uint3 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint DistanceSquared(uint3 a, uint3 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint Dot(uint3 a, uint3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.math.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.math.gen.cs new file mode 100644 index 0000000..132bc35 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Cross(uint3 a, uint3 b) + { + return new( + a.Y * b.Z - a.Z * b.Y, + a.Z * b.X - a.X * b.Z, + a.X * b.Y - a.Y * b.X); + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.numerics-binary.gen.cs new file mode 100644 index 0000000..c61bb24 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct uint3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(uint3 value) + { + return uint.IsPow2(value.X) && uint.IsPow2(value.Y) && uint.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Log2(uint3 value) + { + return new uint3(uint.Log2(value.X), uint.Log2(value.Y), uint.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator &(uint3 a, uint3 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator |(uint3 a, uint3 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ^(uint3 a, uint3 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ~(uint3 value) + { + return new(~value.X, ~value.Y, ~value.Z); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct uint3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(uint3 value) + { + return new bool3(uint.IsPow2(value.X), uint.IsPow2(value.Y), uint.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct uint3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 PopCount(uint3 value) + { + return new uint3(uint.PopCount(value.X), uint.PopCount(value.Y), uint.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 LeadingZeroCount(uint3 value) + { + return new uint3(uint.LeadingZeroCount(value.X), uint.LeadingZeroCount(value.Y), uint.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 TrailingZeroCount(uint3 value) + { + return new uint3(uint.TrailingZeroCount(value.X), uint.TrailingZeroCount(value.Y), uint.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 RotateLeft(uint3 value, int rotateAmount) + { + return new uint3(uint.RotateLeft(value.X, rotateAmount), uint.RotateLeft(value.Y, rotateAmount), uint.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 RotateRight(uint3 value, int rotateAmount) + { + return new uint3(uint.RotateRight(value.X, rotateAmount), uint.RotateRight(value.Y, rotateAmount), uint.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.numerics.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.numerics.gen.cs new file mode 100644 index 0000000..302c7c9 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct uint3 : INumberBase +{ + /// + public static uint3 Zero => new(0); + + /// + public static uint3 One => new(1); + + static uint3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static uint3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static uint3 INumberBase.Abs(uint3 value) => value; + + static bool INumberBase.IsCanonical(uint3 value) => true; + + static bool INumberBase.IsComplexNumber(uint3 value) => false; + + static bool INumberBase.IsImaginaryNumber(uint3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(uint3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(uint3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(uint3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + static bool INumberBase.IsNegative(uint3 value) => false; + + static bool INumberBase.IsPositive(uint3 value) => true; + + static bool INumberBase.IsFinite(uint3 value) => true; + + static bool INumberBase.IsInfinity(uint3 value) => false; + + static bool INumberBase.IsNegativeInfinity(uint3 value) => false; + + static bool INumberBase.IsPositiveInfinity(uint3 value) => false; + + static bool INumberBase.IsInteger(uint3 value) => true; + + static bool INumberBase.IsRealNumber(uint3 value) => true; + + static bool INumberBase.IsNaN(uint3 value) => false; + + static bool INumberBase.IsNormal(uint3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(uint3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 MaxMagnitude(uint3 a, uint3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 MaxMagnitudeNumber(uint3 a, uint3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 MinMagnitude(uint3 a, uint3 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 MinMagnitudeNumber(uint3 a, uint3 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Add(uint3 a, uint3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Divide(uint3 a, uint3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Multiply(uint3 a, uint3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Negate(uint3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Subtract(uint3 a, uint3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator +(uint3 a, uint3 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator -(uint3 a, uint3 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator *(uint3 a, uint3 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator /(uint3 a, uint3 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator -(uint3 a) + { + return new(0 - a.X, 0 - a.Y, 0 - a.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator +(uint3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static uint3 IIncrementOperators.operator ++(uint3 value) => value + One; + + static uint3 IDecrementOperators.operator --(uint3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out uint3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(uint3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out uint3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(uint3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out uint3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(uint3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct uint3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Divide(uint3 a, uint b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Multiply(uint3 a, uint b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Multiply(uint a, uint3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator *(uint3 a, uint b) + { + return new(a.X * b, a.Y * b, a.Z * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator /(uint3 a, uint b) + { + return new(a.X / b, a.Y / b, a.Z / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator *(uint a, uint3 b) + { + return new(a * b.X, a * b.Y, a * b.Z); + } +} + +// INumber +public partial struct uint3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Clamp(uint3 value, uint3 min, uint3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Max(uint3 a, uint3 b) + { + return new(uint.Max(a.X, b.X), uint.Max(a.Y, b.Y), uint.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 Min(uint3 a, uint3 b) + { + return new(uint.Min(a.X, b.X), uint.Min(a.Y, b.Y), uint.Min(a.Z, b.Z)); + } + + static uint3 INumber.MaxNumber(uint3 a, uint3 b) => Max(a, b); + + static uint3 INumber.MinNumber(uint3 a, uint3 b) => Min(a, b); + + static uint3 INumber.CopySign(uint3 value, uint3 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static uint3 INumber.ClampNative(uint3 value, uint3 min, uint3 max) => Clamp(value, min, max); + + static uint3 INumber.MaxNative(uint3 a, uint3 b) => Max(a, b); + + static uint3 INumber.MinNative(uint3 a, uint3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(uint3 value) => + throw new NotSupportedException($"{nameof(uint3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator %(uint3 a, uint3 b) + { + return new uint3(a.X % b.X, a.Y % b.Y, a.Z % b.Z); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(uint3)} has no total order."); + + int IComparable.CompareTo(uint3 other) => + throw new NotSupportedException($"{nameof(uint3)} has no total order."); + + static bool IComparisonOperators.operator <(uint3 a, uint3 b) => + throw new NotSupportedException($"{nameof(uint3)} has no total order."); + + static bool IComparisonOperators.operator <=(uint3 a, uint3 b) => + throw new NotSupportedException($"{nameof(uint3)} has no total order."); + + static bool IComparisonOperators.operator >(uint3 a, uint3 b) => + throw new NotSupportedException($"{nameof(uint3)} has no total order."); + + static bool IComparisonOperators.operator >=(uint3 a, uint3 b) => + throw new NotSupportedException($"{nameof(uint3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct uint3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(uint3 a, uint3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(uint3 a, uint3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(uint3 a, uint3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(uint3 a, uint3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(uint3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(uint3 value) + { + return new bool3(uint.IsEvenInteger(value.X), uint.IsEvenInteger(value.Y), uint.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(uint3 value) + { + return new bool3(uint.IsOddInteger(value.X), uint.IsOddInteger(value.Y), uint.IsOddInteger(value.Z)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct uint3 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/uint3/uint3.pack.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.pack.gen.cs new file mode 100644 index 0000000..315b3d8 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 +{ + public static uint3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Unpack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Unpack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Unpack(in ushort3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Unpack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Pack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint3 result, elementConverter); + return result; + } + + public static uint3 Unpack(in sbyte3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToUInt(mode)); + } + + public static uint3 Unpack(in byte3 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Byte.ToUInt(mode)); + } + + public static uint3 Unpack(in short3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Short.ToUInt(mode)); + } + + public static uint3 Unpack(in ushort3 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.UShort.ToUInt(mode)); + } + + public static uint3 Unpack(in int3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Int.ToUInt(mode)); + } + + public static uint3 Pack(in float3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToUInt(mode)); + } + + public static uint3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToUInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToUInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToUInt(mode)); + } +} diff --git a/Brutal.Numerics/Vector/uint3/uint3.swizzle.gen.cs b/Brutal.Numerics/Vector/uint3/uint3.swizzle.gen.cs new file mode 100644 index 0000000..ba038c2 --- /dev/null +++ b/Brutal.Numerics/Vector/uint3/uint3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public uint2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public uint2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public uint2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public uint2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public uint2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public uint2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public uint3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public uint3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public uint3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public uint3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public uint3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public uint3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct uint3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public uint R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public uint G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public uint B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public uint2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public uint2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public uint2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public uint2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public uint2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public uint2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public uint3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public uint3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public uint3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public uint3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.copy.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.copy.gen.cs new file mode 100644 index 0000000..98b1968 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.equality.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.equality.gen.cs new file mode 100644 index 0000000..1305b69 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(uint4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is uint4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(uint4 a, uint4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(uint4 a, uint4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.format.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.format.gen.cs new file mode 100644 index 0000000..cafc291 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static uint4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static uint4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static uint4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static uint4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid uint4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out uint4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out uint4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out uint4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a uint4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out uint4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.gen.cs new file mode 100644 index 0000000..0308577 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with uint components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct uint4 : IVector4 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(uint); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public uint X; + + /// + [XmlAttribute] + public uint Y; + + /// + [XmlAttribute] + public uint Z; + + /// + [XmlAttribute] + public uint W; + + uint IVector4.X { readonly get => X; set => X = value; } + + uint IVector4.Y { readonly get => Y; set => Y = value; } + + uint IVector4.Z { readonly get => Z; set => Z = value; } + + uint IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint x, uint y, uint z, uint w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint3 xyz, uint w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint2 xy, uint2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint2 xy, uint z, uint w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static uint4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static uint4 UnitX => new(1, 0, 0, 0); + + /// + public static uint4 UnitY => new(0, 1, 0, 0); + + /// + public static uint4 UnitZ => new(0, 0, 1, 0); + + /// + public static uint4 UnitW => new(0, 0, 0, 1); + + /// + public uint this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out uint x, out uint y, out uint z, out uint w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.math-metric.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.math-metric.gen.cs new file mode 100644 index 0000000..40adb1f --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.math-metric.gen.cs @@ -0,0 +1,43 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly uint LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(uint4 a, uint4 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint DistanceSquared(uint4 a, uint4 b) + { + var difference = a - b; + return Dot(difference, difference); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint Dot(uint4 a, uint4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.numerics-binary.gen.cs new file mode 100644 index 0000000..9c8f276 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct uint4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(uint4 value) + { + return uint.IsPow2(value.X) && uint.IsPow2(value.Y) && uint.IsPow2(value.Z) && uint.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Log2(uint4 value) + { + return new uint4(uint.Log2(value.X), uint.Log2(value.Y), uint.Log2(value.Z), uint.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator &(uint4 a, uint4 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z, a.W & b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator |(uint4 a, uint4 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z, a.W | b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ^(uint4 a, uint4 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z, a.W ^ b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ~(uint4 value) + { + return new(~value.X, ~value.Y, ~value.Z, ~value.W); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct uint4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(uint4 value) + { + return new bool4(uint.IsPow2(value.X), uint.IsPow2(value.Y), uint.IsPow2(value.Z), uint.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct uint4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 PopCount(uint4 value) + { + return new uint4(uint.PopCount(value.X), uint.PopCount(value.Y), uint.PopCount(value.Z), uint.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 LeadingZeroCount(uint4 value) + { + return new uint4(uint.LeadingZeroCount(value.X), uint.LeadingZeroCount(value.Y), uint.LeadingZeroCount(value.Z), uint.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 TrailingZeroCount(uint4 value) + { + return new uint4(uint.TrailingZeroCount(value.X), uint.TrailingZeroCount(value.Y), uint.TrailingZeroCount(value.Z), uint.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 RotateLeft(uint4 value, int rotateAmount) + { + return new uint4(uint.RotateLeft(value.X, rotateAmount), uint.RotateLeft(value.Y, rotateAmount), uint.RotateLeft(value.Z, rotateAmount), uint.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 RotateRight(uint4 value, int rotateAmount) + { + return new uint4(uint.RotateRight(value.X, rotateAmount), uint.RotateRight(value.Y, rotateAmount), uint.RotateRight(value.Z, rotateAmount), uint.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.numerics.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.numerics.gen.cs new file mode 100644 index 0000000..2583ef7 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct uint4 : INumberBase +{ + /// + public static uint4 Zero => new(0); + + /// + public static uint4 One => new(1); + + static uint4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static uint4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static uint4 INumberBase.Abs(uint4 value) => value; + + static bool INumberBase.IsCanonical(uint4 value) => true; + + static bool INumberBase.IsComplexNumber(uint4 value) => false; + + static bool INumberBase.IsImaginaryNumber(uint4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(uint4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(uint4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(uint4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + static bool INumberBase.IsNegative(uint4 value) => false; + + static bool INumberBase.IsPositive(uint4 value) => true; + + static bool INumberBase.IsFinite(uint4 value) => true; + + static bool INumberBase.IsInfinity(uint4 value) => false; + + static bool INumberBase.IsNegativeInfinity(uint4 value) => false; + + static bool INumberBase.IsPositiveInfinity(uint4 value) => false; + + static bool INumberBase.IsInteger(uint4 value) => true; + + static bool INumberBase.IsRealNumber(uint4 value) => true; + + static bool INumberBase.IsNaN(uint4 value) => false; + + static bool INumberBase.IsNormal(uint4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(uint4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 MaxMagnitude(uint4 a, uint4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 MaxMagnitudeNumber(uint4 a, uint4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 MinMagnitude(uint4 a, uint4 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 MinMagnitudeNumber(uint4 a, uint4 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Add(uint4 a, uint4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Divide(uint4 a, uint4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Multiply(uint4 a, uint4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Negate(uint4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Subtract(uint4 a, uint4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator +(uint4 a, uint4 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator -(uint4 a, uint4 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator *(uint4 a, uint4 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z, a.W * b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator /(uint4 a, uint4 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z, a.W / b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator -(uint4 a) + { + return new(0 - a.X, 0 - a.Y, 0 - a.Z, 0 - a.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator +(uint4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static uint4 IIncrementOperators.operator ++(uint4 value) => value + One; + + static uint4 IDecrementOperators.operator --(uint4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out uint4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(uint4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out uint4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(uint4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out uint4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(uint4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct uint4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Divide(uint4 a, uint b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Multiply(uint4 a, uint b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Multiply(uint a, uint4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator *(uint4 a, uint b) + { + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator /(uint4 a, uint b) + { + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator *(uint a, uint4 b) + { + return new(a * b.X, a * b.Y, a * b.Z, a * b.W); + } +} + +// INumber +public partial struct uint4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Clamp(uint4 value, uint4 min, uint4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Max(uint4 a, uint4 b) + { + return new(uint.Max(a.X, b.X), uint.Max(a.Y, b.Y), uint.Max(a.Z, b.Z), uint.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 Min(uint4 a, uint4 b) + { + return new(uint.Min(a.X, b.X), uint.Min(a.Y, b.Y), uint.Min(a.Z, b.Z), uint.Min(a.W, b.W)); + } + + static uint4 INumber.MaxNumber(uint4 a, uint4 b) => Max(a, b); + + static uint4 INumber.MinNumber(uint4 a, uint4 b) => Min(a, b); + + static uint4 INumber.CopySign(uint4 value, uint4 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static uint4 INumber.ClampNative(uint4 value, uint4 min, uint4 max) => Clamp(value, min, max); + + static uint4 INumber.MaxNative(uint4 a, uint4 b) => Max(a, b); + + static uint4 INumber.MinNative(uint4 a, uint4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(uint4 value) => + throw new NotSupportedException($"{nameof(uint4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator %(uint4 a, uint4 b) + { + return new uint4(a.X % b.X, a.Y % b.Y, a.Z % b.Z, a.W % b.W); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(uint4)} has no total order."); + + int IComparable.CompareTo(uint4 other) => + throw new NotSupportedException($"{nameof(uint4)} has no total order."); + + static bool IComparisonOperators.operator <(uint4 a, uint4 b) => + throw new NotSupportedException($"{nameof(uint4)} has no total order."); + + static bool IComparisonOperators.operator <=(uint4 a, uint4 b) => + throw new NotSupportedException($"{nameof(uint4)} has no total order."); + + static bool IComparisonOperators.operator >(uint4 a, uint4 b) => + throw new NotSupportedException($"{nameof(uint4)} has no total order."); + + static bool IComparisonOperators.operator >=(uint4 a, uint4 b) => + throw new NotSupportedException($"{nameof(uint4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct uint4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(uint4 a, uint4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(uint4 a, uint4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(uint4 a, uint4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(uint4 a, uint4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(uint4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(uint4 value) + { + return new bool4(uint.IsEvenInteger(value.X), uint.IsEvenInteger(value.Y), uint.IsEvenInteger(value.Z), uint.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(uint4 value) + { + return new bool4(uint.IsOddInteger(value.X), uint.IsOddInteger(value.Y), uint.IsOddInteger(value.Z), uint.IsOddInteger(value.W)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct uint4 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/uint4/uint4.pack.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.pack.gen.cs new file mode 100644 index 0000000..a8beb32 --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint4 +{ + public static uint4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Unpack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Unpack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Unpack(in ushort4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Unpack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Pack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out uint4 result, elementConverter); + return result; + } + + public static uint4 Unpack(in sbyte4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToUInt(mode)); + } + + public static uint4 Unpack(in byte4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Byte.ToUInt(mode)); + } + + public static uint4 Unpack(in short4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Short.ToUInt(mode)); + } + + public static uint4 Unpack(in ushort4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.UShort.ToUInt(mode)); + } + + public static uint4 Unpack(in int4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Int.ToUInt(mode)); + } + + public static uint4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToUInt(mode)); + } + + public static uint4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.UShort.ToUInt(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Int.ToUInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToUInt(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToUInt(mode)); + } +} diff --git a/Brutal.Numerics/Vector/uint4/uint4.swizzle.gen.cs b/Brutal.Numerics/Vector/uint4/uint4.swizzle.gen.cs new file mode 100644 index 0000000..246f51a --- /dev/null +++ b/Brutal.Numerics/Vector/uint4/uint4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct uint4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public uint2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public uint2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public uint2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public uint2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public uint2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public uint2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public uint2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public uint2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public uint2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public uint2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public uint2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public uint2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public uint3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public uint3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public uint3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public uint3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public uint3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public uint3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public uint3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public uint3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public uint3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public uint3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public uint3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public uint3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public uint3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public uint3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public uint3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public uint3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public uint3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public uint3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public uint3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public uint3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public uint3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public uint3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public uint3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public uint3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public uint4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public uint4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public uint4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public uint4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public uint4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public uint4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public uint4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public uint4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public uint4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public uint4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public uint4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public uint4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public uint4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public uint4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public uint4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public uint4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public uint4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public uint4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public uint4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public uint4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public uint4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public uint4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public uint4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct uint4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public uint R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public uint G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public uint B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public uint A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public uint2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public uint2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public uint2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public uint2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public uint2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public uint2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public uint2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public uint2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public uint2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public uint2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public uint2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public uint2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public uint3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public uint3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public uint3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public uint3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public uint3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public uint3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public uint3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public uint3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public uint3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public uint3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public uint3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public uint3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public uint3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public uint3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public uint3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public uint3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public uint3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public uint3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public uint3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public uint4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public uint4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public uint4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public uint4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public uint4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public uint4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public uint4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public uint4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public uint4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public uint4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public uint4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public uint4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public uint4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public uint4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public uint4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public uint4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public uint4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public uint4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public uint4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public uint4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public uint4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public uint4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public uint4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public uint4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.copy.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.copy.gen.cs new file mode 100644 index 0000000..bd8c37b --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.equality.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.equality.gen.cs new file mode 100644 index 0000000..417ddf3 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(ulong2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is ulong2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ulong2 a, ulong2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ulong2 a, ulong2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.format.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.format.gen.cs new file mode 100644 index 0000000..195c9f9 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static ulong2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static ulong2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static ulong2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static ulong2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid ulong2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ulong2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out ulong2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ulong2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a ulong2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out ulong2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.gen.cs new file mode 100644 index 0000000..14f166b --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with ulong components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct ulong2 : IVector2 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(ulong); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public ulong X; + + /// + [XmlAttribute] + public ulong Y; + + ulong IVector2.X { readonly get => X; set => X = value; } + + ulong IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong2(ulong x, ulong y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong2(ulong xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ulong2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static ulong2 UnitX => new(1, 0); + + /// + public static ulong2 UnitY => new(0, 1); + + /// + public ulong this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out ulong x, out ulong y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.math-metric.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.math-metric.gen.cs new file mode 100644 index 0000000..acfe8fb --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return (double)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ulong LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(ulong2 a, ulong2 b) + { + return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong DistanceSquared(ulong2 a, ulong2 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Dot(ulong2 a, ulong2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.numerics-binary.gen.cs new file mode 100644 index 0000000..039bb0d --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct ulong2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(ulong2 value) + { + return ulong.IsPow2(value.X) && ulong.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Log2(ulong2 value) + { + return new ulong2(ulong.Log2(value.X), ulong.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator &(ulong2 a, ulong2 b) + { + return new(a.X & b.X, a.Y & b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator |(ulong2 a, ulong2 b) + { + return new(a.X | b.X, a.Y | b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator ^(ulong2 a, ulong2 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator ~(ulong2 value) + { + return new(~value.X, ~value.Y); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct ulong2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(ulong2 value) + { + return new bool2(ulong.IsPow2(value.X), ulong.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct ulong2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 PopCount(ulong2 value) + { + return new ulong2(ulong.PopCount(value.X), ulong.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 LeadingZeroCount(ulong2 value) + { + return new ulong2(ulong.LeadingZeroCount(value.X), ulong.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 TrailingZeroCount(ulong2 value) + { + return new ulong2(ulong.TrailingZeroCount(value.X), ulong.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 RotateLeft(ulong2 value, int rotateAmount) + { + return new ulong2(ulong.RotateLeft(value.X, rotateAmount), ulong.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 RotateRight(ulong2 value, int rotateAmount) + { + return new ulong2(ulong.RotateRight(value.X, rotateAmount), ulong.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.numerics.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.numerics.gen.cs new file mode 100644 index 0000000..6fde654 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct ulong2 : INumberBase +{ + /// + public static ulong2 Zero => new(0); + + /// + public static ulong2 One => new(1); + + static ulong2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static ulong2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static ulong2 INumberBase.Abs(ulong2 value) => value; + + static bool INumberBase.IsCanonical(ulong2 value) => true; + + static bool INumberBase.IsComplexNumber(ulong2 value) => false; + + static bool INumberBase.IsImaginaryNumber(ulong2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(ulong2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(ulong2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(ulong2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + static bool INumberBase.IsNegative(ulong2 value) => false; + + static bool INumberBase.IsPositive(ulong2 value) => true; + + static bool INumberBase.IsFinite(ulong2 value) => true; + + static bool INumberBase.IsInfinity(ulong2 value) => false; + + static bool INumberBase.IsNegativeInfinity(ulong2 value) => false; + + static bool INumberBase.IsPositiveInfinity(ulong2 value) => false; + + static bool INumberBase.IsInteger(ulong2 value) => true; + + static bool INumberBase.IsRealNumber(ulong2 value) => true; + + static bool INumberBase.IsNaN(ulong2 value) => false; + + static bool INumberBase.IsNormal(ulong2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(ulong2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 MaxMagnitude(ulong2 a, ulong2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 MaxMagnitudeNumber(ulong2 a, ulong2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 MinMagnitude(ulong2 a, ulong2 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 MinMagnitudeNumber(ulong2 a, ulong2 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Add(ulong2 a, ulong2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Divide(ulong2 a, ulong2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Multiply(ulong2 a, ulong2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Negate(ulong2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Subtract(ulong2 a, ulong2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator +(ulong2 a, ulong2 b) + { + return new(a.X + b.X, a.Y + b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator -(ulong2 a, ulong2 b) + { + return new(a.X - b.X, a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator *(ulong2 a, ulong2 b) + { + return new(a.X * b.X, a.Y * b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator /(ulong2 a, ulong2 b) + { + return new(a.X / b.X, a.Y / b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator -(ulong2 a) + { + return new(0 - a.X, 0 - a.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator +(ulong2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static ulong2 IIncrementOperators.operator ++(ulong2 value) => value + One; + + static ulong2 IDecrementOperators.operator --(ulong2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out ulong2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(ulong2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out ulong2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(ulong2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out ulong2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(ulong2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct ulong2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Divide(ulong2 a, ulong b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Multiply(ulong2 a, ulong b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Multiply(ulong a, ulong2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator *(ulong2 a, ulong b) + { + return new(a.X * b, a.Y * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator /(ulong2 a, ulong b) + { + return new(a.X / b, a.Y / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator *(ulong a, ulong2 b) + { + return new(a * b.X, a * b.Y); + } +} + +// INumber +public partial struct ulong2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Clamp(ulong2 value, ulong2 min, ulong2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Max(ulong2 a, ulong2 b) + { + return new(ulong.Max(a.X, b.X), ulong.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 Min(ulong2 a, ulong2 b) + { + return new(ulong.Min(a.X, b.X), ulong.Min(a.Y, b.Y)); + } + + static ulong2 INumber.MaxNumber(ulong2 a, ulong2 b) => Max(a, b); + + static ulong2 INumber.MinNumber(ulong2 a, ulong2 b) => Min(a, b); + + static ulong2 INumber.CopySign(ulong2 value, ulong2 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static ulong2 INumber.ClampNative(ulong2 value, ulong2 min, ulong2 max) => Clamp(value, min, max); + + static ulong2 INumber.MaxNative(ulong2 a, ulong2 b) => Max(a, b); + + static ulong2 INumber.MinNative(ulong2 a, ulong2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(ulong2 value) => + throw new NotSupportedException($"{nameof(ulong2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong2 operator %(ulong2 a, ulong2 b) + { + return new ulong2(a.X % b.X, a.Y % b.Y); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(ulong2)} has no total order."); + + int IComparable.CompareTo(ulong2 other) => + throw new NotSupportedException($"{nameof(ulong2)} has no total order."); + + static bool IComparisonOperators.operator <(ulong2 a, ulong2 b) => + throw new NotSupportedException($"{nameof(ulong2)} has no total order."); + + static bool IComparisonOperators.operator <=(ulong2 a, ulong2 b) => + throw new NotSupportedException($"{nameof(ulong2)} has no total order."); + + static bool IComparisonOperators.operator >(ulong2 a, ulong2 b) => + throw new NotSupportedException($"{nameof(ulong2)} has no total order."); + + static bool IComparisonOperators.operator >=(ulong2 a, ulong2 b) => + throw new NotSupportedException($"{nameof(ulong2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct ulong2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(ulong2 a, ulong2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(ulong2 a, ulong2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(ulong2 a, ulong2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(ulong2 a, ulong2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(ulong2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(ulong2 value) + { + return new bool2(ulong.IsEvenInteger(value.X), ulong.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(ulong2 value) + { + return new bool2(ulong.IsOddInteger(value.X), ulong.IsOddInteger(value.Y)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct ulong2 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/ulong2/ulong2.swizzle.gen.cs b/Brutal.Numerics/Vector/ulong2/ulong2.swizzle.gen.cs new file mode 100644 index 0000000..8b7e164 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong2/ulong2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public ulong2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public ulong2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct ulong2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public ulong R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public ulong G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public ulong2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public ulong2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.copy.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.copy.gen.cs new file mode 100644 index 0000000..1f3614a --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.equality.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.equality.gen.cs new file mode 100644 index 0000000..67fde3b --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(ulong3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is ulong3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ulong3 a, ulong3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ulong3 a, ulong3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.format.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.format.gen.cs new file mode 100644 index 0000000..151b522 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static ulong3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static ulong3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static ulong3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static ulong3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid ulong3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ulong3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out ulong3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ulong3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a ulong3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out ulong3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.gen.cs new file mode 100644 index 0000000..daafa5a --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with ulong components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct ulong3 : IVector3 + , IIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(ulong); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public ulong X; + + /// + [XmlAttribute] + public ulong Y; + + /// + [XmlAttribute] + public ulong Z; + + ulong IVector3.X { readonly get => X; set => X = value; } + + ulong IVector3.Y { readonly get => Y; set => Y = value; } + + ulong IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong3(ulong x, ulong y, ulong z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong3(ulong xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong3(ulong2 xy, ulong z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ulong3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static ulong3 UnitX => new(1, 0, 0); + + /// + public static ulong3 UnitY => new(0, 1, 0); + + /// + public static ulong3 UnitZ => new(0, 0, 1); + + /// + public ulong this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out ulong x, out ulong y, out ulong z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.math-metric.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.math-metric.gen.cs new file mode 100644 index 0000000..c44879a --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return (double)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ulong LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(ulong3 a, ulong3 b) + { + return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong DistanceSquared(ulong3 a, ulong3 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Dot(ulong3 a, ulong3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.math.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.math.gen.cs new file mode 100644 index 0000000..71a1b00 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Cross(ulong3 a, ulong3 b) + { + return new( + a.Y * b.Z - a.Z * b.Y, + a.Z * b.X - a.X * b.Z, + a.X * b.Y - a.Y * b.X); + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.numerics-binary.gen.cs new file mode 100644 index 0000000..65783ec --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct ulong3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(ulong3 value) + { + return ulong.IsPow2(value.X) && ulong.IsPow2(value.Y) && ulong.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Log2(ulong3 value) + { + return new ulong3(ulong.Log2(value.X), ulong.Log2(value.Y), ulong.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator &(ulong3 a, ulong3 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator |(ulong3 a, ulong3 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator ^(ulong3 a, ulong3 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator ~(ulong3 value) + { + return new(~value.X, ~value.Y, ~value.Z); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct ulong3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(ulong3 value) + { + return new bool3(ulong.IsPow2(value.X), ulong.IsPow2(value.Y), ulong.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct ulong3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 PopCount(ulong3 value) + { + return new ulong3(ulong.PopCount(value.X), ulong.PopCount(value.Y), ulong.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 LeadingZeroCount(ulong3 value) + { + return new ulong3(ulong.LeadingZeroCount(value.X), ulong.LeadingZeroCount(value.Y), ulong.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 TrailingZeroCount(ulong3 value) + { + return new ulong3(ulong.TrailingZeroCount(value.X), ulong.TrailingZeroCount(value.Y), ulong.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 RotateLeft(ulong3 value, int rotateAmount) + { + return new ulong3(ulong.RotateLeft(value.X, rotateAmount), ulong.RotateLeft(value.Y, rotateAmount), ulong.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 RotateRight(ulong3 value, int rotateAmount) + { + return new ulong3(ulong.RotateRight(value.X, rotateAmount), ulong.RotateRight(value.Y, rotateAmount), ulong.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.numerics.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.numerics.gen.cs new file mode 100644 index 0000000..10e28e4 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct ulong3 : INumberBase +{ + /// + public static ulong3 Zero => new(0); + + /// + public static ulong3 One => new(1); + + static ulong3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static ulong3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static ulong3 INumberBase.Abs(ulong3 value) => value; + + static bool INumberBase.IsCanonical(ulong3 value) => true; + + static bool INumberBase.IsComplexNumber(ulong3 value) => false; + + static bool INumberBase.IsImaginaryNumber(ulong3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(ulong3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(ulong3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(ulong3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + static bool INumberBase.IsNegative(ulong3 value) => false; + + static bool INumberBase.IsPositive(ulong3 value) => true; + + static bool INumberBase.IsFinite(ulong3 value) => true; + + static bool INumberBase.IsInfinity(ulong3 value) => false; + + static bool INumberBase.IsNegativeInfinity(ulong3 value) => false; + + static bool INumberBase.IsPositiveInfinity(ulong3 value) => false; + + static bool INumberBase.IsInteger(ulong3 value) => true; + + static bool INumberBase.IsRealNumber(ulong3 value) => true; + + static bool INumberBase.IsNaN(ulong3 value) => false; + + static bool INumberBase.IsNormal(ulong3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(ulong3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 MaxMagnitude(ulong3 a, ulong3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 MaxMagnitudeNumber(ulong3 a, ulong3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 MinMagnitude(ulong3 a, ulong3 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 MinMagnitudeNumber(ulong3 a, ulong3 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Add(ulong3 a, ulong3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Divide(ulong3 a, ulong3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Multiply(ulong3 a, ulong3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Negate(ulong3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Subtract(ulong3 a, ulong3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator +(ulong3 a, ulong3 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator -(ulong3 a, ulong3 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator *(ulong3 a, ulong3 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator /(ulong3 a, ulong3 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator -(ulong3 a) + { + return new(0 - a.X, 0 - a.Y, 0 - a.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator +(ulong3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static ulong3 IIncrementOperators.operator ++(ulong3 value) => value + One; + + static ulong3 IDecrementOperators.operator --(ulong3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out ulong3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(ulong3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out ulong3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(ulong3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out ulong3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(ulong3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct ulong3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Divide(ulong3 a, ulong b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Multiply(ulong3 a, ulong b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Multiply(ulong a, ulong3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator *(ulong3 a, ulong b) + { + return new(a.X * b, a.Y * b, a.Z * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator /(ulong3 a, ulong b) + { + return new(a.X / b, a.Y / b, a.Z / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator *(ulong a, ulong3 b) + { + return new(a * b.X, a * b.Y, a * b.Z); + } +} + +// INumber +public partial struct ulong3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Clamp(ulong3 value, ulong3 min, ulong3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Max(ulong3 a, ulong3 b) + { + return new(ulong.Max(a.X, b.X), ulong.Max(a.Y, b.Y), ulong.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 Min(ulong3 a, ulong3 b) + { + return new(ulong.Min(a.X, b.X), ulong.Min(a.Y, b.Y), ulong.Min(a.Z, b.Z)); + } + + static ulong3 INumber.MaxNumber(ulong3 a, ulong3 b) => Max(a, b); + + static ulong3 INumber.MinNumber(ulong3 a, ulong3 b) => Min(a, b); + + static ulong3 INumber.CopySign(ulong3 value, ulong3 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static ulong3 INumber.ClampNative(ulong3 value, ulong3 min, ulong3 max) => Clamp(value, min, max); + + static ulong3 INumber.MaxNative(ulong3 a, ulong3 b) => Max(a, b); + + static ulong3 INumber.MinNative(ulong3 a, ulong3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(ulong3 value) => + throw new NotSupportedException($"{nameof(ulong3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong3 operator %(ulong3 a, ulong3 b) + { + return new ulong3(a.X % b.X, a.Y % b.Y, a.Z % b.Z); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(ulong3)} has no total order."); + + int IComparable.CompareTo(ulong3 other) => + throw new NotSupportedException($"{nameof(ulong3)} has no total order."); + + static bool IComparisonOperators.operator <(ulong3 a, ulong3 b) => + throw new NotSupportedException($"{nameof(ulong3)} has no total order."); + + static bool IComparisonOperators.operator <=(ulong3 a, ulong3 b) => + throw new NotSupportedException($"{nameof(ulong3)} has no total order."); + + static bool IComparisonOperators.operator >(ulong3 a, ulong3 b) => + throw new NotSupportedException($"{nameof(ulong3)} has no total order."); + + static bool IComparisonOperators.operator >=(ulong3 a, ulong3 b) => + throw new NotSupportedException($"{nameof(ulong3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct ulong3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(ulong3 a, ulong3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(ulong3 a, ulong3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(ulong3 a, ulong3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(ulong3 a, ulong3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(ulong3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(ulong3 value) + { + return new bool3(ulong.IsEvenInteger(value.X), ulong.IsEvenInteger(value.Y), ulong.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(ulong3 value) + { + return new bool3(ulong.IsOddInteger(value.X), ulong.IsOddInteger(value.Y), ulong.IsOddInteger(value.Z)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct ulong3 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/ulong3/ulong3.swizzle.gen.cs b/Brutal.Numerics/Vector/ulong3/ulong3.swizzle.gen.cs new file mode 100644 index 0000000..d55eabf --- /dev/null +++ b/Brutal.Numerics/Vector/ulong3/ulong3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public ulong2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public ulong2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public ulong2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public ulong2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public ulong2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public ulong2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public ulong3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public ulong3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public ulong3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public ulong3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public ulong3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public ulong3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct ulong3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public ulong R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public ulong G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public ulong B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public ulong2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public ulong2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public ulong2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public ulong2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public ulong2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public ulong2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.copy.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.copy.gen.cs new file mode 100644 index 0000000..93ff591 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.equality.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.equality.gen.cs new file mode 100644 index 0000000..f26639b --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(ulong4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is ulong4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ulong4 a, ulong4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ulong4 a, ulong4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.format.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.format.gen.cs new file mode 100644 index 0000000..f0e0e53 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static ulong4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static ulong4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static ulong4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static ulong4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid ulong4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ulong4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out ulong4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ulong4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a ulong4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out ulong4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.gen.cs new file mode 100644 index 0000000..cac7287 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with ulong components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct ulong4 : IVector4 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(ulong); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public ulong X; + + /// + [XmlAttribute] + public ulong Y; + + /// + [XmlAttribute] + public ulong Z; + + /// + [XmlAttribute] + public ulong W; + + ulong IVector4.X { readonly get => X; set => X = value; } + + ulong IVector4.Y { readonly get => Y; set => Y = value; } + + ulong IVector4.Z { readonly get => Z; set => Z = value; } + + ulong IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong4(ulong x, ulong y, ulong z, ulong w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong4(ulong xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong4(ulong3 xyz, ulong w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong4(ulong2 xy, ulong2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong4(ulong2 xy, ulong z, ulong w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ulong4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ulong4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static ulong4 UnitX => new(1, 0, 0, 0); + + /// + public static ulong4 UnitY => new(0, 1, 0, 0); + + /// + public static ulong4 UnitZ => new(0, 0, 1, 0); + + /// + public static ulong4 UnitW => new(0, 0, 0, 1); + + /// + public ulong this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out ulong x, out ulong y, out ulong z, out ulong w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.math-metric.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.math-metric.gen.cs new file mode 100644 index 0000000..17a91f4 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly double Length() + { + return (double)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ulong LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Distance(ulong4 a, ulong4 b) + { + return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong DistanceSquared(ulong4 a, ulong4 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z) + (a.W - b.W) * (a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Dot(ulong4 a, ulong4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.numerics-binary.gen.cs new file mode 100644 index 0000000..f3502e7 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct ulong4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(ulong4 value) + { + return ulong.IsPow2(value.X) && ulong.IsPow2(value.Y) && ulong.IsPow2(value.Z) && ulong.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Log2(ulong4 value) + { + return new ulong4(ulong.Log2(value.X), ulong.Log2(value.Y), ulong.Log2(value.Z), ulong.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator &(ulong4 a, ulong4 b) + { + return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z, a.W & b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator |(ulong4 a, ulong4 b) + { + return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z, a.W | b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator ^(ulong4 a, ulong4 b) + { + return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z, a.W ^ b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator ~(ulong4 value) + { + return new(~value.X, ~value.Y, ~value.Z, ~value.W); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct ulong4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(ulong4 value) + { + return new bool4(ulong.IsPow2(value.X), ulong.IsPow2(value.Y), ulong.IsPow2(value.Z), ulong.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct ulong4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 PopCount(ulong4 value) + { + return new ulong4(ulong.PopCount(value.X), ulong.PopCount(value.Y), ulong.PopCount(value.Z), ulong.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 LeadingZeroCount(ulong4 value) + { + return new ulong4(ulong.LeadingZeroCount(value.X), ulong.LeadingZeroCount(value.Y), ulong.LeadingZeroCount(value.Z), ulong.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 TrailingZeroCount(ulong4 value) + { + return new ulong4(ulong.TrailingZeroCount(value.X), ulong.TrailingZeroCount(value.Y), ulong.TrailingZeroCount(value.Z), ulong.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 RotateLeft(ulong4 value, int rotateAmount) + { + return new ulong4(ulong.RotateLeft(value.X, rotateAmount), ulong.RotateLeft(value.Y, rotateAmount), ulong.RotateLeft(value.Z, rotateAmount), ulong.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 RotateRight(ulong4 value, int rotateAmount) + { + return new ulong4(ulong.RotateRight(value.X, rotateAmount), ulong.RotateRight(value.Y, rotateAmount), ulong.RotateRight(value.Z, rotateAmount), ulong.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.numerics.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.numerics.gen.cs new file mode 100644 index 0000000..f9826cb --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct ulong4 : INumberBase +{ + /// + public static ulong4 Zero => new(0); + + /// + public static ulong4 One => new(1); + + static ulong4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static ulong4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static ulong4 INumberBase.Abs(ulong4 value) => value; + + static bool INumberBase.IsCanonical(ulong4 value) => true; + + static bool INumberBase.IsComplexNumber(ulong4 value) => false; + + static bool INumberBase.IsImaginaryNumber(ulong4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(ulong4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(ulong4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(ulong4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + static bool INumberBase.IsNegative(ulong4 value) => false; + + static bool INumberBase.IsPositive(ulong4 value) => true; + + static bool INumberBase.IsFinite(ulong4 value) => true; + + static bool INumberBase.IsInfinity(ulong4 value) => false; + + static bool INumberBase.IsNegativeInfinity(ulong4 value) => false; + + static bool INumberBase.IsPositiveInfinity(ulong4 value) => false; + + static bool INumberBase.IsInteger(ulong4 value) => true; + + static bool INumberBase.IsRealNumber(ulong4 value) => true; + + static bool INumberBase.IsNaN(ulong4 value) => false; + + static bool INumberBase.IsNormal(ulong4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(ulong4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 MaxMagnitude(ulong4 a, ulong4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 MaxMagnitudeNumber(ulong4 a, ulong4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 MinMagnitude(ulong4 a, ulong4 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 MinMagnitudeNumber(ulong4 a, ulong4 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Add(ulong4 a, ulong4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Divide(ulong4 a, ulong4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Multiply(ulong4 a, ulong4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Negate(ulong4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Subtract(ulong4 a, ulong4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator +(ulong4 a, ulong4 b) + { + return new(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator -(ulong4 a, ulong4 b) + { + return new(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator *(ulong4 a, ulong4 b) + { + return new(a.X * b.X, a.Y * b.Y, a.Z * b.Z, a.W * b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator /(ulong4 a, ulong4 b) + { + return new(a.X / b.X, a.Y / b.Y, a.Z / b.Z, a.W / b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator -(ulong4 a) + { + return new(0 - a.X, 0 - a.Y, 0 - a.Z, 0 - a.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator +(ulong4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static ulong4 IIncrementOperators.operator ++(ulong4 value) => value + One; + + static ulong4 IDecrementOperators.operator --(ulong4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out ulong4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(ulong4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out ulong4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(ulong4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out ulong4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(ulong4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct ulong4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Divide(ulong4 a, ulong b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Multiply(ulong4 a, ulong b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Multiply(ulong a, ulong4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator *(ulong4 a, ulong b) + { + return new(a.X * b, a.Y * b, a.Z * b, a.W * b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator /(ulong4 a, ulong b) + { + return new(a.X / b, a.Y / b, a.Z / b, a.W / b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator *(ulong a, ulong4 b) + { + return new(a * b.X, a * b.Y, a * b.Z, a * b.W); + } +} + +// INumber +public partial struct ulong4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Clamp(ulong4 value, ulong4 min, ulong4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Max(ulong4 a, ulong4 b) + { + return new(ulong.Max(a.X, b.X), ulong.Max(a.Y, b.Y), ulong.Max(a.Z, b.Z), ulong.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 Min(ulong4 a, ulong4 b) + { + return new(ulong.Min(a.X, b.X), ulong.Min(a.Y, b.Y), ulong.Min(a.Z, b.Z), ulong.Min(a.W, b.W)); + } + + static ulong4 INumber.MaxNumber(ulong4 a, ulong4 b) => Max(a, b); + + static ulong4 INumber.MinNumber(ulong4 a, ulong4 b) => Min(a, b); + + static ulong4 INumber.CopySign(ulong4 value, ulong4 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static ulong4 INumber.ClampNative(ulong4 value, ulong4 min, ulong4 max) => Clamp(value, min, max); + + static ulong4 INumber.MaxNative(ulong4 a, ulong4 b) => Max(a, b); + + static ulong4 INumber.MinNative(ulong4 a, ulong4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(ulong4 value) => + throw new NotSupportedException($"{nameof(ulong4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong4 operator %(ulong4 a, ulong4 b) + { + return new ulong4(a.X % b.X, a.Y % b.Y, a.Z % b.Z, a.W % b.W); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(ulong4)} has no total order."); + + int IComparable.CompareTo(ulong4 other) => + throw new NotSupportedException($"{nameof(ulong4)} has no total order."); + + static bool IComparisonOperators.operator <(ulong4 a, ulong4 b) => + throw new NotSupportedException($"{nameof(ulong4)} has no total order."); + + static bool IComparisonOperators.operator <=(ulong4 a, ulong4 b) => + throw new NotSupportedException($"{nameof(ulong4)} has no total order."); + + static bool IComparisonOperators.operator >(ulong4 a, ulong4 b) => + throw new NotSupportedException($"{nameof(ulong4)} has no total order."); + + static bool IComparisonOperators.operator >=(ulong4 a, ulong4 b) => + throw new NotSupportedException($"{nameof(ulong4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct ulong4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(ulong4 a, ulong4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(ulong4 a, ulong4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(ulong4 a, ulong4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(ulong4 a, ulong4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(ulong4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(ulong4 value) + { + return new bool4(ulong.IsEvenInteger(value.X), ulong.IsEvenInteger(value.Y), ulong.IsEvenInteger(value.Z), ulong.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(ulong4 value) + { + return new bool4(ulong.IsOddInteger(value.X), ulong.IsOddInteger(value.Y), ulong.IsOddInteger(value.Z), ulong.IsOddInteger(value.W)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct ulong4 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/ulong4/ulong4.swizzle.gen.cs b/Brutal.Numerics/Vector/ulong4/ulong4.swizzle.gen.cs new file mode 100644 index 0000000..8ddc5d5 --- /dev/null +++ b/Brutal.Numerics/Vector/ulong4/ulong4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ulong4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public ulong2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public ulong2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public ulong2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public ulong2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public ulong2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public ulong2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public ulong2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public ulong2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public ulong2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public ulong2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public ulong2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public ulong2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public ulong3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public ulong3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public ulong3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public ulong3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public ulong3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public ulong3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public ulong3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public ulong3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public ulong3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public ulong3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public ulong3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public ulong3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public ulong3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public ulong3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public ulong3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public ulong3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public ulong3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public ulong3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public ulong3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public ulong3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public ulong3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public ulong3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public ulong3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public ulong3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public ulong4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public ulong4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public ulong4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public ulong4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public ulong4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public ulong4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public ulong4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public ulong4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public ulong4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public ulong4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public ulong4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public ulong4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public ulong4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public ulong4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public ulong4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public ulong4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public ulong4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public ulong4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public ulong4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public ulong4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public ulong4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public ulong4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public ulong4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct ulong4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public ulong R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public ulong G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public ulong B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public ulong A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public ulong2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public ulong2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public ulong2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public ulong2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public ulong2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public ulong2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public ulong2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public ulong2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public ulong2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public ulong2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public ulong2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public ulong2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ulong3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public ulong3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public ulong3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ulong4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ulong4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ulong4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ulong4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ulong4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ulong4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ulong4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ulong4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ulong4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ulong4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ulong4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public ulong4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public ulong4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ulong4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ulong4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ulong4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ulong4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public ulong4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public ulong4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.copy.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.copy.gen.cs new file mode 100644 index 0000000..3054fbc --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 2.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.equality.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.equality.gen.cs new file mode 100644 index 0000000..f4f40bd --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort2 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(ushort2 other) + { + return X.Equals(other.X) && Y.Equals(other.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is ushort2 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ushort2 a, ushort2 b) + { + return a.X == b.X && a.Y == b.Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ushort2 a, ushort2 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.format.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.format.gen.cs new file mode 100644 index 0000000..c0aae18 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort2 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static ushort2 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static ushort2 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static ushort2 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static ushort2 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid ushort2 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ushort2 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out ushort2 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ushort2 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a ushort2. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out ushort2 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.gen.cs new file mode 100644 index 0000000..12bb628 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.gen.cs @@ -0,0 +1,106 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 2D vector with ushort components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView2))] +public partial struct ushort2 : IVector2 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(ushort); + + /// Gets the number of components. + public static int ComponentCount => 2; + + /// + [XmlAttribute] + public ushort X; + + /// + [XmlAttribute] + public ushort Y; + + ushort IVector2.X { readonly get => X; set => X = value; } + + ushort IVector2.Y { readonly get => Y; set => Y = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort2(ushort x, ushort y) + { + X = x; + Y = y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort2(ushort xy) + : this(xy, xy) { } + + /// Creates a vector from the leading 2 elements of a span. + /// The elements to read; must contain at least 2, and any beyond that are ignored. + /// holds fewer than 2 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort2(ReadOnlySpan span) + { + if (span.Length < 2) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 2."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ushort2 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static ushort2 UnitX => new(1, 0); + + /// + public static ushort2 UnitY => new(0, 1); + + /// + public ushort this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out ushort x, out ushort y) + { + x = X; + y = Y; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 2); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 2); + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.math-metric.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.math-metric.gen.cs new file mode 100644 index 0000000..5626c95 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(ushort2 a, ushort2 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(ushort2 a, ushort2 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(ushort2 a, ushort2 b) + { + return a.X * b.X + a.Y * b.Y; + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.numerics-binary.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.numerics-binary.gen.cs new file mode 100644 index 0000000..24f60f1 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct ushort2 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(ushort2 value) + { + return ushort.IsPow2(value.X) && ushort.IsPow2(value.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Log2(ushort2 value) + { + return new ushort2(ushort.Log2(value.X), ushort.Log2(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator &(ushort2 a, ushort2 b) + { + return new((ushort)(a.X & b.X), (ushort)(a.Y & b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator |(ushort2 a, ushort2 b) + { + return new((ushort)(a.X | b.X), (ushort)(a.Y | b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator ^(ushort2 a, ushort2 b) + { + return new((ushort)(a.X ^ b.X), (ushort)(a.Y ^ b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator ~(ushort2 value) + { + return new((ushort)(~value.X), (ushort)(~value.Y)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct ushort2 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsPow2(ushort2 value) + { + return new bool2(ushort.IsPow2(value.X), ushort.IsPow2(value.Y)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct ushort2 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 PopCount(ushort2 value) + { + return new ushort2(ushort.PopCount(value.X), ushort.PopCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 LeadingZeroCount(ushort2 value) + { + return new ushort2(ushort.LeadingZeroCount(value.X), ushort.LeadingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 TrailingZeroCount(ushort2 value) + { + return new ushort2(ushort.TrailingZeroCount(value.X), ushort.TrailingZeroCount(value.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 RotateLeft(ushort2 value, int rotateAmount) + { + return new ushort2(ushort.RotateLeft(value.X, rotateAmount), ushort.RotateLeft(value.Y, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 RotateRight(ushort2 value, int rotateAmount) + { + return new ushort2(ushort.RotateRight(value.X, rotateAmount), ushort.RotateRight(value.Y, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.numerics.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.numerics.gen.cs new file mode 100644 index 0000000..1b7b4cf --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct ushort2 : INumberBase +{ + /// + public static ushort2 Zero => new(0); + + /// + public static ushort2 One => new(1); + + static ushort2 IAdditiveIdentity.AdditiveIdentity => Zero; + + static ushort2 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static ushort2 INumberBase.Abs(ushort2 value) => value; + + static bool INumberBase.IsCanonical(ushort2 value) => true; + + static bool INumberBase.IsComplexNumber(ushort2 value) => false; + + static bool INumberBase.IsImaginaryNumber(ushort2 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(ushort2 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(ushort2 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(ushort2 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1; + } + + static bool INumberBase.IsNegative(ushort2 value) => false; + + static bool INumberBase.IsPositive(ushort2 value) => true; + + static bool INumberBase.IsFinite(ushort2 value) => true; + + static bool INumberBase.IsInfinity(ushort2 value) => false; + + static bool INumberBase.IsNegativeInfinity(ushort2 value) => false; + + static bool INumberBase.IsPositiveInfinity(ushort2 value) => false; + + static bool INumberBase.IsInteger(ushort2 value) => true; + + static bool INumberBase.IsRealNumber(ushort2 value) => true; + + static bool INumberBase.IsNaN(ushort2 value) => false; + + static bool INumberBase.IsNormal(ushort2 value) => value.X != 0 && value.Y != 0; + + static bool INumberBase.IsSubnormal(ushort2 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 MaxMagnitude(ushort2 a, ushort2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 MaxMagnitudeNumber(ushort2 a, ushort2 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 MinMagnitude(ushort2 a, ushort2 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 MinMagnitudeNumber(ushort2 a, ushort2 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Add(ushort2 a, ushort2 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Divide(ushort2 a, ushort2 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Multiply(ushort2 a, ushort2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Negate(ushort2 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Subtract(ushort2 a, ushort2 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator +(ushort2 a, ushort2 b) + { + return new((ushort)(a.X + b.X), (ushort)(a.Y + b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator -(ushort2 a, ushort2 b) + { + return new((ushort)(a.X - b.X), (ushort)(a.Y - b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator *(ushort2 a, ushort2 b) + { + return new((ushort)(a.X * b.X), (ushort)(a.Y * b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator /(ushort2 a, ushort2 b) + { + return new((ushort)(a.X / b.X), (ushort)(a.Y / b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator -(ushort2 a) + { + return new((ushort)(0 - a.X), (ushort)(0 - a.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator +(ushort2 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static ushort2 IIncrementOperators.operator ++(ushort2 value) => value + One; + + static ushort2 IDecrementOperators.operator --(ushort2 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out ushort2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(ushort2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out ushort2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(ushort2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out ushort2 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(ushort2 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct ushort2 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Divide(ushort2 a, ushort b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Multiply(ushort2 a, ushort b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Multiply(ushort a, ushort2 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator *(ushort2 a, ushort b) + { + return new((ushort)(a.X * b), (ushort)(a.Y * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator /(ushort2 a, ushort b) + { + return new((ushort)(a.X / b), (ushort)(a.Y / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator *(ushort a, ushort2 b) + { + return new((ushort)(a * b.X), (ushort)(a * b.Y)); + } +} + +// INumber +public partial struct ushort2 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Clamp(ushort2 value, ushort2 min, ushort2 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Max(ushort2 a, ushort2 b) + { + return new(ushort.Max(a.X, b.X), ushort.Max(a.Y, b.Y)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 Min(ushort2 a, ushort2 b) + { + return new(ushort.Min(a.X, b.X), ushort.Min(a.Y, b.Y)); + } + + static ushort2 INumber.MaxNumber(ushort2 a, ushort2 b) => Max(a, b); + + static ushort2 INumber.MinNumber(ushort2 a, ushort2 b) => Min(a, b); + + static ushort2 INumber.CopySign(ushort2 value, ushort2 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static ushort2 INumber.ClampNative(ushort2 value, ushort2 min, ushort2 max) => Clamp(value, min, max); + + static ushort2 INumber.MaxNative(ushort2 a, ushort2 b) => Max(a, b); + + static ushort2 INumber.MinNative(ushort2 a, ushort2 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(ushort2 value) => + throw new NotSupportedException($"{nameof(ushort2)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort2 operator %(ushort2 a, ushort2 b) + { + return new ushort2((ushort)(a.X % b.X), (ushort)(a.Y % b.Y)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(ushort2)} has no total order."); + + int IComparable.CompareTo(ushort2 other) => + throw new NotSupportedException($"{nameof(ushort2)} has no total order."); + + static bool IComparisonOperators.operator <(ushort2 a, ushort2 b) => + throw new NotSupportedException($"{nameof(ushort2)} has no total order."); + + static bool IComparisonOperators.operator <=(ushort2 a, ushort2 b) => + throw new NotSupportedException($"{nameof(ushort2)} has no total order."); + + static bool IComparisonOperators.operator >(ushort2 a, ushort2 b) => + throw new NotSupportedException($"{nameof(ushort2)} has no total order."); + + static bool IComparisonOperators.operator >=(ushort2 a, ushort2 b) => + throw new NotSupportedException($"{nameof(ushort2)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct ushort2 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <(ushort2 a, ushort2 b) + { + return new bool2(a.X < b.X, a.Y < b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <=(ushort2 a, ushort2 b) + { + return new bool2(a.X <= b.X, a.Y <= b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >(ushort2 a, ushort2 b) + { + return new bool2(a.X > b.X, a.Y > b.Y); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >=(ushort2 a, ushort2 b) + { + return new bool2(a.X >= b.X, a.Y >= b.Y); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsZero(ushort2 value) + { + return new bool2(value.X == 0, value.Y == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsEvenInteger(ushort2 value) + { + return new bool2(ushort.IsEvenInteger(value.X), ushort.IsEvenInteger(value.Y)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 IsOddInteger(ushort2 value) + { + return new bool2(ushort.IsOddInteger(value.X), ushort.IsOddInteger(value.Y)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct ushort2 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.pack.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.pack.gen.cs new file mode 100644 index 0000000..85e7b86 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort2 +{ + public static ushort2 Unpack(in sbyte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Unpack(in byte2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Unpack(in short2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Pack(in int2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Pack(in uint2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Pack(in float2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Pack(in double2 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort2 result, elementConverter); + return result; + } + + public static ushort2 Unpack(in sbyte2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToUShort(mode)); + } + + public static ushort2 Unpack(in byte2 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Byte.ToUShort(mode)); + } + + public static ushort2 Unpack(in short2 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Short.ToUShort(mode)); + } + + public static ushort2 Pack(in int2 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Int.ToUShort(mode)); + } + + public static ushort2 Pack(in uint2 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UInt.ToUShort(mode)); + } + + public static ushort2 Pack(in float2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToUShort(mode)); + } + + public static ushort2 Pack(in double2 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToUShort(mode)); + } +} diff --git a/Brutal.Numerics/Vector/ushort2/ushort2.swizzle.gen.cs b/Brutal.Numerics/Vector/ushort2/ushort2.swizzle.gen.cs new file mode 100644 index 0000000..2ebb6b3 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort2/ushort2.swizzle.gen.cs @@ -0,0 +1,80 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort2 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public ushort2 XY + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public ushort2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } +} + +public partial struct ushort2 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public ushort R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public ushort G + { + readonly get => Y; + set => Y = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public ushort2 RG + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public ushort2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + G = value.R; + R = value.G; + } + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.color.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.color.gen.cs new file mode 100644 index 0000000..bdd13ae --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.color.gen.cs @@ -0,0 +1,31 @@ +// - edit Vector.color.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + /// + /// Constructs a ushort3 vector representing an RGB color. + /// + /// Red component. + /// Green component. + /// Blue component. + /// A ushort3 color with the specified RGB values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Rgb(ushort r, ushort g, ushort b) + { + return new ushort3(r, g, b); + } + + /// + /// Constructs a ushort3 vector representing a grayscale color. + /// + /// Single value used for red, green, and blue components. + /// A ushort3 grayscale color with the specified value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Grayscale(ushort v) + { + return new ushort3(v, v, v); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.copy.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.copy.gen.cs new file mode 100644 index 0000000..bda4320 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 3.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.equality.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.equality.gen.cs new file mode 100644 index 0000000..cf6bddd --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(ushort3 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is ushort3 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ushort3 a, ushort3 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ushort3 a, ushort3 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.format.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.format.gen.cs new file mode 100644 index 0000000..bf89c9d --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static ushort3 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static ushort3 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static ushort3 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static ushort3 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid ushort3 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ushort3 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out ushort3 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ushort3 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a ushort3. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out ushort3 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.gen.cs new file mode 100644 index 0000000..9f5513a --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.gen.cs @@ -0,0 +1,123 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 3D vector with ushort components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView3))] +public partial struct ushort3 : IVector3 + , IIntegerVector + , ICrossProduct +{ + /// + public static int ComponentSize => sizeof(ushort); + + /// Gets the number of components. + public static int ComponentCount => 3; + + /// + [XmlAttribute] + public ushort X; + + /// + [XmlAttribute] + public ushort Y; + + /// + [XmlAttribute] + public ushort Z; + + ushort IVector3.X { readonly get => X; set => X = value; } + + ushort IVector3.Y { readonly get => Y; set => Y = value; } + + ushort IVector3.Z { readonly get => Z; set => Z = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort3(ushort x, ushort y, ushort z) + { + X = x; + Y = y; + Z = z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort3(ushort xyz) + : this(xyz, xyz, xyz) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort3(ushort2 xy, ushort z) + : this(xy.X, xy.Y, z) { } + + /// Creates a vector from the leading 3 elements of a span. + /// The elements to read; must contain at least 3, and any beyond that are ignored. + /// holds fewer than 3 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort3(ReadOnlySpan span) + { + if (span.Length < 3) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 3."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ushort3 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static ushort3 UnitX => new(1, 0, 0); + + /// + public static ushort3 UnitY => new(0, 1, 0); + + /// + public static ushort3 UnitZ => new(0, 0, 1); + + /// + public ushort this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out ushort x, out ushort y, out ushort z) + { + x = X; + y = Y; + z = Z; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 3); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 3); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.math-metric.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.math-metric.gen.cs new file mode 100644 index 0000000..ea7437a --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(ushort3 a, ushort3 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(ushort3 a, ushort3 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(ushort3 a, ushort3 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z; + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.math.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.math.gen.cs new file mode 100644 index 0000000..02ed8bd --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.math.gen.cs @@ -0,0 +1,17 @@ +// - edit Vector.math.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Cross(ushort3 a, ushort3 b) + { + return new( + (ushort)(a.Y * b.Z - a.Z * b.Y), + (ushort)(a.Z * b.X - a.X * b.Z), + (ushort)(a.X * b.Y - a.Y * b.X)); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.numerics-binary.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.numerics-binary.gen.cs new file mode 100644 index 0000000..ca148d6 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct ushort3 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(ushort3 value) + { + return ushort.IsPow2(value.X) && ushort.IsPow2(value.Y) && ushort.IsPow2(value.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Log2(ushort3 value) + { + return new ushort3(ushort.Log2(value.X), ushort.Log2(value.Y), ushort.Log2(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator &(ushort3 a, ushort3 b) + { + return new((ushort)(a.X & b.X), (ushort)(a.Y & b.Y), (ushort)(a.Z & b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator |(ushort3 a, ushort3 b) + { + return new((ushort)(a.X | b.X), (ushort)(a.Y | b.Y), (ushort)(a.Z | b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator ^(ushort3 a, ushort3 b) + { + return new((ushort)(a.X ^ b.X), (ushort)(a.Y ^ b.Y), (ushort)(a.Z ^ b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator ~(ushort3 value) + { + return new((ushort)(~value.X), (ushort)(~value.Y), (ushort)(~value.Z)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct ushort3 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsPow2(ushort3 value) + { + return new bool3(ushort.IsPow2(value.X), ushort.IsPow2(value.Y), ushort.IsPow2(value.Z)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct ushort3 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 PopCount(ushort3 value) + { + return new ushort3(ushort.PopCount(value.X), ushort.PopCount(value.Y), ushort.PopCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 LeadingZeroCount(ushort3 value) + { + return new ushort3(ushort.LeadingZeroCount(value.X), ushort.LeadingZeroCount(value.Y), ushort.LeadingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 TrailingZeroCount(ushort3 value) + { + return new ushort3(ushort.TrailingZeroCount(value.X), ushort.TrailingZeroCount(value.Y), ushort.TrailingZeroCount(value.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 RotateLeft(ushort3 value, int rotateAmount) + { + return new ushort3(ushort.RotateLeft(value.X, rotateAmount), ushort.RotateLeft(value.Y, rotateAmount), ushort.RotateLeft(value.Z, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 RotateRight(ushort3 value, int rotateAmount) + { + return new ushort3(ushort.RotateRight(value.X, rotateAmount), ushort.RotateRight(value.Y, rotateAmount), ushort.RotateRight(value.Z, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.numerics.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.numerics.gen.cs new file mode 100644 index 0000000..b13c0bf --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct ushort3 : INumberBase +{ + /// + public static ushort3 Zero => new(0); + + /// + public static ushort3 One => new(1); + + static ushort3 IAdditiveIdentity.AdditiveIdentity => Zero; + + static ushort3 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static ushort3 INumberBase.Abs(ushort3 value) => value; + + static bool INumberBase.IsCanonical(ushort3 value) => true; + + static bool INumberBase.IsComplexNumber(ushort3 value) => false; + + static bool INumberBase.IsImaginaryNumber(ushort3 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(ushort3 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(ushort3 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(ushort3 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1; + } + + static bool INumberBase.IsNegative(ushort3 value) => false; + + static bool INumberBase.IsPositive(ushort3 value) => true; + + static bool INumberBase.IsFinite(ushort3 value) => true; + + static bool INumberBase.IsInfinity(ushort3 value) => false; + + static bool INumberBase.IsNegativeInfinity(ushort3 value) => false; + + static bool INumberBase.IsPositiveInfinity(ushort3 value) => false; + + static bool INumberBase.IsInteger(ushort3 value) => true; + + static bool INumberBase.IsRealNumber(ushort3 value) => true; + + static bool INumberBase.IsNaN(ushort3 value) => false; + + static bool INumberBase.IsNormal(ushort3 value) => value.X != 0 && value.Y != 0 && value.Z != 0; + + static bool INumberBase.IsSubnormal(ushort3 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 MaxMagnitude(ushort3 a, ushort3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 MaxMagnitudeNumber(ushort3 a, ushort3 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 MinMagnitude(ushort3 a, ushort3 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 MinMagnitudeNumber(ushort3 a, ushort3 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Add(ushort3 a, ushort3 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Divide(ushort3 a, ushort3 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Multiply(ushort3 a, ushort3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Negate(ushort3 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Subtract(ushort3 a, ushort3 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator +(ushort3 a, ushort3 b) + { + return new((ushort)(a.X + b.X), (ushort)(a.Y + b.Y), (ushort)(a.Z + b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator -(ushort3 a, ushort3 b) + { + return new((ushort)(a.X - b.X), (ushort)(a.Y - b.Y), (ushort)(a.Z - b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator *(ushort3 a, ushort3 b) + { + return new((ushort)(a.X * b.X), (ushort)(a.Y * b.Y), (ushort)(a.Z * b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator /(ushort3 a, ushort3 b) + { + return new((ushort)(a.X / b.X), (ushort)(a.Y / b.Y), (ushort)(a.Z / b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator -(ushort3 a) + { + return new((ushort)(0 - a.X), (ushort)(0 - a.Y), (ushort)(0 - a.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator +(ushort3 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static ushort3 IIncrementOperators.operator ++(ushort3 value) => value + One; + + static ushort3 IDecrementOperators.operator --(ushort3 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out ushort3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(ushort3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out ushort3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(ushort3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out ushort3 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(ushort3 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct ushort3 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Divide(ushort3 a, ushort b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Multiply(ushort3 a, ushort b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Multiply(ushort a, ushort3 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator *(ushort3 a, ushort b) + { + return new((ushort)(a.X * b), (ushort)(a.Y * b), (ushort)(a.Z * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator /(ushort3 a, ushort b) + { + return new((ushort)(a.X / b), (ushort)(a.Y / b), (ushort)(a.Z / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator *(ushort a, ushort3 b) + { + return new((ushort)(a * b.X), (ushort)(a * b.Y), (ushort)(a * b.Z)); + } +} + +// INumber +public partial struct ushort3 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Clamp(ushort3 value, ushort3 min, ushort3 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Max(ushort3 a, ushort3 b) + { + return new(ushort.Max(a.X, b.X), ushort.Max(a.Y, b.Y), ushort.Max(a.Z, b.Z)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 Min(ushort3 a, ushort3 b) + { + return new(ushort.Min(a.X, b.X), ushort.Min(a.Y, b.Y), ushort.Min(a.Z, b.Z)); + } + + static ushort3 INumber.MaxNumber(ushort3 a, ushort3 b) => Max(a, b); + + static ushort3 INumber.MinNumber(ushort3 a, ushort3 b) => Min(a, b); + + static ushort3 INumber.CopySign(ushort3 value, ushort3 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static ushort3 INumber.ClampNative(ushort3 value, ushort3 min, ushort3 max) => Clamp(value, min, max); + + static ushort3 INumber.MaxNative(ushort3 a, ushort3 b) => Max(a, b); + + static ushort3 INumber.MinNative(ushort3 a, ushort3 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(ushort3 value) => + throw new NotSupportedException($"{nameof(ushort3)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort3 operator %(ushort3 a, ushort3 b) + { + return new ushort3((ushort)(a.X % b.X), (ushort)(a.Y % b.Y), (ushort)(a.Z % b.Z)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(ushort3)} has no total order."); + + int IComparable.CompareTo(ushort3 other) => + throw new NotSupportedException($"{nameof(ushort3)} has no total order."); + + static bool IComparisonOperators.operator <(ushort3 a, ushort3 b) => + throw new NotSupportedException($"{nameof(ushort3)} has no total order."); + + static bool IComparisonOperators.operator <=(ushort3 a, ushort3 b) => + throw new NotSupportedException($"{nameof(ushort3)} has no total order."); + + static bool IComparisonOperators.operator >(ushort3 a, ushort3 b) => + throw new NotSupportedException($"{nameof(ushort3)} has no total order."); + + static bool IComparisonOperators.operator >=(ushort3 a, ushort3 b) => + throw new NotSupportedException($"{nameof(ushort3)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct ushort3 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <(ushort3 a, ushort3 b) + { + return new bool3(a.X < b.X, a.Y < b.Y, a.Z < b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <=(ushort3 a, ushort3 b) + { + return new bool3(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >(ushort3 a, ushort3 b) + { + return new bool3(a.X > b.X, a.Y > b.Y, a.Z > b.Z); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >=(ushort3 a, ushort3 b) + { + return new bool3(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsZero(ushort3 value) + { + return new bool3(value.X == 0, value.Y == 0, value.Z == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsEvenInteger(ushort3 value) + { + return new bool3(ushort.IsEvenInteger(value.X), ushort.IsEvenInteger(value.Y), ushort.IsEvenInteger(value.Z)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 IsOddInteger(ushort3 value) + { + return new bool3(ushort.IsOddInteger(value.X), ushort.IsOddInteger(value.Y), ushort.IsOddInteger(value.Z)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct ushort3 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.pack.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.pack.gen.cs new file mode 100644 index 0000000..50e3a08 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + public static ushort3 Unpack(in sbyte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Unpack(in byte3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Unpack(in short3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Pack(in int3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Pack(in uint3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Pack(in float3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Pack(in double3 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort3 result, elementConverter); + return result; + } + + public static ushort3 Unpack(in sbyte3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToUShort(mode)); + } + + public static ushort3 Unpack(in byte3 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Byte.ToUShort(mode)); + } + + public static ushort3 Unpack(in short3 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Short.ToUShort(mode)); + } + + public static ushort3 Pack(in int3 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Int.ToUShort(mode)); + } + + public static ushort3 Pack(in uint3 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UInt.ToUShort(mode)); + } + + public static ushort3 Pack(in float3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToUShort(mode)); + } + + public static ushort3 Pack(in double3 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToUShort(mode)); + } +} diff --git a/Brutal.Numerics/Vector/ushort3/ushort3.swizzle.gen.cs b/Brutal.Numerics/Vector/ushort3/ushort3.swizzle.gen.cs new file mode 100644 index 0000000..69e16d3 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort3/ushort3.swizzle.gen.cs @@ -0,0 +1,400 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort3 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public ushort2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public ushort2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public ushort2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public ushort2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public ushort2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public ushort2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public ushort3 XYZ + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public ushort3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public ushort3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public ushort3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public ushort3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public ushort3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } +} + +public partial struct ushort3 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public ushort R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public ushort G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public ushort B + { + readonly get => Z; + set => Z = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public ushort2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public ushort2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public ushort2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public ushort2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public ushort2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public ushort2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 RGB + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.color.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.color.gen.cs new file mode 100644 index 0000000..6d9fa6f --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.color.gen.cs @@ -0,0 +1,57 @@ +// - edit Vector.color.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 +{ + /// + /// Constructs a ushort4 vector representing an RGB color with full opacity (alpha = 0xFFFF). + /// + /// Red component. + /// Green component. + /// Blue component. + /// A ushort4 color with the specified RGB values and alpha set to 0xFFFF. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Rgb(ushort r, ushort g, ushort b) + { + return new ushort4(r, g, b, 0xFFFF); + } + + /// + /// Constructs a ushort4 vector representing a grayscale color with full opacity (alpha = 0xFFFF). + /// + /// Single value used for red, green, and blue components. + /// A ushort4 grayscale color with the specified value and alpha set to 0xFFFF. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Grayscale(ushort v) + { + return new ushort4(v, v, v, 0xFFFF); + } + + /// + /// Constructs a ushort4 vector representing an RGBA color. + /// + /// Red component. + /// Green component. + /// Blue component. + /// Alpha component. + /// A ushort4 color with the specified RGBA values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Rgba(ushort r, ushort g, ushort b, ushort a) + { + return new ushort4(r, g, b, a); + } + + /// + /// Constructs a ushort4 vector representing a grayscale color with a specified alpha value. + /// + /// Single value used for red, green, and blue components. + /// Alpha component. + /// A ushort4 grayscale color with the specified value and alpha. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Grayscale(ushort v, ushort a) + { + return new ushort4(v, v, v, a); + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.copy.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.copy.gen.cs new file mode 100644 index 0000000..44428cf --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.copy.gen.cs @@ -0,0 +1,28 @@ +// - edit Vector.copy.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void CopyTo(Span destination) + { + if (destination.Length < ComponentCount) + throw new ArgumentException("Length must be at least 4.", nameof(destination)); + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool TryCopyTo(Span destination) + { + if (destination.Length < ComponentCount) + return false; + + Unsafe.WriteUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.equality.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.equality.gen.cs new file mode 100644 index 0000000..8128aa7 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.equality.gen.cs @@ -0,0 +1,41 @@ +// - edit Vector.equality.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 +{ + /// + public readonly override int GetHashCode() + { + return HashCode.Combine(X, Y, Z, W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly bool Equals(ushort4 other) + { + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly override bool Equals([NotNullWhen(true)] object? obj) + { + return obj is ushort4 other && Equals(other); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ushort4 a, ushort4 b) + { + return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.W == b.W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ushort4 a, ushort4 b) + { + return !(a == b); + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.format.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.format.gen.cs new file mode 100644 index 0000000..0c1ec15 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.format.gen.cs @@ -0,0 +1,92 @@ +// - edit Vector.format.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 : ISpanFormattable, IUtf8SpanFormattable, ISpanParsable +{ + /// + public readonly override string ToString() + { + return ToString("G", CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format) + { + return ToString(format, CultureInfo.CurrentCulture); + } + + /// + public readonly string ToString(string? format, IFormatProvider? formatProvider) + { + var separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; + return $"<{X.ToString(format, formatProvider)}{separator} {Y.ToString(format, formatProvider)}{separator} {Z.ToString(format, formatProvider)}{separator} {W.ToString(format, formatProvider)}>"; + } + + /// + public readonly bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out charsWritten, format, provider); + } + + /// + public readonly bool TryFormat(Span destination, out int bytesWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return StringHelpers.TryFormat(this, destination, out bytesWritten, format, provider); + } + + /// + public static ushort4 Parse(string s, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), NumberStyles.Integer, provider); + } + + /// + public static ushort4 Parse(ReadOnlySpan s, IFormatProvider? provider = null) + { + return Parse(s, NumberStyles.Integer, provider); + } + + /// + public static ushort4 Parse(string s, NumberStyles style, IFormatProvider? provider) + { + ArgumentNullException.ThrowIfNull(s); + return Parse(s.AsSpan(), style, provider); + } + + /// Parses from the format, <1, 2, 3>. + /// The input is not in a valid format, or a component fails to parse. + public static ushort4 Parse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider) + { + if (!TryParse(s, style, provider, out var result)) + throw new FormatException($"'{s}' is not in a valid ushort4 format."); + return result; + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ushort4 result) + { + return TryParse(s.AsSpan(), NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out ushort4 result) + { + return TryParse(s, NumberStyles.Integer, provider, out result); + } + + /// + public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ushort4 result) + { + return TryParse(s.AsSpan(), style, provider, out result); + } + + /// Parses from the format, <1, 2, 3>. + /// true if the input parsed as a ushort4. + public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatProvider? provider, out ushort4 result) + { + return StringHelpers.TryParse(s, style, provider, out result); + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.gen.cs new file mode 100644 index 0000000..c771856 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.gen.cs @@ -0,0 +1,147 @@ +// - edit Vector.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +/// +/// Implements a 4D vector with ushort components. +/// +[DebuggerTypeProxy(typeof(VectorDebugView4))] +public partial struct ushort4 : IVector4 + , IIntegerVector +{ + /// + public static int ComponentSize => sizeof(ushort); + + /// Gets the number of components. + public static int ComponentCount => 4; + + /// + [XmlAttribute] + public ushort X; + + /// + [XmlAttribute] + public ushort Y; + + /// + [XmlAttribute] + public ushort Z; + + /// + [XmlAttribute] + public ushort W; + + ushort IVector4.X { readonly get => X; set => X = value; } + + ushort IVector4.Y { readonly get => Y; set => Y = value; } + + ushort IVector4.Z { readonly get => Z; set => Z = value; } + + ushort IVector4.W { readonly get => W; set => W = value; } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort4(ushort x, ushort y, ushort z, ushort w) + { + X = x; + Y = y; + Z = z; + W = w; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort4(ushort xyzw) + : this(xyzw, xyzw, xyzw, xyzw) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort4(ushort3 xyz, ushort w) + : this(xyz.X, xyz.Y, xyz.Z, w) { } + + /// + /// Creates a new instance of from two instances. + /// + /// The first two components. + /// The last two components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort4(ushort2 xy, ushort2 zw) + : this(xy.X, xy.Y, zw.X, zw.Y) { } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort4(ushort2 xy, ushort z, ushort w) + : this(xy.X, xy.Y, z, w) { } + + /// Creates a vector from the leading 4 elements of a span. + /// The elements to read; must contain at least 4, and any beyond that are ignored. + /// holds fewer than 4 elements. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public ushort4(ReadOnlySpan span) + { + if (span.Length < 4) + throw new ArgumentOutOfRangeException(nameof(span), "Length must be at least 4."); + + this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(span))); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static ushort4 IComponentTuple.Create(ReadOnlySpan span) => new(span); + + /// + public static ushort4 UnitX => new(1, 0, 0, 0); + + /// + public static ushort4 UnitY => new(0, 1, 0, 0); + + /// + public static ushort4 UnitZ => new(0, 0, 1, 0); + + /// + public static ushort4 UnitW => new(0, 0, 0, 1); + + /// + public ushort this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + return Unsafe.Add(ref Unsafe.AsRef(in X), index); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + if ((uint)index >= ComponentCount) + throw new ArgumentOutOfRangeException(nameof(index)); + + Unsafe.Add(ref X, index) = value; + } + } + + public readonly void Deconstruct(out ushort x, out ushort y, out ushort z, out ushort w) + { + x = X; + y = Y; + z = Z; + w = W; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() + { + return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 4); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly ReadOnlySpan AsReadOnlySpan() + { + return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 4); + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.math-metric.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.math-metric.gen.cs new file mode 100644 index 0000000..f9eac0e --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.math-metric.gen.cs @@ -0,0 +1,42 @@ +// - edit Vector.math-metric.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly float Length() + { + return (float)double.Sqrt((double)X * X + (double)Y * Y + (double)Z * Z + (double)W * W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly int LengthSquared() + { + return Dot(this, this); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Distance(ushort4 a, ushort4 b) + { + return (float)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y) + ((double)a.Z - b.Z) * ((double)a.Z - b.Z) + ((double)a.W - b.W) * ((double)a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DistanceSquared(ushort4 a, ushort4 b) + { + return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z) + (a.W - b.W) * (a.W - b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Dot(ushort4 a, ushort4 b) + { + return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.numerics-binary.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.numerics-binary.gen.cs new file mode 100644 index 0000000..32dbb70 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.numerics-binary.gen.cs @@ -0,0 +1,100 @@ +// - edit Vector.numerics-binary.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// IBinaryNumber +public partial struct ushort4 : IBinaryNumber +{ + /// Determines if every component of a value is a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool IBinaryNumber.IsPow2(ushort4 value) + { + return ushort.IsPow2(value.X) && ushort.IsPow2(value.Y) && ushort.IsPow2(value.Z) && ushort.IsPow2(value.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Log2(ushort4 value) + { + return new ushort4(ushort.Log2(value.X), ushort.Log2(value.Y), ushort.Log2(value.Z), ushort.Log2(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator &(ushort4 a, ushort4 b) + { + return new((ushort)(a.X & b.X), (ushort)(a.Y & b.Y), (ushort)(a.Z & b.Z), (ushort)(a.W & b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator |(ushort4 a, ushort4 b) + { + return new((ushort)(a.X | b.X), (ushort)(a.Y | b.Y), (ushort)(a.Z | b.Z), (ushort)(a.W | b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator ^(ushort4 a, ushort4 b) + { + return new((ushort)(a.X ^ b.X), (ushort)(a.Y ^ b.Y), (ushort)(a.Z ^ b.Z), (ushort)(a.W ^ b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator ~(ushort4 value) + { + return new((ushort)(~value.X), (ushort)(~value.Y), (ushort)(~value.Z), (ushort)(~value.W)); + } +} + +// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses +public partial struct ushort4 +{ + /// Determines which components of a value are powers of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsPow2(ushort4 value) + { + return new bool4(ushort.IsPow2(value.X), ushort.IsPow2(value.Y), ushort.IsPow2(value.Z), ushort.IsPow2(value.W)); + } +} + +// the good bits from IBinaryInteger - declared on IIntegerVector +public partial struct ushort4 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 PopCount(ushort4 value) + { + return new ushort4(ushort.PopCount(value.X), ushort.PopCount(value.Y), ushort.PopCount(value.Z), ushort.PopCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 LeadingZeroCount(ushort4 value) + { + return new ushort4(ushort.LeadingZeroCount(value.X), ushort.LeadingZeroCount(value.Y), ushort.LeadingZeroCount(value.Z), ushort.LeadingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 TrailingZeroCount(ushort4 value) + { + return new ushort4(ushort.TrailingZeroCount(value.X), ushort.TrailingZeroCount(value.Y), ushort.TrailingZeroCount(value.Z), ushort.TrailingZeroCount(value.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 RotateLeft(ushort4 value, int rotateAmount) + { + return new ushort4(ushort.RotateLeft(value.X, rotateAmount), ushort.RotateLeft(value.Y, rotateAmount), ushort.RotateLeft(value.Z, rotateAmount), ushort.RotateLeft(value.W, rotateAmount)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 RotateRight(ushort4 value, int rotateAmount) + { + return new ushort4(ushort.RotateRight(value.X, rotateAmount), ushort.RotateRight(value.Y, rotateAmount), ushort.RotateRight(value.Z, rotateAmount), ushort.RotateRight(value.W, rotateAmount)); + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.numerics.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.numerics.gen.cs new file mode 100644 index 0000000..e6817c1 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.numerics.gen.cs @@ -0,0 +1,389 @@ +// - edit Vector.numerics.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +// INumberBase +public partial struct ushort4 : INumberBase +{ + /// + public static ushort4 Zero => new(0); + + /// + public static ushort4 One => new(1); + + static ushort4 IAdditiveIdentity.AdditiveIdentity => Zero; + + static ushort4 IMultiplicativeIdentity.MultiplicativeIdentity => One; + + static int INumberBase.Radix => 2; // every component type is binary + + static ushort4 INumberBase.Abs(ushort4 value) => value; + + static bool INumberBase.IsCanonical(ushort4 value) => true; + + static bool INumberBase.IsComplexNumber(ushort4 value) => false; + + static bool INumberBase.IsImaginaryNumber(ushort4 value) => false; + + /// Determines if every component of a value is zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsZero(ushort4 value) + { + return value == Zero; + } + + /// Determines if every component of a value is an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsEvenInteger(ushort4 value) + { + return (value.X & 1) == 0 && (value.Y & 1) == 0 && (value.Z & 1) == 0 && (value.W & 1) == 0; + } + + /// Determines if every component of a value is an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool INumberBase.IsOddInteger(ushort4 value) + { + return (value.X & 1) == 1 && (value.Y & 1) == 1 && (value.Z & 1) == 1 && (value.W & 1) == 1; + } + + static bool INumberBase.IsNegative(ushort4 value) => false; + + static bool INumberBase.IsPositive(ushort4 value) => true; + + static bool INumberBase.IsFinite(ushort4 value) => true; + + static bool INumberBase.IsInfinity(ushort4 value) => false; + + static bool INumberBase.IsNegativeInfinity(ushort4 value) => false; + + static bool INumberBase.IsPositiveInfinity(ushort4 value) => false; + + static bool INumberBase.IsInteger(ushort4 value) => true; + + static bool INumberBase.IsRealNumber(ushort4 value) => true; + + static bool INumberBase.IsNaN(ushort4 value) => false; + + static bool INumberBase.IsNormal(ushort4 value) => value.X != 0 && value.Y != 0 && value.Z != 0 && value.W != 0; + + static bool INumberBase.IsSubnormal(ushort4 value) => false; + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 MaxMagnitude(ushort4 a, ushort4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is greater. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 MaxMagnitudeNumber(ushort4 a, ushort4 b) + { + return Max(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 MinMagnitude(ushort4 a, ushort4 b) + { + return Min(a, b); + } + + /// Computes, componentwise, the value whose magnitude is smaller. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 MinMagnitudeNumber(ushort4 a, ushort4 b) + { + return Min(a, b); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Add(ushort4 a, ushort4 b) + { + return a + b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Divide(ushort4 a, ushort4 b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Multiply(ushort4 a, ushort4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Negate(ushort4 value) + { + return -value; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Subtract(ushort4 a, ushort4 b) + { + return a - b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator +(ushort4 a, ushort4 b) + { + return new((ushort)(a.X + b.X), (ushort)(a.Y + b.Y), (ushort)(a.Z + b.Z), (ushort)(a.W + b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator -(ushort4 a, ushort4 b) + { + return new((ushort)(a.X - b.X), (ushort)(a.Y - b.Y), (ushort)(a.Z - b.Z), (ushort)(a.W - b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator *(ushort4 a, ushort4 b) + { + return new((ushort)(a.X * b.X), (ushort)(a.Y * b.Y), (ushort)(a.Z * b.Z), (ushort)(a.W * b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator /(ushort4 a, ushort4 b) + { + return new((ushort)(a.X / b.X), (ushort)(a.Y / b.Y), (ushort)(a.Z / b.Z), (ushort)(a.W / b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator -(ushort4 a) + { + return new((ushort)(0 - a.X), (ushort)(0 - a.Y), (ushort)(0 - a.Z), (ushort)(0 - a.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator +(ushort4 a) + { + return a; + } + + // ++/-- are well-defined (+/- One) but a footgun on a concrete vector: generic-plane only. + + static ushort4 IIncrementOperators.operator ++(ushort4 value) => value + One; + + static ushort4 IDecrementOperators.operator --(ushort4 value) => value - One; + + + static bool INumberBase.TryConvertFromChecked(TOther value, out ushort4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToChecked(ushort4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromSaturating(TOther value, out ushort4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToSaturating(ushort4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } + + static bool INumberBase.TryConvertFromTruncating(TOther value, out ushort4 result) + { + return NumberConversion.TryConvertFrom(value, out result); + } + + static bool INumberBase.TryConvertToTruncating(ushort4 value, [MaybeNullWhen(false)] out TOther result) + { + result = default; + return false; + } +} + +// IMultiplyOperators, IDivisionOperators +public partial struct ushort4 + : IMultiplyOperators + , IDivisionOperators +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Divide(ushort4 a, ushort b) + { + return a / b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Multiply(ushort4 a, ushort b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Multiply(ushort a, ushort4 b) + { + return a * b; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator *(ushort4 a, ushort b) + { + return new((ushort)(a.X * b), (ushort)(a.Y * b), (ushort)(a.Z * b), (ushort)(a.W * b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator /(ushort4 a, ushort b) + { + return new((ushort)(a.X / b), (ushort)(a.Y / b), (ushort)(a.Z / b), (ushort)(a.W / b)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator *(ushort a, ushort4 b) + { + return new((ushort)(a * b.X), (ushort)(a * b.Y), (ushort)(a * b.Z), (ushort)(a * b.W)); + } +} + +// INumber +public partial struct ushort4 : INumber +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Clamp(ushort4 value, ushort4 min, ushort4 max) + { + // HLSL contract when min > max: max wins (clamp is Max-then-Min); pinned in + // Clamp_InvertedBounds_MatchesBcl. NOT scalar T.Clamp, which throws on inversion. + return Min(Max(value, min), max); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Max(ushort4 a, ushort4 b) + { + return new(ushort.Max(a.X, b.X), ushort.Max(a.Y, b.Y), ushort.Max(a.Z, b.Z), ushort.Max(a.W, b.W)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 Min(ushort4 a, ushort4 b) + { + return new(ushort.Min(a.X, b.X), ushort.Min(a.Y, b.Y), ushort.Min(a.Z, b.Z), ushort.Min(a.W, b.W)); + } + + static ushort4 INumber.MaxNumber(ushort4 a, ushort4 b) => Max(a, b); + + static ushort4 INumber.MinNumber(ushort4 a, ushort4 b) => Min(a, b); + + static ushort4 INumber.CopySign(ushort4 value, ushort4 sign) => value; + + // the Native variants permit either NaN/signed-zero behavior - forwarding is always legal + static ushort4 INumber.ClampNative(ushort4 value, ushort4 min, ushort4 max) => Clamp(value, min, max); + + static ushort4 INumber.MaxNative(ushort4 a, ushort4 b) => Max(a, b); + + static ushort4 INumber.MinNative(ushort4 a, ushort4 b) => Min(a, b); + + // Sign's int return cannot hold a per-lane answer, and a collapsed one would lie for mixed signs + static int INumber.Sign(ushort4 value) => + throw new NotSupportedException($"{nameof(ushort4)} has no scalar sign."); + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort4 operator %(ushort4 a, ushort4 b) + { + return new ushort4((ushort)(a.X % b.X), (ushort)(a.Y % b.Y), (ushort)(a.Z % b.Z), (ushort)(a.W % b.W)); + } + + int IComparable.CompareTo(object? obj) => + throw new NotSupportedException($"{nameof(ushort4)} has no total order."); + + int IComparable.CompareTo(ushort4 other) => + throw new NotSupportedException($"{nameof(ushort4)} has no total order."); + + static bool IComparisonOperators.operator <(ushort4 a, ushort4 b) => + throw new NotSupportedException($"{nameof(ushort4)} has no total order."); + + static bool IComparisonOperators.operator <=(ushort4 a, ushort4 b) => + throw new NotSupportedException($"{nameof(ushort4)} has no total order."); + + static bool IComparisonOperators.operator >(ushort4 a, ushort4 b) => + throw new NotSupportedException($"{nameof(ushort4)} has no total order."); + + static bool IComparisonOperators.operator >=(ushort4 a, ushort4 b) => + throw new NotSupportedException($"{nameof(ushort4)} has no total order."); +} + +// IComponentwiseComparison + the componentwise predicate masks (no interface to mirror) +public partial struct ushort4 : IComponentwiseComparison +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <(ushort4 a, ushort4 b) + { + return new bool4(a.X < b.X, a.Y < b.Y, a.Z < b.Z, a.W < b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <=(ushort4 a, ushort4 b) + { + return new bool4(a.X <= b.X, a.Y <= b.Y, a.Z <= b.Z, a.W <= b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >(ushort4 a, ushort4 b) + { + return new bool4(a.X > b.X, a.Y > b.Y, a.Z > b.Z, a.W > b.W); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >=(ushort4 a, ushort4 b) + { + return new bool4(a.X >= b.X, a.Y >= b.Y, a.Z >= b.Z, a.W >= b.W); + } + + /// Determines which components of a value are zero. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsZero(ushort4 value) + { + return new bool4(value.X == 0, value.Y == 0, value.Z == 0, value.W == 0); + } + + /// Determines which components of a value are an even integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsEvenInteger(ushort4 value) + { + return new bool4(ushort.IsEvenInteger(value.X), ushort.IsEvenInteger(value.Y), ushort.IsEvenInteger(value.Z), ushort.IsEvenInteger(value.W)); + } + + /// Determines which components of a value are an odd integral value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 IsOddInteger(ushort4 value) + { + return new bool4(ushort.IsOddInteger(value.X), ushort.IsOddInteger(value.Y), ushort.IsOddInteger(value.Z), ushort.IsOddInteger(value.W)); + } +} + +// IUnsignedNumber - a marker, so there is nothing to implement +public partial struct ushort4 : IUnsignedNumber; diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.pack.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.pack.gen.cs new file mode 100644 index 0000000..fc5e248 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.pack.gen.cs @@ -0,0 +1,210 @@ +// - edit Vector.pack.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 +{ + public static ushort4 Unpack(in sbyte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Unpack(in byte4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Unpack(in short4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Pack(in int4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Pack(in uint4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Pack(in float4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Pack(in double4 vector, Func elementConverter) + { + VectorPack.Pack(vector, out ushort4 result, elementConverter); + return result; + } + + public static ushort4 Unpack(in sbyte4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.SByte.ToUShort(mode)); + } + + public static ushort4 Unpack(in byte4 vector, Unpack.Integer mode = Numerics.Unpack.Integer.Cast) + { + return Unpack(vector, PackUtils.Byte.ToUShort(mode)); + } + + public static ushort4 Unpack(in short4 vector, Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast) + { + return Unpack(vector, PackUtils.Short.ToUShort(mode)); + } + + public static ushort4 Pack(in int4 vector, Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast) + { + return Pack(vector, PackUtils.Int.ToUShort(mode)); + } + + public static ushort4 Pack(in uint4 vector, Pack.Integer mode = Numerics.Pack.Integer.Cast) + { + return Pack(vector, PackUtils.UInt.ToUShort(mode)); + } + + public static ushort4 Pack(in float4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Float.ToUShort(mode)); + } + + public static ushort4 Pack(in double4 vector, Pack.Float mode = Numerics.Pack.Float.Truncate) + { + return Pack(vector, PackUtils.Double.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Func elementConverter + ) + { + VectorPack.Pack(source, destination, elementConverter); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.SByte.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.Integer mode = Numerics.Unpack.Integer.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Byte.ToUShort(mode)); + } + + public static void UnpackSpan( + in ReadOnlySpan source, + Span destination, + Unpack.IntegerMixed mode = Numerics.Unpack.IntegerMixed.Cast + ) + { + UnpackSpan(source, destination, PackUtils.Short.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.IntegerMixed mode = Numerics.Pack.IntegerMixed.Cast + ) + { + PackSpan(source, destination, PackUtils.Int.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Integer mode = Numerics.Pack.Integer.Cast + ) + { + PackSpan(source, destination, PackUtils.UInt.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Float.ToUShort(mode)); + } + + public static void PackSpan( + in ReadOnlySpan source, + Span destination, + Pack.Float mode = Numerics.Pack.Float.Truncate + ) + { + PackSpan(source, destination, PackUtils.Double.ToUShort(mode)); + } +} diff --git a/Brutal.Numerics/Vector/ushort4/ushort4.swizzle.gen.cs b/Brutal.Numerics/Vector/ushort4/ushort4.swizzle.gen.cs new file mode 100644 index 0000000..5bf3699 --- /dev/null +++ b/Brutal.Numerics/Vector/ushort4/ushort4.swizzle.gen.cs @@ -0,0 +1,1963 @@ +// - edit Vector.swizzle.tt to modify +#nullable enable + +namespace Brutal.Numerics; + +public partial struct ushort4 +{ + /// + /// Swizzle readonly getter/setter for the X and Y components of the vector. + /// + [XmlIgnore] + public ushort2 XY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y); + set + { + X = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and Z components of the vector. + /// + [XmlIgnore] + public ushort2 XZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z); + set + { + X = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and X components of the vector. + /// + [XmlIgnore] + public ushort2 YX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X); + set + { + Y = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and Z components of the vector. + /// + [XmlIgnore] + public ushort2 YZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z); + set + { + Y = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and X components of the vector. + /// + [XmlIgnore] + public ushort2 ZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X); + set + { + Z = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and Y components of the vector. + /// + [XmlIgnore] + public ushort2 ZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y); + set + { + Z = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Y components of the vector. + /// + [XmlIgnore] + public ushort2 WY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y); + set + { + W = value.X; + Y = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and Z components of the vector. + /// + [XmlIgnore] + public ushort2 WZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z); + set + { + W = value.X; + Z = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Y and W components of the vector. + /// + [XmlIgnore] + public ushort2 YW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W); + set + { + Y = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the Z and W components of the vector. + /// + [XmlIgnore] + public ushort2 ZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W); + set + { + Z = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X and W components of the vector. + /// + [XmlIgnore] + public ushort2 XW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W); + set + { + X = value.X; + W = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the W and X components of the vector. + /// + [XmlIgnore] + public ushort2 WX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X); + set + { + W = value.X; + X = value.Y; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and Z components of the vector. + /// + [XmlIgnore] + public ushort3 XYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, Z); + set + { + X = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and Y components of the vector. + /// + [XmlIgnore] + public ushort3 XZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and Z components of the vector. + /// + [XmlIgnore] + public ushort3 YXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and X components of the vector. + /// + [XmlIgnore] + public ushort3 YZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and Y components of the vector. + /// + [XmlIgnore] + public ushort3 ZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and X components of the vector. + /// + [XmlIgnore] + public ushort3 ZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and Z components of the vector. + /// + [XmlIgnore] + public ushort3 WYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and Y components of the vector. + /// + [XmlIgnore] + public ushort3 WZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and Z components of the vector. + /// + [XmlIgnore] + public ushort3 YWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z and W components of the vector. + /// + [XmlIgnore] + public ushort3 YZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and Y components of the vector. + /// + [XmlIgnore] + public ushort3 ZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y and W components of the vector. + /// + [XmlIgnore] + public ushort3 ZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Z components of the vector. + /// + [XmlIgnore] + public ushort3 XWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z and W components of the vector. + /// + [XmlIgnore] + public ushort3 XZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Z components of the vector. + /// + [XmlIgnore] + public ushort3 WXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z and X components of the vector. + /// + [XmlIgnore] + public ushort3 WZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X and W components of the vector. + /// + [XmlIgnore] + public ushort3 ZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W and X components of the vector. + /// + [XmlIgnore] + public ushort3 ZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y and W components of the vector. + /// + [XmlIgnore] + public ushort3 XYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W and Y components of the vector. + /// + [XmlIgnore] + public ushort3 XWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y); + set + { + X = value.X; + W = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X and W components of the vector. + /// + [XmlIgnore] + public ushort3 YXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W and X components of the vector. + /// + [XmlIgnore] + public ushort3 YWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X and Y components of the vector. + /// + [XmlIgnore] + public ushort3 WXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y and X components of the vector. + /// + [XmlIgnore] + public ushort3 WYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Y, Z and W components of the vector. + /// + [XmlIgnore] + public ushort4 XYZW + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the X, Y, W and Z components of the vector. + /// + [XmlIgnore] + public ushort4 XYWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + X = value.X; + Y = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, Y and W components of the vector. + /// + [XmlIgnore] + public ushort4 XZYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + X = value.X; + Z = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, Z, W and Y components of the vector. + /// + [XmlIgnore] + public ushort4 XZWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + X = value.X; + Z = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the X, W, Z and Y components of the vector. + /// + [XmlIgnore] + public ushort4 XWZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + X = value.X; + W = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, Z and W components of the vector. + /// + [XmlIgnore] + public ushort4 YXZW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + Y = value.X; + X = value.Y; + Z = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, X, W and Z components of the vector. + /// + [XmlIgnore] + public ushort4 YXWZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + Y = value.X; + X = value.Y; + W = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, X and W components of the vector. + /// + [XmlIgnore] + public ushort4 YZXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + Y = value.X; + Z = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, Z, W and X components of the vector. + /// + [XmlIgnore] + public ushort4 YZWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + Y = value.X; + Z = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, X and Z components of the vector. + /// + [XmlIgnore] + public ushort4 YWXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + Y = value.X; + W = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Y, W, Z and X components of the vector. + /// + [XmlIgnore] + public ushort4 YWZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + Y = value.X; + W = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, Y and W components of the vector. + /// + [XmlIgnore] + public ushort4 ZXYW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + Z = value.X; + X = value.Y; + Y = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, X, W and Y components of the vector. + /// + [XmlIgnore] + public ushort4 ZXWY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + Z = value.X; + X = value.Y; + W = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, X and W components of the vector. + /// + [XmlIgnore] + public ushort4 ZYXW + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + Z = value.X; + Y = value.Y; + X = value.Z; + W = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, Y, W and X components of the vector. + /// + [XmlIgnore] + public ushort4 ZYWX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + Z = value.X; + Y = value.Y; + W = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, X and Y components of the vector. + /// + [XmlIgnore] + public ushort4 ZWXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + Z = value.X; + W = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the Z, W, Y and X components of the vector. + /// + [XmlIgnore] + public ushort4 ZWYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + Z = value.X; + W = value.Y; + Y = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Y and Z components of the vector. + /// + [XmlIgnore] + public ushort4 WXYZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + W = value.X; + X = value.Y; + Y = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, X, Z and Y components of the vector. + /// + [XmlIgnore] + public ushort4 WXZY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + W = value.X; + X = value.Y; + Z = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, X and Z components of the vector. + /// + [XmlIgnore] + public ushort4 WYXZ + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + W = value.X; + Y = value.Y; + X = value.Z; + Z = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Y, Z and X components of the vector. + /// + [XmlIgnore] + public ushort4 WYZX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + W = value.X; + Y = value.Y; + Z = value.Z; + X = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, X and Y components of the vector. + /// + [XmlIgnore] + public ushort4 WZXY + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + W = value.X; + Z = value.Y; + X = value.Z; + Y = value.W; + } + } + + /// + /// Swizzle readonly getter/setter for the W, Z, Y and X components of the vector. + /// + [XmlIgnore] + public ushort4 WZYX + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + W = value.X; + Z = value.Y; + Y = value.Z; + X = value.W; + } + } +} + +public partial struct ushort4 +{ + /// + /// The Red component of the vector (synonym for X). + /// + [XmlIgnore] + public ushort R + { + readonly get => X; + set => X = value; + } + + /// + /// The Green component of the vector (synonym for Y). + /// + [XmlIgnore] + public ushort G + { + readonly get => Y; + set => Y = value; + } + + /// + /// The Blue component of the vector (synonym for Z). + /// + [XmlIgnore] + public ushort B + { + readonly get => Z; + set => Z = value; + } + + /// + /// The Alpha component of the vector (synonym for W). + /// + [XmlIgnore] + public ushort A + { + readonly get => W; + set => W = value; + } + + /// + /// Swizzle readonly getter/setter for the Red and Green components of the vector. + /// + [XmlIgnore] + public ushort2 RG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G); + set + { + R = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Blue components of the vector. + /// + [XmlIgnore] + public ushort2 RB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B); + set + { + R = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Red components of the vector. + /// + [XmlIgnore] + public ushort2 GR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R); + set + { + G = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Blue components of the vector. + /// + [XmlIgnore] + public ushort2 GB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B); + set + { + G = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Red components of the vector. + /// + [XmlIgnore] + public ushort2 BR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R); + set + { + B = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Green components of the vector. + /// + [XmlIgnore] + public ushort2 BG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G); + set + { + B = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Green components of the vector. + /// + [XmlIgnore] + public ushort2 AG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G); + set + { + A = value.R; + G = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Blue components of the vector. + /// + [XmlIgnore] + public ushort2 AB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B); + set + { + A = value.R; + B = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Green and Alpha components of the vector. + /// + [XmlIgnore] + public ushort2 GA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A); + set + { + G = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue and Alpha components of the vector. + /// + [XmlIgnore] + public ushort2 BA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A); + set + { + B = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red and Alpha components of the vector. + /// + [XmlIgnore] + public ushort2 RA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A); + set + { + R = value.R; + A = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha and Red components of the vector. + /// + [XmlIgnore] + public ushort2 AR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R); + set + { + A = value.R; + R = value.G; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 RGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, B); + set + { + R = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 RBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, G); + set + { + R = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 GRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, B); + set + { + G = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 GBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, R); + set + { + G = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 BRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, G); + set + { + B = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 BGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, R); + set + { + B = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 AGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, B); + set + { + A = value.R; + G = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 ABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, G); + set + { + A = value.R; + B = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 GAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, B); + set + { + G = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort3 GBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, B, A); + set + { + G = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 BAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, G); + set + { + B = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort3 BGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, G, A); + set + { + B = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 RAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, B); + set + { + R = value.R; + A = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort3 RBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, B, A); + set + { + R = value.R; + B = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ushort3 ARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, B); + set + { + A = value.R; + R = value.G; + B = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 ABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, B, R); + set + { + A = value.R; + B = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort3 BRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, R, A); + set + { + B = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 BAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(B, A, R); + set + { + B = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort3 RGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, G, A); + set + { + R = value.R; + G = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 RAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(R, A, G); + set + { + R = value.R; + A = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort3 GRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, R, A); + set + { + G = value.R; + R = value.G; + A = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 GAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(G, A, R); + set + { + G = value.R; + A = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public ushort3 ARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, R, G); + set + { + A = value.R; + R = value.G; + G = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public ushort3 AGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(A, G, R); + set + { + A = value.R; + G = value.G; + R = value.B; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort4 RGBA + { + readonly get => this; + set => this = value; + } + + /// + /// Swizzle readonly getter/setter for the Red, Green, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ushort4 RGAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Y, W, Z); + set + { + R = value.R; + G = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort4 RBGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, Y, W); + set + { + R = value.R; + B = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Blue, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ushort4 RBAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, Z, W, Y); + set + { + R = value.R; + B = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ushort4 RAGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Y, Z); + set + { + R = value.R; + A = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Red, Alpha, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ushort4 RABG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(X, W, Z, Y); + set + { + R = value.R; + A = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Blue, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort4 GRBA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, Z, W); + set + { + G = value.R; + R = value.G; + B = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Red, Alpha, and Blue components of the vector. + /// + [XmlIgnore] + public ushort4 GRAB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, X, W, Z); + set + { + G = value.R; + R = value.G; + A = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort4 GBRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, X, W); + set + { + G = value.R; + B = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Blue, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ushort4 GBAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, Z, W, X); + set + { + G = value.R; + B = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ushort4 GARB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, X, Z); + set + { + G = value.R; + A = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Green, Alpha, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ushort4 GABR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Y, W, Z, X); + set + { + G = value.R; + A = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Green, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort4 BRGA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, Y, W); + set + { + B = value.R; + R = value.G; + G = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Red, Alpha, and Green components of the vector. + /// + [XmlIgnore] + public ushort4 BRAG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, X, W, Y); + set + { + B = value.R; + R = value.G; + A = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Red, and Alpha components of the vector. + /// + [XmlIgnore] + public ushort4 BGRA + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, X, W); + set + { + B = value.R; + G = value.G; + R = value.B; + A = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Green, Alpha, and Red components of the vector. + /// + [XmlIgnore] + public ushort4 BGAR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, Y, W, X); + set + { + B = value.R; + G = value.G; + A = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Red, and Green components of the vector. + /// + [XmlIgnore] + public ushort4 BARG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, X, Y); + set + { + B = value.R; + A = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Blue, Alpha, Green, and Red components of the vector. + /// + [XmlIgnore] + public ushort4 BAGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(Z, W, Y, X); + set + { + B = value.R; + A = value.G; + G = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Green, and Blue components of the vector. + /// + [XmlIgnore] + public ushort4 ARGB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Y, Z); + set + { + A = value.R; + R = value.G; + G = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Red, Blue, and Green components of the vector. + /// + [XmlIgnore] + public ushort4 ARBG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, X, Z, Y); + set + { + A = value.R; + R = value.G; + B = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Red, and Blue components of the vector. + /// + [XmlIgnore] + public ushort4 AGRB + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, X, Z); + set + { + A = value.R; + G = value.G; + R = value.B; + B = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Green, Blue, and Red components of the vector. + /// + [XmlIgnore] + public ushort4 AGBR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Y, Z, X); + set + { + A = value.R; + G = value.G; + B = value.B; + R = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Red, and Green components of the vector. + /// + [XmlIgnore] + public ushort4 ABRG + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, X, Y); + set + { + A = value.R; + B = value.G; + R = value.B; + G = value.A; + } + } + + /// + /// Swizzle readonly getter/setter for the Alpha, Blue, Green, and Red components of the vector. + /// + [XmlIgnore] + public ushort4 ABGR + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + readonly get => new(W, Z, Y, X); + set + { + A = value.R; + B = value.G; + G = value.B; + R = value.A; + } + } +} diff --git a/Brutal.Numerics/VectorShuffle2.cs b/Brutal.Numerics/VectorShuffle2.cs new file mode 100644 index 0000000..07fce2c --- /dev/null +++ b/Brutal.Numerics/VectorShuffle2.cs @@ -0,0 +1,56 @@ +// At the project root deliberately: a net11 polyfill (see below) wants to be visible, and it is +// NOT carrier substrate - it survived the Simd/ pause because the matrix register kernels ride it. +namespace Brutal.Numerics; + +/* The two-source shuffle, as the BCL would spell it if net10 had one. + * + * `Sse.Shuffle(a, b, imm)` takes two lanes from each operand; the portable surface has no + * equivalent, and the ZipLower/ZipUpper pair that would cover the common cases arrives in net11 + * (verified absent from net10 by the vehicle-surface probe). Until then every caller pays + * permute + permute + blend, and the only question is whether they each spell it themselves. + * + * This is deliberately shaped as a static extension so it reads `Vector128.Shuffle2(...)`, i.e. + * exactly like the member whose absence it is covering - which is also the signal for what to do + * on the net11 bump: delete this file and let the calls bind to the real thing. + * + * Two concrete overloads rather than a generic one: the shuffle index operand is the lane-sized + * integer twin (int for float, long for double), so a generic body would have to re-derive the + * twin per T - the same typed-index problem the carrier's Shuffle already carries. The matrix + * kernels only ever need these two row shapes. */ +internal static class VectorShuffle2 +{ + extension(Vector128) + { + /// Two-source shuffle: (a[a0], a[a1], b[b2], b[b3]). Constant indices fold both permutes and the blend. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vector128 Shuffle2(Vector128 a, Vector128 b, int a0, int a1, int b2, int b3) + { + return Vector128.ConditionalSelect( + Vector128.Create(0, 0, -1, -1).AsSingle(), + Vector128.ShuffleNative(b, Vector128.Create(b2, b3, b2, b3)), + Vector128.ShuffleNative(a, Vector128.Create(a0, a1, a0, a1)) + ); + } + } + + extension(Vector256) + { + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Vector256 Shuffle2( + Vector256 a, + Vector256 b, + int a0, + int a1, + int b2, + int b3 + ) + { + return Vector256.ConditionalSelect( + Vector256.Create(0L, 0L, -1L, -1L).AsDouble(), + Vector256.ShuffleNative(b, Vector256.Create((long)b2, b3, b2, b3)), + Vector256.ShuffleNative(a, Vector256.Create((long)a0, a1, a0, a1)) + ); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.Constants.gen.cs b/Brutal.OpenAl/Generated/Al/Al.Constants.gen.cs new file mode 100644 index 0000000..7eb16e1 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.Constants.gen.cs @@ -0,0 +1,701 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Al + { + public static class Constants + { + public const int AL_NONE = unchecked((int)0); + public const int AL_FALSE = unchecked((int)0); + public const int AL_TRUE = unchecked((int)1); + public const int AL_SOURCE_RELATIVE = unchecked((int)0x202); + public const int AL_CONE_INNER_ANGLE = unchecked((int)0x1001); + public const int AL_CONE_OUTER_ANGLE = unchecked((int)0x1002); + public const int AL_PITCH = unchecked((int)0x1003); + public const int AL_POSITION = unchecked((int)0x1004); + public const int AL_DIRECTION = unchecked((int)0x1005); + public const int AL_VELOCITY = unchecked((int)0x1006); + public const int AL_LOOPING = unchecked((int)0x1007); + public const int AL_BUFFER = unchecked((int)0x1009); + public const int AL_GAIN = unchecked((int)0x100A); + public const int AL_MIN_GAIN = unchecked((int)0x100D); + public const int AL_MAX_GAIN = unchecked((int)0x100E); + public const int AL_ORIENTATION = unchecked((int)0x100F); + public const int AL_SOURCE_STATE = unchecked((int)0x1010); + public const int AL_INITIAL = unchecked((int)0x1011); + public const int AL_PLAYING = unchecked((int)0x1012); + public const int AL_PAUSED = unchecked((int)0x1013); + public const int AL_STOPPED = unchecked((int)0x1014); + public const int AL_BUFFERS_QUEUED = unchecked((int)0x1015); + public const int AL_BUFFERS_PROCESSED = unchecked((int)0x1016); + public const int AL_REFERENCE_DISTANCE = unchecked((int)0x1020); + public const int AL_ROLLOFF_FACTOR = unchecked((int)0x1021); + public const int AL_CONE_OUTER_GAIN = unchecked((int)0x1022); + public const int AL_MAX_DISTANCE = unchecked((int)0x1023); + public const int AL_FORMAT_MONO8 = unchecked((int)0x1100); + public const int AL_FORMAT_MONO16 = unchecked((int)0x1101); + public const int AL_FORMAT_STEREO8 = unchecked((int)0x1102); + public const int AL_FORMAT_STEREO16 = unchecked((int)0x1103); + public const int AL_FREQUENCY = unchecked((int)0x2001); + public const int AL_SIZE = unchecked((int)0x2004); + public const int AL_UNUSED = unchecked((int)0x2010); + public const int AL_PENDING = unchecked((int)0x2011); + public const int AL_PROCESSED = unchecked((int)0x2012); + public const int AL_NO_ERROR = unchecked((int)0); + public const int AL_INVALID_NAME = unchecked((int)0xA001); + public const int AL_INVALID_ENUM = unchecked((int)0xA002); + public const int AL_INVALID_VALUE = unchecked((int)0xA003); + public const int AL_INVALID_OPERATION = unchecked((int)0xA004); + public const int AL_OUT_OF_MEMORY = unchecked((int)0xA005); + public const int AL_VENDOR = unchecked((int)0xB001); + public const int AL_VERSION = unchecked((int)0xB002); + public const int AL_RENDERER = unchecked((int)0xB003); + public const int AL_EXTENSIONS = unchecked((int)0xB004); + public const int AL_DOPPLER_FACTOR = unchecked((int)0xC000); + public const int AL_DOPPLER_VELOCITY = unchecked((int)0xC001); + public const int AL_DISTANCE_MODEL = unchecked((int)0xD000); + + [Obsolete("Use -1 instead")] + public const int AL_INVALID = unchecked((int)-1); + + [Obsolete("Use AL_INVALID_ENUM instead")] + public const int AL_ILLEGAL_ENUM = unchecked((int)AL_INVALID_ENUM); + + [Obsolete("Use AL_INVALID_OPERATION instead")] + public const int AL_ILLEGAL_COMMAND = unchecked((int)AL_INVALID_OPERATION); + public const int AL_INVERSE_DISTANCE = unchecked((int)0xD001); + public const int AL_INVERSE_DISTANCE_CLAMPED = unchecked((int)0xD002); + public const int AL_SEC_OFFSET = unchecked((int)0x1024); + public const int AL_SAMPLE_OFFSET = unchecked((int)0x1025); + public const int AL_BYTE_OFFSET = unchecked((int)0x1026); + public const int AL_SOURCE_TYPE = unchecked((int)0x1027); + public const int AL_STATIC = unchecked((int)0x1028); + public const int AL_STREAMING = unchecked((int)0x1029); + public const int AL_UNDETERMINED = unchecked((int)0x1030); + public const int AL_BITS = unchecked((int)0x2002); + public const int AL_CHANNELS = unchecked((int)0x2003); + public const int AL_SPEED_OF_SOUND = unchecked((int)0xC003); + public const int AL_LINEAR_DISTANCE = unchecked((int)0xD003); + public const int AL_LINEAR_DISTANCE_CLAMPED = unchecked((int)0xD004); + public const int AL_EXPONENT_DISTANCE = unchecked((int)0xD005); + public const int AL_EXPONENT_DISTANCE_CLAMPED = unchecked((int)0xD006); + public const int AL_METERS_PER_UNIT = unchecked((int)0x20004); + public const int AL_DIRECT_FILTER = unchecked((int)0x20005); + public const int AL_AUXILIARY_SEND_FILTER = unchecked((int)0x20006); + public const int AL_AIR_ABSORPTION_FACTOR = unchecked((int)0x20007); + public const int AL_ROOM_ROLLOFF_FACTOR = unchecked((int)0x20008); + public const int AL_CONE_OUTER_GAINHF = unchecked((int)0x20009); + public const int AL_DIRECT_FILTER_GAINHF_AUTO = unchecked((int)0x2000A); + public const int AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = unchecked((int)0x2000B); + public const int AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = unchecked((int)0x2000C); + public const int AL_REVERB_DENSITY = unchecked((int)0x0001); + public const int AL_REVERB_DIFFUSION = unchecked((int)0x0002); + public const int AL_REVERB_GAIN = unchecked((int)0x0003); + public const int AL_REVERB_GAINHF = unchecked((int)0x0004); + public const int AL_REVERB_DECAY_TIME = unchecked((int)0x0005); + public const int AL_REVERB_DECAY_HFRATIO = unchecked((int)0x0006); + public const int AL_REVERB_REFLECTIONS_GAIN = unchecked((int)0x0007); + public const int AL_REVERB_REFLECTIONS_DELAY = unchecked((int)0x0008); + public const int AL_REVERB_LATE_REVERB_GAIN = unchecked((int)0x0009); + public const int AL_REVERB_LATE_REVERB_DELAY = unchecked((int)0x000A); + public const int AL_REVERB_AIR_ABSORPTION_GAINHF = unchecked((int)0x000B); + public const int AL_REVERB_ROOM_ROLLOFF_FACTOR = unchecked((int)0x000C); + public const int AL_REVERB_DECAY_HFLIMIT = unchecked((int)0x000D); + public const int AL_EAXREVERB_DENSITY = unchecked((int)0x0001); + public const int AL_EAXREVERB_DIFFUSION = unchecked((int)0x0002); + public const int AL_EAXREVERB_GAIN = unchecked((int)0x0003); + public const int AL_EAXREVERB_GAINHF = unchecked((int)0x0004); + public const int AL_EAXREVERB_GAINLF = unchecked((int)0x0005); + public const int AL_EAXREVERB_DECAY_TIME = unchecked((int)0x0006); + public const int AL_EAXREVERB_DECAY_HFRATIO = unchecked((int)0x0007); + public const int AL_EAXREVERB_DECAY_LFRATIO = unchecked((int)0x0008); + public const int AL_EAXREVERB_REFLECTIONS_GAIN = unchecked((int)0x0009); + public const int AL_EAXREVERB_REFLECTIONS_DELAY = unchecked((int)0x000A); + public const int AL_EAXREVERB_REFLECTIONS_PAN = unchecked((int)0x000B); + public const int AL_EAXREVERB_LATE_REVERB_GAIN = unchecked((int)0x000C); + public const int AL_EAXREVERB_LATE_REVERB_DELAY = unchecked((int)0x000D); + public const int AL_EAXREVERB_LATE_REVERB_PAN = unchecked((int)0x000E); + public const int AL_EAXREVERB_ECHO_TIME = unchecked((int)0x000F); + public const int AL_EAXREVERB_ECHO_DEPTH = unchecked((int)0x0010); + public const int AL_EAXREVERB_MODULATION_TIME = unchecked((int)0x0011); + public const int AL_EAXREVERB_MODULATION_DEPTH = unchecked((int)0x0012); + public const int AL_EAXREVERB_AIR_ABSORPTION_GAINHF = unchecked((int)0x0013); + public const int AL_EAXREVERB_HFREFERENCE = unchecked((int)0x0014); + public const int AL_EAXREVERB_LFREFERENCE = unchecked((int)0x0015); + public const int AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = unchecked((int)0x0016); + public const int AL_EAXREVERB_DECAY_HFLIMIT = unchecked((int)0x0017); + public const int AL_CHORUS_WAVEFORM = unchecked((int)0x0001); + public const int AL_CHORUS_PHASE = unchecked((int)0x0002); + public const int AL_CHORUS_RATE = unchecked((int)0x0003); + public const int AL_CHORUS_DEPTH = unchecked((int)0x0004); + public const int AL_CHORUS_FEEDBACK = unchecked((int)0x0005); + public const int AL_CHORUS_DELAY = unchecked((int)0x0006); + public const int AL_DISTORTION_EDGE = unchecked((int)0x0001); + public const int AL_DISTORTION_GAIN = unchecked((int)0x0002); + public const int AL_DISTORTION_LOWPASS_CUTOFF = unchecked((int)0x0003); + public const int AL_DISTORTION_EQCENTER = unchecked((int)0x0004); + public const int AL_DISTORTION_EQBANDWIDTH = unchecked((int)0x0005); + public const int AL_ECHO_DELAY = unchecked((int)0x0001); + public const int AL_ECHO_LRDELAY = unchecked((int)0x0002); + public const int AL_ECHO_DAMPING = unchecked((int)0x0003); + public const int AL_ECHO_FEEDBACK = unchecked((int)0x0004); + public const int AL_ECHO_SPREAD = unchecked((int)0x0005); + public const int AL_FLANGER_WAVEFORM = unchecked((int)0x0001); + public const int AL_FLANGER_PHASE = unchecked((int)0x0002); + public const int AL_FLANGER_RATE = unchecked((int)0x0003); + public const int AL_FLANGER_DEPTH = unchecked((int)0x0004); + public const int AL_FLANGER_FEEDBACK = unchecked((int)0x0005); + public const int AL_FLANGER_DELAY = unchecked((int)0x0006); + public const int AL_FREQUENCY_SHIFTER_FREQUENCY = unchecked((int)0x0001); + public const int AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = unchecked((int)0x0002); + public const int AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = unchecked((int)0x0003); + public const int AL_VOCAL_MORPHER_PHONEMEA = unchecked((int)0x0001); + public const int AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = unchecked((int)0x0002); + public const int AL_VOCAL_MORPHER_PHONEMEB = unchecked((int)0x0003); + public const int AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = unchecked((int)0x0004); + public const int AL_VOCAL_MORPHER_WAVEFORM = unchecked((int)0x0005); + public const int AL_VOCAL_MORPHER_RATE = unchecked((int)0x0006); + public const int AL_PITCH_SHIFTER_COARSE_TUNE = unchecked((int)0x0001); + public const int AL_PITCH_SHIFTER_FINE_TUNE = unchecked((int)0x0002); + public const int AL_RING_MODULATOR_FREQUENCY = unchecked((int)0x0001); + public const int AL_RING_MODULATOR_HIGHPASS_CUTOFF = unchecked((int)0x0002); + public const int AL_RING_MODULATOR_WAVEFORM = unchecked((int)0x0003); + public const int AL_AUTOWAH_ATTACK_TIME = unchecked((int)0x0001); + public const int AL_AUTOWAH_RELEASE_TIME = unchecked((int)0x0002); + public const int AL_AUTOWAH_RESONANCE = unchecked((int)0x0003); + public const int AL_AUTOWAH_PEAK_GAIN = unchecked((int)0x0004); + public const int AL_COMPRESSOR_ONOFF = unchecked((int)0x0001); + public const int AL_EQUALIZER_LOW_GAIN = unchecked((int)0x0001); + public const int AL_EQUALIZER_LOW_CUTOFF = unchecked((int)0x0002); + public const int AL_EQUALIZER_MID1_GAIN = unchecked((int)0x0003); + public const int AL_EQUALIZER_MID1_CENTER = unchecked((int)0x0004); + public const int AL_EQUALIZER_MID1_WIDTH = unchecked((int)0x0005); + public const int AL_EQUALIZER_MID2_GAIN = unchecked((int)0x0006); + public const int AL_EQUALIZER_MID2_CENTER = unchecked((int)0x0007); + public const int AL_EQUALIZER_MID2_WIDTH = unchecked((int)0x0008); + public const int AL_EQUALIZER_HIGH_GAIN = unchecked((int)0x0009); + public const int AL_EQUALIZER_HIGH_CUTOFF = unchecked((int)0x000A); + public const int AL_EFFECT_FIRST_PARAMETER = unchecked((int)0x0000); + public const int AL_EFFECT_LAST_PARAMETER = unchecked((int)0x8000); + public const int AL_EFFECT_TYPE = unchecked((int)0x8001); + public const int AL_EFFECT_NULL = unchecked((int)0x0000); + public const int AL_EFFECT_REVERB = unchecked((int)0x0001); + public const int AL_EFFECT_CHORUS = unchecked((int)0x0002); + public const int AL_EFFECT_DISTORTION = unchecked((int)0x0003); + public const int AL_EFFECT_ECHO = unchecked((int)0x0004); + public const int AL_EFFECT_FLANGER = unchecked((int)0x0005); + public const int AL_EFFECT_FREQUENCY_SHIFTER = unchecked((int)0x0006); + public const int AL_EFFECT_VOCAL_MORPHER = unchecked((int)0x0007); + public const int AL_EFFECT_PITCH_SHIFTER = unchecked((int)0x0008); + public const int AL_EFFECT_RING_MODULATOR = unchecked((int)0x0009); + public const int AL_EFFECT_AUTOWAH = unchecked((int)0x000A); + public const int AL_EFFECT_COMPRESSOR = unchecked((int)0x000B); + public const int AL_EFFECT_EQUALIZER = unchecked((int)0x000C); + public const int AL_EFFECT_EAXREVERB = unchecked((int)0x8000); + public const int AL_EFFECTSLOT_EFFECT = unchecked((int)0x0001); + public const int AL_EFFECTSLOT_GAIN = unchecked((int)0x0002); + public const int AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = unchecked((int)0x0003); + public const int AL_EFFECTSLOT_NULL = unchecked((int)0x0000); + public const int AL_LOWPASS_GAIN = unchecked((int)0x0001); + public const int AL_LOWPASS_GAINHF = unchecked((int)0x0002); + public const int AL_HIGHPASS_GAIN = unchecked((int)0x0001); + public const int AL_HIGHPASS_GAINLF = unchecked((int)0x0002); + public const int AL_BANDPASS_GAIN = unchecked((int)0x0001); + public const int AL_BANDPASS_GAINLF = unchecked((int)0x0002); + public const int AL_BANDPASS_GAINHF = unchecked((int)0x0003); + public const int AL_FILTER_FIRST_PARAMETER = unchecked((int)0x0000); + public const int AL_FILTER_LAST_PARAMETER = unchecked((int)0x8000); + public const int AL_FILTER_TYPE = unchecked((int)0x8001); + public const int AL_FILTER_NULL = unchecked((int)0x0000); + public const int AL_FILTER_LOWPASS = unchecked((int)0x0001); + public const int AL_FILTER_HIGHPASS = unchecked((int)0x0002); + public const int AL_FILTER_BANDPASS = unchecked((int)0x0003); + public const float AL_LOWPASS_MIN_GAIN = 0.0f; + public const float AL_LOWPASS_MAX_GAIN = 1.0f; + public const float AL_LOWPASS_DEFAULT_GAIN = 1.0f; + public const float AL_LOWPASS_MIN_GAINHF = 0.0f; + public const float AL_LOWPASS_MAX_GAINHF = 1.0f; + public const float AL_LOWPASS_DEFAULT_GAINHF = 1.0f; + public const float AL_HIGHPASS_MIN_GAIN = 0.0f; + public const float AL_HIGHPASS_MAX_GAIN = 1.0f; + public const float AL_HIGHPASS_DEFAULT_GAIN = 1.0f; + public const float AL_HIGHPASS_MIN_GAINLF = 0.0f; + public const float AL_HIGHPASS_MAX_GAINLF = 1.0f; + public const float AL_HIGHPASS_DEFAULT_GAINLF = 1.0f; + public const float AL_BANDPASS_MIN_GAIN = 0.0f; + public const float AL_BANDPASS_MAX_GAIN = 1.0f; + public const float AL_BANDPASS_DEFAULT_GAIN = 1.0f; + public const float AL_BANDPASS_MIN_GAINHF = 0.0f; + public const float AL_BANDPASS_MAX_GAINHF = 1.0f; + public const float AL_BANDPASS_DEFAULT_GAINHF = 1.0f; + public const float AL_BANDPASS_MIN_GAINLF = 0.0f; + public const float AL_BANDPASS_MAX_GAINLF = 1.0f; + public const float AL_BANDPASS_DEFAULT_GAINLF = 1.0f; + public const float AL_REVERB_MIN_DENSITY = 0.0f; + public const float AL_REVERB_MAX_DENSITY = 1.0f; + public const float AL_REVERB_DEFAULT_DENSITY = 1.0f; + public const float AL_REVERB_MIN_DIFFUSION = 0.0f; + public const float AL_REVERB_MAX_DIFFUSION = 1.0f; + public const float AL_REVERB_DEFAULT_DIFFUSION = 1.0f; + public const float AL_REVERB_MIN_GAIN = 0.0f; + public const float AL_REVERB_MAX_GAIN = 1.0f; + public const float AL_REVERB_DEFAULT_GAIN = 0.32f; + public const float AL_REVERB_MIN_GAINHF = 0.0f; + public const float AL_REVERB_MAX_GAINHF = 1.0f; + public const float AL_REVERB_DEFAULT_GAINHF = 0.89f; + public const float AL_REVERB_MIN_DECAY_TIME = 0.1f; + public const float AL_REVERB_MAX_DECAY_TIME = 20.0f; + public const float AL_REVERB_DEFAULT_DECAY_TIME = 1.49f; + public const float AL_REVERB_MIN_DECAY_HFRATIO = 0.1f; + public const float AL_REVERB_MAX_DECAY_HFRATIO = 2.0f; + public const float AL_REVERB_DEFAULT_DECAY_HFRATIO = 0.83f; + public const float AL_REVERB_MIN_REFLECTIONS_GAIN = 0.0f; + public const float AL_REVERB_MAX_REFLECTIONS_GAIN = 3.16f; + public const float AL_REVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f; + public const float AL_REVERB_MIN_REFLECTIONS_DELAY = 0.0f; + public const float AL_REVERB_MAX_REFLECTIONS_DELAY = 0.3f; + public const float AL_REVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f; + public const float AL_REVERB_MIN_LATE_REVERB_GAIN = 0.0f; + public const float AL_REVERB_MAX_LATE_REVERB_GAIN = 10.0f; + public const float AL_REVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f; + public const float AL_REVERB_MIN_LATE_REVERB_DELAY = 0.0f; + public const float AL_REVERB_MAX_LATE_REVERB_DELAY = 0.1f; + public const float AL_REVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f; + public const float AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f; + public const float AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f; + public const float AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f; + public const float AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + public const float AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + public const float AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + public const int AL_REVERB_MIN_DECAY_HFLIMIT = unchecked((int)AL_FALSE); + public const int AL_REVERB_MAX_DECAY_HFLIMIT = unchecked((int)AL_TRUE); + public const int AL_REVERB_DEFAULT_DECAY_HFLIMIT = unchecked((int)AL_TRUE); + public const float AL_EAXREVERB_MIN_DENSITY = 0.0f; + public const float AL_EAXREVERB_MAX_DENSITY = 1.0f; + public const float AL_EAXREVERB_DEFAULT_DENSITY = 1.0f; + public const float AL_EAXREVERB_MIN_DIFFUSION = 0.0f; + public const float AL_EAXREVERB_MAX_DIFFUSION = 1.0f; + public const float AL_EAXREVERB_DEFAULT_DIFFUSION = 1.0f; + public const float AL_EAXREVERB_MIN_GAIN = 0.0f; + public const float AL_EAXREVERB_MAX_GAIN = 1.0f; + public const float AL_EAXREVERB_DEFAULT_GAIN = 0.32f; + public const float AL_EAXREVERB_MIN_GAINHF = 0.0f; + public const float AL_EAXREVERB_MAX_GAINHF = 1.0f; + public const float AL_EAXREVERB_DEFAULT_GAINHF = 0.89f; + public const float AL_EAXREVERB_MIN_GAINLF = 0.0f; + public const float AL_EAXREVERB_MAX_GAINLF = 1.0f; + public const float AL_EAXREVERB_DEFAULT_GAINLF = 1.0f; + public const float AL_EAXREVERB_MIN_DECAY_TIME = 0.1f; + public const float AL_EAXREVERB_MAX_DECAY_TIME = 20.0f; + public const float AL_EAXREVERB_DEFAULT_DECAY_TIME = 1.49f; + public const float AL_EAXREVERB_MIN_DECAY_HFRATIO = 0.1f; + public const float AL_EAXREVERB_MAX_DECAY_HFRATIO = 2.0f; + public const float AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = 0.83f; + public const float AL_EAXREVERB_MIN_DECAY_LFRATIO = 0.1f; + public const float AL_EAXREVERB_MAX_DECAY_LFRATIO = 2.0f; + public const float AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = 1.0f; + public const float AL_EAXREVERB_MIN_REFLECTIONS_GAIN = 0.0f; + public const float AL_EAXREVERB_MAX_REFLECTIONS_GAIN = 3.16f; + public const float AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f; + public const float AL_EAXREVERB_MIN_REFLECTIONS_DELAY = 0.0f; + public const float AL_EAXREVERB_MAX_REFLECTIONS_DELAY = 0.3f; + public const float AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f; + public const float AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = 0.0f; + public const float AL_EAXREVERB_MIN_LATE_REVERB_GAIN = 0.0f; + public const float AL_EAXREVERB_MAX_LATE_REVERB_GAIN = 10.0f; + public const float AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f; + public const float AL_EAXREVERB_MIN_LATE_REVERB_DELAY = 0.0f; + public const float AL_EAXREVERB_MAX_LATE_REVERB_DELAY = 0.1f; + public const float AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f; + public const float AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = 0.0f; + public const float AL_EAXREVERB_MIN_ECHO_TIME = 0.075f; + public const float AL_EAXREVERB_MAX_ECHO_TIME = 0.25f; + public const float AL_EAXREVERB_DEFAULT_ECHO_TIME = 0.25f; + public const float AL_EAXREVERB_MIN_ECHO_DEPTH = 0.0f; + public const float AL_EAXREVERB_MAX_ECHO_DEPTH = 1.0f; + public const float AL_EAXREVERB_DEFAULT_ECHO_DEPTH = 0.0f; + public const float AL_EAXREVERB_MIN_MODULATION_TIME = 0.04f; + public const float AL_EAXREVERB_MAX_MODULATION_TIME = 4.0f; + public const float AL_EAXREVERB_DEFAULT_MODULATION_TIME = 0.25f; + public const float AL_EAXREVERB_MIN_MODULATION_DEPTH = 0.0f; + public const float AL_EAXREVERB_MAX_MODULATION_DEPTH = 1.0f; + public const float AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = 0.0f; + public const float AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f; + public const float AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f; + public const float AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f; + public const float AL_EAXREVERB_MIN_HFREFERENCE = 1000.0f; + public const float AL_EAXREVERB_MAX_HFREFERENCE = 20000.0f; + public const float AL_EAXREVERB_DEFAULT_HFREFERENCE = 5000.0f; + public const float AL_EAXREVERB_MIN_LFREFERENCE = 20.0f; + public const float AL_EAXREVERB_MAX_LFREFERENCE = 1000.0f; + public const float AL_EAXREVERB_DEFAULT_LFREFERENCE = 250.0f; + public const float AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + public const float AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + public const float AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + public const int AL_EAXREVERB_MIN_DECAY_HFLIMIT = unchecked((int)AL_FALSE); + public const int AL_EAXREVERB_MAX_DECAY_HFLIMIT = unchecked((int)AL_TRUE); + public const int AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = unchecked((int)AL_TRUE); + public const int AL_CHORUS_WAVEFORM_SINUSOID = unchecked((int)0); + public const int AL_CHORUS_WAVEFORM_TRIANGLE = unchecked((int)1); + public const int AL_CHORUS_MIN_WAVEFORM = unchecked((int)0); + public const int AL_CHORUS_MAX_WAVEFORM = unchecked((int)1); + public const int AL_CHORUS_DEFAULT_WAVEFORM = unchecked((int)1); + public const int AL_CHORUS_MIN_PHASE = unchecked((int)-180); + public const int AL_CHORUS_MAX_PHASE = unchecked((int)180); + public const int AL_CHORUS_DEFAULT_PHASE = unchecked((int)90); + public const float AL_CHORUS_MIN_RATE = 0.0f; + public const float AL_CHORUS_MAX_RATE = 10.0f; + public const float AL_CHORUS_DEFAULT_RATE = 1.1f; + public const float AL_CHORUS_MIN_DEPTH = 0.0f; + public const float AL_CHORUS_MAX_DEPTH = 1.0f; + public const float AL_CHORUS_DEFAULT_DEPTH = 0.1f; + public const float AL_CHORUS_MIN_FEEDBACK = -1.0f; + public const float AL_CHORUS_MAX_FEEDBACK = 1.0f; + public const float AL_CHORUS_DEFAULT_FEEDBACK = 0.25f; + public const float AL_CHORUS_MIN_DELAY = 0.0f; + public const float AL_CHORUS_MAX_DELAY = 0.016f; + public const float AL_CHORUS_DEFAULT_DELAY = 0.016f; + public const float AL_DISTORTION_MIN_EDGE = 0.0f; + public const float AL_DISTORTION_MAX_EDGE = 1.0f; + public const float AL_DISTORTION_DEFAULT_EDGE = 0.2f; + public const float AL_DISTORTION_MIN_GAIN = 0.01f; + public const float AL_DISTORTION_MAX_GAIN = 1.0f; + public const float AL_DISTORTION_DEFAULT_GAIN = 0.05f; + public const float AL_DISTORTION_MIN_LOWPASS_CUTOFF = 80.0f; + public const float AL_DISTORTION_MAX_LOWPASS_CUTOFF = 24000.0f; + public const float AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF = 8000.0f; + public const float AL_DISTORTION_MIN_EQCENTER = 80.0f; + public const float AL_DISTORTION_MAX_EQCENTER = 24000.0f; + public const float AL_DISTORTION_DEFAULT_EQCENTER = 3600.0f; + public const float AL_DISTORTION_MIN_EQBANDWIDTH = 80.0f; + public const float AL_DISTORTION_MAX_EQBANDWIDTH = 24000.0f; + public const float AL_DISTORTION_DEFAULT_EQBANDWIDTH = 3600.0f; + public const float AL_ECHO_MIN_DELAY = 0.0f; + public const float AL_ECHO_MAX_DELAY = 0.207f; + public const float AL_ECHO_DEFAULT_DELAY = 0.1f; + public const float AL_ECHO_MIN_LRDELAY = 0.0f; + public const float AL_ECHO_MAX_LRDELAY = 0.404f; + public const float AL_ECHO_DEFAULT_LRDELAY = 0.1f; + public const float AL_ECHO_MIN_DAMPING = 0.0f; + public const float AL_ECHO_MAX_DAMPING = 0.99f; + public const float AL_ECHO_DEFAULT_DAMPING = 0.5f; + public const float AL_ECHO_MIN_FEEDBACK = 0.0f; + public const float AL_ECHO_MAX_FEEDBACK = 1.0f; + public const float AL_ECHO_DEFAULT_FEEDBACK = 0.5f; + public const float AL_ECHO_MIN_SPREAD = -1.0f; + public const float AL_ECHO_MAX_SPREAD = 1.0f; + public const float AL_ECHO_DEFAULT_SPREAD = -1.0f; + public const int AL_FLANGER_WAVEFORM_SINUSOID = unchecked((int)0); + public const int AL_FLANGER_WAVEFORM_TRIANGLE = unchecked((int)1); + public const int AL_FLANGER_MIN_WAVEFORM = unchecked((int)0); + public const int AL_FLANGER_MAX_WAVEFORM = unchecked((int)1); + public const int AL_FLANGER_DEFAULT_WAVEFORM = unchecked((int)1); + public const int AL_FLANGER_MIN_PHASE = unchecked((int)-180); + public const int AL_FLANGER_MAX_PHASE = unchecked((int)180); + public const int AL_FLANGER_DEFAULT_PHASE = unchecked((int)0); + public const float AL_FLANGER_MIN_RATE = 0.0f; + public const float AL_FLANGER_MAX_RATE = 10.0f; + public const float AL_FLANGER_DEFAULT_RATE = 0.27f; + public const float AL_FLANGER_MIN_DEPTH = 0.0f; + public const float AL_FLANGER_MAX_DEPTH = 1.0f; + public const float AL_FLANGER_DEFAULT_DEPTH = 1.0f; + public const float AL_FLANGER_MIN_FEEDBACK = -1.0f; + public const float AL_FLANGER_MAX_FEEDBACK = 1.0f; + public const float AL_FLANGER_DEFAULT_FEEDBACK = -0.5f; + public const float AL_FLANGER_MIN_DELAY = 0.0f; + public const float AL_FLANGER_MAX_DELAY = 0.004f; + public const float AL_FLANGER_DEFAULT_DELAY = 0.002f; + public const float AL_FREQUENCY_SHIFTER_MIN_FREQUENCY = 0.0f; + public const float AL_FREQUENCY_SHIFTER_MAX_FREQUENCY = 24000.0f; + public const float AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY = 0.0f; + public const int AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION = unchecked((int)0); + public const int AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION = unchecked((int)2); + public const int AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION = unchecked((int)0); + public const int AL_FREQUENCY_SHIFTER_DIRECTION_DOWN = unchecked((int)0); + public const int AL_FREQUENCY_SHIFTER_DIRECTION_UP = unchecked((int)1); + public const int AL_FREQUENCY_SHIFTER_DIRECTION_OFF = unchecked((int)2); + public const int AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION = unchecked((int)0); + public const int AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION = unchecked((int)2); + public const int AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION = unchecked((int)0); + public const int AL_VOCAL_MORPHER_MIN_PHONEMEA = unchecked((int)0); + public const int AL_VOCAL_MORPHER_MAX_PHONEMEA = unchecked((int)29); + public const int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA = unchecked((int)0); + public const int AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING = unchecked((int)-24); + public const int AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING = unchecked((int)24); + public const int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING = unchecked((int)0); + public const int AL_VOCAL_MORPHER_MIN_PHONEMEB = unchecked((int)0); + public const int AL_VOCAL_MORPHER_MAX_PHONEMEB = unchecked((int)29); + public const int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB = unchecked((int)10); + public const int AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING = unchecked((int)-24); + public const int AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING = unchecked((int)24); + public const int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING = unchecked((int)0); + public const int AL_VOCAL_MORPHER_PHONEME_A = unchecked((int)0); + public const int AL_VOCAL_MORPHER_PHONEME_E = unchecked((int)1); + public const int AL_VOCAL_MORPHER_PHONEME_I = unchecked((int)2); + public const int AL_VOCAL_MORPHER_PHONEME_O = unchecked((int)3); + public const int AL_VOCAL_MORPHER_PHONEME_U = unchecked((int)4); + public const int AL_VOCAL_MORPHER_PHONEME_AA = unchecked((int)5); + public const int AL_VOCAL_MORPHER_PHONEME_AE = unchecked((int)6); + public const int AL_VOCAL_MORPHER_PHONEME_AH = unchecked((int)7); + public const int AL_VOCAL_MORPHER_PHONEME_AO = unchecked((int)8); + public const int AL_VOCAL_MORPHER_PHONEME_EH = unchecked((int)9); + public const int AL_VOCAL_MORPHER_PHONEME_ER = unchecked((int)10); + public const int AL_VOCAL_MORPHER_PHONEME_IH = unchecked((int)11); + public const int AL_VOCAL_MORPHER_PHONEME_IY = unchecked((int)12); + public const int AL_VOCAL_MORPHER_PHONEME_UH = unchecked((int)13); + public const int AL_VOCAL_MORPHER_PHONEME_UW = unchecked((int)14); + public const int AL_VOCAL_MORPHER_PHONEME_B = unchecked((int)15); + public const int AL_VOCAL_MORPHER_PHONEME_D = unchecked((int)16); + public const int AL_VOCAL_MORPHER_PHONEME_F = unchecked((int)17); + public const int AL_VOCAL_MORPHER_PHONEME_G = unchecked((int)18); + public const int AL_VOCAL_MORPHER_PHONEME_J = unchecked((int)19); + public const int AL_VOCAL_MORPHER_PHONEME_K = unchecked((int)20); + public const int AL_VOCAL_MORPHER_PHONEME_L = unchecked((int)21); + public const int AL_VOCAL_MORPHER_PHONEME_M = unchecked((int)22); + public const int AL_VOCAL_MORPHER_PHONEME_N = unchecked((int)23); + public const int AL_VOCAL_MORPHER_PHONEME_P = unchecked((int)24); + public const int AL_VOCAL_MORPHER_PHONEME_R = unchecked((int)25); + public const int AL_VOCAL_MORPHER_PHONEME_S = unchecked((int)26); + public const int AL_VOCAL_MORPHER_PHONEME_T = unchecked((int)27); + public const int AL_VOCAL_MORPHER_PHONEME_V = unchecked((int)28); + public const int AL_VOCAL_MORPHER_PHONEME_Z = unchecked((int)29); + public const int AL_VOCAL_MORPHER_WAVEFORM_SINUSOID = unchecked((int)0); + public const int AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE = unchecked((int)1); + public const int AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH = unchecked((int)2); + public const int AL_VOCAL_MORPHER_MIN_WAVEFORM = unchecked((int)0); + public const int AL_VOCAL_MORPHER_MAX_WAVEFORM = unchecked((int)2); + public const int AL_VOCAL_MORPHER_DEFAULT_WAVEFORM = unchecked((int)0); + public const float AL_VOCAL_MORPHER_MIN_RATE = 0.0f; + public const float AL_VOCAL_MORPHER_MAX_RATE = 10.0f; + public const float AL_VOCAL_MORPHER_DEFAULT_RATE = 1.41f; + public const int AL_PITCH_SHIFTER_MIN_COARSE_TUNE = unchecked((int)-12); + public const int AL_PITCH_SHIFTER_MAX_COARSE_TUNE = unchecked((int)12); + public const int AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE = unchecked((int)12); + public const int AL_PITCH_SHIFTER_MIN_FINE_TUNE = unchecked((int)-50); + public const int AL_PITCH_SHIFTER_MAX_FINE_TUNE = unchecked((int)50); + public const int AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE = unchecked((int)0); + public const float AL_RING_MODULATOR_MIN_FREQUENCY = 0.0f; + public const float AL_RING_MODULATOR_MAX_FREQUENCY = 8000.0f; + public const float AL_RING_MODULATOR_DEFAULT_FREQUENCY = 440.0f; + public const float AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = 0.0f; + public const float AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = 24000.0f; + public const float AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF = 800.0f; + public const int AL_RING_MODULATOR_SINUSOID = unchecked((int)0); + public const int AL_RING_MODULATOR_SAWTOOTH = unchecked((int)1); + public const int AL_RING_MODULATOR_SQUARE = unchecked((int)2); + public const int AL_RING_MODULATOR_MIN_WAVEFORM = unchecked((int)0); + public const int AL_RING_MODULATOR_MAX_WAVEFORM = unchecked((int)2); + public const int AL_RING_MODULATOR_DEFAULT_WAVEFORM = unchecked((int)0); + public const float AL_AUTOWAH_MIN_ATTACK_TIME = 0.0001f; + public const float AL_AUTOWAH_MAX_ATTACK_TIME = 1.0f; + public const float AL_AUTOWAH_DEFAULT_ATTACK_TIME = 0.06f; + public const float AL_AUTOWAH_MIN_RELEASE_TIME = 0.0001f; + public const float AL_AUTOWAH_MAX_RELEASE_TIME = 1.0f; + public const float AL_AUTOWAH_DEFAULT_RELEASE_TIME = 0.06f; + public const float AL_AUTOWAH_MIN_RESONANCE = 2.0f; + public const float AL_AUTOWAH_MAX_RESONANCE = 1000.0f; + public const float AL_AUTOWAH_DEFAULT_RESONANCE = 1000.0f; + public const float AL_AUTOWAH_MIN_PEAK_GAIN = 0.00003f; + public const float AL_AUTOWAH_MAX_PEAK_GAIN = 31621.0f; + public const float AL_AUTOWAH_DEFAULT_PEAK_GAIN = 11.22f; + public const int AL_COMPRESSOR_MIN_ONOFF = unchecked((int)0); + public const int AL_COMPRESSOR_MAX_ONOFF = unchecked((int)1); + public const int AL_COMPRESSOR_DEFAULT_ONOFF = unchecked((int)1); + public const float AL_EQUALIZER_MIN_LOW_GAIN = 0.126f; + public const float AL_EQUALIZER_MAX_LOW_GAIN = 7.943f; + public const float AL_EQUALIZER_DEFAULT_LOW_GAIN = 1.0f; + public const float AL_EQUALIZER_MIN_LOW_CUTOFF = 50.0f; + public const float AL_EQUALIZER_MAX_LOW_CUTOFF = 800.0f; + public const float AL_EQUALIZER_DEFAULT_LOW_CUTOFF = 200.0f; + public const float AL_EQUALIZER_MIN_MID1_GAIN = 0.126f; + public const float AL_EQUALIZER_MAX_MID1_GAIN = 7.943f; + public const float AL_EQUALIZER_DEFAULT_MID1_GAIN = 1.0f; + public const float AL_EQUALIZER_MIN_MID1_CENTER = 200.0f; + public const float AL_EQUALIZER_MAX_MID1_CENTER = 3000.0f; + public const float AL_EQUALIZER_DEFAULT_MID1_CENTER = 500.0f; + public const float AL_EQUALIZER_MIN_MID1_WIDTH = 0.01f; + public const float AL_EQUALIZER_MAX_MID1_WIDTH = 1.0f; + public const float AL_EQUALIZER_DEFAULT_MID1_WIDTH = 1.0f; + public const float AL_EQUALIZER_MIN_MID2_GAIN = 0.126f; + public const float AL_EQUALIZER_MAX_MID2_GAIN = 7.943f; + public const float AL_EQUALIZER_DEFAULT_MID2_GAIN = 1.0f; + public const float AL_EQUALIZER_MIN_MID2_CENTER = 1000.0f; + public const float AL_EQUALIZER_MAX_MID2_CENTER = 8000.0f; + public const float AL_EQUALIZER_DEFAULT_MID2_CENTER = 3000.0f; + public const float AL_EQUALIZER_MIN_MID2_WIDTH = 0.01f; + public const float AL_EQUALIZER_MAX_MID2_WIDTH = 1.0f; + public const float AL_EQUALIZER_DEFAULT_MID2_WIDTH = 1.0f; + public const float AL_EQUALIZER_MIN_HIGH_GAIN = 0.126f; + public const float AL_EQUALIZER_MAX_HIGH_GAIN = 7.943f; + public const float AL_EQUALIZER_DEFAULT_HIGH_GAIN = 1.0f; + public const float AL_EQUALIZER_MIN_HIGH_CUTOFF = 4000.0f; + public const float AL_EQUALIZER_MAX_HIGH_CUTOFF = 16000.0f; + public const float AL_EQUALIZER_DEFAULT_HIGH_CUTOFF = 6000.0f; + public const float AL_MIN_AIR_ABSORPTION_FACTOR = 0.0f; + public const float AL_MAX_AIR_ABSORPTION_FACTOR = 10.0f; + public const float AL_DEFAULT_AIR_ABSORPTION_FACTOR = 0.0f; + public const float AL_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + public const float AL_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + public const float AL_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + public const float AL_MIN_CONE_OUTER_GAINHF = 0.0f; + public const float AL_MAX_CONE_OUTER_GAINHF = 1.0f; + public const float AL_DEFAULT_CONE_OUTER_GAINHF = 1.0f; + public const int AL_MIN_DIRECT_FILTER_GAINHF_AUTO = unchecked((int)AL_FALSE); + public const int AL_MAX_DIRECT_FILTER_GAINHF_AUTO = unchecked((int)AL_TRUE); + public const int AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = unchecked((int)AL_TRUE); + public const int AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = unchecked((int)AL_FALSE); + public const int AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = unchecked((int)AL_TRUE); + public const int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = unchecked((int)AL_TRUE); + public const int AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = unchecked((int)AL_FALSE); + public const int AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = unchecked((int)AL_TRUE); + public const int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = unchecked((int)AL_TRUE); + public const float AL_DEFAULT_METERS_PER_UNIT = 1.0f; + public const int AL_FORMAT_QUAD8_LOKI = unchecked((int)0x10004); + public const int AL_FORMAT_QUAD16_LOKI = unchecked((int)0x10005); + public const int AL_FORMAT_MONO_FLOAT32 = unchecked((int)0x10010); + public const int AL_FORMAT_STEREO_FLOAT32 = unchecked((int)0x10011); + public const int AL_FORMAT_MONO_DOUBLE_EXT = unchecked((int)0x10012); + public const int AL_FORMAT_STEREO_DOUBLE_EXT = unchecked((int)0x10013); + public const int AL_FORMAT_MONO_MULAW_EXT = unchecked((int)0x10014); + public const int AL_FORMAT_STEREO_MULAW_EXT = unchecked((int)0x10015); + public const int AL_FORMAT_MONO_ALAW_EXT = unchecked((int)0x10016); + public const int AL_FORMAT_STEREO_ALAW_EXT = unchecked((int)0x10017); + public const int AL_FORMAT_QUAD8 = unchecked((int)0x1204); + public const int AL_FORMAT_QUAD16 = unchecked((int)0x1205); + public const int AL_FORMAT_QUAD32 = unchecked((int)0x1206); + public const int AL_FORMAT_REAR8 = unchecked((int)0x1207); + public const int AL_FORMAT_REAR16 = unchecked((int)0x1208); + public const int AL_FORMAT_REAR32 = unchecked((int)0x1209); + public const int AL_FORMAT_51CHN8 = unchecked((int)0x120A); + public const int AL_FORMAT_51CHN16 = unchecked((int)0x120B); + public const int AL_FORMAT_51CHN32 = unchecked((int)0x120C); + public const int AL_FORMAT_61CHN8 = unchecked((int)0x120D); + public const int AL_FORMAT_61CHN16 = unchecked((int)0x120E); + public const int AL_FORMAT_61CHN32 = unchecked((int)0x120F); + public const int AL_FORMAT_71CHN8 = unchecked((int)0x1210); + public const int AL_FORMAT_71CHN16 = unchecked((int)0x1211); + public const int AL_FORMAT_71CHN32 = unchecked((int)0x1212); + public const int AL_FORMAT_MONO_MULAW = unchecked((int)0x10014); + public const int AL_FORMAT_STEREO_MULAW = unchecked((int)0x10015); + public const int AL_FORMAT_QUAD_MULAW = unchecked((int)0x10021); + public const int AL_FORMAT_REAR_MULAW = unchecked((int)0x10022); + public const int AL_FORMAT_51CHN_MULAW = unchecked((int)0x10023); + public const int AL_FORMAT_61CHN_MULAW = unchecked((int)0x10024); + public const int AL_FORMAT_71CHN_MULAW = unchecked((int)0x10025); + public const int AL_FORMAT_MONO_IMA4 = unchecked((int)0x1300); + public const int AL_FORMAT_STEREO_IMA4 = unchecked((int)0x1301); + public const int AL_SOURCE_DISTANCE_MODEL = unchecked((int)0x200); + public const int AL_LOOP_POINTS_SOFT = unchecked((int)0x2015); + public const int AL_DEDICATED_GAIN = unchecked((int)0x0001); + public const int AL_EFFECT_DEDICATED_DIALOGUE = unchecked((int)0x9001); + public const int AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT = unchecked((int)0x9000); + public const int AL_BYTE_LENGTH_SOFT = unchecked((int)0x2009); + public const int AL_SAMPLE_LENGTH_SOFT = unchecked((int)0x200A); + public const int AL_SEC_LENGTH_SOFT = unchecked((int)0x200B); + public const int AL_DIRECT_CHANNELS_SOFT = unchecked((int)0x1033); + public const int AL_STEREO_ANGLES = unchecked((int)0x1030); + public const int AL_SOURCE_RADIUS = unchecked((int)0x1031); + public const int AL_SAMPLE_OFFSET_LATENCY_SOFT = unchecked((int)0x1200); + public const int AL_SEC_OFFSET_LATENCY_SOFT = unchecked((int)0x1201); + public const int AL_DEFERRED_UPDATES_SOFT = unchecked((int)0xC002); + public const int AL_UNPACK_BLOCK_ALIGNMENT_SOFT = unchecked((int)0x200C); + public const int AL_PACK_BLOCK_ALIGNMENT_SOFT = unchecked((int)0x200D); + public const int AL_FORMAT_MONO_MSADPCM_SOFT = unchecked((int)0x1302); + public const int AL_FORMAT_STEREO_MSADPCM_SOFT = unchecked((int)0x1303); + public const int AL_FORMAT_BFORMAT2D_8 = unchecked((int)0x20021); + public const int AL_FORMAT_BFORMAT2D_16 = unchecked((int)0x20022); + public const int AL_FORMAT_BFORMAT2D_FLOAT32 = unchecked((int)0x20023); + public const int AL_FORMAT_BFORMAT3D_8 = unchecked((int)0x20031); + public const int AL_FORMAT_BFORMAT3D_16 = unchecked((int)0x20032); + public const int AL_FORMAT_BFORMAT3D_FLOAT32 = unchecked((int)0x20033); + public const int AL_FORMAT_BFORMAT2D_MULAW = unchecked((int)0x10031); + public const int AL_FORMAT_BFORMAT3D_MULAW = unchecked((int)0x10032); + public const int AL_GAIN_LIMIT_SOFT = unchecked((int)0x200E); + public const int AL_NUM_RESAMPLERS_SOFT = unchecked((int)0x1210); + public const int AL_DEFAULT_RESAMPLER_SOFT = unchecked((int)0x1211); + public const int AL_SOURCE_RESAMPLER_SOFT = unchecked((int)0x1212); + public const int AL_RESAMPLER_NAME_SOFT = unchecked((int)0x1213); + public const int AL_SOURCE_SPATIALIZE_SOFT = unchecked((int)0x1214); + public const int AL_AUTO_SOFT = unchecked((int)0x0002); + public const int AL_SAMPLE_OFFSET_CLOCK_SOFT = unchecked((int)0x1202); + public const int AL_SEC_OFFSET_CLOCK_SOFT = unchecked((int)0x1203); + public const int AL_DROP_UNMATCHED_SOFT = unchecked((int)0x0001); + public const int AL_REMIX_UNMATCHED_SOFT = unchecked((int)0x0002); + public const int AL_AMBISONIC_LAYOUT_SOFT = unchecked((int)0x1997); + public const int AL_AMBISONIC_SCALING_SOFT = unchecked((int)0x1998); + public const int AL_FUMA_SOFT = unchecked((int)0x0000); + public const int AL_ACN_SOFT = unchecked((int)0x0001); + public const int AL_SN3D_SOFT = unchecked((int)0x0001); + public const int AL_N3D_SOFT = unchecked((int)0x0002); + public const int AL_EFFECTSLOT_TARGET_SOFT = unchecked((int)0x199C); + public const int AL_EVENT_CALLBACK_FUNCTION_SOFT = unchecked((int)0x19A2); + public const int AL_EVENT_CALLBACK_USER_PARAM_SOFT = unchecked((int)0x19A3); + public const int AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT = unchecked((int)0x19A4); + public const int AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT = unchecked((int)0x19A5); + public const int AL_EVENT_TYPE_DISCONNECTED_SOFT = unchecked((int)0x19A6); + public const int AL_BUFFER_CALLBACK_FUNCTION_SOFT = unchecked((int)0x19A0); + public const int AL_BUFFER_CALLBACK_USER_PARAM_SOFT = unchecked((int)0x19A1); + public const int AL_FORMAT_UHJ2CHN8_SOFT = unchecked((int)0x19A2); + public const int AL_FORMAT_UHJ2CHN16_SOFT = unchecked((int)0x19A3); + public const int AL_FORMAT_UHJ2CHN_FLOAT32_SOFT = unchecked((int)0x19A4); + public const int AL_FORMAT_UHJ3CHN8_SOFT = unchecked((int)0x19A5); + public const int AL_FORMAT_UHJ3CHN16_SOFT = unchecked((int)0x19A6); + public const int AL_FORMAT_UHJ3CHN_FLOAT32_SOFT = unchecked((int)0x19A7); + public const int AL_FORMAT_UHJ4CHN8_SOFT = unchecked((int)0x19A8); + public const int AL_FORMAT_UHJ4CHN16_SOFT = unchecked((int)0x19A9); + public const int AL_FORMAT_UHJ4CHN_FLOAT32_SOFT = unchecked((int)0x19AA); + public const int AL_STEREO_MODE_SOFT = unchecked((int)0x19B0); + public const int AL_NORMAL_SOFT = unchecked((int)0x0000); + public const int AL_SUPER_STEREO_SOFT = unchecked((int)0x0001); + public const int AL_SUPER_STEREO_WIDTH_SOFT = unchecked((int)0x19B1); + public const int AL_FORMAT_UHJ2CHN_MULAW_SOFT = unchecked((int)0x19B3); + public const int AL_FORMAT_UHJ2CHN_ALAW_SOFT = unchecked((int)0x19B4); + public const int AL_FORMAT_UHJ2CHN_IMA4_SOFT = unchecked((int)0x19B5); + public const int AL_FORMAT_UHJ2CHN_MSADPCM_SOFT = unchecked((int)0x19B6); + public const int AL_FORMAT_UHJ3CHN_MULAW_SOFT = unchecked((int)0x19B7); + public const int AL_FORMAT_UHJ3CHN_ALAW_SOFT = unchecked((int)0x19B8); + public const int AL_FORMAT_UHJ4CHN_MULAW_SOFT = unchecked((int)0x19B9); + public const int AL_FORMAT_UHJ4CHN_ALAW_SOFT = unchecked((int)0x19BA); + public const int AL_DONT_CARE_EXT = unchecked((int)0x0002); + public const int AL_DEBUG_OUTPUT_EXT = unchecked((int)0x19B2); + public const int AL_DEBUG_CALLBACK_FUNCTION_EXT = unchecked((int)0x19B3); + public const int AL_DEBUG_CALLBACK_USER_PARAM_EXT = unchecked((int)0x19B4); + public const int AL_DEBUG_SOURCE_API_EXT = unchecked((int)0x19B5); + public const int AL_DEBUG_SOURCE_AUDIO_SYSTEM_EXT = unchecked((int)0x19B6); + public const int AL_DEBUG_SOURCE_THIRD_PARTY_EXT = unchecked((int)0x19B7); + public const int AL_DEBUG_SOURCE_APPLICATION_EXT = unchecked((int)0x19B8); + public const int AL_DEBUG_SOURCE_OTHER_EXT = unchecked((int)0x19B9); + public const int AL_DEBUG_TYPE_ERROR_EXT = unchecked((int)0x19BA); + public const int AL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_EXT = unchecked((int)0x19BB); + public const int AL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_EXT = unchecked((int)0x19BC); + public const int AL_DEBUG_TYPE_PORTABILITY_EXT = unchecked((int)0x19BD); + public const int AL_DEBUG_TYPE_PERFORMANCE_EXT = unchecked((int)0x19BE); + public const int AL_DEBUG_TYPE_MARKER_EXT = unchecked((int)0x19BF); + public const int AL_DEBUG_TYPE_PUSH_GROUP_EXT = unchecked((int)0x19C0); + public const int AL_DEBUG_TYPE_POP_GROUP_EXT = unchecked((int)0x19C1); + public const int AL_DEBUG_TYPE_OTHER_EXT = unchecked((int)0x19C2); + public const int AL_DEBUG_SEVERITY_HIGH_EXT = unchecked((int)0x19C3); + public const int AL_DEBUG_SEVERITY_MEDIUM_EXT = unchecked((int)0x19C4); + public const int AL_DEBUG_SEVERITY_LOW_EXT = unchecked((int)0x19C5); + public const int AL_DEBUG_SEVERITY_NOTIFICATION_EXT = unchecked((int)0x19C6); + public const int AL_DEBUG_LOGGED_MESSAGES_EXT = unchecked((int)0x19C7); + public const int AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_EXT = unchecked((int)0x19C8); + public const int AL_MAX_DEBUG_MESSAGE_LENGTH_EXT = unchecked((int)0x19C9); + public const int AL_MAX_DEBUG_LOGGED_MESSAGES_EXT = unchecked((int)0x19CA); + public const int AL_MAX_DEBUG_GROUP_STACK_DEPTH_EXT = unchecked((int)0x19CB); + public const int AL_MAX_LABEL_LENGTH_EXT = unchecked((int)0x19CC); + public const int AL_STACK_OVERFLOW_EXT = unchecked((int)0x19CD); + public const int AL_STACK_UNDERFLOW_EXT = unchecked((int)0x19CE); + public const int AL_CONTEXT_FLAGS_EXT = unchecked((int)0x19CF); + public const int AL_BUFFER_EXT = unchecked((int)0x1009); + public const int AL_SOURCE_EXT = unchecked((int)0x19D0); + public const int AL_FILTER_EXT = unchecked((int)0x19D1); + public const int AL_EFFECT_EXT = unchecked((int)0x19D2); + public const int AL_AUXILIARY_EFFECT_SLOT_EXT = unchecked((int)0x19D3); + public const int AL_UNPACK_AMBISONIC_ORDER_SOFT = unchecked((int)0x199D); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.Ext.gen.cs b/Brutal.OpenAl/Generated/Al/Al.Ext.gen.cs new file mode 100644 index 0000000..40e9a1e --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.Ext.gen.cs @@ -0,0 +1,745 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + using unsafe BufferCallbackSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe BufferDataStaticFn = delegate* unmanaged[Cdecl]; + using unsafe DebugMessageCallbackEXTFn = delegate* unmanaged[Cdecl]; + using unsafe DebugMessageControlEXTFn = delegate* unmanaged[Cdecl]; + using unsafe DebugMessageInsertEXTFn = delegate* unmanaged[Cdecl]; + using unsafe DeferUpdatesSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe EventCallbackSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe EventControlSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetBuffer3PtrSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetBufferPtrSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetBufferPtrvSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetDebugMessageLogEXTFn = delegate* unmanaged[Cdecl]< + uint, + int, + int*, + int*, + uint*, + int*, + int*, + byte*, + uint>; + using unsafe GetObjectLabelEXTFn = delegate* unmanaged[Cdecl]; + using unsafe GetPointerEXTFn = delegate* unmanaged[Cdecl]; + using unsafe GetPointerSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetPointervEXTFn = delegate* unmanaged[Cdecl]; + using unsafe GetPointervSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetSource3dSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetSource3i64SOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetSourcedSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetSourcedvSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetSourcei64SOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetSourcei64vSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetStringiSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe ObjectLabelEXTFn = delegate* unmanaged[Cdecl]; + using unsafe PopDebugGroupEXTFn = delegate* unmanaged[Cdecl]; + using unsafe ProcessUpdatesSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe PushDebugGroupEXTFn = delegate* unmanaged[Cdecl]; + using unsafe Source3dSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe Source3i64SOFTFn = delegate* unmanaged[Cdecl]; + using unsafe SourcedSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe SourcedvSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe Sourcei64SOFTFn = delegate* unmanaged[Cdecl]; + using unsafe Sourcei64vSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe SourcePlayAtTimeSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe SourcePlayAtTimevSOFTFn = delegate* unmanaged[Cdecl]; + + public static unsafe partial class Al + { + /// + /// Cached unmanaged function pointers for the in-scope alext.h entry points, each resolved once via alcGetProcAddress against the null device. A null field means the loaded binary does not export that symbol; the paired method throws instead of dereferencing it. + /// + internal static unsafe class ExtPointers + { + internal static readonly BufferDataStaticFn alBufferDataStatic = (BufferDataStaticFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alBufferDataStatic"u8); + internal static readonly SourcedSOFTFn alSourcedSOFT = (SourcedSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSourcedSOFT"u8); + internal static readonly Source3dSOFTFn alSource3dSOFT = (Source3dSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSource3dSOFT"u8); + internal static readonly SourcedvSOFTFn alSourcedvSOFT = (SourcedvSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSourcedvSOFT"u8); + internal static readonly GetSourcedSOFTFn alGetSourcedSOFT = (GetSourcedSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetSourcedSOFT"u8); + internal static readonly GetSource3dSOFTFn alGetSource3dSOFT = (GetSource3dSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetSource3dSOFT"u8); + internal static readonly GetSourcedvSOFTFn alGetSourcedvSOFT = (GetSourcedvSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetSourcedvSOFT"u8); + internal static readonly Sourcei64SOFTFn alSourcei64SOFT = (Sourcei64SOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSourcei64SOFT"u8); + internal static readonly Source3i64SOFTFn alSource3i64SOFT = (Source3i64SOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSource3i64SOFT"u8); + internal static readonly Sourcei64vSOFTFn alSourcei64vSOFT = (Sourcei64vSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSourcei64vSOFT"u8); + internal static readonly GetSourcei64SOFTFn alGetSourcei64SOFT = (GetSourcei64SOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetSourcei64SOFT"u8); + internal static readonly GetSource3i64SOFTFn alGetSource3i64SOFT = (GetSource3i64SOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetSource3i64SOFT"u8); + internal static readonly GetSourcei64vSOFTFn alGetSourcei64vSOFT = (GetSourcei64vSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetSourcei64vSOFT"u8); + internal static readonly DeferUpdatesSOFTFn alDeferUpdatesSOFT = (DeferUpdatesSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alDeferUpdatesSOFT"u8); + internal static readonly ProcessUpdatesSOFTFn alProcessUpdatesSOFT = (ProcessUpdatesSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alProcessUpdatesSOFT"u8); + internal static readonly GetStringiSOFTFn alGetStringiSOFT = (GetStringiSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetStringiSOFT"u8); + internal static readonly EventControlSOFTFn alEventControlSOFT = (EventControlSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alEventControlSOFT"u8); + internal static readonly EventCallbackSOFTFn alEventCallbackSOFT = (EventCallbackSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alEventCallbackSOFT"u8); + internal static readonly GetPointerSOFTFn alGetPointerSOFT = (GetPointerSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetPointerSOFT"u8); + internal static readonly GetPointervSOFTFn alGetPointervSOFT = (GetPointervSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetPointervSOFT"u8); + internal static readonly BufferCallbackSOFTFn alBufferCallbackSOFT = (BufferCallbackSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alBufferCallbackSOFT"u8); + internal static readonly GetBufferPtrSOFTFn alGetBufferPtrSOFT = (GetBufferPtrSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetBufferPtrSOFT"u8); + internal static readonly GetBuffer3PtrSOFTFn alGetBuffer3PtrSOFT = (GetBuffer3PtrSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetBuffer3PtrSOFT"u8); + internal static readonly GetBufferPtrvSOFTFn alGetBufferPtrvSOFT = (GetBufferPtrvSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetBufferPtrvSOFT"u8); + internal static readonly SourcePlayAtTimeSOFTFn alSourcePlayAtTimeSOFT = (SourcePlayAtTimeSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSourcePlayAtTimeSOFT"u8); + internal static readonly SourcePlayAtTimevSOFTFn alSourcePlayAtTimevSOFT = (SourcePlayAtTimevSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alSourcePlayAtTimevSOFT"u8); + internal static readonly DebugMessageCallbackEXTFn alDebugMessageCallbackEXT = (DebugMessageCallbackEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alDebugMessageCallbackEXT"u8); + internal static readonly DebugMessageInsertEXTFn alDebugMessageInsertEXT = (DebugMessageInsertEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alDebugMessageInsertEXT"u8); + internal static readonly DebugMessageControlEXTFn alDebugMessageControlEXT = (DebugMessageControlEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alDebugMessageControlEXT"u8); + internal static readonly PushDebugGroupEXTFn alPushDebugGroupEXT = (PushDebugGroupEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alPushDebugGroupEXT"u8); + internal static readonly PopDebugGroupEXTFn alPopDebugGroupEXT = (PopDebugGroupEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alPopDebugGroupEXT"u8); + internal static readonly GetDebugMessageLogEXTFn alGetDebugMessageLogEXT = (GetDebugMessageLogEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetDebugMessageLogEXT"u8); + internal static readonly ObjectLabelEXTFn alObjectLabelEXT = (ObjectLabelEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alObjectLabelEXT"u8); + internal static readonly GetObjectLabelEXTFn alGetObjectLabelEXT = (GetObjectLabelEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetObjectLabelEXT"u8); + internal static readonly GetPointerEXTFn alGetPointerEXT = (GetPointerEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetPointerEXT"u8); + internal static readonly GetPointervEXTFn alGetPointervEXT = (GetPointervEXTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alGetPointervEXT"u8); + } + + public static partial class PInvoke + { + /// + /// + /// + /// + /// Provided by AL_EXT_STATIC_BUFFER. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void BufferDataStatic(uint buffer, int format, void* data, int size, int freq) + { + if (ExtPointers.alBufferDataStatic is null) + { + AlExtensionException.ThrowMissing("alBufferDataStatic", "AL_EXT_STATIC_BUFFER"); + } + ExtPointers.alBufferDataStatic(buffer, format, data, size, freq); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void SourcedSOFT(uint source, int param, double value) + { + if (ExtPointers.alSourcedSOFT is null) + { + AlExtensionException.ThrowMissing("alSourcedSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alSourcedSOFT(source, param, value); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void Source3dSOFT(uint source, int param, double value1, double value2, double value3) + { + if (ExtPointers.alSource3dSOFT is null) + { + AlExtensionException.ThrowMissing("alSource3dSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alSource3dSOFT(source, param, value1, value2, value3); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void SourcedvSOFT(uint source, int param, double* values) + { + if (ExtPointers.alSourcedvSOFT is null) + { + AlExtensionException.ThrowMissing("alSourcedvSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alSourcedvSOFT(source, param, values); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetSourcedSOFT(uint source, int param, double* value) + { + if (ExtPointers.alGetSourcedSOFT is null) + { + AlExtensionException.ThrowMissing("alGetSourcedSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alGetSourcedSOFT(source, param, value); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetSource3dSOFT(uint source, int param, double* value1, double* value2, double* value3) + { + if (ExtPointers.alGetSource3dSOFT is null) + { + AlExtensionException.ThrowMissing("alGetSource3dSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alGetSource3dSOFT(source, param, value1, value2, value3); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetSourcedvSOFT(uint source, int param, double* values) + { + if (ExtPointers.alGetSourcedvSOFT is null) + { + AlExtensionException.ThrowMissing("alGetSourcedvSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alGetSourcedvSOFT(source, param, values); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void Sourcei64SOFT(uint source, int param, long value) + { + if (ExtPointers.alSourcei64SOFT is null) + { + AlExtensionException.ThrowMissing("alSourcei64SOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alSourcei64SOFT(source, param, value); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void Source3i64SOFT(uint source, int param, long value1, long value2, long value3) + { + if (ExtPointers.alSource3i64SOFT is null) + { + AlExtensionException.ThrowMissing("alSource3i64SOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alSource3i64SOFT(source, param, value1, value2, value3); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void Sourcei64vSOFT(uint source, int param, long* values) + { + if (ExtPointers.alSourcei64vSOFT is null) + { + AlExtensionException.ThrowMissing("alSourcei64vSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alSourcei64vSOFT(source, param, values); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetSourcei64SOFT(uint source, int param, long* value) + { + if (ExtPointers.alGetSourcei64SOFT is null) + { + AlExtensionException.ThrowMissing("alGetSourcei64SOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alGetSourcei64SOFT(source, param, value); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetSource3i64SOFT(uint source, int param, long* value1, long* value2, long* value3) + { + if (ExtPointers.alGetSource3i64SOFT is null) + { + AlExtensionException.ThrowMissing("alGetSource3i64SOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alGetSource3i64SOFT(source, param, value1, value2, value3); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_latency. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetSourcei64vSOFT(uint source, int param, long* values) + { + if (ExtPointers.alGetSourcei64vSOFT is null) + { + AlExtensionException.ThrowMissing("alGetSourcei64vSOFT", "AL_SOFT_source_latency"); + } + ExtPointers.alGetSourcei64vSOFT(source, param, values); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_deferred_updates. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void DeferUpdatesSOFT() + { + if (ExtPointers.alDeferUpdatesSOFT is null) + { + AlExtensionException.ThrowMissing("alDeferUpdatesSOFT", "AL_SOFT_deferred_updates"); + } + ExtPointers.alDeferUpdatesSOFT(); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_deferred_updates. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void ProcessUpdatesSOFT() + { + if (ExtPointers.alProcessUpdatesSOFT is null) + { + AlExtensionException.ThrowMissing("alProcessUpdatesSOFT", "AL_SOFT_deferred_updates"); + } + ExtPointers.alProcessUpdatesSOFT(); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_resampler. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static byte* GetStringiSOFT(int pname, int index) + { + if (ExtPointers.alGetStringiSOFT is null) + { + AlExtensionException.ThrowMissing("alGetStringiSOFT", "AL_SOFT_source_resampler"); + } + return ExtPointers.alGetStringiSOFT(pname, index); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void EventControlSOFT(int count, int* types, Bool8 enable) + { + if (ExtPointers.alEventControlSOFT is null) + { + AlExtensionException.ThrowMissing("alEventControlSOFT", "AL_SOFT_events"); + } + ExtPointers.alEventControlSOFT(count, types, enable); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void EventCallbackSOFT(void* callback, void* userParam) + { + if (ExtPointers.alEventCallbackSOFT is null) + { + AlExtensionException.ThrowMissing("alEventCallbackSOFT", "AL_SOFT_events"); + } + ExtPointers.alEventCallbackSOFT(callback, userParam); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void* GetPointerSOFT(int pname) + { + if (ExtPointers.alGetPointerSOFT is null) + { + AlExtensionException.ThrowMissing("alGetPointerSOFT", "AL_SOFT_events"); + } + return ExtPointers.alGetPointerSOFT(pname); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetPointervSOFT(int pname, void** values) + { + if (ExtPointers.alGetPointervSOFT is null) + { + AlExtensionException.ThrowMissing("alGetPointervSOFT", "AL_SOFT_events"); + } + ExtPointers.alGetPointervSOFT(pname, values); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_callback_buffer. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void BufferCallbackSOFT(uint buffer, int format, int freq, void* callback, void* userptr) + { + if (ExtPointers.alBufferCallbackSOFT is null) + { + AlExtensionException.ThrowMissing("alBufferCallbackSOFT", "AL_SOFT_callback_buffer"); + } + ExtPointers.alBufferCallbackSOFT(buffer, format, freq, callback, userptr); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_callback_buffer. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetBufferPtrSOFT(uint buffer, int param, void** ptr) + { + if (ExtPointers.alGetBufferPtrSOFT is null) + { + AlExtensionException.ThrowMissing("alGetBufferPtrSOFT", "AL_SOFT_callback_buffer"); + } + ExtPointers.alGetBufferPtrSOFT(buffer, param, ptr); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_callback_buffer. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetBuffer3PtrSOFT(uint buffer, int param, void** ptr0, void** ptr1, void** ptr2) + { + if (ExtPointers.alGetBuffer3PtrSOFT is null) + { + AlExtensionException.ThrowMissing("alGetBuffer3PtrSOFT", "AL_SOFT_callback_buffer"); + } + ExtPointers.alGetBuffer3PtrSOFT(buffer, param, ptr0, ptr1, ptr2); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_callback_buffer. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetBufferPtrvSOFT(uint buffer, int param, void** ptr) + { + if (ExtPointers.alGetBufferPtrvSOFT is null) + { + AlExtensionException.ThrowMissing("alGetBufferPtrvSOFT", "AL_SOFT_callback_buffer"); + } + ExtPointers.alGetBufferPtrvSOFT(buffer, param, ptr); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_start_delay. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void SourcePlayAtTimeSOFT(uint source, long startTime) + { + if (ExtPointers.alSourcePlayAtTimeSOFT is null) + { + AlExtensionException.ThrowMissing("alSourcePlayAtTimeSOFT", "AL_SOFT_source_start_delay"); + } + ExtPointers.alSourcePlayAtTimeSOFT(source, startTime); + } + + /// + /// + /// + /// + /// Provided by AL_SOFT_source_start_delay. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void SourcePlayAtTimevSOFT(int n, uint* sources, long startTime) + { + if (ExtPointers.alSourcePlayAtTimevSOFT is null) + { + AlExtensionException.ThrowMissing("alSourcePlayAtTimevSOFT", "AL_SOFT_source_start_delay"); + } + ExtPointers.alSourcePlayAtTimevSOFT(n, sources, startTime); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void DebugMessageCallbackEXT(void* callback, void* userParam) + { + if (ExtPointers.alDebugMessageCallbackEXT is null) + { + AlExtensionException.ThrowMissing("alDebugMessageCallbackEXT", "AL_EXT_debug"); + } + ExtPointers.alDebugMessageCallbackEXT(callback, userParam); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void DebugMessageInsertEXT( + int source, + int type, + uint id, + int severity, + int length, + byte* message + ) + { + if (ExtPointers.alDebugMessageInsertEXT is null) + { + AlExtensionException.ThrowMissing("alDebugMessageInsertEXT", "AL_EXT_debug"); + } + ExtPointers.alDebugMessageInsertEXT(source, type, id, severity, length, message); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void DebugMessageControlEXT( + int source, + int type, + int severity, + int count, + uint* ids, + Bool8 enable + ) + { + if (ExtPointers.alDebugMessageControlEXT is null) + { + AlExtensionException.ThrowMissing("alDebugMessageControlEXT", "AL_EXT_debug"); + } + ExtPointers.alDebugMessageControlEXT(source, type, severity, count, ids, enable); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void PushDebugGroupEXT(int source, uint id, int length, byte* message) + { + if (ExtPointers.alPushDebugGroupEXT is null) + { + AlExtensionException.ThrowMissing("alPushDebugGroupEXT", "AL_EXT_debug"); + } + ExtPointers.alPushDebugGroupEXT(source, id, length, message); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void PopDebugGroupEXT() + { + if (ExtPointers.alPopDebugGroupEXT is null) + { + AlExtensionException.ThrowMissing("alPopDebugGroupEXT", "AL_EXT_debug"); + } + ExtPointers.alPopDebugGroupEXT(); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static uint GetDebugMessageLogEXT( + uint count, + int logBufSize, + int* sources, + int* types, + uint* ids, + int* severities, + int* lengths, + byte* logBuf + ) + { + if (ExtPointers.alGetDebugMessageLogEXT is null) + { + AlExtensionException.ThrowMissing("alGetDebugMessageLogEXT", "AL_EXT_debug"); + } + return ExtPointers.alGetDebugMessageLogEXT( + count, + logBufSize, + sources, + types, + ids, + severities, + lengths, + logBuf + ); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void ObjectLabelEXT(int identifier, uint name, int length, byte* label) + { + if (ExtPointers.alObjectLabelEXT is null) + { + AlExtensionException.ThrowMissing("alObjectLabelEXT", "AL_EXT_debug"); + } + ExtPointers.alObjectLabelEXT(identifier, name, length, label); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetObjectLabelEXT(int identifier, uint name, int bufSize, int* length, byte* label) + { + if (ExtPointers.alGetObjectLabelEXT is null) + { + AlExtensionException.ThrowMissing("alGetObjectLabelEXT", "AL_EXT_debug"); + } + ExtPointers.alGetObjectLabelEXT(identifier, name, bufSize, length, label); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void* GetPointerEXT(int pname) + { + if (ExtPointers.alGetPointerEXT is null) + { + AlExtensionException.ThrowMissing("alGetPointerEXT", "AL_EXT_debug"); + } + return ExtPointers.alGetPointerEXT(pname); + } + + /// + /// + /// + /// + /// Provided by AL_EXT_debug. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetPointervEXT(int pname, void** values) + { + if (ExtPointers.alGetPointervEXT is null) + { + AlExtensionException.ThrowMissing("alGetPointervEXT", "AL_EXT_debug"); + } + ExtPointers.alGetPointervEXT(pname, values); + } + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.Getters.gen.cs b/Brutal.OpenAl/Generated/Al/Al.Getters.gen.cs new file mode 100644 index 0000000..1bbe9ee --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.Getters.gen.cs @@ -0,0 +1,120 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Al + { + internal static float GetListenerf(int param) + { + float value; + PInvoke.GetListenerf(param, &value); + return value; + } + + internal static float3 GetListener3f(int param) + { + float x, + y, + z; + PInvoke.GetListener3f(param, &x, &y, &z); + return new float3(x, y, z); + } + + internal static int GetListeneri(int param) + { + int value; + PInvoke.GetListeneri(param, &value); + return value; + } + + internal static float GetSourcef(uint name, int param) + { + float value; + PInvoke.GetSourcef(name, param, &value); + return value; + } + + internal static float3 GetSource3f(uint name, int param) + { + float x, + y, + z; + PInvoke.GetSource3f(name, param, &x, &y, &z); + return new float3(x, y, z); + } + + internal static int GetSourcei(uint name, int param) + { + int value; + PInvoke.GetSourcei(name, param, &value); + return value; + } + + internal static float GetBufferf(uint name, int param) + { + float value; + PInvoke.GetBufferf(name, param, &value); + return value; + } + + internal static float3 GetBuffer3f(uint name, int param) + { + float x, + y, + z; + PInvoke.GetBuffer3f(name, param, &x, &y, &z); + return new float3(x, y, z); + } + + internal static int GetBufferi(uint name, int param) + { + int value; + PInvoke.GetBufferi(name, param, &value); + return value; + } + + internal static int GetEffecti(uint name, int param) + { + int value; + PInvoke.GetEffecti(name, param, &value); + return value; + } + + internal static float GetEffectf(uint name, int param) + { + float value; + PInvoke.GetEffectf(name, param, &value); + return value; + } + + internal static int GetFilteri(uint name, int param) + { + int value; + PInvoke.GetFilteri(name, param, &value); + return value; + } + + internal static float GetFilterf(uint name, int param) + { + float value; + PInvoke.GetFilterf(name, param, &value); + return value; + } + + internal static int GetAuxiliaryEffectSloti(uint name, int param) + { + int value; + PInvoke.GetAuxiliaryEffectSloti(name, param, &value); + return value; + } + + internal static float GetAuxiliaryEffectSlotf(uint name, int param) + { + float value; + PInvoke.GetAuxiliaryEffectSlotf(name, param, &value); + return value; + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.Listener.Properties.gen.cs b/Brutal.OpenAl/Generated/Al/Al.Listener.Properties.gen.cs new file mode 100644 index 0000000..57f9465 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.Listener.Properties.gen.cs @@ -0,0 +1,106 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Al + { + public static partial class Listener + { + /// + /// Source or listener gain. + /// + /// + /// + /// Gets/sets AL_GAIN (alListenerf/alGetListenerf). + /// + /// + /// For sources, an initial linear gain value (before attenuation is applied). For the listener, an + /// output linear gain adjustment. + /// + /// + /// A value of 1.0 means unattenuated. Each division by 2 equals an attenuation of about -6dB. Each + /// multiplication by 2 equals an amplification of about +6dB. + /// + /// + /// Type ALfloat; minimum 0.0. + /// + /// + public static float Gain + { + get => Al.GetListenerf(AL_GAIN); + set => Al.PInvoke.Listenerf(AL_GAIN, value); + } + + /// + /// Source or listener position. + /// + /// + /// + /// Gets/sets AL_POSITION (alListener3f/alGetListener3f). + /// + /// + /// The source or listener location in three dimensional space. + /// + /// + /// OpenAL uses a right handed coordinate system, like OpenGL, where with a default view, X points right + /// (thumb), Y points up (index finger), and Z points towards the viewer/camera (middle finger). + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + public static float3 Position + { + get => Al.GetListener3f(AL_POSITION); + set => Al.PInvoke.Listener3f(AL_POSITION, value.X, value.Y, value.Z); + } + + /// + /// Source or listener velocity. + /// + /// + /// + /// Gets/sets AL_VELOCITY (alListener3f/alGetListener3f). + /// + /// + /// Specifies the current velocity, relative to the position. + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + public static float3 Velocity + { + get => Al.GetListener3f(AL_VELOCITY); + set => Al.PInvoke.Listener3f(AL_VELOCITY, value.X, value.Y, value.Z); + } + + /// + /// Gets/sets AL_METERS_PER_UNIT (alListenerf/alGetListenerf). + /// + /// + /// + /// Type ALfloat; minimum 0; default 1.0. + /// + /// + /// Requires ALC_EXT_EFX; a native error otherwise. + /// + /// + public static float MetersPerUnit + { + get => Al.GetListenerf(AL_METERS_PER_UNIT); + set => Al.PInvoke.Listenerf(AL_METERS_PER_UNIT, value); + } + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.ObjectNames.gen.cs b/Brutal.OpenAl/Generated/Al/Al.ObjectNames.gen.cs new file mode 100644 index 0000000..c8e35bb --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.ObjectNames.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Al + { + /// + /// Generates buffers (alGenBuffers), filling . + /// + /// The span to fill; its length determines how many buffers are generated. + public static void GenBuffers(Span buffers) + { + if (buffers.IsEmpty) + return; + var names = buffers.Cast(); + fixed (uint* p = names) + Al.PInvoke.GenBuffers(names.Length, p); + } + + /// + /// Generates buffers (alGenBuffers). Allocates the returned array; use the Span overload to bring your own storage. + /// + /// How many buffers to generate; a non-positive count returns an empty array. + public static AlBuffer[] GenBuffers(int count) + { + if (count <= 0) + return []; + var buffers = new AlBuffer[count]; + GenBuffers(buffers.AsSpan()); + return buffers; + } + + /// + /// Generates a single buffer. + /// + public static AlBuffer GenBuffer() + { + Span buffer = stackalloc AlBuffer[1]; + GenBuffers(buffer); + return buffer[0]; + } + + /// + /// Deletes the given buffers (alDeleteBuffers). Each must not be in use by a source. A successful delete releases any callback handlers registered via . + /// + /// The buffers to delete. + public static void DeleteBuffers(ReadOnlySpan buffers) + { + if (buffers.IsEmpty) + return; + var names = buffers.Cast(); + fixed (uint* p = names) + AlBuffer.DeleteAndEvictCallbackRoots(p, names.Length); + } + + /// + /// Generates sources (alGenSources), filling . + /// + /// The span to fill; its length determines how many sources are generated. + public static void GenSources(Span sources) + { + if (sources.IsEmpty) + return; + var names = sources.Cast(); + fixed (uint* p = names) + Al.PInvoke.GenSources(names.Length, p); + } + + /// + /// Generates sources (alGenSources). Allocates the returned array; use the Span overload to bring your own storage. + /// + /// How many sources to generate; a non-positive count returns an empty array. + public static AlSource[] GenSources(int count) + { + if (count <= 0) + return []; + var sources = new AlSource[count]; + GenSources(sources.AsSpan()); + return sources; + } + + /// + /// Generates a single source. + /// + public static AlSource GenSource() + { + Span source = stackalloc AlSource[1]; + GenSources(source); + return source[0]; + } + + /// + /// Deletes the given sources (alDeleteSources). + /// + /// The sources to delete. + public static void DeleteSources(ReadOnlySpan sources) + { + if (sources.IsEmpty) + return; + var names = sources.Cast(); + fixed (uint* p = names) + Al.PInvoke.DeleteSources(names.Length, p); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.PInvoke.gen.cs b/Brutal.OpenAl/Generated/Al/Al.PInvoke.gen.cs new file mode 100644 index 0000000..d0bf6f2 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.PInvoke.gen.cs @@ -0,0 +1,381 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Al + { + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "alEnable")] + public static partial void Enable(int capability); + + [LibraryImport(Dll, EntryPoint = "alDisable")] + public static partial void Disable(int capability); + + [LibraryImport(Dll, EntryPoint = "alIsEnabled")] + public static partial Bool8 IsEnabled(int capability); + + [LibraryImport(Dll, EntryPoint = "alDopplerFactor")] + public static partial void DopplerFactor(float value); + + [LibraryImport(Dll, EntryPoint = "alDopplerVelocity")] + public static partial void DopplerVelocity(float value); + + [LibraryImport(Dll, EntryPoint = "alDistanceModel")] + public static partial void DistanceModel(int distanceModel); + + [LibraryImport(Dll, EntryPoint = "alGetString")] + public static partial byte* GetString(int param); + + [LibraryImport(Dll, EntryPoint = "alGetBooleanv")] + public static partial void GetBooleanv(int param, Bool8* values); + + [LibraryImport(Dll, EntryPoint = "alGetIntegerv")] + public static partial void GetIntegerv(int param, int* values); + + [LibraryImport(Dll, EntryPoint = "alGetFloatv")] + public static partial void GetFloatv(int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alGetDoublev")] + public static partial void GetDoublev(int param, double* values); + + [LibraryImport(Dll, EntryPoint = "alGetBoolean")] + public static partial Bool8 GetBoolean(int param); + + [LibraryImport(Dll, EntryPoint = "alGetInteger")] + public static partial int GetInteger(int param); + + [LibraryImport(Dll, EntryPoint = "alGetFloat")] + public static partial float GetFloat(int param); + + [LibraryImport(Dll, EntryPoint = "alGetDouble")] + public static partial double GetDouble(int param); + + [LibraryImport(Dll, EntryPoint = "alGetError")] + public static partial int GetError(); + + /// + /// Query for the presence of an extension on the AL context. + /// + [LibraryImport(Dll, EntryPoint = "alIsExtensionPresent")] + public static partial Bool8 IsExtensionPresent(byte* extname); + + [LibraryImport(Dll, EntryPoint = "alGetProcAddress")] + public static partial void* GetProcAddress(byte* fname); + + [LibraryImport(Dll, EntryPoint = "alGetEnumValue")] + public static partial int GetEnumValue(byte* ename); + + [LibraryImport(Dll, EntryPoint = "alListenerf")] + public static partial void Listenerf(int param, float value); + + [LibraryImport(Dll, EntryPoint = "alListener3f")] + public static partial void Listener3f(int param, float value1, float value2, float value3); + + [LibraryImport(Dll, EntryPoint = "alListenerfv")] + public static partial void Listenerfv(int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alListeneri")] + public static partial void Listeneri(int param, int value); + + [LibraryImport(Dll, EntryPoint = "alListener3i")] + public static partial void Listener3i(int param, int value1, int value2, int value3); + + [LibraryImport(Dll, EntryPoint = "alListeneriv")] + public static partial void Listeneriv(int param, int* values); + + [LibraryImport(Dll, EntryPoint = "alGetListenerf")] + public static partial void GetListenerf(int param, float* value); + + [LibraryImport(Dll, EntryPoint = "alGetListener3f")] + public static partial void GetListener3f(int param, float* value1, float* value2, float* value3); + + [LibraryImport(Dll, EntryPoint = "alGetListenerfv")] + public static partial void GetListenerfv(int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alGetListeneri")] + public static partial void GetListeneri(int param, int* value); + + [LibraryImport(Dll, EntryPoint = "alGetListener3i")] + public static partial void GetListener3i(int param, int* value1, int* value2, int* value3); + + [LibraryImport(Dll, EntryPoint = "alGetListeneriv")] + public static partial void GetListeneriv(int param, int* values); + + /// + /// Create source objects. + /// + [LibraryImport(Dll, EntryPoint = "alGenSources")] + public static partial void GenSources(int n, uint* sources); + + /// + /// Delete source objects. + /// + [LibraryImport(Dll, EntryPoint = "alDeleteSources")] + public static partial void DeleteSources(int n, uint* sources); + + /// + /// Verify an ID is for a valid source. + /// + [LibraryImport(Dll, EntryPoint = "alIsSource")] + public static partial Bool8 IsSource(uint source); + + [LibraryImport(Dll, EntryPoint = "alSourcef")] + public static partial void Sourcef(uint source, int param, float value); + + [LibraryImport(Dll, EntryPoint = "alSource3f")] + public static partial void Source3f(uint source, int param, float value1, float value2, float value3); + + [LibraryImport(Dll, EntryPoint = "alSourcefv")] + public static partial void Sourcefv(uint source, int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alSourcei")] + public static partial void Sourcei(uint source, int param, int value); + + [LibraryImport(Dll, EntryPoint = "alSource3i")] + public static partial void Source3i(uint source, int param, int value1, int value2, int value3); + + [LibraryImport(Dll, EntryPoint = "alSourceiv")] + public static partial void Sourceiv(uint source, int param, int* values); + + [LibraryImport(Dll, EntryPoint = "alGetSourcef")] + public static partial void GetSourcef(uint source, int param, float* value); + + [LibraryImport(Dll, EntryPoint = "alGetSource3f")] + public static partial void GetSource3f(uint source, int param, float* value1, float* value2, float* value3); + + [LibraryImport(Dll, EntryPoint = "alGetSourcefv")] + public static partial void GetSourcefv(uint source, int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alGetSourcei")] + public static partial void GetSourcei(uint source, int param, int* value); + + [LibraryImport(Dll, EntryPoint = "alGetSource3i")] + public static partial void GetSource3i(uint source, int param, int* value1, int* value2, int* value3); + + [LibraryImport(Dll, EntryPoint = "alGetSourceiv")] + public static partial void GetSourceiv(uint source, int param, int* values); + + /// + /// Play, restart, or resume a source, setting its state to AL_PLAYING. + /// + [LibraryImport(Dll, EntryPoint = "alSourcePlay")] + public static partial void SourcePlay(uint source); + + /// + /// Stop a source, setting its state to AL_STOPPED if playing or paused. + /// + [LibraryImport(Dll, EntryPoint = "alSourceStop")] + public static partial void SourceStop(uint source); + + /// + /// Rewind a source, setting its state to AL_INITIAL. + /// + [LibraryImport(Dll, EntryPoint = "alSourceRewind")] + public static partial void SourceRewind(uint source); + + /// + /// Pause a source, setting its state to AL_PAUSED if playing. + /// + [LibraryImport(Dll, EntryPoint = "alSourcePause")] + public static partial void SourcePause(uint source); + + /// + /// Play, restart, or resume a list of sources atomically. + /// + [LibraryImport(Dll, EntryPoint = "alSourcePlayv")] + public static partial void SourcePlayv(int n, uint* sources); + + /// + /// Stop a list of sources atomically. + /// + [LibraryImport(Dll, EntryPoint = "alSourceStopv")] + public static partial void SourceStopv(int n, uint* sources); + + /// + /// Rewind a list of sources atomically. + /// + [LibraryImport(Dll, EntryPoint = "alSourceRewindv")] + public static partial void SourceRewindv(int n, uint* sources); + + /// + /// Pause a list of sources atomically. + /// + [LibraryImport(Dll, EntryPoint = "alSourcePausev")] + public static partial void SourcePausev(int n, uint* sources); + + /// + /// Queue buffers onto a source + /// + [LibraryImport(Dll, EntryPoint = "alSourceQueueBuffers")] + public static partial void SourceQueueBuffers(uint source, int nb, uint* buffers); + + /// + /// Unqueue processed buffers from a source + /// + [LibraryImport(Dll, EntryPoint = "alSourceUnqueueBuffers")] + public static partial void SourceUnqueueBuffers(uint source, int nb, uint* buffers); + + /// + /// Create buffer objects + /// + [LibraryImport(Dll, EntryPoint = "alGenBuffers")] + public static partial void GenBuffers(int n, uint* buffers); + + /// + /// Delete buffer objects + /// + [LibraryImport(Dll, EntryPoint = "alDeleteBuffers")] + public static partial void DeleteBuffers(int n, uint* buffers); + + /// + /// Verify an ID is a valid buffer (including the NULL buffer) + /// + [LibraryImport(Dll, EntryPoint = "alIsBuffer")] + public static partial Bool8 IsBuffer(uint buffer); + + [LibraryImport(Dll, EntryPoint = "alBufferData")] + public static partial void BufferData(uint buffer, int format, void* data, int size, int samplerate); + + [LibraryImport(Dll, EntryPoint = "alBufferf")] + public static partial void Bufferf(uint buffer, int param, float value); + + [LibraryImport(Dll, EntryPoint = "alBuffer3f")] + public static partial void Buffer3f(uint buffer, int param, float value1, float value2, float value3); + + [LibraryImport(Dll, EntryPoint = "alBufferfv")] + public static partial void Bufferfv(uint buffer, int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alBufferi")] + public static partial void Bufferi(uint buffer, int param, int value); + + [LibraryImport(Dll, EntryPoint = "alBuffer3i")] + public static partial void Buffer3i(uint buffer, int param, int value1, int value2, int value3); + + [LibraryImport(Dll, EntryPoint = "alBufferiv")] + public static partial void Bufferiv(uint buffer, int param, int* values); + + [LibraryImport(Dll, EntryPoint = "alGetBufferf")] + public static partial void GetBufferf(uint buffer, int param, float* value); + + [LibraryImport(Dll, EntryPoint = "alGetBuffer3f")] + public static partial void GetBuffer3f(uint buffer, int param, float* value1, float* value2, float* value3); + + [LibraryImport(Dll, EntryPoint = "alGetBufferfv")] + public static partial void GetBufferfv(uint buffer, int param, float* values); + + [LibraryImport(Dll, EntryPoint = "alGetBufferi")] + public static partial void GetBufferi(uint buffer, int param, int* value); + + [LibraryImport(Dll, EntryPoint = "alGetBuffer3i")] + public static partial void GetBuffer3i(uint buffer, int param, int* value1, int* value2, int* value3); + + [LibraryImport(Dll, EntryPoint = "alGetBufferiv")] + public static partial void GetBufferiv(uint buffer, int param, int* values); + + [LibraryImport(Dll, EntryPoint = "alSpeedOfSound")] + public static partial void SpeedOfSound(float value); + + [LibraryImport(Dll, EntryPoint = "alGenEffects")] + public static partial void GenEffects(int n, uint* effects); + + [LibraryImport(Dll, EntryPoint = "alDeleteEffects")] + public static partial void DeleteEffects(int n, uint* effects); + + [LibraryImport(Dll, EntryPoint = "alIsEffect")] + public static partial Bool8 IsEffect(uint effect); + + [LibraryImport(Dll, EntryPoint = "alEffecti")] + public static partial void Effecti(uint effect, int param, int iValue); + + [LibraryImport(Dll, EntryPoint = "alEffectiv")] + public static partial void Effectiv(uint effect, int param, int* piValues); + + [LibraryImport(Dll, EntryPoint = "alEffectf")] + public static partial void Effectf(uint effect, int param, float flValue); + + [LibraryImport(Dll, EntryPoint = "alEffectfv")] + public static partial void Effectfv(uint effect, int param, float* pflValues); + + [LibraryImport(Dll, EntryPoint = "alGetEffecti")] + public static partial void GetEffecti(uint effect, int param, int* iValue); + + [LibraryImport(Dll, EntryPoint = "alGetEffectiv")] + public static partial void GetEffectiv(uint effect, int param, int* piValues); + + [LibraryImport(Dll, EntryPoint = "alGetEffectf")] + public static partial void GetEffectf(uint effect, int param, float* flValue); + + [LibraryImport(Dll, EntryPoint = "alGetEffectfv")] + public static partial void GetEffectfv(uint effect, int param, float* pflValues); + + [LibraryImport(Dll, EntryPoint = "alGenFilters")] + public static partial void GenFilters(int n, uint* filters); + + [LibraryImport(Dll, EntryPoint = "alDeleteFilters")] + public static partial void DeleteFilters(int n, uint* filters); + + [LibraryImport(Dll, EntryPoint = "alIsFilter")] + public static partial Bool8 IsFilter(uint filter); + + [LibraryImport(Dll, EntryPoint = "alFilteri")] + public static partial void Filteri(uint filter, int param, int iValue); + + [LibraryImport(Dll, EntryPoint = "alFilteriv")] + public static partial void Filteriv(uint filter, int param, int* piValues); + + [LibraryImport(Dll, EntryPoint = "alFilterf")] + public static partial void Filterf(uint filter, int param, float flValue); + + [LibraryImport(Dll, EntryPoint = "alFilterfv")] + public static partial void Filterfv(uint filter, int param, float* pflValues); + + [LibraryImport(Dll, EntryPoint = "alGetFilteri")] + public static partial void GetFilteri(uint filter, int param, int* iValue); + + [LibraryImport(Dll, EntryPoint = "alGetFilteriv")] + public static partial void GetFilteriv(uint filter, int param, int* piValues); + + [LibraryImport(Dll, EntryPoint = "alGetFilterf")] + public static partial void GetFilterf(uint filter, int param, float* flValue); + + [LibraryImport(Dll, EntryPoint = "alGetFilterfv")] + public static partial void GetFilterfv(uint filter, int param, float* pflValues); + + [LibraryImport(Dll, EntryPoint = "alGenAuxiliaryEffectSlots")] + public static partial void GenAuxiliaryEffectSlots(int n, uint* effectslots); + + [LibraryImport(Dll, EntryPoint = "alDeleteAuxiliaryEffectSlots")] + public static partial void DeleteAuxiliaryEffectSlots(int n, uint* effectslots); + + [LibraryImport(Dll, EntryPoint = "alIsAuxiliaryEffectSlot")] + public static partial Bool8 IsAuxiliaryEffectSlot(uint effectslot); + + [LibraryImport(Dll, EntryPoint = "alAuxiliaryEffectSloti")] + public static partial void AuxiliaryEffectSloti(uint effectslot, int param, int iValue); + + [LibraryImport(Dll, EntryPoint = "alAuxiliaryEffectSlotiv")] + public static partial void AuxiliaryEffectSlotiv(uint effectslot, int param, int* piValues); + + [LibraryImport(Dll, EntryPoint = "alAuxiliaryEffectSlotf")] + public static partial void AuxiliaryEffectSlotf(uint effectslot, int param, float flValue); + + [LibraryImport(Dll, EntryPoint = "alAuxiliaryEffectSlotfv")] + public static partial void AuxiliaryEffectSlotfv(uint effectslot, int param, float* pflValues); + + [LibraryImport(Dll, EntryPoint = "alGetAuxiliaryEffectSloti")] + public static partial void GetAuxiliaryEffectSloti(uint effectslot, int param, int* iValue); + + [LibraryImport(Dll, EntryPoint = "alGetAuxiliaryEffectSlotiv")] + public static partial void GetAuxiliaryEffectSlotiv(uint effectslot, int param, int* piValues); + + [LibraryImport(Dll, EntryPoint = "alGetAuxiliaryEffectSlotf")] + public static partial void GetAuxiliaryEffectSlotf(uint effectslot, int param, float* flValue); + + [LibraryImport(Dll, EntryPoint = "alGetAuxiliaryEffectSlotfv")] + public static partial void GetAuxiliaryEffectSlotfv(uint effectslot, int param, float* pflValues); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Al.Verbs.gen.cs b/Brutal.OpenAl/Generated/Al/Al.Verbs.gen.cs new file mode 100644 index 0000000..77243af --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Al.Verbs.gen.cs @@ -0,0 +1,61 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Al + { + /// + /// Pauses playback of the given sources (alSourcePausev), as one operation. + /// + /// The sources to pause. + public static void PauseSources(ReadOnlySpan sources) + { + if (sources.IsEmpty) + return; + var names = sources.Cast(); + fixed (uint* p = names) + Al.PInvoke.SourcePausev(names.Length, p); + } + + /// + /// Starts or resumes playback of the given sources (alSourcePlayv). The sources start as one operation, which is what makes a multi-source cue sample-aligned. + /// + /// The sources to play. + public static void PlaySources(ReadOnlySpan sources) + { + if (sources.IsEmpty) + return; + var names = sources.Cast(); + fixed (uint* p = names) + Al.PInvoke.SourcePlayv(names.Length, p); + } + + /// + /// Rewinds the given sources to the start of their buffers (alSourceRewindv), as one operation. + /// + /// The sources to rewind. + public static void RewindSources(ReadOnlySpan sources) + { + if (sources.IsEmpty) + return; + var names = sources.Cast(); + fixed (uint* p = names) + Al.PInvoke.SourceRewindv(names.Length, p); + } + + /// + /// Stops playback of the given sources (alSourceStopv), as one operation. + /// + /// The sources to stop. + public static void StopSources(ReadOnlySpan sources) + { + if (sources.IsEmpty) + return; + var names = sources.Cast(); + fixed (uint* p = names) + Al.PInvoke.SourceStopv(names.Length, p); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.ObjectName.gen.cs b/Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.ObjectName.gen.cs new file mode 100644 index 0000000..f77f1e5 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.ObjectName.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// An EFX auxiliary effect slot object (an ALuint object name); requires ALC_EXT_EFX. + /// + /// + /// + /// Created by (or ) and released by . This is a plain name, not a resource handle: copies refer to the same auxiliary effect slot; delete it exactly once. Operating on a null or deleted name sets (see ). A slot holds per-context state (the loaded effect and its gain/send settings). + /// + /// + public unsafe readonly partial struct AlAuxiliaryEffectSlot : INullable + { + /// + /// The raw OpenAL object name. + /// + public readonly uint Name; + + /// + /// Wraps an existing object name without validating it. + /// + /// The raw OpenAL object name. + public AlAuxiliaryEffectSlot(uint name) => Name = name; + + /// + /// The null auxiliary effect slot (name 0). + /// + public static AlAuxiliaryEffectSlot Null + { + get => default; + } + + /// + /// Returns if this is the null auxiliary effect slot. + /// + public bool IsNull() => Name == 0; + + /// + /// Deletes the auxiliary effect slot (alDeleteAuxiliaryEffectSlots). Its effect must be detached first. + /// + public void Delete() + { + var name = Name; + Al.PInvoke.DeleteAuxiliaryEffectSlots(1, &name); + } + + /// + /// Returns if the name is a live auxiliary effect slot (alIsAuxiliaryEffectSlot). + /// + public bool IsValid() => Al.PInvoke.IsAuxiliaryEffectSlot(Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.Properties.gen.cs b/Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.Properties.gen.cs new file mode 100644 index 0000000..883faa9 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlAuxiliaryEffectSlot.Properties.gen.cs @@ -0,0 +1,66 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public readonly unsafe partial struct AlAuxiliaryEffectSlot + { + /// + /// Gets AL_EFFECTSLOT_EFFECT (alGetAuxiliaryEffectSloti). + /// + /// + /// + /// Type ALuint; default AL_EFFECT_NULL. + /// + /// + public AlEffect Effect + { + get => new AlEffect((uint)Al.GetAuxiliaryEffectSloti(Name, AL_EFFECTSLOT_EFFECT)); + } + + /// + /// Gets/sets AL_EFFECTSLOT_GAIN (alAuxiliaryEffectSlotf/alGetAuxiliaryEffectSlotf). + /// + /// + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + /// + public float Gain + { + get => Al.GetAuxiliaryEffectSlotf(Name, AL_EFFECTSLOT_GAIN); + set => Al.PInvoke.AuxiliaryEffectSlotf(Name, AL_EFFECTSLOT_GAIN, value); + } + + /// + /// Gets/sets AL_EFFECTSLOT_AUXILIARY_SEND_AUTO (alAuxiliaryEffectSloti/alGetAuxiliaryEffectSloti). + /// + /// + /// + /// Type ALboolean; default AL_TRUE. + /// + /// + public bool SendAuto + { + get => Al.GetAuxiliaryEffectSloti(Name, AL_EFFECTSLOT_AUXILIARY_SEND_AUTO) != AL_FALSE; + set => Al.PInvoke.AuxiliaryEffectSloti(Name, AL_EFFECTSLOT_AUXILIARY_SEND_AUTO, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Gets/sets AL_EFFECTSLOT_TARGET_SOFT (alAuxiliaryEffectSloti/alGetAuxiliaryEffectSloti). + /// + /// + /// + /// Type ALuint; default AL_EFFECTSLOT_NULL. + /// + /// + public AlAuxiliaryEffectSlot Target + { + get => new AlAuxiliaryEffectSlot((uint)Al.GetAuxiliaryEffectSloti(Name, AL_EFFECTSLOT_TARGET_SOFT)); + set => Al.PInvoke.AuxiliaryEffectSloti(Name, AL_EFFECTSLOT_TARGET_SOFT, (int)value.Name); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlBuffer.ObjectName.gen.cs b/Brutal.OpenAl/Generated/Al/AlBuffer.ObjectName.gen.cs new file mode 100644 index 0000000..434e982 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlBuffer.ObjectName.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// An OpenAL buffer (an ALuint object name). + /// + /// + /// + /// Created by and released by (or in bulk). This is a plain name, not a resource handle: copies refer to the same buffer; delete it exactly once. Operating on a null or deleted name sets (see ). For parameter access keyed by enum, import the opt-in Brutal.OpenAlApi.Params namespace. + /// + /// + public unsafe readonly partial struct AlBuffer : INullable + { + /// + /// The raw OpenAL object name. + /// + public readonly uint Name; + + /// + /// Wraps an existing object name without validating it. + /// + /// The raw OpenAL object name. + public AlBuffer(uint name) => Name = name; + + /// + /// The null buffer (name 0). OpenAL never assigns it to a real buffer. + /// + public static AlBuffer Null + { + get => default; + } + + /// + /// Returns if this is the null buffer. + /// + public bool IsNull() => Name == 0; + + /// + /// Deletes the buffer (alDeleteBuffers). It must not be in use by a source. A successful delete releases any callback handler registered via . + /// + public void Delete() + { + var name = Name; + DeleteAndEvictCallbackRoots(&name, 1); + } + + /// + /// Returns if the name is a live buffer (alIsBuffer). + /// + public bool IsValid() => Al.PInvoke.IsBuffer(Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlBuffer.Properties.gen.cs b/Brutal.OpenAl/Generated/Al/AlBuffer.Properties.gen.cs new file mode 100644 index 0000000..d958510 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlBuffer.Properties.gen.cs @@ -0,0 +1,198 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public readonly unsafe partial struct AlBuffer + { + /// + /// Buffer frequency/sample rate (query only). + /// + /// + /// + /// Gets AL_FREQUENCY (alGetBufferi). + /// + /// + /// Type ALint. + /// + /// + public int Frequency + { + get => Al.GetBufferi(Name, AL_FREQUENCY); + } + + /// + /// Buffer bits per sample (query only). + /// + /// + /// + /// Gets AL_BITS (alGetBufferi). + /// + /// + /// Type ALint. + /// + /// + public int Bits + { + get => Al.GetBufferi(Name, AL_BITS); + } + + /// + /// Buffer channel count (query only). + /// + /// + /// + /// Gets AL_CHANNELS (alGetBufferi). + /// + /// + /// Type ALint. + /// + /// + public int Channels + { + get => Al.GetBufferi(Name, AL_CHANNELS); + } + + /// + /// Buffer data size in bytes (query only). + /// + /// + /// + /// Gets AL_SIZE (alGetBufferi). + /// + /// + /// Type ALint. + /// + /// + public int Size + { + get => Al.GetBufferi(Name, AL_SIZE); + } + + /// + /// Gets/sets AL_LOOP_POINTS_SOFT (alBufferiv/alGetBufferiv). + /// + /// + /// + /// Type ALint[2]; default 0,0. + /// + /// + public int2 LoopPoints + { + get => Al.GetBufferiv2(Name, AL_LOOP_POINTS_SOFT); + set => Al.SetBufferiv2(Name, AL_LOOP_POINTS_SOFT, value); + } + + /// + /// Gets/sets AL_UNPACK_BLOCK_ALIGNMENT_SOFT (alBufferi/alGetBufferi). + /// + /// + /// + /// Type ALint; minimum 0; default 0. + /// + /// + public int UnpackBlockAlignment + { + get => Al.GetBufferi(Name, AL_UNPACK_BLOCK_ALIGNMENT_SOFT); + set => Al.PInvoke.Bufferi(Name, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, value); + } + + /// + /// Gets/sets AL_PACK_BLOCK_ALIGNMENT_SOFT (alBufferi/alGetBufferi). + /// + /// + /// + /// Type ALint; minimum 0; default 0. + /// + /// + public int PackBlockAlignment + { + get => Al.GetBufferi(Name, AL_PACK_BLOCK_ALIGNMENT_SOFT); + set => Al.PInvoke.Bufferi(Name, AL_PACK_BLOCK_ALIGNMENT_SOFT, value); + } + + /// + /// Gets/sets AL_AMBISONIC_LAYOUT_SOFT (alBufferi/alGetBufferi). + /// + /// + /// + /// Type ALenum; default AL_FUMA_SOFT. + /// + /// + public AlAmbisonicLayout AmbisonicLayout + { + get => (AlAmbisonicLayout)Al.GetBufferi(Name, AL_AMBISONIC_LAYOUT_SOFT); + set => Al.PInvoke.Bufferi(Name, AL_AMBISONIC_LAYOUT_SOFT, (int)value); + } + + /// + /// Gets/sets AL_AMBISONIC_SCALING_SOFT (alBufferi/alGetBufferi). + /// + /// + /// + /// Type ALenum; default AL_FUMA_SOFT. + /// + /// + public AlAmbisonicScaling AmbisonicScaling + { + get => (AlAmbisonicScaling)Al.GetBufferi(Name, AL_AMBISONIC_SCALING_SOFT); + set => Al.PInvoke.Bufferi(Name, AL_AMBISONIC_SCALING_SOFT, (int)value); + } + + /// + /// Gets/sets AL_UNPACK_AMBISONIC_ORDER_SOFT (alBufferi/alGetBufferi). + /// + /// + /// + /// Type ALint; range 1 to 14; default 1. + /// + /// + public int UnpackAmbisonicOrder + { + get => Al.GetBufferi(Name, AL_UNPACK_AMBISONIC_ORDER_SOFT); + set => Al.PInvoke.Bufferi(Name, AL_UNPACK_AMBISONIC_ORDER_SOFT, value); + } + + /// + /// Gets AL_BYTE_LENGTH_SOFT (alGetBufferi). + /// + /// + /// + /// Type ALint. + /// + /// + public int ByteLength + { + get => Al.GetBufferi(Name, AL_BYTE_LENGTH_SOFT); + } + + /// + /// Gets AL_SAMPLE_LENGTH_SOFT (alGetBufferi). + /// + /// + /// + /// Type ALint. + /// + /// + public int SampleLength + { + get => Al.GetBufferi(Name, AL_SAMPLE_LENGTH_SOFT); + } + + /// + /// Gets AL_SEC_LENGTH_SOFT (alGetBufferf). + /// + /// + /// + /// Type ALfloat. + /// + /// + public float SecLength + { + get => Al.GetBufferf(Name, AL_SEC_LENGTH_SOFT); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlDebug.ObjectLabels.gen.cs b/Brutal.OpenAl/Generated/Al/AlDebug.ObjectLabels.gen.cs new file mode 100644 index 0000000..4dbb0a7 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlDebug.ObjectLabels.gen.cs @@ -0,0 +1,99 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class AlDebug + { + /// + /// Labels the auxiliary effect slot for diagnostics (alObjectLabelEXT); a label clears it. + /// + public static void ObjectLabel(AlAuxiliaryEffectSlot auxiliaryEffectSlot, string? label) => + ObjectLabel(AlObjectLabelIdentifier.AuxiliaryEffectSlot, auxiliaryEffectSlot.Name, label); + + /// + /// Labels the auxiliary effect slot for diagnostics (alObjectLabelEXT) from UTF-8 bytes (no transcode, no allocation); an empty label clears it. + /// + public static void ObjectLabel(AlAuxiliaryEffectSlot auxiliaryEffectSlot, ReadOnlySpan label) => + ObjectLabel(AlObjectLabelIdentifier.AuxiliaryEffectSlot, auxiliaryEffectSlot.Name, label); + + /// + /// Labels the buffer for diagnostics (alObjectLabelEXT); a label clears it. + /// + public static void ObjectLabel(AlBuffer buffer, string? label) => + ObjectLabel(AlObjectLabelIdentifier.Buffer, buffer.Name, label); + + /// + /// Labels the buffer for diagnostics (alObjectLabelEXT) from UTF-8 bytes (no transcode, no allocation); an empty label clears it. + /// + public static void ObjectLabel(AlBuffer buffer, ReadOnlySpan label) => + ObjectLabel(AlObjectLabelIdentifier.Buffer, buffer.Name, label); + + /// + /// Labels the effect for diagnostics (alObjectLabelEXT); a label clears it. + /// + public static void ObjectLabel(AlEffect effect, string? label) => + ObjectLabel(AlObjectLabelIdentifier.Effect, effect.Name, label); + + /// + /// Labels the effect for diagnostics (alObjectLabelEXT) from UTF-8 bytes (no transcode, no allocation); an empty label clears it. + /// + public static void ObjectLabel(AlEffect effect, ReadOnlySpan label) => + ObjectLabel(AlObjectLabelIdentifier.Effect, effect.Name, label); + + /// + /// Labels the filter for diagnostics (alObjectLabelEXT); a label clears it. + /// + public static void ObjectLabel(AlFilter filter, string? label) => + ObjectLabel(AlObjectLabelIdentifier.Filter, filter.Name, label); + + /// + /// Labels the filter for diagnostics (alObjectLabelEXT) from UTF-8 bytes (no transcode, no allocation); an empty label clears it. + /// + public static void ObjectLabel(AlFilter filter, ReadOnlySpan label) => + ObjectLabel(AlObjectLabelIdentifier.Filter, filter.Name, label); + + /// + /// Labels the source for diagnostics (alObjectLabelEXT); a label clears it. + /// + public static void ObjectLabel(AlSource source, string? label) => + ObjectLabel(AlObjectLabelIdentifier.Source, source.Name, label); + + /// + /// Labels the source for diagnostics (alObjectLabelEXT) from UTF-8 bytes (no transcode, no allocation); an empty label clears it. + /// + public static void ObjectLabel(AlSource source, ReadOnlySpan label) => + ObjectLabel(AlObjectLabelIdentifier.Source, source.Name, label); + + /// + /// Gets the auxiliary effect slot's diagnostic label (alGetObjectLabelEXT) as UTF-8 bytes, or an empty span if none was set; see for the returned span's validity rules. + /// + public static ReadOnlySpan GetObjectLabel(AlAuxiliaryEffectSlot auxiliaryEffectSlot) => + GetObjectLabel(AlObjectLabelIdentifier.AuxiliaryEffectSlot, auxiliaryEffectSlot.Name); + + /// + /// Gets the buffer's diagnostic label (alGetObjectLabelEXT) as UTF-8 bytes, or an empty span if none was set; see for the returned span's validity rules. + /// + public static ReadOnlySpan GetObjectLabel(AlBuffer buffer) => + GetObjectLabel(AlObjectLabelIdentifier.Buffer, buffer.Name); + + /// + /// Gets the effect's diagnostic label (alGetObjectLabelEXT) as UTF-8 bytes, or an empty span if none was set; see for the returned span's validity rules. + /// + public static ReadOnlySpan GetObjectLabel(AlEffect effect) => + GetObjectLabel(AlObjectLabelIdentifier.Effect, effect.Name); + + /// + /// Gets the filter's diagnostic label (alGetObjectLabelEXT) as UTF-8 bytes, or an empty span if none was set; see for the returned span's validity rules. + /// + public static ReadOnlySpan GetObjectLabel(AlFilter filter) => + GetObjectLabel(AlObjectLabelIdentifier.Filter, filter.Name); + + /// + /// Gets the source's diagnostic label (alGetObjectLabelEXT) as UTF-8 bytes, or an empty span if none was set; see for the returned span's validity rules. + /// + public static ReadOnlySpan GetObjectLabel(AlSource source) => + GetObjectLabel(AlObjectLabelIdentifier.Source, source.Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlEffect.ObjectName.gen.cs b/Brutal.OpenAl/Generated/Al/AlEffect.ObjectName.gen.cs new file mode 100644 index 0000000..53c2dc3 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlEffect.ObjectName.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// An EFX effect object (an ALuint object name); requires ALC_EXT_EFX. + /// + /// + /// + /// Created by the typed create methods (or ) and released by . This is a plain name, not a resource handle: copies refer to the same effect; delete it exactly once. Operating on a null or deleted name sets (see ). + /// + /// + public unsafe readonly partial struct AlEffect : INullable + { + /// + /// The raw OpenAL object name. + /// + public readonly uint Name; + + /// + /// Wraps an existing object name without validating it. + /// + /// The raw OpenAL object name. + public AlEffect(uint name) => Name = name; + + /// + /// The null effect (name 0). Passing it to detaches the slot's effect. + /// + public static AlEffect Null + { + get => default; + } + + /// + /// Returns if this is the null effect. + /// + public bool IsNull() => Name == 0; + + /// + /// Deletes the effect (alDeleteEffects). It must not be attached to a slot. + /// + public void Delete() + { + var name = Name; + Al.PInvoke.DeleteEffects(1, &name); + } + + /// + /// Returns if the name is a live effect (alIsEffect). + /// + public bool IsValid() => Al.PInvoke.IsEffect(Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlEffect.Properties.gen.cs b/Brutal.OpenAl/Generated/Al/AlEffect.Properties.gen.cs new file mode 100644 index 0000000..c612074 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlEffect.Properties.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public readonly unsafe partial struct AlEffect + { + /// + /// Gets AL_EFFECT_TYPE (alGetEffecti). + /// + /// + /// + /// Type ALenum; default AL_EFFECT_NULL. + /// + /// + public AlEffectType Type + { + get => (AlEffectType)Al.GetEffecti(Name, AL_EFFECT_TYPE); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlFilter.ObjectName.gen.cs b/Brutal.OpenAl/Generated/Al/AlFilter.ObjectName.gen.cs new file mode 100644 index 0000000..6169ffb --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlFilter.ObjectName.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// An EFX filter object (an ALuint object name); requires ALC_EXT_EFX. + /// + /// + /// + /// Created by the typed create methods (or ) and released by . This is a plain name, not a resource handle: copies refer to the same filter; delete it exactly once. Operating on a null or deleted name sets (see ). + /// + /// + public unsafe readonly partial struct AlFilter : INullable + { + /// + /// The raw OpenAL object name. + /// + public readonly uint Name; + + /// + /// Wraps an existing object name without validating it. + /// + /// The raw OpenAL object name. + public AlFilter(uint name) => Name = name; + + /// + /// The null filter (name 0). Clears the filter when set on a source or send. + /// + public static AlFilter Null + { + get => default; + } + + /// + /// Returns if this is the null filter. + /// + public bool IsNull() => Name == 0; + + /// + /// Deletes the filter (alDeleteFilters). It must not be attached to a source or send. + /// + public void Delete() + { + var name = Name; + Al.PInvoke.DeleteFilters(1, &name); + } + + /// + /// Returns if the name is a live filter (alIsFilter). + /// + public bool IsValid() => Al.PInvoke.IsFilter(Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlFilter.Properties.gen.cs b/Brutal.OpenAl/Generated/Al/AlFilter.Properties.gen.cs new file mode 100644 index 0000000..9308f09 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlFilter.Properties.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public readonly unsafe partial struct AlFilter + { + /// + /// Gets AL_FILTER_TYPE (alGetFilteri). + /// + /// + /// + /// Type ALenum; default AL_FILTER_NULL. + /// + /// + public AlFilterType Type + { + get => (AlFilterType)Al.GetFilteri(Name, AL_FILTER_TYPE); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlSource.ObjectName.gen.cs b/Brutal.OpenAl/Generated/Al/AlSource.ObjectName.gen.cs new file mode 100644 index 0000000..e428ed4 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlSource.ObjectName.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// An OpenAL source (an ALuint object name). + /// + /// + /// + /// Created by and released by (or in bulk). This is a plain name, not a resource handle: copies refer to the same source; delete it exactly once. Operating on a null or deleted name sets (see ). For parameter access keyed by enum, import the opt-in Brutal.OpenAlApi.Params namespace. + /// + /// + public unsafe readonly partial struct AlSource : INullable + { + /// + /// The raw OpenAL object name. + /// + public readonly uint Name; + + /// + /// Wraps an existing object name without validating it. + /// + /// The raw OpenAL object name. + public AlSource(uint name) => Name = name; + + /// + /// The null source (name 0). OpenAL never assigns it to a real source. + /// + public static AlSource Null + { + get => default; + } + + /// + /// Returns if this is the null source. + /// + public bool IsNull() => Name == 0; + + /// + /// Deletes the source (alDeleteSources). + /// + public void Delete() + { + var name = Name; + Al.PInvoke.DeleteSources(1, &name); + } + + /// + /// Returns if the name is a live source (alIsSource). + /// + public bool IsValid() => Al.PInvoke.IsSource(Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlSource.Properties.gen.cs b/Brutal.OpenAl/Generated/Al/AlSource.Properties.gen.cs new file mode 100644 index 0000000..5b34afb --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlSource.Properties.gen.cs @@ -0,0 +1,741 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public readonly unsafe partial struct AlSource + { + /// + /// Source or listener gain. + /// + /// + /// + /// Gets/sets AL_GAIN (alSourcef/alGetSourcef). + /// + /// + /// For sources, an initial linear gain value (before attenuation is applied). For the listener, an output + /// linear gain adjustment. + /// + /// + /// A value of 1.0 means unattenuated. Each division by 2 equals an attenuation of about -6dB. Each + /// multiplication by 2 equals an amplification of about +6dB. + /// + /// + /// Type ALfloat; minimum 0.0. + /// + /// + public float Gain + { + get => Al.GetSourcef(Name, AL_GAIN); + set => Al.PInvoke.Sourcef(Name, AL_GAIN, value); + } + + /// + /// Source pitch. + /// + /// + /// + /// Gets/sets AL_PITCH (alSourcef/alGetSourcef). + /// + /// + /// A multiplier for the sample rate of the source's buffer. + /// + /// + /// Type ALfloat; range 0.5 to 2.0; default 1.0. + /// + /// + public float Pitch + { + get => Al.GetSourcef(Name, AL_PITCH); + set => Al.PInvoke.Sourcef(Name, AL_PITCH, value); + } + + /// + /// Minimum source gain. + /// + /// + /// + /// Gets/sets AL_MIN_GAIN (alSourcef/alGetSourcef). + /// + /// + /// The minimum gain allowed for a source, after distance and cone attenuation are applied (if applicable). + /// + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + /// + public float MinGain + { + get => Al.GetSourcef(Name, AL_MIN_GAIN); + set => Al.PInvoke.Sourcef(Name, AL_MIN_GAIN, value); + } + + /// + /// Maximum source gain. + /// + /// + /// + /// Gets/sets AL_MAX_GAIN (alSourcef/alGetSourcef). + /// + /// + /// The maximum gain allowed for a source, after distance and cone attenuation are applied (if applicable). + /// + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + /// + public float MaxGain + { + get => Al.GetSourcef(Name, AL_MAX_GAIN); + set => Al.PInvoke.Sourcef(Name, AL_MAX_GAIN, value); + } + + /// + /// Source maximum distance. + /// + /// + /// + /// Gets/sets AL_MAX_DISTANCE (alSourcef/alGetSourcef). + /// + /// + /// The distance above which the source is not attenuated any further with a clamped distance model, or + /// where attenuation reaches 0.0 gain for linear distance models with a default rolloff factor. + /// + /// + /// Type ALfloat; minimum 0.0; default FLT_MAX. + /// + /// + public float MaxDistance + { + get => Al.GetSourcef(Name, AL_MAX_DISTANCE); + set => Al.PInvoke.Sourcef(Name, AL_MAX_DISTANCE, value); + } + + /// + /// Source rolloff factor. + /// + /// + /// + /// Gets/sets AL_ROLLOFF_FACTOR (alSourcef/alGetSourcef). + /// + /// + /// Multiplier to exaggerate or diminish distance attenuation. + /// + /// + /// At 0.0, no distance attenuation ever occurs. + /// + /// + /// Type ALfloat; minimum 0.0; default 1.0. + /// + /// + public float RolloffFactor + { + get => Al.GetSourcef(Name, AL_ROLLOFF_FACTOR); + set => Al.PInvoke.Sourcef(Name, AL_ROLLOFF_FACTOR, value); + } + + /// + /// Source reference distance. + /// + /// + /// + /// Gets/sets AL_REFERENCE_DISTANCE (alSourcef/alGetSourcef). + /// + /// + /// The distance in units that no distance attenuation occurs. + /// + /// + /// At 0.0, no distance attenuation occurs with non-linear attenuation models. + /// + /// + /// Type ALfloat; minimum 0.0; default 1.0. + /// + /// + public float ReferenceDistance + { + get => Al.GetSourcef(Name, AL_REFERENCE_DISTANCE); + set => Al.PInvoke.Sourcef(Name, AL_REFERENCE_DISTANCE, value); + } + + /// + /// Outer cone gain. + /// + /// + /// + /// Gets/sets AL_CONE_OUTER_GAIN (alSourcef/alGetSourcef). + /// + /// + /// The gain attenuation applied when the listener is outside of the source's outer cone angle. + /// + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.0. + /// + /// + public float ConeOuterGain + { + get => Al.GetSourcef(Name, AL_CONE_OUTER_GAIN); + set => Al.PInvoke.Sourcef(Name, AL_CONE_OUTER_GAIN, value); + } + + /// + /// Inner cone angle, in degrees. + /// + /// + /// + /// Gets/sets AL_CONE_INNER_ANGLE (alSourcef/alGetSourcef). + /// + /// + /// The angle covered by the inner cone, the area within which the source will not be attenuated by + /// direction. + /// + /// + /// Type ALint/ALfloat; range 0 to 360; default 360. + /// + /// + public float ConeInnerAngle + { + get => Al.GetSourcef(Name, AL_CONE_INNER_ANGLE); + set => Al.PInvoke.Sourcef(Name, AL_CONE_INNER_ANGLE, value); + } + + /// + /// Outer cone angle, in degrees. + /// + /// + /// + /// Gets/sets AL_CONE_OUTER_ANGLE (alSourcef/alGetSourcef). + /// + /// + /// The angle covered by the outer cone, the area outside of which the source will be fully attenuated by + /// direction. + /// + /// + /// Type ALint/ALfloat; range 0 to 360; default 360. + /// + /// + public float ConeOuterAngle + { + get => Al.GetSourcef(Name, AL_CONE_OUTER_ANGLE); + set => Al.PInvoke.Sourcef(Name, AL_CONE_OUTER_ANGLE, value); + } + + /// + /// Source buffer offset, in seconds. + /// + /// + /// + /// Gets/sets AL_SEC_OFFSET (alSourcef/alGetSourcef). + /// + /// + /// Type ALfloat/ALint; minimum 0. + /// + /// + public float SecOffset + { + get => Al.GetSourcef(Name, AL_SEC_OFFSET); + set => Al.PInvoke.Sourcef(Name, AL_SEC_OFFSET, value); + } + + /// + /// Source buffer offset, in sample frames. + /// + /// + /// + /// Gets/sets AL_SAMPLE_OFFSET (alSourcei/alGetSourcei). + /// + /// + /// Type ALint; minimum 0. + /// + /// + public int SampleOffset + { + get => Al.GetSourcei(Name, AL_SAMPLE_OFFSET); + set => Al.PInvoke.Sourcei(Name, AL_SAMPLE_OFFSET, value); + } + + /// + /// Source buffer offset, in bytes. + /// + /// + /// + /// Gets/sets AL_BYTE_OFFSET (alSourcei/alGetSourcei). + /// + /// + /// Type ALint; minimum 0. + /// + /// + public int ByteOffset + { + get => Al.GetSourcei(Name, AL_BYTE_OFFSET); + set => Al.PInvoke.Sourcei(Name, AL_BYTE_OFFSET, value); + } + + /// + /// Source or listener position. + /// + /// + /// + /// Gets/sets AL_POSITION (alSource3f/alGetSource3f). + /// + /// + /// The source or listener location in three dimensional space. + /// + /// + /// OpenAL uses a right handed coordinate system, like OpenGL, where with a default view, X points right + /// (thumb), Y points up (index finger), and Z points towards the viewer/camera (middle finger). + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + public float3 Position + { + get => Al.GetSource3f(Name, AL_POSITION); + set => Al.PInvoke.Source3f(Name, AL_POSITION, value.X, value.Y, value.Z); + } + + /// + /// Source or listener velocity. + /// + /// + /// + /// Gets/sets AL_VELOCITY (alSource3f/alGetSource3f). + /// + /// + /// Specifies the current velocity, relative to the position. + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + public float3 Velocity + { + get => Al.GetSource3f(Name, AL_VELOCITY); + set => Al.PInvoke.Source3f(Name, AL_VELOCITY, value.X, value.Y, value.Z); + } + + /// + /// Source direction. + /// + /// + /// + /// Gets/sets AL_DIRECTION (alSource3f/alGetSource3f). + /// + /// + /// Specifies the current direction in local space. A zero-length vector specifies an omni-directional + /// source (cone is ignored). + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + public float3 Direction + { + get => Al.GetSource3f(Name, AL_DIRECTION); + set => Al.PInvoke.Source3f(Name, AL_DIRECTION, value.X, value.Y, value.Z); + } + + /// + /// Source looping. + /// + /// + /// + /// Gets/sets AL_LOOPING (alSourcei/alGetSourcei). + /// + /// + /// Specifies whether source playback loops. + /// + /// + /// Type ALboolean; default AL_FALSE. + /// + /// + public bool Looping + { + get => Al.GetSourcei(Name, AL_LOOPING) != AL_FALSE; + set => Al.PInvoke.Sourcei(Name, AL_LOOPING, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Relative source. + /// + /// + /// + /// Gets/sets AL_SOURCE_RELATIVE (alSourcei/alGetSourcei). + /// + /// + /// Specifies if the source uses relative coordinates. + /// + /// + /// Type ALboolean; default AL_FALSE. + /// + /// + public bool SourceRelative + { + get => Al.GetSourcei(Name, AL_SOURCE_RELATIVE) != AL_FALSE; + set => Al.PInvoke.Sourcei(Name, AL_SOURCE_RELATIVE, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Source buffer. + /// + /// + /// + /// Gets/sets AL_BUFFER (alSourcei/alGetSourcei). + /// + /// + /// Specifies the buffer to provide sound samples for a source. + /// + /// + /// Type ALuint; default AL_NONE. + /// + /// + public AlBuffer Buffer + { + get => new AlBuffer((uint)Al.GetSourcei(Name, AL_BUFFER)); + set => Al.PInvoke.Sourcei(Name, AL_BUFFER, (int)value.Name); + } + + /// + /// Source state (query only). + /// + /// + /// + /// Gets AL_SOURCE_STATE (alGetSourcei). + /// + /// + /// Type ALenum. + /// + /// + public AlSourceState State + { + get => (AlSourceState)Al.GetSourcei(Name, AL_SOURCE_STATE); + } + + /// + /// Source type (query only). + /// + /// + /// + /// Gets AL_SOURCE_TYPE (alGetSourcei). + /// + /// + /// A Source is Static if a Buffer has been attached using AL_BUFFER. + /// + /// + /// A Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers. + /// + /// + /// A Source is Undetermined when it has the NULL buffer attached using AL_BUFFER. + /// + /// + /// Type ALenum. + /// + /// + public AlSourceType Type + { + get => (AlSourceType)Al.GetSourcei(Name, AL_SOURCE_TYPE); + } + + /// + /// Source Buffer Queue size (query only). + /// + /// + /// + /// Gets AL_BUFFERS_QUEUED (alGetSourcei). + /// + /// + /// The number of buffers queued using alSourceQueueBuffers, minus the buffers removed with + /// alSourceUnqueueBuffers. + /// + /// + /// Type ALint. + /// + /// + public int BuffersQueued + { + get => Al.GetSourcei(Name, AL_BUFFERS_QUEUED); + } + + /// + /// Source Buffer Queue processed count (query only). + /// + /// + /// + /// Gets AL_BUFFERS_PROCESSED (alGetSourcei). + /// + /// + /// The number of queued buffers that have been fully processed, and can be removed with + /// alSourceUnqueueBuffers. + /// + /// + /// Looping sources will never fully process buffers because they will be set to play again for when the + /// source loops. + /// + /// + /// Type ALint. + /// + /// + public int BuffersProcessed + { + get => Al.GetSourcei(Name, AL_BUFFERS_PROCESSED); + } + + /// + /// Sets AL_DIRECT_FILTER (alSourcei). + /// + /// + /// + /// Type ALuint; default AL_FILTER_NULL. + /// + /// + /// Set-only, as in the EFX spec: assignment copies the filter's parameters into the source, and native OpenAL keeps no record of which filter object they came from. + /// + /// + public AlFilter DirectFilter + { + set => Al.PInvoke.Sourcei(Name, AL_DIRECT_FILTER, (int)value.Name); + } + + /// + /// Gets/sets AL_AIR_ABSORPTION_FACTOR (alSourcef/alGetSourcef). + /// + /// + /// + /// Type ALuint; range 0 to 10; default 0. + /// + /// + public float AirAbsorptionFactor + { + get => Al.GetSourcef(Name, AL_AIR_ABSORPTION_FACTOR); + set => Al.PInvoke.Sourcef(Name, AL_AIR_ABSORPTION_FACTOR, value); + } + + /// + /// Gets/sets AL_ROOM_ROLLOFF_FACTOR (alSourcef/alGetSourcef). + /// + /// + /// + /// Type ALuint; range 0 to 10; default 0. + /// + /// + public float RoomRolloffFactor + { + get => Al.GetSourcef(Name, AL_ROOM_ROLLOFF_FACTOR); + set => Al.PInvoke.Sourcef(Name, AL_ROOM_ROLLOFF_FACTOR, value); + } + + /// + /// Gets/sets AL_CONE_OUTER_GAINHF (alSourcef/alGetSourcef). + /// + /// + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + /// + public float ConeOuterGainHf + { + get => Al.GetSourcef(Name, AL_CONE_OUTER_GAINHF); + set => Al.PInvoke.Sourcef(Name, AL_CONE_OUTER_GAINHF, value); + } + + /// + /// Gets/sets AL_DIRECT_FILTER_GAINHF_AUTO (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALboolean; default AL_TRUE. + /// + /// + public bool DirectFilterGainHfAuto + { + get => Al.GetSourcei(Name, AL_DIRECT_FILTER_GAINHF_AUTO) != AL_FALSE; + set => Al.PInvoke.Sourcei(Name, AL_DIRECT_FILTER_GAINHF_AUTO, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Gets/sets AL_AUXILIARY_SEND_FILTER_GAIN_AUTO (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALboolean; default AL_TRUE. + /// + /// + public bool AuxiliarySendFilterGainAuto + { + get => Al.GetSourcei(Name, AL_AUXILIARY_SEND_FILTER_GAIN_AUTO) != AL_FALSE; + set => Al.PInvoke.Sourcei(Name, AL_AUXILIARY_SEND_FILTER_GAIN_AUTO, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Gets/sets AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALboolean; default AL_TRUE. + /// + /// + public bool AuxiliarySendFilterGainHfAuto + { + get => Al.GetSourcei(Name, AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO) != AL_FALSE; + set => Al.PInvoke.Sourcei(Name, AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Gets/sets AL_SOURCE_RADIUS (alSourcef/alGetSourcef). + /// + /// + /// + /// Type ALfloat. + /// + /// + public float SourceRadius + { + get => Al.GetSourcef(Name, AL_SOURCE_RADIUS); + set => Al.PInvoke.Sourcef(Name, AL_SOURCE_RADIUS, value); + } + + /// + /// Gets/sets AL_SOURCE_DISTANCE_MODEL (alSourcei/alGetSourcei). + /// + public AlDistanceModel DistanceModel + { + get => (AlDistanceModel)Al.GetSourcei(Name, AL_SOURCE_DISTANCE_MODEL); + set => Al.PInvoke.Sourcei(Name, AL_SOURCE_DISTANCE_MODEL, (int)value); + } + + /// + /// Gets/sets AL_DIRECT_CHANNELS_SOFT (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALenum; default AL_FALSE. + /// + /// + public AlDirectChannelsMode DirectChannels + { + get => (AlDirectChannelsMode)Al.GetSourcei(Name, AL_DIRECT_CHANNELS_SOFT); + set => Al.PInvoke.Sourcei(Name, AL_DIRECT_CHANNELS_SOFT, (int)value); + } + + /// + /// Gets/sets AL_SOURCE_SPATIALIZE_SOFT (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALenum; default AL_AUTO_SOFT. + /// + /// + public AlSpatializeMode Spatialize + { + get => (AlSpatializeMode)Al.GetSourcei(Name, AL_SOURCE_SPATIALIZE_SOFT); + set => Al.PInvoke.Sourcei(Name, AL_SOURCE_SPATIALIZE_SOFT, (int)value); + } + + /// + /// Gets/sets AL_SOURCE_RESAMPLER_SOFT (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALint. + /// + /// + public int Resampler + { + get => Al.GetSourcei(Name, AL_SOURCE_RESAMPLER_SOFT); + set => Al.PInvoke.Sourcei(Name, AL_SOURCE_RESAMPLER_SOFT, value); + } + + /// + /// Gets/sets AL_STEREO_MODE_SOFT (alSourcei/alGetSourcei). + /// + /// + /// + /// Type ALenum; default AL_NORMAL_SOFT. + /// + /// + public AlStereoMode StereoMode + { + get => (AlStereoMode)Al.GetSourcei(Name, AL_STEREO_MODE_SOFT); + set => Al.PInvoke.Sourcei(Name, AL_STEREO_MODE_SOFT, (int)value); + } + + /// + /// Gets/sets AL_SUPER_STEREO_WIDTH_SOFT (alSourcef/alGetSourcef). + /// + /// + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + /// + public float SuperStereoWidth + { + get => Al.GetSourcef(Name, AL_SUPER_STEREO_WIDTH_SOFT); + set => Al.PInvoke.Sourcef(Name, AL_SUPER_STEREO_WIDTH_SOFT, value); + } + + /// + /// Gets/sets AL_STEREO_ANGLES (alSourcefv/alGetSourcefv). + /// + /// + /// + /// Type ALfloat. + /// + /// + public float2 StereoAngles + { + get => Al.GetSourcefv2(Name, AL_STEREO_ANGLES); + set => Al.SetSourcefv2(Name, AL_STEREO_ANGLES, value); + } + + /// + /// Gets AL_BYTE_LENGTH_SOFT (alGetSourcei). + /// + /// + /// + /// Type ALint. + /// + /// + public int ByteLength + { + get => Al.GetSourcei(Name, AL_BYTE_LENGTH_SOFT); + } + + /// + /// Gets AL_SAMPLE_LENGTH_SOFT (alGetSourcei). + /// + /// + /// + /// Type ALint. + /// + /// + public int SampleLength + { + get => Al.GetSourcei(Name, AL_SAMPLE_LENGTH_SOFT); + } + + /// + /// Gets AL_SEC_LENGTH_SOFT (alGetSourcef). + /// + /// + /// + /// Type ALfloat. + /// + /// + public float SecLength + { + get => Al.GetSourcef(Name, AL_SEC_LENGTH_SOFT); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/AlSource.Verbs.gen.cs b/Brutal.OpenAl/Generated/Al/AlSource.Verbs.gen.cs new file mode 100644 index 0000000..1ec02cf --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/AlSource.Verbs.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public readonly unsafe partial struct AlSource + { + /// + /// Pauses playback of the source. + /// + public void Pause() => Al.PInvoke.SourcePause(Name); + + /// + /// Starts or resumes playback of the source. + /// + public void Play() => Al.PInvoke.SourcePlay(Name); + + /// + /// Rewinds the source to the start of its buffer. + /// + public void Rewind() => Al.PInvoke.SourceRewind(Name); + + /// + /// Stops playback of the source. + /// + public void Stop() => Al.PInvoke.SourceStop(Name); + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/AutowahEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/AutowahEffect.gen.cs new file mode 100644 index 0000000..bb92881 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/AutowahEffect.gen.cs @@ -0,0 +1,100 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_AUTOWAH effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct AutowahEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public AutowahEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(AutowahEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator AutowahEffect(AlEffect effect) => + effect.Type == AlEffectType.Autowah + ? new AutowahEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Autowah."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_AUTOWAH_ATTACK_TIME. + /// + /// + /// + /// range 0.0001f to 1.0f; default 0.06f. + /// + /// + public float AttackTime + { + get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_ATTACK_TIME); + set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_ATTACK_TIME, value); + } + + /// + /// Gets/sets AL_AUTOWAH_RELEASE_TIME. + /// + /// + /// + /// range 0.0001f to 1.0f; default 0.06f. + /// + /// + public float ReleaseTime + { + get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_RELEASE_TIME); + set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_RELEASE_TIME, value); + } + + /// + /// Gets/sets AL_AUTOWAH_RESONANCE. + /// + /// + /// + /// range 2.0f to 1000.0f; default 1000.0f. + /// + /// + public float Resonance + { + get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_RESONANCE); + set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_RESONANCE, value); + } + + /// + /// Gets/sets AL_AUTOWAH_PEAK_GAIN. + /// + /// + /// + /// range 0.00003f to 31621.0f; default 11.22f. + /// + /// + public float PeakGain + { + get => Al.GetEffectf(Effect.Name, AL_AUTOWAH_PEAK_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_AUTOWAH_PEAK_GAIN, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/BandpassFilter.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/BandpassFilter.gen.cs new file mode 100644 index 0000000..14dd3bc --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/BandpassFilter.gen.cs @@ -0,0 +1,86 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_FILTER_BANDPASS filter (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct BandpassFilter + { + /// + /// The underlying filter handle. + /// + public readonly AlFilter Filter; + + /// + /// Wraps a filter handle without validating its type; prefer the checked conversion. + /// + public BandpassFilter(AlFilter filter) => Filter = filter; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlFilter(BandpassFilter filter) => filter.Filter; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The filter's type is not . + public static explicit operator BandpassFilter(AlFilter filter) => + filter.Type == AlFilterType.Bandpass + ? new BandpassFilter(filter) + : throw new InvalidCastException($"Filter {filter.Name} has type {filter.Type}, not Bandpass."); + + /// + /// Deletes the underlying filter (). + /// + public void Delete() => Filter.Delete(); + + /// + /// Gets/sets AL_BANDPASS_GAIN. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Gain + { + get => Al.GetFilterf(Filter.Name, AL_BANDPASS_GAIN); + set => Al.PInvoke.Filterf(Filter.Name, AL_BANDPASS_GAIN, value); + } + + /// + /// Gets/sets AL_BANDPASS_GAINLF. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float GainLf + { + get => Al.GetFilterf(Filter.Name, AL_BANDPASS_GAINLF); + set => Al.PInvoke.Filterf(Filter.Name, AL_BANDPASS_GAINLF, value); + } + + /// + /// Gets/sets AL_BANDPASS_GAINHF. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float GainHf + { + get => Al.GetFilterf(Filter.Name, AL_BANDPASS_GAINHF); + set => Al.PInvoke.Filterf(Filter.Name, AL_BANDPASS_GAINHF, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/ChorusEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/ChorusEffect.gen.cs new file mode 100644 index 0000000..0f183d5 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/ChorusEffect.gen.cs @@ -0,0 +1,128 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_CHORUS effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct ChorusEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public ChorusEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(ChorusEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator ChorusEffect(AlEffect effect) => + effect.Type == AlEffectType.Chorus + ? new ChorusEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Chorus."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_CHORUS_WAVEFORM. + /// + /// + /// + /// range 0 to 1; default 1. + /// + /// + public AlChorusWaveform Waveform + { + get => (AlChorusWaveform)Al.GetEffecti(Effect.Name, AL_CHORUS_WAVEFORM); + set => Al.PInvoke.Effecti(Effect.Name, AL_CHORUS_WAVEFORM, (int)value); + } + + /// + /// Gets/sets AL_CHORUS_PHASE. + /// + /// + /// + /// range -180 to 180; default 90. + /// + /// + public int Phase + { + get => Al.GetEffecti(Effect.Name, AL_CHORUS_PHASE); + set => Al.PInvoke.Effecti(Effect.Name, AL_CHORUS_PHASE, value); + } + + /// + /// Gets/sets AL_CHORUS_RATE. + /// + /// + /// + /// range 0.0f to 10.0f; default 1.1f. + /// + /// + public float Rate + { + get => Al.GetEffectf(Effect.Name, AL_CHORUS_RATE); + set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_RATE, value); + } + + /// + /// Gets/sets AL_CHORUS_DEPTH. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.1f. + /// + /// + public float Depth + { + get => Al.GetEffectf(Effect.Name, AL_CHORUS_DEPTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_DEPTH, value); + } + + /// + /// Gets/sets AL_CHORUS_FEEDBACK. + /// + /// + /// + /// range -1.0f to 1.0f; default 0.25f. + /// + /// + public float Feedback + { + get => Al.GetEffectf(Effect.Name, AL_CHORUS_FEEDBACK); + set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_FEEDBACK, value); + } + + /// + /// Gets/sets AL_CHORUS_DELAY. + /// + /// + /// + /// range 0.0f to 0.016f; default 0.016f. + /// + /// + public float Delay + { + get => Al.GetEffectf(Effect.Name, AL_CHORUS_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_CHORUS_DELAY, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/CompressorEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/CompressorEffect.gen.cs new file mode 100644 index 0000000..28b91ba --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/CompressorEffect.gen.cs @@ -0,0 +1,58 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_COMPRESSOR effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct CompressorEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public CompressorEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(CompressorEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator CompressorEffect(AlEffect effect) => + effect.Type == AlEffectType.Compressor + ? new CompressorEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Compressor."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_COMPRESSOR_ONOFF. + /// + /// + /// + /// range 0 to 1; default 1. + /// + /// + public bool Enabled + { + get => Al.GetEffecti(Effect.Name, AL_COMPRESSOR_ONOFF) != AL_FALSE; + set => Al.PInvoke.Effecti(Effect.Name, AL_COMPRESSOR_ONOFF, value ? AL_TRUE : AL_FALSE); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/DedicatedDialogueEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/DedicatedDialogueEffect.gen.cs new file mode 100644 index 0000000..39fe329 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/DedicatedDialogueEffect.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_DEDICATED_DIALOGUE effect (see ); requires ALC_EXT_EFX. Provided by ALC_EXT_DEDICATED. + /// + public unsafe readonly partial struct DedicatedDialogueEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public DedicatedDialogueEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(DedicatedDialogueEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator DedicatedDialogueEffect(AlEffect effect) => + effect.Type == AlEffectType.DedicatedDialogue + ? new DedicatedDialogueEffect(effect) + : throw new InvalidCastException( + $"Effect {effect.Name} has type {effect.Type}, not DedicatedDialogue." + ); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_DEDICATED_GAIN. + /// + public float Gain + { + get => Al.GetEffectf(Effect.Name, AL_DEDICATED_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_DEDICATED_GAIN, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/DedicatedLowFrequencyEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/DedicatedLowFrequencyEffect.gen.cs new file mode 100644 index 0000000..be4dd16 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/DedicatedLowFrequencyEffect.gen.cs @@ -0,0 +1,55 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT effect (see ); requires ALC_EXT_EFX. Provided by ALC_EXT_DEDICATED. + /// + public unsafe readonly partial struct DedicatedLowFrequencyEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public DedicatedLowFrequencyEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(DedicatedLowFrequencyEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator DedicatedLowFrequencyEffect(AlEffect effect) => + effect.Type == AlEffectType.DedicatedLowFrequencyEffect + ? new DedicatedLowFrequencyEffect(effect) + : throw new InvalidCastException( + $"Effect {effect.Name} has type {effect.Type}, not DedicatedLowFrequencyEffect." + ); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_DEDICATED_GAIN. + /// + public float Gain + { + get => Al.GetEffectf(Effect.Name, AL_DEDICATED_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_DEDICATED_GAIN, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/DistortionEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/DistortionEffect.gen.cs new file mode 100644 index 0000000..7d1f3cd --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/DistortionEffect.gen.cs @@ -0,0 +1,114 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_DISTORTION effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct DistortionEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public DistortionEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(DistortionEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator DistortionEffect(AlEffect effect) => + effect.Type == AlEffectType.Distortion + ? new DistortionEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Distortion."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_DISTORTION_EDGE. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.2f. + /// + /// + public float Edge + { + get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EDGE); + set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EDGE, value); + } + + /// + /// Gets/sets AL_DISTORTION_GAIN. + /// + /// + /// + /// range 0.01f to 1.0f; default 0.05f. + /// + /// + public float Gain + { + get => Al.GetEffectf(Effect.Name, AL_DISTORTION_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_GAIN, value); + } + + /// + /// Gets/sets AL_DISTORTION_LOWPASS_CUTOFF. + /// + /// + /// + /// range 80.0f to 24000.0f; default 8000.0f. + /// + /// + public float LowpassCutoff + { + get => Al.GetEffectf(Effect.Name, AL_DISTORTION_LOWPASS_CUTOFF); + set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_LOWPASS_CUTOFF, value); + } + + /// + /// Gets/sets AL_DISTORTION_EQCENTER. + /// + /// + /// + /// range 80.0f to 24000.0f; default 3600.0f. + /// + /// + public float EqCenter + { + get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EQCENTER); + set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EQCENTER, value); + } + + /// + /// Gets/sets AL_DISTORTION_EQBANDWIDTH. + /// + /// + /// + /// range 80.0f to 24000.0f; default 3600.0f. + /// + /// + public float EqBandwidth + { + get => Al.GetEffectf(Effect.Name, AL_DISTORTION_EQBANDWIDTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_DISTORTION_EQBANDWIDTH, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/EaxReverbEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/EaxReverbEffect.gen.cs new file mode 100644 index 0000000..62319d4 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/EaxReverbEffect.gen.cs @@ -0,0 +1,396 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_EAXREVERB effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct EaxReverbEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public EaxReverbEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(EaxReverbEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator EaxReverbEffect(AlEffect effect) => + effect.Type == AlEffectType.EaxReverb + ? new EaxReverbEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not EaxReverb."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_EAXREVERB_DENSITY. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Density + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DENSITY); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DENSITY, value); + } + + /// + /// Gets/sets AL_EAXREVERB_DIFFUSION. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Diffusion + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DIFFUSION); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DIFFUSION, value); + } + + /// + /// Gets/sets AL_EAXREVERB_GAIN. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.32f. + /// + /// + public float Gain + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAIN, value); + } + + /// + /// Gets/sets AL_EAXREVERB_GAINHF. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.89f. + /// + /// + public float GainHf + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_GAINHF); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINHF, value); + } + + /// + /// Gets/sets AL_EAXREVERB_GAINLF. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float GainLf + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_GAINLF); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINLF, value); + } + + /// + /// Gets/sets AL_EAXREVERB_DECAY_TIME. + /// + /// + /// + /// range 0.1f to 20.0f; default 1.49f. + /// + /// + public float DecayTime + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DECAY_TIME); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_TIME, value); + } + + /// + /// Gets/sets AL_EAXREVERB_DECAY_HFRATIO. + /// + /// + /// + /// range 0.1f to 2.0f; default 0.83f. + /// + /// + public float DecayHfRatio + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DECAY_HFRATIO); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_HFRATIO, value); + } + + /// + /// Gets/sets AL_EAXREVERB_DECAY_LFRATIO. + /// + /// + /// + /// range 0.1f to 2.0f; default 1.0f. + /// + /// + public float DecayLfRatio + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_DECAY_LFRATIO); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_LFRATIO, value); + } + + /// + /// Gets/sets AL_EAXREVERB_REFLECTIONS_GAIN. + /// + /// + /// + /// range 0.0f to 3.16f; default 0.05f. + /// + /// + public float ReflectionsGain + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_GAIN, value); + } + + /// + /// Gets/sets AL_EAXREVERB_REFLECTIONS_DELAY. + /// + /// + /// + /// range 0.0f to 0.3f; default 0.007f. + /// + /// + public float ReflectionsDelay + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_DELAY, value); + } + + /// + /// Gets/sets AL_EAXREVERB_REFLECTIONS_PAN (a 3-component vector). + /// + /// + /// + /// default 0.0f per axis. + /// + /// + public float3 ReflectionsPan + { + get => Al.GetEffectfv3(Effect.Name, AL_EAXREVERB_REFLECTIONS_PAN); + set => Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_REFLECTIONS_PAN, value); + } + + /// + /// Gets/sets AL_EAXREVERB_LATE_REVERB_GAIN. + /// + /// + /// + /// range 0.0f to 10.0f; default 1.26f. + /// + /// + public float LateReverbGain + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_GAIN, value); + } + + /// + /// Gets/sets AL_EAXREVERB_LATE_REVERB_DELAY. + /// + /// + /// + /// range 0.0f to 0.1f; default 0.011f. + /// + /// + public float LateReverbDelay + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_DELAY, value); + } + + /// + /// Gets/sets AL_EAXREVERB_LATE_REVERB_PAN (a 3-component vector). + /// + /// + /// + /// default 0.0f per axis. + /// + /// + public float3 LateReverbPan + { + get => Al.GetEffectfv3(Effect.Name, AL_EAXREVERB_LATE_REVERB_PAN); + set => Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_LATE_REVERB_PAN, value); + } + + /// + /// Gets/sets AL_EAXREVERB_ECHO_TIME. + /// + /// + /// + /// range 0.075f to 0.25f; default 0.25f. + /// + /// + public float EchoTime + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_ECHO_TIME); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_TIME, value); + } + + /// + /// Gets/sets AL_EAXREVERB_ECHO_DEPTH. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.0f. + /// + /// + public float EchoDepth + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_ECHO_DEPTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_DEPTH, value); + } + + /// + /// Gets/sets AL_EAXREVERB_MODULATION_TIME. + /// + /// + /// + /// range 0.04f to 4.0f; default 0.25f. + /// + /// + public float ModulationTime + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_MODULATION_TIME); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_TIME, value); + } + + /// + /// Gets/sets AL_EAXREVERB_MODULATION_DEPTH. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.0f. + /// + /// + public float ModulationDepth + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_MODULATION_DEPTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_DEPTH, value); + } + + /// + /// Gets/sets AL_EAXREVERB_AIR_ABSORPTION_GAINHF. + /// + /// + /// + /// range 0.892f to 1.0f; default 0.994f. + /// + /// + public float AirAbsorptionGainHf + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_AIR_ABSORPTION_GAINHF); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, value); + } + + /// + /// Gets/sets AL_EAXREVERB_HFREFERENCE. + /// + /// + /// + /// range 1000.0f to 20000.0f; default 5000.0f. + /// + /// + public float HfReference + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_HFREFERENCE); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_HFREFERENCE, value); + } + + /// + /// Gets/sets AL_EAXREVERB_LFREFERENCE. + /// + /// + /// + /// range 20.0f to 1000.0f; default 250.0f. + /// + /// + public float LfReference + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_LFREFERENCE); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LFREFERENCE, value); + } + + /// + /// Gets/sets AL_EAXREVERB_ROOM_ROLLOFF_FACTOR. + /// + /// + /// + /// range 0.0f to 10.0f; default 0.0f. + /// + /// + public float RoomRolloffFactor + { + get => Al.GetEffectf(Effect.Name, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR); + set => Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, value); + } + + /// + /// Gets/sets AL_EAXREVERB_DECAY_HFLIMIT. + /// + /// + /// + /// range 0 to 1; default 1. + /// + /// + public bool DecayHfLimit + { + get => Al.GetEffecti(Effect.Name, AL_EAXREVERB_DECAY_HFLIMIT) != AL_FALSE; + set => Al.PInvoke.Effecti(Effect.Name, AL_EAXREVERB_DECAY_HFLIMIT, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Sets every parameter from a full EAX reverb parameter set (e.g. a value). + /// + public void Set(in ReverbProperties properties) + { + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DENSITY, properties.Density); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DIFFUSION, properties.Diffusion); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAIN, properties.Gain); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINHF, properties.GainHf); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_GAINLF, properties.GainLf); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_TIME, properties.DecayTime); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_HFRATIO, properties.DecayHfRatio); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_DECAY_LFRATIO, properties.DecayLfRatio); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_GAIN, properties.ReflectionsGain); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_REFLECTIONS_DELAY, properties.ReflectionsDelay); + Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_REFLECTIONS_PAN, properties.ReflectionsPan); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_GAIN, properties.LateReverbGain); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LATE_REVERB_DELAY, properties.LateReverbDelay); + Al.SetEffectfv3(Effect.Name, AL_EAXREVERB_LATE_REVERB_PAN, properties.LateReverbPan); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_TIME, properties.EchoTime); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ECHO_DEPTH, properties.EchoDepth); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_TIME, properties.ModulationTime); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_MODULATION_DEPTH, properties.ModulationDepth); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, properties.AirAbsorptionGainHf); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_HFREFERENCE, properties.HfReference); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_LFREFERENCE, properties.LfReference); + Al.PInvoke.Effectf(Effect.Name, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, properties.RoomRolloffFactor); + Al.PInvoke.Effecti(Effect.Name, AL_EAXREVERB_DECAY_HFLIMIT, properties.DecayHfLimit ? AL_TRUE : AL_FALSE); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/EchoEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/EchoEffect.gen.cs new file mode 100644 index 0000000..dae9bd8 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/EchoEffect.gen.cs @@ -0,0 +1,113 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_ECHO effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct EchoEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public EchoEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(EchoEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// The effect's type is not . + public static explicit operator EchoEffect(AlEffect effect) => + effect.Type == AlEffectType.Echo + ? new EchoEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Echo."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_ECHO_DELAY. + /// + /// + /// + /// range 0.0f to 0.207f; default 0.1f. + /// + /// + public float Delay + { + get => Al.GetEffectf(Effect.Name, AL_ECHO_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_DELAY, value); + } + + /// + /// Gets/sets AL_ECHO_LRDELAY. + /// + /// + /// + /// range 0.0f to 0.404f; default 0.1f. + /// + /// + public float LrDelay + { + get => Al.GetEffectf(Effect.Name, AL_ECHO_LRDELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_LRDELAY, value); + } + + /// + /// Gets/sets AL_ECHO_DAMPING. + /// + /// + /// + /// range 0.0f to 0.99f; default 0.5f. + /// + /// + public float Damping + { + get => Al.GetEffectf(Effect.Name, AL_ECHO_DAMPING); + set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_DAMPING, value); + } + + /// + /// Gets/sets AL_ECHO_FEEDBACK. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.5f. + /// + /// + public float Feedback + { + get => Al.GetEffectf(Effect.Name, AL_ECHO_FEEDBACK); + set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_FEEDBACK, value); + } + + /// + /// Gets/sets AL_ECHO_SPREAD. + /// + /// + /// + /// range -1.0f to 1.0f; default -1.0f. + /// + /// + public float Spread + { + get => Al.GetEffectf(Effect.Name, AL_ECHO_SPREAD); + set => Al.PInvoke.Effectf(Effect.Name, AL_ECHO_SPREAD, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/Efx.Creates.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/Efx.Creates.gen.cs new file mode 100644 index 0000000..5792a72 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/Efx.Creates.gen.cs @@ -0,0 +1,131 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + public sealed unsafe partial class Efx + { + /// + /// Creates a (AL_EFFECT_REVERB). + /// + /// Creation or type assignment failed; nothing is left behind. + public ReverbEffect CreateReverb() => new ReverbEffect(CreateEffectChecked(AL_EFFECT_REVERB)); + + /// + /// Creates a (AL_EFFECT_EAXREVERB). + /// + /// Creation or type assignment failed; nothing is left behind. + public EaxReverbEffect CreateEaxReverb() => new EaxReverbEffect(CreateEffectChecked(AL_EFFECT_EAXREVERB)); + + /// + /// Creates a (AL_EFFECT_CHORUS). + /// + /// Creation or type assignment failed; nothing is left behind. + public ChorusEffect CreateChorus() => new ChorusEffect(CreateEffectChecked(AL_EFFECT_CHORUS)); + + /// + /// Creates a (AL_EFFECT_DISTORTION). + /// + /// Creation or type assignment failed; nothing is left behind. + public DistortionEffect CreateDistortion() => new DistortionEffect(CreateEffectChecked(AL_EFFECT_DISTORTION)); + + /// + /// Creates a (AL_EFFECT_ECHO). + /// + /// Creation or type assignment failed; nothing is left behind. + public EchoEffect CreateEcho() => new EchoEffect(CreateEffectChecked(AL_EFFECT_ECHO)); + + /// + /// Creates a (AL_EFFECT_FLANGER). + /// + /// Creation or type assignment failed; nothing is left behind. + public FlangerEffect CreateFlanger() => new FlangerEffect(CreateEffectChecked(AL_EFFECT_FLANGER)); + + /// + /// Creates a (AL_EFFECT_FREQUENCY_SHIFTER). + /// + /// Creation or type assignment failed; nothing is left behind. + public FrequencyShifterEffect CreateFrequencyShifter() => + new FrequencyShifterEffect(CreateEffectChecked(AL_EFFECT_FREQUENCY_SHIFTER)); + + /// + /// Creates a (AL_EFFECT_VOCAL_MORPHER). + /// + /// Creation or type assignment failed; nothing is left behind. + public VocalMorpherEffect CreateVocalMorpher() => + new VocalMorpherEffect(CreateEffectChecked(AL_EFFECT_VOCAL_MORPHER)); + + /// + /// Creates a (AL_EFFECT_PITCH_SHIFTER). + /// + /// Creation or type assignment failed; nothing is left behind. + public PitchShifterEffect CreatePitchShifter() => + new PitchShifterEffect(CreateEffectChecked(AL_EFFECT_PITCH_SHIFTER)); + + /// + /// Creates a (AL_EFFECT_RING_MODULATOR). + /// + /// Creation or type assignment failed; nothing is left behind. + public RingModulatorEffect CreateRingModulator() => + new RingModulatorEffect(CreateEffectChecked(AL_EFFECT_RING_MODULATOR)); + + /// + /// Creates a (AL_EFFECT_AUTOWAH). + /// + /// Creation or type assignment failed; nothing is left behind. + public AutowahEffect CreateAutowah() => new AutowahEffect(CreateEffectChecked(AL_EFFECT_AUTOWAH)); + + /// + /// Creates a (AL_EFFECT_COMPRESSOR). + /// + /// Creation or type assignment failed; nothing is left behind. + public CompressorEffect CreateCompressor() => new CompressorEffect(CreateEffectChecked(AL_EFFECT_COMPRESSOR)); + + /// + /// Creates a (AL_EFFECT_EQUALIZER). + /// + /// Creation or type assignment failed; nothing is left behind. + public EqualizerEffect CreateEqualizer() => new EqualizerEffect(CreateEffectChecked(AL_EFFECT_EQUALIZER)); + + /// + /// Creates a (AL_FILTER_LOWPASS). + /// + /// Creation or type assignment failed; nothing is left behind. + public LowpassFilter CreateLowpass() => new LowpassFilter(CreateFilterChecked(AL_FILTER_LOWPASS)); + + /// + /// Creates a (AL_FILTER_HIGHPASS). + /// + /// Creation or type assignment failed; nothing is left behind. + public HighpassFilter CreateHighpass() => new HighpassFilter(CreateFilterChecked(AL_FILTER_HIGHPASS)); + + /// + /// Creates a (AL_FILTER_BANDPASS). + /// + /// Creation or type assignment failed; nothing is left behind. + public BandpassFilter CreateBandpass() => new BandpassFilter(CreateFilterChecked(AL_FILTER_BANDPASS)); + + /// + /// Creates a (AL_EFFECT_DEDICATED_DIALOGUE). + /// + /// Creation or type assignment failed; nothing is left behind. + public DedicatedDialogueEffect CreateDedicatedDialogue() => + new DedicatedDialogueEffect(CreateEffectChecked(AL_EFFECT_DEDICATED_DIALOGUE)); + + /// + /// Creates a (AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT). + /// + /// Creation or type assignment failed; nothing is left behind. + public DedicatedLowFrequencyEffect CreateDedicatedLowFrequencyEffect() => + new DedicatedLowFrequencyEffect(CreateEffectChecked(AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)); + + /// + /// Creates an (alGenAuxiliaryEffectSlots). + /// + /// Creation failed; nothing is left behind. + public AlAuxiliaryEffectSlot CreateAuxiliaryEffectSlot() => CreateSlotChecked(); + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/Efx.ObjectNames.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/Efx.ObjectNames.gen.cs new file mode 100644 index 0000000..059bf2b --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/Efx.ObjectNames.gen.cs @@ -0,0 +1,167 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public sealed unsafe partial class Efx + { + /// + /// Generates auxiliary effect slots (alGenAuxiliaryEffectSlots), filling . + /// + /// The span to fill; its length determines how many auxiliary effect + /// slots are generated. + public void GenAuxiliaryEffectSlots(Span auxiliaryEffectSlots) + { + Device.ThrowIfDisposed(); + if (auxiliaryEffectSlots.IsEmpty) + return; + var names = auxiliaryEffectSlots.Cast(); + fixed (uint* p = names) + Al.PInvoke.GenAuxiliaryEffectSlots(names.Length, p); + } + + /// + /// Generates auxiliary effect slots (alGenAuxiliaryEffectSlots). Allocates the returned array; use the Span overload to bring your own storage. + /// + /// How many auxiliary effect slots to generate; a non-positive count returns an + /// empty array. + public AlAuxiliaryEffectSlot[] GenAuxiliaryEffectSlots(int count) + { + Device.ThrowIfDisposed(); + if (count <= 0) + return []; + var auxiliaryEffectSlots = new AlAuxiliaryEffectSlot[count]; + GenAuxiliaryEffectSlots(auxiliaryEffectSlots.AsSpan()); + return auxiliaryEffectSlots; + } + + /// + /// Generates a single auxiliary effect slot. + /// + public AlAuxiliaryEffectSlot GenAuxiliaryEffectSlot() + { + Span auxiliaryEffectSlot = stackalloc AlAuxiliaryEffectSlot[1]; + GenAuxiliaryEffectSlots(auxiliaryEffectSlot); + return auxiliaryEffectSlot[0]; + } + + /// + /// Deletes the given auxiliary effect slots (alDeleteAuxiliaryEffectSlots). Each slot's effect must be detached first. + /// + /// The auxiliary effect slots to delete. + public void DeleteAuxiliaryEffectSlots(ReadOnlySpan auxiliaryEffectSlots) + { + Device.ThrowIfDisposed(); + if (auxiliaryEffectSlots.IsEmpty) + return; + var names = auxiliaryEffectSlots.Cast(); + fixed (uint* p = names) + Al.PInvoke.DeleteAuxiliaryEffectSlots(names.Length, p); + } + + /// + /// Generates untyped effects (alGenEffects), filling . + /// + /// The span to fill; its length determines how many effects are generated. + public void GenEffects(Span effects) + { + Device.ThrowIfDisposed(); + if (effects.IsEmpty) + return; + var names = effects.Cast(); + fixed (uint* p = names) + Al.PInvoke.GenEffects(names.Length, p); + } + + /// + /// Generates untyped effects (alGenEffects). Allocates the returned array; use the Span overload to bring your own storage. + /// + /// How many effects to generate; a non-positive count returns an empty array. + public AlEffect[] GenEffects(int count) + { + Device.ThrowIfDisposed(); + if (count <= 0) + return []; + var effects = new AlEffect[count]; + GenEffects(effects.AsSpan()); + return effects; + } + + /// + /// Generates a single untyped effect. + /// + public AlEffect GenEffect() + { + Span effect = stackalloc AlEffect[1]; + GenEffects(effect); + return effect[0]; + } + + /// + /// Deletes the given effects (alDeleteEffects). Each must not be attached to a slot. + /// + /// The effects to delete. + public void DeleteEffects(ReadOnlySpan effects) + { + Device.ThrowIfDisposed(); + if (effects.IsEmpty) + return; + var names = effects.Cast(); + fixed (uint* p = names) + Al.PInvoke.DeleteEffects(names.Length, p); + } + + /// + /// Generates untyped filters (alGenFilters), filling . + /// + /// The span to fill; its length determines how many filters are generated. + public void GenFilters(Span filters) + { + Device.ThrowIfDisposed(); + if (filters.IsEmpty) + return; + var names = filters.Cast(); + fixed (uint* p = names) + Al.PInvoke.GenFilters(names.Length, p); + } + + /// + /// Generates untyped filters (alGenFilters). Allocates the returned array; use the Span overload to bring your own storage. + /// + /// How many filters to generate; a non-positive count returns an empty array. + public AlFilter[] GenFilters(int count) + { + Device.ThrowIfDisposed(); + if (count <= 0) + return []; + var filters = new AlFilter[count]; + GenFilters(filters.AsSpan()); + return filters; + } + + /// + /// Generates a single untyped filter. + /// + public AlFilter GenFilter() + { + Span filter = stackalloc AlFilter[1]; + GenFilters(filter); + return filter[0]; + } + + /// + /// Deletes the given filters (alDeleteFilters). Each must not be attached to a source or send. + /// + /// The filters to delete. + public void DeleteFilters(ReadOnlySpan filters) + { + Device.ThrowIfDisposed(); + if (filters.IsEmpty) + return; + var names = filters.Cast(); + fixed (uint* p = names) + Al.PInvoke.DeleteFilters(names.Length, p); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/EfxParams.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/EfxParams.gen.cs new file mode 100644 index 0000000..0b6f293 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/EfxParams.gen.cs @@ -0,0 +1,287 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi.Params +{ + /// + /// Keyed EFX effect parameter access (alEffectf/alEffecti/alEffectfv) as extension members on , for generic or data-driven code. Typical code uses the typed wrappers ( and friends) instead. + /// + public static class EffectParams + { + extension(AlEffect effect) + { + /// + /// Sets a float-valued AL_EFFECT_REVERB parameter (alEffectf). + /// + public void Set(AlReverbf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_REVERB parameter (alGetEffectf). + /// + public float Get(AlReverbf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_REVERB parameter (alEffecti). + /// + public void Set(AlReverbi param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_REVERB parameter (alGetEffecti). + /// + public int Get(AlReverbi param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_EAXREVERB parameter (alEffectf). + /// + public void Set(AlEaxReverbf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_EAXREVERB parameter (alGetEffectf). + /// + public float Get(AlEaxReverbf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_EAXREVERB parameter (alEffecti). + /// + public void Set(AlEaxReverbi param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_EAXREVERB parameter (alGetEffecti). + /// + public int Get(AlEaxReverbi param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a -valued AL_EFFECT_EAXREVERB parameter (alEffectfv). + /// + public void Set(AlEaxReverb3f param, float3 value) => Al.SetEffectfv3(effect.Name, (int)param, value); + + /// + /// Gets a -valued AL_EFFECT_EAXREVERB parameter (alGetEffectfv). + /// + public float3 Get(AlEaxReverb3f param) => Al.GetEffectfv3(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_CHORUS parameter (alEffectf). + /// + public void Set(AlChorusf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_CHORUS parameter (alGetEffectf). + /// + public float Get(AlChorusf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_CHORUS parameter (alEffecti). + /// + public void Set(AlChorusi param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_CHORUS parameter (alGetEffecti). + /// + public int Get(AlChorusi param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_DISTORTION parameter (alEffectf). + /// + public void Set(AlDistortionf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_DISTORTION parameter (alGetEffectf). + /// + public float Get(AlDistortionf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_ECHO parameter (alEffectf). + /// + public void Set(AlEchof param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_ECHO parameter (alGetEffectf). + /// + public float Get(AlEchof param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_FLANGER parameter (alEffectf). + /// + public void Set(AlFlangerf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_FLANGER parameter (alGetEffectf). + /// + public float Get(AlFlangerf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_FLANGER parameter (alEffecti). + /// + public void Set(AlFlangeri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_FLANGER parameter (alGetEffecti). + /// + public int Get(AlFlangeri param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_FREQUENCY_SHIFTER parameter (alEffectf). + /// + public void Set(AlFrequencyShifterf param, float value) => + Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_FREQUENCY_SHIFTER parameter (alGetEffectf). + /// + public float Get(AlFrequencyShifterf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_FREQUENCY_SHIFTER parameter (alEffecti). + /// + public void Set(AlFrequencyShifteri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_FREQUENCY_SHIFTER parameter (alGetEffecti). + /// + public int Get(AlFrequencyShifteri param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_VOCAL_MORPHER parameter (alEffectf). + /// + public void Set(AlVocalMorpherf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_VOCAL_MORPHER parameter (alGetEffectf). + /// + public float Get(AlVocalMorpherf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_VOCAL_MORPHER parameter (alEffecti). + /// + public void Set(AlVocalMorpheri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_VOCAL_MORPHER parameter (alGetEffecti). + /// + public int Get(AlVocalMorpheri param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_PITCH_SHIFTER parameter (alEffecti). + /// + public void Set(AlPitchShifteri param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_PITCH_SHIFTER parameter (alGetEffecti). + /// + public int Get(AlPitchShifteri param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_RING_MODULATOR parameter (alEffectf). + /// + public void Set(AlRingModulatorf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_RING_MODULATOR parameter (alGetEffectf). + /// + public float Get(AlRingModulatorf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_RING_MODULATOR parameter (alEffecti). + /// + public void Set(AlRingModulatori param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_RING_MODULATOR parameter (alGetEffecti). + /// + public int Get(AlRingModulatori param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_AUTOWAH parameter (alEffectf). + /// + public void Set(AlAutowahf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_AUTOWAH parameter (alGetEffectf). + /// + public float Get(AlAutowahf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets an integer-valued AL_EFFECT_COMPRESSOR parameter (alEffecti). + /// + public void Set(AlCompressori param, int value) => Al.PInvoke.Effecti(effect.Name, (int)param, value); + + /// + /// Gets an integer-valued AL_EFFECT_COMPRESSOR parameter (alGetEffecti). + /// + public int Get(AlCompressori param) => Al.GetEffecti(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_EQUALIZER parameter (alEffectf). + /// + public void Set(AlEqualizerf param, float value) => Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_EQUALIZER parameter (alGetEffectf). + /// + public float Get(AlEqualizerf param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_DEDICATED_DIALOGUE parameter (alEffectf). + /// + public void Set(AlDedicatedDialoguef param, float value) => + Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_DEDICATED_DIALOGUE parameter (alGetEffectf). + /// + public float Get(AlDedicatedDialoguef param) => Al.GetEffectf(effect.Name, (int)param); + + /// + /// Sets a float-valued AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT parameter (alEffectf). + /// + public void Set(AlDedicatedLowFrequencyEffectf param, float value) => + Al.PInvoke.Effectf(effect.Name, (int)param, value); + + /// + /// Gets a float-valued AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT parameter (alGetEffectf). + /// + public float Get(AlDedicatedLowFrequencyEffectf param) => Al.GetEffectf(effect.Name, (int)param); + } + } + + /// + /// Keyed EFX filter parameter access (alFilterf/alFilteri) as extension members on , for generic or data-driven code. Typical code uses the typed wrappers ( and friends) instead. + /// + public static class FilterParams + { + extension(AlFilter filter) + { + /// + /// Sets a float-valued AL_FILTER_LOWPASS parameter (alFilterf). + /// + public void Set(AlLowpassf param, float value) => Al.PInvoke.Filterf(filter.Name, (int)param, value); + + /// + /// Gets a float-valued AL_FILTER_LOWPASS parameter (alGetFilterf). + /// + public float Get(AlLowpassf param) => Al.GetFilterf(filter.Name, (int)param); + + /// + /// Sets a float-valued AL_FILTER_HIGHPASS parameter (alFilterf). + /// + public void Set(AlHighpassf param, float value) => Al.PInvoke.Filterf(filter.Name, (int)param, value); + + /// + /// Gets a float-valued AL_FILTER_HIGHPASS parameter (alGetFilterf). + /// + public float Get(AlHighpassf param) => Al.GetFilterf(filter.Name, (int)param); + + /// + /// Sets a float-valued AL_FILTER_BANDPASS parameter (alFilterf). + /// + public void Set(AlBandpassf param, float value) => Al.PInvoke.Filterf(filter.Name, (int)param, value); + + /// + /// Gets a float-valued AL_FILTER_BANDPASS parameter (alGetFilterf). + /// + public float Get(AlBandpassf param) => Al.GetFilterf(filter.Name, (int)param); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/EqualizerEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/EqualizerEffect.gen.cs new file mode 100644 index 0000000..66aece4 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/EqualizerEffect.gen.cs @@ -0,0 +1,184 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_EQUALIZER effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct EqualizerEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public EqualizerEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(EqualizerEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator EqualizerEffect(AlEffect effect) => + effect.Type == AlEffectType.Equalizer + ? new EqualizerEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Equalizer."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_EQUALIZER_LOW_GAIN. + /// + /// + /// + /// range 0.126f to 7.943f; default 1.0f. + /// + /// + public float LowGain + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_LOW_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_LOW_GAIN, value); + } + + /// + /// Gets/sets AL_EQUALIZER_LOW_CUTOFF. + /// + /// + /// + /// range 50.0f to 800.0f; default 200.0f. + /// + /// + public float LowCutoff + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_LOW_CUTOFF); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_LOW_CUTOFF, value); + } + + /// + /// Gets/sets AL_EQUALIZER_MID1_GAIN. + /// + /// + /// + /// range 0.126f to 7.943f; default 1.0f. + /// + /// + public float Mid1Gain + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID1_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID1_GAIN, value); + } + + /// + /// Gets/sets AL_EQUALIZER_MID1_CENTER. + /// + /// + /// + /// range 200.0f to 3000.0f; default 500.0f. + /// + /// + public float Mid1Center + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID1_CENTER); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID1_CENTER, value); + } + + /// + /// Gets/sets AL_EQUALIZER_MID1_WIDTH. + /// + /// + /// + /// range 0.01f to 1.0f; default 1.0f. + /// + /// + public float Mid1Width + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID1_WIDTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID1_WIDTH, value); + } + + /// + /// Gets/sets AL_EQUALIZER_MID2_GAIN. + /// + /// + /// + /// range 0.126f to 7.943f; default 1.0f. + /// + /// + public float Mid2Gain + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID2_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID2_GAIN, value); + } + + /// + /// Gets/sets AL_EQUALIZER_MID2_CENTER. + /// + /// + /// + /// range 1000.0f to 8000.0f; default 3000.0f. + /// + /// + public float Mid2Center + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID2_CENTER); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID2_CENTER, value); + } + + /// + /// Gets/sets AL_EQUALIZER_MID2_WIDTH. + /// + /// + /// + /// range 0.01f to 1.0f; default 1.0f. + /// + /// + public float Mid2Width + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_MID2_WIDTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_MID2_WIDTH, value); + } + + /// + /// Gets/sets AL_EQUALIZER_HIGH_GAIN. + /// + /// + /// + /// range 0.126f to 7.943f; default 1.0f. + /// + /// + public float HighGain + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_HIGH_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_HIGH_GAIN, value); + } + + /// + /// Gets/sets AL_EQUALIZER_HIGH_CUTOFF. + /// + /// + /// + /// range 4000.0f to 16000.0f; default 6000.0f. + /// + /// + public float HighCutoff + { + get => Al.GetEffectf(Effect.Name, AL_EQUALIZER_HIGH_CUTOFF); + set => Al.PInvoke.Effectf(Effect.Name, AL_EQUALIZER_HIGH_CUTOFF, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/FlangerEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/FlangerEffect.gen.cs new file mode 100644 index 0000000..ccde9ba --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/FlangerEffect.gen.cs @@ -0,0 +1,128 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_FLANGER effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct FlangerEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public FlangerEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(FlangerEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator FlangerEffect(AlEffect effect) => + effect.Type == AlEffectType.Flanger + ? new FlangerEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Flanger."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_FLANGER_WAVEFORM. + /// + /// + /// + /// range 0 to 1; default 1. + /// + /// + public AlFlangerWaveform Waveform + { + get => (AlFlangerWaveform)Al.GetEffecti(Effect.Name, AL_FLANGER_WAVEFORM); + set => Al.PInvoke.Effecti(Effect.Name, AL_FLANGER_WAVEFORM, (int)value); + } + + /// + /// Gets/sets AL_FLANGER_PHASE. + /// + /// + /// + /// range -180 to 180; default 0. + /// + /// + public int Phase + { + get => Al.GetEffecti(Effect.Name, AL_FLANGER_PHASE); + set => Al.PInvoke.Effecti(Effect.Name, AL_FLANGER_PHASE, value); + } + + /// + /// Gets/sets AL_FLANGER_RATE. + /// + /// + /// + /// range 0.0f to 10.0f; default 0.27f. + /// + /// + public float Rate + { + get => Al.GetEffectf(Effect.Name, AL_FLANGER_RATE); + set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_RATE, value); + } + + /// + /// Gets/sets AL_FLANGER_DEPTH. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Depth + { + get => Al.GetEffectf(Effect.Name, AL_FLANGER_DEPTH); + set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_DEPTH, value); + } + + /// + /// Gets/sets AL_FLANGER_FEEDBACK. + /// + /// + /// + /// range -1.0f to 1.0f; default -0.5f. + /// + /// + public float Feedback + { + get => Al.GetEffectf(Effect.Name, AL_FLANGER_FEEDBACK); + set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_FEEDBACK, value); + } + + /// + /// Gets/sets AL_FLANGER_DELAY. + /// + /// + /// + /// range 0.0f to 0.004f; default 0.002f. + /// + /// + public float Delay + { + get => Al.GetEffectf(Effect.Name, AL_FLANGER_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_FLANGER_DELAY, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/FrequencyShifterEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/FrequencyShifterEffect.gen.cs new file mode 100644 index 0000000..d329ad1 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/FrequencyShifterEffect.gen.cs @@ -0,0 +1,86 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_FREQUENCY_SHIFTER effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct FrequencyShifterEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public FrequencyShifterEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(FrequencyShifterEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator FrequencyShifterEffect(AlEffect effect) => + effect.Type == AlEffectType.FrequencyShifter + ? new FrequencyShifterEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not FrequencyShifter."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_FREQUENCY_SHIFTER_FREQUENCY. + /// + /// + /// + /// range 0.0f to 24000.0f; default 0.0f. + /// + /// + public float Frequency + { + get => Al.GetEffectf(Effect.Name, AL_FREQUENCY_SHIFTER_FREQUENCY); + set => Al.PInvoke.Effectf(Effect.Name, AL_FREQUENCY_SHIFTER_FREQUENCY, value); + } + + /// + /// Gets/sets AL_FREQUENCY_SHIFTER_LEFT_DIRECTION. + /// + /// + /// + /// range 0 to 2; default 0. + /// + /// + public AlFrequencyShifterDirection LeftDirection + { + get => (AlFrequencyShifterDirection)Al.GetEffecti(Effect.Name, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION); + set => Al.PInvoke.Effecti(Effect.Name, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, (int)value); + } + + /// + /// Gets/sets AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION. + /// + /// + /// + /// range 0 to 2; default 0. + /// + /// + public AlFrequencyShifterDirection RightDirection + { + get => (AlFrequencyShifterDirection)Al.GetEffecti(Effect.Name, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION); + set => Al.PInvoke.Effecti(Effect.Name, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, (int)value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/HighpassFilter.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/HighpassFilter.gen.cs new file mode 100644 index 0000000..cd9e23e --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/HighpassFilter.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_FILTER_HIGHPASS filter (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct HighpassFilter + { + /// + /// The underlying filter handle. + /// + public readonly AlFilter Filter; + + /// + /// Wraps a filter handle without validating its type; prefer the checked conversion. + /// + public HighpassFilter(AlFilter filter) => Filter = filter; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlFilter(HighpassFilter filter) => filter.Filter; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The filter's type is not . + public static explicit operator HighpassFilter(AlFilter filter) => + filter.Type == AlFilterType.Highpass + ? new HighpassFilter(filter) + : throw new InvalidCastException($"Filter {filter.Name} has type {filter.Type}, not Highpass."); + + /// + /// Deletes the underlying filter (). + /// + public void Delete() => Filter.Delete(); + + /// + /// Gets/sets AL_HIGHPASS_GAIN. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Gain + { + get => Al.GetFilterf(Filter.Name, AL_HIGHPASS_GAIN); + set => Al.PInvoke.Filterf(Filter.Name, AL_HIGHPASS_GAIN, value); + } + + /// + /// Gets/sets AL_HIGHPASS_GAINLF. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float GainLf + { + get => Al.GetFilterf(Filter.Name, AL_HIGHPASS_GAINLF); + set => Al.PInvoke.Filterf(Filter.Name, AL_HIGHPASS_GAINLF, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/LowpassFilter.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/LowpassFilter.gen.cs new file mode 100644 index 0000000..bbcc92a --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/LowpassFilter.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_FILTER_LOWPASS filter (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct LowpassFilter + { + /// + /// The underlying filter handle. + /// + public readonly AlFilter Filter; + + /// + /// Wraps a filter handle without validating its type; prefer the checked conversion. + /// + public LowpassFilter(AlFilter filter) => Filter = filter; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlFilter(LowpassFilter filter) => filter.Filter; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The filter's type is not . + public static explicit operator LowpassFilter(AlFilter filter) => + filter.Type == AlFilterType.Lowpass + ? new LowpassFilter(filter) + : throw new InvalidCastException($"Filter {filter.Name} has type {filter.Type}, not Lowpass."); + + /// + /// Deletes the underlying filter (). + /// + public void Delete() => Filter.Delete(); + + /// + /// Gets/sets AL_LOWPASS_GAIN. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Gain + { + get => Al.GetFilterf(Filter.Name, AL_LOWPASS_GAIN); + set => Al.PInvoke.Filterf(Filter.Name, AL_LOWPASS_GAIN, value); + } + + /// + /// Gets/sets AL_LOWPASS_GAINHF. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float GainHf + { + get => Al.GetFilterf(Filter.Name, AL_LOWPASS_GAINHF); + set => Al.PInvoke.Filterf(Filter.Name, AL_LOWPASS_GAINHF, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/PitchShifterEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/PitchShifterEffect.gen.cs new file mode 100644 index 0000000..a5d0519 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/PitchShifterEffect.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_PITCH_SHIFTER effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct PitchShifterEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public PitchShifterEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(PitchShifterEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator PitchShifterEffect(AlEffect effect) => + effect.Type == AlEffectType.PitchShifter + ? new PitchShifterEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not PitchShifter."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_PITCH_SHIFTER_COARSE_TUNE. + /// + /// + /// + /// range -12 to 12; default 12. + /// + /// + public int CoarseTune + { + get => Al.GetEffecti(Effect.Name, AL_PITCH_SHIFTER_COARSE_TUNE); + set => Al.PInvoke.Effecti(Effect.Name, AL_PITCH_SHIFTER_COARSE_TUNE, value); + } + + /// + /// Gets/sets AL_PITCH_SHIFTER_FINE_TUNE. + /// + /// + /// + /// range -50 to 50; default 0. + /// + /// + public int FineTune + { + get => Al.GetEffecti(Effect.Name, AL_PITCH_SHIFTER_FINE_TUNE); + set => Al.PInvoke.Effecti(Effect.Name, AL_PITCH_SHIFTER_FINE_TUNE, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/ReverbEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/ReverbEffect.gen.cs new file mode 100644 index 0000000..f347bfd --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/ReverbEffect.gen.cs @@ -0,0 +1,246 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_REVERB effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct ReverbEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public ReverbEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(ReverbEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator ReverbEffect(AlEffect effect) => + effect.Type == AlEffectType.Reverb + ? new ReverbEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not Reverb."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_REVERB_DENSITY. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Density + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_DENSITY); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DENSITY, value); + } + + /// + /// Gets/sets AL_REVERB_DIFFUSION. + /// + /// + /// + /// range 0.0f to 1.0f; default 1.0f. + /// + /// + public float Diffusion + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_DIFFUSION); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DIFFUSION, value); + } + + /// + /// Gets/sets AL_REVERB_GAIN. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.32f. + /// + /// + public float Gain + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAIN, value); + } + + /// + /// Gets/sets AL_REVERB_GAINHF. + /// + /// + /// + /// range 0.0f to 1.0f; default 0.89f. + /// + /// + public float GainHf + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_GAINHF); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAINHF, value); + } + + /// + /// Gets/sets AL_REVERB_DECAY_TIME. + /// + /// + /// + /// range 0.1f to 20.0f; default 1.49f. + /// + /// + public float DecayTime + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_DECAY_TIME); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_TIME, value); + } + + /// + /// Gets/sets AL_REVERB_DECAY_HFRATIO. + /// + /// + /// + /// range 0.1f to 2.0f; default 0.83f. + /// + /// + public float DecayHfRatio + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_DECAY_HFRATIO); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_HFRATIO, value); + } + + /// + /// Gets/sets AL_REVERB_REFLECTIONS_GAIN. + /// + /// + /// + /// range 0.0f to 3.16f; default 0.05f. + /// + /// + public float ReflectionsGain + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_REFLECTIONS_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_GAIN, value); + } + + /// + /// Gets/sets AL_REVERB_REFLECTIONS_DELAY. + /// + /// + /// + /// range 0.0f to 0.3f; default 0.007f. + /// + /// + public float ReflectionsDelay + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_REFLECTIONS_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_DELAY, value); + } + + /// + /// Gets/sets AL_REVERB_LATE_REVERB_GAIN. + /// + /// + /// + /// range 0.0f to 10.0f; default 1.26f. + /// + /// + public float LateReverbGain + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_LATE_REVERB_GAIN); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_GAIN, value); + } + + /// + /// Gets/sets AL_REVERB_LATE_REVERB_DELAY. + /// + /// + /// + /// range 0.0f to 0.1f; default 0.011f. + /// + /// + public float LateReverbDelay + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_LATE_REVERB_DELAY); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_DELAY, value); + } + + /// + /// Gets/sets AL_REVERB_AIR_ABSORPTION_GAINHF. + /// + /// + /// + /// range 0.892f to 1.0f; default 0.994f. + /// + /// + public float AirAbsorptionGainHf + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_AIR_ABSORPTION_GAINHF); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_AIR_ABSORPTION_GAINHF, value); + } + + /// + /// Gets/sets AL_REVERB_ROOM_ROLLOFF_FACTOR. + /// + /// + /// + /// range 0.0f to 10.0f; default 0.0f. + /// + /// + public float RoomRolloffFactor + { + get => Al.GetEffectf(Effect.Name, AL_REVERB_ROOM_ROLLOFF_FACTOR); + set => Al.PInvoke.Effectf(Effect.Name, AL_REVERB_ROOM_ROLLOFF_FACTOR, value); + } + + /// + /// Gets/sets AL_REVERB_DECAY_HFLIMIT. + /// + /// + /// + /// range 0 to 1; default 1. + /// + /// + public bool DecayHfLimit + { + get => Al.GetEffecti(Effect.Name, AL_REVERB_DECAY_HFLIMIT) != AL_FALSE; + set => Al.PInvoke.Effecti(Effect.Name, AL_REVERB_DECAY_HFLIMIT, value ? AL_TRUE : AL_FALSE); + } + + /// + /// Sets the standard-reverb subset of a full EAX reverb parameter set (e.g. a value); the EAX-only fields (pans, LF, echo, modulation) are ignored. + /// + public void Set(in ReverbProperties properties) + { + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DENSITY, properties.Density); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DIFFUSION, properties.Diffusion); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAIN, properties.Gain); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_GAINHF, properties.GainHf); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_TIME, properties.DecayTime); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_DECAY_HFRATIO, properties.DecayHfRatio); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_GAIN, properties.ReflectionsGain); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_REFLECTIONS_DELAY, properties.ReflectionsDelay); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_GAIN, properties.LateReverbGain); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_LATE_REVERB_DELAY, properties.LateReverbDelay); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_AIR_ABSORPTION_GAINHF, properties.AirAbsorptionGainHf); + Al.PInvoke.Effectf(Effect.Name, AL_REVERB_ROOM_ROLLOFF_FACTOR, properties.RoomRolloffFactor); + Al.PInvoke.Effecti(Effect.Name, AL_REVERB_DECAY_HFLIMIT, properties.DecayHfLimit ? AL_TRUE : AL_FALSE); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/ReverbPreset.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/ReverbPreset.gen.cs new file mode 100644 index 0000000..c16e18c --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/ReverbPreset.gen.cs @@ -0,0 +1,3403 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// The stock EFX reverb presets (EFX_REVERB_PRESET_* from efx-presets.h), as ready-to-apply values. + /// + public static class ReverbPreset + { + public static ReverbProperties Generic + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.8913f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.0500f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Paddedcell + { + get => + new ReverbProperties + { + Density = 0.1715f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0010f, + GainLf = 1.0000f, + DecayTime = 0.1700f, + DecayHfRatio = 0.1000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2500f, + ReflectionsDelay = 0.0010f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2691f, + LateReverbDelay = 0.0020f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Room + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.5929f, + GainLf = 1.0000f, + DecayTime = 0.4000f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.1503f, + ReflectionsDelay = 0.0020f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.0629f, + LateReverbDelay = 0.0030f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Bathroom + { + get => + new ReverbProperties + { + Density = 0.1715f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.2512f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.5400f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.6531f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 3.2734f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Livingroom + { + get => + new ReverbProperties + { + Density = 0.9766f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0010f, + GainLf = 1.0000f, + DecayTime = 0.5000f, + DecayHfRatio = 0.1000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2051f, + ReflectionsDelay = 0.0030f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.2805f, + LateReverbDelay = 0.0040f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Stoneroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 1.0000f, + DecayTime = 2.3100f, + DecayHfRatio = 0.6400f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.4411f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1003f, + LateReverbDelay = 0.0170f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Auditorium + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.5781f, + GainLf = 1.0000f, + DecayTime = 4.3200f, + DecayHfRatio = 0.5900f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.4032f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7170f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Concerthall + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 1.0000f, + DecayTime = 3.9200f, + DecayHfRatio = 0.7000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2427f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.9977f, + LateReverbDelay = 0.0290f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Cave + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 1.0000f, + GainLf = 1.0000f, + DecayTime = 2.9100f, + DecayHfRatio = 1.3000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.5000f, + ReflectionsDelay = 0.0150f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7063f, + LateReverbDelay = 0.0220f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties Arena + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.4477f, + GainLf = 1.0000f, + DecayTime = 7.2400f, + DecayHfRatio = 0.3300f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2612f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.0186f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Hangar + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.3162f, + GainLf = 1.0000f, + DecayTime = 10.0500f, + DecayHfRatio = 0.2300f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.5000f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2560f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Carpetedhallway + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0100f, + GainLf = 1.0000f, + DecayTime = 0.3000f, + DecayHfRatio = 0.1000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.1215f, + ReflectionsDelay = 0.0020f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1531f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Hallway + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.5900f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2458f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.6615f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Stonecorridor + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.7612f, + GainLf = 1.0000f, + DecayTime = 2.7000f, + DecayHfRatio = 0.7900f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2472f, + ReflectionsDelay = 0.0130f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.5758f, + LateReverbDelay = 0.0200f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Alley + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.3000f, + Gain = 0.3162f, + GainHf = 0.7328f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.8600f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2500f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.9954f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1250f, + EchoDepth = 0.9500f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Forest + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.3000f, + Gain = 0.3162f, + GainHf = 0.0224f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.5400f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.0525f, + ReflectionsDelay = 0.1620f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7682f, + LateReverbDelay = 0.0880f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1250f, + EchoDepth = 1.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties City + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.5000f, + Gain = 0.3162f, + GainHf = 0.3981f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.6700f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.0730f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1427f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Mountains + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.2700f, + Gain = 0.3162f, + GainHf = 0.0562f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.2100f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.0407f, + ReflectionsDelay = 0.3000f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1919f, + LateReverbDelay = 0.1000f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 1.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties Quarry + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.3162f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.0000f, + ReflectionsDelay = 0.0610f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.7783f, + LateReverbDelay = 0.0250f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1250f, + EchoDepth = 0.7000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Plain + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.2100f, + Gain = 0.3162f, + GainHf = 0.1000f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.5000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.0585f, + ReflectionsDelay = 0.1790f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1089f, + LateReverbDelay = 0.1000f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 1.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Parkinglot + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 1.0000f, + GainLf = 1.0000f, + DecayTime = 1.6500f, + DecayHfRatio = 1.5000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.2082f, + ReflectionsDelay = 0.0080f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.2652f, + LateReverbDelay = 0.0120f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties Sewerpipe + { + get => + new ReverbProperties + { + Density = 0.3071f, + Diffusion = 0.8000f, + Gain = 0.3162f, + GainHf = 0.3162f, + GainLf = 1.0000f, + DecayTime = 2.8100f, + DecayHfRatio = 0.1400f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 1.6387f, + ReflectionsDelay = 0.0140f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 3.2471f, + LateReverbDelay = 0.0210f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Underwater + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0100f, + GainLf = 1.0000f, + DecayTime = 1.4900f, + DecayHfRatio = 0.1000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.5963f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 7.0795f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 1.1800f, + ModulationDepth = 0.3480f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Drugged + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.5000f, + Gain = 0.3162f, + GainHf = 1.0000f, + GainLf = 1.0000f, + DecayTime = 8.3900f, + DecayHfRatio = 1.3900f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.8760f, + ReflectionsDelay = 0.0020f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 3.1081f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 1.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties Dizzy + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.6000f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 1.0000f, + DecayTime = 17.2300f, + DecayHfRatio = 0.5600f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.1392f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.4937f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 1.0000f, + ModulationTime = 0.8100f, + ModulationDepth = 0.3100f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties Psychotic + { + get => + new ReverbProperties + { + Density = 0.0625f, + Diffusion = 0.5000f, + Gain = 0.3162f, + GainHf = 0.8404f, + GainLf = 1.0000f, + DecayTime = 7.5600f, + DecayHfRatio = 0.9100f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 0.4864f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 2.4378f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 4.0000f, + ModulationDepth = 1.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties CastleSmallroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8900f, + Gain = 0.3162f, + GainHf = 0.3981f, + GainLf = 0.1000f, + DecayTime = 1.2200f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 0.3100f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0220f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.9953f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1380f, + EchoDepth = 0.0800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleShortpassage + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8900f, + Gain = 0.3162f, + GainHf = 0.3162f, + GainLf = 0.1000f, + DecayTime = 2.3200f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 0.3100f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0230f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1380f, + EchoDepth = 0.0800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleMediumroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.9300f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.1000f, + DecayTime = 2.0400f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 0.4600f, + ReflectionsGain = 0.6310f, + ReflectionsDelay = 0.0220f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.5849f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1550f, + EchoDepth = 0.0300f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleLargeroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.1259f, + DecayTime = 2.5300f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 0.5000f, + ReflectionsGain = 0.4467f, + ReflectionsDelay = 0.0340f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0160f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1850f, + EchoDepth = 0.0700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleLongpassage + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8900f, + Gain = 0.3162f, + GainHf = 0.3981f, + GainLf = 0.1000f, + DecayTime = 3.4200f, + DecayHfRatio = 0.8300f, + DecayLfRatio = 0.3100f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0230f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1380f, + EchoDepth = 0.0800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleHall + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8100f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.1778f, + DecayTime = 3.1400f, + DecayHfRatio = 0.7900f, + DecayLfRatio = 0.6200f, + ReflectionsGain = 0.1778f, + ReflectionsDelay = 0.0560f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0240f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleCupboard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8900f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.1000f, + DecayTime = 0.6700f, + DecayHfRatio = 0.8700f, + DecayLfRatio = 0.3100f, + ReflectionsGain = 1.4125f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 3.5481f, + LateReverbDelay = 0.0070f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1380f, + EchoDepth = 0.0800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CastleCourtyard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.4200f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.1995f, + DecayTime = 2.1300f, + DecayHfRatio = 0.6100f, + DecayLfRatio = 0.2300f, + ReflectionsGain = 0.2239f, + ReflectionsDelay = 0.1600f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7079f, + LateReverbDelay = 0.0360f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.3700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties CastleAlcove + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8900f, + Gain = 0.3162f, + GainHf = 0.5012f, + GainLf = 0.1000f, + DecayTime = 1.6400f, + DecayHfRatio = 0.8700f, + DecayLfRatio = 0.3100f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0340f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1380f, + EchoDepth = 0.0800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5168.6001f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactorySmallroom + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.7943f, + GainLf = 0.5012f, + DecayTime = 1.7200f, + DecayHfRatio = 0.6500f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 0.7079f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.7783f, + LateReverbDelay = 0.0240f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1190f, + EchoDepth = 0.0700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryShortpassage + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.6400f, + Gain = 0.2512f, + GainHf = 0.7943f, + GainLf = 0.5012f, + DecayTime = 2.5300f, + DecayHfRatio = 0.6500f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0380f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1350f, + EchoDepth = 0.2300f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryMediumroom + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.8200f, + Gain = 0.2512f, + GainHf = 0.7943f, + GainLf = 0.5012f, + DecayTime = 2.7600f, + DecayHfRatio = 0.6500f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 0.2818f, + ReflectionsDelay = 0.0220f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0230f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1740f, + EchoDepth = 0.0700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryLargeroom + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.7500f, + Gain = 0.2512f, + GainHf = 0.7079f, + GainLf = 0.6310f, + DecayTime = 4.2400f, + DecayHfRatio = 0.5100f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 0.1778f, + ReflectionsDelay = 0.0390f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0230f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2310f, + EchoDepth = 0.0700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryLongpassage + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.6400f, + Gain = 0.2512f, + GainHf = 0.7943f, + GainLf = 0.5012f, + DecayTime = 4.0600f, + DecayHfRatio = 0.6500f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0370f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1350f, + EchoDepth = 0.2300f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryHall + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.7500f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.6310f, + DecayTime = 7.4300f, + DecayHfRatio = 0.5100f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 0.0631f, + ReflectionsDelay = 0.0730f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0270f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryCupboard + { + get => + new ReverbProperties + { + Density = 0.3071f, + Diffusion = 0.6300f, + Gain = 0.2512f, + GainHf = 0.7943f, + GainLf = 0.5012f, + DecayTime = 0.4900f, + DecayHfRatio = 0.6500f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 1.2589f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.9953f, + LateReverbDelay = 0.0320f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1070f, + EchoDepth = 0.0700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryCourtyard + { + get => + new ReverbProperties + { + Density = 0.3071f, + Diffusion = 0.5700f, + Gain = 0.3162f, + GainHf = 0.3162f, + GainLf = 0.6310f, + DecayTime = 2.3200f, + DecayHfRatio = 0.2900f, + DecayLfRatio = 0.5600f, + ReflectionsGain = 0.2239f, + ReflectionsDelay = 0.1400f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.3981f, + LateReverbDelay = 0.0390f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.2900f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties FactoryAlcove + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.5900f, + Gain = 0.2512f, + GainHf = 0.7943f, + GainLf = 0.5012f, + DecayTime = 3.1400f, + DecayHfRatio = 0.6500f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 1.4125f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.0000f, + LateReverbDelay = 0.0380f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1140f, + EchoDepth = 0.1000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3762.6001f, + LfReference = 362.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceSmallroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8400f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.2818f, + DecayTime = 1.5100f, + DecayHfRatio = 1.5300f, + DecayLfRatio = 0.2700f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1640f, + EchoDepth = 0.1400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceShortpassage + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7500f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.2818f, + DecayTime = 1.7900f, + DecayHfRatio = 1.4600f, + DecayLfRatio = 0.2800f, + ReflectionsGain = 0.5012f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0190f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1770f, + EchoDepth = 0.0900f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceMediumroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8700f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.4467f, + DecayTime = 2.2200f, + DecayHfRatio = 1.5300f, + DecayLfRatio = 0.3200f, + ReflectionsGain = 0.3981f, + ReflectionsDelay = 0.0390f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0270f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1860f, + EchoDepth = 0.1200f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceLargeroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8100f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.4467f, + DecayTime = 3.1400f, + DecayHfRatio = 1.5300f, + DecayLfRatio = 0.3200f, + ReflectionsGain = 0.2512f, + ReflectionsDelay = 0.0390f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.0000f, + LateReverbDelay = 0.0270f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2140f, + EchoDepth = 0.1100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceLongpassage + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7700f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.3981f, + DecayTime = 3.0100f, + DecayHfRatio = 1.4600f, + DecayLfRatio = 0.2800f, + ReflectionsGain = 0.7943f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0250f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1860f, + EchoDepth = 0.0400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceHall + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7600f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.5623f, + DecayTime = 5.4900f, + DecayHfRatio = 1.5300f, + DecayLfRatio = 0.3800f, + ReflectionsGain = 0.1122f, + ReflectionsDelay = 0.0540f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.6310f, + LateReverbDelay = 0.0520f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2260f, + EchoDepth = 0.1100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceCupboard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8300f, + Gain = 0.3162f, + GainHf = 0.5012f, + GainLf = 0.2239f, + DecayTime = 0.7600f, + DecayHfRatio = 1.5300f, + DecayLfRatio = 0.2600f, + ReflectionsGain = 1.1220f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.9953f, + LateReverbDelay = 0.0160f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1430f, + EchoDepth = 0.0800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceCourtyard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.5900f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.3162f, + DecayTime = 2.0400f, + DecayHfRatio = 1.2000f, + DecayLfRatio = 0.3800f, + ReflectionsGain = 0.3162f, + ReflectionsDelay = 0.1730f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.3162f, + LateReverbDelay = 0.0430f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2350f, + EchoDepth = 0.4800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties IcepalaceAlcove + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8400f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.2818f, + DecayTime = 2.7600f, + DecayHfRatio = 1.4600f, + DecayLfRatio = 0.2800f, + ReflectionsGain = 1.1220f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1610f, + EchoDepth = 0.0900f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 12428.5000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationSmallroom + { + get => + new ReverbProperties + { + Density = 0.2109f, + Diffusion = 0.7000f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.8913f, + DecayTime = 1.7200f, + DecayHfRatio = 0.8200f, + DecayLfRatio = 0.5500f, + ReflectionsGain = 0.7943f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0130f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1880f, + EchoDepth = 0.2600f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationShortpassage + { + get => + new ReverbProperties + { + Density = 0.2109f, + Diffusion = 0.8700f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.8913f, + DecayTime = 3.5700f, + DecayHfRatio = 0.5000f, + DecayLfRatio = 0.5500f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0160f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1720f, + EchoDepth = 0.2000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationMediumroom + { + get => + new ReverbProperties + { + Density = 0.2109f, + Diffusion = 0.7500f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.8913f, + DecayTime = 3.0100f, + DecayHfRatio = 0.5000f, + DecayLfRatio = 0.5500f, + ReflectionsGain = 0.3981f, + ReflectionsDelay = 0.0340f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0350f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2090f, + EchoDepth = 0.3100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationLargeroom + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.8100f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.8913f, + DecayTime = 3.8900f, + DecayHfRatio = 0.3800f, + DecayLfRatio = 0.6100f, + ReflectionsGain = 0.3162f, + ReflectionsDelay = 0.0560f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0350f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2330f, + EchoDepth = 0.2800f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationLongpassage + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.8913f, + DecayTime = 4.6200f, + DecayHfRatio = 0.6200f, + DecayLfRatio = 0.5500f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0310f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.2300f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationHall + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.8700f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.8913f, + DecayTime = 7.1100f, + DecayHfRatio = 0.3800f, + DecayLfRatio = 0.6100f, + ReflectionsGain = 0.1778f, + ReflectionsDelay = 0.1000f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.6310f, + LateReverbDelay = 0.0470f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.2500f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationCupboard + { + get => + new ReverbProperties + { + Density = 0.1715f, + Diffusion = 0.5600f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.8913f, + DecayTime = 0.7900f, + DecayHfRatio = 0.8100f, + DecayLfRatio = 0.5500f, + ReflectionsGain = 1.4125f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.7783f, + LateReverbDelay = 0.0180f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1810f, + EchoDepth = 0.3100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SpacestationAlcove + { + get => + new ReverbProperties + { + Density = 0.2109f, + Diffusion = 0.7800f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.8913f, + DecayTime = 1.1600f, + DecayHfRatio = 0.8100f, + DecayLfRatio = 0.5500f, + ReflectionsGain = 1.4125f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.0000f, + LateReverbDelay = 0.0180f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1920f, + EchoDepth = 0.2100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 3316.1001f, + LfReference = 458.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenSmallroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1122f, + GainLf = 0.3162f, + DecayTime = 0.7900f, + DecayHfRatio = 0.3200f, + DecayLfRatio = 0.8700f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0320f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0290f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenShortpassage + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1259f, + GainLf = 0.3162f, + DecayTime = 1.7500f, + DecayHfRatio = 0.5000f, + DecayLfRatio = 0.8700f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.6310f, + LateReverbDelay = 0.0240f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenMediumroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1000f, + GainLf = 0.2818f, + DecayTime = 1.4700f, + DecayHfRatio = 0.4200f, + DecayLfRatio = 0.8200f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0490f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0290f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenLargeroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0891f, + GainLf = 0.2818f, + DecayTime = 2.6500f, + DecayHfRatio = 0.3300f, + DecayLfRatio = 0.8200f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0660f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7943f, + LateReverbDelay = 0.0490f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenLongpassage + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1000f, + GainLf = 0.3162f, + DecayTime = 1.9900f, + DecayHfRatio = 0.4000f, + DecayLfRatio = 0.7900f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.4467f, + LateReverbDelay = 0.0360f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenHall + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0794f, + GainLf = 0.2818f, + DecayTime = 3.4500f, + DecayHfRatio = 0.3000f, + DecayLfRatio = 0.8200f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0880f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7943f, + LateReverbDelay = 0.0630f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenCupboard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1413f, + GainLf = 0.3162f, + DecayTime = 0.5600f, + DecayHfRatio = 0.4600f, + DecayLfRatio = 0.9100f, + ReflectionsGain = 1.1220f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0280f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenCourtyard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.6500f, + Gain = 0.3162f, + GainHf = 0.0794f, + GainLf = 0.3162f, + DecayTime = 1.7900f, + DecayHfRatio = 0.3500f, + DecayLfRatio = 0.7900f, + ReflectionsGain = 0.5623f, + ReflectionsDelay = 0.1230f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1000f, + LateReverbDelay = 0.0320f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties WoodenAlcove + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1259f, + GainLf = 0.3162f, + DecayTime = 1.2200f, + DecayHfRatio = 0.6200f, + DecayLfRatio = 0.9100f, + ReflectionsGain = 1.1220f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7079f, + LateReverbDelay = 0.0240f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4705.0000f, + LfReference = 99.6000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SportEmptystadium + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.7943f, + DecayTime = 6.2600f, + DecayHfRatio = 0.5100f, + DecayLfRatio = 1.1000f, + ReflectionsGain = 0.0631f, + ReflectionsDelay = 0.1830f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.3981f, + LateReverbDelay = 0.0380f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SportSquashcourt + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7500f, + Gain = 0.3162f, + GainHf = 0.3162f, + GainLf = 0.7943f, + DecayTime = 2.2200f, + DecayHfRatio = 0.9100f, + DecayLfRatio = 1.1600f, + ReflectionsGain = 0.4467f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7943f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1260f, + EchoDepth = 0.1900f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 7176.8999f, + LfReference = 211.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SportSmallswimmingpool + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7000f, + Gain = 0.3162f, + GainHf = 0.7943f, + GainLf = 0.8913f, + DecayTime = 2.7600f, + DecayHfRatio = 1.2500f, + DecayLfRatio = 1.1400f, + ReflectionsGain = 0.6310f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7943f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1790f, + EchoDepth = 0.1500f, + ModulationTime = 0.8950f, + ModulationDepth = 0.1900f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties SportLargeswimmingpool + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.7943f, + GainLf = 1.0000f, + DecayTime = 5.4900f, + DecayHfRatio = 1.3100f, + DecayLfRatio = 1.1400f, + ReflectionsGain = 0.4467f, + ReflectionsDelay = 0.0390f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.5012f, + LateReverbDelay = 0.0490f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2220f, + EchoDepth = 0.5500f, + ModulationTime = 1.1590f, + ModulationDepth = 0.2100f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties SportGymnasium + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8100f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.8913f, + DecayTime = 3.1400f, + DecayHfRatio = 1.0600f, + DecayLfRatio = 1.3500f, + ReflectionsGain = 0.3981f, + ReflectionsDelay = 0.0290f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.5623f, + LateReverbDelay = 0.0450f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1460f, + EchoDepth = 0.1400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 7176.8999f, + LfReference = 211.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SportFullstadium + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0708f, + GainLf = 0.7943f, + DecayTime = 5.2500f, + DecayHfRatio = 0.1700f, + DecayLfRatio = 0.8000f, + ReflectionsGain = 0.1000f, + ReflectionsDelay = 0.1880f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.2818f, + LateReverbDelay = 0.0380f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties SportStadiumtannoy + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7800f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.5012f, + DecayTime = 2.5300f, + DecayHfRatio = 0.8800f, + DecayLfRatio = 0.6800f, + ReflectionsGain = 0.2818f, + ReflectionsDelay = 0.2300f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.5012f, + LateReverbDelay = 0.0630f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.2000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties PrefabWorkshop + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1413f, + GainLf = 0.3981f, + DecayTime = 0.7600f, + DecayHfRatio = 1.0000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0120f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties PrefabSchoolroom + { + get => + new ReverbProperties + { + Density = 0.4022f, + Diffusion = 0.6900f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.5012f, + DecayTime = 0.9800f, + DecayHfRatio = 0.4500f, + DecayLfRatio = 0.1800f, + ReflectionsGain = 1.4125f, + ReflectionsDelay = 0.0170f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0150f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.0950f, + EchoDepth = 0.1400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 7176.8999f, + LfReference = 211.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties PrefabPractiseroom + { + get => + new ReverbProperties + { + Density = 0.4022f, + Diffusion = 0.8700f, + Gain = 0.3162f, + GainHf = 0.3981f, + GainLf = 0.5012f, + DecayTime = 1.1200f, + DecayHfRatio = 0.5600f, + DecayLfRatio = 0.1800f, + ReflectionsGain = 1.2589f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0110f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.0950f, + EchoDepth = 0.1400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 7176.8999f, + LfReference = 211.2000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties PrefabOuthouse + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.1122f, + GainLf = 0.1585f, + DecayTime = 1.3800f, + DecayHfRatio = 0.3800f, + DecayLfRatio = 0.3500f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0240f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.6310f, + LateReverbDelay = 0.0440f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1210f, + EchoDepth = 0.1700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 107.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties PrefabCaravan + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.0891f, + GainLf = 0.1259f, + DecayTime = 0.4300f, + DecayHfRatio = 1.5000f, + DecayLfRatio = 1.0000f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0120f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.9953f, + LateReverbDelay = 0.0120f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties DomeTomb + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7900f, + Gain = 0.3162f, + GainHf = 0.3548f, + GainLf = 0.2239f, + DecayTime = 4.1800f, + DecayHfRatio = 0.2100f, + DecayLfRatio = 0.1000f, + ReflectionsGain = 0.3868f, + ReflectionsDelay = 0.0300f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.6788f, + LateReverbDelay = 0.0220f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1770f, + EchoDepth = 0.1900f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 20.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties PipeSmall + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.3548f, + GainLf = 0.2239f, + DecayTime = 5.0400f, + DecayHfRatio = 0.1000f, + DecayLfRatio = 0.1000f, + ReflectionsGain = 0.5012f, + ReflectionsDelay = 0.0320f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 2.5119f, + LateReverbDelay = 0.0150f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 20.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties DomeSaintpauls + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8700f, + Gain = 0.3162f, + GainHf = 0.3548f, + GainLf = 0.2239f, + DecayTime = 10.4800f, + DecayHfRatio = 0.1900f, + DecayLfRatio = 0.1000f, + ReflectionsGain = 0.1778f, + ReflectionsDelay = 0.0900f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0420f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.1200f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 20.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties PipeLongthin + { + get => + new ReverbProperties + { + Density = 0.2560f, + Diffusion = 0.9100f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.2818f, + DecayTime = 9.2100f, + DecayHfRatio = 0.1800f, + DecayLfRatio = 0.1000f, + ReflectionsGain = 0.7079f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7079f, + LateReverbDelay = 0.0220f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 20.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties PipeLarge + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.3548f, + GainLf = 0.2239f, + DecayTime = 8.4500f, + DecayHfRatio = 0.1000f, + DecayLfRatio = 0.1000f, + ReflectionsGain = 0.3981f, + ReflectionsDelay = 0.0460f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.5849f, + LateReverbDelay = 0.0320f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 20.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties PipeResonant + { + get => + new ReverbProperties + { + Density = 0.1373f, + Diffusion = 0.9100f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.2818f, + DecayTime = 6.8100f, + DecayHfRatio = 0.1800f, + DecayLfRatio = 0.1000f, + ReflectionsGain = 0.7079f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.0000f, + LateReverbDelay = 0.0220f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 20.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties OutdoorsBackyard + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.4500f, + Gain = 0.3162f, + GainHf = 0.2512f, + GainLf = 0.5012f, + DecayTime = 1.1200f, + DecayHfRatio = 0.3400f, + DecayLfRatio = 0.4600f, + ReflectionsGain = 0.4467f, + ReflectionsDelay = 0.0690f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.7079f, + LateReverbDelay = 0.0230f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2180f, + EchoDepth = 0.3400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4399.1001f, + LfReference = 242.9000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties OutdoorsRollingplains + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.0000f, + Gain = 0.3162f, + GainHf = 0.0112f, + GainLf = 0.6310f, + DecayTime = 2.1300f, + DecayHfRatio = 0.2100f, + DecayLfRatio = 0.4600f, + ReflectionsGain = 0.1778f, + ReflectionsDelay = 0.3000f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.4467f, + LateReverbDelay = 0.0190f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 1.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4399.1001f, + LfReference = 242.9000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties OutdoorsDeepcanyon + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7400f, + Gain = 0.3162f, + GainHf = 0.1778f, + GainLf = 0.6310f, + DecayTime = 3.8900f, + DecayHfRatio = 0.2100f, + DecayLfRatio = 0.4600f, + ReflectionsGain = 0.3162f, + ReflectionsDelay = 0.2230f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.3548f, + LateReverbDelay = 0.0190f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 1.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4399.1001f, + LfReference = 242.9000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties OutdoorsCreek + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.3500f, + Gain = 0.3162f, + GainHf = 0.1778f, + GainLf = 0.5012f, + DecayTime = 2.1300f, + DecayHfRatio = 0.2100f, + DecayLfRatio = 0.4600f, + ReflectionsGain = 0.3981f, + ReflectionsDelay = 0.1150f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.1995f, + LateReverbDelay = 0.0310f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2180f, + EchoDepth = 0.3400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 4399.1001f, + LfReference = 242.9000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties OutdoorsValley + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.2800f, + Gain = 0.3162f, + GainHf = 0.0282f, + GainLf = 0.1585f, + DecayTime = 2.8800f, + DecayHfRatio = 0.2600f, + DecayLfRatio = 0.3500f, + ReflectionsGain = 0.1413f, + ReflectionsDelay = 0.2630f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.3981f, + LateReverbDelay = 0.1000f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.3400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 107.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties MoodHeaven + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.9400f, + Gain = 0.3162f, + GainHf = 0.7943f, + GainLf = 0.4467f, + DecayTime = 5.0400f, + DecayHfRatio = 1.1200f, + DecayLfRatio = 0.5600f, + ReflectionsGain = 0.2427f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0290f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0800f, + ModulationTime = 2.7420f, + ModulationDepth = 0.0500f, + AirAbsorptionGainHf = 0.9977f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties MoodHell + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.5700f, + Gain = 0.3162f, + GainHf = 0.3548f, + GainLf = 0.4467f, + DecayTime = 3.5700f, + DecayHfRatio = 0.4900f, + DecayLfRatio = 2.0000f, + ReflectionsGain = 0.0000f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1100f, + EchoDepth = 0.0400f, + ModulationTime = 2.1090f, + ModulationDepth = 0.5200f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 139.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties MoodMemory + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8500f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 0.3548f, + DecayTime = 4.0600f, + DecayHfRatio = 0.8200f, + DecayLfRatio = 0.5600f, + ReflectionsGain = 0.0398f, + ReflectionsDelay = 0.0000f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.1220f, + LateReverbDelay = 0.0000f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.4740f, + ModulationDepth = 0.4500f, + AirAbsorptionGainHf = 0.9886f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties DrivingCommentator + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.0000f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 0.5012f, + DecayTime = 2.4200f, + DecayHfRatio = 0.8800f, + DecayLfRatio = 0.6800f, + ReflectionsGain = 0.1995f, + ReflectionsDelay = 0.0930f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.2512f, + LateReverbDelay = 0.0170f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 1.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9886f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties DrivingPitgarage + { + get => + new ReverbProperties + { + Density = 0.4287f, + Diffusion = 0.5900f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.5623f, + DecayTime = 1.7200f, + DecayHfRatio = 0.9300f, + DecayLfRatio = 0.8700f, + ReflectionsGain = 0.5623f, + ReflectionsDelay = 0.0000f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0160f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.1100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties DrivingIncarRacer + { + get => + new ReverbProperties + { + Density = 0.0832f, + Diffusion = 0.8000f, + Gain = 0.3162f, + GainHf = 1.0000f, + GainLf = 0.7943f, + DecayTime = 0.1700f, + DecayHfRatio = 2.0000f, + DecayLfRatio = 0.4100f, + ReflectionsGain = 1.7783f, + ReflectionsDelay = 0.0070f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7079f, + LateReverbDelay = 0.0150f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 10268.2002f, + LfReference = 251.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties DrivingIncarSports + { + get => + new ReverbProperties + { + Density = 0.0832f, + Diffusion = 0.8000f, + Gain = 0.3162f, + GainHf = 0.6310f, + GainLf = 1.0000f, + DecayTime = 0.1700f, + DecayHfRatio = 0.7500f, + DecayLfRatio = 0.4100f, + ReflectionsGain = 1.0000f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.5623f, + LateReverbDelay = 0.0000f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 10268.2002f, + LfReference = 251.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties DrivingIncarLuxury + { + get => + new ReverbProperties + { + Density = 0.2560f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.1000f, + GainLf = 0.5012f, + DecayTime = 0.1300f, + DecayHfRatio = 0.4100f, + DecayLfRatio = 0.4600f, + ReflectionsGain = 0.7943f, + ReflectionsDelay = 0.0100f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.5849f, + LateReverbDelay = 0.0100f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 10268.2002f, + LfReference = 251.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties DrivingFullgrandstand + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.6310f, + DecayTime = 3.0100f, + DecayHfRatio = 1.3700f, + DecayLfRatio = 1.2800f, + ReflectionsGain = 0.3548f, + ReflectionsDelay = 0.0900f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1778f, + LateReverbDelay = 0.0490f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 10420.2002f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties DrivingEmptygrandstand + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 1.0000f, + Gain = 0.3162f, + GainHf = 1.0000f, + GainLf = 0.7943f, + DecayTime = 4.6200f, + DecayHfRatio = 1.7500f, + DecayLfRatio = 1.4000f, + ReflectionsGain = 0.2082f, + ReflectionsDelay = 0.0900f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.2512f, + LateReverbDelay = 0.0490f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 10420.2002f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties DrivingTunnel + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8100f, + Gain = 0.3162f, + GainHf = 0.3981f, + GainLf = 0.8913f, + DecayTime = 3.4200f, + DecayHfRatio = 0.9400f, + DecayLfRatio = 1.3100f, + ReflectionsGain = 0.7079f, + ReflectionsDelay = 0.0510f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7079f, + LateReverbDelay = 0.0470f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2140f, + EchoDepth = 0.0500f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 155.3000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CityStreets + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7800f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.8913f, + DecayTime = 1.7900f, + DecayHfRatio = 1.1200f, + DecayLfRatio = 0.9100f, + ReflectionsGain = 0.2818f, + ReflectionsDelay = 0.0460f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.1995f, + LateReverbDelay = 0.0280f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.2000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CitySubway + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7400f, + Gain = 0.3162f, + GainHf = 0.7079f, + GainLf = 0.8913f, + DecayTime = 3.0100f, + DecayHfRatio = 1.2300f, + DecayLfRatio = 0.9100f, + ReflectionsGain = 0.7079f, + ReflectionsDelay = 0.0460f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0280f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1250f, + EchoDepth = 0.2100f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CityMuseum + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.1778f, + GainLf = 0.1778f, + DecayTime = 3.2800f, + DecayHfRatio = 1.4000f, + DecayLfRatio = 0.5700f, + ReflectionsGain = 0.2512f, + ReflectionsDelay = 0.0390f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0340f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1300f, + EchoDepth = 0.1700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 107.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties CityLibrary + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.2818f, + GainLf = 0.0891f, + DecayTime = 2.7600f, + DecayHfRatio = 0.8900f, + DecayLfRatio = 0.4100f, + ReflectionsGain = 0.3548f, + ReflectionsDelay = 0.0290f, + ReflectionsPan = new float3(0.0000f, 0.0000f, -0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0200f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1300f, + EchoDepth = 0.1700f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 2854.3999f, + LfReference = 107.5000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + public static ReverbProperties CityUnderpass + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8200f, + Gain = 0.3162f, + GainHf = 0.4467f, + GainLf = 0.8913f, + DecayTime = 3.5700f, + DecayHfRatio = 1.1200f, + DecayLfRatio = 0.9100f, + ReflectionsGain = 0.3981f, + ReflectionsDelay = 0.0590f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.8913f, + LateReverbDelay = 0.0370f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.1400f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9920f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties CityAbandoned + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.6900f, + Gain = 0.3162f, + GainHf = 0.7943f, + GainLf = 0.8913f, + DecayTime = 3.2800f, + DecayHfRatio = 1.1700f, + DecayLfRatio = 0.9100f, + ReflectionsGain = 0.4467f, + ReflectionsDelay = 0.0440f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.2818f, + LateReverbDelay = 0.0240f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.2000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9966f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Dustyroom + { + get => + new ReverbProperties + { + Density = 0.3645f, + Diffusion = 0.5600f, + Gain = 0.3162f, + GainHf = 0.7943f, + GainLf = 0.7079f, + DecayTime = 1.7900f, + DecayHfRatio = 0.3800f, + DecayLfRatio = 0.2100f, + ReflectionsGain = 0.5012f, + ReflectionsDelay = 0.0020f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.2589f, + LateReverbDelay = 0.0060f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2020f, + EchoDepth = 0.0500f, + ModulationTime = 0.2500f, + ModulationDepth = 0.0000f, + AirAbsorptionGainHf = 0.9886f, + HfReference = 13046.0000f, + LfReference = 163.3000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Chapel + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.8400f, + Gain = 0.3162f, + GainHf = 0.5623f, + GainLf = 1.0000f, + DecayTime = 4.6200f, + DecayHfRatio = 0.6400f, + DecayLfRatio = 1.2300f, + ReflectionsGain = 0.4467f, + ReflectionsDelay = 0.0320f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 0.7943f, + LateReverbDelay = 0.0490f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.2500f, + EchoDepth = 0.0000f, + ModulationTime = 0.2500f, + ModulationDepth = 0.1100f, + AirAbsorptionGainHf = 0.9943f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = true, + }; + } + public static ReverbProperties Smallwaterroom + { + get => + new ReverbProperties + { + Density = 1.0000f, + Diffusion = 0.7000f, + Gain = 0.3162f, + GainHf = 0.4477f, + GainLf = 1.0000f, + DecayTime = 1.5100f, + DecayHfRatio = 1.2500f, + DecayLfRatio = 1.1400f, + ReflectionsGain = 0.8913f, + ReflectionsDelay = 0.0200f, + ReflectionsPan = new float3(0.0000f, 0.0000f, 0.0000f), + LateReverbGain = 1.4125f, + LateReverbDelay = 0.0300f, + LateReverbPan = new float3(0.0000f, 0.0000f, 0.0000f), + EchoTime = 0.1790f, + EchoDepth = 0.1500f, + ModulationTime = 0.8950f, + ModulationDepth = 0.1900f, + AirAbsorptionGainHf = 0.9920f, + HfReference = 5000.0000f, + LfReference = 250.0000f, + RoomRolloffFactor = 0.0000f, + DecayHfLimit = false, + }; + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/ReverbProperties.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/ReverbProperties.gen.cs new file mode 100644 index 0000000..a8f93c9 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/ReverbProperties.gen.cs @@ -0,0 +1,127 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + /// + /// A full EAX reverb parameter set as plain data (mirrors EFXEAXREVERBPROPERTIES from efx-presets.h); see for the stock presets. + /// + public struct ReverbProperties + { + /// + /// The AL_EAXREVERB_DENSITY value. Range 0.0f to 1.0f; default 1.0f. + /// + public float Density; + + /// + /// The AL_EAXREVERB_DIFFUSION value. Range 0.0f to 1.0f; default 1.0f. + /// + public float Diffusion; + + /// + /// The AL_EAXREVERB_GAIN value. Range 0.0f to 1.0f; default 0.32f. + /// + public float Gain; + + /// + /// The AL_EAXREVERB_GAINHF value. Range 0.0f to 1.0f; default 0.89f. + /// + public float GainHf; + + /// + /// The AL_EAXREVERB_GAINLF value. Range 0.0f to 1.0f; default 1.0f. + /// + public float GainLf; + + /// + /// The AL_EAXREVERB_DECAY_TIME value. Range 0.1f to 20.0f; default 1.49f. + /// + public float DecayTime; + + /// + /// The AL_EAXREVERB_DECAY_HFRATIO value. Range 0.1f to 2.0f; default 0.83f. + /// + public float DecayHfRatio; + + /// + /// The AL_EAXREVERB_DECAY_LFRATIO value. Range 0.1f to 2.0f; default 1.0f. + /// + public float DecayLfRatio; + + /// + /// The AL_EAXREVERB_REFLECTIONS_GAIN value. Range 0.0f to 3.16f; default 0.05f. + /// + public float ReflectionsGain; + + /// + /// The AL_EAXREVERB_REFLECTIONS_DELAY value. Range 0.0f to 0.3f; default 0.007f. + /// + public float ReflectionsDelay; + + /// + /// The AL_EAXREVERB_REFLECTIONS_PAN vector (default 0.0f per axis). + /// + public float3 ReflectionsPan; + + /// + /// The AL_EAXREVERB_LATE_REVERB_GAIN value. Range 0.0f to 10.0f; default 1.26f. + /// + public float LateReverbGain; + + /// + /// The AL_EAXREVERB_LATE_REVERB_DELAY value. Range 0.0f to 0.1f; default 0.011f. + /// + public float LateReverbDelay; + + /// + /// The AL_EAXREVERB_LATE_REVERB_PAN vector (default 0.0f per axis). + /// + public float3 LateReverbPan; + + /// + /// The AL_EAXREVERB_ECHO_TIME value. Range 0.075f to 0.25f; default 0.25f. + /// + public float EchoTime; + + /// + /// The AL_EAXREVERB_ECHO_DEPTH value. Range 0.0f to 1.0f; default 0.0f. + /// + public float EchoDepth; + + /// + /// The AL_EAXREVERB_MODULATION_TIME value. Range 0.04f to 4.0f; default 0.25f. + /// + public float ModulationTime; + + /// + /// The AL_EAXREVERB_MODULATION_DEPTH value. Range 0.0f to 1.0f; default 0.0f. + /// + public float ModulationDepth; + + /// + /// The AL_EAXREVERB_AIR_ABSORPTION_GAINHF value. Range 0.892f to 1.0f; default 0.994f. + /// + public float AirAbsorptionGainHf; + + /// + /// The AL_EAXREVERB_HFREFERENCE value. Range 1000.0f to 20000.0f; default 5000.0f. + /// + public float HfReference; + + /// + /// The AL_EAXREVERB_LFREFERENCE value. Range 20.0f to 1000.0f; default 250.0f. + /// + public float LfReference; + + /// + /// The AL_EAXREVERB_ROOM_ROLLOFF_FACTOR value. Range 0.0f to 10.0f; default 0.0f. + /// + public float RoomRolloffFactor; + + /// + /// The AL_EAXREVERB_DECAY_HFLIMIT value. Range 0 to 1; default 1. + /// + public bool DecayHfLimit; + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/RingModulatorEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/RingModulatorEffect.gen.cs new file mode 100644 index 0000000..b93759b --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/RingModulatorEffect.gen.cs @@ -0,0 +1,86 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_RING_MODULATOR effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct RingModulatorEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public RingModulatorEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(RingModulatorEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator RingModulatorEffect(AlEffect effect) => + effect.Type == AlEffectType.RingModulator + ? new RingModulatorEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not RingModulator."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_RING_MODULATOR_FREQUENCY. + /// + /// + /// + /// range 0.0f to 8000.0f; default 440.0f. + /// + /// + public float Frequency + { + get => Al.GetEffectf(Effect.Name, AL_RING_MODULATOR_FREQUENCY); + set => Al.PInvoke.Effectf(Effect.Name, AL_RING_MODULATOR_FREQUENCY, value); + } + + /// + /// Gets/sets AL_RING_MODULATOR_HIGHPASS_CUTOFF. + /// + /// + /// + /// range 0.0f to 24000.0f; default 800.0f. + /// + /// + public float HighpassCutoff + { + get => Al.GetEffectf(Effect.Name, AL_RING_MODULATOR_HIGHPASS_CUTOFF); + set => Al.PInvoke.Effectf(Effect.Name, AL_RING_MODULATOR_HIGHPASS_CUTOFF, value); + } + + /// + /// Gets/sets AL_RING_MODULATOR_WAVEFORM. + /// + /// + /// + /// range 0 to 2; default 0. + /// + /// + public AlRingModulatorWaveform Waveform + { + get => (AlRingModulatorWaveform)Al.GetEffecti(Effect.Name, AL_RING_MODULATOR_WAVEFORM); + set => Al.PInvoke.Effecti(Effect.Name, AL_RING_MODULATOR_WAVEFORM, (int)value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Efx/VocalMorpherEffect.gen.cs b/Brutal.OpenAl/Generated/Al/Efx/VocalMorpherEffect.gen.cs new file mode 100644 index 0000000..458d800 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Efx/VocalMorpherEffect.gen.cs @@ -0,0 +1,128 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// The typed parameter surface of an AL_EFFECT_VOCAL_MORPHER effect (see ); requires ALC_EXT_EFX. + /// + public unsafe readonly partial struct VocalMorpherEffect + { + /// + /// The underlying effect handle. + /// + public readonly AlEffect Effect; + + /// + /// Wraps an effect handle without validating its type; prefer the checked conversion. + /// + public VocalMorpherEffect(AlEffect effect) => Effect = effect; + + /// + /// The wrapper converts freely to its underlying handle. + /// + public static implicit operator AlEffect(VocalMorpherEffect effect) => effect.Effect; + + /// + /// Converts a raw handle to the typed wrapper, checking . + /// + /// + /// The effect's type is not . + public static explicit operator VocalMorpherEffect(AlEffect effect) => + effect.Type == AlEffectType.VocalMorpher + ? new VocalMorpherEffect(effect) + : throw new InvalidCastException($"Effect {effect.Name} has type {effect.Type}, not VocalMorpher."); + + /// + /// Deletes the underlying effect (). + /// + public void Delete() => Effect.Delete(); + + /// + /// Gets/sets AL_VOCAL_MORPHER_PHONEMEA. + /// + /// + /// + /// range 0 to 29; default 0. + /// + /// + public AlVocalMorpherPhoneme PhonemeA + { + get => (AlVocalMorpherPhoneme)Al.GetEffecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEA); + set => Al.PInvoke.Effecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEA, (int)value); + } + + /// + /// Gets/sets AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING. + /// + /// + /// + /// range -24 to 24; default 0. + /// + /// + public int PhonemeACoarseTuning + { + get => Al.GetEffecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING); + set => Al.PInvoke.Effecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING, value); + } + + /// + /// Gets/sets AL_VOCAL_MORPHER_PHONEMEB. + /// + /// + /// + /// range 0 to 29; default 10. + /// + /// + public AlVocalMorpherPhoneme PhonemeB + { + get => (AlVocalMorpherPhoneme)Al.GetEffecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEB); + set => Al.PInvoke.Effecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEB, (int)value); + } + + /// + /// Gets/sets AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING. + /// + /// + /// + /// range -24 to 24; default 0. + /// + /// + public int PhonemeBCoarseTuning + { + get => Al.GetEffecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING); + set => Al.PInvoke.Effecti(Effect.Name, AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING, value); + } + + /// + /// Gets/sets AL_VOCAL_MORPHER_WAVEFORM. + /// + /// + /// + /// range 0 to 2; default 0. + /// + /// + public AlVocalMorpherWaveform Waveform + { + get => (AlVocalMorpherWaveform)Al.GetEffecti(Effect.Name, AL_VOCAL_MORPHER_WAVEFORM); + set => Al.PInvoke.Effecti(Effect.Name, AL_VOCAL_MORPHER_WAVEFORM, (int)value); + } + + /// + /// Gets/sets AL_VOCAL_MORPHER_RATE. + /// + /// + /// + /// range 0.0f to 10.0f; default 1.41f. + /// + /// + public float Rate + { + get => Al.GetEffectf(Effect.Name, AL_VOCAL_MORPHER_RATE); + set => Al.PInvoke.Effectf(Effect.Name, AL_VOCAL_MORPHER_RATE, value); + } + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicLayout.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicLayout.gen.cs new file mode 100644 index 0000000..f5b6f0f --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicLayout.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_AMBISONIC_LAYOUT_SOFT values. + /// + public enum AlAmbisonicLayout + { + Fuma = AL_FUMA_SOFT, + Acn = AL_ACN_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicScaling.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicScaling.gen.cs new file mode 100644 index 0000000..053e701 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlAmbisonicScaling.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_AMBISONIC_SCALING_SOFT values. + /// + public enum AlAmbisonicScaling + { + Fuma = AL_FUMA_SOFT, + Sn3d = AL_SN3D_SOFT, + N3d = AL_N3D_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlAutowahf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlAutowahf.gen.cs new file mode 100644 index 0000000..62a4714 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlAutowahf.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_AUTOWAH effects. + /// + public enum AlAutowahf + { + /// + /// Type ALfloat; range 0.0001 to 1.0; default 0.06. + /// + AttackTime = AL_AUTOWAH_ATTACK_TIME, + + /// + /// Type ALfloat; range 0.0001 to 1.0; default 0.06. + /// + ReleaseTime = AL_AUTOWAH_RELEASE_TIME, + + /// + /// Type ALfloat; range 2.0 to 1000.0; default 1000.0. + /// + Resonance = AL_AUTOWAH_RESONANCE, + + /// + /// Type ALfloat; range 0.00003 to 31621.0; default 11.22. + /// + PeakGain = AL_AUTOWAH_PEAK_GAIN, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlBandpassf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlBandpassf.gen.cs new file mode 100644 index 0000000..3f65076 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlBandpassf.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alFilterf key for AL_FILTER_BANDPASS filters. + /// + public enum AlBandpassf + { + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Gain = AL_BANDPASS_GAIN, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + GainLf = AL_BANDPASS_GAINLF, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + GainHf = AL_BANDPASS_GAINHF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlBufferi.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlBufferi.gen.cs new file mode 100644 index 0000000..e5f32e4 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlBufferi.gen.cs @@ -0,0 +1,89 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alGetBufferi/alBufferi buffer property key. AL 1.1 defines no settable integer buffer properties (the core four are get-only), but several extension keys are settable via alBufferi - see each member. + /// + public enum AlBufferi + { + /// + /// Buffer frequency/sample rate (query only). + /// + /// + /// + /// Type ALint. + /// + /// + Frequency = AL_FREQUENCY, + + /// + /// Buffer bits per sample (query only). + /// + /// + /// + /// Type ALint. + /// + /// + Bits = AL_BITS, + + /// + /// Buffer channel count (query only). + /// + /// + /// + /// Type ALint. + /// + /// + Channels = AL_CHANNELS, + + /// + /// Buffer data size in bytes (query only). + /// + /// + /// + /// Type ALint. + /// + /// + Size = AL_SIZE, + + /// + /// Type ALint; minimum 0; default 0. + /// + UnpackBlockAlignment = AL_UNPACK_BLOCK_ALIGNMENT_SOFT, + + /// + /// Type ALint; minimum 0; default 0. + /// + PackBlockAlignment = AL_PACK_BLOCK_ALIGNMENT_SOFT, + + /// + /// Type ALenum; default AL_FUMA_SOFT. + /// + AmbisonicLayout = AL_AMBISONIC_LAYOUT_SOFT, + + /// + /// Type ALenum; default AL_FUMA_SOFT. + /// + AmbisonicScaling = AL_AMBISONIC_SCALING_SOFT, + + /// + /// Type ALint; range 1 to 14; default 1. + /// + UnpackAmbisonicOrder = AL_UNPACK_AMBISONIC_ORDER_SOFT, + + /// + /// Type ALint. + /// + ByteLength = AL_BYTE_LENGTH_SOFT, + + /// + /// Type ALint. + /// + SampleLength = AL_SAMPLE_LENGTH_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlChorusWaveform.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlChorusWaveform.gen.cs new file mode 100644 index 0000000..f459c1a --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlChorusWaveform.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_CHORUS_WAVEFORM values. + /// + public enum AlChorusWaveform + { + Sinusoid = AL_CHORUS_WAVEFORM_SINUSOID, + Triangle = AL_CHORUS_WAVEFORM_TRIANGLE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlChorusf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlChorusf.gen.cs new file mode 100644 index 0000000..c5a35da --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlChorusf.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_CHORUS effects. + /// + public enum AlChorusf + { + /// + /// Type ALfloat; range 0.0 to 10.0; default 1.1. + /// + Rate = AL_CHORUS_RATE, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.1. + /// + Depth = AL_CHORUS_DEPTH, + + /// + /// Type ALfloat; range -1.0 to 1.0; default 0.25. + /// + Feedback = AL_CHORUS_FEEDBACK, + + /// + /// Type ALfloat; range 0.0 to 0.016; default 0.016. + /// + Delay = AL_CHORUS_DELAY, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlChorusi.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlChorusi.gen.cs new file mode 100644 index 0000000..7cdbec3 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlChorusi.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_CHORUS effects. + /// + public enum AlChorusi + { + /// + /// Type ALenum; default AL_CHORUS_WAVEFORM_TRIANGLE. + /// + Waveform = AL_CHORUS_WAVEFORM, + + /// + /// Type ALint; range -180 to 180; default 90. + /// + Phase = AL_CHORUS_PHASE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlCompressori.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlCompressori.gen.cs new file mode 100644 index 0000000..a03d7c9 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlCompressori.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_COMPRESSOR effects. + /// + public enum AlCompressori + { + /// + /// Type ALboolean; default AL_TRUE. + /// + Enabled = AL_COMPRESSOR_ONOFF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDebugSeverity.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDebugSeverity.gen.cs new file mode 100644 index 0000000..1ba0a89 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDebugSeverity.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_DEBUG_SEVERITY values. + /// + public enum AlDebugSeverity + { + DontCare = AL_DONT_CARE_EXT, + High = AL_DEBUG_SEVERITY_HIGH_EXT, + Medium = AL_DEBUG_SEVERITY_MEDIUM_EXT, + Low = AL_DEBUG_SEVERITY_LOW_EXT, + Notification = AL_DEBUG_SEVERITY_NOTIFICATION_EXT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDebugSource.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDebugSource.gen.cs new file mode 100644 index 0000000..ce0b11f --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDebugSource.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_DEBUG_SOURCE values. + /// + public enum AlDebugSource + { + DontCare = AL_DONT_CARE_EXT, + Api = AL_DEBUG_SOURCE_API_EXT, + AudioSystem = AL_DEBUG_SOURCE_AUDIO_SYSTEM_EXT, + ThirdParty = AL_DEBUG_SOURCE_THIRD_PARTY_EXT, + Application = AL_DEBUG_SOURCE_APPLICATION_EXT, + Other = AL_DEBUG_SOURCE_OTHER_EXT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDebugType.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDebugType.gen.cs new file mode 100644 index 0000000..cdc9798 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDebugType.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_DEBUG_TYPE values. + /// + public enum AlDebugType + { + DontCare = AL_DONT_CARE_EXT, + Error = AL_DEBUG_TYPE_ERROR_EXT, + DeprecatedBehavior = AL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_EXT, + UndefinedBehavior = AL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_EXT, + Portability = AL_DEBUG_TYPE_PORTABILITY_EXT, + Performance = AL_DEBUG_TYPE_PERFORMANCE_EXT, + Marker = AL_DEBUG_TYPE_MARKER_EXT, + PushGroup = AL_DEBUG_TYPE_PUSH_GROUP_EXT, + PopGroup = AL_DEBUG_TYPE_POP_GROUP_EXT, + Other = AL_DEBUG_TYPE_OTHER_EXT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDedicatedDialoguef.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDedicatedDialoguef.gen.cs new file mode 100644 index 0000000..5185aea --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDedicatedDialoguef.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_DEDICATED_DIALOGUE effects. + /// + public enum AlDedicatedDialoguef + { + /// + /// Type ALfloat; default 1. + /// + Gain = AL_DEDICATED_GAIN, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDedicatedLowFrequencyEffectf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDedicatedLowFrequencyEffectf.gen.cs new file mode 100644 index 0000000..c593786 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDedicatedLowFrequencyEffectf.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT effects. + /// + public enum AlDedicatedLowFrequencyEffectf + { + /// + /// Type ALfloat; default 1. + /// + Gain = AL_DEDICATED_GAIN, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDirectChannelsMode.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDirectChannelsMode.gen.cs new file mode 100644 index 0000000..6cbfe3b --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDirectChannelsMode.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_DIRECT_CHANNELS_SOFT values. + /// + public enum AlDirectChannelsMode + { + /// + /// Boolean False. + /// + Off = AL_FALSE, + DropUnmatched = AL_DROP_UNMATCHED_SOFT, + RemixUnmatched = AL_REMIX_UNMATCHED_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDistanceModel.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDistanceModel.gen.cs new file mode 100644 index 0000000..dc1d5c6 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDistanceModel.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_DISTANCE_MODEL values. + /// + public enum AlDistanceModel + { + /// + /// No distance model or no buffer + /// + None = AL_NONE, + InverseDistance = AL_INVERSE_DISTANCE, + InverseDistanceClamped = AL_INVERSE_DISTANCE_CLAMPED, + LinearDistance = AL_LINEAR_DISTANCE, + LinearDistanceClamped = AL_LINEAR_DISTANCE_CLAMPED, + ExponentDistance = AL_EXPONENT_DISTANCE, + ExponentDistanceClamped = AL_EXPONENT_DISTANCE_CLAMPED, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlDistortionf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlDistortionf.gen.cs new file mode 100644 index 0000000..0e851d6 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlDistortionf.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_DISTORTION effects. + /// + public enum AlDistortionf + { + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.2. + /// + Edge = AL_DISTORTION_EDGE, + + /// + /// Type ALfloat; range 0.01 to 1.0; default 0.05. + /// + Gain = AL_DISTORTION_GAIN, + + /// + /// Type ALfloat; range 80.0 to 24000; default 8000. + /// + LowpassCutoff = AL_DISTORTION_LOWPASS_CUTOFF, + + /// + /// Type ALfloat; range 80.0 to 24000; default 3600. + /// + EqCenter = AL_DISTORTION_EQCENTER, + + /// + /// Type ALfloat; range 80.0 to 24000; default 3600. + /// + EqBandwidth = AL_DISTORTION_EQBANDWIDTH, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverb3f.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverb3f.gen.cs new file mode 100644 index 0000000..c97db43 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverb3f.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float3-valued alEffectfv key for AL_EFFECT_EAXREVERB effects. + /// + public enum AlEaxReverb3f + { + /// + /// Type ALfloat[3]; default 0.0,0.0,0.0. + /// + ReflectionsPan = AL_EAXREVERB_REFLECTIONS_PAN, + + /// + /// Type ALfloat[3]; default 0.0,0.0,0.0. + /// + LateReverbPan = AL_EAXREVERB_LATE_REVERB_PAN, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbf.gen.cs new file mode 100644 index 0000000..880fa8c --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbf.gen.cs @@ -0,0 +1,114 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_EAXREVERB effects. + /// + public enum AlEaxReverbf + { + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Density = AL_EAXREVERB_DENSITY, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Diffusion = AL_EAXREVERB_DIFFUSION, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.32. + /// + Gain = AL_EAXREVERB_GAIN, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.89. + /// + GainHf = AL_EAXREVERB_GAINHF, + + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + GainLf = AL_EAXREVERB_GAINLF, + + /// + /// Type ALfloat; range 0.1 to 20; default 1.49. + /// + DecayTime = AL_EAXREVERB_DECAY_TIME, + + /// + /// Type ALfloat; range 0.1 to 2.0; default 0.83. + /// + DecayHfRatio = AL_EAXREVERB_DECAY_HFRATIO, + + /// + /// Type ALfloat; range 0.1 to 2.0; default 1.0. + /// + DecayLfRatio = AL_EAXREVERB_DECAY_LFRATIO, + + /// + /// Type ALfloat; range 0.0 to 3.16; default 0.05. + /// + ReflectionsGain = AL_EAXREVERB_REFLECTIONS_GAIN, + + /// + /// Type ALfloat; range 0.0 to 0.3; default 0.007. + /// + ReflectionsDelay = AL_EAXREVERB_REFLECTIONS_DELAY, + + /// + /// Type ALfloat; range 0.0 to 10.0; default 1.26. + /// + LateReverbGain = AL_EAXREVERB_LATE_REVERB_GAIN, + + /// + /// Type ALfloat; range 0.0 to 0.1; default 0.011. + /// + LateReverbDelay = AL_EAXREVERB_LATE_REVERB_DELAY, + + /// + /// Type ALfloat; range 0.075 to 0.25; default 0.25. + /// + EchoTime = AL_EAXREVERB_ECHO_TIME, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.0. + /// + EchoDepth = AL_EAXREVERB_ECHO_DEPTH, + + /// + /// Type ALfloat; range 0.04 to 4.0; default 0.25. + /// + ModulationTime = AL_EAXREVERB_MODULATION_TIME, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.0. + /// + ModulationDepth = AL_EAXREVERB_MODULATION_DEPTH, + + /// + /// Type ALfloat; range 0.892 to 1.0; default 0.994. + /// + AirAbsorptionGainHf = AL_EAXREVERB_AIR_ABSORPTION_GAINHF, + + /// + /// Type ALfloat; range 1000.0 to 20000.0; default 5000.0. + /// + HfReference = AL_EAXREVERB_HFREFERENCE, + + /// + /// Type ALfloat; range 20.0 to 1000.0; default 250.0. + /// + LfReference = AL_EAXREVERB_LFREFERENCE, + + /// + /// Type ALfloat; range 0.0 to 10.0; default 0.0. + /// + RoomRolloffFactor = AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbi.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbi.gen.cs new file mode 100644 index 0000000..465f328 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEaxReverbi.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_EAXREVERB effects. + /// + public enum AlEaxReverbi + { + /// + /// Type ALboolean; default AL_TRUE. + /// + DecayHfLimit = AL_EAXREVERB_DECAY_HFLIMIT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEchof.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEchof.gen.cs new file mode 100644 index 0000000..c875f18 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEchof.gen.cs @@ -0,0 +1,39 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_ECHO effects. + /// + public enum AlEchof + { + /// + /// Type ALfloat; range 0.0 to 0.207; default 0.1. + /// + Delay = AL_ECHO_DELAY, + + /// + /// Type ALfloat; range 0.0 to 0.404; default 0.1. + /// + LrDelay = AL_ECHO_LRDELAY, + + /// + /// Type ALfloat; range 0.0 to 0.99; default 0.5. + /// + Damping = AL_ECHO_DAMPING, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.5. + /// + Feedback = AL_ECHO_FEEDBACK, + + /// + /// Type ALfloat; range -1.0 to 1.0; default -1.0. + /// + Spread = AL_ECHO_SPREAD, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEffectType.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEffectType.gen.cs new file mode 100644 index 0000000..98a498d --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEffectType.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_EFFECT_TYPE values. + /// + public enum AlEffectType + { + Null = AL_EFFECT_NULL, + Reverb = AL_EFFECT_REVERB, + Chorus = AL_EFFECT_CHORUS, + Distortion = AL_EFFECT_DISTORTION, + Echo = AL_EFFECT_ECHO, + Flanger = AL_EFFECT_FLANGER, + FrequencyShifter = AL_EFFECT_FREQUENCY_SHIFTER, + VocalMorpher = AL_EFFECT_VOCAL_MORPHER, + PitchShifter = AL_EFFECT_PITCH_SHIFTER, + RingModulator = AL_EFFECT_RING_MODULATOR, + Autowah = AL_EFFECT_AUTOWAH, + Compressor = AL_EFFECT_COMPRESSOR, + Equalizer = AL_EFFECT_EQUALIZER, + EaxReverb = AL_EFFECT_EAXREVERB, + DedicatedLowFrequencyEffect = AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT, + DedicatedDialogue = AL_EFFECT_DEDICATED_DIALOGUE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEqualizerf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEqualizerf.gen.cs new file mode 100644 index 0000000..6655239 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEqualizerf.gen.cs @@ -0,0 +1,64 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_EQUALIZER effects. + /// + public enum AlEqualizerf + { + /// + /// Type ALfloat; range 0.126 to 7.943; default 1.0. + /// + LowGain = AL_EQUALIZER_LOW_GAIN, + + /// + /// Type ALfloat; range 50.0 to 800.0; default 200.0. + /// + LowCutoff = AL_EQUALIZER_LOW_CUTOFF, + + /// + /// Type ALfloat; range 0.126 to 7.943; default 1.0. + /// + Mid1Gain = AL_EQUALIZER_MID1_GAIN, + + /// + /// Type ALfloat; range 200.0 to 3000.0; default 500.0. + /// + Mid1Center = AL_EQUALIZER_MID1_CENTER, + + /// + /// Type ALfloat; range 0.01 to 1.0; default 1.0. + /// + Mid1Width = AL_EQUALIZER_MID1_WIDTH, + + /// + /// Type ALfloat; range 0.126 to 7.943; default 1.0. + /// + Mid2Gain = AL_EQUALIZER_MID2_GAIN, + + /// + /// Type ALfloat; range 1000.0 to 8000.0; default 3000.0. + /// + Mid2Center = AL_EQUALIZER_MID2_CENTER, + + /// + /// Type ALfloat; range 0.01 to 1.0; default 1.0. + /// + Mid2Width = AL_EQUALIZER_MID2_WIDTH, + + /// + /// Type ALfloat; range 0.126 to 7.943; default 1.0. + /// + HighGain = AL_EQUALIZER_HIGH_GAIN, + + /// + /// Type ALfloat; range 4000.0 to 16000.0; default 6000.0. + /// + HighCutoff = AL_EQUALIZER_HIGH_CUTOFF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlError.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlError.gen.cs new file mode 100644 index 0000000..bb84040 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlError.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alGetError values. + /// + public enum AlError + { + /// + /// No error. + /// + NoError = AL_NO_ERROR, + + /// + /// Invalid name (ID) passed to an AL call. + /// + InvalidName = AL_INVALID_NAME, + + /// + /// Invalid enumeration passed to AL call. + /// + InvalidEnum = AL_INVALID_ENUM, + + /// + /// Invalid value passed to AL call. + /// + InvalidValue = AL_INVALID_VALUE, + + /// + /// Illegal AL call. + /// + InvalidOperation = AL_INVALID_OPERATION, + + /// + /// Not enough memory to execute the AL call. + /// + OutOfMemory = AL_OUT_OF_MEMORY, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlEventType.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlEventType.gen.cs new file mode 100644 index 0000000..b0ce9fc --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlEventType.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alEventCallbackSOFT values. + /// + public enum AlEventType + { + BufferCompleted = AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT, + SourceStateChanged = AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT, + Disconnected = AL_EVENT_TYPE_DISCONNECTED_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFilterType.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFilterType.gen.cs new file mode 100644 index 0000000..7c49106 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFilterType.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_FILTER_TYPE values. + /// + public enum AlFilterType + { + Null = AL_FILTER_NULL, + Lowpass = AL_FILTER_LOWPASS, + Highpass = AL_FILTER_HIGHPASS, + Bandpass = AL_FILTER_BANDPASS, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFlangerWaveform.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFlangerWaveform.gen.cs new file mode 100644 index 0000000..2f6b0b8 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFlangerWaveform.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_FLANGER_WAVEFORM values. + /// + public enum AlFlangerWaveform + { + Sinusoid = AL_FLANGER_WAVEFORM_SINUSOID, + Triangle = AL_FLANGER_WAVEFORM_TRIANGLE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFlangerf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFlangerf.gen.cs new file mode 100644 index 0000000..422333b --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFlangerf.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_FLANGER effects. + /// + public enum AlFlangerf + { + /// + /// Type ALfloat; range 0.0 to 10.0; default 0.27. + /// + Rate = AL_FLANGER_RATE, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Depth = AL_FLANGER_DEPTH, + + /// + /// Type ALfloat; range -1.0 to 1.0; default -0.5. + /// + Feedback = AL_FLANGER_FEEDBACK, + + /// + /// Type ALfloat; range 0.0 to 0.004; default 0.002. + /// + Delay = AL_FLANGER_DELAY, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFlangeri.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFlangeri.gen.cs new file mode 100644 index 0000000..fb16e88 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFlangeri.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_FLANGER effects. + /// + public enum AlFlangeri + { + /// + /// Type ALenum; default AL_FLANGER_WAVEFORM_TRIANGLE. + /// + Waveform = AL_FLANGER_WAVEFORM, + + /// + /// Type ALfloat; range -180 to 180; default 0. + /// + Phase = AL_FLANGER_PHASE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFormat.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFormat.gen.cs new file mode 100644 index 0000000..87210f2 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFormat.gen.cs @@ -0,0 +1,91 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alBufferData format values. + /// + public enum AlFormat + { + /// + /// Unsigned 8-bit mono buffer format. + /// + Mono8 = AL_FORMAT_MONO8, + + /// + /// Signed 16-bit mono buffer format. + /// + Mono16 = AL_FORMAT_MONO16, + + /// + /// Unsigned 8-bit stereo buffer format. + /// + Stereo8 = AL_FORMAT_STEREO8, + + /// + /// Signed 16-bit stereo buffer format. + /// + Stereo16 = AL_FORMAT_STEREO16, + MonoFloat32 = AL_FORMAT_MONO_FLOAT32, + StereoFloat32 = AL_FORMAT_STEREO_FLOAT32, + MonoDouble = AL_FORMAT_MONO_DOUBLE_EXT, + StereoDouble = AL_FORMAT_STEREO_DOUBLE_EXT, + MonoAlaw = AL_FORMAT_MONO_ALAW_EXT, + StereoAlaw = AL_FORMAT_STEREO_ALAW_EXT, + Quad8 = AL_FORMAT_QUAD8, + Quad16 = AL_FORMAT_QUAD16, + Quad32 = AL_FORMAT_QUAD32, + Rear8 = AL_FORMAT_REAR8, + Rear16 = AL_FORMAT_REAR16, + Rear32 = AL_FORMAT_REAR32, + Surround51Chn8 = AL_FORMAT_51CHN8, + Surround51Chn16 = AL_FORMAT_51CHN16, + Surround51Chn32 = AL_FORMAT_51CHN32, + Surround61Chn8 = AL_FORMAT_61CHN8, + Surround61Chn16 = AL_FORMAT_61CHN16, + Surround61Chn32 = AL_FORMAT_61CHN32, + Surround71Chn8 = AL_FORMAT_71CHN8, + Surround71Chn16 = AL_FORMAT_71CHN16, + Surround71Chn32 = AL_FORMAT_71CHN32, + MonoMulaw = AL_FORMAT_MONO_MULAW, + StereoMulaw = AL_FORMAT_STEREO_MULAW, + QuadMulaw = AL_FORMAT_QUAD_MULAW, + RearMulaw = AL_FORMAT_REAR_MULAW, + Surround51ChnMulaw = AL_FORMAT_51CHN_MULAW, + Surround61ChnMulaw = AL_FORMAT_61CHN_MULAW, + Surround71ChnMulaw = AL_FORMAT_71CHN_MULAW, + MonoIma4 = AL_FORMAT_MONO_IMA4, + StereoIma4 = AL_FORMAT_STEREO_IMA4, + MonoMsadpcm = AL_FORMAT_MONO_MSADPCM_SOFT, + StereoMsadpcm = AL_FORMAT_STEREO_MSADPCM_SOFT, + Bformat2d8 = AL_FORMAT_BFORMAT2D_8, + Bformat2d16 = AL_FORMAT_BFORMAT2D_16, + Bformat2dFloat32 = AL_FORMAT_BFORMAT2D_FLOAT32, + Bformat3d8 = AL_FORMAT_BFORMAT3D_8, + Bformat3d16 = AL_FORMAT_BFORMAT3D_16, + Bformat3dFloat32 = AL_FORMAT_BFORMAT3D_FLOAT32, + Bformat2dMulaw = AL_FORMAT_BFORMAT2D_MULAW, + Bformat3dMulaw = AL_FORMAT_BFORMAT3D_MULAW, + Uhj2Chn8 = AL_FORMAT_UHJ2CHN8_SOFT, + Uhj2Chn16 = AL_FORMAT_UHJ2CHN16_SOFT, + Uhj2ChnFloat32 = AL_FORMAT_UHJ2CHN_FLOAT32_SOFT, + Uhj3Chn8 = AL_FORMAT_UHJ3CHN8_SOFT, + Uhj3Chn16 = AL_FORMAT_UHJ3CHN16_SOFT, + Uhj3ChnFloat32 = AL_FORMAT_UHJ3CHN_FLOAT32_SOFT, + Uhj4Chn8 = AL_FORMAT_UHJ4CHN8_SOFT, + Uhj4Chn16 = AL_FORMAT_UHJ4CHN16_SOFT, + Uhj4ChnFloat32 = AL_FORMAT_UHJ4CHN_FLOAT32_SOFT, + Uhj2ChnMulaw = AL_FORMAT_UHJ2CHN_MULAW_SOFT, + Uhj2ChnAlaw = AL_FORMAT_UHJ2CHN_ALAW_SOFT, + Uhj2ChnIma4 = AL_FORMAT_UHJ2CHN_IMA4_SOFT, + Uhj2ChnMsadpcm = AL_FORMAT_UHJ2CHN_MSADPCM_SOFT, + Uhj3ChnMulaw = AL_FORMAT_UHJ3CHN_MULAW_SOFT, + Uhj3ChnAlaw = AL_FORMAT_UHJ3CHN_ALAW_SOFT, + Uhj4ChnMulaw = AL_FORMAT_UHJ4CHN_MULAW_SOFT, + Uhj4ChnAlaw = AL_FORMAT_UHJ4CHN_ALAW_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterDirection.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterDirection.gen.cs new file mode 100644 index 0000000..1f78f99 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterDirection.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_FREQUENCY_SHIFTER_LEFT_DIRECTION/AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION values. + /// + public enum AlFrequencyShifterDirection + { + Down = AL_FREQUENCY_SHIFTER_DIRECTION_DOWN, + Up = AL_FREQUENCY_SHIFTER_DIRECTION_UP, + Off = AL_FREQUENCY_SHIFTER_DIRECTION_OFF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterf.gen.cs new file mode 100644 index 0000000..c756947 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifterf.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_FREQUENCY_SHIFTER effects. + /// + public enum AlFrequencyShifterf + { + /// + /// Type ALfloat; range 0.0 to 24000.0; default 0.0. + /// + Frequency = AL_FREQUENCY_SHIFTER_FREQUENCY, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifteri.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifteri.gen.cs new file mode 100644 index 0000000..e7207ee --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlFrequencyShifteri.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_FREQUENCY_SHIFTER effects. + /// + public enum AlFrequencyShifteri + { + /// + /// Type ALenum; default AL_FREQUENCY_SHIFTER_DIRECTION_DOWN. + /// + LeftDirection = AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, + + /// + /// Type ALenum; default AL_FREQUENCY_SHIFTER_DIRECTION_DOWN. + /// + RightDirection = AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlGetString.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlGetString.gen.cs new file mode 100644 index 0000000..fa282f6 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlGetString.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alGetString values. + /// + public enum AlGetString + { + /// + /// Context string: Vendor name. + /// + Vendor = AL_VENDOR, + + /// + /// Context string: Version. + /// + Version = AL_VERSION, + + /// + /// Context string: Renderer name. + /// + Renderer = AL_RENDERER, + + /// + /// Context string: Space-separated extension list. + /// + Extensions = AL_EXTENSIONS, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlHighpassf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlHighpassf.gen.cs new file mode 100644 index 0000000..d45f6a0 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlHighpassf.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alFilterf key for AL_FILTER_HIGHPASS filters. + /// + public enum AlHighpassf + { + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Gain = AL_HIGHPASS_GAIN, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + GainLf = AL_HIGHPASS_GAINLF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlListener3f.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlListener3f.gen.cs new file mode 100644 index 0000000..f3a9e3d --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlListener3f.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A -valued alListener3f listener property key. + /// + public enum AlListener3f + { + /// + /// Source or listener position. + /// + /// + /// + /// The source or listener location in three dimensional space. + /// + /// + /// OpenAL uses a right handed coordinate system, like OpenGL, where with a default view, X points right + /// (thumb), Y points up (index finger), and Z points towards the viewer/camera (middle finger). + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + Position = AL_POSITION, + + /// + /// Source or listener velocity. + /// + /// + /// + /// Specifies the current velocity, relative to the position. + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + Velocity = AL_VELOCITY, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlListenerf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlListenerf.gen.cs new file mode 100644 index 0000000..81ebe8c --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlListenerf.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alListenerf listener property key. + /// + public enum AlListenerf + { + /// + /// Source or listener gain. + /// + /// + /// + /// For sources, an initial linear gain value (before attenuation is applied). For the listener, an output + /// linear gain adjustment. + /// + /// + /// A value of 1.0 means unattenuated. Each division by 2 equals an attenuation of about -6dB. Each + /// multiplication by 2 equals an amplification of about +6dB. + /// + /// + /// Type ALfloat; minimum 0.0. + /// + /// + Gain = AL_GAIN, + + /// + /// Type ALfloat; minimum 0; default 1.0. + /// + MetersPerUnit = AL_METERS_PER_UNIT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlLowpassf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlLowpassf.gen.cs new file mode 100644 index 0000000..3350636 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlLowpassf.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alFilterf key for AL_FILTER_LOWPASS filters. + /// + public enum AlLowpassf + { + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Gain = AL_LOWPASS_GAIN, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + GainHf = AL_LOWPASS_GAINHF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlObjectLabelIdentifier.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlObjectLabelIdentifier.gen.cs new file mode 100644 index 0000000..865e970 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlObjectLabelIdentifier.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alObjectLabelEXT/alGetObjectLabelEXT values. + /// + public enum AlObjectLabelIdentifier + { + Buffer = AL_BUFFER_EXT, + Source = AL_SOURCE_EXT, + Filter = AL_FILTER_EXT, + Effect = AL_EFFECT_EXT, + AuxiliaryEffectSlot = AL_AUXILIARY_EFFECT_SLOT_EXT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlPitchShifteri.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlPitchShifteri.gen.cs new file mode 100644 index 0000000..5bbc5f4 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlPitchShifteri.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_PITCH_SHIFTER effects. + /// + public enum AlPitchShifteri + { + /// + /// Type ALfloat; range -12 to 12; default 12. + /// + CoarseTune = AL_PITCH_SHIFTER_COARSE_TUNE, + + /// + /// Type ALfloat; range -150 to 50; default 0. + /// + FineTune = AL_PITCH_SHIFTER_FINE_TUNE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlReverbf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlReverbf.gen.cs new file mode 100644 index 0000000..aa458e9 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlReverbf.gen.cs @@ -0,0 +1,74 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_REVERB effects. + /// + public enum AlReverbf + { + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Density = AL_REVERB_DENSITY, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 1.0. + /// + Diffusion = AL_REVERB_DIFFUSION, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.32. + /// + Gain = AL_REVERB_GAIN, + + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.89. + /// + GainHf = AL_REVERB_GAINHF, + + /// + /// Type ALfloat; range 0.1 to 20; default 1.49. + /// + DecayTime = AL_REVERB_DECAY_TIME, + + /// + /// Type ALfloat; range 0.1 to 2.0; default 0.83. + /// + DecayHfRatio = AL_REVERB_DECAY_HFRATIO, + + /// + /// Type ALfloat; range 0.0 to 3.16; default 0.05. + /// + ReflectionsGain = AL_REVERB_REFLECTIONS_GAIN, + + /// + /// Type ALfloat; range 0.0 to 0.3; default 0.007. + /// + ReflectionsDelay = AL_REVERB_REFLECTIONS_DELAY, + + /// + /// Type ALfloat; range 0.0 to 10.0; default 1.26. + /// + LateReverbGain = AL_REVERB_LATE_REVERB_GAIN, + + /// + /// Type ALfloat; range 0.0 to 0.1; default 0.011. + /// + LateReverbDelay = AL_REVERB_LATE_REVERB_DELAY, + + /// + /// Type ALfloat; range 0.892 to 1.0; default 0.994. + /// + AirAbsorptionGainHf = AL_REVERB_AIR_ABSORPTION_GAINHF, + + /// + /// Type ALfloat; range 0.0 to 10.0; default 0.0. + /// + RoomRolloffFactor = AL_REVERB_ROOM_ROLLOFF_FACTOR, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlReverbi.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlReverbi.gen.cs new file mode 100644 index 0000000..78dc3bf --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlReverbi.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_REVERB effects. + /// + public enum AlReverbi + { + /// + /// Type ALboolean; default AL_TRUE. + /// + DecayHfLimit = AL_REVERB_DECAY_HFLIMIT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorWaveform.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorWaveform.gen.cs new file mode 100644 index 0000000..96e63b4 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorWaveform.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_RING_MODULATOR_WAVEFORM values. + /// + public enum AlRingModulatorWaveform + { + Sinusoid = AL_RING_MODULATOR_SINUSOID, + Sawtooth = AL_RING_MODULATOR_SAWTOOTH, + Square = AL_RING_MODULATOR_SQUARE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorf.gen.cs new file mode 100644 index 0000000..748713a --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatorf.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_RING_MODULATOR effects. + /// + public enum AlRingModulatorf + { + /// + /// Type ALfloat; range 0.0 to 8000.0; default 440.0. + /// + Frequency = AL_RING_MODULATOR_FREQUENCY, + + /// + /// Type ALfloat; range 0.0 to 24000.0; default 800.0. + /// + HighpassCutoff = AL_RING_MODULATOR_HIGHPASS_CUTOFF, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatori.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatori.gen.cs new file mode 100644 index 0000000..bd0edd0 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlRingModulatori.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_RING_MODULATOR effects. + /// + public enum AlRingModulatori + { + /// + /// Type ALenum; default AL_RING_MODULATOR_SINUSOID. + /// + Waveform = AL_RING_MODULATOR_WAVEFORM, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSource3f.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSource3f.gen.cs new file mode 100644 index 0000000..07714b3 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSource3f.gen.cs @@ -0,0 +1,67 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A -valued alSource3f source property key. + /// + public enum AlSource3f + { + /// + /// Source or listener position. + /// + /// + /// + /// The source or listener location in three dimensional space. + /// + /// + /// OpenAL uses a right handed coordinate system, like OpenGL, where with a default view, X points right + /// (thumb), Y points up (index finger), and Z points towards the viewer/camera (middle finger). + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + Position = AL_POSITION, + + /// + /// Source direction. + /// + /// + /// + /// Specifies the current direction in local space. A zero-length vector specifies an omni-directional + /// source (cone is ignored). + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + Direction = AL_DIRECTION, + + /// + /// Source or listener velocity. + /// + /// + /// + /// Specifies the current velocity, relative to the position. + /// + /// + /// To change from or to a left handed coordinate system, negate the Z component. + /// + /// + /// Type ALfloat[3]/ALint[3]; default 0,0,0. + /// + /// + Velocity = AL_VELOCITY, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSourceState.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSourceState.gen.cs new file mode 100644 index 0000000..25f4581 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSourceState.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_SOURCE_STATE values. + /// + public enum AlSourceState + { + Initial = AL_INITIAL, + Playing = AL_PLAYING, + Paused = AL_PAUSED, + Stopped = AL_STOPPED, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSourceType.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSourceType.gen.cs new file mode 100644 index 0000000..b32b85c --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSourceType.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_SOURCE_TYPE values. + /// + public enum AlSourceType + { + Static = AL_STATIC, + Streaming = AL_STREAMING, + Undetermined = AL_UNDETERMINED, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSourced.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSourced.gen.cs new file mode 100644 index 0000000..ccb7372 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSourced.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A double-valued alSourcedSOFT/alGetSourcedSOFT source property key. Provided by AL_SOFT_source_latency. + /// + public enum AlSourced + { + /// + /// Source buffer offset, in seconds. + /// + /// + /// + /// Type ALfloat/ALint; minimum 0. + /// + /// + SecOffset = AL_SEC_OFFSET, + + /// + /// Type ALfloat. + /// + SecLength = AL_SEC_LENGTH_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSourcef.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSourcef.gen.cs new file mode 100644 index 0000000..4ab47ac --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSourcef.gen.cs @@ -0,0 +1,203 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alSourcef source property key. + /// + public enum AlSourcef + { + /// + /// Source or listener gain. + /// + /// + /// + /// For sources, an initial linear gain value (before attenuation is applied). For the listener, an output + /// linear gain adjustment. + /// + /// + /// A value of 1.0 means unattenuated. Each division by 2 equals an attenuation of about -6dB. Each + /// multiplication by 2 equals an amplification of about +6dB. + /// + /// + /// Type ALfloat; minimum 0.0. + /// + /// + Gain = AL_GAIN, + + /// + /// Source pitch. + /// + /// + /// + /// A multiplier for the sample rate of the source's buffer. + /// + /// + /// Type ALfloat; range 0.5 to 2.0; default 1.0. + /// + /// + Pitch = AL_PITCH, + + /// + /// Minimum source gain. + /// + /// + /// + /// The minimum gain allowed for a source, after distance and cone attenuation are applied (if applicable). + /// + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + /// + MinGain = AL_MIN_GAIN, + + /// + /// Maximum source gain. + /// + /// + /// + /// The maximum gain allowed for a source, after distance and cone attenuation are applied (if applicable). + /// + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + /// + MaxGain = AL_MAX_GAIN, + + /// + /// Source maximum distance. + /// + /// + /// + /// The distance above which the source is not attenuated any further with a clamped distance model, or + /// where attenuation reaches 0.0 gain for linear distance models with a default rolloff factor. + /// + /// + /// Type ALfloat; minimum 0.0; default FLT_MAX. + /// + /// + MaxDistance = AL_MAX_DISTANCE, + + /// + /// Source rolloff factor. + /// + /// + /// + /// Multiplier to exaggerate or diminish distance attenuation. + /// + /// + /// At 0.0, no distance attenuation ever occurs. + /// + /// + /// Type ALfloat; minimum 0.0; default 1.0. + /// + /// + RolloffFactor = AL_ROLLOFF_FACTOR, + + /// + /// Source reference distance. + /// + /// + /// + /// The distance in units that no distance attenuation occurs. + /// + /// + /// At 0.0, no distance attenuation occurs with non-linear attenuation models. + /// + /// + /// Type ALfloat; minimum 0.0; default 1.0. + /// + /// + ReferenceDistance = AL_REFERENCE_DISTANCE, + + /// + /// Outer cone gain. + /// + /// + /// + /// The gain attenuation applied when the listener is outside of the source's outer cone angle. + /// + /// + /// Type ALfloat; range 0.0 to 1.0; default 0.0. + /// + /// + ConeOuterGain = AL_CONE_OUTER_GAIN, + + /// + /// Inner cone angle, in degrees. + /// + /// + /// + /// The angle covered by the inner cone, the area within which the source will not be attenuated by + /// direction. + /// + /// + /// Type ALint/ALfloat; range 0 to 360; default 360. + /// + /// + ConeInnerAngle = AL_CONE_INNER_ANGLE, + + /// + /// Outer cone angle, in degrees. + /// + /// + /// + /// The angle covered by the outer cone, the area outside of which the source will be fully attenuated by + /// direction. + /// + /// + /// Type ALint/ALfloat; range 0 to 360; default 360. + /// + /// + ConeOuterAngle = AL_CONE_OUTER_ANGLE, + + /// + /// Source buffer offset, in seconds. + /// + /// + /// + /// Type ALfloat/ALint; minimum 0. + /// + /// + SecOffset = AL_SEC_OFFSET, + + /// + /// Source buffer offset, in sample frames. + /// + /// + /// + /// Type ALint; minimum 0. + /// + /// + SampleOffset = AL_SAMPLE_OFFSET, + + /// + /// Source buffer offset, in bytes. + /// + /// + /// + /// Type ALint; minimum 0. + /// + /// + ByteOffset = AL_BYTE_OFFSET, + + /// + /// Type ALfloat. + /// + SourceRadius = AL_SOURCE_RADIUS, + + /// + /// Type ALfloat; range 0.0 to 1.0. + /// + SuperStereoWidth = AL_SUPER_STEREO_WIDTH_SOFT, + + /// + /// Type ALfloat. + /// + SecLength = AL_SEC_LENGTH_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSourcei.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSourcei.gen.cs new file mode 100644 index 0000000..2adda99 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSourcei.gen.cs @@ -0,0 +1,203 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alSourcei source property key, carrying both settable keys and get-only queries (see each member). + /// + public enum AlSourcei + { + /// + /// Source buffer. + /// + /// + /// + /// Specifies the buffer to provide sound samples for a source. + /// + /// + /// Type ALuint; default AL_NONE. + /// + /// + Buffer = AL_BUFFER, + + /// + /// Source looping. + /// + /// + /// + /// Specifies whether source playback loops. + /// + /// + /// Type ALboolean; default AL_FALSE. + /// + /// + Looping = AL_LOOPING, + + /// + /// Relative source. + /// + /// + /// + /// Specifies if the source uses relative coordinates. + /// + /// + /// Type ALboolean; default AL_FALSE. + /// + /// + SourceRelative = AL_SOURCE_RELATIVE, + + /// + /// Inner cone angle, in degrees. + /// + /// + /// + /// The angle covered by the inner cone, the area within which the source will not be attenuated by + /// direction. + /// + /// + /// Type ALint/ALfloat; range 0 to 360; default 360. + /// + /// + ConeInnerAngle = AL_CONE_INNER_ANGLE, + + /// + /// Outer cone angle, in degrees. + /// + /// + /// + /// The angle covered by the outer cone, the area outside of which the source will be fully attenuated by + /// direction. + /// + /// + /// Type ALint/ALfloat; range 0 to 360; default 360. + /// + /// + ConeOuterAngle = AL_CONE_OUTER_ANGLE, + + /// + /// Source buffer offset, in seconds. + /// + /// + /// + /// Type ALfloat/ALint; minimum 0. + /// + /// + SecOffset = AL_SEC_OFFSET, + + /// + /// Source buffer offset, in sample frames. + /// + /// + /// + /// Type ALint; minimum 0. + /// + /// + SampleOffset = AL_SAMPLE_OFFSET, + + /// + /// Source buffer offset, in bytes. + /// + /// + /// + /// Type ALint; minimum 0. + /// + /// + ByteOffset = AL_BYTE_OFFSET, + + /// + /// Source state (query only). + /// + /// + /// + /// Type ALenum. + /// + /// + SourceState = AL_SOURCE_STATE, + + /// + /// Source type (query only). + /// + /// + /// + /// A Source is Static if a Buffer has been attached using AL_BUFFER. + /// + /// + /// A Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers. + /// + /// + /// A Source is Undetermined when it has the NULL buffer attached using AL_BUFFER. + /// + /// + /// Type ALenum. + /// + /// + SourceType = AL_SOURCE_TYPE, + + /// + /// Source Buffer Queue size (query only). + /// + /// + /// + /// The number of buffers queued using alSourceQueueBuffers, minus the buffers removed with + /// alSourceUnqueueBuffers. + /// + /// + /// Type ALint. + /// + /// + BuffersQueued = AL_BUFFERS_QUEUED, + + /// + /// Source Buffer Queue processed count (query only). + /// + /// + /// + /// The number of queued buffers that have been fully processed, and can be removed with + /// alSourceUnqueueBuffers. + /// + /// + /// Looping sources will never fully process buffers because they will be set to play again for when the + /// source loops. + /// + /// + /// Type ALint. + /// + /// + BuffersProcessed = AL_BUFFERS_PROCESSED, + SourceDistanceModel = AL_SOURCE_DISTANCE_MODEL, + + /// + /// Type ALenum; default AL_FALSE. + /// + DirectChannels = AL_DIRECT_CHANNELS_SOFT, + + /// + /// Type ALenum; default AL_AUTO_SOFT. + /// + SourceSpatialize = AL_SOURCE_SPATIALIZE_SOFT, + + /// + /// Type ALint. + /// + SourceResampler = AL_SOURCE_RESAMPLER_SOFT, + + /// + /// Type ALenum; default AL_NORMAL_SOFT. + /// + StereoMode = AL_STEREO_MODE_SOFT, + + /// + /// Type ALint. + /// + ByteLength = AL_BYTE_LENGTH_SOFT, + + /// + /// Type ALint. + /// + SampleLength = AL_SAMPLE_LENGTH_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSourcei64.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSourcei64.gen.cs new file mode 100644 index 0000000..a196676 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSourcei64.gen.cs @@ -0,0 +1,34 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A 64-bit-integer-valued alSourcei64SOFT/alGetSourcei64SOFT source property key. Provided by AL_SOFT_source_latency. + /// + public enum AlSourcei64 + { + /// + /// Source buffer offset, in sample frames. + /// + /// + /// + /// Type ALint; minimum 0. + /// + /// + SampleOffset = AL_SAMPLE_OFFSET, + + /// + /// Type ALint. + /// + ByteLength = AL_BYTE_LENGTH_SOFT, + + /// + /// Type ALint. + /// + SampleLength = AL_SAMPLE_LENGTH_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlSpatializeMode.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlSpatializeMode.gen.cs new file mode 100644 index 0000000..5fd3091 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlSpatializeMode.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_SOURCE_SPATIALIZE_SOFT values. + /// + public enum AlSpatializeMode + { + /// + /// Boolean False. + /// + Off = AL_FALSE, + + /// + /// Boolean True. + /// + On = AL_TRUE, + Auto = AL_AUTO_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlStereoMode.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlStereoMode.gen.cs new file mode 100644 index 0000000..e2370e7 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlStereoMode.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_STEREO_MODE_SOFT values. + /// + public enum AlStereoMode + { + Normal = AL_NORMAL_SOFT, + SuperStereo = AL_SUPER_STEREO_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherPhoneme.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherPhoneme.gen.cs new file mode 100644 index 0000000..74cefc7 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherPhoneme.gen.cs @@ -0,0 +1,45 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_VOCAL_MORPHER_PHONEMEA/AL_VOCAL_MORPHER_PHONEMEB values. + /// + public enum AlVocalMorpherPhoneme + { + A = AL_VOCAL_MORPHER_PHONEME_A, + E = AL_VOCAL_MORPHER_PHONEME_E, + I = AL_VOCAL_MORPHER_PHONEME_I, + O = AL_VOCAL_MORPHER_PHONEME_O, + U = AL_VOCAL_MORPHER_PHONEME_U, + Aa = AL_VOCAL_MORPHER_PHONEME_AA, + Ae = AL_VOCAL_MORPHER_PHONEME_AE, + Ah = AL_VOCAL_MORPHER_PHONEME_AH, + Ao = AL_VOCAL_MORPHER_PHONEME_AO, + Eh = AL_VOCAL_MORPHER_PHONEME_EH, + Er = AL_VOCAL_MORPHER_PHONEME_ER, + Ih = AL_VOCAL_MORPHER_PHONEME_IH, + Iy = AL_VOCAL_MORPHER_PHONEME_IY, + Uh = AL_VOCAL_MORPHER_PHONEME_UH, + Uw = AL_VOCAL_MORPHER_PHONEME_UW, + B = AL_VOCAL_MORPHER_PHONEME_B, + D = AL_VOCAL_MORPHER_PHONEME_D, + F = AL_VOCAL_MORPHER_PHONEME_F, + G = AL_VOCAL_MORPHER_PHONEME_G, + J = AL_VOCAL_MORPHER_PHONEME_J, + K = AL_VOCAL_MORPHER_PHONEME_K, + L = AL_VOCAL_MORPHER_PHONEME_L, + M = AL_VOCAL_MORPHER_PHONEME_M, + N = AL_VOCAL_MORPHER_PHONEME_N, + P = AL_VOCAL_MORPHER_PHONEME_P, + R = AL_VOCAL_MORPHER_PHONEME_R, + S = AL_VOCAL_MORPHER_PHONEME_S, + T = AL_VOCAL_MORPHER_PHONEME_T, + V = AL_VOCAL_MORPHER_PHONEME_V, + Z = AL_VOCAL_MORPHER_PHONEME_Z, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherWaveform.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherWaveform.gen.cs new file mode 100644 index 0000000..39ebe6d --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherWaveform.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// AL_VOCAL_MORPHER_WAVEFORM values. + /// + public enum AlVocalMorpherWaveform + { + Sinusoid = AL_VOCAL_MORPHER_WAVEFORM_SINUSOID, + Triangle = AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE, + Sawtooth = AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherf.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherf.gen.cs new file mode 100644 index 0000000..315fb59 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpherf.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// A float-valued alEffectf key for AL_EFFECT_VOCAL_MORPHER effects. + /// + public enum AlVocalMorpherf + { + /// + /// Type ALfloat; range 0.0 to 10.0; default 1.41. + /// + Rate = AL_VOCAL_MORPHER_RATE, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpheri.gen.cs b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpheri.gen.cs new file mode 100644 index 0000000..9869e33 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Enums/AlVocalMorpheri.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi.Params +{ + /// + /// An integer-valued alEffecti key for AL_EFFECT_VOCAL_MORPHER effects. + /// + public enum AlVocalMorpheri + { + /// + /// Type ALenum; default AL_VOCAL_MOPRHER_PHONEME_A. + /// + PhonemeA = AL_VOCAL_MORPHER_PHONEMEA, + PhonemeACoarseTuning = AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING, + + /// + /// Type ALenum; default AL_VOCAL_MOPRHER_PHONEME_ER. + /// + PhonemeB = AL_VOCAL_MORPHER_PHONEMEB, + PhonemeBCoarseTuning = AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING, + + /// + /// Type ALenum; default AL_VOCAL_MORPHER_WAVEFORM_SINUSOID. + /// + Waveform = AL_VOCAL_MORPHER_WAVEFORM, + } +} diff --git a/Brutal.OpenAl/Generated/Al/Params.gen.cs b/Brutal.OpenAl/Generated/Al/Params.gen.cs new file mode 100644 index 0000000..ac5c960 --- /dev/null +++ b/Brutal.OpenAl/Generated/Al/Params.gen.cs @@ -0,0 +1,107 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi.Params +{ + /// + /// Keyed source parameter access (alSourcef/alSourcei/alSource3f) as extension members on , for generic or data-driven code. Typical code uses the named properties on instead. + /// + public static class SourceParams + { + extension(AlSource source) + { + /// + /// Sets a float-valued source property (alSourcef). + /// + public void Set(AlSourcef param, float value) => Al.PInvoke.Sourcef(source.Name, (int)param, value); + + /// + /// Gets a float-valued source property (alGetSourcef). + /// + public float Get(AlSourcef param) => Al.GetSourcef(source.Name, (int)param); + + /// + /// Sets an integer-valued source property (alSourcei). + /// + public void Set(AlSourcei param, int value) => Al.PInvoke.Sourcei(source.Name, (int)param, value); + + /// + /// Gets an integer-valued source property (alGetSourcei). + /// + public int Get(AlSourcei param) => Al.GetSourcei(source.Name, (int)param); + + /// + /// Sets a -valued source property (alSource3f). + /// + public void Set(AlSource3f param, float3 value) => + Al.PInvoke.Source3f(source.Name, (int)param, value.X, value.Y, value.Z); + + /// + /// Gets a -valued source property (alGetSource3f). + /// + public float3 Get(AlSource3f param) => Al.GetSource3f(source.Name, (int)param); + + /// + /// Sets a double-valued source property (alSourcedSOFT); provided by AL_SOFT_source_latency. + /// + public void Set(AlSourced param, double value) => Al.PInvoke.SourcedSOFT(source.Name, (int)param, value); + + /// + /// Gets a double-valued source property (alGetSourcedSOFT); provided by AL_SOFT_source_latency. + /// + public double Get(AlSourced param) => Al.GetSourcedSOFT(source.Name, (int)param); + + /// + /// Sets a 64-bit-integer-valued source property (alSourcei64SOFT); provided by AL_SOFT_source_latency. + /// + public void Set(AlSourcei64 param, long value) => Al.PInvoke.Sourcei64SOFT(source.Name, (int)param, value); + + /// + /// Gets a 64-bit-integer-valued source property (alGetSourcei64SOFT); provided by AL_SOFT_source_latency. + /// + public long Get(AlSourcei64 param) => Al.GetSourcei64SOFT(source.Name, (int)param); + } + } + + /// + /// Keyed buffer query access (alGetBufferi) as an extension member on . All keys are get-only. Typical code uses the named properties on instead. + /// + public static class BufferParams + { + extension(AlBuffer buffer) + { + /// + /// Gets an integer-valued buffer query (alGetBufferi). + /// + public int Get(AlBufferi param) => Al.GetBufferi(buffer.Name, (int)param); + } + } + + /// + /// Keyed listener parameter access (alListenerf/alListener3f). The listener is per-context state with no handle, so these are plain statics. Typical code uses the named properties on instead. + /// + public static class ListenerParams + { + /// + /// Sets a float-valued listener property (alListenerf). + /// + public static void Set(AlListenerf param, float value) => Al.PInvoke.Listenerf((int)param, value); + + /// + /// Gets a float-valued listener property (alGetListenerf). + /// + public static float Get(AlListenerf param) => Al.GetListenerf((int)param); + + /// + /// Sets a -valued listener property (alListener3f). + /// + public static void Set(AlListener3f param, float3 value) => + Al.PInvoke.Listener3f((int)param, value.X, value.Y, value.Z); + + /// + /// Gets a -valued listener property (alGetListener3f). + /// + public static float3 Get(AlListener3f param) => Al.GetListener3f((int)param); + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Alc.Constants.gen.cs b/Brutal.OpenAl/Generated/Alc/Alc.Constants.gen.cs new file mode 100644 index 0000000..13557a7 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Alc.Constants.gen.cs @@ -0,0 +1,101 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Alc + { + public static class Constants + { + [Obsolete("Use 0 instead")] + public const int ALC_INVALID = unchecked((int)0); + public const int ALC_FALSE = unchecked((int)0); + public const int ALC_TRUE = unchecked((int)1); + public const int ALC_FREQUENCY = unchecked((int)0x1007); + public const int ALC_REFRESH = unchecked((int)0x1008); + public const int ALC_SYNC = unchecked((int)0x1009); + public const int ALC_NO_ERROR = unchecked((int)0); + public const int ALC_INVALID_DEVICE = unchecked((int)0xA001); + public const int ALC_INVALID_CONTEXT = unchecked((int)0xA002); + public const int ALC_INVALID_ENUM = unchecked((int)0xA003); + public const int ALC_INVALID_VALUE = unchecked((int)0xA004); + public const int ALC_OUT_OF_MEMORY = unchecked((int)0xA005); + public const int ALC_MAJOR_VERSION = unchecked((int)0x1000); + public const int ALC_MINOR_VERSION = unchecked((int)0x1001); + public const int ALC_ATTRIBUTES_SIZE = unchecked((int)0x1002); + public const int ALC_ALL_ATTRIBUTES = unchecked((int)0x1003); + public const int ALC_DEFAULT_DEVICE_SPECIFIER = unchecked((int)0x1004); + public const int ALC_DEVICE_SPECIFIER = unchecked((int)0x1005); + public const int ALC_EXTENSIONS = unchecked((int)0x1006); + public const int ALC_MONO_SOURCES = unchecked((int)0x1010); + public const int ALC_STEREO_SOURCES = unchecked((int)0x1011); + public const int ALC_CAPTURE_DEVICE_SPECIFIER = unchecked((int)0x310); + public const int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = unchecked((int)0x311); + public const int ALC_CAPTURE_SAMPLES = unchecked((int)0x312); + public const int ALC_DEFAULT_ALL_DEVICES_SPECIFIER = unchecked((int)0x1012); + public const int ALC_ALL_DEVICES_SPECIFIER = unchecked((int)0x1013); + public const int ALC_EFX_MAJOR_VERSION = unchecked((int)0x20001); + public const int ALC_EFX_MINOR_VERSION = unchecked((int)0x20002); + public const int ALC_MAX_AUXILIARY_SENDS = unchecked((int)0x20003); + public const int ALC_CONNECTED = unchecked((int)0x313); + public const int ALC_FORMAT_CHANNELS_SOFT = unchecked((int)0x1990); + public const int ALC_FORMAT_TYPE_SOFT = unchecked((int)0x1991); + public const int ALC_BYTE_SOFT = unchecked((int)0x1400); + public const int ALC_UNSIGNED_BYTE_SOFT = unchecked((int)0x1401); + public const int ALC_SHORT_SOFT = unchecked((int)0x1402); + public const int ALC_UNSIGNED_SHORT_SOFT = unchecked((int)0x1403); + public const int ALC_INT_SOFT = unchecked((int)0x1404); + public const int ALC_UNSIGNED_INT_SOFT = unchecked((int)0x1405); + public const int ALC_FLOAT_SOFT = unchecked((int)0x1406); + public const int ALC_MONO_SOFT = unchecked((int)0x1500); + public const int ALC_STEREO_SOFT = unchecked((int)0x1501); + public const int ALC_QUAD_SOFT = unchecked((int)0x1503); + public const int ALC_5POINT1_SOFT = unchecked((int)0x1504); + public const int ALC_6POINT1_SOFT = unchecked((int)0x1505); + public const int ALC_7POINT1_SOFT = unchecked((int)0x1506); + public const int ALC_HRTF_SOFT = unchecked((int)0x1992); + public const int ALC_DONT_CARE_SOFT = unchecked((int)0x0002); + public const int ALC_HRTF_STATUS_SOFT = unchecked((int)0x1993); + public const int ALC_HRTF_DISABLED_SOFT = unchecked((int)0x0000); + public const int ALC_HRTF_ENABLED_SOFT = unchecked((int)0x0001); + public const int ALC_HRTF_DENIED_SOFT = unchecked((int)0x0002); + public const int ALC_HRTF_REQUIRED_SOFT = unchecked((int)0x0003); + public const int ALC_HRTF_HEADPHONES_DETECTED_SOFT = unchecked((int)0x0004); + public const int ALC_HRTF_UNSUPPORTED_FORMAT_SOFT = unchecked((int)0x0005); + public const int ALC_NUM_HRTF_SPECIFIERS_SOFT = unchecked((int)0x1994); + public const int ALC_HRTF_SPECIFIER_SOFT = unchecked((int)0x1995); + public const int ALC_HRTF_ID_SOFT = unchecked((int)0x1996); + public const int ALC_OUTPUT_LIMITER_SOFT = unchecked((int)0x199A); + public const int ALC_DEVICE_CLOCK_SOFT = unchecked((int)0x1600); + public const int ALC_DEVICE_LATENCY_SOFT = unchecked((int)0x1601); + public const int ALC_DEVICE_CLOCK_LATENCY_SOFT = unchecked((int)0x1602); + public const int ALC_AMBISONIC_LAYOUT_SOFT = unchecked((int)0x1997); + public const int ALC_AMBISONIC_SCALING_SOFT = unchecked((int)0x1998); + public const int ALC_AMBISONIC_ORDER_SOFT = unchecked((int)0x1999); + public const int ALC_MAX_AMBISONIC_ORDER_SOFT = unchecked((int)0x199B); + public const int ALC_BFORMAT3D_SOFT = unchecked((int)0x1507); + public const int ALC_FUMA_SOFT = unchecked((int)0x0000); + public const int ALC_ACN_SOFT = unchecked((int)0x0001); + public const int ALC_SN3D_SOFT = unchecked((int)0x0001); + public const int ALC_N3D_SOFT = unchecked((int)0x0002); + public const int ALC_OUTPUT_MODE_SOFT = unchecked((int)0x19AC); + public const int ALC_ANY_SOFT = unchecked((int)0x19AD); + public const int ALC_STEREO_BASIC_SOFT = unchecked((int)0x19AE); + public const int ALC_STEREO_UHJ_SOFT = unchecked((int)0x19AF); + public const int ALC_STEREO_HRTF_SOFT = unchecked((int)0x19B2); + public const int ALC_SURROUND_5_1_SOFT = unchecked((int)0x1504); + public const int ALC_SURROUND_6_1_SOFT = unchecked((int)0x1505); + public const int ALC_SURROUND_7_1_SOFT = unchecked((int)0x1506); + public const int ALC_CONTEXT_FLAGS_EXT = unchecked((int)0x19CF); + public const int ALC_CONTEXT_DEBUG_BIT_EXT = unchecked((int)0x0001); + public const int ALC_PLAYBACK_DEVICE_SOFT = unchecked((int)0x19D4); + public const int ALC_CAPTURE_DEVICE_SOFT = unchecked((int)0x19D5); + public const int ALC_EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT = unchecked((int)0x19D6); + public const int ALC_EVENT_TYPE_DEVICE_ADDED_SOFT = unchecked((int)0x19D7); + public const int ALC_EVENT_TYPE_DEVICE_REMOVED_SOFT = unchecked((int)0x19D8); + public const int ALC_EVENT_SUPPORTED_SOFT = unchecked((int)0x19D9); + public const int ALC_EVENT_NOT_SUPPORTED_SOFT = unchecked((int)0x19DA); + } + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Alc.Ext.gen.cs b/Brutal.OpenAl/Generated/Alc/Alc.Ext.gen.cs new file mode 100644 index 0000000..0891724 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Alc.Ext.gen.cs @@ -0,0 +1,289 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + using unsafe DevicePauseSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe DeviceResumeSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe EventCallbackSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe EventControlSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe EventIsSupportedSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetInteger64vSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetStringiSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe GetThreadContextFn = delegate* unmanaged[Cdecl]; + using unsafe IsRenderFormatSupportedSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe LoopbackOpenDeviceSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe RenderSamplesSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe ReopenDeviceSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe ResetDeviceSOFTFn = delegate* unmanaged[Cdecl]; + using unsafe SetThreadContextFn = delegate* unmanaged[Cdecl]; + + public static unsafe partial class Alc + { + /// + /// Cached unmanaged function pointers for the in-scope alext.h entry points, each resolved once via alcGetProcAddress against the null device. A null field means the loaded binary does not export that symbol; the paired method throws instead of dereferencing it. + /// + internal static unsafe class ExtPointers + { + internal static readonly SetThreadContextFn alcSetThreadContext = (SetThreadContextFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcSetThreadContext"u8); + internal static readonly GetThreadContextFn alcGetThreadContext = (GetThreadContextFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcGetThreadContext"u8); + internal static readonly LoopbackOpenDeviceSOFTFn alcLoopbackOpenDeviceSOFT = (LoopbackOpenDeviceSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcLoopbackOpenDeviceSOFT"u8); + internal static readonly IsRenderFormatSupportedSOFTFn alcIsRenderFormatSupportedSOFT = + (IsRenderFormatSupportedSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcIsRenderFormatSupportedSOFT"u8); + internal static readonly RenderSamplesSOFTFn alcRenderSamplesSOFT = (RenderSamplesSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcRenderSamplesSOFT"u8); + internal static readonly DevicePauseSOFTFn alcDevicePauseSOFT = (DevicePauseSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcDevicePauseSOFT"u8); + internal static readonly DeviceResumeSOFTFn alcDeviceResumeSOFT = (DeviceResumeSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcDeviceResumeSOFT"u8); + internal static readonly GetStringiSOFTFn alcGetStringiSOFT = (GetStringiSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcGetStringiSOFT"u8); + internal static readonly ResetDeviceSOFTFn alcResetDeviceSOFT = (ResetDeviceSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcResetDeviceSOFT"u8); + internal static readonly GetInteger64vSOFTFn alcGetInteger64vSOFT = (GetInteger64vSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcGetInteger64vSOFT"u8); + internal static readonly ReopenDeviceSOFTFn alcReopenDeviceSOFT = (ReopenDeviceSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcReopenDeviceSOFT"u8); + internal static readonly EventIsSupportedSOFTFn alcEventIsSupportedSOFT = (EventIsSupportedSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcEventIsSupportedSOFT"u8); + internal static readonly EventControlSOFTFn alcEventControlSOFT = (EventControlSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcEventControlSOFT"u8); + internal static readonly EventCallbackSOFTFn alcEventCallbackSOFT = (EventCallbackSOFTFn) + Alc.GetProcAddressUtf8(AlcDevice.Null, "alcEventCallbackSOFT"u8); + } + + public static partial class PInvoke + { + /// + /// + /// + /// + /// Provided by ALC_EXT_thread_local_context. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static Bool8 SetThreadContext(AlcContext context) + { + if (ExtPointers.alcSetThreadContext is null) + { + AlExtensionException.ThrowMissing("alcSetThreadContext", "ALC_EXT_thread_local_context"); + } + return ExtPointers.alcSetThreadContext(context.Pointer.Value); + } + + /// + /// + /// + /// + /// Provided by ALC_EXT_thread_local_context. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static AlcContext GetThreadContext() + { + if (ExtPointers.alcGetThreadContext is null) + { + AlExtensionException.ThrowMissing("alcGetThreadContext", "ALC_EXT_thread_local_context"); + } + var result = ExtPointers.alcGetThreadContext(); + return (void*)result; + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_loopback. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static AlcDevice LoopbackOpenDeviceSOFT(byte* deviceName) + { + if (ExtPointers.alcLoopbackOpenDeviceSOFT is null) + { + AlExtensionException.ThrowMissing("alcLoopbackOpenDeviceSOFT", "ALC_SOFT_loopback"); + } + var result = ExtPointers.alcLoopbackOpenDeviceSOFT(deviceName); + return (void*)result; + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_loopback. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static Bool8 IsRenderFormatSupportedSOFT(AlcDevice device, int freq, int channels, int type) + { + if (ExtPointers.alcIsRenderFormatSupportedSOFT is null) + { + AlExtensionException.ThrowMissing("alcIsRenderFormatSupportedSOFT", "ALC_SOFT_loopback"); + } + return ExtPointers.alcIsRenderFormatSupportedSOFT(device.Pointer.Value, freq, channels, type); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_loopback. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void RenderSamplesSOFT(AlcDevice device, void* buffer, int samples) + { + if (ExtPointers.alcRenderSamplesSOFT is null) + { + AlExtensionException.ThrowMissing("alcRenderSamplesSOFT", "ALC_SOFT_loopback"); + } + ExtPointers.alcRenderSamplesSOFT(device.Pointer.Value, buffer, samples); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_pause_device. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void DevicePauseSOFT(AlcDevice device) + { + if (ExtPointers.alcDevicePauseSOFT is null) + { + AlExtensionException.ThrowMissing("alcDevicePauseSOFT", "ALC_SOFT_pause_device"); + } + ExtPointers.alcDevicePauseSOFT(device.Pointer.Value); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_pause_device. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void DeviceResumeSOFT(AlcDevice device) + { + if (ExtPointers.alcDeviceResumeSOFT is null) + { + AlExtensionException.ThrowMissing("alcDeviceResumeSOFT", "ALC_SOFT_pause_device"); + } + ExtPointers.alcDeviceResumeSOFT(device.Pointer.Value); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_HRTF. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static byte* GetStringiSOFT(AlcDevice device, int paramName, int index) + { + if (ExtPointers.alcGetStringiSOFT is null) + { + AlExtensionException.ThrowMissing("alcGetStringiSOFT", "ALC_SOFT_HRTF"); + } + return ExtPointers.alcGetStringiSOFT(device.Pointer.Value, paramName, index); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_HRTF. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static Bool8 ResetDeviceSOFT(AlcDevice device, int* attribs) + { + if (ExtPointers.alcResetDeviceSOFT is null) + { + AlExtensionException.ThrowMissing("alcResetDeviceSOFT", "ALC_SOFT_HRTF"); + } + return ExtPointers.alcResetDeviceSOFT(device.Pointer.Value, attribs); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_device_clock. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void GetInteger64vSOFT(AlcDevice device, int pname, int size, long* values) + { + if (ExtPointers.alcGetInteger64vSOFT is null) + { + AlExtensionException.ThrowMissing("alcGetInteger64vSOFT", "ALC_SOFT_device_clock"); + } + ExtPointers.alcGetInteger64vSOFT(device.Pointer.Value, pname, size, values); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_reopen_device. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static Bool8 ReopenDeviceSOFT(AlcDevice device, byte* deviceName, int* attribs) + { + if (ExtPointers.alcReopenDeviceSOFT is null) + { + AlExtensionException.ThrowMissing("alcReopenDeviceSOFT", "ALC_SOFT_reopen_device"); + } + return ExtPointers.alcReopenDeviceSOFT(device.Pointer.Value, deviceName, attribs); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_system_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static int EventIsSupportedSOFT(int eventType, int deviceType) + { + if (ExtPointers.alcEventIsSupportedSOFT is null) + { + AlExtensionException.ThrowMissing("alcEventIsSupportedSOFT", "ALC_SOFT_system_events"); + } + return ExtPointers.alcEventIsSupportedSOFT(eventType, deviceType); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_system_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static Bool8 EventControlSOFT(int count, int* events, Bool8 enable) + { + if (ExtPointers.alcEventControlSOFT is null) + { + AlExtensionException.ThrowMissing("alcEventControlSOFT", "ALC_SOFT_system_events"); + } + return ExtPointers.alcEventControlSOFT(count, events, enable); + } + + /// + /// + /// + /// + /// Provided by ALC_SOFT_system_events. Dispatched via alcGetProcAddress; throws if the loaded binary lacks it. + /// + /// + public static void EventCallbackSOFT(void* callback, void* userParam) + { + if (ExtPointers.alcEventCallbackSOFT is null) + { + AlExtensionException.ThrowMissing("alcEventCallbackSOFT", "ALC_SOFT_system_events"); + } + ExtPointers.alcEventCallbackSOFT(callback, userParam); + } + } + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Alc.PInvoke.gen.cs b/Brutal.OpenAl/Generated/Alc/Alc.PInvoke.gen.cs new file mode 100644 index 0000000..27544f1 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Alc.PInvoke.gen.cs @@ -0,0 +1,122 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.OpenAlApi +{ + public static unsafe partial class Alc + { + public static partial class PInvoke + { + /// + /// Create and attach a context to the given device. + /// + [LibraryImport(Dll, EntryPoint = "alcCreateContext")] + public static partial AlcContext CreateContext(AlcDevice device, int* attrlist); + + [LibraryImport(Dll, EntryPoint = "alcMakeContextCurrent")] + public static partial Bool8 MakeContextCurrent(AlcContext context); + + /// + /// Resumes processing updates for the given context. + /// + [LibraryImport(Dll, EntryPoint = "alcProcessContext")] + public static partial void ProcessContext(AlcContext context); + + /// + /// Suspends updates for the given context. + /// + [LibraryImport(Dll, EntryPoint = "alcSuspendContext")] + public static partial void SuspendContext(AlcContext context); + + /// + /// Remove a context from its device and destroys it. + /// + [LibraryImport(Dll, EntryPoint = "alcDestroyContext")] + public static partial void DestroyContext(AlcContext context); + + /// + /// Returns the currently active context. + /// + [LibraryImport(Dll, EntryPoint = "alcGetCurrentContext")] + public static partial AlcContext GetCurrentContext(); + + /// + /// Returns the device that a particular context is attached to. + /// + [LibraryImport(Dll, EntryPoint = "alcGetContextsDevice")] + public static partial AlcDevice GetContextsDevice(AlcContext context); + + /// + /// Opens the named playback device. + /// + [LibraryImport(Dll, EntryPoint = "alcOpenDevice")] + public static partial AlcDevice OpenDevice(byte* devicename); + + /// + /// Closes the given playback device. + /// + [LibraryImport(Dll, EntryPoint = "alcCloseDevice")] + public static partial Bool8 CloseDevice(AlcDevice device); + + /// + /// Obtain the most recent Device error. + /// + [LibraryImport(Dll, EntryPoint = "alcGetError")] + public static partial int GetError(AlcDevice device); + + [LibraryImport(Dll, EntryPoint = "alcIsExtensionPresent")] + public static partial Bool8 IsExtensionPresent(AlcDevice device, byte* extname); + + [LibraryImport(Dll, EntryPoint = "alcGetProcAddress")] + public static partial void* GetProcAddress(AlcDevice device, byte* funcname); + + [LibraryImport(Dll, EntryPoint = "alcGetEnumValue")] + public static partial int GetEnumValue(AlcDevice device, byte* enumname); + + /// + /// Returns information about the device, and error strings. + /// + [LibraryImport(Dll, EntryPoint = "alcGetString")] + public static partial byte* GetString(AlcDevice device, int param); + + /// + /// Returns information about the device and the version of OpenAL. + /// + [LibraryImport(Dll, EntryPoint = "alcGetIntegerv")] + public static partial void GetIntegerv(AlcDevice device, int param, int size, int* values); + + [LibraryImport(Dll, EntryPoint = "alcCaptureOpenDevice")] + public static partial AlcCaptureDevice CaptureOpenDevice( + byte* devicename, + uint frequency, + int format, + int buffersize + ); + + /// + /// Closes the given capture device. + /// + [LibraryImport(Dll, EntryPoint = "alcCaptureCloseDevice")] + public static partial Bool8 CaptureCloseDevice(AlcCaptureDevice device); + + /// + /// Starts capturing samples into the device buffer. + /// + [LibraryImport(Dll, EntryPoint = "alcCaptureStart")] + public static partial void CaptureStart(AlcCaptureDevice device); + + /// + /// Stops capturing samples. Samples in the device buffer remain available. + /// + [LibraryImport(Dll, EntryPoint = "alcCaptureStop")] + public static partial void CaptureStop(AlcCaptureDevice device); + + /// + /// Reads samples from the device buffer. + /// + [LibraryImport(Dll, EntryPoint = "alcCaptureSamples")] + public static partial void CaptureSamples(AlcCaptureDevice device, void* buffer, int samples); + } + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicLayout.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicLayout.gen.cs new file mode 100644 index 0000000..69caaf2 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicLayout.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_AMBISONIC_LAYOUT_SOFT values. + /// + public enum AlcAmbisonicLayout + { + Fuma = ALC_FUMA_SOFT, + Acn = ALC_ACN_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicScaling.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicScaling.gen.cs new file mode 100644 index 0000000..6745b1a --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcAmbisonicScaling.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_AMBISONIC_SCALING_SOFT values. + /// + public enum AlcAmbisonicScaling + { + Fuma = ALC_FUMA_SOFT, + Sn3d = ALC_SN3D_SOFT, + N3d = ALC_N3D_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcChannelLayout.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcChannelLayout.gen.cs new file mode 100644 index 0000000..1a5b047 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcChannelLayout.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_FORMAT_CHANNELS_SOFT values. + /// + public enum AlcChannelLayout + { + Mono = ALC_MONO_SOFT, + Stereo = ALC_STEREO_SOFT, + Quad = ALC_QUAD_SOFT, + Surround51 = ALC_5POINT1_SOFT, + Surround61 = ALC_6POINT1_SOFT, + Surround71 = ALC_7POINT1_SOFT, + Bformat3d = ALC_BFORMAT3D_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcContextAttribute.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcContextAttribute.gen.cs new file mode 100644 index 0000000..f9b547a --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcContextAttribute.gen.cs @@ -0,0 +1,66 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alcCreateContext values. + /// + public enum AlcContextAttribute + { + /// + /// Context attribute: <int> Hz. + /// + Frequency = ALC_FREQUENCY, + + /// + /// Context attribute: <int> Hz. + /// + Refresh = ALC_REFRESH, + + /// + /// Context attribute: AL_TRUE or AL_FALSE synchronous context? + /// + Sync = ALC_SYNC, + + /// + /// Context attribute: <int> requested Mono (3D) Sources. + /// + MonoSources = ALC_MONO_SOURCES, + + /// + /// Context attribute: <int> requested Stereo Sources. + /// + StereoSources = ALC_STEREO_SOURCES, + MaxAuxiliarySends = ALC_MAX_AUXILIARY_SENDS, + + /// + /// Type ALCenum. + /// + Hrtf = ALC_HRTF_SOFT, + HrtfId = ALC_HRTF_ID_SOFT, + + /// + /// Type ALCenum; default ALC_ANY_SOFT. + /// + OutputMode = ALC_OUTPUT_MODE_SOFT, + + /// + /// Type ALCenum. + /// + OutputLimiter = ALC_OUTPUT_LIMITER_SOFT, + FormatChannels = ALC_FORMAT_CHANNELS_SOFT, + FormatType = ALC_FORMAT_TYPE_SOFT, + AmbisonicLayout = ALC_AMBISONIC_LAYOUT_SOFT, + AmbisonicScaling = ALC_AMBISONIC_SCALING_SOFT, + AmbisonicOrder = ALC_AMBISONIC_ORDER_SOFT, + + /// + /// Type ALCenum. + /// + ContextFlags = ALC_CONTEXT_FLAGS_EXT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcDeviceType.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcDeviceType.gen.cs new file mode 100644 index 0000000..1c34af7 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcDeviceType.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_EVENT_TYPE_DEVICE_ADDED_SOFT/ALC_EVENT_TYPE_DEVICE_REMOVED_SOFT values. + /// + public enum AlcDeviceType + { + Playback = ALC_PLAYBACK_DEVICE_SOFT, + Capture = ALC_CAPTURE_DEVICE_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcError.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcError.gen.cs new file mode 100644 index 0000000..fb37233 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcError.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alcGetError values. + /// + public enum AlcError + { + /// + /// No error. + /// + NoError = ALC_NO_ERROR, + + /// + /// Invalid device handle. + /// + InvalidDevice = ALC_INVALID_DEVICE, + + /// + /// Invalid context handle. + /// + InvalidContext = ALC_INVALID_CONTEXT, + + /// + /// Invalid enumeration passed to an ALC call. + /// + InvalidEnum = ALC_INVALID_ENUM, + + /// + /// Invalid value passed to an ALC call. + /// + InvalidValue = ALC_INVALID_VALUE, + + /// + /// Out of memory. + /// + OutOfMemory = ALC_OUT_OF_MEMORY, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcEventType.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcEventType.gen.cs new file mode 100644 index 0000000..97b8b34 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcEventType.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alcEventCallbackSOFT values. + /// + public enum AlcEventType + { + DefaultDeviceChanged = ALC_EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT, + DeviceAdded = ALC_EVENT_TYPE_DEVICE_ADDED_SOFT, + DeviceRemoved = ALC_EVENT_TYPE_DEVICE_REMOVED_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcGetString.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcGetString.gen.cs new file mode 100644 index 0000000..03f7f23 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcGetString.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alcGetString values. + /// + public enum AlcGetString + { + /// + /// + /// Capture specifier string. + /// + /// + /// If device handle is NULL, it is instead a null-character separated list of strings of known device + /// specifiers (list ends with an empty string). + /// + /// + CaptureDeviceSpecifier = ALC_CAPTURE_DEVICE_SPECIFIER, + + /// + /// String for the default capture device specifier. + /// + CaptureDefaultDeviceSpecifier = ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, + + /// + /// String for the default device specifier. + /// + DefaultDeviceSpecifier = ALC_DEFAULT_DEVICE_SPECIFIER, + + /// + /// + /// Device specifier string. + /// + /// + /// If device handle is NULL, it is instead a null-character separated list of strings of known device + /// specifiers (list ends with an empty string). + /// + /// + DeviceSpecifier = ALC_DEVICE_SPECIFIER, + + /// + /// String for space-separated list of ALC extensions. + /// + Extensions = ALC_EXTENSIONS, + + /// + /// String for the default extended device specifier. + /// + DefaultAllDevicesSpecifier = ALC_DEFAULT_ALL_DEVICES_SPECIFIER, + + /// + /// + /// Device's extended specifier string. + /// + /// + /// If device handle is NULL, it is instead a null-character separated list of strings of known extended + /// device specifiers (list ends with an empty string). + /// + /// + AllDevicesSpecifier = ALC_ALL_DEVICES_SPECIFIER, + + /// + /// Type ALCstring. + /// + HrtfSpecifier = ALC_HRTF_SPECIFIER_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcHrtfStatus.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcHrtfStatus.gen.cs new file mode 100644 index 0000000..b4312cb --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcHrtfStatus.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_HRTF_STATUS_SOFT values. + /// + public enum AlcHrtfStatus + { + Disabled = ALC_HRTF_DISABLED_SOFT, + Enabled = ALC_HRTF_ENABLED_SOFT, + Denied = ALC_HRTF_DENIED_SOFT, + Required = ALC_HRTF_REQUIRED_SOFT, + HeadphonesDetected = ALC_HRTF_HEADPHONES_DETECTED_SOFT, + UnsupportedFormat = ALC_HRTF_UNSUPPORTED_FORMAT_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcInteger.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcInteger.gen.cs new file mode 100644 index 0000000..3cfcee5 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcInteger.gen.cs @@ -0,0 +1,72 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// alcGetIntegerv values. + /// + public enum AlcInteger + { + /// + /// Runtime ALC major version. + /// + MajorVersion = ALC_MAJOR_VERSION, + + /// + /// Runtime ALC minor version. + /// + MinorVersion = ALC_MINOR_VERSION, + + /// + /// Context attribute list size. + /// + AttributesSize = ALC_ATTRIBUTES_SIZE, + + /// + /// Context attribute list properties. + /// + AllAttributes = ALC_ALL_ATTRIBUTES, + + /// + /// Number of sample frames available for capture. + /// + CaptureSamples = ALC_CAPTURE_SAMPLES, + EfxMajorVersion = ALC_EFX_MAJOR_VERSION, + EfxMinorVersion = ALC_EFX_MINOR_VERSION, + MaxAuxiliarySends = ALC_MAX_AUXILIARY_SENDS, + + /// + /// Type ALCboolean. + /// + Connected = ALC_CONNECTED, + + /// + /// Type ALCenum. + /// + HrtfStatus = ALC_HRTF_STATUS_SOFT, + + /// + /// Type ALCint. + /// + NumHrtfSpecifiers = ALC_NUM_HRTF_SPECIFIERS_SOFT, + + /// + /// Type ALCenum; default ALC_ANY_SOFT. + /// + OutputMode = ALC_OUTPUT_MODE_SOFT, + + /// + /// Type ALCenum. + /// + OutputLimiter = ALC_OUTPUT_LIMITER_SOFT, + + /// + /// Type ALCint. + /// + MaxAmbisonicOrder = ALC_MAX_AMBISONIC_ORDER_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcOutputMode.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcOutputMode.gen.cs new file mode 100644 index 0000000..4af8dd1 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcOutputMode.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_OUTPUT_MODE_SOFT values. + /// + public enum AlcOutputMode + { + Any = ALC_ANY_SOFT, + Mono = ALC_MONO_SOFT, + Stereo = ALC_STEREO_SOFT, + StereoBasic = ALC_STEREO_BASIC_SOFT, + StereoUhj = ALC_STEREO_UHJ_SOFT, + StereoHrtf = ALC_STEREO_HRTF_SOFT, + Quad = ALC_QUAD_SOFT, + Surround51 = ALC_SURROUND_5_1_SOFT, + Surround61 = ALC_SURROUND_6_1_SOFT, + Surround71 = ALC_SURROUND_7_1_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Enums/AlcSampleType.gen.cs b/Brutal.OpenAl/Generated/Alc/Enums/AlcSampleType.gen.cs new file mode 100644 index 0000000..4596152 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Enums/AlcSampleType.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using static Brutal.OpenAlApi.Alc.Constants; + +namespace Brutal.OpenAlApi +{ + /// + /// ALC_FORMAT_TYPE_SOFT values. + /// + public enum AlcSampleType + { + Byte = ALC_BYTE_SOFT, + UnsignedByte = ALC_UNSIGNED_BYTE_SOFT, + Short = ALC_SHORT_SOFT, + UnsignedShort = ALC_UNSIGNED_SHORT_SOFT, + Int = ALC_INT_SOFT, + UnsignedInt = ALC_UNSIGNED_INT_SOFT, + Float = ALC_FLOAT_SOFT, + } +} diff --git a/Brutal.OpenAl/Generated/Alc/Handles.gen.cs b/Brutal.OpenAl/Generated/Alc/Handles.gen.cs new file mode 100644 index 0000000..b6a1678 --- /dev/null +++ b/Brutal.OpenAl/Generated/Alc/Handles.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.OpenAl.Generate; do not edit by hand. +#nullable enable + +using Brutal.Interop; + +namespace Brutal.OpenAlApi +{ + [InteropHandle] + public readonly unsafe partial struct AlcDevice : INullable + { + /// + /// The null device handle. + /// + public static AlcDevice Null + { + get => default; + } + } + + [InteropHandle] + public readonly unsafe partial struct AlcContext : INullable + { + /// + /// The null context handle. + /// + public static AlcContext Null + { + get => default; + } + } + + [InteropHandle] + public readonly unsafe partial struct AlcCaptureDevice : INullable + { + /// + /// The null capture-device handle. + /// + public static AlcCaptureDevice Null + { + get => default; + } + } +} diff --git a/Brutal.OpenAl/GlobalUsings.cs b/Brutal.OpenAl/GlobalUsings.cs new file mode 100644 index 0000000..e0ffbef --- /dev/null +++ b/Brutal.OpenAl/GlobalUsings.cs @@ -0,0 +1,6 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using System.Text; +global using Brutal; +global using Brutal.Numerics; +global using CommunityToolkit.HighPerformance; diff --git a/Brutal.OpenAl/LICENSES/BRUTAL-OPENAL-THIRD-PARTY-NOTICES.txt b/Brutal.OpenAl/LICENSES/BRUTAL-OPENAL-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..995c46f --- /dev/null +++ b/Brutal.OpenAl/LICENSES/BRUTAL-OPENAL-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,666 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.OpenAl + +This package redistributes the third-party components listed below, each reproduced +with the license that governs it. + + One native library, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + OpenAL Soft 1.25.2 OpenAL32.dll / libopenal.so.1 / libopenal.1.dylib + + Five sections follow. OpenAL Soft's own code is under the GNU Library General Public + License, Version 2. Four further components are compiled into that same library and + carry their own terms: + + Spherical-Harmonic-Transform the BSD 3-Clause portions of OpenAL Soft + PFFFT, modified the bundled FFT + {fmt} 11.2.0 formatting + Microsoft GSL 4.2.0 C++ Core Guidelines support headers + + Every license text below also ships beside this file, byte for byte as OpenAL Soft + publishes it, under the file name given in each section. + + Not contained in this package: the audio backends OpenAL Soft drives - WASAPI, + DirectSound, ALSA, PulseAudio, PipeWire, JACK, CoreAudio and the rest - belong to the + host operating system. OpenAL Soft's HRTF data sets, ambisonic decoder presets, sample + configuration file, utility programs, examples and tests are not built and not shipped. + Google Test, named in Microsoft GSL's own third-party notices as a dependency of GSL's + tests, is not contained here either. The managed Brutal.OpenAl assembly is RocketWerkz's + own work and is not covered by any license below. + + +============================================================================== +OpenAL Soft +============================================================================== + + Name OpenAL Soft + Version 1.25.2, built from commit dd4e07de0fe73d8c0326c4502f63e71da8ef268b + Upstream https://openal-soft.org -- https://github.com/kcat/openal-soft + SPDX LGPL-2.0-or-later + Shipped as OpenAL32.dll, libopenal.so.1, libopenal.1.dylib - built from unmodified + upstream source at the commit above, which is public at that URL + License file openal-soft-COPYING.txt + + OpenAL Soft's source files state their terms as: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + The text below is the one OpenAL Soft distributes with it, titled "GNU LIBRARY GENERAL + PUBLIC LICENSE, Version 2, June 1991" - the Library GPL, which SPDX identifies as + LGPL-2.0. It is a separate license from the LGPL 2.1. + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + +============================================================================== +OpenAL Soft -- BSD 3-Clause portions +============================================================================== + + Name Spherical-Harmonic-Transform, with further contributions, as contained + in OpenAL Soft 1.25.2 + Version as contained in OpenAL Soft 1.25.2 + Upstream https://github.com/kcat/openal-soft + SPDX BSD-3-Clause + Shipped as compiled into the OpenAL Soft binaries above: the spherical-harmonic + rotation used by the mixer, and the compressor and vocal-morpher effects + License file openal-soft-BSD-3Clause.txt + + OpenAL Soft distributes this text as one file covering "portions of this software" + without listing them, and it is reproduced as published. + +Portions of this software are licensed under the BSD 3-Clause license. + +Copyright (c) 2015, Archontis Politis +Copyright (c) 2019, Anis A. Hireche +Copyright (c) 2019, Christopher Robinson +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Spherical-Harmonic-Transform nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +============================================================================== +PFFFT +============================================================================== + + Name PFFFT, as modified and bundled by OpenAL Soft + Version as contained in OpenAL Soft 1.25.2 + Upstream https://github.com/kcat/openal-soft + SPDX not stated upstream; the text below is reproduced in full + Shipped as compiled into the OpenAL Soft binaries above + License file openal-soft-LICENSE-pffft.txt + +A modified PFFFT is included, with the following license. + +Copyright (c) 2023 Christopher Robinson + +Copyright (c) 2013 Julien Pommier ( pommier@modartt.com ) + +Copyright (c) 2004 the University Corporation for Atmospheric +Research ("UCAR"). All rights reserved. Developed by NCAR's +Computational and Information Systems Laboratory, UCAR, +www.cisl.ucar.edu. + +Redistribution and use of the Software in source and binary forms, +with or without modification, is permitted provided that the +following conditions are met: + +- Neither the names of NCAR's Computational and Information Systems +Laboratory, the University Corporation for Atmospheric Research, +nor the names of its sponsors or contributors may be used to +endorse or promote products derived from this Software without +specific prior written permission. + +- Redistributions of source code must retain the above copyright +notices, this list of conditions, and the disclaimer below. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions, and the disclaimer below in the +documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + + +============================================================================== +{fmt} +============================================================================== + + Name {fmt} + Version 11.2.0 + Upstream https://github.com/fmtlib/fmt + SPDX MIT, with the optional exception reproduced at the end of the text below + Shipped as compiled into the OpenAL Soft binaries above + License file openal-soft-fmt-LICENSE.txt + +Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + + +============================================================================== +Microsoft GSL +============================================================================== + + Name GSL: Guidelines Support Library + Version 4.2.0 + Upstream https://github.com/microsoft/GSL + SPDX MIT + Shipped as header-only, compiled into the OpenAL Soft binaries above + License file openal-soft-gsl-LICENSE.txt + +Copyright (c) 2015 Microsoft Corporation. All rights reserved. + +This code is licensed under the MIT License (MIT). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Brutal.OpenAl/LICENSES/openal-soft-BSD-3Clause.txt b/Brutal.OpenAl/LICENSES/openal-soft-BSD-3Clause.txt new file mode 100644 index 0000000..b1c2dbd --- /dev/null +++ b/Brutal.OpenAl/LICENSES/openal-soft-BSD-3Clause.txt @@ -0,0 +1,31 @@ +Portions of this software are licensed under the BSD 3-Clause license. + +Copyright (c) 2015, Archontis Politis +Copyright (c) 2019, Anis A. Hireche +Copyright (c) 2019, Christopher Robinson +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Spherical-Harmonic-Transform nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Brutal.OpenAl/LICENSES/openal-soft-COPYING.txt b/Brutal.OpenAl/LICENSES/openal-soft-COPYING.txt new file mode 100644 index 0000000..8d5d000 --- /dev/null +++ b/Brutal.OpenAl/LICENSES/openal-soft-COPYING.txt @@ -0,0 +1,437 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/Brutal.OpenAl/LICENSES/openal-soft-LICENSE-pffft.txt b/Brutal.OpenAl/LICENSES/openal-soft-LICENSE-pffft.txt new file mode 100644 index 0000000..5f1a849 --- /dev/null +++ b/Brutal.OpenAl/LICENSES/openal-soft-LICENSE-pffft.txt @@ -0,0 +1,38 @@ +A modified PFFFT is included, with the following license. + +Copyright (c) 2023 Christopher Robinson + +Copyright (c) 2013 Julien Pommier ( pommier@modartt.com ) + +Copyright (c) 2004 the University Corporation for Atmospheric +Research ("UCAR"). All rights reserved. Developed by NCAR's +Computational and Information Systems Laboratory, UCAR, +www.cisl.ucar.edu. + +Redistribution and use of the Software in source and binary forms, +with or without modification, is permitted provided that the +following conditions are met: + +- Neither the names of NCAR's Computational and Information Systems +Laboratory, the University Corporation for Atmospheric Research, +nor the names of its sponsors or contributors may be used to +endorse or promote products derived from this Software without +specific prior written permission. + +- Redistributions of source code must retain the above copyright +notices, this list of conditions, and the disclaimer below. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions, and the disclaimer below in the +documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. diff --git a/Brutal.OpenAl/LICENSES/openal-soft-fmt-LICENSE.txt b/Brutal.OpenAl/LICENSES/openal-soft-fmt-LICENSE.txt new file mode 100644 index 0000000..1cd1ef9 --- /dev/null +++ b/Brutal.OpenAl/LICENSES/openal-soft-fmt-LICENSE.txt @@ -0,0 +1,27 @@ +Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. diff --git a/Brutal.OpenAl/LICENSES/openal-soft-gsl-LICENSE.txt b/Brutal.OpenAl/LICENSES/openal-soft-gsl-LICENSE.txt new file mode 100644 index 0000000..aa58667 --- /dev/null +++ b/Brutal.OpenAl/LICENSES/openal-soft-gsl-LICENSE.txt @@ -0,0 +1,21 @@ +Copyright (c) 2015 Microsoft Corporation. All rights reserved. + +This code is licensed under the MIT License (MIT). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Brutal.OpenAl/Manual/Al.Listener.cs b/Brutal.OpenAl/Manual/Al.Listener.cs new file mode 100644 index 0000000..d7743d0 --- /dev/null +++ b/Brutal.OpenAl/Manual/Al.Listener.cs @@ -0,0 +1,22 @@ +namespace Brutal.OpenAlApi; + +public static unsafe partial class Al +{ + public static partial class Listener + { + public static (float3 At, float3 Up) Orientation + { + get + { + var v = stackalloc float[6]; + PInvoke.GetListenerfv(Constants.AL_ORIENTATION, v); + return (new float3(v[0], v[1], v[2]), new float3(v[3], v[4], v[5])); + } + set + { + var v = stackalloc float[6] { value.At.X, value.At.Y, value.At.Z, value.Up.X, value.Up.Y, value.Up.Z }; + PInvoke.Listenerfv(Constants.AL_ORIENTATION, v); + } + } + } +} diff --git a/Brutal.OpenAl/Manual/Al.Wrapper.Internal.cs b/Brutal.OpenAl/Manual/Al.Wrapper.Internal.cs new file mode 100644 index 0000000..c06c5a9 --- /dev/null +++ b/Brutal.OpenAl/Manual/Al.Wrapper.Internal.cs @@ -0,0 +1,72 @@ +namespace Brutal.OpenAlApi; + +public static unsafe partial class Al +{ + // The EAX reverb pan vectors are the only fv-shaped EFX parameters, so the fv entry points + // surface as float3 helpers (no filter has an fv key). + + internal static float3 GetEffectfv3(uint name, int param) + { + var v = stackalloc float[3]; + PInvoke.GetEffectfv(name, param, v); + return new float3(v[0], v[1], v[2]); + } + + internal static void SetEffectfv3(uint name, int param, float3 value) + { + var v = stackalloc float[3] { value.X, value.Y, value.Z }; + PInvoke.Effectfv(name, param, v); + } + + // Two-element vector forms for the extension pair parameters. The core fv/iv entry points fill + // caller memory; float2/int2 are sequential two-field structs, so their address is the buffer. + internal static float2 GetSourcefv2(uint name, int param) + { + var value = default(float2); + PInvoke.GetSourcefv(name, param, (float*)&value); + return value; + } + + internal static void SetSourcefv2(uint name, int param, float2 value) => + PInvoke.Sourcefv(name, param, (float*)&value); + + internal static int2 GetBufferiv2(uint name, int param) + { + var value = default(int2); + PInvoke.GetBufferiv(name, param, (int*)&value); + return value; + } + + internal static void SetBufferiv2(uint name, int param, int2 value) => PInvoke.Bufferiv(name, param, (int*)&value); + + // Extension double/int64 scalar and pair getters (AL_SOFT_source_latency / ALC_SOFT_device_clock + // source halves), over the fnptr-dispatched raw layer. + internal static double GetSourcedSOFT(uint name, int param) + { + var value = 0.0; + PInvoke.GetSourcedSOFT(name, param, &value); + return value; + } + + internal static long GetSourcei64SOFT(uint name, int param) + { + var value = 0L; + PInvoke.GetSourcei64SOFT(name, param, &value); + return value; + } + + // Tuples, not double2/long2: the two slots hold different quantities. + internal static (double A, double B) GetSourcedv2SOFT(uint name, int param) + { + var pair = stackalloc double[2]; + PInvoke.GetSourcedvSOFT(name, param, pair); + return (pair[0], pair[1]); + } + + internal static (long A, long B) GetSourcei64v2SOFT(uint name, int param) + { + var pair = stackalloc long[2]; + PInvoke.GetSourcei64vSOFT(name, param, pair); + return (pair[0], pair[1]); + } +} diff --git a/Brutal.OpenAl/Manual/Al.Wrapper.cs b/Brutal.OpenAl/Manual/Al.Wrapper.cs new file mode 100644 index 0000000..635b9b9 --- /dev/null +++ b/Brutal.OpenAl/Manual/Al.Wrapper.cs @@ -0,0 +1,80 @@ +namespace Brutal.OpenAlApi; + +public static unsafe partial class Al +{ + public static string? GetString(AlGetString param) + { + // Raw byte* return, copied to managed before anything can invalidate the library-owned + // buffer. A null result is either the NULL sentinel or an error. + return StringUtils.Utf8ToString(PInvoke.GetString((int)param)); + } + + public static string[] GetExtensions() + { + var s = GetString(AlGetString.Extensions); + return string.IsNullOrEmpty(s) ? [] : s.Split(' ', StringSplitOptions.RemoveEmptyEntries); + } + + public static AlDistanceModel DistanceModel + { + get => (AlDistanceModel)PInvoke.GetInteger(Constants.AL_DISTANCE_MODEL); + set => PInvoke.DistanceModel((int)value); + } + + public static float DopplerFactor + { + get => PInvoke.GetFloat(Constants.AL_DOPPLER_FACTOR); + set => PInvoke.DopplerFactor(value); + } + + public static float SpeedOfSound + { + get => PInvoke.GetFloat(Constants.AL_SPEED_OF_SOUND); + set => PInvoke.SpeedOfSound(value); + } + + public static void DeferUpdates() => PInvoke.DeferUpdatesSOFT(); + + public static void ProcessUpdates() => PInvoke.ProcessUpdatesSOFT(); + + public static DeferredUpdatesScope DeferUpdatesScope() + { + DeferUpdates(); + return new DeferredUpdatesScope(); + } + + public static string[] ResamplerNames + { + get + { + var count = PInvoke.GetInteger(Constants.AL_NUM_RESAMPLERS_SOFT); + var names = new string[count]; + for (var i = 0; i < count; i++) + { + names[i] = + StringUtils.Utf8ToString(PInvoke.GetStringiSOFT(Constants.AL_RESAMPLER_NAME_SOFT, i)) + ?? string.Empty; + } + return names; + } + } + + public static int DefaultResampler => PInvoke.GetInteger(Constants.AL_DEFAULT_RESAMPLER_SOFT); + + public static float GainLimit => PInvoke.GetFloat(Constants.AL_GAIN_LIMIT_SOFT); + + public static void PlaySourcesAt(ReadOnlySpan sources, long deviceClockTime) + { + if (sources.IsEmpty) + return; + + var names = sources.Cast(); + fixed (uint* p = names) + PInvoke.SourcePlayAtTimevSOFT(names.Length, p, deviceClockTime); + } +} + +public readonly ref struct DeferredUpdatesScope +{ + public void Dispose() => Al.ProcessUpdates(); +} diff --git a/Brutal.OpenAl/Manual/Al.cs b/Brutal.OpenAl/Manual/Al.cs new file mode 100644 index 0000000..aef6dda --- /dev/null +++ b/Brutal.OpenAl/Manual/Al.cs @@ -0,0 +1,7 @@ +namespace Brutal.OpenAlApi; + +public static partial class Al +{ + // Logical native library name; mapped to the platform file by NativeLoader's DllImportResolver. + internal const string Dll = "openal"; +} diff --git a/Brutal.OpenAl/Manual/AlAuxiliaryEffectSlot.cs b/Brutal.OpenAl/Manual/AlAuxiliaryEffectSlot.cs new file mode 100644 index 0000000..93e0602 --- /dev/null +++ b/Brutal.OpenAl/Manual/AlAuxiliaryEffectSlot.cs @@ -0,0 +1,9 @@ +namespace Brutal.OpenAlApi; + +public readonly partial struct AlAuxiliaryEffectSlot +{ + public void Load(AlEffect effect) + { + Al.PInvoke.AuxiliaryEffectSloti(Name, Al.Constants.AL_EFFECTSLOT_EFFECT, (int)effect.Name); + } +} diff --git a/Brutal.OpenAl/Manual/AlBuffer.cs b/Brutal.OpenAl/Manual/AlBuffer.cs new file mode 100644 index 0000000..b63c6b9 --- /dev/null +++ b/Brutal.OpenAl/Manual/AlBuffer.cs @@ -0,0 +1,14 @@ +namespace Brutal.OpenAlApi; + +public readonly unsafe partial struct AlBuffer +{ + public void SetData(AlFormat format, ReadOnlySpan data, int sampleRate) + { + // A successful upload clears any callback; evict its root only once the cookie is gone. + var previous = PeekCookie(Name); + fixed (byte* p = data) + Al.PInvoke.BufferData(Name, (int)format, p, data.Length, sampleRate); + if (previous != 0 && BoundCookie(Name) == 0) + BufferCallbacks.TryRemove(previous, out _); + } +} diff --git a/Brutal.OpenAl/Manual/AlDebug.Internal.cs b/Brutal.OpenAl/Manual/AlDebug.Internal.cs new file mode 100644 index 0000000..24e7f0f --- /dev/null +++ b/Brutal.OpenAl/Manual/AlDebug.Internal.cs @@ -0,0 +1,67 @@ +using System.Collections.Concurrent; + +namespace Brutal.OpenAlApi; + +public static unsafe partial class AlDebug +{ + internal static readonly ConcurrentDictionary DebugCallbacks = new(); + + // Every pull overwrites the arena from offset 0, so returned spans are valid until the next pull. + private static byte[]? _arena; + + // Matches the native log capacity; also bounds the stackalloc arrays. + private const int LogChunk = 64; + + internal static ReadOnlySpan ArenaView => _arena; + + private static byte[] EnsureArena() + { + if (_arena is null) + { + var messageLength = Al.PInvoke.GetInteger(Al.Constants.AL_MAX_DEBUG_MESSAGE_LENGTH_EXT); + var labelLength = Al.PInvoke.GetInteger(Al.Constants.AL_MAX_LABEL_LENGTH_EXT); + var size = Math.Max(LogChunk * messageLength, labelLength); + + // Do not cache a zero size; the next call re-queries. + if (size <= 0) + return []; + + _arena = new byte[size]; + } + return _arena; + } + + // Called from Al.EvictContextRoots for every context address that stops being valid. + internal static void EvictContextRoots(nint contextPointer) => DebugCallbacks.TryRemove(contextPointer, out _); + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void DebugTrampoline( + int source, + int type, + uint id, + int severity, + int length, + byte* message, + void* userParam + ) + { + try + { + if (DebugCallbacks.TryGetValue((nint)userParam, out var callback)) + { + callback( + (AlDebugSource)source, + (AlDebugType)type, + id, + (AlDebugSeverity)severity, + new ReadOnlySpan(message, length) + ); + } + } + catch (Exception ex) + { + Al.CallbackExceptions.Push("Error in AlDebug callback.", ex); + // the message is dropped + } + } +} diff --git a/Brutal.OpenAl/Manual/AlDebug.cs b/Brutal.OpenAl/Manual/AlDebug.cs new file mode 100644 index 0000000..e105b1d --- /dev/null +++ b/Brutal.OpenAl/Manual/AlDebug.cs @@ -0,0 +1,222 @@ +using unsafe DebugTrampolineFn = delegate* unmanaged[Cdecl]; + +namespace Brutal.OpenAlApi; + +public delegate void AlDebugCallback( + AlDebugSource source, + AlDebugType type, + uint id, + AlDebugSeverity severity, + ReadOnlySpan message +); + +public readonly record struct AlDebugMessageInfo( + AlDebugSource Source, + AlDebugType Type, + uint Id, + AlDebugSeverity Severity, + int Offset, + int Length +) +{ + public ReadOnlySpan Message => AlDebug.ArenaView.Slice(Offset, Length); +} + +public readonly ref struct DebugGroupScope +{ + public void Dispose() => AlDebug.PopGroup(); +} + +public static unsafe partial class AlDebug +{ + public static void Enable() => Al.PInvoke.Enable(Al.Constants.AL_DEBUG_OUTPUT_EXT); + + public static void Disable() => Al.PInvoke.Disable(Al.Constants.AL_DEBUG_OUTPUT_EXT); + + public static void SetCallback(AlDebugCallback? callback) + { + var context = Alc.PInvoke.GetCurrentContext().Pointer.Value; + if (callback is null) + { + Al.PInvoke.DebugMessageCallbackEXT(null, null); + DebugCallbacks.TryRemove(context, out _); + return; + } + + // Store before the native call so no early event is missed; restore if the call throws. + var hadPrevious = DebugCallbacks.TryGetValue(context, out var previous); + DebugCallbacks[context] = callback; + try + { + // (&DebugTrampoline) is parenthesized because `(AliasName)&expr` parses as a binary AND, not a cast. + Al.PInvoke.DebugMessageCallbackEXT((void*)(DebugTrampolineFn)(&DebugTrampoline), (void*)context); + } + catch + { + if (hadPrevious) + DebugCallbacks[context] = previous!; + else + DebugCallbacks.TryRemove(context, out _); + throw; + } + } + + public static void MessageInsert( + AlDebugSource source, + AlDebugType type, + uint id, + AlDebugSeverity severity, + string message + ) + { + ArgumentNullException.ThrowIfNull(message); + using var utf8 = new Utf8Buffer(message, stackalloc byte[Utf8Buffer.StackBufferSize]); + fixed (byte* p = utf8.Span) + Al.PInvoke.DebugMessageInsertEXT((int)source, (int)type, id, (int)severity, utf8.Length, p); + } + + public static void MessageInsert( + AlDebugSource source, + AlDebugType type, + uint id, + AlDebugSeverity severity, + ReadOnlySpan message + ) + { + fixed (byte* p = message) + { + // An empty span pins as null, which the native call rejects even at length 0. + byte nul = 0; + Al.PInvoke.DebugMessageInsertEXT( + (int)source, + (int)type, + id, + (int)severity, + message.Length, + p != null ? p : &nul + ); + } + } + + public static void MessageControl( + AlDebugSource source, + AlDebugType type, + AlDebugSeverity severity, + ReadOnlySpan ids, + bool enable + ) + { + fixed (uint* p = ids) + Al.PInvoke.DebugMessageControlEXT((int)source, (int)type, (int)severity, ids.Length, p, enable); + } + + public static void PushGroup(AlDebugSource source, uint id, string message) + { + ArgumentNullException.ThrowIfNull(message); + using var utf8 = new Utf8Buffer(message, stackalloc byte[Utf8Buffer.StackBufferSize]); + fixed (byte* p = utf8.Span) + Al.PInvoke.PushDebugGroupEXT((int)source, id, utf8.Length, p); + } + + public static void PushGroup(AlDebugSource source, uint id, ReadOnlySpan message) + { + fixed (byte* p = message) + { + // Same null-substitution rationale as the span MessageInsert above. + byte nul = 0; + Al.PInvoke.PushDebugGroupEXT((int)source, id, message.Length, p != null ? p : &nul); + } + } + + public static void PopGroup() => Al.PInvoke.PopDebugGroupEXT(); + + public static DebugGroupScope GroupScope(AlDebugSource source, uint id, string message) + { + PushGroup(source, id, message); + return new DebugGroupScope(); + } + + public static DebugGroupScope GroupScope(AlDebugSource source, uint id, ReadOnlySpan message) + { + PushGroup(source, id, message); + return new DebugGroupScope(); + } + + public static int GetMessageLog(Span messages) + { + if (messages.IsEmpty) + return 0; + + var arena = EnsureArena(); + var chunk = Math.Min(messages.Length, LogChunk); + Span sources = stackalloc int[chunk]; + Span types = stackalloc int[chunk]; + Span ids = stackalloc uint[chunk]; + Span severities = stackalloc int[chunk]; + Span lengths = stackalloc int[chunk]; + + uint count; + fixed (int* sourcesPtr = sources) + fixed (int* typesPtr = types) + fixed (uint* idsPtr = ids) + fixed (int* severitiesPtr = severities) + fixed (int* lengthsPtr = lengths) + fixed (byte* textPtr = arena) + { + count = Al.PInvoke.GetDebugMessageLogEXT( + (uint)chunk, + arena.Length, + sourcesPtr, + typesPtr, + idsPtr, + severitiesPtr, + lengthsPtr, + textPtr + ); + } + + var offset = 0; + for (var i = 0; i < count; i++) + { + // lengths[i] includes the NUL terminator. + messages[i] = new AlDebugMessageInfo( + (AlDebugSource)sources[i], + (AlDebugType)types[i], + ids[i], + (AlDebugSeverity)severities[i], + offset, + lengths[i] - 1 + ); + offset += lengths[i]; + } + return (int)count; + } + + public static void ObjectLabel(AlObjectLabelIdentifier identifier, uint name, string? label) + { + // A null label pins as a null pointer with length 0, which the native call treats as "clear". + using var utf8 = new Utf8Buffer(label, stackalloc byte[Utf8Buffer.StackBufferSize]); + fixed (byte* p = utf8.Span) + Al.PInvoke.ObjectLabelEXT((int)identifier, name, utf8.Length, p); + } + + public static void ObjectLabel(AlObjectLabelIdentifier identifier, uint name, ReadOnlySpan label) + { + fixed (byte* p = label) + { + // An empty span pins as null with length 0, which the native call accepts as "clear" - + // no substitution needed here, unlike the message calls. + Al.PInvoke.ObjectLabelEXT((int)identifier, name, label.Length, p); + } + } + + public static ReadOnlySpan GetObjectLabel(AlObjectLabelIdentifier identifier, uint name) + { + var arena = EnsureArena(); + // Native may leave length unwritten or report more than the arena holds. + var length = 0; + fixed (byte* p = arena) + Al.PInvoke.GetObjectLabelEXT((int)identifier, name, arena.Length, &length, p); + return arena.AsSpan(0, Math.Clamp(length, 0, arena.Length)); + } +} diff --git a/Brutal.OpenAl/Manual/AlSource.Ext.cs b/Brutal.OpenAl/Manual/AlSource.Ext.cs new file mode 100644 index 0000000..f4eaced --- /dev/null +++ b/Brutal.OpenAl/Manual/AlSource.Ext.cs @@ -0,0 +1,56 @@ +namespace Brutal.OpenAlApi; + +public readonly record struct AlSampleOffsetLatency(long SampleOffset, long Latency) +{ + public int WholeSamples => (int)(SampleOffset >> 32); +} + +public readonly record struct AlSampleOffsetClock(long SampleOffset, long ClockTime) +{ + public int WholeSamples => (int)(SampleOffset >> 32); +} + +public readonly record struct AlSecOffsetLatency(double SecOffset, double Latency); + +public readonly record struct AlSecOffsetClock(double SecOffset, double ClockTime); + +public readonly partial struct AlSource +{ + public AlSecOffsetLatency SecOffsetLatency + { + get + { + var (offset, latency) = Al.GetSourcedv2SOFT(Name, Al.Constants.AL_SEC_OFFSET_LATENCY_SOFT); + return new AlSecOffsetLatency(offset, latency); + } + } + + public AlSampleOffsetLatency SampleOffsetLatency + { + get + { + var (offset, latency) = Al.GetSourcei64v2SOFT(Name, Al.Constants.AL_SAMPLE_OFFSET_LATENCY_SOFT); + return new AlSampleOffsetLatency(offset, latency); + } + } + + public AlSecOffsetClock SecOffsetClock + { + get + { + var (offset, clock) = Al.GetSourcedv2SOFT(Name, Al.Constants.AL_SEC_OFFSET_CLOCK_SOFT); + return new AlSecOffsetClock(offset, clock); + } + } + + public AlSampleOffsetClock SampleOffsetClock + { + get + { + var (offset, clock) = Al.GetSourcei64v2SOFT(Name, Al.Constants.AL_SAMPLE_OFFSET_CLOCK_SOFT); + return new AlSampleOffsetClock(offset, clock); + } + } + + public void PlayAt(long deviceClockTime) => Al.PInvoke.SourcePlayAtTimeSOFT(Name, deviceClockTime); +} diff --git a/Brutal.OpenAl/Manual/AlSource.cs b/Brutal.OpenAl/Manual/AlSource.cs new file mode 100644 index 0000000..2be5a55 --- /dev/null +++ b/Brutal.OpenAl/Manual/AlSource.cs @@ -0,0 +1,29 @@ +namespace Brutal.OpenAlApi; + +public readonly unsafe partial struct AlSource +{ + public void QueueBuffers(ReadOnlySpan buffers) + { + if (buffers.IsEmpty) + return; + + var names = MemoryMarshal.Cast(buffers); + fixed (uint* p = names) + Al.PInvoke.SourceQueueBuffers(Name, names.Length, p); + } + + public void UnqueueBuffers(Span buffers) + { + if (buffers.IsEmpty) + return; + + var names = MemoryMarshal.Cast(buffers); + fixed (uint* p = names) + Al.PInvoke.SourceUnqueueBuffers(Name, names.Length, p); + } + + public void SetAuxiliarySend(AlAuxiliaryEffectSlot slot, int send, AlFilter filter = default) + { + Al.PInvoke.Source3i(Name, Al.Constants.AL_AUXILIARY_SEND_FILTER, (int)slot.Name, send, (int)filter.Name); + } +} diff --git a/Brutal.OpenAl/Manual/Alc.Wrapper.Internal.cs b/Brutal.OpenAl/Manual/Alc.Wrapper.Internal.cs new file mode 100644 index 0000000..f603e10 --- /dev/null +++ b/Brutal.OpenAl/Manual/Alc.Wrapper.Internal.cs @@ -0,0 +1,117 @@ +using Brutal.Strings; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.OpenAlApi; + +public static unsafe partial class Alc +{ + // Copy returned strings to managed memory before any error query, which may invalidate them. + + // A null result is either the NULL sentinel or an error; the device error is checked only on + // that path to disambiguate. + internal static string? GetString(AlcDevice device, AlcGetString param) + { + var p = PInvoke.GetString(device, (int)param); + var s = StringUtils.Utf8ToString(p); + if (s is null) + ThrowIfError(device); + return s; + } + + internal static string? GetString(AlcCaptureDevice capture, AlcGetString param) + { + var p = PInvoke.GetString(AsQueryDevice(capture), (int)param); + var s = StringUtils.Utf8ToString(p); + if (s is null) + ThrowIfError(capture); + return s; + } + + // Zero-copy siblings for the keyed Params.DeviceParams layer. Same error protocol as above, + // but the return views the library-owned buffer, so it is only valid until the next ALC string + // query. The NULL sentinel becomes an empty span. + internal static ReadOnlySpan GetStringUtf8(AlcDevice device, AlcGetString param) + { + var p = PInvoke.GetString(device, (int)param); + if (p is null) + { + ThrowIfError(device); + return default; + } + return Utf8.GetNullTerminatedSpan(p); + } + + internal static ReadOnlySpan GetStringUtf8(AlcCaptureDevice capture, AlcGetString param) + { + var p = PInvoke.GetString(AsQueryDevice(capture), (int)param); + if (p is null) + { + ThrowIfError(capture); + return default; + } + return Utf8.GetNullTerminatedSpan(p); + } + + // Backs Alc.GetDefaultDeviceSpecifier and friends: a null pointer means inspect the global + // error - throw if set, else the query is legitimately empty. + private static string? GetNullDeviceString(AlcGetString param) + { + var p = PInvoke.GetString(AlcDevice.Null, (int)param); + if (p is null) + { + var err = GetError(); + if (err != AlcError.NoError) + throw new AlcException(err, $"alcGetString(NULL, {param}) failed."); + return null; + } + return StringUtils.Utf8ToString(p); + } + + // Backs Alc.GetDeviceSpecifiers and friends; same null-pointer protocol as GetNullDeviceString. + private static string[] EnumerateDevices(AlcGetString param) + { + var p = PInvoke.GetString(AlcDevice.Null, (int)param); + if (p is null) + { + var err = GetError(); + if (err != AlcError.NoError) + throw new AlcException(err, "alcGetString(NULL, ...) device enumeration failed."); + return []; + } + return StringUtils.Utf8ListToStrings(p); + } + + internal static int GetInteger(AlcDevice device, AlcInteger param) + { + int value; + PInvoke.GetIntegerv(device, (int)param, 1, &value); + return value; + } + + internal static int GetInteger(AlcCaptureDevice capture, AlcInteger param) => + GetInteger(AsQueryDevice(capture), param); + + // Capture devices are ALCdevice* natively; the string/integer queries accept either kind. + private static AlcDevice AsQueryDevice(AlcCaptureDevice capture) => (void*)capture.Pointer.Value; + + // Flattens an attribute/value list into a rented, zero-terminated buffer (element-wise copy: + // ValueTuple layout is not blittable-guaranteed). An empty input returns SpanOwner.Empty, + // and fixing an empty span yields a null pointer - the native "no attribute list" - for free. + internal static SpanOwner FlattenAttributes( + ReadOnlySpan<(AlcContextAttribute Attribute, int Value)> attributes + ) + { + if (attributes.IsEmpty) + return SpanOwner.Empty; + + var owner = SpanOwner.Allocate(attributes.Length * 2 + 1); + var terminated = owner.Span; + for (var i = 0; i < attributes.Length; i++) + { + terminated[i * 2] = (int)attributes[i].Attribute; + terminated[i * 2 + 1] = attributes[i].Value; + } + terminated[attributes.Length * 2] = 0; + return owner; + } +} diff --git a/Brutal.OpenAl/Manual/Alc.Wrapper.cs b/Brutal.OpenAl/Manual/Alc.Wrapper.cs new file mode 100644 index 0000000..47ef2a8 --- /dev/null +++ b/Brutal.OpenAl/Manual/Alc.Wrapper.cs @@ -0,0 +1,72 @@ +namespace Brutal.OpenAlApi; + +public static unsafe partial class Alc +{ + public static Device OpenDevice(string? name = null) + { + // A null name pins as a null native pointer: the default-device case. + using var utf8 = new Utf8Buffer(name, stackalloc byte[Utf8Buffer.StackBufferSize]); + AlcDevice device; + fixed (byte* p = utf8.Span) + device = PInvoke.OpenDevice(p); + + // No trustworthy open device yet, so a null return is diagnosed via the global error. + if (device.IsNull()) + throw new AlcException(GetError(), "alcOpenDevice failed."); + return new Device(device); + } + + public static CaptureDevice CaptureOpenDevice(string? name, uint frequency, AlFormat format, int bufferSize) + { + // Without a known frame size, CaptureDevice.Samples cannot bound its destination buffer + // (alcCaptureSamples writes however many frames it is asked for). Extension formats go + // through the overload below, which takes the frame size explicitly. + if (CaptureDevice.FrameSize(format) is not { } bytesPerFrame) + { + throw new ArgumentOutOfRangeException( + nameof(format), + format, + "Not one of the four standard AlFormat values, so its frame size is unknown. Use the " + + "CaptureOpenDevice overload taking bytesPerFrame for an extension format." + ); + } + + return CaptureOpenDevice(name, frequency, format, bufferSize, bytesPerFrame); + } + + public static CaptureDevice CaptureOpenDevice( + string? name, + uint frequency, + AlFormat format, + int bufferSize, + int bytesPerFrame + ) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(bytesPerFrame); + + // A null name pins as a null native pointer: the default capture device case. + using var utf8 = new Utf8Buffer(name, stackalloc byte[Utf8Buffer.StackBufferSize]); + AlcCaptureDevice handle; + fixed (byte* p = utf8.Span) + handle = PInvoke.CaptureOpenDevice(p, frequency, (int)format, bufferSize); + + if (handle.IsNull()) + throw new AlcException(GetError(), "alcCaptureOpenDevice failed."); + + return new CaptureDevice(handle, bytesPerFrame); + } + + public static string[] GetDeviceSpecifiers() => EnumerateDevices(AlcGetString.DeviceSpecifier); + + public static string[] GetAllDeviceSpecifiers() => EnumerateDevices(AlcGetString.AllDevicesSpecifier); + + public static string[] GetCaptureDeviceSpecifiers() => EnumerateDevices(AlcGetString.CaptureDeviceSpecifier); + + public static string? GetDefaultDeviceSpecifier() => GetNullDeviceString(AlcGetString.DefaultDeviceSpecifier); + + public static string? GetDefaultAllDevicesSpecifier() => + GetNullDeviceString(AlcGetString.DefaultAllDevicesSpecifier); + + public static string? GetCaptureDefaultDeviceSpecifier() => + GetNullDeviceString(AlcGetString.CaptureDefaultDeviceSpecifier); +} diff --git a/Brutal.OpenAl/Manual/Alc.cs b/Brutal.OpenAl/Manual/Alc.cs new file mode 100644 index 0000000..a405136 --- /dev/null +++ b/Brutal.OpenAl/Manual/Alc.cs @@ -0,0 +1,7 @@ +namespace Brutal.OpenAlApi; + +public static partial class Alc +{ + // Logical native library name; mapped to the platform file by NativeLoader's DllImportResolver. + internal const string Dll = "openal"; +} diff --git a/Brutal.OpenAl/Manual/Callbacks.Internal.cs b/Brutal.OpenAl/Manual/Callbacks.Internal.cs new file mode 100644 index 0000000..7da90dc --- /dev/null +++ b/Brutal.OpenAl/Manual/Callbacks.Internal.cs @@ -0,0 +1,185 @@ +using System.Collections.Concurrent; + +namespace Brutal.OpenAlApi; + +// The process-wide latch for exceptions thrown by managed callback handlers. Capped so an +// undrained process cannot grow unboundedly: the first Capacity exceptions are kept, the rest +// only counted. +internal sealed class CallbackExceptionAggregator +{ + private const int Capacity = 16; + private readonly List _exceptions = []; + private int _dropped; + private readonly Lock _lock = new(); + + public void Push(string message, Exception inner) + { + try + { + lock (_lock) + { + if (_exceptions.Count < Capacity) + _exceptions.Add(new Exception(message, inner)); + else + _dropped++; + } + } + catch + { + // Never let the latch itself throw back into a native frame. + } + } + + public void ThrowIfAny() + { + Exception exception; + lock (_lock) + { + if (_exceptions.Count == 0) + return; + if (_dropped > 0) + _exceptions.Add(new Exception($"{_dropped} further callback exception(s) were dropped.")); + exception = _exceptions.Count == 1 ? _exceptions[0] : new AggregateException([.. _exceptions]); + _exceptions.Clear(); + _dropped = 0; + } + throw exception; + } +} + +public static unsafe partial class Al +{ + internal static readonly CallbackExceptionAggregator CallbackExceptions = new(); + + // Keyed by the current context's address, which is passed as userParam. + internal static readonly ConcurrentDictionary EventCallbacks = new(); + + // Called from Context teardown for every context address that stops being valid. + internal static void EvictContextRoots(nint contextPointer) + { + EventCallbacks.TryRemove(contextPointer, out _); + AlDebug.EvictContextRoots(contextPointer); + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void AlEventTrampoline( + int eventType, + uint obj, + uint param, + int length, + byte* message, + void* userParam + ) + { + try + { + if (EventCallbacks.TryGetValue((nint)userParam, out var callback)) + callback((AlEventType)eventType, obj, param, new ReadOnlySpan(message, length)); + } + catch (Exception ex) + { + CallbackExceptions.Push("Error in Al event callback.", ex); + // the event is dropped + } + } +} + +public static unsafe partial class Alc +{ + // ALC_SOFT_system_events is process-global, so a single static field is enough rooting. + internal static AlcEventCallback? SystemEventCallback => _systemEventCallback; + private static AlcEventCallback? _systemEventCallback; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void AlcEventTrampoline( + int eventType, + int deviceType, + nint device, + int length, + byte* message, + void* userParam + ) + { + try + { + _systemEventCallback?.Invoke( + (AlcEventType)eventType, + (AlcDeviceType)deviceType, + (void*)device, + new ReadOnlySpan(message, length) + ); + } + catch (Exception ex) + { + Al.CallbackExceptions.Push("Error in Alc event callback.", ex); + // the event is dropped + } + } +} + +public readonly unsafe partial struct AlBuffer +{ + // Keyed by a per-registration cookie, not the buffer name, since names are per-device. + private static readonly ConcurrentDictionary BufferCallbacks = + new(); + + private static long _cookieCounter; + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static int BufferTrampoline(void* userptr, void* sampleData, int numBytes) + { + try + { + return BufferCallbacks.TryGetValue((nint)userptr, out var entry) + ? entry.Callback(new Span(sampleData, numBytes)) + : 0; + } + catch (Exception ex) + { + Al.CallbackExceptions.Push("Error in AlBuffer callback.", ex); + return 0; // the stream goes silent + } + } + + // The cookie bound to this buffer name, or 0 when no callback is registered. + private static nint BoundCookie(uint name) + { + void* existing = null; + Al.PInvoke.GetBufferPtrSOFT(name, Al.Constants.AL_BUFFER_CALLBACK_USER_PARAM_SOFT, &existing); + return (nint)existing; + } + + private static nint PeekCookie(uint name) => BufferCallbacks.IsEmpty ? 0 : BoundCookie(name); + + // Read cookies before the delete and evict after, only for names that were actually deleted. + internal static void DeleteAndEvictCallbackRoots(uint* names, int count) + { + if (BufferCallbacks.IsEmpty) + { + Al.PInvoke.DeleteBuffers(count, names); + return; + } + + // Deletes are not hot enough to justify pooling; the stackalloc covers every sane bulk. + Span cookies = count <= 64 ? stackalloc nint[count] : new nint[count]; + for (var i = 0; i < count; i++) + cookies[i] = BoundCookie(names[i]); + + Al.PInvoke.DeleteBuffers(count, names); + + for (var i = 0; i < count; i++) + { + if (cookies[i] != 0 && !Al.PInvoke.IsBuffer(names[i])) + BufferCallbacks.TryRemove(cookies[i], out _); + } + } + + internal static void EvictDeviceRoots(nint devicePointer) + { + foreach (var entry in BufferCallbacks) + { + if (entry.Value.Device == devicePointer) + BufferCallbacks.TryRemove(entry); + } + } +} diff --git a/Brutal.OpenAl/Manual/Callbacks.cs b/Brutal.OpenAl/Manual/Callbacks.cs new file mode 100644 index 0000000..20c44d9 --- /dev/null +++ b/Brutal.OpenAl/Manual/Callbacks.cs @@ -0,0 +1,132 @@ +using unsafe AlcEventTrampolineFn = delegate* unmanaged[Cdecl]; +using unsafe AlEventTrampolineFn = delegate* unmanaged[Cdecl]; +using unsafe BufferTrampolineFn = delegate* unmanaged[Cdecl]; + +namespace Brutal.OpenAlApi; + +public delegate int AlBufferCallback(Span destination); + +public delegate void AlEventCallback(AlEventType eventType, uint @object, uint parameter, ReadOnlySpan message); + +public delegate void AlcEventCallback( + AlcEventType eventType, + AlcDeviceType deviceType, + AlcDevice device, + ReadOnlySpan message +); + +public static unsafe partial class Al +{ + public static void ThrowCallbackExceptions() => CallbackExceptions.ThrowIfAny(); + + public static void EventControl(ReadOnlySpan types, bool enable) + { + var raw = MemoryMarshal.Cast(types); + fixed (int* p = raw) + PInvoke.EventControlSOFT(raw.Length, p, enable); + } + + public static void SetEventCallback(AlEventCallback? callback) + { + var context = Alc.PInvoke.GetCurrentContext().Pointer.Value; + if (callback is null) + { + PInvoke.EventCallbackSOFT(null, null); + EventCallbacks.TryRemove(context, out _); + return; + } + + // Store before the native call so no early event is missed; restore if the call throws. + var hadPrevious = EventCallbacks.TryGetValue(context, out var previous); + EventCallbacks[context] = callback; + try + { + // (&Trampoline) is parenthesized because `(AliasName)&expr` parses as a binary AND, not a cast. + PInvoke.EventCallbackSOFT((void*)(AlEventTrampolineFn)(&AlEventTrampoline), (void*)context); + } + catch + { + if (hadPrevious) + EventCallbacks[context] = previous!; + else + EventCallbacks.TryRemove(context, out _); + throw; + } + } +} + +public static unsafe partial class Alc +{ + public static bool IsEventSupported(AlcEventType eventType, AlcDeviceType deviceType) => + PInvoke.EventIsSupportedSOFT((int)eventType, (int)deviceType) == Constants.ALC_EVENT_SUPPORTED_SOFT; + + public static bool EventControl(ReadOnlySpan events, bool enable) + { + var raw = MemoryMarshal.Cast(events); + fixed (int* p = raw) + return PInvoke.EventControlSOFT(raw.Length, p, enable); + } + + public static void SetEventCallback(AlcEventCallback? callback) + { + if (callback is null) + { + PInvoke.EventCallbackSOFT(null, null); + _systemEventCallback = null; + return; + } + + // Store before the native call so no early event is missed; restore if the call throws. + var previous = _systemEventCallback; + _systemEventCallback = callback; + try + { + PInvoke.EventCallbackSOFT((AlcEventTrampolineFn)(&AlcEventTrampoline), null); + } + catch + { + _systemEventCallback = previous; + throw; + } + } +} + +public readonly unsafe partial struct AlBuffer +{ + public void SetCallback(AlFormat format, int frequency, AlBufferCallback callback) + { + ArgumentNullException.ThrowIfNull(callback); + var previous = BoundCookie(Name); + var cookie = (nint)Interlocked.Increment(ref _cookieCounter); + BufferCallbacks[cookie] = (callback, 0); + Al.PInvoke.BufferCallbackSOFT( + Name, + (int)format, + frequency, + (BufferTrampolineFn)(&BufferTrampoline), + (void*)cookie + ); + + // Failure is reported only on the error latch, so read back the bound cookie to see if it took. + if (BoundCookie(Name) == cookie) + { + var device = Alc.PInvoke.GetContextsDevice(Alc.PInvoke.GetCurrentContext()); + BufferCallbacks[cookie] = (callback, device.Pointer.Value); + if (previous != 0) + BufferCallbacks.TryRemove(previous, out _); + } + else + { + BufferCallbacks.TryRemove(cookie, out _); + } + } + + public void ClearCallback() + { + // A NULL callback is rejected, so detach by re-specifying empty data. + var previous = BoundCookie(Name); + Al.PInvoke.BufferData(Name, (int)AlFormat.Mono16, null, 0, 1); + if (previous != 0 && BoundCookie(Name) == 0) + BufferCallbacks.TryRemove(previous, out _); + } +} diff --git a/Brutal.OpenAl/Manual/CaptureDevice.Internal.cs b/Brutal.OpenAl/Manual/CaptureDevice.Internal.cs new file mode 100644 index 0000000..3484e22 --- /dev/null +++ b/Brutal.OpenAl/Manual/CaptureDevice.Internal.cs @@ -0,0 +1,30 @@ +namespace Brutal.OpenAlApi; + +public sealed partial class CaptureDevice +{ + // The four standard formats are the only values AlFormat defines; anything else is an + // extension or invalid format with no fixed frame size. + internal static int? FrameSize(AlFormat format) => + format switch + { + AlFormat.Mono8 => 1, + AlFormat.Mono16 => 2, + AlFormat.Stereo8 => 2, + AlFormat.Stereo16 => 4, + _ => null, + }; + + // Multiply as long so the bound cannot overflow. + internal static void CheckBufferLength(int bytesPerFrame, int samples, int bufferLength) + { + ArgumentOutOfRangeException.ThrowIfNegative(samples); + + if (bufferLength < (long)samples * bytesPerFrame) + { + throw new ArgumentException( + $"buffer must hold at least {samples} * {bytesPerFrame} = {(long)samples * bytesPerFrame} bytes, but was {bufferLength}.", + "buffer" + ); + } + } +} diff --git a/Brutal.OpenAl/Manual/CaptureDevice.cs b/Brutal.OpenAl/Manual/CaptureDevice.cs new file mode 100644 index 0000000..fb159ab --- /dev/null +++ b/Brutal.OpenAl/Manual/CaptureDevice.cs @@ -0,0 +1,92 @@ +namespace Brutal.OpenAlApi; + +public sealed partial class CaptureDevice : IDisposable, INullable +{ + public AlcCaptureDevice Handle { get; private set; } + + // Bytes per sample frame of the capture format; bounds Samples(). + private readonly int _bytesPerFrame; + + private string? _specifier; + + internal CaptureDevice(AlcCaptureDevice handle, int bytesPerFrame) + { + Handle = handle; + _bytesPerFrame = bytesPerFrame; + } + + private AlcCaptureDevice CheckedHandle + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return Handle; + } + } + + public bool IsNull() => Handle.IsNull(); + + public string? Specifier + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return _specifier ??= Alc.GetString(Handle, AlcGetString.CaptureDeviceSpecifier); + } + } + + public int AvailableSamples => Alc.GetInteger(CheckedHandle, AlcInteger.CaptureSamples); + + public AlcError GetError() + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return Alc.GetError(Handle); + } + + public void ThrowIfError() + { + ObjectDisposedException.ThrowIf(IsNull(), this); + Alc.ThrowIfError(Handle); + } + + public void Start() => Alc.PInvoke.CaptureStart(CheckedHandle); + + public void Stop() => Alc.PInvoke.CaptureStop(CheckedHandle); + + public void Samples(Span buffer, int samples) + { + ObjectDisposedException.ThrowIf(IsNull(), this); + CheckBufferLength(_bytesPerFrame, samples, buffer.Length); + + unsafe + { + fixed (byte* p = buffer) + Alc.PInvoke.CaptureSamples(Handle, p, samples); + } + } + + public void Close() + { + ObjectDisposedException.ThrowIf(IsNull(), this); + if (!CloseCore()) + throw new AlcException(Alc.GetError(), "alcCaptureCloseDevice failed."); + } + + public void Dispose() + { + if (IsNull()) + return; + + // Dispose must not throw; Close() is the path that reports a failed close. + CloseCore(); + } + + private bool CloseCore() + { + var closed = Alc.PInvoke.CaptureCloseDevice(Handle); + Handle = AlcCaptureDevice.Null; + return closed; + } + + public static implicit operator AlcCaptureDevice(CaptureDevice capture) => capture.Handle; +} diff --git a/Brutal.OpenAl/Manual/Context.Internal.cs b/Brutal.OpenAl/Manual/Context.Internal.cs new file mode 100644 index 0000000..553af23 --- /dev/null +++ b/Brutal.OpenAl/Manual/Context.Internal.cs @@ -0,0 +1,37 @@ +using System.Collections.Concurrent; + +namespace Brutal.OpenAlApi; + +public sealed partial class Context +{ + // Weak so an abandoned wrapper is never kept alive; leaked entries are pruned on registration. + private static readonly ConcurrentDictionary> LiveContexts = new(); + + internal static List EvictDeviceEntries(Device device) + { + List orphans = []; + + foreach (var entry in LiveContexts) + { + if (!entry.Value.TryGetTarget(out var context)) + { + LiveContexts.TryRemove(entry); + Al.EvictContextRoots(entry.Key.Value); + } + else if (ReferenceEquals(context.Device, device)) + { + LiveContexts.TryRemove(entry); + Al.EvictContextRoots(entry.Key.Value); + orphans.Add(context); + } + } + + return orphans; + } + + internal static void MarkOrphaned(List orphans) + { + foreach (var context in orphans) + context.Handle = AlcContext.Null; + } +} diff --git a/Brutal.OpenAl/Manual/Context.cs b/Brutal.OpenAl/Manual/Context.cs new file mode 100644 index 0000000..db725e7 --- /dev/null +++ b/Brutal.OpenAl/Manual/Context.cs @@ -0,0 +1,156 @@ +namespace Brutal.OpenAlApi; + +public sealed partial class Context : IDisposable, INullable +{ + public ref struct CreateInfo() + { + public ReadOnlySpan<(AlcContextAttribute Attribute, int Value)> Attributes = []; + } + + public Device Device { get; } + + public AlcContext Handle { get; private set; } + + public static Context? Current + { + get + { + var current = Alc.PInvoke.GetCurrentContext(); + if (current.IsNull()) + return null; + return LiveContexts.TryGetValue(current.Pointer, out var weak) && weak.TryGetTarget(out var context) + ? context + : null; + } + } + + public bool IsCurrent => !IsNull() && Handle.Pointer == Alc.PInvoke.GetCurrentContext().Pointer; + + internal unsafe Context(Device device, CreateInfo info) + { + Device = device; + + // An empty attribute list flattens to a null pointer - see Alc.FlattenAttributes. + using var owner = Alc.FlattenAttributes(info.Attributes); + fixed (int* p = owner.Span) + Handle = Alc.PInvoke.CreateContext(device, p); + + // Failure detail is recorded on the input device, not globally. + if (Handle.IsNull()) + throw new AlcException(Alc.GetError(device), "alcCreateContext failed."); + + // Prune entries for leaked wrappers; remove by (key, value) so a re-registered entry survives. + foreach (var entry in LiveContexts) + { + if (!entry.Value.TryGetTarget(out _)) + LiveContexts.TryRemove(entry); + } + LiveContexts[Handle.Pointer] = new WeakReference(this); + } + + public bool IsNull() => Handle.IsNull(); + + public static void MakeCurrent(Context? context) + { + if (context is null) + { + if (!Alc.PInvoke.MakeContextCurrent(AlcContext.Null)) + throw new AlcException(Alc.GetError(), "alcMakeContextCurrent(NULL) failed."); + return; + } + + // alcMakeContextCurrent(NULL) detaches, so a disposed context must throw, not pass through. + if (context.IsNull()) + throw new AlcException(AlcError.InvalidContext, "The context has been disposed."); + + // Failure detail is recorded on the context's device. + if (!Alc.PInvoke.MakeContextCurrent(context.Handle)) + throw new AlcException(Alc.GetError(context.Device), "alcMakeContextCurrent failed."); + } + + public static bool TryMakeCurrent(Context? context) + { + if (context is null) + return Alc.PInvoke.MakeContextCurrent(AlcContext.Null); + return !context.IsNull() && Alc.PInvoke.MakeContextCurrent(context.Handle); + } + + public void MakeCurrent() => MakeCurrent(this); + + public bool TryMakeCurrent() => TryMakeCurrent(this); + + public static Context? CurrentThread + { + get + { + var current = Alc.PInvoke.GetThreadContext(); + if (current.IsNull()) + return null; + return LiveContexts.TryGetValue(current.Pointer, out var weak) && weak.TryGetTarget(out var context) + ? context + : null; + } + } + + public static void MakeThreadCurrent(Context? context) + { + if (context is null) + { + if (!Alc.PInvoke.SetThreadContext(AlcContext.Null)) + throw new AlcException(Alc.GetError(), "alcSetThreadContext(NULL) failed."); + return; + } + + if (context.IsNull()) + throw new AlcException(AlcError.InvalidContext, "The context has been disposed."); + + // Failure detail is recorded on the context's device. + if (!Alc.PInvoke.SetThreadContext(context.Handle)) + throw new AlcException(Alc.GetError(context.Device), "alcSetThreadContext failed."); + } + + public static bool TryMakeThreadCurrent(Context? context) + { + if (context is null) + return Alc.PInvoke.SetThreadContext(AlcContext.Null); + return !context.IsNull() && Alc.PInvoke.SetThreadContext(context.Handle); + } + + public void MakeThreadCurrent() => MakeThreadCurrent(this); + + public bool TryMakeThreadCurrent() => TryMakeThreadCurrent(this); + + private AlcContext CheckedHandle + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return Handle; + } + } + + public void Process() => Alc.PInvoke.ProcessContext(CheckedHandle); + + public void Suspend() => Alc.PInvoke.SuspendContext(CheckedHandle); + + public void Dispose() + { + if (IsNull()) + return; + + // While this context is alive the native object still occupies its address, so the entry + // under this key is necessarily our own. + LiveContexts.TryRemove(Handle.Pointer, out _); + + // Release any callback handlers rooted under this address (Al events, AlDebug) so a + // recycled context address can never resolve to a stale handler. + Al.EvictContextRoots(Handle.Pointer.Value); + + // alcDestroyContext returns nothing; an invalid context sets the global error - check + // Alc.GetError() explicitly if you need to know. + Alc.PInvoke.DestroyContext(Handle); + Handle = AlcContext.Null; + } + + public static implicit operator AlcContext(Context context) => context.Handle; +} diff --git a/Brutal.OpenAl/Manual/Device.cs b/Brutal.OpenAl/Manual/Device.cs new file mode 100644 index 0000000..ab83316 --- /dev/null +++ b/Brutal.OpenAl/Manual/Device.cs @@ -0,0 +1,311 @@ +using System.Collections.ObjectModel; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.OpenAlApi; + +public readonly record struct AlcClockLatency(long ClockTime, long Latency); + +public sealed class Device : IDisposable, INullable +{ + private readonly bool _ownedByLoopback; + + public AlcDevice Handle { get; private set; } + + internal Device(AlcDevice handle, bool ownedByLoopback = false) + { + Handle = handle; + _ownedByLoopback = ownedByLoopback; + } + + private AlcDevice CheckedHandle + { + get + { + ThrowIfDisposed(); + return Handle; + } + } + + internal void ThrowIfDisposed() => ObjectDisposedException.ThrowIf(IsNull(), this); + + private Efx? _efx; + + // Reopen invalidates the specifier caches; Reset and Reopen invalidate the HRTF cache. + private string? _specifier; + private string? _allDevicesSpecifier; + private ReadOnlyCollection? _extensions; + private ReadOnlyCollection? _hrtfSpecifiers; + private int? _majorVersion; + private int? _minorVersion; + + public Efx Efx + { + get + { + ThrowIfDisposed(); + return _efx ??= new Efx(this); + } + } + + public bool IsNull() => Handle.IsNull(); + + public string? Specifier + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return _specifier ??= Alc.GetString(Handle, AlcGetString.DeviceSpecifier); + } + } + + public string? AllDevicesSpecifier + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return _allDevicesSpecifier ??= Alc.GetString(Handle, AlcGetString.AllDevicesSpecifier); + } + } + + public IReadOnlyList Extensions + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + if (_extensions is null) + { + var s = Alc.GetString(Handle, AlcGetString.Extensions); + _extensions = Array.AsReadOnly( + string.IsNullOrEmpty(s) ? [] : s.Split(' ', StringSplitOptions.RemoveEmptyEntries) + ); + } + return _extensions; + } + } + + public int MajorVersion + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return _majorVersion ??= Alc.GetInteger(Handle, AlcInteger.MajorVersion); + } + } + + public int MinorVersion + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return _minorVersion ??= Alc.GetInteger(Handle, AlcInteger.MinorVersion); + } + } + + public unsafe (AlcContextAttribute Attribute, int Value)[] Attributes + { + get + { + // Two-call native protocol, encapsulated: ALC_ATTRIBUTES_SIZE reports the list length + // (including its zero terminator), ALC_ALL_ATTRIBUTES fills the buffer. The terminator + // is trimmed and the flat ints paired up. + var size = Alc.GetInteger(CheckedHandle, AlcInteger.AttributesSize); + if (size <= 0) + return []; + + using var owner = SpanOwner.Allocate(size); + var flat = owner.Span; + fixed (int* p = flat) + Alc.PInvoke.GetIntegerv(Handle, (int)AlcInteger.AllAttributes, size, p); + + var count = flat[size - 1] == 0 ? size - 1 : size; + var pairs = new (AlcContextAttribute, int)[count / 2]; + for (var i = 0; i < pairs.Length; i++) + pairs[i] = ((AlcContextAttribute)flat[i * 2], flat[i * 2 + 1]); + return pairs; + } + } + + public bool IsExtensionPresent(string name) => Alc.IsExtensionPresent(CheckedHandle, name); + + public unsafe void* GetProcAddress(string name) => Alc.GetProcAddress(CheckedHandle, name); + + public AlcError GetError() + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return Alc.GetError(Handle); + } + + public void ThrowIfError() + { + ObjectDisposedException.ThrowIf(IsNull(), this); + Alc.ThrowIfError(Handle); + } + + public Context CreateContext(Context.CreateInfo info = default) + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return new(this, info); + } + + public void Pause() => Alc.PInvoke.DevicePauseSOFT(CheckedHandle); + + public void Resume() => Alc.PInvoke.DeviceResumeSOFT(CheckedHandle); + + public bool Connected => Alc.GetInteger(CheckedHandle, AlcInteger.Connected) != 0; + + public unsafe long ClockTime + { + get + { + long value = 0; + Alc.PInvoke.GetInteger64vSOFT(CheckedHandle, Alc.Constants.ALC_DEVICE_CLOCK_SOFT, 1, &value); + return value; + } + } + + public unsafe long Latency + { + get + { + long value = 0; + Alc.PInvoke.GetInteger64vSOFT(CheckedHandle, Alc.Constants.ALC_DEVICE_LATENCY_SOFT, 1, &value); + return value; + } + } + + public unsafe AlcClockLatency ClockLatency + { + get + { + var pair = stackalloc long[2]; + Alc.PInvoke.GetInteger64vSOFT(CheckedHandle, Alc.Constants.ALC_DEVICE_CLOCK_LATENCY_SOFT, 2, pair); + return new AlcClockLatency(pair[0], pair[1]); + } + } + + public AlcHrtfStatus HrtfStatus => (AlcHrtfStatus)Alc.GetInteger(CheckedHandle, AlcInteger.HrtfStatus); + + public IReadOnlyList HrtfSpecifiers + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + if (_hrtfSpecifiers is null) + { + var count = Alc.GetInteger(Handle, AlcInteger.NumHrtfSpecifiers); + var names = new string[count]; + for (var i = 0; i < count; i++) + { + unsafe + { + names[i] = + StringUtils.Utf8ToString( + Alc.PInvoke.GetStringiSOFT(Handle, Alc.Constants.ALC_HRTF_SPECIFIER_SOFT, i) + ) ?? string.Empty; + } + } + _hrtfSpecifiers = Array.AsReadOnly(names); + } + return _hrtfSpecifiers; + } + } + + public unsafe void Reset(ReadOnlySpan<(AlcContextAttribute Attribute, int Value)> attributes = default) + { + ObjectDisposedException.ThrowIf(IsNull(), this); + using var owner = Alc.FlattenAttributes(attributes); + fixed (int* p = owner.Span) + { + if (!Alc.PInvoke.ResetDeviceSOFT(Handle, p)) + throw new AlcException(Alc.GetError(Handle), "alcResetDeviceSOFT failed."); + } + + // A reset renegotiates the attribute list: the HRTF set and the auxiliary-send count can + // both change. The device's identity (specifiers) cannot. + _hrtfSpecifiers = null; + _efx?.InvalidateDeviceCaches(); + } + + public unsafe void Reopen( + string? deviceName, + ReadOnlySpan<(AlcContextAttribute Attribute, int Value)> attributes = default + ) + { + ObjectDisposedException.ThrowIf(IsNull(), this); + using var owner = Alc.FlattenAttributes(attributes); + using var utf8 = new Utf8Buffer(deviceName, stackalloc byte[Utf8Buffer.StackBufferSize]); + fixed (int* attribs = owner.Span) + fixed (byte* name = utf8.Span) + { + if (!Alc.PInvoke.ReopenDeviceSOFT(Handle, name, attribs)) + throw new AlcException(Alc.GetError(Handle), "alcReopenDeviceSOFT failed."); + } + + // A reopen can change the underlying device (new specifiers) and renegotiates the + // attribute list like Reset does. Versions and the extension list are properties of the + // loaded implementation, not the device, and survive. + _specifier = null; + _allDevicesSpecifier = null; + _hrtfSpecifiers = null; + _efx?.InvalidateDeviceCaches(); + } + + public AlcOutputMode OutputMode => (AlcOutputMode)Alc.GetInteger(CheckedHandle, AlcInteger.OutputMode); + + public void Close() + { + if (_ownedByLoopback) + throw new InvalidOperationException("Close the owning LoopbackDevice instead."); + ObjectDisposedException.ThrowIf(IsNull(), this); + CloseUnchecked(); + } + + public void Dispose() + { + if (_ownedByLoopback) + return; + DisposeUnchecked(); + } + + // Close() without the ownership and disposal guards. Also the entry point LoopbackDevice + // uses on its plumbing Device, whose public Close() rejects direct use. + internal void CloseUnchecked() + { + if (!CloseCore()) + throw new AlcException(Alc.GetError(), "alcCloseDevice failed (invalid or already-closed handle)."); + } + + // Dispose() without the ownership guard. Also the entry point LoopbackDevice uses on its + // plumbing Device, whose public Dispose() is a no-op. + internal void DisposeUnchecked() + { + if (IsNull()) + return; + + // Dispose must not throw; Close() is the path that reports a failed close. + CloseCore(); + } + + private bool CloseCore() + { + // Evict before the native close so a freed context address is never left mapped. + var orphans = Context.EvictDeviceEntries(this); + + // Closing also destroys the device's buffers without any per-buffer delete running, so + // the buffer-callback handler roots recorded under this device are swept with it. + AlBuffer.EvictDeviceRoots(Handle.Pointer.Value); + + // A successful close frees the device, so it must not be queried afterwards; on failure + // the global error holds the reason. + var closed = Alc.PInvoke.CloseDevice(Handle); + + // On failure the contexts are still alive natively, so only mark them orphaned on success. + if (closed) + Context.MarkOrphaned(orphans); + + Handle = AlcDevice.Null; + return closed; + } + + public static implicit operator AlcDevice(Device device) => device.Handle; +} diff --git a/Brutal.OpenAl/Manual/Efx.Internal.cs b/Brutal.OpenAl/Manual/Efx.Internal.cs new file mode 100644 index 0000000..2443471 --- /dev/null +++ b/Brutal.OpenAl/Manual/Efx.Internal.cs @@ -0,0 +1,96 @@ +using static Brutal.OpenAlApi.Al.Constants; + +namespace Brutal.OpenAlApi; + +public sealed partial class Efx +{ + // Creation drains the error latch first and deletes the half-built object if setting its type fails. + + // AL calls go to the current context, so it must belong to this Efx's device. + private void ThrowIfNotCurrentOnDevice() + { + Device.ThrowIfDisposed(); + var device = Device.Handle; + var current = Alc.PInvoke.GetCurrentContext(); + if (current.IsNull()) + { + throw new InvalidOperationException( + "No AL context is current. EFX objects are created on the current context; make a " + + "context on this Efx instance's device current first." + ); + } + + if (Alc.PInvoke.GetContextsDevice(current).Pointer != device.Pointer) + { + throw new InvalidOperationException( + "The current AL context belongs to a different device than this Efx instance, which " + + "belongs to the device it was obtained from. Make a context on that device " + + "current, or use the Efx of the device you are actually using." + ); + } + } + + internal AlEffect CreateEffectChecked(int type) + { + ThrowIfNotCurrentOnDevice(); + Al.GetError(); + var effect = GenEffect(); + Al.PInvoke.Effecti(effect.Name, AL_EFFECT_TYPE, type); + try + { + Al.ThrowIfError(); + } + catch + { + Rollback(effect); + throw; + } + return effect; + } + + internal AlFilter CreateFilterChecked(int type) + { + ThrowIfNotCurrentOnDevice(); + Al.GetError(); + var filter = GenFilter(); + Al.PInvoke.Filteri(filter.Name, AL_FILTER_TYPE, type); + try + { + Al.ThrowIfError(); + } + catch + { + Rollback(filter); + throw; + } + return filter; + } + + // Single-step, so nothing to roll back - but the stale-latch drain still applies. + internal AlAuxiliaryEffectSlot CreateSlotChecked() + { + ThrowIfNotCurrentOnDevice(); + Al.GetError(); + var slot = GenAuxiliaryEffectSlot(); + Al.ThrowIfError(); + return slot; + } + + // Undoes the generate step of a failed creation; a null name means generation itself failed. + // The trailing drain discards any secondary error the cleanup delete latches. + private void Rollback(AlEffect effect) + { + if (effect.IsNull()) + return; + DeleteEffects([effect]); + Al.GetError(); + } + + private void Rollback(AlFilter filter) + { + if (filter.IsNull()) + return; + DeleteFilters([filter]); + Al.GetError(); + } +} diff --git a/Brutal.OpenAl/Manual/Efx.cs b/Brutal.OpenAl/Manual/Efx.cs new file mode 100644 index 0000000..ff732d1 --- /dev/null +++ b/Brutal.OpenAl/Manual/Efx.cs @@ -0,0 +1,45 @@ +namespace Brutal.OpenAlApi; + +public sealed partial class Efx +{ + internal Device Device { get; } + + internal Efx(Device device) => Device = device; + + // Device.Reset/Reopen invalidate the send count; the versions never change. + private int? _efxMajorVersion; + private int? _efxMinorVersion; + private int? _maxAuxiliarySends; + + internal void InvalidateDeviceCaches() => _maxAuxiliarySends = null; + + public int EfxMajorVersion + { + get + { + Device.ThrowIfDisposed(); + var device = Device.Handle; + return _efxMajorVersion ??= Alc.GetInteger(device, AlcInteger.EfxMajorVersion); + } + } + + public int EfxMinorVersion + { + get + { + Device.ThrowIfDisposed(); + var device = Device.Handle; + return _efxMinorVersion ??= Alc.GetInteger(device, AlcInteger.EfxMinorVersion); + } + } + + public int MaxAuxiliarySends + { + get + { + Device.ThrowIfDisposed(); + var device = Device.Handle; + return _maxAuxiliarySends ??= Alc.GetInteger(device, AlcInteger.MaxAuxiliarySends); + } + } +} diff --git a/Brutal.OpenAl/Manual/Errors.cs b/Brutal.OpenAl/Manual/Errors.cs new file mode 100644 index 0000000..6c9bc8a --- /dev/null +++ b/Brutal.OpenAl/Manual/Errors.cs @@ -0,0 +1,97 @@ +// The per-category error model. OpenAL has no per-call return code; errors are read from: +// +// AL (alGetError) : per-context, per-thread, first error wins. With no current context, +// openal-soft returns AL_INVALID_OPERATION (not AL_NO_ERROR). +// ALC (alcGetError(device)) : per-device, last error wins. Valid only while the device is open - +// never query a device after a successful close (it is freed). +// ALC (alcGetError(NULL)) : global, for failures not attributable to an open device. +// +// GetError(...) reads without throwing; ThrowIfError(...) reads and throws. Wrapper methods never check +// errors automatically - the consumer decides when. The exception is lifetime operations whose failure +// is signaled by a return value (open/create/close/make-current): they check and throw internally, but +// only once, on that failure path. + +namespace Brutal.OpenAlApi +{ + public sealed class AlException : Exception + { + public AlException(AlError error, string message) + : base(message) => Error = error; + + public AlError Error { get; } + } + + public static partial class Al + { + public static AlError GetError() => (AlError)PInvoke.GetError(); + + public static void ThrowIfError() + { + var e = GetError(); + if (e != AlError.NoError) + throw new AlException(e, Describe(e)); + } + + private static string Describe(AlError e) => + e switch + { + AlError.InvalidName => "AL_INVALID_NAME: a bad object name was passed.", + AlError.InvalidEnum => "AL_INVALID_ENUM: an invalid enum was passed.", + AlError.InvalidValue => "AL_INVALID_VALUE: an invalid value was passed.", + AlError.InvalidOperation => "AL_INVALID_OPERATION: not allowed in the current state " + + "(this is also what a checked AL call reports when no context is current).", + AlError.OutOfMemory => "AL_OUT_OF_MEMORY: the driver ran out of memory.", + _ => $"AL error 0x{(int)e:X4}.", + }; + } + + public sealed class AlcException : Exception + { + public AlcException(AlcError error, string message) + : base(message) => Error = error; + + public AlcError Error { get; } + } + + public static unsafe partial class Alc + { + public static AlcError GetError() => (AlcError)PInvoke.GetError(AlcDevice.Null); + + public static void ThrowIfError() + { + var e = GetError(); + if (e != AlcError.NoError) + throw new AlcException(e, Describe(e)); + } + + internal static AlcError GetError(AlcDevice device) => (AlcError)PInvoke.GetError(device); + + internal static AlcError GetError(AlcCaptureDevice capture) => + (AlcError)PInvoke.GetError((void*)capture.Pointer.Value); + + internal static void ThrowIfError(AlcDevice device) + { + var e = GetError(device); + if (e != AlcError.NoError) + throw new AlcException(e, Describe(e)); + } + + internal static void ThrowIfError(AlcCaptureDevice capture) + { + var e = GetError(capture); + if (e != AlcError.NoError) + throw new AlcException(e, Describe(e)); + } + + private static string Describe(AlcError e) => + e switch + { + AlcError.InvalidDevice => "ALC_INVALID_DEVICE: an invalid or closed device handle was used.", + AlcError.InvalidContext => "ALC_INVALID_CONTEXT: an invalid context handle was used.", + AlcError.InvalidEnum => "ALC_INVALID_ENUM: an invalid enum was passed.", + AlcError.InvalidValue => "ALC_INVALID_VALUE: an invalid value was passed.", + AlcError.OutOfMemory => "ALC_OUT_OF_MEMORY: the driver ran out of memory.", + _ => $"ALC error 0x{(int)e:X4}.", + }; + } +} diff --git a/Brutal.OpenAl/Manual/Extensions.cs b/Brutal.OpenAl/Manual/Extensions.cs new file mode 100644 index 0000000..ecb99e4 --- /dev/null +++ b/Brutal.OpenAl/Manual/Extensions.cs @@ -0,0 +1,78 @@ +namespace Brutal.OpenAlApi +{ + public sealed class AlExtensionException : Exception + { + public AlExtensionException(string fn) + : base($"OpenAL extension entry point '{fn}' is not available.") { } + + public AlExtensionException(string fn, string extension) + : base($"OpenAL extension entry point '{fn}' ({extension}) is not available in the loaded library.") { } + + [System.Diagnostics.CodeAnalysis.DoesNotReturn] + internal static void ThrowMissing(string fn, string extension) => throw new AlExtensionException(fn, extension); + } + + public static unsafe partial class Al + { + public static bool IsExtensionPresent(string name) + { + ArgumentNullException.ThrowIfNull(name); + using var utf8 = new Utf8Buffer(name, stackalloc byte[Utf8Buffer.StackBufferSize]); + fixed (byte* p = utf8.Span) + return PInvoke.IsExtensionPresent(p); + } + + public static void* GetProcAddress(string name) + { + ArgumentNullException.ThrowIfNull(name); + using var utf8 = new Utf8Buffer(name, stackalloc byte[Utf8Buffer.StackBufferSize]); + void* fn; + fixed (byte* p = utf8.Span) + fn = PInvoke.GetProcAddress(p); + + if (fn is null) + throw new AlExtensionException(name); + return fn; + } + } + + public static unsafe partial class Alc + { + public static bool IsExtensionPresent(string name) => IsExtensionPresent(AlcDevice.Null, name); + + public static void* GetProcAddress(string name) => GetProcAddress(AlcDevice.Null, name); + + // Shared plumbing for the null-device statics above and the device-scoped members on + // Device. + internal static bool IsExtensionPresent(AlcDevice device, string name) + { + ArgumentNullException.ThrowIfNull(name); + using var utf8 = new Utf8Buffer(name, stackalloc byte[Utf8Buffer.StackBufferSize]); + fixed (byte* p = utf8.Span) + return PInvoke.IsExtensionPresent(device, p); + } + + internal static void* GetProcAddress(AlcDevice device, string name) + { + ArgumentNullException.ThrowIfNull(name); + using var utf8 = new Utf8Buffer(name, stackalloc byte[Utf8Buffer.StackBufferSize]); + void* fn; + fixed (byte* p = utf8.Span) + fn = PInvoke.GetProcAddress(device, p); + + if (fn is null) + throw new AlExtensionException(name); + return fn; + } + + // Resolve plumbing for the generated ExtPointers field initializers. The span must have a + // NUL terminator in memory immediately after it - true for u8 literals, not checked here. + // Returns null for a missing symbol instead of throwing: a null ExtPointers field is how + // the generated methods detect an unavailable extension. + internal static void* GetProcAddressUtf8(AlcDevice device, ReadOnlySpan nulTerminatedName) + { + fixed (byte* p = nulTerminatedName) + return PInvoke.GetProcAddress(device, p); + } + } +} diff --git a/Brutal.OpenAl/Manual/LoopbackDevice.cs b/Brutal.OpenAl/Manual/LoopbackDevice.cs new file mode 100644 index 0000000..06af6fe --- /dev/null +++ b/Brutal.OpenAl/Manual/LoopbackDevice.cs @@ -0,0 +1,132 @@ +namespace Brutal.OpenAlApi; + +public sealed class LoopbackDevice : IDisposable, INullable +{ + private readonly Device _device; + + // Bytes per sample frame of the device's render format, captured on each CreateContext; 0 + // until the first context establishes a format. Render's span bound - see CheckBufferLength. + private int _bytesPerFrame; + + private LoopbackDevice(AlcDevice handle) => _device = new Device(handle, ownedByLoopback: true); + + public static unsafe LoopbackDevice Open(string? deviceName = null) + { + // No trustworthy open device yet, so a null return is diagnosed via the global error - same + // protocol as Alc.OpenDevice. A null name pins as a null native pointer (the default). + using var utf8 = new Utf8Buffer(deviceName, stackalloc byte[Utf8Buffer.StackBufferSize]); + AlcDevice handle; + fixed (byte* p = utf8.Span) + handle = Alc.PInvoke.LoopbackOpenDeviceSOFT(p); + if (handle.IsNull()) + throw new AlcException(Alc.GetError(), "alcLoopbackOpenDeviceSOFT failed."); + return new LoopbackDevice(handle); + } + + public AlcDevice Handle => _device.Handle; + + public bool IsNull() => _device.IsNull(); + + private AlcDevice CheckedHandle + { + get + { + ObjectDisposedException.ThrowIf(IsNull(), this); + return Handle; + } + } + + public bool IsRenderFormatSupported(int frequency, AlcChannelLayout channels, AlcSampleType sampleType) => + Alc.PInvoke.IsRenderFormatSupportedSOFT(CheckedHandle, frequency, (int)channels, (int)sampleType); + + public Context CreateContext(Context.CreateInfo info = default) + { + ObjectDisposedException.ThrowIf(IsNull(), this); + var context = _device.CreateContext(info); + _bytesPerFrame = QueryBytesPerFrame(); + return context; + } + + // Queried back from the device so it reflects the format native chose; unknown values yield 0. + private unsafe int QueryBytesPerFrame() + { + var channelCount = (AlcChannelLayout)Query(Alc.Constants.ALC_FORMAT_CHANNELS_SOFT) switch + { + AlcChannelLayout.Mono => 1, + AlcChannelLayout.Stereo => 2, + AlcChannelLayout.Quad => 4, + AlcChannelLayout.Surround51 => 6, + AlcChannelLayout.Surround61 => 7, + AlcChannelLayout.Surround71 => 8, + // B-Format with ambisonic order N carries (N + 1)^2 channels. + AlcChannelLayout.Bformat3d => AmbisonicChannels(Query(Alc.Constants.ALC_AMBISONIC_ORDER_SOFT)), + _ => 0, + }; + var sampleSize = (AlcSampleType)Query(Alc.Constants.ALC_FORMAT_TYPE_SOFT) switch + { + AlcSampleType.Byte or AlcSampleType.UnsignedByte => 1, + AlcSampleType.Short or AlcSampleType.UnsignedShort => 2, + AlcSampleType.Int or AlcSampleType.UnsignedInt or AlcSampleType.Float => 4, + _ => 0, + }; + return channelCount * sampleSize; + + static int AmbisonicChannels(int order) => (order + 1) * (order + 1); + + int Query(int param) + { + var value = 0; + Alc.PInvoke.GetIntegerv(Handle, param, 1, &value); + return value; + } + } + + public unsafe void Render(Span buffer, int sampleFrames) + { + ObjectDisposedException.ThrowIf(IsNull(), this); + + // alcRenderSamplesSOFT takes no buffer size, so the length must be checked here. + if (_bytesPerFrame == 0) + { + throw new InvalidOperationException( + "No render format is established. Create a context on this device (with Frequency/" + + "FormatChannels/FormatType attributes) before rendering." + ); + } + CheckBufferLength(_bytesPerFrame, sampleFrames, buffer.Length); + + fixed (byte* p = buffer) + Alc.PInvoke.RenderSamplesSOFT(Handle, p, sampleFrames); + + Al.ThrowCallbackExceptions(); + } + + // Multiply as long so the bound cannot overflow. + private static void CheckBufferLength(int bytesPerFrame, int sampleFrames, int bufferLength) + { + ArgumentOutOfRangeException.ThrowIfNegative(sampleFrames); + + if (bufferLength < (long)sampleFrames * bytesPerFrame) + { + throw new ArgumentException( + $"buffer must hold at least {sampleFrames} frames * {bytesPerFrame} bytes = {(long)sampleFrames * bytesPerFrame} bytes, but was {bufferLength}.", + "buffer" + ); + } + } + + public void Render(Span buffer, int sampleFrames) => Render(MemoryMarshal.AsBytes(buffer), sampleFrames); + + public void Render(Span buffer, int sampleFrames) => Render(MemoryMarshal.AsBytes(buffer), sampleFrames); + + public void Close() + { + // Guarded here so the exception reports the LoopbackDevice, not the plumbing Device. + ObjectDisposedException.ThrowIf(IsNull(), this); + _device.CloseUnchecked(); + } + + public void Dispose() => _device.DisposeUnchecked(); + + public static implicit operator AlcDevice(LoopbackDevice device) => device.Handle; +} diff --git a/Brutal.OpenAl/Manual/NativeLoader.cs b/Brutal.OpenAl/Manual/NativeLoader.cs new file mode 100644 index 0000000..7b2a2fd --- /dev/null +++ b/Brutal.OpenAl/Manual/NativeLoader.cs @@ -0,0 +1,40 @@ +using System.Diagnostics.CodeAnalysis; +using System.Reflection; + +namespace Brutal.OpenAlApi; + +internal static class NativeLoader +{ + // The logical name the generated [LibraryImport] entries request. Must match the `Dll` const. + private const string LogicalName = "openal"; + + [SuppressMessage( + "Usage", + "CA2255:The 'ModuleInitializer' attribute should not be used in libraries", + Justification = "Resolver must register before any nested-type P/Invoke; static ctor is not triggered by nested-type access." + )] + [ModuleInitializer] + internal static void Register() + { + NativeLibrary.SetDllImportResolver(typeof(NativeLoader).Assembly, Resolve); + } + + private static nint Resolve(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + if (libraryName != LogicalName) + return nint.Zero; + + // openal-soft installed file names: + // Windows : OpenAL32.dll + // Linux : libopenal.so.1 (SONAME) + // macOS : libopenal.1.dylib (install_name @rpath/libopenal.1.dylib) + var fileName = Platform.CurrentFamily switch + { + Platform.Family.Windows => "OpenAL32.dll", + Platform.Family.MacOS => "libopenal.1.dylib", + _ => "libopenal.so.1", + }; + + return NativeLibrary.Load(fileName, assembly, DllImportSearchPath.AssemblyDirectory); + } +} diff --git a/Brutal.OpenAl/Manual/Params.cs b/Brutal.OpenAl/Manual/Params.cs new file mode 100644 index 0000000..af79bae --- /dev/null +++ b/Brutal.OpenAl/Manual/Params.cs @@ -0,0 +1,18 @@ +namespace Brutal.OpenAlApi.Params; + +public static class DeviceParams +{ + extension(AlcDevice device) + { + public ReadOnlySpan GetString(AlcGetString param) => Alc.GetStringUtf8(device, param); + + public int Get(AlcInteger param) => Alc.GetInteger(device, param); + } + + extension(AlcCaptureDevice capture) + { + public ReadOnlySpan GetString(AlcGetString param) => Alc.GetStringUtf8(capture, param); + + public int Get(AlcInteger param) => Alc.GetInteger(capture, param); + } +} diff --git a/Brutal.OpenAl/Manual/StringUtils.cs b/Brutal.OpenAl/Manual/StringUtils.cs new file mode 100644 index 0000000..7e336e0 --- /dev/null +++ b/Brutal.OpenAl/Manual/StringUtils.cs @@ -0,0 +1,23 @@ +using Brutal.Strings; + +namespace Brutal.OpenAlApi; + +internal static unsafe class StringUtils +{ + internal static string? Utf8ToString(byte* p) => p is null ? null : Utf8.GetString(p); + + internal static string[] Utf8ListToStrings(byte* p) + { + if (p is null) + return []; + + var result = new List(); + while (*p != 0) + { + var entry = Utf8.GetNullTerminatedSpan(p); + result.Add(Utf8.GetString(entry)); + p += entry.Length + 1; // step over this entry's terminator + } + return [.. result]; + } +} diff --git a/Brutal.OpenAl/Manual/Utf8Buffer.cs b/Brutal.OpenAl/Manual/Utf8Buffer.cs new file mode 100644 index 0000000..7dbe525 --- /dev/null +++ b/Brutal.OpenAl/Manual/Utf8Buffer.cs @@ -0,0 +1,45 @@ +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.OpenAlApi; + +internal ref struct Utf8Buffer +{ + public const int StackBufferSize = 0x100; + + private SpanOwner _owner; + private readonly ReadOnlySpan _bytes; + + public ReadOnlySpan Span => _bytes; + + public int Length => _bytes.IsEmpty ? 0 : _bytes.Length - 1; + + public Utf8Buffer(string? managed, Span buffer) + { + _owner = SpanOwner.Empty; + if (managed is null) + return; + + const int MaxUtf8BytesPerChar = 3; + + // >= for the NUL terminator; the long cast avoids a checked multiply. + if ((long)MaxUtf8BytesPerChar * managed.Length + 1 >= buffer.Length) + { + // The estimate overflows the buffer - only now pay for an exact count. + var exactByteCount = checked(Encoding.UTF8.GetByteCount(managed) + 1); // + 1 for the NUL + if (exactByteCount > buffer.Length) + { + _owner = SpanOwner.Allocate(exactByteCount); + var spillLength = Encoding.UTF8.GetBytes(managed, _owner.Span); + _owner.Span[spillLength] = 0; + _bytes = _owner.Span[..(spillLength + 1)]; + return; + } + } + + var length = Encoding.UTF8.GetBytes(managed, buffer); + buffer[length] = 0; + _bytes = buffer[..(length + 1)]; + } + + public void Dispose() => _owner.Dispose(); +} diff --git a/Brutal.OpenGl/Constants.gen.cs b/Brutal.OpenGl/Constants.gen.cs new file mode 100644 index 0000000..7d1e9c5 --- /dev/null +++ b/Brutal.OpenGl/Constants.gen.cs @@ -0,0 +1,1412 @@ +/* + * @brief Contains the OpenGl macros representing constants, ported to integer constants in C#. + * + * @warning This file is auto-generated by Brutal.OpenGl.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +namespace Brutal.OpenGlApi +{ + public static partial class OpenGl + { + public const uint GL_DEPTH_BUFFER_BIT = 0x00000100; + public const uint GL_STENCIL_BUFFER_BIT = 0x00000400; + public const uint GL_COLOR_BUFFER_BIT = 0x00004000; + public const uint GL_FALSE = 0; + public const uint GL_TRUE = 1; + public const uint GL_POINTS = 0x0000; + public const uint GL_LINES = 0x0001; + public const uint GL_LINE_LOOP = 0x0002; + public const uint GL_LINE_STRIP = 0x0003; + public const uint GL_TRIANGLES = 0x0004; + public const uint GL_TRIANGLE_STRIP = 0x0005; + public const uint GL_TRIANGLE_FAN = 0x0006; + public const uint GL_NEVER = 0x0200; + public const uint GL_LESS = 0x0201; + public const uint GL_EQUAL = 0x0202; + public const uint GL_LEQUAL = 0x0203; + public const uint GL_GREATER = 0x0204; + public const uint GL_NOTEQUAL = 0x0205; + public const uint GL_GEQUAL = 0x0206; + public const uint GL_ALWAYS = 0x0207; + public const uint GL_ZERO = 0; + public const uint GL_ONE = 1; + public const uint GL_SRC_COLOR = 0x0300; + public const uint GL_ONE_MINUS_SRC_COLOR = 0x0301; + public const uint GL_SRC_ALPHA = 0x0302; + public const uint GL_ONE_MINUS_SRC_ALPHA = 0x0303; + public const uint GL_DST_ALPHA = 0x0304; + public const uint GL_ONE_MINUS_DST_ALPHA = 0x0305; + public const uint GL_DST_COLOR = 0x0306; + public const uint GL_ONE_MINUS_DST_COLOR = 0x0307; + public const uint GL_SRC_ALPHA_SATURATE = 0x0308; + public const uint GL_NONE = 0; + public const uint GL_FRONT_LEFT = 0x0400; + public const uint GL_FRONT_RIGHT = 0x0401; + public const uint GL_BACK_LEFT = 0x0402; + public const uint GL_BACK_RIGHT = 0x0403; + public const uint GL_FRONT = 0x0404; + public const uint GL_BACK = 0x0405; + public const uint GL_LEFT = 0x0406; + public const uint GL_RIGHT = 0x0407; + public const uint GL_FRONT_AND_BACK = 0x0408; + public const uint GL_NO_ERROR = 0; + public const uint GL_INVALID_ENUM = 0x0500; + public const uint GL_INVALID_VALUE = 0x0501; + public const uint GL_INVALID_OPERATION = 0x0502; + public const uint GL_OUT_OF_MEMORY = 0x0505; + public const uint GL_CW = 0x0900; + public const uint GL_CCW = 0x0901; + public const uint GL_POINT_SIZE = 0x0B11; + public const uint GL_POINT_SIZE_RANGE = 0x0B12; + public const uint GL_POINT_SIZE_GRANULARITY = 0x0B13; + public const uint GL_LINE_SMOOTH = 0x0B20; + public const uint GL_LINE_WIDTH = 0x0B21; + public const uint GL_LINE_WIDTH_RANGE = 0x0B22; + public const uint GL_LINE_WIDTH_GRANULARITY = 0x0B23; + public const uint GL_POLYGON_MODE = 0x0B40; + public const uint GL_POLYGON_SMOOTH = 0x0B41; + public const uint GL_CULL_FACE = 0x0B44; + public const uint GL_CULL_FACE_MODE = 0x0B45; + public const uint GL_FRONT_FACE = 0x0B46; + public const uint GL_DEPTH_RANGE = 0x0B70; + public const uint GL_DEPTH_TEST = 0x0B71; + public const uint GL_DEPTH_WRITEMASK = 0x0B72; + public const uint GL_DEPTH_CLEAR_VALUE = 0x0B73; + public const uint GL_DEPTH_FUNC = 0x0B74; + public const uint GL_STENCIL_TEST = 0x0B90; + public const uint GL_STENCIL_CLEAR_VALUE = 0x0B91; + public const uint GL_STENCIL_FUNC = 0x0B92; + public const uint GL_STENCIL_VALUE_MASK = 0x0B93; + public const uint GL_STENCIL_FAIL = 0x0B94; + public const uint GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95; + public const uint GL_STENCIL_PASS_DEPTH_PASS = 0x0B96; + public const uint GL_STENCIL_REF = 0x0B97; + public const uint GL_STENCIL_WRITEMASK = 0x0B98; + public const uint GL_VIEWPORT = 0x0BA2; + public const uint GL_DITHER = 0x0BD0; + public const uint GL_BLEND_DST = 0x0BE0; + public const uint GL_BLEND_SRC = 0x0BE1; + public const uint GL_BLEND = 0x0BE2; + public const uint GL_LOGIC_OP_MODE = 0x0BF0; + public const uint GL_DRAW_BUFFER = 0x0C01; + public const uint GL_READ_BUFFER = 0x0C02; + public const uint GL_SCISSOR_BOX = 0x0C10; + public const uint GL_SCISSOR_TEST = 0x0C11; + public const uint GL_COLOR_CLEAR_VALUE = 0x0C22; + public const uint GL_COLOR_WRITEMASK = 0x0C23; + public const uint GL_DOUBLEBUFFER = 0x0C32; + public const uint GL_STEREO = 0x0C33; + public const uint GL_LINE_SMOOTH_HINT = 0x0C52; + public const uint GL_POLYGON_SMOOTH_HINT = 0x0C53; + public const uint GL_UNPACK_SWAP_BYTES = 0x0CF0; + public const uint GL_UNPACK_LSB_FIRST = 0x0CF1; + public const uint GL_UNPACK_ROW_LENGTH = 0x0CF2; + public const uint GL_UNPACK_SKIP_ROWS = 0x0CF3; + public const uint GL_UNPACK_SKIP_PIXELS = 0x0CF4; + public const uint GL_UNPACK_ALIGNMENT = 0x0CF5; + public const uint GL_PACK_SWAP_BYTES = 0x0D00; + public const uint GL_PACK_LSB_FIRST = 0x0D01; + public const uint GL_PACK_ROW_LENGTH = 0x0D02; + public const uint GL_PACK_SKIP_ROWS = 0x0D03; + public const uint GL_PACK_SKIP_PIXELS = 0x0D04; + public const uint GL_PACK_ALIGNMENT = 0x0D05; + public const uint GL_MAX_TEXTURE_SIZE = 0x0D33; + public const uint GL_MAX_VIEWPORT_DIMS = 0x0D3A; + public const uint GL_SUBPIXEL_BITS = 0x0D50; + public const uint GL_TEXTURE_1D = 0x0DE0; + public const uint GL_TEXTURE_2D = 0x0DE1; + public const uint GL_TEXTURE_WIDTH = 0x1000; + public const uint GL_TEXTURE_HEIGHT = 0x1001; + public const uint GL_TEXTURE_BORDER_COLOR = 0x1004; + public const uint GL_DONT_CARE = 0x1100; + public const uint GL_FASTEST = 0x1101; + public const uint GL_NICEST = 0x1102; + public const uint GL_BYTE = 0x1400; + public const uint GL_UNSIGNED_BYTE = 0x1401; + public const uint GL_SHORT = 0x1402; + public const uint GL_UNSIGNED_SHORT = 0x1403; + public const uint GL_INT = 0x1404; + public const uint GL_UNSIGNED_INT = 0x1405; + public const uint GL_FLOAT = 0x1406; + public const uint GL_CLEAR = 0x1500; + public const uint GL_AND = 0x1501; + public const uint GL_AND_REVERSE = 0x1502; + public const uint GL_COPY = 0x1503; + public const uint GL_AND_INVERTED = 0x1504; + public const uint GL_NOOP = 0x1505; + public const uint GL_XOR = 0x1506; + public const uint GL_OR = 0x1507; + public const uint GL_NOR = 0x1508; + public const uint GL_EQUIV = 0x1509; + public const uint GL_INVERT = 0x150A; + public const uint GL_OR_REVERSE = 0x150B; + public const uint GL_COPY_INVERTED = 0x150C; + public const uint GL_OR_INVERTED = 0x150D; + public const uint GL_NAND = 0x150E; + public const uint GL_SET = 0x150F; + public const uint GL_TEXTURE = 0x1702; + public const uint GL_COLOR = 0x1800; + public const uint GL_DEPTH = 0x1801; + public const uint GL_STENCIL = 0x1802; + public const uint GL_STENCIL_INDEX = 0x1901; + public const uint GL_DEPTH_COMPONENT = 0x1902; + public const uint GL_RED = 0x1903; + public const uint GL_GREEN = 0x1904; + public const uint GL_BLUE = 0x1905; + public const uint GL_ALPHA = 0x1906; + public const uint GL_RGB = 0x1907; + public const uint GL_RGBA = 0x1908; + public const uint GL_POINT = 0x1B00; + public const uint GL_LINE = 0x1B01; + public const uint GL_FILL = 0x1B02; + public const uint GL_KEEP = 0x1E00; + public const uint GL_REPLACE = 0x1E01; + public const uint GL_INCR = 0x1E02; + public const uint GL_DECR = 0x1E03; + public const uint GL_VENDOR = 0x1F00; + public const uint GL_RENDERER = 0x1F01; + public const uint GL_VERSION = 0x1F02; + public const uint GL_EXTENSIONS = 0x1F03; + public const uint GL_NEAREST = 0x2600; + public const uint GL_LINEAR = 0x2601; + public const uint GL_NEAREST_MIPMAP_NEAREST = 0x2700; + public const uint GL_LINEAR_MIPMAP_NEAREST = 0x2701; + public const uint GL_NEAREST_MIPMAP_LINEAR = 0x2702; + public const uint GL_LINEAR_MIPMAP_LINEAR = 0x2703; + public const uint GL_TEXTURE_MAG_FILTER = 0x2800; + public const uint GL_TEXTURE_MIN_FILTER = 0x2801; + public const uint GL_TEXTURE_WRAP_S = 0x2802; + public const uint GL_TEXTURE_WRAP_T = 0x2803; + public const uint GL_REPEAT = 0x2901; + public const uint GL_COLOR_LOGIC_OP = 0x0BF2; + public const uint GL_POLYGON_OFFSET_UNITS = 0x2A00; + public const uint GL_POLYGON_OFFSET_POINT = 0x2A01; + public const uint GL_POLYGON_OFFSET_LINE = 0x2A02; + public const uint GL_POLYGON_OFFSET_FILL = 0x8037; + public const uint GL_POLYGON_OFFSET_FACTOR = 0x8038; + public const uint GL_TEXTURE_BINDING_1D = 0x8068; + public const uint GL_TEXTURE_BINDING_2D = 0x8069; + public const uint GL_TEXTURE_INTERNAL_FORMAT = 0x1003; + public const uint GL_TEXTURE_RED_SIZE = 0x805C; + public const uint GL_TEXTURE_GREEN_SIZE = 0x805D; + public const uint GL_TEXTURE_BLUE_SIZE = 0x805E; + public const uint GL_TEXTURE_ALPHA_SIZE = 0x805F; + public const uint GL_DOUBLE = 0x140A; + public const uint GL_PROXY_TEXTURE_1D = 0x8063; + public const uint GL_PROXY_TEXTURE_2D = 0x8064; + public const uint GL_R3_G3_B2 = 0x2A10; + public const uint GL_RGB4 = 0x804F; + public const uint GL_RGB5 = 0x8050; + public const uint GL_RGB8 = 0x8051; + public const uint GL_RGB10 = 0x8052; + public const uint GL_RGB12 = 0x8053; + public const uint GL_RGB16 = 0x8054; + public const uint GL_RGBA2 = 0x8055; + public const uint GL_RGBA4 = 0x8056; + public const uint GL_RGB5_A1 = 0x8057; + public const uint GL_RGBA8 = 0x8058; + public const uint GL_RGB10_A2 = 0x8059; + public const uint GL_RGBA12 = 0x805A; + public const uint GL_RGBA16 = 0x805B; + public const uint GL_UNSIGNED_BYTE_3_3_2 = 0x8032; + public const uint GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; + public const uint GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; + public const uint GL_UNSIGNED_INT_8_8_8_8 = 0x8035; + public const uint GL_UNSIGNED_INT_10_10_10_2 = 0x8036; + public const uint GL_TEXTURE_BINDING_3D = 0x806A; + public const uint GL_PACK_SKIP_IMAGES = 0x806B; + public const uint GL_PACK_IMAGE_HEIGHT = 0x806C; + public const uint GL_UNPACK_SKIP_IMAGES = 0x806D; + public const uint GL_UNPACK_IMAGE_HEIGHT = 0x806E; + public const uint GL_TEXTURE_3D = 0x806F; + public const uint GL_PROXY_TEXTURE_3D = 0x8070; + public const uint GL_TEXTURE_DEPTH = 0x8071; + public const uint GL_TEXTURE_WRAP_R = 0x8072; + public const uint GL_MAX_3D_TEXTURE_SIZE = 0x8073; + public const uint GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; + public const uint GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + public const uint GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; + public const uint GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; + public const uint GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; + public const uint GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; + public const uint GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + public const uint GL_BGR = 0x80E0; + public const uint GL_BGRA = 0x80E1; + public const uint GL_MAX_ELEMENTS_VERTICES = 0x80E8; + public const uint GL_MAX_ELEMENTS_INDICES = 0x80E9; + public const uint GL_CLAMP_TO_EDGE = 0x812F; + public const uint GL_TEXTURE_MIN_LOD = 0x813A; + public const uint GL_TEXTURE_MAX_LOD = 0x813B; + public const uint GL_TEXTURE_BASE_LEVEL = 0x813C; + public const uint GL_TEXTURE_MAX_LEVEL = 0x813D; + public const uint GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12; + public const uint GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13; + public const uint GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22; + public const uint GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23; + public const uint GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; + public const uint GL_TEXTURE0 = 0x84C0; + public const uint GL_TEXTURE1 = 0x84C1; + public const uint GL_TEXTURE2 = 0x84C2; + public const uint GL_TEXTURE3 = 0x84C3; + public const uint GL_TEXTURE4 = 0x84C4; + public const uint GL_TEXTURE5 = 0x84C5; + public const uint GL_TEXTURE6 = 0x84C6; + public const uint GL_TEXTURE7 = 0x84C7; + public const uint GL_TEXTURE8 = 0x84C8; + public const uint GL_TEXTURE9 = 0x84C9; + public const uint GL_TEXTURE10 = 0x84CA; + public const uint GL_TEXTURE11 = 0x84CB; + public const uint GL_TEXTURE12 = 0x84CC; + public const uint GL_TEXTURE13 = 0x84CD; + public const uint GL_TEXTURE14 = 0x84CE; + public const uint GL_TEXTURE15 = 0x84CF; + public const uint GL_TEXTURE16 = 0x84D0; + public const uint GL_TEXTURE17 = 0x84D1; + public const uint GL_TEXTURE18 = 0x84D2; + public const uint GL_TEXTURE19 = 0x84D3; + public const uint GL_TEXTURE20 = 0x84D4; + public const uint GL_TEXTURE21 = 0x84D5; + public const uint GL_TEXTURE22 = 0x84D6; + public const uint GL_TEXTURE23 = 0x84D7; + public const uint GL_TEXTURE24 = 0x84D8; + public const uint GL_TEXTURE25 = 0x84D9; + public const uint GL_TEXTURE26 = 0x84DA; + public const uint GL_TEXTURE27 = 0x84DB; + public const uint GL_TEXTURE28 = 0x84DC; + public const uint GL_TEXTURE29 = 0x84DD; + public const uint GL_TEXTURE30 = 0x84DE; + public const uint GL_TEXTURE31 = 0x84DF; + public const uint GL_ACTIVE_TEXTURE = 0x84E0; + public const uint GL_MULTISAMPLE = 0x809D; + public const uint GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; + public const uint GL_SAMPLE_ALPHA_TO_ONE = 0x809F; + public const uint GL_SAMPLE_COVERAGE = 0x80A0; + public const uint GL_SAMPLE_BUFFERS = 0x80A8; + public const uint GL_SAMPLES = 0x80A9; + public const uint GL_SAMPLE_COVERAGE_VALUE = 0x80AA; + public const uint GL_SAMPLE_COVERAGE_INVERT = 0x80AB; + public const uint GL_TEXTURE_CUBE_MAP = 0x8513; + public const uint GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; + public const uint GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; + public const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; + public const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; + public const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; + public const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; + public const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; + public const uint GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; + public const uint GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; + public const uint GL_COMPRESSED_RGB = 0x84ED; + public const uint GL_COMPRESSED_RGBA = 0x84EE; + public const uint GL_TEXTURE_COMPRESSION_HINT = 0x84EF; + public const uint GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0; + public const uint GL_TEXTURE_COMPRESSED = 0x86A1; + public const uint GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; + public const uint GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; + public const uint GL_CLAMP_TO_BORDER = 0x812D; + public const uint GL_BLEND_DST_RGB = 0x80C8; + public const uint GL_BLEND_SRC_RGB = 0x80C9; + public const uint GL_BLEND_DST_ALPHA = 0x80CA; + public const uint GL_BLEND_SRC_ALPHA = 0x80CB; + public const uint GL_POINT_FADE_THRESHOLD_SIZE = 0x8128; + public const uint GL_DEPTH_COMPONENT16 = 0x81A5; + public const uint GL_DEPTH_COMPONENT24 = 0x81A6; + public const uint GL_DEPTH_COMPONENT32 = 0x81A7; + public const uint GL_MIRRORED_REPEAT = 0x8370; + public const uint GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; + public const uint GL_TEXTURE_LOD_BIAS = 0x8501; + public const uint GL_INCR_WRAP = 0x8507; + public const uint GL_DECR_WRAP = 0x8508; + public const uint GL_TEXTURE_DEPTH_SIZE = 0x884A; + public const uint GL_TEXTURE_COMPARE_MODE = 0x884C; + public const uint GL_TEXTURE_COMPARE_FUNC = 0x884D; + public const uint GL_BLEND_COLOR = 0x8005; + public const uint GL_BLEND_EQUATION = 0x8009; + public const uint GL_CONSTANT_COLOR = 0x8001; + public const uint GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; + public const uint GL_CONSTANT_ALPHA = 0x8003; + public const uint GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; + public const uint GL_FUNC_ADD = 0x8006; + public const uint GL_FUNC_REVERSE_SUBTRACT = 0x800B; + public const uint GL_FUNC_SUBTRACT = 0x800A; + public const uint GL_MIN = 0x8007; + public const uint GL_MAX = 0x8008; + public const uint GL_BUFFER_SIZE = 0x8764; + public const uint GL_BUFFER_USAGE = 0x8765; + public const uint GL_QUERY_COUNTER_BITS = 0x8864; + public const uint GL_CURRENT_QUERY = 0x8865; + public const uint GL_QUERY_RESULT = 0x8866; + public const uint GL_QUERY_RESULT_AVAILABLE = 0x8867; + public const uint GL_ARRAY_BUFFER = 0x8892; + public const uint GL_ELEMENT_ARRAY_BUFFER = 0x8893; + public const uint GL_ARRAY_BUFFER_BINDING = 0x8894; + public const uint GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; + public const uint GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; + public const uint GL_READ_ONLY = 0x88B8; + public const uint GL_WRITE_ONLY = 0x88B9; + public const uint GL_READ_WRITE = 0x88BA; + public const uint GL_BUFFER_ACCESS = 0x88BB; + public const uint GL_BUFFER_MAPPED = 0x88BC; + public const uint GL_BUFFER_MAP_POINTER = 0x88BD; + public const uint GL_STREAM_DRAW = 0x88E0; + public const uint GL_STREAM_READ = 0x88E1; + public const uint GL_STREAM_COPY = 0x88E2; + public const uint GL_STATIC_DRAW = 0x88E4; + public const uint GL_STATIC_READ = 0x88E5; + public const uint GL_STATIC_COPY = 0x88E6; + public const uint GL_DYNAMIC_DRAW = 0x88E8; + public const uint GL_DYNAMIC_READ = 0x88E9; + public const uint GL_DYNAMIC_COPY = 0x88EA; + public const uint GL_SAMPLES_PASSED = 0x8914; + public const uint GL_SRC1_ALPHA = 0x8589; + public const uint GL_BLEND_EQUATION_RGB = 0x8009; + public const uint GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; + public const uint GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; + public const uint GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; + public const uint GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; + public const uint GL_CURRENT_VERTEX_ATTRIB = 0x8626; + public const uint GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642; + public const uint GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; + public const uint GL_STENCIL_BACK_FUNC = 0x8800; + public const uint GL_STENCIL_BACK_FAIL = 0x8801; + public const uint GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; + public const uint GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; + public const uint GL_MAX_DRAW_BUFFERS = 0x8824; + public const uint GL_DRAW_BUFFER0 = 0x8825; + public const uint GL_DRAW_BUFFER1 = 0x8826; + public const uint GL_DRAW_BUFFER2 = 0x8827; + public const uint GL_DRAW_BUFFER3 = 0x8828; + public const uint GL_DRAW_BUFFER4 = 0x8829; + public const uint GL_DRAW_BUFFER5 = 0x882A; + public const uint GL_DRAW_BUFFER6 = 0x882B; + public const uint GL_DRAW_BUFFER7 = 0x882C; + public const uint GL_DRAW_BUFFER8 = 0x882D; + public const uint GL_DRAW_BUFFER9 = 0x882E; + public const uint GL_DRAW_BUFFER10 = 0x882F; + public const uint GL_DRAW_BUFFER11 = 0x8830; + public const uint GL_DRAW_BUFFER12 = 0x8831; + public const uint GL_DRAW_BUFFER13 = 0x8832; + public const uint GL_DRAW_BUFFER14 = 0x8833; + public const uint GL_DRAW_BUFFER15 = 0x8834; + public const uint GL_BLEND_EQUATION_ALPHA = 0x883D; + public const uint GL_MAX_VERTEX_ATTRIBS = 0x8869; + public const uint GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; + public const uint GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872; + public const uint GL_FRAGMENT_SHADER = 0x8B30; + public const uint GL_VERTEX_SHADER = 0x8B31; + public const uint GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; + public const uint GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; + public const uint GL_MAX_VARYING_FLOATS = 0x8B4B; + public const uint GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; + public const uint GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; + public const uint GL_SHADER_TYPE = 0x8B4F; + public const uint GL_FLOAT_VEC2 = 0x8B50; + public const uint GL_FLOAT_VEC3 = 0x8B51; + public const uint GL_FLOAT_VEC4 = 0x8B52; + public const uint GL_INT_VEC2 = 0x8B53; + public const uint GL_INT_VEC3 = 0x8B54; + public const uint GL_INT_VEC4 = 0x8B55; + public const uint GL_BOOL = 0x8B56; + public const uint GL_BOOL_VEC2 = 0x8B57; + public const uint GL_BOOL_VEC3 = 0x8B58; + public const uint GL_BOOL_VEC4 = 0x8B59; + public const uint GL_FLOAT_MAT2 = 0x8B5A; + public const uint GL_FLOAT_MAT3 = 0x8B5B; + public const uint GL_FLOAT_MAT4 = 0x8B5C; + public const uint GL_SAMPLER_1D = 0x8B5D; + public const uint GL_SAMPLER_2D = 0x8B5E; + public const uint GL_SAMPLER_3D = 0x8B5F; + public const uint GL_SAMPLER_CUBE = 0x8B60; + public const uint GL_SAMPLER_1D_SHADOW = 0x8B61; + public const uint GL_SAMPLER_2D_SHADOW = 0x8B62; + public const uint GL_DELETE_STATUS = 0x8B80; + public const uint GL_COMPILE_STATUS = 0x8B81; + public const uint GL_LINK_STATUS = 0x8B82; + public const uint GL_VALIDATE_STATUS = 0x8B83; + public const uint GL_INFO_LOG_LENGTH = 0x8B84; + public const uint GL_ATTACHED_SHADERS = 0x8B85; + public const uint GL_ACTIVE_UNIFORMS = 0x8B86; + public const uint GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87; + public const uint GL_SHADER_SOURCE_LENGTH = 0x8B88; + public const uint GL_ACTIVE_ATTRIBUTES = 0x8B89; + public const uint GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A; + public const uint GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; + public const uint GL_SHADING_LANGUAGE_VERSION = 0x8B8C; + public const uint GL_CURRENT_PROGRAM = 0x8B8D; + public const uint GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0; + public const uint GL_LOWER_LEFT = 0x8CA1; + public const uint GL_UPPER_LEFT = 0x8CA2; + public const uint GL_STENCIL_BACK_REF = 0x8CA3; + public const uint GL_STENCIL_BACK_VALUE_MASK = 0x8CA4; + public const uint GL_STENCIL_BACK_WRITEMASK = 0x8CA5; + public const uint GL_PIXEL_PACK_BUFFER = 0x88EB; + public const uint GL_PIXEL_UNPACK_BUFFER = 0x88EC; + public const uint GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED; + public const uint GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; + public const uint GL_FLOAT_MAT2x3 = 0x8B65; + public const uint GL_FLOAT_MAT2x4 = 0x8B66; + public const uint GL_FLOAT_MAT3x2 = 0x8B67; + public const uint GL_FLOAT_MAT3x4 = 0x8B68; + public const uint GL_FLOAT_MAT4x2 = 0x8B69; + public const uint GL_FLOAT_MAT4x3 = 0x8B6A; + public const uint GL_SRGB = 0x8C40; + public const uint GL_SRGB8 = 0x8C41; + public const uint GL_SRGB_ALPHA = 0x8C42; + public const uint GL_SRGB8_ALPHA8 = 0x8C43; + public const uint GL_COMPRESSED_SRGB = 0x8C48; + public const uint GL_COMPRESSED_SRGB_ALPHA = 0x8C49; + public const uint GL_COMPARE_REF_TO_TEXTURE = 0x884E; + public const uint GL_CLIP_DISTANCE0 = 0x3000; + public const uint GL_CLIP_DISTANCE1 = 0x3001; + public const uint GL_CLIP_DISTANCE2 = 0x3002; + public const uint GL_CLIP_DISTANCE3 = 0x3003; + public const uint GL_CLIP_DISTANCE4 = 0x3004; + public const uint GL_CLIP_DISTANCE5 = 0x3005; + public const uint GL_CLIP_DISTANCE6 = 0x3006; + public const uint GL_CLIP_DISTANCE7 = 0x3007; + public const uint GL_MAX_CLIP_DISTANCES = 0x0D32; + public const uint GL_MAJOR_VERSION = 0x821B; + public const uint GL_MINOR_VERSION = 0x821C; + public const uint GL_NUM_EXTENSIONS = 0x821D; + public const uint GL_CONTEXT_FLAGS = 0x821E; + public const uint GL_COMPRESSED_RED = 0x8225; + public const uint GL_COMPRESSED_RG = 0x8226; + public const uint GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x00000001; + public const uint GL_RGBA32F = 0x8814; + public const uint GL_RGB32F = 0x8815; + public const uint GL_RGBA16F = 0x881A; + public const uint GL_RGB16F = 0x881B; + public const uint GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; + public const uint GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; + public const uint GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904; + public const uint GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; + public const uint GL_CLAMP_READ_COLOR = 0x891C; + public const uint GL_FIXED_ONLY = 0x891D; + public const uint GL_MAX_VARYING_COMPONENTS = 0x8B4B; + public const uint GL_TEXTURE_1D_ARRAY = 0x8C18; + public const uint GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19; + public const uint GL_TEXTURE_2D_ARRAY = 0x8C1A; + public const uint GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B; + public const uint GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C; + public const uint GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D; + public const uint GL_R11F_G11F_B10F = 0x8C3A; + public const uint GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; + public const uint GL_RGB9_E5 = 0x8C3D; + public const uint GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; + public const uint GL_TEXTURE_SHARED_SIZE = 0x8C3F; + public const uint GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F; + public const uint GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; + public const uint GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; + public const uint GL_PRIMITIVES_GENERATED = 0x8C87; + public const uint GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; + public const uint GL_RASTERIZER_DISCARD = 0x8C89; + public const uint GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A; + public const uint GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B; + public const uint GL_INTERLEAVED_ATTRIBS = 0x8C8C; + public const uint GL_SEPARATE_ATTRIBS = 0x8C8D; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; + public const uint GL_RGBA32UI = 0x8D70; + public const uint GL_RGB32UI = 0x8D71; + public const uint GL_RGBA16UI = 0x8D76; + public const uint GL_RGB16UI = 0x8D77; + public const uint GL_RGBA8UI = 0x8D7C; + public const uint GL_RGB8UI = 0x8D7D; + public const uint GL_RGBA32I = 0x8D82; + public const uint GL_RGB32I = 0x8D83; + public const uint GL_RGBA16I = 0x8D88; + public const uint GL_RGB16I = 0x8D89; + public const uint GL_RGBA8I = 0x8D8E; + public const uint GL_RGB8I = 0x8D8F; + public const uint GL_RED_INTEGER = 0x8D94; + public const uint GL_GREEN_INTEGER = 0x8D95; + public const uint GL_BLUE_INTEGER = 0x8D96; + public const uint GL_RGB_INTEGER = 0x8D98; + public const uint GL_RGBA_INTEGER = 0x8D99; + public const uint GL_BGR_INTEGER = 0x8D9A; + public const uint GL_BGRA_INTEGER = 0x8D9B; + public const uint GL_SAMPLER_1D_ARRAY = 0x8DC0; + public const uint GL_SAMPLER_2D_ARRAY = 0x8DC1; + public const uint GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3; + public const uint GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4; + public const uint GL_SAMPLER_CUBE_SHADOW = 0x8DC5; + public const uint GL_UNSIGNED_INT_VEC2 = 0x8DC6; + public const uint GL_UNSIGNED_INT_VEC3 = 0x8DC7; + public const uint GL_UNSIGNED_INT_VEC4 = 0x8DC8; + public const uint GL_INT_SAMPLER_1D = 0x8DC9; + public const uint GL_INT_SAMPLER_2D = 0x8DCA; + public const uint GL_INT_SAMPLER_3D = 0x8DCB; + public const uint GL_INT_SAMPLER_CUBE = 0x8DCC; + public const uint GL_INT_SAMPLER_1D_ARRAY = 0x8DCE; + public const uint GL_INT_SAMPLER_2D_ARRAY = 0x8DCF; + public const uint GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1; + public const uint GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2; + public const uint GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3; + public const uint GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4; + public const uint GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6; + public const uint GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; + public const uint GL_QUERY_WAIT = 0x8E13; + public const uint GL_QUERY_NO_WAIT = 0x8E14; + public const uint GL_QUERY_BY_REGION_WAIT = 0x8E15; + public const uint GL_QUERY_BY_REGION_NO_WAIT = 0x8E16; + public const uint GL_BUFFER_ACCESS_FLAGS = 0x911F; + public const uint GL_BUFFER_MAP_LENGTH = 0x9120; + public const uint GL_BUFFER_MAP_OFFSET = 0x9121; + public const uint GL_DEPTH_COMPONENT32F = 0x8CAC; + public const uint GL_DEPTH32F_STENCIL8 = 0x8CAD; + public const uint GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + public const uint GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; + public const uint GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210; + public const uint GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211; + public const uint GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212; + public const uint GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213; + public const uint GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214; + public const uint GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215; + public const uint GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216; + public const uint GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + public const uint GL_FRAMEBUFFER_DEFAULT = 0x8218; + public const uint GL_FRAMEBUFFER_UNDEFINED = 0x8219; + public const uint GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + public const uint GL_MAX_RENDERBUFFER_SIZE = 0x84E8; + public const uint GL_DEPTH_STENCIL = 0x84F9; + public const uint GL_UNSIGNED_INT_24_8 = 0x84FA; + public const uint GL_DEPTH24_STENCIL8 = 0x88F0; + public const uint GL_TEXTURE_STENCIL_SIZE = 0x88F1; + public const uint GL_TEXTURE_RED_TYPE = 0x8C10; + public const uint GL_TEXTURE_GREEN_TYPE = 0x8C11; + public const uint GL_TEXTURE_BLUE_TYPE = 0x8C12; + public const uint GL_TEXTURE_ALPHA_TYPE = 0x8C13; + public const uint GL_TEXTURE_DEPTH_TYPE = 0x8C16; + public const uint GL_UNSIGNED_NORMALIZED = 0x8C17; + public const uint GL_FRAMEBUFFER_BINDING = 0x8CA6; + public const uint GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6; + public const uint GL_RENDERBUFFER_BINDING = 0x8CA7; + public const uint GL_READ_FRAMEBUFFER = 0x8CA8; + public const uint GL_DRAW_FRAMEBUFFER = 0x8CA9; + public const uint GL_READ_FRAMEBUFFER_BINDING = 0x8CAA; + public const uint GL_RENDERBUFFER_SAMPLES = 0x8CAB; + public const uint GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; + public const uint GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; + public const uint GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; + public const uint GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; + public const uint GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + public const uint GL_FRAMEBUFFER_COMPLETE = 0x8CD5; + public const uint GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; + public const uint GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; + public const uint GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB; + public const uint GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC; + public const uint GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD; + public const uint GL_MAX_COLOR_ATTACHMENTS = 0x8CDF; + public const uint GL_COLOR_ATTACHMENT0 = 0x8CE0; + public const uint GL_COLOR_ATTACHMENT1 = 0x8CE1; + public const uint GL_COLOR_ATTACHMENT2 = 0x8CE2; + public const uint GL_COLOR_ATTACHMENT3 = 0x8CE3; + public const uint GL_COLOR_ATTACHMENT4 = 0x8CE4; + public const uint GL_COLOR_ATTACHMENT5 = 0x8CE5; + public const uint GL_COLOR_ATTACHMENT6 = 0x8CE6; + public const uint GL_COLOR_ATTACHMENT7 = 0x8CE7; + public const uint GL_COLOR_ATTACHMENT8 = 0x8CE8; + public const uint GL_COLOR_ATTACHMENT9 = 0x8CE9; + public const uint GL_COLOR_ATTACHMENT10 = 0x8CEA; + public const uint GL_COLOR_ATTACHMENT11 = 0x8CEB; + public const uint GL_COLOR_ATTACHMENT12 = 0x8CEC; + public const uint GL_COLOR_ATTACHMENT13 = 0x8CED; + public const uint GL_COLOR_ATTACHMENT14 = 0x8CEE; + public const uint GL_COLOR_ATTACHMENT15 = 0x8CEF; + public const uint GL_COLOR_ATTACHMENT16 = 0x8CF0; + public const uint GL_COLOR_ATTACHMENT17 = 0x8CF1; + public const uint GL_COLOR_ATTACHMENT18 = 0x8CF2; + public const uint GL_COLOR_ATTACHMENT19 = 0x8CF3; + public const uint GL_COLOR_ATTACHMENT20 = 0x8CF4; + public const uint GL_COLOR_ATTACHMENT21 = 0x8CF5; + public const uint GL_COLOR_ATTACHMENT22 = 0x8CF6; + public const uint GL_COLOR_ATTACHMENT23 = 0x8CF7; + public const uint GL_COLOR_ATTACHMENT24 = 0x8CF8; + public const uint GL_COLOR_ATTACHMENT25 = 0x8CF9; + public const uint GL_COLOR_ATTACHMENT26 = 0x8CFA; + public const uint GL_COLOR_ATTACHMENT27 = 0x8CFB; + public const uint GL_COLOR_ATTACHMENT28 = 0x8CFC; + public const uint GL_COLOR_ATTACHMENT29 = 0x8CFD; + public const uint GL_COLOR_ATTACHMENT30 = 0x8CFE; + public const uint GL_COLOR_ATTACHMENT31 = 0x8CFF; + public const uint GL_DEPTH_ATTACHMENT = 0x8D00; + public const uint GL_STENCIL_ATTACHMENT = 0x8D20; + public const uint GL_FRAMEBUFFER = 0x8D40; + public const uint GL_RENDERBUFFER = 0x8D41; + public const uint GL_RENDERBUFFER_WIDTH = 0x8D42; + public const uint GL_RENDERBUFFER_HEIGHT = 0x8D43; + public const uint GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; + public const uint GL_STENCIL_INDEX1 = 0x8D46; + public const uint GL_STENCIL_INDEX4 = 0x8D47; + public const uint GL_STENCIL_INDEX8 = 0x8D48; + public const uint GL_STENCIL_INDEX16 = 0x8D49; + public const uint GL_RENDERBUFFER_RED_SIZE = 0x8D50; + public const uint GL_RENDERBUFFER_GREEN_SIZE = 0x8D51; + public const uint GL_RENDERBUFFER_BLUE_SIZE = 0x8D52; + public const uint GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53; + public const uint GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54; + public const uint GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55; + public const uint GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; + public const uint GL_MAX_SAMPLES = 0x8D57; + public const uint GL_FRAMEBUFFER_SRGB = 0x8DB9; + public const uint GL_HALF_FLOAT = 0x140B; + public const uint GL_MAP_READ_BIT = 0x0001; + public const uint GL_MAP_WRITE_BIT = 0x0002; + public const uint GL_MAP_INVALIDATE_RANGE_BIT = 0x0004; + public const uint GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008; + public const uint GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; + public const uint GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; + public const uint GL_COMPRESSED_RED_RGTC1 = 0x8DBB; + public const uint GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC; + public const uint GL_COMPRESSED_RG_RGTC2 = 0x8DBD; + public const uint GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; + public const uint GL_RG = 0x8227; + public const uint GL_RG_INTEGER = 0x8228; + public const uint GL_R8 = 0x8229; + public const uint GL_R16 = 0x822A; + public const uint GL_RG8 = 0x822B; + public const uint GL_RG16 = 0x822C; + public const uint GL_R16F = 0x822D; + public const uint GL_R32F = 0x822E; + public const uint GL_RG16F = 0x822F; + public const uint GL_RG32F = 0x8230; + public const uint GL_R8I = 0x8231; + public const uint GL_R8UI = 0x8232; + public const uint GL_R16I = 0x8233; + public const uint GL_R16UI = 0x8234; + public const uint GL_R32I = 0x8235; + public const uint GL_R32UI = 0x8236; + public const uint GL_RG8I = 0x8237; + public const uint GL_RG8UI = 0x8238; + public const uint GL_RG16I = 0x8239; + public const uint GL_RG16UI = 0x823A; + public const uint GL_RG32I = 0x823B; + public const uint GL_RG32UI = 0x823C; + public const uint GL_VERTEX_ARRAY_BINDING = 0x85B5; + public const uint GL_SAMPLER_2D_RECT = 0x8B63; + public const uint GL_SAMPLER_2D_RECT_SHADOW = 0x8B64; + public const uint GL_SAMPLER_BUFFER = 0x8DC2; + public const uint GL_INT_SAMPLER_2D_RECT = 0x8DCD; + public const uint GL_INT_SAMPLER_BUFFER = 0x8DD0; + public const uint GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5; + public const uint GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8; + public const uint GL_TEXTURE_BUFFER = 0x8C2A; + public const uint GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B; + public const uint GL_TEXTURE_BINDING_BUFFER = 0x8C2C; + public const uint GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D; + public const uint GL_TEXTURE_RECTANGLE = 0x84F5; + public const uint GL_TEXTURE_BINDING_RECTANGLE = 0x84F6; + public const uint GL_PROXY_TEXTURE_RECTANGLE = 0x84F7; + public const uint GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8; + public const uint GL_R8_SNORM = 0x8F94; + public const uint GL_RG8_SNORM = 0x8F95; + public const uint GL_RGB8_SNORM = 0x8F96; + public const uint GL_RGBA8_SNORM = 0x8F97; + public const uint GL_R16_SNORM = 0x8F98; + public const uint GL_RG16_SNORM = 0x8F99; + public const uint GL_RGB16_SNORM = 0x8F9A; + public const uint GL_RGBA16_SNORM = 0x8F9B; + public const uint GL_SIGNED_NORMALIZED = 0x8F9C; + public const uint GL_PRIMITIVE_RESTART = 0x8F9D; + public const uint GL_PRIMITIVE_RESTART_INDEX = 0x8F9E; + public const uint GL_COPY_READ_BUFFER = 0x8F36; + public const uint GL_COPY_WRITE_BUFFER = 0x8F37; + public const uint GL_UNIFORM_BUFFER = 0x8A11; + public const uint GL_UNIFORM_BUFFER_BINDING = 0x8A28; + public const uint GL_UNIFORM_BUFFER_START = 0x8A29; + public const uint GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + public const uint GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B; + public const uint GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C; + public const uint GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D; + public const uint GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E; + public const uint GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F; + public const uint GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30; + public const uint GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31; + public const uint GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32; + public const uint GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33; + public const uint GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + public const uint GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35; + public const uint GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + public const uint GL_UNIFORM_TYPE = 0x8A37; + public const uint GL_UNIFORM_SIZE = 0x8A38; + public const uint GL_UNIFORM_NAME_LENGTH = 0x8A39; + public const uint GL_UNIFORM_BLOCK_INDEX = 0x8A3A; + public const uint GL_UNIFORM_OFFSET = 0x8A3B; + public const uint GL_UNIFORM_ARRAY_STRIDE = 0x8A3C; + public const uint GL_UNIFORM_MATRIX_STRIDE = 0x8A3D; + public const uint GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + public const uint GL_UNIFORM_BLOCK_BINDING = 0x8A3F; + public const uint GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40; + public const uint GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41; + public const uint GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42; + public const uint GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43; + public const uint GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44; + public const uint GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45; + public const uint GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + public const uint GL_INVALID_INDEX = 0xFFFFFFFF; + public const uint GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001; + public const uint GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002; + public const uint GL_LINES_ADJACENCY = 0x000A; + public const uint GL_LINE_STRIP_ADJACENCY = 0x000B; + public const uint GL_TRIANGLES_ADJACENCY = 0x000C; + public const uint GL_TRIANGLE_STRIP_ADJACENCY = 0x000D; + public const uint GL_PROGRAM_POINT_SIZE = 0x8642; + public const uint GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29; + public const uint GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7; + public const uint GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8; + public const uint GL_GEOMETRY_SHADER = 0x8DD9; + public const uint GL_GEOMETRY_VERTICES_OUT = 0x8916; + public const uint GL_GEOMETRY_INPUT_TYPE = 0x8917; + public const uint GL_GEOMETRY_OUTPUT_TYPE = 0x8918; + public const uint GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF; + public const uint GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0; + public const uint GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1; + public const uint GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122; + public const uint GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123; + public const uint GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124; + public const uint GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; + public const uint GL_CONTEXT_PROFILE_MASK = 0x9126; + public const uint GL_DEPTH_CLAMP = 0x864F; + public const uint GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; + public const uint GL_FIRST_VERTEX_CONVENTION = 0x8E4D; + public const uint GL_LAST_VERTEX_CONVENTION = 0x8E4E; + public const uint GL_PROVOKING_VERTEX = 0x8E4F; + public const uint GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + public const uint GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + public const uint GL_OBJECT_TYPE = 0x9112; + public const uint GL_SYNC_CONDITION = 0x9113; + public const uint GL_SYNC_STATUS = 0x9114; + public const uint GL_SYNC_FLAGS = 0x9115; + public const uint GL_SYNC_FENCE = 0x9116; + public const uint GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + public const uint GL_UNSIGNALED = 0x9118; + public const uint GL_SIGNALED = 0x9119; + public const uint GL_ALREADY_SIGNALED = 0x911A; + public const uint GL_TIMEOUT_EXPIRED = 0x911B; + public const uint GL_CONDITION_SATISFIED = 0x911C; + public const uint GL_WAIT_FAILED = 0x911D; + public const ulong GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFF; + public const uint GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; + public const uint GL_SAMPLE_POSITION = 0x8E50; + public const uint GL_SAMPLE_MASK = 0x8E51; + public const uint GL_SAMPLE_MASK_VALUE = 0x8E52; + public const uint GL_MAX_SAMPLE_MASK_WORDS = 0x8E59; + public const uint GL_TEXTURE_2D_MULTISAMPLE = 0x9100; + public const uint GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; + public const uint GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + public const uint GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; + public const uint GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104; + public const uint GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; + public const uint GL_TEXTURE_SAMPLES = 0x9106; + public const uint GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; + public const uint GL_SAMPLER_2D_MULTISAMPLE = 0x9108; + public const uint GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109; + public const uint GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A; + public const uint GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B; + public const uint GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C; + public const uint GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; + public const uint GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E; + public const uint GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F; + public const uint GL_MAX_INTEGER_SAMPLES = 0x9110; + public const uint GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; + public const uint GL_SRC1_COLOR = 0x88F9; + public const uint GL_ONE_MINUS_SRC1_COLOR = 0x88FA; + public const uint GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; + public const uint GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; + public const uint GL_ANY_SAMPLES_PASSED = 0x8C2F; + public const uint GL_SAMPLER_BINDING = 0x8919; + public const uint GL_RGB10_A2UI = 0x906F; + public const uint GL_TEXTURE_SWIZZLE_R = 0x8E42; + public const uint GL_TEXTURE_SWIZZLE_G = 0x8E43; + public const uint GL_TEXTURE_SWIZZLE_B = 0x8E44; + public const uint GL_TEXTURE_SWIZZLE_A = 0x8E45; + public const uint GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; + public const uint GL_TIME_ELAPSED = 0x88BF; + public const uint GL_TIMESTAMP = 0x8E28; + public const uint GL_INT_2_10_10_10_REV = 0x8D9F; + public const uint GL_SAMPLE_SHADING = 0x8C36; + public const uint GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37; + public const uint GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E; + public const uint GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F; + public const uint GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009; + public const uint GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A; + public const uint GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B; + public const uint GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C; + public const uint GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D; + public const uint GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E; + public const uint GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F; + public const uint GL_DRAW_INDIRECT_BUFFER = 0x8F3F; + public const uint GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; + public const uint GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; + public const uint GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A; + public const uint GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B; + public const uint GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C; + public const uint GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D; + public const uint GL_MAX_VERTEX_STREAMS = 0x8E71; + public const uint GL_DOUBLE_VEC2 = 0x8FFC; + public const uint GL_DOUBLE_VEC3 = 0x8FFD; + public const uint GL_DOUBLE_VEC4 = 0x8FFE; + public const uint GL_DOUBLE_MAT2 = 0x8F46; + public const uint GL_DOUBLE_MAT3 = 0x8F47; + public const uint GL_DOUBLE_MAT4 = 0x8F48; + public const uint GL_DOUBLE_MAT2x3 = 0x8F49; + public const uint GL_DOUBLE_MAT2x4 = 0x8F4A; + public const uint GL_DOUBLE_MAT3x2 = 0x8F4B; + public const uint GL_DOUBLE_MAT3x4 = 0x8F4C; + public const uint GL_DOUBLE_MAT4x2 = 0x8F4D; + public const uint GL_DOUBLE_MAT4x3 = 0x8F4E; + public const uint GL_ACTIVE_SUBROUTINES = 0x8DE5; + public const uint GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6; + public const uint GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47; + public const uint GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48; + public const uint GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; + public const uint GL_MAX_SUBROUTINES = 0x8DE7; + public const uint GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; + public const uint GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A; + public const uint GL_COMPATIBLE_SUBROUTINES = 0x8E4B; + public const uint GL_PATCHES = 0x000E; + public const uint GL_PATCH_VERTICES = 0x8E72; + public const uint GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73; + public const uint GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; + public const uint GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75; + public const uint GL_TESS_GEN_MODE = 0x8E76; + public const uint GL_TESS_GEN_SPACING = 0x8E77; + public const uint GL_TESS_GEN_VERTEX_ORDER = 0x8E78; + public const uint GL_TESS_GEN_POINT_MODE = 0x8E79; + public const uint GL_ISOLINES = 0x8E7A; + public const uint GL_QUADS = 0x0007; + public const uint GL_FRACTIONAL_ODD = 0x8E7B; + public const uint GL_FRACTIONAL_EVEN = 0x8E7C; + public const uint GL_MAX_PATCH_VERTICES = 0x8E7D; + public const uint GL_MAX_TESS_GEN_LEVEL = 0x8E7E; + public const uint GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F; + public const uint GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80; + public const uint GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81; + public const uint GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82; + public const uint GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83; + public const uint GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84; + public const uint GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85; + public const uint GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86; + public const uint GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89; + public const uint GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A; + public const uint GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C; + public const uint GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D; + public const uint GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E; + public const uint GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; + public const uint GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0; + public const uint GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; + public const uint GL_TESS_EVALUATION_SHADER = 0x8E87; + public const uint GL_TESS_CONTROL_SHADER = 0x8E88; + public const uint GL_TRANSFORM_FEEDBACK = 0x8E22; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24; + public const uint GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + public const uint GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70; + public const uint GL_FIXED = 0x140C; + public const uint GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; + public const uint GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + public const uint GL_LOW_FLOAT = 0x8DF0; + public const uint GL_MEDIUM_FLOAT = 0x8DF1; + public const uint GL_HIGH_FLOAT = 0x8DF2; + public const uint GL_LOW_INT = 0x8DF3; + public const uint GL_MEDIUM_INT = 0x8DF4; + public const uint GL_HIGH_INT = 0x8DF5; + public const uint GL_SHADER_COMPILER = 0x8DFA; + public const uint GL_SHADER_BINARY_FORMATS = 0x8DF8; + public const uint GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9; + public const uint GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; + public const uint GL_MAX_VARYING_VECTORS = 0x8DFC; + public const uint GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; + public const uint GL_RGB565 = 0x8D62; + public const uint GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + public const uint GL_PROGRAM_BINARY_LENGTH = 0x8741; + public const uint GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE; + public const uint GL_PROGRAM_BINARY_FORMATS = 0x87FF; + public const uint GL_VERTEX_SHADER_BIT = 0x00000001; + public const uint GL_FRAGMENT_SHADER_BIT = 0x00000002; + public const uint GL_GEOMETRY_SHADER_BIT = 0x00000004; + public const uint GL_TESS_CONTROL_SHADER_BIT = 0x00000008; + public const uint GL_TESS_EVALUATION_SHADER_BIT = 0x00000010; + public const uint GL_ALL_SHADER_BITS = 0xFFFFFFFF; + public const uint GL_PROGRAM_SEPARABLE = 0x8258; + public const uint GL_ACTIVE_PROGRAM = 0x8259; + public const uint GL_PROGRAM_PIPELINE_BINDING = 0x825A; + public const uint GL_MAX_VIEWPORTS = 0x825B; + public const uint GL_VIEWPORT_SUBPIXEL_BITS = 0x825C; + public const uint GL_VIEWPORT_BOUNDS_RANGE = 0x825D; + public const uint GL_LAYER_PROVOKING_VERTEX = 0x825E; + public const uint GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; + public const uint GL_UNDEFINED_VERTEX = 0x8260; + public const uint GL_COPY_READ_BUFFER_BINDING = 0x8F36; + public const uint GL_COPY_WRITE_BUFFER_BINDING = 0x8F37; + public const uint GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24; + public const uint GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23; + public const uint GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127; + public const uint GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128; + public const uint GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129; + public const uint GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A; + public const uint GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B; + public const uint GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C; + public const uint GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D; + public const uint GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; + public const uint GL_NUM_SAMPLE_COUNTS = 0x9380; + public const uint GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; + public const uint GL_ATOMIC_COUNTER_BUFFER = 0x92C0; + public const uint GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; + public const uint GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2; + public const uint GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; + public const uint GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4; + public const uint GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5; + public const uint GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6; + public const uint GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7; + public const uint GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8; + public const uint GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9; + public const uint GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA; + public const uint GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; + public const uint GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC; + public const uint GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD; + public const uint GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE; + public const uint GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF; + public const uint GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0; + public const uint GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1; + public const uint GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2; + public const uint GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3; + public const uint GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4; + public const uint GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5; + public const uint GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6; + public const uint GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7; + public const uint GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8; + public const uint GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; + public const uint GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; + public const uint GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; + public const uint GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; + public const uint GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001; + public const uint GL_ELEMENT_ARRAY_BARRIER_BIT = 0x00000002; + public const uint GL_UNIFORM_BARRIER_BIT = 0x00000004; + public const uint GL_TEXTURE_FETCH_BARRIER_BIT = 0x00000008; + public const uint GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020; + public const uint GL_COMMAND_BARRIER_BIT = 0x00000040; + public const uint GL_PIXEL_BUFFER_BARRIER_BIT = 0x00000080; + public const uint GL_TEXTURE_UPDATE_BARRIER_BIT = 0x00000100; + public const uint GL_BUFFER_UPDATE_BARRIER_BIT = 0x00000200; + public const uint GL_FRAMEBUFFER_BARRIER_BIT = 0x00000400; + public const uint GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800; + public const uint GL_ATOMIC_COUNTER_BARRIER_BIT = 0x00001000; + public const uint GL_ALL_BARRIER_BITS = 0xFFFFFFFF; + public const uint GL_MAX_IMAGE_UNITS = 0x8F38; + public const uint GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39; + public const uint GL_IMAGE_BINDING_NAME = 0x8F3A; + public const uint GL_IMAGE_BINDING_LEVEL = 0x8F3B; + public const uint GL_IMAGE_BINDING_LAYERED = 0x8F3C; + public const uint GL_IMAGE_BINDING_LAYER = 0x8F3D; + public const uint GL_IMAGE_BINDING_ACCESS = 0x8F3E; + public const uint GL_IMAGE_1D = 0x904C; + public const uint GL_IMAGE_2D = 0x904D; + public const uint GL_IMAGE_3D = 0x904E; + public const uint GL_IMAGE_2D_RECT = 0x904F; + public const uint GL_IMAGE_CUBE = 0x9050; + public const uint GL_IMAGE_BUFFER = 0x9051; + public const uint GL_IMAGE_1D_ARRAY = 0x9052; + public const uint GL_IMAGE_2D_ARRAY = 0x9053; + public const uint GL_IMAGE_CUBE_MAP_ARRAY = 0x9054; + public const uint GL_IMAGE_2D_MULTISAMPLE = 0x9055; + public const uint GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056; + public const uint GL_INT_IMAGE_1D = 0x9057; + public const uint GL_INT_IMAGE_2D = 0x9058; + public const uint GL_INT_IMAGE_3D = 0x9059; + public const uint GL_INT_IMAGE_2D_RECT = 0x905A; + public const uint GL_INT_IMAGE_CUBE = 0x905B; + public const uint GL_INT_IMAGE_BUFFER = 0x905C; + public const uint GL_INT_IMAGE_1D_ARRAY = 0x905D; + public const uint GL_INT_IMAGE_2D_ARRAY = 0x905E; + public const uint GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F; + public const uint GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060; + public const uint GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061; + public const uint GL_UNSIGNED_INT_IMAGE_1D = 0x9062; + public const uint GL_UNSIGNED_INT_IMAGE_2D = 0x9063; + public const uint GL_UNSIGNED_INT_IMAGE_3D = 0x9064; + public const uint GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065; + public const uint GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066; + public const uint GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067; + public const uint GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068; + public const uint GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069; + public const uint GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A; + public const uint GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B; + public const uint GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; + public const uint GL_MAX_IMAGE_SAMPLES = 0x906D; + public const uint GL_IMAGE_BINDING_FORMAT = 0x906E; + public const uint GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; + public const uint GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8; + public const uint GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; + public const uint GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA; + public const uint GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB; + public const uint GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC; + public const uint GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD; + public const uint GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE; + public const uint GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; + public const uint GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C; + public const uint GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D; + public const uint GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E; + public const uint GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F; + public const uint GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + public const uint GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9; + public const uint GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E; + public const uint GL_COMPRESSED_RGB8_ETC2 = 0x9274; + public const uint GL_COMPRESSED_SRGB8_ETC2 = 0x9275; + public const uint GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276; + public const uint GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277; + public const uint GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278; + public const uint GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279; + public const uint GL_COMPRESSED_R11_EAC = 0x9270; + public const uint GL_COMPRESSED_SIGNED_R11_EAC = 0x9271; + public const uint GL_COMPRESSED_RG11_EAC = 0x9272; + public const uint GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + public const uint GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + public const uint GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + public const uint GL_MAX_ELEMENT_INDEX = 0x8D6B; + public const uint GL_COMPUTE_SHADER = 0x91B9; + public const uint GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB; + public const uint GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC; + public const uint GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD; + public const uint GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262; + public const uint GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263; + public const uint GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264; + public const uint GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265; + public const uint GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266; + public const uint GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; + public const uint GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE; + public const uint GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; + public const uint GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; + public const uint GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; + public const uint GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; + public const uint GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; + public const uint GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; + public const uint GL_COMPUTE_SHADER_BIT = 0x00000020; + public const uint GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + public const uint GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243; + public const uint GL_DEBUG_CALLBACK_FUNCTION = 0x8244; + public const uint GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + public const uint GL_DEBUG_SOURCE_API = 0x8246; + public const uint GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247; + public const uint GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248; + public const uint GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249; + public const uint GL_DEBUG_SOURCE_APPLICATION = 0x824A; + public const uint GL_DEBUG_SOURCE_OTHER = 0x824B; + public const uint GL_DEBUG_TYPE_ERROR = 0x824C; + public const uint GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D; + public const uint GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E; + public const uint GL_DEBUG_TYPE_PORTABILITY = 0x824F; + public const uint GL_DEBUG_TYPE_PERFORMANCE = 0x8250; + public const uint GL_DEBUG_TYPE_OTHER = 0x8251; + public const uint GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143; + public const uint GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144; + public const uint GL_DEBUG_LOGGED_MESSAGES = 0x9145; + public const uint GL_DEBUG_SEVERITY_HIGH = 0x9146; + public const uint GL_DEBUG_SEVERITY_MEDIUM = 0x9147; + public const uint GL_DEBUG_SEVERITY_LOW = 0x9148; + public const uint GL_DEBUG_TYPE_MARKER = 0x8268; + public const uint GL_DEBUG_TYPE_PUSH_GROUP = 0x8269; + public const uint GL_DEBUG_TYPE_POP_GROUP = 0x826A; + public const uint GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + public const uint GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C; + public const uint GL_DEBUG_GROUP_STACK_DEPTH = 0x826D; + public const uint GL_BUFFER = 0x82E0; + public const uint GL_SHADER = 0x82E1; + public const uint GL_PROGRAM = 0x82E2; + public const uint GL_VERTEX_ARRAY = 0x8074; + public const uint GL_QUERY = 0x82E3; + public const uint GL_PROGRAM_PIPELINE = 0x82E4; + public const uint GL_SAMPLER = 0x82E6; + public const uint GL_MAX_LABEL_LENGTH = 0x82E8; + public const uint GL_DEBUG_OUTPUT = 0x92E0; + public const uint GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002; + public const uint GL_MAX_UNIFORM_LOCATIONS = 0x826E; + public const uint GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310; + public const uint GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311; + public const uint GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312; + public const uint GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313; + public const uint GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; + public const uint GL_MAX_FRAMEBUFFER_WIDTH = 0x9315; + public const uint GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316; + public const uint GL_MAX_FRAMEBUFFER_LAYERS = 0x9317; + public const uint GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; + public const uint GL_INTERNALFORMAT_SUPPORTED = 0x826F; + public const uint GL_INTERNALFORMAT_PREFERRED = 0x8270; + public const uint GL_INTERNALFORMAT_RED_SIZE = 0x8271; + public const uint GL_INTERNALFORMAT_GREEN_SIZE = 0x8272; + public const uint GL_INTERNALFORMAT_BLUE_SIZE = 0x8273; + public const uint GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274; + public const uint GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275; + public const uint GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276; + public const uint GL_INTERNALFORMAT_SHARED_SIZE = 0x8277; + public const uint GL_INTERNALFORMAT_RED_TYPE = 0x8278; + public const uint GL_INTERNALFORMAT_GREEN_TYPE = 0x8279; + public const uint GL_INTERNALFORMAT_BLUE_TYPE = 0x827A; + public const uint GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B; + public const uint GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C; + public const uint GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D; + public const uint GL_MAX_WIDTH = 0x827E; + public const uint GL_MAX_HEIGHT = 0x827F; + public const uint GL_MAX_DEPTH = 0x8280; + public const uint GL_MAX_LAYERS = 0x8281; + public const uint GL_MAX_COMBINED_DIMENSIONS = 0x8282; + public const uint GL_COLOR_COMPONENTS = 0x8283; + public const uint GL_DEPTH_COMPONENTS = 0x8284; + public const uint GL_STENCIL_COMPONENTS = 0x8285; + public const uint GL_COLOR_RENDERABLE = 0x8286; + public const uint GL_DEPTH_RENDERABLE = 0x8287; + public const uint GL_STENCIL_RENDERABLE = 0x8288; + public const uint GL_FRAMEBUFFER_RENDERABLE = 0x8289; + public const uint GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A; + public const uint GL_FRAMEBUFFER_BLEND = 0x828B; + public const uint GL_READ_PIXELS = 0x828C; + public const uint GL_READ_PIXELS_FORMAT = 0x828D; + public const uint GL_READ_PIXELS_TYPE = 0x828E; + public const uint GL_TEXTURE_IMAGE_FORMAT = 0x828F; + public const uint GL_TEXTURE_IMAGE_TYPE = 0x8290; + public const uint GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291; + public const uint GL_GET_TEXTURE_IMAGE_TYPE = 0x8292; + public const uint GL_MIPMAP = 0x8293; + public const uint GL_MANUAL_GENERATE_MIPMAP = 0x8294; + public const uint GL_AUTO_GENERATE_MIPMAP = 0x8295; + public const uint GL_COLOR_ENCODING = 0x8296; + public const uint GL_SRGB_READ = 0x8297; + public const uint GL_SRGB_WRITE = 0x8298; + public const uint GL_FILTER = 0x829A; + public const uint GL_VERTEX_TEXTURE = 0x829B; + public const uint GL_TESS_CONTROL_TEXTURE = 0x829C; + public const uint GL_TESS_EVALUATION_TEXTURE = 0x829D; + public const uint GL_GEOMETRY_TEXTURE = 0x829E; + public const uint GL_FRAGMENT_TEXTURE = 0x829F; + public const uint GL_COMPUTE_TEXTURE = 0x82A0; + public const uint GL_TEXTURE_SHADOW = 0x82A1; + public const uint GL_TEXTURE_GATHER = 0x82A2; + public const uint GL_TEXTURE_GATHER_SHADOW = 0x82A3; + public const uint GL_SHADER_IMAGE_LOAD = 0x82A4; + public const uint GL_SHADER_IMAGE_STORE = 0x82A5; + public const uint GL_SHADER_IMAGE_ATOMIC = 0x82A6; + public const uint GL_IMAGE_TEXEL_SIZE = 0x82A7; + public const uint GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8; + public const uint GL_IMAGE_PIXEL_FORMAT = 0x82A9; + public const uint GL_IMAGE_PIXEL_TYPE = 0x82AA; + public const uint GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC; + public const uint GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD; + public const uint GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE; + public const uint GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF; + public const uint GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1; + public const uint GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2; + public const uint GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3; + public const uint GL_CLEAR_BUFFER = 0x82B4; + public const uint GL_TEXTURE_VIEW = 0x82B5; + public const uint GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; + public const uint GL_FULL_SUPPORT = 0x82B7; + public const uint GL_CAVEAT_SUPPORT = 0x82B8; + public const uint GL_IMAGE_CLASS_4_X_32 = 0x82B9; + public const uint GL_IMAGE_CLASS_2_X_32 = 0x82BA; + public const uint GL_IMAGE_CLASS_1_X_32 = 0x82BB; + public const uint GL_IMAGE_CLASS_4_X_16 = 0x82BC; + public const uint GL_IMAGE_CLASS_2_X_16 = 0x82BD; + public const uint GL_IMAGE_CLASS_1_X_16 = 0x82BE; + public const uint GL_IMAGE_CLASS_4_X_8 = 0x82BF; + public const uint GL_IMAGE_CLASS_2_X_8 = 0x82C0; + public const uint GL_IMAGE_CLASS_1_X_8 = 0x82C1; + public const uint GL_IMAGE_CLASS_11_11_10 = 0x82C2; + public const uint GL_IMAGE_CLASS_10_10_10_2 = 0x82C3; + public const uint GL_VIEW_CLASS_128_BITS = 0x82C4; + public const uint GL_VIEW_CLASS_96_BITS = 0x82C5; + public const uint GL_VIEW_CLASS_64_BITS = 0x82C6; + public const uint GL_VIEW_CLASS_48_BITS = 0x82C7; + public const uint GL_VIEW_CLASS_32_BITS = 0x82C8; + public const uint GL_VIEW_CLASS_24_BITS = 0x82C9; + public const uint GL_VIEW_CLASS_16_BITS = 0x82CA; + public const uint GL_VIEW_CLASS_8_BITS = 0x82CB; + public const uint GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC; + public const uint GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD; + public const uint GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE; + public const uint GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF; + public const uint GL_VIEW_CLASS_RGTC1_RED = 0x82D0; + public const uint GL_VIEW_CLASS_RGTC2_RG = 0x82D1; + public const uint GL_VIEW_CLASS_BPTC_UNORM = 0x82D2; + public const uint GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; + public const uint GL_UNIFORM = 0x92E1; + public const uint GL_UNIFORM_BLOCK = 0x92E2; + public const uint GL_PROGRAM_INPUT = 0x92E3; + public const uint GL_PROGRAM_OUTPUT = 0x92E4; + public const uint GL_BUFFER_VARIABLE = 0x92E5; + public const uint GL_SHADER_STORAGE_BLOCK = 0x92E6; + public const uint GL_VERTEX_SUBROUTINE = 0x92E8; + public const uint GL_TESS_CONTROL_SUBROUTINE = 0x92E9; + public const uint GL_TESS_EVALUATION_SUBROUTINE = 0x92EA; + public const uint GL_GEOMETRY_SUBROUTINE = 0x92EB; + public const uint GL_FRAGMENT_SUBROUTINE = 0x92EC; + public const uint GL_COMPUTE_SUBROUTINE = 0x92ED; + public const uint GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE; + public const uint GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF; + public const uint GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0; + public const uint GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1; + public const uint GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2; + public const uint GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3; + public const uint GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; + public const uint GL_ACTIVE_RESOURCES = 0x92F5; + public const uint GL_MAX_NAME_LENGTH = 0x92F6; + public const uint GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7; + public const uint GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; + public const uint GL_NAME_LENGTH = 0x92F9; + public const uint GL_TYPE = 0x92FA; + public const uint GL_ARRAY_SIZE = 0x92FB; + public const uint GL_OFFSET = 0x92FC; + public const uint GL_BLOCK_INDEX = 0x92FD; + public const uint GL_ARRAY_STRIDE = 0x92FE; + public const uint GL_MATRIX_STRIDE = 0x92FF; + public const uint GL_IS_ROW_MAJOR = 0x9300; + public const uint GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301; + public const uint GL_BUFFER_BINDING = 0x9302; + public const uint GL_BUFFER_DATA_SIZE = 0x9303; + public const uint GL_NUM_ACTIVE_VARIABLES = 0x9304; + public const uint GL_ACTIVE_VARIABLES = 0x9305; + public const uint GL_REFERENCED_BY_VERTEX_SHADER = 0x9306; + public const uint GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307; + public const uint GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308; + public const uint GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309; + public const uint GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A; + public const uint GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B; + public const uint GL_TOP_LEVEL_ARRAY_SIZE = 0x930C; + public const uint GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D; + public const uint GL_LOCATION = 0x930E; + public const uint GL_LOCATION_INDEX = 0x930F; + public const uint GL_IS_PER_PATCH = 0x92E7; + public const uint GL_SHADER_STORAGE_BUFFER = 0x90D2; + public const uint GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; + public const uint GL_SHADER_STORAGE_BUFFER_START = 0x90D4; + public const uint GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; + public const uint GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6; + public const uint GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7; + public const uint GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8; + public const uint GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9; + public const uint GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA; + public const uint GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB; + public const uint GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC; + public const uint GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD; + public const uint GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE; + public const uint GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; + public const uint GL_SHADER_STORAGE_BARRIER_BIT = 0x00002000; + public const uint GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; + public const uint GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; + public const uint GL_TEXTURE_BUFFER_OFFSET = 0x919D; + public const uint GL_TEXTURE_BUFFER_SIZE = 0x919E; + public const uint GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; + public const uint GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB; + public const uint GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC; + public const uint GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD; + public const uint GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE; + public const uint GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; + public const uint GL_VERTEX_ATTRIB_BINDING = 0x82D4; + public const uint GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; + public const uint GL_VERTEX_BINDING_DIVISOR = 0x82D6; + public const uint GL_VERTEX_BINDING_OFFSET = 0x82D7; + public const uint GL_VERTEX_BINDING_STRIDE = 0x82D8; + public const uint GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9; + public const uint GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; + public const uint GL_VERTEX_BINDING_BUFFER = 0x8F4F; + public const uint GL_DISPLAY_LIST = 0x82E7; + public const uint GL_STACK_UNDERFLOW = 0x0504; + public const uint GL_STACK_OVERFLOW = 0x0503; + public const uint GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5; + public const uint GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221; + public const uint GL_TEXTURE_BUFFER_BINDING = 0x8C2A; + public const uint GL_MAP_PERSISTENT_BIT = 0x0040; + public const uint GL_MAP_COHERENT_BIT = 0x0080; + public const uint GL_DYNAMIC_STORAGE_BIT = 0x0100; + public const uint GL_CLIENT_STORAGE_BIT = 0x0200; + public const uint GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000; + public const uint GL_BUFFER_IMMUTABLE_STORAGE = 0x821F; + public const uint GL_BUFFER_STORAGE_FLAGS = 0x8220; + public const uint GL_CLEAR_TEXTURE = 0x9365; + public const uint GL_LOCATION_COMPONENT = 0x934A; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B; + public const uint GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; + public const uint GL_QUERY_BUFFER = 0x9192; + public const uint GL_QUERY_BUFFER_BARRIER_BIT = 0x00008000; + public const uint GL_QUERY_BUFFER_BINDING = 0x9193; + public const uint GL_QUERY_RESULT_NO_WAIT = 0x9194; + public const uint GL_MIRROR_CLAMP_TO_EDGE = 0x8743; + public const uint GL_CONTEXT_LOST = 0x0507; + public const uint GL_NEGATIVE_ONE_TO_ONE = 0x935E; + public const uint GL_ZERO_TO_ONE = 0x935F; + public const uint GL_CLIP_ORIGIN = 0x935C; + public const uint GL_CLIP_DEPTH_MODE = 0x935D; + public const uint GL_QUERY_WAIT_INVERTED = 0x8E17; + public const uint GL_QUERY_NO_WAIT_INVERTED = 0x8E18; + public const uint GL_QUERY_BY_REGION_WAIT_INVERTED = 0x8E19; + public const uint GL_QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A; + public const uint GL_MAX_CULL_DISTANCES = 0x82F9; + public const uint GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA; + public const uint GL_TEXTURE_TARGET = 0x1006; + public const uint GL_QUERY_TARGET = 0x82EA; + public const uint GL_GUILTY_CONTEXT_RESET = 0x8253; + public const uint GL_INNOCENT_CONTEXT_RESET = 0x8254; + public const uint GL_UNKNOWN_CONTEXT_RESET = 0x8255; + public const uint GL_RESET_NOTIFICATION_STRATEGY = 0x8256; + public const uint GL_LOSE_CONTEXT_ON_RESET = 0x8252; + public const uint GL_NO_RESET_NOTIFICATION = 0x8261; + public const uint GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x00000004; + public const uint GL_COLOR_TABLE = 0x80D0; + public const uint GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1; + public const uint GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2; + public const uint GL_PROXY_COLOR_TABLE = 0x80D3; + public const uint GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4; + public const uint GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5; + public const uint GL_CONVOLUTION_1D = 0x8010; + public const uint GL_CONVOLUTION_2D = 0x8011; + public const uint GL_SEPARABLE_2D = 0x8012; + public const uint GL_HISTOGRAM = 0x8024; + public const uint GL_PROXY_HISTOGRAM = 0x8025; + public const uint GL_MINMAX = 0x802E; + public const uint GL_CONTEXT_RELEASE_BEHAVIOR = 0x82FB; + public const uint GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC; + public const uint GL_SHADER_BINARY_FORMAT_SPIR_V = 0x9551; + public const uint GL_SPIR_V_BINARY = 0x9552; + public const uint GL_PARAMETER_BUFFER = 0x80EE; + public const uint GL_PARAMETER_BUFFER_BINDING = 0x80EF; + public const uint GL_CONTEXT_FLAG_NO_ERROR_BIT = 0x00000008; + public const uint GL_VERTICES_SUBMITTED = 0x82EE; + public const uint GL_PRIMITIVES_SUBMITTED = 0x82EF; + public const uint GL_VERTEX_SHADER_INVOCATIONS = 0x82F0; + public const uint GL_TESS_CONTROL_SHADER_PATCHES = 0x82F1; + public const uint GL_TESS_EVALUATION_SHADER_INVOCATIONS = 0x82F2; + public const uint GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED = 0x82F3; + public const uint GL_FRAGMENT_SHADER_INVOCATIONS = 0x82F4; + public const uint GL_COMPUTE_SHADER_INVOCATIONS = 0x82F5; + public const uint GL_CLIPPING_INPUT_PRIMITIVES = 0x82F6; + public const uint GL_CLIPPING_OUTPUT_PRIMITIVES = 0x82F7; + public const uint GL_POLYGON_OFFSET_CLAMP = 0x8E1B; + public const uint GL_SPIR_V_EXTENSIONS = 0x9553; + public const uint GL_NUM_SPIR_V_EXTENSIONS = 0x9554; + public const uint GL_TEXTURE_MAX_ANISOTROPY = 0x84FE; + public const uint GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF; + public const uint GL_TRANSFORM_FEEDBACK_OVERFLOW = 0x82EC; + public const uint GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW = 0x82ED; + public const uint GL_VERSION_1_0 = 1; + public const uint GL_VERSION_1_1 = 1; + public const uint GL_VERSION_1_2 = 1; + public const uint GL_VERSION_1_3 = 1; + public const uint GL_VERSION_1_4 = 1; + public const uint GL_VERSION_1_5 = 1; + public const uint GL_VERSION_2_0 = 1; + public const uint GL_VERSION_2_1 = 1; + public const uint GL_VERSION_3_0 = 1; + public const uint GL_VERSION_3_1 = 1; + public const uint GL_VERSION_3_2 = 1; + public const uint GL_VERSION_3_3 = 1; + public const uint GL_VERSION_4_0 = 1; + public const uint GL_VERSION_4_1 = 1; + public const uint GL_VERSION_4_2 = 1; + public const uint GL_VERSION_4_3 = 1; + public const uint GL_VERSION_4_4 = 1; + public const uint GL_VERSION_4_5 = 1; + public const uint GL_VERSION_4_6 = 1; + } +} diff --git a/Brutal.OpenGl/Glad.cs b/Brutal.OpenGl/Glad.cs new file mode 100644 index 0000000..895b9fe --- /dev/null +++ b/Brutal.OpenGl/Glad.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Brutal.OpenGlApi; + +public static partial class Glad +{ + /// + /// Initializes OpenGL by loading the GLAD library and setting up the function pointers for use in C#. + /// + /// True if initialization was successful, otherwise false. + public static unsafe bool Initialize(GlGetProcAddressFunc loader) + { + var loaderPtr = Marshal.GetFunctionPointerForDelegate(loader); + if (LoadGlLoader((nint*)loaderPtr) == 0) + return false; + + OpenGl.LoadPointers(entrypointU8 => + { + fixed (byte* ptr = entrypointU8) + return loader(ptr); + }); + + return true; + } +} diff --git a/Brutal.OpenGl/Glad.gen.cs b/Brutal.OpenGl/Glad.gen.cs new file mode 100644 index 0000000..efdab15 --- /dev/null +++ b/Brutal.OpenGl/Glad.gen.cs @@ -0,0 +1,20 @@ +/* + * @brief Contains generated GLAD functions + * + * @warning This file is auto-generated by Brutal.OpenGl.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +using System.Runtime.InteropServices; + +namespace Brutal.OpenGlApi +{ + public static partial class Glad + { + [LibraryImport("glad", EntryPoint = "gladLoadGL")] + internal static unsafe partial int LoadGl(); + + [LibraryImport("glad", EntryPoint = "gladLoadGLLoader")] + internal static unsafe partial int LoadGlLoader(nint* value); + } +} diff --git a/Brutal.OpenGl/LICENSES/BRUTAL-OPENGL-THIRD-PARTY-NOTICES.txt b/Brutal.OpenGl/LICENSES/BRUTAL-OPENGL-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..3699980 --- /dev/null +++ b/Brutal.OpenGl/LICENSES/BRUTAL-OPENGL-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,338 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.OpenGl + +This package ships one third-party native library, glad, on win-x64, linux-x64 and +osx-arm64. It contains no OpenGL implementation - glad resolves OpenGL entry points at +run time from the driver already present on the user's system. + +The same Khronos-derived enumerants and entry-point declarations are compiled into the +managed assembly Brutal.OpenGl.dll as well: its bindings are generated from glad's +header rather than written by hand. + +Three sets of terms govern the code shipped here. All are reproduced in full below. + + +============================================================================== +glad +============================================================================== + + Name glad + Version 0.1.36 + Upstream https://github.com/Dav1dde/glad + SPDX MIT + + This package ships the loader glad generates, compiled to a shared library. It does + not ship the generator. glad's README at tag v0.1.36 carries a section headed "What's + the license of glad generated code?", quoted below in its entirety: + + [#101](https://github.com/Dav1dde/glad/issues/101) + [#253](https://github.com/Dav1dde/glad/issues/253) + + The glad generated code itself is any of Public Domain, WTFPL or CC0, + the source files for the generated code are under various licenses + from Khronos. + + * EGL: See [egl.xml](https://github.com/KhronosGroup/EGL-Registry/blob/main/api/egl.xml#L4) + * GL: Apache Version 2.0 + * GLX: Apache Version 2.0 + * WGL: Apache Version 2.0 + * Vulkan: Apache Version 2.0 [with exceptions for generated code](https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/vk.xml) + + Now the Apache License may apply to the generated code (not a lawyer), + but see [this clarifying comment](https://github.com/KhronosGroup/OpenGL-Registry/issues/376#issuecomment-596187053). + + Glad also adds header files form Khronos, + these have separated licenses in their header. + + glad's own license is reproduced here in full regardless of that answer. + + The MIT License (MIT) + + Copyright (c) 2013-2021 David Herberth + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +============================================================================== +Khronos OpenGL API Specification +============================================================================== + + Name Khronos OpenGL API specifications, as emitted by glad + Version OpenGL 4.6 core profile + Upstream https://github.com/KhronosGroup/OpenGL-Registry + SPDX Apache-2.0 + + The OpenGL enumerants, types and entry-point declarations in the shipped library are + generated from the Khronos API specifications. glad's license records these terms: + + Copyright (c) 2013-2020 The Khronos Group Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + That block refers the reader to the Apache License 2.0 rather than reproducing it. + The full text follows. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +============================================================================== +khrplatform.h +============================================================================== + + Name khrplatform.h, from the Khronos EGL Registry + Version Khronos commit 67a3e0864c2d75ea5287b9f3d2eb74a745936692 + Upstream https://github.com/KhronosGroup/EGL-Registry + SPDX MIT + + Compiled into the glad library shipped by this package, supplying the scalar and + pointer types the OpenGL entry points are declared with. + + glad's license carries a parallel block covering the EGL Registry headers, stating + copyright 2007-2016. The notice below is taken instead from the copy of khrplatform.h + this package was built from, which states 2008-2018. + + Copyright (c) 2008-2018 The Khronos Group Inc. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and/or associated documentation files (the + "Materials"), to deal in the Materials without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Materials, and to + permit persons to whom the Materials are furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Materials. + + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/Brutal.OpenGl/Loader.gen.cs b/Brutal.OpenGl/Loader.gen.cs new file mode 100644 index 0000000..3ff03d2 --- /dev/null +++ b/Brutal.OpenGl/Loader.gen.cs @@ -0,0 +1,5387 @@ +/* + * @brief Contains the loader for OpenGL that loads the OpenGL function pointers into C#. + * + * @warning This file is auto-generated by Brutal.OpenGl.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +global using unsafe glActiveShaderProgram = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlPipeline, + Brutal.OpenGlApi.GlProgram, + void>; +global using unsafe glActiveTexture = delegate* unmanaged[Cdecl]; +global using unsafe glAttachShader = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlShader, + void>; +global using unsafe glBeginConditionalRender = delegate* unmanaged[Cdecl]; +global using unsafe glBeginQuery = delegate* unmanaged[Cdecl]; +global using unsafe glBeginQueryIndexed = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlQuery, + void>; +global using unsafe glBeginTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glBindAttribLocation = delegate* unmanaged[Cdecl]; +global using unsafe glBindBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glBindBufferBase = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlBuffer, + void>; +global using unsafe glBindBufferRange = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void>; +global using unsafe glBindBuffersBase = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + int, + Brutal.OpenGlApi.GlBuffer*, + void>; +global using unsafe glBindBuffersRange = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + int, + Brutal.OpenGlApi.GlBuffer*, + nint*, + nint*, + void>; +global using unsafe glBindFragDataLocation = delegate* unmanaged[Cdecl]; +global using unsafe glBindFragDataLocationIndexed = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + uint, + byte*, + void>; +global using unsafe glBindFramebuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlFramebuffer, + void>; +global using unsafe glBindImageTexture = delegate* unmanaged[Cdecl]< + uint, + uint, + int, + Brutal.Bool8, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBindImageTextures = delegate* unmanaged[Cdecl]; +global using unsafe glBindProgramPipeline = delegate* unmanaged[Cdecl]; +global using unsafe glBindRenderbuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlRenderbuffer, + void>; +global using unsafe glBindSampler = delegate* unmanaged[Cdecl]; +global using unsafe glBindSamplers = delegate* unmanaged[Cdecl]; +global using unsafe glBindTexture = delegate* unmanaged[Cdecl]; +global using unsafe glBindTextures = delegate* unmanaged[Cdecl]; +global using unsafe glBindTextureUnit = delegate* unmanaged[Cdecl]; +global using unsafe glBindTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glBindVertexArray = delegate* unmanaged[Cdecl]; +global using unsafe glBindVertexBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glBindVertexBuffers = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlBuffer*, + nint*, + int*, + void>; +global using unsafe glBlendColor = delegate* unmanaged[Cdecl]; +global using unsafe glBlendEquation = delegate* unmanaged[Cdecl]; +global using unsafe glBlendEquationi = delegate* unmanaged[Cdecl]; +global using unsafe glBlendEquationSeparate = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBlendEquationSeparatei = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBlendFunc = delegate* unmanaged[Cdecl]; +global using unsafe glBlendFunci = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBlendFuncSeparate = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBlendFuncSeparatei = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBlitFramebuffer = delegate* unmanaged[Cdecl]< + int, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlBitfield, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBlitNamedFramebuffer = delegate* unmanaged[Cdecl]< + uint, + uint, + int, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlBitfield, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBufferData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + nint, + void*, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glBufferStorage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + nint, + void*, + Brutal.OpenGlApi.GlBitfield, + void>; +global using unsafe glBufferSubData = delegate* unmanaged[Cdecl]; +global using unsafe glCheckFramebufferStatus = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum>; +global using unsafe glCheckNamedFramebufferStatus = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum>; +global using unsafe glClampColor = delegate* unmanaged[Cdecl]; +global using unsafe glClear = delegate* unmanaged[Cdecl]; +global using unsafe glClearBufferData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glClearBufferfi = delegate* unmanaged[Cdecl]; +global using unsafe glClearBufferfv = delegate* unmanaged[Cdecl]; +global using unsafe glClearBufferiv = delegate* unmanaged[Cdecl]; +global using unsafe glClearBufferSubData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + nint, + nint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glClearBufferuiv = delegate* unmanaged[Cdecl]; +global using unsafe glClearColor = delegate* unmanaged[Cdecl]; +global using unsafe glClearDepth = delegate* unmanaged[Cdecl]; +global using unsafe glClearDepthf = delegate* unmanaged[Cdecl]; +global using unsafe glClearNamedBufferData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glClearNamedBufferSubData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + nint, + nint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glClearNamedFramebufferfi = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlBuffer, + int, + float, + int, + void>; +global using unsafe glClearNamedFramebufferfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlBuffer, + int, + float*, + void>; +global using unsafe glClearNamedFramebufferiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlBuffer, + int, + int*, + void>; +global using unsafe glClearNamedFramebufferuiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlBuffer, + int, + uint*, + void>; +global using unsafe glClearStencil = delegate* unmanaged[Cdecl]; +global using unsafe glClearTexImage = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glClearTexSubImage = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glClientWaitSync = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSync, + Brutal.OpenGlApi.GlBitfield, + ulong, + Brutal.OpenGlApi.GlEnum>; +global using unsafe glClipControl = delegate* unmanaged[Cdecl]; +global using unsafe glColorMask = delegate* unmanaged[Cdecl]< + Brutal.Bool8, + Brutal.Bool8, + Brutal.Bool8, + Brutal.Bool8, + void>; +global using unsafe glColorMaski = delegate* unmanaged[Cdecl]< + uint, + Brutal.Bool8, + Brutal.Bool8, + Brutal.Bool8, + Brutal.Bool8, + void>; +global using unsafe glColorP3ui = delegate* unmanaged[Cdecl]; +global using unsafe glColorP3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glColorP4ui = delegate* unmanaged[Cdecl]; +global using unsafe glColorP4uiv = delegate* unmanaged[Cdecl]; +global using unsafe glCompileShader = delegate* unmanaged[Cdecl]; +global using unsafe glCompressedTexImage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + void*, + void>; +global using unsafe glCompressedTexImage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + void*, + void>; +global using unsafe glCompressedTexImage3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + void*, + void>; +global using unsafe glCompressedTexSubImage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glCompressedTexSubImage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glCompressedTexSubImage3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glCompressedTextureSubImage1D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glCompressedTextureSubImage2D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glCompressedTextureSubImage3D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glCopyBufferSubData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + nint, + nint, + nint, + void>; +global using unsafe glCopyImageSubData = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + uint, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + int, + int, + void>; +global using unsafe glCopyNamedBufferSubData = delegate* unmanaged[Cdecl]; +global using unsafe glCopyTexImage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + void>; +global using unsafe glCopyTexImage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + void>; +global using unsafe glCopyTexSubImage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + void>; +global using unsafe glCopyTexSubImage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + int, + int, + void>; +global using unsafe glCopyTexSubImage3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + int, + int, + int, + void>; +global using unsafe glCopyTextureSubImage1D = delegate* unmanaged[Cdecl]; +global using unsafe glCopyTextureSubImage2D = delegate* unmanaged[Cdecl]; +global using unsafe glCopyTextureSubImage3D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + int, + int, + int, + void>; +global using unsafe glCreateBuffers = delegate* unmanaged[Cdecl]; +global using unsafe glCreateFramebuffers = delegate* unmanaged[Cdecl]; +global using unsafe glCreateProgram = delegate* unmanaged[Cdecl]; +global using unsafe glCreateProgramPipelines = delegate* unmanaged[Cdecl]; +global using unsafe glCreateQueries = delegate* unmanaged[Cdecl]; +global using unsafe glCreateRenderbuffers = delegate* unmanaged[Cdecl]; +global using unsafe glCreateSamplers = delegate* unmanaged[Cdecl]; +global using unsafe glCreateShader = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlShaderType, + Brutal.OpenGlApi.GlShader>; +global using unsafe glCreateShaderProgramv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + byte**, + Brutal.OpenGlApi.GlProgram>; +global using unsafe glCreateTextures = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlTexture*, + void>; +global using unsafe glCreateTransformFeedbacks = delegate* unmanaged[Cdecl]; +global using unsafe glCreateVertexArrays = delegate* unmanaged[Cdecl]; +global using unsafe glCullFace = delegate* unmanaged[Cdecl]; +global using unsafe glDebugMessageCallback = delegate* unmanaged[Cdecl]; +global using unsafe glDebugMessageControl = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + uint*, + Brutal.Bool8, + void>; +global using unsafe glDebugMessageInsert = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlEnum, + int, + byte*, + void>; +global using unsafe glDeleteBuffers = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteFramebuffers = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteProgram = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteProgramPipelines = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteQueries = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteRenderbuffers = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteSamplers = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteShader = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteSync = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteTextures = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteTransformFeedbacks = delegate* unmanaged[Cdecl]; +global using unsafe glDeleteVertexArrays = delegate* unmanaged[Cdecl]; +global using unsafe glDepthFunc = delegate* unmanaged[Cdecl]; +global using unsafe glDepthMask = delegate* unmanaged[Cdecl]; +global using unsafe glDepthRange = delegate* unmanaged[Cdecl]; +global using unsafe glDepthRangeArrayv = delegate* unmanaged[Cdecl]; +global using unsafe glDepthRangef = delegate* unmanaged[Cdecl]; +global using unsafe glDepthRangeIndexed = delegate* unmanaged[Cdecl]; +global using unsafe glDetachShader = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlShader, + void>; +global using unsafe glDisable = delegate* unmanaged[Cdecl]; +global using unsafe glDisablei = delegate* unmanaged[Cdecl]; +global using unsafe glDisableVertexArrayAttrib = delegate* unmanaged[Cdecl]; +global using unsafe glDisableVertexAttribArray = delegate* unmanaged[Cdecl]; +global using unsafe glDispatchCompute = delegate* unmanaged[Cdecl]; +global using unsafe glDispatchComputeIndirect = delegate* unmanaged[Cdecl]; +global using unsafe glDrawArrays = delegate* unmanaged[Cdecl]; +global using unsafe glDrawArraysIndirect = delegate* unmanaged[Cdecl]; +global using unsafe glDrawArraysInstanced = delegate* unmanaged[Cdecl]; +global using unsafe glDrawArraysInstancedBaseInstance = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + uint, + void>; +global using unsafe glDrawBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glDrawBuffers = delegate* unmanaged[Cdecl]; +global using unsafe glDrawElements = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glDrawElementsBaseVertex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + void*, + int, + void>; +global using unsafe glDrawElementsIndirect = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glDrawElementsInstanced = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + void*, + int, + void>; +global using unsafe glDrawElementsInstancedBaseInstance = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + void*, + int, + uint, + void>; +global using unsafe glDrawElementsInstancedBaseVertex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + void*, + int, + int, + void>; +global using unsafe glDrawElementsInstancedBaseVertexBaseInstance = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + void*, + int, + int, + uint, + void>; +global using unsafe glDrawRangeElements = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + uint, + int, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glDrawRangeElementsBaseVertex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + uint, + int, + Brutal.OpenGlApi.GlEnum, + void*, + int, + void>; +global using unsafe glDrawTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glDrawTransformFeedbackInstanced = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + int, + void>; +global using unsafe glDrawTransformFeedbackStream = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + uint, + void>; +global using unsafe glDrawTransformFeedbackStreamInstanced = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + uint, + int, + void>; +global using unsafe glEnable = delegate* unmanaged[Cdecl]; +global using unsafe glEnablei = delegate* unmanaged[Cdecl]; +global using unsafe glEnableVertexArrayAttrib = delegate* unmanaged[Cdecl]; +global using unsafe glEnableVertexAttribArray = delegate* unmanaged[Cdecl]; +global using unsafe glEndConditionalRender = delegate* unmanaged[Cdecl]; +global using unsafe glEndQuery = delegate* unmanaged[Cdecl]; +global using unsafe glEndQueryIndexed = delegate* unmanaged[Cdecl]; +global using unsafe glEndTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glFenceSync = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlBitfield, + Brutal.OpenGlApi.GlSync>; +global using unsafe glFinish = delegate* unmanaged[Cdecl]; +global using unsafe glFlush = delegate* unmanaged[Cdecl]; +global using unsafe glFlushMappedBufferRange = delegate* unmanaged[Cdecl]; +global using unsafe glFlushMappedNamedBufferRange = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void>; +global using unsafe glFramebufferParameteri = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void>; +global using unsafe glFramebufferRenderbuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlRenderbuffer, + void>; +global using unsafe glFramebufferTexture = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + int, + void>; +global using unsafe glFramebufferTexture1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + int, + void>; +global using unsafe glFramebufferTexture2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + int, + void>; +global using unsafe glFramebufferTexture3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + int, + int, + void>; +global using unsafe glFramebufferTextureLayer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + int, + int, + void>; +global using unsafe glFrontFace = delegate* unmanaged[Cdecl]; +global using unsafe glGenBuffers = delegate* unmanaged[Cdecl]; +global using unsafe glGenerateMipmap = delegate* unmanaged[Cdecl]; +global using unsafe glGenerateTextureMipmap = delegate* unmanaged[Cdecl]; +global using unsafe glGenFramebuffers = delegate* unmanaged[Cdecl]; +global using unsafe glGenProgramPipelines = delegate* unmanaged[Cdecl]; +global using unsafe glGenQueries = delegate* unmanaged[Cdecl]; +global using unsafe glGenRenderbuffers = delegate* unmanaged[Cdecl]; +global using unsafe glGenSamplers = delegate* unmanaged[Cdecl]; +global using unsafe glGenTextures = delegate* unmanaged[Cdecl]; +global using unsafe glGenTransformFeedbacks = delegate* unmanaged[Cdecl]; +global using unsafe glGenVertexArrays = delegate* unmanaged[Cdecl]; +global using unsafe glGetActiveAtomicCounterBufferiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetActiveAttrib = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + int, + int*, + int*, + Brutal.OpenGlApi.GlEnum*, + byte*, + void>; +global using unsafe glGetActiveSubroutineName = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + uint, + int, + int*, + byte*, + void>; +global using unsafe glGetActiveSubroutineUniformiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetActiveSubroutineUniformName = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + uint, + int, + int*, + byte*, + void>; +global using unsafe glGetActiveUniform = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + int, + int*, + int*, + Brutal.OpenGlApi.GlEnum*, + byte*, + void>; +global using unsafe glGetActiveUniformBlockiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetActiveUniformBlockName = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + int, + int*, + byte*, + void>; +global using unsafe glGetActiveUniformName = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + int, + int*, + byte*, + void>; +global using unsafe glGetActiveUniformsiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + uint*, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetAttachedShaders = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int*, + Brutal.OpenGlApi.GlShader*, + void>; +global using unsafe glGetAttribLocation = delegate* unmanaged[Cdecl]; +global using unsafe glGetBooleani_v = delegate* unmanaged[Cdecl]; +global using unsafe glGetBooleanv = delegate* unmanaged[Cdecl]; +global using unsafe glGetBufferParameteri64v = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + long*, + void>; +global using unsafe glGetBufferParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetBufferPointerv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void**, + void>; +global using unsafe glGetBufferSubData = delegate* unmanaged[Cdecl]; +global using unsafe glGetCompressedTexImage = delegate* unmanaged[Cdecl]; +global using unsafe glGetCompressedTextureImage = delegate* unmanaged[Cdecl]; +global using unsafe glGetCompressedTextureSubImage = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + int, + int, + int, + void*, + void>; +global using unsafe glGetDebugMessageLog = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum*, + Brutal.OpenGlApi.GlEnum*, + uint*, + Brutal.OpenGlApi.GlEnum*, + int*, + byte*, + uint>; +global using unsafe glGetDoublei_v = delegate* unmanaged[Cdecl]; +global using unsafe glGetDoublev = delegate* unmanaged[Cdecl]; +global using unsafe glGetError = delegate* unmanaged[Cdecl]; +global using unsafe glGetFloati_v = delegate* unmanaged[Cdecl]; +global using unsafe glGetFloatv = delegate* unmanaged[Cdecl]; +global using unsafe glGetFragDataIndex = delegate* unmanaged[Cdecl]; +global using unsafe glGetFragDataLocation = delegate* unmanaged[Cdecl]; +global using unsafe glGetFramebufferAttachmentParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetFramebufferParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetGraphicsResetStatus = delegate* unmanaged[Cdecl]; +global using unsafe glGetInteger64i_v = delegate* unmanaged[Cdecl]; +global using unsafe glGetInteger64v = delegate* unmanaged[Cdecl]; +global using unsafe glGetIntegeri_v = delegate* unmanaged[Cdecl]; +global using unsafe glGetIntegerv = delegate* unmanaged[Cdecl]; +global using unsafe glGetInternalformati64v = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + long*, + void>; +global using unsafe glGetInternalformativ = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + int*, + void>; +global using unsafe glGetMultisamplefv = delegate* unmanaged[Cdecl]; +global using unsafe glGetNamedBufferParameteri64v = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + long*, + void>; +global using unsafe glGetNamedBufferParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetNamedBufferPointerv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + void**, + void>; +global using unsafe glGetNamedBufferSubData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void*, + void>; +global using unsafe glGetNamedFramebufferAttachmentParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetNamedFramebufferParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetNamedRenderbufferParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlRenderbuffer, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetnColorTable = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetnCompressedTexImage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + void*, + void>; +global using unsafe glGetnConvolutionFilter = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetnHistogram = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetnMapdv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlQuery, + int, + double*, + void>; +global using unsafe glGetnMapfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlQuery, + int, + float*, + void>; +global using unsafe glGetnMapiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlQuery, + int, + int*, + void>; +global using unsafe glGetnMinmax = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetnPixelMapfv = delegate* unmanaged[Cdecl]; +global using unsafe glGetnPixelMapuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetnPixelMapusv = delegate* unmanaged[Cdecl]; +global using unsafe glGetnPolygonStipple = delegate* unmanaged[Cdecl]; +global using unsafe glGetnSeparableFilter = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + int, + void*, + void*, + void>; +global using unsafe glGetnTexImage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetnUniformdv = delegate* unmanaged[Cdecl]; +global using unsafe glGetnUniformfv = delegate* unmanaged[Cdecl]; +global using unsafe glGetnUniformiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetnUniformuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetObjectLabel = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + int, + int*, + byte*, + void>; +global using unsafe glGetObjectPtrLabel = delegate* unmanaged[Cdecl]; +global using unsafe glGetPointerv = delegate* unmanaged[Cdecl]; +global using unsafe glGetProgramBinary = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int*, + Brutal.OpenGlApi.GlEnum*, + void*, + void>; +global using unsafe glGetProgramInfoLog = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int*, + byte*, + void>; +global using unsafe glGetProgramInterfaceiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetProgramiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetProgramPipelineInfoLog = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlPipeline, + int, + int*, + byte*, + void>; +global using unsafe glGetProgramPipelineiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlPipeline, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetProgramResourceIndex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + byte*, + uint>; +global using unsafe glGetProgramResourceiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + uint, + int, + Brutal.OpenGlApi.GlEnum*, + int, + int*, + int*, + void>; +global using unsafe glGetProgramResourceLocation = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + byte*, + int>; +global using unsafe glGetProgramResourceLocationIndex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + byte*, + int>; +global using unsafe glGetProgramResourceName = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + uint, + int, + int*, + byte*, + void>; +global using unsafe glGetProgramStageiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetQueryBufferObjecti64v = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + nint, + void>; +global using unsafe glGetQueryBufferObjectiv = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + nint, + void>; +global using unsafe glGetQueryBufferObjectui64v = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + nint, + void>; +global using unsafe glGetQueryBufferObjectuiv = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + nint, + void>; +global using unsafe glGetQueryIndexediv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetQueryiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetQueryObjecti64v = delegate* unmanaged[Cdecl]; +global using unsafe glGetQueryObjectiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetQueryObjectui64v = delegate* unmanaged[Cdecl]; +global using unsafe glGetQueryObjectuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetRenderbufferParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetSamplerParameterfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + float*, + void>; +global using unsafe glGetSamplerParameterIiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetSamplerParameterIuiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glGetSamplerParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetShaderInfoLog = delegate* unmanaged[Cdecl]; +global using unsafe glGetShaderiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlShader, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetShaderPrecisionFormat = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + int*, + void>; +global using unsafe glGetShaderSource = delegate* unmanaged[Cdecl]; +global using unsafe glGetString = delegate* unmanaged[Cdecl]; +global using unsafe glGetStringi = delegate* unmanaged[Cdecl]; +global using unsafe glGetSubroutineIndex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + byte*, + uint>; +global using unsafe glGetSubroutineUniformLocation = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + byte*, + int>; +global using unsafe glGetSynciv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSync, + Brutal.OpenGlApi.GlEnum, + int, + int*, + int*, + void>; +global using unsafe glGetTexImage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glGetTexLevelParameterfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + float*, + void>; +global using unsafe glGetTexLevelParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetTexParameterfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + float*, + void>; +global using unsafe glGetTexParameterIiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetTexParameterIuiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glGetTexParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetTextureImage = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetTextureLevelParameterfv = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + float*, + void>; +global using unsafe glGetTextureLevelParameteriv = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetTextureParameterfv = delegate* unmanaged[Cdecl]; +global using unsafe glGetTextureParameterIiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetTextureParameterIuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetTextureParameteriv = delegate* unmanaged[Cdecl]; +global using unsafe glGetTextureSubImage = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glGetTransformFeedbacki_v = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + uint, + int*, + void>; +global using unsafe glGetTransformFeedbacki64_v = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + uint, + long*, + void>; +global using unsafe glGetTransformFeedbackiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetTransformFeedbackVarying = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + int, + int*, + int*, + Brutal.OpenGlApi.GlEnum*, + byte*, + void>; +global using unsafe glGetUniformBlockIndex = delegate* unmanaged[Cdecl]; +global using unsafe glGetUniformdv = delegate* unmanaged[Cdecl]; +global using unsafe glGetUniformfv = delegate* unmanaged[Cdecl]; +global using unsafe glGetUniformIndices = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + byte**, + uint*, + void>; +global using unsafe glGetUniformiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetUniformLocation = delegate* unmanaged[Cdecl]; +global using unsafe glGetUniformSubroutineuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetUniformuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexArrayIndexed64iv = delegate* unmanaged[Cdecl]< + uint, + uint, + Brutal.OpenGlApi.GlEnum, + long*, + void>; +global using unsafe glGetVertexArrayIndexediv = delegate* unmanaged[Cdecl]< + uint, + uint, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glGetVertexArrayiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribdv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribfv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribIiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribIuiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribiv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribLdv = delegate* unmanaged[Cdecl]; +global using unsafe glGetVertexAttribPointerv = delegate* unmanaged[Cdecl]; +global using unsafe glHint = delegate* unmanaged[Cdecl]; +global using unsafe glInvalidateBufferData = delegate* unmanaged[Cdecl]; +global using unsafe glInvalidateBufferSubData = delegate* unmanaged[Cdecl]; +global using unsafe glInvalidateFramebuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum*, + void>; +global using unsafe glInvalidateNamedFramebufferData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + int, + Brutal.OpenGlApi.GlEnum*, + void>; +global using unsafe glInvalidateNamedFramebufferSubData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + int, + Brutal.OpenGlApi.GlEnum*, + int, + int, + int, + int, + void>; +global using unsafe glInvalidateSubFramebuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum*, + int, + int, + int, + int, + void>; +global using unsafe glInvalidateTexImage = delegate* unmanaged[Cdecl]; +global using unsafe glInvalidateTexSubImage = delegate* unmanaged[Cdecl]; +global using unsafe glIsBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glIsEnabled = delegate* unmanaged[Cdecl]; +global using unsafe glIsEnabledi = delegate* unmanaged[Cdecl]; +global using unsafe glIsFramebuffer = delegate* unmanaged[Cdecl]; +global using unsafe glIsProgram = delegate* unmanaged[Cdecl]; +global using unsafe glIsProgramPipeline = delegate* unmanaged[Cdecl]; +global using unsafe glIsQuery = delegate* unmanaged[Cdecl]; +global using unsafe glIsRenderbuffer = delegate* unmanaged[Cdecl]; +global using unsafe glIsSampler = delegate* unmanaged[Cdecl]; +global using unsafe glIsShader = delegate* unmanaged[Cdecl]; +global using unsafe glIsSync = delegate* unmanaged[Cdecl]; +global using unsafe glIsTexture = delegate* unmanaged[Cdecl]; +global using unsafe glIsTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glIsVertexArray = delegate* unmanaged[Cdecl]; +global using unsafe glLineWidth = delegate* unmanaged[Cdecl]; +global using unsafe glLinkProgram = delegate* unmanaged[Cdecl]; +global using unsafe glLogicOp = delegate* unmanaged[Cdecl]; +global using unsafe glMapBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glMapBufferRange = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + nint, + nint, + Brutal.OpenGlApi.GlBitfield, + void*>; +global using unsafe glMapNamedBuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + Brutal.OpenGlApi.GlEnum, + void*>; +global using unsafe glMapNamedBufferRange = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + Brutal.OpenGlApi.GlBitfield, + void*>; +global using unsafe glMemoryBarrier = delegate* unmanaged[Cdecl]; +global using unsafe glMemoryBarrierByRegion = delegate* unmanaged[Cdecl]; +global using unsafe glMinSampleShading = delegate* unmanaged[Cdecl]; +global using unsafe glMultiDrawArrays = delegate* unmanaged[Cdecl]; +global using unsafe glMultiDrawArraysIndirect = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + void*, + int, + int, + void>; +global using unsafe glMultiDrawArraysIndirectCount = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + void*, + nint, + int, + int, + void>; +global using unsafe glMultiDrawElements = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int*, + Brutal.OpenGlApi.GlEnum, + void**, + int, + void>; +global using unsafe glMultiDrawElementsBaseVertex = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int*, + Brutal.OpenGlApi.GlEnum, + void**, + int, + int*, + void>; +global using unsafe glMultiDrawElementsIndirect = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + int, + int, + void>; +global using unsafe glMultiDrawElementsIndirectCount = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + nint, + int, + int, + void>; +global using unsafe glMultiTexCoordP1ui = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + void>; +global using unsafe glMultiTexCoordP1uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glMultiTexCoordP2ui = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + void>; +global using unsafe glMultiTexCoordP2uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glMultiTexCoordP3ui = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + void>; +global using unsafe glMultiTexCoordP3uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glMultiTexCoordP4ui = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint, + void>; +global using unsafe glMultiTexCoordP4uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glNamedBufferData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + nint, + void*, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glNamedBufferStorage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + nint, + void*, + Brutal.OpenGlApi.GlBitfield, + void>; +global using unsafe glNamedBufferSubData = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void*, + void>; +global using unsafe glNamedFramebufferDrawBuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glNamedFramebufferDrawBuffers = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + int, + Brutal.OpenGlApi.GlEnum*, + void>; +global using unsafe glNamedFramebufferParameteri = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + int, + void>; +global using unsafe glNamedFramebufferReadBuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glNamedFramebufferRenderbuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlRenderbuffer, + void>; +global using unsafe glNamedFramebufferTexture = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + uint, + int, + void>; +global using unsafe glNamedFramebufferTextureLayer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFramebuffer, + Brutal.OpenGlApi.GlEnum, + uint, + int, + int, + void>; +global using unsafe glNamedRenderbufferStorage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlRenderbuffer, + Brutal.OpenGlApi.GlEnum, + int, + int, + void>; +global using unsafe glNamedRenderbufferStorageMultisample = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlRenderbuffer, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + void>; +global using unsafe glNormalP3ui = delegate* unmanaged[Cdecl]; +global using unsafe glNormalP3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glObjectLabel = delegate* unmanaged[Cdecl]; +global using unsafe glObjectPtrLabel = delegate* unmanaged[Cdecl]; +global using unsafe glPatchParameterfv = delegate* unmanaged[Cdecl]; +global using unsafe glPatchParameteri = delegate* unmanaged[Cdecl]; +global using unsafe glPauseTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glPixelStoref = delegate* unmanaged[Cdecl]; +global using unsafe glPixelStorei = delegate* unmanaged[Cdecl]; +global using unsafe glPointParameterf = delegate* unmanaged[Cdecl]; +global using unsafe glPointParameterfv = delegate* unmanaged[Cdecl]; +global using unsafe glPointParameteri = delegate* unmanaged[Cdecl]; +global using unsafe glPointParameteriv = delegate* unmanaged[Cdecl]; +global using unsafe glPointSize = delegate* unmanaged[Cdecl]; +global using unsafe glPolygonMode = delegate* unmanaged[Cdecl]; +global using unsafe glPolygonOffset = delegate* unmanaged[Cdecl]; +global using unsafe glPolygonOffsetClamp = delegate* unmanaged[Cdecl]; +global using unsafe glPopDebugGroup = delegate* unmanaged[Cdecl]; +global using unsafe glPrimitiveRestartIndex = delegate* unmanaged[Cdecl]; +global using unsafe glProgramBinary = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + void*, + int, + void>; +global using unsafe glProgramParameteri = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + Brutal.OpenGlApi.GlEnum, + int, + void>; +global using unsafe glProgramUniform1d = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform1dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + double*, + void>; +global using unsafe glProgramUniform1f = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform1fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + float*, + void>; +global using unsafe glProgramUniform1i = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform1iv = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform1ui = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform1uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + uint*, + void>; +global using unsafe glProgramUniform2d = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + double, + double, + void>; +global using unsafe glProgramUniform2dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + double*, + void>; +global using unsafe glProgramUniform2f = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + float, + float, + void>; +global using unsafe glProgramUniform2fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + float*, + void>; +global using unsafe glProgramUniform2i = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform2iv = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform2ui = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform2uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + uint*, + void>; +global using unsafe glProgramUniform3d = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + double, + double, + double, + void>; +global using unsafe glProgramUniform3dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + double*, + void>; +global using unsafe glProgramUniform3f = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + float, + float, + float, + void>; +global using unsafe glProgramUniform3fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + float*, + void>; +global using unsafe glProgramUniform3i = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + int, + int, + void>; +global using unsafe glProgramUniform3iv = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform3ui = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + uint, + uint, + uint, + void>; +global using unsafe glProgramUniform3uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + uint*, + void>; +global using unsafe glProgramUniform4d = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + double, + double, + double, + double, + void>; +global using unsafe glProgramUniform4dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + double*, + void>; +global using unsafe glProgramUniform4f = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + float, + float, + float, + float, + void>; +global using unsafe glProgramUniform4fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + float*, + void>; +global using unsafe glProgramUniform4i = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + int, + int, + int, + void>; +global using unsafe glProgramUniform4iv = delegate* unmanaged[Cdecl]; +global using unsafe glProgramUniform4ui = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + uint, + uint, + uint, + uint, + void>; +global using unsafe glProgramUniform4uiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + uint*, + void>; +global using unsafe glProgramUniformMatrix2dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix2fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix2x3dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix2x3fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix2x4dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix2x4fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix3dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix3fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix3x2dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix3x2fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix3x4dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix3x4fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix4dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix4fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix4x2dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix4x2fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProgramUniformMatrix4x3dv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + double*, + void>; +global using unsafe glProgramUniformMatrix4x3fv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + int, + Brutal.Bool8, + float*, + void>; +global using unsafe glProvokingVertex = delegate* unmanaged[Cdecl]; +global using unsafe glPushDebugGroup = delegate* unmanaged[Cdecl]; +global using unsafe glQueryCounter = delegate* unmanaged[Cdecl]; +global using unsafe glReadBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glReadnPixels = delegate* unmanaged[Cdecl]< + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glReadPixels = delegate* unmanaged[Cdecl]< + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glReleaseShaderCompiler = delegate* unmanaged[Cdecl]; +global using unsafe glRenderbufferStorage = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + int, + void>; +global using unsafe glRenderbufferStorageMultisample = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + void>; +global using unsafe glResumeTransformFeedback = delegate* unmanaged[Cdecl]; +global using unsafe glSampleCoverage = delegate* unmanaged[Cdecl]; +global using unsafe glSampleMaski = delegate* unmanaged[Cdecl]; +global using unsafe glSamplerParameterf = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + float, + void>; +global using unsafe glSamplerParameterfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + float*, + void>; +global using unsafe glSamplerParameteri = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + int, + void>; +global using unsafe glSamplerParameterIiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glSamplerParameterIuiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glSamplerParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSampler, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glScissor = delegate* unmanaged[Cdecl]; +global using unsafe glScissorArrayv = delegate* unmanaged[Cdecl]; +global using unsafe glScissorIndexed = delegate* unmanaged[Cdecl]; +global using unsafe glScissorIndexedv = delegate* unmanaged[Cdecl]; +global using unsafe glSecondaryColorP3ui = delegate* unmanaged[Cdecl]; +global using unsafe glSecondaryColorP3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glShaderBinary = delegate* unmanaged[Cdecl]< + int, + Brutal.OpenGlApi.GlShader*, + Brutal.OpenGlApi.GlEnum, + void*, + int, + void>; +global using unsafe glShaderSource = delegate* unmanaged[Cdecl]; +global using unsafe glShaderStorageBlockBinding = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + uint, + uint, + void>; +global using unsafe glSpecializeShader = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlShader, + byte*, + uint, + uint*, + uint*, + void>; +global using unsafe glStencilFunc = delegate* unmanaged[Cdecl]; +global using unsafe glStencilFuncSeparate = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFace, + Brutal.OpenGlApi.GlFunc, + int, + uint, + void>; +global using unsafe glStencilMask = delegate* unmanaged[Cdecl]; +global using unsafe glStencilMaskSeparate = delegate* unmanaged[Cdecl]; +global using unsafe glStencilOp = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlStencilOp, + Brutal.OpenGlApi.GlStencilOp, + Brutal.OpenGlApi.GlStencilOp, + void>; +global using unsafe glStencilOpSeparate = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlFace, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glTexBuffer = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlBuffer, + void>; +global using unsafe glTexBufferRange = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void>; +global using unsafe glTexCoordP1ui = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP1uiv = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP2ui = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP2uiv = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP3ui = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP4ui = delegate* unmanaged[Cdecl]; +global using unsafe glTexCoordP4uiv = delegate* unmanaged[Cdecl]; +global using unsafe glTexImage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTexImage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTexImage2DMultisample = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + Brutal.Bool8, + void>; +global using unsafe glTexImage3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTexImage3DMultisample = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + Brutal.Bool8, + void>; +global using unsafe glTexParameterf = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + float, + void>; +global using unsafe glTexParameterfv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + float*, + void>; +global using unsafe glTexParameteri = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int, + void>; +global using unsafe glTexParameterIiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glTexParameterIuiv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + uint*, + void>; +global using unsafe glTexParameteriv = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + int*, + void>; +global using unsafe glTexStorage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + void>; +global using unsafe glTexStorage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + void>; +global using unsafe glTexStorage2DMultisample = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + Brutal.Bool8, + void>; +global using unsafe glTexStorage3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + void>; +global using unsafe glTexStorage3DMultisample = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + Brutal.Bool8, + void>; +global using unsafe glTexSubImage1D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTexSubImage2D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTexSubImage3D = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTextureBarrier = delegate* unmanaged[Cdecl]; +global using unsafe glTextureBuffer = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlBuffer, + void>; +global using unsafe glTextureBufferRange = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void>; +global using unsafe glTextureParameterf = delegate* unmanaged[Cdecl]; +global using unsafe glTextureParameterfv = delegate* unmanaged[Cdecl]; +global using unsafe glTextureParameteri = delegate* unmanaged[Cdecl]; +global using unsafe glTextureParameterIiv = delegate* unmanaged[Cdecl]; +global using unsafe glTextureParameterIuiv = delegate* unmanaged[Cdecl]; +global using unsafe glTextureParameteriv = delegate* unmanaged[Cdecl]; +global using unsafe glTextureStorage1D = delegate* unmanaged[Cdecl]; +global using unsafe glTextureStorage2D = delegate* unmanaged[Cdecl]; +global using unsafe glTextureStorage2DMultisample = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + Brutal.Bool8, + void>; +global using unsafe glTextureStorage3D = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + void>; +global using unsafe glTextureStorage3DMultisample = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + int, + int, + int, + Brutal.Bool8, + void>; +global using unsafe glTextureSubImage1D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTextureSubImage2D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTextureSubImage3D = delegate* unmanaged[Cdecl]< + uint, + int, + int, + int, + int, + int, + int, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.OpenGlApi.GlEnum, + void*, + void>; +global using unsafe glTextureView = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + uint, + Brutal.OpenGlApi.GlEnum, + uint, + uint, + uint, + uint, + void>; +global using unsafe glTransformFeedbackBufferBase = delegate* unmanaged[Cdecl]< + uint, + uint, + Brutal.OpenGlApi.GlBuffer, + void>; +global using unsafe glTransformFeedbackBufferRange = delegate* unmanaged[Cdecl]< + uint, + uint, + Brutal.OpenGlApi.GlBuffer, + nint, + nint, + void>; +global using unsafe glTransformFeedbackVaryings = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlProgram, + int, + byte**, + Brutal.OpenGlApi.GlEnum, + void>; +global using unsafe glUniform1d = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1f = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1i = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1iv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1ui = delegate* unmanaged[Cdecl]; +global using unsafe glUniform1uiv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2d = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2f = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2i = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2iv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2ui = delegate* unmanaged[Cdecl]; +global using unsafe glUniform2uiv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3d = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3f = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3i = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3iv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3ui = delegate* unmanaged[Cdecl]; +global using unsafe glUniform3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4d = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4f = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4i = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4iv = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4ui = delegate* unmanaged[Cdecl]; +global using unsafe glUniform4uiv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformBlockBinding = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix2dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix2fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix2x3dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix2x3fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix2x4dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix2x4fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix3dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix3fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix3x2dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix3x2fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix3x4dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix3x4fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix4dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix4fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix4x2dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix4x2fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix4x3dv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformMatrix4x3fv = delegate* unmanaged[Cdecl]; +global using unsafe glUniformSubroutinesuiv = delegate* unmanaged[Cdecl]; +global using unsafe glUnmapBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glUnmapNamedBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glUseProgram = delegate* unmanaged[Cdecl]; +global using unsafe glUseProgramStages = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlPipeline, + Brutal.OpenGlApi.GlBitfield, + Brutal.OpenGlApi.GlProgram, + void>; +global using unsafe glValidateProgram = delegate* unmanaged[Cdecl]; +global using unsafe glValidateProgramPipeline = delegate* unmanaged[Cdecl]; +global using unsafe glVertexArrayAttribBinding = delegate* unmanaged[Cdecl]; +global using unsafe glVertexArrayAttribFormat = delegate* unmanaged[Cdecl]< + uint, + uint, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint, + void>; +global using unsafe glVertexArrayAttribIFormat = delegate* unmanaged[Cdecl]< + uint, + uint, + int, + Brutal.OpenGlApi.GlEnum, + uint, + void>; +global using unsafe glVertexArrayAttribLFormat = delegate* unmanaged[Cdecl]< + uint, + uint, + int, + Brutal.OpenGlApi.GlEnum, + uint, + void>; +global using unsafe glVertexArrayBindingDivisor = delegate* unmanaged[Cdecl]; +global using unsafe glVertexArrayElementBuffer = delegate* unmanaged[Cdecl]; +global using unsafe glVertexArrayVertexBuffer = delegate* unmanaged[Cdecl]< + uint, + uint, + Brutal.OpenGlApi.GlBuffer, + nint, + int, + void>; +global using unsafe glVertexArrayVertexBuffers = delegate* unmanaged[Cdecl]< + uint, + uint, + int, + Brutal.OpenGlApi.GlBuffer*, + nint*, + int*, + void>; +global using unsafe glVertexAttrib1d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib1dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib1f = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib1fv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib1s = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib1sv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib2d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib2dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib2f = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib2fv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib2s = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib2sv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib3d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib3dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib3f = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib3fv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib3s = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib3sv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4bv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4f = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4fv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4iv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Nbv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Niv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Nsv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Nub = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Nubv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Nuiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4Nusv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4s = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4sv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4ubv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttrib4usv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribBinding = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribDivisor = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribFormat = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint, + void>; +global using unsafe glVertexAttribI1i = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI1iv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI1ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI1uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI2i = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI2iv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI2ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI2uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI3i = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI3iv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI3ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4bv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4i = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4iv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4sv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4ubv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribI4usv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribIFormat = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribIPointer = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glVertexAttribL1d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL1dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL2d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL2dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL3d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL3dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL4d = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribL4dv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribLFormat = delegate* unmanaged[Cdecl]; +global using unsafe glVertexAttribLPointer = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + int, + void*, + void>; +global using unsafe glVertexAttribP1ui = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint, + void>; +global using unsafe glVertexAttribP1uiv = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint*, + void>; +global using unsafe glVertexAttribP2ui = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint, + void>; +global using unsafe glVertexAttribP2uiv = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint*, + void>; +global using unsafe glVertexAttribP3ui = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint, + void>; +global using unsafe glVertexAttribP3uiv = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint*, + void>; +global using unsafe glVertexAttribP4ui = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint, + void>; +global using unsafe glVertexAttribP4uiv = delegate* unmanaged[Cdecl]< + uint, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + uint*, + void>; +global using unsafe glVertexAttribPointer = delegate* unmanaged[Cdecl]< + uint, + int, + Brutal.OpenGlApi.GlEnum, + Brutal.Bool8, + int, + void*, + void>; +global using unsafe glVertexBindingDivisor = delegate* unmanaged[Cdecl]; +global using unsafe glVertexP2ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexP2uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexP3ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexP3uiv = delegate* unmanaged[Cdecl]; +global using unsafe glVertexP4ui = delegate* unmanaged[Cdecl]; +global using unsafe glVertexP4uiv = delegate* unmanaged[Cdecl]; +global using unsafe glViewport = delegate* unmanaged[Cdecl]; +global using unsafe glViewportArrayv = delegate* unmanaged[Cdecl]; +global using unsafe glViewportIndexedf = delegate* unmanaged[Cdecl]; +global using unsafe glViewportIndexedfv = delegate* unmanaged[Cdecl]; +global using unsafe glWaitSync = delegate* unmanaged[Cdecl]< + Brutal.OpenGlApi.GlSync, + Brutal.OpenGlApi.GlBitfield, + ulong, + void>; + +namespace Brutal.OpenGlApi +{ + public static partial class OpenGl + { + internal static unsafe void LoadPointers(Func, nint> loader) + { + Native.glCullFace = (glCullFace)loader("glCullFace"u8); + Native.glFrontFace = (glFrontFace)loader("glFrontFace"u8); + Native.glHint = (glHint)loader("glHint"u8); + Native.glLineWidth = (glLineWidth)loader("glLineWidth"u8); + Native.glPointSize = (glPointSize)loader("glPointSize"u8); + Native.glPolygonMode = (glPolygonMode)loader("glPolygonMode"u8); + Native.glScissor = (glScissor)loader("glScissor"u8); + Native.glTexParameterf = (glTexParameterf)loader("glTexParameterf"u8); + Native.glTexParameterfv = (glTexParameterfv)loader("glTexParameterfv"u8); + Native.glTexParameteri = (glTexParameteri)loader("glTexParameteri"u8); + Native.glTexParameteriv = (glTexParameteriv)loader("glTexParameteriv"u8); + Native.glTexImage1D = (glTexImage1D)loader("glTexImage1D"u8); + Native.glTexImage2D = (glTexImage2D)loader("glTexImage2D"u8); + Native.glDrawBuffer = (glDrawBuffer)loader("glDrawBuffer"u8); + Native.glClear = (glClear)loader("glClear"u8); + Native.glClearColor = (glClearColor)loader("glClearColor"u8); + Native.glClearStencil = (glClearStencil)loader("glClearStencil"u8); + Native.glClearDepth = (glClearDepth)loader("glClearDepth"u8); + Native.glStencilMask = (glStencilMask)loader("glStencilMask"u8); + Native.glColorMask = (glColorMask)loader("glColorMask"u8); + Native.glDepthMask = (glDepthMask)loader("glDepthMask"u8); + Native.glDisable = (glDisable)loader("glDisable"u8); + Native.glEnable = (glEnable)loader("glEnable"u8); + Native.glFinish = (glFinish)loader("glFinish"u8); + Native.glFlush = (glFlush)loader("glFlush"u8); + Native.glBlendFunc = (glBlendFunc)loader("glBlendFunc"u8); + Native.glLogicOp = (glLogicOp)loader("glLogicOp"u8); + Native.glStencilFunc = (glStencilFunc)loader("glStencilFunc"u8); + Native.glStencilOp = (glStencilOp)loader("glStencilOp"u8); + Native.glDepthFunc = (glDepthFunc)loader("glDepthFunc"u8); + Native.glPixelStoref = (glPixelStoref)loader("glPixelStoref"u8); + Native.glPixelStorei = (glPixelStorei)loader("glPixelStorei"u8); + Native.glReadBuffer = (glReadBuffer)loader("glReadBuffer"u8); + Native.glReadPixels = (glReadPixels)loader("glReadPixels"u8); + Native.glGetBooleanv = (glGetBooleanv)loader("glGetBooleanv"u8); + Native.glGetDoublev = (glGetDoublev)loader("glGetDoublev"u8); + Native.glGetError = (glGetError)loader("glGetError"u8); + Native.glGetFloatv = (glGetFloatv)loader("glGetFloatv"u8); + Native.glGetIntegerv = (glGetIntegerv)loader("glGetIntegerv"u8); + Native.glGetString = (glGetString)loader("glGetString"u8); + Native.glGetTexImage = (glGetTexImage)loader("glGetTexImage"u8); + Native.glGetTexParameterfv = (glGetTexParameterfv)loader("glGetTexParameterfv"u8); + Native.glGetTexParameteriv = (glGetTexParameteriv)loader("glGetTexParameteriv"u8); + Native.glGetTexLevelParameterfv = (glGetTexLevelParameterfv)loader("glGetTexLevelParameterfv"u8); + Native.glGetTexLevelParameteriv = (glGetTexLevelParameteriv)loader("glGetTexLevelParameteriv"u8); + Native.glIsEnabled = (glIsEnabled)loader("glIsEnabled"u8); + Native.glDepthRange = (glDepthRange)loader("glDepthRange"u8); + Native.glViewport = (glViewport)loader("glViewport"u8); + Native.glDrawArrays = (glDrawArrays)loader("glDrawArrays"u8); + Native.glDrawElements = (glDrawElements)loader("glDrawElements"u8); + Native.glPolygonOffset = (glPolygonOffset)loader("glPolygonOffset"u8); + Native.glCopyTexImage1D = (glCopyTexImage1D)loader("glCopyTexImage1D"u8); + Native.glCopyTexImage2D = (glCopyTexImage2D)loader("glCopyTexImage2D"u8); + Native.glCopyTexSubImage1D = (glCopyTexSubImage1D)loader("glCopyTexSubImage1D"u8); + Native.glCopyTexSubImage2D = (glCopyTexSubImage2D)loader("glCopyTexSubImage2D"u8); + Native.glTexSubImage1D = (glTexSubImage1D)loader("glTexSubImage1D"u8); + Native.glTexSubImage2D = (glTexSubImage2D)loader("glTexSubImage2D"u8); + Native.glBindTexture = (glBindTexture)loader("glBindTexture"u8); + Native.glDeleteTextures = (glDeleteTextures)loader("glDeleteTextures"u8); + Native.glGenTextures = (glGenTextures)loader("glGenTextures"u8); + Native.glIsTexture = (glIsTexture)loader("glIsTexture"u8); + Native.glDrawRangeElements = (glDrawRangeElements)loader("glDrawRangeElements"u8); + Native.glTexImage3D = (glTexImage3D)loader("glTexImage3D"u8); + Native.glTexSubImage3D = (glTexSubImage3D)loader("glTexSubImage3D"u8); + Native.glCopyTexSubImage3D = (glCopyTexSubImage3D)loader("glCopyTexSubImage3D"u8); + Native.glActiveTexture = (glActiveTexture)loader("glActiveTexture"u8); + Native.glSampleCoverage = (glSampleCoverage)loader("glSampleCoverage"u8); + Native.glCompressedTexImage3D = (glCompressedTexImage3D)loader("glCompressedTexImage3D"u8); + Native.glCompressedTexImage2D = (glCompressedTexImage2D)loader("glCompressedTexImage2D"u8); + Native.glCompressedTexImage1D = (glCompressedTexImage1D)loader("glCompressedTexImage1D"u8); + Native.glCompressedTexSubImage3D = (glCompressedTexSubImage3D)loader("glCompressedTexSubImage3D"u8); + Native.glCompressedTexSubImage2D = (glCompressedTexSubImage2D)loader("glCompressedTexSubImage2D"u8); + Native.glCompressedTexSubImage1D = (glCompressedTexSubImage1D)loader("glCompressedTexSubImage1D"u8); + Native.glGetCompressedTexImage = (glGetCompressedTexImage)loader("glGetCompressedTexImage"u8); + Native.glBlendFuncSeparate = (glBlendFuncSeparate)loader("glBlendFuncSeparate"u8); + Native.glMultiDrawArrays = (glMultiDrawArrays)loader("glMultiDrawArrays"u8); + Native.glMultiDrawElements = (glMultiDrawElements)loader("glMultiDrawElements"u8); + Native.glPointParameterf = (glPointParameterf)loader("glPointParameterf"u8); + Native.glPointParameterfv = (glPointParameterfv)loader("glPointParameterfv"u8); + Native.glPointParameteri = (glPointParameteri)loader("glPointParameteri"u8); + Native.glPointParameteriv = (glPointParameteriv)loader("glPointParameteriv"u8); + Native.glBlendColor = (glBlendColor)loader("glBlendColor"u8); + Native.glBlendEquation = (glBlendEquation)loader("glBlendEquation"u8); + Native.glGenQueries = (glGenQueries)loader("glGenQueries"u8); + Native.glDeleteQueries = (glDeleteQueries)loader("glDeleteQueries"u8); + Native.glIsQuery = (glIsQuery)loader("glIsQuery"u8); + Native.glBeginQuery = (glBeginQuery)loader("glBeginQuery"u8); + Native.glEndQuery = (glEndQuery)loader("glEndQuery"u8); + Native.glGetQueryiv = (glGetQueryiv)loader("glGetQueryiv"u8); + Native.glGetQueryObjectiv = (glGetQueryObjectiv)loader("glGetQueryObjectiv"u8); + Native.glGetQueryObjectuiv = (glGetQueryObjectuiv)loader("glGetQueryObjectuiv"u8); + Native.glBindBuffer = (glBindBuffer)loader("glBindBuffer"u8); + Native.glDeleteBuffers = (glDeleteBuffers)loader("glDeleteBuffers"u8); + Native.glGenBuffers = (glGenBuffers)loader("glGenBuffers"u8); + Native.glIsBuffer = (glIsBuffer)loader("glIsBuffer"u8); + Native.glBufferData = (glBufferData)loader("glBufferData"u8); + Native.glBufferSubData = (glBufferSubData)loader("glBufferSubData"u8); + Native.glGetBufferSubData = (glGetBufferSubData)loader("glGetBufferSubData"u8); + Native.glMapBuffer = (glMapBuffer)loader("glMapBuffer"u8); + Native.glUnmapBuffer = (glUnmapBuffer)loader("glUnmapBuffer"u8); + Native.glGetBufferParameteriv = (glGetBufferParameteriv)loader("glGetBufferParameteriv"u8); + Native.glGetBufferPointerv = (glGetBufferPointerv)loader("glGetBufferPointerv"u8); + Native.glBlendEquationSeparate = (glBlendEquationSeparate)loader("glBlendEquationSeparate"u8); + Native.glDrawBuffers = (glDrawBuffers)loader("glDrawBuffers"u8); + Native.glStencilOpSeparate = (glStencilOpSeparate)loader("glStencilOpSeparate"u8); + Native.glStencilFuncSeparate = (glStencilFuncSeparate)loader("glStencilFuncSeparate"u8); + Native.glStencilMaskSeparate = (glStencilMaskSeparate)loader("glStencilMaskSeparate"u8); + Native.glAttachShader = (glAttachShader)loader("glAttachShader"u8); + Native.glBindAttribLocation = (glBindAttribLocation)loader("glBindAttribLocation"u8); + Native.glCompileShader = (glCompileShader)loader("glCompileShader"u8); + Native.glCreateProgram = (glCreateProgram)loader("glCreateProgram"u8); + Native.glCreateShader = (glCreateShader)loader("glCreateShader"u8); + Native.glDeleteProgram = (glDeleteProgram)loader("glDeleteProgram"u8); + Native.glDeleteShader = (glDeleteShader)loader("glDeleteShader"u8); + Native.glDetachShader = (glDetachShader)loader("glDetachShader"u8); + Native.glDisableVertexAttribArray = (glDisableVertexAttribArray)loader("glDisableVertexAttribArray"u8); + Native.glEnableVertexAttribArray = (glEnableVertexAttribArray)loader("glEnableVertexAttribArray"u8); + Native.glGetActiveAttrib = (glGetActiveAttrib)loader("glGetActiveAttrib"u8); + Native.glGetActiveUniform = (glGetActiveUniform)loader("glGetActiveUniform"u8); + Native.glGetAttachedShaders = (glGetAttachedShaders)loader("glGetAttachedShaders"u8); + Native.glGetAttribLocation = (glGetAttribLocation)loader("glGetAttribLocation"u8); + Native.glGetProgramiv = (glGetProgramiv)loader("glGetProgramiv"u8); + Native.glGetProgramInfoLog = (glGetProgramInfoLog)loader("glGetProgramInfoLog"u8); + Native.glGetShaderiv = (glGetShaderiv)loader("glGetShaderiv"u8); + Native.glGetShaderInfoLog = (glGetShaderInfoLog)loader("glGetShaderInfoLog"u8); + Native.glGetShaderSource = (glGetShaderSource)loader("glGetShaderSource"u8); + Native.glGetUniformLocation = (glGetUniformLocation)loader("glGetUniformLocation"u8); + Native.glGetUniformfv = (glGetUniformfv)loader("glGetUniformfv"u8); + Native.glGetUniformiv = (glGetUniformiv)loader("glGetUniformiv"u8); + Native.glGetVertexAttribdv = (glGetVertexAttribdv)loader("glGetVertexAttribdv"u8); + Native.glGetVertexAttribfv = (glGetVertexAttribfv)loader("glGetVertexAttribfv"u8); + Native.glGetVertexAttribiv = (glGetVertexAttribiv)loader("glGetVertexAttribiv"u8); + Native.glGetVertexAttribPointerv = (glGetVertexAttribPointerv)loader("glGetVertexAttribPointerv"u8); + Native.glIsProgram = (glIsProgram)loader("glIsProgram"u8); + Native.glIsShader = (glIsShader)loader("glIsShader"u8); + Native.glLinkProgram = (glLinkProgram)loader("glLinkProgram"u8); + Native.glShaderSource = (glShaderSource)loader("glShaderSource"u8); + Native.glUseProgram = (glUseProgram)loader("glUseProgram"u8); + Native.glUniform1f = (glUniform1f)loader("glUniform1f"u8); + Native.glUniform2f = (glUniform2f)loader("glUniform2f"u8); + Native.glUniform3f = (glUniform3f)loader("glUniform3f"u8); + Native.glUniform4f = (glUniform4f)loader("glUniform4f"u8); + Native.glUniform1i = (glUniform1i)loader("glUniform1i"u8); + Native.glUniform2i = (glUniform2i)loader("glUniform2i"u8); + Native.glUniform3i = (glUniform3i)loader("glUniform3i"u8); + Native.glUniform4i = (glUniform4i)loader("glUniform4i"u8); + Native.glUniform1fv = (glUniform1fv)loader("glUniform1fv"u8); + Native.glUniform2fv = (glUniform2fv)loader("glUniform2fv"u8); + Native.glUniform3fv = (glUniform3fv)loader("glUniform3fv"u8); + Native.glUniform4fv = (glUniform4fv)loader("glUniform4fv"u8); + Native.glUniform1iv = (glUniform1iv)loader("glUniform1iv"u8); + Native.glUniform2iv = (glUniform2iv)loader("glUniform2iv"u8); + Native.glUniform3iv = (glUniform3iv)loader("glUniform3iv"u8); + Native.glUniform4iv = (glUniform4iv)loader("glUniform4iv"u8); + Native.glUniformMatrix2fv = (glUniformMatrix2fv)loader("glUniformMatrix2fv"u8); + Native.glUniformMatrix3fv = (glUniformMatrix3fv)loader("glUniformMatrix3fv"u8); + Native.glUniformMatrix4fv = (glUniformMatrix4fv)loader("glUniformMatrix4fv"u8); + Native.glValidateProgram = (glValidateProgram)loader("glValidateProgram"u8); + Native.glVertexAttrib1d = (glVertexAttrib1d)loader("glVertexAttrib1d"u8); + Native.glVertexAttrib1dv = (glVertexAttrib1dv)loader("glVertexAttrib1dv"u8); + Native.glVertexAttrib1f = (glVertexAttrib1f)loader("glVertexAttrib1f"u8); + Native.glVertexAttrib1fv = (glVertexAttrib1fv)loader("glVertexAttrib1fv"u8); + Native.glVertexAttrib1s = (glVertexAttrib1s)loader("glVertexAttrib1s"u8); + Native.glVertexAttrib1sv = (glVertexAttrib1sv)loader("glVertexAttrib1sv"u8); + Native.glVertexAttrib2d = (glVertexAttrib2d)loader("glVertexAttrib2d"u8); + Native.glVertexAttrib2dv = (glVertexAttrib2dv)loader("glVertexAttrib2dv"u8); + Native.glVertexAttrib2f = (glVertexAttrib2f)loader("glVertexAttrib2f"u8); + Native.glVertexAttrib2fv = (glVertexAttrib2fv)loader("glVertexAttrib2fv"u8); + Native.glVertexAttrib2s = (glVertexAttrib2s)loader("glVertexAttrib2s"u8); + Native.glVertexAttrib2sv = (glVertexAttrib2sv)loader("glVertexAttrib2sv"u8); + Native.glVertexAttrib3d = (glVertexAttrib3d)loader("glVertexAttrib3d"u8); + Native.glVertexAttrib3dv = (glVertexAttrib3dv)loader("glVertexAttrib3dv"u8); + Native.glVertexAttrib3f = (glVertexAttrib3f)loader("glVertexAttrib3f"u8); + Native.glVertexAttrib3fv = (glVertexAttrib3fv)loader("glVertexAttrib3fv"u8); + Native.glVertexAttrib3s = (glVertexAttrib3s)loader("glVertexAttrib3s"u8); + Native.glVertexAttrib3sv = (glVertexAttrib3sv)loader("glVertexAttrib3sv"u8); + Native.glVertexAttrib4Nbv = (glVertexAttrib4Nbv)loader("glVertexAttrib4Nbv"u8); + Native.glVertexAttrib4Niv = (glVertexAttrib4Niv)loader("glVertexAttrib4Niv"u8); + Native.glVertexAttrib4Nsv = (glVertexAttrib4Nsv)loader("glVertexAttrib4Nsv"u8); + Native.glVertexAttrib4Nub = (glVertexAttrib4Nub)loader("glVertexAttrib4Nub"u8); + Native.glVertexAttrib4Nubv = (glVertexAttrib4Nubv)loader("glVertexAttrib4Nubv"u8); + Native.glVertexAttrib4Nuiv = (glVertexAttrib4Nuiv)loader("glVertexAttrib4Nuiv"u8); + Native.glVertexAttrib4Nusv = (glVertexAttrib4Nusv)loader("glVertexAttrib4Nusv"u8); + Native.glVertexAttrib4bv = (glVertexAttrib4bv)loader("glVertexAttrib4bv"u8); + Native.glVertexAttrib4d = (glVertexAttrib4d)loader("glVertexAttrib4d"u8); + Native.glVertexAttrib4dv = (glVertexAttrib4dv)loader("glVertexAttrib4dv"u8); + Native.glVertexAttrib4f = (glVertexAttrib4f)loader("glVertexAttrib4f"u8); + Native.glVertexAttrib4fv = (glVertexAttrib4fv)loader("glVertexAttrib4fv"u8); + Native.glVertexAttrib4iv = (glVertexAttrib4iv)loader("glVertexAttrib4iv"u8); + Native.glVertexAttrib4s = (glVertexAttrib4s)loader("glVertexAttrib4s"u8); + Native.glVertexAttrib4sv = (glVertexAttrib4sv)loader("glVertexAttrib4sv"u8); + Native.glVertexAttrib4ubv = (glVertexAttrib4ubv)loader("glVertexAttrib4ubv"u8); + Native.glVertexAttrib4uiv = (glVertexAttrib4uiv)loader("glVertexAttrib4uiv"u8); + Native.glVertexAttrib4usv = (glVertexAttrib4usv)loader("glVertexAttrib4usv"u8); + Native.glVertexAttribPointer = (glVertexAttribPointer)loader("glVertexAttribPointer"u8); + Native.glUniformMatrix2x3fv = (glUniformMatrix2x3fv)loader("glUniformMatrix2x3fv"u8); + Native.glUniformMatrix3x2fv = (glUniformMatrix3x2fv)loader("glUniformMatrix3x2fv"u8); + Native.glUniformMatrix2x4fv = (glUniformMatrix2x4fv)loader("glUniformMatrix2x4fv"u8); + Native.glUniformMatrix4x2fv = (glUniformMatrix4x2fv)loader("glUniformMatrix4x2fv"u8); + Native.glUniformMatrix3x4fv = (glUniformMatrix3x4fv)loader("glUniformMatrix3x4fv"u8); + Native.glUniformMatrix4x3fv = (glUniformMatrix4x3fv)loader("glUniformMatrix4x3fv"u8); + Native.glColorMaski = (glColorMaski)loader("glColorMaski"u8); + Native.glGetBooleani_v = (glGetBooleani_v)loader("glGetBooleani_v"u8); + Native.glGetIntegeri_v = (glGetIntegeri_v)loader("glGetIntegeri_v"u8); + Native.glEnablei = (glEnablei)loader("glEnablei"u8); + Native.glDisablei = (glDisablei)loader("glDisablei"u8); + Native.glIsEnabledi = (glIsEnabledi)loader("glIsEnabledi"u8); + Native.glBeginTransformFeedback = (glBeginTransformFeedback)loader("glBeginTransformFeedback"u8); + Native.glEndTransformFeedback = (glEndTransformFeedback)loader("glEndTransformFeedback"u8); + Native.glBindBufferRange = (glBindBufferRange)loader("glBindBufferRange"u8); + Native.glBindBufferBase = (glBindBufferBase)loader("glBindBufferBase"u8); + Native.glTransformFeedbackVaryings = (glTransformFeedbackVaryings)loader("glTransformFeedbackVaryings"u8); + Native.glGetTransformFeedbackVarying = (glGetTransformFeedbackVarying)loader( + "glGetTransformFeedbackVarying"u8 + ); + Native.glClampColor = (glClampColor)loader("glClampColor"u8); + Native.glBeginConditionalRender = (glBeginConditionalRender)loader("glBeginConditionalRender"u8); + Native.glEndConditionalRender = (glEndConditionalRender)loader("glEndConditionalRender"u8); + Native.glVertexAttribIPointer = (glVertexAttribIPointer)loader("glVertexAttribIPointer"u8); + Native.glGetVertexAttribIiv = (glGetVertexAttribIiv)loader("glGetVertexAttribIiv"u8); + Native.glGetVertexAttribIuiv = (glGetVertexAttribIuiv)loader("glGetVertexAttribIuiv"u8); + Native.glVertexAttribI1i = (glVertexAttribI1i)loader("glVertexAttribI1i"u8); + Native.glVertexAttribI2i = (glVertexAttribI2i)loader("glVertexAttribI2i"u8); + Native.glVertexAttribI3i = (glVertexAttribI3i)loader("glVertexAttribI3i"u8); + Native.glVertexAttribI4i = (glVertexAttribI4i)loader("glVertexAttribI4i"u8); + Native.glVertexAttribI1ui = (glVertexAttribI1ui)loader("glVertexAttribI1ui"u8); + Native.glVertexAttribI2ui = (glVertexAttribI2ui)loader("glVertexAttribI2ui"u8); + Native.glVertexAttribI3ui = (glVertexAttribI3ui)loader("glVertexAttribI3ui"u8); + Native.glVertexAttribI4ui = (glVertexAttribI4ui)loader("glVertexAttribI4ui"u8); + Native.glVertexAttribI1iv = (glVertexAttribI1iv)loader("glVertexAttribI1iv"u8); + Native.glVertexAttribI2iv = (glVertexAttribI2iv)loader("glVertexAttribI2iv"u8); + Native.glVertexAttribI3iv = (glVertexAttribI3iv)loader("glVertexAttribI3iv"u8); + Native.glVertexAttribI4iv = (glVertexAttribI4iv)loader("glVertexAttribI4iv"u8); + Native.glVertexAttribI1uiv = (glVertexAttribI1uiv)loader("glVertexAttribI1uiv"u8); + Native.glVertexAttribI2uiv = (glVertexAttribI2uiv)loader("glVertexAttribI2uiv"u8); + Native.glVertexAttribI3uiv = (glVertexAttribI3uiv)loader("glVertexAttribI3uiv"u8); + Native.glVertexAttribI4uiv = (glVertexAttribI4uiv)loader("glVertexAttribI4uiv"u8); + Native.glVertexAttribI4bv = (glVertexAttribI4bv)loader("glVertexAttribI4bv"u8); + Native.glVertexAttribI4sv = (glVertexAttribI4sv)loader("glVertexAttribI4sv"u8); + Native.glVertexAttribI4ubv = (glVertexAttribI4ubv)loader("glVertexAttribI4ubv"u8); + Native.glVertexAttribI4usv = (glVertexAttribI4usv)loader("glVertexAttribI4usv"u8); + Native.glGetUniformuiv = (glGetUniformuiv)loader("glGetUniformuiv"u8); + Native.glBindFragDataLocation = (glBindFragDataLocation)loader("glBindFragDataLocation"u8); + Native.glGetFragDataLocation = (glGetFragDataLocation)loader("glGetFragDataLocation"u8); + Native.glUniform1ui = (glUniform1ui)loader("glUniform1ui"u8); + Native.glUniform2ui = (glUniform2ui)loader("glUniform2ui"u8); + Native.glUniform3ui = (glUniform3ui)loader("glUniform3ui"u8); + Native.glUniform4ui = (glUniform4ui)loader("glUniform4ui"u8); + Native.glUniform1uiv = (glUniform1uiv)loader("glUniform1uiv"u8); + Native.glUniform2uiv = (glUniform2uiv)loader("glUniform2uiv"u8); + Native.glUniform3uiv = (glUniform3uiv)loader("glUniform3uiv"u8); + Native.glUniform4uiv = (glUniform4uiv)loader("glUniform4uiv"u8); + Native.glTexParameterIiv = (glTexParameterIiv)loader("glTexParameterIiv"u8); + Native.glTexParameterIuiv = (glTexParameterIuiv)loader("glTexParameterIuiv"u8); + Native.glGetTexParameterIiv = (glGetTexParameterIiv)loader("glGetTexParameterIiv"u8); + Native.glGetTexParameterIuiv = (glGetTexParameterIuiv)loader("glGetTexParameterIuiv"u8); + Native.glClearBufferiv = (glClearBufferiv)loader("glClearBufferiv"u8); + Native.glClearBufferuiv = (glClearBufferuiv)loader("glClearBufferuiv"u8); + Native.glClearBufferfv = (glClearBufferfv)loader("glClearBufferfv"u8); + Native.glClearBufferfi = (glClearBufferfi)loader("glClearBufferfi"u8); + Native.glGetStringi = (glGetStringi)loader("glGetStringi"u8); + Native.glIsRenderbuffer = (glIsRenderbuffer)loader("glIsRenderbuffer"u8); + Native.glBindRenderbuffer = (glBindRenderbuffer)loader("glBindRenderbuffer"u8); + Native.glDeleteRenderbuffers = (glDeleteRenderbuffers)loader("glDeleteRenderbuffers"u8); + Native.glGenRenderbuffers = (glGenRenderbuffers)loader("glGenRenderbuffers"u8); + Native.glRenderbufferStorage = (glRenderbufferStorage)loader("glRenderbufferStorage"u8); + Native.glGetRenderbufferParameteriv = (glGetRenderbufferParameteriv)loader( + "glGetRenderbufferParameteriv"u8 + ); + Native.glIsFramebuffer = (glIsFramebuffer)loader("glIsFramebuffer"u8); + Native.glBindFramebuffer = (glBindFramebuffer)loader("glBindFramebuffer"u8); + Native.glDeleteFramebuffers = (glDeleteFramebuffers)loader("glDeleteFramebuffers"u8); + Native.glGenFramebuffers = (glGenFramebuffers)loader("glGenFramebuffers"u8); + Native.glCheckFramebufferStatus = (glCheckFramebufferStatus)loader("glCheckFramebufferStatus"u8); + Native.glFramebufferTexture1D = (glFramebufferTexture1D)loader("glFramebufferTexture1D"u8); + Native.glFramebufferTexture2D = (glFramebufferTexture2D)loader("glFramebufferTexture2D"u8); + Native.glFramebufferTexture3D = (glFramebufferTexture3D)loader("glFramebufferTexture3D"u8); + Native.glFramebufferRenderbuffer = (glFramebufferRenderbuffer)loader("glFramebufferRenderbuffer"u8); + Native.glGetFramebufferAttachmentParameteriv = (glGetFramebufferAttachmentParameteriv)loader( + "glGetFramebufferAttachmentParameteriv"u8 + ); + Native.glGenerateMipmap = (glGenerateMipmap)loader("glGenerateMipmap"u8); + Native.glBlitFramebuffer = (glBlitFramebuffer)loader("glBlitFramebuffer"u8); + Native.glRenderbufferStorageMultisample = (glRenderbufferStorageMultisample)loader( + "glRenderbufferStorageMultisample"u8 + ); + Native.glFramebufferTextureLayer = (glFramebufferTextureLayer)loader("glFramebufferTextureLayer"u8); + Native.glMapBufferRange = (glMapBufferRange)loader("glMapBufferRange"u8); + Native.glFlushMappedBufferRange = (glFlushMappedBufferRange)loader("glFlushMappedBufferRange"u8); + Native.glBindVertexArray = (glBindVertexArray)loader("glBindVertexArray"u8); + Native.glDeleteVertexArrays = (glDeleteVertexArrays)loader("glDeleteVertexArrays"u8); + Native.glGenVertexArrays = (glGenVertexArrays)loader("glGenVertexArrays"u8); + Native.glIsVertexArray = (glIsVertexArray)loader("glIsVertexArray"u8); + Native.glDrawArraysInstanced = (glDrawArraysInstanced)loader("glDrawArraysInstanced"u8); + Native.glDrawElementsInstanced = (glDrawElementsInstanced)loader("glDrawElementsInstanced"u8); + Native.glTexBuffer = (glTexBuffer)loader("glTexBuffer"u8); + Native.glPrimitiveRestartIndex = (glPrimitiveRestartIndex)loader("glPrimitiveRestartIndex"u8); + Native.glCopyBufferSubData = (glCopyBufferSubData)loader("glCopyBufferSubData"u8); + Native.glGetUniformIndices = (glGetUniformIndices)loader("glGetUniformIndices"u8); + Native.glGetActiveUniformsiv = (glGetActiveUniformsiv)loader("glGetActiveUniformsiv"u8); + Native.glGetActiveUniformName = (glGetActiveUniformName)loader("glGetActiveUniformName"u8); + Native.glGetUniformBlockIndex = (glGetUniformBlockIndex)loader("glGetUniformBlockIndex"u8); + Native.glGetActiveUniformBlockiv = (glGetActiveUniformBlockiv)loader("glGetActiveUniformBlockiv"u8); + Native.glGetActiveUniformBlockName = (glGetActiveUniformBlockName)loader("glGetActiveUniformBlockName"u8); + Native.glUniformBlockBinding = (glUniformBlockBinding)loader("glUniformBlockBinding"u8); + Native.glDrawElementsBaseVertex = (glDrawElementsBaseVertex)loader("glDrawElementsBaseVertex"u8); + Native.glDrawRangeElementsBaseVertex = (glDrawRangeElementsBaseVertex)loader( + "glDrawRangeElementsBaseVertex"u8 + ); + Native.glDrawElementsInstancedBaseVertex = (glDrawElementsInstancedBaseVertex)loader( + "glDrawElementsInstancedBaseVertex"u8 + ); + Native.glMultiDrawElementsBaseVertex = (glMultiDrawElementsBaseVertex)loader( + "glMultiDrawElementsBaseVertex"u8 + ); + Native.glProvokingVertex = (glProvokingVertex)loader("glProvokingVertex"u8); + Native.glFenceSync = (glFenceSync)loader("glFenceSync"u8); + Native.glIsSync = (glIsSync)loader("glIsSync"u8); + Native.glDeleteSync = (glDeleteSync)loader("glDeleteSync"u8); + Native.glClientWaitSync = (glClientWaitSync)loader("glClientWaitSync"u8); + Native.glWaitSync = (glWaitSync)loader("glWaitSync"u8); + Native.glGetInteger64v = (glGetInteger64v)loader("glGetInteger64v"u8); + Native.glGetSynciv = (glGetSynciv)loader("glGetSynciv"u8); + Native.glGetInteger64i_v = (glGetInteger64i_v)loader("glGetInteger64i_v"u8); + Native.glGetBufferParameteri64v = (glGetBufferParameteri64v)loader("glGetBufferParameteri64v"u8); + Native.glFramebufferTexture = (glFramebufferTexture)loader("glFramebufferTexture"u8); + Native.glTexImage2DMultisample = (glTexImage2DMultisample)loader("glTexImage2DMultisample"u8); + Native.glTexImage3DMultisample = (glTexImage3DMultisample)loader("glTexImage3DMultisample"u8); + Native.glGetMultisamplefv = (glGetMultisamplefv)loader("glGetMultisamplefv"u8); + Native.glSampleMaski = (glSampleMaski)loader("glSampleMaski"u8); + Native.glBindFragDataLocationIndexed = (glBindFragDataLocationIndexed)loader( + "glBindFragDataLocationIndexed"u8 + ); + Native.glGetFragDataIndex = (glGetFragDataIndex)loader("glGetFragDataIndex"u8); + Native.glGenSamplers = (glGenSamplers)loader("glGenSamplers"u8); + Native.glDeleteSamplers = (glDeleteSamplers)loader("glDeleteSamplers"u8); + Native.glIsSampler = (glIsSampler)loader("glIsSampler"u8); + Native.glBindSampler = (glBindSampler)loader("glBindSampler"u8); + Native.glSamplerParameteri = (glSamplerParameteri)loader("glSamplerParameteri"u8); + Native.glSamplerParameteriv = (glSamplerParameteriv)loader("glSamplerParameteriv"u8); + Native.glSamplerParameterf = (glSamplerParameterf)loader("glSamplerParameterf"u8); + Native.glSamplerParameterfv = (glSamplerParameterfv)loader("glSamplerParameterfv"u8); + Native.glSamplerParameterIiv = (glSamplerParameterIiv)loader("glSamplerParameterIiv"u8); + Native.glSamplerParameterIuiv = (glSamplerParameterIuiv)loader("glSamplerParameterIuiv"u8); + Native.glGetSamplerParameteriv = (glGetSamplerParameteriv)loader("glGetSamplerParameteriv"u8); + Native.glGetSamplerParameterIiv = (glGetSamplerParameterIiv)loader("glGetSamplerParameterIiv"u8); + Native.glGetSamplerParameterfv = (glGetSamplerParameterfv)loader("glGetSamplerParameterfv"u8); + Native.glGetSamplerParameterIuiv = (glGetSamplerParameterIuiv)loader("glGetSamplerParameterIuiv"u8); + Native.glQueryCounter = (glQueryCounter)loader("glQueryCounter"u8); + Native.glGetQueryObjecti64v = (glGetQueryObjecti64v)loader("glGetQueryObjecti64v"u8); + Native.glGetQueryObjectui64v = (glGetQueryObjectui64v)loader("glGetQueryObjectui64v"u8); + Native.glVertexAttribDivisor = (glVertexAttribDivisor)loader("glVertexAttribDivisor"u8); + Native.glVertexAttribP1ui = (glVertexAttribP1ui)loader("glVertexAttribP1ui"u8); + Native.glVertexAttribP1uiv = (glVertexAttribP1uiv)loader("glVertexAttribP1uiv"u8); + Native.glVertexAttribP2ui = (glVertexAttribP2ui)loader("glVertexAttribP2ui"u8); + Native.glVertexAttribP2uiv = (glVertexAttribP2uiv)loader("glVertexAttribP2uiv"u8); + Native.glVertexAttribP3ui = (glVertexAttribP3ui)loader("glVertexAttribP3ui"u8); + Native.glVertexAttribP3uiv = (glVertexAttribP3uiv)loader("glVertexAttribP3uiv"u8); + Native.glVertexAttribP4ui = (glVertexAttribP4ui)loader("glVertexAttribP4ui"u8); + Native.glVertexAttribP4uiv = (glVertexAttribP4uiv)loader("glVertexAttribP4uiv"u8); + Native.glVertexP2ui = (glVertexP2ui)loader("glVertexP2ui"u8); + Native.glVertexP2uiv = (glVertexP2uiv)loader("glVertexP2uiv"u8); + Native.glVertexP3ui = (glVertexP3ui)loader("glVertexP3ui"u8); + Native.glVertexP3uiv = (glVertexP3uiv)loader("glVertexP3uiv"u8); + Native.glVertexP4ui = (glVertexP4ui)loader("glVertexP4ui"u8); + Native.glVertexP4uiv = (glVertexP4uiv)loader("glVertexP4uiv"u8); + Native.glTexCoordP1ui = (glTexCoordP1ui)loader("glTexCoordP1ui"u8); + Native.glTexCoordP1uiv = (glTexCoordP1uiv)loader("glTexCoordP1uiv"u8); + Native.glTexCoordP2ui = (glTexCoordP2ui)loader("glTexCoordP2ui"u8); + Native.glTexCoordP2uiv = (glTexCoordP2uiv)loader("glTexCoordP2uiv"u8); + Native.glTexCoordP3ui = (glTexCoordP3ui)loader("glTexCoordP3ui"u8); + Native.glTexCoordP3uiv = (glTexCoordP3uiv)loader("glTexCoordP3uiv"u8); + Native.glTexCoordP4ui = (glTexCoordP4ui)loader("glTexCoordP4ui"u8); + Native.glTexCoordP4uiv = (glTexCoordP4uiv)loader("glTexCoordP4uiv"u8); + Native.glMultiTexCoordP1ui = (glMultiTexCoordP1ui)loader("glMultiTexCoordP1ui"u8); + Native.glMultiTexCoordP1uiv = (glMultiTexCoordP1uiv)loader("glMultiTexCoordP1uiv"u8); + Native.glMultiTexCoordP2ui = (glMultiTexCoordP2ui)loader("glMultiTexCoordP2ui"u8); + Native.glMultiTexCoordP2uiv = (glMultiTexCoordP2uiv)loader("glMultiTexCoordP2uiv"u8); + Native.glMultiTexCoordP3ui = (glMultiTexCoordP3ui)loader("glMultiTexCoordP3ui"u8); + Native.glMultiTexCoordP3uiv = (glMultiTexCoordP3uiv)loader("glMultiTexCoordP3uiv"u8); + Native.glMultiTexCoordP4ui = (glMultiTexCoordP4ui)loader("glMultiTexCoordP4ui"u8); + Native.glMultiTexCoordP4uiv = (glMultiTexCoordP4uiv)loader("glMultiTexCoordP4uiv"u8); + Native.glNormalP3ui = (glNormalP3ui)loader("glNormalP3ui"u8); + Native.glNormalP3uiv = (glNormalP3uiv)loader("glNormalP3uiv"u8); + Native.glColorP3ui = (glColorP3ui)loader("glColorP3ui"u8); + Native.glColorP3uiv = (glColorP3uiv)loader("glColorP3uiv"u8); + Native.glColorP4ui = (glColorP4ui)loader("glColorP4ui"u8); + Native.glColorP4uiv = (glColorP4uiv)loader("glColorP4uiv"u8); + Native.glSecondaryColorP3ui = (glSecondaryColorP3ui)loader("glSecondaryColorP3ui"u8); + Native.glSecondaryColorP3uiv = (glSecondaryColorP3uiv)loader("glSecondaryColorP3uiv"u8); + Native.glMinSampleShading = (glMinSampleShading)loader("glMinSampleShading"u8); + Native.glBlendEquationi = (glBlendEquationi)loader("glBlendEquationi"u8); + Native.glBlendEquationSeparatei = (glBlendEquationSeparatei)loader("glBlendEquationSeparatei"u8); + Native.glBlendFunci = (glBlendFunci)loader("glBlendFunci"u8); + Native.glBlendFuncSeparatei = (glBlendFuncSeparatei)loader("glBlendFuncSeparatei"u8); + Native.glDrawArraysIndirect = (glDrawArraysIndirect)loader("glDrawArraysIndirect"u8); + Native.glDrawElementsIndirect = (glDrawElementsIndirect)loader("glDrawElementsIndirect"u8); + Native.glUniform1d = (glUniform1d)loader("glUniform1d"u8); + Native.glUniform2d = (glUniform2d)loader("glUniform2d"u8); + Native.glUniform3d = (glUniform3d)loader("glUniform3d"u8); + Native.glUniform4d = (glUniform4d)loader("glUniform4d"u8); + Native.glUniform1dv = (glUniform1dv)loader("glUniform1dv"u8); + Native.glUniform2dv = (glUniform2dv)loader("glUniform2dv"u8); + Native.glUniform3dv = (glUniform3dv)loader("glUniform3dv"u8); + Native.glUniform4dv = (glUniform4dv)loader("glUniform4dv"u8); + Native.glUniformMatrix2dv = (glUniformMatrix2dv)loader("glUniformMatrix2dv"u8); + Native.glUniformMatrix3dv = (glUniformMatrix3dv)loader("glUniformMatrix3dv"u8); + Native.glUniformMatrix4dv = (glUniformMatrix4dv)loader("glUniformMatrix4dv"u8); + Native.glUniformMatrix2x3dv = (glUniformMatrix2x3dv)loader("glUniformMatrix2x3dv"u8); + Native.glUniformMatrix2x4dv = (glUniformMatrix2x4dv)loader("glUniformMatrix2x4dv"u8); + Native.glUniformMatrix3x2dv = (glUniformMatrix3x2dv)loader("glUniformMatrix3x2dv"u8); + Native.glUniformMatrix3x4dv = (glUniformMatrix3x4dv)loader("glUniformMatrix3x4dv"u8); + Native.glUniformMatrix4x2dv = (glUniformMatrix4x2dv)loader("glUniformMatrix4x2dv"u8); + Native.glUniformMatrix4x3dv = (glUniformMatrix4x3dv)loader("glUniformMatrix4x3dv"u8); + Native.glGetUniformdv = (glGetUniformdv)loader("glGetUniformdv"u8); + Native.glGetSubroutineUniformLocation = (glGetSubroutineUniformLocation)loader( + "glGetSubroutineUniformLocation"u8 + ); + Native.glGetSubroutineIndex = (glGetSubroutineIndex)loader("glGetSubroutineIndex"u8); + Native.glGetActiveSubroutineUniformiv = (glGetActiveSubroutineUniformiv)loader( + "glGetActiveSubroutineUniformiv"u8 + ); + Native.glGetActiveSubroutineUniformName = (glGetActiveSubroutineUniformName)loader( + "glGetActiveSubroutineUniformName"u8 + ); + Native.glGetActiveSubroutineName = (glGetActiveSubroutineName)loader("glGetActiveSubroutineName"u8); + Native.glUniformSubroutinesuiv = (glUniformSubroutinesuiv)loader("glUniformSubroutinesuiv"u8); + Native.glGetUniformSubroutineuiv = (glGetUniformSubroutineuiv)loader("glGetUniformSubroutineuiv"u8); + Native.glGetProgramStageiv = (glGetProgramStageiv)loader("glGetProgramStageiv"u8); + Native.glPatchParameteri = (glPatchParameteri)loader("glPatchParameteri"u8); + Native.glPatchParameterfv = (glPatchParameterfv)loader("glPatchParameterfv"u8); + Native.glBindTransformFeedback = (glBindTransformFeedback)loader("glBindTransformFeedback"u8); + Native.glDeleteTransformFeedbacks = (glDeleteTransformFeedbacks)loader("glDeleteTransformFeedbacks"u8); + Native.glGenTransformFeedbacks = (glGenTransformFeedbacks)loader("glGenTransformFeedbacks"u8); + Native.glIsTransformFeedback = (glIsTransformFeedback)loader("glIsTransformFeedback"u8); + Native.glPauseTransformFeedback = (glPauseTransformFeedback)loader("glPauseTransformFeedback"u8); + Native.glResumeTransformFeedback = (glResumeTransformFeedback)loader("glResumeTransformFeedback"u8); + Native.glDrawTransformFeedback = (glDrawTransformFeedback)loader("glDrawTransformFeedback"u8); + Native.glDrawTransformFeedbackStream = (glDrawTransformFeedbackStream)loader( + "glDrawTransformFeedbackStream"u8 + ); + Native.glBeginQueryIndexed = (glBeginQueryIndexed)loader("glBeginQueryIndexed"u8); + Native.glEndQueryIndexed = (glEndQueryIndexed)loader("glEndQueryIndexed"u8); + Native.glGetQueryIndexediv = (glGetQueryIndexediv)loader("glGetQueryIndexediv"u8); + Native.glReleaseShaderCompiler = (glReleaseShaderCompiler)loader("glReleaseShaderCompiler"u8); + Native.glShaderBinary = (glShaderBinary)loader("glShaderBinary"u8); + Native.glGetShaderPrecisionFormat = (glGetShaderPrecisionFormat)loader("glGetShaderPrecisionFormat"u8); + Native.glDepthRangef = (glDepthRangef)loader("glDepthRangef"u8); + Native.glClearDepthf = (glClearDepthf)loader("glClearDepthf"u8); + Native.glGetProgramBinary = (glGetProgramBinary)loader("glGetProgramBinary"u8); + Native.glProgramBinary = (glProgramBinary)loader("glProgramBinary"u8); + Native.glProgramParameteri = (glProgramParameteri)loader("glProgramParameteri"u8); + Native.glUseProgramStages = (glUseProgramStages)loader("glUseProgramStages"u8); + Native.glActiveShaderProgram = (glActiveShaderProgram)loader("glActiveShaderProgram"u8); + Native.glCreateShaderProgramv = (glCreateShaderProgramv)loader("glCreateShaderProgramv"u8); + Native.glBindProgramPipeline = (glBindProgramPipeline)loader("glBindProgramPipeline"u8); + Native.glDeleteProgramPipelines = (glDeleteProgramPipelines)loader("glDeleteProgramPipelines"u8); + Native.glGenProgramPipelines = (glGenProgramPipelines)loader("glGenProgramPipelines"u8); + Native.glIsProgramPipeline = (glIsProgramPipeline)loader("glIsProgramPipeline"u8); + Native.glGetProgramPipelineiv = (glGetProgramPipelineiv)loader("glGetProgramPipelineiv"u8); + Native.glProgramUniform1i = (glProgramUniform1i)loader("glProgramUniform1i"u8); + Native.glProgramUniform1iv = (glProgramUniform1iv)loader("glProgramUniform1iv"u8); + Native.glProgramUniform1f = (glProgramUniform1f)loader("glProgramUniform1f"u8); + Native.glProgramUniform1fv = (glProgramUniform1fv)loader("glProgramUniform1fv"u8); + Native.glProgramUniform1d = (glProgramUniform1d)loader("glProgramUniform1d"u8); + Native.glProgramUniform1dv = (glProgramUniform1dv)loader("glProgramUniform1dv"u8); + Native.glProgramUniform1ui = (glProgramUniform1ui)loader("glProgramUniform1ui"u8); + Native.glProgramUniform1uiv = (glProgramUniform1uiv)loader("glProgramUniform1uiv"u8); + Native.glProgramUniform2i = (glProgramUniform2i)loader("glProgramUniform2i"u8); + Native.glProgramUniform2iv = (glProgramUniform2iv)loader("glProgramUniform2iv"u8); + Native.glProgramUniform2f = (glProgramUniform2f)loader("glProgramUniform2f"u8); + Native.glProgramUniform2fv = (glProgramUniform2fv)loader("glProgramUniform2fv"u8); + Native.glProgramUniform2d = (glProgramUniform2d)loader("glProgramUniform2d"u8); + Native.glProgramUniform2dv = (glProgramUniform2dv)loader("glProgramUniform2dv"u8); + Native.glProgramUniform2ui = (glProgramUniform2ui)loader("glProgramUniform2ui"u8); + Native.glProgramUniform2uiv = (glProgramUniform2uiv)loader("glProgramUniform2uiv"u8); + Native.glProgramUniform3i = (glProgramUniform3i)loader("glProgramUniform3i"u8); + Native.glProgramUniform3iv = (glProgramUniform3iv)loader("glProgramUniform3iv"u8); + Native.glProgramUniform3f = (glProgramUniform3f)loader("glProgramUniform3f"u8); + Native.glProgramUniform3fv = (glProgramUniform3fv)loader("glProgramUniform3fv"u8); + Native.glProgramUniform3d = (glProgramUniform3d)loader("glProgramUniform3d"u8); + Native.glProgramUniform3dv = (glProgramUniform3dv)loader("glProgramUniform3dv"u8); + Native.glProgramUniform3ui = (glProgramUniform3ui)loader("glProgramUniform3ui"u8); + Native.glProgramUniform3uiv = (glProgramUniform3uiv)loader("glProgramUniform3uiv"u8); + Native.glProgramUniform4i = (glProgramUniform4i)loader("glProgramUniform4i"u8); + Native.glProgramUniform4iv = (glProgramUniform4iv)loader("glProgramUniform4iv"u8); + Native.glProgramUniform4f = (glProgramUniform4f)loader("glProgramUniform4f"u8); + Native.glProgramUniform4fv = (glProgramUniform4fv)loader("glProgramUniform4fv"u8); + Native.glProgramUniform4d = (glProgramUniform4d)loader("glProgramUniform4d"u8); + Native.glProgramUniform4dv = (glProgramUniform4dv)loader("glProgramUniform4dv"u8); + Native.glProgramUniform4ui = (glProgramUniform4ui)loader("glProgramUniform4ui"u8); + Native.glProgramUniform4uiv = (glProgramUniform4uiv)loader("glProgramUniform4uiv"u8); + Native.glProgramUniformMatrix2fv = (glProgramUniformMatrix2fv)loader("glProgramUniformMatrix2fv"u8); + Native.glProgramUniformMatrix3fv = (glProgramUniformMatrix3fv)loader("glProgramUniformMatrix3fv"u8); + Native.glProgramUniformMatrix4fv = (glProgramUniformMatrix4fv)loader("glProgramUniformMatrix4fv"u8); + Native.glProgramUniformMatrix2dv = (glProgramUniformMatrix2dv)loader("glProgramUniformMatrix2dv"u8); + Native.glProgramUniformMatrix3dv = (glProgramUniformMatrix3dv)loader("glProgramUniformMatrix3dv"u8); + Native.glProgramUniformMatrix4dv = (glProgramUniformMatrix4dv)loader("glProgramUniformMatrix4dv"u8); + Native.glProgramUniformMatrix2x3fv = (glProgramUniformMatrix2x3fv)loader("glProgramUniformMatrix2x3fv"u8); + Native.glProgramUniformMatrix3x2fv = (glProgramUniformMatrix3x2fv)loader("glProgramUniformMatrix3x2fv"u8); + Native.glProgramUniformMatrix2x4fv = (glProgramUniformMatrix2x4fv)loader("glProgramUniformMatrix2x4fv"u8); + Native.glProgramUniformMatrix4x2fv = (glProgramUniformMatrix4x2fv)loader("glProgramUniformMatrix4x2fv"u8); + Native.glProgramUniformMatrix3x4fv = (glProgramUniformMatrix3x4fv)loader("glProgramUniformMatrix3x4fv"u8); + Native.glProgramUniformMatrix4x3fv = (glProgramUniformMatrix4x3fv)loader("glProgramUniformMatrix4x3fv"u8); + Native.glProgramUniformMatrix2x3dv = (glProgramUniformMatrix2x3dv)loader("glProgramUniformMatrix2x3dv"u8); + Native.glProgramUniformMatrix3x2dv = (glProgramUniformMatrix3x2dv)loader("glProgramUniformMatrix3x2dv"u8); + Native.glProgramUniformMatrix2x4dv = (glProgramUniformMatrix2x4dv)loader("glProgramUniformMatrix2x4dv"u8); + Native.glProgramUniformMatrix4x2dv = (glProgramUniformMatrix4x2dv)loader("glProgramUniformMatrix4x2dv"u8); + Native.glProgramUniformMatrix3x4dv = (glProgramUniformMatrix3x4dv)loader("glProgramUniformMatrix3x4dv"u8); + Native.glProgramUniformMatrix4x3dv = (glProgramUniformMatrix4x3dv)loader("glProgramUniformMatrix4x3dv"u8); + Native.glValidateProgramPipeline = (glValidateProgramPipeline)loader("glValidateProgramPipeline"u8); + Native.glGetProgramPipelineInfoLog = (glGetProgramPipelineInfoLog)loader("glGetProgramPipelineInfoLog"u8); + Native.glVertexAttribL1d = (glVertexAttribL1d)loader("glVertexAttribL1d"u8); + Native.glVertexAttribL2d = (glVertexAttribL2d)loader("glVertexAttribL2d"u8); + Native.glVertexAttribL3d = (glVertexAttribL3d)loader("glVertexAttribL3d"u8); + Native.glVertexAttribL4d = (glVertexAttribL4d)loader("glVertexAttribL4d"u8); + Native.glVertexAttribL1dv = (glVertexAttribL1dv)loader("glVertexAttribL1dv"u8); + Native.glVertexAttribL2dv = (glVertexAttribL2dv)loader("glVertexAttribL2dv"u8); + Native.glVertexAttribL3dv = (glVertexAttribL3dv)loader("glVertexAttribL3dv"u8); + Native.glVertexAttribL4dv = (glVertexAttribL4dv)loader("glVertexAttribL4dv"u8); + Native.glVertexAttribLPointer = (glVertexAttribLPointer)loader("glVertexAttribLPointer"u8); + Native.glGetVertexAttribLdv = (glGetVertexAttribLdv)loader("glGetVertexAttribLdv"u8); + Native.glViewportArrayv = (glViewportArrayv)loader("glViewportArrayv"u8); + Native.glViewportIndexedf = (glViewportIndexedf)loader("glViewportIndexedf"u8); + Native.glViewportIndexedfv = (glViewportIndexedfv)loader("glViewportIndexedfv"u8); + Native.glScissorArrayv = (glScissorArrayv)loader("glScissorArrayv"u8); + Native.glScissorIndexed = (glScissorIndexed)loader("glScissorIndexed"u8); + Native.glScissorIndexedv = (glScissorIndexedv)loader("glScissorIndexedv"u8); + Native.glDepthRangeArrayv = (glDepthRangeArrayv)loader("glDepthRangeArrayv"u8); + Native.glDepthRangeIndexed = (glDepthRangeIndexed)loader("glDepthRangeIndexed"u8); + Native.glGetFloati_v = (glGetFloati_v)loader("glGetFloati_v"u8); + Native.glGetDoublei_v = (glGetDoublei_v)loader("glGetDoublei_v"u8); + Native.glDrawArraysInstancedBaseInstance = (glDrawArraysInstancedBaseInstance)loader( + "glDrawArraysInstancedBaseInstance"u8 + ); + Native.glDrawElementsInstancedBaseInstance = (glDrawElementsInstancedBaseInstance)loader( + "glDrawElementsInstancedBaseInstance"u8 + ); + Native.glDrawElementsInstancedBaseVertexBaseInstance = + (glDrawElementsInstancedBaseVertexBaseInstance)loader( + "glDrawElementsInstancedBaseVertexBaseInstance"u8 + ); + Native.glGetInternalformativ = (glGetInternalformativ)loader("glGetInternalformativ"u8); + Native.glGetActiveAtomicCounterBufferiv = (glGetActiveAtomicCounterBufferiv)loader( + "glGetActiveAtomicCounterBufferiv"u8 + ); + Native.glBindImageTexture = (glBindImageTexture)loader("glBindImageTexture"u8); + Native.glMemoryBarrier = (glMemoryBarrier)loader("glMemoryBarrier"u8); + Native.glTexStorage1D = (glTexStorage1D)loader("glTexStorage1D"u8); + Native.glTexStorage2D = (glTexStorage2D)loader("glTexStorage2D"u8); + Native.glTexStorage3D = (glTexStorage3D)loader("glTexStorage3D"u8); + Native.glDrawTransformFeedbackInstanced = (glDrawTransformFeedbackInstanced)loader( + "glDrawTransformFeedbackInstanced"u8 + ); + Native.glDrawTransformFeedbackStreamInstanced = (glDrawTransformFeedbackStreamInstanced)loader( + "glDrawTransformFeedbackStreamInstanced"u8 + ); + Native.glClearBufferData = (glClearBufferData)loader("glClearBufferData"u8); + Native.glClearBufferSubData = (glClearBufferSubData)loader("glClearBufferSubData"u8); + Native.glDispatchCompute = (glDispatchCompute)loader("glDispatchCompute"u8); + Native.glDispatchComputeIndirect = (glDispatchComputeIndirect)loader("glDispatchComputeIndirect"u8); + Native.glCopyImageSubData = (glCopyImageSubData)loader("glCopyImageSubData"u8); + Native.glFramebufferParameteri = (glFramebufferParameteri)loader("glFramebufferParameteri"u8); + Native.glGetFramebufferParameteriv = (glGetFramebufferParameteriv)loader("glGetFramebufferParameteriv"u8); + Native.glGetInternalformati64v = (glGetInternalformati64v)loader("glGetInternalformati64v"u8); + Native.glInvalidateTexSubImage = (glInvalidateTexSubImage)loader("glInvalidateTexSubImage"u8); + Native.glInvalidateTexImage = (glInvalidateTexImage)loader("glInvalidateTexImage"u8); + Native.glInvalidateBufferSubData = (glInvalidateBufferSubData)loader("glInvalidateBufferSubData"u8); + Native.glInvalidateBufferData = (glInvalidateBufferData)loader("glInvalidateBufferData"u8); + Native.glInvalidateFramebuffer = (glInvalidateFramebuffer)loader("glInvalidateFramebuffer"u8); + Native.glInvalidateSubFramebuffer = (glInvalidateSubFramebuffer)loader("glInvalidateSubFramebuffer"u8); + Native.glMultiDrawArraysIndirect = (glMultiDrawArraysIndirect)loader("glMultiDrawArraysIndirect"u8); + Native.glMultiDrawElementsIndirect = (glMultiDrawElementsIndirect)loader("glMultiDrawElementsIndirect"u8); + Native.glGetProgramInterfaceiv = (glGetProgramInterfaceiv)loader("glGetProgramInterfaceiv"u8); + Native.glGetProgramResourceIndex = (glGetProgramResourceIndex)loader("glGetProgramResourceIndex"u8); + Native.glGetProgramResourceName = (glGetProgramResourceName)loader("glGetProgramResourceName"u8); + Native.glGetProgramResourceiv = (glGetProgramResourceiv)loader("glGetProgramResourceiv"u8); + Native.glGetProgramResourceLocation = (glGetProgramResourceLocation)loader( + "glGetProgramResourceLocation"u8 + ); + Native.glGetProgramResourceLocationIndex = (glGetProgramResourceLocationIndex)loader( + "glGetProgramResourceLocationIndex"u8 + ); + Native.glShaderStorageBlockBinding = (glShaderStorageBlockBinding)loader("glShaderStorageBlockBinding"u8); + Native.glTexBufferRange = (glTexBufferRange)loader("glTexBufferRange"u8); + Native.glTexStorage2DMultisample = (glTexStorage2DMultisample)loader("glTexStorage2DMultisample"u8); + Native.glTexStorage3DMultisample = (glTexStorage3DMultisample)loader("glTexStorage3DMultisample"u8); + Native.glTextureView = (glTextureView)loader("glTextureView"u8); + Native.glBindVertexBuffer = (glBindVertexBuffer)loader("glBindVertexBuffer"u8); + Native.glVertexAttribFormat = (glVertexAttribFormat)loader("glVertexAttribFormat"u8); + Native.glVertexAttribIFormat = (glVertexAttribIFormat)loader("glVertexAttribIFormat"u8); + Native.glVertexAttribLFormat = (glVertexAttribLFormat)loader("glVertexAttribLFormat"u8); + Native.glVertexAttribBinding = (glVertexAttribBinding)loader("glVertexAttribBinding"u8); + Native.glVertexBindingDivisor = (glVertexBindingDivisor)loader("glVertexBindingDivisor"u8); + Native.glDebugMessageControl = (glDebugMessageControl)loader("glDebugMessageControl"u8); + Native.glDebugMessageInsert = (glDebugMessageInsert)loader("glDebugMessageInsert"u8); + Native.glDebugMessageCallback = (glDebugMessageCallback)loader("glDebugMessageCallback"u8); + Native.glGetDebugMessageLog = (glGetDebugMessageLog)loader("glGetDebugMessageLog"u8); + Native.glPushDebugGroup = (glPushDebugGroup)loader("glPushDebugGroup"u8); + Native.glPopDebugGroup = (glPopDebugGroup)loader("glPopDebugGroup"u8); + Native.glObjectLabel = (glObjectLabel)loader("glObjectLabel"u8); + Native.glGetObjectLabel = (glGetObjectLabel)loader("glGetObjectLabel"u8); + Native.glObjectPtrLabel = (glObjectPtrLabel)loader("glObjectPtrLabel"u8); + Native.glGetObjectPtrLabel = (glGetObjectPtrLabel)loader("glGetObjectPtrLabel"u8); + Native.glGetPointerv = (glGetPointerv)loader("glGetPointerv"u8); + Native.glBufferStorage = (glBufferStorage)loader("glBufferStorage"u8); + Native.glClearTexImage = (glClearTexImage)loader("glClearTexImage"u8); + Native.glClearTexSubImage = (glClearTexSubImage)loader("glClearTexSubImage"u8); + Native.glBindBuffersBase = (glBindBuffersBase)loader("glBindBuffersBase"u8); + Native.glBindBuffersRange = (glBindBuffersRange)loader("glBindBuffersRange"u8); + Native.glBindTextures = (glBindTextures)loader("glBindTextures"u8); + Native.glBindSamplers = (glBindSamplers)loader("glBindSamplers"u8); + Native.glBindImageTextures = (glBindImageTextures)loader("glBindImageTextures"u8); + Native.glBindVertexBuffers = (glBindVertexBuffers)loader("glBindVertexBuffers"u8); + Native.glClipControl = (glClipControl)loader("glClipControl"u8); + Native.glCreateTransformFeedbacks = (glCreateTransformFeedbacks)loader("glCreateTransformFeedbacks"u8); + Native.glTransformFeedbackBufferBase = (glTransformFeedbackBufferBase)loader( + "glTransformFeedbackBufferBase"u8 + ); + Native.glTransformFeedbackBufferRange = (glTransformFeedbackBufferRange)loader( + "glTransformFeedbackBufferRange"u8 + ); + Native.glGetTransformFeedbackiv = (glGetTransformFeedbackiv)loader("glGetTransformFeedbackiv"u8); + Native.glGetTransformFeedbacki_v = (glGetTransformFeedbacki_v)loader("glGetTransformFeedbacki_v"u8); + Native.glGetTransformFeedbacki64_v = (glGetTransformFeedbacki64_v)loader("glGetTransformFeedbacki64_v"u8); + Native.glCreateBuffers = (glCreateBuffers)loader("glCreateBuffers"u8); + Native.glNamedBufferStorage = (glNamedBufferStorage)loader("glNamedBufferStorage"u8); + Native.glNamedBufferData = (glNamedBufferData)loader("glNamedBufferData"u8); + Native.glNamedBufferSubData = (glNamedBufferSubData)loader("glNamedBufferSubData"u8); + Native.glCopyNamedBufferSubData = (glCopyNamedBufferSubData)loader("glCopyNamedBufferSubData"u8); + Native.glClearNamedBufferData = (glClearNamedBufferData)loader("glClearNamedBufferData"u8); + Native.glClearNamedBufferSubData = (glClearNamedBufferSubData)loader("glClearNamedBufferSubData"u8); + Native.glMapNamedBuffer = (glMapNamedBuffer)loader("glMapNamedBuffer"u8); + Native.glMapNamedBufferRange = (glMapNamedBufferRange)loader("glMapNamedBufferRange"u8); + Native.glUnmapNamedBuffer = (glUnmapNamedBuffer)loader("glUnmapNamedBuffer"u8); + Native.glFlushMappedNamedBufferRange = (glFlushMappedNamedBufferRange)loader( + "glFlushMappedNamedBufferRange"u8 + ); + Native.glGetNamedBufferParameteriv = (glGetNamedBufferParameteriv)loader("glGetNamedBufferParameteriv"u8); + Native.glGetNamedBufferParameteri64v = (glGetNamedBufferParameteri64v)loader( + "glGetNamedBufferParameteri64v"u8 + ); + Native.glGetNamedBufferPointerv = (glGetNamedBufferPointerv)loader("glGetNamedBufferPointerv"u8); + Native.glGetNamedBufferSubData = (glGetNamedBufferSubData)loader("glGetNamedBufferSubData"u8); + Native.glCreateFramebuffers = (glCreateFramebuffers)loader("glCreateFramebuffers"u8); + Native.glNamedFramebufferRenderbuffer = (glNamedFramebufferRenderbuffer)loader( + "glNamedFramebufferRenderbuffer"u8 + ); + Native.glNamedFramebufferParameteri = (glNamedFramebufferParameteri)loader( + "glNamedFramebufferParameteri"u8 + ); + Native.glNamedFramebufferTexture = (glNamedFramebufferTexture)loader("glNamedFramebufferTexture"u8); + Native.glNamedFramebufferTextureLayer = (glNamedFramebufferTextureLayer)loader( + "glNamedFramebufferTextureLayer"u8 + ); + Native.glNamedFramebufferDrawBuffer = (glNamedFramebufferDrawBuffer)loader( + "glNamedFramebufferDrawBuffer"u8 + ); + Native.glNamedFramebufferDrawBuffers = (glNamedFramebufferDrawBuffers)loader( + "glNamedFramebufferDrawBuffers"u8 + ); + Native.glNamedFramebufferReadBuffer = (glNamedFramebufferReadBuffer)loader( + "glNamedFramebufferReadBuffer"u8 + ); + Native.glInvalidateNamedFramebufferData = (glInvalidateNamedFramebufferData)loader( + "glInvalidateNamedFramebufferData"u8 + ); + Native.glInvalidateNamedFramebufferSubData = (glInvalidateNamedFramebufferSubData)loader( + "glInvalidateNamedFramebufferSubData"u8 + ); + Native.glClearNamedFramebufferiv = (glClearNamedFramebufferiv)loader("glClearNamedFramebufferiv"u8); + Native.glClearNamedFramebufferuiv = (glClearNamedFramebufferuiv)loader("glClearNamedFramebufferuiv"u8); + Native.glClearNamedFramebufferfv = (glClearNamedFramebufferfv)loader("glClearNamedFramebufferfv"u8); + Native.glClearNamedFramebufferfi = (glClearNamedFramebufferfi)loader("glClearNamedFramebufferfi"u8); + Native.glBlitNamedFramebuffer = (glBlitNamedFramebuffer)loader("glBlitNamedFramebuffer"u8); + Native.glCheckNamedFramebufferStatus = (glCheckNamedFramebufferStatus)loader( + "glCheckNamedFramebufferStatus"u8 + ); + Native.glGetNamedFramebufferParameteriv = (glGetNamedFramebufferParameteriv)loader( + "glGetNamedFramebufferParameteriv"u8 + ); + Native.glGetNamedFramebufferAttachmentParameteriv = (glGetNamedFramebufferAttachmentParameteriv)loader( + "glGetNamedFramebufferAttachmentParameteriv"u8 + ); + Native.glCreateRenderbuffers = (glCreateRenderbuffers)loader("glCreateRenderbuffers"u8); + Native.glNamedRenderbufferStorage = (glNamedRenderbufferStorage)loader("glNamedRenderbufferStorage"u8); + Native.glNamedRenderbufferStorageMultisample = (glNamedRenderbufferStorageMultisample)loader( + "glNamedRenderbufferStorageMultisample"u8 + ); + Native.glGetNamedRenderbufferParameteriv = (glGetNamedRenderbufferParameteriv)loader( + "glGetNamedRenderbufferParameteriv"u8 + ); + Native.glCreateTextures = (glCreateTextures)loader("glCreateTextures"u8); + Native.glTextureBuffer = (glTextureBuffer)loader("glTextureBuffer"u8); + Native.glTextureBufferRange = (glTextureBufferRange)loader("glTextureBufferRange"u8); + Native.glTextureStorage1D = (glTextureStorage1D)loader("glTextureStorage1D"u8); + Native.glTextureStorage2D = (glTextureStorage2D)loader("glTextureStorage2D"u8); + Native.glTextureStorage3D = (glTextureStorage3D)loader("glTextureStorage3D"u8); + Native.glTextureStorage2DMultisample = (glTextureStorage2DMultisample)loader( + "glTextureStorage2DMultisample"u8 + ); + Native.glTextureStorage3DMultisample = (glTextureStorage3DMultisample)loader( + "glTextureStorage3DMultisample"u8 + ); + Native.glTextureSubImage1D = (glTextureSubImage1D)loader("glTextureSubImage1D"u8); + Native.glTextureSubImage2D = (glTextureSubImage2D)loader("glTextureSubImage2D"u8); + Native.glTextureSubImage3D = (glTextureSubImage3D)loader("glTextureSubImage3D"u8); + Native.glCompressedTextureSubImage1D = (glCompressedTextureSubImage1D)loader( + "glCompressedTextureSubImage1D"u8 + ); + Native.glCompressedTextureSubImage2D = (glCompressedTextureSubImage2D)loader( + "glCompressedTextureSubImage2D"u8 + ); + Native.glCompressedTextureSubImage3D = (glCompressedTextureSubImage3D)loader( + "glCompressedTextureSubImage3D"u8 + ); + Native.glCopyTextureSubImage1D = (glCopyTextureSubImage1D)loader("glCopyTextureSubImage1D"u8); + Native.glCopyTextureSubImage2D = (glCopyTextureSubImage2D)loader("glCopyTextureSubImage2D"u8); + Native.glCopyTextureSubImage3D = (glCopyTextureSubImage3D)loader("glCopyTextureSubImage3D"u8); + Native.glTextureParameterf = (glTextureParameterf)loader("glTextureParameterf"u8); + Native.glTextureParameterfv = (glTextureParameterfv)loader("glTextureParameterfv"u8); + Native.glTextureParameteri = (glTextureParameteri)loader("glTextureParameteri"u8); + Native.glTextureParameterIiv = (glTextureParameterIiv)loader("glTextureParameterIiv"u8); + Native.glTextureParameterIuiv = (glTextureParameterIuiv)loader("glTextureParameterIuiv"u8); + Native.glTextureParameteriv = (glTextureParameteriv)loader("glTextureParameteriv"u8); + Native.glGenerateTextureMipmap = (glGenerateTextureMipmap)loader("glGenerateTextureMipmap"u8); + Native.glBindTextureUnit = (glBindTextureUnit)loader("glBindTextureUnit"u8); + Native.glGetTextureImage = (glGetTextureImage)loader("glGetTextureImage"u8); + Native.glGetCompressedTextureImage = (glGetCompressedTextureImage)loader("glGetCompressedTextureImage"u8); + Native.glGetTextureLevelParameterfv = (glGetTextureLevelParameterfv)loader( + "glGetTextureLevelParameterfv"u8 + ); + Native.glGetTextureLevelParameteriv = (glGetTextureLevelParameteriv)loader( + "glGetTextureLevelParameteriv"u8 + ); + Native.glGetTextureParameterfv = (glGetTextureParameterfv)loader("glGetTextureParameterfv"u8); + Native.glGetTextureParameterIiv = (glGetTextureParameterIiv)loader("glGetTextureParameterIiv"u8); + Native.glGetTextureParameterIuiv = (glGetTextureParameterIuiv)loader("glGetTextureParameterIuiv"u8); + Native.glGetTextureParameteriv = (glGetTextureParameteriv)loader("glGetTextureParameteriv"u8); + Native.glCreateVertexArrays = (glCreateVertexArrays)loader("glCreateVertexArrays"u8); + Native.glDisableVertexArrayAttrib = (glDisableVertexArrayAttrib)loader("glDisableVertexArrayAttrib"u8); + Native.glEnableVertexArrayAttrib = (glEnableVertexArrayAttrib)loader("glEnableVertexArrayAttrib"u8); + Native.glVertexArrayElementBuffer = (glVertexArrayElementBuffer)loader("glVertexArrayElementBuffer"u8); + Native.glVertexArrayVertexBuffer = (glVertexArrayVertexBuffer)loader("glVertexArrayVertexBuffer"u8); + Native.glVertexArrayVertexBuffers = (glVertexArrayVertexBuffers)loader("glVertexArrayVertexBuffers"u8); + Native.glVertexArrayAttribBinding = (glVertexArrayAttribBinding)loader("glVertexArrayAttribBinding"u8); + Native.glVertexArrayAttribFormat = (glVertexArrayAttribFormat)loader("glVertexArrayAttribFormat"u8); + Native.glVertexArrayAttribIFormat = (glVertexArrayAttribIFormat)loader("glVertexArrayAttribIFormat"u8); + Native.glVertexArrayAttribLFormat = (glVertexArrayAttribLFormat)loader("glVertexArrayAttribLFormat"u8); + Native.glVertexArrayBindingDivisor = (glVertexArrayBindingDivisor)loader("glVertexArrayBindingDivisor"u8); + Native.glGetVertexArrayiv = (glGetVertexArrayiv)loader("glGetVertexArrayiv"u8); + Native.glGetVertexArrayIndexediv = (glGetVertexArrayIndexediv)loader("glGetVertexArrayIndexediv"u8); + Native.glGetVertexArrayIndexed64iv = (glGetVertexArrayIndexed64iv)loader("glGetVertexArrayIndexed64iv"u8); + Native.glCreateSamplers = (glCreateSamplers)loader("glCreateSamplers"u8); + Native.glCreateProgramPipelines = (glCreateProgramPipelines)loader("glCreateProgramPipelines"u8); + Native.glCreateQueries = (glCreateQueries)loader("glCreateQueries"u8); + Native.glGetQueryBufferObjecti64v = (glGetQueryBufferObjecti64v)loader("glGetQueryBufferObjecti64v"u8); + Native.glGetQueryBufferObjectiv = (glGetQueryBufferObjectiv)loader("glGetQueryBufferObjectiv"u8); + Native.glGetQueryBufferObjectui64v = (glGetQueryBufferObjectui64v)loader("glGetQueryBufferObjectui64v"u8); + Native.glGetQueryBufferObjectuiv = (glGetQueryBufferObjectuiv)loader("glGetQueryBufferObjectuiv"u8); + Native.glMemoryBarrierByRegion = (glMemoryBarrierByRegion)loader("glMemoryBarrierByRegion"u8); + Native.glGetTextureSubImage = (glGetTextureSubImage)loader("glGetTextureSubImage"u8); + Native.glGetCompressedTextureSubImage = (glGetCompressedTextureSubImage)loader( + "glGetCompressedTextureSubImage"u8 + ); + Native.glGetGraphicsResetStatus = (glGetGraphicsResetStatus)loader("glGetGraphicsResetStatus"u8); + Native.glGetnCompressedTexImage = (glGetnCompressedTexImage)loader("glGetnCompressedTexImage"u8); + Native.glGetnTexImage = (glGetnTexImage)loader("glGetnTexImage"u8); + Native.glGetnUniformdv = (glGetnUniformdv)loader("glGetnUniformdv"u8); + Native.glGetnUniformfv = (glGetnUniformfv)loader("glGetnUniformfv"u8); + Native.glGetnUniformiv = (glGetnUniformiv)loader("glGetnUniformiv"u8); + Native.glGetnUniformuiv = (glGetnUniformuiv)loader("glGetnUniformuiv"u8); + Native.glReadnPixels = (glReadnPixels)loader("glReadnPixels"u8); + Native.glGetnMapdv = (glGetnMapdv)loader("glGetnMapdv"u8); + Native.glGetnMapfv = (glGetnMapfv)loader("glGetnMapfv"u8); + Native.glGetnMapiv = (glGetnMapiv)loader("glGetnMapiv"u8); + Native.glGetnPixelMapfv = (glGetnPixelMapfv)loader("glGetnPixelMapfv"u8); + Native.glGetnPixelMapuiv = (glGetnPixelMapuiv)loader("glGetnPixelMapuiv"u8); + Native.glGetnPixelMapusv = (glGetnPixelMapusv)loader("glGetnPixelMapusv"u8); + Native.glGetnPolygonStipple = (glGetnPolygonStipple)loader("glGetnPolygonStipple"u8); + Native.glGetnColorTable = (glGetnColorTable)loader("glGetnColorTable"u8); + Native.glGetnConvolutionFilter = (glGetnConvolutionFilter)loader("glGetnConvolutionFilter"u8); + Native.glGetnSeparableFilter = (glGetnSeparableFilter)loader("glGetnSeparableFilter"u8); + Native.glGetnHistogram = (glGetnHistogram)loader("glGetnHistogram"u8); + Native.glGetnMinmax = (glGetnMinmax)loader("glGetnMinmax"u8); + Native.glTextureBarrier = (glTextureBarrier)loader("glTextureBarrier"u8); + Native.glSpecializeShader = (glSpecializeShader)loader("glSpecializeShader"u8); + Native.glMultiDrawArraysIndirectCount = (glMultiDrawArraysIndirectCount)loader( + "glMultiDrawArraysIndirectCount"u8 + ); + Native.glMultiDrawElementsIndirectCount = (glMultiDrawElementsIndirectCount)loader( + "glMultiDrawElementsIndirectCount"u8 + ); + Native.glPolygonOffsetClamp = (glPolygonOffsetClamp)loader("glPolygonOffsetClamp"u8); + } + + public static unsafe partial class Native + { + /// glCullFace on khronos.org + public static glCullFace glCullFace; + + /// glFrontFace on khronos.org + public static glFrontFace glFrontFace; + + /// glHint on khronos.org + public static glHint glHint; + + /// glLineWidth on khronos.org + public static glLineWidth glLineWidth; + + /// glPointSize on khronos.org + public static glPointSize glPointSize; + + /// glPolygonMode on khronos.org + public static glPolygonMode glPolygonMode; + + /// glScissor on khronos.org + public static glScissor glScissor; + + /// glTexParameterf on khronos.org + public static glTexParameterf glTexParameterf; + + /// glTexParameterfv on khronos.org + public static glTexParameterfv glTexParameterfv; + + /// glTexParameteri on khronos.org + public static glTexParameteri glTexParameteri; + + /// glTexParameteriv on khronos.org + public static glTexParameteriv glTexParameteriv; + + /// glTexImage1D on khronos.org + public static glTexImage1D glTexImage1D; + + /// glTexImage2D on khronos.org + public static glTexImage2D glTexImage2D; + + /// glDrawBuffer on khronos.org + public static glDrawBuffer glDrawBuffer; + + /// glClear on khronos.org + public static glClear glClear; + + /// glClearColor on khronos.org + public static glClearColor glClearColor; + + /// glClearStencil on khronos.org + public static glClearStencil glClearStencil; + + /// glClearDepth on khronos.org + public static glClearDepth glClearDepth; + + /// glStencilMask on khronos.org + public static glStencilMask glStencilMask; + + /// glColorMask on khronos.org + public static glColorMask glColorMask; + + /// glDepthMask on khronos.org + public static glDepthMask glDepthMask; + + /// glDisable on khronos.org + public static glDisable glDisable; + + /// glEnable on khronos.org + public static glEnable glEnable; + + /// glFinish on khronos.org + public static glFinish glFinish; + + /// glFlush on khronos.org + public static glFlush glFlush; + + /// glBlendFunc on khronos.org + public static glBlendFunc glBlendFunc; + + /// glLogicOp on khronos.org + public static glLogicOp glLogicOp; + + /// glStencilFunc on khronos.org + public static glStencilFunc glStencilFunc; + + /// glStencilOp on khronos.org + public static glStencilOp glStencilOp; + + /// glDepthFunc on khronos.org + public static glDepthFunc glDepthFunc; + + /// glPixelStoref on khronos.org + public static glPixelStoref glPixelStoref; + + /// glPixelStorei on khronos.org + public static glPixelStorei glPixelStorei; + + /// glReadBuffer on khronos.org + public static glReadBuffer glReadBuffer; + + /// glReadPixels on khronos.org + public static glReadPixels glReadPixels; + + /// glGetBooleanv on khronos.org + public static glGetBooleanv glGetBooleanv; + + /// glGetDoublev on khronos.org + public static glGetDoublev glGetDoublev; + + /// glGetError on khronos.org + public static glGetError glGetError; + + /// glGetFloatv on khronos.org + public static glGetFloatv glGetFloatv; + + /// glGetIntegerv on khronos.org + public static glGetIntegerv glGetIntegerv; + + /// glGetString on khronos.org + public static glGetString glGetString; + + /// glGetTexImage on khronos.org + public static glGetTexImage glGetTexImage; + + /// glGetTexParameterfv on khronos.org + public static glGetTexParameterfv glGetTexParameterfv; + + /// glGetTexParameteriv on khronos.org + public static glGetTexParameteriv glGetTexParameteriv; + + /// glGetTexLevelParameterfv on khronos.org + public static glGetTexLevelParameterfv glGetTexLevelParameterfv; + + /// glGetTexLevelParameteriv on khronos.org + public static glGetTexLevelParameteriv glGetTexLevelParameteriv; + + /// glIsEnabled on khronos.org + public static glIsEnabled glIsEnabled; + + /// glDepthRange on khronos.org + public static glDepthRange glDepthRange; + + /// glViewport on khronos.org + public static glViewport glViewport; + + /// glDrawArrays on khronos.org + public static glDrawArrays glDrawArrays; + + /// glDrawElements on khronos.org + public static glDrawElements glDrawElements; + + /// glPolygonOffset on khronos.org + public static glPolygonOffset glPolygonOffset; + + /// glCopyTexImage1D on khronos.org + public static glCopyTexImage1D glCopyTexImage1D; + + /// glCopyTexImage2D on khronos.org + public static glCopyTexImage2D glCopyTexImage2D; + + /// glCopyTexSubImage1D on khronos.org + public static glCopyTexSubImage1D glCopyTexSubImage1D; + + /// glCopyTexSubImage2D on khronos.org + public static glCopyTexSubImage2D glCopyTexSubImage2D; + + /// glTexSubImage1D on khronos.org + public static glTexSubImage1D glTexSubImage1D; + + /// glTexSubImage2D on khronos.org + public static glTexSubImage2D glTexSubImage2D; + + /// glBindTexture on khronos.org + public static glBindTexture glBindTexture; + + /// glDeleteTextures on khronos.org + public static glDeleteTextures glDeleteTextures; + + /// glGenTextures on khronos.org + public static glGenTextures glGenTextures; + + /// glIsTexture on khronos.org + public static glIsTexture glIsTexture; + + /// glDrawRangeElements on khronos.org + public static glDrawRangeElements glDrawRangeElements; + + /// glTexImage3D on khronos.org + public static glTexImage3D glTexImage3D; + + /// glTexSubImage3D on khronos.org + public static glTexSubImage3D glTexSubImage3D; + + /// glCopyTexSubImage3D on khronos.org + public static glCopyTexSubImage3D glCopyTexSubImage3D; + + /// glActiveTexture on khronos.org + public static glActiveTexture glActiveTexture; + + /// glSampleCoverage on khronos.org + public static glSampleCoverage glSampleCoverage; + + /// glCompressedTexImage3D on khronos.org + public static glCompressedTexImage3D glCompressedTexImage3D; + + /// glCompressedTexImage2D on khronos.org + public static glCompressedTexImage2D glCompressedTexImage2D; + + /// glCompressedTexImage1D on khronos.org + public static glCompressedTexImage1D glCompressedTexImage1D; + + /// glCompressedTexSubImage3D on khronos.org + public static glCompressedTexSubImage3D glCompressedTexSubImage3D; + + /// glCompressedTexSubImage2D on khronos.org + public static glCompressedTexSubImage2D glCompressedTexSubImage2D; + + /// glCompressedTexSubImage1D on khronos.org + public static glCompressedTexSubImage1D glCompressedTexSubImage1D; + + /// glGetCompressedTexImage on khronos.org + public static glGetCompressedTexImage glGetCompressedTexImage; + + /// glBlendFuncSeparate on khronos.org + public static glBlendFuncSeparate glBlendFuncSeparate; + + /// glMultiDrawArrays on khronos.org + public static glMultiDrawArrays glMultiDrawArrays; + + /// glMultiDrawElements on khronos.org + public static glMultiDrawElements glMultiDrawElements; + + /// glPointParameterf on khronos.org + public static glPointParameterf glPointParameterf; + + /// glPointParameterfv on khronos.org + public static glPointParameterfv glPointParameterfv; + + /// glPointParameteri on khronos.org + public static glPointParameteri glPointParameteri; + + /// glPointParameteriv on khronos.org + public static glPointParameteriv glPointParameteriv; + + /// glBlendColor on khronos.org + public static glBlendColor glBlendColor; + + /// glBlendEquation on khronos.org + public static glBlendEquation glBlendEquation; + + /// glGenQueries on khronos.org + public static glGenQueries glGenQueries; + + /// glDeleteQueries on khronos.org + public static glDeleteQueries glDeleteQueries; + + /// glIsQuery on khronos.org + public static glIsQuery glIsQuery; + + /// glBeginQuery on khronos.org + public static glBeginQuery glBeginQuery; + + /// glEndQuery on khronos.org + public static glEndQuery glEndQuery; + + /// glGetQueryiv on khronos.org + public static glGetQueryiv glGetQueryiv; + + /// glGetQueryObjectiv on khronos.org + public static glGetQueryObjectiv glGetQueryObjectiv; + + /// glGetQueryObjectuiv on khronos.org + public static glGetQueryObjectuiv glGetQueryObjectuiv; + + /// glBindBuffer on khronos.org + public static glBindBuffer glBindBuffer; + + /// glDeleteBuffers on khronos.org + public static glDeleteBuffers glDeleteBuffers; + + /// glGenBuffers on khronos.org + public static glGenBuffers glGenBuffers; + + /// glIsBuffer on khronos.org + public static glIsBuffer glIsBuffer; + + /// glBufferData on khronos.org + public static glBufferData glBufferData; + + /// glBufferSubData on khronos.org + public static glBufferSubData glBufferSubData; + + /// glGetBufferSubData on khronos.org + public static glGetBufferSubData glGetBufferSubData; + + /// glMapBuffer on khronos.org + public static glMapBuffer glMapBuffer; + + /// glUnmapBuffer on khronos.org + public static glUnmapBuffer glUnmapBuffer; + + /// glGetBufferParameteriv on khronos.org + public static glGetBufferParameteriv glGetBufferParameteriv; + + /// glGetBufferPointerv on khronos.org + public static glGetBufferPointerv glGetBufferPointerv; + + /// glBlendEquationSeparate on khronos.org + public static glBlendEquationSeparate glBlendEquationSeparate; + + /// glDrawBuffers on khronos.org + public static glDrawBuffers glDrawBuffers; + + /// glStencilOpSeparate on khronos.org + public static glStencilOpSeparate glStencilOpSeparate; + + /// glStencilFuncSeparate on khronos.org + public static glStencilFuncSeparate glStencilFuncSeparate; + + /// glStencilMaskSeparate on khronos.org + public static glStencilMaskSeparate glStencilMaskSeparate; + + /// glAttachShader on khronos.org + public static glAttachShader glAttachShader; + + /// glBindAttribLocation on khronos.org + public static glBindAttribLocation glBindAttribLocation; + + /// glCompileShader on khronos.org + public static glCompileShader glCompileShader; + + /// glCreateProgram on khronos.org + public static glCreateProgram glCreateProgram; + + /// glCreateShader on khronos.org + public static glCreateShader glCreateShader; + + /// glDeleteProgram on khronos.org + public static glDeleteProgram glDeleteProgram; + + /// glDeleteShader on khronos.org + public static glDeleteShader glDeleteShader; + + /// glDetachShader on khronos.org + public static glDetachShader glDetachShader; + + /// glDisableVertexAttribArray on khronos.org + public static glDisableVertexAttribArray glDisableVertexAttribArray; + + /// glEnableVertexAttribArray on khronos.org + public static glEnableVertexAttribArray glEnableVertexAttribArray; + + /// glGetActiveAttrib on khronos.org + public static glGetActiveAttrib glGetActiveAttrib; + + /// glGetActiveUniform on khronos.org + public static glGetActiveUniform glGetActiveUniform; + + /// glGetAttachedShaders on khronos.org + public static glGetAttachedShaders glGetAttachedShaders; + + /// glGetAttribLocation on khronos.org + public static glGetAttribLocation glGetAttribLocation; + + /// glGetProgramiv on khronos.org + public static glGetProgramiv glGetProgramiv; + + /// glGetProgramInfoLog on khronos.org + public static glGetProgramInfoLog glGetProgramInfoLog; + + /// glGetShaderiv on khronos.org + public static glGetShaderiv glGetShaderiv; + + /// glGetShaderInfoLog on khronos.org + public static glGetShaderInfoLog glGetShaderInfoLog; + + /// glGetShaderSource on khronos.org + public static glGetShaderSource glGetShaderSource; + + /// glGetUniformLocation on khronos.org + public static glGetUniformLocation glGetUniformLocation; + + /// glGetUniformfv on khronos.org + public static glGetUniformfv glGetUniformfv; + + /// glGetUniformiv on khronos.org + public static glGetUniformiv glGetUniformiv; + + /// glGetVertexAttribdv on khronos.org + public static glGetVertexAttribdv glGetVertexAttribdv; + + /// glGetVertexAttribfv on khronos.org + public static glGetVertexAttribfv glGetVertexAttribfv; + + /// glGetVertexAttribiv on khronos.org + public static glGetVertexAttribiv glGetVertexAttribiv; + + /// glGetVertexAttribPointerv on khronos.org + public static glGetVertexAttribPointerv glGetVertexAttribPointerv; + + /// glIsProgram on khronos.org + public static glIsProgram glIsProgram; + + /// glIsShader on khronos.org + public static glIsShader glIsShader; + + /// glLinkProgram on khronos.org + public static glLinkProgram glLinkProgram; + + /// glShaderSource on khronos.org + public static glShaderSource glShaderSource; + + /// glUseProgram on khronos.org + public static glUseProgram glUseProgram; + + /// glUniform1f on khronos.org + public static glUniform1f glUniform1f; + + /// glUniform2f on khronos.org + public static glUniform2f glUniform2f; + + /// glUniform3f on khronos.org + public static glUniform3f glUniform3f; + + /// glUniform4f on khronos.org + public static glUniform4f glUniform4f; + + /// glUniform1i on khronos.org + public static glUniform1i glUniform1i; + + /// glUniform2i on khronos.org + public static glUniform2i glUniform2i; + + /// glUniform3i on khronos.org + public static glUniform3i glUniform3i; + + /// glUniform4i on khronos.org + public static glUniform4i glUniform4i; + + /// glUniform1fv on khronos.org + public static glUniform1fv glUniform1fv; + + /// glUniform2fv on khronos.org + public static glUniform2fv glUniform2fv; + + /// glUniform3fv on khronos.org + public static glUniform3fv glUniform3fv; + + /// glUniform4fv on khronos.org + public static glUniform4fv glUniform4fv; + + /// glUniform1iv on khronos.org + public static glUniform1iv glUniform1iv; + + /// glUniform2iv on khronos.org + public static glUniform2iv glUniform2iv; + + /// glUniform3iv on khronos.org + public static glUniform3iv glUniform3iv; + + /// glUniform4iv on khronos.org + public static glUniform4iv glUniform4iv; + + /// glUniformMatrix2fv on khronos.org + public static glUniformMatrix2fv glUniformMatrix2fv; + + /// glUniformMatrix3fv on khronos.org + public static glUniformMatrix3fv glUniformMatrix3fv; + + /// glUniformMatrix4fv on khronos.org + public static glUniformMatrix4fv glUniformMatrix4fv; + + /// glValidateProgram on khronos.org + public static glValidateProgram glValidateProgram; + + /// glVertexAttrib1d on khronos.org + public static glVertexAttrib1d glVertexAttrib1d; + + /// glVertexAttrib1dv on khronos.org + public static glVertexAttrib1dv glVertexAttrib1dv; + + /// glVertexAttrib1f on khronos.org + public static glVertexAttrib1f glVertexAttrib1f; + + /// glVertexAttrib1fv on khronos.org + public static glVertexAttrib1fv glVertexAttrib1fv; + + /// glVertexAttrib1s on khronos.org + public static glVertexAttrib1s glVertexAttrib1s; + + /// glVertexAttrib1sv on khronos.org + public static glVertexAttrib1sv glVertexAttrib1sv; + + /// glVertexAttrib2d on khronos.org + public static glVertexAttrib2d glVertexAttrib2d; + + /// glVertexAttrib2dv on khronos.org + public static glVertexAttrib2dv glVertexAttrib2dv; + + /// glVertexAttrib2f on khronos.org + public static glVertexAttrib2f glVertexAttrib2f; + + /// glVertexAttrib2fv on khronos.org + public static glVertexAttrib2fv glVertexAttrib2fv; + + /// glVertexAttrib2s on khronos.org + public static glVertexAttrib2s glVertexAttrib2s; + + /// glVertexAttrib2sv on khronos.org + public static glVertexAttrib2sv glVertexAttrib2sv; + + /// glVertexAttrib3d on khronos.org + public static glVertexAttrib3d glVertexAttrib3d; + + /// glVertexAttrib3dv on khronos.org + public static glVertexAttrib3dv glVertexAttrib3dv; + + /// glVertexAttrib3f on khronos.org + public static glVertexAttrib3f glVertexAttrib3f; + + /// glVertexAttrib3fv on khronos.org + public static glVertexAttrib3fv glVertexAttrib3fv; + + /// glVertexAttrib3s on khronos.org + public static glVertexAttrib3s glVertexAttrib3s; + + /// glVertexAttrib3sv on khronos.org + public static glVertexAttrib3sv glVertexAttrib3sv; + + /// glVertexAttrib4Nbv on khronos.org + public static glVertexAttrib4Nbv glVertexAttrib4Nbv; + + /// glVertexAttrib4Niv on khronos.org + public static glVertexAttrib4Niv glVertexAttrib4Niv; + + /// glVertexAttrib4Nsv on khronos.org + public static glVertexAttrib4Nsv glVertexAttrib4Nsv; + + /// glVertexAttrib4Nub on khronos.org + public static glVertexAttrib4Nub glVertexAttrib4Nub; + + /// glVertexAttrib4Nubv on khronos.org + public static glVertexAttrib4Nubv glVertexAttrib4Nubv; + + /// glVertexAttrib4Nuiv on khronos.org + public static glVertexAttrib4Nuiv glVertexAttrib4Nuiv; + + /// glVertexAttrib4Nusv on khronos.org + public static glVertexAttrib4Nusv glVertexAttrib4Nusv; + + /// glVertexAttrib4bv on khronos.org + public static glVertexAttrib4bv glVertexAttrib4bv; + + /// glVertexAttrib4d on khronos.org + public static glVertexAttrib4d glVertexAttrib4d; + + /// glVertexAttrib4dv on khronos.org + public static glVertexAttrib4dv glVertexAttrib4dv; + + /// glVertexAttrib4f on khronos.org + public static glVertexAttrib4f glVertexAttrib4f; + + /// glVertexAttrib4fv on khronos.org + public static glVertexAttrib4fv glVertexAttrib4fv; + + /// glVertexAttrib4iv on khronos.org + public static glVertexAttrib4iv glVertexAttrib4iv; + + /// glVertexAttrib4s on khronos.org + public static glVertexAttrib4s glVertexAttrib4s; + + /// glVertexAttrib4sv on khronos.org + public static glVertexAttrib4sv glVertexAttrib4sv; + + /// glVertexAttrib4ubv on khronos.org + public static glVertexAttrib4ubv glVertexAttrib4ubv; + + /// glVertexAttrib4uiv on khronos.org + public static glVertexAttrib4uiv glVertexAttrib4uiv; + + /// glVertexAttrib4usv on khronos.org + public static glVertexAttrib4usv glVertexAttrib4usv; + + /// glVertexAttribPointer on khronos.org + public static glVertexAttribPointer glVertexAttribPointer; + + /// glUniformMatrix2x3fv on khronos.org + public static glUniformMatrix2x3fv glUniformMatrix2x3fv; + + /// glUniformMatrix3x2fv on khronos.org + public static glUniformMatrix3x2fv glUniformMatrix3x2fv; + + /// glUniformMatrix2x4fv on khronos.org + public static glUniformMatrix2x4fv glUniformMatrix2x4fv; + + /// glUniformMatrix4x2fv on khronos.org + public static glUniformMatrix4x2fv glUniformMatrix4x2fv; + + /// glUniformMatrix3x4fv on khronos.org + public static glUniformMatrix3x4fv glUniformMatrix3x4fv; + + /// glUniformMatrix4x3fv on khronos.org + public static glUniformMatrix4x3fv glUniformMatrix4x3fv; + + /// glColorMaski on khronos.org + public static glColorMaski glColorMaski; + + /// glGetBooleani_v on khronos.org + public static glGetBooleani_v glGetBooleani_v; + + /// glGetIntegeri_v on khronos.org + public static glGetIntegeri_v glGetIntegeri_v; + + /// glEnablei on khronos.org + public static glEnablei glEnablei; + + /// glDisablei on khronos.org + public static glDisablei glDisablei; + + /// glIsEnabledi on khronos.org + public static glIsEnabledi glIsEnabledi; + + /// glBeginTransformFeedback on khronos.org + public static glBeginTransformFeedback glBeginTransformFeedback; + + /// glEndTransformFeedback on khronos.org + public static glEndTransformFeedback glEndTransformFeedback; + + /// glBindBufferRange on khronos.org + public static glBindBufferRange glBindBufferRange; + + /// glBindBufferBase on khronos.org + public static glBindBufferBase glBindBufferBase; + + /// glTransformFeedbackVaryings on khronos.org + public static glTransformFeedbackVaryings glTransformFeedbackVaryings; + + /// glGetTransformFeedbackVarying on khronos.org + public static glGetTransformFeedbackVarying glGetTransformFeedbackVarying; + + /// glClampColor on khronos.org + public static glClampColor glClampColor; + + /// glBeginConditionalRender on khronos.org + public static glBeginConditionalRender glBeginConditionalRender; + + /// glEndConditionalRender on khronos.org + public static glEndConditionalRender glEndConditionalRender; + + /// glVertexAttribIPointer on khronos.org + public static glVertexAttribIPointer glVertexAttribIPointer; + + /// glGetVertexAttribIiv on khronos.org + public static glGetVertexAttribIiv glGetVertexAttribIiv; + + /// glGetVertexAttribIuiv on khronos.org + public static glGetVertexAttribIuiv glGetVertexAttribIuiv; + + /// glVertexAttribI1i on khronos.org + public static glVertexAttribI1i glVertexAttribI1i; + + /// glVertexAttribI2i on khronos.org + public static glVertexAttribI2i glVertexAttribI2i; + + /// glVertexAttribI3i on khronos.org + public static glVertexAttribI3i glVertexAttribI3i; + + /// glVertexAttribI4i on khronos.org + public static glVertexAttribI4i glVertexAttribI4i; + + /// glVertexAttribI1ui on khronos.org + public static glVertexAttribI1ui glVertexAttribI1ui; + + /// glVertexAttribI2ui on khronos.org + public static glVertexAttribI2ui glVertexAttribI2ui; + + /// glVertexAttribI3ui on khronos.org + public static glVertexAttribI3ui glVertexAttribI3ui; + + /// glVertexAttribI4ui on khronos.org + public static glVertexAttribI4ui glVertexAttribI4ui; + + /// glVertexAttribI1iv on khronos.org + public static glVertexAttribI1iv glVertexAttribI1iv; + + /// glVertexAttribI2iv on khronos.org + public static glVertexAttribI2iv glVertexAttribI2iv; + + /// glVertexAttribI3iv on khronos.org + public static glVertexAttribI3iv glVertexAttribI3iv; + + /// glVertexAttribI4iv on khronos.org + public static glVertexAttribI4iv glVertexAttribI4iv; + + /// glVertexAttribI1uiv on khronos.org + public static glVertexAttribI1uiv glVertexAttribI1uiv; + + /// glVertexAttribI2uiv on khronos.org + public static glVertexAttribI2uiv glVertexAttribI2uiv; + + /// glVertexAttribI3uiv on khronos.org + public static glVertexAttribI3uiv glVertexAttribI3uiv; + + /// glVertexAttribI4uiv on khronos.org + public static glVertexAttribI4uiv glVertexAttribI4uiv; + + /// glVertexAttribI4bv on khronos.org + public static glVertexAttribI4bv glVertexAttribI4bv; + + /// glVertexAttribI4sv on khronos.org + public static glVertexAttribI4sv glVertexAttribI4sv; + + /// glVertexAttribI4ubv on khronos.org + public static glVertexAttribI4ubv glVertexAttribI4ubv; + + /// glVertexAttribI4usv on khronos.org + public static glVertexAttribI4usv glVertexAttribI4usv; + + /// glGetUniformuiv on khronos.org + public static glGetUniformuiv glGetUniformuiv; + + /// glBindFragDataLocation on khronos.org + public static glBindFragDataLocation glBindFragDataLocation; + + /// glGetFragDataLocation on khronos.org + public static glGetFragDataLocation glGetFragDataLocation; + + /// glUniform1ui on khronos.org + public static glUniform1ui glUniform1ui; + + /// glUniform2ui on khronos.org + public static glUniform2ui glUniform2ui; + + /// glUniform3ui on khronos.org + public static glUniform3ui glUniform3ui; + + /// glUniform4ui on khronos.org + public static glUniform4ui glUniform4ui; + + /// glUniform1uiv on khronos.org + public static glUniform1uiv glUniform1uiv; + + /// glUniform2uiv on khronos.org + public static glUniform2uiv glUniform2uiv; + + /// glUniform3uiv on khronos.org + public static glUniform3uiv glUniform3uiv; + + /// glUniform4uiv on khronos.org + public static glUniform4uiv glUniform4uiv; + + /// glTexParameterIiv on khronos.org + public static glTexParameterIiv glTexParameterIiv; + + /// glTexParameterIuiv on khronos.org + public static glTexParameterIuiv glTexParameterIuiv; + + /// glGetTexParameterIiv on khronos.org + public static glGetTexParameterIiv glGetTexParameterIiv; + + /// glGetTexParameterIuiv on khronos.org + public static glGetTexParameterIuiv glGetTexParameterIuiv; + + /// glClearBufferiv on khronos.org + public static glClearBufferiv glClearBufferiv; + + /// glClearBufferuiv on khronos.org + public static glClearBufferuiv glClearBufferuiv; + + /// glClearBufferfv on khronos.org + public static glClearBufferfv glClearBufferfv; + + /// glClearBufferfi on khronos.org + public static glClearBufferfi glClearBufferfi; + + /// glGetStringi on khronos.org + public static glGetStringi glGetStringi; + + /// glIsRenderbuffer on khronos.org + public static glIsRenderbuffer glIsRenderbuffer; + + /// glBindRenderbuffer on khronos.org + public static glBindRenderbuffer glBindRenderbuffer; + + /// glDeleteRenderbuffers on khronos.org + public static glDeleteRenderbuffers glDeleteRenderbuffers; + + /// glGenRenderbuffers on khronos.org + public static glGenRenderbuffers glGenRenderbuffers; + + /// glRenderbufferStorage on khronos.org + public static glRenderbufferStorage glRenderbufferStorage; + + /// glGetRenderbufferParameteriv on khronos.org + public static glGetRenderbufferParameteriv glGetRenderbufferParameteriv; + + /// glIsFramebuffer on khronos.org + public static glIsFramebuffer glIsFramebuffer; + + /// glBindFramebuffer on khronos.org + public static glBindFramebuffer glBindFramebuffer; + + /// glDeleteFramebuffers on khronos.org + public static glDeleteFramebuffers glDeleteFramebuffers; + + /// glGenFramebuffers on khronos.org + public static glGenFramebuffers glGenFramebuffers; + + /// glCheckFramebufferStatus on khronos.org + public static glCheckFramebufferStatus glCheckFramebufferStatus; + + /// glFramebufferTexture1D on khronos.org + public static glFramebufferTexture1D glFramebufferTexture1D; + + /// glFramebufferTexture2D on khronos.org + public static glFramebufferTexture2D glFramebufferTexture2D; + + /// glFramebufferTexture3D on khronos.org + public static glFramebufferTexture3D glFramebufferTexture3D; + + /// glFramebufferRenderbuffer on khronos.org + public static glFramebufferRenderbuffer glFramebufferRenderbuffer; + + /// glGetFramebufferAttachmentParameteriv on khronos.org + public static glGetFramebufferAttachmentParameteriv glGetFramebufferAttachmentParameteriv; + + /// glGenerateMipmap on khronos.org + public static glGenerateMipmap glGenerateMipmap; + + /// glBlitFramebuffer on khronos.org + public static glBlitFramebuffer glBlitFramebuffer; + + /// glRenderbufferStorageMultisample on khronos.org + public static glRenderbufferStorageMultisample glRenderbufferStorageMultisample; + + /// glFramebufferTextureLayer on khronos.org + public static glFramebufferTextureLayer glFramebufferTextureLayer; + + /// glMapBufferRange on khronos.org + public static glMapBufferRange glMapBufferRange; + + /// glFlushMappedBufferRange on khronos.org + public static glFlushMappedBufferRange glFlushMappedBufferRange; + + /// glBindVertexArray on khronos.org + public static glBindVertexArray glBindVertexArray; + + /// glDeleteVertexArrays on khronos.org + public static glDeleteVertexArrays glDeleteVertexArrays; + + /// glGenVertexArrays on khronos.org + public static glGenVertexArrays glGenVertexArrays; + + /// glIsVertexArray on khronos.org + public static glIsVertexArray glIsVertexArray; + + /// glDrawArraysInstanced on khronos.org + public static glDrawArraysInstanced glDrawArraysInstanced; + + /// glDrawElementsInstanced on khronos.org + public static glDrawElementsInstanced glDrawElementsInstanced; + + /// glTexBuffer on khronos.org + public static glTexBuffer glTexBuffer; + + /// glPrimitiveRestartIndex on khronos.org + public static glPrimitiveRestartIndex glPrimitiveRestartIndex; + + /// glCopyBufferSubData on khronos.org + public static glCopyBufferSubData glCopyBufferSubData; + + /// glGetUniformIndices on khronos.org + public static glGetUniformIndices glGetUniformIndices; + + /// glGetActiveUniformsiv on khronos.org + public static glGetActiveUniformsiv glGetActiveUniformsiv; + + /// glGetActiveUniformName on khronos.org + public static glGetActiveUniformName glGetActiveUniformName; + + /// glGetUniformBlockIndex on khronos.org + public static glGetUniformBlockIndex glGetUniformBlockIndex; + + /// glGetActiveUniformBlockiv on khronos.org + public static glGetActiveUniformBlockiv glGetActiveUniformBlockiv; + + /// glGetActiveUniformBlockName on khronos.org + public static glGetActiveUniformBlockName glGetActiveUniformBlockName; + + /// glUniformBlockBinding on khronos.org + public static glUniformBlockBinding glUniformBlockBinding; + + /// glDrawElementsBaseVertex on khronos.org + public static glDrawElementsBaseVertex glDrawElementsBaseVertex; + + /// glDrawRangeElementsBaseVertex on khronos.org + public static glDrawRangeElementsBaseVertex glDrawRangeElementsBaseVertex; + + /// glDrawElementsInstancedBaseVertex on khronos.org + public static glDrawElementsInstancedBaseVertex glDrawElementsInstancedBaseVertex; + + /// glMultiDrawElementsBaseVertex on khronos.org + public static glMultiDrawElementsBaseVertex glMultiDrawElementsBaseVertex; + + /// glProvokingVertex on khronos.org + public static glProvokingVertex glProvokingVertex; + + /// glFenceSync on khronos.org + public static glFenceSync glFenceSync; + + /// glIsSync on khronos.org + public static glIsSync glIsSync; + + /// glDeleteSync on khronos.org + public static glDeleteSync glDeleteSync; + + /// glClientWaitSync on khronos.org + public static glClientWaitSync glClientWaitSync; + + /// glWaitSync on khronos.org + public static glWaitSync glWaitSync; + + /// glGetInteger64v on khronos.org + public static glGetInteger64v glGetInteger64v; + + /// glGetSynciv on khronos.org + public static glGetSynciv glGetSynciv; + + /// glGetInteger64i_v on khronos.org + public static glGetInteger64i_v glGetInteger64i_v; + + /// glGetBufferParameteri64v on khronos.org + public static glGetBufferParameteri64v glGetBufferParameteri64v; + + /// glFramebufferTexture on khronos.org + public static glFramebufferTexture glFramebufferTexture; + + /// glTexImage2DMultisample on khronos.org + public static glTexImage2DMultisample glTexImage2DMultisample; + + /// glTexImage3DMultisample on khronos.org + public static glTexImage3DMultisample glTexImage3DMultisample; + + /// glGetMultisamplefv on khronos.org + public static glGetMultisamplefv glGetMultisamplefv; + + /// glSampleMaski on khronos.org + public static glSampleMaski glSampleMaski; + + /// glBindFragDataLocationIndexed on khronos.org + public static glBindFragDataLocationIndexed glBindFragDataLocationIndexed; + + /// glGetFragDataIndex on khronos.org + public static glGetFragDataIndex glGetFragDataIndex; + + /// glGenSamplers on khronos.org + public static glGenSamplers glGenSamplers; + + /// glDeleteSamplers on khronos.org + public static glDeleteSamplers glDeleteSamplers; + + /// glIsSampler on khronos.org + public static glIsSampler glIsSampler; + + /// glBindSampler on khronos.org + public static glBindSampler glBindSampler; + + /// glSamplerParameteri on khronos.org + public static glSamplerParameteri glSamplerParameteri; + + /// glSamplerParameteriv on khronos.org + public static glSamplerParameteriv glSamplerParameteriv; + + /// glSamplerParameterf on khronos.org + public static glSamplerParameterf glSamplerParameterf; + + /// glSamplerParameterfv on khronos.org + public static glSamplerParameterfv glSamplerParameterfv; + + /// glSamplerParameterIiv on khronos.org + public static glSamplerParameterIiv glSamplerParameterIiv; + + /// glSamplerParameterIuiv on khronos.org + public static glSamplerParameterIuiv glSamplerParameterIuiv; + + /// glGetSamplerParameteriv on khronos.org + public static glGetSamplerParameteriv glGetSamplerParameteriv; + + /// glGetSamplerParameterIiv on khronos.org + public static glGetSamplerParameterIiv glGetSamplerParameterIiv; + + /// glGetSamplerParameterfv on khronos.org + public static glGetSamplerParameterfv glGetSamplerParameterfv; + + /// glGetSamplerParameterIuiv on khronos.org + public static glGetSamplerParameterIuiv glGetSamplerParameterIuiv; + + /// glQueryCounter on khronos.org + public static glQueryCounter glQueryCounter; + + /// glGetQueryObjecti64v on khronos.org + public static glGetQueryObjecti64v glGetQueryObjecti64v; + + /// glGetQueryObjectui64v on khronos.org + public static glGetQueryObjectui64v glGetQueryObjectui64v; + + /// glVertexAttribDivisor on khronos.org + public static glVertexAttribDivisor glVertexAttribDivisor; + + /// glVertexAttribP1ui on khronos.org + public static glVertexAttribP1ui glVertexAttribP1ui; + + /// glVertexAttribP1uiv on khronos.org + public static glVertexAttribP1uiv glVertexAttribP1uiv; + + /// glVertexAttribP2ui on khronos.org + public static glVertexAttribP2ui glVertexAttribP2ui; + + /// glVertexAttribP2uiv on khronos.org + public static glVertexAttribP2uiv glVertexAttribP2uiv; + + /// glVertexAttribP3ui on khronos.org + public static glVertexAttribP3ui glVertexAttribP3ui; + + /// glVertexAttribP3uiv on khronos.org + public static glVertexAttribP3uiv glVertexAttribP3uiv; + + /// glVertexAttribP4ui on khronos.org + public static glVertexAttribP4ui glVertexAttribP4ui; + + /// glVertexAttribP4uiv on khronos.org + public static glVertexAttribP4uiv glVertexAttribP4uiv; + + /// glVertexP2ui on khronos.org + public static glVertexP2ui glVertexP2ui; + + /// glVertexP2uiv on khronos.org + public static glVertexP2uiv glVertexP2uiv; + + /// glVertexP3ui on khronos.org + public static glVertexP3ui glVertexP3ui; + + /// glVertexP3uiv on khronos.org + public static glVertexP3uiv glVertexP3uiv; + + /// glVertexP4ui on khronos.org + public static glVertexP4ui glVertexP4ui; + + /// glVertexP4uiv on khronos.org + public static glVertexP4uiv glVertexP4uiv; + + /// glTexCoordP1ui on khronos.org + public static glTexCoordP1ui glTexCoordP1ui; + + /// glTexCoordP1uiv on khronos.org + public static glTexCoordP1uiv glTexCoordP1uiv; + + /// glTexCoordP2ui on khronos.org + public static glTexCoordP2ui glTexCoordP2ui; + + /// glTexCoordP2uiv on khronos.org + public static glTexCoordP2uiv glTexCoordP2uiv; + + /// glTexCoordP3ui on khronos.org + public static glTexCoordP3ui glTexCoordP3ui; + + /// glTexCoordP3uiv on khronos.org + public static glTexCoordP3uiv glTexCoordP3uiv; + + /// glTexCoordP4ui on khronos.org + public static glTexCoordP4ui glTexCoordP4ui; + + /// glTexCoordP4uiv on khronos.org + public static glTexCoordP4uiv glTexCoordP4uiv; + + /// glMultiTexCoordP1ui on khronos.org + public static glMultiTexCoordP1ui glMultiTexCoordP1ui; + + /// glMultiTexCoordP1uiv on khronos.org + public static glMultiTexCoordP1uiv glMultiTexCoordP1uiv; + + /// glMultiTexCoordP2ui on khronos.org + public static glMultiTexCoordP2ui glMultiTexCoordP2ui; + + /// glMultiTexCoordP2uiv on khronos.org + public static glMultiTexCoordP2uiv glMultiTexCoordP2uiv; + + /// glMultiTexCoordP3ui on khronos.org + public static glMultiTexCoordP3ui glMultiTexCoordP3ui; + + /// glMultiTexCoordP3uiv on khronos.org + public static glMultiTexCoordP3uiv glMultiTexCoordP3uiv; + + /// glMultiTexCoordP4ui on khronos.org + public static glMultiTexCoordP4ui glMultiTexCoordP4ui; + + /// glMultiTexCoordP4uiv on khronos.org + public static glMultiTexCoordP4uiv glMultiTexCoordP4uiv; + + /// glNormalP3ui on khronos.org + public static glNormalP3ui glNormalP3ui; + + /// glNormalP3uiv on khronos.org + public static glNormalP3uiv glNormalP3uiv; + + /// glColorP3ui on khronos.org + public static glColorP3ui glColorP3ui; + + /// glColorP3uiv on khronos.org + public static glColorP3uiv glColorP3uiv; + + /// glColorP4ui on khronos.org + public static glColorP4ui glColorP4ui; + + /// glColorP4uiv on khronos.org + public static glColorP4uiv glColorP4uiv; + + /// glSecondaryColorP3ui on khronos.org + public static glSecondaryColorP3ui glSecondaryColorP3ui; + + /// glSecondaryColorP3uiv on khronos.org + public static glSecondaryColorP3uiv glSecondaryColorP3uiv; + + /// glMinSampleShading on khronos.org + public static glMinSampleShading glMinSampleShading; + + /// glBlendEquationi on khronos.org + public static glBlendEquationi glBlendEquationi; + + /// glBlendEquationSeparatei on khronos.org + public static glBlendEquationSeparatei glBlendEquationSeparatei; + + /// glBlendFunci on khronos.org + public static glBlendFunci glBlendFunci; + + /// glBlendFuncSeparatei on khronos.org + public static glBlendFuncSeparatei glBlendFuncSeparatei; + + /// glDrawArraysIndirect on khronos.org + public static glDrawArraysIndirect glDrawArraysIndirect; + + /// glDrawElementsIndirect on khronos.org + public static glDrawElementsIndirect glDrawElementsIndirect; + + /// glUniform1d on khronos.org + public static glUniform1d glUniform1d; + + /// glUniform2d on khronos.org + public static glUniform2d glUniform2d; + + /// glUniform3d on khronos.org + public static glUniform3d glUniform3d; + + /// glUniform4d on khronos.org + public static glUniform4d glUniform4d; + + /// glUniform1dv on khronos.org + public static glUniform1dv glUniform1dv; + + /// glUniform2dv on khronos.org + public static glUniform2dv glUniform2dv; + + /// glUniform3dv on khronos.org + public static glUniform3dv glUniform3dv; + + /// glUniform4dv on khronos.org + public static glUniform4dv glUniform4dv; + + /// glUniformMatrix2dv on khronos.org + public static glUniformMatrix2dv glUniformMatrix2dv; + + /// glUniformMatrix3dv on khronos.org + public static glUniformMatrix3dv glUniformMatrix3dv; + + /// glUniformMatrix4dv on khronos.org + public static glUniformMatrix4dv glUniformMatrix4dv; + + /// glUniformMatrix2x3dv on khronos.org + public static glUniformMatrix2x3dv glUniformMatrix2x3dv; + + /// glUniformMatrix2x4dv on khronos.org + public static glUniformMatrix2x4dv glUniformMatrix2x4dv; + + /// glUniformMatrix3x2dv on khronos.org + public static glUniformMatrix3x2dv glUniformMatrix3x2dv; + + /// glUniformMatrix3x4dv on khronos.org + public static glUniformMatrix3x4dv glUniformMatrix3x4dv; + + /// glUniformMatrix4x2dv on khronos.org + public static glUniformMatrix4x2dv glUniformMatrix4x2dv; + + /// glUniformMatrix4x3dv on khronos.org + public static glUniformMatrix4x3dv glUniformMatrix4x3dv; + + /// glGetUniformdv on khronos.org + public static glGetUniformdv glGetUniformdv; + + /// glGetSubroutineUniformLocation on khronos.org + public static glGetSubroutineUniformLocation glGetSubroutineUniformLocation; + + /// glGetSubroutineIndex on khronos.org + public static glGetSubroutineIndex glGetSubroutineIndex; + + /// glGetActiveSubroutineUniformiv on khronos.org + public static glGetActiveSubroutineUniformiv glGetActiveSubroutineUniformiv; + + /// glGetActiveSubroutineUniformName on khronos.org + public static glGetActiveSubroutineUniformName glGetActiveSubroutineUniformName; + + /// glGetActiveSubroutineName on khronos.org + public static glGetActiveSubroutineName glGetActiveSubroutineName; + + /// glUniformSubroutinesuiv on khronos.org + public static glUniformSubroutinesuiv glUniformSubroutinesuiv; + + /// glGetUniformSubroutineuiv on khronos.org + public static glGetUniformSubroutineuiv glGetUniformSubroutineuiv; + + /// glGetProgramStageiv on khronos.org + public static glGetProgramStageiv glGetProgramStageiv; + + /// glPatchParameteri on khronos.org + public static glPatchParameteri glPatchParameteri; + + /// glPatchParameterfv on khronos.org + public static glPatchParameterfv glPatchParameterfv; + + /// glBindTransformFeedback on khronos.org + public static glBindTransformFeedback glBindTransformFeedback; + + /// glDeleteTransformFeedbacks on khronos.org + public static glDeleteTransformFeedbacks glDeleteTransformFeedbacks; + + /// glGenTransformFeedbacks on khronos.org + public static glGenTransformFeedbacks glGenTransformFeedbacks; + + /// glIsTransformFeedback on khronos.org + public static glIsTransformFeedback glIsTransformFeedback; + + /// glPauseTransformFeedback on khronos.org + public static glPauseTransformFeedback glPauseTransformFeedback; + + /// glResumeTransformFeedback on khronos.org + public static glResumeTransformFeedback glResumeTransformFeedback; + + /// glDrawTransformFeedback on khronos.org + public static glDrawTransformFeedback glDrawTransformFeedback; + + /// glDrawTransformFeedbackStream on khronos.org + public static glDrawTransformFeedbackStream glDrawTransformFeedbackStream; + + /// glBeginQueryIndexed on khronos.org + public static glBeginQueryIndexed glBeginQueryIndexed; + + /// glEndQueryIndexed on khronos.org + public static glEndQueryIndexed glEndQueryIndexed; + + /// glGetQueryIndexediv on khronos.org + public static glGetQueryIndexediv glGetQueryIndexediv; + + /// glReleaseShaderCompiler on khronos.org + public static glReleaseShaderCompiler glReleaseShaderCompiler; + + /// glShaderBinary on khronos.org + public static glShaderBinary glShaderBinary; + + /// glGetShaderPrecisionFormat on khronos.org + public static glGetShaderPrecisionFormat glGetShaderPrecisionFormat; + + /// glDepthRangef on khronos.org + public static glDepthRangef glDepthRangef; + + /// glClearDepthf on khronos.org + public static glClearDepthf glClearDepthf; + + /// glGetProgramBinary on khronos.org + public static glGetProgramBinary glGetProgramBinary; + + /// glProgramBinary on khronos.org + public static glProgramBinary glProgramBinary; + + /// glProgramParameteri on khronos.org + public static glProgramParameteri glProgramParameteri; + + /// glUseProgramStages on khronos.org + public static glUseProgramStages glUseProgramStages; + + /// glActiveShaderProgram on khronos.org + public static glActiveShaderProgram glActiveShaderProgram; + + /// glCreateShaderProgramv on khronos.org + public static glCreateShaderProgramv glCreateShaderProgramv; + + /// glBindProgramPipeline on khronos.org + public static glBindProgramPipeline glBindProgramPipeline; + + /// glDeleteProgramPipelines on khronos.org + public static glDeleteProgramPipelines glDeleteProgramPipelines; + + /// glGenProgramPipelines on khronos.org + public static glGenProgramPipelines glGenProgramPipelines; + + /// glIsProgramPipeline on khronos.org + public static glIsProgramPipeline glIsProgramPipeline; + + /// glGetProgramPipelineiv on khronos.org + public static glGetProgramPipelineiv glGetProgramPipelineiv; + + /// glProgramUniform1i on khronos.org + public static glProgramUniform1i glProgramUniform1i; + + /// glProgramUniform1iv on khronos.org + public static glProgramUniform1iv glProgramUniform1iv; + + /// glProgramUniform1f on khronos.org + public static glProgramUniform1f glProgramUniform1f; + + /// glProgramUniform1fv on khronos.org + public static glProgramUniform1fv glProgramUniform1fv; + + /// glProgramUniform1d on khronos.org + public static glProgramUniform1d glProgramUniform1d; + + /// glProgramUniform1dv on khronos.org + public static glProgramUniform1dv glProgramUniform1dv; + + /// glProgramUniform1ui on khronos.org + public static glProgramUniform1ui glProgramUniform1ui; + + /// glProgramUniform1uiv on khronos.org + public static glProgramUniform1uiv glProgramUniform1uiv; + + /// glProgramUniform2i on khronos.org + public static glProgramUniform2i glProgramUniform2i; + + /// glProgramUniform2iv on khronos.org + public static glProgramUniform2iv glProgramUniform2iv; + + /// glProgramUniform2f on khronos.org + public static glProgramUniform2f glProgramUniform2f; + + /// glProgramUniform2fv on khronos.org + public static glProgramUniform2fv glProgramUniform2fv; + + /// glProgramUniform2d on khronos.org + public static glProgramUniform2d glProgramUniform2d; + + /// glProgramUniform2dv on khronos.org + public static glProgramUniform2dv glProgramUniform2dv; + + /// glProgramUniform2ui on khronos.org + public static glProgramUniform2ui glProgramUniform2ui; + + /// glProgramUniform2uiv on khronos.org + public static glProgramUniform2uiv glProgramUniform2uiv; + + /// glProgramUniform3i on khronos.org + public static glProgramUniform3i glProgramUniform3i; + + /// glProgramUniform3iv on khronos.org + public static glProgramUniform3iv glProgramUniform3iv; + + /// glProgramUniform3f on khronos.org + public static glProgramUniform3f glProgramUniform3f; + + /// glProgramUniform3fv on khronos.org + public static glProgramUniform3fv glProgramUniform3fv; + + /// glProgramUniform3d on khronos.org + public static glProgramUniform3d glProgramUniform3d; + + /// glProgramUniform3dv on khronos.org + public static glProgramUniform3dv glProgramUniform3dv; + + /// glProgramUniform3ui on khronos.org + public static glProgramUniform3ui glProgramUniform3ui; + + /// glProgramUniform3uiv on khronos.org + public static glProgramUniform3uiv glProgramUniform3uiv; + + /// glProgramUniform4i on khronos.org + public static glProgramUniform4i glProgramUniform4i; + + /// glProgramUniform4iv on khronos.org + public static glProgramUniform4iv glProgramUniform4iv; + + /// glProgramUniform4f on khronos.org + public static glProgramUniform4f glProgramUniform4f; + + /// glProgramUniform4fv on khronos.org + public static glProgramUniform4fv glProgramUniform4fv; + + /// glProgramUniform4d on khronos.org + public static glProgramUniform4d glProgramUniform4d; + + /// glProgramUniform4dv on khronos.org + public static glProgramUniform4dv glProgramUniform4dv; + + /// glProgramUniform4ui on khronos.org + public static glProgramUniform4ui glProgramUniform4ui; + + /// glProgramUniform4uiv on khronos.org + public static glProgramUniform4uiv glProgramUniform4uiv; + + /// glProgramUniformMatrix2fv on khronos.org + public static glProgramUniformMatrix2fv glProgramUniformMatrix2fv; + + /// glProgramUniformMatrix3fv on khronos.org + public static glProgramUniformMatrix3fv glProgramUniformMatrix3fv; + + /// glProgramUniformMatrix4fv on khronos.org + public static glProgramUniformMatrix4fv glProgramUniformMatrix4fv; + + /// glProgramUniformMatrix2dv on khronos.org + public static glProgramUniformMatrix2dv glProgramUniformMatrix2dv; + + /// glProgramUniformMatrix3dv on khronos.org + public static glProgramUniformMatrix3dv glProgramUniformMatrix3dv; + + /// glProgramUniformMatrix4dv on khronos.org + public static glProgramUniformMatrix4dv glProgramUniformMatrix4dv; + + /// glProgramUniformMatrix2x3fv on khronos.org + public static glProgramUniformMatrix2x3fv glProgramUniformMatrix2x3fv; + + /// glProgramUniformMatrix3x2fv on khronos.org + public static glProgramUniformMatrix3x2fv glProgramUniformMatrix3x2fv; + + /// glProgramUniformMatrix2x4fv on khronos.org + public static glProgramUniformMatrix2x4fv glProgramUniformMatrix2x4fv; + + /// glProgramUniformMatrix4x2fv on khronos.org + public static glProgramUniformMatrix4x2fv glProgramUniformMatrix4x2fv; + + /// glProgramUniformMatrix3x4fv on khronos.org + public static glProgramUniformMatrix3x4fv glProgramUniformMatrix3x4fv; + + /// glProgramUniformMatrix4x3fv on khronos.org + public static glProgramUniformMatrix4x3fv glProgramUniformMatrix4x3fv; + + /// glProgramUniformMatrix2x3dv on khronos.org + public static glProgramUniformMatrix2x3dv glProgramUniformMatrix2x3dv; + + /// glProgramUniformMatrix3x2dv on khronos.org + public static glProgramUniformMatrix3x2dv glProgramUniformMatrix3x2dv; + + /// glProgramUniformMatrix2x4dv on khronos.org + public static glProgramUniformMatrix2x4dv glProgramUniformMatrix2x4dv; + + /// glProgramUniformMatrix4x2dv on khronos.org + public static glProgramUniformMatrix4x2dv glProgramUniformMatrix4x2dv; + + /// glProgramUniformMatrix3x4dv on khronos.org + public static glProgramUniformMatrix3x4dv glProgramUniformMatrix3x4dv; + + /// glProgramUniformMatrix4x3dv on khronos.org + public static glProgramUniformMatrix4x3dv glProgramUniformMatrix4x3dv; + + /// glValidateProgramPipeline on khronos.org + public static glValidateProgramPipeline glValidateProgramPipeline; + + /// glGetProgramPipelineInfoLog on khronos.org + public static glGetProgramPipelineInfoLog glGetProgramPipelineInfoLog; + + /// glVertexAttribL1d on khronos.org + public static glVertexAttribL1d glVertexAttribL1d; + + /// glVertexAttribL2d on khronos.org + public static glVertexAttribL2d glVertexAttribL2d; + + /// glVertexAttribL3d on khronos.org + public static glVertexAttribL3d glVertexAttribL3d; + + /// glVertexAttribL4d on khronos.org + public static glVertexAttribL4d glVertexAttribL4d; + + /// glVertexAttribL1dv on khronos.org + public static glVertexAttribL1dv glVertexAttribL1dv; + + /// glVertexAttribL2dv on khronos.org + public static glVertexAttribL2dv glVertexAttribL2dv; + + /// glVertexAttribL3dv on khronos.org + public static glVertexAttribL3dv glVertexAttribL3dv; + + /// glVertexAttribL4dv on khronos.org + public static glVertexAttribL4dv glVertexAttribL4dv; + + /// glVertexAttribLPointer on khronos.org + public static glVertexAttribLPointer glVertexAttribLPointer; + + /// glGetVertexAttribLdv on khronos.org + public static glGetVertexAttribLdv glGetVertexAttribLdv; + + /// glViewportArrayv on khronos.org + public static glViewportArrayv glViewportArrayv; + + /// glViewportIndexedf on khronos.org + public static glViewportIndexedf glViewportIndexedf; + + /// glViewportIndexedfv on khronos.org + public static glViewportIndexedfv glViewportIndexedfv; + + /// glScissorArrayv on khronos.org + public static glScissorArrayv glScissorArrayv; + + /// glScissorIndexed on khronos.org + public static glScissorIndexed glScissorIndexed; + + /// glScissorIndexedv on khronos.org + public static glScissorIndexedv glScissorIndexedv; + + /// glDepthRangeArrayv on khronos.org + public static glDepthRangeArrayv glDepthRangeArrayv; + + /// glDepthRangeIndexed on khronos.org + public static glDepthRangeIndexed glDepthRangeIndexed; + + /// glGetFloati_v on khronos.org + public static glGetFloati_v glGetFloati_v; + + /// glGetDoublei_v on khronos.org + public static glGetDoublei_v glGetDoublei_v; + + /// glDrawArraysInstancedBaseInstance on khronos.org + public static glDrawArraysInstancedBaseInstance glDrawArraysInstancedBaseInstance; + + /// glDrawElementsInstancedBaseInstance on khronos.org + public static glDrawElementsInstancedBaseInstance glDrawElementsInstancedBaseInstance; + + /// glDrawElementsInstancedBaseVertexBaseInstance on khronos.org + public static glDrawElementsInstancedBaseVertexBaseInstance glDrawElementsInstancedBaseVertexBaseInstance; + + /// glGetInternalformativ on khronos.org + public static glGetInternalformativ glGetInternalformativ; + + /// glGetActiveAtomicCounterBufferiv on khronos.org + public static glGetActiveAtomicCounterBufferiv glGetActiveAtomicCounterBufferiv; + + /// glBindImageTexture on khronos.org + public static glBindImageTexture glBindImageTexture; + + /// glMemoryBarrier on khronos.org + public static glMemoryBarrier glMemoryBarrier; + + /// glTexStorage1D on khronos.org + public static glTexStorage1D glTexStorage1D; + + /// glTexStorage2D on khronos.org + public static glTexStorage2D glTexStorage2D; + + /// glTexStorage3D on khronos.org + public static glTexStorage3D glTexStorage3D; + + /// glDrawTransformFeedbackInstanced on khronos.org + public static glDrawTransformFeedbackInstanced glDrawTransformFeedbackInstanced; + + /// glDrawTransformFeedbackStreamInstanced on khronos.org + public static glDrawTransformFeedbackStreamInstanced glDrawTransformFeedbackStreamInstanced; + + /// glClearBufferData on khronos.org + public static glClearBufferData glClearBufferData; + + /// glClearBufferSubData on khronos.org + public static glClearBufferSubData glClearBufferSubData; + + /// glDispatchCompute on khronos.org + public static glDispatchCompute glDispatchCompute; + + /// glDispatchComputeIndirect on khronos.org + public static glDispatchComputeIndirect glDispatchComputeIndirect; + + /// glCopyImageSubData on khronos.org + public static glCopyImageSubData glCopyImageSubData; + + /// glFramebufferParameteri on khronos.org + public static glFramebufferParameteri glFramebufferParameteri; + + /// glGetFramebufferParameteriv on khronos.org + public static glGetFramebufferParameteriv glGetFramebufferParameteriv; + + /// glGetInternalformati64v on khronos.org + public static glGetInternalformati64v glGetInternalformati64v; + + /// glInvalidateTexSubImage on khronos.org + public static glInvalidateTexSubImage glInvalidateTexSubImage; + + /// glInvalidateTexImage on khronos.org + public static glInvalidateTexImage glInvalidateTexImage; + + /// glInvalidateBufferSubData on khronos.org + public static glInvalidateBufferSubData glInvalidateBufferSubData; + + /// glInvalidateBufferData on khronos.org + public static glInvalidateBufferData glInvalidateBufferData; + + /// glInvalidateFramebuffer on khronos.org + public static glInvalidateFramebuffer glInvalidateFramebuffer; + + /// glInvalidateSubFramebuffer on khronos.org + public static glInvalidateSubFramebuffer glInvalidateSubFramebuffer; + + /// glMultiDrawArraysIndirect on khronos.org + public static glMultiDrawArraysIndirect glMultiDrawArraysIndirect; + + /// glMultiDrawElementsIndirect on khronos.org + public static glMultiDrawElementsIndirect glMultiDrawElementsIndirect; + + /// glGetProgramInterfaceiv on khronos.org + public static glGetProgramInterfaceiv glGetProgramInterfaceiv; + + /// glGetProgramResourceIndex on khronos.org + public static glGetProgramResourceIndex glGetProgramResourceIndex; + + /// glGetProgramResourceName on khronos.org + public static glGetProgramResourceName glGetProgramResourceName; + + /// glGetProgramResourceiv on khronos.org + public static glGetProgramResourceiv glGetProgramResourceiv; + + /// glGetProgramResourceLocation on khronos.org + public static glGetProgramResourceLocation glGetProgramResourceLocation; + + /// glGetProgramResourceLocationIndex on khronos.org + public static glGetProgramResourceLocationIndex glGetProgramResourceLocationIndex; + + /// glShaderStorageBlockBinding on khronos.org + public static glShaderStorageBlockBinding glShaderStorageBlockBinding; + + /// glTexBufferRange on khronos.org + public static glTexBufferRange glTexBufferRange; + + /// glTexStorage2DMultisample on khronos.org + public static glTexStorage2DMultisample glTexStorage2DMultisample; + + /// glTexStorage3DMultisample on khronos.org + public static glTexStorage3DMultisample glTexStorage3DMultisample; + + /// glTextureView on khronos.org + public static glTextureView glTextureView; + + /// glBindVertexBuffer on khronos.org + public static glBindVertexBuffer glBindVertexBuffer; + + /// glVertexAttribFormat on khronos.org + public static glVertexAttribFormat glVertexAttribFormat; + + /// glVertexAttribIFormat on khronos.org + public static glVertexAttribIFormat glVertexAttribIFormat; + + /// glVertexAttribLFormat on khronos.org + public static glVertexAttribLFormat glVertexAttribLFormat; + + /// glVertexAttribBinding on khronos.org + public static glVertexAttribBinding glVertexAttribBinding; + + /// glVertexBindingDivisor on khronos.org + public static glVertexBindingDivisor glVertexBindingDivisor; + + /// glDebugMessageControl on khronos.org + public static glDebugMessageControl glDebugMessageControl; + + /// glDebugMessageInsert on khronos.org + public static glDebugMessageInsert glDebugMessageInsert; + + /// glDebugMessageCallback on khronos.org + public static glDebugMessageCallback glDebugMessageCallback; + + /// glGetDebugMessageLog on khronos.org + public static glGetDebugMessageLog glGetDebugMessageLog; + + /// glPushDebugGroup on khronos.org + public static glPushDebugGroup glPushDebugGroup; + + /// glPopDebugGroup on khronos.org + public static glPopDebugGroup glPopDebugGroup; + + /// glObjectLabel on khronos.org + public static glObjectLabel glObjectLabel; + + /// glGetObjectLabel on khronos.org + public static glGetObjectLabel glGetObjectLabel; + + /// glObjectPtrLabel on khronos.org + public static glObjectPtrLabel glObjectPtrLabel; + + /// glGetObjectPtrLabel on khronos.org + public static glGetObjectPtrLabel glGetObjectPtrLabel; + + /// glGetPointerv on khronos.org + public static glGetPointerv glGetPointerv; + + /// glBufferStorage on khronos.org + public static glBufferStorage glBufferStorage; + + /// glClearTexImage on khronos.org + public static glClearTexImage glClearTexImage; + + /// glClearTexSubImage on khronos.org + public static glClearTexSubImage glClearTexSubImage; + + /// glBindBuffersBase on khronos.org + public static glBindBuffersBase glBindBuffersBase; + + /// glBindBuffersRange on khronos.org + public static glBindBuffersRange glBindBuffersRange; + + /// glBindTextures on khronos.org + public static glBindTextures glBindTextures; + + /// glBindSamplers on khronos.org + public static glBindSamplers glBindSamplers; + + /// glBindImageTextures on khronos.org + public static glBindImageTextures glBindImageTextures; + + /// glBindVertexBuffers on khronos.org + public static glBindVertexBuffers glBindVertexBuffers; + + /// glClipControl on khronos.org + public static glClipControl glClipControl; + + /// glCreateTransformFeedbacks on khronos.org + public static glCreateTransformFeedbacks glCreateTransformFeedbacks; + + /// glTransformFeedbackBufferBase on khronos.org + public static glTransformFeedbackBufferBase glTransformFeedbackBufferBase; + + /// glTransformFeedbackBufferRange on khronos.org + public static glTransformFeedbackBufferRange glTransformFeedbackBufferRange; + + /// glGetTransformFeedbackiv on khronos.org + public static glGetTransformFeedbackiv glGetTransformFeedbackiv; + + /// glGetTransformFeedbacki_v on khronos.org + public static glGetTransformFeedbacki_v glGetTransformFeedbacki_v; + + /// glGetTransformFeedbacki64_v on khronos.org + public static glGetTransformFeedbacki64_v glGetTransformFeedbacki64_v; + + /// glCreateBuffers on khronos.org + public static glCreateBuffers glCreateBuffers; + + /// glNamedBufferStorage on khronos.org + public static glNamedBufferStorage glNamedBufferStorage; + + /// glNamedBufferData on khronos.org + public static glNamedBufferData glNamedBufferData; + + /// glNamedBufferSubData on khronos.org + public static glNamedBufferSubData glNamedBufferSubData; + + /// glCopyNamedBufferSubData on khronos.org + public static glCopyNamedBufferSubData glCopyNamedBufferSubData; + + /// glClearNamedBufferData on khronos.org + public static glClearNamedBufferData glClearNamedBufferData; + + /// glClearNamedBufferSubData on khronos.org + public static glClearNamedBufferSubData glClearNamedBufferSubData; + + /// glMapNamedBuffer on khronos.org + public static glMapNamedBuffer glMapNamedBuffer; + + /// glMapNamedBufferRange on khronos.org + public static glMapNamedBufferRange glMapNamedBufferRange; + + /// glUnmapNamedBuffer on khronos.org + public static glUnmapNamedBuffer glUnmapNamedBuffer; + + /// glFlushMappedNamedBufferRange on khronos.org + public static glFlushMappedNamedBufferRange glFlushMappedNamedBufferRange; + + /// glGetNamedBufferParameteriv on khronos.org + public static glGetNamedBufferParameteriv glGetNamedBufferParameteriv; + + /// glGetNamedBufferParameteri64v on khronos.org + public static glGetNamedBufferParameteri64v glGetNamedBufferParameteri64v; + + /// glGetNamedBufferPointerv on khronos.org + public static glGetNamedBufferPointerv glGetNamedBufferPointerv; + + /// glGetNamedBufferSubData on khronos.org + public static glGetNamedBufferSubData glGetNamedBufferSubData; + + /// glCreateFramebuffers on khronos.org + public static glCreateFramebuffers glCreateFramebuffers; + + /// glNamedFramebufferRenderbuffer on khronos.org + public static glNamedFramebufferRenderbuffer glNamedFramebufferRenderbuffer; + + /// glNamedFramebufferParameteri on khronos.org + public static glNamedFramebufferParameteri glNamedFramebufferParameteri; + + /// glNamedFramebufferTexture on khronos.org + public static glNamedFramebufferTexture glNamedFramebufferTexture; + + /// glNamedFramebufferTextureLayer on khronos.org + public static glNamedFramebufferTextureLayer glNamedFramebufferTextureLayer; + + /// glNamedFramebufferDrawBuffer on khronos.org + public static glNamedFramebufferDrawBuffer glNamedFramebufferDrawBuffer; + + /// glNamedFramebufferDrawBuffers on khronos.org + public static glNamedFramebufferDrawBuffers glNamedFramebufferDrawBuffers; + + /// glNamedFramebufferReadBuffer on khronos.org + public static glNamedFramebufferReadBuffer glNamedFramebufferReadBuffer; + + /// glInvalidateNamedFramebufferData on khronos.org + public static glInvalidateNamedFramebufferData glInvalidateNamedFramebufferData; + + /// glInvalidateNamedFramebufferSubData on khronos.org + public static glInvalidateNamedFramebufferSubData glInvalidateNamedFramebufferSubData; + + /// glClearNamedFramebufferiv on khronos.org + public static glClearNamedFramebufferiv glClearNamedFramebufferiv; + + /// glClearNamedFramebufferuiv on khronos.org + public static glClearNamedFramebufferuiv glClearNamedFramebufferuiv; + + /// glClearNamedFramebufferfv on khronos.org + public static glClearNamedFramebufferfv glClearNamedFramebufferfv; + + /// glClearNamedFramebufferfi on khronos.org + public static glClearNamedFramebufferfi glClearNamedFramebufferfi; + + /// glBlitNamedFramebuffer on khronos.org + public static glBlitNamedFramebuffer glBlitNamedFramebuffer; + + /// glCheckNamedFramebufferStatus on khronos.org + public static glCheckNamedFramebufferStatus glCheckNamedFramebufferStatus; + + /// glGetNamedFramebufferParameteriv on khronos.org + public static glGetNamedFramebufferParameteriv glGetNamedFramebufferParameteriv; + + /// glGetNamedFramebufferAttachmentParameteriv on khronos.org + public static glGetNamedFramebufferAttachmentParameteriv glGetNamedFramebufferAttachmentParameteriv; + + /// glCreateRenderbuffers on khronos.org + public static glCreateRenderbuffers glCreateRenderbuffers; + + /// glNamedRenderbufferStorage on khronos.org + public static glNamedRenderbufferStorage glNamedRenderbufferStorage; + + /// glNamedRenderbufferStorageMultisample on khronos.org + public static glNamedRenderbufferStorageMultisample glNamedRenderbufferStorageMultisample; + + /// glGetNamedRenderbufferParameteriv on khronos.org + public static glGetNamedRenderbufferParameteriv glGetNamedRenderbufferParameteriv; + + /// glCreateTextures on khronos.org + public static glCreateTextures glCreateTextures; + + /// glTextureBuffer on khronos.org + public static glTextureBuffer glTextureBuffer; + + /// glTextureBufferRange on khronos.org + public static glTextureBufferRange glTextureBufferRange; + + /// glTextureStorage1D on khronos.org + public static glTextureStorage1D glTextureStorage1D; + + /// glTextureStorage2D on khronos.org + public static glTextureStorage2D glTextureStorage2D; + + /// glTextureStorage3D on khronos.org + public static glTextureStorage3D glTextureStorage3D; + + /// glTextureStorage2DMultisample on khronos.org + public static glTextureStorage2DMultisample glTextureStorage2DMultisample; + + /// glTextureStorage3DMultisample on khronos.org + public static glTextureStorage3DMultisample glTextureStorage3DMultisample; + + /// glTextureSubImage1D on khronos.org + public static glTextureSubImage1D glTextureSubImage1D; + + /// glTextureSubImage2D on khronos.org + public static glTextureSubImage2D glTextureSubImage2D; + + /// glTextureSubImage3D on khronos.org + public static glTextureSubImage3D glTextureSubImage3D; + + /// glCompressedTextureSubImage1D on khronos.org + public static glCompressedTextureSubImage1D glCompressedTextureSubImage1D; + + /// glCompressedTextureSubImage2D on khronos.org + public static glCompressedTextureSubImage2D glCompressedTextureSubImage2D; + + /// glCompressedTextureSubImage3D on khronos.org + public static glCompressedTextureSubImage3D glCompressedTextureSubImage3D; + + /// glCopyTextureSubImage1D on khronos.org + public static glCopyTextureSubImage1D glCopyTextureSubImage1D; + + /// glCopyTextureSubImage2D on khronos.org + public static glCopyTextureSubImage2D glCopyTextureSubImage2D; + + /// glCopyTextureSubImage3D on khronos.org + public static glCopyTextureSubImage3D glCopyTextureSubImage3D; + + /// glTextureParameterf on khronos.org + public static glTextureParameterf glTextureParameterf; + + /// glTextureParameterfv on khronos.org + public static glTextureParameterfv glTextureParameterfv; + + /// glTextureParameteri on khronos.org + public static glTextureParameteri glTextureParameteri; + + /// glTextureParameterIiv on khronos.org + public static glTextureParameterIiv glTextureParameterIiv; + + /// glTextureParameterIuiv on khronos.org + public static glTextureParameterIuiv glTextureParameterIuiv; + + /// glTextureParameteriv on khronos.org + public static glTextureParameteriv glTextureParameteriv; + + /// glGenerateTextureMipmap on khronos.org + public static glGenerateTextureMipmap glGenerateTextureMipmap; + + /// glBindTextureUnit on khronos.org + public static glBindTextureUnit glBindTextureUnit; + + /// glGetTextureImage on khronos.org + public static glGetTextureImage glGetTextureImage; + + /// glGetCompressedTextureImage on khronos.org + public static glGetCompressedTextureImage glGetCompressedTextureImage; + + /// glGetTextureLevelParameterfv on khronos.org + public static glGetTextureLevelParameterfv glGetTextureLevelParameterfv; + + /// glGetTextureLevelParameteriv on khronos.org + public static glGetTextureLevelParameteriv glGetTextureLevelParameteriv; + + /// glGetTextureParameterfv on khronos.org + public static glGetTextureParameterfv glGetTextureParameterfv; + + /// glGetTextureParameterIiv on khronos.org + public static glGetTextureParameterIiv glGetTextureParameterIiv; + + /// glGetTextureParameterIuiv on khronos.org + public static glGetTextureParameterIuiv glGetTextureParameterIuiv; + + /// glGetTextureParameteriv on khronos.org + public static glGetTextureParameteriv glGetTextureParameteriv; + + /// glCreateVertexArrays on khronos.org + public static glCreateVertexArrays glCreateVertexArrays; + + /// glDisableVertexArrayAttrib on khronos.org + public static glDisableVertexArrayAttrib glDisableVertexArrayAttrib; + + /// glEnableVertexArrayAttrib on khronos.org + public static glEnableVertexArrayAttrib glEnableVertexArrayAttrib; + + /// glVertexArrayElementBuffer on khronos.org + public static glVertexArrayElementBuffer glVertexArrayElementBuffer; + + /// glVertexArrayVertexBuffer on khronos.org + public static glVertexArrayVertexBuffer glVertexArrayVertexBuffer; + + /// glVertexArrayVertexBuffers on khronos.org + public static glVertexArrayVertexBuffers glVertexArrayVertexBuffers; + + /// glVertexArrayAttribBinding on khronos.org + public static glVertexArrayAttribBinding glVertexArrayAttribBinding; + + /// glVertexArrayAttribFormat on khronos.org + public static glVertexArrayAttribFormat glVertexArrayAttribFormat; + + /// glVertexArrayAttribIFormat on khronos.org + public static glVertexArrayAttribIFormat glVertexArrayAttribIFormat; + + /// glVertexArrayAttribLFormat on khronos.org + public static glVertexArrayAttribLFormat glVertexArrayAttribLFormat; + + /// glVertexArrayBindingDivisor on khronos.org + public static glVertexArrayBindingDivisor glVertexArrayBindingDivisor; + + /// glGetVertexArrayiv on khronos.org + public static glGetVertexArrayiv glGetVertexArrayiv; + + /// glGetVertexArrayIndexediv on khronos.org + public static glGetVertexArrayIndexediv glGetVertexArrayIndexediv; + + /// glGetVertexArrayIndexed64iv on khronos.org + public static glGetVertexArrayIndexed64iv glGetVertexArrayIndexed64iv; + + /// glCreateSamplers on khronos.org + public static glCreateSamplers glCreateSamplers; + + /// glCreateProgramPipelines on khronos.org + public static glCreateProgramPipelines glCreateProgramPipelines; + + /// glCreateQueries on khronos.org + public static glCreateQueries glCreateQueries; + + /// glGetQueryBufferObjecti64v on khronos.org + public static glGetQueryBufferObjecti64v glGetQueryBufferObjecti64v; + + /// glGetQueryBufferObjectiv on khronos.org + public static glGetQueryBufferObjectiv glGetQueryBufferObjectiv; + + /// glGetQueryBufferObjectui64v on khronos.org + public static glGetQueryBufferObjectui64v glGetQueryBufferObjectui64v; + + /// glGetQueryBufferObjectuiv on khronos.org + public static glGetQueryBufferObjectuiv glGetQueryBufferObjectuiv; + + /// glMemoryBarrierByRegion on khronos.org + public static glMemoryBarrierByRegion glMemoryBarrierByRegion; + + /// glGetTextureSubImage on khronos.org + public static glGetTextureSubImage glGetTextureSubImage; + + /// glGetCompressedTextureSubImage on khronos.org + public static glGetCompressedTextureSubImage glGetCompressedTextureSubImage; + + /// glGetGraphicsResetStatus on khronos.org + public static glGetGraphicsResetStatus glGetGraphicsResetStatus; + + /// glGetnCompressedTexImage on khronos.org + public static glGetnCompressedTexImage glGetnCompressedTexImage; + + /// glGetnTexImage on khronos.org + public static glGetnTexImage glGetnTexImage; + + /// glGetnUniformdv on khronos.org + public static glGetnUniformdv glGetnUniformdv; + + /// glGetnUniformfv on khronos.org + public static glGetnUniformfv glGetnUniformfv; + + /// glGetnUniformiv on khronos.org + public static glGetnUniformiv glGetnUniformiv; + + /// glGetnUniformuiv on khronos.org + public static glGetnUniformuiv glGetnUniformuiv; + + /// glReadnPixels on khronos.org + public static glReadnPixels glReadnPixels; + + /// glGetnMapdv on khronos.org + public static glGetnMapdv glGetnMapdv; + + /// glGetnMapfv on khronos.org + public static glGetnMapfv glGetnMapfv; + + /// glGetnMapiv on khronos.org + public static glGetnMapiv glGetnMapiv; + + /// glGetnPixelMapfv on khronos.org + public static glGetnPixelMapfv glGetnPixelMapfv; + + /// glGetnPixelMapuiv on khronos.org + public static glGetnPixelMapuiv glGetnPixelMapuiv; + + /// glGetnPixelMapusv on khronos.org + public static glGetnPixelMapusv glGetnPixelMapusv; + + /// glGetnPolygonStipple on khronos.org + public static glGetnPolygonStipple glGetnPolygonStipple; + + /// glGetnColorTable on khronos.org + public static glGetnColorTable glGetnColorTable; + + /// glGetnConvolutionFilter on khronos.org + public static glGetnConvolutionFilter glGetnConvolutionFilter; + + /// glGetnSeparableFilter on khronos.org + public static glGetnSeparableFilter glGetnSeparableFilter; + + /// glGetnHistogram on khronos.org + public static glGetnHistogram glGetnHistogram; + + /// glGetnMinmax on khronos.org + public static glGetnMinmax glGetnMinmax; + + /// glTextureBarrier on khronos.org + public static glTextureBarrier glTextureBarrier; + + /// glSpecializeShader on khronos.org + public static glSpecializeShader glSpecializeShader; + + /// glMultiDrawArraysIndirectCount on khronos.org + public static glMultiDrawArraysIndirectCount glMultiDrawArraysIndirectCount; + + /// glMultiDrawElementsIndirectCount on khronos.org + public static glMultiDrawElementsIndirectCount glMultiDrawElementsIndirectCount; + + /// glPolygonOffsetClamp on khronos.org + public static glPolygonOffsetClamp glPolygonOffsetClamp; + } + } +} diff --git a/Brutal.OpenGl/OpenGl.cs b/Brutal.OpenGl/OpenGl.cs new file mode 100644 index 0000000..9575e1f --- /dev/null +++ b/Brutal.OpenGl/OpenGl.cs @@ -0,0 +1,1381 @@ +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; +using Brutal.Numerics; + +namespace Brutal.OpenGlApi; + +public static partial class OpenGl +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearColor(float4 color) + { + Native.glClearColor(color.X, color.Y, color.Z, color.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Clear(GlClearBit mask) + { + Native.glClear((uint)mask); + } + + public static unsafe GlProgram CreateShaderProgram(GlEnum type, ReadOnlySpan strings) + { + var byteArrays = stackalloc byte*[strings.Length]; + + for (var i = 0; i < strings.Length; i++) + byteArrays[i] = Utf8StringMarshaller.ConvertToUnmanaged(strings[i]); + + try + { + return Native.glCreateShaderProgramv(type, strings.Length, byteArrays); + } + finally + { + for (var i = 0; i < strings.Length; i++) + Utf8StringMarshaller.Free(byteArrays[i]); + } + } + + #region VertexAttrib + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, double value) + { + Native.glVertexAttrib1d(index, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, float value) + { + Native.glVertexAttrib1f(index, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, short value) + { + Native.glVertexAttrib1s(index, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, double2 value) + { + fixed (double* ptr = value.AsSpan()) + Native.glVertexAttrib2dv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, float2 value) + { + fixed (float* ptr = value.AsSpan()) + Native.glVertexAttrib2fv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, short2 value) + { + fixed (short* ptr = value.AsSpan()) + Native.glVertexAttrib2sv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, double3 value) + { + fixed (double* ptr = value.AsSpan()) + Native.glVertexAttrib3dv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, float3 value) + { + fixed (float* ptr = value.AsSpan()) + Native.glVertexAttrib3fv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, short3 value) + { + fixed (short* ptr = value.AsSpan()) + Native.glVertexAttrib3sv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeNormalize(uint index, sbyte4 value) + { + fixed (sbyte* ptr = value.AsSpan()) + Native.glVertexAttrib4Nbv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeNormalize(uint index, int4 value) + { + fixed (int* ptr = value.AsSpan()) + Native.glVertexAttrib4Niv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeNormalize(uint index, short4 value) + { + fixed (short* ptr = value.AsSpan()) + Native.glVertexAttrib4Nsv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeNormalize(uint index, byte4 value) + { + fixed (byte* ptr = value.AsSpan()) + Native.glVertexAttrib4Nubv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeNormalize(uint index, uint4 value) + { + fixed (uint* ptr = value.AsSpan()) + Native.glVertexAttrib4Nuiv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeNormalize(uint index, ushort4 value) + { + fixed (ushort* ptr = value.AsSpan()) + Native.glVertexAttrib4Nusv(index, ptr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, sbyte4 v) + { + fixed (sbyte* vPtr = v.AsSpan()) + Native.glVertexAttrib4bv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, double4 value) + { + fixed (double* vPtr = value.AsSpan()) + Native.glVertexAttrib4dv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, float4 value) + { + fixed (float* vPtr = value.AsSpan()) + Native.glVertexAttrib4fv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, int4 value) + { + fixed (int* vPtr = value.AsSpan()) + Native.glVertexAttrib4iv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, short4 value) + { + fixed (short* vPtr = value.AsSpan()) + Native.glVertexAttrib4sv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, byte4 value) + { + fixed (byte* vPtr = value.AsSpan()) + Native.glVertexAttrib4ubv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, uint4 value) + { + fixed (uint* vPtr = value.AsSpan()) + Native.glVertexAttrib4uiv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeFloat(uint index, ushort4 value) + { + fixed (ushort* vPtr = value.AsSpan()) + Native.glVertexAttrib4usv(index, vPtr); + } + + public static unsafe void VertexAttribute(GlAttribute attribute) + { + if (attribute.Behavior == GlScaling.Integer) + { + Native.glVertexAttribIPointer( + attribute.Location, + attribute.Count, + attribute.Type, + attribute.Stride, + (void*)attribute.Offset + ); + } + else + { + Native.glVertexAttribPointer( + attribute.Location, + attribute.Count, + attribute.Type, + attribute.Behavior == GlScaling.Normalized, + attribute.Stride, + (void*)attribute.Offset + ); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeInt(uint index, int value) + { + Native.glVertexAttribI1iv(index, &value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeInt(uint index, int2 value) + { + fixed (int* vPtr = value.AsSpan()) + Native.glVertexAttribI2iv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeInt(uint index, int3 value) + { + fixed (int* vPtr = value.AsSpan()) + Native.glVertexAttribI3iv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeInt(uint index, int4 value) + { + fixed (int* vPtr = value.AsSpan()) + Native.glVertexAttribI4iv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeUInt(uint index, uint value) + { + Native.glVertexAttribI1uiv(index, &value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeUInt(uint index, uint2 value) + { + fixed (uint* vPtr = value.AsSpan()) + Native.glVertexAttribI2uiv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeUInt(uint index, uint3 value) + { + fixed (uint* vPtr = value.AsSpan()) + Native.glVertexAttribI3uiv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeUInt(uint index, uint4 v) + { + fixed (uint* vPtr = v.AsSpan()) + Native.glVertexAttribI4uiv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeInt(uint index, sbyte4 value) + { + fixed (sbyte* vPtr = value.AsSpan()) + Native.glVertexAttribI4bv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeInt(uint index, short4 value) + { + fixed (short* vPtr = value.AsSpan()) + Native.glVertexAttribI4sv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeUInt(uint index, byte4 value) + { + fixed (byte* vPtr = value.AsSpan()) + Native.glVertexAttribI4ubv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttributeUInt(uint index, ushort4 value) + { + fixed (ushort* vPtr = value.AsSpan()) + Native.glVertexAttribI4usv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void VertexAttributes(ReadOnlySpan attributes) + { + foreach (var attribute in attributes) + VertexAttribute(attribute); + } + + #endregion + + #region GetVertexAttribute + + public static unsafe int GetVertexAttribute(uint index, GlVertexAttribute attribute) + { + int4 value = new(); + Native.glGetVertexAttribiv(index, (uint)attribute, (int*)&value); + return value.X; + } + + public static void GetVertexAttributeFloat(uint index, out double value) + { + GetVertexAttributeFloat(index, out double4 value4); + value = value4.X; + } + + public static void GetVertexAttributeFloat(uint index, out double2 value) + { + GetVertexAttributeFloat(index, out double4 value4); + value = value4.XY; + } + + public static void GetVertexAttributeFloat(uint index, out double3 value) + { + GetVertexAttributeFloat(index, out double4 value4); + value = value4.XYZ; + } + + public static unsafe void GetVertexAttributeFloat(uint index, out double4 value) + { + fixed (double4* valuePtr = &value) + Native.glGetVertexAttribdv(index, GL_CURRENT_VERTEX_ATTRIB, (double*)valuePtr); + } + + public static void GetVertexAttributeDouble(uint index, out double value) + { + GetVertexAttributeDouble(index, out double4 value4); + value = value4.X; + } + + public static void GetVertexAttributeDouble(uint index, out double2 value) + { + GetVertexAttributeDouble(index, out double4 value4); + value = value4.XY; + } + + public static void GetVertexAttributeDouble(uint index, out double3 value) + { + GetVertexAttributeDouble(index, out double4 value4); + value = value4.XYZ; + } + + public static unsafe void GetVertexAttributeDouble(uint index, out double4 value) + { + fixed (double4* valuePtr = &value) + Native.glGetVertexAttribLdv(index, GL_CURRENT_VERTEX_ATTRIB, (double*)valuePtr); + } + + public static void GetVertexAttributeFloat(uint index, out float value) + { + GetVertexAttributeFloat(index, out float4 value4); + value = value4.X; + } + + public static void GetVertexAttributeFloat(uint index, out float2 value) + { + GetVertexAttributeFloat(index, out float4 value4); + value = value4.XY; + } + + public static void GetVertexAttributeFloat(uint index, out float3 value) + { + GetVertexAttributeFloat(index, out float4 value4); + value = value4.XYZ; + } + + public static unsafe void GetVertexAttributeFloat(uint index, out float4 value) + { + fixed (float4* valuePtr = &value) + Native.glGetVertexAttribfv(index, GL_CURRENT_VERTEX_ATTRIB, (float*)valuePtr); + } + + public static void GetVertexAttributeFloat(uint index, out int value) + { + GetVertexAttributeFloat(index, out int4 value4); + value = value4.X; + } + + public static void GetVertexAttributeFloat(uint index, out int2 value) + { + GetVertexAttributeFloat(index, out int4 value4); + value = value4.XY; + } + + public static void GetVertexAttributeFloat(uint index, out int3 value) + { + GetVertexAttributeFloat(index, out int4 value4); + value = value4.XYZ; + } + + public static unsafe void GetVertexAttributeFloat(uint index, out int4 value) + { + fixed (int4* valuePtr = &value) + Native.glGetVertexAttribiv(index, GL_CURRENT_VERTEX_ATTRIB, (int*)valuePtr); + } + + public static void GetVertexAttributeInt(uint index, out int value) + { + GetVertexAttributeInt(index, out int4 value4); + value = value4.X; + } + + public static void GetVertexAttributeInt(uint index, out int2 value) + { + GetVertexAttributeInt(index, out int4 value4); + value = value4.XY; + } + + public static void GetVertexAttributeInt(uint index, out int3 value) + { + GetVertexAttributeInt(index, out int4 value4); + value = value4.XYZ; + } + + public static unsafe void GetVertexAttributeInt(uint index, out int4 value) + { + fixed (int4* valuePtr = &value) + Native.glGetVertexAttribIiv(index, GL_CURRENT_VERTEX_ATTRIB, (int*)valuePtr); + } + + public static void GetVertexAttributeUInt(uint index, out uint value) + { + GetVertexAttributeUInt(index, out uint4 value4); + value = value4.X; + } + + public static void GetVertexAttributeUInt(uint index, out uint2 value) + { + GetVertexAttributeUInt(index, out uint4 value4); + value = value4.XY; + } + + public static void GetVertexAttributeUInt(uint index, out uint3 value) + { + GetVertexAttributeUInt(index, out uint4 value4); + value = value4.XYZ; + } + + public static unsafe void GetVertexAttributeUInt(uint index, out uint4 value) + { + fixed (uint4* valuePtr = &value) + Native.glGetVertexAttribIuiv(index, GL_CURRENT_VERTEX_ATTRIB, (uint*)valuePtr); + } + + #endregion + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindFragDataLocation(GlProgram program, uint color, ReadOnlySpan name) + { + fixed (byte* namePtr = name) + Native.glBindFragDataLocation(program, color, namePtr); + } + + public static GlBuffer GenBuffer() + { + Span value = stackalloc GlBuffer[1]; + GenBuffers(value); + return value[0]; + } + + public static GlVertexArray GenVertexArray() + { + Span value = stackalloc GlVertexArray[1]; + GenVertexArrays(value); + return value[0]; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BufferData(GlBindTarget target, T data, GlBufferUsage usage) + where T : unmanaged + { + BufferData(target, [data], usage); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BufferData(GlBindTarget target, T[] data, GlBufferUsage usage) + where T : unmanaged + { + fixed (T* dataPtr = data) + Native.glBufferData((uint)target, sizeof(T) * data.Length, dataPtr, (uint)usage); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BufferData(GlBindTarget target, Span data, GlBufferUsage usage) + where T : unmanaged + { + fixed (T* dataPtr = data) + Native.glBufferData((uint)target, sizeof(T) * data.Length, dataPtr, (uint)usage); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BufferData(GlBindTarget target, ReadOnlySpan data, GlBufferUsage usage) + where T : unmanaged + { + fixed (T* dataPtr = data) + Native.glBufferData((uint)target, sizeof(T) * data.Length, dataPtr, (uint)usage); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetAttachedShaders(GlProgram program, out int count, ReadOnlySpan shaders) + { + fixed (GlShader* shadersPtr = shaders) + { + int countValue; + Native.glGetAttachedShaders(program, shaders.Length, &countValue, shadersPtr); + count = countValue; + } + } + + #region TexParameter + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexParameterFloat(GlEnum target, GlEnum pname, float param) + { + Native.glTexParameterf(target, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexParameterFloat(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (float* @paramsPtr = @params) + Native.glTexParameterfv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexParameterFloat(GlEnum target, GlEnum pname, int param) + { + Native.glTexParameteri(target, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexParameterFloat(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glTexParameteriv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexParameterInt(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glTexParameterIiv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexParameterInt(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glTexParameterIuiv(target, pname, @paramsPtr); + } + + #endregion + + #region TextureParameter + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureParameterFloat(uint texture, GlEnum pname, float param) + { + Native.glTextureParameterf(texture, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureParameterFloat(uint texture, GlEnum pname, ReadOnlySpan param) + { + fixed (float* paramPtr = param) + Native.glTextureParameterfv(texture, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureParameterFloat(uint texture, GlEnum pname, int param) + { + Native.glTextureParameteri(texture, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureParameterInt(uint texture, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glTextureParameterIiv(texture, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureParameterInt(uint texture, GlEnum pname, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glTextureParameterIuiv(texture, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureParameterFloat(uint texture, GlEnum pname, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glTextureParameteriv(texture, pname, paramPtr); + } + + #endregion + + #region GetTexParameter + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexParameterFloat(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (float* @paramsPtr = @params) + Native.glGetTexParameterfv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexParameterFloat(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetTexParameteriv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexParameterInt(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetTexParameterIiv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexParameterInt(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glGetTexParameterIuiv(target, pname, @paramsPtr); + } + + #endregion + + #region GetTextureParameter + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureParameterFloat(uint texture, GlEnum pname, ReadOnlySpan @params) + { + fixed (float* @paramsPtr = @params) + Native.glGetTextureParameterfv(texture, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureParameterInt(uint texture, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetTextureParameterIiv(texture, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureParameterInt(uint texture, GlEnum pname, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glGetTextureParameterIuiv(texture, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureParameterFloat(uint texture, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetTextureParameteriv(texture, pname, @paramsPtr); + } + + #endregion + + #region Draw + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Draw( + GlTopology mode, + int vertexCount, + int instanceCount, + int vertexOffset, + int firstInstance + ) + { + if (firstInstance != 0) + { + Native.glDrawArraysInstancedBaseInstance( + (uint)mode, + vertexOffset, + vertexCount, + instanceCount, + (uint)firstInstance + ); + } + else if (instanceCount > 1) + { + Native.glDrawArraysInstanced((uint)mode, vertexOffset, vertexCount, instanceCount); + } + else + { + Native.glDrawArrays((uint)mode, vertexOffset, vertexCount); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndexed( + GlTopology mode, + GlIndexType indexType, + int indexCount, + int instanceCount, + int firstIndex, + int vertexOffset, + int firstInstance + ) + { + if (firstInstance != 0) + { + Native.glDrawElementsInstancedBaseVertexBaseInstance( + (uint)mode, + indexCount, + (uint)indexType, + (void*)firstIndex, + instanceCount, + vertexOffset, + (uint)firstInstance + ); + } + else if (vertexOffset != 0) + { + Native.glDrawElementsInstancedBaseVertex( + (uint)mode, + indexCount, + (uint)indexType, + (void*)firstIndex, + instanceCount, + vertexOffset + ); + } + else + { + Native.glDrawElementsInstanced((uint)mode, indexCount, (uint)indexType, (void*)firstIndex, instanceCount); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiDraw( + GlTopology mode, + ReadOnlySpan vertexCounts, + ReadOnlySpan firstVertices + ) + { + Debug.Assert(firstVertices.Length == vertexCounts.Length, "First and count arrays must have the same length."); + if (firstVertices.Length == 0) + return; + fixed (int* firstPtr = firstVertices) + fixed (int* countPtr = vertexCounts) + Native.glMultiDrawArrays((uint)mode, firstPtr, countPtr, firstVertices.Length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiDrawIndexed( + GlTopology mode, + GlIndexType indexType, + ReadOnlySpan indexCounts, + ReadOnlySpan firstIndices, + ReadOnlySpan baseVertices = default + ) + { + Debug.Assert( + firstIndices.Length == indexCounts.Length, + "First indices and index counts arrays must have the same length." + ); + + if (firstIndices.Length == 0) + return; + + fixed (int* firstIndicesPtr = firstIndices) + fixed (int* indexCountsPtr = indexCounts) + { + if (baseVertices.Length == 0) + { + Native.glMultiDrawElements( + (uint)mode, + indexCountsPtr, + (uint)indexType, + (void**)firstIndicesPtr, + firstIndices.Length + ); + } + else + { + Debug.Assert( + firstIndices.Length == baseVertices.Length, + "Base vertices arrays must have the same length as first indices, or be empty." + ); + + fixed (int* baseVerticesPtr = baseVertices) + { + Native.glMultiDrawElementsBaseVertex( + (uint)mode, + indexCountsPtr, + (uint)indexType, + (void**)firstIndicesPtr, + firstIndices.Length, + baseVerticesPtr + ); + } + } + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndirect(GlTopology mode, nint byteOffset) + { + Native.glDrawArraysIndirect((uint)mode, (void*)byteOffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndexedIndirect(GlEnum mode, GlEnum indexType, nint byteOffset) + { + Native.glDrawElementsIndirect(mode, indexType, (void*)byteOffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawTransformFeedbackInstanced(GlTopology mode, uint id, int instanceCount) + { + Native.glDrawTransformFeedbackInstanced((uint)mode, id, instanceCount); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawTransformFeedbackStreamInstanced( + GlTopology mode, + uint id, + uint stream, + int instanceCount + ) + { + Native.glDrawTransformFeedbackStreamInstanced((uint)mode, id, stream, instanceCount); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiDrawIndirect(GlTopology mode, nint byteOffset, int drawCount, int indirectStride) + { + Native.glMultiDrawArraysIndirect((uint)mode, (void*)byteOffset, drawCount, indirectStride); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiDrawIndexedIndirect( + GlTopology mode, + GlIndexType type, + nint byteOffset, + int drawCount, + int stride + ) + { + Native.glMultiDrawElementsIndirect((uint)mode, (uint)type, (void*)byteOffset, drawCount, stride); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiDrawIndirectCount( + GlEnum mode, + nint byteOffset, + nint drawCountByteOffset, + int maxDrawCount, + int stride + ) + { + Native.glMultiDrawArraysIndirectCount(mode, (void*)byteOffset, drawCountByteOffset, maxDrawCount, stride); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiDrawIndexedIndirectCount( + GlEnum mode, + GlEnum type, + nint byteOffset, + nint drawCountByteOffset, + int maxDrawCount, + int stride + ) + { + Native.glMultiDrawElementsIndirectCount( + mode, + type, + (void*)byteOffset, + drawCountByteOffset, + maxDrawCount, + stride + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawTransformFeedback(GlTopology mode, uint id) + { + Native.glDrawTransformFeedback((uint)mode, id); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawTransformFeedbackStream(GlTopology mode, uint id, uint stream) + { + Native.glDrawTransformFeedbackStream((uint)mode, id, stream); + } + + #endregion + + #region Uniform + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, int value) + { + Native.glUniform1i(location, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int* valuePtr = values) + Native.glUniform1iv(startLocation, values.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, float value) + { + Native.glUniform1f(location, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float* valuePtr = values) + Native.glUniform1fv(startLocation, values.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, double v0) + { + Native.glUniform1d(location, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glUniform1dv(startLocation, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, uint value) + { + Native.glUniform1ui(location, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glUniform1uiv(startLocation, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, int2 value) + { + Native.glUniform2i(location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int2* valuePtr = values) + Native.glUniform2iv(startLocation, values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, float2 value) + { + Native.glUniform2f(location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float2* valuePtr = values) + Native.glUniform2fv(startLocation, values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, double2 value) + { + Native.glUniform2d(location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (double2* valuePtr = values) + Native.glUniform2dv(startLocation, values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, uint2 value) + { + Native.glUniform2ui(location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan value) + { + fixed (uint2* valuePtr = value) + Native.glUniform2uiv(startLocation, value.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, int3 value) + { + Native.glUniform3i(location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int3* valuePtr = values) + Native.glUniform3iv(startLocation, values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, float3 value) + { + Native.glUniform3f(location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float3* valuePtr = values) + Native.glUniform3fv(startLocation, values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, double3 value) + { + Native.glUniform3d(location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (double3* valuePtr = values) + Native.glUniform3dv(startLocation, values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, uint3 value) + { + Native.glUniform3ui(location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (uint3* valuePtr = values) + Native.glUniform3uiv(startLocation, values.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, int4 value) + { + Native.glUniform4i(location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int4* valuePtr = values) + Native.glUniform4iv(startLocation, values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, float4 value) + { + Native.glUniform4f(location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float4* valuePtr = values) + Native.glUniform4fv(startLocation, values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, double4 value) + { + Native.glUniform4d(location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (double4* valuePtr = values) + Native.glUniform4dv(startLocation, values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, uint4 value) + { + Native.glUniform4ui(location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (uint4* valuePtr = values) + Native.glUniform4uiv(startLocation, values.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float2x2 value, Bool8 transpose = default) + { + fixed (float2x2* valuePtr = &value) + Native.glUniformMatrix2fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float3x3 value, Bool8 transpose = default) + { + fixed (float3x3* valuePtr = &value) + Native.glUniformMatrix3fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float4x4 value, Bool8 transpose = default) + { + fixed (float4x4* valuePtr = &value) + Native.glUniformMatrix4fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double2x2 value, Bool8 transpose = default) + { + fixed (double2x2* valuePtr = &value) + Native.glUniformMatrix2dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double3x3 value, Bool8 transpose = default) + { + fixed (double3x3* valuePtr = &value) + Native.glUniformMatrix3dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double4x4 value, Bool8 transpose = default) + { + fixed (double4x4* valuePtr = &value) + Native.glUniformMatrix4dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float2x3 value, Bool8 transpose = default) + { + fixed (float2x3* valuePtr = &value) + Native.glUniformMatrix2x3fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float3x2 value, Bool8 transpose = default) + { + fixed (float3x2* valuePtr = &value) + Native.glUniformMatrix3x2fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float2x4 value, Bool8 transpose = default) + { + fixed (float2x4* valuePtr = &value) + Native.glUniformMatrix2x4fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float4x2 value, Bool8 transpose = default) + { + fixed (float4x2* valuePtr = &value) + Native.glUniformMatrix4x2fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float3x4 value, Bool8 transpose = default) + { + fixed (float3x4* valuePtr = &value) + Native.glUniformMatrix3x4fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in float4x3 values, Bool8 transpose = default) + { + fixed (float4x3* valuePtr = &values) + Native.glUniformMatrix4x3fv(location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double2x3 value, Bool8 transpose = default) + { + fixed (double2x3* valuePtr = &value) + Native.glUniformMatrix2x3dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double3x2 value, Bool8 transpose = default) + { + fixed (double3x2* valuePtr = &value) + Native.glUniformMatrix3x2dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double2x4 value, Bool8 transpose = default) + { + fixed (double2x4* valuePtr = &value) + Native.glUniformMatrix2x4dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double4x2 value, Bool8 transpose = default) + { + fixed (double4x2* valuePtr = &value) + Native.glUniformMatrix4x2dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double3x4 value, Bool8 transpose = default) + { + fixed (double3x4* valuePtr = &value) + Native.glUniformMatrix3x4dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Uniform(int location, in double4x3 value, Bool8 transpose = default) + { + fixed (double4x3* valuePtr = &value) + Native.glUniformMatrix4x3dv(location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float2x2* valuePtr = values) + Native.glUniformMatrix2fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float3x3* valuePtr = values) + Native.glUniformMatrix3fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float4x4* valuePtr = values) + Native.glUniformMatrix4fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double2x2* valuePtr = values) + Native.glUniformMatrix2dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double3x3* valuePtr = values) + Native.glUniformMatrix3dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double4x4* valuePtr = values) + Native.glUniformMatrix4dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float2x3* valuePtr = values) + Native.glUniformMatrix2x3fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float3x2* valuePtr = values) + Native.glUniformMatrix3x2fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float2x4* valuePtr = values) + Native.glUniformMatrix2x4fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float4x2* valuePtr = values) + Native.glUniformMatrix4x2fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float3x4* valuePtr = values) + Native.glUniformMatrix3x4fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float4x3* valuePtr = values) + Native.glUniformMatrix4x3fv(startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double2x3* valuePtr = values) + Native.glUniformMatrix2x3dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double3x2* valuePtr = values) + Native.glUniformMatrix3x2dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double2x4* valuePtr = values) + Native.glUniformMatrix2x4dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double4x2* valuePtr = values) + Native.glUniformMatrix4x2dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double3x4* valuePtr = values) + Native.glUniformMatrix3x4dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double4x3* valuePtr = values) + Native.glUniformMatrix4x3dv(startLocation, values.Length, transpose, (double*)valuePtr); + } + + #endregion +} diff --git a/Brutal.OpenGl/OpenGl.gen.cs b/Brutal.OpenGl/OpenGl.gen.cs new file mode 100644 index 0000000..e09cef5 --- /dev/null +++ b/Brutal.OpenGl/OpenGl.gen.cs @@ -0,0 +1,4532 @@ +/* + * @brief Contains generated OpenGL functions that wrap the native function pointers. + * + * @note If you want to override function behavior, you can do so in GenerationRules.xml and OpenGl.cs. + * + * @warning This file is auto-generated by Brutal.OpenGl.Generate. + * Do not edit this file directly. + * If you want to change the generated code, modify the generation rules. + */ +using System.Runtime.CompilerServices; + +namespace Brutal.OpenGlApi +{ + public static partial class OpenGl + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CullFace(GlFace mode) + { + Native.glCullFace(mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FrontFace(GlFrontFace mode) + { + Native.glFrontFace(mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Hint(GlHint target, GlBehavior mode) + { + Native.glHint(target, mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void LineWidth(float width) + { + Native.glLineWidth(width); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PointSize(float size) + { + Native.glPointSize(size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PolygonMode(GlFace face, GlEnum mode) + { + Native.glPolygonMode(face, mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Scissor(int x, int y, int width, int height) + { + Native.glScissor(x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexImage1D( + GlEnum target, + int level, + int internalformat, + int width, + int border, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexImage2D( + GlEnum target, + int level, + int internalformat, + int width, + int height, + int border, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearStencil(int s) + { + Native.glClearStencil(s); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearDepth(double depth) + { + Native.glClearDepth(depth); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void StencilMask(uint mask) + { + Native.glStencilMask(mask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ColorMask(Brutal.Bool8 red, Brutal.Bool8 green, Brutal.Bool8 blue, Brutal.Bool8 alpha) + { + Native.glColorMask(red, green, blue, alpha); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DepthMask(Brutal.Bool8 flag) + { + Native.glDepthMask(flag); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Disable(GlCapability cap) + { + Native.glDisable(cap); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Enable(GlCapability cap) + { + Native.glEnable(cap); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Finish() + { + Native.glFinish(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Flush() + { + Native.glFlush(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendFunc(GlEnum sfactor, GlEnum dfactor) + { + Native.glBlendFunc(sfactor, dfactor); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void LogicOp(GlLogicOp opcode) + { + Native.glLogicOp(opcode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void StencilFunc(GlFunc func, int @ref, uint mask) + { + Native.glStencilFunc(func, @ref, mask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void StencilOp(GlStencilOp fail, GlStencilOp zfail, GlStencilOp zpass) + { + Native.glStencilOp(fail, zfail, zpass); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DepthFunc(GlFunc func) + { + Native.glDepthFunc(func); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PixelStoref(GlEnum pname, float param) + { + Native.glPixelStoref(pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PixelStorei(GlEnum pname, int param) + { + Native.glPixelStorei(pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ReadBuffer(GlEnum src) + { + Native.glReadBuffer(src); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ReadPixels( + int x, + int y, + int width, + int height, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glReadPixels(x, y, width, height, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBooleanv(GlEnum pname, ReadOnlySpan data) + { + fixed (Brutal.Bool8* dataPtr = data) + Native.glGetBooleanv(pname, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDoublev(GlEnum pname, ReadOnlySpan data) + { + fixed (double* dataPtr = data) + Native.glGetDoublev(pname, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlEnum GetError() + { + return Native.glGetError(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFloatv(GlEnum pname, ReadOnlySpan data) + { + fixed (float* dataPtr = data) + Native.glGetFloatv(pname, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetIntegerv(GlEnum pname, ReadOnlySpan data) + { + fixed (int* dataPtr = data) + Native.glGetIntegerv(pname, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe byte* GetString(GlEnum name) + { + return Native.glGetString(name); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexImage(GlEnum target, int level, GlEnum format, GlEnum type, void* pixels) + { + Native.glGetTexImage(target, level, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexLevelParameterfv( + GlEnum target, + int level, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (float* @paramsPtr = @params) + Native.glGetTexLevelParameterfv(target, level, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTexLevelParameteriv( + GlEnum target, + int level, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetTexLevelParameteriv(target, level, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsEnabled(GlEnum cap) + { + return Native.glIsEnabled(cap); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DepthRange(double n, double f) + { + Native.glDepthRange(n, f); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Viewport(int x, int y, int width, int height) + { + Native.glViewport(x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PolygonOffset(float factor, float units) + { + Native.glPolygonOffset(factor, units); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTexImage1D( + GlEnum target, + int level, + GlEnum internalformat, + int x, + int y, + int width, + int border + ) + { + Native.glCopyTexImage1D(target, level, internalformat, x, y, width, border); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTexImage2D( + GlEnum target, + int level, + GlEnum internalformat, + int x, + int y, + int width, + int height, + int border + ) + { + Native.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTexSubImage1D(GlEnum target, int level, int xoffset, int x, int y, int width) + { + Native.glCopyTexSubImage1D(target, level, xoffset, x, y, width); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTexSubImage2D( + GlEnum target, + int level, + int xoffset, + int yoffset, + int x, + int y, + int width, + int height + ) + { + Native.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexSubImage1D( + GlEnum target, + int level, + int xoffset, + int width, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexSubImage2D( + GlEnum target, + int level, + int xoffset, + int yoffset, + int width, + int height, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTexture(GlEnum target, uint texture) + { + Native.glBindTexture(target, texture); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteTextures(ReadOnlySpan textures) + { + fixed (GlTexture* texturesPtr = textures) + Native.glDeleteTextures(textures.Length, texturesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenTextures(ReadOnlySpan textures) + { + fixed (GlTexture* texturesPtr = textures) + Native.glGenTextures(textures.Length, texturesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsTexture(uint texture) + { + return Native.glIsTexture(texture); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexImage3D( + GlEnum target, + int level, + int internalformat, + int width, + int height, + int depth, + int border, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexSubImage3D( + GlEnum target, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTexSubImage3D( + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTexSubImage3D( + GlEnum target, + int level, + int xoffset, + int yoffset, + int zoffset, + int x, + int y, + int width, + int height + ) + { + Native.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ActiveTexture(GlEnum texture) + { + Native.glActiveTexture(texture); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SampleCoverage(float value, Brutal.Bool8 invert) + { + Native.glSampleCoverage(value, invert); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTexImage3D( + GlEnum target, + int level, + GlEnum internalformat, + int width, + int height, + int depth, + int border, + int imageSize, + void* data + ) + { + Native.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTexImage2D( + GlEnum target, + int level, + GlEnum internalformat, + int width, + int height, + int border, + int imageSize, + void* data + ) + { + Native.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTexImage1D( + GlEnum target, + int level, + GlEnum internalformat, + int width, + int border, + int imageSize, + void* data + ) + { + Native.glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTexSubImage3D( + GlEnum target, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + GlEnum format, + int imageSize, + void* data + ) + { + Native.glCompressedTexSubImage3D( + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + imageSize, + data + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTexSubImage2D( + GlEnum target, + int level, + int xoffset, + int yoffset, + int width, + int height, + GlEnum format, + int imageSize, + void* data + ) + { + Native.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTexSubImage1D( + GlEnum target, + int level, + int xoffset, + int width, + GlEnum format, + int imageSize, + void* data + ) + { + Native.glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetCompressedTexImage(GlEnum target, int level, void* img) + { + Native.glGetCompressedTexImage(target, level, img); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendFuncSeparate( + GlEnum sfactorRGB, + GlEnum dfactorRGB, + GlEnum sfactorAlpha, + GlEnum dfactorAlpha + ) + { + Native.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PointParameterf(GlEnum pname, float param) + { + Native.glPointParameterf(pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PointParameterfv(GlEnum pname, ReadOnlySpan @params) + { + fixed (float* @paramsPtr = @params) + Native.glPointParameterfv(pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PointParameteri(GlEnum pname, int param) + { + Native.glPointParameteri(pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PointParameteriv(GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glPointParameteriv(pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendColor(float red, float green, float blue, float alpha) + { + Native.glBlendColor(red, green, blue, alpha); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendEquation(GlEnum mode) + { + Native.glBlendEquation(mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenQueries(ReadOnlySpan ids) + { + fixed (GlQuery* idsPtr = ids) + Native.glGenQueries(ids.Length, idsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteQueries(ReadOnlySpan ids) + { + fixed (GlQuery* idsPtr = ids) + Native.glDeleteQueries(ids.Length, idsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsQuery(uint id) + { + return Native.glIsQuery(id); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginQuery(GlEnum target, GlQuery id) + { + Native.glBeginQuery(target, id); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndQuery(GlEnum target) + { + Native.glEndQuery(target); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryiv(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetQueryiv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryObjectiv(uint id, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetQueryObjectiv(id, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryObjectuiv(uint id, GlEnum pname, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glGetQueryObjectuiv(id, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteBuffers(ReadOnlySpan buffers) + { + fixed (GlBuffer* buffersPtr = buffers) + Native.glDeleteBuffers(buffers.Length, buffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenBuffers(ReadOnlySpan buffers) + { + fixed (GlBuffer* buffersPtr = buffers) + Native.glGenBuffers(buffers.Length, buffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsBuffer(GlBuffer buffer) + { + return Native.glIsBuffer(buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BufferSubData(GlEnum target, nint offset, nint size, void* data) + { + Native.glBufferSubData(target, offset, size, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferSubData(GlEnum target, nint offset, nint size, void* data) + { + Native.glGetBufferSubData(target, offset, size, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* MapBuffer(GlEnum target, GlEnum access) + { + return Native.glMapBuffer(target, access); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 UnmapBuffer(GlEnum target) + { + return Native.glUnmapBuffer(target); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferParameteriv(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetBufferParameteriv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferPointerv(GlEnum target, GlEnum pname, void** @params) + { + Native.glGetBufferPointerv(target, pname, @params); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendEquationSeparate(GlEnum modeRGB, GlEnum modeAlpha) + { + Native.glBlendEquationSeparate(modeRGB, modeAlpha); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void StencilOpSeparate(GlFace face, GlEnum sfail, GlEnum dpfail, GlEnum dppass) + { + Native.glStencilOpSeparate(face, sfail, dpfail, dppass); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void StencilFuncSeparate(GlFace face, GlFunc func, int @ref, uint mask) + { + Native.glStencilFuncSeparate(face, func, @ref, mask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void StencilMaskSeparate(GlFace face, uint mask) + { + Native.glStencilMaskSeparate(face, mask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindAttribLocation(GlProgram program, uint index, ReadOnlySpan name) + { + fixed (byte* namePtr = name) + Native.glBindAttribLocation(program, index, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlProgram CreateProgram() + { + return Native.glCreateProgram(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlShader CreateShader(GlShaderType type) + { + return Native.glCreateShader(type); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DetachShader(GlProgram program, GlShader shader) + { + Native.glDetachShader(program, shader); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DisableVertexAttribArray(uint index) + { + Native.glDisableVertexAttribArray(index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EnableVertexAttribArray(uint index) + { + Native.glEnableVertexAttribArray(index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveAttrib( + GlProgram program, + uint index, + int bufSize, + int* length, + int* size, + GlEnum* type, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glGetActiveAttrib(program, index, bufSize, length, size, type, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveUniform( + GlProgram program, + uint index, + int bufSize, + int* length, + int* size, + GlEnum* type, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glGetActiveUniform(program, index, bufSize, length, size, type, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetAttribLocation(GlProgram program, ReadOnlySpan name) + { + fixed (byte* namePtr = name) + return Native.glGetAttribLocation(program, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetVertexAttribPointerv(uint index, GlEnum pname, void** pointer) + { + Native.glGetVertexAttribPointerv(index, pname, pointer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsProgram(GlProgram program) + { + return Native.glIsProgram(program); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsShader(GlShader shader) + { + return Native.glIsShader(shader); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ValidateProgram(GlProgram program) + { + Native.glValidateProgram(program); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ColorMaski(uint index, Brutal.Bool8 r, Brutal.Bool8 g, Brutal.Bool8 b, Brutal.Bool8 a) + { + Native.glColorMaski(index, r, g, b, a); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBooleani_v(GlEnum target, uint index, ReadOnlySpan data) + { + fixed (Brutal.Bool8* dataPtr = data) + Native.glGetBooleani_v(target, index, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetIntegeri_v(GlEnum target, uint index, ReadOnlySpan data) + { + fixed (int* dataPtr = data) + Native.glGetIntegeri_v(target, index, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Enablei(GlEnum target, uint index) + { + Native.glEnablei(target, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Disablei(GlEnum target, uint index) + { + Native.glDisablei(target, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsEnabledi(GlEnum target, uint index) + { + return Native.glIsEnabledi(target, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginTransformFeedback(GlEnum primitiveMode) + { + Native.glBeginTransformFeedback(primitiveMode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndTransformFeedback() + { + Native.glEndTransformFeedback(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindBufferRange(GlEnum target, uint index, GlBuffer buffer, nint offset, nint size) + { + Native.glBindBufferRange(target, index, buffer, offset, size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindBufferBase(GlEnum target, uint index, GlBuffer buffer) + { + Native.glBindBufferBase(target, index, buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TransformFeedbackVaryings( + GlProgram program, + int count, + byte** varyings, + GlEnum bufferMode + ) + { + Native.glTransformFeedbackVaryings(program, count, varyings, bufferMode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTransformFeedbackVarying( + GlProgram program, + uint index, + int bufSize, + int* length, + int* size, + GlEnum* type, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClampColor(GlEnum target, GlEnum clamp) + { + Native.glClampColor(target, clamp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginConditionalRender(uint id, GlEnum mode) + { + Native.glBeginConditionalRender(id, mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndConditionalRender() + { + Native.glEndConditionalRender(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetFragDataLocation(GlProgram program, ReadOnlySpan name) + { + fixed (byte* namePtr = name) + return Native.glGetFragDataLocation(program, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearBufferiv(GlBuffer buffer, int drawbuffer, ReadOnlySpan value) + { + fixed (int* valuePtr = value) + Native.glClearBufferiv(buffer, drawbuffer, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearBufferuiv(GlBuffer buffer, int drawbuffer, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glClearBufferuiv(buffer, drawbuffer, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearBufferfv(GlBuffer buffer, int drawbuffer, ReadOnlySpan value) + { + fixed (float* valuePtr = value) + Native.glClearBufferfv(buffer, drawbuffer, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearBufferfi(GlBuffer buffer, int drawbuffer, float depth, int stencil) + { + Native.glClearBufferfi(buffer, drawbuffer, depth, stencil); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe byte* GetStringi(GlEnum name, uint index) + { + return Native.glGetStringi(name, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsRenderbuffer(GlRenderbuffer renderbuffer) + { + return Native.glIsRenderbuffer(renderbuffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindRenderbuffer(GlEnum target, GlRenderbuffer renderbuffer) + { + Native.glBindRenderbuffer(target, renderbuffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteRenderbuffers(ReadOnlySpan renderbuffers) + { + fixed (GlRenderbuffer* renderbuffersPtr = renderbuffers) + Native.glDeleteRenderbuffers(renderbuffers.Length, renderbuffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenRenderbuffers(ReadOnlySpan renderbuffers) + { + fixed (GlRenderbuffer* renderbuffersPtr = renderbuffers) + Native.glGenRenderbuffers(renderbuffers.Length, renderbuffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void RenderbufferStorage(GlEnum target, GlEnum internalformat, int width, int height) + { + Native.glRenderbufferStorage(target, internalformat, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRenderbufferParameteriv(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetRenderbufferParameteriv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsFramebuffer(GlFramebuffer framebuffer) + { + return Native.glIsFramebuffer(framebuffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindFramebuffer(GlEnum target, GlFramebuffer framebuffer) + { + Native.glBindFramebuffer(target, framebuffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteFramebuffers(ReadOnlySpan framebuffers) + { + fixed (GlFramebuffer* framebuffersPtr = framebuffers) + Native.glDeleteFramebuffers(framebuffers.Length, framebuffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenFramebuffers(ReadOnlySpan framebuffers) + { + fixed (GlFramebuffer* framebuffersPtr = framebuffers) + Native.glGenFramebuffers(framebuffers.Length, framebuffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlEnum CheckFramebufferStatus(GlEnum target) + { + return Native.glCheckFramebufferStatus(target); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferTexture1D( + GlEnum target, + GlEnum attachment, + GlEnum textarget, + uint texture, + int level + ) + { + Native.glFramebufferTexture1D(target, attachment, textarget, texture, level); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferTexture2D( + GlEnum target, + GlEnum attachment, + GlEnum textarget, + uint texture, + int level + ) + { + Native.glFramebufferTexture2D(target, attachment, textarget, texture, level); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferTexture3D( + GlEnum target, + GlEnum attachment, + GlEnum textarget, + uint texture, + int level, + int zoffset + ) + { + Native.glFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferRenderbuffer( + GlEnum target, + GlEnum attachment, + GlEnum renderbuffertarget, + GlRenderbuffer renderbuffer + ) + { + Native.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFramebufferAttachmentParameteriv( + GlEnum target, + GlEnum attachment, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetFramebufferAttachmentParameteriv(target, attachment, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenerateMipmap(GlEnum target) + { + Native.glGenerateMipmap(target); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlitFramebuffer( + int srcX0, + int srcY0, + int srcX1, + int srcY1, + int dstX0, + int dstY0, + int dstX1, + int dstY1, + GlBitfield mask, + GlEnum filter + ) + { + Native.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void RenderbufferStorageMultisample( + GlEnum target, + int samples, + GlEnum internalformat, + int width, + int height + ) + { + Native.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferTextureLayer( + GlEnum target, + GlEnum attachment, + uint texture, + int level, + int layer + ) + { + Native.glFramebufferTextureLayer(target, attachment, texture, level, layer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* MapBufferRange(GlEnum target, nint offset, nint length, GlBitfield access) + { + return Native.glMapBufferRange(target, offset, length, access); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FlushMappedBufferRange(GlEnum target, nint offset, nint length) + { + Native.glFlushMappedBufferRange(target, offset, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteVertexArrays(ReadOnlySpan arrays) + { + fixed (GlVertexArray* arraysPtr = arrays) + Native.glDeleteVertexArrays(arrays.Length, arraysPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenVertexArrays(ReadOnlySpan arrays) + { + fixed (GlVertexArray* arraysPtr = arrays) + Native.glGenVertexArrays(arrays.Length, arraysPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsVertexArray(GlVertexArray array) + { + return Native.glIsVertexArray(array); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexBuffer(GlEnum target, GlEnum internalformat, GlBuffer buffer) + { + Native.glTexBuffer(target, internalformat, buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PrimitiveRestartIndex(uint index) + { + Native.glPrimitiveRestartIndex(index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBufferSubData( + GlEnum readTarget, + GlEnum writeTarget, + nint readOffset, + nint writeOffset, + nint size + ) + { + Native.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetUniformIndices( + GlProgram program, + int uniformCount, + byte** uniformNames, + ReadOnlySpan uniformIndices + ) + { + fixed (uint* uniformIndicesPtr = uniformIndices) + Native.glGetUniformIndices(program, uniformCount, uniformNames, uniformIndicesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveUniformsiv( + GlProgram program, + int uniformCount, + uint* uniformIndices, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveUniformName( + GlProgram program, + uint uniformIndex, + int bufSize, + int* length, + ReadOnlySpan uniformName + ) + { + fixed (byte* uniformNamePtr = uniformName) + Native.glGetActiveUniformName(program, uniformIndex, bufSize, length, uniformNamePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe uint GetUniformBlockIndex(GlProgram program, ReadOnlySpan uniformBlockName) + { + fixed (byte* uniformBlockNamePtr = uniformBlockName) + return Native.glGetUniformBlockIndex(program, uniformBlockNamePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveUniformBlockiv( + GlProgram program, + uint uniformBlockIndex, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveUniformBlockName( + GlProgram program, + uint uniformBlockIndex, + int bufSize, + int* length, + ReadOnlySpan uniformBlockName + ) + { + fixed (byte* uniformBlockNamePtr = uniformBlockName) + Native.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockNamePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformBlockBinding( + GlProgram program, + uint uniformBlockIndex, + uint uniformBlockBinding + ) + { + Native.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProvokingVertex(GlEnum mode) + { + Native.glProvokingVertex(mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlSync FenceSync(GlEnum condition, GlBitfield flags) + { + return Native.glFenceSync(condition, flags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsSync(GlSync sync) + { + return Native.glIsSync(sync); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteSync(GlSync sync) + { + Native.glDeleteSync(sync); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlEnum ClientWaitSync(GlSync sync, GlBitfield flags, ulong timeout) + { + return Native.glClientWaitSync(sync, flags, timeout); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WaitSync(GlSync sync, GlBitfield flags, ulong timeout) + { + Native.glWaitSync(sync, flags, timeout); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetInteger64v(GlEnum pname, ReadOnlySpan data) + { + fixed (long* dataPtr = data) + Native.glGetInteger64v(pname, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSynciv(GlSync sync, GlEnum pname, int count, int* length, ReadOnlySpan values) + { + fixed (int* valuesPtr = values) + Native.glGetSynciv(sync, pname, count, length, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetInteger64i_v(GlEnum target, uint index, ReadOnlySpan data) + { + fixed (long* dataPtr = data) + Native.glGetInteger64i_v(target, index, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferParameteri64v(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (long* @paramsPtr = @params) + Native.glGetBufferParameteri64v(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferTexture(GlEnum target, GlEnum attachment, uint texture, int level) + { + Native.glFramebufferTexture(target, attachment, texture, level); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexImage2DMultisample( + GlEnum target, + int samples, + GlEnum internalformat, + int width, + int height, + Brutal.Bool8 fixedsamplelocations + ) + { + Native.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexImage3DMultisample( + GlEnum target, + int samples, + GlEnum internalformat, + int width, + int height, + int depth, + Brutal.Bool8 fixedsamplelocations + ) + { + Native.glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMultisamplefv(GlEnum pname, uint index, ReadOnlySpan val) + { + fixed (float* valPtr = val) + Native.glGetMultisamplefv(pname, index, valPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SampleMaski(uint maskNumber, GlBitfield mask) + { + Native.glSampleMaski(maskNumber, mask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindFragDataLocationIndexed( + GlProgram program, + uint colorNumber, + uint index, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glBindFragDataLocationIndexed(program, colorNumber, index, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetFragDataIndex(GlProgram program, ReadOnlySpan name) + { + fixed (byte* namePtr = name) + return Native.glGetFragDataIndex(program, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenSamplers(ReadOnlySpan samplers) + { + fixed (GlSampler* samplersPtr = samplers) + Native.glGenSamplers(samplers.Length, samplersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteSamplers(ReadOnlySpan samplers) + { + fixed (GlSampler* samplersPtr = samplers) + Native.glDeleteSamplers(samplers.Length, samplersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsSampler(GlSampler sampler) + { + return Native.glIsSampler(sampler); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindSampler(uint unit, GlSampler sampler) + { + Native.glBindSampler(unit, sampler); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SamplerParameteri(GlSampler sampler, GlEnum pname, int param) + { + Native.glSamplerParameteri(sampler, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SamplerParameteriv(GlSampler sampler, GlEnum pname, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glSamplerParameteriv(sampler, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SamplerParameterf(GlSampler sampler, GlEnum pname, float param) + { + Native.glSamplerParameterf(sampler, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SamplerParameterfv(GlSampler sampler, GlEnum pname, ReadOnlySpan param) + { + fixed (float* paramPtr = param) + Native.glSamplerParameterfv(sampler, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SamplerParameterIiv(GlSampler sampler, GlEnum pname, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glSamplerParameterIiv(sampler, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SamplerParameterIuiv(GlSampler sampler, GlEnum pname, ReadOnlySpan param) + { + fixed (uint* paramPtr = param) + Native.glSamplerParameterIuiv(sampler, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSamplerParameteriv(GlSampler sampler, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetSamplerParameteriv(sampler, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSamplerParameterIiv(GlSampler sampler, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetSamplerParameterIiv(sampler, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSamplerParameterfv(GlSampler sampler, GlEnum pname, ReadOnlySpan @params) + { + fixed (float* @paramsPtr = @params) + Native.glGetSamplerParameterfv(sampler, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSamplerParameterIuiv(GlSampler sampler, GlEnum pname, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glGetSamplerParameterIuiv(sampler, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void QueryCounter(uint id, GlEnum target) + { + Native.glQueryCounter(id, target); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryObjecti64v(uint id, GlEnum pname, ReadOnlySpan @params) + { + fixed (long* @paramsPtr = @params) + Native.glGetQueryObjecti64v(id, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryObjectui64v(uint id, GlEnum pname, ReadOnlySpan @params) + { + fixed (ulong* @paramsPtr = @params) + Native.glGetQueryObjectui64v(id, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribDivisor(uint index, uint divisor) + { + Native.glVertexAttribDivisor(index, divisor); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP1ui(uint index, GlEnum type, Brutal.Bool8 normalized, uint value) + { + Native.glVertexAttribP1ui(index, type, normalized, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP1uiv( + uint index, + GlEnum type, + Brutal.Bool8 normalized, + ReadOnlySpan value + ) + { + fixed (uint* valuePtr = value) + Native.glVertexAttribP1uiv(index, type, normalized, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP2ui(uint index, GlEnum type, Brutal.Bool8 normalized, uint value) + { + Native.glVertexAttribP2ui(index, type, normalized, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP2uiv( + uint index, + GlEnum type, + Brutal.Bool8 normalized, + ReadOnlySpan value + ) + { + fixed (uint* valuePtr = value) + Native.glVertexAttribP2uiv(index, type, normalized, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP3ui(uint index, GlEnum type, Brutal.Bool8 normalized, uint value) + { + Native.glVertexAttribP3ui(index, type, normalized, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP3uiv( + uint index, + GlEnum type, + Brutal.Bool8 normalized, + ReadOnlySpan value + ) + { + fixed (uint* valuePtr = value) + Native.glVertexAttribP3uiv(index, type, normalized, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP4ui(uint index, GlEnum type, Brutal.Bool8 normalized, uint value) + { + Native.glVertexAttribP4ui(index, type, normalized, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribP4uiv( + uint index, + GlEnum type, + Brutal.Bool8 normalized, + ReadOnlySpan value + ) + { + fixed (uint* valuePtr = value) + Native.glVertexAttribP4uiv(index, type, normalized, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexP2ui(GlEnum type, uint value) + { + Native.glVertexP2ui(type, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexP2uiv(GlEnum type, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glVertexP2uiv(type, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexP3ui(GlEnum type, uint value) + { + Native.glVertexP3ui(type, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexP3uiv(GlEnum type, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glVertexP3uiv(type, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexP4ui(GlEnum type, uint value) + { + Native.glVertexP4ui(type, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexP4uiv(GlEnum type, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glVertexP4uiv(type, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP1ui(GlEnum type, uint coords) + { + Native.glTexCoordP1ui(type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP1uiv(GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glTexCoordP1uiv(type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP2ui(GlEnum type, uint coords) + { + Native.glTexCoordP2ui(type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP2uiv(GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glTexCoordP2uiv(type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP3ui(GlEnum type, uint coords) + { + Native.glTexCoordP3ui(type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP3uiv(GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glTexCoordP3uiv(type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP4ui(GlEnum type, uint coords) + { + Native.glTexCoordP4ui(type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexCoordP4uiv(GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glTexCoordP4uiv(type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP1ui(GlEnum texture, GlEnum type, uint coords) + { + Native.glMultiTexCoordP1ui(texture, type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP1uiv(GlEnum texture, GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glMultiTexCoordP1uiv(texture, type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP2ui(GlEnum texture, GlEnum type, uint coords) + { + Native.glMultiTexCoordP2ui(texture, type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP2uiv(GlEnum texture, GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glMultiTexCoordP2uiv(texture, type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP3ui(GlEnum texture, GlEnum type, uint coords) + { + Native.glMultiTexCoordP3ui(texture, type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP3uiv(GlEnum texture, GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glMultiTexCoordP3uiv(texture, type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP4ui(GlEnum texture, GlEnum type, uint coords) + { + Native.glMultiTexCoordP4ui(texture, type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MultiTexCoordP4uiv(GlEnum texture, GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glMultiTexCoordP4uiv(texture, type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NormalP3ui(GlEnum type, uint coords) + { + Native.glNormalP3ui(type, coords); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NormalP3uiv(GlEnum type, ReadOnlySpan coords) + { + fixed (uint* coordsPtr = coords) + Native.glNormalP3uiv(type, coordsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ColorP3ui(GlEnum type, uint color) + { + Native.glColorP3ui(type, color); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ColorP3uiv(GlEnum type, ReadOnlySpan color) + { + fixed (uint* colorPtr = color) + Native.glColorP3uiv(type, colorPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ColorP4ui(GlEnum type, uint color) + { + Native.glColorP4ui(type, color); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ColorP4uiv(GlEnum type, ReadOnlySpan color) + { + fixed (uint* colorPtr = color) + Native.glColorP4uiv(type, colorPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SecondaryColorP3ui(GlEnum type, uint color) + { + Native.glSecondaryColorP3ui(type, color); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SecondaryColorP3uiv(GlEnum type, ReadOnlySpan color) + { + fixed (uint* colorPtr = color) + Native.glSecondaryColorP3uiv(type, colorPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MinSampleShading(float value) + { + Native.glMinSampleShading(value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendEquationi(uint buf, GlEnum mode) + { + Native.glBlendEquationi(buf, mode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendEquationSeparatei(uint buf, GlEnum modeRGB, GlEnum modeAlpha) + { + Native.glBlendEquationSeparatei(buf, modeRGB, modeAlpha); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendFunci(uint buf, GlEnum src, GlEnum dst) + { + Native.glBlendFunci(buf, src, dst); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlendFuncSeparatei( + uint buf, + GlEnum srcRGB, + GlEnum dstRGB, + GlEnum srcAlpha, + GlEnum dstAlpha + ) + { + Native.glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetSubroutineUniformLocation( + GlProgram program, + GlEnum shadertype, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + return Native.glGetSubroutineUniformLocation(program, shadertype, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe uint GetSubroutineIndex(GlProgram program, GlEnum shadertype, ReadOnlySpan name) + { + fixed (byte* namePtr = name) + return Native.glGetSubroutineIndex(program, shadertype, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveSubroutineUniformiv( + GlProgram program, + GlEnum shadertype, + uint index, + GlEnum pname, + ReadOnlySpan values + ) + { + fixed (int* valuesPtr = values) + Native.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveSubroutineUniformName( + GlProgram program, + GlEnum shadertype, + uint index, + int bufSize, + int* length, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glGetActiveSubroutineUniformName(program, shadertype, index, bufSize, length, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveSubroutineName( + GlProgram program, + GlEnum shadertype, + uint index, + int bufSize, + int* length, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glGetActiveSubroutineName(program, shadertype, index, bufSize, length, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UniformSubroutinesuiv(GlEnum shadertype, ReadOnlySpan indices) + { + fixed (uint* indicesPtr = indices) + Native.glUniformSubroutinesuiv(shadertype, indices.Length, indicesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetUniformSubroutineuiv(GlEnum shadertype, int location, ReadOnlySpan @params) + { + fixed (uint* @paramsPtr = @params) + Native.glGetUniformSubroutineuiv(shadertype, location, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramStageiv( + GlProgram program, + GlEnum shadertype, + GlEnum pname, + ReadOnlySpan values + ) + { + fixed (int* valuesPtr = values) + Native.glGetProgramStageiv(program, shadertype, pname, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PatchParameteri(GlEnum pname, int value) + { + Native.glPatchParameteri(pname, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PatchParameterfv(GlEnum pname, ReadOnlySpan values) + { + fixed (float* valuesPtr = values) + Native.glPatchParameterfv(pname, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTransformFeedback(GlEnum target, uint id) + { + Native.glBindTransformFeedback(target, id); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteTransformFeedbacks(ReadOnlySpan ids) + { + fixed (uint* idsPtr = ids) + Native.glDeleteTransformFeedbacks(ids.Length, idsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenTransformFeedbacks(ReadOnlySpan ids) + { + fixed (uint* idsPtr = ids) + Native.glGenTransformFeedbacks(ids.Length, idsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsTransformFeedback(uint id) + { + return Native.glIsTransformFeedback(id); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PauseTransformFeedback() + { + Native.glPauseTransformFeedback(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ResumeTransformFeedback() + { + Native.glResumeTransformFeedback(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginQueryIndexed(GlEnum target, uint index, GlQuery id) + { + Native.glBeginQueryIndexed(target, index, id); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndQueryIndexed(GlEnum target, uint index) + { + Native.glEndQueryIndexed(target, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryIndexediv(GlEnum target, uint index, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetQueryIndexediv(target, index, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ReleaseShaderCompiler() + { + Native.glReleaseShaderCompiler(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ShaderBinary( + int count, + GlShader* shaders, + GlEnum binaryFormat, + void* binary, + int length + ) + { + Native.glShaderBinary(count, shaders, binaryFormat, binary, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetShaderPrecisionFormat( + GlEnum shadertype, + GlEnum precisiontype, + int* range, + ReadOnlySpan precision + ) + { + fixed (int* precisionPtr = precision) + Native.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precisionPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DepthRangef(float n, float f) + { + Native.glDepthRangef(n, f); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearDepthf(float d) + { + Native.glClearDepthf(d); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramBinary( + GlProgram program, + int bufSize, + int* length, + GlEnum* binaryFormat, + void* binary + ) + { + Native.glGetProgramBinary(program, bufSize, length, binaryFormat, binary); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramBinary(GlProgram program, GlEnum binaryFormat, void* binary, int length) + { + Native.glProgramBinary(program, binaryFormat, binary, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramParameteri(GlProgram program, GlEnum pname, int value) + { + Native.glProgramParameteri(program, pname, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UseProgramStages(GlPipeline pipeline, GlBitfield stages, GlProgram program) + { + Native.glUseProgramStages(pipeline, stages, program); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ActiveShaderProgram(GlPipeline pipeline, GlProgram program) + { + Native.glActiveShaderProgram(pipeline, program); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindProgramPipeline(GlPipeline pipeline) + { + Native.glBindProgramPipeline(pipeline); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DeleteProgramPipelines(ReadOnlySpan pipelines) + { + fixed (GlPipeline* pipelinesPtr = pipelines) + Native.glDeleteProgramPipelines(pipelines.Length, pipelinesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenProgramPipelines(ReadOnlySpan pipelines) + { + fixed (GlPipeline* pipelinesPtr = pipelines) + Native.glGenProgramPipelines(pipelines.Length, pipelinesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 IsProgramPipeline(GlPipeline pipeline) + { + return Native.glIsProgramPipeline(pipeline); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramPipelineiv(GlPipeline pipeline, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetProgramPipelineiv(pipeline, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1i(GlProgram program, int location, int v0) + { + Native.glProgramUniform1i(program, location, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1iv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (int* valuePtr = value) + Native.glProgramUniform1iv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1f(GlProgram program, int location, float v0) + { + Native.glProgramUniform1f(program, location, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1fv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (float* valuePtr = value) + Native.glProgramUniform1fv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1d(GlProgram program, int location, double v0) + { + Native.glProgramUniform1d(program, location, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1dv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glProgramUniform1dv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1ui(GlProgram program, int location, uint v0) + { + Native.glProgramUniform1ui(program, location, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform1uiv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glProgramUniform1uiv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2i(GlProgram program, int location, int v0, int v1) + { + Native.glProgramUniform2i(program, location, v0, v1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2iv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (int* valuePtr = value) + Native.glProgramUniform2iv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2f(GlProgram program, int location, float v0, float v1) + { + Native.glProgramUniform2f(program, location, v0, v1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2fv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (float* valuePtr = value) + Native.glProgramUniform2fv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2d(GlProgram program, int location, double v0, double v1) + { + Native.glProgramUniform2d(program, location, v0, v1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2dv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glProgramUniform2dv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2ui(GlProgram program, int location, uint v0, uint v1) + { + Native.glProgramUniform2ui(program, location, v0, v1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform2uiv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glProgramUniform2uiv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3i(GlProgram program, int location, int v0, int v1, int v2) + { + Native.glProgramUniform3i(program, location, v0, v1, v2); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3iv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (int* valuePtr = value) + Native.glProgramUniform3iv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3f(GlProgram program, int location, float v0, float v1, float v2) + { + Native.glProgramUniform3f(program, location, v0, v1, v2); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3fv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (float* valuePtr = value) + Native.glProgramUniform3fv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3d(GlProgram program, int location, double v0, double v1, double v2) + { + Native.glProgramUniform3d(program, location, v0, v1, v2); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3dv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glProgramUniform3dv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3ui(GlProgram program, int location, uint v0, uint v1, uint v2) + { + Native.glProgramUniform3ui(program, location, v0, v1, v2); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform3uiv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glProgramUniform3uiv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4i(GlProgram program, int location, int v0, int v1, int v2, int v3) + { + Native.glProgramUniform4i(program, location, v0, v1, v2, v3); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4iv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (int* valuePtr = value) + Native.glProgramUniform4iv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4f( + GlProgram program, + int location, + float v0, + float v1, + float v2, + float v3 + ) + { + Native.glProgramUniform4f(program, location, v0, v1, v2, v3); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4fv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (float* valuePtr = value) + Native.glProgramUniform4fv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4d( + GlProgram program, + int location, + double v0, + double v1, + double v2, + double v3 + ) + { + Native.glProgramUniform4d(program, location, v0, v1, v2, v3); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4dv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glProgramUniform4dv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4ui(GlProgram program, int location, uint v0, uint v1, uint v2, uint v3) + { + Native.glProgramUniform4ui(program, location, v0, v1, v2, v3); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniform4uiv(GlProgram program, int location, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glProgramUniform4uiv(program, location, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix2fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix2fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix3fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix3fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix4fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix4fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix2dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix2dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix3dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix3dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix4dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix4dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix2x3fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix2x3fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix3x2fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix3x2fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix2x4fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix2x4fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix4x2fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix4x2fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix3x4fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix3x4fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix4x3fv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glProgramUniformMatrix4x3fv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix2x3dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix2x3dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix3x2dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix3x2dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix2x4dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix2x4dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix4x2dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix4x2dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix3x4dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix3x4dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ProgramUniformMatrix4x3dv( + GlProgram program, + int location, + int count, + Brutal.Bool8 transpose, + ReadOnlySpan value + ) + { + fixed (double* valuePtr = value) + Native.glProgramUniformMatrix4x3dv(program, location, count, transpose, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ValidateProgramPipeline(GlPipeline pipeline) + { + Native.glValidateProgramPipeline(pipeline); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramPipelineInfoLog( + GlPipeline pipeline, + int bufSize, + int* length, + ReadOnlySpan infoLog + ) + { + fixed (byte* infoLogPtr = infoLog) + Native.glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLogPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL1d(uint index, double x) + { + Native.glVertexAttribL1d(index, x); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL2d(uint index, double x, double y) + { + Native.glVertexAttribL2d(index, x, y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL3d(uint index, double x, double y, double z) + { + Native.glVertexAttribL3d(index, x, y, z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL4d(uint index, double x, double y, double z, double w) + { + Native.glVertexAttribL4d(index, x, y, z, w); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL1dv(uint index, ReadOnlySpan v) + { + fixed (double* vPtr = v) + Native.glVertexAttribL1dv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL2dv(uint index, ReadOnlySpan v) + { + fixed (double* vPtr = v) + Native.glVertexAttribL2dv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL3dv(uint index, ReadOnlySpan v) + { + fixed (double* vPtr = v) + Native.glVertexAttribL3dv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribL4dv(uint index, ReadOnlySpan v) + { + fixed (double* vPtr = v) + Native.glVertexAttribL4dv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribLPointer(uint index, int size, GlEnum type, int stride, void* pointer) + { + Native.glVertexAttribLPointer(index, size, type, stride, pointer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ViewportArrayv(uint first, ReadOnlySpan v) + { + fixed (float* vPtr = v) + Native.glViewportArrayv(first, v.Length, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ViewportIndexedf(uint index, float x, float y, float w, float h) + { + Native.glViewportIndexedf(index, x, y, w, h); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ViewportIndexedfv(uint index, ReadOnlySpan v) + { + fixed (float* vPtr = v) + Native.glViewportIndexedfv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ScissorArrayv(uint first, ReadOnlySpan v) + { + fixed (int* vPtr = v) + Native.glScissorArrayv(first, v.Length, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ScissorIndexed(uint index, int left, int bottom, int width, int height) + { + Native.glScissorIndexed(index, left, bottom, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ScissorIndexedv(uint index, ReadOnlySpan v) + { + fixed (int* vPtr = v) + Native.glScissorIndexedv(index, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DepthRangeArrayv(uint first, ReadOnlySpan v) + { + fixed (double* vPtr = v) + Native.glDepthRangeArrayv(first, v.Length, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DepthRangeIndexed(uint index, double n, double f) + { + Native.glDepthRangeIndexed(index, n, f); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFloati_v(GlEnum target, uint index, ReadOnlySpan data) + { + fixed (float* dataPtr = data) + Native.glGetFloati_v(target, index, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDoublei_v(GlEnum target, uint index, ReadOnlySpan data) + { + fixed (double* dataPtr = data) + Native.glGetDoublei_v(target, index, dataPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetInternalformativ( + GlEnum target, + GlEnum internalformat, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetInternalformativ(target, internalformat, pname, @params.Length, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetActiveAtomicCounterBufferiv( + GlProgram program, + uint bufferIndex, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindImageTexture( + uint unit, + uint texture, + int level, + Brutal.Bool8 layered, + int layer, + GlEnum access, + GlEnum format + ) + { + Native.glBindImageTexture(unit, texture, level, layered, layer, access, format); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MemoryBarrier(GlBitfield barriers) + { + Native.glMemoryBarrier(barriers); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexStorage1D(GlEnum target, int levels, GlEnum internalformat, int width) + { + Native.glTexStorage1D(target, levels, internalformat, width); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexStorage2D(GlEnum target, int levels, GlEnum internalformat, int width, int height) + { + Native.glTexStorage2D(target, levels, internalformat, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexStorage3D( + GlEnum target, + int levels, + GlEnum internalformat, + int width, + int height, + int depth + ) + { + Native.glTexStorage3D(target, levels, internalformat, width, height, depth); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearBufferData( + GlEnum target, + GlEnum internalformat, + GlEnum format, + GlEnum type, + void* data + ) + { + Native.glClearBufferData(target, internalformat, format, type, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearBufferSubData( + GlEnum target, + GlEnum internalformat, + nint offset, + nint size, + GlEnum format, + GlEnum type, + void* data + ) + { + Native.glClearBufferSubData(target, internalformat, offset, size, format, type, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DispatchCompute(uint num_groups_x, uint num_groups_y, uint num_groups_z) + { + Native.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DispatchComputeIndirect(nint indirect) + { + Native.glDispatchComputeIndirect(indirect); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageSubData( + uint srcName, + GlEnum srcTarget, + int srcLevel, + int srcX, + int srcY, + int srcZ, + uint dstName, + GlEnum dstTarget, + int dstLevel, + int dstX, + int dstY, + int dstZ, + int srcWidth, + int srcHeight, + int srcDepth + ) + { + Native.glCopyImageSubData( + srcName, + srcTarget, + srcLevel, + srcX, + srcY, + srcZ, + dstName, + dstTarget, + dstLevel, + dstX, + dstY, + dstZ, + srcWidth, + srcHeight, + srcDepth + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FramebufferParameteri(GlEnum target, GlEnum pname, int param) + { + Native.glFramebufferParameteri(target, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFramebufferParameteriv(GlEnum target, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetFramebufferParameteriv(target, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetInternalformati64v( + GlEnum target, + GlEnum internalformat, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (long* @paramsPtr = @params) + Native.glGetInternalformati64v(target, internalformat, pname, @params.Length, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateTexSubImage( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth + ) + { + Native.glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateTexImage(uint texture, int level) + { + Native.glInvalidateTexImage(texture, level); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateBufferSubData(GlBuffer buffer, nint offset, nint length) + { + Native.glInvalidateBufferSubData(buffer, offset, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateBufferData(GlBuffer buffer) + { + Native.glInvalidateBufferData(buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateFramebuffer( + GlEnum target, + int numAttachments, + ReadOnlySpan attachments + ) + { + fixed (GlEnum* attachmentsPtr = attachments) + Native.glInvalidateFramebuffer(target, numAttachments, attachmentsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateSubFramebuffer( + GlEnum target, + int numAttachments, + GlEnum* attachments, + int x, + int y, + int width, + int height + ) + { + Native.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramInterfaceiv( + GlProgram program, + GlEnum programInterface, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetProgramInterfaceiv(program, programInterface, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe uint GetProgramResourceIndex( + GlProgram program, + GlEnum programInterface, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + return Native.glGetProgramResourceIndex(program, programInterface, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramResourceName( + GlProgram program, + GlEnum programInterface, + uint index, + int bufSize, + int* length, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + Native.glGetProgramResourceName(program, programInterface, index, bufSize, length, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProgramResourceiv( + GlProgram program, + GlEnum programInterface, + uint index, + int propCount, + GlEnum* props, + int count, + int* length, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetProgramResourceiv( + program, + programInterface, + index, + propCount, + props, + count, + length, + @paramsPtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetProgramResourceLocation( + GlProgram program, + GlEnum programInterface, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + return Native.glGetProgramResourceLocation(program, programInterface, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetProgramResourceLocationIndex( + GlProgram program, + GlEnum programInterface, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + return Native.glGetProgramResourceLocationIndex(program, programInterface, namePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ShaderStorageBlockBinding( + GlProgram program, + uint storageBlockIndex, + uint storageBlockBinding + ) + { + Native.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexBufferRange( + GlEnum target, + GlEnum internalformat, + GlBuffer buffer, + nint offset, + nint size + ) + { + Native.glTexBufferRange(target, internalformat, buffer, offset, size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexStorage2DMultisample( + GlEnum target, + int samples, + GlEnum internalformat, + int width, + int height, + Brutal.Bool8 fixedsamplelocations + ) + { + Native.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TexStorage3DMultisample( + GlEnum target, + int samples, + GlEnum internalformat, + int width, + int height, + int depth, + Brutal.Bool8 fixedsamplelocations + ) + { + Native.glTexStorage3DMultisample( + target, + samples, + internalformat, + width, + height, + depth, + fixedsamplelocations + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureView( + uint texture, + GlEnum target, + uint origtexture, + GlEnum internalformat, + uint minlevel, + uint numlevels, + uint minlayer, + uint numlayers + ) + { + Native.glTextureView( + texture, + target, + origtexture, + internalformat, + minlevel, + numlevels, + minlayer, + numlayers + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVertexBuffer(uint bindingindex, GlBuffer buffer, nint offset, int stride) + { + Native.glBindVertexBuffer(bindingindex, buffer, offset, stride); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribFormat( + uint attribindex, + int size, + GlEnum type, + Brutal.Bool8 normalized, + uint relativeoffset + ) + { + Native.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribIFormat(uint attribindex, int size, GlEnum type, uint relativeoffset) + { + Native.glVertexAttribIFormat(attribindex, size, type, relativeoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribLFormat(uint attribindex, int size, GlEnum type, uint relativeoffset) + { + Native.glVertexAttribLFormat(attribindex, size, type, relativeoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexAttribBinding(uint attribindex, uint bindingindex) + { + Native.glVertexAttribBinding(attribindex, bindingindex); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexBindingDivisor(uint bindingindex, uint divisor) + { + Native.glVertexBindingDivisor(bindingindex, divisor); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMessageControl( + GlEnum source, + GlEnum type, + GlEnum severity, + int count, + uint* ids, + Brutal.Bool8 enabled + ) + { + Native.glDebugMessageControl(source, type, severity, count, ids, enabled); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMessageInsert( + GlEnum source, + GlEnum type, + uint id, + GlEnum severity, + int length, + ReadOnlySpan buf + ) + { + fixed (byte* bufPtr = buf) + Native.glDebugMessageInsert(source, type, id, severity, length, bufPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMessageCallback(nint* callback, void* userParam) + { + Native.glDebugMessageCallback(callback, userParam); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe uint GetDebugMessageLog( + uint count, + int bufSize, + GlEnum* sources, + GlEnum* types, + uint* ids, + GlEnum* severities, + int* lengths, + ReadOnlySpan messageLog + ) + { + fixed (byte* messageLogPtr = messageLog) + return Native.glGetDebugMessageLog( + count, + bufSize, + sources, + types, + ids, + severities, + lengths, + messageLogPtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDebugGroup(GlEnum source, uint id, int length, ReadOnlySpan message) + { + fixed (byte* messagePtr = message) + Native.glPushDebugGroup(source, id, length, messagePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PopDebugGroup() + { + Native.glPopDebugGroup(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ObjectLabel(GlEnum identifier, uint name, int length, ReadOnlySpan label) + { + fixed (byte* labelPtr = label) + Native.glObjectLabel(identifier, name, length, labelPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetObjectLabel( + GlEnum identifier, + uint name, + int bufSize, + int* length, + ReadOnlySpan label + ) + { + fixed (byte* labelPtr = label) + Native.glGetObjectLabel(identifier, name, bufSize, length, labelPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ObjectPtrLabel(void* ptr, int length, ReadOnlySpan label) + { + fixed (byte* labelPtr = label) + Native.glObjectPtrLabel(ptr, length, labelPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetObjectPtrLabel(void* ptr, int bufSize, int* length, ReadOnlySpan label) + { + fixed (byte* labelPtr = label) + Native.glGetObjectPtrLabel(ptr, bufSize, length, labelPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetPointerv(GlEnum pname, void** @params) + { + Native.glGetPointerv(pname, @params); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BufferStorage(GlEnum target, nint size, void* data, GlBitfield flags) + { + Native.glBufferStorage(target, size, data, flags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearTexImage(uint texture, int level, GlEnum format, GlEnum type, void* data) + { + Native.glClearTexImage(texture, level, format, type, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearTexSubImage( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + GlEnum format, + GlEnum type, + void* data + ) + { + Native.glClearTexSubImage( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindBuffersBase(GlEnum target, uint first, ReadOnlySpan buffers) + { + fixed (GlBuffer* buffersPtr = buffers) + Native.glBindBuffersBase(target, first, buffers.Length, buffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindBuffersRange( + GlEnum target, + uint first, + int count, + GlBuffer* buffers, + nint* offsets, + ReadOnlySpan sizes + ) + { + fixed (nint* sizesPtr = sizes) + Native.glBindBuffersRange(target, first, count, buffers, offsets, sizesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTextures(uint first, ReadOnlySpan textures) + { + fixed (GlTexture* texturesPtr = textures) + Native.glBindTextures(first, textures.Length, texturesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindSamplers(uint first, ReadOnlySpan samplers) + { + fixed (GlSampler* samplersPtr = samplers) + Native.glBindSamplers(first, samplers.Length, samplersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindImageTextures(uint first, ReadOnlySpan textures) + { + fixed (GlTexture* texturesPtr = textures) + Native.glBindImageTextures(first, textures.Length, texturesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVertexBuffers( + uint first, + int count, + GlBuffer* buffers, + nint* offsets, + ReadOnlySpan strides + ) + { + fixed (int* stridesPtr = strides) + Native.glBindVertexBuffers(first, count, buffers, offsets, stridesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClipControl(GlEnum origin, GlEnum depth) + { + Native.glClipControl(origin, depth); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateTransformFeedbacks(ReadOnlySpan ids) + { + fixed (uint* idsPtr = ids) + Native.glCreateTransformFeedbacks(ids.Length, idsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TransformFeedbackBufferBase(uint xfb, uint index, GlBuffer buffer) + { + Native.glTransformFeedbackBufferBase(xfb, index, buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TransformFeedbackBufferRange( + uint xfb, + uint index, + GlBuffer buffer, + nint offset, + nint size + ) + { + Native.glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTransformFeedbackiv(uint xfb, GlEnum pname, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glGetTransformFeedbackiv(xfb, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTransformFeedbacki_v(uint xfb, GlEnum pname, uint index, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glGetTransformFeedbacki_v(xfb, pname, index, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTransformFeedbacki64_v( + uint xfb, + GlEnum pname, + uint index, + ReadOnlySpan param + ) + { + fixed (long* paramPtr = param) + Native.glGetTransformFeedbacki64_v(xfb, pname, index, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateBuffers(ReadOnlySpan buffers) + { + fixed (GlBuffer* buffersPtr = buffers) + Native.glCreateBuffers(buffers.Length, buffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedBufferStorage(GlBuffer buffer, nint size, void* data, GlBitfield flags) + { + Native.glNamedBufferStorage(buffer, size, data, flags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedBufferData(GlBuffer buffer, nint size, void* data, GlEnum usage) + { + Native.glNamedBufferData(buffer, size, data, usage); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedBufferSubData(GlBuffer buffer, nint offset, nint size, void* data) + { + Native.glNamedBufferSubData(buffer, offset, size, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyNamedBufferSubData( + uint readBuffer, + uint writeBuffer, + nint readOffset, + nint writeOffset, + nint size + ) + { + Native.glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearNamedBufferData( + GlBuffer buffer, + GlEnum internalformat, + GlEnum format, + GlEnum type, + void* data + ) + { + Native.glClearNamedBufferData(buffer, internalformat, format, type, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearNamedBufferSubData( + GlBuffer buffer, + GlEnum internalformat, + nint offset, + nint size, + GlEnum format, + GlEnum type, + void* data + ) + { + Native.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* MapNamedBuffer(GlBuffer buffer, GlEnum access) + { + return Native.glMapNamedBuffer(buffer, access); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* MapNamedBufferRange(GlBuffer buffer, nint offset, nint length, GlBitfield access) + { + return Native.glMapNamedBufferRange(buffer, offset, length, access); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool8 UnmapNamedBuffer(GlBuffer buffer) + { + return Native.glUnmapNamedBuffer(buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FlushMappedNamedBufferRange(GlBuffer buffer, nint offset, nint length) + { + Native.glFlushMappedNamedBufferRange(buffer, offset, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedBufferParameteriv(GlBuffer buffer, GlEnum pname, ReadOnlySpan @params) + { + fixed (int* @paramsPtr = @params) + Native.glGetNamedBufferParameteriv(buffer, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedBufferParameteri64v(GlBuffer buffer, GlEnum pname, ReadOnlySpan @params) + { + fixed (long* @paramsPtr = @params) + Native.glGetNamedBufferParameteri64v(buffer, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedBufferPointerv(GlBuffer buffer, GlEnum pname, void** @params) + { + Native.glGetNamedBufferPointerv(buffer, pname, @params); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedBufferSubData(GlBuffer buffer, nint offset, nint size, void* data) + { + Native.glGetNamedBufferSubData(buffer, offset, size, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateFramebuffers(ReadOnlySpan framebuffers) + { + fixed (GlFramebuffer* framebuffersPtr = framebuffers) + Native.glCreateFramebuffers(framebuffers.Length, framebuffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferRenderbuffer( + GlFramebuffer framebuffer, + GlEnum attachment, + GlEnum renderbuffertarget, + GlRenderbuffer renderbuffer + ) + { + Native.glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferParameteri(GlFramebuffer framebuffer, GlEnum pname, int param) + { + Native.glNamedFramebufferParameteri(framebuffer, pname, param); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferTexture( + GlFramebuffer framebuffer, + GlEnum attachment, + uint texture, + int level + ) + { + Native.glNamedFramebufferTexture(framebuffer, attachment, texture, level); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferTextureLayer( + GlFramebuffer framebuffer, + GlEnum attachment, + uint texture, + int level, + int layer + ) + { + Native.glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferDrawBuffer(GlFramebuffer framebuffer, GlEnum buf) + { + Native.glNamedFramebufferDrawBuffer(framebuffer, buf); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferDrawBuffers(GlFramebuffer framebuffer, ReadOnlySpan bufs) + { + fixed (GlEnum* bufsPtr = bufs) + Native.glNamedFramebufferDrawBuffers(framebuffer, bufs.Length, bufsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedFramebufferReadBuffer(GlFramebuffer framebuffer, GlEnum src) + { + Native.glNamedFramebufferReadBuffer(framebuffer, src); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateNamedFramebufferData( + GlFramebuffer framebuffer, + int numAttachments, + ReadOnlySpan attachments + ) + { + fixed (GlEnum* attachmentsPtr = attachments) + Native.glInvalidateNamedFramebufferData(framebuffer, numAttachments, attachmentsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateNamedFramebufferSubData( + GlFramebuffer framebuffer, + int numAttachments, + GlEnum* attachments, + int x, + int y, + int width, + int height + ) + { + Native.glInvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearNamedFramebufferiv( + GlFramebuffer framebuffer, + GlBuffer buffer, + int drawbuffer, + ReadOnlySpan value + ) + { + fixed (int* valuePtr = value) + Native.glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearNamedFramebufferuiv( + GlFramebuffer framebuffer, + GlBuffer buffer, + int drawbuffer, + ReadOnlySpan value + ) + { + fixed (uint* valuePtr = value) + Native.glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearNamedFramebufferfv( + GlFramebuffer framebuffer, + GlBuffer buffer, + int drawbuffer, + ReadOnlySpan value + ) + { + fixed (float* valuePtr = value) + Native.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearNamedFramebufferfi( + GlFramebuffer framebuffer, + GlBuffer buffer, + int drawbuffer, + float depth, + int stencil + ) + { + Native.glClearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlitNamedFramebuffer( + uint readFramebuffer, + uint drawFramebuffer, + int srcX0, + int srcY0, + int srcX1, + int srcY1, + int dstX0, + int dstY0, + int dstX1, + int dstY1, + GlBitfield mask, + GlEnum filter + ) + { + Native.glBlitNamedFramebuffer( + readFramebuffer, + drawFramebuffer, + srcX0, + srcY0, + srcX1, + srcY1, + dstX0, + dstY0, + dstX1, + dstY1, + mask, + filter + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlEnum CheckNamedFramebufferStatus(GlFramebuffer framebuffer, GlEnum target) + { + return Native.glCheckNamedFramebufferStatus(framebuffer, target); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedFramebufferParameteriv( + GlFramebuffer framebuffer, + GlEnum pname, + ReadOnlySpan param + ) + { + fixed (int* paramPtr = param) + Native.glGetNamedFramebufferParameteriv(framebuffer, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedFramebufferAttachmentParameteriv( + GlFramebuffer framebuffer, + GlEnum attachment, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateRenderbuffers(ReadOnlySpan renderbuffers) + { + fixed (GlRenderbuffer* renderbuffersPtr = renderbuffers) + Native.glCreateRenderbuffers(renderbuffers.Length, renderbuffersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedRenderbufferStorage( + GlRenderbuffer renderbuffer, + GlEnum internalformat, + int width, + int height + ) + { + Native.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NamedRenderbufferStorageMultisample( + GlRenderbuffer renderbuffer, + int samples, + GlEnum internalformat, + int width, + int height + ) + { + Native.glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetNamedRenderbufferParameteriv( + GlRenderbuffer renderbuffer, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetNamedRenderbufferParameteriv(renderbuffer, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateTextures(GlEnum target, ReadOnlySpan textures) + { + fixed (GlTexture* texturesPtr = textures) + Native.glCreateTextures(target, textures.Length, texturesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureBuffer(uint texture, GlEnum internalformat, GlBuffer buffer) + { + Native.glTextureBuffer(texture, internalformat, buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureBufferRange( + uint texture, + GlEnum internalformat, + GlBuffer buffer, + nint offset, + nint size + ) + { + Native.glTextureBufferRange(texture, internalformat, buffer, offset, size); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureStorage1D(uint texture, int levels, GlEnum internalformat, int width) + { + Native.glTextureStorage1D(texture, levels, internalformat, width); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureStorage2D( + uint texture, + int levels, + GlEnum internalformat, + int width, + int height + ) + { + Native.glTextureStorage2D(texture, levels, internalformat, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureStorage3D( + uint texture, + int levels, + GlEnum internalformat, + int width, + int height, + int depth + ) + { + Native.glTextureStorage3D(texture, levels, internalformat, width, height, depth); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureStorage2DMultisample( + uint texture, + int samples, + GlEnum internalformat, + int width, + int height, + Brutal.Bool8 fixedsamplelocations + ) + { + Native.glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureStorage3DMultisample( + uint texture, + int samples, + GlEnum internalformat, + int width, + int height, + int depth, + Brutal.Bool8 fixedsamplelocations + ) + { + Native.glTextureStorage3DMultisample( + texture, + samples, + internalformat, + width, + height, + depth, + fixedsamplelocations + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureSubImage1D( + uint texture, + int level, + int xoffset, + int width, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureSubImage2D( + uint texture, + int level, + int xoffset, + int yoffset, + int width, + int height, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureSubImage3D( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + GlEnum format, + GlEnum type, + void* pixels + ) + { + Native.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTextureSubImage1D( + uint texture, + int level, + int xoffset, + int width, + GlEnum format, + int imageSize, + void* data + ) + { + Native.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTextureSubImage2D( + uint texture, + int level, + int xoffset, + int yoffset, + int width, + int height, + GlEnum format, + int imageSize, + void* data + ) + { + Native.glCompressedTextureSubImage2D( + texture, + level, + xoffset, + yoffset, + width, + height, + format, + imageSize, + data + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CompressedTextureSubImage3D( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + GlEnum format, + int imageSize, + void* data + ) + { + Native.glCompressedTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + imageSize, + data + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTextureSubImage1D(uint texture, int level, int xoffset, int x, int y, int width) + { + Native.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTextureSubImage2D( + uint texture, + int level, + int xoffset, + int yoffset, + int x, + int y, + int width, + int height + ) + { + Native.glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTextureSubImage3D( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int x, + int y, + int width, + int height + ) + { + Native.glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GenerateTextureMipmap(uint texture) + { + Native.glGenerateTextureMipmap(texture); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTextureUnit(uint unit, uint texture) + { + Native.glBindTextureUnit(unit, texture); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureImage( + uint texture, + int level, + GlEnum format, + GlEnum type, + int bufSize, + void* pixels + ) + { + Native.glGetTextureImage(texture, level, format, type, bufSize, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetCompressedTextureImage(uint texture, int level, int bufSize, void* pixels) + { + Native.glGetCompressedTextureImage(texture, level, bufSize, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureLevelParameterfv( + uint texture, + int level, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (float* @paramsPtr = @params) + Native.glGetTextureLevelParameterfv(texture, level, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureLevelParameteriv( + uint texture, + int level, + GlEnum pname, + ReadOnlySpan @params + ) + { + fixed (int* @paramsPtr = @params) + Native.glGetTextureLevelParameteriv(texture, level, pname, @paramsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateVertexArrays(ReadOnlySpan arrays) + { + fixed (GlVertexArray* arraysPtr = arrays) + Native.glCreateVertexArrays(arrays.Length, arraysPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DisableVertexArrayAttrib(uint vaobj, uint index) + { + Native.glDisableVertexArrayAttrib(vaobj, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EnableVertexArrayAttrib(uint vaobj, uint index) + { + Native.glEnableVertexArrayAttrib(vaobj, index); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayElementBuffer(uint vaobj, GlBuffer buffer) + { + Native.glVertexArrayElementBuffer(vaobj, buffer); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayVertexBuffer( + uint vaobj, + uint bindingindex, + GlBuffer buffer, + nint offset, + int stride + ) + { + Native.glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayVertexBuffers( + uint vaobj, + uint first, + int count, + GlBuffer* buffers, + nint* offsets, + ReadOnlySpan strides + ) + { + fixed (int* stridesPtr = strides) + Native.glVertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, stridesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayAttribBinding(uint vaobj, uint attribindex, uint bindingindex) + { + Native.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayAttribFormat( + uint vaobj, + uint attribindex, + int size, + GlEnum type, + Brutal.Bool8 normalized, + uint relativeoffset + ) + { + Native.glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayAttribIFormat( + uint vaobj, + uint attribindex, + int size, + GlEnum type, + uint relativeoffset + ) + { + Native.glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayAttribLFormat( + uint vaobj, + uint attribindex, + int size, + GlEnum type, + uint relativeoffset + ) + { + Native.glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void VertexArrayBindingDivisor(uint vaobj, uint bindingindex, uint divisor) + { + Native.glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetVertexArrayiv(uint vaobj, GlEnum pname, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glGetVertexArrayiv(vaobj, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetVertexArrayIndexediv(uint vaobj, uint index, GlEnum pname, ReadOnlySpan param) + { + fixed (int* paramPtr = param) + Native.glGetVertexArrayIndexediv(vaobj, index, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetVertexArrayIndexed64iv( + uint vaobj, + uint index, + GlEnum pname, + ReadOnlySpan param + ) + { + fixed (long* paramPtr = param) + Native.glGetVertexArrayIndexed64iv(vaobj, index, pname, paramPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateSamplers(ReadOnlySpan samplers) + { + fixed (GlSampler* samplersPtr = samplers) + Native.glCreateSamplers(samplers.Length, samplersPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateProgramPipelines(ReadOnlySpan pipelines) + { + fixed (GlPipeline* pipelinesPtr = pipelines) + Native.glCreateProgramPipelines(pipelines.Length, pipelinesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateQueries(GlEnum target, ReadOnlySpan ids) + { + fixed (uint* idsPtr = ids) + Native.glCreateQueries(target, ids.Length, idsPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryBufferObjecti64v(uint id, GlBuffer buffer, GlEnum pname, nint offset) + { + Native.glGetQueryBufferObjecti64v(id, buffer, pname, offset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryBufferObjectiv(uint id, GlBuffer buffer, GlEnum pname, nint offset) + { + Native.glGetQueryBufferObjectiv(id, buffer, pname, offset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryBufferObjectui64v(uint id, GlBuffer buffer, GlEnum pname, nint offset) + { + Native.glGetQueryBufferObjectui64v(id, buffer, pname, offset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueryBufferObjectuiv(uint id, GlBuffer buffer, GlEnum pname, nint offset) + { + Native.glGetQueryBufferObjectuiv(id, buffer, pname, offset); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MemoryBarrierByRegion(GlBitfield barriers) + { + Native.glMemoryBarrierByRegion(barriers); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTextureSubImage( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + GlEnum format, + GlEnum type, + int bufSize, + void* pixels + ) + { + Native.glGetTextureSubImage( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + bufSize, + pixels + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetCompressedTextureSubImage( + uint texture, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + int bufSize, + void* pixels + ) + { + Native.glGetCompressedTextureSubImage( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + bufSize, + pixels + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe GlEnum GetGraphicsResetStatus() + { + return Native.glGetGraphicsResetStatus(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnCompressedTexImage(GlEnum target, int lod, int bufSize, void* pixels) + { + Native.glGetnCompressedTexImage(target, lod, bufSize, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnTexImage( + GlEnum target, + int level, + GlEnum format, + GlEnum type, + int bufSize, + void* pixels + ) + { + Native.glGetnTexImage(target, level, format, type, bufSize, pixels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ReadnPixels( + int x, + int y, + int width, + int height, + GlEnum format, + GlEnum type, + int bufSize, + void* data + ) + { + Native.glReadnPixels(x, y, width, height, format, type, bufSize, data); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnMapdv(GlEnum target, GlQuery query, int bufSize, ReadOnlySpan v) + { + fixed (double* vPtr = v) + Native.glGetnMapdv(target, query, bufSize, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnMapfv(GlEnum target, GlQuery query, int bufSize, ReadOnlySpan v) + { + fixed (float* vPtr = v) + Native.glGetnMapfv(target, query, bufSize, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnMapiv(GlEnum target, GlQuery query, int bufSize, ReadOnlySpan v) + { + fixed (int* vPtr = v) + Native.glGetnMapiv(target, query, bufSize, vPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnPixelMapfv(GlEnum map, int bufSize, ReadOnlySpan values) + { + fixed (float* valuesPtr = values) + Native.glGetnPixelMapfv(map, bufSize, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnPixelMapuiv(GlEnum map, int bufSize, ReadOnlySpan values) + { + fixed (uint* valuesPtr = values) + Native.glGetnPixelMapuiv(map, bufSize, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnPixelMapusv(GlEnum map, int bufSize, ReadOnlySpan values) + { + fixed (ushort* valuesPtr = values) + Native.glGetnPixelMapusv(map, bufSize, valuesPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnPolygonStipple(int bufSize, ReadOnlySpan pattern) + { + fixed (byte* patternPtr = pattern) + Native.glGetnPolygonStipple(bufSize, patternPtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnColorTable(GlEnum target, GlEnum format, GlEnum type, int bufSize, void* table) + { + Native.glGetnColorTable(target, format, type, bufSize, table); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnConvolutionFilter( + GlEnum target, + GlEnum format, + GlEnum type, + int bufSize, + void* image + ) + { + Native.glGetnConvolutionFilter(target, format, type, bufSize, image); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnSeparableFilter( + GlEnum target, + GlEnum format, + GlEnum type, + int rowBufSize, + void* row, + int columnBufSize, + void* column, + void* span + ) + { + Native.glGetnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize, column, span); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnHistogram( + GlEnum target, + Brutal.Bool8 reset, + GlEnum format, + GlEnum type, + int bufSize, + void* values + ) + { + Native.glGetnHistogram(target, reset, format, type, bufSize, values); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetnMinmax( + GlEnum target, + Brutal.Bool8 reset, + GlEnum format, + GlEnum type, + int bufSize, + void* values + ) + { + Native.glGetnMinmax(target, reset, format, type, bufSize, values); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TextureBarrier() + { + Native.glTextureBarrier(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SpecializeShader( + GlShader shader, + byte* pEntryPoint, + uint numSpecializationConstants, + uint* pConstantIndex, + ReadOnlySpan pConstantValue + ) + { + fixed (uint* pConstantValuePtr = pConstantValue) + Native.glSpecializeShader( + shader, + pEntryPoint, + numSpecializationConstants, + pConstantIndex, + pConstantValuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PolygonOffsetClamp(float factor, float units, float clamp) + { + Native.glPolygonOffsetClamp(factor, units, clamp); + } + } +} diff --git a/Brutal.OpenGl/Types/GlAttribute.cs b/Brutal.OpenGl/Types/GlAttribute.cs new file mode 100644 index 0000000..d7a64f8 --- /dev/null +++ b/Brutal.OpenGl/Types/GlAttribute.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlAttribute(uint Location, int Count, GlEnum Type, GlScaling Behavior, int Stride, int Offset); diff --git a/Brutal.OpenGl/Types/GlBehavior.cs b/Brutal.OpenGl/Types/GlBehavior.cs new file mode 100644 index 0000000..bc5bc08 --- /dev/null +++ b/Brutal.OpenGl/Types/GlBehavior.cs @@ -0,0 +1,10 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlBehavior : uint +{ + Fastest = GL_FASTEST, + Nicest = GL_NICEST, + DontCare = GL_DONT_CARE, +} diff --git a/Brutal.OpenGl/Types/GlBindTarget.cs b/Brutal.OpenGl/Types/GlBindTarget.cs new file mode 100644 index 0000000..5d9f83d --- /dev/null +++ b/Brutal.OpenGl/Types/GlBindTarget.cs @@ -0,0 +1,21 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlBindTarget : uint +{ + ArrayBuffer = GL_ARRAY_BUFFER, + AtomicCounterBuffer = GL_ATOMIC_COUNTER_BUFFER, + CopyReadBuffer = GL_COPY_READ_BUFFER, + CopyWriteBuffer = GL_COPY_WRITE_BUFFER, + DispatchIndirectBuffer = GL_DISPATCH_INDIRECT_BUFFER, + DrawIndirectBuffer = GL_DRAW_INDIRECT_BUFFER, + ElementArrayBuffer = GL_ELEMENT_ARRAY_BUFFER, + PixelPackBuffer = GL_PIXEL_PACK_BUFFER, + PixelUnpackBuffer = GL_PIXEL_UNPACK_BUFFER, + QueryBuffer = GL_QUERY_BUFFER, + ShaderStorageBuffer = GL_SHADER_STORAGE_BUFFER, + TextureBuffer = GL_TEXTURE_BUFFER, + TransformFeedbackBuffer = GL_TRANSFORM_FEEDBACK_BUFFER, + UniformBuffer = GL_UNIFORM_BUFFER, +} diff --git a/Brutal.OpenGl/Types/GlBitfield.cs b/Brutal.OpenGl/Types/GlBitfield.cs new file mode 100644 index 0000000..1427864 --- /dev/null +++ b/Brutal.OpenGl/Types/GlBitfield.cs @@ -0,0 +1,10 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public record struct GlBitfield(uint Id) +{ + public static implicit operator uint(GlBitfield value) => value.Id; + + public static implicit operator GlBitfield(uint value) => new(value); +} diff --git a/Brutal.OpenGl/Types/GlBuffer.cs b/Brutal.OpenGl/Types/GlBuffer.cs new file mode 100644 index 0000000..5a814ee --- /dev/null +++ b/Brutal.OpenGl/Types/GlBuffer.cs @@ -0,0 +1,12 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public readonly record struct GlBuffer(uint Id) +{ + public unsafe GlBuffer Bind(GlBindTarget target) + { + Native.glBindBuffer((uint)target, this); + return this; + } +} diff --git a/Brutal.OpenGl/Types/GlBufferUsage.cs b/Brutal.OpenGl/Types/GlBufferUsage.cs new file mode 100644 index 0000000..71e6fa5 --- /dev/null +++ b/Brutal.OpenGl/Types/GlBufferUsage.cs @@ -0,0 +1,16 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlBufferUsage : uint +{ + StreamDraw = GL_STREAM_DRAW, + StreamRead = GL_STREAM_READ, + StreamCopy = GL_STREAM_COPY, + StaticDraw = GL_STATIC_DRAW, + StaticRead = GL_STATIC_READ, + StaticCopy = GL_STATIC_COPY, + DynamicDraw = GL_DYNAMIC_DRAW, + DynamicRead = GL_DYNAMIC_READ, + DynamicCopy = GL_DYNAMIC_COPY, +} diff --git a/Brutal.OpenGl/Types/GlCapability.cs b/Brutal.OpenGl/Types/GlCapability.cs new file mode 100644 index 0000000..3066463 --- /dev/null +++ b/Brutal.OpenGl/Types/GlCapability.cs @@ -0,0 +1,42 @@ +namespace Brutal.OpenGlApi; + +using static OpenGlApi.OpenGl; + +public enum GlCapability : uint +{ + Blend = GL_BLEND, + ClipDistance0 = GL_CLIP_DISTANCE0, + ClipDistance1 = GL_CLIP_DISTANCE1, + ClipDistance2 = GL_CLIP_DISTANCE2, + ClipDistance3 = GL_CLIP_DISTANCE3, + ClipDistance4 = GL_CLIP_DISTANCE4, + ClipDistance5 = GL_CLIP_DISTANCE5, + ClipDistance6 = GL_CLIP_DISTANCE6, + ClipDistance7 = GL_CLIP_DISTANCE7, + ColorLogicOp = GL_COLOR_LOGIC_OP, + CullFace = GL_CULL_FACE, + DebugOutput = GL_DEBUG_OUTPUT, + DebugOutputSynchronous = GL_DEBUG_OUTPUT_SYNCHRONOUS, + DepthClamp = GL_DEPTH_CLAMP, + DepthTest = GL_DEPTH_TEST, + Dither = GL_DITHER, + FramebufferSrgb = GL_FRAMEBUFFER_SRGB, + LineSmooth = GL_LINE_SMOOTH, + Multisample = GL_MULTISAMPLE, + PolygonOffsetFill = GL_POLYGON_OFFSET_FILL, + PolygonOffsetLine = GL_POLYGON_OFFSET_LINE, + PolygonOffsetPoint = GL_POLYGON_OFFSET_POINT, + PolygonSmooth = GL_POLYGON_SMOOTH, + PrimitiveRestart = GL_PRIMITIVE_RESTART, + PrimitiveRestartFixedIndex = GL_PRIMITIVE_RESTART_FIXED_INDEX, + RasterizerDiscard = GL_RASTERIZER_DISCARD, + SampleAlphaToCoverage = GL_SAMPLE_ALPHA_TO_COVERAGE, + SampleAlphaToOne = GL_SAMPLE_ALPHA_TO_ONE, + SampleCoverage = GL_SAMPLE_COVERAGE, + SampleShading = GL_SAMPLE_SHADING, + SampleMask = GL_SAMPLE_MASK, + ScissorTest = GL_SCISSOR_TEST, + StencilTest = GL_STENCIL_TEST, + TextureCubeMapSeamless = GL_TEXTURE_CUBE_MAP_SEAMLESS, + ProgramPointSize = GL_PROGRAM_POINT_SIZE, +} diff --git a/Brutal.OpenGl/Types/GlClearBit.cs b/Brutal.OpenGl/Types/GlClearBit.cs new file mode 100644 index 0000000..cdb0cc6 --- /dev/null +++ b/Brutal.OpenGl/Types/GlClearBit.cs @@ -0,0 +1,11 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +[Flags] +public enum GlClearBit : uint +{ + Color = GL_COLOR_BUFFER_BIT, + Depth = GL_DEPTH_BUFFER_BIT, + Stencil = GL_STENCIL_BUFFER_BIT, +} diff --git a/Brutal.OpenGl/Types/GlEnum.cs b/Brutal.OpenGl/Types/GlEnum.cs new file mode 100644 index 0000000..618467c --- /dev/null +++ b/Brutal.OpenGl/Types/GlEnum.cs @@ -0,0 +1,8 @@ +namespace Brutal.OpenGlApi; + +public record struct GlEnum(uint Id) +{ + public static implicit operator uint(GlEnum value) => value.Id; + + public static implicit operator GlEnum(uint value) => new(value); +} diff --git a/Brutal.OpenGl/Types/GlFace.cs b/Brutal.OpenGl/Types/GlFace.cs new file mode 100644 index 0000000..9a3e4af --- /dev/null +++ b/Brutal.OpenGl/Types/GlFace.cs @@ -0,0 +1,10 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlFace : uint +{ + Front = GL_FRONT, + Back = GL_BACK, + FrontAndBack = GL_FRONT_AND_BACK, +} diff --git a/Brutal.OpenGl/Types/GlFramebuffer.cs b/Brutal.OpenGl/Types/GlFramebuffer.cs new file mode 100644 index 0000000..0590c83 --- /dev/null +++ b/Brutal.OpenGl/Types/GlFramebuffer.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlFramebuffer(uint Id); diff --git a/Brutal.OpenGl/Types/GlFrontFace.cs b/Brutal.OpenGl/Types/GlFrontFace.cs new file mode 100644 index 0000000..956bffb --- /dev/null +++ b/Brutal.OpenGl/Types/GlFrontFace.cs @@ -0,0 +1,9 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlFrontFace : uint +{ + Clockwise = GL_CW, + CounterClockwise = GL_CCW, +} diff --git a/Brutal.OpenGl/Types/GlFunc.cs b/Brutal.OpenGl/Types/GlFunc.cs new file mode 100644 index 0000000..3891e47 --- /dev/null +++ b/Brutal.OpenGl/Types/GlFunc.cs @@ -0,0 +1,15 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlFunc : uint +{ + Never = GL_NEVER, + Less = GL_LESS, + LessEqual = GL_LEQUAL, + Greater = GL_GREATER, + GreaterEqual = GL_GEQUAL, + Equal = GL_EQUAL, + NotEqual = GL_NOTEQUAL, + Always = GL_ALWAYS, +} diff --git a/Brutal.OpenGl/Types/GlGetProcAddressFunc.cs b/Brutal.OpenGl/Types/GlGetProcAddressFunc.cs new file mode 100644 index 0000000..34695c1 --- /dev/null +++ b/Brutal.OpenGl/Types/GlGetProcAddressFunc.cs @@ -0,0 +1,6 @@ +using System.Runtime.InteropServices; + +namespace Brutal.OpenGlApi; + +[UnmanagedFunctionPointer(CallingConvention.Cdecl)] +public unsafe delegate nint GlGetProcAddressFunc(byte* program); diff --git a/Brutal.OpenGl/Types/GlHint.cs b/Brutal.OpenGl/Types/GlHint.cs new file mode 100644 index 0000000..750063b --- /dev/null +++ b/Brutal.OpenGl/Types/GlHint.cs @@ -0,0 +1,11 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlHint : uint +{ + LineSmooth = GL_LINE_SMOOTH_HINT, + PolygonSmooth = GL_POLYGON_SMOOTH_HINT, + TextureCompression = GL_TEXTURE_COMPRESSION_HINT, + FragmentShaderDerivative = GL_FRAGMENT_SHADER_DERIVATIVE_HINT, +} diff --git a/Brutal.OpenGl/Types/GlIndexType.cs b/Brutal.OpenGl/Types/GlIndexType.cs new file mode 100644 index 0000000..a273b20 --- /dev/null +++ b/Brutal.OpenGl/Types/GlIndexType.cs @@ -0,0 +1,11 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +[Flags] +public enum GlIndexType : uint +{ + Byte = GL_UNSIGNED_BYTE, + UShort = GL_UNSIGNED_SHORT, + UInt = GL_UNSIGNED_INT, +} diff --git a/Brutal.OpenGl/Types/GlLogicOp.cs b/Brutal.OpenGl/Types/GlLogicOp.cs new file mode 100644 index 0000000..aa76b96 --- /dev/null +++ b/Brutal.OpenGl/Types/GlLogicOp.cs @@ -0,0 +1,23 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlLogicOp : uint +{ + Clear = GL_CLEAR, + Set = GL_SET, + Copy = GL_COPY, + CopyInverted = GL_COPY_INVERTED, + NoOp = GL_NOOP, + Invert = GL_INVERT, + And = GL_AND, + NAnd = GL_NAND, + Or = GL_OR, + NOr = GL_NOR, + XOr = GL_XOR, + Equiv = GL_EQUIV, + AndReverse = GL_AND_REVERSE, + AndInverted = GL_AND_INVERTED, + OrReverse = GL_OR_REVERSE, + OrInverted = GL_OR_INVERTED, +} diff --git a/Brutal.OpenGl/Types/GlPipeline.cs b/Brutal.OpenGl/Types/GlPipeline.cs new file mode 100644 index 0000000..cd76151 --- /dev/null +++ b/Brutal.OpenGl/Types/GlPipeline.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlPipeline(uint Id); diff --git a/Brutal.OpenGl/Types/GlProgram.cs b/Brutal.OpenGl/Types/GlProgram.cs new file mode 100644 index 0000000..df1ffd5 --- /dev/null +++ b/Brutal.OpenGl/Types/GlProgram.cs @@ -0,0 +1,1410 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices.Marshalling; +using Brutal.Numerics; + +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public readonly record struct GlProgram(uint Id) : IDisposable +{ + private enum Property : uint + { + DeleteStatus = GL_DELETE_STATUS, + LinkStatus = GL_LINK_STATUS, + ValidateStatus = GL_VALIDATE_STATUS, + InfoLogLength = GL_INFO_LOG_LENGTH, + AttachedShaders = GL_ATTACHED_SHADERS, + ActiveAtomicCounterBuffers = GL_ACTIVE_ATOMIC_COUNTER_BUFFERS, + ActiveAttributes = GL_ACTIVE_ATTRIBUTES, + ActiveAttributeMaxLength = GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, + ActiveUniforms = GL_ACTIVE_UNIFORMS, + ActiveUniformBlocks = GL_ACTIVE_UNIFORM_BLOCKS, + ActiveUniformBlockMaxNameLength = GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH, + ActiveUniformMaxLength = GL_ACTIVE_UNIFORM_MAX_LENGTH, + ComputeWorkGroupSize = GL_COMPUTE_WORK_GROUP_SIZE, + ProgramBinaryLength = GL_PROGRAM_BINARY_LENGTH, + TransformFeedbackBufferMode = GL_TRANSFORM_FEEDBACK_BUFFER_MODE, + TransformFeedbackVaryings = GL_TRANSFORM_FEEDBACK_VARYINGS, + TransformFeedbackVaryingMaxLength = GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH, + GeometryVerticesOut = GL_GEOMETRY_VERTICES_OUT, + GeometryInputType = GL_GEOMETRY_INPUT_TYPE, + GeometryOutputType = GL_GEOMETRY_OUTPUT_TYPE, + } + + public class LinkException(GlProgram program) : Exception(program.GetProgramInfoLog()); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlProgram Use() + { + Native.glUseProgram(this); + return this; + } + + #region ProgramUniform + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, int value) + { + Native.glProgramUniform1i(this, location, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int* valuePtr = values) + Native.glProgramUniform1iv(this, startLocation, values.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, float value) + { + Native.glProgramUniform1f(this, location, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float* valuePtr = values) + Native.glProgramUniform1fv(this, startLocation, values.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, double v0) + { + Native.glProgramUniform1d(this, location, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glProgramUniform1dv(this, startLocation, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, uint value) + { + Native.glProgramUniform1ui(this, location, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glProgramUniform1uiv(this, startLocation, value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, int2 value) + { + Native.glProgramUniform2i(this, location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int2* valuePtr = values) + Native.glProgramUniform2iv(this, startLocation, values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, float2 value) + { + Native.glProgramUniform2f(this, location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float2* valuePtr = values) + Native.glProgramUniform2fv(this, startLocation, values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, double2 value) + { + Native.glProgramUniform2d(this, location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (double2* valuePtr = values) + Native.glProgramUniform2dv(this, startLocation, values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, uint2 value) + { + Native.glProgramUniform2ui(this, location, value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan value) + { + fixed (uint2* valuePtr = value) + Native.glProgramUniform2uiv(this, startLocation, value.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, int3 value) + { + Native.glProgramUniform3i(this, location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int3* valuePtr = values) + Native.glProgramUniform3iv(this, startLocation, values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, float3 value) + { + Native.glProgramUniform3f(this, location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float3* valuePtr = values) + Native.glProgramUniform3fv(this, startLocation, values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, double3 value) + { + Native.glProgramUniform3d(this, location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (double3* valuePtr = values) + Native.glProgramUniform3dv(this, startLocation, values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, uint3 value) + { + Native.glProgramUniform3ui(this, location, value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (uint3* valuePtr = values) + Native.glProgramUniform3uiv(this, startLocation, values.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, int4 value) + { + Native.glProgramUniform4i(this, location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (int4* valuePtr = values) + Native.glProgramUniform4iv(this, startLocation, values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, float4 value) + { + Native.glProgramUniform4f(this, location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (float4* valuePtr = values) + Native.glProgramUniform4fv(this, startLocation, values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, double4 value) + { + Native.glProgramUniform4d(this, location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (double4* valuePtr = values) + Native.glProgramUniform4dv(this, startLocation, values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, uint4 value) + { + Native.glProgramUniform4ui(this, location, value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values) + { + fixed (uint4* valuePtr = values) + Native.glProgramUniform4uiv(this, startLocation, values.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float2x2 value, Bool8 transpose = default) + { + fixed (float2x2* valuePtr = &value) + Native.glProgramUniformMatrix2fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float3x3 value, Bool8 transpose = default) + { + fixed (float3x3* valuePtr = &value) + Native.glProgramUniformMatrix3fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float4x4 value, Bool8 transpose = default) + { + fixed (float4x4* valuePtr = &value) + Native.glProgramUniformMatrix4fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double2x2 value, Bool8 transpose = default) + { + fixed (double2x2* valuePtr = &value) + Native.glProgramUniformMatrix2dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double3x3 value, Bool8 transpose = default) + { + fixed (double3x3* valuePtr = &value) + Native.glProgramUniformMatrix3dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double4x4 value, Bool8 transpose = default) + { + fixed (double4x4* valuePtr = &value) + Native.glProgramUniformMatrix4dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float2x3 value, Bool8 transpose = default) + { + fixed (float2x3* valuePtr = &value) + Native.glProgramUniformMatrix2x3fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float3x2 value, Bool8 transpose = default) + { + fixed (float3x2* valuePtr = &value) + Native.glProgramUniformMatrix3x2fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float2x4 value, Bool8 transpose = default) + { + fixed (float2x4* valuePtr = &value) + Native.glProgramUniformMatrix2x4fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float4x2 value, Bool8 transpose = default) + { + fixed (float4x2* valuePtr = &value) + Native.glProgramUniformMatrix4x2fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float3x4 value, Bool8 transpose = default) + { + fixed (float3x4* valuePtr = &value) + Native.glProgramUniformMatrix3x4fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in float4x3 values, Bool8 transpose = default) + { + fixed (float4x3* valuePtr = &values) + Native.glProgramUniformMatrix4x3fv(this, location, 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double2x3 value, Bool8 transpose = default) + { + fixed (double2x3* valuePtr = &value) + Native.glProgramUniformMatrix2x3dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double3x2 value, Bool8 transpose = default) + { + fixed (double3x2* valuePtr = &value) + Native.glProgramUniformMatrix3x2dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double2x4 value, Bool8 transpose = default) + { + fixed (double2x4* valuePtr = &value) + Native.glProgramUniformMatrix2x4dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double4x2 value, Bool8 transpose = default) + { + fixed (double4x2* valuePtr = &value) + Native.glProgramUniformMatrix4x2dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double3x4 value, Bool8 transpose = default) + { + fixed (double3x4* valuePtr = &value) + Native.glProgramUniformMatrix3x4dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(int location, in double4x3 value, Bool8 transpose = default) + { + fixed (double4x3* valuePtr = &value) + Native.glProgramUniformMatrix4x3dv(this, location, 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float2x2* valuePtr = values) + Native.glProgramUniformMatrix2fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float3x3* valuePtr = values) + Native.glProgramUniformMatrix3fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float4x4* valuePtr = values) + Native.glProgramUniformMatrix4fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double2x2* valuePtr = values) + Native.glProgramUniformMatrix2dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double3x3* valuePtr = values) + Native.glProgramUniformMatrix3dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double4x4* valuePtr = values) + Native.glProgramUniformMatrix4dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float2x3* valuePtr = values) + Native.glProgramUniformMatrix2x3fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float3x2* valuePtr = values) + Native.glProgramUniformMatrix3x2fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float2x4* valuePtr = values) + Native.glProgramUniformMatrix2x4fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float4x2* valuePtr = values) + Native.glProgramUniformMatrix4x2fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float3x4* valuePtr = values) + Native.glProgramUniformMatrix3x4fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (float4x3* valuePtr = values) + Native.glProgramUniformMatrix4x3fv(this, startLocation, values.Length, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double2x3* valuePtr = values) + Native.glProgramUniformMatrix2x3dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, Bool8 transpose, ReadOnlySpan values) + { + fixed (double3x2* valuePtr = values) + Native.glProgramUniformMatrix3x2dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double2x4* valuePtr = values) + Native.glProgramUniformMatrix2x4dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double4x2* valuePtr = values) + Native.glProgramUniformMatrix4x2dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double3x4* valuePtr = values) + Native.glProgramUniformMatrix3x4dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(int startLocation, ReadOnlySpan values, Bool8 transpose = default) + { + fixed (double4x3* valuePtr = values) + Native.glProgramUniformMatrix4x3dv(this, startLocation, values.Length, transpose, (double*)valuePtr); + } + + #endregion + + #region GetUniform + + public unsafe void GetUniform(int location, out float value) + { + fixed (float* valuePtr = &value) + Native.glGetUniformfv(this, location, valuePtr); + } + + public unsafe void GetUniform(int location, out float2 value) + { + fixed (float2* valuePtr = &value) + Native.glGetUniformfv(this, location, (float*)valuePtr); + } + + public unsafe void GetUniform(int location, out float3 value) + { + fixed (float3* valuePtr = &value) + Native.glGetUniformfv(this, location, (float*)valuePtr); + } + + public unsafe void GetUniform(int location, out float4 value) + { + fixed (float4* valuePtr = &value) + Native.glGetUniformfv(this, location, (float*)valuePtr); + } + + public unsafe void GetUniform(int location, out double value) + { + fixed (double* valuePtr = &value) + Native.glGetUniformdv(this, location, valuePtr); + } + + public unsafe void GetUniform(int location, out double2 value) + { + fixed (double2* valuePtr = &value) + Native.glGetUniformdv(this, location, (double*)valuePtr); + } + + public unsafe void GetUniform(int location, out double3 value) + { + fixed (double3* valuePtr = &value) + Native.glGetUniformdv(this, location, (double*)valuePtr); + } + + public unsafe void GetUniform(int location, out double4 value) + { + fixed (double4* valuePtr = &value) + Native.glGetUniformdv(this, location, (double*)valuePtr); + } + + public unsafe void GetUniform(int location, out int value) + { + fixed (int* valuePtr = &value) + Native.glGetUniformiv(this, location, valuePtr); + } + + public unsafe void GetUniform(int location, out int2 value) + { + fixed (int2* valuePtr = &value) + Native.glGetUniformiv(this, location, (int*)valuePtr); + } + + public unsafe void GetUniform(int location, out int3 value) + { + fixed (int3* valuePtr = &value) + Native.glGetUniformiv(this, location, (int*)valuePtr); + } + + public unsafe void GetUniform(int location, out int4 value) + { + fixed (int4* valuePtr = &value) + Native.glGetUniformiv(this, location, (int*)valuePtr); + } + + public unsafe void GetUniform(int location, out uint value) + { + fixed (uint* valuePtr = &value) + Native.glGetUniformuiv(this, location, valuePtr); + } + + public unsafe void GetUniform(int location, out uint2 value) + { + fixed (uint2* valuePtr = &value) + Native.glGetUniformuiv(this, location, (uint*)valuePtr); + } + + public unsafe void GetUniform(int location, out uint3 value) + { + fixed (uint3* valuePtr = &value) + Native.glGetUniformuiv(this, location, (uint*)valuePtr); + } + + public unsafe void GetUniform(int location, out uint4 value) + { + fixed (uint4* valuePtr = &value) + Native.glGetUniformuiv(this, location, (uint*)valuePtr); + } + + #endregion + + #region ProgramUniform + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, int value) + { + Native.glProgramUniform1i(this, GetUniformLocation(name), value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (int* valuePtr = values) + Native.glProgramUniform1iv(this, GetUniformLocation(startName), values.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, float value) + { + Native.glProgramUniform1f(this, GetUniformLocation(name), value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (float* valuePtr = values) + Native.glProgramUniform1fv(this, GetUniformLocation(startName), values.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, double v0) + { + Native.glProgramUniform1d(this, GetUniformLocation(name), v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan value) + { + fixed (double* valuePtr = value) + Native.glProgramUniform1dv(this, GetUniformLocation(startName), value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, uint value) + { + Native.glProgramUniform1ui(this, GetUniformLocation(name), value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan value) + { + fixed (uint* valuePtr = value) + Native.glProgramUniform1uiv(this, GetUniformLocation(startName), value.Length, valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, int2 value) + { + Native.glProgramUniform2i(this, GetUniformLocation(name), value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (int2* valuePtr = values) + Native.glProgramUniform2iv(this, GetUniformLocation(startName), values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, float2 value) + { + Native.glProgramUniform2f(this, GetUniformLocation(name), value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (float2* valuePtr = values) + Native.glProgramUniform2fv(this, GetUniformLocation(startName), values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, double2 value) + { + Native.glProgramUniform2d(this, GetUniformLocation(name), value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (double2* valuePtr = values) + Native.glProgramUniform2dv(this, GetUniformLocation(startName), values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, uint2 value) + { + Native.glProgramUniform2ui(this, GetUniformLocation(name), value.X, value.Y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan value) + { + fixed (uint2* valuePtr = value) + Native.glProgramUniform2uiv(this, GetUniformLocation(startName), value.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, int3 value) + { + Native.glProgramUniform3i(this, GetUniformLocation(name), value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (int3* valuePtr = values) + Native.glProgramUniform3iv(this, GetUniformLocation(startName), values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, float3 value) + { + Native.glProgramUniform3f(this, GetUniformLocation(name), value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (float3* valuePtr = values) + Native.glProgramUniform3fv(this, GetUniformLocation(startName), values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, double3 value) + { + Native.glProgramUniform3d(this, GetUniformLocation(name), value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (double3* valuePtr = values) + Native.glProgramUniform3dv(this, GetUniformLocation(startName), values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, uint3 value) + { + Native.glProgramUniform3ui(this, GetUniformLocation(name), value.X, value.Y, value.Z); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (uint3* valuePtr = values) + Native.glProgramUniform3uiv(this, GetUniformLocation(startName), values.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, int4 value) + { + Native.glProgramUniform4i(this, GetUniformLocation(name), value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (int4* valuePtr = values) + Native.glProgramUniform4iv(this, GetUniformLocation(startName), values.Length, (int*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, float4 value) + { + Native.glProgramUniform4f(this, GetUniformLocation(name), value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (float4* valuePtr = values) + Native.glProgramUniform4fv(this, GetUniformLocation(startName), values.Length, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, double4 value) + { + Native.glProgramUniform4d(this, GetUniformLocation(name), value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (double4* valuePtr = values) + Native.glProgramUniform4dv(this, GetUniformLocation(startName), values.Length, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, uint4 value) + { + Native.glProgramUniform4ui(this, GetUniformLocation(name), value.X, value.Y, value.Z, value.W); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray(ReadOnlySpan startName, ReadOnlySpan values) + { + fixed (uint4* valuePtr = values) + Native.glProgramUniform4uiv(this, GetUniformLocation(startName), values.Length, (uint*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float2x2 value, Bool8 transpose = default) + { + fixed (float2x2* valuePtr = &value) + Native.glProgramUniformMatrix2fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float3x3 value, Bool8 transpose = default) + { + fixed (float3x3* valuePtr = &value) + Native.glProgramUniformMatrix3fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float4x4 value, Bool8 transpose = default) + { + fixed (float4x4* valuePtr = &value) + Native.glProgramUniformMatrix4fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double2x2 value, Bool8 transpose = default) + { + fixed (double2x2* valuePtr = &value) + Native.glProgramUniformMatrix2dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double3x3 value, Bool8 transpose = default) + { + fixed (double3x3* valuePtr = &value) + Native.glProgramUniformMatrix3dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double4x4 value, Bool8 transpose = default) + { + fixed (double4x4* valuePtr = &value) + Native.glProgramUniformMatrix4dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float2x3 value, Bool8 transpose = default) + { + fixed (float2x3* valuePtr = &value) + Native.glProgramUniformMatrix2x3fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float3x2 value, Bool8 transpose = default) + { + fixed (float3x2* valuePtr = &value) + Native.glProgramUniformMatrix3x2fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float2x4 value, Bool8 transpose = default) + { + fixed (float2x4* valuePtr = &value) + Native.glProgramUniformMatrix2x4fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float4x2 value, Bool8 transpose = default) + { + fixed (float4x2* valuePtr = &value) + Native.glProgramUniformMatrix4x2fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float3x4 value, Bool8 transpose = default) + { + fixed (float3x4* valuePtr = &value) + Native.glProgramUniformMatrix3x4fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in float4x3 values, Bool8 transpose = default) + { + fixed (float4x3* valuePtr = &values) + Native.glProgramUniformMatrix4x3fv(this, GetUniformLocation(name), 1, transpose, (float*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double2x3 value, Bool8 transpose = default) + { + fixed (double2x3* valuePtr = &value) + Native.glProgramUniformMatrix2x3dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double3x2 value, Bool8 transpose = default) + { + fixed (double3x2* valuePtr = &value) + Native.glProgramUniformMatrix3x2dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double2x4 value, Bool8 transpose = default) + { + fixed (double2x4* valuePtr = &value) + Native.glProgramUniformMatrix2x4dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double4x2 value, Bool8 transpose = default) + { + fixed (double4x2* valuePtr = &value) + Native.glProgramUniformMatrix4x2dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double3x4 value, Bool8 transpose = default) + { + fixed (double3x4* valuePtr = &value) + Native.glProgramUniformMatrix3x4dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Uniform(ReadOnlySpan name, in double4x3 value, Bool8 transpose = default) + { + fixed (double4x3* valuePtr = &value) + Native.glProgramUniformMatrix4x3dv(this, GetUniformLocation(name), 1, transpose, (double*)valuePtr); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float2x2* valuePtr = values) + Native.glProgramUniformMatrix2fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float3x3* valuePtr = values) + Native.glProgramUniformMatrix3fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float4x4* valuePtr = values) + Native.glProgramUniformMatrix4fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double2x2* valuePtr = values) + Native.glProgramUniformMatrix2dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double3x3* valuePtr = values) + Native.glProgramUniformMatrix3dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double4x4* valuePtr = values) + Native.glProgramUniformMatrix4dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float2x3* valuePtr = values) + Native.glProgramUniformMatrix2x3fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float3x2* valuePtr = values) + Native.glProgramUniformMatrix3x2fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float2x4* valuePtr = values) + Native.glProgramUniformMatrix2x4fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float4x2* valuePtr = values) + Native.glProgramUniformMatrix4x2fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float3x4* valuePtr = values) + Native.glProgramUniformMatrix3x4fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (float4x3* valuePtr = values) + Native.glProgramUniformMatrix4x3fv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (float*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double2x3* valuePtr = values) + Native.glProgramUniformMatrix2x3dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double3x2* valuePtr = values) + Native.glProgramUniformMatrix3x2dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double2x4* valuePtr = values) + Native.glProgramUniformMatrix2x4dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double4x2* valuePtr = values) + Native.glProgramUniformMatrix4x2dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double3x4* valuePtr = values) + Native.glProgramUniformMatrix3x4dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void UniformArray( + ReadOnlySpan startName, + ReadOnlySpan values, + Bool8 transpose = default + ) + { + fixed (double4x3* valuePtr = values) + Native.glProgramUniformMatrix4x3dv( + this, + GetUniformLocation(startName), + values.Length, + transpose, + (double*)valuePtr + ); + } + + #endregion + + #region GetUniform + + public unsafe void GetUniform(ReadOnlySpan name, out float value) + { + fixed (float* valuePtr = &value) + Native.glGetUniformfv(this, GetUniformLocation(name), valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out float2 value) + { + fixed (float2* valuePtr = &value) + Native.glGetUniformfv(this, GetUniformLocation(name), (float*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out float3 value) + { + fixed (float3* valuePtr = &value) + Native.glGetUniformfv(this, GetUniformLocation(name), (float*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out float4 value) + { + fixed (float4* valuePtr = &value) + Native.glGetUniformfv(this, GetUniformLocation(name), (float*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out double value) + { + fixed (double* valuePtr = &value) + Native.glGetUniformdv(this, GetUniformLocation(name), valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out double2 value) + { + fixed (double2* valuePtr = &value) + Native.glGetUniformdv(this, GetUniformLocation(name), (double*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out double3 value) + { + fixed (double3* valuePtr = &value) + Native.glGetUniformdv(this, GetUniformLocation(name), (double*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out double4 value) + { + fixed (double4* valuePtr = &value) + Native.glGetUniformdv(this, GetUniformLocation(name), (double*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out int value) + { + fixed (int* valuePtr = &value) + Native.glGetUniformiv(this, GetUniformLocation(name), valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out int2 value) + { + fixed (int2* valuePtr = &value) + Native.glGetUniformiv(this, GetUniformLocation(name), (int*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out int3 value) + { + fixed (int3* valuePtr = &value) + Native.glGetUniformiv(this, GetUniformLocation(name), (int*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out int4 value) + { + fixed (int4* valuePtr = &value) + Native.glGetUniformiv(this, GetUniformLocation(name), (int*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out uint value) + { + fixed (uint* valuePtr = &value) + Native.glGetUniformuiv(this, GetUniformLocation(name), valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out uint2 value) + { + fixed (uint2* valuePtr = &value) + Native.glGetUniformuiv(this, GetUniformLocation(name), (uint*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out uint3 value) + { + fixed (uint3* valuePtr = &value) + Native.glGetUniformuiv(this, GetUniformLocation(name), (uint*)valuePtr); + } + + public unsafe void GetUniform(ReadOnlySpan name, out uint4 value) + { + fixed (uint4* valuePtr = &value) + Native.glGetUniformuiv(this, GetUniformLocation(name), (uint*)valuePtr); + } + + #endregion + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlProgram Attach(GlShader shader) + { + Native.glAttachShader(this, shader); + return this; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlProgram Attach(params Span shaders) + { + foreach (var glShader in shaders) + Native.glAttachShader(this, glShader); + + return this; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlProgram Link() + { + Native.glLinkProgram(this); + + if (GetProgram(Property.LinkStatus) != GL_TRUE) + throw new LinkException(this); + + return this; + } + + private unsafe string GetProgramInfoLog() + { + var logSize = GetProgram(Property.InfoLogLength); + if (logSize <= 0) + return string.Empty; + + var infoLogPtr = stackalloc byte[logSize]; + Native.glGetProgramInfoLog(this, logSize, null, infoLogPtr); + + return Utf8StringMarshaller.ConvertToManaged(infoLogPtr) ?? string.Empty; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private unsafe int GetProgram(Property property) + { + int outValue; + Native.glGetProgramiv(this, (uint)property, &outValue); + return outValue; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe int GetUniformLocation(ReadOnlySpan name) + { + fixed (byte* namePtr = name) + return Native.glGetUniformLocation(this, namePtr); + } + + public unsafe void Dispose() + { + Native.glDeleteProgram(this); + } +} diff --git a/Brutal.OpenGl/Types/GlQuery.cs b/Brutal.OpenGl/Types/GlQuery.cs new file mode 100644 index 0000000..87a64eb --- /dev/null +++ b/Brutal.OpenGl/Types/GlQuery.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlQuery(uint Id); diff --git a/Brutal.OpenGl/Types/GlRenderbuffer.cs b/Brutal.OpenGl/Types/GlRenderbuffer.cs new file mode 100644 index 0000000..c8d7b38 --- /dev/null +++ b/Brutal.OpenGl/Types/GlRenderbuffer.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlRenderbuffer(uint Id); diff --git a/Brutal.OpenGl/Types/GlSampler.cs b/Brutal.OpenGl/Types/GlSampler.cs new file mode 100644 index 0000000..a8eff45 --- /dev/null +++ b/Brutal.OpenGl/Types/GlSampler.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlSampler(uint Id); diff --git a/Brutal.OpenGl/Types/GlScaling.cs b/Brutal.OpenGl/Types/GlScaling.cs new file mode 100644 index 0000000..959f815 --- /dev/null +++ b/Brutal.OpenGl/Types/GlScaling.cs @@ -0,0 +1,8 @@ +namespace Brutal.OpenGlApi; + +public enum GlScaling +{ + Float, + Normalized, + Integer, +} diff --git a/Brutal.OpenGl/Types/GlShader.cs b/Brutal.OpenGl/Types/GlShader.cs new file mode 100644 index 0000000..010bdf0 --- /dev/null +++ b/Brutal.OpenGl/Types/GlShader.cs @@ -0,0 +1,114 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; +using System.Text; + +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlDeleteStatus : uint +{ + NotDeleted = GL_FALSE, + Deleted = GL_TRUE, +} + +public readonly record struct GlShader(uint Id) : IDisposable +{ + public class CompileException(GlShader shader) : Exception(shader.GetInfoLog()); + + private enum Property : uint + { + ShaderType = GL_SHADER_TYPE, + DeleteStatus = GL_DELETE_STATUS, + CompileStatus = GL_COMPILE_STATUS, + InfoLogLength = GL_INFO_LOG_LENGTH, + ShaderSourceLength = GL_SHADER_SOURCE_LENGTH, + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private unsafe int Get(Property property) + { + int outValue; + Native.glGetShaderiv(this, (uint)property, &outValue); + return outValue; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool IsDeleted() => Get(Property.DeleteStatus) != 0; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int GetShaderType() => Get(Property.ShaderType); + + private unsafe string GetInfoLog() + { + var logSize = Get(property: Property.InfoLogLength); + if (logSize <= 0) + return string.Empty; + + var infoLogPtr = stackalloc byte[logSize]; + Native.glGetShaderInfoLog(this, logSize, null, infoLogPtr); + + return Utf8StringMarshaller.ConvertToManaged(infoLogPtr) ?? string.Empty; + } + + public unsafe string GetSource() + { + var length = Get(Property.ShaderSourceLength); + if (length <= 0) + return string.Empty; + + var sourcePtr = stackalloc byte[length]; + Native.glGetShaderSource(this, length, null, sourcePtr); + + return Utf8StringMarshaller.ConvertToManaged(sourcePtr) ?? string.Empty; + } + + public unsafe GlShader SetSource(string source) + { + var exactByteCount = Encoding.UTF8.GetByteCount(source); + var mem = (byte*)Marshal.AllocCoTaskMem(exactByteCount); + Span buffer = new(mem, exactByteCount); + + var byteCount = Encoding.UTF8.GetBytes(source, buffer); + + try + { + Native.glShaderSource(this, 1, &mem, &byteCount); + } + finally + { + Marshal.FreeCoTaskMem((IntPtr)mem); + } + + return this; + } + + public unsafe GlShader SetSource(ReadOnlySpan source) + { + fixed (byte* mem = source) + { + var byteCount = source.Length; + Native.glShaderSource(this, 1, &mem, &byteCount); + } + + return this; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlShader Compile() + { + Native.glCompileShader(this); + var status = Get(Property.CompileStatus); + + if (status == GL_FALSE) + throw new CompileException(this); + + return this; + } + + public unsafe void Dispose() + { + Native.glDeleteShader(this); + } +} diff --git a/Brutal.OpenGl/Types/GlShaderType.cs b/Brutal.OpenGl/Types/GlShaderType.cs new file mode 100644 index 0000000..4422082 --- /dev/null +++ b/Brutal.OpenGl/Types/GlShaderType.cs @@ -0,0 +1,13 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlShaderType : uint +{ + Vertex = GL_VERTEX_SHADER, + Fragment = GL_FRAGMENT_SHADER, + Geometry = GL_GEOMETRY_SHADER, + TessControl = GL_TESS_CONTROL_SHADER, + TessEvaluation = GL_TESS_EVALUATION_SHADER, + Compute = GL_COMPUTE_SHADER, +} diff --git a/Brutal.OpenGl/Types/GlStencilOp.cs b/Brutal.OpenGl/Types/GlStencilOp.cs new file mode 100644 index 0000000..052cc57 --- /dev/null +++ b/Brutal.OpenGl/Types/GlStencilOp.cs @@ -0,0 +1,15 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlStencilOp : uint +{ + Keep = GL_KEEP, + Zero = GL_ZERO, + Replace = GL_REPLACE, + Incr = GL_INCR, + IncrWrap = GL_INCR_WRAP, + Decr = GL_DECR, + DecrWrap = GL_DECR_WRAP, + Invert = GL_INVERT, +} diff --git a/Brutal.OpenGl/Types/GlSync.cs b/Brutal.OpenGl/Types/GlSync.cs new file mode 100644 index 0000000..c68c0da --- /dev/null +++ b/Brutal.OpenGl/Types/GlSync.cs @@ -0,0 +1,6 @@ +namespace Brutal.OpenGlApi; + +public unsafe struct GlSync(void* ptr) +{ + internal void* Pointer = ptr; +} diff --git a/Brutal.OpenGl/Types/GlTexture.cs b/Brutal.OpenGl/Types/GlTexture.cs new file mode 100644 index 0000000..7c98e54 --- /dev/null +++ b/Brutal.OpenGl/Types/GlTexture.cs @@ -0,0 +1,3 @@ +namespace Brutal.OpenGlApi; + +public record struct GlTexture(uint Id); diff --git a/Brutal.OpenGl/Types/GlTopology.cs b/Brutal.OpenGl/Types/GlTopology.cs new file mode 100644 index 0000000..9ebe972 --- /dev/null +++ b/Brutal.OpenGl/Types/GlTopology.cs @@ -0,0 +1,20 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +[Flags] +public enum GlTopology : uint +{ + Points = GL_POINTS, + LineStrip = GL_LINE_STRIP, + LineLoop = GL_LINE_LOOP, + Lines = GL_LINES, + LineStripAdjacency = GL_LINE_STRIP_ADJACENCY, + LinesAdjacency = GL_LINES_ADJACENCY, + TriangleStrip = GL_TRIANGLE_STRIP, + TriangleFan = GL_TRIANGLE_FAN, + Triangles = GL_TRIANGLES, + TriangleStripAdjacency = GL_TRIANGLE_STRIP_ADJACENCY, + TrianglesAdjacency = GL_TRIANGLES_ADJACENCY, + Patches = GL_PATCHES, +} diff --git a/Brutal.OpenGl/Types/GlVertexArray.cs b/Brutal.OpenGl/Types/GlVertexArray.cs new file mode 100644 index 0000000..25c43e7 --- /dev/null +++ b/Brutal.OpenGl/Types/GlVertexArray.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public readonly record struct GlVertexArray(uint Id) +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlVertexArray Bind() + { + Native.glBindVertexArray(this); + return this; + } +} diff --git a/Brutal.OpenGl/Types/GlVertexAttribute.cs b/Brutal.OpenGl/Types/GlVertexAttribute.cs new file mode 100644 index 0000000..892633e --- /dev/null +++ b/Brutal.OpenGl/Types/GlVertexAttribute.cs @@ -0,0 +1,19 @@ +namespace Brutal.OpenGlApi; + +using static OpenGl; + +public enum GlVertexAttribute : uint +{ + ArrayBufferBinding = GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, + ArrayEnabled = GL_VERTEX_ATTRIB_ARRAY_ENABLED, + ArraySize = GL_VERTEX_ATTRIB_ARRAY_SIZE, + ArrayStride = GL_VERTEX_ATTRIB_ARRAY_STRIDE, + ArrayType = GL_VERTEX_ATTRIB_ARRAY_TYPE, + ArrayNormalized = GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, + ArrayInteger = GL_VERTEX_ATTRIB_ARRAY_INTEGER, + ArrayLong = GL_VERTEX_ATTRIB_ARRAY_LONG, + ArrayDivisor = GL_VERTEX_ATTRIB_ARRAY_DIVISOR, + Binding = GL_VERTEX_ATTRIB_BINDING, + RelativeOffset = GL_VERTEX_ATTRIB_RELATIVE_OFFSET, + Current = GL_CURRENT_VERTEX_ATTRIB, +} diff --git a/Brutal.RakNet/Generated/Classes/AddressOrGUID.gen.cs b/Brutal.RakNet/Generated/Classes/AddressOrGUID.gen.cs new file mode 100644 index 0000000..2a44a09 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/AddressOrGUID.gen.cs @@ -0,0 +1,12 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public partial struct AddressOrGUID + { + public RakNetGUID RakNetGuid; + public SystemAddress SystemAddress; + } +} diff --git a/Brutal.RakNet/Generated/Classes/AddressSystemAddress.gen.cs b/Brutal.RakNet/Generated/Classes/AddressSystemAddress.gen.cs new file mode 100644 index 0000000..46c254e --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/AddressSystemAddress.gen.cs @@ -0,0 +1,12 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct AddressSystemAddress + { + [FieldOffset(0)] + public SockaddrIn Addr4; + } +} diff --git a/Brutal.RakNet/Generated/Classes/InAddr.gen.cs b/Brutal.RakNet/Generated/Classes/InAddr.gen.cs new file mode 100644 index 0000000..4f04f59 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/InAddr.gen.cs @@ -0,0 +1,11 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public partial struct InAddr + { + public SUnInAddr SUn; + } +} diff --git a/Brutal.RakNet/Generated/Classes/Packet.gen.cs b/Brutal.RakNet/Generated/Classes/Packet.gen.cs new file mode 100644 index 0000000..073c308 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/Packet.gen.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct Packet + { + /// The system that send this packet. + public SystemAddress SystemAddress; + + /// A unique identifier for the system that sent this packet, regardless of IP address (internal / external / remote system)Only valid once a connection has been established (ID_CONNECTION_REQUEST_ACCEPTED, or ID_NEW_INCOMING_CONNECTION)Until that time, will be UNASSIGNED_RAKNET_GUID + public RakNetGUID Guid; + + /// The length of the data in bytes + public uint Length; + + /// The length of the data in bits + public uint BitSize; + + /// The data from the sender + public byte* Data; + public Bool8 DeleteData; + public Bool8 WasGeneratedLocally; + } +} diff --git a/Brutal.RakNet/Generated/Classes/PublicKey.gen.cs b/Brutal.RakNet/Generated/Classes/PublicKey.gen.cs new file mode 100644 index 0000000..2d3dc70 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/PublicKey.gen.cs @@ -0,0 +1,21 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct PublicKey + { + /// How to interpret the public key, see above + public PublicKeyMode PublicKeyMode; + + /// Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES. See the Encryption sample. + public byte* RemoteServerPublicKey; + + /// (Optional) Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES + public byte* MyPublicKey; + + /// (Optional) Pointer to a private key of length cat::EasyHandshake::PRIVATE_KEY_BYTES + public byte* MyPrivateKey; + } +} diff --git a/Brutal.RakNet/Generated/Classes/RNS2EventHandler.gen.cs b/Brutal.RakNet/Generated/Classes/RNS2EventHandler.gen.cs new file mode 100644 index 0000000..7969758 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/RNS2EventHandler.gen.cs @@ -0,0 +1,8 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct RNS2EventHandler { } +} diff --git a/Brutal.RakNet/Generated/Classes/RakNetGUID.gen.cs b/Brutal.RakNet/Generated/Classes/RakNetGUID.gen.cs new file mode 100644 index 0000000..22f3d99 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/RakNetGUID.gen.cs @@ -0,0 +1,15 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public partial struct RakNetGUID + { + /// uint32_t g[6]; + public ulong G; + + /// Used internally for fast lookup. Optional (use -1 to do regular lookup). Don't transmit this. + public ushort SystemIndex; + } +} diff --git a/Brutal.RakNet/Generated/Classes/RakNetLibrary.gen.cs b/Brutal.RakNet/Generated/Classes/RakNetLibrary.gen.cs new file mode 100644 index 0000000..caaca62 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/RakNetLibrary.gen.cs @@ -0,0 +1,12 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public partial class RakNetLibrary + { + [LibraryImport("RakNetDLL", EntryPoint = "CreateInstance")] + public static unsafe partial RakPeerInstance CreateInstance(); + } +} diff --git a/Brutal.RakNet/Generated/Classes/RakNetSocket2.gen.cs b/Brutal.RakNet/Generated/Classes/RakNetSocket2.gen.cs new file mode 100644 index 0000000..62e8f24 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/RakNetSocket2.gen.cs @@ -0,0 +1,21 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct RakNetSocket2 + { + [FieldOffset(8)] + public RNS2EventHandler* EventHandler; + + [FieldOffset(16)] + public RNS2Type SocketType; + + [FieldOffset(20)] + public SystemAddress BoundAddress; + + [FieldOffset(40)] + public uint UserConnectionSocketIndex; + } +} diff --git a/Brutal.RakNet/Generated/Classes/RakNetStatistics.gen.cs b/Brutal.RakNet/Generated/Classes/RakNetStatistics.gen.cs new file mode 100644 index 0000000..f5044df --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/RakNetStatistics.gen.cs @@ -0,0 +1,49 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct RakNetStatistics + { + /// For each type in RNSPerSecondMetrics, what is the value over the last 1 second? + public fixed ulong ValueOverLastSecond[7]; + + /// For each type in RNSPerSecondMetrics, what is the total value over the lifetime of the connection? + public fixed ulong RunningTotal[7]; + + /// When did the connection start? + /// RakNet::GetTimeUS() + public ulong ConnectionStartTime; + + /// Is our current send rate throttled by congestion control?This value should be true if you send more data per second than your bandwidth capacity + public Bool8 IsLimitedByCongestionControl; + + /// If @a isLimitedByCongestionControl is true, what is the limit, in bytes per second? + public ulong BPSLimitByCongestionControl; + + /// Is our current send rate throttled by a call to RakPeer::SetPerConnectionOutgoingBandwidthLimit()? + public Bool8 IsLimitedByOutgoingBandwidthLimit; + + /// If @a isLimitedByOutgoingBandwidthLimit is true, what is the limit, in bytes per second? + public ulong BPSLimitByOutgoingBandwidthLimit; + + /// For each priority level, how many messages are waiting to be sent out? + public fixed uint MessageInSendBuffer[4]; + + /// For each priority level, how many bytes are waiting to be sent out? + public fixed double BytesInSendBuffer[4]; + + /// How many messages are waiting in the resend buffer? This includes messages waiting for an ack, so should normally be a small valueIf the value is rising over time, you are exceeding the bandwidth capacity. See BPSLimitByCongestionControl + public uint MessagesInResendBuffer; + + /// How many bytes are waiting in the resend buffer. See also messagesInResendBuffer + public ulong BytesInResendBuffer; + + /// Over the last second, what was our packetloss? This number will range from 0.0 (for none) to 1.0 (for 100%) + public float PacketlossLastSecond; + + /// What is the average total packetloss over the lifetime of the connection? + public float PacketlossTotal; + } +} diff --git a/Brutal.RakNet/Generated/Classes/SUnBSUnInAddr.gen.cs b/Brutal.RakNet/Generated/Classes/SUnBSUnInAddr.gen.cs new file mode 100644 index 0000000..f54037b --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/SUnBSUnInAddr.gen.cs @@ -0,0 +1,21 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct SUnBSUnInAddr + { + [FieldOffset(0)] + public byte SB1; + + [FieldOffset(1)] + public byte SB2; + + [FieldOffset(2)] + public byte SB3; + + [FieldOffset(3)] + public byte SB4; + } +} diff --git a/Brutal.RakNet/Generated/Classes/SUnInAddr.gen.cs b/Brutal.RakNet/Generated/Classes/SUnInAddr.gen.cs new file mode 100644 index 0000000..d9570ce --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/SUnInAddr.gen.cs @@ -0,0 +1,18 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct SUnInAddr + { + [FieldOffset(0)] + public SUnBSUnInAddr SUnB; + + [FieldOffset(0)] + public SUnWSUnInAddr SUnW; + + [FieldOffset(0)] + public uint SAddr; + } +} diff --git a/Brutal.RakNet/Generated/Classes/SUnWSUnInAddr.gen.cs b/Brutal.RakNet/Generated/Classes/SUnWSUnInAddr.gen.cs new file mode 100644 index 0000000..ea80e9a --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/SUnWSUnInAddr.gen.cs @@ -0,0 +1,15 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct SUnWSUnInAddr + { + [FieldOffset(0)] + public ushort SW1; + + [FieldOffset(2)] + public ushort SW2; + } +} diff --git a/Brutal.RakNet/Generated/Classes/SockaddrIn.gen.cs b/Brutal.RakNet/Generated/Classes/SockaddrIn.gen.cs new file mode 100644 index 0000000..13f1d27 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/SockaddrIn.gen.cs @@ -0,0 +1,21 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct SockaddrIn + { + [FieldOffset(0)] + private ushort SinFamilyNonBsd; + + [FieldOffset(2)] + public ushort SinPort; + + [FieldOffset(4)] + public InAddr SinAddr; + + [FieldOffset(8)] + public fixed byte SinZero[8]; + } +} diff --git a/Brutal.RakNet/Generated/Classes/SocketDescriptor.gen.cs b/Brutal.RakNet/Generated/Classes/SocketDescriptor.gen.cs new file mode 100644 index 0000000..2a104e1 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/SocketDescriptor.gen.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SocketDescriptor + { + /// The local port to bind to. Pass 0 to have the OS autoassign a port. + public ushort Port; + + /// The local network card address to bind to, such as "127.0.0.1". Pass an empty string to use INADDR_ANY. + public fixed byte HostAddress[32]; + + /// IP version: For IPV4, use AF_INET (default). For IPV6, use AF_INET6. To autoselect, use AF_UNSPEC.IPV6 is the newer internet protocol. Instead of addresses such as natpunch.jenkinssoftware.com, you may have an address such as fe80::7c:31f7:fec4:27de%14.Encoding takes 16 bytes instead of 4, so IPV6 is less efficient for bandwidth.On the positive side, NAT Punchthrough is not needed and should not be used with IPV6 because there are enough addresses that routers do not need to create address mappings.RakPeer::Startup() will fail if this IP version is not supported. + /// RAKNET_SUPPORT_IPV6 must be set to 1 in RakNetDefines.h for AF_INET6 + public short SocketFamily; + public ushort RemotePortRakNetWasStartedOnPS3PSP2; + + /// Required for Google chrome + public int ChromeInstance; + + /// Set to true to use a blocking socket (default, do not change unless you have a reason to) + public Bool8 BlockingSocket; + + /// XBOX only: set IPPROTO_VDP if you want to use VDP. If enabled, this socket does not support broadcast to 255.255.255.255 + public uint ExtraSocketOptions; + } +} diff --git a/Brutal.RakNet/Generated/Classes/SystemAddress.gen.cs b/Brutal.RakNet/Generated/Classes/SystemAddress.gen.cs new file mode 100644 index 0000000..7ccf044 --- /dev/null +++ b/Brutal.RakNet/Generated/Classes/SystemAddress.gen.cs @@ -0,0 +1,15 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + [StructLayout(LayoutKind.Sequential)] + public partial struct SystemAddress + { + public AddressSystemAddress Address; + + /// This is not used internally, but holds a copy of the port held in the address union, so for debugging it's easier to check what port is being held + public ushort DebugPort; + public ushort SystemIndex; + } +} diff --git a/Brutal.RakNet/Generated/Enums/ConnectionAttemptResult.gen.cs b/Brutal.RakNet/Generated/Enums/ConnectionAttemptResult.gen.cs new file mode 100644 index 0000000..c31a058 --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/ConnectionAttemptResult.gen.cs @@ -0,0 +1,12 @@ +namespace Brutal.RakNetApi +{ + public enum ConnectionAttemptResult + { + ConnectionAttemptStarted, + InvalidParameter, + CannotResolveDomainName, + AlreadyConnectedToEndpoint, + ConnectionAttemptAlreadyInProgress, + SecurityInitializationFailed, + } +} diff --git a/Brutal.RakNet/Generated/Enums/ConnectionState.gen.cs b/Brutal.RakNet/Generated/Enums/ConnectionState.gen.cs new file mode 100644 index 0000000..bb79786 --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/ConnectionState.gen.cs @@ -0,0 +1,26 @@ +namespace Brutal.RakNetApi +{ + public enum ConnectionState + { + /// Connect() was called, but the process hasn't started yet + IsPending, + + /// Processing the connection attempt + IsConnecting, + + /// Is connected and able to communicate + IsConnected, + + /// Was connected, but will disconnect as soon as the remaining messages are delivered + IsDisconnecting, + + /// A connection attempt failed and will be aborted + IsSilentlyDisconnecting, + + /// No longer connected + IsDisconnected, + + /// Was never connected, or else was disconnected long enough ago that the entry has been discarded + IsNotConnected, + } +} diff --git a/Brutal.RakNet/Generated/Enums/DefaultMessageIDTypes.gen.cs b/Brutal.RakNet/Generated/Enums/DefaultMessageIDTypes.gen.cs new file mode 100644 index 0000000..74aec6a --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/DefaultMessageIDTypes.gen.cs @@ -0,0 +1,407 @@ +namespace Brutal.RakNetApi +{ + public enum DefaultMessageIDTypes + { + /// RESERVED TYPES - DO NOT CHANGE THESEAll types from RakPeer + /// These types are never returned to the user.Ping from a connected system. Update timestamps (internal use only) + ConnectedPing, + + /// Ping from an unconnected system. Reply but do not update timestamps. (internal use only) + UnconnectedPing, + + /// Ping from an unconnected system. Only reply if we have open connections. Do not update timestamps. (internal use only) + UnconnectedPingOpenConnections, + + /// Pong from a connected system. Update timestamps (internal use only) + ConnectedPong, + + /// A reliable packet to detect lost connections (internal use only) + DetectLostConnections, + + /// C2S: Initial query: Header(1), OfflineMesageID(16), Protocol number(1), Pad(toMTU), sent with no fragment set.If protocol fails on server, returns ID_INCOMPATIBLE_PROTOCOL_VERSION to client + OpenConnectionRequest1, + + /// S2C: Header(1), OfflineMesageID(16), server GUID(8), HasSecurity(1), Cookie(4, if HasSecurity), public key (if do security is true), MTU(2). If public key fails on client, returns ID_PUBLIC_KEY_MISMATCH + OpenConnectionReply1, + + /// C2S: Header(1), OfflineMesageID(16), Cookie(4, if HasSecurity is true on the server), clientSupportsSecurity(1 bit),handshakeChallenge (if has security on both server and client), remoteBindingAddress(6), MTU(2), client GUID(8)Connection slot allocated if cookie is valid, server is not full, GUID and IP not already in use. + OpenConnectionRequest2, + + /// S2C: Header(1), OfflineMesageID(16), server GUID(8), mtu(2), doSecurity(1 bit), handshakeAnswer (if do security is true) + OpenConnectionReply2, + + /// C2S: Header(1), GUID(8), Timestamp, HasSecurity(1), Proof(32) + ConnectionRequest, + + /// RakPeer - Remote system requires secure connections, pass a public key to RakPeerInterface::Connect() + RemoteSystemRequiresPublicKey, + + /// RakPeer - We passed a public key to RakPeerInterface::Connect(), but the other system did not have security turned on + OurSystemRequiresSecurity, + + /// RakPeer - Wrong public key passed to RakPeerInterface::Connect() + PublicKeyMismatch, + + /// RakPeer - Same as ID_ADVERTISE_SYSTEM, but intended for internal use rather than being passed to the user.Second byte indicates type. Used currently for NAT punchthrough for receiver port advertisement. See ID_NAT_ADVERTISE_RECIPIENT_PORT + OutOfBandInternal, + + /// If RakPeerInterface::Send() is called where PacketReliability contains _WITH_ACK_RECEIPT, then on a later call toRakPeerInterface::Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS. The message will be 5 bytes long,and bytes 1-4 inclusive will contain a number in native order containing a number that identifies this message.This number will be returned by RakPeerInterface::Send() or RakPeerInterface::SendList(). ID_SND_RECEIPT_ACKED means thatthe message arrived + SndReceiptAcked, + + /// If RakPeerInterface::Send() is called where PacketReliability contains UNRELIABLE_WITH_ACK_RECEIPT, then on a later call toRakPeerInterface::Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS. The message will be 5 bytes long,and bytes 1-4 inclusive will contain a number in native order containing a number that identifies this message. This numberwill be returned by RakPeerInterface::Send() or RakPeerInterface::SendList(). ID_SND_RECEIPT_LOSS means that an ack for themessage did not arrive (it may or may not have been delivered, probably not). On disconnect or shutdown, you will not getID_SND_RECEIPT_LOSS for unsent messages, you should consider those messages as all lost. + SndReceiptLoss, + + /// RakPeer - In a client/server environment, our connection request to the server has been accepted. + ConnectionRequestAccepted, + + /// RakPeer - Sent to the player when a connection request cannot be completed due to inability to connect. + ConnectionAttemptFailed, + + /// RakPeer - Sent a connect request to a system we are currently connected to. + AlreadyConnected, + + /// RakPeer - A remote system has successfully connected. + NewIncomingConnection, + + /// RakPeer - The system we attempted to connect to is not accepting new connections. + NoFreeIncomingConnections, + + /// RakPeer - The system specified in Packet::systemAddress has disconnected from us. For the client, this would mean theserver has shutdown. + DisconnectionNotification, + + /// RakPeer - Reliable packets cannot be delivered to the system specified in Packet::systemAddress. The connection to thatsystem has been closed. + ConnectionLost, + + /// RakPeer - We are banned from the system we attempted to connect to. + ConnectionBanned, + + /// RakPeer - The remote system is using a password and has refused our connection because we did not set the correct password. + InvalidPassword, + + /// RAKNET_PROTOCOL_VERSION in RakNetVersion.h does not match on the remote system what we have on our systemThis means the two systems cannot communicate.The 2nd byte of the message contains the value of RAKNET_PROTOCOL_VERSION for the remote system + IncompatibleProtocolVersion, + + /// Means that this IP address connected recently, and can't connect again as a security measure. SeeRakPeer::SetLimitIPConnectionFrequency() + IpRecentlyConnected, + + /// RakPeer - The sizeof(RakNetTime) bytes following this byte represent a value which is automatically modified by the differencein system times between the sender and the recipient. Requires that you call SetOccasionalPing. + Timestamp, + + /// RakPeer - Pong from an unconnected system. First byte is ID_UNCONNECTED_PONG, second sizeof(RakNet::TimeMS) bytes is the ping,following bytes is system specific enumeration data.Read using bitstreams + UnconnectedPong, + + /// RakPeer - Inform a remote system of our IP/Port. On the recipient, all data past ID_ADVERTISE_SYSTEM is whatever was passed tothe data parameter + AdvertiseSystem, + + /// RakPeer - Downloading a large message. Format is ID_DOWNLOAD_PROGRESS (MessageID), partCount (unsigned int),partTotal (unsigned int),partLength (unsigned int), first part data (length <= MAX_MTU_SIZE). See the three parameters partCount, partTotaland partLength in OnFileProgress in FileListTransferCBInterface.h + DownloadProgress, + + /// ConnectionGraph2 plugin - In a client/server environment, a client other than ourselves has disconnected gracefully.Packet::systemAddress is modified to reflect the systemAddress of this client. + RemoteDisconnectionNotification, + + /// ConnectionGraph2 plugin - In a client/server environment, a client other than ourselves has been forcefully dropped.Packet::systemAddress is modified to reflect the systemAddress of this client. + RemoteConnectionLost, + + /// ConnectionGraph2 plugin: Bytes 1-4 = count. for (count items) contains {SystemAddress, RakNetGUID, 2 byte ping} + RemoteNewIncomingConnection, + + /// FileListTransfer plugin - Setup data + FileListTransferHeader, + + /// FileListTransfer plugin - A file + FileListTransferFile, + + /// Ack for reference push, to send more of the file + FileListReferencePushAck, + + /// DirectoryDeltaTransfer plugin - Request from a remote system for a download of a directory + DdtDownloadRequest, + + /// RakNetTransport plugin - Transport provider message, used for remote console + TransportString, + + /// ReplicaManager plugin - Create an object + ReplicaManagerConstruction, + + /// ReplicaManager plugin - Changed scope of an object + ReplicaManagerScopeChange, + + /// ReplicaManager plugin - Serialized data of an object + ReplicaManagerSerialize, + + /// ReplicaManager plugin - New connection, about to send all world objects + ReplicaManagerDownloadStarted, + + /// ReplicaManager plugin - Finished downloading all serialized objects + ReplicaManagerDownloadComplete, + + /// RakVoice plugin - Open a communication channel + RakvoiceOpenChannelRequest, + + /// RakVoice plugin - Communication channel accepted + RakvoiceOpenChannelReply, + + /// RakVoice plugin - Close a communication channel + RakvoiceCloseChannel, + + /// RakVoice plugin - Voice data + RakvoiceData, + + /// Autopatcher plugin - Get a list of files that have changed since a certain date + AutopatcherGetChangelistSinceDate, + + /// Autopatcher plugin - A list of files to create + AutopatcherCreationList, + + /// Autopatcher plugin - A list of files to delete + AutopatcherDeletionList, + + /// Autopatcher plugin - A list of files to get patches for + AutopatcherGetPatch, + + /// Autopatcher plugin - A list of patches for a list of files + AutopatcherPatchList, + + /// Autopatcher plugin - Returned to the user: An error from the database repository for the autopatcher. + AutopatcherRepositoryFatalError, + + /// Autopatcher plugin - Returned to the user: The server does not allow downloading unmodified game files. + AutopatcherCannotDownloadOriginalUnmodifiedFiles, + + /// Autopatcher plugin - Finished getting all files from the autopatcher + AutopatcherFinishedInternal, + + /// Autopatcher plugin - Finished getting all files from the autopatcher + AutopatcherFinished, + + /// Autopatcher plugin - Returned to the user: You must restart the application to finish patching. + AutopatcherRestartApplication, + + /// NATPunchthrough plugin: internal + NatPunchthroughRequest, + + /// NATPunchthrough plugin: internalID_NAT_GROUP_PUNCHTHROUGH_REQUEST,NATPunchthrough plugin: internalID_NAT_GROUP_PUNCHTHROUGH_REPLY,NATPunchthrough plugin: internal + NatConnectAtTime, + + /// NATPunchthrough plugin: internal + NatGetMostRecentPort, + + /// NATPunchthrough plugin: internal + NatClientReady, + + /// NATPunchthrough plugin: Destination system is not connected to the server. Bytes starting at offset 1 contains theRakNetGUID destination field of NatPunchthroughClient::OpenNAT(). + NatTargetNotConnected, + + /// NATPunchthrough plugin: Destination system is not responding to ID_NAT_GET_MOST_RECENT_PORT. Possibly the plugin is not installed.Bytes starting at offset 1 contains the RakNetGUID destination field of NatPunchthroughClient::OpenNAT(). + NatTargetUnresponsive, + + /// NATPunchthrough plugin: The server lost the connection to the destination system while setting up punchthrough.Possibly the plugin is not installed. Bytes starting at offset 1 contains the RakNetGUID destinationfield of NatPunchthroughClient::OpenNAT(). + NatConnectionToTargetLost, + + /// NATPunchthrough plugin: This punchthrough is already in progress. Possibly the plugin is not installed.Bytes starting at offset 1 contains the RakNetGUID destination field of NatPunchthroughClient::OpenNAT(). + NatAlreadyInProgress, + + /// NATPunchthrough plugin: This message is generated on the local system, and does not come from the network.packet::guid contains the destination field of NatPunchthroughClient::OpenNAT(). Byte 1 contains 1 if you are the sender, 0 if not + NatPunchthroughFailed, + + /// NATPunchthrough plugin: Punchthrough succeeded. See packet::systemAddress and packet::guid. Byte 1 contains 1 if you are the sender,0 if not. You can now use RakPeer::Connect() or other calls to communicate with this system. + NatPunchthroughSucceeded, + + /// ReadyEvent plugin - Set the ready state for a particular systemFirst 4 bytes after the message contains the id + ReadyEventSet, + + /// ReadyEvent plugin - Unset the ready state for a particular systemFirst 4 bytes after the message contains the id + ReadyEventUnset, + + /// All systems are in state ID_READY_EVENT_SETFirst 4 bytes after the message contains the id + ReadyEventAllSet, + ReadyEventQuery, + + /// Lobby packets. Second byte indicates type. + LobbyGeneral, + + /// RPC3, RPC4 error + RpcRemoteError, + + /// Plugin based replacement for RPC system + RpcPlugin, + + /// FileListTransfer transferring large files in chunks that are read only when needed, to save memory + FileListReferencePush, + + /// Force the ready event to all set + ReadyEventForceAllSet, + + /// Rooms function + RoomsExecuteFunc, + + /// Rooms function + RoomsLogonStatus, + + /// Rooms function + RoomsHandleChange, + + /// Lobby2 message + Lobby2SendMessage, + + /// Lobby2 message + Lobby2ServerError, + + /// Informs user of a new host GUID. Packet::Guid contains this new host RakNetGuid. The old host can be read out using BitStream->Read(RakNetGuid) starting on byte 1This is not returned until connected to a remote systemIf the oldHost is UNASSIGNED_RAKNET_GUID, then this is the first time the host has been determined + Fcm2NewHost, + Fcm2RequestFcmguid, + Fcm2RespondConnectionCount, + Fcm2InformFcmguid, + Fcm2UpdateMinTotalConnectionCount, + + /// A remote system (not necessarily the host) called FullyConnectedMesh2::StartVerifiedJoin() with our system as the clientUse FullyConnectedMesh2::GetVerifiedJoinRequiredProcessingList() to read systemsFor each system, attempt NatPunchthroughClient::OpenNAT() and/or RakPeerInterface::Connect()When this has been done for all systems, the remote system will automatically be informed of the results + /// Only the designated client gets this message + /// You won't get this message if you are already connected to all target systems + /// If you fail to connect to a system, this does not automatically mean you will get ID_FCM2_VERIFIED_JOIN_FAILED as that system may have been shutting down from the host too + /// FullyConnectedMesh2::StartVerifiedJoin() + Fcm2VerifiedJoinStart, + Fcm2VerifiedJoinCapable, + + /// Client failed to connect to a required systems notified via FullyConnectedMesh2::StartVerifiedJoin()RakPeerInterface::CloseConnection() was automatically called for all systems connected due to ID_FCM2_VERIFIED_JOIN_START Programmer should inform the player via the UI that they cannot join this session, and to choose a different session + /// Server normally sends us this message, however if connection to the server was lost, message will be returned locally + /// Only the designated client gets this message + Fcm2VerifiedJoinFailed, + + /// The system that called StartVerifiedJoin() got ID_FCM2_VERIFIED_JOIN_CAPABLE from the client and then called RespondOnVerifiedJoinCapable() with trueAddParticipant() has automatically been called for this systemUse GetVerifiedJoinAcceptedAdditionalData() to read any additional data passed to RespondOnVerifiedJoinCapable() + /// All systems in the mesh get this message + /// RespondOnVerifiedJoinCapable() + Fcm2VerifiedJoinAccepted, + + /// The system that called StartVerifiedJoin() got ID_FCM2_VERIFIED_JOIN_CAPABLE from the client and then called RespondOnVerifiedJoinCapable() with falseCloseConnection() has been automatically called for each system connected to since ID_FCM2_VERIFIED_JOIN_START.The connection is NOT automatically closed to the original host that sent StartVerifiedJoin()Use GetVerifiedJoinRejectedAdditionalData() to read any additional data passed to RespondOnVerifiedJoinCapable() + /// Only the designated client gets this message + /// RespondOnVerifiedJoinCapable() + Fcm2VerifiedJoinRejected, + + /// UDP proxy messages. Second byte indicates type. + UdpProxyGeneral, + + /// SQLite3Plugin - execute + Sqlite3Exec, + + /// SQLite3Plugin - Remote database is unknown + Sqlite3UnknownDb, + + /// Events happening with SQLiteClientLoggerPlugin + SqlliteLogger, + + /// Sent to NatTypeDetectionServer + NatTypeDetectionRequest, + + /// Sent to NatTypeDetectionClient. Byte 1 contains the type of NAT detected. + NatTypeDetectionResult, + + /// Used by the router2 plugin + Router2Internal, + + /// No path is available or can be established to the remote systemPacket::guid contains the endpoint guid that we were trying to reach + Router2ForwardingNoPath, + + /// You can now call connect, ping, or other operations to the destination system. + /// Connect as follows: + /// RakNet::BitStream bs(packet->data, packet->length, false);bs.IgnoreBytes(sizeof(MessageID));RakNetGUID endpointGuid;bs.Read(endpointGuid);unsigned short sourceToDestPort;bs.Read(sourceToDestPort);char ipAddressString[32];packet->systemAddress.ToString(false, ipAddressString);rakPeerInterface->Connect(ipAddressString, sourceToDestPort, 0,0); + Router2ForwardingEstablished, + + /// The IP address for a forwarded connection has changedRead endpointGuid and port as per ID_ROUTER_2_FORWARDING_ESTABLISHED + Router2Rerouted, + TeamBalancerInternal, + + /// Cannot switch to the desired team because it is full. However, if someone on that team leaves, you willget ID_TEAM_BALANCER_TEAM_ASSIGNED later.For TeamBalancer: Byte 1 contains the team you requested to join. Following bytes contain NetworkID of which member + TeamBalancerRequestedTeamFull, + + /// Cannot switch to the desired team because all teams are locked. However, if someone on that team leaves,you will get ID_TEAM_BALANCER_SET_TEAM later.For TeamBalancer: Byte 1 contains the team you requested to join. + TeamBalancerRequestedTeamLocked, + + /// Cannot switch to the desired team because all teams are locked. However, if someone on that team leaves,you will get ID_TEAM_BALANCER_SET_TEAM later.For TeamBalancer: Byte 1 contains the team you requested to join. + TeamBalancerTeamRequestedCancelled, + + /// Team balancer plugin informing you of your team. Byte 1 contains the team you requested to join. Following bytes contain NetworkID of which member. + TeamBalancerTeamAssigned, + + /// Gamebryo Lightspeed integration + LightspeedIntegration, + + /// XBOX integration + XboxLobby, + + /// The password we used to challenge the other system passed, meaning the other system has called TwoWayAuthentication::AddPassword() with the same password we passed to TwoWayAuthentication::Challenge()You can read the identifier used to challenge as follows:RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(RakNet::MessageID)); RakNet::RakString password; bs.Read(password); + TwoWayAuthenticationIncomingChallengeSuccess, + + /// The password we used to challenge the other system passed, meaning the other system has called TwoWayAuthentication::AddPassword() with the same password we passed to TwoWayAuthentication::Challenge()You can read the identifier used to challenge as follows:RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(RakNet::MessageID)); RakNet::RakString password; bs.Read(password); + TwoWayAuthenticationOutgoingChallengeSuccess, + + /// A remote system sent us a challenge using TwoWayAuthentication::Challenge(), and the challenge failed.If the other system must pass the challenge to stay connected, you should call RakPeer::CloseConnection() to terminate the connection to the other system. + TwoWayAuthenticationIncomingChallengeFailure, + + /// The other system did not add the password we used to TwoWayAuthentication::AddPassword()You can read the identifier used to challenge as follows:RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(MessageID)); RakNet::RakString password; bs.Read(password); + TwoWayAuthenticationOutgoingChallengeFailure, + + /// The other system did not respond within a timeout threshhold. Either the other system is not running the plugin or the other system was blocking on some operation for a long time.You can read the identifier used to challenge as follows:RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(MessageID)); RakNet::RakString password; bs.Read(password); + TwoWayAuthenticationOutgoingChallengeTimeout, + TwoWayAuthenticationNegotiation, + + /// CloudClient / CloudServer + CloudPostRequest, + + /// CloudClient / CloudServer + CloudReleaseRequest, + + /// CloudClient / CloudServer + CloudGetRequest, + + /// CloudClient / CloudServer + CloudGetResponse, + + /// CloudClient / CloudServer + CloudUnsubscribeRequest, + + /// CloudClient / CloudServer + CloudServerToServerCommand, + + /// CloudClient / CloudServer + CloudSubscriptionNotification, + + /// LibVoice + LibVoice, + + /// LibVoice + RelayPlugin, + + /// LibVoice + NatRequestBoundAddresses, + + /// LibVoice + NatRespondBoundAddresses, + + /// LibVoice + Fcm2UpdateUserContext, + + /// LibVoice + Reserved3, + + /// LibVoice + Reserved4, + + /// LibVoice + Reserved5, + + /// LibVoice + Reserved6, + + /// LibVoice + Reserved7, + + /// LibVoice + Reserved8, + + /// LibVoice + Reserved9, + + /// For the user to use. Start your first enumeration at this value. + UserPacketEnum, + } +} diff --git a/Brutal.RakNet/Generated/Enums/PacketPriority.gen.cs b/Brutal.RakNet/Generated/Enums/PacketPriority.gen.cs new file mode 100644 index 0000000..6e88eba --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/PacketPriority.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.RakNetApi +{ + public enum PacketPriority + { + /// The highest possible priority. These message trigger sends immediately, and are generally not buffered or aggregated into a single datagram. + ImmediatePriority, + + /// For every 2 IMMEDIATE_PRIORITY messages, 1 HIGH_PRIORITY will be sent.Messages at this priority and lower are buffered to be sent in groups at 10 millisecond intervals to reduce UDP overhead and better measure congestion control. + HighPriority, + + /// For every 2 HIGH_PRIORITY messages, 1 MEDIUM_PRIORITY will be sent.Messages at this priority and lower are buffered to be sent in groups at 10 millisecond intervals to reduce UDP overhead and better measure congestion control. + MediumPriority, + + /// For every 2 MEDIUM_PRIORITY messages, 1 LOW_PRIORITY will be sent.Messages at this priority and lower are buffered to be sent in groups at 10 millisecond intervals to reduce UDP overhead and better measure congestion control. + LowPriority, + NumberOfPriorities, + } +} diff --git a/Brutal.RakNet/Generated/Enums/PacketReliability.gen.cs b/Brutal.RakNet/Generated/Enums/PacketReliability.gen.cs new file mode 100644 index 0000000..2495f3b --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/PacketReliability.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.RakNetApi +{ + public enum PacketReliability + { + /// Same as regular UDP, except that it will also discard duplicate datagrams. RakNet adds (6 to 17) + 21 bits of overhead, 16 of which is used to detect duplicate packets and 6 to 17 of which is used for message length. + Unreliable, + + /// Regular UDP with a sequence counter. Out of order messages will be discarded.Sequenced and ordered messages sent on the same channel will arrive in the order sent. + UnreliableSequenced, + + /// The message is sent reliably, but not necessarily in any order. Same overhead as UNRELIABLE. + Reliable, + + /// This message is reliable and will arrive in the order you sent it. Messages will be delayed while waiting for out of order messages. Same overhead as UNRELIABLE_SEQUENCED.Sequenced and ordered messages sent on the same channel will arrive in the order sent. + ReliableOrdered, + + /// This message is reliable and will arrive in the sequence you sent it. Out or order messages will be dropped. Same overhead as UNRELIABLE_SEQUENCED.Sequenced and ordered messages sent on the same channel will arrive in the order sent. + ReliableSequenced, + + /// Same as UNRELIABLE, however the user will get either ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS based on the result of sending this message when calling RakPeerInterface::Receive(). Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. + UnreliableWithAckReceipt, + + /// Same as RELIABLE. The user will also get ID_SND_RECEIPT_ACKED after the message is delivered when calling RakPeerInterface::Receive(). ID_SND_RECEIPT_ACKED is returned when the message arrives, not necessarily the order when it was sent. Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. This does not return ID_SND_RECEIPT_LOSS. + ReliableWithAckReceipt, + + /// Same as RELIABLE_ORDERED_ACK_RECEIPT. The user will also get ID_SND_RECEIPT_ACKED after the message is delivered when calling RakPeerInterface::Receive(). ID_SND_RECEIPT_ACKED is returned when the message arrives, not necessarily the order when it was sent. Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. This does not return ID_SND_RECEIPT_LOSS. + ReliableOrderedWithAckReceipt, + NumberOfReliabilities, + } +} diff --git a/Brutal.RakNet/Generated/Enums/PublicKeyMode.gen.cs b/Brutal.RakNet/Generated/Enums/PublicKeyMode.gen.cs new file mode 100644 index 0000000..1b1df1b --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/PublicKeyMode.gen.cs @@ -0,0 +1,17 @@ +namespace Brutal.RakNetApi +{ + public enum PublicKeyMode + { + /// The connection is insecure. You can also just pass 0 for the pointer to PublicKey in RakPeerInterface::Connect() + InsecureConnection, + + /// Accept whatever public key the server gives us. This is vulnerable to man in the middle, but does not requiredistribution of the public key in advance of connecting. + AcceptAnyPublicKey, + + /// Use a known remote server public key. PublicKey::remoteServerPublicKey must be non-zero.This is the recommended mode for secure connections. + UseKnownPublicKey, + + /// Use a known remote server public key AND provide a public key for the connecting client.PublicKey::remoteServerPublicKey, myPublicKey and myPrivateKey must be all be non-zero.The server must cooperate for this mode to work.I recommend not using this mode except for server-to-server communication as it significantly increases the CPU requirements during connections for both sides.Furthermore, when it is used, a connection password should be used as well to avoid DoS attacks. + UseTwoWayAuthentication, + } +} diff --git a/Brutal.RakNet/Generated/Enums/RNS2Type.gen.cs b/Brutal.RakNet/Generated/Enums/RNS2Type.gen.cs new file mode 100644 index 0000000..33b2db3 --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/RNS2Type.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.RakNetApi +{ + public enum RNS2Type + { + WindowsStore8, + Ps3, + Ps4, + Chrome, + Vita, + Xbox360, + Xbox720, + Windows, + Linux, + } +} diff --git a/Brutal.RakNet/Generated/Enums/StartupResult.gen.cs b/Brutal.RakNet/Generated/Enums/StartupResult.gen.cs new file mode 100644 index 0000000..d613e0d --- /dev/null +++ b/Brutal.RakNet/Generated/Enums/StartupResult.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.RakNetApi +{ + public enum StartupResult + { + RaknetStarted, + RaknetAlreadyStarted, + InvalidSocketDescriptors, + InvalidMaxConnections, + SocketFamilyNotSupported, + SocketPortAlreadyInUse, + SocketFailedToBind, + SocketFailedTestSend, + PortCannotBeZero, + FailedToCreateNetworkThread, + CouldNotGenerateGuid, + StartupOtherFailure, + } +} diff --git a/Brutal.RakNet/Generated/Handles/RakPeerInstance.gen.cs b/Brutal.RakNet/Generated/Handles/RakPeerInstance.gen.cs new file mode 100644 index 0000000..7888a92 --- /dev/null +++ b/Brutal.RakNet/Generated/Handles/RakPeerInstance.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.RakNetApi +{ + public unsafe partial struct RakPeerInstance(nint impl) : INullable, IDisposable + { + public bool IsNull() => impl is 0; + + internal nint Impl => impl; + + public void Dispose() + { + if (impl is not 0) + { + RakPeerInterface.DestroyInstance(this); + impl = 0; + } + } + } +} diff --git a/Brutal.RakNet/Generated/Libraries/RakPeerInterface.gen.cs b/Brutal.RakNet/Generated/Libraries/RakPeerInterface.gen.cs new file mode 100644 index 0000000..f02c14b --- /dev/null +++ b/Brutal.RakNet/Generated/Libraries/RakPeerInterface.gen.cs @@ -0,0 +1,678 @@ +using System; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + public static partial class RakPeerInterface + { + /// --------------------------------------------------------------------------------------------Major Low Level Functions - Functions needed by most users-------------------------------------------------------------------------------------------- + /// Starts the network threads, opens the listen port. + /// You must call this before calling Connect(). + /// On the PS3, call Startup() after Client_Login() + /// On Android, add the necessary permission to your application's androidmanifest.xml: Multiple calls while already active are ignored. To call this function again with different settings, you must first call Shutdown(). + /// Call SetMaximumIncomingConnections if you want to accept incoming connections + /// The maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.- A hybrid would set it to the sum of both types of connections + /// The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. + /// An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); However, on the XBOX be sure to use IPPROTO_VDP + /// The size of the @a socketDescriptors array. Pass 1 if you are not sure what to pass. + /// Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. + /// RAKNET_STARTED on success, otherwise appropriate failure enumeration. + public static StartupResult Startup( + this RakPeerInstance instance, + uint maxConnections, + Span socketDescriptors, + int threadPriority = (int)-99999 + ) + { + return instance.StartupShim( + maxConnections, + socketDescriptors, + (uint)socketDescriptors.Length, + threadPriority + ); + } + + [LibraryImport("RakNetDLL", EntryPoint = "Startup")] + private static partial StartupResult StartupShim( + this RakPeerInstance instance, + uint maxConnections, + Span socketDescriptors, + uint socketDescriptorCount, + int threadPriority = (int)-99999 + ); + + /// Sets how many incoming connections are allowed. If this is less than the number of players currently connected,no more players will be allowed to connect. If this is greater than the maximum number of peers allowed,it will be reduced to the maximum number of peers allowed.Defaults to 0, meaning by default, nobody can connect to you + /// Maximum number of incoming connections allowed. + [LibraryImport("RakNetDLL", EntryPoint = "SetMaximumIncomingConnections")] + public static partial void SetMaximumIncomingConnections(this RakPeerInstance instance, ushort numberAllowed); + + /// Returns the value passed to SetMaximumIncomingConnections() + /// the maximum number of incoming connections, which is always <= maxConnections + [LibraryImport("RakNetDLL", EntryPoint = "GetMaximumIncomingConnections")] + public static partial uint GetMaximumIncomingConnections(this RakPeerInstance instance); + + /// Returns how many open connections there are at this time + /// the number of open connections + [LibraryImport("RakNetDLL", EntryPoint = "NumberOfConnections")] + public static partial ushort NumberOfConnections(this RakPeerInstance instance); + + /// Sets the password incoming connections must match in the call to Connect (defaults to none). Pass 0 to passwordData to specify no passwordThis is a way to set a low level password for all incoming connections. To selectively reject connections, implement your own scheme using CloseConnection() to remove unwanted connections + /// A data block that incoming connections must match. This can be just a password, or can be a stream of data. Specify 0 for no password data + /// The length in bytes of passwordData + public static void SetIncomingPassword(this RakPeerInstance instance, ReadOnlySpan passwordData) + { + instance.SetIncomingPasswordShim(passwordData, passwordData.Length); + } + + [LibraryImport("RakNetDLL", EntryPoint = "SetIncomingPassword")] + private static partial void SetIncomingPasswordShim( + this RakPeerInstance instance, + ReadOnlySpan passwordData, + int passwordDataLength + ); + + /// Gets the password passed to SetIncomingPassword + /// Should point to a block large enough to hold the password data you passed to SetIncomingPassword() + /// Maximum size of the array passwordData. Modified to hold the number of bytes actually written + [LibraryImport("RakNetDLL", EntryPoint = "GetIncomingPassword")] + public static unsafe partial void GetIncomingPassword( + this RakPeerInstance instance, + byte* passwordData, + ref int passwordDataLength + ); + + /// Connect to the specified host (ip or domain name) and server port.Calling Connect and not calling SetMaximumIncomingConnections acts as a dedicated client.Calling both acts as a true peer. This is a non-blocking connection.You know the connection is successful when GetConnectionState() returns IS_CONNECTED or Receive() gets a message with the type identifier ID_CONNECTION_REQUEST_ACCEPTED.If the connection is not successful, such as a rejected connection or no response then neither of these things will happen. + /// Requires that you first call Startup() + /// Either a dotted IP address or a domain name + /// Which port to connect to on the remote machine. + /// A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. + /// The length in bytes of passwordData + /// The public key the server is using. If 0, the server is not using security. If non-zero, the publicKeyMode member determines how to connect + /// Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// How many datagrams to send to the other system to try to connect. + /// Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. + /// How long to keep the connection alive before dropping it on unable to send a reliable message. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); + /// CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. + /// CONNECTION_ATTEMPT_STARTED does not mean you are already connected! + /// It is possible to immediately get back ID_CONNECTION_ATTEMPT_FAILED if you exceed the maxConnections parameter passed to Startup(). This could happen if you call CloseConnection() with sendDisconnectionNotificaiton true, then immediately call Connect() before the connection has closed. + public static unsafe ConnectionAttemptResult Connect( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + ReadOnlySpan passwordData, + PublicKey* publicKey, + uint connectionSocketIndex = (uint)0, + uint sendConnectionAttemptCount = (uint)12, + uint timeBetweenSendConnectionAttemptsMS = (uint)500, + uint timeoutTime = (uint)0 + ) + { + return instance.ConnectShim( + host, + remotePort, + passwordData, + passwordData.Length, + publicKey, + connectionSocketIndex, + sendConnectionAttemptCount, + timeBetweenSendConnectionAttemptsMS, + timeoutTime + ); + } + + [LibraryImport("RakNetDLL", EntryPoint = "Connect")] + private static unsafe partial ConnectionAttemptResult ConnectShim( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + ReadOnlySpan passwordData, + int passwordDataLength, + PublicKey* publicKey, + uint connectionSocketIndex = (uint)0, + uint sendConnectionAttemptCount = (uint)12, + uint timeBetweenSendConnectionAttemptsMS = (uint)500, + uint timeoutTime = (uint)0 + ); + + /// Connect to the specified host (ip or domain name) and server port, using a shared socket from another instance of RakNet + /// Either a dotted IP address or a domain name + /// Which port to connect to on the remote machine. + /// A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. + /// The length in bytes of passwordData + /// A bound socket returned by another instance of RakPeerInterface + /// How many datagrams to send to the other system to try to connect. + /// Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. + /// How long to keep the connection alive before dropping it on unable to send a reliable message. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); + /// CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. + /// CONNECTION_ATTEMPT_STARTED does not mean you are already connected! + public static unsafe ConnectionAttemptResult ConnectWithSocket( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + ReadOnlySpan passwordData, + ref RakNetSocket2 socket, + PublicKey* publicKey, + uint sendConnectionAttemptCount = (uint)12, + uint timeBetweenSendConnectionAttemptsMS = (uint)500, + uint timeoutTime = (uint)0 + ) + { + return instance.ConnectWithSocketShim( + host, + remotePort, + passwordData, + passwordData.Length, + ref socket, + publicKey, + sendConnectionAttemptCount, + timeBetweenSendConnectionAttemptsMS, + timeoutTime + ); + } + + [LibraryImport("RakNetDLL", EntryPoint = "ConnectWithSocket")] + private static unsafe partial ConnectionAttemptResult ConnectWithSocketShim( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + ReadOnlySpan passwordData, + int passwordDataLength, + ref RakNetSocket2 socket, + PublicKey* publicKey, + uint sendConnectionAttemptCount = (uint)12, + uint timeBetweenSendConnectionAttemptsMS = (uint)500, + uint timeoutTime = (uint)0 + ); + + /// Stops the network threads and closes all connections. + /// How long, in milliseconds, you should wait for all remaining messages to go out, including ID_DISCONNECTION_NOTIFICATION. If 0, it doesn't wait at all. + /// If blockDuration > 0, ID_DISCONNECTION_NOTIFICATION will be sent on this channel + /// Priority to send ID_DISCONNECTION_NOTIFICATION on.If you set it to 0 then the disconnection notification won't be sent + [LibraryImport("RakNetDLL", EntryPoint = "Shutdown")] + public static partial void Shutdown( + this RakPeerInstance instance, + uint blockDuration, + byte orderingChannel = (byte)0, + PacketPriority disconnectionNotificationPriority = (PacketPriority)3 + ); + + /// Returns if the network thread is running + /// true if the network thread is running, false otherwise + [LibraryImport("RakNetDLL", EntryPoint = "IsActive")] + public static partial Bool8 IsActive(this RakPeerInstance instance); + + /// Fills the array remoteSystems with the SystemAddress of all the systems we are connected to + /// An array of SystemAddress structures to be filled with the SystemAddresss of the systems we are connected to. Pass 0 to remoteSystems to only get the number of systems we are connected to + /// As input, the size of remoteSystems array. As output, the number of elements put into the array + [LibraryImport("RakNetDLL", EntryPoint = "GetConnectionList")] + public static unsafe partial Bool8 GetConnectionList( + this RakPeerInstance instance, + SystemAddress* remoteSystems, + ref ushort numberOfSystems + ); + + /// Returns the next uint32_t that Send() will return + /// If using RakPeer from multiple threads, this may not be accurate for your thread. Use IncrementNextSendReceipt() in that case. + /// The next uint32_t that Send() or SendList will return + [LibraryImport("RakNetDLL", EntryPoint = "GetNextSendReceipt")] + public static partial uint GetNextSendReceipt(this RakPeerInstance instance); + + /// Returns the next uint32_t that Send() will return, and increments the value by one + /// If using RakPeer from multiple threads, pass this to forceReceipt in the send function + /// The next uint32_t that Send() or SendList will return + [LibraryImport("RakNetDLL", EntryPoint = "IncrementNextSendReceipt")] + public static partial uint IncrementNextSendReceipt(this RakPeerInstance instance); + + /// Sends a block of data to the specified system that you are connected to.This function only works while connectedThe first byte should be a message identifier starting at ID_USER_PACKET_ENUM + /// The block of data to send + /// The size in bytes of the data to send + /// What priority level to send on. See PacketPriority.h + /// How reliability to send this data. See PacketPriority.h + /// When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream + /// Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none + /// True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// 0 on bad input. Otherwise a number that identifies this message. If @a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + public static uint Send( + this RakPeerInstance instance, + ReadOnlySpan data, + PacketPriority priority, + PacketReliability reliability, + byte orderingChannel, + AddressOrGUID systemIdentifier, + Bool8 broadcast, + uint forceReceiptNumber = (uint)0 + ) + { + return instance.SendShim( + data, + data.Length, + priority, + reliability, + orderingChannel, + systemIdentifier, + broadcast, + forceReceiptNumber + ); + } + + [LibraryImport("RakNetDLL", EntryPoint = "Send")] + private static partial uint SendShim( + this RakPeerInstance instance, + ReadOnlySpan data, + int length, + PacketPriority priority, + PacketReliability reliability, + byte orderingChannel, + AddressOrGUID systemIdentifier, + Bool8 broadcast, + uint forceReceiptNumber = (uint)0 + ); + + /// "Send" to yourself rather than a remote system. The message will be processed through the plugins and returned to the game as usualThis function works anytimeThe first byte should be a message identifier starting at ID_USER_PACKET_ENUM + /// The block of data to send + /// The size in bytes of the data to send + public static void SendLoopback(this RakPeerInstance instance, ReadOnlySpan data) + { + instance.SendLoopbackShim(data, data.Length); + } + + [LibraryImport("RakNetDLL", EntryPoint = "SendLoopback")] + private static partial void SendLoopbackShim( + this RakPeerInstance instance, + ReadOnlySpan data, + int length + ); + + /// Gets a message from the incoming message queue.Use DeallocatePacket() to deallocate the message after you are done with it.User-thread functions, such as RPC calls and the plugin function PluginInterface::Update occur here. + /// 0 if no packets are waiting to be handled, otherwise a pointer to a packet. + /// COMMON MISTAKE: Be sure to call this in a loop, once per game tick, until it returns 0. If you only process one packet per game tick they will buffer up.sa RakNetTypes.h contains struct Packet + [LibraryImport("RakNetDLL", EntryPoint = "Receive")] + public static unsafe partial Packet* Receive(this RakPeerInstance instance); + + /// Call this to deallocate a message returned by Receive() when you are done handling it. + /// The message to deallocate. + [LibraryImport("RakNetDLL", EntryPoint = "DeallocatePacket")] + public static unsafe partial void DeallocatePacket(this RakPeerInstance instance, Packet* packet); + + /// Return the total number of connections we are allowed + [LibraryImport("RakNetDLL", EntryPoint = "GetMaximumNumberOfPeers")] + public static partial uint GetMaximumNumberOfPeers(this RakPeerInstance instance); + + /// -------------------------------------------------------------------------------------------- Connection Management Functions--------------------------------------------------------------------------------------------Close the connection to another host (if we initiated the connection it will disconnect, if they did it will kick them out). + /// Which system to close the connection to. + /// True to send ID_DISCONNECTION_NOTIFICATION to the recipient. False to close it silently. + /// Which ordering channel to send the disconnection notification on, if any + /// Priority to send ID_DISCONNECTION_NOTIFICATION on. + [LibraryImport("RakNetDLL", EntryPoint = "CloseConnection")] + public static partial void CloseConnection( + this RakPeerInstance instance, + AddressOrGUID target, + Bool8 sendDisconnectionNotification, + byte orderingChannel = (byte)0, + PacketPriority disconnectionNotificationPriority = (PacketPriority)3 + ); + + /// Returns if a system is connected, disconnected, connecting in progress, or various other states + /// The system we are referring to + /// This locks a mutex, do not call too frequently during connection attempts or the attempt will take longer and possibly even timeout + /// What state the remote system is in + [LibraryImport("RakNetDLL", EntryPoint = "GetConnectionState")] + public static partial ConnectionState GetConnectionState( + this RakPeerInstance instance, + AddressOrGUID systemIdentifier + ); + + /// Cancel a pending connection attemptIf we are already connected, the connection stays open + /// Which system to cancel + [LibraryImport("RakNetDLL", EntryPoint = "CancelConnectionAttempt")] + public static partial void CancelConnectionAttempt(this RakPeerInstance instance, SystemAddress target); + + /// Given a systemAddress, returns an index from 0 to the maximum number of players allowed - 1. + /// The SystemAddress we are referring to + /// The index of this SystemAddress or -1 on system not found. + [LibraryImport("RakNetDLL", EntryPoint = "GetIndexFromSystemAddress")] + public static partial int GetIndexFromSystemAddress(this RakPeerInstance instance, SystemAddress systemAddress); + + /// This function is only useful for looping through all systemsGiven an index, will return a SystemAddress. + /// Index should range between 0 and the maximum number of players allowed - 1. + /// The SystemAddress + [LibraryImport("RakNetDLL", EntryPoint = "GetSystemAddressFromIndex")] + public static partial SystemAddress GetSystemAddressFromIndex(this RakPeerInstance instance, uint index); + + /// Same as GetSystemAddressFromIndex but returns RakNetGUID + /// Index should range between 0 and the maximum number of players allowed - 1. + /// The RakNetGUID + [LibraryImport("RakNetDLL", EntryPoint = "GetGUIDFromIndex")] + public static partial RakNetGUID GetGUIDFromIndex(this RakPeerInstance instance, uint index); + + /// Bans an IP from connecting. Banned IPs persist between connections but are not saved on shutdown nor loaded on startup.param[in] IP Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will ban all IP addresses starting with 128.0.0 + /// how many ms for a temporary ban. Use 0 for a permanent ban + [LibraryImport("RakNetDLL", EntryPoint = "AddToBanList")] + public static partial void AddToBanList( + this RakPeerInstance instance, + ReadOnlySpan IP, + uint milliseconds = (uint)0 + ); + + /// Allows a previously banned IP to connect. param[in] Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will banAll IP addresses starting with 128.0.0 + [LibraryImport("RakNetDLL", EntryPoint = "RemoveFromBanList")] + public static partial void RemoveFromBanList(this RakPeerInstance instance, ReadOnlySpan IP); + + /// Allows all previously banned IPs to connect. + [LibraryImport("RakNetDLL", EntryPoint = "ClearBanList")] + public static partial void ClearBanList(this RakPeerInstance instance); + + /// Returns true or false indicating if a particular IP is banned. + /// - Dotted IP address. + /// true if IP matches any IPs in the ban list, accounting for any wildcards. False otherwise. + [LibraryImport("RakNetDLL", EntryPoint = "IsBanned")] + public static partial Bool8 IsBanned(this RakPeerInstance instance, ReadOnlySpan IP); + + /// Enable or disable allowing frequent connections from the same IP adderssThis is a security measure which is disabled by default, but can be set to true to prevent attackers from using up all connection slots + /// True to limit connections from the same ip to at most 1 per 100 milliseconds. + [LibraryImport("RakNetDLL", EntryPoint = "SetLimitIPConnectionFrequency")] + public static partial void SetLimitIPConnectionFrequency(this RakPeerInstance instance, Bool8 b); + + /// --------------------------------------------------------------------------------------------Pinging Functions - Functions dealing with the automatic ping mechanism--------------------------------------------------------------------------------------------Send a ping to the specified connected system. + /// The sender and recipient must already be started via a successful call to Startup() + /// Which system to ping + [LibraryImport("RakNetDLL", EntryPoint = "Ping")] + public static partial void Ping(this RakPeerInstance instance, SystemAddress target); + + /// Send a ping to the specified unconnected system. The remote system, if it is Initialized, will respond with ID_PONG followed by sizeof(RakNet::TimeMS) containing the system time the ping was sent.(Default is 4 bytes - See __GET_TIME_64BIT in RakNetTypes.hSystem should reply with ID_PONG if it is active + /// Either a dotted IP address or a domain name. Can be 255.255.255.255 for LAN broadcast. + /// Which port to connect to on the remote machine. + /// Only request a reply if the remote system is accepting connections + /// Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// true on success, false on failure (unknown hostname) + [LibraryImport("RakNetDLL", EntryPoint = "Ping1")] + public static partial Bool8 Ping( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + Bool8 onlyReplyOnAcceptingConnections, + uint connectionSocketIndex = (uint)0 + ); + + /// Returns the average of all ping times read for the specific system or -1 if none read yet + /// Which system we are referring to + /// The ping time for this system, or -1 + [LibraryImport("RakNetDLL", EntryPoint = "GetAveragePing")] + public static partial int GetAveragePing(this RakPeerInstance instance, AddressOrGUID systemIdentifier); + + /// Returns the last ping time read for the specific system or -1 if none read yet + /// Which system we are referring to + /// The last ping time for this system, or -1 + [LibraryImport("RakNetDLL", EntryPoint = "GetLastPing")] + public static partial int GetLastPing(this RakPeerInstance instance, AddressOrGUID systemIdentifier); + + /// Returns the lowest ping time read or -1 if none read yet + /// Which system we are referring to + /// The lowest ping time for this system, or -1 + [LibraryImport("RakNetDLL", EntryPoint = "GetLowestPing")] + public static partial int GetLowestPing(this RakPeerInstance instance, AddressOrGUID systemIdentifier); + + /// Ping the remote systems every so often, or not. Can be called anytime.By default this is true. Recommended to leave on, because congestion control uses it to determine how often to resend lost packets.It would be true by default to prevent timestamp drift, since in the event of a clock spike, the timestamp deltas would no longer be accurate + /// True to start occasional pings. False to stop them. + [LibraryImport("RakNetDLL", EntryPoint = "SetOccasionalPing")] + public static partial void SetOccasionalPing(this RakPeerInstance instance, Bool8 doPing); + + /// Return the clock difference between your system and the specified systemSubtract GetClockDifferential() from a time returned by the remote system to get that time relative to your own systemReturns 0 if the system is unknown + /// Which system we are referring to + [LibraryImport("RakNetDLL", EntryPoint = "GetClockDifferential")] + public static partial ulong GetClockDifferential(this RakPeerInstance instance, AddressOrGUID systemIdentifier); + + /// --------------------------------------------------------------------------------------------Static Data Functions - Functions dealing with API defined synchronized memory--------------------------------------------------------------------------------------------Sets the data to send along with a LAN server discovery or offline ping reply.@a length should be under 400 bytes, as a security measure against flood attacks + /// a block of data to store, or 0 for none + /// The length of data in bytes, or 0 for none + /// Ping.cpp + public static void SetOfflinePingResponse(this RakPeerInstance instance, ReadOnlySpan data) + { + instance.SetOfflinePingResponseShim(data, (uint)data.Length); + } + + [LibraryImport("RakNetDLL", EntryPoint = "SetOfflinePingResponse")] + private static partial void SetOfflinePingResponseShim( + this RakPeerInstance instance, + ReadOnlySpan data, + uint length + ); + + /// Returns pointers to a copy of the data passed to SetOfflinePingResponse + /// A pointer to a copy of the data passed to @a SetOfflinePingResponse() + /// A pointer filled in with the length parameter passed to SetOfflinePingResponse() + /// SetOfflinePingResponse + [LibraryImport("RakNetDLL", EntryPoint = "GetOfflinePingResponse")] + public static unsafe partial void GetOfflinePingResponse( + this RakPeerInstance instance, + byte** data, + ref uint length + ); + + /// --------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general--------------------------------------------------------------------------------------------Return the unique address identifier that represents you or another system on the the network and is based on your local IP / port. + /// Not supported by the XBOX + /// Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address + /// When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) + /// the identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy + [LibraryImport("RakNetDLL", EntryPoint = "GetInternalID")] + public static partial SystemAddress GetInternalID( + this RakPeerInstance instance, + SystemAddress systemAddress, + int index = (int)0 + ); + + /// Sets your internal IP address, for platforms that do not support reading it, or to override a value + /// The address to set. Use SystemAddress::FromString() if you want to use a dotted string + /// When you have multiple internal IDs, which index to set? + [LibraryImport("RakNetDLL", EntryPoint = "SetInternalID")] + public static partial void SetInternalID( + this RakPeerInstance instance, + SystemAddress systemAddress, + int index = (int)0 + ); + + /// Return the unique address identifier that represents you on the the network and is based on your externalIP / port(the IP / port the specified player uses to communicate with you) + /// Which remote system you are referring to for your external ID. Usually the same for all systems, unless you have two or more network cards. + [LibraryImport("RakNetDLL", EntryPoint = "GetExternalID")] + public static partial SystemAddress GetExternalID(this RakPeerInstance instance, SystemAddress target); + + /// Return my own GUID + [LibraryImport("RakNetDLL", EntryPoint = "GetMyGUID")] + public static partial RakNetGUID GetMyGUID(this RakPeerInstance instance); + + /// Return the address bound to a socket at the specified index + [LibraryImport("RakNetDLL", EntryPoint = "GetMyBoundAddress")] + public static partial SystemAddress GetMyBoundAddress(this RakPeerInstance instance, int socketIndex = (int)0); + + /// Get a random number (to generate a GUID) + [LibraryImport("RakNetDLL", EntryPoint = "Get64BitUniqueRandomNumber")] + public static partial ulong Get64BitUniqueRandomNumber(); + + /// Given a connected system, give us the unique GUID representing that instance of RakPeer.This will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are differentCurrently O(log(n)), but this may be improved in the future. If you use this frequently, you may want to cache the value as it won't change.Returns UNASSIGNED_RAKNET_GUID if system address can't be found.If @a input is UNASSIGNED_SYSTEM_ADDRESS, will return your own GUID + /// Call Startup() first, or the function will return UNASSIGNED_RAKNET_GUID + /// The system address of the system we are connected to + [LibraryImport("RakNetDLL", EntryPoint = "GetGuidFromSystemAddress")] + public static partial RakNetGUID GetGuidFromSystemAddress(this RakPeerInstance instance, SystemAddress input); + + /// Given the GUID of a connected system, give us the system address of that system.The GUID will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are differentCurrently O(log(n)), but this may be improved in the future. If you use this frequently, you may want to cache the value as it won't change.If @a input is UNASSIGNED_RAKNET_GUID, will return UNASSIGNED_SYSTEM_ADDRESS + /// The RakNetGUID of the system we are checking to see if we are connected to + [LibraryImport("RakNetDLL", EntryPoint = "GetSystemAddressFromGuid")] + public static partial SystemAddress GetSystemAddressFromGuid(this RakPeerInstance instance, RakNetGUID input); + + /// Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message.Default time is 10,000 or 10 seconds in release and 30,000 or 30 seconds in debug.Do not set different values for different computers that are connected to each other, or you won't be able to reconnect after ID_CONNECTION_LOST + /// Time, in MS + /// Which system to do this for. Pass UNASSIGNED_SYSTEM_ADDRESS for all systems. + [LibraryImport("RakNetDLL", EntryPoint = "SetTimeoutTime")] + public static partial void SetTimeoutTime(this RakPeerInstance instance, uint timeMS, SystemAddress target); + + /// Which system to do this for. Pass UNASSIGNED_SYSTEM_ADDRESS to get the default value + /// timeoutTime for a given system. + [LibraryImport("RakNetDLL", EntryPoint = "GetTimeoutTime")] + public static partial uint GetTimeoutTime(this RakPeerInstance instance, SystemAddress target); + + /// Returns the current MTU size + /// Which system to get this for. UNASSIGNED_SYSTEM_ADDRESS to get the default + /// The current MTU size + [LibraryImport("RakNetDLL", EntryPoint = "GetMTUSize")] + public static partial int GetMTUSize(this RakPeerInstance instance, SystemAddress target); + + /// Returns the number of IP addresses this system has internally. Get the actual addresses from GetLocalIP() + [LibraryImport("RakNetDLL", EntryPoint = "GetNumberOfAddresses")] + public static partial uint GetNumberOfAddresses(this RakPeerInstance instance); + + /// Returns an IP address at index 0 to GetNumberOfAddresses-1 + /// index into the list of IP addresses + /// The local IP address at this index + [LibraryImport( + "RakNetDLL", + EntryPoint = "GetLocalIP", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string GetLocalIP(this RakPeerInstance instance, uint index); + + /// Is this a local IP? + /// IP address to check, excluding the port + /// True if this is one of the IP addresses returned by GetLocalIP + [LibraryImport("RakNetDLL", EntryPoint = "IsLocalIP")] + public static partial Bool8 IsLocalIP(this RakPeerInstance instance, ReadOnlySpan ip); + + /// Allow or disallow connection responses from any IP. Normally this should be false, but may be necessarywhen connecting to servers with multiple IP addresses. + /// - True to allow this behavior, false to not allow. Defaults to false. Value persists between connections + [LibraryImport("RakNetDLL", EntryPoint = "AllowConnectionResponseIPMigration")] + public static partial void AllowConnectionResponseIPMigration(this RakPeerInstance instance, Bool8 allow); + + /// Sends a one byte message ID_ADVERTISE_SYSTEM to the remote unconnected system.This will tell the remote system our external IP outside the LAN along with some user data. + /// The sender and recipient must already be started via a successful call to Initialize + /// Either a dotted IP address or a domain name + /// Which port to connect to on the remote machine. + /// Optional data to append to the packet. + /// length of data in bytes. Use 0 if no data. + /// Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// false if IsActive()==false or the host is unresolvable. True otherwise + public static Bool8 AdvertiseSystem( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + ReadOnlySpan data, + uint connectionSocketIndex = (uint)0 + ) + { + return instance.AdvertiseSystemShim(host, remotePort, data, data.Length, connectionSocketIndex); + } + + [LibraryImport("RakNetDLL", EntryPoint = "AdvertiseSystem")] + private static partial Bool8 AdvertiseSystemShim( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + ReadOnlySpan data, + int dataLength, + uint connectionSocketIndex = (uint)0 + ); + + /// Controls how often to return ID_DOWNLOAD_PROGRESS for large message downloads.ID_DOWNLOAD_PROGRESS is returned to indicate a new partial message chunk, roughly the MTU size, has arrivedAs it can be slow or cumbersome to get this notification for every chunk, you can set the interval at which it is returned.Defaults to 0 (never return this notification) + /// How many messages to use as an interval + [LibraryImport("RakNetDLL", EntryPoint = "SetSplitMessageProgressInterval")] + public static partial void SetSplitMessageProgressInterval(this RakPeerInstance instance, int interval); + + /// Returns what was passed to SetSplitMessageProgressInterval() + /// What was passed to SetSplitMessageProgressInterval(). Default to 0. + [LibraryImport("RakNetDLL", EntryPoint = "GetSplitMessageProgressInterval")] + public static partial int GetSplitMessageProgressInterval(this RakPeerInstance instance); + + /// Set how long to wait before giving up on sending an unreliable messageUseful if the network is clogged up.Set to 0 or less to never timeout. Defaults to 0. + /// How many ms to wait before simply not sending an unreliable message. + [LibraryImport("RakNetDLL", EntryPoint = "SetUnreliableTimeout")] + public static partial void SetUnreliableTimeout(this RakPeerInstance instance, uint timeoutMS); + + /// Send a message to host, with the IP socket option TTL set to 3This message will not reach the host, but will open the router.Used for NAT-Punchthrough + [LibraryImport("RakNetDLL", EntryPoint = "SendTTL")] + public static partial void SendTTL( + this RakPeerInstance instance, + ReadOnlySpan host, + ushort remotePort, + int ttl, + uint connectionSocketIndex = (uint)0 + ); + + /// --------------------------------------------------------------------------------------------Miscellaneous Functions--------------------------------------------------------------------------------------------Put a message back at the end of the receive queue in case you don't want to deal with it immediately + /// The packet you want to push back. + /// True to push the packet so that the next receive call returns it. False to push it at the end of the queue (obviously pushing it at the end makes the packets out of order) + [LibraryImport("RakNetDLL", EntryPoint = "PushBackPacket")] + public static unsafe partial void PushBackPacket( + this RakPeerInstance instance, + ref Packet packet, + Bool8 pushAtHead + ); + + [LibraryImport("RakNetDLL", EntryPoint = "ChangeSystemAddress")] + public static unsafe partial void ChangeSystemAddress( + this RakPeerInstance instance, + RakNetGUID guid, + SystemAddress systemAddress + ); + + /// Get the socket used with a particular active connectionThe smart pointer reference counts the RakNetSocket2 object, so the socket will remain active as long as the smart pointer does, even if RakNet were to shutdown or close the connection. + /// This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. + /// Which system + /// A smart pointer object containing the socket information about the socket. Be sure to check IsNull() which is returned if the update thread is unresponsive, shutting down, or if this system is not connected + [LibraryImport("RakNetDLL", EntryPoint = "GetSocket")] + public static unsafe partial RakNetSocket2* GetSocket(this RakPeerInstance instance, SystemAddress target); + + /// --------------------------------------------------------------------------------------------Network Simulator Functions--------------------------------------------------------------------------------------------Adds simulated ping and packet loss to the outgoing data flow.To simulate bi-directional ping and packet loss, you should call this on both the sender and the recipient, with half the total ping and packetloss value on each.The network simulator is compiled in for debug builds, or for any build that defines RAKNET_ENABLE_NETWORK_SIMULATOR. Otherwise these calls are no-ops. + /// Historically debug-only. For higher-fidelity simulation prefer an OS-level tool (clumsy on Windows, Network Link Conditioner on macOS, netem on Linux), which degrades the real socket traffic. + /// Chance to lose a packet. Ranges from 0 to 1. + /// The minimum time to delay sends. + /// The additional random time to delay sends. + [LibraryImport("RakNetDLL", EntryPoint = "ApplyNetworkSimulator")] + public static partial void ApplyNetworkSimulator( + this RakPeerInstance instance, + float packetloss, + ushort minExtraPing, + ushort extraPingVariance + ); + + /// Limits how much outgoing bandwidth can be sent per-connection.This limit does not apply to the sum of all connections!Exceeding the limit queues up outgoing traffic + /// Maximum bits per second to send. Use 0 for unlimited (default). Once set, it takes effect immedately and persists until called again. + [LibraryImport("RakNetDLL", EntryPoint = "SetPerConnectionOutgoingBandwidthLimit")] + public static partial void SetPerConnectionOutgoingBandwidthLimit( + this RakPeerInstance instance, + uint maxBitsPerSecond + ); + + /// Returns if you previously called ApplyNetworkSimulator + /// If you previously called ApplyNetworkSimulator + [LibraryImport("RakNetDLL", EntryPoint = "IsNetworkSimulatorActive")] + public static partial Bool8 IsNetworkSimulatorActive(this RakPeerInstance instance); + + /// Returns a structure containing a large set of network statistics for the specified system.You can map this data to a string using the C style StatisticsToString() function + /// Which connected system to get statistics for + /// If you supply this structure, it will be written to it. Otherwise it will use a static struct, which is not threadsafe + /// 0 on can't find the specified system. A pointer to a set of data otherwise. + /// RakNetStatistics.h + [LibraryImport("RakNetDLL", EntryPoint = "GetStatistics")] + public static unsafe partial RakNetStatistics* GetStatistics( + this RakPeerInstance instance, + SystemAddress systemAddress, + RakNetStatistics* rns + ); + + /// Returns the network statistics of the system at the given index in the remoteSystemList. + /// True if the index is less than the maximum number of peers allowed and the system is active. False otherwise. + [LibraryImport("RakNetDLL", EntryPoint = "GetStatistics1")] + public static unsafe partial Bool8 GetStatistics( + this RakPeerInstance instance, + uint index, + ref RakNetStatistics rns + ); + + /// how many messages are waiting when you call Receive() + [LibraryImport("RakNetDLL", EntryPoint = "GetReceiveBufferSize")] + public static partial uint GetReceiveBufferSize(this RakPeerInstance instance); + + [LibraryImport("RakNetDLL", EntryPoint = "DestroyInstance")] + public static unsafe partial void DestroyInstance(RakPeerInstance instance); + } +} diff --git a/Brutal.RakNet/LICENSES/BRUTAL-RAKNET-THIRD-PARTY-NOTICES.txt b/Brutal.RakNet/LICENSES/BRUTAL-RAKNET-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..f1f3c11 --- /dev/null +++ b/Brutal.RakNet/LICENSES/BRUTAL-RAKNET-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,236 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.RakNet + +This package redistributes third-party software. Where terms attach to that software, +the license governing it is reproduced below in full. + +WHAT THIS PACKAGE CONTAINS + + One native library, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + RakNet 4.081 RakNetDLL.dll / libRakNetDLL.so / libRakNetDLL.dylib + + RakNet is a C++ UDP networking library. Three further components are compiled into + that library and carry terms of their own. Each has its own section below: + + Mersenne Twister MT19937 the pseudo-random number generator + DR_SHA1 the SHA-1 implementation + SLikeNet the split-packet reassembly buffer + + The managed assembly, Brutal.RakNet.dll, holds interop bindings written for this + package and contains no third-party code. + +A NOTE ON SCOPE + + RakNet's upstream source tree carries a DependentExtensions directory holding bzip2, + jansson, miniupnpc, OpenSSL, PortAudio and Speex. None of them reaches this package. + The build compiles the library from RakNet's Source directory alone, and the shipped + binaries import nothing beyond the platform socket and C runtime libraries. They are + therefore not attributed here. + + Nothing below should be read as truncated. + + +============================================================================== +RakNet +============================================================================== + + Name RakNet + Version 4.081 + Upstream https://github.com/facebookarchive/RakNet + SPDX BSD-2-Clause + + The library this package ships is built from RakNet, released by Oculus VR under the + license reproduced here, whose second condition governs redistribution in binary form. + The copyright notice below is upstream's own. + + BSD License + For RakNet software + + Copyright (c) 2014, Oculus VR, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Oculus distributes the following additional grant of patent rights alongside the + license above. It is reproduced in full; it carries a termination condition. + + Additional Grant of Patent Rights + + “Software” means the RakNet software distributed by Oculus VR, Inc. + + Oculus hereby grants you a perpetual, worldwide, royalty-free, non-exclusive, + irrevocable (subject to the termination provision below) license under any rights + in any patent claims owned by Oculus, to make, have made, use, sell, offer to + sell, import, and otherwise transfer the Software. For avoidance of doubt, no + license is granted under Oculus’s rights in any patent claims that are infringed + by (i) modifications to the Software made by you or a third party, or (ii) the + Software in combination with any software or other technology provided by you + or a third party. + + The license granted hereunder will terminate, automatically and without notice, + for anyone that makes any claim (including by filing any lawsuit, assertion or other + action) alleging (a) direct, indirect, or contributory infringement or inducement + to infringe any patent: (i) by Oculus or any of its subsidiaries or affiliates, + whether or not such claim is related to the Software, (ii) by any party if such + claim arises in whole or in part from any software, product or service of Oculus + or any of its subsidiaries or affiliates, whether or not such claim is related + to the Software, or (iii) by any party relating to the Software; or (b) that + any right in any patent claim of Oculus is invalid or unenforceable. + + +============================================================================== +Mersenne Twister MT19937 +============================================================================== + + Name Mersenne Twister MT19937 + Version the 1998 Shawn Cokus recode of the 1997 reference implementation + Upstream http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html + SPDX not stated upstream; the notice carried by the code is reproduced below + + This generator supplies RakNet's pseudo-random numbers and is compiled into the + shipped library. It is not distributed as a separate library. The statement below is + reproduced from the source file this package is built from. + + Licensing is free http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/elicense.html + + The code as Shawn received it included the following notice: + + Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When + you use this, send an e-mail to with + an appropriate reference to your work. + + It would be nice to CC: when you write. + + +============================================================================== +DR_SHA1 +============================================================================== + + Name DR_SHA1, a SHA-1 implementation by Dominik Reichl + Version as distributed with RakNet 4.081 + Upstream http://www.dominik-reichl.de/ + SPDX not stated by the author, whose declaration is reproduced below + + This implementation is compiled into the shipped library. The author's own declaration + is reproduced below, verbatim from the source file this package is built from. + + 100% free public domain implementation of the SHA-1 algorithm + by Dominik Reichl + Web: http://www.dominik-reichl.de/ + + See header file for version history and test vectors. + + +============================================================================== +SLikeNet +============================================================================== + + Name SLikeNet + Version 0.1.3, verified against upstream commit d5f775d + Upstream https://github.com/SLikeSoft/SLikeNet + SPDX MIT + + SLikeNet is a separately maintained fork of RakNet. This package does not ship + SLikeNet as a library. What it ships is one class taken from it -- SplitPacketSort, + the split-packet reassembly buffer, which corrects a defect in RakNet's handling of + fragments that arrive out of order. It is compiled into the native library above. + + Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) + + That copyright line is the one carried by the file the class was taken from, + Source/include/slikenet/ReliabilityLayer.h. SLikeNet stamps its files individually + and the ranges differ across the project -- its license file states 2016-2017 and its + version header 2017-2019. The line above governs this class and is reproduced from + that file rather than harmonised with the others. + + SLikeNet's license follows in full. It is reproduced unaltered, and its closing + paragraphs refer to files of SLikeNet's own distribution -- readme.txt, license.txt, + licenses/RakNet License.txt. Those belong to the SLikeNet project at the upstream + address above. They are not part of this package. + + MIT License + Copyright © 2016-2017 SLikeSoft™ UG (haftungsbeschränkt) + + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + ----------------------------------------------------- + END OF LICENSE + + Since we provide this library completely free of charge, we'd appreciate any + donation you'd like to grant us (check out our web page for details at + https://www.slikesoft.com/?page_id=1437&lang=en). + With your donation you directly support the future development of the library. + + For further information regarding licensing please refer to chapter 7 in the + readme.txt file alongside this license.txt file. + + In case a future version of SLikeNet is distributed under different license + terms, you may alternatively choose to use this version of SLikeNet under those + later license terms. + + If you are distributing the SLikeNet source, we also explicitly permit you to + rename (and move) the license.txt file to a different location within the + package without having to update all the references to the location of the + license.txt file, as long as you make it clear in any accompanying + documentation where to locate the license terms and clarify that the source + code references outdated locations. + + Also we'd like to state that you are not allowed (without prior written + permission from SLikeSoft) to suggest that you, your company, and/or your + product is affiliated with SLikeSoft. + + Please see chapter 7.2 and chapter 2.4 in the readme.txt file for information + about licensed 3rd-party software/code SLikeNet is based on. We'd especially + like to point out the RakNet License (see chapter 7.2.1 in readme.txt, + licenses/RakNet License.txt, and licenses/RakNet Patents.txt) since SLikeNet is + derived from RakNet. + + In addition to the licensing requirements, we'd appreciate if you are + considering the following legally NON binding requests: + - send us a short mail (info@slikesoft.com) to let us know that you are using + our library in your product + - mention in your product / on your webpage that you are using SLikeNet + (provide a link to https://www.slikenet.com/ on your webpage) + - allow us to put your product/company name on our webpage as a reference that + you are using SLikeNet + + As mentioned: None of these optional requests are binding. If you don't feel + like following any of these requests, we are still glad you decided to use our + network library, nevertheless. diff --git a/Brutal.RakNet/Manual/APIPartials/AddressOrGuid.cs b/Brutal.RakNet/Manual/APIPartials/AddressOrGuid.cs new file mode 100644 index 0000000..d04f362 --- /dev/null +++ b/Brutal.RakNet/Manual/APIPartials/AddressOrGuid.cs @@ -0,0 +1,40 @@ +namespace Brutal.RakNetApi; + +public partial struct AddressOrGUID +{ + public static AddressOrGUID UnassignedGuid => new(RakNetGUID.UNASSIGNED_RAKNET_GUID); + + public static AddressOrGUID From(RakNetGUID guid) => new(guid); + + public static AddressOrGUID From(SystemAddress address) => new(address); + + public AddressOrGUID(RakNetGUID guid) + { + RakNetGuid = guid; + SystemAddress = SystemAddress.UNASSIGNED_SYSTEM_ADDRESS; + } + + public AddressOrGUID(SystemAddress systemAddress) + { + SystemAddress = systemAddress; + RakNetGuid = RakNetGUID.UNASSIGNED_RAKNET_GUID; + } + + public string ToString(bool appendPort = false, char delimiter = ':') + { + return RakNetGuid != RakNetGUID.UNASSIGNED_RAKNET_GUID + ? RakNetGuid.ToString() + : SystemAddress.ToString(appendPort, delimiter); + } +} + +/*public readonly unsafe partial struct RakPeerInstance : IDisposable +{ + public void Dispose() + { + if (impl != 0) + { + RakNetLibrary.DestroyInstance(this); + } + } +}*/ diff --git a/Brutal.RakNet/Manual/APIPartials/RakNetGuid.cs b/Brutal.RakNet/Manual/APIPartials/RakNetGuid.cs new file mode 100644 index 0000000..53ae4c8 --- /dev/null +++ b/Brutal.RakNet/Manual/APIPartials/RakNetGuid.cs @@ -0,0 +1,70 @@ +namespace Brutal.RakNetApi; + +public partial struct RakNetGUID : IEquatable +{ + /// + /// A special RakNetGUID used in the API. + /// + /// + /// UNASSIGNED_RAKNET_GUID is often means for concepts like "MY GUID" or "ANY GUID" + /// + public static readonly RakNetGUID UNASSIGNED_RAKNET_GUID = new() + { + G = ulong.MaxValue, + SystemIndex = ushort.MaxValue, + }; + + /// + /// Converts the current instance to its string representation. + /// + /// A string representation of the instance. Returns "UNASSIGNED_RAKNET_GUID" if the instance is equal to , otherwise returns the value of the G field as a string. + public override string ToString() + { + return this == UNASSIGNED_RAKNET_GUID ? "UNASSIGNED_RAKNET_GUID" : $"{G}"; + } + + /// + /// Defines an equality operator for comparing two instances of . + /// + /// The first instance to compare. + /// The second instance to compare. + /// True if the two instances are equal; otherwise, false. + public static bool operator ==(RakNetGUID left, RakNetGUID right) => left.G == right.G; + + /// + /// Defines an equality operator for comparing two instances of . + /// + /// The first instance to compare. + /// The second instance to compare. + /// True if the two instances are equal; otherwise, false. + public static bool operator !=(RakNetGUID left, RakNetGUID right) => !(left == right); + + /// + /// Determines whether the current instance is equal to another instance of . + /// + /// The instance to compare with the current instance. + /// True if the current instance is equal to the specified instance; otherwise, false. + public bool Equals(RakNetGUID other) + { + return G == other.G; + } + + /// + /// Determines whether the current instance is equal to a specified object. + /// + /// The object to compare with the current instance. + /// True if the specified object is equal to the current instance; otherwise, false. + public override bool Equals(object? obj) + { + return obj is RakNetGUID other && Equals(other); + } + + /// + /// Generates a hash code for the current instance of based on its field values. + /// + /// A hash code representing the current instance. + public override int GetHashCode() + { + return G.GetHashCode(); + } +} diff --git a/Brutal.RakNet/Manual/APIPartials/SockaddrIn.cs b/Brutal.RakNet/Manual/APIPartials/SockaddrIn.cs new file mode 100644 index 0000000..b14478d --- /dev/null +++ b/Brutal.RakNet/Manual/APIPartials/SockaddrIn.cs @@ -0,0 +1,42 @@ +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi +{ + public partial struct SockaddrIn + { + [FieldOffset(1)] + private byte SinFamilyBsd; + + public ushort SinFamily + { + get => SockAddrUtility.Layout == SockAddrUtility.SockAddrLayout.Bsd ? SinFamilyBsd : SinFamilyNonBsd; + set + { + if (SockAddrUtility.Layout == SockAddrUtility.SockAddrLayout.Bsd) + SinFamilyBsd = (byte)value; + else + SinFamilyNonBsd = value; + } + } + } + + public static partial class SockAddrUtility + { + static SockAddrUtility() + { + Layout = IsNonBsdSockAddrLayout() ? SockAddrLayout.NonBsd : SockAddrLayout.Bsd; + } + + public enum SockAddrLayout : byte + { + Bsd = 0, + NonBsd = 1, + }; + + [LibraryImport("RakNetDLL", EntryPoint = "IsNonBsdSockAddrLayout")] + [return: MarshalAs(UnmanagedType.U1)] + public static partial bool IsNonBsdSockAddrLayout(); + + public static SockAddrLayout Layout { get; } + } +} diff --git a/Brutal.RakNet/Manual/APIPartials/SocketDescriptor.cs b/Brutal.RakNet/Manual/APIPartials/SocketDescriptor.cs new file mode 100644 index 0000000..be1677b --- /dev/null +++ b/Brutal.RakNet/Manual/APIPartials/SocketDescriptor.cs @@ -0,0 +1,115 @@ +using System.Net.Sockets; +using System.Text; +using Brutal.Strings; + +namespace Brutal.RakNetApi; + +/// +/// Partial struct for SocketDescriptor that provides useful functionality. +/// +public unsafe partial struct SocketDescriptor +{ + /// + /// Create a SocketDescriptor with an IPV4 address family. + /// + public SocketDescriptor() + : this(AddressFamily.InterNetwork) { } + + /// + /// Create a socket descriptor for IPV4 with port and AddressFamily + /// + /// Port to use + /// Address family to use + public SocketDescriptor(int port, AddressFamily family = AddressFamily.InterNetwork) + : this("", port, family) { } + + /// + /// Create a SocketDescriptor with an AddressFamily + /// + public SocketDescriptor(AddressFamily addressFamily) + : this(0, addressFamily) { } + + /// + /// Create a SocketDescriptor with a host, port and optional AddressFamily. + /// + /// Host address or name + /// Port to use + /// The Address Family to use, defaults to IPV4 + public SocketDescriptor(string host, int port, AddressFamily family = AddressFamily.InterNetwork) + { + SetHostAddress(host); + Port = (ushort)port; + SocketFamily = (short)family; + BlockingSocket = true; + RemotePortRakNetWasStartedOnPS3PSP2 = 0; + ExtraSocketOptions = 0; + } + + /// + /// Sets the host address for the socket descriptor. The address must encode to at most + /// - 1 UTF-8 bytes so the buffer stays null-terminated; + /// any remaining buffer space is cleared. On failure the existing address is left unchanged. + /// + /// The host address as a string. + /// The encoded address does not fit. + public void SetHostAddress(string host) + { + Span encoded = stackalloc byte[HostAddressLength - 1]; + if (!Utf8.TryGetBytes(host, encoded, out var bytesWritten)) + throw new ArgumentException( + $"Host address must encode to at most {HostAddressLength - 1} UTF-8 bytes to leave room for the null terminator.", + nameof(host) + ); + + fixed (byte* ptr = HostAddress) + { + var buffer = new Span(ptr, HostAddressLength); + encoded[..bytesWritten].CopyTo(buffer); + buffer[bytesWritten..].Clear(); + } + } + + /// + /// Sets the host address for the socket descriptor using a Utf8String instance. + /// Trailing null bytes in are ignored; the content must be at most + /// - 1 bytes so the buffer stays null-terminated, and any + /// remaining buffer space is cleared. On failure the existing address is left unchanged. + /// + /// The new host address + /// The address content does not fit. + public void SetHostAddress(ReadOnlySpan host) + { + var content = host.TrimEnd((byte)0); + if (content.Length >= HostAddressLength) + throw new ArgumentException( + $"Host address must be at most {HostAddressLength - 1} bytes to leave room for the null terminator.", + nameof(host) + ); + + fixed (byte* ptr = HostAddress) + { + var buffer = new Span(ptr, HostAddressLength); + content.CopyTo(buffer); + buffer[content.Length..].Clear(); + } + } + + public override string ToString() + { + if (HostAddress[0] != 0) + { + fixed (byte* ptr = HostAddress) + { + var length = 0; + while (length < HostAddressLength && ptr[length] != 0) + length++; + var s = Encoding.UTF8.GetString(ptr, length); + return $"{s}:{Port}"; + } + } + return $"{Port}"; + } + + // Convenience value useful when you're copying into or out of the HostAddress array. + public const int HostAddressLength = 32; +} diff --git a/Brutal.RakNet/Manual/APIPartials/SystemAddress.cs b/Brutal.RakNet/Manual/APIPartials/SystemAddress.cs new file mode 100644 index 0000000..8418ce1 --- /dev/null +++ b/Brutal.RakNet/Manual/APIPartials/SystemAddress.cs @@ -0,0 +1,34 @@ +using System.Buffers.Binary; +using System.Diagnostics.Contracts; +using System.Net; +using System.Net.Sockets; +using System.Runtime.InteropServices; + +namespace Brutal.RakNetApi; + +public partial struct SystemAddress +{ + public SystemAddress() + { + // All other fields should be initialised to their default values, which will be 0. + Address.Addr4.SinFamily = (ushort)AddressFamily.InterNetwork; + SystemIndex = unchecked((ushort)(-1)); + DebugPort = 0; + } + + [Pure] + public string ToString(bool includePort = false, char portDelimiter = ':') + { + unsafe + { + fixed (byte* b = &Address.Addr4.SinAddr.SUn.SUnB.SB1) + { + var ip = new IPAddress(new ReadOnlySpan(b, sizeof(SUnBSUnInAddr))); + var port = BinaryPrimitives.ReverseEndianness(Address.Addr4.SinPort); + return ip + (includePort ? $"{portDelimiter}{port}" : ""); + } + } + } + + public static readonly SystemAddress UNASSIGNED_SYSTEM_ADDRESS = new(); +} diff --git a/Brutal.RakNet/Manual/Utility/Stream.cs b/Brutal.RakNet/Manual/Utility/Stream.cs new file mode 100644 index 0000000..7c2118b --- /dev/null +++ b/Brutal.RakNet/Manual/Utility/Stream.cs @@ -0,0 +1,190 @@ +using System.Net; +using CommunityToolkit.HighPerformance; + +namespace Brutal.RakNetApi.Utility; + +/// +/// A utility struct for reading and writing unmanaged types to and from a buffer. +/// +/// +/// This is a ref struct. So if you pass it to a method it will be copied so writes +/// will not be visible in the caller's instance of the stream. Either pass by ref, or have your +/// method return the stream so you can go stream = DoWriting(stream); +/// +public ref struct Stream +{ + /// + /// Provides a high-performance structure to manage a mutable buffer using spans, + /// allowing read and write operations for both primitive types and byte spans. + /// Enables efficient serialization and deserialization of data directly into the buffer. + /// + public Stream(Span buffer) + { + _buffer = buffer; + } + + #region Write + + /// + /// Writes the provided value of unmanaged type into the stream at the current position. + /// Advances the writing position by the size of after writing. + /// + /// + /// The type of the value to write. Must be unmanaged and may allow usage in a ref struct. + /// + /// + /// The value to write into the stream. Passed by reference for efficient handling of unmanaged types. + /// + public unsafe void Write(in T data) + where T : unmanaged + { + EnsureRemaining(sizeof(T)); + RemainingAs()[0] = data; + _pos += sizeof(T); + } + + /// + /// Writes a sequence of bytes from the specified read-only span into the current stream. + /// Ensures that the data being written does not exceed the available buffer space. + /// + /// The read-only span of bytes containing the data to be written. + public void Write(ReadOnlySpan data) + { + data.CopyTo(Remaining()); + _pos += data.Length; + } + + /// + /// Writes a message with a specified timestamp and a unique message identifier to the stream. + /// This method adds a predefined ID for timestamp messages, followed by the timestamp (converted to network byte order) + /// and the message ID, ensuring proper format for timestamped messages in the communication protocol. + /// + /// The timestamp in host byte order to be included in the message. + /// The unique identifier of the message being written. + public void WriteTimestampMessageId(long hostOrderTimestamp, byte messageId) + { + Write((byte)DefaultMessageIDTypes.Timestamp); + Write(IPAddress.HostToNetworkOrder(hostOrderTimestamp)); + Write(messageId); + } + + #endregion + + + #region Read + + /// + /// Reads data of a specified unmanaged type from the current position in the buffer + /// and writes it into the provided reference. Updates the buffer's position after reading. + /// + /// The reference to write the read data into. + /// The unmanaged type of the data to read. + public unsafe void Read(ref T destination) + where T : unmanaged + { + EnsureRemaining(sizeof(T)); + destination = RemainingAs()[0]; + _pos += sizeof(T); + } + + /// + /// Reads and returns data of a specified unmanaged type from the current position in the buffer. + /// Updates the buffer's position after reading. + /// + /// The unmanaged type of the data to read. + /// The data of the specified type read from the buffer. + public T Read() + where T : unmanaged + { + T t = default; + Read(ref t); + return t; + } + + /// + /// Reads a timestamp from the stream, converting it from network byte order to host byte order. + /// + /// + /// The timestamp as a value in host byte order. + /// + public long ReadTimestamp() + { + return IPAddress.NetworkToHostOrder(Read()); + } + + /// + /// Reads a single byte from the stream and interprets it as a message identifier. + /// The method is typically used to parse and handle serialized message data. + /// + /// The message identifier as a byte. + public byte ReadMessageId() + { + return Read(); + } + + /// + /// Attempts to read a timestamped message from the stream. If the message contains a timestamp, it is converted from network byte order to host byte order. + /// + /// + /// The message Id of the underlying message + /// When this method returns, contains the timestamp in host byte order if the message was timestamped; otherwise, contains 0. + /// + /// if the stream contained a timestamped message; otherwise, . + /// + public bool TryReadTimestampedMessageId(out byte messageId, out long hostOrderTimestamp) + { + messageId = ReadMessageId(); + if (messageId == (byte)DefaultMessageIDTypes.Timestamp) + { + hostOrderTimestamp = ReadTimestamp(); + messageId = ReadMessageId(); + return true; + } + + hostOrderTimestamp = 0; + return false; + } + + #endregion + + /// + /// Returns a span representing the remaining writable portion of the buffer managed by the stream. + /// The returned span starts at the current position within the buffer and extends to the end of the buffer. + /// + /// + /// A span of bytes representing the unwritten portion of the buffer, allowing direct access to the remaining space. + /// + public Span Remaining() + { + return _buffer[_pos..]; + } + + /// + /// Returns a read-only span of bytes representing the segment of the buffer + /// that has been written to. This enables access to the data written + /// without modifying the underlying buffer. + /// + /// + /// A ReadOnlySpan representing the written portion of the buffer. + /// + public ReadOnlySpan Written() + { + return _buffer[.._pos]; + } + + private Span RemainingAs() + where T : unmanaged + { + return Remaining().Cast(); + } + + private void EnsureRemaining(int requiredBytes) + { + var remaining = _buffer.Length - _pos; + if (remaining < requiredBytes) + throw new ArgumentException($"Buffer has {remaining} byte(s) remaining but {requiredBytes} are required."); + } + + private int _pos; + private readonly Span _buffer; +} diff --git a/Brutal.RakNet/Manual/Utility/Time.cs b/Brutal.RakNet/Manual/Utility/Time.cs new file mode 100644 index 0000000..eefc746 --- /dev/null +++ b/Brutal.RakNet/Manual/Utility/Time.cs @@ -0,0 +1,23 @@ +using System.Diagnostics; + +namespace Brutal.RakNetApi.Utility; + +/// +/// Time-based functions for dealing with RakNet timestamps. +/// +public static class Time +{ + /// + /// Computes the current timestamp in raknet units (milliseconds) based on the system's high-resolution + /// performance counter and its frequency, ensuring precise time measurements. + /// The result is returned in host byte order. + /// + /// + public static long RakNetTimeMs() => (long)(Stopwatch.GetTimestamp() * RakNetTimeUnits / Stopwatch.Frequency); + + public static double SecondsFromRakNetTimestamp(long rakNetTimestamp) => rakNetTimestamp / RakNetTimeUnits; + + public static double TimestampNowSeconds() => (double)Stopwatch.GetTimestamp() / Stopwatch.Frequency; + + private const double RakNetTimeUnits = 1000.0d; // Milliseconds +} diff --git a/Brutal.Render.Mesh/Mesh.cs b/Brutal.Render.Mesh/Mesh.cs new file mode 100644 index 0000000..8b48469 --- /dev/null +++ b/Brutal.Render.Mesh/Mesh.cs @@ -0,0 +1,381 @@ +using System.Diagnostics.CodeAnalysis; +using Brutal.Attributes; +using Brutal.Collections; +using Brutal.Memory; + +namespace Brutal.Render.Mesh; + +/// +/// Interface for an object that maps vertex buffers by a key +/// +/// Key used to map vertex buffers +public interface IVertexBufferMap +{ + /// Get vertex list by key + public NativeStrideList GetVertexList(TKey key); + + /// Set vertex list by key + public void SetVertexList(TKey key, NativeStrideList vertexList); + + /// Remove a vertex channel at key + public bool RemoveVertexList(TKey key); + + /// True if key is present in map + public bool ContainsKey(TKey key); + + /// Try-get list by key + public bool TryGetVertexList(TKey key, [MaybeNullWhen(false)] out NativeStrideList value); + + /// + /// Enumerate through all keys + /// + /// IEnumerable of keys + public IEnumerable GetVertexKeys(); + + /// Official number of vertices + int VertexCount { get; } +} + +/// +/// Interface for a mesh object that may store an index buffer +/// +public interface IIndexBufferStorage +{ + /// Index buffer + public NativeStrideList? IndexBuffer { get; } + + /// Set index buffer + public void SetIndexBuffer(NativeStrideList indexList); + + /// Remove index buffer + public void RemoveIndexBuffer(); + + /// Number of indices in index buffer, if any + int IndexCount { get; } +} + +/// +/// Combined vertex/index mesh buffer interface +/// +/// Vertex channel key +public interface IMeshStorage : IVertexBufferMap, IIndexBufferStorage { } + +/// +/// Simple, generic mesh class that maps vertex channel buffers by a key for easy serialisation, modification and uploading to GPU +/// +/// Key used to track vertex channels, can be an int, or a game specific enum +public class Mesh : IDisposable, IMeshStorage + where TKey : unmanaged +{ + /// + /// Index buffer (optional) + /// + public NativeStrideList? IndexBuffer { get; protected set; } + + /// + /// Vertex buffers, mapped by a key, usually corresponding to a channel (eg: position, normals) + /// + public Dictionary VertexBufferMap { get; protected set; } = new(); + + /// + /// Official number of vertices + /// + public int VertexCount { get; set; } + + /// + /// Number of indices in index buffer, if any + /// + public int IndexCount => IndexBuffer?.Count ?? 0; + + /// + /// Dictionary style Try-Get function + /// + /// Vertex channel key + /// NativeStrideList of vertices + /// True if found + public bool TryGetVertexList(TKey key, [MaybeNullWhen(false)] out NativeStrideList value) => + VertexBufferMap.TryGetValue(key, out value); + + /// + /// Returns true if vertex map contains the key + /// + /// Vertex channel key + /// True if key is present + public bool ContainsKey(TKey key) => VertexBufferMap.ContainsKey(key); + + /// + /// Get all the keys for vertex channels present + /// + /// IEnumerable of keys + public IEnumerable GetVertexKeys() + { + return VertexBufferMap.Keys; + } + + /// + /// Set or safely replace IndexBuffer + /// + /// List of index data + public void SetIndexBuffer(NativeStrideList indexList) + { + IndexBuffer?.Dispose(); + IndexBuffer = indexList; + } + + /// + /// Safely remove IndexBuffer + /// + public void RemoveIndexBuffer() + { + IndexBuffer?.Dispose(); + IndexBuffer = null; + } + + /// + /// Returns a vertex channel via span + /// + /// Key that maps to vertex channels + /// Type we want to use for span + /// Vertex buffer cast as span + public Span GetVertexSpan(TKey key) + where T : unmanaged + { + if (!VertexBufferMap.TryGetValue(key, out var nativeList)) + return default; + return nativeList.ToSpan(); + } + + /// + /// Returns a NativeStrideList corresponding to a vertex channel + /// + /// Vertex channel key + /// Vertex buffer as a NativeStrideList + /// + public NativeStrideList GetVertexList(TKey key) + { + if (!VertexBufferMap.TryGetValue(key, out var nativeList)) + throw new Exception($"Vertex list for key {key} not found"); + return nativeList; + } + + /// + /// Remove and safely dispose a channel from Mesh + /// + /// Vertex channel key + /// True if successfully removed + public bool RemoveVertexList(TKey key) + { + if (VertexBufferMap.TryGetValue(key, out var nativeList)) + { + nativeList.Dispose(); + VertexBufferMap.Remove(key); + return true; + } + return false; + } + + /// + /// Map a vertex channel key to an existing NativeStrideList + /// + /// Vertex channel key + /// Vertex buffer as a NativeStrideList + public void SetVertexList(TKey key, NativeStrideList vertexList) + { + VertexBufferMap[key] = vertexList; + } + + /// + /// Clear all buffers present + /// + public void Clear() + { + VertexCount = 0; + IndexBuffer?.Clear(); + foreach (var data in VertexBufferMap) + data.Value.Clear(); + } + + /// + /// Release all buffers present + /// + public void Release() + { + VertexCount = 0; + IndexBuffer?.Dispose(); + IndexBuffer = null; + foreach (var data in VertexBufferMap) + data.Value.Dispose(); + VertexBufferMap.Clear(); + } + + /// + /// Dispose pattern + /// + public void Dispose() + { + Release(); + } +} + +/// +/// Extension methods for meshes +/// +public static partial class MeshExtensions +{ + /// Creates empty vertex buffer if needed, or resizes existing buffer. Either way ensures a buffer of specified size exists and returns it + public static NativeStrideList EnsureVertexBuffer( + this IVertexBufferMap mesh, + TKey key, + ElementCount size, + ByteSize stride + ) + { + if (mesh.TryGetVertexList(key, out NativeStrideList? nativeList)) + { + if (stride != nativeList.Stride) + { + nativeList = new NativeStrideList(stride, nativeList.Capacity); + mesh.SetVertexList(key, nativeList); + } + } + else + { + nativeList = new NativeStrideList(stride, size); + mesh.SetVertexList(key, nativeList); + } + nativeList.Count = size; + return nativeList; + } + + /// Creates empty index buffer if needed, or resizes existing buffer. Either way ensures a buffer of specified size exists and returns it + public static NativeStrideList EnsureIndexBuffer(this IIndexBufferStorage mesh, ElementCount size, ByteSize stride) + { + if (mesh.IndexBuffer != null) + { + if (stride != mesh.IndexBuffer.Stride) + mesh.SetIndexBuffer(new NativeStrideList(stride, mesh.IndexBuffer.Capacity)); + mesh.IndexBuffer.Count = size; + return mesh.IndexBuffer; + } + var buffer = new NativeStrideList(stride, size); + buffer.Count = size; + mesh.SetIndexBuffer(buffer); + return buffer; + } + + /// Convenience function to set/replace vertices via NativeStrideSpan + public static void SetIndicesFromData(this IIndexBufferStorage mesh, NativeStrideSpan data) + { + mesh.SetIndexBuffer(NativeStrideList.FromSpan(data)); + } + + /// Convenience function to set/replace vertices via Span + public static void SetIndicesFromData(this IIndexBufferStorage mesh, [Fixed] Span data) + where T : unmanaged + { + mesh.SetIndicesFromData(NativeStrideSpan.FromSpan(data)); + } + + /// Convenience function to set/replace vertices via NativeStrideSpan + public static void SetVerticesFromData(this IVertexBufferMap mesh, TKey key, NativeStrideSpan data) + { + mesh.SetVertexList(key, NativeStrideList.FromSpan(data)); + } + + /// Convenience function to set/replace vertices via Span + public static void SetVerticesFromData(this IVertexBufferMap mesh, TKey key, [Fixed] Span data) + where T : unmanaged + { + mesh.SetVerticesFromData(key, NativeStrideSpan.FromSpan(data)); + } + + /// Convenience function to add vertices via NativeStrideSpan + public static void AddVerticesFromData(this IVertexBufferMap mesh, TKey key, NativeStrideSpan data) + { + if (mesh.TryGetVertexList(key, out var nativeList)) + { + nativeList.AddData(data); + } + else + { + mesh.SetVertexList(key, NativeStrideList.FromSpan(data)); + } + } + + /// Convenience function to add vertices via Span + public static void AddVerticesFromData(this IVertexBufferMap mesh, TKey key, [Fixed] Span data) + where T : unmanaged + { + mesh.AddVerticesFromData(key, NativeStrideSpan.FromSpan(data)); + } + + /// Convenience function to add indices via NativeStrideSpan + public static void AddIndicesFromData(this IIndexBufferStorage mesh, NativeStrideSpan data) + { + if (mesh.IndexBuffer != null) + mesh.IndexBuffer.AddData(data); + else + mesh.SetIndexBuffer(NativeStrideList.FromSpan(data)); + } + + /// Convenience function to add vertices via Span + public static void AddIndicesFromData(this IIndexBufferStorage mesh, [Fixed] Span data) + where T : unmanaged + { + mesh.AddIndicesFromData(NativeStrideSpan.FromSpan(data)); + } + + /// Convenience function for quickly accessing vertex data as span + public static bool TryGetVertexSpan(this IVertexBufferMap mesh, TKey key, out Span data) + where T : unmanaged + { + if (mesh.TryGetVertexList(key, out var nativeList)) + { + data = nativeList.ToSpan(); + return true; + } + data = default; + return false; + } + + /// Convenience function for quickly accessing vertex data as span + public static bool TryGetIndexSpan(this IIndexBufferStorage mesh, out Span data) + where T : unmanaged + { + if (mesh.IndexBuffer != null) + { + data = mesh.IndexBuffer.ToSpan(); + return true; + } + data = default; + return false; + } +} + +/// +/// Functions added to assist with updating Brutal.Core to 0.2.2 (and dependent packages) +/// +public static class NativeStrideListExtensions +{ + public static void AddData(this NativeStrideList list, NativeStrideSpan data) + { + ValidateSameStrides(data.Stride, list.Stride); + list.AddRange(data.AsSpan().ToArray()); + } + + public static Span ToSpan(this NativeStrideList list) + where T : unmanaged + { + if (list.Stride != ByteSize.Of()) + throw new Exception( + $"Invalid conversion: buffer stored with stride {list.Stride} but converting to type with stride {ByteSize.Of()}" + ); + return list.AsSpan(); + } + + public static void ValidateSameStrides(ByteSize first, ByteSize second) + { + if (first != second) + throw new ArgumentException($"Strides not equal"); + } +} diff --git a/Brutal.Render.Mesh/ProcGenMesh.Primitives.cs b/Brutal.Render.Mesh/ProcGenMesh.Primitives.cs new file mode 100644 index 0000000..b971a0d --- /dev/null +++ b/Brutal.Render.Mesh/ProcGenMesh.Primitives.cs @@ -0,0 +1,564 @@ +using System.Runtime.CompilerServices; +using Brutal.Numerics; + +namespace Brutal.Render.Mesh; + +/// +/// Contains functions for generating procedural geometry for standard primitive shapes +/// +public static partial class ProcGenMeshLibrary +{ + /// + /// Get right and up directions for a plane + /// + /// Normal of plane + /// Outputs right direction + /// Outputs up direction + private static void GetRightUp(float3 normal, out float3 right, out float3 up) + { + right = float3.Cross(normal, GlobalUp); + var dot = float3.Dot(normal, GlobalUp); + if (MathF.Abs(dot) > 0.9999f) + right = GlobalRight * MathF.Sign(dot); + up = float3.Cross(right, normal); + } + + /// + /// Generate a plane mesh with the given origin, right, up, size and grid resolution + /// + /// Output mesh + /// Plane origin + /// Plane right direction + /// Plane up direction + /// Size of plane + /// Resolution of grid on plane + public static unsafe void GeneratePlane( + in ProcGenMesh output, + float3 origin, + float3 right, + float3 up, + float size, + int resolution + ) + { + var vertices = output.OutPositions; + var vStart = vertices.Count; + + GenerateGridTopology(output, resolution, resolution); + + var vPtr = vertices.Ptr.Cast().Offset(vStart); + var vCount = vertices.Count - vStart; + origin -= right * size / 2 + up * size / 2; + for (var i = 0; i < vCount; ++i) + { + var uv = vPtr[i]; + vPtr[i] = origin + right * uv.X * size + up * uv.Y * size; + } + + if (output.OutNormals != null) + { + var forward = float3.Normalize(float3.Cross(up, right)); + AppendFlatValue(output.OutNormals, forward, vCount); + } + } + + /// + /// Generate a plane mesh with the given origin, normal, size and grid resolution + /// + /// + /// + /// + /// + /// + public static void GeneratePlane(in ProcGenMesh output, float3 origin, float3 normal, float size, int resolution) + { + GetRightUp(normal, out var right, out var up); + GeneratePlane(in output, origin, right, up, size, resolution); + } + + /// + /// Generate a cube mesh with the given origin, size and grid resolution + /// + /// + /// + /// + /// + public static void GenerateCube(in ProcGenMesh output, float3 origin, float size, int resolution) + { + //Use GeneratePlane to generate the 6 faces of the cube + GeneratePlane(in output, origin + new float3(0, 0, size / 2), float3.UnitZ, size, resolution); + GeneratePlane(in output, origin + new float3(0, 0, -size / 2), -float3.UnitZ, size, resolution); + GeneratePlane(in output, origin + new float3(size / 2, 0, 0), float3.UnitX, size, resolution); + GeneratePlane(in output, origin + new float3(-size / 2, 0, 0), -float3.UnitX, size, resolution); + GeneratePlane(in output, origin + new float3(0, size / 2, 0), float3.UnitY, size, resolution); + GeneratePlane(in output, origin + new float3(0, -size / 2, 0), -float3.UnitY, size, resolution); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static float2 CartesianToSphere(in float3 cartesian) + { + var latitude = MathF.Asin(cartesian.Y); + var longitude = MathF.Atan2(cartesian.X, cartesian.Z); + return new float2(latitude, longitude); + } + + /// + /// Normalised spherical coordinates to cartesian coordinates + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static float3 SphereToCartesian(in float latitude, in float longitude) + { + var a = float.Cos(longitude); + var x = a * float.Cos(latitude); + var y = float.Sin(longitude); + var z = a * float.Sin(latitude); + return new float3(x, y, z); + } + + /// + /// Cartesian coordinates from toroidal coordinates + /// + /// + /// + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static float3 ToroidialToCartesian( + in float latitude, + in float longitude, + float radiusA = 1.0f, + float radiusB = 0.5f + ) + { + var a = radiusA + radiusB * MathF.Cos(latitude); + var x = a * MathF.Cos(longitude); + var y = radiusB * MathF.Sin(latitude); + var z = a * MathF.Sin(longitude); + return new float3(x, y, z); + } + + /// + /// Generates grid topology for a mesh, which can be transformed into a conic shape or plane + /// + /// + /// Number of vertices on X axis + /// Number of vertices on Y axis + public static unsafe void GenerateGridTopology(in ProcGenMesh output, int resolutionX, int resolutionY) + { + var vStart = output.VertexCount; + if (output.OutIndices == null) + { + var stepX = 1.0f / resolutionX; + var stepY = 1.0f / resolutionY; + + int vCount = resolutionX * resolutionY * 6; + + var vertices = output.OutPositions; + var vPtr = AllocateAtEnd(vertices, vCount); + var vIndex = 0; + for (var y = 0; y < resolutionY; ++y) + { + for (var x = 0; x < resolutionX; ++x) + { + var x0 = x * stepX; + var y0 = y * stepY; + var x1 = (x + 1) * stepX; + var y1 = (y + 1) * stepY; + + var p0 = new float3(x0, y0, 0); + var p1 = new float3(x1, y0, 0); + var p2 = new float3(x1, y1, 0); + var p3 = new float3(x0, y1, 0); + + vPtr[vIndex++] = p0; + vPtr[vIndex++] = p1; + vPtr[vIndex++] = p2; + + vPtr[vIndex++] = p0; + vPtr[vIndex++] = p2; + vPtr[vIndex++] = p3; + } + } + //UVs can be generated from this topology directly + if (output.OutUVs != null) + { + var uvs = output.OutUVs; + var uvPtr = AllocateAtEnd(uvs, vCount); + vIndex = 0; + for (var i = 0; i < vCount; ++i) + { + uvPtr[vIndex++] = vPtr[i].XY; + } + } + } + else + { + var stepX = 1.0f / resolutionX; + var stepY = 1.0f / resolutionY; + // Vertex resolution is one more than the grid resolution + var total = (resolutionX + 1) * (resolutionY + 1); + var vertices = output.OutPositions; + var vPtr = AllocateAtEnd(vertices, total); + var vIndex = 0; + for (var y = 0; y <= resolutionY; ++y) + { + for (var x = 0; x <= resolutionX; ++x) + { + var x0 = x * stepX; + var y0 = y * stepY; + vPtr[vIndex++] = new float3(x0, y0, 0); + } + } + //UVs can be generated from this topology directly + if (output.OutUVs != null) + { + var uvs = output.OutUVs; + var uvPtr = AllocateAtEnd(uvs, total); + vIndex = 0; + for (var i = 0; i < total; ++i) + { + uvPtr[vIndex++] = vPtr[i].XY; + } + } + AddGridIndices(output.OutIndices, vStart, resolutionX, resolutionY); + } + } + + /// + /// Generate a sphere mesh with the given origin, radius and resolution + /// + /// Mesh to output to + /// Sphere origin + /// Sphere radius + /// Resolution of sphere (longitude) + /// Resolution of sphere (latitude) + public static unsafe void GenerateSphere( + in ProcGenMesh output, + float3 origin, + float radius, + int resolutionA, + int resolutionB + ) + { + var vertices = output.OutPositions; + var vStart = vertices.Count; + + var resOffset = new float2(0, -float.Pi / 2); + // Normalize the scale to match spherical coordinates + var resScale = new float2(float.Tau, float.Pi); + + GenerateGridTopology(in output, resolutionA, resolutionB); + + var vPtr = vertices.Ptr.Cast().Offset(vStart); + ; + var vCount = vertices.Count - vStart; + for (var i = 0; i < vCount; ++i) + { + var uv = vPtr[i]; + vPtr[i] = + SphereToCartesian(uv.X * resScale.X + resOffset.X, uv.Y * resScale.Y + resOffset.Y) * radius + origin; + } + + if (output.OutNormals != null) + { + var normals = output.OutNormals; + + var nPtr = AllocateAtEnd(normals, vCount); + var vIndex = 0; + for (var i = 0; i < vCount; ++i) + { + nPtr[vIndex++] = float3.Normalize(vPtr[i] - origin); + } + } + } + + public static void GenerateSphere(in ProcGenMesh output, float3 origin, float radius, int resolution) + { + GenerateSphere(output, origin, radius, resolution, resolution / 2); + } + + /// + /// Generate a torus mesh with the given origin, radius and resolution + /// + /// Mesh to output to + /// Torus origin + /// Torus main radius + /// Torus secondary radius + /// Resolution of torus (primary) + /// Resolution of torus (secondary) + public static unsafe void GenerateTorus( + in ProcGenMesh output, + float3 origin, + float radiusA, + float radiusB, + int resolutionA, + int resolutionB + ) + { + var vertices = output.OutPositions; + var vStart = vertices.Count; + + var resOffset = new float2(0, 0); + // Normalize the scale to match spherical coordinates + var resScale = new float2(float.Tau, -float.Tau); + + GenerateGridTopology(in output, resolutionA, resolutionB); + + var vPtr = vertices.Ptr.Cast().Offset(vStart); + var vCount = vertices.Count - vStart; + for (var i = 0; i < vCount; ++i) + { + var uv = vPtr[i]; + vPtr[i] = + ToroidialToCartesian(uv.X * resScale.X + resOffset.X, uv.Y * resScale.Y + resOffset.Y, radiusA, radiusB) + + origin; + } + + if (output.OutNormals != null) + { + var normals = output.OutNormals; + + var nPtr = AllocateAtEnd(normals, vCount); + var vIndex = 0; + for (var i = 0; i < vCount; ++i) + { + var uv = vPtr[i]; + var normal = float3.Normalize(uv - origin); + nPtr[vIndex++] = normal; + } + } + } + + /// + /// Generate a circle/disk mesh with the given origin, axis, radius and resolution + /// + /// Output mesh object + /// Origin of disk + /// Axis/normal of disk + /// Radius of disk + /// Resolution of disk + /// If true, reverse disk direction + public static unsafe void GenerateDisk( + in ProcGenMesh output, + float3 origin, + float3 axis, + float radius, + int resolution, + bool flip = false + ) + { + var vertices = output.OutPositions; + var vStart = vertices.Count; + GetRightUp(axis, out var right, out var up); + var step = MathF.Tau / resolution; + + var vPtr = AllocateAtEnd(vertices, resolution * 3); + var vIndex = 0; + + for (var i = 0; i < resolution; ++i) + { + var angle0 = i * step; + var angle1 = (i + 1) * step; + + var p0 = origin + right * MathF.Cos(angle0) * radius + up * MathF.Sin(angle0) * radius; + var p1 = origin + right * MathF.Cos(angle1) * radius + up * MathF.Sin(angle1) * radius; + var p2 = origin; + + if (flip) + { + vPtr[vIndex++] = p0; + vPtr[vIndex++] = p2; + vPtr[vIndex++] = p1; + } + else + { + vPtr[vIndex++] = p0; + vPtr[vIndex++] = p1; + vPtr[vIndex++] = p2; + } + } + + if (output.OutUVs != null) + { + var uvs = output.OutUVs; + uvs.EnsureCapacity(uvs.Count + resolution * 3); + var uvPtr = AllocateAtEnd(uvs, resolution * 3); + vIndex = 0; + + var uvOrigin = new float2(0.5f, 0.5f); + for (var i = 0; i < resolution; ++i) + { + var angle0 = i * step; + var angle1 = (i + 1) * step; + + uvPtr[vIndex++] = uvOrigin + new float2(MathF.Cos(angle0), MathF.Sin(angle0)) * 0.5f; + uvPtr[vIndex++] = uvOrigin + new float2(MathF.Cos(angle1), MathF.Sin(angle1)) * 0.5f; + uvPtr[vIndex++] = uvOrigin; + } + } + + if (output.OutNormals != null) + AppendFlatValue(output.OutNormals, axis, resolution * 3); + + AddOrderedIndices(output.OutIndices, vStart, resolution * 3); + } + + /// + /// Generate a cone mesh with the given origin, axis, radius, height and resolution + /// + /// Output mesh + /// Cone origin + /// Cone axis + /// Cone radius + /// Cone height + /// Resolution of output mesh + /// If true, will add a disk to cap cone + public static unsafe void GenerateCone( + in ProcGenMesh output, + float3 origin, + float3 axis, + float radius, + float height, + int resolution, + bool addCap = true + ) + { + var vertices = output.OutPositions; + var vStart = vertices.Count; + var vPtr = AllocateAtEnd(vertices, resolution * 3); + var vIndex = 0; + + GetRightUp(axis, out var right, out var up); + var step = MathF.Tau / resolution; + for (var i = 0; i < resolution; ++i) + { + var angle0 = i * step; + var angle1 = (i + 1) * step; + + var p0 = origin + right * MathF.Cos(angle0) * radius + up * MathF.Sin(angle0) * radius; + var p1 = origin + right * MathF.Cos(angle1) * radius + up * MathF.Sin(angle1) * radius; + var p2 = origin + axis * height; + + vPtr[vIndex++] = p0; + vPtr[vIndex++] = p1; + vPtr[vIndex++] = p2; + } + + if (output.OutUVs != null) + { + var uvs = output.OutUVs; + var uvPtr = AllocateAtEnd(uvs, resolution * 3); + vIndex = 0; + + var invRes = 1.0f / resolution; + for (var i = 0; i < resolution; ++i) + { + var u0 = i * invRes; + var u1 = (i + 1) * invRes; + + uvPtr[vIndex++] = new float2(u0, 0); + uvPtr[vIndex++] = new float2(u1, 0); + uvPtr[vIndex++] = new float2(0.5f, 1); + } + } + + if (output.OutNormals != null) + { + var normals = output.OutNormals; + var nPtr = AllocateAtEnd(normals, resolution * 3); + vIndex = 0; + var dir = float2.Normalize(new float2(radius, height)); + var scaleXY = dir.Y; + var scaledAxis = axis * dir.X; + var prevNormal = (right * MathF.Cos(0) + up * MathF.Sin(0)) * scaleXY + scaledAxis; + for (var i = 1; i <= resolution; ++i) + { + var angle = i * step; + var normal = (right * MathF.Cos(angle) + up * MathF.Sin(angle)) * scaleXY + scaledAxis; + + nPtr[vIndex++] = prevNormal; + nPtr[vIndex++] = normal; + nPtr[vIndex++] = (prevNormal + normal) * 0.5f; + + prevNormal = normal; + } + } + + AddOrderedIndices(output.OutIndices, vStart, resolution * 3); + + if (addCap) + { + GenerateDisk(in output, origin, -axis, radius, resolution, false); + } + } + + /// + /// Generate a cylinder mesh with the given origin, axis, radius, height and resolution + /// + /// Output mesh object + /// Origin to place mesh + /// Axis of shape + /// Radius of shape + /// Height of shape + /// Resolution of output mesh + /// If true, will add disks on both ends of cylinder + public static unsafe void GenerateCylinder( + in ProcGenMesh output, + float3 origin, + float3 axis, + float radius, + float height, + int resolution, + bool addCaps = true + ) + { + var vertices = output.OutPositions; + var vStart = vertices.Count; + + GenerateGridTopology(in output, resolution, 2); + + const float scale = float.Tau; + GetRightUp(axis, out var right, out var up); + + var vPtr = vertices.Ptr.Cast().Offset(vStart); + var vCount = vertices.Count - vStart; + + if (output.OutNormals != null) + { + // Generate normals and warp grid to cylinder + var normals = output.OutNormals; + var nPtr = AllocateAtEnd(normals, vCount); + for (var i = 0; i < vCount; ++i) + { + var uv = vPtr[i]; + var angle = uv.X * scale; + var heightOffset = uv.Y * height; + var normal = right * MathF.Cos(angle) * radius + up * MathF.Sin(angle); + nPtr[i] = normal; + vPtr[i] = origin + normal * radius + axis * heightOffset; + } + } + else + { + // Warp grid to cylinder + for (var i = 0; i < vCount; ++i) + { + var uv = vPtr[i]; + var angle = uv.X * scale; + var heightOffset = uv.Y * height; + vPtr[i] = + origin + right * MathF.Cos(angle) * radius + up * MathF.Sin(angle) * radius + axis * heightOffset; + } + } + + if (addCaps) + { + GenerateDisk(in output, origin, -axis, radius, resolution, false); + GenerateDisk(in output, origin + axis * height, axis, radius, resolution, false); + } + } +} diff --git a/Brutal.Render.Mesh/ProcGenMesh.cs b/Brutal.Render.Mesh/ProcGenMesh.cs new file mode 100644 index 0000000..5de1607 --- /dev/null +++ b/Brutal.Render.Mesh/ProcGenMesh.cs @@ -0,0 +1,570 @@ +using System.Linq.Expressions; +using Brutal.Collections; +using Brutal.Memory; +using Brutal.Numerics; +using Brutal.Pointers.Extensions; + +namespace Brutal.Render.Mesh; + +/// +/// Output mesh structure that can optionally output to required vertex attributes +/// +public readonly struct ProcGenMesh +{ + /// + /// Vertex positions as Vec3 (always required) + /// + public readonly NativeStrideList OutPositions; + + /// + /// Vertex normals as Vec3 (optional) + /// + public readonly NativeStrideList? OutNormals; + + /// + /// Vertex UVs as Vec2 (optional) + /// + public readonly NativeStrideList? OutUVs; + + /// + /// Indices (optional) + /// + public readonly NativeStrideList? OutIndices; + + /// Construct a new ProcGenMesh structure from the given output lists + public ProcGenMesh( + NativeStrideList outPositions, + NativeStrideList? outIndices = null, + NativeStrideList? outNormals = null, + NativeStrideList? outUVs = null + ) + { + OutPositions = outPositions; + OutNormals = outNormals; + OutUVs = outUVs; + OutIndices = outIndices; + } + + /// + /// Vertex count + /// + public int VertexCount => OutPositions.Count; + + /// + /// Index count + /// + public int IndexCount => OutIndices?.Count ?? 0; + + /// + /// If true, indices are 16-bit shorts + /// + public bool Indices16Bit => OutIndices?.Stride == ByteSize.Of(); + + /// + /// If true, indices are 32-bit ints + /// + public bool Indices32Bit => OutIndices?.Stride == ByteSize.Of(); +} + +/// +/// Procedural generation mesh library +/// Functions in this library support generating meshes with a variety vertex and index attributes +/// +public static partial class ProcGenMeshLibrary +{ + /// Global right direction assumed in generation. Change this if you are using a different coordinate system + public static float3 GlobalRight = float3.UnitX; + + /// Global up direction assumed in generation. Change this if you are using a different coordinate system + public static float3 GlobalUp = float3.UnitY; + + /// + /// Ensures space for the given number of vertices in the output buffer, + /// increases count and returns a pointer to the start of the new vertices. + /// Pointer is only valid until the next modification of the buffer. + /// + /// NativeStrideList + /// Number of new elements to allocate + /// Vertex struct type + /// Pointer to first element in updated buffer + public static unsafe T* AllocateAtEnd(INativeList list, int count) + where T : unmanaged + { + if (list.Stride != ByteSize.Of()) + throw new System.Exception($"Stride mismatch: {list.Stride} != {ByteSize.Of()}"); + + var oldSize = ByteSize.Of(list); + list.Count += count; + return (T*)((byte*)list.Ptr + oldSize); + } + + public static unsafe T* AllocateAtEnd(NativeStrideList list, int count) + where T : unmanaged + { + if (list.Stride != ByteSize.Of()) + throw new System.Exception($"Stride mismatch: {list.Stride} != {ByteSize.Of()}"); + + var oldSize = ByteSize.Of(list); + list.Count += count; + return (T*)(((byte*)list.Ptr) + oldSize); + } + + /// + /// General function for swizzling around vertex data + /// Example offsets to swizzle: XZY: [0,2,1], XXX: [0,0,0], YX: [1,0], WXYZ: [3,0,1,2] + /// + /// Input list of vertex elements to swizzle. + /// Output list of vertex elements to swizzle (can be same as input) + /// List of offsets to target index. MUST be same length as expected vector + /// Vector element type (usually float). NOT things like Vec3, you must cast these lists to their element type + public static unsafe void SwizzleVertices(Span inList, Span outList, Span offsets) + where T : unmanaged + { + if (inList.Length != outList.Length) + throw new System.Exception($"Length mismatch: {inList.Length} != {outList.Length}"); + + var vectorLength = offsets.Length; + var buffer = stackalloc T[vectorLength]; + + var vCount = inList.Length / vectorLength; + var ptr = inList.AsPointer(); + for (var i = 0; i < vCount; i++) + { + var vI = i * vectorLength; + for (var ii = 0; ii < vectorLength; ii++) + buffer[ii] = ptr[vI + offsets[ii]]; + for (var ii = 0; ii < vectorLength; ii++) + ptr[vI + ii] = buffer[ii]; + } + } + + /// + /// Add indices assuming triangles are generated in a clockwise order + /// Supports both 16 and 32bit indices as output + /// + /// Output indices, if null, ignore + /// First vertex + /// Number of indices to generate + public static unsafe void AddOrderedIndices(NativeStrideList? indices, int start, int count) + { + if (indices == null) + return; + var oldSize = ByteSize.Of(indices); + indices.Count += count; + var bytePtr = indices.Ptr.Offset(oldSize); + var startU = (uint)start; + + // Support 16 and 32 bit indices + if (indices.Stride == ByteSize.Of()) + { + var ptr = (ushort*)bytePtr; + for (uint i = 0; i < count; ++i) + ptr[i] = (ushort)(startU + i); + } + else if (indices.Stride == ByteSize.Of()) + { + var ptr = (uint*)bytePtr; + for (uint i = 0; i < count; ++i) + ptr[i] = startU + i; + } + else + { + throw new Exception($"Unsupported index stride: {indices.Stride}"); + } + } + + public static unsafe void AddGridIndices( + NativeStrideList indices, + int start, + int resolutionX, + int resolutionY, + bool flip = false + ) + { + var oldSize = ByteSize.Of(indices); + indices.Count += (resolutionX * resolutionY * 6); + // Vertex resolution is one more than the grid resolution + var realResX = resolutionX + 1; + var bytePtr = indices.Ptr.Offset(oldSize); + var flipOffset = flip ? 1 : 0; + var p0 = flipOffset; + var p1 = 1 - flipOffset; + var p2 = (realResX + flipOffset); + var p3 = (realResX + 1 - flipOffset); + + // Support 16 and 32 bit indices + if (indices.Stride == ByteSize.Of()) + { + var ptr = (ushort*)bytePtr; + var index = 0; + for (var i = 0; i < resolutionY; i++) + { + for (var j = 0; j < resolutionX; j++) + { + var i0 = start + i * realResX + j; + ptr[index++] = (ushort)(i0 + p0); + ptr[index++] = (ushort)(i0 + p1); + ptr[index++] = (ushort)(i0 + p3); + + ptr[index++] = (ushort)(i0 + p0); + ptr[index++] = (ushort)(i0 + p3); + ptr[index++] = (ushort)(i0 + p2); + } + } + } + else if (indices.Stride == ByteSize.Of()) + { + var ptr = (uint*)bytePtr; + var index = 0; + for (var i = 0; i < resolutionY; i++) + { + for (var j = 0; j < resolutionX; j++) + { + var i0 = start + i * realResX + j; + ptr[index++] = (uint)(i0 + p0); + ptr[index++] = (uint)(i0 + p1); + ptr[index++] = (uint)(i0 + p3); + + ptr[index++] = (uint)(i0 + p0); + ptr[index++] = (uint)(i0 + p3); + ptr[index++] = (uint)(i0 + p2); + } + } + } + else + { + throw new Exception($"Unsupported index stride: {indices.Stride}"); + } + } + + /// + /// Add a flat repeated value to the end of the list + /// + /// target NativeStrideList + /// Value to use + /// Number of repeats + /// Value type, must be correct stride + private static unsafe void AppendFlatValue(NativeStrideList list, T value, int count) + where T : unmanaged + { + var ptr = AllocateAtEnd(list, count); + for (var i = 0; i < count; ++i) + ptr[i] = value; + } + + /// + /// Add a triangle to a vertex buffer + /// + /// Position buffer + /// Point in triangle + /// Point in triangle + /// Point in triangle + /// Vertex type + public static unsafe void AddTriangle(NativeStrideList positions, T p0, T p1, T p2) + where T : unmanaged + { + var ptr = AllocateAtEnd(positions, 3); + ptr[0] = p0; + ptr[1] = p1; + ptr[2] = p2; + } + + /// + /// Adds a quad as two triangles to the output mesh. + /// Assumes points are organised in clockwise or anticlockwise order (p0 and p2 should be opposite corners, as with p1 and p3) + /// + /// Output buffer + /// Point in quad + /// Point in quad + /// Point in quad + /// Point in quad + /// Vertex type + public static unsafe void AddQuad(NativeStrideList positions, T p0, T p1, T p2, T p3) + where T : unmanaged + { + var ptr = AllocateAtEnd(positions, 6); + ptr[0] = p0; + ptr[1] = p1; + ptr[2] = p2; + + ptr[3] = p0; + ptr[4] = p2; + ptr[5] = p3; + } + + /// + /// Adds a quad as two triangles to the output mesh, with efficient index generation. + /// Assumes points are organised in clockwise or anticlockwise order (p0 and p2 should be opposite corners, as with p1 and p3) + /// + /// Output position buffer + /// Output indices + /// Point in quad + /// Point in quad + /// Point in quad + /// Point in quad + /// Vertex type + public static unsafe void AddQuad(NativeStrideList positions, NativeStrideList indices, T p0, T p1, T p2, T p3) + where T : unmanaged + { + var vCount = positions.Count; + var ptr = AllocateAtEnd(positions, 4); + ptr[0] = p0; + ptr[1] = p1; + ptr[2] = p2; + ptr[3] = p3; + AddGridIndices(indices, vCount, 2, 2); + } + + /// + /// Add a triangle to an output mesh + /// + /// Output mesh object + /// Point in triangle + /// Point in triangle + /// Point in triangle + public static void AddTriangle(in ProcGenMesh output, float3 p0, float3 p1, float3 p2) + { + var vCount = output.VertexCount; + AddTriangle(output.OutPositions, p0, p1, p2); + if (output.OutUVs != null) + AppendFlatValue(output.OutUVs, float2.Zero, 3); + if (output.OutNormals != null) + { + var normal = float3.Normalize(float3.Cross(p1 - p0, p2 - p0)); + AppendFlatValue(output.OutNormals, normal, 3); + } + AddOrderedIndices(output.OutIndices, vCount, 3); + } + + /// + /// Add a quad to an output mesh. Assumes quad is planar for normals, and UVs are normalised + /// Assumes points are organised in clockwise or anticlockwise order (p0 and p2 should be opposite corners, as with p1 and p3) + /// + /// Output mesh target + /// Point in quad + /// Point in quad + /// Point in quad + /// Point in quad + public static void AddQuad(in ProcGenMesh output, float3 p0, float3 p1, float3 p2, float3 p3) + { + if (output.OutIndices != null) + { + // AddQuad with indices: Use efficient index generation + AddQuad(output.OutPositions, output.OutIndices, p0, p1, p2, p3); + if (output.OutUVs != null) + { + output.OutUVs.AddRange([new float2(0, 0), new float2(0, 1), new float2(1, 1), new float2(1, 0)]); + } + } + else + { + // AddQuad without indices: Add vertices directly + AddQuad(output.OutPositions, p0, p1, p2, p3); + if (output.OutUVs != null) + { + output.OutUVs.AddRange( + [ + new float2(0, 0), + new float2(0, 1), + new float2(1, 1), + new float2(0, 0), + new float2(1, 1), + new float2(1, 0), + ] + ); + } + } + // Normals are the same for all vertices in a quad + if (output.OutNormals != null) + { + var normal = float3.Normalize(float3.Cross(p1 - p0, p2 - p0)); + AppendFlatValue(output.OutNormals, normal, output.OutIndices != null ? 4 : 6); + } + } + + /// Calculate tangents for a mesh from UV data + public static unsafe void CalculateTangents( + NativeStrideList outTangents, + Span positions, + Span indices, + Span normals, + Span uvs + ) + { + var vCount = positions.Length; + var tangents = AllocateAtEnd(outTangents, vCount); + + // Temporary tangent lists + using var tan1 = new NativeList(); + tan1.Count = vCount; + using var tan2 = new NativeList(); + tan2.Count = vCount; + + var iCount = indices.Length; + for (var a = 0; a < iCount; a += 3) + { + var i1 = indices[a]; + var i2 = indices[a + 1]; + var i3 = indices[a + 2]; + var v1 = positions[i1]; + var v2 = positions[i2]; + var v3 = positions[i3]; + var w1 = uvs[i1]; + var w2 = uvs[i2]; + var w3 = uvs[i3]; + var x1 = v2.X - v1.X; + var x2 = v3.X - v1.X; + var y1 = v2.Y - v1.Y; + var y2 = v3.Y - v1.Y; + var z1 = v2.Z - v1.Z; + var z2 = v3.Z - v1.Z; + var s1 = w2.X - w1.X; + var s2 = w3.X - w1.X; + var t1 = w2.Y - w1.Y; + var t2 = w3.Y - w1.Y; + var div = s1 * t2 - s2 * t1; + var r = div == 0.0f ? 0.0f : 1.0f / div; + var sDir = new float3((t2 * x1 - t1 * x2) * r, (t2 * y1 - t1 * y2) * r, (t2 * z1 - t1 * z2) * r); + var tDir = new float3((s1 * x2 - s2 * x1) * r, (s1 * y2 - s2 * y1) * r, (s1 * z2 - s2 * z1) * r); + tan1[i1] += sDir; + tan1[i2] += sDir; + tan1[i3] += sDir; + tan2[i1] += tDir; + tan2[i2] += tDir; + tan2[i3] += tDir; + } + + // Calculate final tangents from normals and temporary tangents + for (var a = 0; a < vCount; a++) + { + var n = normals[a]; + var t = tan1[a]; + // Gram-Schmidt orthogonalize + var tmp = (t - n * float3.Dot(n, t)); + tmp = float3.Normalize(tmp); + // Calculate handedness + var w = float3.Dot(float3.Cross(n, t), tan2[a]) < 0.0f ? -1.0f : 1.0f; + tangents[a] = new float4(tmp, w); + } + } + + /// Calculate tangents for a mesh purely from normals + public static unsafe void CalculateTangents(NativeStrideList outTangents, Span normals) + { + //No UVs, calculate tangents from world up direction + var tangents = AllocateAtEnd(outTangents, normals.Length); + var count = normals.Length; + for (var i = 0; i < count; i++) + { + var normal = normals[i]; + if (normal.Y >= 1.0f) + { + tangents[i] = new float4(1.0f, 0.0f, 0.0f, 1.0f); + } + else + { + var biTangent = float3.Cross(normal, GlobalUp); + tangents[i] = new float4(float3.Normalize(float3.Cross(normal, biTangent)), 1.0f); + } + } + } + + /// + /// Calculate the tangents of a mesh + /// + /// Source mesh to calculate tangents from + /// Tangent buffer to output to + /// Thrown if insufficient mesh data present + public static void CalculateTangents(in ProcGenMesh mesh, NativeStrideList outTangents) + { + if (mesh is { OutIndices: not null, OutUVs: not null, OutNormals: not null }) + CalculateTangents( + outTangents, + mesh.OutPositions.ToSpan(), + mesh.OutIndices.ToSpan(), + mesh.OutNormals.ToSpan(), + mesh.OutUVs.ToSpan() + ); + else if (mesh.OutNormals != null) + CalculateTangents(outTangents, mesh.OutNormals.ToSpan()); + else + throw new Exception("Insufficient data to calculate tangents"); + } + + /// + /// Swizzle XYZ coords of a generated mesh. Helpful if you are using different coordinate systems + /// + /// Target mesh data + /// Offset of swizzle data for XYZ + /// + public static void SwizzleWorldCoords(in ProcGenMesh mesh, Span offsets) + { + if (offsets.Length != 3) + throw new Exception("Insufficient data to calculate world coords"); + var positions = mesh.OutPositions.AsSpan(); + SwizzleVertices(positions, positions, offsets); + if (mesh.OutNormals != null) + { + var normals = mesh.OutNormals.AsSpan(); + SwizzleVertices(normals, normals, offsets); + } + } + + /// + /// Offset all position values by a translation value + /// + /// Target mesh + /// Translation offset + public static unsafe void OffsetWorldCoords(in ProcGenMesh mesh, float3 translation) + { + var positions = mesh.OutPositions.ToSpan(); + var vCount = positions.Length; + var ptr = positions.AsPointer(); + for (var i = 0; i < vCount; i++) + ptr[i] += translation; + } + + /// + /// Scale all position/normal values by a value + /// + /// Target mesh + /// Scaler + public static unsafe void ScaleWorldCoords(in ProcGenMesh mesh, float3 scale) + { + var positions = mesh.OutPositions.ToSpan(); + var vCount = positions.Length; + var ptr = positions.AsPointer(); + for (var i = 0; i < vCount; i++) + ptr[i] *= scale; + if (mesh.OutNormals != null) + { + var normals = mesh.OutNormals.ToSpan(); + vCount = normals.Length; + ptr = normals.AsPointer(); + for (var i = 0; i < vCount; i++) + ptr[i] *= scale; + } + } + + /// + /// Transform all position/normal values by a value + /// + /// Target mesh + /// Transform matrix + public static unsafe void TransformWorldCoords(in ProcGenMesh mesh, float4x4 matrix) + { + var positions = mesh.OutPositions.ToSpan(); + var vCount = positions.Length; + var ptr = positions.AsPointer(); + for (var i = 0; i < vCount; i++) + ptr[i] = float3.Transform(ptr[i], matrix); + if (mesh.OutNormals != null) + { + var normals = mesh.OutNormals.ToSpan(); + vCount = normals.Length; + ptr = normals.AsPointer(); + for (var i = 0; i < vCount; i++) + ptr[i] = float3.TransformNormal(ptr[i], matrix); + } + } +} diff --git a/Brutal.RenderDoc.ImGui/GlobalUsings.cs b/Brutal.RenderDoc.ImGui/GlobalUsings.cs new file mode 100644 index 0000000..a8b5839 --- /dev/null +++ b/Brutal.RenderDoc.ImGui/GlobalUsings.cs @@ -0,0 +1,6 @@ +global using System.Runtime.CompilerServices; +global using Brutal.ImGuiApi; +global using Brutal.Numerics; +global using static Brutal.RenderDocApi.Logger; +global using Brutal.Strings; +global using Brutal.Strings.Extensions; diff --git a/Brutal.RenderDoc.ImGui/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt b/Brutal.RenderDoc.ImGui/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..376cab1 --- /dev/null +++ b/Brutal.RenderDoc.ImGui/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,34 @@ +Brutal.RenderDoc.ImGui builds on the Brutal.RenderDoc bindings to the +third-party component listed below, reproduced with the licence that +governs it. + +============================================================ +RenderDoc 1.42 -- MIT -- https://github.com/baldurk/renderdoc +============================================================ + +The MIT License (MIT) + +Copyright (c) 2015-2025 Baldur Karlsson + +Copyright (c) 2014 Crytek + +Copyright (c) 1998-2018 Third party code and tools +(https://github.com/baldurk/renderdoc/blob/v1.42/docs/credits_acknowledgements.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Brutal.RenderDoc.ImGui/RenderDocWindow.cs b/Brutal.RenderDoc.ImGui/RenderDocWindow.cs new file mode 100644 index 0000000..6853436 --- /dev/null +++ b/Brutal.RenderDoc.ImGui/RenderDocWindow.cs @@ -0,0 +1,314 @@ +namespace Brutal.RenderDocApi; + +/// Helper to control RenderDoc, view captures etc., through an ImGui window. +public class RenderDocWindow +{ + public static readonly RenderDocWindow Instance = new(); + + bool LoadApi() + { + var success = RenderDoc.LoadApi(); + Log.Info($"RenderDoc API {(success ? "loaded successfully" : "loading failed")}"); + return success; + } + + void UnloadApi() + { + RenderDoc.RemoveHooks(); + Log.Info("RenderDoc API unloaded"); + } + + void OpenUI() + { + var connected = RenderDoc.IsTargetControlConnected; + var res = connected ? RenderDoc.ShowReplayUI() : RenderDoc.LaunchReplayUI(true, null); + Log.Info(connected ? $"ShowReplayUI {res}" : $"LaunchReplayUI {res}"); + } + + int frameCount; + uint? triggerCaptureIndex; + public bool Visible; + + public void OnImGui() + { + OnUpdate(); + DrawMenuBar(); + DrawWindow(); + } + + void OnUpdate() + { + frameCount++; + + if (!RenderDoc.IsAvailable) + { + return; + } + + if (triggerCaptureIndex.HasValue && RenderDoc.NumCaptures > triggerCaptureIndex) + { + triggerCaptureIndex = null; + Log.Info($"TriggerCapture finished (frame {frameCount}, {RenderDoc.NumCaptures} captures)"); + } + } + + void DrawMenuBar() + { + if (ImGui.BeginMainMenuBar()) + { + if (ImGui.BeginMenu("View"u8)) + { + if (ImGui.MenuItem("RenderDoc"u8, selected: Visible)) + Visible = !Visible; + ImGui.EndMenu(); + } + + ImGui.EndMainMenuBar(); + } + } + + void DrawWindow() + { + if (!Visible) + return; + + var status = RenderDoc.State switch + { + RenderDoc.ControllerState.NotLoaded => "(not loaded)", + RenderDoc.ControllerState.LoadFail => "(loading failed)", + RenderDoc.ControllerState.LoadSuccess => + $"{RenderDoc.Version}{(RenderDoc.IsTargetControlConnected ? " (connected)" : "")}", + _ => throw new ArgumentOutOfRangeException(), + }; + + if (ImGui.Begin($"RenderDoc {status}###RenderDoc", ref Visible)) + { + DrawWindowContent(); + } + ImGui.End(); + } + + void DrawWindowContent() + { + // insert a help URL in the top-right corner + ImGui.SameLine(ImGui.GetContentRegionAvail().X - 25); // right-align + ImGui.TextLinkOpenURL("Help"u8, "https://renderdoc.org/docs/in_application_api.html"u8); + ImGui.SetCursorPos(ImGui.GetCursorStartPos()); // reset + + if (RenderDoc.IsAvailable) + { + DrawWindowContentWhenAvailable(); + ImGui.Separator(); + } + + // the load/unload button is somewhat misleading -> draw it last: + // - loading late appears to work but capturing might fail + // - unloading/detaching is not guaranteed to work: https://renderdoc.org/docs/in_application_api.html#_CPPv411RemoveHooksv) + if (ImGui.Button(RenderDoc.ApiLoaded ? "Unload RenderDoc"u8 : "Load RenderDoc"u8)) + { + if (RenderDoc.ApiLoaded) + UnloadApi(); + else + LoadApi(); + } + } + + static readonly ImInputString CaptureFilePathTemplate = new(256); + + void DrawWindowContentWhenAvailable() + { + var overlayBits = RenderDoc.OverlayBits; + if ( + ImGui.CheckboxFlags( + "##enabled"u8, + ref Unsafe.As(ref overlayBits), + (int)OverlayBits.Enabled + ) + ) + { + RenderDoc.OverlayBits = overlayBits; + } + ImGui.SameLine(); + if (EnumFlagField("Overlay"u8, ref overlayBits)) + { + RenderDoc.OverlayBits = overlayBits; + } + + if (ImGui.Button(RenderDoc.IsTargetControlConnected ? "Focus RenderDoc app"u8 : "Open RenderDoc app"u8)) + { + OpenUI(); + } + + if (ImGui.TreeNode("More"u8)) + { + Field("IsTargetControlConnected"u8, RenderDoc.IsTargetControlConnected); + + if (ImGui.Button("LaunchReplayUI"u8)) + { + var res = RenderDoc.LaunchReplayUI(true, null); + Log.Info($"LaunchReplayUI {res}"); + } + + if (ImGui.Button("ShowReplayUI"u8)) + { + var res = RenderDoc.ShowReplayUI(); + Log.Info($"ShowReplayUI {res}"); + } + + if (ImGui.Button("SetActiveWindow"u8)) + { + RenderDoc.SetActiveWindow(0, 0); + } + + if (ImGui.Button("UnloadCrashHandler"u8)) + { + RenderDoc.UnloadCrashHandler(); + } + + if (ImGui.Button("RemoveHooks"u8)) + { + RenderDoc.RemoveHooks(); + } + + ImGui.TreePop(); + } + + if (ImGui.TreeNode("Capture options"u8)) + { + foreach (var option in typeof(RenderDoc.CaptureOptions).GetProperties()) + { + if (option.PropertyType == typeof(bool)) + { + var value = (bool)option.GetValue(null)!; + if (ImGui.Checkbox(option.Name, ref value)) + option.SetValue(null, value); + } + else if (option.PropertyType == typeof(float)) + { + var value = (float)option.GetValue(null)!; + if (ImGui.InputFloat(option.Name, ref value)) + option.SetValue(null, value); + } + else if (option.PropertyType == typeof(uint)) + { + var value = (int)(uint)option.GetValue(null)!; // TODO actually uint... + if (ImGui.InputInt(option.Name, ref value)) + option.SetValue(null, value); + } + } + + CaptureFilePathTemplate.SetValue(RenderDoc.CaptureFilePathTemplate); + ImGui.Text("CaptureFilePathTemplate"u8); + ImGui.SameLine(); + if (ImGui.InputText("##CaptureFilePathTemplate"u8, CaptureFilePathTemplate)) + RenderDoc.CaptureFilePathTemplate = CaptureFilePathTemplate.ValueSpan; + + ImGui.TreePop(); + } + + var foldoutCaptures = FoldoutField("Captures"u8, RenderDoc.NumCaptures, RenderDoc.NumCaptures > 0); + ImGui.SameLine(); + if (ImGui.Button("TriggerCapture"u8)) + { + RenderDoc.TriggerCapture(); + triggerCaptureIndex = RenderDoc.NumCaptures; + Log.Info($"TriggerCapture requested (frame {frameCount}, {RenderDoc.NumCaptures} captures)"); + } + if (foldoutCaptures) + { + if (ImGui.BeginTable("captures"u8, 4, ImGuiTableFlags.Borders)) + { + ImGui.TableSetupColumn("#"u8, ImGuiTableColumnFlags.WidthFixed); + ImGui.TableSetupColumn("time"u8, ImGuiTableColumnFlags.WidthFixed); + ImGui.TableSetupColumn("file"u8); + ImGui.TableSetupColumn(""u8, ImGuiTableColumnFlags.WidthFixed); + ImGui.TableHeadersRow(); + + for (var i = 0; i < RenderDoc.NumCaptures; i++) + { + ImGui.PushID(i); + ImGui.TableNextRow(); + ImGui.TableNextColumn(); + + ImGui.Text($"#{i}"); + ImGui.TableNextColumn(); + + if (RenderDoc.TryGetCapture(i, out var path, out var time)) + { + ImGui.Text($"{time:g}"); + ImGui.TableNextColumn(); + var name = Utf8.Path.GetFileName(path); + ImGui.Text($"<{name}>"); + ImGui.TableNextColumn(); + if (ImGui.Button("open"u8)) + { + OpenUI(); + } + } + else + { + ImGui.Text("N/A"u8); + ImGui.TableNextColumn(); + ImGui.Text("N/A"u8); + } + + ImGui.PopID(); + } + + ImGui.EndTable(); + } + + ImGui.TreePop(); + } + } + + static bool EnumFlagField(ImString label, ref OverlayBits value) + { + var changed = false; + + if (FoldoutField(label, value.ToString())) + { + foreach (var flag in Enum.GetValues()) + { + if (flag == 0 || flag == OverlayBits.All) + continue; + changed |= EnumFlagFieldRow(flag.ToString(), ref value, flag); + } + ImGui.TreePop(); + } + + return changed; + } + + static bool EnumFlagFieldRow(ImString label, ref OverlayBits mask, OverlayBits flag) + { + var flagSet = mask.HasFlag(flag); + var changed = ImGui.Checkbox(label, ref flagSet); + if (changed) + { + if (flagSet) + mask |= flag; + else + mask &= ~flag; + } + return changed; + } + + static void Field(ImString label, object? value) + { + ImGui.Text($"{label}: {value}"); + } + + static void Field(ImString label, ImString value) + { + ImGui.Text($"{label}: {value}"); + } + + static bool FoldoutField(ImString label, object? value, bool foldable = true) + { + if (foldable) + return ImGui.TreeNode(label, $"{label}: {value}"); + Field(label, value); + return false; + } +} diff --git a/Brutal.RenderDoc/Generated/CaptureOptions.gen.cs b/Brutal.RenderDoc/Generated/CaptureOptions.gen.cs new file mode 100644 index 0000000..fa6feb1 --- /dev/null +++ b/Brutal.RenderDoc/Generated/CaptureOptions.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.RenderDocApi; + +public static partial class RenderDoc +{ + public static partial class CaptureOptions + { + public static bool AllowVSync + { + get => GetCaptureOptionBool(CaptureOption.AllowVSync); + set => SetCaptureOption(CaptureOption.AllowVSync, value); + } + public static bool AllowFullscreen + { + get => GetCaptureOptionBool(CaptureOption.AllowFullscreen); + set => SetCaptureOption(CaptureOption.AllowFullscreen, value); + } + public static bool APIValidation + { + get => GetCaptureOptionBool(CaptureOption.APIValidation); + set => SetCaptureOption(CaptureOption.APIValidation, value); + } + public static bool CaptureCallstacks + { + get => GetCaptureOptionBool(CaptureOption.CaptureCallstacks); + set => SetCaptureOption(CaptureOption.CaptureCallstacks, value); + } + public static bool CaptureCallstacksOnlyActions + { + get => GetCaptureOptionBool(CaptureOption.CaptureCallstacksOnlyActions); + set => SetCaptureOption(CaptureOption.CaptureCallstacksOnlyActions, value); + } + public static float DelayForDebugger + { + get => GetCaptureOptionF32(CaptureOption.DelayForDebugger); + set => SetCaptureOption(CaptureOption.DelayForDebugger, value); + } + public static bool VerifyBufferAccess + { + get => GetCaptureOptionBool(CaptureOption.VerifyBufferAccess); + set => SetCaptureOption(CaptureOption.VerifyBufferAccess, value); + } + public static bool HookIntoChildren + { + get => GetCaptureOptionBool(CaptureOption.HookIntoChildren); + set => SetCaptureOption(CaptureOption.HookIntoChildren, value); + } + public static bool RefAllResources + { + get => GetCaptureOptionBool(CaptureOption.RefAllResources); + set => SetCaptureOption(CaptureOption.RefAllResources, value); + } + public static bool SaveAllInitials + { + get => GetCaptureOptionBool(CaptureOption.SaveAllInitials); + set => SetCaptureOption(CaptureOption.SaveAllInitials, value); + } + public static bool CaptureAllCmdLists + { + get => GetCaptureOptionBool(CaptureOption.CaptureAllCmdLists); + set => SetCaptureOption(CaptureOption.CaptureAllCmdLists, value); + } + public static bool DebugOutputMute + { + get => GetCaptureOptionBool(CaptureOption.DebugOutputMute); + set => SetCaptureOption(CaptureOption.DebugOutputMute, value); + } + public static bool AllowUnsupportedVendorExtensions + { + get => GetCaptureOptionBool(CaptureOption.AllowUnsupportedVendorExtensions); + set => SetCaptureOption(CaptureOption.AllowUnsupportedVendorExtensions, value); + } + public static uint SoftMemoryLimit + { + get => GetCaptureOptionU32(CaptureOption.SoftMemoryLimit); + set => SetCaptureOption(CaptureOption.SoftMemoryLimit, value); + } + } +} diff --git a/Brutal.RenderDoc/Generated/Enums/ApiVersions.gen.cs b/Brutal.RenderDoc/Generated/Enums/ApiVersions.gen.cs new file mode 100644 index 0000000..50cff9f --- /dev/null +++ b/Brutal.RenderDoc/Generated/Enums/ApiVersions.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.RenderDocApi; + +/// RenderDoc uses semantic versioning (http://semver.org/). +/// MAJOR version is incremented when incompatible API changes happen. +/// MINOR version is incremented when functionality is added in a backwards-compatible manner. +/// PATCH version is incremented when backwards-compatible bug fixes happen. +/// Note that this means the API returned can be higher than the one you might have requested. +/// e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned +/// instead of 1.0.0. You can check this with the GetAPIVersion entry point +public enum ApiVersions : int +{ + /// eRENDERDOC_API_Version_1_0_0 + V1_0_0 = 10000, + + /// eRENDERDOC_API_Version_1_0_1 + V1_0_1 = 10001, + + /// eRENDERDOC_API_Version_1_0_2 + V1_0_2 = 10002, + + /// eRENDERDOC_API_Version_1_1_0 + V1_1_0 = 10100, + + /// eRENDERDOC_API_Version_1_1_1 + V1_1_1 = 10101, + + /// eRENDERDOC_API_Version_1_1_2 + V1_1_2 = 10102, + + /// eRENDERDOC_API_Version_1_2_0 + V1_2_0 = 10200, + + /// eRENDERDOC_API_Version_1_3_0 + V1_3_0 = 10300, + + /// eRENDERDOC_API_Version_1_4_0 + V1_4_0 = 10400, + + /// eRENDERDOC_API_Version_1_4_1 + V1_4_1 = 10401, + + /// eRENDERDOC_API_Version_1_4_2 + V1_4_2 = 10402, + + /// eRENDERDOC_API_Version_1_5_0 + V1_5_0 = 10500, + + /// eRENDERDOC_API_Version_1_6_0 + V1_6_0 = 10600, +} diff --git a/Brutal.RenderDoc/Generated/Enums/CaptureOption.gen.cs b/Brutal.RenderDoc/Generated/Enums/CaptureOption.gen.cs new file mode 100644 index 0000000..79067f3 --- /dev/null +++ b/Brutal.RenderDoc/Generated/Enums/CaptureOption.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.RenderDocApi; + +/// /////////////////////////////////////////////////////////////////////////////////////////////// +/// RenderDoc capture options +public enum CaptureOption : int +{ + /// eRENDERDOC_Option_AllowVSync + AllowVSync = 0, + + /// eRENDERDOC_Option_AllowFullscreen + AllowFullscreen = 1, + + /// eRENDERDOC_Option_APIValidation + APIValidation = 2, + + /// eRENDERDOC_Option_CaptureCallstacks + CaptureCallstacks = 3, + + /// eRENDERDOC_Option_CaptureCallstacksOnlyActions + CaptureCallstacksOnlyActions = 4, + + /// eRENDERDOC_Option_DelayForDebugger + DelayForDebugger = 5, + + /// eRENDERDOC_Option_VerifyBufferAccess + VerifyBufferAccess = 6, + + /// eRENDERDOC_Option_HookIntoChildren + HookIntoChildren = 7, + + /// eRENDERDOC_Option_RefAllResources + RefAllResources = 8, + + /// eRENDERDOC_Option_SaveAllInitials + SaveAllInitials = 9, + + /// eRENDERDOC_Option_CaptureAllCmdLists + CaptureAllCmdLists = 10, + + /// eRENDERDOC_Option_DebugOutputMute + DebugOutputMute = 11, + + /// eRENDERDOC_Option_AllowUnsupportedVendorExtensions + AllowUnsupportedVendorExtensions = 12, + + /// eRENDERDOC_Option_SoftMemoryLimit + SoftMemoryLimit = 13, +} diff --git a/Brutal.RenderDoc/Generated/Enums/InputButton.gen.cs b/Brutal.RenderDoc/Generated/Enums/InputButton.gen.cs new file mode 100644 index 0000000..306e876 --- /dev/null +++ b/Brutal.RenderDoc/Generated/Enums/InputButton.gen.cs @@ -0,0 +1,197 @@ +namespace Brutal.RenderDocApi; + +/// +public enum InputButton : int +{ + /// eRENDERDOC_Key_0 + Num0 = 0x30, + + /// eRENDERDOC_Key_1 + Num1 = 0x31, + + /// eRENDERDOC_Key_2 + Num2 = 0x32, + + /// eRENDERDOC_Key_3 + Num3 = 0x33, + + /// eRENDERDOC_Key_4 + Num4 = 0x34, + + /// eRENDERDOC_Key_5 + Num5 = 0x35, + + /// eRENDERDOC_Key_6 + Num6 = 0x36, + + /// eRENDERDOC_Key_7 + Num7 = 0x37, + + /// eRENDERDOC_Key_8 + Num8 = 0x38, + + /// eRENDERDOC_Key_9 + Num9 = 0x39, + + /// eRENDERDOC_Key_A + A = 0x41, + + /// eRENDERDOC_Key_B + B = 0x42, + + /// eRENDERDOC_Key_C + C = 0x43, + + /// eRENDERDOC_Key_D + D = 0x44, + + /// eRENDERDOC_Key_E + E = 0x45, + + /// eRENDERDOC_Key_F + F = 0x46, + + /// eRENDERDOC_Key_G + G = 0x47, + + /// eRENDERDOC_Key_H + H = 0x48, + + /// eRENDERDOC_Key_I + I = 0x49, + + /// eRENDERDOC_Key_J + J = 0x4A, + + /// eRENDERDOC_Key_K + K = 0x4B, + + /// eRENDERDOC_Key_L + L = 0x4C, + + /// eRENDERDOC_Key_M + M = 0x4D, + + /// eRENDERDOC_Key_N + N = 0x4E, + + /// eRENDERDOC_Key_O + O = 0x4F, + + /// eRENDERDOC_Key_P + P = 0x50, + + /// eRENDERDOC_Key_Q + Q = 0x51, + + /// eRENDERDOC_Key_R + R = 0x52, + + /// eRENDERDOC_Key_S + S = 0x53, + + /// eRENDERDOC_Key_T + T = 0x54, + + /// eRENDERDOC_Key_U + U = 0x55, + + /// eRENDERDOC_Key_V + V = 0x56, + + /// eRENDERDOC_Key_W + W = 0x57, + + /// eRENDERDOC_Key_X + X = 0x58, + + /// eRENDERDOC_Key_Y + Y = 0x59, + + /// eRENDERDOC_Key_Z + Z = 0x5A, + + /// eRENDERDOC_Key_NonPrintable + NonPrintable = 0x100, + + /// eRENDERDOC_Key_Divide + Divide, + + /// eRENDERDOC_Key_Multiply + Multiply, + + /// eRENDERDOC_Key_Subtract + Subtract, + + /// eRENDERDOC_Key_Plus + Plus, + + /// eRENDERDOC_Key_F1 + F1, + + /// eRENDERDOC_Key_F2 + F2, + + /// eRENDERDOC_Key_F3 + F3, + + /// eRENDERDOC_Key_F4 + F4, + + /// eRENDERDOC_Key_F5 + F5, + + /// eRENDERDOC_Key_F6 + F6, + + /// eRENDERDOC_Key_F7 + F7, + + /// eRENDERDOC_Key_F8 + F8, + + /// eRENDERDOC_Key_F9 + F9, + + /// eRENDERDOC_Key_F10 + F10, + + /// eRENDERDOC_Key_F11 + F11, + + /// eRENDERDOC_Key_F12 + F12, + + /// eRENDERDOC_Key_Home + Home, + + /// eRENDERDOC_Key_End + End, + + /// eRENDERDOC_Key_Insert + Insert, + + /// eRENDERDOC_Key_Delete + Delete, + + /// eRENDERDOC_Key_PageUp + PageUp, + + /// eRENDERDOC_Key_PageDn + PageDn, + + /// eRENDERDOC_Key_Backspace + Backspace, + + /// eRENDERDOC_Key_Tab + Tab, + + /// eRENDERDOC_Key_PrtScrn + PrtScrn, + + /// eRENDERDOC_Key_Pause + Pause, + + /// eRENDERDOC_Key_Max + Max, +} diff --git a/Brutal.RenderDoc/Generated/Enums/OverlayBits.gen.cs b/Brutal.RenderDoc/Generated/Enums/OverlayBits.gen.cs new file mode 100644 index 0000000..8ed36b8 --- /dev/null +++ b/Brutal.RenderDoc/Generated/Enums/OverlayBits.gen.cs @@ -0,0 +1,27 @@ +namespace Brutal.RenderDocApi; + +/// +[Flags] +public enum OverlayBits : int +{ + /// eRENDERDOC_Overlay_Enabled + Enabled = 0x1, + + /// eRENDERDOC_Overlay_FrameRate + FrameRate = 0x2, + + /// eRENDERDOC_Overlay_FrameNumber + FrameNumber = 0x4, + + /// eRENDERDOC_Overlay_CaptureList + CaptureList = 0x8, + + /// eRENDERDOC_Overlay_Default + Default = (Enabled | FrameRate | FrameNumber | CaptureList), + + /// eRENDERDOC_Overlay_All + All = 0x7ffffff, + + /// eRENDERDOC_Overlay_None + None = 0, +} diff --git a/Brutal.RenderDoc/Generated/RenderDoc.gen.cs b/Brutal.RenderDoc/Generated/RenderDoc.gen.cs new file mode 100644 index 0000000..0969018 --- /dev/null +++ b/Brutal.RenderDoc/Generated/RenderDoc.gen.cs @@ -0,0 +1,147 @@ +namespace Brutal.RenderDocApi; + +public static unsafe partial class RenderDoc +{ + [ApiVersion(1, 0)] + public static void GetApiVersion(out int major, out int minor, out int patch) + { + fixed (int* major_fixed = &major) + fixed (int* minor_fixed = &minor) + fixed (int* patch_fixed = &patch) + Api->GetAPIVersion(major_fixed, minor_fixed, patch_fixed); + } + + [ApiVersion(1, 0)] + public static int SetCaptureOption(CaptureOption opt, uint val) => Api->SetCaptureOptionU32(opt, val); + + [ApiVersion(1, 0)] + public static int SetCaptureOption(CaptureOption opt, float val) => Api->SetCaptureOptionF32(opt, val); + + [ApiVersion(1, 0)] + public static uint GetCaptureOptionU32(CaptureOption opt) => Api->GetCaptureOptionU32(opt); + + [ApiVersion(1, 0)] + public static float GetCaptureOptionF32(CaptureOption opt) => Api->GetCaptureOptionF32(opt); + + [ApiVersion(1, 0)] + public static void SetFocusToggleKeys(ReadOnlySpan keys) + { + fixed (InputButton* keys_fixed = keys) + Api->SetFocusToggleKeys(keys_fixed, keys.Length); + } + + [ApiVersion(1, 0)] + public static void SetCaptureKeys(ReadOnlySpan keys) + { + fixed (InputButton* keys_fixed = keys) + Api->SetCaptureKeys(keys_fixed, keys.Length); + } + + [ApiVersion(1, 0)] + public static OverlayBits OverlayBits + { + get => Api->GetOverlayBits(); + set => Api->MaskOverlayBits(0, value); + } + + [ApiVersion(1, 0)] + public static void MaskOverlayBits(OverlayBits And, OverlayBits Or) => Api->MaskOverlayBits(And, Or); + + [ApiVersion(1, 0)] + public static partial void RemoveHooks(); + + [ApiVersion(1, 0)] + public static void UnloadCrashHandler() => Api->UnloadCrashHandler(); + + [ApiVersion(1, 0)] + public static void SetCaptureFilePathTemplate(String8In pathtemplate) + { + fixed (byte* pathtemplate_fixed = pathtemplate) + Api->SetCaptureFilePathTemplate(pathtemplate_fixed); + } + + [ApiVersion(1, 0)] + public static String8Return CaptureFilePathTemplate + { + get => Utf8.GetNullTerminatedSpan(Api->GetCaptureFilePathTemplate()); + set => SetCaptureFilePathTemplate(value); + } + + [ApiVersion(1, 0)] + public static uint NumCaptures => Api->GetNumCaptures(); + + [ApiVersion(1, 0)] + public static bool GetCapture(uint idx, String8Out filename, out uint pathlength, out ulong timestamp) + { + fixed (byte* filename_fixed = filename) + fixed (uint* pathlength_fixed = &pathlength) + fixed (ulong* timestamp_fixed = ×tamp) + return Api->GetCapture(idx, filename_fixed, pathlength_fixed, timestamp_fixed); + } + + [ApiVersion(1, 0)] + public static void TriggerCapture() => Api->TriggerCapture(); + + [ApiVersion(1, 0)] + public static bool IsTargetControlConnected => Api->IsTargetControlConnected(); + + [ApiVersion(1, 0)] + public static bool LaunchReplayUI(bool connectTargetControl, String8In cmdline) + { + fixed (byte* cmdline_fixed = cmdline) + return Api->LaunchReplayUI(connectTargetControl, cmdline_fixed); + } + + [ApiVersion(1, 0)] + public static void SetActiveWindow(DevicePointer device, WindowHandle wndHandle) => + Api->SetActiveWindow(device, wndHandle); + + [ApiVersion(1, 0)] + public static void StartFrameCapture(DevicePointer device, WindowHandle wndHandle) => + Api->StartFrameCapture(device, wndHandle); + + [ApiVersion(1, 0)] + public static bool IsFrameCapturing => Api->IsFrameCapturing(); + + [ApiVersion(1, 0)] + public static uint EndFrameCapture(DevicePointer device, WindowHandle wndHandle) => + Api->EndFrameCapture(device, wndHandle); + + [ApiVersion(1, 1)] + public static void TriggerMultiFrameCapture(uint numFrames) + { + EnsureApiVersion(1, 1); + Api->TriggerMultiFrameCapture(numFrames); + } + + [ApiVersion(1, 2)] + public static void SetCaptureFileComments(String8In filePath, String8In comments) + { + EnsureApiVersion(1, 2); + fixed (byte* filePath_fixed = filePath) + fixed (byte* comments_fixed = comments) + Api->SetCaptureFileComments(filePath_fixed, comments_fixed); + } + + [ApiVersion(1, 4)] + public static uint DiscardFrameCapture(DevicePointer device, WindowHandle wndHandle) + { + EnsureApiVersion(1, 4); + return Api->DiscardFrameCapture(device, wndHandle); + } + + [ApiVersion(1, 5)] + public static bool ShowReplayUI() + { + EnsureApiVersion(1, 5); + return Api->ShowReplayUI(); + } + + [ApiVersion(1, 6)] + public static void SetCaptureTitle(String8In title) + { + EnsureApiVersion(1, 6); + fixed (byte* title_fixed = title) + Api->SetCaptureTitle(title_fixed); + } +} diff --git a/Brutal.RenderDoc/Generated/Structs/RenderDocApi.gen.cs b/Brutal.RenderDoc/Generated/Structs/RenderDocApi.gen.cs new file mode 100644 index 0000000..9971ce7 --- /dev/null +++ b/Brutal.RenderDoc/Generated/Structs/RenderDocApi.gen.cs @@ -0,0 +1,140 @@ +namespace Brutal.RenderDocApi; + +/// API version changelog: +/// 1.0.0 - initial release +/// 1.0.1 - Bugfix: IsFrameCapturing() was returning false for captures that were triggered +/// by keypress or TriggerCapture, instead of Start/EndFrameCapture. +/// 1.0.2 - Refactor: Renamed eRENDERDOC_Option_DebugDeviceMode to eRENDERDOC_Option_APIValidation +/// 1.1.0 - Add feature: TriggerMultiFrameCapture(). Backwards compatible with 1.0.x since the new +/// function pointer is added to the end of the struct, the original layout is identical +/// 1.1.1 - Refactor: Renamed remote access to target control (to better disambiguate from remote +/// replay/remote server concept in replay UI) +/// 1.1.2 - Refactor: Renamed "log file" in function names to just capture, to clarify that these +/// are captures and not debug logging files. This is the first API version in the v1.0 +/// branch. +/// 1.2.0 - Added feature: SetCaptureFileComments() to add comments to a capture file that will be +/// displayed in the UI program on load. +/// 1.3.0 - Added feature: New capture option eRENDERDOC_Option_AllowUnsupportedVendorExtensions +/// which allows users to opt-in to allowing unsupported vendor extensions to function. +/// Should be used at the user's own risk. +/// Refactor: Renamed eRENDERDOC_Option_VerifyMapWrites to +/// eRENDERDOC_Option_VerifyBufferAccess, which now also controls initialisation to +/// 0xdddddddd of uninitialised buffer contents. +/// 1.4.0 - Added feature: DiscardFrameCapture() to discard a frame capture in progress and stop +/// capturing without saving anything to disk. +/// 1.4.1 - Refactor: Renamed Shutdown to RemoveHooks to better clarify what is happening +/// 1.4.2 - Refactor: Renamed 'draws' to 'actions' in callstack capture option. +/// 1.5.0 - Added feature: ShowReplayUI() to request that the replay UI show itself if connected +/// 1.6.0 - Added feature: SetCaptureTitle() which can be used to set a title for a +/// capture made with StartFrameCapture() or EndFrameCapture() +[StructLayout(LayoutKind.Explicit, Size = 216)] +public unsafe partial struct RenderDocApi() +{ + /// + [FieldOffset(0)] + public delegate* unmanaged[Cdecl] GetAPIVersion; + + /// + [FieldOffset(8)] + public delegate* unmanaged[Cdecl] SetCaptureOptionU32; + + /// + [FieldOffset(16)] + public delegate* unmanaged[Cdecl] SetCaptureOptionF32; + + /// + [FieldOffset(24)] + public delegate* unmanaged[Cdecl] GetCaptureOptionU32; + + /// + [FieldOffset(32)] + public delegate* unmanaged[Cdecl] GetCaptureOptionF32; + + /// + [FieldOffset(40)] + public delegate* unmanaged[Cdecl] SetFocusToggleKeys; + + /// + [FieldOffset(48)] + public delegate* unmanaged[Cdecl] SetCaptureKeys; + + /// + [FieldOffset(56)] + public delegate* unmanaged[Cdecl] GetOverlayBits; + + /// + [FieldOffset(64)] + public delegate* unmanaged[Cdecl] MaskOverlayBits; + + /// + [FieldOffset(72)] + public delegate* unmanaged[Cdecl] RemoveHooks; + + /// + [FieldOffset(80)] + public delegate* unmanaged[Cdecl] UnloadCrashHandler; + + /// current name + [FieldOffset(88)] + public delegate* unmanaged[Cdecl] SetCaptureFilePathTemplate; + + /// current name + [FieldOffset(96)] + public delegate* unmanaged[Cdecl] GetCaptureFilePathTemplate; + + /// + [FieldOffset(104)] + public delegate* unmanaged[Cdecl] GetNumCaptures; + + /// + [FieldOffset(112)] + public delegate* unmanaged[Cdecl] GetCapture; + + /// + [FieldOffset(120)] + public delegate* unmanaged[Cdecl] TriggerCapture; + + /// current name + [FieldOffset(128)] + public delegate* unmanaged[Cdecl] IsTargetControlConnected; + + /// + [FieldOffset(136)] + public delegate* unmanaged[Cdecl] LaunchReplayUI; + + /// + [FieldOffset(144)] + public delegate* unmanaged[Cdecl] SetActiveWindow; + + /// + [FieldOffset(152)] + public delegate* unmanaged[Cdecl] StartFrameCapture; + + /// + [FieldOffset(160)] + public delegate* unmanaged[Cdecl] IsFrameCapturing; + + /// + [FieldOffset(168)] + public delegate* unmanaged[Cdecl] EndFrameCapture; + + /// new function in 1.1.0 + [FieldOffset(176)] + public delegate* unmanaged[Cdecl] TriggerMultiFrameCapture; + + /// new function in 1.2.0 + [FieldOffset(184)] + public delegate* unmanaged[Cdecl] SetCaptureFileComments; + + /// new function in 1.4.0 + [FieldOffset(192)] + public delegate* unmanaged[Cdecl] DiscardFrameCapture; + + /// new function in 1.5.0 + [FieldOffset(200)] + public delegate* unmanaged[Cdecl] ShowReplayUI; + + /// new function in 1.6.0 + [FieldOffset(208)] + public delegate* unmanaged[Cdecl] SetCaptureTitle; +} diff --git a/Brutal.RenderDoc/GlobalUsings.cs b/Brutal.RenderDoc/GlobalUsings.cs new file mode 100644 index 0000000..457875b --- /dev/null +++ b/Brutal.RenderDoc/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using System.Runtime.InteropServices; +global using Brutal.Numerics; +global using Brutal.Strings; diff --git a/Brutal.RenderDoc/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt b/Brutal.RenderDoc/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..7413fc4 --- /dev/null +++ b/Brutal.RenderDoc/LICENSES/BRUTAL-RENDERDOC-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,33 @@ +Brutal.RenderDoc provides bindings to the third-party component listed below, +reproduced with the licence that governs it. + +============================================================ +RenderDoc 1.42 -- MIT -- https://github.com/baldurk/renderdoc +============================================================ + +The MIT License (MIT) + +Copyright (c) 2015-2025 Baldur Karlsson + +Copyright (c) 2014 Crytek + +Copyright (c) 1998-2018 Third party code and tools +(https://github.com/baldurk/renderdoc/blob/v1.42/docs/credits_acknowledgements.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Brutal.RenderDoc/Manual/Logger.cs b/Brutal.RenderDoc/Manual/Logger.cs new file mode 100644 index 0000000..821f1ea --- /dev/null +++ b/Brutal.RenderDoc/Manual/Logger.cs @@ -0,0 +1,9 @@ +global using static Brutal.RenderDocApi.Logger; +using Brutal.Logging; + +namespace Brutal.RenderDocApi; + +public static class Logger +{ + public static LogCategory Log = LogCategory.Make("RenderDoc"); +} diff --git a/Brutal.RenderDoc/Manual/RenderDoc.manual.cs b/Brutal.RenderDoc/Manual/RenderDoc.manual.cs new file mode 100644 index 0000000..171fec9 --- /dev/null +++ b/Brutal.RenderDoc/Manual/RenderDoc.manual.cs @@ -0,0 +1,317 @@ +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Contracts; +using System.Runtime.CompilerServices; +using System.Text.RegularExpressions; + +namespace Brutal.RenderDocApi; + +/// RenderDoc's in-app API. +public static unsafe partial class RenderDoc +{ + #region controller (helpers around the actual native API) + + public enum ControllerState + { + NotLoaded, + LoadFail, + LoadSuccess, + } + + public static ControllerState State => + ApiLoaded + ? Api != null + ? ControllerState.LoadSuccess + : ControllerState.LoadFail + : ControllerState.NotLoaded; + + public struct InitOptions + { + internal bool LoadApi = true; + public ApiVersions MinimumRequired = ApiVersions.V1_0_0; + public string[] SearchPaths = DefaultSearchPaths; + + /// The RenderDoc overlay ("F12 to capture" etc) is visible by default. Disable it here. + public bool ShowOverlay = true; + + public InitOptions() { } + + /// This will install the RenderDoc hooks only if `--RenderDoc` is found in command-line arguments. + public InitOptions(string[] commandLineArgs) + { + LoadApi = commandLineArgs.Contains("--RenderDoc", StringComparer.OrdinalIgnoreCase); + } + } + + /// + public static bool Initialize() => Initialize(new InitOptions()); + + /// + public static bool Initialize(InitOptions options) + { + if (!options.LoadApi) + return false; + + if (!LoadApi(options.MinimumRequired, options.SearchPaths)) + return false; + + if (!options.ShowOverlay) + OverlayBits &= ~OverlayBits.Enabled; + return true; + } + + #endregion + + #region loading + + /// True if we tried to load the API, even if loading was unsuccessful. + public static bool ApiLoaded { get; private set; } + + private static RenderDocApi* Api; + + /// True if the API was loaded successfully through . + public static bool IsAvailable => Api != null; + + static readonly string[] DefaultSearchPaths = + [ + //"renderdoc.dll", // TODO: copying the dll to the app's working directory does load it, but the connection to the actual replay UI doesn't work... + @"C:\Program Files\RenderDoc\renderdoc.dll", + ]; + + /// + /// Try to load the API (= load the in-app API from a native DLL), if it hasn't been loaded already, + /// and install the RenderDoc hooks. + /// Note that RenderDoc hooks might incur a performance hit, and interfere with the rendering stack + /// (Vulkan validation layers etc.), so be sure to only do it in Debug mode. + /// + /// Do this as early as possible in the app lifecycle so that RenderDoc can capture resource initialization etc. + /// Otherwise, loading on-demand later in the app lifecycle may appear to work (RenderDoc will attach), + /// but capturing may fail, at least not without recreating the Vulkan instance/device etc. + /// + /// Once loaded, there may be no going back, ie no detaching without restarting the app + /// (RemoveHooks is not guaranteed to work). + /// + /// Loading may fail if the DLL isn't found / RenderDoc not installed. + /// - If the process was started from RenderDoc already, it will be found in the loaded process modules. + /// - Otherwise, we will look in C:\Program Files\RenderDoc\renderdoc.dll. + /// - Alternatively, you can provide your own search paths. + /// + /// Minimum required RenderDoc API version. + /// Optional: override the file paths to load the library from. + /// + public static bool LoadApi( + ApiVersions minimumRequired = ApiVersions.V1_0_0, + params ReadOnlySpan customSearchPaths + ) + { + if (ApiLoaded) + return IsAvailable; + + lock (typeof(RenderDoc)) + { + // Prevent double loads. + if (ApiLoaded) + return IsAvailable; + + ApiLoaded = true; + var searchPaths = !customSearchPaths.IsEmpty ? customSearchPaths : DefaultSearchPaths; + if (!TryLoadApi(searchPaths, minimumRequired, out Api)) + { + Version = UnknownVersion; + Log.Debug("RenderDoc: couldn't load API"); + return false; + } + + GetApiVersion(out var major, out var minor, out var patch); + Version = new(major, minor, patch); + Log.Debug($"RenderDoc: API loaded successfully, version: {Version}"); + return true; + } + } + + [Pure] + static bool TryLoadApi( + ReadOnlySpan searchPaths, + ApiVersions minimumRequired, + [NotNullWhen(true)] out RenderDocApi* api + ) + { + var re = new Regex( + @"(lib)?renderdoc(\.dll|\.so|\.dylib)(\.\d+)?", + RegexOptions.CultureInvariant | RegexOptions.IgnoreCase + ); + + foreach (ProcessModule module in Process.GetCurrentProcess().Modules) + { + var path = module.FileName; + if (path.Contains("Brutal")) + continue; + if (!re.IsMatch(path)) + continue; + if (TryLoadApi(path, minimumRequired, out api)) + return true; + } + + foreach (var path in searchPaths) + { + if (TryLoadApi(path, minimumRequired, out api)) + return true; + } + + api = null; + return false; + } + + [Pure] + static bool TryLoadApi(string libPath, ApiVersions minimumRequired, [NotNullWhen(true)] out RenderDocApi* api) + { + api = null; + + if (!NativeLibrary.TryLoad(libPath, out var libHandle)) + return false; + + if (!NativeLibrary.TryGetExport(libHandle, "RENDERDOC_GetAPI", out var getApiPtr)) + return false; + + Log.Trace($"RenderDoc: API found in {libPath}"); + + var getApi = (delegate* unmanaged[Cdecl])getApiPtr; + fixed (RenderDocApi** api_fixed = &api) + { + if (getApi(minimumRequired, api_fixed) == 0) + { + Log.Error($"RenderDoc: failed to load API from {libPath}"); + return false; + } + } + + Debug.Assert(api != null); + return true; + } + + #endregion + + #region API version stuff + + static readonly ApiVersion UnknownVersion = new(-1, -1, -1); + + /// Get the RenderDoc version, if loaded successfully, -1 otherwise. + public static ApiVersion Version { get; private set; } = UnknownVersion; + + /// Whether to check API version on each call. + public static bool VersionCheckEnabled = true; + + /// Ensure the given API is available in the loaded version. + static void EnsureApiVersion(int major, int minor, int patch = 0, [CallerMemberName] string apiName = "") + { + if (!VersionCheckEnabled) + return; + + var apiVersion = new ApiVersion(major, minor, patch); + if (Version < apiVersion) + throw new NotSupportedException( + $"API <{apiName}> requires RenderDoc version {apiVersion}, current version is {Version}." + ); + } + + #endregion + + public static partial void RemoveHooks() + { + if (ApiLoaded && Api != null) + Api->RemoveHooks(); + ApiLoaded = false; + Api = null; + Version = UnknownVersion; + } + + public static bool TryGetCapture(int index, [NotNullWhen(true)] out String8? path, out DateTime time) + { + ulong timestamp; + if (!GetCapture((uint)index, null, out var pathlength, out timestamp)) + { + path = null; + time = default; + return false; + } + + Span pathSpan = stackalloc byte[(int)pathlength - 1]; // -1 because pathlength includes the null-terminator + if (!GetCapture((uint)index, pathSpan, out _, out _)) + { + path = null; + time = default; + return false; + } + + path = new String8(pathSpan); + time = DateTimeOffset.FromUnixTimeSeconds((long)timestamp).DateTime; + return true; + } + + public static bool GetCaptureOptionBool(CaptureOption opt) => Api->GetCaptureOptionU32(opt) != 0; + + public static void SetCaptureOption(CaptureOption opt, bool value) => + Api->SetCaptureOptionU32(opt, value ? 1u : 0u); +} + +/// +public readonly record struct ApiVersion(int Major, int Minor, int Patch) + : IComparable, + IUtf8SpanFormattable, + ISpanFormattable +{ + /// Version number, packed in the same format as RenderDoc. + readonly int _packed = Major * 10000 + Minor * 100 + Patch; + + #region IComparable + operators + + public int CompareTo(ApiVersion other) => _packed.CompareTo(other._packed); + + public static bool operator <(ApiVersion left, ApiVersion right) => left._packed < right._packed; + + public static bool operator >(ApiVersion left, ApiVersion right) => left._packed > right._packed; + + public static bool operator <=(ApiVersion left, ApiVersion right) => left._packed <= right._packed; + + public static bool operator >=(ApiVersion left, ApiVersion right) => left._packed >= right._packed; + + #endregion + + #region IUtf8SpanFormattable, ISpanFormattable, IFormattable + + /// IUtf8SpanFormattable implementation + public bool TryFormat( + Span utf8Destination, + out int bytesWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + { + return Utf8.TryWrite(utf8Destination, $"{Major}.{Minor}.{Patch}", out bytesWritten); + } + + /// ISpanFormattable implementation + public bool TryFormat( + Span utf16Destination, + out int charsWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + { + return utf16Destination.TryWrite($"{Major}.{Minor}.{Patch}", out charsWritten); + } + + /// IFormattable implementation - useless but required for ISpanFormattable + string IFormattable.ToString(string? format, IFormatProvider? formatProvider) => ToString(); + + public override string ToString() => $"{Major}.{Minor}.{Patch}"; + + #endregion +} + +/// Specify which RenderDoc version this API is available from, for documentation / tooling. +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)] +public sealed class ApiVersionAttribute(int major, int minor, int patch = 0) : Attribute +{ + public readonly ApiVersion MinVersion = new(major, minor, patch); +} diff --git a/Brutal.RenderDoc/Manual/Typedefs.manual.cs b/Brutal.RenderDoc/Manual/Typedefs.manual.cs new file mode 100644 index 0000000..8052db8 --- /dev/null +++ b/Brutal.RenderDoc/Manual/Typedefs.manual.cs @@ -0,0 +1,5 @@ +global using DevicePointer = nint; +global using String8In = System.ReadOnlySpan; +global using String8Out = System.Span; +global using String8Return = System.ReadOnlySpan; +global using WindowHandle = nint; diff --git a/Brutal.Sdl.Image/Generated/Enums/ImgAnimationDecoderStatus.gen.cs b/Brutal.Sdl.Image/Generated/Enums/ImgAnimationDecoderStatus.gen.cs new file mode 100644 index 0000000..cdac3c1 --- /dev/null +++ b/Brutal.Sdl.Image/Generated/Enums/ImgAnimationDecoderStatus.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image +{ + public enum ImgAnimationDecoderStatus + { + Invalid = -1, + Ok = 0, + Failed = 1, + Complete = 2, + } +} diff --git a/Brutal.Sdl.Image/Generated/Libraries/SdlImage.Ergonomic.gen.cs b/Brutal.Sdl.Image/Generated/Libraries/SdlImage.Ergonomic.gen.cs new file mode 100644 index 0000000..8fdda48 --- /dev/null +++ b/Brutal.Sdl.Image/Generated/Libraries/SdlImage.Ergonomic.gen.cs @@ -0,0 +1,2691 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image +{ + public static unsafe partial class SdlImage + { + /// + /// This function gets the version of the dynamically linked SDL_image library. + /// + /// SDL_image version. + /// + /// This function is available since SDL_image 3.0.0. + /// + public static int Version() => PInvoke.Version(); + + /// + /// Ergonomic wrapper over IMG_Load. Throws instead of returning a null pointer on failure. + /// + /// a path on the filesystem to load an image from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* Load(string file) + { + SdlSurface* result = PInvoke.Load(file); + if (result == null) + { + throw SdlException.FromError("IMG_Load failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_Load_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadIO(nint src, bool closeio) + { + SdlSurface* result = PInvoke.LoadIO(src, closeio ? (byte)1 : (byte)0); + if (result == null) + { + throw SdlException.FromError("IMG_Load_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadTyped_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// a filename extension that represent this data ("BMP", "GIF", + /// "PNG", etc). + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadTypedIO(nint src, bool closeio, string type) + { + SdlSurface* result = PInvoke.LoadTypedIO(src, closeio ? (byte)1 : (byte)0, type); + if (result == null) + { + throw SdlException.FromError("IMG_LoadTyped_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadTexture. Throws instead of returning a null handle on failure. + /// + /// the SDL_Renderer to use to create the texture. + /// a path on the filesystem to load an image from. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlTexture LoadTexture(SdlRenderer renderer, string file) + { + SdlTexture result = PInvoke.LoadTexture(renderer, file); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_LoadTexture failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadTexture_IO. Throws instead of returning a null handle on failure. + /// + /// the SDL_Renderer to use to create the texture. + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlTexture LoadTextureIO(SdlRenderer renderer, nint src, bool closeio) + { + SdlTexture result = PInvoke.LoadTextureIO(renderer, src, closeio ? (byte)1 : (byte)0); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_LoadTexture_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadTextureTyped_IO. Throws instead of returning a null handle on + /// failure. + /// + /// the SDL_Renderer to use to create the texture. + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// a filename extension that represent this data ("BMP", "GIF", + /// "PNG", etc). + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlTexture LoadTextureTypedIO(SdlRenderer renderer, nint src, bool closeio, string type) + { + SdlTexture result = PInvoke.LoadTextureTypedIO(renderer, src, closeio ? (byte)1 : (byte)0, type); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_LoadTextureTyped_IO failed"); + } + return result; + } + + /// + /// Load an image from a filesystem path into a GPU texture. + /// + /// the SDL_GPUDevice to use to create the GPU texture. + /// + /// the SDL_GPUCopyPass to use to upload the loaded image to + /// the GPU texture. + /// + /// a path on the filesystem to load an image from. + /// + /// a pointer filled in with the width of the GPU texture. may be + /// NULL. + /// + /// + /// a pointer filled in with the width of the GPU texture. may be + /// NULL. + /// + /// a new GPU texture, or NULL on error. + /// + /// + /// An SDL_GPUTexture represents an image in GPU memory, usable by SDL's GPU + /// API. Regardless of the source format of the image, this function will + /// create a GPU texture with the format SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM + /// with no mip levels. It can be bound as a sampled texture from a graphics or + /// compute pipeline and as a a readonly storage texture in a compute pipeline. + /// + /// + /// There is a separate function to read files from an SDL_IOStream, if you + /// need an i/o abstraction to provide data from anywhere instead of a simple + /// filesystem read; that function is IMG_LoadGPUTexture_IO(). + /// + /// + /// When done with the returned texture, the app should dispose of it with a + /// call to SDL_ReleaseGPUTexture(). + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + public static nint LoadGPUTexture( + SdlGpuDevice device, + nint copy_pass, + string file, + out int width, + out int height + ) + { + width = default; + height = default; + fixed (int* widthPtr = &width) + { + fixed (int* heightPtr = &height) + { + return PInvoke.LoadGPUTexture(device, copy_pass, file, widthPtr, heightPtr); + } + } + } + + /// + /// Load an image from an SDL data source into a GPU texture. + /// + /// the SDL_GPUDevice to use to create the GPU texture. + /// + /// the SDL_GPUCopyPass to use to upload the loaded image to + /// the GPU texture. + /// + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// a pointer filled in with the width of the GPU texture. may be + /// NULL. + /// + /// + /// a pointer filled in with the width of the GPU texture. may be + /// NULL. + /// + /// a new GPU texture, or NULL on error. + /// + /// + /// An SDL_GPUTexture represents an image in GPU memory, usable by SDL's GPU + /// API. Regardless of the source format of the image, this function will + /// create a GPU texture with the format SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM + /// with no mip levels. It can be bound as a sampled texture from a graphics or + /// compute pipeline and as a a readonly storage texture in a compute pipeline. + /// + /// + /// If closeio is true, src will be closed before returning, whether this + /// function succeeds or not. SDL_image reads everything it needs from src + /// during this call in any case. + /// + /// + /// There is a separate function to read files from disk without having to deal + /// with SDL_IOStream: `IMG_LoadGPUTexture(device, copy_pass, "filename.jpg", + /// width, height) will call this function and manage those details for you, + /// determining the file type from the filename's extension. + /// + /// + /// There is also IMG_LoadGPUTextureTyped_IO(), which is equivalent to this + /// function except a file extension (like "BMP", "JPG", etc) can be specified, + /// in case SDL_image cannot autodetect the file format. + /// + /// + /// When done with the returned texture, the app should dispose of it with a + /// call to SDL_ReleaseGPUTexture(). + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + public static nint LoadGPUTextureIO( + SdlGpuDevice device, + nint copy_pass, + nint src, + bool closeio, + out int width, + out int height + ) + { + width = default; + height = default; + fixed (int* widthPtr = &width) + { + fixed (int* heightPtr = &height) + { + return PInvoke.LoadGPUTextureIO( + device, + copy_pass, + src, + closeio ? (byte)1 : (byte)0, + widthPtr, + heightPtr + ); + } + } + } + + /// + /// Load an image from an SDL data source into a GPU texture. + /// + /// the SDL_GPUDevice to use to create the GPU texture. + /// + /// the SDL_GPUCopyPass to use to upload the loaded image to + /// the GPU texture. + /// + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// a filename extension that represent this data ("BMP", "GIF", + /// "PNG", etc). + /// + /// + /// a pointer filled in with the width of the GPU texture. may be + /// NULL. + /// + /// + /// a pointer filled in with the width of the GPU texture. may be + /// NULL. + /// + /// a new GPU texture, or NULL on error. + /// + /// + /// An SDL_GPUTexture represents an image in GPU memory, usable by SDL's GPU + /// API. Regardless of the source format of the image, this function will + /// create a GPU texture with the format SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM + /// with no mip levels. It can be bound as a sampled texture from a graphics or + /// compute pipeline and as a a readonly storage texture in a compute pipeline. + /// + /// + /// If closeio is true, src will be closed before returning, whether this + /// function succeeds or not. SDL_image reads everything it needs from src + /// during this call in any case. + /// + /// + /// Even though this function accepts a file type, SDL_image may still try + /// other decoders that are capable of detecting file type from the contents of + /// the image data, but may rely on the caller-provided type string for formats + /// that it cannot autodetect. If type is NULL, SDL_image will rely solely on + /// its ability to guess the format. + /// + /// + /// There is a separate function to read files from disk without having to deal + /// with SDL_IOStream: `IMG_LoadGPUTexture(device, copy_pass, "filename.jpg", + /// width, height) will call this function and manage those details for you, + /// determining the file type from the filename's extension. + /// + /// + /// There is also IMG_LoadGPUTexture_IO(), which is equivalent to this function + /// except that it will rely on SDL_image to determine what type of data it is + /// loading, much like passing a NULL for type. + /// + /// + /// When done with the returned texture, the app should dispose of it with a + /// call to SDL_ReleaseGPUTexture(). + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + public static nint LoadGPUTextureTypedIO( + SdlGpuDevice device, + nint copy_pass, + nint src, + bool closeio, + string type, + out int width, + out int height + ) + { + width = default; + height = default; + fixed (int* widthPtr = &width) + { + fixed (int* heightPtr = &height) + { + return PInvoke.LoadGPUTextureTypedIO( + device, + copy_pass, + src, + closeio ? (byte)1 : (byte)0, + type, + widthPtr, + heightPtr + ); + } + } + } + + /// + /// Ergonomic wrapper over IMG_GetClipboardImage. Throws instead of returning a null pointer on + /// failure. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* GetClipboardImage() + { + SdlSurface* result = PInvoke.GetClipboardImage(); + if (result == null) + { + throw SdlException.FromError("IMG_GetClipboardImage failed"); + } + return result; + } + + /// + /// Detect ANI animated cursor data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is ANI animated cursor data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsANI(nint src) => PInvoke.IsANI(src) != 0; + + /// + /// Detect AVIF image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is AVIF data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsAVIF(nint src) => PInvoke.IsAVIF(src) != 0; + + /// + /// Detect CUR image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is CUR data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsCUR(nint src) => PInvoke.IsCUR(src) != 0; + + /// + /// Detect BMP image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is BMP data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsBMP(nint src) => PInvoke.IsBMP(src) != 0; + + /// + /// Detect GIF image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is GIF data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsGIF(nint src) => PInvoke.IsGIF(src) != 0; + + /// + /// Detect ICO image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is ICO data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsICO(nint src) => PInvoke.IsICO(src) != 0; + + /// + /// Detect JPG image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is JPG data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsJPG(nint src) => PInvoke.IsJPG(src) != 0; + + /// + /// Detect JXL image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is JXL data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsJXL(nint src) => PInvoke.IsJXL(src) != 0; + + /// + /// Detect LBM image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is LBM data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsLBM(nint src) => PInvoke.IsLBM(src) != 0; + + /// + /// Detect PCX image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is PCX data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsPCX(nint src) => PInvoke.IsPCX(src) != 0; + + /// + /// Detect PNG image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is PNG data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsPNG(nint src) => PInvoke.IsPNG(src) != 0; + + /// + /// Detect PNM image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is PNM data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsPNM(nint src) => PInvoke.IsPNM(src) != 0; + + /// + /// Detect QOI image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is QOI data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsQOI(nint src) => PInvoke.IsQOI(src) != 0; + + /// + /// Detect SVG image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is SVG data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsSVG(nint src) => PInvoke.IsSVG(src) != 0; + + /// + /// Detect TIFF image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is TIFF data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsTIF(nint src) => PInvoke.IsTIF(src) != 0; + + /// + /// Detect WEBP image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is WEBP data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsWEBP(nint src) => PInvoke.IsWEBP(src) != 0; + + /// + /// Detect XCF image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is XCF data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsXCF(nint src) => PInvoke.IsXCF(src) != 0; + + /// + /// Detect XPM image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is XPM data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsXPM(nint src) => PInvoke.IsXPM(src) != 0; + + /// + /// Detect XV image data on a readable/seekable SDL_IOStream. + /// + /// a seekable/readable SDL_IOStream to provide image data. + /// true if this is XV data, false otherwise. + /// + /// + /// This function attempts to determine if a file is a given filetype, reading + /// the least amount possible from the SDL_IOStream (usually a few bytes). + /// + /// + /// There is no distinction made between "not the filetype in question" and + /// basic i/o errors. + /// + /// + /// This function will always attempt to seek src back to where it started + /// when this function was called, but it will not report any errors in doing + /// so, but assuming seeking works, this means you can immediately use this + /// with a different IMG_isTYPE function, or load the image without further + /// seeking. + /// + /// + /// You do not need to call this function to load data; SDL_image can work to + /// determine file type in many cases in its standard load functions. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool IsXV(nint src) => PInvoke.IsXV(src) != 0; + + /// + /// Ergonomic wrapper over IMG_LoadAVIF_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadAVIFIO(nint src) + { + SdlSurface* result = PInvoke.LoadAVIFIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadAVIF_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadBMP_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadBMPIO(nint src) + { + SdlSurface* result = PInvoke.LoadBMPIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadBMP_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadCUR_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadCURIO(nint src) + { + SdlSurface* result = PInvoke.LoadCURIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadCUR_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadGIF_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadGIFIO(nint src) + { + SdlSurface* result = PInvoke.LoadGIFIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadGIF_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadICO_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadICOIO(nint src) + { + SdlSurface* result = PInvoke.LoadICOIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadICO_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadJPG_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadJPGIO(nint src) + { + SdlSurface* result = PInvoke.LoadJPGIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadJPG_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadJXL_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadJXLIO(nint src) + { + SdlSurface* result = PInvoke.LoadJXLIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadJXL_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadLBM_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadLBMIO(nint src) + { + SdlSurface* result = PInvoke.LoadLBMIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadLBM_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadPCX_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadPCXIO(nint src) + { + SdlSurface* result = PInvoke.LoadPCXIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadPCX_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadPNG_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadPNGIO(nint src) + { + SdlSurface* result = PInvoke.LoadPNGIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadPNG_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadPNM_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadPNMIO(nint src) + { + SdlSurface* result = PInvoke.LoadPNMIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadPNM_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadSVG_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadSVGIO(nint src) + { + SdlSurface* result = PInvoke.LoadSVGIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadSVG_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadSizedSVG_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load SVG data from. + /// desired width of the generated surface, in pixels. + /// desired height of the generated surface, in pixels. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadSizedSVGIO(nint src, int width, int height) + { + SdlSurface* result = PInvoke.LoadSizedSVGIO(src, width, height); + if (result == null) + { + throw SdlException.FromError("IMG_LoadSizedSVG_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadQOI_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadQOIIO(nint src) + { + SdlSurface* result = PInvoke.LoadQOIIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadQOI_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadTGA_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadTGAIO(nint src) + { + SdlSurface* result = PInvoke.LoadTGAIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadTGA_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadTIF_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadTIFIO(nint src) + { + SdlSurface* result = PInvoke.LoadTIFIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadTIF_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadWEBP_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadWEBPIO(nint src) + { + SdlSurface* result = PInvoke.LoadWEBPIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadWEBP_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadXCF_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadXCFIO(nint src) + { + SdlSurface* result = PInvoke.LoadXCFIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadXCF_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadXPM_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadXPMIO(nint src) + { + SdlSurface* result = PInvoke.LoadXPMIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadXPM_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadXV_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream to load image data from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* LoadXVIO(nint src) + { + SdlSurface* result = PInvoke.LoadXVIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadXV_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_Save. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void Save(SdlSurface* surface, string file) + { + if (PInvoke.Save(surface, file) == 0) + { + throw SdlException.FromError("IMG_Save failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveTyped_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// a filename extension that represent this data ("BMP", "GIF", + /// "PNG", etc). + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveTypedIO(SdlSurface* surface, nint dst, bool closeio, string type) + { + if (PInvoke.SaveTypedIO(surface, dst, closeio ? (byte)1 : (byte)0, type) == 0) + { + throw SdlException.FromError("IMG_SaveTyped_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveAVIF. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// + /// the desired quality, ranging between 0 (lowest) and 100 + /// (highest). + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveAVIF(SdlSurface* surface, string file, int quality) + { + if (PInvoke.SaveAVIF(surface, file, quality) == 0) + { + throw SdlException.FromError("IMG_SaveAVIF failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveAVIF_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// the desired quality, ranging between 0 (lowest) and 100 + /// (highest). + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveAVIFIO(SdlSurface* surface, nint dst, bool closeio, int quality) + { + if (PInvoke.SaveAVIFIO(surface, dst, closeio ? (byte)1 : (byte)0, quality) == 0) + { + throw SdlException.FromError("IMG_SaveAVIF_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveBMP. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveBMP(SdlSurface* surface, string file) + { + if (PInvoke.SaveBMP(surface, file) == 0) + { + throw SdlException.FromError("IMG_SaveBMP failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveBMP_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveBMPIO(SdlSurface* surface, nint dst, bool closeio) + { + if (PInvoke.SaveBMPIO(surface, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveBMP_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveCUR. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveCUR(SdlSurface* surface, string file) + { + if (PInvoke.SaveCUR(surface, file) == 0) + { + throw SdlException.FromError("IMG_SaveCUR failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveCUR_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveCURIO(SdlSurface* surface, nint dst, bool closeio) + { + if (PInvoke.SaveCURIO(surface, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveCUR_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveGIF. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveGIF(SdlSurface* surface, string file) + { + if (PInvoke.SaveGIF(surface, file) == 0) + { + throw SdlException.FromError("IMG_SaveGIF failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveGIF_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveGIFIO(SdlSurface* surface, nint dst, bool closeio) + { + if (PInvoke.SaveGIFIO(surface, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveGIF_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveICO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveICO(SdlSurface* surface, string file) + { + if (PInvoke.SaveICO(surface, file) == 0) + { + throw SdlException.FromError("IMG_SaveICO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveICO_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveICOIO(SdlSurface* surface, nint dst, bool closeio) + { + if (PInvoke.SaveICOIO(surface, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveICO_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveJPG. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// + /// [0; 33] is Lowest quality, [34; 66] is Middle quality, [67; + /// 100] is Highest quality. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveJPG(SdlSurface* surface, string file, int quality) + { + if (PInvoke.SaveJPG(surface, file, quality) == 0) + { + throw SdlException.FromError("IMG_SaveJPG failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveJPG_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// [0; 33] is Lowest quality, [34; 66] is Middle quality, [67; + /// 100] is Highest quality. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveJPGIO(SdlSurface* surface, nint dst, bool closeio, int quality) + { + if (PInvoke.SaveJPGIO(surface, dst, closeio ? (byte)1 : (byte)0, quality) == 0) + { + throw SdlException.FromError("IMG_SaveJPG_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SavePNG. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SavePNG(SdlSurface* surface, string file) + { + if (PInvoke.SavePNG(surface, file) == 0) + { + throw SdlException.FromError("IMG_SavePNG failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SavePNG_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SavePNGIO(SdlSurface* surface, nint dst, bool closeio) + { + if (PInvoke.SavePNGIO(surface, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SavePNG_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveTGA. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write new file to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveTGA(SdlSurface* surface, string file) + { + if (PInvoke.SaveTGA(surface, file) == 0) + { + throw SdlException.FromError("IMG_SaveTGA failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveTGA_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveTGAIO(SdlSurface* surface, nint dst, bool closeio) + { + if (PInvoke.SaveTGAIO(surface, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveTGA_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveWEBP. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// path on the filesystem to write the new file to. + /// + /// between 0 and 100. For lossy, 0 gives the smallest size and + /// 100 the largest. For lossless, this parameter is the amount + /// of effort put into the compression: 0 is the fastest but + /// gives larger files compared to the slowest, but best, 100. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveWEBP(SdlSurface* surface, string file, float quality) + { + if (PInvoke.SaveWEBP(surface, file, quality) == 0) + { + throw SdlException.FromError("IMG_SaveWEBP failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveWEBP_IO. Throws instead of returning false on failure. + /// + /// the SDL surface to save. + /// the SDL_IOStream to save the image data to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// between 0 and 100. For lossy, 0 gives the smallest size and + /// 100 the largest. For lossless, this parameter is the amount + /// of effort put into the compression: 0 is the fastest but + /// gives larger files compared to the slowest, but best, 100. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveWEBPIO(SdlSurface* surface, nint dst, bool closeio, float quality) + { + if (PInvoke.SaveWEBPIO(surface, dst, closeio ? (byte)1 : (byte)0, quality) == 0) + { + throw SdlException.FromError("IMG_SaveWEBP_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_LoadAnimation. Throws instead of returning a null pointer on failure. + /// + /// path on the filesystem containing an animated image. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadAnimation(string file) + { + ImgAnimation* result = PInvoke.LoadAnimation(file); + if (result == null) + { + throw SdlException.FromError("IMG_LoadAnimation failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadAnimation_IO. Throws instead of returning a null pointer on failure. + /// + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadAnimationIO(nint src, bool closeio) + { + ImgAnimation* result = PInvoke.LoadAnimationIO(src, closeio ? (byte)1 : (byte)0); + if (result == null) + { + throw SdlException.FromError("IMG_LoadAnimation_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadAnimationTyped_IO. Throws instead of returning a null pointer on + /// failure. + /// + /// an SDL_IOStream that data will be read from. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// a filename extension that represent this data ("GIF", etc). + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadAnimationTypedIO(nint src, bool closeio, string type) + { + ImgAnimation* result = PInvoke.LoadAnimationTypedIO(src, closeio ? (byte)1 : (byte)0, type); + if (result == null) + { + throw SdlException.FromError("IMG_LoadAnimationTyped_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadANIAnimation_IO. Throws instead of returning a null pointer on + /// failure. + /// + /// an SDL_IOStream from which data will be read. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadANIAnimationIO(nint src) + { + ImgAnimation* result = PInvoke.LoadANIAnimationIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadANIAnimation_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadAPNGAnimation_IO. Throws instead of returning a null pointer on + /// failure. + /// + /// an SDL_IOStream from which data will be read. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadAPNGAnimationIO(nint src) + { + ImgAnimation* result = PInvoke.LoadAPNGAnimationIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadAPNGAnimation_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadAVIFAnimation_IO. Throws instead of returning a null pointer on + /// failure. + /// + /// an SDL_IOStream that data will be read from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadAVIFAnimationIO(nint src) + { + ImgAnimation* result = PInvoke.LoadAVIFAnimationIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadAVIFAnimation_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadGIFAnimation_IO. Throws instead of returning a null pointer on + /// failure. + /// + /// an SDL_IOStream that data will be read from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadGIFAnimationIO(nint src) + { + ImgAnimation* result = PInvoke.LoadGIFAnimationIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadGIFAnimation_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_LoadWEBPAnimation_IO. Throws instead of returning a null pointer on + /// failure. + /// + /// an SDL_IOStream that data will be read from. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimation* LoadWEBPAnimationIO(nint src) + { + ImgAnimation* result = PInvoke.LoadWEBPAnimationIO(src); + if (result == null) + { + throw SdlException.FromError("IMG_LoadWEBPAnimation_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_SaveAnimation. Throws instead of returning false on failure. + /// + /// the animation to save. + /// path on the filesystem containing an animated image. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveAnimation(ImgAnimation* anim, string file) + { + if (PInvoke.SaveAnimation(anim, file) == 0) + { + throw SdlException.FromError("IMG_SaveAnimation failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveAnimationTyped_IO. Throws instead of returning false on failure. + /// + /// the animation to save. + /// an SDL_IOStream that data will be written to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// a filename extension that represent this data ("GIF", etc). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveAnimationTypedIO(ImgAnimation* anim, nint dst, bool closeio, string type) + { + if (PInvoke.SaveAnimationTypedIO(anim, dst, closeio ? (byte)1 : (byte)0, type) == 0) + { + throw SdlException.FromError("IMG_SaveAnimationTyped_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveANIAnimation_IO. Throws instead of returning false on failure. + /// + /// the animation to save. + /// an SDL_IOStream from which data will be written to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveANIAnimationIO(ImgAnimation* anim, nint dst, bool closeio) + { + if (PInvoke.SaveANIAnimationIO(anim, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveANIAnimation_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveAPNGAnimation_IO. Throws instead of returning false on failure. + /// + /// the animation to save. + /// an SDL_IOStream from which data will be written to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveAPNGAnimationIO(ImgAnimation* anim, nint dst, bool closeio) + { + if (PInvoke.SaveAPNGAnimationIO(anim, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveAPNGAnimation_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveAVIFAnimation_IO. Throws instead of returning false on failure. + /// + /// the animation to save. + /// an SDL_IOStream from which data will be written to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// the desired quality, ranging between 0 (lowest) and 100 + /// (highest). + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveAVIFAnimationIO(ImgAnimation* anim, nint dst, bool closeio, int quality) + { + if (PInvoke.SaveAVIFAnimationIO(anim, dst, closeio ? (byte)1 : (byte)0, quality) == 0) + { + throw SdlException.FromError("IMG_SaveAVIFAnimation_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveGIFAnimation_IO. Throws instead of returning false on failure. + /// + /// the animation to save. + /// an SDL_IOStream from which data will be written to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveGIFAnimationIO(ImgAnimation* anim, nint dst, bool closeio) + { + if (PInvoke.SaveGIFAnimationIO(anim, dst, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("IMG_SaveGIFAnimation_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_SaveWEBPAnimation_IO. Throws instead of returning false on failure. + /// + /// the animation to save. + /// an SDL_IOStream from which data will be written to. + /// + /// true to close/free the SDL_IOStream before returning, false + /// to leave it open. + /// + /// + /// between 0 and 100. For lossy, 0 gives the smallest size and + /// 100 the largest. For lossless, this parameter is the amount + /// of effort put into the compression: 0 is the fastest but + /// gives larger files compared to the slowest, but best, 100. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SaveWEBPAnimationIO(ImgAnimation* anim, nint dst, bool closeio, int quality) + { + if (PInvoke.SaveWEBPAnimationIO(anim, dst, closeio ? (byte)1 : (byte)0, quality) == 0) + { + throw SdlException.FromError("IMG_SaveWEBPAnimation_IO failed"); + } + } + + /// + /// Ergonomic wrapper over IMG_CreateAnimatedCursor. Throws instead of returning a null handle on + /// failure. + /// + /// an animation to use to create an animated cursor. + /// the x position of the cursor hot spot. + /// the y position of the cursor hot spot. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlCursor CreateAnimatedCursor(ImgAnimation* anim, int hot_x, int hot_y) + { + SdlCursor result = PInvoke.CreateAnimatedCursor(anim, hot_x, hot_y); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimatedCursor failed"); + } + return result; + } + + /// + /// Dispose of an IMG_Animation and free its resources. + /// + /// IMG_Animation to dispose of. + /// + /// + /// The provided anim pointer is not valid once this call returns. + /// + /// + /// + /// This function is available since SDL_image 3.0.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static void FreeAnimation(ImgAnimation* anim) => PInvoke.FreeAnimation(anim); + + /// + /// Ergonomic wrapper over IMG_CreateAnimationEncoder. Throws instead of returning a null handle on + /// failure. + /// + /// the file where the animation will be saved. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimationEncoder CreateAnimationEncoder(string file) + { + ImgAnimationEncoder result = PInvoke.CreateAnimationEncoder(file); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimationEncoder failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_CreateAnimationEncoder_IO. Throws instead of returning a null handle on + /// failure. + /// + /// an SDL_IOStream that will be used to save the stream. + /// + /// true to close the SDL_IOStream when done, false to leave it + /// open. + /// + /// a filename extension that represent this data ("WEBP", etc). + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimationEncoder CreateAnimationEncoderIO(nint dst, bool closeio, string type) + { + ImgAnimationEncoder result = PInvoke.CreateAnimationEncoderIO(dst, closeio ? (byte)1 : (byte)0, type); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimationEncoder_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_CreateAnimationEncoderWithProperties. Throws instead of returning a null + /// handle on failure. + /// + /// the properties of the animation encoder. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimationEncoder CreateAnimationEncoderWithProperties(uint props) + { + ImgAnimationEncoder result = PInvoke.CreateAnimationEncoderWithProperties(props); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimationEncoderWithProperties failed"); + } + return result; + } + + /// + /// Add a frame to an animation encoder. + /// + /// the receiving images. + /// the surface to add as the next frame in the animation. + /// + /// the duration of the frame, usually in milliseconds but can + /// be other units if the + /// IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER + /// property is set when creating the encoder. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + /// + public static bool AddAnimationEncoderFrame(ImgAnimationEncoder encoder, SdlSurface* surface, ulong duration) => + PInvoke.AddAnimationEncoderFrame(encoder, surface, duration) != 0; + + /// + /// Close an animation encoder, finishing any encoding. + /// + /// the encoder to close. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Calling this function frees the animation encoder, and returns the final + /// status of the encoding process. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + public static bool CloseAnimationEncoder(ImgAnimationEncoder encoder) => + PInvoke.CloseAnimationEncoder(encoder) != 0; + + /// + /// Ergonomic wrapper over IMG_CreateAnimationDecoder. Throws instead of returning a null handle on + /// failure. + /// + /// the file containing a series of images. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimationDecoder CreateAnimationDecoder(string file) + { + ImgAnimationDecoder result = PInvoke.CreateAnimationDecoder(file); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimationDecoder failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_CreateAnimationDecoder_IO. Throws instead of returning a null handle on + /// failure. + /// + /// an SDL_IOStream containing a series of images. + /// + /// true to close the SDL_IOStream when done, false to leave it + /// open. + /// + /// a filename extension that represent this data ("WEBP", etc). + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimationDecoder CreateAnimationDecoderIO(nint src, bool closeio, string type) + { + ImgAnimationDecoder result = PInvoke.CreateAnimationDecoderIO(src, closeio ? (byte)1 : (byte)0, type); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimationDecoder_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over IMG_CreateAnimationDecoderWithProperties. Throws instead of returning a null + /// handle on failure. + /// + /// the properties of the animation decoder. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static ImgAnimationDecoder CreateAnimationDecoderWithProperties(uint props) + { + ImgAnimationDecoder result = PInvoke.CreateAnimationDecoderWithProperties(props); + if (result.IsNull()) + { + throw SdlException.FromError("IMG_CreateAnimationDecoderWithProperties failed"); + } + return result; + } + + /// + /// Get the properties of an animation decoder. + /// + /// the animation decoder. + /// + /// the properties ID of the animation decoder, or 0 if there are no + /// properties; call SDL_GetError() for more information. + /// + /// + /// + /// This function returns the properties of the animation decoder, which holds + /// information about the underlying image such as description, copyright text + /// and loop count. + /// + /// + /// IMG_PROP_METADATA_LOOP_COUNT_NUMBER, if present, specifies the number of times to play the + /// animation, with 0 meaning loop continuously. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + public static uint GetAnimationDecoderProperties(ImgAnimationDecoder decoder) => + PInvoke.GetAnimationDecoderProperties(decoder); + + /// + /// Get the next frame in an animation decoder. + /// + /// the animation decoder. + /// + /// a pointer filled in with the SDL_Surface for the next frame in + /// the animation. + /// + /// + /// the duration of the frame, usually in milliseconds but can + /// be other units if the + /// IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER + /// property is set when creating the decoder. + /// + /// + /// true on success or false on failure and when no more frames are + /// available; call IMG_GetAnimationDecoderStatus() or SDL_GetError() + /// for more information. + /// + /// + /// + /// This function decodes the next frame in the animation decoder, returning it + /// as an SDL_Surface. The returned surface should be freed with + /// SDL_FreeSurface() when no longer needed. + /// + /// + /// If the animation decoder has no more frames or an error occurred while + /// decoding the frame, this function returns false. In that case, please call + /// SDL_GetError() for more information. If SDL_GetError() returns an empty + /// string, that means there are no more available frames. If SDL_GetError() + /// returns a valid string, that means the decoding failed. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + /// + /// + /// + public static bool GetAnimationDecoderFrame(ImgAnimationDecoder decoder, SdlSurface** frame, out ulong duration) + { + duration = default; + fixed (ulong* durationPtr = &duration) + { + return PInvoke.GetAnimationDecoderFrame(decoder, frame, durationPtr) != 0; + } + } + + /// + /// Get the decoder status indicating the current state of the decoder. + /// + /// the decoder to get the status of. + /// + /// the status of the underlying decoder, or + /// IMG_DECODER_STATUS_INVALID if the given decoder is invalid. + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + public static ImgAnimationDecoderStatus GetAnimationDecoderStatus(ImgAnimationDecoder decoder) => + PInvoke.GetAnimationDecoderStatus(decoder); + + /// + /// Reset an animation decoder. + /// + /// the decoder to reset. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Calling this function resets the animation decoder, allowing it to start + /// from the beginning again. This is useful if you want to decode the frame + /// sequence again without creating a new decoder. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + /// + /// + public static bool ResetAnimationDecoder(ImgAnimationDecoder decoder) => + PInvoke.ResetAnimationDecoder(decoder) != 0; + + /// + /// Close an animation decoder, finishing any decoding. + /// + /// the decoder to close. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Calling this function frees the animation decoder, and returns the final + /// status of the decoding process. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + public static bool CloseAnimationDecoder(ImgAnimationDecoder decoder) => + PInvoke.CloseAnimationDecoder(decoder) != 0; + } +} diff --git a/Brutal.Sdl.Image/Generated/SdlImage.Constants.gen.cs b/Brutal.Sdl.Image/Generated/SdlImage.Constants.gen.cs new file mode 100644 index 0000000..ee5ae1e --- /dev/null +++ b/Brutal.Sdl.Image/Generated/SdlImage.Constants.gen.cs @@ -0,0 +1,60 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image +{ + public static unsafe partial class SdlImage + { + public static class Constants + { + public const string PropAnimationDecoderCreateAvifAllowIncrementalBoolean = + "SDL_image.animation_decoder.create.avif.allow_incremental"; + public const string PropAnimationDecoderCreateAvifAllowProgressiveBoolean = + "SDL_image.animation_decoder.create.avif.allow_progressive"; + public const string PropAnimationDecoderCreateAvifMaxThreadsNumber = + "SDL_image.animation_decoder.create.avif.max_threads"; + public const string PropAnimationDecoderCreateFilenameString = + "SDL_image.animation_decoder.create.filename"; + public const string PropAnimationDecoderCreateGifNumColorsNumber = + "SDL_image.animation_encoder.create.gif.num_colors"; + public const string PropAnimationDecoderCreateGifTransparentColorIndexNumber = + "SDL_image.animation_encoder.create.gif.transparent_color_index"; + public const string PropAnimationDecoderCreateIostreamAutocloseBoolean = + "SDL_image.animation_decoder.create.iostream.autoclose"; + public const string PropAnimationDecoderCreateIostreamPointer = + "SDL_image.animation_decoder.create.iostream"; + public const string PropAnimationDecoderCreateTimebaseDenominatorNumber = + "SDL_image.animation_decoder.create.timebase.denominator"; + public const string PropAnimationDecoderCreateTimebaseNumeratorNumber = + "SDL_image.animation_decoder.create.timebase.numerator"; + public const string PropAnimationDecoderCreateTypeString = "SDL_image.animation_decoder.create.type"; + public const string PropAnimationEncoderCreateAvifKeyframeIntervalNumber = + "SDL_image.animation_encoder.create.avif.keyframe_interval"; + public const string PropAnimationEncoderCreateAvifMaxThreadsNumber = + "SDL_image.animation_encoder.create.avif.max_threads"; + public const string PropAnimationEncoderCreateFilenameString = + "SDL_image.animation_encoder.create.filename"; + public const string PropAnimationEncoderCreateGifUseLutBoolean = + "SDL_image.animation_encoder.create.gif.use_lut"; + public const string PropAnimationEncoderCreateIostreamAutocloseBoolean = + "SDL_image.animation_encoder.create.iostream.autoclose"; + public const string PropAnimationEncoderCreateIostreamPointer = + "SDL_image.animation_encoder.create.iostream"; + public const string PropAnimationEncoderCreateQualityNumber = "SDL_image.animation_encoder.create.quality"; + public const string PropAnimationEncoderCreateTimebaseDenominatorNumber = + "SDL_image.animation_encoder.create.timebase.denominator"; + public const string PropAnimationEncoderCreateTimebaseNumeratorNumber = + "SDL_image.animation_encoder.create.timebase.numerator"; + public const string PropAnimationEncoderCreateTypeString = "SDL_image.animation_encoder.create.type"; + public const string PropMetadataAuthorString = "SDL_image.metadata.author"; + public const string PropMetadataCopyrightString = "SDL_image.metadata.copyright"; + public const string PropMetadataCreationTimeString = "SDL_image.metadata.creation_time"; + public const string PropMetadataDescriptionString = "SDL_image.metadata.description"; + public const string PropMetadataFrameCountNumber = "SDL_image.metadata.frame_count"; + public const string PropMetadataIgnorePropsBoolean = "SDL_image.metadata.ignore_props"; + public const string PropMetadataLoopCountNumber = "SDL_image.metadata.loop_count"; + public const string PropMetadataTitleString = "SDL_image.metadata.title"; + } + } +} diff --git a/Brutal.Sdl.Image/Generated/SdlImage.Delegates.gen.cs b/Brutal.Sdl.Image/Generated/SdlImage.Delegates.gen.cs new file mode 100644 index 0000000..9fc112c --- /dev/null +++ b/Brutal.Sdl.Image/Generated/SdlImage.Delegates.gen.cs @@ -0,0 +1,5 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image { } diff --git a/Brutal.Sdl.Image/Generated/SdlImage.HandleMethods.gen.cs b/Brutal.Sdl.Image/Generated/SdlImage.HandleMethods.gen.cs new file mode 100644 index 0000000..700381d --- /dev/null +++ b/Brutal.Sdl.Image/Generated/SdlImage.HandleMethods.gen.cs @@ -0,0 +1,211 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image +{ + public readonly unsafe partial struct ImgAnimationDecoder + { + /// + /// Close an animation decoder, finishing any decoding. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Calling this function frees the animation decoder, and returns the final + /// status of the decoding process. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + public bool Close() + { + if (IsNull()) + { + return default; + } + return SdlImage.CloseAnimationDecoder(this); + } + + /// + /// Get the next frame in an animation decoder. + /// + /// + /// a pointer filled in with the SDL_Surface for the next frame in + /// the animation. + /// + /// + /// the duration of the frame, usually in milliseconds but can + /// be other units if the + /// IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER + /// property is set when creating the decoder. + /// + /// + /// true on success or false on failure and when no more frames are + /// available; call IMG_GetAnimationDecoderStatus() or SDL_GetError() + /// for more information. + /// + /// + /// + /// This function decodes the next frame in the animation decoder, returning it + /// as an SDL_Surface. The returned surface should be freed with + /// SDL_FreeSurface() when no longer needed. + /// + /// + /// If the animation decoder has no more frames or an error occurred while + /// decoding the frame, this function returns false. In that case, please call + /// SDL_GetError() for more information. If SDL_GetError() returns an empty + /// string, that means there are no more available frames. If SDL_GetError() + /// returns a valid string, that means the decoding failed. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + /// + /// + /// + public bool GetFrame(SdlSurface** frame, out ulong duration) => + SdlImage.GetAnimationDecoderFrame(this, frame, out duration); + + /// + /// Get the properties of an animation decoder. + /// + /// + /// the properties ID of the animation decoder, or 0 if there are no + /// properties; call SDL_GetError() for more information. + /// + /// + /// + /// This function returns the properties of the animation decoder, which holds + /// information about the underlying image such as description, copyright text + /// and loop count. + /// + /// + /// IMG_PROP_METADATA_LOOP_COUNT_NUMBER, if present, specifies the number of times to play the + /// animation, with 0 meaning loop continuously. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + public uint GetProperties() => SdlImage.GetAnimationDecoderProperties(this); + + /// + /// Get the decoder status indicating the current state of the decoder. + /// + /// + /// the status of the underlying decoder, or + /// IMG_DECODER_STATUS_INVALID if the given decoder is invalid. + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + public ImgAnimationDecoderStatus GetStatus() => SdlImage.GetAnimationDecoderStatus(this); + + /// + /// Reset an animation decoder. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Calling this function resets the animation decoder, allowing it to start + /// from the beginning again. This is useful if you want to decode the frame + /// sequence again without creating a new decoder. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + /// + /// + public bool Reset() => SdlImage.ResetAnimationDecoder(this); + } + + public readonly unsafe partial struct ImgAnimationEncoder + { + /// + /// Add a frame to an animation encoder. + /// + /// the surface to add as the next frame in the animation. + /// + /// the duration of the frame, usually in milliseconds but can + /// be other units if the + /// IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER + /// property is set when creating the encoder. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + /// + public bool AddFrame(SdlSurface* surface, ulong duration) => + SdlImage.AddAnimationEncoderFrame(this, surface, duration); + + /// + /// Close an animation encoder, finishing any encoding. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Calling this function frees the animation encoder, and returns the final + /// status of the encoding process. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function is available since SDL_image 3.4.0. + /// + /// + /// + /// + public bool Close() + { + if (IsNull()) + { + return default; + } + return SdlImage.CloseAnimationEncoder(this); + } + } +} diff --git a/Brutal.Sdl.Image/Generated/SdlImage.Handles.gen.cs b/Brutal.Sdl.Image/Generated/SdlImage.Handles.gen.cs new file mode 100644 index 0000000..e02fee6 --- /dev/null +++ b/Brutal.Sdl.Image/Generated/SdlImage.Handles.gen.cs @@ -0,0 +1,44 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +using System; +using Brutal.Interop; + +namespace Brutal.SdlApi.Image; + +/// +/// A strongly-typed interop handle wrapping the opaque SDL IMG_AnimationDecoder pointer. +/// +[InteropHandle] +public readonly unsafe partial struct ImgAnimationDecoder : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlImage.PInvoke.CloseAnimationDecoder(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL IMG_AnimationEncoder pointer. +/// +[InteropHandle] +public readonly unsafe partial struct ImgAnimationEncoder : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlImage.PInvoke.CloseAnimationEncoder(this); + } +} diff --git a/Brutal.Sdl.Image/Generated/SdlImage.PInvoke.gen.cs b/Brutal.Sdl.Image/Generated/SdlImage.PInvoke.gen.cs new file mode 100644 index 0000000..39dff99 --- /dev/null +++ b/Brutal.Sdl.Image/Generated/SdlImage.PInvoke.gen.cs @@ -0,0 +1,1214 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image +{ + public static unsafe partial class SdlImage + { + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "IMG_Version")] + private static partial int _Version(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Version() + { + SdlImage.TraceLog.Trace(); + return _Version(); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_Load", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _Load(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* Load(string file) + { + SdlImage.TraceLog.Trace(); + return _Load(file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_Load_IO")] + private static partial SdlSurface* _LoadIO(nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadIO(nint src, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _LoadIO(src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadTyped_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _LoadTypedIO(nint src, byte closeio, string type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadTypedIO(nint src, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _LoadTypedIO(src, closeio, type); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadTexture", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlTexture _LoadTexture(SdlRenderer renderer, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture LoadTexture(SdlRenderer renderer, string file) + { + SdlImage.TraceLog.Trace(); + return _LoadTexture(renderer, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadTexture_IO")] + private static partial SdlTexture _LoadTextureIO(SdlRenderer renderer, nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture LoadTextureIO(SdlRenderer renderer, nint src, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _LoadTextureIO(renderer, src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadTextureTyped_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlTexture _LoadTextureTypedIO( + SdlRenderer renderer, + nint src, + byte closeio, + string type + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture LoadTextureTypedIO(SdlRenderer renderer, nint src, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _LoadTextureTypedIO(renderer, src, closeio, type); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadGPUTexture", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _LoadGPUTexture( + SdlGpuDevice device, + nint copy_pass, + string file, + int* width, + int* height + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint LoadGPUTexture(SdlGpuDevice device, nint copy_pass, string file, int* width, int* height) + { + SdlImage.TraceLog.Trace(); + return _LoadGPUTexture(device, copy_pass, file, width, height); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadGPUTexture_IO")] + private static partial nint _LoadGPUTextureIO( + SdlGpuDevice device, + nint copy_pass, + nint src, + byte closeio, + int* width, + int* height + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint LoadGPUTextureIO( + SdlGpuDevice device, + nint copy_pass, + nint src, + byte closeio, + int* width, + int* height + ) + { + SdlImage.TraceLog.Trace(); + return _LoadGPUTextureIO(device, copy_pass, src, closeio, width, height); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadGPUTextureTyped_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _LoadGPUTextureTypedIO( + SdlGpuDevice device, + nint copy_pass, + nint src, + byte closeio, + string type, + int* width, + int* height + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint LoadGPUTextureTypedIO( + SdlGpuDevice device, + nint copy_pass, + nint src, + byte closeio, + string type, + int* width, + int* height + ) + { + SdlImage.TraceLog.Trace(); + return _LoadGPUTextureTypedIO(device, copy_pass, src, closeio, type, width, height); + } + + [LibraryImport(Dll, EntryPoint = "IMG_GetClipboardImage")] + private static partial SdlSurface* _GetClipboardImage(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* GetClipboardImage() + { + SdlImage.TraceLog.Trace(); + return _GetClipboardImage(); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isANI")] + private static partial byte _IsANI(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsANI(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsANI(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isAVIF")] + private static partial byte _IsAVIF(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsAVIF(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsAVIF(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isCUR")] + private static partial byte _IsCUR(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsCUR(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsCUR(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isBMP")] + private static partial byte _IsBMP(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsBMP(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsBMP(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isGIF")] + private static partial byte _IsGIF(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsGIF(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsGIF(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isICO")] + private static partial byte _IsICO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsICO(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsICO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isJPG")] + private static partial byte _IsJPG(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsJPG(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsJPG(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isJXL")] + private static partial byte _IsJXL(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsJXL(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsJXL(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isLBM")] + private static partial byte _IsLBM(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsLBM(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsLBM(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isPCX")] + private static partial byte _IsPCX(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsPCX(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsPCX(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isPNG")] + private static partial byte _IsPNG(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsPNG(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsPNG(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isPNM")] + private static partial byte _IsPNM(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsPNM(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsPNM(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isQOI")] + private static partial byte _IsQOI(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsQOI(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsQOI(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isSVG")] + private static partial byte _IsSVG(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsSVG(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsSVG(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isTIF")] + private static partial byte _IsTIF(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsTIF(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsTIF(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isWEBP")] + private static partial byte _IsWEBP(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsWEBP(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsWEBP(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isXCF")] + private static partial byte _IsXCF(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsXCF(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsXCF(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isXPM")] + private static partial byte _IsXPM(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsXPM(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsXPM(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_isXV")] + private static partial byte _IsXV(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsXV(nint src) + { + SdlImage.TraceLog.Trace(); + return _IsXV(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadAVIF_IO")] + private static partial SdlSurface* _LoadAVIFIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadAVIFIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadAVIFIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadBMP_IO")] + private static partial SdlSurface* _LoadBMPIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadBMPIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadBMPIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadCUR_IO")] + private static partial SdlSurface* _LoadCURIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadCURIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadCURIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadGIF_IO")] + private static partial SdlSurface* _LoadGIFIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadGIFIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadGIFIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadICO_IO")] + private static partial SdlSurface* _LoadICOIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadICOIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadICOIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadJPG_IO")] + private static partial SdlSurface* _LoadJPGIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadJPGIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadJPGIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadJXL_IO")] + private static partial SdlSurface* _LoadJXLIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadJXLIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadJXLIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadLBM_IO")] + private static partial SdlSurface* _LoadLBMIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadLBMIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadLBMIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadPCX_IO")] + private static partial SdlSurface* _LoadPCXIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadPCXIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadPCXIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadPNG_IO")] + private static partial SdlSurface* _LoadPNGIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadPNGIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadPNGIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadPNM_IO")] + private static partial SdlSurface* _LoadPNMIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadPNMIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadPNMIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadSVG_IO")] + private static partial SdlSurface* _LoadSVGIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadSVGIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadSVGIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadSizedSVG_IO")] + private static partial SdlSurface* _LoadSizedSVGIO(nint src, int width, int height); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadSizedSVGIO(nint src, int width, int height) + { + SdlImage.TraceLog.Trace(); + return _LoadSizedSVGIO(src, width, height); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadQOI_IO")] + private static partial SdlSurface* _LoadQOIIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadQOIIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadQOIIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadTGA_IO")] + private static partial SdlSurface* _LoadTGAIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadTGAIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadTGAIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadTIF_IO")] + private static partial SdlSurface* _LoadTIFIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadTIFIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadTIFIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadWEBP_IO")] + private static partial SdlSurface* _LoadWEBPIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadWEBPIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadWEBPIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadXCF_IO")] + private static partial SdlSurface* _LoadXCFIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadXCFIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadXCFIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadXPM_IO")] + private static partial SdlSurface* _LoadXPMIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadXPMIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadXPMIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadXV_IO")] + private static partial SdlSurface* _LoadXVIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadXVIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadXVIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_ReadXPMFromArray")] + private static partial SdlSurface* _ReadXPMFromArray(byte** xpm); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* ReadXPMFromArray(byte** xpm) + { + SdlImage.TraceLog.Trace(); + return _ReadXPMFromArray(xpm); + } + + [LibraryImport(Dll, EntryPoint = "IMG_ReadXPMFromArrayToRGB888")] + private static partial SdlSurface* _ReadXPMFromArrayToRGB888(byte** xpm); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* ReadXPMFromArrayToRGB888(byte** xpm) + { + SdlImage.TraceLog.Trace(); + return _ReadXPMFromArrayToRGB888(xpm); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_Save", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _Save(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte Save(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _Save(surface, file); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveTyped_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveTypedIO(SdlSurface* surface, nint dst, byte closeio, string type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveTypedIO(SdlSurface* surface, nint dst, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _SaveTypedIO(surface, dst, closeio, type); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveAVIF", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveAVIF(SdlSurface* surface, string file, int quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveAVIF(SdlSurface* surface, string file, int quality) + { + SdlImage.TraceLog.Trace(); + return _SaveAVIF(surface, file, quality); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveAVIF_IO")] + private static partial byte _SaveAVIFIO(SdlSurface* surface, nint dst, byte closeio, int quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveAVIFIO(SdlSurface* surface, nint dst, byte closeio, int quality) + { + SdlImage.TraceLog.Trace(); + return _SaveAVIFIO(surface, dst, closeio, quality); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveBMP", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveBMP(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveBMP(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _SaveBMP(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveBMP_IO")] + private static partial byte _SaveBMPIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveBMPIO(SdlSurface* surface, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveBMPIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveCUR", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveCUR(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveCUR(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _SaveCUR(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveCUR_IO")] + private static partial byte _SaveCURIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveCURIO(SdlSurface* surface, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveCURIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveGIF", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveGIF(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveGIF(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _SaveGIF(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveGIF_IO")] + private static partial byte _SaveGIFIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveGIFIO(SdlSurface* surface, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveGIFIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveICO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveICO(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveICO(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _SaveICO(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveICO_IO")] + private static partial byte _SaveICOIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveICOIO(SdlSurface* surface, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveICOIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveJPG", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveJPG(SdlSurface* surface, string file, int quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveJPG(SdlSurface* surface, string file, int quality) + { + SdlImage.TraceLog.Trace(); + return _SaveJPG(surface, file, quality); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveJPG_IO")] + private static partial byte _SaveJPGIO(SdlSurface* surface, nint dst, byte closeio, int quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveJPGIO(SdlSurface* surface, nint dst, byte closeio, int quality) + { + SdlImage.TraceLog.Trace(); + return _SaveJPGIO(surface, dst, closeio, quality); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SavePNG", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SavePNG(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SavePNG(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _SavePNG(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SavePNG_IO")] + private static partial byte _SavePNGIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SavePNGIO(SdlSurface* surface, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SavePNGIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveTGA", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveTGA(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveTGA(SdlSurface* surface, string file) + { + SdlImage.TraceLog.Trace(); + return _SaveTGA(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveTGA_IO")] + private static partial byte _SaveTGAIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveTGAIO(SdlSurface* surface, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveTGAIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveWEBP", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveWEBP(SdlSurface* surface, string file, float quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveWEBP(SdlSurface* surface, string file, float quality) + { + SdlImage.TraceLog.Trace(); + return _SaveWEBP(surface, file, quality); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveWEBP_IO")] + private static partial byte _SaveWEBPIO(SdlSurface* surface, nint dst, byte closeio, float quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveWEBPIO(SdlSurface* surface, nint dst, byte closeio, float quality) + { + SdlImage.TraceLog.Trace(); + return _SaveWEBPIO(surface, dst, closeio, quality); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadAnimation", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ImgAnimation* _LoadAnimation(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadAnimation(string file) + { + SdlImage.TraceLog.Trace(); + return _LoadAnimation(file); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadAnimation_IO")] + private static partial ImgAnimation* _LoadAnimationIO(nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadAnimationIO(nint src, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _LoadAnimationIO(src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_LoadAnimationTyped_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ImgAnimation* _LoadAnimationTypedIO(nint src, byte closeio, string type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadAnimationTypedIO(nint src, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _LoadAnimationTypedIO(src, closeio, type); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadANIAnimation_IO")] + private static partial ImgAnimation* _LoadANIAnimationIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadANIAnimationIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadANIAnimationIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadAPNGAnimation_IO")] + private static partial ImgAnimation* _LoadAPNGAnimationIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadAPNGAnimationIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadAPNGAnimationIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadAVIFAnimation_IO")] + private static partial ImgAnimation* _LoadAVIFAnimationIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadAVIFAnimationIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadAVIFAnimationIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadGIFAnimation_IO")] + private static partial ImgAnimation* _LoadGIFAnimationIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadGIFAnimationIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadGIFAnimationIO(src); + } + + [LibraryImport(Dll, EntryPoint = "IMG_LoadWEBPAnimation_IO")] + private static partial ImgAnimation* _LoadWEBPAnimationIO(nint src); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimation* LoadWEBPAnimationIO(nint src) + { + SdlImage.TraceLog.Trace(); + return _LoadWEBPAnimationIO(src); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveAnimation", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveAnimation(ImgAnimation* anim, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveAnimation(ImgAnimation* anim, string file) + { + SdlImage.TraceLog.Trace(); + return _SaveAnimation(anim, file); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_SaveAnimationTyped_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveAnimationTypedIO(ImgAnimation* anim, nint dst, byte closeio, string type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveAnimationTypedIO(ImgAnimation* anim, nint dst, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _SaveAnimationTypedIO(anim, dst, closeio, type); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveANIAnimation_IO")] + private static partial byte _SaveANIAnimationIO(ImgAnimation* anim, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveANIAnimationIO(ImgAnimation* anim, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveANIAnimationIO(anim, dst, closeio); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveAPNGAnimation_IO")] + private static partial byte _SaveAPNGAnimationIO(ImgAnimation* anim, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveAPNGAnimationIO(ImgAnimation* anim, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveAPNGAnimationIO(anim, dst, closeio); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveAVIFAnimation_IO")] + private static partial byte _SaveAVIFAnimationIO(ImgAnimation* anim, nint dst, byte closeio, int quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveAVIFAnimationIO(ImgAnimation* anim, nint dst, byte closeio, int quality) + { + SdlImage.TraceLog.Trace(); + return _SaveAVIFAnimationIO(anim, dst, closeio, quality); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveGIFAnimation_IO")] + private static partial byte _SaveGIFAnimationIO(ImgAnimation* anim, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveGIFAnimationIO(ImgAnimation* anim, nint dst, byte closeio) + { + SdlImage.TraceLog.Trace(); + return _SaveGIFAnimationIO(anim, dst, closeio); + } + + [LibraryImport(Dll, EntryPoint = "IMG_SaveWEBPAnimation_IO")] + private static partial byte _SaveWEBPAnimationIO(ImgAnimation* anim, nint dst, byte closeio, int quality); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveWEBPAnimationIO(ImgAnimation* anim, nint dst, byte closeio, int quality) + { + SdlImage.TraceLog.Trace(); + return _SaveWEBPAnimationIO(anim, dst, closeio, quality); + } + + [LibraryImport(Dll, EntryPoint = "IMG_CreateAnimatedCursor")] + private static partial SdlCursor _CreateAnimatedCursor(ImgAnimation* anim, int hot_x, int hot_y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor CreateAnimatedCursor(ImgAnimation* anim, int hot_x, int hot_y) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimatedCursor(anim, hot_x, hot_y); + } + + [LibraryImport(Dll, EntryPoint = "IMG_FreeAnimation")] + private static partial void _FreeAnimation(ImgAnimation* anim); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void FreeAnimation(ImgAnimation* anim) + { + SdlImage.TraceLog.Trace(); + _FreeAnimation(anim); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_CreateAnimationEncoder", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ImgAnimationEncoder _CreateAnimationEncoder(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationEncoder CreateAnimationEncoder(string file) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimationEncoder(file); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_CreateAnimationEncoder_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ImgAnimationEncoder _CreateAnimationEncoderIO(nint dst, byte closeio, string type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationEncoder CreateAnimationEncoderIO(nint dst, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimationEncoderIO(dst, closeio, type); + } + + [LibraryImport(Dll, EntryPoint = "IMG_CreateAnimationEncoderWithProperties")] + private static partial ImgAnimationEncoder _CreateAnimationEncoderWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationEncoder CreateAnimationEncoderWithProperties(uint props) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimationEncoderWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "IMG_AddAnimationEncoderFrame")] + private static partial byte _AddAnimationEncoderFrame( + ImgAnimationEncoder encoder, + SdlSurface* surface, + ulong duration + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AddAnimationEncoderFrame( + ImgAnimationEncoder encoder, + SdlSurface* surface, + ulong duration + ) + { + SdlImage.TraceLog.Trace(); + return _AddAnimationEncoderFrame(encoder, surface, duration); + } + + [LibraryImport(Dll, EntryPoint = "IMG_CloseAnimationEncoder")] + private static partial byte _CloseAnimationEncoder(ImgAnimationEncoder encoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CloseAnimationEncoder(ImgAnimationEncoder encoder) + { + SdlImage.TraceLog.Trace(); + return _CloseAnimationEncoder(encoder); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_CreateAnimationDecoder", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ImgAnimationDecoder _CreateAnimationDecoder(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationDecoder CreateAnimationDecoder(string file) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimationDecoder(file); + } + + [LibraryImport( + Dll, + EntryPoint = "IMG_CreateAnimationDecoder_IO", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ImgAnimationDecoder _CreateAnimationDecoderIO(nint src, byte closeio, string type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationDecoder CreateAnimationDecoderIO(nint src, byte closeio, string type) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimationDecoderIO(src, closeio, type); + } + + [LibraryImport(Dll, EntryPoint = "IMG_CreateAnimationDecoderWithProperties")] + private static partial ImgAnimationDecoder _CreateAnimationDecoderWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationDecoder CreateAnimationDecoderWithProperties(uint props) + { + SdlImage.TraceLog.Trace(); + return _CreateAnimationDecoderWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "IMG_GetAnimationDecoderProperties")] + private static partial uint _GetAnimationDecoderProperties(ImgAnimationDecoder decoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetAnimationDecoderProperties(ImgAnimationDecoder decoder) + { + SdlImage.TraceLog.Trace(); + return _GetAnimationDecoderProperties(decoder); + } + + [LibraryImport(Dll, EntryPoint = "IMG_GetAnimationDecoderFrame")] + private static partial byte _GetAnimationDecoderFrame( + ImgAnimationDecoder decoder, + SdlSurface** frame, + ulong* duration + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetAnimationDecoderFrame( + ImgAnimationDecoder decoder, + SdlSurface** frame, + ulong* duration + ) + { + SdlImage.TraceLog.Trace(); + return _GetAnimationDecoderFrame(decoder, frame, duration); + } + + [LibraryImport(Dll, EntryPoint = "IMG_GetAnimationDecoderStatus")] + private static partial ImgAnimationDecoderStatus _GetAnimationDecoderStatus(ImgAnimationDecoder decoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ImgAnimationDecoderStatus GetAnimationDecoderStatus(ImgAnimationDecoder decoder) + { + SdlImage.TraceLog.Trace(); + return _GetAnimationDecoderStatus(decoder); + } + + [LibraryImport(Dll, EntryPoint = "IMG_ResetAnimationDecoder")] + private static partial byte _ResetAnimationDecoder(ImgAnimationDecoder decoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResetAnimationDecoder(ImgAnimationDecoder decoder) + { + SdlImage.TraceLog.Trace(); + return _ResetAnimationDecoder(decoder); + } + + [LibraryImport(Dll, EntryPoint = "IMG_CloseAnimationDecoder")] + private static partial byte _CloseAnimationDecoder(ImgAnimationDecoder decoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CloseAnimationDecoder(ImgAnimationDecoder decoder) + { + SdlImage.TraceLog.Trace(); + return _CloseAnimationDecoder(decoder); + } + } + } +} diff --git a/Brutal.Sdl.Image/Generated/SdlImage.Structs.gen.cs b/Brutal.Sdl.Image/Generated/SdlImage.Structs.gen.cs new file mode 100644 index 0000000..4e540f3 --- /dev/null +++ b/Brutal.Sdl.Image/Generated/SdlImage.Structs.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Image +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct ImgAnimation + { + public int w; + public int h; + public int count; + public SdlSurface** frames; + public int* delays; + } +} diff --git a/Brutal.Sdl.Image/GlobalUsings.cs b/Brutal.Sdl.Image/GlobalUsings.cs new file mode 100644 index 0000000..4b608b4 --- /dev/null +++ b/Brutal.Sdl.Image/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.SdlApi; diff --git a/Brutal.Sdl.Image/LICENSES/BRUTAL-SDL-IMAGE-THIRD-PARTY-NOTICES.txt b/Brutal.Sdl.Image/LICENSES/BRUTAL-SDL-IMAGE-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..f74b56d --- /dev/null +++ b/Brutal.Sdl.Image/LICENSES/BRUTAL-SDL-IMAGE-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,217 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Sdl.Image + +This package redistributes third-party software. The licenses governing that software +are reproduced below in full. + +WHAT THIS PACKAGE CONTAINS + + One native library, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + SDL_image 3.4.4 SDL3_image.dll / libSDL3_image.so / libSDL3_image.dylib + + Five components maintained by third parties are compiled into that library and are + governed by their own licenses, one section each below: + + stb_image the general image decoding backend + tiny_jpeg JPEG encoding + NanoSVG the SVG loader + QOI the QOI loader + XPaint parts of the GIF decoder + + All five are present on every runtime identifier. + +A NOTE ON SCOPE + + This package depends on RocketWerkz.Brutal.Sdl and links against SDL3 at runtime. + SDL3 is not contained in this package and is covered by that package's own notices. + + SDL_image can optionally be built against libpng, libjpeg, libtiff, libwebp, libavif, + dav1d, aom and libjxl. This build enables none of them, none is contained in the + shipped library, and none is attributed here. + +============================================================================== +SDL_image +============================================================================== + + Name SDL_image + Version 3.4.4 + Upstream https://github.com/libsdl-org/SDL_image + SPDX Zlib + Shipped as SDL3_image.dll, libSDL3_image.so, libSDL3_image.dylib + +Copyright (C) 1997-2026 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +============================================================================== +stb_image +============================================================================== + + Name stb_image + Version as vendored by SDL_image 3.4.4 + Upstream https://github.com/nothings/stb + SPDX MIT OR Unlicense + Shipped as compiled into SDL3_image.dll, libSDL3_image.so, libSDL3_image.dylib + + stb_image is offered under two mutually exclusive licenses, both reproduced below + as upstream states them. + +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ + +============================================================================== +tiny_jpeg +============================================================================== + + Name tiny_jpeg + Version as vendored by SDL_image 3.4.4 + Upstream https://github.com/serge-rgb/TinyJPEG + SPDX LicenseRef-PublicDomain + Shipped as compiled into SDL3_image.dll, libSDL3_image.so, libSDL3_image.dylib + + Tiny JPEG Encoder, by Sergio Gonzalez. Upstream states its terms as follows: + +This software is in the public domain. Where that dedication is not +recognized, you are granted a perpetual, irrevocable license to copy and +modify this file as you see fit. + +============================================================================== +NanoSVG +============================================================================== + + Name NanoSVG + Version as vendored by SDL_image 3.4.4 + Upstream https://github.com/memononen/nanosvg + SPDX Zlib + Shipped as compiled into SDL3_image.dll, libSDL3_image.so, libSDL3_image.dylib + +Copyright (c) 2013-14 Mikko Mononen memon@inside.org + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +The SVG parser is based on Anti-Grain Geometry 2.4 SVG example +Copyright (C) 2002-2004 Maxim Shemanarev (McSeem) (http://www.antigrain.com/) + +Arc calculation code based on canvg (https://code.google.com/p/canvg/) + +Bounding box calculation based on http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + +============================================================================== +QOI +============================================================================== + + Name QOI + Version as vendored by SDL_image 3.4.4 + Upstream https://github.com/phoboslab/qoi + SPDX MIT + Shipped as compiled into SDL3_image.dll, libSDL3_image.so, libSDL3_image.dylib + + The "Quite OK Image" format, by Dominic Szablewski. + +Copyright(c) 2021 Dominic Szablewski + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files(the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions : +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +============================================================================== +XPaint (parts of the GIF decoder) +============================================================================== + + Name XPaint + Version as vendored by SDL_image 3.4.4 (the notice states 1990-1996) + Upstream https://sourceforge.net/projects/xpaint/ + SPDX LicenseRef-XPaint (upstream states no identifier) + Shipped as compiled into SDL3_image.dll, libSDL3_image.so, libSDL3_image.dylib + + SDL_image's GIF decoder adapts part of its code from XPaint. SDL_image says so in the + decoder itself and reproduces the original notice; both are reproduced below as + SDL_image states them. Upstream draws the notice inside an ASCII box; the frame is not + reproduced and no word of the notice is changed. + +Some parts of the code have been adapted from XPaint: +Copyright 1990, 1991, 1993 David Koblas. +Copyright 1996 Torsten Martinsen. + Permission to use, copy, modify, and distribute this software + and its documentation for any purpose and without fee is hereby + granted, provided that the above copyright notice appear in all + copies and that both that copyright notice and this permission + notice appear in supporting documentation. This software is + provided "as is" without express or implied warranty. diff --git a/Brutal.Sdl.Image/SdlImage.cs b/Brutal.Sdl.Image/SdlImage.cs new file mode 100644 index 0000000..b15b9df --- /dev/null +++ b/Brutal.Sdl.Image/SdlImage.cs @@ -0,0 +1,95 @@ +using System.Reflection; +using Brutal.Logging; + +namespace Brutal.SdlApi.Image; + +/// +/// Provides access to the SDL_image library. +/// +public static unsafe partial class SdlImage +{ + /// + /// The name the generated P/Invoke surface imports against. The static + /// constructor registers a that normalizes + /// this name to the platform-specific SDL3_image shared library. + /// + internal const string Dll = "SDL3_image"; + + /// + /// The logging category for the per-call trace logs the generated P/Invoke surface emits. An + /// internal implementation detail mirroring core's Sdl.TraceLog; the generated + /// SdlImage.PInvoke wrappers call SdlImage.TraceLog.Trace() on every invocation. + /// + internal static readonly LogCategory TraceLog = LogCategory.Make("SdlImage"); + + /// + /// Hosts the raw generated P/Invoke surface and the native library resolver for SDL3_image. + /// + public static unsafe partial class PInvoke + { + // The native SDL3_image handle, resolved lazily by the DllImportResolver below and cached + // so the library is loaded at most once regardless of how many entry points are resolved. + private static nint _nativeHandle; + + private static readonly Lock ResolveLock = new(); + + static PInvoke() + { + // Load libSDL3 before SDL3_image, which links against it; only a real P/Invoke triggers Sdl's resolver. + _ = Sdl.PInvoke.GetVersion(); + + NativeLibrary.SetDllImportResolver(typeof(SdlImage).Assembly, Resolve); + } + + // Normalizes the "SDL3_image" import name to the platform-specific shared library filename + // (SDL3_image.dll on Windows, libSDL3_image.dylib on macOS, libSDL3_image.so.0 on Linux). + // SDL_image's Linux build installs a versioned soname (libSDL3_image.so.0), same convention + // as core's SDL3, so the candidate list is spelled out explicitly, most-specific first, with + // the default probing convention name as a fallback. + private static nint Resolve(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + // Only ever asked to resolve SDL3_image; anything else is left to the default resolver. + if (libraryName != Dll) + return IntPtr.Zero; + + lock (ResolveLock) + { + if (_nativeHandle != IntPtr.Zero) + return _nativeHandle; + + var search = searchPath ?? DllImportSearchPath.AssemblyDirectory; + + // Load (not TryLoad) so each candidate's OS error text reaches the final exception. + var failures = new List(); + foreach (var candidate in Candidates()) + { + try + { + _nativeHandle = NativeLibrary.Load(candidate, assembly, search); + return _nativeHandle; + } + catch (Exception ex) + { + failures.Add($"'{candidate}': {ex.Message}"); + } + } + + throw new DllNotFoundException( + "Could not load the SDL3_image native library. Attempts (most specific first): " + + string.Join("; ", failures) + + "." + ); + } + } + + private static string[] Candidates() + { + if (OperatingSystem.IsWindows()) + return ["SDL3_image.dll", "SDL3_image"]; + if (OperatingSystem.IsMacOS()) + return ["libSDL3_image.dylib", "SDL3_image"]; + // Linux and other Unix-likes. + return ["libSDL3_image.so.0", "libSDL3_image.so", "SDL3_image"]; + } + } +} diff --git a/Brutal.Sdl.Mixer/Generated/Libraries/SdlMixer.Ergonomic.gen.cs b/Brutal.Sdl.Mixer/Generated/Libraries/SdlMixer.Ergonomic.gen.cs new file mode 100644 index 0000000..153b028 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/Libraries/SdlMixer.Ergonomic.gen.cs @@ -0,0 +1,2168 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Mixer +{ + public static unsafe partial class SdlMixer + { + /// + /// Get the version of SDL_mixer that is linked against your program. + /// + /// the version of the linked library. + /// + /// + /// If you are linking to SDL_mixer dynamically, then it is possible that the + /// current version will be different than the version you compiled against. + /// This function returns the current version, while SDL_MIXER_VERSION is the + /// version you compiled with. + /// + /// + /// This function may be called safely at any time, even before MIX_Init(). + /// + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static int Version() => PInvoke.Version(); + + /// + /// Ergonomic wrapper over MIX_Init. Throws instead of returning false on failure. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void Init() + { + if (PInvoke.Init() == 0) + { + throw SdlException.FromError("MIX_Init failed"); + } + } + + /// + /// Report the number of audio decoders available for use. + /// + /// the number of decoders available. + /// + /// + /// An audio decoder is what turns specific audio file formats into usable PCM + /// data. For example, there might be an MP3 decoder, or a WAV decoder, etc. + /// SDL_mixer probably has several decoders built in. + /// + /// + /// The return value can be used to call MIX_GetAudioDecoder() in a loop. + /// + /// + /// The number of decoders available is decided during MIX_Init() and does not + /// change until the library is deinitialized. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static int GetNumAudioDecoders() => PInvoke.GetNumAudioDecoders(); + + /// + /// Report the name of a specific audio decoders. + /// + /// the index of the decoder to query. + /// + /// a UTF-8 (really, ASCII) string of the decoder's name, or NULL if + /// index is invalid. + /// + /// + /// + /// An audio decoder is what turns specific audio file formats into usable PCM + /// data. For example, there might be an MP3 decoder, or a WAV decoder, etc. + /// SDL_mixer probably has several decoders built in. + /// + /// + /// The names are capital English letters and numbers, low-ASCII. They don't + /// necessarily map to a specific file format; Some decoders, like "XMP" + /// operate on multiple file types, and more than one decoder might handle the + /// same file type, like "DRMP3" vs "MPG123". Note that in that last example, + /// neither decoder is called "MP3". + /// + /// + /// The index of a specific decoder is decided during MIX_Init() and does not + /// change until the library is deinitialized. Valid indices are between zero + /// and the return value of MIX_GetNumAudioDecoders(). + /// + /// + /// The returned pointer is const memory owned by SDL_mixer; do not free it. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static string? GetAudioDecoder(int index) => PInvoke.GetAudioDecoder(index); + + /// + /// Ergonomic wrapper over MIX_CreateMixerDevice. Throws instead of returning a null handle on failure. + /// + /// + /// the device to open for playback, or + /// SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK for the default. + /// + /// the audio format to request from the device. May be NULL. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixMixer CreateMixerDevice(uint devid, SdlAudioSpec* spec) + { + MixMixer result = PInvoke.CreateMixerDevice(devid, spec); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateMixerDevice failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_CreateMixer. Throws instead of returning a null handle on failure. + /// + /// the audio format that mixer will generate. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixMixer CreateMixer(SdlAudioSpec* spec) + { + MixMixer result = PInvoke.CreateMixer(spec); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateMixer failed"); + } + return result; + } + + /// + /// Free a mixer. + /// + /// the mixer to destroy. + /// + /// + /// If this mixer was created with MIX_CreateMixerDevice(), this function will + /// also close the audio device and call SDL_QuitSubSystem(SDL_INIT_AUDIO). + /// + /// + /// Any MIX_Group or MIX_Track created for this mixer will also be destroyed. + /// Do not access them again or attempt to destroy them after the device is + /// destroyed. MIX_Audio objects will not be destroyed, since they can be + /// shared between mixers (but those will all be destroyed during MIX_Quit()). + /// + /// + /// + /// If this is used with a MIX_Mixer from MIX_CreateMixerDevice, + /// then this function should only be called on the main thread. + /// If this is used with a MIX_Mixer from MIX_CreateMixer, then + /// it is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public static void DestroyMixer(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + PInvoke.DestroyMixer(mixer); + } + + /// + /// Get the properties associated with a mixer. + /// + /// the mixer to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL_mixer: + /// + /// + /// - MIX_PROP_MIXER_DEVICE_NUMBER: the SDL_AudioDeviceID that this mixer has + /// opened for playback. This will be zero (no device) if the mixer was + /// created with Mix_CreateMixer() instead of Mix_CreateMixerDevice(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static uint GetMixerProperties(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetMixerProperties(mixer); + } + + /// + /// Ergonomic wrapper over MIX_GetMixerFormat. Throws instead of returning false on failure. + /// + /// the mixer to query. + /// where to store the mixer audio format. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void GetMixerFormat(MixMixer mixer, SdlAudioSpec* spec) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.GetMixerFormat(mixer, spec) == 0) + { + throw SdlException.FromError("MIX_GetMixerFormat failed"); + } + } + + /// + /// Lock a mixer by obtaining its internal mutex. + /// + /// the mixer to lock. May be NULL. + /// + /// + /// While locked, the mixer will not be able to mix more audio or change its + /// internal state in another thread. Those other threads will block until the + /// mixer is unlocked again. + /// + /// + /// Under the hood, this function calls SDL_LockMutex(), so all the same rules + /// apply: the lock can be recursive, it must be unlocked the same number of + /// times from the same thread that locked it, etc. + /// + /// + /// Just about every SDL_mixer API also locks the mixer while doing its work, + /// as does the SDL audio device thread while actual mixing is in progress, so + /// basic use of this library never requires the app to explicitly lock the + /// device to be thread safe. There are two scenarios where this can be useful, + /// however: + /// + /// + /// - The app has a provided a callback that the mixing thread might call, and + /// there is some app state that needs to be protected against race + /// conditions as changes are made and mixing progresses simultaneously. Any + /// lock can be used for this, but this is a conveniently-available lock. + /// - The app wants to make multiple, atomic changes to the mix. For example, + /// to start several tracks at the exact same moment, one would lock the + /// mixer, call MIX_PlayTrack multiple times, and then unlock again; all the + /// tracks will start mixing on the same sample frame. + /// + /// + /// Each call to this function must be paired with a call to MIX_UnlockMixer + /// from the same thread. It is safe to lock a mixer multiple times; it remains + /// locked until the final matching unlock call. + /// + /// + /// Do not lock the mixer for significant amounts of time, or it can cause + /// audio dropouts. Just do simple things quickly and unlock again. + /// + /// + /// Locking a NULL mixer is a safe no-op. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static void LockMixer(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + PInvoke.LockMixer(mixer); + } + + /// + /// Unlock a mixer previously locked by a call to MIX_LockMixer(). + /// + /// the mixer to unlock. May be NULL. + /// + /// + /// While locked, the mixer will not be able to mix more audio or change its + /// internal state another thread. Those other threads will block until the + /// mixer is unlocked again. + /// + /// + /// Under the hood, this function calls SDL_LockMutex(), so all the same rules + /// apply: the lock can be recursive, it must be unlocked the same number of + /// times from the same thread that locked it, etc. + /// + /// + /// Unlocking a NULL mixer is a safe no-op. + /// + /// + /// + /// This call must be paired with a previous MIX_LockMixer call + /// on the same thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static void UnlockMixer(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + PInvoke.UnlockMixer(mixer); + } + + /// + /// Ergonomic wrapper over MIX_LoadAudio_IO. Throws instead of returning a null handle on failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the SDL_IOStream to load data from. + /// if true, data will be fully uncompressed before returning. + /// + /// true if SDL_mixer should close io before returning + /// (success or failure). + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadAudioIO(MixMixer mixer, nint io, bool predecode, bool closeio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.LoadAudioIO( + mixer, + io, + predecode ? (byte)1 : (byte)0, + closeio ? (byte)1 : (byte)0 + ); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadAudio_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_LoadAudio. Throws instead of returning a null handle on failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the path on the filesystem to load data from. + /// if true, data will be fully uncompressed before returning. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadAudio(MixMixer mixer, string path, bool predecode) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.LoadAudio(mixer, path, predecode ? (byte)1 : (byte)0); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadAudio failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_LoadAudioNoCopy. Throws instead of returning a null handle on failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the buffer where the audio data lives. + /// the size, in bytes, of the buffer. + /// + /// if true, data will be given to SDL_free() when the + /// MIX_Audio is destroyed. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadAudioNoCopy(MixMixer mixer, void* data, nuint datalen, bool free_when_done) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.LoadAudioNoCopy(mixer, data, datalen, free_when_done ? (byte)1 : (byte)0); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadAudioNoCopy failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_LoadAudioWithProperties. Throws instead of returning a null handle on + /// failure. + /// + /// a set of properties on how to load audio. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadAudioWithProperties(uint props) + { + MixAudio result = PInvoke.LoadAudioWithProperties(props); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadAudioWithProperties failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_LoadRawAudio_IO. Throws instead of returning a null handle on failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the SDL_IOStream to load data from. + /// what format the raw data is in. + /// + /// true if SDL_mixer should close io before returning + /// (success or failure). + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadRawAudioIO(MixMixer mixer, nint io, SdlAudioSpec* spec, bool closeio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.LoadRawAudioIO(mixer, io, spec, closeio ? (byte)1 : (byte)0); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadRawAudio_IO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_LoadRawAudio. Throws instead of returning a null handle on failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the raw PCM data to load. + /// the size, in bytes, of the raw PCM data. + /// what format the raw data is in. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadRawAudio(MixMixer mixer, void* data, nuint datalen, SdlAudioSpec* spec) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.LoadRawAudio(mixer, data, datalen, spec); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadRawAudio failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_LoadRawAudioNoCopy. Throws instead of returning a null handle on + /// failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the buffer where the raw PCM data lives. + /// the size, in bytes, of the buffer. + /// what format the raw data is in. + /// + /// if true, data will be given to SDL_free() when the + /// MIX_Audio is destroyed. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio LoadRawAudioNoCopy( + MixMixer mixer, + void* data, + nuint datalen, + SdlAudioSpec* spec, + bool free_when_done + ) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.LoadRawAudioNoCopy( + mixer, + data, + datalen, + spec, + free_when_done ? (byte)1 : (byte)0 + ); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_LoadRawAudioNoCopy failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_CreateSineWaveAudio. Throws instead of returning a null handle on + /// failure. + /// + /// a mixer this audio is intended to be used with. May be NULL. + /// the sinewave's frequency in Hz. + /// the sinewave's amplitude from 0.0f to 1.0f. + /// + /// the maximum number of milliseconds of audio to generate, or less + /// than zero to generate infinite audio. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudio CreateSineWaveAudio(MixMixer mixer, int hz, float amplitude, long ms) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixAudio result = PInvoke.CreateSineWaveAudio(mixer, hz, amplitude, ms); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateSineWaveAudio failed"); + } + return result; + } + + /// + /// Get the properties associated with a MIX_Audio. + /// + /// the audio to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// SDL_mixer offers some properties of its own, but this can also be a + /// convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given MIX_Audio, if necessary. + /// + /// + /// The following read-only properties are provided by SDL_mixer: + /// + /// + /// - MIX_PROP_METADATA_TITLE_STRING: the audio's title ("Smells Like Teen + /// Spirit"). + /// - MIX_PROP_METADATA_ARTIST_STRING: the audio's artist name ("Nirvana"). + /// - MIX_PROP_METADATA_ALBUM_STRING: the audio's album name ("Nevermind"). + /// - MIX_PROP_METADATA_COPYRIGHT_STRING: the audio's copyright info + /// ("Copyright (c) 1991") + /// - MIX_PROP_METADATA_TRACK_NUMBER: the audio's track number on the album + /// (1) + /// - MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER: the total tracks on the album + /// (13) + /// - MIX_PROP_METADATA_YEAR_NUMBER: the year the audio was released (1991) + /// - MIX_PROP_METADATA_DURATION_FRAMES_NUMBER: The sample frames worth of + /// PCM data that comprise this audio. It might be off by a little if the + /// decoder only knows the duration as a unit of time. + /// - MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN: if true, audio never runs + /// out of sound to generate. This isn't necessarily always known to + /// SDL_mixer, though. + /// + /// + /// Other properties, documented with MIX_LoadAudioWithProperties(), may also + /// be present. + /// + /// + /// Note that the metadata properties are whatever SDL_mixer finds in things + /// like ID3 tags, and they often have very little standardized formatting, may + /// be missing, and can be completely wrong if the original data is + /// untrustworthy (like an MP3 from a P2P file sharing service). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static uint GetAudioProperties(MixAudio audio) => PInvoke.GetAudioProperties(audio); + + /// + /// Get the length of a MIX_Audio's playback in sample frames. + /// + /// the audio to query. + /// + /// the length of the audio in sample frames, or MIX_DURATION_UNKNOWN + /// or MIX_DURATION_INFINITE. + /// + /// + /// + /// This information is also available via the + /// MIX_PROP_METADATA_DURATION_FRAMES_NUMBER property, but it's common enough + /// to provide a simple accessor function. + /// + /// + /// This reports the length of the data in sample frames, so sample-perfect + /// mixing can be possible. Sample frames are only meaningful as a measure of + /// time if the sample rate (frequency) is also known. To convert from sample + /// frames to milliseconds, use MIX_AudioFramesToMS(). + /// + /// + /// Not all audio file formats can report the complete length of the data they + /// will produce through decoding: some can't calculate it, some might produce + /// infinite audio. + /// + /// + /// Also, some file formats can only report duration as a unit of time, which + /// means SDL_mixer might have to estimate sample frames from that information. + /// With less precision, the reported duration might be off by a few sample + /// frames in either direction. + /// + /// + /// This will return a value >= 0 if a duration is known. It might also return + /// MIX_DURATION_UNKNOWN or MIX_DURATION_INFINITE. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static long GetAudioDuration(MixAudio audio) => PInvoke.GetAudioDuration(audio); + + /// + /// Ergonomic wrapper over MIX_GetAudioFormat. Throws instead of returning false on failure. + /// + /// the audio to query. + /// on success, audio format details will be stored here. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void GetAudioFormat(MixAudio audio, SdlAudioSpec* spec) + { + if (PInvoke.GetAudioFormat(audio, spec) == 0) + { + throw SdlException.FromError("MIX_GetAudioFormat failed"); + } + } + + /// + /// Destroy the specified audio. + /// + /// the audio to destroy. + /// + /// + /// MIX_Audio is reference-counted internally, so this function only unrefs it. + /// If doing so causes the reference count to drop to zero, the MIX_Audio will + /// be deallocated. This allows the system to safely operate if the audio is + /// still assigned to a MIX_Track at the time of destruction. The actual + /// destroying will happen when the track stops using it. + /// + /// + /// But from the caller's perspective, once this function is called, it should + /// assume the audio pointer has become invalid. + /// + /// + /// Destroying a NULL MIX_Audio is a legal no-op. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static void DestroyAudio(MixAudio audio) => PInvoke.DestroyAudio(audio); + + /// + /// Ergonomic wrapper over MIX_CreateTrack. Throws instead of returning a null handle on failure. + /// + /// the mixer on which to create this track. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixTrack CreateTrack(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixTrack result = PInvoke.CreateTrack(mixer); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateTrack failed"); + } + return result; + } + + /// + /// Destroy the specified track. + /// + /// the track to destroy. + /// + /// + /// If the track is currently playing, it will be stopped immediately, without + /// any fadeout. If there is a callback set through + /// MIX_SetTrackStoppedCallback(), it will not be called. + /// + /// + /// If the mixer is currently mixing in another thread, this will block until + /// it finishes. Destroying a track from the mixer thread itself (during a + /// callback) will cause it to be destroyed as soon as this iteration of the + /// mixer thread is not using it; in this scenario, destroying a track and then + /// making futher changes to it is considered undefined behavior. + /// + /// + /// Destroying a NULL MIX_Track is a legal no-op. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static void DestroyTrack(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + PInvoke.DestroyTrack(track); + } + + /// + /// Get the properties associated with a track. + /// + /// the track to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// Currently SDL_mixer assigns no properties of its own to a track, but this + /// can be a convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given track. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static uint GetTrackProperties(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackProperties(track); + } + + /// + /// Ergonomic wrapper over MIX_GetTrackMixer. + /// + /// the track to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public static MixMixer GetTrackMixer(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackMixer(track); + } + + /// + /// Ergonomic wrapper over MIX_SetTrackAudio. Throws instead of returning false on failure. + /// + /// the track on which to set a new audio input. + /// the new audio input to set. May be NULL. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackAudio(MixTrack track, MixAudio audio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackAudio(track, audio) == 0) + { + throw SdlException.FromError("MIX_SetTrackAudio failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_SetTrackAudioStream. Throws instead of returning false on failure. + /// + /// the track on which to set a new audio input. + /// the audio stream to use as the track's input. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackAudioStream(MixTrack track, SdlAudioStream stream) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackAudioStream(track, stream) == 0) + { + throw SdlException.FromError("MIX_SetTrackAudioStream failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_SetTrackIOStream. Throws instead of returning false on failure. + /// + /// the track on which to set a new audio input. + /// the new i/o stream to use as the track's input. + /// if true, close the stream when done with it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackIOStream(MixTrack track, nint io, bool closeio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackIOStream(track, io, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("MIX_SetTrackIOStream failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_SetTrackRawIOStream. Throws instead of returning false on failure. + /// + /// the track on which to set a new audio input. + /// the new i/o stream to use as the track's input. + /// the format of the PCM data that the SDL_IOStream will provide. + /// if true, close the stream when done with it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackRawIOStream(MixTrack track, nint io, SdlAudioSpec* spec, bool closeio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackRawIOStream(track, io, spec, closeio ? (byte)1 : (byte)0) == 0) + { + throw SdlException.FromError("MIX_SetTrackRawIOStream failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_TagTrack. Throws instead of returning false on failure. + /// + /// the track to add a tag to. + /// the tag to add. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void TagTrack(MixTrack track, string tag) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.TagTrack(track, tag) == 0) + { + throw SdlException.FromError("MIX_TagTrack failed"); + } + } + + /// + /// Remove an arbitrary tag from a track. + /// + /// the track from which to remove a tag. + /// the tag to remove, or NULL to remove all current tags. + /// + /// + /// A tag can be any valid C string in UTF-8 encoding. It can be useful to + /// group tracks in various ways. For example, everything in-game might be + /// marked as "game", so when the user brings up the settings menu, the app can + /// pause all tracks involved in gameplay at once, but keep background music + /// and menu sound effects running. + /// + /// + /// It's legal to remove a tag that the track doesn't have; this function + /// doesn't report errors, so this simply does nothing. + /// + /// + /// Specifying a NULL tag will remove all tags on a track. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static void UntagTrack(MixTrack track, string tag) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + PInvoke.UntagTrack(track, tag); + } + + /// + /// Ergonomic wrapper over MIX_GetTrackTags. + /// + /// the track to query. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. + /// + public static string[] GetTrackTags(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + int count; + var ptr = PInvoke.GetTrackTags(track, &count); + if (ptr is null) + throw SdlException.FromError("MIX_GetTrackTags failed"); + try + { + var result = new string[count]; + for (var i = 0; i < count; i++) + result[i] = Marshal.PtrToStringUTF8((nint)ptr[i])!; + return result; + } + finally + { + Sdl.PInvoke.Free(ptr); + } + } + + /// + /// Ergonomic wrapper over MIX_GetTaggedTracks. + /// + /// the mixer to query. + /// the tag to search. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. Each element is a + /// borrowed handle: it is owned by SDL, not created by this call, and must not be disposed. Do not + /// call on any element. + /// + public static MixTrack[] GetTaggedTracks(MixMixer mixer, string tag) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + int count; + var ptr = PInvoke.GetTaggedTracks(mixer, tag, &count); + if (ptr is null) + throw SdlException.FromError("MIX_GetTaggedTracks failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + Sdl.PInvoke.Free(ptr); + } + } + + /// + /// Ergonomic wrapper over MIX_SetTrackPlaybackPosition. Throws instead of returning false on failure. + /// + /// the track to change. + /// the sample frame position to seek to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackPlaybackPosition(MixTrack track, long frames) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackPlaybackPosition(track, frames) == 0) + { + throw SdlException.FromError("MIX_SetTrackPlaybackPosition failed"); + } + } + + /// + /// Get the current input position of a playing track. + /// + /// the track to change. + /// + /// the track's current sample frame position, or -1 on error; call + /// SDL_GetError() for details. + /// + /// + /// + /// (Not to be confused with MIX_GetTrack3DPosition(), which is positioning of + /// the track in 3D space, not the playback position of its audio data.) + /// + /// + /// Position is defined in sample frames of decoded audio, not units of time, + /// so that sample-perfect mixing can be achieved. To instead operate in units + /// of time, use MIX_TrackFramesToMS() to convert the return value to + /// milliseconds. + /// + /// + /// Stopped and paused tracks will report the position when they halted. + /// Playing tracks will report the current position, which will change over + /// time. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long GetTrackPlaybackPosition(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackPlaybackPosition(track); + } + + /// + /// Query whether a given track is fading. + /// + /// the track to query. + /// + /// less than 0 if the track is fading out, greater than 0 if fading + /// in, zero otherwise. + /// + /// + /// + /// This specifically checks if the track is not stopped (paused or playing), + /// and it is fading in or out, and returns the number of frames remaining in + /// the fade. + /// + /// + /// If fading out, the returned value will be negative. When fading in, the + /// returned value will be positive. If not fading, this function returns zero. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns 0, but there is no mechanism to distinguish errors from tracks that + /// aren't fading. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static long GetTrackFadeFrames(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackFadeFrames(track); + } + + /// + /// Query how many loops remain for a given track. + /// + /// the track to query. + /// + /// the number of pending loops, zero if not looping, and -1 if + /// looping infinitely. + /// + /// + /// + /// This returns the number of loops still pending; if a track will eventually + /// complete and loop to play again one more time, this will return 1. If a + /// track was looping but is on its final iteration of the loop (will stop + /// when this iteration completes), this will return zero. + /// + /// + /// A track that is looping infinitely will return -1. This value does not + /// report an error in this case. + /// + /// + /// A track that is stopped (not playing and not paused) will have zero loops + /// remaining. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns zero, but there is no mechanism to distinguish errors from + /// non-looping tracks. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static int GetTrackLoops(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackLoops(track); + } + + /// + /// Ergonomic wrapper over MIX_SetTrackLoops. Throws instead of returning false on failure. + /// + /// the track to configure. + /// + /// new number of times to loop. Zero to disable looping, -1 + /// to loop infinitely. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackLoops(MixTrack track, int num_loops) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackLoops(track, num_loops) == 0) + { + throw SdlException.FromError("MIX_SetTrackLoops failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_GetTrackAudio. + /// + /// the track to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public static MixAudio GetTrackAudio(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackAudio(track); + } + + /// + /// Ergonomic wrapper over MIX_GetTrackAudioStream. + /// + /// the track to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public static SdlAudioStream GetTrackAudioStream(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackAudioStream(track); + } + + /// + /// Return the number of sample frames remaining to be mixed in a track. + /// + /// the track to query. + /// the total sample frames still to be mixed, or -1 if unknown. + /// + /// + /// If the track is playing or paused, and its total duration is known, this + /// will report how much audio is left to mix. If the track is playing, future + /// calls to this function will report different values. + /// + /// + /// Remaining audio is defined in sample frames of decoded audio, not units + /// of time, so that sample-perfect mixing can be achieved. To instead operate + /// in units of time, use MIX_TrackFramesToMS() to convert the return value to + /// milliseconds. + /// + /// + /// This function does not take into account fade-outs or looping, just the + /// current mixing position vs the duration of the track. + /// + /// + /// If the duration of the track isn't known, or track is NULL, this function + /// returns -1. A stopped track reports 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static long GetTrackRemaining(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackRemaining(track); + } + + /// + /// Convert milliseconds to sample frames for a track's current format. + /// + /// the track to query. + /// the milliseconds to convert to track-specific sample frames. + /// + /// Converted number of sample frames, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the track's current input format, which can + /// change when its input does, and also if that input changes formats + /// mid-stream (for example, if decoding a file that is two MP3s concatenated + /// together). + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns -1. If the track has no input, this returns -1. If ms is < 0, + /// this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long TrackMSToFrames(MixTrack track, long ms) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.TrackMSToFrames(track, ms); + } + + /// + /// Convert sample frames for a track's current format to milliseconds. + /// + /// the track to query. + /// the track-specific sample frames to convert to milliseconds. + /// + /// Converted number of milliseconds, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the track's current input format, which can + /// change when its input does, and also if that input changes formats + /// mid-stream (for example, if decoding a file that is two MP3s concatenated + /// together). + /// + /// + /// Sample frames are more precise than milliseconds, so out of necessity, this + /// function will approximate by rounding down to the closest full millisecond. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns -1. If the track has no input, this returns -1. If frames is < 0, + /// this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long TrackFramesToMS(MixTrack track, long frames) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.TrackFramesToMS(track, frames); + } + + /// + /// Convert milliseconds to sample frames for a MIX_Audio's format. + /// + /// the audio to query. + /// the milliseconds to convert to audio-specific sample frames. + /// + /// Converted number of sample frames, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the audio's initial format, even if the + /// format would change mid-stream. + /// + /// + /// If ms is < 0, this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long AudioMSToFrames(MixAudio audio, long ms) => PInvoke.AudioMSToFrames(audio, ms); + + /// + /// Convert sample frames for a MIX_Audio's format to milliseconds. + /// + /// the audio to query. + /// the audio-specific sample frames to convert to milliseconds. + /// + /// Converted number of milliseconds, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the audio's initial format, even if the + /// format would change mid-stream. + /// + /// + /// Sample frames are more precise than milliseconds, so out of necessity, this + /// function will approximate by rounding down to the closest full millisecond. + /// + /// + /// If frames is < 0, this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long AudioFramesToMS(MixAudio audio, long frames) => PInvoke.AudioFramesToMS(audio, frames); + + /// + /// Convert milliseconds to sample frames at a specific sample rate. + /// + /// the sample rate to use for conversion. + /// the milliseconds to convert to rate-specific sample frames. + /// + /// Converted number of sample frames, or -1 for errors; call + /// SDL_GetError() for details. + /// + /// + /// + /// If sample_rate is <= 0, this returns -1. If ms is < 0, this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long MSToFrames(int sample_rate, long ms) => PInvoke.MSToFrames(sample_rate, ms); + + /// + /// Convert sample frames, at a specific sample rate, to milliseconds. + /// + /// the sample rate to use for conversion. + /// the rate-specific sample frames to convert to milliseconds. + /// + /// Converted number of milliseconds, or -1 for errors; call + /// SDL_GetError() for details. + /// + /// + /// + /// Sample frames are more precise than milliseconds, so out of necessity, this + /// function will approximate by rounding down to the closest full millisecond. + /// + /// + /// If sample_rate is <= 0, this returns -1. If frames is < 0, this returns + /// -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static long FramesToMS(int sample_rate, long frames) => PInvoke.FramesToMS(sample_rate, frames); + + /// + /// Ergonomic wrapper over MIX_PlayTrack. Throws instead of returning false on failure. + /// + /// the track to start (or restart) mixing. + /// a set of properties that control playback. May be zero. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void PlayTrack(MixTrack track, uint options) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.PlayTrack(track, options) == 0) + { + throw SdlException.FromError("MIX_PlayTrack failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_PlayTag. Throws instead of returning false on failure. + /// + /// the mixer on which to look for tagged tracks. + /// the tag to use when searching for tracks. + /// the set of options that will be applied to each track. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void PlayTag(MixMixer mixer, string tag, uint options) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.PlayTag(mixer, tag, options) == 0) + { + throw SdlException.FromError("MIX_PlayTag failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_PlayAudio. Throws instead of returning false on failure. + /// + /// the mixer on which to play this audio. + /// the audio input to play. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void PlayAudio(MixMixer mixer, MixAudio audio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.PlayAudio(mixer, audio) == 0) + { + throw SdlException.FromError("MIX_PlayAudio failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_StopTrack. Throws instead of returning false on failure. + /// + /// the track to halt. + /// + /// the number of sample frames to spend fading out to + /// silence before halting. 0 to stop immediately. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void StopTrack(MixTrack track, long fade_out_frames) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.StopTrack(track, fade_out_frames) == 0) + { + throw SdlException.FromError("MIX_StopTrack failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_StopAllTracks. Throws instead of returning false on failure. + /// + /// the mixer on which to stop all tracks. + /// + /// the number of milliseconds to spend fading out to + /// silence before halting. 0 to stop immediately. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void StopAllTracks(MixMixer mixer, long fade_out_ms) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.StopAllTracks(mixer, fade_out_ms) == 0) + { + throw SdlException.FromError("MIX_StopAllTracks failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_StopTag. Throws instead of returning false on failure. + /// + /// the mixer on which to stop tracks. + /// the tag to use when searching for tracks. + /// + /// the number of milliseconds to spend fading out to + /// silence before halting. 0 to stop immediately. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void StopTag(MixMixer mixer, string tag, long fade_out_ms) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.StopTag(mixer, tag, fade_out_ms) == 0) + { + throw SdlException.FromError("MIX_StopTag failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_PauseTrack. Throws instead of returning false on failure. + /// + /// the track to pause. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void PauseTrack(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.PauseTrack(track) == 0) + { + throw SdlException.FromError("MIX_PauseTrack failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_PauseAllTracks. Throws instead of returning false on failure. + /// + /// the mixer on which to pause all tracks. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void PauseAllTracks(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.PauseAllTracks(mixer) == 0) + { + throw SdlException.FromError("MIX_PauseAllTracks failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_PauseTag. Throws instead of returning false on failure. + /// + /// the mixer on which to pause tracks. + /// the tag to use when searching for tracks. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void PauseTag(MixMixer mixer, string tag) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.PauseTag(mixer, tag) == 0) + { + throw SdlException.FromError("MIX_PauseTag failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_ResumeTrack. Throws instead of returning false on failure. + /// + /// the track to resume. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void ResumeTrack(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.ResumeTrack(track) == 0) + { + throw SdlException.FromError("MIX_ResumeTrack failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_ResumeAllTracks. Throws instead of returning false on failure. + /// + /// the mixer on which to resume all tracks. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void ResumeAllTracks(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.ResumeAllTracks(mixer) == 0) + { + throw SdlException.FromError("MIX_ResumeAllTracks failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_ResumeTag. Throws instead of returning false on failure. + /// + /// the mixer on which to resume tracks. + /// the tag to use when searching for tracks. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void ResumeTag(MixMixer mixer, string tag) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.ResumeTag(mixer, tag) == 0) + { + throw SdlException.FromError("MIX_ResumeTag failed"); + } + } + + /// + /// Query if a track is currently playing. + /// + /// the track to query. + /// true if playing, false otherwise. + /// + /// + /// If this returns true, the track is currently contributing to the mixer's + /// output (it's "playing"). It is not stopped nor paused. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns false, but there is no mechanism to distinguish errors from + /// non-playing tracks. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + /// + /// + /// + public static bool TrackPlaying(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.TrackPlaying(track) != 0; + } + + /// + /// Query if a track is currently paused. + /// + /// the track to query. + /// true if paused, false otherwise. + /// + /// + /// If this returns true, the track is not currently contributing to the + /// mixer's output but will when resumed (it's "paused"). It is not playing nor + /// stopped. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns false, but there is no mechanism to distinguish errors from + /// non-playing tracks. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + /// + /// + /// + public static bool TrackPaused(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.TrackPaused(track) != 0; + } + + /// + /// Ergonomic wrapper over MIX_SetMixerGain. Throws instead of returning false on failure. + /// + /// the mixer to adjust. + /// the new gain value. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetMixerGain(MixMixer mixer, float gain) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetMixerGain(mixer, gain) == 0) + { + throw SdlException.FromError("MIX_SetMixerGain failed"); + } + } + + /// + /// Get a mixer's master gain control. + /// + /// the mixer to query. + /// the mixer's current master gain. + /// + /// + /// This returns the last value set through MIX_SetMixerGain(), or 1.0f if no + /// value has ever been explicitly set. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public static float GetMixerGain(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetMixerGain(mixer); + } + + /// + /// Ergonomic wrapper over MIX_SetTrackGain. Throws instead of returning false on failure. + /// + /// the track to adjust. + /// the new gain value. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackGain(MixTrack track, float gain) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackGain(track, gain) == 0) + { + throw SdlException.FromError("MIX_SetTrackGain failed"); + } + } + + /// + /// Get a track's gain control. + /// + /// the track to query. + /// the track's current gain. + /// + /// + /// This returns the last value set through MIX_SetTrackGain(), or 1.0f if no + /// value has ever been explicitly set. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public static float GetTrackGain(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackGain(track); + } + + /// + /// Ergonomic wrapper over MIX_SetTagGain. Throws instead of returning false on failure. + /// + /// the mixer on which to look for tagged tracks. + /// the tag to use when searching for tracks. + /// the new gain value. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTagGain(MixMixer mixer, string tag, float gain) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTagGain(mixer, tag, gain) == 0) + { + throw SdlException.FromError("MIX_SetTagGain failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_SetMixerFrequencyRatio. Throws instead of returning false on failure. + /// + /// the mixer to adjust. + /// the frequency ratio. Must be between 0.01f and 100.0f. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetMixerFrequencyRatio(MixMixer mixer, float ratio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetMixerFrequencyRatio(mixer, ratio) == 0) + { + throw SdlException.FromError("MIX_SetMixerFrequencyRatio failed"); + } + } + + /// + /// Get a mixer's master frequency ratio. + /// + /// the mixer to query. + /// the mixer's current master frequency ratio. + /// + /// + /// This returns the last value set through MIX_SetMixerFrequencyRatio(), or + /// 1.0f if no value has ever been explicitly set. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public static float GetMixerFrequencyRatio(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetMixerFrequencyRatio(mixer); + } + + /// + /// Ergonomic wrapper over MIX_SetTrackFrequencyRatio. Throws instead of returning false on failure. + /// + /// the track on which to change the frequency ratio. + /// the frequency ratio. Must be between 0.01f and 100.0f. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackFrequencyRatio(MixTrack track, float ratio) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackFrequencyRatio(track, ratio) == 0) + { + throw SdlException.FromError("MIX_SetTrackFrequencyRatio failed"); + } + } + + /// + /// Query the frequency ratio of a track. + /// + /// the track on which to query the frequency ratio. + /// + /// the current frequency ratio, or 0.0f on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The frequency ratio is used to adjust the rate at which audio data is + /// consumed. Changing this effectively modifies the speed and pitch of the + /// track's audio. A value greater than 1.0f will play the audio faster, and at + /// a higher pitch. A value less than 1.0f will play the audio slower, and at a + /// lower pitch. 1.0f is normal speed. + /// + /// + /// The default value is 1.0f. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns 0.0f. Since this is not a valid value to set, this can be seen as + /// an error state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static float GetTrackFrequencyRatio(MixTrack track) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetTrackFrequencyRatio(track); + } + + /// + /// Ergonomic wrapper over MIX_SetTrackOutputChannelMap. Throws instead of returning false on failure. + /// + /// the track to change. + /// the new channel map, NULL to reset to default. + /// The number of channels in the map. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackOutputChannelMap(MixTrack track, int* chmap, int count) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackOutputChannelMap(track, chmap, count) == 0) + { + throw SdlException.FromError("MIX_SetTrackOutputChannelMap failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_SetTrackStereo. Throws instead of returning false on failure. + /// + /// the track to adjust. + /// the per-channel gains, or NULL to disable spatialization. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackStereo(MixTrack track, MixStereoGains* gains) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackStereo(track, gains) == 0) + { + throw SdlException.FromError("MIX_SetTrackStereo failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_SetTrack3DPosition. Throws instead of returning false on failure. + /// + /// the track for which to set 3D position. + /// the new 3D position for the track. May be NULL. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrack3DPosition(MixTrack track, MixPoint3D* position) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrack3DPosition(track, position) == 0) + { + throw SdlException.FromError("MIX_SetTrack3DPosition failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_GetTrack3DPosition. Throws instead of returning false on failure. + /// + /// the track to query. + /// on successful return, will contain the track's position. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void GetTrack3DPosition(MixTrack track, MixPoint3D* position) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.GetTrack3DPosition(track, position) == 0) + { + throw SdlException.FromError("MIX_GetTrack3DPosition failed"); + } + } + + /// + /// Ergonomic wrapper over MIX_CreateGroup. Throws instead of returning a null handle on failure. + /// + /// the mixer on which to create a mixing group. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixGroup CreateGroup(MixMixer mixer) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + MixGroup result = PInvoke.CreateGroup(mixer); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateGroup failed"); + } + return result; + } + + /// + /// Destroy a mixing group. + /// + /// the mixing group to destroy. + /// + /// + /// Any tracks currently assigned to this group will be reassigned to the + /// mixer's internal default group. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static void DestroyGroup(MixGroup group) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + PInvoke.DestroyGroup(group); + } + + /// + /// Get the properties associated with a group. + /// + /// the group to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// Currently SDL_mixer assigns no properties of its own to a group, but this + /// can be a convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given group. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static uint GetGroupProperties(MixGroup group) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetGroupProperties(group); + } + + /// + /// Ergonomic wrapper over MIX_GetGroupMixer. + /// + /// the group to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public static MixMixer GetGroupMixer(MixGroup group) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.GetGroupMixer(group); + } + + /// + /// Ergonomic wrapper over MIX_SetTrackGroup. Throws instead of returning false on failure. + /// + /// the track to set mixing group assignment. + /// the new mixing group to assign to. May be NULL. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void SetTrackGroup(MixTrack track, MixGroup group) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + if (PInvoke.SetTrackGroup(track, group) == 0) + { + throw SdlException.FromError("MIX_SetTrackGroup failed"); + } + } + + /// + /// Generate mixer output when not driving an audio device. + /// + /// the mixer for which to generate more audio. + /// a pointer to a buffer to store audio in. + /// the number of bytes to store in buffer. + /// + /// The number of bytes of mixed audio, discounting appended silence, + /// on success, or -1 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// SDL_mixer allows the creation of MIX_Mixer objects that are not connected + /// to an audio device, by calling MIX_CreateMixer() instead of + /// MIX_CreateMixerDevice(). Such mixers will not generate output until + /// explicitly requested through this function. + /// + /// + /// The caller may request as much audio as desired, so long as buflen is a + /// multiple of the sample frame size specified when creating the mixer (for + /// example, if requesting stereo Sint16 audio, buflen must be a multiple of 4: + /// 2 bytes-per-channel times 2 channels). + /// + /// + /// The mixer will mix as quickly as possible; since it works in sample frames + /// instead of time, it can potentially generate enormous amounts of audio in a + /// small amount of time. + /// + /// + /// On success, this always fills buffer with buflen bytes of audio; if all + /// playing tracks finish mixing, it will fill the remaining buffer with + /// silence. + /// + /// + /// Each call to this function will pick up where it left off, playing tracks + /// will continue to mix from the point the previous call completed, etc. The + /// mixer state can be changed between each call in any way desired: tracks can + /// be added, played, stopped, changed, removed, etc. Effectively this function + /// does the same thing SDL_mixer does internally when the audio device needs + /// more audio to play. + /// + /// + /// This function can not be used with mixers from MIX_CreateMixerDevice(); + /// those generate audio as needed internally. + /// + /// + /// This function returns the number of bytes of real audio mixed, which + /// might be less than buflen. While all buflen bytes of buffer will be + /// initialized, if available tracks to mix run out, the end of the buffer will + /// be initialized with silence; this silence will not be counted in the return + /// value, so the caller has the option to identify how much of the buffer has + /// legimitate contents vs appended silence. As such, any value >= 0 signifies + /// success. A return value of -1 means failure (out of memory, invalid + /// parameters, etc). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static int Generate(MixMixer mixer, void* buffer, int buflen) + { + SdlMixer.ExceptionAggregator.CheckExceptions(); + return PInvoke.Generate(mixer, buffer, buflen); + } + + /// + /// Ergonomic wrapper over MIX_CreateAudioDecoder. Throws instead of returning a null handle on + /// failure. + /// + /// the path on the filesystem from which to load data. + /// decoder-specific properties. May be zero. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudioDecoder CreateAudioDecoder(string path, uint props) + { + MixAudioDecoder result = PInvoke.CreateAudioDecoder(path, props); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateAudioDecoder failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over MIX_CreateAudioDecoder_IO. Throws instead of returning a null handle on + /// failure. + /// + /// the i/o stream from which to load data. + /// if true, close the i/o stream when done with it. + /// decoder-specific properties. May be zero. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static MixAudioDecoder CreateAudioDecoderIO(nint io, bool closeio, uint props) + { + MixAudioDecoder result = PInvoke.CreateAudioDecoderIO(io, closeio ? (byte)1 : (byte)0, props); + if (result.IsNull()) + { + throw SdlException.FromError("MIX_CreateAudioDecoder_IO failed"); + } + return result; + } + + /// + /// Destroy the specified audio decoder. + /// + /// the audio to destroy. + /// + /// + /// Destroying a NULL MIX_AudioDecoder is a legal no-op. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static void DestroyAudioDecoder(MixAudioDecoder audiodecoder) => + PInvoke.DestroyAudioDecoder(audiodecoder); + + /// + /// Get the properties associated with a MIX_AudioDecoder. + /// + /// the audio decoder to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// SDL_mixer offers some properties of its own, but this can also be a + /// convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given MIX_AudioDecoder, if necessary. + /// + /// + /// The file-specific metadata exposed through this function is identical to + /// those available through MIX_GetAudioProperties(). Please refer to that + /// function's documentation for details. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public static uint GetAudioDecoderProperties(MixAudioDecoder audiodecoder) => + PInvoke.GetAudioDecoderProperties(audiodecoder); + + /// + /// Ergonomic wrapper over MIX_GetAudioDecoderFormat. Throws instead of returning false on failure. + /// + /// the audio decoder to query. + /// on success, audio format details will be stored here. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void GetAudioDecoderFormat(MixAudioDecoder audiodecoder, SdlAudioSpec* spec) + { + if (PInvoke.GetAudioDecoderFormat(audiodecoder, spec) == 0) + { + throw SdlException.FromError("MIX_GetAudioDecoderFormat failed"); + } + } + + /// + /// Decode more audio from a MIX_AudioDecoder. + /// + /// the decoder from which to retrieve more data. + /// the memory buffer to store decoded audio. + /// the maximum number of bytes to store to buffer. + /// the format that audio data will be stored to buffer. + /// + /// number of bytes decoded, or -1 on error; call SDL_GetError() for + /// more information. + /// + /// + /// + /// Data is decoded on demand in whatever format is requested. The format is + /// permitted to change between calls. + /// + /// + /// This function will return the number of bytes decoded, which may be less + /// than requested if there was an error or end-of-file. A return value of zero + /// means the entire file was decoded, -1 means an unrecoverable error + /// happened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public static int DecodeAudio(MixAudioDecoder audiodecoder, void* buffer, int buflen, SdlAudioSpec* spec) => + PInvoke.DecodeAudio(audiodecoder, buffer, buflen, spec); + } +} diff --git a/Brutal.Sdl.Mixer/Generated/SdlMixer.Constants.gen.cs b/Brutal.Sdl.Mixer/Generated/SdlMixer.Constants.gen.cs new file mode 100644 index 0000000..5142933 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/SdlMixer.Constants.gen.cs @@ -0,0 +1,46 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Mixer +{ + public static unsafe partial class SdlMixer + { + public static class Constants + { + public const int DurationInfinite = -2; + public const int DurationUnknown = -1; + public const string PropAudioDecoderString = "SDL_mixer.audio.decoder"; + public const string PropAudioLoadCloseioBoolean = "SDL_mixer.audio.load.closeio"; + public const string PropAudioLoadIgnoreLoopsBoolean = "SDL_mixer.audio.load.ignore_loops"; + public const string PropAudioLoadIostreamPointer = "SDL_mixer.audio.load.iostream"; + public const string PropAudioLoadPredecodeBoolean = "SDL_mixer.audio.load.predecode"; + public const string PropAudioLoadPreferredMixerPointer = "SDL_mixer.audio.load.preferred_mixer"; + public const string PropAudioLoadSkipMetadataTagsBoolean = "SDL_mixer.audio.load.skip_metadata_tags"; + public const string PropMetadataAlbumString = "SDL_mixer.metadata.album"; + public const string PropMetadataArtistString = "SDL_mixer.metadata.artist"; + public const string PropMetadataCopyrightString = "SDL_mixer.metadata.copyright"; + public const string PropMetadataDurationFramesNumber = "SDL_mixer.metadata.duration_frames"; + public const string PropMetadataDurationInfiniteBoolean = "SDL_mixer.metadata.duration_infinite"; + public const string PropMetadataTitleString = "SDL_mixer.metadata.title"; + public const string PropMetadataTotalTracksNumber = "SDL_mixer.metadata.total_tracks"; + public const string PropMetadataTrackNumber = "SDL_mixer.metadata.track"; + public const string PropMetadataYearNumber = "SDL_mixer.metadata.year"; + public const string PropMixerDeviceNumber = "SDL_mixer.mixer.device"; + public const string PropPlayAppendSilenceFramesNumber = "SDL_mixer.play.append_silence_frames"; + public const string PropPlayAppendSilenceMillisecondsNumber = "SDL_mixer.play.append_silence_milliseconds"; + public const string PropPlayFadeInFramesNumber = "SDL_mixer.play.fade_in_frames"; + public const string PropPlayFadeInMillisecondsNumber = "SDL_mixer.play.fade_in_milliseconds"; + public const string PropPlayFadeInStartGainFloat = "SDL_mixer.play.fade_in_start_gain"; + public const string PropPlayHaltWhenExhaustedBoolean = "SDL_mixer.play.halt_when_exhausted"; + public const string PropPlayLoopsNumber = "SDL_mixer.play.loops"; + public const string PropPlayLoopStartFrameNumber = "SDL_mixer.play.loop_start_frame"; + public const string PropPlayLoopStartMillisecondNumber = "SDL_mixer.play.loop_start_millisecond"; + public const string PropPlayMaxFrameNumber = "SDL_mixer.play.max_frame"; + public const string PropPlayMaxMillisecondsNumber = "SDL_mixer.play.max_milliseconds"; + public const string PropPlayStartFrameNumber = "SDL_mixer.play.start_frame"; + public const string PropPlayStartMillisecondNumber = "SDL_mixer.play.start_millisecond"; + public const string PropPlayStartOrderNumber = "SDL_mixer.play.start_order"; + } + } +} diff --git a/Brutal.Sdl.Mixer/Generated/SdlMixer.Delegates.gen.cs b/Brutal.Sdl.Mixer/Generated/SdlMixer.Delegates.gen.cs new file mode 100644 index 0000000..ad1e845 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/SdlMixer.Delegates.gen.cs @@ -0,0 +1,36 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Mixer +{ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void MixTrackStoppedCallback(void* userdata, MixTrack track); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void MixTrackMixCallback( + void* userdata, + MixTrack track, + SdlAudioSpec* spec, + float* pcm, + int samples + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void MixGroupMixCallback( + void* userdata, + MixGroup group, + SdlAudioSpec* spec, + float* pcm, + int samples + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void MixPostMixCallback( + void* userdata, + MixMixer mixer, + SdlAudioSpec* spec, + float* pcm, + int samples + ); +} diff --git a/Brutal.Sdl.Mixer/Generated/SdlMixer.HandleMethods.gen.cs b/Brutal.Sdl.Mixer/Generated/SdlMixer.HandleMethods.gen.cs new file mode 100644 index 0000000..c6e3093 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/SdlMixer.HandleMethods.gen.cs @@ -0,0 +1,1471 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Mixer +{ + public readonly unsafe partial struct MixAudio + { + /// + /// Convert sample frames for a MIX_Audio's format to milliseconds. + /// + /// the audio-specific sample frames to convert to milliseconds. + /// + /// Converted number of milliseconds, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the audio's initial format, even if the + /// format would change mid-stream. + /// + /// + /// Sample frames are more precise than milliseconds, so out of necessity, this + /// function will approximate by rounding down to the closest full millisecond. + /// + /// + /// If frames is < 0, this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public long FramesToMS(long frames) => SdlMixer.AudioFramesToMS(this, frames); + + /// + /// Convert milliseconds to sample frames for a MIX_Audio's format. + /// + /// the milliseconds to convert to audio-specific sample frames. + /// + /// Converted number of sample frames, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the audio's initial format, even if the + /// format would change mid-stream. + /// + /// + /// If ms is < 0, this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public long MSToFrames(long ms) => SdlMixer.AudioMSToFrames(this, ms); + + /// + /// Destroy the specified audio. + /// + /// + /// + /// MIX_Audio is reference-counted internally, so this function only unrefs it. + /// If doing so causes the reference count to drop to zero, the MIX_Audio will + /// be deallocated. This allows the system to safely operate if the audio is + /// still assigned to a MIX_Track at the time of destruction. The actual + /// destroying will happen when the track stops using it. + /// + /// + /// But from the caller's perspective, once this function is called, it should + /// assume the audio pointer has become invalid. + /// + /// + /// Destroying a NULL MIX_Audio is a legal no-op. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + SdlMixer.DestroyAudio(this); + } + + /// + /// Get the length of a MIX_Audio's playback in sample frames. + /// + /// + /// the length of the audio in sample frames, or MIX_DURATION_UNKNOWN + /// or MIX_DURATION_INFINITE. + /// + /// + /// + /// This information is also available via the + /// MIX_PROP_METADATA_DURATION_FRAMES_NUMBER property, but it's common enough + /// to provide a simple accessor function. + /// + /// + /// This reports the length of the data in sample frames, so sample-perfect + /// mixing can be possible. Sample frames are only meaningful as a measure of + /// time if the sample rate (frequency) is also known. To convert from sample + /// frames to milliseconds, use MIX_AudioFramesToMS(). + /// + /// + /// Not all audio file formats can report the complete length of the data they + /// will produce through decoding: some can't calculate it, some might produce + /// infinite audio. + /// + /// + /// Also, some file formats can only report duration as a unit of time, which + /// means SDL_mixer might have to estimate sample frames from that information. + /// With less precision, the reported duration might be off by a few sample + /// frames in either direction. + /// + /// + /// This will return a value >= 0 if a duration is known. It might also return + /// MIX_DURATION_UNKNOWN or MIX_DURATION_INFINITE. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public long GetDuration() => SdlMixer.GetAudioDuration(this); + + /// + /// Ergonomic wrapper over MIX_GetAudioFormat. Throws instead of returning false on failure. + /// + /// on success, audio format details will be stored here. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void GetFormat(SdlAudioSpec* spec) => SdlMixer.GetAudioFormat(this, spec); + + /// + /// Get the properties associated with a MIX_Audio. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// SDL_mixer offers some properties of its own, but this can also be a + /// convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given MIX_Audio, if necessary. + /// + /// + /// The following read-only properties are provided by SDL_mixer: + /// + /// + /// - MIX_PROP_METADATA_TITLE_STRING: the audio's title ("Smells Like Teen + /// Spirit"). + /// - MIX_PROP_METADATA_ARTIST_STRING: the audio's artist name ("Nirvana"). + /// - MIX_PROP_METADATA_ALBUM_STRING: the audio's album name ("Nevermind"). + /// - MIX_PROP_METADATA_COPYRIGHT_STRING: the audio's copyright info + /// ("Copyright (c) 1991") + /// - MIX_PROP_METADATA_TRACK_NUMBER: the audio's track number on the album + /// (1) + /// - MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER: the total tracks on the album + /// (13) + /// - MIX_PROP_METADATA_YEAR_NUMBER: the year the audio was released (1991) + /// - MIX_PROP_METADATA_DURATION_FRAMES_NUMBER: The sample frames worth of + /// PCM data that comprise this audio. It might be off by a little if the + /// decoder only knows the duration as a unit of time. + /// - MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN: if true, audio never runs + /// out of sound to generate. This isn't necessarily always known to + /// SDL_mixer, though. + /// + /// + /// Other properties, documented with MIX_LoadAudioWithProperties(), may also + /// be present. + /// + /// + /// Note that the metadata properties are whatever SDL_mixer finds in things + /// like ID3 tags, and they often have very little standardized formatting, may + /// be missing, and can be completely wrong if the original data is + /// untrustworthy (like an MP3 from a P2P file sharing service). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public uint GetProperties() => SdlMixer.GetAudioProperties(this); + } + + public readonly unsafe partial struct MixAudioDecoder + { + /// + /// Decode more audio from a MIX_AudioDecoder. + /// + /// the memory buffer to store decoded audio. + /// the maximum number of bytes to store to buffer. + /// the format that audio data will be stored to buffer. + /// + /// number of bytes decoded, or -1 on error; call SDL_GetError() for + /// more information. + /// + /// + /// + /// Data is decoded on demand in whatever format is requested. The format is + /// permitted to change between calls. + /// + /// + /// This function will return the number of bytes decoded, which may be less + /// than requested if there was an error or end-of-file. A return value of zero + /// means the entire file was decoded, -1 means an unrecoverable error + /// happened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public int DecodeAudio(void* buffer, int buflen, SdlAudioSpec* spec) => + SdlMixer.DecodeAudio(this, buffer, buflen, spec); + + /// + /// Destroy the specified audio decoder. + /// + /// + /// + /// Destroying a NULL MIX_AudioDecoder is a legal no-op. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + SdlMixer.DestroyAudioDecoder(this); + } + + /// + /// Ergonomic wrapper over MIX_GetAudioDecoderFormat. Throws instead of returning false on failure. + /// + /// on success, audio format details will be stored here. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void GetFormat(SdlAudioSpec* spec) => SdlMixer.GetAudioDecoderFormat(this, spec); + + /// + /// Get the properties associated with a MIX_AudioDecoder. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// SDL_mixer offers some properties of its own, but this can also be a + /// convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given MIX_AudioDecoder, if necessary. + /// + /// + /// The file-specific metadata exposed through this function is identical to + /// those available through MIX_GetAudioProperties(). Please refer to that + /// function's documentation for details. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public uint GetProperties() => SdlMixer.GetAudioDecoderProperties(this); + } + + public readonly unsafe partial struct MixGroup + { + /// + /// Destroy a mixing group. + /// + /// + /// + /// Any tracks currently assigned to this group will be reassigned to the + /// mixer's internal default group. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + SdlMixer.DestroyGroup(this); + } + + /// + /// Ergonomic wrapper over MIX_GetGroupMixer. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public MixMixer GetMixer() => SdlMixer.GetGroupMixer(this); + + /// + /// Get the properties associated with a group. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// Currently SDL_mixer assigns no properties of its own to a group, but this + /// can be a convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given group. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public uint GetProperties() => SdlMixer.GetGroupProperties(this); + } + + public readonly unsafe partial struct MixMixer + { + /// + /// Ergonomic wrapper over MIX_CreateGroup. Throws instead of returning a null handle on failure. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixGroup CreateGroup() => SdlMixer.CreateGroup(this); + + /// + /// Ergonomic wrapper over MIX_CreateSineWaveAudio. Throws instead of returning a null handle on + /// failure. + /// + /// the sinewave's frequency in Hz. + /// the sinewave's amplitude from 0.0f to 1.0f. + /// + /// the maximum number of milliseconds of audio to generate, or less + /// than zero to generate infinite audio. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio CreateSineWaveAudio(int hz, float amplitude, long ms) => + SdlMixer.CreateSineWaveAudio(this, hz, amplitude, ms); + + /// + /// Ergonomic wrapper over MIX_CreateTrack. Throws instead of returning a null handle on failure. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixTrack CreateTrack() => SdlMixer.CreateTrack(this); + + /// + /// Free a mixer. + /// + /// + /// + /// If this mixer was created with MIX_CreateMixerDevice(), this function will + /// also close the audio device and call SDL_QuitSubSystem(SDL_INIT_AUDIO). + /// + /// + /// Any MIX_Group or MIX_Track created for this mixer will also be destroyed. + /// Do not access them again or attempt to destroy them after the device is + /// destroyed. MIX_Audio objects will not be destroyed, since they can be + /// shared between mixers (but those will all be destroyed during MIX_Quit()). + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// If this is used with a MIX_Mixer from MIX_CreateMixerDevice, + /// then this function should only be called on the main thread. + /// If this is used with a MIX_Mixer from MIX_CreateMixer, then + /// it is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + SdlMixer.DestroyMixer(this); + } + + /// + /// Generate mixer output when not driving an audio device. + /// + /// a pointer to a buffer to store audio in. + /// the number of bytes to store in buffer. + /// + /// The number of bytes of mixed audio, discounting appended silence, + /// on success, or -1 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// SDL_mixer allows the creation of MIX_Mixer objects that are not connected + /// to an audio device, by calling MIX_CreateMixer() instead of + /// MIX_CreateMixerDevice(). Such mixers will not generate output until + /// explicitly requested through this function. + /// + /// + /// The caller may request as much audio as desired, so long as buflen is a + /// multiple of the sample frame size specified when creating the mixer (for + /// example, if requesting stereo Sint16 audio, buflen must be a multiple of 4: + /// 2 bytes-per-channel times 2 channels). + /// + /// + /// The mixer will mix as quickly as possible; since it works in sample frames + /// instead of time, it can potentially generate enormous amounts of audio in a + /// small amount of time. + /// + /// + /// On success, this always fills buffer with buflen bytes of audio; if all + /// playing tracks finish mixing, it will fill the remaining buffer with + /// silence. + /// + /// + /// Each call to this function will pick up where it left off, playing tracks + /// will continue to mix from the point the previous call completed, etc. The + /// mixer state can be changed between each call in any way desired: tracks can + /// be added, played, stopped, changed, removed, etc. Effectively this function + /// does the same thing SDL_mixer does internally when the audio device needs + /// more audio to play. + /// + /// + /// This function can not be used with mixers from MIX_CreateMixerDevice(); + /// those generate audio as needed internally. + /// + /// + /// This function returns the number of bytes of real audio mixed, which + /// might be less than buflen. While all buflen bytes of buffer will be + /// initialized, if available tracks to mix run out, the end of the buffer will + /// be initialized with silence; this silence will not be counted in the return + /// value, so the caller has the option to identify how much of the buffer has + /// legimitate contents vs appended silence. As such, any value >= 0 signifies + /// success. A return value of -1 means failure (out of memory, invalid + /// parameters, etc). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public int Generate(void* buffer, int buflen) => SdlMixer.Generate(this, buffer, buflen); + + /// + /// Ergonomic wrapper over MIX_GetMixerFormat. Throws instead of returning false on failure. + /// + /// where to store the mixer audio format. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void GetFormat(SdlAudioSpec* spec) => SdlMixer.GetMixerFormat(this, spec); + + /// + /// Get a mixer's master frequency ratio. + /// + /// the mixer's current master frequency ratio. + /// + /// + /// This returns the last value set through MIX_SetMixerFrequencyRatio(), or + /// 1.0f if no value has ever been explicitly set. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public float GetFrequencyRatio() => SdlMixer.GetMixerFrequencyRatio(this); + + /// + /// Get a mixer's master gain control. + /// + /// the mixer's current master gain. + /// + /// + /// This returns the last value set through MIX_SetMixerGain(), or 1.0f if no + /// value has ever been explicitly set. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public float GetGain() => SdlMixer.GetMixerGain(this); + + /// + /// Get the properties associated with a mixer. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL_mixer: + /// + /// + /// - MIX_PROP_MIXER_DEVICE_NUMBER: the SDL_AudioDeviceID that this mixer has + /// opened for playback. This will be zero (no device) if the mixer was + /// created with Mix_CreateMixer() instead of Mix_CreateMixerDevice(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public uint GetProperties() => SdlMixer.GetMixerProperties(this); + + /// + /// Ergonomic wrapper over MIX_GetTaggedTracks. + /// + /// the tag to search. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. Each element is a + /// borrowed handle: it is owned by SDL, not created by this call, and must not be disposed. Do not + /// call on any element. + /// + public MixTrack[] GetTaggedTracks(string tag) => SdlMixer.GetTaggedTracks(this, tag); + + /// + /// Ergonomic wrapper over MIX_LoadAudio. Throws instead of returning a null handle on failure. + /// + /// the path on the filesystem to load data from. + /// if true, data will be fully uncompressed before returning. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio LoadAudio(string path, bool predecode) => SdlMixer.LoadAudio(this, path, predecode); + + /// + /// Ergonomic wrapper over MIX_LoadAudio_IO. Throws instead of returning a null handle on failure. + /// + /// the SDL_IOStream to load data from. + /// if true, data will be fully uncompressed before returning. + /// + /// true if SDL_mixer should close io before returning + /// (success or failure). + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio LoadAudioIO(nint io, bool predecode, bool closeio) => + SdlMixer.LoadAudioIO(this, io, predecode, closeio); + + /// + /// Ergonomic wrapper over MIX_LoadAudioNoCopy. Throws instead of returning a null handle on failure. + /// + /// the buffer where the audio data lives. + /// the size, in bytes, of the buffer. + /// + /// if true, data will be given to SDL_free() when the + /// MIX_Audio is destroyed. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio LoadAudioNoCopy(void* data, nuint datalen, bool free_when_done) => + SdlMixer.LoadAudioNoCopy(this, data, datalen, free_when_done); + + /// + /// Ergonomic wrapper over MIX_LoadRawAudio. Throws instead of returning a null handle on failure. + /// + /// the raw PCM data to load. + /// the size, in bytes, of the raw PCM data. + /// what format the raw data is in. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio LoadRawAudio(void* data, nuint datalen, SdlAudioSpec* spec) => + SdlMixer.LoadRawAudio(this, data, datalen, spec); + + /// + /// Ergonomic wrapper over MIX_LoadRawAudio_IO. Throws instead of returning a null handle on failure. + /// + /// the SDL_IOStream to load data from. + /// what format the raw data is in. + /// + /// true if SDL_mixer should close io before returning + /// (success or failure). + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio LoadRawAudioIO(nint io, SdlAudioSpec* spec, bool closeio) => + SdlMixer.LoadRawAudioIO(this, io, spec, closeio); + + /// + /// Ergonomic wrapper over MIX_LoadRawAudioNoCopy. Throws instead of returning a null handle on + /// failure. + /// + /// the buffer where the raw PCM data lives. + /// the size, in bytes, of the buffer. + /// what format the raw data is in. + /// + /// if true, data will be given to SDL_free() when the + /// MIX_Audio is destroyed. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public MixAudio LoadRawAudioNoCopy(void* data, nuint datalen, SdlAudioSpec* spec, bool free_when_done) => + SdlMixer.LoadRawAudioNoCopy(this, data, datalen, spec, free_when_done); + + /// + /// Lock a mixer by obtaining its internal mutex. + /// + /// + /// + /// While locked, the mixer will not be able to mix more audio or change its + /// internal state in another thread. Those other threads will block until the + /// mixer is unlocked again. + /// + /// + /// Under the hood, this function calls SDL_LockMutex(), so all the same rules + /// apply: the lock can be recursive, it must be unlocked the same number of + /// times from the same thread that locked it, etc. + /// + /// + /// Just about every SDL_mixer API also locks the mixer while doing its work, + /// as does the SDL audio device thread while actual mixing is in progress, so + /// basic use of this library never requires the app to explicitly lock the + /// device to be thread safe. There are two scenarios where this can be useful, + /// however: + /// + /// + /// - The app has a provided a callback that the mixing thread might call, and + /// there is some app state that needs to be protected against race + /// conditions as changes are made and mixing progresses simultaneously. Any + /// lock can be used for this, but this is a conveniently-available lock. + /// - The app wants to make multiple, atomic changes to the mix. For example, + /// to start several tracks at the exact same moment, one would lock the + /// mixer, call MIX_PlayTrack multiple times, and then unlock again; all the + /// tracks will start mixing on the same sample frame. + /// + /// + /// Each call to this function must be paired with a call to MIX_UnlockMixer + /// from the same thread. It is safe to lock a mixer multiple times; it remains + /// locked until the final matching unlock call. + /// + /// + /// Do not lock the mixer for significant amounts of time, or it can cause + /// audio dropouts. Just do simple things quickly and unlock again. + /// + /// + /// Locking a NULL mixer is a safe no-op. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public void Lock() => SdlMixer.LockMixer(this); + + /// + /// Ergonomic wrapper over MIX_PauseAllTracks. Throws instead of returning false on failure. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void PauseAllTracks() => SdlMixer.PauseAllTracks(this); + + /// + /// Ergonomic wrapper over MIX_PauseTag. Throws instead of returning false on failure. + /// + /// the tag to use when searching for tracks. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void PauseTag(string tag) => SdlMixer.PauseTag(this, tag); + + /// + /// Ergonomic wrapper over MIX_PlayAudio. Throws instead of returning false on failure. + /// + /// the audio input to play. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void PlayAudio(MixAudio audio) => SdlMixer.PlayAudio(this, audio); + + /// + /// Ergonomic wrapper over MIX_PlayTag. Throws instead of returning false on failure. + /// + /// the tag to use when searching for tracks. + /// the set of options that will be applied to each track. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void PlayTag(string tag, uint options) => SdlMixer.PlayTag(this, tag, options); + + /// + /// Ergonomic wrapper over MIX_ResumeAllTracks. Throws instead of returning false on failure. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void ResumeAllTracks() => SdlMixer.ResumeAllTracks(this); + + /// + /// Ergonomic wrapper over MIX_ResumeTag. Throws instead of returning false on failure. + /// + /// the tag to use when searching for tracks. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void ResumeTag(string tag) => SdlMixer.ResumeTag(this, tag); + + /// + /// Ergonomic wrapper over MIX_SetMixerFrequencyRatio. Throws instead of returning false on failure. + /// + /// the frequency ratio. Must be between 0.01f and 100.0f. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetFrequencyRatio(float ratio) => SdlMixer.SetMixerFrequencyRatio(this, ratio); + + /// + /// Ergonomic wrapper over MIX_SetMixerGain. Throws instead of returning false on failure. + /// + /// the new gain value. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetGain(float gain) => SdlMixer.SetMixerGain(this, gain); + + /// + /// Ergonomic wrapper over MIX_SetTagGain. Throws instead of returning false on failure. + /// + /// the tag to use when searching for tracks. + /// the new gain value. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetTagGain(string tag, float gain) => SdlMixer.SetTagGain(this, tag, gain); + + /// + /// Ergonomic wrapper over MIX_StopAllTracks. Throws instead of returning false on failure. + /// + /// + /// the number of milliseconds to spend fading out to + /// silence before halting. 0 to stop immediately. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void StopAllTracks(long fade_out_ms) => SdlMixer.StopAllTracks(this, fade_out_ms); + + /// + /// Ergonomic wrapper over MIX_StopTag. Throws instead of returning false on failure. + /// + /// the tag to use when searching for tracks. + /// + /// the number of milliseconds to spend fading out to + /// silence before halting. 0 to stop immediately. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void StopTag(string tag, long fade_out_ms) => SdlMixer.StopTag(this, tag, fade_out_ms); + + /// + /// Unlock a mixer previously locked by a call to MIX_LockMixer(). + /// + /// + /// + /// While locked, the mixer will not be able to mix more audio or change its + /// internal state another thread. Those other threads will block until the + /// mixer is unlocked again. + /// + /// + /// Under the hood, this function calls SDL_LockMutex(), so all the same rules + /// apply: the lock can be recursive, it must be unlocked the same number of + /// times from the same thread that locked it, etc. + /// + /// + /// Unlocking a NULL mixer is a safe no-op. + /// + /// + /// + /// This call must be paired with a previous MIX_LockMixer call + /// on the same thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public void Unlock() => SdlMixer.UnlockMixer(this); + } + + public readonly unsafe partial struct MixTrack + { + /// + /// Destroy the specified track. + /// + /// + /// + /// If the track is currently playing, it will be stopped immediately, without + /// any fadeout. If there is a callback set through + /// MIX_SetTrackStoppedCallback(), it will not be called. + /// + /// + /// If the mixer is currently mixing in another thread, this will block until + /// it finishes. Destroying a track from the mixer thread itself (during a + /// callback) will cause it to be destroyed as soon as this iteration of the + /// mixer thread is not using it; in this scenario, destroying a track and then + /// making futher changes to it is considered undefined behavior. + /// + /// + /// Destroying a NULL MIX_Track is a legal no-op. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + SdlMixer.DestroyTrack(this); + } + + /// + /// Ergonomic wrapper over MIX_GetTrack3DPosition. Throws instead of returning false on failure. + /// + /// on successful return, will contain the track's position. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void GetTrack3DPosition(MixPoint3D* position) => SdlMixer.GetTrack3DPosition(this, position); + + /// + /// Ergonomic wrapper over MIX_GetTrackAudio. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public MixAudio GetAudio() => SdlMixer.GetTrackAudio(this); + + /// + /// Ergonomic wrapper over MIX_GetTrackAudioStream. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlAudioStream GetAudioStream() => SdlMixer.GetTrackAudioStream(this); + + /// + /// Query whether a given track is fading. + /// + /// + /// less than 0 if the track is fading out, greater than 0 if fading + /// in, zero otherwise. + /// + /// + /// + /// This specifically checks if the track is not stopped (paused or playing), + /// and it is fading in or out, and returns the number of frames remaining in + /// the fade. + /// + /// + /// If fading out, the returned value will be negative. When fading in, the + /// returned value will be positive. If not fading, this function returns zero. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns 0, but there is no mechanism to distinguish errors from tracks that + /// aren't fading. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public long GetFadeFrames() => SdlMixer.GetTrackFadeFrames(this); + + /// + /// Query the frequency ratio of a track. + /// + /// + /// the current frequency ratio, or 0.0f on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The frequency ratio is used to adjust the rate at which audio data is + /// consumed. Changing this effectively modifies the speed and pitch of the + /// track's audio. A value greater than 1.0f will play the audio faster, and at + /// a higher pitch. A value less than 1.0f will play the audio slower, and at a + /// lower pitch. 1.0f is normal speed. + /// + /// + /// The default value is 1.0f. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns 0.0f. Since this is not a valid value to set, this can be seen as + /// an error state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public float GetFrequencyRatio() => SdlMixer.GetTrackFrequencyRatio(this); + + /// + /// Get a track's gain control. + /// + /// the track's current gain. + /// + /// + /// This returns the last value set through MIX_SetTrackGain(), or 1.0f if no + /// value has ever been explicitly set. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + public float GetGain() => SdlMixer.GetTrackGain(this); + + /// + /// Query how many loops remain for a given track. + /// + /// + /// the number of pending loops, zero if not looping, and -1 if + /// looping infinitely. + /// + /// + /// + /// This returns the number of loops still pending; if a track will eventually + /// complete and loop to play again one more time, this will return 1. If a + /// track was looping but is on its final iteration of the loop (will stop + /// when this iteration completes), this will return zero. + /// + /// + /// A track that is looping infinitely will return -1. This value does not + /// report an error in this case. + /// + /// + /// A track that is stopped (not playing and not paused) will have zero loops + /// remaining. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns zero, but there is no mechanism to distinguish errors from + /// non-looping tracks. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public int GetLoops() => SdlMixer.GetTrackLoops(this); + + /// + /// Ergonomic wrapper over MIX_GetTrackMixer. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public MixMixer GetMixer() => SdlMixer.GetTrackMixer(this); + + /// + /// Get the current input position of a playing track. + /// + /// + /// the track's current sample frame position, or -1 on error; call + /// SDL_GetError() for details. + /// + /// + /// + /// (Not to be confused with MIX_GetTrack3DPosition(), which is positioning of + /// the track in 3D space, not the playback position of its audio data.) + /// + /// + /// Position is defined in sample frames of decoded audio, not units of time, + /// so that sample-perfect mixing can be achieved. To instead operate in units + /// of time, use MIX_TrackFramesToMS() to convert the return value to + /// milliseconds. + /// + /// + /// Stopped and paused tracks will report the position when they halted. + /// Playing tracks will report the current position, which will change over + /// time. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public long GetPlaybackPosition() => SdlMixer.GetTrackPlaybackPosition(this); + + /// + /// Get the properties associated with a track. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// Currently SDL_mixer assigns no properties of its own to a track, but this + /// can be a convenient place to store app-specific data. + /// + /// + /// A SDL_PropertiesID is created the first time this function is called for a + /// given track. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public uint GetProperties() => SdlMixer.GetTrackProperties(this); + + /// + /// Return the number of sample frames remaining to be mixed in a track. + /// + /// the total sample frames still to be mixed, or -1 if unknown. + /// + /// + /// If the track is playing or paused, and its total duration is known, this + /// will report how much audio is left to mix. If the track is playing, future + /// calls to this function will report different values. + /// + /// + /// Remaining audio is defined in sample frames of decoded audio, not units + /// of time, so that sample-perfect mixing can be achieved. To instead operate + /// in units of time, use MIX_TrackFramesToMS() to convert the return value to + /// milliseconds. + /// + /// + /// This function does not take into account fade-outs or looping, just the + /// current mixing position vs the duration of the track. + /// + /// + /// If the duration of the track isn't known, or track is NULL, this function + /// returns -1. A stopped track reports 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + public long GetRemaining() => SdlMixer.GetTrackRemaining(this); + + /// + /// Ergonomic wrapper over MIX_GetTrackTags. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. + /// + public string[] GetTags() => SdlMixer.GetTrackTags(this); + + /// + /// Ergonomic wrapper over MIX_PauseTrack. Throws instead of returning false on failure. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void Pause() => SdlMixer.PauseTrack(this); + + /// + /// Ergonomic wrapper over MIX_PlayTrack. Throws instead of returning false on failure. + /// + /// a set of properties that control playback. May be zero. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void Play(uint options) => SdlMixer.PlayTrack(this, options); + + /// + /// Ergonomic wrapper over MIX_ResumeTrack. Throws instead of returning false on failure. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void Resume() => SdlMixer.ResumeTrack(this); + + /// + /// Ergonomic wrapper over MIX_SetTrack3DPosition. Throws instead of returning false on failure. + /// + /// the new 3D position for the track. May be NULL. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetTrack3DPosition(MixPoint3D* position) => SdlMixer.SetTrack3DPosition(this, position); + + /// + /// Ergonomic wrapper over MIX_SetTrackAudio. Throws instead of returning false on failure. + /// + /// the new audio input to set. May be NULL. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetAudio(MixAudio audio) => SdlMixer.SetTrackAudio(this, audio); + + /// + /// Ergonomic wrapper over MIX_SetTrackAudioStream. Throws instead of returning false on failure. + /// + /// the audio stream to use as the track's input. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetAudioStream(SdlAudioStream stream) => SdlMixer.SetTrackAudioStream(this, stream); + + /// + /// Ergonomic wrapper over MIX_SetTrackFrequencyRatio. Throws instead of returning false on failure. + /// + /// the frequency ratio. Must be between 0.01f and 100.0f. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetFrequencyRatio(float ratio) => SdlMixer.SetTrackFrequencyRatio(this, ratio); + + /// + /// Ergonomic wrapper over MIX_SetTrackGain. Throws instead of returning false on failure. + /// + /// the new gain value. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetGain(float gain) => SdlMixer.SetTrackGain(this, gain); + + /// + /// Ergonomic wrapper over MIX_SetTrackGroup. Throws instead of returning false on failure. + /// + /// the new mixing group to assign to. May be NULL. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetGroup(MixGroup group) => SdlMixer.SetTrackGroup(this, group); + + /// + /// Ergonomic wrapper over MIX_SetTrackIOStream. Throws instead of returning false on failure. + /// + /// the new i/o stream to use as the track's input. + /// if true, close the stream when done with it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetIOStream(nint io, bool closeio) => SdlMixer.SetTrackIOStream(this, io, closeio); + + /// + /// Ergonomic wrapper over MIX_SetTrackLoops. Throws instead of returning false on failure. + /// + /// + /// new number of times to loop. Zero to disable looping, -1 + /// to loop infinitely. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetLoops(int num_loops) => SdlMixer.SetTrackLoops(this, num_loops); + + /// + /// Ergonomic wrapper over MIX_SetTrackOutputChannelMap. Throws instead of returning false on failure. + /// + /// the new channel map, NULL to reset to default. + /// The number of channels in the map. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetOutputChannelMap(int* chmap, int count) => SdlMixer.SetTrackOutputChannelMap(this, chmap, count); + + /// + /// Ergonomic wrapper over MIX_SetTrackPlaybackPosition. Throws instead of returning false on failure. + /// + /// the sample frame position to seek to. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetPlaybackPosition(long frames) => SdlMixer.SetTrackPlaybackPosition(this, frames); + + /// + /// Ergonomic wrapper over MIX_SetTrackRawIOStream. Throws instead of returning false on failure. + /// + /// the new i/o stream to use as the track's input. + /// the format of the PCM data that the SDL_IOStream will provide. + /// if true, close the stream when done with it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetRawIOStream(nint io, SdlAudioSpec* spec, bool closeio) => + SdlMixer.SetTrackRawIOStream(this, io, spec, closeio); + + /// + /// Ergonomic wrapper over MIX_SetTrackStereo. Throws instead of returning false on failure. + /// + /// the per-channel gains, or NULL to disable spatialization. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void SetStereo(MixStereoGains* gains) => SdlMixer.SetTrackStereo(this, gains); + + /// + /// Ergonomic wrapper over MIX_StopTrack. Throws instead of returning false on failure. + /// + /// + /// the number of sample frames to spend fading out to + /// silence before halting. 0 to stop immediately. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void Stop(long fade_out_frames) => SdlMixer.StopTrack(this, fade_out_frames); + + /// + /// Ergonomic wrapper over MIX_TagTrack. Throws instead of returning false on failure. + /// + /// the tag to add. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public void Tag(string tag) => SdlMixer.TagTrack(this, tag); + + /// + /// Convert sample frames for a track's current format to milliseconds. + /// + /// the track-specific sample frames to convert to milliseconds. + /// + /// Converted number of milliseconds, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the track's current input format, which can + /// change when its input does, and also if that input changes formats + /// mid-stream (for example, if decoding a file that is two MP3s concatenated + /// together). + /// + /// + /// Sample frames are more precise than milliseconds, so out of necessity, this + /// function will approximate by rounding down to the closest full millisecond. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns -1. If the track has no input, this returns -1. If frames is < 0, + /// this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public long FramesToMS(long frames) => SdlMixer.TrackFramesToMS(this, frames); + + /// + /// Convert milliseconds to sample frames for a track's current format. + /// + /// the milliseconds to convert to track-specific sample frames. + /// + /// Converted number of sample frames, or -1 for errors/no input; call + /// SDL_GetError() for details. + /// + /// + /// + /// This calculates time based on the track's current input format, which can + /// change when its input does, and also if that input changes formats + /// mid-stream (for example, if decoding a file that is two MP3s concatenated + /// together). + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns -1. If the track has no input, this returns -1. If ms is < 0, + /// this returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public long MSToFrames(long ms) => SdlMixer.TrackMSToFrames(this, ms); + + /// + /// Query if a track is currently paused. + /// + /// true if paused, false otherwise. + /// + /// + /// If this returns true, the track is not currently contributing to the + /// mixer's output but will when resumed (it's "paused"). It is not playing nor + /// stopped. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns false, but there is no mechanism to distinguish errors from + /// non-playing tracks. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + /// + /// + /// + public bool Paused() => SdlMixer.TrackPaused(this); + + /// + /// Query if a track is currently playing. + /// + /// true if playing, false otherwise. + /// + /// + /// If this returns true, the track is currently contributing to the mixer's + /// output (it's "playing"). It is not stopped nor paused. + /// + /// + /// On various errors (MIX_Init() was not called, the track is NULL), this + /// returns false, but there is no mechanism to distinguish errors from + /// non-playing tracks. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + /// + /// + /// + /// + public bool Playing() => SdlMixer.TrackPlaying(this); + + /// + /// Remove an arbitrary tag from a track. + /// + /// the tag to remove, or NULL to remove all current tags. + /// + /// + /// A tag can be any valid C string in UTF-8 encoding. It can be useful to + /// group tracks in various ways. For example, everything in-game might be + /// marked as "game", so when the user brings up the settings menu, the app can + /// pause all tracks involved in gameplay at once, but keep background music + /// and menu sound effects running. + /// + /// + /// It's legal to remove a tag that the track doesn't have; this function + /// doesn't report errors, so this simply does nothing. + /// + /// + /// Specifying a NULL tag will remove all tags on a track. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_mixer 3.0.0. + /// + /// + public void Untag(string tag) => SdlMixer.UntagTrack(this, tag); + } +} diff --git a/Brutal.Sdl.Mixer/Generated/SdlMixer.Handles.gen.cs b/Brutal.Sdl.Mixer/Generated/SdlMixer.Handles.gen.cs new file mode 100644 index 0000000..5976026 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/SdlMixer.Handles.gen.cs @@ -0,0 +1,98 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +using System; +using Brutal.Interop; + +namespace Brutal.SdlApi.Mixer; + +/// +/// A strongly-typed interop handle wrapping the opaque SDL MIX_Audio pointer. +/// +[InteropHandle] +public readonly unsafe partial struct MixAudio : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlMixer.PInvoke.DestroyAudio(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL MIX_AudioDecoder pointer. +/// +[InteropHandle] +public readonly unsafe partial struct MixAudioDecoder : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlMixer.PInvoke.DestroyAudioDecoder(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL MIX_Group pointer. +/// +[InteropHandle] +public readonly unsafe partial struct MixGroup : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlMixer.PInvoke.DestroyGroup(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL MIX_Mixer pointer. +/// +[InteropHandle] +public readonly unsafe partial struct MixMixer : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlMixer.PInvoke.DestroyMixer(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL MIX_Track pointer. +/// +[InteropHandle] +public readonly unsafe partial struct MixTrack : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlMixer.PInvoke.DestroyTrack(this); + } +} diff --git a/Brutal.Sdl.Mixer/Generated/SdlMixer.PInvoke.gen.cs b/Brutal.Sdl.Mixer/Generated/SdlMixer.PInvoke.gen.cs new file mode 100644 index 0000000..ce0b696 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/SdlMixer.PInvoke.gen.cs @@ -0,0 +1,1074 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Mixer +{ + public static unsafe partial class SdlMixer + { + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "MIX_Version")] + private static partial int _Version(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Version() + { + SdlMixer.TraceLog.Trace(); + return _Version(); + } + + [LibraryImport(Dll, EntryPoint = "MIX_Init")] + private static partial byte _Init(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte Init() + { + SdlMixer.TraceLog.Trace(); + return _Init(); + } + + [LibraryImport(Dll, EntryPoint = "MIX_Quit")] + private static partial void _Quit(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Quit() + { + SdlMixer.TraceLog.Trace(); + _Quit(); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetNumAudioDecoders")] + private static partial int _GetNumAudioDecoders(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumAudioDecoders() + { + SdlMixer.TraceLog.Trace(); + return _GetNumAudioDecoders(); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_GetAudioDecoder", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetAudioDecoder(int index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetAudioDecoder(int index) + { + SdlMixer.TraceLog.Trace(); + return _GetAudioDecoder(index); + } + + [LibraryImport(Dll, EntryPoint = "MIX_CreateMixerDevice")] + private static partial MixMixer _CreateMixerDevice(uint devid, SdlAudioSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixMixer CreateMixerDevice(uint devid, SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _CreateMixerDevice(devid, spec); + } + + [LibraryImport(Dll, EntryPoint = "MIX_CreateMixer")] + private static partial MixMixer _CreateMixer(SdlAudioSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixMixer CreateMixer(SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _CreateMixer(spec); + } + + [LibraryImport(Dll, EntryPoint = "MIX_DestroyMixer")] + private static partial void _DestroyMixer(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyMixer(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + _DestroyMixer(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetMixerProperties")] + private static partial uint _GetMixerProperties(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetMixerProperties(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _GetMixerProperties(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetMixerFormat")] + private static partial byte _GetMixerFormat(MixMixer mixer, SdlAudioSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetMixerFormat(MixMixer mixer, SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _GetMixerFormat(mixer, spec); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LockMixer")] + private static partial void _LockMixer(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LockMixer(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + _LockMixer(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_UnlockMixer")] + private static partial void _UnlockMixer(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockMixer(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + _UnlockMixer(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LoadAudio_IO")] + private static partial MixAudio _LoadAudioIO(MixMixer mixer, nint io, byte predecode, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadAudioIO(MixMixer mixer, nint io, byte predecode, byte closeio) + { + SdlMixer.TraceLog.Trace(); + return _LoadAudioIO(mixer, io, predecode, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_LoadAudio", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial MixAudio _LoadAudio(MixMixer mixer, string path, byte predecode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadAudio(MixMixer mixer, string path, byte predecode) + { + SdlMixer.TraceLog.Trace(); + return _LoadAudio(mixer, path, predecode); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LoadAudioNoCopy")] + private static partial MixAudio _LoadAudioNoCopy( + MixMixer mixer, + void* data, + nuint datalen, + byte free_when_done + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadAudioNoCopy(MixMixer mixer, void* data, nuint datalen, byte free_when_done) + { + SdlMixer.TraceLog.Trace(); + return _LoadAudioNoCopy(mixer, data, datalen, free_when_done); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LoadAudioWithProperties")] + private static partial MixAudio _LoadAudioWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadAudioWithProperties(uint props) + { + SdlMixer.TraceLog.Trace(); + return _LoadAudioWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LoadRawAudio_IO")] + private static partial MixAudio _LoadRawAudioIO(MixMixer mixer, nint io, SdlAudioSpec* spec, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadRawAudioIO(MixMixer mixer, nint io, SdlAudioSpec* spec, byte closeio) + { + SdlMixer.TraceLog.Trace(); + return _LoadRawAudioIO(mixer, io, spec, closeio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LoadRawAudio")] + private static partial MixAudio _LoadRawAudio( + MixMixer mixer, + void* data, + nuint datalen, + SdlAudioSpec* spec + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadRawAudio(MixMixer mixer, void* data, nuint datalen, SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _LoadRawAudio(mixer, data, datalen, spec); + } + + [LibraryImport(Dll, EntryPoint = "MIX_LoadRawAudioNoCopy")] + private static partial MixAudio _LoadRawAudioNoCopy( + MixMixer mixer, + void* data, + nuint datalen, + SdlAudioSpec* spec, + byte free_when_done + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio LoadRawAudioNoCopy( + MixMixer mixer, + void* data, + nuint datalen, + SdlAudioSpec* spec, + byte free_when_done + ) + { + SdlMixer.TraceLog.Trace(); + return _LoadRawAudioNoCopy(mixer, data, datalen, spec, free_when_done); + } + + [LibraryImport(Dll, EntryPoint = "MIX_CreateSineWaveAudio")] + private static partial MixAudio _CreateSineWaveAudio(MixMixer mixer, int hz, float amplitude, long ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio CreateSineWaveAudio(MixMixer mixer, int hz, float amplitude, long ms) + { + SdlMixer.TraceLog.Trace(); + return _CreateSineWaveAudio(mixer, hz, amplitude, ms); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetAudioProperties")] + private static partial uint _GetAudioProperties(MixAudio audio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetAudioProperties(MixAudio audio) + { + SdlMixer.TraceLog.Trace(); + return _GetAudioProperties(audio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetAudioDuration")] + private static partial long _GetAudioDuration(MixAudio audio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetAudioDuration(MixAudio audio) + { + SdlMixer.TraceLog.Trace(); + return _GetAudioDuration(audio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetAudioFormat")] + private static partial byte _GetAudioFormat(MixAudio audio, SdlAudioSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetAudioFormat(MixAudio audio, SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _GetAudioFormat(audio, spec); + } + + [LibraryImport(Dll, EntryPoint = "MIX_DestroyAudio")] + private static partial void _DestroyAudio(MixAudio audio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyAudio(MixAudio audio) + { + SdlMixer.TraceLog.Trace(); + _DestroyAudio(audio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_CreateTrack")] + private static partial MixTrack _CreateTrack(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixTrack CreateTrack(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _CreateTrack(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_DestroyTrack")] + private static partial void _DestroyTrack(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyTrack(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + _DestroyTrack(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackProperties")] + private static partial uint _GetTrackProperties(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetTrackProperties(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackProperties(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackMixer")] + private static partial MixMixer _GetTrackMixer(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixMixer GetTrackMixer(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackMixer(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackAudio")] + private static partial byte _SetTrackAudio(MixTrack track, MixAudio audio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackAudio(MixTrack track, MixAudio audio) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackAudio(track, audio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackAudioStream")] + private static partial byte _SetTrackAudioStream(MixTrack track, SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackAudioStream(MixTrack track, SdlAudioStream stream) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackAudioStream(track, stream); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackIOStream")] + private static partial byte _SetTrackIOStream(MixTrack track, nint io, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackIOStream(MixTrack track, nint io, byte closeio) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackIOStream(track, io, closeio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackRawIOStream")] + private static partial byte _SetTrackRawIOStream(MixTrack track, nint io, SdlAudioSpec* spec, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackRawIOStream(MixTrack track, nint io, SdlAudioSpec* spec, byte closeio) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackRawIOStream(track, io, spec, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_TagTrack", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _TagTrack(MixTrack track, string tag); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TagTrack(MixTrack track, string tag) + { + SdlMixer.TraceLog.Trace(); + return _TagTrack(track, tag); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_UntagTrack", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _UntagTrack(MixTrack track, string tag); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UntagTrack(MixTrack track, string tag) + { + SdlMixer.TraceLog.Trace(); + _UntagTrack(track, tag); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackTags")] + private static partial byte** _GetTrackTags(MixTrack track, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GetTrackTags(MixTrack track, int* count) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackTags(track, count); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_GetTaggedTracks", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial MixTrack* _GetTaggedTracks(MixMixer mixer, string tag, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixTrack* GetTaggedTracks(MixMixer mixer, string tag, int* count) + { + SdlMixer.TraceLog.Trace(); + return _GetTaggedTracks(mixer, tag, count); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackPlaybackPosition")] + private static partial byte _SetTrackPlaybackPosition(MixTrack track, long frames); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackPlaybackPosition(MixTrack track, long frames) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackPlaybackPosition(track, frames); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackPlaybackPosition")] + private static partial long _GetTrackPlaybackPosition(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetTrackPlaybackPosition(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackPlaybackPosition(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackFadeFrames")] + private static partial long _GetTrackFadeFrames(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetTrackFadeFrames(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackFadeFrames(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackLoops")] + private static partial int _GetTrackLoops(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetTrackLoops(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackLoops(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackLoops")] + private static partial byte _SetTrackLoops(MixTrack track, int num_loops); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackLoops(MixTrack track, int num_loops) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackLoops(track, num_loops); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackAudio")] + private static partial MixAudio _GetTrackAudio(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudio GetTrackAudio(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackAudio(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackAudioStream")] + private static partial SdlAudioStream _GetTrackAudioStream(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlAudioStream GetTrackAudioStream(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackAudioStream(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackRemaining")] + private static partial long _GetTrackRemaining(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetTrackRemaining(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackRemaining(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_TrackMSToFrames")] + private static partial long _TrackMSToFrames(MixTrack track, long ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long TrackMSToFrames(MixTrack track, long ms) + { + SdlMixer.TraceLog.Trace(); + return _TrackMSToFrames(track, ms); + } + + [LibraryImport(Dll, EntryPoint = "MIX_TrackFramesToMS")] + private static partial long _TrackFramesToMS(MixTrack track, long frames); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long TrackFramesToMS(MixTrack track, long frames) + { + SdlMixer.TraceLog.Trace(); + return _TrackFramesToMS(track, frames); + } + + [LibraryImport(Dll, EntryPoint = "MIX_AudioMSToFrames")] + private static partial long _AudioMSToFrames(MixAudio audio, long ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long AudioMSToFrames(MixAudio audio, long ms) + { + SdlMixer.TraceLog.Trace(); + return _AudioMSToFrames(audio, ms); + } + + [LibraryImport(Dll, EntryPoint = "MIX_AudioFramesToMS")] + private static partial long _AudioFramesToMS(MixAudio audio, long frames); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long AudioFramesToMS(MixAudio audio, long frames) + { + SdlMixer.TraceLog.Trace(); + return _AudioFramesToMS(audio, frames); + } + + [LibraryImport(Dll, EntryPoint = "MIX_MSToFrames")] + private static partial long _MSToFrames(int sample_rate, long ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long MSToFrames(int sample_rate, long ms) + { + SdlMixer.TraceLog.Trace(); + return _MSToFrames(sample_rate, ms); + } + + [LibraryImport(Dll, EntryPoint = "MIX_FramesToMS")] + private static partial long _FramesToMS(int sample_rate, long frames); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long FramesToMS(int sample_rate, long frames) + { + SdlMixer.TraceLog.Trace(); + return _FramesToMS(sample_rate, frames); + } + + [LibraryImport(Dll, EntryPoint = "MIX_PlayTrack")] + private static partial byte _PlayTrack(MixTrack track, uint options); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PlayTrack(MixTrack track, uint options) + { + SdlMixer.TraceLog.Trace(); + return _PlayTrack(track, options); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_PlayTag", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _PlayTag(MixMixer mixer, string tag, uint options); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PlayTag(MixMixer mixer, string tag, uint options) + { + SdlMixer.TraceLog.Trace(); + return _PlayTag(mixer, tag, options); + } + + [LibraryImport(Dll, EntryPoint = "MIX_PlayAudio")] + private static partial byte _PlayAudio(MixMixer mixer, MixAudio audio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PlayAudio(MixMixer mixer, MixAudio audio) + { + SdlMixer.TraceLog.Trace(); + return _PlayAudio(mixer, audio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_StopTrack")] + private static partial byte _StopTrack(MixTrack track, long fade_out_frames); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopTrack(MixTrack track, long fade_out_frames) + { + SdlMixer.TraceLog.Trace(); + return _StopTrack(track, fade_out_frames); + } + + [LibraryImport(Dll, EntryPoint = "MIX_StopAllTracks")] + private static partial byte _StopAllTracks(MixMixer mixer, long fade_out_ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopAllTracks(MixMixer mixer, long fade_out_ms) + { + SdlMixer.TraceLog.Trace(); + return _StopAllTracks(mixer, fade_out_ms); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_StopTag", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _StopTag(MixMixer mixer, string tag, long fade_out_ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopTag(MixMixer mixer, string tag, long fade_out_ms) + { + SdlMixer.TraceLog.Trace(); + return _StopTag(mixer, tag, fade_out_ms); + } + + [LibraryImport(Dll, EntryPoint = "MIX_PauseTrack")] + private static partial byte _PauseTrack(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PauseTrack(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _PauseTrack(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_PauseAllTracks")] + private static partial byte _PauseAllTracks(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PauseAllTracks(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _PauseAllTracks(mixer); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_PauseTag", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _PauseTag(MixMixer mixer, string tag); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PauseTag(MixMixer mixer, string tag) + { + SdlMixer.TraceLog.Trace(); + return _PauseTag(mixer, tag); + } + + [LibraryImport(Dll, EntryPoint = "MIX_ResumeTrack")] + private static partial byte _ResumeTrack(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResumeTrack(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _ResumeTrack(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_ResumeAllTracks")] + private static partial byte _ResumeAllTracks(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResumeAllTracks(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _ResumeAllTracks(mixer); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_ResumeTag", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _ResumeTag(MixMixer mixer, string tag); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResumeTag(MixMixer mixer, string tag) + { + SdlMixer.TraceLog.Trace(); + return _ResumeTag(mixer, tag); + } + + [LibraryImport(Dll, EntryPoint = "MIX_TrackPlaying")] + private static partial byte _TrackPlaying(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TrackPlaying(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _TrackPlaying(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_TrackPaused")] + private static partial byte _TrackPaused(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TrackPaused(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _TrackPaused(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetMixerGain")] + private static partial byte _SetMixerGain(MixMixer mixer, float gain); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetMixerGain(MixMixer mixer, float gain) + { + SdlMixer.TraceLog.Trace(); + return _SetMixerGain(mixer, gain); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetMixerGain")] + private static partial float _GetMixerGain(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetMixerGain(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _GetMixerGain(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackGain")] + private static partial byte _SetTrackGain(MixTrack track, float gain); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackGain(MixTrack track, float gain) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackGain(track, gain); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackGain")] + private static partial float _GetTrackGain(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetTrackGain(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackGain(track); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_SetTagGain", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetTagGain(MixMixer mixer, string tag, float gain); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTagGain(MixMixer mixer, string tag, float gain) + { + SdlMixer.TraceLog.Trace(); + return _SetTagGain(mixer, tag, gain); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetMixerFrequencyRatio")] + private static partial byte _SetMixerFrequencyRatio(MixMixer mixer, float ratio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetMixerFrequencyRatio(MixMixer mixer, float ratio) + { + SdlMixer.TraceLog.Trace(); + return _SetMixerFrequencyRatio(mixer, ratio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetMixerFrequencyRatio")] + private static partial float _GetMixerFrequencyRatio(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetMixerFrequencyRatio(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _GetMixerFrequencyRatio(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackFrequencyRatio")] + private static partial byte _SetTrackFrequencyRatio(MixTrack track, float ratio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackFrequencyRatio(MixTrack track, float ratio) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackFrequencyRatio(track, ratio); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrackFrequencyRatio")] + private static partial float _GetTrackFrequencyRatio(MixTrack track); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetTrackFrequencyRatio(MixTrack track) + { + SdlMixer.TraceLog.Trace(); + return _GetTrackFrequencyRatio(track); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackOutputChannelMap")] + private static partial byte _SetTrackOutputChannelMap(MixTrack track, int* chmap, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackOutputChannelMap(MixTrack track, int* chmap, int count) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackOutputChannelMap(track, chmap, count); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackStereo")] + private static partial byte _SetTrackStereo(MixTrack track, MixStereoGains* gains); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackStereo(MixTrack track, MixStereoGains* gains) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackStereo(track, gains); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrack3DPosition")] + private static partial byte _SetTrack3DPosition(MixTrack track, MixPoint3D* position); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrack3DPosition(MixTrack track, MixPoint3D* position) + { + SdlMixer.TraceLog.Trace(); + return _SetTrack3DPosition(track, position); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetTrack3DPosition")] + private static partial byte _GetTrack3DPosition(MixTrack track, MixPoint3D* position); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTrack3DPosition(MixTrack track, MixPoint3D* position) + { + SdlMixer.TraceLog.Trace(); + return _GetTrack3DPosition(track, position); + } + + [LibraryImport(Dll, EntryPoint = "MIX_CreateGroup")] + private static partial MixGroup _CreateGroup(MixMixer mixer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixGroup CreateGroup(MixMixer mixer) + { + SdlMixer.TraceLog.Trace(); + return _CreateGroup(mixer); + } + + [LibraryImport(Dll, EntryPoint = "MIX_DestroyGroup")] + private static partial void _DestroyGroup(MixGroup group); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyGroup(MixGroup group) + { + SdlMixer.TraceLog.Trace(); + _DestroyGroup(group); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetGroupProperties")] + private static partial uint _GetGroupProperties(MixGroup group); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGroupProperties(MixGroup group) + { + SdlMixer.TraceLog.Trace(); + return _GetGroupProperties(group); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetGroupMixer")] + private static partial MixMixer _GetGroupMixer(MixGroup group); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixMixer GetGroupMixer(MixGroup group) + { + SdlMixer.TraceLog.Trace(); + return _GetGroupMixer(group); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackGroup")] + private static partial byte _SetTrackGroup(MixTrack track, MixGroup group); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackGroup(MixTrack track, MixGroup group) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackGroup(track, group); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackStoppedCallback")] + private static partial byte _SetTrackStoppedCallback( + MixTrack track, + delegate* unmanaged[Cdecl] cb, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackStoppedCallback( + MixTrack track, + delegate* unmanaged[Cdecl] cb, + void* userdata + ) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackStoppedCallback(track, cb, userdata); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackRawCallback")] + private static partial byte _SetTrackRawCallback( + MixTrack track, + delegate* unmanaged[Cdecl] cb, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackRawCallback( + MixTrack track, + delegate* unmanaged[Cdecl] cb, + void* userdata + ) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackRawCallback(track, cb, userdata); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetTrackCookedCallback")] + private static partial byte _SetTrackCookedCallback( + MixTrack track, + delegate* unmanaged[Cdecl] cb, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTrackCookedCallback( + MixTrack track, + delegate* unmanaged[Cdecl] cb, + void* userdata + ) + { + SdlMixer.TraceLog.Trace(); + return _SetTrackCookedCallback(track, cb, userdata); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetGroupPostMixCallback")] + private static partial byte _SetGroupPostMixCallback( + MixGroup group, + delegate* unmanaged[Cdecl] cb, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGroupPostMixCallback( + MixGroup group, + delegate* unmanaged[Cdecl] cb, + void* userdata + ) + { + SdlMixer.TraceLog.Trace(); + return _SetGroupPostMixCallback(group, cb, userdata); + } + + [LibraryImport(Dll, EntryPoint = "MIX_SetPostMixCallback")] + private static partial byte _SetPostMixCallback( + MixMixer mixer, + delegate* unmanaged[Cdecl] cb, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetPostMixCallback( + MixMixer mixer, + delegate* unmanaged[Cdecl] cb, + void* userdata + ) + { + SdlMixer.TraceLog.Trace(); + return _SetPostMixCallback(mixer, cb, userdata); + } + + [LibraryImport(Dll, EntryPoint = "MIX_Generate")] + private static partial int _Generate(MixMixer mixer, void* buffer, int buflen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Generate(MixMixer mixer, void* buffer, int buflen) + { + SdlMixer.TraceLog.Trace(); + return _Generate(mixer, buffer, buflen); + } + + [LibraryImport( + Dll, + EntryPoint = "MIX_CreateAudioDecoder", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial MixAudioDecoder _CreateAudioDecoder(string path, uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudioDecoder CreateAudioDecoder(string path, uint props) + { + SdlMixer.TraceLog.Trace(); + return _CreateAudioDecoder(path, props); + } + + [LibraryImport(Dll, EntryPoint = "MIX_CreateAudioDecoder_IO")] + private static partial MixAudioDecoder _CreateAudioDecoderIO(nint io, byte closeio, uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static MixAudioDecoder CreateAudioDecoderIO(nint io, byte closeio, uint props) + { + SdlMixer.TraceLog.Trace(); + return _CreateAudioDecoderIO(io, closeio, props); + } + + [LibraryImport(Dll, EntryPoint = "MIX_DestroyAudioDecoder")] + private static partial void _DestroyAudioDecoder(MixAudioDecoder audiodecoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyAudioDecoder(MixAudioDecoder audiodecoder) + { + SdlMixer.TraceLog.Trace(); + _DestroyAudioDecoder(audiodecoder); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetAudioDecoderProperties")] + private static partial uint _GetAudioDecoderProperties(MixAudioDecoder audiodecoder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetAudioDecoderProperties(MixAudioDecoder audiodecoder) + { + SdlMixer.TraceLog.Trace(); + return _GetAudioDecoderProperties(audiodecoder); + } + + [LibraryImport(Dll, EntryPoint = "MIX_GetAudioDecoderFormat")] + private static partial byte _GetAudioDecoderFormat(MixAudioDecoder audiodecoder, SdlAudioSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetAudioDecoderFormat(MixAudioDecoder audiodecoder, SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _GetAudioDecoderFormat(audiodecoder, spec); + } + + [LibraryImport(Dll, EntryPoint = "MIX_DecodeAudio")] + private static partial int _DecodeAudio( + MixAudioDecoder audiodecoder, + void* buffer, + int buflen, + SdlAudioSpec* spec + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int DecodeAudio(MixAudioDecoder audiodecoder, void* buffer, int buflen, SdlAudioSpec* spec) + { + SdlMixer.TraceLog.Trace(); + return _DecodeAudio(audiodecoder, buffer, buflen, spec); + } + } + } +} diff --git a/Brutal.Sdl.Mixer/Generated/SdlMixer.Structs.gen.cs b/Brutal.Sdl.Mixer/Generated/SdlMixer.Structs.gen.cs new file mode 100644 index 0000000..f9892c2 --- /dev/null +++ b/Brutal.Sdl.Mixer/Generated/SdlMixer.Structs.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Mixer +{ + [StructLayout(LayoutKind.Sequential)] + public partial struct MixStereoGains + { + public float left; + public float right; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct MixPoint3D + { + public float x; + public float y; + public float z; + } +} diff --git a/Brutal.Sdl.Mixer/GlobalUsings.cs b/Brutal.Sdl.Mixer/GlobalUsings.cs new file mode 100644 index 0000000..4b608b4 --- /dev/null +++ b/Brutal.Sdl.Mixer/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.SdlApi; diff --git a/Brutal.Sdl.Mixer/LICENSES/BRUTAL-SDL-MIXER-THIRD-PARTY-NOTICES.txt b/Brutal.Sdl.Mixer/LICENSES/BRUTAL-SDL-MIXER-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..8023639 --- /dev/null +++ b/Brutal.Sdl.Mixer/LICENSES/BRUTAL-SDL-MIXER-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,237 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Sdl.Mixer + +This package redistributes third-party software. The licenses governing that software +are reproduced below in full. + +WHAT THIS PACKAGE CONTAINS + + One native library, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + SDL_mixer 3.2.4 SDL3_mixer.dll / libSDL3_mixer.so / libSDL3_mixer.dylib + + Three decoders maintained by third parties are compiled into that library and are + governed by their own licenses, one section each below: + + stb_vorbis Ogg Vorbis decoding + dr_flac FLAC decoding + dr_mp3 MP3 decoding + +A NOTE ON SCOPE + + This package depends on RocketWerkz.Brutal.Sdl and links against SDL3 at runtime. + SDL3 is not contained in this package and is covered by that package's own notices. + + SDL_mixer can optionally be built against libmpg123, libFLAC, libvorbis, libopus, + libxmp, libgme, WavPack and FluidSynth. This build enables none of them and + substitutes the header-only decoders named above. None of those optional libraries + is contained in the shipped library, and none is attributed here. + +============================================================================== +SDL_mixer +============================================================================== + + Name SDL_mixer + Version 3.2.4 + Upstream https://github.com/libsdl-org/SDL_mixer + SPDX Zlib + Shipped as SDL3_mixer.dll, libSDL3_mixer.so, libSDL3_mixer.dylib + +Copyright (C) 1997-2026 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +============================================================================== +stb_vorbis +============================================================================== + + Name stb_vorbis + Version as vendored by SDL_mixer 3.2.4 + Upstream https://github.com/nothings/stb + SPDX MIT OR Unlicense + Shipped as compiled into SDL3_mixer.dll, libSDL3_mixer.so, libSDL3_mixer.dylib + + stb_vorbis is offered under two mutually exclusive licenses, both reproduced below + as upstream states them. + +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ + +============================================================================== +dr_flac +============================================================================== + + Name dr_flac + Version 0.13.4 (as vendored by SDL_mixer 3.2.4) + Upstream https://github.com/mackron/dr_libs + SPDX Unlicense OR MIT-0 + Shipped as compiled into SDL3_mixer.dll, libSDL3_mixer.so, libSDL3_mixer.dylib + +This software is available as a choice of the following licenses. Choose +whichever you prefer. + +=============================================================================== +ALTERNATIVE 1 - Public Domain (www.unlicense.org) +=============================================================================== +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +=============================================================================== +ALTERNATIVE 2 - MIT No Attribution +=============================================================================== +Copyright 2023 David Reid + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +============================================================================== +dr_mp3 +============================================================================== + + Name dr_mp3 + Version 0.7.4 (as vendored by SDL_mixer 3.2.4) + Upstream https://github.com/mackron/dr_libs + SPDX Unlicense OR MIT-0 + Shipped as compiled into SDL3_mixer.dll, libSDL3_mixer.so, libSDL3_mixer.dylib + + dr_mp3's decoding core derives from minimp3 -- "where the real work was done", + in dr_mp3's own words. The dr_libs terms come first, then minimp3's dedication, + both as dr_mp3 carries them. minimp3 names no copyright holder. + +This software is available as a choice of the following licenses. Choose +whichever you prefer. + +=============================================================================== +ALTERNATIVE 1 - Public Domain (www.unlicense.org) +=============================================================================== +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +=============================================================================== +ALTERNATIVE 2 - MIT No Attribution +=============================================================================== +Copyright 2023 David Reid + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ---------------------------------------------------------------------------- + minimp3 -- the dedication carried for the code dr_mp3 derives from + ---------------------------------------------------------------------------- + + https://github.com/lieff/minimp3 + To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. + This software is distributed without any warranty. + See . diff --git a/Brutal.Sdl.Mixer/Manual/ExceptionAggregator.cs b/Brutal.Sdl.Mixer/Manual/ExceptionAggregator.cs new file mode 100644 index 0000000..b6bc5a9 --- /dev/null +++ b/Brutal.Sdl.Mixer/Manual/ExceptionAggregator.cs @@ -0,0 +1,76 @@ +namespace Brutal.SdlApi.Mixer; + +internal sealed class ExceptionAggregator +{ + public const int MaxRetained = 16; + + private readonly List _exceptions = []; + private int _dropped; + private readonly Lock _lock = new(); + + public void Push(string message, Exception? innerException = null) + { + var wrapped = innerException is null + ? new SdlCallbackException(message) + : new SdlCallbackException(message, innerException); + + // Store before logging so a faulting logger cannot drop the exception. + lock (_lock) + { + if (_exceptions.Count < MaxRetained) + _exceptions.Add(wrapped); + else + _dropped++; + } + + try + { + SdlMixer.TraceLog.Error(wrapped); + } + catch + { + // A logging fault must not cross the native boundary. + } + } + + public void CheckExceptions() + { + Exception exception; + lock (_lock) + { + if (_exceptions.Count == 0) + return; + + var dropped = _dropped; + if (_exceptions.Count == 1 && dropped == 0) + { + exception = _exceptions[0]; + } + else + { + var message = + $"{_exceptions.Count} SDL_mixer callback exception(s) occurred." + + ( + dropped > 0 + ? $" A further {dropped} were dropped (only the first {MaxRetained} are retained)." + : "" + ); + exception = new AggregateException(message, _exceptions.ToArray()); + } + + _exceptions.Clear(); + _dropped = 0; + } + + throw exception; + } + + public void Clear() + { + lock (_lock) + { + _exceptions.Clear(); + _dropped = 0; + } + } +} diff --git a/Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Callbacks.cs b/Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Callbacks.cs new file mode 100644 index 0000000..9849e30 --- /dev/null +++ b/Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Callbacks.cs @@ -0,0 +1,232 @@ +namespace Brutal.SdlApi.Mixer; + +public delegate void MixTrackStoppedHandler(MixTrack track); + +public delegate void MixTrackMixHandler(MixTrack track, in SdlAudioSpec spec, Span pcm); + +public delegate void MixGroupMixHandler(MixGroup group, in SdlAudioSpec spec, Span pcm); + +public delegate void MixPostMixHandler(MixMixer mixer, in SdlAudioSpec spec, Span pcm); + +public static unsafe partial class SdlMixer +{ + // Which callback slot a registration occupies. SDL_mixer allows one callback of each kind per + // object; a track can have all three of TrackStopped / TrackRaw / TrackCooked at once, so the kind + // is part of the registry key (setting Raw must not disturb Cooked, and vice versa). + private enum CallbackKind + { + TrackStopped, + TrackRaw, + TrackCooked, + GroupPostMix, + PostMix, + } + + // Registered callback delegates, keyed by (native object pointer, kind). Each GCHandle roots the + // managed delegate for as long as SDL_mixer holds the native trampoline pointer against that + // object, and its IntPtr is the userdata SDL threads back to the trampoline so it can dispatch to + // the right delegate. Guarded by a lock because SDL_mixer permits (un)registering from any thread, + // and the audio thread reads the GCHandle target concurrently. Freed on replace, on clear (setting + // a null handler), and wholesale on Quit. + private static readonly Dictionary<(nint Object, CallbackKind Kind), GCHandle> Callbacks = new(); + private static readonly Lock CallbackLock = new(); + + // Callers hold CallbackLock and free an old GCHandle only after the native setter returns. + + private static (GCHandle NewHandle, nint Userdata) PrepareCallback(Delegate? callback) + { + if (callback is null) + return (default, 0); + + var handle = GCHandle.Alloc(callback); + return (handle, GCHandle.ToIntPtr(handle)); + } + + private static void CommitCallback((nint, CallbackKind) key, GCHandle newHandle) + { + if (Callbacks.Remove(key, out var old)) + old.Free(); + + if (newHandle.IsAllocated) + Callbacks[key] = newHandle; + } + + // The native setter failed and left the old registration in place. + private static void RollbackCallback(GCHandle newHandle) + { + if (newHandle.IsAllocated) + newHandle.Free(); + } + + public static void SetTrackStoppedCallback(MixTrack track, MixTrackStoppedHandler? callback) + { + ExceptionAggregator.CheckExceptions(); + var key = (track.Pointer.Value, CallbackKind.TrackStopped); + lock (CallbackLock) + { + var (newHandle, userdata) = PrepareCallback(callback); + delegate* unmanaged[Cdecl] fn = callback is null ? null : &TrackStoppedTrampoline; + if (PInvoke.SetTrackStoppedCallback(track, fn, (void*)userdata) == 0) + { + RollbackCallback(newHandle); + throw SdlException.FromError("MIX_SetTrackStoppedCallback failed"); + } + CommitCallback(key, newHandle); + } + } + + public static void SetTrackRawCallback(MixTrack track, MixTrackMixHandler? callback) + { + ExceptionAggregator.CheckExceptions(); + var key = (track.Pointer.Value, CallbackKind.TrackRaw); + lock (CallbackLock) + { + var (newHandle, userdata) = PrepareCallback(callback); + delegate* unmanaged[Cdecl] fn = callback is null + ? null + : &TrackMixTrampoline; + if (PInvoke.SetTrackRawCallback(track, fn, (void*)userdata) == 0) + { + RollbackCallback(newHandle); + throw SdlException.FromError("MIX_SetTrackRawCallback failed"); + } + CommitCallback(key, newHandle); + } + } + + public static void SetTrackCookedCallback(MixTrack track, MixTrackMixHandler? callback) + { + ExceptionAggregator.CheckExceptions(); + var key = (track.Pointer.Value, CallbackKind.TrackCooked); + lock (CallbackLock) + { + var (newHandle, userdata) = PrepareCallback(callback); + delegate* unmanaged[Cdecl] fn = callback is null + ? null + : &TrackMixTrampoline; + if (PInvoke.SetTrackCookedCallback(track, fn, (void*)userdata) == 0) + { + RollbackCallback(newHandle); + throw SdlException.FromError("MIX_SetTrackCookedCallback failed"); + } + CommitCallback(key, newHandle); + } + } + + public static void SetGroupPostMixCallback(MixGroup group, MixGroupMixHandler? callback) + { + ExceptionAggregator.CheckExceptions(); + var key = (group.Pointer.Value, CallbackKind.GroupPostMix); + lock (CallbackLock) + { + var (newHandle, userdata) = PrepareCallback(callback); + delegate* unmanaged[Cdecl] fn = callback is null + ? null + : &GroupMixTrampoline; + if (PInvoke.SetGroupPostMixCallback(group, fn, (void*)userdata) == 0) + { + RollbackCallback(newHandle); + throw SdlException.FromError("MIX_SetGroupPostMixCallback failed"); + } + CommitCallback(key, newHandle); + } + } + + public static void SetPostMixCallback(MixMixer mixer, MixPostMixHandler? callback) + { + ExceptionAggregator.CheckExceptions(); + var key = (mixer.Pointer.Value, CallbackKind.PostMix); + lock (CallbackLock) + { + var (newHandle, userdata) = PrepareCallback(callback); + delegate* unmanaged[Cdecl] fn = callback is null + ? null + : &PostMixTrampoline; + if (PInvoke.SetPostMixCallback(mixer, fn, (void*)userdata) == 0) + { + RollbackCallback(newHandle); + throw SdlException.FromError("MIX_SetPostMixCallback failed"); + } + CommitCallback(key, newHandle); + } + } + + // Called by Quit after MIX_Quit, when no trampoline can fire. + internal static void ClearCallbacks() + { + lock (CallbackLock) + { + foreach (var (_, handle) in Callbacks) + handle.Free(); + Callbacks.Clear(); + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void TrackStoppedTrampoline(void* userdata, MixTrack track) + { + try + { + if (GCHandle.FromIntPtr((nint)userdata).Target is MixTrackStoppedHandler handler) + handler(track); + else + ExceptionAggregator.Push(DeadHandleMessage("track-stopped")); + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in an SDL_mixer track-stopped callback.", ex); + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void TrackMixTrampoline(void* userdata, MixTrack track, SdlAudioSpec* spec, float* pcm, int samples) + { + try + { + if (GCHandle.FromIntPtr((nint)userdata).Target is MixTrackMixHandler handler) + handler(track, in *spec, new Span(pcm, samples)); + else + ExceptionAggregator.Push(DeadHandleMessage("track mix")); + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in an SDL_mixer track mix callback.", ex); + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void GroupMixTrampoline(void* userdata, MixGroup group, SdlAudioSpec* spec, float* pcm, int samples) + { + try + { + if (GCHandle.FromIntPtr((nint)userdata).Target is MixGroupMixHandler handler) + handler(group, in *spec, new Span(pcm, samples)); + else + ExceptionAggregator.Push(DeadHandleMessage("group post-mix")); + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in an SDL_mixer group post-mix callback.", ex); + } + } + + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + private static void PostMixTrampoline(void* userdata, MixMixer mixer, SdlAudioSpec* spec, float* pcm, int samples) + { + try + { + if (GCHandle.FromIntPtr((nint)userdata).Target is MixPostMixHandler handler) + handler(mixer, in *spec, new Span(pcm, samples)); + else + ExceptionAggregator.Push(DeadHandleMessage("post-mix")); + } + catch (Exception ex) + { + ExceptionAggregator.Push("An exception occurred in an SDL_mixer post-mix callback.", ex); + } + } + + private static string DeadHandleMessage(string family) => + $"An SDL_mixer {family} callback fired with a dead or foreign GCHandle (its target was not the " + + "expected handler); the callback was skipped."; +} diff --git a/Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Init.cs b/Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Init.cs new file mode 100644 index 0000000..464a2ed --- /dev/null +++ b/Brutal.Sdl.Mixer/Manual/Libraries/SdlMixer.Init.cs @@ -0,0 +1,12 @@ +namespace Brutal.SdlApi.Mixer; + +public static unsafe partial class SdlMixer +{ + public static void Quit() + { + // Free the callback GCHandles only after MIX_Quit returns; the audio thread uses them until then. + PInvoke.Quit(); + ClearCallbacks(); + ExceptionAggregator.Clear(); + } +} diff --git a/Brutal.Sdl.Mixer/SdlMixer.cs b/Brutal.Sdl.Mixer/SdlMixer.cs new file mode 100644 index 0000000..cdb5a1c --- /dev/null +++ b/Brutal.Sdl.Mixer/SdlMixer.cs @@ -0,0 +1,114 @@ +using System.Reflection; +using Brutal.Logging; + +namespace Brutal.SdlApi.Mixer; + +/// +/// Provides access to the SDL_mixer library. +/// +public static unsafe partial class SdlMixer +{ + /// + /// The name the generated P/Invoke surface imports against. The static + /// constructor registers a that normalizes + /// this name to the platform-specific SDL3_mixer shared library. + /// + internal const string Dll = "SDL3_mixer"; + + /// + /// The logging category for the per-call trace logs the generated P/Invoke surface emits. An + /// internal implementation detail mirroring core's Sdl.TraceLog; the generated + /// SdlMixer.PInvoke wrappers call SdlMixer.TraceLog.Trace() on every invocation. + /// + internal static readonly LogCategory TraceLog = LogCategory.Make("SdlMixer"); + + /// + /// Captures exceptions thrown inside SDL_mixer callbacks, which run on the audio thread, so they + /// can be rethrown from managed code. Drained by every ergonomic mixer/track/group method and by + /// . + /// + internal static readonly ExceptionAggregator ExceptionAggregator = new(); + + /// + /// Rethrows any exception captured inside an SDL_mixer callback since the last drain, then clears + /// the pending set. Callbacks fire on SDL_mixer's audio thread(s), where a managed exception cannot + /// legally unwind; each is caught, logged, and parked on the shared aggregator instead. Every + /// ergonomic method that touches a mixer, track or group drains automatically, but during long + /// device-driven playback that makes no such calls, invoke this periodically (e.g. once per frame) + /// to surface a failing callback promptly. + /// + /// Exactly one callback exception was pending. + /// More than one callback exception was pending, or some were dropped. + public static void ThrowPendingCallbackExceptions() => ExceptionAggregator.CheckExceptions(); + + /// + /// Hosts the raw generated P/Invoke surface and the native library resolver for SDL3_mixer. + /// + public static unsafe partial class PInvoke + { + // The native SDL3_mixer handle, resolved lazily by the DllImportResolver below and cached + // so the library is loaded at most once regardless of how many entry points are resolved. + private static nint _nativeHandle; + + private static readonly Lock ResolveLock = new(); + + static PInvoke() + { + // Load libSDL3 before SDL3_mixer, which links against it; only a real P/Invoke triggers Sdl's resolver. + _ = Sdl.PInvoke.GetVersion(); + + NativeLibrary.SetDllImportResolver(typeof(SdlMixer).Assembly, Resolve); + } + + // Normalizes the "SDL3_mixer" import name to the platform-specific shared library filename + // (SDL3_mixer.dll on Windows, libSDL3_mixer.dylib on macOS, libSDL3_mixer.so.0 on Linux). + // SDL_mixer's Linux build installs a versioned soname (libSDL3_mixer.so.0), same convention + // as core's SDL3, so the candidate list is spelled out explicitly, most-specific first, with + // the default probing convention name as a fallback. + private static nint Resolve(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + // Only ever asked to resolve SDL3_mixer; anything else is left to the default resolver. + if (libraryName != Dll) + return IntPtr.Zero; + + lock (ResolveLock) + { + if (_nativeHandle != IntPtr.Zero) + return _nativeHandle; + + var search = searchPath ?? DllImportSearchPath.AssemblyDirectory; + + // Load (not TryLoad) so each candidate's OS error text reaches the final exception. + var failures = new List(); + foreach (var candidate in Candidates()) + { + try + { + _nativeHandle = NativeLibrary.Load(candidate, assembly, search); + return _nativeHandle; + } + catch (Exception ex) + { + failures.Add($"'{candidate}': {ex.Message}"); + } + } + + throw new DllNotFoundException( + "Could not load the SDL3_mixer native library. Attempts (most specific first): " + + string.Join("; ", failures) + + "." + ); + } + } + + private static string[] Candidates() + { + if (OperatingSystem.IsWindows()) + return ["SDL3_mixer.dll", "SDL3_mixer"]; + if (OperatingSystem.IsMacOS()) + return ["libSDL3_mixer.dylib", "SDL3_mixer"]; + // Linux and other Unix-likes. + return ["libSDL3_mixer.so.0", "libSDL3_mixer.so", "SDL3_mixer"]; + } + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfDirection.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfDirection.gen.cs new file mode 100644 index 0000000..96cd603 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfDirection.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public enum TtfDirection : uint + { + Invalid = 0u, + Ltr = 4u, + Rtl = 5u, + Ttb = 6u, + Btt = 7u, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfDrawCommand.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfDrawCommand.gen.cs new file mode 100644 index 0000000..25663f6 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfDrawCommand.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public enum TtfDrawCommand : uint + { + Noop = 0u, + Fill = 1u, + Copy = 2u, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfFontStyleFlags.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfFontStyleFlags.gen.cs new file mode 100644 index 0000000..df1575b --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfFontStyleFlags.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + [Flags] + public enum TtfFontStyleFlags : uint + { + Bold = 1u, + Italic = 2u, + Normal = 0u, + Strikethrough = 8u, + Underline = 4u, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfGpuTextEngineWinding.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfGpuTextEngineWinding.gen.cs new file mode 100644 index 0000000..f995e41 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfGpuTextEngineWinding.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public enum TtfGpuTextEngineWinding + { + Invalid = -1, + Clockwise = 0, + CounterClockwise = 1, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfHintingFlags.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfHintingFlags.gen.cs new file mode 100644 index 0000000..bd725de --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfHintingFlags.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public enum TtfHintingFlags + { + Invalid = -1, + Normal = 0, + Light = 1, + Mono = 2, + None = 3, + LightSubpixel = 4, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfHorizontalAlignment.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfHorizontalAlignment.gen.cs new file mode 100644 index 0000000..d12e51b --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfHorizontalAlignment.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public enum TtfHorizontalAlignment + { + Invalid = -1, + Left = 0, + Center = 1, + Right = 2, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfImageType.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfImageType.gen.cs new file mode 100644 index 0000000..36f02be --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfImageType.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public enum TtfImageType : uint + { + Invalid = 0u, + Alpha = 1u, + Color = 2u, + Sdf = 3u, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Enums/TtfSubStringFlags.gen.cs b/Brutal.Sdl.Ttf/Generated/Enums/TtfSubStringFlags.gen.cs new file mode 100644 index 0000000..8c47908 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Enums/TtfSubStringFlags.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + [Flags] + public enum TtfSubStringFlags : uint + { + LineEnd = 1024u, + LineStart = 512u, + TextEnd = 2048u, + TextStart = 256u, + } +} diff --git a/Brutal.Sdl.Ttf/Generated/Libraries/SdlTtf.Ergonomic.gen.cs b/Brutal.Sdl.Ttf/Generated/Libraries/SdlTtf.Ergonomic.gen.cs new file mode 100644 index 0000000..5aff346 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/Libraries/SdlTtf.Ergonomic.gen.cs @@ -0,0 +1,3013 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public static unsafe partial class SdlTtf + { + /// + /// This function gets the version of the dynamically linked SDL_ttf library. + /// + /// SDL_ttf version. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static int Version() => PInvoke.Version(); + + /// + /// Query the version of the FreeType library in use. + /// + /// to be filled in with the major version number. Can be NULL. + /// to be filled in with the minor version number. Can be NULL. + /// to be filled in with the param version number. Can be NULL. + /// + /// + /// TTF_Init() should be called before calling this function. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void GetFreeTypeVersion(out int major, out int minor, out int patch) + { + major = default; + minor = default; + patch = default; + fixed (int* majorPtr = &major) + { + fixed (int* minorPtr = &minor) + { + fixed (int* patchPtr = &patch) + { + PInvoke.GetFreeTypeVersion(majorPtr, minorPtr, patchPtr); + } + } + } + } + + /// + /// Query the version of the HarfBuzz library in use. + /// + /// to be filled in with the major version number. Can be NULL. + /// to be filled in with the minor version number. Can be NULL. + /// to be filled in with the param version number. Can be NULL. + /// + /// + /// If HarfBuzz is not available, the version reported is 0.0.0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static void GetHarfBuzzVersion(out int major, out int minor, out int patch) + { + major = default; + minor = default; + patch = default; + fixed (int* majorPtr = &major) + { + fixed (int* minorPtr = &minor) + { + fixed (int* patchPtr = &patch) + { + PInvoke.GetHarfBuzzVersion(majorPtr, minorPtr, patchPtr); + } + } + } + } + + /// + /// Ergonomic wrapper over TTF_Init. Throws instead of returning false on failure. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static void Init() + { + if (PInvoke.Init() == 0) + { + throw SdlException.FromError("TTF_Init failed"); + } + } + + /// + /// Ergonomic wrapper over TTF_OpenFont. Throws instead of returning a null handle on failure. + /// + /// path to font file. + /// point size to use for the newly-opened font. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfFont OpenFont(string file, float ptsize) + { + TtfFont result = PInvoke.OpenFont(file, ptsize); + if (result.IsNull()) + { + throw SdlException.FromError("TTF_OpenFont failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_OpenFontIO. Throws instead of returning a null handle on failure. + /// + /// an SDL_IOStream to provide a font file's data. + /// + /// true to close src when the font is closed, false to leave + /// it open. + /// + /// point size to use for the newly-opened font. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfFont OpenFontIO(nint src, bool closeio, float ptsize) + { + TtfFont result = PInvoke.OpenFontIO(src, closeio ? (byte)1 : (byte)0, ptsize); + if (result.IsNull()) + { + throw SdlException.FromError("TTF_OpenFontIO failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_OpenFontWithProperties. Throws instead of returning a null handle on + /// failure. + /// + /// the properties to use. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfFont OpenFontWithProperties(uint props) + { + TtfFont result = PInvoke.OpenFontWithProperties(props); + if (result.IsNull()) + { + throw SdlException.FromError("TTF_OpenFontWithProperties failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_CopyFont. Throws instead of returning a null handle on failure. + /// + /// the font to copy. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfFont CopyFont(TtfFont existing_font) + { + TtfFont result = PInvoke.CopyFont(existing_font); + if (result.IsNull()) + { + throw SdlException.FromError("TTF_CopyFont failed"); + } + return result; + } + + /// + /// Get the properties associated with a font. + /// + /// the font to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-write properties are provided by SDL: + /// + /// + /// - TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER: The FT_Stroker_LineCap value + /// used when setting the font outline, defaults to + /// FT_STROKER_LINECAP_ROUND. + /// - TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER: The FT_Stroker_LineJoin value + /// used when setting the font outline, defaults to + /// FT_STROKER_LINEJOIN_ROUND. + /// - TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER: The FT_Fixed miter limit used + /// when setting the font outline, defaults to 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static uint GetFontProperties(TtfFont font) => PInvoke.GetFontProperties(font); + + /// + /// Get the font generation. + /// + /// the font to query. + /// + /// the font generation or 0 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The generation is incremented each time font properties change that require + /// rebuilding glyphs, such as style, size, etc. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static uint GetFontGeneration(TtfFont font) => PInvoke.GetFontGeneration(font); + + /// + /// Add a fallback font. + /// + /// the font to modify. + /// the font to add as a fallback. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Add a font that will be used for glyphs that are not in the current font. + /// The fallback font should have the same size and style as the current font. + /// + /// + /// If there are multiple fallback fonts, they are used in the order added. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created + /// both fonts. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool AddFallbackFont(TtfFont font, TtfFont fallback) => + PInvoke.AddFallbackFont(font, fallback) != 0; + + /// + /// Remove a fallback font. + /// + /// the font to modify. + /// the font to remove as a fallback. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created + /// both fonts. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static void RemoveFallbackFont(TtfFont font, TtfFont fallback) => + PInvoke.RemoveFallbackFont(font, fallback); + + /// + /// Remove all fallback fonts. + /// + /// the font to modify. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static void ClearFallbackFonts(TtfFont font) => PInvoke.ClearFallbackFonts(font); + + /// + /// Set a font's size dynamically. + /// + /// the font to resize. + /// the new point size. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetFontSize(TtfFont font, float ptsize) => PInvoke.SetFontSize(font, ptsize) != 0; + + /// + /// Set font size dynamically with target resolutions, in dots per inch. + /// + /// the font to resize. + /// the new point size. + /// the target horizontal DPI. + /// the target vertical DPI. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetFontSizeDPI(TtfFont font, float ptsize, int hdpi, int vdpi) => + PInvoke.SetFontSizeDPI(font, ptsize, hdpi, vdpi) != 0; + + /// + /// Get the size of a font. + /// + /// the font to query. + /// + /// the size of the font, or 0.0f on failure; call SDL_GetError() for + /// more information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static float GetFontSize(TtfFont font) => PInvoke.GetFontSize(font); + + /// + /// Get font target resolutions, in dots per inch. + /// + /// the font to query. + /// a pointer filled in with the target horizontal DPI. + /// a pointer filled in with the target vertical DPI. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool GetFontDPI(TtfFont font, out int hdpi, out int vdpi) + { + hdpi = default; + vdpi = default; + fixed (int* hdpiPtr = &hdpi) + { + fixed (int* vdpiPtr = &vdpi) + { + return PInvoke.GetFontDPI(font, hdpiPtr, vdpiPtr) != 0; + } + } + } + + /// + /// Set a font's current style. + /// + /// the font to set a new style on. + /// the new style values to set, OR'd together. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// The font styles are a set of bit flags, OR'd together: + /// + /// + /// - TTF_STYLE_NORMAL (is zero) + /// - TTF_STYLE_BOLD + /// - TTF_STYLE_ITALIC + /// - TTF_STYLE_UNDERLINE + /// - TTF_STYLE_STRIKETHROUGH + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void SetFontStyle(TtfFont font, TtfFontStyleFlags style) => PInvoke.SetFontStyle(font, style); + + /// + /// Query a font's current style. + /// + /// the font to query. + /// the current font style, as a set of bit flags. + /// + /// + /// The font styles are a set of bit flags, OR'd together: + /// + /// + /// - TTF_STYLE_NORMAL (is zero) + /// - TTF_STYLE_BOLD + /// - TTF_STYLE_ITALIC + /// - TTF_STYLE_UNDERLINE + /// - TTF_STYLE_STRIKETHROUGH + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static TtfFontStyleFlags GetFontStyle(TtfFont font) => PInvoke.GetFontStyle(font); + + /// + /// Set a font's current outline. + /// + /// the font to set a new outline on. + /// positive outline value, 0 to default. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This uses the font properties TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER, + /// TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER, and + /// TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER when setting the font outline. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetFontOutline(TtfFont font, int outline) => PInvoke.SetFontOutline(font, outline) != 0; + + /// + /// Query a font's current outline. + /// + /// the font to query. + /// the font's current outline value. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static int GetFontOutline(TtfFont font) => PInvoke.GetFontOutline(font); + + /// + /// Set a font's current hinter setting. + /// + /// the font to set a new hinter setting on. + /// the new hinter setting. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// The hinter setting is a single value: + /// + /// + /// - TTF_HINTING_NORMAL + /// - TTF_HINTING_LIGHT + /// - TTF_HINTING_MONO + /// - TTF_HINTING_NONE + /// - TTF_HINTING_LIGHT_SUBPIXEL (available in SDL_ttf 3.0.0 and later) + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void SetFontHinting(TtfFont font, TtfHintingFlags hinting) => + PInvoke.SetFontHinting(font, hinting); + + /// + /// Query the number of faces of a font. + /// + /// the font to query. + /// the number of FreeType font faces. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static int GetNumFontFaces(TtfFont font) => PInvoke.GetNumFontFaces(font); + + /// + /// Query a font's current FreeType hinter setting. + /// + /// the font to query. + /// + /// the font's current hinter value, or TTF_HINTING_INVALID if the + /// font is invalid. + /// + /// + /// + /// The hinter setting is a single value: + /// + /// + /// - TTF_HINTING_NORMAL + /// - TTF_HINTING_LIGHT + /// - TTF_HINTING_MONO + /// - TTF_HINTING_NONE + /// - TTF_HINTING_LIGHT_SUBPIXEL (available in SDL_ttf 3.0.0 and later) + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static TtfHintingFlags GetFontHinting(TtfFont font) => PInvoke.GetFontHinting(font); + + /// + /// Enable Signed Distance Field rendering for a font. + /// + /// the font to set SDF support on. + /// true to enable SDF, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// SDF is a technique that helps fonts look sharp even when scaling and + /// rotating, and requires special shader support for display. + /// + /// + /// This works with Blended APIs, and generates the raw signed distance values + /// in the alpha channel of the resulting texture. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetFontSDF(TtfFont font, bool enabled) => + PInvoke.SetFontSDF(font, enabled ? (byte)1 : (byte)0) != 0; + + /// + /// Query whether Signed Distance Field rendering is enabled for a font. + /// + /// the font to query. + /// true if enabled, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool GetFontSDF(TtfFont font) => PInvoke.GetFontSDF(font) != 0; + + /// + /// Query a font's weight, in terms of the lightness/heaviness of the strokes. + /// + /// the font to query. + /// the font's current weight. + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.4.0. + /// + public static int GetFontWeight(TtfFont font) => PInvoke.GetFontWeight(font); + + /// + /// Set a font's current wrap alignment option. + /// + /// the font to set a new wrap alignment option on. + /// the new wrap alignment option. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void SetFontWrapAlignment(TtfFont font, TtfHorizontalAlignment align) => + PInvoke.SetFontWrapAlignment(font, align); + + /// + /// Query a font's current wrap alignment option. + /// + /// the font to query. + /// the font's current wrap alignment option. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static TtfHorizontalAlignment GetFontWrapAlignment(TtfFont font) => PInvoke.GetFontWrapAlignment(font); + + /// + /// Query the total height of a font. + /// + /// the font to query. + /// the font's height. + /// + /// + /// This is usually equal to point size. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static int GetFontHeight(TtfFont font) => PInvoke.GetFontHeight(font); + + /// + /// Query the offset from the baseline to the top of a font. + /// + /// the font to query. + /// the font's ascent. + /// + /// + /// This is a positive value, relative to the baseline. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static int GetFontAscent(TtfFont font) => PInvoke.GetFontAscent(font); + + /// + /// Query the offset from the baseline to the bottom of a font. + /// + /// the font to query. + /// the font's descent. + /// + /// + /// This is a negative value, relative to the baseline. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static int GetFontDescent(TtfFont font) => PInvoke.GetFontDescent(font); + + /// + /// Set the spacing between lines of text for a font. + /// + /// the font to modify. + /// the new line spacing for the font. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void SetFontLineSkip(TtfFont font, int lineskip) => PInvoke.SetFontLineSkip(font, lineskip); + + /// + /// Query the spacing between lines of text for a font. + /// + /// the font to query. + /// the font's recommended spacing. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static int GetFontLineSkip(TtfFont font) => PInvoke.GetFontLineSkip(font); + + /// + /// Set if kerning is enabled for a font. + /// + /// the font to set kerning on. + /// true to enable kerning, false to disable. + /// + /// + /// Newly-opened fonts default to allowing kerning. This is generally a good + /// policy unless you have a strong reason to disable it, as it tends to + /// produce better rendering (with kerning disabled, some fonts might render + /// the word kerning as something that looks like keming for example). + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void SetFontKerning(TtfFont font, bool enabled) => + PInvoke.SetFontKerning(font, enabled ? (byte)1 : (byte)0); + + /// + /// Query whether or not kerning is enabled for a font. + /// + /// the font to query. + /// true if kerning is enabled, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool GetFontKerning(TtfFont font) => PInvoke.GetFontKerning(font) != 0; + + /// + /// Query whether a font is fixed-width. + /// + /// the font to query. + /// true if the font is fixed-width, false otherwise. + /// + /// + /// A "fixed-width" font means all glyphs are the same width across; a + /// lowercase 'i' will be the same size across as a capital 'W', for example. + /// This is common for terminals and text editors, and other apps that treat + /// text as a grid. Most other things (WYSIWYG word processors, web pages, etc) + /// are more likely to not be fixed-width in most cases. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool FontIsFixedWidth(TtfFont font) => PInvoke.FontIsFixedWidth(font) != 0; + + /// + /// Query whether a font is scalable or not. + /// + /// the font to query. + /// true if the font is scalable, false otherwise. + /// + /// + /// Scalability lets us distinguish between outline and bitmap fonts. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool FontIsScalable(TtfFont font) => PInvoke.FontIsScalable(font) != 0; + + /// + /// Query a font's family name. + /// + /// the font to query. + /// the font's family name. + /// + /// + /// This string is dictated by the contents of the font file. + /// + /// + /// Note that the returned string is to internal storage, and should not be + /// modified or free'd by the caller. The string becomes invalid, with the rest + /// of the font, when font is handed to TTF_CloseFont(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static string? GetFontFamilyName(TtfFont font) => PInvoke.GetFontFamilyName(font); + + /// + /// Query a font's style name. + /// + /// the font to query. + /// the font's style name. + /// + /// + /// This string is dictated by the contents of the font file. + /// + /// + /// Note that the returned string is to internal storage, and should not be + /// modified or free'd by the caller. The string becomes invalid, with the rest + /// of the font, when font is handed to TTF_CloseFont(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static string? GetFontStyleName(TtfFont font) => PInvoke.GetFontStyleName(font); + + /// + /// Set the direction to be used for text shaping by a font. + /// + /// the font to modify. + /// the new direction for text to flow. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function only supports left-to-right text shaping if SDL_ttf was not + /// built with HarfBuzz support. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool SetFontDirection(TtfFont font, TtfDirection direction) => + PInvoke.SetFontDirection(font, direction) != 0; + + /// + /// Get the direction to be used for text shaping by a font. + /// + /// the font to query. + /// the direction to be used for text shaping. + /// + /// + /// This defaults to TTF_DIRECTION_INVALID if it hasn't been set. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static TtfDirection GetFontDirection(TtfFont font) => PInvoke.GetFontDirection(font); + + /// + /// Convert from a 4 character string to a 32-bit tag. + /// + /// the 4 character string to convert. + /// the 32-bit representation of the string. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static uint StringToTag(string @string) => PInvoke.StringToTag(@string); + + /// + /// Convert from a 32-bit tag to a 4 character string. + /// + /// the 32-bit tag to convert. + /// + /// a pointer filled in with the 4 character representation of + /// the tag. + /// + /// + /// the size of the buffer pointed at by string, should be at least + /// 4. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void TagToString(uint tag, byte* @string, nuint size) => PInvoke.TagToString(tag, @string, size); + + /// + /// Set the script to be used for text shaping by a font. + /// + /// the font to modify. + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// . + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns false if SDL_ttf isn't built with HarfBuzz support. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetFontScript(TtfFont font, uint script) => PInvoke.SetFontScript(font, script) != 0; + + /// + /// Get the script used for text shaping a font. + /// + /// the font to query. + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// or 0 if a script hasn't been set. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static uint GetFontScript(TtfFont font) => PInvoke.GetFontScript(font); + + /// + /// Get the script used by a 32-bit codepoint. + /// + /// the character code to check. + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// on success, or 0 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function is thread-safe. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static uint GetGlyphScript(uint ch) => PInvoke.GetGlyphScript(ch); + + /// + /// Set language to be used for text shaping by a font. + /// + /// the font to specify a language for. + /// + /// a null-terminated string containing the desired + /// language's BCP47 code. Or null to reset the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If SDL_ttf was not built with HarfBuzz support, this function returns + /// false. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool SetFontLanguage(TtfFont font, string language_bcp47) => + PInvoke.SetFontLanguage(font, language_bcp47) != 0; + + /// + /// Check whether a glyph is provided by the font for a UNICODE codepoint. + /// + /// the font to query. + /// the codepoint to check. + /// true if font provides a glyph for this character, false if not. + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool FontHasGlyph(TtfFont font, uint ch) => PInvoke.FontHasGlyph(font, ch) != 0; + + /// + /// Get the pixel image for a UNICODE codepoint. + /// + /// the font to query. + /// the codepoint to check. + /// + /// a pointer filled in with the glyph image type, may be + /// NULL. + /// + /// + /// an SDL_Surface containing the glyph, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static SdlSurface* GetGlyphImage(TtfFont font, uint ch, out TtfImageType image_type) + { + image_type = default; + fixed (TtfImageType* image_typePtr = &image_type) + { + return PInvoke.GetGlyphImage(font, ch, image_typePtr); + } + } + + /// + /// Get the pixel image for a character index. + /// + /// the font to query. + /// the index of the glyph to return. + /// + /// a pointer filled in with the glyph image type, may be + /// NULL. + /// + /// + /// an SDL_Surface containing the glyph, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// This is useful for text engine implementations, which can call this with + /// the glyph_index in a TTF_CopyOperation + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static SdlSurface* GetGlyphImageForIndex(TtfFont font, uint glyph_index, out TtfImageType image_type) + { + image_type = default; + fixed (TtfImageType* image_typePtr = &image_type) + { + return PInvoke.GetGlyphImageForIndex(font, glyph_index, image_typePtr); + } + } + + /// + /// Query the metrics (dimensions) of a font's glyph for a UNICODE codepoint. + /// + /// the font to query. + /// the codepoint to check. + /// + /// a pointer filled in with the minimum x coordinate of the glyph + /// from the left edge of its bounding box. This value may be + /// negative. + /// + /// + /// a pointer filled in with the maximum x coordinate of the glyph + /// from the left edge of its bounding box. + /// + /// + /// a pointer filled in with the minimum y coordinate of the glyph + /// from the bottom edge of its bounding box. This value may be + /// negative. + /// + /// + /// a pointer filled in with the maximum y coordinate of the glyph + /// from the bottom edge of its bounding box. + /// + /// + /// a pointer filled in with the distance to the next glyph from + /// the left edge of this glyph's bounding box. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// To understand what these metrics mean, here is a useful link: + /// + /// + /// https://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetGlyphMetrics( + TtfFont font, + uint ch, + out int minx, + out int maxx, + out int miny, + out int maxy, + out int advance + ) + { + minx = default; + maxx = default; + miny = default; + maxy = default; + advance = default; + fixed (int* minxPtr = &minx) + { + fixed (int* maxxPtr = &maxx) + { + fixed (int* minyPtr = &miny) + { + fixed (int* maxyPtr = &maxy) + { + fixed (int* advancePtr = &advance) + { + return PInvoke.GetGlyphMetrics(font, ch, minxPtr, maxxPtr, minyPtr, maxyPtr, advancePtr) + != 0; + } + } + } + } + } + } + + /// + /// Query the kerning size between the glyphs of two UNICODE codepoints. + /// + /// the font to query. + /// the previous codepoint. + /// the current codepoint. + /// + /// a pointer filled in with the kerning size between the two + /// glyphs, in pixels, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetGlyphKerning(TtfFont font, uint previous_ch, uint ch, out int kerning) + { + kerning = default; + fixed (int* kerningPtr = &kerning) + { + return PInvoke.GetGlyphKerning(font, previous_ch, ch, kerningPtr) != 0; + } + } + + /// + /// Calculate the dimensions of a rendered string of UTF-8 text. + /// + /// the font to query. + /// text to calculate, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// will be filled with width, in pixels, on return. + /// will be filled with height, in pixels, on return. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will report the width and height, in pixels, of the space that the + /// specified string will take to fully render. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetStringSize(TtfFont font, string text, nuint length, int* w, int* h) => + PInvoke.GetStringSize(font, text, length, w, h) != 0; + + /// + /// Calculate the dimensions of a rendered string of UTF-8 text. + /// + /// the font to query. + /// text to calculate, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the maximum width or 0 to wrap on newline characters. + /// will be filled with width, in pixels, on return. + /// will be filled with height, in pixels, on return. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will report the width and height, in pixels, of the space that the + /// specified string will take to fully render. + /// + /// + /// Text is wrapped to multiple lines on line endings and on word boundaries if + /// it extends beyond wrap_width in pixels. + /// + /// + /// If wrap_width is 0, this function will only wrap on newline characters. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetStringSizeWrapped( + TtfFont font, + string text, + nuint length, + int wrap_width, + int* w, + int* h + ) => PInvoke.GetStringSizeWrapped(font, text, length, wrap_width, w, h) != 0; + + /// + /// Calculate how much of a UTF-8 string will fit in a given width. + /// + /// the font to query. + /// text to calculate, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// + /// maximum width, in pixels, available for the string, or 0 + /// for unbounded width. + /// + /// + /// a pointer filled in with the width, in pixels, of the + /// string that will fit, may be NULL. + /// + /// + /// a pointer filled in with the length, in bytes, of + /// the string that will fit, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This reports the number of characters that can be rendered before reaching + /// max_width. + /// + /// + /// This does not need to render the string to do this calculation. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool MeasureString( + TtfFont font, + string text, + nuint length, + int max_width, + int* measured_width, + nuint* measured_length + ) => PInvoke.MeasureString(font, text, length, max_width, measured_width, measured_length) != 0; + + /// + /// Ergonomic wrapper over TTF_RenderText_Solid. Throws instead of returning a null pointer on failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextSolid(TtfFont font, string text, nuint length, SdlColor fg) + { + SdlSurface* result = PInvoke.RenderTextSolid(font, text, length, fg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_Solid failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_Solid_Wrapped. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextSolidWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + int wrapLength + ) + { + SdlSurface* result = PInvoke.RenderTextSolidWrapped(font, text, length, fg, wrapLength); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_Solid_Wrapped failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_Solid. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// the character to render. + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderGlyphSolid(TtfFont font, uint ch, SdlColor fg) + { + SdlSurface* result = PInvoke.RenderGlyphSolid(font, ch, fg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderGlyph_Solid failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_Shaded. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextShaded(TtfFont font, string text, nuint length, SdlColor fg, SdlColor bg) + { + SdlSurface* result = PInvoke.RenderTextShaded(font, text, length, fg, bg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_Shaded failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_Shaded_Wrapped. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextShadedWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ) + { + SdlSurface* result = PInvoke.RenderTextShadedWrapped(font, text, length, fg, bg, wrap_width); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_Shaded_Wrapped failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_Shaded. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// the codepoint to render. + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderGlyphShaded(TtfFont font, uint ch, SdlColor fg, SdlColor bg) + { + SdlSurface* result = PInvoke.RenderGlyphShaded(font, ch, fg, bg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderGlyph_Shaded failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_Blended. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextBlended(TtfFont font, string text, nuint length, SdlColor fg) + { + SdlSurface* result = PInvoke.RenderTextBlended(font, text, length, fg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_Blended failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_Blended_Wrapped. Throws instead of returning a null pointer + /// on failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextBlendedWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + int wrap_width + ) + { + SdlSurface* result = PInvoke.RenderTextBlendedWrapped(font, text, length, fg, wrap_width); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_Blended_Wrapped failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_Blended. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// the codepoint to render. + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderGlyphBlended(TtfFont font, uint ch, SdlColor fg) + { + SdlSurface* result = PInvoke.RenderGlyphBlended(font, ch, fg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderGlyph_Blended failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_LCD. Throws instead of returning a null pointer on failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextLCD(TtfFont font, string text, nuint length, SdlColor fg, SdlColor bg) + { + SdlSurface* result = PInvoke.RenderTextLCD(font, text, length, fg, bg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_LCD failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderText_LCD_Wrapped. Throws instead of returning a null pointer on + /// failure. + /// + /// the font to render with. + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderTextLCDWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ) + { + SdlSurface* result = PInvoke.RenderTextLCDWrapped(font, text, length, fg, bg, wrap_width); + if (result == null) + { + throw SdlException.FromError("TTF_RenderText_LCD_Wrapped failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_LCD. Throws instead of returning a null pointer on failure. + /// + /// the font to render with. + /// the codepoint to render. + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static SdlSurface* RenderGlyphLCD(TtfFont font, uint ch, SdlColor fg, SdlColor bg) + { + SdlSurface* result = PInvoke.RenderGlyphLCD(font, ch, fg, bg); + if (result == null) + { + throw SdlException.FromError("TTF_RenderGlyph_LCD failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_CreateSurfaceTextEngine. Throws instead of returning a null pointer on + /// failure. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfTextEngine* CreateSurfaceTextEngine() + { + TtfTextEngine* result = PInvoke.CreateSurfaceTextEngine(); + if (result == null) + { + throw SdlException.FromError("TTF_CreateSurfaceTextEngine failed"); + } + return result; + } + + /// + /// Draw text to an SDL surface. + /// + /// the text to draw. + /// + /// the x coordinate in pixels, positive from the left edge towards + /// the right. + /// + /// + /// the y coordinate in pixels, positive from the top edge towards the + /// bottom. + /// + /// the surface to draw on. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// text must have been created using a TTF_TextEngine from + /// TTF_CreateSurfaceTextEngine(). + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool DrawSurfaceText(TtfText* text, int x, int y, SdlSurface* surface) => + PInvoke.DrawSurfaceText(text, x, y, surface) != 0; + + /// + /// Destroy a text engine created for drawing text on SDL surfaces. + /// + /// + /// a TTF_TextEngine object created with + /// TTF_CreateSurfaceTextEngine(). + /// + /// + /// + /// All text created by this engine should be destroyed before calling this + /// function. + /// + /// + /// + /// This function should be called on the thread that created the + /// engine. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void DestroySurfaceTextEngine(TtfTextEngine* engine) => PInvoke.DestroySurfaceTextEngine(engine); + + /// + /// Ergonomic wrapper over TTF_CreateRendererTextEngine. Throws instead of returning a null pointer on + /// failure. + /// + /// the renderer to use for creating textures and drawing text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfTextEngine* CreateRendererTextEngine(SdlRenderer renderer) + { + TtfTextEngine* result = PInvoke.CreateRendererTextEngine(renderer); + if (result == null) + { + throw SdlException.FromError("TTF_CreateRendererTextEngine failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_CreateRendererTextEngineWithProperties. Throws instead of returning a + /// null pointer on failure. + /// + /// the properties to use. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfTextEngine* CreateRendererTextEngineWithProperties(uint props) + { + TtfTextEngine* result = PInvoke.CreateRendererTextEngineWithProperties(props); + if (result == null) + { + throw SdlException.FromError("TTF_CreateRendererTextEngineWithProperties failed"); + } + return result; + } + + /// + /// Draw text to an SDL renderer. + /// + /// the text to draw. + /// + /// the x coordinate in pixels, positive from the left edge towards + /// the right. + /// + /// + /// the y coordinate in pixels, positive from the top edge towards the + /// bottom. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// text must have been created using a TTF_TextEngine from + /// TTF_CreateRendererTextEngine(), and will draw using the renderer passed to + /// that function. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool DrawRendererText(TtfText* text, float x, float y) => + PInvoke.DrawRendererText(text, x, y) != 0; + + /// + /// Destroy a text engine created for drawing text on an SDL renderer. + /// + /// + /// a TTF_TextEngine object created with + /// TTF_CreateRendererTextEngine(). + /// + /// + /// + /// All text created by this engine should be destroyed before calling this + /// function. + /// + /// + /// + /// This function should be called on the thread that created the + /// engine. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void DestroyRendererTextEngine(TtfTextEngine* engine) => + PInvoke.DestroyRendererTextEngine(engine); + + /// + /// Ergonomic wrapper over TTF_CreateGPUTextEngine. Throws instead of returning a null pointer on + /// failure. + /// + /// + /// the SDL_GPUDevice to use for creating textures and drawing + /// text. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfTextEngine* CreateGpuTextEngine(SdlGpuDevice device) + { + TtfTextEngine* result = PInvoke.CreateGpuTextEngine(device); + if (result == null) + { + throw SdlException.FromError("TTF_CreateGPUTextEngine failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over TTF_CreateGPUTextEngineWithProperties. Throws instead of returning a null + /// pointer on failure. + /// + /// the properties to use. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfTextEngine* CreateGpuTextEngineWithProperties(uint props) + { + TtfTextEngine* result = PInvoke.CreateGpuTextEngineWithProperties(props); + if (result == null) + { + throw SdlException.FromError("TTF_CreateGPUTextEngineWithProperties failed"); + } + return result; + } + + /// + /// Destroy a text engine created for drawing text with the SDL GPU API. + /// + /// + /// a TTF_TextEngine object created with + /// TTF_CreateGPUTextEngine(). + /// + /// + /// + /// All text created by this engine should be destroyed before calling this + /// function. + /// + /// + /// + /// This function should be called on the thread that created the + /// engine. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void DestroyGpuTextEngine(TtfTextEngine* engine) => PInvoke.DestroyGpuTextEngine(engine); + + /// + /// Sets the winding order of the vertices returned by TTF_GetGPUTextDrawData + /// for a particular GPU text engine. + /// + /// + /// a TTF_TextEngine object created with + /// TTF_CreateGPUTextEngine(). + /// + /// the new winding order option. + /// + /// This function should be called on the thread that created the + /// engine. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void SetGpuTextEngineWinding(TtfTextEngine* engine, TtfGpuTextEngineWinding winding) => + PInvoke.SetGpuTextEngineWinding(engine, winding); + + /// + /// Get the winding order of the vertices returned by TTF_GetGPUTextDrawData + /// for a particular GPU text engine + /// + /// + /// a TTF_TextEngine object created with + /// TTF_CreateGPUTextEngine(). + /// + /// + /// the winding order used by the GPU text engine or + /// TTF_GPU_TEXTENGINE_WINDING_INVALID in case of error. + /// + /// + /// This function should be called on the thread that created the + /// engine. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static TtfGpuTextEngineWinding GetGpuTextEngineWinding(TtfTextEngine* engine) => + PInvoke.GetGpuTextEngineWinding(engine); + + /// + /// Ergonomic wrapper over TTF_CreateText. Throws instead of returning a null pointer on failure. + /// + /// + /// the text engine to use when creating the text object, may be + /// NULL. + /// + /// the font to render with. + /// the text to use, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public static TtfText* CreateText(TtfTextEngine* engine, TtfFont font, string text, nuint length) + { + TtfText* result = PInvoke.CreateText(engine, font, text, length); + if (result == null) + { + throw SdlException.FromError("TTF_CreateText failed"); + } + return result; + } + + /// + /// Get the properties associated with a text object. + /// + /// the TTF_Text to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static uint GetTextProperties(TtfText* text) => PInvoke.GetTextProperties(text); + + /// + /// Set the text engine used by a text object. + /// + /// the TTF_Text to modify. + /// the text engine to use for drawing. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetTextEngine(TtfText* text, TtfTextEngine* engine) => + PInvoke.SetTextEngine(text, engine) != 0; + + /// + /// Set the font used by a text object. + /// + /// the TTF_Text to modify. + /// the font to use, may be NULL. + /// + /// false if the text pointer is null; otherwise, true. call + /// SDL_GetError() for more information. + /// + /// + /// + /// When a text object has a font, any changes to the font will automatically + /// regenerate the text. If you set the font to NULL, the text will continue to + /// render but changes to the font will no longer affect the text. + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetTextFont(TtfText* text, TtfFont font) => PInvoke.SetTextFont(text, font) != 0; + + /// + /// Ergonomic wrapper over TTF_GetTextFont. + /// + /// the TTF_Text to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public static TtfFont GetTextFont(TtfText* text) => PInvoke.GetTextFont(text); + + /// + /// Set the direction to be used for text shaping a text object. + /// + /// the text to modify. + /// the new direction for text to flow. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function only supports left-to-right text shaping if SDL_ttf was not + /// built with HarfBuzz support. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool SetTextDirection(TtfText* text, TtfDirection direction) => + PInvoke.SetTextDirection(text, direction) != 0; + + /// + /// Get the direction to be used for text shaping a text object. + /// + /// the text to query. + /// the direction to be used for text shaping. + /// + /// + /// This defaults to the direction of the font used by the text object. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static TtfDirection GetTextDirection(TtfText* text) => PInvoke.GetTextDirection(text); + + /// + /// Set the script to be used for text shaping a text object. + /// + /// the text to modify. + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// . + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns false if SDL_ttf isn't built with HarfBuzz support. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetTextScript(TtfText* text, uint script) => PInvoke.SetTextScript(text, script) != 0; + + /// + /// Get the script used for text shaping a text object. + /// + /// the text to query. + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// or 0 if a script hasn't been set on either the text object or the + /// font. + /// + /// + /// + /// This defaults to the script of the font used by the text object. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static uint GetTextScript(TtfText* text) => PInvoke.GetTextScript(text); + + /// + /// Set the color of a text object. + /// + /// the TTF_Text to modify. + /// the red color value in the range of 0-255. + /// the green color value in the range of 0-255. + /// the blue color value in the range of 0-255. + /// the alpha value in the range of 0-255. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The default text color is white (255, 255, 255, 255). + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool SetTextColor(TtfText* text, byte r, byte g, byte b, byte a) => + PInvoke.SetTextColor(text, r, g, b, a) != 0; + + /// + /// Set the color of a text object. + /// + /// the TTF_Text to modify. + /// the red color value, normally in the range of 0-1. + /// the green color value, normally in the range of 0-1. + /// the blue color value, normally in the range of 0-1. + /// the alpha value in the range of 0-1. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The default text color is white (1.0f, 1.0f, 1.0f, 1.0f). + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool SetTextColorFloat(TtfText* text, float r, float g, float b, float a) => + PInvoke.SetTextColorFloat(text, r, g, b, a) != 0; + + /// + /// Get the color of a text object. + /// + /// the TTF_Text to query. + /// + /// a pointer filled in with the red color value in the range of + /// 0-255, may be NULL. + /// + /// + /// a pointer filled in with the green color value in the range of + /// 0-255, may be NULL. + /// + /// + /// a pointer filled in with the blue color value in the range of + /// 0-255, may be NULL. + /// + /// + /// a pointer filled in with the alpha value in the range of 0-255, + /// may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool GetTextColor(TtfText* text, out byte r, out byte g, out byte b, out byte a) + { + r = default; + g = default; + b = default; + a = default; + fixed (byte* rPtr = &r) + { + fixed (byte* gPtr = &g) + { + fixed (byte* bPtr = &b) + { + fixed (byte* aPtr = &a) + { + return PInvoke.GetTextColor(text, rPtr, gPtr, bPtr, aPtr) != 0; + } + } + } + } + } + + /// + /// Get the color of a text object. + /// + /// the TTF_Text to query. + /// + /// a pointer filled in with the red color value, normally in the + /// range of 0-1, may be NULL. + /// + /// + /// a pointer filled in with the green color value, normally in the + /// range of 0-1, may be NULL. + /// + /// + /// a pointer filled in with the blue color value, normally in the + /// range of 0-1, may be NULL. + /// + /// + /// a pointer filled in with the alpha value in the range of 0-1, may + /// be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static bool GetTextColorFloat(TtfText* text, out float r, out float g, out float b, out float a) + { + r = default; + g = default; + b = default; + a = default; + fixed (float* rPtr = &r) + { + fixed (float* gPtr = &g) + { + fixed (float* bPtr = &b) + { + fixed (float* aPtr = &a) + { + return PInvoke.GetTextColorFloat(text, rPtr, gPtr, bPtr, aPtr) != 0; + } + } + } + } + } + + /// + /// Set the position of a text object. + /// + /// the TTF_Text to modify. + /// the x offset of the upper left corner of this text in pixels. + /// the y offset of the upper left corner of this text in pixels. + /// + /// + /// This can be used to position multiple text objects within a single wrapping + /// text area. + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetTextPosition(TtfText* text, int x, int y) => PInvoke.SetTextPosition(text, x, y) != 0; + + /// + /// Get the position of a text object. + /// + /// the TTF_Text to query. + /// + /// a pointer filled in with the x offset of the upper left corner of + /// this text in pixels, may be NULL. + /// + /// + /// a pointer filled in with the y offset of the upper left corner of + /// this text in pixels, may be NULL. + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool GetTextPosition(TtfText* text, out int x, out int y) + { + x = default; + y = default; + fixed (int* xPtr = &x) + { + fixed (int* yPtr = &y) + { + return PInvoke.GetTextPosition(text, xPtr, yPtr) != 0; + } + } + } + + /// + /// Set whether wrapping is enabled on a text object. + /// + /// the TTF_Text to modify. + /// + /// the maximum width in pixels, 0 to wrap on newline + /// characters. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetTextWrapWidth(TtfText* text, int wrap_width) => + PInvoke.SetTextWrapWidth(text, wrap_width) != 0; + + /// + /// Get whether wrapping is enabled on a text object. + /// + /// the TTF_Text to query. + /// + /// a pointer filled in with the maximum width in pixels or 0 + /// if the text is being wrapped on newline characters. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool GetTextWrapWidth(TtfText* text, out int wrap_width) + { + wrap_width = default; + fixed (int* wrap_widthPtr = &wrap_width) + { + return PInvoke.GetTextWrapWidth(text, wrap_widthPtr) != 0; + } + } + + /// + /// Set whether whitespace should be visible when wrapping a text object. + /// + /// the TTF_Text to modify. + /// + /// true to show whitespace when wrapping text, false to hide + /// it. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the whitespace is visible, it will take up space for purposes of + /// alignment and wrapping. This is good for editing, but looks better when + /// centered or aligned if whitespace around line wrapping is hidden. This + /// defaults false. + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool SetTextWrapWhitespaceVisible(TtfText* text, bool visible) => + PInvoke.SetTextWrapWhitespaceVisible(text, visible ? (byte)1 : (byte)0) != 0; + + /// + /// Return whether whitespace is shown when wrapping a text object. + /// + /// the TTF_Text to query. + /// + /// true if whitespace is shown when wrapping text, or false + /// otherwise. + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static bool TextWrapWhitespaceVisible(TtfText* text) => PInvoke.TextWrapWhitespaceVisible(text) != 0; + + /// + /// Set the UTF-8 text used by a text object. + /// + /// the TTF_Text to modify. + /// the UTF-8 text to use, may be NULL. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + /// + public static bool SetTextString(TtfText* text, string @string, nuint length) => + PInvoke.SetTextString(text, @string, length) != 0; + + /// + /// Insert UTF-8 text into a text object. + /// + /// the TTF_Text to modify. + /// + /// the offset, in bytes, from the beginning of the string if >= + /// 0, the offset from the end of the string if < 0. Note that + /// this does not do UTF-8 validation, so you should only insert + /// at UTF-8 sequence boundaries. + /// + /// the UTF-8 text to insert. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + /// + public static bool InsertTextString(TtfText* text, int offset, string @string, nuint length) => + PInvoke.InsertTextString(text, offset, @string, length) != 0; + + /// + /// Append UTF-8 text to a text object. + /// + /// the TTF_Text to modify. + /// the UTF-8 text to insert. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + /// + public static bool AppendTextString(TtfText* text, string @string, nuint length) => + PInvoke.AppendTextString(text, @string, length) != 0; + + /// + /// Delete UTF-8 text from a text object. + /// + /// the TTF_Text to modify. + /// + /// the offset, in bytes, from the beginning of the string if >= + /// 0, the offset from the end of the string if < 0. Note that + /// this does not do UTF-8 validation, so you should only delete + /// at UTF-8 sequence boundaries. + /// + /// + /// the length of text to delete, in bytes, or -1 for the + /// remainder of the string. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function may cause the internal text representation to be rebuilt. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + /// + public static bool DeleteTextString(TtfText* text, int offset, int length) => + PInvoke.DeleteTextString(text, offset, length) != 0; + + /// + /// Get the size of a text object. + /// + /// the TTF_Text to query. + /// + /// a pointer filled in with the width of the text, in pixels, may be + /// NULL. + /// + /// + /// a pointer filled in with the height of the text, in pixels, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The size of the text may change when the font or font style and size + /// change. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetTextSize(TtfText* text, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetTextSize(text, wPtr, hPtr) != 0; + } + } + } + + /// + /// Get the substring of a text object that surrounds a text offset. + /// + /// the TTF_Text to query. + /// a byte offset into the text string. + /// + /// a pointer filled in with the substring containing the + /// offset. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If offset is less than 0, this will return a zero length substring at the + /// beginning of the text with the TTF_SUBSTRING_TEXT_START flag set. If + /// offset is greater than or equal to the length of the text string, this + /// will return a zero length substring at the end of the text with the + /// TTF_SUBSTRING_TEXT_END flag set. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetTextSubString(TtfText* text, int offset, TtfSubString* substring) => + PInvoke.GetTextSubString(text, offset, substring) != 0; + + /// + /// Get the substring of a text object that contains the given line. + /// + /// the TTF_Text to query. + /// a zero-based line index, in the range [0 .. text->num_lines-1]. + /// + /// a pointer filled in with the substring containing the + /// offset. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If line is less than 0, this will return a zero length substring at the + /// beginning of the text with the TTF_SUBSTRING_TEXT_START flag set. If line + /// is greater than or equal to text->num_lines this will return a zero + /// length substring at the end of the text with the TTF_SUBSTRING_TEXT_END + /// flag set. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetTextSubStringForLine(TtfText* text, int line, TtfSubString* substring) => + PInvoke.GetTextSubStringForLine(text, line, substring) != 0; + + /// + /// Ergonomic wrapper over TTF_GetTextSubStringsForRange. + /// + /// the TTF_Text to query. + /// a byte offset into the text string. + /// + /// the length of the range being queried, in bytes, or -1 for + /// the remainder of the string. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. + /// + public static TtfSubString[] GetTextSubStringsForRange(TtfText* text, int offset, int length) + { + int count; + var ptr = PInvoke.GetTextSubStringsForRange(text, offset, length, &count); + if (ptr is null) + throw SdlException.FromError("TTF_GetTextSubStringsForRange failed"); + try + { + var result = new TtfSubString[count]; + for (var i = 0; i < count; i++) + result[i] = *ptr[i]; + return result; + } + finally + { + Sdl.PInvoke.Free(ptr); + } + } + + /// + /// Get the portion of a text string that is closest to a point. + /// + /// the TTF_Text to query. + /// + /// the x coordinate relative to the left side of the text, may be + /// outside the bounds of the text area. + /// + /// + /// the y coordinate relative to the top side of the text, may be + /// outside the bounds of the text area. + /// + /// + /// a pointer filled in with the closest substring of text to + /// the given point. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will return the closest substring of text to the given point. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetTextSubStringForPoint(TtfText* text, int x, int y, TtfSubString* substring) => + PInvoke.GetTextSubStringForPoint(text, x, y, substring) != 0; + + /// + /// Get the previous substring in a text object + /// + /// the TTF_Text to query. + /// the TTF_SubString to query. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If called at the start of the text, this will return a zero length + /// substring with the TTF_SUBSTRING_TEXT_START flag set. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetPreviousTextSubString(TtfText* text, TtfSubString* substring, TtfSubString* previous) => + PInvoke.GetPreviousTextSubString(text, substring, previous) != 0; + + /// + /// Get the next substring in a text object + /// + /// the TTF_Text to query. + /// the TTF_SubString to query. + /// a pointer filled in with the next substring. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If called at the end of the text, this will return a zero length substring + /// with the TTF_SUBSTRING_TEXT_END flag set. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool GetNextTextSubString(TtfText* text, TtfSubString* substring, TtfSubString* next) => + PInvoke.GetNextTextSubString(text, substring, next) != 0; + + /// + /// Update the layout of a text object. + /// + /// the TTF_Text to update. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is automatically done when the layout is requested or the text is + /// rendered, but you can call this if you need more control over the timing of + /// when the layout and text engine representation are updated. + /// + /// + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static bool UpdateText(TtfText* text) => PInvoke.UpdateText(text) != 0; + + /// + /// Destroy a text object created by a text engine. + /// + /// the text to destroy. + /// + /// This function should be called on the thread that created the + /// text. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public static void DestroyText(TtfText* text) => PInvoke.DestroyText(text); + + /// + /// Dispose of a previously-created font. + /// + /// the font to dispose of. + /// + /// + /// Call this when done with a font. This function will free any resources + /// associated with it. It is safe to call this function on NULL, for example + /// on the result of a failed call to TTF_OpenFont(). + /// + /// + /// The font is not valid after being passed to this function. String pointers + /// from functions that return information on this font, such as + /// TTF_GetFontFamilyName() and TTF_GetFontStyleName(), are no longer valid + /// after this call, as well. + /// + /// + /// + /// This function should not be called while any other thread is + /// using the font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static void CloseFont(TtfFont font) => PInvoke.CloseFont(font); + + /// + /// Deinitialize SDL_ttf. + /// + /// + /// + /// You must call this when done with the library, to free internal resources. + /// It is safe to call this when the library isn't initialized, as it will just + /// return immediately. + /// + /// + /// Once you have as many quit calls as you have had successful calls to + /// TTF_Init, the library will actually deinitialize. + /// + /// + /// Please note that this does not automatically close any fonts that are still + /// open at the time of deinitialization, and it is possibly not safe to close + /// them afterwards, as parts of the library will no longer be initialized to + /// deal with it. A well-written program should call TTF_CloseFont() on any + /// open fonts before calling this function! + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public static void Quit() => PInvoke.Quit(); + + /// + /// Check if SDL_ttf is initialized. + /// + /// + /// the current number of initialization calls, that need to + /// eventually be paired with this many calls to TTF_Quit(). + /// + /// + /// + /// This reports the number of times the library has been initialized by a call + /// to TTF_Init(), without a paired deinitialization request from TTF_Quit(). + /// + /// + /// In short: if it's greater than zero, the library is currently initialized + /// and ready to work. If zero, it is not initialized. + /// + /// + /// Despite the return value being a signed integer, this function should not + /// return a negative number. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public static int WasInit() => PInvoke.WasInit(); + } +} diff --git a/Brutal.Sdl.Ttf/Generated/SdlTtf.Constants.gen.cs b/Brutal.Sdl.Ttf/Generated/SdlTtf.Constants.gen.cs new file mode 100644 index 0000000..0cb1038 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/SdlTtf.Constants.gen.cs @@ -0,0 +1,50 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public static unsafe partial class SdlTtf + { + public static class Constants + { + public const int FontWeightBlack = 900; + public const int FontWeightBold = 700; + public const int FontWeightExtraBlack = 950; + public const int FontWeightExtraBold = 800; + public const int FontWeightExtraLight = 200; + public const int FontWeightLight = 300; + public const int FontWeightMedium = 500; + public const int FontWeightNormal = 400; + public const int FontWeightSemiBold = 600; + public const int FontWeightThin = 100; + public const string PropFontCreateExistingFont = "SDL_ttf.font.create.existing_font"; + public const string PropFontCreateFaceNumber = "SDL_ttf.font.create.face"; + public const string PropFontCreateFilenameString = "SDL_ttf.font.create.filename"; + public const string PropFontCreateHorizontalDpiNumber = "SDL_ttf.font.create.hdpi"; + public const string PropFontCreateIostreamAutocloseBoolean = "SDL_ttf.font.create.iostream.autoclose"; + public const string PropFontCreateIostreamOffsetNumber = "SDL_ttf.font.create.iostream.offset"; + public const string PropFontCreateIostreamPointer = "SDL_ttf.font.create.iostream"; + public const string PropFontCreateSizeFloat = "SDL_ttf.font.create.size"; + public const string PropFontCreateVerticalDpiNumber = "SDL_ttf.font.create.vdpi"; + public const string PropFontOutlineLineCapNumber = "SDL_ttf.font.outline.line_cap"; + public const string PropFontOutlineLineJoinNumber = "SDL_ttf.font.outline.line_join"; + public const string PropFontOutlineMiterLimitNumber = "SDL_ttf.font.outline.miter_limit"; + public const string PropGpuTextEngineAtlasTextureSize = "SDL_ttf.gpu_text_engine.create.atlas_texture_size"; + public const string PropGpuTextEngineDevice = "SDL_ttf.gpu_text_engine.create.device"; + public const string PropRendererTextEngineAtlasTextureSize = + "SDL_ttf.renderer_text_engine.create.atlas_texture_size"; + public const string PropRendererTextEngineRenderer = "SDL_ttf.renderer_text_engine.create.renderer"; + public const int StyleBold = 1; + public const int StyleItalic = 2; + public const int StyleNormal = 0; + public const int StyleStrikethrough = 8; + public const int StyleUnderline = 4; + public const int SubstringDirectionMask = 255; + public const int SubstringLineEnd = 1024; + public const int SubstringLineStart = 512; + public const int SubstringTextEnd = 2048; + public const int SubstringTextStart = 256; + } + } +} diff --git a/Brutal.Sdl.Ttf/Generated/SdlTtf.Delegates.gen.cs b/Brutal.Sdl.Ttf/Generated/SdlTtf.Delegates.gen.cs new file mode 100644 index 0000000..8425adb --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/SdlTtf.Delegates.gen.cs @@ -0,0 +1,5 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf { } diff --git a/Brutal.Sdl.Ttf/Generated/SdlTtf.HandleMethods.gen.cs b/Brutal.Sdl.Ttf/Generated/SdlTtf.HandleMethods.gen.cs new file mode 100644 index 0000000..873b2d0 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/SdlTtf.HandleMethods.gen.cs @@ -0,0 +1,1296 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public readonly unsafe partial struct TtfFont + { + /// + /// Add a fallback font. + /// + /// the font to add as a fallback. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Add a font that will be used for glyphs that are not in the current font. + /// The fallback font should have the same size and style as the current font. + /// + /// + /// If there are multiple fallback fonts, they are used in the order added. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created + /// both fonts. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public bool AddFallback(TtfFont fallback) => SdlTtf.AddFallbackFont(this, fallback); + + /// + /// Remove all fallback fonts. + /// + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public void ClearFallbackFonts() => SdlTtf.ClearFallbackFonts(this); + + /// + /// Dispose of a previously-created font. + /// + /// + /// + /// Call this when done with a font. This function will free any resources + /// associated with it. It is safe to call this function on NULL, for example + /// on the result of a failed call to TTF_OpenFont(). + /// + /// + /// The font is not valid after being passed to this function. String pointers + /// from functions that return information on this font, such as + /// TTF_GetFontFamilyName() and TTF_GetFontStyleName(), are no longer valid + /// after this call, as well. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function should not be called while any other thread is + /// using the font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public void Close() + { + if (IsNull()) + { + return; + } + SdlTtf.CloseFont(this); + } + + /// + /// Ergonomic wrapper over TTF_CopyFont. Throws instead of returning a null handle on failure. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public TtfFont Copy() => SdlTtf.CopyFont(this); + + /// + /// Check whether a glyph is provided by the font for a UNICODE codepoint. + /// + /// the codepoint to check. + /// true if font provides a glyph for this character, false if not. + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool HasGlyph(uint ch) => SdlTtf.FontHasGlyph(this, ch); + + /// + /// Query whether a font is fixed-width. + /// + /// true if the font is fixed-width, false otherwise. + /// + /// + /// A "fixed-width" font means all glyphs are the same width across; a + /// lowercase 'i' will be the same size across as a capital 'W', for example. + /// This is common for terminals and text editors, and other apps that treat + /// text as a grid. Most other things (WYSIWYG word processors, web pages, etc) + /// are more likely to not be fixed-width in most cases. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool IsFixedWidth() => SdlTtf.FontIsFixedWidth(this); + + /// + /// Query whether a font is scalable or not. + /// + /// true if the font is scalable, false otherwise. + /// + /// + /// Scalability lets us distinguish between outline and bitmap fonts. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool IsScalable() => SdlTtf.FontIsScalable(this); + + /// + /// Query the offset from the baseline to the top of a font. + /// + /// the font's ascent. + /// + /// + /// This is a positive value, relative to the baseline. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public int GetAscent() => SdlTtf.GetFontAscent(this); + + /// + /// Get font target resolutions, in dots per inch. + /// + /// a pointer filled in with the target horizontal DPI. + /// a pointer filled in with the target vertical DPI. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool GetDPI(out int hdpi, out int vdpi) => SdlTtf.GetFontDPI(this, out hdpi, out vdpi); + + /// + /// Query the offset from the baseline to the bottom of a font. + /// + /// the font's descent. + /// + /// + /// This is a negative value, relative to the baseline. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public int GetDescent() => SdlTtf.GetFontDescent(this); + + /// + /// Get the direction to be used for text shaping by a font. + /// + /// the direction to be used for text shaping. + /// + /// + /// This defaults to TTF_DIRECTION_INVALID if it hasn't been set. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public TtfDirection GetDirection() => SdlTtf.GetFontDirection(this); + + /// + /// Query a font's family name. + /// + /// the font's family name. + /// + /// + /// This string is dictated by the contents of the font file. + /// + /// + /// Note that the returned string is to internal storage, and should not be + /// modified or free'd by the caller. The string becomes invalid, with the rest + /// of the font, when font is handed to TTF_CloseFont(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public string? GetFamilyName() => SdlTtf.GetFontFamilyName(this); + + /// + /// Get the font generation. + /// + /// + /// the font generation or 0 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The generation is incremented each time font properties change that require + /// rebuilding glyphs, such as style, size, etc. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public uint GetGeneration() => SdlTtf.GetFontGeneration(this); + + /// + /// Query the total height of a font. + /// + /// the font's height. + /// + /// + /// This is usually equal to point size. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public int GetHeight() => SdlTtf.GetFontHeight(this); + + /// + /// Query a font's current FreeType hinter setting. + /// + /// + /// the font's current hinter value, or TTF_HINTING_INVALID if the + /// font is invalid. + /// + /// + /// + /// The hinter setting is a single value: + /// + /// + /// - TTF_HINTING_NORMAL + /// - TTF_HINTING_LIGHT + /// - TTF_HINTING_MONO + /// - TTF_HINTING_NONE + /// - TTF_HINTING_LIGHT_SUBPIXEL (available in SDL_ttf 3.0.0 and later) + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public TtfHintingFlags GetHinting() => SdlTtf.GetFontHinting(this); + + /// + /// Query whether or not kerning is enabled for a font. + /// + /// true if kerning is enabled, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool GetKerning() => SdlTtf.GetFontKerning(this); + + /// + /// Query the spacing between lines of text for a font. + /// + /// the font's recommended spacing. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public int GetLineSkip() => SdlTtf.GetFontLineSkip(this); + + /// + /// Query a font's current outline. + /// + /// the font's current outline value. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public int GetOutline() => SdlTtf.GetFontOutline(this); + + /// + /// Get the properties associated with a font. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-write properties are provided by SDL: + /// + /// + /// - TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER: The FT_Stroker_LineCap value + /// used when setting the font outline, defaults to + /// FT_STROKER_LINECAP_ROUND. + /// - TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER: The FT_Stroker_LineJoin value + /// used when setting the font outline, defaults to + /// FT_STROKER_LINEJOIN_ROUND. + /// - TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER: The FT_Fixed miter limit used + /// when setting the font outline, defaults to 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public uint GetProperties() => SdlTtf.GetFontProperties(this); + + /// + /// Query whether Signed Distance Field rendering is enabled for a font. + /// + /// true if enabled, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool GetSDF() => SdlTtf.GetFontSDF(this); + + /// + /// Get the script used for text shaping a font. + /// + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// or 0 if a script hasn't been set. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public uint GetScript() => SdlTtf.GetFontScript(this); + + /// + /// Get the size of a font. + /// + /// + /// the size of the font, or 0.0f on failure; call SDL_GetError() for + /// more information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public float GetSize() => SdlTtf.GetFontSize(this); + + /// + /// Query a font's current style. + /// + /// the current font style, as a set of bit flags. + /// + /// + /// The font styles are a set of bit flags, OR'd together: + /// + /// + /// - TTF_STYLE_NORMAL (is zero) + /// - TTF_STYLE_BOLD + /// - TTF_STYLE_ITALIC + /// - TTF_STYLE_UNDERLINE + /// - TTF_STYLE_STRIKETHROUGH + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public TtfFontStyleFlags GetStyle() => SdlTtf.GetFontStyle(this); + + /// + /// Query a font's style name. + /// + /// the font's style name. + /// + /// + /// This string is dictated by the contents of the font file. + /// + /// + /// Note that the returned string is to internal storage, and should not be + /// modified or free'd by the caller. The string becomes invalid, with the rest + /// of the font, when font is handed to TTF_CloseFont(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public string? GetStyleName() => SdlTtf.GetFontStyleName(this); + + /// + /// Query a font's weight, in terms of the lightness/heaviness of the strokes. + /// + /// the font's current weight. + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.4.0. + /// + public int GetWeight() => SdlTtf.GetFontWeight(this); + + /// + /// Query a font's current wrap alignment option. + /// + /// the font's current wrap alignment option. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public TtfHorizontalAlignment GetWrapAlignment() => SdlTtf.GetFontWrapAlignment(this); + + /// + /// Get the pixel image for a UNICODE codepoint. + /// + /// the codepoint to check. + /// + /// a pointer filled in with the glyph image type, may be + /// NULL. + /// + /// + /// an SDL_Surface containing the glyph, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public SdlSurface* GetGlyphImage(uint ch, out TtfImageType image_type) => + SdlTtf.GetGlyphImage(this, ch, out image_type); + + /// + /// Get the pixel image for a character index. + /// + /// the index of the glyph to return. + /// + /// a pointer filled in with the glyph image type, may be + /// NULL. + /// + /// + /// an SDL_Surface containing the glyph, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// This is useful for text engine implementations, which can call this with + /// the glyph_index in a TTF_CopyOperation + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public SdlSurface* GetGlyphImageForIndex(uint glyph_index, out TtfImageType image_type) => + SdlTtf.GetGlyphImageForIndex(this, glyph_index, out image_type); + + /// + /// Query the kerning size between the glyphs of two UNICODE codepoints. + /// + /// the previous codepoint. + /// the current codepoint. + /// + /// a pointer filled in with the kerning size between the two + /// glyphs, in pixels, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool GetGlyphKerning(uint previous_ch, uint ch, out int kerning) => + SdlTtf.GetGlyphKerning(this, previous_ch, ch, out kerning); + + /// + /// Query the metrics (dimensions) of a font's glyph for a UNICODE codepoint. + /// + /// the codepoint to check. + /// + /// a pointer filled in with the minimum x coordinate of the glyph + /// from the left edge of its bounding box. This value may be + /// negative. + /// + /// + /// a pointer filled in with the maximum x coordinate of the glyph + /// from the left edge of its bounding box. + /// + /// + /// a pointer filled in with the minimum y coordinate of the glyph + /// from the bottom edge of its bounding box. This value may be + /// negative. + /// + /// + /// a pointer filled in with the maximum y coordinate of the glyph + /// from the bottom edge of its bounding box. + /// + /// + /// a pointer filled in with the distance to the next glyph from + /// the left edge of this glyph's bounding box. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// To understand what these metrics mean, here is a useful link: + /// + /// + /// https://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool GetGlyphMetrics(uint ch, out int minx, out int maxx, out int miny, out int maxy, out int advance) => + SdlTtf.GetGlyphMetrics(this, ch, out minx, out maxx, out miny, out maxy, out advance); + + /// + /// Query the number of faces of a font. + /// + /// the number of FreeType font faces. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public int GetNumFaces() => SdlTtf.GetNumFontFaces(this); + + /// + /// Calculate the dimensions of a rendered string of UTF-8 text. + /// + /// text to calculate, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// will be filled with width, in pixels, on return. + /// will be filled with height, in pixels, on return. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will report the width and height, in pixels, of the space that the + /// specified string will take to fully render. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool GetStringSize(string text, nuint length, int* w, int* h) => + SdlTtf.GetStringSize(this, text, length, w, h); + + /// + /// Calculate the dimensions of a rendered string of UTF-8 text. + /// + /// text to calculate, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the maximum width or 0 to wrap on newline characters. + /// will be filled with width, in pixels, on return. + /// will be filled with height, in pixels, on return. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will report the width and height, in pixels, of the space that the + /// specified string will take to fully render. + /// + /// + /// Text is wrapped to multiple lines on line endings and on word boundaries if + /// it extends beyond wrap_width in pixels. + /// + /// + /// If wrap_width is 0, this function will only wrap on newline characters. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool GetStringSizeWrapped(string text, nuint length, int wrap_width, int* w, int* h) => + SdlTtf.GetStringSizeWrapped(this, text, length, wrap_width, w, h); + + /// + /// Calculate how much of a UTF-8 string will fit in a given width. + /// + /// text to calculate, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// + /// maximum width, in pixels, available for the string, or 0 + /// for unbounded width. + /// + /// + /// a pointer filled in with the width, in pixels, of the + /// string that will fit, may be NULL. + /// + /// + /// a pointer filled in with the length, in bytes, of + /// the string that will fit, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This reports the number of characters that can be rendered before reaching + /// max_width. + /// + /// + /// This does not need to render the string to do this calculation. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool MeasureString( + string text, + nuint length, + int max_width, + int* measured_width, + nuint* measured_length + ) => SdlTtf.MeasureString(this, text, length, max_width, measured_width, measured_length); + + /// + /// Remove a fallback font. + /// + /// the font to remove as a fallback. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created + /// both fonts. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + /// + public void RemoveFallback(TtfFont fallback) => SdlTtf.RemoveFallbackFont(this, fallback); + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_Blended. Throws instead of returning a null pointer on + /// failure. + /// + /// the codepoint to render. + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderGlyphBlended(uint ch, SdlColor fg) => SdlTtf.RenderGlyphBlended(this, ch, fg); + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_LCD. Throws instead of returning a null pointer on failure. + /// + /// the codepoint to render. + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderGlyphLCD(uint ch, SdlColor fg, SdlColor bg) => SdlTtf.RenderGlyphLCD(this, ch, fg, bg); + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_Shaded. Throws instead of returning a null pointer on + /// failure. + /// + /// the codepoint to render. + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderGlyphShaded(uint ch, SdlColor fg, SdlColor bg) => + SdlTtf.RenderGlyphShaded(this, ch, fg, bg); + + /// + /// Ergonomic wrapper over TTF_RenderGlyph_Solid. Throws instead of returning a null pointer on + /// failure. + /// + /// the character to render. + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderGlyphSolid(uint ch, SdlColor fg) => SdlTtf.RenderGlyphSolid(this, ch, fg); + + /// + /// Ergonomic wrapper over TTF_RenderText_Blended. Throws instead of returning a null pointer on + /// failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextBlended(string text, nuint length, SdlColor fg) => + SdlTtf.RenderTextBlended(this, text, length, fg); + + /// + /// Ergonomic wrapper over TTF_RenderText_Blended_Wrapped. Throws instead of returning a null pointer + /// on failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextBlendedWrapped(string text, nuint length, SdlColor fg, int wrap_width) => + SdlTtf.RenderTextBlendedWrapped(this, text, length, fg, wrap_width); + + /// + /// Ergonomic wrapper over TTF_RenderText_LCD. Throws instead of returning a null pointer on failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextLCD(string text, nuint length, SdlColor fg, SdlColor bg) => + SdlTtf.RenderTextLCD(this, text, length, fg, bg); + + /// + /// Ergonomic wrapper over TTF_RenderText_LCD_Wrapped. Throws instead of returning a null pointer on + /// failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextLCDWrapped(string text, nuint length, SdlColor fg, SdlColor bg, int wrap_width) => + SdlTtf.RenderTextLCDWrapped(this, text, length, fg, bg, wrap_width); + + /// + /// Ergonomic wrapper over TTF_RenderText_Shaded. Throws instead of returning a null pointer on + /// failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextShaded(string text, nuint length, SdlColor fg, SdlColor bg) => + SdlTtf.RenderTextShaded(this, text, length, fg, bg); + + /// + /// Ergonomic wrapper over TTF_RenderText_Shaded_Wrapped. Throws instead of returning a null pointer on + /// failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// the background color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextShadedWrapped( + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ) => SdlTtf.RenderTextShadedWrapped(this, text, length, fg, bg, wrap_width); + + /// + /// Ergonomic wrapper over TTF_RenderText_Solid. Throws instead of returning a null pointer on failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextSolid(string text, nuint length, SdlColor fg) => + SdlTtf.RenderTextSolid(this, text, length, fg); + + /// + /// Ergonomic wrapper over TTF_RenderText_Solid_Wrapped. Throws instead of returning a null pointer on + /// failure. + /// + /// text to render, in UTF-8 encoding. + /// + /// the length of the text, in bytes, or 0 for null terminated + /// text. + /// + /// the foreground color for the text. + /// + /// the maximum width of the text surface or 0 to wrap on + /// newline characters. + /// + /// The created resource (never null); the caller owns it and is responsible for freeing it. + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlSurface* RenderTextSolidWrapped(string text, nuint length, SdlColor fg, int wrapLength) => + SdlTtf.RenderTextSolidWrapped(this, text, length, fg, wrapLength); + + /// + /// Set the direction to be used for text shaping by a font. + /// + /// the new direction for text to flow. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function only supports left-to-right text shaping if SDL_ttf was not + /// built with HarfBuzz support. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool SetDirection(TtfDirection direction) => SdlTtf.SetFontDirection(this, direction); + + /// + /// Set a font's current hinter setting. + /// + /// the new hinter setting. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// The hinter setting is a single value: + /// + /// + /// - TTF_HINTING_NORMAL + /// - TTF_HINTING_LIGHT + /// - TTF_HINTING_MONO + /// - TTF_HINTING_NONE + /// - TTF_HINTING_LIGHT_SUBPIXEL (available in SDL_ttf 3.0.0 and later) + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public void SetHinting(TtfHintingFlags hinting) => SdlTtf.SetFontHinting(this, hinting); + + /// + /// Set if kerning is enabled for a font. + /// + /// true to enable kerning, false to disable. + /// + /// + /// Newly-opened fonts default to allowing kerning. This is generally a good + /// policy unless you have a strong reason to disable it, as it tends to + /// produce better rendering (with kerning disabled, some fonts might render + /// the word kerning as something that looks like keming for example). + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public void SetKerning(bool enabled) => SdlTtf.SetFontKerning(this, enabled); + + /// + /// Set language to be used for text shaping by a font. + /// + /// + /// a null-terminated string containing the desired + /// language's BCP47 code. Or null to reset the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If SDL_ttf was not built with HarfBuzz support, this function returns + /// false. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + public bool SetLanguage(string language_bcp47) => SdlTtf.SetFontLanguage(this, language_bcp47); + + /// + /// Set the spacing between lines of text for a font. + /// + /// the new line spacing for the font. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public void SetLineSkip(int lineskip) => SdlTtf.SetFontLineSkip(this, lineskip); + + /// + /// Set a font's current outline. + /// + /// positive outline value, 0 to default. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This uses the font properties TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER, + /// TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER, and + /// TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER when setting the font outline. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool SetOutline(int outline) => SdlTtf.SetFontOutline(this, outline); + + /// + /// Enable Signed Distance Field rendering for a font. + /// + /// true to enable SDF, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// SDF is a technique that helps fonts look sharp even when scaling and + /// rotating, and requires special shader support for display. + /// + /// + /// This works with Blended APIs, and generates the raw signed distance values + /// in the alpha channel of the resulting texture. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool SetSDF(bool enabled) => SdlTtf.SetFontSDF(this, enabled); + + /// + /// Set the script to be used for text shaping by a font. + /// + /// + /// an + /// [ISO 15924 code](https://unicode.org/iso15924/iso15924-codes.html) + /// . + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns false if SDL_ttf isn't built with HarfBuzz support. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool SetScript(uint script) => SdlTtf.SetFontScript(this, script); + + /// + /// Set a font's size dynamically. + /// + /// the new point size. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool SetSize(float ptsize) => SdlTtf.SetFontSize(this, ptsize); + + /// + /// Set font size dynamically with target resolutions, in dots per inch. + /// + /// the new point size. + /// the target horizontal DPI. + /// the target vertical DPI. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public bool SetSizeDPI(float ptsize, int hdpi, int vdpi) => SdlTtf.SetFontSizeDPI(this, ptsize, hdpi, vdpi); + + /// + /// Set a font's current style. + /// + /// the new style values to set, OR'd together. + /// + /// + /// This updates any TTF_Text objects using this font, and clears + /// already-generated glyphs, if any, from the cache. + /// + /// + /// The font styles are a set of bit flags, OR'd together: + /// + /// + /// - TTF_STYLE_NORMAL (is zero) + /// - TTF_STYLE_BOLD + /// - TTF_STYLE_ITALIC + /// - TTF_STYLE_UNDERLINE + /// - TTF_STYLE_STRIKETHROUGH + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public void SetStyle(TtfFontStyleFlags style) => SdlTtf.SetFontStyle(this, style); + + /// + /// Set a font's current wrap alignment option. + /// + /// the new wrap alignment option. + /// + /// + /// This updates any TTF_Text objects using this font. + /// + /// + /// + /// This function should be called on the thread that created the + /// font. + /// + /// + /// This function is available since SDL_ttf 3.0.0. + /// + /// + public void SetWrapAlignment(TtfHorizontalAlignment align) => SdlTtf.SetFontWrapAlignment(this, align); + } +} diff --git a/Brutal.Sdl.Ttf/Generated/SdlTtf.Handles.gen.cs b/Brutal.Sdl.Ttf/Generated/SdlTtf.Handles.gen.cs new file mode 100644 index 0000000..ed7691a --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/SdlTtf.Handles.gen.cs @@ -0,0 +1,26 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +using System; +using Brutal.Interop; + +namespace Brutal.SdlApi.Ttf; + +/// +/// A strongly-typed interop handle wrapping the opaque SDL TTF_Font pointer. +/// +[InteropHandle] +public readonly unsafe partial struct TtfFont : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + SdlTtf.PInvoke.CloseFont(this); + } +} diff --git a/Brutal.Sdl.Ttf/Generated/SdlTtf.PInvoke.gen.cs b/Brutal.Sdl.Ttf/Generated/SdlTtf.PInvoke.gen.cs new file mode 100644 index 0000000..3d5e443 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/SdlTtf.PInvoke.gen.cs @@ -0,0 +1,1416 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + public static unsafe partial class SdlTtf + { + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "TTF_Version")] + private static partial int _Version(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Version() + { + SdlTtf.TraceLog.Trace(); + return _Version(); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFreeTypeVersion")] + private static partial void _GetFreeTypeVersion(int* major, int* minor, int* patch); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetFreeTypeVersion(int* major, int* minor, int* patch) + { + SdlTtf.TraceLog.Trace(); + _GetFreeTypeVersion(major, minor, patch); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetHarfBuzzVersion")] + private static partial void _GetHarfBuzzVersion(int* major, int* minor, int* patch); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetHarfBuzzVersion(int* major, int* minor, int* patch) + { + SdlTtf.TraceLog.Trace(); + _GetHarfBuzzVersion(major, minor, patch); + } + + [LibraryImport(Dll, EntryPoint = "TTF_Init")] + private static partial byte _Init(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte Init() + { + SdlTtf.TraceLog.Trace(); + return _Init(); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_OpenFont", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial TtfFont _OpenFont(string file, float ptsize); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfFont OpenFont(string file, float ptsize) + { + SdlTtf.TraceLog.Trace(); + return _OpenFont(file, ptsize); + } + + [LibraryImport(Dll, EntryPoint = "TTF_OpenFontIO")] + private static partial TtfFont _OpenFontIO(nint src, byte closeio, float ptsize); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfFont OpenFontIO(nint src, byte closeio, float ptsize) + { + SdlTtf.TraceLog.Trace(); + return _OpenFontIO(src, closeio, ptsize); + } + + [LibraryImport(Dll, EntryPoint = "TTF_OpenFontWithProperties")] + private static partial TtfFont _OpenFontWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfFont OpenFontWithProperties(uint props) + { + SdlTtf.TraceLog.Trace(); + return _OpenFontWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CopyFont")] + private static partial TtfFont _CopyFont(TtfFont existing_font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfFont CopyFont(TtfFont existing_font) + { + SdlTtf.TraceLog.Trace(); + return _CopyFont(existing_font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontProperties")] + private static partial uint _GetFontProperties(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetFontProperties(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontProperties(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontGeneration")] + private static partial uint _GetFontGeneration(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetFontGeneration(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontGeneration(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_AddFallbackFont")] + private static partial byte _AddFallbackFont(TtfFont font, TtfFont fallback); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AddFallbackFont(TtfFont font, TtfFont fallback) + { + SdlTtf.TraceLog.Trace(); + return _AddFallbackFont(font, fallback); + } + + [LibraryImport(Dll, EntryPoint = "TTF_RemoveFallbackFont")] + private static partial void _RemoveFallbackFont(TtfFont font, TtfFont fallback); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveFallbackFont(TtfFont font, TtfFont fallback) + { + SdlTtf.TraceLog.Trace(); + _RemoveFallbackFont(font, fallback); + } + + [LibraryImport(Dll, EntryPoint = "TTF_ClearFallbackFonts")] + private static partial void _ClearFallbackFonts(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ClearFallbackFonts(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + _ClearFallbackFonts(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontSize")] + private static partial byte _SetFontSize(TtfFont font, float ptsize); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontSize(TtfFont font, float ptsize) + { + SdlTtf.TraceLog.Trace(); + return _SetFontSize(font, ptsize); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontSizeDPI")] + private static partial byte _SetFontSizeDPI(TtfFont font, float ptsize, int hdpi, int vdpi); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontSizeDPI(TtfFont font, float ptsize, int hdpi, int vdpi) + { + SdlTtf.TraceLog.Trace(); + return _SetFontSizeDPI(font, ptsize, hdpi, vdpi); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontSize")] + private static partial float _GetFontSize(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetFontSize(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontSize(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontDPI")] + private static partial byte _GetFontDPI(TtfFont font, int* hdpi, int* vdpi); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetFontDPI(TtfFont font, int* hdpi, int* vdpi) + { + SdlTtf.TraceLog.Trace(); + return _GetFontDPI(font, hdpi, vdpi); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontStyle")] + private static partial void _SetFontStyle(TtfFont font, TtfFontStyleFlags style); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFontStyle(TtfFont font, TtfFontStyleFlags style) + { + SdlTtf.TraceLog.Trace(); + _SetFontStyle(font, style); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontStyle")] + private static partial TtfFontStyleFlags _GetFontStyle(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfFontStyleFlags GetFontStyle(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontStyle(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontOutline")] + private static partial byte _SetFontOutline(TtfFont font, int outline); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontOutline(TtfFont font, int outline) + { + SdlTtf.TraceLog.Trace(); + return _SetFontOutline(font, outline); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontOutline")] + private static partial int _GetFontOutline(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetFontOutline(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontOutline(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontHinting")] + private static partial void _SetFontHinting(TtfFont font, TtfHintingFlags hinting); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFontHinting(TtfFont font, TtfHintingFlags hinting) + { + SdlTtf.TraceLog.Trace(); + _SetFontHinting(font, hinting); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetNumFontFaces")] + private static partial int _GetNumFontFaces(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumFontFaces(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetNumFontFaces(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontHinting")] + private static partial TtfHintingFlags _GetFontHinting(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfHintingFlags GetFontHinting(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontHinting(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontSDF")] + private static partial byte _SetFontSDF(TtfFont font, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontSDF(TtfFont font, byte enabled) + { + SdlTtf.TraceLog.Trace(); + return _SetFontSDF(font, enabled); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontSDF")] + private static partial byte _GetFontSDF(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetFontSDF(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontSDF(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontWeight")] + private static partial int _GetFontWeight(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetFontWeight(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontWeight(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontWrapAlignment")] + private static partial void _SetFontWrapAlignment(TtfFont font, TtfHorizontalAlignment align); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFontWrapAlignment(TtfFont font, TtfHorizontalAlignment align) + { + SdlTtf.TraceLog.Trace(); + _SetFontWrapAlignment(font, align); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontWrapAlignment")] + private static partial TtfHorizontalAlignment _GetFontWrapAlignment(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfHorizontalAlignment GetFontWrapAlignment(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontWrapAlignment(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontHeight")] + private static partial int _GetFontHeight(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetFontHeight(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontHeight(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontAscent")] + private static partial int _GetFontAscent(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetFontAscent(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontAscent(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontDescent")] + private static partial int _GetFontDescent(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetFontDescent(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontDescent(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontLineSkip")] + private static partial void _SetFontLineSkip(TtfFont font, int lineskip); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFontLineSkip(TtfFont font, int lineskip) + { + SdlTtf.TraceLog.Trace(); + _SetFontLineSkip(font, lineskip); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontLineSkip")] + private static partial int _GetFontLineSkip(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetFontLineSkip(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontLineSkip(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontKerning")] + private static partial void _SetFontKerning(TtfFont font, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFontKerning(TtfFont font, byte enabled) + { + SdlTtf.TraceLog.Trace(); + _SetFontKerning(font, enabled); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontKerning")] + private static partial byte _GetFontKerning(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetFontKerning(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontKerning(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_FontIsFixedWidth")] + private static partial byte _FontIsFixedWidth(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FontIsFixedWidth(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _FontIsFixedWidth(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_FontIsScalable")] + private static partial byte _FontIsScalable(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FontIsScalable(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _FontIsScalable(font); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_GetFontFamilyName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetFontFamilyName(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetFontFamilyName(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontFamilyName(font); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_GetFontStyleName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetFontStyleName(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetFontStyleName(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontStyleName(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontDirection")] + private static partial byte _SetFontDirection(TtfFont font, TtfDirection direction); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontDirection(TtfFont font, TtfDirection direction) + { + SdlTtf.TraceLog.Trace(); + return _SetFontDirection(font, direction); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontDirection")] + private static partial TtfDirection _GetFontDirection(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfDirection GetFontDirection(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontDirection(font); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_StringToTag", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial uint _StringToTag(string @string); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint StringToTag(string @string) + { + SdlTtf.TraceLog.Trace(); + return _StringToTag(@string); + } + + [LibraryImport(Dll, EntryPoint = "TTF_TagToString")] + private static partial void _TagToString(uint tag, byte* @string, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void TagToString(uint tag, byte* @string, nuint size) + { + SdlTtf.TraceLog.Trace(); + _TagToString(tag, @string, size); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetFontScript")] + private static partial byte _SetFontScript(TtfFont font, uint script); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontScript(TtfFont font, uint script) + { + SdlTtf.TraceLog.Trace(); + return _SetFontScript(font, script); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetFontScript")] + private static partial uint _GetFontScript(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetFontScript(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _GetFontScript(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGlyphScript")] + private static partial uint _GetGlyphScript(uint ch); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGlyphScript(uint ch) + { + SdlTtf.TraceLog.Trace(); + return _GetGlyphScript(ch); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_SetFontLanguage", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetFontLanguage(TtfFont font, string language_bcp47); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFontLanguage(TtfFont font, string language_bcp47) + { + SdlTtf.TraceLog.Trace(); + return _SetFontLanguage(font, language_bcp47); + } + + [LibraryImport(Dll, EntryPoint = "TTF_FontHasGlyph")] + private static partial byte _FontHasGlyph(TtfFont font, uint ch); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FontHasGlyph(TtfFont font, uint ch) + { + SdlTtf.TraceLog.Trace(); + return _FontHasGlyph(font, ch); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGlyphImage")] + private static partial SdlSurface* _GetGlyphImage(TtfFont font, uint ch, TtfImageType* image_type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* GetGlyphImage(TtfFont font, uint ch, TtfImageType* image_type) + { + SdlTtf.TraceLog.Trace(); + return _GetGlyphImage(font, ch, image_type); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGlyphImageForIndex")] + private static partial SdlSurface* _GetGlyphImageForIndex( + TtfFont font, + uint glyph_index, + TtfImageType* image_type + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* GetGlyphImageForIndex(TtfFont font, uint glyph_index, TtfImageType* image_type) + { + SdlTtf.TraceLog.Trace(); + return _GetGlyphImageForIndex(font, glyph_index, image_type); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGlyphMetrics")] + private static partial byte _GetGlyphMetrics( + TtfFont font, + uint ch, + int* minx, + int* maxx, + int* miny, + int* maxy, + int* advance + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetGlyphMetrics( + TtfFont font, + uint ch, + int* minx, + int* maxx, + int* miny, + int* maxy, + int* advance + ) + { + SdlTtf.TraceLog.Trace(); + return _GetGlyphMetrics(font, ch, minx, maxx, miny, maxy, advance); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGlyphKerning")] + private static partial byte _GetGlyphKerning(TtfFont font, uint previous_ch, uint ch, int* kerning); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetGlyphKerning(TtfFont font, uint previous_ch, uint ch, int* kerning) + { + SdlTtf.TraceLog.Trace(); + return _GetGlyphKerning(font, previous_ch, ch, kerning); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_GetStringSize", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetStringSize(TtfFont font, string text, nuint length, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetStringSize(TtfFont font, string text, nuint length, int* w, int* h) + { + SdlTtf.TraceLog.Trace(); + return _GetStringSize(font, text, length, w, h); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_GetStringSizeWrapped", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetStringSizeWrapped( + TtfFont font, + string text, + nuint length, + int wrap_width, + int* w, + int* h + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetStringSizeWrapped( + TtfFont font, + string text, + nuint length, + int wrap_width, + int* w, + int* h + ) + { + SdlTtf.TraceLog.Trace(); + return _GetStringSizeWrapped(font, text, length, wrap_width, w, h); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_MeasureString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _MeasureString( + TtfFont font, + string text, + nuint length, + int max_width, + int* measured_width, + nuint* measured_length + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte MeasureString( + TtfFont font, + string text, + nuint length, + int max_width, + int* measured_width, + nuint* measured_length + ) + { + SdlTtf.TraceLog.Trace(); + return _MeasureString(font, text, length, max_width, measured_width, measured_length); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_Solid", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextSolid(TtfFont font, string text, nuint length, SdlColor fg); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextSolid(TtfFont font, string text, nuint length, SdlColor fg) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextSolid(font, text, length, fg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_Solid_Wrapped", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextSolidWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + int wrapLength + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextSolidWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + int wrapLength + ) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextSolidWrapped(font, text, length, fg, wrapLength); + } + + [LibraryImport(Dll, EntryPoint = "TTF_RenderGlyph_Solid")] + private static partial SdlSurface* _RenderGlyphSolid(TtfFont font, uint ch, SdlColor fg); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderGlyphSolid(TtfFont font, uint ch, SdlColor fg) + { + SdlTtf.TraceLog.Trace(); + return _RenderGlyphSolid(font, ch, fg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_Shaded", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextShaded( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextShaded( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg + ) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextShaded(font, text, length, fg, bg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_Shaded_Wrapped", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextShadedWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextShadedWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextShadedWrapped(font, text, length, fg, bg, wrap_width); + } + + [LibraryImport(Dll, EntryPoint = "TTF_RenderGlyph_Shaded")] + private static partial SdlSurface* _RenderGlyphShaded(TtfFont font, uint ch, SdlColor fg, SdlColor bg); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderGlyphShaded(TtfFont font, uint ch, SdlColor fg, SdlColor bg) + { + SdlTtf.TraceLog.Trace(); + return _RenderGlyphShaded(font, ch, fg, bg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_Blended", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextBlended(TtfFont font, string text, nuint length, SdlColor fg); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextBlended(TtfFont font, string text, nuint length, SdlColor fg) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextBlended(font, text, length, fg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_Blended_Wrapped", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextBlendedWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + int wrap_width + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextBlendedWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + int wrap_width + ) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextBlendedWrapped(font, text, length, fg, wrap_width); + } + + [LibraryImport(Dll, EntryPoint = "TTF_RenderGlyph_Blended")] + private static partial SdlSurface* _RenderGlyphBlended(TtfFont font, uint ch, SdlColor fg); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderGlyphBlended(TtfFont font, uint ch, SdlColor fg) + { + SdlTtf.TraceLog.Trace(); + return _RenderGlyphBlended(font, ch, fg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_LCD", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextLCD( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextLCD(TtfFont font, string text, nuint length, SdlColor fg, SdlColor bg) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextLCD(font, text, length, fg, bg); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_RenderText_LCD_Wrapped", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _RenderTextLCDWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderTextLCDWrapped( + TtfFont font, + string text, + nuint length, + SdlColor fg, + SdlColor bg, + int wrap_width + ) + { + SdlTtf.TraceLog.Trace(); + return _RenderTextLCDWrapped(font, text, length, fg, bg, wrap_width); + } + + [LibraryImport(Dll, EntryPoint = "TTF_RenderGlyph_LCD")] + private static partial SdlSurface* _RenderGlyphLCD(TtfFont font, uint ch, SdlColor fg, SdlColor bg); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderGlyphLCD(TtfFont font, uint ch, SdlColor fg, SdlColor bg) + { + SdlTtf.TraceLog.Trace(); + return _RenderGlyphLCD(font, ch, fg, bg); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CreateSurfaceTextEngine")] + private static partial TtfTextEngine* _CreateSurfaceTextEngine(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfTextEngine* CreateSurfaceTextEngine() + { + SdlTtf.TraceLog.Trace(); + return _CreateSurfaceTextEngine(); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DrawSurfaceText")] + private static partial byte _DrawSurfaceText(TtfText* text, int x, int y, SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DrawSurfaceText(TtfText* text, int x, int y, SdlSurface* surface) + { + SdlTtf.TraceLog.Trace(); + return _DrawSurfaceText(text, x, y, surface); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DestroySurfaceTextEngine")] + private static partial void _DestroySurfaceTextEngine(TtfTextEngine* engine); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroySurfaceTextEngine(TtfTextEngine* engine) + { + SdlTtf.TraceLog.Trace(); + _DestroySurfaceTextEngine(engine); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CreateRendererTextEngine")] + private static partial TtfTextEngine* _CreateRendererTextEngine(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfTextEngine* CreateRendererTextEngine(SdlRenderer renderer) + { + SdlTtf.TraceLog.Trace(); + return _CreateRendererTextEngine(renderer); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CreateRendererTextEngineWithProperties")] + private static partial TtfTextEngine* _CreateRendererTextEngineWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfTextEngine* CreateRendererTextEngineWithProperties(uint props) + { + SdlTtf.TraceLog.Trace(); + return _CreateRendererTextEngineWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DrawRendererText")] + private static partial byte _DrawRendererText(TtfText* text, float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DrawRendererText(TtfText* text, float x, float y) + { + SdlTtf.TraceLog.Trace(); + return _DrawRendererText(text, x, y); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DestroyRendererTextEngine")] + private static partial void _DestroyRendererTextEngine(TtfTextEngine* engine); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyRendererTextEngine(TtfTextEngine* engine) + { + SdlTtf.TraceLog.Trace(); + _DestroyRendererTextEngine(engine); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CreateGPUTextEngine")] + private static partial TtfTextEngine* _CreateGpuTextEngine(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfTextEngine* CreateGpuTextEngine(SdlGpuDevice device) + { + SdlTtf.TraceLog.Trace(); + return _CreateGpuTextEngine(device); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CreateGPUTextEngineWithProperties")] + private static partial TtfTextEngine* _CreateGpuTextEngineWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfTextEngine* CreateGpuTextEngineWithProperties(uint props) + { + SdlTtf.TraceLog.Trace(); + return _CreateGpuTextEngineWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGPUTextDrawData")] + private static partial TtfGpuAtlasDrawSequence* _GetGpuTextDrawData(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfGpuAtlasDrawSequence* GetGpuTextDrawData(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _GetGpuTextDrawData(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DestroyGPUTextEngine")] + private static partial void _DestroyGpuTextEngine(TtfTextEngine* engine); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyGpuTextEngine(TtfTextEngine* engine) + { + SdlTtf.TraceLog.Trace(); + _DestroyGpuTextEngine(engine); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetGPUTextEngineWinding")] + private static partial void _SetGpuTextEngineWinding( + TtfTextEngine* engine, + TtfGpuTextEngineWinding winding + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuTextEngineWinding(TtfTextEngine* engine, TtfGpuTextEngineWinding winding) + { + SdlTtf.TraceLog.Trace(); + _SetGpuTextEngineWinding(engine, winding); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetGPUTextEngineWinding")] + private static partial TtfGpuTextEngineWinding _GetGpuTextEngineWinding(TtfTextEngine* engine); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfGpuTextEngineWinding GetGpuTextEngineWinding(TtfTextEngine* engine) + { + SdlTtf.TraceLog.Trace(); + return _GetGpuTextEngineWinding(engine); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_CreateText", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial TtfText* _CreateText(TtfTextEngine* engine, TtfFont font, string text, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfText* CreateText(TtfTextEngine* engine, TtfFont font, string text, nuint length) + { + SdlTtf.TraceLog.Trace(); + return _CreateText(engine, font, text, length); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextProperties")] + private static partial uint _GetTextProperties(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetTextProperties(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _GetTextProperties(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextEngine")] + private static partial byte _SetTextEngine(TtfText* text, TtfTextEngine* engine); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextEngine(TtfText* text, TtfTextEngine* engine) + { + SdlTtf.TraceLog.Trace(); + return _SetTextEngine(text, engine); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextEngine")] + private static partial TtfTextEngine* _GetTextEngine(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfTextEngine* GetTextEngine(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _GetTextEngine(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextFont")] + private static partial byte _SetTextFont(TtfText* text, TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextFont(TtfText* text, TtfFont font) + { + SdlTtf.TraceLog.Trace(); + return _SetTextFont(text, font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextFont")] + private static partial TtfFont _GetTextFont(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfFont GetTextFont(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _GetTextFont(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextDirection")] + private static partial byte _SetTextDirection(TtfText* text, TtfDirection direction); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextDirection(TtfText* text, TtfDirection direction) + { + SdlTtf.TraceLog.Trace(); + return _SetTextDirection(text, direction); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextDirection")] + private static partial TtfDirection _GetTextDirection(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfDirection GetTextDirection(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _GetTextDirection(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextScript")] + private static partial byte _SetTextScript(TtfText* text, uint script); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextScript(TtfText* text, uint script) + { + SdlTtf.TraceLog.Trace(); + return _SetTextScript(text, script); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextScript")] + private static partial uint _GetTextScript(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetTextScript(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _GetTextScript(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextColor")] + private static partial byte _SetTextColor(TtfText* text, byte r, byte g, byte b, byte a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextColor(TtfText* text, byte r, byte g, byte b, byte a) + { + SdlTtf.TraceLog.Trace(); + return _SetTextColor(text, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextColorFloat")] + private static partial byte _SetTextColorFloat(TtfText* text, float r, float g, float b, float a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextColorFloat(TtfText* text, float r, float g, float b, float a) + { + SdlTtf.TraceLog.Trace(); + return _SetTextColorFloat(text, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextColor")] + private static partial byte _GetTextColor(TtfText* text, byte* r, byte* g, byte* b, byte* a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextColor(TtfText* text, byte* r, byte* g, byte* b, byte* a) + { + SdlTtf.TraceLog.Trace(); + return _GetTextColor(text, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextColorFloat")] + private static partial byte _GetTextColorFloat(TtfText* text, float* r, float* g, float* b, float* a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextColorFloat(TtfText* text, float* r, float* g, float* b, float* a) + { + SdlTtf.TraceLog.Trace(); + return _GetTextColorFloat(text, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextPosition")] + private static partial byte _SetTextPosition(TtfText* text, int x, int y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextPosition(TtfText* text, int x, int y) + { + SdlTtf.TraceLog.Trace(); + return _SetTextPosition(text, x, y); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextPosition")] + private static partial byte _GetTextPosition(TtfText* text, int* x, int* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextPosition(TtfText* text, int* x, int* y) + { + SdlTtf.TraceLog.Trace(); + return _GetTextPosition(text, x, y); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextWrapWidth")] + private static partial byte _SetTextWrapWidth(TtfText* text, int wrap_width); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextWrapWidth(TtfText* text, int wrap_width) + { + SdlTtf.TraceLog.Trace(); + return _SetTextWrapWidth(text, wrap_width); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextWrapWidth")] + private static partial byte _GetTextWrapWidth(TtfText* text, int* wrap_width); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextWrapWidth(TtfText* text, int* wrap_width) + { + SdlTtf.TraceLog.Trace(); + return _GetTextWrapWidth(text, wrap_width); + } + + [LibraryImport(Dll, EntryPoint = "TTF_SetTextWrapWhitespaceVisible")] + private static partial byte _SetTextWrapWhitespaceVisible(TtfText* text, byte visible); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextWrapWhitespaceVisible(TtfText* text, byte visible) + { + SdlTtf.TraceLog.Trace(); + return _SetTextWrapWhitespaceVisible(text, visible); + } + + [LibraryImport(Dll, EntryPoint = "TTF_TextWrapWhitespaceVisible")] + private static partial byte _TextWrapWhitespaceVisible(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TextWrapWhitespaceVisible(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _TextWrapWhitespaceVisible(text); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_SetTextString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetTextString(TtfText* text, string @string, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextString(TtfText* text, string @string, nuint length) + { + SdlTtf.TraceLog.Trace(); + return _SetTextString(text, @string, length); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_InsertTextString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _InsertTextString(TtfText* text, int offset, string @string, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte InsertTextString(TtfText* text, int offset, string @string, nuint length) + { + SdlTtf.TraceLog.Trace(); + return _InsertTextString(text, offset, @string, length); + } + + [LibraryImport( + Dll, + EntryPoint = "TTF_AppendTextString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _AppendTextString(TtfText* text, string @string, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AppendTextString(TtfText* text, string @string, nuint length) + { + SdlTtf.TraceLog.Trace(); + return _AppendTextString(text, @string, length); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DeleteTextString")] + private static partial byte _DeleteTextString(TtfText* text, int offset, int length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DeleteTextString(TtfText* text, int offset, int length) + { + SdlTtf.TraceLog.Trace(); + return _DeleteTextString(text, offset, length); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextSize")] + private static partial byte _GetTextSize(TtfText* text, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextSize(TtfText* text, int* w, int* h) + { + SdlTtf.TraceLog.Trace(); + return _GetTextSize(text, w, h); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextSubString")] + private static partial byte _GetTextSubString(TtfText* text, int offset, TtfSubString* substring); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextSubString(TtfText* text, int offset, TtfSubString* substring) + { + SdlTtf.TraceLog.Trace(); + return _GetTextSubString(text, offset, substring); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextSubStringForLine")] + private static partial byte _GetTextSubStringForLine(TtfText* text, int line, TtfSubString* substring); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextSubStringForLine(TtfText* text, int line, TtfSubString* substring) + { + SdlTtf.TraceLog.Trace(); + return _GetTextSubStringForLine(text, line, substring); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextSubStringsForRange")] + private static partial TtfSubString** _GetTextSubStringsForRange( + TtfText* text, + int offset, + int length, + int* count + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TtfSubString** GetTextSubStringsForRange(TtfText* text, int offset, int length, int* count) + { + SdlTtf.TraceLog.Trace(); + return _GetTextSubStringsForRange(text, offset, length, count); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetTextSubStringForPoint")] + private static partial byte _GetTextSubStringForPoint(TtfText* text, int x, int y, TtfSubString* substring); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextSubStringForPoint(TtfText* text, int x, int y, TtfSubString* substring) + { + SdlTtf.TraceLog.Trace(); + return _GetTextSubStringForPoint(text, x, y, substring); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetPreviousTextSubString")] + private static partial byte _GetPreviousTextSubString( + TtfText* text, + TtfSubString* substring, + TtfSubString* previous + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetPreviousTextSubString(TtfText* text, TtfSubString* substring, TtfSubString* previous) + { + SdlTtf.TraceLog.Trace(); + return _GetPreviousTextSubString(text, substring, previous); + } + + [LibraryImport(Dll, EntryPoint = "TTF_GetNextTextSubString")] + private static partial byte _GetNextTextSubString( + TtfText* text, + TtfSubString* substring, + TtfSubString* next + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetNextTextSubString(TtfText* text, TtfSubString* substring, TtfSubString* next) + { + SdlTtf.TraceLog.Trace(); + return _GetNextTextSubString(text, substring, next); + } + + [LibraryImport(Dll, EntryPoint = "TTF_UpdateText")] + private static partial byte _UpdateText(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateText(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + return _UpdateText(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_DestroyText")] + private static partial void _DestroyText(TtfText* text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyText(TtfText* text) + { + SdlTtf.TraceLog.Trace(); + _DestroyText(text); + } + + [LibraryImport(Dll, EntryPoint = "TTF_CloseFont")] + private static partial void _CloseFont(TtfFont font); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseFont(TtfFont font) + { + SdlTtf.TraceLog.Trace(); + _CloseFont(font); + } + + [LibraryImport(Dll, EntryPoint = "TTF_Quit")] + private static partial void _Quit(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Quit() + { + SdlTtf.TraceLog.Trace(); + _Quit(); + } + + [LibraryImport(Dll, EntryPoint = "TTF_WasInit")] + private static partial int _WasInit(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int WasInit() + { + SdlTtf.TraceLog.Trace(); + return _WasInit(); + } + } + } +} diff --git a/Brutal.Sdl.Ttf/Generated/SdlTtf.Structs.gen.cs b/Brutal.Sdl.Ttf/Generated/SdlTtf.Structs.gen.cs new file mode 100644 index 0000000..68827a4 --- /dev/null +++ b/Brutal.Sdl.Ttf/Generated/SdlTtf.Structs.gen.cs @@ -0,0 +1,101 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi.Ttf +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct TtfTextEngine + { + public uint version; + public void* userdata; + public delegate* unmanaged[Cdecl] CreateText; + public delegate* unmanaged[Cdecl] DestroyText; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct TtfTextData + { + public TtfFont font; + public SdlFColor color; + public byte needs_layout_update; + public nint layout; + public int x; + public int y; + public int w; + public int h; + public int num_ops; + public TtfDrawOperation* ops; + public int num_clusters; + public TtfSubString* clusters; + public uint props; + public byte needs_engine_update; + public TtfTextEngine* engine; + public void* engine_text; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct TtfText + { + public byte* text; + public int num_lines; + public int refcount; + public TtfTextData* @internal; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct TtfGpuAtlasDrawSequence + { + public nint atlas_texture; + public SdlFPoint* xy; + public SdlFPoint* uv; + public int num_vertices; + public int* indices; + public int num_indices; + public TtfImageType image_type; + public TtfGpuAtlasDrawSequence* next; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct TtfSubString + { + public TtfSubStringFlags flags; + public int offset; + public int length; + public int line_index; + public int cluster_index; + public SdlRect rect; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct TtfFillOperation + { + public TtfDrawCommand cmd; + public SdlRect rect; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct TtfCopyOperation + { + public TtfDrawCommand cmd; + public int text_offset; + public TtfFont glyph_font; + public uint glyph_index; + public SdlRect src; + public SdlRect dst; + public void* reserved; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct TtfDrawOperation + { + [FieldOffset(0)] + public TtfDrawCommand cmd; + + [FieldOffset(0)] + public TtfFillOperation fill; + + [FieldOffset(0)] + public TtfCopyOperation copy; + } +} diff --git a/Brutal.Sdl.Ttf/GlobalUsings.cs b/Brutal.Sdl.Ttf/GlobalUsings.cs new file mode 100644 index 0000000..4b608b4 --- /dev/null +++ b/Brutal.Sdl.Ttf/GlobalUsings.cs @@ -0,0 +1,3 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.SdlApi; diff --git a/Brutal.Sdl.Ttf/LICENSES/BRUTAL-SDL-TTF-THIRD-PARTY-NOTICES.txt b/Brutal.Sdl.Ttf/LICENSES/BRUTAL-SDL-TTF-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..8479d44 --- /dev/null +++ b/Brutal.Sdl.Ttf/LICENSES/BRUTAL-SDL-TTF-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,503 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Sdl.Ttf + +This package redistributes third-party software. The licenses governing that software +are reproduced below in full. + +WHAT THIS PACKAGE CONTAINS + + One native library, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + SDL_ttf 3.2.2 SDL3_ttf.dll / libSDL3_ttf.so / libSDL3_ttf.dylib + + Six third-party components are statically linked into that library and are governed + by their own licenses, one section each below: + + FreeType 2.13.2 font rasterisation + BDF driver FreeType's contributed BDF font driver, separately licensed + PCF driver FreeType's contributed PCF font driver, separately licensed + zlib 1.3 bundled inside FreeType, used to decompress font tables + HarfBuzz 8.5.0 Unicode text shaping + stb_rect_pack glyph atlas packing for the renderer and GPU text engines + + zlib arrives two levels down: FreeType bundles its own copy and compiles it in when + no system zlib is linked, which is the case here. Nothing in this package's own + configuration asks for it. + +FREETYPE IS DUAL-LICENSED, AND WE DISTRIBUTE UNDER THE FREETYPE LICENSE + + FreeType's own LICENSE.TXT distributes it "under two mutually exclusive open-source + licenses" - the FreeType License (FTL) and the GNU General Public License version 2 - + and states that "*you* must choose *one* of the two licenses ... then obey all its + terms and conditions". This distribution is made under the FreeType License, + reproduced in full below. The GPL v2 text is not reproduced. + + This package contains FreeType in binary form only. The FreeType Project's credit + and disclaimer: + + Portions of this software are copyright © 2023 The FreeType Project + (https://freetype.org). All rights reserved. + + This software is based in part of the work of the FreeType Team. + + The year is 2023 because that is the year of FreeType 2.13.2, the version contained + here. RocketWerkz.Brutal.FreeType contains a different version and its credit + states a different year; both are correct, and they must not be made to agree. + +A NOTE ON SCOPE + + This package depends on RocketWerkz.Brutal.Sdl and links against SDL3 at runtime. + SDL3 is not contained in this package and is covered by that package's own notices. + + SDL_ttf can optionally be built against PlutoSVG and PlutoVG for colour-emoji + glyphs. This build enables neither, neither is contained in the shipped library, + and neither is attributed here. + + Where an upstream license file covers more code than this package ships, only the + blocks governing the code actually contained here are reproduced. Each such omission + is named where it occurs, so that nothing below should be read as truncated. + +============================================================================== +SDL_ttf +============================================================================== + + Name SDL_ttf + Version 3.2.2 + Upstream https://github.com/libsdl-org/SDL_ttf + SPDX Zlib + Shipped as SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib + +Copyright (C) 1997-2025 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +============================================================================== +FreeType +============================================================================== + + Name FreeType + Version 2.13.2 + Upstream https://freetype.org -- https://github.com/freetype/freetype + SPDX FTL + Shipped as statically linked into SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib + +The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © The FreeType + Project (www.freetype.org). All rights reserved. + """ + + Please replace with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + https://www.freetype.org + + +--- end of FTL.TXT --- + +============================================================================== +FreeType BDF driver +============================================================================== + + Name BDF font driver + Version as contained in FreeType 2.13.2 + Upstream https://freetype.org -- https://github.com/freetype/freetype + SPDX MIT + Shipped as statically linked into SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib + + FreeType's BDF driver is contributed code under its own X11-style license, separate + from the FreeType License above. It is registered in this build and compiled in. + Two blocks apply: the driver, and the portions derived from Mark Leisher's bdf + library. Both are reproduced. + +Copyright (C) 2001-2002 by Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*** Portions of the driver (that is, bdflib.c and bdf.h): + +Copyright 2000 Computing Research Labs, New Mexico State University +Copyright 2001-2002, 2011 Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================== +FreeType PCF driver +============================================================================== + + Name PCF font driver + Version as contained in FreeType 2.13.2 + Upstream https://freetype.org -- https://github.com/freetype/freetype + SPDX MIT + Shipped as statically linked into SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib + + FreeType's PCF driver is contributed code under its own X11-style license, separate + from the FreeType License above. It is registered in this build and compiled in. + +Copyright (C) 2000 by Francesco Zappa Nardelli + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================== +zlib +============================================================================== + + Name zlib + Version 1.3 + Upstream https://zlib.net -- https://github.com/madler/zlib + SPDX Zlib + Shipped as statically linked into SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib, inside FreeType + + FreeType bundles a copy of zlib and compiles it in when no system zlib is available + to link against, which is the case in this build. The license below is reproduced + from the bundled copy's own header, which is where zlib states its terms. + +zlib.h -- interface of the 'zlib' general purpose compression library + version 1.3, August 18th, 2023 + + Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +============================================================================== +HarfBuzz +============================================================================== + + Name HarfBuzz + Version 8.5.0 + Upstream https://harfbuzz.github.io -- https://github.com/harfbuzz/harfbuzz + SPDX MIT + Shipped as statically linked into SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib + +HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. +For parts of HarfBuzz that are licensed under different licenses see individual +files names COPYING in subdirectories where applicable. + +Copyright © 2010-2022 Google, Inc. +Copyright © 2015-2020 Ebrahim Byagowi +Copyright © 2019,2020 Facebook, Inc. +Copyright © 2012,2015 Mozilla Foundation +Copyright © 2011 Codethink Limited +Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies) +Copyright © 2009 Keith Stribley +Copyright © 2011 Martin Hosken and SIL International +Copyright © 2007 Chris Wilson +Copyright © 2005,2006,2020,2021,2022,2023 Behdad Esfahbod +Copyright © 2004,2007,2008,2009,2010,2013,2021,2022,2023 Red Hat, Inc. +Copyright © 1998-2005 David Turner and Werner Lemberg +Copyright © 2016 Igalia S.L. +Copyright © 2022 Matthias Clasen +Copyright © 2018,2021 Khaled Hosny +Copyright © 2018,2019,2020 Adobe, Inc +Copyright © 2013-2015 Alexei Podtelezhnikov + +For full copyright notices consult the individual files in the package. + + +Permission is hereby granted, without written agreement and without +license or royalty fees, to use, copy, modify, and distribute this +software and its documentation for any purpose, provided that the +above copyright notice and the following two paragraphs appear in +all copies of this software. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO +PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +============================================================================== +stb_rect_pack +============================================================================== + + Name stb_rect_pack + Version as vendored by SDL_ttf 3.2.2 + Upstream https://github.com/nothings/stb + SPDX MIT OR Unlicense + Shipped as compiled into SDL3_ttf.dll, libSDL3_ttf.so, libSDL3_ttf.dylib + + SDL_ttf carries stb_rect_pack in its own source directory and compiles it into the + library to pack glyph atlases. It is offered under two mutually exclusive licenses, + both reproduced below as upstream states them. + +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ diff --git a/Brutal.Sdl.Ttf/SdlTtf.cs b/Brutal.Sdl.Ttf/SdlTtf.cs new file mode 100644 index 0000000..effe5c6 --- /dev/null +++ b/Brutal.Sdl.Ttf/SdlTtf.cs @@ -0,0 +1,95 @@ +using System.Reflection; +using Brutal.Logging; + +namespace Brutal.SdlApi.Ttf; + +/// +/// Provides access to the SDL_ttf library. +/// +public static unsafe partial class SdlTtf +{ + /// + /// The name the generated P/Invoke surface imports against. The static + /// constructor registers a that normalizes + /// this name to the platform-specific SDL3_ttf shared library. + /// + internal const string Dll = "SDL3_ttf"; + + /// + /// The logging category for the per-call trace logs the generated P/Invoke surface emits. An + /// internal implementation detail mirroring core's Sdl.TraceLog; the generated + /// SdlTtf.PInvoke wrappers call SdlTtf.TraceLog.Trace() on every invocation. + /// + internal static readonly LogCategory TraceLog = LogCategory.Make("SdlTtf"); + + /// + /// Hosts the raw generated P/Invoke surface and the native library resolver for SDL3_ttf. + /// + public static unsafe partial class PInvoke + { + // The native SDL3_ttf handle, resolved lazily by the DllImportResolver below and cached + // so the library is loaded at most once regardless of how many entry points are resolved. + private static nint _nativeHandle; + + private static readonly Lock ResolveLock = new(); + + static PInvoke() + { + // Load libSDL3 before SDL3_ttf, which links against it; only a real P/Invoke triggers Sdl's resolver. + _ = Sdl.PInvoke.GetVersion(); + + NativeLibrary.SetDllImportResolver(typeof(SdlTtf).Assembly, Resolve); + } + + // Normalizes the "SDL3_ttf" import name to the platform-specific shared library filename + // (SDL3_ttf.dll on Windows, libSDL3_ttf.dylib on macOS, libSDL3_ttf.so.0 on Linux). + // SDL_ttf's Linux build installs a versioned soname (libSDL3_ttf.so.0), same convention as + // core's SDL3, so the candidate list is spelled out explicitly, most-specific first, with + // the default probing convention name as a fallback. + private static nint Resolve(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + // Only ever asked to resolve SDL3_ttf; anything else is left to the default resolver. + if (libraryName != Dll) + return IntPtr.Zero; + + lock (ResolveLock) + { + if (_nativeHandle != IntPtr.Zero) + return _nativeHandle; + + var search = searchPath ?? DllImportSearchPath.AssemblyDirectory; + + // Load (not TryLoad) so each candidate's OS error text reaches the final exception. + var failures = new List(); + foreach (var candidate in Candidates()) + { + try + { + _nativeHandle = NativeLibrary.Load(candidate, assembly, search); + return _nativeHandle; + } + catch (Exception ex) + { + failures.Add($"'{candidate}': {ex.Message}"); + } + } + + throw new DllNotFoundException( + "Could not load the SDL3_ttf native library. Attempts (most specific first): " + + string.Join("; ", failures) + + "." + ); + } + } + + private static string[] Candidates() + { + if (OperatingSystem.IsWindows()) + return ["SDL3_ttf.dll", "SDL3_ttf"]; + if (OperatingSystem.IsMacOS()) + return ["libSDL3_ttf.dylib", "SDL3_ttf"]; + // Linux and other Unix-likes. + return ["libSDL3_ttf.so.0", "libSDL3_ttf.so", "SDL3_ttf"]; + } + } +} diff --git a/Brutal.Sdl/CustomStringMarshaller.cs b/Brutal.Sdl/CustomStringMarshaller.cs new file mode 100644 index 0000000..086eb39 --- /dev/null +++ b/Brutal.Sdl/CustomStringMarshaller.cs @@ -0,0 +1,99 @@ +using System.Runtime.InteropServices.Marshalling; +using System.Text; + +namespace Brutal.SdlApi; + +/// +/// Marshaller for UTF-8 strings, used by the generated P/Invoke surface for SDL's const char * +/// parameters and returns. +/// +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedIn, typeof(ManagedToUnmanagedIn))] // string parameter +[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedOut, typeof(ManagedToUnmanagedOut))] // return string +public static unsafe class CustomStringMarshaller +{ + /// + /// Custom marshaller to marshal a managed string as a UTF-8 unmanaged string. + /// + public ref struct ManagedToUnmanagedIn + { + /// + /// Gets the requested buffer size for optimized marshalling. + /// + public static int BufferSize => 0x100; + + private byte* _unmanagedValue; + private bool _allocated; + + /// + /// Initializes the marshaller with a managed string and requested buffer. + /// + /// The managed string with which to initialize the marshaller. + /// The request buffer whose size is at least . + public void FromManaged(string? managed, Span buffer) + { + _allocated = false; + + if (managed is null) + { + _unmanagedValue = null; + return; + } + + const int MaxUtf8BytesPerChar = 3; + + // >= for null terminator + // Use the cast to long to avoid the checked operation + if ((long)MaxUtf8BytesPerChar * managed.Length >= buffer.Length) + { + // Calculate accurate byte count when the provided stack-allocated buffer is not sufficient + int exactByteCount = checked(Encoding.UTF8.GetByteCount(managed) + 1); // + 1 for null terminator + if (exactByteCount > buffer.Length) + { + buffer = new Span((byte*)NativeMemory.Alloc((nuint)exactByteCount), exactByteCount); + _allocated = true; + } + } + + // Unsafe.AsPointer is safe since buffer must be pinned + _unmanagedValue = (byte*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(buffer)); + + int byteCount = Encoding.UTF8.GetBytes(managed, buffer); + buffer[byteCount] = 0; // null-terminate + } + + /// + /// Converts the current managed string to an unmanaged string. + /// + /// An unmanaged string. + public byte* ToUnmanaged() => _unmanagedValue; + + /// + /// Frees any allocated unmanaged memory. + /// + public void Free() + { + if (_allocated) + NativeMemory.Free(_unmanagedValue); + } + } + + /// + /// Converts an unmanaged UTF-8 string returned by SDL back to a managed string. + /// + public static class ManagedToUnmanagedOut + { + /// + /// Converts an unmanaged UTF-8 string to a managed string, preserving a NULL pointer as + /// . + /// + /// The unmanaged UTF-8 string, or NULL. + /// The managed string, or if is NULL. + public static string? ConvertToManaged(byte* unmanaged) + { + if (unmanaged == null) + return null; + + return Marshal.PtrToStringUTF8((IntPtr)unmanaged); + } + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlAppResult.gen.cs b/Brutal.Sdl/Generated/Enums/SdlAppResult.gen.cs new file mode 100644 index 0000000..d5c3db5 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlAppResult.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlAppResult : uint + { + Continue = 0u, + Success = 1u, + Failure = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlArrayOrder.gen.cs b/Brutal.Sdl/Generated/Enums/SdlArrayOrder.gen.cs new file mode 100644 index 0000000..aece8d6 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlArrayOrder.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlArrayOrder : uint + { + None = 0u, + Rgb = 1u, + Rgba = 2u, + Argb = 3u, + Bgr = 4u, + Bgra = 5u, + Abgr = 6u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlAssertState.gen.cs b/Brutal.Sdl/Generated/Enums/SdlAssertState.gen.cs new file mode 100644 index 0000000..3a70d85 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlAssertState.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlAssertState : uint + { + Retry = 0u, + Break = 1u, + Abort = 2u, + Ignore = 3u, + AlwaysIgnore = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlAsyncIOResult.gen.cs b/Brutal.Sdl/Generated/Enums/SdlAsyncIOResult.gen.cs new file mode 100644 index 0000000..ddc321c --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlAsyncIOResult.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlAsyncIOResult : uint + { + Complete = 0u, + Failure = 1u, + Canceled = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlAsyncIOTaskType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlAsyncIOTaskType.gen.cs new file mode 100644 index 0000000..e857dc9 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlAsyncIOTaskType.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlAsyncIOTaskType : uint + { + Read = 0u, + Write = 1u, + Close = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlAudioFormat.gen.cs b/Brutal.Sdl/Generated/Enums/SdlAudioFormat.gen.cs new file mode 100644 index 0000000..60accc2 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlAudioFormat.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlAudioFormat : uint + { + Unknown = 0u, + U8 = 8u, + S8 = 32776u, + S16le = 32784u, + S16be = 36880u, + S32le = 32800u, + S32be = 36896u, + F32le = 33056u, + F32be = 37152u, + S16 = 32784u, + S32 = 32800u, + F32 = 33056u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlBitmapOrder.gen.cs b/Brutal.Sdl/Generated/Enums/SdlBitmapOrder.gen.cs new file mode 100644 index 0000000..9be0e05 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlBitmapOrder.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlBitmapOrder : uint + { + None = 0u, + N4321 = 1u, + N1234 = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlBlendFactor.gen.cs b/Brutal.Sdl/Generated/Enums/SdlBlendFactor.gen.cs new file mode 100644 index 0000000..1b82ff2 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlBlendFactor.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlBlendFactor : uint + { + Zero = 1u, + One = 2u, + SrcColor = 3u, + OneMinusSrcColor = 4u, + SrcAlpha = 5u, + OneMinusSrcAlpha = 6u, + DstColor = 7u, + OneMinusDstColor = 8u, + DstAlpha = 9u, + OneMinusDstAlpha = 10u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlBlendOperation.gen.cs b/Brutal.Sdl/Generated/Enums/SdlBlendOperation.gen.cs new file mode 100644 index 0000000..6e32dff --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlBlendOperation.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlBlendOperation : uint + { + Add = 1u, + Subtract = 2u, + RevSubtract = 3u, + Minimum = 4u, + Maximum = 5u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlCameraPermissionState.gen.cs b/Brutal.Sdl/Generated/Enums/SdlCameraPermissionState.gen.cs new file mode 100644 index 0000000..f08b47d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlCameraPermissionState.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlCameraPermissionState + { + Denied = -1, + Pending = 0, + Approved = 1, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlCameraPosition.gen.cs b/Brutal.Sdl/Generated/Enums/SdlCameraPosition.gen.cs new file mode 100644 index 0000000..390009e --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlCameraPosition.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlCameraPosition : uint + { + Unknown = 0u, + FrontFacing = 1u, + BackFacing = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlCapitalization.gen.cs b/Brutal.Sdl/Generated/Enums/SdlCapitalization.gen.cs new file mode 100644 index 0000000..1c76659 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlCapitalization.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlCapitalization : uint + { + None = 0u, + Sentences = 1u, + Words = 2u, + Letters = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlChromaLocation.gen.cs b/Brutal.Sdl/Generated/Enums/SdlChromaLocation.gen.cs new file mode 100644 index 0000000..53d9949 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlChromaLocation.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlChromaLocation : uint + { + None = 0u, + Left = 1u, + Center = 2u, + Topleft = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlColorPrimaries.gen.cs b/Brutal.Sdl/Generated/Enums/SdlColorPrimaries.gen.cs new file mode 100644 index 0000000..fc23cc2 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlColorPrimaries.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlColorPrimaries : uint + { + Unknown = 0u, + Bt709 = 1u, + Unspecified = 2u, + Bt470m = 4u, + Bt470bg = 5u, + Bt601 = 6u, + Smpte240 = 7u, + GenericFilm = 8u, + Bt2020 = 9u, + Xyz = 10u, + Smpte431 = 11u, + Smpte432 = 12u, + Ebu3213 = 22u, + Custom = 31u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlColorRange.gen.cs b/Brutal.Sdl/Generated/Enums/SdlColorRange.gen.cs new file mode 100644 index 0000000..c23ed20 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlColorRange.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlColorRange : uint + { + Unknown = 0u, + Limited = 1u, + Full = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlColorType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlColorType.gen.cs new file mode 100644 index 0000000..b2445ef --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlColorType.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlColorType : uint + { + Unknown = 0u, + Rgb = 1u, + Ycbcr = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlColorspace.gen.cs b/Brutal.Sdl/Generated/Enums/SdlColorspace.gen.cs new file mode 100644 index 0000000..bd05bd0 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlColorspace.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlColorspace : uint + { + Unknown = 0u, + Srgb = 301991328u, + SrgbLinear = 301991168u, + Hdr10 = 301999616u, + Jpeg = 570426566u, + Bt601Limited = 554703046u, + Bt601Full = 571480262u, + Bt709Limited = 554697761u, + Bt709Full = 571474977u, + Bt2020Limited = 554706441u, + Bt2020Full = 571483657u, + RgbDefault = 301991328u, + YuvDefault = 554703046u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlDateFormat.gen.cs b/Brutal.Sdl/Generated/Enums/SdlDateFormat.gen.cs new file mode 100644 index 0000000..f24dbbd --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlDateFormat.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlDateFormat : uint + { + Yyyymmdd = 0u, + Ddmmyyyy = 1u, + Mmddyyyy = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlDisplayOrientation.gen.cs b/Brutal.Sdl/Generated/Enums/SdlDisplayOrientation.gen.cs new file mode 100644 index 0000000..6f5470e --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlDisplayOrientation.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlDisplayOrientation : uint + { + Unknown = 0u, + Landscape = 1u, + LandscapeFlipped = 2u, + Portrait = 3u, + PortraitFlipped = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlEnumerationResult.gen.cs b/Brutal.Sdl/Generated/Enums/SdlEnumerationResult.gen.cs new file mode 100644 index 0000000..a226723 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlEnumerationResult.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlEnumerationResult : uint + { + Continue = 0u, + Success = 1u, + Failure = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlEventAction.gen.cs b/Brutal.Sdl/Generated/Enums/SdlEventAction.gen.cs new file mode 100644 index 0000000..21eda6b --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlEventAction.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlEventAction : uint + { + Addevent = 0u, + Peekevent = 1u, + Getevent = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlEventType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlEventType.gen.cs new file mode 100644 index 0000000..ab0c82d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlEventType.gen.cs @@ -0,0 +1,134 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlEventType : uint + { + First = 0u, + Quit = 256u, + Terminating = 257u, + LowMemory = 258u, + WillEnterBackground = 259u, + DidEnterBackground = 260u, + WillEnterForeground = 261u, + DidEnterForeground = 262u, + LocaleChanged = 263u, + SystemThemeChanged = 264u, + DisplayOrientation = 337u, + DisplayAdded = 338u, + DisplayRemoved = 339u, + DisplayMoved = 340u, + DisplayDesktopModeChanged = 341u, + DisplayCurrentModeChanged = 342u, + DisplayContentScaleChanged = 343u, + DisplayUsableBoundsChanged = 344u, + DisplayFirst = 337u, + DisplayLast = 344u, + WindowShown = 514u, + WindowHidden = 515u, + WindowExposed = 516u, + WindowMoved = 517u, + WindowResized = 518u, + WindowPixelSizeChanged = 519u, + WindowMetalViewResized = 520u, + WindowMinimized = 521u, + WindowMaximized = 522u, + WindowRestored = 523u, + WindowMouseEnter = 524u, + WindowMouseLeave = 525u, + WindowFocusGained = 526u, + WindowFocusLost = 527u, + WindowCloseRequested = 528u, + WindowHitTest = 529u, + WindowIccprofChanged = 530u, + WindowDisplayChanged = 531u, + WindowDisplayScaleChanged = 532u, + WindowSafeAreaChanged = 533u, + WindowOccluded = 534u, + WindowEnterFullscreen = 535u, + WindowLeaveFullscreen = 536u, + WindowDestroyed = 537u, + WindowHdrStateChanged = 538u, + WindowFirst = 514u, + WindowLast = 538u, + KeyDown = 768u, + KeyUp = 769u, + TextEditing = 770u, + TextInput = 771u, + KeymapChanged = 772u, + KeyboardAdded = 773u, + KeyboardRemoved = 774u, + TextEditingCandidates = 775u, + ScreenKeyboardShown = 776u, + ScreenKeyboardHidden = 777u, + MouseMotion = 1024u, + MouseButtonDown = 1025u, + MouseButtonUp = 1026u, + MouseWheel = 1027u, + MouseAdded = 1028u, + MouseRemoved = 1029u, + JoystickAxisMotion = 1536u, + JoystickBallMotion = 1537u, + JoystickHatMotion = 1538u, + JoystickButtonDown = 1539u, + JoystickButtonUp = 1540u, + JoystickAdded = 1541u, + JoystickRemoved = 1542u, + JoystickBatteryUpdated = 1543u, + JoystickUpdateComplete = 1544u, + GamepadAxisMotion = 1616u, + GamepadButtonDown = 1617u, + GamepadButtonUp = 1618u, + GamepadAdded = 1619u, + GamepadRemoved = 1620u, + GamepadRemapped = 1621u, + GamepadTouchpadDown = 1622u, + GamepadTouchpadMotion = 1623u, + GamepadTouchpadUp = 1624u, + GamepadSensorUpdate = 1625u, + GamepadUpdateComplete = 1626u, + GamepadSteamHandleUpdated = 1627u, + FingerDown = 1792u, + FingerUp = 1793u, + FingerMotion = 1794u, + FingerCanceled = 1795u, + PinchBegin = 1808u, + PinchUpdate = 1809u, + PinchEnd = 1810u, + ClipboardUpdate = 2304u, + DropFile = 4096u, + DropText = 4097u, + DropBegin = 4098u, + DropComplete = 4099u, + DropPosition = 4100u, + AudioDeviceAdded = 4352u, + AudioDeviceRemoved = 4353u, + AudioDeviceFormatChanged = 4354u, + SensorUpdate = 4608u, + PenProximityIn = 4864u, + PenProximityOut = 4865u, + PenDown = 4866u, + PenUp = 4867u, + PenButtonDown = 4868u, + PenButtonUp = 4869u, + PenMotion = 4870u, + PenAxis = 4871u, + CameraDeviceAdded = 5120u, + CameraDeviceRemoved = 5121u, + CameraDeviceApproved = 5122u, + CameraDeviceDenied = 5123u, + RenderTargetsReset = 8192u, + RenderDeviceReset = 8193u, + RenderDeviceLost = 8194u, + Private0 = 16384u, + Private1 = 16385u, + Private2 = 16386u, + Private3 = 16387u, + PollSentinel = 32512u, + User = 32768u, + Last = 65535u, + EnumPadding = 2147483647u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlFileDialogType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlFileDialogType.gen.cs new file mode 100644 index 0000000..93e29a2 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlFileDialogType.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlFileDialogType : uint + { + Openfile = 0u, + Savefile = 1u, + Openfolder = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlFlashOperation.gen.cs b/Brutal.Sdl/Generated/Enums/SdlFlashOperation.gen.cs new file mode 100644 index 0000000..a361a26 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlFlashOperation.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlFlashOperation : uint + { + Cancel = 0u, + Briefly = 1u, + UntilFocused = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlFlipMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlFlipMode.gen.cs new file mode 100644 index 0000000..3483814 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlFlipMode.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlFlipMode : uint + { + None = 0u, + Horizontal = 1u, + Vertical = 2u, + HorizontalAndVertical = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlFolder.gen.cs b/Brutal.Sdl/Generated/Enums/SdlFolder.gen.cs new file mode 100644 index 0000000..c8778bf --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlFolder.gen.cs @@ -0,0 +1,22 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlFolder : uint + { + Home = 0u, + Desktop = 1u, + Documents = 2u, + Downloads = 3u, + Music = 4u, + Pictures = 5u, + Publicshare = 6u, + Savedgames = 7u, + Screenshots = 8u, + Templates = 9u, + Videos = 10u, + Count = 11u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGLAttr.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGLAttr.gen.cs new file mode 100644 index 0000000..c30cb72 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGLAttr.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGLAttr : uint + { + RedSize = 0u, + GreenSize = 1u, + BlueSize = 2u, + AlphaSize = 3u, + BufferSize = 4u, + Doublebuffer = 5u, + DepthSize = 6u, + StencilSize = 7u, + AccumRedSize = 8u, + AccumGreenSize = 9u, + AccumBlueSize = 10u, + AccumAlphaSize = 11u, + Stereo = 12u, + Multisamplebuffers = 13u, + Multisamplesamples = 14u, + AcceleratedVisual = 15u, + RetainedBacking = 16u, + ContextMajorVersion = 17u, + ContextMinorVersion = 18u, + ContextFlags = 19u, + ContextProfileMask = 20u, + ShareWithCurrentContext = 21u, + FramebufferSrgbCapable = 22u, + ContextReleaseBehavior = 23u, + ContextResetNotification = 24u, + ContextNoError = 25u, + Floatbuffers = 26u, + EglPlatform = 27u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGamepadAxis.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGamepadAxis.gen.cs new file mode 100644 index 0000000..35a66c5 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGamepadAxis.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGamepadAxis + { + Invalid = -1, + Leftx = 0, + Lefty = 1, + Rightx = 2, + Righty = 3, + LeftTrigger = 4, + RightTrigger = 5, + Count = 6, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGamepadBindingType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGamepadBindingType.gen.cs new file mode 100644 index 0000000..56cbaf2 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGamepadBindingType.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGamepadBindingType : uint + { + None = 0u, + Button = 1u, + Axis = 2u, + Hat = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGamepadButton.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGamepadButton.gen.cs new file mode 100644 index 0000000..c4801e6 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGamepadButton.gen.cs @@ -0,0 +1,38 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGamepadButton + { + Invalid = -1, + South = 0, + East = 1, + West = 2, + North = 3, + Back = 4, + Guide = 5, + Start = 6, + LeftStick = 7, + RightStick = 8, + LeftShoulder = 9, + RightShoulder = 10, + DpadUp = 11, + DpadDown = 12, + DpadLeft = 13, + DpadRight = 14, + Misc1 = 15, + RightPaddle1 = 16, + LeftPaddle1 = 17, + RightPaddle2 = 18, + LeftPaddle2 = 19, + Touchpad = 20, + Misc2 = 21, + Misc3 = 22, + Misc4 = 23, + Misc5 = 24, + Misc6 = 25, + Count = 26, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGamepadButtonLabel.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGamepadButtonLabel.gen.cs new file mode 100644 index 0000000..1779141 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGamepadButtonLabel.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGamepadButtonLabel : uint + { + Unknown = 0u, + A = 1u, + B = 2u, + X = 3u, + Y = 4u, + Cross = 5u, + Circle = 6u, + Square = 7u, + Triangle = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGamepadType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGamepadType.gen.cs new file mode 100644 index 0000000..0822d56 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGamepadType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGamepadType : uint + { + Unknown = 0u, + Standard = 1u, + Xbox360 = 2u, + Xboxone = 3u, + Ps3 = 4u, + Ps4 = 5u, + Ps5 = 6u, + NintendoSwitchPro = 7u, + NintendoSwitchJoyconLeft = 8u, + NintendoSwitchJoyconRight = 9u, + NintendoSwitchJoyconPair = 10u, + Gamecube = 11u, + Count = 12u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGlobFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGlobFlags.gen.cs new file mode 100644 index 0000000..bdaf89d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGlobFlags.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlGlobFlags : uint + { + Caseinsensitive = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuBlendFactor.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuBlendFactor.gen.cs new file mode 100644 index 0000000..59293e6 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuBlendFactor.gen.cs @@ -0,0 +1,24 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuBlendFactor : uint + { + Invalid = 0u, + Zero = 1u, + One = 2u, + SrcColor = 3u, + OneMinusSrcColor = 4u, + DstColor = 5u, + OneMinusDstColor = 6u, + SrcAlpha = 7u, + OneMinusSrcAlpha = 8u, + DstAlpha = 9u, + OneMinusDstAlpha = 10u, + ConstantColor = 11u, + OneMinusConstantColor = 12u, + SrcAlphaSaturate = 13u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuBlendOp.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuBlendOp.gen.cs new file mode 100644 index 0000000..89b8115 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuBlendOp.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuBlendOp : uint + { + Invalid = 0u, + Add = 1u, + Subtract = 2u, + ReverseSubtract = 3u, + Min = 4u, + Max = 5u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuBufferUsageFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuBufferUsageFlags.gen.cs new file mode 100644 index 0000000..37d2ffd --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuBufferUsageFlags.gen.cs @@ -0,0 +1,17 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlGpuBufferUsageFlags : uint + { + ComputeStorageRead = 16u, + ComputeStorageWrite = 32u, + GraphicsStorageRead = 8u, + Index = 2u, + Indirect = 4u, + Vertex = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuColorComponentFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuColorComponentFlags.gen.cs new file mode 100644 index 0000000..bea9448 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuColorComponentFlags.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlGpuColorComponentFlags : byte + { + A = 8, + B = 4, + G = 2, + R = 1, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuCompareOp.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuCompareOp.gen.cs new file mode 100644 index 0000000..0ea8124 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuCompareOp.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuCompareOp : uint + { + Invalid = 0u, + Never = 1u, + Less = 2u, + Equal = 3u, + LessOrEqual = 4u, + Greater = 5u, + NotEqual = 6u, + GreaterOrEqual = 7u, + Always = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuCubeMapFace.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuCubeMapFace.gen.cs new file mode 100644 index 0000000..f0d7e1d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuCubeMapFace.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuCubeMapFace : uint + { + Positivex = 0u, + Negativex = 1u, + Positivey = 2u, + Negativey = 3u, + Positivez = 4u, + Negativez = 5u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuCullMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuCullMode.gen.cs new file mode 100644 index 0000000..e129825 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuCullMode.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuCullMode : uint + { + None = 0u, + Front = 1u, + Back = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuFillMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuFillMode.gen.cs new file mode 100644 index 0000000..e750e62 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuFillMode.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuFillMode : uint + { + Fill = 0u, + Line = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuFilter.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuFilter.gen.cs new file mode 100644 index 0000000..5e75feb --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuFilter.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuFilter : uint + { + Nearest = 0u, + Linear = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuFrontFace.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuFrontFace.gen.cs new file mode 100644 index 0000000..3d11d8d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuFrontFace.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuFrontFace : uint + { + CounterClockwise = 0u, + Clockwise = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuIndexElementSize.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuIndexElementSize.gen.cs new file mode 100644 index 0000000..289e7f4 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuIndexElementSize.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuIndexElementSize : uint + { + N16bit = 0u, + N32bit = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuLoadOp.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuLoadOp.gen.cs new file mode 100644 index 0000000..40a43b5 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuLoadOp.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuLoadOp : uint + { + Load = 0u, + Clear = 1u, + DontCare = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuPresentMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuPresentMode.gen.cs new file mode 100644 index 0000000..50e8b5a --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuPresentMode.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuPresentMode : uint + { + Vsync = 0u, + Immediate = 1u, + Mailbox = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuPrimitiveType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuPrimitiveType.gen.cs new file mode 100644 index 0000000..fb78723 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuPrimitiveType.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuPrimitiveType : uint + { + Trianglelist = 0u, + Trianglestrip = 1u, + Linelist = 2u, + Linestrip = 3u, + Pointlist = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuSampleCount.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuSampleCount.gen.cs new file mode 100644 index 0000000..3570c8d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuSampleCount.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuSampleCount : uint + { + N1 = 0u, + N2 = 1u, + N4 = 2u, + N8 = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuSamplerAddressMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuSamplerAddressMode.gen.cs new file mode 100644 index 0000000..eee9c86 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuSamplerAddressMode.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuSamplerAddressMode : uint + { + Repeat = 0u, + MirroredRepeat = 1u, + ClampToEdge = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuSamplerMipmapMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuSamplerMipmapMode.gen.cs new file mode 100644 index 0000000..160d120 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuSamplerMipmapMode.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuSamplerMipmapMode : uint + { + Nearest = 0u, + Linear = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuShaderStage.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuShaderStage.gen.cs new file mode 100644 index 0000000..d1d390a --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuShaderStage.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuShaderStage : uint + { + Vertex = 0u, + Fragment = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuStencilOp.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuStencilOp.gen.cs new file mode 100644 index 0000000..7898e20 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuStencilOp.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuStencilOp : uint + { + Invalid = 0u, + Keep = 1u, + Zero = 2u, + Replace = 3u, + IncrementAndClamp = 4u, + DecrementAndClamp = 5u, + Invert = 6u, + IncrementAndWrap = 7u, + DecrementAndWrap = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuStoreOp.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuStoreOp.gen.cs new file mode 100644 index 0000000..c19e306 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuStoreOp.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuStoreOp : uint + { + Store = 0u, + DontCare = 1u, + Resolve = 2u, + ResolveAndStore = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuSwapchainComposition.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuSwapchainComposition.gen.cs new file mode 100644 index 0000000..36734db --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuSwapchainComposition.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuSwapchainComposition : uint + { + Sdr = 0u, + SdrLinear = 1u, + HdrExtendedLinear = 2u, + Hdr10St2084 = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuTextureFormat.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuTextureFormat.gen.cs new file mode 100644 index 0000000..172e53d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuTextureFormat.gen.cs @@ -0,0 +1,115 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuTextureFormat : uint + { + Invalid = 0u, + A8Unorm = 1u, + R8Unorm = 2u, + R8g8Unorm = 3u, + R8g8b8a8Unorm = 4u, + R16Unorm = 5u, + R16g16Unorm = 6u, + R16g16b16a16Unorm = 7u, + R10g10b10a2Unorm = 8u, + B5g6r5Unorm = 9u, + B5g5r5a1Unorm = 10u, + B4g4r4a4Unorm = 11u, + B8g8r8a8Unorm = 12u, + Bc1RgbaUnorm = 13u, + Bc2RgbaUnorm = 14u, + Bc3RgbaUnorm = 15u, + Bc4RUnorm = 16u, + Bc5RgUnorm = 17u, + Bc7RgbaUnorm = 18u, + Bc6hRgbFloat = 19u, + Bc6hRgbUfloat = 20u, + R8Snorm = 21u, + R8g8Snorm = 22u, + R8g8b8a8Snorm = 23u, + R16Snorm = 24u, + R16g16Snorm = 25u, + R16g16b16a16Snorm = 26u, + R16Float = 27u, + R16g16Float = 28u, + R16g16b16a16Float = 29u, + R32Float = 30u, + R32g32Float = 31u, + R32g32b32a32Float = 32u, + R11g11b10Ufloat = 33u, + R8Uint = 34u, + R8g8Uint = 35u, + R8g8b8a8Uint = 36u, + R16Uint = 37u, + R16g16Uint = 38u, + R16g16b16a16Uint = 39u, + R32Uint = 40u, + R32g32Uint = 41u, + R32g32b32a32Uint = 42u, + R8Int = 43u, + R8g8Int = 44u, + R8g8b8a8Int = 45u, + R16Int = 46u, + R16g16Int = 47u, + R16g16b16a16Int = 48u, + R32Int = 49u, + R32g32Int = 50u, + R32g32b32a32Int = 51u, + R8g8b8a8UnormSrgb = 52u, + B8g8r8a8UnormSrgb = 53u, + Bc1RgbaUnormSrgb = 54u, + Bc2RgbaUnormSrgb = 55u, + Bc3RgbaUnormSrgb = 56u, + Bc7RgbaUnormSrgb = 57u, + D16Unorm = 58u, + D24Unorm = 59u, + D32Float = 60u, + D24UnormS8Uint = 61u, + D32FloatS8Uint = 62u, + Astc4x4Unorm = 63u, + Astc5x4Unorm = 64u, + Astc5x5Unorm = 65u, + Astc6x5Unorm = 66u, + Astc6x6Unorm = 67u, + Astc8x5Unorm = 68u, + Astc8x6Unorm = 69u, + Astc8x8Unorm = 70u, + Astc10x5Unorm = 71u, + Astc10x6Unorm = 72u, + Astc10x8Unorm = 73u, + Astc10x10Unorm = 74u, + Astc12x10Unorm = 75u, + Astc12x12Unorm = 76u, + Astc4x4UnormSrgb = 77u, + Astc5x4UnormSrgb = 78u, + Astc5x5UnormSrgb = 79u, + Astc6x5UnormSrgb = 80u, + Astc6x6UnormSrgb = 81u, + Astc8x5UnormSrgb = 82u, + Astc8x6UnormSrgb = 83u, + Astc8x8UnormSrgb = 84u, + Astc10x5UnormSrgb = 85u, + Astc10x6UnormSrgb = 86u, + Astc10x8UnormSrgb = 87u, + Astc10x10UnormSrgb = 88u, + Astc12x10UnormSrgb = 89u, + Astc12x12UnormSrgb = 90u, + Astc4x4Float = 91u, + Astc5x4Float = 92u, + Astc5x5Float = 93u, + Astc6x5Float = 94u, + Astc6x6Float = 95u, + Astc8x5Float = 96u, + Astc8x6Float = 97u, + Astc8x8Float = 98u, + Astc10x5Float = 99u, + Astc10x6Float = 100u, + Astc10x8Float = 101u, + Astc10x10Float = 102u, + Astc12x10Float = 103u, + Astc12x12Float = 104u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuTextureType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuTextureType.gen.cs new file mode 100644 index 0000000..20c9f38 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuTextureType.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuTextureType : uint + { + N2d = 0u, + N2dArray = 1u, + N3d = 2u, + Cube = 3u, + CubeArray = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuTextureUsageFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuTextureUsageFlags.gen.cs new file mode 100644 index 0000000..0ca2fab --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuTextureUsageFlags.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlGpuTextureUsageFlags : uint + { + ColorTarget = 2u, + ComputeStorageRead = 16u, + ComputeStorageSimultaneousReadWrite = 64u, + ComputeStorageWrite = 32u, + DepthStencilTarget = 4u, + GraphicsStorageRead = 8u, + Sampler = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuTransferBufferUsage.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuTransferBufferUsage.gen.cs new file mode 100644 index 0000000..7addab7 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuTransferBufferUsage.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuTransferBufferUsage : uint + { + Upload = 0u, + Download = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuVertexElementFormat.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuVertexElementFormat.gen.cs new file mode 100644 index 0000000..ca9c34e --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuVertexElementFormat.gen.cs @@ -0,0 +1,41 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuVertexElementFormat : uint + { + Invalid = 0u, + Int = 1u, + Int2 = 2u, + Int3 = 3u, + Int4 = 4u, + Uint = 5u, + Uint2 = 6u, + Uint3 = 7u, + Uint4 = 8u, + Float = 9u, + Float2 = 10u, + Float3 = 11u, + Float4 = 12u, + Byte2 = 13u, + Byte4 = 14u, + Ubyte2 = 15u, + Ubyte4 = 16u, + Byte2Norm = 17u, + Byte4Norm = 18u, + Ubyte2Norm = 19u, + Ubyte4Norm = 20u, + Short2 = 21u, + Short4 = 22u, + Ushort2 = 23u, + Ushort4 = 24u, + Short2Norm = 25u, + Short4Norm = 26u, + Ushort2Norm = 27u, + Ushort4Norm = 28u, + Half2 = 29u, + Half4 = 30u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlGpuVertexInputRate.gen.cs b/Brutal.Sdl/Generated/Enums/SdlGpuVertexInputRate.gen.cs new file mode 100644 index 0000000..29d357d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlGpuVertexInputRate.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlGpuVertexInputRate : uint + { + Vertex = 0u, + Instance = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlHidBusType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlHidBusType.gen.cs new file mode 100644 index 0000000..d1c3c02 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlHidBusType.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlHidBusType : uint + { + Unknown = 0u, + Usb = 1u, + Bluetooth = 2u, + I2c = 3u, + Spi = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlHintPriority.gen.cs b/Brutal.Sdl/Generated/Enums/SdlHintPriority.gen.cs new file mode 100644 index 0000000..14d1989 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlHintPriority.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlHintPriority : uint + { + Default = 0u, + Normal = 1u, + Override = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlHitTestResult.gen.cs b/Brutal.Sdl/Generated/Enums/SdlHitTestResult.gen.cs new file mode 100644 index 0000000..3cc4644 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlHitTestResult.gen.cs @@ -0,0 +1,20 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlHitTestResult : uint + { + Normal = 0u, + Draggable = 1u, + ResizeTopleft = 2u, + ResizeTop = 3u, + ResizeTopright = 4u, + ResizeRight = 5u, + ResizeBottomright = 6u, + ResizeBottom = 7u, + ResizeBottomleft = 8u, + ResizeLeft = 9u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlIOStatus.gen.cs b/Brutal.Sdl/Generated/Enums/SdlIOStatus.gen.cs new file mode 100644 index 0000000..5ecf456 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlIOStatus.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlIOStatus : uint + { + Ready = 0u, + Error = 1u, + Eof = 2u, + NotReady = 3u, + Readonly = 4u, + Writeonly = 5u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlIOWhence.gen.cs b/Brutal.Sdl/Generated/Enums/SdlIOWhence.gen.cs new file mode 100644 index 0000000..e2a10ea --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlIOWhence.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlIOWhence : uint + { + Set = 0u, + Cur = 1u, + End = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlInitFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlInitFlags.gen.cs new file mode 100644 index 0000000..bdea6c4 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlInitFlags.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlInitFlags : uint + { + Audio = 16u, + Camera = 65536u, + Events = 16384u, + Gamepad = 8192u, + Haptic = 4096u, + Joystick = 512u, + Sensor = 32768u, + Video = 32u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlInitStatus.gen.cs b/Brutal.Sdl/Generated/Enums/SdlInitStatus.gen.cs new file mode 100644 index 0000000..a7a1547 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlInitStatus.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlInitStatus : uint + { + Uninitialized = 0u, + Initializing = 1u, + Initialized = 2u, + Uninitializing = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlJoystickConnectionState.gen.cs b/Brutal.Sdl/Generated/Enums/SdlJoystickConnectionState.gen.cs new file mode 100644 index 0000000..6ae7d95 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlJoystickConnectionState.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlJoystickConnectionState + { + Invalid = -1, + Unknown = 0, + Wired = 1, + Wireless = 2, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlJoystickType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlJoystickType.gen.cs new file mode 100644 index 0000000..53ba44d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlJoystickType.gen.cs @@ -0,0 +1,21 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlJoystickType : uint + { + Unknown = 0u, + Gamepad = 1u, + Wheel = 2u, + ArcadeStick = 3u, + FlightStick = 4u, + DancePad = 5u, + Guitar = 6u, + DrumKit = 7u, + ArcadePad = 8u, + Throttle = 9u, + Count = 10u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlKeycode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlKeycode.gen.cs new file mode 100644 index 0000000..4b6962c --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlKeycode.gen.cs @@ -0,0 +1,266 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlKeycode : uint + { + Num0 = 48u, + Num1 = 49u, + Num2 = 50u, + Num3 = 51u, + Num4 = 52u, + Num5 = 53u, + Num6 = 54u, + Num7 = 55u, + Num8 = 56u, + Num9 = 57u, + A = 97u, + AcBack = 1073742106u, + AcBookmarks = 1073742110u, + AcClose = 1073742099u, + AcExit = 1073742100u, + AcForward = 1073742107u, + AcHome = 1073742105u, + AcNew = 1073742097u, + AcOpen = 1073742098u, + AcPrint = 1073742102u, + AcProperties = 1073742103u, + AcRefresh = 1073742109u, + AcSave = 1073742101u, + AcSearch = 1073742104u, + AcStop = 1073742108u, + Again = 1073741945u, + Alterase = 1073741977u, + Ampersand = 38u, + Apostrophe = 39u, + Application = 1073741925u, + Asterisk = 42u, + At = 64u, + B = 98u, + Backslash = 92u, + Backspace = 8u, + C = 99u, + Call = 1073742113u, + Cancel = 1073741979u, + Capslock = 1073741881u, + Caret = 94u, + ChannelDecrement = 1073742085u, + ChannelIncrement = 1073742084u, + Clear = 1073741980u, + Clearagain = 1073741986u, + Colon = 58u, + Comma = 44u, + Copy = 1073741948u, + Crsel = 1073741987u, + Currencysubunit = 1073742005u, + Currencyunit = 1073742004u, + Cut = 1073741947u, + D = 100u, + Dblapostrophe = 34u, + Decimalseparator = 1073742003u, + Delete = 127u, + Dollar = 36u, + Down = 1073741905u, + E = 101u, + End = 1073741901u, + Endcall = 1073742114u, + Equals = 61u, + Escape = 27u, + Exclaim = 33u, + Execute = 1073741940u, + Exsel = 1073741988u, + F = 102u, + F1 = 1073741882u, + F10 = 1073741891u, + F11 = 1073741892u, + F12 = 1073741893u, + F13 = 1073741928u, + F14 = 1073741929u, + F15 = 1073741930u, + F16 = 1073741931u, + F17 = 1073741932u, + F18 = 1073741933u, + F19 = 1073741934u, + F2 = 1073741883u, + F20 = 1073741935u, + F21 = 1073741936u, + F22 = 1073741937u, + F23 = 1073741938u, + F24 = 1073741939u, + F3 = 1073741884u, + F4 = 1073741885u, + F5 = 1073741886u, + F6 = 1073741887u, + F7 = 1073741888u, + F8 = 1073741889u, + F9 = 1073741890u, + Find = 1073741950u, + G = 103u, + Grave = 96u, + Greater = 62u, + H = 104u, + Hash = 35u, + Help = 1073741941u, + Home = 1073741898u, + I = 105u, + Insert = 1073741897u, + J = 106u, + K = 107u, + Kp0 = 1073741922u, + Kp00 = 1073742000u, + Kp000 = 1073742001u, + Kp1 = 1073741913u, + Kp2 = 1073741914u, + Kp3 = 1073741915u, + Kp4 = 1073741916u, + Kp5 = 1073741917u, + Kp6 = 1073741918u, + Kp7 = 1073741919u, + Kp8 = 1073741920u, + Kp9 = 1073741921u, + KpA = 1073742012u, + KpAmpersand = 1073742023u, + KpAt = 1073742030u, + KpB = 1073742013u, + KpBackspace = 1073742011u, + KpBinary = 1073742042u, + KpC = 1073742014u, + KpClear = 1073742040u, + KpClearentry = 1073742041u, + KpColon = 1073742027u, + KpComma = 1073741957u, + KpD = 1073742015u, + KpDblampersand = 1073742024u, + KpDblverticalbar = 1073742026u, + KpDecimal = 1073742044u, + KpDivide = 1073741908u, + KpE = 1073742016u, + KpEnter = 1073741912u, + KpEquals = 1073741927u, + KpEqualsas400 = 1073741958u, + KpExclam = 1073742031u, + KpF = 1073742017u, + KpGreater = 1073742022u, + KpHash = 1073742028u, + KpHexadecimal = 1073742045u, + KpLeftbrace = 1073742008u, + KpLeftparen = 1073742006u, + KpLess = 1073742021u, + KpMemadd = 1073742035u, + KpMemclear = 1073742034u, + KpMemdivide = 1073742038u, + KpMemmultiply = 1073742037u, + KpMemrecall = 1073742033u, + KpMemstore = 1073742032u, + KpMemsubtract = 1073742036u, + KpMinus = 1073741910u, + KpMultiply = 1073741909u, + KpOctal = 1073742043u, + KpPercent = 1073742020u, + KpPeriod = 1073741923u, + KpPlus = 1073741911u, + KpPlusminus = 1073742039u, + KpPower = 1073742019u, + KpRightbrace = 1073742009u, + KpRightparen = 1073742007u, + KpSpace = 1073742029u, + KpTab = 1073742010u, + KpVerticalbar = 1073742025u, + KpXor = 1073742018u, + L = 108u, + Lalt = 1073742050u, + Lctrl = 1073742048u, + Left = 1073741904u, + Leftbrace = 123u, + Leftbracket = 91u, + Leftparen = 40u, + LeftTab = 536870913u, + Less = 60u, + Level5Shift = 536870914u, + Lgui = 1073742051u, + Lhyper = 536870918u, + Lmeta = 536870916u, + Lshift = 1073742049u, + M = 109u, + MediaEject = 1073742094u, + MediaFastForward = 1073742089u, + MediaNextTrack = 1073742091u, + MediaPause = 1073742087u, + MediaPlay = 1073742086u, + MediaPlayPause = 1073742095u, + MediaPreviousTrack = 1073742092u, + MediaRecord = 1073742088u, + MediaRewind = 1073742090u, + MediaSelect = 1073742096u, + MediaStop = 1073742093u, + Menu = 1073741942u, + Minus = 45u, + Mode = 1073742081u, + MultiKeyCompose = 536870915u, + Mute = 1073741951u, + N = 110u, + Numlockclear = 1073741907u, + O = 111u, + Oper = 1073741985u, + Out = 1073741984u, + P = 112u, + Pagedown = 1073741902u, + Pageup = 1073741899u, + Paste = 1073741949u, + Pause = 1073741896u, + Percent = 37u, + Period = 46u, + Pipe = 124u, + Plus = 43u, + Plusminus = 177u, + Power = 1073741926u, + Printscreen = 1073741894u, + Prior = 1073741981u, + Q = 113u, + Question = 63u, + R = 114u, + Ralt = 1073742054u, + Rctrl = 1073742052u, + Return = 13u, + Return2 = 1073741982u, + Rgui = 1073742055u, + Rhyper = 536870919u, + Right = 1073741903u, + Rightbrace = 125u, + Rightbracket = 93u, + Rightparen = 41u, + Rmeta = 536870917u, + Rshift = 1073742053u, + S = 115u, + Scrolllock = 1073741895u, + Select = 1073741943u, + Semicolon = 59u, + Separator = 1073741983u, + Slash = 47u, + Sleep = 1073742082u, + Softleft = 1073742111u, + Softright = 1073742112u, + Space = 32u, + Stop = 1073741944u, + Sysreq = 1073741978u, + T = 116u, + Tab = 9u, + Thousandsseparator = 1073742002u, + Tilde = 126u, + U = 117u, + Underscore = 95u, + Undo = 1073741946u, + Unknown = 0u, + Up = 1073741906u, + V = 118u, + Volumedown = 1073741953u, + Volumeup = 1073741952u, + W = 119u, + Wake = 1073742083u, + X = 120u, + Y = 121u, + Z = 122u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlLogCategory.gen.cs b/Brutal.Sdl/Generated/Enums/SdlLogCategory.gen.cs new file mode 100644 index 0000000..8bfa915 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlLogCategory.gen.cs @@ -0,0 +1,30 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlLogCategory : uint + { + Application = 0u, + Error = 1u, + Assert = 2u, + System = 3u, + Audio = 4u, + Video = 5u, + Render = 6u, + Input = 7u, + Test = 8u, + Gpu = 9u, + Reserved2 = 10u, + Reserved3 = 11u, + Reserved4 = 12u, + Reserved5 = 13u, + Reserved6 = 14u, + Reserved7 = 15u, + Reserved8 = 16u, + Reserved9 = 17u, + Reserved10 = 18u, + Custom = 19u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlLogPriority.gen.cs b/Brutal.Sdl/Generated/Enums/SdlLogPriority.gen.cs new file mode 100644 index 0000000..3a1378f --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlLogPriority.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlLogPriority : uint + { + Invalid = 0u, + Trace = 1u, + Verbose = 2u, + Debug = 3u, + Info = 4u, + Warn = 5u, + Error = 6u, + Critical = 7u, + Count = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlMatrixCoefficients.gen.cs b/Brutal.Sdl/Generated/Enums/SdlMatrixCoefficients.gen.cs new file mode 100644 index 0000000..8f1bd9f --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlMatrixCoefficients.gen.cs @@ -0,0 +1,25 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlMatrixCoefficients : uint + { + Identity = 0u, + Bt709 = 1u, + Unspecified = 2u, + Fcc = 4u, + Bt470bg = 5u, + Bt601 = 6u, + Smpte240 = 7u, + Ycgco = 8u, + Bt2020Ncl = 9u, + Bt2020Cl = 10u, + Smpte2085 = 11u, + ChromaDerivedNcl = 12u, + ChromaDerivedCl = 13u, + Ictcp = 14u, + Custom = 31u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlMessageBoxButtonFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlMessageBoxButtonFlags.gen.cs new file mode 100644 index 0000000..e3d838a --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlMessageBoxButtonFlags.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlMessageBoxButtonFlags : uint + { + EscapekeyDefault = 2u, + ReturnkeyDefault = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlMessageBoxColorType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlMessageBoxColorType.gen.cs new file mode 100644 index 0000000..80e9caa --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlMessageBoxColorType.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlMessageBoxColorType : uint + { + Background = 0u, + Text = 1u, + ButtonBorder = 2u, + ButtonBackground = 3u, + ButtonSelected = 4u, + Count = 5u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlMessageBoxFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlMessageBoxFlags.gen.cs new file mode 100644 index 0000000..f615d90 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlMessageBoxFlags.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlMessageBoxFlags : uint + { + ButtonsLeftToRight = 128u, + ButtonsRightToLeft = 256u, + Error = 16u, + Information = 64u, + Warning = 32u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlMouseButtonFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlMouseButtonFlags.gen.cs new file mode 100644 index 0000000..dc5a0ed --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlMouseButtonFlags.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlMouseButtonFlags : uint + { + Left = 1u, + Middle = 2u, + Right = 4u, + X1 = 8u, + X2 = 16u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlMouseWheelDirection.gen.cs b/Brutal.Sdl/Generated/Enums/SdlMouseWheelDirection.gen.cs new file mode 100644 index 0000000..3ae078d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlMouseWheelDirection.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlMouseWheelDirection : uint + { + Normal = 0u, + Flipped = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPackedLayout.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPackedLayout.gen.cs new file mode 100644 index 0000000..0b441ba --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPackedLayout.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPackedLayout : uint + { + None = 0u, + N332 = 1u, + N4444 = 2u, + N1555 = 3u, + N5551 = 4u, + N565 = 5u, + N8888 = 6u, + N2101010 = 7u, + N1010102 = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPackedOrder.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPackedOrder.gen.cs new file mode 100644 index 0000000..b5135b3 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPackedOrder.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPackedOrder : uint + { + None = 0u, + Xrgb = 1u, + Rgbx = 2u, + Argb = 3u, + Rgba = 4u, + Xbgr = 5u, + Bgrx = 6u, + Abgr = 7u, + Bgra = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPathType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPathType.gen.cs new file mode 100644 index 0000000..54927e0 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPathType.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPathType : uint + { + None = 0u, + File = 1u, + Directory = 2u, + Other = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPenAxis.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPenAxis.gen.cs new file mode 100644 index 0000000..f432543 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPenAxis.gen.cs @@ -0,0 +1,18 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPenAxis : uint + { + Pressure = 0u, + Xtilt = 1u, + Ytilt = 2u, + Distance = 3u, + Rotation = 4u, + Slider = 5u, + TangentialPressure = 6u, + Count = 7u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPenDeviceType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPenDeviceType.gen.cs new file mode 100644 index 0000000..11a8137 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPenDeviceType.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPenDeviceType + { + Invalid = -1, + Unknown = 0, + Direct = 1, + Indirect = 2, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPenInputFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPenInputFlags.gen.cs new file mode 100644 index 0000000..c235675 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPenInputFlags.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlPenInputFlags : uint + { + Button1 = 2u, + Button2 = 4u, + Button3 = 8u, + Button4 = 16u, + Button5 = 32u, + Down = 1u, + EraserTip = 1073741824u, + InProximity = 2147483648u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPixelFormat.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPixelFormat.gen.cs new file mode 100644 index 0000000..0ccd099 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPixelFormat.gen.cs @@ -0,0 +1,83 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPixelFormat : uint + { + Unknown = 0u, + Index1lsb = 286261504u, + Index1msb = 287310080u, + Index2lsb = 470811136u, + Index2msb = 471859712u, + Index4lsb = 303039488u, + Index4msb = 304088064u, + Index8 = 318769153u, + Rgb332 = 336660481u, + Xrgb4444 = 353504258u, + Xbgr4444 = 357698562u, + Xrgb1555 = 353570562u, + Xbgr1555 = 357764866u, + Argb4444 = 355602434u, + Rgba4444 = 356651010u, + Abgr4444 = 359796738u, + Bgra4444 = 360845314u, + Argb1555 = 355667970u, + Rgba5551 = 356782082u, + Abgr1555 = 359862274u, + Bgra5551 = 360976386u, + Rgb565 = 353701890u, + Bgr565 = 357896194u, + Rgb24 = 386930691u, + Bgr24 = 390076419u, + Xrgb8888 = 370546692u, + Rgbx8888 = 371595268u, + Xbgr8888 = 374740996u, + Bgrx8888 = 375789572u, + Argb8888 = 372645892u, + Rgba8888 = 373694468u, + Abgr8888 = 376840196u, + Bgra8888 = 377888772u, + Xrgb2101010 = 370614276u, + Xbgr2101010 = 374808580u, + Argb2101010 = 372711428u, + Abgr2101010 = 376905732u, + Rgb48 = 403714054u, + Bgr48 = 406859782u, + Rgba64 = 404766728u, + Argb64 = 405815304u, + Bgra64 = 407912456u, + Abgr64 = 408961032u, + Rgb48Float = 437268486u, + Bgr48Float = 440414214u, + Rgba64Float = 438321160u, + Argb64Float = 439369736u, + Bgra64Float = 441466888u, + Abgr64Float = 442515464u, + Rgb96Float = 454057996u, + Bgr96Float = 457203724u, + Rgba128Float = 455114768u, + Argb128Float = 456163344u, + Bgra128Float = 458260496u, + Abgr128Float = 459309072u, + Yv12 = 842094169u, + Iyuv = 1448433993u, + Yuy2 = 844715353u, + Uyvy = 1498831189u, + Yvyu = 1431918169u, + Nv12 = 842094158u, + Nv21 = 825382478u, + P010 = 808530000u, + ExternalOes = 542328143u, + Mjpg = 1196444237u, + Rgba32 = 376840196u, + Argb32 = 377888772u, + Bgra32 = 372645892u, + Abgr32 = 373694468u, + Rgbx32 = 374740996u, + Xrgb32 = 375789572u, + Bgrx32 = 370546692u, + Xbgr32 = 371595268u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPixelType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPixelType.gen.cs new file mode 100644 index 0000000..2bcdd7c --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPixelType.gen.cs @@ -0,0 +1,23 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPixelType : uint + { + Unknown = 0u, + Index1 = 1u, + Index4 = 2u, + Index8 = 3u, + Packed8 = 4u, + Packed16 = 5u, + Packed32 = 6u, + Arrayu8 = 7u, + Arrayu16 = 8u, + Arrayu32 = 9u, + Arrayf16 = 10u, + Arrayf32 = 11u, + Index2 = 12u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPowerState.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPowerState.gen.cs new file mode 100644 index 0000000..7b96331 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPowerState.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPowerState + { + Error = -1, + Unknown = 0, + OnBattery = 1, + NoBattery = 2, + Charging = 3, + Charged = 4, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlProcessIO.gen.cs b/Brutal.Sdl/Generated/Enums/SdlProcessIO.gen.cs new file mode 100644 index 0000000..fc5d20b --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlProcessIO.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlProcessIO : uint + { + Inherited = 0u, + Null = 1u, + App = 2u, + Redirect = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlProgressState.gen.cs b/Brutal.Sdl/Generated/Enums/SdlProgressState.gen.cs new file mode 100644 index 0000000..5b8dcf7 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlProgressState.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlProgressState + { + Invalid = -1, + None = 0, + Indeterminate = 1, + Normal = 2, + Paused = 3, + Error = 4, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlPropertyType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlPropertyType.gen.cs new file mode 100644 index 0000000..8a2a536 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlPropertyType.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlPropertyType : uint + { + Invalid = 0u, + Pointer = 1u, + String = 2u, + Number = 3u, + Float = 4u, + Boolean = 5u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlRendererLogicalPresentation.gen.cs b/Brutal.Sdl/Generated/Enums/SdlRendererLogicalPresentation.gen.cs new file mode 100644 index 0000000..e1c4cc2 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlRendererLogicalPresentation.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlRendererLogicalPresentation : uint + { + Disabled = 0u, + Stretch = 1u, + Letterbox = 2u, + Overscan = 3u, + IntegerScale = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlSandbox.gen.cs b/Brutal.Sdl/Generated/Enums/SdlSandbox.gen.cs new file mode 100644 index 0000000..8beb162 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlSandbox.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlSandbox : uint + { + None = 0u, + UnknownContainer = 1u, + Flatpak = 2u, + Snap = 3u, + Macos = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlScaleMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlScaleMode.gen.cs new file mode 100644 index 0000000..24d49d8 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlScaleMode.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlScaleMode + { + Invalid = -1, + Nearest = 0, + Linear = 1, + Pixelart = 2, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlScancode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlScancode.gen.cs new file mode 100644 index 0000000..16c086a --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlScancode.gen.cs @@ -0,0 +1,259 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlScancode : uint + { + Unknown = 0u, + A = 4u, + B = 5u, + C = 6u, + D = 7u, + E = 8u, + F = 9u, + G = 10u, + H = 11u, + I = 12u, + J = 13u, + K = 14u, + L = 15u, + M = 16u, + N = 17u, + O = 18u, + P = 19u, + Q = 20u, + R = 21u, + S = 22u, + T = 23u, + U = 24u, + V = 25u, + W = 26u, + X = 27u, + Y = 28u, + Z = 29u, + N1 = 30u, + N2 = 31u, + N3 = 32u, + N4 = 33u, + N5 = 34u, + N6 = 35u, + N7 = 36u, + N8 = 37u, + N9 = 38u, + N0 = 39u, + Return = 40u, + Escape = 41u, + Backspace = 42u, + Tab = 43u, + Space = 44u, + Minus = 45u, + Equals = 46u, + Leftbracket = 47u, + Rightbracket = 48u, + Backslash = 49u, + Nonushash = 50u, + Semicolon = 51u, + Apostrophe = 52u, + Grave = 53u, + Comma = 54u, + Period = 55u, + Slash = 56u, + Capslock = 57u, + F1 = 58u, + F2 = 59u, + F3 = 60u, + F4 = 61u, + F5 = 62u, + F6 = 63u, + F7 = 64u, + F8 = 65u, + F9 = 66u, + F10 = 67u, + F11 = 68u, + F12 = 69u, + Printscreen = 70u, + Scrolllock = 71u, + Pause = 72u, + Insert = 73u, + Home = 74u, + Pageup = 75u, + Delete = 76u, + End = 77u, + Pagedown = 78u, + Right = 79u, + Left = 80u, + Down = 81u, + Up = 82u, + Numlockclear = 83u, + KpDivide = 84u, + KpMultiply = 85u, + KpMinus = 86u, + KpPlus = 87u, + KpEnter = 88u, + Kp1 = 89u, + Kp2 = 90u, + Kp3 = 91u, + Kp4 = 92u, + Kp5 = 93u, + Kp6 = 94u, + Kp7 = 95u, + Kp8 = 96u, + Kp9 = 97u, + Kp0 = 98u, + KpPeriod = 99u, + Nonusbackslash = 100u, + Application = 101u, + Power = 102u, + KpEquals = 103u, + F13 = 104u, + F14 = 105u, + F15 = 106u, + F16 = 107u, + F17 = 108u, + F18 = 109u, + F19 = 110u, + F20 = 111u, + F21 = 112u, + F22 = 113u, + F23 = 114u, + F24 = 115u, + Execute = 116u, + Help = 117u, + Menu = 118u, + Select = 119u, + Stop = 120u, + Again = 121u, + Undo = 122u, + Cut = 123u, + Copy = 124u, + Paste = 125u, + Find = 126u, + Mute = 127u, + Volumeup = 128u, + Volumedown = 129u, + KpComma = 133u, + KpEqualsas400 = 134u, + International1 = 135u, + International2 = 136u, + International3 = 137u, + International4 = 138u, + International5 = 139u, + International6 = 140u, + International7 = 141u, + International8 = 142u, + International9 = 143u, + Lang1 = 144u, + Lang2 = 145u, + Lang3 = 146u, + Lang4 = 147u, + Lang5 = 148u, + Lang6 = 149u, + Lang7 = 150u, + Lang8 = 151u, + Lang9 = 152u, + Alterase = 153u, + Sysreq = 154u, + Cancel = 155u, + Clear = 156u, + Prior = 157u, + Return2 = 158u, + Separator = 159u, + Out = 160u, + Oper = 161u, + Clearagain = 162u, + Crsel = 163u, + Exsel = 164u, + Kp00 = 176u, + Kp000 = 177u, + Thousandsseparator = 178u, + Decimalseparator = 179u, + Currencyunit = 180u, + Currencysubunit = 181u, + KpLeftparen = 182u, + KpRightparen = 183u, + KpLeftbrace = 184u, + KpRightbrace = 185u, + KpTab = 186u, + KpBackspace = 187u, + KpA = 188u, + KpB = 189u, + KpC = 190u, + KpD = 191u, + KpE = 192u, + KpF = 193u, + KpXor = 194u, + KpPower = 195u, + KpPercent = 196u, + KpLess = 197u, + KpGreater = 198u, + KpAmpersand = 199u, + KpDblampersand = 200u, + KpVerticalbar = 201u, + KpDblverticalbar = 202u, + KpColon = 203u, + KpHash = 204u, + KpSpace = 205u, + KpAt = 206u, + KpExclam = 207u, + KpMemstore = 208u, + KpMemrecall = 209u, + KpMemclear = 210u, + KpMemadd = 211u, + KpMemsubtract = 212u, + KpMemmultiply = 213u, + KpMemdivide = 214u, + KpPlusminus = 215u, + KpClear = 216u, + KpClearentry = 217u, + KpBinary = 218u, + KpOctal = 219u, + KpDecimal = 220u, + KpHexadecimal = 221u, + Lctrl = 224u, + Lshift = 225u, + Lalt = 226u, + Lgui = 227u, + Rctrl = 228u, + Rshift = 229u, + Ralt = 230u, + Rgui = 231u, + Mode = 257u, + Sleep = 258u, + Wake = 259u, + ChannelIncrement = 260u, + ChannelDecrement = 261u, + MediaPlay = 262u, + MediaPause = 263u, + MediaRecord = 264u, + MediaFastForward = 265u, + MediaRewind = 266u, + MediaNextTrack = 267u, + MediaPreviousTrack = 268u, + MediaStop = 269u, + MediaEject = 270u, + MediaPlayPause = 271u, + MediaSelect = 272u, + AcNew = 273u, + AcOpen = 274u, + AcClose = 275u, + AcExit = 276u, + AcSave = 277u, + AcPrint = 278u, + AcProperties = 279u, + AcSearch = 280u, + AcHome = 281u, + AcBack = 282u, + AcForward = 283u, + AcStop = 284u, + AcRefresh = 285u, + AcBookmarks = 286u, + Softleft = 287u, + Softright = 288u, + Call = 289u, + Endcall = 290u, + Reserved = 400u, + Count = 512u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlSensorType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlSensorType.gen.cs new file mode 100644 index 0000000..ca30e02 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlSensorType.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlSensorType + { + Invalid = -1, + Unknown = 0, + Accel = 1, + Gyro = 2, + AccelL = 3, + GyroL = 4, + AccelR = 5, + GyroR = 6, + Count = 7, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlSurfaceFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlSurfaceFlags.gen.cs new file mode 100644 index 0000000..24272af --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlSurfaceFlags.gen.cs @@ -0,0 +1,15 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlSurfaceFlags : uint + { + Locked = 4u, + LockNeeded = 2u, + Preallocated = 1u, + SimdAligned = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlSystemCursor.gen.cs b/Brutal.Sdl/Generated/Enums/SdlSystemCursor.gen.cs new file mode 100644 index 0000000..717c6de --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlSystemCursor.gen.cs @@ -0,0 +1,31 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlSystemCursor : uint + { + Default = 0u, + Text = 1u, + Wait = 2u, + Crosshair = 3u, + Progress = 4u, + NwseResize = 5u, + NeswResize = 6u, + EwResize = 7u, + NsResize = 8u, + Move = 9u, + NotAllowed = 10u, + Pointer = 11u, + NwResize = 12u, + NResize = 13u, + NeResize = 14u, + EResize = 15u, + SeResize = 16u, + SResize = 17u, + SwResize = 18u, + WResize = 19u, + Count = 20u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlSystemTheme.gen.cs b/Brutal.Sdl/Generated/Enums/SdlSystemTheme.gen.cs new file mode 100644 index 0000000..549d0f0 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlSystemTheme.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlSystemTheme : uint + { + Unknown = 0u, + Light = 1u, + Dark = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTextInputType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTextInputType.gen.cs new file mode 100644 index 0000000..9d8cfc3 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTextInputType.gen.cs @@ -0,0 +1,19 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlTextInputType : uint + { + Text = 0u, + TextName = 1u, + TextEmail = 2u, + TextUsername = 3u, + TextPasswordHidden = 4u, + TextPasswordVisible = 5u, + Number = 6u, + NumberPasswordHidden = 7u, + NumberPasswordVisible = 8u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTextureAccess.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTextureAccess.gen.cs new file mode 100644 index 0000000..18d0b31 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTextureAccess.gen.cs @@ -0,0 +1,13 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlTextureAccess : uint + { + Static = 0u, + Streaming = 1u, + Target = 2u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTextureAddressMode.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTextureAddressMode.gen.cs new file mode 100644 index 0000000..b8642d5 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTextureAddressMode.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlTextureAddressMode + { + Invalid = -1, + Auto = 0, + Clamp = 1, + Wrap = 2, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlThreadPriority.gen.cs b/Brutal.Sdl/Generated/Enums/SdlThreadPriority.gen.cs new file mode 100644 index 0000000..1a65359 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlThreadPriority.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlThreadPriority : uint + { + Low = 0u, + Normal = 1u, + High = 2u, + TimeCritical = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlThreadState.gen.cs b/Brutal.Sdl/Generated/Enums/SdlThreadState.gen.cs new file mode 100644 index 0000000..97d3d4c --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlThreadState.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlThreadState : uint + { + Unknown = 0u, + Alive = 1u, + Detached = 2u, + Complete = 3u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTimeFormat.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTimeFormat.gen.cs new file mode 100644 index 0000000..301e8db --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTimeFormat.gen.cs @@ -0,0 +1,12 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlTimeFormat : uint + { + N24hr = 0u, + N12hr = 1u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTouchDeviceType.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTouchDeviceType.gen.cs new file mode 100644 index 0000000..6924075 --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTouchDeviceType.gen.cs @@ -0,0 +1,14 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlTouchDeviceType + { + Invalid = -1, + Direct = 0, + IndirectAbsolute = 1, + IndirectRelative = 2, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTransferCharacteristics.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTransferCharacteristics.gen.cs new file mode 100644 index 0000000..40906da --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTransferCharacteristics.gen.cs @@ -0,0 +1,29 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public enum SdlTransferCharacteristics : uint + { + Unknown = 0u, + Bt709 = 1u, + Unspecified = 2u, + Gamma22 = 4u, + Gamma28 = 5u, + Bt601 = 6u, + Smpte240 = 7u, + Linear = 8u, + Log100 = 9u, + Log100Sqrt10 = 10u, + Iec61966 = 11u, + Bt1361 = 12u, + Srgb = 13u, + Bt202010bit = 14u, + Bt202012bit = 15u, + Pq = 16u, + Smpte428 = 17u, + Hlg = 18u, + Custom = 31u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlTrayEntryFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlTrayEntryFlags.gen.cs new file mode 100644 index 0000000..bda48fb --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlTrayEntryFlags.gen.cs @@ -0,0 +1,16 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlTrayEntryFlags : uint + { + Button = 1u, + Checkbox = 2u, + Checked = 1073741824u, + Disabled = 2147483648u, + Submenu = 4u, + } +} diff --git a/Brutal.Sdl/Generated/Enums/SdlWindowFlags.gen.cs b/Brutal.Sdl/Generated/Enums/SdlWindowFlags.gen.cs new file mode 100644 index 0000000..189b73d --- /dev/null +++ b/Brutal.Sdl/Generated/Enums/SdlWindowFlags.gen.cs @@ -0,0 +1,37 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [Flags] + public enum SdlWindowFlags : ulong + { + AlwaysOnTop = 65536uL, + Borderless = 16uL, + External = 2048uL, + FillDocument = 2097152uL, + Fullscreen = 1uL, + Hidden = 8uL, + HighPixelDensity = 8192uL, + InputFocus = 512uL, + KeyboardGrabbed = 1048576uL, + Maximized = 128uL, + Metal = 536870912uL, + Minimized = 64uL, + Modal = 4096uL, + MouseCapture = 16384uL, + MouseFocus = 1024uL, + MouseGrabbed = 256uL, + MouseRelativeMode = 32768uL, + NotFocusable = 2147483648uL, + Occluded = 4uL, + Opengl = 2uL, + PopupMenu = 524288uL, + Resizable = 32uL, + Tooltip = 262144uL, + Transparent = 1073741824uL, + Utility = 131072uL, + Vulkan = 268435456uL, + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Events.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Events.gen.cs new file mode 100644 index 0000000..cbfeeb4 --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Events.gen.cs @@ -0,0 +1,557 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Events + { + /// + /// Pump the event loop, gathering events from the input devices. + /// + /// + /// + /// This function updates the event queue and internal input device state. + /// + /// + /// SDL_PumpEvents() gathers all the pending input information from devices and + /// places it in the event queue. Without calls to SDL_PumpEvents() no events + /// would ever be placed on the queue. Often the need for calls to + /// SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and + /// SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not + /// polling or waiting for events (e.g. you are filtering them), then you must + /// call SDL_PumpEvents() to force an event queue update. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static void PumpEvents() + { + PInvoke.PumpEvents(); + Sdl.ExceptionAggregator.CheckExceptions(); + } + + /// + /// Check the event queue for messages and optionally return them. + /// + /// + /// destination buffer for the retrieved events, may be NULL to + /// leave the events in the queue and return the number of events + /// that would have been stored. + /// + /// + /// if action is SDL_ADDEVENT, the number of events to add + /// back to the event queue; if action is SDL_PEEKEVENT or + /// SDL_GETEVENT, the maximum number of events to retrieve. + /// + /// action to take; see [Remarks](#remarks) for details. + /// + /// minimum value of the event type to be considered; + /// SDL_EVENT_FIRST is a safe choice. + /// + /// + /// maximum value of the event type to be considered; + /// SDL_EVENT_LAST is a safe choice. + /// + /// + /// the number of events actually stored or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// action may be any of the following: + /// + /// + /// - SDL_ADDEVENT: up to numevents events will be added to the back of the + /// event queue. + /// - SDL_PEEKEVENT: numevents events at the front of the event queue, + /// within the specified minimum and maximum type, will be returned to the + /// caller and will not be removed from the queue. If you pass NULL for + /// events, then numevents is ignored and the total number of matching + /// events will be returned. + /// - SDL_GETEVENT: up to numevents events at the front of the event queue, + /// within the specified minimum and maximum type, will be returned to the + /// caller and will be removed from the queue. + /// + /// + /// You may have to call SDL_PumpEvents() before calling this function. + /// Otherwise, the events may not be ready to be filtered when you call + /// SDL_PeepEvents(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static int PeepEvents( + SdlEvent* events, + int numevents, + SdlEventAction action, + uint minType, + uint maxType + ) => PInvoke.PeepEvents(events, numevents, action, minType, maxType); + + /// + /// Check for the existence of a certain event type in the event queue. + /// + /// the type of event to be queried; see SDL_EventType for details. + /// + /// true if events matching type are present, or false if events + /// matching type are not present. + /// + /// + /// + /// If you need to check for a range of event types, use SDL_HasEvents() + /// instead. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HasEvent(uint type) => PInvoke.HasEvent(type) != 0; + + /// + /// Check for the existence of certain event types in the event queue. + /// + /// + /// the low end of event type to be queried, inclusive; see + /// SDL_EventType for details. + /// + /// + /// the high end of event type to be queried, inclusive; see + /// SDL_EventType for details. + /// + /// + /// true if events with type >= minType and <= maxType are + /// present, or false if not. + /// + /// + /// + /// If you need to check for a single event type, use SDL_HasEvent() instead. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HasEvents(uint minType, uint maxType) => PInvoke.HasEvents(minType, maxType) != 0; + + /// + /// Clear events of a specific type from the event queue. + /// + /// the type of event to be cleared; see SDL_EventType for details. + /// + /// + /// This will unconditionally remove any events from the queue that match + /// type. If you need to remove a range of event types, use SDL_FlushEvents() + /// instead. + /// + /// + /// It's also normal to just ignore events you don't care about in your event + /// loop without calling this function. + /// + /// + /// This function only affects currently queued events. If you want to make + /// sure that all pending OS events are flushed, you can call SDL_PumpEvents() + /// on the main thread immediately before the flush call. + /// + /// + /// If you have user events with custom data that needs to be freed, you should + /// use SDL_PeepEvents() to remove and clean up those events before calling + /// this function. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void FlushEvent(uint type) => PInvoke.FlushEvent(type); + + /// + /// Clear events of a range of types from the event queue. + /// + /// + /// the low end of event type to be cleared, inclusive; see + /// SDL_EventType for details. + /// + /// + /// the high end of event type to be cleared, inclusive; see + /// SDL_EventType for details. + /// + /// + /// + /// This will unconditionally remove any events from the queue that are in the + /// range of minType to maxType, inclusive. If you need to remove a single + /// event type, use SDL_FlushEvent() instead. + /// + /// + /// It's also normal to just ignore events you don't care about in your event + /// loop without calling this function. + /// + /// + /// This function only affects currently queued events. If you want to make + /// sure that all pending OS events are flushed, you can call SDL_PumpEvents() + /// on the main thread immediately before the flush call. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void FlushEvents(uint minType, uint maxType) => PInvoke.FlushEvents(minType, maxType); + + /// + /// Poll for currently pending events. + /// + /// + /// the SDL_Event structure to be filled with the next event from + /// the queue, or NULL. + /// + /// true if this got an event or false if there are none available. + /// + /// + /// If event is not NULL, the next event is removed from the queue and stored + /// in the SDL_Event structure pointed to by event. + /// + /// + /// If event is NULL, it simply returns true if there is an event in the + /// queue, but will not remove it from the queue. + /// + /// + /// As this function may implicitly call SDL_PumpEvents(), you can only call + /// this function in the thread that initialized the video subsystem. + /// + /// + /// SDL_PollEvent() is the favored way of receiving system events since it can + /// be done from the main loop and does not suspend the main loop while waiting + /// on an event to be posted. + /// + /// + /// The common practice is to fully process the event queue once every frame, + /// usually as a first step before updating the game's state: + /// + /// + /// ```c + /// while (game_is_still_running) { + /// SDL_Event event; + /// while (SDL_PollEvent(&event)) { // poll until all events are handled! + /// // decide what to do with this event. + /// } + /// + /// + /// // update game state, draw the current frame + /// } + /// ``` + /// + /// + /// Note that Windows (and possibly other platforms) has a quirk about how it + /// handles events while dragging/resizing a window, which can cause this + /// function to block for significant amounts of time. Technical explanations + /// and solutions are discussed on the wiki: + /// + /// + /// https://wiki.libsdl.org/SDL3/AppFreezeDuringDrag + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool PollEvent(SdlEvent* @event) + { + bool result = PInvoke.PollEvent(@event) != 0; + Sdl.ExceptionAggregator.CheckExceptions(); + return result; + } + + /// + /// Wait indefinitely for the next available event. + /// + /// + /// the SDL_Event structure to be filled in with the next event + /// from the queue, or NULL. + /// + /// + /// true on success or false if there was an error while waiting for + /// events; call SDL_GetError() for more information. + /// + /// + /// + /// If event is not NULL, the next event is removed from the queue and stored + /// in the SDL_Event structure pointed to by event. + /// + /// + /// As this function may implicitly call SDL_PumpEvents(), you can only call + /// this function in the thread that initialized the video subsystem. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool WaitEvent(SdlEvent* @event) + { + bool result = PInvoke.WaitEvent(@event) != 0; + Sdl.ExceptionAggregator.CheckExceptions(); + return result; + } + + /// + /// Wait until the specified timeout (in milliseconds) for the next available + /// event. + /// + /// + /// the SDL_Event structure to be filled in with the next event + /// from the queue, or NULL. + /// + /// + /// the maximum number of milliseconds to wait for the next + /// available event. + /// + /// + /// true if this got an event or false if the timeout elapsed without + /// any events available. + /// + /// + /// + /// If event is not NULL, the next event is removed from the queue and stored + /// in the SDL_Event structure pointed to by event. + /// + /// + /// As this function may implicitly call SDL_PumpEvents(), you can only call + /// this function in the thread that initialized the video subsystem. + /// + /// + /// The timeout is not guaranteed, the actual wait time could be longer due to + /// system scheduling. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool WaitEventTimeout(SdlEvent* @event, int timeoutMS) + { + bool result = PInvoke.WaitEventTimeout(@event, timeoutMS) != 0; + Sdl.ExceptionAggregator.CheckExceptions(); + return result; + } + + /// + /// Add an event to the event queue. + /// + /// the SDL_Event to be added to the queue. + /// + /// true on success, false if the event was filtered or on failure; + /// call SDL_GetError() for more information. A common reason for + /// error is the event queue being full. + /// + /// + /// + /// The event queue can actually be used as a two way communication channel. + /// Not only can events be read from the queue, but the user can also push + /// their own events onto it. event is a pointer to the event structure you + /// wish to push onto the queue. The event is copied into the queue, and the + /// caller may dispose of the memory pointed to after SDL_PushEvent() returns. + /// + /// + /// Note: Pushing device input events onto the queue doesn't modify the state + /// of the device within SDL. + /// + /// + /// Note: Events pushed onto the queue with SDL_PushEvent() get passed through + /// the event filter but events added with SDL_PeepEvents() do not. + /// + /// + /// For pushing application-specific events, please use SDL_RegisterEvents() to + /// get an event type that does not conflict with other code that also wants + /// its own custom event types. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool PushEvent(SdlEvent* @event) + { + bool result = PInvoke.PushEvent(@event) != 0; + Sdl.ExceptionAggregator.CheckExceptions(); + return result; + } + + /// + /// Query the current event filter. + /// + /// the current callback function will be stored here. + /// + /// the pointer that is passed to the current event filter will + /// be stored here. + /// + /// true on success or false if there is no event filter set. + /// + /// + /// This function can be used to "chain" filters, by saving the existing filter + /// before replacing it with a function that will call that saved filter. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetEventFilter( + delegate* unmanaged[Cdecl]* filter, + void** userdata + ) => PInvoke.GetEventFilter(filter, userdata) != 0; + + /// + /// Set the state of processing events by type. + /// + /// the type of event; see SDL_EventType for details. + /// whether to process the event or not. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void SetEventEnabled(uint type, bool enabled) => + PInvoke.SetEventEnabled(type, enabled ? (byte)1 : (byte)0); + + /// + /// Query the state of processing events by type. + /// + /// the type of event; see SDL_EventType for details. + /// true if the event is being processed, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool EventEnabled(uint type) => PInvoke.EventEnabled(type) != 0; + + /// + /// Allocate a set of user-defined events, and return the beginning event + /// number for that set of events. + /// + /// the number of events to be allocated. + /// + /// the beginning event number, or 0 if numevents is invalid or if + /// there are not enough user-defined events left. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static uint RegisterEvents(int numevents) => PInvoke.RegisterEvents(numevents); + + /// + /// Ergonomic wrapper over SDL_GetWindowFromEvent. + /// + /// an event containing a windowID. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetWindowFromEvent(SdlEvent* @event) => PInvoke.GetWindowFromEvent(@event); + + /// + /// Generate an English description of an event. + /// + /// an event to describe. May be NULL. + /// the buffer to fill with the description string. May be NULL. + /// the maximum bytes that can be written to buf. + /// + /// number of bytes needed for the full string, not counting the + /// null-terminator byte. + /// + /// + /// + /// This will fill buf with a null-terminated string that might look + /// something like this: + /// + /// + /// ``` + /// SDL_EVENT_MOUSE_MOTION (timestamp=1140256324 windowid=2 which=0 state=0 x=492.99 y=139.09 xrel=52 + /// yrel=6) + /// ``` + /// + /// + /// The exact format of the string is not guaranteed; it is intended for + /// logging purposes, to be read by a human, and not parsed by a computer. + /// + /// + /// The returned value follows the same rules as SDL_snprintf(): buf will + /// always be NULL-terminated (unless buflen is zero), and will be truncated + /// if buflen is too small. The return code is the number of bytes needed for + /// the complete string, not counting the NULL-terminator, whether the string + /// was truncated or not. Unlike SDL_snprintf(), though, this function never + /// returns -1. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static int GetEventDescription(SdlEvent* @event, byte* buf, int buflen) => + PInvoke.GetEventDescription(@event, buf, buflen); + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Gamepad.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Gamepad.gen.cs new file mode 100644 index 0000000..5f65cd7 --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Gamepad.gen.cs @@ -0,0 +1,1571 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Gamepad + { + /// + /// Add support for gamepads that SDL is unaware of or change the binding of an + /// existing gamepad. + /// + /// the mapping string. + /// + /// 1 if a new mapping is added, 0 if an existing mapping is updated, + /// -1 on failure; call SDL_GetError() for more information. + /// + /// + /// + /// The mapping string has the format "GUID,name,mapping", where GUID is the + /// string value from SDL_GUIDToString(), name is the human readable string for + /// the device and mappings are gamepad mappings to joystick ones. Under + /// Windows there is a reserved GUID of "xinput" that covers all XInput + /// devices. The mapping format for joystick is: + /// + /// + /// - bX: a joystick button, index X + /// - hX.Y: hat X with value Y + /// - aX: axis X of the joystick + /// + /// + /// Buttons can be used as a gamepad axes and vice versa. + /// + /// + /// If a device with this GUID is already plugged in, SDL will generate an + /// SDL_EVENT_GAMEPAD_ADDED event. + /// + /// + /// This string shows an example of a valid mapping for a gamepad: + /// + /// + /// ```c + /// "341a3608000000000000504944564944,Afterglow PS3 + /// Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" + /// ``` + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int AddGamepadMapping(string mapping) => PInvoke.AddGamepadMapping(mapping); + + /// + /// Load a set of gamepad mappings from an SDL_IOStream. + /// + /// the data stream for the mappings to be added. + /// + /// if true, calls SDL_CloseIO() on src before returning, even + /// in the case of an error. + /// + /// + /// the number of mappings added or -1 on failure; call SDL_GetError() + /// for more information. + /// + /// + /// + /// You can call this function several times, if needed, to load different + /// database files. + /// + /// + /// If a new mapping is loaded for an already known gamepad GUID, the later + /// version will overwrite the one currently loaded. + /// + /// + /// Any new mappings for already plugged in controllers will generate + /// SDL_EVENT_GAMEPAD_ADDED events. + /// + /// + /// Mappings not belonging to the current platform or with no platform field + /// specified will be ignored (i.e. mappings for Linux will be ignored in + /// Windows, etc). + /// + /// + /// This function will load the text database entirely in memory before + /// processing it, so take this into consideration if you are in a memory + /// constrained environment. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int AddGamepadMappingsFromIO(nint src, bool closeio) => + PInvoke.AddGamepadMappingsFromIO(src, closeio ? (byte)1 : (byte)0); + + /// + /// Load a set of gamepad mappings from a file. + /// + /// the mappings file to load. + /// + /// the number of mappings added or -1 on failure; call SDL_GetError() + /// for more information. + /// + /// + /// + /// You can call this function several times, if needed, to load different + /// database files. + /// + /// + /// If a new mapping is loaded for an already known gamepad GUID, the later + /// version will overwrite the one currently loaded. + /// + /// + /// Any new mappings for already plugged in controllers will generate + /// SDL_EVENT_GAMEPAD_ADDED events. + /// + /// + /// Mappings not belonging to the current platform or with no platform field + /// specified will be ignored (i.e. mappings for Linux will be ignored in + /// Windows, etc). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int AddGamepadMappingsFromFile(string file) => PInvoke.AddGamepadMappingsFromFile(file); + + /// + /// Reinitialize the SDL mapping database to its initial state. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will generate gamepad events as needed if device mappings change. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool ReloadGamepadMappings() => PInvoke.ReloadGamepadMappings() != 0; + + /// + /// Ergonomic wrapper over SDL_GetGamepadMappings. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static string[] GetGamepadMappings() + { + int count; + var ptr = PInvoke.GetGamepadMappings(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetGamepadMappings failed"); + try + { + var result = new string[count]; + for (var i = 0; i < count; i++) + result[i] = Marshal.PtrToStringUTF8((nint)ptr[i])!; + return result; + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Set the current mapping of a joystick or gamepad. + /// + /// the joystick instance ID. + /// + /// the mapping to use for this device, or NULL to clear the + /// mapping. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Details about mappings are discussed with SDL_AddGamepadMapping(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetGamepadMapping(uint instance_id, string mapping) => + PInvoke.SetGamepadMapping(instance_id, mapping) != 0; + + /// + /// Return whether a gamepad is currently connected. + /// + /// true if a gamepad is connected, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HasGamepad() => PInvoke.HasGamepad() != 0; + + /// + /// Ergonomic wrapper over SDL_GetGamepads. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static uint[] GetGamepads() + { + int count; + var ptr = PInvoke.GetGamepads(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetGamepads failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Check if the given joystick is supported by the gamepad interface. + /// + /// the joystick instance ID. + /// + /// true if the given joystick is supported by the gamepad interface, + /// false if it isn't or it's an invalid index. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool IsGamepad(uint instance_id) => PInvoke.IsGamepad(instance_id) != 0; + + /// + /// Get the implementation dependent name of a gamepad. + /// + /// the joystick instance ID. + /// + /// the name of the selected gamepad. If no name can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// + /// This can be called before any gamepads are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetGamepadNameForID(uint instance_id) => PInvoke.GetGamepadNameForID(instance_id); + + /// + /// Get the implementation dependent path of a gamepad. + /// + /// the joystick instance ID. + /// + /// the path of the selected gamepad. If no path can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// + /// This can be called before any gamepads are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetGamepadPathForID(uint instance_id) => PInvoke.GetGamepadPathForID(instance_id); + + /// + /// Get the player index of a gamepad. + /// + /// the joystick instance ID. + /// the player index of a gamepad, or -1 if it's not available. + /// + /// + /// This can be called before any gamepads are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static int GetGamepadPlayerIndexForID(uint instance_id) => + PInvoke.GetGamepadPlayerIndexForID(instance_id); + + /// + /// Get the implementation-dependent GUID of a gamepad. + /// + /// the joystick instance ID. + /// + /// the GUID of the selected gamepad. If called on an invalid index, + /// this function returns a zero GUID. + /// + /// + /// + /// This can be called before any gamepads are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlGuid GetGamepadGuidForID(uint instance_id) => PInvoke.GetGamepadGuidForID(instance_id); + + /// + /// Get the USB vendor ID of a gamepad, if available. + /// + /// the joystick instance ID. + /// + /// the USB vendor ID of the selected gamepad. If called on an invalid + /// index, this function returns zero. + /// + /// + /// + /// This can be called before any gamepads are opened. If the vendor ID isn't + /// available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetGamepadVendorForID(uint instance_id) => PInvoke.GetGamepadVendorForID(instance_id); + + /// + /// Get the USB product ID of a gamepad, if available. + /// + /// the joystick instance ID. + /// + /// the USB product ID of the selected gamepad. If called on an + /// invalid index, this function returns zero. + /// + /// + /// + /// This can be called before any gamepads are opened. If the product ID isn't + /// available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetGamepadProductForID(uint instance_id) => + PInvoke.GetGamepadProductForID(instance_id); + + /// + /// Get the product version of a gamepad, if available. + /// + /// the joystick instance ID. + /// + /// the product version of the selected gamepad. If called on an + /// invalid index, this function returns zero. + /// + /// + /// + /// This can be called before any gamepads are opened. If the product version + /// isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetGamepadProductVersionForID(uint instance_id) => + PInvoke.GetGamepadProductVersionForID(instance_id); + + /// + /// Get the type of a gamepad. + /// + /// the joystick instance ID. + /// the gamepad type. + /// + /// + /// This can be called before any gamepads are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static SdlGamepadType GetGamepadTypeForID(uint instance_id) => + PInvoke.GetGamepadTypeForID(instance_id); + + /// + /// Get the type of a gamepad, ignoring any mapping override. + /// + /// the joystick instance ID. + /// the gamepad type. + /// + /// + /// This can be called before any gamepads are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static SdlGamepadType GetRealGamepadTypeForID(uint instance_id) => + PInvoke.GetRealGamepadTypeForID(instance_id); + + /// + /// Ergonomic wrapper over SDL_OpenGamepad. Throws instead of returning a null handle on failure. + /// + /// the joystick instance ID. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlGamepad OpenGamepad(uint instance_id) + { + SdlGamepad result = PInvoke.OpenGamepad(instance_id); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_OpenGamepad failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_GetGamepadFromID. + /// + /// the joystick instance ID of the gamepad. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlGamepad GetGamepadFromID(uint instance_id) => PInvoke.GetGamepadFromID(instance_id); + + /// + /// Ergonomic wrapper over SDL_GetGamepadFromPlayerIndex. + /// + /// the player index, which different from the instance ID. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlGamepad GetGamepadFromPlayerIndex(int player_index) => + PInvoke.GetGamepadFromPlayerIndex(player_index); + + /// + /// Get the properties associated with an opened gamepad. + /// + /// + /// a gamepad identifier previously returned by + /// SDL_OpenGamepad(). + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// These properties are shared with the underlying joystick object. + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN: true if this gamepad has an LED + /// that has adjustable brightness + /// - SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN: true if this gamepad has an LED + /// that has adjustable color + /// - SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN: true if this gamepad has a + /// player LED + /// - SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN: true if this gamepad has + /// left/right rumble + /// - SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN: true if this gamepad has + /// simple trigger rumble + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetGamepadProperties(SdlGamepad gamepad) => PInvoke.GetGamepadProperties(gamepad); + + /// + /// Get the instance ID of an opened gamepad. + /// + /// + /// a gamepad identifier previously returned by + /// SDL_OpenGamepad(). + /// + /// + /// the instance ID of the specified gamepad on success or 0 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetGamepadID(SdlGamepad gamepad) => PInvoke.GetGamepadID(gamepad); + + /// + /// Get the implementation-dependent name for an opened gamepad. + /// + /// + /// a gamepad identifier previously returned by + /// SDL_OpenGamepad(). + /// + /// + /// the implementation dependent name for the gamepad, or NULL if + /// there is no name or the identifier passed is invalid. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadName(SdlGamepad gamepad) => PInvoke.GetGamepadName(gamepad); + + /// + /// Get the implementation-dependent path for an opened gamepad. + /// + /// + /// a gamepad identifier previously returned by + /// SDL_OpenGamepad(). + /// + /// + /// the implementation dependent path for the gamepad, or NULL if + /// there is no path or the identifier passed is invalid. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadPath(SdlGamepad gamepad) => PInvoke.GetGamepadPath(gamepad); + + /// + /// Get the type of an opened gamepad. + /// + /// the gamepad object to query. + /// + /// the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not + /// available. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadType GetGamepadType(SdlGamepad gamepad) => PInvoke.GetGamepadType(gamepad); + + /// + /// Get the type of an opened gamepad, ignoring any mapping override. + /// + /// the gamepad object to query. + /// + /// the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not + /// available. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadType GetRealGamepadType(SdlGamepad gamepad) => PInvoke.GetRealGamepadType(gamepad); + + /// + /// Get the player index of an opened gamepad. + /// + /// the gamepad object to query. + /// the player index for gamepad, or -1 if it's not available. + /// + /// + /// For XInput gamepads this returns the XInput user index. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static int GetGamepadPlayerIndex(SdlGamepad gamepad) => PInvoke.GetGamepadPlayerIndex(gamepad); + + /// + /// Set the player index of an opened gamepad. + /// + /// the gamepad object to adjust. + /// + /// player index to assign to this gamepad, or -1 to clear + /// the player index and turn off player LEDs. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetGamepadPlayerIndex(SdlGamepad gamepad, int player_index) => + PInvoke.SetGamepadPlayerIndex(gamepad, player_index) != 0; + + /// + /// Get the USB vendor ID of an opened gamepad, if available. + /// + /// the gamepad object to query. + /// the USB vendor ID, or zero if unavailable. + /// + /// + /// If the vendor ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static ushort GetGamepadVendor(SdlGamepad gamepad) => PInvoke.GetGamepadVendor(gamepad); + + /// + /// Get the USB product ID of an opened gamepad, if available. + /// + /// the gamepad object to query. + /// the USB product ID, or zero if unavailable. + /// + /// + /// If the product ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static ushort GetGamepadProduct(SdlGamepad gamepad) => PInvoke.GetGamepadProduct(gamepad); + + /// + /// Get the product version of an opened gamepad, if available. + /// + /// the gamepad object to query. + /// the USB product version, or zero if unavailable. + /// + /// + /// If the product version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static ushort GetGamepadProductVersion(SdlGamepad gamepad) => + PInvoke.GetGamepadProductVersion(gamepad); + + /// + /// Get the firmware version of an opened gamepad, if available. + /// + /// the gamepad object to query. + /// the gamepad firmware version, or zero if unavailable. + /// + /// + /// If the firmware version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static ushort GetGamepadFirmwareVersion(SdlGamepad gamepad) => + PInvoke.GetGamepadFirmwareVersion(gamepad); + + /// + /// Get the serial number of an opened gamepad, if available. + /// + /// the gamepad object to query. + /// the serial number, or NULL if unavailable. + /// + /// + /// Returns the serial number of the gamepad, or NULL if it is not available. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static string? GetGamepadSerial(SdlGamepad gamepad) => PInvoke.GetGamepadSerial(gamepad); + + /// + /// Get the Steam Input handle of an opened gamepad, if available. + /// + /// the gamepad object to query. + /// the gamepad handle, or 0 if unavailable. + /// + /// + /// Returns an InputHandle_t for the gamepad that can be used with Steam Input + /// API: https://partner.steamgames.com/doc/api/ISteamInput + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static ulong GetGamepadSteamHandle(SdlGamepad gamepad) => PInvoke.GetGamepadSteamHandle(gamepad); + + /// + /// Get the connection state of a gamepad. + /// + /// the gamepad object to query. + /// + /// the connection state on success or + /// SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() + /// for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static SdlJoystickConnectionState GetGamepadConnectionState(SdlGamepad gamepad) => + PInvoke.GetGamepadConnectionState(gamepad); + + /// + /// Get the battery state of a gamepad. + /// + /// the gamepad object to query. + /// + /// a pointer filled in with the percentage of battery life + /// left, between 0 and 100, or NULL to ignore. This will be + /// filled in with -1 we can't determine a value or there is no + /// battery. + /// + /// the current battery state. + /// + /// + /// You should never take a battery status as absolute truth. Batteries + /// (especially failing batteries) are delicate hardware, and the values + /// reported here are best estimates based on what that hardware reports. It's + /// not uncommon for older batteries to lose stored power much faster than it + /// reports, or completely drain when reporting it has 20 percent left, etc. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static SdlPowerState GetGamepadPowerInfo(SdlGamepad gamepad, out int percent) + { + percent = default; + fixed (int* percentPtr = &percent) + { + return PInvoke.GetGamepadPowerInfo(gamepad, percentPtr); + } + } + + /// + /// Check if a gamepad has been opened and is currently connected. + /// + /// + /// a gamepad identifier previously returned by + /// SDL_OpenGamepad(). + /// + /// + /// true if the gamepad has been opened and is currently connected, or + /// false if not. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GamepadConnected(SdlGamepad gamepad) => PInvoke.GamepadConnected(gamepad) != 0; + + /// + /// Ergonomic wrapper over SDL_GetGamepadJoystick. + /// + /// the gamepad object that you want to get a joystick from. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlJoystick GetGamepadJoystick(SdlGamepad gamepad) => PInvoke.GetGamepadJoystick(gamepad); + + /// + /// Set the state of gamepad event processing. + /// + /// whether to process gamepad events or not. + /// + /// + /// If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself + /// and check the state of the gamepad when you want gamepad information. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static void SetGamepadEventsEnabled(bool enabled) => + PInvoke.SetGamepadEventsEnabled(enabled ? (byte)1 : (byte)0); + + /// + /// Query the state of gamepad event processing. + /// + /// true if gamepad events are being processed, false otherwise. + /// + /// + /// If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself + /// and check the state of the gamepad when you want gamepad information. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GamepadEventsEnabled() => PInvoke.GamepadEventsEnabled() != 0; + + /// + /// Ergonomic wrapper over SDL_GetGamepadBindings. + /// + /// a gamepad. + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static SdlGamepadBinding[] GetGamepadBindings(SdlGamepad gamepad) + { + int count; + var ptr = PInvoke.GetGamepadBindings(gamepad, &count); + if (ptr is null) + throw SdlException.FromError("SDL_GetGamepadBindings failed"); + try + { + var result = new SdlGamepadBinding[count]; + for (var i = 0; i < count; i++) + result[i] = *(SdlGamepadBinding*)ptr[i]; + return result; + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Manually pump gamepad updates if not using the loop. + /// + /// + /// + /// This function is called automatically by the event loop if events are + /// enabled. Under such circumstances, it will not be necessary to call this + /// function. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static void UpdateGamepads() => PInvoke.UpdateGamepads(); + + /// + /// Convert a string into SDL_GamepadType enum. + /// + /// string representing a SDL_GamepadType type. + /// + /// the SDL_GamepadType enum corresponding to the input string, or + /// SDL_GAMEPAD_TYPE_UNKNOWN if no match was found. + /// + /// + /// + /// This function is called internally to translate SDL_Gamepad mapping strings + /// for the underlying joystick device into the consistent SDL_Gamepad mapping. + /// You do not normally need to call this function unless you are parsing + /// SDL_Gamepad mappings in your own code. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadType GetGamepadTypeFromString(string str) => PInvoke.GetGamepadTypeFromString(str); + + /// + /// Convert from an SDL_GamepadType enum to a string. + /// + /// an enum value for a given SDL_GamepadType. + /// + /// a string for the given type, or NULL if an invalid type is + /// specified. The string returned is of the format used by + /// SDL_Gamepad mapping strings. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadStringForType(SdlGamepadType type) => PInvoke.GetGamepadStringForType(type); + + /// + /// Convert a string into SDL_GamepadAxis enum. + /// + /// string representing a SDL_Gamepad axis. + /// + /// the SDL_GamepadAxis enum corresponding to the input string, or + /// SDL_GAMEPAD_AXIS_INVALID if no match was found. + /// + /// + /// + /// This function is called internally to translate SDL_Gamepad mapping strings + /// for the underlying joystick device into the consistent SDL_Gamepad mapping. + /// You do not normally need to call this function unless you are parsing + /// SDL_Gamepad mappings in your own code. + /// + /// + /// Note specially that "righttrigger" and "lefttrigger" map to + /// SDL_GAMEPAD_AXIS_RIGHT_TRIGGER and SDL_GAMEPAD_AXIS_LEFT_TRIGGER, + /// respectively. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadAxis GetGamepadAxisFromString(string str) => PInvoke.GetGamepadAxisFromString(str); + + /// + /// Convert from an SDL_GamepadAxis enum to a string. + /// + /// an enum value for a given SDL_GamepadAxis. + /// + /// a string for the given axis, or NULL if an invalid axis is + /// specified. The string returned is of the format used by + /// SDL_Gamepad mapping strings. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadStringForAxis(SdlGamepadAxis axis) => PInvoke.GetGamepadStringForAxis(axis); + + /// + /// Query whether a gamepad has a given axis. + /// + /// a gamepad. + /// an axis enum value (an SDL_GamepadAxis value). + /// true if the gamepad has this axis, false otherwise. + /// + /// + /// This merely reports whether the gamepad's mapping defined this axis, as + /// that is all the information SDL has about the physical device. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GamepadHasAxis(SdlGamepad gamepad, SdlGamepadAxis axis) => + PInvoke.GamepadHasAxis(gamepad, axis) != 0; + + /// + /// Get the current state of an axis control on a gamepad. + /// + /// a gamepad. + /// an axis index (one of the SDL_GamepadAxis values). + /// axis state. + /// + /// + /// The axis indices start at index 0. + /// + /// + /// For thumbsticks, the state is a value ranging from -32768 (up/left) to + /// 32767 (down/right). + /// + /// + /// Triggers range from 0 when released to 32767 when fully pressed, and never + /// return a negative value. Note that this differs from the value reported by + /// the lower-level SDL_GetJoystickAxis(), which normally uses the full range. + /// + /// + /// Note that for invalid gamepads or axes, this will return 0. Zero is also a + /// valid value in normal operation; usually it means a centered axis. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static short GetGamepadAxis(SdlGamepad gamepad, SdlGamepadAxis axis) => + PInvoke.GetGamepadAxis(gamepad, axis); + + /// + /// Convert a string into an SDL_GamepadButton enum. + /// + /// string representing a SDL_Gamepad button. + /// + /// the SDL_GamepadButton enum corresponding to the input string, or + /// SDL_GAMEPAD_BUTTON_INVALID if no match was found. + /// + /// + /// + /// This function is called internally to translate SDL_Gamepad mapping strings + /// for the underlying joystick device into the consistent SDL_Gamepad mapping. + /// You do not normally need to call this function unless you are parsing + /// SDL_Gamepad mappings in your own code. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadButton GetGamepadButtonFromString(string str) => + PInvoke.GetGamepadButtonFromString(str); + + /// + /// Convert from an SDL_GamepadButton enum to a string. + /// + /// an enum value for a given SDL_GamepadButton. + /// + /// a string for the given button, or NULL if an invalid button is + /// specified. The string returned is of the format used by + /// SDL_Gamepad mapping strings. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadStringForButton(SdlGamepadButton button) => + PInvoke.GetGamepadStringForButton(button); + + /// + /// Query whether a gamepad has a given button. + /// + /// a gamepad. + /// a button enum value (an SDL_GamepadButton value). + /// true if the gamepad has this button, false otherwise. + /// + /// + /// This merely reports whether the gamepad's mapping defined this button, as + /// that is all the information SDL has about the physical device. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GamepadHasButton(SdlGamepad gamepad, SdlGamepadButton button) => + PInvoke.GamepadHasButton(gamepad, button) != 0; + + /// + /// Get the current state of a button on a gamepad. + /// + /// a gamepad. + /// a button index (one of the SDL_GamepadButton values). + /// true if the button is pressed, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetGamepadButton(SdlGamepad gamepad, SdlGamepadButton button) => + PInvoke.GetGamepadButton(gamepad, button) != 0; + + /// + /// Get the label of a button on a gamepad. + /// + /// the type of gamepad to check. + /// a button index (one of the SDL_GamepadButton values). + /// the SDL_GamepadButtonLabel enum corresponding to the button label. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadButtonLabel GetGamepadButtonLabelForType( + SdlGamepadType type, + SdlGamepadButton button + ) => PInvoke.GetGamepadButtonLabelForType(type, button); + + /// + /// Get the label of a button on a gamepad. + /// + /// a gamepad. + /// a button index (one of the SDL_GamepadButton values). + /// the SDL_GamepadButtonLabel enum corresponding to the button label. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlGamepadButtonLabel GetGamepadButtonLabel(SdlGamepad gamepad, SdlGamepadButton button) => + PInvoke.GetGamepadButtonLabel(gamepad, button); + + /// + /// Get the number of touchpads on a gamepad. + /// + /// a gamepad. + /// number of touchpads. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static int GetNumGamepadTouchpads(SdlGamepad gamepad) => PInvoke.GetNumGamepadTouchpads(gamepad); + + /// + /// Get the number of supported simultaneous fingers on a touchpad on a game + /// gamepad. + /// + /// a gamepad. + /// a touchpad. + /// number of supported simultaneous fingers. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static int GetNumGamepadTouchpadFingers(SdlGamepad gamepad, int touchpad) => + PInvoke.GetNumGamepadTouchpadFingers(gamepad, touchpad); + + /// + /// Return whether a gamepad has a particular sensor. + /// + /// the gamepad to query. + /// the type of sensor to query. + /// true if the sensor exists, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GamepadHasSensor(SdlGamepad gamepad, SdlSensorType type) => + PInvoke.GamepadHasSensor(gamepad, type) != 0; + + /// + /// Set whether data reporting for a gamepad sensor is enabled. + /// + /// the gamepad to update. + /// the type of sensor to enable/disable. + /// whether data reporting should be enabled. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetGamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type, bool enabled) => + PInvoke.SetGamepadSensorEnabled(gamepad, type, enabled ? (byte)1 : (byte)0) != 0; + + /// + /// Query whether sensor data reporting is enabled for a gamepad. + /// + /// the gamepad to query. + /// the type of sensor to query. + /// true if the sensor is enabled, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type) => + PInvoke.GamepadSensorEnabled(gamepad, type) != 0; + + /// + /// Get the data rate (number of events per second) of a gamepad sensor. + /// + /// the gamepad to query. + /// the type of sensor to query. + /// the data rate, or 0.0f if the data rate is not available. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static float GetGamepadSensorDataRate(SdlGamepad gamepad, SdlSensorType type) => + PInvoke.GetGamepadSensorDataRate(gamepad, type); + + /// + /// Get the current state of a gamepad sensor. + /// + /// the gamepad to query. + /// the type of sensor to query. + /// a pointer filled with the current sensor state. + /// the number of values to write to data. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The number of values and interpretation of the data is sensor dependent. + /// See the remarks in SDL_SensorType for details for each type of sensor. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GetGamepadSensorData( + SdlGamepad gamepad, + SdlSensorType type, + float* data, + int num_values + ) => PInvoke.GetGamepadSensorData(gamepad, type, data, num_values) != 0; + + /// + /// Start a rumble effect on a gamepad. + /// + /// the gamepad to vibrate. + /// + /// the intensity of the low frequency (left) + /// rumble motor, from 0 to 0xFFFF. + /// + /// + /// the intensity of the high frequency (right) + /// rumble motor, from 0 to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each call to this function cancels any previous rumble effect, and calling + /// it with 0 intensity stops any rumbling. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool RumbleGamepad( + SdlGamepad gamepad, + ushort low_frequency_rumble, + ushort high_frequency_rumble, + uint duration_ms + ) => PInvoke.RumbleGamepad(gamepad, low_frequency_rumble, high_frequency_rumble, duration_ms) != 0; + + /// + /// Start a rumble effect in the gamepad's triggers. + /// + /// the gamepad to vibrate. + /// + /// the intensity of the left trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// + /// the intensity of the right trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each call to this function cancels any previous trigger rumble effect, and + /// calling it with 0 intensity stops any rumbling. + /// + /// + /// Note that this is rumbling of the triggers and not the gamepad as a + /// whole. This is currently only supported on Xbox One gamepads. If you want + /// the (more common) whole-gamepad rumble, use SDL_RumbleGamepad() instead. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RumbleGamepadTriggers( + SdlGamepad gamepad, + ushort left_rumble, + ushort right_rumble, + uint duration_ms + ) => PInvoke.RumbleGamepadTriggers(gamepad, left_rumble, right_rumble, duration_ms) != 0; + + /// + /// Update a gamepad's LED color. + /// + /// the gamepad to update. + /// the intensity of the red LED. + /// the intensity of the green LED. + /// the intensity of the blue LED. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// An example of a joystick LED is the light on the back of a PlayStation 4's + /// DualShock 4 controller. + /// + /// + /// For gamepads with a single color LED, the maximum of the RGB values will be + /// used as the LED brightness. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool SetGamepadLED(SdlGamepad gamepad, byte red, byte green, byte blue) => + PInvoke.SetGamepadLED(gamepad, red, green, blue) != 0; + + /// + /// Send a gamepad specific effect packet. + /// + /// the gamepad to affect. + /// the data to send to the gamepad. + /// the size of the data to send to the gamepad. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool SendGamepadEffect(SdlGamepad gamepad, void* data, int size) => + PInvoke.SendGamepadEffect(gamepad, data, size) != 0; + + /// + /// Close a gamepad previously opened with SDL_OpenGamepad(). + /// + /// + /// a gamepad identifier previously returned by + /// SDL_OpenGamepad(). + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void CloseGamepad(SdlGamepad gamepad) => PInvoke.CloseGamepad(gamepad); + + /// + /// Return the sfSymbolsName for a given button on a gamepad on Apple + /// platforms. + /// + /// the gamepad to query. + /// a button on the gamepad. + /// the sfSymbolsName or NULL if the name can't be found. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadAppleSFSymbolsNameForButton(SdlGamepad gamepad, SdlGamepadButton button) => + PInvoke.GetGamepadAppleSFSymbolsNameForButton(gamepad, button); + + /// + /// Return the sfSymbolsName for a given axis on a gamepad on Apple platforms. + /// + /// the gamepad to query. + /// an axis on the gamepad. + /// the sfSymbolsName or NULL if the name can't be found. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetGamepadAppleSFSymbolsNameForAxis(SdlGamepad gamepad, SdlGamepadAxis axis) => + PInvoke.GetGamepadAppleSFSymbolsNameForAxis(gamepad, axis); + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Init.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Init.gen.cs new file mode 100644 index 0000000..d2815d1 --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Init.gen.cs @@ -0,0 +1,253 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Init + { + /// + /// Compatibility function to initialize the SDL library. + /// + /// any of the flags used by SDL_Init(); see SDL_Init for details. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function and SDL_Init() are interchangeable. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool InitSubSystem(SdlInitFlags flags) => PInvoke.InitSubSystem(flags) != 0; + + /// + /// Shut down specific SDL subsystems. + /// + /// any of the flags used by SDL_Init(); see SDL_Init for details. + /// + /// + /// You still need to call SDL_Quit() even if you close all open subsystems + /// with SDL_QuitSubSystem(). + /// + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static void QuitSubSystem(SdlInitFlags flags) => PInvoke.QuitSubSystem(flags); + + /// + /// Get a mask of the specified subsystems which are currently initialized. + /// + /// any of the flags used by SDL_Init(); see SDL_Init for details. + /// + /// a mask of all initialized subsystems if flags is 0, otherwise it + /// returns the initialization status of the specified subsystems. + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlInitFlags WasInit(SdlInitFlags flags) => PInvoke.WasInit(flags); + + /// + /// Return whether this is the main thread. + /// + /// true if this thread is the main thread, or false otherwise. + /// + /// + /// On Apple platforms, the main thread is the thread that runs your program's + /// main() entry point. On other platforms, the main thread is the one that + /// calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs + /// your program's main() entry point. If you are using the main callbacks, + /// SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the + /// main thread. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool IsMainThread() => PInvoke.IsMainThread() != 0; + + /// + /// Specify basic metadata about your app. + /// + /// + /// The name of the application ("My Game 2: Bad Guy's + /// Revenge!"). + /// + /// + /// The version of the application ("1.0.0beta5" or a git + /// hash, or whatever makes sense). + /// + /// + /// A unique string in reverse-domain format that + /// identifies this app ("com.example.mygame2"). + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You can optionally provide metadata about your app to SDL. This is not + /// required, but strongly encouraged. + /// + /// + /// There are several locations where SDL can make use of metadata (an "About" + /// box in the macOS menu bar, the name of the app can be shown on some audio + /// mixers, etc). Any piece of metadata can be left as NULL, if a specific + /// detail doesn't make sense for the app. + /// + /// + /// This function should be called as early as possible, before SDL_Init. + /// Multiple calls to this function are allowed, but various state might not + /// change once it has been set up with a previous call to this function. + /// + /// + /// Passing a NULL removes any previous metadata. + /// + /// + /// This is a simplified interface for the most important information. You can + /// supply significantly more detailed metadata with + /// SDL_SetAppMetadataProperty(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetAppMetadata(string appname, string appversion, string appidentifier) => + PInvoke.SetAppMetadata(appname, appversion, appidentifier) != 0; + + /// + /// Specify metadata about your app through a set of properties. + /// + /// the name of the metadata property to set. + /// the value of the property, or NULL to remove that property. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You can optionally provide metadata about your app to SDL. This is not + /// required, but strongly encouraged. + /// + /// + /// There are several locations where SDL can make use of metadata (an "About" + /// box in the macOS menu bar, the name of the app can be shown on some audio + /// mixers, etc). Any piece of metadata can be left out, if a specific detail + /// doesn't make sense for the app. + /// + /// + /// This function should be called as early as possible, before SDL_Init. + /// Multiple calls to this function are allowed, but various state might not + /// change once it has been set up with a previous call to this function. + /// + /// + /// Once set, this metadata can be read using SDL_GetAppMetadataProperty(). + /// + /// + /// These are the supported properties: + /// + /// + /// - SDL_PROP_APP_METADATA_NAME_STRING: The human-readable name of the + /// application, like "My Game 2: Bad Guy's Revenge!". This will show up + /// anywhere the OS shows the name of the application separately from window + /// titles, such as volume control applets, etc. This defaults to "SDL + /// Application". + /// - SDL_PROP_APP_METADATA_VERSION_STRING: The version of the app that is + /// running; there are no rules on format, so "1.0.3beta2" and "April 22nd, + /// 2024" and a git hash are all valid options. This has no default. + /// - SDL_PROP_APP_METADATA_IDENTIFIER_STRING: A unique string that + /// identifies this app. This must be in reverse-domain format, like + /// "com.example.mygame2". This string is used by desktop compositors to + /// identify and group windows together, as well as match applications with + /// associated desktop settings and icons. If you plan to package your + /// application in a container such as Flatpak, the app ID should match the + /// name of your Flatpak container as well. This has no default. + /// - SDL_PROP_APP_METADATA_CREATOR_STRING: The human-readable name of the + /// creator/developer/maker of this app, like "MojoWorkshop, LLC" + /// - SDL_PROP_APP_METADATA_COPYRIGHT_STRING: The human-readable copyright + /// notice, like "Copyright (c) 2024 MojoWorkshop, LLC" or whatnot. Keep this + /// to one line, don't paste a copy of a whole software license in here. This + /// has no default. + /// - SDL_PROP_APP_METADATA_URL_STRING: A URL to the app on the web. Maybe a + /// product page, or a storefront, or even a GitHub repository, for user's + /// further information This has no default. + /// - SDL_PROP_APP_METADATA_TYPE_STRING: The type of application this is. + /// Currently this string can be "game" for a video game, "mediaplayer" for a + /// media player, or generically "application" if nothing else applies. + /// Future versions of SDL might add new types. This defaults to + /// "application". + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetAppMetadataProperty(string name, string value) => + PInvoke.SetAppMetadataProperty(name, value) != 0; + + /// + /// Get metadata about your app. + /// + /// the name of the metadata property to get. + /// + /// the current value of the metadata property, or the default if it + /// is not set, NULL for properties with no default. + /// + /// + /// + /// This returns metadata previously set using SDL_SetAppMetadata() or + /// SDL_SetAppMetadataProperty(). See SDL_SetAppMetadataProperty() for the list + /// of available properties and their meanings. + /// + /// + /// + /// It is safe to call this function from any thread, although + /// the string returned is not protected and could potentially be + /// freed if you call SDL_SetAppMetadataProperty() to set that + /// property from another thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetAppMetadataProperty(string name) => PInvoke.GetAppMetadataProperty(name); + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Joystick.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Joystick.gen.cs new file mode 100644 index 0000000..c1fd438 --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Joystick.gen.cs @@ -0,0 +1,1448 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Joystick + { + /// + /// Locking for atomic access to the joystick API. + /// + /// + /// + /// The SDL joystick functions are thread-safe, however you can lock the + /// joysticks while processing to guarantee that the joystick list won't change + /// and joystick and gamepad events will not be delivered. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static void LockJoysticks() => PInvoke.LockJoysticks(); + + /// + /// Unlocking for atomic access to the joystick API. + /// + /// + /// This should be called from the same thread that called + /// SDL_LockJoysticks(). + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static void UnlockJoysticks() => PInvoke.UnlockJoysticks(); + + /// + /// Return whether a joystick is currently connected. + /// + /// true if a joystick is connected, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HasJoystick() => PInvoke.HasJoystick() != 0; + + /// + /// Ergonomic wrapper over SDL_GetJoysticks. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static uint[] GetJoysticks() + { + int count; + var ptr = PInvoke.GetJoysticks(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetJoysticks failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Get the implementation dependent name of a joystick. + /// + /// the joystick instance ID. + /// + /// the name of the selected joystick. If no name can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// + /// This can be called before any joysticks are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetJoystickNameForID(uint instance_id) => PInvoke.GetJoystickNameForID(instance_id); + + /// + /// Get the implementation dependent path of a joystick. + /// + /// the joystick instance ID. + /// + /// the path of the selected joystick. If no path can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// + /// This can be called before any joysticks are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetJoystickPathForID(uint instance_id) => PInvoke.GetJoystickPathForID(instance_id); + + /// + /// Get the player index of a joystick. + /// + /// the joystick instance ID. + /// the player index of a joystick, or -1 if it's not available. + /// + /// + /// This can be called before any joysticks are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static int GetJoystickPlayerIndexForID(uint instance_id) => + PInvoke.GetJoystickPlayerIndexForID(instance_id); + + /// + /// Get the implementation-dependent GUID of a joystick. + /// + /// the joystick instance ID. + /// + /// the GUID of the selected joystick. If called with an invalid + /// instance_id, this function returns a zero GUID. + /// + /// + /// + /// This can be called before any joysticks are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlGuid GetJoystickGuidForID(uint instance_id) => PInvoke.GetJoystickGuidForID(instance_id); + + /// + /// Get the USB vendor ID of a joystick, if available. + /// + /// the joystick instance ID. + /// + /// the USB vendor ID of the selected joystick. If called with an + /// invalid instance_id, this function returns 0. + /// + /// + /// + /// This can be called before any joysticks are opened. If the vendor ID isn't + /// available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetJoystickVendorForID(uint instance_id) => + PInvoke.GetJoystickVendorForID(instance_id); + + /// + /// Get the USB product ID of a joystick, if available. + /// + /// the joystick instance ID. + /// + /// the USB product ID of the selected joystick. If called with an + /// invalid instance_id, this function returns 0. + /// + /// + /// + /// This can be called before any joysticks are opened. If the product ID isn't + /// available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetJoystickProductForID(uint instance_id) => + PInvoke.GetJoystickProductForID(instance_id); + + /// + /// Get the product version of a joystick, if available. + /// + /// the joystick instance ID. + /// + /// the product version of the selected joystick. If called with an + /// invalid instance_id, this function returns 0. + /// + /// + /// + /// This can be called before any joysticks are opened. If the product version + /// isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetJoystickProductVersionForID(uint instance_id) => + PInvoke.GetJoystickProductVersionForID(instance_id); + + /// + /// Get the type of a joystick, if available. + /// + /// the joystick instance ID. + /// + /// the SDL_JoystickType of the selected joystick. If called with an + /// invalid instance_id, this function returns + /// SDL_JOYSTICK_TYPE_UNKNOWN. + /// + /// + /// + /// This can be called before any joysticks are opened. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlJoystickType GetJoystickTypeForID(uint instance_id) => + PInvoke.GetJoystickTypeForID(instance_id); + + /// + /// Ergonomic wrapper over SDL_OpenJoystick. Throws instead of returning a null handle on failure. + /// + /// the joystick instance ID. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlJoystick OpenJoystick(uint instance_id) + { + SdlJoystick result = PInvoke.OpenJoystick(instance_id); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_OpenJoystick failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_GetJoystickFromID. + /// + /// the instance ID to get the SDL_Joystick for. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlJoystick GetJoystickFromID(uint instance_id) => PInvoke.GetJoystickFromID(instance_id); + + /// + /// Ergonomic wrapper over SDL_GetJoystickFromPlayerIndex. + /// + /// the player index to get the SDL_Joystick for. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlJoystick GetJoystickFromPlayerIndex(int player_index) => + PInvoke.GetJoystickFromPlayerIndex(player_index); + + /// + /// Attach a new virtual joystick. + /// + /// joystick description, initialized using SDL_INIT_INTERFACE(). + /// + /// the joystick instance ID, or 0 on failure; call SDL_GetError() for + /// more information. + /// + /// + /// + /// Apps can create virtual joysticks, that exist without hardware directly + /// backing them, and have program-supplied inputs. Once attached, a virtual + /// joystick looks like any other joystick that SDL can access. These can be + /// used to make other things look like joysticks, or provide pre-recorded + /// input, etc. + /// + /// + /// Once attached, the app can send joystick inputs to the new virtual joystick + /// using SDL_SetJoystickVirtualAxis(), etc. + /// + /// + /// When no longer needed, the virtual joystick can be removed by calling + /// SDL_DetachVirtualJoystick(). + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + public static uint AttachVirtualJoystick(SdlVirtualJoystickDesc* desc) => + PInvoke.AttachVirtualJoystick(desc); + + /// + /// Detach a virtual joystick. + /// + /// + /// the joystick instance ID, previously returned from + /// SDL_AttachVirtualJoystick(). + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool DetachVirtualJoystick(uint instance_id) => + PInvoke.DetachVirtualJoystick(instance_id) != 0; + + /// + /// Query whether or not a joystick is virtual. + /// + /// the joystick instance ID. + /// true if the joystick is virtual, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool IsJoystickVirtual(uint instance_id) => PInvoke.IsJoystickVirtual(instance_id) != 0; + + /// + /// Set the state of an axis on an opened virtual joystick. + /// + /// the virtual joystick on which to set state. + /// the index of the axis on the virtual joystick to update. + /// the new value for the specified axis. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// Note that when sending trigger axes, you should scale the value to the full + /// range of Sint16. For example, a trigger at rest would have the value of + /// SDL_JOYSTICK_AXIS_MIN. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool SetJoystickVirtualAxis(SdlJoystick joystick, int axis, short value) => + PInvoke.SetJoystickVirtualAxis(joystick, axis, value) != 0; + + /// + /// Generate ball motion on an opened virtual joystick. + /// + /// the virtual joystick on which to set state. + /// the index of the ball on the virtual joystick to update. + /// the relative motion on the X axis. + /// the relative motion on the Y axis. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool SetJoystickVirtualBall(SdlJoystick joystick, int ball, short xrel, short yrel) => + PInvoke.SetJoystickVirtualBall(joystick, ball, xrel, yrel) != 0; + + /// + /// Set the state of a button on an opened virtual joystick. + /// + /// the virtual joystick on which to set state. + /// the index of the button on the virtual joystick to update. + /// true if the button is pressed, false otherwise. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool SetJoystickVirtualButton(SdlJoystick joystick, int button, bool down) => + PInvoke.SetJoystickVirtualButton(joystick, button, down ? (byte)1 : (byte)0) != 0; + + /// + /// Set the state of a hat on an opened virtual joystick. + /// + /// the virtual joystick on which to set state. + /// the index of the hat on the virtual joystick to update. + /// the new value for the specified hat. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool SetJoystickVirtualHat(SdlJoystick joystick, int hat, byte value) => + PInvoke.SetJoystickVirtualHat(joystick, hat, value) != 0; + + /// + /// Set touchpad finger state on an opened virtual joystick. + /// + /// the virtual joystick on which to set state. + /// + /// the index of the touchpad on the virtual joystick to + /// update. + /// + /// the index of the finger on the touchpad to set. + /// true if the finger is pressed, false if the finger is released. + /// + /// the x coordinate of the finger on the touchpad, normalized 0 to 1, + /// with the origin in the upper left. + /// + /// + /// the y coordinate of the finger on the touchpad, normalized 0 to 1, + /// with the origin in the upper left. + /// + /// the pressure of the finger. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool SetJoystickVirtualTouchpad( + SdlJoystick joystick, + int touchpad, + int finger, + bool down, + float x, + float y, + float pressure + ) => + PInvoke.SetJoystickVirtualTouchpad(joystick, touchpad, finger, down ? (byte)1 : (byte)0, x, y, pressure) + != 0; + + /// + /// Send a sensor update for an opened virtual joystick. + /// + /// the virtual joystick on which to set state. + /// the type of the sensor on the virtual joystick to update. + /// + /// a 64-bit timestamp in nanoseconds associated with + /// the sensor reading. + /// + /// the data associated with the sensor reading. + /// the number of values pointed to by data. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + public static bool SendJoystickVirtualSensorData( + SdlJoystick joystick, + SdlSensorType type, + ulong sensor_timestamp, + float* data, + int num_values + ) => PInvoke.SendJoystickVirtualSensorData(joystick, type, sensor_timestamp, data, num_values) != 0; + + /// + /// Get the properties associated with a joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN: true if this joystick has an + /// LED that has adjustable brightness + /// - SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN: true if this joystick has an LED + /// that has adjustable color + /// - SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN: true if this joystick has a + /// player LED + /// - SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN: true if this joystick has + /// left/right rumble + /// - SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN: true if this joystick has + /// simple trigger rumble + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetJoystickProperties(SdlJoystick joystick) => PInvoke.GetJoystickProperties(joystick); + + /// + /// Get the implementation dependent name of a joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// the name of the selected joystick. If no name can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetJoystickName(SdlJoystick joystick) => PInvoke.GetJoystickName(joystick); + + /// + /// Get the implementation dependent path of a joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// the path of the selected joystick. If no path can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetJoystickPath(SdlJoystick joystick) => PInvoke.GetJoystickPath(joystick); + + /// + /// Get the player index of an opened joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// the player index, or -1 if it's not available. + /// + /// + /// For XInput controllers this returns the XInput user index. Many joysticks + /// will not be able to supply this information. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static int GetJoystickPlayerIndex(SdlJoystick joystick) => PInvoke.GetJoystickPlayerIndex(joystick); + + /// + /// Set the player index of an opened joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// player index to assign to this joystick, or -1 to clear + /// the player index and turn off player LEDs. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetJoystickPlayerIndex(SdlJoystick joystick, int player_index) => + PInvoke.SetJoystickPlayerIndex(joystick, player_index) != 0; + + /// + /// Get the implementation-dependent GUID for the joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// the GUID of the given joystick. If called on an invalid index, + /// this function returns a zero GUID; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function requires an open joystick. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlGuid GetJoystickGuid(SdlJoystick joystick) => PInvoke.GetJoystickGuid(joystick); + + /// + /// Get the USB vendor ID of an opened joystick, if available. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// the USB vendor ID of the selected joystick, or 0 if unavailable. + /// + /// + /// If the vendor ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static ushort GetJoystickVendor(SdlJoystick joystick) => PInvoke.GetJoystickVendor(joystick); + + /// + /// Get the USB product ID of an opened joystick, if available. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// the USB product ID of the selected joystick, or 0 if unavailable. + /// + /// + /// If the product ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static ushort GetJoystickProduct(SdlJoystick joystick) => PInvoke.GetJoystickProduct(joystick); + + /// + /// Get the product version of an opened joystick, if available. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// the product version of the selected joystick, or 0 if unavailable. + /// + /// + /// If the product version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static ushort GetJoystickProductVersion(SdlJoystick joystick) => + PInvoke.GetJoystickProductVersion(joystick); + + /// + /// Get the firmware version of an opened joystick, if available. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// the firmware version of the selected joystick, or 0 if + /// unavailable. + /// + /// + /// + /// If the firmware version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static ushort GetJoystickFirmwareVersion(SdlJoystick joystick) => + PInvoke.GetJoystickFirmwareVersion(joystick); + + /// + /// Get the serial number of an opened joystick, if available. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// + /// the serial number of the selected joystick, or NULL if + /// unavailable. + /// + /// + /// + /// Returns the serial number of the joystick, or NULL if it is not available. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static string? GetJoystickSerial(SdlJoystick joystick) => PInvoke.GetJoystickSerial(joystick); + + /// + /// Get the type of an opened joystick. + /// + /// the SDL_Joystick obtained from SDL_OpenJoystick(). + /// the SDL_JoystickType of the selected joystick. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlJoystickType GetJoystickType(SdlJoystick joystick) => PInvoke.GetJoystickType(joystick); + + /// + /// Get the device information encoded in a SDL_GUID structure. + /// + /// the SDL_GUID you wish to get info about. + /// + /// a pointer filled in with the device VID, or 0 if not + /// available. + /// + /// + /// a pointer filled in with the device PID, or 0 if not + /// available. + /// + /// + /// a pointer filled in with the device version, or 0 if not + /// available. + /// + /// + /// a pointer filled in with a CRC used to distinguish different + /// products with the same VID/PID, or 0 if not available. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void GetJoystickGuidInfo( + SdlGuid guid, + out ushort vendor, + out ushort product, + out ushort version, + out ushort crc16 + ) + { + vendor = default; + product = default; + version = default; + crc16 = default; + fixed (ushort* vendorPtr = &vendor) + { + fixed (ushort* productPtr = &product) + { + fixed (ushort* versionPtr = &version) + { + fixed (ushort* crc16Ptr = &crc16) + { + PInvoke.GetJoystickGuidInfo(guid, vendorPtr, productPtr, versionPtr, crc16Ptr); + } + } + } + } + } + + /// + /// Get the status of a specified joystick. + /// + /// the joystick to query. + /// + /// true if the joystick has been opened, false if it has not; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool JoystickConnected(SdlJoystick joystick) => PInvoke.JoystickConnected(joystick) != 0; + + /// + /// Get the instance ID of an opened joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// + /// the instance ID of the specified joystick on success or 0 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetJoystickID(SdlJoystick joystick) => PInvoke.GetJoystickID(joystick); + + /// + /// Get the number of general axis controls on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// + /// the number of axis controls/number of axes on success or -1 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// + /// Often, the directional pad on a game controller will either look like 4 + /// separate buttons or a POV hat, and not axes, but all of this is up to the + /// device and platform. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int GetNumJoystickAxes(SdlJoystick joystick) => PInvoke.GetNumJoystickAxes(joystick); + + /// + /// Get the number of trackballs on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// + /// the number of trackballs on success or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// Joystick trackballs have only relative motion events associated with them + /// and their state cannot be polled. + /// + /// + /// Most joysticks do not have trackballs. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int GetNumJoystickBalls(SdlJoystick joystick) => PInvoke.GetNumJoystickBalls(joystick); + + /// + /// Get the number of POV hats on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// + /// the number of POV hats on success or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int GetNumJoystickHats(SdlJoystick joystick) => PInvoke.GetNumJoystickHats(joystick); + + /// + /// Get the number of buttons on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// + /// the number of buttons on success or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static int GetNumJoystickButtons(SdlJoystick joystick) => PInvoke.GetNumJoystickButtons(joystick); + + /// + /// Set the state of joystick event processing. + /// + /// whether to process joystick events or not. + /// + /// + /// If joystick events are disabled, you must call SDL_UpdateJoysticks() + /// yourself and check the state of the joystick when you want joystick + /// information. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static void SetJoystickEventsEnabled(bool enabled) => + PInvoke.SetJoystickEventsEnabled(enabled ? (byte)1 : (byte)0); + + /// + /// Query the state of joystick event processing. + /// + /// true if joystick events are being processed, false otherwise. + /// + /// + /// If joystick events are disabled, you must call SDL_UpdateJoysticks() + /// yourself and check the state of the joystick when you want joystick + /// information. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool JoystickEventsEnabled() => PInvoke.JoystickEventsEnabled() != 0; + + /// + /// Update the current state of the open joysticks. + /// + /// + /// + /// This is called automatically by the event loop if any joystick events are + /// enabled. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static void UpdateJoysticks() => PInvoke.UpdateJoysticks(); + + /// + /// Get the current state of an axis control on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// the axis to query; the axis indices start at index 0. + /// + /// a 16-bit signed integer representing the current position of the + /// axis or 0 on failure; call SDL_GetError() for more information. + /// + /// + /// + /// SDL makes no promises about what part of the joystick any given axis refers + /// to. Your game should have some sort of configuration UI to let users + /// specify what each axis should be bound to. Alternately, SDL's higher-level + /// Game Controller API makes a great effort to apply order to this lower-level + /// interface, so you know that a specific axis is the "left thumb stick," etc. + /// + /// + /// The value returned by SDL_GetJoystickAxis() is a signed integer (-32768 to + /// 32767) representing the current position of the axis. It may be necessary + /// to impose certain tolerances on these values to account for jitter. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static short GetJoystickAxis(SdlJoystick joystick, int axis) => + PInvoke.GetJoystickAxis(joystick, axis); + + /// + /// Get the initial state of an axis control on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// the axis to query; the axis indices start at index 0. + /// upon return, the initial value is supplied here. + /// true if this axis has any initial value, or false if not. + /// + /// + /// The state is a value ranging from -32768 to 32767. + /// + /// + /// The axis indices start at index 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GetJoystickAxisInitialState(SdlJoystick joystick, int axis, out short state) + { + state = default; + fixed (short* statePtr = &state) + { + return PInvoke.GetJoystickAxisInitialState(joystick, axis, statePtr) != 0; + } + } + + /// + /// Get the ball axis change since the last poll. + /// + /// the SDL_Joystick to query. + /// the ball index to query; ball indices start at index 0. + /// stores the difference in the x axis position since the last poll. + /// stores the difference in the y axis position since the last poll. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Trackballs can only return relative motion since the last call to + /// SDL_GetJoystickBall(), these motion deltas are placed into dx and dy. + /// + /// + /// Most joysticks do not have trackballs. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetJoystickBall(SdlJoystick joystick, int ball, out int dx, out int dy) + { + dx = default; + dy = default; + fixed (int* dxPtr = &dx) + { + fixed (int* dyPtr = &dy) + { + return PInvoke.GetJoystickBall(joystick, ball, dxPtr, dyPtr) != 0; + } + } + } + + /// + /// Get the current state of a POV hat on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// the hat index to get the state from; indices start at index 0. + /// the current hat position. + /// + /// + /// The returned value will be one of the SDL_HAT_* values. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static byte GetJoystickHat(SdlJoystick joystick, int hat) => PInvoke.GetJoystickHat(joystick, hat); + + /// + /// Get the current state of a button on a joystick. + /// + /// an SDL_Joystick structure containing joystick information. + /// + /// the button index to get the state from; indices start at + /// index 0. + /// + /// true if the button is pressed, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetJoystickButton(SdlJoystick joystick, int button) => + PInvoke.GetJoystickButton(joystick, button) != 0; + + /// + /// Start a rumble effect. + /// + /// the joystick to vibrate. + /// + /// the intensity of the low frequency (left) + /// rumble motor, from 0 to 0xFFFF. + /// + /// + /// the intensity of the high frequency (right) + /// rumble motor, from 0 to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// true, or false if rumble isn't supported on this joystick. + /// + /// + /// Each call to this function cancels any previous rumble effect, and calling + /// it with 0 intensity stops any rumbling. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool RumbleJoystick( + SdlJoystick joystick, + ushort low_frequency_rumble, + ushort high_frequency_rumble, + uint duration_ms + ) => PInvoke.RumbleJoystick(joystick, low_frequency_rumble, high_frequency_rumble, duration_ms) != 0; + + /// + /// Start a rumble effect in the joystick's triggers. + /// + /// the joystick to vibrate. + /// + /// the intensity of the left trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// + /// the intensity of the right trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each call to this function cancels any previous trigger rumble effect, and + /// calling it with 0 intensity stops any rumbling. + /// + /// + /// Note that this is rumbling of the triggers and not the game controller as + /// a whole. This is currently only supported on Xbox One controllers. If you + /// want the (more common) whole-controller rumble, use SDL_RumbleJoystick() + /// instead. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RumbleJoystickTriggers( + SdlJoystick joystick, + ushort left_rumble, + ushort right_rumble, + uint duration_ms + ) => PInvoke.RumbleJoystickTriggers(joystick, left_rumble, right_rumble, duration_ms) != 0; + + /// + /// Update a joystick's LED color. + /// + /// the joystick to update. + /// the intensity of the red LED. + /// the intensity of the green LED. + /// the intensity of the blue LED. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// An example of a joystick LED is the light on the back of a PlayStation 4's + /// DualShock 4 controller. + /// + /// + /// For joysticks with a single color LED, the maximum of the RGB values will + /// be used as the LED brightness. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool SetJoystickLED(SdlJoystick joystick, byte red, byte green, byte blue) => + PInvoke.SetJoystickLED(joystick, red, green, blue) != 0; + + /// + /// Send a joystick specific effect packet. + /// + /// the joystick to affect. + /// the data to send to the joystick. + /// the size of the data to send to the joystick. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool SendJoystickEffect(SdlJoystick joystick, void* data, int size) => + PInvoke.SendJoystickEffect(joystick, data, size) != 0; + + /// + /// Close a joystick previously opened with SDL_OpenJoystick(). + /// + /// the joystick device to close. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void CloseJoystick(SdlJoystick joystick) => PInvoke.CloseJoystick(joystick); + + /// + /// Get the connection state of a joystick. + /// + /// the joystick to query. + /// + /// the connection state on success or + /// SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() + /// for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static SdlJoystickConnectionState GetJoystickConnectionState(SdlJoystick joystick) => + PInvoke.GetJoystickConnectionState(joystick); + + /// + /// Get the battery state of a joystick. + /// + /// the joystick to query. + /// + /// a pointer filled in with the percentage of battery life + /// left, between 0 and 100, or NULL to ignore. This will be + /// filled in with -1 we can't determine a value or there is no + /// battery. + /// + /// + /// the current battery state or SDL_POWERSTATE_ERROR on failure; + /// call SDL_GetError() for more information. + /// + /// + /// + /// You should never take a battery status as absolute truth. Batteries + /// (especially failing batteries) are delicate hardware, and the values + /// reported here are best estimates based on what that hardware reports. It's + /// not uncommon for older batteries to lose stored power much faster than it + /// reports, or completely drain when reporting it has 20 percent left, etc. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static SdlPowerState GetJoystickPowerInfo(SdlJoystick joystick, out int percent) + { + percent = default; + fixed (int* percentPtr = &percent) + { + return PInvoke.GetJoystickPowerInfo(joystick, percentPtr); + } + } + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Keyboard.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Keyboard.gen.cs new file mode 100644 index 0000000..9924c02 --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Keyboard.gen.cs @@ -0,0 +1,561 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Keyboard + { + /// + /// Return whether a keyboard is currently connected. + /// + /// true if a keyboard is connected, false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HasKeyboard() => PInvoke.HasKeyboard() != 0; + + /// + /// Ergonomic wrapper over SDL_GetKeyboards. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static uint[] GetKeyboards() + { + int count; + var ptr = PInvoke.GetKeyboards(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetKeyboards failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Get the name of a keyboard. + /// + /// the keyboard instance ID. + /// + /// the name of the selected keyboard or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// This function returns "" if the keyboard doesn't have a name. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetKeyboardNameForID(uint instance_id) => PInvoke.GetKeyboardNameForID(instance_id); + + /// + /// Ergonomic wrapper over SDL_GetKeyboardFocus. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetKeyboardFocus() => PInvoke.GetKeyboardFocus(); + + /// + /// Ergonomic wrapper over SDL_GetKeyboardState. + /// + /// + /// The returned array is a managed copy of SDL's own internal buffer, which SDL owns for the lifetime of + /// the process; nothing here is freed. + /// + public static bool[] GetKeyboardState() + { + int numkeys; + var ptr = PInvoke.GetKeyboardState(&numkeys); + if (ptr is null) + return []; + var result = new bool[numkeys]; + for (var i = 0; i < numkeys; i++) + result[i] = ptr[i] != 0; + return result; + } + + /// + /// Clear the state of the keyboard. + /// + /// + /// + /// This function will generate key up events for all pressed keys. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void ResetKeyboard() => PInvoke.ResetKeyboard(); + + /// + /// Get the current key modifier state for the keyboard. + /// + /// an OR'd combination of the modifier keys for the keyboard. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static ushort GetModState() => PInvoke.GetModState(); + + /// + /// Set the current key modifier state for the keyboard. + /// + /// the desired SDL_Keymod for the keyboard. + /// + /// + /// The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose + /// modifier key states on your application. Simply pass your desired modifier + /// states into modstate. This value may be a bitwise, OR'd combination of + /// SDL_Keymod values. + /// + /// + /// This does not change the keyboard state, only the key modifier flags that + /// SDL reports. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void SetModState(ushort modstate) => PInvoke.SetModState(modstate); + + /// + /// Get the key code corresponding to the given scancode according to the + /// current keyboard layout. + /// + /// the desired SDL_Scancode to query. + /// + /// the modifier state to use when translating the scancode to + /// a keycode. + /// + /// true if the keycode will be used in key events. + /// the SDL_Keycode that corresponds to the given SDL_Scancode. + /// + /// + /// If you want to get the keycode as it would be delivered in key events, + /// including options specified in SDL_HINT_KEYCODE_OPTIONS, then you should + /// pass key_event as true. Otherwise this function simply translates the + /// scancode based on the given modifier state. + /// + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlKeycode GetKeyFromScancode(SdlScancode scancode, ushort modstate, bool key_event) => + PInvoke.GetKeyFromScancode(scancode, modstate, key_event ? (byte)1 : (byte)0); + + /// + /// Get the scancode corresponding to the given key code according to the + /// current keyboard layout. + /// + /// the desired SDL_Keycode to query. + /// + /// a pointer to the modifier state that would be used when the + /// scancode generates this key, may be NULL. + /// + /// the SDL_Scancode that corresponds to the given SDL_Keycode. + /// + /// + /// Note that there may be multiple scancode+modifier states that can generate + /// this keycode, this will just return the first one found. + /// + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlScancode GetScancodeFromKey(SdlKeycode key, ushort* modstate) => + PInvoke.GetScancodeFromKey(key, modstate); + + /// + /// Get a human-readable name for a scancode. + /// + /// the desired SDL_Scancode to query. + /// + /// a pointer to the name for the scancode. If the scancode doesn't + /// have a name this function returns an empty string (""). + /// + /// + /// + /// Warning: The returned name is by design not stable across platforms, + /// e.g. the name for SDL_SCANCODE_LGUI is "Left GUI" under Linux but "Left + /// Windows" under Microsoft Windows, and some scancodes like + /// SDL_SCANCODE_NONUSBACKSLASH don't have any name at all. There are even + /// scancodes that share names, e.g. SDL_SCANCODE_RETURN and + /// SDL_SCANCODE_RETURN2 (both called "Return"). This function is therefore + /// unsuitable for creating a stable cross-platform two-way mapping between + /// strings and scancodes. + /// + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetScancodeName(SdlScancode scancode) => PInvoke.GetScancodeName(scancode); + + /// + /// Get a scancode from a human-readable name. + /// + /// the human-readable scancode name. + /// + /// the SDL_Scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't + /// recognized; call SDL_GetError() for more information. + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static SdlScancode GetScancodeFromName(string name) => PInvoke.GetScancodeFromName(name); + + /// + /// Get a human-readable name for a key. + /// + /// the desired SDL_Keycode to query. + /// a UTF-8 encoded string of the key name. + /// + /// + /// If the key doesn't have a name, this function returns an empty string (""). + /// + /// + /// Letters will be presented in their uppercase form, if applicable. + /// + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static string? GetKeyName(SdlKeycode key) => PInvoke.GetKeyName(key); + + /// + /// Get a key code from a human-readable name. + /// + /// the human-readable key name. + /// + /// key code, or SDLK_UNKNOWN if the name wasn't recognized; call + /// SDL_GetError() for more information. + /// + /// + /// This function is not thread safe. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static SdlKeycode GetKeyFromName(string name) => PInvoke.GetKeyFromName(name); + + /// + /// Start accepting Unicode text input events in a window. + /// + /// the window to enable text input. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function will enable text input (SDL_EVENT_TEXT_INPUT and + /// SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this + /// function paired with SDL_StopTextInput(). + /// + /// + /// Text input events are not received by default. + /// + /// + /// On some platforms using this function shows the screen keyboard and/or + /// activates an IME, which can prevent some key press events from being passed + /// through. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool StartTextInput(SdlWindow window) => PInvoke.StartTextInput(window) != 0; + + /// + /// Start accepting Unicode text input events in a window, with properties + /// describing the input. + /// + /// the window to enable text input. + /// the properties to use. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function will enable text input (SDL_EVENT_TEXT_INPUT and + /// SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this + /// function paired with SDL_StopTextInput(). + /// + /// + /// Text input events are not received by default. + /// + /// + /// On some platforms using this function shows the screen keyboard and/or + /// activates an IME, which can prevent some key press events from being passed + /// through. + /// + /// + /// These are the supported properties: + /// + /// + /// - SDL_PROP_TEXTINPUT_TYPE_NUMBER - an SDL_TextInputType value that + /// describes text being input, defaults to SDL_TEXTINPUT_TYPE_TEXT. + /// - SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER - an SDL_Capitalization value + /// that describes how text should be capitalized, defaults to + /// SDL_CAPITALIZE_SENTENCES for normal text entry, SDL_CAPITALIZE_WORDS for + /// SDL_TEXTINPUT_TYPE_TEXT_NAME, and SDL_CAPITALIZE_NONE for e-mail + /// addresses, usernames, and passwords. + /// - SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN - true to enable auto completion + /// and auto correction, defaults to true. + /// - SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN - true if multiple lines of text + /// are allowed. This defaults to true if SDL_HINT_RETURN_KEY_HIDES_IME is + /// "0" or is not set, and defaults to false if SDL_HINT_RETURN_KEY_HIDES_IME + /// is "1". + /// + /// + /// On Android you can directly specify the input type: + /// + /// + /// - SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER - the text input type to + /// use, overriding other properties. This is documented at + /// https://developer.android.com/reference/android/text/InputType + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool StartTextInputWithProperties(SdlWindow window, uint props) => + PInvoke.StartTextInputWithProperties(window, props) != 0; + + /// + /// Check whether or not Unicode text input events are enabled for a window. + /// + /// the window to check. + /// true if text input events are enabled else false. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool TextInputActive(SdlWindow window) => PInvoke.TextInputActive(window) != 0; + + /// + /// Stop receiving any text input events in a window. + /// + /// the window to disable text input. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If SDL_StartTextInput() showed the screen keyboard, this function will hide + /// it. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool StopTextInput(SdlWindow window) => PInvoke.StopTextInput(window) != 0; + + /// + /// Dismiss the composition window/IME without disabling the subsystem. + /// + /// the window to affect. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool ClearComposition(SdlWindow window) => PInvoke.ClearComposition(window) != 0; + + /// + /// Set the area used to type Unicode text input. + /// + /// the window for which to set the text input area. + /// + /// the SDL_Rect representing the text input area, in window + /// coordinates, or NULL to clear it. + /// + /// + /// the offset of the current cursor location relative to + /// rect->x, in window coordinates. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Native input methods may place a window with word suggestions near the + /// cursor, without covering the text being entered. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetTextInputArea(SdlWindow window, SdlRect* rect, int cursor) => + PInvoke.SetTextInputArea(window, rect, cursor) != 0; + + /// + /// Get the area used to type Unicode text input. + /// + /// the window for which to query the text input area. + /// + /// a pointer to an SDL_Rect filled in with the text input area, + /// may be NULL. + /// + /// + /// a pointer to the offset of the current cursor location + /// relative to rect->x, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns the values previously set by SDL_SetTextInputArea(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetTextInputArea(SdlWindow window, SdlRect* rect, out int cursor) + { + cursor = default; + fixed (int* cursorPtr = &cursor) + { + return PInvoke.GetTextInputArea(window, rect, cursorPtr) != 0; + } + } + + /// + /// Check whether the platform has screen keyboard support. + /// + /// + /// true if the platform has some screen keyboard support or false if + /// not. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool HasScreenKeyboardSupport() => PInvoke.HasScreenKeyboardSupport() != 0; + + /// + /// Check whether the screen keyboard is shown for given window. + /// + /// the window for which screen keyboard should be queried. + /// true if screen keyboard is shown or false if not. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool ScreenKeyboardShown(SdlWindow window) => PInvoke.ScreenKeyboardShown(window) != 0; + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Mouse.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Mouse.gen.cs new file mode 100644 index 0000000..b795a2d --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Mouse.gen.cs @@ -0,0 +1,635 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Mouse + { + /// + /// Return whether a mouse is currently connected. + /// + /// true if a mouse is connected, false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HasMouse() => PInvoke.HasMouse() != 0; + + /// + /// Ergonomic wrapper over SDL_GetMice. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static uint[] GetMice() + { + int count; + var ptr = PInvoke.GetMice(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetMice failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Get the name of a mouse. + /// + /// the mouse instance ID. + /// + /// the name of the selected mouse, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// This function returns "" if the mouse doesn't have a name. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetMouseNameForID(uint instance_id) => PInvoke.GetMouseNameForID(instance_id); + + /// + /// Ergonomic wrapper over SDL_GetMouseFocus. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetMouseFocus() => PInvoke.GetMouseFocus(); + + /// + /// Query SDL's cache for the synchronous mouse button state and the + /// window-relative SDL-cursor position. + /// + /// + /// a pointer to receive the SDL-cursor's x-position from the focused + /// window's top left corner, can be NULL if unused. + /// + /// + /// a pointer to receive the SDL-cursor's y-position from the focused + /// window's top left corner, can be NULL if unused. + /// + /// + /// a 32-bit bitmask of the button state that can be bitwise-compared + /// against the SDL_BUTTON_MASK(X) macro. + /// + /// + /// + /// This function returns the cached synchronous state as SDL understands it + /// from the last pump of the event queue. + /// + /// + /// To query the platform for immediate asynchronous state, use + /// SDL_GetGlobalMouseState. + /// + /// + /// Passing non-NULL pointers to x or y will write the destination with + /// respective x or y coordinates relative to the focused window. + /// + /// + /// In Relative Mode, the SDL-cursor's position usually contradicts the + /// platform-cursor's position as manually calculated from + /// SDL_GetGlobalMouseState() and SDL_GetWindowPosition. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlMouseButtonFlags GetMouseState(out float x, out float y) + { + x = default; + y = default; + fixed (float* xPtr = &x) + { + fixed (float* yPtr = &y) + { + return PInvoke.GetMouseState(xPtr, yPtr); + } + } + } + + /// + /// Query the platform for the asynchronous mouse button state and the + /// desktop-relative platform-cursor position. + /// + /// + /// a pointer to receive the platform-cursor's x-position from the + /// desktop's top left corner, can be NULL if unused. + /// + /// + /// a pointer to receive the platform-cursor's y-position from the + /// desktop's top left corner, can be NULL if unused. + /// + /// + /// a 32-bit bitmask of the button state that can be bitwise-compared + /// against the SDL_BUTTON_MASK(X) macro. + /// + /// + /// + /// This function immediately queries the platform for the most recent + /// asynchronous state, more costly than retrieving SDL's cached state in + /// SDL_GetMouseState(). + /// + /// + /// Passing non-NULL pointers to x or y will write the destination with + /// respective x or y coordinates relative to the desktop. + /// + /// + /// In Relative Mode, the platform-cursor's position usually contradicts the + /// SDL-cursor's position as manually calculated from SDL_GetMouseState() and + /// SDL_GetWindowPosition. + /// + /// + /// This function can be useful if you need to track the mouse outside of a + /// specific window and SDL_CaptureMouse() doesn't fit your needs. For example, + /// it could be useful if you need to track the mouse while dragging a window, + /// where coordinates relative to a window might not be in sync at all times. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static SdlMouseButtonFlags GetGlobalMouseState(out float x, out float y) + { + x = default; + y = default; + fixed (float* xPtr = &x) + { + fixed (float* yPtr = &y) + { + return PInvoke.GetGlobalMouseState(xPtr, yPtr); + } + } + } + + /// + /// Query SDL's cache for the synchronous mouse button state and accumulated + /// mouse delta since last call. + /// + /// + /// a pointer to receive the x mouse delta accumulated since last + /// call, can be NULL if unused. + /// + /// + /// a pointer to receive the y mouse delta accumulated since last + /// call, can be NULL if unused. + /// + /// + /// a 32-bit bitmask of the button state that can be bitwise-compared + /// against the SDL_BUTTON_MASK(X) macro. + /// + /// + /// + /// This function returns the cached synchronous state as SDL understands it + /// from the last pump of the event queue. + /// + /// + /// To query the platform for immediate asynchronous state, use + /// SDL_GetGlobalMouseState. + /// + /// + /// Passing non-NULL pointers to x or y will write the destination with + /// respective x or y deltas accumulated since the last call to this function + /// (or since event initialization). + /// + /// + /// This function is useful for reducing overhead by processing relative mouse + /// inputs in one go per-frame instead of individually per-event, at the + /// expense of losing the order between events within the frame (e.g. quickly + /// pressing and releasing a button within the same frame). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static SdlMouseButtonFlags GetRelativeMouseState(out float x, out float y) + { + x = default; + y = default; + fixed (float* xPtr = &x) + { + fixed (float* yPtr = &y) + { + return PInvoke.GetRelativeMouseState(xPtr, yPtr); + } + } + } + + /// + /// Move the mouse cursor to the given position within the window. + /// + /// + /// the window to move the mouse into, or NULL for the current + /// mouse focus. + /// + /// the x coordinate within the window. + /// the y coordinate within the window. + /// + /// + /// This function generates a mouse motion event if relative mode is not + /// enabled. If relative mode is enabled, you can force mouse events for the + /// warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint. + /// + /// + /// Note that this function will appear to succeed, but not actually move the + /// mouse when used over Microsoft Remote Desktop. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void WarpMouseInWindow(SdlWindow window, float x, float y) => + PInvoke.WarpMouseInWindow(window, x, y); + + /// + /// Move the mouse to the given position in global screen space. + /// + /// the x coordinate. + /// the y coordinate. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function generates a mouse motion event. + /// + /// + /// A failure of this function usually means that it is unsupported by a + /// platform. + /// + /// + /// Note that this function will appear to succeed, but not actually move the + /// mouse when used over Microsoft Remote Desktop. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool WarpMouseGlobal(float x, float y) => PInvoke.WarpMouseGlobal(x, y) != 0; + + /// + /// Set relative mouse mode for a window. + /// + /// the window to change. + /// true to enable relative mode, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// While the window has focus and relative mouse mode is enabled, the cursor + /// is hidden, the mouse position is constrained to the window, and SDL will + /// report continuous relative mouse motion even if the mouse is at the edge of + /// the window. + /// + /// + /// If you'd like to keep the mouse position fixed while in relative mode you + /// can use SDL_SetWindowMouseRect(). If you'd like the cursor to be at a + /// specific location when relative mode ends, you should use + /// SDL_WarpMouseInWindow() before disabling relative mode. + /// + /// + /// This function will flush any pending mouse motion for this window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowRelativeMouseMode(SdlWindow window, bool enabled) => + PInvoke.SetWindowRelativeMouseMode(window, enabled ? (byte)1 : (byte)0) != 0; + + /// + /// Query whether relative mouse mode is enabled for a window. + /// + /// the window to query. + /// true if relative mode is enabled for a window or false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetWindowRelativeMouseMode(SdlWindow window) => + PInvoke.GetWindowRelativeMouseMode(window) != 0; + + /// + /// Capture the mouse and to track input outside an SDL window. + /// + /// true to enable capturing, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Capturing enables your app to obtain mouse events globally, instead of just + /// within your window. Not all video targets support this function. When + /// capturing is enabled, the current window will get all mouse events, but + /// unlike relative mode, no change is made to the cursor and it is not + /// restrained to your window. + /// + /// + /// This function may also deny mouse input to other windows--both those in + /// your application and others on the system--so you should use this function + /// sparingly, and in small bursts. For example, you might want to track the + /// mouse while the user is dragging something, until the user releases a mouse + /// button. It is not recommended that you capture the mouse for long periods + /// of time, such as the entire time your app is running. For that, you should + /// probably use SDL_SetWindowRelativeMouseMode() or SDL_SetWindowMouseGrab(), + /// depending on your goals. + /// + /// + /// While captured, mouse events still report coordinates relative to the + /// current (foreground) window, but those coordinates may be outside the + /// bounds of the window (including negative values). Capturing is only allowed + /// for the foreground window. If the window loses focus while capturing, the + /// capture will be disabled automatically. + /// + /// + /// While capturing is enabled, the current window will have the + /// SDL_WINDOW_MOUSE_CAPTURE flag set. + /// + /// + /// Please note that SDL will attempt to "auto capture" the mouse while the + /// user is pressing a button; this is to try and make mouse behavior more + /// consistent between platforms, and deal with the common case of a user + /// dragging the mouse outside of the window. This means that if you are + /// calling SDL_CaptureMouse() only to deal with this situation, you do not + /// have to (although it is safe to do so). If this causes problems for your + /// app, you can disable auto capture by setting the + /// SDL_HINT_MOUSE_AUTO_CAPTURE hint to zero. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool CaptureMouse(bool enabled) => PInvoke.CaptureMouse(enabled ? (byte)1 : (byte)0) != 0; + + /// + /// Ergonomic wrapper over SDL_CreateCursor. Throws instead of returning a null handle on failure. + /// + /// the color value for each pixel of the cursor. + /// the mask value for each pixel of the cursor. + /// the width of the cursor. + /// the height of the cursor. + /// + /// the x-axis offset from the left of the cursor image to the + /// mouse x position, in the range of 0 to w - 1. + /// + /// + /// the y-axis offset from the top of the cursor image to the + /// mouse y position, in the range of 0 to h - 1. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlCursor CreateCursor(byte* data, byte* mask, int w, int h, int hot_x, int hot_y) + { + SdlCursor result = PInvoke.CreateCursor(data, mask, w, h, hot_x, hot_y); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateCursor failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateColorCursor. Throws instead of returning a null handle on + /// failure. + /// + /// an SDL_Surface structure representing the cursor image. + /// the x position of the cursor hot spot. + /// the y position of the cursor hot spot. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlCursor CreateColorCursor(SdlSurface* surface, int hot_x, int hot_y) + { + SdlCursor result = PInvoke.CreateColorCursor(surface, hot_x, hot_y); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateColorCursor failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateAnimatedCursor. Throws instead of returning a null handle on + /// failure. + /// + /// an array of cursor images composing the animation. + /// the number of frames in the sequence. + /// the x position of the cursor hot spot. + /// the y position of the cursor hot spot. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlCursor CreateAnimatedCursor( + SdlCursorFrameInfo* frames, + int frame_count, + int hot_x, + int hot_y + ) + { + SdlCursor result = PInvoke.CreateAnimatedCursor(frames, frame_count, hot_x, hot_y); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateAnimatedCursor failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateSystemCursor. Throws instead of returning a null handle on + /// failure. + /// + /// an SDL_SystemCursor enum value. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlCursor CreateSystemCursor(SdlSystemCursor id) + { + SdlCursor result = PInvoke.CreateSystemCursor(id); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateSystemCursor failed"); + } + return result; + } + + /// + /// Set the active cursor. + /// + /// a cursor to make active. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets the currently active cursor to the specified one. If the + /// cursor is currently visible, the change will be immediately represented on + /// the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if + /// this is desired for any reason. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetCursor(SdlCursor cursor) => PInvoke.SetCursor(cursor) != 0; + + /// + /// Ergonomic wrapper over SDL_GetCursor. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlCursor GetCursor() => PInvoke.GetCursor(); + + /// + /// Ergonomic wrapper over SDL_GetDefaultCursor. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlCursor GetDefaultCursor() => PInvoke.GetDefaultCursor(); + + /// + /// Free a previously-created cursor. + /// + /// the cursor to free. + /// + /// + /// Use this function to free cursor resources created with SDL_CreateCursor(), + /// SDL_CreateColorCursor() or SDL_CreateSystemCursor(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static void DestroyCursor(SdlCursor cursor) => PInvoke.DestroyCursor(cursor); + + /// + /// Show the cursor. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool ShowCursor() => PInvoke.ShowCursor() != 0; + + /// + /// Hide the cursor. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool HideCursor() => PInvoke.HideCursor() != 0; + + /// + /// Return whether the cursor is currently being shown. + /// + /// + /// true if the cursor is being shown, or false if the cursor is + /// hidden. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool CursorVisible() => PInvoke.CursorVisible() != 0; + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Render.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Render.gen.cs new file mode 100644 index 0000000..03ac28e --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Render.gen.cs @@ -0,0 +1,3349 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Render + { + /// + /// Get the number of 2D rendering drivers available for the current display. + /// + /// the number of built in render drivers. + /// + /// + /// A render driver is a set of code that handles rendering and texture + /// management on a particular display. Normally there is only one, but some + /// drivers may have several available with different capabilities. + /// + /// + /// There may be none if SDL was compiled without render support. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static int GetNumRenderDrivers() => PInvoke.GetNumRenderDrivers(); + + /// + /// Use this function to get the name of a built in 2D rendering driver. + /// + /// + /// the index of the rendering driver; the value ranges from 0 to + /// SDL_GetNumRenderDrivers() - 1. + /// + /// + /// the name of the rendering driver at the requested index, or NULL + /// if an invalid index was specified. + /// + /// + /// + /// The list of rendering drivers is given in the order that they are normally + /// initialized by default; the drivers that seem more reasonable to choose + /// first (as far as the SDL developers believe) are earlier in the list. + /// + /// + /// The names of drivers are all simple, low-ASCII identifiers, like "opengl", + /// "direct3d12" or "metal". These never have Unicode characters, and are not + /// meant to be proper names. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetRenderDriver(int index) => PInvoke.GetRenderDriver(index); + + /// + /// Create a window and default renderer. + /// + /// the title of the window, in UTF-8 encoding. + /// the width of the window. + /// the height of the window. + /// + /// the flags used to create the window (see + /// SDL_CreateWindow()). + /// + /// a pointer filled with the window, or NULL on error. + /// a pointer filled with the renderer, or NULL on error. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool CreateWindowAndRenderer( + string title, + int width, + int height, + SdlWindowFlags window_flags, + SdlWindow* window, + SdlRenderer* renderer + ) => PInvoke.CreateWindowAndRenderer(title, width, height, window_flags, window, renderer) != 0; + + /// + /// Ergonomic wrapper over SDL_CreateRenderer. Throws instead of returning a null handle on + /// failure. + /// + /// the window where rendering is displayed. + /// + /// the name of the rendering driver to initialize, or NULL to let + /// SDL choose one. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlRenderer CreateRenderer(SdlWindow window, string name) + { + SdlRenderer result = PInvoke.CreateRenderer(window, name); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateRenderer failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateRendererWithProperties. Throws instead of returning a null + /// handle on failure. + /// + /// the properties to use. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlRenderer CreateRendererWithProperties(uint props) + { + SdlRenderer result = PInvoke.CreateRendererWithProperties(props); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateRendererWithProperties failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateGPURenderer. Throws instead of returning a null handle on + /// failure. + /// + /// + /// the GPU device to use with the renderer, or NULL to create a + /// device. + /// + /// + /// the window where rendering is displayed, or NULL to create an + /// offscreen renderer. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlRenderer CreateGpuRenderer(SdlGpuDevice device, SdlWindow window) + { + SdlRenderer result = PInvoke.CreateGpuRenderer(device, window); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateGPURenderer failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_GetGPURendererDevice. + /// + /// the rendering context. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlGpuDevice GetGpuRendererDevice(SdlRenderer renderer) => + PInvoke.GetGpuRendererDevice(renderer); + + /// + /// Ergonomic wrapper over SDL_CreateSoftwareRenderer. Throws instead of returning a null handle on + /// failure. + /// + /// + /// the SDL_Surface structure representing the surface where + /// rendering is done. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlRenderer CreateSoftwareRenderer(SdlSurface* surface) + { + SdlRenderer result = PInvoke.CreateSoftwareRenderer(surface); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateSoftwareRenderer failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_GetRenderer. + /// + /// the window to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlRenderer GetRenderer(SdlWindow window) => PInvoke.GetRenderer(window); + + /// + /// Ergonomic wrapper over SDL_GetRenderWindow. + /// + /// the renderer to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetRenderWindow(SdlRenderer renderer) => PInvoke.GetRenderWindow(renderer); + + /// + /// Get the name of a renderer. + /// + /// the rendering context. + /// + /// the name of the selected renderer, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetRendererName(SdlRenderer renderer) => PInvoke.GetRendererName(renderer); + + /// + /// Get the properties associated with a renderer. + /// + /// the rendering context. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_RENDERER_NAME_STRING: the name of the rendering driver + /// - SDL_PROP_RENDERER_WINDOW_POINTER: the window where rendering is + /// displayed, if any + /// - SDL_PROP_RENDERER_SURFACE_POINTER: the surface where rendering is + /// displayed, if this is a software renderer without a window + /// - SDL_PROP_RENDERER_VSYNC_NUMBER: the current vsync setting + /// - SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER: the maximum texture width + /// and height + /// - SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER: a (const SDL_PixelFormat *) + /// array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN, + /// representing the available texture formats for this renderer. + /// - SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN: true if the renderer + /// supports SDL_TEXTURE_ADDRESS_WRAP on non-power-of-two textures. + /// - SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER: an SDL_Colorspace value + /// describing the colorspace for output to the display, defaults to + /// SDL_COLORSPACE_SRGB. + /// - SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN: true if the output colorspace is + /// SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with + /// HDR enabled. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT: the value of SDR white in the + /// SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is + /// automatically multiplied into the color scale. This property can change + /// dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT: the additional high dynamic range + /// that can be displayed, in terms of the SDR white point. When HDR is not + /// enabled, this will be 1.0. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// + /// + /// With the direct3d renderer: + /// + /// + /// - SDL_PROP_RENDERER_D3D9_DEVICE_POINTER: the IDirect3DDevice9 associated + /// with the renderer + /// + /// + /// With the direct3d11 renderer: + /// + /// + /// - SDL_PROP_RENDERER_D3D11_DEVICE_POINTER: the ID3D11Device associated + /// with the renderer + /// - SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER: the IDXGISwapChain1 + /// associated with the renderer. This may change when the window is resized. + /// + /// + /// With the direct3d12 renderer: + /// + /// + /// - SDL_PROP_RENDERER_D3D12_DEVICE_POINTER: the ID3D12Device associated + /// with the renderer + /// - SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER: the IDXGISwapChain4 + /// associated with the renderer. + /// - SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER: the ID3D12CommandQueue + /// associated with the renderer + /// + /// + /// With the vulkan renderer: + /// + /// + /// - SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER: the VkInstance associated + /// with the renderer + /// - SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER: the VkSurfaceKHR associated + /// with the renderer + /// - SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER: the VkPhysicalDevice + /// associated with the renderer + /// - SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER: the VkDevice associated with + /// the renderer + /// - SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER: the queue + /// family index used for rendering + /// - SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER: the queue + /// family index used for presentation + /// - SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER: the number of + /// swapchain images, or potential frames in flight, used by the Vulkan + /// renderer + /// + /// + /// With the gpu renderer: + /// + /// + /// - SDL_PROP_RENDERER_GPU_DEVICE_POINTER: the SDL_GPUDevice associated with + /// the renderer + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetRendererProperties(SdlRenderer renderer) => PInvoke.GetRendererProperties(renderer); + + /// + /// Get the output size in pixels of a rendering context. + /// + /// the rendering context. + /// a pointer filled in with the width in pixels. + /// a pointer filled in with the height in pixels. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns the true output size in pixels, ignoring any render targets or + /// logical size and presentation. + /// + /// + /// For the output size of the current rendering target, with logical size + /// adjustments, use SDL_GetCurrentRenderOutputSize() instead. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderOutputSize(SdlRenderer renderer, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetRenderOutputSize(renderer, wPtr, hPtr) != 0; + } + } + } + + /// + /// Get the current output size in pixels of a rendering context. + /// + /// the rendering context. + /// a pointer filled in with the current width. + /// a pointer filled in with the current height. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If a rendering target is active, this will return the size of the rendering + /// target in pixels, otherwise return the value of SDL_GetRenderOutputSize(). + /// + /// + /// Rendering target or not, the output will be adjusted by the current logical + /// presentation state, dictated by SDL_SetRenderLogicalPresentation(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetCurrentRenderOutputSize(SdlRenderer renderer, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetCurrentRenderOutputSize(renderer, wPtr, hPtr) != 0; + } + } + } + + /// + /// Ergonomic wrapper over SDL_CreateTexture. Throws instead of returning a null handle on failure. + /// + /// the rendering context. + /// one of the enumerated values in SDL_PixelFormat. + /// one of the enumerated values in SDL_TextureAccess. + /// the width of the texture in pixels. + /// the height of the texture in pixels. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlTexture CreateTexture( + SdlRenderer renderer, + SdlPixelFormat format, + SdlTextureAccess access, + int w, + int h + ) + { + SdlTexture result = PInvoke.CreateTexture(renderer, format, access, w, h); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateTexture failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateTextureFromSurface. Throws instead of returning a null handle + /// on failure. + /// + /// the rendering context. + /// + /// the SDL_Surface structure containing pixel data used to fill + /// the texture. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlTexture CreateTextureFromSurface(SdlRenderer renderer, SdlSurface* surface) + { + SdlTexture result = PInvoke.CreateTextureFromSurface(renderer, surface); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateTextureFromSurface failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateTextureWithProperties. Throws instead of returning a null + /// handle on failure. + /// + /// the rendering context. + /// the properties to use. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlTexture CreateTextureWithProperties(SdlRenderer renderer, uint props) + { + SdlTexture result = PInvoke.CreateTextureWithProperties(renderer, props); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateTextureWithProperties failed"); + } + return result; + } + + /// + /// Get the properties associated with a texture. + /// + /// the texture to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_TEXTURE_COLORSPACE_NUMBER: an SDL_Colorspace value describing + /// the texture colorspace. + /// - SDL_PROP_TEXTURE_FORMAT_NUMBER: one of the enumerated values in + /// SDL_PixelFormat. + /// - SDL_PROP_TEXTURE_ACCESS_NUMBER: one of the enumerated values in + /// SDL_TextureAccess. + /// - SDL_PROP_TEXTURE_WIDTH_NUMBER: the width of the texture in pixels. + /// - SDL_PROP_TEXTURE_HEIGHT_NUMBER: the height of the texture in pixels. + /// - SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT: for HDR10 and floating point + /// textures, this defines the value of 100% diffuse white, with higher + /// values being displayed in the High Dynamic Range headroom. This defaults + /// to 100 for HDR10 textures and 1.0 for other textures. + /// - SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT: for HDR10 and floating point + /// textures, this defines the maximum dynamic range used by the content, in + /// terms of the SDR white point. If this is defined, any values outside the + /// range supported by the display will be scaled into the available HDR + /// headroom, otherwise they are clipped. This defaults to 1.0 for SDR + /// textures, 4.0 for HDR10 textures, and no default for floating point + /// textures. + /// + /// + /// With the direct3d11 renderer: + /// + /// + /// - SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER: the ID3D11Texture2D associated + /// with the texture + /// - SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER: the ID3D11Texture2D + /// associated with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER: the ID3D11Texture2D + /// associated with the V plane of a YUV texture + /// + /// + /// With the direct3d12 renderer: + /// + /// + /// - SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER: the ID3D12Resource associated + /// with the texture + /// - SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER: the ID3D12Resource associated + /// with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER: the ID3D12Resource associated + /// with the V plane of a YUV texture + /// + /// + /// With the vulkan renderer: + /// + /// + /// - SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER: the VkImage associated with the + /// texture + /// + /// + /// With the opengl renderer: + /// + /// + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER: the GLuint texture associated + /// with the texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER: the GLuint texture + /// associated with the UV plane of an NV12 texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER: the GLuint texture associated + /// with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER: the GLuint texture associated + /// with the V plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER: the GLenum for the + /// texture target (GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, etc) + /// - SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT: the texture coordinate width of + /// the texture (0.0 - 1.0) + /// - SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT: the texture coordinate height of + /// the texture (0.0 - 1.0) + /// + /// + /// With the opengles2 renderer: + /// + /// + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER: the GLuint texture + /// associated with the texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER: the GLuint texture + /// associated with the UV plane of an NV12 texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER: the GLuint texture + /// associated with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER: the GLuint texture + /// associated with the V plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER: the GLenum for the + /// texture target (GL_TEXTURE_2D, GL_TEXTURE_EXTERNAL_OES, etc) + /// + /// + /// With the gpu renderer: + /// + /// + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER: the SDL_GPUTexture associated + /// with the texture + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER: the SDL_GPUTexture associated + /// with the UV plane of an NV12 texture + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER: the SDL_GPUTexture associated + /// with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER: the SDL_GPUTexture associated + /// with the V plane of a YUV texture + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetTextureProperties(SdlTexture texture) => PInvoke.GetTextureProperties(texture); + + /// + /// Ergonomic wrapper over SDL_GetRendererFromTexture. + /// + /// the texture to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlRenderer GetRendererFromTexture(SdlTexture texture) => + PInvoke.GetRendererFromTexture(texture); + + /// + /// Get the size of a texture, as floating point values. + /// + /// the texture to query. + /// + /// a pointer filled in with the width of the texture in pixels. This + /// argument can be NULL if you don't need this information. + /// + /// + /// a pointer filled in with the height of the texture in pixels. This + /// argument can be NULL if you don't need this information. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GetTextureSize(SdlTexture texture, out float w, out float h) + { + w = default; + h = default; + fixed (float* wPtr = &w) + { + fixed (float* hPtr = &h) + { + return PInvoke.GetTextureSize(texture, wPtr, hPtr) != 0; + } + } + } + + /// + /// Set the palette used by a texture. + /// + /// the texture to update. + /// the SDL_Palette structure to use. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Setting the palette keeps an internal reference to the palette, which can + /// be safely destroyed afterwards. + /// + /// + /// A single palette can be shared with many textures. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + public static bool SetTexturePalette(SdlTexture texture, SdlPalette* palette) => + PInvoke.SetTexturePalette(texture, palette) != 0; + + /// + /// Set an additional color value multiplied into render copy operations. + /// + /// the texture to update. + /// the red color value multiplied into copy operations. + /// the green color value multiplied into copy operations. + /// the blue color value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation each source color + /// channel is modulated by the appropriate color value according to the + /// following formula: + /// + /// + /// srcC = srcC * (color / 255) + /// + /// + /// Color modulation is not always supported by the renderer; it will return + /// false if color modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetTextureColorMod(SdlTexture texture, byte r, byte g, byte b) => + PInvoke.SetTextureColorMod(texture, r, g, b) != 0; + + /// + /// Set an additional color value multiplied into render copy operations. + /// + /// the texture to update. + /// the red color value multiplied into copy operations. + /// the green color value multiplied into copy operations. + /// the blue color value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation each source color + /// channel is modulated by the appropriate color value according to the + /// following formula: + /// + /// + /// srcC = srcC * color + /// + /// + /// Color modulation is not always supported by the renderer; it will return + /// false if color modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetTextureColorModFloat(SdlTexture texture, float r, float g, float b) => + PInvoke.SetTextureColorModFloat(texture, r, g, b) != 0; + + /// + /// Get the additional color value multiplied into render copy operations. + /// + /// the texture to query. + /// a pointer filled in with the current red color value. + /// a pointer filled in with the current green color value. + /// a pointer filled in with the current blue color value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GetTextureColorMod(SdlTexture texture, out byte r, out byte g, out byte b) + { + r = default; + g = default; + b = default; + fixed (byte* rPtr = &r) + { + fixed (byte* gPtr = &g) + { + fixed (byte* bPtr = &b) + { + return PInvoke.GetTextureColorMod(texture, rPtr, gPtr, bPtr) != 0; + } + } + } + } + + /// + /// Get the additional color value multiplied into render copy operations. + /// + /// the texture to query. + /// a pointer filled in with the current red color value. + /// a pointer filled in with the current green color value. + /// a pointer filled in with the current blue color value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GetTextureColorModFloat(SdlTexture texture, out float r, out float g, out float b) + { + r = default; + g = default; + b = default; + fixed (float* rPtr = &r) + { + fixed (float* gPtr = &g) + { + fixed (float* bPtr = &b) + { + return PInvoke.GetTextureColorModFloat(texture, rPtr, gPtr, bPtr) != 0; + } + } + } + } + + /// + /// Set an additional alpha value multiplied into render copy operations. + /// + /// the texture to update. + /// the source alpha value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation the source alpha + /// value is modulated by this alpha value according to the following formula: + /// + /// + /// srcA = srcA * (alpha / 255) + /// + /// + /// Alpha modulation is not always supported by the renderer; it will return + /// false if alpha modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetTextureAlphaMod(SdlTexture texture, byte alpha) => + PInvoke.SetTextureAlphaMod(texture, alpha) != 0; + + /// + /// Set an additional alpha value multiplied into render copy operations. + /// + /// the texture to update. + /// the source alpha value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation the source alpha + /// value is modulated by this alpha value according to the following formula: + /// + /// + /// srcA = srcA * alpha + /// + /// + /// Alpha modulation is not always supported by the renderer; it will return + /// false if alpha modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetTextureAlphaModFloat(SdlTexture texture, float alpha) => + PInvoke.SetTextureAlphaModFloat(texture, alpha) != 0; + + /// + /// Get the additional alpha value multiplied into render copy operations. + /// + /// the texture to query. + /// a pointer filled in with the current alpha value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GetTextureAlphaMod(SdlTexture texture, out byte alpha) + { + alpha = default; + fixed (byte* alphaPtr = &alpha) + { + return PInvoke.GetTextureAlphaMod(texture, alphaPtr) != 0; + } + } + + /// + /// Get the additional alpha value multiplied into render copy operations. + /// + /// the texture to query. + /// a pointer filled in with the current alpha value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GetTextureAlphaModFloat(SdlTexture texture, out float alpha) + { + alpha = default; + fixed (float* alphaPtr = &alpha) + { + return PInvoke.GetTextureAlphaModFloat(texture, alphaPtr) != 0; + } + } + + /// + /// Set the blend mode for a texture, used by SDL_RenderTexture(). + /// + /// the texture to update. + /// the SDL_BlendMode to use for texture blending. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the blend mode is not supported, the closest supported mode is chosen + /// and this function returns false. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetTextureBlendMode(SdlTexture texture, uint blendMode) => + PInvoke.SetTextureBlendMode(texture, blendMode) != 0; + + /// + /// Get the blend mode used for texture copy operations. + /// + /// the texture to query. + /// a pointer filled in with the current SDL_BlendMode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetTextureBlendMode(SdlTexture texture, uint* blendMode) => + PInvoke.GetTextureBlendMode(texture, blendMode) != 0; + + /// + /// Set the scale mode used for texture scale operations. + /// + /// the texture to update. + /// the SDL_ScaleMode to use for texture scaling. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The default texture scale mode is SDL_SCALEMODE_LINEAR. + /// + /// + /// If the scale mode is not supported, the closest supported mode is chosen. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetTextureScaleMode(SdlTexture texture, SdlScaleMode scaleMode) => + PInvoke.SetTextureScaleMode(texture, scaleMode) != 0; + + /// + /// Get the scale mode used for texture scale operations. + /// + /// the texture to query. + /// a pointer filled in with the current scale mode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetTextureScaleMode(SdlTexture texture, out SdlScaleMode scaleMode) + { + scaleMode = default; + fixed (SdlScaleMode* scaleModePtr = &scaleMode) + { + return PInvoke.GetTextureScaleMode(texture, scaleModePtr) != 0; + } + } + + /// + /// Update the given texture rectangle with new pixel data. + /// + /// the texture to update. + /// + /// an SDL_Rect structure representing the area to update, or NULL + /// to update the entire texture. + /// + /// the raw pixel data in the format of the texture. + /// + /// the number of bytes in a row of pixel data, including padding + /// between lines. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixel data must be in the pixel format of the texture, which can be + /// queried using the SDL_PROP_TEXTURE_FORMAT_NUMBER property. + /// + /// + /// This is a fairly slow function, intended for use with static textures that + /// do not change often. + /// + /// + /// If the texture is intended to be updated often, it is preferred to create + /// the texture as streaming and use the locking functions referenced below. + /// While this function will work with streaming textures, for optimization + /// reasons you may not get the pixels back if you lock the texture afterward. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool UpdateTexture(SdlTexture texture, SdlRect* rect, void* pixels, int pitch) => + PInvoke.UpdateTexture(texture, rect, pixels, pitch) != 0; + + /// + /// Update a rectangle within a planar YV12 or IYUV texture with new pixel + /// data. + /// + /// the texture to update. + /// + /// a pointer to the rectangle of pixels to update, or NULL to + /// update the entire texture. + /// + /// the raw pixel data for the Y plane. + /// + /// the number of bytes between rows of pixel data for the Y + /// plane. + /// + /// the raw pixel data for the U plane. + /// + /// the number of bytes between rows of pixel data for the U + /// plane. + /// + /// the raw pixel data for the V plane. + /// + /// the number of bytes between rows of pixel data for the V + /// plane. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You can use SDL_UpdateTexture() as long as your pixel data is a contiguous + /// block of Y and U/V planes in the proper order, but this function is + /// available if your pixel data is not contiguous. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool UpdateYUVTexture( + SdlTexture texture, + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* Uplane, + int Upitch, + byte* Vplane, + int Vpitch + ) => PInvoke.UpdateYUVTexture(texture, rect, Yplane, Ypitch, Uplane, Upitch, Vplane, Vpitch) != 0; + + /// + /// Update a rectangle within a planar NV12 or NV21 texture with new pixels. + /// + /// the texture to update. + /// + /// a pointer to the rectangle of pixels to update, or NULL to + /// update the entire texture. + /// + /// the raw pixel data for the Y plane. + /// + /// the number of bytes between rows of pixel data for the Y + /// plane. + /// + /// the raw pixel data for the UV plane. + /// + /// the number of bytes between rows of pixel data for the UV + /// plane. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You can use SDL_UpdateTexture() as long as your pixel data is a contiguous + /// block of NV12/21 planes in the proper order, but this function is available + /// if your pixel data is not contiguous. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool UpdateNVTexture( + SdlTexture texture, + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* UVplane, + int UVpitch + ) => PInvoke.UpdateNVTexture(texture, rect, Yplane, Ypitch, UVplane, UVpitch) != 0; + + /// + /// Lock a portion of the texture for write-only pixel access. + /// + /// + /// the texture to lock for access, which was created with + /// SDL_TEXTUREACCESS_STREAMING. + /// + /// + /// an SDL_Rect structure representing the area to lock for access; + /// NULL to lock the entire texture. + /// + /// + /// this is filled in with a pointer to the locked pixels, + /// appropriately offset by the locked area. + /// + /// + /// this is filled in with the pitch of the locked pixels; the + /// pitch is the length of one row in bytes. + /// + /// + /// true on success or false if the texture is not valid or was not + /// created with SDL_TEXTUREACCESS_STREAMING; call SDL_GetError() + /// for more information. + /// + /// + /// + /// As an optimization, the pixels made available for editing don't necessarily + /// contain the old texture data. This is a write-only operation, and if you + /// need to keep a copy of the texture data you should do that at the + /// application level. + /// + /// + /// You must use SDL_UnlockTexture() to unlock the pixels and apply any + /// changes. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool LockTexture(SdlTexture texture, SdlRect* rect, void** pixels, out int pitch) + { + pitch = default; + fixed (int* pitchPtr = &pitch) + { + return PInvoke.LockTexture(texture, rect, pixels, pitchPtr) != 0; + } + } + + /// + /// Lock a portion of the texture for write-only pixel access, and expose + /// it as a SDL surface. + /// + /// + /// the texture to lock for access, which must be created with + /// SDL_TEXTUREACCESS_STREAMING. + /// + /// + /// a pointer to the rectangle to lock for access. If the rect is + /// NULL, the entire texture will be locked. + /// + /// + /// a pointer to an SDL surface of size rect. Don't assume + /// any specific pixel content. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Besides providing an SDL_Surface instead of raw pixel data, this function + /// operates like SDL_LockTexture. + /// + /// + /// As an optimization, the pixels made available for editing don't necessarily + /// contain the old texture data. This is a write-only operation, and if you + /// need to keep a copy of the texture data you should do that at the + /// application level. + /// + /// + /// You must use SDL_UnlockTexture() to unlock the pixels and apply any + /// changes. + /// + /// + /// The returned surface is freed internally after calling SDL_UnlockTexture() + /// or SDL_DestroyTexture(). The caller should not free it. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool LockTextureToSurface(SdlTexture texture, SdlRect* rect, SdlSurface** surface) => + PInvoke.LockTextureToSurface(texture, rect, surface) != 0; + + /// + /// Unlock a texture, uploading the changes to video memory, if needed. + /// + /// a texture locked by SDL_LockTexture(). + /// + /// + /// Warning: Please note that SDL_LockTexture() is intended to be + /// write-only; it will not guarantee the previous contents of the texture will + /// be provided. You must fully initialize any area of a texture that you lock + /// before unlocking it, as the pixels might otherwise be uninitialized memory. + /// + /// + /// Which is to say: locking and immediately unlocking a texture can result in + /// corrupted textures, depending on the renderer in use. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void UnlockTexture(SdlTexture texture) => PInvoke.UnlockTexture(texture); + + /// + /// Set a texture as the current rendering target. + /// + /// the rendering context. + /// + /// the targeted texture, which must be created with the + /// SDL_TEXTUREACCESS_TARGET flag, or NULL to render to the + /// window instead of a texture. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The default render target is the window for which the renderer was created. + /// To stop rendering to a texture and render to the window again, call this + /// function with a NULL texture. + /// + /// + /// Viewport, cliprect, scale, and logical presentation are unique to each + /// render target. Get and set functions for these states apply to the current + /// render target set by this function, and those states persist on each target + /// when the current render target changes. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetRenderTarget(SdlRenderer renderer, SdlTexture texture) => + PInvoke.SetRenderTarget(renderer, texture) != 0; + + /// + /// Ergonomic wrapper over SDL_GetRenderTarget. + /// + /// the rendering context. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlTexture GetRenderTarget(SdlRenderer renderer) => PInvoke.GetRenderTarget(renderer); + + /// + /// Set a device-independent resolution and presentation mode for rendering. + /// + /// the rendering context. + /// the width of the logical resolution. + /// the height of the logical resolution. + /// the presentation mode used. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets the width and height of the logical rendering output. + /// The renderer will act as if the current render target is always the + /// requested dimensions, scaling to the actual resolution as necessary. + /// + /// + /// This can be useful for games that expect a fixed size, but would like to + /// scale the output to whatever is available, regardless of how a user resizes + /// a window, or if the display is high DPI. + /// + /// + /// Logical presentation can be used with both render target textures and the + /// renderer's window; the state is unique to each render target, and this + /// function sets the state for the current render target. It might be useful + /// to draw to a texture that matches the window dimensions with logical + /// presentation enabled, and then draw that texture across the entire window + /// with logical presentation disabled. Be careful not to render both with + /// logical presentation enabled, however, as this could produce + /// double-letterboxing, etc. + /// + /// + /// You can disable logical coordinates by setting the mode to + /// SDL_LOGICAL_PRESENTATION_DISABLED, and in that case you get the full pixel + /// resolution of the render target; it is safe to toggle logical presentation + /// during the rendering of a frame: perhaps most of the rendering is done to + /// specific dimensions but to make fonts look sharp, the app turns off logical + /// presentation while drawing text, for example. + /// + /// + /// You can convert coordinates in an event into rendering coordinates using + /// SDL_ConvertEventToRenderCoordinates(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetRenderLogicalPresentation( + SdlRenderer renderer, + int w, + int h, + SdlRendererLogicalPresentation mode + ) => PInvoke.SetRenderLogicalPresentation(renderer, w, h, mode) != 0; + + /// + /// Get device independent resolution and presentation mode for rendering. + /// + /// the rendering context. + /// an int filled with the logical presentation width. + /// an int filled with the logical presentation height. + /// + /// a variable filled with the logical presentation mode being + /// used. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function gets the width and height of the logical rendering output, or + /// 0 if a logical resolution is not enabled. + /// + /// + /// Each render target has its own logical presentation state. This function + /// gets the state for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderLogicalPresentation( + SdlRenderer renderer, + out int w, + out int h, + out SdlRendererLogicalPresentation mode + ) + { + w = default; + h = default; + mode = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + fixed (SdlRendererLogicalPresentation* modePtr = &mode) + { + return PInvoke.GetRenderLogicalPresentation(renderer, wPtr, hPtr, modePtr) != 0; + } + } + } + } + + /// + /// Get the final presentation rectangle for rendering. + /// + /// the rendering context. + /// + /// a pointer filled in with the final presentation rectangle, may + /// be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function returns the calculated rectangle used for logical + /// presentation, based on the presentation mode and output size. If logical + /// presentation is disabled, it will fill the rectangle with the output size, + /// in pixels. + /// + /// + /// Each render target has its own logical presentation state. This function + /// gets the rectangle for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderLogicalPresentationRect(SdlRenderer renderer, SdlFRect* rect) => + PInvoke.GetRenderLogicalPresentationRect(renderer, rect) != 0; + + /// + /// Get a point in render coordinates when given a point in window coordinates. + /// + /// the rendering context. + /// the x coordinate in window coordinates. + /// the y coordinate in window coordinates. + /// a pointer filled with the x coordinate in render coordinates. + /// a pointer filled with the y coordinate in render coordinates. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This takes into account several states: + /// + /// + /// - The window dimensions. + /// - The logical presentation settings (SDL_SetRenderLogicalPresentation) + /// - The scale (SDL_SetRenderScale) + /// - The viewport (SDL_SetRenderViewport) + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderCoordinatesFromWindow( + SdlRenderer renderer, + float window_x, + float window_y, + out float x, + out float y + ) + { + x = default; + y = default; + fixed (float* xPtr = &x) + { + fixed (float* yPtr = &y) + { + return PInvoke.RenderCoordinatesFromWindow(renderer, window_x, window_y, xPtr, yPtr) != 0; + } + } + } + + /// + /// Get a point in window coordinates when given a point in render coordinates. + /// + /// the rendering context. + /// the x coordinate in render coordinates. + /// the y coordinate in render coordinates. + /// + /// a pointer filled with the x coordinate in window + /// coordinates. + /// + /// + /// a pointer filled with the y coordinate in window + /// coordinates. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This takes into account several states: + /// + /// + /// - The window dimensions. + /// - The logical presentation settings (SDL_SetRenderLogicalPresentation) + /// - The scale (SDL_SetRenderScale) + /// - The viewport (SDL_SetRenderViewport) + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool RenderCoordinatesToWindow( + SdlRenderer renderer, + float x, + float y, + out float window_x, + out float window_y + ) + { + window_x = default; + window_y = default; + fixed (float* window_xPtr = &window_x) + { + fixed (float* window_yPtr = &window_y) + { + return PInvoke.RenderCoordinatesToWindow(renderer, x, y, window_xPtr, window_yPtr) != 0; + } + } + } + + /// + /// Convert the coordinates in an event to render coordinates. + /// + /// the rendering context. + /// the event to modify. + /// + /// true if the event is converted or doesn't need conversion, or + /// false on failure; call SDL_GetError() for more information. + /// + /// + /// + /// This takes into account several states: + /// + /// + /// - The window dimensions. + /// - The logical presentation settings (SDL_SetRenderLogicalPresentation) + /// - The scale (SDL_SetRenderScale) + /// - The viewport (SDL_SetRenderViewport) + /// + /// + /// Various event types are converted with this function: mouse, touch, pen, + /// etc. + /// + /// + /// Touch coordinates are converted from normalized coordinates in the window + /// to non-normalized rendering coordinates. + /// + /// + /// Relative mouse coordinates (xrel and yrel event fields) are also + /// converted. Applications that do not want these fields converted should use + /// SDL_RenderCoordinatesFromWindow() on the specific event fields instead of + /// converting the entire event structure. + /// + /// + /// Once converted, coordinates may be outside the rendering area. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool ConvertEventToRenderCoordinates(SdlRenderer renderer, SdlEvent* @event) => + PInvoke.ConvertEventToRenderCoordinates(renderer, @event) != 0; + + /// + /// Set the drawing area for rendering on the current target. + /// + /// the rendering context. + /// + /// the SDL_Rect structure representing the drawing area, or NULL + /// to set the viewport to the entire target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Drawing will clip to this area (separately from any clipping done with + /// SDL_SetRenderClipRect), and the top left of the area will become coordinate + /// (0, 0) for future drawing commands. + /// + /// + /// The area's width and height must be >= 0. + /// + /// + /// Each render target has its own viewport. This function sets the viewport + /// for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetRenderViewport(SdlRenderer renderer, SdlRect* rect) => + PInvoke.SetRenderViewport(renderer, rect) != 0; + + /// + /// Get the drawing area for the current target. + /// + /// the rendering context. + /// an SDL_Rect structure filled in with the current drawing area. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own viewport. This function gets the viewport + /// for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetRenderViewport(SdlRenderer renderer, SdlRect* rect) => + PInvoke.GetRenderViewport(renderer, rect) != 0; + + /// + /// Return whether an explicit rectangle was set as the viewport. + /// + /// the rendering context. + /// + /// true if the viewport was set to a specific rectangle, or false if + /// it was set to NULL (the entire target). + /// + /// + /// + /// This is useful if you're saving and restoring the viewport and want to know + /// whether you should restore a specific rectangle or NULL. + /// + /// + /// Each render target has its own viewport. This function checks the viewport + /// for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderViewportSet(SdlRenderer renderer) => PInvoke.RenderViewportSet(renderer) != 0; + + /// + /// Get the safe area for rendering within the current viewport. + /// + /// the rendering context. + /// + /// a pointer filled in with the area that is safe for interactive + /// content. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Some devices have portions of the screen which are partially obscured or + /// not interactive, possibly due to on-screen controls, curved edges, camera + /// notches, TV overscan, etc. This function provides the area of the current + /// viewport which is safe to have interactible content. You should continue + /// rendering into the rest of the render target, but it should not contain + /// visually important or interactible content. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GetRenderSafeArea(SdlRenderer renderer, SdlRect* rect) => + PInvoke.GetRenderSafeArea(renderer, rect) != 0; + + /// + /// Set the clip rectangle for rendering on the specified target. + /// + /// the rendering context. + /// + /// an SDL_Rect structure representing the clip area, relative to + /// the viewport, or NULL to disable clipping. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own clip rectangle. This function sets the + /// cliprect for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetRenderClipRect(SdlRenderer renderer, SdlRect* rect) => + PInvoke.SetRenderClipRect(renderer, rect) != 0; + + /// + /// Get the clip rectangle for the current target. + /// + /// the rendering context. + /// + /// an SDL_Rect structure filled in with the current clipping area + /// or an empty rectangle if clipping is disabled. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own clip rectangle. This function gets the + /// cliprect for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetRenderClipRect(SdlRenderer renderer, SdlRect* rect) => + PInvoke.GetRenderClipRect(renderer, rect) != 0; + + /// + /// Get whether clipping is enabled on the given render target. + /// + /// the rendering context. + /// + /// true if clipping is enabled or false if not; call SDL_GetError() + /// for more information. + /// + /// + /// + /// Each render target has its own clip rectangle. This function checks the + /// cliprect for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderClipEnabled(SdlRenderer renderer) => PInvoke.RenderClipEnabled(renderer) != 0; + + /// + /// Set the drawing scale for rendering on the current target. + /// + /// the rendering context. + /// the horizontal scaling factor. + /// the vertical scaling factor. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The drawing coordinates are scaled by the x/y scaling factors before they + /// are used by the renderer. This allows resolution independent drawing with a + /// single coordinate system. + /// + /// + /// If this results in scaling or subpixel drawing by the rendering backend, it + /// will be handled using the appropriate quality hints. For best results use + /// integer scaling factors. + /// + /// + /// Each render target has its own scale. This function sets the scale for the + /// current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetRenderScale(SdlRenderer renderer, float scaleX, float scaleY) => + PInvoke.SetRenderScale(renderer, scaleX, scaleY) != 0; + + /// + /// Get the drawing scale for the current target. + /// + /// the rendering context. + /// a pointer filled in with the horizontal scaling factor. + /// a pointer filled in with the vertical scaling factor. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own scale. This function gets the scale for the + /// current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderScale(SdlRenderer renderer, out float scaleX, out float scaleY) + { + scaleX = default; + scaleY = default; + fixed (float* scaleXPtr = &scaleX) + { + fixed (float* scaleYPtr = &scaleY) + { + return PInvoke.GetRenderScale(renderer, scaleXPtr, scaleYPtr) != 0; + } + } + } + + /// + /// Set the color used for drawing operations. + /// + /// the rendering context. + /// the red value used to draw on the rendering target. + /// the green value used to draw on the rendering target. + /// the blue value used to draw on the rendering target. + /// + /// the alpha value used to draw on the rendering target; usually + /// SDL_ALPHA_OPAQUE (255). Use SDL_SetRenderDrawBlendMode to + /// specify how the alpha channel is used. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Set the color for drawing or filling rectangles, lines, and points, and for + /// SDL_RenderClear(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetRenderDrawColor(SdlRenderer renderer, byte r, byte g, byte b, byte a) => + PInvoke.SetRenderDrawColor(renderer, r, g, b, a) != 0; + + /// + /// Set the color used for drawing operations (Rect, Line and Clear). + /// + /// the rendering context. + /// the red value used to draw on the rendering target. + /// the green value used to draw on the rendering target. + /// the blue value used to draw on the rendering target. + /// + /// the alpha value used to draw on the rendering target. Use + /// SDL_SetRenderDrawBlendMode to specify how the alpha channel is + /// used. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Set the color for drawing or filling rectangles, lines, and points, and for + /// SDL_RenderClear(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetRenderDrawColorFloat(SdlRenderer renderer, float r, float g, float b, float a) => + PInvoke.SetRenderDrawColorFloat(renderer, r, g, b, a) != 0; + + /// + /// Get the color used for drawing operations (Rect, Line and Clear). + /// + /// the rendering context. + /// + /// a pointer filled in with the red value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the green value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the blue value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the alpha value used to draw on the + /// rendering target; usually SDL_ALPHA_OPAQUE (255). + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetRenderDrawColor(SdlRenderer renderer, out byte r, out byte g, out byte b, out byte a) + { + r = default; + g = default; + b = default; + a = default; + fixed (byte* rPtr = &r) + { + fixed (byte* gPtr = &g) + { + fixed (byte* bPtr = &b) + { + fixed (byte* aPtr = &a) + { + return PInvoke.GetRenderDrawColor(renderer, rPtr, gPtr, bPtr, aPtr) != 0; + } + } + } + } + } + + /// + /// Get the color used for drawing operations (Rect, Line and Clear). + /// + /// the rendering context. + /// + /// a pointer filled in with the red value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the green value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the blue value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the alpha value used to draw on the + /// rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetRenderDrawColorFloat( + SdlRenderer renderer, + out float r, + out float g, + out float b, + out float a + ) + { + r = default; + g = default; + b = default; + a = default; + fixed (float* rPtr = &r) + { + fixed (float* gPtr = &g) + { + fixed (float* bPtr = &b) + { + fixed (float* aPtr = &a) + { + return PInvoke.GetRenderDrawColorFloat(renderer, rPtr, gPtr, bPtr, aPtr) != 0; + } + } + } + } + } + + /// + /// Set the color scale used for render operations. + /// + /// the rendering context. + /// the color scale value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The color scale is an additional scale multiplied into the pixel color + /// value while rendering. This can be used to adjust the brightness of colors + /// during HDR rendering, or changing HDR video brightness when playing on an + /// SDR display. + /// + /// + /// The color scale does not affect the alpha channel, only the color + /// brightness. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetRenderColorScale(SdlRenderer renderer, float scale) => + PInvoke.SetRenderColorScale(renderer, scale) != 0; + + /// + /// Get the color scale used for render operations. + /// + /// the rendering context. + /// a pointer filled in with the current color scale value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderColorScale(SdlRenderer renderer, out float scale) + { + scale = default; + fixed (float* scalePtr = &scale) + { + return PInvoke.GetRenderColorScale(renderer, scalePtr) != 0; + } + } + + /// + /// Set the blend mode used for drawing operations (Fill and Line). + /// + /// the rendering context. + /// the SDL_BlendMode to use for blending. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the blend mode is not supported, the closest supported mode is chosen. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetRenderDrawBlendMode(SdlRenderer renderer, uint blendMode) => + PInvoke.SetRenderDrawBlendMode(renderer, blendMode) != 0; + + /// + /// Get the blend mode used for drawing operations. + /// + /// the rendering context. + /// a pointer filled in with the current SDL_BlendMode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderDrawBlendMode(SdlRenderer renderer, uint* blendMode) => + PInvoke.GetRenderDrawBlendMode(renderer, blendMode) != 0; + + /// + /// Clear the current rendering target with the drawing color. + /// + /// the rendering context. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function clears the entire rendering target, ignoring the viewport and + /// the clip rectangle. Note, that clearing will also set/fill all pixels of + /// the rendering target to current renderer draw color, so make sure to invoke + /// SDL_SetRenderDrawColor() when needed. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderClear(SdlRenderer renderer) => PInvoke.RenderClear(renderer) != 0; + + /// + /// Draw a point on the current rendering target at subpixel precision. + /// + /// the renderer which should draw a point. + /// the x coordinate of the point. + /// the y coordinate of the point. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderPoint(SdlRenderer renderer, float x, float y) => + PInvoke.RenderPoint(renderer, x, y) != 0; + + /// + /// Draw multiple points on the current rendering target at subpixel precision. + /// + /// the renderer which should draw multiple points. + /// the points to draw. + /// the number of points to draw. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderPoints(SdlRenderer renderer, SdlFPoint* points, int count) => + PInvoke.RenderPoints(renderer, points, count) != 0; + + /// + /// Draw a line on the current rendering target at subpixel precision. + /// + /// the renderer which should draw a line. + /// the x coordinate of the start point. + /// the y coordinate of the start point. + /// the x coordinate of the end point. + /// the y coordinate of the end point. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderLine(SdlRenderer renderer, float x1, float y1, float x2, float y2) => + PInvoke.RenderLine(renderer, x1, y1, x2, y2) != 0; + + /// + /// Draw a series of connected lines on the current rendering target at + /// subpixel precision. + /// + /// the renderer which should draw multiple lines. + /// the points along the lines. + /// the number of points, drawing count-1 lines. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderLines(SdlRenderer renderer, SdlFPoint* points, int count) => + PInvoke.RenderLines(renderer, points, count) != 0; + + /// + /// Draw a rectangle on the current rendering target at subpixel precision. + /// + /// the renderer which should draw a rectangle. + /// + /// a pointer to the destination rectangle, or NULL to outline the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderRect(SdlRenderer renderer, SdlFRect* rect) => + PInvoke.RenderRect(renderer, rect) != 0; + + /// + /// Draw some number of rectangles on the current rendering target at subpixel + /// precision. + /// + /// the renderer which should draw multiple rectangles. + /// a pointer to an array of destination rectangles. + /// the number of rectangles. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderRects(SdlRenderer renderer, SdlFRect* rects, int count) => + PInvoke.RenderRects(renderer, rects, count) != 0; + + /// + /// Fill a rectangle on the current rendering target with the drawing color at + /// subpixel precision. + /// + /// the renderer which should fill a rectangle. + /// + /// a pointer to the destination rectangle, or NULL for the entire + /// rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderFillRect(SdlRenderer renderer, SdlFRect* rect) => + PInvoke.RenderFillRect(renderer, rect) != 0; + + /// + /// Fill some number of rectangles on the current rendering target with the + /// drawing color at subpixel precision. + /// + /// the renderer which should fill multiple rectangles. + /// a pointer to an array of destination rectangles. + /// the number of rectangles. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderFillRects(SdlRenderer renderer, SdlFRect* rects, int count) => + PInvoke.RenderFillRects(renderer, rects, count) != 0; + + /// + /// Copy a portion of the texture to the current rendering target at subpixel + /// precision. + /// + /// the renderer which should copy parts of a texture. + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderTexture( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect + ) => PInvoke.RenderTexture(renderer, texture, srcrect, dstrect) != 0; + + /// + /// Copy a portion of the source texture to the current rendering target, with + /// rotation and flipping, at subpixel precision. + /// + /// the renderer which should copy parts of a texture. + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// an angle in degrees that indicates the rotation that will be + /// applied to dstrect, rotating it in a clockwise direction. + /// + /// + /// a pointer to a point indicating the point around which + /// dstrect will be rotated (if NULL, rotation will be done + /// around dstrect.w/2, dstrect.h/2). + /// + /// + /// an SDL_FlipMode value stating which flipping actions should be + /// performed on the texture. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderTextureRotated( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect, + double angle, + SdlFPoint* center, + SdlFlipMode flip + ) => PInvoke.RenderTextureRotated(renderer, texture, srcrect, dstrect, angle, center, flip) != 0; + + /// + /// Copy a portion of the source texture to the current rendering target, with + /// affine transform, at subpixel precision. + /// + /// the renderer which should copy parts of a texture. + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// a pointer to a point indicating where the top-left corner of + /// srcrect should be mapped to, or NULL for the rendering + /// target's origin. + /// + /// + /// a pointer to a point indicating where the top-right corner of + /// srcrect should be mapped to, or NULL for the rendering + /// target's top-right corner. + /// + /// + /// a pointer to a point indicating where the bottom-left corner of + /// srcrect should be mapped to, or NULL for the rendering target's + /// bottom-left corner. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// You may only call this function from the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderTextureAffine( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFPoint* origin, + SdlFPoint* right, + SdlFPoint* down + ) => PInvoke.RenderTextureAffine(renderer, texture, srcrect, origin, right, down) != 0; + + /// + /// Tile a portion of the texture to the current rendering target at subpixel + /// precision. + /// + /// the renderer which should copy parts of a texture. + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// the scale used to transform srcrect into the destination + /// rectangle, e.g. a 32x32 texture with a scale of 2 would fill + /// 64x64 tiles. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixels in srcrect will be repeated as many times as needed to + /// completely fill dstrect. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool RenderTextureTiled( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float scale, + SdlFRect* dstrect + ) => PInvoke.RenderTextureTiled(renderer, texture, srcrect, scale, dstrect) != 0; + + /// + /// Perform a scaled copy using the 9-grid algorithm to the current rendering + /// target at subpixel precision. + /// + /// the renderer which should copy parts of a texture. + /// the source texture. + /// + /// the SDL_Rect structure representing the rectangle to be used + /// for the 9-grid, or NULL to use the entire texture. + /// + /// the width, in pixels, of the left corners in srcrect. + /// the width, in pixels, of the right corners in srcrect. + /// the height, in pixels, of the top corners in srcrect. + /// + /// the height, in pixels, of the bottom corners in + /// srcrect. + /// + /// + /// the scale used to transform the corner of srcrect into the + /// corner of dstrect, or 0.0f for an unscaled copy. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixels in the texture are split into a 3x3 grid, using the different + /// corner sizes for each corner, and the sides and center making up the + /// remaining pixels. The corners are then scaled using scale and fit into + /// the corners of the destination rectangle. The sides and center are then + /// stretched into place to cover the remaining destination rectangle. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderTexture9Grid( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect + ) => + PInvoke.RenderTexture9Grid( + renderer, + texture, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + dstrect + ) != 0; + + /// + /// Perform a scaled copy using the 9-grid algorithm to the current rendering + /// target at subpixel precision. + /// + /// the renderer which should copy parts of a texture. + /// the source texture. + /// + /// the SDL_Rect structure representing the rectangle to be used + /// for the 9-grid, or NULL to use the entire texture. + /// + /// the width, in pixels, of the left corners in srcrect. + /// the width, in pixels, of the right corners in srcrect. + /// the height, in pixels, of the top corners in srcrect. + /// + /// the height, in pixels, of the bottom corners in + /// srcrect. + /// + /// + /// the scale used to transform the corner of srcrect into the + /// corner of dstrect, or 0.0f for an unscaled copy. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// the scale used to transform the borders and center of + /// srcrect into the borders and middle of dstrect, or + /// 1.0f for an unscaled copy. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixels in the texture are split into a 3x3 grid, using the different + /// corner sizes for each corner, and the sides and center making up the + /// remaining pixels. The corners are then scaled using scale and fit into + /// the corners of the destination rectangle. The sides and center are then + /// tiled into place to cover the remaining destination rectangle. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + public static bool RenderTexture9GridTiled( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect, + float tileScale + ) => + PInvoke.RenderTexture9GridTiled( + renderer, + texture, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + dstrect, + tileScale + ) != 0; + + /// + /// Render a list of triangles, optionally using a texture and indices into the + /// vertex array Color and alpha modulation is done per vertex + /// (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). + /// + /// the rendering context. + /// (optional) The SDL texture to use. + /// vertices. + /// number of vertices. + /// + /// (optional) An array of integer indices into the 'vertices' + /// array, if NULL all vertices will be rendered in sequential + /// order. + /// + /// number of indices. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderGeometry( + SdlRenderer renderer, + SdlTexture texture, + SdlVertex* vertices, + int num_vertices, + int* indices, + int num_indices + ) => PInvoke.RenderGeometry(renderer, texture, vertices, num_vertices, indices, num_indices) != 0; + + /// + /// Render a list of triangles, optionally using a texture and indices into the + /// vertex arrays Color and alpha modulation is done per vertex + /// (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). + /// + /// the rendering context. + /// (optional) The SDL texture to use. + /// vertex positions. + /// byte size to move from one element to the next element. + /// vertex colors (as SDL_FColor). + /// byte size to move from one element to the next element. + /// vertex normalized texture coordinates. + /// byte size to move from one element to the next element. + /// number of vertices. + /// + /// (optional) An array of indices into the 'vertices' arrays, + /// if NULL all vertices will be rendered in sequential order. + /// + /// number of indices. + /// index size: 1 (byte), 2 (short), 4 (int). + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool RenderGeometryRaw( + SdlRenderer renderer, + SdlTexture texture, + float* xy, + int xy_stride, + SdlFColor* color, + int color_stride, + float* uv, + int uv_stride, + int num_vertices, + void* indices, + int num_indices, + int size_indices + ) => + PInvoke.RenderGeometryRaw( + renderer, + texture, + xy, + xy_stride, + color, + color_stride, + uv, + uv_stride, + num_vertices, + indices, + num_indices, + size_indices + ) != 0; + + /// + /// Set the texture addressing mode used in SDL_RenderGeometry(). + /// + /// the rendering context. + /// + /// the SDL_TextureAddressMode to use for horizontal texture + /// coordinates in SDL_RenderGeometry(). + /// + /// + /// the SDL_TextureAddressMode to use for vertical texture + /// coordinates in SDL_RenderGeometry(). + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + /// + public static bool SetRenderTextureAddressMode( + SdlRenderer renderer, + SdlTextureAddressMode u_mode, + SdlTextureAddressMode v_mode + ) => PInvoke.SetRenderTextureAddressMode(renderer, u_mode, v_mode) != 0; + + /// + /// Get the texture addressing mode used in SDL_RenderGeometry(). + /// + /// the rendering context. + /// + /// a pointer filled in with the SDL_TextureAddressMode to use + /// for horizontal texture coordinates in SDL_RenderGeometry(), + /// may be NULL. + /// + /// + /// a pointer filled in with the SDL_TextureAddressMode to use + /// for vertical texture coordinates in SDL_RenderGeometry(), may + /// be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public static bool GetRenderTextureAddressMode( + SdlRenderer renderer, + out SdlTextureAddressMode u_mode, + out SdlTextureAddressMode v_mode + ) + { + u_mode = default; + v_mode = default; + fixed (SdlTextureAddressMode* u_modePtr = &u_mode) + { + fixed (SdlTextureAddressMode* v_modePtr = &v_mode) + { + return PInvoke.GetRenderTextureAddressMode(renderer, u_modePtr, v_modePtr) != 0; + } + } + } + + /// + /// Update the screen with any rendering performed since the previous call. + /// + /// the rendering context. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// SDL's rendering functions operate on a backbuffer; that is, calling a + /// rendering function such as SDL_RenderLine() does not directly put a line on + /// the screen, but rather updates the backbuffer. As such, you compose your + /// entire scene and present the composed backbuffer to the screen as a + /// complete picture. + /// + /// + /// Therefore, when using SDL's rendering API, one does all drawing intended + /// for the frame, and then calls this function once per frame to present the + /// final drawing to the user. + /// + /// + /// The backbuffer should be considered invalidated after each present; do not + /// assume that previous contents will exist between frames. You are strongly + /// encouraged to call SDL_RenderClear() to initialize the backbuffer before + /// starting each new frame's drawing, even if you plan to overwrite every + /// pixel. + /// + /// + /// Please note, that in case of rendering to a texture - there is no need + /// to call SDL_RenderPresent after drawing needed objects to a texture, and + /// should not be done; you are only required to change back the rendering + /// target to default via SDL_SetRenderTarget(renderer, NULL) afterwards, as + /// textures by themselves do not have a concept of backbuffers. Calling + /// SDL_RenderPresent while rendering to a texture will fail. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static bool RenderPresent(SdlRenderer renderer) => PInvoke.RenderPresent(renderer) != 0; + + /// + /// Destroy the specified texture. + /// + /// the texture to destroy. + /// + /// + /// Passing NULL or an otherwise invalid texture will set the SDL error message + /// to "Invalid texture". + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static void DestroyTexture(SdlTexture texture) => PInvoke.DestroyTexture(texture); + + /// + /// Destroy the rendering context for a window and free all associated + /// textures. + /// + /// the rendering context. + /// + /// + /// This should be called before destroying the associated window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void DestroyRenderer(SdlRenderer renderer) => PInvoke.DestroyRenderer(renderer); + + /// + /// Force the rendering context to flush any pending commands and state. + /// + /// the rendering context. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You do not need to (and in fact, shouldn't) call this function unless you + /// are planning to call into OpenGL/Direct3D/Metal/whatever directly, in + /// addition to using an SDL_Renderer. + /// + /// + /// This is for a very-specific case: if you are using SDL's render API, and + /// you plan to make OpenGL/D3D/whatever calls in addition to SDL render API + /// calls. If this applies, you should call this function between calls to + /// SDL's render API and the low-level API you're using in cooperation. + /// + /// + /// In all other cases, you can ignore this function. + /// + /// + /// This call makes SDL flush any pending rendering work it was queueing up to + /// do later in a single batch, and marks any internal cached state as invalid, + /// so it'll prepare all its state again later, from scratch. + /// + /// + /// This means you do not need to save state in your rendering code to protect + /// the SDL renderer. However, there lots of arbitrary pieces of Direct3D and + /// OpenGL state that can confuse things; you should use your best judgment and + /// be prepared to make changes if specific state needs to be protected. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool FlushRenderer(SdlRenderer renderer) => PInvoke.FlushRenderer(renderer) != 0; + + /// + /// Add a set of synchronization semaphores for the current frame. + /// + /// the rendering context. + /// the VkPipelineStageFlags for the wait. + /// + /// a VkSempahore to wait on before rendering the current + /// frame, or 0 if not needed. + /// + /// + /// a VkSempahore that SDL will signal when rendering + /// for the current frame is complete, or 0 if not + /// needed. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The Vulkan renderer will wait for wait_semaphore before submitting + /// rendering commands and signal signal_semaphore after rendering commands + /// are complete for this frame. + /// + /// + /// This should be called each frame that you want semaphore synchronization. + /// The Vulkan renderer may have multiple frames in flight on the GPU, so you + /// should have multiple semaphores that are used for synchronization. Querying + /// SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER will give you the + /// maximum number of semaphores you'll need. + /// + /// + /// + /// It is NOT safe to call this function from two threads at + /// once. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool AddVulkanRenderSemaphores( + SdlRenderer renderer, + uint wait_stage_mask, + long wait_semaphore, + long signal_semaphore + ) => PInvoke.AddVulkanRenderSemaphores(renderer, wait_stage_mask, wait_semaphore, signal_semaphore) != 0; + + /// + /// Toggle VSync of the given renderer. + /// + /// the renderer to toggle. + /// the vertical refresh sync interval. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When a renderer is created, vsync defaults to SDL_RENDERER_VSYNC_DISABLED. + /// + /// + /// The vsync parameter can be 1 to synchronize present with every vertical + /// refresh, 2 to synchronize present with every second vertical refresh, etc., + /// SDL_RENDERER_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or + /// SDL_RENDERER_VSYNC_DISABLED to disable. Not every value is supported by + /// every driver, so you should check the return value to see whether the + /// requested setting is supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetRenderVSync(SdlRenderer renderer, int vsync) => + PInvoke.SetRenderVSync(renderer, vsync) != 0; + + /// + /// Get VSync of the given renderer. + /// + /// the renderer to toggle. + /// + /// an int filled with the current vertical refresh sync interval. + /// See SDL_SetRenderVSync() for the meaning of the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetRenderVSync(SdlRenderer renderer, out int vsync) + { + vsync = default; + fixed (int* vsyncPtr = &vsync) + { + return PInvoke.GetRenderVSync(renderer, vsyncPtr) != 0; + } + } + + /// + /// Draw debug text to an SDL_Renderer. + /// + /// the renderer which should draw a line of text. + /// the x coordinate where the top-left corner of the text will draw. + /// the y coordinate where the top-left corner of the text will draw. + /// the string to render. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function will render a string of text to an SDL_Renderer. Note that + /// this is a convenience function for debugging, with severe limitations, and + /// not intended to be used for production apps and games. + /// + /// + /// Among these limitations: + /// + /// + /// - It accepts UTF-8 strings, but will only renders ASCII characters. + /// - It has a single, tiny size (8x8 pixels). You can use logical presentation + /// or SDL_SetRenderScale() to adjust it. + /// - It uses a simple, hardcoded bitmap font. It does not allow different font + /// selections and it does not support truetype, for proper scaling. + /// - It does no word-wrapping and does not treat newline characters as a line + /// break. If the text goes out of the window, it's gone. + /// + /// + /// For serious text rendering, there are several good options, such as + /// SDL_ttf, stb_truetype, or other external libraries. + /// + /// + /// On first use, this will create an internal texture for rendering glyphs. + /// This texture will live until the renderer is destroyed. + /// + /// + /// The text is drawn in the color specified by SDL_SetRenderDrawColor(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool RenderDebugText(SdlRenderer renderer, float x, float y, string str) => + PInvoke.RenderDebugText(renderer, x, y, str) != 0; + + /// + /// Set default scale mode for new textures for given renderer. + /// + /// the renderer to update. + /// the scale mode to change to for new textures. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When a renderer is created, scale_mode defaults to SDL_SCALEMODE_LINEAR. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public static bool SetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode scale_mode) => + PInvoke.SetDefaultTextureScaleMode(renderer, scale_mode) != 0; + + /// + /// Get default texture scale mode of the given renderer. + /// + /// the renderer to get data from. + /// + /// a SDL_ScaleMode filled with current default scale mode. + /// See SDL_SetDefaultTextureScaleMode() for the meaning of + /// the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public static bool GetDefaultTextureScaleMode(SdlRenderer renderer, out SdlScaleMode scale_mode) + { + scale_mode = default; + fixed (SdlScaleMode* scale_modePtr = &scale_mode) + { + return PInvoke.GetDefaultTextureScaleMode(renderer, scale_modePtr) != 0; + } + } + + /// + /// Create custom GPU render state. + /// + /// the renderer to use. + /// a struct describing the GPU render state to create. + /// + /// a custom GPU render state or NULL on failure; call SDL_GetError() + /// for more information. + /// + /// + /// This function should be called on the thread that created the + /// renderer. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + /// + public static nint CreateGpuRenderState(SdlRenderer renderer, SdlGpuRenderStateCreateInfo* createinfo) => + PInvoke.CreateGpuRenderState(renderer, createinfo); + + /// + /// Set fragment shader uniform variables in a custom GPU render state. + /// + /// the state to modify. + /// the fragment uniform slot to push data to. + /// client data to write. + /// the length of the data to write. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The data is copied and will be pushed using + /// SDL_PushGPUFragmentUniformData() during draw call execution. + /// + /// + /// + /// This function should be called on the thread that created the + /// renderer. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static bool SetGpuRenderStateFragmentUniforms( + nint state, + uint slot_index, + void* data, + uint length + ) => PInvoke.SetGpuRenderStateFragmentUniforms(state, slot_index, data, length) != 0; + + /// + /// Set custom GPU render state. + /// + /// the renderer to use. + /// the state to to use, or NULL to clear custom GPU render state. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets custom GPU render state for subsequent draw calls. This + /// allows using custom shaders with the GPU renderer. + /// + /// + /// + /// This function should be called on the thread that created the + /// renderer. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static bool SetGpuRenderState(SdlRenderer renderer, nint state) => + PInvoke.SetGpuRenderState(renderer, state) != 0; + + /// + /// Destroy custom GPU render state. + /// + /// the state to destroy. + /// + /// This function should be called on the thread that created the + /// renderer. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public static void DestroyGpuRenderState(nint state) => PInvoke.DestroyGpuRenderState(state); + } + } +} diff --git a/Brutal.Sdl/Generated/Libraries/Sdl.Video.gen.cs b/Brutal.Sdl/Generated/Libraries/Sdl.Video.gen.cs new file mode 100644 index 0000000..323a874 --- /dev/null +++ b/Brutal.Sdl/Generated/Libraries/Sdl.Video.gen.cs @@ -0,0 +1,2975 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static unsafe partial class Video + { + /// + /// Get the number of video drivers compiled into SDL. + /// + /// the number of built in video drivers. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static int GetNumVideoDrivers() => PInvoke.GetNumVideoDrivers(); + + /// + /// Get the name of a built in video driver. + /// + /// the index of a video driver. + /// + /// the name of the video driver with the given index, or NULL if + /// index is out of bounds. + /// + /// + /// + /// The video drivers are presented in the order in which they are normally + /// checked during initialization. + /// + /// + /// The names of drivers are all simple, low-ASCII identifiers, like "cocoa", + /// "x11" or "windows". These never have Unicode characters, and are not meant + /// to be proper names. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetVideoDriver(int index) => PInvoke.GetVideoDriver(index); + + /// + /// Get the name of the currently initialized video driver. + /// + /// + /// the name of the current video driver or NULL if no driver has been + /// initialized. + /// + /// + /// + /// The names of drivers are all simple, low-ASCII identifiers, like "cocoa", + /// "x11" or "windows". These never have Unicode characters, and are not meant + /// to be proper names. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static string? GetCurrentVideoDriver() => PInvoke.GetCurrentVideoDriver(); + + /// + /// Get the current system theme. + /// + /// the current system theme, light, dark, or unknown. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static SdlSystemTheme GetSystemTheme() => PInvoke.GetSystemTheme(); + + /// + /// Ergonomic wrapper over SDL_GetDisplays. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static uint[] GetDisplays() + { + int count; + var ptr = PInvoke.GetDisplays(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetDisplays failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Return the primary display. + /// + /// + /// the instance ID of the primary display on success or 0 on failure; + /// call SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static uint GetPrimaryDisplay() => PInvoke.GetPrimaryDisplay(); + + /// + /// Get the properties associated with a display. + /// + /// the instance ID of the display to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN: true if the display has HDR + /// headroom above the SDR white point. This is for informational and + /// diagnostic purposes only, as not all platforms provide this information + /// at the display level. + /// + /// + /// On KMS/DRM: + /// + /// + /// - SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER: the "panel + /// orientation" property for the display in degrees of clockwise rotation. + /// Note that this is provided only as a hint, and the application is + /// responsible for any coordinate transformations needed to conform to the + /// requested display orientation. + /// + /// + /// On Wayland: + /// + /// + /// - SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER: the wl_output associated + /// with the display + /// + /// + /// On Windows: + /// + /// + /// - SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER: the monitor handle + /// (HMONITOR) associated with the display + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetDisplayProperties(uint displayID) => PInvoke.GetDisplayProperties(displayID); + + /// + /// Get the name of a display in UTF-8 encoding. + /// + /// the instance ID of the display to query. + /// + /// the name of a display or NULL on failure; call SDL_GetError() for + /// more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetDisplayName(uint displayID) => PInvoke.GetDisplayName(displayID); + + /// + /// Get the desktop area represented by a display. + /// + /// the instance ID of the display to query. + /// the SDL_Rect structure filled in with the display bounds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The primary display is often located at (0,0), but may be placed at a + /// different location depending on monitor layout. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetDisplayBounds(uint displayID, SdlRect* rect) => + PInvoke.GetDisplayBounds(displayID, rect) != 0; + + /// + /// Get the usable desktop area represented by a display, in screen + /// coordinates. + /// + /// the instance ID of the display to query. + /// the SDL_Rect structure filled in with the display bounds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the same area as SDL_GetDisplayBounds() reports, but with portions + /// reserved by the system removed. For example, on Apple's macOS, this + /// subtracts the area occupied by the menu bar and dock. + /// + /// + /// Setting a window to be fullscreen generally bypasses these unusable areas, + /// so these are good guidelines for the maximum space available to a + /// non-fullscreen window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetDisplayUsableBounds(uint displayID, SdlRect* rect) => + PInvoke.GetDisplayUsableBounds(displayID, rect) != 0; + + /// + /// Get the orientation of a display when it is unrotated. + /// + /// the instance ID of the display to query. + /// + /// the SDL_DisplayOrientation enum value of the display, or + /// SDL_ORIENTATION_UNKNOWN if it isn't available. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlDisplayOrientation GetNaturalDisplayOrientation(uint displayID) => + PInvoke.GetNaturalDisplayOrientation(displayID); + + /// + /// Get the orientation of a display. + /// + /// the instance ID of the display to query. + /// + /// the SDL_DisplayOrientation enum value of the display, or + /// SDL_ORIENTATION_UNKNOWN if it isn't available. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static SdlDisplayOrientation GetCurrentDisplayOrientation(uint displayID) => + PInvoke.GetCurrentDisplayOrientation(displayID); + + /// + /// Get the content scale of a display. + /// + /// the instance ID of the display to query. + /// + /// the content scale of the display, or 0.0f on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The content scale is the expected scale for content based on the DPI + /// settings of the display. For example, a 4K display might have a 2.0 (200%) + /// display scale, which means that the user expects UI elements to be twice as + /// big on this display, to aid in readability. + /// + /// + /// After window creation, SDL_GetWindowDisplayScale() should be used to query + /// the content scale factor for individual windows instead of querying the + /// display for a window and calling this function, as the per-window content + /// scale factor may differ from the base value of the display it is on, + /// particularly on high-DPI and/or multi-monitor desktop configurations. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static float GetDisplayContentScale(uint displayID) => PInvoke.GetDisplayContentScale(displayID); + + /// + /// Ergonomic wrapper over SDL_GetFullscreenDisplayModes. + /// + /// the instance ID of the display to query. + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static SdlDisplayMode[] GetFullscreenDisplayModes(uint displayID) + { + int count; + var ptr = PInvoke.GetFullscreenDisplayModes(displayID, &count); + if (ptr is null) + throw SdlException.FromError("SDL_GetFullscreenDisplayModes failed"); + try + { + var result = new SdlDisplayMode[count]; + for (var i = 0; i < count; i++) + result[i] = *ptr[i]; + return result; + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Get the closest match to the requested display mode. + /// + /// the instance ID of the display to query. + /// the width in pixels of the desired display mode. + /// the height in pixels of the desired display mode. + /// + /// the refresh rate of the desired display mode, or 0.0f + /// for the desktop refresh rate. + /// + /// + /// boolean to include high density modes in + /// the search. + /// + /// + /// a pointer filled in with the closest display mode equal to + /// or larger than the desired mode. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The available display modes are scanned and closest is filled in with the + /// closest mode matching the requested mode and returned. The mode format and + /// refresh rate default to the desktop mode if they are set to 0. The modes + /// are scanned with size being first priority, format being second priority, + /// and finally checking the refresh rate. If all the available modes are too + /// small, then false is returned. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetClosestFullscreenDisplayMode( + uint displayID, + int w, + int h, + float refresh_rate, + bool include_high_density_modes, + SdlDisplayMode* closest + ) => + PInvoke.GetClosestFullscreenDisplayMode( + displayID, + w, + h, + refresh_rate, + include_high_density_modes ? (byte)1 : (byte)0, + closest + ) != 0; + + /// + /// Get the display containing a point. + /// + /// the point to query. + /// + /// the instance ID of the display containing the point or 0 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static uint GetDisplayForPoint(SdlPoint* point) => PInvoke.GetDisplayForPoint(point); + + /// + /// Get the display primarily containing a rect. + /// + /// the rect to query. + /// + /// the instance ID of the display entirely containing the rect or + /// closest to the center of the rect on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static uint GetDisplayForRect(SdlRect* rect) => PInvoke.GetDisplayForRect(rect); + + /// + /// Get the display associated with a window. + /// + /// the window to query. + /// + /// the instance ID of the display containing the center of the window + /// on success or 0 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static uint GetDisplayForWindow(SdlWindow window) => PInvoke.GetDisplayForWindow(window); + + /// + /// Get the pixel density of a window. + /// + /// the window to query. + /// + /// the pixel density or 0.0f on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is a ratio of pixel size to window size. For example, if the window is + /// 1920x1080 and it has a high density back buffer of 3840x2160 pixels, it + /// would have a pixel density of 2.0. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static float GetWindowPixelDensity(SdlWindow window) => PInvoke.GetWindowPixelDensity(window); + + /// + /// Get the content display scale relative to a window's pixel size. + /// + /// the window to query. + /// + /// the display scale, or 0.0f on failure; call SDL_GetError() for + /// more information. + /// + /// + /// + /// This is a combination of the window pixel density and the display content + /// scale, and is the expected scale for displaying content in this window. For + /// example, if a 3840x2160 window had a display scale of 2.0, the user expects + /// the content to take twice as many pixels and be the same physical size as + /// if it were being displayed in a 1920x1080 window with a display scale of + /// 1.0. + /// + /// + /// Conceptually this value corresponds to the scale display setting, and is + /// updated when that setting is changed, or the window moves to a display with + /// a different scale setting. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static float GetWindowDisplayScale(SdlWindow window) => PInvoke.GetWindowDisplayScale(window); + + /// + /// Set the display mode to use when a window is visible and fullscreen. + /// + /// the window to affect. + /// + /// a pointer to the display mode to use, which can be NULL for + /// borderless fullscreen desktop mode, or one of the fullscreen + /// modes returned by SDL_GetFullscreenDisplayModes() to set an + /// exclusive fullscreen mode. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This only affects the display mode used when the window is fullscreen. To + /// change the window size when the window is not fullscreen, use + /// SDL_SetWindowSize(). + /// + /// + /// If the window is currently in the fullscreen state, this request is + /// asynchronous on some windowing systems and the new mode dimensions may not + /// be applied immediately upon the return of this function. If an immediate + /// change is required, call SDL_SyncWindow() to block until the changes have + /// taken effect. + /// + /// + /// When the new mode takes effect, an SDL_EVENT_WINDOW_RESIZED and/or an + /// SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will be emitted with the new mode + /// dimensions. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetWindowFullscreenMode(SdlWindow window, SdlDisplayMode* mode) => + PInvoke.SetWindowFullscreenMode(window, mode) != 0; + + /// + /// Ergonomic wrapper over SDL_GetWindowICCProfile. + /// + /// the window to query. + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. + /// + public static byte[] GetWindowICCProfile(SdlWindow window) + { + nuint size; + var ptr = PInvoke.GetWindowICCProfile(window, &size); + if (ptr is null) + throw SdlException.FromError("SDL_GetWindowICCProfile failed"); + try + { + return new ReadOnlySpan(ptr, checked((int)size)).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Get the pixel format associated with the window. + /// + /// the window to query. + /// + /// the pixel format of the window on success or + /// SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static SdlPixelFormat GetWindowPixelFormat(SdlWindow window) => PInvoke.GetWindowPixelFormat(window); + + /// + /// Ergonomic wrapper over SDL_GetWindows. + /// + /// The SDL call failed; the message carries the + /// SDL_GetError text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, + /// and the native buffer is freed with SDL_free before this method returns. Each element is a + /// borrowed handle: it is owned by SDL, not created by this call, and must not be disposed. Do not + /// call on any element. + /// + public static SdlWindow[] GetWindows() + { + int count; + var ptr = PInvoke.GetWindows(&count); + if (ptr is null) + throw SdlException.FromError("SDL_GetWindows failed"); + try + { + return new ReadOnlySpan(ptr, count).ToArray(); + } + finally + { + PInvoke.Free(ptr); + } + } + + /// + /// Ergonomic wrapper over SDL_CreateWindow. Throws instead of returning a null handle on failure. + /// + /// the title of the window, in UTF-8 encoding. + /// the width of the window. + /// the height of the window. + /// 0, or one or more SDL_WindowFlags OR'd together. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlWindow CreateWindow(string title, int w, int h, SdlWindowFlags flags) + { + SdlWindow result = PInvoke.CreateWindow(title, w, h, flags); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateWindow failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreatePopupWindow. Throws instead of returning a null handle on + /// failure. + /// + /// the parent of the window, must not be NULL. + /// + /// the x position of the popup window relative to the origin + /// of the parent. + /// + /// + /// the y position of the popup window relative to the origin + /// of the parent window. + /// + /// the width of the window. + /// the height of the window. + /// + /// SDL_WINDOW_TOOLTIP or SDL_WINDOW_POPUP_MENU, and zero or more + /// additional SDL_WindowFlags OR'd together. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlWindow CreatePopupWindow( + SdlWindow parent, + int offset_x, + int offset_y, + int w, + int h, + SdlWindowFlags flags + ) + { + SdlWindow result = PInvoke.CreatePopupWindow(parent, offset_x, offset_y, w, h, flags); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreatePopupWindow failed"); + } + return result; + } + + /// + /// Ergonomic wrapper over SDL_CreateWindowWithProperties. Throws instead of returning a null + /// handle on failure. + /// + /// the properties to use. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the + /// SDL_GetError text. + public static SdlWindow CreateWindowWithProperties(uint props) + { + SdlWindow result = PInvoke.CreateWindowWithProperties(props); + if (result.IsNull()) + { + throw SdlException.FromError("SDL_CreateWindowWithProperties failed"); + } + return result; + } + + /// + /// Get the numeric ID of a window. + /// + /// the window to query. + /// + /// the ID of the window on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The numeric ID is what SDL_WindowEvent references, and is necessary to map + /// these events to specific SDL_Window objects. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static uint GetWindowID(SdlWindow window) => PInvoke.GetWindowID(window); + + /// + /// Ergonomic wrapper over SDL_GetWindowFromID. + /// + /// the ID of the window. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetWindowFromID(uint id) => PInvoke.GetWindowFromID(id); + + /// + /// Ergonomic wrapper over SDL_GetWindowParent. + /// + /// the window to query. + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetWindowParent(SdlWindow window) => PInvoke.GetWindowParent(window); + + /// + /// Get the properties associated with a window. + /// + /// the window to query. + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_WINDOW_SHAPE_POINTER: the surface associated with a shaped + /// window + /// - SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN: true if the window has HDR + /// headroom above the SDR white point. This property can change dynamically + /// when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT: the value of SDR white in the + /// SDL_COLORSPACE_SRGB_LINEAR colorspace. On Windows this corresponds to the + /// SDR white level in scRGB colorspace, and on Apple platforms this is + /// always 1.0 for EDR content. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT: the additional high dynamic range + /// that can be displayed, in terms of the SDR white point. When HDR is not + /// enabled, this will be 1.0. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// + /// + /// On Android: + /// + /// + /// - SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER: the ANativeWindow associated + /// with the window + /// - SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER: the EGLSurface associated with + /// the window + /// + /// + /// On iOS: + /// + /// + /// - SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER: the (__unsafe_unretained) + /// UIWindow associated with the window + /// - SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER: the NSInteger tag + /// associated with metal views on the window + /// - SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER: the OpenGL view's + /// framebuffer object. It must be bound when rendering to the screen using + /// OpenGL. + /// - SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER: the OpenGL view's + /// renderbuffer object. It must be bound when SDL_GL_SwapWindow is called. + /// - SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER: the OpenGL + /// view's resolve framebuffer, when MSAA is used. + /// + /// + /// On KMS/DRM: + /// + /// + /// - SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER: the device index associated + /// with the window (e.g. the X in /dev/dri/cardX) + /// - SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER: the DRM FD associated with the + /// window + /// - SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER: the GBM device associated + /// with the window + /// + /// + /// On macOS: + /// + /// + /// - SDL_PROP_WINDOW_COCOA_WINDOW_POINTER: the (__unsafe_unretained) + /// NSWindow associated with the window + /// - SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER: the NSInteger tag + /// associated with metal views on the window + /// + /// + /// On OpenVR: + /// + /// + /// - SDL_PROP_WINDOW_OPENVR_OVERLAY_ID_NUMBER: the OpenVR Overlay Handle ID + /// for the associated overlay window. + /// + /// + /// On Vivante: + /// + /// + /// - SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER: the EGLNativeDisplayType + /// associated with the window + /// - SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER: the EGLNativeWindowType + /// associated with the window + /// - SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER: the EGLSurface associated with + /// the window + /// + /// + /// On Windows: + /// + /// + /// - SDL_PROP_WINDOW_WIN32_HWND_POINTER: the HWND associated with the window + /// - SDL_PROP_WINDOW_WIN32_HDC_POINTER: the HDC associated with the window + /// - SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER: the HINSTANCE associated with + /// the window + /// + /// + /// On Wayland: + /// + /// + /// Note: The xdg_* window objects do not internally persist across window + /// show/hide calls. They will be null if the window is hidden and must be + /// queried each time it is shown. + /// + /// + /// - SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER: the wl_display associated with + /// the window + /// - SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER: the wl_surface associated with + /// the window + /// - SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER: the wp_viewport associated + /// with the window + /// - SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER: the wl_egl_window + /// associated with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER: the xdg_surface associated + /// with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER: the xdg_toplevel role + /// associated with the window + /// - 'SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING': the export + /// handle associated with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER: the xdg_popup role + /// associated with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER: the xdg_positioner + /// associated with the window, in popup mode + /// + /// + /// On X11: + /// + /// + /// - SDL_PROP_WINDOW_X11_DISPLAY_POINTER: the X11 Display associated with + /// the window + /// - SDL_PROP_WINDOW_X11_SCREEN_NUMBER: the screen number associated with + /// the window + /// - SDL_PROP_WINDOW_X11_WINDOW_NUMBER: the X11 Window associated with the + /// window + /// + /// + /// On Emscripten: + /// + /// + /// - SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING: the id the canvas element + /// will have + /// - SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING: the keyboard + /// element that associates keyboard events to this window + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static uint GetWindowProperties(SdlWindow window) => PInvoke.GetWindowProperties(window); + + /// + /// Get the window flags. + /// + /// the window to query. + /// a mask of the SDL_WindowFlags associated with window. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static SdlWindowFlags GetWindowFlags(SdlWindow window) => PInvoke.GetWindowFlags(window); + + /// + /// Set the title of a window. + /// + /// the window to change. + /// the desired window title in UTF-8 format. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This string is expected to be in UTF-8 encoding. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowTitle(SdlWindow window, string title) => + PInvoke.SetWindowTitle(window, title) != 0; + + /// + /// Get the title of a window. + /// + /// the window to query. + /// + /// the title of the window in UTF-8 format or "" if there is no + /// title. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static string? GetWindowTitle(SdlWindow window) => PInvoke.GetWindowTitle(window); + + /// + /// Set the icon for a window. + /// + /// the window to change. + /// an SDL_Surface structure containing the icon for the window. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If this function is passed a surface with alternate representations added + /// using SDL_AddSurfaceAlternateImage(), the surface will be interpreted as + /// the content to be used for 100% display scale, and the alternate + /// representations will be used for high DPI situations. For example, if the + /// original surface is 32x32, then on a 2x macOS display or 200% display scale + /// on Windows, a 64x64 version of the image will be used, if available. If a + /// matching version of the image isn't available, the closest larger size + /// image will be downscaled to the appropriate size and be used instead, if + /// available. Otherwise, the closest smaller image will be upscaled and be + /// used instead. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowIcon(SdlWindow window, SdlSurface* icon) => + PInvoke.SetWindowIcon(window, icon) != 0; + + /// + /// Request that the window's position be set. + /// + /// the window to reposition. + /// + /// the x coordinate of the window, or SDL_WINDOWPOS_CENTERED or + /// SDL_WINDOWPOS_UNDEFINED. + /// + /// + /// the y coordinate of the window, or SDL_WINDOWPOS_CENTERED or + /// SDL_WINDOWPOS_UNDEFINED. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in an exclusive fullscreen or maximized state, this + /// request has no effect. + /// + /// + /// This can be used to reposition fullscreen-desktop windows onto a different + /// display, however, as exclusive fullscreen windows are locked to a specific + /// display, they can only be repositioned programmatically via + /// SDL_SetWindowFullscreenMode(). + /// + /// + /// On some windowing systems this request is asynchronous and the new + /// coordinates may not have have been applied immediately upon the return of + /// this function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window position changes, an SDL_EVENT_WINDOW_MOVED event will be + /// emitted with the window's new coordinates. Note that the new coordinates + /// may not match the exact coordinates requested, as some windowing systems + /// can restrict the position of the window in certain scenarios (e.g. + /// constraining the position so the window is always within desktop bounds). + /// Additionally, as this is just a request, it can be denied by the windowing + /// system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetWindowPosition(SdlWindow window, int x, int y) => + PInvoke.SetWindowPosition(window, x, y) != 0; + + /// + /// Get the position of a window. + /// + /// the window to query. + /// + /// a pointer filled in with the x position of the window, may be + /// NULL. + /// + /// + /// a pointer filled in with the y position of the window, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the current position of the window as last reported by the + /// windowing system. + /// + /// + /// If you do not need the value for one of the positions a NULL may be passed + /// in the x or y parameter. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetWindowPosition(SdlWindow window, out int x, out int y) + { + x = default; + y = default; + fixed (int* xPtr = &x) + { + fixed (int* yPtr = &y) + { + return PInvoke.GetWindowPosition(window, xPtr, yPtr) != 0; + } + } + } + + /// + /// Request that the size of a window's client area be set. + /// + /// the window to change. + /// the width of the window, must be > 0. + /// the height of the window, must be > 0. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in a fullscreen or maximized state, this request has no + /// effect. + /// + /// + /// To change the exclusive fullscreen mode of a window, use + /// SDL_SetWindowFullscreenMode(). + /// + /// + /// On some windowing systems, this request is asynchronous and the new window + /// size may not have have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be + /// emitted with the new window dimensions. Note that the new dimensions may + /// not match the exact size requested, as some windowing systems can restrict + /// the window size in certain scenarios (e.g. constraining the size of the + /// content area to remain within the usable desktop bounds). Additionally, as + /// this is just a request, it can be denied by the windowing system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetWindowSize(SdlWindow window, int w, int h) => + PInvoke.SetWindowSize(window, w, h) != 0; + + /// + /// Get the size of a window's client area. + /// + /// the window to query the width and height from. + /// a pointer filled in with the width of the window, may be NULL. + /// a pointer filled in with the height of the window, may be NULL. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The window pixel size may differ from its window coordinate size if the + /// window is on a high pixel density display. Use SDL_GetWindowSizeInPixels() + /// or SDL_GetRenderOutputSize() to get the real client area size in pixels. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GetWindowSize(SdlWindow window, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetWindowSize(window, wPtr, hPtr) != 0; + } + } + } + + /// + /// Get the safe area for this window. + /// + /// the window to query. + /// + /// a pointer filled in with the client area that is safe for + /// interactive content. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Some devices have portions of the screen which are partially obscured or + /// not interactive, possibly due to on-screen controls, curved edges, camera + /// notches, TV overscan, etc. This function provides the area of the window + /// which is safe to have interactable content. You should continue rendering + /// into the rest of the window, but it should not contain visually important + /// or interactable content. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GetWindowSafeArea(SdlWindow window, SdlRect* rect) => + PInvoke.GetWindowSafeArea(window, rect) != 0; + + /// + /// Request that the aspect ratio of a window's client area be set. + /// + /// the window to change. + /// + /// the minimum aspect ratio of the window, or 0.0f for no + /// limit. + /// + /// + /// the maximum aspect ratio of the window, or 0.0f for no + /// limit. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The aspect ratio is the ratio of width divided by height, e.g. 2560x1600 + /// would be 1.6. Larger aspect ratios are wider and smaller aspect ratios are + /// narrower. + /// + /// + /// If, at the time of this request, the window in a fixed-size state, such as + /// maximized or fullscreen, the request will be deferred until the window + /// exits this state and becomes resizable again. + /// + /// + /// On some windowing systems, this request is asynchronous and the new window + /// aspect ratio may not have have been applied immediately upon the return of + /// this function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be + /// emitted with the new window dimensions. Note that the new dimensions may + /// not match the exact aspect ratio requested, as some windowing systems can + /// restrict the window size in certain scenarios (e.g. constraining the size + /// of the content area to remain within the usable desktop bounds). + /// Additionally, as this is just a request, it can be denied by the windowing + /// system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetWindowAspectRatio(SdlWindow window, float min_aspect, float max_aspect) => + PInvoke.SetWindowAspectRatio(window, min_aspect, max_aspect) != 0; + + /// + /// Get the aspect ratio of a window's client area. + /// + /// the window to query the width and height from. + /// + /// a pointer filled in with the minimum aspect ratio of the + /// window, may be NULL. + /// + /// + /// a pointer filled in with the maximum aspect ratio of the + /// window, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetWindowAspectRatio(SdlWindow window, out float min_aspect, out float max_aspect) + { + min_aspect = default; + max_aspect = default; + fixed (float* min_aspectPtr = &min_aspect) + { + fixed (float* max_aspectPtr = &max_aspect) + { + return PInvoke.GetWindowAspectRatio(window, min_aspectPtr, max_aspectPtr) != 0; + } + } + } + + /// + /// Get the size of a window's borders (decorations) around the client area. + /// + /// + /// the window to query the size values of the border + /// (decorations) from. + /// + /// + /// pointer to variable for storing the size of the top border; NULL + /// is permitted. + /// + /// + /// pointer to variable for storing the size of the left border; + /// NULL is permitted. + /// + /// + /// pointer to variable for storing the size of the bottom + /// border; NULL is permitted. + /// + /// + /// pointer to variable for storing the size of the right border; + /// NULL is permitted. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Note: If this function fails (returns false), the size values will be + /// initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the + /// window in question was borderless. + /// + /// + /// Note: This function may fail on systems where the window has not yet been + /// decorated by the display server (for example, immediately after calling + /// SDL_CreateWindow). It is recommended that you wait at least until the + /// window has been presented and composited, so that the window system has a + /// chance to decorate the window and provide the border dimensions to SDL. + /// + /// + /// This function also returns false if getting the information is not + /// supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetWindowBordersSize( + SdlWindow window, + out int top, + out int left, + out int bottom, + out int right + ) + { + top = default; + left = default; + bottom = default; + right = default; + fixed (int* topPtr = &top) + { + fixed (int* leftPtr = &left) + { + fixed (int* bottomPtr = &bottom) + { + fixed (int* rightPtr = &right) + { + return PInvoke.GetWindowBordersSize(window, topPtr, leftPtr, bottomPtr, rightPtr) != 0; + } + } + } + } + } + + /// + /// Get the size of a window's client area, in pixels. + /// + /// the window from which the drawable size should be queried. + /// + /// a pointer to variable for storing the width in pixels, may be + /// NULL. + /// + /// + /// a pointer to variable for storing the height in pixels, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetWindowSizeInPixels(SdlWindow window, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetWindowSizeInPixels(window, wPtr, hPtr) != 0; + } + } + } + + /// + /// Set the minimum size of a window's client area. + /// + /// the window to change. + /// the minimum width of the window, or 0 for no limit. + /// the minimum height of the window, or 0 for no limit. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetWindowMinimumSize(SdlWindow window, int min_w, int min_h) => + PInvoke.SetWindowMinimumSize(window, min_w, min_h) != 0; + + /// + /// Get the minimum size of a window's client area. + /// + /// the window to query. + /// + /// a pointer filled in with the minimum width of the window, may be + /// NULL. + /// + /// + /// a pointer filled in with the minimum height of the window, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetWindowMinimumSize(SdlWindow window, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetWindowMinimumSize(window, wPtr, hPtr) != 0; + } + } + } + + /// + /// Set the maximum size of a window's client area. + /// + /// the window to change. + /// the maximum width of the window, or 0 for no limit. + /// the maximum height of the window, or 0 for no limit. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetWindowMaximumSize(SdlWindow window, int max_w, int max_h) => + PInvoke.SetWindowMaximumSize(window, max_w, max_h) != 0; + + /// + /// Get the maximum size of a window's client area. + /// + /// the window to query. + /// + /// a pointer filled in with the maximum width of the window, may be + /// NULL. + /// + /// + /// a pointer filled in with the maximum height of the window, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GetWindowMaximumSize(SdlWindow window, out int w, out int h) + { + w = default; + h = default; + fixed (int* wPtr = &w) + { + fixed (int* hPtr = &h) + { + return PInvoke.GetWindowMaximumSize(window, wPtr, hPtr) != 0; + } + } + } + + /// + /// Set the border state of a window. + /// + /// the window of which to change the border state. + /// false to remove border, true to add border. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_BORDERLESS flag and add + /// or remove the border from the actual window. This is a no-op if the + /// window's border already matches the requested state. + /// + /// + /// You can't change the border state of a fullscreen window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowBordered(SdlWindow window, bool bordered) => + PInvoke.SetWindowBordered(window, bordered ? (byte)1 : (byte)0) != 0; + + /// + /// Set the user-resizable state of a window. + /// + /// the window of which to change the resizable state. + /// true to allow resizing, false to disallow. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_RESIZABLE flag and + /// allow/disallow user resizing of the window. This is a no-op if the window's + /// resizable state already matches the requested state. + /// + /// + /// You can't change the resizable state of a fullscreen window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowResizable(SdlWindow window, bool resizable) => + PInvoke.SetWindowResizable(window, resizable ? (byte)1 : (byte)0) != 0; + + /// + /// Set the window to always be above the others. + /// + /// the window of which to change the always on top state. + /// true to set the window always on top, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_ALWAYS_ON_TOP flag. This + /// will bring the window to the front and keep the window above the rest. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowAlwaysOnTop(SdlWindow window, bool on_top) => + PInvoke.SetWindowAlwaysOnTop(window, on_top ? (byte)1 : (byte)0) != 0; + + /// + /// Set the window to fill the current document space (Emscripten only). + /// + /// the window of which to change the fill-document state. + /// true to set the window to fill the document, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_FILL_DOCUMENT flag. + /// + /// + /// Currently this flag only applies to the Emscripten target. + /// + /// + /// When enabled, the canvas element fills the entire document. Resize events + /// will be generated as the browser window is resized, as that will adjust the + /// canvas size as well. The canvas will cover anything else on the page, + /// including any controls provided by Emscripten in its generated HTML file + /// (in fact, any elements on the page that aren't the canvas will be moved + /// into a hidden div element). + /// + /// + /// Often times this is desirable for a browser-based game, but it means + /// several things that we expect of an SDL window on other platforms might not + /// work as expected, such as minimum window sizes and aspect ratios. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public static bool SetWindowFillDocument(SdlWindow window, bool fill) => + PInvoke.SetWindowFillDocument(window, fill ? (byte)1 : (byte)0) != 0; + + /// + /// Show a window. + /// + /// the window to show. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool ShowWindow(SdlWindow window) => PInvoke.ShowWindow(window) != 0; + + /// + /// Hide a window. + /// + /// the window to hide. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool HideWindow(SdlWindow window) => PInvoke.HideWindow(window) != 0; + + /// + /// Request that a window be raised above other windows and gain the input + /// focus. + /// + /// the window to raise. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The result of this request is subject to desktop window manager policy, + /// particularly if raising the requested window would result in stealing focus + /// from another application. If the window is successfully raised and gains + /// input focus, an SDL_EVENT_WINDOW_FOCUS_GAINED event will be emitted, and + /// the window will have the SDL_WINDOW_INPUT_FOCUS flag set. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool RaiseWindow(SdlWindow window) => PInvoke.RaiseWindow(window) != 0; + + /// + /// Request that the window be made as large as possible. + /// + /// the window to maximize. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Non-resizable windows can't be maximized. The window must have the + /// SDL_WINDOW_RESIZABLE flag set, or this will have no effect. + /// + /// + /// On some windowing systems this request is asynchronous and the new window + /// state may not have have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_MAXIMIZED event will be + /// emitted. Note that, as this is just a request, the windowing system can + /// deny the state change. + /// + /// + /// When maximizing a window, whether the constraints set via + /// SDL_SetWindowMaximumSize() are honored depends on the policy of the window + /// manager. Win32 and macOS enforce the constraints when maximizing, while X11 + /// and Wayland window managers may vary. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool MaximizeWindow(SdlWindow window) => PInvoke.MaximizeWindow(window) != 0; + + /// + /// Request that the window be minimized to an iconic representation. + /// + /// the window to minimize. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in a fullscreen state, this request has no direct effect. + /// It may alter the state the window is returned to when leaving fullscreen. + /// + /// + /// On some windowing systems this request is asynchronous and the new window + /// state may not have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_MINIMIZED event will be + /// emitted. Note that, as this is just a request, the windowing system can + /// deny the state change. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool MinimizeWindow(SdlWindow window) => PInvoke.MinimizeWindow(window) != 0; + + /// + /// Request that the size and position of a minimized or maximized window be + /// restored. + /// + /// the window to restore. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in a fullscreen state, this request has no direct effect. + /// It may alter the state the window is returned to when leaving fullscreen. + /// + /// + /// On some windowing systems this request is asynchronous and the new window + /// state may not have have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_RESTORED event will be + /// emitted. Note that, as this is just a request, the windowing system can + /// deny the state change. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool RestoreWindow(SdlWindow window) => PInvoke.RestoreWindow(window) != 0; + + /// + /// Request that the window's fullscreen state be changed. + /// + /// the window to change. + /// true for fullscreen mode, false for windowed mode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// By default a window in fullscreen state uses borderless fullscreen desktop + /// mode, but a specific exclusive display mode can be set using + /// SDL_SetWindowFullscreenMode(). + /// + /// + /// On some windowing systems this request is asynchronous and the new + /// fullscreen state may not have have been applied immediately upon the return + /// of this function. If an immediate change is required, call SDL_SyncWindow() + /// to block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_ENTER_FULLSCREEN or + /// SDL_EVENT_WINDOW_LEAVE_FULLSCREEN event will be emitted. Note that, as this + /// is just a request, it can be denied by the windowing system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetWindowFullscreen(SdlWindow window, bool fullscreen) => + PInvoke.SetWindowFullscreen(window, fullscreen ? (byte)1 : (byte)0) != 0; + + /// + /// Block until any pending window state is finalized. + /// + /// + /// the window for which to wait for the pending state to be + /// applied. + /// + /// + /// true on success or false if the operation timed out before the + /// window was in the requested state. + /// + /// + /// + /// On asynchronous windowing systems, this acts as a synchronization barrier + /// for pending window state. It will attempt to wait until any pending window + /// state has been applied and is guaranteed to return within finite time. Note + /// that for how long it can potentially block depends on the underlying window + /// system, as window state changes may involve somewhat lengthy animations + /// that must complete before the window is in its final requested state. + /// + /// + /// On windowing systems where changes are immediate, this does nothing. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + public static bool SyncWindow(SdlWindow window) => PInvoke.SyncWindow(window) != 0; + + /// + /// Return whether the window has a surface associated with it. + /// + /// the window to query. + /// + /// true if there is a surface associated with the window, or false + /// otherwise. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool WindowHasSurface(SdlWindow window) => PInvoke.WindowHasSurface(window) != 0; + + /// + /// Toggle VSync for the window surface. + /// + /// the window. + /// the vertical refresh sync interval. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When a window surface is created, vsync defaults to + /// SDL_WINDOW_SURFACE_VSYNC_DISABLED. + /// + /// + /// The vsync parameter can be 1 to synchronize present with every vertical + /// refresh, 2 to synchronize present with every second vertical refresh, etc., + /// SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), + /// or SDL_WINDOW_SURFACE_VSYNC_DISABLED to disable. Not every value is + /// supported by every driver, so you should check the return value to see + /// whether the requested setting is supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowSurfaceVSync(SdlWindow window, int vsync) => + PInvoke.SetWindowSurfaceVSync(window, vsync) != 0; + + /// + /// Get VSync for the window surface. + /// + /// the window to query. + /// + /// an int filled with the current vertical refresh sync interval. + /// See SDL_SetWindowSurfaceVSync() for the meaning of the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetWindowSurfaceVSync(SdlWindow window, out int vsync) + { + vsync = default; + fixed (int* vsyncPtr = &vsync) + { + return PInvoke.GetWindowSurfaceVSync(window, vsyncPtr) != 0; + } + } + + /// + /// Copy the window surface to the screen. + /// + /// the window to update. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the function you use to reflect any changes to the surface on the + /// screen. + /// + /// + /// This function is equivalent to the SDL 1.2 API SDL_Flip(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool UpdateWindowSurface(SdlWindow window) => PInvoke.UpdateWindowSurface(window) != 0; + + /// + /// Copy areas of the window surface to the screen. + /// + /// the window to update. + /// + /// an array of SDL_Rect structures representing areas of the + /// surface to copy, in pixels. + /// + /// the number of rectangles. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the function you use to reflect changes to portions of the surface + /// on the screen. + /// + /// + /// This function is equivalent to the SDL 1.2 API SDL_UpdateRects(). + /// + /// + /// Note that this function will update at least the rectangles specified, + /// but this is only intended as an optimization; in practice, this might + /// update more of the screen (or all of the screen!), depending on what method + /// SDL uses to send pixels to the system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool UpdateWindowSurfaceRects(SdlWindow window, SdlRect* rects, int numrects) => + PInvoke.UpdateWindowSurfaceRects(window, rects, numrects) != 0; + + /// + /// Destroy the surface associated with the window. + /// + /// the window to update. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool DestroyWindowSurface(SdlWindow window) => PInvoke.DestroyWindowSurface(window) != 0; + + /// + /// Set a window's keyboard grab mode. + /// + /// the window for which the keyboard grab mode should be set. + /// this is true to grab keyboard, and false to release. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or + /// the Meta/Super key. Note that not all system keyboard shortcuts can be + /// captured by applications (one example is Ctrl+Alt+Del on Windows). + /// + /// + /// This is primarily intended for specialized applications such as VNC clients + /// or VM frontends. Normal games should not use keyboard grab. + /// + /// + /// When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the + /// window is full-screen to ensure the user is not trapped in your + /// application. If you have a custom keyboard shortcut to exit fullscreen + /// mode, you may suppress this behavior with + /// SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED. + /// + /// + /// If the caller enables a grab while another window is currently grabbed, the + /// other window loses its grab in favor of the caller's window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool SetWindowKeyboardGrab(SdlWindow window, bool grabbed) => + PInvoke.SetWindowKeyboardGrab(window, grabbed ? (byte)1 : (byte)0) != 0; + + /// + /// Set a window's mouse grab mode. + /// + /// the window for which the mouse grab mode should be set. + /// this is true to grab mouse, and false to release. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Mouse grab confines the mouse cursor to the window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetWindowMouseGrab(SdlWindow window, bool grabbed) => + PInvoke.SetWindowMouseGrab(window, grabbed ? (byte)1 : (byte)0) != 0; + + /// + /// Get a window's keyboard grab mode. + /// + /// the window to query. + /// true if keyboard is grabbed, and false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GetWindowKeyboardGrab(SdlWindow window) => PInvoke.GetWindowKeyboardGrab(window) != 0; + + /// + /// Get a window's mouse grab mode. + /// + /// the window to query. + /// true if mouse is grabbed, and false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public static bool GetWindowMouseGrab(SdlWindow window) => PInvoke.GetWindowMouseGrab(window) != 0; + + /// + /// Ergonomic wrapper over SDL_GetGrabbedWindow. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GetGrabbedWindow() => PInvoke.GetGrabbedWindow(); + + /// + /// Confines the cursor to the specified area of a window. + /// + /// the window that will be associated with the barrier. + /// + /// a rectangle area in window-relative coordinates. If NULL the + /// barrier for the specified window will be destroyed. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Note that this does NOT grab the cursor, it only defines the area a cursor + /// is restricted to when the window has mouse focus. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool SetWindowMouseRect(SdlWindow window, SdlRect* rect) => + PInvoke.SetWindowMouseRect(window, rect) != 0; + + /// + /// Set the opacity for a window. + /// + /// the window which will be made transparent or opaque. + /// the opacity value (0.0f - transparent, 1.0f - opaque). + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The parameter opacity will be clamped internally between 0.0f + /// (transparent) and 1.0f (opaque). + /// + /// + /// This function also returns false if setting the opacity isn't supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowOpacity(SdlWindow window, float opacity) => + PInvoke.SetWindowOpacity(window, opacity) != 0; + + /// + /// Get the opacity of a window. + /// + /// the window to get the current opacity value from. + /// + /// the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on + /// failure; call SDL_GetError() for more information. + /// + /// + /// + /// If transparency isn't supported on this platform, opacity will be returned + /// as 1.0f without error. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static float GetWindowOpacity(SdlWindow window) => PInvoke.GetWindowOpacity(window); + + /// + /// Set the window as a child of a parent window. + /// + /// the window that should become the child of a parent. + /// the new parent window for the child window. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is already the child of an existing window, it will be + /// reparented to the new owner. Setting the parent window to NULL unparents + /// the window and removes child window status. + /// + /// + /// If a parent window is hidden or destroyed, the operation will be + /// recursively applied to child windows. Child windows hidden with the parent + /// that did not have their hidden status explicitly set will be restored when + /// the parent is shown. + /// + /// + /// Attempting to set the parent of a window that is currently in the modal + /// state will fail. Use SDL_SetWindowModal() to cancel the modal status before + /// attempting to change the parent. + /// + /// + /// Popup windows cannot change parents and attempts to do so will fail. + /// + /// + /// Setting a parent window that is currently the sibling or descendent of the + /// child window results in undefined behavior. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowParent(SdlWindow window, SdlWindow parent) => + PInvoke.SetWindowParent(window, parent) != 0; + + /// + /// Toggle the state of the window as modal. + /// + /// the window on which to set the modal state. + /// true to toggle modal status on, false to toggle it off. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// To enable modal status on a window, the window must currently be the child + /// window of a parent, or toggling modal status on will fail. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool SetWindowModal(SdlWindow window, bool modal) => + PInvoke.SetWindowModal(window, modal ? (byte)1 : (byte)0) != 0; + + /// + /// Set whether the window may have input focus. + /// + /// the window to set focusable state. + /// true to allow input focus, false to not allow input focus. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool SetWindowFocusable(SdlWindow window, bool focusable) => + PInvoke.SetWindowFocusable(window, focusable ? (byte)1 : (byte)0) != 0; + + /// + /// Display the system-level window menu. + /// + /// the window for which the menu will be displayed. + /// + /// the x coordinate of the menu, relative to the origin (top-left) of + /// the client area. + /// + /// + /// the y coordinate of the menu, relative to the origin (top-left) of + /// the client area. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This default window menu is provided by the system and on some platforms + /// provides functionality for setting or changing privileged state on the + /// window, such as moving it between workspaces or displays, or toggling the + /// always-on-top property. + /// + /// + /// On platforms or desktops where this is unsupported, this function does + /// nothing. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool ShowWindowSystemMenu(SdlWindow window, int x, int y) => + PInvoke.ShowWindowSystemMenu(window, x, y) != 0; + + /// + /// Set the shape of a transparent window. + /// + /// the window. + /// + /// the surface representing the shape of the window, or NULL to + /// remove any current shape. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This sets the alpha channel of a transparent window and any fully + /// transparent areas are also transparent to mouse clicks. If you are using + /// something besides the SDL render API, then you are responsible for drawing + /// the alpha channel of the window to match the shape alpha channel to get + /// consistent cross-platform results. + /// + /// + /// The shape is copied inside this function, so you can free it afterwards. If + /// your shape surface changes, you should call SDL_SetWindowShape() again to + /// update the window. This is an expensive operation, so should be done + /// sparingly. + /// + /// + /// The window must have been created with the SDL_WINDOW_TRANSPARENT flag. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool SetWindowShape(SdlWindow window, SdlSurface* shape) => + PInvoke.SetWindowShape(window, shape) != 0; + + /// + /// Request a window to demand attention from the user. + /// + /// the window to be flashed. + /// the operation to perform. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool FlashWindow(SdlWindow window, SdlFlashOperation operation) => + PInvoke.FlashWindow(window, operation) != 0; + + /// + /// Sets the state of the progress bar for the given window’s taskbar icon. + /// + /// the window whose progress state is to be modified. + /// + /// the progress state. SDL_PROGRESS_STATE_NONE stops displaying + /// the progress bar. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static bool SetWindowProgressState(SdlWindow window, SdlProgressState state) => + PInvoke.SetWindowProgressState(window, state) != 0; + + /// + /// Get the state of the progress bar for the given window’s taskbar icon. + /// + /// the window to get the current progress state from. + /// + /// the progress state, or SDL_PROGRESS_STATE_INVALID on failure; + /// call SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static SdlProgressState GetWindowProgressState(SdlWindow window) => + PInvoke.GetWindowProgressState(window); + + /// + /// Sets the value of the progress bar for the given window’s taskbar icon. + /// + /// the window whose progress value is to be modified. + /// + /// the progress value in the range of [0.0f - 1.0f]. If the value + /// is outside the valid range, it gets clamped. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static bool SetWindowProgressValue(SdlWindow window, float value) => + PInvoke.SetWindowProgressValue(window, value) != 0; + + /// + /// Get the value of the progress bar for the given window’s taskbar icon. + /// + /// the window to get the current progress value from. + /// + /// the progress value in the range of [0.0f - 1.0f], or -1.0f on + /// failure; call SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public static float GetWindowProgressValue(SdlWindow window) => PInvoke.GetWindowProgressValue(window); + + /// + /// Destroy a window. + /// + /// the window to destroy. + /// + /// + /// Any child windows owned by the window will be recursively destroyed as + /// well. + /// + /// + /// Note that on some platforms, the visible window may not actually be removed + /// from the screen until the SDL event loop is pumped again, even though the + /// SDL_Window is no longer valid after this call. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static void DestroyWindow(SdlWindow window) => PInvoke.DestroyWindow(window); + + /// + /// Check whether the screensaver is currently enabled. + /// + /// true if the screensaver is enabled, false if it is disabled. + /// + /// + /// The screensaver is disabled by default. + /// + /// + /// The default can also be changed using SDL_HINT_VIDEO_ALLOW_SCREENSAVER. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool ScreenSaverEnabled() => PInvoke.ScreenSaverEnabled() != 0; + + /// + /// Allow the screen to be blanked by a screen saver. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool EnableScreenSaver() => PInvoke.EnableScreenSaver() != 0; + + /// + /// Prevent the screen from being blanked by a screen saver. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If you disable the screensaver, it is automatically re-enabled when SDL + /// quits. + /// + /// + /// The screensaver is disabled by default, but this may by changed by + /// SDL_HINT_VIDEO_ALLOW_SCREENSAVER. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool DisableScreenSaver() => PInvoke.DisableScreenSaver() != 0; + + /// + /// Dynamically load an OpenGL library. + /// + /// + /// the platform dependent OpenGL library name, or NULL to open the + /// default OpenGL library. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This should be done after initializing the video driver, but before + /// creating any OpenGL windows. If no OpenGL library is loaded, the default + /// library will be loaded upon creation of the first OpenGL window. + /// + /// + /// If you do this, you need to retrieve all of the GL functions used in your + /// program from the dynamic library using SDL_GL_GetProcAddress(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GLLoadLibrary(string path) => PInvoke.GLLoadLibrary(path) != 0; + + /// + /// Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static void GLUnloadLibrary() => PInvoke.GLUnloadLibrary(); + + /// + /// Check if an OpenGL extension is supported for the current context. + /// + /// the name of the extension to check. + /// true if the extension is supported, false otherwise. + /// + /// + /// This function operates on the current GL context; you must have created a + /// context and it must be current before calling this function. Do not assume + /// that all contexts you create will have the same set of extensions + /// available, or that recreating an existing context will offer the same + /// extensions again. + /// + /// + /// While it's probably not a massive overhead, this function is not an O(1) + /// operation. Check the extensions you care about after creating the GL + /// context and save that information somewhere instead of calling the function + /// every time you need to know. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GLExtensionSupported(string extension) => PInvoke.GLExtensionSupported(extension) != 0; + + /// + /// Reset all previously set OpenGL context attributes to their default values. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static void GLResetAttributes() => PInvoke.GLResetAttributes(); + + /// + /// Set an OpenGL window attribute before window creation. + /// + /// an enum value specifying the OpenGL attribute to set. + /// the desired value for the attribute. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets the OpenGL attribute attr to value. The requested + /// attributes should be set before creating an OpenGL window. You should use + /// SDL_GL_GetAttribute() to check the values after creating the OpenGL + /// context, since the values obtained can differ from the requested ones. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public static bool GLSetAttribute(SdlGLAttr attr, int value) => PInvoke.GLSetAttribute(attr, value) != 0; + + /// + /// Get the actual value for an attribute from the current context. + /// + /// + /// an SDL_GLAttr enum value specifying the OpenGL attribute to + /// get. + /// + /// a pointer filled in with the current value of attr. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static bool GLGetAttribute(SdlGLAttr attr, out int value) + { + value = default; + fixed (int* valuePtr = &value) + { + return PInvoke.GLGetAttribute(attr, valuePtr) != 0; + } + } + + /// + /// Create an OpenGL context for an OpenGL window, and make it current. + /// + /// the window to associate with the context. + /// + /// the OpenGL context associated with window or NULL on failure; + /// call SDL_GetError() for more information. + /// + /// + /// + /// The OpenGL context will be created with the current states set through + /// SDL_GL_SetAttribute(). + /// + /// + /// The SDL_Window specified must have been created with the SDL_WINDOW_OPENGL + /// flag, or context creation will fail. + /// + /// + /// Windows users new to OpenGL should note that, for historical reasons, GL + /// functions added after OpenGL version 1.1 are not available by default. + /// Those functions must be loaded at run-time, either with an OpenGL + /// extension-handling library or with SDL_GL_GetProcAddress() and its related + /// functions. + /// + /// + /// SDL_GLContext is opaque to the application. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public static nint GLCreateContext(SdlWindow window) => PInvoke.GLCreateContext(window); + + /// + /// Set up an OpenGL context for rendering into an OpenGL window. + /// + /// the window to associate with the context. + /// the OpenGL context to associate with the window. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The context must have been created with a compatible window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GLMakeCurrent(SdlWindow window, nint context) => + PInvoke.GLMakeCurrent(window, context) != 0; + + /// + /// Ergonomic wrapper over SDL_GL_GetCurrentWindow. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource + /// this call does not own. A null handle is returned on failure. + /// + public static SdlWindow GLGetCurrentWindow() => PInvoke.GLGetCurrentWindow(); + + /// + /// Get the currently active OpenGL context. + /// + /// + /// the currently active OpenGL context or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static nint GLGetCurrentContext() => PInvoke.GLGetCurrentContext(); + + /// + /// Set the swap interval for the current OpenGL context. + /// + /// + /// 0 for immediate updates, 1 for updates synchronized with + /// the vertical retrace, -1 for adaptive vsync. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Some systems allow specifying -1 for the interval, to enable adaptive + /// vsync. Adaptive vsync works the same as vsync, but if you've already missed + /// the vertical retrace for a given frame, it swaps buffers immediately, which + /// might be less jarring for the user during occasional framerate drops. If an + /// application requests adaptive vsync and the system does not support it, + /// this function will fail and return false. In such a case, you should + /// probably retry the call with 1 for the interval. + /// + /// + /// Adaptive vsync is implemented for some glX drivers with + /// GLX_EXT_swap_control_tear, and for some Windows drivers with + /// WGL_EXT_swap_control_tear. + /// + /// + /// Read more on the Khronos wiki: + /// https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GLSetSwapInterval(int interval) => PInvoke.GLSetSwapInterval(interval) != 0; + + /// + /// Get the swap interval for the current OpenGL context. + /// + /// + /// output interval value. 0 if there is no vertical retrace + /// synchronization, 1 if the buffer swap is synchronized with + /// the vertical retrace, and -1 if late swaps happen + /// immediately instead of waiting for the next retrace. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the system can't determine the swap interval, or there isn't a valid + /// current context, this function will set *interval to 0 as a safe default. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GLGetSwapInterval(out int interval) + { + interval = default; + fixed (int* intervalPtr = &interval) + { + return PInvoke.GLGetSwapInterval(intervalPtr) != 0; + } + } + + /// + /// Update a window with OpenGL rendering. + /// + /// the window to change. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is used with double-buffered OpenGL contexts, which are the default. + /// + /// + /// On macOS, make sure you bind 0 to the draw framebuffer before swapping the + /// window, otherwise nothing will happen. If you aren't using + /// glBindFramebuffer(), this is the default and you won't have to do anything + /// extra. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public static bool GLSwapWindow(SdlWindow window) => PInvoke.GLSwapWindow(window) != 0; + + /// + /// Delete an OpenGL context. + /// + /// the OpenGL context to be deleted. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public static bool GLDestroyContext(nint context) => PInvoke.GLDestroyContext(context) != 0; + } + } +} diff --git a/Brutal.Sdl/Generated/Sdl.Constants.gen.cs b/Brutal.Sdl/Generated/Sdl.Constants.gen.cs new file mode 100644 index 0000000..234fc2e --- /dev/null +++ b/Brutal.Sdl/Generated/Sdl.Constants.gen.cs @@ -0,0 +1,797 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static class Constants + { + public const int AlphaOpaque = 255; + public const int AlphaTransparent = 0; + public const int AssertLevel = 2; + public const uint AudioMaskBigEndian = 4096u; + public const uint AudioMaskBitsize = 255u; + public const uint AudioMaskFloat = 256u; + public const uint AudioMaskSigned = 32768u; + public const int BigEndian = 4321; + public const uint BlendmodeAdd = 2u; + public const uint BlendmodeAddPremultiplied = 32u; + public const uint BlendmodeBlend = 1u; + public const uint BlendmodeBlendPremultiplied = 16u; + public const uint BlendmodeInvalid = 2147483647u; + public const uint BlendmodeMod = 4u; + public const uint BlendmodeMul = 8u; + public const uint BlendmodeNone = 0u; + public const int ButtonLeft = 1; + public const int ButtonMiddle = 2; + public const int ButtonRight = 3; + public const int ButtonX1 = 4; + public const int ButtonX2 = 5; + public const int Byteorder = 1234; + public const int CachelineSize = 128; + public const int DebugTextFontCharacterSize = 8; + public const string ElfNoteDlopenPriorityRecommended = "recommended"; + public const string ElfNoteDlopenPriorityRequired = "required"; + public const string ElfNoteDlopenPrioritySuggested = "suggested"; + public const int Floatwordorder = 1234; + public const uint GlobCaseinsensitive = 1u; + public const int GlContextDebugFlag = 1; + public const int GlContextForwardCompatibleFlag = 2; + public const int GlContextProfileCompatibility = 2; + public const int GlContextProfileCore = 1; + public const int GlContextProfileEs = 4; + public const int GlContextReleaseBehaviorFlush = 1; + public const int GlContextReleaseBehaviorNone = 0; + public const int GlContextResetIsolationFlag = 8; + public const int GlContextResetLoseContext = 1; + public const int GlContextResetNoNotification = 0; + public const int GlContextRobustAccessFlag = 4; + public const uint GpuBufferusageComputeStorageRead = 16u; + public const uint GpuBufferusageComputeStorageWrite = 32u; + public const uint GpuBufferusageGraphicsStorageRead = 8u; + public const uint GpuBufferusageIndex = 2u; + public const uint GpuBufferusageIndirect = 4u; + public const uint GpuBufferusageVertex = 1u; + public const uint GpuColorcomponentA = 8u; + public const uint GpuColorcomponentB = 4u; + public const uint GpuColorcomponentG = 2u; + public const uint GpuColorcomponentR = 1u; + public const string GpuRenderer = "gpu"; + public const uint GpuShaderformatDxbc = 4u; + public const uint GpuShaderformatDxil = 8u; + public const int GpuShaderformatInvalid = 0; + public const uint GpuShaderformatMetallib = 32u; + public const uint GpuShaderformatMsl = 16u; + public const uint GpuShaderformatPrivate = 1u; + public const uint GpuShaderformatSpirv = 2u; + public const uint GpuTextureusageColorTarget = 2u; + public const uint GpuTextureusageComputeStorageRead = 16u; + public const uint GpuTextureusageComputeStorageSimultaneousReadWrite = 64u; + public const uint GpuTextureusageComputeStorageWrite = 32u; + public const uint GpuTextureusageDepthStencilTarget = 4u; + public const uint GpuTextureusageGraphicsStorageRead = 8u; + public const uint GpuTextureusageSampler = 1u; + public const uint HapticAutocenter = 131072u; + public const int HapticCartesian = 1; + public const uint HapticConstant = 1u; + public const uint HapticCustom = 32768u; + public const uint HapticDamper = 256u; + public const uint HapticFriction = 1024u; + public const uint HapticGain = 65536u; + public const uint HapticInertia = 512u; + public const uint HapticInfinity = 4294967295u; + public const uint HapticLeftright = 2048u; + public const uint HapticPause = 524288u; + public const int HapticPolar = 0; + public const uint HapticRamp = 64u; + public const uint HapticReserved1 = 4096u; + public const uint HapticReserved2 = 8192u; + public const uint HapticReserved3 = 16384u; + public const uint HapticSawtoothdown = 32u; + public const uint HapticSawtoothup = 16u; + public const uint HapticSine = 2u; + public const int HapticSpherical = 2; + public const uint HapticSpring = 128u; + public const uint HapticSquare = 4u; + public const uint HapticStatus = 262144u; + public const int HapticSteeringAxis = 3; + public const uint HapticTriangle = 8u; + public const uint HatCentered = 0u; + public const uint HatDown = 4u; + public const uint HatLeft = 8u; + public const uint HatLeftdown = 12u; + public const uint HatLeftup = 9u; + public const uint HatRight = 2u; + public const uint HatRightdown = 6u; + public const uint HatRightup = 3u; + public const uint HatUp = 1u; + public const string HintAllowAltTabWhileGrabbed = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"; + public const string HintAndroidAllowRecreateActivity = "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"; + public const string HintAndroidBlockOnPause = "SDL_ANDROID_BLOCK_ON_PAUSE"; + public const string HintAndroidLowLatencyAudio = "SDL_ANDROID_LOW_LATENCY_AUDIO"; + public const string HintAndroidTrapBackButton = "SDL_ANDROID_TRAP_BACK_BUTTON"; + public const string HintAppleTvControllerUiEvents = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"; + public const string HintAppleTvRemoteAllowRotation = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"; + public const string HintAppId = "SDL_APP_ID"; + public const string HintAppName = "SDL_APP_NAME"; + public const string HintAssert = "SDL_ASSERT"; + public const string HintAudioAlsaDefaultDevice = "SDL_AUDIO_ALSA_DEFAULT_DEVICE"; + public const string HintAudioAlsaDefaultPlaybackDevice = "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"; + public const string HintAudioAlsaDefaultRecordingDevice = "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"; + public const string HintAudioCategory = "SDL_AUDIO_CATEGORY"; + public const string HintAudioChannels = "SDL_AUDIO_CHANNELS"; + public const string HintAudioDeviceAppIconName = "SDL_AUDIO_DEVICE_APP_ICON_NAME"; + public const string HintAudioDeviceRawStream = "SDL_AUDIO_DEVICE_RAW_STREAM"; + public const string HintAudioDeviceSampleFrames = "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"; + public const string HintAudioDeviceStreamName = "SDL_AUDIO_DEVICE_STREAM_NAME"; + public const string HintAudioDeviceStreamRole = "SDL_AUDIO_DEVICE_STREAM_ROLE"; + public const string HintAudioDiskInputFile = "SDL_AUDIO_DISK_INPUT_FILE"; + public const string HintAudioDiskOutputFile = "SDL_AUDIO_DISK_OUTPUT_FILE"; + public const string HintAudioDiskTimescale = "SDL_AUDIO_DISK_TIMESCALE"; + public const string HintAudioDriver = "SDL_AUDIO_DRIVER"; + public const string HintAudioDummyTimescale = "SDL_AUDIO_DUMMY_TIMESCALE"; + public const string HintAudioFormat = "SDL_AUDIO_FORMAT"; + public const string HintAudioFrequency = "SDL_AUDIO_FREQUENCY"; + public const string HintAudioIncludeMonitors = "SDL_AUDIO_INCLUDE_MONITORS"; + public const string HintAutoUpdateJoysticks = "SDL_AUTO_UPDATE_JOYSTICKS"; + public const string HintAutoUpdateSensors = "SDL_AUTO_UPDATE_SENSORS"; + public const string HintBmpSaveLegacyFormat = "SDL_BMP_SAVE_LEGACY_FORMAT"; + public const string HintCameraDriver = "SDL_CAMERA_DRIVER"; + public const string HintCpuFeatureMask = "SDL_CPU_FEATURE_MASK"; + public const string HintDisplayUsableBounds = "SDL_DISPLAY_USABLE_BOUNDS"; + public const string HintEglLibrary = "SDL_EGL_LIBRARY"; + public const string HintEmscriptenAsyncify = "SDL_EMSCRIPTEN_ASYNCIFY"; + public const string HintEmscriptenCanvasSelector = "SDL_EMSCRIPTEN_CANVAS_SELECTOR"; + public const string HintEmscriptenKeyboardElement = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"; + public const string HintEnableScreenKeyboard = "SDL_ENABLE_SCREEN_KEYBOARD"; + public const string HintEnableSteamScreenKeyboard = "SDL_ENABLE_STEAM_SCREEN_KEYBOARD"; + public const string HintEvdevDevices = "SDL_EVDEV_DEVICES"; + public const string HintEventLogging = "SDL_EVENT_LOGGING"; + public const string HintFileDialogDriver = "SDL_FILE_DIALOG_DRIVER"; + public const string HintForceRaisewindow = "SDL_FORCE_RAISEWINDOW"; + public const string HintFramebufferAcceleration = "SDL_FRAMEBUFFER_ACCELERATION"; + public const string HintGamecontrollerconfig = "SDL_GAMECONTROLLERCONFIG"; + public const string HintGamecontrollerconfigFile = "SDL_GAMECONTROLLERCONFIG_FILE"; + public const string HintGamecontrollertype = "SDL_GAMECONTROLLERTYPE"; + public const string HintGamecontrollerIgnoreDevices = "SDL_GAMECONTROLLER_IGNORE_DEVICES"; + public const string HintGamecontrollerIgnoreDevicesExcept = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"; + public const string HintGamecontrollerSensorFusion = "SDL_GAMECONTROLLER_SENSOR_FUSION"; + public const string HintGdkTextinputDefaultText = "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"; + public const string HintGdkTextinputDescription = "SDL_GDK_TEXTINPUT_DESCRIPTION"; + public const string HintGdkTextinputMaxLength = "SDL_GDK_TEXTINPUT_MAX_LENGTH"; + public const string HintGdkTextinputScope = "SDL_GDK_TEXTINPUT_SCOPE"; + public const string HintGdkTextinputTitle = "SDL_GDK_TEXTINPUT_TITLE"; + public const string HintGpuDriver = "SDL_GPU_DRIVER"; + public const string HintHidapiEnumerateOnlyControllers = "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"; + public const string HintHidapiIgnoreDevices = "SDL_HIDAPI_IGNORE_DEVICES"; + public const string HintHidapiLibusb = "SDL_HIDAPI_LIBUSB"; + public const string HintHidapiLibusbGamecube = "SDL_HIDAPI_LIBUSB_GAMECUBE"; + public const string HintHidapiLibusbWhitelist = "SDL_HIDAPI_LIBUSB_WHITELIST"; + public const string HintHidapiUdev = "SDL_HIDAPI_UDEV"; + public const string HintImeImplementedUi = "SDL_IME_IMPLEMENTED_UI"; + public const string HintInvalidParamChecks = "SDL_INVALID_PARAM_CHECKS"; + public const string HintIosHideHomeIndicator = "SDL_IOS_HIDE_HOME_INDICATOR"; + public const string HintJoystickAllowBackgroundEvents = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"; + public const string HintJoystickArcadestickDevices = "SDL_JOYSTICK_ARCADESTICK_DEVICES"; + public const string HintJoystickArcadestickDevicesExcluded = "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"; + public const string HintJoystickBlacklistDevices = "SDL_JOYSTICK_BLACKLIST_DEVICES"; + public const string HintJoystickBlacklistDevicesExcluded = "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"; + public const string HintJoystickDevice = "SDL_JOYSTICK_DEVICE"; + public const string HintJoystickDirectinput = "SDL_JOYSTICK_DIRECTINPUT"; + public const string HintJoystickEnhancedReports = "SDL_JOYSTICK_ENHANCED_REPORTS"; + public const string HintJoystickFlightstickDevices = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"; + public const string HintJoystickFlightstickDevicesExcluded = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"; + public const string HintJoystickGamecubeDevices = "SDL_JOYSTICK_GAMECUBE_DEVICES"; + public const string HintJoystickGamecubeDevicesExcluded = "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"; + public const string HintJoystickGameinput = "SDL_JOYSTICK_GAMEINPUT"; + public const string HintJoystickGameinputRaw = "SDL_JOYSTICK_GAMEINPUT_RAW"; + public const string HintJoystickHapticAxes = "SDL_JOYSTICK_HAPTIC_AXES"; + public const string HintJoystickHidapi = "SDL_JOYSTICK_HIDAPI"; + public const string HintJoystickHidapi8bitdo = "SDL_JOYSTICK_HIDAPI_8BITDO"; + public const string HintJoystickHidapiCombineJoyCons = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"; + public const string HintJoystickHidapiFlydigi = "SDL_JOYSTICK_HIDAPI_FLYDIGI"; + public const string HintJoystickHidapiGamecube = "SDL_JOYSTICK_HIDAPI_GAMECUBE"; + public const string HintJoystickHidapiGamecubeRumbleBrake = "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"; + public const string HintJoystickHidapiGip = "SDL_JOYSTICK_HIDAPI_GIP"; + public const string HintJoystickHidapiGipResetForMetadata = "SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA"; + public const string HintJoystickHidapiJoyconHomeLed = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"; + public const string HintJoystickHidapiJoyCons = "SDL_JOYSTICK_HIDAPI_JOY_CONS"; + public const string HintJoystickHidapiLg4ff = "SDL_JOYSTICK_HIDAPI_LG4FF"; + public const string HintJoystickHidapiLuna = "SDL_JOYSTICK_HIDAPI_LUNA"; + public const string HintJoystickHidapiNintendoClassic = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"; + public const string HintJoystickHidapiPs3 = "SDL_JOYSTICK_HIDAPI_PS3"; + public const string HintJoystickHidapiPs3SixaxisDriver = "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"; + public const string HintJoystickHidapiPs4 = "SDL_JOYSTICK_HIDAPI_PS4"; + public const string HintJoystickHidapiPs4ReportInterval = "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"; + public const string HintJoystickHidapiPs5 = "SDL_JOYSTICK_HIDAPI_PS5"; + public const string HintJoystickHidapiPs5PlayerLed = "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"; + public const string HintJoystickHidapiShield = "SDL_JOYSTICK_HIDAPI_SHIELD"; + public const string HintJoystickHidapiSinput = "SDL_JOYSTICK_HIDAPI_SINPUT"; + public const string HintJoystickHidapiStadia = "SDL_JOYSTICK_HIDAPI_STADIA"; + public const string HintJoystickHidapiSteam = "SDL_JOYSTICK_HIDAPI_STEAM"; + public const string HintJoystickHidapiSteamdeck = "SDL_JOYSTICK_HIDAPI_STEAMDECK"; + public const string HintJoystickHidapiSteamHomeLed = "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"; + public const string HintJoystickHidapiSteamHori = "SDL_JOYSTICK_HIDAPI_STEAM_HORI"; + public const string HintJoystickHidapiSwitch = "SDL_JOYSTICK_HIDAPI_SWITCH"; + public const string HintJoystickHidapiSwitch2 = "SDL_JOYSTICK_HIDAPI_SWITCH2"; + public const string HintJoystickHidapiSwitchHomeLed = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"; + public const string HintJoystickHidapiSwitchPlayerLed = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"; + public const string HintJoystickHidapiVerticalJoyCons = "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"; + public const string HintJoystickHidapiWii = "SDL_JOYSTICK_HIDAPI_WII"; + public const string HintJoystickHidapiWiiPlayerLed = "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"; + public const string HintJoystickHidapiXbox = "SDL_JOYSTICK_HIDAPI_XBOX"; + public const string HintJoystickHidapiXbox360 = "SDL_JOYSTICK_HIDAPI_XBOX_360"; + public const string HintJoystickHidapiXbox360PlayerLed = "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"; + public const string HintJoystickHidapiXbox360Wireless = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"; + public const string HintJoystickHidapiXboxOne = "SDL_JOYSTICK_HIDAPI_XBOX_ONE"; + public const string HintJoystickHidapiXboxOneHomeLed = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"; + public const string HintJoystickHidapiZuiki = "SDL_JOYSTICK_HIDAPI_ZUIKI"; + public const string HintJoystickIokit = "SDL_JOYSTICK_IOKIT"; + public const string HintJoystickLinuxClassic = "SDL_JOYSTICK_LINUX_CLASSIC"; + public const string HintJoystickLinuxDeadzones = "SDL_JOYSTICK_LINUX_DEADZONES"; + public const string HintJoystickLinuxDigitalHats = "SDL_JOYSTICK_LINUX_DIGITAL_HATS"; + public const string HintJoystickLinuxHatDeadzones = "SDL_JOYSTICK_LINUX_HAT_DEADZONES"; + public const string HintJoystickMfi = "SDL_JOYSTICK_MFI"; + public const string HintJoystickRawinput = "SDL_JOYSTICK_RAWINPUT"; + public const string HintJoystickRawinputCorrelateXinput = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"; + public const string HintJoystickRogChakram = "SDL_JOYSTICK_ROG_CHAKRAM"; + public const string HintJoystickThread = "SDL_JOYSTICK_THREAD"; + public const string HintJoystickThrottleDevices = "SDL_JOYSTICK_THROTTLE_DEVICES"; + public const string HintJoystickThrottleDevicesExcluded = "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"; + public const string HintJoystickWgi = "SDL_JOYSTICK_WGI"; + public const string HintJoystickWheelDevices = "SDL_JOYSTICK_WHEEL_DEVICES"; + public const string HintJoystickWheelDevicesExcluded = "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"; + public const string HintJoystickZeroCenteredDevices = "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"; + public const string HintKeycodeOptions = "SDL_KEYCODE_OPTIONS"; + public const string HintKmsdrmAtomic = "SDL_KMSDRM_ATOMIC"; + public const string HintKmsdrmDeviceIndex = "SDL_KMSDRM_DEVICE_INDEX"; + public const string HintKmsdrmRequireDrmMaster = "SDL_KMSDRM_REQUIRE_DRM_MASTER"; + public const string HintLogging = "SDL_LOGGING"; + public const string HintMacBackgroundApp = "SDL_MAC_BACKGROUND_APP"; + public const string HintMacCtrlClickEmulateRightClick = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"; + public const string HintMacOpenglAsyncDispatch = "SDL_MAC_OPENGL_ASYNC_DISPATCH"; + public const string HintMacOptionAsAlt = "SDL_MAC_OPTION_AS_ALT"; + public const string HintMacPressAndHold = "SDL_MAC_PRESS_AND_HOLD"; + public const string HintMacScrollMomentum = "SDL_MAC_SCROLL_MOMENTUM"; + public const string HintMainCallbackRate = "SDL_MAIN_CALLBACK_RATE"; + public const string HintMouseAutoCapture = "SDL_MOUSE_AUTO_CAPTURE"; + public const string HintMouseDefaultSystemCursor = "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"; + public const string HintMouseDoubleClickRadius = "SDL_MOUSE_DOUBLE_CLICK_RADIUS"; + public const string HintMouseDoubleClickTime = "SDL_MOUSE_DOUBLE_CLICK_TIME"; + public const string HintMouseDpiScaleCursors = "SDL_MOUSE_DPI_SCALE_CURSORS"; + public const string HintMouseEmulateWarpWithRelative = "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"; + public const string HintMouseFocusClickthrough = "SDL_MOUSE_FOCUS_CLICKTHROUGH"; + public const string HintMouseNormalSpeedScale = "SDL_MOUSE_NORMAL_SPEED_SCALE"; + public const string HintMouseRelativeCursorVisible = "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"; + public const string HintMouseRelativeModeCenter = "SDL_MOUSE_RELATIVE_MODE_CENTER"; + public const string HintMouseRelativeSpeedScale = "SDL_MOUSE_RELATIVE_SPEED_SCALE"; + public const string HintMouseRelativeSystemScale = "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"; + public const string HintMouseRelativeWarpMotion = "SDL_MOUSE_RELATIVE_WARP_MOTION"; + public const string HintMouseTouchEvents = "SDL_MOUSE_TOUCH_EVENTS"; + public const string HintMuteConsoleKeyboard = "SDL_MUTE_CONSOLE_KEYBOARD"; + public const string HintNoSignalHandlers = "SDL_NO_SIGNAL_HANDLERS"; + public const string HintOpenglEsDriver = "SDL_OPENGL_ES_DRIVER"; + public const string HintOpenglForceSrgbFramebuffer = "SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER"; + public const string HintOpenglLibrary = "SDL_OPENGL_LIBRARY"; + public const string HintOpenvrLibrary = "SDL_OPENVR_LIBRARY"; + public const string HintOrientations = "SDL_ORIENTATIONS"; + public const string HintPenMouseEvents = "SDL_PEN_MOUSE_EVENTS"; + public const string HintPenTouchEvents = "SDL_PEN_TOUCH_EVENTS"; + public const string HintPollSentinel = "SDL_POLL_SENTINEL"; + public const string HintPreferredLocales = "SDL_PREFERRED_LOCALES"; + public const string HintPs2GsHeight = "SDL_PS2_GS_HEIGHT"; + public const string HintPs2GsMode = "SDL_PS2_GS_MODE"; + public const string HintPs2GsProgressive = "SDL_PS2_GS_PROGRESSIVE"; + public const string HintPs2GsWidth = "SDL_PS2_GS_WIDTH"; + public const string HintQuitOnLastWindowClose = "SDL_QUIT_ON_LAST_WINDOW_CLOSE"; + public const string HintRenderDirect3d11Debug = "SDL_RENDER_DIRECT3D11_DEBUG"; + public const string HintRenderDirect3d11Warp = "SDL_RENDER_DIRECT3D11_WARP"; + public const string HintRenderDirect3dThreadsafe = "SDL_RENDER_DIRECT3D_THREADSAFE"; + public const string HintRenderDriver = "SDL_RENDER_DRIVER"; + public const string HintRenderGpuDebug = "SDL_RENDER_GPU_DEBUG"; + public const string HintRenderGpuLowPower = "SDL_RENDER_GPU_LOW_POWER"; + public const string HintRenderLineMethod = "SDL_RENDER_LINE_METHOD"; + public const string HintRenderMetalPreferLowPowerDevice = "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"; + public const string HintRenderVsync = "SDL_RENDER_VSYNC"; + public const string HintRenderVulkanDebug = "SDL_RENDER_VULKAN_DEBUG"; + public const string HintReturnKeyHidesIme = "SDL_RETURN_KEY_HIDES_IME"; + public const string HintRogGamepadMice = "SDL_ROG_GAMEPAD_MICE"; + public const string HintRogGamepadMiceExcluded = "SDL_ROG_GAMEPAD_MICE_EXCLUDED"; + public const string HintRpiVideoLayer = "SDL_RPI_VIDEO_LAYER"; + public const string HintScreensaverInhibitActivityName = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"; + public const string HintShutdownDbusOnQuit = "SDL_SHUTDOWN_DBUS_ON_QUIT"; + public const string HintStorageTitleDriver = "SDL_STORAGE_TITLE_DRIVER"; + public const string HintStorageUserDriver = "SDL_STORAGE_USER_DRIVER"; + public const string HintThreadForceRealtimeTimeCritical = "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"; + public const string HintThreadPriorityPolicy = "SDL_THREAD_PRIORITY_POLICY"; + public const string HintTimerResolution = "SDL_TIMER_RESOLUTION"; + public const string HintTouchMouseEvents = "SDL_TOUCH_MOUSE_EVENTS"; + public const string HintTrackpadIsTouchOnly = "SDL_TRACKPAD_IS_TOUCH_ONLY"; + public const string HintTvRemoteAsJoystick = "SDL_TV_REMOTE_AS_JOYSTICK"; + public const string HintVideoAllowScreensaver = "SDL_VIDEO_ALLOW_SCREENSAVER"; + public const string HintVideoDisplayPriority = "SDL_VIDEO_DISPLAY_PRIORITY"; + public const string HintVideoDoubleBuffer = "SDL_VIDEO_DOUBLE_BUFFER"; + public const string HintVideoDriver = "SDL_VIDEO_DRIVER"; + public const string HintVideoDummySaveFrames = "SDL_VIDEO_DUMMY_SAVE_FRAMES"; + public const string HintVideoEglAllowGetdisplayFallback = "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"; + public const string HintVideoForceEgl = "SDL_VIDEO_FORCE_EGL"; + public const string HintVideoMacFullscreenMenuVisibility = "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"; + public const string HintVideoMacFullscreenSpaces = "SDL_VIDEO_MAC_FULLSCREEN_SPACES"; + public const string HintVideoMatchExclusiveModeOnMove = "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"; + public const string HintVideoMetalAutoResizeDrawable = "SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE"; + public const string HintVideoMinimizeOnFocusLoss = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"; + public const string HintVideoOffscreenSaveFrames = "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"; + public const string HintVideoSyncWindowOperations = "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"; + public const string HintVideoWaylandAllowLibdecor = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"; + public const string HintVideoWaylandModeEmulation = "SDL_VIDEO_WAYLAND_MODE_EMULATION"; + public const string HintVideoWaylandModeScaling = "SDL_VIDEO_WAYLAND_MODE_SCALING"; + public const string HintVideoWaylandPreferLibdecor = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"; + public const string HintVideoWaylandScaleToDisplay = "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"; + public const string HintVideoWinD3dcompiler = "SDL_VIDEO_WIN_D3DCOMPILER"; + public const string HintVideoX11EnableXsyncExt = "SDL_VIDEO_X11_ENABLE_XSYNC_EXT"; + public const string HintVideoX11ExternalWindowInput = "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"; + public const string HintVideoX11NetWmBypassCompositor = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"; + public const string HintVideoX11NetWmPing = "SDL_VIDEO_X11_NET_WM_PING"; + public const string HintVideoX11Nodirectcolor = "SDL_VIDEO_X11_NODIRECTCOLOR"; + public const string HintVideoX11ScalingFactor = "SDL_VIDEO_X11_SCALING_FACTOR"; + public const string HintVideoX11Visualid = "SDL_VIDEO_X11_VISUALID"; + public const string HintVideoX11WindowVisualid = "SDL_VIDEO_X11_WINDOW_VISUALID"; + public const string HintVideoX11Xrandr = "SDL_VIDEO_X11_XRANDR"; + public const string HintVitaEnableBackTouch = "SDL_VITA_ENABLE_BACK_TOUCH"; + public const string HintVitaEnableFrontTouch = "SDL_VITA_ENABLE_FRONT_TOUCH"; + public const string HintVitaModulePath = "SDL_VITA_MODULE_PATH"; + public const string HintVitaPvrInit = "SDL_VITA_PVR_INIT"; + public const string HintVitaPvrOpengl = "SDL_VITA_PVR_OPENGL"; + public const string HintVitaResolution = "SDL_VITA_RESOLUTION"; + public const string HintVitaTouchMouseDevice = "SDL_VITA_TOUCH_MOUSE_DEVICE"; + public const string HintVulkanDisplay = "SDL_VULKAN_DISPLAY"; + public const string HintVulkanLibrary = "SDL_VULKAN_LIBRARY"; + public const string HintWaveChunkLimit = "SDL_WAVE_CHUNK_LIMIT"; + public const string HintWaveFactChunk = "SDL_WAVE_FACT_CHUNK"; + public const string HintWaveRiffChunkSize = "SDL_WAVE_RIFF_CHUNK_SIZE"; + public const string HintWaveTruncation = "SDL_WAVE_TRUNCATION"; + public const string HintWindowsCloseOnAltF4 = "SDL_WINDOWS_CLOSE_ON_ALT_F4"; + public const string HintWindowsEnableMenuMnemonics = "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"; + public const string HintWindowsEnableMessageloop = "SDL_WINDOWS_ENABLE_MESSAGELOOP"; + public const string HintWindowsEraseBackgroundMode = "SDL_WINDOWS_ERASE_BACKGROUND_MODE"; + public const string HintWindowsForceSemaphoreKernel = "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"; + public const string HintWindowsGameinput = "SDL_WINDOWS_GAMEINPUT"; + public const string HintWindowsIntresourceIcon = "SDL_WINDOWS_INTRESOURCE_ICON"; + public const string HintWindowsIntresourceIconSmall = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"; + public const string HintWindowsRawKeyboard = "SDL_WINDOWS_RAW_KEYBOARD"; + public const string HintWindowsRawKeyboardExcludeHotkeys = "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"; + public const string HintWindowsRawKeyboardInputsink = "SDL_WINDOWS_RAW_KEYBOARD_INPUTSINK"; + public const string HintWindowsUseD3d9ex = "SDL_WINDOWS_USE_D3D9EX"; + public const string HintWindowActivateWhenRaised = "SDL_WINDOW_ACTIVATE_WHEN_RAISED"; + public const string HintWindowActivateWhenShown = "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"; + public const string HintWindowAllowTopmost = "SDL_WINDOW_ALLOW_TOPMOST"; + public const string HintWindowFrameUsableWhileCursorHidden = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"; + public const string HintX11ForceOverrideRedirect = "SDL_X11_FORCE_OVERRIDE_REDIRECT"; + public const string HintX11WindowType = "SDL_X11_WINDOW_TYPE"; + public const string HintX11XcbLibrary = "SDL_X11_XCB_LIBRARY"; + public const string HintXinputEnabled = "SDL_XINPUT_ENABLED"; + public const uint InitAudio = 16u; + public const uint InitCamera = 65536u; + public const uint InitEvents = 16384u; + public const uint InitGamepad = 8192u; + public const uint InitHaptic = 4096u; + public const uint InitJoystick = 512u; + public const uint InitSensor = 32768u; + public const uint InitVideo = 32u; + public const int InvalidUnicodeCodepoint = 65533; + public const int JoystickAxisMax = 32767; + public const int JoystickAxisMin = -32768; + public const uint KmodAlt = 768u; + public const uint KmodCaps = 8192u; + public const uint KmodCtrl = 192u; + public const uint KmodGui = 3072u; + public const uint KmodLalt = 256u; + public const uint KmodLctrl = 64u; + public const uint KmodLevel5 = 4u; + public const uint KmodLgui = 1024u; + public const uint KmodLshift = 1u; + public const uint KmodMode = 16384u; + public const uint KmodNone = 0u; + public const uint KmodNum = 4096u; + public const uint KmodRalt = 512u; + public const uint KmodRctrl = 128u; + public const uint KmodRgui = 2048u; + public const uint KmodRshift = 2u; + public const uint KmodScroll = 32768u; + public const uint KmodShift = 3u; + public const int LilEndian = 1234; + public const int MajorVersion = 3; + public const long MaxSint64 = 9223372036854775807L; + public const long MaxTime = 9223372036854775807L; + public const ulong MaxUint64 = 18446744073709551615uL; + public const uint MessageboxButtonsLeftToRight = 128u; + public const uint MessageboxButtonsRightToLeft = 256u; + public const uint MessageboxButtonEscapekeyDefault = 2u; + public const uint MessageboxButtonReturnkeyDefault = 1u; + public const uint MessageboxError = 16u; + public const uint MessageboxInformation = 64u; + public const uint MessageboxWarning = 32u; + public const int MicroVersion = 12; + public const int MinorVersion = 4; + public const ulong MinUint64 = 0uL; + public const int MsPerSecond = 1000; + public const int NsPerMs = 1000000; + public const int NsPerSecond = 1000000000; + public const int NsPerUs = 1000; + public const int NullWhileLoopCondition = 0; + public const uint PenInputButton1 = 2u; + public const uint PenInputButton2 = 4u; + public const uint PenInputButton3 = 8u; + public const uint PenInputButton4 = 16u; + public const uint PenInputButton5 = 32u; + public const uint PenInputDown = 1u; + public const uint PenInputEraserTip = 1073741824u; + public const uint PenInputInProximity = 2147483648u; + public const int PlatformApple = 1; + public const int PlatformMacos = 1; + public const string PrillPrefix = "ll"; + public const string PropAppMetadataCopyrightString = "SDL.app.metadata.copyright"; + public const string PropAppMetadataCreatorString = "SDL.app.metadata.creator"; + public const string PropAppMetadataIdentifierString = "SDL.app.metadata.identifier"; + public const string PropAppMetadataNameString = "SDL.app.metadata.name"; + public const string PropAppMetadataTypeString = "SDL.app.metadata.type"; + public const string PropAppMetadataUrlString = "SDL.app.metadata.url"; + public const string PropAppMetadataVersionString = "SDL.app.metadata.version"; + public const string PropAudiostreamAutoCleanupBoolean = "SDL.audiostream.auto_cleanup"; + public const string PropDisplayHdrEnabledBoolean = "SDL.display.HDR_enabled"; + public const string PropDisplayKmsdrmPanelOrientationNumber = "SDL.display.KMSDRM.panel_orientation"; + public const string PropDisplayWaylandWlOutputPointer = "SDL.display.wayland.wl_output"; + public const string PropDisplayWindowsHmonitorPointer = "SDL.display.windows.hmonitor"; + public const string PropFileDialogAcceptString = "SDL.filedialog.accept"; + public const string PropFileDialogCancelString = "SDL.filedialog.cancel"; + public const string PropFileDialogFiltersPointer = "SDL.filedialog.filters"; + public const string PropFileDialogLocationString = "SDL.filedialog.location"; + public const string PropFileDialogManyBoolean = "SDL.filedialog.many"; + public const string PropFileDialogNfiltersNumber = "SDL.filedialog.nfilters"; + public const string PropFileDialogTitleString = "SDL.filedialog.title"; + public const string PropFileDialogWindowPointer = "SDL.filedialog.window"; + public const string PropGlobalVideoWaylandWlDisplayPointer = "SDL.video.wayland.wl_display"; + public const string PropGpuBufferCreateNameString = "SDL.gpu.buffer.create.name"; + public const string PropGpuComputepipelineCreateNameString = "SDL.gpu.computepipeline.create.name"; + public const string PropGpuDeviceCreateD3d12AgilitySdkPathString = + "SDL.gpu.device.create.d3d12.agility_sdk_path"; + public const string PropGpuDeviceCreateD3d12AgilitySdkVersionNumber = + "SDL.gpu.device.create.d3d12.agility_sdk_version"; + public const string PropGpuDeviceCreateD3d12AllowFewerResourceSlotsBoolean = + "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"; + public const string PropGpuDeviceCreateD3d12SemanticNameString = "SDL.gpu.device.create.d3d12.semantic"; + public const string PropGpuDeviceCreateDebugmodeBoolean = "SDL.gpu.device.create.debugmode"; + public const string PropGpuDeviceCreateFeatureAnisotropyBoolean = + "SDL.gpu.device.create.feature.anisotropy"; + public const string PropGpuDeviceCreateFeatureClipDistanceBoolean = + "SDL.gpu.device.create.feature.clip_distance"; + public const string PropGpuDeviceCreateFeatureDepthClampingBoolean = + "SDL.gpu.device.create.feature.depth_clamping"; + public const string PropGpuDeviceCreateFeatureIndirectDrawFirstInstanceBoolean = + "SDL.gpu.device.create.feature.indirect_draw_first_instance"; + public const string PropGpuDeviceCreateMetalAllowMacfamily1Boolean = + "SDL.gpu.device.create.metal.allowmacfamily1"; + public const string PropGpuDeviceCreateNameString = "SDL.gpu.device.create.name"; + public const string PropGpuDeviceCreatePreferlowpowerBoolean = "SDL.gpu.device.create.preferlowpower"; + public const string PropGpuDeviceCreateShadersDxbcBoolean = "SDL.gpu.device.create.shaders.dxbc"; + public const string PropGpuDeviceCreateShadersDxilBoolean = "SDL.gpu.device.create.shaders.dxil"; + public const string PropGpuDeviceCreateShadersMetallibBoolean = "SDL.gpu.device.create.shaders.metallib"; + public const string PropGpuDeviceCreateShadersMslBoolean = "SDL.gpu.device.create.shaders.msl"; + public const string PropGpuDeviceCreateShadersPrivateBoolean = "SDL.gpu.device.create.shaders.private"; + public const string PropGpuDeviceCreateShadersSpirvBoolean = "SDL.gpu.device.create.shaders.spirv"; + public const string PropGpuDeviceCreateVerboseBoolean = "SDL.gpu.device.create.verbose"; + public const string PropGpuDeviceCreateVulkanOptionsPointer = "SDL.gpu.device.create.vulkan.options"; + public const string PropGpuDeviceCreateVulkanRequireHardwareAccelerationBoolean = + "SDL.gpu.device.create.vulkan.requirehardwareacceleration"; + public const string PropGpuDeviceDriverInfoString = "SDL.gpu.device.driver_info"; + public const string PropGpuDeviceDriverNameString = "SDL.gpu.device.driver_name"; + public const string PropGpuDeviceDriverVersionString = "SDL.gpu.device.driver_version"; + public const string PropGpuDeviceNameString = "SDL.gpu.device.name"; + public const string PropGpuGraphicspipelineCreateNameString = "SDL.gpu.graphicspipeline.create.name"; + public const string PropGpuSamplerCreateNameString = "SDL.gpu.sampler.create.name"; + public const string PropGpuShaderCreateNameString = "SDL.gpu.shader.create.name"; + public const string PropGpuTextureCreateD3d12ClearAFloat = "SDL.gpu.texture.create.d3d12.clear.a"; + public const string PropGpuTextureCreateD3d12ClearBFloat = "SDL.gpu.texture.create.d3d12.clear.b"; + public const string PropGpuTextureCreateD3d12ClearDepthFloat = "SDL.gpu.texture.create.d3d12.clear.depth"; + public const string PropGpuTextureCreateD3d12ClearGFloat = "SDL.gpu.texture.create.d3d12.clear.g"; + public const string PropGpuTextureCreateD3d12ClearRFloat = "SDL.gpu.texture.create.d3d12.clear.r"; + public const string PropGpuTextureCreateD3d12ClearStencilNumber = + "SDL.gpu.texture.create.d3d12.clear.stencil"; + public const string PropGpuTextureCreateNameString = "SDL.gpu.texture.create.name"; + public const string PropGpuTransferbufferCreateNameString = "SDL.gpu.transferbuffer.create.name"; + public const string PropHidapiLibusbDeviceHandlePointer = "SDL.hidapi.libusb.device.handle"; + public const string PropIostreamAndroidAassetPointer = "SDL.iostream.android.aasset"; + public const string PropIostreamDynamicChunksizeNumber = "SDL.iostream.dynamic.chunksize"; + public const string PropIostreamDynamicMemoryPointer = "SDL.iostream.dynamic.memory"; + public const string PropIostreamFileDescriptorNumber = "SDL.iostream.file_descriptor"; + public const string PropIostreamMemoryFreeFuncPointer = "SDL.iostream.memory.free"; + public const string PropIostreamMemoryPointer = "SDL.iostream.memory.base"; + public const string PropIostreamMemorySizeNumber = "SDL.iostream.memory.size"; + public const string PropIostreamStdioFilePointer = "SDL.iostream.stdio.file"; + public const string PropIostreamWindowsHandlePointer = "SDL.iostream.windows.handle"; + public const string PropJoystickCapMonoLedBoolean = "SDL.joystick.cap.mono_led"; + public const string PropJoystickCapPlayerLedBoolean = "SDL.joystick.cap.player_led"; + public const string PropJoystickCapRgbLedBoolean = "SDL.joystick.cap.rgb_led"; + public const string PropJoystickCapRumbleBoolean = "SDL.joystick.cap.rumble"; + public const string PropJoystickCapTriggerRumbleBoolean = "SDL.joystick.cap.trigger_rumble"; + public const string PropNameString = "SDL.name"; + public const string PropProcessBackgroundBoolean = "SDL.process.background"; + public const string PropProcessCreateArgsPointer = "SDL.process.create.args"; + public const string PropProcessCreateBackgroundBoolean = "SDL.process.create.background"; + public const string PropProcessCreateCmdlineString = "SDL.process.create.cmdline"; + public const string PropProcessCreateEnvironmentPointer = "SDL.process.create.environment"; + public const string PropProcessCreateStderrNumber = "SDL.process.create.stderr_option"; + public const string PropProcessCreateStderrPointer = "SDL.process.create.stderr_source"; + public const string PropProcessCreateStderrToStdoutBoolean = "SDL.process.create.stderr_to_stdout"; + public const string PropProcessCreateStdinNumber = "SDL.process.create.stdin_option"; + public const string PropProcessCreateStdinPointer = "SDL.process.create.stdin_source"; + public const string PropProcessCreateStdoutNumber = "SDL.process.create.stdout_option"; + public const string PropProcessCreateStdoutPointer = "SDL.process.create.stdout_source"; + public const string PropProcessCreateWorkingDirectoryString = "SDL.process.create.working_directory"; + public const string PropProcessPidNumber = "SDL.process.pid"; + public const string PropProcessStderrPointer = "SDL.process.stderr"; + public const string PropProcessStdinPointer = "SDL.process.stdin"; + public const string PropProcessStdoutPointer = "SDL.process.stdout"; + public const string PropRendererCreateGpuDevicePointer = "SDL.renderer.create.gpu.device"; + public const string PropRendererCreateGpuShadersDxilBoolean = "SDL.renderer.create.gpu.shaders_dxil"; + public const string PropRendererCreateGpuShadersMslBoolean = "SDL.renderer.create.gpu.shaders_msl"; + public const string PropRendererCreateGpuShadersSpirvBoolean = "SDL.renderer.create.gpu.shaders_spirv"; + public const string PropRendererCreateNameString = "SDL.renderer.create.name"; + public const string PropRendererCreateOutputColorspaceNumber = "SDL.renderer.create.output_colorspace"; + public const string PropRendererCreatePresentVsyncNumber = "SDL.renderer.create.present_vsync"; + public const string PropRendererCreateSurfacePointer = "SDL.renderer.create.surface"; + public const string PropRendererCreateVulkanDevicePointer = "SDL.renderer.create.vulkan.device"; + public const string PropRendererCreateVulkanGraphicsQueueFamilyIndexNumber = + "SDL.renderer.create.vulkan.graphics_queue_family_index"; + public const string PropRendererCreateVulkanInstancePointer = "SDL.renderer.create.vulkan.instance"; + public const string PropRendererCreateVulkanPhysicalDevicePointer = + "SDL.renderer.create.vulkan.physical_device"; + public const string PropRendererCreateVulkanPresentQueueFamilyIndexNumber = + "SDL.renderer.create.vulkan.present_queue_family_index"; + public const string PropRendererCreateVulkanSurfaceNumber = "SDL.renderer.create.vulkan.surface"; + public const string PropRendererCreateWindowPointer = "SDL.renderer.create.window"; + public const string PropRendererD3d11DevicePointer = "SDL.renderer.d3d11.device"; + public const string PropRendererD3d11SwapchainPointer = "SDL.renderer.d3d11.swap_chain"; + public const string PropRendererD3d12CommandQueuePointer = "SDL.renderer.d3d12.command_queue"; + public const string PropRendererD3d12DevicePointer = "SDL.renderer.d3d12.device"; + public const string PropRendererD3d12SwapchainPointer = "SDL.renderer.d3d12.swap_chain"; + public const string PropRendererD3d9DevicePointer = "SDL.renderer.d3d9.device"; + public const string PropRendererGpuDevicePointer = "SDL.renderer.gpu.device"; + public const string PropRendererHdrEnabledBoolean = "SDL.renderer.HDR_enabled"; + public const string PropRendererHdrHeadroomFloat = "SDL.renderer.HDR_headroom"; + public const string PropRendererMaxTextureSizeNumber = "SDL.renderer.max_texture_size"; + public const string PropRendererNameString = "SDL.renderer.name"; + public const string PropRendererOutputColorspaceNumber = "SDL.renderer.output_colorspace"; + public const string PropRendererSdrWhitePointFloat = "SDL.renderer.SDR_white_point"; + public const string PropRendererSurfacePointer = "SDL.renderer.surface"; + public const string PropRendererTextureFormatsPointer = "SDL.renderer.texture_formats"; + public const string PropRendererTextureWrappingBoolean = "SDL.renderer.texture_wrapping"; + public const string PropRendererVsyncNumber = "SDL.renderer.vsync"; + public const string PropRendererVulkanDevicePointer = "SDL.renderer.vulkan.device"; + public const string PropRendererVulkanGraphicsQueueFamilyIndexNumber = + "SDL.renderer.vulkan.graphics_queue_family_index"; + public const string PropRendererVulkanInstancePointer = "SDL.renderer.vulkan.instance"; + public const string PropRendererVulkanPhysicalDevicePointer = "SDL.renderer.vulkan.physical_device"; + public const string PropRendererVulkanPresentQueueFamilyIndexNumber = + "SDL.renderer.vulkan.present_queue_family_index"; + public const string PropRendererVulkanSurfaceNumber = "SDL.renderer.vulkan.surface"; + public const string PropRendererVulkanSwapchainImageCountNumber = + "SDL.renderer.vulkan.swapchain_image_count"; + public const string PropRendererWindowPointer = "SDL.renderer.window"; + public const string PropSurfaceHdrHeadroomFloat = "SDL.surface.HDR_headroom"; + public const string PropSurfaceHotspotXNumber = "SDL.surface.hotspot.x"; + public const string PropSurfaceHotspotYNumber = "SDL.surface.hotspot.y"; + public const string PropSurfaceRotationFloat = "SDL.surface.rotation"; + public const string PropSurfaceSdrWhitePointFloat = "SDL.surface.SDR_white_point"; + public const string PropSurfaceTonemapOperatorString = "SDL.surface.tonemap"; + public const string PropTextinputAndroidInputtypeNumber = "SDL.textinput.android.inputtype"; + public const string PropTextinputAutocorrectBoolean = "SDL.textinput.autocorrect"; + public const string PropTextinputCapitalizationNumber = "SDL.textinput.capitalization"; + public const string PropTextinputMultilineBoolean = "SDL.textinput.multiline"; + public const string PropTextinputTypeNumber = "SDL.textinput.type"; + public const string PropTextureAccessNumber = "SDL.texture.access"; + public const string PropTextureColorspaceNumber = "SDL.texture.colorspace"; + public const string PropTextureCreateAccessNumber = "SDL.texture.create.access"; + public const string PropTextureCreateColorspaceNumber = "SDL.texture.create.colorspace"; + public const string PropTextureCreateD3d11TexturePointer = "SDL.texture.create.d3d11.texture"; + public const string PropTextureCreateD3d11TextureUPointer = "SDL.texture.create.d3d11.texture_u"; + public const string PropTextureCreateD3d11TextureVPointer = "SDL.texture.create.d3d11.texture_v"; + public const string PropTextureCreateD3d12TexturePointer = "SDL.texture.create.d3d12.texture"; + public const string PropTextureCreateD3d12TextureUPointer = "SDL.texture.create.d3d12.texture_u"; + public const string PropTextureCreateD3d12TextureVPointer = "SDL.texture.create.d3d12.texture_v"; + public const string PropTextureCreateFormatNumber = "SDL.texture.create.format"; + public const string PropTextureCreateGpuTexturePointer = "SDL.texture.create.gpu.texture"; + public const string PropTextureCreateGpuTextureUvPointer = "SDL.texture.create.gpu.texture_uv"; + public const string PropTextureCreateGpuTextureUPointer = "SDL.texture.create.gpu.texture_u"; + public const string PropTextureCreateGpuTextureVPointer = "SDL.texture.create.gpu.texture_v"; + public const string PropTextureCreateHdrHeadroomFloat = "SDL.texture.create.HDR_headroom"; + public const string PropTextureCreateHeightNumber = "SDL.texture.create.height"; + public const string PropTextureCreateMetalPixelbufferPointer = "SDL.texture.create.metal.pixelbuffer"; + public const string PropTextureCreateOpengles2TextureNumber = "SDL.texture.create.opengles2.texture"; + public const string PropTextureCreateOpengles2TextureUvNumber = "SDL.texture.create.opengles2.texture_uv"; + public const string PropTextureCreateOpengles2TextureUNumber = "SDL.texture.create.opengles2.texture_u"; + public const string PropTextureCreateOpengles2TextureVNumber = "SDL.texture.create.opengles2.texture_v"; + public const string PropTextureCreateOpenglTextureNumber = "SDL.texture.create.opengl.texture"; + public const string PropTextureCreateOpenglTextureUvNumber = "SDL.texture.create.opengl.texture_uv"; + public const string PropTextureCreateOpenglTextureUNumber = "SDL.texture.create.opengl.texture_u"; + public const string PropTextureCreateOpenglTextureVNumber = "SDL.texture.create.opengl.texture_v"; + public const string PropTextureCreatePalettePointer = "SDL.texture.create.palette"; + public const string PropTextureCreateSdrWhitePointFloat = "SDL.texture.create.SDR_white_point"; + public const string PropTextureCreateVulkanLayoutNumber = "SDL.texture.create.vulkan.layout"; + public const string PropTextureCreateVulkanTextureNumber = "SDL.texture.create.vulkan.texture"; + public const string PropTextureCreateWidthNumber = "SDL.texture.create.width"; + public const string PropTextureD3d11TexturePointer = "SDL.texture.d3d11.texture"; + public const string PropTextureD3d11TextureUPointer = "SDL.texture.d3d11.texture_u"; + public const string PropTextureD3d11TextureVPointer = "SDL.texture.d3d11.texture_v"; + public const string PropTextureD3d12TexturePointer = "SDL.texture.d3d12.texture"; + public const string PropTextureD3d12TextureUPointer = "SDL.texture.d3d12.texture_u"; + public const string PropTextureD3d12TextureVPointer = "SDL.texture.d3d12.texture_v"; + public const string PropTextureFormatNumber = "SDL.texture.format"; + public const string PropTextureGpuTexturePointer = "SDL.texture.gpu.texture"; + public const string PropTextureGpuTextureUvPointer = "SDL.texture.gpu.texture_uv"; + public const string PropTextureGpuTextureUPointer = "SDL.texture.gpu.texture_u"; + public const string PropTextureGpuTextureVPointer = "SDL.texture.gpu.texture_v"; + public const string PropTextureHdrHeadroomFloat = "SDL.texture.HDR_headroom"; + public const string PropTextureHeightNumber = "SDL.texture.height"; + public const string PropTextureOpengles2TextureNumber = "SDL.texture.opengles2.texture"; + public const string PropTextureOpengles2TextureTargetNumber = "SDL.texture.opengles2.target"; + public const string PropTextureOpengles2TextureUvNumber = "SDL.texture.opengles2.texture_uv"; + public const string PropTextureOpengles2TextureUNumber = "SDL.texture.opengles2.texture_u"; + public const string PropTextureOpengles2TextureVNumber = "SDL.texture.opengles2.texture_v"; + public const string PropTextureOpenglTextureNumber = "SDL.texture.opengl.texture"; + public const string PropTextureOpenglTextureTargetNumber = "SDL.texture.opengl.target"; + public const string PropTextureOpenglTextureUvNumber = "SDL.texture.opengl.texture_uv"; + public const string PropTextureOpenglTextureUNumber = "SDL.texture.opengl.texture_u"; + public const string PropTextureOpenglTextureVNumber = "SDL.texture.opengl.texture_v"; + public const string PropTextureOpenglTexHFloat = "SDL.texture.opengl.tex_h"; + public const string PropTextureOpenglTexWFloat = "SDL.texture.opengl.tex_w"; + public const string PropTextureSdrWhitePointFloat = "SDL.texture.SDR_white_point"; + public const string PropTextureVulkanTextureNumber = "SDL.texture.vulkan.texture"; + public const string PropTextureWidthNumber = "SDL.texture.width"; + public const string PropThreadCreateEntryFunctionPointer = "SDL.thread.create.entry_function"; + public const string PropThreadCreateNameString = "SDL.thread.create.name"; + public const string PropThreadCreateStacksizeNumber = "SDL.thread.create.stacksize"; + public const string PropThreadCreateUserdataPointer = "SDL.thread.create.userdata"; + public const string PropWindowAndroidSurfacePointer = "SDL.window.android.surface"; + public const string PropWindowAndroidWindowPointer = "SDL.window.android.window"; + public const string PropWindowCocoaMetalViewTagNumber = "SDL.window.cocoa.metal_view_tag"; + public const string PropWindowCocoaWindowPointer = "SDL.window.cocoa.window"; + public const string PropWindowCreateAlwaysOnTopBoolean = "SDL.window.create.always_on_top"; + public const string PropWindowCreateBorderlessBoolean = "SDL.window.create.borderless"; + public const string PropWindowCreateCocoaViewPointer = "SDL.window.create.cocoa.view"; + public const string PropWindowCreateCocoaWindowPointer = "SDL.window.create.cocoa.window"; + public const string PropWindowCreateConstrainPopupBoolean = "SDL.window.create.constrain_popup"; + public const string PropWindowCreateEmscriptenCanvasIdString = "SDL.window.create.emscripten.canvas_id"; + public const string PropWindowCreateEmscriptenKeyboardElementString = + "SDL.window.create.emscripten.keyboard_element"; + public const string PropWindowCreateExternalGraphicsContextBoolean = + "SDL.window.create.external_graphics_context"; + public const string PropWindowCreateFlagsNumber = "SDL.window.create.flags"; + public const string PropWindowCreateFocusableBoolean = "SDL.window.create.focusable"; + public const string PropWindowCreateFullscreenBoolean = "SDL.window.create.fullscreen"; + public const string PropWindowCreateHeightNumber = "SDL.window.create.height"; + public const string PropWindowCreateHiddenBoolean = "SDL.window.create.hidden"; + public const string PropWindowCreateHighPixelDensityBoolean = "SDL.window.create.high_pixel_density"; + public const string PropWindowCreateMaximizedBoolean = "SDL.window.create.maximized"; + public const string PropWindowCreateMenuBoolean = "SDL.window.create.menu"; + public const string PropWindowCreateMetalBoolean = "SDL.window.create.metal"; + public const string PropWindowCreateMinimizedBoolean = "SDL.window.create.minimized"; + public const string PropWindowCreateModalBoolean = "SDL.window.create.modal"; + public const string PropWindowCreateMouseGrabbedBoolean = "SDL.window.create.mouse_grabbed"; + public const string PropWindowCreateOpenglBoolean = "SDL.window.create.opengl"; + public const string PropWindowCreateParentPointer = "SDL.window.create.parent"; + public const string PropWindowCreateResizableBoolean = "SDL.window.create.resizable"; + public const string PropWindowCreateTitleString = "SDL.window.create.title"; + public const string PropWindowCreateTooltipBoolean = "SDL.window.create.tooltip"; + public const string PropWindowCreateTransparentBoolean = "SDL.window.create.transparent"; + public const string PropWindowCreateUtilityBoolean = "SDL.window.create.utility"; + public const string PropWindowCreateVulkanBoolean = "SDL.window.create.vulkan"; + public const string PropWindowCreateWaylandCreateEglWindowBoolean = + "SDL.window.create.wayland.create_egl_window"; + public const string PropWindowCreateWaylandSurfaceRoleCustomBoolean = + "SDL.window.create.wayland.surface_role_custom"; + public const string PropWindowCreateWaylandWlSurfacePointer = "SDL.window.create.wayland.wl_surface"; + public const string PropWindowCreateWidthNumber = "SDL.window.create.width"; + public const string PropWindowCreateWin32HwndPointer = "SDL.window.create.win32.hwnd"; + public const string PropWindowCreateWin32PixelFormatHwndPointer = + "SDL.window.create.win32.pixel_format_hwnd"; + public const string PropWindowCreateWindowscenePointer = "SDL.window.create.uikit.windowscene"; + public const string PropWindowCreateX11WindowNumber = "SDL.window.create.x11.window"; + public const string PropWindowCreateXNumber = "SDL.window.create.x"; + public const string PropWindowCreateYNumber = "SDL.window.create.y"; + public const string PropWindowEmscriptenCanvasIdString = "SDL.window.emscripten.canvas_id"; + public const string PropWindowEmscriptenKeyboardElementString = "SDL.window.emscripten.keyboard_element"; + public const string PropWindowHdrEnabledBoolean = "SDL.window.HDR_enabled"; + public const string PropWindowHdrHeadroomFloat = "SDL.window.HDR_headroom"; + public const string PropWindowKmsdrmDeviceIndexNumber = "SDL.window.kmsdrm.dev_index"; + public const string PropWindowKmsdrmDrmFdNumber = "SDL.window.kmsdrm.drm_fd"; + public const string PropWindowKmsdrmGbmDevicePointer = "SDL.window.kmsdrm.gbm_dev"; + public const string PropWindowOpenvrOverlayIdNumber = "SDL.window.openvr.overlay_id"; + public const string PropWindowSdrWhiteLevelFloat = "SDL.window.SDR_white_level"; + public const string PropWindowShapePointer = "SDL.window.shape"; + public const string PropWindowUikitMetalViewTagNumber = "SDL.window.uikit.metal_view_tag"; + public const string PropWindowUikitOpenglFramebufferNumber = "SDL.window.uikit.opengl.framebuffer"; + public const string PropWindowUikitOpenglRenderbufferNumber = "SDL.window.uikit.opengl.renderbuffer"; + public const string PropWindowUikitOpenglResolveFramebufferNumber = + "SDL.window.uikit.opengl.resolve_framebuffer"; + public const string PropWindowUikitWindowPointer = "SDL.window.uikit.window"; + public const string PropWindowVivanteDisplayPointer = "SDL.window.vivante.display"; + public const string PropWindowVivanteSurfacePointer = "SDL.window.vivante.surface"; + public const string PropWindowVivanteWindowPointer = "SDL.window.vivante.window"; + public const string PropWindowWaylandDisplayPointer = "SDL.window.wayland.display"; + public const string PropWindowWaylandEglWindowPointer = "SDL.window.wayland.egl_window"; + public const string PropWindowWaylandSurfacePointer = "SDL.window.wayland.surface"; + public const string PropWindowWaylandViewportPointer = "SDL.window.wayland.viewport"; + public const string PropWindowWaylandXdgPopupPointer = "SDL.window.wayland.xdg_popup"; + public const string PropWindowWaylandXdgPositionerPointer = "SDL.window.wayland.xdg_positioner"; + public const string PropWindowWaylandXdgSurfacePointer = "SDL.window.wayland.xdg_surface"; + public const string PropWindowWaylandXdgToplevelExportHandleString = + "SDL.window.wayland.xdg_toplevel_export_handle"; + public const string PropWindowWaylandXdgToplevelPointer = "SDL.window.wayland.xdg_toplevel"; + public const string PropWindowWin32HdcPointer = "SDL.window.win32.hdc"; + public const string PropWindowWin32HwndPointer = "SDL.window.win32.hwnd"; + public const string PropWindowWin32InstancePointer = "SDL.window.win32.instance"; + public const string PropWindowX11DisplayPointer = "SDL.window.x11.display"; + public const string PropWindowX11ScreenNumber = "SDL.window.x11.screen"; + public const string PropWindowX11WindowNumber = "SDL.window.x11.window"; + public const int RendererVsyncAdaptive = -1; + public const int RendererVsyncDisabled = 0; + public const string SoftwareRenderer = "software"; + public const uint SurfaceLocked = 4u; + public const uint SurfaceLockNeeded = 2u; + public const uint SurfacePreallocated = 1u; + public const uint SurfaceSimdAligned = 8u; + public const uint TrayentryButton = 1u; + public const uint TrayentryCheckbox = 2u; + public const uint TrayentryChecked = 1073741824u; + public const uint TrayentryDisabled = 2147483648u; + public const uint TrayentrySubmenu = 4u; + public const int UsPerSecond = 1000000; + public const uint WindowposCenteredMask = 805240832u; + public const uint WindowposUndefinedMask = 536805376u; + public const ulong WindowAlwaysOnTop = 65536uL; + public const ulong WindowBorderless = 16uL; + public const ulong WindowExternal = 2048uL; + public const ulong WindowFillDocument = 2097152uL; + public const ulong WindowFullscreen = 1uL; + public const ulong WindowHidden = 8uL; + public const ulong WindowHighPixelDensity = 8192uL; + public const ulong WindowInputFocus = 512uL; + public const ulong WindowKeyboardGrabbed = 1048576uL; + public const ulong WindowMaximized = 128uL; + public const ulong WindowMetal = 536870912uL; + public const ulong WindowMinimized = 64uL; + public const ulong WindowModal = 4096uL; + public const ulong WindowMouseCapture = 16384uL; + public const ulong WindowMouseFocus = 1024uL; + public const ulong WindowMouseGrabbed = 256uL; + public const ulong WindowMouseRelativeMode = 32768uL; + public const ulong WindowNotFocusable = 2147483648uL; + public const ulong WindowOccluded = 4uL; + public const ulong WindowOpengl = 2uL; + public const ulong WindowPopupMenu = 524288uL; + public const ulong WindowResizable = 32uL; + public const int WindowSurfaceVsyncAdaptive = -1; + public const int WindowSurfaceVsyncDisabled = 0; + public const ulong WindowTooltip = 262144uL; + public const ulong WindowTransparent = 1073741824uL; + public const ulong WindowUtility = 131072uL; + public const ulong WindowVulkan = 268435456uL; + + /// + /// The bit OR-ed into a scancode to form the keycode for keys that have no distinct keycode of their own + /// (as SDL_SCANCODE_TO_KEYCODE does); a mask used to construct/test SdlKeycode values, not itself one of + /// them. + /// + public const uint KeycodeScancodeMask = 1073741824u; + + /// + /// The bit set on keycodes that do not map to a scancode or a Unicode code point; a mask used to + /// test/construct SdlKeycode values, not itself one of them. + /// + public const uint KeycodeExtendedMask = 536870912u; + } + } +} diff --git a/Brutal.Sdl/Generated/Sdl.Delegates.gen.cs b/Brutal.Sdl/Generated/Sdl.Delegates.gen.cs new file mode 100644 index 0000000..cb9315e --- /dev/null +++ b/Brutal.Sdl/Generated/Sdl.Delegates.gen.cs @@ -0,0 +1,132 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* SdlMallocFunc(nuint size); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* SdlCallocFunc(nuint nmemb, nuint size); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* SdlReallocFunc(void* mem, nuint size); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlFreeFunc(void* mem); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int SdlCompareCallback(void* a, void* b); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int SdlCompareCallbackR(void* userdata, void* a, void* b); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void SdlFunctionPointer(); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate SdlAssertState SdlAssertionHandler(SdlAssertData* data, void* userdata); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlCleanupPropertyCallback(void* userdata, void* value); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlEnumeratePropertiesCallback(void* userdata, uint props, byte* name); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int SdlThreadFunction(void* data); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlTLSDestructorCallback(void* value); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlAudioStreamDataCompleteCallback(void* userdata, void* buf, int buflen); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlAudioStreamCallback( + void* userdata, + SdlAudioStream stream, + int additional_amount, + int total_amount + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlAudioPostmixCallback(void* userdata, SdlAudioSpec* spec, float* buffer, int buflen); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void* SdlClipboardDataCallback(void* userdata, byte* mime_type, nuint* size); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlClipboardCleanupCallback(void* userdata); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate long* SdlEGLAttribArrayCallback(void* userdata); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate int* SdlEGLIntArrayCallback(void* userdata, void* display, void* config); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate SdlHitTestResult SdlHitTest(SdlWindow win, SdlPoint* area, void* data); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlDialogFileCallback(void* userdata, byte** filelist, int filter); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlMouseMotionTransformCallback( + void* userdata, + ulong timestamp, + SdlWindow window, + uint mouseID, + float* x, + float* y + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate byte SdlEventFilter(void* userdata, SdlEvent* @event); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate SdlEnumerationResult SdlEnumerateDirectoryCallback( + void* userdata, + byte* dirname, + byte* fname + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlHintCallback(void* userdata, byte* name, byte* oldValue, byte* newValue); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate SdlAppResult SdlAppInitFunc(void** appstate, int argc, byte** argv); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate SdlAppResult SdlAppIterateFunc(void* appstate); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate SdlAppResult SdlAppEventFunc(void* appstate, SdlEvent* @event); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlAppQuitFunc(void* appstate, SdlAppResult result); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlMainThreadCallback(void* userdata); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlLogOutputFunction( + void* userdata, + int category, + SdlLogPriority priority, + byte* message + ); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate byte SdlX11EventHook(void* userdata, nint xevent); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate uint SdlTimerCallback(void* userdata, uint timerID, uint interval); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate ulong SdlNSTimerCallback(void* userdata, uint timerID, ulong interval); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public unsafe delegate void SdlTrayCallback(void* userdata, nint entry); +} diff --git a/Brutal.Sdl/Generated/Sdl.HandleMethods.gen.cs b/Brutal.Sdl/Generated/Sdl.HandleMethods.gen.cs new file mode 100644 index 0000000..d22ff9e --- /dev/null +++ b/Brutal.Sdl/Generated/Sdl.HandleMethods.gen.cs @@ -0,0 +1,6651 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public readonly unsafe partial struct SdlCursor + { + /// + /// Free a previously-created cursor. + /// + /// + /// + /// Use this function to free cursor resources created with SDL_CreateCursor(), + /// SDL_CreateColorCursor() or SDL_CreateSystemCursor(). + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + Sdl.Mouse.DestroyCursor(this); + } + + /// + /// Set the active cursor. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets the currently active cursor to the specified one. If the + /// cursor is currently visible, the change will be immediately represented on + /// the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if + /// this is desired for any reason. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool Set() => Sdl.Mouse.SetCursor(this); + } + + public readonly unsafe partial struct SdlGamepad + { + /// + /// Close a gamepad previously opened with SDL_OpenGamepad(). + /// + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public void Close() + { + if (IsNull()) + { + return; + } + Sdl.Gamepad.CloseGamepad(this); + } + + /// + /// Check if a gamepad has been opened and is currently connected. + /// + /// + /// true if the gamepad has been opened and is currently connected, or + /// false if not. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Connected() => Sdl.Gamepad.GamepadConnected(this); + + /// + /// Query whether a gamepad has a given axis. + /// + /// an axis enum value (an SDL_GamepadAxis value). + /// true if the gamepad has this axis, false otherwise. + /// + /// + /// This merely reports whether the gamepad's mapping defined this axis, as + /// that is all the information SDL has about the physical device. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool HasAxis(SdlGamepadAxis axis) => Sdl.Gamepad.GamepadHasAxis(this, axis); + + /// + /// Query whether a gamepad has a given button. + /// + /// a button enum value (an SDL_GamepadButton value). + /// true if the gamepad has this button, false otherwise. + /// + /// + /// This merely reports whether the gamepad's mapping defined this button, as + /// that is all the information SDL has about the physical device. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool HasButton(SdlGamepadButton button) => Sdl.Gamepad.GamepadHasButton(this, button); + + /// + /// Return whether a gamepad has a particular sensor. + /// + /// the type of sensor to query. + /// true if the sensor exists, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool HasSensor(SdlSensorType type) => Sdl.Gamepad.GamepadHasSensor(this, type); + + /// + /// Query whether sensor data reporting is enabled for a gamepad. + /// + /// the type of sensor to query. + /// true if the sensor is enabled, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SensorEnabled(SdlSensorType type) => Sdl.Gamepad.GamepadSensorEnabled(this, type); + + /// + /// Return the sfSymbolsName for a given axis on a gamepad on Apple platforms. + /// + /// an axis on the gamepad. + /// the sfSymbolsName or NULL if the name can't be found. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetAppleSFSymbolsNameForAxis(SdlGamepadAxis axis) => + Sdl.Gamepad.GetGamepadAppleSFSymbolsNameForAxis(this, axis); + + /// + /// Return the sfSymbolsName for a given button on a gamepad on Apple + /// platforms. + /// + /// a button on the gamepad. + /// the sfSymbolsName or NULL if the name can't be found. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetAppleSFSymbolsNameForButton(SdlGamepadButton button) => + Sdl.Gamepad.GetGamepadAppleSFSymbolsNameForButton(this, button); + + /// + /// Get the current state of an axis control on a gamepad. + /// + /// an axis index (one of the SDL_GamepadAxis values). + /// axis state. + /// + /// + /// The axis indices start at index 0. + /// + /// + /// For thumbsticks, the state is a value ranging from -32768 (up/left) to + /// 32767 (down/right). + /// + /// + /// Triggers range from 0 when released to 32767 when fully pressed, and never + /// return a negative value. Note that this differs from the value reported by + /// the lower-level SDL_GetJoystickAxis(), which normally uses the full range. + /// + /// + /// Note that for invalid gamepads or axes, this will return 0. Zero is also a + /// valid value in normal operation; usually it means a centered axis. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public short GetAxis(SdlGamepadAxis axis) => Sdl.Gamepad.GetGamepadAxis(this, axis); + + /// + /// Ergonomic wrapper over SDL_GetGamepadBindings. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. + /// + public SdlGamepadBinding[] GetBindings() => Sdl.Gamepad.GetGamepadBindings(this); + + /// + /// Get the current state of a button on a gamepad. + /// + /// a button index (one of the SDL_GamepadButton values). + /// true if the button is pressed, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetButton(SdlGamepadButton button) => Sdl.Gamepad.GetGamepadButton(this, button); + + /// + /// Get the label of a button on a gamepad. + /// + /// a button index (one of the SDL_GamepadButton values). + /// the SDL_GamepadButtonLabel enum corresponding to the button label. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public SdlGamepadButtonLabel GetButtonLabel(SdlGamepadButton button) => + Sdl.Gamepad.GetGamepadButtonLabel(this, button); + + /// + /// Get the connection state of a gamepad. + /// + /// + /// the connection state on success or + /// SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() + /// for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public SdlJoystickConnectionState GetConnectionState() => Sdl.Gamepad.GetGamepadConnectionState(this); + + /// + /// Get the firmware version of an opened gamepad, if available. + /// + /// the gamepad firmware version, or zero if unavailable. + /// + /// + /// If the firmware version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public ushort GetFirmwareVersion() => Sdl.Gamepad.GetGamepadFirmwareVersion(this); + + /// + /// Get the instance ID of an opened gamepad. + /// + /// + /// the instance ID of the specified gamepad on success or 0 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetID() => Sdl.Gamepad.GetGamepadID(this); + + /// + /// Ergonomic wrapper over SDL_GetGamepadJoystick. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlJoystick GetJoystick() => Sdl.Gamepad.GetGamepadJoystick(this); + + /// + /// Get the implementation-dependent name for an opened gamepad. + /// + /// + /// the implementation dependent name for the gamepad, or NULL if + /// there is no name or the identifier passed is invalid. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetName() => Sdl.Gamepad.GetGamepadName(this); + + /// + /// Get the implementation-dependent path for an opened gamepad. + /// + /// + /// the implementation dependent path for the gamepad, or NULL if + /// there is no path or the identifier passed is invalid. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetPath() => Sdl.Gamepad.GetGamepadPath(this); + + /// + /// Get the player index of an opened gamepad. + /// + /// the player index for gamepad, or -1 if it's not available. + /// + /// + /// For XInput gamepads this returns the XInput user index. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public int GetPlayerIndex() => Sdl.Gamepad.GetGamepadPlayerIndex(this); + + /// + /// Get the battery state of a gamepad. + /// + /// + /// a pointer filled in with the percentage of battery life + /// left, between 0 and 100, or NULL to ignore. This will be + /// filled in with -1 we can't determine a value or there is no + /// battery. + /// + /// the current battery state. + /// + /// + /// You should never take a battery status as absolute truth. Batteries + /// (especially failing batteries) are delicate hardware, and the values + /// reported here are best estimates based on what that hardware reports. It's + /// not uncommon for older batteries to lose stored power much faster than it + /// reports, or completely drain when reporting it has 20 percent left, etc. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public SdlPowerState GetPowerInfo(out int percent) => Sdl.Gamepad.GetGamepadPowerInfo(this, out percent); + + /// + /// Get the USB product ID of an opened gamepad, if available. + /// + /// the USB product ID, or zero if unavailable. + /// + /// + /// If the product ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public ushort GetProduct() => Sdl.Gamepad.GetGamepadProduct(this); + + /// + /// Get the product version of an opened gamepad, if available. + /// + /// the USB product version, or zero if unavailable. + /// + /// + /// If the product version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public ushort GetProductVersion() => Sdl.Gamepad.GetGamepadProductVersion(this); + + /// + /// Get the properties associated with an opened gamepad. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// These properties are shared with the underlying joystick object. + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN: true if this gamepad has an LED + /// that has adjustable brightness + /// - SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN: true if this gamepad has an LED + /// that has adjustable color + /// - SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN: true if this gamepad has a + /// player LED + /// - SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN: true if this gamepad has + /// left/right rumble + /// - SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN: true if this gamepad has + /// simple trigger rumble + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetProperties() => Sdl.Gamepad.GetGamepadProperties(this); + + /// + /// Get the current state of a gamepad sensor. + /// + /// the type of sensor to query. + /// a pointer filled with the current sensor state. + /// the number of values to write to data. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The number of values and interpretation of the data is sensor dependent. + /// See the remarks in SDL_SensorType for details for each type of sensor. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool GetSensorData(SdlSensorType type, float* data, int num_values) => + Sdl.Gamepad.GetGamepadSensorData(this, type, data, num_values); + + /// + /// Get the data rate (number of events per second) of a gamepad sensor. + /// + /// the type of sensor to query. + /// the data rate, or 0.0f if the data rate is not available. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public float GetSensorDataRate(SdlSensorType type) => Sdl.Gamepad.GetGamepadSensorDataRate(this, type); + + /// + /// Get the serial number of an opened gamepad, if available. + /// + /// the serial number, or NULL if unavailable. + /// + /// + /// Returns the serial number of the gamepad, or NULL if it is not available. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public string? GetSerial() => Sdl.Gamepad.GetGamepadSerial(this); + + /// + /// Get the Steam Input handle of an opened gamepad, if available. + /// + /// the gamepad handle, or 0 if unavailable. + /// + /// + /// Returns an InputHandle_t for the gamepad that can be used with Steam Input + /// API: https://partner.steamgames.com/doc/api/ISteamInput + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public ulong GetSteamHandle() => Sdl.Gamepad.GetGamepadSteamHandle(this); + + /// + /// Get the type of an opened gamepad. + /// + /// + /// the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not + /// available. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public SdlGamepadType GetGamepadType() => Sdl.Gamepad.GetGamepadType(this); + + /// + /// Get the USB vendor ID of an opened gamepad, if available. + /// + /// the USB vendor ID, or zero if unavailable. + /// + /// + /// If the vendor ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public ushort GetVendor() => Sdl.Gamepad.GetGamepadVendor(this); + + /// + /// Get the number of supported simultaneous fingers on a touchpad on a game + /// gamepad. + /// + /// a touchpad. + /// number of supported simultaneous fingers. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public int GetNumTouchpadFingers(int touchpad) => Sdl.Gamepad.GetNumGamepadTouchpadFingers(this, touchpad); + + /// + /// Get the number of touchpads on a gamepad. + /// + /// number of touchpads. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public int GetNumTouchpads() => Sdl.Gamepad.GetNumGamepadTouchpads(this); + + /// + /// Get the type of an opened gamepad, ignoring any mapping override. + /// + /// + /// the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not + /// available. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public SdlGamepadType GetRealType() => Sdl.Gamepad.GetRealGamepadType(this); + + /// + /// Start a rumble effect on a gamepad. + /// + /// + /// the intensity of the low frequency (left) + /// rumble motor, from 0 to 0xFFFF. + /// + /// + /// the intensity of the high frequency (right) + /// rumble motor, from 0 to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each call to this function cancels any previous rumble effect, and calling + /// it with 0 intensity stops any rumbling. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Rumble(ushort low_frequency_rumble, ushort high_frequency_rumble, uint duration_ms) => + Sdl.Gamepad.RumbleGamepad(this, low_frequency_rumble, high_frequency_rumble, duration_ms); + + /// + /// Start a rumble effect in the gamepad's triggers. + /// + /// + /// the intensity of the left trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// + /// the intensity of the right trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each call to this function cancels any previous trigger rumble effect, and + /// calling it with 0 intensity stops any rumbling. + /// + /// + /// Note that this is rumbling of the triggers and not the gamepad as a + /// whole. This is currently only supported on Xbox One gamepads. If you want + /// the (more common) whole-gamepad rumble, use SDL_RumbleGamepad() instead. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RumbleTriggers(ushort left_rumble, ushort right_rumble, uint duration_ms) => + Sdl.Gamepad.RumbleGamepadTriggers(this, left_rumble, right_rumble, duration_ms); + + /// + /// Send a gamepad specific effect packet. + /// + /// the data to send to the gamepad. + /// the size of the data to send to the gamepad. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool SendEffect(void* data, int size) => Sdl.Gamepad.SendGamepadEffect(this, data, size); + + /// + /// Update a gamepad's LED color. + /// + /// the intensity of the red LED. + /// the intensity of the green LED. + /// the intensity of the blue LED. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// An example of a joystick LED is the light on the back of a PlayStation 4's + /// DualShock 4 controller. + /// + /// + /// For gamepads with a single color LED, the maximum of the RGB values will be + /// used as the LED brightness. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool SetLED(byte red, byte green, byte blue) => Sdl.Gamepad.SetGamepadLED(this, red, green, blue); + + /// + /// Set the player index of an opened gamepad. + /// + /// + /// player index to assign to this gamepad, or -1 to clear + /// the player index and turn off player LEDs. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetPlayerIndex(int player_index) => Sdl.Gamepad.SetGamepadPlayerIndex(this, player_index); + + /// + /// Set whether data reporting for a gamepad sensor is enabled. + /// + /// the type of sensor to enable/disable. + /// whether data reporting should be enabled. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetSensorEnabled(SdlSensorType type, bool enabled) => + Sdl.Gamepad.SetGamepadSensorEnabled(this, type, enabled); + } + + public readonly unsafe partial struct SdlGpuDevice + { + /// + /// Ergonomic wrapper over SDL_CreateGPURenderer. Throws instead of returning a null handle on failure. + /// + /// + /// the window where rendering is displayed, or NULL to create an + /// offscreen renderer. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlRenderer CreateGpuRenderer(SdlWindow window) => Sdl.Render.CreateGpuRenderer(this, window); + } + + public readonly unsafe partial struct SdlJoystick + { + /// + /// Close a joystick previously opened with SDL_OpenJoystick(). + /// + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public void Close() + { + if (IsNull()) + { + return; + } + Sdl.Joystick.CloseJoystick(this); + } + + /// + /// Get the current state of an axis control on a joystick. + /// + /// the axis to query; the axis indices start at index 0. + /// + /// a 16-bit signed integer representing the current position of the + /// axis or 0 on failure; call SDL_GetError() for more information. + /// + /// + /// + /// SDL makes no promises about what part of the joystick any given axis refers + /// to. Your game should have some sort of configuration UI to let users + /// specify what each axis should be bound to. Alternately, SDL's higher-level + /// Game Controller API makes a great effort to apply order to this lower-level + /// interface, so you know that a specific axis is the "left thumb stick," etc. + /// + /// + /// The value returned by SDL_GetJoystickAxis() is a signed integer (-32768 to + /// 32767) representing the current position of the axis. It may be necessary + /// to impose certain tolerances on these values to account for jitter. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public short GetAxis(int axis) => Sdl.Joystick.GetJoystickAxis(this, axis); + + /// + /// Get the initial state of an axis control on a joystick. + /// + /// the axis to query; the axis indices start at index 0. + /// upon return, the initial value is supplied here. + /// true if this axis has any initial value, or false if not. + /// + /// + /// The state is a value ranging from -32768 to 32767. + /// + /// + /// The axis indices start at index 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool GetAxisInitialState(int axis, out short state) => + Sdl.Joystick.GetJoystickAxisInitialState(this, axis, out state); + + /// + /// Get the ball axis change since the last poll. + /// + /// the ball index to query; ball indices start at index 0. + /// stores the difference in the x axis position since the last poll. + /// stores the difference in the y axis position since the last poll. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Trackballs can only return relative motion since the last call to + /// SDL_GetJoystickBall(), these motion deltas are placed into dx and dy. + /// + /// + /// Most joysticks do not have trackballs. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetBall(int ball, out int dx, out int dy) => + Sdl.Joystick.GetJoystickBall(this, ball, out dx, out dy); + + /// + /// Get the current state of a button on a joystick. + /// + /// + /// the button index to get the state from; indices start at + /// index 0. + /// + /// true if the button is pressed, false otherwise. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetButton(int button) => Sdl.Joystick.GetJoystickButton(this, button); + + /// + /// Get the connection state of a joystick. + /// + /// + /// the connection state on success or + /// SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() + /// for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public SdlJoystickConnectionState GetConnectionState() => Sdl.Joystick.GetJoystickConnectionState(this); + + /// + /// Get the firmware version of an opened joystick, if available. + /// + /// + /// the firmware version of the selected joystick, or 0 if + /// unavailable. + /// + /// + /// + /// If the firmware version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public ushort GetFirmwareVersion() => Sdl.Joystick.GetJoystickFirmwareVersion(this); + + /// + /// Get the implementation-dependent GUID for the joystick. + /// + /// + /// the GUID of the given joystick. If called on an invalid index, + /// this function returns a zero GUID; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function requires an open joystick. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public SdlGuid GetGuid() => Sdl.Joystick.GetJoystickGuid(this); + + /// + /// Get the current state of a POV hat on a joystick. + /// + /// the hat index to get the state from; indices start at index 0. + /// the current hat position. + /// + /// + /// The returned value will be one of the SDL_HAT_* values. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public byte GetHat(int hat) => Sdl.Joystick.GetJoystickHat(this, hat); + + /// + /// Get the instance ID of an opened joystick. + /// + /// + /// the instance ID of the specified joystick on success or 0 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetID() => Sdl.Joystick.GetJoystickID(this); + + /// + /// Get the implementation dependent name of a joystick. + /// + /// + /// the name of the selected joystick. If no name can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetName() => Sdl.Joystick.GetJoystickName(this); + + /// + /// Get the implementation dependent path of a joystick. + /// + /// + /// the path of the selected joystick. If no path can be found, this + /// function returns NULL; call SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetPath() => Sdl.Joystick.GetJoystickPath(this); + + /// + /// Get the player index of an opened joystick. + /// + /// the player index, or -1 if it's not available. + /// + /// + /// For XInput controllers this returns the XInput user index. Many joysticks + /// will not be able to supply this information. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public int GetPlayerIndex() => Sdl.Joystick.GetJoystickPlayerIndex(this); + + /// + /// Get the battery state of a joystick. + /// + /// + /// a pointer filled in with the percentage of battery life + /// left, between 0 and 100, or NULL to ignore. This will be + /// filled in with -1 we can't determine a value or there is no + /// battery. + /// + /// + /// the current battery state or SDL_POWERSTATE_ERROR on failure; + /// call SDL_GetError() for more information. + /// + /// + /// + /// You should never take a battery status as absolute truth. Batteries + /// (especially failing batteries) are delicate hardware, and the values + /// reported here are best estimates based on what that hardware reports. It's + /// not uncommon for older batteries to lose stored power much faster than it + /// reports, or completely drain when reporting it has 20 percent left, etc. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public SdlPowerState GetPowerInfo(out int percent) => Sdl.Joystick.GetJoystickPowerInfo(this, out percent); + + /// + /// Get the USB product ID of an opened joystick, if available. + /// + /// the USB product ID of the selected joystick, or 0 if unavailable. + /// + /// + /// If the product ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public ushort GetProduct() => Sdl.Joystick.GetJoystickProduct(this); + + /// + /// Get the product version of an opened joystick, if available. + /// + /// the product version of the selected joystick, or 0 if unavailable. + /// + /// + /// If the product version isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public ushort GetProductVersion() => Sdl.Joystick.GetJoystickProductVersion(this); + + /// + /// Get the properties associated with a joystick. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN: true if this joystick has an + /// LED that has adjustable brightness + /// - SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN: true if this joystick has an LED + /// that has adjustable color + /// - SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN: true if this joystick has a + /// player LED + /// - SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN: true if this joystick has + /// left/right rumble + /// - SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN: true if this joystick has + /// simple trigger rumble + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetProperties() => Sdl.Joystick.GetJoystickProperties(this); + + /// + /// Get the serial number of an opened joystick, if available. + /// + /// + /// the serial number of the selected joystick, or NULL if + /// unavailable. + /// + /// + /// + /// Returns the serial number of the joystick, or NULL if it is not available. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public string? GetSerial() => Sdl.Joystick.GetJoystickSerial(this); + + /// + /// Get the type of an opened joystick. + /// + /// the SDL_JoystickType of the selected joystick. + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public SdlJoystickType GetJoystickType() => Sdl.Joystick.GetJoystickType(this); + + /// + /// Get the USB vendor ID of an opened joystick, if available. + /// + /// the USB vendor ID of the selected joystick, or 0 if unavailable. + /// + /// + /// If the vendor ID isn't available this function returns 0. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public ushort GetVendor() => Sdl.Joystick.GetJoystickVendor(this); + + /// + /// Get the number of general axis controls on a joystick. + /// + /// + /// the number of axis controls/number of axes on success or -1 on + /// failure; call SDL_GetError() for more information. + /// + /// + /// + /// Often, the directional pad on a game controller will either look like 4 + /// separate buttons or a POV hat, and not axes, but all of this is up to the + /// device and platform. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public int GetNumAxes() => Sdl.Joystick.GetNumJoystickAxes(this); + + /// + /// Get the number of trackballs on a joystick. + /// + /// + /// the number of trackballs on success or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// Joystick trackballs have only relative motion events associated with them + /// and their state cannot be polled. + /// + /// + /// Most joysticks do not have trackballs. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public int GetNumBalls() => Sdl.Joystick.GetNumJoystickBalls(this); + + /// + /// Get the number of buttons on a joystick. + /// + /// + /// the number of buttons on success or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public int GetNumButtons() => Sdl.Joystick.GetNumJoystickButtons(this); + + /// + /// Get the number of POV hats on a joystick. + /// + /// + /// the number of POV hats on success or -1 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public int GetNumHats() => Sdl.Joystick.GetNumJoystickHats(this); + + /// + /// Get the status of a specified joystick. + /// + /// + /// true if the joystick has been opened, false if it has not; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Connected() => Sdl.Joystick.JoystickConnected(this); + + /// + /// Start a rumble effect. + /// + /// + /// the intensity of the low frequency (left) + /// rumble motor, from 0 to 0xFFFF. + /// + /// + /// the intensity of the high frequency (right) + /// rumble motor, from 0 to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// true, or false if rumble isn't supported on this joystick. + /// + /// + /// Each call to this function cancels any previous rumble effect, and calling + /// it with 0 intensity stops any rumbling. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Rumble(ushort low_frequency_rumble, ushort high_frequency_rumble, uint duration_ms) => + Sdl.Joystick.RumbleJoystick(this, low_frequency_rumble, high_frequency_rumble, duration_ms); + + /// + /// Start a rumble effect in the joystick's triggers. + /// + /// + /// the intensity of the left trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// + /// the intensity of the right trigger rumble motor, from 0 + /// to 0xFFFF. + /// + /// the duration of the rumble effect, in milliseconds. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each call to this function cancels any previous trigger rumble effect, and + /// calling it with 0 intensity stops any rumbling. + /// + /// + /// Note that this is rumbling of the triggers and not the game controller as + /// a whole. This is currently only supported on Xbox One controllers. If you + /// want the (more common) whole-controller rumble, use SDL_RumbleJoystick() + /// instead. + /// + /// + /// This function requires you to process SDL events or call + /// SDL_UpdateJoysticks() to update rumble state. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RumbleTriggers(ushort left_rumble, ushort right_rumble, uint duration_ms) => + Sdl.Joystick.RumbleJoystickTriggers(this, left_rumble, right_rumble, duration_ms); + + /// + /// Send a joystick specific effect packet. + /// + /// the data to send to the joystick. + /// the size of the data to send to the joystick. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool SendEffect(void* data, int size) => Sdl.Joystick.SendJoystickEffect(this, data, size); + + /// + /// Send a sensor update for an opened virtual joystick. + /// + /// the type of the sensor on the virtual joystick to update. + /// + /// a 64-bit timestamp in nanoseconds associated with + /// the sensor reading. + /// + /// the data associated with the sensor reading. + /// the number of values pointed to by data. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + public bool SendVirtualSensorData(SdlSensorType type, ulong sensor_timestamp, float* data, int num_values) => + Sdl.Joystick.SendJoystickVirtualSensorData(this, type, sensor_timestamp, data, num_values); + + /// + /// Update a joystick's LED color. + /// + /// the intensity of the red LED. + /// the intensity of the green LED. + /// the intensity of the blue LED. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// An example of a joystick LED is the light on the back of a PlayStation 4's + /// DualShock 4 controller. + /// + /// + /// For joysticks with a single color LED, the maximum of the RGB values will + /// be used as the LED brightness. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool SetLED(byte red, byte green, byte blue) => Sdl.Joystick.SetJoystickLED(this, red, green, blue); + + /// + /// Set the player index of an opened joystick. + /// + /// + /// player index to assign to this joystick, or -1 to clear + /// the player index and turn off player LEDs. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetPlayerIndex(int player_index) => Sdl.Joystick.SetJoystickPlayerIndex(this, player_index); + + /// + /// Set the state of an axis on an opened virtual joystick. + /// + /// the index of the axis on the virtual joystick to update. + /// the new value for the specified axis. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// Note that when sending trigger axes, you should scale the value to the full + /// range of Sint16. For example, a trigger at rest would have the value of + /// SDL_JOYSTICK_AXIS_MIN. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool SetVirtualAxis(int axis, short value) => Sdl.Joystick.SetJoystickVirtualAxis(this, axis, value); + + /// + /// Generate ball motion on an opened virtual joystick. + /// + /// the index of the ball on the virtual joystick to update. + /// the relative motion on the X axis. + /// the relative motion on the Y axis. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool SetVirtualBall(int ball, short xrel, short yrel) => + Sdl.Joystick.SetJoystickVirtualBall(this, ball, xrel, yrel); + + /// + /// Set the state of a button on an opened virtual joystick. + /// + /// the index of the button on the virtual joystick to update. + /// true if the button is pressed, false otherwise. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool SetVirtualButton(int button, bool down) => + Sdl.Joystick.SetJoystickVirtualButton(this, button, down); + + /// + /// Set the state of a hat on an opened virtual joystick. + /// + /// the index of the hat on the virtual joystick to update. + /// the new value for the specified hat. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool SetVirtualHat(int hat, byte value) => Sdl.Joystick.SetJoystickVirtualHat(this, hat, value); + + /// + /// Set touchpad finger state on an opened virtual joystick. + /// + /// + /// the index of the touchpad on the virtual joystick to + /// update. + /// + /// the index of the finger on the touchpad to set. + /// true if the finger is pressed, false if the finger is released. + /// + /// the x coordinate of the finger on the touchpad, normalized 0 to 1, + /// with the origin in the upper left. + /// + /// + /// the y coordinate of the finger on the touchpad, normalized 0 to 1, + /// with the origin in the upper left. + /// + /// the pressure of the finger. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Please note that values set here will not be applied until the next call to + /// SDL_UpdateJoysticks, which can either be called directly, or can be called + /// indirectly through various other SDL APIs, including, but not limited to + /// the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, + /// SDL_WaitEvent. + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool SetVirtualTouchpad(int touchpad, int finger, bool down, float x, float y, float pressure) => + Sdl.Joystick.SetJoystickVirtualTouchpad(this, touchpad, finger, down, x, y, pressure); + } + + public readonly unsafe partial struct SdlRenderer + { + /// + /// Add a set of synchronization semaphores for the current frame. + /// + /// the VkPipelineStageFlags for the wait. + /// + /// a VkSempahore to wait on before rendering the current + /// frame, or 0 if not needed. + /// + /// + /// a VkSempahore that SDL will signal when rendering + /// for the current frame is complete, or 0 if not + /// needed. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The Vulkan renderer will wait for wait_semaphore before submitting + /// rendering commands and signal signal_semaphore after rendering commands + /// are complete for this frame. + /// + /// + /// This should be called each frame that you want semaphore synchronization. + /// The Vulkan renderer may have multiple frames in flight on the GPU, so you + /// should have multiple semaphores that are used for synchronization. Querying + /// SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER will give you the + /// maximum number of semaphores you'll need. + /// + /// + /// + /// It is NOT safe to call this function from two threads at + /// once. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool AddVulkanRenderSemaphores(uint wait_stage_mask, long wait_semaphore, long signal_semaphore) => + Sdl.Render.AddVulkanRenderSemaphores(this, wait_stage_mask, wait_semaphore, signal_semaphore); + + /// + /// Convert the coordinates in an event to render coordinates. + /// + /// the event to modify. + /// + /// true if the event is converted or doesn't need conversion, or + /// false on failure; call SDL_GetError() for more information. + /// + /// + /// + /// This takes into account several states: + /// + /// + /// - The window dimensions. + /// - The logical presentation settings (SDL_SetRenderLogicalPresentation) + /// - The scale (SDL_SetRenderScale) + /// - The viewport (SDL_SetRenderViewport) + /// + /// + /// Various event types are converted with this function: mouse, touch, pen, + /// etc. + /// + /// + /// Touch coordinates are converted from normalized coordinates in the window + /// to non-normalized rendering coordinates. + /// + /// + /// Relative mouse coordinates (xrel and yrel event fields) are also + /// converted. Applications that do not want these fields converted should use + /// SDL_RenderCoordinatesFromWindow() on the specific event fields instead of + /// converting the entire event structure. + /// + /// + /// Once converted, coordinates may be outside the rendering area. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool ConvertEventToRenderCoordinates(SdlEvent* @event) => + Sdl.Render.ConvertEventToRenderCoordinates(this, @event); + + /// + /// Create custom GPU render state. + /// + /// a struct describing the GPU render state to create. + /// + /// a custom GPU render state or NULL on failure; call SDL_GetError() + /// for more information. + /// + /// + /// This function should be called on the thread that created the + /// renderer. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + /// + public nint CreateGpuRenderState(SdlGpuRenderStateCreateInfo* createinfo) => + Sdl.Render.CreateGpuRenderState(this, createinfo); + + /// + /// Ergonomic wrapper over SDL_CreateTexture. Throws instead of returning a null handle on failure. + /// + /// one of the enumerated values in SDL_PixelFormat. + /// one of the enumerated values in SDL_TextureAccess. + /// the width of the texture in pixels. + /// the height of the texture in pixels. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlTexture CreateTexture(SdlPixelFormat format, SdlTextureAccess access, int w, int h) => + Sdl.Render.CreateTexture(this, format, access, w, h); + + /// + /// Ergonomic wrapper over SDL_CreateTextureFromSurface. Throws instead of returning a null handle on + /// failure. + /// + /// + /// the SDL_Surface structure containing pixel data used to fill + /// the texture. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlTexture CreateTextureFromSurface(SdlSurface* surface) => + Sdl.Render.CreateTextureFromSurface(this, surface); + + /// + /// Ergonomic wrapper over SDL_CreateTextureWithProperties. Throws instead of returning a null handle + /// on failure. + /// + /// the properties to use. + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlTexture CreateTextureWithProperties(uint props) => + Sdl.Render.CreateTextureWithProperties(this, props); + + /// + /// Destroy the rendering context for a window and free all associated + /// textures. + /// + /// + /// + /// This should be called before destroying the associated window. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + Sdl.Render.DestroyRenderer(this); + } + + /// + /// Force the rendering context to flush any pending commands and state. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You do not need to (and in fact, shouldn't) call this function unless you + /// are planning to call into OpenGL/Direct3D/Metal/whatever directly, in + /// addition to using an SDL_Renderer. + /// + /// + /// This is for a very-specific case: if you are using SDL's render API, and + /// you plan to make OpenGL/D3D/whatever calls in addition to SDL render API + /// calls. If this applies, you should call this function between calls to + /// SDL's render API and the low-level API you're using in cooperation. + /// + /// + /// In all other cases, you can ignore this function. + /// + /// + /// This call makes SDL flush any pending rendering work it was queueing up to + /// do later in a single batch, and marks any internal cached state as invalid, + /// so it'll prepare all its state again later, from scratch. + /// + /// + /// This means you do not need to save state in your rendering code to protect + /// the SDL renderer. However, there lots of arbitrary pieces of Direct3D and + /// OpenGL state that can confuse things; you should use your best judgment and + /// be prepared to make changes if specific state needs to be protected. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Flush() => Sdl.Render.FlushRenderer(this); + + /// + /// Get the current output size in pixels of a rendering context. + /// + /// a pointer filled in with the current width. + /// a pointer filled in with the current height. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If a rendering target is active, this will return the size of the rendering + /// target in pixels, otherwise return the value of SDL_GetRenderOutputSize(). + /// + /// + /// Rendering target or not, the output will be adjusted by the current logical + /// presentation state, dictated by SDL_SetRenderLogicalPresentation(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetCurrentRenderOutputSize(out int w, out int h) => + Sdl.Render.GetCurrentRenderOutputSize(this, out w, out h); + + /// + /// Get default texture scale mode of the given renderer. + /// + /// + /// a SDL_ScaleMode filled with current default scale mode. + /// See SDL_SetDefaultTextureScaleMode() for the meaning of + /// the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public bool GetDefaultTextureScaleMode(out SdlScaleMode scale_mode) => + Sdl.Render.GetDefaultTextureScaleMode(this, out scale_mode); + + /// + /// Ergonomic wrapper over SDL_GetGPURendererDevice. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlGpuDevice GetGpuDevice() => Sdl.Render.GetGpuRendererDevice(this); + + /// + /// Get the clip rectangle for the current target. + /// + /// + /// an SDL_Rect structure filled in with the current clipping area + /// or an empty rectangle if clipping is disabled. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own clip rectangle. This function gets the + /// cliprect for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetRenderClipRect(SdlRect* rect) => Sdl.Render.GetRenderClipRect(this, rect); + + /// + /// Get the color scale used for render operations. + /// + /// a pointer filled in with the current color scale value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderColorScale(out float scale) => Sdl.Render.GetRenderColorScale(this, out scale); + + /// + /// Get the blend mode used for drawing operations. + /// + /// a pointer filled in with the current SDL_BlendMode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderDrawBlendMode(uint* blendMode) => Sdl.Render.GetRenderDrawBlendMode(this, blendMode); + + /// + /// Get the color used for drawing operations (Rect, Line and Clear). + /// + /// + /// a pointer filled in with the red value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the green value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the blue value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the alpha value used to draw on the + /// rendering target; usually SDL_ALPHA_OPAQUE (255). + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetRenderDrawColor(out byte r, out byte g, out byte b, out byte a) => + Sdl.Render.GetRenderDrawColor(this, out r, out g, out b, out a); + + /// + /// Get the color used for drawing operations (Rect, Line and Clear). + /// + /// + /// a pointer filled in with the red value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the green value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the blue value used to draw on the + /// rendering target. + /// + /// + /// a pointer filled in with the alpha value used to draw on the + /// rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetRenderDrawColorFloat(out float r, out float g, out float b, out float a) => + Sdl.Render.GetRenderDrawColorFloat(this, out r, out g, out b, out a); + + /// + /// Get device independent resolution and presentation mode for rendering. + /// + /// an int filled with the logical presentation width. + /// an int filled with the logical presentation height. + /// + /// a variable filled with the logical presentation mode being + /// used. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function gets the width and height of the logical rendering output, or + /// 0 if a logical resolution is not enabled. + /// + /// + /// Each render target has its own logical presentation state. This function + /// gets the state for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderLogicalPresentation(out int w, out int h, out SdlRendererLogicalPresentation mode) => + Sdl.Render.GetRenderLogicalPresentation(this, out w, out h, out mode); + + /// + /// Get the final presentation rectangle for rendering. + /// + /// + /// a pointer filled in with the final presentation rectangle, may + /// be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function returns the calculated rectangle used for logical + /// presentation, based on the presentation mode and output size. If logical + /// presentation is disabled, it will fill the rectangle with the output size, + /// in pixels. + /// + /// + /// Each render target has its own logical presentation state. This function + /// gets the rectangle for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderLogicalPresentationRect(SdlFRect* rect) => + Sdl.Render.GetRenderLogicalPresentationRect(this, rect); + + /// + /// Get the output size in pixels of a rendering context. + /// + /// a pointer filled in with the width in pixels. + /// a pointer filled in with the height in pixels. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns the true output size in pixels, ignoring any render targets or + /// logical size and presentation. + /// + /// + /// For the output size of the current rendering target, with logical size + /// adjustments, use SDL_GetCurrentRenderOutputSize() instead. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderOutputSize(out int w, out int h) => Sdl.Render.GetRenderOutputSize(this, out w, out h); + + /// + /// Get the safe area for rendering within the current viewport. + /// + /// + /// a pointer filled in with the area that is safe for interactive + /// content. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Some devices have portions of the screen which are partially obscured or + /// not interactive, possibly due to on-screen controls, curved edges, camera + /// notches, TV overscan, etc. This function provides the area of the current + /// viewport which is safe to have interactible content. You should continue + /// rendering into the rest of the render target, but it should not contain + /// visually important or interactible content. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool GetRenderSafeArea(SdlRect* rect) => Sdl.Render.GetRenderSafeArea(this, rect); + + /// + /// Get the drawing scale for the current target. + /// + /// a pointer filled in with the horizontal scaling factor. + /// a pointer filled in with the vertical scaling factor. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own scale. This function gets the scale for the + /// current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderScale(out float scaleX, out float scaleY) => + Sdl.Render.GetRenderScale(this, out scaleX, out scaleY); + + /// + /// Ergonomic wrapper over SDL_GetRenderTarget. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlTexture GetRenderTarget() => Sdl.Render.GetRenderTarget(this); + + /// + /// Get the texture addressing mode used in SDL_RenderGeometry(). + /// + /// + /// a pointer filled in with the SDL_TextureAddressMode to use + /// for horizontal texture coordinates in SDL_RenderGeometry(), + /// may be NULL. + /// + /// + /// a pointer filled in with the SDL_TextureAddressMode to use + /// for vertical texture coordinates in SDL_RenderGeometry(), may + /// be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public bool GetRenderTextureAddressMode(out SdlTextureAddressMode u_mode, out SdlTextureAddressMode v_mode) => + Sdl.Render.GetRenderTextureAddressMode(this, out u_mode, out v_mode); + + /// + /// Get VSync of the given renderer. + /// + /// + /// an int filled with the current vertical refresh sync interval. + /// See SDL_SetRenderVSync() for the meaning of the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRenderVSync(out int vsync) => Sdl.Render.GetRenderVSync(this, out vsync); + + /// + /// Get the drawing area for the current target. + /// + /// an SDL_Rect structure filled in with the current drawing area. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own viewport. This function gets the viewport + /// for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetRenderViewport(SdlRect* rect) => Sdl.Render.GetRenderViewport(this, rect); + + /// + /// Ergonomic wrapper over SDL_GetRenderWindow. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlWindow GetRenderWindow() => Sdl.Render.GetRenderWindow(this); + + /// + /// Get the name of a renderer. + /// + /// + /// the name of the selected renderer, or NULL on failure; call + /// SDL_GetError() for more information. + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public string? GetName() => Sdl.Render.GetRendererName(this); + + /// + /// Get the properties associated with a renderer. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_RENDERER_NAME_STRING: the name of the rendering driver + /// - SDL_PROP_RENDERER_WINDOW_POINTER: the window where rendering is + /// displayed, if any + /// - SDL_PROP_RENDERER_SURFACE_POINTER: the surface where rendering is + /// displayed, if this is a software renderer without a window + /// - SDL_PROP_RENDERER_VSYNC_NUMBER: the current vsync setting + /// - SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER: the maximum texture width + /// and height + /// - SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER: a (const SDL_PixelFormat *) + /// array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN, + /// representing the available texture formats for this renderer. + /// - SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN: true if the renderer + /// supports SDL_TEXTURE_ADDRESS_WRAP on non-power-of-two textures. + /// - SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER: an SDL_Colorspace value + /// describing the colorspace for output to the display, defaults to + /// SDL_COLORSPACE_SRGB. + /// - SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN: true if the output colorspace is + /// SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with + /// HDR enabled. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT: the value of SDR white in the + /// SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is + /// automatically multiplied into the color scale. This property can change + /// dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT: the additional high dynamic range + /// that can be displayed, in terms of the SDR white point. When HDR is not + /// enabled, this will be 1.0. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// + /// + /// With the direct3d renderer: + /// + /// + /// - SDL_PROP_RENDERER_D3D9_DEVICE_POINTER: the IDirect3DDevice9 associated + /// with the renderer + /// + /// + /// With the direct3d11 renderer: + /// + /// + /// - SDL_PROP_RENDERER_D3D11_DEVICE_POINTER: the ID3D11Device associated + /// with the renderer + /// - SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER: the IDXGISwapChain1 + /// associated with the renderer. This may change when the window is resized. + /// + /// + /// With the direct3d12 renderer: + /// + /// + /// - SDL_PROP_RENDERER_D3D12_DEVICE_POINTER: the ID3D12Device associated + /// with the renderer + /// - SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER: the IDXGISwapChain4 + /// associated with the renderer. + /// - SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER: the ID3D12CommandQueue + /// associated with the renderer + /// + /// + /// With the vulkan renderer: + /// + /// + /// - SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER: the VkInstance associated + /// with the renderer + /// - SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER: the VkSurfaceKHR associated + /// with the renderer + /// - SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER: the VkPhysicalDevice + /// associated with the renderer + /// - SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER: the VkDevice associated with + /// the renderer + /// - SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER: the queue + /// family index used for rendering + /// - SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER: the queue + /// family index used for presentation + /// - SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER: the number of + /// swapchain images, or potential frames in flight, used by the Vulkan + /// renderer + /// + /// + /// With the gpu renderer: + /// + /// + /// - SDL_PROP_RENDERER_GPU_DEVICE_POINTER: the SDL_GPUDevice associated with + /// the renderer + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetProperties() => Sdl.Render.GetRendererProperties(this); + + /// + /// Clear the current rendering target with the drawing color. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function clears the entire rendering target, ignoring the viewport and + /// the clip rectangle. Note, that clearing will also set/fill all pixels of + /// the rendering target to current renderer draw color, so make sure to invoke + /// SDL_SetRenderDrawColor() when needed. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderClear() => Sdl.Render.RenderClear(this); + + /// + /// Get whether clipping is enabled on the given render target. + /// + /// + /// true if clipping is enabled or false if not; call SDL_GetError() + /// for more information. + /// + /// + /// + /// Each render target has its own clip rectangle. This function checks the + /// cliprect for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderClipEnabled() => Sdl.Render.RenderClipEnabled(this); + + /// + /// Get a point in render coordinates when given a point in window coordinates. + /// + /// the x coordinate in window coordinates. + /// the y coordinate in window coordinates. + /// a pointer filled with the x coordinate in render coordinates. + /// a pointer filled with the y coordinate in render coordinates. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This takes into account several states: + /// + /// + /// - The window dimensions. + /// - The logical presentation settings (SDL_SetRenderLogicalPresentation) + /// - The scale (SDL_SetRenderScale) + /// - The viewport (SDL_SetRenderViewport) + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderCoordinatesFromWindow(float window_x, float window_y, out float x, out float y) => + Sdl.Render.RenderCoordinatesFromWindow(this, window_x, window_y, out x, out y); + + /// + /// Get a point in window coordinates when given a point in render coordinates. + /// + /// the x coordinate in render coordinates. + /// the y coordinate in render coordinates. + /// + /// a pointer filled with the x coordinate in window + /// coordinates. + /// + /// + /// a pointer filled with the y coordinate in window + /// coordinates. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This takes into account several states: + /// + /// + /// - The window dimensions. + /// - The logical presentation settings (SDL_SetRenderLogicalPresentation) + /// - The scale (SDL_SetRenderScale) + /// - The viewport (SDL_SetRenderViewport) + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool RenderCoordinatesToWindow(float x, float y, out float window_x, out float window_y) => + Sdl.Render.RenderCoordinatesToWindow(this, x, y, out window_x, out window_y); + + /// + /// Draw debug text to an SDL_Renderer. + /// + /// the x coordinate where the top-left corner of the text will draw. + /// the y coordinate where the top-left corner of the text will draw. + /// the string to render. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function will render a string of text to an SDL_Renderer. Note that + /// this is a convenience function for debugging, with severe limitations, and + /// not intended to be used for production apps and games. + /// + /// + /// Among these limitations: + /// + /// + /// - It accepts UTF-8 strings, but will only renders ASCII characters. + /// - It has a single, tiny size (8x8 pixels). You can use logical presentation + /// or SDL_SetRenderScale() to adjust it. + /// - It uses a simple, hardcoded bitmap font. It does not allow different font + /// selections and it does not support truetype, for proper scaling. + /// - It does no word-wrapping and does not treat newline characters as a line + /// break. If the text goes out of the window, it's gone. + /// + /// + /// For serious text rendering, there are several good options, such as + /// SDL_ttf, stb_truetype, or other external libraries. + /// + /// + /// On first use, this will create an internal texture for rendering glyphs. + /// This texture will live until the renderer is destroyed. + /// + /// + /// The text is drawn in the color specified by SDL_SetRenderDrawColor(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool RenderDebugText(float x, float y, string str) => Sdl.Render.RenderDebugText(this, x, y, str); + + /// + /// Fill a rectangle on the current rendering target with the drawing color at + /// subpixel precision. + /// + /// + /// a pointer to the destination rectangle, or NULL for the entire + /// rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderFillRect(SdlFRect* rect) => Sdl.Render.RenderFillRect(this, rect); + + /// + /// Fill some number of rectangles on the current rendering target with the + /// drawing color at subpixel precision. + /// + /// a pointer to an array of destination rectangles. + /// the number of rectangles. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderFillRects(SdlFRect* rects, int count) => Sdl.Render.RenderFillRects(this, rects, count); + + /// + /// Render a list of triangles, optionally using a texture and indices into the + /// vertex array Color and alpha modulation is done per vertex + /// (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). + /// + /// (optional) The SDL texture to use. + /// vertices. + /// number of vertices. + /// + /// (optional) An array of integer indices into the 'vertices' + /// array, if NULL all vertices will be rendered in sequential + /// order. + /// + /// number of indices. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderGeometry( + SdlTexture texture, + SdlVertex* vertices, + int num_vertices, + int* indices, + int num_indices + ) => Sdl.Render.RenderGeometry(this, texture, vertices, num_vertices, indices, num_indices); + + /// + /// Render a list of triangles, optionally using a texture and indices into the + /// vertex arrays Color and alpha modulation is done per vertex + /// (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). + /// + /// (optional) The SDL texture to use. + /// vertex positions. + /// byte size to move from one element to the next element. + /// vertex colors (as SDL_FColor). + /// byte size to move from one element to the next element. + /// vertex normalized texture coordinates. + /// byte size to move from one element to the next element. + /// number of vertices. + /// + /// (optional) An array of indices into the 'vertices' arrays, + /// if NULL all vertices will be rendered in sequential order. + /// + /// number of indices. + /// index size: 1 (byte), 2 (short), 4 (int). + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderGeometryRaw( + SdlTexture texture, + float* xy, + int xy_stride, + SdlFColor* color, + int color_stride, + float* uv, + int uv_stride, + int num_vertices, + void* indices, + int num_indices, + int size_indices + ) => + Sdl.Render.RenderGeometryRaw( + this, + texture, + xy, + xy_stride, + color, + color_stride, + uv, + uv_stride, + num_vertices, + indices, + num_indices, + size_indices + ); + + /// + /// Draw a line on the current rendering target at subpixel precision. + /// + /// the x coordinate of the start point. + /// the y coordinate of the start point. + /// the x coordinate of the end point. + /// the y coordinate of the end point. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderLine(float x1, float y1, float x2, float y2) => Sdl.Render.RenderLine(this, x1, y1, x2, y2); + + /// + /// Draw a series of connected lines on the current rendering target at + /// subpixel precision. + /// + /// the points along the lines. + /// the number of points, drawing count-1 lines. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderLines(SdlFPoint* points, int count) => Sdl.Render.RenderLines(this, points, count); + + /// + /// Draw a point on the current rendering target at subpixel precision. + /// + /// the x coordinate of the point. + /// the y coordinate of the point. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderPoint(float x, float y) => Sdl.Render.RenderPoint(this, x, y); + + /// + /// Draw multiple points on the current rendering target at subpixel precision. + /// + /// the points to draw. + /// the number of points to draw. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderPoints(SdlFPoint* points, int count) => Sdl.Render.RenderPoints(this, points, count); + + /// + /// Update the screen with any rendering performed since the previous call. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// SDL's rendering functions operate on a backbuffer; that is, calling a + /// rendering function such as SDL_RenderLine() does not directly put a line on + /// the screen, but rather updates the backbuffer. As such, you compose your + /// entire scene and present the composed backbuffer to the screen as a + /// complete picture. + /// + /// + /// Therefore, when using SDL's rendering API, one does all drawing intended + /// for the frame, and then calls this function once per frame to present the + /// final drawing to the user. + /// + /// + /// The backbuffer should be considered invalidated after each present; do not + /// assume that previous contents will exist between frames. You are strongly + /// encouraged to call SDL_RenderClear() to initialize the backbuffer before + /// starting each new frame's drawing, even if you plan to overwrite every + /// pixel. + /// + /// + /// Please note, that in case of rendering to a texture - there is no need + /// to call SDL_RenderPresent after drawing needed objects to a texture, and + /// should not be done; you are only required to change back the rendering + /// target to default via SDL_SetRenderTarget(renderer, NULL) afterwards, as + /// textures by themselves do not have a concept of backbuffers. Calling + /// SDL_RenderPresent while rendering to a texture will fail. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public bool RenderPresent() => Sdl.Render.RenderPresent(this); + + /// + /// Draw a rectangle on the current rendering target at subpixel precision. + /// + /// + /// a pointer to the destination rectangle, or NULL to outline the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderRect(SdlFRect* rect) => Sdl.Render.RenderRect(this, rect); + + /// + /// Draw some number of rectangles on the current rendering target at subpixel + /// precision. + /// + /// a pointer to an array of destination rectangles. + /// the number of rectangles. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderRects(SdlFRect* rects, int count) => Sdl.Render.RenderRects(this, rects, count); + + /// + /// Copy a portion of the texture to the current rendering target at subpixel + /// precision. + /// + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderTexture(SdlTexture texture, SdlFRect* srcrect, SdlFRect* dstrect) => + Sdl.Render.RenderTexture(this, texture, srcrect, dstrect); + + /// + /// Perform a scaled copy using the 9-grid algorithm to the current rendering + /// target at subpixel precision. + /// + /// the source texture. + /// + /// the SDL_Rect structure representing the rectangle to be used + /// for the 9-grid, or NULL to use the entire texture. + /// + /// the width, in pixels, of the left corners in srcrect. + /// the width, in pixels, of the right corners in srcrect. + /// the height, in pixels, of the top corners in srcrect. + /// + /// the height, in pixels, of the bottom corners in + /// srcrect. + /// + /// + /// the scale used to transform the corner of srcrect into the + /// corner of dstrect, or 0.0f for an unscaled copy. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixels in the texture are split into a 3x3 grid, using the different + /// corner sizes for each corner, and the sides and center making up the + /// remaining pixels. The corners are then scaled using scale and fit into + /// the corners of the destination rectangle. The sides and center are then + /// stretched into place to cover the remaining destination rectangle. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderTexture9Grid( + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect + ) => + Sdl.Render.RenderTexture9Grid( + this, + texture, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + dstrect + ); + + /// + /// Perform a scaled copy using the 9-grid algorithm to the current rendering + /// target at subpixel precision. + /// + /// the source texture. + /// + /// the SDL_Rect structure representing the rectangle to be used + /// for the 9-grid, or NULL to use the entire texture. + /// + /// the width, in pixels, of the left corners in srcrect. + /// the width, in pixels, of the right corners in srcrect. + /// the height, in pixels, of the top corners in srcrect. + /// + /// the height, in pixels, of the bottom corners in + /// srcrect. + /// + /// + /// the scale used to transform the corner of srcrect into the + /// corner of dstrect, or 0.0f for an unscaled copy. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// the scale used to transform the borders and center of + /// srcrect into the borders and middle of dstrect, or + /// 1.0f for an unscaled copy. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixels in the texture are split into a 3x3 grid, using the different + /// corner sizes for each corner, and the sides and center making up the + /// remaining pixels. The corners are then scaled using scale and fit into + /// the corners of the destination rectangle. The sides and center are then + /// tiled into place to cover the remaining destination rectangle. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + public bool RenderTexture9GridTiled( + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect, + float tileScale + ) => + Sdl.Render.RenderTexture9GridTiled( + this, + texture, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + dstrect, + tileScale + ); + + /// + /// Copy a portion of the source texture to the current rendering target, with + /// affine transform, at subpixel precision. + /// + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// a pointer to a point indicating where the top-left corner of + /// srcrect should be mapped to, or NULL for the rendering + /// target's origin. + /// + /// + /// a pointer to a point indicating where the top-right corner of + /// srcrect should be mapped to, or NULL for the rendering + /// target's top-right corner. + /// + /// + /// a pointer to a point indicating where the bottom-left corner of + /// srcrect should be mapped to, or NULL for the rendering target's + /// bottom-left corner. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// You may only call this function from the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderTextureAffine( + SdlTexture texture, + SdlFRect* srcrect, + SdlFPoint* origin, + SdlFPoint* right, + SdlFPoint* down + ) => Sdl.Render.RenderTextureAffine(this, texture, srcrect, origin, right, down); + + /// + /// Copy a portion of the source texture to the current rendering target, with + /// rotation and flipping, at subpixel precision. + /// + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// an angle in degrees that indicates the rotation that will be + /// applied to dstrect, rotating it in a clockwise direction. + /// + /// + /// a pointer to a point indicating the point around which + /// dstrect will be rotated (if NULL, rotation will be done + /// around dstrect.w/2, dstrect.h/2). + /// + /// + /// an SDL_FlipMode value stating which flipping actions should be + /// performed on the texture. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderTextureRotated( + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect, + double angle, + SdlFPoint* center, + SdlFlipMode flip + ) => Sdl.Render.RenderTextureRotated(this, texture, srcrect, dstrect, angle, center, flip); + + /// + /// Tile a portion of the texture to the current rendering target at subpixel + /// precision. + /// + /// the source texture. + /// + /// a pointer to the source rectangle, or NULL for the entire + /// texture. + /// + /// + /// the scale used to transform srcrect into the destination + /// rectangle, e.g. a 32x32 texture with a scale of 2 would fill + /// 64x64 tiles. + /// + /// + /// a pointer to the destination rectangle, or NULL for the + /// entire rendering target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixels in srcrect will be repeated as many times as needed to + /// completely fill dstrect. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool RenderTextureTiled(SdlTexture texture, SdlFRect* srcrect, float scale, SdlFRect* dstrect) => + Sdl.Render.RenderTextureTiled(this, texture, srcrect, scale, dstrect); + + /// + /// Return whether an explicit rectangle was set as the viewport. + /// + /// + /// true if the viewport was set to a specific rectangle, or false if + /// it was set to NULL (the entire target). + /// + /// + /// + /// This is useful if you're saving and restoring the viewport and want to know + /// whether you should restore a specific rectangle or NULL. + /// + /// + /// Each render target has its own viewport. This function checks the viewport + /// for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool RenderViewportSet() => Sdl.Render.RenderViewportSet(this); + + /// + /// Set default scale mode for new textures for given renderer. + /// + /// the scale mode to change to for new textures. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When a renderer is created, scale_mode defaults to SDL_SCALEMODE_LINEAR. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public bool SetDefaultTextureScaleMode(SdlScaleMode scale_mode) => + Sdl.Render.SetDefaultTextureScaleMode(this, scale_mode); + + /// + /// Set custom GPU render state. + /// + /// the state to to use, or NULL to clear custom GPU render state. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets custom GPU render state for subsequent draw calls. This + /// allows using custom shaders with the GPU renderer. + /// + /// + /// + /// This function should be called on the thread that created the + /// renderer. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public bool SetGpuRenderState(nint state) => Sdl.Render.SetGpuRenderState(this, state); + + /// + /// Set the clip rectangle for rendering on the specified target. + /// + /// + /// an SDL_Rect structure representing the clip area, relative to + /// the viewport, or NULL to disable clipping. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Each render target has its own clip rectangle. This function sets the + /// cliprect for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetRenderClipRect(SdlRect* rect) => Sdl.Render.SetRenderClipRect(this, rect); + + /// + /// Set the color scale used for render operations. + /// + /// the color scale value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The color scale is an additional scale multiplied into the pixel color + /// value while rendering. This can be used to adjust the brightness of colors + /// during HDR rendering, or changing HDR video brightness when playing on an + /// SDR display. + /// + /// + /// The color scale does not affect the alpha channel, only the color + /// brightness. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetRenderColorScale(float scale) => Sdl.Render.SetRenderColorScale(this, scale); + + /// + /// Set the blend mode used for drawing operations (Fill and Line). + /// + /// the SDL_BlendMode to use for blending. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the blend mode is not supported, the closest supported mode is chosen. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetRenderDrawBlendMode(uint blendMode) => Sdl.Render.SetRenderDrawBlendMode(this, blendMode); + + /// + /// Set the color used for drawing operations. + /// + /// the red value used to draw on the rendering target. + /// the green value used to draw on the rendering target. + /// the blue value used to draw on the rendering target. + /// + /// the alpha value used to draw on the rendering target; usually + /// SDL_ALPHA_OPAQUE (255). Use SDL_SetRenderDrawBlendMode to + /// specify how the alpha channel is used. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Set the color for drawing or filling rectangles, lines, and points, and for + /// SDL_RenderClear(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetRenderDrawColor(byte r, byte g, byte b, byte a) => + Sdl.Render.SetRenderDrawColor(this, r, g, b, a); + + /// + /// Set the color used for drawing operations (Rect, Line and Clear). + /// + /// the red value used to draw on the rendering target. + /// the green value used to draw on the rendering target. + /// the blue value used to draw on the rendering target. + /// + /// the alpha value used to draw on the rendering target. Use + /// SDL_SetRenderDrawBlendMode to specify how the alpha channel is + /// used. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Set the color for drawing or filling rectangles, lines, and points, and for + /// SDL_RenderClear(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetRenderDrawColorFloat(float r, float g, float b, float a) => + Sdl.Render.SetRenderDrawColorFloat(this, r, g, b, a); + + /// + /// Set a device-independent resolution and presentation mode for rendering. + /// + /// the width of the logical resolution. + /// the height of the logical resolution. + /// the presentation mode used. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function sets the width and height of the logical rendering output. + /// The renderer will act as if the current render target is always the + /// requested dimensions, scaling to the actual resolution as necessary. + /// + /// + /// This can be useful for games that expect a fixed size, but would like to + /// scale the output to whatever is available, regardless of how a user resizes + /// a window, or if the display is high DPI. + /// + /// + /// Logical presentation can be used with both render target textures and the + /// renderer's window; the state is unique to each render target, and this + /// function sets the state for the current render target. It might be useful + /// to draw to a texture that matches the window dimensions with logical + /// presentation enabled, and then draw that texture across the entire window + /// with logical presentation disabled. Be careful not to render both with + /// logical presentation enabled, however, as this could produce + /// double-letterboxing, etc. + /// + /// + /// You can disable logical coordinates by setting the mode to + /// SDL_LOGICAL_PRESENTATION_DISABLED, and in that case you get the full pixel + /// resolution of the render target; it is safe to toggle logical presentation + /// during the rendering of a frame: perhaps most of the rendering is done to + /// specific dimensions but to make fonts look sharp, the app turns off logical + /// presentation while drawing text, for example. + /// + /// + /// You can convert coordinates in an event into rendering coordinates using + /// SDL_ConvertEventToRenderCoordinates(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetRenderLogicalPresentation(int w, int h, SdlRendererLogicalPresentation mode) => + Sdl.Render.SetRenderLogicalPresentation(this, w, h, mode); + + /// + /// Set the drawing scale for rendering on the current target. + /// + /// the horizontal scaling factor. + /// the vertical scaling factor. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The drawing coordinates are scaled by the x/y scaling factors before they + /// are used by the renderer. This allows resolution independent drawing with a + /// single coordinate system. + /// + /// + /// If this results in scaling or subpixel drawing by the rendering backend, it + /// will be handled using the appropriate quality hints. For best results use + /// integer scaling factors. + /// + /// + /// Each render target has its own scale. This function sets the scale for the + /// current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetRenderScale(float scaleX, float scaleY) => Sdl.Render.SetRenderScale(this, scaleX, scaleY); + + /// + /// Set a texture as the current rendering target. + /// + /// + /// the targeted texture, which must be created with the + /// SDL_TEXTUREACCESS_TARGET flag, or NULL to render to the + /// window instead of a texture. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The default render target is the window for which the renderer was created. + /// To stop rendering to a texture and render to the window again, call this + /// function with a NULL texture. + /// + /// + /// Viewport, cliprect, scale, and logical presentation are unique to each + /// render target. Get and set functions for these states apply to the current + /// render target set by this function, and those states persist on each target + /// when the current render target changes. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetRenderTarget(SdlTexture texture) => Sdl.Render.SetRenderTarget(this, texture); + + /// + /// Set the texture addressing mode used in SDL_RenderGeometry(). + /// + /// + /// the SDL_TextureAddressMode to use for horizontal texture + /// coordinates in SDL_RenderGeometry(). + /// + /// + /// the SDL_TextureAddressMode to use for vertical texture + /// coordinates in SDL_RenderGeometry(). + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + /// + public bool SetRenderTextureAddressMode(SdlTextureAddressMode u_mode, SdlTextureAddressMode v_mode) => + Sdl.Render.SetRenderTextureAddressMode(this, u_mode, v_mode); + + /// + /// Toggle VSync of the given renderer. + /// + /// the vertical refresh sync interval. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When a renderer is created, vsync defaults to SDL_RENDERER_VSYNC_DISABLED. + /// + /// + /// The vsync parameter can be 1 to synchronize present with every vertical + /// refresh, 2 to synchronize present with every second vertical refresh, etc., + /// SDL_RENDERER_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or + /// SDL_RENDERER_VSYNC_DISABLED to disable. Not every value is supported by + /// every driver, so you should check the return value to see whether the + /// requested setting is supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetRenderVSync(int vsync) => Sdl.Render.SetRenderVSync(this, vsync); + + /// + /// Set the drawing area for rendering on the current target. + /// + /// + /// the SDL_Rect structure representing the drawing area, or NULL + /// to set the viewport to the entire target. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Drawing will clip to this area (separately from any clipping done with + /// SDL_SetRenderClipRect), and the top left of the area will become coordinate + /// (0, 0) for future drawing commands. + /// + /// + /// The area's width and height must be >= 0. + /// + /// + /// Each render target has its own viewport. This function sets the viewport + /// for the current render target. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetRenderViewport(SdlRect* rect) => Sdl.Render.SetRenderViewport(this, rect); + } + + public readonly unsafe partial struct SdlTexture + { + /// + /// Destroy the specified texture. + /// + /// + /// + /// Passing NULL or an otherwise invalid texture will set the SDL error message + /// to "Invalid texture". + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + Sdl.Render.DestroyTexture(this); + } + + /// + /// Ergonomic wrapper over SDL_GetRendererFromTexture. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlRenderer GetRendererFromTexture() => Sdl.Render.GetRendererFromTexture(this); + + /// + /// Get the additional alpha value multiplied into render copy operations. + /// + /// a pointer filled in with the current alpha value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool GetAlphaMod(out byte alpha) => Sdl.Render.GetTextureAlphaMod(this, out alpha); + + /// + /// Get the additional alpha value multiplied into render copy operations. + /// + /// a pointer filled in with the current alpha value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool GetAlphaModFloat(out float alpha) => Sdl.Render.GetTextureAlphaModFloat(this, out alpha); + + /// + /// Get the blend mode used for texture copy operations. + /// + /// a pointer filled in with the current SDL_BlendMode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetBlendMode(uint* blendMode) => Sdl.Render.GetTextureBlendMode(this, blendMode); + + /// + /// Get the additional color value multiplied into render copy operations. + /// + /// a pointer filled in with the current red color value. + /// a pointer filled in with the current green color value. + /// a pointer filled in with the current blue color value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool GetColorMod(out byte r, out byte g, out byte b) => + Sdl.Render.GetTextureColorMod(this, out r, out g, out b); + + /// + /// Get the additional color value multiplied into render copy operations. + /// + /// a pointer filled in with the current red color value. + /// a pointer filled in with the current green color value. + /// a pointer filled in with the current blue color value. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool GetColorModFloat(out float r, out float g, out float b) => + Sdl.Render.GetTextureColorModFloat(this, out r, out g, out b); + + /// + /// Get the properties associated with a texture. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_TEXTURE_COLORSPACE_NUMBER: an SDL_Colorspace value describing + /// the texture colorspace. + /// - SDL_PROP_TEXTURE_FORMAT_NUMBER: one of the enumerated values in + /// SDL_PixelFormat. + /// - SDL_PROP_TEXTURE_ACCESS_NUMBER: one of the enumerated values in + /// SDL_TextureAccess. + /// - SDL_PROP_TEXTURE_WIDTH_NUMBER: the width of the texture in pixels. + /// - SDL_PROP_TEXTURE_HEIGHT_NUMBER: the height of the texture in pixels. + /// - SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT: for HDR10 and floating point + /// textures, this defines the value of 100% diffuse white, with higher + /// values being displayed in the High Dynamic Range headroom. This defaults + /// to 100 for HDR10 textures and 1.0 for other textures. + /// - SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT: for HDR10 and floating point + /// textures, this defines the maximum dynamic range used by the content, in + /// terms of the SDR white point. If this is defined, any values outside the + /// range supported by the display will be scaled into the available HDR + /// headroom, otherwise they are clipped. This defaults to 1.0 for SDR + /// textures, 4.0 for HDR10 textures, and no default for floating point + /// textures. + /// + /// + /// With the direct3d11 renderer: + /// + /// + /// - SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER: the ID3D11Texture2D associated + /// with the texture + /// - SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER: the ID3D11Texture2D + /// associated with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER: the ID3D11Texture2D + /// associated with the V plane of a YUV texture + /// + /// + /// With the direct3d12 renderer: + /// + /// + /// - SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER: the ID3D12Resource associated + /// with the texture + /// - SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER: the ID3D12Resource associated + /// with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER: the ID3D12Resource associated + /// with the V plane of a YUV texture + /// + /// + /// With the vulkan renderer: + /// + /// + /// - SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER: the VkImage associated with the + /// texture + /// + /// + /// With the opengl renderer: + /// + /// + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER: the GLuint texture associated + /// with the texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER: the GLuint texture + /// associated with the UV plane of an NV12 texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER: the GLuint texture associated + /// with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER: the GLuint texture associated + /// with the V plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER: the GLenum for the + /// texture target (GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, etc) + /// - SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT: the texture coordinate width of + /// the texture (0.0 - 1.0) + /// - SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT: the texture coordinate height of + /// the texture (0.0 - 1.0) + /// + /// + /// With the opengles2 renderer: + /// + /// + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER: the GLuint texture + /// associated with the texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER: the GLuint texture + /// associated with the UV plane of an NV12 texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER: the GLuint texture + /// associated with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER: the GLuint texture + /// associated with the V plane of a YUV texture + /// - SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER: the GLenum for the + /// texture target (GL_TEXTURE_2D, GL_TEXTURE_EXTERNAL_OES, etc) + /// + /// + /// With the gpu renderer: + /// + /// + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER: the SDL_GPUTexture associated + /// with the texture + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER: the SDL_GPUTexture associated + /// with the UV plane of an NV12 texture + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER: the SDL_GPUTexture associated + /// with the U plane of a YUV texture + /// - SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER: the SDL_GPUTexture associated + /// with the V plane of a YUV texture + /// + /// + /// + /// It is safe to call this function from any thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetProperties() => Sdl.Render.GetTextureProperties(this); + + /// + /// Get the scale mode used for texture scale operations. + /// + /// a pointer filled in with the current scale mode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetScaleMode(out SdlScaleMode scaleMode) => Sdl.Render.GetTextureScaleMode(this, out scaleMode); + + /// + /// Get the size of a texture, as floating point values. + /// + /// + /// a pointer filled in with the width of the texture in pixels. This + /// argument can be NULL if you don't need this information. + /// + /// + /// a pointer filled in with the height of the texture in pixels. This + /// argument can be NULL if you don't need this information. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool GetSize(out float w, out float h) => Sdl.Render.GetTextureSize(this, out w, out h); + + /// + /// Lock a portion of the texture for write-only pixel access. + /// + /// + /// an SDL_Rect structure representing the area to lock for access; + /// NULL to lock the entire texture. + /// + /// + /// this is filled in with a pointer to the locked pixels, + /// appropriately offset by the locked area. + /// + /// + /// this is filled in with the pitch of the locked pixels; the + /// pitch is the length of one row in bytes. + /// + /// + /// true on success or false if the texture is not valid or was not + /// created with SDL_TEXTUREACCESS_STREAMING; call SDL_GetError() + /// for more information. + /// + /// + /// + /// As an optimization, the pixels made available for editing don't necessarily + /// contain the old texture data. This is a write-only operation, and if you + /// need to keep a copy of the texture data you should do that at the + /// application level. + /// + /// + /// You must use SDL_UnlockTexture() to unlock the pixels and apply any + /// changes. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool Lock(SdlRect* rect, void** pixels, out int pitch) => + Sdl.Render.LockTexture(this, rect, pixels, out pitch); + + /// + /// Lock a portion of the texture for write-only pixel access, and expose + /// it as a SDL surface. + /// + /// + /// a pointer to the rectangle to lock for access. If the rect is + /// NULL, the entire texture will be locked. + /// + /// + /// a pointer to an SDL surface of size rect. Don't assume + /// any specific pixel content. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Besides providing an SDL_Surface instead of raw pixel data, this function + /// operates like SDL_LockTexture. + /// + /// + /// As an optimization, the pixels made available for editing don't necessarily + /// contain the old texture data. This is a write-only operation, and if you + /// need to keep a copy of the texture data you should do that at the + /// application level. + /// + /// + /// You must use SDL_UnlockTexture() to unlock the pixels and apply any + /// changes. + /// + /// + /// The returned surface is freed internally after calling SDL_UnlockTexture() + /// or SDL_DestroyTexture(). The caller should not free it. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool LockToSurface(SdlRect* rect, SdlSurface** surface) => + Sdl.Render.LockTextureToSurface(this, rect, surface); + + /// + /// Set an additional alpha value multiplied into render copy operations. + /// + /// the source alpha value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation the source alpha + /// value is modulated by this alpha value according to the following formula: + /// + /// + /// srcA = srcA * (alpha / 255) + /// + /// + /// Alpha modulation is not always supported by the renderer; it will return + /// false if alpha modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetAlphaMod(byte alpha) => Sdl.Render.SetTextureAlphaMod(this, alpha); + + /// + /// Set an additional alpha value multiplied into render copy operations. + /// + /// the source alpha value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation the source alpha + /// value is modulated by this alpha value according to the following formula: + /// + /// + /// srcA = srcA * alpha + /// + /// + /// Alpha modulation is not always supported by the renderer; it will return + /// false if alpha modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetAlphaModFloat(float alpha) => Sdl.Render.SetTextureAlphaModFloat(this, alpha); + + /// + /// Set the blend mode for a texture, used by SDL_RenderTexture(). + /// + /// the SDL_BlendMode to use for texture blending. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the blend mode is not supported, the closest supported mode is chosen + /// and this function returns false. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetBlendMode(uint blendMode) => Sdl.Render.SetTextureBlendMode(this, blendMode); + + /// + /// Set an additional color value multiplied into render copy operations. + /// + /// the red color value multiplied into copy operations. + /// the green color value multiplied into copy operations. + /// the blue color value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation each source color + /// channel is modulated by the appropriate color value according to the + /// following formula: + /// + /// + /// srcC = srcC * (color / 255) + /// + /// + /// Color modulation is not always supported by the renderer; it will return + /// false if color modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetColorMod(byte r, byte g, byte b) => Sdl.Render.SetTextureColorMod(this, r, g, b); + + /// + /// Set an additional color value multiplied into render copy operations. + /// + /// the red color value multiplied into copy operations. + /// the green color value multiplied into copy operations. + /// the blue color value multiplied into copy operations. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When this texture is rendered, during the copy operation each source color + /// channel is modulated by the appropriate color value according to the + /// following formula: + /// + /// + /// srcC = srcC * color + /// + /// + /// Color modulation is not always supported by the renderer; it will return + /// false if color modulation is not supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetColorModFloat(float r, float g, float b) => Sdl.Render.SetTextureColorModFloat(this, r, g, b); + + /// + /// Set the palette used by a texture. + /// + /// the SDL_Palette structure to use. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Setting the palette keeps an internal reference to the palette, which can + /// be safely destroyed afterwards. + /// + /// + /// A single palette can be shared with many textures. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + /// + public bool SetPalette(SdlPalette* palette) => Sdl.Render.SetTexturePalette(this, palette); + + /// + /// Set the scale mode used for texture scale operations. + /// + /// the SDL_ScaleMode to use for texture scaling. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The default texture scale mode is SDL_SCALEMODE_LINEAR. + /// + /// + /// If the scale mode is not supported, the closest supported mode is chosen. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetScaleMode(SdlScaleMode scaleMode) => Sdl.Render.SetTextureScaleMode(this, scaleMode); + + /// + /// Unlock a texture, uploading the changes to video memory, if needed. + /// + /// + /// + /// Warning: Please note that SDL_LockTexture() is intended to be + /// write-only; it will not guarantee the previous contents of the texture will + /// be provided. You must fully initialize any area of a texture that you lock + /// before unlocking it, as the pixels might otherwise be uninitialized memory. + /// + /// + /// Which is to say: locking and immediately unlocking a texture can result in + /// corrupted textures, depending on the renderer in use. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public void Unlock() => Sdl.Render.UnlockTexture(this); + + /// + /// Update a rectangle within a planar NV12 or NV21 texture with new pixels. + /// + /// + /// a pointer to the rectangle of pixels to update, or NULL to + /// update the entire texture. + /// + /// the raw pixel data for the Y plane. + /// + /// the number of bytes between rows of pixel data for the Y + /// plane. + /// + /// the raw pixel data for the UV plane. + /// + /// the number of bytes between rows of pixel data for the UV + /// plane. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You can use SDL_UpdateTexture() as long as your pixel data is a contiguous + /// block of NV12/21 planes in the proper order, but this function is available + /// if your pixel data is not contiguous. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool UpdateNV(SdlRect* rect, byte* Yplane, int Ypitch, byte* UVplane, int UVpitch) => + Sdl.Render.UpdateNVTexture(this, rect, Yplane, Ypitch, UVplane, UVpitch); + + /// + /// Update the given texture rectangle with new pixel data. + /// + /// + /// an SDL_Rect structure representing the area to update, or NULL + /// to update the entire texture. + /// + /// the raw pixel data in the format of the texture. + /// + /// the number of bytes in a row of pixel data, including padding + /// between lines. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The pixel data must be in the pixel format of the texture, which can be + /// queried using the SDL_PROP_TEXTURE_FORMAT_NUMBER property. + /// + /// + /// This is a fairly slow function, intended for use with static textures that + /// do not change often. + /// + /// + /// If the texture is intended to be updated often, it is preferred to create + /// the texture as streaming and use the locking functions referenced below. + /// While this function will work with streaming textures, for optimization + /// reasons you may not get the pixels back if you lock the texture afterward. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool Update(SdlRect* rect, void* pixels, int pitch) => + Sdl.Render.UpdateTexture(this, rect, pixels, pitch); + + /// + /// Update a rectangle within a planar YV12 or IYUV texture with new pixel + /// data. + /// + /// + /// a pointer to the rectangle of pixels to update, or NULL to + /// update the entire texture. + /// + /// the raw pixel data for the Y plane. + /// + /// the number of bytes between rows of pixel data for the Y + /// plane. + /// + /// the raw pixel data for the U plane. + /// + /// the number of bytes between rows of pixel data for the U + /// plane. + /// + /// the raw pixel data for the V plane. + /// + /// the number of bytes between rows of pixel data for the V + /// plane. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// You can use SDL_UpdateTexture() as long as your pixel data is a contiguous + /// block of Y and U/V planes in the proper order, but this function is + /// available if your pixel data is not contiguous. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool UpdateYUV( + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* Uplane, + int Upitch, + byte* Vplane, + int Vpitch + ) => Sdl.Render.UpdateYUVTexture(this, rect, Yplane, Ypitch, Uplane, Upitch, Vplane, Vpitch); + } + + public readonly unsafe partial struct SdlWindow + { + /// + /// Dismiss the composition window/IME without disabling the subsystem. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool ClearComposition() => Sdl.Keyboard.ClearComposition(this); + + /// + /// Ergonomic wrapper over SDL_CreatePopupWindow. Throws instead of returning a null handle on failure. + /// + /// + /// the x position of the popup window relative to the origin + /// of the parent. + /// + /// + /// the y position of the popup window relative to the origin + /// of the parent window. + /// + /// the width of the window. + /// the height of the window. + /// + /// SDL_WINDOW_TOOLTIP or SDL_WINDOW_POPUP_MENU, and zero or more + /// additional SDL_WindowFlags OR'd together. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlWindow CreatePopup(int offset_x, int offset_y, int w, int h, SdlWindowFlags flags) => + Sdl.Video.CreatePopupWindow(this, offset_x, offset_y, w, h, flags); + + /// + /// Ergonomic wrapper over SDL_CreateRenderer. Throws instead of returning a null handle on failure. + /// + /// + /// the name of the rendering driver to initialize, or NULL to let + /// SDL choose one. + /// + /// The created handle (never a null handle). + /// The SDL call failed; the message carries the SDL_GetError + /// text. + public SdlRenderer CreateRenderer(string name) => Sdl.Render.CreateRenderer(this, name); + + /// + /// Destroy a window. + /// + /// + /// + /// Any child windows owned by the window will be recursively destroyed as + /// well. + /// + /// + /// Note that on some platforms, the visible window may not actually be removed + /// from the screen until the SDL event loop is pumped again, even though the + /// SDL_Window is no longer valid after this call. + /// + /// + /// This is equivalent to Dispose(): it is a safe no-op on a default (null) handle and otherwise performs + /// the single native free. Because a handle is a copyable value type, it cannot invalidate its own copies + /// after the free, so calling this (or Dispose) more than once on the same handle value — or on separate + /// copies of it — frees the underlying native object more than once. Free each handle exactly once. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public void Destroy() + { + if (IsNull()) + { + return; + } + Sdl.Video.DestroyWindow(this); + } + + /// + /// Destroy the surface associated with the window. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool DestroySurface() => Sdl.Video.DestroyWindowSurface(this); + + /// + /// Request a window to demand attention from the user. + /// + /// the operation to perform. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Flash(SdlFlashOperation operation) => Sdl.Video.FlashWindow(this, operation); + + /// + /// Create an OpenGL context for an OpenGL window, and make it current. + /// + /// + /// the OpenGL context associated with window or NULL on failure; + /// call SDL_GetError() for more information. + /// + /// + /// + /// The OpenGL context will be created with the current states set through + /// SDL_GL_SetAttribute(). + /// + /// + /// The SDL_Window specified must have been created with the SDL_WINDOW_OPENGL + /// flag, or context creation will fail. + /// + /// + /// Windows users new to OpenGL should note that, for historical reasons, GL + /// functions added after OpenGL version 1.1 are not available by default. + /// Those functions must be loaded at run-time, either with an OpenGL + /// extension-handling library or with SDL_GL_GetProcAddress() and its related + /// functions. + /// + /// + /// SDL_GLContext is opaque to the application. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public nint GLCreateContext() => Sdl.Video.GLCreateContext(this); + + /// + /// Set up an OpenGL context for rendering into an OpenGL window. + /// + /// the OpenGL context to associate with the window. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The context must have been created with a compatible window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GLMakeCurrent(nint context) => Sdl.Video.GLMakeCurrent(this, context); + + /// + /// Update a window with OpenGL rendering. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is used with double-buffered OpenGL contexts, which are the default. + /// + /// + /// On macOS, make sure you bind 0 to the draw framebuffer before swapping the + /// window, otherwise nothing will happen. If you aren't using + /// glBindFramebuffer(), this is the default and you won't have to do anything + /// extra. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool GLSwap() => Sdl.Video.GLSwapWindow(this); + + /// + /// Get the display associated with a window. + /// + /// + /// the instance ID of the display containing the center of the window + /// on success or 0 on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public uint GetDisplayForWindow() => Sdl.Video.GetDisplayForWindow(this); + + /// + /// Ergonomic wrapper over SDL_GetRenderer. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlRenderer GetRenderer() => Sdl.Render.GetRenderer(this); + + /// + /// Get the area used to type Unicode text input. + /// + /// + /// a pointer to an SDL_Rect filled in with the text input area, + /// may be NULL. + /// + /// + /// a pointer to the offset of the current cursor location + /// relative to rect->x, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This returns the values previously set by SDL_SetTextInputArea(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetTextInputArea(SdlRect* rect, out int cursor) => + Sdl.Keyboard.GetTextInputArea(this, rect, out cursor); + + /// + /// Get the aspect ratio of a window's client area. + /// + /// + /// a pointer filled in with the minimum aspect ratio of the + /// window, may be NULL. + /// + /// + /// a pointer filled in with the maximum aspect ratio of the + /// window, may be NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetAspectRatio(out float min_aspect, out float max_aspect) => + Sdl.Video.GetWindowAspectRatio(this, out min_aspect, out max_aspect); + + /// + /// Get the size of a window's borders (decorations) around the client area. + /// + /// + /// pointer to variable for storing the size of the top border; NULL + /// is permitted. + /// + /// + /// pointer to variable for storing the size of the left border; + /// NULL is permitted. + /// + /// + /// pointer to variable for storing the size of the bottom + /// border; NULL is permitted. + /// + /// + /// pointer to variable for storing the size of the right border; + /// NULL is permitted. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Note: If this function fails (returns false), the size values will be + /// initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the + /// window in question was borderless. + /// + /// + /// Note: This function may fail on systems where the window has not yet been + /// decorated by the display server (for example, immediately after calling + /// SDL_CreateWindow). It is recommended that you wait at least until the + /// window has been presented and composited, so that the window system has a + /// chance to decorate the window and provide the border dimensions to SDL. + /// + /// + /// This function also returns false if getting the information is not + /// supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetBordersSize(out int top, out int left, out int bottom, out int right) => + Sdl.Video.GetWindowBordersSize(this, out top, out left, out bottom, out right); + + /// + /// Get the content display scale relative to a window's pixel size. + /// + /// + /// the display scale, or 0.0f on failure; call SDL_GetError() for + /// more information. + /// + /// + /// + /// This is a combination of the window pixel density and the display content + /// scale, and is the expected scale for displaying content in this window. For + /// example, if a 3840x2160 window had a display scale of 2.0, the user expects + /// the content to take twice as many pixels and be the same physical size as + /// if it were being displayed in a 1920x1080 window with a display scale of + /// 1.0. + /// + /// + /// Conceptually this value corresponds to the scale display setting, and is + /// updated when that setting is changed, or the window moves to a display with + /// a different scale setting. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public float GetDisplayScale() => Sdl.Video.GetWindowDisplayScale(this); + + /// + /// Get the window flags. + /// + /// a mask of the SDL_WindowFlags associated with window. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + /// + /// + public SdlWindowFlags GetFlags() => Sdl.Video.GetWindowFlags(this); + + /// + /// Ergonomic wrapper over SDL_GetWindowICCProfile. + /// + /// The SDL call failed; the message carries the SDL_GetError + /// text. + /// + /// SDL returns a freshly SDL_malloc'd buffer for this call; the returned array is a managed copy, and + /// the native buffer is freed with SDL_free before this method returns. + /// + public byte[] GetICCProfile() => Sdl.Video.GetWindowICCProfile(this); + + /// + /// Get the numeric ID of a window. + /// + /// + /// the ID of the window on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The numeric ID is what SDL_WindowEvent references, and is necessary to map + /// these events to specific SDL_Window objects. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public uint GetID() => Sdl.Video.GetWindowID(this); + + /// + /// Get a window's keyboard grab mode. + /// + /// true if keyboard is grabbed, and false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetKeyboardGrab() => Sdl.Video.GetWindowKeyboardGrab(this); + + /// + /// Get the maximum size of a window's client area. + /// + /// + /// a pointer filled in with the maximum width of the window, may be + /// NULL. + /// + /// + /// a pointer filled in with the maximum height of the window, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetMaximumSize(out int w, out int h) => Sdl.Video.GetWindowMaximumSize(this, out w, out h); + + /// + /// Get the minimum size of a window's client area. + /// + /// + /// a pointer filled in with the minimum width of the window, may be + /// NULL. + /// + /// + /// a pointer filled in with the minimum height of the window, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetMinimumSize(out int w, out int h) => Sdl.Video.GetWindowMinimumSize(this, out w, out h); + + /// + /// Get a window's mouse grab mode. + /// + /// true if mouse is grabbed, and false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool GetMouseGrab() => Sdl.Video.GetWindowMouseGrab(this); + + /// + /// Get the opacity of a window. + /// + /// + /// the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on + /// failure; call SDL_GetError() for more information. + /// + /// + /// + /// If transparency isn't supported on this platform, opacity will be returned + /// as 1.0f without error. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public float GetOpacity() => Sdl.Video.GetWindowOpacity(this); + + /// + /// Ergonomic wrapper over SDL_GetWindowParent. + /// + /// + /// Borrowed handle: the returned handle is owned by SDL (or by another object) and must not be + /// disposed. Do not call on it; doing so would free a resource this + /// call does not own. A null handle is returned on failure. + /// + public SdlWindow GetParent() => Sdl.Video.GetWindowParent(this); + + /// + /// Get the pixel density of a window. + /// + /// + /// the pixel density or 0.0f on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is a ratio of pixel size to window size. For example, if the window is + /// 1920x1080 and it has a high density back buffer of 3840x2160 pixels, it + /// would have a pixel density of 2.0. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public float GetPixelDensity() => Sdl.Video.GetWindowPixelDensity(this); + + /// + /// Get the pixel format associated with the window. + /// + /// + /// the pixel format of the window on success or + /// SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public SdlPixelFormat GetPixelFormat() => Sdl.Video.GetWindowPixelFormat(this); + + /// + /// Get the position of a window. + /// + /// + /// a pointer filled in with the x position of the window, may be + /// NULL. + /// + /// + /// a pointer filled in with the y position of the window, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the current position of the window as last reported by the + /// windowing system. + /// + /// + /// If you do not need the value for one of the positions a NULL may be passed + /// in the x or y parameter. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetPosition(out int x, out int y) => Sdl.Video.GetWindowPosition(this, out x, out y); + + /// + /// Get the state of the progress bar for the given window’s taskbar icon. + /// + /// + /// the progress state, or SDL_PROGRESS_STATE_INVALID on failure; + /// call SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public SdlProgressState GetProgressState() => Sdl.Video.GetWindowProgressState(this); + + /// + /// Get the value of the progress bar for the given window’s taskbar icon. + /// + /// + /// the progress value in the range of [0.0f - 1.0f], or -1.0f on + /// failure; call SDL_GetError() for more information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public float GetProgressValue() => Sdl.Video.GetWindowProgressValue(this); + + /// + /// Get the properties associated with a window. + /// + /// + /// a valid property ID on success or 0 on failure; call + /// SDL_GetError() for more information. + /// + /// + /// + /// The following read-only properties are provided by SDL: + /// + /// + /// - SDL_PROP_WINDOW_SHAPE_POINTER: the surface associated with a shaped + /// window + /// - SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN: true if the window has HDR + /// headroom above the SDR white point. This property can change dynamically + /// when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT: the value of SDR white in the + /// SDL_COLORSPACE_SRGB_LINEAR colorspace. On Windows this corresponds to the + /// SDR white level in scRGB colorspace, and on Apple platforms this is + /// always 1.0 for EDR content. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// - SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT: the additional high dynamic range + /// that can be displayed, in terms of the SDR white point. When HDR is not + /// enabled, this will be 1.0. This property can change dynamically when + /// SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent. + /// + /// + /// On Android: + /// + /// + /// - SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER: the ANativeWindow associated + /// with the window + /// - SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER: the EGLSurface associated with + /// the window + /// + /// + /// On iOS: + /// + /// + /// - SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER: the (__unsafe_unretained) + /// UIWindow associated with the window + /// - SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER: the NSInteger tag + /// associated with metal views on the window + /// - SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER: the OpenGL view's + /// framebuffer object. It must be bound when rendering to the screen using + /// OpenGL. + /// - SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER: the OpenGL view's + /// renderbuffer object. It must be bound when SDL_GL_SwapWindow is called. + /// - SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER: the OpenGL + /// view's resolve framebuffer, when MSAA is used. + /// + /// + /// On KMS/DRM: + /// + /// + /// - SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER: the device index associated + /// with the window (e.g. the X in /dev/dri/cardX) + /// - SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER: the DRM FD associated with the + /// window + /// - SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER: the GBM device associated + /// with the window + /// + /// + /// On macOS: + /// + /// + /// - SDL_PROP_WINDOW_COCOA_WINDOW_POINTER: the (__unsafe_unretained) + /// NSWindow associated with the window + /// - SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER: the NSInteger tag + /// associated with metal views on the window + /// + /// + /// On OpenVR: + /// + /// + /// - SDL_PROP_WINDOW_OPENVR_OVERLAY_ID_NUMBER: the OpenVR Overlay Handle ID + /// for the associated overlay window. + /// + /// + /// On Vivante: + /// + /// + /// - SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER: the EGLNativeDisplayType + /// associated with the window + /// - SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER: the EGLNativeWindowType + /// associated with the window + /// - SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER: the EGLSurface associated with + /// the window + /// + /// + /// On Windows: + /// + /// + /// - SDL_PROP_WINDOW_WIN32_HWND_POINTER: the HWND associated with the window + /// - SDL_PROP_WINDOW_WIN32_HDC_POINTER: the HDC associated with the window + /// - SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER: the HINSTANCE associated with + /// the window + /// + /// + /// On Wayland: + /// + /// + /// Note: The xdg_* window objects do not internally persist across window + /// show/hide calls. They will be null if the window is hidden and must be + /// queried each time it is shown. + /// + /// + /// - SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER: the wl_display associated with + /// the window + /// - SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER: the wl_surface associated with + /// the window + /// - SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER: the wp_viewport associated + /// with the window + /// - SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER: the wl_egl_window + /// associated with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER: the xdg_surface associated + /// with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER: the xdg_toplevel role + /// associated with the window + /// - 'SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING': the export + /// handle associated with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER: the xdg_popup role + /// associated with the window + /// - SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER: the xdg_positioner + /// associated with the window, in popup mode + /// + /// + /// On X11: + /// + /// + /// - SDL_PROP_WINDOW_X11_DISPLAY_POINTER: the X11 Display associated with + /// the window + /// - SDL_PROP_WINDOW_X11_SCREEN_NUMBER: the screen number associated with + /// the window + /// - SDL_PROP_WINDOW_X11_WINDOW_NUMBER: the X11 Window associated with the + /// window + /// + /// + /// On Emscripten: + /// + /// + /// - SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING: the id the canvas element + /// will have + /// - SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING: the keyboard + /// element that associates keyboard events to this window + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public uint GetProperties() => Sdl.Video.GetWindowProperties(this); + + /// + /// Query whether relative mouse mode is enabled for a window. + /// + /// true if relative mode is enabled for a window or false otherwise. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetRelativeMouseMode() => Sdl.Mouse.GetWindowRelativeMouseMode(this); + + /// + /// Get the safe area for this window. + /// + /// + /// a pointer filled in with the client area that is safe for + /// interactive content. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Some devices have portions of the screen which are partially obscured or + /// not interactive, possibly due to on-screen controls, curved edges, camera + /// notches, TV overscan, etc. This function provides the area of the window + /// which is safe to have interactable content. You should continue rendering + /// into the rest of the window, but it should not contain visually important + /// or interactable content. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool GetSafeArea(SdlRect* rect) => Sdl.Video.GetWindowSafeArea(this, rect); + + /// + /// Get the size of a window's client area. + /// + /// a pointer filled in with the width of the window, may be NULL. + /// a pointer filled in with the height of the window, may be NULL. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The window pixel size may differ from its window coordinate size if the + /// window is on a high pixel density display. Use SDL_GetWindowSizeInPixels() + /// or SDL_GetRenderOutputSize() to get the real client area size in pixels. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool GetSize(out int w, out int h) => Sdl.Video.GetWindowSize(this, out w, out h); + + /// + /// Get the size of a window's client area, in pixels. + /// + /// + /// a pointer to variable for storing the width in pixels, may be + /// NULL. + /// + /// + /// a pointer to variable for storing the height in pixels, may be + /// NULL. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool GetSizeInPixels(out int w, out int h) => Sdl.Video.GetWindowSizeInPixels(this, out w, out h); + + /// + /// Get VSync for the window surface. + /// + /// + /// an int filled with the current vertical refresh sync interval. + /// See SDL_SetWindowSurfaceVSync() for the meaning of the value. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool GetSurfaceVSync(out int vsync) => Sdl.Video.GetWindowSurfaceVSync(this, out vsync); + + /// + /// Get the title of a window. + /// + /// + /// the title of the window in UTF-8 format or "" if there is no + /// title. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public string? GetTitle() => Sdl.Video.GetWindowTitle(this); + + /// + /// Hide a window. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool Hide() => Sdl.Video.HideWindow(this); + + /// + /// Request that the window be made as large as possible. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Non-resizable windows can't be maximized. The window must have the + /// SDL_WINDOW_RESIZABLE flag set, or this will have no effect. + /// + /// + /// On some windowing systems this request is asynchronous and the new window + /// state may not have have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_MAXIMIZED event will be + /// emitted. Note that, as this is just a request, the windowing system can + /// deny the state change. + /// + /// + /// When maximizing a window, whether the constraints set via + /// SDL_SetWindowMaximumSize() are honored depends on the policy of the window + /// manager. Win32 and macOS enforce the constraints when maximizing, while X11 + /// and Wayland window managers may vary. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool Maximize() => Sdl.Video.MaximizeWindow(this); + + /// + /// Request that the window be minimized to an iconic representation. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in a fullscreen state, this request has no direct effect. + /// It may alter the state the window is returned to when leaving fullscreen. + /// + /// + /// On some windowing systems this request is asynchronous and the new window + /// state may not have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_MINIMIZED event will be + /// emitted. Note that, as this is just a request, the windowing system can + /// deny the state change. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool Minimize() => Sdl.Video.MinimizeWindow(this); + + /// + /// Request that a window be raised above other windows and gain the input + /// focus. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The result of this request is subject to desktop window manager policy, + /// particularly if raising the requested window would result in stealing focus + /// from another application. If the window is successfully raised and gains + /// input focus, an SDL_EVENT_WINDOW_FOCUS_GAINED event will be emitted, and + /// the window will have the SDL_WINDOW_INPUT_FOCUS flag set. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool Raise() => Sdl.Video.RaiseWindow(this); + + /// + /// Request that the size and position of a minimized or maximized window be + /// restored. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in a fullscreen state, this request has no direct effect. + /// It may alter the state the window is returned to when leaving fullscreen. + /// + /// + /// On some windowing systems this request is asynchronous and the new window + /// state may not have have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_RESTORED event will be + /// emitted. Note that, as this is just a request, the windowing system can + /// deny the state change. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool Restore() => Sdl.Video.RestoreWindow(this); + + /// + /// Check whether the screen keyboard is shown for given window. + /// + /// true if screen keyboard is shown or false if not. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool ScreenKeyboardShown() => Sdl.Keyboard.ScreenKeyboardShown(this); + + /// + /// Set the area used to type Unicode text input. + /// + /// + /// the SDL_Rect representing the text input area, in window + /// coordinates, or NULL to clear it. + /// + /// + /// the offset of the current cursor location relative to + /// rect->x, in window coordinates. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Native input methods may place a window with word suggestions near the + /// cursor, without covering the text being entered. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetTextInputArea(SdlRect* rect, int cursor) => Sdl.Keyboard.SetTextInputArea(this, rect, cursor); + + /// + /// Set the window to always be above the others. + /// + /// true to set the window always on top, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_ALWAYS_ON_TOP flag. This + /// will bring the window to the front and keep the window above the rest. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetAlwaysOnTop(bool on_top) => Sdl.Video.SetWindowAlwaysOnTop(this, on_top); + + /// + /// Request that the aspect ratio of a window's client area be set. + /// + /// + /// the minimum aspect ratio of the window, or 0.0f for no + /// limit. + /// + /// + /// the maximum aspect ratio of the window, or 0.0f for no + /// limit. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The aspect ratio is the ratio of width divided by height, e.g. 2560x1600 + /// would be 1.6. Larger aspect ratios are wider and smaller aspect ratios are + /// narrower. + /// + /// + /// If, at the time of this request, the window in a fixed-size state, such as + /// maximized or fullscreen, the request will be deferred until the window + /// exits this state and becomes resizable again. + /// + /// + /// On some windowing systems, this request is asynchronous and the new window + /// aspect ratio may not have have been applied immediately upon the return of + /// this function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be + /// emitted with the new window dimensions. Note that the new dimensions may + /// not match the exact aspect ratio requested, as some windowing systems can + /// restrict the window size in certain scenarios (e.g. constraining the size + /// of the content area to remain within the usable desktop bounds). + /// Additionally, as this is just a request, it can be denied by the windowing + /// system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetAspectRatio(float min_aspect, float max_aspect) => + Sdl.Video.SetWindowAspectRatio(this, min_aspect, max_aspect); + + /// + /// Set the border state of a window. + /// + /// false to remove border, true to add border. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_BORDERLESS flag and add + /// or remove the border from the actual window. This is a no-op if the + /// window's border already matches the requested state. + /// + /// + /// You can't change the border state of a fullscreen window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetBordered(bool bordered) => Sdl.Video.SetWindowBordered(this, bordered); + + /// + /// Set the window to fill the current document space (Emscripten only). + /// + /// true to set the window to fill the document, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_FILL_DOCUMENT flag. + /// + /// + /// Currently this flag only applies to the Emscripten target. + /// + /// + /// When enabled, the canvas element fills the entire document. Resize events + /// will be generated as the browser window is resized, as that will adjust the + /// canvas size as well. The canvas will cover anything else on the page, + /// including any controls provided by Emscripten in its generated HTML file + /// (in fact, any elements on the page that aren't the canvas will be moved + /// into a hidden div element). + /// + /// + /// Often times this is desirable for a browser-based game, but it means + /// several things that we expect of an SDL window on other platforms might not + /// work as expected, such as minimum window sizes and aspect ratios. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + /// + public bool SetFillDocument(bool fill) => Sdl.Video.SetWindowFillDocument(this, fill); + + /// + /// Set whether the window may have input focus. + /// + /// true to allow input focus, false to not allow input focus. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool SetFocusable(bool focusable) => Sdl.Video.SetWindowFocusable(this, focusable); + + /// + /// Request that the window's fullscreen state be changed. + /// + /// true for fullscreen mode, false for windowed mode. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// By default a window in fullscreen state uses borderless fullscreen desktop + /// mode, but a specific exclusive display mode can be set using + /// SDL_SetWindowFullscreenMode(). + /// + /// + /// On some windowing systems this request is asynchronous and the new + /// fullscreen state may not have have been applied immediately upon the return + /// of this function. If an immediate change is required, call SDL_SyncWindow() + /// to block until the changes have taken effect. + /// + /// + /// When the window state changes, an SDL_EVENT_WINDOW_ENTER_FULLSCREEN or + /// SDL_EVENT_WINDOW_LEAVE_FULLSCREEN event will be emitted. Note that, as this + /// is just a request, it can be denied by the windowing system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetFullscreen(bool fullscreen) => Sdl.Video.SetWindowFullscreen(this, fullscreen); + + /// + /// Set the display mode to use when a window is visible and fullscreen. + /// + /// + /// a pointer to the display mode to use, which can be NULL for + /// borderless fullscreen desktop mode, or one of the fullscreen + /// modes returned by SDL_GetFullscreenDisplayModes() to set an + /// exclusive fullscreen mode. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This only affects the display mode used when the window is fullscreen. To + /// change the window size when the window is not fullscreen, use + /// SDL_SetWindowSize(). + /// + /// + /// If the window is currently in the fullscreen state, this request is + /// asynchronous on some windowing systems and the new mode dimensions may not + /// be applied immediately upon the return of this function. If an immediate + /// change is required, call SDL_SyncWindow() to block until the changes have + /// taken effect. + /// + /// + /// When the new mode takes effect, an SDL_EVENT_WINDOW_RESIZED and/or an + /// SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will be emitted with the new mode + /// dimensions. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetFullscreenMode(SdlDisplayMode* mode) => Sdl.Video.SetWindowFullscreenMode(this, mode); + + /// + /// Set the icon for a window. + /// + /// an SDL_Surface structure containing the icon for the window. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If this function is passed a surface with alternate representations added + /// using SDL_AddSurfaceAlternateImage(), the surface will be interpreted as + /// the content to be used for 100% display scale, and the alternate + /// representations will be used for high DPI situations. For example, if the + /// original surface is 32x32, then on a 2x macOS display or 200% display scale + /// on Windows, a 64x64 version of the image will be used, if available. If a + /// matching version of the image isn't available, the closest larger size + /// image will be downscaled to the appropriate size and be used instead, if + /// available. Otherwise, the closest smaller image will be upscaled and be + /// used instead. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetIcon(SdlSurface* icon) => Sdl.Video.SetWindowIcon(this, icon); + + /// + /// Set a window's keyboard grab mode. + /// + /// this is true to grab keyboard, and false to release. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or + /// the Meta/Super key. Note that not all system keyboard shortcuts can be + /// captured by applications (one example is Ctrl+Alt+Del on Windows). + /// + /// + /// This is primarily intended for specialized applications such as VNC clients + /// or VM frontends. Normal games should not use keyboard grab. + /// + /// + /// When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the + /// window is full-screen to ensure the user is not trapped in your + /// application. If you have a custom keyboard shortcut to exit fullscreen + /// mode, you may suppress this behavior with + /// SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED. + /// + /// + /// If the caller enables a grab while another window is currently grabbed, the + /// other window loses its grab in favor of the caller's window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetKeyboardGrab(bool grabbed) => Sdl.Video.SetWindowKeyboardGrab(this, grabbed); + + /// + /// Set the maximum size of a window's client area. + /// + /// the maximum width of the window, or 0 for no limit. + /// the maximum height of the window, or 0 for no limit. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetMaximumSize(int max_w, int max_h) => Sdl.Video.SetWindowMaximumSize(this, max_w, max_h); + + /// + /// Set the minimum size of a window's client area. + /// + /// the minimum width of the window, or 0 for no limit. + /// the minimum height of the window, or 0 for no limit. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetMinimumSize(int min_w, int min_h) => Sdl.Video.SetWindowMinimumSize(this, min_w, min_h); + + /// + /// Toggle the state of the window as modal. + /// + /// true to toggle modal status on, false to toggle it off. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// To enable modal status on a window, the window must currently be the child + /// window of a parent, or toggling modal status on will fail. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetModal(bool modal) => Sdl.Video.SetWindowModal(this, modal); + + /// + /// Set a window's mouse grab mode. + /// + /// this is true to grab mouse, and false to release. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Mouse grab confines the mouse cursor to the window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetMouseGrab(bool grabbed) => Sdl.Video.SetWindowMouseGrab(this, grabbed); + + /// + /// Confines the cursor to the specified area of a window. + /// + /// + /// a rectangle area in window-relative coordinates. If NULL the + /// barrier for the specified window will be destroyed. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// Note that this does NOT grab the cursor, it only defines the area a cursor + /// is restricted to when the window has mouse focus. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetMouseRect(SdlRect* rect) => Sdl.Video.SetWindowMouseRect(this, rect); + + /// + /// Set the opacity for a window. + /// + /// the opacity value (0.0f - transparent, 1.0f - opaque). + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// The parameter opacity will be clamped internally between 0.0f + /// (transparent) and 1.0f (opaque). + /// + /// + /// This function also returns false if setting the opacity isn't supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetOpacity(float opacity) => Sdl.Video.SetWindowOpacity(this, opacity); + + /// + /// Set the window as a child of a parent window. + /// + /// the new parent window for the child window. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is already the child of an existing window, it will be + /// reparented to the new owner. Setting the parent window to NULL unparents + /// the window and removes child window status. + /// + /// + /// If a parent window is hidden or destroyed, the operation will be + /// recursively applied to child windows. Child windows hidden with the parent + /// that did not have their hidden status explicitly set will be restored when + /// the parent is shown. + /// + /// + /// Attempting to set the parent of a window that is currently in the modal + /// state will fail. Use SDL_SetWindowModal() to cancel the modal status before + /// attempting to change the parent. + /// + /// + /// Popup windows cannot change parents and attempts to do so will fail. + /// + /// + /// Setting a parent window that is currently the sibling or descendent of the + /// child window results in undefined behavior. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetParent(SdlWindow parent) => Sdl.Video.SetWindowParent(this, parent); + + /// + /// Request that the window's position be set. + /// + /// + /// the x coordinate of the window, or SDL_WINDOWPOS_CENTERED or + /// SDL_WINDOWPOS_UNDEFINED. + /// + /// + /// the y coordinate of the window, or SDL_WINDOWPOS_CENTERED or + /// SDL_WINDOWPOS_UNDEFINED. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in an exclusive fullscreen or maximized state, this + /// request has no effect. + /// + /// + /// This can be used to reposition fullscreen-desktop windows onto a different + /// display, however, as exclusive fullscreen windows are locked to a specific + /// display, they can only be repositioned programmatically via + /// SDL_SetWindowFullscreenMode(). + /// + /// + /// On some windowing systems this request is asynchronous and the new + /// coordinates may not have have been applied immediately upon the return of + /// this function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window position changes, an SDL_EVENT_WINDOW_MOVED event will be + /// emitted with the window's new coordinates. Note that the new coordinates + /// may not match the exact coordinates requested, as some windowing systems + /// can restrict the position of the window in certain scenarios (e.g. + /// constraining the position so the window is always within desktop bounds). + /// Additionally, as this is just a request, it can be denied by the windowing + /// system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool SetPosition(int x, int y) => Sdl.Video.SetWindowPosition(this, x, y); + + /// + /// Sets the state of the progress bar for the given window’s taskbar icon. + /// + /// + /// the progress state. SDL_PROGRESS_STATE_NONE stops displaying + /// the progress bar. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public bool SetProgressState(SdlProgressState state) => Sdl.Video.SetWindowProgressState(this, state); + + /// + /// Sets the value of the progress bar for the given window’s taskbar icon. + /// + /// + /// the progress value in the range of [0.0f - 1.0f]. If the value + /// is outside the valid range, it gets clamped. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.4.0. + /// + public bool SetProgressValue(float value) => Sdl.Video.SetWindowProgressValue(this, value); + + /// + /// Set relative mouse mode for a window. + /// + /// true to enable relative mode, false to disable. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// While the window has focus and relative mouse mode is enabled, the cursor + /// is hidden, the mouse position is constrained to the window, and SDL will + /// report continuous relative mouse motion even if the mouse is at the edge of + /// the window. + /// + /// + /// If you'd like to keep the mouse position fixed while in relative mode you + /// can use SDL_SetWindowMouseRect(). If you'd like the cursor to be at a + /// specific location when relative mode ends, you should use + /// SDL_WarpMouseInWindow() before disabling relative mode. + /// + /// + /// This function will flush any pending mouse motion for this window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetRelativeMouseMode(bool enabled) => Sdl.Mouse.SetWindowRelativeMouseMode(this, enabled); + + /// + /// Set the user-resizable state of a window. + /// + /// true to allow resizing, false to disallow. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This will add or remove the window's SDL_WINDOW_RESIZABLE flag and + /// allow/disallow user resizing of the window. This is a no-op if the window's + /// resizable state already matches the requested state. + /// + /// + /// You can't change the resizable state of a fullscreen window. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetResizable(bool resizable) => Sdl.Video.SetWindowResizable(this, resizable); + + /// + /// Set the shape of a transparent window. + /// + /// + /// the surface representing the shape of the window, or NULL to + /// remove any current shape. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This sets the alpha channel of a transparent window and any fully + /// transparent areas are also transparent to mouse clicks. If you are using + /// something besides the SDL render API, then you are responsible for drawing + /// the alpha channel of the window to match the shape alpha channel to get + /// consistent cross-platform results. + /// + /// + /// The shape is copied inside this function, so you can free it afterwards. If + /// your shape surface changes, you should call SDL_SetWindowShape() again to + /// update the window. This is an expensive operation, so should be done + /// sparingly. + /// + /// + /// The window must have been created with the SDL_WINDOW_TRANSPARENT flag. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool SetShape(SdlSurface* shape) => Sdl.Video.SetWindowShape(this, shape); + + /// + /// Request that the size of a window's client area be set. + /// + /// the width of the window, must be > 0. + /// the height of the window, must be > 0. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If the window is in a fullscreen or maximized state, this request has no + /// effect. + /// + /// + /// To change the exclusive fullscreen mode of a window, use + /// SDL_SetWindowFullscreenMode(). + /// + /// + /// On some windowing systems, this request is asynchronous and the new window + /// size may not have have been applied immediately upon the return of this + /// function. If an immediate change is required, call SDL_SyncWindow() to + /// block until the changes have taken effect. + /// + /// + /// When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be + /// emitted with the new window dimensions. Note that the new dimensions may + /// not match the exact size requested, as some windowing systems can restrict + /// the window size in certain scenarios (e.g. constraining the size of the + /// content area to remain within the usable desktop bounds). Additionally, as + /// this is just a request, it can be denied by the windowing system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + public bool SetSize(int w, int h) => Sdl.Video.SetWindowSize(this, w, h); + + /// + /// Toggle VSync for the window surface. + /// + /// the vertical refresh sync interval. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// When a window surface is created, vsync defaults to + /// SDL_WINDOW_SURFACE_VSYNC_DISABLED. + /// + /// + /// The vsync parameter can be 1 to synchronize present with every vertical + /// refresh, 2 to synchronize present with every second vertical refresh, etc., + /// SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), + /// or SDL_WINDOW_SURFACE_VSYNC_DISABLED to disable. Not every value is + /// supported by every driver, so you should check the return value to see + /// whether the requested setting is supported. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetSurfaceVSync(int vsync) => Sdl.Video.SetWindowSurfaceVSync(this, vsync); + + /// + /// Set the title of a window. + /// + /// the desired window title in UTF-8 format. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This string is expected to be in UTF-8 encoding. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool SetTitle(string title) => Sdl.Video.SetWindowTitle(this, title); + + /// + /// Show a window. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool Show() => Sdl.Video.ShowWindow(this); + + /// + /// Display the system-level window menu. + /// + /// + /// the x coordinate of the menu, relative to the origin (top-left) of + /// the client area. + /// + /// + /// the y coordinate of the menu, relative to the origin (top-left) of + /// the client area. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This default window menu is provided by the system and on some platforms + /// provides functionality for setting or changing privileged state on the + /// window, such as moving it between workspaces or displays, or toggling the + /// always-on-top property. + /// + /// + /// On platforms or desktops where this is unsupported, this function does + /// nothing. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + public bool ShowSystemMenu(int x, int y) => Sdl.Video.ShowWindowSystemMenu(this, x, y); + + /// + /// Start accepting Unicode text input events in a window. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function will enable text input (SDL_EVENT_TEXT_INPUT and + /// SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this + /// function paired with SDL_StopTextInput(). + /// + /// + /// Text input events are not received by default. + /// + /// + /// On some platforms using this function shows the screen keyboard and/or + /// activates an IME, which can prevent some key press events from being passed + /// through. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool StartTextInput() => Sdl.Keyboard.StartTextInput(this); + + /// + /// Start accepting Unicode text input events in a window, with properties + /// describing the input. + /// + /// the properties to use. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This function will enable text input (SDL_EVENT_TEXT_INPUT and + /// SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this + /// function paired with SDL_StopTextInput(). + /// + /// + /// Text input events are not received by default. + /// + /// + /// On some platforms using this function shows the screen keyboard and/or + /// activates an IME, which can prevent some key press events from being passed + /// through. + /// + /// + /// These are the supported properties: + /// + /// + /// - SDL_PROP_TEXTINPUT_TYPE_NUMBER - an SDL_TextInputType value that + /// describes text being input, defaults to SDL_TEXTINPUT_TYPE_TEXT. + /// - SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER - an SDL_Capitalization value + /// that describes how text should be capitalized, defaults to + /// SDL_CAPITALIZE_SENTENCES for normal text entry, SDL_CAPITALIZE_WORDS for + /// SDL_TEXTINPUT_TYPE_TEXT_NAME, and SDL_CAPITALIZE_NONE for e-mail + /// addresses, usernames, and passwords. + /// - SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN - true to enable auto completion + /// and auto correction, defaults to true. + /// - SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN - true if multiple lines of text + /// are allowed. This defaults to true if SDL_HINT_RETURN_KEY_HIDES_IME is + /// "0" or is not set, and defaults to false if SDL_HINT_RETURN_KEY_HIDES_IME + /// is "1". + /// + /// + /// On Android you can directly specify the input type: + /// + /// + /// - SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER - the text input type to + /// use, overriding other properties. This is documented at + /// https://developer.android.com/reference/android/text/InputType + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + public bool StartTextInputWithProperties(uint props) => Sdl.Keyboard.StartTextInputWithProperties(this, props); + + /// + /// Stop receiving any text input events in a window. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// If SDL_StartTextInput() showed the screen keyboard, this function will hide + /// it. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool StopTextInput() => Sdl.Keyboard.StopTextInput(this); + + /// + /// Block until any pending window state is finalized. + /// + /// + /// true on success or false if the operation timed out before the + /// window was in the requested state. + /// + /// + /// + /// On asynchronous windowing systems, this acts as a synchronization barrier + /// for pending window state. It will attempt to wait until any pending window + /// state has been applied and is guaranteed to return within finite time. Note + /// that for how long it can potentially block depends on the underlying window + /// system, as window state changes may involve somewhat lengthy animations + /// that must complete before the window is in its final requested state. + /// + /// + /// On windowing systems where changes are immediate, this does nothing. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + /// + /// + /// + /// + public bool Sync() => Sdl.Video.SyncWindow(this); + + /// + /// Check whether or not Unicode text input events are enabled for a window. + /// + /// true if text input events are enabled else false. + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool TextInputActive() => Sdl.Keyboard.TextInputActive(this); + + /// + /// Copy the window surface to the screen. + /// + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the function you use to reflect any changes to the surface on the + /// screen. + /// + /// + /// This function is equivalent to the SDL 1.2 API SDL_Flip(). + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool UpdateSurface() => Sdl.Video.UpdateWindowSurface(this); + + /// + /// Copy areas of the window surface to the screen. + /// + /// + /// an array of SDL_Rect structures representing areas of the + /// surface to copy, in pixels. + /// + /// the number of rectangles. + /// + /// true on success or false on failure; call SDL_GetError() for more + /// information. + /// + /// + /// + /// This is the function you use to reflect changes to portions of the surface + /// on the screen. + /// + /// + /// This function is equivalent to the SDL 1.2 API SDL_UpdateRects(). + /// + /// + /// Note that this function will update at least the rectangles specified, + /// but this is only intended as an optimization; in practice, this might + /// update more of the screen (or all of the screen!), depending on what method + /// SDL uses to send pixels to the system. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + /// + public bool UpdateSurfaceRects(SdlRect* rects, int numrects) => + Sdl.Video.UpdateWindowSurfaceRects(this, rects, numrects); + + /// + /// Move the mouse cursor to the given position within the window. + /// + /// the x coordinate within the window. + /// the y coordinate within the window. + /// + /// + /// This function generates a mouse motion event if relative mode is not + /// enabled. If relative mode is enabled, you can force mouse events for the + /// warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint. + /// + /// + /// Note that this function will appear to succeed, but not actually move the + /// mouse when used over Microsoft Remote Desktop. + /// + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public void WarpMouseInWindow(float x, float y) => Sdl.Mouse.WarpMouseInWindow(this, x, y); + + /// + /// Return whether the window has a surface associated with it. + /// + /// + /// true if there is a surface associated with the window, or false + /// otherwise. + /// + /// + /// This function should only be called on the main thread. + /// + /// + /// This function is available since SDL 3.2.0. + /// + /// + public bool HasSurface() => Sdl.Video.WindowHasSurface(this); + } +} diff --git a/Brutal.Sdl/Generated/Sdl.Handles.gen.cs b/Brutal.Sdl/Generated/Sdl.Handles.gen.cs new file mode 100644 index 0000000..65aabd2 --- /dev/null +++ b/Brutal.Sdl/Generated/Sdl.Handles.gen.cs @@ -0,0 +1,170 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +using System; +using Brutal.Interop; + +namespace Brutal.SdlApi; + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_AudioStream pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlAudioStream : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.DestroyAudioStream(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Camera pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlCamera : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.CloseCamera(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Cursor pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlCursor : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.DestroyCursor(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Gamepad pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlGamepad : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.CloseGamepad(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_GPUDevice pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlGpuDevice : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.DestroyGpuDevice(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Joystick pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlJoystick : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.CloseJoystick(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Renderer pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlRenderer : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.DestroyRenderer(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Texture pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlTexture : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.DestroyTexture(this); + } +} + +/// +/// A strongly-typed interop handle wrapping the opaque SDL SDL_Window pointer. +/// +[InteropHandle] +public readonly unsafe partial struct SdlWindow : IDisposable +{ + /// + public void Dispose() + { + // A default/zeroed handle owns nothing; forwarding it to the native destructor is at + // best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op + // on a null handle (and so a double-dispose after the value was cleared is harmless). + if (IsNull()) + return; + Sdl.PInvoke.DestroyWindow(this); + } +} diff --git a/Brutal.Sdl/Generated/Sdl.PInvoke.gen.cs b/Brutal.Sdl/Generated/Sdl.PInvoke.gen.cs new file mode 100644 index 0000000..9a55556 --- /dev/null +++ b/Brutal.Sdl/Generated/Sdl.PInvoke.gen.cs @@ -0,0 +1,14617 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + public static unsafe partial class Sdl + { + public static partial class PInvoke + { + [LibraryImport(Dll, EntryPoint = "SDL_malloc")] + private static partial void* _Malloc(nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Malloc(nuint size) + { + Sdl.TraceLog.Trace(); + return _Malloc(size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_calloc")] + private static partial void* _Calloc(nuint nmemb, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Calloc(nuint nmemb, nuint size) + { + Sdl.TraceLog.Trace(); + return _Calloc(nmemb, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_realloc")] + private static partial void* _Realloc(void* mem, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Realloc(void* mem, nuint size) + { + Sdl.TraceLog.Trace(); + return _Realloc(mem, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_free")] + private static partial void _Free(void* mem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Free(void* mem) + { + Sdl.TraceLog.Trace(); + _Free(mem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetOriginalMemoryFunctions")] + private static partial void _GetOriginalMemoryFunctions( + delegate* unmanaged[Cdecl]* malloc_func, + delegate* unmanaged[Cdecl]* calloc_func, + delegate* unmanaged[Cdecl]* realloc_func, + delegate* unmanaged[Cdecl]* free_func + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetOriginalMemoryFunctions( + delegate* unmanaged[Cdecl]* malloc_func, + delegate* unmanaged[Cdecl]* calloc_func, + delegate* unmanaged[Cdecl]* realloc_func, + delegate* unmanaged[Cdecl]* free_func + ) + { + Sdl.TraceLog.Trace(); + _GetOriginalMemoryFunctions(malloc_func, calloc_func, realloc_func, free_func); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMemoryFunctions")] + private static partial void _GetMemoryFunctions( + delegate* unmanaged[Cdecl]* malloc_func, + delegate* unmanaged[Cdecl]* calloc_func, + delegate* unmanaged[Cdecl]* realloc_func, + delegate* unmanaged[Cdecl]* free_func + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetMemoryFunctions( + delegate* unmanaged[Cdecl]* malloc_func, + delegate* unmanaged[Cdecl]* calloc_func, + delegate* unmanaged[Cdecl]* realloc_func, + delegate* unmanaged[Cdecl]* free_func + ) + { + Sdl.TraceLog.Trace(); + _GetMemoryFunctions(malloc_func, calloc_func, realloc_func, free_func); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetMemoryFunctions")] + private static partial byte _SetMemoryFunctions( + delegate* unmanaged[Cdecl] malloc_func, + delegate* unmanaged[Cdecl] calloc_func, + delegate* unmanaged[Cdecl] realloc_func, + delegate* unmanaged[Cdecl] free_func + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetMemoryFunctions( + delegate* unmanaged[Cdecl] malloc_func, + delegate* unmanaged[Cdecl] calloc_func, + delegate* unmanaged[Cdecl] realloc_func, + delegate* unmanaged[Cdecl] free_func + ) + { + Sdl.TraceLog.Trace(); + return _SetMemoryFunctions(malloc_func, calloc_func, realloc_func, free_func); + } + + [LibraryImport(Dll, EntryPoint = "SDL_aligned_alloc")] + private static partial void* _AlignedAlloc(nuint alignment, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* AlignedAlloc(nuint alignment, nuint size) + { + Sdl.TraceLog.Trace(); + return _AlignedAlloc(alignment, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_aligned_free")] + private static partial void _AlignedFree(void* mem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void AlignedFree(void* mem) + { + Sdl.TraceLog.Trace(); + _AlignedFree(mem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumAllocations")] + private static partial int _GetNumAllocations(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumAllocations() + { + Sdl.TraceLog.Trace(); + return _GetNumAllocations(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetEnvironment")] + private static partial nint _GetEnvironment(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetEnvironment() + { + Sdl.TraceLog.Trace(); + return _GetEnvironment(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateEnvironment")] + private static partial nint _CreateEnvironment(byte populated); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateEnvironment(byte populated) + { + Sdl.TraceLog.Trace(); + return _CreateEnvironment(populated); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetEnvironmentVariable", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetEnvironmentVariable(nint env, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetEnvironmentVariable(nint env, string name) + { + Sdl.TraceLog.Trace(); + return _GetEnvironmentVariable(env, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetEnvironmentVariables")] + private static partial byte** _GetEnvironmentVariables(nint env); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GetEnvironmentVariables(nint env) + { + Sdl.TraceLog.Trace(); + return _GetEnvironmentVariables(env); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetEnvironmentVariable", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetEnvironmentVariable(nint env, string name, string value, byte overwrite); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetEnvironmentVariable(nint env, string name, string value, byte overwrite) + { + Sdl.TraceLog.Trace(); + return _SetEnvironmentVariable(env, name, value, overwrite); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_UnsetEnvironmentVariable", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _UnsetEnvironmentVariable(nint env, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UnsetEnvironmentVariable(nint env, string name) + { + Sdl.TraceLog.Trace(); + return _UnsetEnvironmentVariable(env, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyEnvironment")] + private static partial void _DestroyEnvironment(nint env); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyEnvironment(nint env) + { + Sdl.TraceLog.Trace(); + _DestroyEnvironment(env); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_getenv", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _Getenv(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? Getenv(string name) + { + Sdl.TraceLog.Trace(); + return _Getenv(name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_getenv_unsafe", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetenvUnsafe(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetenvUnsafe(string name) + { + Sdl.TraceLog.Trace(); + return _GetenvUnsafe(name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_setenv_unsafe", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _SetenvUnsafe(string name, string value, int overwrite); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int SetenvUnsafe(string name, string value, int overwrite) + { + Sdl.TraceLog.Trace(); + return _SetenvUnsafe(name, value, overwrite); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_unsetenv_unsafe", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _UnsetenvUnsafe(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int UnsetenvUnsafe(string name) + { + Sdl.TraceLog.Trace(); + return _UnsetenvUnsafe(name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_qsort")] + private static partial void _Qsort( + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Qsort( + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare + ) + { + Sdl.TraceLog.Trace(); + _Qsort(@base, nmemb, size, compare); + } + + [LibraryImport(Dll, EntryPoint = "SDL_bsearch")] + private static partial void* _Bsearch( + void* key, + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Bsearch( + void* key, + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare + ) + { + Sdl.TraceLog.Trace(); + return _Bsearch(key, @base, nmemb, size, compare); + } + + [LibraryImport(Dll, EntryPoint = "SDL_qsort_r")] + private static partial void _QsortR( + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void QsortR( + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _QsortR(@base, nmemb, size, compare, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_bsearch_r")] + private static partial void* _BsearchR( + void* key, + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* BsearchR( + void* key, + void* @base, + nuint nmemb, + nuint size, + delegate* unmanaged[Cdecl] compare, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _BsearchR(key, @base, nmemb, size, compare, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_abs")] + private static partial int _Abs(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Abs(int x) + { + Sdl.TraceLog.Trace(); + return _Abs(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isalpha")] + private static partial int _Isalpha(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isalpha(int x) + { + Sdl.TraceLog.Trace(); + return _Isalpha(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isalnum")] + private static partial int _Isalnum(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isalnum(int x) + { + Sdl.TraceLog.Trace(); + return _Isalnum(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isblank")] + private static partial int _Isblank(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isblank(int x) + { + Sdl.TraceLog.Trace(); + return _Isblank(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_iscntrl")] + private static partial int _Iscntrl(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Iscntrl(int x) + { + Sdl.TraceLog.Trace(); + return _Iscntrl(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isdigit")] + private static partial int _Isdigit(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isdigit(int x) + { + Sdl.TraceLog.Trace(); + return _Isdigit(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isxdigit")] + private static partial int _Isxdigit(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isxdigit(int x) + { + Sdl.TraceLog.Trace(); + return _Isxdigit(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ispunct")] + private static partial int _Ispunct(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Ispunct(int x) + { + Sdl.TraceLog.Trace(); + return _Ispunct(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isspace")] + private static partial int _Isspace(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isspace(int x) + { + Sdl.TraceLog.Trace(); + return _Isspace(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isupper")] + private static partial int _Isupper(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isupper(int x) + { + Sdl.TraceLog.Trace(); + return _Isupper(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_islower")] + private static partial int _Islower(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Islower(int x) + { + Sdl.TraceLog.Trace(); + return _Islower(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isprint")] + private static partial int _Isprint(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isprint(int x) + { + Sdl.TraceLog.Trace(); + return _Isprint(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isgraph")] + private static partial int _Isgraph(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isgraph(int x) + { + Sdl.TraceLog.Trace(); + return _Isgraph(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_toupper")] + private static partial int _Toupper(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Toupper(int x) + { + Sdl.TraceLog.Trace(); + return _Toupper(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_tolower")] + private static partial int _Tolower(int x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Tolower(int x) + { + Sdl.TraceLog.Trace(); + return _Tolower(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_crc16")] + private static partial ushort _Crc16(ushort crc, void* data, nuint len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort Crc16(ushort crc, void* data, nuint len) + { + Sdl.TraceLog.Trace(); + return _Crc16(crc, data, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_crc32")] + private static partial uint _Crc32(uint crc, void* data, nuint len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint Crc32(uint crc, void* data, nuint len) + { + Sdl.TraceLog.Trace(); + return _Crc32(crc, data, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_murmur3_32")] + private static partial uint _Murmur332(void* data, nuint len, uint seed); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint Murmur332(void* data, nuint len, uint seed) + { + Sdl.TraceLog.Trace(); + return _Murmur332(data, len, seed); + } + + [LibraryImport(Dll, EntryPoint = "SDL_memcpy")] + private static partial void* _Memcpy(void* dst, void* src, nuint len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Memcpy(void* dst, void* src, nuint len) + { + Sdl.TraceLog.Trace(); + return _Memcpy(dst, src, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_memmove")] + private static partial void* _Memmove(void* dst, void* src, nuint len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Memmove(void* dst, void* src, nuint len) + { + Sdl.TraceLog.Trace(); + return _Memmove(dst, src, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_memset")] + private static partial void* _Memset(void* dst, int c, nuint len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Memset(void* dst, int c, nuint len) + { + Sdl.TraceLog.Trace(); + return _Memset(dst, c, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_memset4")] + private static partial void* _Memset4(void* dst, uint val, nuint dwords); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* Memset4(void* dst, uint val, nuint dwords) + { + Sdl.TraceLog.Trace(); + return _Memset4(dst, val, dwords); + } + + [LibraryImport(Dll, EntryPoint = "SDL_memcmp")] + private static partial int _Memcmp(void* s1, void* s2, nuint len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Memcmp(void* s1, void* s2, nuint len) + { + Sdl.TraceLog.Trace(); + return _Memcmp(s1, s2, len); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strlen", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Strlen(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Strlen(string str) + { + Sdl.TraceLog.Trace(); + return _Strlen(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strnlen", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Strnlen(string str, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Strnlen(string str, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strnlen(str, maxlen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strlcpy", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Strlcpy(byte* dst, string src, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Strlcpy(byte* dst, string src, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strlcpy(dst, src, maxlen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_utf8strlcpy", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Utf8strlcpy(byte* dst, string src, nuint dst_bytes); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Utf8strlcpy(byte* dst, string src, nuint dst_bytes) + { + Sdl.TraceLog.Trace(); + return _Utf8strlcpy(dst, src, dst_bytes); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strlcat", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Strlcat(byte* dst, string src, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Strlcat(byte* dst, string src, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strlcat(dst, src, maxlen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strdup", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strdup(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strdup(string str) + { + Sdl.TraceLog.Trace(); + return _Strdup(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strndup", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strndup(string str, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strndup(string str, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strndup(str, maxlen); + } + + [LibraryImport(Dll, EntryPoint = "SDL_strrev")] + private static partial byte* _Strrev(byte* str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strrev(byte* str) + { + Sdl.TraceLog.Trace(); + return _Strrev(str); + } + + [LibraryImport(Dll, EntryPoint = "SDL_strupr")] + private static partial byte* _Strupr(byte* str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strupr(byte* str) + { + Sdl.TraceLog.Trace(); + return _Strupr(str); + } + + [LibraryImport(Dll, EntryPoint = "SDL_strlwr")] + private static partial byte* _Strlwr(byte* str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strlwr(byte* str) + { + Sdl.TraceLog.Trace(); + return _Strlwr(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strchr", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strchr(string str, int c); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strchr(string str, int c) + { + Sdl.TraceLog.Trace(); + return _Strchr(str, c); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strrchr", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strrchr(string str, int c); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strrchr(string str, int c) + { + Sdl.TraceLog.Trace(); + return _Strrchr(str, c); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strstr", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strstr(string haystack, string needle); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strstr(string haystack, string needle) + { + Sdl.TraceLog.Trace(); + return _Strstr(haystack, needle); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strnstr", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strnstr(string haystack, string needle, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strnstr(string haystack, string needle, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strnstr(haystack, needle, maxlen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strcasestr", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strcasestr(string haystack, string needle); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strcasestr(string haystack, string needle) + { + Sdl.TraceLog.Trace(); + return _Strcasestr(haystack, needle); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strtok_r", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _StrtokR(byte* str, string delim, byte** saveptr); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* StrtokR(byte* str, string delim, byte** saveptr) + { + Sdl.TraceLog.Trace(); + return _StrtokR(str, delim, saveptr); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_utf8strlen", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Utf8strlen(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Utf8strlen(string str) + { + Sdl.TraceLog.Trace(); + return _Utf8strlen(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_utf8strnlen", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _Utf8strnlen(string str, nuint bytes); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Utf8strnlen(string str, nuint bytes) + { + Sdl.TraceLog.Trace(); + return _Utf8strnlen(str, bytes); + } + + [LibraryImport(Dll, EntryPoint = "SDL_itoa")] + private static partial byte* _Itoa(int value, byte* str, int radix); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Itoa(int value, byte* str, int radix) + { + Sdl.TraceLog.Trace(); + return _Itoa(value, str, radix); + } + + [LibraryImport(Dll, EntryPoint = "SDL_uitoa")] + private static partial byte* _Uitoa(uint value, byte* str, int radix); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Uitoa(uint value, byte* str, int radix) + { + Sdl.TraceLog.Trace(); + return _Uitoa(value, str, radix); + } + + [LibraryImport(Dll, EntryPoint = "SDL_lltoa")] + private static partial byte* _Lltoa(long value, byte* str, int radix); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Lltoa(long value, byte* str, int radix) + { + Sdl.TraceLog.Trace(); + return _Lltoa(value, str, radix); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ulltoa")] + private static partial byte* _Ulltoa(ulong value, byte* str, int radix); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Ulltoa(ulong value, byte* str, int radix) + { + Sdl.TraceLog.Trace(); + return _Ulltoa(value, str, radix); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_atoi", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Atoi(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Atoi(string str) + { + Sdl.TraceLog.Trace(); + return _Atoi(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_atof", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial double _Atof(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Atof(string str) + { + Sdl.TraceLog.Trace(); + return _Atof(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strtoll", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial long _Strtoll(string str, byte** endp, int @base); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long Strtoll(string str, byte** endp, int @base) + { + Sdl.TraceLog.Trace(); + return _Strtoll(str, endp, @base); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strtoull", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial ulong _Strtoull(string str, byte** endp, int @base); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Strtoull(string str, byte** endp, int @base) + { + Sdl.TraceLog.Trace(); + return _Strtoull(str, endp, @base); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strtod", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial double _Strtod(string str, byte** endp); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Strtod(string str, byte** endp) + { + Sdl.TraceLog.Trace(); + return _Strtod(str, endp); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strcmp", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Strcmp(string str1, string str2); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Strcmp(string str1, string str2) + { + Sdl.TraceLog.Trace(); + return _Strcmp(str1, str2); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strncmp", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Strncmp(string str1, string str2, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Strncmp(string str1, string str2, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strncmp(str1, str2, maxlen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strcasecmp", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Strcasecmp(string str1, string str2); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Strcasecmp(string str1, string str2) + { + Sdl.TraceLog.Trace(); + return _Strcasecmp(str1, str2); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strncasecmp", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Strncasecmp(string str1, string str2, nuint maxlen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Strncasecmp(string str1, string str2, nuint maxlen) + { + Sdl.TraceLog.Trace(); + return _Strncasecmp(str1, str2, maxlen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_strpbrk", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _Strpbrk(string str, string breakset); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* Strpbrk(string str, string breakset) + { + Sdl.TraceLog.Trace(); + return _Strpbrk(str, breakset); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StepUTF8")] + private static partial uint _StepUTF8(byte** pstr, nuint* pslen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint StepUTF8(byte** pstr, nuint* pslen) + { + Sdl.TraceLog.Trace(); + return _StepUTF8(pstr, pslen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_StepBackUTF8", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial uint _StepBackUTF8(string start, byte** pstr); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint StepBackUTF8(string start, byte** pstr) + { + Sdl.TraceLog.Trace(); + return _StepBackUTF8(start, pstr); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UCS4ToUTF8")] + private static partial byte* _UCS4ToUTF8(uint codepoint, byte* dst); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* UCS4ToUTF8(uint codepoint, byte* dst) + { + Sdl.TraceLog.Trace(); + return _UCS4ToUTF8(codepoint, dst); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_vsscanf", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Vsscanf(string text, string fmt, byte* ap); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Vsscanf(string text, string fmt, byte* ap) + { + Sdl.TraceLog.Trace(); + return _Vsscanf(text, fmt, ap); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_vsnprintf", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Vsnprintf(byte* text, nuint maxlen, string fmt, byte* ap); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Vsnprintf(byte* text, nuint maxlen, string fmt, byte* ap) + { + Sdl.TraceLog.Trace(); + return _Vsnprintf(text, maxlen, fmt, ap); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_vasprintf", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _Vasprintf(byte** strp, string fmt, byte* ap); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Vasprintf(byte** strp, string fmt, byte* ap) + { + Sdl.TraceLog.Trace(); + return _Vasprintf(strp, fmt, ap); + } + + [LibraryImport(Dll, EntryPoint = "SDL_srand")] + private static partial void _Srand(ulong seed); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Srand(ulong seed) + { + Sdl.TraceLog.Trace(); + _Srand(seed); + } + + [LibraryImport(Dll, EntryPoint = "SDL_rand")] + private static partial int _Rand(int n); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Rand(int n) + { + Sdl.TraceLog.Trace(); + return _Rand(n); + } + + [LibraryImport(Dll, EntryPoint = "SDL_randf")] + private static partial float _Randf(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Randf() + { + Sdl.TraceLog.Trace(); + return _Randf(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_rand_bits")] + private static partial uint _RandBits(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint RandBits() + { + Sdl.TraceLog.Trace(); + return _RandBits(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_rand_r")] + private static partial int _RandR(ulong* state, int n); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int RandR(ulong* state, int n) + { + Sdl.TraceLog.Trace(); + return _RandR(state, n); + } + + [LibraryImport(Dll, EntryPoint = "SDL_randf_r")] + private static partial float _RandfR(ulong* state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float RandfR(ulong* state) + { + Sdl.TraceLog.Trace(); + return _RandfR(state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_rand_bits_r")] + private static partial uint _RandBitsR(ulong* state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint RandBitsR(ulong* state) + { + Sdl.TraceLog.Trace(); + return _RandBitsR(state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_acos")] + private static partial double _Acos(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Acos(double x) + { + Sdl.TraceLog.Trace(); + return _Acos(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_acosf")] + private static partial float _Acosf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Acosf(float x) + { + Sdl.TraceLog.Trace(); + return _Acosf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_asin")] + private static partial double _Asin(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Asin(double x) + { + Sdl.TraceLog.Trace(); + return _Asin(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_asinf")] + private static partial float _Asinf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Asinf(float x) + { + Sdl.TraceLog.Trace(); + return _Asinf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_atan")] + private static partial double _Atan(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Atan(double x) + { + Sdl.TraceLog.Trace(); + return _Atan(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_atanf")] + private static partial float _Atanf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Atanf(float x) + { + Sdl.TraceLog.Trace(); + return _Atanf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_atan2")] + private static partial double _Atan2(double y, double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Atan2(double y, double x) + { + Sdl.TraceLog.Trace(); + return _Atan2(y, x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_atan2f")] + private static partial float _Atan2f(float y, float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Atan2f(float y, float x) + { + Sdl.TraceLog.Trace(); + return _Atan2f(y, x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ceil")] + private static partial double _Ceil(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Ceil(double x) + { + Sdl.TraceLog.Trace(); + return _Ceil(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ceilf")] + private static partial float _Ceilf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Ceilf(float x) + { + Sdl.TraceLog.Trace(); + return _Ceilf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_copysign")] + private static partial double _Copysign(double x, double y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Copysign(double x, double y) + { + Sdl.TraceLog.Trace(); + return _Copysign(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_copysignf")] + private static partial float _Copysignf(float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Copysignf(float x, float y) + { + Sdl.TraceLog.Trace(); + return _Copysignf(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_cos")] + private static partial double _Cos(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Cos(double x) + { + Sdl.TraceLog.Trace(); + return _Cos(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_cosf")] + private static partial float _Cosf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Cosf(float x) + { + Sdl.TraceLog.Trace(); + return _Cosf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_exp")] + private static partial double _Exp(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Exp(double x) + { + Sdl.TraceLog.Trace(); + return _Exp(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_expf")] + private static partial float _Expf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Expf(float x) + { + Sdl.TraceLog.Trace(); + return _Expf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_fabs")] + private static partial double _Fabs(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Fabs(double x) + { + Sdl.TraceLog.Trace(); + return _Fabs(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_fabsf")] + private static partial float _Fabsf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Fabsf(float x) + { + Sdl.TraceLog.Trace(); + return _Fabsf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_floor")] + private static partial double _Floor(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Floor(double x) + { + Sdl.TraceLog.Trace(); + return _Floor(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_floorf")] + private static partial float _Floorf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Floorf(float x) + { + Sdl.TraceLog.Trace(); + return _Floorf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_trunc")] + private static partial double _Trunc(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Trunc(double x) + { + Sdl.TraceLog.Trace(); + return _Trunc(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_truncf")] + private static partial float _Truncf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Truncf(float x) + { + Sdl.TraceLog.Trace(); + return _Truncf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_fmod")] + private static partial double _Fmod(double x, double y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Fmod(double x, double y) + { + Sdl.TraceLog.Trace(); + return _Fmod(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_fmodf")] + private static partial float _Fmodf(float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Fmodf(float x, float y) + { + Sdl.TraceLog.Trace(); + return _Fmodf(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isinf")] + private static partial int _Isinf(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isinf(double x) + { + Sdl.TraceLog.Trace(); + return _Isinf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isinff")] + private static partial int _Isinff(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isinff(float x) + { + Sdl.TraceLog.Trace(); + return _Isinff(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isnan")] + private static partial int _Isnan(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isnan(double x) + { + Sdl.TraceLog.Trace(); + return _Isnan(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_isnanf")] + private static partial int _Isnanf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Isnanf(float x) + { + Sdl.TraceLog.Trace(); + return _Isnanf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_log")] + private static partial double _Log(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Log(double x) + { + Sdl.TraceLog.Trace(); + return _Log(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_logf")] + private static partial float _Logf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Logf(float x) + { + Sdl.TraceLog.Trace(); + return _Logf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_log10")] + private static partial double _Log10(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Log10(double x) + { + Sdl.TraceLog.Trace(); + return _Log10(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_log10f")] + private static partial float _Log10f(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Log10f(float x) + { + Sdl.TraceLog.Trace(); + return _Log10f(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_modf")] + private static partial double _Modf(double x, double* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Modf(double x, double* y) + { + Sdl.TraceLog.Trace(); + return _Modf(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_modff")] + private static partial float _Modff(float x, float* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Modff(float x, float* y) + { + Sdl.TraceLog.Trace(); + return _Modff(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_pow")] + private static partial double _Pow(double x, double y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Pow(double x, double y) + { + Sdl.TraceLog.Trace(); + return _Pow(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_powf")] + private static partial float _Powf(float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Powf(float x, float y) + { + Sdl.TraceLog.Trace(); + return _Powf(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_round")] + private static partial double _Round(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Round(double x) + { + Sdl.TraceLog.Trace(); + return _Round(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_roundf")] + private static partial float _Roundf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Roundf(float x) + { + Sdl.TraceLog.Trace(); + return _Roundf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_scalbn")] + private static partial double _Scalbn(double x, int n); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Scalbn(double x, int n) + { + Sdl.TraceLog.Trace(); + return _Scalbn(x, n); + } + + [LibraryImport(Dll, EntryPoint = "SDL_scalbnf")] + private static partial float _Scalbnf(float x, int n); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Scalbnf(float x, int n) + { + Sdl.TraceLog.Trace(); + return _Scalbnf(x, n); + } + + [LibraryImport(Dll, EntryPoint = "SDL_sin")] + private static partial double _Sin(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Sin(double x) + { + Sdl.TraceLog.Trace(); + return _Sin(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_sinf")] + private static partial float _Sinf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Sinf(float x) + { + Sdl.TraceLog.Trace(); + return _Sinf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_sqrt")] + private static partial double _Sqrt(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Sqrt(double x) + { + Sdl.TraceLog.Trace(); + return _Sqrt(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_sqrtf")] + private static partial float _Sqrtf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Sqrtf(float x) + { + Sdl.TraceLog.Trace(); + return _Sqrtf(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_tan")] + private static partial double _Tan(double x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double Tan(double x) + { + Sdl.TraceLog.Trace(); + return _Tan(x); + } + + [LibraryImport(Dll, EntryPoint = "SDL_tanf")] + private static partial float _Tanf(float x); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Tanf(float x) + { + Sdl.TraceLog.Trace(); + return _Tanf(x); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_iconv_open", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _IconvOpen(string tocode, string fromcode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint IconvOpen(string tocode, string fromcode) + { + Sdl.TraceLog.Trace(); + return _IconvOpen(tocode, fromcode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_iconv_close")] + private static partial int _IconvClose(nint cd); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int IconvClose(nint cd) + { + Sdl.TraceLog.Trace(); + return _IconvClose(cd); + } + + [LibraryImport(Dll, EntryPoint = "SDL_iconv")] + private static partial nuint _Iconv( + nint cd, + byte** inbuf, + nuint* inbytesleft, + byte** outbuf, + nuint* outbytesleft + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint Iconv(nint cd, byte** inbuf, nuint* inbytesleft, byte** outbuf, nuint* outbytesleft) + { + Sdl.TraceLog.Trace(); + return _Iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_iconv_string", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _IconvString(string tocode, string fromcode, string inbuf, nuint inbytesleft); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* IconvString(string tocode, string fromcode, string inbuf, nuint inbytesleft) + { + Sdl.TraceLog.Trace(); + return _IconvString(tocode, fromcode, inbuf, inbytesleft); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ReportAssertion", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlAssertState _ReportAssertion( + SdlAssertData* data, + string func, + string file, + int line + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlAssertState ReportAssertion(SdlAssertData* data, string func, string file, int line) + { + Sdl.TraceLog.Trace(); + return _ReportAssertion(data, func, file, line); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAssertionHandler")] + private static partial void _SetAssertionHandler( + delegate* unmanaged[Cdecl] handler, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetAssertionHandler( + delegate* unmanaged[Cdecl] handler, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _SetAssertionHandler(handler, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDefaultAssertionHandler")] + private static partial delegate* unmanaged[Cdecl]< + SdlAssertData*, + void*, + SdlAssertState> _GetDefaultAssertionHandler(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static delegate* unmanaged[Cdecl] GetDefaultAssertionHandler() + { + Sdl.TraceLog.Trace(); + return _GetDefaultAssertionHandler(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAssertionHandler")] + private static partial delegate* unmanaged[Cdecl]< + SdlAssertData*, + void*, + SdlAssertState> _GetAssertionHandler(void** puserdata); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static delegate* unmanaged[Cdecl] GetAssertionHandler( + void** puserdata + ) + { + Sdl.TraceLog.Trace(); + return _GetAssertionHandler(puserdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAssertionReport")] + private static partial SdlAssertData* _GetAssertionReport(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlAssertData* GetAssertionReport() + { + Sdl.TraceLog.Trace(); + return _GetAssertionReport(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResetAssertionReport")] + private static partial void _ResetAssertionReport(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetAssertionReport() + { + Sdl.TraceLog.Trace(); + _ResetAssertionReport(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_AsyncIOFromFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _AsyncIOFromFile(string file, string mode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint AsyncIOFromFile(string file, string mode) + { + Sdl.TraceLog.Trace(); + return _AsyncIOFromFile(file, mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAsyncIOSize")] + private static partial long _GetAsyncIOSize(nint asyncio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetAsyncIOSize(nint asyncio) + { + Sdl.TraceLog.Trace(); + return _GetAsyncIOSize(asyncio); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadAsyncIO")] + private static partial byte _ReadAsyncIO( + nint asyncio, + void* ptr, + ulong offset, + ulong size, + nint queue, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadAsyncIO( + nint asyncio, + void* ptr, + ulong offset, + ulong size, + nint queue, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _ReadAsyncIO(asyncio, ptr, offset, size, queue, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteAsyncIO")] + private static partial byte _WriteAsyncIO( + nint asyncio, + void* ptr, + ulong offset, + ulong size, + nint queue, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteAsyncIO( + nint asyncio, + void* ptr, + ulong offset, + ulong size, + nint queue, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _WriteAsyncIO(asyncio, ptr, offset, size, queue, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseAsyncIO")] + private static partial byte _CloseAsyncIO(nint asyncio, byte flush, nint queue, void* userdata); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CloseAsyncIO(nint asyncio, byte flush, nint queue, void* userdata) + { + Sdl.TraceLog.Trace(); + return _CloseAsyncIO(asyncio, flush, queue, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateAsyncIOQueue")] + private static partial nint _CreateAsyncIOQueue(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateAsyncIOQueue() + { + Sdl.TraceLog.Trace(); + return _CreateAsyncIOQueue(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyAsyncIOQueue")] + private static partial void _DestroyAsyncIOQueue(nint queue); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyAsyncIOQueue(nint queue) + { + Sdl.TraceLog.Trace(); + _DestroyAsyncIOQueue(queue); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAsyncIOResult")] + private static partial byte _GetAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome) + { + Sdl.TraceLog.Trace(); + return _GetAsyncIOResult(queue, outcome); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitAsyncIOResult")] + private static partial byte _WaitAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome, int timeoutMS); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitAsyncIOResult(nint queue, SdlAsyncIOOutcome* outcome, int timeoutMS) + { + Sdl.TraceLog.Trace(); + return _WaitAsyncIOResult(queue, outcome, timeoutMS); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SignalAsyncIOQueue")] + private static partial void _SignalAsyncIOQueue(nint queue); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SignalAsyncIOQueue(nint queue) + { + Sdl.TraceLog.Trace(); + _SignalAsyncIOQueue(queue); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadFileAsync", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _LoadFileAsync(string file, nint queue, void* userdata); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LoadFileAsync(string file, nint queue, void* userdata) + { + Sdl.TraceLog.Trace(); + return _LoadFileAsync(file, queue, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TryLockSpinlock")] + private static partial byte _TryLockSpinlock(int* @lock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TryLockSpinlock(int* @lock) + { + Sdl.TraceLog.Trace(); + return _TryLockSpinlock(@lock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockSpinlock")] + private static partial void _LockSpinlock(int* @lock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LockSpinlock(int* @lock) + { + Sdl.TraceLog.Trace(); + _LockSpinlock(@lock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockSpinlock")] + private static partial void _UnlockSpinlock(int* @lock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockSpinlock(int* @lock) + { + Sdl.TraceLog.Trace(); + _UnlockSpinlock(@lock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MemoryBarrierReleaseFunction")] + private static partial void _MemoryBarrierReleaseFunction(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void MemoryBarrierReleaseFunction() + { + Sdl.TraceLog.Trace(); + _MemoryBarrierReleaseFunction(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MemoryBarrierAcquireFunction")] + private static partial void _MemoryBarrierAcquireFunction(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void MemoryBarrierAcquireFunction() + { + Sdl.TraceLog.Trace(); + _MemoryBarrierAcquireFunction(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CompareAndSwapAtomicInt")] + private static partial byte _CompareAndSwapAtomicInt(SdlAtomicInt* a, int oldval, int newval); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CompareAndSwapAtomicInt(SdlAtomicInt* a, int oldval, int newval) + { + Sdl.TraceLog.Trace(); + return _CompareAndSwapAtomicInt(a, oldval, newval); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAtomicInt")] + private static partial int _SetAtomicInt(SdlAtomicInt* a, int v); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int SetAtomicInt(SdlAtomicInt* a, int v) + { + Sdl.TraceLog.Trace(); + return _SetAtomicInt(a, v); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAtomicInt")] + private static partial int _GetAtomicInt(SdlAtomicInt* a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetAtomicInt(SdlAtomicInt* a) + { + Sdl.TraceLog.Trace(); + return _GetAtomicInt(a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddAtomicInt")] + private static partial int _AddAtomicInt(SdlAtomicInt* a, int v); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int AddAtomicInt(SdlAtomicInt* a, int v) + { + Sdl.TraceLog.Trace(); + return _AddAtomicInt(a, v); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CompareAndSwapAtomicU32")] + private static partial byte _CompareAndSwapAtomicU32(SdlAtomicU32* a, uint oldval, uint newval); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CompareAndSwapAtomicU32(SdlAtomicU32* a, uint oldval, uint newval) + { + Sdl.TraceLog.Trace(); + return _CompareAndSwapAtomicU32(a, oldval, newval); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAtomicU32")] + private static partial uint _SetAtomicU32(SdlAtomicU32* a, uint v); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint SetAtomicU32(SdlAtomicU32* a, uint v) + { + Sdl.TraceLog.Trace(); + return _SetAtomicU32(a, v); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAtomicU32")] + private static partial uint _GetAtomicU32(SdlAtomicU32* a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetAtomicU32(SdlAtomicU32* a) + { + Sdl.TraceLog.Trace(); + return _GetAtomicU32(a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddAtomicU32")] + private static partial uint _AddAtomicU32(SdlAtomicU32* a, int v); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint AddAtomicU32(SdlAtomicU32* a, int v) + { + Sdl.TraceLog.Trace(); + return _AddAtomicU32(a, v); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CompareAndSwapAtomicPointer")] + private static partial byte _CompareAndSwapAtomicPointer(void** a, void* oldval, void* newval); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CompareAndSwapAtomicPointer(void** a, void* oldval, void* newval) + { + Sdl.TraceLog.Trace(); + return _CompareAndSwapAtomicPointer(a, oldval, newval); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAtomicPointer")] + private static partial void* _SetAtomicPointer(void** a, void* v); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* SetAtomicPointer(void** a, void* v) + { + Sdl.TraceLog.Trace(); + return _SetAtomicPointer(a, v); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAtomicPointer")] + private static partial void* _GetAtomicPointer(void** a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetAtomicPointer(void** a) + { + Sdl.TraceLog.Trace(); + return _GetAtomicPointer(a); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetErrorV", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetErrorV(string fmt, byte* ap); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetErrorV(string fmt, byte* ap) + { + Sdl.TraceLog.Trace(); + return _SetErrorV(fmt, ap); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OutOfMemory")] + private static partial byte _OutOfMemory(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte OutOfMemory() + { + Sdl.TraceLog.Trace(); + return _OutOfMemory(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetError", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetError(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetError() + { + Sdl.TraceLog.Trace(); + return _GetError(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClearError")] + private static partial byte _ClearError(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClearError() + { + Sdl.TraceLog.Trace(); + return _ClearError(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGlobalProperties")] + private static partial uint _GetGlobalProperties(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGlobalProperties() + { + Sdl.TraceLog.Trace(); + return _GetGlobalProperties(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateProperties")] + private static partial uint _CreateProperties(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint CreateProperties() + { + Sdl.TraceLog.Trace(); + return _CreateProperties(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CopyProperties")] + private static partial byte _CopyProperties(uint src, uint dst); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CopyProperties(uint src, uint dst) + { + Sdl.TraceLog.Trace(); + return _CopyProperties(src, dst); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockProperties")] + private static partial byte _LockProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LockProperties(uint props) + { + Sdl.TraceLog.Trace(); + return _LockProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockProperties")] + private static partial void _UnlockProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockProperties(uint props) + { + Sdl.TraceLog.Trace(); + _UnlockProperties(props); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetPointerPropertyWithCleanup", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetPointerPropertyWithCleanup( + uint props, + string name, + void* value, + delegate* unmanaged[Cdecl] cleanup, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetPointerPropertyWithCleanup( + uint props, + string name, + void* value, + delegate* unmanaged[Cdecl] cleanup, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _SetPointerPropertyWithCleanup(props, name, value, cleanup, userdata); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetPointerProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetPointerProperty(uint props, string name, void* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetPointerProperty(uint props, string name, void* value) + { + Sdl.TraceLog.Trace(); + return _SetPointerProperty(props, name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetStringProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetStringProperty(uint props, string name, string value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetStringProperty(uint props, string name, string value) + { + Sdl.TraceLog.Trace(); + return _SetStringProperty(props, name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetNumberProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetNumberProperty(uint props, string name, long value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetNumberProperty(uint props, string name, long value) + { + Sdl.TraceLog.Trace(); + return _SetNumberProperty(props, name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetFloatProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetFloatProperty(uint props, string name, float value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetFloatProperty(uint props, string name, float value) + { + Sdl.TraceLog.Trace(); + return _SetFloatProperty(props, name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetBooleanProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetBooleanProperty(uint props, string name, byte value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetBooleanProperty(uint props, string name, byte value) + { + Sdl.TraceLog.Trace(); + return _SetBooleanProperty(props, name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_HasProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _HasProperty(uint props, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasProperty(uint props, string name) + { + Sdl.TraceLog.Trace(); + return _HasProperty(props, name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetPropertyType", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlPropertyType _GetPropertyType(uint props, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPropertyType GetPropertyType(uint props, string name) + { + Sdl.TraceLog.Trace(); + return _GetPropertyType(props, name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetPointerProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void* _GetPointerProperty(uint props, string name, void* default_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetPointerProperty(uint props, string name, void* default_value) + { + Sdl.TraceLog.Trace(); + return _GetPointerProperty(props, name, default_value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetStringProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetStringProperty(uint props, string name, string default_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetStringProperty(uint props, string name, string default_value) + { + Sdl.TraceLog.Trace(); + return _GetStringProperty(props, name, default_value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetNumberProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial long _GetNumberProperty(uint props, string name, long default_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetNumberProperty(uint props, string name, long default_value) + { + Sdl.TraceLog.Trace(); + return _GetNumberProperty(props, name, default_value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetFloatProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial float _GetFloatProperty(uint props, string name, float default_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetFloatProperty(uint props, string name, float default_value) + { + Sdl.TraceLog.Trace(); + return _GetFloatProperty(props, name, default_value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetBooleanProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetBooleanProperty(uint props, string name, byte default_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetBooleanProperty(uint props, string name, byte default_value) + { + Sdl.TraceLog.Trace(); + return _GetBooleanProperty(props, name, default_value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ClearProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _ClearProperty(uint props, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClearProperty(uint props, string name) + { + Sdl.TraceLog.Trace(); + return _ClearProperty(props, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EnumerateProperties")] + private static partial byte _EnumerateProperties( + uint props, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte EnumerateProperties( + uint props, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _EnumerateProperties(props, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyProperties")] + private static partial void _DestroyProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyProperties(uint props) + { + Sdl.TraceLog.Trace(); + _DestroyProperties(props); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateThreadRuntime", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _CreateThreadRuntime( + delegate* unmanaged[Cdecl] fn, + string name, + void* data, + delegate* unmanaged[Cdecl] pfnBeginThread, + delegate* unmanaged[Cdecl] pfnEndThread + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateThreadRuntime( + delegate* unmanaged[Cdecl] fn, + string name, + void* data, + delegate* unmanaged[Cdecl] pfnBeginThread, + delegate* unmanaged[Cdecl] pfnEndThread + ) + { + Sdl.TraceLog.Trace(); + return _CreateThreadRuntime(fn, name, data, pfnBeginThread, pfnEndThread); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateThreadWithPropertiesRuntime")] + private static partial nint _CreateThreadWithPropertiesRuntime( + uint props, + delegate* unmanaged[Cdecl] pfnBeginThread, + delegate* unmanaged[Cdecl] pfnEndThread + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateThreadWithPropertiesRuntime( + uint props, + delegate* unmanaged[Cdecl] pfnBeginThread, + delegate* unmanaged[Cdecl] pfnEndThread + ) + { + Sdl.TraceLog.Trace(); + return _CreateThreadWithPropertiesRuntime(props, pfnBeginThread, pfnEndThread); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetThreadName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetThreadName(nint thread); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetThreadName(nint thread) + { + Sdl.TraceLog.Trace(); + return _GetThreadName(thread); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCurrentThreadID")] + private static partial ulong _GetCurrentThreadID(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetCurrentThreadID() + { + Sdl.TraceLog.Trace(); + return _GetCurrentThreadID(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetThreadID")] + private static partial ulong _GetThreadID(nint thread); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetThreadID(nint thread) + { + Sdl.TraceLog.Trace(); + return _GetThreadID(thread); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetCurrentThreadPriority")] + private static partial byte _SetCurrentThreadPriority(SdlThreadPriority priority); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetCurrentThreadPriority(SdlThreadPriority priority) + { + Sdl.TraceLog.Trace(); + return _SetCurrentThreadPriority(priority); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitThread")] + private static partial void _WaitThread(nint thread, int* status); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WaitThread(nint thread, int* status) + { + Sdl.TraceLog.Trace(); + _WaitThread(thread, status); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetThreadState")] + private static partial SdlThreadState _GetThreadState(nint thread); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlThreadState GetThreadState(nint thread) + { + Sdl.TraceLog.Trace(); + return _GetThreadState(thread); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DetachThread")] + private static partial void _DetachThread(nint thread); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DetachThread(nint thread) + { + Sdl.TraceLog.Trace(); + _DetachThread(thread); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTLS")] + private static partial void* _GetTLS(SdlAtomicInt* id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetTLS(SdlAtomicInt* id) + { + Sdl.TraceLog.Trace(); + return _GetTLS(id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTLS")] + private static partial byte _SetTLS( + SdlAtomicInt* id, + void* value, + delegate* unmanaged[Cdecl] destructor + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTLS(SdlAtomicInt* id, void* value, delegate* unmanaged[Cdecl] destructor) + { + Sdl.TraceLog.Trace(); + return _SetTLS(id, value, destructor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CleanupTLS")] + private static partial void _CleanupTLS(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CleanupTLS() + { + Sdl.TraceLog.Trace(); + _CleanupTLS(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateMutex")] + private static partial nint _CreateMutex(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateMutex() + { + Sdl.TraceLog.Trace(); + return _CreateMutex(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockMutex")] + private static partial void _LockMutex(nint mutex); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LockMutex(nint mutex) + { + Sdl.TraceLog.Trace(); + _LockMutex(mutex); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TryLockMutex")] + private static partial byte _TryLockMutex(nint mutex); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TryLockMutex(nint mutex) + { + Sdl.TraceLog.Trace(); + return _TryLockMutex(mutex); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockMutex")] + private static partial void _UnlockMutex(nint mutex); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockMutex(nint mutex) + { + Sdl.TraceLog.Trace(); + _UnlockMutex(mutex); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyMutex")] + private static partial void _DestroyMutex(nint mutex); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyMutex(nint mutex) + { + Sdl.TraceLog.Trace(); + _DestroyMutex(mutex); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateRWLock")] + private static partial nint _CreateRWLock(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateRWLock() + { + Sdl.TraceLog.Trace(); + return _CreateRWLock(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockRWLockForReading")] + private static partial void _LockRWLockForReading(nint rwlock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LockRWLockForReading(nint rwlock) + { + Sdl.TraceLog.Trace(); + _LockRWLockForReading(rwlock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockRWLockForWriting")] + private static partial void _LockRWLockForWriting(nint rwlock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LockRWLockForWriting(nint rwlock) + { + Sdl.TraceLog.Trace(); + _LockRWLockForWriting(rwlock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TryLockRWLockForReading")] + private static partial byte _TryLockRWLockForReading(nint rwlock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TryLockRWLockForReading(nint rwlock) + { + Sdl.TraceLog.Trace(); + return _TryLockRWLockForReading(rwlock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TryLockRWLockForWriting")] + private static partial byte _TryLockRWLockForWriting(nint rwlock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TryLockRWLockForWriting(nint rwlock) + { + Sdl.TraceLog.Trace(); + return _TryLockRWLockForWriting(rwlock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockRWLock")] + private static partial void _UnlockRWLock(nint rwlock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockRWLock(nint rwlock) + { + Sdl.TraceLog.Trace(); + _UnlockRWLock(rwlock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyRWLock")] + private static partial void _DestroyRWLock(nint rwlock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyRWLock(nint rwlock) + { + Sdl.TraceLog.Trace(); + _DestroyRWLock(rwlock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateSemaphore")] + private static partial nint _CreateSemaphore(uint initial_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateSemaphore(uint initial_value) + { + Sdl.TraceLog.Trace(); + return _CreateSemaphore(initial_value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroySemaphore")] + private static partial void _DestroySemaphore(nint sem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroySemaphore(nint sem) + { + Sdl.TraceLog.Trace(); + _DestroySemaphore(sem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitSemaphore")] + private static partial void _WaitSemaphore(nint sem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WaitSemaphore(nint sem) + { + Sdl.TraceLog.Trace(); + _WaitSemaphore(sem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TryWaitSemaphore")] + private static partial byte _TryWaitSemaphore(nint sem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TryWaitSemaphore(nint sem) + { + Sdl.TraceLog.Trace(); + return _TryWaitSemaphore(sem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitSemaphoreTimeout")] + private static partial byte _WaitSemaphoreTimeout(nint sem, int timeoutMS); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitSemaphoreTimeout(nint sem, int timeoutMS) + { + Sdl.TraceLog.Trace(); + return _WaitSemaphoreTimeout(sem, timeoutMS); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SignalSemaphore")] + private static partial void _SignalSemaphore(nint sem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SignalSemaphore(nint sem) + { + Sdl.TraceLog.Trace(); + _SignalSemaphore(sem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSemaphoreValue")] + private static partial uint _GetSemaphoreValue(nint sem); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetSemaphoreValue(nint sem) + { + Sdl.TraceLog.Trace(); + return _GetSemaphoreValue(sem); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateCondition")] + private static partial nint _CreateCondition(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateCondition() + { + Sdl.TraceLog.Trace(); + return _CreateCondition(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyCondition")] + private static partial void _DestroyCondition(nint cond); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyCondition(nint cond) + { + Sdl.TraceLog.Trace(); + _DestroyCondition(cond); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SignalCondition")] + private static partial void _SignalCondition(nint cond); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SignalCondition(nint cond) + { + Sdl.TraceLog.Trace(); + _SignalCondition(cond); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BroadcastCondition")] + private static partial void _BroadcastCondition(nint cond); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BroadcastCondition(nint cond) + { + Sdl.TraceLog.Trace(); + _BroadcastCondition(cond); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitCondition")] + private static partial void _WaitCondition(nint cond, nint mutex); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WaitCondition(nint cond, nint mutex) + { + Sdl.TraceLog.Trace(); + _WaitCondition(cond, mutex); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitConditionTimeout")] + private static partial byte _WaitConditionTimeout(nint cond, nint mutex, int timeoutMS); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitConditionTimeout(nint cond, nint mutex, int timeoutMS) + { + Sdl.TraceLog.Trace(); + return _WaitConditionTimeout(cond, mutex, timeoutMS); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShouldInit")] + private static partial byte _ShouldInit(SdlInitState* state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShouldInit(SdlInitState* state) + { + Sdl.TraceLog.Trace(); + return _ShouldInit(state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShouldQuit")] + private static partial byte _ShouldQuit(SdlInitState* state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShouldQuit(SdlInitState* state) + { + Sdl.TraceLog.Trace(); + return _ShouldQuit(state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetInitialized")] + private static partial void _SetInitialized(SdlInitState* state, byte initialized); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetInitialized(SdlInitState* state, byte initialized) + { + Sdl.TraceLog.Trace(); + _SetInitialized(state, initialized); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_IOFromFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _IOFromFile(string file, string mode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint IOFromFile(string file, string mode) + { + Sdl.TraceLog.Trace(); + return _IOFromFile(file, mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IOFromMem")] + private static partial nint _IOFromMem(void* mem, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint IOFromMem(void* mem, nuint size) + { + Sdl.TraceLog.Trace(); + return _IOFromMem(mem, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IOFromConstMem")] + private static partial nint _IOFromConstMem(void* mem, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint IOFromConstMem(void* mem, nuint size) + { + Sdl.TraceLog.Trace(); + return _IOFromConstMem(mem, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IOFromDynamicMem")] + private static partial nint _IOFromDynamicMem(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint IOFromDynamicMem() + { + Sdl.TraceLog.Trace(); + return _IOFromDynamicMem(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenIO")] + private static partial nint _OpenIO(SdlIOStreamInterface* iface, void* userdata); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenIO(SdlIOStreamInterface* iface, void* userdata) + { + Sdl.TraceLog.Trace(); + return _OpenIO(iface, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseIO")] + private static partial byte _CloseIO(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CloseIO(nint context) + { + Sdl.TraceLog.Trace(); + return _CloseIO(context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetIOProperties")] + private static partial uint _GetIOProperties(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetIOProperties(nint context) + { + Sdl.TraceLog.Trace(); + return _GetIOProperties(context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetIOStatus")] + private static partial SdlIOStatus _GetIOStatus(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlIOStatus GetIOStatus(nint context) + { + Sdl.TraceLog.Trace(); + return _GetIOStatus(context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetIOSize")] + private static partial long _GetIOSize(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long GetIOSize(nint context) + { + Sdl.TraceLog.Trace(); + return _GetIOSize(context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SeekIO")] + private static partial long _SeekIO(nint context, long offset, SdlIOWhence whence); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long SeekIO(nint context, long offset, SdlIOWhence whence) + { + Sdl.TraceLog.Trace(); + return _SeekIO(context, offset, whence); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TellIO")] + private static partial long _TellIO(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long TellIO(nint context) + { + Sdl.TraceLog.Trace(); + return _TellIO(context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadIO")] + private static partial nuint _ReadIO(nint context, void* ptr, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint ReadIO(nint context, void* ptr, nuint size) + { + Sdl.TraceLog.Trace(); + return _ReadIO(context, ptr, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteIO")] + private static partial nuint _WriteIO(nint context, void* ptr, nuint size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint WriteIO(nint context, void* ptr, nuint size) + { + Sdl.TraceLog.Trace(); + return _WriteIO(context, ptr, size); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_IOvprintf", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nuint _IOvprintf(nint context, string fmt, byte* ap); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint IOvprintf(nint context, string fmt, byte* ap) + { + Sdl.TraceLog.Trace(); + return _IOvprintf(context, fmt, ap); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlushIO")] + private static partial byte _FlushIO(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FlushIO(nint context) + { + Sdl.TraceLog.Trace(); + return _FlushIO(context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LoadFile_IO")] + private static partial void* _LoadFileIO(nint src, nuint* datasize, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* LoadFileIO(nint src, nuint* datasize, byte closeio) + { + Sdl.TraceLog.Trace(); + return _LoadFileIO(src, datasize, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void* _LoadFile(string file, nuint* datasize); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* LoadFile(string file, nuint* datasize) + { + Sdl.TraceLog.Trace(); + return _LoadFile(file, datasize); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SaveFile_IO")] + private static partial byte _SaveFileIO(nint src, void* data, nuint datasize, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveFileIO(nint src, void* data, nuint datasize, byte closeio) + { + Sdl.TraceLog.Trace(); + return _SaveFileIO(src, data, datasize, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SaveFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveFile(string file, void* data, nuint datasize); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveFile(string file, void* data, nuint datasize) + { + Sdl.TraceLog.Trace(); + return _SaveFile(file, data, datasize); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU8")] + private static partial byte _ReadU8(nint src, byte* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU8(nint src, byte* value) + { + Sdl.TraceLog.Trace(); + return _ReadU8(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS8")] + private static partial byte _ReadS8(nint src, sbyte* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS8(nint src, sbyte* value) + { + Sdl.TraceLog.Trace(); + return _ReadS8(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU16LE")] + private static partial byte _ReadU16LE(nint src, ushort* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU16LE(nint src, ushort* value) + { + Sdl.TraceLog.Trace(); + return _ReadU16LE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS16LE")] + private static partial byte _ReadS16LE(nint src, short* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS16LE(nint src, short* value) + { + Sdl.TraceLog.Trace(); + return _ReadS16LE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU16BE")] + private static partial byte _ReadU16BE(nint src, ushort* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU16BE(nint src, ushort* value) + { + Sdl.TraceLog.Trace(); + return _ReadU16BE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS16BE")] + private static partial byte _ReadS16BE(nint src, short* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS16BE(nint src, short* value) + { + Sdl.TraceLog.Trace(); + return _ReadS16BE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU32LE")] + private static partial byte _ReadU32LE(nint src, uint* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU32LE(nint src, uint* value) + { + Sdl.TraceLog.Trace(); + return _ReadU32LE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS32LE")] + private static partial byte _ReadS32LE(nint src, int* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS32LE(nint src, int* value) + { + Sdl.TraceLog.Trace(); + return _ReadS32LE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU32BE")] + private static partial byte _ReadU32BE(nint src, uint* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU32BE(nint src, uint* value) + { + Sdl.TraceLog.Trace(); + return _ReadU32BE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS32BE")] + private static partial byte _ReadS32BE(nint src, int* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS32BE(nint src, int* value) + { + Sdl.TraceLog.Trace(); + return _ReadS32BE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU64LE")] + private static partial byte _ReadU64LE(nint src, ulong* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU64LE(nint src, ulong* value) + { + Sdl.TraceLog.Trace(); + return _ReadU64LE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS64LE")] + private static partial byte _ReadS64LE(nint src, long* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS64LE(nint src, long* value) + { + Sdl.TraceLog.Trace(); + return _ReadS64LE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadU64BE")] + private static partial byte _ReadU64BE(nint src, ulong* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadU64BE(nint src, ulong* value) + { + Sdl.TraceLog.Trace(); + return _ReadU64BE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadS64BE")] + private static partial byte _ReadS64BE(nint src, long* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadS64BE(nint src, long* value) + { + Sdl.TraceLog.Trace(); + return _ReadS64BE(src, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU8")] + private static partial byte _WriteU8(nint dst, byte value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU8(nint dst, byte value) + { + Sdl.TraceLog.Trace(); + return _WriteU8(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS8")] + private static partial byte _WriteS8(nint dst, sbyte value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS8(nint dst, sbyte value) + { + Sdl.TraceLog.Trace(); + return _WriteS8(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU16LE")] + private static partial byte _WriteU16LE(nint dst, ushort value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU16LE(nint dst, ushort value) + { + Sdl.TraceLog.Trace(); + return _WriteU16LE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS16LE")] + private static partial byte _WriteS16LE(nint dst, short value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS16LE(nint dst, short value) + { + Sdl.TraceLog.Trace(); + return _WriteS16LE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU16BE")] + private static partial byte _WriteU16BE(nint dst, ushort value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU16BE(nint dst, ushort value) + { + Sdl.TraceLog.Trace(); + return _WriteU16BE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS16BE")] + private static partial byte _WriteS16BE(nint dst, short value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS16BE(nint dst, short value) + { + Sdl.TraceLog.Trace(); + return _WriteS16BE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU32LE")] + private static partial byte _WriteU32LE(nint dst, uint value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU32LE(nint dst, uint value) + { + Sdl.TraceLog.Trace(); + return _WriteU32LE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS32LE")] + private static partial byte _WriteS32LE(nint dst, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS32LE(nint dst, int value) + { + Sdl.TraceLog.Trace(); + return _WriteS32LE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU32BE")] + private static partial byte _WriteU32BE(nint dst, uint value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU32BE(nint dst, uint value) + { + Sdl.TraceLog.Trace(); + return _WriteU32BE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS32BE")] + private static partial byte _WriteS32BE(nint dst, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS32BE(nint dst, int value) + { + Sdl.TraceLog.Trace(); + return _WriteS32BE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU64LE")] + private static partial byte _WriteU64LE(nint dst, ulong value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU64LE(nint dst, ulong value) + { + Sdl.TraceLog.Trace(); + return _WriteU64LE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS64LE")] + private static partial byte _WriteS64LE(nint dst, long value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS64LE(nint dst, long value) + { + Sdl.TraceLog.Trace(); + return _WriteS64LE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteU64BE")] + private static partial byte _WriteU64BE(nint dst, ulong value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteU64BE(nint dst, ulong value) + { + Sdl.TraceLog.Trace(); + return _WriteU64BE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteS64BE")] + private static partial byte _WriteS64BE(nint dst, long value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteS64BE(nint dst, long value) + { + Sdl.TraceLog.Trace(); + return _WriteS64BE(dst, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumAudioDrivers")] + private static partial int _GetNumAudioDrivers(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumAudioDrivers() + { + Sdl.TraceLog.Trace(); + return _GetNumAudioDrivers(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetAudioDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetAudioDriver(int index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetAudioDriver(int index) + { + Sdl.TraceLog.Trace(); + return _GetAudioDriver(index); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetCurrentAudioDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetCurrentAudioDriver(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetCurrentAudioDriver() + { + Sdl.TraceLog.Trace(); + return _GetCurrentAudioDriver(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioPlaybackDevices")] + private static partial uint* _GetAudioPlaybackDevices(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetAudioPlaybackDevices(int* count) + { + Sdl.TraceLog.Trace(); + return _GetAudioPlaybackDevices(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioRecordingDevices")] + private static partial uint* _GetAudioRecordingDevices(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetAudioRecordingDevices(int* count) + { + Sdl.TraceLog.Trace(); + return _GetAudioRecordingDevices(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetAudioDeviceName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetAudioDeviceName(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetAudioDeviceName(uint devid) + { + Sdl.TraceLog.Trace(); + return _GetAudioDeviceName(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioDeviceFormat")] + private static partial byte _GetAudioDeviceFormat(uint devid, SdlAudioSpec* spec, int* sample_frames); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetAudioDeviceFormat(uint devid, SdlAudioSpec* spec, int* sample_frames) + { + Sdl.TraceLog.Trace(); + return _GetAudioDeviceFormat(devid, spec, sample_frames); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioDeviceChannelMap")] + private static partial int* _GetAudioDeviceChannelMap(uint devid, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int* GetAudioDeviceChannelMap(uint devid, int* count) + { + Sdl.TraceLog.Trace(); + return _GetAudioDeviceChannelMap(devid, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenAudioDevice")] + private static partial uint _OpenAudioDevice(uint devid, SdlAudioSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint OpenAudioDevice(uint devid, SdlAudioSpec* spec) + { + Sdl.TraceLog.Trace(); + return _OpenAudioDevice(devid, spec); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsAudioDevicePhysical")] + private static partial byte _IsAudioDevicePhysical(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsAudioDevicePhysical(uint devid) + { + Sdl.TraceLog.Trace(); + return _IsAudioDevicePhysical(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsAudioDevicePlayback")] + private static partial byte _IsAudioDevicePlayback(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsAudioDevicePlayback(uint devid) + { + Sdl.TraceLog.Trace(); + return _IsAudioDevicePlayback(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PauseAudioDevice")] + private static partial byte _PauseAudioDevice(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PauseAudioDevice(uint devid) + { + Sdl.TraceLog.Trace(); + return _PauseAudioDevice(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResumeAudioDevice")] + private static partial byte _ResumeAudioDevice(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResumeAudioDevice(uint devid) + { + Sdl.TraceLog.Trace(); + return _ResumeAudioDevice(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AudioDevicePaused")] + private static partial byte _AudioDevicePaused(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AudioDevicePaused(uint devid) + { + Sdl.TraceLog.Trace(); + return _AudioDevicePaused(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioDeviceGain")] + private static partial float _GetAudioDeviceGain(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetAudioDeviceGain(uint devid) + { + Sdl.TraceLog.Trace(); + return _GetAudioDeviceGain(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioDeviceGain")] + private static partial byte _SetAudioDeviceGain(uint devid, float gain); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioDeviceGain(uint devid, float gain) + { + Sdl.TraceLog.Trace(); + return _SetAudioDeviceGain(devid, gain); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseAudioDevice")] + private static partial void _CloseAudioDevice(uint devid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseAudioDevice(uint devid) + { + Sdl.TraceLog.Trace(); + _CloseAudioDevice(devid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindAudioStreams")] + private static partial byte _BindAudioStreams(uint devid, SdlAudioStream* streams, int num_streams); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BindAudioStreams(uint devid, SdlAudioStream* streams, int num_streams) + { + Sdl.TraceLog.Trace(); + return _BindAudioStreams(devid, streams, num_streams); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindAudioStream")] + private static partial byte _BindAudioStream(uint devid, SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BindAudioStream(uint devid, SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _BindAudioStream(devid, stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnbindAudioStreams")] + private static partial void _UnbindAudioStreams(SdlAudioStream* streams, int num_streams); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnbindAudioStreams(SdlAudioStream* streams, int num_streams) + { + Sdl.TraceLog.Trace(); + _UnbindAudioStreams(streams, num_streams); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnbindAudioStream")] + private static partial void _UnbindAudioStream(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnbindAudioStream(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + _UnbindAudioStream(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamDevice")] + private static partial uint _GetAudioStreamDevice(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetAudioStreamDevice(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamDevice(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateAudioStream")] + private static partial SdlAudioStream _CreateAudioStream(SdlAudioSpec* src_spec, SdlAudioSpec* dst_spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlAudioStream CreateAudioStream(SdlAudioSpec* src_spec, SdlAudioSpec* dst_spec) + { + Sdl.TraceLog.Trace(); + return _CreateAudioStream(src_spec, dst_spec); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamProperties")] + private static partial uint _GetAudioStreamProperties(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetAudioStreamProperties(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamProperties(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamFormat")] + private static partial byte _GetAudioStreamFormat( + SdlAudioStream stream, + SdlAudioSpec* src_spec, + SdlAudioSpec* dst_spec + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetAudioStreamFormat( + SdlAudioStream stream, + SdlAudioSpec* src_spec, + SdlAudioSpec* dst_spec + ) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamFormat(stream, src_spec, dst_spec); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamFormat")] + private static partial byte _SetAudioStreamFormat( + SdlAudioStream stream, + SdlAudioSpec* src_spec, + SdlAudioSpec* dst_spec + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamFormat( + SdlAudioStream stream, + SdlAudioSpec* src_spec, + SdlAudioSpec* dst_spec + ) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamFormat(stream, src_spec, dst_spec); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamFrequencyRatio")] + private static partial float _GetAudioStreamFrequencyRatio(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetAudioStreamFrequencyRatio(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamFrequencyRatio(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamFrequencyRatio")] + private static partial byte _SetAudioStreamFrequencyRatio(SdlAudioStream stream, float ratio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamFrequencyRatio(SdlAudioStream stream, float ratio) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamFrequencyRatio(stream, ratio); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamGain")] + private static partial float _GetAudioStreamGain(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetAudioStreamGain(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamGain(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamGain")] + private static partial byte _SetAudioStreamGain(SdlAudioStream stream, float gain); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamGain(SdlAudioStream stream, float gain) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamGain(stream, gain); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamInputChannelMap")] + private static partial int* _GetAudioStreamInputChannelMap(SdlAudioStream stream, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int* GetAudioStreamInputChannelMap(SdlAudioStream stream, int* count) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamInputChannelMap(stream, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamOutputChannelMap")] + private static partial int* _GetAudioStreamOutputChannelMap(SdlAudioStream stream, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int* GetAudioStreamOutputChannelMap(SdlAudioStream stream, int* count) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamOutputChannelMap(stream, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamInputChannelMap")] + private static partial byte _SetAudioStreamInputChannelMap(SdlAudioStream stream, int* chmap, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamInputChannelMap(SdlAudioStream stream, int* chmap, int count) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamInputChannelMap(stream, chmap, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamOutputChannelMap")] + private static partial byte _SetAudioStreamOutputChannelMap(SdlAudioStream stream, int* chmap, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamOutputChannelMap(SdlAudioStream stream, int* chmap, int count) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamOutputChannelMap(stream, chmap, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PutAudioStreamData")] + private static partial byte _PutAudioStreamData(SdlAudioStream stream, void* buf, int len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PutAudioStreamData(SdlAudioStream stream, void* buf, int len) + { + Sdl.TraceLog.Trace(); + return _PutAudioStreamData(stream, buf, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PutAudioStreamDataNoCopy")] + private static partial byte _PutAudioStreamDataNoCopy( + SdlAudioStream stream, + void* buf, + int len, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PutAudioStreamDataNoCopy( + SdlAudioStream stream, + void* buf, + int len, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _PutAudioStreamDataNoCopy(stream, buf, len, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PutAudioStreamPlanarData")] + private static partial byte _PutAudioStreamPlanarData( + SdlAudioStream stream, + void** channel_buffers, + int num_channels, + int num_samples + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PutAudioStreamPlanarData( + SdlAudioStream stream, + void** channel_buffers, + int num_channels, + int num_samples + ) + { + Sdl.TraceLog.Trace(); + return _PutAudioStreamPlanarData(stream, channel_buffers, num_channels, num_samples); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamData")] + private static partial int _GetAudioStreamData(SdlAudioStream stream, void* buf, int len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetAudioStreamData(SdlAudioStream stream, void* buf, int len) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamData(stream, buf, len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamAvailable")] + private static partial int _GetAudioStreamAvailable(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetAudioStreamAvailable(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamAvailable(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetAudioStreamQueued")] + private static partial int _GetAudioStreamQueued(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetAudioStreamQueued(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _GetAudioStreamQueued(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlushAudioStream")] + private static partial byte _FlushAudioStream(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FlushAudioStream(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _FlushAudioStream(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClearAudioStream")] + private static partial byte _ClearAudioStream(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClearAudioStream(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _ClearAudioStream(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PauseAudioStreamDevice")] + private static partial byte _PauseAudioStreamDevice(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PauseAudioStreamDevice(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _PauseAudioStreamDevice(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResumeAudioStreamDevice")] + private static partial byte _ResumeAudioStreamDevice(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResumeAudioStreamDevice(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _ResumeAudioStreamDevice(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AudioStreamDevicePaused")] + private static partial byte _AudioStreamDevicePaused(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AudioStreamDevicePaused(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _AudioStreamDevicePaused(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockAudioStream")] + private static partial byte _LockAudioStream(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LockAudioStream(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _LockAudioStream(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockAudioStream")] + private static partial byte _UnlockAudioStream(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UnlockAudioStream(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + return _UnlockAudioStream(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamGetCallback")] + private static partial byte _SetAudioStreamGetCallback( + SdlAudioStream stream, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamGetCallback( + SdlAudioStream stream, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamGetCallback(stream, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioStreamPutCallback")] + private static partial byte _SetAudioStreamPutCallback( + SdlAudioStream stream, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioStreamPutCallback( + SdlAudioStream stream, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _SetAudioStreamPutCallback(stream, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyAudioStream")] + private static partial void _DestroyAudioStream(SdlAudioStream stream); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyAudioStream(SdlAudioStream stream) + { + Sdl.TraceLog.Trace(); + _DestroyAudioStream(stream); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenAudioDeviceStream")] + private static partial SdlAudioStream _OpenAudioDeviceStream( + uint devid, + SdlAudioSpec* spec, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlAudioStream OpenAudioDeviceStream( + uint devid, + SdlAudioSpec* spec, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _OpenAudioDeviceStream(devid, spec, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetAudioPostmixCallback")] + private static partial byte _SetAudioPostmixCallback( + uint devid, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAudioPostmixCallback( + uint devid, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _SetAudioPostmixCallback(devid, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LoadWAV_IO")] + private static partial byte _LoadWAVIO( + nint src, + byte closeio, + SdlAudioSpec* spec, + byte** audio_buf, + uint* audio_len + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LoadWAVIO(nint src, byte closeio, SdlAudioSpec* spec, byte** audio_buf, uint* audio_len) + { + Sdl.TraceLog.Trace(); + return _LoadWAVIO(src, closeio, spec, audio_buf, audio_len); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadWAV", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _LoadWAV(string path, SdlAudioSpec* spec, byte** audio_buf, uint* audio_len); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LoadWAV(string path, SdlAudioSpec* spec, byte** audio_buf, uint* audio_len) + { + Sdl.TraceLog.Trace(); + return _LoadWAV(path, spec, audio_buf, audio_len); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MixAudio")] + private static partial byte _MixAudio(byte* dst, byte* src, SdlAudioFormat format, uint len, float volume); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte MixAudio(byte* dst, byte* src, SdlAudioFormat format, uint len, float volume) + { + Sdl.TraceLog.Trace(); + return _MixAudio(dst, src, format, len, volume); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ConvertAudioSamples")] + private static partial byte _ConvertAudioSamples( + SdlAudioSpec* src_spec, + byte* src_data, + int src_len, + SdlAudioSpec* dst_spec, + byte** dst_data, + int* dst_len + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ConvertAudioSamples( + SdlAudioSpec* src_spec, + byte* src_data, + int src_len, + SdlAudioSpec* dst_spec, + byte** dst_data, + int* dst_len + ) + { + Sdl.TraceLog.Trace(); + return _ConvertAudioSamples(src_spec, src_data, src_len, dst_spec, dst_data, dst_len); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetAudioFormatName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetAudioFormatName(SdlAudioFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetAudioFormatName(SdlAudioFormat format) + { + Sdl.TraceLog.Trace(); + return _GetAudioFormatName(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSilenceValueForFormat")] + private static partial int _GetSilenceValueForFormat(SdlAudioFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetSilenceValueForFormat(SdlAudioFormat format) + { + Sdl.TraceLog.Trace(); + return _GetSilenceValueForFormat(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ComposeCustomBlendMode")] + private static partial uint _ComposeCustomBlendMode( + SdlBlendFactor srcColorFactor, + SdlBlendFactor dstColorFactor, + SdlBlendOperation colorOperation, + SdlBlendFactor srcAlphaFactor, + SdlBlendFactor dstAlphaFactor, + SdlBlendOperation alphaOperation + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint ComposeCustomBlendMode( + SdlBlendFactor srcColorFactor, + SdlBlendFactor dstColorFactor, + SdlBlendOperation colorOperation, + SdlBlendFactor srcAlphaFactor, + SdlBlendFactor dstAlphaFactor, + SdlBlendOperation alphaOperation + ) + { + Sdl.TraceLog.Trace(); + return _ComposeCustomBlendMode( + srcColorFactor, + dstColorFactor, + colorOperation, + srcAlphaFactor, + dstAlphaFactor, + alphaOperation + ); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetPixelFormatName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetPixelFormatName(SdlPixelFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetPixelFormatName(SdlPixelFormat format) + { + Sdl.TraceLog.Trace(); + return _GetPixelFormatName(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMasksForPixelFormat")] + private static partial byte _GetMasksForPixelFormat( + SdlPixelFormat format, + int* bpp, + uint* Rmask, + uint* Gmask, + uint* Bmask, + uint* Amask + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetMasksForPixelFormat( + SdlPixelFormat format, + int* bpp, + uint* Rmask, + uint* Gmask, + uint* Bmask, + uint* Amask + ) + { + Sdl.TraceLog.Trace(); + return _GetMasksForPixelFormat(format, bpp, Rmask, Gmask, Bmask, Amask); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPixelFormatForMasks")] + private static partial SdlPixelFormat _GetPixelFormatForMasks( + int bpp, + uint Rmask, + uint Gmask, + uint Bmask, + uint Amask + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPixelFormat GetPixelFormatForMasks(int bpp, uint Rmask, uint Gmask, uint Bmask, uint Amask) + { + Sdl.TraceLog.Trace(); + return _GetPixelFormatForMasks(bpp, Rmask, Gmask, Bmask, Amask); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPixelFormatDetails")] + private static partial SdlPixelFormatDetails* _GetPixelFormatDetails(SdlPixelFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPixelFormatDetails* GetPixelFormatDetails(SdlPixelFormat format) + { + Sdl.TraceLog.Trace(); + return _GetPixelFormatDetails(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreatePalette")] + private static partial SdlPalette* _CreatePalette(int ncolors); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPalette* CreatePalette(int ncolors) + { + Sdl.TraceLog.Trace(); + return _CreatePalette(ncolors); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetPaletteColors")] + private static partial byte _SetPaletteColors( + SdlPalette* palette, + SdlColor* colors, + int firstcolor, + int ncolors + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetPaletteColors(SdlPalette* palette, SdlColor* colors, int firstcolor, int ncolors) + { + Sdl.TraceLog.Trace(); + return _SetPaletteColors(palette, colors, firstcolor, ncolors); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyPalette")] + private static partial void _DestroyPalette(SdlPalette* palette); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyPalette(SdlPalette* palette) + { + Sdl.TraceLog.Trace(); + _DestroyPalette(palette); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MapRGB")] + private static partial uint _MapRGB( + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte r, + byte g, + byte b + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint MapRGB(SdlPixelFormatDetails* format, SdlPalette* palette, byte r, byte g, byte b) + { + Sdl.TraceLog.Trace(); + return _MapRGB(format, palette, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MapRGBA")] + private static partial uint _MapRGBA( + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte r, + byte g, + byte b, + byte a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint MapRGBA( + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte r, + byte g, + byte b, + byte a + ) + { + Sdl.TraceLog.Trace(); + return _MapRGBA(format, palette, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRGB")] + private static partial void _GetRGB( + uint pixelvalue, + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte* r, + byte* g, + byte* b + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetRGB( + uint pixelvalue, + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte* r, + byte* g, + byte* b + ) + { + Sdl.TraceLog.Trace(); + _GetRGB(pixelvalue, format, palette, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRGBA")] + private static partial void _GetRGBA( + uint pixelvalue, + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte* r, + byte* g, + byte* b, + byte* a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetRGBA( + uint pixelvalue, + SdlPixelFormatDetails* format, + SdlPalette* palette, + byte* r, + byte* g, + byte* b, + byte* a + ) + { + Sdl.TraceLog.Trace(); + _GetRGBA(pixelvalue, format, palette, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasRectIntersection")] + private static partial byte _HasRectIntersection(SdlRect* A, SdlRect* B); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasRectIntersection(SdlRect* A, SdlRect* B) + { + Sdl.TraceLog.Trace(); + return _HasRectIntersection(A, B); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectIntersection")] + private static partial byte _GetRectIntersection(SdlRect* A, SdlRect* B, SdlRect* result); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectIntersection(SdlRect* A, SdlRect* B, SdlRect* result) + { + Sdl.TraceLog.Trace(); + return _GetRectIntersection(A, B, result); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectUnion")] + private static partial byte _GetRectUnion(SdlRect* A, SdlRect* B, SdlRect* result); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectUnion(SdlRect* A, SdlRect* B, SdlRect* result) + { + Sdl.TraceLog.Trace(); + return _GetRectUnion(A, B, result); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectEnclosingPoints")] + private static partial byte _GetRectEnclosingPoints( + SdlPoint* points, + int count, + SdlRect* clip, + SdlRect* result + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectEnclosingPoints(SdlPoint* points, int count, SdlRect* clip, SdlRect* result) + { + Sdl.TraceLog.Trace(); + return _GetRectEnclosingPoints(points, count, clip, result); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectAndLineIntersection")] + private static partial byte _GetRectAndLineIntersection(SdlRect* rect, int* X1, int* Y1, int* X2, int* Y2); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectAndLineIntersection(SdlRect* rect, int* X1, int* Y1, int* X2, int* Y2) + { + Sdl.TraceLog.Trace(); + return _GetRectAndLineIntersection(rect, X1, Y1, X2, Y2); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasRectIntersectionFloat")] + private static partial byte _HasRectIntersectionFloat(SdlFRect* A, SdlFRect* B); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasRectIntersectionFloat(SdlFRect* A, SdlFRect* B) + { + Sdl.TraceLog.Trace(); + return _HasRectIntersectionFloat(A, B); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectIntersectionFloat")] + private static partial byte _GetRectIntersectionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectIntersectionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result) + { + Sdl.TraceLog.Trace(); + return _GetRectIntersectionFloat(A, B, result); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectUnionFloat")] + private static partial byte _GetRectUnionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectUnionFloat(SdlFRect* A, SdlFRect* B, SdlFRect* result) + { + Sdl.TraceLog.Trace(); + return _GetRectUnionFloat(A, B, result); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectEnclosingPointsFloat")] + private static partial byte _GetRectEnclosingPointsFloat( + SdlFPoint* points, + int count, + SdlFRect* clip, + SdlFRect* result + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectEnclosingPointsFloat( + SdlFPoint* points, + int count, + SdlFRect* clip, + SdlFRect* result + ) + { + Sdl.TraceLog.Trace(); + return _GetRectEnclosingPointsFloat(points, count, clip, result); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRectAndLineIntersectionFloat")] + private static partial byte _GetRectAndLineIntersectionFloat( + SdlFRect* rect, + float* X1, + float* Y1, + float* X2, + float* Y2 + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRectAndLineIntersectionFloat( + SdlFRect* rect, + float* X1, + float* Y1, + float* X2, + float* Y2 + ) + { + Sdl.TraceLog.Trace(); + return _GetRectAndLineIntersectionFloat(rect, X1, Y1, X2, Y2); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateSurface")] + private static partial SdlSurface* _CreateSurface(int width, int height, SdlPixelFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* CreateSurface(int width, int height, SdlPixelFormat format) + { + Sdl.TraceLog.Trace(); + return _CreateSurface(width, height, format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateSurfaceFrom")] + private static partial SdlSurface* _CreateSurfaceFrom( + int width, + int height, + SdlPixelFormat format, + void* pixels, + int pitch + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* CreateSurfaceFrom( + int width, + int height, + SdlPixelFormat format, + void* pixels, + int pitch + ) + { + Sdl.TraceLog.Trace(); + return _CreateSurfaceFrom(width, height, format, pixels, pitch); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroySurface")] + private static partial void _DestroySurface(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroySurface(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + _DestroySurface(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceProperties")] + private static partial uint _GetSurfaceProperties(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetSurfaceProperties(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceProperties(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceColorspace")] + private static partial byte _SetSurfaceColorspace(SdlSurface* surface, SdlColorspace colorspace); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceColorspace(SdlSurface* surface, SdlColorspace colorspace) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceColorspace(surface, colorspace); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceColorspace")] + private static partial SdlColorspace _GetSurfaceColorspace(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlColorspace GetSurfaceColorspace(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceColorspace(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateSurfacePalette")] + private static partial SdlPalette* _CreateSurfacePalette(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPalette* CreateSurfacePalette(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _CreateSurfacePalette(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfacePalette")] + private static partial byte _SetSurfacePalette(SdlSurface* surface, SdlPalette* palette); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfacePalette(SdlSurface* surface, SdlPalette* palette) + { + Sdl.TraceLog.Trace(); + return _SetSurfacePalette(surface, palette); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfacePalette")] + private static partial SdlPalette* _GetSurfacePalette(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPalette* GetSurfacePalette(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _GetSurfacePalette(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddSurfaceAlternateImage")] + private static partial byte _AddSurfaceAlternateImage(SdlSurface* surface, SdlSurface* image); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AddSurfaceAlternateImage(SdlSurface* surface, SdlSurface* image) + { + Sdl.TraceLog.Trace(); + return _AddSurfaceAlternateImage(surface, image); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SurfaceHasAlternateImages")] + private static partial byte _SurfaceHasAlternateImages(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SurfaceHasAlternateImages(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _SurfaceHasAlternateImages(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceImages")] + private static partial SdlSurface** _GetSurfaceImages(SdlSurface* surface, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface** GetSurfaceImages(SdlSurface* surface, int* count) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceImages(surface, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RemoveSurfaceAlternateImages")] + private static partial void _RemoveSurfaceAlternateImages(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveSurfaceAlternateImages(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + _RemoveSurfaceAlternateImages(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockSurface")] + private static partial byte _LockSurface(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LockSurface(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _LockSurface(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockSurface")] + private static partial void _UnlockSurface(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockSurface(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + _UnlockSurface(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LoadSurface_IO")] + private static partial SdlSurface* _LoadSurfaceIO(nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadSurfaceIO(nint src, byte closeio) + { + Sdl.TraceLog.Trace(); + return _LoadSurfaceIO(src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadSurface", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _LoadSurface(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadSurface(string file) + { + Sdl.TraceLog.Trace(); + return _LoadSurface(file); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LoadBMP_IO")] + private static partial SdlSurface* _LoadBMPIO(nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadBMPIO(nint src, byte closeio) + { + Sdl.TraceLog.Trace(); + return _LoadBMPIO(src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadBMP", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _LoadBMP(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadBMP(string file) + { + Sdl.TraceLog.Trace(); + return _LoadBMP(file); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SaveBMP_IO")] + private static partial byte _SaveBMPIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveBMPIO(SdlSurface* surface, nint dst, byte closeio) + { + Sdl.TraceLog.Trace(); + return _SaveBMPIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SaveBMP", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SaveBMP(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SaveBMP(SdlSurface* surface, string file) + { + Sdl.TraceLog.Trace(); + return _SaveBMP(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LoadPNG_IO")] + private static partial SdlSurface* _LoadPNGIO(nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadPNGIO(nint src, byte closeio) + { + Sdl.TraceLog.Trace(); + return _LoadPNGIO(src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadPNG", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlSurface* _LoadPNG(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* LoadPNG(string file) + { + Sdl.TraceLog.Trace(); + return _LoadPNG(file); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SavePNG_IO")] + private static partial byte _SavePNGIO(SdlSurface* surface, nint dst, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SavePNGIO(SdlSurface* surface, nint dst, byte closeio) + { + Sdl.TraceLog.Trace(); + return _SavePNGIO(surface, dst, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SavePNG", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SavePNG(SdlSurface* surface, string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SavePNG(SdlSurface* surface, string file) + { + Sdl.TraceLog.Trace(); + return _SavePNG(surface, file); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceRLE")] + private static partial byte _SetSurfaceRLE(SdlSurface* surface, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceRLE(SdlSurface* surface, byte enabled) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceRLE(surface, enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SurfaceHasRLE")] + private static partial byte _SurfaceHasRLE(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SurfaceHasRLE(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _SurfaceHasRLE(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceColorKey")] + private static partial byte _SetSurfaceColorKey(SdlSurface* surface, byte enabled, uint key); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceColorKey(SdlSurface* surface, byte enabled, uint key) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceColorKey(surface, enabled, key); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SurfaceHasColorKey")] + private static partial byte _SurfaceHasColorKey(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SurfaceHasColorKey(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _SurfaceHasColorKey(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceColorKey")] + private static partial byte _GetSurfaceColorKey(SdlSurface* surface, uint* key); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetSurfaceColorKey(SdlSurface* surface, uint* key) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceColorKey(surface, key); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceColorMod")] + private static partial byte _SetSurfaceColorMod(SdlSurface* surface, byte r, byte g, byte b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceColorMod(SdlSurface* surface, byte r, byte g, byte b) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceColorMod(surface, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceColorMod")] + private static partial byte _GetSurfaceColorMod(SdlSurface* surface, byte* r, byte* g, byte* b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetSurfaceColorMod(SdlSurface* surface, byte* r, byte* g, byte* b) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceColorMod(surface, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceAlphaMod")] + private static partial byte _SetSurfaceAlphaMod(SdlSurface* surface, byte alpha); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceAlphaMod(SdlSurface* surface, byte alpha) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceAlphaMod(surface, alpha); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceAlphaMod")] + private static partial byte _GetSurfaceAlphaMod(SdlSurface* surface, byte* alpha); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetSurfaceAlphaMod(SdlSurface* surface, byte* alpha) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceAlphaMod(surface, alpha); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceBlendMode")] + private static partial byte _SetSurfaceBlendMode(SdlSurface* surface, uint blendMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceBlendMode(SdlSurface* surface, uint blendMode) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceBlendMode(surface, blendMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceBlendMode")] + private static partial byte _GetSurfaceBlendMode(SdlSurface* surface, uint* blendMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetSurfaceBlendMode(SdlSurface* surface, uint* blendMode) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceBlendMode(surface, blendMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetSurfaceClipRect")] + private static partial byte _SetSurfaceClipRect(SdlSurface* surface, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetSurfaceClipRect(SdlSurface* surface, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _SetSurfaceClipRect(surface, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSurfaceClipRect")] + private static partial byte _GetSurfaceClipRect(SdlSurface* surface, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetSurfaceClipRect(SdlSurface* surface, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetSurfaceClipRect(surface, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlipSurface")] + private static partial byte _FlipSurface(SdlSurface* surface, SdlFlipMode flip); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FlipSurface(SdlSurface* surface, SdlFlipMode flip) + { + Sdl.TraceLog.Trace(); + return _FlipSurface(surface, flip); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RotateSurface")] + private static partial SdlSurface* _RotateSurface(SdlSurface* surface, float angle); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RotateSurface(SdlSurface* surface, float angle) + { + Sdl.TraceLog.Trace(); + return _RotateSurface(surface, angle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DuplicateSurface")] + private static partial SdlSurface* _DuplicateSurface(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* DuplicateSurface(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _DuplicateSurface(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ScaleSurface")] + private static partial SdlSurface* _ScaleSurface( + SdlSurface* surface, + int width, + int height, + SdlScaleMode scaleMode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* ScaleSurface(SdlSurface* surface, int width, int height, SdlScaleMode scaleMode) + { + Sdl.TraceLog.Trace(); + return _ScaleSurface(surface, width, height, scaleMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ConvertSurface")] + private static partial SdlSurface* _ConvertSurface(SdlSurface* surface, SdlPixelFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* ConvertSurface(SdlSurface* surface, SdlPixelFormat format) + { + Sdl.TraceLog.Trace(); + return _ConvertSurface(surface, format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ConvertSurfaceAndColorspace")] + private static partial SdlSurface* _ConvertSurfaceAndColorspace( + SdlSurface* surface, + SdlPixelFormat format, + SdlPalette* palette, + SdlColorspace colorspace, + uint props + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* ConvertSurfaceAndColorspace( + SdlSurface* surface, + SdlPixelFormat format, + SdlPalette* palette, + SdlColorspace colorspace, + uint props + ) + { + Sdl.TraceLog.Trace(); + return _ConvertSurfaceAndColorspace(surface, format, palette, colorspace, props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ConvertPixels")] + private static partial byte _ConvertPixels( + int width, + int height, + SdlPixelFormat src_format, + void* src, + int src_pitch, + SdlPixelFormat dst_format, + void* dst, + int dst_pitch + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ConvertPixels( + int width, + int height, + SdlPixelFormat src_format, + void* src, + int src_pitch, + SdlPixelFormat dst_format, + void* dst, + int dst_pitch + ) + { + Sdl.TraceLog.Trace(); + return _ConvertPixels(width, height, src_format, src, src_pitch, dst_format, dst, dst_pitch); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ConvertPixelsAndColorspace")] + private static partial byte _ConvertPixelsAndColorspace( + int width, + int height, + SdlPixelFormat src_format, + SdlColorspace src_colorspace, + uint src_properties, + void* src, + int src_pitch, + SdlPixelFormat dst_format, + SdlColorspace dst_colorspace, + uint dst_properties, + void* dst, + int dst_pitch + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ConvertPixelsAndColorspace( + int width, + int height, + SdlPixelFormat src_format, + SdlColorspace src_colorspace, + uint src_properties, + void* src, + int src_pitch, + SdlPixelFormat dst_format, + SdlColorspace dst_colorspace, + uint dst_properties, + void* dst, + int dst_pitch + ) + { + Sdl.TraceLog.Trace(); + return _ConvertPixelsAndColorspace( + width, + height, + src_format, + src_colorspace, + src_properties, + src, + src_pitch, + dst_format, + dst_colorspace, + dst_properties, + dst, + dst_pitch + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PremultiplyAlpha")] + private static partial byte _PremultiplyAlpha( + int width, + int height, + SdlPixelFormat src_format, + void* src, + int src_pitch, + SdlPixelFormat dst_format, + void* dst, + int dst_pitch, + byte linear + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PremultiplyAlpha( + int width, + int height, + SdlPixelFormat src_format, + void* src, + int src_pitch, + SdlPixelFormat dst_format, + void* dst, + int dst_pitch, + byte linear + ) + { + Sdl.TraceLog.Trace(); + return _PremultiplyAlpha(width, height, src_format, src, src_pitch, dst_format, dst, dst_pitch, linear); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PremultiplySurfaceAlpha")] + private static partial byte _PremultiplySurfaceAlpha(SdlSurface* surface, byte linear); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PremultiplySurfaceAlpha(SdlSurface* surface, byte linear) + { + Sdl.TraceLog.Trace(); + return _PremultiplySurfaceAlpha(surface, linear); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClearSurface")] + private static partial byte _ClearSurface(SdlSurface* surface, float r, float g, float b, float a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClearSurface(SdlSurface* surface, float r, float g, float b, float a) + { + Sdl.TraceLog.Trace(); + return _ClearSurface(surface, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FillSurfaceRect")] + private static partial byte _FillSurfaceRect(SdlSurface* dst, SdlRect* rect, uint color); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FillSurfaceRect(SdlSurface* dst, SdlRect* rect, uint color) + { + Sdl.TraceLog.Trace(); + return _FillSurfaceRect(dst, rect, color); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FillSurfaceRects")] + private static partial byte _FillSurfaceRects(SdlSurface* dst, SdlRect* rects, int count, uint color); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FillSurfaceRects(SdlSurface* dst, SdlRect* rects, int count, uint color) + { + Sdl.TraceLog.Trace(); + return _FillSurfaceRects(dst, rects, count, color); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurface")] + private static partial byte _BlitSurface( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurface(SdlSurface* src, SdlRect* srcrect, SdlSurface* dst, SdlRect* dstrect) + { + Sdl.TraceLog.Trace(); + return _BlitSurface(src, srcrect, dst, dstrect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceUnchecked")] + private static partial byte _BlitSurfaceUnchecked( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurfaceUnchecked( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect + ) + { + Sdl.TraceLog.Trace(); + return _BlitSurfaceUnchecked(src, srcrect, dst, dstrect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceScaled")] + private static partial byte _BlitSurfaceScaled( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect, + SdlScaleMode scaleMode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurfaceScaled( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect, + SdlScaleMode scaleMode + ) + { + Sdl.TraceLog.Trace(); + return _BlitSurfaceScaled(src, srcrect, dst, dstrect, scaleMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceUncheckedScaled")] + private static partial byte _BlitSurfaceUncheckedScaled( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect, + SdlScaleMode scaleMode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurfaceUncheckedScaled( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect, + SdlScaleMode scaleMode + ) + { + Sdl.TraceLog.Trace(); + return _BlitSurfaceUncheckedScaled(src, srcrect, dst, dstrect, scaleMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StretchSurface")] + private static partial byte _StretchSurface( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect, + SdlScaleMode scaleMode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StretchSurface( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect, + SdlScaleMode scaleMode + ) + { + Sdl.TraceLog.Trace(); + return _StretchSurface(src, srcrect, dst, dstrect, scaleMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceTiled")] + private static partial byte _BlitSurfaceTiled( + SdlSurface* src, + SdlRect* srcrect, + SdlSurface* dst, + SdlRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurfaceTiled(SdlSurface* src, SdlRect* srcrect, SdlSurface* dst, SdlRect* dstrect) + { + Sdl.TraceLog.Trace(); + return _BlitSurfaceTiled(src, srcrect, dst, dstrect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurfaceTiledWithScale")] + private static partial byte _BlitSurfaceTiledWithScale( + SdlSurface* src, + SdlRect* srcrect, + float scale, + SdlScaleMode scaleMode, + SdlSurface* dst, + SdlRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurfaceTiledWithScale( + SdlSurface* src, + SdlRect* srcrect, + float scale, + SdlScaleMode scaleMode, + SdlSurface* dst, + SdlRect* dstrect + ) + { + Sdl.TraceLog.Trace(); + return _BlitSurfaceTiledWithScale(src, srcrect, scale, scaleMode, dst, dstrect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitSurface9Grid")] + private static partial byte _BlitSurface9Grid( + SdlSurface* src, + SdlRect* srcrect, + int left_width, + int right_width, + int top_height, + int bottom_height, + float scale, + SdlScaleMode scaleMode, + SdlSurface* dst, + SdlRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte BlitSurface9Grid( + SdlSurface* src, + SdlRect* srcrect, + int left_width, + int right_width, + int top_height, + int bottom_height, + float scale, + SdlScaleMode scaleMode, + SdlSurface* dst, + SdlRect* dstrect + ) + { + Sdl.TraceLog.Trace(); + return _BlitSurface9Grid( + src, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + scaleMode, + dst, + dstrect + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MapSurfaceRGB")] + private static partial uint _MapSurfaceRGB(SdlSurface* surface, byte r, byte g, byte b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint MapSurfaceRGB(SdlSurface* surface, byte r, byte g, byte b) + { + Sdl.TraceLog.Trace(); + return _MapSurfaceRGB(surface, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MapSurfaceRGBA")] + private static partial uint _MapSurfaceRGBA(SdlSurface* surface, byte r, byte g, byte b, byte a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint MapSurfaceRGBA(SdlSurface* surface, byte r, byte g, byte b, byte a) + { + Sdl.TraceLog.Trace(); + return _MapSurfaceRGBA(surface, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadSurfacePixel")] + private static partial byte _ReadSurfacePixel( + SdlSurface* surface, + int x, + int y, + byte* r, + byte* g, + byte* b, + byte* a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadSurfacePixel(SdlSurface* surface, int x, int y, byte* r, byte* g, byte* b, byte* a) + { + Sdl.TraceLog.Trace(); + return _ReadSurfacePixel(surface, x, y, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadSurfacePixelFloat")] + private static partial byte _ReadSurfacePixelFloat( + SdlSurface* surface, + int x, + int y, + float* r, + float* g, + float* b, + float* a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadSurfacePixelFloat( + SdlSurface* surface, + int x, + int y, + float* r, + float* g, + float* b, + float* a + ) + { + Sdl.TraceLog.Trace(); + return _ReadSurfacePixelFloat(surface, x, y, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteSurfacePixel")] + private static partial byte _WriteSurfacePixel( + SdlSurface* surface, + int x, + int y, + byte r, + byte g, + byte b, + byte a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteSurfacePixel(SdlSurface* surface, int x, int y, byte r, byte g, byte b, byte a) + { + Sdl.TraceLog.Trace(); + return _WriteSurfacePixel(surface, x, y, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WriteSurfacePixelFloat")] + private static partial byte _WriteSurfacePixelFloat( + SdlSurface* surface, + int x, + int y, + float r, + float g, + float b, + float a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteSurfacePixelFloat( + SdlSurface* surface, + int x, + int y, + float r, + float g, + float b, + float a + ) + { + Sdl.TraceLog.Trace(); + return _WriteSurfacePixelFloat(surface, x, y, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumCameraDrivers")] + private static partial int _GetNumCameraDrivers(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumCameraDrivers() + { + Sdl.TraceLog.Trace(); + return _GetNumCameraDrivers(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetCameraDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetCameraDriver(int index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetCameraDriver(int index) + { + Sdl.TraceLog.Trace(); + return _GetCameraDriver(index); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetCurrentCameraDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetCurrentCameraDriver(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetCurrentCameraDriver() + { + Sdl.TraceLog.Trace(); + return _GetCurrentCameraDriver(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameras")] + private static partial uint* _GetCameras(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetCameras(int* count) + { + Sdl.TraceLog.Trace(); + return _GetCameras(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameraSupportedFormats")] + private static partial SdlCameraSpec** _GetCameraSupportedFormats(uint instance_id, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCameraSpec** GetCameraSupportedFormats(uint instance_id, int* count) + { + Sdl.TraceLog.Trace(); + return _GetCameraSupportedFormats(instance_id, count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetCameraName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetCameraName(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetCameraName(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetCameraName(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameraPosition")] + private static partial SdlCameraPosition _GetCameraPosition(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCameraPosition GetCameraPosition(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetCameraPosition(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenCamera")] + private static partial SdlCamera _OpenCamera(uint instance_id, SdlCameraSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCamera OpenCamera(uint instance_id, SdlCameraSpec* spec) + { + Sdl.TraceLog.Trace(); + return _OpenCamera(instance_id, spec); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameraPermissionState")] + private static partial SdlCameraPermissionState _GetCameraPermissionState(SdlCamera camera); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCameraPermissionState GetCameraPermissionState(SdlCamera camera) + { + Sdl.TraceLog.Trace(); + return _GetCameraPermissionState(camera); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameraID")] + private static partial uint _GetCameraID(SdlCamera camera); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetCameraID(SdlCamera camera) + { + Sdl.TraceLog.Trace(); + return _GetCameraID(camera); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameraProperties")] + private static partial uint _GetCameraProperties(SdlCamera camera); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetCameraProperties(SdlCamera camera) + { + Sdl.TraceLog.Trace(); + return _GetCameraProperties(camera); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCameraFormat")] + private static partial byte _GetCameraFormat(SdlCamera camera, SdlCameraSpec* spec); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetCameraFormat(SdlCamera camera, SdlCameraSpec* spec) + { + Sdl.TraceLog.Trace(); + return _GetCameraFormat(camera, spec); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AcquireCameraFrame")] + private static partial SdlSurface* _AcquireCameraFrame(SdlCamera camera, ulong* timestampNS); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* AcquireCameraFrame(SdlCamera camera, ulong* timestampNS) + { + Sdl.TraceLog.Trace(); + return _AcquireCameraFrame(camera, timestampNS); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseCameraFrame")] + private static partial void _ReleaseCameraFrame(SdlCamera camera, SdlSurface* frame); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseCameraFrame(SdlCamera camera, SdlSurface* frame) + { + Sdl.TraceLog.Trace(); + _ReleaseCameraFrame(camera, frame); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseCamera")] + private static partial void _CloseCamera(SdlCamera camera); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseCamera(SdlCamera camera) + { + Sdl.TraceLog.Trace(); + _CloseCamera(camera); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetClipboardText", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetClipboardText(string text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetClipboardText(string text) + { + Sdl.TraceLog.Trace(); + return _SetClipboardText(text); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetClipboardText")] + private static partial byte* _GetClipboardText(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetClipboardText() + { + Sdl.TraceLog.Trace(); + return _GetClipboardText(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasClipboardText")] + private static partial byte _HasClipboardText(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasClipboardText() + { + Sdl.TraceLog.Trace(); + return _HasClipboardText(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetPrimarySelectionText", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetPrimarySelectionText(string text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetPrimarySelectionText(string text) + { + Sdl.TraceLog.Trace(); + return _SetPrimarySelectionText(text); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPrimarySelectionText")] + private static partial byte* _GetPrimarySelectionText(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetPrimarySelectionText() + { + Sdl.TraceLog.Trace(); + return _GetPrimarySelectionText(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasPrimarySelectionText")] + private static partial byte _HasPrimarySelectionText(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasPrimarySelectionText() + { + Sdl.TraceLog.Trace(); + return _HasPrimarySelectionText(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetClipboardData")] + private static partial byte _SetClipboardData( + delegate* unmanaged[Cdecl] callback, + delegate* unmanaged[Cdecl] cleanup, + void* userdata, + byte** mime_types, + nuint num_mime_types + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetClipboardData( + delegate* unmanaged[Cdecl] callback, + delegate* unmanaged[Cdecl] cleanup, + void* userdata, + byte** mime_types, + nuint num_mime_types + ) + { + Sdl.TraceLog.Trace(); + return _SetClipboardData(callback, cleanup, userdata, mime_types, num_mime_types); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClearClipboardData")] + private static partial byte _ClearClipboardData(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClearClipboardData() + { + Sdl.TraceLog.Trace(); + return _ClearClipboardData(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetClipboardData", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void* _GetClipboardData(string mime_type, nuint* size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetClipboardData(string mime_type, nuint* size) + { + Sdl.TraceLog.Trace(); + return _GetClipboardData(mime_type, size); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_HasClipboardData", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _HasClipboardData(string mime_type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasClipboardData(string mime_type) + { + Sdl.TraceLog.Trace(); + return _HasClipboardData(mime_type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetClipboardMimeTypes")] + private static partial byte** _GetClipboardMimeTypes(nuint* num_mime_types); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GetClipboardMimeTypes(nuint* num_mime_types) + { + Sdl.TraceLog.Trace(); + return _GetClipboardMimeTypes(num_mime_types); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumLogicalCPUCores")] + private static partial int _GetNumLogicalCPUCores(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumLogicalCPUCores() + { + Sdl.TraceLog.Trace(); + return _GetNumLogicalCPUCores(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCPUCacheLineSize")] + private static partial int _GetCPUCacheLineSize(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetCPUCacheLineSize() + { + Sdl.TraceLog.Trace(); + return _GetCPUCacheLineSize(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasAltiVec")] + private static partial byte _HasAltiVec(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasAltiVec() + { + Sdl.TraceLog.Trace(); + return _HasAltiVec(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasMMX")] + private static partial byte _HasMMX(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasMMX() + { + Sdl.TraceLog.Trace(); + return _HasMMX(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasSSE")] + private static partial byte _HasSSE(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasSSE() + { + Sdl.TraceLog.Trace(); + return _HasSSE(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasSSE2")] + private static partial byte _HasSSE2(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasSSE2() + { + Sdl.TraceLog.Trace(); + return _HasSSE2(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasSSE3")] + private static partial byte _HasSSE3(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasSSE3() + { + Sdl.TraceLog.Trace(); + return _HasSSE3(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasSSE41")] + private static partial byte _HasSSE41(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasSSE41() + { + Sdl.TraceLog.Trace(); + return _HasSSE41(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasSSE42")] + private static partial byte _HasSSE42(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasSSE42() + { + Sdl.TraceLog.Trace(); + return _HasSSE42(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasAVX")] + private static partial byte _HasAVX(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasAVX() + { + Sdl.TraceLog.Trace(); + return _HasAVX(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasAVX2")] + private static partial byte _HasAVX2(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasAVX2() + { + Sdl.TraceLog.Trace(); + return _HasAVX2(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasAVX512F")] + private static partial byte _HasAVX512F(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasAVX512F() + { + Sdl.TraceLog.Trace(); + return _HasAVX512F(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasARMSIMD")] + private static partial byte _HasARMSIMD(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasARMSIMD() + { + Sdl.TraceLog.Trace(); + return _HasARMSIMD(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasNEON")] + private static partial byte _HasNEON(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasNEON() + { + Sdl.TraceLog.Trace(); + return _HasNEON(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasLSX")] + private static partial byte _HasLSX(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasLSX() + { + Sdl.TraceLog.Trace(); + return _HasLSX(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasLASX")] + private static partial byte _HasLASX(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasLASX() + { + Sdl.TraceLog.Trace(); + return _HasLASX(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSystemRAM")] + private static partial int _GetSystemRAM(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetSystemRAM() + { + Sdl.TraceLog.Trace(); + return _GetSystemRAM(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSIMDAlignment")] + private static partial nuint _GetSIMDAlignment(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nuint GetSIMDAlignment() + { + Sdl.TraceLog.Trace(); + return _GetSIMDAlignment(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSystemPageSize")] + private static partial int _GetSystemPageSize(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetSystemPageSize() + { + Sdl.TraceLog.Trace(); + return _GetSystemPageSize(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumVideoDrivers")] + private static partial int _GetNumVideoDrivers(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumVideoDrivers() + { + Sdl.TraceLog.Trace(); + return _GetNumVideoDrivers(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetVideoDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetVideoDriver(int index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetVideoDriver(int index) + { + Sdl.TraceLog.Trace(); + return _GetVideoDriver(index); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetCurrentVideoDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetCurrentVideoDriver(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetCurrentVideoDriver() + { + Sdl.TraceLog.Trace(); + return _GetCurrentVideoDriver(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSystemTheme")] + private static partial SdlSystemTheme _GetSystemTheme(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSystemTheme GetSystemTheme() + { + Sdl.TraceLog.Trace(); + return _GetSystemTheme(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplays")] + private static partial uint* _GetDisplays(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetDisplays(int* count) + { + Sdl.TraceLog.Trace(); + return _GetDisplays(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPrimaryDisplay")] + private static partial uint _GetPrimaryDisplay(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetPrimaryDisplay() + { + Sdl.TraceLog.Trace(); + return _GetPrimaryDisplay(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayProperties")] + private static partial uint _GetDisplayProperties(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetDisplayProperties(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetDisplayProperties(displayID); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetDisplayName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetDisplayName(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetDisplayName(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetDisplayName(displayID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayBounds")] + private static partial byte _GetDisplayBounds(uint displayID, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetDisplayBounds(uint displayID, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetDisplayBounds(displayID, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayUsableBounds")] + private static partial byte _GetDisplayUsableBounds(uint displayID, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetDisplayUsableBounds(uint displayID, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetDisplayUsableBounds(displayID, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNaturalDisplayOrientation")] + private static partial SdlDisplayOrientation _GetNaturalDisplayOrientation(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlDisplayOrientation GetNaturalDisplayOrientation(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetNaturalDisplayOrientation(displayID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCurrentDisplayOrientation")] + private static partial SdlDisplayOrientation _GetCurrentDisplayOrientation(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlDisplayOrientation GetCurrentDisplayOrientation(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetCurrentDisplayOrientation(displayID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayContentScale")] + private static partial float _GetDisplayContentScale(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetDisplayContentScale(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetDisplayContentScale(displayID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetFullscreenDisplayModes")] + private static partial SdlDisplayMode** _GetFullscreenDisplayModes(uint displayID, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlDisplayMode** GetFullscreenDisplayModes(uint displayID, int* count) + { + Sdl.TraceLog.Trace(); + return _GetFullscreenDisplayModes(displayID, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetClosestFullscreenDisplayMode")] + private static partial byte _GetClosestFullscreenDisplayMode( + uint displayID, + int w, + int h, + float refresh_rate, + byte include_high_density_modes, + SdlDisplayMode* closest + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetClosestFullscreenDisplayMode( + uint displayID, + int w, + int h, + float refresh_rate, + byte include_high_density_modes, + SdlDisplayMode* closest + ) + { + Sdl.TraceLog.Trace(); + return _GetClosestFullscreenDisplayMode( + displayID, + w, + h, + refresh_rate, + include_high_density_modes, + closest + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDesktopDisplayMode")] + private static partial SdlDisplayMode* _GetDesktopDisplayMode(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlDisplayMode* GetDesktopDisplayMode(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetDesktopDisplayMode(displayID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCurrentDisplayMode")] + private static partial SdlDisplayMode* _GetCurrentDisplayMode(uint displayID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlDisplayMode* GetCurrentDisplayMode(uint displayID) + { + Sdl.TraceLog.Trace(); + return _GetCurrentDisplayMode(displayID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayForPoint")] + private static partial uint _GetDisplayForPoint(SdlPoint* point); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetDisplayForPoint(SdlPoint* point) + { + Sdl.TraceLog.Trace(); + return _GetDisplayForPoint(point); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayForRect")] + private static partial uint _GetDisplayForRect(SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetDisplayForRect(SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetDisplayForRect(rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDisplayForWindow")] + private static partial uint _GetDisplayForWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetDisplayForWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetDisplayForWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowPixelDensity")] + private static partial float _GetWindowPixelDensity(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetWindowPixelDensity(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowPixelDensity(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowDisplayScale")] + private static partial float _GetWindowDisplayScale(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetWindowDisplayScale(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowDisplayScale(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowFullscreenMode")] + private static partial byte _SetWindowFullscreenMode(SdlWindow window, SdlDisplayMode* mode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowFullscreenMode(SdlWindow window, SdlDisplayMode* mode) + { + Sdl.TraceLog.Trace(); + return _SetWindowFullscreenMode(window, mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowFullscreenMode")] + private static partial SdlDisplayMode* _GetWindowFullscreenMode(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlDisplayMode* GetWindowFullscreenMode(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowFullscreenMode(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowICCProfile")] + private static partial void* _GetWindowICCProfile(SdlWindow window, nuint* size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetWindowICCProfile(SdlWindow window, nuint* size) + { + Sdl.TraceLog.Trace(); + return _GetWindowICCProfile(window, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowPixelFormat")] + private static partial SdlPixelFormat _GetWindowPixelFormat(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPixelFormat GetWindowPixelFormat(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowPixelFormat(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindows")] + private static partial SdlWindow* _GetWindows(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow* GetWindows(int* count) + { + Sdl.TraceLog.Trace(); + return _GetWindows(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateWindow", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlWindow _CreateWindow(string title, int w, int h, SdlWindowFlags flags); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow CreateWindow(string title, int w, int h, SdlWindowFlags flags) + { + Sdl.TraceLog.Trace(); + return _CreateWindow(title, w, h, flags); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreatePopupWindow")] + private static partial SdlWindow _CreatePopupWindow( + SdlWindow parent, + int offset_x, + int offset_y, + int w, + int h, + SdlWindowFlags flags + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow CreatePopupWindow( + SdlWindow parent, + int offset_x, + int offset_y, + int w, + int h, + SdlWindowFlags flags + ) + { + Sdl.TraceLog.Trace(); + return _CreatePopupWindow(parent, offset_x, offset_y, w, h, flags); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateWindowWithProperties")] + private static partial SdlWindow _CreateWindowWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow CreateWindowWithProperties(uint props) + { + Sdl.TraceLog.Trace(); + return _CreateWindowWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowID")] + private static partial uint _GetWindowID(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetWindowID(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowID(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowFromID")] + private static partial SdlWindow _GetWindowFromID(uint id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetWindowFromID(uint id) + { + Sdl.TraceLog.Trace(); + return _GetWindowFromID(id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowParent")] + private static partial SdlWindow _GetWindowParent(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetWindowParent(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowParent(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowProperties")] + private static partial uint _GetWindowProperties(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetWindowProperties(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowProperties(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowFlags")] + private static partial SdlWindowFlags _GetWindowFlags(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindowFlags GetWindowFlags(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowFlags(window); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetWindowTitle", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetWindowTitle(SdlWindow window, string title); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowTitle(SdlWindow window, string title) + { + Sdl.TraceLog.Trace(); + return _SetWindowTitle(window, title); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetWindowTitle", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetWindowTitle(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetWindowTitle(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowTitle(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowIcon")] + private static partial byte _SetWindowIcon(SdlWindow window, SdlSurface* icon); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowIcon(SdlWindow window, SdlSurface* icon) + { + Sdl.TraceLog.Trace(); + return _SetWindowIcon(window, icon); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowPosition")] + private static partial byte _SetWindowPosition(SdlWindow window, int x, int y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowPosition(SdlWindow window, int x, int y) + { + Sdl.TraceLog.Trace(); + return _SetWindowPosition(window, x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowPosition")] + private static partial byte _GetWindowPosition(SdlWindow window, int* x, int* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowPosition(SdlWindow window, int* x, int* y) + { + Sdl.TraceLog.Trace(); + return _GetWindowPosition(window, x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowSize")] + private static partial byte _SetWindowSize(SdlWindow window, int w, int h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowSize(SdlWindow window, int w, int h) + { + Sdl.TraceLog.Trace(); + return _SetWindowSize(window, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowSize")] + private static partial byte _GetWindowSize(SdlWindow window, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowSize(SdlWindow window, int* w, int* h) + { + Sdl.TraceLog.Trace(); + return _GetWindowSize(window, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowSafeArea")] + private static partial byte _GetWindowSafeArea(SdlWindow window, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowSafeArea(SdlWindow window, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetWindowSafeArea(window, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowAspectRatio")] + private static partial byte _SetWindowAspectRatio(SdlWindow window, float min_aspect, float max_aspect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowAspectRatio(SdlWindow window, float min_aspect, float max_aspect) + { + Sdl.TraceLog.Trace(); + return _SetWindowAspectRatio(window, min_aspect, max_aspect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowAspectRatio")] + private static partial byte _GetWindowAspectRatio(SdlWindow window, float* min_aspect, float* max_aspect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowAspectRatio(SdlWindow window, float* min_aspect, float* max_aspect) + { + Sdl.TraceLog.Trace(); + return _GetWindowAspectRatio(window, min_aspect, max_aspect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowBordersSize")] + private static partial byte _GetWindowBordersSize( + SdlWindow window, + int* top, + int* left, + int* bottom, + int* right + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowBordersSize(SdlWindow window, int* top, int* left, int* bottom, int* right) + { + Sdl.TraceLog.Trace(); + return _GetWindowBordersSize(window, top, left, bottom, right); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowSizeInPixels")] + private static partial byte _GetWindowSizeInPixels(SdlWindow window, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowSizeInPixels(SdlWindow window, int* w, int* h) + { + Sdl.TraceLog.Trace(); + return _GetWindowSizeInPixels(window, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowMinimumSize")] + private static partial byte _SetWindowMinimumSize(SdlWindow window, int min_w, int min_h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowMinimumSize(SdlWindow window, int min_w, int min_h) + { + Sdl.TraceLog.Trace(); + return _SetWindowMinimumSize(window, min_w, min_h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowMinimumSize")] + private static partial byte _GetWindowMinimumSize(SdlWindow window, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowMinimumSize(SdlWindow window, int* w, int* h) + { + Sdl.TraceLog.Trace(); + return _GetWindowMinimumSize(window, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowMaximumSize")] + private static partial byte _SetWindowMaximumSize(SdlWindow window, int max_w, int max_h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowMaximumSize(SdlWindow window, int max_w, int max_h) + { + Sdl.TraceLog.Trace(); + return _SetWindowMaximumSize(window, max_w, max_h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowMaximumSize")] + private static partial byte _GetWindowMaximumSize(SdlWindow window, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowMaximumSize(SdlWindow window, int* w, int* h) + { + Sdl.TraceLog.Trace(); + return _GetWindowMaximumSize(window, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowBordered")] + private static partial byte _SetWindowBordered(SdlWindow window, byte bordered); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowBordered(SdlWindow window, byte bordered) + { + Sdl.TraceLog.Trace(); + return _SetWindowBordered(window, bordered); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowResizable")] + private static partial byte _SetWindowResizable(SdlWindow window, byte resizable); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowResizable(SdlWindow window, byte resizable) + { + Sdl.TraceLog.Trace(); + return _SetWindowResizable(window, resizable); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowAlwaysOnTop")] + private static partial byte _SetWindowAlwaysOnTop(SdlWindow window, byte on_top); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowAlwaysOnTop(SdlWindow window, byte on_top) + { + Sdl.TraceLog.Trace(); + return _SetWindowAlwaysOnTop(window, on_top); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowFillDocument")] + private static partial byte _SetWindowFillDocument(SdlWindow window, byte fill); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowFillDocument(SdlWindow window, byte fill) + { + Sdl.TraceLog.Trace(); + return _SetWindowFillDocument(window, fill); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShowWindow")] + private static partial byte _ShowWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShowWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _ShowWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HideWindow")] + private static partial byte _HideWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HideWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _HideWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RaiseWindow")] + private static partial byte _RaiseWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RaiseWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _RaiseWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MaximizeWindow")] + private static partial byte _MaximizeWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte MaximizeWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _MaximizeWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MinimizeWindow")] + private static partial byte _MinimizeWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte MinimizeWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _MinimizeWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RestoreWindow")] + private static partial byte _RestoreWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RestoreWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _RestoreWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowFullscreen")] + private static partial byte _SetWindowFullscreen(SdlWindow window, byte fullscreen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowFullscreen(SdlWindow window, byte fullscreen) + { + Sdl.TraceLog.Trace(); + return _SetWindowFullscreen(window, fullscreen); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SyncWindow")] + private static partial byte _SyncWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SyncWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _SyncWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WindowHasSurface")] + private static partial byte _WindowHasSurface(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WindowHasSurface(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _WindowHasSurface(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowSurface")] + private static partial SdlSurface* _GetWindowSurface(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* GetWindowSurface(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowSurface(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowSurfaceVSync")] + private static partial byte _SetWindowSurfaceVSync(SdlWindow window, int vsync); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowSurfaceVSync(SdlWindow window, int vsync) + { + Sdl.TraceLog.Trace(); + return _SetWindowSurfaceVSync(window, vsync); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowSurfaceVSync")] + private static partial byte _GetWindowSurfaceVSync(SdlWindow window, int* vsync); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowSurfaceVSync(SdlWindow window, int* vsync) + { + Sdl.TraceLog.Trace(); + return _GetWindowSurfaceVSync(window, vsync); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateWindowSurface")] + private static partial byte _UpdateWindowSurface(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateWindowSurface(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _UpdateWindowSurface(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateWindowSurfaceRects")] + private static partial byte _UpdateWindowSurfaceRects(SdlWindow window, SdlRect* rects, int numrects); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateWindowSurfaceRects(SdlWindow window, SdlRect* rects, int numrects) + { + Sdl.TraceLog.Trace(); + return _UpdateWindowSurfaceRects(window, rects, numrects); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyWindowSurface")] + private static partial byte _DestroyWindowSurface(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DestroyWindowSurface(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _DestroyWindowSurface(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowKeyboardGrab")] + private static partial byte _SetWindowKeyboardGrab(SdlWindow window, byte grabbed); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowKeyboardGrab(SdlWindow window, byte grabbed) + { + Sdl.TraceLog.Trace(); + return _SetWindowKeyboardGrab(window, grabbed); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowMouseGrab")] + private static partial byte _SetWindowMouseGrab(SdlWindow window, byte grabbed); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowMouseGrab(SdlWindow window, byte grabbed) + { + Sdl.TraceLog.Trace(); + return _SetWindowMouseGrab(window, grabbed); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowKeyboardGrab")] + private static partial byte _GetWindowKeyboardGrab(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowKeyboardGrab(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowKeyboardGrab(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowMouseGrab")] + private static partial byte _GetWindowMouseGrab(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowMouseGrab(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowMouseGrab(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGrabbedWindow")] + private static partial SdlWindow _GetGrabbedWindow(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetGrabbedWindow() + { + Sdl.TraceLog.Trace(); + return _GetGrabbedWindow(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowMouseRect")] + private static partial byte _SetWindowMouseRect(SdlWindow window, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowMouseRect(SdlWindow window, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _SetWindowMouseRect(window, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowMouseRect")] + private static partial SdlRect* _GetWindowMouseRect(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRect* GetWindowMouseRect(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowMouseRect(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowOpacity")] + private static partial byte _SetWindowOpacity(SdlWindow window, float opacity); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowOpacity(SdlWindow window, float opacity) + { + Sdl.TraceLog.Trace(); + return _SetWindowOpacity(window, opacity); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowOpacity")] + private static partial float _GetWindowOpacity(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetWindowOpacity(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowOpacity(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowParent")] + private static partial byte _SetWindowParent(SdlWindow window, SdlWindow parent); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowParent(SdlWindow window, SdlWindow parent) + { + Sdl.TraceLog.Trace(); + return _SetWindowParent(window, parent); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowModal")] + private static partial byte _SetWindowModal(SdlWindow window, byte modal); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowModal(SdlWindow window, byte modal) + { + Sdl.TraceLog.Trace(); + return _SetWindowModal(window, modal); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowFocusable")] + private static partial byte _SetWindowFocusable(SdlWindow window, byte focusable); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowFocusable(SdlWindow window, byte focusable) + { + Sdl.TraceLog.Trace(); + return _SetWindowFocusable(window, focusable); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShowWindowSystemMenu")] + private static partial byte _ShowWindowSystemMenu(SdlWindow window, int x, int y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShowWindowSystemMenu(SdlWindow window, int x, int y) + { + Sdl.TraceLog.Trace(); + return _ShowWindowSystemMenu(window, x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowHitTest")] + private static partial byte _SetWindowHitTest( + SdlWindow window, + delegate* unmanaged[Cdecl] callback, + void* callback_data + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowHitTest( + SdlWindow window, + delegate* unmanaged[Cdecl] callback, + void* callback_data + ) + { + Sdl.TraceLog.Trace(); + return _SetWindowHitTest(window, callback, callback_data); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowShape")] + private static partial byte _SetWindowShape(SdlWindow window, SdlSurface* shape); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowShape(SdlWindow window, SdlSurface* shape) + { + Sdl.TraceLog.Trace(); + return _SetWindowShape(window, shape); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlashWindow")] + private static partial byte _FlashWindow(SdlWindow window, SdlFlashOperation operation); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FlashWindow(SdlWindow window, SdlFlashOperation operation) + { + Sdl.TraceLog.Trace(); + return _FlashWindow(window, operation); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowProgressState")] + private static partial byte _SetWindowProgressState(SdlWindow window, SdlProgressState state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowProgressState(SdlWindow window, SdlProgressState state) + { + Sdl.TraceLog.Trace(); + return _SetWindowProgressState(window, state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowProgressState")] + private static partial SdlProgressState _GetWindowProgressState(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlProgressState GetWindowProgressState(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowProgressState(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowProgressValue")] + private static partial byte _SetWindowProgressValue(SdlWindow window, float value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowProgressValue(SdlWindow window, float value) + { + Sdl.TraceLog.Trace(); + return _SetWindowProgressValue(window, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowProgressValue")] + private static partial float _GetWindowProgressValue(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetWindowProgressValue(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowProgressValue(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyWindow")] + private static partial void _DestroyWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + _DestroyWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ScreenSaverEnabled")] + private static partial byte _ScreenSaverEnabled(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ScreenSaverEnabled() + { + Sdl.TraceLog.Trace(); + return _ScreenSaverEnabled(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EnableScreenSaver")] + private static partial byte _EnableScreenSaver(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte EnableScreenSaver() + { + Sdl.TraceLog.Trace(); + return _EnableScreenSaver(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DisableScreenSaver")] + private static partial byte _DisableScreenSaver(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DisableScreenSaver() + { + Sdl.TraceLog.Trace(); + return _DisableScreenSaver(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GL_LoadLibrary", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GLLoadLibrary(string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLLoadLibrary(string path) + { + Sdl.TraceLog.Trace(); + return _GLLoadLibrary(path); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GL_GetProcAddress", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial delegate* unmanaged[Cdecl] _GLGetProcAddress(string proc); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static delegate* unmanaged[Cdecl] GLGetProcAddress(string proc) + { + Sdl.TraceLog.Trace(); + return _GLGetProcAddress(proc); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_EGL_GetProcAddress", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial delegate* unmanaged[Cdecl] _EGLGetProcAddress(string proc); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static delegate* unmanaged[Cdecl] EGLGetProcAddress(string proc) + { + Sdl.TraceLog.Trace(); + return _EGLGetProcAddress(proc); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_UnloadLibrary")] + private static partial void _GLUnloadLibrary(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GLUnloadLibrary() + { + Sdl.TraceLog.Trace(); + _GLUnloadLibrary(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GL_ExtensionSupported", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GLExtensionSupported(string extension); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLExtensionSupported(string extension) + { + Sdl.TraceLog.Trace(); + return _GLExtensionSupported(extension); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_ResetAttributes")] + private static partial void _GLResetAttributes(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GLResetAttributes() + { + Sdl.TraceLog.Trace(); + _GLResetAttributes(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_SetAttribute")] + private static partial byte _GLSetAttribute(SdlGLAttr attr, int value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLSetAttribute(SdlGLAttr attr, int value) + { + Sdl.TraceLog.Trace(); + return _GLSetAttribute(attr, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_GetAttribute")] + private static partial byte _GLGetAttribute(SdlGLAttr attr, int* value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLGetAttribute(SdlGLAttr attr, int* value) + { + Sdl.TraceLog.Trace(); + return _GLGetAttribute(attr, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_CreateContext")] + private static partial nint _GLCreateContext(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GLCreateContext(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GLCreateContext(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_MakeCurrent")] + private static partial byte _GLMakeCurrent(SdlWindow window, nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLMakeCurrent(SdlWindow window, nint context) + { + Sdl.TraceLog.Trace(); + return _GLMakeCurrent(window, context); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_GetCurrentWindow")] + private static partial SdlWindow _GLGetCurrentWindow(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GLGetCurrentWindow() + { + Sdl.TraceLog.Trace(); + return _GLGetCurrentWindow(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_GetCurrentContext")] + private static partial nint _GLGetCurrentContext(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GLGetCurrentContext() + { + Sdl.TraceLog.Trace(); + return _GLGetCurrentContext(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EGL_GetCurrentDisplay")] + private static partial void* _EGLGetCurrentDisplay(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* EGLGetCurrentDisplay() + { + Sdl.TraceLog.Trace(); + return _EGLGetCurrentDisplay(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EGL_GetCurrentConfig")] + private static partial void* _EGLGetCurrentConfig(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* EGLGetCurrentConfig() + { + Sdl.TraceLog.Trace(); + return _EGLGetCurrentConfig(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EGL_GetWindowSurface")] + private static partial void* _EGLGetWindowSurface(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* EGLGetWindowSurface(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _EGLGetWindowSurface(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EGL_SetAttributeCallbacks")] + private static partial void _EGLSetAttributeCallbacks( + delegate* unmanaged[Cdecl] platformAttribCallback, + delegate* unmanaged[Cdecl] surfaceAttribCallback, + delegate* unmanaged[Cdecl] contextAttribCallback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EGLSetAttributeCallbacks( + delegate* unmanaged[Cdecl] platformAttribCallback, + delegate* unmanaged[Cdecl] surfaceAttribCallback, + delegate* unmanaged[Cdecl] contextAttribCallback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _EGLSetAttributeCallbacks( + platformAttribCallback, + surfaceAttribCallback, + contextAttribCallback, + userdata + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_SetSwapInterval")] + private static partial byte _GLSetSwapInterval(int interval); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLSetSwapInterval(int interval) + { + Sdl.TraceLog.Trace(); + return _GLSetSwapInterval(interval); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_GetSwapInterval")] + private static partial byte _GLGetSwapInterval(int* interval); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLGetSwapInterval(int* interval) + { + Sdl.TraceLog.Trace(); + return _GLGetSwapInterval(interval); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_SwapWindow")] + private static partial byte _GLSwapWindow(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLSwapWindow(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GLSwapWindow(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GL_DestroyContext")] + private static partial byte _GLDestroyContext(nint context); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GLDestroyContext(nint context) + { + Sdl.TraceLog.Trace(); + return _GLDestroyContext(context); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ShowOpenFileDialog", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _ShowOpenFileDialog( + delegate* unmanaged[Cdecl] callback, + void* userdata, + SdlWindow window, + SdlDialogFileFilter* filters, + int nfilters, + string default_location, + byte allow_many + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ShowOpenFileDialog( + delegate* unmanaged[Cdecl] callback, + void* userdata, + SdlWindow window, + SdlDialogFileFilter* filters, + int nfilters, + string default_location, + byte allow_many + ) + { + Sdl.TraceLog.Trace(); + _ShowOpenFileDialog(callback, userdata, window, filters, nfilters, default_location, allow_many); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ShowSaveFileDialog", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _ShowSaveFileDialog( + delegate* unmanaged[Cdecl] callback, + void* userdata, + SdlWindow window, + SdlDialogFileFilter* filters, + int nfilters, + string default_location + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ShowSaveFileDialog( + delegate* unmanaged[Cdecl] callback, + void* userdata, + SdlWindow window, + SdlDialogFileFilter* filters, + int nfilters, + string default_location + ) + { + Sdl.TraceLog.Trace(); + _ShowSaveFileDialog(callback, userdata, window, filters, nfilters, default_location); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ShowOpenFolderDialog", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _ShowOpenFolderDialog( + delegate* unmanaged[Cdecl] callback, + void* userdata, + SdlWindow window, + string default_location, + byte allow_many + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ShowOpenFolderDialog( + delegate* unmanaged[Cdecl] callback, + void* userdata, + SdlWindow window, + string default_location, + byte allow_many + ) + { + Sdl.TraceLog.Trace(); + _ShowOpenFolderDialog(callback, userdata, window, default_location, allow_many); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShowFileDialogWithProperties")] + private static partial void _ShowFileDialogWithProperties( + SdlFileDialogType type, + delegate* unmanaged[Cdecl] callback, + void* userdata, + uint props + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ShowFileDialogWithProperties( + SdlFileDialogType type, + delegate* unmanaged[Cdecl] callback, + void* userdata, + uint props + ) + { + Sdl.TraceLog.Trace(); + _ShowFileDialogWithProperties(type, callback, userdata, props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GUIDToString")] + private static partial void _GuidToString(SdlGuid guid, byte* pszGUID, int cbGUID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GuidToString(SdlGuid guid, byte* pszGUID, int cbGUID) + { + Sdl.TraceLog.Trace(); + _GuidToString(guid, pszGUID, cbGUID); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_StringToGUID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlGuid _StringToGuid(string pchGUID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGuid StringToGuid(string pchGUID) + { + Sdl.TraceLog.Trace(); + return _StringToGuid(pchGUID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPowerInfo")] + private static partial SdlPowerState _GetPowerInfo(int* seconds, int* percent); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPowerState GetPowerInfo(int* seconds, int* percent) + { + Sdl.TraceLog.Trace(); + return _GetPowerInfo(seconds, percent); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensors")] + private static partial uint* _GetSensors(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetSensors(int* count) + { + Sdl.TraceLog.Trace(); + return _GetSensors(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetSensorNameForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetSensorNameForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetSensorNameForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetSensorNameForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorTypeForID")] + private static partial SdlSensorType _GetSensorTypeForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSensorType GetSensorTypeForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetSensorTypeForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorNonPortableTypeForID")] + private static partial int _GetSensorNonPortableTypeForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetSensorNonPortableTypeForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetSensorNonPortableTypeForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenSensor")] + private static partial nint _OpenSensor(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenSensor(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _OpenSensor(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorFromID")] + private static partial nint _GetSensorFromID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetSensorFromID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetSensorFromID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorProperties")] + private static partial uint _GetSensorProperties(nint sensor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetSensorProperties(nint sensor) + { + Sdl.TraceLog.Trace(); + return _GetSensorProperties(sensor); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetSensorName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetSensorName(nint sensor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetSensorName(nint sensor) + { + Sdl.TraceLog.Trace(); + return _GetSensorName(sensor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorType")] + private static partial SdlSensorType _GetSensorType(nint sensor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSensorType GetSensorType(nint sensor) + { + Sdl.TraceLog.Trace(); + return _GetSensorType(sensor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorNonPortableType")] + private static partial int _GetSensorNonPortableType(nint sensor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetSensorNonPortableType(nint sensor) + { + Sdl.TraceLog.Trace(); + return _GetSensorNonPortableType(sensor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorID")] + private static partial uint _GetSensorID(nint sensor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetSensorID(nint sensor) + { + Sdl.TraceLog.Trace(); + return _GetSensorID(sensor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSensorData")] + private static partial byte _GetSensorData(nint sensor, float* data, int num_values); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetSensorData(nint sensor, float* data, int num_values) + { + Sdl.TraceLog.Trace(); + return _GetSensorData(sensor, data, num_values); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseSensor")] + private static partial void _CloseSensor(nint sensor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseSensor(nint sensor) + { + Sdl.TraceLog.Trace(); + _CloseSensor(sensor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateSensors")] + private static partial void _UpdateSensors(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UpdateSensors() + { + Sdl.TraceLog.Trace(); + _UpdateSensors(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockJoysticks")] + private static partial void _LockJoysticks(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LockJoysticks() + { + Sdl.TraceLog.Trace(); + _LockJoysticks(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockJoysticks")] + private static partial void _UnlockJoysticks(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockJoysticks() + { + Sdl.TraceLog.Trace(); + _UnlockJoysticks(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasJoystick")] + private static partial byte _HasJoystick(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasJoystick() + { + Sdl.TraceLog.Trace(); + return _HasJoystick(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoysticks")] + private static partial uint* _GetJoysticks(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetJoysticks(int* count) + { + Sdl.TraceLog.Trace(); + return _GetJoysticks(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetJoystickNameForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickNameForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickNameForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickNameForID(instance_id); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetJoystickPathForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickPathForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickPathForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickPathForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickPlayerIndexForID")] + private static partial int _GetJoystickPlayerIndexForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetJoystickPlayerIndexForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickPlayerIndexForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickGUIDForID")] + private static partial SdlGuid _GetJoystickGuidForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGuid GetJoystickGuidForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickGuidForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickVendorForID")] + private static partial ushort _GetJoystickVendorForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickVendorForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickVendorForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProductForID")] + private static partial ushort _GetJoystickProductForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickProductForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickProductForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProductVersionForID")] + private static partial ushort _GetJoystickProductVersionForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickProductVersionForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickProductVersionForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickTypeForID")] + private static partial SdlJoystickType _GetJoystickTypeForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystickType GetJoystickTypeForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickTypeForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenJoystick")] + private static partial SdlJoystick _OpenJoystick(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystick OpenJoystick(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _OpenJoystick(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickFromID")] + private static partial SdlJoystick _GetJoystickFromID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystick GetJoystickFromID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetJoystickFromID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickFromPlayerIndex")] + private static partial SdlJoystick _GetJoystickFromPlayerIndex(int player_index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystick GetJoystickFromPlayerIndex(int player_index) + { + Sdl.TraceLog.Trace(); + return _GetJoystickFromPlayerIndex(player_index); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AttachVirtualJoystick")] + private static partial uint _AttachVirtualJoystick(SdlVirtualJoystickDesc* desc); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint AttachVirtualJoystick(SdlVirtualJoystickDesc* desc) + { + Sdl.TraceLog.Trace(); + return _AttachVirtualJoystick(desc); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DetachVirtualJoystick")] + private static partial byte _DetachVirtualJoystick(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DetachVirtualJoystick(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _DetachVirtualJoystick(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsJoystickVirtual")] + private static partial byte _IsJoystickVirtual(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsJoystickVirtual(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _IsJoystickVirtual(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualAxis")] + private static partial byte _SetJoystickVirtualAxis(SdlJoystick joystick, int axis, short value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickVirtualAxis(SdlJoystick joystick, int axis, short value) + { + Sdl.TraceLog.Trace(); + return _SetJoystickVirtualAxis(joystick, axis, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualBall")] + private static partial byte _SetJoystickVirtualBall(SdlJoystick joystick, int ball, short xrel, short yrel); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickVirtualBall(SdlJoystick joystick, int ball, short xrel, short yrel) + { + Sdl.TraceLog.Trace(); + return _SetJoystickVirtualBall(joystick, ball, xrel, yrel); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualButton")] + private static partial byte _SetJoystickVirtualButton(SdlJoystick joystick, int button, byte down); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickVirtualButton(SdlJoystick joystick, int button, byte down) + { + Sdl.TraceLog.Trace(); + return _SetJoystickVirtualButton(joystick, button, down); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualHat")] + private static partial byte _SetJoystickVirtualHat(SdlJoystick joystick, int hat, byte value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickVirtualHat(SdlJoystick joystick, int hat, byte value) + { + Sdl.TraceLog.Trace(); + return _SetJoystickVirtualHat(joystick, hat, value); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickVirtualTouchpad")] + private static partial byte _SetJoystickVirtualTouchpad( + SdlJoystick joystick, + int touchpad, + int finger, + byte down, + float x, + float y, + float pressure + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickVirtualTouchpad( + SdlJoystick joystick, + int touchpad, + int finger, + byte down, + float x, + float y, + float pressure + ) + { + Sdl.TraceLog.Trace(); + return _SetJoystickVirtualTouchpad(joystick, touchpad, finger, down, x, y, pressure); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SendJoystickVirtualSensorData")] + private static partial byte _SendJoystickVirtualSensorData( + SdlJoystick joystick, + SdlSensorType type, + ulong sensor_timestamp, + float* data, + int num_values + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SendJoystickVirtualSensorData( + SdlJoystick joystick, + SdlSensorType type, + ulong sensor_timestamp, + float* data, + int num_values + ) + { + Sdl.TraceLog.Trace(); + return _SendJoystickVirtualSensorData(joystick, type, sensor_timestamp, data, num_values); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProperties")] + private static partial uint _GetJoystickProperties(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetJoystickProperties(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickProperties(joystick); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetJoystickName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickName(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickName(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickName(joystick); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetJoystickPath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickPath(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickPath(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickPath(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickPlayerIndex")] + private static partial int _GetJoystickPlayerIndex(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetJoystickPlayerIndex(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickPlayerIndex(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickPlayerIndex")] + private static partial byte _SetJoystickPlayerIndex(SdlJoystick joystick, int player_index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickPlayerIndex(SdlJoystick joystick, int player_index) + { + Sdl.TraceLog.Trace(); + return _SetJoystickPlayerIndex(joystick, player_index); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickGUID")] + private static partial SdlGuid _GetJoystickGuid(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGuid GetJoystickGuid(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickGuid(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickVendor")] + private static partial ushort _GetJoystickVendor(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickVendor(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickVendor(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProduct")] + private static partial ushort _GetJoystickProduct(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickProduct(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickProduct(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickProductVersion")] + private static partial ushort _GetJoystickProductVersion(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickProductVersion(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickProductVersion(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickFirmwareVersion")] + private static partial ushort _GetJoystickFirmwareVersion(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetJoystickFirmwareVersion(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickFirmwareVersion(joystick); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetJoystickSerial", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetJoystickSerial(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetJoystickSerial(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickSerial(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickType")] + private static partial SdlJoystickType _GetJoystickType(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystickType GetJoystickType(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickType(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickGUIDInfo")] + private static partial void _GetJoystickGuidInfo( + SdlGuid guid, + ushort* vendor, + ushort* product, + ushort* version, + ushort* crc16 + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetJoystickGuidInfo( + SdlGuid guid, + ushort* vendor, + ushort* product, + ushort* version, + ushort* crc16 + ) + { + Sdl.TraceLog.Trace(); + _GetJoystickGuidInfo(guid, vendor, product, version, crc16); + } + + [LibraryImport(Dll, EntryPoint = "SDL_JoystickConnected")] + private static partial byte _JoystickConnected(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte JoystickConnected(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _JoystickConnected(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickID")] + private static partial uint _GetJoystickID(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetJoystickID(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickID(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickAxes")] + private static partial int _GetNumJoystickAxes(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumJoystickAxes(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetNumJoystickAxes(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickBalls")] + private static partial int _GetNumJoystickBalls(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumJoystickBalls(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetNumJoystickBalls(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickHats")] + private static partial int _GetNumJoystickHats(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumJoystickHats(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetNumJoystickHats(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumJoystickButtons")] + private static partial int _GetNumJoystickButtons(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumJoystickButtons(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetNumJoystickButtons(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickEventsEnabled")] + private static partial void _SetJoystickEventsEnabled(byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetJoystickEventsEnabled(byte enabled) + { + Sdl.TraceLog.Trace(); + _SetJoystickEventsEnabled(enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_JoystickEventsEnabled")] + private static partial byte _JoystickEventsEnabled(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte JoystickEventsEnabled() + { + Sdl.TraceLog.Trace(); + return _JoystickEventsEnabled(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateJoysticks")] + private static partial void _UpdateJoysticks(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UpdateJoysticks() + { + Sdl.TraceLog.Trace(); + _UpdateJoysticks(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickAxis")] + private static partial short _GetJoystickAxis(SdlJoystick joystick, int axis); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short GetJoystickAxis(SdlJoystick joystick, int axis) + { + Sdl.TraceLog.Trace(); + return _GetJoystickAxis(joystick, axis); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickAxisInitialState")] + private static partial byte _GetJoystickAxisInitialState(SdlJoystick joystick, int axis, short* state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetJoystickAxisInitialState(SdlJoystick joystick, int axis, short* state) + { + Sdl.TraceLog.Trace(); + return _GetJoystickAxisInitialState(joystick, axis, state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickBall")] + private static partial byte _GetJoystickBall(SdlJoystick joystick, int ball, int* dx, int* dy); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetJoystickBall(SdlJoystick joystick, int ball, int* dx, int* dy) + { + Sdl.TraceLog.Trace(); + return _GetJoystickBall(joystick, ball, dx, dy); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickHat")] + private static partial byte _GetJoystickHat(SdlJoystick joystick, int hat); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetJoystickHat(SdlJoystick joystick, int hat) + { + Sdl.TraceLog.Trace(); + return _GetJoystickHat(joystick, hat); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickButton")] + private static partial byte _GetJoystickButton(SdlJoystick joystick, int button); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetJoystickButton(SdlJoystick joystick, int button) + { + Sdl.TraceLog.Trace(); + return _GetJoystickButton(joystick, button); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RumbleJoystick")] + private static partial byte _RumbleJoystick( + SdlJoystick joystick, + ushort low_frequency_rumble, + ushort high_frequency_rumble, + uint duration_ms + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RumbleJoystick( + SdlJoystick joystick, + ushort low_frequency_rumble, + ushort high_frequency_rumble, + uint duration_ms + ) + { + Sdl.TraceLog.Trace(); + return _RumbleJoystick(joystick, low_frequency_rumble, high_frequency_rumble, duration_ms); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RumbleJoystickTriggers")] + private static partial byte _RumbleJoystickTriggers( + SdlJoystick joystick, + ushort left_rumble, + ushort right_rumble, + uint duration_ms + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RumbleJoystickTriggers( + SdlJoystick joystick, + ushort left_rumble, + ushort right_rumble, + uint duration_ms + ) + { + Sdl.TraceLog.Trace(); + return _RumbleJoystickTriggers(joystick, left_rumble, right_rumble, duration_ms); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetJoystickLED")] + private static partial byte _SetJoystickLED(SdlJoystick joystick, byte red, byte green, byte blue); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetJoystickLED(SdlJoystick joystick, byte red, byte green, byte blue) + { + Sdl.TraceLog.Trace(); + return _SetJoystickLED(joystick, red, green, blue); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SendJoystickEffect")] + private static partial byte _SendJoystickEffect(SdlJoystick joystick, void* data, int size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SendJoystickEffect(SdlJoystick joystick, void* data, int size) + { + Sdl.TraceLog.Trace(); + return _SendJoystickEffect(joystick, data, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseJoystick")] + private static partial void _CloseJoystick(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseJoystick(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + _CloseJoystick(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickConnectionState")] + private static partial SdlJoystickConnectionState _GetJoystickConnectionState(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystickConnectionState GetJoystickConnectionState(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _GetJoystickConnectionState(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetJoystickPowerInfo")] + private static partial SdlPowerState _GetJoystickPowerInfo(SdlJoystick joystick, int* percent); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPowerState GetJoystickPowerInfo(SdlJoystick joystick, int* percent) + { + Sdl.TraceLog.Trace(); + return _GetJoystickPowerInfo(joystick, percent); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_AddGamepadMapping", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _AddGamepadMapping(string mapping); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int AddGamepadMapping(string mapping) + { + Sdl.TraceLog.Trace(); + return _AddGamepadMapping(mapping); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddGamepadMappingsFromIO")] + private static partial int _AddGamepadMappingsFromIO(nint src, byte closeio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int AddGamepadMappingsFromIO(nint src, byte closeio) + { + Sdl.TraceLog.Trace(); + return _AddGamepadMappingsFromIO(src, closeio); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_AddGamepadMappingsFromFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial int _AddGamepadMappingsFromFile(string file); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int AddGamepadMappingsFromFile(string file) + { + Sdl.TraceLog.Trace(); + return _AddGamepadMappingsFromFile(file); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReloadGamepadMappings")] + private static partial byte _ReloadGamepadMappings(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReloadGamepadMappings() + { + Sdl.TraceLog.Trace(); + return _ReloadGamepadMappings(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMappings")] + private static partial byte** _GetGamepadMappings(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GetGamepadMappings(int* count) + { + Sdl.TraceLog.Trace(); + return _GetGamepadMappings(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMappingForGUID")] + private static partial byte* _GetGamepadMappingForGuid(SdlGuid guid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetGamepadMappingForGuid(SdlGuid guid) + { + Sdl.TraceLog.Trace(); + return _GetGamepadMappingForGuid(guid); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMapping")] + private static partial byte* _GetGamepadMapping(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetGamepadMapping(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadMapping(gamepad); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetGamepadMapping", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetGamepadMapping(uint instance_id, string mapping); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGamepadMapping(uint instance_id, string mapping) + { + Sdl.TraceLog.Trace(); + return _SetGamepadMapping(instance_id, mapping); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasGamepad")] + private static partial byte _HasGamepad(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasGamepad() + { + Sdl.TraceLog.Trace(); + return _HasGamepad(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepads")] + private static partial uint* _GetGamepads(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetGamepads(int* count) + { + Sdl.TraceLog.Trace(); + return _GetGamepads(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsGamepad")] + private static partial byte _IsGamepad(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsGamepad(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _IsGamepad(instance_id); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadNameForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadNameForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadNameForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadNameForID(instance_id); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadPathForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadPathForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadPathForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadPathForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadPlayerIndexForID")] + private static partial int _GetGamepadPlayerIndexForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetGamepadPlayerIndexForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadPlayerIndexForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadGUIDForID")] + private static partial SdlGuid _GetGamepadGuidForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGuid GetGamepadGuidForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadGuidForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadVendorForID")] + private static partial ushort _GetGamepadVendorForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadVendorForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadVendorForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProductForID")] + private static partial ushort _GetGamepadProductForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadProductForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadProductForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProductVersionForID")] + private static partial ushort _GetGamepadProductVersionForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadProductVersionForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadProductVersionForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadTypeForID")] + private static partial SdlGamepadType _GetGamepadTypeForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadType GetGamepadTypeForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadTypeForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRealGamepadTypeForID")] + private static partial SdlGamepadType _GetRealGamepadTypeForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadType GetRealGamepadTypeForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetRealGamepadTypeForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadMappingForID")] + private static partial byte* _GetGamepadMappingForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetGamepadMappingForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadMappingForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenGamepad")] + private static partial SdlGamepad _OpenGamepad(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepad OpenGamepad(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _OpenGamepad(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadFromID")] + private static partial SdlGamepad _GetGamepadFromID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepad GetGamepadFromID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetGamepadFromID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadFromPlayerIndex")] + private static partial SdlGamepad _GetGamepadFromPlayerIndex(int player_index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepad GetGamepadFromPlayerIndex(int player_index) + { + Sdl.TraceLog.Trace(); + return _GetGamepadFromPlayerIndex(player_index); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProperties")] + private static partial uint _GetGamepadProperties(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGamepadProperties(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadProperties(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadID")] + private static partial uint _GetGamepadID(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGamepadID(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadID(gamepad); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadName(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadName(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadName(gamepad); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadPath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadPath(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadPath(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadPath(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadType")] + private static partial SdlGamepadType _GetGamepadType(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadType GetGamepadType(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadType(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRealGamepadType")] + private static partial SdlGamepadType _GetRealGamepadType(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadType GetRealGamepadType(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetRealGamepadType(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadPlayerIndex")] + private static partial int _GetGamepadPlayerIndex(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetGamepadPlayerIndex(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadPlayerIndex(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGamepadPlayerIndex")] + private static partial byte _SetGamepadPlayerIndex(SdlGamepad gamepad, int player_index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGamepadPlayerIndex(SdlGamepad gamepad, int player_index) + { + Sdl.TraceLog.Trace(); + return _SetGamepadPlayerIndex(gamepad, player_index); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadVendor")] + private static partial ushort _GetGamepadVendor(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadVendor(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadVendor(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProduct")] + private static partial ushort _GetGamepadProduct(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadProduct(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadProduct(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadProductVersion")] + private static partial ushort _GetGamepadProductVersion(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadProductVersion(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadProductVersion(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadFirmwareVersion")] + private static partial ushort _GetGamepadFirmwareVersion(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetGamepadFirmwareVersion(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadFirmwareVersion(gamepad); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadSerial", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadSerial(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadSerial(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadSerial(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadSteamHandle")] + private static partial ulong _GetGamepadSteamHandle(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetGamepadSteamHandle(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadSteamHandle(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadConnectionState")] + private static partial SdlJoystickConnectionState _GetGamepadConnectionState(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystickConnectionState GetGamepadConnectionState(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadConnectionState(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadPowerInfo")] + private static partial SdlPowerState _GetGamepadPowerInfo(SdlGamepad gamepad, int* percent); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPowerState GetGamepadPowerInfo(SdlGamepad gamepad, int* percent) + { + Sdl.TraceLog.Trace(); + return _GetGamepadPowerInfo(gamepad, percent); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GamepadConnected")] + private static partial byte _GamepadConnected(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GamepadConnected(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GamepadConnected(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadJoystick")] + private static partial SdlJoystick _GetGamepadJoystick(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlJoystick GetGamepadJoystick(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetGamepadJoystick(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGamepadEventsEnabled")] + private static partial void _SetGamepadEventsEnabled(byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGamepadEventsEnabled(byte enabled) + { + Sdl.TraceLog.Trace(); + _SetGamepadEventsEnabled(enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GamepadEventsEnabled")] + private static partial byte _GamepadEventsEnabled(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GamepadEventsEnabled() + { + Sdl.TraceLog.Trace(); + return _GamepadEventsEnabled(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadBindings")] + private static partial nint* _GetGamepadBindings(SdlGamepad gamepad, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint* GetGamepadBindings(SdlGamepad gamepad, int* count) + { + Sdl.TraceLog.Trace(); + return _GetGamepadBindings(gamepad, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateGamepads")] + private static partial void _UpdateGamepads(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UpdateGamepads() + { + Sdl.TraceLog.Trace(); + _UpdateGamepads(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadTypeFromString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlGamepadType _GetGamepadTypeFromString(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadType GetGamepadTypeFromString(string str) + { + Sdl.TraceLog.Trace(); + return _GetGamepadTypeFromString(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadStringForType", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadStringForType(SdlGamepadType type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadStringForType(SdlGamepadType type) + { + Sdl.TraceLog.Trace(); + return _GetGamepadStringForType(type); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadAxisFromString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlGamepadAxis _GetGamepadAxisFromString(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadAxis GetGamepadAxisFromString(string str) + { + Sdl.TraceLog.Trace(); + return _GetGamepadAxisFromString(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadStringForAxis", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadStringForAxis(SdlGamepadAxis axis); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadStringForAxis(SdlGamepadAxis axis) + { + Sdl.TraceLog.Trace(); + return _GetGamepadStringForAxis(axis); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GamepadHasAxis")] + private static partial byte _GamepadHasAxis(SdlGamepad gamepad, SdlGamepadAxis axis); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GamepadHasAxis(SdlGamepad gamepad, SdlGamepadAxis axis) + { + Sdl.TraceLog.Trace(); + return _GamepadHasAxis(gamepad, axis); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadAxis")] + private static partial short _GetGamepadAxis(SdlGamepad gamepad, SdlGamepadAxis axis); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short GetGamepadAxis(SdlGamepad gamepad, SdlGamepadAxis axis) + { + Sdl.TraceLog.Trace(); + return _GetGamepadAxis(gamepad, axis); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadButtonFromString", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlGamepadButton _GetGamepadButtonFromString(string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadButton GetGamepadButtonFromString(string str) + { + Sdl.TraceLog.Trace(); + return _GetGamepadButtonFromString(str); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadStringForButton", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadStringForButton(SdlGamepadButton button); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadStringForButton(SdlGamepadButton button) + { + Sdl.TraceLog.Trace(); + return _GetGamepadStringForButton(button); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GamepadHasButton")] + private static partial byte _GamepadHasButton(SdlGamepad gamepad, SdlGamepadButton button); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GamepadHasButton(SdlGamepad gamepad, SdlGamepadButton button) + { + Sdl.TraceLog.Trace(); + return _GamepadHasButton(gamepad, button); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadButton")] + private static partial byte _GetGamepadButton(SdlGamepad gamepad, SdlGamepadButton button); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetGamepadButton(SdlGamepad gamepad, SdlGamepadButton button) + { + Sdl.TraceLog.Trace(); + return _GetGamepadButton(gamepad, button); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadButtonLabelForType")] + private static partial SdlGamepadButtonLabel _GetGamepadButtonLabelForType( + SdlGamepadType type, + SdlGamepadButton button + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadButtonLabel GetGamepadButtonLabelForType( + SdlGamepadType type, + SdlGamepadButton button + ) + { + Sdl.TraceLog.Trace(); + return _GetGamepadButtonLabelForType(type, button); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadButtonLabel")] + private static partial SdlGamepadButtonLabel _GetGamepadButtonLabel( + SdlGamepad gamepad, + SdlGamepadButton button + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGamepadButtonLabel GetGamepadButtonLabel(SdlGamepad gamepad, SdlGamepadButton button) + { + Sdl.TraceLog.Trace(); + return _GetGamepadButtonLabel(gamepad, button); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumGamepadTouchpads")] + private static partial int _GetNumGamepadTouchpads(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumGamepadTouchpads(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + return _GetNumGamepadTouchpads(gamepad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumGamepadTouchpadFingers")] + private static partial int _GetNumGamepadTouchpadFingers(SdlGamepad gamepad, int touchpad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumGamepadTouchpadFingers(SdlGamepad gamepad, int touchpad) + { + Sdl.TraceLog.Trace(); + return _GetNumGamepadTouchpadFingers(gamepad, touchpad); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadTouchpadFinger")] + private static partial byte _GetGamepadTouchpadFinger( + SdlGamepad gamepad, + int touchpad, + int finger, + byte* down, + float* x, + float* y, + float* pressure + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetGamepadTouchpadFinger( + SdlGamepad gamepad, + int touchpad, + int finger, + byte* down, + float* x, + float* y, + float* pressure + ) + { + Sdl.TraceLog.Trace(); + return _GetGamepadTouchpadFinger(gamepad, touchpad, finger, down, x, y, pressure); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GamepadHasSensor")] + private static partial byte _GamepadHasSensor(SdlGamepad gamepad, SdlSensorType type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GamepadHasSensor(SdlGamepad gamepad, SdlSensorType type) + { + Sdl.TraceLog.Trace(); + return _GamepadHasSensor(gamepad, type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGamepadSensorEnabled")] + private static partial byte _SetGamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type, byte enabled) + { + Sdl.TraceLog.Trace(); + return _SetGamepadSensorEnabled(gamepad, type, enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GamepadSensorEnabled")] + private static partial byte _GamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GamepadSensorEnabled(SdlGamepad gamepad, SdlSensorType type) + { + Sdl.TraceLog.Trace(); + return _GamepadSensorEnabled(gamepad, type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadSensorDataRate")] + private static partial float _GetGamepadSensorDataRate(SdlGamepad gamepad, SdlSensorType type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float GetGamepadSensorDataRate(SdlGamepad gamepad, SdlSensorType type) + { + Sdl.TraceLog.Trace(); + return _GetGamepadSensorDataRate(gamepad, type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGamepadSensorData")] + private static partial byte _GetGamepadSensorData( + SdlGamepad gamepad, + SdlSensorType type, + float* data, + int num_values + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetGamepadSensorData(SdlGamepad gamepad, SdlSensorType type, float* data, int num_values) + { + Sdl.TraceLog.Trace(); + return _GetGamepadSensorData(gamepad, type, data, num_values); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RumbleGamepad")] + private static partial byte _RumbleGamepad( + SdlGamepad gamepad, + ushort low_frequency_rumble, + ushort high_frequency_rumble, + uint duration_ms + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RumbleGamepad( + SdlGamepad gamepad, + ushort low_frequency_rumble, + ushort high_frequency_rumble, + uint duration_ms + ) + { + Sdl.TraceLog.Trace(); + return _RumbleGamepad(gamepad, low_frequency_rumble, high_frequency_rumble, duration_ms); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RumbleGamepadTriggers")] + private static partial byte _RumbleGamepadTriggers( + SdlGamepad gamepad, + ushort left_rumble, + ushort right_rumble, + uint duration_ms + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RumbleGamepadTriggers( + SdlGamepad gamepad, + ushort left_rumble, + ushort right_rumble, + uint duration_ms + ) + { + Sdl.TraceLog.Trace(); + return _RumbleGamepadTriggers(gamepad, left_rumble, right_rumble, duration_ms); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGamepadLED")] + private static partial byte _SetGamepadLED(SdlGamepad gamepad, byte red, byte green, byte blue); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGamepadLED(SdlGamepad gamepad, byte red, byte green, byte blue) + { + Sdl.TraceLog.Trace(); + return _SetGamepadLED(gamepad, red, green, blue); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SendGamepadEffect")] + private static partial byte _SendGamepadEffect(SdlGamepad gamepad, void* data, int size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SendGamepadEffect(SdlGamepad gamepad, void* data, int size) + { + Sdl.TraceLog.Trace(); + return _SendGamepadEffect(gamepad, data, size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseGamepad")] + private static partial void _CloseGamepad(SdlGamepad gamepad); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseGamepad(SdlGamepad gamepad) + { + Sdl.TraceLog.Trace(); + _CloseGamepad(gamepad); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadAppleSFSymbolsNameForButton", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadAppleSFSymbolsNameForButton( + SdlGamepad gamepad, + SdlGamepadButton button + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadAppleSFSymbolsNameForButton(SdlGamepad gamepad, SdlGamepadButton button) + { + Sdl.TraceLog.Trace(); + return _GetGamepadAppleSFSymbolsNameForButton(gamepad, button); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGamepadAppleSFSymbolsNameForAxis", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGamepadAppleSFSymbolsNameForAxis( + SdlGamepad gamepad, + SdlGamepadAxis axis + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGamepadAppleSFSymbolsNameForAxis(SdlGamepad gamepad, SdlGamepadAxis axis) + { + Sdl.TraceLog.Trace(); + return _GetGamepadAppleSFSymbolsNameForAxis(gamepad, axis); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasKeyboard")] + private static partial byte _HasKeyboard(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasKeyboard() + { + Sdl.TraceLog.Trace(); + return _HasKeyboard(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetKeyboards")] + private static partial uint* _GetKeyboards(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetKeyboards(int* count) + { + Sdl.TraceLog.Trace(); + return _GetKeyboards(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetKeyboardNameForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetKeyboardNameForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetKeyboardNameForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetKeyboardNameForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetKeyboardFocus")] + private static partial SdlWindow _GetKeyboardFocus(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetKeyboardFocus() + { + Sdl.TraceLog.Trace(); + return _GetKeyboardFocus(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetKeyboardState")] + private static partial byte* _GetKeyboardState(int* numkeys); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetKeyboardState(int* numkeys) + { + Sdl.TraceLog.Trace(); + return _GetKeyboardState(numkeys); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResetKeyboard")] + private static partial void _ResetKeyboard(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetKeyboard() + { + Sdl.TraceLog.Trace(); + _ResetKeyboard(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetModState")] + private static partial ushort _GetModState(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort GetModState() + { + Sdl.TraceLog.Trace(); + return _GetModState(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetModState")] + private static partial void _SetModState(ushort modstate); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetModState(ushort modstate) + { + Sdl.TraceLog.Trace(); + _SetModState(modstate); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetKeyFromScancode")] + private static partial SdlKeycode _GetKeyFromScancode( + SdlScancode scancode, + ushort modstate, + byte key_event + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlKeycode GetKeyFromScancode(SdlScancode scancode, ushort modstate, byte key_event) + { + Sdl.TraceLog.Trace(); + return _GetKeyFromScancode(scancode, modstate, key_event); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetScancodeFromKey")] + private static partial SdlScancode _GetScancodeFromKey(SdlKeycode key, ushort* modstate); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlScancode GetScancodeFromKey(SdlKeycode key, ushort* modstate) + { + Sdl.TraceLog.Trace(); + return _GetScancodeFromKey(key, modstate); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetScancodeName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetScancodeName(SdlScancode scancode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetScancodeName(SdlScancode scancode) + { + Sdl.TraceLog.Trace(); + return _GetScancodeName(scancode); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetScancodeFromName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlScancode _GetScancodeFromName(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlScancode GetScancodeFromName(string name) + { + Sdl.TraceLog.Trace(); + return _GetScancodeFromName(name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetKeyName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetKeyName(SdlKeycode key); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetKeyName(SdlKeycode key) + { + Sdl.TraceLog.Trace(); + return _GetKeyName(key); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetKeyFromName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlKeycode _GetKeyFromName(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlKeycode GetKeyFromName(string name) + { + Sdl.TraceLog.Trace(); + return _GetKeyFromName(name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StartTextInput")] + private static partial byte _StartTextInput(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StartTextInput(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _StartTextInput(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StartTextInputWithProperties")] + private static partial byte _StartTextInputWithProperties(SdlWindow window, uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StartTextInputWithProperties(SdlWindow window, uint props) + { + Sdl.TraceLog.Trace(); + return _StartTextInputWithProperties(window, props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TextInputActive")] + private static partial byte _TextInputActive(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TextInputActive(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _TextInputActive(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StopTextInput")] + private static partial byte _StopTextInput(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopTextInput(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _StopTextInput(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClearComposition")] + private static partial byte _ClearComposition(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClearComposition(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _ClearComposition(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextInputArea")] + private static partial byte _SetTextInputArea(SdlWindow window, SdlRect* rect, int cursor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextInputArea(SdlWindow window, SdlRect* rect, int cursor) + { + Sdl.TraceLog.Trace(); + return _SetTextInputArea(window, rect, cursor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextInputArea")] + private static partial byte _GetTextInputArea(SdlWindow window, SdlRect* rect, int* cursor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextInputArea(SdlWindow window, SdlRect* rect, int* cursor) + { + Sdl.TraceLog.Trace(); + return _GetTextInputArea(window, rect, cursor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasScreenKeyboardSupport")] + private static partial byte _HasScreenKeyboardSupport(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasScreenKeyboardSupport() + { + Sdl.TraceLog.Trace(); + return _HasScreenKeyboardSupport(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ScreenKeyboardShown")] + private static partial byte _ScreenKeyboardShown(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ScreenKeyboardShown(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _ScreenKeyboardShown(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasMouse")] + private static partial byte _HasMouse(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasMouse() + { + Sdl.TraceLog.Trace(); + return _HasMouse(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMice")] + private static partial uint* _GetMice(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetMice(int* count) + { + Sdl.TraceLog.Trace(); + return _GetMice(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetMouseNameForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetMouseNameForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetMouseNameForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetMouseNameForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMouseFocus")] + private static partial SdlWindow _GetMouseFocus(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetMouseFocus() + { + Sdl.TraceLog.Trace(); + return _GetMouseFocus(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMouseState")] + private static partial SdlMouseButtonFlags _GetMouseState(float* x, float* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlMouseButtonFlags GetMouseState(float* x, float* y) + { + Sdl.TraceLog.Trace(); + return _GetMouseState(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGlobalMouseState")] + private static partial SdlMouseButtonFlags _GetGlobalMouseState(float* x, float* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlMouseButtonFlags GetGlobalMouseState(float* x, float* y) + { + Sdl.TraceLog.Trace(); + return _GetGlobalMouseState(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRelativeMouseState")] + private static partial SdlMouseButtonFlags _GetRelativeMouseState(float* x, float* y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlMouseButtonFlags GetRelativeMouseState(float* x, float* y) + { + Sdl.TraceLog.Trace(); + return _GetRelativeMouseState(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WarpMouseInWindow")] + private static partial void _WarpMouseInWindow(SdlWindow window, float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WarpMouseInWindow(SdlWindow window, float x, float y) + { + Sdl.TraceLog.Trace(); + _WarpMouseInWindow(window, x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WarpMouseGlobal")] + private static partial byte _WarpMouseGlobal(float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WarpMouseGlobal(float x, float y) + { + Sdl.TraceLog.Trace(); + return _WarpMouseGlobal(x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRelativeMouseTransform")] + private static partial byte _SetRelativeMouseTransform( + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRelativeMouseTransform( + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _SetRelativeMouseTransform(callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetWindowRelativeMouseMode")] + private static partial byte _SetWindowRelativeMouseMode(SdlWindow window, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetWindowRelativeMouseMode(SdlWindow window, byte enabled) + { + Sdl.TraceLog.Trace(); + return _SetWindowRelativeMouseMode(window, enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowRelativeMouseMode")] + private static partial byte _GetWindowRelativeMouseMode(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetWindowRelativeMouseMode(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetWindowRelativeMouseMode(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CaptureMouse")] + private static partial byte _CaptureMouse(byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CaptureMouse(byte enabled) + { + Sdl.TraceLog.Trace(); + return _CaptureMouse(enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateCursor")] + private static partial SdlCursor _CreateCursor(byte* data, byte* mask, int w, int h, int hot_x, int hot_y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor CreateCursor(byte* data, byte* mask, int w, int h, int hot_x, int hot_y) + { + Sdl.TraceLog.Trace(); + return _CreateCursor(data, mask, w, h, hot_x, hot_y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateColorCursor")] + private static partial SdlCursor _CreateColorCursor(SdlSurface* surface, int hot_x, int hot_y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor CreateColorCursor(SdlSurface* surface, int hot_x, int hot_y) + { + Sdl.TraceLog.Trace(); + return _CreateColorCursor(surface, hot_x, hot_y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateAnimatedCursor")] + private static partial SdlCursor _CreateAnimatedCursor( + SdlCursorFrameInfo* frames, + int frame_count, + int hot_x, + int hot_y + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor CreateAnimatedCursor( + SdlCursorFrameInfo* frames, + int frame_count, + int hot_x, + int hot_y + ) + { + Sdl.TraceLog.Trace(); + return _CreateAnimatedCursor(frames, frame_count, hot_x, hot_y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateSystemCursor")] + private static partial SdlCursor _CreateSystemCursor(SdlSystemCursor id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor CreateSystemCursor(SdlSystemCursor id) + { + Sdl.TraceLog.Trace(); + return _CreateSystemCursor(id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetCursor")] + private static partial byte _SetCursor(SdlCursor cursor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetCursor(SdlCursor cursor) + { + Sdl.TraceLog.Trace(); + return _SetCursor(cursor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCursor")] + private static partial SdlCursor _GetCursor(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor GetCursor() + { + Sdl.TraceLog.Trace(); + return _GetCursor(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDefaultCursor")] + private static partial SdlCursor _GetDefaultCursor(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlCursor GetDefaultCursor() + { + Sdl.TraceLog.Trace(); + return _GetDefaultCursor(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyCursor")] + private static partial void _DestroyCursor(SdlCursor cursor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyCursor(SdlCursor cursor) + { + Sdl.TraceLog.Trace(); + _DestroyCursor(cursor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShowCursor")] + private static partial byte _ShowCursor(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShowCursor() + { + Sdl.TraceLog.Trace(); + return _ShowCursor(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HideCursor")] + private static partial byte _HideCursor(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HideCursor() + { + Sdl.TraceLog.Trace(); + return _HideCursor(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CursorVisible")] + private static partial byte _CursorVisible(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CursorVisible() + { + Sdl.TraceLog.Trace(); + return _CursorVisible(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTouchDevices")] + private static partial ulong* _GetTouchDevices(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong* GetTouchDevices(int* count) + { + Sdl.TraceLog.Trace(); + return _GetTouchDevices(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetTouchDeviceName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetTouchDeviceName(ulong touchID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetTouchDeviceName(ulong touchID) + { + Sdl.TraceLog.Trace(); + return _GetTouchDeviceName(touchID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTouchDeviceType")] + private static partial SdlTouchDeviceType _GetTouchDeviceType(ulong touchID); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTouchDeviceType GetTouchDeviceType(ulong touchID) + { + Sdl.TraceLog.Trace(); + return _GetTouchDeviceType(touchID); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTouchFingers")] + private static partial SdlFinger** _GetTouchFingers(ulong touchID, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlFinger** GetTouchFingers(ulong touchID, int* count) + { + Sdl.TraceLog.Trace(); + return _GetTouchFingers(touchID, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPenDeviceType")] + private static partial SdlPenDeviceType _GetPenDeviceType(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPenDeviceType GetPenDeviceType(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetPenDeviceType(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PumpEvents")] + private static partial void _PumpEvents(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PumpEvents() + { + Sdl.TraceLog.Trace(); + _PumpEvents(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PeepEvents")] + private static partial int _PeepEvents( + SdlEvent* events, + int numevents, + SdlEventAction action, + uint minType, + uint maxType + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int PeepEvents( + SdlEvent* events, + int numevents, + SdlEventAction action, + uint minType, + uint maxType + ) + { + Sdl.TraceLog.Trace(); + return _PeepEvents(events, numevents, action, minType, maxType); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasEvent")] + private static partial byte _HasEvent(uint type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasEvent(uint type) + { + Sdl.TraceLog.Trace(); + return _HasEvent(type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HasEvents")] + private static partial byte _HasEvents(uint minType, uint maxType); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HasEvents(uint minType, uint maxType) + { + Sdl.TraceLog.Trace(); + return _HasEvents(minType, maxType); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlushEvent")] + private static partial void _FlushEvent(uint type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void FlushEvent(uint type) + { + Sdl.TraceLog.Trace(); + _FlushEvent(type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlushEvents")] + private static partial void _FlushEvents(uint minType, uint maxType); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void FlushEvents(uint minType, uint maxType) + { + Sdl.TraceLog.Trace(); + _FlushEvents(minType, maxType); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PollEvent")] + private static partial byte _PollEvent(SdlEvent* @event); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PollEvent(SdlEvent* @event) + { + Sdl.TraceLog.Trace(); + return _PollEvent(@event); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitEvent")] + private static partial byte _WaitEvent(SdlEvent* @event); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitEvent(SdlEvent* @event) + { + Sdl.TraceLog.Trace(); + return _WaitEvent(@event); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitEventTimeout")] + private static partial byte _WaitEventTimeout(SdlEvent* @event, int timeoutMS); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitEventTimeout(SdlEvent* @event, int timeoutMS) + { + Sdl.TraceLog.Trace(); + return _WaitEventTimeout(@event, timeoutMS); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PushEvent")] + private static partial byte _PushEvent(SdlEvent* @event); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PushEvent(SdlEvent* @event) + { + Sdl.TraceLog.Trace(); + return _PushEvent(@event); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetEventFilter")] + private static partial void _SetEventFilter( + delegate* unmanaged[Cdecl] filter, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetEventFilter(delegate* unmanaged[Cdecl] filter, void* userdata) + { + Sdl.TraceLog.Trace(); + _SetEventFilter(filter, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetEventFilter")] + private static partial byte _GetEventFilter( + delegate* unmanaged[Cdecl]* filter, + void** userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetEventFilter( + delegate* unmanaged[Cdecl]* filter, + void** userdata + ) + { + Sdl.TraceLog.Trace(); + return _GetEventFilter(filter, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddEventWatch")] + private static partial byte _AddEventWatch( + delegate* unmanaged[Cdecl] filter, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AddEventWatch(delegate* unmanaged[Cdecl] filter, void* userdata) + { + Sdl.TraceLog.Trace(); + return _AddEventWatch(filter, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RemoveEventWatch")] + private static partial void _RemoveEventWatch( + delegate* unmanaged[Cdecl] filter, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveEventWatch( + delegate* unmanaged[Cdecl] filter, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _RemoveEventWatch(filter, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FilterEvents")] + private static partial void _FilterEvents( + delegate* unmanaged[Cdecl] filter, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void FilterEvents(delegate* unmanaged[Cdecl] filter, void* userdata) + { + Sdl.TraceLog.Trace(); + _FilterEvents(filter, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetEventEnabled")] + private static partial void _SetEventEnabled(uint type, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetEventEnabled(uint type, byte enabled) + { + Sdl.TraceLog.Trace(); + _SetEventEnabled(type, enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EventEnabled")] + private static partial byte _EventEnabled(uint type); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte EventEnabled(uint type) + { + Sdl.TraceLog.Trace(); + return _EventEnabled(type); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RegisterEvents")] + private static partial uint _RegisterEvents(int numevents); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint RegisterEvents(int numevents) + { + Sdl.TraceLog.Trace(); + return _RegisterEvents(numevents); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetWindowFromEvent")] + private static partial SdlWindow _GetWindowFromEvent(SdlEvent* @event); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetWindowFromEvent(SdlEvent* @event) + { + Sdl.TraceLog.Trace(); + return _GetWindowFromEvent(@event); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetEventDescription")] + private static partial int _GetEventDescription(SdlEvent* @event, byte* buf, int buflen); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetEventDescription(SdlEvent* @event, byte* buf, int buflen) + { + Sdl.TraceLog.Trace(); + return _GetEventDescription(@event, buf, buflen); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetBasePath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetBasePath(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetBasePath() + { + Sdl.TraceLog.Trace(); + return _GetBasePath(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetPrefPath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte* _GetPrefPath(string org, string app); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetPrefPath(string org, string app) + { + Sdl.TraceLog.Trace(); + return _GetPrefPath(org, app); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetUserFolder", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetUserFolder(SdlFolder folder); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetUserFolder(SdlFolder folder) + { + Sdl.TraceLog.Trace(); + return _GetUserFolder(folder); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateDirectory", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _CreateDirectory(string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CreateDirectory(string path) + { + Sdl.TraceLog.Trace(); + return _CreateDirectory(path); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_EnumerateDirectory", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _EnumerateDirectory( + string path, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte EnumerateDirectory( + string path, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _EnumerateDirectory(path, callback, userdata); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_RemovePath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _RemovePath(string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RemovePath(string path) + { + Sdl.TraceLog.Trace(); + return _RemovePath(path); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_RenamePath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _RenamePath(string oldpath, string newpath); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenamePath(string oldpath, string newpath) + { + Sdl.TraceLog.Trace(); + return _RenamePath(oldpath, newpath); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CopyFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _CopyFile(string oldpath, string newpath); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CopyFile(string oldpath, string newpath) + { + Sdl.TraceLog.Trace(); + return _CopyFile(oldpath, newpath); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetPathInfo", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetPathInfo(string path, SdlPathInfo* info); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetPathInfo(string path, SdlPathInfo* info) + { + Sdl.TraceLog.Trace(); + return _GetPathInfo(path, info); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GlobDirectory", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte** _GlobDirectory(string path, string pattern, SdlGlobFlags flags, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GlobDirectory(string path, string pattern, SdlGlobFlags flags, int* count) + { + Sdl.TraceLog.Trace(); + return _GlobDirectory(path, pattern, flags, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCurrentDirectory")] + private static partial byte* _GetCurrentDirectory(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte* GetCurrentDirectory() + { + Sdl.TraceLog.Trace(); + return _GetCurrentDirectory(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GPUSupportsShaderFormats", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GpuSupportsShaderFormats(uint format_flags, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GpuSupportsShaderFormats(uint format_flags, string name) + { + Sdl.TraceLog.Trace(); + return _GpuSupportsShaderFormats(format_flags, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GPUSupportsProperties")] + private static partial byte _GpuSupportsProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GpuSupportsProperties(uint props) + { + Sdl.TraceLog.Trace(); + return _GpuSupportsProperties(props); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateGPUDevice", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlGpuDevice _CreateGpuDevice(uint format_flags, byte debug_mode, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGpuDevice CreateGpuDevice(uint format_flags, byte debug_mode, string name) + { + Sdl.TraceLog.Trace(); + return _CreateGpuDevice(format_flags, debug_mode, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUDeviceWithProperties")] + private static partial SdlGpuDevice _CreateGpuDeviceWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGpuDevice CreateGpuDeviceWithProperties(uint props) + { + Sdl.TraceLog.Trace(); + return _CreateGpuDeviceWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyGPUDevice")] + private static partial void _DestroyGpuDevice(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyGpuDevice(SdlGpuDevice device) + { + Sdl.TraceLog.Trace(); + _DestroyGpuDevice(device); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumGPUDrivers")] + private static partial int _GetNumGpuDrivers(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumGpuDrivers() + { + Sdl.TraceLog.Trace(); + return _GetNumGpuDrivers(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGPUDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGpuDriver(int index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGpuDriver(int index) + { + Sdl.TraceLog.Trace(); + return _GetGpuDriver(index); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetGPUDeviceDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetGpuDeviceDriver(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetGpuDeviceDriver(SdlGpuDevice device) + { + Sdl.TraceLog.Trace(); + return _GetGpuDeviceDriver(device); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGPUShaderFormats")] + private static partial uint _GetGpuShaderFormats(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGpuShaderFormats(SdlGpuDevice device) + { + Sdl.TraceLog.Trace(); + return _GetGpuShaderFormats(device); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGPUDeviceProperties")] + private static partial uint _GetGpuDeviceProperties(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetGpuDeviceProperties(SdlGpuDevice device) + { + Sdl.TraceLog.Trace(); + return _GetGpuDeviceProperties(device); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUComputePipeline")] + private static partial nint _CreateGpuComputePipeline( + SdlGpuDevice device, + SdlGpuComputePipelineCreateInfo* createinfo + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuComputePipeline( + SdlGpuDevice device, + SdlGpuComputePipelineCreateInfo* createinfo + ) + { + Sdl.TraceLog.Trace(); + return _CreateGpuComputePipeline(device, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUGraphicsPipeline")] + private static partial nint _CreateGpuGraphicsPipeline( + SdlGpuDevice device, + SdlGpuGraphicsPipelineCreateInfo* createinfo + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuGraphicsPipeline( + SdlGpuDevice device, + SdlGpuGraphicsPipelineCreateInfo* createinfo + ) + { + Sdl.TraceLog.Trace(); + return _CreateGpuGraphicsPipeline(device, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUSampler")] + private static partial nint _CreateGpuSampler(SdlGpuDevice device, SdlGpuSamplerCreateInfo* createinfo); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuSampler(SdlGpuDevice device, SdlGpuSamplerCreateInfo* createinfo) + { + Sdl.TraceLog.Trace(); + return _CreateGpuSampler(device, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUShader")] + private static partial nint _CreateGpuShader(SdlGpuDevice device, SdlGpuShaderCreateInfo* createinfo); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuShader(SdlGpuDevice device, SdlGpuShaderCreateInfo* createinfo) + { + Sdl.TraceLog.Trace(); + return _CreateGpuShader(device, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUTexture")] + private static partial nint _CreateGpuTexture(SdlGpuDevice device, SdlGpuTextureCreateInfo* createinfo); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuTexture(SdlGpuDevice device, SdlGpuTextureCreateInfo* createinfo) + { + Sdl.TraceLog.Trace(); + return _CreateGpuTexture(device, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUBuffer")] + private static partial nint _CreateGpuBuffer(SdlGpuDevice device, SdlGpuBufferCreateInfo* createinfo); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuBuffer(SdlGpuDevice device, SdlGpuBufferCreateInfo* createinfo) + { + Sdl.TraceLog.Trace(); + return _CreateGpuBuffer(device, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPUTransferBuffer")] + private static partial nint _CreateGpuTransferBuffer( + SdlGpuDevice device, + SdlGpuTransferBufferCreateInfo* createinfo + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuTransferBuffer(SdlGpuDevice device, SdlGpuTransferBufferCreateInfo* createinfo) + { + Sdl.TraceLog.Trace(); + return _CreateGpuTransferBuffer(device, createinfo); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetGPUBufferName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _SetGpuBufferName(SdlGpuDevice device, nint buffer, string text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuBufferName(SdlGpuDevice device, nint buffer, string text) + { + Sdl.TraceLog.Trace(); + _SetGpuBufferName(device, buffer, text); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetGPUTextureName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _SetGpuTextureName(SdlGpuDevice device, nint texture, string text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuTextureName(SdlGpuDevice device, nint texture, string text) + { + Sdl.TraceLog.Trace(); + _SetGpuTextureName(device, texture, text); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_InsertGPUDebugLabel", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _InsertGpuDebugLabel(nint command_buffer, string text); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void InsertGpuDebugLabel(nint command_buffer, string text) + { + Sdl.TraceLog.Trace(); + _InsertGpuDebugLabel(command_buffer, text); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_PushGPUDebugGroup", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _PushGpuDebugGroup(nint command_buffer, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PushGpuDebugGroup(nint command_buffer, string name) + { + Sdl.TraceLog.Trace(); + _PushGpuDebugGroup(command_buffer, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PopGPUDebugGroup")] + private static partial void _PopGpuDebugGroup(nint command_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PopGpuDebugGroup(nint command_buffer) + { + Sdl.TraceLog.Trace(); + _PopGpuDebugGroup(command_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUTexture")] + private static partial void _ReleaseGpuTexture(SdlGpuDevice device, nint texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuTexture(SdlGpuDevice device, nint texture) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuTexture(device, texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUSampler")] + private static partial void _ReleaseGpuSampler(SdlGpuDevice device, nint sampler); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuSampler(SdlGpuDevice device, nint sampler) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuSampler(device, sampler); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUBuffer")] + private static partial void _ReleaseGpuBuffer(SdlGpuDevice device, nint buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuBuffer(SdlGpuDevice device, nint buffer) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuBuffer(device, buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUTransferBuffer")] + private static partial void _ReleaseGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuTransferBuffer(device, transfer_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUComputePipeline")] + private static partial void _ReleaseGpuComputePipeline(SdlGpuDevice device, nint compute_pipeline); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuComputePipeline(SdlGpuDevice device, nint compute_pipeline) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuComputePipeline(device, compute_pipeline); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUShader")] + private static partial void _ReleaseGpuShader(SdlGpuDevice device, nint shader); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuShader(SdlGpuDevice device, nint shader) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuShader(device, shader); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUGraphicsPipeline")] + private static partial void _ReleaseGpuGraphicsPipeline(SdlGpuDevice device, nint graphics_pipeline); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuGraphicsPipeline(SdlGpuDevice device, nint graphics_pipeline) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuGraphicsPipeline(device, graphics_pipeline); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AcquireGPUCommandBuffer")] + private static partial nint _AcquireGpuCommandBuffer(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint AcquireGpuCommandBuffer(SdlGpuDevice device) + { + Sdl.TraceLog.Trace(); + return _AcquireGpuCommandBuffer(device); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PushGPUVertexUniformData")] + private static partial void _PushGpuVertexUniformData( + nint command_buffer, + uint slot_index, + void* data, + uint length + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PushGpuVertexUniformData(nint command_buffer, uint slot_index, void* data, uint length) + { + Sdl.TraceLog.Trace(); + _PushGpuVertexUniformData(command_buffer, slot_index, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PushGPUFragmentUniformData")] + private static partial void _PushGpuFragmentUniformData( + nint command_buffer, + uint slot_index, + void* data, + uint length + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PushGpuFragmentUniformData(nint command_buffer, uint slot_index, void* data, uint length) + { + Sdl.TraceLog.Trace(); + _PushGpuFragmentUniformData(command_buffer, slot_index, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PushGPUComputeUniformData")] + private static partial void _PushGpuComputeUniformData( + nint command_buffer, + uint slot_index, + void* data, + uint length + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void PushGpuComputeUniformData(nint command_buffer, uint slot_index, void* data, uint length) + { + Sdl.TraceLog.Trace(); + _PushGpuComputeUniformData(command_buffer, slot_index, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BeginGPURenderPass")] + private static partial nint _BeginGpuRenderPass( + nint command_buffer, + SdlGpuColorTargetInfo* color_target_infos, + uint num_color_targets, + SdlGpuDepthStencilTargetInfo* depth_stencil_target_info + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint BeginGpuRenderPass( + nint command_buffer, + SdlGpuColorTargetInfo* color_target_infos, + uint num_color_targets, + SdlGpuDepthStencilTargetInfo* depth_stencil_target_info + ) + { + Sdl.TraceLog.Trace(); + return _BeginGpuRenderPass( + command_buffer, + color_target_infos, + num_color_targets, + depth_stencil_target_info + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUGraphicsPipeline")] + private static partial void _BindGpuGraphicsPipeline(nint render_pass, nint graphics_pipeline); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuGraphicsPipeline(nint render_pass, nint graphics_pipeline) + { + Sdl.TraceLog.Trace(); + _BindGpuGraphicsPipeline(render_pass, graphics_pipeline); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPUViewport")] + private static partial void _SetGpuViewport(nint render_pass, SdlGpuViewport* viewport); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuViewport(nint render_pass, SdlGpuViewport* viewport) + { + Sdl.TraceLog.Trace(); + _SetGpuViewport(render_pass, viewport); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPUScissor")] + private static partial void _SetGpuScissor(nint render_pass, SdlRect* scissor); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuScissor(nint render_pass, SdlRect* scissor) + { + Sdl.TraceLog.Trace(); + _SetGpuScissor(render_pass, scissor); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPUBlendConstants")] + private static partial void _SetGpuBlendConstants(nint render_pass, SdlFColor blend_constants); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuBlendConstants(nint render_pass, SdlFColor blend_constants) + { + Sdl.TraceLog.Trace(); + _SetGpuBlendConstants(render_pass, blend_constants); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPUStencilReference")] + private static partial void _SetGpuStencilReference(nint render_pass, byte reference); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetGpuStencilReference(nint render_pass, byte reference) + { + Sdl.TraceLog.Trace(); + _SetGpuStencilReference(render_pass, reference); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexBuffers")] + private static partial void _BindGpuVertexBuffers( + nint render_pass, + uint first_slot, + SdlGpuBufferBinding* bindings, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuVertexBuffers( + nint render_pass, + uint first_slot, + SdlGpuBufferBinding* bindings, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuVertexBuffers(render_pass, first_slot, bindings, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUIndexBuffer")] + private static partial void _BindGpuIndexBuffer( + nint render_pass, + SdlGpuBufferBinding* binding, + SdlGpuIndexElementSize index_element_size + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuIndexBuffer( + nint render_pass, + SdlGpuBufferBinding* binding, + SdlGpuIndexElementSize index_element_size + ) + { + Sdl.TraceLog.Trace(); + _BindGpuIndexBuffer(render_pass, binding, index_element_size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexSamplers")] + private static partial void _BindGpuVertexSamplers( + nint render_pass, + uint first_slot, + SdlGpuTextureSamplerBinding* texture_sampler_bindings, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuVertexSamplers( + nint render_pass, + uint first_slot, + SdlGpuTextureSamplerBinding* texture_sampler_bindings, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuVertexSamplers(render_pass, first_slot, texture_sampler_bindings, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexStorageTextures")] + private static partial void _BindGpuVertexStorageTextures( + nint render_pass, + uint first_slot, + nint* storage_textures, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuVertexStorageTextures( + nint render_pass, + uint first_slot, + nint* storage_textures, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuVertexStorageTextures(render_pass, first_slot, storage_textures, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUVertexStorageBuffers")] + private static partial void _BindGpuVertexStorageBuffers( + nint render_pass, + uint first_slot, + nint* storage_buffers, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuVertexStorageBuffers( + nint render_pass, + uint first_slot, + nint* storage_buffers, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuVertexStorageBuffers(render_pass, first_slot, storage_buffers, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUFragmentSamplers")] + private static partial void _BindGpuFragmentSamplers( + nint render_pass, + uint first_slot, + SdlGpuTextureSamplerBinding* texture_sampler_bindings, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuFragmentSamplers( + nint render_pass, + uint first_slot, + SdlGpuTextureSamplerBinding* texture_sampler_bindings, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuFragmentSamplers(render_pass, first_slot, texture_sampler_bindings, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUFragmentStorageTextures")] + private static partial void _BindGpuFragmentStorageTextures( + nint render_pass, + uint first_slot, + nint* storage_textures, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuFragmentStorageTextures( + nint render_pass, + uint first_slot, + nint* storage_textures, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuFragmentStorageTextures(render_pass, first_slot, storage_textures, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUFragmentStorageBuffers")] + private static partial void _BindGpuFragmentStorageBuffers( + nint render_pass, + uint first_slot, + nint* storage_buffers, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuFragmentStorageBuffers( + nint render_pass, + uint first_slot, + nint* storage_buffers, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuFragmentStorageBuffers(render_pass, first_slot, storage_buffers, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DrawGPUIndexedPrimitives")] + private static partial void _DrawGpuIndexedPrimitives( + nint render_pass, + uint num_indices, + uint num_instances, + uint first_index, + int vertex_offset, + uint first_instance + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawGpuIndexedPrimitives( + nint render_pass, + uint num_indices, + uint num_instances, + uint first_index, + int vertex_offset, + uint first_instance + ) + { + Sdl.TraceLog.Trace(); + _DrawGpuIndexedPrimitives( + render_pass, + num_indices, + num_instances, + first_index, + vertex_offset, + first_instance + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DrawGPUPrimitives")] + private static partial void _DrawGpuPrimitives( + nint render_pass, + uint num_vertices, + uint num_instances, + uint first_vertex, + uint first_instance + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawGpuPrimitives( + nint render_pass, + uint num_vertices, + uint num_instances, + uint first_vertex, + uint first_instance + ) + { + Sdl.TraceLog.Trace(); + _DrawGpuPrimitives(render_pass, num_vertices, num_instances, first_vertex, first_instance); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DrawGPUPrimitivesIndirect")] + private static partial void _DrawGpuPrimitivesIndirect( + nint render_pass, + nint buffer, + uint offset, + uint draw_count + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawGpuPrimitivesIndirect(nint render_pass, nint buffer, uint offset, uint draw_count) + { + Sdl.TraceLog.Trace(); + _DrawGpuPrimitivesIndirect(render_pass, buffer, offset, draw_count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DrawGPUIndexedPrimitivesIndirect")] + private static partial void _DrawGpuIndexedPrimitivesIndirect( + nint render_pass, + nint buffer, + uint offset, + uint draw_count + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawGpuIndexedPrimitivesIndirect( + nint render_pass, + nint buffer, + uint offset, + uint draw_count + ) + { + Sdl.TraceLog.Trace(); + _DrawGpuIndexedPrimitivesIndirect(render_pass, buffer, offset, draw_count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EndGPURenderPass")] + private static partial void _EndGpuRenderPass(nint render_pass); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndGpuRenderPass(nint render_pass) + { + Sdl.TraceLog.Trace(); + _EndGpuRenderPass(render_pass); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BeginGPUComputePass")] + private static partial nint _BeginGpuComputePass( + nint command_buffer, + SdlGpuStorageTextureReadWriteBinding* storage_texture_bindings, + uint num_storage_texture_bindings, + SdlGpuStorageBufferReadWriteBinding* storage_buffer_bindings, + uint num_storage_buffer_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint BeginGpuComputePass( + nint command_buffer, + SdlGpuStorageTextureReadWriteBinding* storage_texture_bindings, + uint num_storage_texture_bindings, + SdlGpuStorageBufferReadWriteBinding* storage_buffer_bindings, + uint num_storage_buffer_bindings + ) + { + Sdl.TraceLog.Trace(); + return _BeginGpuComputePass( + command_buffer, + storage_texture_bindings, + num_storage_texture_bindings, + storage_buffer_bindings, + num_storage_buffer_bindings + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputePipeline")] + private static partial void _BindGpuComputePipeline(nint compute_pass, nint compute_pipeline); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuComputePipeline(nint compute_pass, nint compute_pipeline) + { + Sdl.TraceLog.Trace(); + _BindGpuComputePipeline(compute_pass, compute_pipeline); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputeSamplers")] + private static partial void _BindGpuComputeSamplers( + nint compute_pass, + uint first_slot, + SdlGpuTextureSamplerBinding* texture_sampler_bindings, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuComputeSamplers( + nint compute_pass, + uint first_slot, + SdlGpuTextureSamplerBinding* texture_sampler_bindings, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuComputeSamplers(compute_pass, first_slot, texture_sampler_bindings, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputeStorageTextures")] + private static partial void _BindGpuComputeStorageTextures( + nint compute_pass, + uint first_slot, + nint* storage_textures, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuComputeStorageTextures( + nint compute_pass, + uint first_slot, + nint* storage_textures, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuComputeStorageTextures(compute_pass, first_slot, storage_textures, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BindGPUComputeStorageBuffers")] + private static partial void _BindGpuComputeStorageBuffers( + nint compute_pass, + uint first_slot, + nint* storage_buffers, + uint num_bindings + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindGpuComputeStorageBuffers( + nint compute_pass, + uint first_slot, + nint* storage_buffers, + uint num_bindings + ) + { + Sdl.TraceLog.Trace(); + _BindGpuComputeStorageBuffers(compute_pass, first_slot, storage_buffers, num_bindings); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DispatchGPUCompute")] + private static partial void _DispatchGpuCompute( + nint compute_pass, + uint groupcount_x, + uint groupcount_y, + uint groupcount_z + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DispatchGpuCompute( + nint compute_pass, + uint groupcount_x, + uint groupcount_y, + uint groupcount_z + ) + { + Sdl.TraceLog.Trace(); + _DispatchGpuCompute(compute_pass, groupcount_x, groupcount_y, groupcount_z); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DispatchGPUComputeIndirect")] + private static partial void _DispatchGpuComputeIndirect(nint compute_pass, nint buffer, uint offset); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DispatchGpuComputeIndirect(nint compute_pass, nint buffer, uint offset) + { + Sdl.TraceLog.Trace(); + _DispatchGpuComputeIndirect(compute_pass, buffer, offset); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EndGPUComputePass")] + private static partial void _EndGpuComputePass(nint compute_pass); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndGpuComputePass(nint compute_pass) + { + Sdl.TraceLog.Trace(); + _EndGpuComputePass(compute_pass); + } + + [LibraryImport(Dll, EntryPoint = "SDL_MapGPUTransferBuffer")] + private static partial void* _MapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer, byte cycle); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* MapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer, byte cycle) + { + Sdl.TraceLog.Trace(); + return _MapGpuTransferBuffer(device, transfer_buffer, cycle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnmapGPUTransferBuffer")] + private static partial void _UnmapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnmapGpuTransferBuffer(SdlGpuDevice device, nint transfer_buffer) + { + Sdl.TraceLog.Trace(); + _UnmapGpuTransferBuffer(device, transfer_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BeginGPUCopyPass")] + private static partial nint _BeginGpuCopyPass(nint command_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint BeginGpuCopyPass(nint command_buffer) + { + Sdl.TraceLog.Trace(); + return _BeginGpuCopyPass(command_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UploadToGPUTexture")] + private static partial void _UploadToGpuTexture( + nint copy_pass, + SdlGpuTextureTransferInfo* source, + SdlGpuTextureRegion* destination, + byte cycle + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UploadToGpuTexture( + nint copy_pass, + SdlGpuTextureTransferInfo* source, + SdlGpuTextureRegion* destination, + byte cycle + ) + { + Sdl.TraceLog.Trace(); + _UploadToGpuTexture(copy_pass, source, destination, cycle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UploadToGPUBuffer")] + private static partial void _UploadToGpuBuffer( + nint copy_pass, + SdlGpuTransferBufferLocation* source, + SdlGpuBufferRegion* destination, + byte cycle + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UploadToGpuBuffer( + nint copy_pass, + SdlGpuTransferBufferLocation* source, + SdlGpuBufferRegion* destination, + byte cycle + ) + { + Sdl.TraceLog.Trace(); + _UploadToGpuBuffer(copy_pass, source, destination, cycle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CopyGPUTextureToTexture")] + private static partial void _CopyGpuTextureToTexture( + nint copy_pass, + SdlGpuTextureLocation* source, + SdlGpuTextureLocation* destination, + uint w, + uint h, + uint d, + byte cycle + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyGpuTextureToTexture( + nint copy_pass, + SdlGpuTextureLocation* source, + SdlGpuTextureLocation* destination, + uint w, + uint h, + uint d, + byte cycle + ) + { + Sdl.TraceLog.Trace(); + _CopyGpuTextureToTexture(copy_pass, source, destination, w, h, d, cycle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CopyGPUBufferToBuffer")] + private static partial void _CopyGpuBufferToBuffer( + nint copy_pass, + SdlGpuBufferLocation* source, + SdlGpuBufferLocation* destination, + uint size, + byte cycle + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyGpuBufferToBuffer( + nint copy_pass, + SdlGpuBufferLocation* source, + SdlGpuBufferLocation* destination, + uint size, + byte cycle + ) + { + Sdl.TraceLog.Trace(); + _CopyGpuBufferToBuffer(copy_pass, source, destination, size, cycle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DownloadFromGPUTexture")] + private static partial void _DownloadFromGpuTexture( + nint copy_pass, + SdlGpuTextureRegion* source, + SdlGpuTextureTransferInfo* destination + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DownloadFromGpuTexture( + nint copy_pass, + SdlGpuTextureRegion* source, + SdlGpuTextureTransferInfo* destination + ) + { + Sdl.TraceLog.Trace(); + _DownloadFromGpuTexture(copy_pass, source, destination); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DownloadFromGPUBuffer")] + private static partial void _DownloadFromGpuBuffer( + nint copy_pass, + SdlGpuBufferRegion* source, + SdlGpuTransferBufferLocation* destination + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DownloadFromGpuBuffer( + nint copy_pass, + SdlGpuBufferRegion* source, + SdlGpuTransferBufferLocation* destination + ) + { + Sdl.TraceLog.Trace(); + _DownloadFromGpuBuffer(copy_pass, source, destination); + } + + [LibraryImport(Dll, EntryPoint = "SDL_EndGPUCopyPass")] + private static partial void _EndGpuCopyPass(nint copy_pass); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndGpuCopyPass(nint copy_pass) + { + Sdl.TraceLog.Trace(); + _EndGpuCopyPass(copy_pass); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GenerateMipmapsForGPUTexture")] + private static partial void _GenerateMipmapsForGpuTexture(nint command_buffer, nint texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GenerateMipmapsForGpuTexture(nint command_buffer, nint texture) + { + Sdl.TraceLog.Trace(); + _GenerateMipmapsForGpuTexture(command_buffer, texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_BlitGPUTexture")] + private static partial void _BlitGpuTexture(nint command_buffer, SdlGpuBlitInfo* info); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BlitGpuTexture(nint command_buffer, SdlGpuBlitInfo* info) + { + Sdl.TraceLog.Trace(); + _BlitGpuTexture(command_buffer, info); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WindowSupportsGPUSwapchainComposition")] + private static partial byte _WindowSupportsGpuSwapchainComposition( + SdlGpuDevice device, + SdlWindow window, + SdlGpuSwapchainComposition swapchain_composition + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WindowSupportsGpuSwapchainComposition( + SdlGpuDevice device, + SdlWindow window, + SdlGpuSwapchainComposition swapchain_composition + ) + { + Sdl.TraceLog.Trace(); + return _WindowSupportsGpuSwapchainComposition(device, window, swapchain_composition); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WindowSupportsGPUPresentMode")] + private static partial byte _WindowSupportsGpuPresentMode( + SdlGpuDevice device, + SdlWindow window, + SdlGpuPresentMode present_mode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WindowSupportsGpuPresentMode( + SdlGpuDevice device, + SdlWindow window, + SdlGpuPresentMode present_mode + ) + { + Sdl.TraceLog.Trace(); + return _WindowSupportsGpuPresentMode(device, window, present_mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClaimWindowForGPUDevice")] + private static partial byte _ClaimWindowForGpuDevice(SdlGpuDevice device, SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ClaimWindowForGpuDevice(SdlGpuDevice device, SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _ClaimWindowForGpuDevice(device, window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseWindowFromGPUDevice")] + private static partial void _ReleaseWindowFromGpuDevice(SdlGpuDevice device, SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseWindowFromGpuDevice(SdlGpuDevice device, SdlWindow window) + { + Sdl.TraceLog.Trace(); + _ReleaseWindowFromGpuDevice(device, window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPUSwapchainParameters")] + private static partial byte _SetGpuSwapchainParameters( + SdlGpuDevice device, + SdlWindow window, + SdlGpuSwapchainComposition swapchain_composition, + SdlGpuPresentMode present_mode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGpuSwapchainParameters( + SdlGpuDevice device, + SdlWindow window, + SdlGpuSwapchainComposition swapchain_composition, + SdlGpuPresentMode present_mode + ) + { + Sdl.TraceLog.Trace(); + return _SetGpuSwapchainParameters(device, window, swapchain_composition, present_mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPUAllowedFramesInFlight")] + private static partial byte _SetGpuAllowedFramesInFlight( + SdlGpuDevice device, + uint allowed_frames_in_flight + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGpuAllowedFramesInFlight(SdlGpuDevice device, uint allowed_frames_in_flight) + { + Sdl.TraceLog.Trace(); + return _SetGpuAllowedFramesInFlight(device, allowed_frames_in_flight); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGPUSwapchainTextureFormat")] + private static partial SdlGpuTextureFormat _GetGpuSwapchainTextureFormat( + SdlGpuDevice device, + SdlWindow window + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGpuTextureFormat GetGpuSwapchainTextureFormat(SdlGpuDevice device, SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetGpuSwapchainTextureFormat(device, window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AcquireGPUSwapchainTexture")] + private static partial byte _AcquireGpuSwapchainTexture( + nint command_buffer, + SdlWindow window, + nint* swapchain_texture, + uint* swapchain_texture_width, + uint* swapchain_texture_height + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AcquireGpuSwapchainTexture( + nint command_buffer, + SdlWindow window, + nint* swapchain_texture, + uint* swapchain_texture_width, + uint* swapchain_texture_height + ) + { + Sdl.TraceLog.Trace(); + return _AcquireGpuSwapchainTexture( + command_buffer, + window, + swapchain_texture, + swapchain_texture_width, + swapchain_texture_height + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitForGPUSwapchain")] + private static partial byte _WaitForGpuSwapchain(SdlGpuDevice device, SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitForGpuSwapchain(SdlGpuDevice device, SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _WaitForGpuSwapchain(device, window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitAndAcquireGPUSwapchainTexture")] + private static partial byte _WaitAndAcquireGpuSwapchainTexture( + nint command_buffer, + SdlWindow window, + nint* swapchain_texture, + uint* swapchain_texture_width, + uint* swapchain_texture_height + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitAndAcquireGpuSwapchainTexture( + nint command_buffer, + SdlWindow window, + nint* swapchain_texture, + uint* swapchain_texture_width, + uint* swapchain_texture_height + ) + { + Sdl.TraceLog.Trace(); + return _WaitAndAcquireGpuSwapchainTexture( + command_buffer, + window, + swapchain_texture, + swapchain_texture_width, + swapchain_texture_height + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SubmitGPUCommandBuffer")] + private static partial byte _SubmitGpuCommandBuffer(nint command_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SubmitGpuCommandBuffer(nint command_buffer) + { + Sdl.TraceLog.Trace(); + return _SubmitGpuCommandBuffer(command_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SubmitGPUCommandBufferAndAcquireFence")] + private static partial nint _SubmitGpuCommandBufferAndAcquireFence(nint command_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint SubmitGpuCommandBufferAndAcquireFence(nint command_buffer) + { + Sdl.TraceLog.Trace(); + return _SubmitGpuCommandBufferAndAcquireFence(command_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CancelGPUCommandBuffer")] + private static partial byte _CancelGpuCommandBuffer(nint command_buffer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CancelGpuCommandBuffer(nint command_buffer) + { + Sdl.TraceLog.Trace(); + return _CancelGpuCommandBuffer(command_buffer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitForGPUIdle")] + private static partial byte _WaitForGpuIdle(SdlGpuDevice device); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitForGpuIdle(SdlGpuDevice device) + { + Sdl.TraceLog.Trace(); + return _WaitForGpuIdle(device); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitForGPUFences")] + private static partial byte _WaitForGpuFences( + SdlGpuDevice device, + byte wait_all, + nint* fences, + uint num_fences + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitForGpuFences(SdlGpuDevice device, byte wait_all, nint* fences, uint num_fences) + { + Sdl.TraceLog.Trace(); + return _WaitForGpuFences(device, wait_all, fences, num_fences); + } + + [LibraryImport(Dll, EntryPoint = "SDL_QueryGPUFence")] + private static partial byte _QueryGpuFence(SdlGpuDevice device, nint fence); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte QueryGpuFence(SdlGpuDevice device, nint fence) + { + Sdl.TraceLog.Trace(); + return _QueryGpuFence(device, fence); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReleaseGPUFence")] + private static partial void _ReleaseGpuFence(SdlGpuDevice device, nint fence); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseGpuFence(SdlGpuDevice device, nint fence) + { + Sdl.TraceLog.Trace(); + _ReleaseGpuFence(device, fence); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GPUTextureFormatTexelBlockSize")] + private static partial uint _GpuTextureFormatTexelBlockSize(SdlGpuTextureFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GpuTextureFormatTexelBlockSize(SdlGpuTextureFormat format) + { + Sdl.TraceLog.Trace(); + return _GpuTextureFormatTexelBlockSize(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GPUTextureSupportsFormat")] + private static partial byte _GpuTextureSupportsFormat( + SdlGpuDevice device, + SdlGpuTextureFormat format, + SdlGpuTextureType type, + SdlGpuTextureUsageFlags usage + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GpuTextureSupportsFormat( + SdlGpuDevice device, + SdlGpuTextureFormat format, + SdlGpuTextureType type, + SdlGpuTextureUsageFlags usage + ) + { + Sdl.TraceLog.Trace(); + return _GpuTextureSupportsFormat(device, format, type, usage); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GPUTextureSupportsSampleCount")] + private static partial byte _GpuTextureSupportsSampleCount( + SdlGpuDevice device, + SdlGpuTextureFormat format, + SdlGpuSampleCount sample_count + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GpuTextureSupportsSampleCount( + SdlGpuDevice device, + SdlGpuTextureFormat format, + SdlGpuSampleCount sample_count + ) + { + Sdl.TraceLog.Trace(); + return _GpuTextureSupportsSampleCount(device, format, sample_count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CalculateGPUTextureFormatSize")] + private static partial uint _CalculateGpuTextureFormatSize( + SdlGpuTextureFormat format, + uint width, + uint height, + uint depth_or_layer_count + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint CalculateGpuTextureFormatSize( + SdlGpuTextureFormat format, + uint width, + uint height, + uint depth_or_layer_count + ) + { + Sdl.TraceLog.Trace(); + return _CalculateGpuTextureFormatSize(format, width, height, depth_or_layer_count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPixelFormatFromGPUTextureFormat")] + private static partial SdlPixelFormat _GetPixelFormatFromGpuTextureFormat(SdlGpuTextureFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPixelFormat GetPixelFormatFromGpuTextureFormat(SdlGpuTextureFormat format) + { + Sdl.TraceLog.Trace(); + return _GetPixelFormatFromGpuTextureFormat(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGPUTextureFormatFromPixelFormat")] + private static partial SdlGpuTextureFormat _GetGpuTextureFormatFromPixelFormat(SdlPixelFormat format); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGpuTextureFormat GetGpuTextureFormatFromPixelFormat(SdlPixelFormat format) + { + Sdl.TraceLog.Trace(); + return _GetGpuTextureFormatFromPixelFormat(format); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetHaptics")] + private static partial uint* _GetHaptics(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint* GetHaptics(int* count) + { + Sdl.TraceLog.Trace(); + return _GetHaptics(count); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetHapticNameForID", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetHapticNameForID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetHapticNameForID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetHapticNameForID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenHaptic")] + private static partial nint _OpenHaptic(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenHaptic(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _OpenHaptic(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetHapticFromID")] + private static partial nint _GetHapticFromID(uint instance_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetHapticFromID(uint instance_id) + { + Sdl.TraceLog.Trace(); + return _GetHapticFromID(instance_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetHapticID")] + private static partial uint _GetHapticID(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetHapticID(nint haptic) + { + Sdl.TraceLog.Trace(); + return _GetHapticID(haptic); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetHapticName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetHapticName(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetHapticName(nint haptic) + { + Sdl.TraceLog.Trace(); + return _GetHapticName(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsMouseHaptic")] + private static partial byte _IsMouseHaptic(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsMouseHaptic() + { + Sdl.TraceLog.Trace(); + return _IsMouseHaptic(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenHapticFromMouse")] + private static partial nint _OpenHapticFromMouse(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenHapticFromMouse() + { + Sdl.TraceLog.Trace(); + return _OpenHapticFromMouse(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsJoystickHaptic")] + private static partial byte _IsJoystickHaptic(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsJoystickHaptic(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _IsJoystickHaptic(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenHapticFromJoystick")] + private static partial nint _OpenHapticFromJoystick(SdlJoystick joystick); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenHapticFromJoystick(SdlJoystick joystick) + { + Sdl.TraceLog.Trace(); + return _OpenHapticFromJoystick(joystick); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseHaptic")] + private static partial void _CloseHaptic(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CloseHaptic(nint haptic) + { + Sdl.TraceLog.Trace(); + _CloseHaptic(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMaxHapticEffects")] + private static partial int _GetMaxHapticEffects(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetMaxHapticEffects(nint haptic) + { + Sdl.TraceLog.Trace(); + return _GetMaxHapticEffects(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetMaxHapticEffectsPlaying")] + private static partial int _GetMaxHapticEffectsPlaying(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetMaxHapticEffectsPlaying(nint haptic) + { + Sdl.TraceLog.Trace(); + return _GetMaxHapticEffectsPlaying(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetHapticFeatures")] + private static partial uint _GetHapticFeatures(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetHapticFeatures(nint haptic) + { + Sdl.TraceLog.Trace(); + return _GetHapticFeatures(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumHapticAxes")] + private static partial int _GetNumHapticAxes(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumHapticAxes(nint haptic) + { + Sdl.TraceLog.Trace(); + return _GetNumHapticAxes(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HapticEffectSupported")] + private static partial byte _HapticEffectSupported(nint haptic, SdlHapticEffect* effect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HapticEffectSupported(nint haptic, SdlHapticEffect* effect) + { + Sdl.TraceLog.Trace(); + return _HapticEffectSupported(haptic, effect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateHapticEffect")] + private static partial int _CreateHapticEffect(nint haptic, SdlHapticEffect* effect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int CreateHapticEffect(nint haptic, SdlHapticEffect* effect) + { + Sdl.TraceLog.Trace(); + return _CreateHapticEffect(haptic, effect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateHapticEffect")] + private static partial byte _UpdateHapticEffect(nint haptic, int effect, SdlHapticEffect* data); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateHapticEffect(nint haptic, int effect, SdlHapticEffect* data) + { + Sdl.TraceLog.Trace(); + return _UpdateHapticEffect(haptic, effect, data); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RunHapticEffect")] + private static partial byte _RunHapticEffect(nint haptic, int effect, uint iterations); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RunHapticEffect(nint haptic, int effect, uint iterations) + { + Sdl.TraceLog.Trace(); + return _RunHapticEffect(haptic, effect, iterations); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StopHapticEffect")] + private static partial byte _StopHapticEffect(nint haptic, int effect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopHapticEffect(nint haptic, int effect) + { + Sdl.TraceLog.Trace(); + return _StopHapticEffect(haptic, effect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyHapticEffect")] + private static partial void _DestroyHapticEffect(nint haptic, int effect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyHapticEffect(nint haptic, int effect) + { + Sdl.TraceLog.Trace(); + _DestroyHapticEffect(haptic, effect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetHapticEffectStatus")] + private static partial byte _GetHapticEffectStatus(nint haptic, int effect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetHapticEffectStatus(nint haptic, int effect) + { + Sdl.TraceLog.Trace(); + return _GetHapticEffectStatus(haptic, effect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetHapticGain")] + private static partial byte _SetHapticGain(nint haptic, int gain); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetHapticGain(nint haptic, int gain) + { + Sdl.TraceLog.Trace(); + return _SetHapticGain(haptic, gain); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetHapticAutocenter")] + private static partial byte _SetHapticAutocenter(nint haptic, int autocenter); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetHapticAutocenter(nint haptic, int autocenter) + { + Sdl.TraceLog.Trace(); + return _SetHapticAutocenter(haptic, autocenter); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PauseHaptic")] + private static partial byte _PauseHaptic(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PauseHaptic(nint haptic) + { + Sdl.TraceLog.Trace(); + return _PauseHaptic(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResumeHaptic")] + private static partial byte _ResumeHaptic(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResumeHaptic(nint haptic) + { + Sdl.TraceLog.Trace(); + return _ResumeHaptic(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StopHapticEffects")] + private static partial byte _StopHapticEffects(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopHapticEffects(nint haptic) + { + Sdl.TraceLog.Trace(); + return _StopHapticEffects(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_HapticRumbleSupported")] + private static partial byte _HapticRumbleSupported(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte HapticRumbleSupported(nint haptic) + { + Sdl.TraceLog.Trace(); + return _HapticRumbleSupported(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_InitHapticRumble")] + private static partial byte _InitHapticRumble(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte InitHapticRumble(nint haptic) + { + Sdl.TraceLog.Trace(); + return _InitHapticRumble(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_PlayHapticRumble")] + private static partial byte _PlayHapticRumble(nint haptic, float strength, uint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte PlayHapticRumble(nint haptic, float strength, uint length) + { + Sdl.TraceLog.Trace(); + return _PlayHapticRumble(haptic, strength, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StopHapticRumble")] + private static partial byte _StopHapticRumble(nint haptic); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StopHapticRumble(nint haptic) + { + Sdl.TraceLog.Trace(); + return _StopHapticRumble(haptic); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_init")] + private static partial int _HidInit(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidInit() + { + Sdl.TraceLog.Trace(); + return _HidInit(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_exit")] + private static partial int _HidExit(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidExit() + { + Sdl.TraceLog.Trace(); + return _HidExit(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_device_change_count")] + private static partial uint _HidDeviceChangeCount(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint HidDeviceChangeCount() + { + Sdl.TraceLog.Trace(); + return _HidDeviceChangeCount(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_enumerate")] + private static partial SdlHidDeviceInfo* _HidEnumerate(ushort vendor_id, ushort product_id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlHidDeviceInfo* HidEnumerate(ushort vendor_id, ushort product_id) + { + Sdl.TraceLog.Trace(); + return _HidEnumerate(vendor_id, product_id); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_free_enumeration")] + private static partial void _HidFreeEnumeration(SdlHidDeviceInfo* devs); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void HidFreeEnumeration(SdlHidDeviceInfo* devs) + { + Sdl.TraceLog.Trace(); + _HidFreeEnumeration(devs); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_hid_open_path", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _HidOpenPath(string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint HidOpenPath(string path) + { + Sdl.TraceLog.Trace(); + return _HidOpenPath(path); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_get_properties")] + private static partial uint _HidGetProperties(nint dev); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint HidGetProperties(nint dev) + { + Sdl.TraceLog.Trace(); + return _HidGetProperties(dev); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_write")] + private static partial int _HidWrite(nint dev, byte* data, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidWrite(nint dev, byte* data, nuint length) + { + Sdl.TraceLog.Trace(); + return _HidWrite(dev, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_read_timeout")] + private static partial int _HidReadTimeout(nint dev, byte* data, nuint length, int milliseconds); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidReadTimeout(nint dev, byte* data, nuint length, int milliseconds) + { + Sdl.TraceLog.Trace(); + return _HidReadTimeout(dev, data, length, milliseconds); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_read")] + private static partial int _HidRead(nint dev, byte* data, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidRead(nint dev, byte* data, nuint length) + { + Sdl.TraceLog.Trace(); + return _HidRead(dev, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_set_nonblocking")] + private static partial int _HidSetNonblocking(nint dev, int nonblock); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidSetNonblocking(nint dev, int nonblock) + { + Sdl.TraceLog.Trace(); + return _HidSetNonblocking(dev, nonblock); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_send_feature_report")] + private static partial int _HidSendFeatureReport(nint dev, byte* data, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidSendFeatureReport(nint dev, byte* data, nuint length) + { + Sdl.TraceLog.Trace(); + return _HidSendFeatureReport(dev, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_get_feature_report")] + private static partial int _HidGetFeatureReport(nint dev, byte* data, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidGetFeatureReport(nint dev, byte* data, nuint length) + { + Sdl.TraceLog.Trace(); + return _HidGetFeatureReport(dev, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_get_input_report")] + private static partial int _HidGetInputReport(nint dev, byte* data, nuint length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidGetInputReport(nint dev, byte* data, nuint length) + { + Sdl.TraceLog.Trace(); + return _HidGetInputReport(dev, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_close")] + private static partial int _HidClose(nint dev); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidClose(nint dev) + { + Sdl.TraceLog.Trace(); + return _HidClose(dev); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_get_device_info")] + private static partial SdlHidDeviceInfo* _HidGetDeviceInfo(nint dev); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlHidDeviceInfo* HidGetDeviceInfo(nint dev) + { + Sdl.TraceLog.Trace(); + return _HidGetDeviceInfo(dev); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_get_report_descriptor")] + private static partial int _HidGetReportDescriptor(nint dev, byte* buf, nuint buf_size); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int HidGetReportDescriptor(nint dev, byte* buf, nuint buf_size) + { + Sdl.TraceLog.Trace(); + return _HidGetReportDescriptor(dev, buf, buf_size); + } + + [LibraryImport(Dll, EntryPoint = "SDL_hid_ble_scan")] + private static partial void _HidBleScan(byte active); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void HidBleScan(byte active) + { + Sdl.TraceLog.Trace(); + _HidBleScan(active); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetHintWithPriority", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetHintWithPriority(string name, string value, SdlHintPriority priority); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetHintWithPriority(string name, string value, SdlHintPriority priority) + { + Sdl.TraceLog.Trace(); + return _SetHintWithPriority(name, value, priority); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetHint", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetHint(string name, string value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetHint(string name, string value) + { + Sdl.TraceLog.Trace(); + return _SetHint(name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ResetHint", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _ResetHint(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ResetHint(string name) + { + Sdl.TraceLog.Trace(); + return _ResetHint(name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResetHints")] + private static partial void _ResetHints(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetHints() + { + Sdl.TraceLog.Trace(); + _ResetHints(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetHint", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetHint(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetHint(string name) + { + Sdl.TraceLog.Trace(); + return _GetHint(name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetHintBoolean", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetHintBoolean(string name, byte default_value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetHintBoolean(string name, byte default_value) + { + Sdl.TraceLog.Trace(); + return _GetHintBoolean(name, default_value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_AddHintCallback", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _AddHintCallback( + string name, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AddHintCallback( + string name, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _AddHintCallback(name, callback, userdata); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_RemoveHintCallback", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _RemoveHintCallback( + string name, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveHintCallback( + string name, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _RemoveHintCallback(name, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Init")] + private static partial byte _Init(SdlInitFlags flags); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte Init(SdlInitFlags flags) + { + Sdl.TraceLog.Trace(); + return _Init(flags); + } + + [LibraryImport(Dll, EntryPoint = "SDL_InitSubSystem")] + private static partial byte _InitSubSystem(SdlInitFlags flags); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte InitSubSystem(SdlInitFlags flags) + { + Sdl.TraceLog.Trace(); + return _InitSubSystem(flags); + } + + [LibraryImport(Dll, EntryPoint = "SDL_QuitSubSystem")] + private static partial void _QuitSubSystem(SdlInitFlags flags); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void QuitSubSystem(SdlInitFlags flags) + { + Sdl.TraceLog.Trace(); + _QuitSubSystem(flags); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WasInit")] + private static partial SdlInitFlags _WasInit(SdlInitFlags flags); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlInitFlags WasInit(SdlInitFlags flags) + { + Sdl.TraceLog.Trace(); + return _WasInit(flags); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Quit")] + private static partial void _Quit(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Quit() + { + Sdl.TraceLog.Trace(); + _Quit(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsMainThread")] + private static partial byte _IsMainThread(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsMainThread() + { + Sdl.TraceLog.Trace(); + return _IsMainThread(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RunOnMainThread")] + private static partial byte _RunOnMainThread( + delegate* unmanaged[Cdecl] callback, + void* userdata, + byte wait_complete + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RunOnMainThread( + delegate* unmanaged[Cdecl] callback, + void* userdata, + byte wait_complete + ) + { + Sdl.TraceLog.Trace(); + return _RunOnMainThread(callback, userdata, wait_complete); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetAppMetadata", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetAppMetadata(string appname, string appversion, string appidentifier); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAppMetadata(string appname, string appversion, string appidentifier) + { + Sdl.TraceLog.Trace(); + return _SetAppMetadata(appname, appversion, appidentifier); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetAppMetadataProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetAppMetadataProperty(string name, string value); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetAppMetadataProperty(string name, string value) + { + Sdl.TraceLog.Trace(); + return _SetAppMetadataProperty(name, value); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetAppMetadataProperty", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetAppMetadataProperty(string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetAppMetadataProperty(string name) + { + Sdl.TraceLog.Trace(); + return _GetAppMetadataProperty(name); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadObject", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _LoadObject(string sofile); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint LoadObject(string sofile) + { + Sdl.TraceLog.Trace(); + return _LoadObject(sofile); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LoadFunction", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial delegate* unmanaged[Cdecl] _LoadFunction(nint handle, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static delegate* unmanaged[Cdecl] LoadFunction(nint handle, string name) + { + Sdl.TraceLog.Trace(); + return _LoadFunction(handle, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnloadObject")] + private static partial void _UnloadObject(nint handle); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnloadObject(nint handle) + { + Sdl.TraceLog.Trace(); + _UnloadObject(handle); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPreferredLocales")] + private static partial SdlLocale** _GetPreferredLocales(int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlLocale** GetPreferredLocales(int* count) + { + Sdl.TraceLog.Trace(); + return _GetPreferredLocales(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetLogPriorities")] + private static partial void _SetLogPriorities(SdlLogPriority priority); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLogPriorities(SdlLogPriority priority) + { + Sdl.TraceLog.Trace(); + _SetLogPriorities(priority); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetLogPriority")] + private static partial void _SetLogPriority(int category, SdlLogPriority priority); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLogPriority(int category, SdlLogPriority priority) + { + Sdl.TraceLog.Trace(); + _SetLogPriority(category, priority); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetLogPriority")] + private static partial SdlLogPriority _GetLogPriority(int category); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlLogPriority GetLogPriority(int category) + { + Sdl.TraceLog.Trace(); + return _GetLogPriority(category); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ResetLogPriorities")] + private static partial void _ResetLogPriorities(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetLogPriorities() + { + Sdl.TraceLog.Trace(); + _ResetLogPriorities(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetLogPriorityPrefix", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _SetLogPriorityPrefix(SdlLogPriority priority, string prefix); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetLogPriorityPrefix(SdlLogPriority priority, string prefix) + { + Sdl.TraceLog.Trace(); + return _SetLogPriorityPrefix(priority, prefix); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_LogMessageV", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _LogMessageV(int category, SdlLogPriority priority, string fmt, byte* ap); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LogMessageV(int category, SdlLogPriority priority, string fmt, byte* ap) + { + Sdl.TraceLog.Trace(); + _LogMessageV(category, priority, fmt, ap); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDefaultLogOutputFunction")] + private static partial delegate* unmanaged[Cdecl]< + void*, + int, + SdlLogPriority, + byte*, + void> _GetDefaultLogOutputFunction(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static delegate* unmanaged[Cdecl]< + void*, + int, + SdlLogPriority, + byte*, + void> GetDefaultLogOutputFunction() + { + Sdl.TraceLog.Trace(); + return _GetDefaultLogOutputFunction(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetLogOutputFunction")] + private static partial void _GetLogOutputFunction( + delegate* unmanaged[Cdecl]* callback, + void** userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetLogOutputFunction( + delegate* unmanaged[Cdecl]* callback, + void** userdata + ) + { + Sdl.TraceLog.Trace(); + _GetLogOutputFunction(callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetLogOutputFunction")] + private static partial void _SetLogOutputFunction( + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLogOutputFunction( + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _SetLogOutputFunction(callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ShowMessageBox")] + private static partial byte _ShowMessageBox(SdlMessageBoxData* messageboxdata, int* buttonid); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShowMessageBox(SdlMessageBoxData* messageboxdata, int* buttonid) + { + Sdl.TraceLog.Trace(); + return _ShowMessageBox(messageboxdata, buttonid); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ShowSimpleMessageBox", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _ShowSimpleMessageBox( + SdlMessageBoxFlags flags, + string title, + string message, + SdlWindow window + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ShowSimpleMessageBox( + SdlMessageBoxFlags flags, + string title, + string message, + SdlWindow window + ) + { + Sdl.TraceLog.Trace(); + return _ShowSimpleMessageBox(flags, title, message, window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Metal_CreateView")] + private static partial void* _MetalCreateView(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* MetalCreateView(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _MetalCreateView(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Metal_DestroyView")] + private static partial void _MetalDestroyView(void* view); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void MetalDestroyView(void* view) + { + Sdl.TraceLog.Trace(); + _MetalDestroyView(view); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Metal_GetLayer")] + private static partial void* _MetalGetLayer(void* view); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* MetalGetLayer(void* view) + { + Sdl.TraceLog.Trace(); + return _MetalGetLayer(view); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_OpenURL", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _OpenURL(string url); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte OpenURL(string url) + { + Sdl.TraceLog.Trace(); + return _OpenURL(url); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetPlatform", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetPlatform(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetPlatform() + { + Sdl.TraceLog.Trace(); + return _GetPlatform(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateProcess")] + private static partial nint _CreateProcess(byte** args, byte pipe_stdio); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateProcess(byte** args, byte pipe_stdio) + { + Sdl.TraceLog.Trace(); + return _CreateProcess(args, pipe_stdio); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateProcessWithProperties")] + private static partial nint _CreateProcessWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateProcessWithProperties(uint props) + { + Sdl.TraceLog.Trace(); + return _CreateProcessWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetProcessProperties")] + private static partial uint _GetProcessProperties(nint process); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetProcessProperties(nint process) + { + Sdl.TraceLog.Trace(); + return _GetProcessProperties(process); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ReadProcess")] + private static partial void* _ReadProcess(nint process, nuint* datasize, int* exitcode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* ReadProcess(nint process, nuint* datasize, int* exitcode) + { + Sdl.TraceLog.Trace(); + return _ReadProcess(process, datasize, exitcode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetProcessInput")] + private static partial nint _GetProcessInput(nint process); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetProcessInput(nint process) + { + Sdl.TraceLog.Trace(); + return _GetProcessInput(process); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetProcessOutput")] + private static partial nint _GetProcessOutput(nint process); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetProcessOutput(nint process) + { + Sdl.TraceLog.Trace(); + return _GetProcessOutput(process); + } + + [LibraryImport(Dll, EntryPoint = "SDL_KillProcess")] + private static partial byte _KillProcess(nint process, byte force); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte KillProcess(nint process, byte force) + { + Sdl.TraceLog.Trace(); + return _KillProcess(process, force); + } + + [LibraryImport(Dll, EntryPoint = "SDL_WaitProcess")] + private static partial byte _WaitProcess(nint process, byte block, int* exitcode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WaitProcess(nint process, byte block, int* exitcode) + { + Sdl.TraceLog.Trace(); + return _WaitProcess(process, block, exitcode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyProcess")] + private static partial void _DestroyProcess(nint process); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyProcess(nint process) + { + Sdl.TraceLog.Trace(); + _DestroyProcess(process); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetNumRenderDrivers")] + private static partial int _GetNumRenderDrivers(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetNumRenderDrivers() + { + Sdl.TraceLog.Trace(); + return _GetNumRenderDrivers(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetRenderDriver", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetRenderDriver(int index); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetRenderDriver(int index) + { + Sdl.TraceLog.Trace(); + return _GetRenderDriver(index); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateWindowAndRenderer", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _CreateWindowAndRenderer( + string title, + int width, + int height, + SdlWindowFlags window_flags, + SdlWindow* window, + SdlRenderer* renderer + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CreateWindowAndRenderer( + string title, + int width, + int height, + SdlWindowFlags window_flags, + SdlWindow* window, + SdlRenderer* renderer + ) + { + Sdl.TraceLog.Trace(); + return _CreateWindowAndRenderer(title, width, height, window_flags, window, renderer); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateRenderer", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial SdlRenderer _CreateRenderer(SdlWindow window, string name); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRenderer CreateRenderer(SdlWindow window, string name) + { + Sdl.TraceLog.Trace(); + return _CreateRenderer(window, name); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateRendererWithProperties")] + private static partial SdlRenderer _CreateRendererWithProperties(uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRenderer CreateRendererWithProperties(uint props) + { + Sdl.TraceLog.Trace(); + return _CreateRendererWithProperties(props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPURenderer")] + private static partial SdlRenderer _CreateGpuRenderer(SdlGpuDevice device, SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRenderer CreateGpuRenderer(SdlGpuDevice device, SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _CreateGpuRenderer(device, window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetGPURendererDevice")] + private static partial SdlGpuDevice _GetGpuRendererDevice(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlGpuDevice GetGpuRendererDevice(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetGpuRendererDevice(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateSoftwareRenderer")] + private static partial SdlRenderer _CreateSoftwareRenderer(SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRenderer CreateSoftwareRenderer(SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _CreateSoftwareRenderer(surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderer")] + private static partial SdlRenderer _GetRenderer(SdlWindow window); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRenderer GetRenderer(SdlWindow window) + { + Sdl.TraceLog.Trace(); + return _GetRenderer(window); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderWindow")] + private static partial SdlWindow _GetRenderWindow(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlWindow GetRenderWindow(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetRenderWindow(renderer); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetRendererName", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetRendererName(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetRendererName(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetRendererName(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRendererProperties")] + private static partial uint _GetRendererProperties(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetRendererProperties(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetRendererProperties(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderOutputSize")] + private static partial byte _GetRenderOutputSize(SdlRenderer renderer, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderOutputSize(SdlRenderer renderer, int* w, int* h) + { + Sdl.TraceLog.Trace(); + return _GetRenderOutputSize(renderer, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCurrentRenderOutputSize")] + private static partial byte _GetCurrentRenderOutputSize(SdlRenderer renderer, int* w, int* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetCurrentRenderOutputSize(SdlRenderer renderer, int* w, int* h) + { + Sdl.TraceLog.Trace(); + return _GetCurrentRenderOutputSize(renderer, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateTexture")] + private static partial SdlTexture _CreateTexture( + SdlRenderer renderer, + SdlPixelFormat format, + SdlTextureAccess access, + int w, + int h + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture CreateTexture( + SdlRenderer renderer, + SdlPixelFormat format, + SdlTextureAccess access, + int w, + int h + ) + { + Sdl.TraceLog.Trace(); + return _CreateTexture(renderer, format, access, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateTextureFromSurface")] + private static partial SdlTexture _CreateTextureFromSurface(SdlRenderer renderer, SdlSurface* surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture CreateTextureFromSurface(SdlRenderer renderer, SdlSurface* surface) + { + Sdl.TraceLog.Trace(); + return _CreateTextureFromSurface(renderer, surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateTextureWithProperties")] + private static partial SdlTexture _CreateTextureWithProperties(SdlRenderer renderer, uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture CreateTextureWithProperties(SdlRenderer renderer, uint props) + { + Sdl.TraceLog.Trace(); + return _CreateTextureWithProperties(renderer, props); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureProperties")] + private static partial uint _GetTextureProperties(SdlTexture texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint GetTextureProperties(SdlTexture texture) + { + Sdl.TraceLog.Trace(); + return _GetTextureProperties(texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRendererFromTexture")] + private static partial SdlRenderer _GetRendererFromTexture(SdlTexture texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlRenderer GetRendererFromTexture(SdlTexture texture) + { + Sdl.TraceLog.Trace(); + return _GetRendererFromTexture(texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureSize")] + private static partial byte _GetTextureSize(SdlTexture texture, float* w, float* h); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureSize(SdlTexture texture, float* w, float* h) + { + Sdl.TraceLog.Trace(); + return _GetTextureSize(texture, w, h); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTexturePalette")] + private static partial byte _SetTexturePalette(SdlTexture texture, SdlPalette* palette); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTexturePalette(SdlTexture texture, SdlPalette* palette) + { + Sdl.TraceLog.Trace(); + return _SetTexturePalette(texture, palette); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTexturePalette")] + private static partial SdlPalette* _GetTexturePalette(SdlTexture texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlPalette* GetTexturePalette(SdlTexture texture) + { + Sdl.TraceLog.Trace(); + return _GetTexturePalette(texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextureColorMod")] + private static partial byte _SetTextureColorMod(SdlTexture texture, byte r, byte g, byte b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextureColorMod(SdlTexture texture, byte r, byte g, byte b) + { + Sdl.TraceLog.Trace(); + return _SetTextureColorMod(texture, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextureColorModFloat")] + private static partial byte _SetTextureColorModFloat(SdlTexture texture, float r, float g, float b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextureColorModFloat(SdlTexture texture, float r, float g, float b) + { + Sdl.TraceLog.Trace(); + return _SetTextureColorModFloat(texture, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureColorMod")] + private static partial byte _GetTextureColorMod(SdlTexture texture, byte* r, byte* g, byte* b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureColorMod(SdlTexture texture, byte* r, byte* g, byte* b) + { + Sdl.TraceLog.Trace(); + return _GetTextureColorMod(texture, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureColorModFloat")] + private static partial byte _GetTextureColorModFloat(SdlTexture texture, float* r, float* g, float* b); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureColorModFloat(SdlTexture texture, float* r, float* g, float* b) + { + Sdl.TraceLog.Trace(); + return _GetTextureColorModFloat(texture, r, g, b); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextureAlphaMod")] + private static partial byte _SetTextureAlphaMod(SdlTexture texture, byte alpha); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextureAlphaMod(SdlTexture texture, byte alpha) + { + Sdl.TraceLog.Trace(); + return _SetTextureAlphaMod(texture, alpha); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextureAlphaModFloat")] + private static partial byte _SetTextureAlphaModFloat(SdlTexture texture, float alpha); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextureAlphaModFloat(SdlTexture texture, float alpha) + { + Sdl.TraceLog.Trace(); + return _SetTextureAlphaModFloat(texture, alpha); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureAlphaMod")] + private static partial byte _GetTextureAlphaMod(SdlTexture texture, byte* alpha); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureAlphaMod(SdlTexture texture, byte* alpha) + { + Sdl.TraceLog.Trace(); + return _GetTextureAlphaMod(texture, alpha); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureAlphaModFloat")] + private static partial byte _GetTextureAlphaModFloat(SdlTexture texture, float* alpha); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureAlphaModFloat(SdlTexture texture, float* alpha) + { + Sdl.TraceLog.Trace(); + return _GetTextureAlphaModFloat(texture, alpha); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextureBlendMode")] + private static partial byte _SetTextureBlendMode(SdlTexture texture, uint blendMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextureBlendMode(SdlTexture texture, uint blendMode) + { + Sdl.TraceLog.Trace(); + return _SetTextureBlendMode(texture, blendMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureBlendMode")] + private static partial byte _GetTextureBlendMode(SdlTexture texture, uint* blendMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureBlendMode(SdlTexture texture, uint* blendMode) + { + Sdl.TraceLog.Trace(); + return _GetTextureBlendMode(texture, blendMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTextureScaleMode")] + private static partial byte _SetTextureScaleMode(SdlTexture texture, SdlScaleMode scaleMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetTextureScaleMode(SdlTexture texture, SdlScaleMode scaleMode) + { + Sdl.TraceLog.Trace(); + return _SetTextureScaleMode(texture, scaleMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTextureScaleMode")] + private static partial byte _GetTextureScaleMode(SdlTexture texture, SdlScaleMode* scaleMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTextureScaleMode(SdlTexture texture, SdlScaleMode* scaleMode) + { + Sdl.TraceLog.Trace(); + return _GetTextureScaleMode(texture, scaleMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateTexture")] + private static partial byte _UpdateTexture(SdlTexture texture, SdlRect* rect, void* pixels, int pitch); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateTexture(SdlTexture texture, SdlRect* rect, void* pixels, int pitch) + { + Sdl.TraceLog.Trace(); + return _UpdateTexture(texture, rect, pixels, pitch); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateYUVTexture")] + private static partial byte _UpdateYUVTexture( + SdlTexture texture, + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* Uplane, + int Upitch, + byte* Vplane, + int Vpitch + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateYUVTexture( + SdlTexture texture, + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* Uplane, + int Upitch, + byte* Vplane, + int Vpitch + ) + { + Sdl.TraceLog.Trace(); + return _UpdateYUVTexture(texture, rect, Yplane, Ypitch, Uplane, Upitch, Vplane, Vpitch); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateNVTexture")] + private static partial byte _UpdateNVTexture( + SdlTexture texture, + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* UVplane, + int UVpitch + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte UpdateNVTexture( + SdlTexture texture, + SdlRect* rect, + byte* Yplane, + int Ypitch, + byte* UVplane, + int UVpitch + ) + { + Sdl.TraceLog.Trace(); + return _UpdateNVTexture(texture, rect, Yplane, Ypitch, UVplane, UVpitch); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockTexture")] + private static partial byte _LockTexture(SdlTexture texture, SdlRect* rect, void** pixels, int* pitch); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LockTexture(SdlTexture texture, SdlRect* rect, void** pixels, int* pitch) + { + Sdl.TraceLog.Trace(); + return _LockTexture(texture, rect, pixels, pitch); + } + + [LibraryImport(Dll, EntryPoint = "SDL_LockTextureToSurface")] + private static partial byte _LockTextureToSurface(SdlTexture texture, SdlRect* rect, SdlSurface** surface); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte LockTextureToSurface(SdlTexture texture, SdlRect* rect, SdlSurface** surface) + { + Sdl.TraceLog.Trace(); + return _LockTextureToSurface(texture, rect, surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UnlockTexture")] + private static partial void _UnlockTexture(SdlTexture texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnlockTexture(SdlTexture texture) + { + Sdl.TraceLog.Trace(); + _UnlockTexture(texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderTarget")] + private static partial byte _SetRenderTarget(SdlRenderer renderer, SdlTexture texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderTarget(SdlRenderer renderer, SdlTexture texture) + { + Sdl.TraceLog.Trace(); + return _SetRenderTarget(renderer, texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderTarget")] + private static partial SdlTexture _GetRenderTarget(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlTexture GetRenderTarget(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetRenderTarget(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderLogicalPresentation")] + private static partial byte _SetRenderLogicalPresentation( + SdlRenderer renderer, + int w, + int h, + SdlRendererLogicalPresentation mode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderLogicalPresentation( + SdlRenderer renderer, + int w, + int h, + SdlRendererLogicalPresentation mode + ) + { + Sdl.TraceLog.Trace(); + return _SetRenderLogicalPresentation(renderer, w, h, mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderLogicalPresentation")] + private static partial byte _GetRenderLogicalPresentation( + SdlRenderer renderer, + int* w, + int* h, + SdlRendererLogicalPresentation* mode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderLogicalPresentation( + SdlRenderer renderer, + int* w, + int* h, + SdlRendererLogicalPresentation* mode + ) + { + Sdl.TraceLog.Trace(); + return _GetRenderLogicalPresentation(renderer, w, h, mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderLogicalPresentationRect")] + private static partial byte _GetRenderLogicalPresentationRect(SdlRenderer renderer, SdlFRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderLogicalPresentationRect(SdlRenderer renderer, SdlFRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetRenderLogicalPresentationRect(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderCoordinatesFromWindow")] + private static partial byte _RenderCoordinatesFromWindow( + SdlRenderer renderer, + float window_x, + float window_y, + float* x, + float* y + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderCoordinatesFromWindow( + SdlRenderer renderer, + float window_x, + float window_y, + float* x, + float* y + ) + { + Sdl.TraceLog.Trace(); + return _RenderCoordinatesFromWindow(renderer, window_x, window_y, x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderCoordinatesToWindow")] + private static partial byte _RenderCoordinatesToWindow( + SdlRenderer renderer, + float x, + float y, + float* window_x, + float* window_y + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderCoordinatesToWindow( + SdlRenderer renderer, + float x, + float y, + float* window_x, + float* window_y + ) + { + Sdl.TraceLog.Trace(); + return _RenderCoordinatesToWindow(renderer, x, y, window_x, window_y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ConvertEventToRenderCoordinates")] + private static partial byte _ConvertEventToRenderCoordinates(SdlRenderer renderer, SdlEvent* @event); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ConvertEventToRenderCoordinates(SdlRenderer renderer, SdlEvent* @event) + { + Sdl.TraceLog.Trace(); + return _ConvertEventToRenderCoordinates(renderer, @event); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderViewport")] + private static partial byte _SetRenderViewport(SdlRenderer renderer, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderViewport(SdlRenderer renderer, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _SetRenderViewport(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderViewport")] + private static partial byte _GetRenderViewport(SdlRenderer renderer, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderViewport(SdlRenderer renderer, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetRenderViewport(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderViewportSet")] + private static partial byte _RenderViewportSet(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderViewportSet(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _RenderViewportSet(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderSafeArea")] + private static partial byte _GetRenderSafeArea(SdlRenderer renderer, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderSafeArea(SdlRenderer renderer, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetRenderSafeArea(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderClipRect")] + private static partial byte _SetRenderClipRect(SdlRenderer renderer, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderClipRect(SdlRenderer renderer, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _SetRenderClipRect(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderClipRect")] + private static partial byte _GetRenderClipRect(SdlRenderer renderer, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderClipRect(SdlRenderer renderer, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _GetRenderClipRect(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderClipEnabled")] + private static partial byte _RenderClipEnabled(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderClipEnabled(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _RenderClipEnabled(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderScale")] + private static partial byte _SetRenderScale(SdlRenderer renderer, float scaleX, float scaleY); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderScale(SdlRenderer renderer, float scaleX, float scaleY) + { + Sdl.TraceLog.Trace(); + return _SetRenderScale(renderer, scaleX, scaleY); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderScale")] + private static partial byte _GetRenderScale(SdlRenderer renderer, float* scaleX, float* scaleY); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderScale(SdlRenderer renderer, float* scaleX, float* scaleY) + { + Sdl.TraceLog.Trace(); + return _GetRenderScale(renderer, scaleX, scaleY); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderDrawColor")] + private static partial byte _SetRenderDrawColor(SdlRenderer renderer, byte r, byte g, byte b, byte a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderDrawColor(SdlRenderer renderer, byte r, byte g, byte b, byte a) + { + Sdl.TraceLog.Trace(); + return _SetRenderDrawColor(renderer, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderDrawColorFloat")] + private static partial byte _SetRenderDrawColorFloat( + SdlRenderer renderer, + float r, + float g, + float b, + float a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderDrawColorFloat(SdlRenderer renderer, float r, float g, float b, float a) + { + Sdl.TraceLog.Trace(); + return _SetRenderDrawColorFloat(renderer, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderDrawColor")] + private static partial byte _GetRenderDrawColor(SdlRenderer renderer, byte* r, byte* g, byte* b, byte* a); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderDrawColor(SdlRenderer renderer, byte* r, byte* g, byte* b, byte* a) + { + Sdl.TraceLog.Trace(); + return _GetRenderDrawColor(renderer, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderDrawColorFloat")] + private static partial byte _GetRenderDrawColorFloat( + SdlRenderer renderer, + float* r, + float* g, + float* b, + float* a + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderDrawColorFloat(SdlRenderer renderer, float* r, float* g, float* b, float* a) + { + Sdl.TraceLog.Trace(); + return _GetRenderDrawColorFloat(renderer, r, g, b, a); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderColorScale")] + private static partial byte _SetRenderColorScale(SdlRenderer renderer, float scale); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderColorScale(SdlRenderer renderer, float scale) + { + Sdl.TraceLog.Trace(); + return _SetRenderColorScale(renderer, scale); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderColorScale")] + private static partial byte _GetRenderColorScale(SdlRenderer renderer, float* scale); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderColorScale(SdlRenderer renderer, float* scale) + { + Sdl.TraceLog.Trace(); + return _GetRenderColorScale(renderer, scale); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderDrawBlendMode")] + private static partial byte _SetRenderDrawBlendMode(SdlRenderer renderer, uint blendMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderDrawBlendMode(SdlRenderer renderer, uint blendMode) + { + Sdl.TraceLog.Trace(); + return _SetRenderDrawBlendMode(renderer, blendMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderDrawBlendMode")] + private static partial byte _GetRenderDrawBlendMode(SdlRenderer renderer, uint* blendMode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderDrawBlendMode(SdlRenderer renderer, uint* blendMode) + { + Sdl.TraceLog.Trace(); + return _GetRenderDrawBlendMode(renderer, blendMode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderClear")] + private static partial byte _RenderClear(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderClear(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _RenderClear(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderPoint")] + private static partial byte _RenderPoint(SdlRenderer renderer, float x, float y); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderPoint(SdlRenderer renderer, float x, float y) + { + Sdl.TraceLog.Trace(); + return _RenderPoint(renderer, x, y); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderPoints")] + private static partial byte _RenderPoints(SdlRenderer renderer, SdlFPoint* points, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderPoints(SdlRenderer renderer, SdlFPoint* points, int count) + { + Sdl.TraceLog.Trace(); + return _RenderPoints(renderer, points, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderLine")] + private static partial byte _RenderLine(SdlRenderer renderer, float x1, float y1, float x2, float y2); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderLine(SdlRenderer renderer, float x1, float y1, float x2, float y2) + { + Sdl.TraceLog.Trace(); + return _RenderLine(renderer, x1, y1, x2, y2); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderLines")] + private static partial byte _RenderLines(SdlRenderer renderer, SdlFPoint* points, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderLines(SdlRenderer renderer, SdlFPoint* points, int count) + { + Sdl.TraceLog.Trace(); + return _RenderLines(renderer, points, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderRect")] + private static partial byte _RenderRect(SdlRenderer renderer, SdlFRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderRect(SdlRenderer renderer, SdlFRect* rect) + { + Sdl.TraceLog.Trace(); + return _RenderRect(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderRects")] + private static partial byte _RenderRects(SdlRenderer renderer, SdlFRect* rects, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderRects(SdlRenderer renderer, SdlFRect* rects, int count) + { + Sdl.TraceLog.Trace(); + return _RenderRects(renderer, rects, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderFillRect")] + private static partial byte _RenderFillRect(SdlRenderer renderer, SdlFRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderFillRect(SdlRenderer renderer, SdlFRect* rect) + { + Sdl.TraceLog.Trace(); + return _RenderFillRect(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderFillRects")] + private static partial byte _RenderFillRects(SdlRenderer renderer, SdlFRect* rects, int count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderFillRects(SdlRenderer renderer, SdlFRect* rects, int count) + { + Sdl.TraceLog.Trace(); + return _RenderFillRects(renderer, rects, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderTexture")] + private static partial byte _RenderTexture( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderTexture( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect + ) + { + Sdl.TraceLog.Trace(); + return _RenderTexture(renderer, texture, srcrect, dstrect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderTextureRotated")] + private static partial byte _RenderTextureRotated( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect, + double angle, + SdlFPoint* center, + SdlFlipMode flip + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderTextureRotated( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFRect* dstrect, + double angle, + SdlFPoint* center, + SdlFlipMode flip + ) + { + Sdl.TraceLog.Trace(); + return _RenderTextureRotated(renderer, texture, srcrect, dstrect, angle, center, flip); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderTextureAffine")] + private static partial byte _RenderTextureAffine( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFPoint* origin, + SdlFPoint* right, + SdlFPoint* down + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderTextureAffine( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + SdlFPoint* origin, + SdlFPoint* right, + SdlFPoint* down + ) + { + Sdl.TraceLog.Trace(); + return _RenderTextureAffine(renderer, texture, srcrect, origin, right, down); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderTextureTiled")] + private static partial byte _RenderTextureTiled( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float scale, + SdlFRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderTextureTiled( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float scale, + SdlFRect* dstrect + ) + { + Sdl.TraceLog.Trace(); + return _RenderTextureTiled(renderer, texture, srcrect, scale, dstrect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderTexture9Grid")] + private static partial byte _RenderTexture9Grid( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderTexture9Grid( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect + ) + { + Sdl.TraceLog.Trace(); + return _RenderTexture9Grid( + renderer, + texture, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + dstrect + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderTexture9GridTiled")] + private static partial byte _RenderTexture9GridTiled( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect, + float tileScale + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderTexture9GridTiled( + SdlRenderer renderer, + SdlTexture texture, + SdlFRect* srcrect, + float left_width, + float right_width, + float top_height, + float bottom_height, + float scale, + SdlFRect* dstrect, + float tileScale + ) + { + Sdl.TraceLog.Trace(); + return _RenderTexture9GridTiled( + renderer, + texture, + srcrect, + left_width, + right_width, + top_height, + bottom_height, + scale, + dstrect, + tileScale + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderGeometry")] + private static partial byte _RenderGeometry( + SdlRenderer renderer, + SdlTexture texture, + SdlVertex* vertices, + int num_vertices, + int* indices, + int num_indices + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderGeometry( + SdlRenderer renderer, + SdlTexture texture, + SdlVertex* vertices, + int num_vertices, + int* indices, + int num_indices + ) + { + Sdl.TraceLog.Trace(); + return _RenderGeometry(renderer, texture, vertices, num_vertices, indices, num_indices); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderGeometryRaw")] + private static partial byte _RenderGeometryRaw( + SdlRenderer renderer, + SdlTexture texture, + float* xy, + int xy_stride, + SdlFColor* color, + int color_stride, + float* uv, + int uv_stride, + int num_vertices, + void* indices, + int num_indices, + int size_indices + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderGeometryRaw( + SdlRenderer renderer, + SdlTexture texture, + float* xy, + int xy_stride, + SdlFColor* color, + int color_stride, + float* uv, + int uv_stride, + int num_vertices, + void* indices, + int num_indices, + int size_indices + ) + { + Sdl.TraceLog.Trace(); + return _RenderGeometryRaw( + renderer, + texture, + xy, + xy_stride, + color, + color_stride, + uv, + uv_stride, + num_vertices, + indices, + num_indices, + size_indices + ); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderTextureAddressMode")] + private static partial byte _SetRenderTextureAddressMode( + SdlRenderer renderer, + SdlTextureAddressMode u_mode, + SdlTextureAddressMode v_mode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderTextureAddressMode( + SdlRenderer renderer, + SdlTextureAddressMode u_mode, + SdlTextureAddressMode v_mode + ) + { + Sdl.TraceLog.Trace(); + return _SetRenderTextureAddressMode(renderer, u_mode, v_mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderTextureAddressMode")] + private static partial byte _GetRenderTextureAddressMode( + SdlRenderer renderer, + SdlTextureAddressMode* u_mode, + SdlTextureAddressMode* v_mode + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderTextureAddressMode( + SdlRenderer renderer, + SdlTextureAddressMode* u_mode, + SdlTextureAddressMode* v_mode + ) + { + Sdl.TraceLog.Trace(); + return _GetRenderTextureAddressMode(renderer, u_mode, v_mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderReadPixels")] + private static partial SdlSurface* _RenderReadPixels(SdlRenderer renderer, SdlRect* rect); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSurface* RenderReadPixels(SdlRenderer renderer, SdlRect* rect) + { + Sdl.TraceLog.Trace(); + return _RenderReadPixels(renderer, rect); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RenderPresent")] + private static partial byte _RenderPresent(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderPresent(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _RenderPresent(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyTexture")] + private static partial void _DestroyTexture(SdlTexture texture); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyTexture(SdlTexture texture) + { + Sdl.TraceLog.Trace(); + _DestroyTexture(texture); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyRenderer")] + private static partial void _DestroyRenderer(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyRenderer(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + _DestroyRenderer(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_FlushRenderer")] + private static partial byte _FlushRenderer(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte FlushRenderer(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _FlushRenderer(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderMetalLayer")] + private static partial void* _GetRenderMetalLayer(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetRenderMetalLayer(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetRenderMetalLayer(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderMetalCommandEncoder")] + private static partial void* _GetRenderMetalCommandEncoder(SdlRenderer renderer); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void* GetRenderMetalCommandEncoder(SdlRenderer renderer) + { + Sdl.TraceLog.Trace(); + return _GetRenderMetalCommandEncoder(renderer); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddVulkanRenderSemaphores")] + private static partial byte _AddVulkanRenderSemaphores( + SdlRenderer renderer, + uint wait_stage_mask, + long wait_semaphore, + long signal_semaphore + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte AddVulkanRenderSemaphores( + SdlRenderer renderer, + uint wait_stage_mask, + long wait_semaphore, + long signal_semaphore + ) + { + Sdl.TraceLog.Trace(); + return _AddVulkanRenderSemaphores(renderer, wait_stage_mask, wait_semaphore, signal_semaphore); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetRenderVSync")] + private static partial byte _SetRenderVSync(SdlRenderer renderer, int vsync); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetRenderVSync(SdlRenderer renderer, int vsync) + { + Sdl.TraceLog.Trace(); + return _SetRenderVSync(renderer, vsync); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetRenderVSync")] + private static partial byte _GetRenderVSync(SdlRenderer renderer, int* vsync); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetRenderVSync(SdlRenderer renderer, int* vsync) + { + Sdl.TraceLog.Trace(); + return _GetRenderVSync(renderer, vsync); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_RenderDebugText", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _RenderDebugText(SdlRenderer renderer, float x, float y, string str); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenderDebugText(SdlRenderer renderer, float x, float y, string str) + { + Sdl.TraceLog.Trace(); + return _RenderDebugText(renderer, x, y, str); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetDefaultTextureScaleMode")] + private static partial byte _SetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode scale_mode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode scale_mode) + { + Sdl.TraceLog.Trace(); + return _SetDefaultTextureScaleMode(renderer, scale_mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDefaultTextureScaleMode")] + private static partial byte _GetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode* scale_mode); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetDefaultTextureScaleMode(SdlRenderer renderer, SdlScaleMode* scale_mode) + { + Sdl.TraceLog.Trace(); + return _GetDefaultTextureScaleMode(renderer, scale_mode); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateGPURenderState")] + private static partial nint _CreateGpuRenderState( + SdlRenderer renderer, + SdlGpuRenderStateCreateInfo* createinfo + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateGpuRenderState(SdlRenderer renderer, SdlGpuRenderStateCreateInfo* createinfo) + { + Sdl.TraceLog.Trace(); + return _CreateGpuRenderState(renderer, createinfo); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPURenderStateFragmentUniforms")] + private static partial byte _SetGpuRenderStateFragmentUniforms( + nint state, + uint slot_index, + void* data, + uint length + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGpuRenderStateFragmentUniforms(nint state, uint slot_index, void* data, uint length) + { + Sdl.TraceLog.Trace(); + return _SetGpuRenderStateFragmentUniforms(state, slot_index, data, length); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetGPURenderState")] + private static partial byte _SetGpuRenderState(SdlRenderer renderer, nint state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte SetGpuRenderState(SdlRenderer renderer, nint state) + { + Sdl.TraceLog.Trace(); + return _SetGpuRenderState(renderer, state); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyGPURenderState")] + private static partial void _DestroyGpuRenderState(nint state); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyGpuRenderState(nint state) + { + Sdl.TraceLog.Trace(); + _DestroyGpuRenderState(state); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_OpenTitleStorage", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _OpenTitleStorage(string @override, uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenTitleStorage(string @override, uint props) + { + Sdl.TraceLog.Trace(); + return _OpenTitleStorage(@override, props); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_OpenUserStorage", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _OpenUserStorage(string org, string app, uint props); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenUserStorage(string org, string app, uint props) + { + Sdl.TraceLog.Trace(); + return _OpenUserStorage(org, app, props); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_OpenFileStorage", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _OpenFileStorage(string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenFileStorage(string path) + { + Sdl.TraceLog.Trace(); + return _OpenFileStorage(path); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OpenStorage")] + private static partial nint _OpenStorage(SdlStorageInterface* iface, void* userdata); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint OpenStorage(SdlStorageInterface* iface, void* userdata) + { + Sdl.TraceLog.Trace(); + return _OpenStorage(iface, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CloseStorage")] + private static partial byte _CloseStorage(nint storage); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CloseStorage(nint storage) + { + Sdl.TraceLog.Trace(); + return _CloseStorage(storage); + } + + [LibraryImport(Dll, EntryPoint = "SDL_StorageReady")] + private static partial byte _StorageReady(nint storage); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte StorageReady(nint storage) + { + Sdl.TraceLog.Trace(); + return _StorageReady(storage); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetStorageFileSize", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetStorageFileSize(nint storage, string path, ulong* length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetStorageFileSize(nint storage, string path, ulong* length) + { + Sdl.TraceLog.Trace(); + return _GetStorageFileSize(storage, path, length); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_ReadStorageFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _ReadStorageFile(nint storage, string path, void* destination, ulong length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte ReadStorageFile(nint storage, string path, void* destination, ulong length) + { + Sdl.TraceLog.Trace(); + return _ReadStorageFile(storage, path, destination, length); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_WriteStorageFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _WriteStorageFile(nint storage, string path, void* source, ulong length); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte WriteStorageFile(nint storage, string path, void* source, ulong length) + { + Sdl.TraceLog.Trace(); + return _WriteStorageFile(storage, path, source, length); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateStorageDirectory", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _CreateStorageDirectory(nint storage, string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CreateStorageDirectory(nint storage, string path) + { + Sdl.TraceLog.Trace(); + return _CreateStorageDirectory(storage, path); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_EnumerateStorageDirectory", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _EnumerateStorageDirectory( + nint storage, + string path, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte EnumerateStorageDirectory( + nint storage, + string path, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _EnumerateStorageDirectory(storage, path, callback, userdata); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_RemoveStoragePath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _RemoveStoragePath(nint storage, string path); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RemoveStoragePath(nint storage, string path) + { + Sdl.TraceLog.Trace(); + return _RemoveStoragePath(storage, path); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_RenameStoragePath", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _RenameStoragePath(nint storage, string oldpath, string newpath); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RenameStoragePath(nint storage, string oldpath, string newpath) + { + Sdl.TraceLog.Trace(); + return _RenameStoragePath(storage, oldpath, newpath); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CopyStorageFile", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _CopyStorageFile(nint storage, string oldpath, string newpath); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte CopyStorageFile(nint storage, string oldpath, string newpath) + { + Sdl.TraceLog.Trace(); + return _CopyStorageFile(storage, oldpath, newpath); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetStoragePathInfo", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte _GetStoragePathInfo(nint storage, string path, SdlPathInfo* info); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetStoragePathInfo(nint storage, string path, SdlPathInfo* info) + { + Sdl.TraceLog.Trace(); + return _GetStoragePathInfo(storage, path, info); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetStorageSpaceRemaining")] + private static partial ulong _GetStorageSpaceRemaining(nint storage); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetStorageSpaceRemaining(nint storage) + { + Sdl.TraceLog.Trace(); + return _GetStorageSpaceRemaining(storage); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GlobStorageDirectory", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial byte** _GlobStorageDirectory( + nint storage, + string path, + string pattern, + SdlGlobFlags flags, + int* count + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** GlobStorageDirectory( + nint storage, + string path, + string pattern, + SdlGlobFlags flags, + int* count + ) + { + Sdl.TraceLog.Trace(); + return _GlobStorageDirectory(storage, path, pattern, flags, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetX11EventHook")] + private static partial void _SetX11EventHook( + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetX11EventHook(delegate* unmanaged[Cdecl] callback, void* userdata) + { + Sdl.TraceLog.Trace(); + _SetX11EventHook(callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsTablet")] + private static partial byte _IsTablet(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsTablet() + { + Sdl.TraceLog.Trace(); + return _IsTablet(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_IsTV")] + private static partial byte _IsTV(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte IsTV() + { + Sdl.TraceLog.Trace(); + return _IsTV(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetSandbox")] + private static partial SdlSandbox _GetSandbox(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static SdlSandbox GetSandbox() + { + Sdl.TraceLog.Trace(); + return _GetSandbox(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OnApplicationWillTerminate")] + private static partial void _OnApplicationWillTerminate(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void OnApplicationWillTerminate() + { + Sdl.TraceLog.Trace(); + _OnApplicationWillTerminate(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OnApplicationDidReceiveMemoryWarning")] + private static partial void _OnApplicationDidReceiveMemoryWarning(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void OnApplicationDidReceiveMemoryWarning() + { + Sdl.TraceLog.Trace(); + _OnApplicationDidReceiveMemoryWarning(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OnApplicationWillEnterBackground")] + private static partial void _OnApplicationWillEnterBackground(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void OnApplicationWillEnterBackground() + { + Sdl.TraceLog.Trace(); + _OnApplicationWillEnterBackground(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OnApplicationDidEnterBackground")] + private static partial void _OnApplicationDidEnterBackground(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void OnApplicationDidEnterBackground() + { + Sdl.TraceLog.Trace(); + _OnApplicationDidEnterBackground(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OnApplicationWillEnterForeground")] + private static partial void _OnApplicationWillEnterForeground(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void OnApplicationWillEnterForeground() + { + Sdl.TraceLog.Trace(); + _OnApplicationWillEnterForeground(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_OnApplicationDidEnterForeground")] + private static partial void _OnApplicationDidEnterForeground(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void OnApplicationDidEnterForeground() + { + Sdl.TraceLog.Trace(); + _OnApplicationDidEnterForeground(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDateTimeLocalePreferences")] + private static partial byte _GetDateTimeLocalePreferences( + SdlDateFormat* dateFormat, + SdlTimeFormat* timeFormat + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetDateTimeLocalePreferences(SdlDateFormat* dateFormat, SdlTimeFormat* timeFormat) + { + Sdl.TraceLog.Trace(); + return _GetDateTimeLocalePreferences(dateFormat, timeFormat); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetCurrentTime")] + private static partial byte _GetCurrentTime(long* ticks); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetCurrentTime(long* ticks) + { + Sdl.TraceLog.Trace(); + return _GetCurrentTime(ticks); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TimeToDateTime")] + private static partial byte _TimeToDateTime(long ticks, SdlDateTime* dt, byte localTime); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte TimeToDateTime(long ticks, SdlDateTime* dt, byte localTime) + { + Sdl.TraceLog.Trace(); + return _TimeToDateTime(ticks, dt, localTime); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DateTimeToTime")] + private static partial byte _DateTimeToTime(SdlDateTime* dt, long* ticks); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte DateTimeToTime(SdlDateTime* dt, long* ticks) + { + Sdl.TraceLog.Trace(); + return _DateTimeToTime(dt, ticks); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TimeToWindows")] + private static partial void _TimeToWindows(long ticks, uint* dwLowDateTime, uint* dwHighDateTime); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void TimeToWindows(long ticks, uint* dwLowDateTime, uint* dwHighDateTime) + { + Sdl.TraceLog.Trace(); + _TimeToWindows(ticks, dwLowDateTime, dwHighDateTime); + } + + [LibraryImport(Dll, EntryPoint = "SDL_TimeFromWindows")] + private static partial long _TimeFromWindows(uint dwLowDateTime, uint dwHighDateTime); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long TimeFromWindows(uint dwLowDateTime, uint dwHighDateTime) + { + Sdl.TraceLog.Trace(); + return _TimeFromWindows(dwLowDateTime, dwHighDateTime); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDaysInMonth")] + private static partial int _GetDaysInMonth(int year, int month); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetDaysInMonth(int year, int month) + { + Sdl.TraceLog.Trace(); + return _GetDaysInMonth(year, month); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDayOfYear")] + private static partial int _GetDayOfYear(int year, int month, int day); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetDayOfYear(int year, int month, int day) + { + Sdl.TraceLog.Trace(); + return _GetDayOfYear(year, month, day); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetDayOfWeek")] + private static partial int _GetDayOfWeek(int year, int month, int day); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetDayOfWeek(int year, int month, int day) + { + Sdl.TraceLog.Trace(); + return _GetDayOfWeek(year, month, day); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTicks")] + private static partial ulong _GetTicks(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetTicks() + { + Sdl.TraceLog.Trace(); + return _GetTicks(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTicksNS")] + private static partial ulong _GetTicksNS(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetTicksNS() + { + Sdl.TraceLog.Trace(); + return _GetTicksNS(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPerformanceCounter")] + private static partial ulong _GetPerformanceCounter(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetPerformanceCounter() + { + Sdl.TraceLog.Trace(); + return _GetPerformanceCounter(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetPerformanceFrequency")] + private static partial ulong _GetPerformanceFrequency(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong GetPerformanceFrequency() + { + Sdl.TraceLog.Trace(); + return _GetPerformanceFrequency(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Delay")] + private static partial void _Delay(uint ms); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Delay(uint ms) + { + Sdl.TraceLog.Trace(); + _Delay(ms); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DelayNS")] + private static partial void _DelayNS(ulong ns); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DelayNS(ulong ns) + { + Sdl.TraceLog.Trace(); + _DelayNS(ns); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DelayPrecise")] + private static partial void _DelayPrecise(ulong ns); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DelayPrecise(ulong ns) + { + Sdl.TraceLog.Trace(); + _DelayPrecise(ns); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddTimer")] + private static partial uint _AddTimer( + uint interval, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint AddTimer( + uint interval, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _AddTimer(interval, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_AddTimerNS")] + private static partial uint _AddTimerNS( + ulong interval, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint AddTimerNS( + ulong interval, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + return _AddTimerNS(interval, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RemoveTimer")] + private static partial byte _RemoveTimer(uint id); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte RemoveTimer(uint id) + { + Sdl.TraceLog.Trace(); + return _RemoveTimer(id); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_CreateTray", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _CreateTray(SdlSurface* icon, string tooltip); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateTray(SdlSurface* icon, string tooltip) + { + Sdl.TraceLog.Trace(); + return _CreateTray(icon, tooltip); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTrayIcon")] + private static partial void _SetTrayIcon(nint tray, SdlSurface* icon); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTrayIcon(nint tray, SdlSurface* icon) + { + Sdl.TraceLog.Trace(); + _SetTrayIcon(tray, icon); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetTrayTooltip", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _SetTrayTooltip(nint tray, string tooltip); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTrayTooltip(nint tray, string tooltip) + { + Sdl.TraceLog.Trace(); + _SetTrayTooltip(tray, tooltip); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateTrayMenu")] + private static partial nint _CreateTrayMenu(nint tray); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateTrayMenu(nint tray) + { + Sdl.TraceLog.Trace(); + return _CreateTrayMenu(tray); + } + + [LibraryImport(Dll, EntryPoint = "SDL_CreateTraySubmenu")] + private static partial nint _CreateTraySubmenu(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint CreateTraySubmenu(nint entry) + { + Sdl.TraceLog.Trace(); + return _CreateTraySubmenu(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayMenu")] + private static partial nint _GetTrayMenu(nint tray); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetTrayMenu(nint tray) + { + Sdl.TraceLog.Trace(); + return _GetTrayMenu(tray); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTraySubmenu")] + private static partial nint _GetTraySubmenu(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetTraySubmenu(nint entry) + { + Sdl.TraceLog.Trace(); + return _GetTraySubmenu(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntries")] + private static partial nint* _GetTrayEntries(nint menu, int* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint* GetTrayEntries(nint menu, int* count) + { + Sdl.TraceLog.Trace(); + return _GetTrayEntries(menu, count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_RemoveTrayEntry")] + private static partial void _RemoveTrayEntry(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void RemoveTrayEntry(nint entry) + { + Sdl.TraceLog.Trace(); + _RemoveTrayEntry(entry); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_InsertTrayEntryAt", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial nint _InsertTrayEntryAt(nint menu, int pos, string label, SdlTrayEntryFlags flags); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint InsertTrayEntryAt(nint menu, int pos, string label, SdlTrayEntryFlags flags) + { + Sdl.TraceLog.Trace(); + return _InsertTrayEntryAt(menu, pos, label, flags); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_SetTrayEntryLabel", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _SetTrayEntryLabel(nint entry, string label); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTrayEntryLabel(nint entry, string label) + { + Sdl.TraceLog.Trace(); + _SetTrayEntryLabel(entry, label); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetTrayEntryLabel", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetTrayEntryLabel(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetTrayEntryLabel(nint entry) + { + Sdl.TraceLog.Trace(); + return _GetTrayEntryLabel(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTrayEntryChecked")] + private static partial void _SetTrayEntryChecked(nint entry, byte @checked); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTrayEntryChecked(nint entry, byte @checked) + { + Sdl.TraceLog.Trace(); + _SetTrayEntryChecked(entry, @checked); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntryChecked")] + private static partial byte _GetTrayEntryChecked(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTrayEntryChecked(nint entry) + { + Sdl.TraceLog.Trace(); + return _GetTrayEntryChecked(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTrayEntryEnabled")] + private static partial void _SetTrayEntryEnabled(nint entry, byte enabled); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTrayEntryEnabled(nint entry, byte enabled) + { + Sdl.TraceLog.Trace(); + _SetTrayEntryEnabled(entry, enabled); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntryEnabled")] + private static partial byte _GetTrayEntryEnabled(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte GetTrayEntryEnabled(nint entry) + { + Sdl.TraceLog.Trace(); + return _GetTrayEntryEnabled(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_SetTrayEntryCallback")] + private static partial void _SetTrayEntryCallback( + nint entry, + delegate* unmanaged[Cdecl] callback, + void* userdata + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTrayEntryCallback( + nint entry, + delegate* unmanaged[Cdecl] callback, + void* userdata + ) + { + Sdl.TraceLog.Trace(); + _SetTrayEntryCallback(entry, callback, userdata); + } + + [LibraryImport(Dll, EntryPoint = "SDL_ClickTrayEntry")] + private static partial void _ClickTrayEntry(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ClickTrayEntry(nint entry) + { + Sdl.TraceLog.Trace(); + _ClickTrayEntry(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_DestroyTray")] + private static partial void _DestroyTray(nint tray); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyTray(nint tray) + { + Sdl.TraceLog.Trace(); + _DestroyTray(tray); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayEntryParent")] + private static partial nint _GetTrayEntryParent(nint entry); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetTrayEntryParent(nint entry) + { + Sdl.TraceLog.Trace(); + return _GetTrayEntryParent(entry); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayMenuParentEntry")] + private static partial nint _GetTrayMenuParentEntry(nint menu); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetTrayMenuParentEntry(nint menu) + { + Sdl.TraceLog.Trace(); + return _GetTrayMenuParentEntry(menu); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetTrayMenuParentTray")] + private static partial nint _GetTrayMenuParentTray(nint menu); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetTrayMenuParentTray(nint menu) + { + Sdl.TraceLog.Trace(); + return _GetTrayMenuParentTray(menu); + } + + [LibraryImport(Dll, EntryPoint = "SDL_UpdateTrays")] + private static partial void _UpdateTrays(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UpdateTrays() + { + Sdl.TraceLog.Trace(); + _UpdateTrays(); + } + + [LibraryImport(Dll, EntryPoint = "SDL_GetVersion")] + private static partial int _GetVersion(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetVersion() + { + Sdl.TraceLog.Trace(); + return _GetVersion(); + } + + [LibraryImport( + Dll, + EntryPoint = "SDL_GetRevision", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial string? _GetRevision(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string? GetRevision() + { + Sdl.TraceLog.Trace(); + return _GetRevision(); + } + } + } +} diff --git a/Brutal.Sdl/Generated/Sdl.Structs.gen.cs b/Brutal.Sdl/Generated/Sdl.Structs.gen.cs new file mode 100644 index 0000000..f2817c1 --- /dev/null +++ b/Brutal.Sdl/Generated/Sdl.Structs.gen.cs @@ -0,0 +1,1521 @@ +// +// Generated by Brutal.Sdl.Generate; do not edit by hand. +#nullable enable + +namespace Brutal.SdlApi +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlAssertData + { + public byte always_ignore; + public uint trigger_count; + public byte* condition; + public byte* filename; + public int linenum; + public byte* function; + public SdlAssertData* next; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlAsyncIOOutcome + { + public nint asyncio; + public SdlAsyncIOTaskType type; + public SdlAsyncIOResult result; + public void* buffer; + public ulong offset; + public ulong bytes_requested; + public ulong bytes_transferred; + public void* userdata; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlAtomicInt + { + public int value; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlAtomicU32 + { + public uint value; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlInitState + { + public SdlAtomicInt status; + public ulong thread; + public void* reserved; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlIOStreamInterface + { + public uint version; + public delegate* unmanaged[Cdecl] size; + public delegate* unmanaged[Cdecl] seek; + public delegate* unmanaged[Cdecl] read; + public delegate* unmanaged[Cdecl] write; + public delegate* unmanaged[Cdecl] flush; + public delegate* unmanaged[Cdecl] close; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlAudioSpec + { + public SdlAudioFormat format; + public int channels; + public int freq; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlColor + { + public byte r; + public byte g; + public byte b; + public byte a; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlFColor + { + public float r; + public float g; + public float b; + public float a; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlPalette + { + public int ncolors; + public SdlColor* colors; + public uint version; + public int refcount; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlPixelFormatDetails + { + public SdlPixelFormat format; + public byte bits_per_pixel; + public byte bytes_per_pixel; + public fixed byte padding[2]; + public uint Rmask; + public uint Gmask; + public uint Bmask; + public uint Amask; + public byte Rbits; + public byte Gbits; + public byte Bbits; + public byte Abits; + public byte Rshift; + public byte Gshift; + public byte Bshift; + public byte Ashift; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPoint + { + public int x; + public int y; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlFPoint + { + public float x; + public float y; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlRect + { + public int x; + public int y; + public int w; + public int h; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlFRect + { + public float x; + public float y; + public float w; + public float h; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlSurface + { + public SdlSurfaceFlags flags; + public SdlPixelFormat format; + public int w; + public int h; + public int pitch; + public void* pixels; + public int refcount; + public void* reserved; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlCameraSpec + { + public SdlPixelFormat format; + public SdlColorspace colorspace; + public int width; + public int height; + public int framerate_numerator; + public int framerate_denominator; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlDisplayMode + { + public uint displayID; + public SdlPixelFormat format; + public int w; + public int h; + public float pixel_density; + public float refresh_rate; + public int refresh_rate_numerator; + public int refresh_rate_denominator; + public nint @internal; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlDialogFileFilter + { + public byte* name; + public byte* pattern; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGuid + { + public fixed byte data[16]; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlVirtualJoystickTouchpadDesc + { + public ushort nfingers; + public fixed ushort padding[3]; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlVirtualJoystickSensorDesc + { + public SdlSensorType type; + public float rate; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlVirtualJoystickDesc + { + public uint version; + public ushort type; + public ushort padding; + public ushort vendor_id; + public ushort product_id; + public ushort naxes; + public ushort nbuttons; + public ushort nballs; + public ushort nhats; + public ushort ntouchpads; + public ushort nsensors; + public fixed ushort padding2[2]; + public uint button_mask; + public uint axis_mask; + public byte* name; + public SdlVirtualJoystickTouchpadDesc* touchpads; + public SdlVirtualJoystickSensorDesc* sensors; + public void* userdata; + public delegate* unmanaged[Cdecl] Update; + public delegate* unmanaged[Cdecl] SetPlayerIndex; + public delegate* unmanaged[Cdecl] Rumble; + public delegate* unmanaged[Cdecl] RumbleTriggers; + public delegate* unmanaged[Cdecl] SetLED; + public delegate* unmanaged[Cdecl] SendEffect; + public delegate* unmanaged[Cdecl] SetSensorsEnabled; + public delegate* unmanaged[Cdecl] Cleanup; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlCursorFrameInfo + { + public SdlSurface* surface; + public uint duration; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlFinger + { + public ulong id; + public float x; + public float y; + public float pressure; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlCommonEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlDisplayEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint displayID; + public int data1; + public int data2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlWindowEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public int data1; + public int data2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlKeyboardDeviceEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlKeyboardEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public SdlScancode scancode; + public SdlKeycode key; + public ushort mod; + public ushort raw; + public byte down; + public byte repeat; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlTextEditingEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public byte* text; + public int start; + public int length; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlTextEditingCandidatesEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public byte** candidates; + public int num_candidates; + public int selected_candidate; + public byte horizontal; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlTextInputEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public byte* text; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlMouseDeviceEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlMouseMotionEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public SdlMouseButtonFlags state; + public float x; + public float y; + public float xrel; + public float yrel; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlMouseButtonEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public byte button; + public byte down; + public byte clicks; + public byte padding; + public float x; + public float y; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlMouseWheelEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public float x; + public float y; + public SdlMouseWheelDirection direction; + public float mouse_x; + public float mouse_y; + public int integer_x; + public int integer_y; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlJoyAxisEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte axis; + public byte padding1; + public byte padding2; + public byte padding3; + public short value; + public ushort padding4; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlJoyBallEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte ball; + public byte padding1; + public byte padding2; + public byte padding3; + public short xrel; + public short yrel; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlJoyHatEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte hat; + public byte value; + public byte padding1; + public byte padding2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlJoyButtonEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte button; + public byte down; + public byte padding1; + public byte padding2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlJoyDeviceEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlJoyBatteryEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public SdlPowerState state; + public int percent; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGamepadAxisEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte axis; + public byte padding1; + public byte padding2; + public byte padding3; + public short value; + public ushort padding4; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGamepadButtonEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte button; + public byte down; + public byte padding1; + public byte padding2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGamepadDeviceEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGamepadTouchpadEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public int touchpad; + public int finger; + public float x; + public float y; + public float pressure; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGamepadSensorEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public int sensor; + public fixed float data[3]; + public ulong sensor_timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlAudioDeviceEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public byte recording; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlCameraDeviceEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlRenderEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlTouchFingerEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public ulong touchID; + public ulong fingerID; + public float x; + public float y; + public float dx; + public float dy; + public float pressure; + public uint windowID; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPinchFingerEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public float scale; + public uint windowID; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPenProximityEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPenMotionEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public SdlPenInputFlags pen_state; + public float x; + public float y; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPenTouchEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public SdlPenInputFlags pen_state; + public float x; + public float y; + public byte eraser; + public byte down; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPenButtonEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public SdlPenInputFlags pen_state; + public float x; + public float y; + public byte button; + public byte down; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPenAxisEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public uint which; + public SdlPenInputFlags pen_state; + public float x; + public float y; + public SdlPenAxis axis; + public float value; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlDropEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public float x; + public float y; + public byte* source; + public byte* data; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlClipboardEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public byte owner; + public int num_mime_types; + public byte** mime_types; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlSensorEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + public uint which; + public fixed float data[6]; + public ulong sensor_timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlQuitEvent + { + public SdlEventType type; + public uint reserved; + public ulong timestamp; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlUserEvent + { + public uint type; + public uint reserved; + public ulong timestamp; + public uint windowID; + public int code; + public void* data1; + public void* data2; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct SdlEvent + { + [FieldOffset(0)] + public SdlEventType type; + + [FieldOffset(0)] + public SdlCommonEvent common; + + [FieldOffset(0)] + public SdlDisplayEvent display; + + [FieldOffset(0)] + public SdlWindowEvent window; + + [FieldOffset(0)] + public SdlKeyboardDeviceEvent kdevice; + + [FieldOffset(0)] + public SdlKeyboardEvent key; + + [FieldOffset(0)] + public SdlTextEditingEvent edit; + + [FieldOffset(0)] + public SdlTextEditingCandidatesEvent edit_candidates; + + [FieldOffset(0)] + public SdlTextInputEvent text; + + [FieldOffset(0)] + public SdlMouseDeviceEvent mdevice; + + [FieldOffset(0)] + public SdlMouseMotionEvent motion; + + [FieldOffset(0)] + public SdlMouseButtonEvent button; + + [FieldOffset(0)] + public SdlMouseWheelEvent wheel; + + [FieldOffset(0)] + public SdlJoyDeviceEvent jdevice; + + [FieldOffset(0)] + public SdlJoyAxisEvent jaxis; + + [FieldOffset(0)] + public SdlJoyBallEvent jball; + + [FieldOffset(0)] + public SdlJoyHatEvent jhat; + + [FieldOffset(0)] + public SdlJoyButtonEvent jbutton; + + [FieldOffset(0)] + public SdlJoyBatteryEvent jbattery; + + [FieldOffset(0)] + public SdlGamepadDeviceEvent gdevice; + + [FieldOffset(0)] + public SdlGamepadAxisEvent gaxis; + + [FieldOffset(0)] + public SdlGamepadButtonEvent gbutton; + + [FieldOffset(0)] + public SdlGamepadTouchpadEvent gtouchpad; + + [FieldOffset(0)] + public SdlGamepadSensorEvent gsensor; + + [FieldOffset(0)] + public SdlAudioDeviceEvent adevice; + + [FieldOffset(0)] + public SdlCameraDeviceEvent cdevice; + + [FieldOffset(0)] + public SdlSensorEvent sensor; + + [FieldOffset(0)] + public SdlQuitEvent quit; + + [FieldOffset(0)] + public SdlUserEvent user; + + [FieldOffset(0)] + public SdlTouchFingerEvent tfinger; + + [FieldOffset(0)] + public SdlPinchFingerEvent pinch; + + [FieldOffset(0)] + public SdlPenProximityEvent pproximity; + + [FieldOffset(0)] + public SdlPenTouchEvent ptouch; + + [FieldOffset(0)] + public SdlPenMotionEvent pmotion; + + [FieldOffset(0)] + public SdlPenButtonEvent pbutton; + + [FieldOffset(0)] + public SdlPenAxisEvent paxis; + + [FieldOffset(0)] + public SdlRenderEvent render; + + [FieldOffset(0)] + public SdlDropEvent drop; + + [FieldOffset(0)] + public SdlClipboardEvent clipboard; + + [FieldOffset(0)] + public fixed byte padding[128]; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlPathInfo + { + public SdlPathType type; + public ulong size; + public long create_time; + public long modify_time; + public long access_time; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuViewport + { + public float x; + public float y; + public float w; + public float h; + public float min_depth; + public float max_depth; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTextureTransferInfo + { + public nint transfer_buffer; + public uint offset; + public uint pixels_per_row; + public uint rows_per_layer; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTransferBufferLocation + { + public nint transfer_buffer; + public uint offset; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTextureLocation + { + public nint texture; + public uint mip_level; + public uint layer; + public uint x; + public uint y; + public uint z; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTextureRegion + { + public nint texture; + public uint mip_level; + public uint layer; + public uint x; + public uint y; + public uint z; + public uint w; + public uint h; + public uint d; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuBlitRegion + { + public nint texture; + public uint mip_level; + public uint layer_or_depth_plane; + public uint x; + public uint y; + public uint w; + public uint h; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuBufferLocation + { + public nint buffer; + public uint offset; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuBufferRegion + { + public nint buffer; + public uint offset; + public uint size; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuIndirectDrawCommand + { + public uint num_vertices; + public uint num_instances; + public uint first_vertex; + public uint first_instance; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuIndexedIndirectDrawCommand + { + public uint num_indices; + public uint num_instances; + public uint first_index; + public int vertex_offset; + public uint first_instance; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuIndirectDispatchCommand + { + public uint groupcount_x; + public uint groupcount_y; + public uint groupcount_z; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuSamplerCreateInfo + { + public SdlGpuFilter min_filter; + public SdlGpuFilter mag_filter; + public SdlGpuSamplerMipmapMode mipmap_mode; + public SdlGpuSamplerAddressMode address_mode_u; + public SdlGpuSamplerAddressMode address_mode_v; + public SdlGpuSamplerAddressMode address_mode_w; + public float mip_lod_bias; + public float max_anisotropy; + public SdlGpuCompareOp compare_op; + public float min_lod; + public float max_lod; + public byte enable_anisotropy; + public byte enable_compare; + public byte padding1; + public byte padding2; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuVertexBufferDescription + { + public uint slot; + public uint pitch; + public SdlGpuVertexInputRate input_rate; + public uint instance_step_rate; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuVertexAttribute + { + public uint location; + public uint buffer_slot; + public SdlGpuVertexElementFormat format; + public uint offset; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGpuVertexInputState + { + public SdlGpuVertexBufferDescription* vertex_buffer_descriptions; + public uint num_vertex_buffers; + public SdlGpuVertexAttribute* vertex_attributes; + public uint num_vertex_attributes; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuStencilOpState + { + public SdlGpuStencilOp fail_op; + public SdlGpuStencilOp pass_op; + public SdlGpuStencilOp depth_fail_op; + public SdlGpuCompareOp compare_op; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuColorTargetBlendState + { + public SdlGpuBlendFactor src_color_blendfactor; + public SdlGpuBlendFactor dst_color_blendfactor; + public SdlGpuBlendOp color_blend_op; + public SdlGpuBlendFactor src_alpha_blendfactor; + public SdlGpuBlendFactor dst_alpha_blendfactor; + public SdlGpuBlendOp alpha_blend_op; + public SdlGpuColorComponentFlags color_write_mask; + public byte enable_blend; + public byte enable_color_write_mask; + public byte padding1; + public byte padding2; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGpuShaderCreateInfo + { + public nuint code_size; + public byte* code; + public byte* entrypoint; + public uint format; + public SdlGpuShaderStage stage; + public uint num_samplers; + public uint num_storage_textures; + public uint num_storage_buffers; + public uint num_uniform_buffers; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTextureCreateInfo + { + public SdlGpuTextureType type; + public SdlGpuTextureFormat format; + public SdlGpuTextureUsageFlags usage; + public uint width; + public uint height; + public uint layer_count_or_depth; + public uint num_levels; + public SdlGpuSampleCount sample_count; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuBufferCreateInfo + { + public SdlGpuBufferUsageFlags usage; + public uint size; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTransferBufferCreateInfo + { + public SdlGpuTransferBufferUsage usage; + public uint size; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuRasterizerState + { + public SdlGpuFillMode fill_mode; + public SdlGpuCullMode cull_mode; + public SdlGpuFrontFace front_face; + public float depth_bias_constant_factor; + public float depth_bias_clamp; + public float depth_bias_slope_factor; + public byte enable_depth_bias; + public byte enable_depth_clip; + public byte padding1; + public byte padding2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuMultisampleState + { + public SdlGpuSampleCount sample_count; + public uint sample_mask; + public byte enable_mask; + public byte enable_alpha_to_coverage; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuDepthStencilState + { + public SdlGpuCompareOp compare_op; + public SdlGpuStencilOpState back_stencil_state; + public SdlGpuStencilOpState front_stencil_state; + public byte compare_mask; + public byte write_mask; + public byte enable_depth_test; + public byte enable_depth_write; + public byte enable_stencil_test; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuColorTargetDescription + { + public SdlGpuTextureFormat format; + public SdlGpuColorTargetBlendState blend_state; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGpuGraphicsPipelineTargetInfo + { + public SdlGpuColorTargetDescription* color_target_descriptions; + public uint num_color_targets; + public SdlGpuTextureFormat depth_stencil_format; + public byte has_depth_stencil_target; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuGraphicsPipelineCreateInfo + { + public nint vertex_shader; + public nint fragment_shader; + public SdlGpuVertexInputState vertex_input_state; + public SdlGpuPrimitiveType primitive_type; + public SdlGpuRasterizerState rasterizer_state; + public SdlGpuMultisampleState multisample_state; + public SdlGpuDepthStencilState depth_stencil_state; + public SdlGpuGraphicsPipelineTargetInfo target_info; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGpuComputePipelineCreateInfo + { + public nuint code_size; + public byte* code; + public byte* entrypoint; + public uint format; + public uint num_samplers; + public uint num_readonly_storage_textures; + public uint num_readonly_storage_buffers; + public uint num_readwrite_storage_textures; + public uint num_readwrite_storage_buffers; + public uint num_uniform_buffers; + public uint threadcount_x; + public uint threadcount_y; + public uint threadcount_z; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuColorTargetInfo + { + public nint texture; + public uint mip_level; + public uint layer_or_depth_plane; + public SdlFColor clear_color; + public SdlGpuLoadOp load_op; + public SdlGpuStoreOp store_op; + public nint resolve_texture; + public uint resolve_mip_level; + public uint resolve_layer; + public byte cycle; + public byte cycle_resolve_texture; + public byte padding1; + public byte padding2; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuDepthStencilTargetInfo + { + public nint texture; + public float clear_depth; + public SdlGpuLoadOp load_op; + public SdlGpuStoreOp store_op; + public SdlGpuLoadOp stencil_load_op; + public SdlGpuStoreOp stencil_store_op; + public byte cycle; + public byte clear_stencil; + public byte mip_level; + public byte layer; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuBlitInfo + { + public SdlGpuBlitRegion source; + public SdlGpuBlitRegion destination; + public SdlGpuLoadOp load_op; + public SdlFColor clear_color; + public SdlFlipMode flip_mode; + public SdlGpuFilter filter; + public byte cycle; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuBufferBinding + { + public nint buffer; + public uint offset; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuTextureSamplerBinding + { + public nint texture; + public nint sampler; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuStorageBufferReadWriteBinding + { + public nint buffer; + public byte cycle; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlGpuStorageTextureReadWriteBinding + { + public nint texture; + public uint mip_level; + public uint layer; + public byte cycle; + public byte padding1; + public byte padding2; + public byte padding3; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGpuVulkanOptions + { + public uint vulkan_api_version; + public void* feature_list; + public void* vulkan_10_physical_device_features; + public uint device_extension_count; + public byte** device_extension_names; + public uint instance_extension_count; + public byte** instance_extension_names; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlHapticDirection + { + public byte type; + public fixed int dir[3]; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlHapticConstant + { + public ushort type; + public SdlHapticDirection direction; + public uint length; + public ushort delay; + public ushort button; + public ushort interval; + public short level; + public ushort attack_length; + public ushort attack_level; + public ushort fade_length; + public ushort fade_level; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlHapticPeriodic + { + public ushort type; + public SdlHapticDirection direction; + public uint length; + public ushort delay; + public ushort button; + public ushort interval; + public ushort period; + public short magnitude; + public short offset; + public ushort phase; + public ushort attack_length; + public ushort attack_level; + public ushort fade_length; + public ushort fade_level; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlHapticCondition + { + public ushort type; + public SdlHapticDirection direction; + public uint length; + public ushort delay; + public ushort button; + public ushort interval; + public fixed ushort right_sat[3]; + public fixed ushort left_sat[3]; + public fixed short right_coeff[3]; + public fixed short left_coeff[3]; + public fixed ushort deadband[3]; + public fixed short center[3]; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlHapticRamp + { + public ushort type; + public SdlHapticDirection direction; + public uint length; + public ushort delay; + public ushort button; + public ushort interval; + public short start; + public short end; + public ushort attack_length; + public ushort attack_level; + public ushort fade_length; + public ushort fade_level; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlHapticLeftRight + { + public ushort type; + public uint length; + public ushort large_magnitude; + public ushort small_magnitude; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlHapticCustom + { + public ushort type; + public SdlHapticDirection direction; + public uint length; + public ushort delay; + public ushort button; + public ushort interval; + public byte channels; + public ushort period; + public ushort samples; + public ushort* data; + public ushort attack_length; + public ushort attack_level; + public ushort fade_length; + public ushort fade_level; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct SdlHapticEffect + { + [FieldOffset(0)] + public ushort type; + + [FieldOffset(0)] + public SdlHapticConstant constant; + + [FieldOffset(0)] + public SdlHapticPeriodic periodic; + + [FieldOffset(0)] + public SdlHapticCondition condition; + + [FieldOffset(0)] + public SdlHapticRamp ramp; + + [FieldOffset(0)] + public SdlHapticLeftRight leftright; + + [FieldOffset(0)] + public SdlHapticCustom custom; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlHidDeviceInfo + { + public byte* path; + public ushort vendor_id; + public ushort product_id; + public int* serial_number; + public ushort release_number; + public int* manufacturer_string; + public int* product_string; + public ushort usage_page; + public ushort usage; + public int interface_number; + public int interface_class; + public int interface_subclass; + public int interface_protocol; + public SdlHidBusType bus_type; + public SdlHidDeviceInfo* next; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlLocale + { + public byte* language; + public byte* country; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlMessageBoxButtonData + { + public SdlMessageBoxButtonFlags flags; + public int buttonID; + public byte* text; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlMessageBoxColor + { + public byte r; + public byte g; + public byte b; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlMessageBoxData + { + public SdlMessageBoxFlags flags; + public SdlWindow window; + public byte* title; + public byte* message; + public int numbuttons; + public SdlMessageBoxButtonData* buttons; + public nint colorScheme; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlVertex + { + public SdlFPoint position; + public SdlFColor color; + public SdlFPoint tex_coord; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlGpuRenderStateCreateInfo + { + public nint fragment_shader; + public int num_sampler_bindings; + public SdlGpuTextureSamplerBinding* sampler_bindings; + public int num_storage_textures; + public nint* storage_textures; + public int num_storage_buffers; + public nint* storage_buffers; + public uint props; + } + + [StructLayout(LayoutKind.Sequential)] + public unsafe partial struct SdlStorageInterface + { + public uint version; + public delegate* unmanaged[Cdecl] close; + public delegate* unmanaged[Cdecl] ready; + public delegate* unmanaged[Cdecl]< + void*, + byte*, + delegate* unmanaged[Cdecl], + void*, + byte> enumerate; + public delegate* unmanaged[Cdecl] info; + public delegate* unmanaged[Cdecl] read_file; + public delegate* unmanaged[Cdecl] write_file; + public delegate* unmanaged[Cdecl] mkdir; + public delegate* unmanaged[Cdecl] remove; + public delegate* unmanaged[Cdecl] rename; + public delegate* unmanaged[Cdecl] copy; + public delegate* unmanaged[Cdecl] space_remaining; + } + + [StructLayout(LayoutKind.Sequential)] + public partial struct SdlDateTime + { + public int year; + public int month; + public int day; + public int hour; + public int minute; + public int second; + public int nanosecond; + public int day_of_week; + public int utc_offset; + } +} diff --git a/Brutal.Sdl/GlobalUsings.cs b/Brutal.Sdl/GlobalUsings.cs new file mode 100644 index 0000000..872551d --- /dev/null +++ b/Brutal.Sdl/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; diff --git a/Brutal.Sdl/LICENSES/BRUTAL-SDL-THIRD-PARTY-NOTICES.txt b/Brutal.Sdl/LICENSES/BRUTAL-SDL-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..dfe5065 --- /dev/null +++ b/Brutal.Sdl/LICENSES/BRUTAL-SDL-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,621 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Sdl + +This package redistributes third-party software. The licenses governing that software +are reproduced below in full. + +WHAT THIS PACKAGE CONTAINS + + One native library, on every runtime identifier the package supports + (win-x64, linux-x64, osx-arm64): + + SDL 3.4.12 SDL3.dll / libSDL3.so / libSDL3.dylib + + SDL is not a single work. Ten third-party components are compiled into that + library and are governed by their own licenses, one section each below: + + HIDAPI USB/Bluetooth HID access, behind SDL's SDL_hid_* API + yuv2rgb YUV to RGB colour conversion + SDL_gfx the surface rotation used by the software renderer + stb_image the PNG decoding behind SDL's SDL_LoadPNG + SDL_qsort the sort behind SDL's SDL_qsort and SDL_qsort_r + X.Org keysym table key symbol to Unicode mapping, for X11 and Wayland + XSETTINGS client desktop scaling and DPI settings, for X11 + EDID parser display EDID decoding, for X11 monitor names + xdg-user-dirs user-directory lookup, for the Unix filesystem backend + Wayland protocols 24 protocol descriptions, compiled to C by wayland-scanner + + HIDAPI, yuv2rgb, SDL_gfx, stb_image and SDL_qsort are present on every + runtime identifier. + + The X.Org keysym table, the XSETTINGS client, the EDID parser, xdg-user-dirs + and the Wayland protocol code are present in the linux-x64 library only. The + keysym table, XSETTINGS client and EDID parser are built for the X11 and + Wayland video drivers, the xdg-user-dirs lookup for the Unix filesystem + backend, and the protocol descriptions for the Wayland driver -- none of + which the win-x64 and osx-arm64 builds use. + +A NOTE ON SCOPE + + Only components contained in the shipped libraries are listed. SDL also vendors the + Khronos EGL, OpenGL and Vulkan headers, which this package compiles against but does + not redistribute in any form. + + Two further third-party bodies of code are compiled in and have no section below, because + neither states a holder to attribute. miniz, the deflate implementation built alongside + stb_image, states an unlicense.org public-domain dedication and names no holder. SDL also + carries its own copy of the Sun Microsystems libm; it is built as a separate static library + so that unreferenced symbols do not reach the shared library, and every call into it sits + behind a build guard that the system C library satisfies on all three runtime identifiers. + + Where an upstream license file covers more code than this package ships, only the + blocks governing the code actually contained here are reproduced. Each such omission + is named where it occurs, so that nothing below should be read as truncated. + +============================================================================== +SDL (Simple DirectMedia Layer) +============================================================================== + + Name SDL + Version 3.4.12 + Upstream https://libsdl.org -- https://github.com/libsdl-org/SDL + SPDX Zlib + Shipped as SDL3.dll, libSDL3.so, libSDL3.dylib + +Copyright (C) 1997-2026 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +============================================================================== +HIDAPI +============================================================================== + + Name HIDAPI + Version 0.14.0 (as vendored by SDL 3.4.12) + Upstream https://github.com/libusb/hidapi + SPDX HIDAPI + Shipped as compiled into SDL3.dll, libSDL3.so, libSDL3.dylib + + HIDAPI is offered under three mutually exclusive licenses, and the choice is the + redistributor's. Upstream states the terms as follows. The three filenames it + names are files in HIDAPI's own distribution at the upstream address above; they + are not part of this package, and nothing below depends on reading them: + +HIDAPI can be used under one of three licenses. + +1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt +2. A BSD-Style License, in LICENSE-bsd.txt. +3. The more liberal original HIDAPI license. LICENSE-orig.txt + +The license chosen is at the discretion of the user of HIDAPI. For example: +1. An author of GPL software would likely use HIDAPI under the terms of the +GPL. + +2. An author of commercial closed-source software would likely use HIDAPI +under the terms of the BSD-style license or the original HIDAPI license. + + This distribution is made under the original HIDAPI license, the third of those + three, reproduced in full below. It is the same election SDL makes for the copy it + carries. We do NOT distribute HIDAPI under the GNU General Public License v3 or + under the BSD-style license, and neither of those texts is reproduced. + + HIDAPI - Multi-Platform library for + communication with HID devices. + + Copyright 2009, Alan Ott, Signal 11 Software. + All Rights Reserved. + + This software may be used by anyone for any reason so + long as the copyright notice in the source files + remains intact. + +============================================================================== +yuv2rgb +============================================================================== + + Name yuv2rgb + Version as vendored by SDL 3.4.12 (upstream publishes no version) + Upstream https://github.com/descampsa/yuv2rgb + SPDX BSD-3-Clause + Shipped as compiled into SDL3.dll, libSDL3.so, libSDL3.dylib + +Copyright (c) 2016, Adrien Descamps +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of yuv2rgb nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================================== +SDL_gfx +============================================================================== + + Name SDL_gfx + Version as vendored by SDL 3.4.12 (the notice states 2001-2011; upstream publishes no version for this file) + Upstream https://sourceforge.net/projects/sdlgfx/ + SPDX Zlib + Shipped as compiled into SDL3.dll, libSDL3.so, libSDL3.dylib + + SDL's surface rotation comes from SDL_gfx. SDL states where it came from and + reproduces the original notice; both are reproduced below as SDL states them. + +Shamelessly stolen from SDL_gfx by Andreas Schiffler. Original copyright follows: + +Copyright (C) 2001-2011 Andreas Schiffler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Andreas Schiffler -- aschiffler at ferzkopp dot net + +============================================================================== +stb_image +============================================================================== + + Name stb_image + Version v2.30 (as vendored by SDL 3.4.12) + Upstream https://github.com/nothings/stb + SPDX MIT OR Unlicense + Shipped as compiled into SDL3.dll, libSDL3.so, libSDL3.dylib + + The PNG decoding behind SDL's SDL_LoadPNG. SDL compiles it into the library on every + runtime identifier. SDL_image carries its own copy of this same component, reproduced + in that package's notices file; the two are pinned separately. + + stb_image is offered under two mutually exclusive licenses, both reproduced below as + upstream states them. + +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ + +============================================================================== +SDL_qsort +============================================================================== + + Name SDL_qsort + Version qsort.c 1.16 (as vendored by SDL 3.4.12; the notice states 1998-2021) + Upstream https://www.mccaughan.org.uk/software/ + SPDX Zlib + Shipped as compiled into SDL3.dll, libSDL3.so, libSDL3.dylib + + The sort behind SDL's SDL_qsort and SDL_qsort_r. SDL states where it came from, that it + altered the code, and reproduces the original notice; all three are reproduced below as + SDL states them. + +This code came from Gareth McCaughan, under the zlib license. +Specifically this: https://www.mccaughan.org.uk/software/qsort.c-1.16 + +Everything below this comment until the HAVE_QSORT #endif was from Gareth +(any minor changes will be noted inline). + +Thank you to Gareth for relicensing this code under the zlib license for our +benefit! + +Update for SDL3: we have modified this from a qsort function to qsort_r. + +--ryan. + +Copyright (c) 1998-2021 Gareth McCaughan + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but + is not required. + +2. Altered source versions must be plainly marked as such, + and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. + +============================================================================== +X.Org keysym table +============================================================================== + + Name X.Org keysym table + Version as vendored by SDL 3.4.12 (upstream publishes no version for this table) + Upstream https://gitlab.freedesktop.org/xorg/lib/libx11 + SPDX MIT + Shipped as compiled into libSDL3.so (linux-x64) only + + The mapping from key symbols to Unicode code points, used by the X11 and Wayland + video drivers. It names three holders, and SDL is not among them. + +Copyright (C) 2003-2006,2008 Jamey Sharp, Josh Triplett +Copyright © 2009 Red Hat, Inc. +Copyright 1990-1992,1999,2000,2004,2009,2010 Oracle and/or its affiliates. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +============================================================================== +XSETTINGS client +============================================================================== + + Name XSETTINGS client + Version as vendored by SDL 3.4.12 (upstream publishes no version for this file) + Upstream https://specifications.freedesktop.org/xsettings/0.5/ + SPDX LicenseRef-XSettings (upstream states no identifier) + Shipped as compiled into libSDL3.so (linux-x64) only + + The XSETTINGS client, read by the X11 video driver for the desktop window scaling factor + and the Xft DPI setting. It names two holders, and SDL is not among them. SDL states no + address for the implementation it imported; the address above is the XSETTINGS + specification that implementation serves. + +Copyright © 2001, 2007 Red Hat, Inc. +Copyright 2024 Igalia S.L. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Red Hat not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. Red Hat makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT +BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Author: Owen Taylor, Red Hat, Inc. + +============================================================================== +EDID parser +============================================================================== + + Name EDID parser + Version as vendored by SDL 3.4.12 (upstream publishes no version for this file) + Upstream https://github.com/GNOME/mutter + SPDX MIT + Shipped as compiled into libSDL3.so (linux-x64) only + + Display EDID decoding, used by the X11 video driver to read a monitor's real name. It + names one holder, and SDL is not among them. SDL states no address for the copy it + carries; the same file, with this notice word for word, is maintained in the project at + the address above. + +Copyright 2007 Red Hat, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================== +xdg-user-dirs +============================================================================== + + Name xdg-user-dirs + Version as vendored by SDL 3.4.12 (upstream publishes no version for this file) + Upstream https://gitlab.freedesktop.org/xdg/xdg-user-dirs + SPDX MIT + Shipped as compiled into libSDL3.so (linux-x64) only + + The user-directory lookup used by the Unix filesystem backend. SDL states which two + functions it copied, where from, and that it adapted them, then reproduces the terms; + all of it is reproduced below as SDL states it. + + The two functions below (prefixed with `xdg_`) have been copied from: + https://gitlab.freedesktop.org/xdg/xdg-user-dirs/-/blob/master/xdg-user-dir-lookup.c + and have been adapted to work with SDL. They are licensed under the following + terms: + + Copyright (c) 2007 Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +============================================================================== +Wayland protocol descriptions +============================================================================== + + Name Wayland protocols + Version as vendored by SDL 3.4.12 (the descriptions are not individually versioned) + Upstream https://gitlab.freedesktop.org/wayland/wayland -- https://gitlab.freedesktop.org/wayland/wayland-protocols + SPDX MIT AND HPND + Shipped as compiled into libSDL3.so (linux-x64) only + + Each protocol description below is compiled to C by wayland-scanner and linked into + the linux-x64 library. Two distinct permission texts govern the set, marked A and B + and reproduced in full after the list. + + alpha-modifier-v1 (license A) + Copyright © 2024 Xaver Hugl + + color-management-v1 (license A) + Copyright 2019 Sebastian Wick + Copyright 2019 Erwin Burema + Copyright 2020 AMD + Copyright 2020-2024 Collabora, Ltd. + Copyright 2024 Xaver Hugl + Copyright 2022-2025 Red Hat, Inc. + + cursor-shape-v1 (license A) + Copyright 2018 The Chromium Authors + Copyright 2023 Simon Ser + + fractional-scale-v1 (license A) + Copyright © 2022 Kenny Levinsen + + frog-color-management-v1 (license A) + Copyright © 2023 Joshua Ashton for Valve Software + Copyright © 2023 Xaver Hugl + + idle-inhibit-unstable-v1 (license A) + Copyright © 2015 Samsung Electronics Co., Ltd + + input-timestamps-unstable-v1 (license A) + Copyright © 2017 Collabora, Ltd. + + keyboard-shortcuts-inhibit-unstable-v1 (license A) + Copyright © 2017 Red Hat Inc. + + pointer-constraints-unstable-v1 (license A) + Copyright © 2014 Jonas Ådahl + Copyright © 2015 Red Hat Inc. + + pointer-warp-v1 (license A) + Copyright © 2024 Neal Gompa + Copyright © 2024 Xaver Hugl + Copyright © 2024 Matthias Klumpp + Copyright © 2024 Vlad Zahorodnii + + primary-selection-unstable-v1 (license A) + Copyright © 2015, 2016 Red Hat + + relative-pointer-unstable-v1 (license A) + Copyright © 2014 Jonas Ådahl + Copyright © 2015 Red Hat Inc. + + tablet-v2 (license A) + Copyright 2014 © Stephen "Lyude" Chandler Paul + Copyright 2015-2016 © Red Hat, Inc. + + text-input-unstable-v3 (license B) + Copyright © 2012, 2013 Intel Corporation + Copyright © 2015, 2016 Jan Arne Petersen + Copyright © 2017, 2018 Red Hat, Inc. + Copyright © 2018 Purism SPC + + viewporter (license A) + Copyright © 2013-2016 Collabora, Ltd. + + wayland (license A) + Copyright © 2008-2011 Kristian Høgsberg + Copyright © 2010-2011 Intel Corporation + Copyright © 2012-2013 Collabora, Ltd. + + xdg-activation-v1 (license A) + Copyright © 2020 Aleix Pol Gonzalez + Copyright © 2020 Carlos Garnacho + + xdg-decoration-unstable-v1 (license A) + Copyright © 2018 Simon Ser + + xdg-dialog-v1 (license A) + Copyright © 2023 Carlos Garnacho + + xdg-foreign-unstable-v2 (license A) + Copyright © 2015-2016 Red Hat Inc. + + xdg-output-unstable-v1 (license A) + Copyright © 2017 Red Hat Inc. + + xdg-shell (license A) + Copyright © 2008-2013 Kristian Høgsberg + Copyright © 2013 Rafael Antognolli + Copyright © 2013 Jasper St. Pierre + Copyright © 2010-2013 Intel Corporation + Copyright © 2015-2017 Samsung Electronics Co., Ltd + Copyright © 2015-2017 Red Hat Inc. + + xdg-toplevel-icon-v1 (license A) + Copyright © 2023-2024 Matthias Klumpp + Copyright © 2024 David Edmundson + + The following description carries no copyright notice and no license text of its + own. The Wayland protocols project publishes its descriptions under the license + marked A, and that is the license relied on here; no holder has been supplied, + because upstream names none and inventing one would be worse than the gap: + + pointer-gestures-unstable-v1 + + ---------------------------------------------------------------------------- + LICENSE A -- applies to the 22 descriptions marked A above + ---------------------------------------------------------------------------- + + 4 of them -- cursor-shape-v1, pointer-warp-v1, tablet-v2, wayland -- + carry this same license word for word, broken across lines at a different width. + It is reproduced once. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + ---------------------------------------------------------------------------- + LICENSE B -- applies to the 1 description marked B above + ---------------------------------------------------------------------------- + +Permission to use, copy, modify, distribute, and sell this +software and its documentation for any purpose is hereby granted +without fee, provided that the above copyright notice appear in +all copies and that both that copyright notice and this permission +notice appear in supporting documentation, and that the name of +the copyright holders not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no +representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied +warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/Brutal.Sdl/Manual/Libraries/Sdl.Events.cs b/Brutal.Sdl/Manual/Libraries/Sdl.Events.cs new file mode 100644 index 0000000..48d6a3c --- /dev/null +++ b/Brutal.Sdl/Manual/Libraries/Sdl.Events.cs @@ -0,0 +1,108 @@ +namespace Brutal.SdlApi; + +public delegate bool SdlEventWatch(ref SdlEvent ev); + +public static unsafe partial class Sdl +{ + public static unsafe partial class Events + { + // Registered event watches, keyed by the managed delegate the caller passed. The GCHandle + // roots the delegate for as long as SDL holds the native function pointer, and its IntPtr is + // the userdata SDL threads back to the trampoline so it can dispatch to the right delegate. + // SDL_RemoveEventWatch matches on (function pointer, userdata), so the same handle value must + // be handed back on removal, hence the map. Guarded by a lock because SDL permits adding and + // removing watches from any thread. + private static readonly Dictionary Watches = new(); + private static readonly Lock WatchLock = new(); + + public static bool PollEvent(out SdlEvent ev) + { + ev = default; + + bool dequeued; + fixed (SdlEvent* p = &ev) + dequeued = PInvoke.PollEvent(p) != 0; + + Sdl.ExceptionAggregator.CheckExceptions(); + return dequeued; + } + + public static void AddEventWatch(SdlEventWatch callback) + { + ArgumentNullException.ThrowIfNull(callback); + + lock (WatchLock) + { + if (Watches.ContainsKey(callback)) + return; + + var handle = GCHandle.Alloc(callback); + if (PInvoke.AddEventWatch(&EventWatchTrampoline, (void*)GCHandle.ToIntPtr(handle)) == 0) + { + handle.Free(); + throw SdlException.FromError("SDL_AddEventWatch failed"); + } + + Watches[callback] = handle; + } + } + + public static void RemoveEventWatch(SdlEventWatch callback) + { + ArgumentNullException.ThrowIfNull(callback); + + lock (WatchLock) + { + if (!Watches.Remove(callback, out var handle)) + return; + + PInvoke.RemoveEventWatch(&EventWatchTrampoline, (void*)GCHandle.ToIntPtr(handle)); + handle.Free(); + } + } + + // Called from Sdl.Init.Quit so the managed map does not outlive SDL's own watch list. + internal static void ClearWatches() + { + lock (WatchLock) + { + foreach (var (_, handle) in Watches) + { + // Remove the native registration first (still valid pre-SDL_Quit), then release + // the managed root. Both are matched on (function pointer, userdata). + PInvoke.RemoveEventWatch(&EventWatchTrampoline, (void*)GCHandle.ToIntPtr(handle)); + handle.Free(); + } + + Watches.Clear(); + } + } + + // The single native entry point for every registered watch. SDL passes the GCHandle IntPtr + // back as userdata; we resolve it to the managed delegate and invoke it inside a try/catch so + // no exception ever escapes into native code. Failures are parked in the aggregator and + // rethrown from the next PollEvent. + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static byte EventWatchTrampoline(void* userdata, SdlEvent* ev) + { + try + { + var handle = GCHandle.FromIntPtr((nint)userdata); + if (handle.Target is SdlEventWatch filter) + return filter(ref *ev) ? (byte)1 : (byte)0; + + Sdl.ExceptionAggregator.Push( + "An SDL event watch fired with a dead or foreign GCHandle (its target was not an " + + "SdlEventWatch); the callback was skipped." + ); + } + catch (Exception ex) + { + Sdl.ExceptionAggregator.Push("An exception occurred in an SDL event watch callback.", ex); + } + + // Event watches ignore the return value; permit by default. + return 1; + } + } +} diff --git a/Brutal.Sdl/Manual/Libraries/Sdl.Gamepad.cs b/Brutal.Sdl/Manual/Libraries/Sdl.Gamepad.cs new file mode 100644 index 0000000..85b2ca5 --- /dev/null +++ b/Brutal.Sdl/Manual/Libraries/Sdl.Gamepad.cs @@ -0,0 +1,35 @@ +namespace Brutal.SdlApi; + +public static unsafe partial class Sdl +{ + public static unsafe partial class Gamepad + { + public static bool GetGamepadTouchpadFinger( + SdlGamepad gamepad, + int touchpad, + int finger, + out bool down, + out float x, + out float y, + out float pressure + ) + { + // SDL leaves the out-pointers untouched on failure, so pre-zero them. + byte downByte = 0; + bool result; + x = default; + y = default; + pressure = default; + fixed (float* xPtr = &x) + fixed (float* yPtr = &y) + fixed (float* pressurePtr = &pressure) + { + result = + PInvoke.GetGamepadTouchpadFinger(gamepad, touchpad, finger, &downByte, xPtr, yPtr, pressurePtr) + != 0; + } + down = downByte != 0; + return result; + } + } +} diff --git a/Brutal.Sdl/Manual/Libraries/Sdl.Init.cs b/Brutal.Sdl/Manual/Libraries/Sdl.Init.cs new file mode 100644 index 0000000..b8e528b --- /dev/null +++ b/Brutal.Sdl/Manual/Libraries/Sdl.Init.cs @@ -0,0 +1,21 @@ +namespace Brutal.SdlApi; + +public static unsafe partial class Sdl +{ + public static unsafe partial class Init + { + public static void Initialize(SdlInitFlags flags) + { + // SDL_Init returns SDL bool (false = failure), rendered as a byte by the raw layer. + if (PInvoke.Init(flags) == 0) + throw SdlException.FromError("SDL_Init failed"); + } + + public static void Quit() + { + Events.ClearWatches(); + Sdl.ExceptionAggregator.Clear(); + PInvoke.Quit(); + } + } +} diff --git a/Brutal.Sdl/Manual/Libraries/Sdl.Keyboard.cs b/Brutal.Sdl/Manual/Libraries/Sdl.Keyboard.cs new file mode 100644 index 0000000..e3b293b --- /dev/null +++ b/Brutal.Sdl/Manual/Libraries/Sdl.Keyboard.cs @@ -0,0 +1,43 @@ +using System.Text; + +namespace Brutal.SdlApi; + +public static unsafe partial class Sdl +{ + public static unsafe partial class Keyboard + { + // SDL keeps the name pointer without copying it, so each name lives in unmanaged memory until replaced. + private static readonly Dictionary ScancodeNames = new(); + private static readonly Lock ScancodeNameLock = new(); + + [LibraryImport(Dll, EntryPoint = "SDL_SetScancodeName")] + private static partial byte _SetScancodeName(SdlScancode scancode, byte* name); + + public static void SetScancodeName(SdlScancode scancode, string name) + { + ArgumentNullException.ThrowIfNull(name); + + // Copy `name` into unmanaged memory we own: a NUL-terminated UTF-8 buffer. + var byteCount = Encoding.UTF8.GetByteCount(name); + var buffer = (byte*)NativeMemory.Alloc((nuint)(byteCount + 1)); + var span = new Span(buffer, byteCount + 1); + Encoding.UTF8.GetBytes(name, span); + span[byteCount] = 0; + + lock (ScancodeNameLock) + { + if (_SetScancodeName(scancode, buffer) == 0) + { + // SDL did not take the pointer; free our copy and surface the error. + NativeMemory.Free(buffer); + throw SdlException.FromError("SDL_SetScancodeName failed"); + } + + // SDL no longer references the previous copy for this scancode. + if (ScancodeNames.TryGetValue(scancode, out var previous)) + NativeMemory.Free((void*)previous); + ScancodeNames[scancode] = (nint)buffer; + } + } + } +} diff --git a/Brutal.Sdl/Manual/Libraries/Sdl.Log.cs b/Brutal.Sdl/Manual/Libraries/Sdl.Log.cs new file mode 100644 index 0000000..2eafbba --- /dev/null +++ b/Brutal.Sdl/Manual/Libraries/Sdl.Log.cs @@ -0,0 +1,39 @@ +namespace Brutal.SdlApi; + +public static unsafe partial class Sdl +{ + public static class Log + { + public static void Message(SdlLogCategory category, SdlLogPriority priority, string message) + { + ArgumentNullException.ThrowIfNull(message); + PInvoke.LogMessage((int)category, priority, Escape(message)); + } + + public static void Message(string message) => Message(SdlLogCategory.Application, SdlLogPriority.Info, message); + + public static void Trace(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Trace, message); + + public static void Verbose(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Verbose, message); + + public static void Debug(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Debug, message); + + public static void Info(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Info, message); + + public static void Warn(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Warn, message); + + public static void Error(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Error, message); + + public static void Critical(SdlLogCategory category, string message) => + Message(category, SdlLogPriority.Critical, message); + + // Escapes printf conversion specifiers so the caller's text is logged verbatim. + private static string Escape(string message) => message.Contains('%') ? message.Replace("%", "%%") : message; + } +} diff --git a/Brutal.Sdl/Manual/Libraries/Sdl.Vulkan.cs b/Brutal.Sdl/Manual/Libraries/Sdl.Vulkan.cs new file mode 100644 index 0000000..92bb750 --- /dev/null +++ b/Brutal.Sdl/Manual/Libraries/Sdl.Vulkan.cs @@ -0,0 +1,72 @@ +namespace Brutal.SdlApi; + +public static unsafe partial class Sdl +{ + public static unsafe partial class PInvoke + { + // Hand-bound: SDL_vulkan.h is outside the generator's input. Vulkan handles are passed as nint. + + [LibraryImport(Dll, EntryPoint = "SDL_Vulkan_GetInstanceExtensions")] + private static partial byte** _Vulkan_GetInstanceExtensions(uint* count); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte** Vulkan_GetInstanceExtensions(uint* count) + { + Sdl.TraceLog.Trace(); + return _Vulkan_GetInstanceExtensions(count); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Vulkan_CreateSurface")] + private static partial byte _Vulkan_CreateSurface( + SdlWindow window, + nint instance, + nint allocator, + nint* surface + ); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte Vulkan_CreateSurface(SdlWindow window, nint instance, nint allocator, nint* surface) + { + Sdl.TraceLog.Trace(); + return _Vulkan_CreateSurface(window, instance, allocator, surface); + } + + [LibraryImport(Dll, EntryPoint = "SDL_Vulkan_DestroySurface")] + private static partial void _Vulkan_DestroySurface(nint instance, nint surface, nint allocator); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Vulkan_DestroySurface(nint instance, nint surface, nint allocator) + { + Sdl.TraceLog.Trace(); + _Vulkan_DestroySurface(instance, surface, allocator); + } + } + + public static unsafe class Vulkan + { + public static string[] GetInstanceExtensions() + { + uint count; + var ptr = PInvoke.Vulkan_GetInstanceExtensions(&count); + if (ptr is null) + throw SdlException.FromError("SDL_Vulkan_GetInstanceExtensions failed"); + + // Owned by SDL - must not be freed here (see SDL_vulkan.h's doc comment). + var result = new string[count]; + for (var i = 0; i < count; i++) + result[i] = Marshal.PtrToStringUTF8((nint)ptr[i])!; + return result; + } + + public static nint CreateSurface(SdlWindow window, nint instance) + { + nint surface; + if (PInvoke.Vulkan_CreateSurface(window, instance, 0, &surface) == 0) + throw SdlException.FromError("SDL_Vulkan_CreateSurface failed"); + return surface; + } + + public static void DestroySurface(nint instance, nint surface) => + PInvoke.Vulkan_DestroySurface(instance, surface, 0); + } +} diff --git a/Brutal.Sdl/Manual/Sdl.PInvoke.cs b/Brutal.Sdl/Manual/Sdl.PInvoke.cs new file mode 100644 index 0000000..fdb7408 --- /dev/null +++ b/Brutal.Sdl/Manual/Sdl.PInvoke.cs @@ -0,0 +1,92 @@ +using System.Reflection; + +namespace Brutal.SdlApi; + +public static unsafe partial class Sdl +{ + public static unsafe partial class PInvoke + { + // The native SDL3 handle, resolved lazily by the DllImportResolver below and cached so the + // library is loaded at most once regardless of how many entry points are resolved. + private static nint _nativeHandle; + + // Serializes resolution. The .NET resolver can be invoked concurrently from multiple threads + // resolving different entry points; without this two threads could both observe a zero handle + // and race to load, leaking one of the two library handles. + private static readonly Lock ResolveLock = new(); + + // Registered here so the resolver is installed before any P/Invoke in this assembly resolves. + static PInvoke() + { + NativeLibrary.SetDllImportResolver(typeof(Sdl).Assembly, Resolve); + } + + // Normalizes the "SDL3" import name to the platform-specific shared library filename + // (SDL3.dll on Windows, libSDL3.dylib on macOS, libSDL3.so.0 on Linux). SDL's Linux build + // installs a versioned soname (libSDL3.so.0) that the default probing conventions do not + // try, so the candidate list is spelled out explicitly, most-specific first, with the + // default convention name as a fallback. + private static nint Resolve(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + // Only ever asked to resolve SDL3; anything else is left to the default resolver. + if (libraryName != Dll) + return IntPtr.Zero; + + lock (ResolveLock) + { + if (_nativeHandle != IntPtr.Zero) + return _nativeHandle; + + var search = searchPath ?? DllImportSearchPath.AssemblyDirectory; + + // Load (not TryLoad) so each candidate's OS error text reaches the final exception. + var failures = new List(); + foreach (var candidate in Candidates()) + { + try + { + _nativeHandle = NativeLibrary.Load(candidate, assembly, search); + return _nativeHandle; + } + catch (Exception ex) + { + failures.Add($"'{candidate}': {ex.Message}"); + } + } + + throw new DllNotFoundException( + "Could not load the SDL3 native library. Attempts (most specific first): " + + string.Join("; ", failures) + + "." + ); + } + } + + private static string[] Candidates() + { + if (OperatingSystem.IsWindows()) + return ["SDL3.dll", "SDL3"]; + if (OperatingSystem.IsMacOS()) + return ["libSDL3.dylib", "SDL3"]; + // Linux and other Unix-likes. + return ["libSDL3.so.0", "libSDL3.so", "SDL3"]; + } + + // SDL_LogMessage is variadic; it is bound fixed-arity and never passed variadic arguments. + [LibraryImport( + Dll, + EntryPoint = "SDL_LogMessage", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(CustomStringMarshaller) + )] + private static partial void _LogMessage(int category, SdlLogPriority priority, string fmt); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LogMessage(int category, SdlLogPriority priority, string preformatted) + { + ArgumentNullException.ThrowIfNull(preformatted); + Sdl.TraceLog.Trace(); + _LogMessage(category, priority, preformatted); + } + } +} diff --git a/Brutal.Sdl/Manual/SdlGamepadBinding.cs b/Brutal.Sdl/Manual/SdlGamepadBinding.cs new file mode 100644 index 0000000..5f58109 --- /dev/null +++ b/Brutal.Sdl/Manual/SdlGamepadBinding.cs @@ -0,0 +1,41 @@ +namespace Brutal.SdlApi; + +[StructLayout(LayoutKind.Explicit, Size = 32)] +public struct SdlGamepadBinding +{ + [FieldOffset(0)] + public SdlGamepadBindingType InputType; + + [FieldOffset(4)] + public int InputButton; + + [FieldOffset(4)] + public int InputAxis; + + [FieldOffset(8)] + public int InputAxisMin; + + [FieldOffset(12)] + public int InputAxisMax; + + [FieldOffset(4)] + public int InputHat; + + [FieldOffset(8)] + public int InputHatMask; + + [FieldOffset(16)] + public SdlGamepadBindingType OutputType; + + [FieldOffset(20)] + public SdlGamepadButton OutputButton; + + [FieldOffset(20)] + public SdlGamepadAxis OutputAxis; + + [FieldOffset(24)] + public int OutputAxisMin; + + [FieldOffset(28)] + public int OutputAxisMax; +} diff --git a/Brutal.Sdl/Sdl.cs b/Brutal.Sdl/Sdl.cs new file mode 100644 index 0000000..46f8b73 --- /dev/null +++ b/Brutal.Sdl/Sdl.cs @@ -0,0 +1,159 @@ +using Brutal.Logging; + +namespace Brutal.SdlApi; + +/// +/// The exception type an SDL callback (event watch/filter, log output function, …) failed with, +/// captured at the native boundary and rethrown from managed code at the next event pump. Derives +/// from so callers can catch the whole SDL failure family uniformly; the +/// original callback exception is preserved as . +/// +public sealed class SdlCallbackException : SdlException +{ + /// Initializes a new with the given message. + /// A description of the callback in which the exception occurred. + public SdlCallbackException(string message) + : base(message) { } + + /// Initializes a new with a message and inner exception. + /// A description of the callback in which the exception occurred. + /// The original exception thrown inside the callback. + public SdlCallbackException(string message, Exception innerException) + : base(message, innerException) { } +} + +/// +/// Collects exceptions thrown inside SDL callbacks and rethrows them from managed code. +/// +/// +/// SDL invokes managed callbacks (event watches, event filters, log output functions, …) from +/// native code. An exception thrown out of such a callback cannot legally unwind across the native +/// stack frame that called it. Doing so is undefined behaviour. Instead, the callback wrappers in +/// this binding catch every exception and hand it to this aggregator with , which +/// also logs it immediately so it is never silently lost. The pending exceptions are rethrown from +/// managed code at the next pump point (, +/// , , …) via +/// . To bound memory when a pump point is never reached, only the first +/// exceptions are kept; further ones are counted and reported but not +/// stored. +/// +internal sealed class ExceptionAggregator +{ + /// The maximum number of pending exceptions retained; beyond this only a count is kept. + public const int MaxRetained = 16; + + private readonly List _exceptions = []; + private int _dropped; + private readonly Lock _lock = new(); + + /// + /// Records an exception raised inside a native-to-managed callback so it can be rethrown from + /// managed code at the next . The exception is logged immediately at + /// error level (so it is visible even if no pump point ever drains the aggregator) and retained + /// up to entries; further exceptions increment a dropped counter. + /// + /// A description of the callback in which the exception occurred. + /// The exception that was caught, preserved as the inner exception. + public void Push(string message, Exception? innerException = null) + { + var wrapped = innerException is null + ? new SdlCallbackException(message) + : new SdlCallbackException(message, innerException); + + // Store before logging so a faulting logger cannot drop the exception. + lock (_lock) + { + if (_exceptions.Count < MaxRetained) + _exceptions.Add(wrapped); + else + _dropped++; + } + + try + { + Sdl.TraceLog.Error(wrapped); + } + catch + { + // A logging fault must not cross the native boundary. + } + } + + /// + /// Rethrows any exceptions captured since the last check, then clears the pending set. Does + /// nothing when nothing is pending. A single pending exception (with none dropped) is rethrown + /// directly; otherwise the pending exceptions are wrapped in an + /// whose message notes how many further exceptions were dropped. + /// + /// Exactly one callback exception was pending. + /// More than one callback exception was pending, or some were dropped. + public void CheckExceptions() + { + Exception exception; + lock (_lock) + { + if (_exceptions.Count == 0) + return; + + var dropped = _dropped; + if (_exceptions.Count == 1 && dropped == 0) + { + exception = _exceptions[0]; + } + else + { + var message = + $"{_exceptions.Count} SDL callback exception(s) occurred." + + ( + dropped > 0 + ? $" A further {dropped} were dropped (only the first {MaxRetained} are retained)." + : "" + ); + exception = new AggregateException(message, _exceptions.ToArray()); + } + + _exceptions.Clear(); + _dropped = 0; + } + + throw exception; + } + + /// + /// Discards all pending exceptions without throwing. Used during + /// teardown, where the parked exceptions refer to a session that is ending. + /// + public void Clear() + { + lock (_lock) + { + _exceptions.Clear(); + _dropped = 0; + } + } +} + +/// +/// Provides access to the SDL3 library. +/// +public static unsafe partial class Sdl +{ + /// + /// The name the generated P/Invoke surface imports against. The static + /// constructor registers a that normalizes + /// this name to the platform-specific SDL3 shared library. + /// + internal const string Dll = "SDL3"; + + /// + /// The logging category for the per-call trace logs the generated P/Invoke surface emits. + /// + internal static readonly LogCategory TraceLog = LogCategory.Make("Sdl"); + + /// + /// Captures exceptions thrown inside SDL callbacks (event watches/filters, log output) so they + /// can be rethrown safely from managed code at the next event pump instead of unwinding across + /// the native boundary. + /// + internal static readonly ExceptionAggregator ExceptionAggregator = new(); +} diff --git a/Brutal.Sdl/SdlException.cs b/Brutal.Sdl/SdlException.cs new file mode 100644 index 0000000..a70ba03 --- /dev/null +++ b/Brutal.Sdl/SdlException.cs @@ -0,0 +1,36 @@ +namespace Brutal.SdlApi; + +/// +/// The exception thrown when an SDL call fails. Its carries the +/// human-readable error text SDL reported through SDL_GetError at the point of failure. +/// +public class SdlException : Exception +{ + /// + /// Initializes a new with the given message. + /// + /// The failure description, typically the SDL_GetError text. + public SdlException(string message) + : base(message) { } + + /// + /// Initializes a new with the given message and inner exception. + /// + /// The failure description, typically the SDL_GetError text. + /// The underlying exception that caused this failure. + public SdlException(string message, Exception innerException) + : base(message, innerException) { } + + /// + /// Creates an whose message is the current SDL_GetError text, + /// copied immediately into managed memory (SDL owns the returned pointer). The + /// prefixes the SDL message so the failing operation is identifiable. + /// + /// A short description of the operation that failed. + /// A new carrying and the SDL error text. + public static SdlException FromError(string context) + { + var error = Sdl.PInvoke.GetError(); + return string.IsNullOrEmpty(error) ? new SdlException(context) : new SdlException($"{context}: {error}"); + } +} diff --git a/Brutal.ShaderC/BespokeUtf8Encoder.cs b/Brutal.ShaderC/BespokeUtf8Encoder.cs new file mode 100644 index 0000000..a6c8dc4 --- /dev/null +++ b/Brutal.ShaderC/BespokeUtf8Encoder.cs @@ -0,0 +1,72 @@ +using CommunityToolkit.HighPerformance; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.ShaderCApi; + +using String16 = string; +using StringView8 = ReadOnlySpan; + +/// +/// A helper struct to convert a set of strings into a single contiguous UTF-8 encoded byte array, with a null terminator after each string. +/// +internal readonly ref struct BespokeUtf8Encoder : IDisposable +{ + private readonly SpanOwner _storage; + private readonly Span _indexToEndLookup; + private readonly Span _content; + + public BespokeUtf8Encoder(String16 i1, String16 i2, out StringView8 o1, out StringView8 o2) + : this(i1, i2) + { + o1 = Read(0); + o2 = Read(1); + } + + public BespokeUtf8Encoder( + String16 i1, + String16 i2, + String16 i3, + out StringView8 o1, + out StringView8 o2, + out StringView8 o3 + ) + : this(i1, i2, i3) + { + o1 = Read(0); + o2 = Read(1); + o3 = Read(2); + } + + private BespokeUtf8Encoder(params ReadOnlySpan strings) + { + // work out how many bytes we're going to need to encode everything (strings + lookup table) + var headerByteCount = (int)ByteSize.Of(strings.Length); + var contentByteCount = 0; + foreach (var t in strings) + contentByteCount += Utf8.GetMaxByteCount(t.Length) + 1; + + // allocate the storage, then carve it into the lookup table and the content region + _storage = SpanOwner.Allocate(headerByteCount + contentByteCount); + _indexToEndLookup = _storage.Span[..headerByteCount].Cast(); + _content = _storage.Span[headerByteCount..]; + + var offset = 0; + for (var index = 0; index < strings.Length; index++) + { + offset += Utf8.GetBytes(strings[index], _content[offset..]); + _content[offset] = 0; + _indexToEndLookup[index] = offset++; + } + } + + private StringView8 Read(int index) + { + // grab the end index first, also serves as a bound check + var endIndex = _indexToEndLookup[index]; + // the start index is the previous string's NUL terminator + 1, or zero if this is the first string + var startIndex = index > 0 ? _indexToEndLookup[index - 1] + 1 : 0; + return _content[startIndex..endIndex]; + } + + public void Dispose() => _storage.Dispose(); +} diff --git a/Brutal.ShaderC/Generated/Enumerations.gen.cs b/Brutal.ShaderC/Generated/Enumerations.gen.cs new file mode 100644 index 0000000..4abe0ee --- /dev/null +++ b/Brutal.ShaderC/Generated/Enumerations.gen.cs @@ -0,0 +1,484 @@ +namespace Brutal.ShaderCApi +{ + public enum TargetEnv : uint + { + Vulkan, // SPIR-V under Vulkan semantics + Opengl, // SPIR-V under OpenGL semantics + OpenglCompat, // SPIR-V under OpenGL semantics, including compatibility profile functions + + [Obsolete("Deprecated, SPIR-V under WebGPU semantics")] + Webgpu, // Deprecated, SPIR-V under WebGPU semantics + Default = Vulkan, + } + + public enum EnvVersion : uint + { + /// For Vulkan, use Vulkan's mapping of version numbers to integers. + /// See vulkan.h + Vulkan_1_0 = ((1u << 22)), + + /// For Vulkan, use Vulkan's mapping of version numbers to integers. + /// See vulkan.h + Vulkan_1_1 = ((1u << 22) | (1 << 12)), + + /// For Vulkan, use Vulkan's mapping of version numbers to integers. + /// See vulkan.h + Vulkan_1_2 = ((1u << 22) | (2 << 12)), + + /// For Vulkan, use Vulkan's mapping of version numbers to integers. + /// See vulkan.h + Vulkan_1_3 = ((1u << 22) | (3 << 12)), + + /// For Vulkan, use Vulkan's mapping of version numbers to integers. + /// See vulkan.h + Vulkan_1_4 = ((1u << 22) | (4 << 12)), + + /// For OpenGL, use the number from #version in shaders. + /// TODO(dneto): Currently no difference between OpenGL 4.5 and 4.6. + /// See glslang/Standalone/Standalone.cpp + /// TODO(dneto): Glslang doesn't accept a OpenGL client version of 460. + Opengl_4_5 = 450, + + [Obsolete("Deprecated, WebGPU env never defined versions")] + Webgpu, // Deprecated, WebGPU env never defined versions + } + + /// The known versions of SPIR-V. + public enum SpirvVersion : uint + { + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_0 = 0x010000u, + + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_1 = 0x010100u, + + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_2 = 0x010200u, + + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_3 = 0x010300u, + + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_4 = 0x010400u, + + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_5 = 0x010500u, + + /// Use the values used for word 1 of a SPIR-V binary: + /// - bits 24 to 31: zero + /// - bits 16 to 23: major version number + /// - bits 8 to 15: minor version number + /// - bits 0 to 7: zero + _1_6 = 0x010600u, + } + + /// Indicate the status of a compilation. + public enum CompilationStatus : uint + { + Success = 0, + InvalidStage = 1, // error stage deduction + CompilationError = 2, + InternalError = 3, // unexpected failure + NullResultObject = 4, + InvalidAssembly = 5, + ValidationError = 6, + TransformationError = 7, + ConfigurationError = 8, + } + + /// Source language kind. + public enum SourceLanguage : uint + { + Glsl, + Hlsl, + } + + public enum ShaderKind : uint + { + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + VertexShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + FragmentShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + ComputeShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GeometryShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + TessControlShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + TessEvaluationShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GlslVertexShader = VertexShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GlslFragmentShader = FragmentShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GlslComputeShader = ComputeShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GlslGeometryShader = GeometryShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GlslTessControlShader = TessControlShader, + + /// Forced shader kinds. These shader kinds force the compiler to compile the + /// source code as the specified kind of shader. + GlslTessEvaluationShader = TessEvaluationShader, + + /// Deduce the shader kind from #pragma annotation in the source code. Compiler + /// will emit error if #pragma annotation is not found. + GlslInferFromSource, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultVertexShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultFragmentShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultComputeShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultGeometryShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultTessControlShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultTessEvaluationShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + SpirvAssembly, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + RayGenShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + AnyHitShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + ClosestHitShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + MissShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + IntersectionShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + CallableShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslRayGenShader = RayGenShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslAnyHitShader = AnyHitShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslClosestHitShader = ClosestHitShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslMissShader = MissShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslIntersectionShader = IntersectionShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslCallableShader = CallableShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultRayGenShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultAnyHitShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultClosestHitShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultMissShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultIntersectionShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultCallableShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + TaskShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + MeshShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslTaskShader = TaskShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslMeshShader = MeshShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultTaskShader, + + /// Default shader kinds. Compiler will fall back to compile the source code as + /// the specified kind of shader when #pragma annotation is not found in the + /// source code. + GlslDefaultMeshShader, + } + + public enum Profile : uint + { + None, // Used if and only if GLSL version did not specify profiles. + Core, + Compatibility, // Disabled. This generates an error + Es, + } + + /// Optimization level. + public enum OptimizationLevel : uint + { + Zero, // no optimization + Size, // optimize towards reducing code size + Performance, // optimize towards performance + } + + /// Resource limits. + public enum Limit : uint + { + MaxLights, + MaxClipPlanes, + MaxTextureUnits, + MaxTextureCoords, + MaxVertexAttribs, + MaxVertexUniformComponents, + MaxVaryingFloats, + MaxVertexTextureImageUnits, + MaxCombinedTextureImageUnits, + MaxTextureImageUnits, + MaxFragmentUniformComponents, + MaxDrawBuffers, + MaxVertexUniformVectors, + MaxVaryingVectors, + MaxFragmentUniformVectors, + MaxVertexOutputVectors, + MaxFragmentInputVectors, + MinProgramTexelOffset, + MaxProgramTexelOffset, + MaxClipDistances, + MaxComputeWorkGroupCountX, + MaxComputeWorkGroupCountY, + MaxComputeWorkGroupCountZ, + MaxComputeWorkGroupSizeX, + MaxComputeWorkGroupSizeY, + MaxComputeWorkGroupSizeZ, + MaxComputeUniformComponents, + MaxComputeTextureImageUnits, + MaxComputeImageUniforms, + MaxComputeAtomicCounters, + MaxComputeAtomicCounterBuffers, + MaxVaryingComponents, + MaxVertexOutputComponents, + MaxGeometryInputComponents, + MaxGeometryOutputComponents, + MaxFragmentInputComponents, + MaxImageUnits, + MaxCombinedImageUnitsAndFragmentOutputs, + MaxCombinedShaderOutputResources, + MaxImageSamples, + MaxVertexImageUniforms, + MaxTessControlImageUniforms, + MaxTessEvaluationImageUniforms, + MaxGeometryImageUniforms, + MaxFragmentImageUniforms, + MaxCombinedImageUniforms, + MaxGeometryTextureImageUnits, + MaxGeometryOutputVertices, + MaxGeometryTotalOutputComponents, + MaxGeometryUniformComponents, + MaxGeometryVaryingComponents, + MaxTessControlInputComponents, + MaxTessControlOutputComponents, + MaxTessControlTextureImageUnits, + MaxTessControlUniformComponents, + MaxTessControlTotalOutputComponents, + MaxTessEvaluationInputComponents, + MaxTessEvaluationOutputComponents, + MaxTessEvaluationTextureImageUnits, + MaxTessEvaluationUniformComponents, + MaxTessPatchComponents, + MaxPatchVertices, + MaxTessGenLevel, + MaxViewports, + MaxVertexAtomicCounters, + MaxTessControlAtomicCounters, + MaxTessEvaluationAtomicCounters, + MaxGeometryAtomicCounters, + MaxFragmentAtomicCounters, + MaxCombinedAtomicCounters, + MaxAtomicCounterBindings, + MaxVertexAtomicCounterBuffers, + MaxTessControlAtomicCounterBuffers, + MaxTessEvaluationAtomicCounterBuffers, + MaxGeometryAtomicCounterBuffers, + MaxFragmentAtomicCounterBuffers, + MaxCombinedAtomicCounterBuffers, + MaxAtomicCounterBufferSize, + MaxTransformFeedbackBuffers, + MaxTransformFeedbackInterleavedComponents, + MaxCullDistances, + MaxCombinedClipAndCullDistances, + MaxSamples, + MaxMeshOutputVerticesNv, + MaxMeshOutputPrimitivesNv, + MaxMeshWorkGroupSizeXNv, + MaxMeshWorkGroupSizeYNv, + MaxMeshWorkGroupSizeZNv, + MaxTaskWorkGroupSizeXNv, + MaxTaskWorkGroupSizeYNv, + MaxTaskWorkGroupSizeZNv, + MaxMeshViewCountNv, + MaxMeshOutputVerticesExt, + MaxMeshOutputPrimitivesExt, + MaxMeshWorkGroupSizeXExt, + MaxMeshWorkGroupSizeYExt, + MaxMeshWorkGroupSizeZExt, + MaxTaskWorkGroupSizeXExt, + MaxTaskWorkGroupSizeYExt, + MaxTaskWorkGroupSizeZExt, + MaxMeshViewCountExt, + MaxDualSourceDrawBuffersExt, + } + + /// Uniform resource kinds. + /// In Vulkan, uniform resources are bound to the pipeline via descriptors + /// with numbered bindings and sets. + public enum UniformKind : uint + { + /// Image and image buffer. + Image, + + /// Pure sampler. + Sampler, + + /// Sampled texture in GLSL, and Shader Resource View in HLSL. + Texture, + + /// Uniform Buffer Object (UBO) in GLSL. Cbuffer in HLSL. + Buffer, + + /// Shader Storage Buffer Object (SSBO) in GLSL. + StorageBuffer, + + /// Unordered Access View, in HLSL. (Writable storage image or storage + /// buffer.) + UnorderedAccessView, + } + + /// The kinds of include requests. + public enum IncludeType : uint + { + Relative, // E.g. #include "source" + Standard, // E.g. #include + } +} diff --git a/Brutal.ShaderC/Generated/ShaderC.gen.cs b/Brutal.ShaderC/Generated/ShaderC.gen.cs new file mode 100644 index 0000000..2cea12b --- /dev/null +++ b/Brutal.ShaderC/Generated/ShaderC.gen.cs @@ -0,0 +1,265 @@ +using System.Runtime.InteropServices; + +namespace Brutal.ShaderCApi +{ + public static partial class ShaderC + { + public static unsafe partial class PInvoke + { + [LibraryImport("shaderc")] + public static partial Compiler shaderc_compiler_initialize(); + + [LibraryImport("shaderc")] + public static partial void shaderc_compiler_release(Compiler arg); + + [LibraryImport("shaderc")] + public static partial CompileOptions shaderc_compile_options_initialize(); + + [LibraryImport("shaderc")] + public static partial CompileOptions shaderc_compile_options_clone(CompileOptions options); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_release(CompileOptions options); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_add_macro_definition( + CompileOptions options, + byte* name, + ByteSize64 nameLength, + byte* value, + ByteSize64 valueLength + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_source_language( + CompileOptions options, + SourceLanguage lang + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_generate_debug_info(CompileOptions options); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_emit_nonsemantic_shader_debug_info( + CompileOptions options + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_optimization_level( + CompileOptions options, + OptimizationLevel level + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_forced_version_profile( + CompileOptions options, + int version, + Profile profile + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_include_callbacks( + CompileOptions options, + IncludeResolveFn resolver, + IncludeResultReleaseFn resultReleaser, + void* userData + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_suppress_warnings(CompileOptions options); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_target_env( + CompileOptions options, + TargetEnv target, + uint version + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_target_spirv( + CompileOptions options, + SpirvVersion version + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_warnings_as_errors(CompileOptions options); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_limit( + CompileOptions options, + Limit limit, + int value + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_auto_bind_uniforms( + CompileOptions options, + Bool8 autoBind + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_auto_combined_image_sampler( + CompileOptions options, + Bool8 upgrade + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_hlsl_io_mapping( + CompileOptions options, + Bool8 hlslIomap + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_hlsl_offsets( + CompileOptions options, + Bool8 hlslOffsets + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_binding_base( + CompileOptions options, + UniformKind kind, + uint @base + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_binding_base_for_stage( + CompileOptions options, + ShaderKind shaderKind, + UniformKind kind, + uint @base + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_preserve_bindings( + CompileOptions options, + Bool8 preserveBindings + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_max_id_bound( + CompileOptions options, + uint maxIdBound + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_auto_map_locations( + CompileOptions options, + Bool8 autoMap + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_hlsl_register_set_and_binding_for_stage( + CompileOptions options, + ShaderKind shaderKind, + byte* reg, + byte* set, + byte* binding + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_hlsl_register_set_and_binding( + CompileOptions options, + byte* reg, + byte* set, + byte* binding + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_hlsl_functionality1( + CompileOptions options, + Bool8 enable + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_hlsl_16bit_types( + CompileOptions options, + Bool8 enable + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_vulkan_rules_relaxed( + CompileOptions options, + Bool8 enable + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_invert_y(CompileOptions options, Bool8 enable); + + [LibraryImport("shaderc")] + public static partial void shaderc_compile_options_set_nan_clamp(CompileOptions options, Bool8 enable); + + [LibraryImport("shaderc")] + public static partial CompilationResult shaderc_compile_into_spv( + Compiler compiler, + byte* sourceText, + ByteSize64 sourceTextSize, + ShaderKind shaderKind, + byte* inputFileName, + byte* entryPointName, + CompileOptions additionalOptions + ); + + [LibraryImport("shaderc")] + public static partial CompilationResult shaderc_compile_into_spv_assembly( + Compiler compiler, + byte* sourceText, + ByteSize64 sourceTextSize, + ShaderKind shaderKind, + byte* inputFileName, + byte* entryPointName, + CompileOptions additionalOptions + ); + + [LibraryImport("shaderc")] + public static partial CompilationResult shaderc_compile_into_preprocessed_text( + Compiler compiler, + byte* sourceText, + ByteSize64 sourceTextSize, + ShaderKind shaderKind, + byte* inputFileName, + byte* entryPointName, + CompileOptions additionalOptions + ); + + [LibraryImport("shaderc")] + public static partial CompilationResult shaderc_assemble_into_spv( + Compiler compiler, + byte* sourceAssembly, + ByteSize64 sourceAssemblySize, + CompileOptions additionalOptions + ); + + [LibraryImport("shaderc")] + public static partial void shaderc_result_release(CompilationResult result); + + [LibraryImport("shaderc")] + public static partial ByteSize64 shaderc_result_get_length(CompilationResult result); + + [LibraryImport("shaderc")] + public static partial ByteSize64 shaderc_result_get_num_warnings(CompilationResult result); + + [LibraryImport("shaderc")] + public static partial ByteSize64 shaderc_result_get_num_errors(CompilationResult result); + + [LibraryImport("shaderc")] + public static partial CompilationStatus shaderc_result_get_compilation_status(CompilationResult arg); + + [LibraryImport("shaderc")] + public static partial byte* shaderc_result_get_bytes(CompilationResult result); + + [LibraryImport( + "shaderc", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string shaderc_result_get_error_message(CompilationResult result); + + [LibraryImport("shaderc")] + public static partial void shaderc_get_spv_version(uint* version, uint* revision); + + [LibraryImport("shaderc")] + public static partial Bool8 shaderc_parse_version_profile(byte* str, int* version, Profile* profile); + } + } +} diff --git a/Brutal.ShaderC/Generated/Structs.gen.cs b/Brutal.ShaderC/Generated/Structs.gen.cs new file mode 100644 index 0000000..ffa727f --- /dev/null +++ b/Brutal.ShaderC/Generated/Structs.gen.cs @@ -0,0 +1,288 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal.Interop; + +namespace Brutal.ShaderCApi +{ + [InteropHandle] + public readonly unsafe partial struct Compiler : IDisposable + { + public void Dispose() => ShaderC.PInvoke.shaderc_compiler_release(this); + + public CompilationResult CompileIntoSpv( + ReadOnlySpan sourceText, + ShaderKind shaderKind, + RefString8 inputFileName, + RefString8 entryPointName, + CompileOptions additionalOptions + ) + { + fixed (byte* sourceTextFixed = sourceText) + { + fixed (byte* inputFileNameFixed = inputFileName) + { + fixed (byte* entryPointNameFixed = entryPointName) + { + return ShaderC.PInvoke.shaderc_compile_into_spv( + this, + sourceTextFixed, + ByteSize.Of(sourceText), + shaderKind, + inputFileNameFixed, + entryPointNameFixed, + additionalOptions + ); + } + } + } + } + + public CompilationResult CompileIntoSpvAssembly( + ReadOnlySpan sourceText, + ShaderKind shaderKind, + RefString8 inputFileName, + RefString8 entryPointName, + CompileOptions additionalOptions + ) + { + fixed (byte* sourceTextFixed = sourceText) + { + fixed (byte* inputFileNameFixed = inputFileName) + { + fixed (byte* entryPointNameFixed = entryPointName) + { + return ShaderC.PInvoke.shaderc_compile_into_spv_assembly( + this, + sourceTextFixed, + ByteSize.Of(sourceText), + shaderKind, + inputFileNameFixed, + entryPointNameFixed, + additionalOptions + ); + } + } + } + } + + public CompilationResult CompileIntoPreprocessedText( + ReadOnlySpan sourceText, + ShaderKind shaderKind, + RefString8 inputFileName, + RefString8 entryPointName, + CompileOptions additionalOptions + ) + { + fixed (byte* sourceTextFixed = sourceText) + { + fixed (byte* inputFileNameFixed = inputFileName) + { + fixed (byte* entryPointNameFixed = entryPointName) + { + return ShaderC.PInvoke.shaderc_compile_into_preprocessed_text( + this, + sourceTextFixed, + ByteSize.Of(sourceText), + shaderKind, + inputFileNameFixed, + entryPointNameFixed, + additionalOptions + ); + } + } + } + } + + public CompilationResult AssembleIntoSpv(ReadOnlySpan sourceAssembly, CompileOptions additionalOptions) + { + fixed (byte* sourceAssemblyFixed = sourceAssembly) + { + return ShaderC.PInvoke.shaderc_assemble_into_spv( + this, + sourceAssemblyFixed, + ByteSize.Of(sourceAssembly), + additionalOptions + ); + } + } + } + + [InteropHandle] + public readonly unsafe partial struct CompileOptions : IDisposable + { + public CompileOptions Clone() => ShaderC.PInvoke.shaderc_compile_options_clone(this); + + public void Dispose() => ShaderC.PInvoke.shaderc_compile_options_release(this); + + public void AddMacroDefinition(ReadOnlySpan name, ReadOnlySpan value) + { + fixed (byte* nameFixed = name) + { + fixed (byte* valueFixed = value) + { + ShaderC.PInvoke.shaderc_compile_options_add_macro_definition( + this, + nameFixed, + ByteSize.Of(name), + valueFixed, + ByteSize.Of(value) + ); + } + } + } + + public void SetSourceLanguage(SourceLanguage lang) => + ShaderC.PInvoke.shaderc_compile_options_set_source_language(this, lang); + + public void SetGenerateDebugInfo() => ShaderC.PInvoke.shaderc_compile_options_set_generate_debug_info(this); + + public void SetEmitNonsemanticShaderDebugInfo() => + ShaderC.PInvoke.shaderc_compile_options_set_emit_nonsemantic_shader_debug_info(this); + + public void SetOptimizationLevel(OptimizationLevel level) => + ShaderC.PInvoke.shaderc_compile_options_set_optimization_level(this, level); + + public void SetForcedVersionProfile(int version, Profile profile) => + ShaderC.PInvoke.shaderc_compile_options_set_forced_version_profile(this, version, profile); + + public void SetIncludeCallbacks( + IncludeResolveFn resolver, + IncludeResultReleaseFn resultReleaser, + void* userData + ) => ShaderC.PInvoke.shaderc_compile_options_set_include_callbacks(this, resolver, resultReleaser, userData); + + public void SetSuppressWarnings() => ShaderC.PInvoke.shaderc_compile_options_set_suppress_warnings(this); + + public void SetTargetEnv(TargetEnv target, uint version) => + ShaderC.PInvoke.shaderc_compile_options_set_target_env(this, target, version); + + public void SetTargetSpirv(SpirvVersion version) => + ShaderC.PInvoke.shaderc_compile_options_set_target_spirv(this, version); + + public void SetWarningsAsErrors() => ShaderC.PInvoke.shaderc_compile_options_set_warnings_as_errors(this); + + public void SetLimit(Limit limit, int value) => + ShaderC.PInvoke.shaderc_compile_options_set_limit(this, limit, value); + + public void SetAutoBindUniforms(Bool8 autoBind) => + ShaderC.PInvoke.shaderc_compile_options_set_auto_bind_uniforms(this, autoBind); + + public void SetAutoCombinedImageSampler(Bool8 upgrade) => + ShaderC.PInvoke.shaderc_compile_options_set_auto_combined_image_sampler(this, upgrade); + + public void SetHlslIoMapping(Bool8 hlslIomap) => + ShaderC.PInvoke.shaderc_compile_options_set_hlsl_io_mapping(this, hlslIomap); + + public void SetHlslOffsets(Bool8 hlslOffsets) => + ShaderC.PInvoke.shaderc_compile_options_set_hlsl_offsets(this, hlslOffsets); + + public void SetBindingBase(UniformKind kind, uint @base) => + ShaderC.PInvoke.shaderc_compile_options_set_binding_base(this, kind, @base); + + public void SetBindingBaseForStage(ShaderKind shaderKind, UniformKind kind, uint @base) => + ShaderC.PInvoke.shaderc_compile_options_set_binding_base_for_stage(this, shaderKind, kind, @base); + + public void SetPreserveBindings(Bool8 preserveBindings) => + ShaderC.PInvoke.shaderc_compile_options_set_preserve_bindings(this, preserveBindings); + + public void SetMaxIdBound(uint maxIdBound) => + ShaderC.PInvoke.shaderc_compile_options_set_max_id_bound(this, maxIdBound); + + public void SetAutoMapLocations(Bool8 autoMap) => + ShaderC.PInvoke.shaderc_compile_options_set_auto_map_locations(this, autoMap); + + public void SetHlslRegisterSetAndBindingForStage( + ShaderKind shaderKind, + RefString8 reg, + RefString8 set, + RefString8 binding + ) + { + fixed (byte* regFixed = reg) + { + fixed (byte* setFixed = set) + { + fixed (byte* bindingFixed = binding) + { + ShaderC.PInvoke.shaderc_compile_options_set_hlsl_register_set_and_binding_for_stage( + this, + shaderKind, + regFixed, + setFixed, + bindingFixed + ); + } + } + } + } + + public void SetHlslRegisterSetAndBinding(RefString8 reg, RefString8 set, RefString8 binding) + { + fixed (byte* regFixed = reg) + { + fixed (byte* setFixed = set) + { + fixed (byte* bindingFixed = binding) + { + ShaderC.PInvoke.shaderc_compile_options_set_hlsl_register_set_and_binding( + this, + regFixed, + setFixed, + bindingFixed + ); + } + } + } + } + + public void SetHlslFunctionality1(Bool8 enable) => + ShaderC.PInvoke.shaderc_compile_options_set_hlsl_functionality1(this, enable); + + public void SetHlsl16BitTypes(Bool8 enable) => + ShaderC.PInvoke.shaderc_compile_options_set_hlsl_16bit_types(this, enable); + + public void SetVulkanRulesRelaxed(Bool8 enable) => + ShaderC.PInvoke.shaderc_compile_options_set_vulkan_rules_relaxed(this, enable); + + public void SetInvertY(Bool8 enable) => ShaderC.PInvoke.shaderc_compile_options_set_invert_y(this, enable); + + public void SetNanClamp(Bool8 enable) => ShaderC.PInvoke.shaderc_compile_options_set_nan_clamp(this, enable); + } + + /// An include result. + public unsafe partial struct IncludeResult + { + /// The name of the source file. The name should be fully resolved + /// in the sense that it should be a unique name in the context of the + /// includer. For example, if the includer maps source names to files in + /// a filesystem, then this name should be the absolute path of the file. + /// For a failed inclusion, this string is empty. + public byte* SourceName; + public ByteSize64 SourceNameLength; + + /// The text contents of the source file in the normal case. + /// For a failed inclusion, this contains the error message. + public byte* Content; + public ByteSize64 ContentLength; + + /// User data to be passed along with this request. + public void* UserData; + } + + [InteropHandle] + public readonly unsafe partial struct CompilationResult : IDisposable + { + public void Dispose() => ShaderC.PInvoke.shaderc_result_release(this); + + public ByteSize64 GetLength() => ShaderC.PInvoke.shaderc_result_get_length(this); + + public ByteSize64 GetNumWarnings() => ShaderC.PInvoke.shaderc_result_get_num_warnings(this); + + public ByteSize64 GetNumErrors() => ShaderC.PInvoke.shaderc_result_get_num_errors(this); + + public CompilationStatus GetCompilationStatus() => ShaderC.PInvoke.shaderc_result_get_compilation_status(this); + + public byte* GetBytes() => ShaderC.PInvoke.shaderc_result_get_bytes(this); + + public string GetErrorMessage() => ShaderC.PInvoke.shaderc_result_get_error_message(this); + } +} diff --git a/Brutal.ShaderC/GlobalUsings.cs b/Brutal.ShaderC/GlobalUsings.cs new file mode 100644 index 0000000..9d0910a --- /dev/null +++ b/Brutal.ShaderC/GlobalUsings.cs @@ -0,0 +1,3 @@ +// Global using directives + +global using Brutal.Strings; diff --git a/Brutal.ShaderC/HighLevel.cs b/Brutal.ShaderC/HighLevel.cs new file mode 100644 index 0000000..fdb30ee --- /dev/null +++ b/Brutal.ShaderC/HighLevel.cs @@ -0,0 +1,297 @@ +namespace Brutal.ShaderCApi; + +/// +/// Extension methods providing a high-level throwing API over the generated surface. +/// +public static class CompilerExtensions +{ + /// + /// Returns unchanged when compilation succeeded; otherwise throws the + /// typed that corresponds to the . + /// + /// + /// + /// This method is fluent and does not dispose ; ownership remains + /// with the caller regardless of whether it succeeds or throws. + /// + /// + /// The compilation result to inspect. + /// when . + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// + /// Thrown when the status is . + /// + /// Thrown when the status is unrecognised. + public static CompilationResult ThrowIfFailed(this in CompilationResult result) => + result.GetCompilationStatus() switch + { + CompilationStatus.Success => result, + CompilationStatus.InvalidStage => throw new ShaderInvalidStageException(result), + CompilationStatus.CompilationError => throw new ShaderCompilationException(result), + CompilationStatus.InternalError => throw new ShaderInternalException(result), + CompilationStatus.NullResultObject => throw new ShaderNullResultObjectException(result), + CompilationStatus.InvalidAssembly => throw new ShaderInvalidAssemblyException(result), + CompilationStatus.ValidationError => throw new ShaderValidationException(result), + CompilationStatus.TransformationError => throw new ShaderTransformationException(result), + CompilationStatus.ConfigurationError => throw new ShaderConfigurationException(result), + _ => throw new ShaderException(result), + }; + + /// + /// Returns when compilation succeeded; otherwise disposes the intermediate + /// result and rethrows the typed , so a failed compile never leaks the + /// native handle while a successful one stays owned by the caller. + /// + private static CompilationResult ThrowIfFailedOrDispose(this in CompilationResult result) + { + try + { + return result.ThrowIfFailed(); + } + catch + { + result.Dispose(); + throw; + } + } + + /// + /// Compiles GLSL/HLSL to binary SPIR-V, throwing a typed + /// on failure. + /// + /// + /// + /// On success the returned is owned by the caller and must be + /// disposed. While the result is undisposed the raw SPIR-V bytes are accessible via + /// . + /// + /// + /// On failure the intermediate result is disposed before the exception propagates, so no + /// native handle is leaked. + /// + /// + /// The compiler to use. + /// The GLSL/HLSL source code encoded as UTF-8. + /// The shader stage. + /// Source file name used in diagnostic messages. + /// Name of the entry-point function. + /// Compilation options. + /// + /// A with containing + /// the compiled SPIR-V bytes. + /// + /// Thrown on any compilation failure. + public static CompilationResult Compile( + this in Compiler c, + ReadOnlySpan source, + ShaderKind kind, + RefString8 inputFileName, + RefString8 entryPoint, + CompileOptions options + ) + { + return c.CompileIntoSpv(source, kind, inputFileName, entryPoint, options).ThrowIfFailedOrDispose(); + } + + /// + /// Pre-processes GLSL/HLSL , throwing a typed + /// on failure. + /// + /// + /// + /// On success the returned is owned by the caller and must be + /// disposed. While the result is undisposed the pre-processed text bytes are accessible via + /// . + /// + /// + /// On failure the intermediate result is disposed before the exception propagates, so no + /// native handle is leaked. + /// + /// + /// The compiler to use. + /// The GLSL/HLSL source code encoded as UTF-8. + /// The shader stage. + /// Source file name used in diagnostic messages. + /// Name of the entry-point function. + /// Compilation options. + /// + /// A with containing + /// the pre-processed text. + /// + /// Thrown on any pre-processing failure. + public static CompilationResult Preprocess( + this in Compiler c, + ReadOnlySpan source, + ShaderKind kind, + RefString8 inputFileName, + RefString8 entryPoint, + CompileOptions options + ) + { + return c.CompileIntoPreprocessedText(source, kind, inputFileName, entryPoint, options).ThrowIfFailedOrDispose(); + } + + /// + /// Compiles GLSL/HLSL (supplied as a managed ) to binary + /// SPIR-V, throwing a typed on failure. + /// + /// + /// + /// This overload UTF-8 encodes , , and + /// then delegates to the span-based overload. + /// + /// + /// On success the returned is owned by the caller and must be + /// disposed. While the result is undisposed the raw SPIR-V bytes are accessible via + /// . + /// + /// + /// On failure the intermediate result is disposed before the exception propagates, so no + /// native handle is leaked. + /// + /// + /// When is omitted (default), no custom compilation options or include + /// callbacks are applied; shaderc compiles with its built-in defaults. + /// + /// + /// The compiler to use. + /// The GLSL/HLSL source code as a managed string. + /// The shader stage. + /// Source file name used in diagnostic messages. + /// Name of the entry-point function. Defaults to "main". + /// + /// Compilation options, or to use shaderc built-in defaults with no + /// include callbacks. + /// + /// + /// A with containing + /// the compiled SPIR-V bytes. + /// + /// Thrown on any compilation failure. + public static CompilationResult Compile( + this in Compiler c, + string source, + ShaderKind kind, + string inputFileName, + string entryPoint = "main", + CompileOptions options = default + ) + { + using var writer = new BespokeUtf8Encoder( + source, + inputFileName, + entryPoint, + out var source8, + out var inputFileName8, + out var entryPoint8 + ); + return c.Compile(source8, kind, inputFileName8, entryPoint8, options); + } + + /// + /// Reads the file at and compiles its GLSL/HLSL content to binary SPIR-V, + /// throwing a typed on failure. + /// + /// + /// + /// The file is read with and passed as raw bytes to the + /// span-based overload. is passed as the + /// inputFileName, so when include support is enabled by passing + /// configured with , relative #include + /// paths anchor against it. With the default shaderc has no include + /// support, so a source containing #include fails to compile. + /// + /// + /// On success the returned is owned by the caller and must be + /// disposed. While the result is undisposed the raw SPIR-V bytes are accessible via + /// . + /// + /// + /// On failure the intermediate result is disposed before the exception propagates, so no + /// native handle is leaked. + /// + /// + /// When is omitted (default), no custom compilation options or include + /// callbacks are applied; shaderc compiles with its built-in defaults. + /// + /// + /// The compiler to use. + /// Path to the shader source file. + /// The shader stage. + /// Name of the entry-point function. Defaults to "main". + /// + /// Compilation options, or to use shaderc built-in defaults with no + /// include callbacks. + /// + /// + /// A with containing + /// the compiled SPIR-V bytes. + /// + /// Thrown on any compilation failure. + /// Thrown if no file exists at . + /// Thrown if the file at cannot be read. + public static CompilationResult CompileFile( + this in Compiler c, + string path, + ShaderKind kind, + string entryPoint = "main", + CompileOptions options = default + ) + { + using var writer = new BespokeUtf8Encoder(path, entryPoint, out var path8, out var entryPoint8); + var sourceUtf8 = File.ReadAllBytes(path).AsSpan(); // wip: improve allocation strategy + return c.Compile(sourceUtf8, kind, path8, entryPoint8, options); + } + + /// + /// Assembles SPIR-V text assembly in into binary SPIR-V, + /// throwing a typed on failure. + /// + /// + /// + /// On success the returned is owned by the caller and must be + /// disposed. While the result is undisposed the raw SPIR-V bytes are accessible via + /// . + /// + /// + /// On failure the intermediate result is disposed before the exception propagates, so no + /// native handle is leaked. + /// + /// + /// The compiler to use. + /// The SPIR-V text assembly encoded as UTF-8. + /// Compilation options. + /// + /// A with containing + /// the assembled SPIR-V bytes. + /// + /// Thrown on any assembly failure. + public static CompilationResult Assemble( + this in Compiler c, + ReadOnlySpan sourceAssembly, + CompileOptions options + ) + { + return c.AssembleIntoSpv(sourceAssembly, options).ThrowIfFailedOrDispose(); + } +} diff --git a/Brutal.ShaderC/LICENSES/BRUTAL-SHADERC-THIRD-PARTY-NOTICES.txt b/Brutal.ShaderC/LICENSES/BRUTAL-SHADERC-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..4d7bf77 --- /dev/null +++ b/Brutal.ShaderC/LICENSES/BRUTAL-SHADERC-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,1700 @@ +============================================================================== +BRUTAL SHADERC - THIRD-PARTY NOTICES +============================================================================== + +RocketWerkz.Brutal.ShaderC redistributes third-party software inside the native +libraries it ships under runtimes//native/: + + shaderc_shared win-x64, linux-x64, osx-arm64 + SPIRV-Tools-shared win-x64, linux-x64, osx-arm64 + +Four third-party components are present in those binaries. Each component's +license terms follow in full - every block upstream states, each preceded by +upstream's own line scoping it or, where upstream gives a block no scoping +line - stating it in a source file's header, or in the license file with no +scope of its own - by a line naming the files that carry it. shaderc, +SPIRV-Tools and part of glslang are licensed under the Apache License 2.0, +which appears once as Appendix A. Each section's Licenses field lists, by +SPDX identifier, the blocks that section reproduces. + +The managed assembly Brutal.ShaderC.dll contains no third-party code. + +Contents + 1. shaderc Apache-2.0 + 2. glslang BSD-3-Clause, Apache-2.0, and five further licenses + 3. SPIRV-Tools Apache-2.0 + 4. SPIRV-Headers Khronos MIT, MIT, JsonCpp, and CC-BY-4.0 + Appendix A Apache License, Version 2.0 + + +============================================================================== +1. shaderc +============================================================================== + + Name shaderc + Version v2026.2-dev, commit 422c78aa4809afae803fdda9220c30e8c24daccf, + 17 April 2026 + Upstream https://github.com/google/shaderc + Licenses Apache-2.0 + Present in shaderc_shared + + Provenance Built from https://github.com/morrow-rw/shaderc, a RocketWerkz + fork of upstream at that commit, which adds one option for + non-semantic shader debug info. v2026.2-dev is upstream's own + development marker for this line, recorded in shaderc's CHANGES + file. + +Copyright 2015 The Shaderc Authors. All rights reserved. + +Licensed under the Apache License, Version 2.0, reproduced as Appendix A below. + + +============================================================================== +2. glslang +============================================================================== + + Name glslang + Version commit dcf1aaa6fd7dc2081f17aa0a4f1590a76473d961, 9 April 2026 + Upstream https://github.com/KhronosGroup/glslang + Licenses BSD-3-Clause; BSD-2-Clause; Apache-2.0; MIT; MIT-Khronos-old; + GPL-3.0-or-later WITH Bison-exception-2.2; + LicenseRef-NVIDIA-glslang-preprocessor + Present in shaderc_shared, statically linked + +glslang is not covered by a single license. Its license file lists four +licenses in use within the core of glslang-proper, two further licenses for the +preprocessor and a GPL 3 block with the Bison exception; two further blocks are +stated in source file headers instead. Nine blocks in all: + + - BSD-3-Clause over the core of glslang-proper minus the preprocessor. Its + second condition governs redistribution in binary form. + - BSD-2-Clause held by The Khronos Group Inc., listed among the licenses in + use within that core. Its second condition governs redistribution in binary + form. + - An MIT license held by The Khronos Group Inc., listed among the licenses in + use within that core. + - The Apache License 2.0, listed among the licenses in use within that core. + glslang's copy of that license is byte-identical to the copy reproduced as + Appendix A below, and is not repeated here. + - GPL 3 with the Bison exception over + glslang/MachineIndependent/glslang_tab.cpp and + glslang/MachineIndependent/glslang_tab.cpp.h, both GNU Bison 3.8.2 output + that compiles into the glslang library. + - An NVIDIA license over glslang/MachineIndependent/preprocessor, held by + NVIDIA Corporation, requiring notice retention in all redistributions. + - An MIT license held by The Khronos Group Inc., stated by the license file as + a further license for the preprocessor. + - An MIT license held by The Khronos Group Inc. over + glslang/MachineIndependent/gl_types.h, which the reflection and IO-mapping + code compiles in. Upstream states this one in that header rather than in the + license file, and it is reproduced below from the header. + - BSD-2-Clause held by Viktor Latypov over glslang's C interface: + glslang/CInterface/glslang_c_interface.cpp, + SPIRV/CInterface/spirv_c_interface.cpp, + glslang/Include/glslang_c_interface.h and + glslang/Include/glslang_c_shader_types.h. Upstream states this one in those + files rather than in the license file, and it is reproduced below from the + first of them. Its second condition governs redistribution in binary form. + +All nine are stated below. Six are reproduced from glslang's license file, +carrying that file's own lines scoping them where it states any; where it states +none, the lead-in below names the file that carries the notice instead. Two are +reproduced from the source files that carry them. The Apache License 2.0 is +Appendix A. + +----- +The core of glslang-proper, minus the preprocessor is licenced as follows: + +-------------------------------------------------------------------------------- +3-Clause BSD License +-------------------------------------------------------------------------------- + +// +// Copyright (C) 2015-2018 Google, Inc. +// Copyright (C) +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + + +-------------------------------------------------------------------------------- +2-Clause BSD License +-------------------------------------------------------------------------------- + +Copyright 2020 The Khronos Group Inc + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +The MIT License +-------------------------------------------------------------------------------- + +Copyright 2020 The Khronos Group Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- +glslang/MachineIndependent/glslang_tab.cpp and +glslang/MachineIndependent/glslang_tab.cpp.h carry this license: + +-------------------------------------------------------------------------------- +GPL 3 with special bison exception +-------------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +Bison Exception + +As a special exception, you may create a larger work that contains part or all +of the Bison parser skeleton and distribute that work under terms of your +choice, so long as that work isn't itself a parser generator using the skeleton +or a modified version thereof as a parser skeleton. Alternatively, if you +modify or redistribute the parser skeleton itself, you may (at your option) +remove this special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public License without +this special exception. + +This special exception was added by the Free Software Foundation in version +2.2 of Bison. + + END OF TERMS AND CONDITIONS + +----- +The preprocessor has the core licenses stated above, plus additional licences: + +/****************************************************************************\ +Copyright (c) 2002, NVIDIA Corporation. + +NVIDIA Corporation("NVIDIA") supplies this software to you in +consideration of your agreement to the following terms, and your use, +installation, modification or redistribution of this NVIDIA software +constitutes acceptance of these terms. If you do not agree with these +terms, please do not use, install, modify or redistribute this NVIDIA +software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, NVIDIA grants you a personal, non-exclusive +license, under NVIDIA's copyrights in this original NVIDIA software (the +"NVIDIA Software"), to use, reproduce, modify and redistribute the +NVIDIA Software, with or without modifications, in source and/or binary +forms; provided that if you redistribute the NVIDIA Software, you must +retain the copyright notice of NVIDIA, this notice and the following +text and disclaimers in all such redistributions of the NVIDIA Software. +Neither the name, trademarks, service marks nor logos of NVIDIA +Corporation may be used to endorse or promote products derived from the +NVIDIA Software without specific prior written permission from NVIDIA. +Except as expressly stated in this notice, no other rights or licenses +express or implied, are granted by NVIDIA herein, including but not +limited to any patent rights that may be infringed by your derivative +works or by other works in which the NVIDIA Software may be +incorporated. No hardware is licensed hereunder. + +THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, +INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER +PRODUCTS. + +IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY +OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE +NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, +TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF +NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\****************************************************************************/ + +/* +** Copyright (c) 2014-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +----- +The file glslang/MachineIndependent/gl_types.h carries this license: + +/* +** Copyright (c) 2013 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +----- +glslang/CInterface/glslang_c_interface.cpp, +SPIRV/CInterface/spirv_c_interface.cpp, +glslang/Include/glslang_c_interface.h and +glslang/Include/glslang_c_shader_types.h carry this license: + +/** +BSD 2-Clause License + +Copyright (c) 2019, Viktor Latypov +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +**/ + + +============================================================================== +3. SPIRV-Tools +============================================================================== + + Name SPIRV-Tools + Version commit a52828d672ab1622c308d0a6fc99630b79561609, 9 April 2026 + Upstream https://github.com/KhronosGroup/SPIRV-Tools + Licenses Apache-2.0 + Present in SPIRV-Tools-shared, and statically linked into shaderc_shared + +Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2016 Google Inc. +Copyright (c) 2016 LunarG Inc. + +Licensed under the Apache License, Version 2.0, reproduced as Appendix A below. + + +============================================================================== +4. SPIRV-Headers +============================================================================== + + Name SPIRV-Headers + Version commit 869266ad9e6050197d87cf0a22aab59abf7ad008, 10 April 2026 + Upstream https://github.com/KhronosGroup/SPIRV-Headers + Licenses MIT-Khronos-old; MIT; LicenseRef-JsonCpp; CC-BY-4.0 + (upstream states no identifier) + Present in shaderc_shared and SPIRV-Tools-shared + +SPIRV-Headers is a header-only project. Its declarations are compiled into both +native libraries this package ships. Its license file scopes its terms by file +glob, and follows in full - each block preceded by the line upstream scopes it +with. + +Files: All files except for those called out below. +Copyright (c) 2015-2024 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT + https://www.khronos.org/registry/ + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +--- + +Files: include/spirv/spir-v.xml +Copyright (c) 2015-2024 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +--- + +Files: tools/buildHeaders/jsoncpp/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== + +--- + +Files: **.md, WORKSPACE, .git** + +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + + + +============================================================================== +Appendix A - Apache License, Version 2.0 +============================================================================== + +This appendix is referenced by sections 1 (shaderc), 2 (glslang) and 3 +(SPIRV-Tools). It is reproduced once here rather than in each of those sections. +The three copies were compared against upstream at each component's pinned +version and are byte-identical. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Brutal.ShaderC/ShaderC.cs b/Brutal.ShaderC/ShaderC.cs new file mode 100644 index 0000000..44b6408 --- /dev/null +++ b/Brutal.ShaderC/ShaderC.cs @@ -0,0 +1,149 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace Brutal.ShaderCApi; + +/// +/// Provides access to the shaderc library for compiling GLSL/HLSL shaders to SPIR-V. +/// +/// +/// +/// The native shaderc_shared library is loaded in the type initializer. If the library is not +/// present in the assembly directory at the time the type is first accessed, the runtime will throw a +/// , a common deployment pitfall. +/// +/// +/// On macOS the library is loaded as shaderc_shared.1 (versioned dylib); all other platforms +/// use shaderc_shared. This platform difference is managed internally. +/// +/// +/// All handles returned by the factory methods (, +/// ) wrap native memory and must be disposed when no longer needed. +/// Each handle must be disposed exactly once: disposing twice or copying a handle struct and +/// disposing both copies passes an invalid handle to native code and results in undefined behavior +/// (heap corruption or crash). A structural dispose-guard is tracked upstream against the +/// [InteropHandle] generator. +/// +/// +public static partial class ShaderC +{ + private const string DLL = "shaderc"; + + static ShaderC() + { + var assembly = typeof(ShaderC).Assembly; + + // EXCEPTION: The dll name is different on macOS, so we need to handle that case + var nativeDll = NativeLibrary.Load( + OperatingSystem.IsMacOS() ? "shaderc_shared.1" : "shaderc_shared", + assembly, + DllImportSearchPath.AssemblyDirectory + ); + + // Set the DllImportResolver for the assembly to resolve the shaderc library + NativeLibrary.SetDllImportResolver( + assembly, + (libraryName, _, _) => + { + // We should only ever be resolving the shaderc library, so we assert that the library name is correct. + Debug.Assert(libraryName == "shaderc", "Unexpected library name requested for resolution."); + + return nativeDll; + } + ); + } + + /// Creates a new shaderc compiler handle. + /// + /// A handle wrapping native memory. The caller is responsible for disposing + /// the handle to release native resources. + /// + /// + /// + /// The returned handle wraps a native shaderc_compiler_t object. It must be disposed + /// when no longer needed; failing to do so leaks native memory. Dispose the handle exactly + /// once; a second Dispose call (or disposing two copies of the same struct) passes an + /// invalid handle to native code and results in undefined behavior. + /// + /// + /// A handle is not thread-safe: do not use the same + /// handle concurrently across threads. Create a separate handle per thread if concurrent + /// compilation is required. + /// + /// + /// If the underlying native initialization fails, shaderc returns a null handle, which this + /// method propagates as-is (an uninitialized struct). + /// + /// + public static Compiler CreateCompiler() + { + return PInvoke.shaderc_compiler_initialize(); + } + + /// Creates a new shaderc compile-options handle. + /// + /// A handle wrapping native memory. The caller is responsible for + /// disposing the handle to release native resources. + /// + /// + /// + /// The returned handle wraps a native shaderc_compile_options_t object. It must be + /// disposed when no longer needed; failing to do so leaks native memory. Dispose the handle + /// exactly once; a second Dispose call (or disposing two copies of the same struct) + /// passes an invalid handle to native code and results in undefined behavior. + /// + /// + /// A handle is not thread-safe: do not mutate + /// options from multiple threads simultaneously. The options instance must also outlive any + /// compilation that uses it. + /// + /// + /// If the underlying native initialization fails, shaderc returns a null handle, which this + /// method propagates as-is (an uninitialized struct). + /// + /// + public static CompileOptions CreateCompilerOptions() + { + return PInvoke.shaderc_compile_options_initialize(); + } + + /// Gets the SPIR-V version and revision that shaderc was built against. + /// + /// Packed SPIR-V version: major version in the upper 16 bits, minor version in the lower 16 bits. + /// + /// SPIR-V revision number. + public static unsafe void GetSpvVersion(out uint version, out uint revision) + { + fixed (uint* v = &version) + fixed (uint* r = &revision) + { + PInvoke.shaderc_get_spv_version(v, r); + } + } + + /// Tries to parse a GLSL version/profile string such as "450core". + /// UTF-8 encoded, null-terminated version/profile string. + /// + /// When this method returns true, the parsed GLSL version number (e.g. 450). + /// + /// + /// When this method returns true, the parsed profile. Undefined when this method returns + /// false. + /// + /// true if parsing succeeded; otherwise false. + /// + /// str must be null-terminated: the underlying shaderc API treats the pointer as a C string + /// and will overread if no null terminator is present. A obtained + /// from a string literal or a stack-allocated buffer with an explicit \0 satisfies this + /// requirement. + /// + public static unsafe bool TryParseVersionProfile(ReadOnlySpan str, out int version, out Profile profile) + { + fixed (byte* s = str) + fixed (int* v = &version) + fixed (Profile* p = &profile) + { + return PInvoke.shaderc_parse_version_profile(s, v, p); + } + } +} diff --git a/Brutal.ShaderC/ShaderKindInference.cs b/Brutal.ShaderC/ShaderKindInference.cs new file mode 100644 index 0000000..e73cd33 --- /dev/null +++ b/Brutal.ShaderC/ShaderKindInference.cs @@ -0,0 +1,83 @@ +namespace Brutal.ShaderCApi; + +/// +/// Contains methods for inferring shader kind from file paths. +/// +public static partial class ShaderC +{ + /// + /// Attempts to infer the shader kind from a file path's extension. + /// + /// The file path to infer the shader kind from. + /// + /// When this method returns , the inferred shader kind. When it returns + /// it is set to , which is a real stage + /// (), so callers must branch on the return value, not on + /// . + /// + /// True if the extension was recognized, false otherwise. + public static bool TryInferShaderKind(ReadOnlySpan path, out ShaderKind kind) + { + // Path.GetExtension returns the extension including the leading '.', and ignores dots that + // appear in directory names. It is empty when there is no extension (including a trailing '.'). + ReadOnlySpan extension = Path.GetExtension(path); + if (extension.Length <= 1) + { + kind = default; + return false; + } + + extension = extension[1..]; // drop the leading '.' + + // Lowercase into a small stack buffer; an extension longer than this is not one we recognise. + Span lowercased = stackalloc char[16]; + if (extension.Length > lowercased.Length) + { + kind = default; + return false; + } + + int written = extension.ToLowerInvariant(lowercased); + ReadOnlySpan lower = lowercased[..written]; + + // Single match table: a recognised extension yields its kind, anything else yields null so the + // caller can distinguish "no match" from the (zero-valued) VertexShader default. + ShaderKind? match = lower switch + { + "vert" => ShaderKind.VertexShader, + "frag" => ShaderKind.FragmentShader, + "comp" => ShaderKind.ComputeShader, + "geom" => ShaderKind.GeometryShader, + "tesc" => ShaderKind.TessControlShader, + "tese" => ShaderKind.TessEvaluationShader, + "mesh" => ShaderKind.MeshShader, + "task" => ShaderKind.TaskShader, + "rgen" => ShaderKind.RayGenShader, + "rmiss" => ShaderKind.MissShader, + "rchit" => ShaderKind.ClosestHitShader, + "rahit" => ShaderKind.AnyHitShader, + "rint" => ShaderKind.IntersectionShader, + "rcall" => ShaderKind.CallableShader, + _ => null, + }; + + kind = match ?? default; + return match.HasValue; + } + + /// + /// Infers the shader kind from a file path's extension. + /// + /// The file path to infer the shader kind from. + /// The inferred shader kind. + /// Thrown if the extension is not recognized. + public static ShaderKind InferShaderKind(ReadOnlySpan path) + { + if (!TryInferShaderKind(path, out var kind)) + { + throw new ArgumentException($"Could not infer ShaderKind from path '{path}'.", nameof(path)); + } + + return kind; + } +} diff --git a/Brutal.ShaderC/Types/CompileOptions.cs b/Brutal.ShaderC/Types/CompileOptions.cs new file mode 100644 index 0000000..23efb37 --- /dev/null +++ b/Brutal.ShaderC/Types/CompileOptions.cs @@ -0,0 +1,29 @@ +namespace Brutal.ShaderCApi; + +/// +/// An object that contains options for compiling shaders. +/// +public partial struct CompileOptions +{ + /// Installs the built-in disk-based include resolver on this options instance. + /// + /// + /// Overwrites any include callbacks previously set on this instance (destructive replacement). + /// The resolver reads the requested file from disk relative to the directory of the requesting + /// source, so the source name passed to the compiler must be a real, accessible file path. + /// + /// + /// This options instance must outlive any compilation that uses it; the native shaderc API + /// holds a raw pointer to the callbacks for the duration of the compile. + /// + /// + public unsafe void SetDefaultIncludeCallbacks() + { + ShaderC.PInvoke.shaderc_compile_options_set_include_callbacks( + this, + new IncludeResolveFn(&ShaderC.Callbacks.Resolve), + new IncludeResultReleaseFn(&ShaderC.Callbacks.Release), + null + ); + } +} diff --git a/Brutal.ShaderC/Types/Delegates.cs b/Brutal.ShaderC/Types/Delegates.cs new file mode 100644 index 0000000..3bdaba9 --- /dev/null +++ b/Brutal.ShaderC/Types/Delegates.cs @@ -0,0 +1,70 @@ +namespace Brutal.ShaderCApi; + +/// +/// A function-pointer wrapper for the shaderc include-resolve callback. +/// +/// +/// +/// Wraps the native shaderc_include_resolve_fn callback, whose C signature is: +/// +/// +/// typedef shaderc_include_result* (*shaderc_include_resolve_fn)( +/// void* user_data, +/// const char* requested_source, +/// int type, +/// const char* requesting_source, +/// size_t include_depth); +/// +/// The parameters, in order, are: +/// +/// user_data: opaque client context pointer passed through from the options. +/// requested_source: NUL-terminated UTF-8 C string; the path being included. +/// type: an value indicating relative vs. standard inclusion. +/// requesting_source: NUL-terminated UTF-8 C string; the source file containing the #include. +/// include_depth: nesting depth (1 = top-level include). +/// +/// +/// Ownership. The callee allocates the returned and its +/// buffers; shaderc calls the matching when it is done with the +/// result. The result and its contents must remain valid until that release call. +/// +/// +/// The full consumer-visible contract is documented on +/// and . +/// +/// +public readonly unsafe struct IncludeResolveFn( + delegate* unmanaged[Cdecl] handle +) +{ + /// The underlying unmanaged function pointer. + public readonly delegate* unmanaged[Cdecl] Invoke = handle; +} + +/// +/// A function-pointer wrapper for the shaderc include-result release callback. +/// +/// +/// +/// Wraps the native shaderc_include_result_release_fn callback, whose C signature is: +/// +/// +/// typedef void (*shaderc_include_result_release_fn)( +/// void* user_data, +/// shaderc_include_result* include_result); +/// +/// +/// This callback is the matching deallocator for : it must free the +/// and all buffers allocated by the resolver. Use the same +/// allocator/deallocator pair; do not mix allocators between the resolve and release callbacks. +/// +/// +/// The full consumer-visible contract is documented on +/// and . +/// +/// +public readonly unsafe struct IncludeResultReleaseFn(delegate* unmanaged[Cdecl] handle) +{ + /// The underlying unmanaged function pointer. + public readonly delegate* unmanaged[Cdecl] Invoke = handle; +} diff --git a/Brutal.ShaderC/Utilities/Callbacks.cs b/Brutal.ShaderC/Utilities/Callbacks.cs new file mode 100644 index 0000000..cbee386 --- /dev/null +++ b/Brutal.ShaderC/Utilities/Callbacks.cs @@ -0,0 +1,193 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Brutal.Memory; +using Brutal.Pointers.Extensions; + +namespace Brutal.ShaderCApi; + +public static partial class ShaderC +{ + /// + /// Default callbacks for the shader compiler. + /// + public static class Callbacks + { + // Guards against #include cycles by bounding nesting depth (shaderc increments depth per + // nesting level). 200 is far above any realistic include tree, so a legitimate compile never + // reaches it; a self- or mutually-recursive #include climbs to the limit and is reported as a + // cycle instead of looping until the stack overflows. + private const nuint MaxIncludeDepth = 200; + + /// + /// Resolves an #include request by reading the requested file from disk relative to the + /// requesting source's directory. + /// + /// Opaque user-data pointer passed through from the options (unused by this implementation). + /// NUL-terminated UTF-8 C string naming the file being requested (the include path). + /// The kind of inclusion request ( or ). + /// NUL-terminated UTF-8 C string naming the source file that contains the #include directive. + /// Include nesting depth; 1 indicates a top-level include from the root source. + /// + /// A pointer to a heap-allocated whose Content and + /// SourceName buffers are also heap-allocated. The caller (shaderc) must invoke + /// on the result when it is no longer needed. + /// + /// + /// + /// This method and form a matching allocator/deallocator pair: all + /// allocations are performed with Mem.Alloc and must be freed by + /// using Mem.Free. A custom resolver that replaces this implementation must honor the + /// same contract. + /// + /// + /// The returned and its buffers must remain valid until + /// is called on it. Do not free or modify the result after returning it. + /// + /// + /// Any exception thrown during resolution (e.g., ) is + /// caught and surfaced as a shaderc include-failure result whose Content field + /// contains the exception message. The exception does not propagate as a + /// managed exception; include-resolution failures appear only in the compiler's error output. + /// + /// + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe IncludeResult* Resolve( + void* data, + byte* source, + IncludeType type, + byte* requestingSource, + nuint depth + ) + { + // Allocate a new result + var result = Mem.AllocZeroed(); + + try + { + ResolveInternal( + ref result.Value, + data, + Utf8.GetNullTerminatedSpan(source), + type, + Utf8.GetNullTerminatedSpan(requestingSource), + depth + ); + } + catch (Exception ex) + { + // Free any previously allocated memory in Content (we are going to replace it) + if (result.Value.Content != null) + { + Mem.Free(result.Value.Content); + result.Value.Content = null; + result.Value.ContentLength = ByteSize.Zero; + } + + // Free and reset SourceName (API says it should be empty on failure) + if (result.Value.SourceName != null) + { + Mem.Free(result.Value.SourceName); + result.Value.SourceName = null; + result.Value.SourceNameLength = ByteSize.Zero; + } + + // Write the error message to Content + var byteCount = Utf8.GetByteCount(ex.Message); + var span = Mem.Alloc(byteCount); + Utf8.GetBytes(ex.Message, span); + result.Value.Content = span.AsPointer(); + result.Value.ContentLength = ByteSize.Of(byteCount); + } + + return result; + } + + private static unsafe void ResolveInternal( + ref IncludeResult result, + void* data, + ReadOnlySpan source, + IncludeType type, + ReadOnlySpan requestingSource, + nuint depth + ) + { + if (depth > MaxIncludeDepth) + throw new InvalidOperationException( + $"Include depth {depth} exceeded the maximum of {MaxIncludeDepth}; possible #include cycle." + ); + + // Get the path to the include file, relative to the requesting source. + // Decode the path once and reuse it for the error message and file open. + var path = Utf8.Path.Combine(Utf8.Path.GetDirectoryName(requestingSource), source); + var pathStr = Utf8.GetString(path); + + // Open directly instead of File.Exists + open, which would stat the file twice on every + // include. A missing file surfaces as the framework's own FileNotFoundException / + // DirectoryNotFoundException, which is caught by Resolve and reported as an include failure. + using (var handle = File.OpenHandle(pathStr)) + { + // Allocate null-terminated storage for SourceName. + // shaderc treats source_name as a C string and re-feeds it as requesting_source, + // so the buffer must be null-terminated even though SourceNameLength stays path.Length. + var copy = Mem.Alloc(path.Length + 1); + path.CopyTo(copy); + copy[path.Length] = 0; + result.SourceName = copy.AsPointer(); + result.SourceNameLength = ByteSize.Of(path.Length); + + // Read the include file into memory using RandomAccess to avoid the FileStream buffer. + var length = RandomAccess.GetLength(handle); + if (length > int.MaxValue) + throw new IOException($"Include file is too large to read ({length} bytes): {pathStr}"); + + var dataSize = (int)length; + var memory = Mem.Alloc(dataSize); + result.Content = memory.AsPointer(); + result.ContentLength = ByteSize.Of(dataSize); + + // RandomAccess.Read is permitted to return a short count, so loop until the buffer fills. + Span destination = memory; + var totalRead = 0; + while (totalRead < dataSize) + { + var read = RandomAccess.Read(handle, destination[totalRead..], totalRead); + if (read == 0) + break; + totalRead += read; + } + + if (totalRead != dataSize) + throw new IOException($"Failed to read expected {dataSize} bytes, read {totalRead} bytes instead."); + } + } + + /// + /// Frees an previously returned by . + /// + /// Opaque user-data pointer passed through from the options (unused by this implementation). + /// Pointer to the to release, or null (no-op). + /// + /// + /// This method is the matching deallocator for : it frees the + /// SourceName buffer, the Content buffer, and the + /// struct itself, all previously allocated via Mem.Alloc. + /// + /// + /// A custom resolver that replaces must provide a matching release + /// callback that frees whatever its resolver allocated. Do not mix allocators (e.g., do not + /// allocate in one callback and free in the other). + /// + /// + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe void Release(void* data, IncludeResult* result) + { + if (result != null) + { + // UserData ownership belongs to whoever allocates it; do not free it here. + Mem.Free(result->SourceName); + Mem.Free(result->Content); + Mem.Free(result); + } + } + } +} diff --git a/Brutal.ShaderC/Utilities/ShaderException.cs b/Brutal.ShaderC/Utilities/ShaderException.cs new file mode 100644 index 0000000..0465965 --- /dev/null +++ b/Brutal.ShaderC/Utilities/ShaderException.cs @@ -0,0 +1,60 @@ +namespace Brutal.ShaderCApi; + +/// +/// Base class of all shader exceptions. Captures the compiler diagnostic message from a +/// at the point of construction. +/// +/// +/// +/// The exception does not take ownership of ; the caller remains +/// responsible for disposing it. is evaluated +/// eagerly during construction, so must still be valid at the point of +/// throw. The captured message is the raw shaderc diagnostic text. +/// +/// +/// +/// The compilation result whose error message is captured. The exception does not take ownership; +/// the caller remains responsible for disposing . The message is read +/// eagerly at construction time, so the result must still be valid at the point of throw. +/// +public class ShaderException(in CompilationResult result) : Exception(result.GetErrorMessage()); + +/// +/// Triggers when the shader stage could not be inferred from the source code. +/// +public class ShaderInvalidStageException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggers when the shader compilation failed. +/// +public class ShaderCompilationException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggers when the shader compiler encountered an internal error. +/// +public class ShaderInternalException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggers when the shader compiler returned a null result object. +/// +public class ShaderNullResultObjectException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggers when the SPIR-V assembly is invalid. +/// +public class ShaderInvalidAssemblyException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggers when SPIR-V validation failed (when validation is enabled). +/// +public class ShaderValidationException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggered when transformation to SPIR-V failed. +/// +public class ShaderTransformationException(in CompilationResult result) : ShaderException(result); + +/// +/// Triggered when configuration of the shader compiler is invalid. +/// +public class ShaderConfigurationException(in CompilationResult result) : ShaderException(result); diff --git a/Brutal.Slang/Generated/Classes.gen.cs b/Brutal.Slang/Generated/Classes.gen.cs new file mode 100644 index 0000000..9dd39cc --- /dev/null +++ b/Brutal.Slang/Generated/Classes.gen.cs @@ -0,0 +1 @@ +namespace Brutal.SlangApi { } diff --git a/Brutal.Slang/Generated/Constants.gen.cs b/Brutal.Slang/Generated/Constants.gen.cs new file mode 100644 index 0000000..f4e5768 --- /dev/null +++ b/Brutal.Slang/Generated/Constants.gen.cs @@ -0,0 +1,13 @@ +namespace Brutal.SlangApi +{ + public static partial class Constants + { + public const int ApiVersion = 0; + public const int FacilityBase = 0x200; + public const int FacilityExternalBase = 0x210; + public const int FacilityWinApi = 7; + public const int FacilityWinGeneral = 0; + public const int FacilityWinInterface = 4; + public const int Ok = 0; + }; +} diff --git a/Brutal.Slang/Generated/Enumerations.gen.cs b/Brutal.Slang/Generated/Enumerations.gen.cs new file mode 100644 index 0000000..80a49b3 --- /dev/null +++ b/Brutal.Slang/Generated/Enumerations.gen.cs @@ -0,0 +1,862 @@ +namespace Brutal.SlangApi +{ + public enum CompilerOptionName + { + MacroDefine = 0, // stringValue0: macro name; stringValue1: macro value + DepFile = 1, + EntryPointName = 2, + Specialize = 3, + Help = 4, + HelpStyle = 5, + Include = 6, // stringValue: additional include path. + Language = 7, + MatrixLayoutColumn = 8, // bool + MatrixLayoutRow = 9, // bool + ZeroInitialize = 10, // bool + IgnoreCapabilities = 11, // bool + RestrictiveCapabilityCheck = 12, // bool + ModuleName = 13, // stringValue0: module name. + Output = 14, + Profile = 15, // intValue0: profile + Stage = 16, // intValue0: stage + Target = 17, // intValue0: CodeGenTarget + Version = 18, + WarningsAsErrors = 19, // stringValue0: "all" or comma-separated list ofwarning codes or names. + DisableWarnings = 20, // stringValue0: comma separated list of warning codes or names. + EnableWarning = 21, // stringValue0: warning code or name. + DisableWarning = 22, // stringValue0: warning code or name. + DumpWarningDiagnostics = 23, + InputFilesRemain = 24, + EmitIR = 25, // bool + ReportDownstreamTime = 26, // bool + ReportPerfBenchmark = 27, // bool + ReportCheckpointIntermediates = 28, // bool + SkipSpirvValidation = 29, // bool + SourceEmbedStyle = 30, + SourceEmbedName = 31, + SourceEmbedLanguage = 32, + DisableShortCircuit = 33, // bool + MinimumSlangOptimization = 34, // bool + DisableNonEssentialValidations = 35, // bool + DisableSourceMap = 36, // bool + UnscopedEnum = 37, // bool + PreserveParameters = 38, // bool: preserve all resource parameters in the output code. + Capability = 39, // intValue0: CapabilityName + DefaultImageFormatUnknown = 40, // bool + DisableDynamicDispatch = 41, // bool + DisableSpecialization = 42, // bool + FloatingPointMode = 43, // intValue0: FloatingPointMode + DebugInformation = 44, // intValue0: DebugInfoLevel + LineDirectiveMode = 45, + Optimization = 46, // intValue0: OptimizationLevel + Obfuscate = 47, // bool + VulkanBindShift = 48, // intValue0 (higher 8 bits): kind; intValue0(lower bits): set;intValue1: shift + VulkanBindGlobals = 49, // intValue0: index; intValue1: set + VulkanInvertY = 50, // bool + VulkanUseDxPositionW = 51, // bool + VulkanUseEntryPointName = 52, // bool + VulkanUseGlLayout = 53, // bool + VulkanEmitReflection = 54, // bool + GlslForceScalarLayout = 55, // bool + EnableEffectAnnotations = 56, // bool + EmitSpirvViaGlsl = 57, // bool (will be deprecated) + EmitSpirvDirectly = 58, // bool (will be deprecated) + SpirvCoreGrammarJson = 59, // stringValue0: json path + IncompleteLibrary = 60, // bool, when set, will not issue an error when the linked programhas unresolved extern function symbols. + + /// Downstream + Path = 61, + + /// Downstream + DefaultDownstreamCompiler = 62, + DownstreamArgs = 63, // stringValue0: downstream compiler name. stringValue1: argument list,one per line. + PassThrough = 64, + + /// Repro + DumpRepro = 65, + + /// Repro + DumpReproOnError = 66, + + /// Repro + ExtractRepro = 67, + + /// Repro + LoadRepro = 68, + + /// Repro + LoadReproDirectory = 69, + + /// Repro + ReproFallbackDirectory = 70, + + /// Debugging + DumpAst = 71, + + /// Debugging + DumpIntermediatePrefix = 72, + DumpIntermediates = 73, // bool + DumpIR = 74, // bool + DumpIRIds = 75, + PreprocessorOutput = 76, + OutputIncludes = 77, + ReproFileSystem = 78, + REMOVEDSerialIR = 79, // deprecated and removed; value must never be reused + SkipCodeGen = 80, // bool + ValidateIR = 81, // bool + VerbosePaths = 82, + VerifyDebugSerialIR = 83, + NoCodeGen = 84, // Not used. + + /// Experimental + FileSystem = 85, + + /// Experimental + Heterogeneous = 86, + + /// Experimental + NoMangle = 87, + + /// Experimental + NoHlslBinding = 88, + + /// Experimental + NoHlslPackConstantBufferElements = 89, + + /// Experimental + ValidateUniformity = 90, + + /// Experimental + AllowGlsl = 91, + + /// Experimental + EnableExperimentalPasses = 92, + BindlessSpaceIndex = 93, // int + SpirvResourceHeapStride = 94, // int: byte stride for SPIRV resource descriptor heap + SpirvSamplerHeapStride = 95, // int: byte stride for SPIRV sampler descriptor heap + + /// Internal + ArchiveType = 96, + + /// Internal + CompileCoreModule = 97, + + /// Internal + Doc = 98, + IRCompression = 99, // deprecated; value must never be reused + LoadCoreModule = 100, + ReferenceModule = 101, + SaveCoreModule = 102, + SaveCoreModuleBinSource = 103, + TrackLiveness = 104, + LoopInversion = 105, // bool, enable loop inversion optimization + ParameterBlocksUseRegisterSpaces = 106, // Deprecated; value must never be reused + LanguageVersion = 107, // intValue0: SlangLanguageVersion + TypeConformance = 108, // stringValue0: type conformance to link; format:":[=]",e.g. "Impl:IFoo=3" or "Impl:IFoo". + EnableExperimentalDynamicDispatch = 109, // bool, experimental + EmitReflectionJson = 110, // bool + CountOfParsableOptions = 111, // historical sentinel; value must not be reused + DebugInformationFormat = 112, // intValue0: DebugInfoFormat (derived from -g; no direct CLIflag) + VulkanBindShiftAll = 113, // intValue0: kind; intValue1: shift (derived from-fvk-x-shift; no direct CLI flag) + GenerateWholeProgram = 114, // bool + UseUpToDateBinaryModule = 115, // bool, when set, will only load precompiled modulesif up-to-date with source. (API-only; no direct CLI flag) + EmbedDownstreamIR = 116, // bool + ForceDxLayout = 117, // bool + EmitSpirvMethod = 118, // enum SlangEmitSpirvMethod (derived; no direct CLI flag) + SaveGlslModuleBinSource = 119, + SkipDownstreamLinking = 120, // bool, experimental (API-only; no direct CLI flag) + DumpModule = 121, + GetModuleInfo = 122, // Print serialized module version and name + GetSupportedModuleVersions = 123, // Print the min and max module versions this compilersupports + EmitSeparateDebug = 124, // bool + + /// Floating point denormal handling modes + DenormalModeFp16 = 125, + + /// Floating point denormal handling modes + DenormalModeFp32 = 126, + + /// Floating point denormal handling modes + DenormalModeFp64 = 127, + UseMsvcStyleBitfieldPacking = 128, // bool + ForceCLayout = 129, // bool + ExperimentalFeature = 130, // bool, enable experimental features + ReportDetailedPerfBenchmark = 131, // bool, reports detailed compiler performance benchmarkresults + ValidateIRDetailed = 132, // bool, enable detailed IR validation + DumpIRBefore = 133, // string, pass name to dump IR before + DumpIRAfter = 134, // string, pass name to dump IR after + EmitCpuMethod = 135, // enum SlangEmitCPUMethod (derived; no direct CLI flag) + EmitCpuViaCpp = 136, // bool + EmitCpuViaLlvm = 137, // bool + LlvmTargetTriple = 138, // string + LlvmCpu = 139, // string + LlvmFeatures = 140, // string + EnableRichDiagnostics = 141, // bool, enable the experimental rich diagnostics + ReportDynamicDispatchSites = 142, // bool + EnableMachineReadableDiagnostics = 143, // bool, enable machine-readable diagnostic output(implies EnableRichDiagnostics) + DiagnosticColor = 144, // intValue0: SlangDiagnosticColor (always, never, auto) + + /// Add new options HERE, immediately before CountOf. + CountOf, + } + + public enum CompilerOptionValueKind + { + Int = 0, + String = 1, + } + + public enum BuiltinModuleName + { + Core = 0, + Glsl = 1, + } + + public enum ContainerType + { + None = 0, + UnsizedArray = 1, + StructuredBuffer = 2, + ConstantBuffer = 3, + ParameterBlock = 4, + } + + public enum OperandDataType + { + General = 0, // General data type, can be any type. + Int32 = 1, // 32-bit integer. + Int64 = 2, // 64-bit integer. + Float32 = 3, // 32-bit floating-point number. + Float64 = 4, // 64-bit floating-point number. + String = 5, // String data type, represented as a pointer to a null-terminated string. + } + + public enum Severity : SeverityIntegral + { + Disabled = 0, // < A message that is disabled, filtered out. + Note = 1, // < An informative message. + Warning = 2, // < A warning, which indicates a possible problem. + Error = 3, // < An error, indicating that compilation failed. + Fatal = 4, // < An unrecoverable error, which forced compilation to abort. + Internal = 5, + } + + public enum BindableResourceType : BindableResourceIntegral + { + NonBindable = 0, + Texture = 1, + Sampler = 2, + UniformBuffer = 3, + StorageBuffer = 4, + } + + public enum CompileTarget : CompileTargetIntegral + { + TargetUnknown = 0, + TargetNone = 1, + Glsl = 2, + GlslVulkanDeprecated = 3, // < deprecated and removed: just use `SLANG_GLSL`. + GlslVulkanOneDescDeprecated = 4, // < deprecated and removed. + Hlsl = 5, + Spirv = 6, + SpirvAsm = 7, + Dxbc = 8, + DxbcAsm = 9, + Dxil = 10, + DxilAsm = 11, + CSource = 12, // < The C language + CppSource = 13, // < C++ code for shader kernels. + HostExecutable = 14, // < Standalone binary executable (for hosting CPU/OS) + ShaderSharedLibrary = 15, // < A shared library/Dll for shader kernels (for hosting< CPU/OS) + ShaderHostCallable = 16, // < A CPU target that makes the compiled shader code< available to be run immediately + CudaSource = 17, // < Cuda source + Ptx = 18, // < PTX + CudaObjectCode = 19, // < Object code that contains CUDA functions. + ObjectCode = 20, // < Object code that can be used for later linking (kernel/shader) + HostCppSource = 21, // < C++ code for host library or executable. + HostHostCallable = 22, // < Host callable host code (ie non kernel/shader) + CppPytorchBinding = 23, // < C++ PyTorch binding code. + Metal = 24, // < Metal shading language + MetalLib = 25, // < Metal library + MetalLibAsm = 26, // < Metal library assembly + HostSharedLibrary = 27, // < A shared library/Dll for host code (for hosting CPU/OS) + Wgsl = 28, // < WebGPU shading language + WgslSpirvAsm = 29, // < SPIR-V assembly via WebGPU shading language + WgslSpirv = 30, // < SPIR-V via WebGPU shading language + HostVm = 31, // < Bytecode that can be interpreted by the Slang VM + CppHeader = 32, // < C++ header for shader kernels. + CudaHeader = 33, // < Cuda header + HostObjectCode = 34, // < Host object code + HostLlvmIR = 35, // < Host LLVM IR assembly + ShaderLlvmIR = 36, // < Host LLVM IR assembly (kernel/shader) + TargetCountOf, + } + + public enum ContainerFormat : ContainerFormatIntegral + { + /// Don't generate a container. + None = 0, + + /// Generate a container in the `.slang-module` format, + /// which includes reflection information, compiled kernels, etc. + SlangModule = 1, + } + + public enum PassThrough : PassThroughIntegral + { + None = 0, + Fxc = 1, + Dxc = 2, + Glslang = 3, + SpirvDis = 4, + Clang = 5, // < Clang C/C++ compiler + VisualStudio = 6, // < Visual studio C/C++ compiler + GCC = 7, // < GCC C/C++ compiler + GenericCCpp = 8, // < Generic C or C++ compiler, which is decided by< the source type + Nvrtc = 9, // < NVRTC Cuda compiler + Llvm = 10, // < LLVM 'compiler' - includes LLVM and Clang + SpirvOpt = 11, // < SPIRV-opt + Metal = 12, // < Metal compiler + Tint = 13, // < Tint WGSL compiler + SpirvLink = 14, // < SPIRV-link + CountOf, + } + + public enum ArchiveType : ArchiveTypeIntegral + { + Undefined = 0, + Zip = 1, + Riff = 2, // < Riff container with no compression + RiffDeflate = 3, + RiffLz4 = 4, + CountOf, + } + + public enum FloatingPointMode : FloatingPointModeIntegral + { + Default = 0, + Fast = 1, + Precise = 2, + } + + public enum FpDenormalMode : FpDenormalModeIntegral + { + DenormModeAny = 0, + DenormModePreserve = 1, + DenormModeFtz = 2, + } + + public enum LineDirectiveMode : LineDirectiveModeIntegral + { + Default = 0, + None = 1, // < Don't emit line directives at all. + Standard = 2, // < Emit standard C-style `#line` directives. + Glsl = 3, // < Emit GLSL-style directives with file *number*instead of name + SourceMap = 4, // < Use a source map to track line mappings (ieno #line will appear in emitting source) + } + + public enum SourceLanguage : SourceLanguageIntegral + { + Unknown = 0, + Slang = 1, + Hlsl = 2, + Glsl = 3, + C = 4, + Cpp = 5, + Cuda = 6, + Spirv = 7, + Metal = 8, + Wgsl = 9, + Llvm = 10, + CountOf, + } + + public enum ProfileID : ProfileIDIntegral + { + Unknown = 0, + } + + public enum CapabilityID : CapabilityIDIntegral + { + Unknown = 0, + } + + public enum MatrixLayoutMode : MatrixLayoutModeIntegral + { + Unknown = 0, + RowMajor = 1, + ColumnMajor = 2, + } + + public enum Stage : StageIntegral + { + None = 0, + Vertex = 1, + Hull = 2, + Domain = 3, + Geometry = 4, + Fragment = 5, + Compute = 6, + RayGeneration = 7, + Intersection = 8, + AnyHit = 9, + ClosestHit = 10, + Miss = 11, + Callable = 12, + Mesh = 13, + Amplification = 14, + Dispatch = 15, + + /// + Count, + + /// alias: + Pixel = Fragment, + } + + public enum CooperativeMatrixUse : CooperativeMatrixUseIntegral + { + A = 0, + B = 1, + Accumulator = 2, + } + + public enum CooperativeVectorMatrixLayout : CooperativeVectorMatrixLayoutIntegral + { + RowMajor = 0, + ColumnMajor = 1, + InferencingOptimal = 2, + TrainingOptimal = 3, + } + + public enum DebugInfoLevel : DebugInfoLevelIntegral + { + None = 0, // < Don't emit debug information at all. + Minimal = 1, // < Emit as little debug information as possible,while still supporting stack trackers. + Standard = 2, // < Emit whatever is the standard level of debuginformation for each target. + Maximal = 3, // < Emit as much debug information as possible foreach target. + } + + public enum DebugInfoFormat : DebugInfoFormatIntegral + { + Default = 0, // < Use the default debugging format for the target + C7 = 1, // < CodeView C7 format (typically means debugging< information is embedded in the binary) + Pdb = 2, // < Program database + Stabs = 3, // < Stabs + Coff = 4, // < COFF debug info + Dwarf = 5, // < DWARF debug info (we may want to support specifying< the version) + CountOf, + } + + public enum OptimizationLevel : OptimizationLevelIntegral + { + None = 0, // < Don't optimize at all. + Default = 1, // < Default optimization level: balance code qualityand compilation time. + High = 2, // < Optimize aggressively. + Maximal = 3, // < Include optimizations that may take a very longtime, or may involve severe space-vs-speedtradeoffs + } + + public enum EmitSpirvMethod : uint + { + Default = 0, + ViaGlsl = 1, + Directly = 2, + } + + public enum EmitCpuMethod : uint + { + Default = 0, + ViaCpp = 1, + ViaLlvm = 2, + } + + public enum DiagnosticColor : uint + { + Auto = 0, // Use color if output sink is a tty + Always = 1, // Always use color + Never = 2, // Never use color + } + + public enum PathType : PathTypeIntegral + { + Directory = 0, // < Path specified specifies a directory. + File = 1, // < Path specified is to a file. + } + + /// Determines how paths map to files on the OS file system + public enum OSPathKind : byte + { + None = 0, // < Paths do not map to the file system + Direct = 1, // < Paths map directly to the file system + OperatingSystem = 2, // < Only paths gained via PathKind::OperatingSystem map to the< operating system file system + } + + /// Used to determine what kind of path is required from an input path + public enum PathKind + { + /// Given a path, returns a simplified version of that path. + /// This typically means removing '..' and/or '.' from the path. + /// A simplified path must point to the same object as the original. + Simplified = 0, + + /// Given a path, returns a 'canonical path' to the item. + /// This may be the operating system 'canonical path' that is the unique path to the item. + /// + /// If the item exists the returned canonical path should always be usable to access the + /// item. + /// + /// If the item the path specifies doesn't exist, the canonical path may not be returnable + /// or be a path simplification. + /// Not all file systems support canonical paths. + Canonical = 1, + + /// Given a path returns a path such that it is suitable to be displayed to the user. + /// + /// For example if the file system is a zip file - it might include the path to the zip + /// container as well as the path to the specific file. + /// + /// NOTE! The display path won't necessarily work on the file system to access the item + Display = 2, + + /// Get the path to the item on the *operating system* file system, if available. + OperatingSystem = 3, + + /// Get the path to the item on the *operating system* file system, if available. + CountOf, + } + + public enum WriterChannel : WriterChannelIntegral + { + Diagnostic = 0, + StdOutput = 1, + StdError = 2, + CountOf, + } + + public enum WriterMode : WriterModeIntegral + { + Text = 0, + Binary = 1, + } + + public enum ReflectionGenericArgType : uint + { + GenericArgType = 0, + GenericArgInt = 1, + GenericArgBool = 2, + } + + public enum TypeKind : TypeKindIntegral + { + None = 0, + Struct = 1, + Array = 2, + Matrix = 3, + Vector = 4, + Scalar = 5, + ConstantBuffer = 6, + Resource = 7, + SamplerState = 8, + TextureBuffer = 9, + ShaderStorageBuffer = 10, + ParameterBlock = 11, + GenericTypeParameter = 12, + Interface = 13, + OutputStream = 14, + MeshOutput = 15, + Specialized = 16, + Feedback = 17, + Pointer = 18, + DynamicResource = 19, + Enum = 20, + Count, + } + + public enum ScalarType : ScalarTypeIntegral + { + None = 0, + Void = 1, + Bool = 2, + Int32 = 3, + UInt32 = 4, + Int64 = 5, + UInt64 = 6, + Float16 = 7, + Float32 = 8, + Float64 = 9, + Int8 = 10, + UInt8 = 11, + Int16 = 12, + UInt16 = 13, + IntPtr = 14, + UIntPtr = 15, + BFloat16 = 16, + FloatE4M3 = 17, + FloatE5M2 = 18, + } + + public enum DeclKind : DeclKindIntegral + { + UnsupportedForReflection = 0, + Struct = 1, + Func = 2, + Module = 3, + Generic = 4, + Variable = 5, + Namespace = 6, + Enum = 7, + } + + public enum ResourceShape : ResourceShapeIntegral + { + BaseShapeMask = 0X0F, + None = 0X00, + Texture1D = 0X01, + Texture2D = 0X02, + Texture3D = 0X03, + TextureCube = 0X04, + TextureBuffer = 0X05, + StructuredBuffer = 0X06, + ByteAddressBuffer = 0X07, + Unknown = 0X08, + AccelerationStructure = 0X09, + TextureSubpass = 0X0A, + ExtShapeMask = 0X1F0, + TextureFeedbackFlag = 0X10, + TextureShadowFlag = 0X20, + TextureArrayFlag = 0X40, + TextureMultisampleFlag = 0X80, + TextureCombinedFlag = 0X100, + Texture1DArray = Texture1D | TextureArrayFlag, + Texture2DArray = Texture2D | TextureArrayFlag, + TextureCubeArray = TextureCube | TextureArrayFlag, + Texture2DMultisample = Texture2D | TextureMultisampleFlag, + Texture2DMultisampleArray = Texture2D | TextureMultisampleFlag | TextureArrayFlag, + TextureSubpassMultisample = TextureSubpass | TextureMultisampleFlag, + } + + public enum ResourceAccess : ResourceAccessIntegral + { + None = 0, + Read = 1, + ReadWrite = 2, + RasterOrdered = 3, + Append = 4, + Consume = 5, + Write = 6, + Feedback = 7, + Unknown = 0X7FFFFFFF, + } + + public enum ParameterCategory : ParameterCategoryIntegral + { + None = 0, + Mixed = 1, + ConstantBuffer = 2, + ShaderResource = 3, + UnorderedAccess = 4, + VaryingInput = 5, + VaryingOutput = 6, + SamplerState = 7, + Uniform = 8, + DescriptorTableSlot = 9, + SpecializationConstant = 10, + PushConstantBuffer = 11, + + /// HLSL register `space`, Vulkan GLSL `set` + RegisterSpace = 12, + + /// A parameter whose type is to be specialized by a global generic type argument + Generic = 13, + + /// A parameter whose type is to be specialized by a global generic type argument + RayPayload = 14, + + /// A parameter whose type is to be specialized by a global generic type argument + HitAttributes = 15, + + /// A parameter whose type is to be specialized by a global generic type argument + CallablePayload = 16, + + /// A parameter whose type is to be specialized by a global generic type argument + ShaderRecord = 17, + + /// An existential type parameter represents a "hole" that + /// needs to be filled with a concrete type to enable + /// generation of specialized code. + /// + /// Consider this example: + /// + /// struct MyParams + /// { + /// IMaterial material; + /// ILight lights[3]; + /// }; + /// + /// This `MyParams` type introduces two existential type parameters: + /// one for `material` and one for `lights`. Even though `lights` + /// is an array, it only introduces one type parameter, because + /// we need to have a *single* concrete type for all the array + /// elements to be able to generate specialized code. + ExistentialTypeParam = 18, + + /// An existential object parameter represents a value + /// that needs to be passed in to provide data for some + /// interface-type shader parameter. + /// + /// Consider this example: + /// + /// struct MyParams + /// { + /// IMaterial material; + /// ILight lights[3]; + /// }; + /// + /// This `MyParams` type introduces four existential object parameters: + /// one for `material` and three for `lights` (one for each array + /// element). This is consistent with the number of interface-type + /// "objects" that are being passed through to the shader. + ExistentialObjectParam = 19, + + /// The register space offset for the sub-elements that occupies register spaces. + SubElementRegisterSpace = 20, + + /// The input_attachment_index subpass occupancy tracker + Subpass = 21, + + /// Metal tier-1 argument buffer element [[id]]. + MetalArgumentBufferElement = 22, + + /// Metal [[attribute]] inputs. + MetalAttribute = 23, + + /// Metal [[payload]] inputs + MetalPayload = 24, + + /// + Count, + + /// Aliases for Metal-specific categories. + MetalBuffer = ConstantBuffer, + + /// Aliases for Metal-specific categories. + MetalTexture = ShaderResource, + + /// Aliases for Metal-specific categories. + MetalSampler = SamplerState, + + /// DEPRECATED: + VertexInput = VaryingInput, + + /// DEPRECATED: + FragmentOutput = VaryingOutput, + + /// DEPRECATED: + CountV1 = Subpass, + } + + public enum BindingType : BindingTypeIntegral + { + Unknown = 0, + Sampler = 1, + Texture = 2, + ConstantBuffer = 3, + ParameterBlock = 4, + TypedBuffer = 5, + RawBuffer = 6, + CombinedTextureSampler = 7, + InputRenderTarget = 8, + InlineUniformData = 9, + RayTracingAccelerationStructure = 10, + VaryingInput = 11, + VaryingOutput = 12, + ExistentialValue = 13, + PushConstant = 14, + MutableFlag = 0X100, + MutableTexture = Texture | MutableFlag, + MutableTypedBuffer = TypedBuffer | MutableFlag, + MutableRawBuffer = RawBuffer | MutableFlag, + BaseMask = 0X00FF, + ExtMask = 0XFF00, + } + + public enum LayoutRules : LayoutRulesIntegral + { + Default = 0, + MetalArgumentBufferTier2 = 1, + DefaultStructuredBuffer = 2, + DefaultConstantBuffer = 3, + } + + public enum ModifierID : ModifierIDIntegral + { + Shared = 0, + NoDiff = 1, + Static = 2, + Const = 3, + Export = 4, + Extern = 5, + Differentiable = 6, + Mutating = 7, + In = 8, + Out = 9, + InOut = 10, + } + + public enum ImageFormat : ImageFormatIntegral + { + Unknown, + RGBA32F, + RGBA16F, + RG32F, + RG16F, + R11FG11FB10F, + R32F, + R16F, + RGBA16, + RGB10A2, + RGBA8, + RG16, + RG8, + R16, + R8, + RGBA16SNorm, + RGBA8SNorm, + RG16SNorm, + RG8SNorm, + R16SNorm, + R8SNorm, + RGBA32I, + RGBA16I, + RGBA8I, + RG32I, + RG16I, + RG8I, + R32I, + R16I, + R8I, + RGBA32UI, + RGBA16UI, + RGB10A2UI, + RGBA8UI, + RG32UI, + RG16UI, + RG8UI, + R32UI, + R16UI, + R8UI, + R64UI, + R64I, + BGRA8, + } + + public enum LanguageVersion : uint + { + Unknown = 0, + Legacy = 2018, + _2025 = 2025, + _2026 = 2026, + Default = Legacy, + Latest = _2026, + } +} diff --git a/Brutal.Slang/Generated/GlobalUsings.gen.cs b/Brutal.Slang/Generated/GlobalUsings.gen.cs new file mode 100644 index 0000000..aae177d --- /dev/null +++ b/Brutal.Slang/Generated/GlobalUsings.gen.cs @@ -0,0 +1,72 @@ +global using ArchiveTypeIntegral = int; +global using BindableResourceIntegral = int; +global using BindingTypeIntegral = uint; +global using CapabilityIDIntegral = int; +global using CompileCoreModuleFlags = uint; +global using CompileFlags = uint; +global using CompileTargetIntegral = int; +global using ContainerFormatIntegral = int; +global using CooperativeMatrixUseIntegral = uint; +global using CooperativeVectorMatrixLayoutIntegral = uint; +global using DebugInfoFormatIntegral = uint; +global using DebugInfoLevelIntegral = uint; +global using DeclKindIntegral = uint; +global using unsafe DiagnosticCallback = delegate* unmanaged[Cdecl]; +global using DiagnosticFlags = int; +global using unsafe FileSystemContentsCallBack = delegate* unmanaged[Cdecl]< + Brutal.SlangApi.PathType, + byte*, + void*, + void>; +global using FloatingPointModeIntegral = uint; +global using FpDenormalModeIntegral = uint; +global using unsafe FuncPtr = delegate* unmanaged[Cdecl]; +global using ImageFormatIntegral = uint; +global using Int = long; +global using Int32 = int; +global using LayoutRulesIntegral = uint; +global using LineDirectiveModeIntegral = uint; +global using MatrixLayoutModeIntegral = uint; +global using ModifierIDIntegral = uint; +global using OptimizationLevelIntegral = uint; +global using ParameterCategoryIntegral = uint; +global using PassThroughIntegral = int; +global using PathTypeIntegral = uint; +global using ProfileIDIntegral = uint; +global using ResourceAccessIntegral = uint; +global using ResourceShapeIntegral = uint; +global using ScalarTypeIntegral = uint; +global using SessionFlags = uint; +global using SeverityIntegral = int; +global using Size = ulong; +global using SourceLanguageIntegral = int; +global using SSize = long; +global using StageIntegral = uint; +global using TargetFlags = uint; +global using TypeKindIntegral = uint; +global using UInt = ulong; +global using UInt32 = uint; +global using unsafe VMExtFunction = delegate* unmanaged[Cdecl]; +global using unsafe VMPrintFunc = delegate* unmanaged[Cdecl]; +global using WriterChannelIntegral = uint; +global using WriterModeIntegral = uint; +global using Bool = Brutal.Bool8; +global using CompileRequest = Brutal.SlangApi.ICompileRequest; +global using EntryPointLayout = Brutal.SlangApi.EntryPointReflection; +global using GenericArgType = Brutal.SlangApi.ReflectionGenericArgType; +global using IBlob = Brutal.SlangApi.ISlangBlob; +global using ProgramLayout = Brutal.SlangApi.ShaderReflection; +global using Reflection = Brutal.SlangApi.ProgramLayout; +global using ReflectionAttribute = Brutal.SlangApi.ReflectionUserAttribute; +global using ReflectionDecl = Brutal.SlangApi.DeclReflection; +global using ReflectionEntryPoint = Brutal.SlangApi.EntryPointLayout; +global using ReflectionFunction = Brutal.SlangApi.FunctionReflection; +global using ReflectionGeneric = Brutal.SlangApi.GenericReflection; +global using ReflectionParameter = Brutal.SlangApi.VariableLayoutReflection; +global using ReflectionType = Brutal.SlangApi.TypeReflection; +global using ReflectionTypeLayout = Brutal.SlangApi.TypeLayoutReflection; +global using ReflectionTypeParameter = Brutal.SlangApi.TypeParameterReflection; +global using ReflectionVariable = Brutal.SlangApi.VariableReflection; +global using ReflectionVariableLayout = Brutal.SlangApi.VariableLayoutReflection; +global using Session = Brutal.SlangApi.IGlobalSession; +global using UserAttribute = Brutal.SlangApi.Attribute; diff --git a/Brutal.Slang/Generated/Interfaces.gen.cs b/Brutal.Slang/Generated/Interfaces.gen.cs new file mode 100644 index 0000000..a05676c --- /dev/null +++ b/Brutal.Slang/Generated/Interfaces.gen.cs @@ -0,0 +1,656 @@ +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; +using Brutal.Interop; +using Brutal.Strings; + +namespace Brutal.SlangApi +{ + [GeneratedComInterface] + [Guid("00000000-0000-0000-c000-000000000046")] + public unsafe partial interface ISlangUnknown + { + [PreserveSig] + Result QueryInterface(ref Brutal.SlangApi.Uuid uuid, out void* outObject); + + [PreserveSig] + uint AddRef(); + + [PreserveSig] + uint Release(); + }; + + [GeneratedComInterface] + [Guid("87ede0e1-4852-44b0-8bf2-cb31874de239")] + public unsafe partial interface ISlangCastable + { + [PreserveSig] + void* CastAs(ref Brutal.SlangApi.Uuid guid); + }; + + [GeneratedComInterface] + [Guid("1ec36168-e9f4-430d-bb17-048a8046b31f")] + public unsafe partial interface ISlangClonable : Brutal.SlangApi.ISlangCastable + { + [PreserveSig] + void* Clone(ref Brutal.SlangApi.Uuid guid); + }; + + [GeneratedComInterface] + [Guid("8ba5fb08-5195-40e2-ac58-0d989c3a0102")] + public unsafe partial interface ISlangBlob + { + [PreserveSig] + void* GetBufferPointer(); + + [PreserveSig] + ByteSize64 GetBufferSize(); + }; + + [GeneratedComInterface] + [Guid("003a09fc-3a4d-4ba0-ad60-1fd863a915ab")] + public unsafe partial interface ISlangFileSystem : Brutal.SlangApi.ISlangCastable + { + [PreserveSig] + Result LoadFile(byte* path, out ISlangBlob outBlob); + }; + + [GeneratedComInterface] + [Guid("9c9d5bc5-eb61-496f-80d7-d147c4a23730")] + public unsafe partial interface ISlangSharedLibrary_Dep1 + { + [PreserveSig] + void* FindSymbolAddressByName(byte* name); + }; + + [GeneratedComInterface] + [Guid("70dbc7c4-dc3b-4a07-ae7e-752af6a81555")] + public unsafe partial interface ISlangSharedLibrary : Brutal.SlangApi.ISlangCastable + { + [PreserveSig] + void* FindSymbolAddressByName(byte* name); + }; + + [GeneratedComInterface] + [Guid("6264ab2b-a3e8-4a06-97f1-49bc2d2ab14d")] + public unsafe partial interface ISlangSharedLibraryLoader + { + [PreserveSig] + Result LoadSharedLibrary(byte* path, out ISlangSharedLibrary sharedLibraryOut); + }; + + [GeneratedComInterface] + [Guid("5fb632d2-979d-4481-9fee-663c3f1449e1")] + public unsafe partial interface ISlangFileSystemExt : Brutal.SlangApi.ISlangFileSystem + { + [PreserveSig] + Result GetFileUniqueIdentity(byte* path, out ISlangBlob outUniqueIdentity); + + [PreserveSig] + Result CalcCombinedPath( + Brutal.SlangApi.PathType fromPathType, + byte* fromPath, + byte* path, + out ISlangBlob pathOut + ); + + [PreserveSig] + Result GetPathType(byte* path, out Brutal.SlangApi.PathType pathTypeOut); + + [PreserveSig] + Result GetPath(PathKind kind, byte* path, out ISlangBlob outPath); + + [PreserveSig] + void ClearCache(); + + [PreserveSig] + Result EnumeratePathContents(byte* path, FileSystemContentsCallBack callback, void* userData); + + [PreserveSig] + OSPathKind GetOSPathKind(); + }; + + [GeneratedComInterface] + [Guid("a058675c-1d65-452a-8458-ccded1427105")] + public unsafe partial interface ISlangMutableFileSystem : Brutal.SlangApi.ISlangFileSystemExt + { + [PreserveSig] + Result SaveFile(byte* path, void* data, ByteSize64 size); + + [PreserveSig] + Result SaveFileBlob(byte* path, ISlangBlob dataBlob); + + [PreserveSig] + Result Remove(byte* path); + + [PreserveSig] + Result CreateDirectory(byte* path); + }; + + [GeneratedComInterface] + [Guid("ec457f0e-9add-4e6b-851c-d7fa716d15fd")] + public unsafe partial interface ISlangWriter + { + [PreserveSig] + byte* BeginAppendBuffer(ByteSize64 maxNumChars); + + [PreserveSig] + Result EndAppendBuffer(byte* buffer, ByteSize64 numChars); + + [PreserveSig] + Result Write(byte* chars, ByteSize64 numChars); + + [PreserveSig] + void Flush(); + + [PreserveSig] + Bool IsConsole(); + + [PreserveSig] + Result SetMode(Brutal.SlangApi.WriterMode mode); + }; + + [GeneratedComInterface] + [Guid("197772c7-0155-4b91-84e8-6668baff0619")] + public unsafe partial interface ISlangProfiler + { + [PreserveSig] + ByteSize64 GetEntryCount(); + + [PreserveSig] + byte* GetEntryName(uint index); + + [PreserveSig] + long GetEntryTimeMS(uint index); + + [PreserveSig] + uint GetEntryInvocationTimes(uint index); + }; + + [GeneratedComInterface] + [Guid("c140b5fd-0c78-452e-ba7c-1a1e70c7f71c")] + public unsafe partial interface IGlobalSession + { + [PreserveSig] + Result CreateSession(ref Brutal.SlangApi.SessionDesc desc, out Brutal.SlangApi.ISession outSession); + + [PreserveSig] + Brutal.SlangApi.ProfileID FindProfile(byte* name); + + [PreserveSig] + void SetDownstreamCompilerPath(Brutal.SlangApi.PassThrough passThrough, byte* path); + + [PreserveSig] + void SetDownstreamCompilerPrelude(Brutal.SlangApi.PassThrough passThrough, byte* preludeText); + + [PreserveSig] + void GetDownstreamCompilerPrelude(Brutal.SlangApi.PassThrough passThrough, out ISlangBlob outPrelude); + + [PreserveSig] + byte* GetBuildTagString(); + + [PreserveSig] + Result SetDefaultDownstreamCompiler( + Brutal.SlangApi.SourceLanguage sourceLanguage, + Brutal.SlangApi.PassThrough defaultCompiler + ); + + [PreserveSig] + Brutal.SlangApi.PassThrough GetDefaultDownstreamCompiler(Brutal.SlangApi.SourceLanguage sourceLanguage); + + [PreserveSig] + void SetLanguagePrelude(Brutal.SlangApi.SourceLanguage sourceLanguage, byte* preludeText); + + [PreserveSig] + void GetLanguagePrelude(Brutal.SlangApi.SourceLanguage sourceLanguage, out ISlangBlob outPrelude); + + [PreserveSig] + Result CreateCompileRequest(out Brutal.SlangApi.ICompileRequest outCompileRequest); + + [PreserveSig] + void AddBuiltins(byte* sourcePath, byte* sourceString); + + [PreserveSig] + void SetSharedLibraryLoader(ISlangSharedLibraryLoader loader); + + [PreserveSig] + ISlangSharedLibraryLoader? GetSharedLibraryLoader(); + + [PreserveSig] + Result CheckCompileTargetSupport(Brutal.SlangApi.CompileTarget target); + + [PreserveSig] + Result CheckPassThroughSupport(Brutal.SlangApi.PassThrough passThrough); + + [PreserveSig] + Result CompileCoreModule(CompileCoreModuleFlags flags); + + [PreserveSig] + Result LoadCoreModule(void* coreModule, ByteSize64 coreModuleSizeInBytes); + + [PreserveSig] + Result SaveCoreModule(Brutal.SlangApi.ArchiveType archiveType, out ISlangBlob outBlob); + + [PreserveSig] + Brutal.SlangApi.CapabilityID FindCapability(byte* name); + + [PreserveSig] + void SetDownstreamCompilerForTransition( + Brutal.SlangApi.CompileTarget source, + Brutal.SlangApi.CompileTarget target, + Brutal.SlangApi.PassThrough compiler + ); + + [PreserveSig] + Brutal.SlangApi.PassThrough GetDownstreamCompilerForTransition( + Brutal.SlangApi.CompileTarget source, + Brutal.SlangApi.CompileTarget target + ); + + [PreserveSig] + void GetCompilerElapsedTime(out double outTotalTime, out double outDownstreamTime); + + [PreserveSig] + Result SetSpirvCoreGrammar(byte* jsonPath); + + [PreserveSig] + Result ParseCommandLineArguments( + int argc, + byte** argv, + out Brutal.SlangApi.SessionDesc outSessionDesc, + out ISlangUnknown outAuxAllocation + ); + + [PreserveSig] + Result GetSessionDescDigest(in Brutal.SlangApi.SessionDesc sessionDesc, out ISlangBlob outBlob); + + [PreserveSig] + Result CompileBuiltinModule(Brutal.SlangApi.BuiltinModuleName module, CompileCoreModuleFlags flags); + + [PreserveSig] + Result LoadBuiltinModule(Brutal.SlangApi.BuiltinModuleName module, void* moduleData, ByteSize64 sizeInBytes); + + [PreserveSig] + Result SaveBuiltinModule( + Brutal.SlangApi.BuiltinModuleName module, + Brutal.SlangApi.ArchiveType archiveType, + out ISlangBlob outBlob + ); + }; + + [GeneratedComInterface] + [Guid("67618701-d116-468f-ab3b-474bedce0e3d")] + public unsafe partial interface ISession + { + [PreserveSig] + Brutal.SlangApi.IGlobalSession? GetGlobalSession(); + + [PreserveSig] + Brutal.SlangApi.IModule? LoadModule(byte* moduleName, out IBlob outDiagnostics); + + [PreserveSig] + Brutal.SlangApi.IModule? LoadModuleFromSource( + byte* moduleName, + byte* path, + IBlob source, + out IBlob outDiagnostics + ); + + [PreserveSig] + Result CreateCompositeComponentType( + nint* componentTypes, + Int componentTypeCount, + out Brutal.SlangApi.IComponentType outCompositeComponentType, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Brutal.SlangApi.TypeReflection SpecializeType( + Brutal.SlangApi.TypeReflection type, + in Brutal.SlangApi.SpecializationArg specializationArgs, + Int specializationArgCount, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Brutal.SlangApi.TypeLayoutReflection GetTypeLayout( + Brutal.SlangApi.TypeReflection type, + Int targetIndex, + Brutal.SlangApi.LayoutRules rules, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Brutal.SlangApi.TypeReflection GetContainerType( + Brutal.SlangApi.TypeReflection elementType, + Brutal.SlangApi.ContainerType containerType, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Brutal.SlangApi.TypeReflection GetDynamicType(); + + [PreserveSig] + Result GetTypeRTTIMangledName(Brutal.SlangApi.TypeReflection type, out ISlangBlob outNameBlob); + + [PreserveSig] + Result GetTypeConformanceWitnessMangledName( + Brutal.SlangApi.TypeReflection type, + Brutal.SlangApi.TypeReflection interfaceType, + out ISlangBlob outNameBlob + ); + + [PreserveSig] + Result GetTypeConformanceWitnessSequentialID( + Brutal.SlangApi.TypeReflection type, + Brutal.SlangApi.TypeReflection interfaceType, + out uint outId + ); + + [PreserveSig] + Result CreateCompileRequest(out CompileRequest outCompileRequest); + + [PreserveSig] + Result CreateTypeConformanceComponentType( + Brutal.SlangApi.TypeReflection type, + Brutal.SlangApi.TypeReflection interfaceType, + out Brutal.SlangApi.ITypeConformance outConformance, + Int conformanceIdOverride, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Brutal.SlangApi.IModule? LoadModuleFromIRBlob( + byte* moduleName, + byte* path, + IBlob source, + out IBlob outDiagnostics + ); + + [PreserveSig] + Int GetLoadedModuleCount(); + + [PreserveSig] + Brutal.SlangApi.IModule? GetLoadedModule(Int index); + + [PreserveSig] + Brutal.Bool8 IsBinaryModuleUpToDate(byte* modulePath, IBlob binaryModuleBlob); + + [PreserveSig] + Brutal.SlangApi.IModule? LoadModuleFromSourceString( + byte* moduleName, + byte* path, + byte* @string, + out IBlob outDiagnostics + ); + + [PreserveSig] + Result GetDynamicObjectRTTIBytes( + Brutal.SlangApi.TypeReflection type, + Brutal.SlangApi.TypeReflection interfaceType, + out uint outRTTIDataBuffer, + uint bufferSizeInBytes + ); + + [PreserveSig] + Result LoadModuleInfoFromIRBlob( + IBlob source, + ref Int outModuleVersion, + ref byte* outModuleCompilerVersion, + ref byte* outModuleName + ); + + [PreserveSig] + Result GetDeclSourceLocation( + Brutal.SlangApi.DeclReflection decl, + out Brutal.SlangApi.SourceLocation outLocation + ); + }; + + [GeneratedComInterface] + [Guid("5bc42be8-5c50-4929-9e5e-d15e7c24015f")] + public unsafe partial interface IComponentType + { + [PreserveSig] + Brutal.SlangApi.ISession? GetSession(); + + [PreserveSig] + ProgramLayout GetLayout(Int targetIndex, out IBlob outDiagnostics); + + [PreserveSig] + Int GetSpecializationParamCount(); + + [PreserveSig] + Result GetEntryPointCode(Int entryPointIndex, Int targetIndex, out IBlob outCode, out IBlob outDiagnostics); + + [PreserveSig] + Result GetResultAsFileSystem(Int entryPointIndex, Int targetIndex, out ISlangMutableFileSystem outFileSystem); + + [PreserveSig] + void GetEntryPointHash(Int entryPointIndex, Int targetIndex, out IBlob outHash); + + [PreserveSig] + Result Specialize( + in Brutal.SlangApi.SpecializationArg specializationArgs, + Int specializationArgCount, + out Brutal.SlangApi.IComponentType outSpecializedComponentType, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Result Link(out Brutal.SlangApi.IComponentType outLinkedComponentType, out ISlangBlob outDiagnostics); + + [PreserveSig] + Result GetEntryPointHostCallable( + int entryPointIndex, + int targetIndex, + out ISlangSharedLibrary outSharedLibrary, + out IBlob outDiagnostics + ); + + [PreserveSig] + Result RenameEntryPoint(byte* newName, out Brutal.SlangApi.IComponentType outEntryPoint); + + [PreserveSig] + Result LinkWithOptions( + out Brutal.SlangApi.IComponentType outLinkedComponentType, + uint compilerOptionEntryCount, + in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Result GetTargetCode(Int targetIndex, out IBlob outCode, out IBlob outDiagnostics); + + [PreserveSig] + Result GetTargetMetadata(Int targetIndex, out Brutal.SlangApi.IMetadata outMetadata, out IBlob outDiagnostics); + + [PreserveSig] + Result GetEntryPointMetadata( + Int entryPointIndex, + Int targetIndex, + out Brutal.SlangApi.IMetadata outMetadata, + out IBlob outDiagnostics + ); + }; + + [GeneratedComInterface] + [Guid("0c720e64-8722-4d31-8990-638a98b1c279")] + public unsafe partial interface IModule : Brutal.SlangApi.IComponentType + { + [PreserveSig] + Result FindEntryPointByName(byte* name, out Brutal.SlangApi.IEntryPoint outEntryPoint); + + [PreserveSig] + Int32 GetDefinedEntryPointCount(); + + [PreserveSig] + Result GetDefinedEntryPoint(Int32 index, out Brutal.SlangApi.IEntryPoint outEntryPoint); + + [PreserveSig] + Result Serialize(out ISlangBlob outSerializedBlob); + + [PreserveSig] + Result WriteToFile(byte* fileName); + + [PreserveSig] + byte* GetName(); + + [PreserveSig] + byte* GetFilePath(); + + [PreserveSig] + byte* GetUniqueIdentity(); + + [PreserveSig] + Result FindAndCheckEntryPoint( + byte* name, + Brutal.SlangApi.Stage stage, + out Brutal.SlangApi.IEntryPoint outEntryPoint, + out ISlangBlob outDiagnostics + ); + + [PreserveSig] + Int32 GetDependencyFileCount(); + + [PreserveSig] + byte* GetDependencyFilePath(Int32 index); + + [PreserveSig] + Brutal.SlangApi.DeclReflection GetModuleReflection(); + + [PreserveSig] + Result Disassemble(out IBlob outDisassembledBlob); + }; + + [GeneratedComInterface] + [Guid("73eb3147-e544-41b5-b8f0-a244df21940b")] + public unsafe partial interface ITypeConformance : Brutal.SlangApi.IComponentType { }; + + [GeneratedComInterface] + [Guid("8044a8a3-ddc0-4b7f-af8e-026e905d7332")] + public unsafe partial interface IMetadata : Brutal.SlangApi.ISlangCastable + { + [PreserveSig] + Result IsParameterLocationUsed( + Brutal.SlangApi.ParameterCategory category, + UInt spaceIndex, + UInt registerIndex, + ref Brutal.Bool8 outUsed + ); + + [PreserveSig] + byte* GetDebugBuildIdentifier(); + }; + + [GeneratedComInterface] + [Guid("5fa9380e-b62f-41e5-9f12-4bad4d9eaae4")] + public unsafe partial interface ICompileResult : Brutal.SlangApi.ISlangCastable + { + [PreserveSig] + uint GetItemCount(); + + [PreserveSig] + Result GetItemData(uint index, out IBlob outblob); + + [PreserveSig] + Result GetMetadata(out Brutal.SlangApi.IMetadata outMetadata); + }; + + [GeneratedComInterface] + [Guid("8f241361-f5bd-4ca0-a3ac-02f7fa2402b8")] + public unsafe partial interface IEntryPoint : Brutal.SlangApi.IComponentType + { + [PreserveSig] + Brutal.SlangApi.FunctionReflection GetFunctionReflection(); + }; + + [GeneratedComInterface] + [Guid("9c2a4b3d-7f68-4e91-a52c-8b193e457a9f")] + public unsafe partial interface IComponentType2 + { + [PreserveSig] + Result GetTargetCompileResult( + Int targetIndex, + out Brutal.SlangApi.ICompileResult outCompileResult, + out IBlob outDiagnostics + ); + + [PreserveSig] + Result GetEntryPointCompileResult( + Int entryPointIndex, + Int targetIndex, + out Brutal.SlangApi.ICompileResult outCompileResult, + out IBlob outDiagnostics + ); + + [PreserveSig] + Result GetTargetHostCallable( + int targetIndex, + out ISlangSharedLibrary outSharedLibrary, + out IBlob outDiagnostics + ); + }; + + [GeneratedComInterface] + [Guid("8e12e8e3-5fcd-433e-afcb-13a088bc5ee5")] + public unsafe partial interface IModulePrecompileService_Experimental + { + [PreserveSig] + Result PrecompileForTarget(Brutal.SlangApi.CompileTarget target, out ISlangBlob outDiagnostics); + + [PreserveSig] + Result GetPrecompiledTargetCode( + Brutal.SlangApi.CompileTarget target, + out IBlob outCode, + out IBlob outDiagnostics + ); + + [PreserveSig] + Int GetModuleDependencyCount(); + + [PreserveSig] + Result GetModuleDependency( + Int dependencyIndex, + out Brutal.SlangApi.IModule outModule, + out IBlob outDiagnostics + ); + }; + + [GeneratedComInterface] + [Guid("afdab195-361f-42cb-9513-9006261dd8cd")] + public unsafe partial interface IByteCodeRunner + { + [PreserveSig] + Result LoadModule(IBlob moduleBlob); + + [PreserveSig] + Result SelectFunctionByIndex(uint functionIndex); + + [PreserveSig] + int FindFunctionByName(byte* name); + + [PreserveSig] + Result GetFunctionInfo(uint index, out Brutal.SlangApi.ByteCodeFuncInfo outInfo); + + [PreserveSig] + void* GetCurrentWorkingSet(); + + [PreserveSig] + Result Execute(void* argumentData, ByteSize64 argumentSize); + + [PreserveSig] + void GetErrorString(out IBlob outBlob); + + [PreserveSig] + void* GetReturnValue(out ByteSize64 outValueSize); + + [PreserveSig] + void SetExtInstHandlerUserData(void* userData); + + [PreserveSig] + Result RegisterExtCall(byte* name, VMExtFunction functionPtr); + + [PreserveSig] + Result SetPrintCallback(VMPrintFunc callback, void* userData); + }; +} diff --git a/Brutal.Slang/Generated/InterfacesExt.gen.cs b/Brutal.Slang/Generated/InterfacesExt.gen.cs new file mode 100644 index 0000000..507551f --- /dev/null +++ b/Brutal.Slang/Generated/InterfacesExt.gen.cs @@ -0,0 +1,419 @@ +// +#nullable disable +using System.Runtime.InteropServices; +using Brutal.Interop; +using Brutal.Strings; + +namespace Brutal.SlangApi; + +public static unsafe partial class ISlangUnknownExtensions +{ + public static void* QueryInterface(this ISlangUnknown self, ref Brutal.SlangApi.Uuid uuid) + { + self.QueryInterface(ref uuid, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryQueryInterface(this ISlangUnknown self, ref Brutal.SlangApi.Uuid uuid, out void* outObject) + => self.QueryInterface(ref uuid, out outObject); +} + +public static unsafe partial class ISlangFileSystemExtensions +{ + public static ISlangBlob LoadFile(this ISlangFileSystem self, byte* path) + { + self.LoadFile(path, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryLoadFile(this ISlangFileSystem self, byte* path, out ISlangBlob outBlob) + => self.LoadFile(path, out outBlob); +} + +public static unsafe partial class ISlangSharedLibraryLoaderExtensions +{ + public static ISlangSharedLibrary LoadSharedLibrary(this ISlangSharedLibraryLoader self, byte* path) + { + self.LoadSharedLibrary(path, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryLoadSharedLibrary(this ISlangSharedLibraryLoader self, byte* path, out ISlangSharedLibrary sharedLibraryOut) + => self.LoadSharedLibrary(path, out sharedLibraryOut); +} + +public static unsafe partial class ISlangFileSystemExtExtensions +{ + public static ISlangBlob GetFileUniqueIdentity(this ISlangFileSystemExt self, byte* path) + { + self.GetFileUniqueIdentity(path, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetFileUniqueIdentity(this ISlangFileSystemExt self, byte* path, out ISlangBlob outUniqueIdentity) + => self.GetFileUniqueIdentity(path, out outUniqueIdentity); + public static ISlangBlob CalcCombinedPath(this ISlangFileSystemExt self, Brutal.SlangApi.PathType fromPathType, byte* fromPath, byte* path) + { + self.CalcCombinedPath(fromPathType, fromPath, path, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryCalcCombinedPath(this ISlangFileSystemExt self, Brutal.SlangApi.PathType fromPathType, byte* fromPath, byte* path, out ISlangBlob pathOut) + => self.CalcCombinedPath(fromPathType, fromPath, path, out pathOut); + public static Brutal.SlangApi.PathType GetPathType(this ISlangFileSystemExt self, byte* path) + { + self.GetPathType(path, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetPathType(this ISlangFileSystemExt self, byte* path, out Brutal.SlangApi.PathType pathTypeOut) + => self.GetPathType(path, out pathTypeOut); + public static ISlangBlob GetPath(this ISlangFileSystemExt self, PathKind kind, byte* path) + { + self.GetPath(kind, path, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetPath(this ISlangFileSystemExt self, PathKind kind, byte* path, out ISlangBlob outPath) + => self.GetPath(kind, path, out outPath); + public static Result TryEnumeratePathContents(this ISlangFileSystemExt self, byte* path, FileSystemContentsCallBack callback, void* userData) + => self.EnumeratePathContents(path, callback, userData); +} + +public static unsafe partial class ISlangMutableFileSystemExtensions +{ + public static Result TrySaveFile(this ISlangMutableFileSystem self, byte* path, void* data, ByteSize64 size) + => self.SaveFile(path, data, size); + public static Result TrySaveFileBlob(this ISlangMutableFileSystem self, byte* path, ISlangBlob dataBlob) + => self.SaveFileBlob(path, dataBlob); + public static Result TryRemove(this ISlangMutableFileSystem self, byte* path) + => self.Remove(path); + public static Result TryCreateDirectory(this ISlangMutableFileSystem self, byte* path) + => self.CreateDirectory(path); +} + +public static unsafe partial class ISlangWriterExtensions +{ + public static Result TryEndAppendBuffer(this ISlangWriter self, byte* buffer, ByteSize64 numChars) + => self.EndAppendBuffer(buffer, numChars); + public static Result TryWrite(this ISlangWriter self, byte* chars, ByteSize64 numChars) + => self.Write(chars, numChars); + public static Result TrySetMode(this ISlangWriter self, Brutal.SlangApi.WriterMode mode) + => self.SetMode(mode); +} + +public static unsafe partial class IGlobalSessionExtensions +{ + public static Brutal.SlangApi.ISession CreateSession(this IGlobalSession self, ref Brutal.SlangApi.SessionDesc desc) + { + self.CreateSession(ref desc, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryCreateSession(this IGlobalSession self, ref Brutal.SlangApi.SessionDesc desc, out Brutal.SlangApi.ISession outSession) + => self.CreateSession(ref desc, out outSession); + public static Result TrySetDefaultDownstreamCompiler(this IGlobalSession self, Brutal.SlangApi.SourceLanguage sourceLanguage, Brutal.SlangApi.PassThrough defaultCompiler) + => self.SetDefaultDownstreamCompiler(sourceLanguage, defaultCompiler); + public static Brutal.SlangApi.ICompileRequest CreateCompileRequest(this IGlobalSession self) + { + self.CreateCompileRequest(out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryCreateCompileRequest(this IGlobalSession self, out Brutal.SlangApi.ICompileRequest outCompileRequest) + => self.CreateCompileRequest(out outCompileRequest); + public static Result TryCheckCompileTargetSupport(this IGlobalSession self, Brutal.SlangApi.CompileTarget target) + => self.CheckCompileTargetSupport(target); + public static Result TryCheckPassThroughSupport(this IGlobalSession self, Brutal.SlangApi.PassThrough passThrough) + => self.CheckPassThroughSupport(passThrough); + public static Result TryCompileCoreModule(this IGlobalSession self, CompileCoreModuleFlags flags) + => self.CompileCoreModule(flags); + public static Result TryLoadCoreModule(this IGlobalSession self, void* coreModule, ByteSize64 coreModuleSizeInBytes) + => self.LoadCoreModule(coreModule, coreModuleSizeInBytes); + public static ISlangBlob SaveCoreModule(this IGlobalSession self, Brutal.SlangApi.ArchiveType archiveType) + { + self.SaveCoreModule(archiveType, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TrySaveCoreModule(this IGlobalSession self, Brutal.SlangApi.ArchiveType archiveType, out ISlangBlob outBlob) + => self.SaveCoreModule(archiveType, out outBlob); + public static Result TrySetSpirvCoreGrammar(this IGlobalSession self, byte* jsonPath) + => self.SetSpirvCoreGrammar(jsonPath); + public static ISlangUnknown ParseCommandLineArguments(this IGlobalSession self, int argc, byte** argv, out Brutal.SlangApi.SessionDesc outSessionDesc) + { + self.ParseCommandLineArguments(argc, argv, out outSessionDesc, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryParseCommandLineArguments(this IGlobalSession self, int argc, byte** argv, out Brutal.SlangApi.SessionDesc outSessionDesc, out ISlangUnknown outAuxAllocation) + => self.ParseCommandLineArguments(argc, argv, out outSessionDesc, out outAuxAllocation); + public static ISlangBlob GetSessionDescDigest(this IGlobalSession self, in Brutal.SlangApi.SessionDesc sessionDesc) + { + self.GetSessionDescDigest(in sessionDesc, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetSessionDescDigest(this IGlobalSession self, in Brutal.SlangApi.SessionDesc sessionDesc, out ISlangBlob outBlob) + => self.GetSessionDescDigest(in sessionDesc, out outBlob); + public static Result TryCompileBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, CompileCoreModuleFlags flags) + => self.CompileBuiltinModule(module, flags); + public static Result TryLoadBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, void* moduleData, ByteSize64 sizeInBytes) + => self.LoadBuiltinModule(module, moduleData, sizeInBytes); + public static ISlangBlob SaveBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, Brutal.SlangApi.ArchiveType archiveType) + { + self.SaveBuiltinModule(module, archiveType, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TrySaveBuiltinModule(this IGlobalSession self, Brutal.SlangApi.BuiltinModuleName module, Brutal.SlangApi.ArchiveType archiveType, out ISlangBlob outBlob) + => self.SaveBuiltinModule(module, archiveType, out outBlob); +} + +public static unsafe partial class ISessionExtensions +{ + public static ISlangBlob GetTypeRTTIMangledName(this ISession self, Brutal.SlangApi.TypeReflection type) + { + self.GetTypeRTTIMangledName(type, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetTypeRTTIMangledName(this ISession self, Brutal.SlangApi.TypeReflection type, out ISlangBlob outNameBlob) + => self.GetTypeRTTIMangledName(type, out outNameBlob); + public static ISlangBlob GetTypeConformanceWitnessMangledName(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType) + { + self.GetTypeConformanceWitnessMangledName(type, interfaceType, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetTypeConformanceWitnessMangledName(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out ISlangBlob outNameBlob) + => self.GetTypeConformanceWitnessMangledName(type, interfaceType, out outNameBlob); + public static uint GetTypeConformanceWitnessSequentialID(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType) + { + self.GetTypeConformanceWitnessSequentialID(type, interfaceType, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetTypeConformanceWitnessSequentialID(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out uint outId) + => self.GetTypeConformanceWitnessSequentialID(type, interfaceType, out outId); + public static CompileRequest CreateCompileRequest(this ISession self) + { + self.CreateCompileRequest(out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryCreateCompileRequest(this ISession self, out CompileRequest outCompileRequest) + => self.CreateCompileRequest(out outCompileRequest); + public static ISlangBlob CreateTypeConformanceComponentType(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out Brutal.SlangApi.ITypeConformance outConformance, Int conformanceIdOverride) + { + self.CreateTypeConformanceComponentType(type, interfaceType, out outConformance, conformanceIdOverride, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryCreateTypeConformanceComponentType(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out Brutal.SlangApi.ITypeConformance outConformance, Int conformanceIdOverride, out ISlangBlob outDiagnostics) + => self.CreateTypeConformanceComponentType(type, interfaceType, out outConformance, conformanceIdOverride, out outDiagnostics); + public static Result TryGetDynamicObjectRTTIBytes(this ISession self, Brutal.SlangApi.TypeReflection type, Brutal.SlangApi.TypeReflection interfaceType, out uint outRTTIDataBuffer, uint bufferSizeInBytes) + => self.GetDynamicObjectRTTIBytes(type, interfaceType, out outRTTIDataBuffer, bufferSizeInBytes); + public static Result TryLoadModuleInfoFromIRBlob(this ISession self, IBlob source, ref Int outModuleVersion, ref byte* outModuleCompilerVersion, ref byte* outModuleName) + => self.LoadModuleInfoFromIRBlob(source, ref outModuleVersion, ref outModuleCompilerVersion, ref outModuleName); + public static Brutal.SlangApi.SourceLocation GetDeclSourceLocation(this ISession self, Brutal.SlangApi.DeclReflection decl) + { + self.GetDeclSourceLocation(decl, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetDeclSourceLocation(this ISession self, Brutal.SlangApi.DeclReflection decl, out Brutal.SlangApi.SourceLocation outLocation) + => self.GetDeclSourceLocation(decl, out outLocation); +} + +public static unsafe partial class IComponentTypeExtensions +{ + public static IBlob GetEntryPointCode(this IComponentType self, Int entryPointIndex, Int targetIndex, out IBlob outDiagnostics) + { + self.GetEntryPointCode(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetEntryPointCode(this IComponentType self, Int entryPointIndex, Int targetIndex, out IBlob outCode, out IBlob outDiagnostics) + => self.GetEntryPointCode(entryPointIndex, targetIndex, out outCode, out outDiagnostics); + public static ISlangMutableFileSystem GetResultAsFileSystem(this IComponentType self, Int entryPointIndex, Int targetIndex) + { + self.GetResultAsFileSystem(entryPointIndex, targetIndex, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetResultAsFileSystem(this IComponentType self, Int entryPointIndex, Int targetIndex, out ISlangMutableFileSystem outFileSystem) + => self.GetResultAsFileSystem(entryPointIndex, targetIndex, out outFileSystem); + public static Brutal.SlangApi.IComponentType Specialize(this IComponentType self, in Brutal.SlangApi.SpecializationArg specializationArgs, Int specializationArgCount, out ISlangBlob outDiagnostics) + { + self.Specialize(in specializationArgs, specializationArgCount, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TrySpecialize(this IComponentType self, in Brutal.SlangApi.SpecializationArg specializationArgs, Int specializationArgCount, out Brutal.SlangApi.IComponentType outSpecializedComponentType, out ISlangBlob outDiagnostics) + => self.Specialize(in specializationArgs, specializationArgCount, out outSpecializedComponentType, out outDiagnostics); + public static Brutal.SlangApi.IComponentType Link(this IComponentType self, out ISlangBlob outDiagnostics) + { + self.Link(out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryLink(this IComponentType self, out Brutal.SlangApi.IComponentType outLinkedComponentType, out ISlangBlob outDiagnostics) + => self.Link(out outLinkedComponentType, out outDiagnostics); + public static ISlangSharedLibrary GetEntryPointHostCallable(this IComponentType self, int entryPointIndex, int targetIndex, out IBlob outDiagnostics) + { + self.GetEntryPointHostCallable(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetEntryPointHostCallable(this IComponentType self, int entryPointIndex, int targetIndex, out ISlangSharedLibrary outSharedLibrary, out IBlob outDiagnostics) + => self.GetEntryPointHostCallable(entryPointIndex, targetIndex, out outSharedLibrary, out outDiagnostics); + public static Brutal.SlangApi.IComponentType RenameEntryPoint(this IComponentType self, byte* newName) + { + self.RenameEntryPoint(newName, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryRenameEntryPoint(this IComponentType self, byte* newName, out Brutal.SlangApi.IComponentType outEntryPoint) + => self.RenameEntryPoint(newName, out outEntryPoint); + public static ISlangBlob LinkWithOptions(this IComponentType self, out Brutal.SlangApi.IComponentType outLinkedComponentType, uint compilerOptionEntryCount, in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries) + { + self.LinkWithOptions(out outLinkedComponentType, compilerOptionEntryCount, in compilerOptionEntries, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryLinkWithOptions(this IComponentType self, out Brutal.SlangApi.IComponentType outLinkedComponentType, uint compilerOptionEntryCount, in Brutal.SlangApi.CompilerOptionEntry compilerOptionEntries, out ISlangBlob outDiagnostics) + => self.LinkWithOptions(out outLinkedComponentType, compilerOptionEntryCount, in compilerOptionEntries, out outDiagnostics); + public static IBlob GetTargetCode(this IComponentType self, Int targetIndex, out IBlob outDiagnostics) + { + self.GetTargetCode(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetTargetCode(this IComponentType self, Int targetIndex, out IBlob outCode, out IBlob outDiagnostics) + => self.GetTargetCode(targetIndex, out outCode, out outDiagnostics); + public static Brutal.SlangApi.IMetadata GetTargetMetadata(this IComponentType self, Int targetIndex, out IBlob outDiagnostics) + { + self.GetTargetMetadata(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetTargetMetadata(this IComponentType self, Int targetIndex, out Brutal.SlangApi.IMetadata outMetadata, out IBlob outDiagnostics) + => self.GetTargetMetadata(targetIndex, out outMetadata, out outDiagnostics); + public static Brutal.SlangApi.IMetadata GetEntryPointMetadata(this IComponentType self, Int entryPointIndex, Int targetIndex, out IBlob outDiagnostics) + { + self.GetEntryPointMetadata(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetEntryPointMetadata(this IComponentType self, Int entryPointIndex, Int targetIndex, out Brutal.SlangApi.IMetadata outMetadata, out IBlob outDiagnostics) + => self.GetEntryPointMetadata(entryPointIndex, targetIndex, out outMetadata, out outDiagnostics); +} + +public static unsafe partial class IModuleExtensions +{ + public static Brutal.SlangApi.IEntryPoint FindEntryPointByName(this IModule self, byte* name) + { + self.FindEntryPointByName(name, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryFindEntryPointByName(this IModule self, byte* name, out Brutal.SlangApi.IEntryPoint outEntryPoint) + => self.FindEntryPointByName(name, out outEntryPoint); + public static Brutal.SlangApi.IEntryPoint GetDefinedEntryPoint(this IModule self, Int32 index) + { + self.GetDefinedEntryPoint(index, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetDefinedEntryPoint(this IModule self, Int32 index, out Brutal.SlangApi.IEntryPoint outEntryPoint) + => self.GetDefinedEntryPoint(index, out outEntryPoint); + public static ISlangBlob Serialize(this IModule self) + { + self.Serialize(out var __result).ThrowIfFailure(); + return __result; + } + public static Result TrySerialize(this IModule self, out ISlangBlob outSerializedBlob) + => self.Serialize(out outSerializedBlob); + public static Result TryWriteToFile(this IModule self, byte* fileName) + => self.WriteToFile(fileName); + public static Brutal.SlangApi.IEntryPoint FindAndCheckEntryPoint(this IModule self, byte* name, Brutal.SlangApi.Stage stage, out ISlangBlob outDiagnostics) + { + self.FindAndCheckEntryPoint(name, stage, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryFindAndCheckEntryPoint(this IModule self, byte* name, Brutal.SlangApi.Stage stage, out Brutal.SlangApi.IEntryPoint outEntryPoint, out ISlangBlob outDiagnostics) + => self.FindAndCheckEntryPoint(name, stage, out outEntryPoint, out outDiagnostics); + public static IBlob Disassemble(this IModule self) + { + self.Disassemble(out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryDisassemble(this IModule self, out IBlob outDisassembledBlob) + => self.Disassemble(out outDisassembledBlob); +} + +public static unsafe partial class IMetadataExtensions +{ + public static Result TryIsParameterLocationUsed(this IMetadata self, Brutal.SlangApi.ParameterCategory category, UInt spaceIndex, UInt registerIndex, ref Brutal.Bool8 outUsed) + => self.IsParameterLocationUsed(category, spaceIndex, registerIndex, ref outUsed); +} + +public static unsafe partial class ICompileResultExtensions +{ + public static IBlob GetItemData(this ICompileResult self, uint index) + { + self.GetItemData(index, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetItemData(this ICompileResult self, uint index, out IBlob outblob) + => self.GetItemData(index, out outblob); + public static Brutal.SlangApi.IMetadata GetMetadata(this ICompileResult self) + { + self.GetMetadata(out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetMetadata(this ICompileResult self, out Brutal.SlangApi.IMetadata outMetadata) + => self.GetMetadata(out outMetadata); +} + +public static unsafe partial class IComponentType2Extensions +{ + public static Brutal.SlangApi.ICompileResult GetTargetCompileResult(this IComponentType2 self, Int targetIndex, out IBlob outDiagnostics) + { + self.GetTargetCompileResult(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetTargetCompileResult(this IComponentType2 self, Int targetIndex, out Brutal.SlangApi.ICompileResult outCompileResult, out IBlob outDiagnostics) + => self.GetTargetCompileResult(targetIndex, out outCompileResult, out outDiagnostics); + public static Brutal.SlangApi.ICompileResult GetEntryPointCompileResult(this IComponentType2 self, Int entryPointIndex, Int targetIndex, out IBlob outDiagnostics) + { + self.GetEntryPointCompileResult(entryPointIndex, targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetEntryPointCompileResult(this IComponentType2 self, Int entryPointIndex, Int targetIndex, out Brutal.SlangApi.ICompileResult outCompileResult, out IBlob outDiagnostics) + => self.GetEntryPointCompileResult(entryPointIndex, targetIndex, out outCompileResult, out outDiagnostics); + public static ISlangSharedLibrary GetTargetHostCallable(this IComponentType2 self, int targetIndex, out IBlob outDiagnostics) + { + self.GetTargetHostCallable(targetIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetTargetHostCallable(this IComponentType2 self, int targetIndex, out ISlangSharedLibrary outSharedLibrary, out IBlob outDiagnostics) + => self.GetTargetHostCallable(targetIndex, out outSharedLibrary, out outDiagnostics); +} + +public static unsafe partial class IModulePrecompileService_ExperimentalExtensions +{ + public static ISlangBlob PrecompileForTarget(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target) + { + self.PrecompileForTarget(target, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryPrecompileForTarget(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target, out ISlangBlob outDiagnostics) + => self.PrecompileForTarget(target, out outDiagnostics); + public static IBlob GetPrecompiledTargetCode(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target, out IBlob outDiagnostics) + { + self.GetPrecompiledTargetCode(target, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetPrecompiledTargetCode(this IModulePrecompileService_Experimental self, Brutal.SlangApi.CompileTarget target, out IBlob outCode, out IBlob outDiagnostics) + => self.GetPrecompiledTargetCode(target, out outCode, out outDiagnostics); + public static Brutal.SlangApi.IModule GetModuleDependency(this IModulePrecompileService_Experimental self, Int dependencyIndex, out IBlob outDiagnostics) + { + self.GetModuleDependency(dependencyIndex, out var __result, out outDiagnostics).ThrowIfFailure(); + return __result; + } + public static Result TryGetModuleDependency(this IModulePrecompileService_Experimental self, Int dependencyIndex, out Brutal.SlangApi.IModule outModule, out IBlob outDiagnostics) + => self.GetModuleDependency(dependencyIndex, out outModule, out outDiagnostics); +} + +public static unsafe partial class IByteCodeRunnerExtensions +{ + public static Result TryLoadModule(this IByteCodeRunner self, IBlob moduleBlob) + => self.LoadModule(moduleBlob); + public static Result TrySelectFunctionByIndex(this IByteCodeRunner self, uint functionIndex) + => self.SelectFunctionByIndex(functionIndex); + public static Brutal.SlangApi.ByteCodeFuncInfo GetFunctionInfo(this IByteCodeRunner self, uint index) + { + self.GetFunctionInfo(index, out var __result).ThrowIfFailure(); + return __result; + } + public static Result TryGetFunctionInfo(this IByteCodeRunner self, uint index, out Brutal.SlangApi.ByteCodeFuncInfo outInfo) + => self.GetFunctionInfo(index, out outInfo); + public static Result TryExecute(this IByteCodeRunner self, void* argumentData, ByteSize64 argumentSize) + => self.Execute(argumentData, argumentSize); + public static Result TryRegisterExtCall(this IByteCodeRunner self, byte* name, VMExtFunction functionPtr) + => self.RegisterExtCall(name, functionPtr); + public static Result TrySetPrintCallback(this IByteCodeRunner self, VMPrintFunc callback, void* userData) + => self.SetPrintCallback(callback, userData); +} + diff --git a/Brutal.Slang/Generated/Slang.gen.cs b/Brutal.Slang/Generated/Slang.gen.cs new file mode 100644 index 0000000..89c3a33 --- /dev/null +++ b/Brutal.Slang/Generated/Slang.gen.cs @@ -0,0 +1,2419 @@ +using Brutal.Strings; + +namespace Brutal.SlangApi +{ + public static partial class Slang + { + public static unsafe partial class PInvoke + { + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spGetBuildTagString(); + + [LibraryImport("slang")] + public static partial nint spCreateSession(RefString8 deprecated); + + [LibraryImport("slang")] + public static partial void spDestroySession(nint session); + + [LibraryImport("slang")] + public static partial void spSessionSetSharedLibraryLoader(nint session, nint loader); + + [LibraryImport("slang")] + public static partial nint spSessionGetSharedLibraryLoader(nint session); + + [LibraryImport("slang")] + public static partial Result spSessionCheckCompileTargetSupport( + nint session, + Brutal.SlangApi.CompileTarget target + ); + + [LibraryImport("slang")] + public static partial Result spSessionCheckPassThroughSupport( + nint session, + Brutal.SlangApi.PassThrough passThrough + ); + + [LibraryImport("slang")] + public static partial void spAddBuiltins(nint session, RefString8 sourcePath, RefString8 sourceString); + + [LibraryImport("slang")] + public static partial CompileRequest spCreateCompileRequest(nint session); + + [LibraryImport("slang")] + public static partial void spDestroyCompileRequest(CompileRequest request); + + [LibraryImport("slang")] + public static partial void spSetFileSystem(CompileRequest request, nint fileSystem); + + [LibraryImport("slang")] + public static partial void spSetCompileFlags(CompileRequest request, CompileFlags flags); + + [LibraryImport("slang")] + public static partial CompileFlags spGetCompileFlags(CompileRequest request); + + [LibraryImport("slang")] + public static partial void spSetDumpIntermediates(CompileRequest request, int enable); + + [LibraryImport("slang")] + public static partial void spSetDumpIntermediatePrefix(CompileRequest request, RefString8 prefix); + + [LibraryImport("slang")] + public static partial void spSetLineDirectiveMode( + CompileRequest request, + Brutal.SlangApi.LineDirectiveMode mode + ); + + [LibraryImport("slang")] + public static partial void spSetTargetLineDirectiveMode( + CompileRequest request, + int targetIndex, + Brutal.SlangApi.LineDirectiveMode mode + ); + + [LibraryImport("slang")] + public static partial void spSetTargetForceGLSLScalarBufferLayout( + CompileRequest request, + int targetIndex, + Brutal.Bool8 forceScalarLayout + ); + + [LibraryImport("slang")] + public static partial void spSetTargetUseMinimumSlangOptimization( + Brutal.SlangApi.ICompileRequest request, + int targetIndex, + Brutal.Bool8 val + ); + + [LibraryImport("slang")] + public static partial void spSetIgnoreCapabilityCheck( + Brutal.SlangApi.ICompileRequest request, + Brutal.Bool8 val + ); + + [LibraryImport("slang")] + public static partial void spSetCodeGenTarget(CompileRequest request, Brutal.SlangApi.CompileTarget target); + + [LibraryImport("slang")] + public static partial int spAddCodeGenTarget(CompileRequest request, Brutal.SlangApi.CompileTarget target); + + [LibraryImport("slang")] + public static partial void spSetTargetProfile( + CompileRequest request, + int targetIndex, + Brutal.SlangApi.ProfileID profile + ); + + [LibraryImport("slang")] + public static partial void spSetTargetFlags(CompileRequest request, int targetIndex, TargetFlags flags); + + [LibraryImport("slang")] + public static partial void spSetTargetFloatingPointMode( + CompileRequest request, + int targetIndex, + Brutal.SlangApi.FloatingPointMode mode + ); + + [LibraryImport("slang")] + public static partial void spAddTargetCapability( + Brutal.SlangApi.ICompileRequest request, + int targetIndex, + Brutal.SlangApi.CapabilityID capability + ); + + [LibraryImport("slang")] + public static partial void spSetTargetMatrixLayoutMode( + CompileRequest request, + int targetIndex, + Brutal.SlangApi.MatrixLayoutMode mode + ); + + [LibraryImport("slang")] + public static partial void spSetMatrixLayoutMode( + CompileRequest request, + Brutal.SlangApi.MatrixLayoutMode mode + ); + + [LibraryImport("slang")] + public static partial void spSetDebugInfoLevel( + CompileRequest request, + Brutal.SlangApi.DebugInfoLevel level + ); + + [LibraryImport("slang")] + public static partial void spSetDebugInfoFormat( + CompileRequest request, + Brutal.SlangApi.DebugInfoFormat format + ); + + [LibraryImport("slang")] + public static partial void spSetOptimizationLevel( + CompileRequest request, + Brutal.SlangApi.OptimizationLevel level + ); + + [LibraryImport("slang")] + public static partial void spSetOutputContainerFormat( + CompileRequest request, + Brutal.SlangApi.ContainerFormat format + ); + + [LibraryImport("slang")] + public static partial void spSetPassThrough( + CompileRequest request, + Brutal.SlangApi.PassThrough passThrough + ); + + [LibraryImport("slang")] + public static partial void spSetDiagnosticCallback( + CompileRequest request, + DiagnosticCallback callback, + void* userData + ); + + [LibraryImport("slang")] + public static partial void spSetWriter( + CompileRequest request, + Brutal.SlangApi.WriterChannel channel, + nint writer + ); + + [LibraryImport("slang")] + public static partial nint spGetWriter(CompileRequest request, Brutal.SlangApi.WriterChannel channel); + + [LibraryImport("slang")] + public static partial void spAddSearchPath(CompileRequest request, RefString8 searchDir); + + [LibraryImport("slang")] + public static partial void spAddPreprocessorDefine( + CompileRequest request, + RefString8 key, + RefString8 value + ); + + [LibraryImport("slang")] + public static partial Result spProcessCommandLineArguments( + CompileRequest request, + byte** args, + int argCount + ); + + [LibraryImport("slang")] + public static partial int spAddTranslationUnit( + CompileRequest request, + Brutal.SlangApi.SourceLanguage language, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial void spSetDefaultModuleName(CompileRequest request, RefString8 defaultModuleName); + + [LibraryImport("slang")] + public static partial void spTranslationUnit_addPreprocessorDefine( + CompileRequest request, + int translationUnitIndex, + RefString8 key, + RefString8 value + ); + + [LibraryImport("slang")] + public static partial void spAddTranslationUnitSourceFile( + CompileRequest request, + int translationUnitIndex, + RefString8 path + ); + + [LibraryImport("slang")] + public static partial void spAddTranslationUnitSourceString( + CompileRequest request, + int translationUnitIndex, + RefString8 path, + RefString8 source + ); + + [LibraryImport("slang")] + public static partial Result spAddLibraryReference( + CompileRequest request, + RefString8 basePath, + void* libData, + ByteSize64 libDataSize + ); + + [LibraryImport("slang")] + public static partial void spAddTranslationUnitSourceStringSpan( + CompileRequest request, + int translationUnitIndex, + RefString8 path, + RefString8 sourceBegin, + RefString8 sourceEnd + ); + + [LibraryImport("slang")] + public static partial void spAddTranslationUnitSourceBlob( + CompileRequest request, + int translationUnitIndex, + RefString8 path, + nint sourceBlob + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ProfileID spFindProfile(nint session, RefString8 name); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.CapabilityID spFindCapability(nint session, RefString8 name); + + [LibraryImport("slang")] + public static partial int spAddEntryPoint( + CompileRequest request, + int translationUnitIndex, + RefString8 name, + Brutal.SlangApi.Stage stage + ); + + [LibraryImport("slang")] + public static partial int spAddEntryPointEx( + CompileRequest request, + int translationUnitIndex, + RefString8 name, + Brutal.SlangApi.Stage stage, + int genericArgCount, + byte** genericArgs + ); + + [LibraryImport("slang")] + public static partial Result spSetGlobalGenericArgs( + CompileRequest request, + int genericArgCount, + byte** genericArgs + ); + + [LibraryImport("slang")] + public static partial Result spSetTypeNameForGlobalExistentialTypeParam( + CompileRequest request, + int slotIndex, + RefString8 typeName + ); + + [LibraryImport("slang")] + public static partial Result spSetTypeNameForEntryPointExistentialTypeParam( + CompileRequest request, + int entryPointIndex, + int slotIndex, + RefString8 typeName + ); + + [LibraryImport("slang")] + public static partial Result spCompile(CompileRequest request); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spGetDiagnosticOutput(CompileRequest request); + + [LibraryImport("slang")] + public static partial Result spGetDiagnosticOutputBlob(CompileRequest request, out nint outBlob); + + [LibraryImport("slang")] + public static partial int spGetDependencyFileCount(CompileRequest request); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spGetDependencyFilePath(CompileRequest request, int index); + + [LibraryImport("slang")] + public static partial int spGetTranslationUnitCount(CompileRequest request); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spGetEntryPointSource(CompileRequest request, int entryPointIndex); + + [LibraryImport("slang")] + public static partial void* spGetEntryPointCode( + CompileRequest request, + int entryPointIndex, + out ByteSize64 outSize + ); + + [LibraryImport("slang")] + public static partial Result spGetEntryPointCodeBlob( + CompileRequest request, + int entryPointIndex, + int targetIndex, + out nint outBlob + ); + + [LibraryImport("slang")] + public static partial Result spGetEntryPointHostCallable( + CompileRequest request, + int entryPointIndex, + int targetIndex, + out nint outSharedLibrary + ); + + [LibraryImport("slang")] + public static partial Result spGetTargetCodeBlob(CompileRequest request, int targetIndex, out nint outBlob); + + [LibraryImport("slang")] + public static partial Result spGetTargetHostCallable( + CompileRequest request, + int targetIndex, + out nint outSharedLibrary + ); + + [LibraryImport("slang")] + public static partial void* spGetCompileRequestCode(CompileRequest request, out ByteSize64 outSize); + + [LibraryImport("slang")] + public static partial Result spGetContainerCode(CompileRequest request, out nint outBlob); + + [LibraryImport("slang")] + public static partial Result spLoadRepro( + CompileRequest request, + nint fileSystem, + void* data, + ByteSize64 size + ); + + [LibraryImport("slang")] + public static partial Result spSaveRepro(CompileRequest request, out nint outBlob); + + [LibraryImport("slang")] + public static partial Result spEnableReproCapture(CompileRequest request); + + [LibraryImport("slang")] + public static partial Result spGetCompileTimeProfile( + CompileRequest request, + nint* compileTimeProfile, + Brutal.Bool8 shouldClear + ); + + [LibraryImport("slang")] + public static partial Result spExtractRepro( + nint session, + void* reproData, + ByteSize64 reproDataSize, + nint fileSystem + ); + + [LibraryImport("slang")] + public static partial Result spLoadReproAsFileSystem( + nint session, + void* reproData, + ByteSize64 reproDataSize, + nint replaceFileSystem, + out nint outFileSystem + ); + + [LibraryImport("slang")] + public static partial void spOverrideDiagnosticSeverity( + CompileRequest request, + Int messageID, + Brutal.SlangApi.Severity overrideSeverity + ); + + [LibraryImport("slang")] + public static partial DiagnosticFlags spGetDiagnosticFlags(CompileRequest request); + + [LibraryImport("slang")] + public static partial void spSetDiagnosticFlags(CompileRequest request, DiagnosticFlags flags); + + [LibraryImport("slang")] + public static partial Reflection spGetReflection(CompileRequest request); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionUserAttribute_GetName( + Brutal.SlangApi.ReflectionUserAttribute attrib + ); + + [LibraryImport("slang")] + public static partial uint spReflectionUserAttribute_GetArgumentCount( + Brutal.SlangApi.ReflectionUserAttribute attrib + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionUserAttribute_GetArgumentType( + Brutal.SlangApi.ReflectionUserAttribute attrib, + uint index + ); + + [LibraryImport("slang")] + public static partial Result spReflectionUserAttribute_GetArgumentValueInt( + Brutal.SlangApi.ReflectionUserAttribute attrib, + uint index, + int* rs + ); + + [LibraryImport("slang")] + public static partial Result spReflectionUserAttribute_GetArgumentValueFloat( + Brutal.SlangApi.ReflectionUserAttribute attrib, + uint index, + float* rs + ); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionUserAttribute_GetArgumentValueString( + Brutal.SlangApi.ReflectionUserAttribute attrib, + uint index, + out ByteSize64 outSize + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.TypeKind spReflectionType_GetKind(ReflectionType type); + + [LibraryImport("slang")] + public static partial uint spReflectionType_GetUserAttributeCount(ReflectionType type); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionUserAttribute spReflectionType_GetUserAttribute( + ReflectionType type, + uint index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionUserAttribute spReflectionType_FindUserAttributeByName( + ReflectionType type, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionType_applySpecializations( + ReflectionType type, + ReflectionGeneric generic + ); + + [LibraryImport("slang")] + public static partial uint spReflectionType_GetFieldCount(ReflectionType type); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionType_GetFieldByIndex(ReflectionType type, uint index); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionType_GetElementCount(ReflectionType type); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionType_GetSpecializedElementCount( + ReflectionType type, + Reflection reflection + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionType_GetElementType(ReflectionType type); + + [LibraryImport("slang")] + public static partial uint spReflectionType_GetRowCount(ReflectionType type); + + [LibraryImport("slang")] + public static partial uint spReflectionType_GetColumnCount(ReflectionType type); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ScalarType spReflectionType_GetScalarType(ReflectionType type); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ResourceShape spReflectionType_GetResourceShape(ReflectionType type); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ResourceAccess spReflectionType_GetResourceAccess( + ReflectionType type + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionType_GetResourceResultType(ReflectionType type); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionType_GetName(ReflectionType type); + + [LibraryImport("slang")] + public static partial Result spReflectionType_GetFullName(ReflectionType type, out nint outNameBlob); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflectionType_GetGenericContainer(ReflectionType type); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionTypeLayout_GetType(ReflectionTypeLayout type); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.TypeKind spReflectionTypeLayout_getKind(ReflectionTypeLayout type); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionTypeLayout_GetSize( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionTypeLayout_GetStride( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ); + + [LibraryImport("slang")] + public static partial int spReflectionTypeLayout_getAlignment( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ); + + [LibraryImport("slang")] + public static partial uint spReflectionTypeLayout_GetFieldCount(ReflectionTypeLayout type); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionTypeLayout_GetFieldByIndex( + ReflectionTypeLayout type, + uint index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_findFieldIndexByName( + ReflectionTypeLayout typeLayout, + RefString8 nameBegin, + RefString8 nameEnd + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionTypeLayout_GetExplicitCounter( + ReflectionTypeLayout typeLayout + ); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionTypeLayout_GetElementStride( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ); + + [LibraryImport("slang")] + public static partial ReflectionTypeLayout spReflectionTypeLayout_GetElementTypeLayout( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionTypeLayout_GetElementVarLayout( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionTypeLayout_getContainerVarLayout( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ParameterCategory spReflectionTypeLayout_GetParameterCategory( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial uint spReflectionTypeLayout_GetCategoryCount(ReflectionTypeLayout type); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ParameterCategory spReflectionTypeLayout_GetCategoryByIndex( + ReflectionTypeLayout type, + uint index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.MatrixLayoutMode spReflectionTypeLayout_GetMatrixLayoutMode( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial int spReflectionTypeLayout_getGenericParamIndex(ReflectionTypeLayout type); + + [LibraryImport("slang")] + public static partial ReflectionTypeLayout spReflectionTypeLayout_getPendingDataTypeLayout( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionTypeLayout_getSpecializedTypePendingDataVarLayout( + ReflectionTypeLayout type + ); + + [LibraryImport("slang")] + public static partial Int spReflectionType_getSpecializedTypeArgCount(ReflectionType type); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionType_getSpecializedTypeArgType( + ReflectionType type, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getBindingRangeCount(ReflectionTypeLayout typeLayout); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.BindingType spReflectionTypeLayout_getBindingRangeType( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_isBindingRangeSpecializable( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getBindingRangeBindingCount( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial ReflectionTypeLayout spReflectionTypeLayout_getBindingRangeLeafTypeLayout( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionTypeLayout_getBindingRangeLeafVariable( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ImageFormat spReflectionTypeLayout_getBindingRangeImageFormat( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getFieldBindingRangeOffset( + ReflectionTypeLayout typeLayout, + Int fieldIndex + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getExplicitCounterBindingRangeOffset( + ReflectionTypeLayout inTypeLayout + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getBindingRangeDescriptorSetIndex( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getBindingRangeFirstDescriptorRangeIndex( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getBindingRangeDescriptorRangeCount( + ReflectionTypeLayout typeLayout, + Int index + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getDescriptorSetCount(ReflectionTypeLayout typeLayout); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getDescriptorSetSpaceOffset( + ReflectionTypeLayout typeLayout, + Int setIndex + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getDescriptorSetDescriptorRangeCount( + ReflectionTypeLayout typeLayout, + Int setIndex + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getDescriptorSetDescriptorRangeIndexOffset( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getDescriptorSetDescriptorRangeDescriptorCount( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.BindingType spReflectionTypeLayout_getDescriptorSetDescriptorRangeType( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ParameterCategory spReflectionTypeLayout_getDescriptorSetDescriptorRangeCategory( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getSubObjectRangeCount(ReflectionTypeLayout typeLayout); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getSubObjectRangeBindingRangeIndex( + ReflectionTypeLayout typeLayout, + Int subObjectRangeIndex + ); + + [LibraryImport("slang")] + public static partial Int spReflectionTypeLayout_getSubObjectRangeSpaceOffset( + ReflectionTypeLayout typeLayout, + Int subObjectRangeIndex + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionTypeLayout_getSubObjectRangeOffset( + ReflectionTypeLayout typeLayout, + Int subObjectRangeIndex + ); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionVariable_GetName(ReflectionVariable var); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionVariable_GetType(ReflectionVariable var); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionModifier spReflectionVariable_FindModifier( + ReflectionVariable var, + Brutal.SlangApi.ModifierID modifierID + ); + + [LibraryImport("slang")] + public static partial uint spReflectionVariable_GetUserAttributeCount(ReflectionVariable var); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionUserAttribute spReflectionVariable_GetUserAttribute( + ReflectionVariable var, + uint index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionUserAttribute spReflectionVariable_FindUserAttributeByName( + ReflectionVariable var, + nint globalSession, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial Brutal.Bool8 spReflectionVariable_HasDefaultValue(ReflectionVariable inVar); + + [LibraryImport("slang")] + public static partial Result spReflectionVariable_GetDefaultValueInt(ReflectionVariable inVar, long* rs); + + [LibraryImport("slang")] + public static partial Result spReflectionVariable_GetDefaultValueFloat(ReflectionVariable inVar, float* rs); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflectionVariable_GetGenericContainer(ReflectionVariable var); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionVariable_applySpecializations( + ReflectionVariable var, + ReflectionGeneric generic + ); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionVariableLayout_GetVariable( + ReflectionVariableLayout var + ); + + [LibraryImport("slang")] + public static partial ReflectionTypeLayout spReflectionVariableLayout_GetTypeLayout( + ReflectionVariableLayout var + ); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionVariableLayout_GetOffset( + ReflectionVariableLayout var, + Brutal.SlangApi.ParameterCategory category + ); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionVariableLayout_GetSpace( + ReflectionVariableLayout var, + Brutal.SlangApi.ParameterCategory category + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ImageFormat spReflectionVariableLayout_GetImageFormat( + ReflectionVariableLayout var + ); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionVariableLayout_GetSemanticName(ReflectionVariableLayout var); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflectionVariableLayout_GetSemanticIndex(ReflectionVariableLayout var); + + [LibraryImport("slang")] + public static partial ReflectionDecl spReflectionFunction_asDecl(ReflectionFunction func); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionFunction_GetName(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionModifier spReflectionFunction_FindModifier( + ReflectionFunction var, + Brutal.SlangApi.ModifierID modifierID + ); + + [LibraryImport("slang")] + public static partial uint spReflectionFunction_GetUserAttributeCount(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionUserAttribute spReflectionFunction_GetUserAttribute( + ReflectionFunction func, + uint index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionUserAttribute spReflectionFunction_FindUserAttributeByName( + ReflectionFunction func, + nint globalSession, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial uint spReflectionFunction_GetParameterCount(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionFunction_GetParameter( + ReflectionFunction func, + uint index + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionFunction_GetResultType(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflectionFunction_GetGenericContainer(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflectionFunction_applySpecializations( + ReflectionFunction func, + ReflectionGeneric generic + ); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflectionFunction_specializeWithArgTypes( + ReflectionFunction func, + Int argTypeCount, + in ReflectionType argTypes + ); + + [LibraryImport("slang")] + public static partial Brutal.Bool8 spReflectionFunction_isOverloaded(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial uint spReflectionFunction_getOverloadCount(ReflectionFunction func); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflectionFunction_getOverload( + ReflectionFunction func, + uint index + ); + + [LibraryImport("slang")] + public static partial uint spReflectionDecl_getChildrenCount(ReflectionDecl parentDecl); + + [LibraryImport("slang")] + public static partial ReflectionDecl spReflectionDecl_getChild(ReflectionDecl parentDecl, uint index); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionDecl_getName(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.DeclKind spReflectionDecl_getKind(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflectionDecl_castToFunction(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionDecl_castToVariable(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflectionDecl_castToGeneric(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial ReflectionType spReflection_getTypeFromDecl(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial ReflectionDecl spReflectionDecl_getParent(ReflectionDecl decl); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.ReflectionModifier spReflectionDecl_findModifier( + ReflectionDecl decl, + Brutal.SlangApi.ModifierID modifierID + ); + + [LibraryImport("slang")] + public static partial ReflectionDecl spReflectionGeneric_asDecl(ReflectionGeneric generic); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionGeneric_GetName(ReflectionGeneric generic); + + [LibraryImport("slang")] + public static partial uint spReflectionGeneric_GetTypeParameterCount(ReflectionGeneric generic); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionGeneric_GetTypeParameter( + ReflectionGeneric generic, + uint index + ); + + [LibraryImport("slang")] + public static partial uint spReflectionGeneric_GetValueParameterCount(ReflectionGeneric generic); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflectionGeneric_GetValueParameter( + ReflectionGeneric generic, + uint index + ); + + [LibraryImport("slang")] + public static partial uint spReflectionGeneric_GetTypeParameterConstraintCount( + ReflectionGeneric generic, + ReflectionVariable typeParam + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionGeneric_GetTypeParameterConstraintType( + ReflectionGeneric generic, + ReflectionVariable typeParam, + uint index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.DeclKind spReflectionGeneric_GetInnerKind(ReflectionGeneric generic); + + [LibraryImport("slang")] + public static partial ReflectionDecl spReflectionGeneric_GetInnerDecl(ReflectionGeneric generic); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflectionGeneric_GetOuterGenericContainer( + ReflectionGeneric generic + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionGeneric_GetConcreteType( + ReflectionGeneric generic, + ReflectionVariable typeParam + ); + + [LibraryImport("slang")] + public static partial long spReflectionGeneric_GetConcreteIntVal( + ReflectionGeneric generic, + ReflectionVariable valueParam + ); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflectionGeneric_applySpecializations( + ReflectionGeneric currGeneric, + ReflectionGeneric generic + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.Stage spReflectionVariableLayout_getStage( + ReflectionVariableLayout var + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionVariableLayout_getPendingDataLayout( + ReflectionVariableLayout var + ); + + [LibraryImport("slang")] + public static partial uint spReflectionParameter_GetBindingIndex(ReflectionParameter parameter); + + [LibraryImport("slang")] + public static partial uint spReflectionParameter_GetBindingSpace(ReflectionParameter parameter); + + [LibraryImport("slang")] + public static partial Result spIsParameterLocationUsed( + CompileRequest request, + Int entryPointIndex, + Int targetIndex, + Brutal.SlangApi.ParameterCategory category, + UInt spaceIndex, + UInt registerIndex, + ref Brutal.Bool8 outUsed + ); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionEntryPoint_getName(ReflectionEntryPoint entryPoint); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionEntryPoint_getNameOverride(ReflectionEntryPoint entryPoint); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflectionEntryPoint_getFunction( + ReflectionEntryPoint entryPoint + ); + + [LibraryImport("slang")] + public static partial uint spReflectionEntryPoint_getParameterCount(ReflectionEntryPoint entryPoint); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionEntryPoint_getParameterByIndex( + ReflectionEntryPoint entryPoint, + uint index + ); + + [LibraryImport("slang")] + public static partial Brutal.SlangApi.Stage spReflectionEntryPoint_getStage( + ReflectionEntryPoint entryPoint + ); + + [LibraryImport("slang")] + public static partial void spReflectionEntryPoint_getComputeThreadGroupSize( + ReflectionEntryPoint entryPoint, + UInt axisCount, + out UInt outSizeAlongAxis + ); + + [LibraryImport("slang")] + public static partial void spReflectionEntryPoint_getComputeWaveSize( + ReflectionEntryPoint entryPoint, + out UInt outWaveSize + ); + + [LibraryImport("slang")] + public static partial int spReflectionEntryPoint_usesAnySampleRateInput(ReflectionEntryPoint entryPoint); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionEntryPoint_getVarLayout( + ReflectionEntryPoint entryPoint + ); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflectionEntryPoint_getResultVarLayout( + ReflectionEntryPoint entryPoint + ); + + [LibraryImport("slang")] + public static partial int spReflectionEntryPoint_hasDefaultConstantBuffer(ReflectionEntryPoint entryPoint); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflectionTypeParameter_GetName(ReflectionTypeParameter typeParam); + + [LibraryImport("slang")] + public static partial uint spReflectionTypeParameter_GetIndex(ReflectionTypeParameter typeParam); + + [LibraryImport("slang")] + public static partial uint spReflectionTypeParameter_GetConstraintCount(ReflectionTypeParameter typeParam); + + [LibraryImport("slang")] + public static partial ReflectionType spReflectionTypeParameter_GetConstraintByIndex( + ReflectionTypeParameter typeParam, + uint index + ); + + [LibraryImport("slang")] + public static partial Result spReflection_ToJson( + Reflection reflection, + CompileRequest request, + out nint outBlob + ); + + [LibraryImport("slang")] + public static partial uint spReflection_GetParameterCount(Reflection reflection); + + [LibraryImport("slang")] + public static partial ReflectionParameter spReflection_GetParameterByIndex( + Reflection reflection, + uint index + ); + + [LibraryImport("slang")] + public static partial uint spReflection_GetTypeParameterCount(Reflection reflection); + + [LibraryImport("slang")] + public static partial ReflectionTypeParameter spReflection_GetTypeParameterByIndex( + Reflection reflection, + uint index + ); + + [LibraryImport("slang")] + public static partial ReflectionTypeParameter spReflection_FindTypeParameter( + Reflection reflection, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial ReflectionType spReflection_FindTypeByName(Reflection reflection, RefString8 name); + + [LibraryImport("slang")] + public static partial ReflectionTypeLayout spReflection_GetTypeLayout( + Reflection reflection, + ReflectionType reflectionType, + Brutal.SlangApi.LayoutRules rules + ); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflection_FindFunctionByName( + Reflection reflection, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflection_FindFunctionByNameInType( + Reflection reflection, + ReflectionType reflType, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial ReflectionVariable spReflection_FindVarByNameInType( + Reflection reflection, + ReflectionType reflType, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial ReflectionFunction spReflection_TryResolveOverloadedFunction( + Reflection reflection, + uint candidateCount, + in ReflectionFunction candidates + ); + + [LibraryImport("slang")] + public static partial UInt spReflection_getEntryPointCount(Reflection reflection); + + [LibraryImport("slang")] + public static partial ReflectionEntryPoint spReflection_getEntryPointByIndex( + Reflection reflection, + UInt index + ); + + [LibraryImport("slang")] + public static partial ReflectionEntryPoint spReflection_findEntryPointByName( + Reflection reflection, + RefString8 name + ); + + [LibraryImport("slang")] + public static partial UInt spReflection_getGlobalConstantBufferBinding(Reflection reflection); + + [LibraryImport("slang")] + public static partial ByteSize64 spReflection_getGlobalConstantBufferSize(Reflection reflection); + + [LibraryImport("slang")] + public static partial ReflectionType spReflection_specializeType( + Reflection reflection, + ReflectionType type, + Int specializationArgCount, + in ReflectionType specializationArgs, + out nint outDiagnostics + ); + + [LibraryImport("slang")] + public static partial ReflectionGeneric spReflection_specializeGeneric( + Reflection inProgramLayout, + ReflectionGeneric generic, + Int argCount, + in Brutal.SlangApi.ReflectionGenericArgType argTypes, + in Brutal.SlangApi.ReflectionGenericArg args, + out nint outDiagnostics + ); + + [LibraryImport("slang")] + public static partial Brutal.Bool8 spReflection_isSubType( + Reflection reflection, + ReflectionType subType, + ReflectionType superType + ); + + [LibraryImport("slang")] + public static partial UInt spReflection_getHashedStringCount(Reflection reflection); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spReflection_getHashedString( + Reflection reflection, + UInt index, + out ByteSize64 outCount + ); + + [LibraryImport("slang")] + public static partial UInt32 spComputeStringHash(RefString8 chars, ByteSize64 count); + + [LibraryImport("slang")] + public static partial ReflectionTypeLayout spReflection_getGlobalParamsTypeLayout(Reflection reflection); + + [LibraryImport("slang")] + public static partial ReflectionVariableLayout spReflection_getGlobalParamsVarLayout(Reflection reflection); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string spGetTranslationUnitSource(CompileRequest request, int translationUnitIndex); + + [LibraryImport("slang")] + public static partial Int spReflection_getBindlessSpaceIndex(Reflection reflection); + + [LibraryImport("slang")] + public static partial nint spReflection_GetSession(Reflection reflection); + + [LibraryImport("slang")] + public static partial Result spCompileRequest_getProgram(CompileRequest request, out nint outProgram); + + [LibraryImport("slang")] + public static partial Result spCompileRequest_getProgramWithEntryPoints( + CompileRequest request, + out nint outProgram + ); + + [LibraryImport("slang")] + public static partial Result spCompileRequest_getEntryPoint( + CompileRequest request, + Int entryPointIndex, + out nint outEntryPoint + ); + + [LibraryImport("slang")] + public static partial Result spCompileRequest_getModule( + CompileRequest request, + Int translationUnitIndex, + out nint outModule + ); + + [LibraryImport("slang")] + public static partial Result spCompileRequest_getSession(CompileRequest request, out nint outSession); + + [LibraryImport("slang")] + public static partial nint slang_createBlob(void* data, ByteSize64 size); + + [LibraryImport("slang")] + public static partial nint slang_loadModuleFromSource( + nint session, + RefString8 moduleName, + RefString8 path, + RefString8 source, + ByteSize64 sourceSize, + out nint outDiagnostics + ); + + [LibraryImport("slang")] + public static partial nint slang_loadModuleFromIRBlob( + nint session, + RefString8 moduleName, + RefString8 path, + void* source, + ByteSize64 sourceSize, + out nint outDiagnostics + ); + + [LibraryImport("slang")] + public static partial Result slang_loadModuleInfoFromIRBlob( + nint session, + void* source, + ByteSize64 sourceSize, + ref Int outModuleVersion, + ref byte* outModuleCompilerVersion, + ref byte* outModuleName + ); + + [LibraryImport("slang")] + public static partial Result slang_createGlobalSession(Int apiVersion, out nint outGlobalSession); + + [LibraryImport("slang")] + public static partial Result slang_createGlobalSession2( + in Brutal.SlangApi.GlobalSessionDesc desc, + out nint outGlobalSession + ); + + [LibraryImport("slang")] + public static partial Result slang_createGlobalSessionWithoutCoreModule( + Int apiVersion, + out nint outGlobalSession + ); + + [LibraryImport("slang")] + public static partial nint slang_getEmbeddedCoreModule(); + + [LibraryImport("slang")] + public static partial void slang_shutdown(); + + [LibraryImport("slang")] + public static partial void slang_enableRecordLayer(Brutal.Bool8 enable); + + [LibraryImport("slang")] + public static partial Brutal.Bool8 slang_isRecordLayerEnabled(); + + [LibraryImport("slang")] + public static partial void slang_setReplayDirectory(RefString8 path); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string slang_getReplayDirectory(); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string slang_getCurrentReplayPath(); + + [LibraryImport("slang")] + public static partial Result slang_loadReplay(RefString8 folderPath); + + [LibraryImport("slang")] + public static partial Result slang_loadLatestReplay(); + + [LibraryImport("slang")] + public static partial void slang_replayMarker(RefString8 label); + + [LibraryImport( + "slang", + StringMarshalling = StringMarshalling.Custom, + StringMarshallingCustomType = typeof(Brutal.Interop.InteropStringMarshaller) + )] + public static partial string slang_getLastInternalErrorMessage(); + + [LibraryImport("slang")] + public static partial Result slang_createByteCodeRunner( + in Brutal.SlangApi.ByteCodeRunnerDesc desc, + out nint outByteCodeRunner + ); + + [LibraryImport("slang")] + public static partial Result slang_disassembleByteCode(nint moduleBlob, out nint outDisassemblyBlob); + }; + + public static string GetBuildTagString() + { + return PInvoke.spGetBuildTagString(); + } + + internal static nint CreateSession(RefString8 deprecated) + { + return PInvoke.spCreateSession(deprecated); + } + + internal static void DestroySession(nint session) + { + PInvoke.spDestroySession(session); + } + + internal static void SessionSetSharedLibraryLoader(nint session, nint loader) + { + PInvoke.spSessionSetSharedLibraryLoader(session, loader); + } + + internal static nint SessionGetSharedLibraryLoader(nint session) + { + return PInvoke.spSessionGetSharedLibraryLoader(session); + } + + internal static Result SessionCheckCompileTargetSupport(nint session, Brutal.SlangApi.CompileTarget target) + { + return PInvoke.spSessionCheckCompileTargetSupport(session, target); + } + + internal static Result SessionCheckPassThroughSupport(nint session, Brutal.SlangApi.PassThrough passThrough) + { + return PInvoke.spSessionCheckPassThroughSupport(session, passThrough); + } + + internal static void AddBuiltins(nint session, RefString8 sourcePath, RefString8 sourceString) + { + PInvoke.spAddBuiltins(session, sourcePath, sourceString); + } + + internal static CompileRequest CreateCompileRequest(nint session) + { + return PInvoke.spCreateCompileRequest(session); + } + + internal static Brutal.SlangApi.ProfileID FindProfile(nint session, RefString8 name) + { + return PInvoke.spFindProfile(session, name); + } + + internal static Brutal.SlangApi.CapabilityID FindCapability(nint session, RefString8 name) + { + return PInvoke.spFindCapability(session, name); + } + + internal static unsafe Result ExtractRepro( + nint session, + void* reproData, + ByteSize64 reproDataSize, + nint fileSystem + ) + { + return PInvoke.spExtractRepro(session, reproData, reproDataSize, fileSystem); + } + + internal static unsafe Result LoadReproAsFileSystem( + nint session, + void* reproData, + ByteSize64 reproDataSize, + nint replaceFileSystem, + out nint outFileSystem + ) + { + return PInvoke.spLoadReproAsFileSystem( + session, + reproData, + reproDataSize, + replaceFileSystem, + out outFileSystem + ); + } + + public static Brutal.SlangApi.TypeKind ReflectionTypeGetKind(ReflectionType type) + { + return PInvoke.spReflectionType_GetKind(type); + } + + public static uint ReflectionTypeGetUserAttributeCount(ReflectionType type) + { + return PInvoke.spReflectionType_GetUserAttributeCount(type); + } + + public static Brutal.SlangApi.ReflectionUserAttribute ReflectionTypeGetUserAttribute( + ReflectionType type, + uint index + ) + { + return PInvoke.spReflectionType_GetUserAttribute(type, index); + } + + public static Brutal.SlangApi.ReflectionUserAttribute ReflectionTypeFindUserAttributeByName( + ReflectionType type, + RefString8 name + ) + { + return PInvoke.spReflectionType_FindUserAttributeByName(type, name); + } + + public static ReflectionType ReflectionTypeApplySpecializations(ReflectionType type, ReflectionGeneric generic) + { + return PInvoke.spReflectionType_applySpecializations(type, generic); + } + + public static uint ReflectionTypeGetFieldCount(ReflectionType type) + { + return PInvoke.spReflectionType_GetFieldCount(type); + } + + public static ReflectionVariable ReflectionTypeGetFieldByIndex(ReflectionType type, uint index) + { + return PInvoke.spReflectionType_GetFieldByIndex(type, index); + } + + public static ByteSize64 ReflectionTypeGetElementCount(ReflectionType type) + { + return PInvoke.spReflectionType_GetElementCount(type); + } + + public static ByteSize64 ReflectionTypeGetSpecializedElementCount(ReflectionType type, Reflection reflection) + { + return PInvoke.spReflectionType_GetSpecializedElementCount(type, reflection); + } + + public static ReflectionType ReflectionTypeGetElementType(ReflectionType type) + { + return PInvoke.spReflectionType_GetElementType(type); + } + + public static uint ReflectionTypeGetRowCount(ReflectionType type) + { + return PInvoke.spReflectionType_GetRowCount(type); + } + + public static uint ReflectionTypeGetColumnCount(ReflectionType type) + { + return PInvoke.spReflectionType_GetColumnCount(type); + } + + public static Brutal.SlangApi.ScalarType ReflectionTypeGetScalarType(ReflectionType type) + { + return PInvoke.spReflectionType_GetScalarType(type); + } + + public static Brutal.SlangApi.ResourceShape ReflectionTypeGetResourceShape(ReflectionType type) + { + return PInvoke.spReflectionType_GetResourceShape(type); + } + + public static Brutal.SlangApi.ResourceAccess ReflectionTypeGetResourceAccess(ReflectionType type) + { + return PInvoke.spReflectionType_GetResourceAccess(type); + } + + public static ReflectionType ReflectionTypeGetResourceResultType(ReflectionType type) + { + return PInvoke.spReflectionType_GetResourceResultType(type); + } + + public static string ReflectionTypeGetName(ReflectionType type) + { + return PInvoke.spReflectionType_GetName(type); + } + + internal static Result ReflectionTypeGetFullName(ReflectionType type, out nint outNameBlob) + { + return PInvoke.spReflectionType_GetFullName(type, out outNameBlob); + } + + public static ReflectionGeneric ReflectionTypeGetGenericContainer(ReflectionType type) + { + return PInvoke.spReflectionType_GetGenericContainer(type); + } + + public static ReflectionType ReflectionTypeLayoutGetType(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_GetType(type); + } + + public static Brutal.SlangApi.TypeKind ReflectionTypeLayoutGetKind(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_getKind(type); + } + + public static ByteSize64 ReflectionTypeLayoutGetSize( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ) + { + return PInvoke.spReflectionTypeLayout_GetSize(type, category); + } + + public static ByteSize64 ReflectionTypeLayoutGetStride( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ) + { + return PInvoke.spReflectionTypeLayout_GetStride(type, category); + } + + public static int ReflectionTypeLayoutGetAlignment( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ) + { + return PInvoke.spReflectionTypeLayout_getAlignment(type, category); + } + + public static uint ReflectionTypeLayoutGetFieldCount(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_GetFieldCount(type); + } + + public static ReflectionVariableLayout ReflectionTypeLayoutGetFieldByIndex( + ReflectionTypeLayout type, + uint index + ) + { + return PInvoke.spReflectionTypeLayout_GetFieldByIndex(type, index); + } + + public static Int ReflectionTypeLayoutFindFieldIndexByName( + ReflectionTypeLayout typeLayout, + RefString8 nameBegin, + RefString8 nameEnd + ) + { + return PInvoke.spReflectionTypeLayout_findFieldIndexByName(typeLayout, nameBegin, nameEnd); + } + + public static ReflectionVariableLayout ReflectionTypeLayoutGetExplicitCounter(ReflectionTypeLayout typeLayout) + { + return PInvoke.spReflectionTypeLayout_GetExplicitCounter(typeLayout); + } + + public static ByteSize64 ReflectionTypeLayoutGetElementStride( + ReflectionTypeLayout type, + Brutal.SlangApi.ParameterCategory category + ) + { + return PInvoke.spReflectionTypeLayout_GetElementStride(type, category); + } + + public static ReflectionTypeLayout ReflectionTypeLayoutGetElementTypeLayout(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_GetElementTypeLayout(type); + } + + public static ReflectionVariableLayout ReflectionTypeLayoutGetElementVarLayout(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_GetElementVarLayout(type); + } + + public static ReflectionVariableLayout ReflectionTypeLayoutGetContainerVarLayout(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_getContainerVarLayout(type); + } + + public static Brutal.SlangApi.ParameterCategory ReflectionTypeLayoutGetParameterCategory( + ReflectionTypeLayout type + ) + { + return PInvoke.spReflectionTypeLayout_GetParameterCategory(type); + } + + public static uint ReflectionTypeLayoutGetCategoryCount(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_GetCategoryCount(type); + } + + public static Brutal.SlangApi.ParameterCategory ReflectionTypeLayoutGetCategoryByIndex( + ReflectionTypeLayout type, + uint index + ) + { + return PInvoke.spReflectionTypeLayout_GetCategoryByIndex(type, index); + } + + public static Brutal.SlangApi.MatrixLayoutMode ReflectionTypeLayoutGetMatrixLayoutMode( + ReflectionTypeLayout type + ) + { + return PInvoke.spReflectionTypeLayout_GetMatrixLayoutMode(type); + } + + public static int ReflectionTypeLayoutGetGenericParamIndex(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_getGenericParamIndex(type); + } + + public static ReflectionTypeLayout ReflectionTypeLayoutGetPendingDataTypeLayout(ReflectionTypeLayout type) + { + return PInvoke.spReflectionTypeLayout_getPendingDataTypeLayout(type); + } + + public static ReflectionVariableLayout ReflectionTypeLayoutGetSpecializedTypePendingDataVarLayout( + ReflectionTypeLayout type + ) + { + return PInvoke.spReflectionTypeLayout_getSpecializedTypePendingDataVarLayout(type); + } + + public static Int ReflectionTypeGetSpecializedTypeArgCount(ReflectionType type) + { + return PInvoke.spReflectionType_getSpecializedTypeArgCount(type); + } + + public static ReflectionType ReflectionTypeGetSpecializedTypeArgType(ReflectionType type, Int index) + { + return PInvoke.spReflectionType_getSpecializedTypeArgType(type, index); + } + + public static Int ReflectionTypeLayoutGetBindingRangeCount(ReflectionTypeLayout typeLayout) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeCount(typeLayout); + } + + public static Brutal.SlangApi.BindingType ReflectionTypeLayoutGetBindingRangeType( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeType(typeLayout, index); + } + + public static Int ReflectionTypeLayoutIsBindingRangeSpecializable(ReflectionTypeLayout typeLayout, Int index) + { + return PInvoke.spReflectionTypeLayout_isBindingRangeSpecializable(typeLayout, index); + } + + public static Int ReflectionTypeLayoutGetBindingRangeBindingCount(ReflectionTypeLayout typeLayout, Int index) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeBindingCount(typeLayout, index); + } + + public static ReflectionTypeLayout ReflectionTypeLayoutGetBindingRangeLeafTypeLayout( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeLeafTypeLayout(typeLayout, index); + } + + public static ReflectionVariable ReflectionTypeLayoutGetBindingRangeLeafVariable( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeLeafVariable(typeLayout, index); + } + + public static Brutal.SlangApi.ImageFormat ReflectionTypeLayoutGetBindingRangeImageFormat( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeImageFormat(typeLayout, index); + } + + public static Int ReflectionTypeLayoutGetFieldBindingRangeOffset( + ReflectionTypeLayout typeLayout, + Int fieldIndex + ) + { + return PInvoke.spReflectionTypeLayout_getFieldBindingRangeOffset(typeLayout, fieldIndex); + } + + public static Int ReflectionTypeLayoutGetExplicitCounterBindingRangeOffset(ReflectionTypeLayout inTypeLayout) + { + return PInvoke.spReflectionTypeLayout_getExplicitCounterBindingRangeOffset(inTypeLayout); + } + + public static Int ReflectionTypeLayoutGetBindingRangeDescriptorSetIndex( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeDescriptorSetIndex(typeLayout, index); + } + + public static Int ReflectionTypeLayoutGetBindingRangeFirstDescriptorRangeIndex( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeFirstDescriptorRangeIndex(typeLayout, index); + } + + public static Int ReflectionTypeLayoutGetBindingRangeDescriptorRangeCount( + ReflectionTypeLayout typeLayout, + Int index + ) + { + return PInvoke.spReflectionTypeLayout_getBindingRangeDescriptorRangeCount(typeLayout, index); + } + + public static Int ReflectionTypeLayoutGetDescriptorSetCount(ReflectionTypeLayout typeLayout) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetCount(typeLayout); + } + + public static Int ReflectionTypeLayoutGetDescriptorSetSpaceOffset(ReflectionTypeLayout typeLayout, Int setIndex) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetSpaceOffset(typeLayout, setIndex); + } + + public static Int ReflectionTypeLayoutGetDescriptorSetDescriptorRangeCount( + ReflectionTypeLayout typeLayout, + Int setIndex + ) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeCount(typeLayout, setIndex); + } + + public static Int ReflectionTypeLayoutGetDescriptorSetDescriptorRangeIndexOffset( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeIndexOffset( + typeLayout, + setIndex, + rangeIndex + ); + } + + public static Int ReflectionTypeLayoutGetDescriptorSetDescriptorRangeDescriptorCount( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeDescriptorCount( + typeLayout, + setIndex, + rangeIndex + ); + } + + public static Brutal.SlangApi.BindingType ReflectionTypeLayoutGetDescriptorSetDescriptorRangeType( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeType(typeLayout, setIndex, rangeIndex); + } + + public static Brutal.SlangApi.ParameterCategory ReflectionTypeLayoutGetDescriptorSetDescriptorRangeCategory( + ReflectionTypeLayout typeLayout, + Int setIndex, + Int rangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeCategory( + typeLayout, + setIndex, + rangeIndex + ); + } + + public static Int ReflectionTypeLayoutGetSubObjectRangeCount(ReflectionTypeLayout typeLayout) + { + return PInvoke.spReflectionTypeLayout_getSubObjectRangeCount(typeLayout); + } + + public static Int ReflectionTypeLayoutGetSubObjectRangeBindingRangeIndex( + ReflectionTypeLayout typeLayout, + Int subObjectRangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getSubObjectRangeBindingRangeIndex(typeLayout, subObjectRangeIndex); + } + + public static Int ReflectionTypeLayoutGetSubObjectRangeSpaceOffset( + ReflectionTypeLayout typeLayout, + Int subObjectRangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getSubObjectRangeSpaceOffset(typeLayout, subObjectRangeIndex); + } + + public static ReflectionVariableLayout ReflectionTypeLayoutGetSubObjectRangeOffset( + ReflectionTypeLayout typeLayout, + Int subObjectRangeIndex + ) + { + return PInvoke.spReflectionTypeLayout_getSubObjectRangeOffset(typeLayout, subObjectRangeIndex); + } + + public static string ReflectionVariableGetName(ReflectionVariable var) + { + return PInvoke.spReflectionVariable_GetName(var); + } + + public static ReflectionType ReflectionVariableGetType(ReflectionVariable var) + { + return PInvoke.spReflectionVariable_GetType(var); + } + + public static Brutal.SlangApi.ReflectionModifier ReflectionVariableFindModifier( + ReflectionVariable var, + Brutal.SlangApi.ModifierID modifierID + ) + { + return PInvoke.spReflectionVariable_FindModifier(var, modifierID); + } + + public static uint ReflectionVariableGetUserAttributeCount(ReflectionVariable var) + { + return PInvoke.spReflectionVariable_GetUserAttributeCount(var); + } + + public static Brutal.SlangApi.ReflectionUserAttribute ReflectionVariableGetUserAttribute( + ReflectionVariable var, + uint index + ) + { + return PInvoke.spReflectionVariable_GetUserAttribute(var, index); + } + + internal static Brutal.SlangApi.ReflectionUserAttribute ReflectionVariableFindUserAttributeByName( + ReflectionVariable var, + nint globalSession, + RefString8 name + ) + { + return PInvoke.spReflectionVariable_FindUserAttributeByName(var, globalSession, name); + } + + public static Brutal.Bool8 ReflectionVariableHasDefaultValue(ReflectionVariable inVar) + { + return PInvoke.spReflectionVariable_HasDefaultValue(inVar); + } + + public static unsafe Result ReflectionVariableGetDefaultValueInt(ReflectionVariable inVar, long* rs) + { + return PInvoke.spReflectionVariable_GetDefaultValueInt(inVar, rs); + } + + public static unsafe Result ReflectionVariableGetDefaultValueFloat(ReflectionVariable inVar, float* rs) + { + return PInvoke.spReflectionVariable_GetDefaultValueFloat(inVar, rs); + } + + public static ReflectionGeneric ReflectionVariableGetGenericContainer(ReflectionVariable var) + { + return PInvoke.spReflectionVariable_GetGenericContainer(var); + } + + public static ReflectionVariable ReflectionVariableApplySpecializations( + ReflectionVariable var, + ReflectionGeneric generic + ) + { + return PInvoke.spReflectionVariable_applySpecializations(var, generic); + } + + public static ReflectionDecl ReflectionFunctionAsDecl(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_asDecl(func); + } + + public static string ReflectionFunctionGetName(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_GetName(func); + } + + public static Brutal.SlangApi.ReflectionModifier ReflectionFunctionFindModifier( + ReflectionFunction var, + Brutal.SlangApi.ModifierID modifierID + ) + { + return PInvoke.spReflectionFunction_FindModifier(var, modifierID); + } + + public static uint ReflectionFunctionGetUserAttributeCount(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_GetUserAttributeCount(func); + } + + public static Brutal.SlangApi.ReflectionUserAttribute ReflectionFunctionGetUserAttribute( + ReflectionFunction func, + uint index + ) + { + return PInvoke.spReflectionFunction_GetUserAttribute(func, index); + } + + internal static Brutal.SlangApi.ReflectionUserAttribute ReflectionFunctionFindUserAttributeByName( + ReflectionFunction func, + nint globalSession, + RefString8 name + ) + { + return PInvoke.spReflectionFunction_FindUserAttributeByName(func, globalSession, name); + } + + public static uint ReflectionFunctionGetParameterCount(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_GetParameterCount(func); + } + + public static ReflectionVariable ReflectionFunctionGetParameter(ReflectionFunction func, uint index) + { + return PInvoke.spReflectionFunction_GetParameter(func, index); + } + + public static ReflectionType ReflectionFunctionGetResultType(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_GetResultType(func); + } + + public static ReflectionGeneric ReflectionFunctionGetGenericContainer(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_GetGenericContainer(func); + } + + public static ReflectionFunction ReflectionFunctionApplySpecializations( + ReflectionFunction func, + ReflectionGeneric generic + ) + { + return PInvoke.spReflectionFunction_applySpecializations(func, generic); + } + + public static ReflectionFunction ReflectionFunctionSpecializeWithArgTypes( + ReflectionFunction func, + Int argTypeCount, + in ReflectionType argTypes + ) + { + return PInvoke.spReflectionFunction_specializeWithArgTypes(func, argTypeCount, in argTypes); + } + + public static Brutal.Bool8 ReflectionFunctionIsOverloaded(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_isOverloaded(func); + } + + public static uint ReflectionFunctionGetOverloadCount(ReflectionFunction func) + { + return PInvoke.spReflectionFunction_getOverloadCount(func); + } + + public static ReflectionFunction ReflectionFunctionGetOverload(ReflectionFunction func, uint index) + { + return PInvoke.spReflectionFunction_getOverload(func, index); + } + + public static uint ReflectionDeclGetChildrenCount(ReflectionDecl parentDecl) + { + return PInvoke.spReflectionDecl_getChildrenCount(parentDecl); + } + + public static ReflectionDecl ReflectionDeclGetChild(ReflectionDecl parentDecl, uint index) + { + return PInvoke.spReflectionDecl_getChild(parentDecl, index); + } + + public static string ReflectionDeclGetName(ReflectionDecl decl) + { + return PInvoke.spReflectionDecl_getName(decl); + } + + public static Brutal.SlangApi.DeclKind ReflectionDeclGetKind(ReflectionDecl decl) + { + return PInvoke.spReflectionDecl_getKind(decl); + } + + public static ReflectionFunction ReflectionDeclCastToFunction(ReflectionDecl decl) + { + return PInvoke.spReflectionDecl_castToFunction(decl); + } + + public static ReflectionVariable ReflectionDeclCastToVariable(ReflectionDecl decl) + { + return PInvoke.spReflectionDecl_castToVariable(decl); + } + + public static ReflectionGeneric ReflectionDeclCastToGeneric(ReflectionDecl decl) + { + return PInvoke.spReflectionDecl_castToGeneric(decl); + } + + public static ReflectionType ReflectionGetTypeFromDecl(ReflectionDecl decl) + { + return PInvoke.spReflection_getTypeFromDecl(decl); + } + + public static ReflectionDecl ReflectionDeclGetParent(ReflectionDecl decl) + { + return PInvoke.spReflectionDecl_getParent(decl); + } + + public static Brutal.SlangApi.ReflectionModifier ReflectionDeclFindModifier( + ReflectionDecl decl, + Brutal.SlangApi.ModifierID modifierID + ) + { + return PInvoke.spReflectionDecl_findModifier(decl, modifierID); + } + + public static ReflectionDecl ReflectionGenericAsDecl(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_asDecl(generic); + } + + public static string ReflectionGenericGetName(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_GetName(generic); + } + + public static uint ReflectionGenericGetTypeParameterCount(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_GetTypeParameterCount(generic); + } + + public static ReflectionVariable ReflectionGenericGetTypeParameter(ReflectionGeneric generic, uint index) + { + return PInvoke.spReflectionGeneric_GetTypeParameter(generic, index); + } + + public static uint ReflectionGenericGetValueParameterCount(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_GetValueParameterCount(generic); + } + + public static ReflectionVariable ReflectionGenericGetValueParameter(ReflectionGeneric generic, uint index) + { + return PInvoke.spReflectionGeneric_GetValueParameter(generic, index); + } + + public static uint ReflectionGenericGetTypeParameterConstraintCount( + ReflectionGeneric generic, + ReflectionVariable typeParam + ) + { + return PInvoke.spReflectionGeneric_GetTypeParameterConstraintCount(generic, typeParam); + } + + public static ReflectionType ReflectionGenericGetTypeParameterConstraintType( + ReflectionGeneric generic, + ReflectionVariable typeParam, + uint index + ) + { + return PInvoke.spReflectionGeneric_GetTypeParameterConstraintType(generic, typeParam, index); + } + + public static Brutal.SlangApi.DeclKind ReflectionGenericGetInnerKind(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_GetInnerKind(generic); + } + + public static ReflectionDecl ReflectionGenericGetInnerDecl(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_GetInnerDecl(generic); + } + + public static ReflectionGeneric ReflectionGenericGetOuterGenericContainer(ReflectionGeneric generic) + { + return PInvoke.spReflectionGeneric_GetOuterGenericContainer(generic); + } + + public static ReflectionType ReflectionGenericGetConcreteType( + ReflectionGeneric generic, + ReflectionVariable typeParam + ) + { + return PInvoke.spReflectionGeneric_GetConcreteType(generic, typeParam); + } + + public static long ReflectionGenericGetConcreteIntVal(ReflectionGeneric generic, ReflectionVariable valueParam) + { + return PInvoke.spReflectionGeneric_GetConcreteIntVal(generic, valueParam); + } + + public static ReflectionGeneric ReflectionGenericApplySpecializations( + ReflectionGeneric currGeneric, + ReflectionGeneric generic + ) + { + return PInvoke.spReflectionGeneric_applySpecializations(currGeneric, generic); + } + + public static string ReflectionTypeParameterGetName(ReflectionTypeParameter typeParam) + { + return PInvoke.spReflectionTypeParameter_GetName(typeParam); + } + + public static uint ReflectionTypeParameterGetIndex(ReflectionTypeParameter typeParam) + { + return PInvoke.spReflectionTypeParameter_GetIndex(typeParam); + } + + public static uint ReflectionTypeParameterGetConstraintCount(ReflectionTypeParameter typeParam) + { + return PInvoke.spReflectionTypeParameter_GetConstraintCount(typeParam); + } + + public static ReflectionType ReflectionTypeParameterGetConstraintByIndex( + ReflectionTypeParameter typeParam, + uint index + ) + { + return PInvoke.spReflectionTypeParameter_GetConstraintByIndex(typeParam, index); + } + + public static UInt32 ComputeStringHash(RefString8 chars, ByteSize64 count) + { + return PInvoke.spComputeStringHash(chars, count); + } + + internal static unsafe nint CreateBlob(void* data, ByteSize64 size) + { + return PInvoke.slang_createBlob(data, size); + } + + internal static nint LoadModuleFromSource( + nint session, + RefString8 moduleName, + RefString8 path, + RefString8 source, + ByteSize64 sourceSize, + out nint outDiagnostics + ) + { + return PInvoke.slang_loadModuleFromSource( + session, + moduleName, + path, + source, + sourceSize, + out outDiagnostics + ); + } + + internal static unsafe nint LoadModuleFromIRBlob( + nint session, + RefString8 moduleName, + RefString8 path, + void* source, + ByteSize64 sourceSize, + out nint outDiagnostics + ) + { + return PInvoke.slang_loadModuleFromIRBlob( + session, + moduleName, + path, + source, + sourceSize, + out outDiagnostics + ); + } + + internal static unsafe Result LoadModuleInfoFromIRBlob( + nint session, + void* source, + ByteSize64 sourceSize, + ref Int outModuleVersion, + ref byte* outModuleCompilerVersion, + ref byte* outModuleName + ) + { + return PInvoke.slang_loadModuleInfoFromIRBlob( + session, + source, + sourceSize, + ref outModuleVersion, + ref outModuleCompilerVersion, + ref outModuleName + ); + } + + internal static Result CreateGlobalSession(Int apiVersion, out nint outGlobalSession) + { + return PInvoke.slang_createGlobalSession(apiVersion, out outGlobalSession); + } + + internal static Result CreateGlobalSession2( + in Brutal.SlangApi.GlobalSessionDesc desc, + out nint outGlobalSession + ) + { + return PInvoke.slang_createGlobalSession2(in desc, out outGlobalSession); + } + + internal static Result CreateGlobalSessionWithoutCoreModule(Int apiVersion, out nint outGlobalSession) + { + return PInvoke.slang_createGlobalSessionWithoutCoreModule(apiVersion, out outGlobalSession); + } + + internal static nint GetEmbeddedCoreModule() + { + return PInvoke.slang_getEmbeddedCoreModule(); + } + + public static void Shutdown() + { + PInvoke.slang_shutdown(); + } + + public static void EnableRecordLayer(Brutal.Bool8 enable) + { + PInvoke.slang_enableRecordLayer(enable); + } + + public static Brutal.Bool8 IsRecordLayerEnabled() + { + return PInvoke.slang_isRecordLayerEnabled(); + } + + public static void SetReplayDirectory(RefString8 path) + { + PInvoke.slang_setReplayDirectory(path); + } + + public static string GetReplayDirectory() + { + return PInvoke.slang_getReplayDirectory(); + } + + public static string GetCurrentReplayPath() + { + return PInvoke.slang_getCurrentReplayPath(); + } + + public static Result LoadReplay(RefString8 folderPath) + { + return PInvoke.slang_loadReplay(folderPath); + } + + public static Result LoadLatestReplay() + { + return PInvoke.slang_loadLatestReplay(); + } + + public static void ReplayMarker(RefString8 label) + { + PInvoke.slang_replayMarker(label); + } + + public static string GetLastInternalErrorMessage() + { + return PInvoke.slang_getLastInternalErrorMessage(); + } + + internal static Result CreateByteCodeRunner( + in Brutal.SlangApi.ByteCodeRunnerDesc desc, + out nint outByteCodeRunner + ) + { + return PInvoke.slang_createByteCodeRunner(in desc, out outByteCodeRunner); + } + + internal static Result DisassembleByteCode(nint moduleBlob, out nint outDisassemblyBlob) + { + return PInvoke.slang_disassembleByteCode(moduleBlob, out outDisassemblyBlob); + } + }; +} diff --git a/Brutal.Slang/Generated/Structs.gen.cs b/Brutal.Slang/Generated/Structs.gen.cs new file mode 100644 index 0000000..574d021 --- /dev/null +++ b/Brutal.Slang/Generated/Structs.gen.cs @@ -0,0 +1,1455 @@ +using Brutal.Interop; +using Brutal.Strings; + +namespace Brutal.SlangApi +{ + public unsafe partial struct CompilerOptionValue + { + public Brutal.SlangApi.CompilerOptionValueKind Kind; + public int IntValue0; + public int IntValue1; + public byte* StringValue0; + public byte* StringValue1; + }; + + public unsafe partial struct CompilerOptionEntry + { + public Brutal.SlangApi.CompilerOptionName Name; + public Brutal.SlangApi.CompilerOptionValue Value; + }; + + /// @brief A request for one or more compilation actions to be performed. + [InteropHandle] + public readonly unsafe partial struct ICompileRequest : IDisposable + { + public void Dispose() + { + Slang.PInvoke.spDestroyCompileRequest(this); + } + + internal void SetFileSystem(nint fileSystem) + { + Slang.PInvoke.spSetFileSystem(this, fileSystem); + } + + public void SetCompileFlags(CompileFlags flags) + { + Slang.PInvoke.spSetCompileFlags(this, flags); + } + + public CompileFlags GetCompileFlags() + { + return Slang.PInvoke.spGetCompileFlags(this); + } + + public void SetDumpIntermediates(int enable) + { + Slang.PInvoke.spSetDumpIntermediates(this, enable); + } + + public void SetDumpIntermediatePrefix(RefString8 prefix) + { + Slang.PInvoke.spSetDumpIntermediatePrefix(this, prefix); + } + + public void SetLineDirectiveMode(Brutal.SlangApi.LineDirectiveMode mode) + { + Slang.PInvoke.spSetLineDirectiveMode(this, mode); + } + + public void SetTargetLineDirectiveMode(int targetIndex, Brutal.SlangApi.LineDirectiveMode mode) + { + Slang.PInvoke.spSetTargetLineDirectiveMode(this, targetIndex, mode); + } + + public void SetTargetForceGlslScalarBufferLayout(int targetIndex, Brutal.Bool8 forceScalarLayout) + { + Slang.PInvoke.spSetTargetForceGLSLScalarBufferLayout(this, targetIndex, forceScalarLayout); + } + + public void SetTargetUseMinimumSlangOptimization(int targetIndex, Brutal.Bool8 val) + { + Slang.PInvoke.spSetTargetUseMinimumSlangOptimization(this, targetIndex, val); + } + + public void SetIgnoreCapabilityCheck(Brutal.Bool8 val) + { + Slang.PInvoke.spSetIgnoreCapabilityCheck(this, val); + } + + public void SetCodeGenTarget(Brutal.SlangApi.CompileTarget target) + { + Slang.PInvoke.spSetCodeGenTarget(this, target); + } + + public int AddCodeGenTarget(Brutal.SlangApi.CompileTarget target) + { + return Slang.PInvoke.spAddCodeGenTarget(this, target); + } + + public void SetTargetProfile(int targetIndex, Brutal.SlangApi.ProfileID profile) + { + Slang.PInvoke.spSetTargetProfile(this, targetIndex, profile); + } + + public void SetTargetFlags(int targetIndex, TargetFlags flags) + { + Slang.PInvoke.spSetTargetFlags(this, targetIndex, flags); + } + + public void SetTargetFloatingPointMode(int targetIndex, Brutal.SlangApi.FloatingPointMode mode) + { + Slang.PInvoke.spSetTargetFloatingPointMode(this, targetIndex, mode); + } + + public void AddTargetCapability(int targetIndex, Brutal.SlangApi.CapabilityID capability) + { + Slang.PInvoke.spAddTargetCapability(this, targetIndex, capability); + } + + public void SetTargetMatrixLayoutMode(int targetIndex, Brutal.SlangApi.MatrixLayoutMode mode) + { + Slang.PInvoke.spSetTargetMatrixLayoutMode(this, targetIndex, mode); + } + + public void SetMatrixLayoutMode(Brutal.SlangApi.MatrixLayoutMode mode) + { + Slang.PInvoke.spSetMatrixLayoutMode(this, mode); + } + + public void SetDebugInfoLevel(Brutal.SlangApi.DebugInfoLevel level) + { + Slang.PInvoke.spSetDebugInfoLevel(this, level); + } + + public void SetDebugInfoFormat(Brutal.SlangApi.DebugInfoFormat format) + { + Slang.PInvoke.spSetDebugInfoFormat(this, format); + } + + public void SetOptimizationLevel(Brutal.SlangApi.OptimizationLevel level) + { + Slang.PInvoke.spSetOptimizationLevel(this, level); + } + + public void SetOutputContainerFormat(Brutal.SlangApi.ContainerFormat format) + { + Slang.PInvoke.spSetOutputContainerFormat(this, format); + } + + public void SetPassThrough(Brutal.SlangApi.PassThrough passThrough) + { + Slang.PInvoke.spSetPassThrough(this, passThrough); + } + + public unsafe void SetDiagnosticCallback(DiagnosticCallback callback, void* userData) + { + Slang.PInvoke.spSetDiagnosticCallback(this, callback, userData); + } + + internal void SetWriter(Brutal.SlangApi.WriterChannel channel, nint writer) + { + Slang.PInvoke.spSetWriter(this, channel, writer); + } + + internal nint GetWriter(Brutal.SlangApi.WriterChannel channel) + { + return Slang.PInvoke.spGetWriter(this, channel); + } + + public void AddSearchPath(RefString8 searchDir) + { + Slang.PInvoke.spAddSearchPath(this, searchDir); + } + + public void AddPreprocessorDefine(RefString8 key, RefString8 value) + { + Slang.PInvoke.spAddPreprocessorDefine(this, key, value); + } + + public unsafe Result ProcessCommandLineArguments(byte** args, int argCount) + { + return Slang.PInvoke.spProcessCommandLineArguments(this, args, argCount); + } + + public int AddTranslationUnit(Brutal.SlangApi.SourceLanguage language, RefString8 name) + { + return Slang.PInvoke.spAddTranslationUnit(this, language, name); + } + + public void SetDefaultModuleName(RefString8 defaultModuleName) + { + Slang.PInvoke.spSetDefaultModuleName(this, defaultModuleName); + } + + public void TranslationUnitAddPreprocessorDefine(int translationUnitIndex, RefString8 key, RefString8 value) + { + Slang.PInvoke.spTranslationUnit_addPreprocessorDefine(this, translationUnitIndex, key, value); + } + + public void AddTranslationUnitSourceFile(int translationUnitIndex, RefString8 path) + { + Slang.PInvoke.spAddTranslationUnitSourceFile(this, translationUnitIndex, path); + } + + public void AddTranslationUnitSourceString(int translationUnitIndex, RefString8 path, RefString8 source) + { + Slang.PInvoke.spAddTranslationUnitSourceString(this, translationUnitIndex, path, source); + } + + public unsafe Result AddLibraryReference(RefString8 basePath, void* libData, ByteSize64 libDataSize) + { + return Slang.PInvoke.spAddLibraryReference(this, basePath, libData, libDataSize); + } + + public void AddTranslationUnitSourceStringSpan( + int translationUnitIndex, + RefString8 path, + RefString8 sourceBegin, + RefString8 sourceEnd + ) + { + Slang.PInvoke.spAddTranslationUnitSourceStringSpan( + this, + translationUnitIndex, + path, + sourceBegin, + sourceEnd + ); + } + + internal void AddTranslationUnitSourceBlob(int translationUnitIndex, RefString8 path, nint sourceBlob) + { + Slang.PInvoke.spAddTranslationUnitSourceBlob(this, translationUnitIndex, path, sourceBlob); + } + + public int AddEntryPoint(int translationUnitIndex, RefString8 name, Brutal.SlangApi.Stage stage) + { + return Slang.PInvoke.spAddEntryPoint(this, translationUnitIndex, name, stage); + } + + public unsafe int AddEntryPointEx( + int translationUnitIndex, + RefString8 name, + Brutal.SlangApi.Stage stage, + int genericArgCount, + byte** genericArgs + ) + { + return Slang.PInvoke.spAddEntryPointEx( + this, + translationUnitIndex, + name, + stage, + genericArgCount, + genericArgs + ); + } + + public unsafe Result SetGlobalGenericArgs(int genericArgCount, byte** genericArgs) + { + return Slang.PInvoke.spSetGlobalGenericArgs(this, genericArgCount, genericArgs); + } + + public Result SetTypeNameForGlobalExistentialTypeParam(int slotIndex, RefString8 typeName) + { + return Slang.PInvoke.spSetTypeNameForGlobalExistentialTypeParam(this, slotIndex, typeName); + } + + public Result SetTypeNameForEntryPointExistentialTypeParam( + int entryPointIndex, + int slotIndex, + RefString8 typeName + ) + { + return Slang.PInvoke.spSetTypeNameForEntryPointExistentialTypeParam( + this, + entryPointIndex, + slotIndex, + typeName + ); + } + + public Result Compile() + { + return Slang.PInvoke.spCompile(this); + } + + public string GetDiagnosticOutput() + { + return Slang.PInvoke.spGetDiagnosticOutput(this); + } + + internal Result GetDiagnosticOutputBlob(out nint outBlob) + { + return Slang.PInvoke.spGetDiagnosticOutputBlob(this, out outBlob); + } + + public int GetDependencyFileCount() + { + return Slang.PInvoke.spGetDependencyFileCount(this); + } + + public string GetDependencyFilePath(int index) + { + return Slang.PInvoke.spGetDependencyFilePath(this, index); + } + + public int GetTranslationUnitCount() + { + return Slang.PInvoke.spGetTranslationUnitCount(this); + } + + public string GetEntryPointSource(int entryPointIndex) + { + return Slang.PInvoke.spGetEntryPointSource(this, entryPointIndex); + } + + public unsafe void* GetEntryPointCode(int entryPointIndex, out ByteSize64 outSize) + { + return Slang.PInvoke.spGetEntryPointCode(this, entryPointIndex, out outSize); + } + + internal Result GetEntryPointCodeBlob(int entryPointIndex, int targetIndex, out nint outBlob) + { + return Slang.PInvoke.spGetEntryPointCodeBlob(this, entryPointIndex, targetIndex, out outBlob); + } + + internal Result GetEntryPointHostCallable(int entryPointIndex, int targetIndex, out nint outSharedLibrary) + { + return Slang.PInvoke.spGetEntryPointHostCallable(this, entryPointIndex, targetIndex, out outSharedLibrary); + } + + internal Result GetTargetCodeBlob(int targetIndex, out nint outBlob) + { + return Slang.PInvoke.spGetTargetCodeBlob(this, targetIndex, out outBlob); + } + + internal Result GetTargetHostCallable(int targetIndex, out nint outSharedLibrary) + { + return Slang.PInvoke.spGetTargetHostCallable(this, targetIndex, out outSharedLibrary); + } + + public unsafe void* GetCompileRequestCode(out ByteSize64 outSize) + { + return Slang.PInvoke.spGetCompileRequestCode(this, out outSize); + } + + internal Result GetContainerCode(out nint outBlob) + { + return Slang.PInvoke.spGetContainerCode(this, out outBlob); + } + + internal unsafe Result LoadRepro(nint fileSystem, void* data, ByteSize64 size) + { + return Slang.PInvoke.spLoadRepro(this, fileSystem, data, size); + } + + internal Result SaveRepro(out nint outBlob) + { + return Slang.PInvoke.spSaveRepro(this, out outBlob); + } + + public Result EnableReproCapture() + { + return Slang.PInvoke.spEnableReproCapture(this); + } + + internal unsafe Result GetCompileTimeProfile(nint* compileTimeProfile, Brutal.Bool8 shouldClear) + { + return Slang.PInvoke.spGetCompileTimeProfile(this, compileTimeProfile, shouldClear); + } + + public void OverrideDiagnosticSeverity(Int messageID, Brutal.SlangApi.Severity overrideSeverity) + { + Slang.PInvoke.spOverrideDiagnosticSeverity(this, messageID, overrideSeverity); + } + + public DiagnosticFlags GetDiagnosticFlags() + { + return Slang.PInvoke.spGetDiagnosticFlags(this); + } + + public void SetDiagnosticFlags(DiagnosticFlags flags) + { + Slang.PInvoke.spSetDiagnosticFlags(this, flags); + } + + public Reflection GetReflection() + { + return Slang.PInvoke.spGetReflection(this); + } + + public Result IsParameterLocationUsed( + Int entryPointIndex, + Int targetIndex, + Brutal.SlangApi.ParameterCategory category, + UInt spaceIndex, + UInt registerIndex, + ref Brutal.Bool8 outUsed + ) + { + return Slang.PInvoke.spIsParameterLocationUsed( + this, + entryPointIndex, + targetIndex, + category, + spaceIndex, + registerIndex, + ref outUsed + ); + } + + public string GetTranslationUnitSource(int translationUnitIndex) + { + return Slang.PInvoke.spGetTranslationUnitSource(this, translationUnitIndex); + } + + internal Result GetProgram(out nint outProgram) + { + return Slang.PInvoke.spCompileRequest_getProgram(this, out outProgram); + } + + internal Result GetProgramWithEntryPoints(out nint outProgram) + { + return Slang.PInvoke.spCompileRequest_getProgramWithEntryPoints(this, out outProgram); + } + + internal Result GetEntryPoint(Int entryPointIndex, out nint outEntryPoint) + { + return Slang.PInvoke.spCompileRequest_getEntryPoint(this, entryPointIndex, out outEntryPoint); + } + + internal Result GetModule(Int translationUnitIndex, out nint outModule) + { + return Slang.PInvoke.spCompileRequest_getModule(this, translationUnitIndex, out outModule); + } + + internal Result GetSession(out nint outSession) + { + return Slang.PInvoke.spCompileRequest_getSession(this, out outSession); + } + }; + + [InteropHandle] + public readonly unsafe partial struct BufferReflection { }; + + [InteropHandle] + public readonly unsafe partial struct DeclReflection + { + public enum Kind + { + Unsupported = (int)DeclKind.UnsupportedForReflection, + Struct = (int)DeclKind.Struct, + Func = (int)DeclKind.Func, + Module = (int)DeclKind.Module, + Generic = (int)DeclKind.Generic, + Variable = (int)DeclKind.Variable, + Namespace = (int)DeclKind.Namespace, + Enum = (int)DeclKind.Enum, + } + + public uint GetChildrenCount() + { + return Slang.PInvoke.spReflectionDecl_getChildrenCount(this); + } + + public ReflectionDecl GetChild(uint index) + { + return Slang.PInvoke.spReflectionDecl_getChild(this, index); + } + + public string GetName() + { + return Slang.PInvoke.spReflectionDecl_getName(this); + } + + public Brutal.SlangApi.DeclKind GetKind() + { + return Slang.PInvoke.spReflectionDecl_getKind(this); + } + + public ReflectionFunction CastToFunction() + { + return Slang.PInvoke.spReflectionDecl_castToFunction(this); + } + + public ReflectionVariable CastToVariable() + { + return Slang.PInvoke.spReflectionDecl_castToVariable(this); + } + + public ReflectionGeneric CastToGeneric() + { + return Slang.PInvoke.spReflectionDecl_castToGeneric(this); + } + + public ReflectionType ReflectionGetTypeFromDecl() + { + return Slang.PInvoke.spReflection_getTypeFromDecl(this); + } + + public ReflectionDecl GetParent() + { + return Slang.PInvoke.spReflectionDecl_getParent(this); + } + + public Brutal.SlangApi.ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID) + { + return Slang.PInvoke.spReflectionDecl_findModifier(this, modifierID); + } + }; + + [InteropHandle] + public readonly unsafe partial struct TypeLayoutReflection + { + public new ReflectionType GetType() + { + return Slang.PInvoke.spReflectionTypeLayout_GetType(this); + } + + public Brutal.SlangApi.TypeKind GetKind() + { + return Slang.PInvoke.spReflectionTypeLayout_getKind(this); + } + + public ByteSize64 GetSize(Brutal.SlangApi.ParameterCategory category) + { + return Slang.PInvoke.spReflectionTypeLayout_GetSize(this, category); + } + + public ByteSize64 GetStride(Brutal.SlangApi.ParameterCategory category) + { + return Slang.PInvoke.spReflectionTypeLayout_GetStride(this, category); + } + + public int GetAlignment(Brutal.SlangApi.ParameterCategory category) + { + return Slang.PInvoke.spReflectionTypeLayout_getAlignment(this, category); + } + + public uint GetFieldCount() + { + return Slang.PInvoke.spReflectionTypeLayout_GetFieldCount(this); + } + + public ReflectionVariableLayout GetFieldByIndex(uint index) + { + return Slang.PInvoke.spReflectionTypeLayout_GetFieldByIndex(this, index); + } + + public Int FindFieldIndexByName(RefString8 nameBegin, RefString8 nameEnd) + { + return Slang.PInvoke.spReflectionTypeLayout_findFieldIndexByName(this, nameBegin, nameEnd); + } + + public ReflectionVariableLayout GetExplicitCounter() + { + return Slang.PInvoke.spReflectionTypeLayout_GetExplicitCounter(this); + } + + public ByteSize64 GetElementStride(Brutal.SlangApi.ParameterCategory category) + { + return Slang.PInvoke.spReflectionTypeLayout_GetElementStride(this, category); + } + + public ReflectionTypeLayout GetElementTypeLayout() + { + return Slang.PInvoke.spReflectionTypeLayout_GetElementTypeLayout(this); + } + + public ReflectionVariableLayout GetElementVarLayout() + { + return Slang.PInvoke.spReflectionTypeLayout_GetElementVarLayout(this); + } + + public ReflectionVariableLayout GetContainerVarLayout() + { + return Slang.PInvoke.spReflectionTypeLayout_getContainerVarLayout(this); + } + + public Brutal.SlangApi.ParameterCategory GetParameterCategory() + { + return Slang.PInvoke.spReflectionTypeLayout_GetParameterCategory(this); + } + + public uint GetCategoryCount() + { + return Slang.PInvoke.spReflectionTypeLayout_GetCategoryCount(this); + } + + public Brutal.SlangApi.ParameterCategory GetCategoryByIndex(uint index) + { + return Slang.PInvoke.spReflectionTypeLayout_GetCategoryByIndex(this, index); + } + + public Brutal.SlangApi.MatrixLayoutMode GetMatrixLayoutMode() + { + return Slang.PInvoke.spReflectionTypeLayout_GetMatrixLayoutMode(this); + } + + public int GetGenericParamIndex() + { + return Slang.PInvoke.spReflectionTypeLayout_getGenericParamIndex(this); + } + + public ReflectionTypeLayout GetPendingDataTypeLayout() + { + return Slang.PInvoke.spReflectionTypeLayout_getPendingDataTypeLayout(this); + } + + public ReflectionVariableLayout GetSpecializedTypePendingDataVarLayout() + { + return Slang.PInvoke.spReflectionTypeLayout_getSpecializedTypePendingDataVarLayout(this); + } + + public Int GetBindingRangeCount() + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeCount(this); + } + + public Brutal.SlangApi.BindingType GetBindingRangeType(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeType(this, index); + } + + public Int IsBindingRangeSpecializable(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_isBindingRangeSpecializable(this, index); + } + + public Int GetBindingRangeBindingCount(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeBindingCount(this, index); + } + + public ReflectionTypeLayout GetBindingRangeLeafTypeLayout(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeLeafTypeLayout(this, index); + } + + public ReflectionVariable GetBindingRangeLeafVariable(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeLeafVariable(this, index); + } + + public Brutal.SlangApi.ImageFormat GetBindingRangeImageFormat(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeImageFormat(this, index); + } + + public Int GetFieldBindingRangeOffset(Int fieldIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getFieldBindingRangeOffset(this, fieldIndex); + } + + public Int GetExplicitCounterBindingRangeOffset() + { + return Slang.PInvoke.spReflectionTypeLayout_getExplicitCounterBindingRangeOffset(this); + } + + public Int GetBindingRangeDescriptorSetIndex(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeDescriptorSetIndex(this, index); + } + + public Int GetBindingRangeFirstDescriptorRangeIndex(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeFirstDescriptorRangeIndex(this, index); + } + + public Int GetBindingRangeDescriptorRangeCount(Int index) + { + return Slang.PInvoke.spReflectionTypeLayout_getBindingRangeDescriptorRangeCount(this, index); + } + + public Int GetDescriptorSetCount() + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetCount(this); + } + + public Int GetDescriptorSetSpaceOffset(Int setIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetSpaceOffset(this, setIndex); + } + + public Int GetDescriptorSetDescriptorRangeCount(Int setIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeCount(this, setIndex); + } + + public Int GetDescriptorSetDescriptorRangeIndexOffset(Int setIndex, Int rangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeIndexOffset( + this, + setIndex, + rangeIndex + ); + } + + public Int GetDescriptorSetDescriptorRangeDescriptorCount(Int setIndex, Int rangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeDescriptorCount( + this, + setIndex, + rangeIndex + ); + } + + public Brutal.SlangApi.BindingType GetDescriptorSetDescriptorRangeType(Int setIndex, Int rangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeType(this, setIndex, rangeIndex); + } + + public Brutal.SlangApi.ParameterCategory GetDescriptorSetDescriptorRangeCategory(Int setIndex, Int rangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getDescriptorSetDescriptorRangeCategory( + this, + setIndex, + rangeIndex + ); + } + + public Int GetSubObjectRangeCount() + { + return Slang.PInvoke.spReflectionTypeLayout_getSubObjectRangeCount(this); + } + + public Int GetSubObjectRangeBindingRangeIndex(Int subObjectRangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getSubObjectRangeBindingRangeIndex(this, subObjectRangeIndex); + } + + public Int GetSubObjectRangeSpaceOffset(Int subObjectRangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getSubObjectRangeSpaceOffset(this, subObjectRangeIndex); + } + + public ReflectionVariableLayout GetSubObjectRangeOffset(Int subObjectRangeIndex) + { + return Slang.PInvoke.spReflectionTypeLayout_getSubObjectRangeOffset(this, subObjectRangeIndex); + } + }; + + [InteropHandle] + public readonly unsafe partial struct TypeReflection + { + public enum Kind + { + None = (int)TypeKind.None, + Struct = (int)TypeKind.Struct, + Array = (int)TypeKind.Array, + Matrix = (int)TypeKind.Matrix, + Vector = (int)TypeKind.Vector, + Scalar = (int)TypeKind.Scalar, + ConstantBuffer = (int)TypeKind.ConstantBuffer, + Resource = (int)TypeKind.Resource, + SamplerState = (int)TypeKind.SamplerState, + TextureBuffer = (int)TypeKind.TextureBuffer, + ShaderStorageBuffer = (int)TypeKind.ShaderStorageBuffer, + ParameterBlock = (int)TypeKind.ParameterBlock, + GenericTypeParameter = (int)TypeKind.GenericTypeParameter, + Interface = (int)TypeKind.Interface, + OutputStream = (int)TypeKind.OutputStream, + Specialized = (int)TypeKind.Specialized, + Feedback = (int)TypeKind.Feedback, + Pointer = (int)TypeKind.Pointer, + DynamicResource = (int)TypeKind.DynamicResource, + MeshOutput = (int)TypeKind.MeshOutput, + Enum = (int)TypeKind.Enum, + } + + public enum ScalarType : ScalarTypeIntegral + { + None, + Void, + Bool, + Int32, + UInt32, + Int64, + UInt64, + Float16, + Float32, + Float64, + Int8, + UInt8, + Int16, + UInt16, + IntPtr, + UIntPtr, + BFloat16, + FloatE4M3, + FloatE5M2, + } + + public Brutal.SlangApi.TypeKind GetKind() + { + return Slang.PInvoke.spReflectionType_GetKind(this); + } + + public uint GetUserAttributeCount() + { + return Slang.PInvoke.spReflectionType_GetUserAttributeCount(this); + } + + public Brutal.SlangApi.ReflectionUserAttribute GetUserAttribute(uint index) + { + return Slang.PInvoke.spReflectionType_GetUserAttribute(this, index); + } + + public Brutal.SlangApi.ReflectionUserAttribute FindUserAttributeByName(RefString8 name) + { + return Slang.PInvoke.spReflectionType_FindUserAttributeByName(this, name); + } + + public ReflectionType ApplySpecializations(ReflectionGeneric generic) + { + return Slang.PInvoke.spReflectionType_applySpecializations(this, generic); + } + + public uint GetFieldCount() + { + return Slang.PInvoke.spReflectionType_GetFieldCount(this); + } + + public ReflectionVariable GetFieldByIndex(uint index) + { + return Slang.PInvoke.spReflectionType_GetFieldByIndex(this, index); + } + + public ByteSize64 GetElementCount() + { + return Slang.PInvoke.spReflectionType_GetElementCount(this); + } + + public ByteSize64 GetSpecializedElementCount(Reflection reflection) + { + return Slang.PInvoke.spReflectionType_GetSpecializedElementCount(this, reflection); + } + + public ReflectionType GetElementType() + { + return Slang.PInvoke.spReflectionType_GetElementType(this); + } + + public uint GetRowCount() + { + return Slang.PInvoke.spReflectionType_GetRowCount(this); + } + + public uint GetColumnCount() + { + return Slang.PInvoke.spReflectionType_GetColumnCount(this); + } + + public Brutal.SlangApi.ScalarType GetScalarType() + { + return Slang.PInvoke.spReflectionType_GetScalarType(this); + } + + public Brutal.SlangApi.ResourceShape GetResourceShape() + { + return Slang.PInvoke.spReflectionType_GetResourceShape(this); + } + + public Brutal.SlangApi.ResourceAccess GetResourceAccess() + { + return Slang.PInvoke.spReflectionType_GetResourceAccess(this); + } + + public ReflectionType GetResourceResultType() + { + return Slang.PInvoke.spReflectionType_GetResourceResultType(this); + } + + public string GetName() + { + return Slang.PInvoke.spReflectionType_GetName(this); + } + + internal Result GetFullName(out nint outNameBlob) + { + return Slang.PInvoke.spReflectionType_GetFullName(this, out outNameBlob); + } + + public ReflectionGeneric GetGenericContainer() + { + return Slang.PInvoke.spReflectionType_GetGenericContainer(this); + } + + public Int GetSpecializedTypeArgCount() + { + return Slang.PInvoke.spReflectionType_getSpecializedTypeArgCount(this); + } + + public ReflectionType GetSpecializedTypeArgType(Int index) + { + return Slang.PInvoke.spReflectionType_getSpecializedTypeArgType(this, index); + } + }; + + [InteropHandle] + public readonly unsafe partial struct VariableLayoutReflection + { + public ReflectionVariable GetVariable() + { + return Slang.PInvoke.spReflectionVariableLayout_GetVariable(this); + } + + public ReflectionTypeLayout GetTypeLayout() + { + return Slang.PInvoke.spReflectionVariableLayout_GetTypeLayout(this); + } + + public ByteSize64 GetOffset(Brutal.SlangApi.ParameterCategory category) + { + return Slang.PInvoke.spReflectionVariableLayout_GetOffset(this, category); + } + + public ByteSize64 GetSpace(Brutal.SlangApi.ParameterCategory category) + { + return Slang.PInvoke.spReflectionVariableLayout_GetSpace(this, category); + } + + public Brutal.SlangApi.ImageFormat GetImageFormat() + { + return Slang.PInvoke.spReflectionVariableLayout_GetImageFormat(this); + } + + public string GetSemanticName() + { + return Slang.PInvoke.spReflectionVariableLayout_GetSemanticName(this); + } + + public ByteSize64 GetSemanticIndex() + { + return Slang.PInvoke.spReflectionVariableLayout_GetSemanticIndex(this); + } + + public Brutal.SlangApi.Stage GetStage() + { + return Slang.PInvoke.spReflectionVariableLayout_getStage(this); + } + + public ReflectionVariableLayout GetPendingDataLayout() + { + return Slang.PInvoke.spReflectionVariableLayout_getPendingDataLayout(this); + } + }; + + [InteropHandle] + public readonly unsafe partial struct VariableReflection + { + public string GetName() + { + return Slang.PInvoke.spReflectionVariable_GetName(this); + } + + public new ReflectionType GetType() + { + return Slang.PInvoke.spReflectionVariable_GetType(this); + } + + public Brutal.SlangApi.ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID) + { + return Slang.PInvoke.spReflectionVariable_FindModifier(this, modifierID); + } + + public uint GetUserAttributeCount() + { + return Slang.PInvoke.spReflectionVariable_GetUserAttributeCount(this); + } + + public Brutal.SlangApi.ReflectionUserAttribute GetUserAttribute(uint index) + { + return Slang.PInvoke.spReflectionVariable_GetUserAttribute(this, index); + } + + internal Brutal.SlangApi.ReflectionUserAttribute FindUserAttributeByName(nint globalSession, RefString8 name) + { + return Slang.PInvoke.spReflectionVariable_FindUserAttributeByName(this, globalSession, name); + } + + public Brutal.Bool8 HasDefaultValue() + { + return Slang.PInvoke.spReflectionVariable_HasDefaultValue(this); + } + + public unsafe Result GetDefaultValueInt(long* rs) + { + return Slang.PInvoke.spReflectionVariable_GetDefaultValueInt(this, rs); + } + + public unsafe Result GetDefaultValueFloat(float* rs) + { + return Slang.PInvoke.spReflectionVariable_GetDefaultValueFloat(this, rs); + } + + public ReflectionGeneric GetGenericContainer() + { + return Slang.PInvoke.spReflectionVariable_GetGenericContainer(this); + } + + public ReflectionVariable ApplySpecializations(ReflectionGeneric generic) + { + return Slang.PInvoke.spReflectionVariable_applySpecializations(this, generic); + } + }; + + [InteropHandle] + public readonly unsafe partial struct FunctionReflection + { + public ReflectionDecl AsDecl() + { + return Slang.PInvoke.spReflectionFunction_asDecl(this); + } + + public string GetName() + { + return Slang.PInvoke.spReflectionFunction_GetName(this); + } + + public Brutal.SlangApi.ReflectionModifier FindModifier(Brutal.SlangApi.ModifierID modifierID) + { + return Slang.PInvoke.spReflectionFunction_FindModifier(this, modifierID); + } + + public uint GetUserAttributeCount() + { + return Slang.PInvoke.spReflectionFunction_GetUserAttributeCount(this); + } + + public Brutal.SlangApi.ReflectionUserAttribute GetUserAttribute(uint index) + { + return Slang.PInvoke.spReflectionFunction_GetUserAttribute(this, index); + } + + internal Brutal.SlangApi.ReflectionUserAttribute FindUserAttributeByName(nint globalSession, RefString8 name) + { + return Slang.PInvoke.spReflectionFunction_FindUserAttributeByName(this, globalSession, name); + } + + public uint GetParameterCount() + { + return Slang.PInvoke.spReflectionFunction_GetParameterCount(this); + } + + public ReflectionVariable GetParameter(uint index) + { + return Slang.PInvoke.spReflectionFunction_GetParameter(this, index); + } + + public ReflectionType GetResultType() + { + return Slang.PInvoke.spReflectionFunction_GetResultType(this); + } + + public ReflectionGeneric GetGenericContainer() + { + return Slang.PInvoke.spReflectionFunction_GetGenericContainer(this); + } + + public ReflectionFunction ApplySpecializations(ReflectionGeneric generic) + { + return Slang.PInvoke.spReflectionFunction_applySpecializations(this, generic); + } + + public ReflectionFunction SpecializeWithArgTypes(Int argTypeCount, in ReflectionType argTypes) + { + return Slang.PInvoke.spReflectionFunction_specializeWithArgTypes(this, argTypeCount, in argTypes); + } + + public Brutal.Bool8 IsOverloaded() + { + return Slang.PInvoke.spReflectionFunction_isOverloaded(this); + } + + public uint GetOverloadCount() + { + return Slang.PInvoke.spReflectionFunction_getOverloadCount(this); + } + + public ReflectionFunction GetOverload(uint index) + { + return Slang.PInvoke.spReflectionFunction_getOverload(this, index); + } + }; + + [InteropHandle] + public readonly unsafe partial struct GenericReflection + { + public ReflectionDecl AsDecl() + { + return Slang.PInvoke.spReflectionGeneric_asDecl(this); + } + + public string GetName() + { + return Slang.PInvoke.spReflectionGeneric_GetName(this); + } + + public uint GetTypeParameterCount() + { + return Slang.PInvoke.spReflectionGeneric_GetTypeParameterCount(this); + } + + public ReflectionVariable GetTypeParameter(uint index) + { + return Slang.PInvoke.spReflectionGeneric_GetTypeParameter(this, index); + } + + public uint GetValueParameterCount() + { + return Slang.PInvoke.spReflectionGeneric_GetValueParameterCount(this); + } + + public ReflectionVariable GetValueParameter(uint index) + { + return Slang.PInvoke.spReflectionGeneric_GetValueParameter(this, index); + } + + public uint GetTypeParameterConstraintCount(ReflectionVariable typeParam) + { + return Slang.PInvoke.spReflectionGeneric_GetTypeParameterConstraintCount(this, typeParam); + } + + public ReflectionType GetTypeParameterConstraintType(ReflectionVariable typeParam, uint index) + { + return Slang.PInvoke.spReflectionGeneric_GetTypeParameterConstraintType(this, typeParam, index); + } + + public Brutal.SlangApi.DeclKind GetInnerKind() + { + return Slang.PInvoke.spReflectionGeneric_GetInnerKind(this); + } + + public ReflectionDecl GetInnerDecl() + { + return Slang.PInvoke.spReflectionGeneric_GetInnerDecl(this); + } + + public ReflectionGeneric GetOuterGenericContainer() + { + return Slang.PInvoke.spReflectionGeneric_GetOuterGenericContainer(this); + } + + public ReflectionType GetConcreteType(ReflectionVariable typeParam) + { + return Slang.PInvoke.spReflectionGeneric_GetConcreteType(this, typeParam); + } + + public long GetConcreteIntVal(ReflectionVariable valueParam) + { + return Slang.PInvoke.spReflectionGeneric_GetConcreteIntVal(this, valueParam); + } + + public ReflectionGeneric ApplySpecializations(ReflectionGeneric generic) + { + return Slang.PInvoke.spReflectionGeneric_applySpecializations(this, generic); + } + }; + + [InteropHandle] + public readonly unsafe partial struct Attribute { }; + + [InteropHandle] + public readonly unsafe partial struct ShaderReflection { }; + + [InteropHandle] + public readonly unsafe partial struct Modifier + { + public enum Id : ModifierIDIntegral + { + Shared = (ModifierIDIntegral)ModifierID.Shared, + NoDiff = (ModifierIDIntegral)ModifierID.NoDiff, + Static = (ModifierIDIntegral)ModifierID.Static, + Const = (ModifierIDIntegral)ModifierID.Const, + Export = (ModifierIDIntegral)ModifierID.Export, + Extern = (ModifierIDIntegral)ModifierID.Extern, + Differentiable = (ModifierIDIntegral)ModifierID.Differentiable, + Mutating = (ModifierIDIntegral)ModifierID.Mutating, + In = (ModifierIDIntegral)ModifierID.In, + Out = (ModifierIDIntegral)ModifierID.Out, + InOut = (ModifierIDIntegral)ModifierID.InOut, + } + }; + + [InteropHandle] + public readonly unsafe partial struct EntryPointReflection { }; + + [InteropHandle] + public readonly unsafe partial struct TypeParameterReflection + { + public string GetName() + { + return Slang.PInvoke.spReflectionTypeParameter_GetName(this); + } + + public uint GetIndex() + { + return Slang.PInvoke.spReflectionTypeParameter_GetIndex(this); + } + + public uint GetConstraintCount() + { + return Slang.PInvoke.spReflectionTypeParameter_GetConstraintCount(this); + } + + public ReflectionType GetConstraintByIndex(uint index) + { + return Slang.PInvoke.spReflectionTypeParameter_GetConstraintByIndex(this, index); + } + }; + + [InteropHandle] + public readonly unsafe partial struct CompileCoreModuleFlag + { + public enum Enum : CompileCoreModuleFlags + { + WriteDocumentation = 0X1, + } + }; + + public unsafe partial struct SessionDesc + { + /// The size of this structure, in bytes. + public ByteSize64 StructureSize; + + /// Code generation targets to include in the session. + public Brutal.SlangApi.TargetDesc* Targets; + public Int TargetCount; + + /// Flags to configure the session. + public SessionFlags Flags; + + /// Default layout to assume for variables with matrix types. + public Brutal.SlangApi.MatrixLayoutMode DefaultMatrixLayoutMode; + + /// Paths to use when searching for `#include`d or `import`ed files. + public byte** SearchPaths; + public Int SearchPathCount; + public Brutal.SlangApi.PreprocessorMacroDesc* PreprocessorMacros; + public Int PreprocessorMacroCount; + public nint FileSystem; + public Brutal.Bool8 EnableEffectAnnotations; + public Brutal.Bool8 AllowGlslSyntax; + + /// Pointer to an array of compiler option entries, whose size is compilerOptionEntryCount. + public Brutal.SlangApi.CompilerOptionEntry* CompilerOptionEntries; + + /// Number of additional compiler option entries. + public uint CompilerOptionEntryCount; + + /// Whether to skip SPIRV validation. + public Brutal.Bool8 SkipSpirvValidation; + }; + + /// Argument used for specialization to types/values. + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct SpecializationArg + { + public enum Kind + { + Unknown = 0, // < An invalid specialization argument. + Type = 1, // < Specialize to a type. + Expr = 2, // < An expression representing a type or value + } + + /// The kind of specialization argument. + [FieldOffset(0)] + public Brutal.SlangApi.SpecializationArg.Kind _Kind; + + /// A type specialization argument, used for `Kind::Type`. + [FieldOffset(8)] + public Brutal.SlangApi.TypeReflection Type; + + /// An expression in Slang syntax, used for `Kind::Expr`. + [FieldOffset(8)] + public byte* Expr; + }; + + /// Description of a code generation target. + public unsafe partial struct TargetDesc + { + /// The size of this structure, in bytes. + public ByteSize64 StructureSize; + + /// The target format to generate code for (e.g., SPIR-V, DXIL, etc.) + public Brutal.SlangApi.CompileTarget Format; + + /// The compilation profile supported by the target (e.g., "Shader Model 5.1") + public Brutal.SlangApi.ProfileID Profile; + + /// Flags for the code generation target. Currently unused. + public TargetFlags Flags; + + /// Default mode to use for floating-point operations on the target. + public Brutal.SlangApi.FloatingPointMode FloatingPointMode; + + /// The line directive mode for output source code. + public Brutal.SlangApi.LineDirectiveMode LineDirectiveMode; + + /// Whether to force `scalar` layout for glsl shader storage buffers. + public Brutal.Bool8 ForceGlslScalarBufferLayout; + + /// Pointer to an array of compiler option entries, whose size is compilerOptionEntryCount. + public Brutal.SlangApi.CompilerOptionEntry* CompilerOptionEntries; + + /// Number of additional compiler option entries. + public uint CompilerOptionEntryCount; + }; + + public unsafe partial struct PreprocessorMacroDesc + { + public byte* Name; + public byte* Value; + }; + + public unsafe partial struct SourceLocation + { + public byte* FilePath; + public Int Line; + public Int Column; + }; + + public unsafe partial struct VMExecOperand + { + public byte** Section; // Pointer to the section start pointer. + public uint Type; // type of the operand data. + public uint Size; + public uint Offset; + }; + + public unsafe partial struct VMExecInstHeader + { + public VMExtFunction FunctionPtr; // Pointer to the function that executes this instruction. + public uint OpcodeExtension; + public uint OperandCount; + }; + + public unsafe partial struct ByteCodeFuncInfo + { + public uint ParameterCount; + public uint ReturnValueSize; + }; + + public unsafe partial struct ByteCodeRunnerDesc + { + /// The size of this structure, in bytes. + public ByteSize64 StructSize; + }; + + /// A "Universally Unique Identifier" (UUID) + /// + /// The Slang API uses UUIDs to identify interfaces when + /// using `queryInterface`. + /// + /// This type is compatible with the `GUID` type defined + /// by the Component Object Model (COM), but Slang is + /// not dependent on COM. + public unsafe partial struct Uuid + { + public uint Data1; + public ushort Data2; + public ushort Data3; + public fixed byte Data4[8]; + }; + + public unsafe partial struct Guid { }; + + /// Can be requested from ISlangCastable cast to indicate the contained chars are null + /// terminated. + public unsafe partial struct TerminatedChars + { + public fixed byte Chars[1]; + }; + + [InteropHandle] + public readonly unsafe partial struct ProgramLayout { }; + + public unsafe partial struct EntryPoint { }; + + [InteropHandle] + public readonly unsafe partial struct EntryPointLayout { }; + + public unsafe partial struct ReflectionModifier { }; + + [InteropHandle] + public readonly unsafe partial struct ReflectionUserAttribute + { + public string GetName() + { + return Slang.PInvoke.spReflectionUserAttribute_GetName(this); + } + + public uint GetArgumentCount() + { + return Slang.PInvoke.spReflectionUserAttribute_GetArgumentCount(this); + } + + public ReflectionType GetArgumentType(uint index) + { + return Slang.PInvoke.spReflectionUserAttribute_GetArgumentType(this, index); + } + + public unsafe Result GetArgumentValueInt(uint index, int* rs) + { + return Slang.PInvoke.spReflectionUserAttribute_GetArgumentValueInt(this, index, rs); + } + + public unsafe Result GetArgumentValueFloat(uint index, float* rs) + { + return Slang.PInvoke.spReflectionUserAttribute_GetArgumentValueFloat(this, index, rs); + } + + public string GetArgumentValueString(uint index, out ByteSize64 outSize) + { + return Slang.PInvoke.spReflectionUserAttribute_GetArgumentValueString(this, index, out outSize); + } + }; + + /// Description of a Slang global session. + public unsafe partial struct GlobalSessionDesc + { + /// Size of this struct. + public uint StructureSize; + + /// Slang API version. + public uint ApiVersion; + + /// Specify the oldest Slang language version that any sessions will use. + public uint MinLanguageVersion; + + /// Whether to enable GLSL support. + public Brutal.Bool8 EnableGlsl; + + /// Reserved for future use. + public fixed uint Reserved[16]; + }; + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct GenericArgReflection + { + [FieldOffset(0)] + public Brutal.SlangApi.TypeReflection TypeVal; + + [FieldOffset(0)] + public long IntVal; + + [FieldOffset(0)] + public Brutal.Bool8 BoolVal; + }; + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct ReflectionGenericArg + { + [FieldOffset(0)] + public ReflectionType TypeVal; + + [FieldOffset(0)] + public long IntVal; + + [FieldOffset(0)] + public Brutal.Bool8 BoolVal; + }; +} diff --git a/Brutal.Slang/GlobalUsings.cs b/Brutal.Slang/GlobalUsings.cs new file mode 100644 index 0000000..253a5dd --- /dev/null +++ b/Brutal.Slang/GlobalUsings.cs @@ -0,0 +1 @@ +global using System.Runtime.InteropServices; diff --git a/Brutal.Slang/ICompileRequestExtensions.cs b/Brutal.Slang/ICompileRequestExtensions.cs new file mode 100644 index 0000000..b2b4441 --- /dev/null +++ b/Brutal.Slang/ICompileRequestExtensions.cs @@ -0,0 +1,158 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal.Strings; + +namespace Brutal.SlangApi; + +/// +/// Hand-written ergonomic helpers on top of the generated +/// handle struct. The deprecated sp* compile-request flow trafficks in COM +/// interfaces as raw nint (because flat-C entry points can't carry +/// [GeneratedComInterface] proxies through source-gen marshalling); this layer +/// bridges those nints to/from managed COM proxies via +/// and . +/// +public static unsafe class ICompileRequestExtensions +{ + /// + /// Returns the the request was created against, wrapping the + /// raw COM pointer that the deprecated spCompileRequest_getSession entry point + /// produces. Returns null when the call fails or yields a null pointer. + /// + public static Result GetSession(this ICompileRequest self, out ISession? session) + { + var hr = self.GetSession(out var raw); + session = Slang.WrapComInstance(hr, raw); + return hr; + } + + /// + /// Returns the linked program assembled from the request's translation units as a + /// managed . Returns null when the call fails or + /// slang yields a null pointer. + /// + public static Result GetProgram(this ICompileRequest self, out IComponentType? program) + { + var hr = self.GetProgram(out var raw); + program = Slang.WrapComInstance(hr, raw); + return hr; + } + + /// + /// Returns the linked program plus its entry points as a single + /// . Returns null when the call fails or slang + /// yields a null pointer. + /// + public static Result GetProgramWithEntryPoints(this ICompileRequest self, out IComponentType? program) + { + var hr = self.GetProgramWithEntryPoints(out var raw); + program = Slang.WrapComInstance(hr, raw); + return hr; + } + + /// + /// Returns the entry point at as a standalone + /// . Returns null when the call fails or slang + /// yields a null pointer. + /// + public static Result GetEntryPoint(this ICompileRequest self, Int entryPointIndex, out IComponentType? entryPoint) + { + var hr = self.GetEntryPoint(entryPointIndex, out var raw); + entryPoint = Slang.WrapComInstance(hr, raw); + return hr; + } + + /// + /// Returns the loaded for the translation unit at + /// . Returns null when the call fails + /// or slang yields a null pointer. + /// + public static Result GetModule(this ICompileRequest self, Int translationUnitIndex, out IModule? module) + { + var hr = self.GetModule(translationUnitIndex, out var raw); + module = Slang.WrapComInstance(hr, raw); + return hr; + } + + /// + /// Sets the used to resolve source includes and other + /// file lookups for this request. Pass null to restore slang's default file + /// system. The native side AddRefs the supplied object internally. + /// + public static void SetFileSystem(this ICompileRequest self, ISlangFileSystem? fileSystem) + { + if (fileSystem is null) + { + self.SetFileSystem(0); + return; + } + var raw = Slang.GetComInstance(fileSystem); + try + { + self.SetFileSystem(raw); + } + finally + { + Marshal.Release(raw); + } + } + + /// + /// Redirects output on to the supplied + /// . Pass null to restore the channel's default + /// writer. The native side AddRefs the supplied object internally. + /// + public static void SetWriter(this ICompileRequest self, WriterChannel channel, ISlangWriter? writer) + { + if (writer is null) + { + self.SetWriter(channel, 0); + return; + } + var raw = Slang.GetComInstance(writer); + try + { + self.SetWriter(channel, raw); + } + finally + { + Marshal.Release(raw); + } + } + + /// + /// Returns the currently installed for + /// , or null if the channel is unset. Slang's + /// getter does not AddRef the returned pointer, so this wrapper performs the + /// AddRef itself before handing the pointer to . + /// + public static ISlangWriter? GetWriter(this ICompileRequest self, WriterChannel channel) + { + var raw = self.GetWriter(channel); + if (raw == 0) + return null; + Marshal.AddRef(raw); + return (ISlangWriter)Slang.ComWrappers.GetOrCreateObjectForComInstance(raw, CreateObjectFlags.None); + } + + /// + /// Adds a translation-unit source whose contents are provided as an + /// . The native side AddRefs the supplied blob internally. + /// + public static void AddTranslationUnitSourceBlob( + this ICompileRequest self, + int translationUnitIndex, + RefString8 path, + ISlangBlob sourceBlob + ) + { + var raw = Slang.GetComInstance(sourceBlob); + try + { + self.AddTranslationUnitSourceBlob(translationUnitIndex, path, raw); + } + finally + { + Marshal.Release(raw); + } + } +} diff --git a/Brutal.Slang/IGlobalSessionExtensions.cs b/Brutal.Slang/IGlobalSessionExtensions.cs new file mode 100644 index 0000000..2839fe8 --- /dev/null +++ b/Brutal.Slang/IGlobalSessionExtensions.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Brutal.SlangApi; + +/// +/// Hand-written ergonomic helpers on top of the generated +/// COM interface. Wraps byte*-returning UTF-8 string accessors into managed +/// returns so callers don't have to call +/// by hand. +/// +public static unsafe partial class IGlobalSessionExtensions +{ + /// + /// Slang's build tag string (e.g. "slang-2026.7"). Returns null if + /// the underlying call yields a null pointer. + /// + public static string? GetBuildTag(this IGlobalSession self) => + Marshal.PtrToStringUTF8((nint)self.GetBuildTagString()); +} diff --git a/Brutal.Slang/ISessionExtensions.cs b/Brutal.Slang/ISessionExtensions.cs new file mode 100644 index 0000000..5f660b2 --- /dev/null +++ b/Brutal.Slang/ISessionExtensions.cs @@ -0,0 +1,168 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Text; + +namespace Brutal.SlangApi; + +/// +/// Hand-written ergonomic overloads on top of the generated ISession COM +/// interface. The generated half (InterfacesExt.gen.cs) mirrors the native +/// vtable shape one-for-one; this partial adds the wrappers needed to keep callers +/// from having to deal with raw nint/nint* at points where the COM +/// ABI requires arrays of unmanaged COM pointers that managed marshalling cannot +/// represent on its own. +/// +public static unsafe partial class ISessionExtensions +{ + /// + /// Creates a composite from the given component types, + /// hiding the nint* array marshalling that the underlying COM ABI requires. + /// Each input proxy is AddRef'd for the duration of the call and released afterwards; + /// slang retains its own references into the returned composite, so the inputs + /// remain usable after this call returns. + /// + /// The session creating the composite. + /// + /// Components to compose. Accepts arrays, stackalloc spans, collection + /// literals, or . + /// + /// + /// Diagnostic blob populated by slang. May be non-null even on success. + /// + /// The composite component on success. + /// Thrown if slang reports a failing . + public static IComponentType CreateCompositeComponentType( + this ISession self, + ReadOnlySpan componentTypes, + out ISlangBlob outDiagnostics + ) + { + var count = componentTypes.Length; + Span pointers = count <= 64 ? stackalloc nint[count] : new nint[count]; + pointers.Clear(); + + try + { + for (var i = 0; i < count; i++) + pointers[i] = Slang.GetComInstance(componentTypes[i]); + + fixed (nint* p = pointers) + { + self.CreateCompositeComponentType(p, count, out var composite, out outDiagnostics).ThrowIfFailure(); + return composite; + } + } + finally + { + for (var i = 0; i < count; i++) + if (pointers[i] != 0) + Marshal.Release(pointers[i]); + } + } + + /// + /// Loads a previously-imported module by name. UTF-8 marshalling for + /// is handled here so callers don't have to pin a + /// byte* by hand. + /// + public static IModule? LoadModule(this ISession self, string moduleName, out ISlangBlob? outDiagnostics) + { + Span nameBuf = stackalloc byte[ShortStringStackBytes]; + EncodeUtf8(moduleName, ref nameBuf); + fixed (byte* nameP = nameBuf) + return self.LoadModule(nameP, out outDiagnostics); + } + + /// + /// Loads a module from an in-memory source blob, marshalling + /// and from UTF-16 to UTF-8. + /// + public static IModule? LoadModuleFromSource( + this ISession self, + string moduleName, + string path, + ISlangBlob source, + out ISlangBlob? outDiagnostics + ) + { + Span nameBuf = stackalloc byte[ShortStringStackBytes]; + Span pathBuf = stackalloc byte[ShortStringStackBytes]; + EncodeUtf8(moduleName, ref nameBuf); + EncodeUtf8(path, ref pathBuf); + fixed (byte* nameP = nameBuf) + fixed (byte* pathP = pathBuf) + return self.LoadModuleFromSource(nameP, pathP, source, out outDiagnostics); + } + + /// + /// Loads a module from a UTF-16 string source, marshalling all three string + /// parameters to null-terminated UTF-8 for the underlying COM call. + /// + public static IModule? LoadModuleFromSourceString( + this ISession self, + string moduleName, + string path, + string source, + out ISlangBlob? outDiagnostics + ) + { + Span nameBuf = stackalloc byte[ShortStringStackBytes]; + Span pathBuf = stackalloc byte[ShortStringStackBytes]; + Span sourceBuf = stackalloc byte[LongStringStackBytes]; + EncodeUtf8(moduleName, ref nameBuf); + EncodeUtf8(path, ref pathBuf); + EncodeUtf8(source, ref sourceBuf); + fixed (byte* nameP = nameBuf) + fixed (byte* pathP = pathBuf) + fixed (byte* sourceP = sourceBuf) + return self.LoadModuleFromSourceString(nameP, pathP, sourceP, out outDiagnostics); + } + + /// + /// Loads a module from a precompiled IR blob, marshalling + /// and to UTF-8. + /// + public static IModule? LoadModuleFromIRBlob( + this ISession self, + string moduleName, + string path, + ISlangBlob source, + out ISlangBlob? outDiagnostics + ) + { + Span nameBuf = stackalloc byte[ShortStringStackBytes]; + Span pathBuf = stackalloc byte[ShortStringStackBytes]; + EncodeUtf8(moduleName, ref nameBuf); + EncodeUtf8(path, ref pathBuf); + fixed (byte* nameP = nameBuf) + fixed (byte* pathP = pathBuf) + return self.LoadModuleFromIRBlob(nameP, pathP, source, out outDiagnostics); + } + + private const int ShortStringStackBytes = 256; + private const int LongStringStackBytes = 8192; + + /// + /// Encodes as null-terminated UTF-8 into , + /// re-pointing the span at a heap-allocated array if the stackalloc'd buffer is too small. + /// The caller pins the resulting span via fixed for a single COM call. + /// + private static void EncodeUtf8(string value, ref Span buffer) + { + if (string.IsNullOrEmpty(value)) + { + Debug.Assert(buffer.Length >= 1); + buffer[0] = 0; + return; + } + + var byteCount = Encoding.UTF8.GetByteCount(value); + var needed = byteCount + 1; + if (needed > buffer.Length) + buffer = new byte[needed]; + else + buffer = buffer[..needed]; + Encoding.UTF8.GetBytes(value, buffer); + buffer[byteCount] = 0; + } +} diff --git a/Brutal.Slang/ISlangBlobExtensions.cs b/Brutal.Slang/ISlangBlobExtensions.cs new file mode 100644 index 0000000..362812d --- /dev/null +++ b/Brutal.Slang/ISlangBlobExtensions.cs @@ -0,0 +1,17 @@ +namespace Brutal.SlangApi; + +/// +/// Hand-written ergonomic helpers on top of the generated +/// COM interface. The interface itself only exposes a raw void* + size pair; +/// callers shouldn't have to assemble a span by hand to read the contents. +/// +public static unsafe partial class ISlangBlobExtensions +{ + /// + /// Returns the blob's contents as a . The span is + /// valid for the lifetime of the underlying blob. Copy if you need the bytes + /// to outlive it. + /// + public static ReadOnlySpan AsSpan(this ISlangBlob self) => + new(self.GetBufferPointer(), checked((int)self.GetBufferSize())); +} diff --git a/Brutal.Slang/LICENSES/BRUTAL-SLANG-THIRD-PARTY-NOTICES.txt b/Brutal.Slang/LICENSES/BRUTAL-SLANG-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..9e57027 --- /dev/null +++ b/Brutal.Slang/LICENSES/BRUTAL-SLANG-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,2304 @@ +Brutal.Slang redistributes the third-party components listed below. Each is +reproduced with the license that governs it. + +Brutal.Slang packs eight distinct native libraries across 26 files: eight on +win-x64, and nine each on linux-x64 and osx-arm64, where seven libraries ship +(`slang-tint` is win-x64 only) and two of the nine files are versioned +aliases. Six of the eight are built from the Slang sources: `slang`, +`slang-compiler`, `slang-glslang`, `slang-rt`, `slang-glsl-module` and +`slang-without-embedded-core-module`. + +The rest are not built here at all. `slang-llvm` and `slang-tint` are prebuilt +shared libraries obtained from upstream GitHub releases, and both carry +substantial third-party code: LLVM and Clang in the first, the Tint WGSL +compiler in the second. `slang-llvm` ships on every runtime; `slang-tint` +ships on win-x64 only. Their sections below say so. + +This file is scoped to the binary package. It covers the third-party components +compiled into or shipped as those libraries. + +On the presentation of license text: the Apache License 2.0 governs several of +the components below. Rather than repeat it, its full text is reproduced once +as Appendix A and the sections that need it point there. Every other license +is reproduced in full within its own section. The full text of every license +that applies to this package is present in this file. + + +############################################################ +COMPONENTS COMPILED INTO OR SHIPPED AS THE NATIVE LIBRARIES +############################################################ + +============================================================ +Slang -- the library these bindings wrap +============================================================ + +Copyright 2016, Carnegie Mellon University and NVIDIA Corporation +Copyright 2024 The Khronos Group, Inc. +Upstream: https://github.com/shader-slang/slang +Licenses: Apache-2.0 WITH LLVM-exception + +Both copyright lines are taken verbatim from upstream's SPDX-FileCopyrightText +in its REUSE.toml, which is where Slang states its copyright: its LICENSE file +carries the SPDX identifier, the license's standard notice and the LLVM +Exception, but no copyright line of its own. + +Reproduced below verbatim from upstream's LICENSE. The full Apache License 2.0 +text this refers to is Appendix A of this file. + +Also covered by this section: Slang's own interface shim for the Tint WGSL +compiler, which carries no separate copyright notice of its own. Tint itself +ships, as the prebuilt `slang-tint` library, and has its own section below. + +SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +LLVM Exceptions to the Apache 2.0 License + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + +----- + +source/core/slang-crypto.cpp carries two implementations derived from +third-party sources. The MD5 derives from Solar Designer's public-domain +implementation, published at +http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5. +The SHA1 derives from https://github.com/983/SHA1; the notice it carries is +reproduced below from the foot of slang-crypto.cpp. + +Licenses: Unlicense + +/* + * This is free and unencumbered software released into the public domain. + * + * Anyone is free to copy, modify, publish, use, compile, sell, or + * distribute this software, either in source code form or as a compiled + * binary, for any purpose, commercial or non-commercial, and by any + * means. + * + * In jurisdictions that recognize copyright laws, the author or authors + * of this software dedicate any and all copyright interest in the + * software to the public domain. We make this dedication for the benefit + * of the public at large and to the detriment of our heirs and + * successors. We intend this dedication to be an overt act of + * relinquishment in perpetuity of all present and future rights to this + * software under copyright law. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * For more information, please refer to + */ + +============================================================ +glslang -- linked into slang-glslang +============================================================ + +Upstream: https://github.com/KhronosGroup/glslang +Version: commit d1f52c8993a501bd52d4fbd044bfeb9ecdceb9f4, 10 March 2026 +Licenses: BSD-3-Clause; BSD-2-Clause; Apache-2.0; MIT; MIT-Khronos-old; + GPL-3.0-or-later WITH Bison-exception-2.2; + LicenseRef-NVIDIA-glslang-preprocessor + +This section also covers glslang's generated sources, which are produced from +this project's grammar and are derivative of it. + +glslang requires a number of licenses. Upstream's LICENSE.txt is reproduced +below in full and in its own order, except for the Apache License 2.0, which is +reproduced as Appendix A. Two licenses are stated in source file headers rather +than in LICENSE.txt; both are reproduced below from the files that carry them. + +Here, glslang proper means core GLSL parsing, HLSL parsing, and SPIR-V code +generation. Glslang proper requires use of a number of licenses, one that covers +preprocessing and others that covers non-preprocessing. + +Bison was removed long ago. You can build glslang from the source grammar, +using tools of your choice, without using bison or any bison files. + +Other parts, outside of glslang proper, include: + +- gl_types.h, only needed for OpenGL-like reflection, and can be left out of + a parse and codegen project. See it for its license. + +- update_glslang_sources.py, which is not part of the project proper and does + not need to be used. + +- Google tests and SPIR-V tools, and anything in the external subdirectory + are external and optional; see them for their respective licenses. + +-------------------------------------------------------------------------------- + +The core of glslang-proper, minus the preprocessor is licenced as follows: + +-------------------------------------------------------------------------------- +3-Clause BSD License +-------------------------------------------------------------------------------- + +// +// Copyright (C) 2015-2018 Google, Inc. +// Copyright (C) +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + + +-------------------------------------------------------------------------------- +2-Clause BSD License +-------------------------------------------------------------------------------- + +Copyright 2020 The Khronos Group Inc + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +The MIT License +-------------------------------------------------------------------------------- + +Copyright 2020 The Khronos Group Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- +APACHE LICENSE, VERSION 2.0 +-------------------------------------------------------------------------------- + +Reproduced as Appendix A at the end of this file, where it is shared with the +other components under this license. + + +-------------------------------------------------------------------------------- +GPL 3 with special bison exception +-------------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +Bison Exception + +As a special exception, you may create a larger work that contains part or all +of the Bison parser skeleton and distribute that work under terms of your +choice, so long as that work isn't itself a parser generator using the skeleton +or a modified version thereof as a parser skeleton. Alternatively, if you +modify or redistribute the parser skeleton itself, you may (at your option) +remove this special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public License without +this special exception. + +This special exception was added by the Free Software Foundation in version +2.2 of Bison. + + END OF TERMS AND CONDITIONS + + +-------------------------------------------------------------------------------- +================================================================================ +-------------------------------------------------------------------------------- + +The preprocessor has the core licenses stated above, plus additional licences: + +/****************************************************************************\ +Copyright (c) 2002, NVIDIA Corporation. + +NVIDIA Corporation("NVIDIA") supplies this software to you in +consideration of your agreement to the following terms, and your use, +installation, modification or redistribution of this NVIDIA software +constitutes acceptance of these terms. If you do not agree with these +terms, please do not use, install, modify or redistribute this NVIDIA +software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, NVIDIA grants you a personal, non-exclusive +license, under NVIDIA's copyrights in this original NVIDIA software (the +"NVIDIA Software"), to use, reproduce, modify and redistribute the +NVIDIA Software, with or without modifications, in source and/or binary +forms; provided that if you redistribute the NVIDIA Software, you must +retain the copyright notice of NVIDIA, this notice and the following +text and disclaimers in all such redistributions of the NVIDIA Software. +Neither the name, trademarks, service marks nor logos of NVIDIA +Corporation may be used to endorse or promote products derived from the +NVIDIA Software without specific prior written permission from NVIDIA. +Except as expressly stated in this notice, no other rights or licenses +express or implied, are granted by NVIDIA herein, including but not +limited to any patent rights that may be infringed by your derivative +works or by other works in which the NVIDIA Software may be +incorporated. No hardware is licensed hereunder. + +THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, +INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER +PRODUCTS. + +IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY +OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE +NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, +TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF +NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\****************************************************************************/ + +/* +** Copyright (c) 2014-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +----- + +glslang/MachineIndependent/gl_types.h carries this license: + +/* +** Copyright (c) 2013 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +----- + +glslang/CInterface/glslang_c_interface.cpp, +SPIRV/CInterface/spirv_c_interface.cpp, +glslang/Include/glslang_c_interface.h and +glslang/Include/glslang_c_shader_types.h carry this license: + +/** +BSD 2-Clause License + +Copyright (c) 2019, Viktor Latypov +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +**/ + +============================================================ +SPIRV-Tools -- linked into slang-glslang via SPIRV-Tools-opt and +SPIRV-Tools-link +============================================================ + +Upstream: https://github.com/KhronosGroup/SPIRV-Tools +Licenses: Apache-2.0 + +Copyright notices appear in the individual source files. The project ships no +NOTICE file, so Apache License 2.0 section 4(d) imposes no further +requirement. The full license text is Appendix A of this file. + +This section also covers SPIRV-Tools' generated sources, which are produced +from this project's grammar tables and are derivative of it. + +============================================================ +SPIRV-Headers -- compiled into slang-compiler and slang-glslang +============================================================ + +Upstream: https://github.com/KhronosGroup/SPIRV-Headers +Version: commit 6dd7ba990830f7c15ac1345ff3b43ef6ffdad216, 30 March 2026 +Licenses: MIT-Khronos-old; MIT; LicenseRef-JsonCpp; CC-BY-4.0 + +This section also covers a copy of the Khronos SPIR-V core header (spirv.h) +carrying the same terms (Copyright (c) 2014-2024 The Khronos Group Inc.). + +Its LICENSE scopes terms by file glob. The file is reproduced below in full, +each block carrying upstream's own Files: line that scopes it. + +Files: All files except for those called out below. +Copyright (c) 2015-2024 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT + https://www.khronos.org/registry/ + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +--- + +Files: include/spirv/spir-v.xml +Copyright (c) 2015-2024 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +--- + +Files: tools/buildHeaders/jsoncpp/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== + +--- + +Files: **.md, WORKSPACE, .git** + +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + + +============================================================ +miniz -- statically linked into slang-compiler +============================================================ + +Upstream: https://github.com/richgel999/miniz +Licenses: MIT + +Reproduced below in full and verbatim from upstream's LICENSE: + +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================ +LZ4 -- statically linked into slang-compiler +============================================================ + +Upstream: https://github.com/lz4/lz4 +Licenses: BSD-2-Clause + +Only the `lib` directory is built and linked, as the lz4_static target. That +directory is BSD-2-Clause; the GPL-2.0-or-later material in the repository's +`programs`, `tests` and `examples` directories is not built and not +distributed. The repository's own summary of this split, from its top-level +LICENSE, followed by the BSD-2-Clause text that governs the linked code, both +verbatim: + +--- LZ4, top-level LICENSE --- + +This repository uses 2 different licenses : +- all files in the `lib` directory use a BSD 2-Clause license +- all other files use a GPL-2.0-or-later license, unless explicitly stated otherwise + +Relevant license is reminded at the top of each source file, +and with presence of COPYING or LICENSE file in associated directories. + +This model is selected to emphasize that +files in the `lib` directory are designed to be included into 3rd party applications, +while all other files, in `programs`, `tests` or `examples`, +are intended to be used "as is", as part of their intended scenarios, +with no intention to support 3rd party integration use cases. + +--- LZ4, lib/LICENSE --- + +LZ4 Library +Copyright (c) 2011-2020, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================ +unordered_dense -- compiled into slang-compiler +============================================================ + +Upstream: https://github.com/martinus/unordered_dense +Licenses: MIT + +Reproduced below in full and verbatim from upstream's LICENSE: + +MIT License + +Copyright (c) 2022 Martin Leitner-Ankerl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +============================================================ +cmark-gfm -- statically linked into slang-compiler as libcmark-gfm +============================================================ + +Upstream: https://github.com/swiftlang/swift-cmark (gfm branch), a fork of +https://github.com/commonmark/cmark + +CommonMark / GitHub Flavored Markdown parser. Reproduced below in full and +verbatim from upstream's COPYING, which carries the terms for cmark itself and +for the several third-party files it incorporates: + +Copyright (c) 2014, John MacFarlane + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c + +derive from https://github.com/vmg/houdini (with some modifications) + +Copyright (C) 2012 Vicent Martí + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +buffer.h, buffer.c, chunk.h + +are derived from code (C) 2012 Github, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +utf8.c and utf8.c + +are derived from utf8proc +(), +(C) 2009 Public Software Group e. V., Berlin, Germany. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +----- + +The normalization code in normalize.py was derived from the +markdowntest project, Copyright 2013 Karl Dubost: + +The MIT License (MIT) + +Copyright (c) 2013 Karl Dubost + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The CommonMark spec (test/spec.txt) is + +Copyright (C) 2014-15 John MacFarlane + +Released under the Creative Commons CC-BY-SA 4.0 license: +. + +----- + +The test software in test/ is + +Copyright (c) 2014, John MacFarlane + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================ +DirectX Shader Compiler headers -- compiled into slang-compiler +============================================================ + +Files: dxcapi.h, WinAdapter.h +Upstream: https://github.com/microsoft/DirectXShaderCompiler + +Copyright (C) Microsoft Corporation. All rights reserved. +WinAdapter.h additionally carries the LLVM Compiler Infrastructure notice. + +Both headers state that they are distributed under the University of Illinois +Open Source License and refer to a LICENSE.TXT that is not distributed +alongside them. The text of the license they name is reproduced below. + +These headers supply declarations only; dxcompiler is loaded dynamically at +run time and no Microsoft DXC binary is redistributed by this package. + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +============================================================ +mimalloc -- statically linked into slang-glslang on Windows builds only +============================================================ + +Upstream: https://github.com/microsoft/mimalloc, tag v2.1.7 +Licenses: MIT + +Slang's build obtains this component at build time rather than carrying it, +and enables it by default on Windows only. SPIRV-Tools then uses it as its +allocator, which places mimalloc inside the shipped win-x64 slang-glslang +binary. + +Linux and macOS builds default this option off and do not include mimalloc. + +Reproduced below in full and verbatim from the upstream LICENSE at tag v2.1.7: + +MIT License + +Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +============================================================ +LLVM and Clang -- shipped whole as the `slang-llvm` library +============================================================ + +Upstream: https://github.com/llvm/llvm-project, release llvmorg-21.1.2 +Licenses: Apache-2.0 WITH LLVM-exception; NCSA + +This component is not built here. Slang's build obtains a prebuilt +`slang-llvm` shared library from an upstream GitHub release and this package +ships it unchanged. That library is Slang's LLVM-backed host-code path and +embeds LLVM and Clang in full. The version is 21.1.2, confirmed by the string +"LLVM 21.1.2" present in the shipped binary. + +It is a large component: roughly 110 MB on win-x64 and 152 MB on linux-x64. + +LLVM is licensed under the Apache License 2.0 with LLVM Exceptions -- the same +license and the same exception that govern Slang itself. The full Apache +License 2.0 text is Appendix A of this file, and the LLVM Exception text is +reproduced verbatim in the Slang section above; both apply here unchanged. + +Copyright in LLVM is held by its many contributors rather than a single +holder, and upstream's LICENSE.TXT carries no single copyright line to +reproduce. The remainder of that file -- its third-party software preamble +and the legacy University of Illinois/NCSA license -- is reproduced below +verbatim, under upstream's own headings: + +============================================================================== +Software from third parties included in the LLVM Project: +============================================================================== +The LLVM Project contains third party software which is under different license +terms. All such code will be identified clearly using at least one of two +mechanisms: +1) It will be in a separate directory tree with its own `LICENSE.txt` or + `LICENSE` file at the top containing the specific license and restrictions + which apply to that software, or +2) It will contain specific license and restriction terms at the top of every + file. + +============================================================================== +Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + + +============================================================ +Tint -- shipped whole as the `slang-tint` library, on Windows builds only +============================================================ + +Upstream: https://github.com/shader-slang/dawn, release tag slang-tint-0 +Licenses: BSD-3-Clause + +This component is not built here. Slang's build obtains a prebuilt +`slang-tint` shared library from a GitHub release in the shader-slang fork of +Dawn -- Tint is hosted in the Dawn repository rather than in Slang's -- and +this package ships it unchanged. It provides Slang's WGSL output path, is +roughly 12.7 MB, and exports the tint_* entry points visible in the shipped +binary. + +Only the win-x64 runtime carries it. The linux-x64 and osx-arm64 runtimes ship +no `slang-tint` library and contain no Tint code. + +Tint is developed as part of Dawn and shares its license. Reproduced below in +full from upstream's LICENSE, with the source-comment markers of the original +file removed and no other alteration: + +Copyright 2017-2023 The Dawn & Tint Authors + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +############################################################ +APPENDIX A -- APACHE LICENSE, VERSION 2.0 +############################################################ + +The sections above that cite the Apache License 2.0 -- Slang, glslang, +SPIRV-Tools and slang-llvm -- refer to the text below. It is reproduced +verbatim from glslang's LICENSE.txt and is identical to the copy in +SPIRV-Tools' LICENSE. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Brutal.Slang/Result.cs b/Brutal.Slang/Result.cs new file mode 100644 index 0000000..ddbc105 --- /dev/null +++ b/Brutal.Slang/Result.cs @@ -0,0 +1,57 @@ +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.SlangApi; + +/// +/// Slang's typed return code (originally SlangResult, an int32_t). +/// Negative values indicate failure; non-negative values indicate success. +/// +[StructLayout(LayoutKind.Sequential)] +[NativeMarshalling(typeof(ResultMarshaller))] +public readonly struct Result : IEquatable +{ + public int Value { get; } + + public Result(int value) => Value = value; + + public bool IsSuccess => Value >= 0; + public bool IsFailure => Value < 0; + + public void ThrowIfFailure() + { + if (IsFailure) + throw new SlangException(this); + } + + public static implicit operator int(Result r) => r.Value; + + public static explicit operator Result(int v) => new(v); + + public bool Equals(Result other) => Value == other.Value; + + public override bool Equals(object? obj) => obj is Result r && Equals(r); + + public override int GetHashCode() => Value; + + public static bool operator ==(Result a, Result b) => a.Value == b.Value; + + public static bool operator !=(Result a, Result b) => a.Value != b.Value; + + public override string ToString() => $"0x{Value:X8}"; +} + +/// +/// Marshals as a plain int across the interop boundary. +/// Without this, the [GeneratedComInterface] source generator emits +/// delegate* unmanaged[MemberFunction]<…, Result> which on x64 Windows +/// can cause the runtime to pass a hidden return pointer, shifting all arguments +/// and triggering an access violation in the native COM vtable call. +/// +[CustomMarshaller(typeof(Result), MarshalMode.Default, typeof(ResultMarshaller))] +internal static class ResultMarshaller +{ + public static int ConvertToUnmanaged(Result managed) => managed.Value; + + public static Result ConvertToManaged(int unmanaged) => new(unmanaged); +} diff --git a/Brutal.Slang/Slang.cs b/Brutal.Slang/Slang.cs new file mode 100644 index 0000000..f220cc2 --- /dev/null +++ b/Brutal.Slang/Slang.cs @@ -0,0 +1,168 @@ +using System.Runtime.InteropServices.Marshalling; + +namespace Brutal.SlangApi; + +/// +/// The Slang class provides access to the slang library for compiling shaders. +/// +/// +/// Slang COM proxies (returned by , +/// , etc.) are released by the ComWrappers +/// finalizer when GC reclaims the managed proxy. There is no deterministic +/// Dispose. Callers don't need to do anything special. COM proxies in this +/// binding represent shared-ownership references; the underlying slang object stays +/// alive as long as anything (slang internals, other proxies, or the global session) +/// holds a reference, regardless of when any single proxy is collected. +/// +public static partial class Slang +{ + /// + /// instance used to bridge raw COM pointers obtained from + /// slang_* entry points (e.g. ) + /// into managed [GeneratedComInterface] proxies. The default + /// implementation discovers proxy classes + /// emitted by the source generator from the type's IID, so no per-interface + /// registration is needed. + /// + internal static readonly StrategyBasedComWrappers ComWrappers = new(); + + public static partial class PInvoke + { + static PInvoke() + { + var assembly = typeof(Slang).Assembly; + + var nativeDll = NativeLibrary.Load("slang", assembly, DllImportSearchPath.AssemblyDirectory); + + NativeLibrary.SetDllImportResolver( + assembly, + (libraryName, _, _) => libraryName == "slang" ? nativeDll : IntPtr.Zero + ); + } + } + + /// + /// Throwing form of : + /// returns a managed COM proxy on success, throws + /// on failure or if the native call succeeds but yields + /// a null session pointer. + /// + public static IGlobalSession CreateGlobalSession(Int apiVersion = Constants.ApiVersion) => + Unwrap(TryCreateGlobalSession(apiVersion, out var session), session); + + /// + /// Result-returning form: invokes slang_createGlobalSession and wraps the raw + /// IUnknown pointer it produces into a managed . The + /// out-parameter is null when the call fails or the + /// native side returns a null pointer. + /// + public static Result TryCreateGlobalSession(Int apiVersion, out IGlobalSession? session) + { + var hr = PInvoke.slang_createGlobalSession(apiVersion, out var raw); + session = WrapComInstance(hr, raw); + return hr; + } + + public static IGlobalSession CreateGlobalSession(in GlobalSessionDesc desc) => + Unwrap(TryCreateGlobalSession(in desc, out var session), session); + + public static Result TryCreateGlobalSession(in GlobalSessionDesc desc, out IGlobalSession? session) + { + var hr = PInvoke.slang_createGlobalSession2(in desc, out var raw); + session = WrapComInstance(hr, raw); + return hr; + } + + public static IGlobalSession CreateGlobalSessionWithoutCoreModule(Int apiVersion = Constants.ApiVersion) => + Unwrap(TryCreateGlobalSessionWithoutCoreModule(apiVersion, out var session), session); + + public static Result TryCreateGlobalSessionWithoutCoreModule(Int apiVersion, out IGlobalSession? session) + { + var hr = PInvoke.slang_createGlobalSessionWithoutCoreModule(apiVersion, out var raw); + session = WrapComInstance(hr, raw); + return hr; + } + + /// + /// Creates an over a copy of . Slang + /// allocates and owns the blob's storage, so the input span doesn't need to outlive + /// the call. Throws if slang returns a null pointer (typically an out-of-memory + /// condition). + /// + public static unsafe ISlangBlob CreateBlob(ReadOnlySpan data) + { + nint raw; + fixed (byte* p = data) + raw = PInvoke.slang_createBlob(p, (Brutal.ByteSize64)data.Length); + if (raw == 0) + throw new SlangException((Result)(-1), "slang_createBlob returned a null pointer."); + return (ISlangBlob)ComWrappers.GetOrCreateObjectForComInstance(raw, CreateObjectFlags.None); + } + + /// + /// Throwing form of . + /// Returns the textual-disassembly blob produced by slang from + /// . Throws on failure or if slang reports success with + /// a null pointer. + /// + public static ISlangBlob DisassembleByteCode(ISlangBlob moduleBlob) => + Unwrap(TryDisassembleByteCode(moduleBlob, out var disassembly), disassembly); + + /// + /// Result-returning form: converts to a raw COM pointer + /// for the duration of the flat-C slang_disassembleByteCode call (releasing + /// the extra reference afterwards) and wraps the returned pointer back into a managed + /// . The out-parameter is null + /// when the call fails or slang returns a null pointer. + /// + public static Result TryDisassembleByteCode(ISlangBlob moduleBlob, out ISlangBlob? disassembly) + { + var rawIn = GetComInstance(moduleBlob); + try + { + var hr = PInvoke.slang_disassembleByteCode(rawIn, out var rawOut); + disassembly = WrapComInstance(hr, rawOut); + return hr; + } + finally + { + Marshal.Release(rawIn); + } + } + + /// + /// Throws if the result is a failure, or if a successful result was paired with a + /// null COM proxy (which indicates the native side handed back a null pointer + /// despite reporting success). + /// + private static T Unwrap(Result hr, T? session) + where T : class + { + hr.ThrowIfFailure(); + return session + ?? throw new SlangException(hr, $"slang returned a success Result with a null {typeof(T).Name}."); + } + + /// + /// Wraps a raw COM IUnknown pointer into a managed proxy of the requested + /// interface type. Returns null when the underlying call failed or the + /// native side handed back a null pointer. + /// + internal static T? WrapComInstance(Result hr, nint comInstance) + where T : class + { + if (hr.IsFailure || comInstance == 0) + return null; + return (T)ComWrappers.GetOrCreateObjectForComInstance(comInstance, CreateObjectFlags.None); + } + + /// + /// Returns the underlying COM IUnknown pointer for a managed proxy. Used by + /// callers passing managed COM objects into deprecated sp* PInvokes which + /// take raw nint pointers. The returned pointer carries an extra reference + /// count. Call on it when finished, or pass it to + /// APIs that take ownership. + /// + public static nint GetComInstance(object comObject) => + ComWrappers.GetOrCreateComInterfaceForObject(comObject, CreateComInterfaceFlags.None); +} diff --git a/Brutal.Slang/SlangException.cs b/Brutal.Slang/SlangException.cs new file mode 100644 index 0000000..f6ec6d6 --- /dev/null +++ b/Brutal.Slang/SlangException.cs @@ -0,0 +1,28 @@ +namespace Brutal.SlangApi; + +/// +/// Thrown by the throwing form of generated COM-interface extension methods when an +/// underlying call returns a failing . +/// +public sealed class SlangException : Exception +{ + public Result Result { get; } + + public SlangException(Result result) + : base($"Slang call failed with result {result}.") + { + Result = result; + } + + public SlangException(Result result, string message) + : base(message) + { + Result = result; + } + + public SlangException(Result result, string message, Exception innerException) + : base(message, innerException) + { + Result = result; + } +} diff --git a/Brutal.Stb/DataType.cs b/Brutal.Stb/DataType.cs new file mode 100644 index 0000000..e145041 --- /dev/null +++ b/Brutal.Stb/DataType.cs @@ -0,0 +1,14 @@ +namespace Brutal.StbApi; + +public static partial class Stb +{ + /// + /// Describes the types of pixel channel data supported by Stb + /// + public enum DataType + { + _8Bit, + _16Bit, + Float, + } +} diff --git a/Brutal.Stb/LICENSES/BRUTAL-STB-THIRD-PARTY-NOTICES.txt b/Brutal.Stb/LICENSES/BRUTAL-STB-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..772b10e --- /dev/null +++ b/Brutal.Stb/LICENSES/BRUTAL-STB-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,65 @@ +Brutal.Stb redistributes the third-party components listed below. Each is +reproduced with the license that governs it. + +============================================================ +stb -- MIT OR Unlicense -- https://github.com/nothings/stb +Compiled: stb_image v2.30, stb_image_write v1.16, at commit f58f558 +Shipped as: stb.dll / libstb.so / libstb.dylib +============================================================ + +Upstream offers both licenses and both are reproduced below. + +Only the headers named above are compiled in. The rest of upstream's collection, +stb_truetype among them, does not reach the libraries shipped here. + +Two parts of those headers carry upstream attributions to other authors, and both +are present in the binaries. Upstream states them as follows. + + The GIF loader in stb_image is described upstream as "public domain by + Jean-Marc Lienher -- simplified/shrunk by stb". + + The JPEG writer in stb_image_write is described upstream as based on + jo_jpeg.cpp by Jon Olick, "public domain Simple, Minimalistic JPEG writer". + Upstream's contributor list credits Jon Olick with the original jo_jpeg.cpp + code. + +Both declarations are reported as upstream states them. The license below is the +one upstream applies to the headers in which that code sits. + +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Brutal.Stb/Stb.cs b/Brutal.Stb/Stb.cs new file mode 100644 index 0000000..76d8ca8 --- /dev/null +++ b/Brutal.Stb/Stb.cs @@ -0,0 +1,501 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using Brutal.Strings; + +// ReSharper disable MemberCanBePrivate.Global + +namespace Brutal.StbApi; + +public static partial class Stb +{ + /// + /// Load image from file using 8-bits-per-channel interface. + /// + /// Name of the file to load + /// If non-zero, the number of image components requested in the result + /// Byte* which points to the pixel data, or nullptr on an allocation failure or if the image is corrupt or invalid. + /// + /// The pixel data consists of *y scanlines of *x pixels, + /// with each pixel consisting of N interleaved 8-bit components; the first + /// pixel pointed to is top-left-most in the image. There is no padding between + /// image scanlines or between pixels, regardless of format. The number of + /// components N is 'desired_channels' if desired_channels is non-zero, or + /// *channels_in_file otherwise. If desired_channels is non-zero, + /// *channels_in_file has the number of components that _would_ have been + /// output otherwise. E.g. if you set desired_channels to 4, you will always + /// get RGBA output, but you can check *channels_in_file to see if it's trivially + /// opaque because e.g. there were only 3 channels in the source image. + /// + public static unsafe StbImage8 Load(string fileName, int desiredChannels = 0) + { + ValidateDesiredChannels(desiredChannels); + + var ptr = PInvoke.stbi_load(fileName, out var width, out var height, out var channelsInFile, desiredChannels); + + return new StbImage8(ptr, width, height, desiredChannels != 0 ? desiredChannels : channelsInFile); + } + + /// + /// Load image from memory using 8-bits-per-channel interface. + /// + /// Load + public static unsafe StbImage8 LoadFromMemory(ReadOnlySpan buffer, int desiredChannels = 0) + { + ValidateDesiredChannels(desiredChannels); + + var ptr = PInvoke.stbi_load_from_memory( + buffer, + buffer.Length, + out var width, + out var height, + out var channelsInFile, + desiredChannels + ); + + return new StbImage8(ptr, width, height, desiredChannels != 0 ? desiredChannels : channelsInFile); + } + + /// + /// Load image from file using 16-bits-per-channel interface. + /// + /// Load + public static unsafe StbImage16 Load16(string fileName, int desiredChannels = 0) + { + ValidateDesiredChannels(desiredChannels); + + var ptr = PInvoke.stbi_load_16( + fileName, + out var width, + out var height, + out var channelsInFile, + desiredChannels + ); + + return new StbImage16(ptr, width, height, desiredChannels != 0 ? desiredChannels : channelsInFile); + } + + /// + /// Load image from memory using 16-bits-per-channel interface. + /// + /// Load + public static unsafe StbImage16 Load16FromMemory(ReadOnlySpan buffer, int desiredChannels = 0) + { + ValidateDesiredChannels(desiredChannels); + + var ptr = PInvoke.stbi_load_16_from_memory( + buffer, + buffer.Length, + out var width, + out var height, + out var channelsInFile, + desiredChannels + ); + + return new StbImage16(ptr, width, height, desiredChannels != 0 ? desiredChannels : channelsInFile); + } + + /// + /// Load image from file using float-per-channel interface. + /// + /// Load + public static unsafe StbImageF LoadF(string fileName, int desiredChannels = 0) + { + ValidateDesiredChannels(desiredChannels); + + var ptr = PInvoke.stbi_loadf(fileName, out var width, out var height, out var channelsInFile, desiredChannels); + + return new StbImageF(ptr, width, height, desiredChannels != 0 ? desiredChannels : channelsInFile); + } + + /// + /// Load image from memory using float-per-channel interface. + /// + /// Load + public static unsafe StbImageF LoadFFromMemory(ReadOnlySpan buffer, int desiredChannels = 0) + { + ValidateDesiredChannels(desiredChannels); + + var ptr = PInvoke.stbi_loadf_from_memory( + buffer, + buffer.Length, + out var width, + out var height, + out var channelsInFile, + desiredChannels + ); + + return new StbImageF(ptr, width, height, desiredChannels != 0 ? desiredChannels : channelsInFile); + } + + /// + /// Creates a png image and writes to file + /// + /// The name of the file to create + /// The image width + /// The image height + /// The number of channels per pixel + /// The image data, a pointer to the first byte of the top-left-most pixel + /// The distance in bytes from the first byte of a row of pixels to the first byte of the next row of pixels + /// True on success + /// + /// The image is a rectangle of pixels stored from left-to-right, top-to-bottom. + /// Each pixel contains 'comp' channels of data stored interleaved with 8-bits + /// per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is + /// monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. + /// + /// PNG creates output files with the same number of components as the input. + /// + /// PNG supports writing rectangles of data even when the bytes storing rows of + /// data are not consecutive in memory (e.g. sub-rectangles of a larger image), + /// by supplying the stride between the beginning of adjacent rows. The other + /// formats do not. (Thus you cannot write a native-format BMP through the BMP + /// writer, both because it is in BGR order and because it may have padding + /// at the end of the line.) + /// + /// PNG allows you to set the deflate compression level by setting the global + /// variable 'stbi_write_png_compression_level' (it defaults to 8). + /// + public static bool WritePng( + string fileName, + int width, + int height, + int channels, + ReadOnlySpan data, + int rowStrideInBytes = 0 + ) + { + return PInvoke.stbi_write_png( + fileName, + width, + height, + channels, + data, + rowStrideInBytes != 0 ? rowStrideInBytes : width * channels + ); + } + + public static bool WritePng(string fileName, StbImage8 image) + { + return WritePng( + fileName, + image.Width, + image.Height, + image.Channels, + image.AsSpan(), + image.Width * image.Channels + ); + } + + /// + /// Creates a bmp image and writes to file + /// + /// The name of the file to create + /// The image width + /// The image height + /// The number of channels per pixel + /// The image data, a pointer to the first byte of the top-left-most pixel + /// True on success + /// + /// The image is a rectangle of pixels stored from left-to-right, top-to-bottom. + /// Each pixel contains 'comp' channels of data stored interleaved with 8-bits + /// per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is + /// monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. + /// + /// The BMP format expands Y to RGB in the file format and does not output alpha. + /// + public static bool WriteBmp(string fileName, int width, int height, int channels, ReadOnlySpan data) + { + return PInvoke.stbi_write_bmp(fileName, width, height, channels, data); + } + + public static bool WriteBmp(string fileName, StbImage8 image) + { + return WriteBmp(fileName, image.Width, image.Height, image.Channels, image.AsSpan()); + } + + /// + /// Creates a tga image and writes to file + /// + /// The name of the file to create + /// The image width + /// The image height + /// The number of channels per pixel + /// The image data, a pointer to the first byte of the top-left-most pixel + /// True on success + /// + /// The image is a rectangle of pixels stored from left-to-right, top-to-bottom. + /// Each pixel contains 'comp' channels of data stored interleaved with 8-bits + /// per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is + /// monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. + /// + /// TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed + /// data, set the global variable 'stbi_write_tga_with_rle' to 0. + /// + public static bool WriteTga(string fileName, int width, int height, int channels, ReadOnlySpan data) + { + return PInvoke.stbi_write_tga(fileName, width, height, channels, data); + } + + public static bool WriteTga(string fileName, StbImage8 image) + { + return WriteTga(fileName, image.Width, image.Height, image.Channels, image.AsSpan()); + } + + /// + /// Creates a hdr image and writes to file + /// + /// The name of the file to create + /// The image width + /// The image height + /// The number of channels per pixel + /// The image data, a pointer to the first byte of the top-left-most pixel + /// True on success + /// + /// The image is a rectangle of pixels stored from left-to-right, top-to-bottom. + /// Each pixel contains 'comp' channels of data stored interleaved with one float + /// per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is + /// monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. + /// + /// HDR expects linear float data. Since the format is always 32-bit rgb(e) + /// data, alpha (if provided) is discarded, and for monochrome data it is + /// replicated across all three channels. + /// + public static bool WriteHdr(string fileName, int width, int height, int channels, ReadOnlySpan data) + { + return PInvoke.stbi_write_hdr(fileName, width, height, channels, data); + } + + public static bool WriteHdr(string fileName, StbImageF image) + { + return WriteHdr(fileName, image.Width, image.Height, image.Channels, image.AsSpan()); + } + + /// + /// Creates a jpg image and writes to file + /// + /// The name of the file to create + /// The image width + /// The image height + /// The number of channels per pixel + /// The image data, a pointer to the first byte of the top-left-most pixel + /// The compression quality to use, 1 lowest to 100 highest. + /// True on success + /// + /// The image is a rectangle of pixels stored from left-to-right, top-to-bottom. + /// Each pixel contains 'comp' channels of data stored interleaved with one float + /// per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is + /// monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. + /// + /// JPEG does ignore alpha channels in input data; quality is between 1 and 100. + /// Higher quality looks better but results in a bigger image. + /// JPEG baseline (no JPEG progressive). + /// + public static bool WriteJpg( + string fileName, + int width, + int height, + int channels, + ReadOnlySpan data, + int quality + ) + { + return PInvoke.stbi_write_jpg(fileName, width, height, channels, data, quality); + } + + public static bool WriteJpg(string fileName, StbImage8 image, int quality) + { + return WriteJpg(fileName, image.Width, image.Height, image.Channels, image.AsSpan(), quality); + } + + /// + /// Get a brief reason for the most recent failure + /// + /// + /// A string describing the failure reason, or an empty string when no image operation has failed + /// + public static unsafe bool TryGetFailureReason([NotNullWhen(true)] out string? failureReason) + { + var reason = PInvoke.stbi_failure_reason(); + failureReason = reason == null ? null : Utf8.GetString(reason); + + return !string.IsNullOrEmpty(failureReason); + } + + /// + /// Checks whether the file at this path contains HDR data + /// + /// + /// Specifically checks whether this file has a Radiance RGBE header (which would typically be a .hdr file) + /// + /// The path of the file to check + /// True if the file is HDR + public static bool IsHdr(string fileName) + { + return PInvoke.stbi_is_hdr(fileName); + } + + /// + /// Checks whether the data in this buffer contains HDR image data + /// + /// + /// Specifically checks whether this data has a Radiance RGBE header (which would typically be a .hdr file) + /// + /// The data to check + /// True if the data is HDR + public static bool IsHdrFromMemory(ReadOnlySpan buffer) + { + return PInvoke.stbi_is_hdr_from_memory(buffer, buffer.Length); + } + + /// + /// Checks whether the file at this path contains 16-bit-per-channel data + /// + /// The path of the file to check + /// True if the file is 16 bit + public static bool Is16Bit(string fileName) + { + return PInvoke.stbi_is_16_bit(fileName); + } + + /// + /// Checks whether the data in this buffer contains 16-bit-per-channel image data + /// + /// The data to check + /// True if the data is 16 bit + public static bool Is16BitFromMemory(ReadOnlySpan buffer) + { + return PInvoke.stbi_is_16_bit_from_memory(buffer, buffer.Length); + } + + private static void ValidateDesiredChannels(int desiredChannels) + { + // stb interprets 0 as "keep the source channel count" and 1-4 as grey, grey+alpha, RGB, RGBA. + ArgumentOutOfRangeException.ThrowIfNegative(desiredChannels); + ArgumentOutOfRangeException.ThrowIfGreaterThan(desiredChannels, 4); + } + + internal static partial class PInvoke + { + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial byte* stbi_load( + string fileName, + out int width, + out int height, + out int channelsInFile, + int desiredChannels + ); + + [LibraryImport("stb")] + public static unsafe partial byte* stbi_load_from_memory( + ReadOnlySpan buffer, + int len, + out int width, + out int height, + out int channelsInFile, + int desiredChannels + ); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial ushort* stbi_load_16( + string fileName, + out int width, + out int height, + out int channelsInFile, + int desiredChannels + ); + + [LibraryImport("stb")] + public static unsafe partial ushort* stbi_load_16_from_memory( + ReadOnlySpan buffer, + int len, + out int width, + out int height, + out int channelsInFile, + int desiredChannels + ); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial float* stbi_loadf( + string fileName, + out int width, + out int height, + out int channelsInFile, + int desiredChannels + ); + + [LibraryImport("stb")] + public static unsafe partial float* stbi_loadf_from_memory( + ReadOnlySpan buffer, + int len, + out int width, + out int height, + out int channelsInFile, + int desiredChannels + ); + + [LibraryImport("stb")] + public static unsafe partial void stbi_image_free(void* data); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_write_png( + string fileName, + int width, + int height, + int comp, + ReadOnlySpan data, + int strideInBytes + ); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_write_bmp( + string fileName, + int width, + int height, + int comp, + ReadOnlySpan data + ); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_write_tga( + string fileName, + int width, + int height, + int comp, + ReadOnlySpan data + ); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_write_hdr( + string fileName, + int width, + int height, + int comp, + ReadOnlySpan data + ); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_write_jpg( + string fileName, + int width, + int height, + int comp, + ReadOnlySpan data, + int quality + ); + + [LibraryImport("stb")] + public static unsafe partial byte* stbi_failure_reason(); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_is_16_bit(string fileName); + + [LibraryImport("stb")] + public static unsafe partial Bool32 stbi_is_16_bit_from_memory(ReadOnlySpan buffer, int len); + + [LibraryImport("stb", StringMarshalling = StringMarshalling.Utf8)] + public static unsafe partial Bool32 stbi_is_hdr(string fileName); + + [LibraryImport("stb")] + public static unsafe partial Bool32 stbi_is_hdr_from_memory(ReadOnlySpan buffer, int len); + } +} diff --git a/Brutal.Stb/StbImage16.cs b/Brutal.Stb/StbImage16.cs new file mode 100644 index 0000000..e517989 --- /dev/null +++ b/Brutal.Stb/StbImage16.cs @@ -0,0 +1,39 @@ +using Brutal.Numerics; + +namespace Brutal.StbApi; + +public readonly unsafe struct StbImage16(ushort* inData, int inWidth, int inHeight, int inChannels) + : INullable, + IDisposable +{ + public readonly ushort* Data = inData; + public readonly int Width = inWidth; + public readonly int Height = inHeight; + public readonly int Channels = inChannels; + + public Span AsSpan() + { + return new Span(Data, Width * Height * Channels); + } + + public Span AsSpan() + where T : IVector + { + if (T.ComponentCount != Channels) + throw new InvalidOperationException( + $"Cannot convert to Span<{typeof(T).Name}> because it has {T.ComponentCount} components, but the image has {Channels} channels." + ); + + return new Span(Data, Width * Height); + } + + public void Dispose() + { + Stb.PInvoke.stbi_image_free(Data); + } + + public bool IsNull() + { + return Data == null; + } +} diff --git a/Brutal.Stb/StbImage8.cs b/Brutal.Stb/StbImage8.cs new file mode 100644 index 0000000..7c2df47 --- /dev/null +++ b/Brutal.Stb/StbImage8.cs @@ -0,0 +1,39 @@ +using Brutal.Numerics; + +namespace Brutal.StbApi; + +public readonly unsafe struct StbImage8(byte* inData, int inWidth, int inHeight, int inChannels) + : INullable, + IDisposable +{ + public readonly byte* Data = inData; + public readonly int Width = inWidth; + public readonly int Height = inHeight; + public readonly int Channels = inChannels; + + public Span AsSpan() + { + return new Span(Data, Width * Height * Channels); + } + + public Span AsSpan() + where T : IVector + { + if (T.ComponentCount != Channels) + throw new InvalidOperationException( + $"Cannot convert to Span<{typeof(T).Name}> because it has {T.ComponentCount} components, but the image has {Channels} channels." + ); + + return new Span(Data, Width * Height); + } + + public void Dispose() + { + Stb.PInvoke.stbi_image_free(Data); + } + + public bool IsNull() + { + return Data == null; + } +} diff --git a/Brutal.Stb/StbImageF.cs b/Brutal.Stb/StbImageF.cs new file mode 100644 index 0000000..93261d4 --- /dev/null +++ b/Brutal.Stb/StbImageF.cs @@ -0,0 +1,39 @@ +using Brutal.Numerics; + +namespace Brutal.StbApi; + +public readonly unsafe struct StbImageF(float* inData, int inWidth, int inHeight, int inChannels) + : INullable, + IDisposable +{ + public readonly float* Data = inData; + public readonly int Width = inWidth; + public readonly int Height = inHeight; + public readonly int Channels = inChannels; + + public Span AsSpan() + { + return new Span(Data, Width * Height * Channels); + } + + public Span AsSpan() + where T : IVector + { + if (T.ComponentCount != Channels) + throw new InvalidOperationException( + $"Cannot convert to Span<{typeof(T).Name}> because it has {T.ComponentCount} components, but the image has {Channels} channels." + ); + + return new Span(Data, Width * Height); + } + + public void Dispose() + { + Stb.PInvoke.stbi_image_free(Data); + } + + public bool IsNull() + { + return Data == null; + } +} diff --git a/Brutal.Strings/ByteSpanDebugView.cs b/Brutal.Strings/ByteSpanDebugView.cs new file mode 100644 index 0000000..4a2e5bd --- /dev/null +++ b/Brutal.Strings/ByteSpanDebugView.cs @@ -0,0 +1,120 @@ +using Brutal.Strings; + +[assembly: DebuggerTypeProxy(typeof(ByteSpanDebugView), Target = typeof(ReadOnlySpan))] +[assembly: DebuggerDisplay( + "{Brutal.Strings.ByteSpanDebugView.DebuggerDisplay(this)}", + Target = typeof(ReadOnlySpan) +)] +[assembly: DebuggerTypeProxy(typeof(ByteSpanDebugView), Target = typeof(Span))] +[assembly: DebuggerDisplay("{Brutal.Strings.ByteSpanDebugView.DebuggerDisplay(this)}", Target = typeof(Span))] +[assembly: DebuggerTypeProxy(typeof(ByteSpanDebugView), Target = typeof(Ptr))] +[assembly: DebuggerDisplay("{Brutal.Strings.ByteSpanDebugView.DebuggerDisplay(this)}", Target = typeof(Ptr))] + +namespace Brutal.Strings; + +/// +/// Allows viewing byte spans as UTF8 strings in the IDE. +/// Does some guesswork (not-100% accurate) to figure out if a span looks like a string vs binary data. +/// +/// Supports ReadOnlySpan<byte>, Span<byte>, Ptr<byte>. +/// The containing assembly has to be loaded for the debug view to work. +/// +/// Source: https://github.com/dotnet/dotnet/blob/main/src/runtime/src/libraries/System.Private.CoreLib/src/System/SpanDebugView.cs +/// +internal sealed class ByteSpanDebugView +{ + public record struct KindContainer(Kind Kind); + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public readonly KindContainer AKind; // hack so that Kind appears first in the view (debugger sorts on field name, using ASCII sort: 'A', then '_', then 'a') + + public readonly string AsUtf8String; + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public readonly byte[] Items; + + public ByteSpanDebugView(ReadOnlySpan value) + { + (var kind, AsUtf8String) = GetInfo(value); + AKind = new KindContainer(kind); + Items = value.ToArray(); + } + + public ByteSpanDebugView(Span span) + : this((ReadOnlySpan)span) { } + + public ByteSpanDebugView(Ptr ptr) + : this(Utf8.GetNullTerminatedSpan(ptr)) { } + + public enum Kind + { + NotEvaluated, + Binary, + BinaryMaybe, + Ascii, + Ansi, + Unicode, + } + + static Kind GuessKind(ReadOnlySpan span) + { + var maxChar = 0; + foreach (var c in span) + { + if (char.IsControl(c)) // non-displayable character + return Kind.BinaryMaybe; + maxChar = Math.Max(maxChar, c); + } + + return maxChar < 256 + ? maxChar < 128 + ? Kind.Ascii + : Kind.Ansi + : Kind.Unicode; + } + + static (Kind kind, string value) GetInfo(ReadOnlySpan value) + { + const int maxLength = 128; + if (value.Length > maxLength) + return ( + Kind.NotEvaluated, + $"" + ); + + if (!Utf8.IsValid(value)) + return (Kind.Binary, ""); + + var str = Utf8.GetString(value); + var kind = GuessKind(str); + return (kind, str); + } + + static string DebuggerDisplayInternal(ReadOnlySpan value) + { + var (kind, str) = GetInfo(value); + return kind == Kind.BinaryMaybe ? $" {str}" : str; + } + + static string DebuggerDisplay(ReadOnlySpan value) + //where T : unmanaged // don't add constraints, they break the [assembly: DebuggerDisplay] association... + { + Debug.Assert( + typeof(T) == typeof(byte), + "[DebuggerDisplay] requires a generic signature, but we expect only T=byte" + ); + var bytes = Unsafe.As, ReadOnlySpan>(ref value); + return DebuggerDisplayInternal(bytes); + } + + public static string DebuggerDisplay(Ptr value) + where T : unmanaged + { + Debug.Assert( + typeof(T) == typeof(byte), + "[DebuggerDisplay] requires a generic signature, but we expect only T=byte" + ); + var span = Utf8.GetNullTerminatedSpan(value.Cast()); + return DebuggerDisplay(span); + } +} diff --git a/Brutal.Strings/GlobalUsings.cs b/Brutal.Strings/GlobalUsings.cs new file mode 100644 index 0000000..0fb45af --- /dev/null +++ b/Brutal.Strings/GlobalUsings.cs @@ -0,0 +1,20 @@ +global using System.ComponentModel; +global using System.Diagnostics; +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.Memory; +global using Brutal.Pointers; +global using Brutal.Pointers.Extensions; +global using Brutal.Strings.Extensions; +global using CommunityToolkit.HighPerformance; +global using Char16 = char; +global using Char8 = byte; +global using String16 = string; +global using String16View = System.ReadOnlySpan; +global using String8View = System.ReadOnlySpan; +global using StringBuilder16 = Brutal.Strings.StringBuilder; +global using StringBuilder8 = Brutal.Strings.StringBuilder; +global using ValueStringBuilder16 = Brutal.Strings.ValueStringBuilder; +global using ValueStringBuilder8 = Brutal.Strings.ValueStringBuilder; + +[assembly: InternalsVisibleTo("Brutal.Strings.Tests")] diff --git a/Brutal.Strings/IString.cs b/Brutal.Strings/IString.cs new file mode 100644 index 0000000..16a926e --- /dev/null +++ b/Brutal.Strings/IString.cs @@ -0,0 +1,13 @@ +namespace Brutal.Strings; + +public interface IString + where TChar : unmanaged +{ + public ReadOnlySpan Chars { get; } + public int Length { get; } + public bool IsEmpty { get; } + + public TChar this[int index] { get; } + + public ReadOnlySpan AsSpan(); +} diff --git a/Brutal.Strings/IString8.cs b/Brutal.Strings/IString8.cs new file mode 100644 index 0000000..5cbc473 --- /dev/null +++ b/Brutal.Strings/IString8.cs @@ -0,0 +1,15 @@ +namespace Brutal.Strings; + +public interface IString8 : IString +{ + public String16 ToString16(); +} + +public static class IString8Extensions +{ + public static void CopyTo(this T source, Span destination) + where T : IString8, allows ref struct + { + source.Chars.CopyTo(destination); + } +} diff --git a/Brutal.Strings/RefString8Array.cs b/Brutal.Strings/RefString8Array.cs new file mode 100644 index 0000000..44cb1dc --- /dev/null +++ b/Brutal.Strings/RefString8Array.cs @@ -0,0 +1,132 @@ +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.Strings; + +public ref struct RefString8Array(ElementCount length, ByteSize numBytes) : IDisposable +{ + private readonly SpanOwner _owner = SpanOwner.Allocate( + (int)(numBytes + ByteSize.Of(length) + ByteSize.Of(length)) + ); + + public ElementCount Count; + public ElementCount Length = length; + public ByteSize NumBytes = numBytes; + private bool _disposed = false; + + public RefString8Array(ReadOnlySpan strings) + : this(strings.Length, GetTotalByteCount(strings)) + { + var written = 0; + + var bytes = _owner.Span; + var offsets = bytes[(int)NumBytes..].Cast(); + + for (var i = 0; i < strings.Length; i++) + { + // Assert null terminator + Debug.Assert(written == 0 || bytes[written - 1] == 0); + + offsets[i] = written; + + written += Utf8.GetBytes(strings[i], bytes[written..]); + bytes[written++] = 0; + } + + Debug.Assert(written == (int)NumBytes); + } + + public RefString8Array(ReadOnlySpan strings) + : this(strings.Length, GetTotalByteCount(strings)) + { + var written = 0; + + var bytes = _owner.Span; + var offsets = bytes[(int)NumBytes..].Cast(); + + for (var i = 0; i < strings.Length; i++) + { + // Assert null terminator + Debug.Assert(written == 0 || bytes[written - 1] == 0); + + offsets[i] = written; + strings[i].CopyTo(bytes[written..]); + written += strings[i].Length; + bytes[written++] = 0; + } + + Debug.Assert(written == (int)NumBytes); + } + + public unsafe Char8** CommitFixedRegion(Char8* fixedPointer) + { + if (_disposed) + throw new ObjectDisposedException(nameof(RefString8Array)); + Debug.Assert(fixedPointer == Unsafe.AsPointer(ref _owner.Span[0])); + + var bytes = new Span(fixedPointer, _owner.Span.Length); + var offsets = bytes[(int)NumBytes..].Cast(); + var pointers = offsets[(int)Length..].Cast(); + + for (var i = 0; i < Length; i++) + { + pointers[i] = (nint)fixedPointer + offsets[i]; + } + + return (Char8**)pointers.AsPointer(); + } + + public void AppendString(ReadOnlySpan str) + { + if (_disposed) + throw new ObjectDisposedException(nameof(RefString8Array)); + if (Count == Length) + throw new InvalidOperationException("Array is full"); + + _owner.Span[(int)(NumBytes + ByteSize.Of(Count))] = (Char8)str.Length; + str.CopyTo(_owner.Span[(int)(NumBytes + ByteSize.Of(Count) + 1)..]); + Count++; + } + + public static ByteSize GetTotalByteCount(ReadOnlySpan strings) + { + var count = 0; + foreach (var str in strings) + count += str.Length + 1; + return (ByteSize)count; + } + + public static ByteSize GetTotalByteCount(ReadOnlySpan strings) + { + var count = 0; + foreach (var str in strings) + count += Utf8.GetByteCount(str) + 1; + return (ByteSize)count; + } + + public ref Char8 GetPinnableReference() + { + if (_disposed) + throw new ObjectDisposedException(nameof(RefString8Array)); + return ref _owner.Span[0]; + } + + public static implicit operator RefString8Array(ReadOnlySpan strings) => new(strings); + + public static implicit operator RefString8Array(ReadOnlySpan strings) => new(strings); + + public static implicit operator RefString8Array(Span strings) => new(strings); + + public static implicit operator RefString8Array(Span strings) => new(strings); + + public static implicit operator RefString8Array(String8[] strings) => new(strings); + + public static implicit operator RefString8Array(String16[] strings) => new(strings); + + public void Dispose() + { + if (_disposed) + return; + _disposed = true; + _owner.Dispose(); + } +} diff --git a/Brutal.Strings/SpanExtensions.cs b/Brutal.Strings/SpanExtensions.cs new file mode 100644 index 0000000..d2d2e4a --- /dev/null +++ b/Brutal.Strings/SpanExtensions.cs @@ -0,0 +1,14 @@ +namespace Brutal.Strings.Extensions; + +public static class SpanExtensions +{ + public static String16 ToString16(this Span span) + { + return Utf8.GetString(span); + } + + public static String16 ToString16(this String8View span) + { + return Utf8.GetString(span); + } +} diff --git a/Brutal.Strings/String8/RefString8.cs b/Brutal.Strings/String8/RefString8.cs new file mode 100644 index 0000000..4baf996 --- /dev/null +++ b/Brutal.Strings/String8/RefString8.cs @@ -0,0 +1,118 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal.Attributes; + +namespace Brutal.Strings; + +/// +/// A reference to a null-terminated string of bytes. +/// +[DebuggerDisplay("{ToString16()}")] +[NativeMarshalling(typeof(RefString8Marshaller))] +public readonly ref struct RefString8 : IString8 +{ + private readonly ref Char8 _firstChar; + + public static RefString8 Empty => String8View.Empty; + + /// + /// Create a safe reference to a null-terminated string of bytes. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public RefString8(String8View cString) + { + _firstChar = ref MemoryMarshal.GetReference(cString); + } + + /// + /// Create an unsafe reference to a null-terminated string of bytes. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe RefString8([Fixed] Ptr pointer) + { + _firstChar = ref Unsafe.AsRef(pointer); + } + + /// + /// Get a reference to the first character of the string. + /// + public ref Char8 FirstChar + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => ref _firstChar; + } + + /// + /// Implicit conversion from a null-terminated string of bytes to a RefString8. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator RefString8([Fixed] Ptr cString) + { + return new RefString8(cString); + } + + /// + /// Implicit conversion from a String8View to a RefString8. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator RefString8(String8View bytes) + { + return new RefString8(bytes); + } + + /// + /// Implicit conversion from a Span<Char8> to a RefString8. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator RefString8(Span bytes) + { + return new RefString8(bytes); + } + + /// + /// Implicit conversion from a byte array to a RefString8. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator RefString8(Char8[] bytes) + { + return new RefString8(bytes); + } + + /// + /// Implicit conversion from a String8 to a RefString8. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator RefString8(String8 cString) + { + return new RefString8(cString.AsSpan()); + } + + public static implicit operator String8View(RefString8 str) + { + return str.Chars; + } + + /// + /// Get a reference to the first character of the string. + /// + public ref Char8 GetPinnableReference() + { + return ref _firstChar; + } + + public unsafe String8View Chars => Utf8.GetNullTerminatedSpan((Ptr)Unsafe.AsPointer(ref _firstChar)); + public int Length => Chars.Length; + public bool IsEmpty => Unsafe.IsNullRef(ref _firstChar) || _firstChar == 0; + + public Char8 this[int index] => Chars[index]; + public String8View this[Range range] => Chars[range]; + + public String8View AsSpan() + { + return Chars; + } + + public String16 ToString16() + { + return Utf8.GetString(Chars); + } +} diff --git a/Brutal.Strings/String8/RefString8Marshaller.cs b/Brutal.Strings/String8/RefString8Marshaller.cs new file mode 100644 index 0000000..d83c022 --- /dev/null +++ b/Brutal.Strings/String8/RefString8Marshaller.cs @@ -0,0 +1,33 @@ +using System.Runtime.InteropServices.Marshalling; +using Brutal.Attributes; + +namespace Brutal.Strings; + +[CustomMarshaller( + managedType: typeof(RefString8), + marshalMode: MarshalMode.ManagedToUnmanagedIn, + marshallerType: typeof(RefString8Marshaller) +)] +[CustomMarshaller( + managedType: typeof(RefString8), + marshalMode: MarshalMode.UnmanagedToManagedIn, + marshallerType: typeof(RefString8Marshaller) +)] +public static class RefString8Marshaller +{ + public static unsafe Char8* ConvertToUnmanaged(RefString8 managed) + { + return (Char8*)Unsafe.AsPointer(ref managed.GetPinnableReference()); + } + + // pointer is [Fixed] because it originates from native interop / owned by the unmanaged side + public static unsafe RefString8 ConvertToManaged([Fixed] Char8* unmanaged) + { + return new RefString8(unmanaged); + } + + public static ref Char8 GetPinnableReference(RefString8 managed) + { + return ref managed.GetPinnableReference(); + } +} diff --git a/Brutal.Strings/String8/String8.cs b/Brutal.Strings/String8/String8.cs new file mode 100644 index 0000000..147f24d --- /dev/null +++ b/Brutal.Strings/String8/String8.cs @@ -0,0 +1,204 @@ +namespace Brutal.Strings; + +/// +/// Represents a string backed by an array of bytes. +/// +/// +/// Typically, but not necessarily, the bytes are UTF-8 encoded. Note that this type doesn't provide any special UTF-8 functionality. +/// +[DebuggerDisplay("{ToString16()}")] +public class String8 : IString8, IEquatable, IComparable, IComparable, ICloneable +{ + /// the default array backing any empty-initialized String8 + private static readonly Char8[] EmptyChars = [0]; + + /// + /// An empty string8. + /// + public static readonly String8 Empty = new(); + + /// WARNING: This array contains a trailing null byte. + private readonly Char8[] _bytes; + + public String8View Chars => _bytes.AsSpan()[..^1]; + + /// + /// Construct an empty string. + /// + public String8() + { + _bytes = EmptyChars; + } + + /// + /// Construct a string from a list of characters (converting to UTF-8 in the process). + /// + public String8(String16View characters) + { + if (characters.IsEmpty) + { + _bytes = EmptyChars; + } + else + { + _bytes = new Char8[Utf8.GetByteCount(characters) + 1]; + Utf8.GetBytes(characters, _bytes); + } + } + + /// + /// Construct a string from a list of bytes (no conversion, but copies). + /// + /// + public String8(String8View bytes) + { + if (bytes.IsEmpty) + { + _bytes = EmptyChars; + } + else + { + _bytes = new Char8[bytes.Length + 1]; + bytes.CopyTo(_bytes); + } + } + + /// + /// Construct a string from an existing array of bytes. + /// + /// + /// Private because this behavior is dangerous if the array can be modified after construction. + /// + private String8(Char8[] bytes) + { + if (bytes[^1] != 0) + throw new ArgumentException("'bytes' must be null-terminated!", nameof(bytes)); + + _bytes = bytes.Length != 0 ? bytes : EmptyChars; + } + + /// + /// The length of the string in bytes. + /// + public int Length => _bytes.Length - 1; + + public bool IsEmpty => Length == 0; + + /// + /// Create a new String8 from a slice of the current string. + /// + public String8 Slice(int startIndex) + { + return new String8(Chars[startIndex..]); + } + + /// + /// Create a new String8 from a slice of the current string. + /// + public String8 Slice(int startIndex, int count) + { + return new String8(Chars[startIndex..(startIndex + count)]); + } + + public Char8 this[int index] => Chars[index]; + public String8 this[Range range] => new String8(Chars[range]); + + public object Clone() + { + // do not call the byte[] constructor here! + return new String8(AsSpan()); + } + + #region Operators + + public static implicit operator String8View(String8 str) + { + return str.Chars; + } + + public static implicit operator String8(String8View str) + { + return new String8(str); + } + + #endregion + + public String8View AsSpan() + { + return Chars; + } + + public string ToString16() + { + return Utf8.GetString(Chars); + } + + // Equality and comparison implementations + public bool Equals(String8? other) + { + if (ReferenceEquals(this, other)) + return true; + if (other is null || Length != other.Length) + return false; + return Chars.SequenceEqual(other.Chars); + } + + public override bool Equals(object? obj) + { + return obj is String8 other && Equals(other); + } + + public override int GetHashCode() + { + return Chars.GetDjb2HashCode(); + } + + public int CompareTo(object? obj) + { + if (obj is null) + return 1; + if (obj is not String8 other) + throw new ArgumentException("Object must be of type String8.", nameof(obj)); + return CompareTo(other); + } + + public int CompareTo(String8? other) + { + if (other is null) + return 1; + return Chars.AsBytes().SequenceCompareTo(other.Chars); + } + + public static bool operator ==(String8? a, String8? b) + { + if (ReferenceEquals(a, b)) + return true; + if (a is null || b is null) + return false; + return a.Equals(b); + } + + public static bool operator !=(String8? a, String8? b) + { + return !(a == b); + } + + /// + /// Create a new string from existing memory without copying. + /// + /// + /// WARNING: Do not retain the provided bytes after constructing the String8. The String8 instance will take ownership of the memory. + /// + public static String8 Move(Char8[] bytes) + { + if (bytes.Length != 0 && bytes[^1] != 0) + return new String8(bytes.AsSpan()); + + return new String8(bytes); + } + + public ref Char8 GetPinnableReference() + { + return ref _bytes[0]; + } +} diff --git a/Brutal.Strings/String8/String8Extensions.Comparison.cs b/Brutal.Strings/String8/String8Extensions.Comparison.cs new file mode 100644 index 0000000..1591347 --- /dev/null +++ b/Brutal.Strings/String8/String8Extensions.Comparison.cs @@ -0,0 +1,126 @@ +namespace Brutal.Strings; + +public static partial class String8Extensions +{ + private static class Helpers + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int CompareOrdinalHelper( + String8View strA, + int indexA, + int countA, + String8View strB, + int indexB, + int countB + ) + { + Debug.Assert(!strA.IsEmpty); + Debug.Assert(!strB.IsEmpty); + Debug.Assert(indexA >= 0 && indexB >= 0); + Debug.Assert(countA >= 0 && countB >= 0); + Debug.Assert(indexA + countA <= strA.Length && indexB + countB <= strB.Length); + + return strA.Slice(indexA, countA).SequenceCompareTo(strB.Slice(indexB, countB)); + } + + public static int CompareOrdinalHelper(String8View strA, String8View strB) + { + return strA.SequenceCompareTo(strB); + } + } + + // Provides an ordinal string comparison. strA is compared to strB + // to determine whether it is lexicographically less, equal, or greater, and then a + // negative integer, 0, or a positive integer is returned; respectively. + public static int Compare(this TString8 strA, String8View strB) + where TString8 : IString8, allows ref struct + { + // They can't both be null at this point. + if (strA.IsEmpty) + { + return -1; + } + + if (strB.IsEmpty) + { + return 1; + } + + return Helpers.CompareOrdinalHelper(strA.Chars, strB); + } + + // Compares strA and strB using an ordinal (code-point) comparison. + public static int Compare(this TString8 strA, int indexA, String8View strB, int indexB, int length) + where TString8 : IString8, allows ref struct + { + if (strA.IsEmpty || strB.IsEmpty) + { + return strA.IsEmpty ? -1 : 1; + } + + ArgumentOutOfRangeException.ThrowIfNegative(length); + + if (indexA < 0 || indexB < 0) + { + string paramName = indexA < 0 ? nameof(indexA) : nameof(indexB); + throw new ArgumentOutOfRangeException(paramName, "Index cannot be negative."); + } + + int lengthA = Math.Min(length, strA.Length - indexA); + int lengthB = Math.Min(length, strB.Length - indexB); + + if (lengthA < 0 || lengthB < 0) + { + string paramName = lengthA < 0 ? nameof(indexA) : nameof(indexB); + throw new ArgumentOutOfRangeException( + paramName, + "Index and length must refer to a location within the string." + ); + } + + if (length == 0) + { + return 0; + } + + return Helpers.CompareOrdinalHelper(strA.Chars, indexA, lengthA, strB, indexB, lengthB); + } + + // Determines whether a specified string is a suffix of the current instance. + public static bool EndsWith(this TString8 str, String8View value) + where TString8 : IString8, allows ref struct + { + int offset = str.Length - value.Length; + return (uint)offset <= (uint)str.Length && str.Chars[offset..].SequenceEqual(value); + } + + public static bool EndsWith(this TString8 str, Char8 value) + where TString8 : IString8, allows ref struct + { + int lastPos = str.Length - 1; + return ((uint)lastPos < (uint)str.Length) && str[lastPos].Equals(value); + } + + // Determines whether a specified string is a prefix of the current instance + public static bool StartsWith(this TString8 str, String8View value) + where TString8 : IString8, allows ref struct + { + if (value.IsEmpty) + { + return true; + } + + if (value.Length > str.Length) + { + return false; + } + + return str.Chars[..value.Length].SequenceEqual(value); + } + + public static bool StartsWith(this TString8 str, Char8 value) + where TString8 : IString8, allows ref struct + { + return str.Length != 0 && str[0].Equals(value); + } +} diff --git a/Brutal.Strings/String8/String8Extensions.Searching.cs b/Brutal.Strings/String8/String8Extensions.Searching.cs new file mode 100644 index 0000000..e062ae1 --- /dev/null +++ b/Brutal.Strings/String8/String8Extensions.Searching.cs @@ -0,0 +1,146 @@ +namespace Brutal.Strings; + +public static partial class String8Extensions +{ + public static bool Contains(this TString8 str, String8View value) + where TString8 : IString8, allows ref struct + { + return str.IndexOf(value) >= 0; + } + + public static bool Contains(this TString8 str, Char8 value) + where TString8 : IString8, allows ref struct + { + return str.Chars.Contains(value); + } + + // Returns the index of the first occurrence of a specified character in the current instance. + // The search starts at startIndex and runs thorough the next count characters. + public static int IndexOf(this TString8 str, Char8 value) + where TString8 : IString8, allows ref struct => str.Chars.IndexOf(value); + + public static int IndexOf(this TString8 str, Char8 value, int startIndex) + where TString8 : IString8, allows ref struct + { + return IndexOf(str, value, startIndex, str.Length - startIndex); + } + + public static int IndexOf(this TString8 str, Char8 value, int startIndex, int count) + where TString8 : IString8, allows ref struct + { + var result = str.Chars.Slice(startIndex, count).IndexOf(value); + return result < 0 ? result : result + startIndex; + } + + // Returns the index of the first occurrence of any specified character in the current instance. + // The search starts at startIndex and runs to startIndex + count - 1. + // + public static int IndexOfAny(this TString8 str, String8View anyOf) + where TString8 : IString8, allows ref struct + { + return str.Chars.IndexOfAny(anyOf); + } + + public static int IndexOfAny(this TString8 str, String8View anyOf, int startIndex) + where TString8 : IString8, allows ref struct + { + return IndexOfAny(str, anyOf, startIndex, str.Length - startIndex); + } + + public static int IndexOfAny(this TString8 str, String8View anyOf, int startIndex, int count) + where TString8 : IString8, allows ref struct + { + var result = str.Chars.Slice(startIndex, count).IndexOfAny(anyOf); + return result < 0 ? result : result + startIndex; + } + + public static int IndexOf(this TString8 str, String8View value) + where TString8 : IString8, allows ref struct + { + return str.Chars.IndexOf(value); + } + + public static int IndexOf(this TString8 str, String8View value, int startIndex) + where TString8 : IString8, allows ref struct + { + var result = str.Chars[startIndex..].IndexOf(value); + return result < 0 ? result : result + startIndex; + } + + public static int IndexOf(this TString8 str, String8View value, int startIndex, int count) + where TString8 : IString8, allows ref struct + { + var result = str.Chars.Slice(startIndex, count).IndexOf(value); + return result < 0 ? result : result + startIndex; + } + + // Returns the index of the last occurrence of a specified character in the current instance. + // The search starts at startIndex and runs backwards to startIndex - count + 1. + // The character at position startIndex is included in the search. startIndex is the larger + // index within the string. + public static int LastIndexOf(this TString8 str, Char8 value) + where TString8 : IString8, allows ref struct => str.Chars.LastIndexOf(value); + + public static int LastIndexOf(this TString8 str, Char8 value, int startIndex) + where TString8 : IString8, allows ref struct + { + return LastIndexOf(str, value, startIndex, startIndex + 1); + } + + public static int LastIndexOf(this TString8 str, Char8 value, int startIndex, int count) + where TString8 : IString8, allows ref struct + { + var result = str.Chars.Slice(startIndex, count).LastIndexOf(value); + return result < 0 ? result : result + startIndex; + } + + // Returns the index of the last occurrence of any specified character in the current instance. + // The search starts at startIndex and runs backwards to startIndex - count + 1. + // The character at position startIndex is included in the search. startIndex is the larger + // index within the string. + // + public static int LastIndexOfAny(this TString8 str, String8View anyOf) + where TString8 : IString8, allows ref struct + { + return str.Chars.LastIndexOfAny(anyOf); + } + + public static int LastIndexOfAny(this TString8 str, String8View anyOf, int startIndex) + where TString8 : IString8, allows ref struct + { + return LastIndexOfAny(str, anyOf, startIndex, startIndex + 1); + } + + public static int LastIndexOfAny(this TString8 str, String8View anyOf, int startIndex, int count) + where TString8 : IString8, allows ref struct + { + var actualStartIndex = startIndex - count + 1; + var result = str.Chars.Slice(actualStartIndex, count).LastIndexOfAny(anyOf); + return result < 0 ? result : result + actualStartIndex; + } + + // Returns the index of the last occurrence of any character in value in the current instance. + // The search starts at startIndex and runs backwards to startIndex - count + 1. + // The character at position startIndex is included in the search. startIndex is the larger + // index within the string. + // + public static int LastIndexOf(this TString8 str, String8View value) + where TString8 : IString8, allows ref struct + { + return LastIndexOf(str, value, str.Length - 1, str.Length); + } + + public static int LastIndexOf(this TString8 str, String8View value, int startIndex) + where TString8 : IString8, allows ref struct + { + return LastIndexOf(str, value, startIndex, startIndex + 1); + } + + public static int LastIndexOf(this TString8 str, String8View value, int startIndex, int count) + where TString8 : IString8, allows ref struct + { + var actualStartIndex = startIndex - count + 1; + var result = str.Chars.Slice(actualStartIndex, count).LastIndexOf(value); + return result < 0 ? result : result + actualStartIndex; + } +} diff --git a/Brutal.Strings/StringBuilder/StringBuilder.Append.cs b/Brutal.Strings/StringBuilder/StringBuilder.Append.cs new file mode 100644 index 0000000..f590c87 --- /dev/null +++ b/Brutal.Strings/StringBuilder/StringBuilder.Append.cs @@ -0,0 +1,194 @@ +#define IMPLEMENT_STRING_BUILDER + +using System.Buffers; + +namespace Brutal.Strings; + +#if IMPLEMENT_STRING_BUILDER +public partial class StringBuilder +#else +public partial struct ValueStringBuilder +#endif +{ + private Span GetSpan(int contentSizeHint, int alignment) + { + return GetSpan(Math.Max(contentSizeHint, Math.Abs(alignment))); + } + + private void Align(Span destination, ref int elementsWritten, int alignment) + { + if (alignment == 0) + return; + + // Alignment is based on grapheme count, which means we may write more than "alignment", + // i.e. more than we pre-grew for - retry until it fits. + while (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + destination = GetSpan(destination.Length + 1); + } + + /// Pads content already written and advanced since to , + /// growing as needed. Used by nested interpolation: the inner handler writes through directly, then the outer + /// hole's alignment is applied after the fact. is the position before the inner wrote. + public void AlignFrom(int start, int alignment) + { + if (alignment == 0) + return; + + // rewind - don't use MoveTo() as it would null-terminate over its first element + var elementsWritten = _position - start; + _position = start; + Align(FreeSpan, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// Format into elements and append it; the writer grows as needed. + /// Value to format and append. + /// If non-zero, pads the appended content to this many elements (positive: right-align, negative: left-align). + /// Optional format string, forwarded to the value's formatting interfaces. + /// Optional format provider. + /// The writer's couldn't satisfy the request (e.g. fixed-capacity writer hit its limit). + public void Append(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + var sizeHint = Math.Abs(alignment); + + Span destination; + int elementsWritten; + while (!Utf.TryFormat(value, destination = GetSpan(sizeHint), out elementsWritten, format, provider)) + { + // Format didn't fit - ask for strictly more than what we just got (progress guarantee). + sizeHint = destination.Length + 1; + } + + Align(destination, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// Tries to format into elements and append it. + /// The value to format and append. + /// If non-zero, pads the appended content to this many elements (positive: right-align, negative: left-align). + /// Optional format string, forwarded to the value's formatting interfaces. + /// Optional format provider. + /// true on success; false if remaining capacity was insufficient. + public bool TryAppend(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + if (!TryGetSpan(0, alignment, out var destination)) + return false; + if (!Utf.TryFormat(value, destination, out var elementsWritten, format, provider)) + return Fail(); // can't fit formatted value + if (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + return Fail(); // alignment overflow (grapheme→element shift exceeded pre-grow) + Advance(elementsWritten); + return true; + } + + #region string/ref struct specializations + + /// + public void Append(String8View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + var destination = GetSpan(elementsWritten, alignment); // grow if needed / throw if doesn't fit + Utf.GetElements(value, destination); + Align(destination, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// + public void Append(String16View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + var destination = GetSpan(elementsWritten, alignment); // grow if needed / throw if doesn't fit + Utf.GetElements(value, destination); + Align(destination, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// + public bool TryAppend(String8View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + if (!TryGetSpan(elementsWritten, alignment, out var destination)) + return false; + Utf.GetElements(value, destination); + if (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + return Fail(); // alignment overflow (grapheme→element shift exceeded pre-grow) + Advance(elementsWritten); + return true; + } + + /// + public bool TryAppend(String16View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + if (!TryGetSpan(elementsWritten, alignment, out var destination)) + return false; + Utf.GetElements(value, destination); + if (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + return Fail(); // alignment overflow (grapheme→element shift exceeded pre-grow) + Advance(elementsWritten); + return true; + } + + #endregion + + #region AppendLine + + /// Append a , growing as needed. + /// The required capacity exceeds the builder's limit. + public void AppendLine() => Append(NewLine); + + /// Appends (optionally padded) followed by , growing as needed. + /// + public void AppendLine(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + Append(value, alignment, format, provider); + AppendLine(); + } + + /// + public void AppendLine(String8View value, int alignment = 0) + { + Append(value, alignment); + AppendLine(); + } + + /// + public void AppendLine(String16View value, int alignment = 0) + { + Append(value, alignment); + AppendLine(); + } + + /// Tries to append a . + public bool TryAppendLine() => TryAppend((String16View)NewLine); + + /// Tries to append (optionally padded) followed by . + /// Rolls back atomically on failure. + public bool TryAppendLine(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + var checkpoint = _position; + if (TryAppend(value, alignment, format, provider) && TryAppendLine()) + return true; + return Fail(checkpoint); // restore, in case value was appended but newline wasn't + } + + /// + public bool TryAppendLine(String8View value, int alignment = 0) + { + var checkpoint = _position; + if (TryAppend(value, alignment) && TryAppendLine()) + return true; + return Fail(checkpoint); // restore, in case value was appended but newline wasn't + } + + /// + public bool TryAppendLine(String16View value, int alignment = 0) + { + var checkpoint = _position; + if (TryAppend(value, alignment) && TryAppendLine()) + return true; + return Fail(checkpoint); // restore, in case value was appended but newline wasn't + } + + #endregion +} diff --git a/Brutal.Strings/StringBuilder/StringBuilder.Interpolation.cs b/Brutal.Strings/StringBuilder/StringBuilder.Interpolation.cs new file mode 100644 index 0000000..8ab846a --- /dev/null +++ b/Brutal.Strings/StringBuilder/StringBuilder.Interpolation.cs @@ -0,0 +1,81 @@ +namespace Brutal.Strings; + +public partial class StringBuilder +{ + /// Appends an interpolated string. + public void Append([InterpolatedStringHandlerArgument("")] ref Interpolator handler) + { + // No-op: the handler writes directly into this builder as it is constructed, + // so by the time this method runs, the content is already appended. + } + + /// Appends an interpolated string followed by . + public void AppendLine([InterpolatedStringHandlerArgument("")] ref Interpolator handler) + { + // Interpolated content already appended during handler construction; only add the newline. + AppendLine(); + } + + /// + /// Interpolated-string handler for . + /// Not intended for direct use. + /// + /// + /// Lean by design: + /// - Value-type holes flow through the generic AppendFormatted<T> kitchen-sink via . + /// - Char-span and byte-span holes need explicit overloads (ref structs can't flow through generic T). + /// - String holes are fast-tracked to avoid the kitchen-sink + /// - Nested holes ($"outer {$"inner"}") write through into the same builder, zero-alloc - no temp string. + /// + [InterpolatedStringHandler, EditorBrowsable(EditorBrowsableState.Never)] + public readonly ref struct Interpolator + { + private readonly StringBuilder _sb; + + public Interpolator(int literalLength, int formattedCount, StringBuilder sb) + { + _sb = sb; + } + + public void AppendLiteral(String16 value) => _sb.Append((String16View)value); + + public void AppendFormatted(T value, int alignment = 0, String16? format = null) => + _sb.Append(value, alignment, format); + + // ref-struct holes can't flow through AppendFormatted (no `allows ref struct`). + public void AppendFormatted(String8View value, int alignment = 0, String16? format = null) => + _sb.Append(value, alignment); + + public void AppendFormatted(String16View value, int alignment = 0, String16? format = null) => + _sb.Append(value, alignment); + + public void AppendFormatted(String16? value, int alignment = 0, String16? format = null) => + _sb.Append((String16View)value, alignment); + + #region nested interpolation + + /// Builder position captured at construction; only used for nested interpolation alignment. + private readonly int _start; + + /// Nested interpolation ctor for + public Interpolator(int literalLength, int formattedCount, Interpolator parent) + : this(literalLength, formattedCount, parent._sb) + { + _start = parent._sb._position; + } + + // Nested interpolation overload + public void AppendFormatted( + [InterpolatedStringHandlerArgument("")] Interpolator nested, + int alignment = 0, + String16? format = null + ) + { + // Nested hole writes into our own _sb, so by the time control returns here, `nested` has already appended. + // The only thing left to do is potentially aligning. + _sb.AlignFrom(nested._start, alignment); + } + + #endregion + } +} diff --git a/Brutal.Strings/StringBuilder/StringBuilder.cs b/Brutal.Strings/StringBuilder/StringBuilder.cs new file mode 100644 index 0000000..3146dcd --- /dev/null +++ b/Brutal.Strings/StringBuilder/StringBuilder.cs @@ -0,0 +1,215 @@ +using System.Buffers; +using System.Numerics; + +namespace Brutal.Strings; + +using static StringBuilderUtility; + +/// +/// A mutable sequence of UTF-8 or UTF-16 code units (depending on ) with a +/// growable, null-terminated buffer and optional limit. Supports C# interpolated +/// string handlers via . +/// +/// +/// There is deliberately no implicit conversion to /: +/// call so the borrow is visible at the call site. A span into the buffer is a +/// borrow, not a copy - span lifetime and safety are the caller's concern. +/// +public partial class StringBuilder : IUtf8SpanFormattable, ISpanFormattable + where TChar : unmanaged, IBinaryInteger // IUtfChar would be perfect, but is internal +{ + /// Initializes a new instance of . + /// The output span is always null-terminated. The null terminator is not included in the capacity. + /// Initial capacity. Must be positive. + /// Maximum capacity. Defaults to - 1. + /// is not positive. + /// is less than or exceeds - 1. + public StringBuilder(int capacity = 64, int maxCapacity = ArrayMaxUsableLength) + { + if (capacity <= 0) + throw new ArgumentOutOfRangeException(nameof(capacity), "Capacity must be positive."); + if (maxCapacity < capacity) + throw new ArgumentException("Max capacity cannot be less than capacity.", nameof(maxCapacity)); + if (maxCapacity > ArrayMaxUsableLength) + throw new ArgumentException("Max capacity cannot exceed (Array.MaxLength - 1).", nameof(maxCapacity)); + + _storage = new TChar[capacity + 1]; // +1 for null terminator - hidden from callers + MaxCapacity = maxCapacity; + } + + /// for pooling + internal void ResetToDefault() + { + Clear(); + NewLine = Environment.NewLine; + // Capacity is not reset to default - the price to pay for using a pooled instance. + // MaxCapacity isn't configurable in pooled instances. + } + + #region storage + + private TChar[] _storage; + + /// Gets the current capacity. + public int Capacity => _storage.Length - 1; + + /// Gets the maximum capacity this instance can grow to. + public readonly int MaxCapacity; + + private void Resize(long newCapacity) + { + Array.Resize(ref _storage, (int)Math.Min(newCapacity, MaxCapacity) + 1); // +1 for null terminator + } + + /// Doubles capacity until more elements fit. + /// Required capacity exceeds . + private void GrowBy(int appendCount) + { + var requiredCapacity = (long)_position + appendCount; + if (requiredCapacity > MaxCapacity) + throw new ArgumentOutOfRangeException(nameof(MaxCapacity), "Cannot grow beyond MaxCapacity."); + + // keep doubling capacity until it's at least requiredCapacity + var newCapacity = (long)Capacity; // long to avoid overflow when doubling + do newCapacity *= 2; + while (newCapacity < requiredCapacity); + Resize(newCapacity); + } + + #endregion + + #region position + + private int _position; + + /// The remaining we can write into (excluding null-terminator). GetSpan grows first if it's too small. + private Span FreeSpan => _storage.AsSpan(_position..^1); // -1 for null terminator + + /// Gets the elements written so far. The element immediately after this span is always the null-terminator. + /// Borrowed view: invalidated by any later write or rewind (Append/Clear/Advance/Position). Don't retain it + /// past the next mutation; materialize a copy (WrittenSpan.ToString16()) if you need it to outlive the builder. + public ReadOnlySpan WrittenSpan => _storage.AsSpan(.._position); + + /// Current write position. Get to capture a savepoint; set (rewind-only) to restore one. + /// Setter is shrink-only: value must be in [0, current Position]. Extending isn't supported - + /// it would expose uninitialized buffer bytes. Use GetSpan + Advance for allocate-then-fill. + public int Position + { + get => _position; + set + { + if ((uint)value > (uint)_position) // uint cast also checks against negative position + throw new ArgumentOutOfRangeException( + nameof(value), + "Position can only be rewound; use Advance to move forward." + ); + MoveTo(value); + } + } + + /// BCL -compat alias for . + /// New code should prefer Position. Unlike BCL, the setter is shrink-only (no zero-fill, no extension); + /// use GetSpan + Advance for allocate-then-fill. + [EditorBrowsable(EditorBrowsableState.Never)] + public int Length + { + get => _position; + set => Position = value; + } + + private void MoveTo(int position) + { + _position = position; + _storage[position] = TChar.Zero; // null terminate + } + + /// We failed while trying to write: restore our null terminator in case it got clobbered by a partial write. + private bool Fail() + { + _storage[_position] = TChar.Zero; // null terminate + return false; + } + + /// We failed while trying to write: restore to checkpoint. + private bool Fail(int checkpoint) + { + MoveTo(checkpoint); + return false; + } + + /// + public void Advance(int count) + { + if (count < 0 || count > FreeSpan.Length) + throw new ArgumentOutOfRangeException(nameof(count)); + MoveTo(_position + count); + } + + /// Clears all written content without releasing the underlying buffer. + public void Clear() => MoveTo(0); + + #endregion + + private Span GetSpan(int sizeHint) + { + ArgumentOutOfRangeException.ThrowIfNegative(sizeHint); + var requested = Math.Max(sizeHint, 1); + if (requested > FreeSpan.Length) + GrowBy(requested); + return FreeSpan; + } + + private bool TryGetSpan(int contentSizeHint, int alignment, out Span destination) + { + var sizeHint = Math.Max(contentSizeHint, Math.Abs(alignment)); + destination = FreeSpan; + return destination.Length >= sizeHint; + } + + /// Gets or sets the newline sequence used by . Defaults to . + public string NewLine = Environment.NewLine; + + #region string formatting: IUtf8SpanFormattable, ISpanFormattable, IFormattable + + /// + [Obsolete("Allocates. Use WrittenSpan for zero-alloc, or WrittenSpan.ToString16() if you truly want a string.")] +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member + public override string ToString() +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member + { + return WrittenSpan.ToString16(); + } + + /// + /// and are ignored. + string IFormattable.ToString(string? format, IFormatProvider? formatProvider) + { + return WrittenSpan.ToString16(); + } + + /// + /// and are ignored. + bool ISpanFormattable.TryFormat( + Span destination, + out int charsWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + { + return Utf.TryGetElements(WrittenSpan, destination, out charsWritten); + } + + /// + /// and are ignored. + bool IUtf8SpanFormattable.TryFormat( + Span destination, + out int bytesWritten, + ReadOnlySpan format, + IFormatProvider? provider + ) + { + return Utf.TryGetElements(WrittenSpan, destination, out bytesWritten); + } + + #endregion +} diff --git a/Brutal.Strings/StringBuilder/StringBuilderPool.cs b/Brutal.Strings/StringBuilder/StringBuilderPool.cs new file mode 100644 index 0000000..5834b84 --- /dev/null +++ b/Brutal.Strings/StringBuilder/StringBuilderPool.cs @@ -0,0 +1,44 @@ +using System.Numerics; +using Microsoft.Extensions.ObjectPool; + +namespace Brutal.Strings; + +/// +/// A pool of instances for efficient reuse. +/// Thread-safe. +/// StringBuilders with bloated capacity are dropped on return to conserve memory. +/// +/// byte (UTF-8) or char (UTF-16) +public class StringBuilderPool : DefaultObjectPool> + where TChar : unmanaged, IBinaryInteger +{ + private static readonly StringBuilderPolicy Policy = new(); + + private sealed class StringBuilderPolicy : IPooledObjectPolicy> + { + public StringBuilder Create() => new(); + + public bool Return(StringBuilder sb) + { + if (ByteSize.Of(sb.Capacity) > ByteSize.FromKilobytes(4)) + return false; // drop bloated instances + + sb.ResetToDefault(); + return true; + } + } + + public static readonly StringBuilderPool Shared = new(); + + public StringBuilderPool() + : base(Policy) { } + + public StringBuilderPool(int maximumRetained) + : base(Policy, maximumRetained) { } + + public StringBuilderPool(IPooledObjectPolicy> policy) + : base(policy) { } + + public StringBuilderPool(IPooledObjectPolicy> policy, int maximumRetained) + : base(policy, maximumRetained) { } +} diff --git a/Brutal.Strings/StringBuilder/StringBuilderUtility.cs b/Brutal.Strings/StringBuilder/StringBuilderUtility.cs new file mode 100644 index 0000000..61e3b32 --- /dev/null +++ b/Brutal.Strings/StringBuilder/StringBuilderUtility.cs @@ -0,0 +1,53 @@ +using System.Diagnostics.Contracts; +using System.Numerics; + +namespace Brutal.Strings; + +internal static class StringBuilderUtility +{ + /// Array.MaxLength - 1 (for null terminator) - copied here because Array.MaxLength isn't const. + /// For reference: Array.MaxLength == int.MaxValue - 56. + public const int ArrayMaxUsableLength = 0X7FFFFFC7 - 1; + + extension(Span value) + where TChar : unmanaged, IBinaryInteger + { + [Pure] + public Span AsChar8() + { + Debug.Assert(typeof(TChar) == typeof(Char8)); + return Unsafe.BitCast, Span>(value); + } + + [Pure] + public Span AsChar16() + { + Debug.Assert(typeof(TChar) == typeof(Char16)); + return Unsafe.BitCast, Span>(value); + } + } + + extension(ReadOnlySpan value) + where TChar : unmanaged, IBinaryInteger + { + [Pure] + public ReadOnlySpan AsChar8() + { + Debug.Assert(typeof(TChar) == typeof(Char8)); + return Unsafe.BitCast, ReadOnlySpan>(value); + } + + [Pure] + public ReadOnlySpan AsChar16() + { + Debug.Assert(typeof(TChar) == typeof(Char16)); + return Unsafe.BitCast, ReadOnlySpan>(value); + } + + [Pure] + public String16 ToString16() + { + return typeof(TChar) == typeof(Char8) ? Utf8.GetString(value.AsChar8()) : value.AsChar16().ToString(); + } + } +} diff --git a/Brutal.Strings/StringBuilder/ValueStringBuilder.Append.gen.cs b/Brutal.Strings/StringBuilder/ValueStringBuilder.Append.gen.cs new file mode 100644 index 0000000..797c4e5 --- /dev/null +++ b/Brutal.Strings/StringBuilder/ValueStringBuilder.Append.gen.cs @@ -0,0 +1,198 @@ +// +// Stamped from StringBuilder.Append.cs - do not edit; edit the source and rebuild. +#nullable enable + +//#define IMPLEMENT_STRING_BUILDER + +using System.Buffers; + +namespace Brutal.Strings; + +#if IMPLEMENT_STRING_BUILDER +public partial class StringBuilder +#else +public partial struct ValueStringBuilder +#endif +{ + private Span GetSpan(int contentSizeHint, int alignment) + { + return GetSpan(Math.Max(contentSizeHint, Math.Abs(alignment))); + } + + private void Align(Span destination, ref int elementsWritten, int alignment) + { + if (alignment == 0) + return; + + // Alignment is based on grapheme count, which means we may write more than "alignment", + // i.e. more than we pre-grew for - retry until it fits. + while (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + destination = GetSpan(destination.Length + 1); + } + + /// Pads content already written and advanced since to , + /// growing as needed. Used by nested interpolation: the inner handler writes through directly, then the outer + /// hole's alignment is applied after the fact. is the position before the inner wrote. + public void AlignFrom(int start, int alignment) + { + if (alignment == 0) + return; + + // rewind - don't use MoveTo() as it would null-terminate over its first element + var elementsWritten = _position - start; + _position = start; + Align(FreeSpan, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// Format into elements and append it; the writer grows as needed. + /// Value to format and append. + /// If non-zero, pads the appended content to this many elements (positive: right-align, negative: left-align). + /// Optional format string, forwarded to the value's formatting interfaces. + /// Optional format provider. + /// The writer's couldn't satisfy the request (e.g. fixed-capacity writer hit its limit). + public void Append(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + var sizeHint = Math.Abs(alignment); + + Span destination; + int elementsWritten; + while (!Utf.TryFormat(value, destination = GetSpan(sizeHint), out elementsWritten, format, provider)) + { + // Format didn't fit - ask for strictly more than what we just got (progress guarantee). + sizeHint = destination.Length + 1; + } + + Align(destination, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// Tries to format into elements and append it. + /// The value to format and append. + /// If non-zero, pads the appended content to this many elements (positive: right-align, negative: left-align). + /// Optional format string, forwarded to the value's formatting interfaces. + /// Optional format provider. + /// true on success; false if remaining capacity was insufficient. + public bool TryAppend(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + if (!TryGetSpan(0, alignment, out var destination)) + return false; + if (!Utf.TryFormat(value, destination, out var elementsWritten, format, provider)) + return Fail(); // can't fit formatted value + if (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + return Fail(); // alignment overflow (grapheme→element shift exceeded pre-grow) + Advance(elementsWritten); + return true; + } + + #region string/ref struct specializations + + /// + public void Append(String8View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + var destination = GetSpan(elementsWritten, alignment); // grow if needed / throw if doesn't fit + Utf.GetElements(value, destination); + Align(destination, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// + public void Append(String16View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + var destination = GetSpan(elementsWritten, alignment); // grow if needed / throw if doesn't fit + Utf.GetElements(value, destination); + Align(destination, ref elementsWritten, alignment); + Advance(elementsWritten); + } + + /// + public bool TryAppend(String8View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + if (!TryGetSpan(elementsWritten, alignment, out var destination)) + return false; + Utf.GetElements(value, destination); + if (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + return Fail(); // alignment overflow (grapheme→element shift exceeded pre-grow) + Advance(elementsWritten); + return true; + } + + /// + public bool TryAppend(String16View value, int alignment = 0) + { + var elementsWritten = Utf.GetElementCount(value); + if (!TryGetSpan(elementsWritten, alignment, out var destination)) + return false; + Utf.GetElements(value, destination); + if (!Utf.TryAlign(destination, ref elementsWritten, alignment)) + return Fail(); // alignment overflow (grapheme→element shift exceeded pre-grow) + Advance(elementsWritten); + return true; + } + + #endregion + + #region AppendLine + + /// Append a , growing as needed. + /// The required capacity exceeds the builder's limit. + public void AppendLine() => Append(NewLine); + + /// Appends (optionally padded) followed by , growing as needed. + /// + public void AppendLine(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + Append(value, alignment, format, provider); + AppendLine(); + } + + /// + public void AppendLine(String8View value, int alignment = 0) + { + Append(value, alignment); + AppendLine(); + } + + /// + public void AppendLine(String16View value, int alignment = 0) + { + Append(value, alignment); + AppendLine(); + } + + /// Tries to append a . + public bool TryAppendLine() => TryAppend((String16View)NewLine); + + /// Tries to append (optionally padded) followed by . + /// Rolls back atomically on failure. + public bool TryAppendLine(T value, int alignment = 0, string? format = null, IFormatProvider? provider = null) + { + var checkpoint = _position; + if (TryAppend(value, alignment, format, provider) && TryAppendLine()) + return true; + return Fail(checkpoint); // restore, in case value was appended but newline wasn't + } + + /// + public bool TryAppendLine(String8View value, int alignment = 0) + { + var checkpoint = _position; + if (TryAppend(value, alignment) && TryAppendLine()) + return true; + return Fail(checkpoint); // restore, in case value was appended but newline wasn't + } + + /// + public bool TryAppendLine(String16View value, int alignment = 0) + { + var checkpoint = _position; + if (TryAppend(value, alignment) && TryAppendLine()) + return true; + return Fail(checkpoint); // restore, in case value was appended but newline wasn't + } + + #endregion +} diff --git a/Brutal.Strings/StringBuilder/ValueStringBuilder.Interpolation.cs b/Brutal.Strings/StringBuilder/ValueStringBuilder.Interpolation.cs new file mode 100644 index 0000000..6a3330c --- /dev/null +++ b/Brutal.Strings/StringBuilder/ValueStringBuilder.Interpolation.cs @@ -0,0 +1,87 @@ +namespace Brutal.Strings; + +public partial struct ValueStringBuilder +{ + /// Appends an interpolated string. + public void Append([InterpolatedStringHandlerArgument("")] ref Interpolator handler) + { + // Interpolated content appended in a copy, just catch-up with position + _position = handler.Position; + } + + /// Appends an interpolated string followed by . + public void AppendLine([InterpolatedStringHandlerArgument("")] ref Interpolator handler) + { + // Interpolated content appended in a copy, just catch-up with position + _position = handler.Position; + AppendLine(); + } + + /// + /// Interpolated-string handler for . + /// Not intended for direct use. + /// + /// + [InterpolatedStringHandler, EditorBrowsable(EditorBrowsableState.Never)] + public ref struct Interpolator + { + /* + * A handler can't hold a ref-struct builder by ref (CS9050) or a ref into it (eg ref sb._position), + * so it holds a by-value COPY and Append(ref handler) copies the cursor back. + * The copy shares the same buffer (Span-by-value = same memory), + * so only the cursor diverges - copying back _position suffices. + * A growable builder would copy back the full state (buffer ref + cursor), + * since a grow re-points the span; VSB is fixed, so it doesn't arise. + */ + /// Caution, this is a copy! + private ValueStringBuilder _sb; + public int Position => _sb.Length; + + public Interpolator(int literalLength, int formattedCount, ValueStringBuilder sb) + { + _sb = sb; + } + + public void AppendLiteral(String16 value) => _sb.Append((String16View)value); + + public void AppendFormatted(T value, int alignment = 0, String16? format = null) => + _sb.Append(value, alignment, format); + + // ref-struct holes can't flow through AppendFormatted (no `allows ref struct`). + public void AppendFormatted(String8View value, int alignment = 0, String16? format = null) => + _sb.Append(value, alignment); + + public void AppendFormatted(String16View value, int alignment = 0, String16? format = null) => + _sb.Append(value, alignment); + + public void AppendFormatted(String16? value, int alignment = 0, String16? format = null) => + _sb.Append((String16View)value, alignment); + + #region nested interpolation + + /// Builder position captured at construction; only used for nested interpolation alignment. + private readonly int _start; + + /// Nested interpolation ctor for + public Interpolator(int literalLength, int formattedCount, Interpolator parent) + : this(literalLength, formattedCount, parent._sb) + { + _start = parent._sb.Length; + } + + // Nested interpolation overload + public void AppendFormatted( + [InterpolatedStringHandlerArgument("")] scoped Interpolator nested, + int alignment = 0, + String16? format = null + ) + { + // Interpolated content appended in a copy, just catch-up with position, and align + // NOTE: if VSB ever supports growing, we'd need to copy-back the span as well. + _sb._position = nested.Position; + _sb.AlignFrom(nested._start, alignment); + } + + #endregion + } +} diff --git a/Brutal.Strings/StringBuilder/ValueStringBuilder.cs b/Brutal.Strings/StringBuilder/ValueStringBuilder.cs new file mode 100644 index 0000000..43ba05c --- /dev/null +++ b/Brutal.Strings/StringBuilder/ValueStringBuilder.cs @@ -0,0 +1,135 @@ +using System.Buffers; +using System.Numerics; +using CommunityToolkit.HighPerformance.Buffers; + +namespace Brutal.Strings; + +/// Stack-friendly string builder over a borrowed buffer. No growth, no allocation. +/// +/// +/// +/// var sb = stackalloc byte[256].ToStringBuilder(); +/// sb.Append("x="u8); +/// sb.Append(42); +/// // sb.WrittenSpan == "x=42"u8 +/// +/// +public ref partial struct ValueStringBuilder + where TChar : unmanaged, IBinaryInteger +{ + /// Buffer to write into. Must hold at least 1 element (for the null terminator). + /// is empty. + public ValueStringBuilder(Span buffer) + { + if (buffer.Length < 1) + throw new ArgumentException( + "Buffer must hold at least 1 element (for the null terminator).", + nameof(buffer) + ); + _storage = buffer; + _storage[0] = TChar.Zero; + } + + #region storage + + private readonly Span _storage; + + /// Gets the current capacity. + public int Capacity => _storage.Length - 1; + + #endregion + + #region position + + private int _position; + + /// The remaining we can write into (excluding null-terminator). GetSpan grows first if it's too small. + private Span FreeSpan => _storage[_position..^1]; // -1 for null terminator + + /// + public ReadOnlySpan WrittenSpan => _storage[.._position]; + + /// + public int Position + { + get => _position; + set + { + if ((uint)value > (uint)_position) // uint cast also checks against negative position + throw new ArgumentOutOfRangeException( + nameof(value), + "Position can only be rewound; use Advance to move forward." + ); + MoveTo(value); + } + } + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public int Length + { + get => _position; + set => Position = value; + } + + private void MoveTo(int position) + { + _position = position; + _storage[position] = TChar.Zero; // null terminate + } + + /// We failed while trying to write: restore our null terminator in case it got clobbered by a partial write. + private bool Fail() + { + _storage[_position] = TChar.Zero; // null terminate + return false; + } + + /// We failed while trying to write: restore to checkpoint. + private bool Fail(int checkpoint) + { + MoveTo(checkpoint); + return false; + } + + /// + public void Advance(int count) + { + if (count < 0 || count > FreeSpan.Length) + throw new ArgumentOutOfRangeException(nameof(count)); + MoveTo(_position + count); + } + + /// Clears all written content without releasing the underlying buffer. + public void Clear() => MoveTo(0); + + #endregion + + private Span GetSpan(int sizeHint) + { + ArgumentOutOfRangeException.ThrowIfNegative(sizeHint); + var requested = Math.Max(sizeHint, 1); + if (requested > FreeSpan.Length) + throw new ArgumentOutOfRangeException(nameof(Capacity), "Cannot grow."); + return FreeSpan; + } + + private bool TryGetSpan(int contentSizeHint, int alignment, out Span destination) + { + var sizeHint = Math.Max(contentSizeHint, Math.Abs(alignment)); + destination = FreeSpan; + return destination.Length >= sizeHint; + } + + /// Gets or sets the newline sequence used by . Defaults to . + public string NewLine = Environment.NewLine; +} + +public static class CharSpanExtensions +{ + /// + public static ValueStringBuilder8 ToStringBuilder(this Span value) => new(value); + + /// + public static ValueStringBuilder16 ToStringBuilder(this Span value) => new(value); +} diff --git a/Brutal.Strings/Unicode/Unicode.cs b/Brutal.Strings/Unicode/Unicode.cs new file mode 100644 index 0000000..9998b50 --- /dev/null +++ b/Brutal.Strings/Unicode/Unicode.cs @@ -0,0 +1,90 @@ +using System.Buffers; +using System.Diagnostics.Contracts; +using System.Globalization; +using System.Numerics; +using System.Text; + +namespace Brutal.Strings; + +public static class Unicode +{ + // TODO: should all these be extensions? + // TODO: do we also need GetCellWidth()? approximate terminal-cell width of a single rune (wcwidth-style) + + /// Count the number of runes (code points) in a string, + /// leniently: each invalid sequence counts as one replacement. + [Pure] + public static int GetRuneCount(String16View value) + { + var count = 0; + var runes = value.EnumerateRunes(); + while (runes.MoveNext()) + count++; + return count; + } + + /// + [Pure] + public static int GetRuneCount(String8View value) + { + var count = 0; + while (true) + { + var status = Rune.DecodeFromUtf8(value, out _, out var bytesConsumed); + if (status == OperationStatus.NeedMoreData) + { + // bytesConsumed == 0 -> end of input (clean) + // bytesConsumed > 0 -> trailing partial: count as one replacement, + // matching the UTF-16 EnumerateRunes() which counts a lone surrogate the same way. + if (bytesConsumed > 0) + count++; + return count; + } + value = value[bytesConsumed..]; + count++; + } + } + + /// + [Pure] + public static int GetRuneCount(ReadOnlySpan value) + where TChar : unmanaged, IBinaryInteger + { + return typeof(TChar) == typeof(Char8) ? GetRuneCount(value.AsChar8()) : GetRuneCount(value.AsChar16()); + } + + /// Count the number of graphemes in a string. + [Pure] + public static int GetGraphemeCount(String16View value) + { + var count = 0; + while (!value.IsEmpty) + { + var next = StringInfo.GetNextTextElementLength(value); + if (next == 0) + break; // TODO: null-terminator is somewhat unexpected, should we throw instead? + value = value[next..]; + count++; + } + + return count; + } + + /// + [Pure] + public static int GetGraphemeCount(String8View value) + { + using (Utf8.GetChars(value, stackalloc Char16[256], out var chars)) + { + return GetGraphemeCount(chars); + } + } + + /// + [Pure] + public static int GetGraphemeCount(ReadOnlySpan value) + where TChar : unmanaged, IBinaryInteger + { + return typeof(TChar) == typeof(Char8) ? GetGraphemeCount(value.AsChar8()) : GetGraphemeCount(value.AsChar16()); + } +} diff --git a/Brutal.Strings/Unicode/Utf.cs b/Brutal.Strings/Unicode/Utf.cs new file mode 100644 index 0000000..d378d7f --- /dev/null +++ b/Brutal.Strings/Unicode/Utf.cs @@ -0,0 +1,202 @@ +using System.Diagnostics.Contracts; +using System.Numerics; +using System.Text; +using Brutal.Extensions; + +namespace Brutal.Strings; + +public static class Utf + where TChar : unmanaged, IBinaryInteger // IUtfChar would be perfect, but is internal +{ + static Utf() + { + if (typeof(TChar) != typeof(Char8) && typeof(TChar) != typeof(Char16)) + throw new NotSupportedException( + $"Utf supports only Char8 (byte) and Char16 (char): {typeof(TChar)} is unsupported." + ); + } + + /// Count the number of code units in . + [Pure] + public static int GetElementCount(String8View value) + { + return typeof(TChar) == typeof(Char8) ? value.Length : Utf8.GetCharCount(value); + } + + /// + [Pure] + public static int GetElementCount(String16View value) + { + return typeof(TChar) == typeof(Char16) ? value.Length : Utf8.GetByteCount(value); + } + + /// Copy/convert into . + public static void GetElements(String8View value, Span destination) + { + if (typeof(TChar) == typeof(Char8)) + value.CopyTo(destination.AsChar8()); + else + Utf8.GetChars(value, destination.AsChar16()); + } + + /// + public static void GetElements(String16View value, Span destination) + { + if (typeof(TChar) == typeof(Char16)) + value.CopyTo(destination.AsChar16()); + else + Utf8.GetBytes(value, destination.AsChar8()); + } + + /// Try to copy/convert into . + public static bool TryGetElements(String8View value, Span destination, out int elementsWritten) + { + return typeof(TChar) == typeof(Char8) + ? value.TryCopyTo(destination.AsChar8(), out elementsWritten) + : Utf8.TryGetChars(value, destination.AsChar16(), out elementsWritten); + } + + /// + public static bool TryGetElements(String16View value, Span destination, out int elementsWritten) + { + return typeof(TChar) == typeof(Char16) + ? value.TryCopyTo(destination.AsChar16(), out elementsWritten) + : Utf8.TryGetBytes(value, destination.AsChar8(), out elementsWritten); + } + + /// + public static bool TryGetElements( + ReadOnlySpan value, + Span destination, + out int elementsWritten + ) + where TSource : unmanaged, IBinaryInteger + { + return typeof(TSource) == typeof(Char16) + ? TryGetElements(value.AsChar16(), destination, out elementsWritten) + : TryGetElements(value.AsChar8(), destination, out elementsWritten); + } + + /// + [Pure] + public static ReadOnlySpan GetNullTerminatedSpan(Ptr first) + { + if (typeof(TChar) == typeof(Char8)) + { + var bytes = Utf8.GetNullTerminatedSpan(first.Cast()); + return Unsafe.BitCast, ReadOnlySpan>(bytes); + } + else + { + var chars = Utf16.GetNullTerminatedSpan(first.Cast()); + return Unsafe.BitCast, ReadOnlySpan>(chars); + } + } + + /// + /// Allocates! Last resort helper for old string/array APIs - use spans when possible. + [Pure] + public static TChar[] ToElementArray(string text) + { + return typeof(TChar) == typeof(Char8) + ? Unsafe.As(Encoding.UTF8.GetBytes(text)) + : Unsafe.As(text.ToCharArray()); + } + + /// + [Pure] + public static bool TryFormat( + T value, + Span destination, + out int elementsWritten, + string? format = null, + IFormatProvider? provider = null + ) + { + return typeof(TChar) == typeof(Char8) + ? Utf8.TryFormat(value, destination.AsChar8(), out elementsWritten, format, provider) + : Utf16.TryFormat(value, destination.AsChar16(), out elementsWritten, format, provider); + } + + /// + /// Pad to graphemes + /// (right-align if positive, left-align if negative) by inserting/appending spaces. + /// Returns false if isn't big enough to fit the padded content + /// (caller must grow + retry, or roll back). + /// + /// + /// The buffer may need to hold more elements than alone suggests: + /// graphemes can occupy multiple code units (é = 2 UTF-8 bytes; a combining mark adds its own unit), + /// so the effective element target is alignment + (elementsWritten − graphemes). + /// + /// The buffer to align within + /// How many code units were written to - updated to include padding on success + /// How many graphemes to align by + public static bool TryAlign(Span destination, ref int elementsWritten, int alignment) + { + if (alignment == 0) + return true; + + // Convert alignment from grapheme-count to code-unit-count. + // IsAscii check is cheap, and avoids the much-rarer slow-path UAX-#29 segmentation. + var written = destination[..elementsWritten]; + var graphemeOffset = IsAscii(written) ? 0 : elementsWritten - Unicode.GetGraphemeCount(written); + alignment += graphemeOffset * Math.Sign(alignment); + + return TryAppendOrInsertAlignmentIfNeeded(destination, ref elementsWritten, 0, alignment); + } + + private static bool IsAscii(ReadOnlySpan span) + { + return typeof(TChar) == typeof(Char8) ? Ascii.IsValid(span.AsChar8()) : Ascii.IsValid(span.AsChar16()); + } + + /// Source: https://github.com/dotnet/runtime/blob/f1874490fcf9ebaebff1ff5b9536742a286d145b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8.cs#L773 + public static bool TryAppendOrInsertAlignmentIfNeeded( + Span destination, + ref int position, + int startingPos, + int alignment + ) + { + Debug.Assert(startingPos >= 0 && startingPos <= position); + Debug.Assert(alignment != 0); + + var elementsWritten = position - startingPos; + + var leftAlign = false; + if (alignment < 0) + { + leftAlign = true; + alignment = -alignment; + } + + var paddingNeeded = alignment - elementsWritten; + if (paddingNeeded <= 0) + { + return true; + } + + if (paddingNeeded <= destination.Length - position) + { + var space = + typeof(TChar) == typeof(Char8) + ? Unsafe.BitCast((Char8)' ') + : Unsafe.BitCast((Char16)' '); + if (leftAlign) + { + destination.Slice(position, paddingNeeded).Fill(space); + } + else + { + destination.Slice(startingPos, elementsWritten).CopyTo(destination.Slice(startingPos + paddingNeeded)); + destination.Slice(startingPos, paddingNeeded).Fill(space); + } + + position += paddingNeeded; + return true; + } + + return false; + } +} diff --git a/Brutal.Strings/Unicode/Utf16.TryFormat.cs b/Brutal.Strings/Unicode/Utf16.TryFormat.cs new file mode 100644 index 0000000..febba30 --- /dev/null +++ b/Brutal.Strings/Unicode/Utf16.TryFormat.cs @@ -0,0 +1,243 @@ +using System.Buffers; +using System.Diagnostics.Contracts; +using System.Globalization; +using Brutal.Enums; +using Brutal.Extensions; + +namespace Brutal.Strings; + +/* + * KEEP IN SYNC with Utf8.TryFormat.cs - these two files mirror the same dispatch ladder and helper method + * order so they diff cleanly. Differences are encoding-specific and noted inline: + * - Utf8 needs TryFormat_ISpanFormattable (UTF-16 stack buffer → UTF-8 transcode), and TryAppend(ROS, Span) + * to transcode the string fast-path / ICustomFormatter / IFormattable fallback. Utf16 doesn't (ISpanFormattable + * IS the native UTF-16 path; the equivalent TryAppend is just a CopyTo). + * - Both encodings have bool / char extension methods, for symmetric reasons: + * * bool: implements neither ISpanFormattable nor IUtf8SpanFormattable. BCL provides Boolean.TryFormat + * for Span but it's format-less (2-arg). Both extensions route through Utf{8,16}Formatter to + * support the G/l format vocabulary (BCL provides Utf8Formatter; we provide Utf16Formatter, + * deliberately diverging from the BCL's format-less char-side to keep our two encoding surfaces aligned). + * * char: char.TryFormat is format-less / explicit on ISpanFormattable (boxes value types via the interface). + * Both extensions inline the single-element write to dodge the box. + */ + +public static partial class Utf16 +{ + /// + /// Tries to format as UTF-16 into . + /// Equivalent to but works for any . + /// + /// + /// Dispatch priority: + /// - (via ) + /// - typed fast-paths: string, enum, primitive value-types + /// - + /// - + /// - + /// The fast-paths short-circuit the cascade - same observable behavior, no boxing for value types. + /// + /// The value to format. If null: write nothing and return true. + /// Destination buffer for the UTF-16 output. + /// Number of UTF-16 code units (chars) written on success. + /// Optional format string, forwarded to the value's formatting interfaces. + /// Optional format provider. If it exposes , intercepts all other dispatch paths. + /// The type of the value to format. + /// True on success, false if was too small. + [Pure] + public static bool TryFormat( + T value, + Span destination, + out int elementsWritten, + String16? format = null, + IFormatProvider? provider = null + ) + { + // If there's a custom formatter, always use it. + if (TryFormat_ICustomFormatter(value, destination, out elementsWritten, format, provider) is { } result) + { + return result; + } + + if (!typeof(T).IsValueType && value is null) // 'value is null' boxes in Debug - IsValueType pre-check folds it away + { + elementsWritten = 0; + return true; + } + + if (typeof(T) == typeof(string)) + { + return TryAppend(Unsafe.As(ref value).AsSpan(), destination, out elementsWritten); + } + +#if NET + // Special-case enums to avoid boxing them. + if (typeof(T).IsEnum) + { + return Enum.TryFormatUnconstrained(value, destination, out elementsWritten, format); + } +#endif + +#if NET8_0_OR_GREATER + // Value-type fast-paths: avoid the ~24 B box that `((ISpanFormattable)value).TryFormat()` would incur for an unconstrained generic T. + // `typeof(T) == typeof(X)` folds at JIT specialization, so only the matching branch survives in each instantiation; + // reference-type T pays nothing (all comparisons fold to false in the shared instantiation). + // Same list as Utf8.TryFormat - every IUtf8SpanFormattable primitive also implements ISpanFormattable for Span. + if (typeof(T) == typeof(bool)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(char)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(byte)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(sbyte)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(short)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(ushort)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(int)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(uint)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(long)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(ulong)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(nint)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(nuint)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Int128)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(UInt128)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Half)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(float)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(double)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(decimal)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(DateTime)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(DateTimeOffset)) + return Unsafe + .As(ref value) + .TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(TimeSpan)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(DateOnly)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(TimeOnly)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Guid)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format); // Guid's public TryFormat takes no provider (format is culture-invariant) + if (typeof(T) == typeof(Bool8)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Bool32)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); +#endif + + /* + * "is" check order: only matters for reference types (JIT-folded for value types) + * The BCL checks were nested: IFormattable { ISpanFormattable }, + * we flattened to : ISpanFormattable, then IFormattable, + * as ISpanFormattable types are the most common case in modern .NET / IFormattable is a rare fallback. + * + * Utf8 sibling has an extra IUtf8SpanFormattable layer ahead of ISpanFormattable; for Utf16 they + * collapse into one - ISpanFormattable IS the native UTF-16 path, so no transcode helper is needed. + */ + + // If the value can format itself directly into our buffer, do so. + if (value is ISpanFormattable) + { + return ((ISpanFormattable)value).TryFormat(destination, out elementsWritten, format, provider); + } + + var s = + value is IFormattable + ? ((IFormattable)value).ToString(format, provider) // If the value can ToString with the format / provider, get the resulting string, then append that. + : value!.ToString(); // Fall back to a normal ToString and append that. + return TryAppend(s.AsSpan(), destination, out elementsWritten); + } + + /// Try to copy into . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool TryAppend(scoped String16View value, Span destination, out int elementsWritten) + { + return value.TryCopyTo(destination, out elementsWritten); + } + + /// + /// null: no custom formatter, normal dispatch should continue; + /// otherwise, the formatter's result: + /// true: success (even if the formatter failed or wrote nothing) + /// false: the destination was too small. + /// + [MethodImpl(MethodImplOptions.NoInlining)] + private static bool? TryFormat_ICustomFormatter( + T value, + Span destination, + out int elementsWritten, + String16? format, + IFormatProvider? provider + ) + { + if ( + provider is null + || provider.GetType() == typeof(CultureInfo) + || // optimization to avoid GetFormat in the majority case + provider.GetFormat(typeof(ICustomFormatter)) is not { } formatterObj + ) + { + elementsWritten = 0; + return null; // not handled + } + + var formatter = (ICustomFormatter)formatterObj; // InvalidCastException if formatterObj is the wrong type + if (formatter.Format(format, value, provider) is { } customFormatted) + { + return TryAppend(customFormatted.AsSpan(), destination, out elementsWritten); + } + + elementsWritten = 0; + return true; + } + + /// bool doesn't implement ISpanFormattable for some reason: this emulates it, for completeness. + /// Also, this handles the G/l formats, which format-less bool.TryFormat() doesn't handle: + /// https://learn.microsoft.com/en-us/dotnet/api/system.buffers.text.utf8formatter.tryformat?view=net-9.0#system-buffers-text-utf8formatter-tryformat(system-boolean-system-span((system-byte))-system-int32@-system-buffers-standardformat) + /// Unknown formats fall back to the format-less behavior - matches C# string interpolation, which + /// ignores the format for bool (no ISpanFormattable / IFormattable, so $"{flag:X}" yields "True"). + public static bool TryFormat( + this bool value, + Span destination, + out int elementsWritten, + String16View format = default, + IFormatProvider? provider = null + ) + { + return Utf16Formatter.TryFormat(value, destination, out elementsWritten, Utf8.ParseBoolFormat(format)); + } + + /// char implements ISpanFormattable, but explicitly: here's a public extension, for completeness. + /// Also, the BCL actually doesn't handle any formats; cast to ushort if you need formatting. + public static bool TryFormat( + this char value, + Span destination, + out int elementsWritten, + String16View format = default, + IFormatProvider? provider = null + ) + { + if (destination.IsEmpty) + { + elementsWritten = 0; + return false; + } + + destination[0] = value; + elementsWritten = 1; + return true; + } +} diff --git a/Brutal.Strings/Unicode/Utf16.cs b/Brutal.Strings/Unicode/Utf16.cs new file mode 100644 index 0000000..d9862ae --- /dev/null +++ b/Brutal.Strings/Unicode/Utf16.cs @@ -0,0 +1,25 @@ +using System.Diagnostics.Contracts; + +namespace Brutal.Strings; + +/// UTF-16 / char-span counterpart of . Minimal surface for now. +public static partial class Utf16 +{ + /// + /// Count the number of chars in a null-terminated char array. + /// + [Pure] + public static unsafe int GetCharCount(Ptr chars) + { + return MemoryMarshal.CreateReadOnlySpanFromNullTerminated(chars).Length; + } + + /// + /// Convert a null-terminated char array to a containing the chars up to the null terminator. + /// + [Pure] + public static unsafe String16View GetNullTerminatedSpan(Ptr chars) + { + return MemoryMarshal.CreateReadOnlySpanFromNullTerminated(chars); + } +} diff --git a/Brutal.Strings/Unicode/Utf16Formatter.cs b/Brutal.Strings/Unicode/Utf16Formatter.cs new file mode 100644 index 0000000..84f7df0 --- /dev/null +++ b/Brutal.Strings/Unicode/Utf16Formatter.cs @@ -0,0 +1,91 @@ +using System.Buffers; +using System.Buffers.Text; + +namespace Brutal.Strings; + +public static class Utf16Formatter +{ + /// + public static bool TryFormat( + bool value, + Span destination, + out int charsWritten, + StandardFormat format = default + ) + { + var symbol = GetSymbolOrDefault(format, 'G'); + + if (value) + { + if (symbol == 'G') + { + if (!"True".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else if (symbol == 'l') + { + if (!"true".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else + { + goto BadFormat; + } + + charsWritten = 4; + return true; + } + else + { + if (symbol == 'G') + { + if (!"False".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else if (symbol == 'l') + { + if (!"false".TryCopyTo(destination)) + { + goto BufferTooSmall; + } + } + else + { + goto BadFormat; + } + + charsWritten = 5; + return true; + } + + BadFormat: + throw new FormatException("BadFormatSpecifier"); + + BufferTooSmall: + charsWritten = 0; + return false; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static char GetSymbolOrDefault(in StandardFormat format, char defaultSymbol) + { + // This is equivalent to the line below, but it is written in such a way + // that the JIT is able to perform more optimizations. + // + // return (format.IsDefault) ? defaultSymbol : format.Symbol; + + var symbol = format.Symbol; + if (symbol == default && format.Precision == default) + { + symbol = defaultSymbol; + } + + return symbol; + } +} diff --git a/Brutal.Strings/Unicode/Utf8.TryFormat.cs b/Brutal.Strings/Unicode/Utf8.TryFormat.cs new file mode 100644 index 0000000..0649622 --- /dev/null +++ b/Brutal.Strings/Unicode/Utf8.TryFormat.cs @@ -0,0 +1,318 @@ +using System.Buffers; +using System.Buffers.Text; +using System.Diagnostics.Contracts; +using System.Globalization; +using System.Text; +using Brutal.Enums; + +namespace Brutal.Strings; + +/* + * KEEP IN SYNC with Utf16.TryFormat.cs - these two files mirror the same dispatch ladder and helper method + * order so they diff cleanly. Differences are encoding-specific and noted inline: + * - Utf8 needs TryFormat_ISpanFormattable (UTF-16 stack buffer → UTF-8 transcode), and TryAppend(ROS, Span) + * to transcode the string fast-path / ICustomFormatter / IFormattable fallback. Utf16 doesn't (ISpanFormattable + * IS the native UTF-16 path; the equivalent TryAppend is just a CopyTo). + * - Both encodings have bool / char extension methods, for symmetric reasons: + * * bool: implements neither ISpanFormattable nor IUtf8SpanFormattable. BCL provides Boolean.TryFormat + * for Span but it's format-less (2-arg). Both extensions route through Utf{8,16}Formatter to + * support the G/l format vocabulary (BCL provides Utf8Formatter; we provide Utf16Formatter, + * deliberately diverging from the BCL's format-less char-side to keep our two encoding surfaces aligned). + * * char: char.TryFormat is format-less / explicit on ISpanFormattable (boxes value types via the interface). + * Both extensions inline the single-element write to dodge the box. + */ + +public static partial class Utf8 +{ + /// + /// Tries to format as UTF-8 into . + /// Equivalent to but works for any . + /// + /// + /// Dispatch priority: + /// - (via ) + /// - typed fast-paths: string, enum, primitive value-types + /// - + /// - + /// - + /// - + /// The fast-paths short-circuit the cascade - same observable behavior, no boxing for value types. + /// + /// + /// Source: https://github.com/dotnet/dotnet/blob/b0f34d51fccc69fd334253924abd8d6853fad7aa/src/runtime/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8.cs#L485 + /// + /// The value to format. If null: write nothing and return true. + /// Destination buffer for the UTF-8 output. + /// Number of UTF-8 code units (bytes) written on success. + /// Optional format string, forwarded to the value's formatting interfaces. + /// Optional format provider. If it exposes , intercepts all other dispatch paths. + /// The type of the value to format. + /// True on success, false if was too small. + [Pure] + public static bool TryFormat( + T value, + Span destination, + out int elementsWritten, + String16? format = null, + IFormatProvider? provider = null + ) + { + // If there's a custom formatter, always use it. + if (TryFormat_ICustomFormatter(value, destination, out elementsWritten, format, provider) is { } result) + { + return result; + } + + if (!typeof(T).IsValueType && value is null) // 'value is null' boxes in Debug - IsValueType pre-check folds it away + { + elementsWritten = 0; + return true; + } + + if (typeof(T) == typeof(string)) + { + return TryAppend(Unsafe.As(ref value).AsSpan(), destination, out elementsWritten); + } + +#if NET + // Special-case enums to avoid boxing them. + if (typeof(T).IsEnum) + { + // TODO https://github.com/dotnet/runtime/issues/81500: + // Once Enum.TryFormat provides direct UTF8 support, use that here instead. + return Enum.TryFormatUnconstrained(value, destination, out elementsWritten, format); + } +#endif + +#if NET8_0_OR_GREATER + // Value-type fast-paths: avoid the ~24 B box that `((IUtf8SpanFormattable)value).TryFormat()` would incur for an unconstrained generic T. + // `typeof(T) == typeof(X)` folds at JIT specialization, so only the matching branch survives in each instantiation; + // reference-type T pays nothing (all comparisons fold to false in the shared instantiation). + // Covers every value type known to implement IUtf8SpanFormattable in Core (BCL primitives + Brutal's Bool8/Bool32). + if (typeof(T) == typeof(bool)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(char)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(byte)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(sbyte)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(short)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(ushort)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(int)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(uint)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(long)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(ulong)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(nint)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(nuint)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Int128)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(UInt128)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Half)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(float)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(double)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(decimal)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(DateTime)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(DateTimeOffset)) + return Unsafe + .As(ref value) + .TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(TimeSpan)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(DateOnly)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(TimeOnly)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Guid)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format); // Guid's public TryFormat takes no provider (format is culture-invariant) + if (typeof(T) == typeof(Bool8)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); + if (typeof(T) == typeof(Bool32)) + return Unsafe.As(ref value).TryFormat(destination, out elementsWritten, format, provider); +#endif + + /* + * "is" check order: only matters for reference types (JIT-folded for value types) + * The BCL checks were nested: IFormattable { ISpanFormattable }, + * we flattened to : ISpanFormattable, then IFormattable, + * as ISpanFormattable types are the most common case in modern .NET / IFormattable is a rare fallback. + * + * nested: IU8 -> IForm { ISpan } flat: IU8 -> ISpan -> IForm + * IUtf8SpanFormattable 1 (hit) 1 (hit) + * ISpanFormattable 3 (fail, pass, pass) 2 (fail, pass) + * IFormattable 3 (fail, pass, fail) 3 (fail, fail, pass) + * neither 2 (fail, fail) 3 (fail, fail, fail) + */ + + // If the value can format itself directly into our buffer, do so. + if (value is IUtf8SpanFormattable) + { + return ((IUtf8SpanFormattable)value).TryFormat(destination, out elementsWritten, format, provider); + } + + // If the value can format itself directly into a UTF16 buffer, do so, then transcode. + if (value is ISpanFormattable) + { + return TryFormat_ISpanFormattable(value, destination, out elementsWritten, format, provider); + } + + var s = + value is IFormattable + ? ((IFormattable)value).ToString(format, provider) // If the value can ToString with the format / provider, get the resulting string, then append that. + : value!.ToString(); // Fall back to a normal ToString and append that. + return TryAppend(s.AsSpan(), destination, out elementsWritten); + } + + /// Convert from UTF-16 to UTF-8 into . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool TryAppend(scoped String16View value, Span destination, out int elementsWritten) + { + return TryGetBytes(value, destination, out elementsWritten); + } + + /// + /// null: no custom formatter, normal dispatch should continue; + /// otherwise, the formatter's result: + /// true: success (even if the formatter failed or wrote nothing) + /// false: the destination was too small. + /// + [MethodImpl(MethodImplOptions.NoInlining)] + private static bool? TryFormat_ICustomFormatter( + T value, + Span destination, + out int elementsWritten, + String16? format, + IFormatProvider? provider + ) + { + if ( + provider is null + || provider.GetType() == typeof(CultureInfo) + || // optimization to avoid GetFormat in the majority case + provider.GetFormat(typeof(ICustomFormatter)) is not { } formatterObj + ) + { + elementsWritten = 0; + return null; // not handled + } + + var formatter = (ICustomFormatter)formatterObj; // InvalidCastException if formatterObj is the wrong type + if (formatter.Format(format, value, provider) is { } customFormatted) + { + return TryAppend(customFormatted.AsSpan(), destination, out elementsWritten); + } + + elementsWritten = 0; + return true; + } + + /// Expects to be , + /// and formats it into a temporary UTF-16 stack buffer, then converts to UTF-8. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool TryFormat_ISpanFormattable( + T value, + Span destination, + out int elementsWritten, + String16View format, + IFormatProvider? provider + ) + { + Debug.Assert(value is ISpanFormattable); + + Span utf16 = stackalloc Char16[256]; + return ((ISpanFormattable)value).TryFormat(utf16, out var charsWritten, format, provider) + ? TryAppend(utf16[..charsWritten], destination, out elementsWritten) + : GrowAndAppendFormatted(value, utf16.Length, destination, out elementsWritten, format, provider); + + [MethodImpl(MethodImplOptions.NoInlining)] + static bool GrowAndAppendFormatted( + T value, + int length, + Span destination, + out int elementsWritten, + String16View format, + IFormatProvider? provider + ) + { + Debug.Assert(value is ISpanFormattable); + + while (true) + { + var newLength = length * 2; + if ((uint)newLength > Array.MaxLength) + { + newLength = + length == Array.MaxLength + ? Array.MaxLength + 1 // force OOM + : Array.MaxLength; + } + + length = newLength; + + var array = ArrayPool.Shared.Rent(length); + try + { + if (((ISpanFormattable)value).TryFormat(array, out var charsWritten, format, provider)) + { + return TryAppend(array.AsSpan(0, charsWritten), destination, out elementsWritten); + } + } + finally + { + ArrayPool.Shared.Return(array); + } + } + } + } + + /// Matches BCL interpolator behavior: falls back to the format-less behavior if the format is unknown. + internal static StandardFormat ParseBoolFormat(String16View format) + { + return StandardFormat.TryParse(format, out var result) && result.Symbol is '\0' or 'G' or 'l' + ? result + : default; + } + + /// bool doesn't implement IUtf8SpanFormattable for some reason: this emulates it, for completeness. + /// Also, this handles the G/l formats, which non-UTF8 formatting doesn't handle: + /// https://learn.microsoft.com/en-us/dotnet/api/system.buffers.text.utf8formatter.tryformat?view=net-9.0#system-buffers-text-utf8formatter-tryformat(system-boolean-system-span((system-byte))-system-int32@-system-buffers-standardformat) + /// Unknown formats fall back to the format-less behavior - matches C# string interpolation, which + /// ignores the format for bool (no ISpanFormattable / IFormattable, so $"{flag:X}" yields "True"). + public static bool TryFormat( + this bool value, + Span destination, + out int elementsWritten, + String16View format = default, + IFormatProvider? provider = null + ) + { + return Utf8Formatter.TryFormat(value, destination, out elementsWritten, ParseBoolFormat(format)); + } + + /// char implements IUtf8SpanFormattable, but explicitly: here's a public extension, for completeness. + /// Also, the BCL actually doesn't handle any formats; cast to ushort if you need formatting. + public static bool TryFormat( + this char value, + Span destination, + out int elementsWritten, + String16View format = default, + IFormatProvider? provider = null + ) + { + return TryGetBytes([value], destination, out elementsWritten); + } +} diff --git a/Brutal.Strings/Unicode/Utf8.cs b/Brutal.Strings/Unicode/Utf8.cs new file mode 100644 index 0000000..a2f45b8 --- /dev/null +++ b/Brutal.Strings/Unicode/Utf8.cs @@ -0,0 +1,395 @@ +using System.Buffers; +using System.Diagnostics.Contracts; +using System.Text; +using Brutal.Collections.Experimental; +using SystemUtf8 = System.Text.Unicode.Utf8; + +namespace Brutal.Strings; + +/// +/// Combination of and for common UTF-8 operations. +/// +public static partial class Utf8 +{ + /// + /// Count the number of bytes in a null-terminated byte array. + /// + [Pure] + public static unsafe int GetByteCount(Ptr bytes) + { + return MemoryMarshal.CreateReadOnlySpanFromNullTerminated(bytes).Length; + } + + /// + /// Convert a null-terminated byte array to a containing the bytes up to the null terminator. + /// + [Pure] + public static unsafe String8View GetNullTerminatedSpan(Ptr bytes) + { + return MemoryMarshal.CreateReadOnlySpanFromNullTerminated(bytes); + } + + /// Evaluate length from the null-terminator, if found - strlen() equivalent. + [Pure] + public static int EvaluateLength(String8View utf8Buffer) + { + var length = utf8Buffer.IndexOf((Char8)0); + return length != -1 ? length : utf8Buffer.Length; + } + + /// + /// Usage: + /// using (Utf8.GetChars(value, stackalloc Char16[256], out var chars)) + /// { + /// // ... use "chars" here + /// } + /// + /// The value to decode + /// A temporary buffer, typically stack-allocated; if too small, will rent an array. + /// The decoded UTF16 characters + /// Scratch handle; dispose to return any rented array to the pool. + [Pure] + public static ScratchSpan GetChars(String8View value, Span stackBuffer, out Span chars) + { + var scratch = new ScratchSpan(GetCharCount(value), stackBuffer, out chars); + GetChars(value, chars); + return scratch; + } + + /// + /// Usage: + /// using (Utf8.GetBytes(value, stackalloc Char8[256], out var bytes)) + /// { + /// // ... use "bytes" here + /// } + /// + /// The value to encode + /// A temporary buffer, typically stack-allocated; if too small, will rent an array. + /// The encoded UTF8 bytes + /// Scratch handle; dispose to return any rented array to the pool. + [Pure] + public static ScratchSpan GetBytes(String16View value, Span stackBuffer, out Span bytes) + { + var scratch = new ScratchSpan(GetByteCount(value), stackBuffer, out bytes); + GetBytes(value, bytes); + return scratch; + } +} + +// System.Text.Unicode.Utf8 +public static partial class Utf8 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static System.Buffers.OperationStatus FromUtf16( + String16View source, + Span destination, + out int charsRead, + out int bytesWritten, + bool replaceInvalidSequences = true, + bool isFinalBlock = true + ) + { + return SystemUtf8.FromUtf16( + source, + destination, + out charsRead, + out bytesWritten, + replaceInvalidSequences, + isFinalBlock + ); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static System.Buffers.OperationStatus ToUtf16( + String8View source, + Span destination, + out int bytesRead, + out int charsWritten, + bool replaceInvalidSequences = true, + bool isFinalBlock = true + ) + { + return SystemUtf8.ToUtf16( + source, + destination, + out bytesRead, + out charsWritten, + replaceInvalidSequences, + isFinalBlock + ); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryWrite( + Span destination, + [InterpolatedStringHandlerArgument(nameof(destination))] + ref SystemUtf8.TryWriteInterpolatedStringHandler handler, + out int bytesWritten + ) + { + return SystemUtf8.TryWrite(destination, ref handler, out bytesWritten); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryWrite( + Span destination, + IFormatProvider? provider, + [InterpolatedStringHandlerArgument(nameof(destination), nameof(provider))] + ref SystemUtf8.TryWriteInterpolatedStringHandler handler, + out int bytesWritten + ) + { + return SystemUtf8.TryWrite(destination, provider, ref handler, out bytesWritten); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsValid(String8View value) + { + return SystemUtf8.IsValid(value); + } +} + +// System.Text.Encoding.UTF8 +public static partial class Utf8 +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetByteCount(Char16[] chars) + { + return Encoding.UTF8.GetByteCount(chars, 0, chars.Length); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetByteCount(string str) + { + return Encoding.UTF8.GetByteCount(str); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetByteCount(Char16[] chars, int index, int count) + { + return Encoding.UTF8.GetByteCount(chars, index, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetByteCount(string s, int index, int count) + { + return Encoding.UTF8.GetByteCount(s, index, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetByteCount(Ptr chars, int count) + { + return Encoding.UTF8.GetByteCount(chars, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetByteCount(String16View chars) + { + return Encoding.UTF8.GetByteCount(chars); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Char8[] GetBytes(Char16[] chars) + { + return Encoding.UTF8.GetBytes(chars); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Char8[] GetBytes(Char16[] chars, int index, int count) + { + return Encoding.UTF8.GetBytes(chars, index, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetBytes(Char16[] chars, int charIndex, int charCount, Char8[] bytes, int byteIndex) + { + return Encoding.UTF8.GetBytes(chars, charIndex, charCount, bytes, byteIndex); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Char8[] GetBytes(string s) + { + return Encoding.UTF8.GetBytes(s); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Char8[] GetBytes(string s, int index, int count) + { + return Encoding.UTF8.GetBytes(s, index, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetBytes(string s, int charIndex, int charCount, Char8[] bytes, int byteIndex) + { + return Encoding.UTF8.GetBytes(s, charIndex, charCount, bytes, byteIndex); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetBytes(Ptr chars, int charCount, Ptr bytes, int byteCount) + { + return Encoding.UTF8.GetBytes(chars, charCount, bytes, byteCount); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetBytes(String16View chars, Span bytes) + { + return Encoding.UTF8.GetBytes(chars, bytes); + } + + /// + /// + /// Routed through , which is single-pass and alloc-free. + /// Avoid using which allocates (an EncoderFallbackBuffer) + /// when is too small. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryGetBytes(String16View chars, Span bytes, out int bytesWritten) + { + if (FromUtf16(chars, bytes, out _, out bytesWritten) == OperationStatus.Done) + return true; + bytesWritten = 0; // return 0 on failure, matching Encoding.TryGetBytes (no partial count) + return false; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetCharCount(Char8[] bytes) + { + return Encoding.UTF8.GetCharCount(bytes, 0, bytes.Length); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetCharCount(Char8[] bytes, int index, int count) + { + return Encoding.UTF8.GetCharCount(bytes, index, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetCharCount(Ptr bytes, int count) + { + return Encoding.UTF8.GetCharCount(bytes, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetCharCount(String8View bytes) + { + return Encoding.UTF8.GetCharCount(bytes); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Char16[] GetChars(Char8[] bytes) + { + return Encoding.UTF8.GetChars(bytes); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Char16[] GetChars(Char8[] bytes, int index, int count) + { + return Encoding.UTF8.GetChars(bytes, index, count); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetChars(Char8[] bytes, int byteIndex, int byteCount, Char16[] chars, int charIndex) + { + return Encoding.UTF8.GetChars(bytes, byteIndex, byteCount, chars, charIndex); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetChars(Ptr bytes, int byteCount, Ptr chars, int charCount) + { + return Encoding.UTF8.GetChars(bytes, byteCount, chars, charCount); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetChars(String8View bytes, Span chars) + { + return Encoding.UTF8.GetChars(bytes, chars); + } + + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool TryGetChars(String8View bytes, Span chars, out int charsWritten) + { + if (ToUtf16(bytes, chars, out _, out charsWritten) == OperationStatus.Done) + return true; + charsWritten = 0; // return 0 on failure, matching Encoding.TryGetBytes (no partial count) + return false; + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe string GetString(Ptr bytes, int byteCount) + { + return Encoding.UTF8.GetString(bytes, byteCount); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe string GetString(Ptr bytes) + { + return Encoding.UTF8.GetString(bytes, GetByteCount(bytes)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string GetString(String8View bytes) + { + return Encoding.UTF8.GetString(bytes); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetMaxByteCount(int charCount) + { + return Encoding.UTF8.GetMaxByteCount(charCount); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetMaxCharCount(int byteCount) + { + return Encoding.UTF8.GetMaxCharCount(byteCount); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string GetString(Char8[] bytes) + { + return Encoding.UTF8.GetString(bytes); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string GetString(Char8[] bytes, int index, int count) + { + return Encoding.UTF8.GetString(bytes, index, count); + } +} diff --git a/Brutal.Strings/Utf8Path.cs b/Brutal.Strings/Utf8Path.cs new file mode 100644 index 0000000..413c879 --- /dev/null +++ b/Brutal.Strings/Utf8Path.cs @@ -0,0 +1,305 @@ +using System.Buffers; +using Path16 = System.IO.Path; + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + +namespace Brutal.Strings; + +public static partial class Utf8 +{ + public static class Path + { + // Public static readonly variant of the separators. The Path implementation itself is using + // internal const variant of the separators for better performance. + public static readonly Char8 DirectorySeparatorChar = (Char8)Path16.DirectorySeparatorChar; + public static readonly Char8 AltDirectorySeparatorChar = (Char8)Path16.AltDirectorySeparatorChar; + public static readonly Char8 VolumeSeparatorChar = (Char8)Path16.VolumeSeparatorChar; + public static readonly Char8 PathSeparator = (Char8)Path16.PathSeparator; + + /// + public static unsafe String8 ChangeExtension(String8View path, String8View extension) + { + if (path.IsEmpty) + return String8.Empty; + + int subLength = path.Length; + if (subLength == 0) + return String8.Empty; + + for (int i = path.Length - 1; i >= 0; i--) + { + Char8 ch = path[i]; + + if (ch == '.') + { + subLength = i; + break; + } + + if (IsDirectorySeparator(ch)) + { + break; + } + } + + var subpath = path[..subLength]; + + if (extension.IsEmpty) + { + // No extension to add, just return the subpath + return new String8(subpath); + } + + var includesDot = extension[0] == (Char8)'.'; + var length = subLength + (includesDot ? extension.Length : extension.Length + 1); + + var bytes = new Char8[length]; + subpath.CopyTo(bytes); + + fixed (Char8* bytesPtr = bytes) + { + var bytesSpan = new Span(bytesPtr, bytes.Length); + + if (includesDot) + extension.CopyTo(bytesSpan[subLength..]); + else + { + bytesSpan[subLength] = (Char8)'.'; // Add the dot before the extension + extension.CopyTo(bytesSpan[(subLength + 1)..]); + } + } + + return new String8(bytes); + } + + /// + public static bool Exists(String8View path) + { + return path.Length != 0 && Path16.Exists(path.ToString16()); + } + + /// + public static String8View GetDirectoryName(String8View path) + { + var length = path.Length; + if (length == 0) + return default; + + var charCount = GetCharCount(path); + Span chars = stackalloc Char16[charCount]; + if (ToUtf16(path, chars, out _, out _) != OperationStatus.Done) + throw new ArgumentException("Invalid UTF-8 path", nameof(path)); + + var directoryName = Path16.GetDirectoryName(chars); + + return path[..GetByteCount(directoryName)]; + } + + /// + public static String8View GetFileName(String8View path) + { + var length = path.Length; + if (length == 0) + return default; + + var charCount = GetCharCount(path); + Span chars = stackalloc Char16[charCount]; + if (ToUtf16(path, chars, out _, out _) != OperationStatus.Done) + throw new ArgumentException("Invalid UTF-8 path", nameof(path)); + + var fileName = Path16.GetFileName(chars); + return path[^GetByteCount(fileName)..]; + } + + /// + public static String8View GetFileNameWithoutExtension(String8View path) + { + var fileName = GetFileName(path); + var lastPeriod = fileName.LastIndexOf((Char8)'.'); + return lastPeriod < 0 ? fileName : fileName[..lastPeriod]; + } + + /// + public static String8View GetExtension(String8View path) + { + var length = path.Length; + + for (var i = length - 1; i >= 0; i--) + { + var ch = path[i]; + if (ch == '.') + { + return i != length - 1 ? path.Slice(i, length - i) : default; + } + + if (IsDirectorySeparator(ch)) + break; + } + + return default; + } + + /// + public static bool HasExtension(String8View path) + { + for (var i = path.Length - 1; i >= 0; i--) + { + var ch = path[i]; + if (ch == '.') + { + return i != path.Length - 1; + } + + if (IsDirectorySeparator(ch)) + break; + } + + return false; + } + + /// + public static bool TryJoin(String8View path1, String8View path2, Span destination, out int charsWritten) + { + charsWritten = 0; + if (path1.IsEmpty && path2.IsEmpty) + return true; + + if (path1.IsEmpty || path2.IsEmpty) + { + ref String8View pathToUse = ref path1.IsEmpty ? ref path2 : ref path1; + if (destination.Length < pathToUse.Length) + { + return false; + } + + pathToUse.CopyTo(destination); + charsWritten = pathToUse.Length; + return true; + } + + bool needsSeparator = !(EndsInDirectorySeparator(path1) || StartsWithDirectorySeparator(path2)); + int charsNeeded = path1.Length + path2.Length + (needsSeparator ? 1 : 0); + if (destination.Length < charsNeeded) + return false; + + path1.CopyTo(destination); + if (needsSeparator) + destination[path1.Length] = DirectorySeparatorChar; + + path2.CopyTo(destination.Slice(path1.Length + (needsSeparator ? 1 : 0))); + + charsWritten = charsNeeded; + return true; + } + + /// + public static bool TryJoin( + String8View path1, + String8View path2, + String8View path3, + Span destination, + out int charsWritten + ) + { + charsWritten = 0; + if (path1.IsEmpty && path2.IsEmpty && path3.IsEmpty) + return true; + + if (path1.IsEmpty) + return TryJoin(path2, path3, destination, out charsWritten); + if (path2.IsEmpty) + return TryJoin(path1, path3, destination, out charsWritten); + if (path3.IsEmpty) + return TryJoin(path1, path2, destination, out charsWritten); + + int neededSeparators = EndsInDirectorySeparator(path1) || StartsWithDirectorySeparator(path2) ? 0 : 1; + bool needsSecondSeparator = !(EndsInDirectorySeparator(path2) || StartsWithDirectorySeparator(path3)); + if (needsSecondSeparator) + neededSeparators++; + + int charsNeeded = path1.Length + path2.Length + path3.Length + neededSeparators; + if (destination.Length < charsNeeded) + return false; + + bool result = TryJoin(path1, path2, destination, out charsWritten); + Debug.Assert(result, "should never fail joining first two paths"); + + if (needsSecondSeparator) + destination[charsWritten++] = DirectorySeparatorChar; + + path3.CopyTo(destination.Slice(charsWritten)); + charsWritten += path3.Length; + + return true; + } + + /// + public static bool IsPathFullyQualified(String8View path) + { + var charCount = GetCharCount(path); + if (charCount == 0) + return false; + + Span chars = stackalloc Char16[charCount]; + if (ToUtf16(path, chars, out _, out _) != OperationStatus.Done) + throw new ArgumentException("Invalid UTF-8 path", nameof(path)); + + return Path16.IsPathFullyQualified(chars); + } + + /// + public static String8 Combine(String8View a, String8View b) + { + return String8.Move(GetBytes(Path16.Combine(a.ToString16(), b.ToString16()))); + } + + /// + public static String8 Combine(String8View a, String8View b, String8View c) + { + return String8.Move(GetBytes(Path16.Combine(a.ToString16(), b.ToString16(), c.ToString16()))); + } + + /// + public static String8 Combine(String8View a, String8View b, String8View c, String8View d) + { + return String8.Move( + GetBytes(Path16.Combine(a.ToString16(), b.ToString16(), c.ToString16(), d.ToString16())) + ); + } + + /// + public static String8 Join(String8View a, String8View b) + { + return String8.Move(GetBytes(Path16.Join(a.ToString16(), b.ToString16()))); + } + + /// + public static String8 Join(String8View a, String8View b, String8View c) + { + return String8.Move(GetBytes(Path16.Join(a.ToString16(), b.ToString16(), c.ToString16()))); + } + + /// + public static String8 Join(String8View a, String8View b, String8View c, String8View d) + { + return String8.Move(GetBytes(Path16.Join(a.ToString16(), b.ToString16(), c.ToString16(), d.ToString16()))); + } + + /// + public static String8 GetRelativePath(String8View relativeTo, String8View path) + { + return String8.Move(GetBytes(Path16.GetRelativePath(relativeTo.ToString16(), path.ToString16()))); + } + + private static bool IsDirectorySeparator(Char8 c) + { + return c == DirectorySeparatorChar || c == AltDirectorySeparatorChar; + } + + private static bool StartsWithDirectorySeparator(String8View path) => + path.Length > 0 && IsDirectorySeparator(path[0]); + + private static bool EndsInDirectorySeparator(String8View path) => + path.Length > 0 && IsDirectorySeparator(path[^1]); + } +} diff --git a/Brutal.Texture.Abstractions/Extensions/TextureFormatExtensions.cs b/Brutal.Texture.Abstractions/Extensions/TextureFormatExtensions.cs new file mode 100644 index 0000000..31e4386 --- /dev/null +++ b/Brutal.Texture.Abstractions/Extensions/TextureFormatExtensions.cs @@ -0,0 +1,709 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Static class for utility functions relating to a TextureFormat. +/// +public static class TextureFormatExtensions +{ + /// Format to get the for + extension(TextureFormat format) + { + /// + /// Returns a descriptor detailing information about a TextureFormat. + /// + /// The Descriptor + /// If the properties of the format could not be determined + public FormatDescriptor Descriptor() + { + var minBlocksX = 1u; + var minBlocksY = 1u; + var flags = FormatDescriptor.DescriptorFlags.None; + var blockSizeInBits = 0u; + var blockWidth = 0u; + var blockHeight = 0u; + var blockDepth = 0u; + + switch (format) + { + case TextureFormat.R4G4_UNorm_Pack8: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 1 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.A8_UNormKHR: + flags = 0; + blockSizeInBits = 1 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R4G4B4A4_UNorm_Pack16: + case TextureFormat.B4G4R4A4_UNorm_Pack16: + case TextureFormat.R5G6B5_UNorm_Pack16: + case TextureFormat.B5G6R5_UNorm_Pack16: + case TextureFormat.R5G5B5A1_UNorm_Pack16: + case TextureFormat.B5G5R5A1_UNorm_Pack16: + case TextureFormat.A1R5G5B5_UNorm_Pack16: + case TextureFormat.A1B5G5R5_UNorm_Pack16KHR: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 2 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R8_UNorm: + case TextureFormat.R8_SNorm: + case TextureFormat.R8_UScaled: + case TextureFormat.R8_SScaled: + case TextureFormat.R8_UInt: + case TextureFormat.R8_SInt: + case TextureFormat.R8_SRGB: + flags = 0; + blockSizeInBits = 1 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R8G8_UNorm: + case TextureFormat.R8G8_SNorm: + case TextureFormat.R8G8_UScaled: + case TextureFormat.R8G8_SScaled: + case TextureFormat.R8G8_UInt: + case TextureFormat.R8G8_SInt: + case TextureFormat.R8G8_SRGB: + flags = 0; + blockSizeInBits = 2 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R8G8B8_UNorm: + case TextureFormat.R8G8B8_SNorm: + case TextureFormat.R8G8B8_UScaled: + case TextureFormat.R8G8B8_SScaled: + case TextureFormat.R8G8B8_UInt: + case TextureFormat.R8G8B8_SInt: + case TextureFormat.R8G8B8_SRGB: + case TextureFormat.B8G8R8_UNorm: + case TextureFormat.B8G8R8_SNorm: + case TextureFormat.B8G8R8_UScaled: + case TextureFormat.B8G8R8_SScaled: + case TextureFormat.B8G8R8_UInt: + case TextureFormat.B8G8R8_SInt: + case TextureFormat.B8G8R8_SRGB: + flags = 0; + blockSizeInBits = 3 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R8G8B8A8_UNorm: + case TextureFormat.R8G8B8A8_SNorm: + case TextureFormat.R8G8B8A8_UScaled: + case TextureFormat.R8G8B8A8_SScaled: + case TextureFormat.R8G8B8A8_UInt: + case TextureFormat.R8G8B8A8_SInt: + case TextureFormat.R8G8B8A8_SRGB: + case TextureFormat.B8G8R8A8_UNorm: + case TextureFormat.B8G8R8A8_SNorm: + case TextureFormat.B8G8R8A8_UScaled: + case TextureFormat.B8G8R8A8_SScaled: + case TextureFormat.B8G8R8A8_UInt: + case TextureFormat.B8G8R8A8_SInt: + case TextureFormat.B8G8R8A8_SRGB: + flags = 0; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.A8B8G8R8_UNorm_Pack32: + case TextureFormat.A8B8G8R8_SNorm_Pack32: + case TextureFormat.A8B8G8R8_UScaled_Pack32: + case TextureFormat.A8B8G8R8_SScaled_Pack32: + case TextureFormat.A8B8G8R8_UInt_Pack32: + case TextureFormat.A8B8G8R8_SInt_Pack32: + case TextureFormat.A8B8G8R8_SRGB_Pack32: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.A2R10G10B10_UNorm_Pack32: + case TextureFormat.A2R10G10B10_SNorm_Pack32: + case TextureFormat.A2R10G10B10_UScaled_Pack32: + case TextureFormat.A2R10G10B10_SScaled_Pack32: + case TextureFormat.A2R10G10B10_UInt_Pack32: + case TextureFormat.A2R10G10B10_SInt_Pack32: + case TextureFormat.A2B10G10R10_UNorm_Pack32: + case TextureFormat.A2B10G10R10_SNorm_Pack32: + case TextureFormat.A2B10G10R10_UScaled_Pack32: + case TextureFormat.A2B10G10R10_SScaled_Pack32: + case TextureFormat.A2B10G10R10_UInt_Pack32: + case TextureFormat.A2B10G10R10_SInt_Pack32: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R16_UNorm: + case TextureFormat.R16_SNorm: + case TextureFormat.R16_UScaled: + case TextureFormat.R16_SScaled: + case TextureFormat.R16_UInt: + case TextureFormat.R16_SInt: + case TextureFormat.R16_SFloat: + flags = 0; + blockSizeInBits = 2 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R16G16_UNorm: + case TextureFormat.R16G16_SNorm: + case TextureFormat.R16G16_UScaled: + case TextureFormat.R16G16_SScaled: + case TextureFormat.R16G16_UInt: + case TextureFormat.R16G16_SInt: + case TextureFormat.R16G16_SFloat: + case TextureFormat.R16G16S105NV: // Actualy is VK_FORMAT_R16G16_SFIXED5_NV + flags = 0; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R16G16B16_UNorm: + case TextureFormat.R16G16B16_SNorm: + case TextureFormat.R16G16B16_UScaled: + case TextureFormat.R16G16B16_SScaled: + case TextureFormat.R16G16B16_UInt: + case TextureFormat.R16G16B16_SInt: + case TextureFormat.R16G16B16_SFloat: + flags = 0; + blockSizeInBits = 6 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R16G16B16A16_UNorm: + case TextureFormat.R16G16B16A16_SNorm: + case TextureFormat.R16G16B16A16_UScaled: + case TextureFormat.R16G16B16A16_SScaled: + case TextureFormat.R16G16B16A16_UInt: + case TextureFormat.R16G16B16A16_SInt: + case TextureFormat.R16G16B16A16_SFloat: + flags = 0; + blockSizeInBits = 8 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R32_UInt: + case TextureFormat.R32_SInt: + case TextureFormat.R32_SFloat: + flags = 0; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R32G32_UInt: + case TextureFormat.R32G32_SInt: + case TextureFormat.R32G32_SFloat: + flags = 0; + blockSizeInBits = 8 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R32G32B32_UInt: + case TextureFormat.R32G32B32_SInt: + case TextureFormat.R32G32B32_SFloat: + flags = 0; + blockSizeInBits = 12 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R32G32B32A32_UInt: + case TextureFormat.R32G32B32A32_SInt: + case TextureFormat.R32G32B32A32_SFloat: + flags = 0; + blockSizeInBits = 16 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R64G64_UInt: + case TextureFormat.R64G64_SInt: + case TextureFormat.R64G64_SFloat: + flags = 0; + blockSizeInBits = 16 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R64_UInt: + case TextureFormat.R64_SInt: + case TextureFormat.R64_SFloat: + flags = 0; + blockSizeInBits = 8 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R64G64B64_UInt: + case TextureFormat.R64G64B64_SInt: + case TextureFormat.R64G64B64_SFloat: + flags = 0; + blockSizeInBits = 24 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R64G64B64A64_UInt: + case TextureFormat.R64G64B64A64_SInt: + case TextureFormat.R64G64B64A64_SFloat: + flags = 0; + blockSizeInBits = 32 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.B10G11R11_UFloat_Pack32: + case TextureFormat.E5B9G9R9_UFloat_Pack32: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.D16_UNorm: + flags = FormatDescriptor.DescriptorFlags.DepthBit; + blockSizeInBits = 2 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.X8D24_UNorm_Pack32: + flags = FormatDescriptor.DescriptorFlags.PackedBit | FormatDescriptor.DescriptorFlags.DepthBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.D32_SFloat: + flags = FormatDescriptor.DescriptorFlags.DepthBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.S8_UInt: + flags = FormatDescriptor.DescriptorFlags.StencilBit; + blockSizeInBits = 1 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.D16_UNormS8_UInt: + flags = FormatDescriptor.DescriptorFlags.DepthBit | FormatDescriptor.DescriptorFlags.StencilBit; + blockSizeInBits = 3 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.D24_UNormS8_UInt: + flags = FormatDescriptor.DescriptorFlags.DepthBit | FormatDescriptor.DescriptorFlags.StencilBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.D32_SFloatS8_UInt: + flags = FormatDescriptor.DescriptorFlags.DepthBit | FormatDescriptor.DescriptorFlags.StencilBit; + blockSizeInBits = 8 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.BC1Rgb_UNorm_Block: + case TextureFormat.BC1Rgb_SRGB_Block: + case TextureFormat.BC1Rgba_UNorm_Block: + case TextureFormat.BC1Rgba_SRGB_Block: + case TextureFormat.BC4_UNorm_Block: + case TextureFormat.BC4_SNorm_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.BC2_UNorm_Block: + case TextureFormat.BC2_SRGB_Block: + case TextureFormat.BC3_UNorm_Block: + case TextureFormat.BC3_SRGB_Block: + case TextureFormat.BC5_UNorm_Block: + case TextureFormat.BC5_SNorm_Block: + case TextureFormat.BC6HUFloat_Block: + case TextureFormat.BC6H_SFloat_Block: + case TextureFormat.BC7_UNorm_Block: + case TextureFormat.BC7_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.ETC2R8G8B8_UNorm_Block: + case TextureFormat.ETC2R8G8B8_SRGB_Block: + case TextureFormat.ETC2R8G8B8A1_UNorm_Block: + case TextureFormat.ETC2R8G8B8A1_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.EACR11_UNorm_Block: + case TextureFormat.EACR11_SNorm_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.ETC2R8G8B8A8_UNorm_Block: + case TextureFormat.ETC2R8G8B8A8_SRGB_Block: + case TextureFormat.EACR11G11_UNorm_Block: + case TextureFormat.EACR11G11_SNorm_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.Pvrtc12Bpp_SRGB_BlockIMG: + case TextureFormat.Pvrtc12Bpp_UNorm_BlockIMG: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 8; + blockHeight = 4; + blockDepth = 1; + minBlocksX = 2; + minBlocksY = 2; + break; + case TextureFormat.Pvrtc22Bpp_SRGB_BlockIMG: + case TextureFormat.Pvrtc22Bpp_UNorm_BlockIMG: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 8; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.Pvrtc14Bpp_SRGB_BlockIMG: + case TextureFormat.Pvrtc14Bpp_UNorm_BlockIMG: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + minBlocksX = 2; + minBlocksY = 2; + break; + case TextureFormat.Pvrtc24Bpp_SRGB_BlockIMG: + case TextureFormat.Pvrtc24Bpp_UNorm_BlockIMG: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 8 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.ASTC4X4_SFloat_Block: + case TextureFormat.ASTC4X4_UNorm_Block: + case TextureFormat.ASTC4X4_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 4; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.ASTC5X4_SFloat_Block: + case TextureFormat.ASTC5X4_UNorm_Block: + case TextureFormat.ASTC5X4_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 5; + blockHeight = 4; + blockDepth = 1; + break; + case TextureFormat.ASTC5X5_SFloat_Block: + case TextureFormat.ASTC5X5_UNorm_Block: + case TextureFormat.ASTC5X5_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 5; + blockHeight = 5; + blockDepth = 1; + break; + case TextureFormat.ASTC6X5_SFloat_Block: + case TextureFormat.ASTC6X5_UNorm_Block: + case TextureFormat.ASTC6X5_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 6; + blockHeight = 5; + blockDepth = 1; + break; + case TextureFormat.ASTC6X6_SFloat_Block: + case TextureFormat.ASTC6X6_UNorm_Block: + case TextureFormat.ASTC6X6_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 6; + blockHeight = 6; + blockDepth = 1; + break; + case TextureFormat.ASTC8X5_SFloat_Block: + case TextureFormat.ASTC8X5_UNorm_Block: + case TextureFormat.ASTC8X5_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 8; + blockHeight = 5; + blockDepth = 1; + break; + case TextureFormat.ASTC8X6_SFloat_Block: + case TextureFormat.ASTC8X6_UNorm_Block: + case TextureFormat.ASTC8X6_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 8; + blockHeight = 6; + blockDepth = 1; + break; + case TextureFormat.ASTC8X8_SFloat_Block: + case TextureFormat.ASTC8X8_UNorm_Block: + case TextureFormat.ASTC8X8_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 8; + blockHeight = 8; + blockDepth = 1; + break; + case TextureFormat.ASTC10X5_SFloat_Block: + case TextureFormat.ASTC10X5_UNorm_Block: + case TextureFormat.ASTC10X5_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 10; + blockHeight = 5; + blockDepth = 1; + break; + case TextureFormat.ASTC10X6_SFloat_Block: + case TextureFormat.ASTC10X6_UNorm_Block: + case TextureFormat.ASTC10X6_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 10; + blockHeight = 6; + blockDepth = 1; + break; + case TextureFormat.ASTC10X8_SFloat_Block: + case TextureFormat.ASTC10X8_UNorm_Block: + case TextureFormat.ASTC10X8_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 10; + blockHeight = 8; + blockDepth = 1; + break; + case TextureFormat.ASTC10X10_SFloat_Block: + case TextureFormat.ASTC10X10_UNorm_Block: + case TextureFormat.ASTC10X10_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 10; + blockHeight = 10; + blockDepth = 1; + break; + case TextureFormat.ASTC12X10_SFloat_Block: + case TextureFormat.ASTC12X10_UNorm_Block: + case TextureFormat.ASTC12X10_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + blockSizeInBits = 16 * 8; + blockWidth = 12; + blockHeight = 10; + blockDepth = 1; + break; + case TextureFormat.ASTC12X12_SFloat_Block: + case TextureFormat.ASTC12X12_UNorm_Block: + case TextureFormat.ASTC12X12_SRGB_Block: + flags = FormatDescriptor.DescriptorFlags.CompressedBit; + + blockSizeInBits = 16 * 8; + blockWidth = 12; + blockHeight = 12; + blockDepth = 1; + break; + case TextureFormat.B8G8R8G8422_UNorm: + case TextureFormat.G8B8G8R8422_UNorm: + flags = 0; + blockSizeInBits = 4 * 8; + blockWidth = 2; + blockHeight = 1; + blockDepth = 1; + break; + // Plane and Scaled formats are prohibited by libktx. + case TextureFormat.G8B8R82_Plane420_UNorm: + case TextureFormat.G8B8R83_Plane420_UNorm: + flags = FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 3 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G8B8R83_Plane422_UNorm: + case TextureFormat.G8B8R82_Plane422_UNorm: + flags = FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 3 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G8B8R83_Plane444_UNorm: + case TextureFormat.G8B8R82_Plane444_UNorm: + flags = FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 3 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R10X6G10X6B10X6A10X6_UNorm4_Pack16: + //case TextureFormat.R10X6G10X6B10X6A10X6_UInt4_Pack16_Arm: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 8 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G10X6B10X6G10X6R10X6422_UNorm4_Pack16: + case TextureFormat.B10X6G10X6R10X6G10X6422_UNorm4_Pack16: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 8 * 8; + blockWidth = 2; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G10X6B10X6R10X62_Plane420_UNorm3_Pack16: + case TextureFormat.G10X6B10X6R10X62_Plane422_UNorm3_Pack16: + case TextureFormat.G10X6B10X6R10X62_Plane444_UNorm3_Pack16: + case TextureFormat.G10X6B10X6R10X63_Plane420_UNorm3_Pack16: + case TextureFormat.G10X6B10X6R10X63_Plane422_UNorm3_Pack16: + case TextureFormat.G10X6B10X6R10X63_Plane444_UNorm3_Pack16: + flags = FormatDescriptor.DescriptorFlags.PackedBit | FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 6 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R12X4G12X4B12X4A12X4_UNorm4_Pack16: + //case TextureFormat.R12X4G12X4B12X4A12X4_UInt4_Pack16_Arm: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 8 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G12X4B12X4G12X4R12X4422_UNorm4_Pack16: + case TextureFormat.B12X4G12X4R12X4G12X4422_UNorm4_Pack16: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 8 * 8; + blockWidth = 2; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G12X4B12X4R12X42_Plane420_UNorm3_Pack16: + case TextureFormat.G12X4B12X4R12X42_Plane422_UNorm3_Pack16: + case TextureFormat.G12X4B12X4R12X42_Plane444_UNorm3_Pack16: + case TextureFormat.G12X4B12X4R12X43_Plane420_UNorm3_Pack16: + case TextureFormat.G12X4B12X4R12X43_Plane422_UNorm3_Pack16: + case TextureFormat.G12X4B12X4R12X43_Plane444_UNorm3_Pack16: + flags = FormatDescriptor.DescriptorFlags.PackedBit | FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 6 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G16B16G16R16422_UNorm: + case TextureFormat.B16G16R16G16422_UNorm: + flags = 0; + blockSizeInBits = 8 * 8; + blockWidth = 2; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.G16B16R163_Plane420_UNorm: + case TextureFormat.G16B16R162_Plane420_UNorm: + case TextureFormat.G16B16R163_Plane422_UNorm: + case TextureFormat.G16B16R162_Plane422_UNorm: + case TextureFormat.G16B16R162_Plane444_UNorm: + flags = FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 6 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R10X6_UNorm_Pack16: + case TextureFormat.R12X4_UNorm_Pack16: + case TextureFormat.A4R4G4B4_UNorm_Pack16: + case TextureFormat.A4B4G4R4_UNorm_Pack16: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 2 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.R10X6G10X6_UNorm2_Pack16: + case TextureFormat.R12X4G12X4_UNorm2_Pack16: + flags = FormatDescriptor.DescriptorFlags.PackedBit; + blockSizeInBits = 4 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + + case TextureFormat.G16B16R163_Plane444_UNorm: + flags = FormatDescriptor.DescriptorFlags.PlanarBit; + blockSizeInBits = 6 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + case TextureFormat.Undefined: + flags = 0; + blockSizeInBits = 0 * 8; + blockWidth = 1; + blockHeight = 1; + blockDepth = 1; + break; + default: + throw new NotImplementedException("FormatDescriptor undefined for TextureFormat " + format); + } + return new FormatDescriptor( + flags, + blockSizeInBits, + blockWidth, + blockHeight, + blockDepth, + minBlocksX, + minBlocksY + ); + } + } +} diff --git a/Brutal.Texture.Abstractions/Format/FormatDescriptor.cs b/Brutal.Texture.Abstractions/Format/FormatDescriptor.cs new file mode 100644 index 0000000..946f2b3 --- /dev/null +++ b/Brutal.Texture.Abstractions/Format/FormatDescriptor.cs @@ -0,0 +1,91 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Holds information about a . +/// +/// +/// +/// Planar formats are not represented well by a FormatDescriptor. While a FormatDescriptor might be instantiated for a planar +/// texture format, the properties of the FormatDescriptor should not be relied upon. +/// +/// +/// This structure is taken from libktx in the file KTX-SOFTWARE\lib\vk_format.h +/// +public readonly record struct FormatDescriptor +{ + [Flags] + public enum DescriptorFlags + { + None = 0, + PackedBit = 1, + CompressedBit = 2, + DepthBit = 4, + StencilBit = 8, + PlanarBit = 16, + } + + public FormatDescriptor( + DescriptorFlags flags, + uint blockSizeInBits, + uint blockWidth, + uint blockHeight, + uint blockDepth, + uint minBlockX, + uint minBlockY + ) + { + Flags = flags; + BlockSizeInBits = blockSizeInBits; + BlockWidth = blockWidth; + BlockHeight = blockHeight; + BlockDepth = blockDepth; + MinBlocksX = minBlockX; + MinBlocksY = minBlockY; + } + + public bool IsBlockCompressed => (Flags & DescriptorFlags.CompressedBit) != 0; + public bool IsPacked => (Flags & DescriptorFlags.PackedBit) != 0; + public bool IsDepth => (Flags & DescriptorFlags.DepthBit) != 0; + public bool IsStencil => (Flags & DescriptorFlags.StencilBit) != 0; + public bool IsPlanar => (Flags & DescriptorFlags.PlanarBit) != 0; + + /// + /// Returns the size of a block in bytes + /// + public ByteSize BlockSizeInBytes => (ByteSize)(BlockSizeInBits >> 3); + + /// + /// Extent of a block. i.e how many texels wide, high and deep a block one block of this TextureFormat is. + /// For non block-compressed formats this will be equivalent to TexelCount(1,1,1) + /// + public TexelCount3 BlockExtent => new((int)BlockWidth, (int)BlockHeight, (int)BlockDepth); + + public DescriptorFlags Flags { get; } + + public uint BlockSizeInBits { get; } + + /// + /// Width of block in texels. For compressed formats this is how many pixels wide the block represents. + /// + public uint BlockWidth { get; } + + /// + /// Height of block in texels. For compressed formats this is how many pixels high the block represents. + /// + public uint BlockHeight { get; } + + /// + /// Depth of the block in texels. For compressed formats this is how many pixels deep the block represents. + /// + public uint BlockDepth { get; } + + /// + /// Minimum number of blocks wide the format must have + /// + public uint MinBlocksX { get; } + + /// + /// Minimum number of blocks high the format must have + /// + public uint MinBlocksY { get; } +} diff --git a/Brutal.Texture.Abstractions/ITextureImplementations/GenericTexture.cs b/Brutal.Texture.Abstractions/ITextureImplementations/GenericTexture.cs new file mode 100644 index 0000000..91d5024 --- /dev/null +++ b/Brutal.Texture.Abstractions/ITextureImplementations/GenericTexture.cs @@ -0,0 +1,343 @@ +using Brutal.Memory; +using Brutal.Numerics; +using Brutal.Pointers.Extensions; + +namespace Brutal.TextureApi.Abstractions; + +/// +/// A generic implementation of ITexture which can be used to hold user-defined texture data. +/// +/// +/// Allocates its own memory for texture data. Must call Destroy() or use. +/// Has only a single mip level. +/// Has no row padding. +/// +public class GenericTexture : ITexture +{ + /// + /// Info required to create a GenericTexture + /// + public struct CreateInfo + { + public required TextureFormat Format; + public required TexelCount3 Extent; + public required int LayerCount; + public required int LevelCount; + public required int FaceCount; + public required bool IsCubemap; + public required bool IsArray; + public required int DimensionCount; + } + + /// + /// Describes the starting offset and byte length of an image. + /// Used when creating a GenericTexture from a CreateInfo and memory size. + /// + public struct CreateImageRange + { + public required ByteSize StartByteOffset; + public required ByteSize ByteLength; + public required ByteSize RowPitch; + } + + /// + /// Create a new generic texture with the given properties and allocation size. + /// + /// Properties describing the texture + /// The required allocation size for texture data, in bytes, no row padding + /// The set of CreateImageRange objects describing where and how big the mip levels are. + /// MUST be supplied with a valid set of ranges if any of info.LevelCount, info.LayerCount or info.FaceCount is greater than 1. + /// If all of those properties are 1 then you can omit this argument which will treat all memory allocated as the memory + /// of the one and only mip level, layer and face + /// Thrown if memAllocSize is not valid for the supplied and + /// + /// Will zero-initialize the texture data memory. + /// It is assumed you will fill the texture data in a valid manner for the info specified. + /// + public unsafe GenericTexture( + CreateInfo info, + ByteSize memAllocSize, + ReadOnlySpan imageRanges = new() + ) + { + if (info.LevelCount == 0 || info.LayerCount == 0 || info.FaceCount == 0) + throw new TextureException("LevelCount, LayerCount and FaceCount must all be greater than 0"); + + _data = Mem.AllocZeroed(memAllocSize).Cast(); + _dataSize = memAllocSize; + _info = info; + _imageMemory = BuildImageMemoryRanges(info, memAllocSize, imageRanges); + _rowPitches = new ByteSize[info.LevelCount]; + + var descriptor = info.Format.Descriptor(); + var minimumMemoryRequired = ByteSize.Zero; + for (var level = 0; level < info.LevelCount; ++level) + { + // Extent in # blocks wide, high, deep this image should be based on its texel extents. + var levelExtentInBlocks = new ImageExtent(info.Extent, level, descriptor.BlockExtent).Blocks; + var levelMinimumMemoryRequired = + (levelExtentInBlocks.X * levelExtentInBlocks.Y * levelExtentInBlocks.Z) * descriptor.BlockSizeInBytes; + minimumMemoryRequired += levelMinimumMemoryRequired; + + _rowPitches[level] = GetLevelInfo(level, 0, 0).ByteRowPitch; + } + if (memAllocSize < minimumMemoryRequired) + throw new TextureException( + $"memAllocSize {memAllocSize} is too small for the given extent {info.Extent} and format {info.Format}. Minimum size is {minimumMemoryRequired}" + ); + } + + private Dictionary BuildImageMemoryRanges( + CreateInfo info, + ByteSize memAllocSize, + ReadOnlySpan levelRanges + ) + { + if (info is { LevelCount: 1, LayerCount: 1, FaceCount: 1 } && levelRanges.IsEmpty) + { + if (memAllocSize.Bytes % ((nuint)info.Extent.X * (nuint)info.Extent.Y * (nuint)info.Extent.Z) != 0) + throw new TextureException( + $"Memory byte size ({memAllocSize.Bytes} is not a multiple of (X * Y * Z extents)" + ); + + var key = Key(0, 0, 0); + return new Dictionary + { + [key] = new( + key, + ByteSize.Zero, + memAllocSize, + ByteSize.Of(memAllocSize.Bytes / (nuint)info.Extent.Z / (nuint)info.Extent.Y) + ), + }; + } + + var expectedRangeCount = info.LevelCount * info.LayerCount * info.FaceCount; + if (levelRanges.Length != expectedRangeCount) + throw new TextureException( + $"Wrong levelRanges length. Expected {expectedRangeCount}, received {levelRanges.Length}" + ); + + var imageMemory = new Dictionary(levelRanges.Length); + var index = 0; + for (var level = 0; level < info.LevelCount; ++level) + for (var layer = 0; layer < info.LayerCount; ++layer) + for (var face = 0; face < info.FaceCount; ++face) + { + var key = Key(level, layer, face); + imageMemory[key] = new ImageMemory( + key, + levelRanges[index].StartByteOffset, + levelRanges[index].ByteLength, + levelRanges[index].RowPitch + ); + ++index; + } + + return imageMemory; + } + + /// + /// Create a new generic texture, copying the properties and data of an existing ITexture instance + /// + /// The texture to copy + public unsafe GenericTexture(ITexture texture) + { + var data = Mem.AllocAndCopy(texture.Data); + _data = data.AsPointer(); + _dataSize = ByteSize.Of(data); + + _imageMemory = BuildImageMemoryRangesFromTextureMips(texture); + + _rowPitches = new ByteSize[texture.LevelCount]; + for (var level = 0; level < texture.LevelCount; ++level) + _rowPitches[level] = texture.RowPitch(level); + + _info = new CreateInfo + { + Format = texture.Format, + Extent = texture.Extent, + LayerCount = texture.LayerCount, + LevelCount = texture.LevelCount, + FaceCount = texture.FaceCount, + IsCubemap = texture.IsCubemap, + IsArray = texture.IsArray, + DimensionCount = texture.DimensionCount, + }; + } + + private unsafe Dictionary BuildImageMemoryRangesFromTextureMips(ITexture texture) + { + var imageMemory = new Dictionary(); + + for (var level = 0; level < texture.LevelCount; ++level) + for (var layer = 0; layer < texture.LayerCount; ++layer) + for (var face = 0; face < texture.FaceCount; ++face) + { + var data = texture.ImageData(level, layer, face); + var imageDataOffset = ByteSize.Of(data.AsPointer() - texture.Data.AsPointer()); + var key = Key(level, layer, face); + imageMemory[key] = new ImageMemory(key, imageDataOffset, ByteSize.Of(data), texture.RowPitch(level)); + } + + return imageMemory; + } + + public static class Defaults + { + public static GenericTexture Uncompressed( + TextureFormat format, + int2 extent, + int levels = 1, + int layers = 1, + int faces = 1 + ) + { + var createInfo = MakeInfo(format, extent); + createInfo.IsArray = layers > 1; + createInfo.IsCubemap = faces == 6; + + var descriptor = format.Descriptor(); + if (descriptor.IsBlockCompressed) + throw new ArgumentException($"Texture format is a block compressed format"); + + var memAllocSize = ByteSize.Zero; + var offset = ByteSize.Zero; + var ranges = new CreateImageRange[levels]; + for (var level = 0; level < levels; ++level) + { + var bytesForLevel = (ByteSize) + Math.Max( + 1, + (createInfo.Extent.X >> level) + * Math.Max(1, createInfo.Extent.Y >> level) + * descriptor.BlockSizeInBytes + ); + + memAllocSize += bytesForLevel; + ranges[level] = new() + { + StartByteOffset = offset, + ByteLength = bytesForLevel, + RowPitch = bytesForLevel, + }; + offset += bytesForLevel; + } + + return new GenericTexture(createInfo, memAllocSize, ranges); + } + + /// + /// Creates a generic 2D, single layer, single level texture with R8G8B8_UNorm format + /// + /// There is no row padding. + /// The required extent of the texture + /// A new GenericTexture + public static GenericTexture RGB8UNorm(int2 extent) + { + var createInfo = MakeInfo(TextureFormat.R8G8B8_UNorm, extent); + var memAllocSize = + createInfo.Extent.X * createInfo.Extent.Y * createInfo.Format.Descriptor().BlockSizeInBytes; + return new GenericTexture(createInfo, memAllocSize); + } + + /// + /// Creates a generic 2D, single layer, single level texture with R8G8B8A8_UNorm format + /// + /// There is no row padding. + /// The required extent of the texture + /// A new GenericTexture + public static GenericTexture RGBA8UNorm(int2 extent) + { + var createInfo = MakeInfo(TextureFormat.R8G8B8A8_UNorm, extent); + var memAllocSize = + createInfo.Extent.X * createInfo.Extent.Y * createInfo.Format.Descriptor().BlockSizeInBytes; + return new GenericTexture(createInfo, memAllocSize); + } + + private static CreateInfo MakeInfo(TextureFormat format, int2 extent) + { + return new CreateInfo + { + Format = format, + Extent = new TexelCount3(extent.X, extent.Y, 1), + LayerCount = 1, + LevelCount = 1, + FaceCount = 1, + IsCubemap = false, + IsArray = false, + DimensionCount = 2, + }; + } + } + + public unsafe Span Data => new(_data, ElementCount.Of(_dataSize)); + + public unsafe Span ImageData(int level, int layer, int face) + { + var levelInfo = GetLevelInfo(level, layer, face); + return new Span(_data + levelInfo.StartByte, ElementCount.Of(levelInfo.ByteLength)); + } + + public TexelCount3 Extent => _info.Extent; + public int Width => Extent.X; + public int Height => Extent.Y; + public int Depth => Extent.Z; + + public TextureFormat Format => _info.Format; + public int LayerCount => _info.LayerCount; + public int LevelCount => _info.LevelCount; + public int FaceCount => _info.FaceCount; + public bool IsCubemap => _info.IsCubemap; + public bool IsArray => _info.IsArray; + public int DimensionCount => _info.DimensionCount; + + public ByteSize RowPitch(int level) + { + if (level < 0 || level >= LevelCount) + throw new ArgumentOutOfRangeException(nameof(level), level, $"Level must be in range [0, {LevelCount})"); + return _rowPitches[level]; + } + + public void Destroy() + { + FreeData(); + } + + private unsafe void FreeData() + { + Mem.Free(_data); + } + + private struct ImageMemory + { + public ImageMemory(long key, ByteSize startByte, ByteSize byteLength, ByteSize byteRowPitch) + { + Key = key; + StartByte = startByte; + ByteLength = byteLength; + ByteRowPitch = byteRowPitch; + } + + public ByteSize ByteRowPitch { get; init; } + public long Key { get; init; } + public ByteSize StartByte { get; init; } + public ByteSize ByteLength { get; init; } + } + + private long Key(int level, int layer, int face) + { + return (_info.LayerCount * _info.FaceCount) * level + _info.FaceCount * layer + face; + } + + private ImageMemory GetLevelInfo(int level, int layer, int face) + { + return _imageMemory[Key(level, layer, face)]; + } + + private readonly unsafe byte* _data; + private readonly ByteSize _dataSize; + private readonly CreateInfo _info; + private readonly Dictionary _imageMemory; + private readonly ByteSize[] _rowPitches; +} diff --git a/Brutal.Texture.Abstractions/Layout/BlockCount3.cs b/Brutal.Texture.Abstractions/Layout/BlockCount3.cs new file mode 100644 index 0000000..55809d7 --- /dev/null +++ b/Brutal.Texture.Abstractions/Layout/BlockCount3.cs @@ -0,0 +1,6 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Represents a count of blocks in 3 dimensions. +/// +public record struct BlockCount3(int X, int Y, int Z) { } diff --git a/Brutal.Texture.Abstractions/Layout/ImageExtent.cs b/Brutal.Texture.Abstractions/Layout/ImageExtent.cs new file mode 100644 index 0000000..8b7f262 --- /dev/null +++ b/Brutal.Texture.Abstractions/Layout/ImageExtent.cs @@ -0,0 +1,46 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Represents the 3 dimensional extents of one image (mip level) of a texture and includes +/// its dimensions in both texels and blocks. +/// +public readonly record struct ImageExtent +{ + /// + /// Creates an ImageExtent representing the 3 dimensions of one mip level of a texture from the larges image dimension + /// of the texture and texel dimensions of one block of the image. + /// + /// + /// The Blocks property dimensions are rounded-up from Texels / blockTexelDimensions and will always be at least 1 + /// + /// Dimensions of the largest mip level, in whole texels. + /// The dimensions of one block, in whole texels + /// Throws ArgumentOutOfRangeException if level is less than 0 + public ImageExtent(TexelCount3 level0ImageTexelDimensions, int mipLevel, TexelCount3 blockTexelDimensions) + { + Level = mipLevel; + + Texels = new TexelCount3( + level0ImageTexelDimensions.X >> mipLevel, + level0ImageTexelDimensions.Y >> mipLevel, + level0ImageTexelDimensions.Z >> mipLevel + ); + Blocks = InBlocks(Texels, blockTexelDimensions); + } + + /// + /// The dimensions of this texture in Blocks + /// + public BlockCount3 Blocks { get; } + public TexelCount3 Texels { get; } + public int Level { get; init; } + + public static BlockCount3 InBlocks(TexelCount3 imageTexelDimensions, TexelCount3 blockTexelDimensions) + { + return new BlockCount3( + (int)MathF.Max(1, MathF.Ceiling(imageTexelDimensions.X / (float)blockTexelDimensions.X)), + (int)MathF.Max(1, MathF.Ceiling(imageTexelDimensions.Y / (float)blockTexelDimensions.Y)), + (int)MathF.Max(1, MathF.Ceiling(imageTexelDimensions.Z / (float)blockTexelDimensions.Z)) + ); + } +} diff --git a/Brutal.Texture.Abstractions/Layout/TextureImageMemoryLayout.cs b/Brutal.Texture.Abstractions/Layout/TextureImageMemoryLayout.cs new file mode 100644 index 0000000..693f1eb --- /dev/null +++ b/Brutal.Texture.Abstractions/Layout/TextureImageMemoryLayout.cs @@ -0,0 +1,48 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Describes how one image (mip level) of a texture is laid out in memory. +/// +public class TextureImageMemoryLayout +{ + /// + /// Create a TextureImageMemoryLayout from a set of texture properties. + /// + /// The ImageExtent of the image + /// The rowpitch in bytes of the image + /// The number of bytes a single block takes up. + public TextureImageMemoryLayout(ImageExtent extent, ByteSize rowPitch, ByteSize blockSizeInBytes) + { + Extent = extent; + RowPitch = rowPitch; + RowPadBytes = RowPitch - Extent.Blocks.X * blockSizeInBytes; + } + + /// + /// Gets the ImageExtent of this TextureImageMemoryLayout. This includes both the extents in texels + /// and in blocks. + /// + public ImageExtent Extent { get; } + + /// + /// Gets the number of bytes between the start of consecutive rows in the buffer. + /// + public ByteSize RowPitch { get; } + + /// + /// Gets the number of padding bytes added to each row in the data structure. + /// + public ByteSize RowPadBytes { get; } + + /// + /// The number of bytes the x extent texel blocks take up. + /// For uncompressed formats this is the extent texel width * bytes per texel. + /// For compressed formats this is the extent in whole blocks * bytes per block. + /// + public ByteSize RowExtentBytes => RowPitch - RowPadBytes; + + /// + /// Does this layout have padding at the end of each row? + /// + public bool IsRowPadded => RowPadBytes > 0; +} diff --git a/Brutal.Texture.Abstractions/Layout/TextureMemoryLayout.cs b/Brutal.Texture.Abstractions/Layout/TextureMemoryLayout.cs new file mode 100644 index 0000000..dc1ee80 --- /dev/null +++ b/Brutal.Texture.Abstractions/Layout/TextureMemoryLayout.cs @@ -0,0 +1,69 @@ +using System.Diagnostics; + +namespace Brutal.TextureApi.Abstractions; + +/// +/// Describes how a texture is laid out in memory. Provides the FormatDescriptor for a texture +/// as well as a TextureImageMemoryLayout object for each level of the texture. +/// +/// +/// Each level's data is calculated and cached on first use so multiple calls to query the same +/// mip level layout does not incur extra cost.
+///
+public class TextureMemoryLayout +{ + public TextureMemoryLayout(ITexture texture) + { + _texture = texture; + _descriptor = texture.Format.Descriptor(); + + _imageLayouts = new Lazy[texture.LevelCount]; + for (var mipLevelIndex = 0; mipLevelIndex < texture.LevelCount; mipLevelIndex++) + { + var mipLevel = mipLevelIndex; + _imageLayouts[mipLevelIndex] = new Lazy( + () => ImageLayoutForLevel(mipLevel), + true + ); + } + } + + /// + /// Returns the FormatDescriptor for the texture. + /// + public FormatDescriptor Descriptor => _descriptor; + + /// + /// Returns the TextureImageMemoryLayout object for a single level of a texture. + /// + /// The mip level to retrieve the TextureImageMemoryLayout for. + /// TextureImageMemoryLayout for the mip level + /// throws ArgumentOutOfRangeException if level is not within the valid range of mip levels (0 based) for the texture + public TextureImageMemoryLayout ImageLayout(int level) + { + Debug.Assert(_texture != null); + Debug.Assert(_imageLayouts.Length == _texture.LevelCount); + + if (level < 0 || level >= _texture.LevelCount) + throw new ArgumentOutOfRangeException( + nameof(level), + level, + $"Level must be in range [0, {_texture.LevelCount})" + ); + + return _imageLayouts[level].Value; + } + + private TextureImageMemoryLayout ImageLayoutForLevel(int level) + { + return new TextureImageMemoryLayout( + new ImageExtent(_texture.Extent, level, _descriptor.BlockExtent), + _texture.RowPitch(level), + _descriptor.BlockSizeInBytes + ); + } + + private readonly ITexture _texture; + private readonly FormatDescriptor _descriptor; + private readonly Lazy[] _imageLayouts; +} diff --git a/Brutal.Texture.Abstractions/Upload/StageUploadRegions.cs b/Brutal.Texture.Abstractions/Upload/StageUploadRegions.cs new file mode 100644 index 0000000..ebe45e3 --- /dev/null +++ b/Brutal.Texture.Abstractions/Upload/StageUploadRegions.cs @@ -0,0 +1,25 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Holds a collection of regions for copying texture data from a texture to a staging buffer, +/// and from the staging buffer to an image. +/// +public class StageUploadRegions +{ + /// + /// The regions in the source texture's memory to copy + /// + public List StageBufferRegions = []; + + /// + /// The regions in a staging buffer copied using the StageBufferRegions + /// that can be copied to the images on a GPU using a GPU API. + /// + public List CopyToImageRegions = []; + + /// + /// The minimum number of bytes that your staging buffer needs to be + /// to accept the copied StageBufferRegions + /// + public ByteSize RequiredBufferSizeBytes; +} diff --git a/Brutal.Texture.Abstractions/Upload/StagingRegion.cs b/Brutal.Texture.Abstractions/Upload/StagingRegion.cs new file mode 100644 index 0000000..90e6b35 --- /dev/null +++ b/Brutal.Texture.Abstractions/Upload/StagingRegion.cs @@ -0,0 +1,44 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// Represents a region of texture data to be copied to a staging buffer. +/// +public class StagingRegion +{ + /// + /// Offset from the start of the texture data to start copying from. + /// + public ByteSize SourceStartOffset; + + /// + /// Offset within the destination staging buffer to start copying data to. + /// + public ByteSize DestinationOffset; + + /// + /// How many bytes of data to copy. + /// + public ByteSize SizeInBytes; + + /// + /// How many blocks wide is a single row of image data. + /// + public int RowWidthInBlocks; + + /// + /// How many bytes does a block take up. This is directly related + /// to the of the texture data that's being staged. + /// + public ByteSize BlockSizeBytes; + + /// + /// How many bytes from the start of one one row of the texture to the start + /// of the next row. + /// + /// This can be > BlockSizeBytes * RowWidthInBlocks. Specifically this is the case + /// for some KTX version 1 textures because they are padded to support OpenGL texture uploading. + /// Almost all other formats will have RowPitch == RowwidthInBlocks * BlockSizeBytes but + /// do not just assume that is the case and use this field for memory calculations on texture data. + /// + public required ByteSize RowPitch; +} diff --git a/Brutal.Texture.Abstractions/Upload/UploadRegion.cs b/Brutal.Texture.Abstractions/Upload/UploadRegion.cs new file mode 100644 index 0000000..537ebef --- /dev/null +++ b/Brutal.Texture.Abstractions/Upload/UploadRegion.cs @@ -0,0 +1,28 @@ +namespace Brutal.TextureApi.Abstractions; + +/// +/// A region of data for uploading to a range of layers within a single level of an image. +/// +public class UploadRegion +{ + /// + /// Offset in the staging buffer where this region starts. + /// + public ByteSize BufferOffset; + + /// + /// The array (or faces if this is a non-array cube map) layer index this region starts at. + /// + public int BaseLayer { get; set; } + + /// + /// The number of array layers (or faces if this is a non-array cube map) + /// this region encompasses. + /// + public int LayerCount { get; set; } + + /// + /// The mip level that this UploadRegion starts at. + /// + public int BaseLevel { get; set; } +} diff --git a/Brutal.Texture.Abstractions/Upload/UploadRegions.cs b/Brutal.Texture.Abstractions/Upload/UploadRegions.cs new file mode 100644 index 0000000..2ed0aa1 --- /dev/null +++ b/Brutal.Texture.Abstractions/Upload/UploadRegions.cs @@ -0,0 +1,266 @@ +using System.Diagnostics; +using Brutal.Pointers.Extensions; +using Brutal.TextureApi.Abstractions; + +namespace Brutal.TextureApi.Abstractions; + +/// +/// Builds a set of information to describe how to stage an ITexture's data to a staging buffer +/// and upload it to a GPU. +/// +/// +/// Removes row padding from KTX v1 textures.
+/// Aligning data to lcm(4, texel block size)
+/// Reducing number of copy commands where possible.
+/// Currently does NOT squash all mips into one copy for staging even if it would be valid.
+///
+public class UploadRegions +{ + public enum Mode + { + BatchUploadRegions, // Try to put as many images into as few copy regions as possible + UploadRegionPerImage, // Each image gets its own copy region + } + + private UploadRegions() + { + _currentStageRegion = null; + _currentUploadRegion = null; + } + + /// + /// Builds optimal staging and upload regions for entire mip range + /// of a texture. + /// + /// + /// + public static StageUploadRegions Build(ITexture texture) + { + var textureUpload = new UploadRegions(); + return textureUpload.BuildInternal(texture, 0, texture.LevelCount, Mode.BatchUploadRegions); + } + + /// + /// Builds optimal staging and upload regions for a selected mip range + /// of a texture. + /// + /// Texture to build regions for. + /// First level to build regions for. This level will become level 0 in the output. + /// Maximum # of levels to build. Must be > 0. + /// How to build the regions. + /// The that were built. + /// Thrown if firstLevel >= the level count of texture or maximumLevelCount <= 0. + public static StageUploadRegions Build( + ITexture texture, + int firstLevel, + int maximumLevelCount, + Mode mode = Mode.BatchUploadRegions + ) + { + if (firstLevel >= texture.LevelCount) + throw new ArgumentOutOfRangeException( + nameof(firstLevel), + $"Level out of range. Expected 0-{texture.LevelCount - 1}, received {firstLevel}." + ); + + if (maximumLevelCount <= 0) + throw new ArgumentOutOfRangeException( + nameof(maximumLevelCount), + "Maximum level count must be greater than 0." + ); + + var textureUpload = new UploadRegions(); + return textureUpload.BuildInternal(texture, firstLevel, maximumLevelCount, mode); + } + + /// + /// Builds a datastructure describing how to upload an ITexture's images to a buffer and then to + /// a GPU. + /// Goes through the texture by level, layer, face and slice order, building the minimal + /// set of copies required to upload the texture, removing any row padding and also + /// aligning as needed. + /// + private unsafe StageUploadRegions BuildInternal(ITexture texture, int firstLevel, int levelCount, Mode mode) + { + var formatDescriptor = texture.Format.Descriptor(); + + levelCount = Math.Min(levelCount, texture.LevelCount - firstLevel); + + _uploadRegions = new List(texture.LevelCount); + _copyRegions = new List(texture.LevelCount * texture.LayerCount * texture.FaceCount); + _lcm = CalculateLcm4AndTexelBlockSize(formatDescriptor.BlockSizeInBytes); + _stageBufferDestinationOffset = ByteSize.Zero; + + var layouts = new TextureMemoryLayout(texture); + var blockSizeBytes = formatDescriptor.BlockSizeInBytes; + + for (var level = firstLevel; level < firstLevel + levelCount; ++level) + { + // Output levels are re-based so the requested firstLevel becomes level 0. Batch-mode's + // "start a new region when the level changes" check must compare against this re-based + // level, otherwise any firstLevel > 0 never matches BaseLevel and every layer is split + // into its own region. + var outputLevel = level - firstLevel; + var layout = layouts.ImageLayout(level); + var rowWidthInBlocks = layout.Extent.Blocks.X; + var rowPitch = layout.RowPitch; + var depthSlices = texture.Is3d ? layout.Extent.Texels.Z : 1; + + for (var layer = 0; layer < texture.LayerCount; ++layer) + { + for (var face = 0; face < texture.FaceCount; ++face) + { + var sourceImageData = texture.ImageData(level, layer, face); + var sourceImageOffset = ByteSize.Of(sourceImageData.AsPointer() - texture.Data.AsPointer()); + + if ( + _currentUploadRegion == null + || mode == Mode.UploadRegionPerImage + || (mode == Mode.BatchUploadRegions && outputLevel != _currentUploadRegion.BaseLevel) + ) + NewUploadRegion(outputLevel, layer * texture.FaceCount + face); + + for (var depthSlice = 0; depthSlice < depthSlices; ++depthSlice) + { + AddImageData( + sourceImageOffset, + ByteSize.Of(sourceImageData), + rowWidthInBlocks, + blockSizeBytes, + rowPitch + ); + sourceImageOffset += ByteSize.Of(sourceImageData); + } + ++_currentUploadRegion!.LayerCount; + } + } + } + + var minimumRequiredBytes = + _copyRegions.Count == 0 + ? ByteSize.Of(0) + : _copyRegions[^1].DestinationOffset + _copyRegions[^1].SizeInBytes; + + return new StageUploadRegions() + { + StageBufferRegions = _copyRegions, + CopyToImageRegions = _uploadRegions, + RequiredBufferSizeBytes = minimumRequiredBytes, + }; + } + + private void AddImageData( + ByteSize sourceImageOffset, + ByteSize length, + int rowWidthInBlocks, + ByteSize blockSizeBytes, + ByteSize rowPitch + ) + { + UpdateStageRegion(sourceImageOffset, rowWidthInBlocks, blockSizeBytes, rowPitch); + ExtendStageRegion(length); + } + + private bool ContinuesCurrentStageRegionSource(ByteSize sourceImageOffset) + { + return sourceImageOffset == _currentStageRegion!.SourceStartOffset + _currentStageRegion.SizeInBytes; + } + + private bool ContinuesCurrentStageRegionDestination(ByteSize destinationOffset) + { + return destinationOffset == _currentStageRegion!.DestinationOffset + _currentStageRegion.SizeInBytes; + } + + private void ExtendStageRegion(ByteSize sizeInBytes) + { + Debug.Assert(_currentStageRegion != null); + + _currentStageRegion.SizeInBytes += sizeInBytes; + _stageBufferDestinationOffset += sizeInBytes; + } + + private static uint CalculateLcm4AndTexelBlockSize(ByteSize texelBlocksize) + { + if (texelBlocksize == 0) + return 0; + + var num1 = ByteSize.Of(4u); + var num2 = texelBlocksize; + while (num1 != num2) + { + if (num1 > num2) + { + num1 -= num2; + } + else + { + num2 -= num1; + } + } + + return (uint)(4 * texelBlocksize / num1); + } + + private void NewUploadRegion(int baseLevel, int baseLayer) + { + Debug.Assert(!_uploadRegions.Any(r => r.BaseLayer == baseLayer && r.BaseLevel == baseLevel)); + + _stageBufferDestinationOffset = AlignOffsetToNextLcm(_stageBufferDestinationOffset); + + _currentUploadRegion = new UploadRegion() + { + BaseLevel = baseLevel, + BaseLayer = baseLayer, + LayerCount = 0, + BufferOffset = _stageBufferDestinationOffset, + }; + _uploadRegions.Add(_currentUploadRegion); + } + + private void UpdateStageRegion( + ByteSize startOffset, + int rowWidthInBlocks, + ByteSize blockSizeBytes, + ByteSize rowPitch + ) + { + Debug.Assert( + _stageBufferDestinationOffset == 0 + || _currentStageRegion == null + || _stageBufferDestinationOffset + >= _currentStageRegion.DestinationOffset + _currentStageRegion.SizeInBytes + ); + + if (_currentStageRegion != null) + { + if ( + ContinuesCurrentStageRegionSource(startOffset) + && ContinuesCurrentStageRegionDestination(_stageBufferDestinationOffset) + ) + return; + } + + _currentStageRegion = new StagingRegion + { + DestinationOffset = _stageBufferDestinationOffset, + SourceStartOffset = startOffset, + SizeInBytes = ByteSize.Zero, + RowWidthInBlocks = rowWidthInBlocks, + BlockSizeBytes = blockSizeBytes, + RowPitch = rowPitch, + }; + _copyRegions.Add(_currentStageRegion); + } + + private ByteSize AlignOffsetToNextLcm(ByteSize offset) + { + return ByteSize.Of((offset.Bytes + _lcm - 1) / _lcm * _lcm); + } + + private ByteSize _stageBufferDestinationOffset; + private uint _lcm; + private StagingRegion? _currentStageRegion; + private UploadRegion? _currentUploadRegion; + private List _copyRegions = []; + private List _uploadRegions = []; +} diff --git a/Brutal.Texture/DerivedTexturePropertiesExtensions.cs b/Brutal.Texture/DerivedTexturePropertiesExtensions.cs new file mode 100644 index 0000000..90ed16f --- /dev/null +++ b/Brutal.Texture/DerivedTexturePropertiesExtensions.cs @@ -0,0 +1,56 @@ +namespace Brutal.TextureApi; + +/// +/// Extension methods library for ITexture +/// +public static class DerivedTexturePropertiesExtensions +{ + extension(ITexture texture) + { + /// + /// Determines whether the specified texture represents a 3-dimensional texture. + /// + /// true if the texture has three dimensions; otherwise, false. + public bool Is3d => texture.DimensionCount == 3; + + /// + /// Determines whether the specified texture represents a two-dimensional texture. + /// + /// true if the texture has exactly two dimensions; otherwise, false. + public bool Is2d => texture.DimensionCount == 2; + + /// + /// Determines whether the specified texture is one-dimensional. + /// + /// true if the texture has a single dimension; otherwise, false. + public bool Is1d => texture.DimensionCount == 1; + + /// + /// The width of this texture (in texels) + /// + public int Width => texture.Extent.X; + + /// + /// The height of this texture (in texels) + /// + public int Height => texture.Extent.Y; + + /// + /// The depth of this texture (in texels) + /// + public int Depth => texture.Extent.Z; + + /// + /// Calculates the dimensions of a texture at the specified mipmap level. + /// + /// The mipmap level for which to calculate the extent. Must be greater than or equal to zero. + /// A TexelCount3 containing the width, height, and depth of the texture at the specified mipmap level. Each + /// dimension will be at least 1. + public TexelCount3 Extent(int level) => + new( + Math.Max(1, texture.Width >> level), + Math.Max(1, texture.Height >> level), + Math.Max(1, texture.Depth >> level) + ); + } +} diff --git a/Brutal.Texture/Gli/GliConversionUtils.cs b/Brutal.Texture/Gli/GliConversionUtils.cs new file mode 100644 index 0000000..597ede0 --- /dev/null +++ b/Brutal.Texture/Gli/GliConversionUtils.cs @@ -0,0 +1,50 @@ +namespace Brutal.TextureApi.Gli; + +public static class GliConversionUtils +{ + public static GliTexture ToGliTexture(this ITexture texture) + { + var gliTarget = GetTarget(texture); + var gliNative = new Brutal.GliApi.Gli.Texture( + gliTarget, + texture.Format.ToGliFormat(), + new(texture.Extent.X, texture.Extent.Y, texture.Extent.Z), + texture.LayerCount, + texture.FaceCount, + texture.LevelCount, + GliApi.Gli.Swizzles.Identity + ); + var outTexture = new GliTexture(gliNative); + texture.Data.CopyTo(outTexture.Data); + return outTexture; + } + + public static Brutal.GliApi.Gli.Target GetTarget(ITexture texture) + { + return GetTarget(texture.Extent, texture.LayerCount, texture.IsCubemap); + } + + public static GliApi.Gli.Target GetTarget(TexelCount3 extent, int layerCount, bool isCubemap) + { + var isArray = layerCount > 1; + + if (isCubemap) + { + return isArray ? GliApi.Gli.Target.CubeArray : GliApi.Gli.Target.Cube; + } + if (extent.Y is 1) + { + return isArray ? GliApi.Gli.Target._1DArray : GliApi.Gli.Target._1D; + } + + if (extent.Z is 1) + { + return isArray ? GliApi.Gli.Target._2DArray : GliApi.Gli.Target._2D; + } + + if (isArray) + throw new NotImplementedException("Didn't anticipate Gli compatibility with 3d array textures"); + + return GliApi.Gli.Target._3D; + } +} diff --git a/Brutal.Texture/Gli/GliFormatExtensions.cs b/Brutal.Texture/Gli/GliFormatExtensions.cs new file mode 100644 index 0000000..c6eba25 --- /dev/null +++ b/Brutal.Texture/Gli/GliFormatExtensions.cs @@ -0,0 +1,430 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.TextureApi.Gli; + +public static class GliFormatExtensions +{ + /// + /// Convert a GliFormat to a TextureFormat + /// + /// + /// Not all GliFormats are currently supported by this function due to ambiguity about whether they will convert correctly, and will throw a NotImplementedException if encountered + /// + /// The GliFormat to convert + /// A corresponding TextureFormat + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static TextureFormat ToTextureFormat(this GliApi.Gli.Format gliFormat) + { + return gliFormat switch + { + GliApi.Gli.Format.Undefined => TextureFormat.Undefined, + GliApi.Gli.Format.RG4_UNorm_Pack8 => TextureFormat.R4G4_UNorm_Pack8, + GliApi.Gli.Format.RGBA4_UNorm_Pack16 => TextureFormat.R4G4B4A4_UNorm_Pack16, + GliApi.Gli.Format.BGRA4_UNorm_Pack16 => TextureFormat.B4G4R4A4_UNorm_Pack16, + GliApi.Gli.Format.R5G6B5_UNorm_Pack16 => TextureFormat.R5G6B5_UNorm_Pack16, + GliApi.Gli.Format.B5G6R5_UNorm_Pack16 => TextureFormat.B5G6R5_UNorm_Pack16, + GliApi.Gli.Format.RGB5A1_UNorm_Pack16 => TextureFormat.R5G5B5A1_UNorm_Pack16, + GliApi.Gli.Format.BGR5A1_UNorm_Pack16 => TextureFormat.B5G5R5A1_UNorm_Pack16, + GliApi.Gli.Format.A1RGB5_UNorm_Pack16 => TextureFormat.A1R5G5B5_UNorm_Pack16, + GliApi.Gli.Format.R8_UNorm_Pack8 => TextureFormat.R8_UNorm, + GliApi.Gli.Format.R8_SNorm_Pack8 => TextureFormat.R8_SNorm, + GliApi.Gli.Format.R8_UScaled_Pack8 => TextureFormat.R8_UScaled, + GliApi.Gli.Format.R8_SScaled_Pack8 => TextureFormat.R8_SScaled, + GliApi.Gli.Format.R8_UInt_Pack8 => TextureFormat.R8_UInt, + GliApi.Gli.Format.R8_SInt_Pack8 => TextureFormat.R8_SInt, + GliApi.Gli.Format.R8_SRGB_Pack8 => TextureFormat.R8_SRGB, + GliApi.Gli.Format.RG8_UNorm_Pack8 => TextureFormat.R8G8_UNorm, + GliApi.Gli.Format.RG8_SNorm_Pack8 => TextureFormat.R8G8_SNorm, + GliApi.Gli.Format.RG8_UScaled_Pack8 => TextureFormat.R8G8_UScaled, + GliApi.Gli.Format.RG8_SScaled_Pack8 => TextureFormat.R8G8_SScaled, + GliApi.Gli.Format.RG8_UInt_Pack8 => TextureFormat.R8G8_UInt, + GliApi.Gli.Format.RG8_SInt_Pack8 => TextureFormat.R8G8_SInt, + GliApi.Gli.Format.RG8_SRGB_Pack8 => TextureFormat.R8G8_SRGB, + GliApi.Gli.Format.RGB8_UNorm_Pack8 => TextureFormat.R8G8B8_UNorm, + GliApi.Gli.Format.RGB8_SNorm_Pack8 => TextureFormat.R8G8B8_SNorm, + GliApi.Gli.Format.RGB8_UScaled_Pack8 => TextureFormat.R8G8B8_UScaled, + GliApi.Gli.Format.RGB8_SScaled_Pack8 => TextureFormat.R8G8B8_SScaled, + GliApi.Gli.Format.RGB8_UInt_Pack8 => TextureFormat.R8G8B8_UInt, + GliApi.Gli.Format.RGB8_SInt_Pack8 => TextureFormat.R8G8B8_SInt, + GliApi.Gli.Format.RGB8_SRGB_Pack8 => TextureFormat.R8G8B8_SRGB, + GliApi.Gli.Format.BGR8_UNorm_Pack8 => TextureFormat.B8G8R8_UNorm, + GliApi.Gli.Format.BGR8_SNorm_Pack8 => TextureFormat.B8G8R8_SNorm, + GliApi.Gli.Format.BGR8_UScaled_Pack8 => TextureFormat.B8G8R8_UScaled, + GliApi.Gli.Format.BGR8_SScaled_Pack8 => TextureFormat.B8G8R8_SScaled, + GliApi.Gli.Format.BGR8_UInt_Pack8 => TextureFormat.B8G8R8_UInt, + GliApi.Gli.Format.BGR8_SInt_Pack8 => TextureFormat.B8G8R8_SInt, + GliApi.Gli.Format.BGR8_SRGB_Pack8 => TextureFormat.B8G8R8_SRGB, + GliApi.Gli.Format.RGBA8_UNorm_Pack8 => TextureFormat.R8G8B8A8_UNorm, + GliApi.Gli.Format.RGBA8_SNorm_Pack8 => TextureFormat.R8G8B8A8_SNorm, + GliApi.Gli.Format.RGBA8_UScaled_Pack8 => TextureFormat.R8G8B8A8_UScaled, + GliApi.Gli.Format.RGBA8_SScaled_Pack8 => TextureFormat.R8G8B8A8_SScaled, + GliApi.Gli.Format.RGBA8_UInt_Pack8 => TextureFormat.R8G8B8A8_UInt, + GliApi.Gli.Format.RGBA8_SInt_Pack8 => TextureFormat.R8G8B8A8_SInt, + GliApi.Gli.Format.RGBA8_SRGB_Pack8 => TextureFormat.R8G8B8A8_SRGB, + GliApi.Gli.Format.BGRA8_UNorm_Pack8 => TextureFormat.B8G8R8A8_UNorm, + GliApi.Gli.Format.BGRA8_SNorm_Pack8 => TextureFormat.B8G8R8A8_SNorm, + GliApi.Gli.Format.BGRA8_UScaled_Pack8 => TextureFormat.B8G8R8A8_UScaled, + GliApi.Gli.Format.BGRA8_SScaled_Pack8 => TextureFormat.B8G8R8A8_SScaled, + GliApi.Gli.Format.BGRA8_UInt_Pack8 => TextureFormat.B8G8R8A8_UInt, + GliApi.Gli.Format.BGRA8_SInt_Pack8 => TextureFormat.B8G8R8A8_SInt, + GliApi.Gli.Format.BGRA8_SRGB_Pack8 => TextureFormat.B8G8R8A8_SRGB, + // Note: Vulkan seems to order the naming here for 32 bit packed formats from the least significant byte to the most significant byte, rather the memory layout order + // See Enums.cs docstrings on the Format enum for more information + GliApi.Gli.Format.RGBA8_UNorm_Pack32 => TextureFormat.A8B8G8R8_UNorm_Pack32, + GliApi.Gli.Format.RGBA8_SNorm_Pack32 => TextureFormat.A8B8G8R8_SNorm_Pack32, + GliApi.Gli.Format.RGBA8_UScaled_Pack32 => TextureFormat.A8B8G8R8_UScaled_Pack32, + GliApi.Gli.Format.RGBA8_SScaled_Pack32 => TextureFormat.A8B8G8R8_SScaled_Pack32, + GliApi.Gli.Format.RGBA8_UInt_Pack32 => TextureFormat.A8B8G8R8_UInt_Pack32, + GliApi.Gli.Format.RGBA8_SInt_Pack32 => TextureFormat.A8B8G8R8_SInt_Pack32, + GliApi.Gli.Format.RGBA8_SRGB_Pack32 => TextureFormat.A8B8G8R8_SRGB_Pack32, + // These formats aren't named consistently between Gli and Vulkan, have removed support until we can confirm the correct mapping + GliApi.Gli.Format.RGB10A2_UNorm_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB10A2_SNorm_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB10A2_UScaled_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB10A2_SScaled_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB10A2_UInt_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB10A2_SInt_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR10A2_UNorm_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR10A2_SNorm_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR10A2_UScaled_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR10A2_SScaled_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR10A2_UInt_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR10A2_SInt_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.R16_UNorm_Pack16 => TextureFormat.R16_UNorm, + GliApi.Gli.Format.R16_SNorm_Pack16 => TextureFormat.R16_SNorm, + GliApi.Gli.Format.R16_UScaled_Pack16 => TextureFormat.R16_UScaled, + GliApi.Gli.Format.R16_SScaled_Pack16 => TextureFormat.R16_SScaled, + GliApi.Gli.Format.R16_UInt_Pack16 => TextureFormat.R16_UInt, + GliApi.Gli.Format.R16_SInt_Pack16 => TextureFormat.R16_SInt, + GliApi.Gli.Format.R16_SFloat_Pack16 => TextureFormat.R16_SFloat, + GliApi.Gli.Format.RG16_UNorm_Pack16 => TextureFormat.R16G16_UNorm, + GliApi.Gli.Format.RG16_SNorm_Pack16 => TextureFormat.R16G16_SNorm, + GliApi.Gli.Format.RG16_UScaled_Pack16 => TextureFormat.R16G16_UScaled, + GliApi.Gli.Format.RG16_SScaled_Pack16 => TextureFormat.R16G16_SScaled, + GliApi.Gli.Format.RG16_UInt_Pack16 => TextureFormat.R16G16_UInt, + GliApi.Gli.Format.RG16_SInt_Pack16 => TextureFormat.R16G16_SInt, + GliApi.Gli.Format.RG16_SFloat_Pack16 => TextureFormat.R16G16_SFloat, + GliApi.Gli.Format.RGB16_UNorm_Pack16 => TextureFormat.R16G16B16_UNorm, + GliApi.Gli.Format.RGB16_SNorm_Pack16 => TextureFormat.R16G16B16_SNorm, + GliApi.Gli.Format.RGB16_UScaled_Pack16 => TextureFormat.R16G16B16_UScaled, + GliApi.Gli.Format.RGB16_SScaled_Pack16 => TextureFormat.R16G16B16_SScaled, + GliApi.Gli.Format.RGB16_UInt_Pack16 => TextureFormat.R16G16B16_UInt, + GliApi.Gli.Format.RGB16_SInt_Pack16 => TextureFormat.R16G16B16_SInt, + GliApi.Gli.Format.RGB16_SFloat_Pack16 => TextureFormat.R16G16B16_SFloat, + GliApi.Gli.Format.RGBA16_UNorm_Pack16 => TextureFormat.R16G16B16A16_UNorm, + GliApi.Gli.Format.RGBA16_SNorm_Pack16 => TextureFormat.R16G16B16A16_SNorm, + GliApi.Gli.Format.RGBA16_UScaled_Pack16 => TextureFormat.R16G16B16A16_UScaled, + GliApi.Gli.Format.RGBA16_SScaled_Pack16 => TextureFormat.R16G16B16A16_SScaled, + GliApi.Gli.Format.RGBA16_UInt_Pack16 => TextureFormat.R16G16B16A16_UInt, + GliApi.Gli.Format.RGBA16_SInt_Pack16 => TextureFormat.R16G16B16A16_SInt, + GliApi.Gli.Format.RGBA16_SFloat_Pack16 => TextureFormat.R16G16B16A16_SFloat, + GliApi.Gli.Format.R32_UInt_Pack32 => TextureFormat.R32_UInt, + GliApi.Gli.Format.R32_SInt_Pack32 => TextureFormat.R32_SInt, + GliApi.Gli.Format.R32_SFloat_Pack32 => TextureFormat.R32_SFloat, + GliApi.Gli.Format.RG32_UInt_Pack32 => TextureFormat.R32G32_UInt, + GliApi.Gli.Format.RG32_SInt_Pack32 => TextureFormat.R32G32_SInt, + GliApi.Gli.Format.RG32_SFloat_Pack32 => TextureFormat.R32G32_SFloat, + GliApi.Gli.Format.RGB32_UInt_Pack32 => TextureFormat.R32G32B32_UInt, + GliApi.Gli.Format.RGB32_SInt_Pack32 => TextureFormat.R32G32B32_SInt, + GliApi.Gli.Format.RGB32_SFloat_Pack32 => TextureFormat.R32G32B32_SFloat, + GliApi.Gli.Format.RGBA32_UInt_Pack32 => TextureFormat.R32G32B32A32_UInt, + GliApi.Gli.Format.RGBA32_SInt_Pack32 => TextureFormat.R32G32B32A32_SInt, + GliApi.Gli.Format.RGBA32_SFloat_Pack32 => TextureFormat.R32G32B32A32_SFloat, + GliApi.Gli.Format.R64_UInt_Pack64 => TextureFormat.R64_UInt, + GliApi.Gli.Format.R64_SInt_Pack64 => TextureFormat.R64_SInt, + GliApi.Gli.Format.R64_SFloat_Pack64 => TextureFormat.R64_SFloat, + GliApi.Gli.Format.RG64_UInt_Pack64 => TextureFormat.R64G64_UInt, + GliApi.Gli.Format.RG64_SInt_Pack64 => TextureFormat.R64G64_SInt, + GliApi.Gli.Format.RG64_SFloat_Pack64 => TextureFormat.R64G64_SFloat, + GliApi.Gli.Format.RGB64_UInt_Pack64 => TextureFormat.R64G64B64_UInt, + GliApi.Gli.Format.RGB64_SInt_Pack64 => TextureFormat.R64G64B64_SInt, + GliApi.Gli.Format.RGB64_SFloat_Pack64 => TextureFormat.R64G64B64_SFloat, + GliApi.Gli.Format.RGBA64_UInt_Pack64 => TextureFormat.R64G64B64A64_UInt, + GliApi.Gli.Format.RGBA64_SInt_Pack64 => TextureFormat.R64G64B64A64_SInt, + GliApi.Gli.Format.RGBA64_SFloat_Pack64 => TextureFormat.R64G64B64A64_SFloat, + GliApi.Gli.Format.RG11B10_UFloat_Pack32 => TextureFormat.B10G11R11_UFloat_Pack32, + GliApi.Gli.Format.RGB9E5_UFloat_Pack32 => TextureFormat.E5B9G9R9_UFloat_Pack32, + GliApi.Gli.Format.D16_UNorm_Pack16 => TextureFormat.D16_UNorm, + GliApi.Gli.Format.D24_UNorm_Pack32 => TextureFormat.X8D24_UNorm_Pack32, + GliApi.Gli.Format.D32_SFloat_Pack32 => TextureFormat.D32_SFloat, + GliApi.Gli.Format.S8_UInt_Pack8 => TextureFormat.S8_UInt, + GliApi.Gli.Format.D16_UNorm_S8_UInt_Pack32 => TextureFormat.D16_UNormS8_UInt, + GliApi.Gli.Format.D24_UNorm_S8_UInt_Pack32 => TextureFormat.D24_UNormS8_UInt, + GliApi.Gli.Format.D32_SFloat_S8_UInt_Pack64 => TextureFormat.D32_SFloatS8_UInt, + // Note: DXT1 is equivalent to BC1 + GliApi.Gli.Format.RGB_DXT1_UNorm_Block8 => TextureFormat.BC1Rgb_UNorm_Block, + GliApi.Gli.Format.RGB_DXT1_SRGB_Block8 => TextureFormat.BC1Rgb_SRGB_Block, + GliApi.Gli.Format.RGBA_DXT1_UNorm_Block8 => TextureFormat.BC1Rgba_UNorm_Block, + GliApi.Gli.Format.RGBA_DXT1_SRGB_Block8 => TextureFormat.BC1Rgba_SRGB_Block, + // Note: DXT2/3 is equivalent to BC2 + GliApi.Gli.Format.RGBA_DXT3_UNorm_Block16 => TextureFormat.BC2_UNorm_Block, + GliApi.Gli.Format.RGBA_DXT3_SRGB_Block16 => TextureFormat.BC2_SRGB_Block, + // Note: DXT4/5 is equivalent to BC3 + GliApi.Gli.Format.RGBA_DXT5_UNorm_Block16 => TextureFormat.BC3_UNorm_Block, + GliApi.Gli.Format.RGBA_DXT5_SRGB_Block16 => TextureFormat.BC3_SRGB_Block, + // Note: ATI1 is equivalent to BC4 + GliApi.Gli.Format.R_ATI1N_UNorm_Block8 => TextureFormat.BC4_UNorm_Block, + GliApi.Gli.Format.R_ATI1N_SNorm_Block8 => TextureFormat.BC4_SNorm_Block, + // Note: ATI2 is equivalent to BC5 + GliApi.Gli.Format.RG_ATI2N_UNorm_Block16 => TextureFormat.BC5_UNorm_Block, + GliApi.Gli.Format.RG_ATI2N_SNorm_Block16 => TextureFormat.BC5_SNorm_Block, + // It's not clear what the Vulkan equivalent of these formats are + GliApi.Gli.Format.RGB_BP_UFloat_Block16 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB_BP_SFloat_Block16 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_BP_UNorm_Block16 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_BP_SRGB_Block16 => throw new NotImplementedException(), + // ETC formats + GliApi.Gli.Format.RGB_ETC2_UNorm_Block8 => TextureFormat.ETC2R8G8B8_UNorm_Block, + GliApi.Gli.Format.RGB_ETC2_SRGB_Block8 => TextureFormat.ETC2R8G8B8_SRGB_Block, + GliApi.Gli.Format.RGBA_ETC2_UNorm_Block8 => throw new NotImplementedException(), // It's not clear what the Vulkan equivalent of this format is + GliApi.Gli.Format.RGBA_ETC2_SRGB_Block8 => throw new NotImplementedException(), // It's not clear what the Vulkan equivalent of this format is + GliApi.Gli.Format.RGBA_ETC2_UNorm_Block16 => TextureFormat.ETC2R8G8B8A8_UNorm_Block, + GliApi.Gli.Format.RGBA_ETC2_SRGB_Block16 => TextureFormat.ETC2R8G8B8A8_SRGB_Block, + GliApi.Gli.Format.R_EAC_UNorm_Block8 => TextureFormat.EACR11_UNorm_Block, + GliApi.Gli.Format.R_EAC_SNorm_Block8 => TextureFormat.EACR11_SNorm_Block, + GliApi.Gli.Format.RG_EAC_UNorm_Block16 => TextureFormat.EACR11G11_UNorm_Block, + GliApi.Gli.Format.RG_EAC_SNorm_Block16 => TextureFormat.EACR11G11_SNorm_Block, + // ASTC formats + GliApi.Gli.Format.RGBA_ASTC_4X4_UNorm_Block16 => TextureFormat.ASTC4X4_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_4X4_SRGB_Block16 => TextureFormat.ASTC4X4_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_5X4_UNorm_Block16 => TextureFormat.ASTC5X4_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_5X4_SRGB_Block16 => TextureFormat.ASTC5X4_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_5X5_UNorm_Block16 => TextureFormat.ASTC5X5_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_5X5_SRGB_Block16 => TextureFormat.ASTC5X5_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_6X5_UNorm_Block16 => TextureFormat.ASTC6X5_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_6X5_SRGB_Block16 => TextureFormat.ASTC6X5_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_6X6_UNorm_Block16 => TextureFormat.ASTC6X6_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_6X6_SRGB_Block16 => TextureFormat.ASTC6X6_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_8X5_UNorm_Block16 => TextureFormat.ASTC8X5_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_8X5_SRGB_Block16 => TextureFormat.ASTC8X5_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_8X6_UNorm_Block16 => TextureFormat.ASTC8X6_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_8X6_SRGB_Block16 => TextureFormat.ASTC8X6_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_8X8_UNorm_Block16 => TextureFormat.ASTC8X8_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_8X8_SRGB_Block16 => TextureFormat.ASTC8X8_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_10X5_UNorm_Block16 => TextureFormat.ASTC10X5_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_10X5_SRGB_Block16 => TextureFormat.ASTC10X5_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_10X6_UNorm_Block16 => TextureFormat.ASTC10X6_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_10X6_SRGB_Block16 => TextureFormat.ASTC10X6_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_10X8_UNorm_Block16 => TextureFormat.ASTC10X8_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_10X8_SRGB_Block16 => TextureFormat.ASTC10X8_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_10X10_UNorm_Block16 => TextureFormat.ASTC10X10_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_10X10_SRGB_Block16 => TextureFormat.ASTC10X10_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_12X10_UNorm_Block16 => TextureFormat.ASTC12X10_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_12X10_SRGB_Block16 => TextureFormat.ASTC12X10_SRGB_Block, + GliApi.Gli.Format.RGBA_ASTC_12X12_UNorm_Block16 => TextureFormat.ASTC12X12_UNorm_Block, + GliApi.Gli.Format.RGBA_ASTC_12X12_SRGB_Block16 => TextureFormat.ASTC12X12_SRGB_Block, + // PVRTC formats - requires VK_IMG_format_pvrtc extension, not currently exposed + GliApi.Gli.Format.RGB_PVRTC1_8X8_UNorm_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB_PVRTC1_8X8_SRGB_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB_PVRTC1_16X8_UNorm_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB_PVRTC1_16X8_SRGB_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC1_8X8_UNorm_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC1_8X8_SRGB_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC1_16X8_UNorm_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC1_16X8_SRGB_Block32 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC2_4X4_UNorm_Block8 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC2_4X4_SRGB_Block8 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC2_8X4_UNorm_Block8 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_PVRTC2_8X4_SRGB_Block8 => throw new NotImplementedException(), + // Unknown whether these formats are supported by Vulkan + GliApi.Gli.Format.RGB_ETC_UNorm_Block8 => throw new NotImplementedException(), + GliApi.Gli.Format.RGB_ATC_UNorm_Block8 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_ATCA_UNorm_Block16 => throw new NotImplementedException(), + GliApi.Gli.Format.RGBA_ATCI_UNorm_Block16 => throw new NotImplementedException(), + GliApi.Gli.Format.L8_UNorm_Pack8 => throw new NotImplementedException(), + GliApi.Gli.Format.A8_UNorm_Pack8 => throw new NotImplementedException(), + GliApi.Gli.Format.LA8_UNorm_Pack8 => throw new NotImplementedException(), + GliApi.Gli.Format.L16_UNorm_Pack16 => throw new NotImplementedException(), + GliApi.Gli.Format.A16_UNorm_Pack16 => throw new NotImplementedException(), + GliApi.Gli.Format.LA16_UNorm_Pack16 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR8_UNorm_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.BGR8_SRGB_Pack32 => throw new NotImplementedException(), + GliApi.Gli.Format.RG3B2_UNorm_Pack8 => throw new NotImplementedException(), + _ => throw new ArgumentOutOfRangeException(nameof(gliFormat), gliFormat, null), + }; + } + + /// + /// Convert a TextureFormat to a GliFormat + /// + /// + /// Not all formats are currently supported by this function due to ambiguity about whether they will convert correctly + /// + /// The TextureFormat to convert + /// A corresponding GliFormat + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static GliApi.Gli.Format ToGliFormat(this TextureFormat format) + { + return format switch + { + TextureFormat.Undefined => GliApi.Gli.Format.Undefined, + TextureFormat.R4G4_UNorm_Pack8 => GliApi.Gli.Format.RG4_UNorm_Pack8, + TextureFormat.R4G4B4A4_UNorm_Pack16 => GliApi.Gli.Format.RGBA4_UNorm_Pack16, + TextureFormat.B4G4R4A4_UNorm_Pack16 => GliApi.Gli.Format.BGRA4_UNorm_Pack16, + TextureFormat.R5G6B5_UNorm_Pack16 => GliApi.Gli.Format.R5G6B5_UNorm_Pack16, + TextureFormat.B5G6R5_UNorm_Pack16 => GliApi.Gli.Format.B5G6R5_UNorm_Pack16, + TextureFormat.R5G5B5A1_UNorm_Pack16 => GliApi.Gli.Format.RGB5A1_UNorm_Pack16, + TextureFormat.B5G5R5A1_UNorm_Pack16 => GliApi.Gli.Format.BGR5A1_UNorm_Pack16, + TextureFormat.A1R5G5B5_UNorm_Pack16 => GliApi.Gli.Format.A1RGB5_UNorm_Pack16, + TextureFormat.R8_UNorm => GliApi.Gli.Format.R8_UNorm_Pack8, + TextureFormat.R8_SNorm => GliApi.Gli.Format.R8_SNorm_Pack8, + TextureFormat.R8_UScaled => GliApi.Gli.Format.R8_UScaled_Pack8, + TextureFormat.R8_SScaled => GliApi.Gli.Format.R8_SScaled_Pack8, + TextureFormat.R8_UInt => GliApi.Gli.Format.R8_UInt_Pack8, + TextureFormat.R8_SInt => GliApi.Gli.Format.R8_SInt_Pack8, + TextureFormat.R8_SRGB => GliApi.Gli.Format.R8_SRGB_Pack8, + TextureFormat.R8G8_UNorm => GliApi.Gli.Format.RG8_UNorm_Pack8, + TextureFormat.R8G8_SNorm => GliApi.Gli.Format.RG8_SNorm_Pack8, + TextureFormat.R8G8_UScaled => GliApi.Gli.Format.RG8_UScaled_Pack8, + TextureFormat.R8G8_SScaled => GliApi.Gli.Format.RG8_SScaled_Pack8, + TextureFormat.R8G8_UInt => GliApi.Gli.Format.RG8_UInt_Pack8, + TextureFormat.R8G8_SInt => GliApi.Gli.Format.RG8_SInt_Pack8, + TextureFormat.R8G8_SRGB => GliApi.Gli.Format.RG8_SRGB_Pack8, + TextureFormat.R8G8B8_UNorm => GliApi.Gli.Format.RGB8_UNorm_Pack8, + TextureFormat.R8G8B8_SNorm => GliApi.Gli.Format.RGB8_SNorm_Pack8, + TextureFormat.R8G8B8_UScaled => GliApi.Gli.Format.RGB8_UScaled_Pack8, + TextureFormat.R8G8B8_SScaled => GliApi.Gli.Format.RGB8_SScaled_Pack8, + TextureFormat.R8G8B8_UInt => GliApi.Gli.Format.RGB8_UInt_Pack8, + TextureFormat.R8G8B8_SInt => GliApi.Gli.Format.RGB8_SInt_Pack8, + TextureFormat.R8G8B8_SRGB => GliApi.Gli.Format.RGB8_SRGB_Pack8, + TextureFormat.B8G8R8_UNorm => GliApi.Gli.Format.BGR8_UNorm_Pack8, + TextureFormat.B8G8R8_SNorm => GliApi.Gli.Format.BGR8_SNorm_Pack8, + TextureFormat.B8G8R8_UScaled => GliApi.Gli.Format.BGR8_UScaled_Pack8, + TextureFormat.B8G8R8_SScaled => GliApi.Gli.Format.BGR8_SScaled_Pack8, + TextureFormat.B8G8R8_UInt => GliApi.Gli.Format.BGR8_UInt_Pack8, + TextureFormat.B8G8R8_SInt => GliApi.Gli.Format.BGR8_SInt_Pack8, + TextureFormat.B8G8R8_SRGB => GliApi.Gli.Format.BGR8_SRGB_Pack8, + TextureFormat.R8G8B8A8_UNorm => GliApi.Gli.Format.RGBA8_UNorm_Pack8, + TextureFormat.R8G8B8A8_SNorm => GliApi.Gli.Format.RGBA8_SNorm_Pack8, + TextureFormat.R8G8B8A8_UScaled => GliApi.Gli.Format.RGBA8_UScaled_Pack8, + TextureFormat.R8G8B8A8_SScaled => GliApi.Gli.Format.RGBA8_SScaled_Pack8, + TextureFormat.R8G8B8A8_UInt => GliApi.Gli.Format.RGBA8_UInt_Pack8, + TextureFormat.R8G8B8A8_SInt => GliApi.Gli.Format.RGBA8_SInt_Pack8, + TextureFormat.R8G8B8A8_SRGB => GliApi.Gli.Format.RGBA8_SRGB_Pack8, + TextureFormat.B8G8R8A8_UNorm => GliApi.Gli.Format.BGRA8_UNorm_Pack8, + TextureFormat.B8G8R8A8_SNorm => GliApi.Gli.Format.BGRA8_SNorm_Pack8, + TextureFormat.B8G8R8A8_UScaled => GliApi.Gli.Format.BGRA8_UScaled_Pack8, + TextureFormat.B8G8R8A8_SScaled => GliApi.Gli.Format.BGRA8_SScaled_Pack8, + TextureFormat.B8G8R8A8_UInt => GliApi.Gli.Format.BGRA8_UInt_Pack8, + TextureFormat.B8G8R8A8_SInt => GliApi.Gli.Format.BGRA8_SInt_Pack8, + TextureFormat.B8G8R8A8_SRGB => GliApi.Gli.Format.BGRA8_SRGB_Pack8, + TextureFormat.A8B8G8R8_UNorm_Pack32 => GliApi.Gli.Format.RGBA8_UNorm_Pack32, + TextureFormat.A8B8G8R8_SNorm_Pack32 => GliApi.Gli.Format.RGBA8_SNorm_Pack32, + TextureFormat.A8B8G8R8_UScaled_Pack32 => GliApi.Gli.Format.RGBA8_UScaled_Pack32, + TextureFormat.A8B8G8R8_SScaled_Pack32 => GliApi.Gli.Format.RGBA8_SScaled_Pack32, + TextureFormat.A8B8G8R8_UInt_Pack32 => GliApi.Gli.Format.RGBA8_UInt_Pack32, + TextureFormat.A8B8G8R8_SInt_Pack32 => GliApi.Gli.Format.RGBA8_SInt_Pack32, + TextureFormat.A8B8G8R8_SRGB_Pack32 => GliApi.Gli.Format.RGBA8_SRGB_Pack32, + TextureFormat.R16_UNorm => GliApi.Gli.Format.R16_UNorm_Pack16, + TextureFormat.R16_SNorm => GliApi.Gli.Format.R16_SNorm_Pack16, + TextureFormat.R16_UScaled => GliApi.Gli.Format.R16_UScaled_Pack16, + TextureFormat.R16_SScaled => GliApi.Gli.Format.R16_SScaled_Pack16, + TextureFormat.R16_UInt => GliApi.Gli.Format.R16_UInt_Pack16, + TextureFormat.R16_SInt => GliApi.Gli.Format.R16_SInt_Pack16, + TextureFormat.R16_SFloat => GliApi.Gli.Format.R16_SFloat_Pack16, + TextureFormat.R16G16_UNorm => GliApi.Gli.Format.RG16_UNorm_Pack16, + TextureFormat.R16G16_SNorm => GliApi.Gli.Format.RG16_SNorm_Pack16, + TextureFormat.R16G16_UScaled => GliApi.Gli.Format.RG16_UScaled_Pack16, + TextureFormat.R16G16_SScaled => GliApi.Gli.Format.RG16_SScaled_Pack16, + TextureFormat.R16G16_UInt => GliApi.Gli.Format.RG16_UInt_Pack16, + TextureFormat.R16G16_SInt => GliApi.Gli.Format.RG16_SInt_Pack16, + TextureFormat.R16G16_SFloat => GliApi.Gli.Format.RG16_SFloat_Pack16, + TextureFormat.R16G16B16_UNorm => GliApi.Gli.Format.RGB16_UNorm_Pack16, + TextureFormat.R16G16B16_SNorm => GliApi.Gli.Format.RGB16_SNorm_Pack16, + TextureFormat.R16G16B16_UScaled => GliApi.Gli.Format.RGB16_UScaled_Pack16, + TextureFormat.R16G16B16_SScaled => GliApi.Gli.Format.RGB16_SScaled_Pack16, + TextureFormat.R16G16B16_UInt => GliApi.Gli.Format.RGB16_UInt_Pack16, + TextureFormat.R16G16B16_SInt => GliApi.Gli.Format.RGB16_SInt_Pack16, + TextureFormat.R16G16B16_SFloat => GliApi.Gli.Format.RGB16_SFloat_Pack16, + TextureFormat.R16G16B16A16_UNorm => GliApi.Gli.Format.RGBA16_UNorm_Pack16, + TextureFormat.R16G16B16A16_SNorm => GliApi.Gli.Format.RGBA16_SNorm_Pack16, + TextureFormat.R16G16B16A16_UScaled => GliApi.Gli.Format.RGBA16_UScaled_Pack16, + TextureFormat.R16G16B16A16_SScaled => GliApi.Gli.Format.RGBA16_SScaled_Pack16, + TextureFormat.R16G16B16A16_UInt => GliApi.Gli.Format.RGBA16_UInt_Pack16, + TextureFormat.R16G16B16A16_SInt => GliApi.Gli.Format.RGBA16_SInt_Pack16, + TextureFormat.R16G16B16A16_SFloat => GliApi.Gli.Format.RGBA16_SFloat_Pack16, + TextureFormat.R32_UInt => GliApi.Gli.Format.R32_UInt_Pack32, + TextureFormat.R32_SInt => GliApi.Gli.Format.R32_SInt_Pack32, + TextureFormat.R32_SFloat => GliApi.Gli.Format.R32_SFloat_Pack32, + TextureFormat.R32G32_UInt => GliApi.Gli.Format.RG32_UInt_Pack32, + TextureFormat.R32G32_SInt => GliApi.Gli.Format.RG32_SInt_Pack32, + TextureFormat.R32G32_SFloat => GliApi.Gli.Format.RG32_SFloat_Pack32, + TextureFormat.R32G32B32_UInt => GliApi.Gli.Format.RGB32_UInt_Pack32, + TextureFormat.R32G32B32_SInt => GliApi.Gli.Format.RGB32_SInt_Pack32, + TextureFormat.R32G32B32_SFloat => GliApi.Gli.Format.RGB32_SFloat_Pack32, + TextureFormat.R32G32B32A32_UInt => GliApi.Gli.Format.RGBA32_UInt_Pack32, + TextureFormat.R32G32B32A32_SInt => GliApi.Gli.Format.RGBA32_SInt_Pack32, + TextureFormat.R32G32B32A32_SFloat => GliApi.Gli.Format.RGBA32_SFloat_Pack32, + TextureFormat.R64_UInt => GliApi.Gli.Format.R64_UInt_Pack64, + TextureFormat.R64_SInt => GliApi.Gli.Format.R64_SInt_Pack64, + TextureFormat.R64_SFloat => GliApi.Gli.Format.R64_SFloat_Pack64, + TextureFormat.R64G64_UInt => GliApi.Gli.Format.RG64_UInt_Pack64, + TextureFormat.R64G64_SInt => GliApi.Gli.Format.RG64_SInt_Pack64, + TextureFormat.R64G64_SFloat => GliApi.Gli.Format.RG64_SFloat_Pack64, + TextureFormat.R64G64B64_UInt => GliApi.Gli.Format.RGB64_UInt_Pack64, + TextureFormat.R64G64B64_SInt => GliApi.Gli.Format.RGB64_SInt_Pack64, + TextureFormat.R64G64B64_SFloat => GliApi.Gli.Format.RGB64_SFloat_Pack64, + TextureFormat.R64G64B64A64_UInt => GliApi.Gli.Format.RGBA64_UInt_Pack64, + TextureFormat.R64G64B64A64_SInt => GliApi.Gli.Format.RGBA64_SInt_Pack64, + TextureFormat.R64G64B64A64_SFloat => GliApi.Gli.Format.RGBA64_SFloat_Pack64, + TextureFormat.B10G11R11_UFloat_Pack32 => GliApi.Gli.Format.RG11B10_UFloat_Pack32, + TextureFormat.E5B9G9R9_UFloat_Pack32 => GliApi.Gli.Format.RGB9E5_UFloat_Pack32, + TextureFormat.D16_UNorm => GliApi.Gli.Format.D16_UNorm_Pack16, + TextureFormat.X8D24_UNorm_Pack32 => GliApi.Gli.Format.D24_UNorm_Pack32, + TextureFormat.D32_SFloat => GliApi.Gli.Format.D32_SFloat_Pack32, + TextureFormat.S8_UInt => GliApi.Gli.Format.S8_UInt_Pack8, + TextureFormat.D16_UNormS8_UInt => GliApi.Gli.Format.D16_UNorm_S8_UInt_Pack32, + TextureFormat.D24_UNormS8_UInt => GliApi.Gli.Format.D24_UNorm_S8_UInt_Pack32, + TextureFormat.D32_SFloatS8_UInt => GliApi.Gli.Format.D32_SFloat_S8_UInt_Pack64, + TextureFormat.BC1Rgb_UNorm_Block => GliApi.Gli.Format.RGB_DXT1_UNorm_Block8, + TextureFormat.BC1Rgb_SRGB_Block => GliApi.Gli.Format.RGB_DXT1_SRGB_Block8, + TextureFormat.BC1Rgba_UNorm_Block => GliApi.Gli.Format.RGBA_DXT1_UNorm_Block8, + TextureFormat.BC1Rgba_SRGB_Block => GliApi.Gli.Format.RGBA_DXT1_SRGB_Block8, + TextureFormat.BC2_UNorm_Block => GliApi.Gli.Format.RGBA_DXT3_UNorm_Block16, + TextureFormat.BC2_SRGB_Block => GliApi.Gli.Format.RGBA_DXT3_SRGB_Block16, + TextureFormat.BC3_UNorm_Block => GliApi.Gli.Format.RGBA_DXT5_UNorm_Block16, + TextureFormat.BC3_SRGB_Block => GliApi.Gli.Format.RGBA_DXT5_SRGB_Block16, + TextureFormat.BC4_UNorm_Block => GliApi.Gli.Format.R_ATI1N_UNorm_Block8, + TextureFormat.BC4_SNorm_Block => GliApi.Gli.Format.R_ATI1N_SNorm_Block8, + TextureFormat.BC5_UNorm_Block => GliApi.Gli.Format.RG_ATI2N_UNorm_Block16, + TextureFormat.BC5_SNorm_Block => GliApi.Gli.Format.RG_ATI2N_SNorm_Block16, + TextureFormat.ETC2R8G8B8_UNorm_Block => GliApi.Gli.Format.RGB_ETC2_UNorm_Block8, + TextureFormat.ETC2R8G8B8_SRGB_Block => GliApi.Gli.Format.RGB_ETC2_SRGB_Block8, + TextureFormat.ETC2R8G8B8A8_UNorm_Block => GliApi.Gli.Format.RGBA_ETC2_UNorm_Block16, + TextureFormat.ETC2R8G8B8A8_SRGB_Block => GliApi.Gli.Format.RGBA_ETC2_SRGB_Block16, + TextureFormat.EACR11_UNorm_Block => GliApi.Gli.Format.R_EAC_UNorm_Block8, + TextureFormat.EACR11_SNorm_Block => GliApi.Gli.Format.R_EAC_SNorm_Block8, + TextureFormat.EACR11G11_UNorm_Block => GliApi.Gli.Format.RG_EAC_UNorm_Block16, + TextureFormat.EACR11G11_SNorm_Block => GliApi.Gli.Format.RG_EAC_SNorm_Block16, + TextureFormat.ASTC4X4_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_4X4_UNorm_Block16, + TextureFormat.ASTC4X4_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_4X4_SRGB_Block16, + TextureFormat.ASTC5X4_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_5X4_UNorm_Block16, + TextureFormat.ASTC5X4_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_5X4_SRGB_Block16, + TextureFormat.ASTC5X5_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_5X5_UNorm_Block16, + TextureFormat.ASTC5X5_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_5X5_SRGB_Block16, + TextureFormat.ASTC6X5_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_6X5_UNorm_Block16, + TextureFormat.ASTC6X5_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_6X5_SRGB_Block16, + TextureFormat.ASTC6X6_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_6X6_UNorm_Block16, + TextureFormat.ASTC6X6_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_6X6_SRGB_Block16, + TextureFormat.ASTC8X5_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_8X5_UNorm_Block16, + TextureFormat.ASTC8X5_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_8X5_SRGB_Block16, + TextureFormat.ASTC8X6_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_8X6_UNorm_Block16, + TextureFormat.ASTC8X6_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_8X6_SRGB_Block16, + TextureFormat.ASTC8X8_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_8X8_UNorm_Block16, + TextureFormat.ASTC8X8_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_8X8_SRGB_Block16, + TextureFormat.ASTC10X5_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_10X5_UNorm_Block16, + TextureFormat.ASTC10X5_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_10X5_SRGB_Block16, + TextureFormat.ASTC10X6_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_10X6_UNorm_Block16, + TextureFormat.ASTC10X6_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_10X6_SRGB_Block16, + TextureFormat.ASTC10X8_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_10X8_UNorm_Block16, + TextureFormat.ASTC10X8_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_10X8_SRGB_Block16, + TextureFormat.ASTC10X10_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_10X10_UNorm_Block16, + TextureFormat.ASTC10X10_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_10X10_SRGB_Block16, + TextureFormat.ASTC12X10_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_12X10_UNorm_Block16, + TextureFormat.ASTC12X10_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_12X10_SRGB_Block16, + TextureFormat.ASTC12X12_UNorm_Block => GliApi.Gli.Format.RGBA_ASTC_12X12_UNorm_Block16, + TextureFormat.ASTC12X12_SRGB_Block => GliApi.Gli.Format.RGBA_ASTC_12X12_SRGB_Block16, + _ => throw new ArgumentOutOfRangeException(nameof(format), format, null), + }; + } +} diff --git a/Brutal.Texture/Gli/GliTexture.cs b/Brutal.Texture/Gli/GliTexture.cs new file mode 100644 index 0000000..1ce42f6 --- /dev/null +++ b/Brutal.Texture/Gli/GliTexture.cs @@ -0,0 +1,42 @@ +using Brutal.GliApi; + +namespace Brutal.TextureApi.Gli; + +public class GliTexture(Brutal.GliApi.Gli.Texture nativeTexture) : ITexture +{ + public unsafe Span ImageData(int level, int layer, int faceOrSlice) + { + var sliceSize = _impl.ImageSize(level) / Extent.Z; + + if (_impl.Target == Brutal.GliApi.Gli.Target._3D) + return new(_impl.ImageData(level, layer, 0) + sliceSize * faceOrSlice, (int)sliceSize); + + return new(_impl.ImageData(level, layer, faceOrSlice), (int)sliceSize); + } + + public unsafe Span Data => new(_impl.Data, (int)_impl.Size); + public TexelCount3 Extent => new(_impl.Extent.X, _impl.Extent.Y, _impl.Extent.Z); + public TextureFormat Format => _impl.Format.ToTextureFormat(); + public int LayerCount => (int)_impl.Layers; + public int LevelCount => (int)_impl.Levels; + public int FaceCount => (int)_impl.Faces; + public bool IsCubemap => _impl.Target.IsCube(); + public bool IsArray => _impl.Target.IsArray(); + public int DimensionCount => _impl.Target.DimensionCount(); + + public ByteSize RowPitch(int level) + { + if (level < 0 || level >= LevelCount) + throw new ArgumentOutOfRangeException(nameof(level), level, $"Level must be in range [0, {LevelCount})"); + return ByteSize.Of(_impl.ImageRowPitch(level)); + } + + public static implicit operator Brutal.GliApi.Gli.Texture(GliTexture texture) => texture._impl; + + private readonly GliApi.Gli.Texture _impl = nativeTexture; + + public void Destroy() + { + _impl.Dispose(); + } +} diff --git a/Brutal.Texture/Gli/GliTextureException.cs b/Brutal.Texture/Gli/GliTextureException.cs new file mode 100644 index 0000000..62e8826 --- /dev/null +++ b/Brutal.Texture/Gli/GliTextureException.cs @@ -0,0 +1,9 @@ +using Brutal.TextureApi; + +namespace Brutal.TextureApi.Gli; + +public class GliTextureException : TextureException +{ + public GliTextureException(string message) + : base(message) { } +} diff --git a/Brutal.Texture/Gli/GliTextureLoader.cs b/Brutal.Texture/Gli/GliTextureLoader.cs new file mode 100644 index 0000000..9439034 --- /dev/null +++ b/Brutal.Texture/Gli/GliTextureLoader.cs @@ -0,0 +1,36 @@ +using System.Collections.Frozen; +using Brutal.Pointers.Extensions; + +namespace Brutal.TextureApi.Gli; + +public static partial class Loader +{ + public static GliTexture LoadFromFile(string filePath) + { + var nativeTexture = new GliApi.Gli.Texture(filePath); + + if (nativeTexture.IsNull()) + { + nativeTexture.Dispose(); + throw new GliTextureException($"Failed to load texture from filePath \"{filePath}\""); + } + + return new GliTexture(nativeTexture); + } + + public static unsafe GliTexture LoadFromMemory(ReadOnlySpan data) + { + var nativeTexture = new GliApi.Gli.Texture(data); + + if (nativeTexture.IsNull()) + { + nativeTexture.Dispose(); + throw new GliTextureException($"Failed to load texture from data at 0x{(nint)data.AsPointer()}"); + } + + return new GliTexture(nativeTexture); + } + + public static FrozenSet SupportedExtensions { get; } = + FrozenSet.Create(StringComparer.OrdinalIgnoreCase, [".dds", ".ktx", ".kmg"]); +} diff --git a/Brutal.Texture/Gli/GliTextureSaveException.cs b/Brutal.Texture/Gli/GliTextureSaveException.cs new file mode 100644 index 0000000..8456f85 --- /dev/null +++ b/Brutal.Texture/Gli/GliTextureSaveException.cs @@ -0,0 +1,3 @@ +namespace Brutal.TextureApi.Gli; + +public class GliTextureSaveException(string message) : GliTextureException(message); diff --git a/Brutal.Texture/Gli/GliTextureWriter.cs b/Brutal.Texture/Gli/GliTextureWriter.cs new file mode 100644 index 0000000..8807f17 --- /dev/null +++ b/Brutal.Texture/Gli/GliTextureWriter.cs @@ -0,0 +1,59 @@ +namespace Brutal.TextureApi.Gli; + +public static partial class Writer +{ + public static void SaveToFile(ITexture texture, string filePath) + { + if (texture is GliTexture gliTexture) + { + SaveToFileImpl(gliTexture, filePath); + return; + } + + SaveToFile( + new TextureDescriptor + { + Data = texture.Data, + Extent = texture.Extent, + Format = texture.Format, + LayerCount = texture.LayerCount, + FaceCount = texture.FaceCount, + MipmapCount = texture.LevelCount, + IsCubemap = texture.IsCubemap, + }, + filePath + ); + } + + public static void SaveToFile(TextureDescriptor descriptor, string filePath) + { + var gliTarget = GliConversionUtils.GetTarget(descriptor.Extent, descriptor.LayerCount, descriptor.IsCubemap); + + using var gliNative = new GliApi.Gli.Texture( + gliTarget, + descriptor.Format.ToGliFormat(), + new(descriptor.Extent.X, descriptor.Extent.Y, descriptor.Extent.Z), + descriptor.LayerCount, + descriptor.FaceCount, + descriptor.MipmapCount, + GliApi.Gli.Swizzles.Identity + ); + + unsafe + { + descriptor.Data.CopyTo(new Span(gliNative.Data, descriptor.Data.Length)); + } + + SaveToFileImpl(gliNative, filePath); + } + + private static void SaveToFileImpl(GliApi.Gli.Texture texture, string filePath) + { + var result = texture.Save(filePath); + + if (!result) + { + throw new GliTextureSaveException($"Failed to save texture to file at path: \"{filePath}\"."); + } + } +} diff --git a/Brutal.Texture/ITexture.cs b/Brutal.Texture/ITexture.cs new file mode 100644 index 0000000..daea752 --- /dev/null +++ b/Brutal.Texture/ITexture.cs @@ -0,0 +1,75 @@ +namespace Brutal.TextureApi; + +/// +/// Interface representing a texture. +/// +public interface ITexture +{ + /// + /// The texel data for this texture + /// + public Span Data { get; } + + /// + /// The data for one image of the texture. + /// + /// You cannot have 3d cubemaps, therefore the third parameter + /// is used for face or slice depending on the type of texture. + /// The mip level of data to get + /// The array layer of data to get + /// The face (If a cube map) or slice (if a depth texture) of data to get. + /// Thrown if data cannot be retrieved + public Span ImageData(int level, int layer, int faceOrSlice); + + /// + /// The extent of this texture (in texels). This is equal to the extent of the largest + /// mip level of the texture + /// + public TexelCount3 Extent { get; } + + /// + /// The of this texture. You can convert this to a Vulkan + /// texture format with a call to ToVkFormat(). e.g. + /// myITexture.Format.ToVkFormat(); + /// + public TextureFormat Format { get; } + + /// + /// The number of array layers in this texture + /// + public int LayerCount { get; } + + /// + /// The number of levels (mipmaps) in this texture + /// + public int LevelCount { get; } + + /// + /// The number of faces in this texture. This is typically 1 unless IsCubemap == true + /// in which it could be up to 6 + /// + public int FaceCount { get; } + + /// + /// Whether this texture is defined as a cubemap + /// + public bool IsCubemap { get; } + + /// + /// Returns whether this ITexture is an array texture. + /// + public bool IsArray { get; } + + /// + /// Returns the number of dimensions of this ITexture. + /// + public int DimensionCount { get; } // 1, 2 or 3d + + /// + /// Byte count from start of one row of the texture to the next + /// + /// Mip level to get the pitch for + /// The number of bytes from start of one row to start of the next row + /// Thrown if level is less than 0 or greater than mip levels - 1 + public ByteSize RowPitch(int level); +} diff --git a/Brutal.Texture/Ktx/KtxConverter.cs b/Brutal.Texture/Ktx/KtxConverter.cs new file mode 100644 index 0000000..ed6f0cc --- /dev/null +++ b/Brutal.Texture/Ktx/KtxConverter.cs @@ -0,0 +1,113 @@ +using Brutal.KtxApi; + +namespace Brutal.TextureApi.Ktx; + +/// +/// Static class that provides conversion functions from other formats to a KtxTexture. +/// +public static partial class Converter +{ + /// + /// Takes any ITexture and creates a KTX version 2 ITexture from it. The original + /// texture is kept as is and it is up to the caller to unload it if it is no longer + /// used. + /// + /// The ITexture to use as the source + /// The KTX Version 2 texture created from the source texture + public static KtxTexture ToV2KtxTexture(ITexture texture) + { + var saveData = new TextureDescriptor + { + Data = texture.Data, + Extent = texture.Extent, + Format = texture.Format, + LayerCount = texture.LayerCount, + FaceCount = texture.FaceCount, + MipmapCount = texture.LevelCount, + IsCubemap = texture.IsCubemap, + }; + + return new KtxTexture(ToKtxTexture2Handle(saveData)); + } + + /// + /// Creates a KTX version 2 texture handle from a TextureSaveInfo structure. + /// It is your responsibility to free the texture handle. + /// + /// The structure describing the texture to build + /// KtxTexture2Handle of the created texture + /// Thrown if the texture could not be created, or + /// the new texture data size is different to the source data size + internal static unsafe KtxTexture2Handle ToKtxTexture2Handle(TextureDescriptor descriptor) + { + ValidateSaveInfo(descriptor); + + var createInfo = new KtxTextureCreateInfo() + { + BaseWidth = (uint)descriptor.Extent.X, + BaseHeight = (uint)descriptor.Extent.Y, + BaseDepth = (uint)descriptor.Extent.Z, + GenerateMipmaps = false, + NumLevels = (uint)descriptor.MipmapCount, + NumLayers = (uint)descriptor.LayerCount, + NumDimensions = CalculateDimensions(descriptor), + NumFaces = (uint)descriptor.FaceCount, + IsArray = + descriptor.Extent.X > 0 + && descriptor.LayerCount > 1 + && (descriptor.FaceCount == 1 || descriptor.IsCubemap), + PDfd = null, + VkFormat = (uint)descriptor.Format, + GlInternalformat = 0, // Ignored + }; + + var createResult = KtxTexture2.Create( + ref createInfo, + KtxTextureCreateStorageEnum.TextureCreateAllocStorage, + out var texture2Handle + ); + if (createResult != KtxErrorCode.Success) + throw new KtxTextureException( + $"Failed to create texture to save. KtxErrorCode:{createResult}", + createResult + ); + + if (descriptor.Data.Length != (int)texture2Handle.GetDataSize()) + throw new KtxTextureException( + $"Size mismatch. Brutal.Ktx allocated {texture2Handle.GetDataSize()} bytes but the save data had {descriptor.Data.Length}" + ); + + descriptor.Data.CopyTo(new Span(texture2Handle.GetData(), (int)texture2Handle.GetDataSize())); + + return texture2Handle; + } + + private static void ValidateSaveInfo(TextureDescriptor descriptor) + { + if (descriptor.Extent.X == 0) + throw new KtxTextureException("Texture width cannot be 0"); + + if (descriptor.FaceCount == 6 && (descriptor.Extent.Y != descriptor.Extent.X || descriptor.Extent.Z != 1)) + throw new KtxTextureException( + "Cubemap textures must have 6 faces, have the same width and height, and have a depth of 1" + ); + } + + private static uint CalculateDimensions(TextureDescriptor descriptor) + { + if (descriptor.IsCubemap) + return 2; + + var saveDataExtent = descriptor.Extent; + // A depth of 1 is a 2D texture, not a 3D one. Only Z > 1 denotes a true 3D (volume) texture. + if (saveDataExtent is { X: > 0, Y: > 0, Z: > 1 }) + return 3; + if (saveDataExtent is { X: > 0, Y: > 0, Z: 1 }) + return 2; + if (saveDataExtent is { X: > 0, Y: 1, Z: 1 }) + return 1; + throw new KtxTextureException( + $"Invalid extent for dimension calculation. extent: {saveDataExtent.X}, {saveDataExtent.Y}, {saveDataExtent.Z}" + ); + } +} diff --git a/Brutal.Texture/Ktx/KtxTexture.cs b/Brutal.Texture/Ktx/KtxTexture.cs new file mode 100644 index 0000000..a11fc6d --- /dev/null +++ b/Brutal.Texture/Ktx/KtxTexture.cs @@ -0,0 +1,196 @@ +using System.Text; +using Brutal.KtxApi; +using Brutal.KtxApi.Abstractions; + +namespace Brutal.TextureApi.Ktx; + +/* + * If facecount == 6 (IsCubemap == true) then width and height must be the same and depth must be 0 + * pixelHeight must not be 0 for block-compressed formats, including BasisLZ/ETC1S and UASTC. + * pixelDepth must not be 0 for block formats that have block depth > 1 + * pixelDepth must be 0 for depth or stencil formats. + * + * layercount is number of array elements. If not an array then layercount must be 0. + * + * faceCount specifies the number of cubemap faces. + * For cubemaps and cubemap arrays this must be 6. For non cubemaps this must be 1. + * Cubemap faces are stored in the order: +X, -X, +Y, -Y, +Z, -Z in a left-handed coordinate system with + * +Y up and, with the +Z face forward, +X on the on the right. + * All faces must have the same orientation which must be rd (top-left origin) which is assumed in the absence of + * Section 5.2, “KTXorientation” metadata. See Appendix A, Cubemap Orientation for details. + * Applications wanting to store incomplete cubemaps should flatten faces into a 2D array and use the metadata described in + * Section 5.1, “KTXcubemapIncomplete” to signal which faces are present. + * + * Type pixelWidth pixelHeight pixelDepth layerCount faceCount + * 1D > 0 0 0 0 1 + * 2D > 0 > 0 0 0 1 + * 3D > 0 > 0 >0 0 1 + * Cubemap > 0 > 0 0 0 6 + * 1D Array > 0 0 0 >0 1 + * 2d Array > 0 > 0 0 >0 1 + * 3d Array > 0 > 0 >0 >0 1 + * Cubemap Arr > 0 > 0 0 >0 6 + */ + +public class KtxTexture : ITexture +{ + /// + /// Create a KtxTexture from an existing KtxTextureHandle. + /// + /// The commonTextureHandle must not currently be supercompressed. + /// A native handle to a KTX V1 or V2 texture + /// Thrown if the texture referenced by commonTextureHandle is super compressed + public KtxTexture(KtxTextureHandle commonTextureHandle) + { + _commonTextureHandle = commonTextureHandle; + if (_commonTextureHandle.NeedsTranscoding()) + throw new TextureException("Texture is supercompressed."); + } + + #region ITexture Implementation + + /// + public unsafe Span Data + { + get + { + EnsureLoaded(); + return new Span(_commonTextureHandle.GetData(), (int)_commonTextureHandle.GetDataSize()); + } + } + + /// + public TexelCount3 Extent => + new( + (int)_commonTextureHandle.BaseWidth, + (int)_commonTextureHandle.BaseHeight, + (int)_commonTextureHandle.BaseDepth + ); + + /// + public TextureFormat Format => (TextureFormat)_commonTextureHandle.GetVkFormat(); + + /// + public int LayerCount => (int)_commonTextureHandle.NumLayers; + + /// + public int LevelCount => (int)_commonTextureHandle.NumLevels; + + /// + public int FaceCount => (int)_commonTextureHandle.NumFaces; + + /// + public bool IsCubemap => _commonTextureHandle.IsCubemap; + + /// + public bool IsArray => _commonTextureHandle.IsArray; + + /// + public int DimensionCount => (int)_commonTextureHandle.NumDimensions; + + /// + public unsafe ByteSize RowPitch(int level) + { + if (level < 0 || level >= LevelCount) + throw new ArgumentOutOfRangeException(nameof(level), level, $"Level must be in range [0, {LevelCount})"); + + _rowPitch ??= new ByteSize[LevelCount]; + if (_rowPitch[level] != 0) + return _rowPitch[level]; + + if (_commonTextureHandle.ClassId == ClassId.Texture2C) + { + var formatSize = _commonTextureHandle.Protected->FormatSize; + var blocksWide = Math.Max(1, (_commonTextureHandle.BaseWidth / formatSize.BlockWidth) >> level); + _rowPitch[level] = ByteSize.Of(blocksWide * ((int)formatSize.BlockSizeInBits >> 3)); + return _rowPitch[level]; + } + + _rowPitch[level] = (ByteSize)_commonTextureHandle.GetRowPitch((uint)level); + return _rowPitch[level]; + } + + /// + public Span ImageData(int level, int layer, int face) + { + EnsureLoaded(); + + var getResult = _commonTextureHandle.GetImageData((uint)level, (uint)layer, (uint)face, out var data); + if (getResult != KtxErrorCode.Success) + throw new TextureException( + $"Cannot get image data for KtxTexture. level:{level} layer:{layer} face:{face} error:{getResult}" + ); + return data; + } + + #endregion + + /// + /// Returns a native handle to the KtxTexture + /// + /// + public KtxTextureHandle UnderlyingKtxTextureHandle => _commonTextureHandle; + + /// + /// Frees all resources held by the the KtxTexture. After calling Destroy() the + /// KtxTexture object is unusable. + /// + public void Destroy() + { + if (_commonTextureHandle.IsNotNull()) + { + _commonTextureHandle.Destroy(); + _commonTextureHandle = default; + } + } + + /// + /// Saves a KtxTexture to a file on disk. + /// + /// + /// + public KtxErrorCode SaveToFile(string filePath) + { + EnsureLoaded(); + return _commonTextureHandle.WriteToNamedFile(Encoding.UTF8.GetBytes(filePath)); + } + + /// + /// Returns whether the row pitch for the texture has been padded to 4 bytes. + /// + /// This is a special requirement for V1 Ktx files. The spec required the alignment of rows of uncompresed textures to 4 bytes. + /// This requirement was removed for V2 textures but we do need to know if packing is occurring for V1 if using OpenGl, + /// so we can set GL_UNPACK_ALIGNMENT. + /// If this function returns true, then set GL_UNPACK_ALIGNMENT to 4 before uploading the texture otherwise + /// set it to 1. + /// + /// What level to check for padding + /// True if row pitch was padded to 4 bytes, false if not. + /// Thrown if the image is supercompressed + public bool IsRow4BytePadded(int level) + { + if (_commonTextureHandle.ClassId == ClassId.Texture2C) + return false; + + // Catches compressed textures (All multiple of 4 in element size), and uncompressed with 4 byte elements + if (_commonTextureHandle.GetElementSize() % 4 == 0) + return false; + + return _commonTextureHandle.GetRowPitch((uint)level) + != _commonTextureHandle.GetElementSize() * (_commonTextureHandle.BaseWidth >> level); + } + + #region Private + private unsafe void EnsureLoaded() + { + if (_commonTextureHandle.GetData() != null) + return; + var loadResult = _commonTextureHandle.LoadImageData(null); + if (loadResult != KtxErrorCode.Success) + throw new TextureException($"Cannot load image data for KtxTexture. KtxErrorCode:{loadResult}"); + } + + private KtxTextureHandle _commonTextureHandle; + private ByteSize[]? _rowPitch; + #endregion +} diff --git a/Brutal.Texture/Ktx/KtxTextureException.cs b/Brutal.Texture/Ktx/KtxTextureException.cs new file mode 100644 index 0000000..029819b --- /dev/null +++ b/Brutal.Texture/Ktx/KtxTextureException.cs @@ -0,0 +1,15 @@ +using Brutal.KtxApi; +using Brutal.TextureApi; + +namespace Brutal.TextureApi.Ktx; + +public class KtxTextureException : TextureException +{ + public KtxTextureException(string message, KtxErrorCode? errorCode = null) + : base(message) + { + ErrorCode = errorCode; + } + + public KtxErrorCode? ErrorCode { get; } +} diff --git a/Brutal.Texture/Ktx/KtxTextureLoader.cs b/Brutal.Texture/Ktx/KtxTextureLoader.cs new file mode 100644 index 0000000..00b5b31 --- /dev/null +++ b/Brutal.Texture/Ktx/KtxTextureLoader.cs @@ -0,0 +1,94 @@ +using System.Collections.Frozen; +using System.Text; +using Brutal.KtxApi; +using Brutal.KtxApi.Abstractions; + +namespace Brutal.TextureApi.Ktx; + +public static partial class Loader +{ + /// + /// Loads a ktx texture from a file. + /// + /// Path to file + /// Options for the load + /// Texture that was loaded + /// If the texture could not be loaded. + /// e.g The SuperCompressionFamily was not compatible with the texture's data, + /// The file could not be found etc. + /// + public static KtxTexture LoadFromFile(string filePath, LoadSettings? loadOptions = null) + { + var loadSettings = loadOptions ?? LoadSettings.Default; + + var loadResult = KtxApi.KtxTexture.CreateFromNamedFile( + Encoding.UTF8.GetBytes(filePath), + LoadFlags(loadSettings), + out var textureHandle + ); + + if (loadResult != KtxErrorCode.Success) + { + textureHandle.Dispose(); + throw new KtxTextureException( + $"Failed to load texture from filePath \"{filePath}\". error:{loadResult}", + loadResult + ); + } + + if (!textureHandle.NeedsTranscoding()) + return new KtxTexture(textureHandle); + + var result = Transcode(textureHandle, loadSettings.SuperCompressionTranscodeFormat); + if (result == KtxErrorCode.Success) + return new KtxTexture(textureHandle); + + textureHandle.Dispose(); + throw new KtxTextureException($"Failed to transcode supercompressed texture. KtxErrorCode:{result}"); + } + + public static KtxTexture LoadFromMemory(ReadOnlySpan data, LoadSettings? loadData = null) + { + var loadSettings = loadData ?? new LoadSettings(); + + var createResult = KtxTexture2.CreateFromMemory(data, LoadFlags(loadSettings), out var texture2Handle); + if (createResult != KtxErrorCode.Success) + throw new KtxTextureException("Failed to create texture from memory", createResult); + + return new KtxTexture(texture2Handle); + } + + public class LoadSettings : TextureLoadSettings + { + public static LoadSettings Default { get; } = new(); + + /// + /// If the texture is supercompressed, this indicates the format to transcode it to on load. + /// + /// Defaults to KtxTranscodeFmt.Bc7Rgba + public KtxTranscodeFmt SuperCompressionTranscodeFormat = KtxTranscodeFmt.Bc7Rgba; + + /// + /// If true, does not immediately load the texture data. + /// Data is loaded when accessed. + /// This flag is ignored if the texture is super compressed and needs transcoding because transcoding + /// will happen when loading the file. + /// + public bool LazyLoad = false; + } + + private static KtxTextureCreateFlagBits LoadFlags(LoadSettings loadSettings) + { + return loadSettings.LazyLoad ? KtxTextureCreateFlagBits.NoFlags : KtxTextureCreateFlagBits.LoadImageDataBit; + } + + private static KtxErrorCode Transcode(KtxTextureHandle textureHandle, KtxTranscodeFmt transcodeFormat) + { + var ktxTexture2Handle = textureHandle.AsKtxTexture2Handle(); + var result = ktxTexture2Handle.TranscodeBasis(transcodeFormat, KtxTranscodeFlagBits.HighQuality); + return result; + } + + public static FrozenSet SupportedExtensions { get; } = + FrozenSet.Create(StringComparer.OrdinalIgnoreCase, [".ktx", ".ktx2"]); +} diff --git a/Brutal.Texture/Ktx/KtxTextureWriter.cs b/Brutal.Texture/Ktx/KtxTextureWriter.cs new file mode 100644 index 0000000..1e84c73 --- /dev/null +++ b/Brutal.Texture/Ktx/KtxTextureWriter.cs @@ -0,0 +1,34 @@ +using Brutal.KtxApi; + +namespace Brutal.TextureApi.Ktx; + +public static partial class Writer +{ + /// + /// Writes an ITexture + /// + /// + /// + /// + public static void SaveToFile(ITexture texture, string filePath) + { + var ktxTexture = texture as KtxTexture ?? Converter.ToV2KtxTexture(texture); + try + { + var saveResult = ktxTexture.SaveToFile(filePath); + if (saveResult != KtxErrorCode.Success) + throw new KtxTextureException($"Failed to save texture KtxErrorCode:{saveResult}", saveResult); + } + finally + { + if (texture is not KtxTexture) + ktxTexture.Destroy(); + } + } + + public static void SaveToFile(TextureDescriptor descriptor, string filePath) + { + var texture2Handle = Converter.ToKtxTexture2Handle(descriptor); + SaveToFile(new KtxTexture(texture2Handle), filePath); + } +} diff --git a/Brutal.Texture/Resources/ResourceTracker.cs b/Brutal.Texture/Resources/ResourceTracker.cs new file mode 100644 index 0000000..5125e82 --- /dev/null +++ b/Brutal.Texture/Resources/ResourceTracker.cs @@ -0,0 +1,141 @@ +using System.Collections.Concurrent; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.ConstrainedExecution; + +namespace Brutal.TextureApi; + +/// +/// Provides basic functionality for tracking resources and their disposal. Call Track() to record an instance +/// of a resource and Untrack() to stop tracking. +/// +/// If you wish to see what resources are still being tracked, along with a formatted stacktrace of when they +/// were tracked you can call . +/// +/// Tracking and untracking resource is threadsafe and can be done from different threads. ResourceTracker uses a +/// underneath and Interlocked calls to manage internal counts. +/// +/// +/// ARKB: This is a very rudimentary implementation just so I could see the usage of textures in KSA. This class is internal +/// for a reason and not directly usable outside Brutal for now. +/// Making this a CriticalFinalizerObject means its finaliser will run after normal finalisers, giving +/// a chance for things to Untrack first. +/// +internal class ResourceTracker : CriticalFinalizerObject + where T : notnull +{ + public readonly struct TrackedResource + { + public T Instance { get; init; } + public StackTrace? StackTrace { get; init; } + } + + public ResourceTracker() + { + _trackedInstances = new(new Comparer()); +#if RecordTrackingOverhead + _stopwatch = new Stopwatch(); +#endif + } + + public void Reset() + { + Interlocked.Exchange(ref _totalResourcesTracked, 0); + _trackedInstances.Clear(); + } + + /// + /// The total number of resource items tracked since the tracker was + /// created. + /// + public ulong TotalTrackedCount => Interlocked.Read(ref _totalResourcesTracked); + + /// + /// The number of resources currently being tracked. This is the difference of + /// TotalTrackedCount and the number of successfully Untrack()'ed resources. + /// + public ulong CurrentTrackedCount => (ulong)_trackedInstances.Count; + + /// + /// Track a new resource instance. The resource must NOT already be tracked. + /// + /// The object to track + /// Thrown if the resource is already being tracked + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + public void Track(in T resource) + { +#if RecordTrackingOverhead + var start = Stopwatch.GetTimestamp(); +#endif + if (!_trackedInstances.TryAdd(new() { Instance = resource, StackTrace = new StackTrace(1, true) }, 0)) + throw new InvalidOperationException($"Object of type {typeof(T).Name} already being tracked"); + Interlocked.Increment(ref _totalResourcesTracked); +#if RecordTrackingOverhead + _totalTimeSpentTracking += Stopwatch.GetTimestamp() - start; +#endif + } + + /// + /// Stop tracking a resource. + /// + /// The resource to stop tracking + /// Thrown if the resource isn't being tracked + [MethodImpl(MethodImplOptions.AggressiveOptimization)] + public void Untrack(in T resource) + { +#if RecordTrackingOverhead + var start = Stopwatch.GetTimestamp(); +#endif + if (!_trackedInstances.TryRemove(new() { Instance = resource }, out _)) + throw new InvalidOperationException($"Object {resource} not found in tracked instances."); +#if RecordTrackingOverhead + _totalTimeSpentTracking += Stopwatch.GetTimestamp() - start; +#endif + } + + /// + /// Return a collection of TrackedResource objects. + /// + /// + public IReadOnlyCollection CurrentResources() + { + return _trackedInstances.AsReadOnly().Keys; + } + + public class Comparer : IEqualityComparer + { + public bool Equals(TrackedResource x, TrackedResource y) + { + return ReferenceEquals(x.Instance, y.Instance); + } + + public int GetHashCode(TrackedResource obj) + { + return RuntimeHelpers.GetHashCode(obj.Instance); + } + } + +#if RecordTrackingOverhead + public void LogUnreleasedResources(int stackFrameCount) + { + Console.WriteLine( + $"Overhead: {_totalTimeSpentTracking / (float)Stopwatch.Frequency / _totalResourcesTracked * 1000000}us" + ); + + if (_trackedInstances.IsEmpty) + return; + foreach (var instance in _trackedInstances.Keys) + Console.WriteLine( + $"Allocated here: {(instance.StackTrace is not null ? StackTraceToString(instance.StackTrace, stackFrameCount) : "no trace")}" + ); + } +#endif + + private ulong _totalResourcesTracked = 0; + private readonly ConcurrentDictionary _trackedInstances; + +#if RecordTrackingOverhead + private readonly Stopwatch _stopwatch; + public long _totalTimeSpentTracking = 0; +#endif +} diff --git a/Brutal.Texture/Resources/StackTraceFormatting.cs b/Brutal.Texture/Resources/StackTraceFormatting.cs new file mode 100644 index 0000000..09f65e7 --- /dev/null +++ b/Brutal.Texture/Resources/StackTraceFormatting.cs @@ -0,0 +1,72 @@ +using System.Diagnostics; + +namespace Brutal.TextureApi +{ + internal static class StackTraceFormatting + { + /// + /// Takes a StackTrace and generates a string of the last X number of relevant stack frames. + /// + /// The output starts at the first non-Brutal namespace stack frame. + /// System functions (Those in System or Microsoft namespaces) are removed. + /// + /// The StackTrace to format + /// The number of relevant StackFrames to return in the string. + /// + public static IList FriendlyStackTraceStrings(StackTrace? stackTrace, int stackFrameCount) + { + if (stackTrace is null) + return ["No stack trace"]; + + var stackIndent = ""; + var stackTraceEntries = new List(); + var startStackFrameIndex = GetFirstClientStackFrameIndex(stackTrace); + + for (var i = startStackFrameIndex; i < stackTrace.FrameCount; i++) + { + var stackFrame = stackTrace.GetFrame(i)!; + if (IsIgnoredStackFrame(stackFrame)) + continue; + + stackTraceEntries.Add(BuildStackFrameString(stackIndent, stackFrame)); + if (--stackFrameCount == 0) + break; + + stackIndent += " "; + } + return stackTraceEntries; + } + + #region Private + + private static string BuildStackFrameString(string stackIndent, StackFrame stackFrame) + { + return $"{stackIndent}{stackFrame.GetMethod()!.Name} : {stackFrame.GetFileName()} : {stackFrame.GetFileLineNumber()}"; + } + + private static int GetFirstClientStackFrameIndex(StackTrace stackTrace) + { + for (var i = 0; i < stackTrace.FrameCount; i++) + { + var stackFrameNamespace = stackTrace.GetFrame(i)?.GetMethod()?.DeclaringType?.Namespace; + if (stackFrameNamespace is null) + continue; + + if (!stackFrameNamespace.StartsWith("Brutal")) // This is a temporary lame filter + return i; + } + return stackTrace.FrameCount; + } + + private static bool IsIgnoredStackFrame(StackFrame stackFrame) + { + if (!stackFrame.HasSource() || !stackFrame.HasMethod()) + return true; + + var name = stackFrame.GetMethod()?.DeclaringType?.Assembly.FullName; + return name is null || name.StartsWith("Microsoft") || name.StartsWith("System"); + } + + #endregion + } +} diff --git a/Brutal.Texture/ScopedTexture.cs b/Brutal.Texture/ScopedTexture.cs new file mode 100644 index 0000000..c091484 --- /dev/null +++ b/Brutal.Texture/ScopedTexture.cs @@ -0,0 +1,40 @@ +namespace Brutal.TextureApi +{ + public static partial class ITextureExtensions + { + /// + /// A wrapper class for an ITexture that can be used where IDisposables can; e.g. in + /// a using statement. + /// When Dispose() is called on an instance of ScopedTexture the ITexture + /// is unloaded through the static class. + /// + public ref struct ScopedTexture : IDisposable + { + public ScopedTexture(ITexture texture) + { + Texture = texture; + } + + public ITexture? Texture { get; private set; } + + public void Dispose() + { + if (Texture is null) + return; + + TextureLoader.Unload(Texture); + Texture = null; + } + } + + /// + /// Wraps an ITexture in an IDisposable + /// + /// The ITexture to wrap + /// The ScopedTexture wrapper + public static ScopedTexture Using(this ITexture texture) + { + return new ScopedTexture(texture); + } + } +} diff --git a/Brutal.Texture/Stb/StbDataTypeExtensions.cs b/Brutal.Texture/Stb/StbDataTypeExtensions.cs new file mode 100644 index 0000000..1fcb2db --- /dev/null +++ b/Brutal.Texture/Stb/StbDataTypeExtensions.cs @@ -0,0 +1,30 @@ +using Brutal.TextureApi; + +namespace Brutal.TextureApi.Stb; + +public static class StbDataTypeExtensions +{ + public static StbApi.Stb.DataType ToStbDataType(this TextureFormat format) + { + switch (format) + { + case TextureFormat.R8_UNorm: + case TextureFormat.R8G8_UNorm: + case TextureFormat.R8G8B8_UNorm: + case TextureFormat.R8G8B8A8_UNorm: + return StbApi.Stb.DataType._8Bit; + case TextureFormat.R16_UNorm: + case TextureFormat.R16G16_UNorm: + case TextureFormat.R16G16B16_UNorm: + case TextureFormat.R16G16B16A16_UNorm: + return StbApi.Stb.DataType._16Bit; + case TextureFormat.R32_SFloat: + case TextureFormat.R32G32_SFloat: + case TextureFormat.R32G32B32_SFloat: + case TextureFormat.R32G32B32A32_SFloat: + return StbApi.Stb.DataType.Float; + default: + throw new ArgumentOutOfRangeException(nameof(format), format, "TextureFormat not supported by Stb"); + } + } +} diff --git a/Brutal.Texture/Stb/StbTexture.cs b/Brutal.Texture/Stb/StbTexture.cs new file mode 100644 index 0000000..e5dfd58 --- /dev/null +++ b/Brutal.Texture/Stb/StbTexture.cs @@ -0,0 +1,73 @@ +using System.Diagnostics; +using Brutal.Numerics; +using Brutal.Pointers.Extensions; + +namespace Brutal.TextureApi.Stb; + +public abstract partial class StbTexture : ITexture +{ + internal struct CreateInfo + { + internal required int2 Extent; + internal required int Channels; + internal required int BytesPerChannel; + } + + #region ITexture + public unsafe Span Data => new(GetDataPointer(), ElementCount.Of(_dataSize)); + public TexelCount3 Extent => new(NativeInfo.Extent.X, NativeInfo.Extent.Y, 1); + public abstract TextureFormat Format { get; } + public int LayerCount => 1; + public int LevelCount => 1; + public int FaceCount => 1; + public bool IsCubemap => false; + public bool IsArray => false; + public int DimensionCount => 2; + + public ByteSize RowPitch(int level) + { + if (level < 0 || level >= LevelCount) + throw new ArgumentOutOfRangeException(nameof(level), level, $"Level must be in range [0, {LevelCount})"); + return _rowPitch; + } + + /// + /// Returns the bytes that the image takes up. + /// + /// Must be 0 + /// Must be 0 + /// Must be 0 + /// + public unsafe Span ImageData(int level, int layer, int face) + { + if (level != 0 || layer != 0 || face != 0) + throw new TextureException($"level, layer and face must all be 0 for STB textures"); + return new Span(Data.AsPointer(), Data.Length); + } + + #endregion + + public int Channels => NativeInfo.Channels; + + public void Destroy() + { + FreeNativeResources(); + } + + internal readonly CreateInfo NativeInfo; + protected abstract unsafe byte* GetDataPointer(); + private readonly ByteSize _dataSize; + private readonly ByteSize _rowPitch; + + internal StbTexture(CreateInfo info) + { + Debug.Assert(FaceCount == 1 && LevelCount == 1 && LayerCount == 1); + NativeInfo = info; + _dataSize = ByteSize.Of( + NativeInfo.Extent.X * NativeInfo.Extent.Y * NativeInfo.Channels * NativeInfo.BytesPerChannel + ); + _rowPitch = ByteSize.Of(NativeInfo.Extent.X * NativeInfo.Channels * NativeInfo.BytesPerChannel); + } + + protected abstract void FreeNativeResources(); +} diff --git a/Brutal.Texture/Stb/StbTexture16.cs b/Brutal.Texture/Stb/StbTexture16.cs new file mode 100644 index 0000000..91ea948 --- /dev/null +++ b/Brutal.Texture/Stb/StbTexture16.cs @@ -0,0 +1,52 @@ +using Brutal.Numerics; +using Brutal.StbApi; +using Brutal.TextureApi; + +namespace Brutal.TextureApi.Stb; + +public class StbTexture16 : StbTexture +{ + internal StbTexture16(StbImage16 image) + : base( + new CreateInfo + { + Extent = new int2(image.Width, image.Height), + Channels = image.Channels, + BytesPerChannel = 2, + } + ) + { + _image = image; + } + + public override TextureFormat Format + { + get + { + return _image.Channels switch + { + 1 => TextureFormat.R16_UNorm, + 2 => TextureFormat.R16G16_UNorm, + 3 => TextureFormat.R16G16B16_UNorm, + 4 => TextureFormat.R16G16B16A16_UNorm, + _ => throw new ArgumentOutOfRangeException(), + }; + } + } + + protected override unsafe byte* GetDataPointer() + { + return (byte*)_image.Data; + } + + protected override void FreeNativeResources() + { + if (_image.IsNotNull()) + { + _image.Dispose(); + _image = default; + } + } + + private StbImage16 _image; +} diff --git a/Brutal.Texture/Stb/StbTexture8.cs b/Brutal.Texture/Stb/StbTexture8.cs new file mode 100644 index 0000000..b9f4073 --- /dev/null +++ b/Brutal.Texture/Stb/StbTexture8.cs @@ -0,0 +1,52 @@ +using Brutal.Numerics; +using Brutal.StbApi; +using Brutal.TextureApi; + +namespace Brutal.TextureApi.Stb; + +public class StbTexture8 : StbTexture +{ + internal StbTexture8(StbImage8 image) + : base( + new CreateInfo + { + Extent = new int2(image.Width, image.Height), + Channels = image.Channels, + BytesPerChannel = 1, + } + ) + { + _image = image; + } + + public override TextureFormat Format + { + get + { + return _image.Channels switch + { + 1 => TextureFormat.R8_UNorm, + 2 => TextureFormat.R8G8_UNorm, + 3 => TextureFormat.R8G8B8_UNorm, + 4 => TextureFormat.R8G8B8A8_UNorm, + _ => throw new ArgumentOutOfRangeException(), + }; + } + } + + protected override unsafe byte* GetDataPointer() + { + return _image.Data; + } + + protected override void FreeNativeResources() + { + if (_image.IsNotNull()) + { + _image.Dispose(); + _image = default; + } + } + + private StbImage8 _image; +} diff --git a/Brutal.Texture/Stb/StbTextureException.cs b/Brutal.Texture/Stb/StbTextureException.cs new file mode 100644 index 0000000..673c8bb --- /dev/null +++ b/Brutal.Texture/Stb/StbTextureException.cs @@ -0,0 +1,7 @@ +namespace Brutal.TextureApi.Stb; + +public class StbTextureException : TextureException +{ + public StbTextureException(string message) + : base(message) { } +} diff --git a/Brutal.Texture/Stb/StbTextureF.cs b/Brutal.Texture/Stb/StbTextureF.cs new file mode 100644 index 0000000..1b1d88a --- /dev/null +++ b/Brutal.Texture/Stb/StbTextureF.cs @@ -0,0 +1,52 @@ +using Brutal.Numerics; +using Brutal.StbApi; +using Brutal.TextureApi; + +namespace Brutal.TextureApi.Stb; + +public class StbTextureF : StbTexture +{ + internal StbTextureF(StbImageF image) + : base( + new CreateInfo + { + Extent = new int2(image.Width, image.Height), + Channels = image.Channels, + BytesPerChannel = 4, + } + ) + { + _image = image; + } + + public override TextureFormat Format + { + get + { + return _image.Channels switch + { + 1 => TextureFormat.R32_SFloat, + 2 => TextureFormat.R32G32_SFloat, + 3 => TextureFormat.R32G32B32_SFloat, + 4 => TextureFormat.R32G32B32A32_SFloat, + _ => throw new ArgumentOutOfRangeException(), + }; + } + } + + protected override unsafe byte* GetDataPointer() + { + return (byte*)_image.Data; + } + + protected override void FreeNativeResources() + { + if (_image.IsNotNull()) + { + _image.Dispose(); + _image = default; + } + } + + private StbImageF _image; +} diff --git a/Brutal.Texture/Stb/StbTextureLoader.cs b/Brutal.Texture/Stb/StbTextureLoader.cs new file mode 100644 index 0000000..ae844f3 --- /dev/null +++ b/Brutal.Texture/Stb/StbTextureLoader.cs @@ -0,0 +1,178 @@ +using System.Collections.Frozen; +using Brutal.Pointers.Extensions; + +namespace Brutal.TextureApi.Stb; + +public static partial class Loader +{ + public static StbTexture LoadFromFile(string filePath, LoadSettings? loadInfo = null) + { + // Load settings can try force data type, otherwise use file's native data type + var dataType = GetForceDataType(loadInfo) ?? GetNativeDataType(filePath); + + // Load settings can try force channel count, otherwise use file's native channel count + var channelCount = GetForceChannels(loadInfo) ?? 0; + + switch (dataType) + { + case StbApi.Stb.DataType._8Bit: + { + var handle = StbApi.Stb.Load(filePath, channelCount); + if (handle.IsNotNull()) + { + return new StbTexture8(handle); + } + break; + } + case StbApi.Stb.DataType._16Bit: + { + var handle = StbApi.Stb.Load16(filePath, channelCount); + if (handle.IsNotNull()) + { + return new StbTexture16(handle); + } + break; + } + case StbApi.Stb.DataType.Float: + { + var handle = StbApi.Stb.LoadF(filePath, channelCount); + if (handle.IsNotNull()) + { + return new StbTextureF(handle); + } + break; + } + } + + throw new StbTextureReadException( + $"Failed to load texture from filePath \"{filePath}\", failure reason: {(StbApi.Stb.TryGetFailureReason(out var reason) ? reason : "Unknown")}" + ); + } + + public static unsafe StbTexture LoadFromMemory(ReadOnlySpan data, LoadSettings? loadInfo = null) + { + // Load settings can try force data type, otherwise use file's native data type + var dataType = GetForceDataType(loadInfo) ?? GetNativeDataType(data); + + // Load settings can try force channel count, otherwise use file's native channel count + var channelCount = GetForceChannels(loadInfo) ?? 0; + + switch (dataType) + { + case StbApi.Stb.DataType._8Bit: + { + var handle = StbApi.Stb.LoadFromMemory(data, channelCount); + if (handle.IsNotNull()) + { + return new StbTexture8(handle); + } + break; + } + case StbApi.Stb.DataType._16Bit: + { + var handle = StbApi.Stb.Load16FromMemory(data, channelCount); + if (handle.IsNotNull()) + { + return new StbTexture16(handle); + } + break; + } + case StbApi.Stb.DataType.Float: + { + var handle = StbApi.Stb.LoadFFromMemory(data, channelCount); + if (handle.IsNotNull()) + { + return new StbTextureF(handle); + } + + break; + } + } + + throw new StbTextureReadException( + $"Failed to load texture from data at 0x{(nint)data.AsPointer()}, failure reason: {(StbApi.Stb.TryGetFailureReason(out var reason) ? reason : "Unknown")}" + ); + } + + public class LoadSettings : TextureLoadSettings + { + /// + /// Force StbTextureFactory to load image data into a texture of the target data type + /// + /// + /// If set, the factory will perform conversion into the target type, using scaling between 8-16 bit + /// and/or HDR<=>LDR conversion as required. + /// + /// For example, loading a .hdr file as DataType._16bit will firstly load + /// float data from the source, then use LDR to HDR conversion into 8 bit, then upscale to 16 bit. + /// + /// If not set, StbTextureFactory load functions will default to loading textures using their 'native' data type. + /// + public StbApi.Stb.DataType? ForceDataType; + + /// + /// Force StbTextureFactory to load image data into a texture with the target channel count. + /// + /// + /// If set, the factory will add or remove channels when loading the data. + /// + /// Any added color channels (1-3) will be zeroed, alpha channels (4) will be set to max value. + /// + public int? ForceChannels; + + /// + /// A LoadSettings preset which will force StbTextureFactory to load textures into R8G8B8A8_UNorm format + /// + public static readonly LoadSettings ForceRgba8 = new() + { + ForceChannels = 4, + ForceDataType = StbApi.Stb.DataType._8Bit, + }; + } + + #region Private + private static StbApi.Stb.DataType? GetForceDataType(LoadSettings? loadInfo) + { + var settings = loadInfo ?? new(); + return settings.ForceDataType; + } + + private static int? GetForceChannels(LoadSettings? loadInfo) + { + var settings = loadInfo ?? new LoadSettings(); + return settings.ForceChannels; + } + + private static StbApi.Stb.DataType GetNativeDataType(string filePath) + { + if (StbApi.Stb.Is16Bit(filePath)) + return StbApi.Stb.DataType._16Bit; + + if (StbApi.Stb.IsHdr(filePath)) + return StbApi.Stb.DataType.Float; + + return StbApi.Stb.DataType._8Bit; + } + + private static StbApi.Stb.DataType GetNativeDataType(ReadOnlySpan data) + { + if (StbApi.Stb.Is16BitFromMemory(data)) + return StbApi.Stb.DataType._16Bit; + + if (StbApi.Stb.IsHdrFromMemory(data)) + return StbApi.Stb.DataType.Float; + + return StbApi.Stb.DataType._8Bit; + } + #endregion + + // The full set of formats stb_image can DECODE. This is a superset of what stb_image_write + // can ENCODE (see Stb.Writer.SupportedExtensions) - formats like .gif/.psd/.pic/.ppm/.pgm + // are load-only. stb selects its decoder from the file's content, not its extension, so this + // set only governs which extensions TextureLoader dispatches to the Stb loader. + public static FrozenSet SupportedExtensions { get; } = + FrozenSet.Create( + StringComparer.OrdinalIgnoreCase, + [".png", ".jpg", ".jpeg", ".tga", ".bmp", ".hdr", ".psd", ".gif", ".pic", ".ppm", ".pgm"] + ); +} diff --git a/Brutal.Texture/Stb/StbTextureReadException.cs b/Brutal.Texture/Stb/StbTextureReadException.cs new file mode 100644 index 0000000..ae17fa0 --- /dev/null +++ b/Brutal.Texture/Stb/StbTextureReadException.cs @@ -0,0 +1,10 @@ +namespace Brutal.TextureApi.Stb; + +/// +/// Thrown when the StbTextureLoaded encounters a fatal error. +/// +public class StbTextureReadException : StbTextureException +{ + public StbTextureReadException(string message) + : base(message) { } +} diff --git a/Brutal.Texture/Stb/StbTextureWriter.cs b/Brutal.Texture/Stb/StbTextureWriter.cs new file mode 100644 index 0000000..3c1347a --- /dev/null +++ b/Brutal.Texture/Stb/StbTextureWriter.cs @@ -0,0 +1,158 @@ +using System.Collections.Frozen; +using CommunityToolkit.HighPerformance; + +namespace Brutal.TextureApi.Stb; + +public class StbTextureWriteException(string message) : Exception(message); + +public static partial class Writer +{ + // The formats stb_image_write can ENCODE. This is the writable subset of the formats the + // Stb loader can decode (see Stb.Loader.SupportedExtensions). TextureWriter dispatches on + // this set so load-only formats are rejected at the dispatch layer rather than reaching the + // SaveToFile switch below. + public static FrozenSet SupportedExtensions { get; } = + FrozenSet.Create(StringComparer.OrdinalIgnoreCase, [".png", ".jpg", ".jpeg", ".hdr", ".tga", ".bmp"]); + + public static void SaveToFile(TextureDescriptor descriptor, string filePath, JpegWriteSettings? saveOptions = null) + { + SaveToFile( + filePath, + descriptor.Format.ToStbDataType(), + descriptor.Extent.X, + descriptor.Extent.Y, + NumChannels(descriptor.Format), + descriptor.Data, + saveOptions + ); + } + + public static void SaveToFile(ITexture texture, string filePath, JpegWriteSettings? saveInfo = null) + { + if (texture is StbTexture stbTexture) + { + SaveToFile( + filePath, + texture.Format.ToStbDataType(), + texture.Width, + texture.Height, + stbTexture.Channels, + texture.Data, + saveInfo + ); + } + else + { + SaveToFile( + filePath, + texture.Format.ToStbDataType(), + texture.Width, + texture.Height, + NumChannels(texture.Format), + texture.Data, + saveInfo + ); + } + } + + internal static void SaveToFile( + string filePath, + StbApi.Stb.DataType dataType, + int width, + int height, + int channels, + ReadOnlySpan data, + JpegWriteSettings? saveInfo + ) + { + var extension = Path.GetExtension(filePath.ToLowerInvariant().AsSpan()); + + ValidateDataType(dataType, extension); + + bool result; + switch (extension) + { + case ".png": + { + var stride = channels * width; + result = StbApi.Stb.WritePng(filePath, width, height, channels, data, stride); + break; + } + case ".bmp": + result = StbApi.Stb.WriteBmp(filePath, width, height, channels, data); + break; + case ".tga": + result = StbApi.Stb.WriteTga(filePath, width, height, channels, data); + break; + case ".jpg" or ".jpeg": + { + var settings = saveInfo ?? JpegWriteSettings.Default; + var quality = settings.Quality; + + result = StbApi.Stb.WriteJpg(filePath, width, height, channels, data, quality); + break; + } + case ".hdr": + result = StbApi.Stb.WriteHdr(filePath, width, height, channels, data.Cast()); + break; + default: + throw new StbTextureWriteException($"Unsupported file extension {extension}"); + } + + if (result) + return; + + var failureReason = (StbApi.Stb.TryGetFailureReason(out var reason) ? reason : "Unknown"); + throw new StbTextureWriteException( + $"Failed to write texture to file at path: {filePath}, reason: {failureReason}" + ); + } + + private static void ValidateDataType(StbApi.Stb.DataType dataType, ReadOnlySpan extension) + { + // Validate that we can write this format to the desired file type. + // Stb only supports writing from 8 bit data, with the exception of .hdr which requires float data + if (extension is ".hdr" && dataType is not StbApi.Stb.DataType.Float) + throw new StbTextureWriteException("Textures can only be saved as .hdr if they are of a float-type format"); + + if (dataType is not StbApi.Stb.DataType._8Bit) + throw new StbTextureWriteException(".png, .bmp, .tga, .jpg, .jpeg only support 8-bit textures"); + } + + public class JpegWriteSettings + { + public const int DEFAULT_QUALITY = 90; + + /// + /// The quality value to use in jpeg write compression, 1 lowest => 100 highest + /// + public int Quality; + + public static JpegWriteSettings Default => new() { Quality = DEFAULT_QUALITY }; + } + + private static int NumChannels(TextureFormat format) + { + switch (format) + { + case TextureFormat.R8_UNorm: + case TextureFormat.R16_UNorm: + case TextureFormat.R32_SFloat: + return 1; + case TextureFormat.R8G8_UNorm: + case TextureFormat.R16G16_UNorm: + case TextureFormat.R32G32_SFloat: + return 2; + case TextureFormat.R8G8B8_UNorm: + case TextureFormat.R16G16B16_UNorm: + case TextureFormat.R32G32B32_SFloat: + return 3; + case TextureFormat.R8G8B8A8_UNorm: + case TextureFormat.R16G16B16A16_UNorm: + case TextureFormat.R32G32B32A32_SFloat: + return 4; + default: + throw new ArgumentOutOfRangeException(nameof(format), format, "TextureFormat not supported by Stb"); + } + } +} diff --git a/Brutal.Texture/TexelCount3.cs b/Brutal.Texture/TexelCount3.cs new file mode 100644 index 0000000..3b55ddb --- /dev/null +++ b/Brutal.Texture/TexelCount3.cs @@ -0,0 +1,8 @@ +namespace Brutal.TextureApi; + +/// +/// Represents 3 dimensions of counts of texels. +/// No semantics are applied to these values. Zero and negative values are valid +/// inside TexelCount3 even though they are not w.r.t. a mip level texture +/// +public record struct TexelCount3(int X, int Y, int Z) { } diff --git a/Brutal.Texture/TextureDescriptor.cs b/Brutal.Texture/TextureDescriptor.cs new file mode 100644 index 0000000..ed75400 --- /dev/null +++ b/Brutal.Texture/TextureDescriptor.cs @@ -0,0 +1,28 @@ +namespace Brutal.TextureApi; + +/// +/// Transient data which can be used to save a texture to file without requiring an ITexture wrapper +/// +public ref struct TextureDescriptor +{ + /// + public required ReadOnlySpan Data; + + /// + public required TextureFormat Format; + + /// + public required TexelCount3 Extent; + + /// + public required int LayerCount; + + /// + public required int MipmapCount; + + /// + public required int FaceCount; + + /// + public required bool IsCubemap; +} diff --git a/Brutal.Texture/TextureException.cs b/Brutal.Texture/TextureException.cs new file mode 100644 index 0000000..d20ea79 --- /dev/null +++ b/Brutal.Texture/TextureException.cs @@ -0,0 +1,7 @@ +namespace Brutal.TextureApi; + +/// +/// Exception thrown by some Texture functions +/// +/// +public class TextureException(string message) : Exception(message); diff --git a/Brutal.Texture/TextureFormat.cs b/Brutal.Texture/TextureFormat.cs new file mode 100644 index 0000000..3ca402a --- /dev/null +++ b/Brutal.Texture/TextureFormat.cs @@ -0,0 +1,1261 @@ +namespace Brutal.TextureApi; + +/// +/// Describes the format of a texture's image data. You can convert a TextureFormat into +/// a Vulkan format with textureFormat.ToVkFormat() +/// +/// +/// This is ported from Vulkan's VkFormat enum, and values should match 1:1 +/// +public enum TextureFormat +{ + /// + /// Specifies that the format is not specified. + /// + Undefined = 0, + + /// + /// Specifies a two-component, 8-bit packed unsigned normalized format that has a 4-bit R component in bits 4..7, and a 4-bit G component in bits 0..3. + /// + R4G4_UNorm_Pack8 = 1, + + /// + /// Specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit R component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit B component in bits 4..7, and a 4-bit A component in bits 0..3. + /// + R4G4B4A4_UNorm_Pack16 = 2, + + /// + /// Specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit B component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit R component in bits 4..7, and a 4-bit A component in bits 0..3. + /// + B4G4R4A4_UNorm_Pack16 = 3, + + /// + /// Specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit B component in bits 0..4. + /// + R5G6B5_UNorm_Pack16 = 4, + + /// + /// Specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit R component in bits 0..4. + /// + B5G6R5_UNorm_Pack16 = 5, + + /// + /// Specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit B component in bits 1..5, and a 1-bit A component in bit 0. + /// + R5G5B5A1_UNorm_Pack16 = 6, + + /// + /// Specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit R component in bits 1..5, and a 1-bit A component in bit 0. + /// + B5G5R5A1_UNorm_Pack16 = 7, + + /// + /// Specifies a four-component, 16-bit packed unsigned normalized format that has a 1-bit A component in bit 15, a 5-bit R component in bits 10..14, a 5-bit G component in bits 5..9, and a 5-bit B component in bits 0..4. + /// + A1R5G5B5_UNorm_Pack16 = 8, + + /// + /// Specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component. + /// + R8_UNorm = 9, + + /// + /// Specifies a one-component, 8-bit signed normalized format that has a single 8-bit R component. + /// + R8_SNorm = 10, + + /// + /// Specifies a one-component, 8-bit unsigned scaled integer format that has a single 8-bit R component. + /// + R8_UScaled = 11, + + /// + /// Specifies a one-component, 8-bit signed scaled integer format that has a single 8-bit R component. + /// + R8_SScaled = 12, + + /// + /// Specifies a one-component, 8-bit unsigned integer format that has a single 8-bit R component. + /// + R8_UInt = 13, + + /// + /// Specifies a one-component, 8-bit signed integer format that has a single 8-bit R component. + /// + R8_SInt = 14, + + /// + /// Specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component stored with sRGB nonlinear encoding. + /// + R8_SRGB = 15, + + /// + /// Specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8_UNorm = 16, + + /// + /// Specifies a two-component, 16-bit signed normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8_SNorm = 17, + + /// + /// Specifies a two-component, 16-bit unsigned scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8_UScaled = 18, + + /// + /// Specifies a two-component, 16-bit signed scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8_SScaled = 19, + + /// + /// Specifies a two-component, 16-bit unsigned integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8_UInt = 20, + + /// + /// Specifies a two-component, 16-bit signed integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8_SInt = 21, + + /// + /// Specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G component stored with sRGB nonlinear encoding in byte 1. + /// + R8G8_SRGB = 22, + + /// + /// Specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8_UNorm = 23, + + /// + /// Specifies a three-component, 24-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8_SNorm = 24, + + /// + /// Specifies a three-component, 24-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8_UScaled = 25, + + /// + /// Specifies a three-component, 24-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8_SScaled = 26, + + /// + /// Specifies a three-component, 24-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8_UInt = 27, + + /// + /// Specifies a three-component, 24-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8_SInt = 28, + + /// + /// Specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit B component stored with sRGB nonlinear encoding in byte 2. + /// + R8G8B8_SRGB = 29, + + /// + /// Specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8_UNorm = 30, + + /// + /// Specifies a three-component, 24-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8_SNorm = 31, + + /// + /// Specifies a three-component, 24-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8_UScaled = 32, + + /// + /// Specifies a three-component, 24-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8_SScaled = 33, + + /// + /// Specifies a three-component, 24-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8_UInt = 34, + + /// + /// Specifies a three-component, 24-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8_SInt = 35, + + /// + /// Specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit R component stored with sRGB nonlinear encoding in byte 2. + /// + B8G8R8_SRGB = 36, + + /// + /// Specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_UNorm = 37, + + /// + /// Specifies a four-component, 32-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_SNorm = 38, + + /// + /// Specifies a four-component, 32-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_UScaled = 39, + + /// + /// Specifies a four-component, 32-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_SScaled = 40, + + /// + /// Specifies a four-component, 32-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_UInt = 41, + + /// + /// Specifies a four-component, 32-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_SInt = 42, + + /// + /// Specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit B component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8_SRGB = 43, + + /// + /// Specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_UNorm = 44, + + /// + /// Specifies a four-component, 32-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_SNorm = 45, + + /// + /// Specifies a four-component, 32-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_UScaled = 46, + + /// + /// Specifies a four-component, 32-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_SScaled = 47, + + /// + /// Specifies a four-component, 32-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_UInt = 48, + + /// + /// Specifies a four-component, 32-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_SInt = 49, + + /// + /// Specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit R component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8_SRGB = 50, + + /// + /// Specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8_UNorm_Pack32 = 51, + + /// + /// Specifies a four-component, 32-bit packed signed normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8_SNorm_Pack32 = 52, + + /// + /// Specifies a four-component, 32-bit packed unsigned scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8_UScaled_Pack32 = 53, + + /// + /// Specifies a four-component, 32-bit packed signed scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8_SScaled_Pack32 = 54, + + /// + /// Specifies a four-component, 32-bit packed unsigned integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8_UInt_Pack32 = 55, + + /// + /// Specifies a four-component, 32-bit packed signed integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8_SInt_Pack32 = 56, + + /// + /// Specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component stored with sRGB nonlinear encoding in bits 16..23, an 8-bit G component stored with sRGB nonlinear encoding in bits 8..15, and an 8-bit R component stored with sRGB nonlinear encoding in bits 0..7. + /// + A8B8G8R8_SRGB_Pack32 = 57, + + /// + /// Specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10_UNorm_Pack32 = 58, + + /// + /// Specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10_SNorm_Pack32 = 59, + + /// + /// Specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10_UScaled_Pack32 = 60, + + /// + /// Specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10_SScaled_Pack32 = 61, + + /// + /// Specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10_UInt_Pack32 = 62, + + /// + /// Specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10_SInt_Pack32 = 63, + + /// + /// Specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10_UNorm_Pack32 = 64, + + /// + /// Specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10_SNorm_Pack32 = 65, + + /// + /// Specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10_UScaled_Pack32 = 66, + + /// + /// Specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10_SScaled_Pack32 = 67, + + /// + /// Specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10_UInt_Pack32 = 68, + + /// + /// Specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10_SInt_Pack32 = 69, + + /// + /// Specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit R component. + /// + R16_UNorm = 70, + + /// + /// Specifies a one-component, 16-bit signed normalized format that has a single 16-bit R component. + /// + R16_SNorm = 71, + + /// + /// Specifies a one-component, 16-bit unsigned scaled integer format that has a single 16-bit R component. + /// + R16_UScaled = 72, + + /// + /// Specifies a one-component, 16-bit signed scaled integer format that has a single 16-bit R component. + /// + R16_SScaled = 73, + + /// + /// Specifies a one-component, 16-bit unsigned integer format that has a single 16-bit R component. + /// + R16_UInt = 74, + + /// + /// Specifies a one-component, 16-bit signed integer format that has a single 16-bit R component. + /// + R16_SInt = 75, + + /// + /// Specifies a one-component, 16-bit signed floating-point format that has a single 16-bit R component. + /// + R16_SFloat = 76, + + /// + /// Specifies a two-component, 32-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_UNorm = 77, + + /// + /// Specifies a two-component, 32-bit signed normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_SNorm = 78, + + /// + /// Specifies a two-component, 32-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_UScaled = 79, + + /// + /// Specifies a two-component, 32-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_SScaled = 80, + + /// + /// Specifies a two-component, 32-bit unsigned integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_UInt = 81, + + /// + /// Specifies a two-component, 32-bit signed integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_SInt = 82, + + /// + /// Specifies a two-component, 32-bit signed floating-point format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16_SFloat = 83, + + /// + /// Specifies a three-component, 48-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_UNorm = 84, + + /// + /// Specifies a three-component, 48-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_SNorm = 85, + + /// + /// Specifies a three-component, 48-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_UScaled = 86, + + /// + /// Specifies a three-component, 48-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_SScaled = 87, + + /// + /// Specifies a three-component, 48-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_UInt = 88, + + /// + /// Specifies a three-component, 48-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_SInt = 89, + + /// + /// Specifies a three-component, 48-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16_SFloat = 90, + + /// + /// Specifies a four-component, 64-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_UNorm = 91, + + /// + /// Specifies a four-component, 64-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_SNorm = 92, + + /// + /// Specifies a four-component, 64-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_UScaled = 93, + + /// + /// Specifies a four-component, 64-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_SScaled = 94, + + /// + /// Specifies a four-component, 64-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_UInt = 95, + + /// + /// Specifies a four-component, 64-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_SInt = 96, + + /// + /// Specifies a four-component, 64-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16_SFloat = 97, + + /// + /// Specifies a one-component, 32-bit unsigned integer format that has a single 32-bit R component. + /// + R32_UInt = 98, + + /// + /// Specifies a one-component, 32-bit signed integer format that has a single 32-bit R component. + /// + R32_SInt = 99, + + /// + /// Specifies a one-component, 32-bit signed floating-point format that has a single 32-bit R component. + /// + R32_SFloat = 100, + + /// + /// Specifies a two-component, 64-bit unsigned integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7. + /// + R32G32_UInt = 101, + + /// + /// Specifies a two-component, 64-bit signed integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7. + /// + R32G32_SInt = 102, + + /// + /// Specifies a two-component, 64-bit signed floating-point format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7. + /// + R32G32_SFloat = 103, + + /// + /// Specifies a three-component, 96-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. + /// + R32G32B32_UInt = 104, + + /// + /// Specifies a three-component, 96-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. + /// + R32G32B32_SInt = 105, + + /// + /// Specifies a three-component, 96-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. + /// + R32G32B32_SFloat = 106, + + /// + /// Specifies a four-component, 128-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15. + /// + R32G32B32A32_UInt = 107, + + /// + /// Specifies a four-component, 128-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15. + /// + R32G32B32A32_SInt = 108, + + /// + /// Specifies a four-component, 128-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15. + /// + R32G32B32A32_SFloat = 109, + + /// + /// Specifies a one-component, 64-bit unsigned integer format that has a single 64-bit R component. + /// + R64_UInt = 110, + + /// + /// Specifies a one-component, 64-bit signed integer format that has a single 64-bit R component. + /// + R64_SInt = 111, + + /// + /// Specifies a one-component, 64-bit signed floating-point format that has a single 64-bit R component. + /// + R64_SFloat = 112, + + /// + /// Specifies a two-component, 128-bit unsigned integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15. + /// + R64G64_UInt = 113, + + /// + /// Specifies a two-component, 128-bit signed integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15. + /// + R64G64_SInt = 114, + + /// + /// Specifies a two-component, 128-bit signed floating-point format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15. + /// + R64G64_SFloat = 115, + + /// + /// Specifies a three-component, 192-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23. + /// + R64G64B64_UInt = 116, + + /// + /// Specifies a three-component, 192-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23. + /// + R64G64B64_SInt = 117, + + /// + /// Specifies a three-component, 192-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23. + /// + R64G64B64_SFloat = 118, + + /// + /// Specifies a four-component, 256-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31. + /// + R64G64B64A64_UInt = 119, + + /// + /// Specifies a four-component, 256-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31. + /// + R64G64B64A64_SInt = 120, + + /// + /// Specifies a four-component, 256-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31. + /// + R64G64B64A64_SFloat = 121, + + /// + /// Specifies a three-component, 32-bit packed unsigned floating-point format that has a 10-bit B component in bits 22..31, an 11-bit G component in bits 11..21, an 11-bit R component in bits 0..10. See here and here. + /// + B10G11R11_UFloat_Pack32 = 122, + + /// + /// Specifies a three-component, 32-bit packed unsigned floating-point format that has a 5-bit shared exponent in bits 27..31, a 9-bit B component mantissa in bits 18..26, a 9-bit G component mantissa in bits 9..17, and a 9-bit R component mantissa in bits 0..8. + /// + E5B9G9R9_UFloat_Pack32 = 123, + + /// + /// Specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit depth component. + /// + D16_UNorm = 124, + + /// + /// Specifies a two-component, 32-bit format that has 24 unsigned normalized bits in the depth component and, optionally:, 8 bits that are unused. + /// + X8D24_UNorm_Pack32 = 125, + + /// + /// Specifies a one-component, 32-bit signed floating-point format that has 32 bits in the depth component. + /// + D32_SFloat = 126, + + /// + /// Specifies a one-component, 8-bit unsigned integer format that has 8 bits in the stencil component. + /// + S8_UInt = 127, + + /// + /// Specifies a two-component, 24-bit format that has 16 unsigned normalized bits in the depth component and 8 unsigned integer bits in the stencil component. + /// + D16_UNormS8_UInt = 128, + + /// + /// Specifies a two-component, 32-bit packed format that has 8 unsigned integer bits in the stencil component, and 24 unsigned normalized bits in the depth component. + /// + D24_UNormS8_UInt = 129, + + /// + /// Specifies a two-component format that has 32 signed float bits in the depth component and 8 unsigned integer bits in the stencil component. There are optionally: 24 bits that are unused. + /// + D32_SFloatS8_UInt = 130, + + /// + /// Specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque. + /// + BC1Rgb_UNorm_Block = 131, + + /// + /// Specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque. + /// + BC1Rgb_SRGB_Block = 132, + + /// + /// Specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha. + /// + BC1Rgba_UNorm_Block = 133, + + /// + /// Specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha. + /// + BC1Rgba_SRGB_Block = 134, + + /// + /// Specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values. + /// + BC2_UNorm_Block = 135, + + /// + /// Specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding. + /// + BC2_SRGB_Block = 136, + + /// + /// Specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values. + /// + BC3_UNorm_Block = 137, + + /// + /// Specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding. + /// + BC3_SRGB_Block = 138, + + /// + /// Specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized red texel data. + /// + BC4_UNorm_Block = 139, + + /// + /// Specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized red texel data. + /// + BC4_SNorm_Block = 140, + + /// + /// Specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + BC5_UNorm_Block = 141, + + /// + /// Specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + BC5_SNorm_Block = 142, + + /// + /// Specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned floating-point RGB texel data. + /// + BC6HUFloat_Block = 143, + + /// + /// Specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of signed floating-point RGB texel data. + /// + BC6H_SFloat_Block = 144, + + /// + /// Specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data. + /// + BC7_UNorm_Block = 145, + + /// + /// Specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + BC7_SRGB_Block = 146, + + /// + /// Specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque. + /// + ETC2R8G8B8_UNorm_Block = 147, + + /// + /// Specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque. + /// + ETC2R8G8B8_SRGB_Block = 148, + + /// + /// Specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha. + /// + ETC2R8G8B8A1_UNorm_Block = 149, + + /// + /// Specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha. + /// + ETC2R8G8B8A1_SRGB_Block = 150, + + /// + /// Specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values. + /// + ETC2R8G8B8A8_UNorm_Block = 151, + + /// + /// Specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding applied. + /// + ETC2R8G8B8A8_SRGB_Block = 152, + + /// + /// Specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized red texel data. + /// + EACR11_UNorm_Block = 153, + + /// + /// Specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized red texel data. + /// + EACR11_SNorm_Block = 154, + + /// + /// Specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + EACR11G11_UNorm_Block = 155, + + /// + /// Specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + EACR11G11_SNorm_Block = 156, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data. + /// + ASTC4X4_UNorm_Block = 157, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC4X4_SRGB_Block = 158, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}4 rectangle of unsigned normalized RGBA texel data. + /// + ASTC5X4_UNorm_Block = 159, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC5X4_SRGB_Block = 160, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}5 rectangle of unsigned normalized RGBA texel data. + /// + ASTC5X5_UNorm_Block = 161, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC5X5_SRGB_Block = 162, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}5 rectangle of unsigned normalized RGBA texel data. + /// + ASTC6X5_UNorm_Block = 163, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC6X5_SRGB_Block = 164, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}6 rectangle of unsigned normalized RGBA texel data. + /// + ASTC6X6_UNorm_Block = 165, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC6X6_SRGB_Block = 166, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}5 rectangle of unsigned normalized RGBA texel data. + /// + ASTC8X5_UNorm_Block = 167, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC8X5_SRGB_Block = 168, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}6 rectangle of unsigned normalized RGBA texel data. + /// + ASTC8X6_UNorm_Block = 169, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC8X6_SRGB_Block = 170, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}8 rectangle of unsigned normalized RGBA texel data. + /// + ASTC8X8_UNorm_Block = 171, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC8X8_SRGB_Block = 172, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}5 rectangle of unsigned normalized RGBA texel data. + /// + ASTC10X5_UNorm_Block = 173, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC10X5_SRGB_Block = 174, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}6 rectangle of unsigned normalized RGBA texel data. + /// + ASTC10X6_UNorm_Block = 175, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC10X6_SRGB_Block = 176, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}8 rectangle of unsigned normalized RGBA texel data. + /// + ASTC10X8_UNorm_Block = 177, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC10X8_SRGB_Block = 178, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}10 rectangle of unsigned normalized RGBA texel data. + /// + ASTC10X10_UNorm_Block = 179, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC10X10_SRGB_Block = 180, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}10 rectangle of unsigned normalized RGBA texel data. + /// + ASTC12X10_UNorm_Block = 181, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC12X10_SRGB_Block = 182, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}12 rectangle of unsigned normalized RGBA texel data. + /// + ASTC12X12_UNorm_Block = 183, + + /// + /// Specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}12 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + ASTC12X12_SRGB_Block = 184, + + /// + /// + /// + G8B8G8R8422_UNorm = 1000156000, + + /// + /// + /// + B8G8R8G8422_UNorm = 1000156001, + + /// + /// + /// + G8B8R83_Plane420_UNorm = 1000156002, + + /// + /// + /// + G8B8R82_Plane420_UNorm = 1000156003, + + /// + /// + /// + G8B8R83_Plane422_UNorm = 1000156004, + + /// + /// + /// + G8B8R82_Plane422_UNorm = 1000156005, + + /// + /// + /// + G8B8R83_Plane444_UNorm = 1000156006, + + /// + /// + /// + R10X6_UNorm_Pack16 = 1000156007, + + /// + /// + /// + R10X6G10X6_UNorm2_Pack16 = 1000156008, + + /// + /// + /// + R10X6G10X6B10X6A10X6_UNorm4_Pack16 = 1000156009, + + /// + /// + /// + G10X6B10X6G10X6R10X6422_UNorm4_Pack16 = 1000156010, + + /// + /// + /// + B10X6G10X6R10X6G10X6422_UNorm4_Pack16 = 1000156011, + + /// + /// + /// + G10X6B10X6R10X63_Plane420_UNorm3_Pack16 = 1000156012, + + /// + /// + /// + G10X6B10X6R10X62_Plane420_UNorm3_Pack16 = 1000156013, + + /// + /// + /// + G10X6B10X6R10X63_Plane422_UNorm3_Pack16 = 1000156014, + + /// + /// + /// + G10X6B10X6R10X62_Plane422_UNorm3_Pack16 = 1000156015, + + /// + /// + /// + G10X6B10X6R10X63_Plane444_UNorm3_Pack16 = 1000156016, + + /// + /// + /// + R12X4_UNorm_Pack16 = 1000156017, + + /// + /// + /// + R12X4G12X4_UNorm2_Pack16 = 1000156018, + + /// + /// + /// + R12X4G12X4B12X4A12X4_UNorm4_Pack16 = 1000156019, + + /// + /// + /// + G12X4B12X4G12X4R12X4422_UNorm4_Pack16 = 1000156020, + + /// + /// + /// + B12X4G12X4R12X4G12X4422_UNorm4_Pack16 = 1000156021, + + /// + /// + /// + G12X4B12X4R12X43_Plane420_UNorm3_Pack16 = 1000156022, + + /// + /// + /// + G12X4B12X4R12X42_Plane420_UNorm3_Pack16 = 1000156023, + + /// + /// + /// + G12X4B12X4R12X43_Plane422_UNorm3_Pack16 = 1000156024, + + /// + /// + /// + G12X4B12X4R12X42_Plane422_UNorm3_Pack16 = 1000156025, + + /// + /// + /// + G12X4B12X4R12X43_Plane444_UNorm3_Pack16 = 1000156026, + + /// + /// + /// + G16B16G16R16422_UNorm = 1000156027, + + /// + /// + /// + B16G16R16G16422_UNorm = 1000156028, + + /// + /// + /// + G16B16R163_Plane420_UNorm = 1000156029, + + /// + /// + /// + G16B16R162_Plane420_UNorm = 1000156030, + + /// + /// + /// + G16B16R163_Plane422_UNorm = 1000156031, + + /// + /// + /// + G16B16R162_Plane422_UNorm = 1000156032, + + /// + /// + /// + G16B16R163_Plane444_UNorm = 1000156033, + + /// + /// + /// + G8B8R82_Plane444_UNorm = 1000330000, + + /// + /// + /// + G10X6B10X6R10X62_Plane444_UNorm3_Pack16 = 1000330001, + + /// + /// + /// + G12X4B12X4R12X42_Plane444_UNorm3_Pack16 = 1000330002, + + /// + /// + /// + G16B16R162_Plane444_UNorm = 1000330003, + + /// + /// + /// + A4R4G4B4_UNorm_Pack16 = 1000340000, + + /// + /// + /// + A4B4G4R4_UNorm_Pack16 = 1000340001, + + /// + /// + /// + ASTC4X4_SFloat_Block = 1000066000, + + /// + /// + /// + ASTC5X4_SFloat_Block = 1000066001, + + /// + /// + /// + ASTC5X5_SFloat_Block = 1000066002, + + /// + /// + /// + ASTC6X5_SFloat_Block = 1000066003, + + /// + /// + /// + ASTC6X6_SFloat_Block = 1000066004, + + /// + /// + /// + ASTC8X5_SFloat_Block = 1000066005, + + /// + /// + /// + ASTC8X6_SFloat_Block = 1000066006, + + /// + /// + /// + ASTC8X8_SFloat_Block = 1000066007, + + /// + /// + /// + ASTC10X5_SFloat_Block = 1000066008, + + /// + /// + /// + ASTC10X6_SFloat_Block = 1000066009, + + /// + /// + /// + ASTC10X8_SFloat_Block = 1000066010, + + /// + /// + /// + ASTC10X10_SFloat_Block = 1000066011, + + /// + /// + /// + ASTC12X10_SFloat_Block = 1000066012, + + /// + /// + /// + ASTC12X12_SFloat_Block = 1000066013, + + /// + /// + /// + Pvrtc12Bpp_UNorm_BlockIMG = 1000054000, + + /// + /// + /// + Pvrtc14Bpp_UNorm_BlockIMG = 1000054001, + + /// + /// + /// + Pvrtc22Bpp_UNorm_BlockIMG = 1000054002, + + /// + /// + /// + Pvrtc24Bpp_UNorm_BlockIMG = 1000054003, + + /// + /// + /// + Pvrtc12Bpp_SRGB_BlockIMG = 1000054004, + + /// + /// + /// + Pvrtc14Bpp_SRGB_BlockIMG = 1000054005, + + /// + /// + /// + Pvrtc22Bpp_SRGB_BlockIMG = 1000054006, + + /// + /// + /// + Pvrtc24Bpp_SRGB_BlockIMG = 1000054007, + + /// + /// + /// + R16G16S105NV = 1000464000, + + /// + /// + /// + A1B5G5R5_UNorm_Pack16KHR = 1000470000, + + /// + /// + /// + A8_UNormKHR = 1000470001, +} diff --git a/Brutal.Texture/TextureLoadSettings.cs b/Brutal.Texture/TextureLoadSettings.cs new file mode 100644 index 0000000..e91687a --- /dev/null +++ b/Brutal.Texture/TextureLoadSettings.cs @@ -0,0 +1,6 @@ +namespace Brutal.TextureApi; + +/// +/// This class is for options sent to texture implementations. +/// +public class TextureLoadSettings { } diff --git a/Brutal.Texture/TextureLoader.cs b/Brutal.Texture/TextureLoader.cs new file mode 100644 index 0000000..d95721a --- /dev/null +++ b/Brutal.Texture/TextureLoader.cs @@ -0,0 +1,311 @@ +using Brutal.TextureApi.Gli; +using Brutal.TextureApi.Ktx; +using Brutal.TextureApi.Stb; + +namespace Brutal.TextureApi; + +/// +/// A class for loading and unloading textures. Supports the following formats: +/// bmp, dds, gif, hdr, jpg (both .jpg and .jpeg), kmg, ktx, ktx2, pgm, pic, png, ppm, psd, tga +/// Note: gif, pgm, pic, ppm and psd are load-only - stb can decode them but cannot encode them, so they cannot be saved. +/// +public static partial class TextureLoader +{ + public enum FormatType + { + Bmp, + Dds, + Gif, + Hdr, + Jpg, + Kmg, + Ktx, + Ktx2, + Pgm, + Pic, + Png, + Ppm, + Psd, + Tga, + } + + static TextureLoader() + { + // Extensions are matched case-insensitively: LoadFromFile normalises via ToLowerInvariant + // and ExtensionToFormat uses OrdinalIgnoreCase, so "Foo.PNG" resolves the same as "foo.png". + ExtensionToFormat = new(StringComparer.OrdinalIgnoreCase); + FormatToExtension = new(); + Diagnostics = new(); + InitialiseLookupDictionaries(); + } + + /// + /// Load a texture from a file on disk. + /// + /// Path to the file + /// Collection of options settings for various formats + /// The ITexture representing of the loaded image file + /// Thrown if the extension is unsupported + public static ITexture LoadFromFile(string filePath, params TextureLoadSettings?[] settings) + { + ITexture texture; + + var extension = Path.GetExtension(filePath).ToLowerInvariant(); + + if (Ktx.Loader.SupportedExtensions.Contains(extension)) + texture = Ktx.Loader.LoadFromFile( + filePath, + settings.FirstOrDefault(s => s is Ktx.Loader.LoadSettings) as Ktx.Loader.LoadSettings + ); + else if (Stb.Loader.SupportedExtensions.Contains(extension)) + texture = Stb.Loader.LoadFromFile( + filePath, + settings.FirstOrDefault(s => s is Stb.Loader.LoadSettings) as Stb.Loader.LoadSettings + ); + else if (Gli.Loader.SupportedExtensions.Contains(extension)) + texture = Gli.Loader.LoadFromFile(filePath); + else + throw new NotSupportedException($"No loader found that supports file {extension}"); + + RecordLoadedTexture(texture); + + return texture; + } + + /// + /// Load a texture from memory. The format of the data in memory must be the same as if the + /// texture was written to memory with TextureSaver.SaveToMemory + /// + /// Span of the texture's bytes + /// The source image format of the texture memory + /// Collection of options settings for various formats + /// The ITexture representing of the loaded image file + /// Thrown if the extension is unsupported + public static ITexture LoadFromMemory( + ReadOnlySpan data, + FormatType formatType, + params TextureLoadSettings?[] settings + ) + { + ITexture texture; + var extension = FormatToExtension[formatType]; + + if (Ktx.Loader.SupportedExtensions.Contains(extension)) + texture = Ktx.Loader.LoadFromMemory( + data, + settings.FirstOrDefault(s => s is Ktx.Loader.LoadSettings) as Ktx.Loader.LoadSettings + ); + else if (Stb.Loader.SupportedExtensions.Contains(extension)) + texture = Stb.Loader.LoadFromMemory( + data, + settings.FirstOrDefault(s => s is Stb.Loader.LoadSettings) as Stb.Loader.LoadSettings + ); + else if (Gli.Loader.SupportedExtensions.Contains(extension)) + texture = Gli.Loader.LoadFromMemory(data); + else + throw new NotSupportedException($"No loader found that supports file {extension}"); + + RecordLoadedTexture(texture); + + return texture; + } + + /// + /// Unload a texture that was loaded with TextureLoader. + /// Also untracks the texture instance if tracking is enabled. + /// + /// The ITexture to unload + /// Thrown if texture was not loaded by this TextureLoader + public static void Unload(ITexture texture) + { + switch (texture) + { + case KtxTexture ktxTexture: + RecordUnloadedTexture(texture); + ktxTexture.Destroy(); + return; + case StbTexture stbTexture: + RecordUnloadedTexture(texture); + stbTexture.Destroy(); + return; + case GliTexture gliTexture: + RecordUnloadedTexture(texture); + gliTexture.Destroy(); + return; + } + + throw new ArgumentException( + $"Cannot unload a texture that was not loaded by TextureLoader. texture: {texture}" + ); + } + + public static LoadDiagnostics Diagnostics { get; } + + /// + /// The total number of textures this TextureLoader has ever loaded. + /// + public static ulong TotalLoadedCount => Interlocked.Read(ref _totalLoadedCount); + + /// + /// The number of textures currently still loaded by this TextureLoader + /// + public static ulong CurrentLoadedCount => Interlocked.Read(ref _currentLoadedCount); + + /// + /// Returns whether a specified file path or extension is supported by TextureLoader. + /// + /// The extension or file path to test. If testing an extension then it must include the '.' prefix + /// true if the file or extension is suported, otherwise false + public static bool IsSupported(string pathOrExtension) => TryGetFormatType(pathOrExtension, out _); + + /// + /// Returns the FormatType that corresponds to a file path or extension. + /// + /// The file path or extension to get the FormatType of. If an extension is passed in to this function, it must include the '.' prefix. + /// The out parameter filled with the FormatType. This value is undefined if a FormatType cannot be found. + /// true if a supported format, otherwise false. Will return false for an empty pathOrExtension. + public static bool TryGetFormatType(string pathOrExtension, out FormatType formatType) + { + formatType = FormatType.Png; + if (pathOrExtension.Length == 0) + return false; + + return ExtensionToFormat.TryGetValue(Path.GetExtension(pathOrExtension), out formatType); + } + + /// + /// Convert a file extension or file path to a or throws an exception if the extension + /// is not supported. + /// + /// The file path or extension to test. If an extension is passed in to this function, it must include the '.' prefix. + /// if a supported format, otherwise throws. + /// Thrown if pathOrExtension is empty, null or not a supported extension. + public static FormatType GetFormatType(string pathOrExtension) + { + if (pathOrExtension is null || pathOrExtension.Length == 0) + throw new ArgumentException($"null or empty extension"); + + if (!ExtensionToFormat!.TryGetValue(Path.GetExtension(pathOrExtension), out var format)) + throw new ArgumentException($"'{pathOrExtension}' is not a supported format"); + + return format; + } + + /// + /// Holds trace information about a loaded texture. Currently this includes a + /// reference to the ITexture and a prettified set of stacktrace strings from when an ITexture was + /// loaded. See for more information. + /// + public struct LoadTrace + { + public ITexture Instance; + public IList FriendlyStackTrace; + } + + /// + /// Class that holds diagnostic information about the loading of textures. + /// + public class LoadDiagnostics + { + public LoadDiagnostics() + { + _isTracingEnabled = false; + _resourceTracker = new ResourceTracker(); + } + + /// + /// Sets whether the texture system should trace the source of texture loads. + /// + /// Client code can call to get the tracing information + /// of all textures that are currently loaded. + /// + /// If true, tracing is enabled. Otherwise tracing is disabled. + public void EnableLoadTracing(bool enableTracking) + { + _isTracingEnabled = enableTracking; + if (!_isTracingEnabled) + _resourceTracker.Reset(); + } + + /// + /// Returns a collection of instantiation information for currently loaded textures. + /// + /// The FriendlyStackTrace field will contain a collection of strings, one for each + /// StackFrame in the callstack at the time the texture was loaded. StackFrames from Brutal, Microsoft or System namespaces will be removed. + /// + /// The strings contain method name, file name and line number. + /// + /// This function processes StackFrame objects and builds strings, therefore should not be called + /// during a hot-path. + /// + /// + public IReadOnlyCollection GetCurrentTracedLoads( + int stackFrameCount = DefaultFriendlyStackFrameCount + ) + { + return _resourceTracker + .CurrentResources() + .Select(entry => new LoadTrace + { + Instance = entry.Instance, + FriendlyStackTrace = StackTraceFormatting.FriendlyStackTraceStrings( + entry.StackTrace, + stackFrameCount + ), + }) + .ToArray(); + } + + internal void Track(ITexture texture) + { + if (_isTracingEnabled) + _resourceTracker.Track(texture); + } + + internal void Untrack(ITexture texture) + { + if (_isTracingEnabled) + _resourceTracker.Untrack(texture); + } + + private bool _isTracingEnabled; + private readonly ResourceTracker _resourceTracker; + } + + #region Private + + private static void RecordLoadedTexture(ITexture texture) + { + Interlocked.Increment(ref _currentLoadedCount); + Interlocked.Increment(ref _totalLoadedCount); + Diagnostics.Track(texture); + } + + private static void RecordUnloadedTexture(ITexture texture) + { + Interlocked.Decrement(ref _currentLoadedCount); + Diagnostics.Untrack(texture); + } + + private static void InitialiseLookupDictionaries() + { + var formatNames = Enum.GetNames(); + var formatValues = Enum.GetValues(); + for (var index = 0; index < formatNames.Length; ++index) + { + var extension = $".{formatNames[index].ToLowerInvariant()}"; + ExtensionToFormat[extension] = formatValues[index]; + FormatToExtension[formatValues[index]] = extension; + } + + ExtensionToFormat[".jpeg"] = FormatType.Jpg; + } + + private const int DefaultFriendlyStackFrameCount = 5; + private static readonly Dictionary ExtensionToFormat; + private static readonly Dictionary FormatToExtension; + private static ulong _totalLoadedCount; + private static ulong _currentLoadedCount; + + #endregion +} diff --git a/Brutal.Texture/TextureWriter.cs b/Brutal.Texture/TextureWriter.cs new file mode 100644 index 0000000..879d43a --- /dev/null +++ b/Brutal.Texture/TextureWriter.cs @@ -0,0 +1,34 @@ +namespace Brutal.TextureApi; + +public static partial class TextureWriter +{ + /// + /// Saves an ITexture to a file. + /// + /// The ITexture to save. + /// The path to the file. + /// Thrown if the extension of filePath is not supported. + public static void SaveToFile(ITexture texture, string filePath) + { + var extension = Path.GetExtension(filePath); + if (Ktx.Loader.SupportedExtensions.Contains(extension)) + { + Ktx.Writer.SaveToFile(texture, filePath); + return; + } + + if (Stb.Writer.SupportedExtensions.Contains(extension)) + { + Stb.Writer.SaveToFile(texture, filePath); + return; + } + + if (Gli.Loader.SupportedExtensions.Contains(extension)) + { + Gli.Writer.SaveToFile(texture, filePath); + return; + } + + throw new NotSupportedException($"No loader found that supports file {extension}"); + } +} diff --git a/Brutal.Vulkan.Abstractions/Allocator/Allocation.cs b/Brutal.Vulkan.Abstractions/Allocator/Allocation.cs new file mode 100644 index 0000000..17214dc --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Allocator/Allocation.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Struct containing information about a memory allocation. Intentionally made similar to VMA's AllocationInfo +/// +/// Allocator that sourced this allocation +/// Device memory handle +/// Size available in the memory allocation (might be more than requested) +/// Offset into the memory allocation +/// Memory type this allocation was made from +/// Custom handle, optionally used by allocator +public readonly record struct AllocationInfo( + IAllocator Allocator, + VkDeviceMemory Memory, + ByteSize AllocSize, + ByteSize AllocOffset, + int MemoryTypeIndex, + nint AllocHandle +) +{ + /// + /// Struct containing information about a memory allocation. Intentionally made similar to VMA's AllocationCreateInfo + /// + /// Memory location preference can just leave as 'None' + /// Flags that must be set in a Memory Type chosen for an allocation + /// Flags that preferably should be set in a memory type chosen for an allocation + /// A floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations + /// For advanced use only. A pointer to an application-defined structure that can be used to pass custom data to the allocator + public record struct CreateInfo( + MemoryPreference Preference, + VkMemoryPropertyFlags RequiredProperties, + VkMemoryPropertyFlags PreferredProperties, + float Priority, + Ptr Next + ) + { + /// + /// Optional memory allocation flags. When set, the allocator chains a + /// in front of + /// (e.g. for buffers whose + /// device address will be queried). + /// + public VkMemoryAllocateFlags AllocateFlags { get; set; } + } +} + +/// +/// Enum listing memory allocation preferences: whether to prefer GPU or CPU memory +/// +public enum MemoryPreference : byte +{ + None, + PreferGpu, + PreferCpu, +} diff --git a/Brutal.Vulkan.Abstractions/Allocator/IAllocator.cs b/Brutal.Vulkan.Abstractions/Allocator/IAllocator.cs new file mode 100644 index 0000000..e0b707a --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Allocator/IAllocator.cs @@ -0,0 +1,28 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Base interface for a Vulkan allocator +/// +public interface IAllocator +{ + /// + /// Get the Vulkan device this allocator is associated with + /// + /// Vulkan device handle + Device GetDevice(); + + VkAllocator? VkAllocator { get; } + + /// + /// Safely maps memory (allocated by this allocator) to a pointer. + /// + /// Allocation info for memory + /// Pointer to mapped memory + Ptr MapMemory(in AllocationMapInfo allocationMapInfo); + + /// + /// Safely unmaps memory (allocated by this allocator) from a pointer + /// + /// Allocation info for memory + void UnmapMemory(in AllocationMapInfo allocationMapInfo); +} diff --git a/Brutal.Vulkan.Abstractions/Allocator/IBufferAllocator.cs b/Brutal.Vulkan.Abstractions/Allocator/IBufferAllocator.cs new file mode 100644 index 0000000..e5d6771 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Allocator/IBufferAllocator.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Struct containing information about a buffer allocation +/// +/// Handle to the Vulkan buffer +/// Offset within the buffer where this allocation starts +/// Size of the allocation within the buffer +/// Usage flags this buffer supports, for reference +/// The internal memory allocation +public readonly record struct BufferAllocationInfo( + VkBuffer VkBuffer, + ByteSize BufferOffset, + ByteSize BufferSize, + VkBufferUsageFlags Usage, + AllocationInfo AllocationInfo +) : IMappable +{ + ByteSize IMappable.MapSize => BufferSize; + ByteSize IMappable.MapOffset => BufferOffset; +} + +/// +/// Interface for a buffer allocator object capable of allocating and freeing buffers +/// +public interface IBufferAllocator : IAllocator +{ + /// + /// Allocate a buffer with the given creation and allocation info + /// + /// + /// Vulkan buffer creation info + /// Memory allocation info + /// Struct containing all relevant information about allocation + public BufferAllocationInfo AllocateBuffer( + in string name, + in VkBufferCreateInfo bufferCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ); + + /// + /// Free buffer allocation + /// + /// Allocation info for the buffer previously sourced from this allocator + public void FreeAllocation(in BufferAllocationInfo inAllocation); +} diff --git a/Brutal.Vulkan.Abstractions/Allocator/IGlobalAllocator.cs b/Brutal.Vulkan.Abstractions/Allocator/IGlobalAllocator.cs new file mode 100644 index 0000000..ec90d7a --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Allocator/IGlobalAllocator.cs @@ -0,0 +1,8 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// An allocator that can allocate both buffers and images. Systems that need to allocate +/// resources of both kinds can depend on this single interface instead of taking +/// and separately. +/// +public interface IGlobalAllocator : IBufferAllocator, IImageAllocator { } diff --git a/Brutal.Vulkan.Abstractions/Allocator/IImageAllocator.cs b/Brutal.Vulkan.Abstractions/Allocator/IImageAllocator.cs new file mode 100644 index 0000000..15a1c79 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Allocator/IImageAllocator.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Struct containing information about an image allocation +/// +public struct ImageAllocationInfo +{ + /// + /// Image handle + /// + public VkImage Image; + + /// + /// Size of image + /// + public VkExtent3D Extent; + + /// + /// Format of image, for reference + /// + public VkFormat Format; + + /// + /// Number of mip levels + /// + public int MipLevels; + + /// + /// Number of array layers allocated + /// + public int ArrayLayers; + + /// + /// Memory allocation info + /// + public AllocationInfo MemAllocationInfo; + + /// + /// Allocator-specific handle + /// + public nint AllocHandle => MemAllocationInfo.AllocHandle; + + /// + /// Allocator that sourced this image + /// + public IImageAllocator Allocator => (IImageAllocator)MemAllocationInfo.Allocator; +} + +/// +/// Interface for an image allocator object capable of allocating and freeing images +/// +public interface IImageAllocator : IAllocator +{ + /// + /// Allocate an image with the given creation and allocation info. + /// + /// Debug name of allocation + /// Vulkan image creation info + /// Memory allocation info + /// Struct containing all relevant information about the allocation + public ImageAllocationInfo AllocateImage( + in string name, + in VkImageCreateInfo imageCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ); + + /// + /// Free an image allocation + /// + /// Struct containing all relevant information about the allocation + public void FreeAllocation(in ImageAllocationInfo inAllocation); +} diff --git a/Brutal.Vulkan.Abstractions/BufferEx.cs b/Brutal.Vulkan.Abstractions/BufferEx.cs new file mode 100644 index 0000000..f213c5b --- /dev/null +++ b/Brutal.Vulkan.Abstractions/BufferEx.cs @@ -0,0 +1,206 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Extends the type to provide additional functionality. +/// +public readonly struct BufferEx : IDisposable, INullable, IMappable, IBindBuffer +{ + public ref struct CreateInfo + { + /// The name to apply to the buffer and allocation + public required string Name; + + /// + public VkBufferCreateFlags BufferFlags; + + /// + public ByteSize BufferSize; + + /// + public VkBufferUsageFlags BufferUsage; + + /// + public VkSharingMode BufferSharingMode; + + /// + public int BufferQueueFamilyIndexCount; + + /// + public unsafe int* BufferQueueFamilyIndices; + + /// + public Ptr BufferNext { get; set; } + + /// + public MemoryPreference AllocPreference; + + /// + public VkMemoryPropertyFlags AllocRequiredProperties; + + /// + public VkMemoryPropertyFlags AllocPreferredProperties; + + /// + public float AllocPriority; + + /// + public Ptr AllocNext { get; set; } + + /// + public VkMemoryAllocateFlags AllocFlags; + + /// + /// Extract or populate this struct with a VkBufferCreateInfo + /// + public unsafe VkBufferCreateInfo BufferCreateInfo + { + get => + new() + { + Flags = BufferFlags, + Size = BufferSize, + Usage = BufferUsage, + SharingMode = BufferSharingMode, + QueueFamilyIndexCount = BufferQueueFamilyIndexCount, + QueueFamilyIndices = BufferQueueFamilyIndices, + Next = BufferNext, + }; + set + { + BufferFlags = value.Flags; + BufferSize = value.Size; + BufferUsage = value.Usage; + BufferSharingMode = value.SharingMode; + BufferQueueFamilyIndexCount = value.QueueFamilyIndexCount; + BufferQueueFamilyIndices = value.QueueFamilyIndices; + BufferNext = value.Next; + } + } + + /// + /// Extract or populate this struct with an AllocationInfo.CreateInfo + /// + public AllocationInfo.CreateInfo AllocationInfo + { + get => + new() + { + Preference = AllocPreference, + RequiredProperties = AllocRequiredProperties, + PreferredProperties = AllocPreferredProperties, + Priority = AllocPriority, + Next = AllocNext, + AllocateFlags = AllocFlags, + }; + set + { + AllocPreference = value.Preference; + AllocRequiredProperties = value.RequiredProperties; + AllocPreferredProperties = value.PreferredProperties; + AllocPriority = value.Priority; + AllocNext = value.Next; + AllocFlags = value.AllocateFlags; + } + } + } + + /// + /// Source of the buffer allocation + /// + public readonly IBufferAllocator Allocator; + + /// + /// Allocation info for the buffer + /// + public readonly BufferAllocationInfo BufferAllocationInfo; + + /// + /// The size of the buffer allocation + /// + public ByteSize BufferSize => BufferAllocationInfo.BufferSize; + + /// + /// Offset within the owning buffer where this buffer starts + /// + public ByteSize BindOffset => BufferAllocationInfo.BufferOffset; + + /// + /// Usage flags this buffer supports + /// + public VkBufferUsageFlags Usage => BufferAllocationInfo.Usage; + + internal BufferEx(IBufferAllocator allocator, CreateInfo createInfo) + { + Allocator = allocator; + + BufferAllocationInfo = allocator.AllocateBuffer( + createInfo.Name, + createInfo.BufferCreateInfo, + createInfo.AllocationInfo + ); + } + + /// + /// Construct a BufferEx from an existing buffer allocation + /// + /// Pre-allocated buffer sourced from an IBufferAllocator + public BufferEx(BufferAllocationInfo allocationInfo) + { + BufferAllocationInfo = allocationInfo; + Allocator = (IBufferAllocator)allocationInfo.AllocationInfo.Allocator; + } + + /// + public void Dispose() + { + Allocator.FreeAllocation(BufferAllocationInfo); + } + + /// + /// Vulkan buffer handle + /// + public VkBuffer VkBuffer => BufferAllocationInfo.VkBuffer; + + /// + /// Vulkan device memory handle + /// + public VkDeviceMemory VkDeviceMemory => BufferAllocationInfo.AllocationInfo.Memory; + + /// + /// Query the buffer's GPU virtual address via + /// vkGetBufferDeviceAddress. + /// The buffer must have been created with and its memory + /// allocated with (see ). + /// + public VkDeviceAddress GetDeviceAddress() + { + return Allocator.GetDevice().GetBufferDeviceAddress(new VkBufferDeviceAddressInfo { Buffer = VkBuffer }); + } + + public BufferPartitionInfo AsPartition() + { + if (IsNull()) + throw new NullReferenceException(nameof(VkBuffer)); + + return BufferPartitionInfo.FullPartition(BufferAllocationInfo); + } + + public static implicit operator BufferPartitionInfo(BufferEx buffer) => buffer.AsPartition(); + + public bool IsNull() + { + return VkBuffer.IsNull(); + } + + AllocationInfo IMappable.AllocationInfo => BufferAllocationInfo.AllocationInfo; + ByteSize IMappable.MapSize => BufferSize; + ByteSize IMappable.MapOffset => ByteSize.Zero; // BufferOffset should not be used here +} + +public static class BufferExExtensions +{ + public static BufferEx CreateBuffer(this IBufferAllocator allocator, BufferEx.CreateInfo createInfo) + { + return new BufferEx(allocator, createInfo); + } +} diff --git a/Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs b/Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs new file mode 100644 index 0000000..09010d4 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs @@ -0,0 +1,282 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// An allocator that allocates images and buffers directly from a Vulkan device. +/// +public class DeviceEx : Device, IGlobalAllocator +{ + public new ref struct CreateInfo() + { + public HashSet Extensions = []; + public Ptr Features = null; + public ReadOnlySpan QueueCreateInfos = []; + public Ptr Next = null; + public VkAllocator? Allocator = null; + } + + internal DeviceEx(PhysicalDevice physicalDevice, CreateInfo createInfo) + : base( + physicalDevice, + new Device.CreateInfo + { + Extensions = createInfo.Extensions, + Features = createInfo.Features, + QueueCreateInfos = createInfo.QueueCreateInfos, + Next = createInfo.Next, + Allocator = createInfo.Allocator, + } + ) { } + + // No finalizer: the base Device owns the only native handle and frees it in Dispose(). + + /// + /// Resolve the preferred-property flags for an allocation, folding the declared + /// into explicit preferred properties. + /// + private static VkMemoryPropertyFlags GetPreferredProperties(in AllocationInfo.CreateInfo allocateCreateInfo) + { + var preferred = allocateCreateInfo.PreferredProperties; + + preferred |= allocateCreateInfo.Preference switch + { + MemoryPreference.PreferGpu => VkMemoryPropertyFlags.DeviceLocalBit, + MemoryPreference.PreferCpu => VkMemoryPropertyFlags.HostVisibleBit | VkMemoryPropertyFlags.HostCoherentBit, + _ => VkMemoryPropertyFlags.None, + }; + + return preferred; + } + + /// + /// Allocate device memory for the given requirements, forwarding the caller's pNext chain and, + /// when is set, chaining a + /// in front of it. + /// + private unsafe VkDeviceMemory AllocateMemoryFor( + ByteSize size, + int memoryTypeIndex, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + if (allocateCreateInfo.AllocateFlags == VkMemoryAllocateFlags.None) + { + return this.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = size, + MemoryTypeIndex = memoryTypeIndex, + Next = allocateCreateInfo.Next, + }, + VkAllocator + ); + } + + var flagsInfo = new VkMemoryAllocateFlagsInfo + { + Flags = allocateCreateInfo.AllocateFlags, + Next = allocateCreateInfo.Next, + }; + + return this.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = size, + MemoryTypeIndex = memoryTypeIndex, + Next = &flagsInfo, + }, + VkAllocator + ); + } + + /// + public ImageAllocationInfo AllocateImage( + in string name, + in VkImageCreateInfo imageCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + var image = this.CreateImage(imageCreateInfo, VkAllocator); + // Check the memory requirements for the image + var memoryRequirements = this.GetImageMemoryRequirements(image); + + // Pick the first memory type that fits the requirements + var selectedMemoryTypeIndex = PhysicalDevice.FindMemoryType( + memoryRequirements.MemoryTypeBits, + allocateCreateInfo.RequiredProperties, + GetPreferredProperties(allocateCreateInfo) + ); + + var memory = AllocateMemoryFor(memoryRequirements.Size, selectedMemoryTypeIndex, allocateCreateInfo); + + this.BindImageMemory(image, memory, ByteSize.Zero); + + if (name.Length > 0) + { + this.SetDebugName(image, name); + this.SetDebugName(memory, name); + } + + return new ImageAllocationInfo + { + Image = image, + Extent = imageCreateInfo.Extent, + Format = imageCreateInfo.Format, + MipLevels = imageCreateInfo.MipLevels, + ArrayLayers = imageCreateInfo.ArrayLayers, + MemAllocationInfo = new AllocationInfo + { + Allocator = this, + Memory = memory, + AllocOffset = ByteSize.Zero, + AllocSize = memoryRequirements.Size, + MemoryTypeIndex = selectedMemoryTypeIndex, + }, + }; + } + + public void FreeAllocation(in ImageAllocationInfo inAllocation) + { + if (inAllocation.MemAllocationInfo.Memory.IsNull()) + return; // No allocation to free + if (inAllocation.MemAllocationInfo.Allocator == null) + throw new InvalidOperationException("Tried to free memory but allocator was null. Who allocated this?"); + if (inAllocation.MemAllocationInfo.Allocator != this) + throw new InvalidOperationException("Allocation was not made from this allocator."); + this.DestroyImage(inAllocation.Image, VkAllocator); + this.FreeMemory(inAllocation.MemAllocationInfo.Memory, VkAllocator); + } + + public unsafe void FreeAllocation(in BufferAllocationInfo inAllocation) + { + if (inAllocation.AllocationInfo.Memory.IsNull()) + return; // No allocation to free + if (inAllocation.AllocationInfo.Allocator == null) + throw new InvalidOperationException("Tried to free memory but allocator was null. Who allocated this?"); + if (inAllocation.AllocationInfo.Allocator != this) + throw new InvalidOperationException("Allocation was not made from this allocator."); + var handle = (BufferAllocationHandle*)inAllocation.AllocationInfo.AllocHandle; + if (handle == null) + throw new InvalidOperationException("Allocation handle is null."); + if (handle->RefCount != 0) + throw new InvalidOperationException("Memory is still mapped. Unmap the memory before freeing it."); + + this.DestroyBuffer(inAllocation.VkBuffer, VkAllocator); + this.FreeMemory(inAllocation.AllocationInfo.Memory, VkAllocator); + + Mem.Free(handle); + } + + private struct BufferAllocationHandle + { + public int RefCount; + public AllocationMapInfo.MapKey Key; + } + + /// + public unsafe BufferAllocationInfo AllocateBuffer( + in string name, + in VkBufferCreateInfo bufferCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + var buffer = this.CreateBuffer(bufferCreateInfo, VkAllocator); + + // Check the memory requirements for the vertex buffer + var bufferMemoryRequirements = this.GetBufferMemoryRequirements(buffer); + + // Pick the first memory type that fits the requirements + var selectedMemoryTypeIndex = PhysicalDevice.FindMemoryType( + bufferMemoryRequirements.MemoryTypeBits, + allocateCreateInfo.RequiredProperties, + GetPreferredProperties(allocateCreateInfo) + ); + + var memory = AllocateMemoryFor(bufferMemoryRequirements.Size, selectedMemoryTypeIndex, allocateCreateInfo); + this.BindBufferMemory(buffer, memory, ByteSize.Zero); + if (name.Length > 0) + { + this.SetDebugName(buffer, name); + this.SetDebugName(memory, name); + } + + var handle = Mem.AllocZeroed(); + + return new BufferAllocationInfo( + buffer, + ByteSize.Zero, + bufferCreateInfo.Size, + bufferCreateInfo.Usage, + new AllocationInfo + { + Allocator = this, + Memory = memory, + AllocOffset = ByteSize.Zero, + AllocSize = bufferMemoryRequirements.Size, + MemoryTypeIndex = selectedMemoryTypeIndex, + AllocHandle = (nint)handle, + } + ); + } + + /// + unsafe Ptr IAllocator.MapMemory(in AllocationMapInfo allocationMapInfo) + { + var allocationInfo = allocationMapInfo.AllocationInfo; + + var handle = (BufferAllocationHandle*)allocationMapInfo.AllocationInfo.AllocHandle; + if (handle == null) + throw new InvalidOperationException( + "Allocation has no map-tracking handle; only buffer allocations made by this allocator can be mapped." + ); + + if (handle->RefCount != 0) + { + if (!allocationMapInfo.IsSubsetOf(handle->Key)) + throw new InvalidOperationException( + "Memory is already mapped to a different region. Unmap the memory before mapping again." + ); + + handle->RefCount++; + return handle->Key.MapPtr.Offset(allocationMapInfo.Region.Offset - handle->Key.MapOffset); + } + + var ptr = this.MapMemory( + allocationInfo.Memory, + allocationMapInfo.Region.Offset, + allocationMapInfo.Region.Size, + VkMemoryMapFlags.None + ); + if (ptr == null) + throw new InvalidOperationException("Failed to map memory."); + + handle->RefCount = 1; + handle->Key = new AllocationMapInfo.MapKey(ptr, allocationMapInfo.Region.Size, allocationMapInfo.Region.Offset); + + return ptr; + } + + /// + unsafe void IAllocator.UnmapMemory(in AllocationMapInfo allocationMapInfo) + { + var allocationInfo = allocationMapInfo.AllocationInfo; + + var handle = (BufferAllocationHandle*)allocationInfo.AllocHandle; + if (handle == null) + throw new InvalidOperationException( + "Allocation has no map-tracking handle; only buffer allocations made by this allocator can be mapped." + ); + + if (handle->RefCount == 0) + throw new InvalidOperationException("Memory is not mapped."); + if (--handle->RefCount > 0) + return; + + this.UnmapMemory(allocationInfo.Memory); + handle->Key = new AllocationMapInfo.MapKey(null, ByteSize.Zero, ByteSize.Zero); + } + + Device IAllocator.GetDevice() => this; + + /// + public VkAllocator? VkAllocator => _vkAllocator; +} diff --git a/Brutal.Vulkan.Abstractions/DebugNameExtensions.cs b/Brutal.Vulkan.Abstractions/DebugNameExtensions.cs new file mode 100644 index 0000000..aa47715 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/DebugNameExtensions.cs @@ -0,0 +1,90 @@ +using System.Diagnostics; + +namespace Brutal.VulkanApi.Abstractions; + +public static class DebugNameExtensions +{ + private const int MAX_DEBUG_NAME_LENGTH = 256; + + /// + /// Set a debug name for the handle. Names longer than 255 UTF-8 bytes are truncated. + /// + /// Handle to the device that will assign the name + /// The Vulkan handle we want to assign a name to + /// The name to assign to the handle + [Conditional("DEBUG")] + public static void SetDebugName(this Device device, T handle, string name) + where T : IVulkanHandle + { + if (!device.PhysicalDevice.Instance.IsExtensionEnabled(VK.EXT_DEBUG_UTILS_EXTENSION_NAME)) + return; + + Span bytes = stackalloc byte[MAX_DEBUG_NAME_LENGTH]; + // Encode as much as fits in the 255-byte budget (one byte reserved for the terminator). + // FromUtf16 stops at a character boundary when the destination runs out, so a truncated + // name is still valid UTF-8 rather than ending mid-character. + System.Text.Unicode.Utf8.FromUtf16( + name, + bytes[..(MAX_DEBUG_NAME_LENGTH - 1)], + out _, + out var written, + replaceInvalidSequences: true, + isFinalBlock: true + ); + bytes[written] = 0; + + // Include the terminator: the driver receives a raw char* and reads until NUL + device.SetDebugName(handle.VkObjectType, handle.VkHandle, bytes[..(written + 1)]); + } + + /// + /// Set a debug name for the handle. The name does not need to be null-terminated; + /// a terminator is appended when missing. + /// + /// Handle to the device that will assign the name + /// The Vulkan handle we want to assign a name to + /// The name to assign to the handle + [Conditional("DEBUG")] + public static void SetDebugName(this Device device, T handle, ReadOnlySpan name) + where T : IVulkanHandle + { + if (!device.PhysicalDevice.Instance.IsExtensionEnabled(VK.EXT_DEBUG_UTILS_EXTENSION_NAME)) + return; + + // The driver reads until NUL, so the bytes handed over must include one + if (name.Length > 0 && name[^1] == 0) + { + device.SetDebugName(handle.VkObjectType, handle.VkHandle, name); + return; + } + + var length = Math.Min(name.Length, MAX_DEBUG_NAME_LENGTH - 1); + // Don't cut a multi-byte character in half: back up over any continuation bytes (10xxxxxx) + // so the truncated prefix is still valid UTF-8 + while (length > 0 && length < name.Length && (name[length] & 0xC0) == 0x80) + length--; + Span terminated = stackalloc byte[MAX_DEBUG_NAME_LENGTH]; + name[..length].CopyTo(terminated); + terminated[length] = 0; + + device.SetDebugName(handle.VkObjectType, handle.VkHandle, terminated[..(length + 1)]); + } + + private static unsafe void SetDebugName( + this Device device, + VkObjectType objectType, + nint handle, + ReadOnlySpan name + ) + { + fixed (byte* namePtr = name) + device.SetDebugUtilsObjectNameEXT( + new VkDebugUtilsObjectNameInfoEXT + { + ObjectType = objectType, + ObjectHandle = handle, + ObjectName = namePtr, + } + ); + } +} diff --git a/Brutal.Vulkan.Abstractions/DescriptorPoolEx.cs b/Brutal.Vulkan.Abstractions/DescriptorPoolEx.cs new file mode 100644 index 0000000..9b2dd4e --- /dev/null +++ b/Brutal.Vulkan.Abstractions/DescriptorPoolEx.cs @@ -0,0 +1,416 @@ +using System.Text; + +namespace Brutal.VulkanApi.Abstractions; + +public class DescriptorPoolEx : VulkanHandleWrapper, IDisposable +{ + public ref struct CreateInfo + { + /// + public unsafe void* Next; + + /// + public int MaxSets; + + /// + public VkDescriptorPoolCreateFlags Flags; + + /// + public Span PoolSizes; + + /// + /// Extract or populate this struct with a VkDescriptorPoolCreateInfo + /// + public unsafe VkDescriptorPoolCreateInfo DescriptorPoolCreateInfo + { + get => + new() + { + Flags = Flags, + MaxSets = MaxSets, + Next = Next, + PoolSizes = PoolSizes.AsPointer(), + PoolSizeCount = PoolSizes.Length, + }; + set + { + Next = value.Next; + Flags = value.Flags; + MaxSets = value.MaxSets; + PoolSizes = new(value.PoolSizes, value.PoolSizeCount); + } + } + } + + public Device Device { get; } + + public int MaxSets { get; } + + public int RemainingSets { get; private set; } + + public VkDescriptorPoolCreateFlags Flags { get; } + + public record struct PoolSize(VkDescriptorType Type, int InitialCount, int RemainingCount); + + public readonly PoolSize[] PoolSizes; + + public readonly Dictionary MappedDescriptorSets; + private readonly VkAllocator? _allocator; + + internal DescriptorPoolEx(Device device, CreateInfo createInfo, VkAllocator? allocator) + { + Device = device; + MaxSets = createInfo.MaxSets; + RemainingSets = MaxSets; + Flags = createInfo.Flags; + _allocator = allocator; + + PoolSizes = new PoolSize[createInfo.PoolSizes.Length]; + for (var i = 0; i < createInfo.PoolSizes.Length; i++) + PoolSizes[i] = new PoolSize( + createInfo.PoolSizes[i].Type, + createInfo.PoolSizes[i].DescriptorCount, + createInfo.PoolSizes[i].DescriptorCount + ); + + Handle = device.CreateDescriptorPool(createInfo.DescriptorPoolCreateInfo, allocator); + + MappedDescriptorSets = new Dictionary(MaxSets); + } + + internal unsafe VkDescriptorSet AllocateDescriptorSet(DescriptorSetLayoutEx layout) + { + TryAllocateFromLayouts([layout]); + + var layoutHandle = layout.Handle; + + VkDescriptorSet descriptorSet; + + Device.AllocateDescriptorSets( + new VkDescriptorSetAllocateInfo + { + DescriptorPool = Handle, + DescriptorSetCount = 1, + SetLayouts = &layoutHandle, + }, + new ReadOnlySpan(&descriptorSet, 1) + ); + + MappedDescriptorSets.Add(descriptorSet, layout); + + return descriptorSet; + } + + internal unsafe void AllocateDescriptorSets(DescriptorSetLayoutEx layout, Span descriptorSets) + { + TryAllocateFromLayouts([layout], descriptorSets.Length); + + Span layouts = stackalloc VkDescriptorSetLayout[descriptorSets.Length]; + for (var i = 0; i < descriptorSets.Length; i++) + layouts[i] = layout.Handle; + + Device.AllocateDescriptorSets( + new VkDescriptorSetAllocateInfo + { + DescriptorPool = Handle, + DescriptorSetCount = descriptorSets.Length, + SetLayouts = layouts.AsPointer(), + }, + descriptorSets + ); + + for (var i = 0; i < descriptorSets.Length; i++) + MappedDescriptorSets.Add(descriptorSets[i], layout); + } + + internal unsafe void AllocateDescriptorSets( + Span layouts, + Span descriptorSets + ) + { + if (layouts.Length != descriptorSets.Length) + throw new ArgumentException("layouts and descriptorSets must be the same length"); + + TryAllocateFromLayouts(layouts); + + Span layoutHandles = stackalloc VkDescriptorSetLayout[layouts.Length]; + + for (var i = 0; i < layouts.Length; i++) + layoutHandles[i] = layouts[i].Handle; + + Device.AllocateDescriptorSets( + new VkDescriptorSetAllocateInfo + { + DescriptorPool = Handle, + DescriptorSetCount = layouts.Length, + SetLayouts = layoutHandles.AsPointer(), + }, + descriptorSets + ); + + for (var i = 0; i < layouts.Length; i++) + MappedDescriptorSets.Add(descriptorSets[i], layouts[i]); + } + + protected void TryAllocateFromLayouts(Span layouts, int multiplier = 1) + { + var requiredSets = layouts.Length * multiplier; + + if (RemainingSets < requiredSets) + throw DescriptorPoolOutOfMemoryException.OutOfSets(this, requiredSets); + + // Create a copy of the pool sizes to avoid modifying the original in case of failure + Span poolSizes = stackalloc PoolSize[PoolSizes.Length]; + PoolSizes.CopyTo(poolSizes); + + foreach (var layout in layouts) + TryAllocateFromLayout(poolSizes, layout, multiplier); + + // Commit the changes if allocation was successful + poolSizes.CopyTo(PoolSizes); + RemainingSets -= requiredSets; + } + + private void TryAllocateFromLayout(Span poolSizes, DescriptorSetLayoutEx layout, int multiplier) + { + foreach (var (type, required) in layout.Descriptors) + TryAllocateDescriptors(poolSizes, type, required * multiplier); + } + + private void TryAllocateDescriptors(Span poolSizes, VkDescriptorType type, int required) + { + // Try to find a pool size that matches the type and has enough remaining descriptors + for (var i = 0; i < poolSizes.Length; i++) + { + if (poolSizes[i].Type != type) + continue; + + if (poolSizes[i].RemainingCount < required) + throw DescriptorPoolOutOfMemoryException.OutOfDescriptors(this, type, required); + + poolSizes[i].RemainingCount -= required; + return; + } + + // If no matching pool size was found, allocation failed + throw DescriptorPoolInvalidOperationException.DescriptorTypeNotFound(this, type); + } + + internal void FreeDescriptorSets(Span descriptorSets) + { + if ((Flags & VkDescriptorPoolCreateFlags.FreeDescriptorSetBit) == 0) + throw DescriptorPoolInvalidOperationException.BadFreeOperation(this); + + foreach (var descriptorSet in descriptorSets) + { + if (!MappedDescriptorSets.TryGetValue(descriptorSet, out var layout)) + throw DescriptorPoolInvalidOperationException.FreeInvalidDescriptorSet(this, descriptorSet); + + // Returns the descriptors and credits RemainingSets by one (multiplier -1) + TryAllocateFromLayouts([layout], -1); + MappedDescriptorSets.Remove(descriptorSet); + } + + Device.FreeDescriptorSetsInternal(Handle, descriptorSets); + } + + public void Dispose() + { + MappedDescriptorSets.Clear(); + Device.DestroyDescriptorPool(Handle, _allocator); + } + + public VkDescriptorPool Handle { get; init; } + public ref VkEmptyTable PInvoke => throw new NotImplementedException(); + + public bool IsNull() => Handle.IsNull(); + + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkDescriptorPool(DescriptorPoolEx descriptorPool) => descriptorPool.Handle; +} + +public static class DescriptorPoolExExtensions +{ + public static DescriptorPoolEx CreateDescriptorPool( + this Device device, + DescriptorPoolEx.CreateInfo createInfo, + VkAllocator? allocator + ) + { + return new DescriptorPoolEx(device, createInfo, allocator); + } + + /// + /// Allocates a single descriptor set from the specified descriptor pool using + /// vkAllocateDescriptorSets. + /// + /// The logical device that owns the descriptor pool. + /// The descriptor pool from which to allocate the descriptor set. + /// + /// A handle that describes the layout of the descriptor set to be allocated. + /// + /// A VkDescriptorSet object representing the allocated descriptor set. + public static VkDescriptorSet AllocateDescriptorSet( + this Device inDevice, + DescriptorPoolEx inDescriptorPool, + DescriptorSetLayoutEx inDescriptorSetLayout + ) + { + return inDescriptorPool.AllocateDescriptorSet(inDescriptorSetLayout); + } + + /// + /// Allocates one or more descriptor sets from the specified descriptor pool using + /// vkAllocateDescriptorSets. + /// + /// The logical device that owns the descriptor pool. + /// The descriptor pool from which the descriptor sets will be allocated. + /// + /// A span of handles, each describing the layout of a descriptor set to be allocated. + /// + /// An array of VkDescriptorSet objects representing the allocated descriptor sets. + public static void AllocateDescriptorSets( + this Device inDevice, + DescriptorPoolEx inDescriptorPool, + Span inDescriptorSetLayouts, + Span outDescriptorSets + ) + { + inDescriptorPool.AllocateDescriptorSets(inDescriptorSetLayouts, outDescriptorSets); + } + + /// + /// Allocates an array of descriptor sets from the specified descriptor pool using a single descriptor set layout repeated for each set. + /// This method constructs a span containing the same for every descriptor set to be allocated. + /// + /// The logical device that owns the descriptor pool. + /// The descriptor pool from which the descriptor sets will be allocated. + /// + /// A handle that describes the layout of each descriptor set. + /// + /// A span to be filled with the allocated descriptor sets. + /// An array of VkDescriptorSet objects representing the allocated descriptor sets. + public static void AllocateDescriptorSets( + this Device inDevice, + DescriptorPoolEx inDescriptorPool, + DescriptorSetLayoutEx inDescriptorSetLayout, + Span outDescriptorSets + ) + { + inDescriptorPool.AllocateDescriptorSets(inDescriptorSetLayout, outDescriptorSets); + } + + /// + /// Frees descriptor sets that were previously allocated from the specified descriptor pool + /// vkFreeDescriptorSets. + /// + /// The logical device that owns the descriptor pool. + /// The descriptor pool from which the descriptor sets were allocated. + /// The descriptor set to free + public static void FreeDescriptorSet( + this Device inDevice, + DescriptorPoolEx inDescriptorPool, + VkDescriptorSet inDescriptorSet + ) + { + inDescriptorPool.FreeDescriptorSets([inDescriptorSet]); + } + + /// + /// Frees an array of descriptor sets that were previously allocated from the specified descriptor pool. + /// vkFreeDescriptorSets. + /// + /// The logical device that owns the descriptor pool. + /// The descriptor pool from which the descriptor sets were allocated. + /// Span of descriptor sets to free + public static void FreeDescriptorSets( + this Device inDevice, + DescriptorPoolEx inDescriptorPool, + Span inDescriptorSets + ) + { + inDescriptorPool.FreeDescriptorSets(inDescriptorSets); + } +} + +public class DescriptorPoolInvalidOperationException(DescriptorPoolEx pool, string message) + : InvalidOperationException(message) +{ + public DescriptorPoolEx Pool = pool; + + public static DescriptorPoolInvalidOperationException BadFreeOperation(DescriptorPoolEx pool) => + new(pool, "Tried to free sets from a pool that was not created with the 'FreeDescriptorSet' flag"); + + public static DescriptorPoolInvalidOperationException FreeInvalidDescriptorSet( + DescriptorPoolEx pool, + VkDescriptorSet descriptorSet + ) => new(pool, "Tried to free a descriptor set that was not allocated from this pool"); + + public static DescriptorPoolInvalidOperationException DescriptorTypeNotFound( + DescriptorPoolEx pool, + VkDescriptorType type + ) => new(pool, $"Tried to allocate descriptor of type '{type}' that was never allocated for this pool"); +} + +public class DescriptorPoolOutOfMemoryException(DescriptorPoolEx pool, string message) : OutOfMemoryException(message) +{ + public DescriptorPoolEx Pool = pool; + + public static DescriptorPoolOutOfMemoryException OutOfSets(DescriptorPoolEx pool, int required) + { + var remaining = pool.RemainingSets; + + return new DescriptorPoolOutOfMemoryException( + pool, + new StringBuilder("Tried to allocate ") + .Append(required == 1 ? "a new set" : $"{required} new sets") + .Append(", but there ") + .Append( + remaining switch + { + 0 => "are no sets remaining", + 1 => "is only 1 set remaining", + _ => $"are only {remaining} sets remaining", + } + ) + .ToString() + ); + } + + public static DescriptorPoolOutOfMemoryException OutOfDescriptors( + DescriptorPoolEx pool, + VkDescriptorType type, + int required + ) + { + // Find the matching pool size without a LINQ enumerator/closure on this error path + var remaining = 0; + foreach (var poolSize in pool.PoolSizes) + { + if (poolSize.Type != type) + continue; + remaining = poolSize.RemainingCount; + break; + } + + return new DescriptorPoolOutOfMemoryException( + pool, + new StringBuilder("Tried to allocate ") + .Append(required == 1 ? "a new descriptor" : $"{required} new descriptors") + .Append(" of type '") + .Append(type) + .Append("', but there ") + .Append( + remaining switch + { + 0 => "are no descriptors of this type remaining", + 1 => "is only 1 descriptor of this type remaining", + _ => $"are only {remaining} descriptors of this type remaining", + } + ) + .ToString() + ); + } +} diff --git a/Brutal.Vulkan.Abstractions/DescriptorSetLayoutEx.cs b/Brutal.Vulkan.Abstractions/DescriptorSetLayoutEx.cs new file mode 100644 index 0000000..b5acbc3 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/DescriptorSetLayoutEx.cs @@ -0,0 +1,95 @@ +namespace Brutal.VulkanApi.Abstractions; + +public class DescriptorSetLayoutEx + : VulkanHandleWrapper, + IDisposable, + IDescriptorSetLayoutWrapper +{ + VkDescriptorSetLayout IDescriptorSetLayoutWrapper.DescriptorSetLayout => Handle; + + public Device Device { get; } + public Dictionary Descriptors { get; } = new(); + private readonly VkAllocator? _allocator; + + public unsafe ref struct CreateInfo + { + /// + /// pNext is `NULL` or a pointer to a structure extending this structure. + /// + public void* Next; + + /// + /// flags is a bitmask specifying options for descriptor set layout creation. + /// + public VkDescriptorSetLayoutCreateFlags Flags; + + /// + /// pBindings is a pointer to an array of VkDescriptorSetLayoutBinding structures. + /// + public Span Bindings; + + /// + /// Extract or populate this struct with a VkDescriptorSetLayoutCreateInfo + /// + public VkDescriptorSetLayoutCreateInfo DescriptorSetLayoutCreateInfo + { + get => + new() + { + Next = Next, + Flags = Flags, + BindingCount = Bindings.Length, + Bindings = Bindings.AsPointer(), + }; + set + { + Next = value.Next; + Flags = value.Flags; + Bindings = new(value.Bindings, value.BindingCount); + } + } + } + + internal DescriptorSetLayoutEx(Device device, CreateInfo createInfo, VkAllocator? allocator) + { + Device = device; + Handle = device.CreateDescriptorSetLayout(createInfo.DescriptorSetLayoutCreateInfo, allocator); + _allocator = allocator; + + foreach (var binding in createInfo.Bindings) + { + if (Descriptors.ContainsKey(binding.DescriptorType)) + Descriptors[binding.DescriptorType] += binding.DescriptorCount; + else + Descriptors[binding.DescriptorType] = binding.DescriptorCount; + } + } + + public void Dispose() + { + Device.DestroyDescriptorSetLayout(Handle, _allocator); + } + + public VkDescriptorSetLayout Handle { get; init; } + public ref VkEmptyTable PInvoke => throw new NotImplementedException(); + + public bool IsNull() => Handle.IsNull(); + + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkDescriptorSetLayout(DescriptorSetLayoutEx descriptorSetLayout) => + descriptorSetLayout.Handle; +} + +public static class DescriptorSetLayoutExExtensions +{ + public static DescriptorSetLayoutEx CreateDescriptorSetLayout( + this Device device, + DescriptorSetLayoutEx.CreateInfo createInfo, + VkAllocator? allocator + ) + { + return new DescriptorSetLayoutEx(device, createInfo, allocator); + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/ByteSizeExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/ByteSizeExtensions.cs new file mode 100644 index 0000000..70b50a2 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/ByteSizeExtensions.cs @@ -0,0 +1,29 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Alignment helpers for . +/// +public static class ByteSizeExtensions +{ + /// + /// Round the value up to the next multiple of . + /// The alignment must be a power of two; an alignment of zero returns the value unchanged. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize AlignUp(this ByteSize value, ByteSize alignment) + { + if (alignment == 0) + return value; + + return ByteSize.Of((value + alignment - 1) & ~(alignment - 1)); + } + + /// + /// True when the value is a multiple of (an alignment of zero always matches). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsAlignedTo(this ByteSize value, ByteSize alignment) + { + return value.AlignUp(alignment) == value; + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/CommandBufferExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/CommandBufferExtensions.cs new file mode 100644 index 0000000..f8f94a1 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/CommandBufferExtensions.cs @@ -0,0 +1,273 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Scope handle returned by ; ends the +/// debug label region on dispose. +/// +public readonly struct DebugLabelScope(CommandBuffer inCommandBuffer) : IDisposable +{ + /// + public void Dispose() + { + inCommandBuffer.EndDebugLabel(); + } +} + +/// +/// Provides extension methods for recording Vulkan command buffer commands. +/// +public static class CommandBufferExtensions +{ + /// + /// Resets the command buffer to its initial state using + /// vkResetCommandBuffer. + /// The command buffer must not be in a pending state and will be reset to the initial state. + /// + /// The command buffer to reset. + public static void Reset(this CommandBuffer inCommandBuffer) + { + inCommandBuffer.Reset(VkCommandBufferResetFlags.None); + } + + /// + /// Begins recording commands on the command buffer using + /// vkBeginCommandBuffer. + /// + /// The command buffer to begin recording. + public static void Begin(this CommandBuffer inCommandBuffer) + { + inCommandBuffer.Begin(new VkCommandBufferBeginInfo { Flags = VkCommandBufferUsageFlags.None }); + } + + /// + /// Begins a Vulkan debug label region on the command buffer using + /// vkCmdBeginDebugUtilsLabelEXT. + /// This allows grouping commands within a labeled region for better debugging and profiling. + /// + /// The Vulkan command buffer on which to begin the debug label. + /// A read-only span of bytes representing the label name. The label should be null-terminated. + /// A structure representing the RGBA color of the label. + public static unsafe void BeginDebugLabel( + this CommandBuffer inCommandBuffer, + in ReadOnlySpan label, + in float4 color + ) + { + var vkLabel = new VkDebugUtilsLabelEXT { LabelName = label.AsPointer() }; + vkLabel.Color[0] = color.R; + vkLabel.Color[1] = color.G; + vkLabel.Color[2] = color.B; + vkLabel.Color[3] = color.A; + inCommandBuffer.BeginDebugUtilsLabelEXT(vkLabel); + } + + /// + /// Begins a Vulkan debug label region on the command buffer, encoding the label from a managed string. + /// Labels longer than 255 UTF-8 bytes are truncated at a character boundary. See + /// . + /// + /// The Vulkan command buffer on which to begin the debug label. + /// The label text. + /// A structure representing the RGBA color of the label. + public static void BeginDebugLabel(this CommandBuffer inCommandBuffer, string inLabel, in float4 inColor = default) + { + Span bytes = stackalloc byte[MAX_DEBUG_LABEL_LENGTH]; + // Encode as much as fits in the 255-byte budget (one byte reserved for the terminator). + // FromUtf16 stops at a character boundary when the destination runs out, so a truncated + // label is still valid UTF-8 rather than ending mid-character. + System.Text.Unicode.Utf8.FromUtf16( + inLabel, + bytes[..(MAX_DEBUG_LABEL_LENGTH - 1)], + out _, + out var written, + replaceInvalidSequences: true, + isFinalBlock: true + ); + bytes[written] = 0; + + BeginDebugLabel(inCommandBuffer, bytes[..(written + 1)], inColor); + } + + private const int MAX_DEBUG_LABEL_LENGTH = 256; + + /// + /// Begins a debug label region and returns a scope that ends it when disposed: + /// using var _ = cmd.DebugScope("Shadow pass"); + /// + /// The Vulkan command buffer to label. + /// The label text. + /// A structure representing the RGBA color of the label. + public static DebugLabelScope DebugScope( + this CommandBuffer inCommandBuffer, + string inLabel, + in float4 inColor = default + ) + { + BeginDebugLabel(inCommandBuffer, inLabel, inColor); + return new DebugLabelScope(inCommandBuffer); + } + + /// + /// Ends the current Vulkan debug label region on the command buffer using + /// vkCmdEndDebugUtilsLabelEXT. + /// This marks the end of a previously started debug label region, allowing Vulkan debugging tools to identify command groups. + /// + /// The Vulkan command buffer on which to end the debug label. + public static void EndDebugLabel(this CommandBuffer inCommandBuffer) + { + inCommandBuffer.EndDebugUtilsLabelEXT(); + } + + /// + /// Begins recording commands on the command buffer with specified usage flags using + /// vkBeginCommandBuffer. + /// + /// The command buffer to begin recording. + /// The usage flags determining how the command buffer will be used. + public static void Begin(this CommandBuffer inCommandBuffer, VkCommandBufferUsageFlags usage) + { + inCommandBuffer.Begin(new VkCommandBufferBeginInfo { Flags = usage }); + } + + /// + /// Begins recording commands on the command buffer with specified usage flags and inheritance information + /// for secondary command buffers, using vkBeginCommandBuffer. + /// + /// The command buffer to begin recording. + /// The usage flags for the command buffer. + /// + /// For secondary command buffers, a pointer to a VkCommandBufferInheritanceInfo structure providing additional state; + /// ignored for primary command buffers. + /// + public static void Begin( + this CommandBuffer inCommandBuffer, + VkCommandBufferUsageFlags usage, + VkCommandBufferInheritanceInfo inheritanceInfo + ) + { + unsafe + { + inCommandBuffer.Begin(new VkCommandBufferBeginInfo { Flags = usage, InheritanceInfo = &inheritanceInfo }); + } + } + + /// + /// Records a command to copy data between buffers using + /// vkCmdCopyBuffer. + /// Copies the specified region from the source buffer to the destination buffer. + /// + /// The command buffer that will record the copy command. + /// The source buffer. + /// The destination buffer. + /// A VkBufferCopy structure defining the region to copy. + public static void CopyBuffer( + this CommandBuffer inCommandBuffer, + VkBuffer inSrcBuffer, + VkBuffer inDstBuffer, + VkBufferCopy inRegion + ) + { + inCommandBuffer.CopyBuffer(inSrcBuffer, inDstBuffer, [inRegion]); + } + + /// + /// Records a command to copy a specified number of bytes from the source buffer to the destination buffer. + /// This is a convenience overload that assumes zero offsets. + /// + /// The command buffer that will record the copy command. + /// The source buffer. + /// The destination buffer. + /// The number of bytes to copy from the start of the buffers. + public static void CopyBuffer( + this CommandBuffer inCommandBuffer, + VkBuffer inSrcBuffer, + VkBuffer inDstBuffer, + ByteSize inSize + ) + { + CopyBuffer( + inCommandBuffer, + inSrcBuffer, + inDstBuffer, + new VkBufferCopy + { + Size = inSize, + DstOffset = ByteSize.Zero, + SrcOffset = ByteSize.Zero, + } + ); + } + + /// + /// Binds a vertex buffer to the command buffer at the specified binding index using + /// vkCmdBindVertexBuffers. + /// + /// The command buffer to record the binding command. + /// The vertex input binding index to update. + /// The vertex buffer to bind. + /// The offset (in bytes) within the buffer to start binding from. Defaults to 0. + public static void BindVertexBuffer( + this CommandBuffer inCommandBuffer, + int inBinding, + VkBuffer inBuffer, + ByteSize inOffset = default + ) + { + inCommandBuffer.BindVertexBuffers(inBinding, [inBuffer], [inOffset]); + } + + /// + /// Records a command to update a push constant value of type in the command buffer using + /// vkCmdPushConstants. + /// + /// The command buffer to record the push constant update. + /// The pipeline layout that defines the push constant ranges. + /// A bitmask of VkShaderStageFlags indicating which shader stages will access the push constant. + /// The byte offset within the push constant range at which to start updating. + /// The push constant value to update. + public static void PushConstants( + this CommandBuffer inCommandBuffer, + VkPipelineLayout inLayout, + VkShaderStageFlags inStageFlags, + ByteSize inOffset, + T inData + ) + where T : unmanaged + { + inCommandBuffer.PushConstants(inLayout, inStageFlags, inOffset, [inData]); + } + + /// + /// Records a command to update a sequence of push constants of type in the command buffer using + /// vkCmdPushConstants. + /// + /// The command buffer to record the push constant update. + /// The pipeline layout that defines the push constant ranges. + /// A bitmask of VkShaderStageFlags indicating which shader stages will access the push constants. + /// The byte offset within the push constant range at which to start updating. + /// A span containing the push constant values to update. + public static void PushConstants( + this CommandBuffer inCommandBuffer, + VkPipelineLayout inLayout, + VkShaderStageFlags inStageFlags, + ByteSize inOffset, + ReadOnlySpan inData + ) + where T : unmanaged + { + unsafe + { + fixed (T* ptr = inData) + { + inCommandBuffer.PInvoke.vkCmdPushConstants.Invoke( + inCommandBuffer.Handle, + inLayout, + inStageFlags, + (int)inOffset, + (int)ByteSize.Of(inData.Length), + ptr + ); + } + } + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/DeviceExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/DeviceExtensions.cs new file mode 100644 index 0000000..7963713 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/DeviceExtensions.cs @@ -0,0 +1,694 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Functions to extend the Device class +/// +public static class DeviceExtensions +{ + /// + /// Creates a default render pass configured for common rendering scenarios. This method sets up attachments for color, + /// depth, and, if multisampling is enabled, resolve operations, and configures the corresponding subpass dependencies. + /// + /// The logical device used for creating the render pass. + /// If true, a color attachment is created and sampled; otherwise, no color attachment is configured. + /// If true, a depth attachment is created and sampled; otherwise, no depth attachment is configured. + /// Specifies the number of samples per pixel. A value other than VkSampleCountFlags._1 indicates that multisampling is enabled. + /// The format to be used for the color attachment image. + /// The format to be used for the depth attachment image. + /// The format to be used for the resolve attachment image when multisampling is enabled. + /// A VkRenderPass object representing the configured render pass. + public static unsafe VkRenderPass CreateDefaultRenderPass( + this Device inDevice, + bool sampleColor, + bool sampleDepth, + VkSampleCountFlags sampleCount, + VkFormat colorFormat, + VkFormat depthFormat, + VkFormat resolvedFormat, + VkAllocator? allocator + ) + { + var multisamplingEnabled = sampleCount != VkSampleCountFlags._1Bit; + + VkAttachmentDescription? colorAttachment = null; + VkAttachmentDescription? depthAttachment = null; + VkAttachmentDescription? resolveAttachment = null; + + // Describe the color attachment + if (sampleColor) + { + var storeOp = VkAttachmentStoreOp.DontCare; + var finalLayout = VkImageLayout.ShaderReadOnlyOptimal; + if (multisamplingEnabled) + { + storeOp = VkAttachmentStoreOp.DontCare; + finalLayout = VkImageLayout.ColorAttachmentOptimal; + } + + colorAttachment = new VkAttachmentDescription + { + Format = colorFormat, + Samples = sampleCount, + LoadOp = VkAttachmentLoadOp.Clear, + StoreOp = storeOp, + StencilLoadOp = VkAttachmentLoadOp.DontCare, + StencilStoreOp = VkAttachmentStoreOp.DontCare, + InitialLayout = VkImageLayout.Undefined, + FinalLayout = finalLayout, + }; + } + + // Describe the depth attachment + if (sampleDepth) + { + depthAttachment = new VkAttachmentDescription + { + Format = depthFormat, + Samples = sampleCount, + LoadOp = VkAttachmentLoadOp.Clear, + StoreOp = VkAttachmentStoreOp.Store, + StencilLoadOp = VkAttachmentLoadOp.DontCare, + StencilStoreOp = VkAttachmentStoreOp.DontCare, + InitialLayout = VkImageLayout.Undefined, + FinalLayout = VkImageLayout.DepthStencilReadOnlyOptimal, + }; + } + + // Describe the Multisample-to-singlesample color resolve attachments + if (multisamplingEnabled) + { + // Resolve color attachment + if (sampleColor) + { + resolveAttachment = new VkAttachmentDescription + { + Format = resolvedFormat, + Samples = VkSampleCountFlags._1Bit, + LoadOp = VkAttachmentLoadOp.DontCare, + StoreOp = VkAttachmentStoreOp.Store, + StencilLoadOp = VkAttachmentLoadOp.DontCare, + StencilStoreOp = VkAttachmentStoreOp.DontCare, + InitialLayout = VkImageLayout.Undefined, + FinalLayout = VkImageLayout.ShaderReadOnlyOptimal, + }; + } + + // Resolve depth attachment + if (sampleDepth) + { + // (Not yet implemented) + } + } + + // Pack the enabled attachments and record the index each one lands at + var attachments = stackalloc VkAttachmentDescription[3]; + var attachmentCount = 0; + + var colorIndex = -1; + var depthIndex = -1; + var resolveIndex = -1; + + if (colorAttachment.HasValue) + { + colorIndex = attachmentCount; + attachments[attachmentCount++] = colorAttachment.Value; + } + if (depthAttachment.HasValue) + { + depthIndex = attachmentCount; + attachments[attachmentCount++] = depthAttachment.Value; + } + if (resolveAttachment.HasValue) + { + resolveIndex = attachmentCount; + attachments[attachmentCount++] = resolveAttachment.Value; + } + + // Describe the attachment references + var references = + stackalloc VkAttachmentReference[3] { + new VkAttachmentReference { Attachment = colorIndex, Layout = VkImageLayout.ColorAttachmentOptimal }, + new VkAttachmentReference + { + Attachment = depthIndex, + Layout = VkImageLayout.DepthStencilAttachmentOptimal, + }, + new VkAttachmentReference { Attachment = resolveIndex, Layout = VkImageLayout.ColorAttachmentOptimal }, + }; + + // Create a subpass + var subpass = new VkSubpassDescription { PipelineBindPoint = VkPipelineBindPoint.Graphics }; + if (colorIndex >= 0) + { + subpass.ColorAttachmentCount = 1; + subpass.ColorAttachments = &references[0]; + } + if (depthIndex >= 0) + { + subpass.DepthStencilAttachment = &references[1]; + } + if (resolveIndex >= 0) + { + subpass.ResolveAttachments = &references[2]; + } + + // Create subpass dependencies determined by whether multisampling is enabled or not + VkSubpassDependency renderSubpass; + VkSubpassDependency? resolveSubpass = null; + if (multisamplingEnabled) + { + renderSubpass = new VkSubpassDependency + { + SrcSubpass = VK.SUBPASS_EXTERNAL, + DstSubpass = 0, + SrcStageMask = VkPipelineStageFlags.ColorAttachmentOutputBit, + DstStageMask = VkPipelineStageFlags.ColorAttachmentOutputBit, + SrcAccessMask = VkAccessFlags.None, + DstAccessMask = VkAccessFlags.ColorAttachmentWriteBit | VkAccessFlags.ColorAttachmentReadBit, + DependencyFlags = VkDependencyFlags.None, + }; + resolveSubpass = new VkSubpassDependency + { + SrcSubpass = VK.SUBPASS_EXTERNAL, + DstSubpass = 0, + SrcStageMask = VkPipelineStageFlags.EarlyFragmentTestsBit | VkPipelineStageFlags.LateFragmentTestsBit, + DstStageMask = VkPipelineStageFlags.EarlyFragmentTestsBit | VkPipelineStageFlags.LateFragmentTestsBit, + SrcAccessMask = VkAccessFlags.DepthStencilAttachmentWriteBit, + DstAccessMask = + VkAccessFlags.DepthStencilAttachmentWriteBit | VkAccessFlags.DepthStencilAttachmentReadBit, + DependencyFlags = VkDependencyFlags.None, + }; + } + else + { + renderSubpass = new VkSubpassDependency + { + SrcSubpass = VK.SUBPASS_EXTERNAL, + DstSubpass = 0, + SrcStageMask = + VkPipelineStageFlags.ColorAttachmentOutputBit | VkPipelineStageFlags.LateFragmentTestsBit, + DstStageMask = + VkPipelineStageFlags.ColorAttachmentOutputBit | VkPipelineStageFlags.EarlyFragmentTestsBit, + SrcAccessMask = VkAccessFlags.DepthStencilAttachmentWriteBit, + DstAccessMask = VkAccessFlags.ColorAttachmentWriteBit | VkAccessFlags.DepthStencilAttachmentWriteBit, + DependencyFlags = VkDependencyFlags.None, + }; + } + + // Build the dependency array we'll be passing to the render pass creation + var dependencies = stackalloc VkSubpassDependency[2]; + + Span subpasses = [subpass]; + + var dependencyCount = 0; + + dependencies[dependencyCount++] = renderSubpass; + if (resolveSubpass.HasValue) + dependencies[dependencyCount++] = resolveSubpass.Value; + + return inDevice.CreateRenderPass( + new VkRenderPassCreateInfo + { + Flags = 0, + AttachmentCount = attachmentCount, + Attachments = attachments, + SubpassCount = subpasses.Length, + Subpasses = subpasses.AsPointer(), + DependencyCount = dependencyCount, + Dependencies = dependencies, + }, + allocator + ); + } + + /// + /// Creates a new pipeline layout object using + /// vkCreatePipelineLayout. + /// + /// The logical device used to create the pipeline layout. + /// + /// A span of handles that define the descriptor set layouts to be used in the pipeline layout. + /// + /// + /// A span of structures specifying the push constant ranges for the pipeline layout. + /// + /// A VkPipelineLayout object representing the created pipeline layout. + public static VkPipelineLayout CreatePipelineLayout( + this Device inDevice, + ReadOnlySpan setLayouts, + ReadOnlySpan pushConstantRanges, + VkAllocator? allocator + ) + { + unsafe + { + fixed (VkDescriptorSetLayout* p1 = setLayouts) + fixed (VkPushConstantRange* p2 = pushConstantRanges) + return inDevice.CreatePipelineLayout( + new VkPipelineLayoutCreateInfo + { + SetLayouts = p1, + PushConstantRanges = p2, + SetLayoutCount = setLayouts.Length, + PushConstantRangeCount = pushConstantRanges.Length, + }, + allocator + ); + } + } + + /// + /// Creates a graphics pipeline using + /// vkCreateGraphicsPipelines. + /// + /// The logical device used for creating the graphics pipeline. + /// + /// A pipeline cache handle. Use VK_NULL_HANDLE if pipeline caching is disabled; otherwise, provide the handle of a valid + /// pipeline cache object to enable caching during pipeline creation. + /// + /// + /// A structure containing the parameters required to create the graphics pipeline. + /// + /// A VkPipeline object representing the created graphics pipeline. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPipeline CreateGraphicsPipeline( + this Device inDevice, + VkPipelineCache inPipelineCache, + VkGraphicsPipelineCreateInfo inCreateInfo, + VkAllocator? allocator + ) + { + VkPipeline pipeline = new(); + inDevice.CreateGraphicsPipelines( + inPipelineCache, + [inCreateInfo], + allocator, + new ReadOnlySpan(&pipeline, 1) + ); + + return pipeline; + } + + /// + /// Creates a compute pipeline using + /// vkCreateComputePipelines. + /// + /// The logical device used for creating the compute pipeline. + /// + /// A pipeline cache handle. Use VK_NULL_HANDLE if pipeline caching is disabled; otherwise, provide the handle of a valid + /// pipeline cache object to enable caching during pipeline creation. + /// + /// + /// A structure containing the parameters required to create the compute pipeline. + /// + /// A VkPipeline object representing the created compute pipeline. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPipeline CreateComputePipeline( + this Device inDevice, + VkPipelineCache inPipelineCache, + VkComputePipelineCreateInfo inCreateInfo, + VkAllocator? allocator + ) + { + VkPipeline pipeline = new(); + inDevice.CreateComputePipelines( + inPipelineCache, + [inCreateInfo], + allocator, + new ReadOnlySpan(&pipeline, 1) + ); + + return pipeline; + } + + /// + /// Query a buffer's GPU virtual address using + /// vkGetBufferDeviceAddress. + /// The buffer must have been created with and its memory + /// allocated with . + /// + /// The logical device that owns the buffer. + /// The buffer to query. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkDeviceAddress GetBufferDeviceAddress(this Device inDevice, VkBuffer inBuffer) + { + return inDevice.GetBufferDeviceAddress(new VkBufferDeviceAddressInfo { Buffer = inBuffer }); + } + + /// + /// Allocates a single command buffer from the specified command pool using + /// vkAllocateCommandBuffers. + /// + /// The logical device that owns the command pool. + /// A structure specifying the command pool and allocation parameters. + /// A CommandBuffer object representing the allocated command buffer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe CommandBuffer AllocateCommandBuffer(this Device device, VkCommandBufferAllocateInfo createInfo) + { + Span commandBufferHandles = stackalloc VkCommandBuffer[1]; + createInfo.CommandBufferCount = 1; + device.AllocateCommandBuffersInternal(createInfo, commandBufferHandles); + return new CommandBuffer(device, commandBufferHandles[0]); + } + + /// + /// Allocates multiple command buffers from the specified command pool using + /// vkAllocateCommandBuffers. + /// + /// The logical device that owns the command pool. + /// A structure specifying the command pool and allocation parameters. + /// A span of to store the allocated command buffers. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void AllocateCommandBuffers( + this Device device, + VkCommandBufferAllocateInfo createInfo, + Span commandBuffers + ) + { + if (commandBuffers.Length == 0) + throw new ArgumentException("The command buffer span must not be empty.", nameof(commandBuffers)); + + Span commandBufferHandles = stackalloc VkCommandBuffer[commandBuffers.Length]; + createInfo.CommandBufferCount = commandBuffers.Length; + device.AllocateCommandBuffersInternal(createInfo, commandBufferHandles); + for (var i = 0; i < commandBuffers.Length; i++) + commandBuffers[i] = new CommandBuffer(device, commandBufferHandles[i]); + } + + /// + /// Allocates device memory for a buffer using + /// vkAllocateMemory. + /// It queries the memory requirements of the specified buffer and selects an appropriate memory type that matches the required properties. + /// + /// The logical device that owns the memory. + /// The physical device used to determine a compatible memory type. + /// The buffer for which memory is to be allocated. + /// The required memory property flags that the allocated memory must satisfy. + /// A VkDeviceMemory object representing the allocated memory for the buffer. + public static VkDeviceMemory AllocateMemory( + this Device inDevice, + PhysicalDevice inPhysicalDevice, + VkBuffer inBuffer, + VkMemoryPropertyFlags inRequiredProperties, + VkAllocator? allocator + ) + { + // Check the memory requirements for the vertex buffer + var bufferMemoryRequirements = inDevice.GetBufferMemoryRequirements(inBuffer); + var bufferMemoryTypeIndex = inPhysicalDevice.FindMemoryType( + bufferMemoryRequirements.MemoryTypeBits, + inRequiredProperties + ); + + // Allocate memory for the vertex buffer + var memory = inDevice.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = bufferMemoryRequirements.Size, + MemoryTypeIndex = bufferMemoryTypeIndex, + }, + allocator + ); + + return memory; + } + + /// + /// Allocates device memory for an image using + /// vkAllocateMemory. + /// It queries the memory requirements of the specified image and selects an appropriate memory type that meets the required properties. + /// + /// The logical device that owns the memory. + /// The physical device used to determine a compatible memory type. + /// The image for which memory is to be allocated. + /// The required memory property flags that the allocated memory must satisfy. + /// A VkDeviceMemory object representing the allocated memory for the image. + public static VkDeviceMemory AllocateMemory( + this Device inDevice, + PhysicalDevice inPhysicalDevice, + VkImage inImage, + VkMemoryPropertyFlags inRequiredProperties, + VkAllocator? allocator + ) + { + // Check the memory requirements for the vertex buffer + var bufferMemoryRequirements = inDevice.GetImageMemoryRequirements(inImage); + var bufferMemoryTypeIndex = inPhysicalDevice.FindMemoryType( + bufferMemoryRequirements.MemoryTypeBits, + inRequiredProperties + ); + + // Allocate memory for the vertex buffer + var memory = inDevice.AllocateMemory( + new VkMemoryAllocateInfo + { + AllocationSize = bufferMemoryRequirements.Size, + MemoryTypeIndex = bufferMemoryTypeIndex, + }, + allocator + ); + + return memory; + } + + /// + /// Maps device memory to a pointer of type T using vkMapMemory. + /// + /// The logical device that owns the memory. + /// A structure specifying the memory range to map. + /// A pointer to the mapped memory cast to type T. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Ptr MapMemory(this Device inDevice, in MapInfo mapInfo) + where T : unmanaged + { + return inDevice.MapMemory(mapInfo).Cast(); + } + + /// + /// Maps device memory to a pointer of type T using vkMapMemory. + /// + /// The logical device that owns the memory. + /// A structure specifying the memory range to map. + /// A pointer to the mapped memory cast to type T. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Ptr MapMemory(this Device inDevice, in MapInfo mapInfo) + { + if (mapInfo.Region.Size < 1 && mapInfo.Region.Size != VK.WHOLE_SIZE) + throw new ArgumentOutOfRangeException( + nameof(mapInfo.Region.Size), + "The size of the memory region must be greater than zero, or VK.WHOLE_SIZE." + ); + + var ptr = inDevice.MapMemory(mapInfo.Memory, mapInfo.Region.Offset, mapInfo.Region.Size, mapInfo.Flags); + + return ptr; + } + + /// + /// Writes data from a span to device memory. This method maps the specified memory, copies the data from the source span, + /// and then unmaps the memory. + /// + /// The type of elements in the source span. + /// The logical device that owns the destination memory. + /// The source span containing the data to write. + /// The VkDeviceMemory object that will receive the data. + /// The zero-based byte offset from the beginning of the memory object at which to start writing. + /// Reserved for future use; typically set to VkMemoryMapFlags.None. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteMemory( + this Device inDevice, + Span inSrc, + VkDeviceMemory inDstMemory, + ByteSize inOffset = default, + VkMemoryMapFlags inFlags = VkMemoryMapFlags.None + ) + where T : unmanaged + { + Ptr ptr = inDevice.MapMemory(inDstMemory, inOffset, ByteSize.Of(inSrc), inFlags); + Mem.Copy(inSrc, ptr.AsSpan(inSrc.Length)); + inDevice.UnmapMemory(inDstMemory); + } + + /// + /// Writes data from an array to device memory. This method maps the specified memory, copies the data from the source array, + /// and then unmaps the memory. + /// + /// The type of elements in the source array. + /// The logical device that owns the destination memory. + /// The source array containing the data to write. + /// The VkDeviceMemory object that will receive the data. + /// The zero-based byte offset from the beginning of the memory object at which to start writing. + /// Reserved for future use; typically set to VkMemoryMapFlags.None. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteMemory( + this Device inDevice, + ReadOnlySpan inSrc, + VkDeviceMemory inDstMemory, + ByteSize inOffset = default, + VkMemoryMapFlags inFlags = VkMemoryMapFlags.None + ) + where T : unmanaged + { + Ptr ptr = inDevice.MapMemory(inDstMemory, inOffset, ByteSize.Of(inSrc), inFlags); + Mem.Copy(inSrc, ptr.AsSpan(inSrc.Length)); + inDevice.UnmapMemory(inDstMemory); + } + + /// + /// Binds a descriptor set to a command buffer using + /// vkCmdBindDescriptorSets. + /// An optional dynamic offset can be provided. + /// + /// The command buffer to which the descriptor set will be bound. + /// + /// The pipeline bind point indicating the type of pipeline that will use the descriptor set. Binding at a specific bind point + /// does not disturb descriptor sets bound at other bind points. + /// + /// The pipeline layout that defines the descriptor set bindings. + /// The index of the descriptor set to bind. + /// The descriptor set to be bound to the command buffer. + /// + /// Span of dynamic offsets to be used with the descriptor set. If no dynamic offsets are needed, pass an empty span. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindDescriptorSet( + this CommandBuffer inCommandBuffer, + VkPipelineBindPoint inPipelineBindPoint, + VkPipelineLayout inLayout, + int inSet, + VkDescriptorSet inDescriptorSet, + Span inDynamicOffsets + ) + { + inCommandBuffer.BindDescriptorSets(inPipelineBindPoint, inLayout, inSet, [inDescriptorSet], inDynamicOffsets); + } + + /// + /// Binds any 's set (and its dynamic offsets, if it declares any) + /// to a command buffer. See + /// vkCmdBindDescriptorSets. + /// + /// The command buffer to which the descriptor set will be bound. + /// The pipeline bind point the set is consumed at. + /// The pipeline layout that defines the descriptor set bindings. + /// The index of the descriptor set to bind. + /// The wrapper whose set and dynamic offsets are bound. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDescriptorSet( + this CommandBuffer inCommandBuffer, + VkPipelineBindPoint inPipelineBindPoint, + VkPipelineLayout inLayout, + int inSet, + IDescriptorSetWrapper inDescriptorSetWrapper + ) + { + var descriptorSet = inDescriptorSetWrapper.DescriptorSet; + var dynamicOffsets = inDescriptorSetWrapper.DynamicOffsets; + + // Pinned raw call: the offsets are read-only, but the generated BindDescriptorSets wrapper + // currently demands a mutable span even though vkCmdBindDescriptorSets takes a const pointer + fixed (ByteSize32* dynamicOffsetsPtr = dynamicOffsets) + { + inCommandBuffer.PInvoke.vkCmdBindDescriptorSets.Invoke( + inCommandBuffer.Handle, + inPipelineBindPoint, + inLayout, + inSet, + 1, + &descriptorSet, + dynamicOffsets.Length, + (int*)dynamicOffsetsPtr + ); + } + } + + /// + /// Creates a new fence object using + /// vkCreateFence. + /// + /// The logical device that creates the fence. + /// + /// Flags that control the creation and initial state of the fence. See for details. + /// + /// A VkFence object representing the created fence. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkFence CreateFence(this Device inDevice, VkFenceCreateFlags inCreateFlags, VkAllocator? allocator) + { + return inDevice.CreateFence(new VkFenceCreateInfo { Flags = inCreateFlags }, allocator); + } + + /// + /// Waits for a fence to become signaled using + /// vkWaitForFences. + /// The timeout value is adjusted to the closest allowed value by the implementation. + /// + /// The logical device that owns the fence. + /// The fence to wait on. + /// + /// The timeout period in nanoseconds. The actual timeout may be longer than requested due to implementation-dependent timeout accuracy. + /// + /// A VkResult indicating the outcome of the wait operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult WaitForFence(this Device inDevice, VkFence inFence, nint inTimeout) + { + return inDevice.WaitForFences([inFence], true, inTimeout); + } + + /// + /// vkFreeCommandBuffers - Free command buffers + /// + /// + /// + /// To free command buffers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkFreeCommandBuffers( + /// VkDevice device, + /// VkCommandPool commandPool, + /// uint32_t commandBufferCount, + /// const VkCommandBuffer* pCommandBuffers); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FreeCommandBuffers( + this VulkanHandleWrapper handle, + VkCommandPool commandPool, + ReadOnlySpan pCommandBuffers + ) + { + Span vkCommandBuffers = stackalloc VkCommandBuffer[pCommandBuffers.Length]; + for (var index = 0; index < pCommandBuffers.Length; index++) + vkCommandBuffers[index] = pCommandBuffers[index].Handle; + handle.FreeCommandBuffersInternal(commandPool, vkCommandBuffers); + } + + /// + /// vkCmdExecuteCommands - Execute a secondary command buffer from a primary command buffer + /// + /// + /// + /// Secondary command buffers must not be directly submitted to a queue. + /// To record a secondary command buffer to execute as part of a primary command + /// buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdExecuteCommands( + /// VkCommandBuffer commandBuffer, + /// uint32_t commandBufferCount, + /// const VkCommandBuffer* pCommandBuffers); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ExecuteCommands( + this VulkanHandleWrapper handle, + ReadOnlySpan pCommandBuffers + ) + { + Span vkCommandBuffers = stackalloc VkCommandBuffer[pCommandBuffers.Length]; + for (var index = 0; index < pCommandBuffers.Length; index++) + vkCommandBuffers[index] = pCommandBuffers[index].Handle; + handle.CmdExecuteCommandsInternal(vkCommandBuffers); + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/DisposableExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/DisposableExtensions.cs new file mode 100644 index 0000000..eb5ffe4 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/DisposableExtensions.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Provides extension methods for IDisposable objects. +/// +public static class DisposableExtensions +{ + /// + /// Disposes each element in the provided span. + /// + /// The type of IDisposable objects. + /// The span of IDisposable objects to dispose. + public static void Dispose(this Span inObjects) + where T : IDisposable + { + foreach (var obj in inObjects) + obj.Dispose(); + } + + /// + /// Disposes each element in the provided array. + /// + /// The type of IDisposable objects. + /// The array of IDisposable objects to dispose. + public static void Dispose(this T[] inObjects) + where T : IDisposable + { + foreach (var obj in inObjects) + obj.Dispose(); + } + + /// + /// Disposes each element in the provided enumerable collection. + /// + /// The type of IDisposable objects. + /// The enumerable collection of IDisposable objects to dispose. + public static void Destroy(this IEnumerable inObjects) + where T : IDisposable + { + using var enumerator = inObjects.GetEnumerator(); + + while (enumerator.MoveNext()) + enumerator.Current.Dispose(); + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/FormatExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/FormatExtensions.cs new file mode 100644 index 0000000..4a2adc7 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/FormatExtensions.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Classification helpers for . +/// +public static class FormatExtensions +{ + /// + /// True when the format has a depth component (including packed depth-stencil formats). + /// + public static bool IsDepthFormat(this VkFormat format) => + format switch + { + VkFormat.D16UNorm + or VkFormat.X8D24UNormPack32 + or VkFormat.D32SFloat + or VkFormat.D16UNormS8UInt + or VkFormat.D24UNormS8UInt + or VkFormat.D32SFloatS8UInt => true, + _ => false, + }; + + /// + /// True when the format has a stencil component (including packed depth-stencil formats). + /// + public static bool IsStencilFormat(this VkFormat format) => + format switch + { + VkFormat.S8UInt or VkFormat.D16UNormS8UInt or VkFormat.D24UNormS8UInt or VkFormat.D32SFloatS8UInt => true, + _ => false, + }; + + /// + /// True when the format has both a depth and a stencil component. + /// + public static bool IsDepthStencilFormat(this VkFormat format) => + format switch + { + VkFormat.D16UNormS8UInt or VkFormat.D24UNormS8UInt or VkFormat.D32SFloatS8UInt => true, + _ => false, + }; + + /// + /// The full aspect mask implied by the format: depth and/or stencil bits for depth-stencil + /// formats, otherwise . + /// + public static VkImageAspectFlags GetAspectMask(this VkFormat format) => + format switch + { + VkFormat.D16UNormS8UInt or VkFormat.D24UNormS8UInt or VkFormat.D32SFloatS8UInt => + VkImageAspectFlags.DepthBit | VkImageAspectFlags.StencilBit, + VkFormat.S8UInt => VkImageAspectFlags.StencilBit, + VkFormat.D16UNorm or VkFormat.X8D24UNormPack32 or VkFormat.D32SFloat => VkImageAspectFlags.DepthBit, + _ => VkImageAspectFlags.ColorBit, + }; +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/InstanceExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/InstanceExtensions.cs new file mode 100644 index 0000000..af0afbf --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/InstanceExtensions.cs @@ -0,0 +1,6 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Provides extension methods for managing a Vulkan instance +/// +public static class InstanceExtensions { } diff --git a/Brutal.Vulkan.Abstractions/Extensions/MapInfo.cs b/Brutal.Vulkan.Abstractions/Extensions/MapInfo.cs new file mode 100644 index 0000000..997d134 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/MapInfo.cs @@ -0,0 +1,22 @@ +using System.Diagnostics; + +namespace Brutal.VulkanApi.Abstractions; + +[DebuggerDisplay("Offset: {Offset}, Size: {Size}")] +public struct MapRegion() +{ + public ByteSize Offset { get; init; } = ByteSize.Zero; + public ByteSize Size { get; init; } = VK.WHOLE_SIZE; +} + +/// +/// Information required to map a memory region. +/// +public readonly struct MapInfo(VkDeviceMemory memory) +{ + public readonly VkDeviceMemory Memory = memory; + public MapRegion Region { get; init; } = new(); + public VkMemoryMapFlags Flags { get; init; } = VkMemoryMapFlags.None; + + public static implicit operator MapInfo(VkDeviceMemory memory) => new(memory); +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/PhysicalDeviceExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/PhysicalDeviceExtensions.cs new file mode 100644 index 0000000..cbcb427 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/PhysicalDeviceExtensions.cs @@ -0,0 +1,81 @@ +using System.Numerics; + +namespace Brutal.VulkanApi.Abstractions; + +public static class PhysicalDeviceExtensions +{ + public static DeviceEx CreateDevice(this PhysicalDevice physicalDevice, DeviceEx.CreateInfo createInfo) + { + return new DeviceEx(physicalDevice, createInfo); + } + + /// + /// Return the first format from that supports all of + /// under the given tiling, or + /// when none qualifies. Typical use: picking a supported depth(-stencil) format. + /// + public static VkFormat FindSupportedFormat( + this PhysicalDevice physicalDevice, + ReadOnlySpan candidates, + VkImageTiling tiling, + VkFormatFeatureFlags features + ) + { + foreach (var format in candidates) + { + var properties = physicalDevice.GetFormatProperties(format); + + var supported = tiling switch + { + VkImageTiling.Optimal => properties.OptimalTilingFeatures, + VkImageTiling.Linear => properties.LinearTilingFeatures, + _ => VkFormatFeatureFlags.None, + }; + + if ((supported & features) == features) + return format; + } + + return VkFormat.Undefined; + } + + /// + /// Find the queue family that has all of , none of + /// , and the fewest extra capabilities - so a dedicated + /// family (e.g. transfer-only, or compute without graphics) wins over the do-everything + /// family when one exists. Returns -1 when no family qualifies. + /// + public static int FindQueueFamily( + this PhysicalDevice physicalDevice, + VkQueueFlags requiredFlags, + VkQueueFlags excludedFlags = VkQueueFlags.None + ) + { + using var properties = SpanOwner.Allocate( + physicalDevice.GetQueueFamilyProperties_Count() + ); + physicalDevice.GetQueueFamilyProperties_Write(properties.Span); + + var bestFamily = -1; + var bestExtraFlags = int.MaxValue; + + for (var i = 0; i < properties.Length; ++i) + { + var flags = properties.Span[i].QueueFlags; + + if ((flags & requiredFlags) != requiredFlags) + continue; + if ((flags & excludedFlags) != 0) + continue; + + var extraFlags = BitOperations.PopCount(unchecked((uint)(int)(flags & ~requiredFlags))); + if (extraFlags >= bestExtraFlags) + continue; + + bestFamily = i; + bestExtraFlags = extraFlags; + } + + return bestFamily; + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/QueueExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/QueueExtensions.cs new file mode 100644 index 0000000..fe61719 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/QueueExtensions.cs @@ -0,0 +1,137 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Provides extension methods for submitting command buffers and handling synchronization for Vulkan queues. +/// +public static class QueueExtensions +{ + /// + /// Submits command buffers to a Vulkan queue with specified wait and signal semaphores, and a fence for synchronization. + /// + /// The Vulkan queue to submit command buffers to. + /// A span of semaphores to wait on before executing the command buffers. + /// A span of pipeline stage flags indicating the stages to wait for. + /// A span of command buffers to execute. + /// A span of semaphores to signal after executing the command buffers. + /// A fence that is signaled when the queue finishes executing the submitted command buffers. + public static void Submit( + this Queue queue, + Span waitSemaphores, + Span waitDstStageMask, + Span commandBuffers, + Span signalSemaphores, + VkFence fence + ) + { + // The implementation reads WaitSemaphoreCount stage masks, so a shorter span is an out-of-bounds read + if (waitDstStageMask.Length != waitSemaphores.Length) + throw new ArgumentException( + "waitDstStageMask must be the same length as waitSemaphores", + nameof(waitDstStageMask) + ); + + unsafe + { + var commandBuffersPtr = stackalloc VkCommandBuffer[commandBuffers.Length]; + for (var i = 0; i < commandBuffers.Length; i++) + commandBuffersPtr[i] = commandBuffers[i].Handle; + + fixed (VkSemaphore* waitSemaphoresPtr = waitSemaphores) + fixed (VkPipelineStageFlags* waitDstStageMaskPtr = waitDstStageMask) + fixed (VkSemaphore* signalSemaphoresPtr = signalSemaphores) + { + var submitInfo = new VkSubmitInfo + { + WaitSemaphoreCount = waitSemaphores.Length, + WaitSemaphores = waitSemaphoresPtr, + WaitDstStageMask = waitDstStageMaskPtr, + CommandBufferCount = commandBuffers.Length, + CommandBuffers = commandBuffersPtr, + SignalSemaphoreCount = signalSemaphores.Length, + SignalSemaphores = signalSemaphoresPtr, + }; + + queue.Submit([submitInfo], fence); + } + } + } + + /// + /// Submits command buffers with timeline-semaphore wait/signal values, chaining a + /// VkTimelineSemaphoreSubmitInfo + /// onto the submit. The value spans must be the same length as their semaphore spans; + /// entries for binary semaphores are ignored by the implementation, so leave them zero. + /// + /// The Vulkan queue to submit command buffers to. + /// A span of semaphores to wait on before executing the command buffers. + /// A span of pipeline stage flags indicating the stages to wait for. + /// Timeline values to wait for, one per wait semaphore. + /// A span of command buffers to execute. + /// A span of semaphores to signal after executing the command buffers. + /// Timeline values to signal, one per signal semaphore. + /// A fence that is signaled when the queue finishes executing the submitted command buffers. + public static void Submit( + this Queue queue, + Span waitSemaphores, + Span waitDstStageMask, + ReadOnlySpan waitSemaphoreValues, + Span commandBuffers, + Span signalSemaphores, + ReadOnlySpan signalSemaphoreValues, + VkFence fence + ) + { + // The implementation reads WaitSemaphoreCount stage masks, so a shorter span is an out-of-bounds read + if (waitDstStageMask.Length != waitSemaphores.Length) + throw new ArgumentException( + "waitDstStageMask must be the same length as waitSemaphores", + nameof(waitDstStageMask) + ); + if (waitSemaphoreValues.Length != waitSemaphores.Length) + throw new ArgumentException( + "waitSemaphoreValues must be the same length as waitSemaphores", + nameof(waitSemaphoreValues) + ); + if (signalSemaphoreValues.Length != signalSemaphores.Length) + throw new ArgumentException( + "signalSemaphoreValues must be the same length as signalSemaphores", + nameof(signalSemaphoreValues) + ); + + unsafe + { + var commandBuffersPtr = stackalloc VkCommandBuffer[commandBuffers.Length]; + for (var i = 0; i < commandBuffers.Length; i++) + commandBuffersPtr[i] = commandBuffers[i].Handle; + + fixed (VkSemaphore* waitSemaphoresPtr = waitSemaphores) + fixed (VkPipelineStageFlags* waitDstStageMaskPtr = waitDstStageMask) + fixed (VkSemaphore* signalSemaphoresPtr = signalSemaphores) + fixed (ulong* waitValuesPtr = waitSemaphoreValues) + fixed (ulong* signalValuesPtr = signalSemaphoreValues) + { + var timelineInfo = new VkTimelineSemaphoreSubmitInfo + { + WaitSemaphoreValueCount = waitSemaphoreValues.Length, + WaitSemaphoreValues = (nint*)waitValuesPtr, + SignalSemaphoreValueCount = signalSemaphoreValues.Length, + SignalSemaphoreValues = (nint*)signalValuesPtr, + }; + + var submitInfo = new VkSubmitInfo + { + Next = &timelineInfo, + WaitSemaphoreCount = waitSemaphores.Length, + WaitSemaphores = waitSemaphoresPtr, + WaitDstStageMask = waitDstStageMaskPtr, + CommandBufferCount = commandBuffers.Length, + CommandBuffers = commandBuffersPtr, + SignalSemaphoreCount = signalSemaphores.Length, + SignalSemaphores = signalSemaphoresPtr, + }; + + queue.Submit([submitInfo], fence); + } + } + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/ShaderModuleExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/ShaderModuleExtensions.cs new file mode 100644 index 0000000..8434037 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/ShaderModuleExtensions.cs @@ -0,0 +1,12 @@ +namespace Brutal.VulkanApi.Abstractions; + +public static class ShaderModuleExtensions +{ + public static unsafe VkShaderModule FromSpirv(Device device, ReadOnlySpan bytes, VkAllocator? allocator) + { + return device.CreateShaderModule( + new VkShaderModuleCreateInfo { Code = bytes.Cast().AsPointer(), CodeSize = ByteSize.Of(bytes) }, + allocator + ); + } +} diff --git a/Brutal.Vulkan.Abstractions/Extensions/SubresourceExtensions.cs b/Brutal.Vulkan.Abstractions/Extensions/SubresourceExtensions.cs new file mode 100644 index 0000000..bd442d7 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Extensions/SubresourceExtensions.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Factories for the common shapes. +/// +public static class Subresources +{ + /// + /// All mip levels and array layers of an image, using / + /// . Valid for barriers and image views; copy commands + /// need explicit counts. + /// + public static VkImageSubresourceRange Full(VkImageAspectFlags aspectMask) => + new() + { + AspectMask = aspectMask, + BaseMipLevel = 0, + LevelCount = VK.REMAINING_MIP_LEVELS, + BaseArrayLayer = 0, + LayerCount = VK.REMAINING_ARRAY_LAYERS, + }; + + /// + /// A single mip level of a single array layer - the shape of most render targets. + /// + public static VkImageSubresourceRange Single(VkImageAspectFlags aspectMask, int mipLevel = 0, int arrayLayer = 0) => + new() + { + AspectMask = aspectMask, + BaseMipLevel = mipLevel, + LevelCount = 1, + BaseArrayLayer = arrayLayer, + LayerCount = 1, + }; + + /// + /// A contiguous run of mip levels across a single array layer. + /// + public static VkImageSubresourceRange Mips( + VkImageAspectFlags aspectMask, + int baseMipLevel, + int levelCount, + int arrayLayer = 0 + ) => + new() + { + AspectMask = aspectMask, + BaseMipLevel = baseMipLevel, + LevelCount = levelCount, + BaseArrayLayer = arrayLayer, + LayerCount = 1, + }; + + /// + /// A contiguous run of array layers at a single mip level. + /// + public static VkImageSubresourceRange Layers( + VkImageAspectFlags aspectMask, + int baseArrayLayer, + int layerCount, + int mipLevel = 0 + ) => + new() + { + AspectMask = aspectMask, + BaseMipLevel = mipLevel, + LevelCount = 1, + BaseArrayLayer = baseArrayLayer, + LayerCount = layerCount, + }; +} + +/// +/// Conversions between and . +/// +public static class SubresourceExtensions +{ + /// + /// Convert a subresource range to the for one of its mip levels, + /// as consumed by copy and blit commands. The range's LayerCount must be explicit + /// (not ). + /// + /// The source range. + /// Mip level relative to the range's BaseMipLevel. + public static VkImageSubresourceLayers ToLayers(this VkImageSubresourceRange range, int mipLevel = 0) => + new() + { + AspectMask = range.AspectMask, + MipLevel = range.BaseMipLevel + mipLevel, + BaseArrayLayer = range.BaseArrayLayer, + LayerCount = range.LayerCount, + }; +} diff --git a/Brutal.Vulkan.Abstractions/FrameResources.cs b/Brutal.Vulkan.Abstractions/FrameResources.cs new file mode 100644 index 0000000..346fd9f --- /dev/null +++ b/Brutal.Vulkan.Abstractions/FrameResources.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Structure to hold frame resources for the Renderer +/// +public class FrameResources(Device inDevice) : IDisposable +{ + /// Index of this frame + public int FrameIndex = 0; + + /// Framebuffer for this frame + public VkFramebuffer Framebuffer = default; + + /// Image for the swapchain + public VkImage ColorImage = default; + + /// Whether this frame owns the color image + public bool OwnsColorImage = false; + + /// Bound memory for the SwapchainImage + public VkDeviceMemory ColorImageMemory = default; + + /// Image view for the swapchain + public VkImageView ColorImageView = default; + + /// Image for the depth buffer + public VkImage DepthImage = default; + + /// Bound memory for the DepthImage + public VkDeviceMemory DepthImageMemory = default; + + /// Image view for the depth buffer + public VkImageView DepthImageView = default; + + /// Image for the multisampled image + public VkImage MultisampledImage = default; + + /// Bound memory for the MultisampledImage + public VkDeviceMemory MultisampledImageMemory = default; + + /// Image view for the multisampled image + public VkImageView MultisampledImageView = default; + + public required VkAllocator? Allocator; + + public void Dispose() + { + inDevice.DestroyImageView(ColorImageView, Allocator); + inDevice.DestroyImageView(DepthImageView, Allocator); + inDevice.DestroyImageView(MultisampledImageView, Allocator); + + if (OwnsColorImage) + { + inDevice.DestroyImage(ColorImage, Allocator); + inDevice.FreeMemory(ColorImageMemory, Allocator); + } + + inDevice.DestroyImage(DepthImage, Allocator); + inDevice.DestroyImage(MultisampledImage, Allocator); + inDevice.FreeMemory(DepthImageMemory, Allocator); + inDevice.FreeMemory(MultisampledImageMemory, Allocator); + + inDevice.DestroyFramebuffer(Framebuffer, Allocator); + } +} diff --git a/Brutal.Vulkan.Abstractions/GlobalUsings.cs b/Brutal.Vulkan.Abstractions/GlobalUsings.cs new file mode 100644 index 0000000..f4e8ef0 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/GlobalUsings.cs @@ -0,0 +1,10 @@ +global using System.Runtime.CompilerServices; +global using Brutal.Collections; +global using Brutal.Logging; +global using Brutal.Memory; +global using Brutal.Numerics; +global using Brutal.Pointers; +global using Brutal.Pointers.Extensions; +global using Brutal.Strings; +global using CommunityToolkit.HighPerformance; +global using CommunityToolkit.HighPerformance.Buffers; diff --git a/Brutal.Vulkan.Abstractions/IBindBuffer.cs b/Brutal.Vulkan.Abstractions/IBindBuffer.cs new file mode 100644 index 0000000..78207d5 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/IBindBuffer.cs @@ -0,0 +1,155 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// An interface describing a buffer that can be bound to a command buffer. +/// +public interface IBindBuffer +{ + /// + /// The Vulkan buffer handle. + /// + public VkBuffer VkBuffer { get; } + + /// + /// The offset within the parent buffer where this buffer starts for binding. + /// + public ByteSize BindOffset { get; } +} + +public static class BindBufferExtensions +{ + /// + /// Binds a vertex buffer to the command buffer at the specified binding index using + /// vkCmdBindVertexBuffers. + /// + /// The command buffer to record the binding command. + /// The vertex input binding index to update. + /// The vertex buffer to bind. + /// Optional additional offset to add to the buffer's bind offset. + public static void BindVertexBuffer( + this CommandBuffer inCommandBuffer, + int inBinding, + T inBuffer, + ByteSize inAdditionalOffset = default + ) + where T : IBindBuffer + { + inCommandBuffer.BindVertexBuffer(inBinding, inBuffer.VkBuffer, inBuffer.BindOffset + inAdditionalOffset); + } + + ///vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer + ///is the command buffer into which the command is recorded. + ///is the index of the first vertex input binding whose state is updated by the command. + ///is a pointer to an array of buffer handles. + public static unsafe void BindVertexBuffers( + this CommandBuffer inCommandBuffer, + int inFirstBinding, + Span inBuffers + ) + where T : IBindBuffer + { + Span buffers = stackalloc VkBuffer[inBuffers.Length]; + Span offsets = stackalloc ByteSize64[inBuffers.Length]; + + for (var i = 0; i < inBuffers.Length; i++) + { + buffers[i] = inBuffers[i].VkBuffer; + offsets[i] = inBuffers[i].BindOffset; + } + + inCommandBuffer.BindVertexBuffers(inFirstBinding, buffers, offsets); + } + + ///vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer + ///is the command buffer into which the command is recorded. + ///is the index of the first vertex input binding whose state is updated by the command. + ///is a pointer to an array of buffer handles. + ///is a pointer to an array of buffer offsets, beyond the buffer's bind offset. + public static unsafe void BindVertexBuffers( + this CommandBuffer inCommandBuffer, + int inFirstBinding, + Span inBuffers, + Span inAdditionalOffsets + ) + where T : IBindBuffer + { + if (inBuffers.Length != inAdditionalOffsets.Length) + throw new ArgumentException("inBuffers and inAdditionalOffsets must be the same length"); + + Span buffers = stackalloc VkBuffer[inBuffers.Length]; + Span offsets = stackalloc ByteSize64[inBuffers.Length]; + + for (var i = 0; i < inBuffers.Length; i++) + { + buffers[i] = inBuffers[i].VkBuffer; + offsets[i] = inBuffers[i].BindOffset + inAdditionalOffsets[i]; + } + + inCommandBuffer.BindVertexBuffers(inFirstBinding, buffers, offsets); + } + + ///vkCmdBindIndexBuffer - Bind an index buffer to a command buffer + ///is the command buffer into which the command is recorded. + ///is the buffer being bound. + ///is a VkIndexType value specifying the size of the indices. + public static void BindIndexBuffer(this CommandBuffer inCommandBuffer, T inBuffer, VkIndexType inIndexType) + where T : IBindBuffer + { + inCommandBuffer.BindIndexBuffer(inBuffer.VkBuffer, inBuffer.BindOffset, inIndexType); + } + + /// vkCmdBindIndexBuffer - Bind an index buffer to a command buffer + /// is the command buffer into which the command is recorded. + /// is the buffer being bound. + /// is an additional offset to add to the buffer's bind offset. + /// is a VkIndexType value specifying the size of the indices. + public static void BindIndexBuffer( + this CommandBuffer inCommandBuffer, + T inBuffer, + ByteSize inAdditionalOffset, + VkIndexType inIndexType + ) + where T : IBindBuffer + { + inCommandBuffer.BindIndexBuffer(inBuffer.VkBuffer, inBuffer.BindOffset + inAdditionalOffset, inIndexType); + } + + ///vkCmdDrawIndirect - Draw primitives with indirect parameters + ///is the command buffer into which the command is recorded. + ///is the buffer containing draw parameters. + ///is the number of draws to execute, and can be zero. + ///is the byte stride between successive sets of draw parameters. + public static void DrawIndirect( + this CommandBuffer inCommandBuffer, + T inBuffer, + ElementCount inDrawCount, + ByteSize inStride + ) + where T : IBindBuffer + { + inCommandBuffer.DrawIndirect(inBuffer.VkBuffer, inBuffer.BindOffset, inDrawCount, inStride); + } + + /// vkCmdDrawIndirect - Draw primitives with indirect parameters + /// is the command buffer into which the command is recorded. + /// is the buffer containing draw parameters. + /// is an additional offset to add to the buffer's bind offset. + /// is the number of draws to execute, and can be zero. + /// is the byte stride between successive sets of draw parameters. + public static void DrawIndirect( + this CommandBuffer inCommandBuffer, + T inBuffer, + ByteSize inAdditionalOffset, + ElementCount inDrawCount, + ByteSize inStride + ) + where T : IBindBuffer + { + inCommandBuffer.DrawIndirect( + inBuffer.VkBuffer, + inBuffer.BindOffset + inAdditionalOffset, + inDrawCount, + inStride + ); + } +} diff --git a/Brutal.Vulkan.Abstractions/IDescriptorSetWrapper.cs b/Brutal.Vulkan.Abstractions/IDescriptorSetWrapper.cs new file mode 100644 index 0000000..ffc9618 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/IDescriptorSetWrapper.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Anything that owns a descriptor set layout. +/// +public interface IDescriptorSetLayoutWrapper +{ + /// + /// The descriptor set layout handle. + /// + VkDescriptorSetLayout DescriptorSetLayout { get; } +} + +/// +/// Anything that owns a descriptor set (and its layout). Lets command recording bind any +/// subsystem's set uniformly via +/// . +/// +public interface IDescriptorSetWrapper : IDescriptorSetLayoutWrapper +{ + /// + /// The descriptor set handle. + /// + VkDescriptorSet DescriptorSet { get; } + + /// + /// Dynamic offsets to bind with the set. Empty by default; implement for sets that + /// contain dynamic uniform or storage buffers. Read-only by design - Vulkan only reads + /// the offsets (pDynamicOffsets is a const pointer), and the owner updates its + /// own backing storage directly rather than through this view. + /// + ReadOnlySpan DynamicOffsets => []; +} diff --git a/Brutal.Vulkan.Abstractions/IImageView.cs b/Brutal.Vulkan.Abstractions/IImageView.cs new file mode 100644 index 0000000..f96fff2 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/IImageView.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Anything that exposes a Vulkan image view. Systems that hold a binding by interface +/// (rather than a raw ) can re-resolve the view after the +/// underlying resource is recreated, e.g. on a resize. +/// +public interface IImageView +{ + /// + /// The current image view handle. + /// + VkImageView VkImageView { get; } +} + +/// +/// Anything that exposes an image together with a subresource range and extent - +/// the shape that barrier, copy, and staging helpers operate on. +/// +public interface IImageSubresourceRange +{ + /// + /// The image handle. + /// + VkImage VkImage { get; } + + /// + /// The subresource range this object covers. + /// + VkImageSubresourceRange SubresourceRange { get; } + + /// + /// The extent of the covered region at the range's base mip level (mip 0 of the image + /// shifted down by BaseMipLevel, clamped to 1). + /// + VkExtent3D Extent { get; } +} diff --git a/Brutal.Vulkan.Abstractions/IMappable.cs b/Brutal.Vulkan.Abstractions/IMappable.cs new file mode 100644 index 0000000..388def6 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/IMappable.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Struct containing information about an intention to map a memory allocation. +/// +public readonly record struct AllocationMapInfo(AllocationInfo AllocationInfo) +{ + public MapRegion Region { get; init; } = new(); + public VkMemoryMapFlags Flags { get; init; } = VkMemoryMapFlags.None; + + public record struct MapKey(Ptr MapPtr, ByteSize MapSize, ByteSize MapOffset); + + /// + /// Check if this MappedInfo is a subset of another MappedInfo, in terms of size and offset. + /// + public bool IsSubsetOf(MapKey other) + { + return other.MapSize >= Region.Size + && other.MapOffset <= Region.Offset + && other.MapOffset + other.MapSize >= Region.Offset + Region.Size; + } +} + +/// +/// Describes an object that can be mapped to a pointer. +/// +public interface IMappable +{ + AllocationInfo AllocationInfo { get; } + ByteSize MapSize { get; } + ByteSize MapOffset { get; } + + /// + /// Information required to map a memory region. + /// + public readonly struct MapInfo() + { + public MapRegion Region { get; init; } = new(); + public VkMemoryMapFlags Flags { get; init; } = VkMemoryMapFlags.None; + } +} + +public static class MappableExtensions +{ + /// + /// Map the given object to a pointer. + /// + /// The object to map + public static MappedMemory Map(this T mappable) + where T : IMappable + { + return mappable.Map(new IMappable.MapInfo()); + } + + /// + /// Map the given object to a pointer. + /// + /// The object to map + public static MappedMemory Map(this T mappable, IMappable.MapInfo mapInfo) + where T : IMappable + { + var region = mapInfo.Region; + + // The byte offset must be within the buffer size + if (region.Offset > mappable.MapSize) + throw new ArgumentException(@"Byte offset exceeds buffer size", nameof(region.Offset)); + + // A negative byte size is invalid + if (region.Size.Bytes == VK.WHOLE_SIZE) + region = region with { Size = mappable.MapSize - region.Offset }; + + // The byte size must be within the buffer size + if (region.Offset + region.Size > mappable.MapSize) + throw new ArgumentException(@"Data exceeds buffer size", nameof(region.Size)); + + return new MappedMemory( + new AllocationMapInfo(mappable.AllocationInfo) + { + Region = region with { Offset = region.Offset + mappable.MapOffset }, + Flags = mapInfo.Flags, + }, + null + ); + } +} diff --git a/Brutal.Vulkan.Abstractions/ImageEx.cs b/Brutal.Vulkan.Abstractions/ImageEx.cs new file mode 100644 index 0000000..7745a2e --- /dev/null +++ b/Brutal.Vulkan.Abstractions/ImageEx.cs @@ -0,0 +1,280 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Lightweight handle to an image allocation +/// +public readonly struct ImageEx : IDisposable, INullable +{ + public ref struct CreateInfo + { + /// The name to apply to the image and allocation + public required string Name; + + /// + public VkImageCreateFlags ImageFlags; + + /// + public VkImageType ImageType; + + /// + public VkFormat ImageFormat; + + /// + public VkExtent3D ImageExtent; + + /// + public int ImageMipLevels; + + /// + public int ImageArrayLayers; + + /// + public VkSampleCountFlags ImageSamples; + + /// + public VkImageTiling ImageTiling; + + /// + public VkImageUsageFlags ImageUsage; + + /// + public VkSharingMode ImageSharingMode; + + /// + public ReadOnlySpan ImageQueueFamilyIndices; + + /// + public VkImageLayout ImageInitialLayout; + + /// + public Ptr ImageNext { get; set; } + + /// + public MemoryPreference AllocPreference; + + /// + public VkMemoryPropertyFlags AllocRequiredProperties; + + /// + public VkMemoryPropertyFlags AllocPreferredProperties; + + /// + public float AllocPriority; + + /// + public Ptr AllocNext { get; set; } + + /// + public VkMemoryAllocateFlags AllocFlags; + + /// + /// Extract or populate this struct with an ImageCreateInfo + /// + public unsafe VkImageCreateInfo ImageCreateInfo + { + get => + new() + { + ImageType = ImageType, + ArrayLayers = ImageArrayLayers, + Samples = ImageSamples, + MipLevels = ImageMipLevels, + Flags = ImageFlags, + InitialLayout = ImageInitialLayout, + Format = ImageFormat, + Extent = ImageExtent, + Tiling = ImageTiling, + Usage = ImageUsage, + SharingMode = ImageSharingMode, + QueueFamilyIndices = ImageQueueFamilyIndices.AsPointer(), + QueueFamilyIndexCount = ImageQueueFamilyIndices.Length, + Next = ImageNext, + }; + set + { + ImageType = value.ImageType; + ImageArrayLayers = value.ArrayLayers; + ImageSamples = value.Samples; + ImageMipLevels = value.MipLevels; + ImageFlags = value.Flags; + ImageInitialLayout = value.InitialLayout; + ImageFormat = value.Format; + ImageExtent = value.Extent; + ImageTiling = value.Tiling; + ImageUsage = value.Usage; + ImageSharingMode = value.SharingMode; + ImageQueueFamilyIndices = new ReadOnlySpan(value.QueueFamilyIndices, value.QueueFamilyIndexCount); + ImageNext = value.Next; + } + } + + /// + /// Extract or populate this struct with an AllocationInfo.CreateInfo + /// + public AllocationInfo.CreateInfo AllocationInfo + { + get => + new() + { + Preference = AllocPreference, + RequiredProperties = AllocRequiredProperties, + PreferredProperties = AllocPreferredProperties, + Priority = AllocPriority, + Next = AllocNext, + AllocateFlags = AllocFlags, + }; + set + { + AllocPreference = value.Preference; + AllocRequiredProperties = value.RequiredProperties; + AllocPreferredProperties = value.PreferredProperties; + AllocPriority = value.Priority; + AllocNext = value.Next; + AllocFlags = value.AllocateFlags; + } + } + } + + /// + /// Source of the image allocation + /// + public readonly IImageAllocator Allocator; + + /// + /// Handles to allocated objects and metadata + /// + public readonly ImageAllocationInfo AllocationInfo; + + /// + /// Image handle + /// + public VkImage VkImage => AllocationInfo.Image; + + /// + /// Image memory + /// + public VkDeviceMemory VkDeviceMemory => AllocationInfo.MemAllocationInfo.Memory; + + /// + /// Size of image + /// + public VkExtent3D Extent => AllocationInfo.Extent; + + /// + /// Format of allocated image + /// + public VkFormat Format => AllocationInfo.Format; + + /// + /// Number of mip levels allocated + /// + public int MipLevels => AllocationInfo.MipLevels; + + /// + /// Number of array layers allocated + /// + public int ArrayLayers => AllocationInfo.ArrayLayers; + + /// + /// Allocator-specific handle + /// + public nint UserHandle => AllocationInfo.AllocHandle; + + private readonly VkImageSubresourceRange _fullRange; + + /// + /// Construct an ImageEx object + /// + /// Allocator for image memory + /// Creation struct + internal unsafe ImageEx(IImageAllocator allocator, CreateInfo createInfo) + { + Allocator = allocator; + AllocationInfo = allocator.AllocateImage( + createInfo.Name, + createInfo.ImageCreateInfo, + createInfo.AllocationInfo + ); + + _fullRange = FullRangeOf(AllocationInfo); + } + + /// + /// Constructor for an image that has already been preallocated + /// + /// Allocated image sourced from an IImageAllocator + public ImageEx(ImageAllocationInfo allocationInfo) + { + AllocationInfo = allocationInfo; + Allocator = (IImageAllocator)allocationInfo.MemAllocationInfo.Allocator; + _fullRange = FullRangeOf(allocationInfo); + } + + // The full range is derived state; both constructors must agree on it + private static VkImageSubresourceRange FullRangeOf(in ImageAllocationInfo allocationInfo) => + new() + { + AspectMask = VkImageAspectFlags.None, + BaseMipLevel = 0, + LevelCount = allocationInfo.MipLevels, + BaseArrayLayer = 0, + LayerCount = allocationInfo.ArrayLayers, + }; + + /// + /// Convenience method to create an image view from the image + /// + /// Type of imageview needed + /// Range imageview should encompass + /// VkImageView handle. It is up to user to dispose of this + public ImageViewEx CreateImageView( + VkImageViewType imageViewType, + VkImageSubresourceRange subresourceRange, + VkAllocator? allocator + ) + { + var device = Allocator.GetDevice(); + var handle = device.CreateImageView( + new VkImageViewCreateInfo + { + Image = VkImage, + ViewType = imageViewType, + Format = Format, + SubresourceRange = subresourceRange, + }, + allocator + ); + return new ImageViewEx(device, this, handle, imageViewType, subresourceRange, allocator); + } + + public VkImageSubresourceRange GetFullRange(VkImageAspectFlags aspectMask) => + _fullRange with + { + AspectMask = aspectMask, + }; + + /// + /// The maximum number of mip levels a full chain for this image's extent can hold + /// + public int MaxMipLevels => VulkanHelpers.MaxMipLevels(Extent); + + /// + public bool IsNull() + { + return VkImage.IsNull(); + } + + /// + public void Dispose() + { + Allocator.FreeAllocation(in AllocationInfo); + } +} + +public static class ImageExExtensions +{ + public static ImageEx CreateImage(this IImageAllocator allocator, ImageEx.CreateInfo createInfo) + { + return new ImageEx(allocator, createInfo); + } +} diff --git a/Brutal.Vulkan.Abstractions/ImageViewEx.cs b/Brutal.Vulkan.Abstractions/ImageViewEx.cs new file mode 100644 index 0000000..3d83a05 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/ImageViewEx.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Wrapper struct for a Vulkan image view +/// +public readonly struct ImageViewEx( + Device device, + ImageEx image, + VkImageView imageView, + VkImageViewType imageViewType, + VkImageSubresourceRange subresourceRange, + VkAllocator? allocator +) : IDisposable, INullable, IImageView, IImageSubresourceRange +{ + public readonly ImageEx Image = image; + public readonly VkImageView VkImageView = imageView; + public readonly VkImageViewType Type = imageViewType; + public readonly VkImageSubresourceRange SubresourceRange = subresourceRange; + + public bool IsNull() => VkImageView.IsNull(); + + VkImageView IImageView.VkImageView => VkImageView; + VkImage IImageSubresourceRange.VkImage => Image.VkImage; + VkImageSubresourceRange IImageSubresourceRange.SubresourceRange => SubresourceRange; + + // The covered region starts at the range's base mip, so report that level's dimensions rather + // than mip 0's; only a 3D view spans depth, every other view type is one slice deep + VkExtent3D IImageSubresourceRange.Extent => + new() + { + Width = Math.Max(1, Image.Extent.Width >> SubresourceRange.BaseMipLevel), + Height = Math.Max(1, Image.Extent.Height >> SubresourceRange.BaseMipLevel), + Depth = Type == VkImageViewType._3D ? Math.Max(1, Image.Extent.Depth >> SubresourceRange.BaseMipLevel) : 1, + }; + + /// + public void Dispose() + { + device.DestroyImageView(VkImageView, allocator); + } + + public ImageViewPartitionInfo AsPartition() + { + if (IsNull()) + throw new NullReferenceException(nameof(VkImageView)); + + return new ImageViewPartitionInfo( + this, + Image.AllocationInfo.ArrayLayers, + 0, + Image.Extent, + new VkOffset3D(), + null + ); + } + + public static implicit operator ImageViewPartitionInfo(ImageViewEx inValue) => inValue.AsPartition(); +} diff --git a/Brutal.Vulkan.Abstractions/LICENSES/BRUTAL-VULKAN-ABSTRACTIONS-THIRD-PARTY-NOTICES.txt b/Brutal.Vulkan.Abstractions/LICENSES/BRUTAL-VULKAN-ABSTRACTIONS-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..7f19500 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/LICENSES/BRUTAL-VULKAN-ABSTRACTIONS-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,591 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Vulkan.Abstractions + +Brutal.Vulkan.Abstractions builds on the Brutal.Vulkan bindings, which are generated from +the Khronos Vulkan API registry. This package contains no native library and no generated +bindings of its own; the registry license below is carried for the dependency it builds on. + +Descriptive text from the Khronos specification reference pages does appear in this +package, in the documentation comments of its own hand-written helpers, and reaches it as +the XML documentation file beside the assembly. + +============================================================ +Vulkan-Headers registry and API headers +Apache-2.0 -- https://github.com/KhronosGroup/Vulkan-Headers +============================================================ + + Name The Khronos Vulkan API registry and C headers + Version upstream v1.4.335 + Copyright Copyright 2015-2025 The Khronos Group Inc. + Upstream https://github.com/KhronosGroup/Vulkan-Headers + SPDX Apache-2.0 + Shipped as no native library, and no bindings generated in this package. The license + is carried for the Brutal.Vulkan bindings this package builds on, which are + generated from the registry XML and the C headers named above + + Upstream offers this material as "Apache-2.0 OR MIT". RocketWerkz takes it under the + Apache License 2.0, reproduced below. The MIT alternative is not taken and its text is + not reproduced here. Upstream states of the choice: + + Note: With the exception of `parse_dependency.py` the files using `MIT` license + also fall under `Apache-2.0`. + + That file is not read by this package. + + The copyright line above is the registry's own. + + Upstream ships no NOTICE file with this material. The bindings this license is carried for + are generated from the registry XML and the C headers named above -- new files produced + from that material, rather than copies of upstream's own files carried forward with + changes. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +============================================================ +Vulkan-Docs reference pages +CC-BY-4.0 -- https://github.com/KhronosGroup/Vulkan-Docs +============================================================ + + Name The Khronos Vulkan API specification reference pages + Version upstream v1.4.335 + Copyright Copyright 2014-2025 The Khronos Group Inc. + Upstream https://github.com/KhronosGroup/Vulkan-Docs + SPDX CC-BY-4.0 + Shipped as no native library. Descriptive text from the reference pages appears in the + XML documentation file packaged beside the assembly + + The text is adapted rather than carried across verbatim. The AsciiDoc markup of the + reference pages is converted to XML documentation markup -- links, cross-references, code + spans and emphasis -- link targets and their labels are rewritten, and the prose is + re-paragraphed to sit inside a documentation comment. + + The copyright line above is the one upstream stamps onto every reference page it + generates. The specification sources those pages are built from carry further copyright + notices, naming parties other than Khronos. Upstream states them as separate lines at the + repository named above. They are not combined here into a single line upstream does not + state. + +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/Brutal.Vulkan.Abstractions/MappedMemory.cs b/Brutal.Vulkan.Abstractions/MappedMemory.cs new file mode 100644 index 0000000..5268a0d --- /dev/null +++ b/Brutal.Vulkan.Abstractions/MappedMemory.cs @@ -0,0 +1,184 @@ +using System.Diagnostics; + +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Convenience struct for mapped memory +/// +public readonly struct MappedMemory : IDisposable, IEquatable +{ + /// + /// Internal allocator used to map and unmap memory + /// + private IAllocator Allocator => _allocationMapInfo.AllocationInfo.Allocator; + + /// + /// Allocation info of the mapped memory, supplied by the allocator + /// + private readonly AllocationMapInfo _allocationMapInfo; + public MapRegion Region => _allocationMapInfo.Region; + + public readonly Ptr MapPtr; + + /// + /// Device memory handle + /// + public VkDeviceMemory DeviceMemory => _allocationMapInfo.AllocationInfo.Memory; + + /// + /// Construct and map memory + /// + /// Memory allocation info of memory + /// Pointer to existing mapped pointer + internal MappedMemory(in AllocationMapInfo allocationAllocationMapInfo, Ptr existingPtr) + { + Debug.Assert(allocationAllocationMapInfo.Region.Size > 0); + _allocationMapInfo = allocationAllocationMapInfo; + MapPtr = existingPtr; + if (existingPtr.IsNull()) + MapPtr = allocationAllocationMapInfo.AllocationInfo.Allocator.MapMemory(_allocationMapInfo); + } + + /// + /// Create a view into a mapped memory region that is a subset of the original mapped region + /// + /// Thrown if the byte offset or size is invalid + public MappedMemory Offset(MapRegion region) + { + if (region.Offset > Region.Size) + throw new ArgumentException(@"Byte offset exceeds buffer size", nameof(region.Offset)); + + if (region.Size == VK.WHOLE_SIZE) + { + region = region with { Size = Region.Size - region.Offset }; + } + + if (region.Offset + region.Size > Region.Size) + throw new ArgumentException(@"Data exceeds buffer size", nameof(region.Size)); + + return new MappedMemory( + _allocationMapInfo with + { + Region = region with { Offset = region.Offset + Region.Offset }, + }, + MapPtr.Offset(region.Offset) + ); + } + + public MappedMemory Offset(ByteSize bytes) + { + return Offset(new MapRegion { Offset = bytes }); + } + + /// + /// Unmap the memory region using source allocator + /// + public void Unmap() + { + Allocator.UnmapMemory(_allocationMapInfo); + } + + /// + /// Flush the mapped memory range + /// + public void Flush() + { + Allocator + .GetDevice() + .FlushMappedMemoryRanges( + [ + new VkMappedMemoryRange + { + Memory = DeviceMemory, + Offset = Region.Offset, + Size = Region.Size, + }, + ] + ); + } + + /// + /// Invalidate the mapped memory range + /// + public void Invalidate() + { + Allocator + .GetDevice() + .InvalidateMappedMemoryRanges( + [ + new VkMappedMemoryRange + { + Memory = DeviceMemory, + Offset = Region.Offset, + Size = Region.Size, + }, + ] + ); + } + + /// + /// Cast the mapped memory to a reference of type T + /// + /// Type to cast + /// Cast object + /// Data exceeds buffer size + public unsafe ref T As() + where T : unmanaged + { + if (ByteSize.Of() > Region.Size) + throw new ArgumentException(@"Data exceeds buffer size", nameof(T)); + + var firstElement = (T*)MapPtr; + return ref *firstElement; + } + + /// + /// Cast the mapped memory to a span of bytes + /// + /// Byte span + public Span AsSpan() => AsSpan(); + + /// + /// Cast the mapped memory to a span of type T + /// + /// Span element type + /// Span of type T + /// Requested data exceeds buffer size + public Span AsSpan() + where T : unmanaged + { + if (Region.Size < ByteSize.Of()) + throw new ArgumentException(@"Requested data exceeds buffer size", nameof(T)); + + unsafe + { + return new Span(MapPtr, (int)Region.Size).Cast(); + } + } + + /// + public void Dispose() + { + Unmap(); + } + + public static MappedMemory Map(AllocationMapInfo allocationMapInfo) + { + return new MappedMemory(allocationMapInfo, null); + } + + public bool Equals(MappedMemory other) + { + return _allocationMapInfo.Equals(other._allocationMapInfo) && MapPtr == other.MapPtr; + } + + public override bool Equals(object? obj) + { + return obj is MappedMemory other && Equals(other); + } + + public override int GetHashCode() + { + return _allocationMapInfo.GetHashCode(); + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Buffer/BinaryTreeBufferPartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/BinaryTreeBufferPartitioner.cs new file mode 100644 index 0000000..9d076d6 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/BinaryTreeBufferPartitioner.cs @@ -0,0 +1,504 @@ +using System.Numerics; + +namespace Brutal.VulkanApi.Abstractions; + +/// +/// 1-D power-of-two binary-tree (buddy) partitioner for a buffer - the buffer analog of +/// . Partitions are power-of-two block sizes in +/// [MinElementSize, MaxElementSize], and every block's offset is naturally aligned to its +/// own size (relative to the start of the backing partition). +/// +/// Unlike , partitions can be freed individually +/// (): empty sibling pairs are merged back into their +/// parent on (which retries through automatically), so +/// freed space coalesces into larger blocks again instead of fragmenting. +/// +/// Nodes are only ever created (root, then pairs on subdivide) and freed (pairs on merge), so the +/// two children of a branch are always contiguous in the node array - child j of a branch +/// is firstChild + j. +/// +public class BinaryTreeBufferPartitioner : IRecycleBufferPartitioner, ISize +{ + /// + /// Byte range of an allocated block, relative to the start of the backing partition. + /// + public readonly record struct Range(ByteSize Offset, ByteSize Size); + + private struct Node + { + /// Branch: index of first child node. Empty leaf: -1. Full leaf: element index. + public int FirstChild; + + /// True only for a full leaf (one element occupies this node). Branches and empty leaves are false. + public bool IsFull; + } + + private struct Element + { + public ulong Offset; + public ulong Size; + public int NodeIndex; + + /// + /// Bumped every time this slot is freed (and on ), so an id issued for an + /// earlier occupant of the slot no longer matches. Survives slot reuse: InsertElement + /// carries it over rather than resetting it. + /// + public int Generation; + } + + private readonly record struct NodeRef(int Index, int Depth, ulong Offset, ulong Size); + + // Public ids pack a generation above the element index so a stale id cannot alias a later + // occupant of the same slot: id = (generation << INDEX_BITS) | index. 20 + 11 bits keeps the + // id non-negative (-1 stays the failure sentinel); the generation wraps after 2048 reuses of + // one slot, which is the (documented) limit of the protection. + private const int INDEX_BITS = 20; + private const int INDEX_MASK = (1 << INDEX_BITS) - 1; + private const int GENERATION_MASK = 0x7FF; + + private readonly List _nodes = []; + private readonly Stack _nodeFree = new(); // LIFO - preserves contiguous pairs + + // _elements, _elemFree and _elementsByOffset all hold element INDICES; public ids are made with MakeId + private readonly List _elements = []; + private readonly Stack _elemFree = new(); + private readonly Dictionary _elementsByOffset = new(); + + // Reusable traversal scratch, cleared before each use + private readonly Stack _scratchIndices = new(); + private readonly Stack _scratchRefs = new(); + + private readonly ByteSize _requestedMaxElementSize; + private readonly ByteSize _requestedMinElementSize; + + private int _totalDepth; + private int _minDepth; // shallowest allocatable depth (= largest block, MaxElementSize) + private int _maxDepth; // deepest allocatable depth (= smallest block, MinElementSize) + private int _allocationCount; + private ulong _allocatedBytes; + + public BufferPartitionInfo BackingPartition { get; set; } + + /// Total capacity in bytes (power of two). + public ByteSize Capacity { get; private set; } + + /// Largest allocatable block size (power of two). + public ByteSize MaxElementSize { get; private set; } + + /// Smallest allocatable block size (power of two) - also the minimum block alignment. + public ByteSize MinElementSize { get; private set; } + + /// Number of live allocations. + public int Count => _allocationCount; + + /// + /// Bytes not held by live blocks. Fragmentation may still prevent a single allocation of this + /// size; (retried automatically inside ) coalesces + /// what it can. + /// + public ByteSize FreeSpace => ByteSize.Of((nuint)((ulong)(nuint)Capacity - _allocatedBytes)); + + /// + int ISize.Size => (int)Capacity; + + /// + /// Construct a binary-tree partitioner over the backing partition, whose size must be a power + /// of two. Note: block offsets are aligned relative to the backing partition's start; for + /// absolute (bind-time) alignment guarantees the backing partition itself must start at a + /// suitably aligned offset. + /// + /// Backing buffer partition to slice up + /// Largest allocatable block (power of two); default means the full capacity + /// Smallest allocatable block (power of two); default means one byte + public BinaryTreeBufferPartitioner( + BufferPartitionInfo backingPartition, + ByteSize maxElementSize = default, + ByteSize minElementSize = default + ) + { + _requestedMaxElementSize = maxElementSize; + _requestedMinElementSize = minElementSize; + BackingPartition = backingPartition; + Initialize(backingPartition); + } + + /// + public void Reset(BufferPartitionInfo info) + { + BackingPartition = info; + Initialize(info); + } + + private void Initialize(BufferPartitionInfo backingPartition) + { + var capacity = (ulong)(nuint)backingPartition.PartitionSize; + if (!BitOperations.IsPow2(capacity)) + throw new ArgumentException("Backing partition size must be a power of two"); + + var maxElementSize = _requestedMaxElementSize == 0 ? capacity : (ulong)(nuint)_requestedMaxElementSize; + var minElementSize = _requestedMinElementSize == 0 ? 1UL : (ulong)(nuint)_requestedMinElementSize; + + if (!BitOperations.IsPow2(maxElementSize) || !BitOperations.IsPow2(minElementSize)) + throw new ArgumentException("Element sizes must be powers of two"); + if (capacity < maxElementSize || maxElementSize < minElementSize || minElementSize < 1) + throw new ArgumentException("Bad / mismatched element sizes"); + + Capacity = ByteSize.Of((nuint)capacity); + MaxElementSize = ByteSize.Of((nuint)maxElementSize); + MinElementSize = ByteSize.Of((nuint)minElementSize); + + _totalDepth = BitOperations.Log2(capacity); + _minDepth = _totalDepth - BitOperations.Log2(maxElementSize); + _maxDepth = _totalDepth - BitOperations.Log2(minElementSize); + + _nodes.Clear(); + _nodeFree.Clear(); + InvalidateAllElements(); + _elementsByOffset.Clear(); + _allocationCount = 0; + _allocatedBytes = 0; + + // Root: an empty, unsubdivided leaf covering the whole range + _nodes.Add(new Node { FirstChild = -1, IsFull = false }); + } + + /// + /// Requests larger than fail rather than clamp. + public bool TryCreatePartition(BufferPartitionInfo.CreateInfo createInfo, out BufferPartitionInfo partition) + { + // MaxElementSize is a power of two, so the rounded-up request exceeds it exactly when the raw one does + if ((ulong)(nuint)createInfo.Size > (ulong)(nuint)MaxElementSize) + { + partition = default; + return false; + } + + var id = Alloc(createInfo.Size); + if (id < 0) + { + partition = default; + return false; + } + + var range = GetRange(id); + + partition = new BufferPartitionInfo( + Partitioner: this, + BufferInfo: BackingPartition.BufferInfo, + PartitionOffset: BackingPartition.PartitionOffset + range.Offset, + PartitionSize: range.Size + ); + + return true; + } + + /// + public void FreePartition(in BufferPartitionInfo inAllocation) + { + var localOffset = (ulong)(nuint)(inAllocation.PartitionOffset - BackingPartition.PartitionOffset); + + if (!_elementsByOffset.TryGetValue(localOffset, out var index)) + throw new ArgumentException("Partition offset does not match a live block of this partitioner"); + + FreeIndex(index); + } + + /// + /// Allocate a block for the requested size (rounded up to a power of two and clamped to + /// [MinElementSize, MaxElementSize]). Returns the block id, or -1 if the range can't + /// fit it even after a cleanup pass. + /// + public int Alloc(ByteSize size) + { + var rounded = BitOperations.RoundUpToPowerOf2(Math.Max(1UL, (ulong)(nuint)size)); + var targetDepth = _totalDepth - BitOperations.Log2(rounded); + if (targetDepth < _minDepth) + targetDepth = _minDepth; + else if (targetDepth > _maxDepth) + targetDepth = _maxDepth; + + if (!TryFindSlot(targetDepth, out var cand)) + { + Cleanup(); + if (!TryFindSlot(targetDepth, out cand)) + return -1; + } + + // Subdivide the candidate down to the target depth, always descending into the first child + while (cand.Depth < targetDepth) + { + var fc = SubdivideNode(cand.Index); + var half = cand.Size / 2; + cand = new NodeRef(fc, cand.Depth + 1, cand.Offset + half, half); + } + + var elem = InsertElement( + new Element + { + Offset = cand.Offset, + Size = cand.Size, + NodeIndex = cand.Index, + } + ); + var node = _nodes[cand.Index]; + node.IsFull = true; + node.FirstChild = elem; + _nodes[cand.Index] = node; + _elementsByOffset[cand.Offset] = elem; + _allocationCount++; + _allocatedBytes += cand.Size; + return MakeId(elem, _elements[elem].Generation); + } + + /// + /// Release a block. Its node becomes an empty leaf, reclaimable by . + /// Returns false for an invalid, already-freed, or stale id: ids carry a generation that is + /// bumped when their slot is freed or the partitioner is , so an old id + /// cannot release a later block that reused the slot (the generation wraps after 2048 reuses + /// of one slot, which is the limit of the protection). + /// + public bool Free(int id) + { + if (!TryResolve(id, out var index)) + return false; + + FreeIndex(index); + return true; + } + + /// Byte range of an allocated block. Returns a zero range for an invalid or stale id. + public Range GetRange(int id) + { + if (!TryResolve(id, out var index)) + return default; + var e = _elements[index]; + return new Range(ByteSize.Of((nuint)e.Offset), ByteSize.Of((nuint)e.Size)); + } + + private static int MakeId(int index, int generation) => (generation << INDEX_BITS) | index; + + /// + /// Map a public id to a live element index: the index must be in range, the id's generation + /// must match the slot's, and the slot's node must still be a full leaf pointing back at it. + /// + private bool TryResolve(int id, out int index) + { + index = id & INDEX_MASK; + if (id < 0 || index >= _elements.Count) + return false; + + var element = _elements[index]; + if (element.Generation != (id >> INDEX_BITS)) + return false; + + if ((uint)element.NodeIndex >= (uint)_nodes.Count) + return false; + + var node = _nodes[element.NodeIndex]; + return node.IsFull && node.FirstChild == index; + } + + /// Release a live element by index, bumping its generation so outstanding ids for it go stale. + private void FreeIndex(int index) + { + var element = _elements[index]; + var node = _nodes[element.NodeIndex]; + + node.IsFull = false; + node.FirstChild = -1; + _nodes[element.NodeIndex] = node; + + _elementsByOffset.Remove(element.Offset); + element.Generation = (element.Generation + 1) & GENERATION_MASK; + _elements[index] = element; + _elemFree.Push(index); + _allocationCount--; + _allocatedBytes -= element.Size; + } + + /// + /// Mark every element slot free without discarding it, bumping each generation so ids issued + /// before a are rejected afterwards instead of aliasing new blocks. + /// + private void InvalidateAllElements() + { + _elemFree.Clear(); + for (var i = _elements.Count - 1; i >= 0; i--) + { + var element = _elements[i]; + element.Generation = (element.Generation + 1) & GENERATION_MASK; + _elements[i] = element; + _elemFree.Push(i); + } + } + + /// + /// Merge empty sibling pairs back into their parent, repeating until nothing more merges, so + /// freed space coalesces all the way up the tree ( runs this before giving + /// up). Cheap; safe to call any time. + /// + public void Cleanup() + { + // Each pass visits parents before children, so a merge at depth d only exposes its parent + // at depth d-1 to the next pass. Looping until a pass merges nothing is bounded by the depth. + bool merged; + do + { + merged = CleanupPass(); + } while (merged); + } + + /// One top-down merge pass; returns true if any pair was merged. + private bool CleanupPass() + { + // Root is a full leaf or an empty unsubdivided leaf → nothing to merge + if (_nodes[0].IsFull || _nodes[0].FirstChild < 0) + return false; + + var merged = false; + var toProcess = _scratchIndices; + toProcess.Clear(); + toProcess.Push(0); + + while (toProcess.Count > 0) + { + var idx = toProcess.Pop(); + var fc = _nodes[idx].FirstChild; + var emptyLeaves = 0; + + for (var j = 0; j < 2; j++) + { + var child = _nodes[fc + j]; + if (child.IsFull) + continue; // occupied leaf - never empty + if (child.FirstChild == -1) + emptyLeaves++; // empty leaf + else + toProcess.Push(fc + j); // branch - descend + } + + if (emptyLeaves == 2) + { + // Free the pair in reverse so the LIFO free list keeps it contiguous, in order, + // reclaimable by the next subdivide + _nodeFree.Push(fc + 1); + _nodeFree.Push(fc); + var node = _nodes[idx]; + node.FirstChild = -1; + node.IsFull = false; + _nodes[idx] = node; + merged = true; + } + } + + return merged; + } + + /// + /// Find an empty leaf at (perfect fit), or the deepest empty leaf + /// shallower than it (which subdivides down). Returns false if none exists. + /// + private bool TryFindSlot(int targetDepth, out NodeRef best) + { + best = new NodeRef(-1, 0, 0, 0); // Index == -1 ⇒ nothing found + + var root = _nodes[0]; + if (root.IsFull) + return false; + + var rootRef = new NodeRef(0, 0, 0, (ulong)(nuint)Capacity); + if (root.FirstChild == -1) + { + // Empty unsubdivided root - usable for any target (subdivided down by the caller) + best = rootRef; + return true; + } + + var toProcess = _scratchRefs; + toProcess.Clear(); + toProcess.Push(rootRef); + + while (toProcess.Count > 0) + { + var np = toProcess.Pop(); + if (np.Depth >= targetDepth) + continue; + + var childDepth = np.Depth + 1; + var fc = _nodes[np.Index].FirstChild; + var childSize = np.Size / 2; + + for (var j = 0; j < 2; j++) + { + // Child offsets in order (high half),(low half), matching the subdivide descent + var offset = np.Offset + (j == 0 ? childSize : 0); + + var childIdx = fc + j; + var child = _nodes[childIdx]; + if (child.IsFull) + continue; + + var childRef = new NodeRef(childIdx, childDepth, offset, childSize); + if (child.FirstChild == -1) // empty leaf + { + if (childDepth == targetDepth) + { + best = childRef; // perfect fit + return true; + } + if (childDepth > best.Depth) + best = childRef; // deepest subdividable candidate so far + } + else + { + toProcess.Push(childRef); // branch - descend + } + } + } + + return best.Index != -1; + } + + /// Turn a leaf into a branch with two contiguous empty-leaf children; returns the first child index. + private int SubdivideNode(int nodeIndex) + { + var fc = InsertNode(new Node { FirstChild = -1, IsFull = false }); + InsertNode(new Node { FirstChild = -1, IsFull = false }); + + var node = _nodes[nodeIndex]; + node.FirstChild = fc; + node.IsFull = false; + _nodes[nodeIndex] = node; + return fc; + } + + private int InsertNode(Node node) + { + if (_nodeFree.Count > 0) + { + var i = _nodeFree.Pop(); + _nodes[i] = node; + return i; + } + _nodes.Add(node); + return _nodes.Count - 1; + } + + private int InsertElement(Element element) + { + if (_elemFree.Count > 0) + { + var i = _elemFree.Pop(); + // Keep the slot's generation: it was bumped when the previous occupant was freed + element.Generation = _elements[i].Generation; + _elements[i] = element; + return i; + } + if (_elements.Count > INDEX_MASK) + throw new InvalidOperationException("Too many live blocks for the id encoding"); + element.Generation = 0; + _elements.Add(element); + return _elements.Count - 1; + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Buffer/BufferPartitionInfo.cs b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/BufferPartitionInfo.cs new file mode 100644 index 0000000..b901123 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/BufferPartitionInfo.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Allocation information for a partition of a buffer allocation (portion of a larger buffer) +/// +/// Buffer partitioner that created this partition +/// Information about this allocation within the buffer +/// Offset within owning buffer where this partition starts +/// Size of this partition +public readonly record struct BufferPartitionInfo( + IBufferPartitioner? Partitioner, + BufferAllocationInfo BufferInfo, + ByteSize PartitionOffset, + ByteSize PartitionSize +) : IMappable, IBindBuffer +{ + public record struct CreateInfo(ByteSize Size); + + /// + /// Reference to the parent Vulkan buffer + /// + public VkBuffer VkBuffer => BufferInfo.VkBuffer; + + /// + /// Offset within the parent buffer where this partition starts + /// + public ByteSize BindOffset => BufferInfo.BufferOffset + PartitionOffset; + + /// + /// Offset within the owning device memory allocation where this partition starts + /// + public ByteSize MemoryOffset => BufferInfo.AllocationInfo.AllocOffset + BindOffset; + + /// + /// If true, this partition is a full buffer allocation + /// + public bool IsFullPartition => Partitioner is null; + + /// + /// Convenience function to create a partition info object for a full buffer allocation + /// + /// BufferAllocationInfo object + /// BufferAllocationInfo as BufferPartitionInfo, with the 'partition' covering the entire buffer + public static BufferPartitionInfo FullPartition(BufferAllocationInfo bufferAllocationInfo) + { + return new BufferPartitionInfo( + Partitioner: null, + BufferInfo: bufferAllocationInfo, + PartitionSize: bufferAllocationInfo.BufferSize, + PartitionOffset: ByteSize.Zero + ); + } + + /// + /// Return this partition to wherever it came from: a recycling partitioner gets it back via + /// , and a full partition frees the + /// underlying buffer allocation. Partitions from a non-recycling partitioner (e.g. + /// ) are a no-op - their space is reclaimed only by + /// resetting the partitioner. + /// + public void Free() + { + if (Partitioner is IRecycleBufferPartitioner recycler) + recycler.FreePartition(in this); + else if (Partitioner is null) + ((IBufferAllocator)BufferInfo.AllocationInfo.Allocator).FreeAllocation(BufferInfo); + } + + AllocationInfo IMappable.AllocationInfo => BufferInfo.AllocationInfo; + ByteSize IMappable.MapSize => PartitionSize; + ByteSize IMappable.MapOffset => PartitionOffset; +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Buffer/IBufferPartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/IBufferPartitioner.cs new file mode 100644 index 0000000..b9038fe --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/IBufferPartitioner.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Interface for a buffer partitioner object capable of allocating and freeing partitions of a buffer +/// +public interface IBufferPartitioner +{ + BufferPartitionInfo BackingPartition { get; protected set; } + + /// + /// Reset the partitioner to its initial state with the given partition info. Invalidates all current allocations. + /// + /// + public void Reset(BufferPartitionInfo info); + + /// + /// Allocate a buffer partition with the given required size + /// + /// Struct containing all relevant information about the allocation + /// The resulting partition + /// True if the allocation was successful + public bool TryCreatePartition(BufferPartitionInfo.CreateInfo createInfo, out BufferPartitionInfo partition); +} + +/// +/// Interface for a buffer partitioner object capable of allocating and freeing partitions of a buffer +/// +public interface IRecycleBufferPartitioner : IBufferPartitioner +{ + /// + /// Free a buffer partition + /// + /// Struct containing all relevant information about the allocation + public void FreePartition(in BufferPartitionInfo inAllocation); +} + +public static class BufferPartitionerExtensions +{ + public static BufferPartitionInfo CreatePartition( + this T partitioner, + in BufferPartitionInfo.CreateInfo createInfo + ) + where T : IBufferPartitioner + { + if (!partitioner.TryCreatePartition(createInfo, out var partition)) + throw new OutOfMemoryException("Failed to create partition"); + + return partition; + } + + /// + public static void Reset(this IBufferPartitioner partitioner) + { + partitioner.Reset(partitioner.BackingPartition); + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Buffer/LinearBufferPartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/LinearBufferPartitioner.cs new file mode 100644 index 0000000..50a16b7 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Buffer/LinearBufferPartitioner.cs @@ -0,0 +1,95 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Basic linear allocator/partitioner, allocates memory/partitions in a linear fashion +/// Very simple design, doesn't support freeing any space except for a full clear +/// Provides optional alignment for buffers that require a minimum alignment offset +/// +public class LinearBufferPartitioner : IBufferPartitioner, ISize +{ + /// + /// Basic linear allocator/partitioner, allocates memory/partitions in a linear fashion + /// Very simple design, doesn't support freeing any space except for a full clear + /// Provides optional alignment for buffers that require a minimum alignment offset + /// + public LinearBufferPartitioner(BufferPartitionInfo backingPartition, ByteSize alignment = default) + { + Alignment = alignment; + BackingPartition = backingPartition; + // Alignment of zero means "no alignment"; only validate the backing offset when one is set + if (Alignment > 0 && GetAlignedOffset(Alignment, backingPartition.BindOffset) != backingPartition.BindOffset) + throw new Exception("Invalid alignment of backing buffer partition"); + } + + /// + /// Backing partition this partitioner is slicing up buffer portions of + /// + public BufferPartitionInfo BackingPartition { get; set; } + + /// + /// Capacity of this partitioner + /// + public ByteSize Capacity => BackingPartition.PartitionSize; + + /// + /// Current offset from the start of the backing partition + /// + public ByteSize CurrentOffset { get; private set; } + + /// + /// Alignment of allocations: if zero, no alignment applied + /// + public readonly ByteSize Alignment; + + /// + int ISize.Size => (int)Capacity; + + /// + /// Number of bytes remaining in the partitioner + /// + public ByteSize FreeSpace => Capacity - CurrentOffset; + + /// + public bool TryCreatePartition(BufferPartitionInfo.CreateInfo info, out BufferPartitionInfo partition) + { + var size = Alignment > 0 ? GetAlignedOffset(Alignment, info.Size) : info.Size; + // Check we haven't exceeded the capacity of the partitioner + if (CurrentOffset + size > Capacity) + { + partition = default; + return false; + } + + // Claim the space + var offset = CurrentOffset; + CurrentOffset += size; + + // Create the partition info object + partition = new BufferPartitionInfo( + Partitioner: this, + BufferInfo: BackingPartition.BufferInfo, + PartitionOffset: offset + BackingPartition.PartitionOffset, + PartitionSize: size + ); + + return true; + } + + /// + public void Reset(BufferPartitionInfo info) + { + BackingPartition = info; + CurrentOffset = ByteSize.Zero; + } + + /// + /// Get an offset (or size of an object) fitting correct minimum memory alignment + /// + /// Min Alignment + /// Required offset + /// Aligned offset + public static ByteSize GetAlignedOffset(ByteSize alignment, ByteSize offset) + { + return ByteSize.Of((offset + alignment - 1) & ~(alignment - 1)); + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Image/Atlas2DPartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Image/Atlas2DPartitioner.cs new file mode 100644 index 0000000..84a7d92 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Image/Atlas2DPartitioner.cs @@ -0,0 +1,161 @@ +using System.Numerics; + +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Atlas allocator that allocates texture space in a 2D texture atlas +/// This variant divides the atlas into rows of different sizes and packs similar sized textures into appropriate rows. +/// +public class Atlas2DPartitioner : IRecycleImageViewPartitioner, ISize2D +{ + public ImageViewPartitionInfo BackingPartition { get; set; } + + protected class Row(int yPos, int texSize, int atlasSize) + { + public readonly int YPos = yPos; + public readonly int TotalSlots = atlasSize / texSize; + public readonly int TexSize = texSize; + public readonly FreeListIndexPool FreeListIndexPool = new(atlasSize / texSize, false); + } + + protected readonly List Rows = []; + protected int RemainingSpace; + + /// + /// Width/height of atlas + /// + public int AtlasSize { get; private set; } + + /// + public int Width => AtlasSize; + + /// + public int Height => AtlasSize; + + /// + /// Constructor + /// + public Atlas2DPartitioner(ImageViewPartitionInfo backingPartition) + { + BackingPartition = backingPartition; + AtlasSize = backingPartition.Image.Extent.Width; + RemainingSpace = AtlasSize; + } + + private static bool AllocateRow(Row row, out int2 offset) + { + if (!row.FreeListIndexPool.TryAdd(out var slot)) + { + offset = new int2(); + return false; + } + + if (slot >= row.TotalSlots) + { + // The pool handed out an index beyond the row; give it back so it isn't leaked + row.FreeListIndexPool.Remove(slot); + offset = new int2(); + return false; + } + + offset = new int2(row.TexSize * slot, row.YPos); + return true; + } + + private bool TryAllocate(int width, int height, out int x, out int y) + { + // Round up to the nearest power of 2, clamping to 1 so a zero-sized request doesn't divide by zero + var size = (int)BitOperations.RoundUpToPowerOf2(Math.Max(1u, (uint)Math.Max(width, height))); + // Find a row with the right size or create a new one, avoiding a LINQ enumerator allocation on this hot path + for (var i = 0; i < Rows.Count; i++) + { + var row = Rows[i]; + if (row.TexSize != size) + continue; + + if (!AllocateRow(row, out var offset)) + continue; + + x = offset.X; + y = offset.Y; + return true; + } + + if (size > RemainingSpace) + { + x = -1; + y = -1; + return false; + } + + Rows.Add(new Row(AtlasSize - RemainingSpace, size, AtlasSize)); + RemainingSpace -= size; + + if (!AllocateRow(Rows[^1], out var offset2)) + throw new Exception("AtlasAllocator: Internal error"); + x = offset2.X; + y = offset2.Y; + return true; + } + + private void Free(int x, int y) + { + foreach (var row in Rows) + { + if (y != row.YPos) + continue; + var slot = x / row.TexSize; + row.FreeListIndexPool.Remove(slot); + return; + } + + throw new Exception("AtlasAllocator: Invalid offset"); + } + + public void Reset(ImageViewPartitionInfo info) + { + BackingPartition = info; + AtlasSize = info.Image.Extent.Width; + RemainingSpace = AtlasSize; + // Discard the old rows: their positions were carved out of the previous vertical space + Rows.Clear(); + } + + public bool TryCreatePartition( + in ImageViewPartitionInfo.CreateInfo createInfo, + out ImageViewPartitionInfo partition + ) + { + if (createInfo.Extent.Depth != 1) + throw new ArgumentException("Depth must be 1"); + if (createInfo.LayerCount != 1) + throw new ArgumentException("LayerCount must be 1"); + + if (!TryAllocate(createInfo.Extent.Width, createInfo.Extent.Height, out var x, out var y)) + { + partition = default; + return false; + } + + partition = BackingPartition with + { + Partitioner = this, + Extent = createInfo.Extent, + Offset = new VkOffset3D + { + X = x, + Y = y, + Z = 0, + }, + ArrayCount = 1, + ArrayOffset = BackingPartition.ArrayOffset, + }; + + return true; + } + + public void FreePartition(in ImageViewPartitionInfo inAllocation) + { + Free(inAllocation.Offset.X, inAllocation.Offset.Y); + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Image/IImageViewPartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Image/IImageViewPartitioner.cs new file mode 100644 index 0000000..73ba8ca --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Image/IImageViewPartitioner.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Interface for a sub-image allocator object capable of allocating portions of an image (e.g.: texture atlas, or texture array) +/// +public interface IImageViewPartitioner +{ + /// + /// Get the handle to the backing ImageView this partitioner is based on + /// + /// + public ImageViewPartitionInfo BackingPartition { get; protected set; } + + /// + /// Reset the partitioner to its initial state with the given partition info. Invalidates all current allocations. + /// + /// + public void Reset(ImageViewPartitionInfo info); + + /// + /// Get a partition of an imageview with the given creation info. + /// + /// Partition creation info + /// The resulting partition + /// True if the allocation was successful + public bool TryCreatePartition( + in ImageViewPartitionInfo.CreateInfo createInfo, + out ImageViewPartitionInfo partition + ); +} + +/// +/// Interface for a sub-image allocator object capable of allocating portions of an image (e.g.: texture atlas, or texture array) +/// +public interface IRecycleImageViewPartitioner : IImageViewPartitioner +{ + /// + /// Free an imageview partition sourced from this partitioner + /// + /// Struct containing all relevant information about the allocation/partition + public void FreePartition(in ImageViewPartitionInfo inAllocation); +} + +public static class ImageViewPartitionerExtensions +{ + public static ImageViewPartitionInfo CreatePartition( + this T partitioner, + in ImageViewPartitionInfo.CreateInfo createInfo + ) + where T : IImageViewPartitioner + { + if (!partitioner.TryCreatePartition(createInfo, out var partition)) + throw new OutOfMemoryException("Failed to create partition"); + + return partition; + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Image/ImageStagingRange.cs b/Brutal.Vulkan.Abstractions/Partitioner/Image/ImageStagingRange.cs new file mode 100644 index 0000000..1931b7a --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Image/ImageStagingRange.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Struct representing a sub-image resource, containing the image handle, subresource, offset and extent +/// Used to help with staging resources +/// +public struct ImageStagingRange +{ + /// + /// Image handle + /// + public VkImage Image; + + /// + /// Subresource range of the image + /// + public VkImageSubresourceRange SubresourceRange; + + /// + /// Number of mip levels in the subresource + /// + public int MipLevels => SubresourceRange.LevelCount; + + /// + /// Offset of the sub-image within the original image + /// + public VkOffset3D Offset; + + /// + /// Extent of the sub-image + /// + public VkExtent3D Extent; + + /// + /// Create a staging range from an image, extent and subresource range + /// + /// + /// + /// + /// + public static ImageStagingRange FromImage( + VkImage image, + VkExtent3D extent3D, + VkImageSubresourceRange subresourceRange + ) + { + return new ImageStagingRange + { + Image = image, + SubresourceRange = subresourceRange, + Offset = new VkOffset3D(), + Extent = extent3D, + }; + } + + /// + /// Convenience method to get a staging subresource struct for this sub-image + /// + /// + public static ImageStagingRange FromPartition(ImageViewPartitionInfo subImage) + { + return new ImageStagingRange + { + Image = subImage.VkImage, + SubresourceRange = subImage.LocalSubresourceRange, + Offset = subImage.Offset, + Extent = subImage.Extent, + }; + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Image/ImageViewPartitionInfo.cs b/Brutal.Vulkan.Abstractions/Partitioner/Image/ImageViewPartitionInfo.cs new file mode 100644 index 0000000..c781355 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Image/ImageViewPartitionInfo.cs @@ -0,0 +1,91 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Allocation information for a partition of an image allocation (portion of a larger image) +/// +/// Handle to the source image view +/// Number of array layers allocated to this sub-image, within ImageViewSubresourceRange +/// Array offset of the sub-image, within ImageViewSubresourceRange +/// Size of the sub-image +/// Offset of the sub-image within the original image +/// Source object that created this partition, if any. If null, assume this is a full image allocation +public readonly record struct ImageViewPartitionInfo( + ImageViewEx ImageView, + int ArrayCount, + int ArrayOffset, + VkExtent3D Extent, + VkOffset3D Offset, + IImageViewPartitioner? Partitioner +) +{ + /// + /// Creation information for a sub-image allocation + /// + /// Size of the sub-image + /// Number of array layers allocated to this sub-image, within ImageViewSubresourceRange + public record struct CreateInfo(VkExtent3D Extent, int LayerCount); + + /// + /// If true, this partition is a full image allocation + /// + public bool IsFullPartition => Partitioner is null; + + public ImageEx Image => ImageView.Image; + + /// + /// Image handle + /// + public VkImage VkImage => Image.VkImage; + + /// + /// Subresource range of the actual sub-image, within the original image + /// + public VkImageSubresourceRange LocalSubresourceRange => + ImageView.SubresourceRange with + { + BaseArrayLayer = ImageView.SubresourceRange.BaseArrayLayer + ArrayOffset, + LayerCount = ArrayCount, + }; + + /// + /// Return this partition to the recycling partitioner that created it, via + /// . For a full partition or a + /// non-recycling partitioner this is a no-op - the backing view and image belong to their + /// owner and are released by disposing them directly. + /// + public void Free() + { + if (Partitioner is IRecycleImageViewPartitioner recycler) + recycler.FreePartition(in this); + } + + /// + /// Get the normalized offset of the sub-image within the original image. + /// EG: for UV mapping + /// + /// Normalized offset as float3 + public readonly float3 GetNormalizedOffset() + { + var totalExtent = Image.Extent; + return new float3( + Offset.X / (float)totalExtent.Width, + Offset.Y / (float)totalExtent.Height, + Offset.Z / (float)totalExtent.Depth + ); + } + + /// + /// Get the normalized extent of the sub-image within the original image + /// EG: for UV mapping + /// + /// Normalized extent as float3 + public readonly float3 GetNormalizedExtent() + { + var totalExtent = Image.Extent; + return new float3( + Extent.Width / (float)totalExtent.Width, + Extent.Height / (float)totalExtent.Height, + Extent.Depth / (float)totalExtent.Depth + ); + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Image/QuadTreePartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Image/QuadTreePartitioner.cs new file mode 100644 index 0000000..4f714af --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Image/QuadTreePartitioner.cs @@ -0,0 +1,533 @@ +using System.Numerics; + +namespace Brutal.VulkanApi.Abstractions; + +/// +/// 2-D power-of-two square quad-tree partitioner for a dynamic texture atlas. +/// +/// The atlas is a square of ; slots are power-of-two squares in +/// [MinElementSize, MaxElementSize]. Compared to 's row +/// buckets, the quad tree is very fragmentation-resistant: empty sibling groups are merged back +/// into their parent on (which retries through +/// automatically), so space freed by mixed-size allocations coalesces into larger slots again. +/// +/// Two APIs are available: +/// +/// The contract +/// ( / ), interchangeable with the +/// other image partitioners. +/// A direct slot API ( / / ) +/// returning an opaque slot id that is stable for the slot's lifetime - query +/// each frame rather than caching the rect, so a future atlas +/// resize/squash can relocate slots transparently. When returns -1 the +/// documented fallback is to retry at half size; cascades simply request the largest size and +/// take what they get. +/// +/// +/// Nodes are only ever created (root, then groups of four on subdivide) and freed (groups of four +/// on merge), so the four children of a branch are always contiguous in the node array - child +/// j of a branch is firstChild + j. +/// +public class QuadTreePartitioner : IRecycleImageViewPartitioner, ISize2D +{ + /// + /// Pixel rectangle of an allocated atlas slot, relative to the backing partition's offset. + /// Slots are always square. + /// + public readonly record struct Rect(int X, int Y, int Size); + + private struct Node + { + /// Branch: index of first child node. Empty leaf: -1. Full leaf: element index. + public int FirstChild; + + /// True only for a full leaf (one element occupies this node). Branches and empty leaves are false. + public bool IsFull; + } + + private struct Element + { + public int X; + public int Y; + public int Size; + public int NodeIndex; + + /// + /// Bumped every time this slot is freed (and on ), so an id issued for an + /// earlier occupant of the slot no longer matches. Survives slot reuse: InsertElement + /// carries it over rather than resetting it. + /// + public int Generation; + } + + private readonly record struct NodeRef(int Index, int Depth, int X, int Y, int Size); + + // Public ids pack a generation above the element index so a stale id cannot alias a later + // occupant of the same slot: id = (generation << INDEX_BITS) | index. 20 + 11 bits keeps the + // id non-negative (-1 stays the failure sentinel); the generation wraps after 2048 reuses of + // one slot, which is the (documented) limit of the protection. + private const int INDEX_BITS = 20; + private const int INDEX_MASK = (1 << INDEX_BITS) - 1; + private const int GENERATION_MASK = 0x7FF; + + private readonly List _nodes = []; + private readonly Stack _nodeFree = new(); // LIFO - preserves contiguous groups of four + + // _elements, _elemFree and _elementsByPosition all hold element INDICES; public ids are made with MakeId + private readonly List _elements = []; + private readonly Stack _elemFree = new(); + private readonly Dictionary<(int X, int Y), int> _elementsByPosition = new(); + + // Reusable traversal scratch, cleared before each use + private readonly Stack _scratchIndices = new(); + private readonly Stack _scratchRefs = new(); + + private readonly int _requestedMaxElementSize; + private readonly int _requestedMinElementSize; + + private int _totalDepth; + private int _minDepth; // shallowest allocatable depth (= largest slot, MaxElementSize) + private int _maxDepth; // deepest allocatable depth (= smallest slot, MinElementSize) + private int _allocationCount; + + public ImageViewPartitionInfo BackingPartition { get; set; } + + /// Atlas edge length in pixels (square, power of two). + public int TotalSize { get; private set; } + + /// Largest allocatable slot edge (power of two). + public int MaxElementSize { get; private set; } + + /// Smallest allocatable slot edge (power of two). + public int MinElementSize { get; private set; } + + /// Number of live allocations. + public int Count => _allocationCount; + + /// + public int Width => TotalSize; + + /// + public int Height => TotalSize; + + /// + /// Construct a quad-tree partitioner over the backing partition, whose extent must be a + /// square power of two with a depth of one. + /// + /// Backing image partition to slice up + /// Largest allocatable slot edge (power of two); 0 means the full atlas size + /// Smallest allocatable slot edge (power of two) + public QuadTreePartitioner(ImageViewPartitionInfo backingPartition, int maxElementSize = 0, int minElementSize = 1) + { + _requestedMaxElementSize = maxElementSize; + _requestedMinElementSize = minElementSize; + BackingPartition = backingPartition; + Initialize(backingPartition); + } + + /// + public void Reset(ImageViewPartitionInfo info) + { + BackingPartition = info; + Initialize(info); + } + + private void Initialize(ImageViewPartitionInfo backingPartition) + { + var extent = backingPartition.Extent; + if (extent.Depth != 1) + throw new ArgumentException("Backing partition depth must be 1"); + if (extent.Width != extent.Height) + throw new ArgumentException("Backing partition must be square"); + if (!BitOperations.IsPow2((uint)extent.Width)) + throw new ArgumentException("Atlas size must be a power of two"); + + var totalSize = extent.Width; + var maxElementSize = _requestedMaxElementSize == 0 ? totalSize : _requestedMaxElementSize; + var minElementSize = _requestedMinElementSize; + + if (!BitOperations.IsPow2((uint)maxElementSize) || !BitOperations.IsPow2((uint)minElementSize)) + throw new ArgumentException("Atlas element sizes must be powers of two"); + if (totalSize < maxElementSize || maxElementSize < minElementSize || minElementSize < 1) + throw new ArgumentException("Bad / mismatched atlas element sizes"); + + TotalSize = totalSize; + MaxElementSize = maxElementSize; + MinElementSize = minElementSize; + + _totalDepth = BitOperations.Log2((uint)totalSize); + _minDepth = _totalDepth - BitOperations.Log2((uint)maxElementSize); + _maxDepth = _totalDepth - BitOperations.Log2((uint)minElementSize); + + _nodes.Clear(); + _nodeFree.Clear(); + InvalidateAllElements(); + _elementsByPosition.Clear(); + _allocationCount = 0; + + // Root: an empty, unsubdivided leaf covering the whole atlas + _nodes.Add(new Node { FirstChild = -1, IsFull = false }); + } + + /// + /// Requests whose larger edge exceeds fail rather than clamp. + public bool TryCreatePartition( + in ImageViewPartitionInfo.CreateInfo createInfo, + out ImageViewPartitionInfo partition + ) + { + if (createInfo.Extent.Depth != 1) + throw new ArgumentException("Depth must be 1"); + if (createInfo.LayerCount != 1) + throw new ArgumentException("LayerCount must be 1"); + + var size = Math.Max(createInfo.Extent.Width, createInfo.Extent.Height); + + // MaxElementSize is a power of two, so the rounded-up request exceeds it exactly when the raw one does + if (size > MaxElementSize) + { + partition = default; + return false; + } + + var id = Alloc(size); + if (id < 0) + { + partition = default; + return false; + } + + var rect = GetRect(id); + + partition = BackingPartition with + { + Partitioner = this, + Extent = createInfo.Extent, + Offset = new VkOffset3D + { + X = BackingPartition.Offset.X + rect.X, + Y = BackingPartition.Offset.Y + rect.Y, + Z = BackingPartition.Offset.Z, + }, + ArrayCount = 1, + ArrayOffset = BackingPartition.ArrayOffset, + }; + + return true; + } + + /// + public void FreePartition(in ImageViewPartitionInfo inAllocation) + { + var position = ( + inAllocation.Offset.X - BackingPartition.Offset.X, + inAllocation.Offset.Y - BackingPartition.Offset.Y + ); + + if (!_elementsByPosition.TryGetValue(position, out var index)) + throw new ArgumentException("Partition offset does not match a live slot of this partitioner"); + + FreeIndex(index); + } + + /// + /// Allocate a slot for the requested edge size (rounded up to a power of two and clamped to + /// [MinElementSize, MaxElementSize]). Returns the slot id, or -1 if the atlas can't fit + /// it even after a cleanup pass. + /// + public int Alloc(int size) + { + var targetDepth = _totalDepth - BitOperations.Log2(BitOperations.RoundUpToPowerOf2((uint)Math.Max(1, size))); + if (targetDepth < _minDepth) + targetDepth = _minDepth; + else if (targetDepth > _maxDepth) + targetDepth = _maxDepth; + + if (!TryFindSlot(targetDepth, out var cand)) + { + Cleanup(); + if (!TryFindSlot(targetDepth, out cand)) + return -1; + } + + // Subdivide the candidate down to the target depth, always descending into the first child + while (cand.Depth < targetDepth) + { + var fc = SubdivideNode(cand.Index); + var half = cand.Size / 2; + cand = new NodeRef(fc, cand.Depth + 1, cand.X + half, cand.Y + half, half); + } + + var elem = InsertElement( + new Element + { + X = cand.X, + Y = cand.Y, + Size = cand.Size, + NodeIndex = cand.Index, + } + ); + var node = _nodes[cand.Index]; + node.IsFull = true; + node.FirstChild = elem; + _nodes[cand.Index] = node; + _elementsByPosition[(cand.X, cand.Y)] = elem; + _allocationCount++; + return MakeId(elem, _elements[elem].Generation); + } + + /// + /// Release a slot. Its node becomes an empty leaf, reclaimable by . + /// Returns false for an invalid, already-freed, or stale id: ids carry a generation that is + /// bumped when their slot is freed or the partitioner is , so an old id + /// cannot release a later slot that reused it (the generation wraps after 2048 reuses of one + /// slot, which is the limit of the protection). + /// + public bool Free(int id) + { + if (!TryResolve(id, out var index)) + return false; + + FreeIndex(index); + return true; + } + + /// Pixel rectangle of an allocated slot. Returns a zero rect for an invalid or stale id. + public Rect GetRect(int id) + { + if (!TryResolve(id, out var index)) + return default; + var e = _elements[index]; + return new Rect(e.X, e.Y, e.Size); + } + + /// Slot edge size for an allocated id, or 0 for an invalid or stale id. + public int GetSize(int id) => TryResolve(id, out var index) ? _elements[index].Size : 0; + + private static int MakeId(int index, int generation) => (generation << INDEX_BITS) | index; + + /// + /// Map a public id to a live element index: the index must be in range, the id's generation + /// must match the slot's, and the slot's node must still be a full leaf pointing back at it. + /// + private bool TryResolve(int id, out int index) + { + index = id & INDEX_MASK; + if (id < 0 || index >= _elements.Count) + return false; + + var element = _elements[index]; + if (element.Generation != (id >> INDEX_BITS)) + return false; + + if ((uint)element.NodeIndex >= (uint)_nodes.Count) + return false; + + var node = _nodes[element.NodeIndex]; + return node.IsFull && node.FirstChild == index; + } + + /// Release a live element by index, bumping its generation so outstanding ids for it go stale. + private void FreeIndex(int index) + { + var element = _elements[index]; + var node = _nodes[element.NodeIndex]; + + node.IsFull = false; + node.FirstChild = -1; + _nodes[element.NodeIndex] = node; + + _elementsByPosition.Remove((element.X, element.Y)); + element.Generation = (element.Generation + 1) & GENERATION_MASK; + _elements[index] = element; + _elemFree.Push(index); + _allocationCount--; + } + + /// + /// Mark every element slot free without discarding it, bumping each generation so ids issued + /// before a are rejected afterwards instead of aliasing new slots. + /// + private void InvalidateAllElements() + { + _elemFree.Clear(); + for (var i = _elements.Count - 1; i >= 0; i--) + { + var element = _elements[i]; + element.Generation = (element.Generation + 1) & GENERATION_MASK; + _elements[i] = element; + _elemFree.Push(i); + } + } + + /// + /// Merge empty sibling groups back into their parent, repeating until nothing more merges, so + /// freed space coalesces all the way up the tree ( runs this before giving + /// up). Cheap; safe to call any time. + /// + public void Cleanup() + { + // Each pass visits parents before children, so a merge at depth d only exposes its parent + // at depth d-1 to the next pass. Looping until a pass merges nothing is bounded by the depth. + bool merged; + do + { + merged = CleanupPass(); + } while (merged); + } + + /// One top-down merge pass; returns true if any group was merged. + private bool CleanupPass() + { + // Root is a full leaf or an empty unsubdivided leaf → nothing to merge + if (_nodes[0].IsFull || _nodes[0].FirstChild < 0) + return false; + + var merged = false; + var toProcess = _scratchIndices; + toProcess.Clear(); + toProcess.Push(0); + + while (toProcess.Count > 0) + { + var idx = toProcess.Pop(); + var fc = _nodes[idx].FirstChild; + var emptyLeaves = 0; + + for (var j = 0; j < 4; j++) + { + var child = _nodes[fc + j]; + if (child.IsFull) + continue; // occupied leaf - never empty + if (child.FirstChild == -1) + emptyLeaves++; // empty leaf + else + toProcess.Push(fc + j); // branch - descend + } + + if (emptyLeaves == 4) + { + // Free the four children in reverse so the LIFO free list keeps them as a contiguous + // group reclaimable, in order, by the next subdivide + for (var j = 3; j >= 0; j--) + _nodeFree.Push(fc + j); + var node = _nodes[idx]; + node.FirstChild = -1; + node.IsFull = false; + _nodes[idx] = node; + merged = true; + } + } + + return merged; + } + + /// + /// Find an empty leaf at (perfect fit), or the deepest empty leaf + /// shallower than it (which subdivides down). Returns false if none exists. + /// + private bool TryFindSlot(int targetDepth, out NodeRef best) + { + best = new NodeRef(-1, 0, 0, 0, 0); // Index == -1 ⇒ nothing found + + var root = _nodes[0]; + if (root.IsFull) + return false; + + var rootRef = new NodeRef(0, 0, 0, 0, TotalSize); + if (root.FirstChild == -1) + { + // Empty unsubdivided root - usable for any target (subdivided down by the caller) + best = rootRef; + return true; + } + + var toProcess = _scratchRefs; + toProcess.Clear(); + toProcess.Push(rootRef); + + while (toProcess.Count > 0) + { + var np = toProcess.Pop(); + if (np.Depth >= targetDepth) + continue; + + var childDepth = np.Depth + 1; + var fc = _nodes[np.Index].FirstChild; + var childSize = np.Size / 2; // also the child min-corner offset within the parent + + for (var j = 0; j < 4; j++) + { + // Child min corners, in corner order (max,max),(min,max),(max,min),(min,min) + var cx = np.X + (j == 0 || j == 2 ? childSize : 0); + var cy = np.Y + (j == 0 || j == 1 ? childSize : 0); + + var childIdx = fc + j; + var child = _nodes[childIdx]; + if (child.IsFull) + continue; + + var childRef = new NodeRef(childIdx, childDepth, cx, cy, childSize); + if (child.FirstChild == -1) // empty leaf + { + if (childDepth == targetDepth) + { + best = childRef; // perfect fit + return true; + } + if (childDepth > best.Depth) + best = childRef; // deepest subdividable candidate so far + } + else + { + toProcess.Push(childRef); // branch - descend + } + } + } + + return best.Index != -1; + } + + /// Turn a leaf into a branch with four contiguous empty-leaf children; returns the first child index. + private int SubdivideNode(int nodeIndex) + { + var fc = InsertNode(new Node { FirstChild = -1, IsFull = false }); + for (var i = 1; i < 4; i++) + InsertNode(new Node { FirstChild = -1, IsFull = false }); + + var node = _nodes[nodeIndex]; + node.FirstChild = fc; + node.IsFull = false; + _nodes[nodeIndex] = node; + return fc; + } + + private int InsertNode(Node node) + { + if (_nodeFree.Count > 0) + { + var i = _nodeFree.Pop(); + _nodes[i] = node; + return i; + } + _nodes.Add(node); + return _nodes.Count - 1; + } + + private int InsertElement(Element element) + { + if (_elemFree.Count > 0) + { + var i = _elemFree.Pop(); + // Keep the slot's generation: it was bumped when the previous occupant was freed + element.Generation = _elements[i].Generation; + _elements[i] = element; + return i; + } + if (_elements.Count > INDEX_MASK) + throw new InvalidOperationException("Too many live slots for the id encoding"); + element.Generation = 0; + _elements.Add(element); + return _elements.Count - 1; + } +} diff --git a/Brutal.Vulkan.Abstractions/Partitioner/Image/TextureArrayPartitioner.cs b/Brutal.Vulkan.Abstractions/Partitioner/Image/TextureArrayPartitioner.cs new file mode 100644 index 0000000..8d0e924 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Partitioner/Image/TextureArrayPartitioner.cs @@ -0,0 +1,100 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Texture array slot partitioner +/// Creates and manages an image array, and this allocator will distribute slots from the array for users to stage/bind to +/// +public class TextureArrayPartitioner : IRecycleImageViewPartitioner +{ + public ImageViewPartitionInfo BackingPartition { get; set; } + + /// + /// Free list of texture array slots + /// + private readonly FreeListIndexPool _textureArraySlots; + + /// + /// Total number of slots in the texture array + /// + public int TotalSlots => BackingPartition.LocalSubresourceRange.LayerCount; + + /// + /// Construct a texture array partitioner from an existing image allocation + /// + /// Backing image allocation + public TextureArrayPartitioner(ImageViewPartitionInfo backingPartition) + { + BackingPartition = backingPartition; + _textureArraySlots = new FreeListIndexPool(backingPartition.LocalSubresourceRange.LayerCount, false); + } + + /// + public bool TryCreatePartition( + in ImageViewPartitionInfo.CreateInfo createInfo, + out ImageViewPartitionInfo partition + ) + { + if ( + createInfo.Extent.Width > BackingPartition.Extent.Width + || createInfo.Extent.Height > BackingPartition.Extent.Height + || createInfo.Extent.Depth > BackingPartition.Extent.Depth + ) + { + throw new ArgumentException("Extent mismatch"); + } + if (createInfo.LayerCount > 1) + { + throw new ArgumentException("ArraySlots must be 1"); + } + + if (!TryAllocateSlot(out var slot)) + { + partition = default; + return false; + } + + partition = BackingPartition with + { + Partitioner = this, + Extent = createInfo.Extent, + ArrayCount = 1, + ArrayOffset = BackingPartition.ArrayOffset + slot, + }; + + return true; + } + + /// + /// Allocate a slot in the texture array and return the array index (slot) + /// Can call this directly if you don't need the full ImageSubAllocationInfo + /// + /// Slot/array index allocated + public bool TryAllocateSlot(out int slot) + { + return _textureArraySlots.TryAdd(out slot); + } + + /// + public void FreePartition(in ImageViewPartitionInfo inAllocation) + { + // Invert the offset math from TryCreatePartition: ArrayOffset = BackingPartition.ArrayOffset + slot + FreeSlot(inAllocation.ArrayOffset - BackingPartition.ArrayOffset); + } + + /// + /// Free up a slot in texture array + /// Can call this directly if you didn't need the full ImageSubAllocationInfo and just used the slot handle + /// + /// Array index (aka slot handle) + public void FreeSlot(int slot) + { + _textureArraySlots.Remove(slot); + } + + public void Reset(ImageViewPartitionInfo info) + { + BackingPartition = info; + _textureArraySlots.Clear(); + _textureArraySlots.Capacity = BackingPartition.LocalSubresourceRange.LayerCount; + } +} diff --git a/Brutal.Vulkan.Abstractions/Presets.cs b/Brutal.Vulkan.Abstractions/Presets.cs new file mode 100644 index 0000000..63cdf2c --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Presets.cs @@ -0,0 +1,555 @@ +namespace Brutal.VulkanApi.Abstractions; + +public static class Presets +{ + public struct VertexInput + { + /// + /// An empty vertex input + /// + public static readonly NativeList None = [new()]; + } + + public struct BlendState + { + /// + /// Color blend using alpha + /// + public static readonly PtrOwner BlendColorAlpha = new( + new VkPipelineColorBlendStateCreateInfo + { + AttachmentCount = 1, + Attachments = BlendAttachment.BlendColorAlpha, + } + ); + + /// + /// Source color replaces destination color directly with no blending + /// + public static readonly PtrOwner BlendNone = new( + new VkPipelineColorBlendStateCreateInfo { AttachmentCount = 1, Attachments = BlendAttachment.BlendNone } + ); + + /// + /// Additive blend + /// + public static readonly PtrOwner BlendAdditive = new( + new VkPipelineColorBlendStateCreateInfo + { + AttachmentCount = 1, + Attachments = BlendAttachment.BlendColorAdditive, + } + ); + + /// + /// Source color is softer the brighter the destination color is, resulting components don't exceed 1 + /// + public static readonly PtrOwner BlendSoftAdditive = new( + new VkPipelineColorBlendStateCreateInfo + { + AttachmentCount = 1, + Attachments = BlendAttachment.BlendColorSoftAdditive, + } + ); + + /// + /// Multiplicative blend + /// + public static readonly PtrOwner BlendMultiplicative = new( + new VkPipelineColorBlendStateCreateInfo + { + AttachmentCount = 1, + Attachments = BlendAttachment.BlendColorMultiplicative, + } + ); + } + + public struct BlendAttachment + { + /// + /// Source color replaces destination color directly with no blending + /// + public static readonly PtrOwner BlendNone = new( + new VkPipelineColorBlendAttachmentState + { + BlendEnable = false, + ColorWriteMask = + VkColorComponentFlags.RBit + | VkColorComponentFlags.GBit + | VkColorComponentFlags.BBit + | VkColorComponentFlags.ABit, + } + ); + + /// + /// Color blend using alpha + /// + public static readonly PtrOwner BlendColorAlpha = new( + new VkPipelineColorBlendAttachmentState + { + BlendEnable = true, + SrcColorBlendFactor = VkBlendFactor.SrcAlpha, + DstColorBlendFactor = VkBlendFactor.OneMinusSrcAlpha, + ColorBlendOp = VkBlendOp.Add, + SrcAlphaBlendFactor = VkBlendFactor.One, + DstAlphaBlendFactor = VkBlendFactor.Zero, + AlphaBlendOp = VkBlendOp.Add, + ColorWriteMask = + VkColorComponentFlags.RBit + | VkColorComponentFlags.GBit + | VkColorComponentFlags.BBit + | VkColorComponentFlags.ABit, + } + ); + + /// + /// Additive blend + /// + public static readonly PtrOwner BlendColorAdditive = new( + new VkPipelineColorBlendAttachmentState + { + BlendEnable = true, + SrcColorBlendFactor = VkBlendFactor.One, + DstColorBlendFactor = VkBlendFactor.DstAlpha, + ColorBlendOp = VkBlendOp.Add, + SrcAlphaBlendFactor = VkBlendFactor.One, + DstAlphaBlendFactor = VkBlendFactor.Zero, + AlphaBlendOp = VkBlendOp.Add, + ColorWriteMask = + VkColorComponentFlags.RBit + | VkColorComponentFlags.GBit + | VkColorComponentFlags.BBit + | VkColorComponentFlags.ABit, + } + ); + + /// + /// Source color is softer the brighter the destination color is, resulting components don't exceed 1 + /// + public static readonly PtrOwner BlendColorSoftAdditive = new( + new VkPipelineColorBlendAttachmentState + { + BlendEnable = true, + SrcColorBlendFactor = VkBlendFactor.OneMinusDstColor, + DstColorBlendFactor = VkBlendFactor.DstAlpha, + ColorBlendOp = VkBlendOp.Add, + SrcAlphaBlendFactor = VkBlendFactor.One, + DstAlphaBlendFactor = VkBlendFactor.Zero, + AlphaBlendOp = VkBlendOp.Add, + ColorWriteMask = + VkColorComponentFlags.RBit + | VkColorComponentFlags.GBit + | VkColorComponentFlags.BBit + | VkColorComponentFlags.ABit, + } + ); + + /// + /// Multiplicative blend + /// + public static readonly PtrOwner BlendColorMultiplicative = new( + new VkPipelineColorBlendAttachmentState + { + BlendEnable = true, + SrcColorBlendFactor = VkBlendFactor.DstColor, + DstColorBlendFactor = VkBlendFactor.Zero, + ColorBlendOp = VkBlendOp.Add, + SrcAlphaBlendFactor = VkBlendFactor.One, + DstAlphaBlendFactor = VkBlendFactor.Zero, + AlphaBlendOp = VkBlendOp.Add, + ColorWriteMask = + VkColorComponentFlags.RBit + | VkColorComponentFlags.GBit + | VkColorComponentFlags.BBit + | VkColorComponentFlags.ABit, + } + ); + } + + /// + /// Depth stencil presets + /// + public struct DepthStencil + { + /// + /// Depth stencil with depth test and write enabled + /// + public static readonly PtrOwner DepthTestWrite = new( + new VkPipelineDepthStencilStateCreateInfo + { + DepthTestEnable = true, + DepthWriteEnable = true, + DepthCompareOp = VkCompareOp.LessOrEqual, + DepthBoundsTestEnable = false, + StencilTestEnable = false, + } + ); + + /// + /// Depth stencil with depth test enabled but not write. Good for a transparent particle + /// + public static readonly PtrOwner DepthTestNoWrite = new( + new VkPipelineDepthStencilStateCreateInfo + { + DepthTestEnable = true, + DepthWriteEnable = false, + DepthCompareOp = VkCompareOp.LessOrEqual, + DepthBoundsTestEnable = false, + StencilTestEnable = false, + } + ); + + /// + /// Depth stencil with depth test enabled and write enabled. Stencil test enabled and using front and back StencilOpState values. + /// + public static readonly PtrOwner DepthTestWriteStencil = new( + new VkPipelineDepthStencilStateCreateInfo + { + DepthTestEnable = true, + DepthWriteEnable = true, + DepthCompareOp = VkCompareOp.LessOrEqual, + DepthBoundsTestEnable = false, + StencilTestEnable = true, + Front = new VkStencilOpState(), + Back = new VkStencilOpState(), + } + ); + + /// + /// Depth stencil with depth test and write disabled. Stencil test enabled and using front and back StencilOpState values. + /// + public static readonly PtrOwner DepthNoTestNoWriteStencil = new( + new VkPipelineDepthStencilStateCreateInfo + { + DepthTestEnable = false, + DepthWriteEnable = false, + DepthCompareOp = VkCompareOp.LessOrEqual, + DepthBoundsTestEnable = false, + StencilTestEnable = true, + Front = new VkStencilOpState(), + Back = new VkStencilOpState(), + } + ); + + /// + /// Depth stencil with depth test enabled but not write. Good for a transparent particle + /// + public static readonly PtrOwner NoDepthTest = new( + new VkPipelineDepthStencilStateCreateInfo() + ); + } + + public struct InputAssembly + { + /// + /// + /// + public static readonly PtrOwner PointList = new( + new VkPipelineInputAssemblyStateCreateInfo { Topology = VkPrimitiveTopology.PointList } + ); + + /// + /// + /// + public static readonly PtrOwner TriangleList = new( + new VkPipelineInputAssemblyStateCreateInfo { Topology = VkPrimitiveTopology.TriangleList } + ); + + /// + /// + /// + public static readonly PtrOwner TriangleStrip = new( + new VkPipelineInputAssemblyStateCreateInfo { Topology = VkPrimitiveTopology.TriangleStrip } + ); + + /// + /// + /// + public static readonly PtrOwner LineList = new( + new VkPipelineInputAssemblyStateCreateInfo { Topology = VkPrimitiveTopology.LineList } + ); + + /// + /// + /// + public static readonly PtrOwner LineStrip = new( + new VkPipelineInputAssemblyStateCreateInfo { Topology = VkPrimitiveTopology.LineStrip } + ); + + /// + /// + /// + public static readonly PtrOwner PatchList = new( + new VkPipelineInputAssemblyStateCreateInfo { Topology = VkPrimitiveTopology.PatchList } + ); + } + + public struct Multisample + { + /// + /// + /// + public static readonly PtrOwner None = new( + new VkPipelineMultisampleStateCreateInfo { RasterizationSamples = VkSampleCountFlags._1Bit } + ); + } + + public struct Rasterization + { + /// + /// + /// + public static class Fill + { + /// + /// + /// + public static readonly PtrOwner CullBack = new( + new VkPipelineRasterizationStateCreateInfo { CullMode = VkCullModeFlags.BackBit, LineWidth = 1 } + ); + + /// + /// + /// + public static readonly PtrOwner CullFront = new( + new VkPipelineRasterizationStateCreateInfo { CullMode = VkCullModeFlags.FrontBit, LineWidth = 1 } + ); + + /// + /// + /// + public static readonly PtrOwner CullNone = new( + new VkPipelineRasterizationStateCreateInfo { CullMode = VkCullModeFlags.None, LineWidth = 1 } + ); + } + + /// + /// + /// + public static class Line + { + /// + /// + /// + public static readonly PtrOwner CullBack = new( + new VkPipelineRasterizationStateCreateInfo + { + CullMode = VkCullModeFlags.BackBit, + PolygonMode = VkPolygonMode.Line, + LineWidth = 1.0f, + } + ); + + /// + /// + /// + public static readonly PtrOwner CullFront = new( + new VkPipelineRasterizationStateCreateInfo + { + CullMode = VkCullModeFlags.FrontBit, + PolygonMode = VkPolygonMode.Line, + LineWidth = 1.0f, + } + ); + + /// + /// + /// + public static readonly PtrOwner CullNone = new( + new VkPipelineRasterizationStateCreateInfo + { + CullMode = VkCullModeFlags.None, + PolygonMode = VkPolygonMode.Line, + LineWidth = 1.0f, + } + ); + } + } + + public struct Components + { + /// + /// + /// + public static readonly PtrOwner Default = new( + new VkComponentMapping + { + R = VkComponentSwizzle.R, + G = VkComponentSwizzle.G, + B = VkComponentSwizzle.B, + A = VkComponentSwizzle.A, + } + ); + } + + public struct Entrypoint + { + Ptr Name; + + internal unsafe Entrypoint(ReadOnlySpan name) + { + Name = name.AsPointer(); + } + + public static Entrypoint Main => new("main"u8); + + public static unsafe implicit operator byte*(Entrypoint entrypoint) => entrypoint.Name; + } + + public struct ShaderStage + { + /// + /// Create a shader stage with a pre-built module + /// + /// + /// + /// + public static VkPipelineShaderStageCreateInfo Make(VkShaderStageFlags stage, VkShaderModule shaderModule) => + new() + { + Name = Entrypoint.Main, + Stage = stage, + Module = shaderModule, + }; + + /// + /// Make a vertex shader stage + /// + public static VkPipelineShaderStageCreateInfo Vertex(VkShaderModule shaderModule) => + Make(VkShaderStageFlags.VertexBit, shaderModule); + + /// + /// Make a fragment shader stage + /// + public static VkPipelineShaderStageCreateInfo Fragment(VkShaderModule shaderModule) => + Make(VkShaderStageFlags.FragmentBit, shaderModule); + + /// + /// Make a geometry shader stage + /// + public static VkPipelineShaderStageCreateInfo Geometry(VkShaderModule shaderModule) => + Make(VkShaderStageFlags.GeometryBit, shaderModule); + + /// + /// Make a evaluation shader stage + /// + public static VkPipelineShaderStageCreateInfo Evaluation(VkShaderModule shaderModule) => + Make(VkShaderStageFlags.TessellationEvaluationBit, shaderModule); + + /// + /// Make a control shader stage + /// + public static VkPipelineShaderStageCreateInfo Control(VkShaderModule shaderModule) => + Make(VkShaderStageFlags.TessellationControlBit, shaderModule); + + /// + /// Make a compute shader stage + /// + public static VkPipelineShaderStageCreateInfo Compute(VkShaderModule shaderModule) => + Make(VkShaderStageFlags.ComputeBit, shaderModule); + } + + public struct Sampler + { + /// + /// Basic sampler config for a standard trilinear sampler that is clamped, with no anisotrophy + /// + public static VkSamplerCreateInfo SamplerLinearClamped => + new() + { + MagFilter = VkFilter.Linear, + MinFilter = VkFilter.Linear, + MipmapMode = VkSamplerMipmapMode.Linear, + AddressModeU = VkSamplerAddressMode.ClampToEdge, + AddressModeV = VkSamplerAddressMode.ClampToEdge, + AddressModeW = VkSamplerAddressMode.ClampToEdge, + MipLodBias = 0, + AnisotropyEnable = false, + MaxAnisotropy = 0, + CompareEnable = false, + CompareOp = VkCompareOp.Never, + MinLod = 0, + MaxLod = VK.LOD_CLAMP_NONE, + BorderColor = VkBorderColor.FloatOpaqueBlack, + UnnormalizedCoordinates = false, + }; + + /// + /// Basic sampler config for a standard trilinear sampler that repeats, with no anisotrophy + /// + public static VkSamplerCreateInfo SamplerLinearRepeat => + new() + { + MagFilter = VkFilter.Linear, + MinFilter = VkFilter.Linear, + MipmapMode = VkSamplerMipmapMode.Linear, + AddressModeU = VkSamplerAddressMode.Repeat, + AddressModeV = VkSamplerAddressMode.Repeat, + AddressModeW = VkSamplerAddressMode.Repeat, + MipLodBias = 0, + AnisotropyEnable = false, + MaxAnisotropy = 0, + CompareEnable = false, + CompareOp = VkCompareOp.Never, + MinLod = 0, + MaxLod = VK.LOD_CLAMP_NONE, + BorderColor = VkBorderColor.FloatOpaqueBlack, + UnnormalizedCoordinates = false, + }; + + /// + /// Trilinear clamped sampler with 16x anisotropic filtering. Requires the + /// samplerAnisotropy device feature; clamp MaxAnisotropy to the device's + /// maxSamplerAnisotropy limit if it is lower. + /// + public static VkSamplerCreateInfo SamplerAnisotropicClamped + { + get + { + var info = SamplerLinearClamped; + info.AnisotropyEnable = true; + info.MaxAnisotropy = 16; + return info; + } + } + + /// + /// Trilinear repeating sampler with 16x anisotropic filtering. Requires the + /// samplerAnisotropy device feature; clamp MaxAnisotropy to the device's + /// maxSamplerAnisotropy limit if it is lower. + /// + public static VkSamplerCreateInfo SamplerAnisotropicRepeat + { + get + { + var info = SamplerLinearRepeat; + info.AnisotropyEnable = true; + info.MaxAnisotropy = 16; + return info; + } + } + + /// + /// Basic sampler config for a standard point sampler that is clamped, with no anisotrophy + /// + public static VkSamplerCreateInfo SamplerPointClamped => + new() + { + MagFilter = VkFilter.Nearest, + MinFilter = VkFilter.Nearest, + MipmapMode = VkSamplerMipmapMode.Nearest, + AddressModeU = VkSamplerAddressMode.ClampToEdge, + AddressModeV = VkSamplerAddressMode.ClampToEdge, + AddressModeW = VkSamplerAddressMode.ClampToEdge, + MipLodBias = 0, + AnisotropyEnable = false, + MaxAnisotropy = 0, + CompareEnable = false, + CompareOp = VkCompareOp.Never, + MinLod = 0, + MaxLod = VK.LOD_CLAMP_NONE, + BorderColor = VkBorderColor.FloatOpaqueBlack, + UnnormalizedCoordinates = false, + }; + } +} diff --git a/Brutal.Vulkan.Abstractions/Shaders/ShaderStages.cs b/Brutal.Vulkan.Abstractions/Shaders/ShaderStages.cs new file mode 100644 index 0000000..7675fff --- /dev/null +++ b/Brutal.Vulkan.Abstractions/Shaders/ShaderStages.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// A builder for +/// +public class ShaderStages(Device inDevice, Span inStages, VkAllocator? allocator) + : IDisposable +{ + private readonly NativeList _stages = new(inStages); + + /// + /// The number of stages + /// + public int Count => _stages.Count; + + /// + /// Destroy shaders (only call this if you know you are responsible for destroying them!) + /// + public void Dispose() + { + if (_stages.Count == 0) + return; + + for (var index = 0; index < _stages.Count; index++) + inDevice.DestroyShaderModule(_stages[index].Module, allocator); + + _stages.Count = 0; + } + + /// + /// Implicit cast to the PipelineVertexInputStateCreateInfo structure + /// + public static unsafe implicit operator VkPipelineShaderStageCreateInfo*(ShaderStages inValue) => + inValue._stages.Ptr; + + /// + /// Offset the stages by some number + /// + public static unsafe VkPipelineShaderStageCreateInfo* operator +(ShaderStages inStages, int inValue) + { + if (inStages.Count <= inValue) + throw new ArgumentOutOfRangeException(nameof(inValue)); + + return (VkPipelineShaderStageCreateInfo*)inStages + inValue; + } + + /// + /// Create a span from a subset of the shader stages + /// + /// The start element + /// + /// + public Span Slice(int start) + { + return _stages.Slice(start); + } + + /// + /// Create a span from a subset of the shader stages + /// + /// The start element + /// How many elements to include + /// + /// + public Span Slice(int start, int length) + { + return _stages.Slice(start, length); + } +} diff --git a/Brutal.Vulkan.Abstractions/StagingPool.cs b/Brutal.Vulkan.Abstractions/StagingPool.cs new file mode 100644 index 0000000..cd0676f --- /dev/null +++ b/Brutal.Vulkan.Abstractions/StagingPool.cs @@ -0,0 +1,292 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Object that holds data for loading and submitting staging data to the GPU +/// +public class StagingPool : IDisposable +{ + private readonly Device _device; + private readonly IBufferAllocator _allocator; + private readonly Queue _queue; + private readonly VkCommandBufferLevel _level; + private readonly VkCommandPool _commandPool; + private readonly List _fences; + private readonly Stack _freeFences = new(); + private readonly List _commandBuffers; + private readonly List _stagingBuffers = []; + private readonly Dictionary> _freeStagingBuffers = new(); + private int _commandBufferIndex; + private int _submitted; + + // Staging buffer count as of the last Submit; only these belong to submitted work and are safe to recycle + private int _submittedStagingBuffers; + + internal StagingPool( + IBufferAllocator inAllocator, + Queue inQueue, + int inInitialCommandBufferCount, + VkCommandBufferLevel inLevel = VkCommandBufferLevel.Primary + ) + { + _queue = inQueue; + _level = inLevel; + _device = inAllocator.GetDevice(); + _allocator = inAllocator; + _commandPool = _device.CreateCommandPool( + new VkCommandPoolCreateInfo { QueueFamilyIndex = inQueue.Family, Flags = VkCommandPoolCreateFlags.None }, + null + ); + + _fences = new(1); + _commandBuffers = new(inInitialCommandBufferCount); + + if (inInitialCommandBufferCount > 0) + { + Span commandBuffers = stackalloc CommandBuffer[inInitialCommandBufferCount]; + + _device.AllocateCommandBuffers( + new VkCommandBufferAllocateInfo { CommandPool = _commandPool, Level = inLevel }, + commandBuffers + ); + + _commandBuffers.AddRange(commandBuffers); + } + else + { + _commandBuffers = []; + } + } + + /// + /// Allocate another command buffer from this pool + /// + /// + public CommandBuffer NextCommandBuffer() + { + if (_commandBufferIndex > _commandBuffers.Count) + throw new Exception("CommandBuffer index got ahead of Vk allocations"); + + if (_commandBufferIndex == _commandBuffers.Count) + { + _commandBuffers.Add( + _device.AllocateCommandBuffer( + new VkCommandBufferAllocateInfo { CommandPool = _commandPool, Level = _level } + ) + ); + } + + return _commandBuffers[_commandBufferIndex++]; + } + + /// + /// Add a staging buffer reference to this staging data, ensuring it is cached until we submit command buffers which use the buffer and then explicitly call Dispose() + /// + public BufferEx AddStagingBuffer(ByteSize value) + { + // Reuse a size-matched recycled buffer in O(1) instead of scanning a flat list + if (_freeStagingBuffers.TryGetValue(value, out var bucket) && bucket.Count > 0) + { + var recycled = bucket.Pop(); + _stagingBuffers.Add(recycled); + return recycled; + } + + var buffer = _allocator.CreateBuffer( + new BufferEx.CreateInfo + { + Name = "StagingBuffer", + BufferSize = value, + BufferUsage = VkBufferUsageFlags.TransferSrcBit, + AllocRequiredProperties = VkMemoryPropertyFlags.HostCoherentBit | VkMemoryPropertyFlags.HostVisibleBit, + } + ); + + _stagingBuffers.Add(buffer); + + return buffer; + } + + /// + /// Add a staging buffer reference to this staging data, ensuring it is cached until we submit command buffers which use the buffer and then explicitly call Dispose() + /// + public BufferEx AddStagingBuffer(ElementCount inCount) + where T : unmanaged + { + return AddStagingBuffer(ByteSize.Of(inCount)); + } + + /// + /// Add a staging buffer reference to this staging data, ensuring it is cached until we submit command buffers which use the buffer and then explicitly call Dispose() + /// + public BufferEx AddStagingBuffer(Span inData) + where T : unmanaged + { + var buffer = AddStagingBuffer(inData.Length); + + using var mapped = buffer.Map(); + inData.CopyTo(mapped.AsSpan()); + + return buffer; + } + + /// + /// Submit pending command buffers + /// + public StagingPool Submit() + { + return Submit([], [], []); + } + + /// + /// Submit pending command buffers + /// + public StagingPool Submit( + Span waitSemaphores, + Span waitDstStageMask, + Span signalSemaphores + ) + { + var count = _commandBufferIndex - _submitted; + if (count != 0) + { + // Reuse a recycled (already reset) fence before creating a new one + var fence = + _freeFences.Count > 0 + ? _freeFences.Pop() + : _device.CreateFence(new VkFenceCreateInfo { Flags = VkFenceCreateFlags.None }, null); + _fences.Add(fence); + + var commandBuffers = _commandBuffers.AsSpan().Slice(_submitted, count); + _queue.Submit(waitSemaphores, waitDstStageMask, commandBuffers, signalSemaphores, fence); + _submitted += count; + + // Everything staged so far is referenced by this submission; mark it as recyclable. + _submittedStagingBuffers = _stagingBuffers.Count; + } + + return this; + } + + /// + /// Wait for fences to complete for a given timeout + /// + /// is the timeout period in nanoseconds + /// true if all fences are signalled + public bool WaitFor(nint waitTimeout) + { + if (_fences.Count == 0) + return true; + + if (_device.WaitForFences(_fences.AsSpan(), true, waitTimeout) == VkResult.Success) + { + // Fences and submitted staging buffers are signalled now, so reclaim them even mid-stream + ReclaimSignalled(); + + // The command pool resets as a whole, so only rewind once nothing is still recorded + if (_submitted == _commandBufferIndex) + RewindCommandBuffers(); + + return true; + } + + return false; + } + + /// + /// Return signalled fences and the staging buffers behind submitted work to their free pools. + /// Safe to call while later command buffers are still recorded but unsubmitted. + /// + private void ReclaimSignalled() + { + // Reset the signalled fences and return them to the free pool + if (_fences.Count > 0) + { + _device.ResetFences(_fences.AsSpan()); + foreach (var fence in _fences) + _freeFences.Push(fence); + _fences.Clear(); + } + + // Only recycle buffers from submitted work; anything added since the last Submit stays for the caller + for (var i = 0; i < _submittedStagingBuffers; i++) + PushFreeStagingBuffer(_stagingBuffers[i]); + _stagingBuffers.RemoveRange(0, _submittedStagingBuffers); + _submittedStagingBuffers = 0; + } + + /// + /// Reset the command pool and rewind for the next batch, once all recorded work has been submitted. + /// + private void RewindCommandBuffers() + { + // Reset the command buffers back to the initial state for reuse instead of freeing them + if (_commandBufferIndex > 0) + _device.ResetCommandPool(_commandPool, VkCommandPoolResetFlags.None); + + _commandBufferIndex = 0; + _submitted = 0; + } + + // Return a staging buffer to its size bucket for later reuse + private void PushFreeStagingBuffer(BufferEx buffer) + { + if (!_freeStagingBuffers.TryGetValue(buffer.BufferSize, out var bucket)) + { + bucket = new Stack(); + _freeStagingBuffers[buffer.BufferSize] = bucket; + } + bucket.Push(buffer); + } + + /// + /// Wait for fences to complete + /// + /// true if all fences are signalled + public void Wait() + { + if (!WaitFor(-1)) + throw new Exception("WaitForFences failed unexpectedly."); + } + + /// + public void Dispose() + { + Submit(); + Wait(); + + _device.DestroyCommandPool(_commandPool, null); + + foreach (var vkBuffer in _stagingBuffers) + vkBuffer.Dispose(); + + foreach (var bucket in _freeStagingBuffers.Values) + foreach (var vkBuffer in bucket) + vkBuffer.Dispose(); + + foreach (var vkFence in _fences) + _device.DestroyFence(vkFence, null); + + foreach (var vkFence in _freeFences) + _device.DestroyFence(vkFence, null); + } +} + +/// +/// Extensions for StagingPool +/// +public static class StagingPoolExtensions +{ + /// + /// Create a new staging data object with the provided name, command pool, and initial command buffer count. + /// Will allocate initialCommandBufferCount command buffers from the provided command pool. + /// + public static StagingPool CreateStagingPool( + this IBufferAllocator inAllocator, + Queue inQueue, + int inInitialCommandBufferCount, + VkCommandBufferLevel inLevel = VkCommandBufferLevel.Primary + ) + { + return new StagingPool(inAllocator, inQueue, inInitialCommandBufferCount, inLevel); + } +} diff --git a/Brutal.Vulkan.Abstractions/SyncObjects.cs b/Brutal.Vulkan.Abstractions/SyncObjects.cs new file mode 100644 index 0000000..696ad6e --- /dev/null +++ b/Brutal.Vulkan.Abstractions/SyncObjects.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Structure to hold synchronization objects for the Renderer +/// +public class SyncObjects(Device inDevice) : IDisposable +{ + /// + /// Semaphore signalled when the acquired swapchain image is ready to be rendered to. + /// + public required VkSemaphore ImageReadySemaphore; + + /// + /// Semaphore signalled when rendering has finished and the image can be presented. + /// + public required VkSemaphore RenderingFinishedSemaphore; + + /// + /// Signaled Fence + /// + public required VkFence Fence; + + /// + /// A CommandBuffer from the Graphics pool which can be used for rendering commands. + /// + public required CommandBuffer CommandBuffer; + + /// + /// The command pool that was allocated from. + /// When set, frees the command buffer back to this pool; when left + /// default, the caller retains ownership of the command buffer and must free it themselves + /// (otherwise every rebuild permanently grows the pool). + /// + public VkCommandPool CommandPool = default; + + /// + /// The allocator the sync objects were created with + /// + public required VkAllocator? Allocator; + + public void Dispose() + { + if (!CommandPool.IsNull()) + inDevice.FreeCommandBuffers(CommandPool, [CommandBuffer]); + + inDevice.DestroyFence(Fence, Allocator); + inDevice.DestroySemaphore(ImageReadySemaphore, Allocator); + inDevice.DestroySemaphore(RenderingFinishedSemaphore, Allocator); + } +} diff --git a/Brutal.Vulkan.Abstractions/VertexInput.cs b/Brutal.Vulkan.Abstractions/VertexInput.cs new file mode 100644 index 0000000..86f1919 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/VertexInput.cs @@ -0,0 +1,815 @@ +using System.Collections.Concurrent; +using System.Reflection; + +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Controls how (s)byte or (u)short types are mapped to shader-compatible types. +/// +public enum Behavior +{ + /// + /// Small integer types should map to a 32-bit integer type, potentially signed. + /// + /// + /// + /// sbyte will map to int + /// sbyte3 will map to ivec3 + /// byte will map to uint + /// byte3 will map to uvec3 + /// + /// + None, + + /// + /// Small integer types should map to a normalized floating point range, potentially signed. + /// + /// + /// + /// sbyte components will be mapped onto a [-1.0f - 1.0f] floating point range + /// byte components will be mapped onto a [0.0f - 1.0f] floating point range + /// + /// + Normalize, + + /// + /// Small integer types should convert directly to a 32-bit floating point value, maintaining the original value. + /// + /// + /// + /// byte components will be mapped to a [0.0f - 255.0f] floating point range + /// sbyte components will be mapped to a [-128.0f - 127.0f] floating point range + /// + /// + Scale, +} + +/// +/// Controls how (s)byte or (u)short types are mapped to shader-compatible types. +/// +[AttributeUsage(AttributeTargets.Field)] +public class FixedPointConversionAttribute(Behavior mode) : Attribute +{ + public Behavior Mode = mode; +} + +/// +/// Overrides the that reflection assigns to a +/// field - e.g. a packed uint color field annotated +/// [VertexFormat(VkFormat.R8G8B8A8UNorm)] instead of the default R32UInt. +/// The field's natural size still determines the offset advance, so the override's format +/// must be the same size as the field. +/// +[AttributeUsage(AttributeTargets.Field)] +public class VertexFormatAttribute(VkFormat format) : Attribute +{ + public VkFormat Format = format; +} + +/// +/// A builder for PipelineVertexInputStateCreateInfo +/// +public class VertexInput +{ + // csharpier-ignore + private static readonly Dictionary FormatMap = + new() + { + [typeof(sbyte)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8SInt, + NormalizedFormat = VkFormat.R8SNorm, + ScaledFormat = VkFormat.R8SScaled, + LayoutCount = 1 + } + ), + [typeof(sbyte2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8G8SInt, + NormalizedFormat = VkFormat.R8G8SNorm, + ScaledFormat = VkFormat.R8G8SScaled, + LayoutCount = 1 + } + ), + [typeof(sbyte3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8G8B8SInt, + NormalizedFormat = VkFormat.R8G8B8SNorm, + ScaledFormat = VkFormat.R8G8B8SScaled, + LayoutCount = 1 + } + ), + [typeof(sbyte4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8G8B8A8SInt, + NormalizedFormat = VkFormat.R8G8B8A8SNorm, + ScaledFormat = VkFormat.R8G8B8A8SScaled, + LayoutCount = 1 + } + ), + [typeof(byte)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8UInt, + NormalizedFormat = VkFormat.R8UNorm, + ScaledFormat = VkFormat.R8UScaled, + LayoutCount = 1 + } + ), + [typeof(byte2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8G8UInt, + NormalizedFormat = VkFormat.R8G8UNorm, + ScaledFormat = VkFormat.R8G8UScaled, + LayoutCount = 1 + } + ), + [typeof(byte3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8G8B8UInt, + NormalizedFormat = VkFormat.R8G8B8UNorm, + ScaledFormat = VkFormat.R8G8B8UScaled, + LayoutCount = 1 + } + ), + [typeof(byte4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R8G8B8A8UInt, + NormalizedFormat = VkFormat.R8G8B8A8UNorm, + ScaledFormat = VkFormat.R8G8B8A8UScaled, + LayoutCount = 1 + } + ), + [typeof(short)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16SInt, + NormalizedFormat = VkFormat.R16SNorm, + ScaledFormat = VkFormat.R16SScaled, + LayoutCount = 1 + } + ), + [typeof(short2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16G16SInt, + NormalizedFormat = VkFormat.R16G16SNorm, + ScaledFormat = VkFormat.R16G16SScaled, + LayoutCount = 1 + } + ), + [typeof(short3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16G16B16SInt, + NormalizedFormat = VkFormat.R16G16B16SNorm, + ScaledFormat = VkFormat.R16G16B16SScaled, + LayoutCount = 1 + } + ), + [typeof(short4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16G16B16A16SInt, + NormalizedFormat = VkFormat.R16G16B16A16SNorm, + ScaledFormat = VkFormat.R16G16B16A16SScaled, + LayoutCount = 1 + } + ), + [typeof(ushort)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16UInt, + NormalizedFormat = VkFormat.R16UNorm, + ScaledFormat = VkFormat.R16UScaled, + LayoutCount = 1 + } + ), + [typeof(ushort2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16G16UInt, + NormalizedFormat = VkFormat.R16G16UNorm, + ScaledFormat = VkFormat.R16G16UScaled, + LayoutCount = 1 + } + ), + [typeof(ushort3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16G16B16UInt, + NormalizedFormat = VkFormat.R16G16B16UNorm, + ScaledFormat = VkFormat.R16G16B16UScaled, + LayoutCount = 1 + } + ), + [typeof(ushort4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R16G16B16A16UInt, + NormalizedFormat = VkFormat.R16G16B16A16UNorm, + ScaledFormat = VkFormat.R16G16B16A16UScaled, + LayoutCount = 1 + } + ), + [typeof(int)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32SInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(int2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32SInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(int3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32SInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(int4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32A32SInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(uint)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32UInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(uint2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32UInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(uint3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32UInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(uint4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32A32UInt, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(float)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32SFloat, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(float2)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32SFloat, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(float3)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32SFloat, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(float4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32A32SFloat, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 1 + } + ), + [typeof(float4x4)] = AttributeInfo.Make( + new CreateAttributeInfo + { + DefaultFormat = VkFormat.R32G32B32A32SFloat, + NormalizedFormat = VkFormat.Undefined, + ScaledFormat = VkFormat.Undefined, + LayoutCount = 4 + } + ) + }; + + /// + /// Error codes for vertex input validation + /// + public enum Error + { + /// + /// Vertex input is valid + /// + Ok, + + /// + /// A binding has been declared more than once + /// + DuplicateBinding, + + /// + /// An attribute has been declared more than once to a single location + /// + DuplicateLocation, + + /// + /// An attribute's offset exceeds the stride of the binding + /// + OffsetExceedsStride, + + /// + /// An attribute references a binding that has not been declared + /// + AttributeReferencesNonExistentBinding, + + /// + /// A binding has a stride of zero + /// + BindingHasZeroStride, + } + + /// + /// The list of bindings that can be used by the vertex input + /// + public NativeList Bindings; + + /// + /// The list of attributes that can be used by the vertex input across all bindings + /// + public NativeList Attributes; + + private PtrOwner _createInfo = new( + new VkPipelineVertexInputStateCreateInfo { } + ); + + /// + /// The list of attributes that can be used by the vertex input across all bindings + /// + PtrOwner GetCreateInfo() + { + _createInfo.Value = _createInfo.Value with + { + VertexBindingDescriptions = Bindings.Ptr, + VertexAttributeDescriptions = Attributes.Ptr, + VertexBindingDescriptionCount = Bindings.Count, + VertexAttributeDescriptionCount = Attributes.Count, + }; + + return _createInfo; + } + + /// + /// Construct a new VertexInput builder + /// + /// Preallocate with this many bindings + /// Preallocate with this many attributes + public VertexInput(int bindingCapacity, int attributeCapacity) + { + Bindings = new NativeList(bindingCapacity); + Attributes = new NativeList(attributeCapacity); + } + + /// + /// Construct with a complete input layout structure + /// + public VertexInput( + Span bindings, + Span attributes + ) + { + Bindings = new NativeList(bindings); + Attributes = new NativeList(attributes); + } + + /// + /// Reset for reuse + /// + public void Reset() + { + Bindings.Count = 0; + Attributes.Count = 0; + } + + /// + /// Clone this vertex input + /// + public VertexInput Clone() + { + return new VertexInput(Bindings.AsSpan(), Attributes.AsSpan()); + } + + /// + /// Implicit cast to the PipelineVertexInputStateCreateInfo structure + /// + public static unsafe implicit operator VkPipelineVertexInputStateCreateInfo*(VertexInput inValue) => + inValue.GetCreateInfo(); + + /// + /// Add a binding to the vertex input + /// + /// The buffer slot + /// The size of one vertex + /// Whether this binding will be per vertex or per instance + /// The builder + public VertexInput AddBinding(int binding, ByteSize stride, VkVertexInputRate vertexInputRate) + { + return AddBinding( + new VkVertexInputBindingDescription + { + Binding = binding, + Stride = stride, + InputRate = vertexInputRate, + } + ); + } + + /// + /// Add a binding to the vertex input, inferring the stride from the templated type + /// + /// The buffer slot + /// Whether this binding will be per vertex or per instance + /// The type of the vertex + /// The builder + public VertexInput AddBinding(int binding, VkVertexInputRate vertexInputRate) + { + if (FormatMap.TryGetValue(typeof(T), out var typeInfo)) + { + return AddBinding(binding, typeInfo.GetTotalSize(Behavior.None), vertexInputRate); + } + + var size = 0; + + foreach (var field in GetFieldLayout(typeof(T))) + size += (int)field.Info.GetTotalSize(field.Mode); + + return AddBinding(binding, ByteSize.Of(size), vertexInputRate); + } + + /// + /// Add a binding to the vertex input + /// + /// The buffer slot + /// The builder + public VertexInput AddBinding(VkVertexInputBindingDescription binding) + { + Bindings.Add(binding); + return this; + } + + /// + /// Add an attribute to the vertex input for a given binding + /// + /// The index of this attribute + /// The buffer slot this attribute will be read from + /// The format of the attribute + /// The offset into the buffer to find this attribute + /// The builder + public VertexInput AddAttribute(int location, int binding, VkFormat format, ByteSize offset) + { + return AddAttribute( + new VkVertexInputAttributeDescription + { + Location = location, + Binding = binding, + Format = format, + Offset = offset, + } + ); + } + + /// + /// Add an attribute to the vertex input for a given binding + /// + /// The index of this attribute + /// The buffer slot this attribute will be read from + /// The offset into the buffer to find this attribute + /// The behaviour of the attribute + /// The builder + public VertexInput AddAttribute(int location, int binding, ByteSize offset, Behavior mode) + { + var info = FormatMap[typeof(T)]; + var format = info.GetFormat(mode); + + for (var j = 0; j < info.Num; ++j) + { + AddAttribute(location, binding, format, offset); + offset += info.GetBehaviourStride(mode); + location += 1; + } + + return this; + } + + /// + /// Add an attribute to the vertex input + /// + /// The attibute to add + /// The builder + public VertexInput AddAttribute(VkVertexInputAttributeDescription attribute) + { + Attributes.Add(attribute); + return this; + } + + /// + /// Create a new binding containing a single attribute for the templated type + /// + /// The index + /// The buffer slot + /// Whether this binding will be per vertex or per instance + /// The behaviour of certain formats + /// The type of the vertex + public VertexInput AddAttributeBinding( + int location, + int binding, + VkVertexInputRate vertexInputRate, + Behavior mode = Behavior.None + ) + { + return AddBinding(binding, vertexInputRate).AddAttribute(location, binding, ByteSize.Zero, mode); + } + + /// + /// Create a new binding and add attributes for the templated type + /// + /// The starting index + /// The buffer slot + /// Whether this binding will be per vertex or per instance + /// The type of the vertex + public VertexInput AddBindingWithAttributes(int firstLocation, int binding, VkVertexInputRate vertexInputRate) + { + return AddBinding(binding, vertexInputRate).AddAttributes(firstLocation, binding, ByteSize.Zero); + } + + /// + /// Add attributes for the templated type, for some existing binding + /// + /// The starting index + /// The buffer slot + /// The starting byte offset + /// The type of the vertex + public VertexInput AddAttributes(int firstLocation, int binding, ByteSize firstOffset) + { + var location = firstLocation; + var offset = firstOffset; + + foreach (var field in GetFieldLayout(typeof(T))) + { + var info = field.Info; + var format = field.FormatOverride != VkFormat.Undefined ? field.FormatOverride : info.GetFormat(field.Mode); + + for (var j = 0; j < info.Num; ++j) + { + AddAttribute(location, binding, format, offset); + offset += info.GetBehaviourStride(field.Mode); + location += 1; + } + } + + return this; + } + + /// + /// Cached per-type field layout so reflection runs once per vertex type instead of on every call. + /// + private readonly record struct FieldLayout(AttributeInfo Info, Behavior Mode, VkFormat FormatOverride); + + private static readonly ConcurrentDictionary LayoutCache = new(); + + private static FieldLayout[] GetFieldLayout(Type type) + { + return LayoutCache.GetOrAdd( + type, + static t => + { + var fields = t.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + var layout = new FieldLayout[fields.Length]; + for (var i = 0; i < fields.Length; i++) + { + var info = FormatMap[fields[i].FieldType]; + var mode = + ( + Attribute.GetCustomAttribute(fields[i], typeof(FixedPointConversionAttribute)) + as FixedPointConversionAttribute + )?.Mode ?? Behavior.None; + var formatOverride = + ( + Attribute.GetCustomAttribute(fields[i], typeof(VertexFormatAttribute)) + as VertexFormatAttribute + )?.Format ?? VkFormat.Undefined; + layout[i] = new FieldLayout(info, mode, formatOverride); + } + return layout; + } + ); + } + + /// + /// Build a complete single-binding vertex input for : + /// binding 0 at per-vertex rate, attributes reflected from the type's fields starting at location 0. + /// + public static VertexInput For() + { + return new VertexInput(1, Count(typeof(TVertex))).AddBindingWithAttributes( + 0, + 0, + VkVertexInputRate.Vertex + ); + } + + /// + /// Build a complete two-binding vertex input: on binding 0 at + /// per-vertex rate starting at location 0, and on binding 1 at + /// per-instance rate, with its locations continuing after the vertex attributes. + /// + public static VertexInput For() + { + var vertexAttributeCount = Count(typeof(TVertex)); + + return new VertexInput(2, vertexAttributeCount + Count(typeof(TInstance))) + .AddBindingWithAttributes(0, 0, VkVertexInputRate.Vertex) + .AddBindingWithAttributes(vertexAttributeCount, 1, VkVertexInputRate.Instance); + } + + /// + /// Test that the vertex input is valid + /// + /// + public Error Test() + { + for (var i = 0; i < Bindings.Count; ++i) + { + if (Bindings[i].Stride == 0) + return Error.BindingHasZeroStride; + + for (var j = 0; j < Bindings.Count; ++j) + { + if (i == j) + continue; + + if (Bindings[i].Binding == Bindings[j].Binding) + return Error.DuplicateBinding; + } + } + + for (var i = 0; i < Attributes.Count; ++i) + { + for (var j = 0; j < Attributes.Count; ++j) + { + if (i == j) + continue; + + if (Attributes[i].Location == Attributes[j].Location) + return Error.DuplicateLocation; + } + + var foundBinding = false; + for (var j = 0; j < Bindings.Count; j++) + { + if (Attributes[i].Binding == Bindings[j].Binding) + { + foundBinding = true; + + if (Attributes[i].Offset >= Bindings[j].Stride) + return Error.OffsetExceedsStride; + + break; + } + } + + if (!foundBinding) + return Error.AttributeReferencesNonExistentBinding; + } + + return Error.Ok; + } + + public struct CreateAttributeInfo() + { + public required int LayoutCount = 1; + public required VkFormat DefaultFormat; + public required VkFormat NormalizedFormat = VkFormat.Undefined; + public required VkFormat ScaledFormat = VkFormat.Undefined; + } + + public class AttributeInfo(CreateAttributeInfo info, ByteSize inStride) + { + public readonly int Num = info.LayoutCount; + + // Stride with default behaviour + public readonly ByteSize Stride = inStride; + + public ByteSize GetBehaviourStride(Behavior mode) => mode == Behavior.None ? Stride : ByteSize.Of(); + + public ByteSize GetTotalSize(Behavior mode) => GetBehaviourStride(mode) * Num; + + public VkFormat GetFormat(Behavior mode) + { + var format = GetFormatInternal(mode); + if (format == VkFormat.Undefined) + throw new InvalidOperationException($"Format {mode} not supported for this type!"); + return format; + } + + private VkFormat GetFormatInternal(Behavior mode) + { + return mode switch + { + Behavior.None => info.DefaultFormat, + Behavior.Normalize => info.NormalizedFormat, + Behavior.Scale => info.ScaledFormat, + _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), + }; + } + + public static AttributeInfo Make(CreateAttributeInfo info) + where T : unmanaged + { + var size = ByteSize.Of(); + return new AttributeInfo(info, size); + } + } + + // Binary-compat shim for assemblies compiled against the old params Type[] signature + public static int Count(params Type[] types) => Count((ReadOnlySpan)types); + + /// + /// Count the number of rendering attributes for the given type(s). + /// + /// + /// Counts every instance field (public and non-public) exactly as and + /// lay them out, via the shared field-layout cache. Static fields are + /// not counted. This differs from the historical behaviour, which counted public fields including + /// static ones; the two are now consistent so a count always matches the emitted binding. + /// + public static int Count(params ReadOnlySpan types) + { + var count = 0; + + foreach (var type in types) + foreach (var field in GetFieldLayout(type)) + count += field.Info.Num; + + return count; + } + + /// + /// Check the validity of the vertex input structure + /// + /// + public VertexInput Check() + { + var error = Test(); + + if (error != Error.Ok) + throw new InvalidOperationException($"Invalid vertex input: {error}"); + + return this; + } +} diff --git a/Brutal.Vulkan.Abstractions/VulkanDeviceInfo.cs b/Brutal.Vulkan.Abstractions/VulkanDeviceInfo.cs new file mode 100644 index 0000000..68d7c93 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/VulkanDeviceInfo.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi.Abstractions; + +/// +/// Formats fields into human-readable strings, +/// for logs, benchmark metadata, and device pickers. +/// +public static class VulkanDeviceInfo +{ + private const int VENDOR_ID_NVIDIA = 0x10DE; + private const int VENDOR_ID_INTEL = 0x8086; + + /// + /// The device name as a managed string. + /// + public static unsafe string GetDeviceName(in VkPhysicalDeviceProperties properties) + { + fixed (byte* name = properties.DeviceName) + return Utf8.GetString(Utf8.GetNullTerminatedSpan(name)); + } + + /// + /// The device name as a managed string. + /// + public static string GetDeviceName(this PhysicalDevice physicalDevice) + { + var properties = physicalDevice.GetProperties(); + return GetDeviceName(in properties); + } + + /// + /// Format a Vulkan-packed API version ("major.minor.patch", with a "variant:" prefix for + /// non-zero variants). + /// + public static string FormatApiVersion(int version) + { + var value = unchecked((uint)version); + var variant = value >> 29; + var major = (value >> 22) & 0x7F; + var minor = (value >> 12) & 0x3FF; + var patch = value & 0xFFF; + + return variant == 0 ? $"{major}.{minor}.{patch}" : $"{variant}:{major}.{minor}.{patch}"; + } + + /// + /// Format a driver version using the vendor's packing where it is known + /// (NVIDIA and Intel-on-Windows deviate from the Vulkan convention). + /// + public static string FormatDriverVersion(int vendorId, int version) + { + var value = unchecked((uint)version); + + switch (vendorId) + { + case VENDOR_ID_NVIDIA: + return $"{(value >> 22) & 0x3FF}.{(value >> 14) & 0xFF}.{(value >> 6) & 0xFF}.{value & 0x3F}"; + case VENDOR_ID_INTEL when OperatingSystem.IsWindows(): + return $"{value >> 14}.{value & 0x3FFF}"; + default: + return FormatApiVersion(version); + } + } + + /// + /// Format a driver version from the device's own properties. + /// + public static string FormatDriverVersion(in VkPhysicalDeviceProperties properties) + { + return FormatDriverVersion(properties.VendorID, properties.DriverVersion); + } +} diff --git a/Brutal.Vulkan.Abstractions/VulkanHelpers.cs b/Brutal.Vulkan.Abstractions/VulkanHelpers.cs new file mode 100644 index 0000000..0ecd4a7 --- /dev/null +++ b/Brutal.Vulkan.Abstractions/VulkanHelpers.cs @@ -0,0 +1,346 @@ +global using unsafe VkDebugUtilsMessengerCallbackEXT = delegate* unmanaged[Cdecl]< + Brutal.VulkanApi.VkDebugUtilsMessageSeverityFlagsEXT, + Brutal.VulkanApi.VkDebugUtilsMessageTypeFlagsEXT, + Brutal.VulkanApi.VkDebugUtilsMessengerCallbackDataEXT*, + void*, + Brutal.Bool32>; +using System.Runtime.InteropServices; + +namespace Brutal.VulkanApi.Abstractions; + +public static partial class VulkanHelpers +{ + /// + /// The number of mip levels in a full chain for the given 2D dimensions: floor(log2(max(width, height))) + 1. + /// + public static int MaxMipLevels(int width, int height) + { + return System.Numerics.BitOperations.Log2((uint)Math.Max(1, Math.Max(width, height))) + 1; + } + + /// + /// The number of mip levels in a full chain for the given 3D dimensions: floor(log2(max(width, height, depth))) + 1. + /// + public static int MaxMipLevels(int width, int height, int depth) + { + return MaxMipLevels(Math.Max(width, depth), height); + } + + /// + /// The number of mip levels in a full chain for the given extent. + /// + public static int MaxMipLevels(VkExtent3D extent) + { + return MaxMipLevels(extent.Width, extent.Height, extent.Depth); + } + + // variant << 29 | major << 22 | minor << 12 | patch; + public enum Api + { + VERSION_1_0 = 1 << 22, + VERSION_1_1 = 1 << 22 | 1 << 12, + VERSION_1_2 = 1 << 22 | 2 << 12, + VERSION_1_3 = 1 << 22 | 3 << 12, + VERSION_1_4 = 1 << 22 | 4 << 12, + } + + public static class Validation + { + static Validation() + { + IsSupported = CheckSupport(); + } + + /// + /// True if validation layers are supported + /// + public static readonly bool IsSupported; + + /// + /// Checks if validation layers are supported + /// + private static unsafe bool CheckSupport() + { + Span layers = + stackalloc VkLayerProperties[Vulkan.EnumerateInstanceLayerProperties_Count()]; + Vulkan.EnumerateInstanceLayerProperties_Write(layers); + + foreach (var layer in layers) + { + // Compare the UTF-8 bytes directly rather than allocating a managed string per layer + var name = Utf8.GetNullTerminatedSpan(layer.LayerName); + if (name.SequenceEqual(VK.LAYER_KHRONOS_VALIDATION_UTF8)) + return true; + } + + return false; + } + } + + /// + /// Adds the instance extensions which are required on the current operating system + /// + public static void AddPlatformRequiredExtensions(HashSet extensions) + { + if (OperatingSystem.IsMacOS()) + { + AddMetalRequiredExtensions(extensions); + } + } + + /// + /// Adds the instance extensions which are required by Metal + /// + public static void AddMetalRequiredExtensions(HashSet extensions) + { + Span metalRequiredExtensions = + [ + VK.KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, + VK.KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, + ]; + + foreach (var extension in metalRequiredExtensions) + extensions.Add(extension); + } + + /// + /// Adds the extensions required for debug functionality + /// + public static void AddDebugExtensions(HashSet extensions) + { + Span debugRequiredExtensions = [VK.EXT_DEBUG_UTILS_EXTENSION_NAME, VK.EXT_DEBUG_REPORT_EXTENSION_NAME]; + + foreach (var extension in debugRequiredExtensions) + extensions.Add(extension); + } + + /// + /// Adds the instance extensions required to use a surface, i.e. for windowed rendering + /// + public static void AddSurfaceExtensions(HashSet extensions) + { + extensions.Add(VK.KHR_SURFACE_EXTENSION_NAME); + } + + /// + /// Adds the device extensions required to use a swapchain, i.e. for windowed rendering + /// + public static void AddSwapchainExtensions(HashSet extensions) + { + extensions.Add(VK.KHR_SWAPCHAIN_EXTENSION_NAME); + } + + /// + /// Adds the Vulkan validation layer + /// + public static void AddValidationLayers(HashSet layers) + { + layers.Add(VK.LAYER_KHRONOS_VALIDATION); + } + + /// + /// Gets the VkInstanceCreateFlags required on the current platform + /// + public static VkInstanceCreateFlags GetPlatformRequiredInstanceCreateFlags() + { + var flags = VkInstanceCreateFlags.None; + if (OperatingSystem.IsMacOS()) + flags |= VkInstanceCreateFlags.EnumeratePortabilityBitKHR; + return flags; + } + + private static readonly string[] MandatoryIfSupportedDeviceExtensions = [VK.KHR_PORTABILITY_SUBSET_EXTENSION_NAME]; + + /// + /// Gets the device extensions which MUST be loaded IF they are supported by a physical device + /// + public static string[] GetMandatoryIfSupportedDeviceExtensions() + { + return MandatoryIfSupportedDeviceExtensions; + } + + /// + /// Adds the device extensions which MUST be loaded IF they are supported on the given physical device + /// + public static void AddMandatoryIfSupportedDeviceExtensions( + HashSet extensions, + PhysicalDevice physicalDevice + ) + { + // Plain loop instead of a LINQ Where enumerator/closure + foreach (var extension in MandatoryIfSupportedDeviceExtensions) + if (physicalDevice.SupportsExtension(extension)) + extensions.Add(extension); + } + + /// + /// Returns a VkDebugUtilsMessengerCreateInfoEXT struct using the provided message callback, + /// and populated with default message settings flags and user data + /// + public static unsafe VkDebugUtilsMessengerCreateInfoEXT BuildDefaultDebugMessengerCreateInfo( + PfnVkDebugUtilsMessengerCallbackEXT callback + ) + { + return new VkDebugUtilsMessengerCreateInfoEXT + { + MessageSeverity = + VkDebugUtilsMessageSeverityFlagsEXT.ErrorBitEXT + | VkDebugUtilsMessageSeverityFlagsEXT.WarningBitEXT + | VkDebugUtilsMessageSeverityFlagsEXT.InfoBitEXT + | VkDebugUtilsMessageSeverityFlagsEXT.VerboseBitEXT, + MessageType = + VkDebugUtilsMessageTypeFlagsEXT.GeneralBitEXT + | VkDebugUtilsMessageTypeFlagsEXT.ValidationBitEXT + | VkDebugUtilsMessageTypeFlagsEXT.PerformanceBitEXT, + //| DebugUtilsMessageTypeFlagsEXT.DebugUtilsMessageTypeDeviceAddressBinding, + PfnUserCallback = callback, + UserData = DefaultCallbackUserData, + }; + } + + private static readonly PtrOwner DefaultCallbackUserData = new(false); + + /// + /// Gets or sets a value indicating whether verbose logging is enabled. + /// + public static bool VerboseLoggingEnabled + { + get => DefaultCallbackUserData.Value; + set => DefaultCallbackUserData.Value = value; + } + + public static class DebugUtilsMessengerCallbacks + { + /// + /// + /// + /// + /// + /// + /// + /// + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe Bool32 Quiet( + VkDebugUtilsMessageSeverityFlagsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + void* pUserData + ) + { + var message = Utf8.GetString(pCallbackData->Message); + if (string.IsNullOrEmpty(message)) + return false; + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.ErrorBitEXT)) + { + Vulkan.Log.Error(message); + return false; + } + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.WarningBitEXT)) + { + Vulkan.Log.Warning(message); + return false; + } + + return false; + } + + /// + /// + /// + /// + /// + /// + /// + /// + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe Bool32 Default( + VkDebugUtilsMessageSeverityFlagsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + void* pUserData + ) + { + var message = Utf8.GetString(pCallbackData->Message); + if (string.IsNullOrEmpty(message)) + return false; + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.ErrorBitEXT)) + { + Vulkan.Log.Error(message); + return false; + } + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.WarningBitEXT)) + { + Vulkan.Log.Warning(message); + return false; + } + + if (pUserData != null && *(bool*)pUserData) + { + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.InfoBitEXT)) + { + Vulkan.Log.Info(message); + return false; + } + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.VerboseBitEXT)) + { + Vulkan.Log.Debug(message); + return false; + } + } + + return false; + } + + /// + /// + /// + /// + /// + /// + /// + /// + [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] + public static unsafe Bool32 Verbose( + VkDebugUtilsMessageSeverityFlagsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + void* pUserData + ) + { + var message = Utf8.GetString(pCallbackData->Message); + if (string.IsNullOrEmpty(message)) + return false; + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.ErrorBitEXT)) + { + Vulkan.Log.Error(message); + return false; + } + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.WarningBitEXT)) + { + Vulkan.Log.Warning(message); + return false; + } + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.InfoBitEXT)) + { + Vulkan.Log.Info(message); + return false; + } + + if (messageSeverity.HasFlag(VkDebugUtilsMessageSeverityFlagsEXT.VerboseBitEXT)) + { + Vulkan.Log.Debug(message); + return false; + } + + return false; + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Globals.gen.cs b/Brutal.Vulkan.Vma/Generated/Globals.gen.cs new file mode 100644 index 0000000..44b65c9 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Globals.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi.Vma +{ + public readonly unsafe struct VmaAllocateDeviceMemoryFunction( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VmaAllocatorHandle, + uint, + VkDeviceMemory, + ByteSize, + Ptr, + void> Invoke = handle; + + public static explicit operator VmaAllocateDeviceMemoryFunction(PfnVkVoidFunction func) + { + return new VmaAllocateDeviceMemoryFunction( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VmaFreeDeviceMemoryFunction( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VmaAllocatorHandle, + uint, + VkDeviceMemory, + ByteSize, + Ptr, + void> Invoke = handle; + + public static explicit operator VmaFreeDeviceMemoryFunction(PfnVkVoidFunction func) + { + return new VmaFreeDeviceMemoryFunction( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VmaCheckDefragmentationBreakFunction(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VmaCheckDefragmentationBreakFunction(PfnVkVoidFunction func) + { + return new VmaCheckDefragmentationBreakFunction((delegate* unmanaged[Cdecl])func.Invoke); + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/InlineArrays.gen.cs b/Brutal.Vulkan.Vma/Generated/InlineArrays.gen.cs new file mode 100644 index 0000000..a2d206e --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/InlineArrays.gen.cs @@ -0,0 +1,16 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.VulkanApi.Vma +{ + [InlineArray(32)] + public struct VmaDetailedStatistics_32 + { + public VmaDetailedStatistics Data; + } + + [InlineArray(16)] + public struct VmaDetailedStatistics_16 + { + public VmaDetailedStatistics Data; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocationCreateFlags.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocationCreateFlags.gen.cs new file mode 100644 index 0000000..8f39aef --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocationCreateFlags.gen.cs @@ -0,0 +1,26 @@ +namespace Brutal.VulkanApi.Vma +{ + [Flags] + public enum VmaAllocationCreateFlags : uint + { + None = 0, + DedicatedMemoryBit = 0x00000001, + NeverAllocateBit = 0x00000002, + MappedBit = 0x00000004, + UserDataCopyStringBit = 0x00000020, + UpperAddressBit = 0x00000040, + DontBindBit = 0x00000080, + WithinBudgetBit = 0x00000100, + CanAliasBit = 0x00000200, + HostAccessSequentialWriteBit = 0x00000400, + HostAccessRandomBit = 0x00000800, + HostAccessAllowTransferInsteadBit = 0x00001000, + StrategyMinMemoryBit = 0x00010000, + StrategyMinTimeBit = 0x00020000, + StrategyMinOffsetBit = 0x00040000, + StrategyBestFitBit = 0x00010000, + StrategyFirstFitBit = 0x00020000, + StrategyMask = 0x00070000, + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocatorCreateFlags.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocatorCreateFlags.gen.cs new file mode 100644 index 0000000..7443ddd --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaAllocatorCreateFlags.gen.cs @@ -0,0 +1,19 @@ +namespace Brutal.VulkanApi.Vma +{ + [Flags] + public enum VmaAllocatorCreateFlags : uint + { + None = 0, + ExternallySynchronizedBit = 0x00000001, + KhrDedicatedAllocationBit = 0x00000002, + KhrBindMemory2Bit = 0x00000004, + ExtMemoryBudgetBit = 0x00000008, + AmdDeviceCoherentMemoryBit = 0x00000010, + BufferDeviceAddressBit = 0x00000020, + ExtMemoryPriorityBit = 0x00000040, + KhrMaintenance4Bit = 0x00000080, + KhrMaintenance5Bit = 0x00000100, + KhrExternalMemoryWin32Bit = 0x00000200, + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationFlags.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationFlags.gen.cs new file mode 100644 index 0000000..b54b7b5 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationFlags.gen.cs @@ -0,0 +1,14 @@ +namespace Brutal.VulkanApi.Vma +{ + [Flags] + public enum VmaDefragmentationFlags : uint + { + None = 0, + FlagAlgorithmFastBit = 0x00000001, + FlagAlgorithmBalancedBit = 0x00000002, + FlagAlgorithmFullBit = 0x00000004, + FlagAlgorithmExtensiveBit = 0x00000008, + FlagAlgorithmMask = 0x0000000F, + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationMoveOperation.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationMoveOperation.gen.cs new file mode 100644 index 0000000..49716de --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaDefragmentationMoveOperation.gen.cs @@ -0,0 +1,9 @@ +namespace Brutal.VulkanApi.Vma +{ + public enum VmaDefragmentationMoveOperation : uint + { + Copy = 0x00000000, + Ignore = 0x00000001, + Destroy = 0x00000002, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaMemoryUsage.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaMemoryUsage.gen.cs new file mode 100644 index 0000000..8331b5d --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaMemoryUsage.gen.cs @@ -0,0 +1,17 @@ +namespace Brutal.VulkanApi.Vma +{ + public enum VmaMemoryUsage : uint + { + Unknown = 0x00000000, + GpuOnly = 0x00000001, + CpuOnly = 0x00000002, + CpuToGpu = 0x00000003, + GpuToCpu = 0x00000004, + CpuCopy = 0x00000005, + GpuLazilyAllocated = 0x00000006, + Auto = 0x00000007, + AutoPreferDevice = 0x00000008, + AutoPreferHost = 0x00000009, + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaPoolCreateFlags.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaPoolCreateFlags.gen.cs new file mode 100644 index 0000000..b2dda9e --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaPoolCreateFlags.gen.cs @@ -0,0 +1,12 @@ +namespace Brutal.VulkanApi.Vma +{ + [Flags] + public enum VmaPoolCreateFlags : uint + { + None = 0, + IgnoreBufferImageGranularityBit = 0x00000002, + LinearAlgorithmBit = 0x00000004, + AlgorithmMask = 0x00000004, + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualAllocationCreateFlags.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualAllocationCreateFlags.gen.cs new file mode 100644 index 0000000..b5c3a5b --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualAllocationCreateFlags.gen.cs @@ -0,0 +1,14 @@ +namespace Brutal.VulkanApi.Vma +{ + [Flags] + public enum VmaVirtualAllocationCreateFlags : uint + { + None = 0, + UpperAddressBit = 0x00000040, + StrategyMinMemoryBit = 0x00010000, + StrategyMinTimeBit = 0x00020000, + StrategyMinOffsetBit = 0x00040000, + StrategyMask = 0x00070000, + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualBlockCreateFlags.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualBlockCreateFlags.gen.cs new file mode 100644 index 0000000..6c6e139 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Enums/VmaVirtualBlockCreateFlags.gen.cs @@ -0,0 +1,11 @@ +namespace Brutal.VulkanApi.Vma +{ + [Flags] + public enum VmaVirtualBlockCreateFlags : uint + { + None = 0, + LinearAlgorithmBit = 0x00000001, + AlgorithmMask = 0x00000001, + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaAllocation.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaAllocation.gen.cs new file mode 100644 index 0000000..591d93d --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaAllocation.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + public readonly struct VmaAllocation : IVulkanHandle + { + public VkObjectType VkObjectType => VkObjectType.Unknown; + public nint VkHandle { get; } + + public VmaAllocation(nint handle) + { + VkHandle = handle; + } + + public bool IsNull() + { + return VkHandle == 0; + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaDefragmentationContext.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaDefragmentationContext.gen.cs new file mode 100644 index 0000000..315061e --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaDefragmentationContext.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + public readonly struct VmaDefragmentationContext : IVulkanHandle + { + public VkObjectType VkObjectType => VkObjectType.Unknown; + public nint VkHandle { get; } + + public VmaDefragmentationContext(nint handle) + { + VkHandle = handle; + } + + public bool IsNull() + { + return VkHandle == 0; + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaPool.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaPool.gen.cs new file mode 100644 index 0000000..42d668b --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaPool.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + public readonly struct VmaPool : IVulkanHandle + { + public VkObjectType VkObjectType => VkObjectType.Unknown; + public nint VkHandle { get; } + + public VmaPool(nint handle) + { + VkHandle = handle; + } + + public bool IsNull() + { + return VkHandle == 0; + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualAllocation.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualAllocation.gen.cs new file mode 100644 index 0000000..93ec2e8 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualAllocation.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + public readonly struct VmaVirtualAllocation : IVulkanHandle + { + public VkObjectType VkObjectType => VkObjectType.Unknown; + public nint VkHandle { get; } + + public VmaVirtualAllocation(nint handle) + { + VkHandle = handle; + } + + public bool IsNull() + { + return VkHandle == 0; + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualBlock.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualBlock.gen.cs new file mode 100644 index 0000000..ab16059 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Handles/VmaVirtualBlock.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + public readonly struct VmaVirtualBlock : IVulkanHandle + { + public VkObjectType VkObjectType => VkObjectType.Unknown; + public nint VkHandle { get; } + + public VmaVirtualBlock(nint handle) + { + VkHandle = handle; + } + + public bool IsNull() + { + return VkHandle == 0; + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationCreateInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationCreateInfo.gen.cs new file mode 100644 index 0000000..0397ac7 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationCreateInfo.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VmaAllocationCreateInfo + { + [FieldOffset(0)] + public VmaAllocationCreateFlags Flags; + + [FieldOffset(4)] + public VmaMemoryUsage Usage; + + [FieldOffset(8)] + public VkMemoryPropertyFlags RequiredFlags; + + [FieldOffset(12)] + public VkMemoryPropertyFlags PreferredFlags; + + [FieldOffset(16)] + public uint MemoryTypeBits; + + [FieldOffset(24)] + public VmaPool Pool; + + [FieldOffset(32)] + public Ptr PUserData; + + [FieldOffset(40)] + public float Priority; + + [FieldOffset(48)] + public ByteSize MinAlignment; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo.gen.cs new file mode 100644 index 0000000..a862156 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo.gen.cs @@ -0,0 +1,27 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VmaAllocationInfo + { + [FieldOffset(0)] + public uint MemoryType; + + [FieldOffset(8)] + public VkDeviceMemory DeviceMemory; + + [FieldOffset(16)] + public ByteSize Offset; + + [FieldOffset(24)] + public ByteSize Size; + + [FieldOffset(32)] + public Ptr PMappedData; + + [FieldOffset(40)] + public Ptr PUserData; + + [FieldOffset(48)] + public Ptr PName; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo2.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo2.gen.cs new file mode 100644 index 0000000..f03d438 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocationInfo2.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VmaAllocationInfo2 + { + [FieldOffset(0)] + public VmaAllocationInfo AllocationInfo; + + [FieldOffset(56)] + public ByteSize BlockSize; + + [FieldOffset(64)] + public Bool32 DedicatedMemory; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorCreateInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorCreateInfo.gen.cs new file mode 100644 index 0000000..f75c6ee --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorCreateInfo.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VmaAllocatorCreateInfo + { + [FieldOffset(0)] + public VmaAllocatorCreateFlags Flags; + + [FieldOffset(8)] + public VkPhysicalDevice PhysicalDevice; + + [FieldOffset(16)] + public VkDevice Device; + + [FieldOffset(24)] + public ByteSize PreferredLargeHeapBlockSize; + + [FieldOffset(32)] + public Ptr PAllocationCallbacks; + + [FieldOffset(40)] + public Ptr PDeviceMemoryCallbacks; + + [FieldOffset(48)] + public Ptr PHeapSizeLimit; + + [FieldOffset(56)] + public Ptr PVulkanFunctions; + + [FieldOffset(64)] + public VkInstance Instance; + + [FieldOffset(72)] + public uint VulkanApiVersion; + + [FieldOffset(80)] + public Ptr PTypeExternalMemoryHandleTypes; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorInfo.gen.cs new file mode 100644 index 0000000..2dbe32e --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaAllocatorInfo.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaAllocatorInfo + { + [FieldOffset(0)] + public VkInstance Instance; + + [FieldOffset(8)] + public VkPhysicalDevice PhysicalDevice; + + [FieldOffset(16)] + public VkDevice Device; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaBudget.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaBudget.gen.cs new file mode 100644 index 0000000..c4d9473 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaBudget.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VmaBudget + { + [FieldOffset(0)] + public VmaStatistics Statistics; + + [FieldOffset(24)] + public ByteSize Usage; + + [FieldOffset(32)] + public ByteSize Budget; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationInfo.gen.cs new file mode 100644 index 0000000..947b0b7 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationInfo.gen.cs @@ -0,0 +1,24 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VmaDefragmentationInfo + { + [FieldOffset(0)] + public VmaDefragmentationFlags Flags; + + [FieldOffset(8)] + public VmaPool Pool; + + [FieldOffset(16)] + public ByteSize MaxBytesPerPass; + + [FieldOffset(24)] + public uint MaxAllocationsPerPass; + + [FieldOffset(32)] + public VmaCheckDefragmentationBreakFunction PfnBreakCallback; + + [FieldOffset(40)] + public Ptr PBreakCallbackUserData; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationMove.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationMove.gen.cs new file mode 100644 index 0000000..3f94b2c --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationMove.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaDefragmentationMove + { + [FieldOffset(0)] + public VmaDefragmentationMoveOperation Operation; + + [FieldOffset(8)] + public VmaAllocation SrcAllocation; + + [FieldOffset(16)] + public VmaAllocation DstTmpAllocation; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationPassMoveInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationPassMoveInfo.gen.cs new file mode 100644 index 0000000..066b099 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationPassMoveInfo.gen.cs @@ -0,0 +1,12 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VmaDefragmentationPassMoveInfo + { + [FieldOffset(0)] + public uint MoveCount; + + [FieldOffset(8)] + public Ptr PMoves; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationStats.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationStats.gen.cs new file mode 100644 index 0000000..f47c604 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDefragmentationStats.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaDefragmentationStats + { + [FieldOffset(0)] + public ByteSize BytesMoved; + + [FieldOffset(8)] + public ByteSize BytesFreed; + + [FieldOffset(16)] + public uint AllocationsMoved; + + [FieldOffset(20)] + public uint DeviceMemoryBlocksFreed; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDetailedStatistics.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDetailedStatistics.gen.cs new file mode 100644 index 0000000..e6b1d92 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDetailedStatistics.gen.cs @@ -0,0 +1,24 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VmaDetailedStatistics + { + [FieldOffset(0)] + public VmaStatistics Statistics; + + [FieldOffset(24)] + public uint UnusedRangeCount; + + [FieldOffset(32)] + public ByteSize AllocationSizeMin; + + [FieldOffset(40)] + public ByteSize AllocationSizeMax; + + [FieldOffset(48)] + public ByteSize UnusedRangeSizeMin; + + [FieldOffset(56)] + public ByteSize UnusedRangeSizeMax; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDeviceMemoryCallbacks.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDeviceMemoryCallbacks.gen.cs new file mode 100644 index 0000000..1433c97 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaDeviceMemoryCallbacks.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaDeviceMemoryCallbacks + { + [FieldOffset(0)] + public VmaAllocateDeviceMemoryFunction PfnAllocate; + + [FieldOffset(8)] + public VmaFreeDeviceMemoryFunction PfnFree; + + [FieldOffset(16)] + public Ptr PUserData; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaPoolCreateInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaPoolCreateInfo.gen.cs new file mode 100644 index 0000000..eb54709 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaPoolCreateInfo.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VmaPoolCreateInfo + { + [FieldOffset(0)] + public uint MemoryTypeIndex; + + [FieldOffset(4)] + public VmaPoolCreateFlags Flags; + + [FieldOffset(8)] + public ByteSize BlockSize; + + [FieldOffset(16)] + public nuint MinBlockCount; + + [FieldOffset(24)] + public nuint MaxBlockCount; + + [FieldOffset(32)] + public float Priority; + + [FieldOffset(40)] + public ByteSize MinAllocationAlignment; + + [FieldOffset(48)] + public Ptr PMemoryAllocateNext; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaStatistics.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaStatistics.gen.cs new file mode 100644 index 0000000..982f76f --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaStatistics.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaStatistics + { + [FieldOffset(0)] + public uint BlockCount; + + [FieldOffset(4)] + public uint AllocationCount; + + [FieldOffset(8)] + public ByteSize BlockBytes; + + [FieldOffset(16)] + public ByteSize AllocationBytes; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaTotalStatistics.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaTotalStatistics.gen.cs new file mode 100644 index 0000000..c1656ce --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaTotalStatistics.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 3136)] + public unsafe partial struct VmaTotalStatistics + { + [FieldOffset(0)] + public VmaDetailedStatistics_32 MemoryType; + + [FieldOffset(2048)] + public VmaDetailedStatistics_16 MemoryHeap; + + [FieldOffset(3072)] + public VmaDetailedStatistics Total; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationCreateInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationCreateInfo.gen.cs new file mode 100644 index 0000000..22819eb --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationCreateInfo.gen.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VmaVirtualAllocationCreateInfo + { + [FieldOffset(0)] + public ByteSize Size; + + [FieldOffset(8)] + public ByteSize Alignment; + + [FieldOffset(16)] + public VmaVirtualAllocationCreateFlags Flags; + + [FieldOffset(24)] + public Ptr PUserData; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationInfo.gen.cs new file mode 100644 index 0000000..ea10d1b --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualAllocationInfo.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaVirtualAllocationInfo + { + [FieldOffset(0)] + public ByteSize Offset; + + [FieldOffset(8)] + public ByteSize Size; + + [FieldOffset(16)] + public Ptr PUserData; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualBlockCreateInfo.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualBlockCreateInfo.gen.cs new file mode 100644 index 0000000..f71ccae --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVirtualBlockCreateInfo.gen.cs @@ -0,0 +1,15 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VmaVirtualBlockCreateInfo + { + [FieldOffset(0)] + public ByteSize Size; + + [FieldOffset(8)] + public VmaVirtualBlockCreateFlags Flags; + + [FieldOffset(16)] + public Ptr PAllocationCallbacks; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVulkanFunctions.gen.cs b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVulkanFunctions.gen.cs new file mode 100644 index 0000000..74155c7 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Types/Structs/VmaVulkanFunctions.gen.cs @@ -0,0 +1,90 @@ +namespace Brutal.VulkanApi.Vma +{ + [StructLayout(LayoutKind.Explicit, Size = 224)] + public unsafe partial struct VmaVulkanFunctions + { + [FieldOffset(0)] + public VkGetInstanceProcAddr VkGetInstanceProcAddr; + + [FieldOffset(8)] + public VkGetDeviceProcAddr VkGetDeviceProcAddr; + + [FieldOffset(16)] + public VkGetPhysicalDeviceProperties VkGetPhysicalDeviceProperties; + + [FieldOffset(24)] + public VkGetPhysicalDeviceMemoryProperties VkGetPhysicalDeviceMemoryProperties; + + [FieldOffset(32)] + public VkAllocateMemory VkAllocateMemory; + + [FieldOffset(40)] + public VkFreeMemory VkFreeMemory; + + [FieldOffset(48)] + public VkMapMemory VkMapMemory; + + [FieldOffset(56)] + public VkUnmapMemory VkUnmapMemory; + + [FieldOffset(64)] + public VkFlushMappedMemoryRanges VkFlushMappedMemoryRanges; + + [FieldOffset(72)] + public VkInvalidateMappedMemoryRanges VkInvalidateMappedMemoryRanges; + + [FieldOffset(80)] + public VkBindBufferMemory VkBindBufferMemory; + + [FieldOffset(88)] + public VkBindImageMemory VkBindImageMemory; + + [FieldOffset(96)] + public VkGetBufferMemoryRequirements VkGetBufferMemoryRequirements; + + [FieldOffset(104)] + public VkGetImageMemoryRequirements VkGetImageMemoryRequirements; + + [FieldOffset(112)] + public VkCreateBuffer VkCreateBuffer; + + [FieldOffset(120)] + public VkDestroyBuffer VkDestroyBuffer; + + [FieldOffset(128)] + public VkCreateImage VkCreateImage; + + [FieldOffset(136)] + public VkDestroyImage VkDestroyImage; + + [FieldOffset(144)] + public VkCmdCopyBuffer VkCmdCopyBuffer; + + [FieldOffset(152)] + public VkGetBufferMemoryRequirements2KHR VkGetBufferMemoryRequirements2KHR; + + [FieldOffset(160)] + public VkGetImageMemoryRequirements2KHR VkGetImageMemoryRequirements2KHR; + + [FieldOffset(168)] + public VkBindBufferMemory2KHR VkBindBufferMemory2KHR; + + [FieldOffset(176)] + public VkBindImageMemory2KHR VkBindImageMemory2KHR; + + [FieldOffset(184)] + public VkGetPhysicalDeviceMemoryProperties2KHR VkGetPhysicalDeviceMemoryProperties2KHR; + + [FieldOffset(192)] + public VkGetDeviceBufferMemoryRequirementsKHR VkGetDeviceBufferMemoryRequirements; + + [FieldOffset(200)] + public VkGetDeviceImageMemoryRequirementsKHR VkGetDeviceImageMemoryRequirements; + + [FieldOffset(208)] + public Ptr VkGetMemoryWin32HandleKHR; + + [FieldOffset(216)] + public VkGetPhysicalDeviceProperties2KHR VkGetPhysicalDeviceProperties2KHR; + } +} diff --git a/Brutal.Vulkan.Vma/Generated/Vma.gen.cs b/Brutal.Vulkan.Vma/Generated/Vma.gen.cs new file mode 100644 index 0000000..34aeabe --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/Vma.gen.cs @@ -0,0 +1,515 @@ +namespace Brutal.VulkanApi.Vma +{ + public static partial class Vma + { + public static unsafe partial class PInvoke + { + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateAllocator( + Ptr pCreateInfo, + Ptr pAllocator + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaDestroyAllocator(VmaAllocatorHandle allocator); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetAllocatorInfo( + VmaAllocatorHandle allocator, + Ptr pAllocatorInfo + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetPhysicalDeviceProperties( + VmaAllocatorHandle allocator, + PtrPtr ppPhysicalDeviceProperties + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetMemoryProperties( + VmaAllocatorHandle allocator, + PtrPtr ppPhysicalDeviceMemoryProperties + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetMemoryTypeProperties( + VmaAllocatorHandle allocator, + uint memoryTypeIndex, + Ptr pFlags + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaSetCurrentFrameIndex(VmaAllocatorHandle allocator, uint frameIndex); + + [LibraryImport("vma")] + public static unsafe partial void vmaCalculateStatistics( + VmaAllocatorHandle allocator, + Ptr pStats + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetHeapBudgets(VmaAllocatorHandle allocator, Ptr pBudgets); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaFindMemoryTypeIndex( + VmaAllocatorHandle allocator, + uint memoryTypeBits, + Ptr pAllocationCreateInfo, + Ptr pMemoryTypeIndex + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaFindMemoryTypeIndexForBufferInfo( + VmaAllocatorHandle allocator, + Ptr pBufferCreateInfo, + Ptr pAllocationCreateInfo, + Ptr pMemoryTypeIndex + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaFindMemoryTypeIndexForImageInfo( + VmaAllocatorHandle allocator, + Ptr pImageCreateInfo, + Ptr pAllocationCreateInfo, + Ptr pMemoryTypeIndex + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreatePool( + VmaAllocatorHandle allocator, + Ptr pCreateInfo, + Ptr pPool + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaDestroyPool(VmaAllocatorHandle allocator, VmaPool pool); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetPoolStatistics( + VmaAllocatorHandle allocator, + VmaPool pool, + Ptr pPoolStats + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaCalculatePoolStatistics( + VmaAllocatorHandle allocator, + VmaPool pool, + Ptr pPoolStats + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCheckPoolCorruption(VmaAllocatorHandle allocator, VmaPool pool); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetPoolName( + VmaAllocatorHandle allocator, + VmaPool pool, + PtrPtr ppName + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaSetPoolName( + VmaAllocatorHandle allocator, + VmaPool pool, + Ptr pName + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaAllocateMemory( + VmaAllocatorHandle allocator, + Ptr pVkMemoryRequirements, + Ptr pCreateInfo, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaAllocateDedicatedMemory( + VmaAllocatorHandle allocator, + Ptr pVkMemoryRequirements, + Ptr pCreateInfo, + Ptr pMemoryAllocateNext, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaAllocateMemoryPages( + VmaAllocatorHandle allocator, + Ptr pVkMemoryRequirements, + Ptr pCreateInfo, + nuint allocationCount, + Ptr pAllocations, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaAllocateMemoryForBuffer( + VmaAllocatorHandle allocator, + VkBuffer buffer, + Ptr pCreateInfo, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaAllocateMemoryForImage( + VmaAllocatorHandle allocator, + VkImage image, + Ptr pCreateInfo, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaFreeMemory(VmaAllocatorHandle allocator, VmaAllocation allocation); + + [LibraryImport("vma")] + public static unsafe partial void vmaFreeMemoryPages( + VmaAllocatorHandle allocator, + nuint allocationCount, + Ptr pAllocations + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetAllocationInfo( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetAllocationInfo2( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaSetAllocationUserData( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pUserData + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaSetAllocationName( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pName + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetAllocationMemoryProperties( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pFlags + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaMapMemory( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + PtrPtr ppData + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaUnmapMemory(VmaAllocatorHandle allocator, VmaAllocation allocation); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaFlushAllocation( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + ByteSize offset, + ByteSize size + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaInvalidateAllocation( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + ByteSize offset, + ByteSize size + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaFlushAllocations( + VmaAllocatorHandle allocator, + uint allocationCount, + Ptr allocations, + Ptr offsets, + Ptr sizes + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaInvalidateAllocations( + VmaAllocatorHandle allocator, + uint allocationCount, + Ptr allocations, + Ptr offsets, + Ptr sizes + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCopyMemoryToAllocation( + VmaAllocatorHandle allocator, + Ptr pSrcHostPointer, + VmaAllocation dstAllocation, + ByteSize dstAllocationLocalOffset, + ByteSize size + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCopyAllocationToMemory( + VmaAllocatorHandle allocator, + VmaAllocation srcAllocation, + ByteSize srcAllocationLocalOffset, + Ptr pDstHostPointer, + ByteSize size + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCheckCorruption(VmaAllocatorHandle allocator, uint memoryTypeBits); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaBeginDefragmentation( + VmaAllocatorHandle allocator, + Ptr pInfo, + Ptr pContext + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaEndDefragmentation( + VmaAllocatorHandle allocator, + VmaDefragmentationContext context, + Ptr pStats + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaBeginDefragmentationPass( + VmaAllocatorHandle allocator, + VmaDefragmentationContext context, + Ptr pPassInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaEndDefragmentationPass( + VmaAllocatorHandle allocator, + VmaDefragmentationContext context, + Ptr pPassInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaBindBufferMemory( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + VkBuffer buffer + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaBindBufferMemory2( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + ByteSize allocationLocalOffset, + VkBuffer buffer, + Ptr pNext + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaBindImageMemory( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + VkImage image + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaBindImageMemory2( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + ByteSize allocationLocalOffset, + VkImage image, + Ptr pNext + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateBuffer( + VmaAllocatorHandle allocator, + Ptr pBufferCreateInfo, + Ptr pAllocationCreateInfo, + Ptr pBuffer, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateBufferWithAlignment( + VmaAllocatorHandle allocator, + Ptr pBufferCreateInfo, + Ptr pAllocationCreateInfo, + ByteSize minAlignment, + Ptr pBuffer, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateDedicatedBuffer( + VmaAllocatorHandle allocator, + Ptr pBufferCreateInfo, + Ptr pAllocationCreateInfo, + Ptr pMemoryAllocateNext, + Ptr pBuffer, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateAliasingBuffer( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pBufferCreateInfo, + Ptr pBuffer + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateAliasingBuffer2( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + ByteSize allocationLocalOffset, + Ptr pBufferCreateInfo, + Ptr pBuffer + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaDestroyBuffer( + VmaAllocatorHandle allocator, + VkBuffer buffer, + VmaAllocation allocation + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateImage( + VmaAllocatorHandle allocator, + Ptr pImageCreateInfo, + Ptr pAllocationCreateInfo, + Ptr pImage, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateDedicatedImage( + VmaAllocatorHandle allocator, + Ptr pImageCreateInfo, + Ptr pAllocationCreateInfo, + Ptr pMemoryAllocateNext, + Ptr pImage, + Ptr pAllocation, + Ptr pAllocationInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateAliasingImage( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + Ptr pImageCreateInfo, + Ptr pImage + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateAliasingImage2( + VmaAllocatorHandle allocator, + VmaAllocation allocation, + ByteSize allocationLocalOffset, + Ptr pImageCreateInfo, + Ptr pImage + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaDestroyImage( + VmaAllocatorHandle allocator, + VkImage image, + VmaAllocation allocation + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaCreateVirtualBlock( + Ptr pCreateInfo, + Ptr pVirtualBlock + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaDestroyVirtualBlock(VmaVirtualBlock virtualBlock); + + [LibraryImport("vma")] + public static unsafe partial Bool32 vmaIsVirtualBlockEmpty(VmaVirtualBlock virtualBlock); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetVirtualAllocationInfo( + VmaVirtualBlock virtualBlock, + VmaVirtualAllocation allocation, + Ptr pVirtualAllocInfo + ); + + [LibraryImport("vma")] + public static unsafe partial VkResult vmaVirtualAllocate( + VmaVirtualBlock virtualBlock, + Ptr pCreateInfo, + Ptr pAllocation, + Ptr pOffset + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaVirtualFree( + VmaVirtualBlock virtualBlock, + VmaVirtualAllocation allocation + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaClearVirtualBlock(VmaVirtualBlock virtualBlock); + + [LibraryImport("vma")] + public static unsafe partial void vmaSetVirtualAllocationUserData( + VmaVirtualBlock virtualBlock, + VmaVirtualAllocation allocation, + Ptr pUserData + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaGetVirtualBlockStatistics( + VmaVirtualBlock virtualBlock, + Ptr pStats + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaCalculateVirtualBlockStatistics( + VmaVirtualBlock virtualBlock, + Ptr pStats + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaBuildVirtualBlockStatsString( + VmaVirtualBlock virtualBlock, + PtrPtr ppStatsString, + Bool32 detailedMap + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaFreeVirtualBlockStatsString( + VmaVirtualBlock virtualBlock, + Ptr pStatsString + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaBuildStatsString( + VmaAllocatorHandle allocator, + PtrPtr ppStatsString, + Bool32 detailedMap + ); + + [LibraryImport("vma")] + public static unsafe partial void vmaFreeStatsString(VmaAllocatorHandle allocator, Ptr pStatsString); + } + } +} diff --git a/Brutal.Vulkan.Vma/Generated/VmaAllocatorEx.gen.cs b/Brutal.Vulkan.Vma/Generated/VmaAllocatorEx.gen.cs new file mode 100644 index 0000000..1c031e9 --- /dev/null +++ b/Brutal.Vulkan.Vma/Generated/VmaAllocatorEx.gen.cs @@ -0,0 +1,1425 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.VulkanApi.Vma +{ + public static partial class VmaAllocatorEx + { + extension(T allocator) + where T : IVmaAllocator + { + /// + /// Returns information about existing #VmaAllocator object - handle to Vulkan device etc. + /// It might be useful if you want to keep just the #VmaAllocator handle and fetch other required handles to + /// `VkPhysicalDevice`, `VkDevice` etc. every time using this function. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetAllocatorInfo(out VmaAllocatorInfo pAllocatorInfo) + { + fixed (VmaAllocatorInfo* pAllocatorInfoPtr = &pAllocatorInfo) + Vma.PInvoke.vmaGetAllocatorInfo(allocator.VkHandle, pAllocatorInfoPtr); + } + + /// + /// PhysicalDeviceProperties are fetched from physicalDevice by the allocator. + /// You can access it here, without fetching it again on your own. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetPhysicalDeviceProperties( + out Ptr ppPhysicalDeviceProperties + ) + { + fixed (Ptr* ppPhysicalDevicePropertiesPtr = &ppPhysicalDeviceProperties) + Vma.PInvoke.vmaGetPhysicalDeviceProperties( + allocator.VkHandle, + (VkPhysicalDeviceProperties**)ppPhysicalDevicePropertiesPtr + ); + } + + /// + /// PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator. + /// You can access it here, without fetching it again on your own. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetMemoryProperties( + out Ptr ppPhysicalDeviceMemoryProperties + ) + { + fixed ( + Ptr* ppPhysicalDeviceMemoryPropertiesPtr = + &ppPhysicalDeviceMemoryProperties + ) + Vma.PInvoke.vmaGetMemoryProperties( + allocator.VkHandle, + (VkPhysicalDeviceMemoryProperties**)ppPhysicalDeviceMemoryPropertiesPtr + ); + } + + /// + /// Given Memory Type Index, returns Property Flags of this memory type. + /// This is just a convenience function. Same information can be obtained using + /// vmaGetMemoryProperties(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetMemoryTypeProperties(uint memoryTypeIndex, out VkMemoryPropertyFlags pFlags) + { + fixed (VkMemoryPropertyFlags* pFlagsPtr = &pFlags) + Vma.PInvoke.vmaGetMemoryTypeProperties(allocator.VkHandle, memoryTypeIndex, pFlagsPtr); + } + + /// + /// Sets index of the current frame. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetCurrentFrameIndex(uint frameIndex) + { + Vma.PInvoke.vmaSetCurrentFrameIndex(allocator.VkHandle, frameIndex); + } + + /// + /// Retrieves statistics from current state of the Allocator. + /// This function is called "calculate" not "get" because it has to traverse all + /// internal data structures, so it may be quite slow. Use it for debugging purposes. + /// For faster but more brief statistics suitable to be called every frame or every allocation, + /// use vmaGetHeapBudgets(). + /// Note that when using allocator from multiple threads, returned information may immediately + /// become outdated. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void CalculateStatistics(out VmaTotalStatistics pStats) + { + fixed (VmaTotalStatistics* pStatsPtr = &pStats) + Vma.PInvoke.vmaCalculateStatistics(allocator.VkHandle, pStatsPtr); + } + + /// + /// Retrieves information about current memory usage and budget for all memory heaps. + /// This function is called "get" not "calculate" because it is very fast, suitable to be called + /// every frame or every allocation. For more detailed statistics use vmaCalculateStatistics(). + /// Note that when using allocator from multiple threads, returned information may immediately + /// become outdated. + /// + /// + /// Must point to array with number of elements at least equal to number of memory heaps in physical device used. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetHeapBudgets(scoped Span pBudgets) + { + fixed (VmaBudget* pBudgetsPtr = pBudgets) + Vma.PInvoke.vmaGetHeapBudgets(allocator.VkHandle, pBudgetsPtr); + } + + /// + /// Helps to find `memoryTypeIndex`, given `memoryTypeBits` and #VmaAllocationCreateInfo. + /// This algorithm tries to find a memory type that: + /// - Is allowed by `memoryTypeBits`. + /// - Contains all the flags from `pAllocationCreateInfo->requiredFlags`. + /// - Matches intended usage. + /// - Has as many flags from `pAllocationCreateInfo->preferredFlags` as possible. + /// Returns `VK_ERROR_FEATURE_NOT_PRESENT` if not found. Receiving such result from this function or any other allocating function probably means that your device doesn't support any memory type with requested features for the specific type of resource you want to use it for. Please check parameters of your resource, like image layout (`OPTIMAL` versus `LINEAR`) or mip level count. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult FindMemoryTypeIndex( + uint memoryTypeBits, + VmaAllocationCreateInfo pAllocationCreateInfo, + out uint pMemoryTypeIndex + ) + { + fixed (uint* pMemoryTypeIndexPtr = &pMemoryTypeIndex) + return Vma.PInvoke.vmaFindMemoryTypeIndex( + allocator.VkHandle, + memoryTypeBits, + &pAllocationCreateInfo, + pMemoryTypeIndexPtr + ); + } + + /// + /// Helps to find `memoryTypeIndex`, given `VkBufferCreateInfo` and #VmaAllocationCreateInfo. + /// It can be useful e.g. to determine value to be used as VmaPoolCreateInfo::memoryTypeIndex. + /// It may need to internally create a temporary, dummy buffer that never has memory bound. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult FindMemoryTypeIndexForBufferInfo( + VkBufferCreateInfo pBufferCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + out uint pMemoryTypeIndex + ) + { + fixed (uint* pMemoryTypeIndexPtr = &pMemoryTypeIndex) + return Vma.PInvoke.vmaFindMemoryTypeIndexForBufferInfo( + allocator.VkHandle, + &pBufferCreateInfo, + &pAllocationCreateInfo, + pMemoryTypeIndexPtr + ); + } + + /// + /// Helps to find `memoryTypeIndex`, given `VkImageCreateInfo` and #VmaAllocationCreateInfo. + /// It can be useful e.g. to determine value to be used as VmaPoolCreateInfo::memoryTypeIndex. + /// It may need to internally create a temporary, dummy image that never has memory bound. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult FindMemoryTypeIndexForImageInfo( + VkImageCreateInfo pImageCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + out uint pMemoryTypeIndex + ) + { + fixed (uint* pMemoryTypeIndexPtr = &pMemoryTypeIndex) + return Vma.PInvoke.vmaFindMemoryTypeIndexForImageInfo( + allocator.VkHandle, + &pImageCreateInfo, + &pAllocationCreateInfo, + pMemoryTypeIndexPtr + ); + } + + /// + /// Allocates Vulkan device memory and creates #VmaPool object. + /// + /// Allocator object. + /// Parameters of pool to create. + /// Handle to created pool. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreatePool(VmaPoolCreateInfo pCreateInfo, out VmaPool pPool) + { + fixed (VmaPool* pPoolPtr = &pPool) + return Vma.PInvoke.vmaCreatePool(allocator.VkHandle, &pCreateInfo, pPoolPtr); + } + + /// + /// Destroys #VmaPool object and frees Vulkan device memory. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void DestroyPool(VmaPool pool) + { + Vma.PInvoke.vmaDestroyPool(allocator.VkHandle, pool); + } + + /// + /// Retrieves statistics of existing #VmaPool object. + /// Note that when using the pool from multiple threads, returned information may immediately + /// become outdated. + /// + /// Allocator object. + /// Pool object. + /// Statistics of specified pool. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetPoolStatistics(VmaPool pool, out VmaStatistics pPoolStats) + { + fixed (VmaStatistics* pPoolStatsPtr = &pPoolStats) + Vma.PInvoke.vmaGetPoolStatistics(allocator.VkHandle, pool, pPoolStatsPtr); + } + + /// + /// Retrieves detailed statistics of existing #VmaPool object. + /// + /// Allocator object. + /// Pool object. + /// Statistics of specified pool. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void CalculatePoolStatistics(VmaPool pool, out VmaDetailedStatistics pPoolStats) + { + fixed (VmaDetailedStatistics* pPoolStatsPtr = &pPoolStats) + Vma.PInvoke.vmaCalculatePoolStatistics(allocator.VkHandle, pool, pPoolStatsPtr); + } + + /// + /// Checks magic number in margins around all allocations in given memory pool in search for corruptions. + /// Corruption detection is enabled only when `VMA_DEBUG_DETECT_CORRUPTION` macro is defined to nonzero, + /// `VMA_DEBUG_MARGIN` is defined to nonzero and the pool is created in memory type that is + /// `HOST_VISIBLE` and `HOST_COHERENT`. For more information, see [Corruption detection]( + /// Possible return values: + /// - `VK_ERROR_FEATURE_NOT_PRESENT` - corruption detection is not enabled for specified pool. + /// - `VK_SUCCESS` - corruption detection has been performed and succeeded. + /// - `VK_ERROR_UNKNOWN` - corruption detection has been performed and found memory corruptions around one of the allocations. + /// `VMA_ASSERT` is also fired in that case. + /// - Other value: Error returned by Vulkan, e.g. memory mapping failure. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public VkResult CheckPoolCorruption(VmaPool pool) + { + return Vma.PInvoke.vmaCheckPoolCorruption(allocator.VkHandle, pool); + } + + /// + /// Retrieves name of a custom pool. + /// After the call `ppName` is either null or points to an internally-owned null-terminated string + /// containing name of the pool that was previously set. The pointer becomes invalid when the pool is + /// destroyed or its name is changed using vmaSetPoolName(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetPoolName(VmaPool pool, out Ptr ppName) + { + fixed (Ptr* ppNamePtr = &ppName) + Vma.PInvoke.vmaGetPoolName(allocator.VkHandle, pool, (byte**)ppNamePtr); + } + + /// + /// Sets name of a custom pool. + /// `pName` can be either null or pointer to a null-terminated string with new name for the pool. + /// Function makes internal copy of the string, so it can be changed or freed immediately after this call. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void SetPoolName(VmaPool pool, scoped ReadOnlySpan pName) + { + fixed (byte* pNamePtr = pName) + Vma.PInvoke.vmaSetPoolName(allocator.VkHandle, pool, pNamePtr); + } + + /// + /// General purpose memory allocation. + /// The function creates a #VmaAllocation object without creating a buffer or an image together with it. + /// - It is recommended to use vmaAllocateMemoryForBuffer(), vmaAllocateMemoryForImage(), + /// vmaCreateBuffer(), vmaCreateImage() instead whenever possible. + /// - You can also create a buffer or an image later in an existing allocation using + /// vmaCreateAliasingBuffer2(), vmaCreateAliasingImage2(). + /// - You can also create a buffer or an image on your own and bind it to an existing allocation + /// using vmaBindBufferMemory2(), vmaBindImageMemory2(). + /// You must free the returned allocation object using vmaFreeMemory() or vmaFreeMemoryPages(). + /// There is also extended version of this function: vmaAllocateDedicatedMemory() + /// that offers additional parameter `pMemoryAllocateNext`. + /// + /// The main allocator object. + /// Requirements for the allocated memory. + /// Allocation creation parameters. + /// Handle to allocated memory. + /// Optional, can be null. Information about allocated memory. It can be also fetched later using vmaGetAllocationInfo(). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult AllocateMemory( + VkMemoryRequirements pVkMemoryRequirements, + VmaAllocationCreateInfo pCreateInfo, + out VmaAllocation pAllocation, + out VmaAllocationInfo pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + fixed (VmaAllocation* pAllocationPtr = &pAllocation) + return Vma.PInvoke.vmaAllocateMemory( + allocator.VkHandle, + &pVkMemoryRequirements, + &pCreateInfo, + pAllocationPtr, + pAllocationInfoPtr + ); + } + + /// + /// General purpose allocation of a dedicated memory. + /// This function is similar vmaAllocateMemory(), but + /// it always allocates dedicated memory - flag #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT is implied. + /// It offers additional parameter `pMemoryAllocateNext`, + /// which can be used to attach `pNext` chain to the `VkMemoryAllocateInfo` structure. + /// It can be useful for importing external memory. For more information, see + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult AllocateDedicatedMemory( + VkMemoryRequirements pVkMemoryRequirements, + VmaAllocationCreateInfo pCreateInfo, + Ptr pMemoryAllocateNext, + VmaAllocation pAllocation, + VmaAllocationInfo pAllocationInfo + ) + { + return Vma.PInvoke.vmaAllocateDedicatedMemory( + allocator.VkHandle, + &pVkMemoryRequirements, + &pCreateInfo, + pMemoryAllocateNext, + &pAllocation, + &pAllocationInfo + ); + } + + /// + /// General purpose memory allocation for multiple allocation objects at once. + /// You should free the memory using vmaFreeMemory() or vmaFreeMemoryPages(). + /// Word "pages" is just a suggestion to use this function to allocate pieces of memory needed for sparse binding. + /// It is just a general purpose allocation function able to make multiple allocations at once. + /// It may be internally optimized to be more efficient than calling vmaAllocateMemory() `allocationCount` times. + /// All allocations are made using same parameters. All of them are created out of the same memory pool and type. + /// If any allocation fails, all allocations already made within this function call are also freed, so that when + /// returned result is not `VK_SUCCESS`, `pAllocation` array is always entirely filled with `VK_NULL_HANDLE`. + /// + /// Allocator object. + /// Memory requirements for each allocation. + /// Creation parameters for each allocation. + /// Number of allocations to make. + /// Pointer to array that will be filled with handles to created allocations. + /// Optional. Pointer to array that will be filled with parameters of created allocations. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult AllocateMemoryPages( + VkMemoryRequirements pVkMemoryRequirements, + VmaAllocationCreateInfo pCreateInfo, + nuint allocationCount, + scoped Span pAllocations, + scoped Span pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = pAllocationInfo) + fixed (VmaAllocation* pAllocationsPtr = pAllocations) + return Vma.PInvoke.vmaAllocateMemoryPages( + allocator.VkHandle, + &pVkMemoryRequirements, + &pCreateInfo, + allocationCount, + pAllocationsPtr, + pAllocationInfoPtr + ); + } + + /// + /// Allocates memory suitable for given `VkBuffer`. + /// It only creates #VmaAllocation. To bind the memory to the buffer, use vmaBindBufferMemory(). + /// This is a special-purpose function. In most cases you should use vmaCreateBuffer(). + /// You must free the allocation using vmaFreeMemory() when no longer needed. + /// + /// + /// + /// + /// Handle to allocated memory. + /// Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult AllocateMemoryForBuffer( + VkBuffer buffer, + VmaAllocationCreateInfo pCreateInfo, + out VmaAllocation pAllocation, + out VmaAllocationInfo pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + fixed (VmaAllocation* pAllocationPtr = &pAllocation) + return Vma.PInvoke.vmaAllocateMemoryForBuffer( + allocator.VkHandle, + buffer, + &pCreateInfo, + pAllocationPtr, + pAllocationInfoPtr + ); + } + + /// + /// Allocates memory suitable for given `VkImage`. + /// It only creates #VmaAllocation. To bind the memory to the buffer, use vmaBindImageMemory(). + /// This is a special-purpose function. In most cases you should use vmaCreateImage(). + /// You must free the allocation using vmaFreeMemory() when no longer needed. + /// + /// + /// + /// + /// Handle to allocated memory. + /// Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult AllocateMemoryForImage( + VkImage image, + VmaAllocationCreateInfo pCreateInfo, + out VmaAllocation pAllocation, + out VmaAllocationInfo pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + fixed (VmaAllocation* pAllocationPtr = &pAllocation) + return Vma.PInvoke.vmaAllocateMemoryForImage( + allocator.VkHandle, + image, + &pCreateInfo, + pAllocationPtr, + pAllocationInfoPtr + ); + } + + /// + /// Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage(). + /// Passing `VK_NULL_HANDLE` as `allocation` is valid. Such function call is just skipped. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void FreeMemory(VmaAllocation allocation) + { + Vma.PInvoke.vmaFreeMemory(allocator.VkHandle, allocation); + } + + /// + /// Frees memory and destroys multiple allocations. + /// Word "pages" is just a suggestion to use this function to free pieces of memory used for sparse binding. + /// It is just a general purpose function to free memory and destroy allocations made using e.g. vmaAllocateMemory(), + /// vmaAllocateMemoryPages() and other functions. + /// It may be internally optimized to be more efficient than calling vmaFreeMemory() `allocationCount` times. + /// Allocations in `pAllocations` array can come from any memory pools and types. + /// Passing `VK_NULL_HANDLE` as elements of `pAllocations` array is valid. Such entries are just skipped. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void FreeMemoryPages(nuint allocationCount, scoped Span pAllocations) + { + fixed (VmaAllocation* pAllocationsPtr = pAllocations) + Vma.PInvoke.vmaFreeMemoryPages(allocator.VkHandle, allocationCount, pAllocationsPtr); + } + + /// + /// Returns current information about specified allocation. + /// Current parameters of given allocation are returned in `pAllocationInfo`. + /// Although this function doesn't lock any mutex, so it should be quite efficient, + /// you should avoid calling it too often. + /// You can retrieve same VmaAllocationInfo structure while creating your resource, from function + /// vmaCreateBuffer(), vmaCreateImage(). You can remember it if you are sure parameters don't change + /// (e.g. due to defragmentation). + /// There is also a new function vmaGetAllocationInfo2() that offers extended information + /// about the allocation, returned using new structure #VmaAllocationInfo2. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetAllocationInfo(VmaAllocation allocation, out VmaAllocationInfo pAllocationInfo) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + Vma.PInvoke.vmaGetAllocationInfo(allocator.VkHandle, allocation, pAllocationInfoPtr); + } + + /// + /// Returns extended information about specified allocation. + /// Current parameters of given allocation are returned in `pAllocationInfo`. + /// Extended parameters in structure #VmaAllocationInfo2 include memory block size + /// and a flag telling whether the allocation has dedicated memory. + /// It can be useful e.g. for interop with OpenGL. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetAllocationInfo2(VmaAllocation allocation, out VmaAllocationInfo2 pAllocationInfo) + { + fixed (VmaAllocationInfo2* pAllocationInfoPtr = &pAllocationInfo) + Vma.PInvoke.vmaGetAllocationInfo2(allocator.VkHandle, allocation, pAllocationInfoPtr); + } + + /// + /// Sets pUserData in given allocation to new value. + /// The value of pointer `pUserData` is copied to allocation's `pUserData`. + /// It is opaque, so you can use it however you want - e.g. + /// as a pointer, ordinal number or some handle to you own data. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void SetAllocationUserData(VmaAllocation allocation, Ptr pUserData) + { + Vma.PInvoke.vmaSetAllocationUserData(allocator.VkHandle, allocation, pUserData); + } + + /// + /// Sets pName in given allocation to new value. + /// `pName` must be either null, or pointer to a null-terminated string. The function + /// makes local copy of the string and sets it as allocation's `pName`. String + /// passed as pName doesn't need to be valid for whole lifetime of the allocation - + /// you can free it after this call. String previously pointed by allocation's + /// `pName` is freed from memory. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void SetAllocationName(VmaAllocation allocation, scoped ReadOnlySpan pName) + { + fixed (byte* pNamePtr = pName) + Vma.PInvoke.vmaSetAllocationName(allocator.VkHandle, allocation, pNamePtr); + } + + /// + /// Given an allocation, returns Property Flags of its memory type. + /// This is just a convenience function. Same information can be obtained using + /// vmaGetAllocationInfo() + vmaGetMemoryProperties(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetAllocationMemoryProperties(VmaAllocation allocation, VkMemoryPropertyFlags pFlags) + { + Vma.PInvoke.vmaGetAllocationMemoryProperties(allocator.VkHandle, allocation, &pFlags); + } + + /// + /// Maps memory represented by given allocation and returns pointer to it. + /// Maps memory represented by given allocation to make it accessible to CPU code. + /// When succeeded, `*ppData` contains pointer to first byte of this memory. + /// If the allocation is part of a bigger `VkDeviceMemory` block, returned pointer is correctly offsetted to the beginning of region assigned to this particular allocation. Unlike the result of `vkMapMemory`, it points to the allocation, not to the beginning of the whole block. You should not add VmaAllocationInfo::offset to it! + /// Mapping is internally reference-counted and synchronized, so despite raw Vulkan + /// function `vkMapMemory()` cannot be used to map same block of `VkDeviceMemory` + /// multiple times simultaneously, it is safe to call this function on allocations + /// assigned to the same memory block. Actual Vulkan memory will be mapped on first + /// mapping and unmapped on last unmapping. + /// If the function succeeded, you must call vmaUnmapMemory() to unmap the + /// allocation when mapping is no longer needed or before freeing the allocation, at + /// the latest. + /// It also safe to call this function multiple times on the same allocation. You + /// must call vmaUnmapMemory() same number of times as you called vmaMapMemory(). + /// It is also safe to call this function on allocation created with + /// #VMA_ALLOCATION_CREATE_MAPPED_BIT flag. Its memory stays mapped all the time. + /// You must still call vmaUnmapMemory() same number of times as you called + /// vmaMapMemory(). You must not call vmaUnmapMemory() additional time to free the + /// "0-th" mapping made automatically due to #VMA_ALLOCATION_CREATE_MAPPED_BIT flag. + /// This function fails when used on allocation made in memory type that is not + /// `HOST_VISIBLE`. + /// This function doesn't automatically flush or invalidate caches. + /// If the allocation is made from a memory types that is not `HOST_COHERENT`, + /// you also need to use vmaInvalidateAllocation() / vmaFlushAllocation(), as required by Vulkan specification. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult MapMemory(VmaAllocation allocation, PtrPtr ppData) + { + return Vma.PInvoke.vmaMapMemory(allocator.VkHandle, allocation, ppData); + } + + /// + /// Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). + /// For details, see description of vmaMapMemory(). + /// This function doesn't automatically flush or invalidate caches. + /// If the allocation is made from a memory types that is not `HOST_COHERENT`, + /// you also need to use vmaInvalidateAllocation() / vmaFlushAllocation(), as required by Vulkan specification. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void UnmapMemory(VmaAllocation allocation) + { + Vma.PInvoke.vmaUnmapMemory(allocator.VkHandle, allocation); + } + + /// + /// Flushes memory of given allocation. + /// Calls `vkFlushMappedMemoryRanges()` for memory associated with given range of given allocation. + /// It needs to be called after writing to a mapped memory for memory types that are not `HOST_COHERENT`. + /// Unmap operation doesn't do that automatically. + /// - `offset` must be relative to the beginning of allocation. + /// - `size` can be `VK_WHOLE_SIZE`. It means all memory from `offset` the the end of given allocation. + /// - `offset` and `size` don't have to be aligned. + /// They are internally rounded down/up to multiply of `nonCoherentAtomSize`. + /// - If `size` is 0, this call is ignored. + /// - If memory type that the `allocation` belongs to is not `HOST_VISIBLE` or it is `HOST_COHERENT`, + /// this call is ignored. + /// Warning! `offset` and `size` are relative to the contents of given `allocation`. + /// If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively. + /// Do not pass allocation's offset as `offset`!!! + /// This function returns the `VkResult` from `vkFlushMappedMemoryRanges` if it is + /// called, otherwise `VK_SUCCESS`. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public VkResult FlushAllocation(VmaAllocation allocation, ByteSize offset, ByteSize size) + { + return Vma.PInvoke.vmaFlushAllocation(allocator.VkHandle, allocation, offset, size); + } + + /// + /// Invalidates memory of given allocation. + /// Calls `vkInvalidateMappedMemoryRanges()` for memory associated with given range of given allocation. + /// It needs to be called before reading from a mapped memory for memory types that are not `HOST_COHERENT`. + /// Map operation doesn't do that automatically. + /// - `offset` must be relative to the beginning of allocation. + /// - `size` can be `VK_WHOLE_SIZE`. It means all memory from `offset` the the end of given allocation. + /// - `offset` and `size` don't have to be aligned. + /// They are internally rounded down/up to multiply of `nonCoherentAtomSize`. + /// - If `size` is 0, this call is ignored. + /// - If memory type that the `allocation` belongs to is not `HOST_VISIBLE` or it is `HOST_COHERENT`, + /// this call is ignored. + /// Warning! `offset` and `size` are relative to the contents of given `allocation`. + /// If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively. + /// Do not pass allocation's offset as `offset`!!! + /// This function returns the `VkResult` from `vkInvalidateMappedMemoryRanges` if + /// it is called, otherwise `VK_SUCCESS`. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public VkResult InvalidateAllocation(VmaAllocation allocation, ByteSize offset, ByteSize size) + { + return Vma.PInvoke.vmaInvalidateAllocation(allocator.VkHandle, allocation, offset, size); + } + + /// + /// Flushes memory of given set of allocations. + /// Calls `vkFlushMappedMemoryRanges()` for memory associated with given ranges of given allocations. + /// For more information, see documentation of vmaFlushAllocation(). + /// This function returns the `VkResult` from `vkFlushMappedMemoryRanges` if it is + /// called, otherwise `VK_SUCCESS`. + /// + /// + /// + /// + /// If not null, it must point to an array of offsets of regions to flush, relative to the beginning of respective allocations. Null means all offsets are zero. + /// If not null, it must point to an array of sizes of regions to flush in respective allocations. Null means `VK_WHOLE_SIZE` for all allocations. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult FlushAllocations( + uint allocationCount, + scoped Span allocations, + scoped Span offsets, + scoped Span sizes + ) + { + fixed (ByteSize* sizesPtr = sizes) + fixed (ByteSize* offsetsPtr = offsets) + fixed (VmaAllocation* allocationsPtr = allocations) + return Vma.PInvoke.vmaFlushAllocations( + allocator.VkHandle, + allocationCount, + allocationsPtr, + offsetsPtr, + sizesPtr + ); + } + + /// + /// Invalidates memory of given set of allocations. + /// Calls `vkInvalidateMappedMemoryRanges()` for memory associated with given ranges of given allocations. + /// For more information, see documentation of vmaInvalidateAllocation(). + /// This function returns the `VkResult` from `vkInvalidateMappedMemoryRanges` if it is + /// called, otherwise `VK_SUCCESS`. + /// + /// + /// + /// + /// If not null, it must point to an array of offsets of regions to flush, relative to the beginning of respective allocations. Null means all offsets are zero. + /// If not null, it must point to an array of sizes of regions to flush in respective allocations. Null means `VK_WHOLE_SIZE` for all allocations. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult InvalidateAllocations( + uint allocationCount, + scoped Span allocations, + scoped Span offsets, + scoped Span sizes + ) + { + fixed (ByteSize* sizesPtr = sizes) + fixed (ByteSize* offsetsPtr = offsets) + fixed (VmaAllocation* allocationsPtr = allocations) + return Vma.PInvoke.vmaInvalidateAllocations( + allocator.VkHandle, + allocationCount, + allocationsPtr, + offsetsPtr, + sizesPtr + ); + } + + /// + /// Maps the allocation temporarily if needed, copies data from specified host pointer to it, and flushes the memory from the host caches if needed. + /// This is a convenience function that allows to copy data from a host pointer to an allocation easily. + /// Same behavior can be achieved by calling vmaMapMemory(), `memcpy()`, vmaUnmapMemory(), vmaFlushAllocation(). + /// This function can be called only for allocations created in a memory type that has `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` flag. + /// It can be ensured e.g. by using #VMA_MEMORY_USAGE_AUTO and #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or + /// #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. + /// Otherwise, the function will fail and generate a Validation Layers error. + /// `dstAllocationLocalOffset` is relative to the contents of given `dstAllocation`. + /// If you mean whole allocation, you should pass 0. + /// Do not pass allocation's offset within device memory block this parameter! + /// + /// + /// Pointer to the host data that become source of the copy. + /// Handle to the allocation that becomes destination of the copy. + /// Offset within `dstAllocation` where to write copied data, in bytes. + /// Number of bytes to copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CopyMemoryToAllocation( + Ptr pSrcHostPointer, + VmaAllocation dstAllocation, + ByteSize dstAllocationLocalOffset, + ByteSize size + ) + { + return Vma.PInvoke.vmaCopyMemoryToAllocation( + allocator.VkHandle, + pSrcHostPointer, + dstAllocation, + dstAllocationLocalOffset, + size + ); + } + + /// + /// Invalidates memory in the host caches if needed, maps the allocation temporarily if needed, and copies data from it to a specified host pointer. + /// This is a convenience function that allows to copy data from an allocation to a host pointer easily. + /// Same behavior can be achieved by calling vmaInvalidateAllocation(), vmaMapMemory(), `memcpy()`, vmaUnmapMemory(). + /// This function should be called only for allocations created in a memory type that has `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` + /// and `VK_MEMORY_PROPERTY_HOST_CACHED_BIT` flag. + /// It can be ensured e.g. by using #VMA_MEMORY_USAGE_AUTO and #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. + /// Otherwise, the function may fail and generate a Validation Layers error. + /// It may also work very slowly when reading from an uncached memory. + /// `srcAllocationLocalOffset` is relative to the contents of given `srcAllocation`. + /// If you mean whole allocation, you should pass 0. + /// Do not pass allocation's offset within device memory block as this parameter! + /// + /// + /// Handle to the allocation that becomes source of the copy. + /// Offset within `srcAllocation` where to read copied data, in bytes. + /// Pointer to the host memory that become destination of the copy. + /// Number of bytes to copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CopyAllocationToMemory( + VmaAllocation srcAllocation, + ByteSize srcAllocationLocalOffset, + Ptr pDstHostPointer, + ByteSize size + ) + { + return Vma.PInvoke.vmaCopyAllocationToMemory( + allocator.VkHandle, + srcAllocation, + srcAllocationLocalOffset, + pDstHostPointer, + size + ); + } + + /// + /// Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions. + /// Corruption detection is enabled only when `VMA_DEBUG_DETECT_CORRUPTION` macro is defined to nonzero, + /// `VMA_DEBUG_MARGIN` is defined to nonzero and only for memory types that are + /// `HOST_VISIBLE` and `HOST_COHERENT`. For more information, see [Corruption detection]( + /// Possible return values: + /// - `VK_ERROR_FEATURE_NOT_PRESENT` - corruption detection is not enabled for any of specified memory types. + /// - `VK_SUCCESS` - corruption detection has been performed and succeeded. + /// - `VK_ERROR_UNKNOWN` - corruption detection has been performed and found memory corruptions around one of the allocations. + /// `VMA_ASSERT` is also fired in that case. + /// - Other value: Error returned by Vulkan, e.g. memory mapping failure. + /// + /// + /// Bit mask, where each bit set means that a memory type with that index should be checked. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public VkResult CheckCorruption(uint memoryTypeBits) + { + return Vma.PInvoke.vmaCheckCorruption(allocator.VkHandle, memoryTypeBits); + } + + /// + /// Begins defragmentation process. + /// - `VK_SUCCESS` if defragmentation can begin. - `VK_ERROR_FEATURE_NOT_PRESENT` if defragmentation is not supported. + /// For more information about defragmentation, see documentation chapter: + /// [Defragmentation]( + /// + /// Allocator object. + /// Structure filled with parameters of defragmentation. + /// Context object that must be passed to vmaEndDefragmentation() to finish defragmentation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult BeginDefragmentation( + VmaDefragmentationInfo pInfo, + out VmaDefragmentationContext pContext + ) + { + fixed (VmaDefragmentationContext* pContextPtr = &pContext) + return Vma.PInvoke.vmaBeginDefragmentation(allocator.VkHandle, &pInfo, pContextPtr); + } + + /// + /// Ends defragmentation process. + /// Use this function to finish defragmentation started by vmaBeginDefragmentation(). + /// + /// Allocator object. + /// Context object that has been created by vmaBeginDefragmentation(). + /// Optional stats for the defragmentation. Can be null. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void EndDefragmentation(VmaDefragmentationContext context, out VmaDefragmentationStats pStats) + { + fixed (VmaDefragmentationStats* pStatsPtr = &pStats) + Vma.PInvoke.vmaEndDefragmentation(allocator.VkHandle, context, pStatsPtr); + } + + /// + /// Starts single defragmentation pass. + /// - `VK_SUCCESS` if no more moves are possible. Then you can omit call to vmaEndDefragmentationPass() and simply end whole defragmentation. - `VK_INCOMPLETE` if there are pending moves returned in `pPassInfo`. You need to perform them, call vmaEndDefragmentationPass(), and then preferably try another pass with vmaBeginDefragmentationPass(). + /// + /// Allocator object. + /// Context object that has been created by vmaBeginDefragmentation(). + /// Computed information for current pass. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult BeginDefragmentationPass( + VmaDefragmentationContext context, + out VmaDefragmentationPassMoveInfo pPassInfo + ) + { + fixed (VmaDefragmentationPassMoveInfo* pPassInfoPtr = &pPassInfo) + return Vma.PInvoke.vmaBeginDefragmentationPass(allocator.VkHandle, context, pPassInfoPtr); + } + + /// + /// Ends single defragmentation pass. + /// Returns `VK_SUCCESS` if no more moves are possible or `VK_INCOMPLETE` if more defragmentations are possible. + /// Ends incremental defragmentation pass and commits all defragmentation moves from `pPassInfo`. + /// After this call: + /// - Allocations at `pPassInfo[i].srcAllocation` that had `pPassInfo[i].operation ==` #VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY + /// (which is the default) will be pointing to the new destination place. + /// - Allocation at `pPassInfo[i].srcAllocation` that had `pPassInfo[i].operation ==` #VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY + /// will be freed. + /// If no more moves are possible you can end whole defragmentation. + /// + /// Allocator object. + /// Context object that has been created by vmaBeginDefragmentation(). + /// Computed information for current pass filled by vmaBeginDefragmentationPass() and possibly modified by you. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult EndDefragmentationPass( + VmaDefragmentationContext context, + ref VmaDefragmentationPassMoveInfo pPassInfo + ) + { + fixed (VmaDefragmentationPassMoveInfo* pPassInfoPtr = &pPassInfo) + return Vma.PInvoke.vmaEndDefragmentationPass(allocator.VkHandle, context, pPassInfoPtr); + } + + /// + /// Binds buffer to allocation. + /// Binds specified buffer to region of memory represented by specified allocation. + /// Gets `VkDeviceMemory` handle and offset from the allocation. + /// If you want to create a buffer, allocate memory for it and bind them together separately, + /// you should use this function for binding instead of standard `vkBindBufferMemory()`, + /// because it ensures proper synchronization so that when a `VkDeviceMemory` object is used by multiple + /// allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from multiple threads simultaneously + /// (which is illegal in Vulkan). + /// It is recommended to use function vmaCreateBuffer() instead of this one. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public VkResult BindBufferMemory(VmaAllocation allocation, VkBuffer buffer) + { + return Vma.PInvoke.vmaBindBufferMemory(allocator.VkHandle, allocation, buffer); + } + + /// + /// Binds buffer to allocation with additional parameters. + /// This function is similar to vmaBindBufferMemory(), but it provides additional parameters. + /// If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag + /// or with VmaAllocatorCreateInfo::vulkanApiVersion `>= VK_API_VERSION_1_1`. Otherwise the call fails. + /// + /// + /// + /// Additional offset to be added while binding, relative to the beginning of the `allocation`. Normally it should be 0. + /// + /// A chain of structures to be attached to `VkBindBufferMemoryInfoKHR` structure used internally. Normally it should be null. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult BindBufferMemory2( + VmaAllocation allocation, + ByteSize allocationLocalOffset, + VkBuffer buffer, + Ptr pNext + ) + { + return Vma.PInvoke.vmaBindBufferMemory2( + allocator.VkHandle, + allocation, + allocationLocalOffset, + buffer, + pNext + ); + } + + /// + /// Binds image to allocation. + /// Binds specified image to region of memory represented by specified allocation. + /// Gets `VkDeviceMemory` handle and offset from the allocation. + /// If you want to create an image, allocate memory for it and bind them together separately, + /// you should use this function for binding instead of standard `vkBindImageMemory()`, + /// because it ensures proper synchronization so that when a `VkDeviceMemory` object is used by multiple + /// allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from multiple threads simultaneously + /// (which is illegal in Vulkan). + /// It is recommended to use function vmaCreateImage() instead of this one. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public VkResult BindImageMemory(VmaAllocation allocation, VkImage image) + { + return Vma.PInvoke.vmaBindImageMemory(allocator.VkHandle, allocation, image); + } + + /// + /// Binds image to allocation with additional parameters. + /// This function is similar to vmaBindImageMemory(), but it provides additional parameters. + /// If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag + /// or with VmaAllocatorCreateInfo::vulkanApiVersion `>= VK_API_VERSION_1_1`. Otherwise the call fails. + /// + /// + /// + /// Additional offset to be added while binding, relative to the beginning of the `allocation`. Normally it should be 0. + /// + /// A chain of structures to be attached to `VkBindImageMemoryInfoKHR` structure used internally. Normally it should be null. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult BindImageMemory2( + VmaAllocation allocation, + ByteSize allocationLocalOffset, + VkImage image, + Ptr pNext + ) + { + return Vma.PInvoke.vmaBindImageMemory2( + allocator.VkHandle, + allocation, + allocationLocalOffset, + image, + pNext + ); + } + + /// + /// Creates a new `VkBuffer`, allocates and binds memory for it. + /// This function automatically: + /// -# Creates buffer. + /// -# Allocates appropriate memory for it. + /// -# Binds the buffer with the memory. + /// If any of these operations fail, buffer and allocation are not created, + /// returned value is negative error code, `*pBuffer` and `*pAllocation` are returned as null. + /// If the function succeeded, you must destroy both buffer and allocation when you + /// no longer need them using either convenience function vmaDestroyBuffer() or + /// separately, using `vkDestroyBuffer()` and vmaFreeMemory(). + /// If VK_KHR_dedicated_allocation extenion or Vulkan version >= 1.1 is used, + /// the function queries the driver whether + /// it requires or prefers the new buffer to have dedicated allocation. If yes, + /// and if dedicated allocation is possible + /// (#VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT is not used), it creates dedicated + /// allocation for this buffer, just like when using + /// #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. + /// This function creates a new `VkBuffer`. Sub-allocation of parts of one large buffer, although recommended as a good practice, is out of scope of this library and could be implemented by the user as a higher-level logic on top of VMA. + /// There is also an extended versions of this function available with additional parameter `pMemoryAllocateNext` - + /// see vmaCreateDedicatedBuffer(). + /// + /// The main allocator object. + /// Buffer creation parameters. + /// Allocation creation parameters. + /// Buffer that was created. + /// Allocation that was created. + /// Optional, can be null. Information about allocated memory.It can be also fetched later using vmaGetAllocationInfo(). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateBuffer( + VkBufferCreateInfo pBufferCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + out VkBuffer pBuffer, + out VmaAllocation pAllocation, + out VmaAllocationInfo pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + fixed (VmaAllocation* pAllocationPtr = &pAllocation) + fixed (VkBuffer* pBufferPtr = &pBuffer) + return Vma.PInvoke.vmaCreateBuffer( + allocator.VkHandle, + &pBufferCreateInfo, + &pAllocationCreateInfo, + pBufferPtr, + pAllocationPtr, + pAllocationInfoPtr + ); + } + + /// + /// Creates a buffer with additional minimum alignment. + /// Similar to vmaCreateBuffer() but provides additional parameter `minAlignment` which allows to specify custom, + /// minimum alignment to be used when placing the buffer inside a larger memory block, which may be needed e.g. + /// for interop with OpenGL. + /// This function in obsolete since new VmaAllocationCreateInfo::minAlignment member allows specifying custom alignment while using any allocation function, like the standard vmaCreateBuffer(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateBufferWithAlignment( + VkBufferCreateInfo pBufferCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + ByteSize minAlignment, + VkBuffer pBuffer, + VmaAllocation pAllocation, + VmaAllocationInfo pAllocationInfo + ) + { + return Vma.PInvoke.vmaCreateBufferWithAlignment( + allocator.VkHandle, + &pBufferCreateInfo, + &pAllocationCreateInfo, + minAlignment, + &pBuffer, + &pAllocation, + &pAllocationInfo + ); + } + + /// + /// Creates a dedicated buffer while offering extra parameter `pMemoryAllocateNext`. + /// This function is similar vmaCreateBuffer(), but + /// it always allocates dedicated memory for the buffer - flag #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT is implied. + /// It offers additional parameter `pMemoryAllocateNext`, + /// which can be used to attach `pNext` chain to the `VkMemoryAllocateInfo` structure. + /// It can be useful for importing external memory. For more information, see + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateDedicatedBuffer( + VkBufferCreateInfo pBufferCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + Ptr pMemoryAllocateNext, + VkBuffer pBuffer, + VmaAllocation pAllocation, + VmaAllocationInfo pAllocationInfo + ) + { + return Vma.PInvoke.vmaCreateDedicatedBuffer( + allocator.VkHandle, + &pBufferCreateInfo, + &pAllocationCreateInfo, + pMemoryAllocateNext, + &pBuffer, + &pAllocation, + &pAllocationInfo + ); + } + + /// + /// Creates a new `VkBuffer`, binds already created memory for it. + /// This function automatically: + /// -# Creates buffer. + /// -# Binds the buffer with the supplied memory. + /// If any of these operations fail, buffer is not created, + /// returned value is negative error code and `*pBuffer` is null. + /// If the function succeeded, you must destroy the buffer when you + /// no longer need it using `vkDestroyBuffer()`. If you want to also destroy the corresponding + /// allocation you can use convenience function vmaDestroyBuffer(). + /// There is a new version of this function augmented with parameter `allocationLocalOffset` - see vmaCreateAliasingBuffer2(). + /// + /// + /// Allocation that provides memory to be used for binding new buffer to it. + /// + /// Buffer that was created. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateAliasingBuffer( + VmaAllocation allocation, + VkBufferCreateInfo pBufferCreateInfo, + out VkBuffer pBuffer + ) + { + fixed (VkBuffer* pBufferPtr = &pBuffer) + return Vma.PInvoke.vmaCreateAliasingBuffer( + allocator.VkHandle, + allocation, + &pBufferCreateInfo, + pBufferPtr + ); + } + + /// + /// Creates a new `VkBuffer`, binds already created memory for it. + /// This function automatically: + /// -# Creates buffer. + /// -# Binds the buffer with the supplied memory. + /// If any of these operations fail, buffer is not created, + /// returned value is negative error code and `*pBuffer` is null. + /// If the function succeeded, you must destroy the buffer when you + /// no longer need it using `vkDestroyBuffer()`. If you want to also destroy the corresponding + /// allocation you can use convenience function vmaDestroyBuffer(). + /// This is a new version of the function augmented with parameter `allocationLocalOffset`. + /// + /// + /// Allocation that provides memory to be used for binding new buffer to it. + /// Additional offset to be added while binding, relative to the beginning of the allocation. Normally it should be 0. + /// + /// Buffer that was created. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateAliasingBuffer2( + VmaAllocation allocation, + ByteSize allocationLocalOffset, + VkBufferCreateInfo pBufferCreateInfo, + out VkBuffer pBuffer + ) + { + fixed (VkBuffer* pBufferPtr = &pBuffer) + return Vma.PInvoke.vmaCreateAliasingBuffer2( + allocator.VkHandle, + allocation, + allocationLocalOffset, + &pBufferCreateInfo, + pBufferPtr + ); + } + + /// + /// Destroys Vulkan buffer and frees allocated memory. + /// This is just a convenience function equivalent to: + /// @code vkDestroyBuffer(device, buffer, allocationCallbacks); vmaFreeMemory(allocator, allocation); @endcode + /// It is safe to pass null as buffer and/or allocation. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void DestroyBuffer(VkBuffer buffer, VmaAllocation allocation) + { + Vma.PInvoke.vmaDestroyBuffer(allocator.VkHandle, buffer, allocation); + } + + /// + /// Function similar to vmaCreateBuffer() but for images. + /// There is also an extended version of this function available: vmaCreateDedicatedImage() + /// which offers additional parameter `pMemoryAllocateNext`. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateImage( + VkImageCreateInfo pImageCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + out VkImage pImage, + out VmaAllocation pAllocation, + out VmaAllocationInfo pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + fixed (VmaAllocation* pAllocationPtr = &pAllocation) + fixed (VkImage* pImagePtr = &pImage) + return Vma.PInvoke.vmaCreateImage( + allocator.VkHandle, + &pImageCreateInfo, + &pAllocationCreateInfo, + pImagePtr, + pAllocationPtr, + pAllocationInfoPtr + ); + } + + /// + /// Function similar to vmaCreateDedicatedBuffer() but for images. + /// This function is similar vmaCreateImage(), but + /// it always allocates dedicated memory for the image - flag #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT is implied. + /// It offers additional parameter `pMemoryAllocateNext`, + /// which can be used to attach `pNext` chain to the `VkMemoryAllocateInfo` structure. + /// It can be useful for importing external memory. For more information, see + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateDedicatedImage( + VkImageCreateInfo pImageCreateInfo, + VmaAllocationCreateInfo pAllocationCreateInfo, + Ptr pMemoryAllocateNext, + out VkImage pImage, + out VmaAllocation pAllocation, + out VmaAllocationInfo pAllocationInfo + ) + { + fixed (VmaAllocationInfo* pAllocationInfoPtr = &pAllocationInfo) + fixed (VmaAllocation* pAllocationPtr = &pAllocation) + fixed (VkImage* pImagePtr = &pImage) + return Vma.PInvoke.vmaCreateDedicatedImage( + allocator.VkHandle, + &pImageCreateInfo, + &pAllocationCreateInfo, + pMemoryAllocateNext, + pImagePtr, + pAllocationPtr, + pAllocationInfoPtr + ); + } + + /// + /// Function similar to vmaCreateAliasingBuffer() but for images. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateAliasingImage( + VmaAllocation allocation, + VkImageCreateInfo pImageCreateInfo, + out VkImage pImage + ) + { + fixed (VkImage* pImagePtr = &pImage) + return Vma.PInvoke.vmaCreateAliasingImage( + allocator.VkHandle, + allocation, + &pImageCreateInfo, + pImagePtr + ); + } + + /// + /// Function similar to vmaCreateAliasingBuffer2() but for images. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateAliasingImage2( + VmaAllocation allocation, + ByteSize allocationLocalOffset, + VkImageCreateInfo pImageCreateInfo, + out VkImage pImage + ) + { + fixed (VkImage* pImagePtr = &pImage) + return Vma.PInvoke.vmaCreateAliasingImage2( + allocator.VkHandle, + allocation, + allocationLocalOffset, + &pImageCreateInfo, + pImagePtr + ); + } + + /// + /// Destroys Vulkan image and frees allocated memory. + /// This is just a convenience function equivalent to: + /// @code vkDestroyImage(device, image, allocationCallbacks); vmaFreeMemory(allocator, allocation); @endcode + /// It is safe to pass null as image and/or allocation. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void DestroyImage(VkImage image, VmaAllocation allocation) + { + Vma.PInvoke.vmaDestroyImage(allocator.VkHandle, image, allocation); + } + + /// + /// Creates new #VmaVirtualBlock object. + /// + /// Parameters for creation. + /// Returned virtual block object or `VMA_NULL` if creation failed. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult CreateVirtualBlock( + VmaVirtualBlockCreateInfo pCreateInfo, + out VmaVirtualBlock pVirtualBlock + ) + { + fixed (VmaVirtualBlock* pVirtualBlockPtr = &pVirtualBlock) + return Vma.PInvoke.vmaCreateVirtualBlock(&pCreateInfo, pVirtualBlockPtr); + } + + /// + /// Destroys #VmaVirtualBlock object. + /// Please note that you should consciously handle virtual allocations that could remain unfreed in the block. + /// You should either free them individually using vmaVirtualFree() or call vmaClearVirtualBlock() + /// if you are sure this is what you want. If you do neither, an assert is called. + /// If you keep pointers to some additional metadata associated with your virtual allocations in their `pUserData`, + /// don't forget to free them. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void DestroyVirtualBlock(VmaVirtualBlock virtualBlock) + { + Vma.PInvoke.vmaDestroyVirtualBlock(virtualBlock); + } + + /// + /// Returns true of the #VmaVirtualBlock is empty - contains 0 virtual allocations and has all its space available for new allocations. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Bool32 IsVirtualBlockEmpty(VmaVirtualBlock virtualBlock) + { + return Vma.PInvoke.vmaIsVirtualBlockEmpty(virtualBlock); + } + + /// + /// Returns information about a specific virtual allocation within a virtual block, like its size and `pUserData` pointer. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetVirtualAllocationInfo( + VmaVirtualBlock virtualBlock, + VmaVirtualAllocation allocation, + out VmaVirtualAllocationInfo pVirtualAllocInfo + ) + { + fixed (VmaVirtualAllocationInfo* pVirtualAllocInfoPtr = &pVirtualAllocInfo) + Vma.PInvoke.vmaGetVirtualAllocationInfo(virtualBlock, allocation, pVirtualAllocInfoPtr); + } + + /// + /// Allocates new virtual allocation inside given #VmaVirtualBlock. + /// If the allocation fails due to not enough free space available, `VK_ERROR_OUT_OF_DEVICE_MEMORY` is returned + /// (despite the function doesn't ever allocate actual GPU memory). + /// `pAllocation` is then set to `VK_NULL_HANDLE` and `pOffset`, if not null, it set to `UINT64_MAX`. + /// + /// Virtual block + /// Parameters for the allocation + /// Returned handle of the new allocation + /// Returned offset of the new allocation. Optional, can be null. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe VkResult VirtualAllocate( + VmaVirtualBlock virtualBlock, + VmaVirtualAllocationCreateInfo pCreateInfo, + out VmaVirtualAllocation pAllocation, + out ByteSize pOffset + ) + { + fixed (ByteSize* pOffsetPtr = &pOffset) + fixed (VmaVirtualAllocation* pAllocationPtr = &pAllocation) + return Vma.PInvoke.vmaVirtualAllocate(virtualBlock, &pCreateInfo, pAllocationPtr, pOffsetPtr); + } + + /// + /// Frees virtual allocation inside given #VmaVirtualBlock. + /// It is correct to call this function with `allocation == VK_NULL_HANDLE` - it does nothing. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void VirtualFree(VmaVirtualBlock virtualBlock, VmaVirtualAllocation allocation) + { + Vma.PInvoke.vmaVirtualFree(virtualBlock, allocation); + } + + /// + /// Frees all virtual allocations inside given #VmaVirtualBlock. + /// You must either call this function or free each virtual allocation individually with vmaVirtualFree() + /// before destroying a virtual block. Otherwise, an assert is called. + /// If you keep pointer to some additional metadata associated with your virtual allocation in its `pUserData`, + /// don't forget to free it as well. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ClearVirtualBlock(VmaVirtualBlock virtualBlock) + { + Vma.PInvoke.vmaClearVirtualBlock(virtualBlock); + } + + /// + /// Changes custom pointer associated with given virtual allocation. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void SetVirtualAllocationUserData( + VmaVirtualBlock virtualBlock, + VmaVirtualAllocation allocation, + Ptr pUserData + ) + { + Vma.PInvoke.vmaSetVirtualAllocationUserData(virtualBlock, allocation, pUserData); + } + + /// + /// Calculates and returns statistics about virtual allocations and memory usage in given #VmaVirtualBlock. + /// This function is fast to call. For more detailed statistics, see vmaCalculateVirtualBlockStatistics(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetVirtualBlockStatistics(VmaVirtualBlock virtualBlock, out VmaStatistics pStats) + { + fixed (VmaStatistics* pStatsPtr = &pStats) + Vma.PInvoke.vmaGetVirtualBlockStatistics(virtualBlock, pStatsPtr); + } + + /// + /// Calculates and returns detailed statistics about virtual allocations and memory usage in given #VmaVirtualBlock. + /// This function is slow to call. Use for debugging purposes. + /// For less detailed statistics, see vmaGetVirtualBlockStatistics(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void CalculateVirtualBlockStatistics( + VmaVirtualBlock virtualBlock, + out VmaDetailedStatistics pStats + ) + { + fixed (VmaDetailedStatistics* pStatsPtr = &pStats) + Vma.PInvoke.vmaCalculateVirtualBlockStatistics(virtualBlock, pStatsPtr); + } + + /// + /// Builds and returns a null-terminated string in JSON format with information about given #VmaVirtualBlock. + /// Returned string must be freed using vmaFreeVirtualBlockStatsString(). + /// + /// Virtual block. + /// Returned string. + /// Pass `VK_FALSE` to only obtain statistics as returned by vmaCalculateVirtualBlockStatistics(). Pass `VK_TRUE` to also obtain full list of allocations and free spaces. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void BuildVirtualBlockStatsString( + VmaVirtualBlock virtualBlock, + out Ptr ppStatsString, + Bool32 detailedMap + ) + { + fixed (Ptr* ppStatsStringPtr = &ppStatsString) + Vma.PInvoke.vmaBuildVirtualBlockStatsString(virtualBlock, (byte**)ppStatsStringPtr, detailedMap); + } + + /// + /// Frees a string returned by vmaBuildVirtualBlockStatsString(). + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void FreeVirtualBlockStatsString( + VmaVirtualBlock virtualBlock, + scoped ReadOnlySpan pStatsString + ) + { + fixed (byte* pStatsStringPtr = pStatsString) + Vma.PInvoke.vmaFreeVirtualBlockStatsString(virtualBlock, pStatsStringPtr); + } + + /// + /// Builds and returns statistics as a null-terminated string in JSON format. + /// + /// + /// Must be freed using vmaFreeStatsString() function. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void BuildStatsString(out Ptr ppStatsString, Bool32 detailedMap) + { + fixed (Ptr* ppStatsStringPtr = &ppStatsString) + Vma.PInvoke.vmaBuildStatsString(allocator.VkHandle, (byte**)ppStatsStringPtr, detailedMap); + } + + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void FreeStatsString(scoped ReadOnlySpan pStatsString) + { + fixed (byte* pStatsStringPtr = pStatsString) + Vma.PInvoke.vmaFreeStatsString(allocator.VkHandle, pStatsStringPtr); + } + } + } +} diff --git a/Brutal.Vulkan.Vma/GlobalUsings.cs b/Brutal.Vulkan.Vma/GlobalUsings.cs new file mode 100644 index 0000000..e678ed4 --- /dev/null +++ b/Brutal.Vulkan.Vma/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using System.Runtime.InteropServices; +global using Brutal.Pointers; diff --git a/Brutal.Vulkan.Vma/LICENSES/BRUTAL-VULKAN-VMA-THIRD-PARTY-NOTICES.txt b/Brutal.Vulkan.Vma/LICENSES/BRUTAL-VULKAN-VMA-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..80198d6 --- /dev/null +++ b/Brutal.Vulkan.Vma/LICENSES/BRUTAL-VULKAN-VMA-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,39 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Vulkan.Vma + +Brutal.Vulkan.Vma redistributes one third-party component, the Vulkan Memory Allocator. It +reaches this package by two routes: as native libraries, and as descriptive text taken from +the library's own header, which appears in the XML documentation file beside the assembly. +It is reproduced below with the license that governs both. + +============================================================ +Vulkan Memory Allocator 3.4.0-development +MIT -- https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator +============================================================ + + Name Vulkan Memory Allocator, a memory allocation library for Vulkan + Version 3.4.0-development (pre-release; built from upstream v3.3.0-39-ge722e57) + Upstream https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator + SPDX MIT + Shipped as vma.dll (win-x64), libvma.so (linux-x64), libvma.dylib (osx-arm64), and + descriptive text from the library's header in the XML documentation file + +Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Brutal.Vulkan.Vma/Manual/VmaAllocator.cs b/Brutal.Vulkan.Vma/Manual/VmaAllocator.cs new file mode 100644 index 0000000..5d60df7 --- /dev/null +++ b/Brutal.Vulkan.Vma/Manual/VmaAllocator.cs @@ -0,0 +1,242 @@ +using Brutal.VulkanApi.Abstractions; + +namespace Brutal.VulkanApi.Vma +{ + /// + /// Interface for a VMA allocator + /// + public interface IVmaAllocator + { + public VmaAllocatorHandle VkHandle { get; } + } + + /// + /// A struct to contain the VmaAllocator handle which is passed to VMA functions + /// + public readonly struct VmaAllocatorHandle(nint handle) + { + public VkObjectType VkObjectType => VkObjectType.Unknown; + public IntPtr VkHandle { get; } = handle; + + public bool IsNull() + { + return VkHandle == 0; + } + } + + /// + /// VMA wrapper implementing IImageAllocator and IBufferAllocator, allowing VMA to be used like any other allocator + /// + public partial class VmaAllocator(Device device, VmaAllocatorHandle inHandle) + : IVmaAllocator, + IImageAllocator, + IBufferAllocator + { + private readonly Device _device = device; + + public VmaAllocatorHandle VkHandle { get; } = inHandle; + + /// + public Device GetDevice() => _device; + + public VkAllocator? VkAllocator { get; } + + #region Memory mapping + + public unsafe Ptr MapMemory(in AllocationMapInfo allocationMapInfo) + { + void* mapped; + var allocationInfo = new VmaAllocation(allocationMapInfo.AllocationInfo.AllocHandle); + var result = this.MapMemory(allocationInfo, &mapped); + if (result != VkResult.Success) + throw new Exception("Failed to map memory"); + return mapped; + } + + public unsafe void UnmapMemory(in AllocationMapInfo allocationMapInfo) + { + var allocationInfo = new VmaAllocation(allocationMapInfo.AllocationInfo.AllocHandle); + this.UnmapMemory(allocationInfo); + } + + #endregion + + #region Buffer Allocator + + public BufferAllocationInfo AllocateBuffer( + in VkBufferCreateInfo bufferCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + return AllocateBuffer("", bufferCreateInfo, allocateCreateInfo); + } + + /// + public BufferAllocationInfo AllocateBuffer( + in string name, + in VkBufferCreateInfo bufferCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + var vmaInfo = ConvertInfo(allocateCreateInfo); + var result = this.CreateBuffer( + bufferCreateInfo, + vmaInfo, + out var buffer, + out var allocation, + out var allocationInfo + ); + + if (result != VkResult.Success) + throw new Exception("Vma Failed to create buffer"); + + var vkBufferAllocationInfo = new BufferAllocationInfo( + buffer, + ByteSize.Zero, + bufferCreateInfo.Size, + bufferCreateInfo.Usage, + new AllocationInfo + { + Allocator = this, + Memory = allocationInfo.DeviceMemory, + MemoryTypeIndex = (int)allocationInfo.MemoryType, + AllocOffset = allocationInfo.Offset, + AllocSize = allocationInfo.Size, + AllocHandle = allocation.VkHandle, + } + ); + + if (name.Length > 0) + _device.SetDebugName(buffer, name); + + return vkBufferAllocationInfo; + } + + /// + public void FreeAllocation(in BufferAllocationInfo inAllocation) + { + if (inAllocation.AllocationInfo.Memory.IsNull()) + return; // No allocation to free + if (inAllocation.AllocationInfo.Allocator == null) + throw new InvalidOperationException("Tried to free memory but allocator was null. Who allocated this?"); + if (inAllocation.AllocationInfo.Allocator != this) + throw new InvalidOperationException("Allocation was not made from this allocator."); + + this.DestroyBuffer(inAllocation.VkBuffer, new(inAllocation.AllocationInfo.AllocHandle)); + } + + #endregion + + #region Image Allocator + + public ImageAllocationInfo AllocateImage( + in VkImageCreateInfo imageCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + return AllocateImage("", imageCreateInfo, allocateCreateInfo); + } + + /// + public ImageAllocationInfo AllocateImage( + in string name, + in VkImageCreateInfo imageCreateInfo, + in AllocationInfo.CreateInfo allocateCreateInfo + ) + { + var vmaInfo = ConvertInfo(allocateCreateInfo); + var result = this.CreateImage( + imageCreateInfo, + vmaInfo, + out VkImage image, + out VmaAllocation allocation, + out VmaAllocationInfo allocationInfo + ); + + if (result != VkResult.Success) + throw new Exception("Vma Failed to create image"); + + var vkImageAllocationInfo = new ImageAllocationInfo + { + Image = image, + Extent = imageCreateInfo.Extent, + Format = imageCreateInfo.Format, + MipLevels = imageCreateInfo.MipLevels, + ArrayLayers = imageCreateInfo.ArrayLayers, + MemAllocationInfo = new AllocationInfo + { + Allocator = this, + Memory = allocationInfo.DeviceMemory, + MemoryTypeIndex = (int)allocationInfo.MemoryType, + AllocOffset = allocationInfo.Offset, + AllocSize = allocationInfo.Size, + AllocHandle = allocation.VkHandle, + }, + }; + + if (name.Length > 0) + _device.SetDebugName(image, name); + + return vkImageAllocationInfo; + } + + /// + public void FreeAllocation(in ImageAllocationInfo inAllocation) + { + if (inAllocation.MemAllocationInfo.Memory.IsNull()) + return; // No allocation to free + if (inAllocation.MemAllocationInfo.Allocator == null) + throw new InvalidOperationException("Tried to free memory but allocator was null. Who allocated this?"); + if (inAllocation.MemAllocationInfo.Allocator != this) + throw new InvalidOperationException("Allocation was not made from this allocator."); + + this.DestroyImage(inAllocation.Image, new(inAllocation.AllocHandle)); + } + + #endregion + + #region Conversion helpers + + /// + /// Convert an AllocationCreateInfo to a VmaAllocationCreateInfo + /// + /// IVkAllocator's creation info struct + /// Vma creation info struct + private static VmaAllocationCreateInfo ConvertInfo(in AllocationInfo.CreateInfo allocationCreateInfo) + { + VmaAllocationCreateFlags flags = 0; + VmaMemoryUsage usage = VmaMemoryUsage.Auto; + if (allocationCreateInfo.Preference == MemoryPreference.PreferGpu) + usage = VmaMemoryUsage.AutoPreferDevice; + else if (allocationCreateInfo.Preference == MemoryPreference.PreferCpu) + { + usage = VmaMemoryUsage.Auto; + flags |= VmaAllocationCreateFlags.HostAccessRandomBit; + } + + // If the allocation is not host visible, we need to set the flags to allow for VMA to map it + if ( + ( + allocationCreateInfo.RequiredProperties + & (VkMemoryPropertyFlags.HostCoherentBit | VkMemoryPropertyFlags.HostVisibleBit) + ) != 0 + ) + { + flags |= VmaAllocationCreateFlags.HostAccessRandomBit; + } + + var vmaAllocationCreateInfo = new VmaAllocationCreateInfo + { + Usage = usage, + RequiredFlags = allocationCreateInfo.RequiredProperties, + Flags = flags, + PreferredFlags = allocationCreateInfo.PreferredProperties, + Priority = allocationCreateInfo.Priority, + MemoryTypeBits = 0, // Let VMA figure out the memory type bits based on the buffer/image requirements + }; + return vmaAllocationCreateInfo; + } + + #endregion + } +} diff --git a/Brutal.Vulkan.Vma/Manual/VmaDeviceExtensions.cs b/Brutal.Vulkan.Vma/Manual/VmaDeviceExtensions.cs new file mode 100644 index 0000000..c85652a --- /dev/null +++ b/Brutal.Vulkan.Vma/Manual/VmaDeviceExtensions.cs @@ -0,0 +1,53 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.VulkanApi.Vma; + +public static class VmaDeviceExtensions +{ + /// + /// Creates a VmaAllocator object. + /// + /// Fills unset Instance and vkGet*ProcAddr from . + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VmaAllocator CreateVmaAllocator(this Device device, VmaAllocatorCreateInfo pCreateInfo) + { + return new VmaAllocator(device, device.CreateVmaAllocatorHandle(pCreateInfo)); + } + + /// + /// Creates a raw VmaAllocator handle for custom wrappers. Free with vmaDestroyAllocator. + /// + /// Fills unset Instance and vkGet*ProcAddr from . + public static unsafe VmaAllocatorHandle CreateVmaAllocatorHandle( + this Device device, + VmaAllocatorCreateInfo pCreateInfo + ) + { + if (pCreateInfo.Instance.IsNull()) + pCreateInfo.Instance = device.PhysicalDevice.Instance.Handle; + + // VMA copies this + var vulkanFunctions = pCreateInfo.PVulkanFunctions.IsNull() ? default : pCreateInfo.PVulkanFunctions.Value; + if (vulkanFunctions.VkGetInstanceProcAddr.Invoke == null) + vulkanFunctions.VkGetInstanceProcAddr = Vulkan.GetInstanceProcAddr; + if (vulkanFunctions.VkGetDeviceProcAddr.Invoke == null) + vulkanFunctions.VkGetDeviceProcAddr = device.PInvoke.vkGetDeviceProcAddr; + pCreateInfo.PVulkanFunctions = &vulkanFunctions; + + var allocatorHandle = new VmaAllocatorHandle(); + var result = Vma.PInvoke.vmaCreateAllocator(&pCreateInfo, &allocatorHandle); + if (result != VkResult.Success) + throw new Exception("Failed to create VmaAllocator"); + + return allocatorHandle; + } + + /// + /// Destroys a VmaAllocator object. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DestroyVmaAllocator(this Device device, VmaAllocator allocator) + { + Vma.PInvoke.vmaDestroyAllocator(allocator.VkHandle); + } +} diff --git a/Brutal.Vulkan/AssemblyInfo.cs b/Brutal.Vulkan/AssemblyInfo.cs new file mode 100644 index 0000000..825d844 --- /dev/null +++ b/Brutal.Vulkan/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: InternalsVisibleTo("Brutal.Vulkan.Abstractions")] diff --git a/Brutal.Vulkan/BitFields.cs b/Brutal.Vulkan/BitFields.cs new file mode 100644 index 0000000..ede67c7 --- /dev/null +++ b/Brutal.Vulkan/BitFields.cs @@ -0,0 +1,48 @@ +using CommunityToolkit.HighPerformance.Helpers; + +namespace Brutal.VulkanApi; + +// Helper wrappers for bitfield wrapper properties to get/set specific bit ranges within a backing field +internal static class BitFields +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool HasFlag(int target, int bit) + { + return BitHelper.HasFlag((uint)target, bit); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFlag(ref int target, int bit, bool value) + { + BitHelper.SetFlag(ref Unsafe.As(ref target), bit, value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ExtractRange(int target, byte start, byte length) + { + return (int)BitHelper.ExtractRange((uint)target, start, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRange(ref int target, byte start, byte length, int flags) + { + BitHelper.SetRange(ref Unsafe.As(ref target), start, length, (uint)flags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkGeometryInstanceFlagsKHR ExtractRange(VkGeometryInstanceFlagsKHR target, byte start, byte length) + { + return (VkGeometryInstanceFlagsKHR)BitHelper.ExtractRange((uint)target, start, length); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRange( + ref VkGeometryInstanceFlagsKHR target, + byte start, + byte length, + VkGeometryInstanceFlagsKHR flags + ) + { + BitHelper.SetRange(ref Unsafe.As(ref target), start, length, (uint)flags); + } +} diff --git a/Brutal.Vulkan/Generated/Constants/VK.gen.cs b/Brutal.Vulkan/Generated/Constants/VK.gen.cs new file mode 100644 index 0000000..0667bcb --- /dev/null +++ b/Brutal.Vulkan/Generated/Constants/VK.gen.cs @@ -0,0 +1,1081 @@ +namespace Brutal.VulkanApi +{ + public static partial class VK + { + public const int MAX_PHYSICAL_DEVICE_NAME_SIZE = unchecked((int)256U); + public const int UUID_SIZE = unchecked((int)16U); + public const int LUID_SIZE = unchecked((int)8U); + public const int MAX_EXTENSION_NAME_SIZE = unchecked((int)256U); + public const int MAX_DESCRIPTION_SIZE = unchecked((int)256U); + public const int MAX_MEMORY_TYPES = unchecked((int)32U); + public const int MAX_MEMORY_HEAPS = unchecked((int)16U); + public const float LOD_CLAMP_NONE = 1000.0F; + public const int REMAINING_MIP_LEVELS = unchecked((int)(~0U)); + public const int REMAINING_ARRAY_LAYERS = unchecked((int)(~0U)); + public const int REMAINING_3D_SLICES_EXT = unchecked((int)(~0U)); + public const int ATTACHMENT_UNUSED = unchecked((int)(~0U)); + public const int TRUE = unchecked((int)1U); + public const int FALSE = unchecked((int)0U); + public const int QUEUE_FAMILY_IGNORED = unchecked((int)(~0U)); + public const int QUEUE_FAMILY_EXTERNAL = unchecked((int)(~1U)); + public const int QUEUE_FAMILY_FOREIGN_EXT = unchecked((int)(~2U)); + public const int SUBPASS_EXTERNAL = unchecked((int)(~0U)); + public const int MAX_DEVICE_GROUP_SIZE = unchecked((int)32U); + public const int MAX_DRIVER_NAME_SIZE = unchecked((int)256U); + public const int MAX_DRIVER_INFO_SIZE = unchecked((int)256U); + public const int SHADER_UNUSED_KHR = unchecked((int)(~0U)); + public const int MAX_GLOBAL_PRIORITY_SIZE = unchecked((int)16U); + public const int MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT = unchecked((int)32U); + public const int MAX_PIPELINE_BINARY_KEY_SIZE_KHR = unchecked((int)32U); + public const int MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR = unchecked((int)7U); + public const int MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR = unchecked((int)3U); + public const int SHADER_INDEX_UNUSED_AMDX = unchecked((int)(~0U)); + public const int PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV = unchecked((int)(~0U)); + public const int COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_ALIGNMENT_AMDX = unchecked((int)128U); + public const int COMPRESSED_TRIANGLE_FORMAT_DGF1_BYTE_STRIDE_AMDX = unchecked((int)128U); + public const int MAX_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_SET_NAME_SIZE_ARM = unchecked((int)128U); + public const int DATA_GRAPH_MODEL_TOOLCHAIN_VERSION_LENGTH_QCOM = unchecked((int)3U); + public const float COMPUTE_OCCUPANCY_PRIORITY_LOW_NV = 0.25f; + public const float COMPUTE_OCCUPANCY_PRIORITY_NORMAL_NV = 0.50f; + public const float COMPUTE_OCCUPANCY_PRIORITY_HIGH_NV = 0.75f; + public const int MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM = unchecked((int)128U); + public const int MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM = unchecked((int)4U); + public const int KHR_SURFACE_SPEC_VERSION = 25; + public const string KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"; + public const int KHR_SWAPCHAIN_SPEC_VERSION = 70; + public const string KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"; + public const int KHR_DISPLAY_SPEC_VERSION = 23; + public const string KHR_DISPLAY_EXTENSION_NAME = "VK_KHR_display"; + public const int KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION = 10; + public const string KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_display_swapchain"; + public const int KHR_XLIB_SURFACE_SPEC_VERSION = 6; + public const string KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface"; + public const int KHR_XCB_SURFACE_SPEC_VERSION = 6; + public const string KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface"; + public const int KHR_WAYLAND_SURFACE_SPEC_VERSION = 6; + public const string KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface"; + public const int KHR_ANDROID_SURFACE_SPEC_VERSION = 6; + public const string KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"; + public const int KHR_WIN32_SURFACE_SPEC_VERSION = 6; + public const string KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface"; + public const int EXT_DEBUG_REPORT_SPEC_VERSION = 10; + public const string EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"; + public const int NV_GLSL_SHADER_SPEC_VERSION = 1; + public const string NV_GLSL_SHADER_EXTENSION_NAME = "VK_NV_glsl_shader"; + public const int EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION = 1; + public const string EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME = "VK_EXT_depth_range_unrestricted"; + public const int KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION = 3; + public const string KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME = "VK_KHR_sampler_mirror_clamp_to_edge"; + public const int IMG_FILTER_CUBIC_SPEC_VERSION = 1; + public const string IMG_FILTER_CUBIC_EXTENSION_NAME = "VK_IMG_filter_cubic"; + public const int AMD_RASTERIZATION_ORDER_SPEC_VERSION = 1; + public const string AMD_RASTERIZATION_ORDER_EXTENSION_NAME = "VK_AMD_rasterization_order"; + public const int AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION = 1; + public const string AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME = "VK_AMD_shader_trinary_minmax"; + public const int AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION = 1; + public const string AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME = + "VK_AMD_shader_explicit_vertex_parameter"; + public const int EXT_DEBUG_MARKER_SPEC_VERSION = 4; + public const string EXT_DEBUG_MARKER_EXTENSION_NAME = "VK_EXT_debug_marker"; + public const int KHR_VIDEO_QUEUE_SPEC_VERSION = 8; + public const string KHR_VIDEO_QUEUE_EXTENSION_NAME = "VK_KHR_video_queue"; + public const int KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION = 8; + public const string KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_decode_queue"; + public const int AMD_GCN_SHADER_SPEC_VERSION = 1; + public const string AMD_GCN_SHADER_EXTENSION_NAME = "VK_AMD_gcn_shader"; + public const int NV_DEDICATED_ALLOCATION_SPEC_VERSION = 1; + public const string NV_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_NV_dedicated_allocation"; + public const int EXT_TRANSFORM_FEEDBACK_SPEC_VERSION = 1; + public const string EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback"; + public const int NVX_BINARY_IMPORT_SPEC_VERSION = 2; + public const string NVX_BINARY_IMPORT_EXTENSION_NAME = "VK_NVX_binary_import"; + public const int NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION = 4; + public const string NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME = "VK_NVX_image_view_handle"; + public const int AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION = 2; + public const string AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_AMD_draw_indirect_count"; + public const int AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION = 1; + public const string AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME = "VK_AMD_negative_viewport_height"; + public const int AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION = 2; + public const string AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME = "VK_AMD_gpu_shader_half_float"; + public const int AMD_SHADER_BALLOT_SPEC_VERSION = 1; + public const string AMD_SHADER_BALLOT_EXTENSION_NAME = "VK_AMD_shader_ballot"; + public const int KHR_VIDEO_ENCODE_H264_SPEC_VERSION = 14; + public const string KHR_VIDEO_ENCODE_H264_EXTENSION_NAME = "VK_KHR_video_encode_h264"; + public const int KHR_VIDEO_ENCODE_H265_SPEC_VERSION = 14; + public const string KHR_VIDEO_ENCODE_H265_EXTENSION_NAME = "VK_KHR_video_encode_h265"; + public const int KHR_VIDEO_DECODE_H264_SPEC_VERSION = 9; + public const string KHR_VIDEO_DECODE_H264_EXTENSION_NAME = "VK_KHR_video_decode_h264"; + public const int AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION = 1; + public const string AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME = "VK_AMD_texture_gather_bias_lod"; + public const int AMD_SHADER_INFO_SPEC_VERSION = 1; + public const string AMD_SHADER_INFO_EXTENSION_NAME = "VK_AMD_shader_info"; + public const int KHR_DYNAMIC_RENDERING_SPEC_VERSION = 1; + public const string KHR_DYNAMIC_RENDERING_EXTENSION_NAME = "VK_KHR_dynamic_rendering"; + public const int AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION = 1; + public const string AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME = "VK_AMD_shader_image_load_store_lod"; + public const int NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION = 2; + public const string NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME = "VK_NV_corner_sampled_image"; + public const int KHR_MULTIVIEW_SPEC_VERSION = 1; + public const string KHR_MULTIVIEW_EXTENSION_NAME = "VK_KHR_multiview"; + public const int IMG_FORMAT_PVRTC_SPEC_VERSION = 1; + public const string IMG_FORMAT_PVRTC_EXTENSION_NAME = "VK_IMG_format_pvrtc"; + public const int NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1; + public const string NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"; + public const int NV_EXTERNAL_MEMORY_SPEC_VERSION = 1; + public const string NV_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_NV_external_memory"; + public const int NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1; + public const string NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32"; + public const int NV_WIN32_KEYED_MUTEX_SPEC_VERSION = 2; + public const string NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex"; + public const int KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION = 2; + public const string KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME = + "VK_KHR_get_physical_device_properties2"; + public const int KHR_DEVICE_GROUP_SPEC_VERSION = 4; + public const string KHR_DEVICE_GROUP_EXTENSION_NAME = "VK_KHR_device_group"; + public const int EXT_VALIDATION_FLAGS_SPEC_VERSION = 3; + public const string EXT_VALIDATION_FLAGS_EXTENSION_NAME = "VK_EXT_validation_flags"; + public const int KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION = 1; + public const string KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME = "VK_KHR_shader_draw_parameters"; + public const int EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION = 1; + public const string EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME = "VK_EXT_shader_subgroup_ballot"; + public const int EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION = 1; + public const string EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME = "VK_EXT_shader_subgroup_vote"; + public const int EXT_TEXTURE_COMPRESSION_ASTC_HDR_SPEC_VERSION = 1; + public const string EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME = "VK_EXT_texture_compression_astc_hdr"; + public const int EXT_ASTC_DECODE_MODE_SPEC_VERSION = 1; + public const string EXT_ASTC_DECODE_MODE_EXTENSION_NAME = "VK_EXT_astc_decode_mode"; + public const int EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION = 1; + public const string EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_pipeline_robustness"; + public const int KHR_MAINTENANCE_1_SPEC_VERSION = 2; + public const string KHR_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_maintenance1"; + public const int KHR_MAINTENANCE1_SPEC_VERSION = KHR_MAINTENANCE_1_SPEC_VERSION; + public const string KHR_MAINTENANCE1_EXTENSION_NAME = KHR_MAINTENANCE_1_EXTENSION_NAME; + public const int KHR_DEVICE_GROUP_CREATION_SPEC_VERSION = 1; + public const string KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME = "VK_KHR_device_group_creation"; + public const int MAX_DEVICE_GROUP_SIZE_KHR = MAX_DEVICE_GROUP_SIZE; + public const int KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_memory_capabilities"; + public const int LUID_SIZE_KHR = LUID_SIZE; + public const int KHR_EXTERNAL_MEMORY_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_KHR_external_memory"; + public const long QUEUE_FAMILY_EXTERNAL_KHR = QUEUE_FAMILY_EXTERNAL; + public const int KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"; + public const int KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd"; + public const int KHR_WIN32_KEYED_MUTEX_SPEC_VERSION = 1; + public const string KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex"; + public const int KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME = + "VK_KHR_external_semaphore_capabilities"; + public const int KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_KHR_external_semaphore"; + public const int KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32"; + public const int KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"; + public const int KHR_PUSH_DESCRIPTOR_SPEC_VERSION = 2; + public const string KHR_PUSH_DESCRIPTOR_EXTENSION_NAME = "VK_KHR_push_descriptor"; + public const int EXT_CONDITIONAL_RENDERING_SPEC_VERSION = 2; + public const string EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"; + public const int KHR_SHADER_FLOAT16_INT8_SPEC_VERSION = 1; + public const string KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME = "VK_KHR_shader_float16_int8"; + public const int KHR_16BIT_STORAGE_SPEC_VERSION = 1; + public const string KHR_16BIT_STORAGE_EXTENSION_NAME = "VK_KHR_16bit_storage"; + public const int KHR_INCREMENTAL_PRESENT_SPEC_VERSION = 2; + public const string KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present"; + public const int KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION = 1; + public const string KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME = "VK_KHR_descriptor_update_template"; + public const int NV_CLIP_SPACE_W_SCALING_SPEC_VERSION = 1; + public const string NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME = "VK_NV_clip_space_w_scaling"; + public const int EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION = 1; + public const string EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"; + public const int EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION = 1; + public const string EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display"; + public const int EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION = 1; + public const string EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"; + public const int EXT_DISPLAY_CONTROL_SPEC_VERSION = 1; + public const string EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control"; + public const int GOOGLE_DISPLAY_TIMING_SPEC_VERSION = 1; + public const string GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing"; + public const int NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION = 1; + public const string NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME = "VK_NV_sample_mask_override_coverage"; + public const int NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION = 1; + public const string NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME = "VK_NV_geometry_shader_passthrough"; + public const int NV_VIEWPORT_ARRAY_2_SPEC_VERSION = 1; + public const string NV_VIEWPORT_ARRAY_2_EXTENSION_NAME = "VK_NV_viewport_array2"; + public const int NV_VIEWPORT_ARRAY2_SPEC_VERSION = NV_VIEWPORT_ARRAY_2_SPEC_VERSION; + public const string NV_VIEWPORT_ARRAY2_EXTENSION_NAME = NV_VIEWPORT_ARRAY_2_EXTENSION_NAME; + public const int NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION = 1; + public const string NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes"; + public const int NV_VIEWPORT_SWIZZLE_SPEC_VERSION = 1; + public const string NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"; + public const int EXT_DISCARD_RECTANGLES_SPEC_VERSION = 2; + public const string EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"; + public const int EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION = 1; + public const string EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_conservative_rasterization"; + public const int EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION = 1; + public const string EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME = "VK_EXT_depth_clip_enable"; + public const int EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION = 5; + public const string EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME = "VK_EXT_swapchain_colorspace"; + public const int EXT_HDR_METADATA_SPEC_VERSION = 3; + public const string EXT_HDR_METADATA_EXTENSION_NAME = "VK_EXT_hdr_metadata"; + public const int KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION = 1; + public const string KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME = "VK_KHR_imageless_framebuffer"; + public const int KHR_CREATE_RENDERPASS_2_SPEC_VERSION = 1; + public const string KHR_CREATE_RENDERPASS_2_EXTENSION_NAME = "VK_KHR_create_renderpass2"; + public const int IMG_RELAXED_LINE_RASTERIZATION_SPEC_VERSION = 1; + public const string IMG_RELAXED_LINE_RASTERIZATION_EXTENSION_NAME = "VK_IMG_relaxed_line_rasterization"; + public const int KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION = 1; + public const string KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME = "VK_KHR_shared_presentable_image"; + public const int KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_fence_capabilities"; + public const int KHR_EXTERNAL_FENCE_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_FENCE_EXTENSION_NAME = "VK_KHR_external_fence"; + public const int KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; + public const int KHR_EXTERNAL_FENCE_FD_SPEC_VERSION = 1; + public const string KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd"; + public const int KHR_PERFORMANCE_QUERY_SPEC_VERSION = 1; + public const string KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"; + public const int KHR_MAINTENANCE_2_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_2_EXTENSION_NAME = "VK_KHR_maintenance2"; + public const int KHR_MAINTENANCE2_SPEC_VERSION = KHR_MAINTENANCE_2_SPEC_VERSION; + public const string KHR_MAINTENANCE2_EXTENSION_NAME = KHR_MAINTENANCE_2_EXTENSION_NAME; + public const int KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION = 1; + public const string KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2"; + public const int KHR_VARIABLE_POINTERS_SPEC_VERSION = 1; + public const string KHR_VARIABLE_POINTERS_EXTENSION_NAME = "VK_KHR_variable_pointers"; + public const int KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION = 1; + public const string KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"; + public const int EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION = 1; + public const string EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME = "VK_EXT_external_memory_dma_buf"; + public const int EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION = 1; + public const string EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME = "VK_EXT_queue_family_foreign"; + public const int KHR_DEDICATED_ALLOCATION_SPEC_VERSION = 3; + public const string KHR_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_KHR_dedicated_allocation"; + public const int EXT_DEBUG_UTILS_SPEC_VERSION = 2; + public const string EXT_DEBUG_UTILS_EXTENSION_NAME = "VK_EXT_debug_utils"; + public const int ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION = 5; + public const string ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = + "VK_ANDROID_external_memory_android_hardware_buffer"; + public const int EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION = 2; + public const string EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME = "VK_EXT_sampler_filter_minmax"; + public const int KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION = 1; + public const string KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME = "VK_KHR_storage_buffer_storage_class"; + public const int AMD_GPU_SHADER_INT16_SPEC_VERSION = 2; + public const string AMD_GPU_SHADER_INT16_EXTENSION_NAME = "VK_AMD_gpu_shader_int16"; + public const int AMD_GPA_INTERFACE_SPEC_VERSION = 1; + public const string AMD_GPA_INTERFACE_EXTENSION_NAME = "VK_AMD_gpa_interface"; + public const int EXT_DESCRIPTOR_HEAP_SPEC_VERSION = 1; + public const string EXT_DESCRIPTOR_HEAP_EXTENSION_NAME = "VK_EXT_descriptor_heap"; + public const int AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION = 1; + public const string AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME = "VK_AMD_mixed_attachment_samples"; + public const int AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION = 1; + public const string AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME = "VK_AMD_shader_fragment_mask"; + public const int EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION = 1; + public const string EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME = "VK_EXT_inline_uniform_block"; + public const int EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION = 1; + public const string EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME = "VK_EXT_shader_stencil_export"; + public const int KHR_SHADER_BFLOAT16_SPEC_VERSION = 1; + public const string KHR_SHADER_BFLOAT16_EXTENSION_NAME = "VK_KHR_shader_bfloat16"; + public const int EXT_SAMPLE_LOCATIONS_SPEC_VERSION = 1; + public const string EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"; + public const int KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION = 1; + public const string KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME = "VK_KHR_relaxed_block_layout"; + public const int KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION = 1; + public const string KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME = "VK_KHR_get_memory_requirements2"; + public const int KHR_IMAGE_FORMAT_LIST_SPEC_VERSION = 1; + public const string KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME = "VK_KHR_image_format_list"; + public const int EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION = 2; + public const string EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"; + public const int NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION = 1; + public const string NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME = "VK_NV_fragment_coverage_to_color"; + public const int KHR_ACCELERATION_STRUCTURE_SPEC_VERSION = 13; + public const string KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"; + public const int KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1; + public const string KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"; + public const int KHR_RAY_QUERY_SPEC_VERSION = 1; + public const string KHR_RAY_QUERY_EXTENSION_NAME = "VK_KHR_ray_query"; + public const int NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION = 1; + public const string NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"; + public const int NV_FILL_RECTANGLE_SPEC_VERSION = 1; + public const string NV_FILL_RECTANGLE_EXTENSION_NAME = "VK_NV_fill_rectangle"; + public const int NV_SHADER_SM_BUILTINS_SPEC_VERSION = 1; + public const string NV_SHADER_SM_BUILTINS_EXTENSION_NAME = "VK_NV_shader_sm_builtins"; + public const int EXT_POST_DEPTH_COVERAGE_SPEC_VERSION = 1; + public const string EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME = "VK_EXT_post_depth_coverage"; + public const int KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION = 14; + public const string KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME = "VK_KHR_sampler_ycbcr_conversion"; + public const int KHR_BIND_MEMORY_2_SPEC_VERSION = 1; + public const string KHR_BIND_MEMORY_2_EXTENSION_NAME = "VK_KHR_bind_memory2"; + public const int EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION = 2; + public const string EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME = "VK_EXT_image_drm_format_modifier"; + public const int EXT_VALIDATION_CACHE_SPEC_VERSION = 1; + public const string EXT_VALIDATION_CACHE_EXTENSION_NAME = "VK_EXT_validation_cache"; + public const int EXT_DESCRIPTOR_INDEXING_SPEC_VERSION = 2; + public const string EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME = "VK_EXT_descriptor_indexing"; + public const int EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION = 1; + public const string EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME = "VK_EXT_shader_viewport_index_layer"; + public const int KHR_PORTABILITY_SUBSET_SPEC_VERSION = 1; + public const string KHR_PORTABILITY_SUBSET_EXTENSION_NAME = "VK_KHR_portability_subset"; + public const int NV_SHADING_RATE_IMAGE_SPEC_VERSION = 3; + public const string NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image"; + public const int NV_RAY_TRACING_SPEC_VERSION = 3; + public const string NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"; + public const int SHADER_UNUSED_NV = SHADER_UNUSED_KHR; + public const int NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION = 2; + public const string NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"; + public const int KHR_MAINTENANCE_3_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_3_EXTENSION_NAME = "VK_KHR_maintenance3"; + public const int KHR_MAINTENANCE3_SPEC_VERSION = KHR_MAINTENANCE_3_SPEC_VERSION; + public const string KHR_MAINTENANCE3_EXTENSION_NAME = KHR_MAINTENANCE_3_EXTENSION_NAME; + public const int KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION = 1; + public const string KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_KHR_draw_indirect_count"; + public const int EXT_FILTER_CUBIC_SPEC_VERSION = 3; + public const string EXT_FILTER_CUBIC_EXTENSION_NAME = "VK_EXT_filter_cubic"; + public const int QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION = 4; + public const string QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME = "VK_QCOM_render_pass_shader_resolve"; + public const int QCOM_COOPERATIVE_MATRIX_CONVERSION_SPEC_VERSION = 1; + public const string QCOM_COOPERATIVE_MATRIX_CONVERSION_EXTENSION_NAME = "VK_QCOM_cooperative_matrix_conversion"; + public const int QCOM_ELAPSED_TIMER_QUERY_SPEC_VERSION = 1; + public const string QCOM_ELAPSED_TIMER_QUERY_EXTENSION_NAME = "VK_QCOM_elapsed_timer_query"; + public const int EXT_GLOBAL_PRIORITY_SPEC_VERSION = 2; + public const string EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"; + public const int KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION = 1; + public const string KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME = "VK_KHR_shader_subgroup_extended_types"; + public const int KHR_8BIT_STORAGE_SPEC_VERSION = 1; + public const string KHR_8BIT_STORAGE_EXTENSION_NAME = "VK_KHR_8bit_storage"; + public const int EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION = 1; + public const string EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME = "VK_EXT_external_memory_host"; + public const int AMD_BUFFER_MARKER_SPEC_VERSION = 1; + public const string AMD_BUFFER_MARKER_EXTENSION_NAME = "VK_AMD_buffer_marker"; + public const int KHR_SHADER_ATOMIC_INT64_SPEC_VERSION = 1; + public const string KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME = "VK_KHR_shader_atomic_int64"; + public const int KHR_SHADER_CLOCK_SPEC_VERSION = 1; + public const string KHR_SHADER_CLOCK_EXTENSION_NAME = "VK_KHR_shader_clock"; + public const int AMD_PIPELINE_COMPILER_CONTROL_SPEC_VERSION = 1; + public const string AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME = "VK_AMD_pipeline_compiler_control"; + public const int EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION = 2; + public const string EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_EXT_calibrated_timestamps"; + public const int AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION = 2; + public const string AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"; + public const int KHR_VIDEO_DECODE_H265_SPEC_VERSION = 8; + public const string KHR_VIDEO_DECODE_H265_EXTENSION_NAME = "VK_KHR_video_decode_h265"; + public const int KHR_GLOBAL_PRIORITY_SPEC_VERSION = 1; + public const string KHR_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_KHR_global_priority"; + public const int MAX_GLOBAL_PRIORITY_SIZE_KHR = MAX_GLOBAL_PRIORITY_SIZE; + public const int AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION = 1; + public const string AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"; + public const int EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION = 3; + public const string EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_EXT_vertex_attribute_divisor"; + public const int EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION = 1; + public const string EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME = "VK_EXT_pipeline_creation_feedback"; + public const int KHR_DRIVER_PROPERTIES_SPEC_VERSION = 1; + public const string KHR_DRIVER_PROPERTIES_EXTENSION_NAME = "VK_KHR_driver_properties"; + public const int MAX_DRIVER_NAME_SIZE_KHR = MAX_DRIVER_NAME_SIZE; + public const int MAX_DRIVER_INFO_SIZE_KHR = MAX_DRIVER_INFO_SIZE; + public const int KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION = 4; + public const string KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME = "VK_KHR_shader_float_controls"; + public const int NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION = 1; + public const string NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_NV_shader_subgroup_partitioned"; + public const int KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION = 1; + public const string KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME = "VK_KHR_depth_stencil_resolve"; + public const int KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION = 1; + public const string KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME = "VK_KHR_swapchain_mutable_format"; + public const int NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION = 1; + public const string NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_NV_compute_shader_derivatives"; + public const int NV_MESH_SHADER_SPEC_VERSION = 1; + public const string NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader"; + public const int NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1; + public const string NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_NV_fragment_shader_barycentric"; + public const int NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION = 2; + public const string NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME = "VK_NV_shader_image_footprint"; + public const int NV_SCISSOR_EXCLUSIVE_SPEC_VERSION = 2; + public const string NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME = "VK_NV_scissor_exclusive"; + public const int NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION = 2; + public const string NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME = "VK_NV_device_diagnostic_checkpoints"; + public const int KHR_TIMELINE_SEMAPHORE_SPEC_VERSION = 2; + public const string KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME = "VK_KHR_timeline_semaphore"; + public const int EXT_PRESENT_TIMING_SPEC_VERSION = 3; + public const string EXT_PRESENT_TIMING_EXTENSION_NAME = "VK_EXT_present_timing"; + public const int INTEL_SHADER_INTEGER_FUNCTIONS_2_SPEC_VERSION = 1; + public const string INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME = "VK_INTEL_shader_integer_functions2"; + public const int INTEL_PERFORMANCE_QUERY_SPEC_VERSION = 2; + public const string INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query"; + public const int KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION = 3; + public const string KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME = "VK_KHR_vulkan_memory_model"; + public const int EXT_PCI_BUS_INFO_SPEC_VERSION = 2; + public const string EXT_PCI_BUS_INFO_EXTENSION_NAME = "VK_EXT_pci_bus_info"; + public const int AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION = 1; + public const string AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME = "VK_AMD_display_native_hdr"; + public const int KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION = 1; + public const string KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME = "VK_KHR_shader_terminate_invocation"; + public const int EXT_METAL_SURFACE_SPEC_VERSION = 1; + public const string EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface"; + public const int EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION = 3; + public const string EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"; + public const int EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION = 1; + public const string EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME = "VK_EXT_scalar_block_layout"; + public const int GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION = 1; + public const string GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME = "VK_GOOGLE_hlsl_functionality1"; + public const int GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION = GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION; + public const string GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME = GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME; + public const int GOOGLE_DECORATE_STRING_SPEC_VERSION = 1; + public const string GOOGLE_DECORATE_STRING_EXTENSION_NAME = "VK_GOOGLE_decorate_string"; + public const int EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION = 2; + public const string EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME = "VK_EXT_subgroup_size_control"; + public const int KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 2; + public const string KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"; + public const int AMD_SHADER_CORE_PROPERTIES_2_SPEC_VERSION = 1; + public const string AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME = "VK_AMD_shader_core_properties2"; + public const int AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION = 1; + public const string AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME = "VK_AMD_device_coherent_memory"; + public const int KHR_SHADER_CONSTANT_DATA_SPEC_VERSION = 1; + public const string KHR_SHADER_CONSTANT_DATA_EXTENSION_NAME = "VK_KHR_shader_constant_data"; + public const int KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION = 1; + public const string KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME = "VK_KHR_dynamic_rendering_local_read"; + public const int KHR_SHADER_ABORT_SPEC_VERSION = 1; + public const string KHR_SHADER_ABORT_EXTENSION_NAME = "VK_KHR_shader_abort"; + public const int EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION = 1; + public const string EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"; + public const int KHR_SHADER_QUAD_CONTROL_SPEC_VERSION = 1; + public const string KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME = "VK_KHR_shader_quad_control"; + public const int KHR_SPIRV_1_4_SPEC_VERSION = 1; + public const string KHR_SPIRV_1_4_EXTENSION_NAME = "VK_KHR_spirv_1_4"; + public const int EXT_MEMORY_BUDGET_SPEC_VERSION = 1; + public const string EXT_MEMORY_BUDGET_EXTENSION_NAME = "VK_EXT_memory_budget"; + public const int EXT_MEMORY_PRIORITY_SPEC_VERSION = 1; + public const string EXT_MEMORY_PRIORITY_EXTENSION_NAME = "VK_EXT_memory_priority"; + public const int KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION = 1; + public const string KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME = "VK_KHR_surface_protected_capabilities"; + public const int NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION = 1; + public const string NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME = + "VK_NV_dedicated_allocation_image_aliasing"; + public const int KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION = 1; + public const string KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME = "VK_KHR_separate_depth_stencil_layouts"; + public const int EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION = 2; + public const string EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"; + public const int EXT_TOOLING_INFO_SPEC_VERSION = 1; + public const string EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"; + public const int EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION = 1; + public const string EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME = "VK_EXT_separate_stencil_usage"; + public const int EXT_VALIDATION_FEATURES_SPEC_VERSION = 6; + public const string EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"; + public const int KHR_PRESENT_WAIT_SPEC_VERSION = 1; + public const string KHR_PRESENT_WAIT_EXTENSION_NAME = "VK_KHR_present_wait"; + public const int NV_COOPERATIVE_MATRIX_SPEC_VERSION = 1; + public const string NV_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_NV_cooperative_matrix"; + public const int NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION = 1; + public const string NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME = "VK_NV_coverage_reduction_mode"; + public const int EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION = 1; + public const string EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"; + public const int EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION = 1; + public const string EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME = "VK_EXT_ycbcr_image_arrays"; + public const int KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION = 1; + public const string KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME = "VK_KHR_uniform_buffer_standard_layout"; + public const int EXT_PROVOKING_VERTEX_SPEC_VERSION = 1; + public const string EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"; + public const int EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION = 4; + public const string EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive"; + public const int EXT_HEADLESS_SURFACE_SPEC_VERSION = 1; + public const string EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"; + public const int KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION = 1; + public const string KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_KHR_buffer_device_address"; + public const int EXT_LINE_RASTERIZATION_SPEC_VERSION = 1; + public const string EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization"; + public const int EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION = 1; + public const string EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME = "VK_EXT_shader_atomic_float"; + public const int EXT_HOST_QUERY_RESET_SPEC_VERSION = 1; + public const string EXT_HOST_QUERY_RESET_EXTENSION_NAME = "VK_EXT_host_query_reset"; + public const int EXT_INDEX_TYPE_UINT8_SPEC_VERSION = 1; + public const string EXT_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_EXT_index_type_uint8"; + public const int EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION = 1; + public const string EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_extended_dynamic_state"; + public const int KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION = 4; + public const string KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME = "VK_KHR_deferred_host_operations"; + public const int KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION = 1; + public const string KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME = "VK_KHR_pipeline_executable_properties"; + public const int EXT_HOST_IMAGE_COPY_SPEC_VERSION = 1; + public const string EXT_HOST_IMAGE_COPY_EXTENSION_NAME = "VK_EXT_host_image_copy"; + public const int KHR_MAP_MEMORY_2_SPEC_VERSION = 1; + public const string KHR_MAP_MEMORY_2_EXTENSION_NAME = "VK_KHR_map_memory2"; + public const int EXT_MAP_MEMORY_PLACED_SPEC_VERSION = 1; + public const string EXT_MAP_MEMORY_PLACED_EXTENSION_NAME = "VK_EXT_map_memory_placed"; + public const int EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION = 1; + public const string EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"; + public const int EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION = 1; + public const string EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_surface_maintenance1"; + public const int EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION = 1; + public const string EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_swapchain_maintenance1"; + public const int EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION = 1; + public const string EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME = + "VK_EXT_shader_demote_to_helper_invocation"; + public const int NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3; + public const string NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"; + public const int NV_INHERITED_VIEWPORT_SCISSOR_SPEC_VERSION = 1; + public const string NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME = "VK_NV_inherited_viewport_scissor"; + public const int KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION = 1; + public const string KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME = "VK_KHR_shader_integer_dot_product"; + public const int EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION = 1; + public const string EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"; + public const int QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION = 5; + public const string QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME = "VK_QCOM_render_pass_transform"; + public const int EXT_DEPTH_BIAS_CONTROL_SPEC_VERSION = 1; + public const string EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME = "VK_EXT_depth_bias_control"; + public const int EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION = 2; + public const string EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME = "VK_EXT_device_memory_report"; + public const int EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION = 1; + public const string EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_drm_display"; + public const int EXT_ROBUSTNESS_2_SPEC_VERSION = 1; + public const string EXT_ROBUSTNESS_2_EXTENSION_NAME = "VK_EXT_robustness2"; + public const int EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION = 12; + public const string EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"; + public const int EXT_TEXTURE_COMPRESSION_ASTC_3D_SPEC_VERSION = 1; + public const string EXT_TEXTURE_COMPRESSION_ASTC_3D_EXTENSION_NAME = "VK_EXT_texture_compression_astc_3d"; + public const int GOOGLE_USER_TYPE_SPEC_VERSION = 1; + public const string GOOGLE_USER_TYPE_EXTENSION_NAME = "VK_GOOGLE_user_type"; + public const int KHR_PIPELINE_LIBRARY_SPEC_VERSION = 1; + public const string KHR_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_KHR_pipeline_library"; + public const int NV_PRESENT_BARRIER_SPEC_VERSION = 1; + public const string NV_PRESENT_BARRIER_EXTENSION_NAME = "VK_NV_present_barrier"; + public const int KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION = 1; + public const string KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME = "VK_KHR_shader_non_semantic_info"; + public const int KHR_PRESENT_ID_SPEC_VERSION = 1; + public const string KHR_PRESENT_ID_EXTENSION_NAME = "VK_KHR_present_id"; + public const int EXT_PRIVATE_DATA_SPEC_VERSION = 1; + public const string EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"; + public const int EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION = 3; + public const string EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME = + "VK_EXT_pipeline_creation_cache_control"; + public const int KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION = 12; + public const string KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_encode_queue"; + public const int NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION = 2; + public const string NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME = "VK_NV_device_diagnostics_config"; + public const int QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION = 2; + public const string QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME = "VK_QCOM_render_pass_store_ops"; + public const int QCOM_QUEUE_PERF_HINT_SPEC_VERSION = 1; + public const string QCOM_QUEUE_PERF_HINT_EXTENSION_NAME = "VK_QCOM_queue_perf_hint"; + public const int QCOM_IMAGE_PROCESSING_3_SPEC_VERSION = 1; + public const string QCOM_IMAGE_PROCESSING_3_EXTENSION_NAME = "VK_QCOM_image_processing3"; + public const int QCOM_SHADER_MULTIPLE_WAIT_QUEUES_SPEC_VERSION = 1; + public const string QCOM_SHADER_MULTIPLE_WAIT_QUEUES_EXTENSION_NAME = "VK_QCOM_shader_multiple_wait_queues"; + public const int EXT_SHADER_SPLIT_BARRIER_SPEC_VERSION = 1; + public const string EXT_SHADER_SPLIT_BARRIER_EXTENSION_NAME = "VK_EXT_shader_split_barrier"; + public const int QCOM_TILE_SHADING_SPEC_VERSION = 2; + public const string QCOM_TILE_SHADING_EXTENSION_NAME = "VK_QCOM_tile_shading"; + public const int NV_LOW_LATENCY_SPEC_VERSION = 2; + public const string NV_LOW_LATENCY_EXTENSION_NAME = "VK_NV_low_latency"; + public const int EXT_METAL_OBJECTS_SPEC_VERSION = 2; + public const string EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"; + public const int KHR_SYNCHRONIZATION_2_SPEC_VERSION = 1; + public const string KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"; + public const int EXT_DESCRIPTOR_BUFFER_SPEC_VERSION = 1; + public const string EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"; + public const int KHR_DEVICE_ADDRESS_COMMANDS_SPEC_VERSION = 1; + public const string KHR_DEVICE_ADDRESS_COMMANDS_EXTENSION_NAME = "VK_KHR_device_address_commands"; + public const int EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION = 1; + public const string EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_EXT_graphics_pipeline_library"; + public const int AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_SPEC_VERSION = 1; + public const string AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME = + "VK_AMD_shader_early_and_late_fragment_tests"; + public const int KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1; + public const string KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"; + public const int KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_SPEC_VERSION = 1; + public const string KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME = + "VK_KHR_shader_subgroup_uniform_control_flow"; + public const int KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_SPEC_VERSION = 1; + public const string KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME = + "VK_KHR_zero_initialize_workgroup_memory"; + public const int NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION = 1; + public const string NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"; + public const int NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION = 1; + public const string NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"; + public const int EXT_MESH_SHADER_SPEC_VERSION = 1; + public const string EXT_MESH_SHADER_EXTENSION_NAME = "VK_EXT_mesh_shader"; + public const int EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION = 1; + public const string EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"; + public const int EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION = 1; + public const string EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME = "VK_EXT_fragment_density_map2"; + public const int QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION = 2; + public const string QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"; + public const int EXT_IMAGE_ROBUSTNESS_SPEC_VERSION = 1; + public const string EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_image_robustness"; + public const int KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_SPEC_VERSION = 1; + public const string KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME = + "VK_KHR_workgroup_memory_explicit_layout"; + public const int KHR_COPY_COMMANDS_2_SPEC_VERSION = 1; + public const string KHR_COPY_COMMANDS_2_EXTENSION_NAME = "VK_KHR_copy_commands2"; + public const int EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION = 1; + public const string EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control"; + public const int EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_SPEC_VERSION = 2; + public const string EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME = + "VK_EXT_attachment_feedback_loop_layout"; + public const int EXT_4444_FORMATS_SPEC_VERSION = 1; + public const string EXT_4444_FORMATS_EXTENSION_NAME = "VK_EXT_4444_formats"; + public const int EXT_DEVICE_FAULT_SPEC_VERSION = 2; + public const string EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"; + public const int ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION = 1; + public const string ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = + "VK_ARM_rasterization_order_attachment_access"; + public const int EXT_RGBA10X6_FORMATS_SPEC_VERSION = 1; + public const string EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"; + public const int NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION = 1; + public const string NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; + public const int VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION = 1; + public const string VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_VALVE_mutable_descriptor_type"; + public const int EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION = 2; + public const string EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_vertex_input_dynamic_state"; + public const int EXT_PHYSICAL_DEVICE_DRM_SPEC_VERSION = 1; + public const string EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME = "VK_EXT_physical_device_drm"; + public const int EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION = 1; + public const string EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"; + public const int EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION = 1; + public const string EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"; + public const int EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_SPEC_VERSION = 1; + public const string EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME = + "VK_EXT_primitive_topology_list_restart"; + public const int KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION = 2; + public const string KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME = "VK_KHR_format_feature_flags2"; + public const int EXT_PRESENT_MODE_FIFO_LATEST_READY_SPEC_VERSION = 1; + public const string EXT_PRESENT_MODE_FIFO_LATEST_READY_EXTENSION_NAME = "VK_EXT_present_mode_fifo_latest_ready"; + public const int HUAWEI_SUBPASS_SHADING_SPEC_VERSION = 3; + public const string HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading"; + public const int HUAWEI_INVOCATION_MASK_SPEC_VERSION = 1; + public const string HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask"; + public const int NV_EXTERNAL_MEMORY_RDMA_SPEC_VERSION = 1; + public const string NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME = "VK_NV_external_memory_rdma"; + public const int EXT_PIPELINE_PROPERTIES_SPEC_VERSION = 1; + public const string EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"; + public const int EXT_FRAME_BOUNDARY_SPEC_VERSION = 1; + public const string EXT_FRAME_BOUNDARY_EXTENSION_NAME = "VK_EXT_frame_boundary"; + public const int EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION = 1; + public const string EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = + "VK_EXT_multisampled_render_to_single_sampled"; + public const int EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION = 1; + public const string EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"; + public const int EXT_COLOR_WRITE_ENABLE_SPEC_VERSION = 1; + public const string EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable"; + public const int EXT_PRIMITIVES_GENERATED_QUERY_SPEC_VERSION = 1; + public const string EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME = "VK_EXT_primitives_generated_query"; + public const int KHR_RAY_TRACING_MAINTENANCE_1_SPEC_VERSION = 1; + public const string KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_ray_tracing_maintenance1"; + public const int KHR_SHADER_UNTYPED_POINTERS_SPEC_VERSION = 1; + public const string KHR_SHADER_UNTYPED_POINTERS_EXTENSION_NAME = "VK_KHR_shader_untyped_pointers"; + public const int EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION = 1; + public const string EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME = "VK_EXT_global_priority_query"; + public const int MAX_GLOBAL_PRIORITY_SIZE_EXT = MAX_GLOBAL_PRIORITY_SIZE; + public const int VALVE_VIDEO_ENCODE_RGB_CONVERSION_SPEC_VERSION = 1; + public const string VALVE_VIDEO_ENCODE_RGB_CONVERSION_EXTENSION_NAME = "VK_VALVE_video_encode_rgb_conversion"; + public const int EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION = 1; + public const string EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME = "VK_EXT_image_view_min_lod"; + public const int EXT_MULTI_DRAW_SPEC_VERSION = 1; + public const string EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw"; + public const int EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION = 1; + public const string EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"; + public const int KHR_PORTABILITY_ENUMERATION_SPEC_VERSION = 1; + public const string KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME = "VK_KHR_portability_enumeration"; + public const int EXT_SHADER_TILE_IMAGE_SPEC_VERSION = 1; + public const string EXT_SHADER_TILE_IMAGE_EXTENSION_NAME = "VK_EXT_shader_tile_image"; + public const int EXT_OPACITY_MICROMAP_SPEC_VERSION = 2; + public const string EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap"; + public const int EXT_LOAD_STORE_OP_NONE_SPEC_VERSION = 1; + public const string EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_EXT_load_store_op_none"; + public const int HUAWEI_CLUSTER_CULLING_SHADER_SPEC_VERSION = 3; + public const string HUAWEI_CLUSTER_CULLING_SHADER_EXTENSION_NAME = "VK_HUAWEI_cluster_culling_shader"; + public const int EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION = 1; + public const string EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME = "VK_EXT_border_color_swizzle"; + public const int EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_SPEC_VERSION = 1; + public const string EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME = "VK_EXT_pageable_device_local_memory"; + public const int KHR_MAINTENANCE_4_SPEC_VERSION = 2; + public const string KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"; + public const int ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION = 1; + public const string ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_ARM_shader_core_properties"; + public const int KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION = 2; + public const string KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME = "VK_KHR_shader_subgroup_rotate"; + public const int ARM_SCHEDULING_CONTROLS_SPEC_VERSION = 2; + public const string ARM_SCHEDULING_CONTROLS_EXTENSION_NAME = "VK_ARM_scheduling_controls"; + public const int EXT_IMAGE_SLICED_VIEW_OF_3D_SPEC_VERSION = 1; + public const string EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_sliced_view_of_3d"; + public const int VALVE_DESCRIPTOR_SET_HOST_MAPPING_SPEC_VERSION = 1; + public const string VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME = "VK_VALVE_descriptor_set_host_mapping"; + public const int EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION = 1; + public const string EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME = "VK_EXT_depth_clamp_zero_one"; + public const int EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION = 1; + public const string EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME = "VK_EXT_non_seamless_cube_map"; + public const int ARM_RENDER_PASS_STRIPED_SPEC_VERSION = 1; + public const string ARM_RENDER_PASS_STRIPED_EXTENSION_NAME = "VK_ARM_render_pass_striped"; + public const int QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION = 3; + public const string QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME = "VK_QCOM_fragment_density_map_offset"; + public const int NV_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1; + public const string NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect"; + public const int NV_MEMORY_DECOMPRESSION_SPEC_VERSION = 1; + public const string NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"; + public const int NV_DEVICE_GENERATED_COMMANDS_COMPUTE_SPEC_VERSION = 2; + public const string NV_DEVICE_GENERATED_COMMANDS_COMPUTE_EXTENSION_NAME = + "VK_NV_device_generated_commands_compute"; + public const int NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_SPEC_VERSION = 1; + public const string NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_EXTENSION_NAME = + "VK_NV_ray_tracing_linear_swept_spheres"; + public const int NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION = 1; + public const string NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME = "VK_NV_linear_color_attachment"; + public const int GOOGLE_SURFACELESS_QUERY_SPEC_VERSION = 2; + public const string GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME = "VK_GOOGLE_surfaceless_query"; + public const int KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION = 1; + public const string KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME = "VK_KHR_shader_maximal_reconvergence"; + public const int EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_SPEC_VERSION = 1; + public const string EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME = + "VK_EXT_image_compression_control_swapchain"; + public const int QCOM_IMAGE_PROCESSING_SPEC_VERSION = 1; + public const string QCOM_IMAGE_PROCESSING_EXTENSION_NAME = "VK_QCOM_image_processing"; + public const int EXT_NESTED_COMMAND_BUFFER_SPEC_VERSION = 1; + public const string EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME = "VK_EXT_nested_command_buffer"; + public const int EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_SPEC_VERSION = 1; + public const string EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME = + "VK_EXT_external_memory_acquire_unmodified"; + public const int EXT_EXTENDED_DYNAMIC_STATE_3_SPEC_VERSION = 2; + public const string EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME = "VK_EXT_extended_dynamic_state3"; + public const int EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION = 2; + public const string EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"; + public const int LUNARG_DIRECT_DRIVER_LOADING_SPEC_VERSION = 1; + public const string LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME = "VK_LUNARG_direct_driver_loading"; + public const int ARM_TENSORS_SPEC_VERSION = 2; + public const string ARM_TENSORS_EXTENSION_NAME = "VK_ARM_tensors"; + public const int EXT_SHADER_MODULE_IDENTIFIER_SPEC_VERSION = 1; + public const string EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME = "VK_EXT_shader_module_identifier"; + public const int EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION = 1; + public const string EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = + "VK_EXT_rasterization_order_attachment_access"; + public const int NV_OPTICAL_FLOW_SPEC_VERSION = 1; + public const string NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"; + public const int EXT_LEGACY_DITHERING_SPEC_VERSION = 2; + public const string EXT_LEGACY_DITHERING_EXTENSION_NAME = "VK_EXT_legacy_dithering"; + public const int EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION = 1; + public const string EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME = "VK_EXT_pipeline_protected_access"; + public const int ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION = 1; + public const string ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME = "VK_ANDROID_external_format_resolve"; + public const int KHR_MAINTENANCE_5_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_5_EXTENSION_NAME = "VK_KHR_maintenance5"; + public const int AMD_ANTI_LAG_SPEC_VERSION = 1; + public const string AMD_ANTI_LAG_EXTENSION_NAME = "VK_AMD_anti_lag"; + public const int KHR_PRESENT_ID_2_SPEC_VERSION = 1; + public const string KHR_PRESENT_ID_2_EXTENSION_NAME = "VK_KHR_present_id2"; + public const int KHR_PRESENT_WAIT_2_SPEC_VERSION = 1; + public const string KHR_PRESENT_WAIT_2_EXTENSION_NAME = "VK_KHR_present_wait2"; + public const int KHR_RAY_TRACING_POSITION_FETCH_SPEC_VERSION = 1; + public const string KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME = "VK_KHR_ray_tracing_position_fetch"; + public const int EXT_SHADER_OBJECT_SPEC_VERSION = 1; + public const string EXT_SHADER_OBJECT_EXTENSION_NAME = "VK_EXT_shader_object"; + public const int KHR_PIPELINE_BINARY_SPEC_VERSION = 1; + public const string KHR_PIPELINE_BINARY_EXTENSION_NAME = "VK_KHR_pipeline_binary"; + public const int QCOM_TILE_PROPERTIES_SPEC_VERSION = 1; + public const string QCOM_TILE_PROPERTIES_EXTENSION_NAME = "VK_QCOM_tile_properties"; + public const int SEC_AMIGO_PROFILING_SPEC_VERSION = 1; + public const string SEC_AMIGO_PROFILING_EXTENSION_NAME = "VK_SEC_amigo_profiling"; + public const int KHR_SURFACE_MAINTENANCE_1_SPEC_VERSION = 1; + public const string KHR_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_surface_maintenance1"; + public const int KHR_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION = 1; + public const string KHR_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_swapchain_maintenance1"; + public const int QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_SPEC_VERSION = 1; + public const string QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME = "VK_QCOM_multiview_per_view_viewports"; + public const int NV_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION = 1; + public const string NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME = "VK_NV_ray_tracing_invocation_reorder"; + public const int NV_COOPERATIVE_VECTOR_SPEC_VERSION = 4; + public const string NV_COOPERATIVE_VECTOR_EXTENSION_NAME = "VK_NV_cooperative_vector"; + public const int NV_EXTENDED_SPARSE_ADDRESS_SPACE_SPEC_VERSION = 1; + public const string NV_EXTENDED_SPARSE_ADDRESS_SPACE_EXTENSION_NAME = "VK_NV_extended_sparse_address_space"; + public const int EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION = 1; + public const string EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_EXT_mutable_descriptor_type"; + public const int EXT_LEGACY_VERTEX_ATTRIBUTES_SPEC_VERSION = 1; + public const string EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME = "VK_EXT_legacy_vertex_attributes"; + public const int EXT_LAYER_SETTINGS_SPEC_VERSION = 2; + public const string EXT_LAYER_SETTINGS_EXTENSION_NAME = "VK_EXT_layer_settings"; + public const int ARM_SHADER_CORE_BUILTINS_SPEC_VERSION = 2; + public const string ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME = "VK_ARM_shader_core_builtins"; + public const int EXT_PIPELINE_LIBRARY_GROUP_HANDLES_SPEC_VERSION = 1; + public const string EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME = "VK_EXT_pipeline_library_group_handles"; + public const int EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_SPEC_VERSION = 1; + public const string EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME = + "VK_EXT_dynamic_rendering_unused_attachments"; + public const int KHR_INTERNALLY_SYNCHRONIZED_QUEUES_SPEC_VERSION = 1; + public const string KHR_INTERNALLY_SYNCHRONIZED_QUEUES_EXTENSION_NAME = "VK_KHR_internally_synchronized_queues"; + public const int NV_LOW_LATENCY_2_SPEC_VERSION = 2; + public const string NV_LOW_LATENCY_2_EXTENSION_NAME = "VK_NV_low_latency2"; + public const int KHR_COOPERATIVE_MATRIX_SPEC_VERSION = 2; + public const string KHR_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_KHR_cooperative_matrix"; + public const int ARM_DATA_GRAPH_SPEC_VERSION = 1; + public const string ARM_DATA_GRAPH_EXTENSION_NAME = "VK_ARM_data_graph"; + public const int ARM_DATA_GRAPH_INSTRUCTION_SET_TOSA_SPEC_VERSION = 1; + public const string ARM_DATA_GRAPH_INSTRUCTION_SET_TOSA_EXTENSION_NAME = + "VK_ARM_data_graph_instruction_set_tosa"; + public const int QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_SPEC_VERSION = 1; + public const string QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_EXTENSION_NAME = + "VK_QCOM_multiview_per_view_render_areas"; + public const int KHR_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION = 1; + public const string KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_KHR_compute_shader_derivatives"; + public const int KHR_VIDEO_DECODE_AV1_SPEC_VERSION = 1; + public const string KHR_VIDEO_DECODE_AV1_EXTENSION_NAME = "VK_KHR_video_decode_av1"; + public const int KHR_VIDEO_ENCODE_AV1_SPEC_VERSION = 1; + public const string KHR_VIDEO_ENCODE_AV1_EXTENSION_NAME = "VK_KHR_video_encode_av1"; + public const int KHR_VIDEO_DECODE_VP9_SPEC_VERSION = 1; + public const string KHR_VIDEO_DECODE_VP9_EXTENSION_NAME = "VK_KHR_video_decode_vp9"; + public const int KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION = 1; + public const string KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_video_maintenance1"; + public const int NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION = 1; + public const string NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME = "VK_NV_per_stage_descriptor_set"; + public const int QCOM_IMAGE_PROCESSING_2_SPEC_VERSION = 1; + public const string QCOM_IMAGE_PROCESSING_2_EXTENSION_NAME = "VK_QCOM_image_processing2"; + public const int QCOM_FILTER_CUBIC_WEIGHTS_SPEC_VERSION = 1; + public const string QCOM_FILTER_CUBIC_WEIGHTS_EXTENSION_NAME = "VK_QCOM_filter_cubic_weights"; + public const int QCOM_YCBCR_DEGAMMA_SPEC_VERSION = 1; + public const string QCOM_YCBCR_DEGAMMA_EXTENSION_NAME = "VK_QCOM_ycbcr_degamma"; + public const int QCOM_FILTER_CUBIC_CLAMP_SPEC_VERSION = 1; + public const string QCOM_FILTER_CUBIC_CLAMP_EXTENSION_NAME = "VK_QCOM_filter_cubic_clamp"; + public const int EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_SPEC_VERSION = 1; + public const string EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME = + "VK_EXT_attachment_feedback_loop_dynamic_state"; + public const int KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION = 1; + public const string KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_KHR_vertex_attribute_divisor"; + public const int KHR_LOAD_STORE_OP_NONE_SPEC_VERSION = 1; + public const string KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_KHR_load_store_op_none"; + public const int KHR_UNIFIED_IMAGE_LAYOUTS_SPEC_VERSION = 1; + public const string KHR_UNIFIED_IMAGE_LAYOUTS_EXTENSION_NAME = "VK_KHR_unified_image_layouts"; + public const int KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION = 1; + public const string KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME = "VK_KHR_shader_float_controls2"; + public const int MSFT_LAYERED_DRIVER_SPEC_VERSION = 1; + public const string MSFT_LAYERED_DRIVER_EXTENSION_NAME = "VK_MSFT_layered_driver"; + public const int KHR_INDEX_TYPE_UINT8_SPEC_VERSION = 1; + public const string KHR_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_KHR_index_type_uint8"; + public const int KHR_LINE_RASTERIZATION_SPEC_VERSION = 1; + public const string KHR_LINE_RASTERIZATION_EXTENSION_NAME = "VK_KHR_line_rasterization"; + public const int KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION = 1; + public const string KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_KHR_calibrated_timestamps"; + public const int KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION = 1; + public const string KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME = "VK_KHR_shader_expect_assume"; + public const int KHR_MAINTENANCE_6_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_6_EXTENSION_NAME = "VK_KHR_maintenance6"; + public const int NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION = 1; + public const string NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME = "VK_NV_descriptor_pool_overallocation"; + public const int QCOM_TILE_MEMORY_HEAP_SPEC_VERSION = 1; + public const string QCOM_TILE_MEMORY_HEAP_EXTENSION_NAME = "VK_QCOM_tile_memory_heap"; + public const int KHR_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1; + public const string KHR_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_KHR_copy_memory_indirect"; + public const int EXT_MEMORY_DECOMPRESSION_SPEC_VERSION = 1; + public const string EXT_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_EXT_memory_decompression"; + public const int NV_DISPLAY_STEREO_SPEC_VERSION = 1; + public const string NV_DISPLAY_STEREO_EXTENSION_NAME = "VK_NV_display_stereo"; + public const int KHR_VIDEO_ENCODE_INTRA_REFRESH_SPEC_VERSION = 1; + public const string KHR_VIDEO_ENCODE_INTRA_REFRESH_EXTENSION_NAME = "VK_KHR_video_encode_intra_refresh"; + public const int KHR_VIDEO_ENCODE_QUANTIZATION_MAP_SPEC_VERSION = 2; + public const string KHR_VIDEO_ENCODE_QUANTIZATION_MAP_EXTENSION_NAME = "VK_KHR_video_encode_quantization_map"; + public const int NV_RAW_ACCESS_CHAINS_SPEC_VERSION = 1; + public const string NV_RAW_ACCESS_CHAINS_EXTENSION_NAME = "VK_NV_raw_access_chains"; + public const int NV_EXTERNAL_COMPUTE_QUEUE_SPEC_VERSION = 1; + public const string NV_EXTERNAL_COMPUTE_QUEUE_EXTENSION_NAME = "VK_NV_external_compute_queue"; + public const int KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION = 1; + public const string KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME = + "VK_KHR_shader_relaxed_extended_instruction"; + public const int NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION = 1; + public const string NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME = "VK_NV_command_buffer_inheritance"; + public const int KHR_MAINTENANCE_7_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_7_EXTENSION_NAME = "VK_KHR_maintenance7"; + public const int NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION = 1; + public const string NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME = "VK_NV_shader_atomic_float16_vector"; + public const int EXT_SHADER_REPLICATED_COMPOSITES_SPEC_VERSION = 1; + public const string EXT_SHADER_REPLICATED_COMPOSITES_EXTENSION_NAME = "VK_EXT_shader_replicated_composites"; + public const int ARM_TENSOR_CONTROLS_SPEC_VERSION = 1; + public const string ARM_TENSOR_CONTROLS_EXTENSION_NAME = "VK_ARM_tensor_controls"; + public const int EXT_SHADER_FLOAT8_SPEC_VERSION = 1; + public const string EXT_SHADER_FLOAT8_EXTENSION_NAME = "VK_EXT_shader_float8"; + public const int NV_RAY_TRACING_VALIDATION_SPEC_VERSION = 1; + public const string NV_RAY_TRACING_VALIDATION_EXTENSION_NAME = "VK_NV_ray_tracing_validation"; + public const int NV_CLUSTER_ACCELERATION_STRUCTURE_SPEC_VERSION = 4; + public const string NV_CLUSTER_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_NV_cluster_acceleration_structure"; + public const int NV_PARTITIONED_ACCELERATION_STRUCTURE_SPEC_VERSION = 1; + public const string NV_PARTITIONED_ACCELERATION_STRUCTURE_EXTENSION_NAME = + "VK_NV_partitioned_acceleration_structure"; + public const int EXT_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 1; + public const string EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_EXT_device_generated_commands"; + public const int KHR_DEVICE_FAULT_SPEC_VERSION = 1; + public const string KHR_DEVICE_FAULT_EXTENSION_NAME = "VK_KHR_device_fault"; + public const int KHR_MAINTENANCE_8_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_8_EXTENSION_NAME = "VK_KHR_maintenance8"; + public const int MESA_IMAGE_ALIGNMENT_CONTROL_SPEC_VERSION = 1; + public const string MESA_IMAGE_ALIGNMENT_CONTROL_EXTENSION_NAME = "VK_MESA_image_alignment_control"; + public const int KHR_SHADER_FMA_SPEC_VERSION = 1; + public const string KHR_SHADER_FMA_EXTENSION_NAME = "VK_KHR_shader_fma"; + public const int NV_PUSH_CONSTANT_BANK_SPEC_VERSION = 1; + public const string NV_PUSH_CONSTANT_BANK_EXTENSION_NAME = "VK_NV_push_constant_bank"; + public const int EXT_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION = 2; + public const string EXT_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME = "VK_EXT_ray_tracing_invocation_reorder"; + public const int EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION = 1; + public const string EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clamp_control"; + public const int KHR_MAINTENANCE_9_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_9_EXTENSION_NAME = "VK_KHR_maintenance9"; + public const int KHR_VIDEO_MAINTENANCE_2_SPEC_VERSION = 1; + public const string KHR_VIDEO_MAINTENANCE_2_EXTENSION_NAME = "VK_KHR_video_maintenance2"; + public const int HUAWEI_HDR_VIVID_SPEC_VERSION = 1; + public const string HUAWEI_HDR_VIVID_EXTENSION_NAME = "VK_HUAWEI_hdr_vivid"; + public const int NV_COOPERATIVE_MATRIX_2_SPEC_VERSION = 1; + public const string NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME = "VK_NV_cooperative_matrix2"; + public const int ARM_PIPELINE_OPACITY_MICROMAP_SPEC_VERSION = 1; + public const string ARM_PIPELINE_OPACITY_MICROMAP_EXTENSION_NAME = "VK_ARM_pipeline_opacity_micromap"; + public const int KHR_VIDEO_ENCODE_FEEDBACK_2_SPEC_VERSION = 1; + public const string KHR_VIDEO_ENCODE_FEEDBACK_2_EXTENSION_NAME = "VK_KHR_video_encode_feedback2"; + public const int IMG_FILTER_LINEAR_2D_SPEC_VERSION = 1; + public const string IMG_FILTER_LINEAR_2D_EXTENSION_NAME = "VK_IMG_filter_linear_2d"; + public const int EXT_EXTERNAL_MEMORY_METAL_SPEC_VERSION = 1; + public const string EXT_EXTERNAL_MEMORY_METAL_EXTENSION_NAME = "VK_EXT_external_memory_metal"; + public const int KHR_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION = 1; + public const string KHR_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME = "VK_KHR_depth_clamp_zero_one"; + public const int ARM_PERFORMANCE_COUNTERS_BY_REGION_SPEC_VERSION = 1; + public const string ARM_PERFORMANCE_COUNTERS_BY_REGION_EXTENSION_NAME = "VK_ARM_performance_counters_by_region"; + public const int ARM_SHADER_INSTRUMENTATION_SPEC_VERSION = 1; + public const string ARM_SHADER_INSTRUMENTATION_EXTENSION_NAME = "VK_ARM_shader_instrumentation"; + public const int EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_SPEC_VERSION = 1; + public const string EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_vertex_attribute_robustness"; + public const int ARM_FORMAT_PACK_SPEC_VERSION = 1; + public const string ARM_FORMAT_PACK_EXTENSION_NAME = "VK_ARM_format_pack"; + public const int VALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION = 1; + public const string VALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME = "VK_VALVE_fragment_density_map_layered"; + public const int KHR_ROBUSTNESS_2_SPEC_VERSION = 1; + public const string KHR_ROBUSTNESS_2_EXTENSION_NAME = "VK_KHR_robustness2"; + public const int NV_PRESENT_METERING_SPEC_VERSION = 1; + public const string NV_PRESENT_METERING_EXTENSION_NAME = "VK_NV_present_metering"; + public const int EXT_MULTISAMPLED_RENDER_TO_SWAPCHAIN_SPEC_VERSION = 1; + public const string EXT_MULTISAMPLED_RENDER_TO_SWAPCHAIN_EXTENSION_NAME = + "VK_EXT_multisampled_render_to_swapchain"; + public const int EXT_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION = 1; + public const string EXT_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME = "VK_EXT_fragment_density_map_offset"; + public const int EXT_ZERO_INITIALIZE_DEVICE_MEMORY_SPEC_VERSION = 1; + public const string EXT_ZERO_INITIALIZE_DEVICE_MEMORY_EXTENSION_NAME = "VK_EXT_zero_initialize_device_memory"; + public const int KHR_PRESENT_MODE_FIFO_LATEST_READY_SPEC_VERSION = 1; + public const string KHR_PRESENT_MODE_FIFO_LATEST_READY_EXTENSION_NAME = "VK_KHR_present_mode_fifo_latest_ready"; + public const int KHR_OPACITY_MICROMAP_SPEC_VERSION = 1; + public const string KHR_OPACITY_MICROMAP_EXTENSION_NAME = "VK_KHR_opacity_micromap"; + public const int EXT_SHADER_64BIT_INDEXING_SPEC_VERSION = 1; + public const string EXT_SHADER_64BIT_INDEXING_EXTENSION_NAME = "VK_EXT_shader_64bit_indexing"; + public const int EXT_CUSTOM_RESOLVE_SPEC_VERSION = 1; + public const string EXT_CUSTOM_RESOLVE_EXTENSION_NAME = "VK_EXT_custom_resolve"; + public const int QCOM_DATA_GRAPH_MODEL_SPEC_VERSION = 1; + public const string QCOM_DATA_GRAPH_MODEL_EXTENSION_NAME = "VK_QCOM_data_graph_model"; + public const int KHR_MAINTENANCE_10_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_10_EXTENSION_NAME = "VK_KHR_maintenance10"; + public const int ARM_DATA_GRAPH_OPTICAL_FLOW_SPEC_VERSION = 1; + public const string ARM_DATA_GRAPH_OPTICAL_FLOW_EXTENSION_NAME = "VK_ARM_data_graph_optical_flow"; + public const int EXT_SHADER_LONG_VECTOR_SPEC_VERSION = 1; + public const string EXT_SHADER_LONG_VECTOR_EXTENSION_NAME = "VK_EXT_shader_long_vector"; + public const int SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION = 1; + public const string SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME = + "VK_SEC_pipeline_cache_incremental_mode"; + public const int EXT_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_SPEC_VERSION = 1; + public const string EXT_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_EXTENSION_NAME = + "VK_EXT_shader_uniform_buffer_unsized_array"; + public const int NV_COMPUTE_OCCUPANCY_PRIORITY_SPEC_VERSION = 1; + public const string NV_COMPUTE_OCCUPANCY_PRIORITY_EXTENSION_NAME = "VK_NV_compute_occupancy_priority"; + public const int KHR_MAINTENANCE_11_SPEC_VERSION = 1; + public const string KHR_MAINTENANCE_11_EXTENSION_NAME = "VK_KHR_maintenance11"; + public const int EXT_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION = 1; + public const string EXT_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_EXT_shader_subgroup_partitioned"; + public const int KHR_EXTENDED_FLAGS_SPEC_VERSION = 1; + public const string KHR_EXTENDED_FLAGS_EXTENSION_NAME = "VK_KHR_extended_flags"; + public const int EXT_SHADER_OCP_MICROSCALING_TYPES_SPEC_VERSION = 1; + public const string EXT_SHADER_OCP_MICROSCALING_TYPES_EXTENSION_NAME = "VK_EXT_shader_ocp_microscaling_types"; + public const int VALVE_SHADER_MIXED_FLOAT_DOT_PRODUCT_SPEC_VERSION = 1; + public const string VALVE_SHADER_MIXED_FLOAT_DOT_PRODUCT_EXTENSION_NAME = + "VK_VALVE_shader_mixed_float_dot_product"; + public const int SEC_THROTTLE_HINT_SPEC_VERSION = 1; + public const string SEC_THROTTLE_HINT_EXTENSION_NAME = "VK_SEC_throttle_hint"; + public const int ARM_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_SPEC_VERSION = 1; + public const string ARM_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_EXTENSION_NAME = + "VK_ARM_data_graph_neural_accelerator_statistics"; + public const int EXT_PRIMITIVE_RESTART_INDEX_SPEC_VERSION = 1; + public const string EXT_PRIMITIVE_RESTART_INDEX_EXTENSION_NAME = "VK_EXT_primitive_restart_index"; + public const int NV_COOPERATIVE_MATRIX_DECODE_VECTOR_SPEC_VERSION = 1; + public const string NV_COOPERATIVE_MATRIX_DECODE_VECTOR_EXTENSION_NAME = + "VK_NV_cooperative_matrix_decode_vector"; + public const int STD_VIDEO_H264_CPB_CNT_LIST_SIZE = unchecked((int)32U); + public const int STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS = unchecked((int)6U); + public const int STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS = unchecked((int)16U); + public const int STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS = unchecked((int)6U); + public const int STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS = unchecked((int)64U); + public const int STD_VIDEO_H264_MAX_NUM_LIST_REF = unchecked((int)32U); + public const int STD_VIDEO_H264_MAX_CHROMA_PLANES = unchecked((int)2U); + public const int STD_VIDEO_H264_NO_REFERENCE_PICTURE = unchecked((int)0xFFU); + public const int STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_decode"; + public const int STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE = unchecked((int)2U); + public const int STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_encode"; + public const int STD_VIDEO_H265_CPB_CNT_LIST_SIZE = unchecked((int)32U); + public const int STD_VIDEO_H265_SUBLAYERS_LIST_SIZE = unchecked((int)7U); + public const int STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS = unchecked((int)6U); + public const int STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS = unchecked((int)16U); + public const int STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS = unchecked((int)6U); + public const int STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS = unchecked((int)64U); + public const int STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS = unchecked((int)6U); + public const int STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS = unchecked((int)64U); + public const int STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS = unchecked((int)2U); + public const int STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS = unchecked((int)64U); + public const int STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE = unchecked((int)6U); + public const int STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE = unchecked((int)19U); + public const int STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE = unchecked((int)21U); + public const int STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE = unchecked((int)3U); + public const int STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE = unchecked((int)128U); + public const int STD_VIDEO_H265_MAX_NUM_LIST_REF = unchecked((int)15U); + public const int STD_VIDEO_H265_MAX_CHROMA_PLANES = unchecked((int)2U); + public const int STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS = unchecked((int)64U); + public const int STD_VIDEO_H265_MAX_DPB_SIZE = unchecked((int)16U); + public const int STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS = unchecked((int)32U); + public const int STD_VIDEO_H265_MAX_LONG_TERM_PICS = unchecked((int)16U); + public const int STD_VIDEO_H265_MAX_DELTA_POC = unchecked((int)48U); + public const int STD_VIDEO_H265_NO_REFERENCE_PICTURE = unchecked((int)0xFFU); + public const int STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_decode"; + public const int STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE = unchecked((int)8U); + public const int STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_encode"; + public const int STD_VIDEO_VP9_NUM_REF_FRAMES = unchecked((int)8U); + public const int STD_VIDEO_VP9_REFS_PER_FRAME = unchecked((int)3U); + public const int STD_VIDEO_VP9_MAX_REF_FRAMES = unchecked((int)4U); + public const int STD_VIDEO_VP9_LOOP_FILTER_ADJUSTMENTS = unchecked((int)2U); + public const int STD_VIDEO_VP9_MAX_SEGMENTS = unchecked((int)8U); + public const int STD_VIDEO_VP9_SEG_LVL_MAX = unchecked((int)4U); + public const int STD_VIDEO_VP9_MAX_SEGMENTATION_TREE_PROBS = unchecked((int)7U); + public const int STD_VIDEO_VP9_MAX_SEGMENTATION_PRED_PROB = unchecked((int)3U); + public const int STD_VULKAN_VIDEO_CODEC_VP9_DECODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_VP9_DECODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_VP9_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_vp9_decode"; + public const int STD_VIDEO_AV1_NUM_REF_FRAMES = unchecked((int)8U); + public const int STD_VIDEO_AV1_REFS_PER_FRAME = unchecked((int)7U); + public const int STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME = unchecked((int)8U); + public const int STD_VIDEO_AV1_MAX_TILE_COLS = unchecked((int)64U); + public const int STD_VIDEO_AV1_MAX_TILE_ROWS = unchecked((int)64U); + public const int STD_VIDEO_AV1_MAX_SEGMENTS = unchecked((int)8U); + public const int STD_VIDEO_AV1_SEG_LVL_MAX = unchecked((int)8U); + public const int STD_VIDEO_AV1_PRIMARY_REF_NONE = unchecked((int)7U); + public const int STD_VIDEO_AV1_SELECT_INTEGER_MV = unchecked((int)2U); + public const int STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS = unchecked((int)2U); + public const int STD_VIDEO_AV1_SKIP_MODE_FRAMES = unchecked((int)2U); + public const int STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS = unchecked((int)4U); + public const int STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS = unchecked((int)2U); + public const int STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS = unchecked((int)8U); + public const int STD_VIDEO_AV1_MAX_NUM_PLANES = unchecked((int)3U); + public const int STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS = unchecked((int)6U); + public const int STD_VIDEO_AV1_MAX_NUM_Y_POINTS = unchecked((int)14U); + public const int STD_VIDEO_AV1_MAX_NUM_CB_POINTS = unchecked((int)10U); + public const int STD_VIDEO_AV1_MAX_NUM_CR_POINTS = unchecked((int)10U); + public const int STD_VIDEO_AV1_MAX_NUM_POS_LUMA = unchecked((int)24U); + public const int STD_VIDEO_AV1_MAX_NUM_POS_CHROMA = unchecked((int)25U); + public const int STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_av1_decode"; + public const int STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_SPEC_VERSION = + STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0; + public const string STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_av1_encode"; + } +} diff --git a/Brutal.Vulkan/Generated/Enums/Platforms/VkExportMetalObjectTypeFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/Platforms/VkExportMetalObjectTypeFlagsEXT.gen.cs new file mode 100644 index 0000000..b7e9245 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/Platforms/VkExportMetalObjectTypeFlagsEXT.gen.cs @@ -0,0 +1,67 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalObjectTypeFlagBitsEXT - Bitmask specifying Metal object types that can be exported from a Vulkan object + /// + /// + /// + /// Bits which indicate the types of Metal objects that may be exported from a + /// corresponding Vulkan object are: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef enum VkExportMetalObjectTypeFlagBitsEXT { + /// VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001, + /// VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002, + /// VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004, + /// VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008, + /// VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010, + /// VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020, + /// } VkExportMetalObjectTypeFlagBitsEXT; + /// + /// + [Flags] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public enum VkExportMetalObjectTypeFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// MetalDeviceBitEXT specifies that a Metal MTLDevice may be exported. + /// + MetalDeviceBitEXT = 0x00000001, + + /// + /// MetalCommandQueueBitEXT specifies that a Metal MTLCommandQueue may be exported. + /// + MetalCommandQueueBitEXT = 0x00000002, + + /// + /// MetalBufferBitEXT specifies that a Metal MTLBuffer may be exported. + /// + MetalBufferBitEXT = 0x00000004, + + /// + /// MetalTextureBitEXT specifies that a Metal MTLTexture may be exported. + /// + MetalTextureBitEXT = 0x00000008, + + /// + /// MetalIosurfaceBitEXT specifies that a Metal IOSurface may be exported. + /// + MetalIosurfaceBitEXT = 0x00000010, + + /// + /// MetalSharedEventBitEXT specifies that a Metal MTLSharedEvent may be exported. + /// + MetalSharedEventBitEXT = 0x00000020, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/Platforms/VkFullScreenExclusiveEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/Platforms/VkFullScreenExclusiveEXT.gen.cs new file mode 100644 index 0000000..9838745 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/Platforms/VkFullScreenExclusiveEXT.gen.cs @@ -0,0 +1,51 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkFullScreenExclusiveEXT - Hint values an application can specify affecting full-screen transition behavior + /// + /// + /// + /// Possible values of + /// VkSurfaceFullScreenExclusiveInfoEXT::fullScreenExclusive are: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive + /// typedef enum VkFullScreenExclusiveEXT { + /// VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, + /// VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, + /// VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, + /// VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, + /// } VkFullScreenExclusiveEXT; + /// + /// + [SupportedOSPlatform("windows")] + public enum VkFullScreenExclusiveEXT : int + { + /// + /// DefaultEXT specifies that the implementation should determine the appropriate full-screen method by whatever means it deems appropriate. + /// + DefaultEXT = 0, + + /// + /// AllowedEXT specifies that the implementation may: use full-screen exclusive mechanisms when available. Such mechanisms may: result in better performance and/or the availability of different presentation capabilities, but may: require a more disruptive transition during swapchain initialization, first presentation and/or destruction. + /// + AllowedEXT = 1, + + /// + /// DisallowedEXT specifies that the implementation should avoid using full-screen mechanisms which rely on disruptive transitions. + /// + DisallowedEXT = 2, + + /// + /// ApplicationControlledEXT specifies that the application will manage full-screen exclusive mode by using the vkAcquireFullScreenExclusiveModeEXT and vkReleaseFullScreenExclusiveModeEXT commands. + /// + ApplicationControlledEXT = 3, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1ChromaSamplePosition.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1ChromaSamplePosition.gen.cs new file mode 100644 index 0000000..5e2de2c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1ChromaSamplePosition.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1ChromaSamplePosition : int + { + /// + /// Unknown + /// + Unknown = 0, + + /// + /// Vertical + /// + Vertical = 1, + + /// + /// Colocated + /// + Colocated = 2, + + /// + /// Reserved + /// + Reserved = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1ColorPrimaries.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1ColorPrimaries.gen.cs new file mode 100644 index 0000000..6a029c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1ColorPrimaries.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1ColorPrimaries : int + { + /// + /// Bt709 + /// + Bt709 = 1, + + /// + /// Unspecified + /// + Unspecified = 2, + + /// + /// Bt470M + /// + Bt470M = 4, + + /// + /// Bt470BG + /// + Bt470BG = 5, + + /// + /// Bt601 + /// + Bt601 = 6, + + /// + /// Smpte240 + /// + Smpte240 = 7, + + /// + /// GenericFilm + /// + GenericFilm = 8, + + /// + /// Bt2020 + /// + Bt2020 = 9, + + /// + /// Xyz + /// + Xyz = 10, + + /// + /// Smpte431 + /// + Smpte431 = 11, + + /// + /// Smpte432 + /// + Smpte432 = 12, + + /// + /// Ebu3213 + /// + Ebu3213 = 22, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// BtUnspecified + /// + BtUnspecified = Unspecified, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameRestorationType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameRestorationType.gen.cs new file mode 100644 index 0000000..4486904 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameRestorationType.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1FrameRestorationType : int + { + /// + /// None + /// + None = 0, + + /// + /// Wiener + /// + Wiener = 1, + + /// + /// Sgrproj + /// + Sgrproj = 2, + + /// + /// Switchable + /// + Switchable = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameType.gen.cs new file mode 100644 index 0000000..0342722 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1FrameType.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1FrameType : int + { + /// + /// Key + /// + Key = 0, + + /// + /// Inter + /// + Inter = 1, + + /// + /// IntraOnly + /// + IntraOnly = 2, + + /// + /// Switch + /// + Switch = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1InterpolationFilter.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1InterpolationFilter.gen.cs new file mode 100644 index 0000000..2dc4f2e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1InterpolationFilter.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1InterpolationFilter : int + { + /// + /// Eighttap + /// + Eighttap = 0, + + /// + /// EighttapSmooth + /// + EighttapSmooth = 1, + + /// + /// EighttapSharp + /// + EighttapSharp = 2, + + /// + /// Bilinear + /// + Bilinear = 3, + + /// + /// Switchable + /// + Switchable = 4, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1Level.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1Level.gen.cs new file mode 100644 index 0000000..12457c0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1Level.gen.cs @@ -0,0 +1,136 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1Level : int + { + /// + /// _20 + /// + _20 = 0, + + /// + /// _21 + /// + _21 = 1, + + /// + /// _22 + /// + _22 = 2, + + /// + /// _23 + /// + _23 = 3, + + /// + /// _30 + /// + _30 = 4, + + /// + /// _31 + /// + _31 = 5, + + /// + /// _32 + /// + _32 = 6, + + /// + /// _33 + /// + _33 = 7, + + /// + /// _40 + /// + _40 = 8, + + /// + /// _41 + /// + _41 = 9, + + /// + /// _42 + /// + _42 = 10, + + /// + /// _43 + /// + _43 = 11, + + /// + /// _50 + /// + _50 = 12, + + /// + /// _51 + /// + _51 = 13, + + /// + /// _52 + /// + _52 = 14, + + /// + /// _53 + /// + _53 = 15, + + /// + /// _60 + /// + _60 = 16, + + /// + /// _61 + /// + _61 = 17, + + /// + /// _62 + /// + _62 = 18, + + /// + /// _63 + /// + _63 = 19, + + /// + /// _70 + /// + _70 = 20, + + /// + /// _71 + /// + _71 = 21, + + /// + /// _72 + /// + _72 = 22, + + /// + /// _73 + /// + _73 = 23, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1MatrixCoefficients.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1MatrixCoefficients.gen.cs new file mode 100644 index 0000000..c9276d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1MatrixCoefficients.gen.cs @@ -0,0 +1,91 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1MatrixCoefficients : int + { + /// + /// Identity + /// + Identity = 0, + + /// + /// Bt709 + /// + Bt709 = 1, + + /// + /// Unspecified + /// + Unspecified = 2, + + /// + /// Reserved3 + /// + Reserved3 = 3, + + /// + /// Fcc + /// + Fcc = 4, + + /// + /// Bt470BG + /// + Bt470BG = 5, + + /// + /// Bt601 + /// + Bt601 = 6, + + /// + /// Smpte240 + /// + Smpte240 = 7, + + /// + /// SmpteYcgco + /// + SmpteYcgco = 8, + + /// + /// Bt2020Ncl + /// + Bt2020Ncl = 9, + + /// + /// Bt2020Cl + /// + Bt2020Cl = 10, + + /// + /// Smpte2085 + /// + Smpte2085 = 11, + + /// + /// ChromatNcl + /// + ChromatNcl = 12, + + /// + /// ChromatCl + /// + ChromatCl = 13, + + /// + /// Ictcp + /// + Ictcp = 14, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1Profile.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1Profile.gen.cs new file mode 100644 index 0000000..ee9e68e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1Profile.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1Profile : int + { + /// + /// Main + /// + Main = 0, + + /// + /// High + /// + High = 1, + + /// + /// Professional + /// + Professional = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1ReferenceName.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1ReferenceName.gen.cs new file mode 100644 index 0000000..146645e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1ReferenceName.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1ReferenceName : int + { + /// + /// IntraFrame + /// + IntraFrame = 0, + + /// + /// LastFrame + /// + LastFrame = 1, + + /// + /// Last2Frame + /// + Last2Frame = 2, + + /// + /// Last3Frame + /// + Last3Frame = 3, + + /// + /// GoldenFrame + /// + GoldenFrame = 4, + + /// + /// BwdrefFrame + /// + BwdrefFrame = 5, + + /// + /// Altref2Frame + /// + Altref2Frame = 6, + + /// + /// AltrefFrame + /// + AltrefFrame = 7, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1TransferCharacteristics.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1TransferCharacteristics.gen.cs new file mode 100644 index 0000000..9c8d810 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1TransferCharacteristics.gen.cs @@ -0,0 +1,111 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1TransferCharacteristics : int + { + /// + /// Reserved0 + /// + Reserved0 = 0, + + /// + /// Bt709 + /// + Bt709 = 1, + + /// + /// Unspecified + /// + Unspecified = 2, + + /// + /// Reserved3 + /// + Reserved3 = 3, + + /// + /// Bt470M + /// + Bt470M = 4, + + /// + /// Bt470BG + /// + Bt470BG = 5, + + /// + /// Bt601 + /// + Bt601 = 6, + + /// + /// Smpte240 + /// + Smpte240 = 7, + + /// + /// Linear + /// + Linear = 8, + + /// + /// Log100 + /// + Log100 = 9, + + /// + /// Log100Sqrt10 + /// + Log100Sqrt10 = 10, + + /// + /// Iec61966 + /// + Iec61966 = 11, + + /// + /// Bt1361 + /// + Bt1361 = 12, + + /// + /// SRGB + /// + SRGB = 13, + + /// + /// Bt202010Bit + /// + Bt202010Bit = 14, + + /// + /// Bt202012Bit + /// + Bt202012Bit = 15, + + /// + /// Smpte2084 + /// + Smpte2084 = 16, + + /// + /// Smpte428 + /// + Smpte428 = 17, + + /// + /// Hlg + /// + Hlg = 18, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoAV1TxMode.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoAV1TxMode.gen.cs new file mode 100644 index 0000000..0bae5be --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoAV1TxMode.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoAV1TxMode : int + { + /// + /// Only4X4 + /// + Only4X4 = 0, + + /// + /// Largest + /// + Largest = 1, + + /// + /// Select + /// + Select = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoDecodeH264FieldOrderCount.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoDecodeH264FieldOrderCount.gen.cs new file mode 100644 index 0000000..08c7cbc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoDecodeH264FieldOrderCount.gen.cs @@ -0,0 +1,26 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoDecodeH264FieldOrderCount : int + { + /// + /// Top + /// + Top = 0, + + /// + /// Bottom + /// + Bottom = 1, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264AspectRatioIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264AspectRatioIdc.gen.cs new file mode 100644 index 0000000..4f445a1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264AspectRatioIdc.gen.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264AspectRatioIdc : int + { + /// + /// Unspecified + /// + Unspecified = 0, + + /// + /// Square + /// + Square = 1, + + /// + /// _1211 + /// + _1211 = 2, + + /// + /// _1011 + /// + _1011 = 3, + + /// + /// _1611 + /// + _1611 = 4, + + /// + /// _4033 + /// + _4033 = 5, + + /// + /// _2411 + /// + _2411 = 6, + + /// + /// _2011 + /// + _2011 = 7, + + /// + /// _3211 + /// + _3211 = 8, + + /// + /// _8033 + /// + _8033 = 9, + + /// + /// _1811 + /// + _1811 = 10, + + /// + /// _1511 + /// + _1511 = 11, + + /// + /// _6433 + /// + _6433 = 12, + + /// + /// _16099 + /// + _16099 = 13, + + /// + /// _43 + /// + _43 = 14, + + /// + /// _32 + /// + _32 = 15, + + /// + /// _21 + /// + _21 = 16, + + /// + /// ExtendedSar + /// + ExtendedSar = 255, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264CabacInitIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264CabacInitIdc.gen.cs new file mode 100644 index 0000000..9526768 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264CabacInitIdc.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264CabacInitIdc : int + { + /// + /// _0 + /// + _0 = 0, + + /// + /// _1 + /// + _1 = 1, + + /// + /// _2 + /// + _2 = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264ChromaFormatIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264ChromaFormatIdc.gen.cs new file mode 100644 index 0000000..293e664 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264ChromaFormatIdc.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264ChromaFormatIdc : int + { + /// + /// Monochrome + /// + Monochrome = 0, + + /// + /// _420 + /// + _420 = 1, + + /// + /// _422 + /// + _422 = 2, + + /// + /// _444 + /// + _444 = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264DisableDeblockingFilterIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264DisableDeblockingFilterIdc.gen.cs new file mode 100644 index 0000000..53fdc61 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264DisableDeblockingFilterIdc.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264DisableDeblockingFilterIdc : int + { + /// + /// Disabled + /// + Disabled = 0, + + /// + /// Enabled + /// + Enabled = 1, + + /// + /// Partial + /// + Partial = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264LevelIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264LevelIdc.gen.cs new file mode 100644 index 0000000..f57bf3b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264LevelIdc.gen.cs @@ -0,0 +1,111 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264LevelIdc : int + { + /// + /// _10 + /// + _10 = 0, + + /// + /// _11 + /// + _11 = 1, + + /// + /// _12 + /// + _12 = 2, + + /// + /// _13 + /// + _13 = 3, + + /// + /// _20 + /// + _20 = 4, + + /// + /// _21 + /// + _21 = 5, + + /// + /// _22 + /// + _22 = 6, + + /// + /// _30 + /// + _30 = 7, + + /// + /// _31 + /// + _31 = 8, + + /// + /// _32 + /// + _32 = 9, + + /// + /// _40 + /// + _40 = 10, + + /// + /// _41 + /// + _41 = 11, + + /// + /// _42 + /// + _42 = 12, + + /// + /// _50 + /// + _50 = 13, + + /// + /// _51 + /// + _51 = 14, + + /// + /// _52 + /// + _52 = 15, + + /// + /// _60 + /// + _60 = 16, + + /// + /// _61 + /// + _61 = 17, + + /// + /// _62 + /// + _62 = 18, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264MemMgmtControlOp.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264MemMgmtControlOp.gen.cs new file mode 100644 index 0000000..b589282 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264MemMgmtControlOp.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264MemMgmtControlOp : int + { + /// + /// End + /// + End = 0, + + /// + /// UnmarkShortTerm + /// + UnmarkShortTerm = 1, + + /// + /// UnmarkLongTerm + /// + UnmarkLongTerm = 2, + + /// + /// MarkLongTerm + /// + MarkLongTerm = 3, + + /// + /// SetMaxLongTermIndex + /// + SetMaxLongTermIndex = 4, + + /// + /// UnmarkAll + /// + UnmarkAll = 5, + + /// + /// MarkCurrentAsLongTerm + /// + MarkCurrentAsLongTerm = 6, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264ModificationOfPicNumsIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264ModificationOfPicNumsIdc.gen.cs new file mode 100644 index 0000000..4767155 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264ModificationOfPicNumsIdc.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264ModificationOfPicNumsIdc : int + { + /// + /// ShortTermSubtract + /// + ShortTermSubtract = 0, + + /// + /// ShortTermAdd + /// + ShortTermAdd = 1, + + /// + /// LongTerm + /// + LongTerm = 2, + + /// + /// End + /// + End = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264NonVclNaluType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264NonVclNaluType.gen.cs new file mode 100644 index 0000000..147d49e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264NonVclNaluType.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264NonVclNaluType : int + { + /// + /// Sps + /// + Sps = 0, + + /// + /// Pps + /// + Pps = 1, + + /// + /// Aud + /// + Aud = 2, + + /// + /// Prefix + /// + Prefix = 3, + + /// + /// EndOfSequence + /// + EndOfSequence = 4, + + /// + /// EndOfStream + /// + EndOfStream = 5, + + /// + /// Precoded + /// + Precoded = 6, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264PictureType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264PictureType.gen.cs new file mode 100644 index 0000000..3999a93 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264PictureType.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264PictureType : int + { + /// + /// P + /// + P = 0, + + /// + /// B + /// + B = 1, + + /// + /// I + /// + I = 2, + + /// + /// Idr + /// + Idr = 5, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264PocType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264PocType.gen.cs new file mode 100644 index 0000000..51994d5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264PocType.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264PocType : int + { + /// + /// _0 + /// + _0 = 0, + + /// + /// _1 + /// + _1 = 1, + + /// + /// _2 + /// + _2 = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264ProfileIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264ProfileIdc.gen.cs new file mode 100644 index 0000000..4d93691 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264ProfileIdc.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264ProfileIdc : int + { + /// + /// Baseline + /// + Baseline = 66, + + /// + /// Main + /// + Main = 77, + + /// + /// High + /// + High = 100, + + /// + /// High10 + /// + High10 = 110, + + /// + /// High422 + /// + High422 = 122, + + /// + /// High444Predictive + /// + High444Predictive = 244, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264SliceType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264SliceType.gen.cs new file mode 100644 index 0000000..aeb16f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264SliceType.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264SliceType : int + { + /// + /// P + /// + P = 0, + + /// + /// B + /// + B = 1, + + /// + /// I + /// + I = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH264WeightedBipredIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH264WeightedBipredIdc.gen.cs new file mode 100644 index 0000000..72ecf29 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH264WeightedBipredIdc.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH264WeightedBipredIdc : int + { + /// + /// Default + /// + Default = 0, + + /// + /// Explicit + /// + Explicit = 1, + + /// + /// Implicit + /// + Implicit = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH265AspectRatioIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH265AspectRatioIdc.gen.cs new file mode 100644 index 0000000..e15643a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH265AspectRatioIdc.gen.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH265AspectRatioIdc : int + { + /// + /// Unspecified + /// + Unspecified = 0, + + /// + /// Square + /// + Square = 1, + + /// + /// _1211 + /// + _1211 = 2, + + /// + /// _1011 + /// + _1011 = 3, + + /// + /// _1611 + /// + _1611 = 4, + + /// + /// _4033 + /// + _4033 = 5, + + /// + /// _2411 + /// + _2411 = 6, + + /// + /// _2011 + /// + _2011 = 7, + + /// + /// _3211 + /// + _3211 = 8, + + /// + /// _8033 + /// + _8033 = 9, + + /// + /// _1811 + /// + _1811 = 10, + + /// + /// _1511 + /// + _1511 = 11, + + /// + /// _6433 + /// + _6433 = 12, + + /// + /// _16099 + /// + _16099 = 13, + + /// + /// _43 + /// + _43 = 14, + + /// + /// _32 + /// + _32 = 15, + + /// + /// _21 + /// + _21 = 16, + + /// + /// ExtendedSar + /// + ExtendedSar = 255, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH265ChromaFormatIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH265ChromaFormatIdc.gen.cs new file mode 100644 index 0000000..3471400 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH265ChromaFormatIdc.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH265ChromaFormatIdc : int + { + /// + /// Monochrome + /// + Monochrome = 0, + + /// + /// _420 + /// + _420 = 1, + + /// + /// _422 + /// + _422 = 2, + + /// + /// _444 + /// + _444 = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH265LevelIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH265LevelIdc.gen.cs new file mode 100644 index 0000000..0bbf7c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH265LevelIdc.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH265LevelIdc : int + { + /// + /// _10 + /// + _10 = 0, + + /// + /// _20 + /// + _20 = 1, + + /// + /// _21 + /// + _21 = 2, + + /// + /// _30 + /// + _30 = 3, + + /// + /// _31 + /// + _31 = 4, + + /// + /// _40 + /// + _40 = 5, + + /// + /// _41 + /// + _41 = 6, + + /// + /// _50 + /// + _50 = 7, + + /// + /// _51 + /// + _51 = 8, + + /// + /// _52 + /// + _52 = 9, + + /// + /// _60 + /// + _60 = 10, + + /// + /// _61 + /// + _61 = 11, + + /// + /// _62 + /// + _62 = 12, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH265PictureType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH265PictureType.gen.cs new file mode 100644 index 0000000..0c44a06 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH265PictureType.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH265PictureType : int + { + /// + /// P + /// + P = 0, + + /// + /// B + /// + B = 1, + + /// + /// I + /// + I = 2, + + /// + /// Idr + /// + Idr = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH265ProfileIdc.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH265ProfileIdc.gen.cs new file mode 100644 index 0000000..3771e24 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH265ProfileIdc.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH265ProfileIdc : int + { + /// + /// Main + /// + Main = 1, + + /// + /// Main10 + /// + Main10 = 2, + + /// + /// MainStillPicture + /// + MainStillPicture = 3, + + /// + /// FormatRangeExtensions + /// + FormatRangeExtensions = 4, + + /// + /// SccExtensions + /// + SccExtensions = 9, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoH265SliceType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoH265SliceType.gen.cs new file mode 100644 index 0000000..9349945 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoH265SliceType.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoH265SliceType : int + { + /// + /// B + /// + B = 0, + + /// + /// P + /// + P = 1, + + /// + /// I + /// + I = 2, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoVP9ColorSpace.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoVP9ColorSpace.gen.cs new file mode 100644 index 0000000..09742f1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoVP9ColorSpace.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoVP9ColorSpace : int + { + /// + /// Unknown + /// + Unknown = 0, + + /// + /// Bt601 + /// + Bt601 = 1, + + /// + /// Bt709 + /// + Bt709 = 2, + + /// + /// Smpte170 + /// + Smpte170 = 3, + + /// + /// Smpte240 + /// + Smpte240 = 4, + + /// + /// Bt2020 + /// + Bt2020 = 5, + + /// + /// Reserved + /// + Reserved = 6, + + /// + /// RGB + /// + RGB = 7, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoVP9FrameType.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoVP9FrameType.gen.cs new file mode 100644 index 0000000..83d7de8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoVP9FrameType.gen.cs @@ -0,0 +1,26 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoVP9FrameType : int + { + /// + /// Key + /// + Key = 0, + + /// + /// NonKey + /// + NonKey = 1, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoVP9InterpolationFilter.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoVP9InterpolationFilter.gen.cs new file mode 100644 index 0000000..7d7afc6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoVP9InterpolationFilter.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoVP9InterpolationFilter : int + { + /// + /// Eighttap + /// + Eighttap = 0, + + /// + /// EighttapSmooth + /// + EighttapSmooth = 1, + + /// + /// EighttapSharp + /// + EighttapSharp = 2, + + /// + /// Bilinear + /// + Bilinear = 3, + + /// + /// Switchable + /// + Switchable = 4, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoVP9Level.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoVP9Level.gen.cs new file mode 100644 index 0000000..17e0bd4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoVP9Level.gen.cs @@ -0,0 +1,86 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoVP9Level : int + { + /// + /// _10 + /// + _10 = 0, + + /// + /// _11 + /// + _11 = 1, + + /// + /// _20 + /// + _20 = 2, + + /// + /// _21 + /// + _21 = 3, + + /// + /// _30 + /// + _30 = 4, + + /// + /// _31 + /// + _31 = 5, + + /// + /// _40 + /// + _40 = 6, + + /// + /// _41 + /// + _41 = 7, + + /// + /// _50 + /// + _50 = 8, + + /// + /// _51 + /// + _51 = 9, + + /// + /// _52 + /// + _52 = 10, + + /// + /// _60 + /// + _60 = 11, + + /// + /// _61 + /// + _61 = 12, + + /// + /// _62 + /// + _62 = 13, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoVP9Profile.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoVP9Profile.gen.cs new file mode 100644 index 0000000..3677851 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoVP9Profile.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoVP9Profile : int + { + /// + /// _0 + /// + _0 = 0, + + /// + /// _1 + /// + _1 = 1, + + /// + /// _2 + /// + _2 = 2, + + /// + /// _3 + /// + _3 = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/StdVideoVP9ReferenceName.gen.cs b/Brutal.Vulkan/Generated/Enums/StdVideoVP9ReferenceName.gen.cs new file mode 100644 index 0000000..bad946b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/StdVideoVP9ReferenceName.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + public enum StdVideoVP9ReferenceName : int + { + /// + /// IntraFrame + /// + IntraFrame = 0, + + /// + /// LastFrame + /// + LastFrame = 1, + + /// + /// GoldenFrame + /// + GoldenFrame = 2, + + /// + /// AltrefFrame + /// + AltrefFrame = 3, + + /// + /// Invalid + /// + Invalid = 0x7FFFFFFF, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureBuildTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureBuildTypeKHR.gen.cs new file mode 100644 index 0000000..793094e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureBuildTypeKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureBuildTypeKHR - Acceleration structure build type + /// + /// + /// + /// :refpage: VkAccelerationStructureBuildTypeKHR + /// + /// + /// Possible values of buildType in + /// vkGetAccelerationStructureBuildSizesKHR are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkAccelerationStructureBuildTypeKHR { + /// VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0, + /// VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1, + /// VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2, + /// } VkAccelerationStructureBuildTypeKHR; + /// + /// + public enum VkAccelerationStructureBuildTypeKHR : int + { + /// + /// HostKHR requests the memory requirement for operations performed by the host. + /// + HostKHR = 0, + + /// + /// DeviceKHR requests the memory requirement for operations performed by the device. + /// + DeviceKHR = 1, + + /// + /// HostOrDeviceKHR requests the memory requirement for operations performed by either the host, or the device. + /// + HostOrDeviceKHR = 2, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCompatibilityKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCompatibilityKHR.gen.cs new file mode 100644 index 0000000..b2644ae --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCompatibilityKHR.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureCompatibilityKHR - Acceleration structure compatibility + /// + /// + /// + /// Possible values of pCompatibility returned by + /// vkGetDeviceAccelerationStructureCompatibilityKHR are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkAccelerationStructureCompatibilityKHR { + /// VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0, + /// VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1, + /// } VkAccelerationStructureCompatibilityKHR; + /// + /// + public enum VkAccelerationStructureCompatibilityKHR : int + { + /// + /// CompatibleKHR if the pVersionData version acceleration structure is compatible with device. + /// + CompatibleKHR = 0, + + /// + /// IncompatibleKHR if the pVersionData version acceleration structure is not compatible with device. + /// + IncompatibleKHR = 1, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCreateFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCreateFlagsKHR.gen.cs new file mode 100644 index 0000000..4becd1a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureCreateFlagsKHR.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureCreateFlagBitsKHR - Bitmask specifying additional creation parameters for acceleration structure + /// + /// + /// + /// Bits which can be set in + /// VkAccelerationStructureCreateInfoKHR::createFlags, specifying + /// additional creation parameters for acceleration structures, are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkAccelerationStructureCreateFlagBitsKHR { + /// VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000001, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008, + /// // Provided by VK_NV_ray_tracing_motion_blur + /// VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 0x00000004, + /// } VkAccelerationStructureCreateFlagBitsKHR; + /// + /// + [Flags] + public enum VkAccelerationStructureCreateFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DeviceAddressCaptureReplayBitKHR specifies that the acceleration structure's address can be saved and reused on a subsequent run. + /// + DeviceAddressCaptureReplayBitKHR = 0x00000001, + + /// + /// DescriptorBufferCaptureReplayBitEXT + /// + DescriptorBufferCaptureReplayBitEXT = 0x00000008, + + /// + /// MotionBitNV + /// + MotionBitNV = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMemoryRequirementsTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMemoryRequirementsTypeNV.gen.cs new file mode 100644 index 0000000..9471e3c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMemoryRequirementsTypeNV.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMemoryRequirementsTypeNV - Acceleration structure memory requirement type + /// + /// + /// + /// :refpage: VkAccelerationStructureMemoryRequirementsTypeNV + /// + /// + /// Possible values of type in + /// VkAccelerationStructureMemoryRequirementsInfoNV are:, + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef enum VkAccelerationStructureMemoryRequirementsTypeNV { + /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0, + /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1, + /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2, + /// } VkAccelerationStructureMemoryRequirementsTypeNV; + /// + /// + public enum VkAccelerationStructureMemoryRequirementsTypeNV : int + { + /// + /// ObjectNV requests the memory requirement for the VkAccelerationStructureNV backing store. + /// + ObjectNV = 0, + + /// + /// BuildScratchNV requests the memory requirement for scratch space during the initial build. + /// + BuildScratchNV = 1, + + /// + /// UpdateScratchNV requests the memory requirement for scratch space during an update. + /// + UpdateScratchNV = 2, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMotionInstanceTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMotionInstanceTypeNV.gen.cs new file mode 100644 index 0000000..427f946 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureMotionInstanceTypeNV.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMotionInstanceTypeNV - Enum specifying a type of acceleration structure motion instance data for building into an acceleration structure geometry + /// + /// + /// + /// :refpage: VkAccelerationStructureMotionInstanceTypeNV + /// + /// + /// The VkAccelerationStructureMotionInstanceTypeNV enumeration is defined + /// as: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef enum VkAccelerationStructureMotionInstanceTypeNV { + /// VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0, + /// VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1, + /// VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2, + /// } VkAccelerationStructureMotionInstanceTypeNV; + /// + /// + public enum VkAccelerationStructureMotionInstanceTypeNV : int + { + /// + /// StaticNV specifies that the instance is a static instance with no instance motion. + /// + StaticNV = 0, + + /// + /// MatrixMotionNV specifies that the instance is a motion instance with motion specified by interpolation between two matrices. + /// + MatrixMotionNV = 1, + + /// + /// SrtMotionNV specifies that the instance is a motion instance with motion specified by interpolation in the SRT decomposition. + /// + SrtMotionNV = 2, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureSerializedBlockTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureSerializedBlockTypeKHR.gen.cs new file mode 100644 index 0000000..d540362 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureSerializedBlockTypeKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureSerializedBlockTypeKHR - Enum for block types in a serialized acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureSerializedBlockTypeKHR + /// + /// + /// The VkAccelerationStructureSerializedBlockTypeKHR enumeration is + /// defined as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef enum VkAccelerationStructureSerializedBlockTypeKHR { + /// VK_ACCELERATION_STRUCTURE_SERIALIZED_BLOCK_TYPE_OPACITY_MICROMAP_KHR = 0, + /// } VkAccelerationStructureSerializedBlockTypeKHR; + /// + /// + public enum VkAccelerationStructureSerializedBlockTypeKHR : int + { + /// + /// OpacityMicromapKHR specifies that the block contains opacity micromaps. + /// + OpacityMicromapKHR = 0, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureTypeKHR.gen.cs new file mode 100644 index 0000000..b0b093b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccelerationStructureTypeKHR.gen.cs @@ -0,0 +1,66 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureTypeKHR - Type of acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureTypeKHR + /// + /// + /// Values which can be set in + /// specifying the type of acceleration structure, are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkAccelerationStructureTypeKHR { + /// VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0, + /// VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1, + /// VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2, + /// // Provided by VK_KHR_opacity_micromap + /// VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR = 1000623000, + /// // Provided by VK_NV_ray_tracing + /// VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, + /// } VkAccelerationStructureTypeKHR; + /// + /// + public enum VkAccelerationStructureTypeKHR : int + { + /// + /// TopLevelKHR is a top-level acceleration structure containing instance data referring to bottom-level acceleration structures. + /// + TopLevelKHR = 0, + + /// + /// BottomLevelKHR is a bottom-level acceleration structure containing the AABBs or geometry to be intersected. + /// + BottomLevelKHR = 1, + + /// + /// GenericKHR is an acceleration structure whose type is determined at build time used for special circumstances. In these cases, the acceleration structure type is not known at creation time, but must be specified at build time as top, or bottom. + /// + GenericKHR = 2, + + /// + /// OpacityMicromapKHR + /// + OpacityMicromapKHR = 1000623000, + + /// + /// TopLevelNV + /// + TopLevelNV = TopLevelKHR, + + /// + /// BottomLevelNV + /// + BottomLevelNV = BottomLevelKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccessFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccessFlags.gen.cs new file mode 100644 index 0000000..7a736e3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccessFlags.gen.cs @@ -0,0 +1,255 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccessFlagBits - Bitmask specifying memory access types that will participate in a memory dependency + /// + /// + /// + /// Bits which can be set in the srcAccessMask and dstAccessMask + /// members of VkSubpassDependency, + /// VkMemoryBarrier, VkBufferMemoryBarrier, and + /// VkImageMemoryBarrier, specifying access behavior, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkAccessFlagBits { + /// VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, + /// VK_ACCESS_INDEX_READ_BIT = 0x00000002, + /// VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, + /// VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, + /// VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, + /// VK_ACCESS_SHADER_READ_BIT = 0x00000020, + /// VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, + /// VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, + /// VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, + /// VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, + /// VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, + /// VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, + /// VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, + /// VK_ACCESS_HOST_READ_BIT = 0x00002000, + /// VK_ACCESS_HOST_WRITE_BIT = 0x00004000, + /// VK_ACCESS_MEMORY_READ_BIT = 0x00008000, + /// VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, + /// // Provided by VK_VERSION_1_3 + /// VK_ACCESS_NONE = 0, + /// // Provided by VK_EXT_transform_feedback + /// VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000, + /// // Provided by VK_EXT_transform_feedback + /// VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000, + /// // Provided by VK_EXT_transform_feedback + /// VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000, + /// // Provided by VK_EXT_conditional_rendering + /// VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000, + /// // Provided by VK_EXT_device_generated_commands + /// VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000, + /// // Provided by VK_EXT_device_generated_commands + /// VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000, + /// // Provided by VK_NV_shading_rate_image + /// VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, + /// // Provided by VK_NV_device_generated_commands + /// VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT, + /// // Provided by VK_NV_device_generated_commands + /// VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT, + /// // Provided by VK_KHR_synchronization2 + /// VK_ACCESS_NONE_KHR = VK_ACCESS_NONE, + /// } VkAccessFlagBits; + /// + /// + [Flags] + public enum VkAccessFlags : int + { + /// + /// IndirectCommandReadBit specifies read access to indirect command data read as part of an indirect drawing or dispatching command. Such access occurs in the VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT pipeline stage. + /// + IndirectCommandReadBit = 0x00000001, + + /// + /// IndexReadBit specifies read access to an index buffer as part of an indexed drawing command, bound by vkCmdBindIndexBuffer. Such access occurs in the VK_PIPELINE_STAGE_VERTEX_INPUT_BIT pipeline stage. + /// + IndexReadBit = 0x00000002, + + /// + /// VertexAttributeReadBit specifies read access to a vertex buffer as part of a drawing command, bound by vkCmdBindVertexBuffers. Such access occurs in the VK_PIPELINE_STAGE_VERTEX_INPUT_BIT pipeline stage. + /// + VertexAttributeReadBit = 0x00000004, + + /// + /// UniformReadBit specifies read access to a uniform buffer^ in any shader pipeline stage. + /// + UniformReadBit = 0x00000008, + + /// + /// InputAttachmentReadBit specifies read access to an input attachment^ within a render pass during fragment shading. Such access occurs in the VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT pipeline stage. + /// + InputAttachmentReadBit = 0x00000010, + + /// + /// ShaderReadBit specifies read access to a uniform texel buffer^, sampled image^, storage buffer^, storage texel buffer^, or storage image^ in any shader pipeline stage. + /// + ShaderReadBit = 0x00000020, + + /// + /// ShaderWriteBit specifies write access to a storage buffer^, storage texel buffer^, or storage image^ in any shader pipeline stage. + /// + ShaderWriteBit = 0x00000040, + + /// + /// ColorAttachmentReadBit specifies read access to a color attachment^, such as via blending^], logic operations^ or certain render pass load operations^. Such access occurs in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. + /// + ColorAttachmentReadBit = 0x00000080, + + /// + /// ColorAttachmentWriteBit specifies write access to a color attachment^ during a render pass^ or via certain render pass load^, store^, and multisample resolve^ operations. Such access occurs in the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. + /// + ColorAttachmentWriteBit = 0x00000100, + + /// + /// DepthStencilAttachmentReadBit specifies read access to a depth/stencil attachment^, via depth or stencil operations^ or certain render pass load operations^. Such access occurs in the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages. + /// + DepthStencilAttachmentReadBit = 0x00000200, + + /// + /// DepthStencilAttachmentWriteBit specifies write access to a depth/stencil attachment^, via depth or stencil operations^ or certain render pass load^ and store^ operations. Such access occurs in the VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stages. + /// + DepthStencilAttachmentWriteBit = 0x00000400, + + /// + /// TransferReadBit specifies read access to an image or buffer in a copy^ operation. + /// + TransferReadBit = 0x00000800, + + /// + /// TransferWriteBit specifies write access to an image or buffer in a clear^ or copy^ operation. + /// + TransferWriteBit = 0x00001000, + + /// + /// HostReadBit specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_HOST_BIT pipeline stage. + /// + HostReadBit = 0x00002000, + + /// + /// HostWriteBit specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_HOST_BIT pipeline stage. Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes^ - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access. [[synchronization-access-types-supported]] .Supported Access Types [cols="50,50",options="header"] | + /// + HostWriteBit = 0x00004000, + + /// + /// MemoryReadBit specifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting all etext:READ access flags that are valid where it is used. + /// + MemoryReadBit = 0x00008000, + + /// + /// MemoryWriteBit specifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting all etext:WRITE access flags that are valid where it is used. + /// + MemoryWriteBit = 0x00010000, + + /// + /// None + /// + None = 0, + + /// + /// TransformFeedbackWriteBitEXT + /// + TransformFeedbackWriteBitEXT = 0x02000000, + + /// + /// TransformFeedbackCounterReadBitEXT + /// + TransformFeedbackCounterReadBitEXT = 0x04000000, + + /// + /// TransformFeedbackCounterWriteBitEXT + /// + TransformFeedbackCounterWriteBitEXT = 0x08000000, + + /// + /// ConditionalRenderingReadBitEXT + /// + ConditionalRenderingReadBitEXT = 0x00100000, + + /// + /// ColorAttachmentReadNoncoherentBitEXT + /// + ColorAttachmentReadNoncoherentBitEXT = 0x00080000, + + /// + /// AccelerationStructureReadBitKHR + /// + AccelerationStructureReadBitKHR = 0x00200000, + + /// + /// AccelerationStructureWriteBitKHR + /// + AccelerationStructureWriteBitKHR = 0x00400000, + + /// + /// FragmentDensityMapReadBitEXT + /// + FragmentDensityMapReadBitEXT = 0x01000000, + + /// + /// FragmentShadingRateAttachmentReadBitKHR + /// + FragmentShadingRateAttachmentReadBitKHR = 0x00800000, + + /// + /// CommandPreprocessReadBitEXT + /// + CommandPreprocessReadBitEXT = 0x00020000, + + /// + /// CommandPreprocessWriteBitEXT + /// + CommandPreprocessWriteBitEXT = 0x00040000, + + /// + /// ShadingRateImageReadBitNV + /// + ShadingRateImageReadBitNV = FragmentShadingRateAttachmentReadBitKHR, + + /// + /// AccelerationStructureReadBitNV + /// + AccelerationStructureReadBitNV = AccelerationStructureReadBitKHR, + + /// + /// AccelerationStructureWriteBitNV + /// + AccelerationStructureWriteBitNV = AccelerationStructureWriteBitKHR, + + /// + /// CommandPreprocessReadBitNV + /// + CommandPreprocessReadBitNV = CommandPreprocessReadBitEXT, + + /// + /// CommandPreprocessWriteBitNV + /// + CommandPreprocessWriteBitNV = CommandPreprocessWriteBitEXT, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccessFlags2.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccessFlags2.gen.cs new file mode 100644 index 0000000..50d8804 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccessFlags2.gen.cs @@ -0,0 +1,539 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccessFlagBits2 - Access flags for VkAccessFlags2 + /// + /// + /// + /// Bits which can be set in the srcAccessMask and dstAccessMask + /// members of VkMemoryBarrier2, VkImageMemoryBarrier2, and + /// VkBufferMemoryBarrier2, specifying access behavior, are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// // Flag bits for VkAccessFlagBits2 + /// typedef VkFlags64 VkAccessFlagBits2; + /// static const VkAccessFlagBits2 VK_ACCESS_2_NONE = 0ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT = 0x00000001ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT = 0x00000002ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT = 0x00000008ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 0x00000010ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT = 0x00000020ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT = 0x00000040ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 0x00000080ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT = 0x00000800ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT = 0x00001000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT = 0x00002000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT = 0x00004000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT = 0x00008000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT = 0x00010000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT = 0x100000000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT = 0x200000000ULL; + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x400000000ULL; + /// // Provided by VK_KHR_video_decode_queue + /// static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 0x800000000ULL; + /// // Provided by VK_KHR_video_decode_queue + /// static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 0x1000000000ULL; + /// // Provided by VK_EXT_descriptor_heap + /// static const VkAccessFlagBits2 VK_ACCESS_2_SAMPLER_HEAP_READ_BIT_EXT = 0x200000000000000ULL; + /// // Provided by VK_EXT_descriptor_heap + /// static const VkAccessFlagBits2 VK_ACCESS_2_RESOURCE_HEAP_READ_BIT_EXT = 0x400000000000000ULL; + /// // Provided by VK_KHR_video_encode_queue + /// static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000ULL; + /// // Provided by VK_KHR_video_encode_queue + /// static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000ULL; + /// // Provided by VK_QCOM_tile_shading + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_TILE_ATTACHMENT_READ_BIT_QCOM = 0x8000000000000ULL; + /// // Provided by VK_QCOM_tile_shading + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_TILE_ATTACHMENT_WRITE_BIT_QCOM = 0x10000000000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_NONE_KHR = 0ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback + /// static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_conditional_rendering + /// static const VkAccessFlagBits2 VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_device_generated_commands + /// static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_device_generated_commands + /// static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_device_generated_commands + /// static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_device_generated_commands + /// static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000ULL; + /// // Provided by VK_KHR_fragment_shading_rate with VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_shading_rate_image + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000ULL; + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000ULL; + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_synchronization2 + /// static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing + /// static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing + /// static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_fragment_density_map + /// static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_blend_operation_advanced + /// static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000ULL; + /// // Provided by VK_EXT_descriptor_buffer + /// static const VkAccessFlagBits2 VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 0x20000000000ULL; + /// // Provided by VK_HUAWEI_invocation_mask + /// static const VkAccessFlagBits2 VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 0x8000000000ULL; + /// // Provided by VK_KHR_ray_tracing_maintenance1 with (VK_KHR_synchronization2 or VK_VERSION_1_3) and VK_KHR_ray_tracing_pipeline + /// static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 0x10000000000ULL; + /// // Provided by VK_EXT_opacity_micromap + /// static const VkAccessFlagBits2 VK_ACCESS_2_MICROMAP_READ_BIT_EXT = 0x100000000000ULL; + /// // Provided by VK_EXT_opacity_micromap + /// static const VkAccessFlagBits2 VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT = 0x200000000000ULL; + /// // Provided by VK_NV_optical_flow + /// static const VkAccessFlagBits2 VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 0x40000000000ULL; + /// // Provided by VK_NV_optical_flow + /// static const VkAccessFlagBits2 VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 0x80000000000ULL; + /// // Provided by VK_ARM_data_graph + /// static const VkAccessFlagBits2 VK_ACCESS_2_DATA_GRAPH_READ_BIT_ARM = 0x800000000000ULL; + /// // Provided by VK_ARM_data_graph + /// static const VkAccessFlagBits2 VK_ACCESS_2_DATA_GRAPH_WRITE_BIT_ARM = 0x1000000000000ULL; + /// // Provided by VK_EXT_memory_decompression + /// static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT = 0x80000000000000ULL; + /// // Provided by VK_EXT_memory_decompression + /// static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT = 0x100000000000000ULL; + /// + /// + [Flags] + public enum VkAccessFlags2 : ulong + { + /// + /// None specifies no accesses. + /// + None = 0, + + /// + /// IndirectCommandReadBit specifies read access to command data read from indirect buffers as part of an indirect drawing or dispatch command. Such access occurs in the VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT pipeline stage. + /// + IndirectCommandReadBit = 0x00000001, + + /// + /// IndexReadBit specifies read access to an index buffer as part of an indexed drawing command, bound by vkCmdBindIndexBuffer. Such access occurs in the VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT pipeline stage. + /// + IndexReadBit = 0x00000002, + + /// + /// VertexAttributeReadBit specifies read access to a vertex buffer as part of a drawing command, bound by vkCmdBindVertexBuffers. Such access occurs in the VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT pipeline stage. + /// + VertexAttributeReadBit = 0x00000004, + + /// + /// UniformReadBit specifies read access to a uniform buffer^ in any shader pipeline stage. + /// + UniformReadBit = 0x00000008, + + /// + /// InputAttachmentReadBit specifies read access to an input attachment^ within a render pass during fragment shading. Such access occurs in the VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT pipeline stage. + /// + InputAttachmentReadBit = 0x00000010, + + /// + /// ShaderReadBit is equivalent to the logical OR of: include::{generated}/sync/flagDefinitions/VK_ACCESS_2_SHADER_READ_BIT.adoc[] + /// + ShaderReadBit = 0x00000020, + + /// + /// ShaderWriteBit is equivalent to VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT. + /// + ShaderWriteBit = 0x00000040, + + /// + /// ColorAttachmentReadBit specifies read access to a color attachment^, such as via blending^], logic operations^ or certain render pass load operations^. Such access occurs in the VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. + /// + ColorAttachmentReadBit = 0x00000080, + + /// + /// ColorAttachmentWriteBit specifies write access to a color attachment^ during a render pass^ or via certain render pass load^, store^, and multisample resolve^ operations. Such access occurs in the VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage. + /// + ColorAttachmentWriteBit = 0x00000100, + + /// + /// DepthStencilAttachmentReadBit specifies read access to a depth/stencil attachment^, via depth or stencil operations^ or certain render pass load operations^. Such access occurs in the VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT pipeline stages. + /// + DepthStencilAttachmentReadBit = 0x00000200, + + /// + /// DepthStencilAttachmentWriteBit specifies write access to a depth/stencil attachment^, via depth or stencil operations^ or certain render pass load^ and store^ operations. Such access occurs in the VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT or VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT pipeline stages. + /// + DepthStencilAttachmentWriteBit = 0x00000400, + + /// + /// TransferReadBit specifies read access to an image or buffer in a copy^ operation. Such access occurs in the VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, or VK_PIPELINE_STAGE_2_RESOLVE_BIT pipeline stages. + /// + TransferReadBit = 0x00000800, + + /// + /// TransferWriteBit specifies write access to an image or buffer in a clear^ or copy^ operation. Such access occurs in the VK_PIPELINE_STAGE_2_COPY_BIT, VK_PIPELINE_STAGE_2_BLIT_BIT, VK_PIPELINE_STAGE_2_CLEAR_BIT, or VK_PIPELINE_STAGE_2_RESOLVE_BIT pipeline stages. + /// + TransferWriteBit = 0x00001000, + + /// + /// HostReadBit specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_2_HOST_BIT pipeline stage. + /// + HostReadBit = 0x00002000, + + /// + /// HostWriteBit specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory. Such access occurs in the VK_PIPELINE_STAGE_2_HOST_BIT pipeline stage. Certain access types are only performed by a subset of pipeline stages, as described in more detail for VkAccessFlags. The Supported Access Types^ table lists, for each access flag, which pipeline stages can perform that type of access. [NOTE] + /// + HostWriteBit = 0x00004000, + + /// + /// MemoryReadBit specifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting all etext:READ access flags that are valid where it is used. + /// + MemoryReadBit = 0x00008000, + + /// + /// MemoryWriteBit specifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting all etext:WRITE access flags that are valid where it is used. + /// + MemoryWriteBit = 0x00010000, + + /// + /// ShaderSampledReadBit specifies read access to a uniform texel buffer^ or sampled image^ in any shader pipeline stage. + /// + ShaderSampledReadBit = 0x100000000, + + /// + /// ShaderStorageReadBit specifies read access to a storage buffer^, storage texel buffer^, or storage image^ in any shader pipeline stage. + /// + ShaderStorageReadBit = 0x200000000, + + /// + /// ShaderStorageWriteBit specifies write access to a storage buffer^, storage texel buffer^, or storage image^ in any shader pipeline stage. + /// + ShaderStorageWriteBit = 0x400000000, + + /// + /// VideoDecodeReadBitKHR + /// + VideoDecodeReadBitKHR = 0x800000000, + + /// + /// VideoDecodeWriteBitKHR + /// + VideoDecodeWriteBitKHR = 0x1000000000, + + /// + /// SamplerHeapReadBitEXT + /// + SamplerHeapReadBitEXT = 0x200000000000000, + + /// + /// ResourceHeapReadBitEXT + /// + ResourceHeapReadBitEXT = 0x400000000000000, + + /// + /// VideoEncodeReadBitKHR + /// + VideoEncodeReadBitKHR = 0x2000000000, + + /// + /// VideoEncodeWriteBitKHR + /// + VideoEncodeWriteBitKHR = 0x4000000000, + + /// + /// ShaderTileAttachmentReadBitQCOM + /// + ShaderTileAttachmentReadBitQCOM = 0x8000000000000, + + /// + /// ShaderTileAttachmentWriteBitQCOM + /// + ShaderTileAttachmentWriteBitQCOM = 0x10000000000000, + + /// + /// NoneKHR + /// + NoneKHR = 0, + + /// + /// IndirectCommandReadBitKHR + /// + IndirectCommandReadBitKHR = 0x00000001, + + /// + /// IndexReadBitKHR + /// + IndexReadBitKHR = 0x00000002, + + /// + /// VertexAttributeReadBitKHR + /// + VertexAttributeReadBitKHR = 0x00000004, + + /// + /// UniformReadBitKHR + /// + UniformReadBitKHR = 0x00000008, + + /// + /// InputAttachmentReadBitKHR + /// + InputAttachmentReadBitKHR = 0x00000010, + + /// + /// ShaderReadBitKHR + /// + ShaderReadBitKHR = 0x00000020, + + /// + /// ShaderWriteBitKHR + /// + ShaderWriteBitKHR = 0x00000040, + + /// + /// ColorAttachmentReadBitKHR + /// + ColorAttachmentReadBitKHR = 0x00000080, + + /// + /// ColorAttachmentWriteBitKHR + /// + ColorAttachmentWriteBitKHR = 0x00000100, + + /// + /// DepthStencilAttachmentReadBitKHR + /// + DepthStencilAttachmentReadBitKHR = 0x00000200, + + /// + /// DepthStencilAttachmentWriteBitKHR + /// + DepthStencilAttachmentWriteBitKHR = 0x00000400, + + /// + /// TransferReadBitKHR + /// + TransferReadBitKHR = 0x00000800, + + /// + /// TransferWriteBitKHR + /// + TransferWriteBitKHR = 0x00001000, + + /// + /// HostReadBitKHR + /// + HostReadBitKHR = 0x00002000, + + /// + /// HostWriteBitKHR + /// + HostWriteBitKHR = 0x00004000, + + /// + /// MemoryReadBitKHR + /// + MemoryReadBitKHR = 0x00008000, + + /// + /// MemoryWriteBitKHR + /// + MemoryWriteBitKHR = 0x00010000, + + /// + /// ShaderSampledReadBitKHR + /// + ShaderSampledReadBitKHR = 0x100000000, + + /// + /// ShaderStorageReadBitKHR + /// + ShaderStorageReadBitKHR = 0x200000000, + + /// + /// ShaderStorageWriteBitKHR + /// + ShaderStorageWriteBitKHR = 0x400000000, + + /// + /// TransformFeedbackWriteBitEXT + /// + TransformFeedbackWriteBitEXT = 0x02000000, + + /// + /// TransformFeedbackCounterReadBitEXT + /// + TransformFeedbackCounterReadBitEXT = 0x04000000, + + /// + /// TransformFeedbackCounterWriteBitEXT + /// + TransformFeedbackCounterWriteBitEXT = 0x08000000, + + /// + /// ConditionalRenderingReadBitEXT + /// + ConditionalRenderingReadBitEXT = 0x00100000, + + /// + /// CommandPreprocessReadBitNV + /// + CommandPreprocessReadBitNV = 0x00020000, + + /// + /// CommandPreprocessWriteBitNV + /// + CommandPreprocessWriteBitNV = 0x00040000, + + /// + /// CommandPreprocessReadBitEXT + /// + CommandPreprocessReadBitEXT = 0x00020000, + + /// + /// CommandPreprocessWriteBitEXT + /// + CommandPreprocessWriteBitEXT = 0x00040000, + + /// + /// FragmentShadingRateAttachmentReadBitKHR + /// + FragmentShadingRateAttachmentReadBitKHR = 0x00800000, + + /// + /// ShadingRateImageReadBitNV + /// + ShadingRateImageReadBitNV = 0x00800000, + + /// + /// AccelerationStructureReadBitKHR + /// + AccelerationStructureReadBitKHR = 0x00200000, + + /// + /// AccelerationStructureWriteBitKHR + /// + AccelerationStructureWriteBitKHR = 0x00400000, + + /// + /// AccelerationStructureReadBitNV + /// + AccelerationStructureReadBitNV = 0x00200000, + + /// + /// AccelerationStructureWriteBitNV + /// + AccelerationStructureWriteBitNV = 0x00400000, + + /// + /// FragmentDensityMapReadBitEXT + /// + FragmentDensityMapReadBitEXT = 0x01000000, + + /// + /// ColorAttachmentReadNoncoherentBitEXT + /// + ColorAttachmentReadNoncoherentBitEXT = 0x00080000, + + /// + /// DescriptorBufferReadBitEXT + /// + DescriptorBufferReadBitEXT = 0x20000000000, + + /// + /// InvocationMaskReadBitHUAWEI + /// + InvocationMaskReadBitHUAWEI = 0x8000000000, + + /// + /// ShaderBindingTableReadBitKHR + /// + ShaderBindingTableReadBitKHR = 0x10000000000, + + /// + /// MicromapReadBitEXT + /// + MicromapReadBitEXT = 0x100000000000, + + /// + /// MicromapWriteBitEXT + /// + MicromapWriteBitEXT = 0x200000000000, + + /// + /// OpticalFlowReadBitNV + /// + OpticalFlowReadBitNV = 0x40000000000, + + /// + /// OpticalFlowWriteBitNV + /// + OpticalFlowWriteBitNV = 0x80000000000, + + /// + /// DataGraphReadBitARM + /// + DataGraphReadBitARM = 0x800000000000, + + /// + /// DataGraphWriteBitARM + /// + DataGraphWriteBitARM = 0x1000000000000, + + /// + /// MemoryDecompressionReadBitEXT + /// + MemoryDecompressionReadBitEXT = 0x80000000000000, + + /// + /// MemoryDecompressionWriteBitEXT + /// + MemoryDecompressionWriteBitEXT = 0x100000000000000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAccessFlags3KHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAccessFlags3KHR.gen.cs new file mode 100644 index 0000000..3aef2ff --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAccessFlags3KHR.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccessFlagBits3KHR - Access flags for VkAccessFlags3KHR + /// + /// + /// + /// Bits which can be set in the srcAccessMask3 and dstAccessMask3 + /// members of VkMemoryBarrierAccessFlags3KHR, specifying access behavior, + /// are: + /// + /// + /// // Provided by VK_KHR_maintenance8 + /// // Flag bits for VkAccessFlagBits3KHR + /// typedef VkFlags64 VkAccessFlagBits3KHR; + /// static const VkAccessFlagBits3KHR VK_ACCESS_3_NONE_KHR = 0ULL; + /// + /// + [Flags] + public enum VkAccessFlags3KHR : ulong + { + /// No flags set. + None = 0, + + /// + /// NoneKHR specifies no additional accesses. + /// + NoneKHR = 0, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAcquireProfilingLockFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAcquireProfilingLockFlagsKHR.gen.cs new file mode 100644 index 0000000..d062447 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAcquireProfilingLockFlagsKHR.gen.cs @@ -0,0 +1,24 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAcquireProfilingLockFlagBitsKHR - Reserved for future use + /// + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef enum VkAcquireProfilingLockFlagBitsKHR { + /// } VkAcquireProfilingLockFlagBitsKHR; + /// + /// + [Flags] + public enum VkAcquireProfilingLockFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAddressCommandFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAddressCommandFlagsKHR.gen.cs new file mode 100644 index 0000000..2d2c415 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAddressCommandFlagsKHR.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAddressCommandFlagBitsKHR - Bitmask specifying address copy parameters + /// + /// + /// + /// Bits which can be set in a VkAddressCommandFlagsKHR mask are: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef enum VkAddressCommandFlagBitsKHR { + /// VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR = 0x00000001, + /// VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR = 0x00000002, + /// VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR = 0x00000004, + /// VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR = 0x00000008, + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// VK_ADDRESS_COMMAND_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR = 0x00000010, + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// VK_ADDRESS_COMMAND_UNKNOWN_TRANSFORM_FEEDBACK_BUFFER_USAGE_BIT_KHR = 0x00000020, + /// } VkAddressCommandFlagBitsKHR; + /// + /// + [Flags] + public enum VkAddressCommandFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// ProtectedBitKHR specifies that an address range is allocated from protected memory. + /// + ProtectedBitKHR = 0x00000001, + + /// + /// FullyBoundBitKHR specifies that an address range will be fully bound to physical memory when accessed. + /// + FullyBoundBitKHR = 0x00000002, + + /// + /// StorageBufferUsageBitKHR specifies that all buffers containing any part of an address range were created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage. + /// + StorageBufferUsageBitKHR = 0x00000004, + + /// + /// UnknownStorageBufferUsageBitKHR specifies that whether buffers containing an any part of an address range were created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage or not is unknown. If neither VK_ADDRESS_COMMAND_STORAGE_BUFFER_USAGE_BIT_KHR nor VK_ADDRESS_COMMAND_UNKNOWN_STORAGE_BUFFER_USAGE_BIT_KHR are specified, the address range must not be aliased with any buffer allocated with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT. [NOTE] + /// + UnknownStorageBufferUsageBitKHR = 0x00000008, + + /// + /// TransformFeedbackBufferUsageBitKHR + /// + TransformFeedbackBufferUsageBitKHR = 0x00000010, + + /// + /// UnknownTransformFeedbackBufferUsageBitKHR + /// + UnknownTransformFeedbackBufferUsageBitKHR = 0x00000020, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAddressCopyFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAddressCopyFlagsKHR.gen.cs new file mode 100644 index 0000000..967925a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAddressCopyFlagsKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAddressCopyFlagBitsKHR - Bitmask specifying address copy parameters + /// + /// + /// + /// Bits which can be set in a VkAddressCopyFlagsKHR mask are: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef enum VkAddressCopyFlagBitsKHR { + /// VK_ADDRESS_COPY_DEVICE_LOCAL_BIT_KHR = 0x00000001, + /// VK_ADDRESS_COPY_SPARSE_BIT_KHR = 0x00000002, + /// VK_ADDRESS_COPY_PROTECTED_BIT_KHR = 0x00000004, + /// } VkAddressCopyFlagBitsKHR; + /// + /// + [Flags] + public enum VkAddressCopyFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DeviceLocalBitKHR specifies that the address range is expected to be resident in device local memory. Specifying this value is optional, but may: lead to improved performance if set accurately. + /// + DeviceLocalBitKHR = 0x00000001, + + /// + /// SparseBitKHR specifies that the address range may not be fully bound to physical memory when accessed. + /// + SparseBitKHR = 0x00000002, + + /// + /// ProtectedBitKHR specifies that the address range is allocated from protected memory. + /// + ProtectedBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAntiLagModeAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAntiLagModeAMD.gen.cs new file mode 100644 index 0000000..d3f7aa5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAntiLagModeAMD.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAntiLagModeAMD - Set the status of the anti-lag feature + /// + /// + /// + /// Possible values of VkAntiLagDataAMD::mode, specifying the + /// anti-lag status, are: + /// + /// + /// // Provided by VK_AMD_anti_lag + /// typedef enum VkAntiLagModeAMD { + /// VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD = 0, + /// VK_ANTI_LAG_MODE_ON_AMD = 1, + /// VK_ANTI_LAG_MODE_OFF_AMD = 2, + /// } VkAntiLagModeAMD; + /// + /// + public enum VkAntiLagModeAMD : int + { + /// + /// DriverControlAMD specifies that anti-lag will be enabled or disabled depending on driver settings. + /// + DriverControlAMD = 0, + + /// + /// OnAMD specifies that anti-lag will be enabled. + /// + OnAMD = 1, + + /// + /// OffAMD specifies that anti-lag will be disabled. + /// + OffAMD = 2, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAntiLagStageAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAntiLagStageAMD.gen.cs new file mode 100644 index 0000000..91d6258 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAntiLagStageAMD.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAntiLagStageAMD - Report the application stage + /// + /// + /// + /// Possible values of VkAntiLagPresentationInfoAMD::stage, + /// specifying the current application stage, are: + /// + /// + /// // Provided by VK_AMD_anti_lag + /// typedef enum VkAntiLagStageAMD { + /// VK_ANTI_LAG_STAGE_INPUT_AMD = 0, + /// VK_ANTI_LAG_STAGE_PRESENT_AMD = 1, + /// } VkAntiLagStageAMD; + /// + /// + public enum VkAntiLagStageAMD : int + { + /// + /// InputAMD specifies the stage before processing input. + /// + InputAMD = 0, + + /// + /// PresentAMD specifies the stage before vkQueuePresentKHR. + /// + PresentAMD = 1, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAttachmentDescriptionFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAttachmentDescriptionFlags.gen.cs new file mode 100644 index 0000000..9d671b4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAttachmentDescriptionFlags.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentDescriptionFlagBits - Bitmask specifying additional properties of an attachment + /// + /// + /// + /// Bits which can be set in VkAttachmentDescription::flags, + /// describing additional properties of the attachment, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkAttachmentDescriptionFlagBits { + /// VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, + /// // Provided by VK_KHR_maintenance10 + /// VK_ATTACHMENT_DESCRIPTION_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_maintenance10 + /// VK_ATTACHMENT_DESCRIPTION_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR = 0x00000004, + /// } VkAttachmentDescriptionFlagBits; + /// + /// + [Flags] + public enum VkAttachmentDescriptionFlags : int + { + /// No flags set. + None = 0, + + /// + /// MayAliasBit specifies that the attachment aliases the same device memory as other attachments. + /// + MayAliasBit = 0x00000001, + + /// + /// ResolveSkipTransferFunctionBitKHR + /// + ResolveSkipTransferFunctionBitKHR = 0x00000002, + + /// + /// ResolveEnableTransferFunctionBitKHR + /// + ResolveEnableTransferFunctionBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAttachmentLoadOp.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAttachmentLoadOp.gen.cs new file mode 100644 index 0000000..92c4466 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAttachmentLoadOp.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentLoadOp - Specify how contents of an attachment are treated at the beginning of the subpass where it is first used + /// + /// + /// + /// Load operations that can be used for a render pass are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkAttachmentLoadOp { + /// VK_ATTACHMENT_LOAD_OP_LOAD = 0, + /// VK_ATTACHMENT_LOAD_OP_CLEAR = 1, + /// VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, + /// // Provided by VK_VERSION_1_4 + /// VK_ATTACHMENT_LOAD_OP_NONE = 1000400000, + /// // Provided by VK_EXT_load_store_op_none + /// VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE, + /// // Provided by VK_KHR_load_store_op_none + /// VK_ATTACHMENT_LOAD_OP_NONE_KHR = VK_ATTACHMENT_LOAD_OP_NONE, + /// } VkAttachmentLoadOp; + /// + /// + public enum VkAttachmentLoadOp : int + { + /// + /// Load specifies that the previous contents of the image within the render area will be preserved as the initial values. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_READ_BIT. + /// + Load = 0, + + /// + /// Clear specifies that the contents within the render area will be cleared to a uniform value, which is specified when a render pass instance is begun. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. + /// + Clear = 1, + + /// + /// DontCare specifies that the previous contents within the area need not be preserved; the contents of the attachment will be undefined: inside the render area. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. + /// + DontCare = 2, + + /// + /// None + /// + None = 1000400000, + + /// + /// NoneEXT + /// + NoneEXT = None, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkAttachmentStoreOp.gen.cs b/Brutal.Vulkan/Generated/Enums/VkAttachmentStoreOp.gen.cs new file mode 100644 index 0000000..c512deb --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkAttachmentStoreOp.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of the subpass where it is last used + /// + /// + /// + /// Possible values of VkAttachmentDescription::storeOp and + /// stencilStoreOp, specifying how the contents of the attachment are + /// treated, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkAttachmentStoreOp { + /// VK_ATTACHMENT_STORE_OP_STORE = 0, + /// VK_ATTACHMENT_STORE_OP_DONT_CARE = 1, + /// // Provided by VK_VERSION_1_3 + /// VK_ATTACHMENT_STORE_OP_NONE = 1000301000, + /// // Provided by VK_KHR_dynamic_rendering, VK_KHR_load_store_op_none + /// VK_ATTACHMENT_STORE_OP_NONE_KHR = VK_ATTACHMENT_STORE_OP_NONE, + /// // Provided by VK_QCOM_render_pass_store_ops + /// VK_ATTACHMENT_STORE_OP_NONE_QCOM = VK_ATTACHMENT_STORE_OP_NONE, + /// // Provided by VK_EXT_load_store_op_none + /// VK_ATTACHMENT_STORE_OP_NONE_EXT = VK_ATTACHMENT_STORE_OP_NONE, + /// } VkAttachmentStoreOp; + /// + /// + public enum VkAttachmentStoreOp : int + { + /// + /// Store specifies the contents generated during the render pass and within the render area are written to memory. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. + /// + Store = 0, + + /// + /// DontCare specifies the contents within the render area are not needed after rendering, and may: be discarded; the contents of the attachment will be undefined: inside the render area. For attachments with a depth/stencil format, this uses the access type VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a color format, this uses the access type VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. [NOTE] + /// + DontCare = 1, + + /// + /// None + /// + None = 1000301000, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// NoneQCOM + /// + NoneQCOM = None, + + /// + /// NoneEXT + /// + NoneEXT = None, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBlendFactor.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBlendFactor.gen.cs new file mode 100644 index 0000000..a910d8b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBlendFactor.gen.cs @@ -0,0 +1,138 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBlendFactor - Framebuffer blending factors + /// + /// + /// + /// The source and destination color and alpha blending factors are selected + /// from the enum: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkBlendFactor { + /// VK_BLEND_FACTOR_ZERO = 0, + /// VK_BLEND_FACTOR_ONE = 1, + /// VK_BLEND_FACTOR_SRC_COLOR = 2, + /// VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, + /// VK_BLEND_FACTOR_DST_COLOR = 4, + /// VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, + /// VK_BLEND_FACTOR_SRC_ALPHA = 6, + /// VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, + /// VK_BLEND_FACTOR_DST_ALPHA = 8, + /// VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, + /// VK_BLEND_FACTOR_CONSTANT_COLOR = 10, + /// VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, + /// VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, + /// VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, + /// VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, + /// VK_BLEND_FACTOR_SRC1_COLOR = 15, + /// VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, + /// VK_BLEND_FACTOR_SRC1_ALPHA = 17, + /// VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, + /// } VkBlendFactor; + /// + /// + public enum VkBlendFactor : int + { + /// + /// Zero + /// + Zero = 0, + + /// + /// One + /// + One = 1, + + /// + /// SrcColor + /// + SrcColor = 2, + + /// + /// OneMinusSrcColor + /// + OneMinusSrcColor = 3, + + /// + /// DstColor + /// + DstColor = 4, + + /// + /// OneMinusDstColor + /// + OneMinusDstColor = 5, + + /// + /// SrcAlpha + /// + SrcAlpha = 6, + + /// + /// OneMinusSrcAlpha + /// + OneMinusSrcAlpha = 7, + + /// + /// DstAlpha + /// + DstAlpha = 8, + + /// + /// OneMinusDstAlpha + /// + OneMinusDstAlpha = 9, + + /// + /// ConstantColor + /// + ConstantColor = 10, + + /// + /// OneMinusConstantColor + /// + OneMinusConstantColor = 11, + + /// + /// ConstantAlpha + /// + ConstantAlpha = 12, + + /// + /// OneMinusConstantAlpha + /// + OneMinusConstantAlpha = 13, + + /// + /// SrcAlphaSaturate + /// + SrcAlphaSaturate = 14, + + /// + /// Src1Color + /// + Src1Color = 15, + + /// + /// OneMinusSrc1Color + /// + OneMinusSrc1Color = 16, + + /// + /// Src1Alpha + /// + Src1Alpha = 17, + + /// + /// OneMinusSrc1Alpha + /// + OneMinusSrc1Alpha = 18, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBlendOp.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBlendOp.gen.cs new file mode 100644 index 0000000..e2ad733 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBlendOp.gen.cs @@ -0,0 +1,379 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBlendOp - Framebuffer blending operations + /// + /// + /// + /// Once the source and destination blend factors have been selected, they along + /// with the source and destination components are passed to the blending + /// operations. + /// RGB and alpha components can use different operations. + /// Possible values of VkBlendOp, specifying the operations, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkBlendOp { + /// VK_BLEND_OP_ADD = 0, + /// VK_BLEND_OP_SUBTRACT = 1, + /// VK_BLEND_OP_REVERSE_SUBTRACT = 2, + /// VK_BLEND_OP_MIN = 3, + /// VK_BLEND_OP_MAX = 4, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_ZERO_EXT = 1000148000, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SRC_EXT = 1000148001, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DST_EXT = 1000148002, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SRC_OVER_EXT = 1000148003, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DST_OVER_EXT = 1000148004, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SRC_IN_EXT = 1000148005, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DST_IN_EXT = 1000148006, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SRC_OUT_EXT = 1000148007, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DST_OUT_EXT = 1000148008, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SRC_ATOP_EXT = 1000148009, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DST_ATOP_EXT = 1000148010, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_XOR_EXT = 1000148011, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_MULTIPLY_EXT = 1000148012, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SCREEN_EXT = 1000148013, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_OVERLAY_EXT = 1000148014, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DARKEN_EXT = 1000148015, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_LIGHTEN_EXT = 1000148016, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_COLORDODGE_EXT = 1000148017, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_COLORBURN_EXT = 1000148018, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_HARDLIGHT_EXT = 1000148019, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_DIFFERENCE_EXT = 1000148021, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_EXCLUSION_EXT = 1000148022, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_INVERT_EXT = 1000148023, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_INVERT_RGB_EXT = 1000148024, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_LINEARDODGE_EXT = 1000148025, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_LINEARBURN_EXT = 1000148026, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_PINLIGHT_EXT = 1000148029, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_HARDMIX_EXT = 1000148030, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_HSL_HUE_EXT = 1000148031, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_HSL_COLOR_EXT = 1000148033, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_PLUS_EXT = 1000148035, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_MINUS_EXT = 1000148039, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_CONTRAST_EXT = 1000148041, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_INVERT_OVG_EXT = 1000148042, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_RED_EXT = 1000148043, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_GREEN_EXT = 1000148044, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_BLEND_OP_BLUE_EXT = 1000148045, + /// } VkBlendOp; + /// + /// + public enum VkBlendOp : int + { + /// + /// Add + /// + Add = 0, + + /// + /// Subtract + /// + Subtract = 1, + + /// + /// ReverseSubtract + /// + ReverseSubtract = 2, + + /// + /// Min + /// + Min = 3, + + /// + /// Max + /// + Max = 4, + + /// + /// ZeroEXT + /// + ZeroEXT = 1000148000, + + /// + /// SrcEXT + /// + SrcEXT = 1000148001, + + /// + /// DstEXT + /// + DstEXT = 1000148002, + + /// + /// SrcOverEXT + /// + SrcOverEXT = 1000148003, + + /// + /// DstOverEXT + /// + DstOverEXT = 1000148004, + + /// + /// SrcInEXT + /// + SrcInEXT = 1000148005, + + /// + /// DstInEXT + /// + DstInEXT = 1000148006, + + /// + /// SrcOutEXT + /// + SrcOutEXT = 1000148007, + + /// + /// DstOutEXT + /// + DstOutEXT = 1000148008, + + /// + /// SrcAtopEXT + /// + SrcAtopEXT = 1000148009, + + /// + /// DstAtopEXT + /// + DstAtopEXT = 1000148010, + + /// + /// XorEXT + /// + XorEXT = 1000148011, + + /// + /// MultiplyEXT + /// + MultiplyEXT = 1000148012, + + /// + /// ScreenEXT + /// + ScreenEXT = 1000148013, + + /// + /// OverlayEXT + /// + OverlayEXT = 1000148014, + + /// + /// DarkenEXT + /// + DarkenEXT = 1000148015, + + /// + /// LightenEXT + /// + LightenEXT = 1000148016, + + /// + /// ColordodgeEXT + /// + ColordodgeEXT = 1000148017, + + /// + /// ColorburnEXT + /// + ColorburnEXT = 1000148018, + + /// + /// HardlightEXT + /// + HardlightEXT = 1000148019, + + /// + /// SoftlightEXT + /// + SoftlightEXT = 1000148020, + + /// + /// DifferenceEXT + /// + DifferenceEXT = 1000148021, + + /// + /// ExclusionEXT + /// + ExclusionEXT = 1000148022, + + /// + /// InvertEXT + /// + InvertEXT = 1000148023, + + /// + /// InvertRGBEXT + /// + InvertRGBEXT = 1000148024, + + /// + /// LineardodgeEXT + /// + LineardodgeEXT = 1000148025, + + /// + /// LinearburnEXT + /// + LinearburnEXT = 1000148026, + + /// + /// VividlightEXT + /// + VividlightEXT = 1000148027, + + /// + /// LinearlightEXT + /// + LinearlightEXT = 1000148028, + + /// + /// PinlightEXT + /// + PinlightEXT = 1000148029, + + /// + /// HardmixEXT + /// + HardmixEXT = 1000148030, + + /// + /// HslHueEXT + /// + HslHueEXT = 1000148031, + + /// + /// HslSaturationEXT + /// + HslSaturationEXT = 1000148032, + + /// + /// HslColorEXT + /// + HslColorEXT = 1000148033, + + /// + /// HslLuminosityEXT + /// + HslLuminosityEXT = 1000148034, + + /// + /// PlusEXT + /// + PlusEXT = 1000148035, + + /// + /// PlusClampedEXT + /// + PlusClampedEXT = 1000148036, + + /// + /// PlusClampedAlphaEXT + /// + PlusClampedAlphaEXT = 1000148037, + + /// + /// PlusDarkerEXT + /// + PlusDarkerEXT = 1000148038, + + /// + /// MinusEXT + /// + MinusEXT = 1000148039, + + /// + /// MinusClampedEXT + /// + MinusClampedEXT = 1000148040, + + /// + /// ContrastEXT + /// + ContrastEXT = 1000148041, + + /// + /// InvertOvgEXT + /// + InvertOvgEXT = 1000148042, + + /// + /// RedEXT + /// + RedEXT = 1000148043, + + /// + /// GreenEXT + /// + GreenEXT = 1000148044, + + /// + /// BlueEXT + /// + BlueEXT = 1000148045, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBlendOverlapEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBlendOverlapEXT.gen.cs new file mode 100644 index 0000000..190f5cd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBlendOverlapEXT.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBlendOverlapEXT - Enumerant specifying the blend overlap parameter + /// + /// + /// + /// The weighting functions p~0~, p~1~, and p~2~ are defined + /// in table Advanced Blend Overlap + /// Modes^. + /// In these functions, the A components of the source and destination colors + /// are taken to indicate the portion of the pixel covered by the fragment + /// (source) and the fragments previously accumulated in the pixel + /// (destination). + /// The functions p~0~, p~1~, and p~2~ approximate the + /// relative portion of the pixel covered by the intersection of the source and + /// destination, covered only by the source, and covered only by the + /// destination, respectively. + /// + /// + /// Possible values of + /// VkPipelineColorBlendAdvancedStateCreateInfoEXT::blendOverlap, + /// specifying the blend overlap functions, are: + /// + /// + /// // Provided by VK_EXT_blend_operation_advanced + /// typedef enum VkBlendOverlapEXT { + /// VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0, + /// VK_BLEND_OVERLAP_DISJOINT_EXT = 1, + /// VK_BLEND_OVERLAP_CONJOINT_EXT = 2, + /// } VkBlendOverlapEXT; + /// + /// + public enum VkBlendOverlapEXT : int + { + /// + /// UncorrelatedEXT specifies that there is no correlation between the source and destination coverage. + /// + UncorrelatedEXT = 0, + + /// + /// DisjointEXT specifies that the source and destination coverage are considered to have minimal overlap. [[framebuffer-blend-advanced-overlap-modes]] .Advanced Blend Overlap Modes [width="80%",options="header"] | + /// + DisjointEXT = 1, + + /// + /// ConjointEXT specifies that the source and destination coverage are considered to have maximal overlap. + /// + ConjointEXT = 2, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBlockMatchWindowCompareModeQCOM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBlockMatchWindowCompareModeQCOM.gen.cs new file mode 100644 index 0000000..c800d07 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBlockMatchWindowCompareModeQCOM.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBlockMatchWindowCompareModeQCOM - Block match window compare modes + /// + /// + /// + /// The VkBlockMatchWindowCompareModeQCOM enum describes how block match + /// values within the window are compared. + /// VkBlockMatchWindowCompareModeQCOM is defined as: + /// + /// + /// // Provided by VK_QCOM_image_processing2 + /// typedef enum VkBlockMatchWindowCompareModeQCOM { + /// VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM = 0, + /// VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM = 1, + /// } VkBlockMatchWindowCompareModeQCOM; + /// + /// + public enum VkBlockMatchWindowCompareModeQCOM : int + { + /// + /// MinQCOM specifies that windowed block match operations return the minimum error within the window. + /// + MinQCOM = 0, + + /// + /// MaxQCOM specifies that windowed block match operations return the maximum error within the window. + /// + MaxQCOM = 1, + + /// + /// MaxEnumQCOM + /// + MaxEnumQCOM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBorderColor.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBorderColor.gen.cs new file mode 100644 index 0000000..1027e20 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBorderColor.gen.cs @@ -0,0 +1,74 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBorderColor - Specify border color used for texture lookups + /// + /// + /// + /// Possible values of VkSamplerCreateInfo::borderColor, specifying + /// the border color used for texture lookups, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkBorderColor { + /// VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, + /// VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, + /// VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, + /// VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3, + /// VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, + /// VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5, + /// // Provided by VK_EXT_custom_border_color + /// VK_BORDER_COLOR_FLOAT_CUSTOM_EXT = 1000287003, + /// // Provided by VK_EXT_custom_border_color + /// VK_BORDER_COLOR_INT_CUSTOM_EXT = 1000287004, + /// } VkBorderColor; + /// + /// + public enum VkBorderColor : int + { + /// + /// FloatTransparentBlack specifies a transparent, floating-point format, black color. + /// + FloatTransparentBlack = 0, + + /// + /// IntTransparentBlack specifies a transparent, integer format, black color. + /// + IntTransparentBlack = 1, + + /// + /// FloatOpaqueBlack specifies an opaque, floating-point format, black color. + /// + FloatOpaqueBlack = 2, + + /// + /// IntOpaqueBlack specifies an opaque, integer format, black color. + /// + IntOpaqueBlack = 3, + + /// + /// FloatOpaqueWhite specifies an opaque, floating-point format, white color. + /// + FloatOpaqueWhite = 4, + + /// + /// IntOpaqueWhite specifies an opaque, integer format, white color. These colors are described in detail in Border Replacement^. + /// + IntOpaqueWhite = 5, + + /// + /// FloatCustomEXT + /// + FloatCustomEXT = 1000287003, + + /// + /// IntCustomEXT + /// + IntCustomEXT = 1000287004, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBufferCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBufferCreateFlags.gen.cs new file mode 100644 index 0000000..8297fe1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBufferCreateFlags.gen.cs @@ -0,0 +1,88 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferCreateFlagBits - Bitmask specifying additional parameters of a buffer + /// + /// + /// + /// Bits which can be set in VkBufferCreateInfo::flags, specifying + /// additional parameters of a buffer, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkBufferCreateFlagBits { + /// VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, + /// VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, + /// VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, + /// // Provided by VK_VERSION_1_1 + /// VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008, + /// // Provided by VK_VERSION_1_2 + /// VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000020, + /// // Provided by VK_KHR_video_maintenance1 + /// VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00000040, + /// // Provided by VK_EXT_buffer_device_address + /// VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, + /// // Provided by VK_KHR_buffer_device_address + /// VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, + /// } VkBufferCreateFlagBits; + /// + /// + [Flags] + public enum VkBufferCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// SparseBindingBit specifies that the buffer will be backed using sparse memory binding. + /// + SparseBindingBit = 0x00000001, + + /// + /// SparseResidencyBit specifies that the buffer can be partially backed using sparse memory binding. Buffers created with this flag must also be created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag. + /// + SparseResidencyBit = 0x00000002, + + /// + /// SparseAliasedBit specifies that the buffer will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another buffer (or another portion of the same buffer). Buffers created with this flag must also be created with the VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag. See Sparse Resource Features^ and Physical Device Features^ for details of the sparse memory features supported on a device. + /// + SparseAliasedBit = 0x00000004, + + /// + /// ProtectedBit + /// + ProtectedBit = 0x00000008, + + /// + /// DeviceAddressCaptureReplayBit + /// + DeviceAddressCaptureReplayBit = 0x00000010, + + /// + /// DescriptorBufferCaptureReplayBitEXT + /// + DescriptorBufferCaptureReplayBitEXT = 0x00000020, + + /// + /// VideoProfileIndependentBitKHR + /// + VideoProfileIndependentBitKHR = 0x00000040, + + /// + /// DeviceAddressCaptureReplayBitEXT + /// + DeviceAddressCaptureReplayBitEXT = DeviceAddressCaptureReplayBit, + + /// + /// DeviceAddressCaptureReplayBitKHR + /// + DeviceAddressCaptureReplayBitKHR = DeviceAddressCaptureReplayBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags.gen.cs new file mode 100644 index 0000000..575d9bd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags.gen.cs @@ -0,0 +1,238 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferUsageFlagBits - Bitmask specifying allowed usage of a buffer + /// + /// + /// + /// Bits which can be set in VkBufferCreateInfo::usage, specifying + /// usage behavior of a buffer, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkBufferUsageFlagBits { + /// VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, + /// VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, + /// VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, + /// VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, + /// VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, + /// VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, + /// VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, + /// VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, + /// VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, + /// // Provided by VK_VERSION_1_2 + /// VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT = 0x00020000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00004000, + /// // Provided by VK_EXT_transform_feedback + /// VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800, + /// // Provided by VK_EXT_transform_feedback + /// VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000, + /// // Provided by VK_EXT_conditional_rendering + /// VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000, + /// #endif + /// // Provided by VK_EXT_descriptor_heap + /// VK_BUFFER_USAGE_DESCRIPTOR_HEAP_BIT_EXT = 0x10000000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400, + /// // Provided by VK_KHR_video_encode_queue + /// VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000, + /// // Provided by VK_EXT_opacity_micromap + /// VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000, + /// // Provided by VK_EXT_opacity_micromap + /// VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT = 0x01000000, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_BUFFER_USAGE_TILE_MEMORY_BIT_QCOM = 0x08000000, + /// // Provided by VK_NV_ray_tracing + /// VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR, + /// // Provided by VK_EXT_buffer_device_address + /// VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, + /// // Provided by VK_KHR_buffer_device_address + /// VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, + /// } VkBufferUsageFlagBits; + /// + /// + [Flags] + public enum VkBufferUsageFlags : int + { + /// No flags set. + None = 0, + + /// + /// TransferSrcBit specifies that the buffer can be used as the source of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT^). + /// + TransferSrcBit = 0x00000001, + + /// + /// TransferDstBit specifies that the buffer can be used as the destination of a transfer command. + /// + TransferDstBit = 0x00000002, + + /// + /// UniformTexelBufferBit specifies that the buffer can be used to create a VkBufferView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER. + /// + UniformTexelBufferBit = 0x00000004, + + /// + /// StorageTexelBufferBit specifies that the buffer can be used to create a VkBufferView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER. + /// + StorageTexelBufferBit = 0x00000008, + + /// + /// UniformBufferBit specifies that the buffer can be used in a VkDescriptorBufferInfo suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC. + /// + UniformBufferBit = 0x00000010, + + /// + /// StorageBufferBit specifies that the buffer can be used in a VkDescriptorBufferInfo suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC. + /// + StorageBufferBit = 0x00000020, + + /// + /// IndexBufferBit specifies that the buffer is suitable for passing as the buffer parameter to vkCmdBindIndexBuffer. + /// + IndexBufferBit = 0x00000040, + + /// + /// VertexBufferBit specifies that the buffer is suitable for passing as an element of the pBuffers array to vkCmdBindVertexBuffers. + /// + VertexBufferBit = 0x00000080, + + /// + /// IndirectBufferBit specifies that the buffer is suitable for passing as the buffer parameter to vkCmdDrawIndirect, vkCmdDrawIndexedIndirect, or vkCmdDispatchIndirect. + /// + IndirectBufferBit = 0x00000100, + + /// + /// ShaderDeviceAddressBit + /// + ShaderDeviceAddressBit = 0x00020000, + + /// + /// VideoDecodeSrcBitKHR + /// + VideoDecodeSrcBitKHR = 0x00002000, + + /// + /// VideoDecodeDstBitKHR + /// + VideoDecodeDstBitKHR = 0x00004000, + + /// + /// TransformFeedbackBufferBitEXT + /// + TransformFeedbackBufferBitEXT = 0x00000800, + + /// + /// TransformFeedbackCounterBufferBitEXT + /// + TransformFeedbackCounterBufferBitEXT = 0x00001000, + + /// + /// ConditionalRenderingBitEXT + /// + ConditionalRenderingBitEXT = 0x00000200, + + /// + /// ExecutionGraphScratchBitAMDX + /// + ExecutionGraphScratchBitAMDX = 0x02000000, + + /// + /// DescriptorHeapBitEXT + /// + DescriptorHeapBitEXT = 0x10000000, + + /// + /// AccelerationStructureBuildInputReadOnlyBitKHR + /// + AccelerationStructureBuildInputReadOnlyBitKHR = 0x00080000, + + /// + /// AccelerationStructureStorageBitKHR + /// + AccelerationStructureStorageBitKHR = 0x00100000, + + /// + /// ShaderBindingTableBitKHR + /// + ShaderBindingTableBitKHR = 0x00000400, + + /// + /// VideoEncodeDstBitKHR + /// + VideoEncodeDstBitKHR = 0x00008000, + + /// + /// VideoEncodeSrcBitKHR + /// + VideoEncodeSrcBitKHR = 0x00010000, + + /// + /// SamplerDescriptorBufferBitEXT + /// + SamplerDescriptorBufferBitEXT = 0x00200000, + + /// + /// ResourceDescriptorBufferBitEXT + /// + ResourceDescriptorBufferBitEXT = 0x00400000, + + /// + /// PushDescriptorsDescriptorBufferBitEXT + /// + PushDescriptorsDescriptorBufferBitEXT = 0x04000000, + + /// + /// MicromapBuildInputReadOnlyBitEXT + /// + MicromapBuildInputReadOnlyBitEXT = 0x00800000, + + /// + /// MicromapStorageBitEXT + /// + MicromapStorageBitEXT = 0x01000000, + + /// + /// TileMemoryBitQCOM + /// + TileMemoryBitQCOM = 0x08000000, + + /// + /// RayTracingBitNV + /// + RayTracingBitNV = ShaderBindingTableBitKHR, + + /// + /// ShaderDeviceAddressBitEXT + /// + ShaderDeviceAddressBitEXT = ShaderDeviceAddressBit, + + /// + /// ShaderDeviceAddressBitKHR + /// + ShaderDeviceAddressBitKHR = ShaderDeviceAddressBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags2.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags2.gen.cs new file mode 100644 index 0000000..a312909 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBufferUsageFlags2.gen.cs @@ -0,0 +1,319 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferUsageFlagBits2 - Bitmask controlling how a pipeline is created + /// + /// + /// + /// Bits which can be set in VkBufferUsageFlags2CreateInfo::usage, + /// specifying usage behavior of a buffer, are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// // Flag bits for VkBufferUsageFlagBits2 + /// typedef VkFlags64 VkBufferUsageFlagBits2; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT = 0x00000001ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT = 0x00000002ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000008ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT = 0x00000010ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT = 0x00000020ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT = 0x00000040ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT = 0x00000080ULL; + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT = 0x00000100ULL; + /// // Provided by VK_VERSION_1_4 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT = 0x00020000ULL; + /// // Provided by VK_AMDX_shader_enqueue with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5 + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL; + /// #endif + /// // Provided by VK_EXT_descriptor_heap + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT = 0x10000000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_opacity_micromap, VK_EXT_opacity_micromap with VK_KHR_maintenance5 or VK_VERSION_1_4 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_opacity_micromap, VK_EXT_opacity_micromap with VK_KHR_maintenance5 or VK_VERSION_1_4 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = 0x00000010ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = 0x00000020ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = 0x00000040ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_conditional_rendering, VK_KHR_maintenance5 with VK_EXT_conditional_rendering + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400ULL; + /// // Provided by VK_KHR_maintenance5 with VK_NV_ray_tracing + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = 0x00000400ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_transform_feedback, VK_KHR_maintenance5 with VK_EXT_transform_feedback + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_transform_feedback, VK_KHR_maintenance5 with VK_EXT_transform_feedback + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue, VK_KHR_maintenance5 with VK_KHR_video_decode_queue + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue, VK_KHR_maintenance5 with VK_KHR_video_decode_queue + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue, VK_KHR_maintenance5 with VK_KHR_video_encode_queue + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue, VK_KHR_maintenance5 with VK_KHR_video_encode_queue + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000ULL; + /// // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_KHR_buffer_device_address or VK_EXT_buffer_device_address, VK_KHR_maintenance5 with VK_VERSION_1_2 or VK_KHR_buffer_device_address or VK_EXT_buffer_device_address + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000ULL; + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_extended_flags, VK_KHR_acceleration_structure with VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000ULL; + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_extended_flags, VK_KHR_acceleration_structure with VK_KHR_maintenance5 + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL; + /// // Provided by VK_AMDX_dense_geometry_format + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_COMPRESSED_DATA_DGF1_BIT_AMDX = 0x200000000ULL; + /// #endif + /// // Provided by VK_ARM_data_graph + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_DATA_GRAPH_FOREIGN_DESCRIPTOR_BIT_ARM = 0x20000000ULL; + /// // Provided by VK_QCOM_tile_memory_heap + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TILE_MEMORY_BIT_QCOM = 0x08000000ULL; + /// // Provided by VK_EXT_memory_decompression + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT = 0x100000000ULL; + /// // Provided by VK_EXT_device_generated_commands + /// static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000ULL; + /// + /// + [Flags] + public enum VkBufferUsageFlags2 : ulong + { + /// No flags set. + None = 0, + + /// + /// TransferSrcBit specifies that the buffer can be used as the source of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT^). + /// + TransferSrcBit = 0x00000001, + + /// + /// TransferDstBit specifies that the buffer can be used as the destination of a transfer command. + /// + TransferDstBit = 0x00000002, + + /// + /// UniformTexelBufferBit specifies that the buffer can be used to create a VkBufferView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER. + /// + UniformTexelBufferBit = 0x00000004, + + /// + /// StorageTexelBufferBit specifies that the buffer can be used to create a VkBufferView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER. + /// + StorageTexelBufferBit = 0x00000008, + + /// + /// UniformBufferBit specifies that the buffer can be used in a VkDescriptorBufferInfo suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC. + /// + UniformBufferBit = 0x00000010, + + /// + /// StorageBufferBit specifies that the buffer can be used in a VkDescriptorBufferInfo suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC. + /// + StorageBufferBit = 0x00000020, + + /// + /// IndexBufferBit specifies that the buffer is suitable for passing as the buffer parameter to vkCmdBindIndexBuffer. + /// + IndexBufferBit = 0x00000040, + + /// + /// VertexBufferBit specifies that the buffer is suitable for passing as an element of the pBuffers array to vkCmdBindVertexBuffers. + /// + VertexBufferBit = 0x00000080, + + /// + /// IndirectBufferBit specifies that the buffer is suitable for passing as the buffer parameter to vkCmdDrawIndirect, vkCmdDrawIndexedIndirect, or vkCmdDispatchIndirect. + /// + IndirectBufferBit = 0x00000100, + + /// + /// ShaderDeviceAddressBit + /// + ShaderDeviceAddressBit = 0x00020000, + + /// + /// ExecutionGraphScratchBitAMDX + /// + ExecutionGraphScratchBitAMDX = 0x02000000, + + /// + /// DescriptorHeapBitEXT + /// + DescriptorHeapBitEXT = 0x10000000, + + /// + /// MicromapBuildInputReadOnlyBitEXT + /// + MicromapBuildInputReadOnlyBitEXT = 0x00800000, + + /// + /// MicromapStorageBitEXT + /// + MicromapStorageBitEXT = 0x01000000, + + /// + /// TransferSrcBitKHR + /// + TransferSrcBitKHR = 0x00000001, + + /// + /// TransferDstBitKHR + /// + TransferDstBitKHR = 0x00000002, + + /// + /// UniformTexelBufferBitKHR + /// + UniformTexelBufferBitKHR = 0x00000004, + + /// + /// StorageTexelBufferBitKHR + /// + StorageTexelBufferBitKHR = 0x00000008, + + /// + /// UniformBufferBitKHR + /// + UniformBufferBitKHR = 0x00000010, + + /// + /// StorageBufferBitKHR + /// + StorageBufferBitKHR = 0x00000020, + + /// + /// IndexBufferBitKHR + /// + IndexBufferBitKHR = 0x00000040, + + /// + /// VertexBufferBitKHR + /// + VertexBufferBitKHR = 0x00000080, + + /// + /// IndirectBufferBitKHR + /// + IndirectBufferBitKHR = 0x00000100, + + /// + /// ConditionalRenderingBitEXT + /// + ConditionalRenderingBitEXT = 0x00000200, + + /// + /// ShaderBindingTableBitKHR + /// + ShaderBindingTableBitKHR = 0x00000400, + + /// + /// RayTracingBitNV + /// + RayTracingBitNV = 0x00000400, + + /// + /// TransformFeedbackBufferBitEXT + /// + TransformFeedbackBufferBitEXT = 0x00000800, + + /// + /// TransformFeedbackCounterBufferBitEXT + /// + TransformFeedbackCounterBufferBitEXT = 0x00001000, + + /// + /// VideoDecodeSrcBitKHR + /// + VideoDecodeSrcBitKHR = 0x00002000, + + /// + /// VideoDecodeDstBitKHR + /// + VideoDecodeDstBitKHR = 0x00004000, + + /// + /// VideoEncodeDstBitKHR + /// + VideoEncodeDstBitKHR = 0x00008000, + + /// + /// VideoEncodeSrcBitKHR + /// + VideoEncodeSrcBitKHR = 0x00010000, + + /// + /// ShaderDeviceAddressBitKHR + /// + ShaderDeviceAddressBitKHR = 0x00020000, + + /// + /// AccelerationStructureBuildInputReadOnlyBitKHR + /// + AccelerationStructureBuildInputReadOnlyBitKHR = 0x00080000, + + /// + /// AccelerationStructureStorageBitKHR + /// + AccelerationStructureStorageBitKHR = 0x00100000, + + /// + /// SamplerDescriptorBufferBitEXT + /// + SamplerDescriptorBufferBitEXT = 0x00200000, + + /// + /// ResourceDescriptorBufferBitEXT + /// + ResourceDescriptorBufferBitEXT = 0x00400000, + + /// + /// PushDescriptorsDescriptorBufferBitEXT + /// + PushDescriptorsDescriptorBufferBitEXT = 0x04000000, + + /// + /// CompressedDataDgf1BitAMDX + /// + CompressedDataDgf1BitAMDX = 0x200000000, + + /// + /// DataGraphForeignDescriptorBitARM + /// + DataGraphForeignDescriptorBitARM = 0x20000000, + + /// + /// TileMemoryBitQCOM + /// + TileMemoryBitQCOM = 0x08000000, + + /// + /// MemoryDecompressionBitEXT + /// + MemoryDecompressionBitEXT = 0x100000000, + + /// + /// PreprocessBufferBitEXT + /// + PreprocessBufferBitEXT = 0x80000000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureFlagsKHR.gen.cs new file mode 100644 index 0000000..dd5f0e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureFlagsKHR.gen.cs @@ -0,0 +1,210 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuildAccelerationStructureFlagBitsKHR - Bitmask specifying additional parameters for acceleration structure builds + /// + /// + /// + /// :refpage: VkBuildAccelerationStructureFlagBitsKHR + /// + /// + /// Bits which can be set in + /// specifying additional parameters for acceleration structure builds, are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkBuildAccelerationStructureFlagBitsKHR { + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001, + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002, + /// VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004, + /// VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008, + /// VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010, + /// // Provided by VK_NV_ray_tracing_motion_blur + /// VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020, + /// // Provided by VK_EXT_opacity_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT = 0x00000100, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV = 0x00000200, + /// #endif + /// // Provided by VK_KHR_ray_tracing_position_fetch + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR = 0x00000800, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV = 0x00001000, + /// // Provided by VK_KHR_opacity_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR = 0x00000040, + /// // Provided by VK_KHR_opacity_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR = 0x00000080, + /// // Provided by VK_KHR_opacity_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_MICROMAP_LOSSY_BIT_KHR = 0x00000400, + /// // Provided by VK_NV_ray_tracing + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT is a legacy alias + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT, + /// // Provided by VK_EXT_opacity_micromap + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT is a legacy alias + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT, + /// // Provided by VK_EXT_opacity_micromap + /// // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT is a legacy alias + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV is a legacy alias + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV, + /// #endif + /// // Provided by VK_KHR_ray_tracing_position_fetch + /// // VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR is a legacy alias + /// VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR, + /// } VkBuildAccelerationStructureFlagBitsKHR; + /// + /// + [Flags] + public enum VkBuildAccelerationStructureFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// AllowUpdateBitKHR specifies that the specified acceleration structure can be updated with . + /// + AllowUpdateBitKHR = 0x00000001, + + /// + /// AllowCompactionBitKHR specifies that the specified acceleration structure can act as the source for a copy acceleration structure command with mode of VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR to produce a compacted acceleration structure. + /// + AllowCompactionBitKHR = 0x00000002, + + /// + /// PreferFastTraceBitKHR specifies that the given acceleration structure build should prioritize trace performance over build time. + /// + PreferFastTraceBitKHR = 0x00000004, + + /// + /// PreferFastBuildBitKHR specifies that the given acceleration structure build should prioritize build time over trace performance. + /// + PreferFastBuildBitKHR = 0x00000008, + + /// + /// LowMemoryBitKHR specifies that this acceleration structure should minimize the size of the scratch memory and the final result acceleration structure, potentially at the expense of build time or trace performance. [NOTE] + /// + LowMemoryBitKHR = 0x00000010, + + /// + /// MotionBitNV + /// + MotionBitNV = 0x00000020, + + /// + /// AllowOpacityMicromapDataUpdateBitEXT + /// + AllowOpacityMicromapDataUpdateBitEXT = 0x00000100, + + /// + /// AllowDisplacementMicromapUpdateBitNV + /// + AllowDisplacementMicromapUpdateBitNV = 0x00000200, + + /// + /// AllowDataAccessBitKHR + /// + AllowDataAccessBitKHR = 0x00000800, + + /// + /// AllowClusterOpacityMicromapsBitNV + /// + AllowClusterOpacityMicromapsBitNV = 0x00001000, + + /// + /// AllowOpacityMicromapUpdateBitKHR + /// + AllowOpacityMicromapUpdateBitKHR = 0x00000040, + + /// + /// AllowDisableOpacityMicromapsBitKHR + /// + AllowDisableOpacityMicromapsBitKHR = 0x00000080, + + /// + /// MicromapLossyBitKHR + /// + MicromapLossyBitKHR = 0x00000400, + + /// + /// AllowUpdateBitNV + /// + AllowUpdateBitNV = AllowUpdateBitKHR, + + /// + /// AllowCompactionBitNV + /// + AllowCompactionBitNV = AllowCompactionBitKHR, + + /// + /// PreferFastTraceBitNV + /// + PreferFastTraceBitNV = PreferFastTraceBitKHR, + + /// + /// PreferFastBuildBitNV + /// + PreferFastBuildBitNV = PreferFastBuildBitKHR, + + /// + /// LowMemoryBitNV + /// + LowMemoryBitNV = LowMemoryBitKHR, + + /// + /// AllowOpacityMicromapUpdateBitEXT + /// + AllowOpacityMicromapUpdateBitEXT = AllowOpacityMicromapUpdateBitKHR, + + /// + /// AllowOpacityMicromapUpdateEXT + /// + AllowOpacityMicromapUpdateEXT = AllowOpacityMicromapUpdateBitEXT, + + /// + /// AllowDisableOpacityMicromapsBitEXT + /// + AllowDisableOpacityMicromapsBitEXT = AllowDisableOpacityMicromapsBitKHR, + + /// + /// AllowDisableOpacityMicromapsEXT + /// + AllowDisableOpacityMicromapsEXT = AllowDisableOpacityMicromapsBitEXT, + + /// + /// AllowOpacityMicromapDataUpdateEXT + /// + AllowOpacityMicromapDataUpdateEXT = AllowOpacityMicromapDataUpdateBitEXT, + + /// + /// AllowDisplacementMicromapUpdateNV + /// + AllowDisplacementMicromapUpdateNV = AllowDisplacementMicromapUpdateBitNV, + + /// + /// AllowDataAccessKHR + /// + AllowDataAccessKHR = AllowDataAccessBitKHR, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureModeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureModeKHR.gen.cs new file mode 100644 index 0000000..933b889 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBuildAccelerationStructureModeKHR.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuildAccelerationStructureModeKHR - Enum specifying the type of build operation to perform + /// + /// + /// + /// :refpage: VkBuildAccelerationStructureModeKHR + /// + /// + /// The VkBuildAccelerationStructureModeKHR enumeration is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkBuildAccelerationStructureModeKHR { + /// VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0, + /// VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1, + /// } VkBuildAccelerationStructureModeKHR; + /// + /// + public enum VkBuildAccelerationStructureModeKHR : int + { + /// + /// BuildKHR specifies that the destination acceleration structure will be built using the specified geometries. + /// + BuildKHR = 0, + + /// + /// UpdateKHR specifies that the destination acceleration structure will be built using data in a source acceleration structure, updated by the specified geometries. + /// + UpdateKHR = 1, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBuildMicromapFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBuildMicromapFlagsEXT.gen.cs new file mode 100644 index 0000000..f653d7e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBuildMicromapFlagsEXT.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap builds + /// + /// + /// + /// :refpage: VkBuildMicromapFlagBitsEXT + /// + /// + /// Bits which can be set in VkMicromapBuildInfoEXT::flags + /// specifying additional parameters for micromap builds, are: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef enum VkBuildMicromapFlagBitsEXT { + /// VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 0x00000001, + /// VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 0x00000002, + /// VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 0x00000004, + /// } VkBuildMicromapFlagBitsEXT; + /// + /// + [Flags] + public enum VkBuildMicromapFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// PreferFastTraceBitEXT specifies that the given micromap build should prioritize trace performance over build time. + /// + PreferFastTraceBitEXT = 0x00000001, + + /// + /// PreferFastBuildBitEXT specifies that the given micromap build should prioritize build time over trace performance. + /// + PreferFastBuildBitEXT = 0x00000002, + + /// + /// AllowCompactionBitEXT specifies that the micromap can act as the source for a copy micromap command^ with mode of VK_COPY_MICROMAP_MODE_COMPACT_EXT to produce a compacted micromap. + /// + AllowCompactionBitEXT = 0x00000004, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkBuildMicromapModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkBuildMicromapModeEXT.gen.cs new file mode 100644 index 0000000..9810ebc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkBuildMicromapModeEXT.gen.cs @@ -0,0 +1,32 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuildMicromapModeEXT - Enum specifying the type of build operation to perform + /// + /// + /// + /// :refpage: VkBuildMicromapModeEXT + /// + /// + /// The VkBuildMicromapModeEXT enumeration is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef enum VkBuildMicromapModeEXT { + /// VK_BUILD_MICROMAP_MODE_BUILD_EXT = 0, + /// } VkBuildMicromapModeEXT; + /// + /// + public enum VkBuildMicromapModeEXT : int + { + /// + /// BuildEXT specifies that the destination micromap will be built using the specified data. + /// + BuildEXT = 0, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkChromaLocation.gen.cs b/Brutal.Vulkan/Generated/Enums/VkChromaLocation.gen.cs new file mode 100644 index 0000000..cb1f0c7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkChromaLocation.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkChromaLocation - Position of downsampled chroma samples + /// + /// + /// + /// The VkChromaLocation enum defines the location of downsampled chroma + /// component samples relative to the luma samples, and is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkChromaLocation { + /// VK_CHROMA_LOCATION_COSITED_EVEN = 0, + /// VK_CHROMA_LOCATION_MIDPOINT = 1, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_CHROMA_LOCATION_COSITED_EVEN_KHR = VK_CHROMA_LOCATION_COSITED_EVEN, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_CHROMA_LOCATION_MIDPOINT_KHR = VK_CHROMA_LOCATION_MIDPOINT, + /// } VkChromaLocation; + /// + /// + public enum VkChromaLocation : int + { + /// + /// CositedEven specifies that downsampled chroma samples are aligned with luma samples with even coordinates. + /// + CositedEven = 0, + + /// + /// Midpoint specifies that downsampled chroma samples are located half way between each even luma sample and the nearest higher odd luma sample. + /// + Midpoint = 1, + + /// + /// CositedEvenKHR + /// + CositedEvenKHR = CositedEven, + + /// + /// MidpointKHR + /// + MidpointKHR = Midpoint, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureAddressResolutionFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureAddressResolutionFlagsNV.gen.cs new file mode 100644 index 0000000..7c932df --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureAddressResolutionFlagsNV.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureAddressResolutionFlagBitsNV - Bitmask specifying address resolution flags in cluster acceleration structure + /// + /// + /// + /// Bits which can be set in + /// VkClusterAccelerationStructureCommandsInfoNV::addressResolutionFlags, + /// specifying how the device address in + /// VkClusterAccelerationStructureCommandsInfoNV are interpreted, are: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureAddressResolutionFlagBitsNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_NONE_NV = 0, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV = 0x00000001, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV = 0x00000002, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV = 0x00000004, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_SIZES_ARRAY_BIT_NV = 0x00000008, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV = 0x00000010, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV = 0x00000020, + /// } VkClusterAccelerationStructureAddressResolutionFlagBitsNV; + /// + /// + [Flags] + public enum VkClusterAccelerationStructureAddressResolutionFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// NoneNV specifies that no address resolution flags are provided. + /// + NoneNV = 0, + + /// + /// IndirectedDstImplicitDataBitNV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::dstImplicitData. + /// + IndirectedDstImplicitDataBitNV = 0x00000001, + + /// + /// IndirectedScratchDataBitNV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::scratchData. + /// + IndirectedScratchDataBitNV = 0x00000002, + + /// + /// IndirectedDstAddressArrayBitNV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::dstAddressesArray. + /// + IndirectedDstAddressArrayBitNV = 0x00000004, + + /// + /// IndirectedDstSizesArrayBitNV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::dstSizesArray. + /// + IndirectedDstSizesArrayBitNV = 0x00000008, + + /// + /// IndirectedSrcInfosArrayBitNV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::srcInfosArray. + /// + IndirectedSrcInfosArrayBitNV = 0x00000010, + + /// + /// IndirectedSrcInfosCountBitNV specifies another level of indirection when reading VkClusterAccelerationStructureCommandsInfoNV::srcInfosCount. + /// + IndirectedSrcInfosCountBitNV = 0x00000020, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureClusterFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureClusterFlagsNV.gen.cs new file mode 100644 index 0000000..c741d1e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureClusterFlagsNV.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureClusterFlagBitsNV - Bitmask specifying cluster acceleration structure flags + /// + /// + /// + /// Bits which can be set in + /// VkClusterAccelerationStructureBuildTriangleClusterInfoNV::clusterFlags, + /// specifying flags for clusters in an acceleration structure, are: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureClusterFlagBitsNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_CLUSTER_ALLOW_DISABLE_OPACITY_MICROMAPS_NV = 0x00000001, + /// } VkClusterAccelerationStructureClusterFlagBitsNV; + /// + /// + [Flags] + public enum VkClusterAccelerationStructureClusterFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// AllowDisableOpacityMicromapsNV specifies that the specified cluster acceleration structure may: be referenced in an instance with VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT set. + /// + AllowDisableOpacityMicromapsNV = 0x00000001, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureGeometryFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureGeometryFlagsNV.gen.cs new file mode 100644 index 0000000..b5a4dc1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureGeometryFlagsNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureGeometryFlagBitsNV - Bitmask specifying geometry flags for cluster acceleration structure + /// + /// + /// + /// Bits which can be set in + /// VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV::geometryFlags, + /// specifying geometry flags for cluster acceleration structure, are: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureGeometryFlagBitsNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_CULL_DISABLE_BIT_NV = 0x00000001, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_NO_DUPLICATE_ANYHIT_INVOCATION_BIT_NV = 0x00000002, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_OPAQUE_BIT_NV = 0x00000004, + /// } VkClusterAccelerationStructureGeometryFlagBitsNV; + /// + /// + [Flags] + public enum VkClusterAccelerationStructureGeometryFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// CullDisableBitNV disables face culling for this geometry. + /// + CullDisableBitNV = 0x00000001, + + /// + /// NoDuplicateAnyhitInvocationBitNV specifies that the implementation must only call the any-hit shader a single time for each primitive in this geometry. If this bit is absent an implementation may: invoke the any-hit shader more than once for this geometry. + /// + NoDuplicateAnyhitInvocationBitNV = 0x00000002, + + /// + /// OpaqueBitNV specifies that this geometry does not invoke the any-hit shaders even if present in a hit group. + /// + OpaqueBitNV = 0x00000004, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureIndexFormatFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureIndexFormatFlagsNV.gen.cs new file mode 100644 index 0000000..d3f9e0f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureIndexFormatFlagsNV.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureIndexFormatFlagBitsNV - Bits specifying the index type in the index buffer + /// + /// + /// + /// Bits that can be set in + /// VkClusterAccelerationStructureBuildTriangleClusterInfoNV::indexType, + /// VkClusterAccelerationStructureBuildTriangleClusterInfoNV::opacityMicromapIndexType, + /// VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV::indexType + /// and + /// VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV::opacityMicromapIndexType + /// specifying the index type is one of: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureIndexFormatFlagBitsNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_8BIT_NV = 0x00000001, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_16BIT_NV = 0x00000002, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_32BIT_NV = 0x00000004, + /// } VkClusterAccelerationStructureIndexFormatFlagBitsNV; + /// + /// + [Flags] + public enum VkClusterAccelerationStructureIndexFormatFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// _8BitNV specifies that 8-bit indices will be used. + /// + _8BitNV = 0x00000001, + + /// + /// _16BitNV specifies that 16-bit indices will be used. + /// + _16BitNV = 0x00000002, + + /// + /// _32BitNV specifies that 32-bit indices will be used. + /// + _32BitNV = 0x00000004, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpModeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpModeNV.gen.cs new file mode 100644 index 0000000..8f3bed7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpModeNV.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureOpModeNV - Enum providing the mode of operation + /// + /// + /// + /// Values which can be set in VkClusterAccelerationStructureOpModeNV + /// are: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureOpModeNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV = 0, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV = 1, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV = 2, + /// } VkClusterAccelerationStructureOpModeNV; + /// + /// + public enum VkClusterAccelerationStructureOpModeNV : int + { + /// + /// ImplicitDestinationsNV specifies that the build or move operation will implicitly distribute built or compacted cluster acceleration structures starting at the address provided in VkClusterAccelerationStructureCommandsInfoNV::dstImplicitData. If a move operation is being performed, the acceleration structures will be tightly compacted. + /// + ImplicitDestinationsNV = 0, + + /// + /// ExplicitDestinationsNV specifies that the build or move operation will explicitly write built or compacted cluster acceleration structures in the array of addresses provided in VkClusterAccelerationStructureCommandsInfoNV::dstAddressesArray. + /// + ExplicitDestinationsNV = 1, + + /// + /// ComputeSizesNV specifies that computed cluster acceleration structure sizes will be written to VkClusterAccelerationStructureCommandsInfoNV::dstSizesArray. + /// + ComputeSizesNV = 2, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpTypeNV.gen.cs new file mode 100644 index 0000000..b1bdd42 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureOpTypeNV.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureOpTypeNV - Enum providing the type of operation + /// + /// + /// + /// Values which can be set in VkClusterAccelerationStructureOpTypeNV + /// are: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureOpTypeNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV = 0, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV = 1, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV = 2, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV = 3, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV = 4, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_GET_CLUSTER_TEMPLATE_INDICES_NV = 5, + /// } VkClusterAccelerationStructureOpTypeNV; + /// + /// + public enum VkClusterAccelerationStructureOpTypeNV : int + { + /// + /// MoveObjectsNV specifies that a cluster acceleration structure, cluster acceleration structure template or a bottom level acceleration structure built from cluster acceleration structures will be moved. If a cluster acceleration structure is moved, the bottom level cluster acceleration structures containing it will have to be re-built. If used with VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, it returns the size of existing cluster acceleration structures. + /// + MoveObjectsNV = 0, + + /// + /// BuildClustersBottomLevelNV specifies that bottom level cluster acceleration structures will be built. + /// + BuildClustersBottomLevelNV = 1, + + /// + /// BuildTriangleClusterNV specifies that cluster acceleration structures will be built. + /// + BuildTriangleClusterNV = 2, + + /// + /// BuildTriangleClusterTemplateNV specifies that a template for cluster acceleration structure will be built. + /// + BuildTriangleClusterTemplateNV = 3, + + /// + /// InstantiateTriangleClusterNV specifies that a template for a cluster acceleration structure will be instantiated, resulting in a built cluster acceleration structure. + /// + InstantiateTriangleClusterNV = 4, + + /// + /// GetClusterTemplateIndicesNV specifies that the vertex indices of the cluster template acceleration structure will be fetched. + /// + GetClusterTemplateIndicesNV = 5, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureTypeNV.gen.cs new file mode 100644 index 0000000..a236d8a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkClusterAccelerationStructureTypeNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureTypeNV - Enum providing the type of cluster acceleration structure + /// + /// + /// + /// Values which can be set in VkClusterAccelerationStructureTypeNV are: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef enum VkClusterAccelerationStructureTypeNV { + /// VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_CLUSTERS_BOTTOM_LEVEL_NV = 0, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_NV = 1, + /// VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_TEMPLATE_NV = 2, + /// } VkClusterAccelerationStructureTypeNV; + /// + /// + public enum VkClusterAccelerationStructureTypeNV : int + { + /// + /// ClustersBottomLevelNV specifies a bottom level cluster acceleration structure. + /// + ClustersBottomLevelNV = 0, + + /// + /// TriangleClusterNV specifies a cluster acceleration structure. + /// + TriangleClusterNV = 1, + + /// + /// TriangleClusterTemplateNV specifies a template cluster acceleration structure. + /// + TriangleClusterTemplateNV = 2, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCoarseSampleOrderTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCoarseSampleOrderTypeNV.gen.cs new file mode 100644 index 0000000..155e2ca --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCoarseSampleOrderTypeNV.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types + /// + /// + /// + /// The type VkCoarseSampleOrderTypeNV specifies the technique used to + /// order coverage samples in fragments larger than one pixel, and is defined + /// as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef enum VkCoarseSampleOrderTypeNV { + /// VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0, + /// VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1, + /// VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2, + /// VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3, + /// } VkCoarseSampleOrderTypeNV; + /// + /// + public enum VkCoarseSampleOrderTypeNV : int + { + /// + /// DefaultNV specifies that coverage samples will be ordered in an implementation-dependent manner. + /// + DefaultNV = 0, + + /// + /// CustomNV specifies that coverage samples will be ordered according to the array of custom orderings provided in either the pCustomSampleOrders member of VkPipelineViewportCoarseSampleOrderStateCreateInfoNV or the pCustomSampleOrders member of vkCmdSetCoarseSampleOrderNV. + /// + CustomNV = 1, + + /// + /// PixelMajorNV specifies that coverage samples will be ordered sequentially, sorted first by pixel coordinate (in row-major order) and then by sample index^. + /// + PixelMajorNV = 2, + + /// + /// SampleMajorNV specifies that coverage samples will be ordered sequentially, sorted first by sample index^ and then by pixel coordinate (in row-major order). + /// + SampleMajorNV = 3, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkColorComponentFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkColorComponentFlags.gen.cs new file mode 100644 index 0000000..60a7920 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkColorComponentFlags.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkColorComponentFlagBits - Bitmask controlling which components are written to the framebuffer + /// + /// + /// + /// Bits which can be set in + /// VkPipelineColorBlendAttachmentState::colorWriteMask, determining + /// whether the final color values R, G, B and A are written to the + /// framebuffer attachment, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkColorComponentFlagBits { + /// VK_COLOR_COMPONENT_R_BIT = 0x00000001, + /// VK_COLOR_COMPONENT_G_BIT = 0x00000002, + /// VK_COLOR_COMPONENT_B_BIT = 0x00000004, + /// VK_COLOR_COMPONENT_A_BIT = 0x00000008, + /// } VkColorComponentFlagBits; + /// + /// + [Flags] + public enum VkColorComponentFlags : int + { + /// No flags set. + None = 0, + + /// + /// RBit specifies that the R value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified. + /// + RBit = 0x00000001, + + /// + /// GBit specifies that the G value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified. + /// + GBit = 0x00000002, + + /// + /// BBit specifies that the B value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified. + /// + BBit = 0x00000004, + + /// + /// ABit specifies that the A value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified. The color write mask operation is applied regardless of whether blending is enabled. + /// + ABit = 0x00000008, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkColorSpaceKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkColorSpaceKHR.gen.cs new file mode 100644 index 0000000..ebab87f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkColorSpaceKHR.gen.cs @@ -0,0 +1,146 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkColorSpaceKHR - Supported color space of the presentation engine + /// + /// + /// + /// Possible values of VkSurfaceFormatKHR::colorSpace, specifying + /// the color spaces that a presentation engine can accept, are: + /// + /// + /// // Provided by VK_KHR_surface + /// typedef enum VkColorSpaceKHR { + /// VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, + /// // Provided by VK_EXT_swapchain_colorspace + /// // VK_COLOR_SPACE_DOLBYVISION_EXT is legacy, but no reason was given in the API XML + /// VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, + /// // Provided by VK_EXT_swapchain_colorspace + /// VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, + /// // Provided by VK_AMD_display_native_hdr + /// VK_COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000, + /// // VK_COLORSPACE_SRGB_NONLINEAR_KHR is a legacy alias + /// VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, + /// // Provided by VK_EXT_swapchain_colorspace + /// // VK_COLOR_SPACE_DCI_P3_LINEAR_EXT is a legacy alias + /// VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT, + /// } VkColorSpaceKHR; + /// + /// + public enum VkColorSpaceKHR : int + { + /// + /// SRGBNonlinearKHR specifies support for the images in sRGB color space, encoded according to the sRGB specification. + /// + SRGBNonlinearKHR = 0, + + /// + /// DisplayP3NonlinearEXT + /// + DisplayP3NonlinearEXT = 1000104001, + + /// + /// ExtendedSRGBLinearEXT + /// + ExtendedSRGBLinearEXT = 1000104002, + + /// + /// DisplayP3LinearEXT + /// + DisplayP3LinearEXT = 1000104003, + + /// + /// DciP3NonlinearEXT + /// + DciP3NonlinearEXT = 1000104004, + + /// + /// Bt709LinearEXT + /// + Bt709LinearEXT = 1000104005, + + /// + /// Bt709NonlinearEXT + /// + Bt709NonlinearEXT = 1000104006, + + /// + /// Bt2020LinearEXT + /// + Bt2020LinearEXT = 1000104007, + + /// + /// Hdr10St2084EXT + /// + Hdr10St2084EXT = 1000104008, + + /// + /// DolbyvisionEXT + /// + DolbyvisionEXT = 1000104009, + + /// + /// Hdr10HlgEXT + /// + Hdr10HlgEXT = 1000104010, + + /// + /// AdobergbLinearEXT + /// + AdobergbLinearEXT = 1000104011, + + /// + /// AdobergbNonlinearEXT + /// + AdobergbNonlinearEXT = 1000104012, + + /// + /// PassThroughEXT + /// + PassThroughEXT = 1000104013, + + /// + /// ExtendedSRGBNonlinearEXT + /// + ExtendedSRGBNonlinearEXT = 1000104014, + + /// + /// DisplayNativeAMD + /// + DisplayNativeAMD = 1000213000, + + /// + /// DciP3LinearEXT + /// + DciP3LinearEXT = DisplayP3LinearEXT, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCommandBufferLevel.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCommandBufferLevel.gen.cs new file mode 100644 index 0000000..1cf9d99 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCommandBufferLevel.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferLevel - Enumerant specifying a command buffer level + /// + /// + /// + /// Possible values of VkCommandBufferAllocateInfo::level, + /// specifying the command buffer level, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCommandBufferLevel { + /// VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0, + /// VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1, + /// } VkCommandBufferLevel; + /// + /// + public enum VkCommandBufferLevel : int + { + /// + /// Primary specifies a primary command buffer. + /// + Primary = 0, + + /// + /// Secondary specifies a secondary command buffer. + /// + Secondary = 1, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCommandBufferResetFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCommandBufferResetFlags.gen.cs new file mode 100644 index 0000000..96cf7e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCommandBufferResetFlags.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferResetFlagBits - Bitmask controlling behavior of a command buffer reset + /// + /// + /// + /// Bits which can be set in vkResetCommandBuffer::flags, + /// controlling the reset operation, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCommandBufferResetFlagBits { + /// VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, + /// } VkCommandBufferResetFlagBits; + /// + /// + [Flags] + public enum VkCommandBufferResetFlags : int + { + /// No flags set. + None = 0, + + /// + /// ReleaseResourcesBit specifies that most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may: hold onto memory resources and reuse them when recording commands. commandBuffer is moved to the initial state^. + /// + ReleaseResourcesBit = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCommandBufferUsageFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCommandBufferUsageFlags.gen.cs new file mode 100644 index 0000000..272ac1a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCommandBufferUsageFlags.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command buffer + /// + /// + /// + /// Bits which can be set in VkCommandBufferBeginInfo::flags, + /// specifying usage behavior for a command buffer, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCommandBufferUsageFlagBits { + /// VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, + /// VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, + /// VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, + /// } VkCommandBufferUsageFlagBits; + /// + /// + [Flags] + public enum VkCommandBufferUsageFlags : int + { + /// No flags set. + None = 0, + + /// + /// OneTimeSubmitBit specifies that each recording of the command buffer will only be submitted once, and the command buffer will be reset and recorded again between each submission. + /// + OneTimeSubmitBit = 0x00000001, + + /// + /// RenderPassContinueBit specifies that a secondary command buffer is considered to be entirely inside a render pass. If this is a primary command buffer, then this bit is ignored. + /// + RenderPassContinueBit = 0x00000002, + + /// + /// SimultaneousUseBit specifies that a command buffer can be resubmitted to any queue of the same queue family while it is in the pending state, and recorded into multiple primary command buffers. + /// + SimultaneousUseBit = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCommandPoolCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCommandPoolCreateFlags.gen.cs new file mode 100644 index 0000000..19cde64 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCommandPoolCreateFlags.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command pool + /// + /// + /// + /// Bits which can be set in VkCommandPoolCreateInfo::flags, + /// specifying usage behavior for a command pool, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCommandPoolCreateFlagBits { + /// VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, + /// VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, + /// // Provided by VK_VERSION_1_1 + /// VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004, + /// } VkCommandPoolCreateFlagBits; + /// + /// + [Flags] + public enum VkCommandPoolCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// TransientBit specifies that command buffers allocated from the pool will be short-lived, meaning that they will be reset or freed in a relatively short timeframe. This flag may: be used by the implementation to control memory allocation behavior within the pool. + /// + TransientBit = 0x00000001, + + /// + /// ResetCommandBufferBit allows any command buffer allocated from a pool to be individually reset to the initial state^; either by calling vkResetCommandBuffer, or via the implicit reset when calling vkBeginCommandBuffer. If this flag is not set on a pool, then vkResetCommandBuffer must not be called for any command buffer allocated from that pool. + /// + ResetCommandBufferBit = 0x00000002, + + /// + /// ProtectedBit + /// + ProtectedBit = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCommandPoolResetFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCommandPoolResetFlags.gen.cs new file mode 100644 index 0000000..b32e0dd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCommandPoolResetFlags.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool reset + /// + /// + /// + /// Bits which can be set in vkResetCommandPool::flags, controlling + /// the reset operation, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCommandPoolResetFlagBits { + /// VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, + /// } VkCommandPoolResetFlagBits; + /// + /// + [Flags] + public enum VkCommandPoolResetFlags : int + { + /// No flags set. + None = 0, + + /// + /// ReleaseResourcesBit specifies that resetting a command pool recycles all of the resources from the command pool back to the system. + /// + ReleaseResourcesBit = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCompareOp.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCompareOp.gen.cs new file mode 100644 index 0000000..27d2f96 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCompareOp.gen.cs @@ -0,0 +1,74 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCompareOp - Comparison operator for depth, stencil, and sampler operations + /// + /// + /// + /// Comparison operators compare a reference and a test value, and return + /// a true ("`passed`") or false ("`failed`") value depending on the comparison + /// operator chosen. + /// The supported operators are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCompareOp { + /// VK_COMPARE_OP_NEVER = 0, + /// VK_COMPARE_OP_LESS = 1, + /// VK_COMPARE_OP_EQUAL = 2, + /// VK_COMPARE_OP_LESS_OR_EQUAL = 3, + /// VK_COMPARE_OP_GREATER = 4, + /// VK_COMPARE_OP_NOT_EQUAL = 5, + /// VK_COMPARE_OP_GREATER_OR_EQUAL = 6, + /// VK_COMPARE_OP_ALWAYS = 7, + /// } VkCompareOp; + /// + /// + public enum VkCompareOp : int + { + /// + /// Never specifies that the comparison always evaluates false. + /// + Never = 0, + + /// + /// Less specifies that the comparison evaluates reference < test. + /// + Less = 1, + + /// + /// Equal specifies that the comparison evaluates reference = test. + /// + Equal = 2, + + /// + /// LessOrEqual specifies that the comparison evaluates reference <= test. + /// + LessOrEqual = 3, + + /// + /// Greater specifies that the comparison evaluates reference > test. + /// + Greater = 4, + + /// + /// NotEqual specifies that the comparison evaluates reference != test. + /// + NotEqual = 5, + + /// + /// GreaterOrEqual specifies that the comparison evaluates reference >= test. + /// + GreaterOrEqual = 6, + + /// + /// Always specifies that the comparison always evaluates true. Comparison operators are used for: + /// + Always = 7, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkComponentSwizzle.gen.cs b/Brutal.Vulkan/Generated/Enums/VkComponentSwizzle.gen.cs new file mode 100644 index 0000000..7180ea4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkComponentSwizzle.gen.cs @@ -0,0 +1,66 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkComponentSwizzle - Specify how a component is swizzled + /// + /// + /// + /// Possible values of the members of VkComponentMapping, specifying the + /// component values placed in each component of the output vector, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkComponentSwizzle { + /// VK_COMPONENT_SWIZZLE_IDENTITY = 0, + /// VK_COMPONENT_SWIZZLE_ZERO = 1, + /// VK_COMPONENT_SWIZZLE_ONE = 2, + /// VK_COMPONENT_SWIZZLE_R = 3, + /// VK_COMPONENT_SWIZZLE_G = 4, + /// VK_COMPONENT_SWIZZLE_B = 5, + /// VK_COMPONENT_SWIZZLE_A = 6, + /// } VkComponentSwizzle; + /// + /// + public enum VkComponentSwizzle : int + { + /// + /// Identity specifies that the component is set to the identity swizzle. + /// + Identity = 0, + + /// + /// Zero specifies that the component is set to zero. + /// + Zero = 1, + + /// + /// One specifies that the component is set to either 1 or 1.0, depending on whether the type of the image view format is integer or floating-point respectively, as determined by the Format Definition^ section for each VkFormat. + /// + One = 2, + + /// + /// R specifies that the component is set to the value of the R component of the image. + /// + R = 3, + + /// + /// G specifies that the component is set to the value of the G component of the image. + /// + G = 4, + + /// + /// B specifies that the component is set to the value of the B component of the image. + /// + B = 5, + + /// + /// A specifies that the component is set to the value of the A component of the image. [[resources-image-views-identity-mappings]] Setting the identity swizzle on a component is equivalent to setting the identity mapping on that component. That is: [[resources-component-mappings-equivalent-to-swizzle_identity-table]] .Component Mappings Equivalent To VK_COMPONENT_SWIZZLE_IDENTITY [options="header"] | + /// + A = 6, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkComponentTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkComponentTypeKHR.gen.cs new file mode 100644 index 0000000..497998b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkComponentTypeKHR.gen.cs @@ -0,0 +1,250 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkComponentTypeKHR - Specify SPIR-V cooperative matrix component type + /// + /// + /// + /// Possible values for VkComponentTypeKHR include: + /// + /// + /// // Provided by VK_KHR_cooperative_matrix, VK_NV_cooperative_vector + /// typedef enum VkComponentTypeKHR { + /// VK_COMPONENT_TYPE_FLOAT16_KHR = 0, + /// VK_COMPONENT_TYPE_FLOAT32_KHR = 1, + /// VK_COMPONENT_TYPE_FLOAT64_KHR = 2, + /// VK_COMPONENT_TYPE_SINT8_KHR = 3, + /// VK_COMPONENT_TYPE_SINT16_KHR = 4, + /// VK_COMPONENT_TYPE_SINT32_KHR = 5, + /// VK_COMPONENT_TYPE_SINT64_KHR = 6, + /// VK_COMPONENT_TYPE_UINT8_KHR = 7, + /// VK_COMPONENT_TYPE_UINT16_KHR = 8, + /// VK_COMPONENT_TYPE_UINT32_KHR = 9, + /// VK_COMPONENT_TYPE_UINT64_KHR = 10, + /// // Provided by VK_KHR_cooperative_matrix with VK_KHR_shader_bfloat16 + /// VK_COMPONENT_TYPE_BFLOAT16_KHR = 1000141000, + /// // Provided by VK_NV_cooperative_vector + /// VK_COMPONENT_TYPE_SINT8_PACKED_NV = 1000491000, + /// // Provided by VK_NV_cooperative_vector + /// VK_COMPONENT_TYPE_UINT8_PACKED_NV = 1000491001, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_float8 + /// VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT = 1000491002, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_float8 + /// VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT = 1000491003, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types + /// VK_COMPONENT_TYPE_FLOAT6_E2M3_EXT = 1000672000, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types + /// VK_COMPONENT_TYPE_FLOAT6_E3M2_EXT = 1000672001, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types + /// VK_COMPONENT_TYPE_FLOAT4_E2M1_EXT = 1000672002, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types + /// VK_COMPONENT_TYPE_FLOAT8_UNSIGNED_E8M0_EXT = 1000672003, + /// // Provided by VK_KHR_cooperative_matrix with VK_EXT_shader_ocp_microscaling_types + /// VK_COMPONENT_TYPE_MXINT8_EXT = 1000672004, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_FLOAT16_NV = VK_COMPONENT_TYPE_FLOAT16_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_FLOAT32_NV = VK_COMPONENT_TYPE_FLOAT32_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_FLOAT64_NV = VK_COMPONENT_TYPE_FLOAT64_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_SINT8_NV = VK_COMPONENT_TYPE_SINT8_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_SINT16_NV = VK_COMPONENT_TYPE_SINT16_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_SINT32_NV = VK_COMPONENT_TYPE_SINT32_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_SINT64_NV = VK_COMPONENT_TYPE_SINT64_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_UINT8_NV = VK_COMPONENT_TYPE_UINT8_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_UINT16_NV = VK_COMPONENT_TYPE_UINT16_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_UINT32_NV = VK_COMPONENT_TYPE_UINT32_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_COMPONENT_TYPE_UINT64_NV = VK_COMPONENT_TYPE_UINT64_KHR, + /// // Provided by VK_NV_cooperative_vector + /// VK_COMPONENT_TYPE_FLOAT_E4M3_NV = VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT, + /// // Provided by VK_NV_cooperative_vector + /// VK_COMPONENT_TYPE_FLOAT_E5M2_NV = VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT, + /// } VkComponentTypeKHR; + /// + /// + public enum VkComponentTypeKHR : int + { + /// + /// Float16KHR corresponds to SPIR-V OpTypeFloat 16. + /// + Float16KHR = 0, + + /// + /// Float32KHR corresponds to SPIR-V OpTypeFloat 32. + /// + Float32KHR = 1, + + /// + /// Float64KHR corresponds to SPIR-V OpTypeFloat 64. + /// + Float64KHR = 2, + + /// + /// SInt8KHR corresponds to SPIR-V OpTypeInt 8 0/1. + /// + SInt8KHR = 3, + + /// + /// SInt16KHR corresponds to SPIR-V OpTypeInt 16 0/1. + /// + SInt16KHR = 4, + + /// + /// SInt32KHR corresponds to SPIR-V OpTypeInt 32 0/1. + /// + SInt32KHR = 5, + + /// + /// SInt64KHR corresponds to SPIR-V OpTypeInt 64 0/1. + /// + SInt64KHR = 6, + + /// + /// UInt8KHR corresponds to SPIR-V OpTypeInt 8 0/1. + /// + UInt8KHR = 7, + + /// + /// UInt16KHR corresponds to SPIR-V OpTypeInt 16 0/1. + /// + UInt16KHR = 8, + + /// + /// UInt32KHR corresponds to SPIR-V OpTypeInt 32 0/1. + /// + UInt32KHR = 9, + + /// + /// UInt64KHR corresponds to SPIR-V OpTypeInt 64 0/1. + /// + UInt64KHR = 10, + + /// + /// Bfloat16KHR + /// + Bfloat16KHR = 1000141000, + + /// + /// SInt8PackedNV corresponds to four 8-bit signed integers packed in a 32-bit unsigned integer. + /// + SInt8PackedNV = 1000491000, + + /// + /// UInt8PackedNV corresponds to four 8-bit unsigned integers packed in a 32-bit unsigned integer. + /// + UInt8PackedNV = 1000491001, + + /// + /// Float8E4M3EXT + /// + Float8E4M3EXT = 1000491002, + + /// + /// Float8E5M2EXT + /// + Float8E5M2EXT = 1000491003, + + /// + /// Float6E2M3EXT + /// + Float6E2M3EXT = 1000672000, + + /// + /// Float6E3M2EXT + /// + Float6E3M2EXT = 1000672001, + + /// + /// Float4E2M1EXT + /// + Float4E2M1EXT = 1000672002, + + /// + /// Float8UnsignedE8M0EXT + /// + Float8UnsignedE8M0EXT = 1000672003, + + /// + /// Mxint8EXT + /// + Mxint8EXT = 1000672004, + + /// + /// Float16NV + /// + Float16NV = Float16KHR, + + /// + /// Float32NV + /// + Float32NV = Float32KHR, + + /// + /// Float64NV + /// + Float64NV = Float64KHR, + + /// + /// SInt8NV + /// + SInt8NV = SInt8KHR, + + /// + /// SInt16NV + /// + SInt16NV = SInt16KHR, + + /// + /// SInt32NV + /// + SInt32NV = SInt32KHR, + + /// + /// SInt64NV + /// + SInt64NV = SInt64KHR, + + /// + /// UInt8NV + /// + UInt8NV = UInt8KHR, + + /// + /// UInt16NV + /// + UInt16NV = UInt16KHR, + + /// + /// UInt32NV + /// + UInt32NV = UInt32KHR, + + /// + /// UInt64NV + /// + UInt64NV = UInt64KHR, + + /// + /// FloatE4M3NV + /// + FloatE4M3NV = Float8E4M3EXT, + + /// + /// FloatE5M2NV + /// + FloatE5M2NV = Float8E5M2EXT, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCompositeAlphaFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCompositeAlphaFlagsKHR.gen.cs new file mode 100644 index 0000000..271054c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCompositeAlphaFlagsKHR.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a device + /// + /// + /// + /// The supportedCompositeAlpha member is of type + /// VkCompositeAlphaFlagsKHR, containing the following values: + /// + /// + /// // Provided by VK_KHR_surface + /// typedef enum VkCompositeAlphaFlagBitsKHR { + /// VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, + /// VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, + /// VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, + /// VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, + /// } VkCompositeAlphaFlagBitsKHR; + /// + /// + [Flags] + public enum VkCompositeAlphaFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueBitKHR + /// + OpaqueBitKHR = 0x00000001, + + /// + /// PreMultipliedBitKHR + /// + PreMultipliedBitKHR = 0x00000002, + + /// + /// PostMultipliedBitKHR + /// + PostMultipliedBitKHR = 0x00000004, + + /// + /// InheritBitKHR + /// + InheritBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkConditionalRenderingFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkConditionalRenderingFlagsEXT.gen.cs new file mode 100644 index 0000000..3b7757b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkConditionalRenderingFlagsEXT.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkConditionalRenderingFlagBitsEXT - Specify the behavior of conditional rendering + /// + /// + /// + /// Bits which can be set in + /// vkCmdBeginConditionalRenderingEXT::flags, specifying the + /// behavior of conditional rendering, are: + /// + /// + /// // Provided by VK_EXT_conditional_rendering + /// typedef enum VkConditionalRenderingFlagBitsEXT { + /// VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001, + /// } VkConditionalRenderingFlagBitsEXT; + /// + /// + [Flags] + public enum VkConditionalRenderingFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// InvertedBitEXT specifies the condition used to determine whether to discard rendering commands or not. That is, if the 32-bit predicate read from buffer memory at offset is zero, the rendering commands are not discarded, and if non zero, then they are discarded. + /// + InvertedBitEXT = 0x00000001, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkConservativeRasterizationModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkConservativeRasterizationModeEXT.gen.cs new file mode 100644 index 0000000..bc4fe1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkConservativeRasterizationModeEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkConservativeRasterizationModeEXT - Specify the conservative rasterization mode + /// + /// + /// + /// Possible values of + /// VkPipelineRasterizationConservativeStateCreateInfoEXT::conservativeRasterizationMode, + /// specifying the conservative rasterization mode are: + /// + /// + /// // Provided by VK_EXT_conservative_rasterization + /// typedef enum VkConservativeRasterizationModeEXT { + /// VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, + /// VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, + /// VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2, + /// } VkConservativeRasterizationModeEXT; + /// + /// + public enum VkConservativeRasterizationModeEXT : int + { + /// + /// DisabledEXT specifies that conservative rasterization is disabled and rasterization proceeds as normal. + /// + DisabledEXT = 0, + + /// + /// OverestimateEXT specifies that conservative rasterization is enabled in overestimation mode. + /// + OverestimateEXT = 1, + + /// + /// UnderestimateEXT specifies that conservative rasterization is enabled in underestimation mode. + /// + UnderestimateEXT = 2, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCooperativeVectorMatrixLayoutNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCooperativeVectorMatrixLayoutNV.gen.cs new file mode 100644 index 0000000..3ce854a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCooperativeVectorMatrixLayoutNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCooperativeVectorMatrixLayoutNV - Specify cooperative vector matrix layout + /// + /// + /// + /// Possible values for VkCooperativeVectorMatrixLayoutNV include: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// typedef enum VkCooperativeVectorMatrixLayoutNV { + /// VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV = 0, + /// VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV = 1, + /// VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV = 2, + /// VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV = 3, + /// } VkCooperativeVectorMatrixLayoutNV; + /// + /// + public enum VkCooperativeVectorMatrixLayoutNV : int + { + /// + /// RowMajorNV corresponds to SPIR-V RowMajorNV layout. + /// + RowMajorNV = 0, + + /// + /// ColumnMajorNV corresponds to SPIR-V ColumnMajorNV layout. + /// + ColumnMajorNV = 1, + + /// + /// InferencingOptimalNV corresponds to SPIR-V InferencingOptimalNV layout. + /// + InferencingOptimalNV = 2, + + /// + /// TrainingOptimalNV corresponds to SPIR-V TrainingOptimalNV layout. All enum values match the corresponding SPIR-V value. Row-major layout has elements of each row stored consecutively in memory, with a controllable stride from the start of one row to the start of the next row. Column-major layout has elements of each column stored consecutively in memory, with a controllable stride from the start of one column to the start of the next column. Inferencing-optimal and Training-optimal layouts are implementation-dependent, and the application can convert a matrix to those layouts using vkConvertCooperativeVectorMatrixNV or vkCmdConvertCooperativeVectorMatrixNV. Training-optimal layout with VK_COMPONENT_TYPE_FLOAT16_KHR or VK_COMPONENT_TYPE_FLOAT32_KHR type has the additional guarantee that the application can reinterpret the data as an array of elements and perform element-wise operations on the data, and finite values in any padding elements do not affect the result of a matrix-vector multiply (inf/NaN values may: still cause NaN values in the result). + /// + TrainingOptimalNV = 3, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCopyAccelerationStructureModeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCopyAccelerationStructureModeKHR.gen.cs new file mode 100644 index 0000000..85e88a6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCopyAccelerationStructureModeKHR.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyAccelerationStructureModeKHR - Acceleration structure copy mode + /// + /// + /// + /// :refpage: VkCopyAccelerationStructureModeKHR + /// + /// + /// Possible values of mode specifying additional operations to perform + /// during the copy, are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkCopyAccelerationStructureModeKHR { + /// VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0, + /// VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1, + /// // Provided by VK_KHR_acceleration_structure + /// VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2, + /// // Provided by VK_KHR_acceleration_structure + /// VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3, + /// // Provided by VK_NV_ray_tracing + /// VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, + /// } VkCopyAccelerationStructureModeKHR; + /// + /// + public enum VkCopyAccelerationStructureModeKHR : int + { + /// + /// CloneKHR creates a direct copy of the acceleration structure specified in src into the one specified by dst. The dst acceleration structure must have been created with the same parameters as src . If src contains references to other acceleration structures, dst will reference the same acceleration structures. + /// + CloneKHR = 0, + + /// + /// CompactKHR creates a more compact version of an acceleration structure src into dst. The acceleration structure dst must have been created with a size at least as large as that returned by after the build of the acceleration structure specified by src. If src contains references to other acceleration structures, dst will reference the same acceleration structures. + /// + CompactKHR = 1, + + /// + /// SerializeKHR + /// + SerializeKHR = 2, + + /// + /// DeserializeKHR + /// + DeserializeKHR = 3, + + /// + /// CloneNV + /// + CloneNV = CloneKHR, + + /// + /// CompactNV + /// + CompactNV = CompactKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCopyMicromapModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCopyMicromapModeEXT.gen.cs new file mode 100644 index 0000000..6db7001 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCopyMicromapModeEXT.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMicromapModeEXT - Micromap copy mode + /// + /// + /// + /// :refpage: VkCopyMicromapModeEXT + /// + /// + /// Possible values of mode specifying additional operations to perform + /// during the copy, are: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef enum VkCopyMicromapModeEXT { + /// VK_COPY_MICROMAP_MODE_CLONE_EXT = 0, + /// VK_COPY_MICROMAP_MODE_SERIALIZE_EXT = 1, + /// VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2, + /// VK_COPY_MICROMAP_MODE_COMPACT_EXT = 3, + /// } VkCopyMicromapModeEXT; + /// + /// + public enum VkCopyMicromapModeEXT : int + { + /// + /// CloneEXT creates a direct copy of the micromap specified in src into the one specified by dst. The dst micromap must have been created with the same parameters as src. + /// + CloneEXT = 0, + + /// + /// SerializeEXT serializes the micromap to a semi-opaque format which can be reloaded on a compatible implementation. + /// + SerializeEXT = 1, + + /// + /// DeserializeEXT deserializes the semi-opaque serialization format in the buffer to the micromap. + /// + DeserializeEXT = 2, + + /// + /// CompactEXT creates a more compact version of a micromap src into dst. The micromap dst must have been created with a size at least as large as that returned by vkCmdWriteMicromapsPropertiesEXT after the build of the micromap specified by src. + /// + CompactEXT = 3, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCoverageModulationModeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCoverageModulationModeNV.gen.cs new file mode 100644 index 0000000..01caffa --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCoverageModulationModeNV.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCoverageModulationModeNV - Specify the coverage modulation mode + /// + /// + /// + /// Possible values of + /// VkPipelineCoverageModulationStateCreateInfoNV::coverageModulationMode, + /// specifying which color components are modulated, are: + /// + /// + /// // Provided by VK_NV_framebuffer_mixed_samples + /// typedef enum VkCoverageModulationModeNV { + /// VK_COVERAGE_MODULATION_MODE_NONE_NV = 0, + /// VK_COVERAGE_MODULATION_MODE_RGB_NV = 1, + /// VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2, + /// VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3, + /// } VkCoverageModulationModeNV; + /// + /// + public enum VkCoverageModulationModeNV : int + { + /// + /// NoneNV specifies that no components are multiplied by the modulation factor. + /// + NoneNV = 0, + + /// + /// RGBNV specifies that the red, green, and blue components are multiplied by the modulation factor. + /// + RGBNV = 1, + + /// + /// AlphaNV specifies that the alpha component is multiplied by the modulation factor. + /// + AlphaNV = 2, + + /// + /// RGBANV specifies that all components are multiplied by the modulation factor. + /// + RGBANV = 3, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCoverageReductionModeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCoverageReductionModeNV.gen.cs new file mode 100644 index 0000000..f0f1705 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCoverageReductionModeNV.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCoverageReductionModeNV - Specify the coverage reduction mode + /// + /// + /// + /// Possible values of + /// VkPipelineCoverageReductionStateCreateInfoNV::coverageReductionMode, + /// specifying how color sample coverage is generated from pixel coverage, are: + /// + /// + /// // Provided by VK_NV_coverage_reduction_mode + /// typedef enum VkCoverageReductionModeNV { + /// VK_COVERAGE_REDUCTION_MODE_MERGE_NV = 0, + /// VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1, + /// } VkCoverageReductionModeNV; + /// + /// + public enum VkCoverageReductionModeNV : int + { + /// + /// MergeNV specifies that each color sample will be associated with an implementation-dependent subset of samples in the pixel coverage. If any of those associated samples are covered, the color sample is covered. + /// + MergeNV = 0, + + /// + /// TruncateNV specifies that for color samples present in the color attachments, a color sample is covered if the pixel coverage sample with the same sample index^ i is covered; other pixel coverage samples are discarded. + /// + TruncateNV = 1, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCubicFilterWeightsQCOM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCubicFilterWeightsQCOM.gen.cs new file mode 100644 index 0000000..91b6b83 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCubicFilterWeightsQCOM.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCubicFilterWeightsQCOM - Specify cubic weights for texture filtering + /// + /// + /// + /// Possible values of the + /// VkSamplerCubicWeightsCreateInfoQCOM::cubicWeights, specifying + /// cubic weights used in Texel Cubic + /// Filtering^ are: + /// + /// + /// // Provided by VK_QCOM_filter_cubic_weights + /// typedef enum VkCubicFilterWeightsQCOM { + /// VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM = 0, + /// VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM = 1, + /// VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM = 2, + /// VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM = 3, + /// } VkCubicFilterWeightsQCOM; + /// + /// + public enum VkCubicFilterWeightsQCOM : int + { + /// + /// CatmullRomQCOM specifies Catmull-Rom weights. + /// + CatmullRomQCOM = 0, + + /// + /// ZeroTangentCardinalQCOM specifies Zero Tangent Cardinal weights. + /// + ZeroTangentCardinalQCOM = 1, + + /// + /// BSplineQCOM specifies B-Spline weights. + /// + BSplineQCOM = 2, + + /// + /// MitchellNetravaliQCOM specifies Mitchell-Netravali weights. + /// + MitchellNetravaliQCOM = 3, + + /// + /// MaxEnumQCOM + /// + MaxEnumQCOM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkCullModeFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkCullModeFlags.gen.cs new file mode 100644 index 0000000..e482197 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkCullModeFlags.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCullModeFlagBits - Bitmask controlling triangle culling + /// + /// + /// + /// Once the orientation of triangles is determined, they are culled according + /// to the VkPipelineRasterizationStateCreateInfo::cullMode property + /// of the currently active pipeline. + /// Possible values are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkCullModeFlagBits { + /// VK_CULL_MODE_NONE = 0, + /// VK_CULL_MODE_FRONT_BIT = 0x00000001, + /// VK_CULL_MODE_BACK_BIT = 0x00000002, + /// VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, + /// } VkCullModeFlagBits; + /// + /// + [Flags] + public enum VkCullModeFlags : int + { + /// + /// None specifies that no triangles are discarded + /// + None = 0, + + /// + /// FrontBit specifies that front-facing triangles are discarded + /// + FrontBit = 0x00000001, + + /// + /// BackBit specifies that back-facing triangles are discarded + /// + BackBit = 0x00000002, + + /// + /// FrontAndBack specifies that all triangles are discarded. Following culling, fragments are produced for any triangles which have not been discarded. + /// + FrontAndBack = 0x00000003, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphModelCacheTypeQCOM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphModelCacheTypeQCOM.gen.cs new file mode 100644 index 0000000..1609dfa --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphModelCacheTypeQCOM.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphModelCacheTypeQCOM - Encode pipeline data graph cache type + /// + /// + /// + /// The VkDataGraphModelCacheTypeQCOM enumeration determines the contents + /// of the pipeline data graph cache. + /// + /// + /// Possible values are: + /// + /// + /// // Provided by VK_QCOM_data_graph_model + /// typedef enum VkDataGraphModelCacheTypeQCOM { + /// VK_DATA_GRAPH_MODEL_CACHE_TYPE_GENERIC_BINARY_QCOM = 0, + /// } VkDataGraphModelCacheTypeQCOM; + /// + /// + public enum VkDataGraphModelCacheTypeQCOM : int + { + /// + /// GenericBinaryQCOM specifies a general binary layout type. + /// + GenericBinaryQCOM = 0, + + /// + /// MaxEnumQCOM + /// + MaxEnumQCOM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowCreateFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowCreateFlagsARM.gen.cs new file mode 100644 index 0000000..415bc1b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowCreateFlagsARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowCreateFlagBitsARM - Bits specifying flags for newly created optical flow data graph node + /// + /// + /// + /// Bits which can be set in + /// VkDataGraphPipelineOpticalFlowCreateInfoARM::flags, controlling + /// optical flow pipeline operations, are: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphOpticalFlowCreateFlagBitsARM { + /// VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_HINT_BIT_ARM = 0x00000001, + /// VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_ENABLE_COST_BIT_ARM = 0x00000002, + /// VK_DATA_GRAPH_OPTICAL_FLOW_CREATE_RESERVED_30_BIT_ARM = 0x40000000, + /// } VkDataGraphOpticalFlowCreateFlagBitsARM; + /// + /// + [Flags] + public enum VkDataGraphOpticalFlowCreateFlagsARM : int + { + /// No flags set. + None = 0, + + /// + /// EnableHintBitARM specifies that a VkImageView with external flow vector map will be used as hints in performing the motion search and must be connected to VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM. + /// + EnableHintBitARM = 0x00000001, + + /// + /// EnableCostBitARM specifies that the cost for the forward flow is generated in a VkImageView which must be connected to VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM. The cost is the confidence level of the flow vector for each grid in the image. The cost implies how (in)accurate the flow vector is. Higher cost value implies the flow vector to be less accurate and vice-versa. + /// + EnableCostBitARM = 0x00000002, + + /// + /// Reserved30BitARM + /// + Reserved30BitARM = 0x40000000, + + /// + /// FlagBitsMaxEnumARM + /// + FlagBitsMaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowExecuteFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowExecuteFlagsARM.gen.cs new file mode 100644 index 0000000..692979f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowExecuteFlagsARM.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowExecuteFlagBitsARM - Bits specifying flags for a optical flow vector calculation + /// + /// + /// + /// Bits which can be set in + /// VkDataGraphPipelineOpticalFlowDispatchInfoARM::flags, + /// controlling optical flow execution, are: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphOpticalFlowExecuteFlagBitsARM { + /// VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_ARM = 0x00000001, + /// VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_UNCHANGED_BIT_ARM = 0x00000002, + /// VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_UNCHANGED_BIT_ARM = 0x00000004, + /// VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_INPUT_IS_PREVIOUS_REFERENCE_BIT_ARM = 0x00000008, + /// VK_DATA_GRAPH_OPTICAL_FLOW_EXECUTE_REFERENCE_IS_PREVIOUS_INPUT_BIT_ARM = 0x00000010, + /// } VkDataGraphOpticalFlowExecuteFlagBitsARM; + /// + /// + [Flags] + public enum VkDataGraphOpticalFlowExecuteFlagsARM : int + { + /// No flags set. + None = 0, + + /// + /// DisableTemporalHintsBitARM specifies that temporal hints from previously generated flow vector map are not used. If temporal hints are enabled, the optical flow vector map from previous vkCmdDispatchDataGraphARM calls in the same graph pipeline session may: be automatically used as hints for the current vkCmdDispatchDataGraphARM call, to take advantage of temporal correlation in a video sequence. Temporal hints should be disabled if there is a-priori knowledge of no temporal correlation (e.g. a scene change, independent successive image pairs). + /// + DisableTemporalHintsBitARM = 0x00000001, + + /// + /// InputUnchangedBitARM specifies that the contents of the input image are the same as in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session. + /// + InputUnchangedBitARM = 0x00000002, + + /// + /// ReferenceUnchangedBitARM specifies that the contents of the reference image are the same as in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session. + /// + ReferenceUnchangedBitARM = 0x00000004, + + /// + /// InputIsPreviousReferenceBitARM specifies that the contents of the input image are the same as the contents of the reference image in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session. + /// + InputIsPreviousReferenceBitARM = 0x00000008, + + /// + /// ReferenceIsPreviousInputBitARM specifies that the contents of the reference image are the same as the contents of the input image in the previously executed vkCmdDispatchDataGraphARM call in the same graph pipeline session. + /// + ReferenceIsPreviousInputBitARM = 0x00000010, + + /// + /// FlagBitsMaxEnumARM + /// + FlagBitsMaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowGridSizeFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowGridSizeFlagsARM.gen.cs new file mode 100644 index 0000000..0702172 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowGridSizeFlagsARM.gen.cs @@ -0,0 +1,66 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowGridSizeFlagBitsARM - Bits specifying grid sizes for optical flow operations + /// + /// + /// + /// Optical flow vectors are generated block-wise, one vector for each block of + /// NxN pixels (referred to as grid). + /// Bits which can be set in + /// VkDataGraphPipelineOpticalFlowCreateInfoARM::outputGridSize and + /// VkDataGraphPipelineOpticalFlowCreateInfoARM::hintGridSize, or + /// which are returned in + /// VkQueueFamilyDataGraphOpticalFlowPropertiesARM::supportedOutputGridSizes + /// and + /// VkQueueFamilyDataGraphOpticalFlowPropertiesARM::supportedHintGridSizes + /// controlling optical flow grid sizes, are: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphOpticalFlowGridSizeFlagBitsARM { + /// VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_ARM = 0, + /// VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_ARM = 0x00000001, + /// VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_ARM = 0x00000002, + /// VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_ARM = 0x00000004, + /// VK_DATA_GRAPH_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_ARM = 0x00000008, + /// } VkDataGraphOpticalFlowGridSizeFlagBitsARM; + /// + /// + [Flags] + public enum VkDataGraphOpticalFlowGridSizeFlagsARM : int + { + /// No flags set. + None = 0, + + /// + /// UnknownARM + /// + UnknownARM = 0, + + /// + /// _1X1BitARM specifies that grid is 1x1 pixel. + /// + _1X1BitARM = 0x00000001, + + /// + /// _2X2BitARM specifies that grid is 2x2 pixel. + /// + _2X2BitARM = 0x00000002, + + /// + /// _4X4BitARM specifies that grid is 4x4 pixel. + /// + _4X4BitARM = 0x00000004, + + /// + /// _8X8BitARM specifies that grid is 8x8 pixel. + /// + _8X8BitARM = 0x00000008, + + /// + /// FlagBitsMaxEnumARM + /// + FlagBitsMaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowImageUsageFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowImageUsageFlagsARM.gen.cs new file mode 100644 index 0000000..16ff31e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowImageUsageFlagsARM.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowImageUsageFlagBitsARM - Bits specifying image usage for optical flow operations + /// + /// + /// + /// Bits which can be set in + /// VkDataGraphOpticalFlowImageFormatInfoARM::usage, controlling + /// optical flow usage, are: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphOpticalFlowImageUsageFlagBitsARM { + /// VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_UNKNOWN_ARM = 0, + /// VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_INPUT_BIT_ARM = 0x00000001, + /// VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_OUTPUT_BIT_ARM = 0x00000002, + /// VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_HINT_BIT_ARM = 0x00000004, + /// VK_DATA_GRAPH_OPTICAL_FLOW_IMAGE_USAGE_COST_BIT_ARM = 0x00000008, + /// } VkDataGraphOpticalFlowImageUsageFlagBitsARM; + /// + /// + [Flags] + public enum VkDataGraphOpticalFlowImageUsageFlagsARM : int + { + /// No flags set. + None = 0, + + /// + /// UnknownARM + /// + UnknownARM = 0, + + /// + /// InputBitARM specifies that the image can be used as input or reference image for an optical flow operation. + /// + InputBitARM = 0x00000001, + + /// + /// OutputBitARM specifies that the image can be used as output flow vector map for an optical flow operation. + /// + OutputBitARM = 0x00000002, + + /// + /// HintBitARM specifies that the image can be used as hint flow vector map for an optical flow operation. + /// + HintBitARM = 0x00000004, + + /// + /// CostBitARM specifies that the image can be used as output cost map for an optical flow operation. + /// + CostBitARM = 0x00000008, + + /// + /// FlagBitsMaxEnumARM + /// + FlagBitsMaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowPerformanceLevelARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowPerformanceLevelARM.gen.cs new file mode 100644 index 0000000..555be01 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphOpticalFlowPerformanceLevelARM.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowPerformanceLevelARM - Optical flow performance level types + /// + /// + /// + /// Optical flow exposes performance levels which the user can choose based on + /// the desired performance and quality requirement. + /// The optical flow performance level types are defined with the following: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphOpticalFlowPerformanceLevelARM { + /// VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_ARM = 0, + /// VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_ARM = 1, + /// VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_ARM = 2, + /// VK_DATA_GRAPH_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_ARM = 3, + /// } VkDataGraphOpticalFlowPerformanceLevelARM; + /// + /// + public enum VkDataGraphOpticalFlowPerformanceLevelARM : int + { + /// + /// UnknownARM + /// + UnknownARM = 0, + + /// + /// SlowARM is a level with slower performance but higher quality. + /// + SlowARM = 1, + + /// + /// MediumARM is a level with medium performance and medium quality. + /// + MediumARM = 2, + + /// + /// FastARM is a preset with higher performance but lower quality. + /// + FastARM = 3, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeConnectionTypeARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeConnectionTypeARM.gen.cs new file mode 100644 index 0000000..dbbb148 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeConnectionTypeARM.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineNodeConnectionTypeARM - Connection points for a fixed-function data graph node + /// + /// + /// + /// Possible values of VkDataGraphPipelineNodeConnectionTypeARM, + /// specifying the connection points of a data graph pipeline node, are: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphPipelineNodeConnectionTypeARM { + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_INPUT_ARM = 1000631000, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_REFERENCE_ARM = 1000631001, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_HINT_ARM = 1000631002, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_FLOW_VECTOR_ARM = 1000631003, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_NODE_CONNECTION_TYPE_OPTICAL_FLOW_COST_ARM = 1000631004, + /// } VkDataGraphPipelineNodeConnectionTypeARM; + /// + /// + public enum VkDataGraphPipelineNodeConnectionTypeARM : int + { + /// + /// OpticalFlowInputARM specifies the connection point for the input image of an optical flow node. + /// + OpticalFlowInputARM = 1000631000, + + /// + /// OpticalFlowReferenceARM specifies the connection point for the input reference image of an optical flow node. + /// + OpticalFlowReferenceARM = 1000631001, + + /// + /// OpticalFlowHintARM specifies the connection point for the optional external hint flow vector map of an optical flow node. + /// + OpticalFlowHintARM = 1000631002, + + /// + /// OpticalFlowFlowVectorARM specifies the connection point for the output flow vector map of an optical flow node. + /// + OpticalFlowFlowVectorARM = 1000631003, + + /// + /// OpticalFlowCostARM specifies the connection point for the optional output cost map of an optical flow node. + /// + OpticalFlowCostARM = 1000631004, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeTypeARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeTypeARM.gen.cs new file mode 100644 index 0000000..907a83a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineNodeTypeARM.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineNodeTypeARM - Enumeration describing the type of a data graph pipeline node + /// + /// + /// + /// :refpage: VkDataGraphPipelineNodeTypeARM + /// + /// + /// Possible values of VkDataGraphPipelineNodeTypeARM, specifying the type + /// of a data graph pipeline node, are: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef enum VkDataGraphPipelineNodeTypeARM { + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_NODE_TYPE_OPTICAL_FLOW_ARM = 1000631000, + /// } VkDataGraphPipelineNodeTypeARM; + /// + /// + public enum VkDataGraphPipelineNodeTypeARM : int + { + /// + /// OpticalFlowARM corresponds to an optical flow node^. + /// + OpticalFlowARM = 1000631000, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelinePropertyARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelinePropertyARM.gen.cs new file mode 100644 index 0000000..6436dce --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelinePropertyARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelinePropertyARM - Enumeration describing the properties of a data graph pipeline that can be queried + /// + /// + /// + /// :refpage: VkDataGraphPipelinePropertyARM + /// + /// + /// Possible values of + /// VkDataGraphPipelinePropertyQueryResultARM::property, specifying + /// the property of the data graph pipeline being queried, are: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef enum VkDataGraphPipelinePropertyARM { + /// VK_DATA_GRAPH_PIPELINE_PROPERTY_CREATION_LOG_ARM = 0, + /// VK_DATA_GRAPH_PIPELINE_PROPERTY_IDENTIFIER_ARM = 1, + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_DEBUG_DATABASE_ARM = 1000676000, + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// VK_DATA_GRAPH_PIPELINE_PROPERTY_NEURAL_ACCELERATOR_STATISTICS_INFO_ARM = 1000676001, + /// } VkDataGraphPipelinePropertyARM; + /// + /// + public enum VkDataGraphPipelinePropertyARM : int + { + /// + /// CreationLogARM corresponds to a human-readable log produced during the creation of a data graph pipeline. It may: contain information about errors encountered during the creation or other information generally useful for debugging. This property can be queried for any data graph pipeline. + /// + CreationLogARM = 0, + + /// + /// IdentifierARM corresponds to an opaque identifier for the data graph pipeline. It can be used to create a graph pipeline from a pipeline cache without the need to provide any creation data beyond the identifier, using a VkDataGraphPipelineIdentifierCreateInfoARM structure. + /// + IdentifierARM = 1, + + /// + /// NeuralAcceleratorDebugDatabaseARM + /// + NeuralAcceleratorDebugDatabaseARM = 1000676000, + + /// + /// NeuralAcceleratorStatisticsInfoARM + /// + NeuralAcceleratorStatisticsInfoARM = 1000676001, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointARM.gen.cs new file mode 100644 index 0000000..29c1ea4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionBindPointARM - Enumeration describing the bind points of a data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionBindPointARM + /// + /// + /// Possible values of VkDataGraphPipelineSessionBindPointARM, specifying + /// the bind point of a data graph pipeline session, are: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef enum VkDataGraphPipelineSessionBindPointARM { + /// VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TRANSIENT_ARM = 0, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_OPTICAL_FLOW_CACHE_ARM = 1000631001, + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_NEURAL_ACCELERATOR_STATISTICS_ARM = 1000676000, + /// } VkDataGraphPipelineSessionBindPointARM; + /// + /// + public enum VkDataGraphPipelineSessionBindPointARM : int + { + /// + /// TransientARM corresponds to the transient data produced and consumed during one dispatch of a data graph pipeline in a data graph pipeline session. This transient data is never reused by subsequent dispatches and can safely be clobbered once a vkCmdDispatchDataGraphARM command completes execution. + /// + TransientARM = 0, + + /// + /// OpticalFlowCacheARM + /// + OpticalFlowCacheARM = 1000631001, + + /// + /// NeuralAcceleratorStatisticsARM + /// + NeuralAcceleratorStatisticsARM = 1000676000, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointTypeARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointTypeARM.gen.cs new file mode 100644 index 0000000..16f32bc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionBindPointTypeARM.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionBindPointTypeARM - Enumeration describing the type of bind points of a data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionBindPointTypeARM + /// + /// + /// Possible values of VkDataGraphPipelineSessionBindPointTypeARM, + /// specifying the type of a bind point of a data graph pipeline session, are: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef enum VkDataGraphPipelineSessionBindPointTypeARM { + /// VK_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_TYPE_MEMORY_ARM = 0, + /// } VkDataGraphPipelineSessionBindPointTypeARM; + /// + /// + public enum VkDataGraphPipelineSessionBindPointTypeARM : int + { + /// + /// MemoryARM corresponds to a memory allocation. + /// + MemoryARM = 0, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionCreateFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionCreateFlagsARM.gen.cs new file mode 100644 index 0000000..576f128 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphPipelineSessionCreateFlagsARM.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionCreateFlagBitsARM - Bitmask specifying additional parameters of a data graph pipeline session + /// + /// + /// + /// Bits which can be set in + /// VkDataGraphPipelineSessionCreateInfoARM::flags, specifying + /// additional parameters of a data graph pipeline session, are: + /// + /// + /// // Provided by VK_ARM_data_graph + /// // Flag bits for VkDataGraphPipelineSessionCreateFlagBitsARM + /// typedef VkFlags64 VkDataGraphPipelineSessionCreateFlagBitsARM; + /// static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_PROTECTED_BIT_ARM = 0x00000001ULL; + /// // Provided by VK_ARM_data_graph_optical_flow + /// static const VkDataGraphPipelineSessionCreateFlagBitsARM VK_DATA_GRAPH_PIPELINE_SESSION_CREATE_OPTICAL_FLOW_CACHE_BIT_ARM = 0x00000002ULL; + /// + /// + [Flags] + public enum VkDataGraphPipelineSessionCreateFlagsARM : ulong + { + /// No flags set. + None = 0, + + /// + /// ProtectedBitARM specifies that the data graph pipeline session is backed by protected memory. + /// + ProtectedBitARM = 0x00000001, + + /// + /// OpticalFlowCacheBitARM + /// + OpticalFlowCacheBitARM = 0x00000002, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphTosaLevelARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphTosaLevelARM.gen.cs new file mode 100644 index 0000000..1b3f40f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphTosaLevelARM.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphTOSALevelARM - Enumeration describing a data graph TOSA level + /// + /// + /// + /// :refpage: VkDataGraphTOSALevelARM + /// + /// + /// The defined data graph TOSA levels are: + /// + /// + /// // Provided by VK_ARM_data_graph_instruction_set_tosa + /// typedef enum VkDataGraphTOSALevelARM { + /// VK_DATA_GRAPH_TOSA_LEVEL_NONE_ARM = 0, + /// VK_DATA_GRAPH_TOSA_LEVEL_8K_ARM = 1, + /// } VkDataGraphTOSALevelARM; + /// + /// + public enum VkDataGraphTosaLevelARM : int + { + /// + /// NoneARM corresponds to the none TOSA level, as described in the TOSA specification. + /// + NoneARM = 0, + + /// + /// _8KARM corresponds to the 8K TOSA level, as described in the TOSA specification. + /// + _8KARM = 1, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDataGraphTosaQualityFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDataGraphTosaQualityFlagsARM.gen.cs new file mode 100644 index 0000000..1dd5e73 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDataGraphTosaQualityFlagsARM.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphTOSAQualityFlagBitsARM - Bits specifying quality properties for a TOSA profile or extension + /// + /// + /// + /// Bits which can be set in + /// VkDataGraphTOSANameQualityARM::qualityLevel, describing the + /// quality of a TOSA profile or extension, are: + /// + /// + /// // Provided by VK_ARM_data_graph_instruction_set_tosa + /// typedef enum VkDataGraphTOSAQualityFlagBitsARM { + /// VK_DATA_GRAPH_TOSA_QUALITY_ACCELERATED_ARM = 0x00000001, + /// VK_DATA_GRAPH_TOSA_QUALITY_CONFORMANT_ARM = 0x00000002, + /// VK_DATA_GRAPH_TOSA_QUALITY_EXPERIMENTAL_ARM = 0x00000004, + /// VK_DATA_GRAPH_TOSA_QUALITY_DEPRECATED_ARM = 0x00000008, + /// } VkDataGraphTOSAQualityFlagBitsARM; + /// + /// + [Flags] + public enum VkDataGraphTosaQualityFlagsARM : int + { + /// No flags set. + None = 0, + + /// + /// AcceleratedARM specifies that the implementation of the TOSA profile or extension is accelerated. + /// + AcceleratedARM = 0x00000001, + + /// + /// ConformantARM specifies that the implementation of the TOSA profile or extension is conformant. + /// + ConformantARM = 0x00000002, + + /// + /// ExperimentalARM specifies that the TOSA profile or extension is experimental. + /// + ExperimentalARM = 0x00000004, + + /// + /// DeprecatedARM specifies that the TOSA profile or extension is deprecated. + /// + DeprecatedARM = 0x00000008, + + /// + /// FlagBitsMaxEnumARM + /// + FlagBitsMaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDebugReportFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDebugReportFlagsEXT.gen.cs new file mode 100644 index 0000000..059e6eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDebugReportFlagsEXT.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugReportFlagBitsEXT - Bitmask specifying events which cause a debug report callback + /// + /// + /// + /// Bits which can be set in + /// VkDebugReportCallbackCreateInfoEXT::flags, specifying events + /// which cause a debug report, are: + /// + /// + /// // Provided by VK_EXT_debug_report + /// typedef enum VkDebugReportFlagBitsEXT { + /// VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, + /// VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, + /// VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, + /// VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, + /// VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, + /// } VkDebugReportFlagBitsEXT; + /// + /// + [Flags] + public enum VkDebugReportFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// InformationBitEXT specifies an informational message such as resource details that may be handy when debugging an application. + /// + InformationBitEXT = 0x00000001, + + /// + /// WarningBitEXT specifies use of Vulkan that may: expose an application bug. Such cases may not be immediately harmful, such as a fragment shader outputting to a location with no attachment. Other cases may: point to behavior that is almost certainly bad when unintended such as using an image whose memory has not been filled. In general if you see a warning but you know that the behavior is intended/desired, then simply ignore the warning. + /// + WarningBitEXT = 0x00000002, + + /// + /// PerformanceWarningBitEXT specifies a potentially non-optimal use of Vulkan, e.g. using vkCmdClearColorImage when setting VkAttachmentDescription::loadOp to VK_ATTACHMENT_LOAD_OP_CLEAR would have worked. + /// + PerformanceWarningBitEXT = 0x00000004, + + /// + /// ErrorBitEXT specifies that the application has violated a valid usage condition of the specification. + /// + ErrorBitEXT = 0x00000008, + + /// + /// DebugBitEXT specifies diagnostic information from the implementation and layers. + /// + DebugBitEXT = 0x00000010, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDebugReportObjectTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDebugReportObjectTypeEXT.gen.cs new file mode 100644 index 0000000..14f9f71 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDebugReportObjectTypeEXT.gen.cs @@ -0,0 +1,309 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugReportObjectTypeEXT - Specify the type of an object handle + /// + /// + /// + /// Possible values passed to the objectType parameter of the callback + /// function specified by + /// VkDebugReportCallbackCreateInfoEXT::pfnCallback, specifying the + /// type of object handle being reported, are: + /// + /// + /// // Provided by VK_EXT_debug_marker, VK_EXT_debug_report + /// typedef enum VkDebugReportObjectTypeEXT { + /// VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, + /// VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, + /// VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, + /// VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, + /// VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, + /// VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, + /// VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, + /// VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, + /// VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, + /// VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, + /// VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, + /// VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, + /// VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, + /// VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, + /// VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, + /// VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, + /// VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, + /// VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, + /// VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, + /// VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, + /// VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, + /// VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, + /// VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, + /// VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, + /// VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33, + /// // Provided by VK_VERSION_1_1 with VK_EXT_debug_report, VK_KHR_sampler_ycbcr_conversion with VK_EXT_debug_report + /// VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000, + /// // Provided by VK_VERSION_1_1 with VK_EXT_debug_report + /// VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000, + /// // Provided by VK_EXT_debug_report with VK_NVX_binary_import + /// VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT = 1000029000, + /// // Provided by VK_EXT_debug_report with VK_NVX_binary_import + /// VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001, + /// // Provided by VK_KHR_acceleration_structure with VK_EXT_debug_report + /// VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000, + /// // Provided by VK_EXT_debug_report with VK_NV_ray_tracing + /// VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000, + /// // Provided by VK_EXT_debug_report with VK_NV_cuda_kernel_launch + /// VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV_EXT = 1000307000, + /// // Provided by VK_EXT_debug_report with VK_NV_cuda_kernel_launch + /// VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV_EXT = 1000307001, + /// // Provided by VK_EXT_debug_report with VK_FUCHSIA_buffer_collection + /// VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000, + /// // VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT is a legacy alias + /// VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, + /// // VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT is a legacy alias + /// VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, + /// // Provided by VK_KHR_descriptor_update_template with VK_EXT_debug_report + /// VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion with VK_EXT_debug_report + /// VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT, + /// } VkDebugReportObjectTypeEXT; + /// + /// + public enum VkDebugReportObjectTypeEXT : int + { + /// + /// UnknownEXT + /// + UnknownEXT = 0, + + /// + /// InstanceEXT + /// + InstanceEXT = 1, + + /// + /// PhysicalDeviceEXT + /// + PhysicalDeviceEXT = 2, + + /// + /// DeviceEXT + /// + DeviceEXT = 3, + + /// + /// QueueEXT + /// + QueueEXT = 4, + + /// + /// SemaphoreEXT + /// + SemaphoreEXT = 5, + + /// + /// CommandBufferEXT + /// + CommandBufferEXT = 6, + + /// + /// FenceEXT + /// + FenceEXT = 7, + + /// + /// DeviceMemoryEXT + /// + DeviceMemoryEXT = 8, + + /// + /// BufferEXT + /// + BufferEXT = 9, + + /// + /// ImageEXT + /// + ImageEXT = 10, + + /// + /// EventEXT + /// + EventEXT = 11, + + /// + /// QueryPoolEXT + /// + QueryPoolEXT = 12, + + /// + /// BufferViewEXT + /// + BufferViewEXT = 13, + + /// + /// ImageViewEXT + /// + ImageViewEXT = 14, + + /// + /// ShaderModuleEXT + /// + ShaderModuleEXT = 15, + + /// + /// PipelineCacheEXT + /// + PipelineCacheEXT = 16, + + /// + /// PipelineLayoutEXT + /// + PipelineLayoutEXT = 17, + + /// + /// RenderPassEXT + /// + RenderPassEXT = 18, + + /// + /// PipelineEXT + /// + PipelineEXT = 19, + + /// + /// DescriptorSetLayoutEXT + /// + DescriptorSetLayoutEXT = 20, + + /// + /// SamplerEXT + /// + SamplerEXT = 21, + + /// + /// DescriptorPoolEXT + /// + DescriptorPoolEXT = 22, + + /// + /// DescriptorSetEXT + /// + DescriptorSetEXT = 23, + + /// + /// FramebufferEXT + /// + FramebufferEXT = 24, + + /// + /// CommandPoolEXT + /// + CommandPoolEXT = 25, + + /// + /// SurfaceKHREXT + /// + SurfaceKHREXT = 26, + + /// + /// SwapchainKHREXT + /// + SwapchainKHREXT = 27, + + /// + /// DebugReportCallbackEXTEXT + /// + DebugReportCallbackEXTEXT = 28, + + /// + /// DisplayKHREXT + /// + DisplayKHREXT = 29, + + /// + /// DisplayModeKHREXT + /// + DisplayModeKHREXT = 30, + + /// + /// ValidationCacheEXTEXT + /// + ValidationCacheEXTEXT = 33, + + /// + /// SamplerYCbCrConversionEXT + /// + SamplerYCbCrConversionEXT = 1000156000, + + /// + /// DescriptorUpdateTemplateEXT + /// + DescriptorUpdateTemplateEXT = 1000085000, + + /// + /// CuModuleNVXEXT + /// + CuModuleNVXEXT = 1000029000, + + /// + /// CuFunctionNVXEXT + /// + CuFunctionNVXEXT = 1000029001, + + /// + /// AccelerationStructureKHREXT + /// + AccelerationStructureKHREXT = 1000150000, + + /// + /// AccelerationStructureNVEXT + /// + AccelerationStructureNVEXT = 1000165000, + + /// + /// CudaModuleNVEXT + /// + CudaModuleNVEXT = 1000307000, + + /// + /// CudaFunctionNVEXT + /// + CudaFunctionNVEXT = 1000307001, + + /// + /// BufferCollectionFUCHSIAEXT + /// + BufferCollectionFUCHSIAEXT = 1000366000, + + /// + /// DebugReportEXT + /// + DebugReportEXT = DebugReportCallbackEXTEXT, + + /// + /// ValidationCacheEXT + /// + ValidationCacheEXT = ValidationCacheEXTEXT, + + /// + /// DescriptorUpdateTemplateKHREXT + /// + DescriptorUpdateTemplateKHREXT = DescriptorUpdateTemplateEXT, + + /// + /// SamplerYCbCrConversionKHREXT + /// + SamplerYCbCrConversionKHREXT = SamplerYCbCrConversionEXT, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageSeverityFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageSeverityFlagsEXT.gen.cs new file mode 100644 index 0000000..ff714f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageSeverityFlagsEXT.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsMessageSeverityFlagBitsEXT - Bitmask specifying which severities of events cause a debug messenger callback + /// + /// + /// + /// Bits which can be set in + /// VkDebugUtilsMessengerCreateInfoEXT::messageSeverity, specifying + /// event severities which cause a debug messenger to call the callback, are: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef enum VkDebugUtilsMessageSeverityFlagBitsEXT { + /// VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001, + /// VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010, + /// VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100, + /// VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000, + /// } VkDebugUtilsMessageSeverityFlagBitsEXT; + /// + /// + [Flags] + public enum VkDebugUtilsMessageSeverityFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// VerboseBitEXT specifies the most verbose output indicating all diagnostic messages from the Vulkan loader, layers, and drivers should be captured. + /// + VerboseBitEXT = 0x00000001, + + /// + /// InfoBitEXT specifies an informational message such as resource details that may be handy when debugging an application. + /// + InfoBitEXT = 0x00000010, + + /// + /// WarningBitEXT specifies use of Vulkan that may: expose an application bug. Such cases may not be immediately harmful, such as a fragment shader outputting to a location with no attachment. Other cases may: point to behavior that is almost certainly bad when unintended such as using an image whose memory has not been filled. In general if you see a warning but you know that the behavior is intended/desired, then simply ignore the warning. + /// + WarningBitEXT = 0x00000100, + + /// + /// ErrorBitEXT specifies that the application has violated a valid usage condition of the specification. [NOTE] + /// + ErrorBitEXT = 0x00001000, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageTypeFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageTypeFlagsEXT.gen.cs new file mode 100644 index 0000000..4bbd74d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDebugUtilsMessageTypeFlagsEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsMessageTypeFlagBitsEXT - Bitmask specifying which types of events cause a debug messenger callback + /// + /// + /// + /// Bits which can be set in + /// VkDebugUtilsMessengerCreateInfoEXT::messageType, specifying + /// event types which cause a debug messenger to call the callback, are: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef enum VkDebugUtilsMessageTypeFlagBitsEXT { + /// VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001, + /// VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002, + /// VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004, + /// // Provided by VK_EXT_device_address_binding_report + /// VK_DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 0x00000008, + /// } VkDebugUtilsMessageTypeFlagBitsEXT; + /// + /// + [Flags] + public enum VkDebugUtilsMessageTypeFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// GeneralBitEXT specifies that some general event has occurred. This is typically a non-specification, non-performance event. + /// + GeneralBitEXT = 0x00000001, + + /// + /// ValidationBitEXT specifies that something has occurred during validation against the Vulkan specification that may indicate invalid behavior. + /// + ValidationBitEXT = 0x00000002, + + /// + /// PerformanceBitEXT specifies a potentially non-optimal use of Vulkan, e.g. using vkCmdClearColorImage when setting VkAttachmentDescription::loadOp to VK_ATTACHMENT_LOAD_OP_CLEAR would have worked. + /// + PerformanceBitEXT = 0x00000004, + + /// + /// DeviceAddressBindingBitEXT + /// + DeviceAddressBindingBitEXT = 0x00000008, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDefaultVertexAttributeValueKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDefaultVertexAttributeValueKHR.gen.cs new file mode 100644 index 0000000..298138f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDefaultVertexAttributeValueKHR.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDefaultVertexAttributeValueKHR - Values returned for unbound vertex attributes + /// + /// + /// + /// The possible values returned by the implementation when the vertex shader + /// reads an unbound vertex attribute are: + /// + /// + /// // Provided by VK_KHR_maintenance9 + /// typedef enum VkDefaultVertexAttributeValueKHR { + /// VK_DEFAULT_VERTEX_ATTRIBUTE_VALUE_ZERO_ZERO_ZERO_ZERO_KHR = 0, + /// VK_DEFAULT_VERTEX_ATTRIBUTE_VALUE_ZERO_ZERO_ZERO_ONE_KHR = 1, + /// } VkDefaultVertexAttributeValueKHR; + /// + /// + public enum VkDefaultVertexAttributeValueKHR : int + { + /// + /// ZeroZeroZeroZeroKHR - the value read for an unbound vertex attribute is (0,0,0,0). + /// + ZeroZeroZeroZeroKHR = 0, + + /// + /// ZeroZeroZeroOneKHR - the value read for an unbound vertex attribute is (0,0,0,1). + /// + ZeroZeroZeroOneKHR = 1, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDependencyFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDependencyFlags.gen.cs new file mode 100644 index 0000000..6cd8b7e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDependencyFlags.gen.cs @@ -0,0 +1,83 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDependencyFlagBits - Bitmask specifying how execution and memory dependencies are formed + /// + /// + /// + /// Bits which can be set in vkCmdPipelineBarrier::dependencyFlags, + /// specifying how execution and memory dependencies are formed, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkDependencyFlagBits { + /// VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, + /// // Provided by VK_VERSION_1_1 + /// VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004, + /// // Provided by VK_VERSION_1_1 + /// VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002, + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT = 0x00000008, + /// // Provided by VK_KHR_maintenance8 + /// VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR = 0x00000020, + /// // Provided by VK_KHR_maintenance9 + /// VK_DEPENDENCY_ASYMMETRIC_EVENT_BIT_KHR = 0x00000040, + /// // Provided by VK_KHR_multiview + /// VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = VK_DEPENDENCY_VIEW_LOCAL_BIT, + /// // Provided by VK_KHR_device_group + /// VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = VK_DEPENDENCY_DEVICE_GROUP_BIT, + /// } VkDependencyFlagBits; + /// + /// + [Flags] + public enum VkDependencyFlags : int + { + /// No flags set. + None = 0, + + /// + /// ByRegionBit specifies that dependencies will be split into multiple framebuffer-local regions^ according to the (x,y,layer,sample) coordinates. + /// + ByRegionBit = 0x00000001, + + /// + /// DeviceGroupBit + /// + DeviceGroupBit = 0x00000004, + + /// + /// ViewLocalBit + /// + ViewLocalBit = 0x00000002, + + /// + /// FeedbackLoopBitEXT + /// + FeedbackLoopBitEXT = 0x00000008, + + /// + /// QueueFamilyOwnershipTransferUseAllStagesBitKHR + /// + QueueFamilyOwnershipTransferUseAllStagesBitKHR = 0x00000020, + + /// + /// AsymmetricEventBitKHR + /// + AsymmetricEventBitKHR = 0x00000040, + + /// + /// ViewLocalBitKHR + /// + ViewLocalBitKHR = ViewLocalBit, + + /// + /// DeviceGroupBitKHR + /// + DeviceGroupBitKHR = DeviceGroupBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDepthBiasRepresentationEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDepthBiasRepresentationEXT.gen.cs new file mode 100644 index 0000000..26ec228 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDepthBiasRepresentationEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDepthBiasRepresentationEXT - Specify the depth bias representation + /// + /// + /// + /// Possible values of + /// VkDepthBiasRepresentationInfoEXT::depthBiasRepresentation, + /// specifying the depth bias representation are: + /// + /// + /// // Provided by VK_EXT_depth_bias_control + /// typedef enum VkDepthBiasRepresentationEXT { + /// VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT = 0, + /// VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT = 1, + /// VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT = 2, + /// } VkDepthBiasRepresentationEXT; + /// + /// + public enum VkDepthBiasRepresentationEXT : int + { + /// + /// LeastRepresentableValueFormatEXT specifies that the depth bias representation is a factor of the format's r as described in here. + /// + LeastRepresentableValueFormatEXT = 0, + + /// + /// LeastRepresentableValueForceUNormEXT specifies that the depth bias representation is a factor of a constant r defined by the bit-size or mantissa of the format as described in here. + /// + LeastRepresentableValueForceUNormEXT = 1, + + /// + /// FloatEXT specifies that the depth bias representation is a factor of constant r equal to 1. + /// + FloatEXT = 2, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDepthClampModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDepthClampModeEXT.gen.cs new file mode 100644 index 0000000..0aa7d65 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDepthClampModeEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDepthClampModeEXT - Modes that determine the depth clamp range + /// + /// + /// + /// Possible values of + /// VkPipelineViewportDepthClampControlCreateInfoEXT::depthClampMode, + /// specifying which range should be used for depth clamping, are: + /// + /// + /// // Provided by VK_EXT_depth_clamp_control + /// typedef enum VkDepthClampModeEXT { + /// VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT = 0, + /// VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT = 1, + /// } VkDepthClampModeEXT; + /// + /// + public enum VkDepthClampModeEXT : int + { + /// + /// ViewportRangeEXT specifies that the depth clamp range follows the viewport depth range. The depth clamp range of each viewport will implicitly be set to z~min~ = min(n,f) and z~max~ = max(n,f), where n and f are the minDepth and maxDepth depth range values of the viewport. + /// + ViewportRangeEXT = 0, + + /// + /// UserDefinedRangeEXT specifies that a single user-defined depth clamp range will be used for all viewports. The user-defined depth clamp range is defined by the minDepthClamp and maxDepthClamp members of VkDepthClampRangeEXT. + /// + UserDefinedRangeEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDescriptorBindingFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDescriptorBindingFlags.gen.cs new file mode 100644 index 0000000..ae1fd1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDescriptorBindingFlags.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorBindingFlagBits - Bitmask specifying descriptor set layout binding properties + /// + /// + /// + /// Bits which can be set in each element of + /// VkDescriptorSetLayoutBindingFlagsCreateInfo::pBindingFlags, + /// specifying options for the corresponding descriptor set layout binding, are: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkDescriptorBindingFlagBits { + /// VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT = 0x00000001, + /// VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT = 0x00000002, + /// VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT = 0x00000004, + /// VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT = 0x00000008, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, + /// } VkDescriptorBindingFlagBits; + /// + /// + [Flags] + public enum VkDescriptorBindingFlags : int + { + /// No flags set. + None = 0, + + /// + /// UpdateAfterBindBit specifies that if descriptors in this binding are updated between when the descriptor set is bound in a command buffer and when that command buffer is submitted to a queue, then the submission will use the most recently set descriptors for this binding and the updates do not invalidate the command buffer. Descriptor bindings created with this flag are also partially exempt from the external synchronization requirement in vkUpdateDescriptorSets. Multiple descriptors with this flag set can be updated concurrently in different threads, though the same descriptor must not be updated concurrently by two threads. Descriptors with this flag set can be updated concurrently with the set being bound to a command buffer in another thread, but not concurrently with the set being reset or freed. + /// + UpdateAfterBindBit = 0x00000001, + + /// + /// UpdateUnusedWhilePendingBit specifies that descriptors in this binding can be updated after a command buffer has bound this descriptor set, or while a command buffer that uses this descriptor set is pending execution, as long as the descriptors that are updated are not used by those command buffers. Descriptor bindings created with this flag are also partially exempt from the external synchronization requirement in vkUpdateDescriptorSets in the same way as for VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT. If VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT is also set, then descriptors can be updated as long as they are not dynamically used by any shader invocations. If VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT is not set, then descriptors can be updated as long as they are not statically used by any shader invocations. + /// + UpdateUnusedWhilePendingBit = 0x00000002, + + /// + /// PartiallyBoundBit specifies that descriptors in this binding that are not dynamically used need not contain valid descriptors at the time the descriptors are consumed. A descriptor is dynamically used if any shader invocation executes an instruction that performs any memory access using the descriptor. If a descriptor is not dynamically used, any resource referenced by the descriptor is not considered to be referenced during command execution. + /// + PartiallyBoundBit = 0x00000004, + + /// + /// VariableDescriptorCountBit specifies that this is a _variable-sized descriptor binding_ whose size will be specified when a descriptor set is allocated using this layout. The value of descriptorCount is treated as an upper bound on the size of the binding. This must only be used for the last binding in the descriptor set layout (i.e. the binding with the largest value of binding). For the purposes of counting against limits such as maxDescriptorSet* and maxPerStageDescriptor*, the full value of descriptorCount is counted. [NOTE] + /// + VariableDescriptorCountBit = 0x00000008, + + /// + /// UpdateAfterBindBitEXT + /// + UpdateAfterBindBitEXT = UpdateAfterBindBit, + + /// + /// UpdateUnusedWhilePendingBitEXT + /// + UpdateUnusedWhilePendingBitEXT = UpdateUnusedWhilePendingBit, + + /// + /// PartiallyBoundBitEXT + /// + PartiallyBoundBitEXT = PartiallyBoundBit, + + /// + /// VariableDescriptorCountBitEXT + /// + VariableDescriptorCountBitEXT = VariableDescriptorCountBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDescriptorMappingSourceEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDescriptorMappingSourceEXT.gen.cs new file mode 100644 index 0000000..91b6e1e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDescriptorMappingSourceEXT.gen.cs @@ -0,0 +1,92 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceEXT - Specifies the mapping source for a shader binding + /// + /// + /// + /// The possible mapping sources for a shader binding are: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef enum VkDescriptorMappingSourceEXT { + /// VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_CONSTANT_OFFSET_EXT = 0, + /// VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT = 1, + /// VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT = 2, + /// VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT = 3, + /// VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT = 4, + /// VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT = 5, + /// VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT = 6, + /// VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT = 7, + /// // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing + /// VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT = 8, + /// // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing + /// VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT = 9, + /// // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing + /// VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT = 10, + /// } VkDescriptorMappingSourceEXT; + /// + /// + public enum VkDescriptorMappingSourceEXT : int + { + /// + /// HeapWithConstantOffsetEXT specifies that the resource will be backed by a descriptor from the heap at a constant index. + /// + HeapWithConstantOffsetEXT = 0, + + /// + /// HeapWithPushIndexEXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from push data, added to a constant index. + /// + HeapWithPushIndexEXT = 1, + + /// + /// HeapWithIndirectIndexEXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from an address in push data, added to a constant index. If the mapping is an array, the array will be mapped to a base offset in indirect memory, and subsequent elements are mapped as offsets to that base. + /// + HeapWithIndirectIndexEXT = 2, + + /// + /// HeapWithIndirectIndexArrayEXT specifies that the resource will be backed by a descriptor from the heap at an index sourced from an address in push data, added to a constant index. If the mapping is an array, each array element will be mapped to a separate index in indirect memory. + /// + HeapWithIndirectIndexArrayEXT = 3, + + /// + /// ResourceHeapDataEXT specifies that the resource will be backed by heap data directly. + /// + ResourceHeapDataEXT = 4, + + /// + /// PushDataEXT specifies that the resource will be backed by push data directly. + /// + PushDataEXT = 5, + + /// + /// PushAddressEXT specifies that the resource will be backed by an address in push data. + /// + PushAddressEXT = 6, + + /// + /// IndirectAddressEXT specifies that the resource will be backed by an address sourced via another address in push data. + /// + IndirectAddressEXT = 7, + + /// + /// HeapWithShaderRecordIndexEXT + /// + HeapWithShaderRecordIndexEXT = 8, + + /// + /// ShaderRecordDataEXT + /// + ShaderRecordDataEXT = 9, + + /// + /// ShaderRecordAddressEXT + /// + ShaderRecordAddressEXT = 10, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDescriptorPoolCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDescriptorPoolCreateFlags.gen.cs new file mode 100644 index 0000000..435d256 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDescriptorPoolCreateFlags.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorPoolCreateFlagBits - Bitmask specifying certain supported operations on a descriptor pool + /// + /// + /// + /// Bits which can be set in VkDescriptorPoolCreateInfo::flags, + /// enabling operations on a descriptor pool, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkDescriptorPoolCreateFlagBits { + /// VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, + /// // Provided by VK_VERSION_1_2 + /// VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = 0x00000002, + /// // Provided by VK_EXT_mutable_descriptor_type + /// VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT = 0x00000004, + /// // Provided by VK_NV_descriptor_pool_overallocation + /// VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV = 0x00000008, + /// // Provided by VK_NV_descriptor_pool_overallocation + /// VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV = 0x00000010, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT, + /// // Provided by VK_VALVE_mutable_descriptor_type + /// VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT, + /// } VkDescriptorPoolCreateFlagBits; + /// + /// + [Flags] + public enum VkDescriptorPoolCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// FreeDescriptorSetBit specifies that descriptor sets can return their individual allocations to the pool, i.e. all of vkAllocateDescriptorSets, vkFreeDescriptorSets, and vkResetDescriptorPool are allowed. Otherwise, descriptor sets allocated from the pool must not be individually freed back to the pool, i.e. only vkAllocateDescriptorSets and vkResetDescriptorPool are allowed. + /// + FreeDescriptorSetBit = 0x00000001, + + /// + /// UpdateAfterBindBit + /// + UpdateAfterBindBit = 0x00000002, + + /// + /// HostOnlyBitEXT + /// + HostOnlyBitEXT = 0x00000004, + + /// + /// AllowOverallocationSetsBitNV + /// + AllowOverallocationSetsBitNV = 0x00000008, + + /// + /// AllowOverallocationPoolsBitNV + /// + AllowOverallocationPoolsBitNV = 0x00000010, + + /// + /// UpdateAfterBindBitEXT + /// + UpdateAfterBindBitEXT = UpdateAfterBindBit, + + /// + /// HostOnlyBitVALVE + /// + HostOnlyBitVALVE = HostOnlyBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDescriptorSetLayoutCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDescriptorSetLayoutCreateFlags.gen.cs new file mode 100644 index 0000000..14e9772 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDescriptorSetLayoutCreateFlags.gen.cs @@ -0,0 +1,99 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayoutCreateFlagBits - Bitmask specifying descriptor set layout properties + /// + /// + /// + /// Bits which can be set in + /// VkDescriptorSetLayoutCreateInfo::flags, specifying options for + /// descriptor set layout, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkDescriptorSetLayoutCreateFlagBits { + /// // Provided by VK_VERSION_1_2 + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT = 0x00000002, + /// // Provided by VK_VERSION_1_4 + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT = 0x00000001, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00000010, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 0x00000020, + /// // Provided by VK_NV_device_generated_commands_compute + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00000080, + /// // Provided by VK_EXT_mutable_descriptor_type + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT = 0x00000004, + /// // Provided by VK_NV_per_stage_descriptor_set + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV = 0x00000040, + /// // Provided by VK_KHR_push_descriptor + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, + /// // Provided by VK_VALVE_mutable_descriptor_type + /// VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT, + /// } VkDescriptorSetLayoutCreateFlagBits; + /// + /// + [Flags] + public enum VkDescriptorSetLayoutCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// UpdateAfterBindPoolBit + /// + UpdateAfterBindPoolBit = 0x00000002, + + /// + /// PushDescriptorBit + /// + PushDescriptorBit = 0x00000001, + + /// + /// DescriptorBufferBitEXT + /// + DescriptorBufferBitEXT = 0x00000010, + + /// + /// EmbeddedImmutableSamplersBitEXT + /// + EmbeddedImmutableSamplersBitEXT = 0x00000020, + + /// + /// IndirectBindableBitNV + /// + IndirectBindableBitNV = 0x00000080, + + /// + /// HostOnlyPoolBitEXT + /// + HostOnlyPoolBitEXT = 0x00000004, + + /// + /// PerStageBitNV + /// + PerStageBitNV = 0x00000040, + + /// + /// PushDescriptorBitKHR + /// + PushDescriptorBitKHR = PushDescriptorBit, + + /// + /// UpdateAfterBindPoolBitEXT + /// + UpdateAfterBindPoolBitEXT = UpdateAfterBindPoolBit, + + /// + /// HostOnlyPoolBitVALVE + /// + HostOnlyPoolBitVALVE = HostOnlyPoolBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDescriptorType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDescriptorType.gen.cs new file mode 100644 index 0000000..8237aff --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDescriptorType.gen.cs @@ -0,0 +1,159 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorType - Specifies the type of a descriptor in a descriptor set + /// + /// + /// + /// Possible descriptor types are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkDescriptorType { + /// VK_DESCRIPTOR_TYPE_SAMPLER = 0, + /// VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, + /// VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2, + /// VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3, + /// VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4, + /// VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5, + /// VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6, + /// VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7, + /// VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8, + /// VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9, + /// VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10, + /// // Provided by VK_VERSION_1_3 + /// VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK = 1000138000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000, + /// // Provided by VK_NV_ray_tracing + /// VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000, + /// // Provided by VK_QCOM_image_processing + /// VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000, + /// // Provided by VK_QCOM_image_processing + /// VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM = 1000440001, + /// // Provided by VK_ARM_tensors + /// VK_DESCRIPTOR_TYPE_TENSOR_ARM = 1000460000, + /// // Provided by VK_EXT_mutable_descriptor_type + /// VK_DESCRIPTOR_TYPE_MUTABLE_EXT = 1000351000, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV = 1000570000, + /// // Provided by VK_EXT_inline_uniform_block + /// VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, + /// // Provided by VK_VALVE_mutable_descriptor_type + /// VK_DESCRIPTOR_TYPE_MUTABLE_VALVE = VK_DESCRIPTOR_TYPE_MUTABLE_EXT, + /// } VkDescriptorType; + /// + /// + public enum VkDescriptorType : int + { + /// + /// Sampler specifies a sampler descriptor^. + /// + Sampler = 0, + + /// + /// CombinedImageSampler specifies a combined image sampler descriptor^. + /// + CombinedImageSampler = 1, + + /// + /// SampledImage specifies a sampled image descriptor^. + /// + SampledImage = 2, + + /// + /// StorageImage specifies a storage image descriptor^. + /// + StorageImage = 3, + + /// + /// UniformTexelBuffer specifies a uniform texel buffer descriptor^. + /// + UniformTexelBuffer = 4, + + /// + /// StorageTexelBuffer specifies a storage texel buffer descriptor^. + /// + StorageTexelBuffer = 5, + + /// + /// UniformBuffer specifies a uniform buffer descriptor^. + /// + UniformBuffer = 6, + + /// + /// StorageBuffer specifies a storage buffer descriptor^. + /// + StorageBuffer = 7, + + /// + /// UniformBufferDynamic specifies a dynamic uniform buffer descriptor^. + /// + UniformBufferDynamic = 8, + + /// + /// StorageBufferDynamic specifies a dynamic storage buffer descriptor^. + /// + StorageBufferDynamic = 9, + + /// + /// InputAttachment specifies an input attachment descriptor^. + /// + InputAttachment = 10, + + /// + /// InlineUniformBlock + /// + InlineUniformBlock = 1000138000, + + /// + /// AccelerationStructureKHR + /// + AccelerationStructureKHR = 1000150000, + + /// + /// AccelerationStructureNV + /// + AccelerationStructureNV = 1000165000, + + /// + /// SampleWeightImageQCOM + /// + SampleWeightImageQCOM = 1000440000, + + /// + /// BlockMatchImageQCOM + /// + BlockMatchImageQCOM = 1000440001, + + /// + /// TensorARM + /// + TensorARM = 1000460000, + + /// + /// MutableEXT + /// + MutableEXT = 1000351000, + + /// + /// PartitionedAccelerationStructureNV + /// + PartitionedAccelerationStructureNV = 1000570000, + + /// + /// InlineUniformBlockEXT + /// + InlineUniformBlockEXT = InlineUniformBlock, + + /// + /// MutableVALVE + /// + MutableVALVE = MutableEXT, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDescriptorUpdateTemplateType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDescriptorUpdateTemplateType.gen.cs new file mode 100644 index 0000000..08721c3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDescriptorUpdateTemplateType.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorUpdateTemplateType - Indicates the valid usage of the descriptor update template + /// + /// + /// + /// The descriptor update template type is determined by the + /// VkDescriptorUpdateTemplateCreateInfo::templateType property, + /// which takes the following values: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkDescriptorUpdateTemplateType { + /// VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0, + /// // Provided by VK_VERSION_1_4 + /// VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS = 1, + /// // Provided by VK_KHR_descriptor_update_template with VK_KHR_push_descriptor, VK_KHR_push_descriptor with VK_VERSION_1_1 or VK_KHR_descriptor_update_template + /// VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, + /// // Provided by VK_KHR_descriptor_update_template + /// VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, + /// } VkDescriptorUpdateTemplateType; + /// + /// + public enum VkDescriptorUpdateTemplateType : int + { + /// + /// DescriptorSet specifies that the descriptor update template will be used for descriptor set updates only. + /// + DescriptorSet = 0, + + /// + /// PushDescriptors + /// + PushDescriptors = 1, + + /// + /// PushDescriptorsKHR + /// + PushDescriptorsKHR = PushDescriptors, + + /// + /// DescriptorSetKHR + /// + DescriptorSetKHR = DescriptorSet, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingFlagsEXT.gen.cs new file mode 100644 index 0000000..f93bc94 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingFlagsEXT.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceAddressBindingFlagBitsEXT - Bitmask specifying the additional information about a binding event + /// + /// + /// + /// Bits which can be set in + /// VkDeviceAddressBindingCallbackDataEXT::flags specifying + /// additional information about a binding event are: + /// + /// + /// // Provided by VK_EXT_device_address_binding_report + /// typedef enum VkDeviceAddressBindingFlagBitsEXT { + /// VK_DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = 0x00000001, + /// } VkDeviceAddressBindingFlagBitsEXT; + /// + /// + [Flags] + public enum VkDeviceAddressBindingFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// InternalObjectBitEXT specifies that VkDeviceAddressBindingCallbackDataEXT describes a Vulkan object that has not been made visible to the application via a Vulkan command. + /// + InternalObjectBitEXT = 0x00000001, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingTypeEXT.gen.cs new file mode 100644 index 0000000..4707acc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceAddressBindingTypeEXT.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceAddressBindingTypeEXT - Enum describing a change in device address bindings + /// + /// + /// + /// The VkDeviceAddressBindingTypeEXT enum is defined as: + /// + /// + /// // Provided by VK_EXT_device_address_binding_report + /// typedef enum VkDeviceAddressBindingTypeEXT { + /// VK_DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = 0, + /// VK_DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = 1, + /// } VkDeviceAddressBindingTypeEXT; + /// + /// + public enum VkDeviceAddressBindingTypeEXT : int + { + /// + /// BindEXT specifies that a new GPU-accessible virtual address range has been bound. + /// + BindEXT = 0, + + /// + /// UnbindEXT specifies that a GPU-accessible virtual address range has been unbound. + /// + UnbindEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceDiagnosticsConfigFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceDiagnosticsConfigFlagsNV.gen.cs new file mode 100644 index 0000000..f798102 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceDiagnosticsConfigFlagsNV.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceDiagnosticsConfigFlagBitsNV - Bitmask specifying diagnostics flags + /// + /// + /// + /// Bits which can be set in + /// VkDeviceDiagnosticsConfigCreateInfoNV::flags include: + /// + /// + /// // Provided by VK_NV_device_diagnostics_config + /// typedef enum VkDeviceDiagnosticsConfigFlagBitsNV { + /// VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 0x00000001, + /// VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 0x00000002, + /// VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 0x00000004, + /// VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 0x00000008, + /// } VkDeviceDiagnosticsConfigFlagBitsNV; + /// + /// + [Flags] + public enum VkDeviceDiagnosticsConfigFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// EnableShaderDebugInfoBitNV enables the generation of debug information for shaders. + /// + EnableShaderDebugInfoBitNV = 0x00000001, + + /// + /// EnableResourceTrackingBitNV enables driver side tracking of resources (images, buffers, etc.) used to augment the device fault information. + /// + EnableResourceTrackingBitNV = 0x00000002, + + /// + /// EnableAutomaticCheckpointsBitNV enables automatic insertion of diagnostic checkpoints^ for draw calls, dispatches, and copies. The CPU call stack at the time of the command will be associated as the marker data for the automatically inserted checkpoints. + /// + EnableAutomaticCheckpointsBitNV = 0x00000004, + + /// + /// EnableShaderErrorReportingBitNV enables shader error reporting. + /// + EnableShaderErrorReportingBitNV = 0x00000008, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceEventTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceEventTypeEXT.gen.cs new file mode 100644 index 0000000..9d94d70 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceEventTypeEXT.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceEventTypeEXT - Events that can occur on a device object + /// + /// + /// + /// Possible values of VkDeviceEventInfoEXT::deviceEvent, specifying + /// when a fence will be signaled, are: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef enum VkDeviceEventTypeEXT { + /// VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, + /// } VkDeviceEventTypeEXT; + /// + /// + public enum VkDeviceEventTypeEXT : int + { + /// + /// DisplayHotplugEXT specifies that the fence is signaled when a display is plugged into or unplugged from the specified device. Applications can use this notification to determine when they need to re-enumerate the available displays on a device. + /// + DisplayHotplugEXT = 0, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceFaultAddressTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceFaultAddressTypeKHR.gen.cs new file mode 100644 index 0000000..8c1ceaf --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceFaultAddressTypeKHR.gen.cs @@ -0,0 +1,114 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultAddressTypeKHR - Page fault access types + /// + /// + /// + /// Possible values of VkDeviceFaultAddressInfoKHR::addressType are: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef enum VkDeviceFaultAddressTypeKHR { + /// VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_KHR = 0, + /// VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_KHR = 1, + /// VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_KHR = 2, + /// VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_KHR = 3, + /// VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_KHR = 4, + /// VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_KHR = 5, + /// VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_KHR = 6, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_KHR, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_KHR, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_KHR, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_KHR, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_KHR, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_KHR, + /// // Provided by VK_EXT_device_fault + /// VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_KHR, + /// } VkDeviceFaultAddressTypeKHR; + /// + /// + public enum VkDeviceFaultAddressTypeKHR : int + { + /// + /// NoneKHR specifies that VkDeviceFaultAddressInfoKHR does not describe a page fault, or an instruction address. + /// + NoneKHR = 0, + + /// + /// ReadInvalidKHR specifies that VkDeviceFaultAddressInfoKHR describes a page fault triggered by an invalid read operation. + /// + ReadInvalidKHR = 1, + + /// + /// WriteInvalidKHR specifies that VkDeviceFaultAddressInfoKHR describes a page fault triggered by an invalid write operation. + /// + WriteInvalidKHR = 2, + + /// + /// ExecuteInvalidKHR specifies that VkDeviceFaultAddressInfoKHR describes a page fault triggered by an attempt to execute non-executable memory. + /// + ExecuteInvalidKHR = 3, + + /// + /// InstructionPointerUnknownKHR specifies an instruction pointer value at the time the fault occurred. This may or may not be related to a fault. + /// + InstructionPointerUnknownKHR = 4, + + /// + /// InstructionPointerInvalidKHR specifies an instruction pointer value associated with an invalid instruction fault. + /// + InstructionPointerInvalidKHR = 5, + + /// + /// InstructionPointerFaultKHR specifies an instruction pointer value associated with a fault. [NOTE] + /// + InstructionPointerFaultKHR = 6, + + /// + /// NoneEXT + /// + NoneEXT = NoneKHR, + + /// + /// ReadInvalidEXT + /// + ReadInvalidEXT = ReadInvalidKHR, + + /// + /// WriteInvalidEXT + /// + WriteInvalidEXT = WriteInvalidKHR, + + /// + /// ExecuteInvalidEXT + /// + ExecuteInvalidEXT = ExecuteInvalidKHR, + + /// + /// InstructionPointerUnknownEXT + /// + InstructionPointerUnknownEXT = InstructionPointerUnknownKHR, + + /// + /// InstructionPointerInvalidEXT + /// + InstructionPointerInvalidEXT = InstructionPointerInvalidKHR, + + /// + /// InstructionPointerFaultEXT + /// + InstructionPointerFaultEXT = InstructionPointerFaultKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceFaultFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceFaultFlagsKHR.gen.cs new file mode 100644 index 0000000..0475136 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceFaultFlagsKHR.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultFlagBitsKHR - Bits which may be set in a VkDeviceFaultFlagsKHR bitmask + /// + /// + /// + /// Bits which can be set in VkDeviceFaultInfoKHR::flags providing + /// information of the status of the fault reported and which additional fields + /// have been populated by the driver, are: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef enum VkDeviceFaultFlagBitsKHR { + /// VK_DEVICE_FAULT_FLAG_DEVICE_LOST_KHR = 0x00000001, + /// VK_DEVICE_FAULT_FLAG_MEMORY_ADDRESS_KHR = 0x00000002, + /// VK_DEVICE_FAULT_FLAG_INSTRUCTION_ADDRESS_KHR = 0x00000004, + /// VK_DEVICE_FAULT_FLAG_VENDOR_KHR = 0x00000008, + /// VK_DEVICE_FAULT_FLAG_WATCHDOG_TIMEOUT_KHR = 0x00000010, + /// VK_DEVICE_FAULT_FLAG_OVERFLOW_KHR = 0x00000020, + /// } VkDeviceFaultFlagBitsKHR; + /// + /// + [Flags] + public enum VkDeviceFaultFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// FlagDeviceLostKHR specifies that the fault has resulted in a device lost condition. No subsequent entries will be returned for this device. + /// + FlagDeviceLostKHR = 0x00000001, + + /// + /// FlagMemoryAddressKHR specifies that the fault has associated memory access address information which is stored in the faultAddressInfo field (see VkDeviceFaultAddressInfoKHR). + /// + FlagMemoryAddressKHR = 0x00000002, + + /// + /// FlagInstructionAddressKHR specifies that the fault has an associated instruction address which is stored in the instructionAddressInfo field (see VkDeviceFaultAddressInfoKHR). + /// + FlagInstructionAddressKHR = 0x00000004, + + /// + /// FlagVendorKHR specifies that the fault has associated vendor information stored in the vendorInfo field (see VkDeviceFaultVendorInfoKHR). + /// + FlagVendorKHR = 0x00000008, + + /// + /// FlagWatchdogTimeoutKHR specifies that the fault was the result of a GPU timeout. Further information may: be made available using other platform specific extensions via the pNext chain of the VkDeviceFaultInfoKHR structure. + /// + FlagWatchdogTimeoutKHR = 0x00000010, + + /// + /// FlagOverflowKHR specifies that prior faults have occurred, but information about them is no longer available. This typically indicates that faults are occurring more rapidly than the calling application is able to read them back. + /// + FlagOverflowKHR = 0x00000020, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceFaultVendorBinaryHeaderVersionKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceFaultVendorBinaryHeaderVersionKHR.gen.cs new file mode 100644 index 0000000..f6c9fff --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceFaultVendorBinaryHeaderVersionKHR.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultVendorBinaryHeaderVersionKHR - Encode vendor binary crash dump version + /// + /// + /// + /// Possible values of the headerVersion value of the crash dump header + /// are: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef enum VkDeviceFaultVendorBinaryHeaderVersionKHR { + /// VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_KHR = 1, + /// VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_KHR, + /// } VkDeviceFaultVendorBinaryHeaderVersionKHR; + /// + /// + public enum VkDeviceFaultVendorBinaryHeaderVersionKHR : int + { + /// + /// OneKHR specifies version one of the binary crash dump header. + /// + OneKHR = 1, + + /// + /// OneEXT + /// + OneEXT = OneKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceGroupPresentModeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceGroupPresentModeFlagsKHR.gen.cs new file mode 100644 index 0000000..d70b8b3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceGroupPresentModeFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes + /// + /// + /// + /// Bits which may: be set in + /// VkDeviceGroupPresentCapabilitiesKHR::modes, indicating which + /// device group presentation modes are supported, are: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface + /// typedef enum VkDeviceGroupPresentModeFlagBitsKHR { + /// VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001, + /// VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002, + /// VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004, + /// VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008, + /// } VkDeviceGroupPresentModeFlagBitsKHR; + /// + /// + [Flags] + public enum VkDeviceGroupPresentModeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// LocalBitKHR specifies that any physical device with a presentation engine can present its own swapchain images. + /// + LocalBitKHR = 0x00000001, + + /// + /// RemoteBitKHR specifies that any physical device with a presentation engine can present swapchain images from any physical device in its presentMask. + /// + RemoteBitKHR = 0x00000002, + + /// + /// SumBitKHR specifies that any physical device with a presentation engine can present the sum of swapchain images from any physical devices in its presentMask. + /// + SumBitKHR = 0x00000004, + + /// + /// LocalMultiDeviceBitKHR specifies that multiple physical devices with a presentation engine can each present their own swapchain images. + /// + LocalMultiDeviceBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceMemoryReportEventTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceMemoryReportEventTypeEXT.gen.cs new file mode 100644 index 0000000..4af3767 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceMemoryReportEventTypeEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemoryReportEventTypeEXT - Events that can occur on a device memory object + /// + /// + /// + /// Possible values of VkDeviceMemoryReportCallbackDataEXT::type, + /// specifying event types which cause the device driver to call the callback, + /// are: + /// + /// + /// // Provided by VK_EXT_device_memory_report + /// typedef enum VkDeviceMemoryReportEventTypeEXT { + /// VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0, + /// VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1, + /// VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2, + /// VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3, + /// VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4, + /// } VkDeviceMemoryReportEventTypeEXT; + /// + /// + public enum VkDeviceMemoryReportEventTypeEXT : int + { + /// + /// AllocateEXT specifies this event corresponds to the allocation of an internal device memory object or a VkDeviceMemory. + /// + AllocateEXT = 0, + + /// + /// FreeEXT specifies this event corresponds to the deallocation of an internally-allocated device memory object or a VkDeviceMemory. + /// + FreeEXT = 1, + + /// + /// ImportEXT specifies this event corresponds to the import of an external memory object. + /// + ImportEXT = 2, + + /// + /// UnimportEXT specifies this event is the release of an imported external memory object. + /// + UnimportEXT = 3, + + /// + /// AllocationFailedEXT specifies this event corresponds to the failed allocation of an internal device memory object or a VkDeviceMemory. + /// + AllocationFailedEXT = 4, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDeviceQueueCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDeviceQueueCreateFlags.gen.cs new file mode 100644 index 0000000..0c8b8ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDeviceQueueCreateFlags.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceQueueCreateFlagBits - Bitmask specifying behavior of the queue + /// + /// + /// + /// Bits which can be set in VkDeviceQueueCreateInfo::flags, + /// specifying usage behavior of a queue, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkDeviceQueueCreateFlagBits { + /// // Provided by VK_VERSION_1_1 + /// VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001, + /// // Provided by VK_KHR_internally_synchronized_queues + /// VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR = 0x00000004, + /// } VkDeviceQueueCreateFlagBits; + /// + /// + [Flags] + public enum VkDeviceQueueCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// ProtectedBit specifies that the device queue is a protected-capable queue. + /// + ProtectedBit = 0x00000001, + + /// + /// InternallySynchronizedBitKHR + /// + InternallySynchronizedBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDirectDriverLoadingModeLUNARG.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDirectDriverLoadingModeLUNARG.gen.cs new file mode 100644 index 0000000..931ee10 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDirectDriverLoadingModeLUNARG.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDirectDriverLoadingModeLUNARG - Specify loader behavior of added drivers + /// + /// + /// + /// Possible values of VkDirectDriverLoadingListLUNARG::mode, + /// specifying the mode in which drivers are used, are: + /// + /// + /// // Provided by VK_LUNARG_direct_driver_loading + /// typedef enum VkDirectDriverLoadingModeLUNARG { + /// VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG = 0, + /// VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG = 1, + /// } VkDirectDriverLoadingModeLUNARG; + /// + /// + public enum VkDirectDriverLoadingModeLUNARG : int + { + /// + /// ExclusiveLUNARG specifies that the provided drivers are used instead of the system-loaded drivers. + /// + ExclusiveLUNARG = 0, + + /// + /// InclusiveLUNARG specifies that the provided drivers are used in addition to the system-loaded drivers. + /// + InclusiveLUNARG = 1, + + /// + /// MaxEnumLUNARG + /// + MaxEnumLUNARG = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDiscardRectangleModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDiscardRectangleModeEXT.gen.cs new file mode 100644 index 0000000..c18cb8f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDiscardRectangleModeEXT.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDiscardRectangleModeEXT - Specify the discard rectangle mode + /// + /// + /// + /// VkDiscardRectangleModeEXT values are: + /// + /// + /// // Provided by VK_EXT_discard_rectangles + /// typedef enum VkDiscardRectangleModeEXT { + /// VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, + /// VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, + /// } VkDiscardRectangleModeEXT; + /// + /// + public enum VkDiscardRectangleModeEXT : int + { + /// + /// InclusiveEXT specifies that the discard rectangle test is inclusive. + /// + InclusiveEXT = 0, + + /// + /// ExclusiveEXT specifies that the discard rectangle test is exclusive. + /// + ExclusiveEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDisplayEventTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDisplayEventTypeEXT.gen.cs new file mode 100644 index 0000000..9ea1b92 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDisplayEventTypeEXT.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayEventTypeEXT - Events that can occur on a display object + /// + /// + /// + /// Possible values of VkDisplayEventInfoEXT::displayEvent, + /// specifying when a fence will be signaled, are: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef enum VkDisplayEventTypeEXT { + /// VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, + /// } VkDisplayEventTypeEXT; + /// + /// + public enum VkDisplayEventTypeEXT : int + { + /// + /// FirstPixelOutEXT specifies that the fence is signaled when the first pixel of the next display refresh cycle leaves the display engine for the display. + /// + FirstPixelOutEXT = 0, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDisplayPlaneAlphaFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDisplayPlaneAlphaFlagsKHR.gen.cs new file mode 100644 index 0000000..269e118 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDisplayPlaneAlphaFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPlaneAlphaFlagBitsKHR - Alpha blending type + /// + /// + /// + /// Bits which can be set in + /// VkDisplaySurfaceCreateInfoKHR::alphaMode, specifying the type of + /// alpha blending to use on a display, are: + /// + /// + /// // Provided by VK_KHR_display + /// typedef enum VkDisplayPlaneAlphaFlagBitsKHR { + /// VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, + /// VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, + /// VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, + /// VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, + /// } VkDisplayPlaneAlphaFlagBitsKHR; + /// + /// + [Flags] + public enum VkDisplayPlaneAlphaFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueBitKHR specifies that the source image will be treated as opaque. + /// + OpaqueBitKHR = 0x00000001, + + /// + /// GlobalBitKHR specifies that a global alpha value must be specified that will be applied to all pixels in the source image. + /// + GlobalBitKHR = 0x00000002, + + /// + /// PerPixelBitKHR specifies that the alpha value will be determined by the alpha component of the source image's pixels. If the source format contains no alpha values, no blending will be applied. The source alpha values are not premultiplied into the source image's other color components. + /// + PerPixelBitKHR = 0x00000004, + + /// + /// PerPixelPremultipliedBitKHR is equivalent to VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, except the source alpha values are assumed to be premultiplied into the source image's other color components. + /// + PerPixelPremultipliedBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDisplayPowerStateEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDisplayPowerStateEXT.gen.cs new file mode 100644 index 0000000..1921b2b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDisplayPowerStateEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPowerStateEXT - Possible power states for a display + /// + /// + /// + /// Possible values of VkDisplayPowerInfoEXT::powerState, specifying + /// the new power state of a display, are: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef enum VkDisplayPowerStateEXT { + /// VK_DISPLAY_POWER_STATE_OFF_EXT = 0, + /// VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, + /// VK_DISPLAY_POWER_STATE_ON_EXT = 2, + /// } VkDisplayPowerStateEXT; + /// + /// + public enum VkDisplayPowerStateEXT : int + { + /// + /// OffEXT specifies that the display is powered down. + /// + OffEXT = 0, + + /// + /// SuspendEXT specifies that the display is put into a low power mode, from which it may: be able to transition back to VK_DISPLAY_POWER_STATE_ON_EXT more quickly than if it were in VK_DISPLAY_POWER_STATE_OFF_EXT. This state may: be the same as VK_DISPLAY_POWER_STATE_OFF_EXT. + /// + SuspendEXT = 1, + + /// + /// OnEXT specifies that the display is powered on. + /// + OnEXT = 2, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDisplaySurfaceStereoTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDisplaySurfaceStereoTypeNV.gen.cs new file mode 100644 index 0000000..152ec34 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDisplaySurfaceStereoTypeNV.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplaySurfaceStereoTypeNV - 3D Stereo type + /// + /// + /// + /// Possible values of + /// VkDisplaySurfaceStereoCreateInfoNV::stereoType, specifying the + /// type of 3D stereo presentation the display will be configured for, are: + /// + /// + /// // Provided by VK_NV_display_stereo + /// typedef enum VkDisplaySurfaceStereoTypeNV { + /// VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV = 0, + /// VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV = 1, + /// VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV = 2, + /// VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV = 3, + /// } VkDisplaySurfaceStereoTypeNV; + /// + /// + public enum VkDisplaySurfaceStereoTypeNV : int + { + /// + /// NoneNV specifies no configuration for stereo presentation. This is the default behavior if VkDisplaySurfaceStereoCreateInfoNV is not provided. + /// + NoneNV = 0, + + /// + /// OnboardDinNV specifies configuration for glasses that connect via a DIN connector on the back of the graphics card. + /// + OnboardDinNV = 1, + + /// + /// Hdmi3DNV specifies configuration for HDMI 3D compatible display devices with their own stereo emitters. This is also known as HDMI Frame Packed Stereo, where the left and right eye images are stacked into a single frame with a doubled pixel clock and refresh rate. + /// + Hdmi3DNV = 2, + + /// + /// InbandDisplayportNV specifies configuration for DisplayPort display devices with in-band stereo signaling and emitters. + /// + InbandDisplayportNV = 3, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDriverId.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDriverId.gen.cs new file mode 100644 index 0000000..9e781f2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDriverId.gen.cs @@ -0,0 +1,288 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDriverId - Khronos driver IDs + /// + /// + /// + /// Khronos driver IDs which may: be returned in + /// VkPhysicalDeviceDriverProperties::driverID are: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkDriverId { + /// VK_DRIVER_ID_AMD_PROPRIETARY = 1, + /// VK_DRIVER_ID_AMD_OPEN_SOURCE = 2, + /// VK_DRIVER_ID_MESA_RADV = 3, + /// VK_DRIVER_ID_NVIDIA_PROPRIETARY = 4, + /// VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS = 5, + /// VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA = 6, + /// VK_DRIVER_ID_IMAGINATION_PROPRIETARY = 7, + /// VK_DRIVER_ID_QUALCOMM_PROPRIETARY = 8, + /// VK_DRIVER_ID_ARM_PROPRIETARY = 9, + /// VK_DRIVER_ID_GOOGLE_SWIFTSHADER = 10, + /// VK_DRIVER_ID_GGP_PROPRIETARY = 11, + /// VK_DRIVER_ID_BROADCOM_PROPRIETARY = 12, + /// VK_DRIVER_ID_MESA_LLVMPIPE = 13, + /// VK_DRIVER_ID_MOLTENVK = 14, + /// VK_DRIVER_ID_COREAVI_PROPRIETARY = 15, + /// VK_DRIVER_ID_JUICE_PROPRIETARY = 16, + /// VK_DRIVER_ID_VERISILICON_PROPRIETARY = 17, + /// VK_DRIVER_ID_MESA_TURNIP = 18, + /// VK_DRIVER_ID_MESA_V3DV = 19, + /// VK_DRIVER_ID_MESA_PANVK = 20, + /// VK_DRIVER_ID_SAMSUNG_PROPRIETARY = 21, + /// VK_DRIVER_ID_MESA_VENUS = 22, + /// VK_DRIVER_ID_MESA_DOZEN = 23, + /// VK_DRIVER_ID_MESA_NVK = 24, + /// VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25, + /// VK_DRIVER_ID_MESA_HONEYKRISP = 26, + /// VK_DRIVER_ID_VULKAN_SC_EMULATION_ON_VULKAN = 27, + /// VK_DRIVER_ID_MESA_KOSMICKRISP = 28, + /// VK_DRIVER_ID_MESA_GFXSTREAM = 29, + /// VK_DRIVER_ID_APE_SOFT = 30, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR = VK_DRIVER_ID_NVIDIA_PROPRIETARY, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR = VK_DRIVER_ID_IMAGINATION_PROPRIETARY, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = VK_DRIVER_ID_QUALCOMM_PROPRIETARY, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_ARM_PROPRIETARY_KHR = VK_DRIVER_ID_ARM_PROPRIETARY, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR = VK_DRIVER_ID_GOOGLE_SWIFTSHADER, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_GGP_PROPRIETARY_KHR = VK_DRIVER_ID_GGP_PROPRIETARY, + /// // Provided by VK_KHR_driver_properties + /// VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR = VK_DRIVER_ID_BROADCOM_PROPRIETARY, + /// } VkDriverId; + /// + /// + public enum VkDriverId : int + { + /// + /// AMDProprietary + /// + AMDProprietary = 1, + + /// + /// AMDOpenSource + /// + AMDOpenSource = 2, + + /// + /// MESARadv + /// + MESARadv = 3, + + /// + /// NvidiaProprietary + /// + NvidiaProprietary = 4, + + /// + /// INTELProprietaryWindows + /// + INTELProprietaryWindows = 5, + + /// + /// INTELOpenSourceMESA + /// + INTELOpenSourceMESA = 6, + + /// + /// ImaginationProprietary + /// + ImaginationProprietary = 7, + + /// + /// QualcommProprietary + /// + QualcommProprietary = 8, + + /// + /// ARMProprietary + /// + ARMProprietary = 9, + + /// + /// GOOGLESwiftshader + /// + GOOGLESwiftshader = 10, + + /// + /// GGPProprietary + /// + GGPProprietary = 11, + + /// + /// BroadcomProprietary + /// + BroadcomProprietary = 12, + + /// + /// MESALlvmpipe + /// + MESALlvmpipe = 13, + + /// + /// Moltenvk + /// + Moltenvk = 14, + + /// + /// CoreaviProprietary + /// + CoreaviProprietary = 15, + + /// + /// JUICEProprietary + /// + JUICEProprietary = 16, + + /// + /// VerisiliconProprietary + /// + VerisiliconProprietary = 17, + + /// + /// MESATurnip + /// + MESATurnip = 18, + + /// + /// MESAV3Dv + /// + MESAV3Dv = 19, + + /// + /// MESAPanvk + /// + MESAPanvk = 20, + + /// + /// SAMSUNGProprietary + /// + SAMSUNGProprietary = 21, + + /// + /// MESAVenus + /// + MESAVenus = 22, + + /// + /// MESADozen + /// + MESADozen = 23, + + /// + /// MESANvk + /// + MESANvk = 24, + + /// + /// ImaginationOpenSourceMESA + /// + ImaginationOpenSourceMESA = 25, + + /// + /// MESAHoneykrisp + /// + MESAHoneykrisp = 26, + + /// + /// VulkanScEmulationOnVulkan + /// + VulkanScEmulationOnVulkan = 27, + + /// + /// MESAKosmickrisp + /// + MESAKosmickrisp = 28, + + /// + /// MESAGfxstream + /// + MESAGfxstream = 29, + + /// + /// ApeSoft + /// + ApeSoft = 30, + + /// + /// AMDProprietaryKHR + /// + AMDProprietaryKHR = AMDProprietary, + + /// + /// AMDOpenSourceKHR + /// + AMDOpenSourceKHR = AMDOpenSource, + + /// + /// MESARadvKHR + /// + MESARadvKHR = MESARadv, + + /// + /// NvidiaProprietaryKHR + /// + NvidiaProprietaryKHR = NvidiaProprietary, + + /// + /// INTELProprietaryWindowsKHR + /// + INTELProprietaryWindowsKHR = INTELProprietaryWindows, + + /// + /// INTELOpenSourceMESAKHR + /// + INTELOpenSourceMESAKHR = INTELOpenSourceMESA, + + /// + /// ImaginationProprietaryKHR + /// + ImaginationProprietaryKHR = ImaginationProprietary, + + /// + /// QualcommProprietaryKHR + /// + QualcommProprietaryKHR = QualcommProprietary, + + /// + /// ARMProprietaryKHR + /// + ARMProprietaryKHR = ARMProprietary, + + /// + /// GOOGLESwiftshaderKHR + /// + GOOGLESwiftshaderKHR = GOOGLESwiftshader, + + /// + /// GGPProprietaryKHR + /// + GGPProprietaryKHR = GGPProprietary, + + /// + /// BroadcomProprietaryKHR + /// + BroadcomProprietaryKHR = BroadcomProprietary, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkDynamicState.gen.cs b/Brutal.Vulkan/Generated/Enums/VkDynamicState.gen.cs new file mode 100644 index 0000000..97fcc42 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkDynamicState.gen.cs @@ -0,0 +1,647 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDynamicState - Indicate which dynamic state is taken from dynamic state commands + /// + /// + /// + /// The source of different pieces of dynamic state is specified by the + /// VkPipelineDynamicStateCreateInfo::pDynamicStates property of the + /// currently active pipeline, each of whose elements must be one of the + /// values: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkDynamicState { + /// VK_DYNAMIC_STATE_VIEWPORT = 0, + /// VK_DYNAMIC_STATE_SCISSOR = 1, + /// VK_DYNAMIC_STATE_LINE_WIDTH = 2, + /// VK_DYNAMIC_STATE_DEPTH_BIAS = 3, + /// VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, + /// VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, + /// VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, + /// VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, + /// VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_CULL_MODE = 1000267000, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_FRONT_FACE = 1000267001, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY = 1000267002, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT = 1000267003, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT = 1000267004, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE = 1000267005, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE = 1000267006, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE = 1000267007, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_DEPTH_COMPARE_OP = 1000267008, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE = 1000267009, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE = 1000267010, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_STENCIL_OP = 1000267011, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE = 1000377001, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE = 1000377002, + /// // Provided by VK_VERSION_1_3 + /// VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE = 1000377004, + /// // Provided by VK_VERSION_1_4 + /// VK_DYNAMIC_STATE_LINE_STIPPLE = 1000259000, + /// // Provided by VK_NV_clip_space_w_scaling + /// VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, + /// // Provided by VK_EXT_discard_rectangles + /// VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, + /// // Provided by VK_EXT_discard_rectangles + /// VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT = 1000099001, + /// // Provided by VK_EXT_discard_rectangles + /// VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT = 1000099002, + /// // Provided by VK_EXT_sample_locations + /// VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000, + /// // Provided by VK_NV_shading_rate_image + /// VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004, + /// // Provided by VK_NV_shading_rate_image + /// VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006, + /// // Provided by VK_NV_scissor_exclusive + /// VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000, + /// // Provided by VK_NV_scissor_exclusive + /// VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR = 1000226000, + /// // Provided by VK_EXT_vertex_input_dynamic_state + /// VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000, + /// // Provided by VK_EXT_extended_dynamic_state2 + /// VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT = 1000377000, + /// // Provided by VK_EXT_extended_dynamic_state2 + /// VK_DYNAMIC_STATE_LOGIC_OP_EXT = 1000377003, + /// // Provided by VK_EXT_color_write_enable + /// VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT = 1000381000, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT = 1000455003, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_POLYGON_MODE_EXT = 1000455004, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT = 1000455005, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_SAMPLE_MASK_EXT = 1000455006, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT = 1000455008, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT = 1000455009, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT = 1000455010, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT = 1000455011, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT = 1000455012, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_KHR_maintenance2 or VK_VERSION_1_1 + /// VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_transform_feedback + /// VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT = 1000455013, + /// // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014, + /// // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015, + /// // Provided by VK_EXT_depth_clip_enable with VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT = 1000455016, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_sample_locations + /// VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017, + /// // Provided by VK_EXT_blend_operation_advanced with VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT = 1000455018, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_provoking_vertex + /// VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT = 1000455019, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization + /// VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT = 1000455020, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization + /// VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT = 1000455021, + /// // Provided by VK_EXT_depth_clip_control with VK_EXT_extended_dynamic_state3 + /// VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_clip_space_w_scaling + /// VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV = 1000455023, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_viewport_swizzle + /// VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV = 1000455024, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color + /// VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV = 1000455025, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color + /// VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV = 1000455026, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples + /// VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV = 1000455027, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples + /// VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples + /// VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV = 1000455029, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_shading_rate_image + /// VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV = 1000455030, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_representative_fragment_test + /// VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031, + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_coverage_reduction_mode + /// VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV = 1000455032, + /// // Provided by VK_EXT_attachment_feedback_loop_dynamic_state + /// VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000, + /// // Provided by VK_EXT_depth_clamp_control + /// VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT = 1000582000, + /// // Provided by VK_EXT_line_rasterization + /// VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_CULL_MODE_EXT = VK_DYNAMIC_STATE_CULL_MODE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_FRONT_FACE_EXT = VK_DYNAMIC_STATE_FRONT_FACE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_DYNAMIC_STATE_STENCIL_OP_EXT = VK_DYNAMIC_STATE_STENCIL_OP, + /// // Provided by VK_EXT_extended_dynamic_state2 + /// VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, + /// // Provided by VK_EXT_extended_dynamic_state2 + /// VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, + /// // Provided by VK_EXT_extended_dynamic_state2 + /// VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, + /// // Provided by VK_KHR_line_rasterization + /// VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = VK_DYNAMIC_STATE_LINE_STIPPLE, + /// } VkDynamicState; + /// + /// + public enum VkDynamicState : int + { + /// + /// Viewport specifies that the pViewports state in VkPipelineViewportStateCreateInfo will be ignored and must be set dynamically with vkCmdSetViewport before any drawing commands. The number of viewports used by a pipeline is still specified by the viewportCount member of VkPipelineViewportStateCreateInfo. + /// + Viewport = 0, + + /// + /// Scissor specifies that the pScissors state in VkPipelineViewportStateCreateInfo will be ignored and must be set dynamically with vkCmdSetScissor before any drawing commands. The number of scissor rectangles used by a pipeline is still specified by the scissorCount member of VkPipelineViewportStateCreateInfo. + /// + Scissor = 1, + + /// + /// LineWidth specifies that the lineWidth state in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetLineWidth before any drawing commands that generate line primitives for the rasterizer. + /// + LineWidth = 2, + + /// + /// DepthBias specifies that the depthBiasConstantFactor, depthBiasClamp and depthBiasSlopeFactor states in VkPipelineRasterizationStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthBias before any draws are performed with depth bias enabled^. + /// + DepthBias = 3, + + /// + /// BlendConstants specifies that the blendConstants state in VkPipelineColorBlendStateCreateInfo will be ignored and must be set dynamically with vkCmdSetBlendConstants before any draws are performed with a pipeline state with VkPipelineColorBlendAttachmentState member blendEnable set to VK_TRUE and any of the blend functions using a constant blend color. + /// + BlendConstants = 4, + + /// + /// DepthBounds specifies that the minDepthBounds and maxDepthBounds states of VkPipelineDepthStencilStateCreateInfo will be ignored and must be set dynamically with vkCmdSetDepthBounds before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member depthBoundsTestEnable set to VK_TRUE. + /// + DepthBounds = 5, + + /// + /// StencilCompareMask specifies that the compareMask state in VkPipelineDepthStencilStateCreateInfo for both front and back will be ignored and must be set dynamically with vkCmdSetStencilCompareMask before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member stencilTestEnable set to VK_TRUE + /// + StencilCompareMask = 6, + + /// + /// StencilWriteMask specifies that the writeMask state in VkPipelineDepthStencilStateCreateInfo for both front and back will be ignored and must be set dynamically with vkCmdSetStencilWriteMask before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member stencilTestEnable set to VK_TRUE + /// + StencilWriteMask = 7, + + /// + /// StencilReference specifies that the reference state in VkPipelineDepthStencilStateCreateInfo for both front and back will be ignored and must be set dynamically with vkCmdSetStencilReference before any draws are performed with a pipeline state with VkPipelineDepthStencilStateCreateInfo member stencilTestEnable set to VK_TRUE + /// + StencilReference = 8, + + /// + /// CullMode + /// + CullMode = 1000267000, + + /// + /// FrontFace + /// + FrontFace = 1000267001, + + /// + /// PrimitiveTopology + /// + PrimitiveTopology = 1000267002, + + /// + /// ViewportWithCount + /// + ViewportWithCount = 1000267003, + + /// + /// ScissorWithCount + /// + ScissorWithCount = 1000267004, + + /// + /// VertexInputBindingStride + /// + VertexInputBindingStride = 1000267005, + + /// + /// DepthTestEnable + /// + DepthTestEnable = 1000267006, + + /// + /// DepthWriteEnable + /// + DepthWriteEnable = 1000267007, + + /// + /// DepthCompareOp + /// + DepthCompareOp = 1000267008, + + /// + /// DepthBoundsTestEnable + /// + DepthBoundsTestEnable = 1000267009, + + /// + /// StencilTestEnable + /// + StencilTestEnable = 1000267010, + + /// + /// StencilOp + /// + StencilOp = 1000267011, + + /// + /// RasterizerDiscardEnable + /// + RasterizerDiscardEnable = 1000377001, + + /// + /// DepthBiasEnable + /// + DepthBiasEnable = 1000377002, + + /// + /// PrimitiveRestartEnable + /// + PrimitiveRestartEnable = 1000377004, + + /// + /// LineStipple + /// + LineStipple = 1000259000, + + /// + /// ViewportWScalingNV + /// + ViewportWScalingNV = 1000087000, + + /// + /// DiscardRectangleEXT + /// + DiscardRectangleEXT = 1000099000, + + /// + /// DiscardRectangleEnableEXT + /// + DiscardRectangleEnableEXT = 1000099001, + + /// + /// DiscardRectangleModeEXT + /// + DiscardRectangleModeEXT = 1000099002, + + /// + /// SampleLocationsEXT + /// + SampleLocationsEXT = 1000143000, + + /// + /// RayTracingPipelineStackSizeKHR + /// + RayTracingPipelineStackSizeKHR = 1000347000, + + /// + /// ViewportShadingRatePaletteNV + /// + ViewportShadingRatePaletteNV = 1000164004, + + /// + /// ViewportCoarseSampleOrderNV + /// + ViewportCoarseSampleOrderNV = 1000164006, + + /// + /// ExclusiveScissorEnableNV + /// + ExclusiveScissorEnableNV = 1000205000, + + /// + /// ExclusiveScissorNV + /// + ExclusiveScissorNV = 1000205001, + + /// + /// FragmentShadingRateKHR + /// + FragmentShadingRateKHR = 1000226000, + + /// + /// VertexInputEXT + /// + VertexInputEXT = 1000352000, + + /// + /// PatchControlPointsEXT + /// + PatchControlPointsEXT = 1000377000, + + /// + /// LogicOpEXT + /// + LogicOpEXT = 1000377003, + + /// + /// ColorWriteEnableEXT + /// + ColorWriteEnableEXT = 1000381000, + + /// + /// DepthClampEnableEXT + /// + DepthClampEnableEXT = 1000455003, + + /// + /// PolygonModeEXT + /// + PolygonModeEXT = 1000455004, + + /// + /// RasterizationSamplesEXT + /// + RasterizationSamplesEXT = 1000455005, + + /// + /// SampleMaskEXT + /// + SampleMaskEXT = 1000455006, + + /// + /// AlphaToCoverageEnableEXT + /// + AlphaToCoverageEnableEXT = 1000455007, + + /// + /// AlphaToOneEnableEXT + /// + AlphaToOneEnableEXT = 1000455008, + + /// + /// LogicOpEnableEXT + /// + LogicOpEnableEXT = 1000455009, + + /// + /// ColorBlendEnableEXT + /// + ColorBlendEnableEXT = 1000455010, + + /// + /// ColorBlendEquationEXT + /// + ColorBlendEquationEXT = 1000455011, + + /// + /// ColorWriteMaskEXT + /// + ColorWriteMaskEXT = 1000455012, + + /// + /// TessellationDomainOriginEXT + /// + TessellationDomainOriginEXT = 1000455002, + + /// + /// RasterizationStreamEXT + /// + RasterizationStreamEXT = 1000455013, + + /// + /// ConservativeRasterizationModeEXT + /// + ConservativeRasterizationModeEXT = 1000455014, + + /// + /// ExtraPrimitiveOverestimationSizeEXT + /// + ExtraPrimitiveOverestimationSizeEXT = 1000455015, + + /// + /// DepthClipEnableEXT + /// + DepthClipEnableEXT = 1000455016, + + /// + /// SampleLocationsEnableEXT + /// + SampleLocationsEnableEXT = 1000455017, + + /// + /// ColorBlendAdvancedEXT + /// + ColorBlendAdvancedEXT = 1000455018, + + /// + /// ProvokingVertexModeEXT + /// + ProvokingVertexModeEXT = 1000455019, + + /// + /// LineRasterizationModeEXT + /// + LineRasterizationModeEXT = 1000455020, + + /// + /// LineStippleEnableEXT + /// + LineStippleEnableEXT = 1000455021, + + /// + /// DepthClipNegativeOneToOneEXT + /// + DepthClipNegativeOneToOneEXT = 1000455022, + + /// + /// ViewportWScalingEnableNV + /// + ViewportWScalingEnableNV = 1000455023, + + /// + /// ViewportSwizzleNV + /// + ViewportSwizzleNV = 1000455024, + + /// + /// CoverageToColorEnableNV + /// + CoverageToColorEnableNV = 1000455025, + + /// + /// CoverageToColorLocationNV + /// + CoverageToColorLocationNV = 1000455026, + + /// + /// CoverageModulationModeNV + /// + CoverageModulationModeNV = 1000455027, + + /// + /// CoverageModulationTableEnableNV + /// + CoverageModulationTableEnableNV = 1000455028, + + /// + /// CoverageModulationTableNV + /// + CoverageModulationTableNV = 1000455029, + + /// + /// ShadingRateImageEnableNV + /// + ShadingRateImageEnableNV = 1000455030, + + /// + /// RepresentativeFragmentTestEnableNV + /// + RepresentativeFragmentTestEnableNV = 1000455031, + + /// + /// CoverageReductionModeNV + /// + CoverageReductionModeNV = 1000455032, + + /// + /// AttachmentFeedbackLoopEnableEXT + /// + AttachmentFeedbackLoopEnableEXT = 1000524000, + + /// + /// DepthClampRangeEXT + /// + DepthClampRangeEXT = 1000582000, + + /// + /// LineStippleEXT + /// + LineStippleEXT = LineStipple, + + /// + /// CullModeEXT + /// + CullModeEXT = CullMode, + + /// + /// FrontFaceEXT + /// + FrontFaceEXT = FrontFace, + + /// + /// PrimitiveTopologyEXT + /// + PrimitiveTopologyEXT = PrimitiveTopology, + + /// + /// ViewportWithCountEXT + /// + ViewportWithCountEXT = ViewportWithCount, + + /// + /// ScissorWithCountEXT + /// + ScissorWithCountEXT = ScissorWithCount, + + /// + /// VertexInputBindingStrideEXT + /// + VertexInputBindingStrideEXT = VertexInputBindingStride, + + /// + /// DepthTestEnableEXT + /// + DepthTestEnableEXT = DepthTestEnable, + + /// + /// DepthWriteEnableEXT + /// + DepthWriteEnableEXT = DepthWriteEnable, + + /// + /// DepthCompareOpEXT + /// + DepthCompareOpEXT = DepthCompareOp, + + /// + /// DepthBoundsTestEnableEXT + /// + DepthBoundsTestEnableEXT = DepthBoundsTestEnable, + + /// + /// StencilTestEnableEXT + /// + StencilTestEnableEXT = StencilTestEnable, + + /// + /// StencilOpEXT + /// + StencilOpEXT = StencilOp, + + /// + /// RasterizerDiscardEnableEXT + /// + RasterizerDiscardEnableEXT = RasterizerDiscardEnable, + + /// + /// DepthBiasEnableEXT + /// + DepthBiasEnableEXT = DepthBiasEnable, + + /// + /// PrimitiveRestartEnableEXT + /// + PrimitiveRestartEnableEXT = PrimitiveRestartEnable, + + /// + /// LineStippleKHR + /// + LineStippleKHR = LineStipple, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkEventCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkEventCreateFlags.gen.cs new file mode 100644 index 0000000..db7ecac --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkEventCreateFlags.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkEventCreateFlagBits - Event creation flag bits + /// + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkEventCreateFlagBits { + /// // Provided by VK_VERSION_1_3 + /// VK_EVENT_CREATE_DEVICE_ONLY_BIT = 0x00000001, + /// // Provided by VK_KHR_synchronization2 + /// VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT, + /// } VkEventCreateFlagBits; + /// + /// + [Flags] + public enum VkEventCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// DeviceOnlyBit + /// + DeviceOnlyBit = 0x00000001, + + /// + /// DeviceOnlyBitKHR + /// + DeviceOnlyBitKHR = DeviceOnlyBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalFenceFeatureFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalFenceFeatureFlags.gen.cs new file mode 100644 index 0000000..dc8877e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalFenceFeatureFlags.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalFenceFeatureFlagBits - Bitfield describing features of an external fence handle type + /// + /// + /// + /// Bits which may: be set in + /// VkExternalFenceProperties::externalFenceFeatures, indicating + /// features of a fence external handle type, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkExternalFenceFeatureFlagBits { + /// VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001, + /// VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT, + /// } VkExternalFenceFeatureFlagBits; + /// + /// + [Flags] + public enum VkExternalFenceFeatureFlags : int + { + /// No flags set. + None = 0, + + /// + /// ExportableBit specifies handles of this type can be exported from Vulkan fence objects. + /// + ExportableBit = 0x00000001, + + /// + /// ImportableBit specifies handles of this type can be imported to Vulkan fence objects. + /// + ImportableBit = 0x00000002, + + /// + /// ExportableBitKHR + /// + ExportableBitKHR = ExportableBit, + + /// + /// ImportableBitKHR + /// + ImportableBitKHR = ImportableBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalFenceHandleTypeFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalFenceHandleTypeFlags.gen.cs new file mode 100644 index 0000000..5e6b7f8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalFenceHandleTypeFlags.gen.cs @@ -0,0 +1,87 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalFenceHandleTypeFlagBits - Bitmask of valid external fence handle types + /// + /// + /// + /// Bits which may: be set in + /// + /// + /// * VkPhysicalDeviceExternalFenceInfo::handleType + /// * VkExternalFenceProperties::exportFromImportedHandleTypes + /// * VkExternalFenceProperties::compatibleHandleTypes + /// + /// + /// indicate external fence handle types, and are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkExternalFenceHandleTypeFlagBits { + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, + /// } VkExternalFenceHandleTypeFlagBits; + /// + /// + [Flags] + public enum VkExternalFenceHandleTypeFlags : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueFdBit specifies a POSIX file descriptor handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the POSIX system calls dup, dup2, close, and the non-standard system call dup3. Additionally, it must be transportable over a socket using an SCM_RIGHTS control message. It owns a reference to the underlying synchronization primitive represented by its Vulkan fence object. + /// + OpaqueFdBit = 0x00000001, + + /// + /// OpaqueWin32Bit specifies an NT handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the functions DuplicateHandle, CloseHandle, CompareObjectHandles, GetHandleInformation, and SetHandleInformation. It owns a reference to the underlying synchronization primitive represented by its Vulkan fence object. + /// + OpaqueWin32Bit = 0x00000002, + + /// + /// OpaqueWin32KmtBit specifies a global share handle that has only limited valid usage outside of Vulkan and other compatible APIs. It is not compatible with any native APIs. It does not own a reference to the underlying synchronization primitive represented by its Vulkan fence object, and will therefore become invalid when all Vulkan fence objects associated with it are destroyed. + /// + OpaqueWin32KmtBit = 0x00000004, + + /// + /// SyncFdBit specifies a POSIX file descriptor handle to a Linux Sync File or Android Fence. It can be used with any native API accepting a valid sync file or fence as input. It owns a reference to the underlying synchronization primitive associated with the file descriptor. Implementations which support importing this handle type must accept any type of sync or fence FD supported by the native system they are running on. <<< Some external fence handle types can only be shared within the same underlying physical device and/or the same driver version, as defined in the following table: [[external-fence-handle-types-compatibility]] .External Fence Handle Types Compatibility | + /// + SyncFdBit = 0x00000008, + + /// + /// OpaqueFdBitKHR + /// + OpaqueFdBitKHR = OpaqueFdBit, + + /// + /// OpaqueWin32BitKHR + /// + OpaqueWin32BitKHR = OpaqueWin32Bit, + + /// + /// OpaqueWin32KmtBitKHR + /// + OpaqueWin32KmtBitKHR = OpaqueWin32KmtBit, + + /// + /// SyncFdBitKHR + /// + SyncFdBitKHR = SyncFdBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlags.gen.cs new file mode 100644 index 0000000..c753d65 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlags.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryFeatureFlagBits - Bitmask specifying features of an external memory handle type + /// + /// + /// + /// Bits which may: be set in + /// VkExternalMemoryProperties::externalMemoryFeatures, specifying + /// features of an external memory handle type, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkExternalMemoryFeatureFlagBits { + /// VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001, + /// VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002, + /// VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT, + /// } VkExternalMemoryFeatureFlagBits; + /// + /// + [Flags] + public enum VkExternalMemoryFeatureFlags : int + { + /// No flags set. + None = 0, + + /// + /// DedicatedOnlyBit specifies that images or buffers created with the specified parameters and handle type must use the mechanisms defined by VkMemoryDedicatedRequirements and VkMemoryDedicatedAllocateInfo to create (or import) a dedicated allocation for the image or buffer. + /// + DedicatedOnlyBit = 0x00000001, + + /// + /// ExportableBit specifies that handles of this type can be exported from Vulkan memory objects. + /// + ExportableBit = 0x00000002, + + /// + /// ImportableBit specifies that handles of this type can be imported as Vulkan memory objects. Because their semantics in external APIs roughly align with that of an image or buffer with a dedicated allocation in Vulkan, implementations are required: to report VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT for the following external handle types: + /// + ImportableBit = 0x00000004, + + /// + /// DedicatedOnlyBitKHR + /// + DedicatedOnlyBitKHR = DedicatedOnlyBit, + + /// + /// ExportableBitKHR + /// + ExportableBitKHR = ExportableBit, + + /// + /// ImportableBitKHR + /// + ImportableBitKHR = ImportableBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlagsNV.gen.cs new file mode 100644 index 0000000..b8aa22b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryFeatureFlagsNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryFeatureFlagBitsNV - Bitmask specifying external memory features + /// + /// + /// + /// Bits which can be set in + /// VkExternalImageFormatPropertiesNV::externalMemoryFeatures, + /// indicating properties of the external memory handle type, are: + /// + /// + /// // Provided by VK_NV_external_memory_capabilities + /// typedef enum VkExternalMemoryFeatureFlagBitsNV { + /// VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, + /// VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, + /// VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, + /// } VkExternalMemoryFeatureFlagBitsNV; + /// + /// + [Flags] + public enum VkExternalMemoryFeatureFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// DedicatedOnlyBitNV specifies that external memory of the specified type must be created as a dedicated allocation when used in the manner specified. + /// + DedicatedOnlyBitNV = 0x00000001, + + /// + /// ExportableBitNV specifies that the implementation supports exporting handles of the specified type. + /// + ExportableBitNV = 0x00000002, + + /// + /// ImportableBitNV specifies that the implementation supports importing handles of the specified type. + /// + ImportableBitNV = 0x00000004, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlags.gen.cs new file mode 100644 index 0000000..65e986d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlags.gen.cs @@ -0,0 +1,197 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryHandleTypeFlagBits - Bit specifying external memory handle types + /// + /// + /// + /// Possible values of + /// VkPhysicalDeviceExternalImageFormatInfo::handleType, specifying + /// an external memory handle type, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkExternalMemoryHandleTypeFlagBits { + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040, + /// // Provided by VK_EXT_external_memory_dma_buf + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 0x00000400, + /// // Provided by VK_EXT_external_memory_host + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080, + /// // Provided by VK_EXT_external_memory_host + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100, + /// // Provided by VK_FUCHSIA_external_memory + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = 0x00000800, + /// // Provided by VK_NV_external_memory_rdma + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV = 0x00001000, + /// // Provided by VK_OHOS_external_memory + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OH_NATIVE_BUFFER_BIT_OHOS = 0x00008000, + /// // Provided by VK_QNX_external_memory_screen_buffer + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX = 0x00004000, + /// // Provided by VK_EXT_external_memory_metal + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT = 0x00010000, + /// // Provided by VK_EXT_external_memory_metal + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT = 0x00020000, + /// // Provided by VK_EXT_external_memory_metal + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT = 0x00040000, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, + /// } VkExternalMemoryHandleTypeFlagBits; + /// + /// + [Flags] + public enum VkExternalMemoryHandleTypeFlags : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueFdBit specifies a POSIX file descriptor handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the POSIX system calls dup, dup2, close, and the non-standard system call dup3. Additionally, it must be transportable over a socket using an SCM_RIGHTS control message. It owns a reference to the underlying memory resource represented by its Vulkan memory object. + /// + OpaqueFdBit = 0x00000001, + + /// + /// OpaqueWin32Bit specifies an NT handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the functions DuplicateHandle, CloseHandle, CompareObjectHandles, GetHandleInformation, and SetHandleInformation. It owns a reference to the underlying memory resource represented by its Vulkan memory object. + /// + OpaqueWin32Bit = 0x00000002, + + /// + /// OpaqueWin32KmtBit specifies a global share handle that has only limited valid usage outside of Vulkan and other compatible APIs. It is not compatible with any native APIs. It does not own a reference to the underlying memory resource represented by its Vulkan memory object, and will therefore become invalid when all Vulkan memory objects associated with it are destroyed. + /// + OpaqueWin32KmtBit = 0x00000004, + + /// + /// D3D11TextureBit specifies an NT handle returned by IDXGIResource1::CreateSharedHandle referring to a Direct3D 10 or 11 texture resource. It owns a reference to the memory used by the Direct3D resource. + /// + D3D11TextureBit = 0x00000008, + + /// + /// D3D11TextureKmtBit specifies a global share handle returned by IDXGIResource::GetSharedHandle referring to a Direct3D 10 or 11 texture resource. It does not own a reference to the underlying Direct3D resource, and will therefore become invalid when all Vulkan memory objects and Direct3D resources associated with it are destroyed. + /// + D3D11TextureKmtBit = 0x00000010, + + /// + /// D3D12HeapBit specifies an NT handle returned by ID3D12Device::CreateSharedHandle referring to a Direct3D 12 heap resource. It owns a reference to the resources used by the Direct3D heap. + /// + D3D12HeapBit = 0x00000020, + + /// + /// D3D12ResourceBit specifies an NT handle returned by ID3D12Device::CreateSharedHandle referring to a Direct3D 12 committed resource. It owns a reference to the memory used by the Direct3D resource. <<< Some external memory handle types can only be shared within the same underlying physical device and/or the same driver version, as defined in the following table: [[external-memory-handle-types-compatibility]] .External Memory Handle Types Compatibility | + /// + D3D12ResourceBit = 0x00000040, + + /// + /// DmaBufBitEXT + /// + DmaBufBitEXT = 0x00000200, + + /// + /// ANDROIDHardwareBufferBitANDROID + /// + ANDROIDHardwareBufferBitANDROID = 0x00000400, + + /// + /// HostAllocationBitEXT + /// + HostAllocationBitEXT = 0x00000080, + + /// + /// HostMappedForeignMemoryBitEXT + /// + HostMappedForeignMemoryBitEXT = 0x00000100, + + /// + /// ZirconVmoBitFUCHSIA + /// + ZirconVmoBitFUCHSIA = 0x00000800, + + /// + /// RdmaAddressBitNV + /// + RdmaAddressBitNV = 0x00001000, + + /// + /// OhNativeBufferBitOHOS + /// + OhNativeBufferBitOHOS = 0x00008000, + + /// + /// ScreenBufferBitQNX + /// + ScreenBufferBitQNX = 0x00004000, + + /// + /// MtlbufferBitEXT + /// + MtlbufferBitEXT = 0x00010000, + + /// + /// MtltextureBitEXT + /// + MtltextureBitEXT = 0x00020000, + + /// + /// MtlheapBitEXT + /// + MtlheapBitEXT = 0x00040000, + + /// + /// OpaqueFdBitKHR + /// + OpaqueFdBitKHR = OpaqueFdBit, + + /// + /// OpaqueWin32BitKHR + /// + OpaqueWin32BitKHR = OpaqueWin32Bit, + + /// + /// OpaqueWin32KmtBitKHR + /// + OpaqueWin32KmtBitKHR = OpaqueWin32KmtBit, + + /// + /// D3D11TextureBitKHR + /// + D3D11TextureBitKHR = D3D11TextureBit, + + /// + /// D3D11TextureKmtBitKHR + /// + D3D11TextureKmtBitKHR = D3D11TextureKmtBit, + + /// + /// D3D12HeapBitKHR + /// + D3D12HeapBitKHR = D3D12HeapBit, + + /// + /// D3D12ResourceBitKHR + /// + D3D12ResourceBitKHR = D3D12ResourceBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlagsNV.gen.cs new file mode 100644 index 0000000..bcba68a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalMemoryHandleTypeFlagsNV.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryHandleTypeFlagBitsNV - Bitmask specifying external memory handle types + /// + /// + /// + /// Possible values of VkImportMemoryWin32HandleInfoNV::handleType, + /// specifying the type of an external memory handle, are: + /// + /// + /// // Provided by VK_NV_external_memory_capabilities + /// typedef enum VkExternalMemoryHandleTypeFlagBitsNV { + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, + /// } VkExternalMemoryHandleTypeFlagBitsNV; + /// + /// + [Flags] + public enum VkExternalMemoryHandleTypeFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueWin32BitNV specifies a handle to memory returned by vkGetMemoryWin32HandleNV, or one duplicated from such a handle using `DuplicateHandle()`. + /// + OpaqueWin32BitNV = 0x00000001, + + /// + /// OpaqueWin32KmtBitNV specifies a handle to memory returned by vkGetMemoryWin32HandleNV. + /// + OpaqueWin32KmtBitNV = 0x00000002, + + /// + /// D3D11ImageBitNV specifies a valid NT handle to memory returned by `IDXGIResource1::CreateSharedHandle`, or a handle duplicated from such a handle using `DuplicateHandle()`. + /// + D3D11ImageBitNV = 0x00000004, + + /// + /// D3D11ImageKmtBitNV specifies a handle to memory returned by `IDXGIResource::GetSharedHandle()`. + /// + D3D11ImageKmtBitNV = 0x00000008, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreFeatureFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreFeatureFlags.gen.cs new file mode 100644 index 0000000..de5a4ca --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreFeatureFlags.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalSemaphoreFeatureFlagBits - Bitfield describing features of an external semaphore handle type + /// + /// + /// + /// Bits which may: be set in + /// VkExternalSemaphoreProperties::externalSemaphoreFeatures, + /// specifying the features of an external semaphore handle type, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkExternalSemaphoreFeatureFlagBits { + /// VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001, + /// VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT, + /// } VkExternalSemaphoreFeatureFlagBits; + /// + /// + [Flags] + public enum VkExternalSemaphoreFeatureFlags : int + { + /// No flags set. + None = 0, + + /// + /// ExportableBit specifies that handles of this type can be exported from Vulkan semaphore objects. + /// + ExportableBit = 0x00000001, + + /// + /// ImportableBit specifies that handles of this type can be imported as Vulkan semaphore objects. + /// + ImportableBit = 0x00000002, + + /// + /// ExportableBitKHR + /// + ExportableBitKHR = ExportableBit, + + /// + /// ImportableBitKHR + /// + ImportableBitKHR = ImportableBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreHandleTypeFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreHandleTypeFlags.gen.cs new file mode 100644 index 0000000..ca37b43 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkExternalSemaphoreHandleTypeFlags.gen.cs @@ -0,0 +1,107 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalSemaphoreHandleTypeFlagBits - Bitmask of valid external semaphore handle types + /// + /// + /// + /// Bits which may: be set in + /// VkPhysicalDeviceExternalSemaphoreInfo::handleType, specifying an + /// external semaphore handle type, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkExternalSemaphoreHandleTypeFlagBits { + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008, + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010, + /// // Provided by VK_FUCHSIA_external_semaphore + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA = 0x00000080, + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, + /// } VkExternalSemaphoreHandleTypeFlagBits; + /// + /// + [Flags] + public enum VkExternalSemaphoreHandleTypeFlags : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueFdBit specifies a POSIX file descriptor handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the POSIX system calls dup, dup2, close, and the non-standard system call dup3. Additionally, it must be transportable over a socket using an SCM_RIGHTS control message. It owns a reference to the underlying synchronization primitive represented by its Vulkan semaphore object. + /// + OpaqueFdBit = 0x00000001, + + /// + /// OpaqueWin32Bit specifies an NT handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the functions DuplicateHandle, CloseHandle, CompareObjectHandles, GetHandleInformation, and SetHandleInformation. It owns a reference to the underlying synchronization primitive represented by its Vulkan semaphore object. + /// + OpaqueWin32Bit = 0x00000002, + + /// + /// OpaqueWin32KmtBit specifies a global share handle that has only limited valid usage outside of Vulkan and other compatible APIs. It is not compatible with any native APIs. It does not own a reference to the underlying synchronization primitive represented by its Vulkan semaphore object, and will therefore become invalid when all Vulkan semaphore objects associated with it are destroyed. + /// + OpaqueWin32KmtBit = 0x00000004, + + /// + /// D3D12FenceBit specifies an NT handle returned by ID3D12Device::CreateSharedHandle referring to a Direct3D 12 fence, or ID3D11Device5::CreateFence referring to a Direct3D 11 fence. It owns a reference to the underlying synchronization primitive associated with the Direct3D fence. + /// + D3D12FenceBit = 0x00000008, + + /// + /// SyncFdBit specifies a POSIX file descriptor handle to a Linux Sync File or Android Fence object. It can be used with any native API accepting a valid sync file or fence as input. It owns a reference to the underlying synchronization primitive associated with the file descriptor. Implementations which support importing this handle type must accept any type of sync or fence FD supported by the native system they are running on. [NOTE] + /// + SyncFdBit = 0x00000010, + + /// + /// ZirconEventBitFUCHSIA + /// + ZirconEventBitFUCHSIA = 0x00000080, + + /// + /// D3D11FenceBit is an alias of VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT with the same meaning. It is provided for convenience and code clarity when interacting with D3D11 fences. + /// + D3D11FenceBit = D3D12FenceBit, + + /// + /// OpaqueFdBitKHR + /// + OpaqueFdBitKHR = OpaqueFdBit, + + /// + /// OpaqueWin32BitKHR + /// + OpaqueWin32BitKHR = OpaqueWin32Bit, + + /// + /// OpaqueWin32KmtBitKHR + /// + OpaqueWin32KmtBitKHR = OpaqueWin32KmtBit, + + /// + /// D3D12FenceBitKHR + /// + D3D12FenceBitKHR = D3D12FenceBit, + + /// + /// SyncFdBitKHR + /// + SyncFdBitKHR = SyncFdBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFenceCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFenceCreateFlags.gen.cs new file mode 100644 index 0000000..a3ea9ea --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFenceCreateFlags.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFenceCreateFlagBits - Bitmask specifying initial state and behavior of a fence + /// + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkFenceCreateFlagBits { + /// VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, + /// } VkFenceCreateFlagBits; + /// + /// + [Flags] + public enum VkFenceCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// SignaledBit specifies that the fence object is created in the signaled state. Otherwise, it is created in the unsignaled state. + /// + SignaledBit = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFenceImportFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFenceImportFlags.gen.cs new file mode 100644 index 0000000..3096ad0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFenceImportFlags.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFenceImportFlagBits - Bitmask specifying additional parameters of fence payload import + /// + /// + /// + /// Bits which can be set in + /// + /// + /// * platform-specific fence import structures (the current specification + /// build has none enabled) + /// + /// + /// specifying additional parameters of a fence import operation are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkFenceImportFlagBits { + /// VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001, + /// // Provided by VK_KHR_external_fence + /// VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT, + /// } VkFenceImportFlagBits; + /// + /// + [Flags] + public enum VkFenceImportFlags : int + { + /// No flags set. + None = 0, + + /// + /// TemporaryBit specifies that the fence payload will be imported only temporarily, as described in Importing Fence Payloads^, regardless of the permanence of handleType. + /// + TemporaryBit = 0x00000001, + + /// + /// TemporaryBitKHR + /// + TemporaryBitKHR = TemporaryBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFilter.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFilter.gen.cs new file mode 100644 index 0000000..3fd643c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFilter.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFilter - Specify filters used for texture lookups + /// + /// + /// + /// Possible values of the VkSamplerCreateInfo::magFilter and + /// minFilter parameters, specifying filters used for texture lookups, + /// are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkFilter { + /// VK_FILTER_NEAREST = 0, + /// VK_FILTER_LINEAR = 1, + /// // Provided by VK_EXT_filter_cubic + /// VK_FILTER_CUBIC_EXT = 1000015000, + /// // Provided by VK_IMG_filter_cubic + /// VK_FILTER_CUBIC_IMG = VK_FILTER_CUBIC_EXT, + /// } VkFilter; + /// + /// + public enum VkFilter : int + { + /// + /// Nearest specifies nearest filtering. + /// + Nearest = 0, + + /// + /// Linear specifies linear filtering. These filters are described in detail in Texel Filtering^. + /// + Linear = 1, + + /// + /// CubicEXT + /// + CubicEXT = 1000015000, + + /// + /// CubicIMG + /// + CubicIMG = CubicEXT, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFormat.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFormat.gen.cs new file mode 100644 index 0000000..afbde16 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFormat.gen.cs @@ -0,0 +1,2328 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormat - Available image formats + /// + /// + /// + /// The following image formats can be passed to, and may: be returned from + /// Vulkan commands. + /// The memory required to store each format is discussed with that format, and + /// also summarized in the Representation and Texel Block + /// Size^ section and the Compatible formats^ table. + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkFormat { + /// VK_FORMAT_UNDEFINED = 0, + /// VK_FORMAT_R4G4_UNORM_PACK8 = 1, + /// VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, + /// VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, + /// VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, + /// VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, + /// VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, + /// VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, + /// VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, + /// VK_FORMAT_R8_UNORM = 9, + /// VK_FORMAT_R8_SNORM = 10, + /// VK_FORMAT_R8_USCALED = 11, + /// VK_FORMAT_R8_SSCALED = 12, + /// VK_FORMAT_R8_UINT = 13, + /// VK_FORMAT_R8_SINT = 14, + /// VK_FORMAT_R8_SRGB = 15, + /// VK_FORMAT_R8G8_UNORM = 16, + /// VK_FORMAT_R8G8_SNORM = 17, + /// VK_FORMAT_R8G8_USCALED = 18, + /// VK_FORMAT_R8G8_SSCALED = 19, + /// VK_FORMAT_R8G8_UINT = 20, + /// VK_FORMAT_R8G8_SINT = 21, + /// VK_FORMAT_R8G8_SRGB = 22, + /// VK_FORMAT_R8G8B8_UNORM = 23, + /// VK_FORMAT_R8G8B8_SNORM = 24, + /// VK_FORMAT_R8G8B8_USCALED = 25, + /// VK_FORMAT_R8G8B8_SSCALED = 26, + /// VK_FORMAT_R8G8B8_UINT = 27, + /// VK_FORMAT_R8G8B8_SINT = 28, + /// VK_FORMAT_R8G8B8_SRGB = 29, + /// VK_FORMAT_B8G8R8_UNORM = 30, + /// VK_FORMAT_B8G8R8_SNORM = 31, + /// VK_FORMAT_B8G8R8_USCALED = 32, + /// VK_FORMAT_B8G8R8_SSCALED = 33, + /// VK_FORMAT_B8G8R8_UINT = 34, + /// VK_FORMAT_B8G8R8_SINT = 35, + /// VK_FORMAT_B8G8R8_SRGB = 36, + /// VK_FORMAT_R8G8B8A8_UNORM = 37, + /// VK_FORMAT_R8G8B8A8_SNORM = 38, + /// VK_FORMAT_R8G8B8A8_USCALED = 39, + /// VK_FORMAT_R8G8B8A8_SSCALED = 40, + /// VK_FORMAT_R8G8B8A8_UINT = 41, + /// VK_FORMAT_R8G8B8A8_SINT = 42, + /// VK_FORMAT_R8G8B8A8_SRGB = 43, + /// VK_FORMAT_B8G8R8A8_UNORM = 44, + /// VK_FORMAT_B8G8R8A8_SNORM = 45, + /// VK_FORMAT_B8G8R8A8_USCALED = 46, + /// VK_FORMAT_B8G8R8A8_SSCALED = 47, + /// VK_FORMAT_B8G8R8A8_UINT = 48, + /// VK_FORMAT_B8G8R8A8_SINT = 49, + /// VK_FORMAT_B8G8R8A8_SRGB = 50, + /// VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, + /// VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, + /// VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, + /// VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, + /// VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, + /// VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, + /// VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, + /// VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, + /// VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, + /// VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, + /// VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, + /// VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, + /// VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, + /// VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, + /// VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, + /// VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, + /// VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, + /// VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, + /// VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, + /// VK_FORMAT_R16_UNORM = 70, + /// VK_FORMAT_R16_SNORM = 71, + /// VK_FORMAT_R16_USCALED = 72, + /// VK_FORMAT_R16_SSCALED = 73, + /// VK_FORMAT_R16_UINT = 74, + /// VK_FORMAT_R16_SINT = 75, + /// VK_FORMAT_R16_SFLOAT = 76, + /// VK_FORMAT_R16G16_UNORM = 77, + /// VK_FORMAT_R16G16_SNORM = 78, + /// VK_FORMAT_R16G16_USCALED = 79, + /// VK_FORMAT_R16G16_SSCALED = 80, + /// VK_FORMAT_R16G16_UINT = 81, + /// VK_FORMAT_R16G16_SINT = 82, + /// VK_FORMAT_R16G16_SFLOAT = 83, + /// VK_FORMAT_R16G16B16_UNORM = 84, + /// VK_FORMAT_R16G16B16_SNORM = 85, + /// VK_FORMAT_R16G16B16_USCALED = 86, + /// VK_FORMAT_R16G16B16_SSCALED = 87, + /// VK_FORMAT_R16G16B16_UINT = 88, + /// VK_FORMAT_R16G16B16_SINT = 89, + /// VK_FORMAT_R16G16B16_SFLOAT = 90, + /// VK_FORMAT_R16G16B16A16_UNORM = 91, + /// VK_FORMAT_R16G16B16A16_SNORM = 92, + /// VK_FORMAT_R16G16B16A16_USCALED = 93, + /// VK_FORMAT_R16G16B16A16_SSCALED = 94, + /// VK_FORMAT_R16G16B16A16_UINT = 95, + /// VK_FORMAT_R16G16B16A16_SINT = 96, + /// VK_FORMAT_R16G16B16A16_SFLOAT = 97, + /// VK_FORMAT_R32_UINT = 98, + /// VK_FORMAT_R32_SINT = 99, + /// VK_FORMAT_R32_SFLOAT = 100, + /// VK_FORMAT_R32G32_UINT = 101, + /// VK_FORMAT_R32G32_SINT = 102, + /// VK_FORMAT_R32G32_SFLOAT = 103, + /// VK_FORMAT_R32G32B32_UINT = 104, + /// VK_FORMAT_R32G32B32_SINT = 105, + /// VK_FORMAT_R32G32B32_SFLOAT = 106, + /// VK_FORMAT_R32G32B32A32_UINT = 107, + /// VK_FORMAT_R32G32B32A32_SINT = 108, + /// VK_FORMAT_R32G32B32A32_SFLOAT = 109, + /// VK_FORMAT_R64_UINT = 110, + /// VK_FORMAT_R64_SINT = 111, + /// VK_FORMAT_R64_SFLOAT = 112, + /// VK_FORMAT_R64G64_UINT = 113, + /// VK_FORMAT_R64G64_SINT = 114, + /// VK_FORMAT_R64G64_SFLOAT = 115, + /// VK_FORMAT_R64G64B64_UINT = 116, + /// VK_FORMAT_R64G64B64_SINT = 117, + /// VK_FORMAT_R64G64B64_SFLOAT = 118, + /// VK_FORMAT_R64G64B64A64_UINT = 119, + /// VK_FORMAT_R64G64B64A64_SINT = 120, + /// VK_FORMAT_R64G64B64A64_SFLOAT = 121, + /// VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, + /// VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, + /// VK_FORMAT_D16_UNORM = 124, + /// VK_FORMAT_X8_D24_UNORM_PACK32 = 125, + /// VK_FORMAT_D32_SFLOAT = 126, + /// VK_FORMAT_S8_UINT = 127, + /// VK_FORMAT_D16_UNORM_S8_UINT = 128, + /// VK_FORMAT_D24_UNORM_S8_UINT = 129, + /// VK_FORMAT_D32_SFLOAT_S8_UINT = 130, + /// VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, + /// VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, + /// VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, + /// VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, + /// VK_FORMAT_BC2_UNORM_BLOCK = 135, + /// VK_FORMAT_BC2_SRGB_BLOCK = 136, + /// VK_FORMAT_BC3_UNORM_BLOCK = 137, + /// VK_FORMAT_BC3_SRGB_BLOCK = 138, + /// VK_FORMAT_BC4_UNORM_BLOCK = 139, + /// VK_FORMAT_BC4_SNORM_BLOCK = 140, + /// VK_FORMAT_BC5_UNORM_BLOCK = 141, + /// VK_FORMAT_BC5_SNORM_BLOCK = 142, + /// VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, + /// VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, + /// VK_FORMAT_BC7_UNORM_BLOCK = 145, + /// VK_FORMAT_BC7_SRGB_BLOCK = 146, + /// VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, + /// VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, + /// VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, + /// VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, + /// VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, + /// VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, + /// VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, + /// VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, + /// VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, + /// VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, + /// VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, + /// VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, + /// VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, + /// VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, + /// VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, + /// VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, + /// VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, + /// VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, + /// VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, + /// VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, + /// VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, + /// VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, + /// VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, + /// VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, + /// VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, + /// VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, + /// VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, + /// VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, + /// VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, + /// VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, + /// VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, + /// VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, + /// VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, + /// VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, + /// VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, + /// VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, + /// VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, + /// VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_G8_B8R8_2PLANE_444_UNORM = 1000330000, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_G16_B16R16_2PLANE_444_UNORM = 1000330003, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_A4R4G4B4_UNORM_PACK16 = 1000340000, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_A4B4G4R4_UNORM_PACK16 = 1000340001, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK = 1000066000, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK = 1000066001, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK = 1000066002, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK = 1000066003, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK = 1000066004, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK = 1000066005, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK = 1000066006, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK = 1000066007, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK = 1000066008, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK = 1000066009, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK = 1000066010, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK = 1000066011, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK = 1000066012, + /// // Provided by VK_VERSION_1_3 + /// VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK = 1000066013, + /// // Provided by VK_VERSION_1_4 + /// VK_FORMAT_A1B5G5R5_UNORM_PACK16 = 1000470000, + /// // Provided by VK_VERSION_1_4 + /// VK_FORMAT_A8_UNORM = 1000470001, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, + /// // Provided by VK_IMG_format_pvrtc + /// VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT = 1000288000, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_3x3x3_SRGB_BLOCK_EXT = 1000288001, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_3x3x3_SFLOAT_BLOCK_EXT = 1000288002, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x3x3_UNORM_BLOCK_EXT = 1000288003, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x3x3_SRGB_BLOCK_EXT = 1000288004, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x3x3_SFLOAT_BLOCK_EXT = 1000288005, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x4x3_UNORM_BLOCK_EXT = 1000288006, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x4x3_SRGB_BLOCK_EXT = 1000288007, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x4x3_SFLOAT_BLOCK_EXT = 1000288008, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x4x4_UNORM_BLOCK_EXT = 1000288009, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x4x4_SRGB_BLOCK_EXT = 1000288010, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_4x4x4_SFLOAT_BLOCK_EXT = 1000288011, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x4x4_UNORM_BLOCK_EXT = 1000288012, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x4x4_SRGB_BLOCK_EXT = 1000288013, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x4x4_SFLOAT_BLOCK_EXT = 1000288014, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x5x4_UNORM_BLOCK_EXT = 1000288015, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x5x4_SRGB_BLOCK_EXT = 1000288016, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x5x4_SFLOAT_BLOCK_EXT = 1000288017, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x5x5_UNORM_BLOCK_EXT = 1000288018, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x5x5_SRGB_BLOCK_EXT = 1000288019, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_5x5x5_SFLOAT_BLOCK_EXT = 1000288020, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x5x5_UNORM_BLOCK_EXT = 1000288021, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x5x5_SRGB_BLOCK_EXT = 1000288022, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x5x5_SFLOAT_BLOCK_EXT = 1000288023, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x6x5_UNORM_BLOCK_EXT = 1000288024, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x6x5_SRGB_BLOCK_EXT = 1000288025, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x6x5_SFLOAT_BLOCK_EXT = 1000288026, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x6x6_UNORM_BLOCK_EXT = 1000288027, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x6x6_SRGB_BLOCK_EXT = 1000288028, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_FORMAT_ASTC_6x6x6_SFLOAT_BLOCK_EXT = 1000288029, + /// // Provided by VK_ARM_tensors + /// VK_FORMAT_R8_BOOL_ARM = 1000460000, + /// // Provided by VK_KHR_shader_bfloat16 with VK_ARM_tensors + /// VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM = 1000460001, + /// // Provided by VK_EXT_shader_float8 with VK_ARM_tensors + /// VK_FORMAT_R8_SFLOAT_FPENCODING_FLOAT8E4M3_ARM = 1000460002, + /// // Provided by VK_EXT_shader_float8 with VK_ARM_tensors + /// VK_FORMAT_R8_SFLOAT_FPENCODING_FLOAT8E5M2_ARM = 1000460003, + /// // Provided by VK_NV_optical_flow + /// VK_FORMAT_R16G16_SFIXED5_NV = 1000464000, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R10X6_UINT_PACK16_ARM = 1000609000, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R10X6G10X6_UINT_2PACK16_ARM = 1000609001, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R10X6G10X6B10X6A10X6_UINT_4PACK16_ARM = 1000609002, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R12X4_UINT_PACK16_ARM = 1000609003, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R12X4G12X4_UINT_2PACK16_ARM = 1000609004, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R12X4G12X4B12X4A12X4_UINT_4PACK16_ARM = 1000609005, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R14X2_UINT_PACK16_ARM = 1000609006, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R14X2G14X2_UINT_2PACK16_ARM = 1000609007, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R14X2G14X2B14X2A14X2_UINT_4PACK16_ARM = 1000609008, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R14X2_UNORM_PACK16_ARM = 1000609009, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R14X2G14X2_UNORM_2PACK16_ARM = 1000609010, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_R14X2G14X2B14X2A14X2_UNORM_4PACK16_ARM = 1000609011, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_G14X2_B14X2R14X2_2PLANE_420_UNORM_3PACK16_ARM = 1000609012, + /// // Provided by VK_ARM_format_pack + /// VK_FORMAT_G14X2_B14X2R14X2_2PLANE_422_UNORM_3PACK16_ARM = 1000609013, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G8B8G8R8_422_UNORM_KHR = VK_FORMAT_G8B8G8R8_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_B8G8R8G8_422_UNORM_KHR = VK_FORMAT_B8G8R8G8_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_R10X6_UNORM_PACK16_KHR = VK_FORMAT_R10X6_UNORM_PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_R12X4_UNORM_PACK16_KHR = VK_FORMAT_R12X4_UNORM_PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G16B16G16R16_422_UNORM_KHR = VK_FORMAT_G16B16G16R16_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_B16G16R16G16_422_UNORM_KHR = VK_FORMAT_B16G16R16G16_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, + /// // Provided by VK_EXT_ycbcr_2plane_444_formats + /// VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, + /// // Provided by VK_EXT_ycbcr_2plane_444_formats + /// VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, + /// // Provided by VK_EXT_ycbcr_2plane_444_formats + /// VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, + /// // Provided by VK_EXT_ycbcr_2plane_444_formats + /// VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM, + /// // Provided by VK_EXT_4444_formats + /// VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT = VK_FORMAT_A4R4G4B4_UNORM_PACK16, + /// // Provided by VK_EXT_4444_formats + /// VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16, + /// // Provided by VK_NV_optical_flow + /// // VK_FORMAT_R16G16_S10_5_NV is a legacy alias + /// VK_FORMAT_R16G16_S10_5_NV = VK_FORMAT_R16G16_SFIXED5_NV, + /// // Provided by VK_KHR_maintenance5 + /// VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR = VK_FORMAT_A1B5G5R5_UNORM_PACK16, + /// // Provided by VK_KHR_maintenance5 + /// VK_FORMAT_A8_UNORM_KHR = VK_FORMAT_A8_UNORM, + /// } VkFormat; + /// + /// + public enum VkFormat : int + { + /// + /// Undefined specifies that the format is not specified. + /// + Undefined = 0, + + /// + /// R4G4UNormPack8 specifies a two-component, 8-bit packed unsigned normalized format that has a 4-bit R component in bits 4..7, and a 4-bit G component in bits 0..3. + /// + R4G4UNormPack8 = 1, + + /// + /// R4G4B4A4UNormPack16 specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit R component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit B component in bits 4..7, and a 4-bit A component in bits 0..3. + /// + R4G4B4A4UNormPack16 = 2, + + /// + /// B4G4R4A4UNormPack16 specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit B component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit R component in bits 4..7, and a 4-bit A component in bits 0..3. + /// + B4G4R4A4UNormPack16 = 3, + + /// + /// R5G6B5UNormPack16 specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit B component in bits 0..4. + /// + R5G6B5UNormPack16 = 4, + + /// + /// B5G6R5UNormPack16 specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit R component in bits 0..4. + /// + B5G6R5UNormPack16 = 5, + + /// + /// R5G5B5A1UNormPack16 specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit B component in bits 1..5, and a 1-bit A component in bit 0. + /// + R5G5B5A1UNormPack16 = 6, + + /// + /// B5G5R5A1UNormPack16 specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit R component in bits 1..5, and a 1-bit A component in bit 0. + /// + B5G5R5A1UNormPack16 = 7, + + /// + /// A1R5G5B5UNormPack16 specifies a four-component, 16-bit packed unsigned normalized format that has a 1-bit A component in bit 15, a 5-bit R component in bits 10..14, a 5-bit G component in bits 5..9, and a 5-bit B component in bits 0..4. + /// + A1R5G5B5UNormPack16 = 8, + + /// + /// R8UNorm specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component. + /// + R8UNorm = 9, + + /// + /// R8SNorm specifies a one-component, 8-bit signed normalized format that has a single 8-bit R component. + /// + R8SNorm = 10, + + /// + /// R8UScaled specifies a one-component, 8-bit unsigned scaled integer format that has a single 8-bit R component. + /// + R8UScaled = 11, + + /// + /// R8SScaled specifies a one-component, 8-bit signed scaled integer format that has a single 8-bit R component. + /// + R8SScaled = 12, + + /// + /// R8UInt specifies a one-component, 8-bit unsigned integer format that has a single 8-bit R component. + /// + R8UInt = 13, + + /// + /// R8SInt specifies a one-component, 8-bit signed integer format that has a single 8-bit R component. + /// + R8SInt = 14, + + /// + /// R8SRGB specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component stored with sRGB nonlinear encoding. + /// + R8SRGB = 15, + + /// + /// R8G8UNorm specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8UNorm = 16, + + /// + /// R8G8SNorm specifies a two-component, 16-bit signed normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8SNorm = 17, + + /// + /// R8G8UScaled specifies a two-component, 16-bit unsigned scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8UScaled = 18, + + /// + /// R8G8SScaled specifies a two-component, 16-bit signed scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8SScaled = 19, + + /// + /// R8G8UInt specifies a two-component, 16-bit unsigned integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8UInt = 20, + + /// + /// R8G8SInt specifies a two-component, 16-bit signed integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1. + /// + R8G8SInt = 21, + + /// + /// R8G8SRGB specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G component stored with sRGB nonlinear encoding in byte 1. + /// + R8G8SRGB = 22, + + /// + /// R8G8B8UNorm specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8UNorm = 23, + + /// + /// R8G8B8SNorm specifies a three-component, 24-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8SNorm = 24, + + /// + /// R8G8B8UScaled specifies a three-component, 24-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8UScaled = 25, + + /// + /// R8G8B8SScaled specifies a three-component, 24-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8SScaled = 26, + + /// + /// R8G8B8UInt specifies a three-component, 24-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8UInt = 27, + + /// + /// R8G8B8SInt specifies a three-component, 24-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2. + /// + R8G8B8SInt = 28, + + /// + /// R8G8B8SRGB specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit B component stored with sRGB nonlinear encoding in byte 2. + /// + R8G8B8SRGB = 29, + + /// + /// B8G8R8UNorm specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8UNorm = 30, + + /// + /// B8G8R8SNorm specifies a three-component, 24-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8SNorm = 31, + + /// + /// B8G8R8UScaled specifies a three-component, 24-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8UScaled = 32, + + /// + /// B8G8R8SScaled specifies a three-component, 24-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8SScaled = 33, + + /// + /// B8G8R8UInt specifies a three-component, 24-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8UInt = 34, + + /// + /// B8G8R8SInt specifies a three-component, 24-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2. + /// + B8G8R8SInt = 35, + + /// + /// B8G8R8SRGB specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit R component stored with sRGB nonlinear encoding in byte 2. + /// + B8G8R8SRGB = 36, + + /// + /// R8G8B8A8UNorm specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8UNorm = 37, + + /// + /// R8G8B8A8SNorm specifies a four-component, 32-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8SNorm = 38, + + /// + /// R8G8B8A8UScaled specifies a four-component, 32-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8UScaled = 39, + + /// + /// R8G8B8A8SScaled specifies a four-component, 32-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8SScaled = 40, + + /// + /// R8G8B8A8UInt specifies a four-component, 32-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8UInt = 41, + + /// + /// R8G8B8A8SInt specifies a four-component, 32-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8SInt = 42, + + /// + /// R8G8B8A8SRGB specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit B component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3. + /// + R8G8B8A8SRGB = 43, + + /// + /// B8G8R8A8UNorm specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8UNorm = 44, + + /// + /// B8G8R8A8SNorm specifies a four-component, 32-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8SNorm = 45, + + /// + /// B8G8R8A8UScaled specifies a four-component, 32-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8UScaled = 46, + + /// + /// B8G8R8A8SScaled specifies a four-component, 32-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8SScaled = 47, + + /// + /// B8G8R8A8UInt specifies a four-component, 32-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8UInt = 48, + + /// + /// B8G8R8A8SInt specifies a four-component, 32-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8SInt = 49, + + /// + /// B8G8R8A8SRGB specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit R component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3. + /// + B8G8R8A8SRGB = 50, + + /// + /// A8B8G8R8UNormPack32 specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8UNormPack32 = 51, + + /// + /// A8B8G8R8SNormPack32 specifies a four-component, 32-bit packed signed normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8SNormPack32 = 52, + + /// + /// A8B8G8R8UScaledPack32 specifies a four-component, 32-bit packed unsigned scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8UScaledPack32 = 53, + + /// + /// A8B8G8R8SScaledPack32 specifies a four-component, 32-bit packed signed scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8SScaledPack32 = 54, + + /// + /// A8B8G8R8UIntPack32 specifies a four-component, 32-bit packed unsigned integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8UIntPack32 = 55, + + /// + /// A8B8G8R8SIntPack32 specifies a four-component, 32-bit packed signed integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7. + /// + A8B8G8R8SIntPack32 = 56, + + /// + /// A8B8G8R8SRGBPack32 specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component stored with sRGB nonlinear encoding in bits 16..23, an 8-bit G component stored with sRGB nonlinear encoding in bits 8..15, and an 8-bit R component stored with sRGB nonlinear encoding in bits 0..7. + /// + A8B8G8R8SRGBPack32 = 57, + + /// + /// A2R10G10B10UNormPack32 specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10UNormPack32 = 58, + + /// + /// A2R10G10B10SNormPack32 specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10SNormPack32 = 59, + + /// + /// A2R10G10B10UScaledPack32 specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10UScaledPack32 = 60, + + /// + /// A2R10G10B10SScaledPack32 specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10SScaledPack32 = 61, + + /// + /// A2R10G10B10UIntPack32 specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10UIntPack32 = 62, + + /// + /// A2R10G10B10SIntPack32 specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9. + /// + A2R10G10B10SIntPack32 = 63, + + /// + /// A2B10G10R10UNormPack32 specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10UNormPack32 = 64, + + /// + /// A2B10G10R10SNormPack32 specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10SNormPack32 = 65, + + /// + /// A2B10G10R10UScaledPack32 specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10UScaledPack32 = 66, + + /// + /// A2B10G10R10SScaledPack32 specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10SScaledPack32 = 67, + + /// + /// A2B10G10R10UIntPack32 specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10UIntPack32 = 68, + + /// + /// A2B10G10R10SIntPack32 specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9. + /// + A2B10G10R10SIntPack32 = 69, + + /// + /// R16UNorm specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit R component. + /// + R16UNorm = 70, + + /// + /// R16SNorm specifies a one-component, 16-bit signed normalized format that has a single 16-bit R component. + /// + R16SNorm = 71, + + /// + /// R16UScaled specifies a one-component, 16-bit unsigned scaled integer format that has a single 16-bit R component. + /// + R16UScaled = 72, + + /// + /// R16SScaled specifies a one-component, 16-bit signed scaled integer format that has a single 16-bit R component. + /// + R16SScaled = 73, + + /// + /// R16UInt specifies a one-component, 16-bit unsigned integer format that has a single 16-bit R component. + /// + R16UInt = 74, + + /// + /// R16SInt specifies a one-component, 16-bit signed integer format that has a single 16-bit R component. + /// + R16SInt = 75, + + /// + /// R16SFloat specifies a one-component, 16-bit signed floating-point format that has a single 16-bit R component. + /// + R16SFloat = 76, + + /// + /// R16G16UNorm specifies a two-component, 32-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16UNorm = 77, + + /// + /// R16G16SNorm specifies a two-component, 32-bit signed normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16SNorm = 78, + + /// + /// R16G16UScaled specifies a two-component, 32-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16UScaled = 79, + + /// + /// R16G16SScaled specifies a two-component, 32-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16SScaled = 80, + + /// + /// R16G16UInt specifies a two-component, 32-bit unsigned integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16UInt = 81, + + /// + /// R16G16SInt specifies a two-component, 32-bit signed integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16SInt = 82, + + /// + /// R16G16SFloat specifies a two-component, 32-bit signed floating-point format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3. + /// + R16G16SFloat = 83, + + /// + /// R16G16B16UNorm specifies a three-component, 48-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16UNorm = 84, + + /// + /// R16G16B16SNorm specifies a three-component, 48-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16SNorm = 85, + + /// + /// R16G16B16UScaled specifies a three-component, 48-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16UScaled = 86, + + /// + /// R16G16B16SScaled specifies a three-component, 48-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16SScaled = 87, + + /// + /// R16G16B16UInt specifies a three-component, 48-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16UInt = 88, + + /// + /// R16G16B16SInt specifies a three-component, 48-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16SInt = 89, + + /// + /// R16G16B16SFloat specifies a three-component, 48-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5. + /// + R16G16B16SFloat = 90, + + /// + /// R16G16B16A16UNorm specifies a four-component, 64-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16UNorm = 91, + + /// + /// R16G16B16A16SNorm specifies a four-component, 64-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16SNorm = 92, + + /// + /// R16G16B16A16UScaled specifies a four-component, 64-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16UScaled = 93, + + /// + /// R16G16B16A16SScaled specifies a four-component, 64-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16SScaled = 94, + + /// + /// R16G16B16A16UInt specifies a four-component, 64-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16UInt = 95, + + /// + /// R16G16B16A16SInt specifies a four-component, 64-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16SInt = 96, + + /// + /// R16G16B16A16SFloat specifies a four-component, 64-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7. + /// + R16G16B16A16SFloat = 97, + + /// + /// R32UInt specifies a one-component, 32-bit unsigned integer format that has a single 32-bit R component. + /// + R32UInt = 98, + + /// + /// R32SInt specifies a one-component, 32-bit signed integer format that has a single 32-bit R component. + /// + R32SInt = 99, + + /// + /// R32SFloat specifies a one-component, 32-bit signed floating-point format that has a single 32-bit R component. + /// + R32SFloat = 100, + + /// + /// R32G32UInt specifies a two-component, 64-bit unsigned integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7. + /// + R32G32UInt = 101, + + /// + /// R32G32SInt specifies a two-component, 64-bit signed integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7. + /// + R32G32SInt = 102, + + /// + /// R32G32SFloat specifies a two-component, 64-bit signed floating-point format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7. + /// + R32G32SFloat = 103, + + /// + /// R32G32B32UInt specifies a three-component, 96-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. + /// + R32G32B32UInt = 104, + + /// + /// R32G32B32SInt specifies a three-component, 96-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. + /// + R32G32B32SInt = 105, + + /// + /// R32G32B32SFloat specifies a three-component, 96-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11. + /// + R32G32B32SFloat = 106, + + /// + /// R32G32B32A32UInt specifies a four-component, 128-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15. + /// + R32G32B32A32UInt = 107, + + /// + /// R32G32B32A32SInt specifies a four-component, 128-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15. + /// + R32G32B32A32SInt = 108, + + /// + /// R32G32B32A32SFloat specifies a four-component, 128-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15. + /// + R32G32B32A32SFloat = 109, + + /// + /// R64UInt specifies a one-component, 64-bit unsigned integer format that has a single 64-bit R component. + /// + R64UInt = 110, + + /// + /// R64SInt specifies a one-component, 64-bit signed integer format that has a single 64-bit R component. + /// + R64SInt = 111, + + /// + /// R64SFloat specifies a one-component, 64-bit signed floating-point format that has a single 64-bit R component. + /// + R64SFloat = 112, + + /// + /// R64G64UInt specifies a two-component, 128-bit unsigned integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15. + /// + R64G64UInt = 113, + + /// + /// R64G64SInt specifies a two-component, 128-bit signed integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15. + /// + R64G64SInt = 114, + + /// + /// R64G64SFloat specifies a two-component, 128-bit signed floating-point format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15. + /// + R64G64SFloat = 115, + + /// + /// R64G64B64UInt specifies a three-component, 192-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23. + /// + R64G64B64UInt = 116, + + /// + /// R64G64B64SInt specifies a three-component, 192-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23. + /// + R64G64B64SInt = 117, + + /// + /// R64G64B64SFloat specifies a three-component, 192-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23. + /// + R64G64B64SFloat = 118, + + /// + /// R64G64B64A64UInt specifies a four-component, 256-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31. + /// + R64G64B64A64UInt = 119, + + /// + /// R64G64B64A64SInt specifies a four-component, 256-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31. + /// + R64G64B64A64SInt = 120, + + /// + /// R64G64B64A64SFloat specifies a four-component, 256-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31. + /// + R64G64B64A64SFloat = 121, + + /// + /// B10G11R11UfloatPack32 specifies a three-component, 32-bit packed unsigned floating-point format that has a 10-bit B component in bits 22..31, an 11-bit G component in bits 11..21, an 11-bit R component in bits 0..10. See here and here. + /// + B10G11R11UfloatPack32 = 122, + + /// + /// E5B9G9R9UfloatPack32 specifies a three-component, 32-bit packed unsigned floating-point format that has a 5-bit shared exponent in bits 27..31, a 9-bit B component mantissa in bits 18..26, a 9-bit G component mantissa in bits 9..17, and a 9-bit R component mantissa in bits 0..8. + /// + E5B9G9R9UfloatPack32 = 123, + + /// + /// D16UNorm specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit depth component. + /// + D16UNorm = 124, + + /// + /// X8D24UNormPack32 specifies a two-component, 32-bit format that has 24 unsigned normalized bits in the depth component and, optionally:, 8 bits that are unused. + /// + X8D24UNormPack32 = 125, + + /// + /// D32SFloat specifies a one-component, 32-bit signed floating-point format that has 32 bits in the depth component. + /// + D32SFloat = 126, + + /// + /// S8UInt specifies a one-component, 8-bit unsigned integer format that has 8 bits in the stencil component. + /// + S8UInt = 127, + + /// + /// D16UNormS8UInt specifies a two-component, 24-bit format that has 16 unsigned normalized bits in the depth component and 8 unsigned integer bits in the stencil component. + /// + D16UNormS8UInt = 128, + + /// + /// D24UNormS8UInt specifies a two-component, 32-bit packed format that has 8 unsigned integer bits in the stencil component, and 24 unsigned normalized bits in the depth component. + /// + D24UNormS8UInt = 129, + + /// + /// D32SFloatS8UInt specifies a two-component format that has 32 signed float bits in the depth component and 8 unsigned integer bits in the stencil component. There are optionally: 24 bits that are unused. + /// + D32SFloatS8UInt = 130, + + /// + /// Bc1RGBUNormBlock specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque. + /// + Bc1RGBUNormBlock = 131, + + /// + /// Bc1RGBSRGBBlock specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque. + /// + Bc1RGBSRGBBlock = 132, + + /// + /// Bc1RGBAUNormBlock specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha. + /// + Bc1RGBAUNormBlock = 133, + + /// + /// Bc1RGBASRGBBlock specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha. + /// + Bc1RGBASRGBBlock = 134, + + /// + /// Bc2UNormBlock specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values. + /// + Bc2UNormBlock = 135, + + /// + /// Bc2SRGBBlock specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding. + /// + Bc2SRGBBlock = 136, + + /// + /// Bc3UNormBlock specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values. + /// + Bc3UNormBlock = 137, + + /// + /// Bc3SRGBBlock specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding. + /// + Bc3SRGBBlock = 138, + + /// + /// Bc4UNormBlock specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized red texel data. + /// + Bc4UNormBlock = 139, + + /// + /// Bc4SNormBlock specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized red texel data. + /// + Bc4SNormBlock = 140, + + /// + /// Bc5UNormBlock specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + Bc5UNormBlock = 141, + + /// + /// Bc5SNormBlock specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + Bc5SNormBlock = 142, + + /// + /// Bc6HUfloatBlock specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned floating-point RGB texel data. + /// + Bc6HUfloatBlock = 143, + + /// + /// Bc6HSFloatBlock specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of signed floating-point RGB texel data. + /// + Bc6HSFloatBlock = 144, + + /// + /// Bc7UNormBlock specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data. + /// + Bc7UNormBlock = 145, + + /// + /// Bc7SRGBBlock specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Bc7SRGBBlock = 146, + + /// + /// Etc2R8G8B8UNormBlock specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque. + /// + Etc2R8G8B8UNormBlock = 147, + + /// + /// Etc2R8G8B8SRGBBlock specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque. + /// + Etc2R8G8B8SRGBBlock = 148, + + /// + /// Etc2R8G8B8A1UNormBlock specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha. + /// + Etc2R8G8B8A1UNormBlock = 149, + + /// + /// Etc2R8G8B8A1SRGBBlock specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha. + /// + Etc2R8G8B8A1SRGBBlock = 150, + + /// + /// Etc2R8G8B8A8UNormBlock specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values. + /// + Etc2R8G8B8A8UNormBlock = 151, + + /// + /// Etc2R8G8B8A8SRGBBlock specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding applied. + /// + Etc2R8G8B8A8SRGBBlock = 152, + + /// + /// EacR11UNormBlock specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized red texel data. + /// + EacR11UNormBlock = 153, + + /// + /// EacR11SNormBlock specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized red texel data. + /// + EacR11SNormBlock = 154, + + /// + /// EacR11G11UNormBlock specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + EacR11G11UNormBlock = 155, + + /// + /// EacR11G11SNormBlock specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values. + /// + EacR11G11SNormBlock = 156, + + /// + /// Astc4X4UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data. + /// + Astc4X4UNormBlock = 157, + + /// + /// Astc4X4SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc4X4SRGBBlock = 158, + + /// + /// Astc5X4UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}4 rectangle of unsigned normalized RGBA texel data. + /// + Astc5X4UNormBlock = 159, + + /// + /// Astc5X4SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc5X4SRGBBlock = 160, + + /// + /// Astc5X5UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}5 rectangle of unsigned normalized RGBA texel data. + /// + Astc5X5UNormBlock = 161, + + /// + /// Astc5X5SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc5X5SRGBBlock = 162, + + /// + /// Astc6X5UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}5 rectangle of unsigned normalized RGBA texel data. + /// + Astc6X5UNormBlock = 163, + + /// + /// Astc6X5SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc6X5SRGBBlock = 164, + + /// + /// Astc6X6UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}6 rectangle of unsigned normalized RGBA texel data. + /// + Astc6X6UNormBlock = 165, + + /// + /// Astc6X6SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc6X6SRGBBlock = 166, + + /// + /// Astc8X5UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}5 rectangle of unsigned normalized RGBA texel data. + /// + Astc8X5UNormBlock = 167, + + /// + /// Astc8X5SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc8X5SRGBBlock = 168, + + /// + /// Astc8X6UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}6 rectangle of unsigned normalized RGBA texel data. + /// + Astc8X6UNormBlock = 169, + + /// + /// Astc8X6SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc8X6SRGBBlock = 170, + + /// + /// Astc8X8UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}8 rectangle of unsigned normalized RGBA texel data. + /// + Astc8X8UNormBlock = 171, + + /// + /// Astc8X8SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc8X8SRGBBlock = 172, + + /// + /// Astc10X5UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}5 rectangle of unsigned normalized RGBA texel data. + /// + Astc10X5UNormBlock = 173, + + /// + /// Astc10X5SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc10X5SRGBBlock = 174, + + /// + /// Astc10X6UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}6 rectangle of unsigned normalized RGBA texel data. + /// + Astc10X6UNormBlock = 175, + + /// + /// Astc10X6SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc10X6SRGBBlock = 176, + + /// + /// Astc10X8UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}8 rectangle of unsigned normalized RGBA texel data. + /// + Astc10X8UNormBlock = 177, + + /// + /// Astc10X8SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc10X8SRGBBlock = 178, + + /// + /// Astc10X10UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}10 rectangle of unsigned normalized RGBA texel data. + /// + Astc10X10UNormBlock = 179, + + /// + /// Astc10X10SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc10X10SRGBBlock = 180, + + /// + /// Astc12X10UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}10 rectangle of unsigned normalized RGBA texel data. + /// + Astc12X10UNormBlock = 181, + + /// + /// Astc12X10SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc12X10SRGBBlock = 182, + + /// + /// Astc12X12UNormBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}12 rectangle of unsigned normalized RGBA texel data. + /// + Astc12X12UNormBlock = 183, + + /// + /// Astc12X12SRGBBlock specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}12 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. + /// + Astc12X12SRGBBlock = 184, + + /// + /// G8B8G8R8422UNorm + /// + G8B8G8R8422UNorm = 1000156000, + + /// + /// B8G8R8G8422UNorm + /// + B8G8R8G8422UNorm = 1000156001, + + /// + /// G8B8R83Plane420UNorm + /// + G8B8R83Plane420UNorm = 1000156002, + + /// + /// G8B8R82Plane420UNorm + /// + G8B8R82Plane420UNorm = 1000156003, + + /// + /// G8B8R83Plane422UNorm + /// + G8B8R83Plane422UNorm = 1000156004, + + /// + /// G8B8R82Plane422UNorm + /// + G8B8R82Plane422UNorm = 1000156005, + + /// + /// G8B8R83Plane444UNorm + /// + G8B8R83Plane444UNorm = 1000156006, + + /// + /// R10X6UNormPack16 + /// + R10X6UNormPack16 = 1000156007, + + /// + /// R10X6G10X6UNorm2Pack16 + /// + R10X6G10X6UNorm2Pack16 = 1000156008, + + /// + /// R10X6G10X6B10X6A10X6UNorm4Pack16 + /// + R10X6G10X6B10X6A10X6UNorm4Pack16 = 1000156009, + + /// + /// G10X6B10X6G10X6R10X6422UNorm4Pack16 + /// + G10X6B10X6G10X6R10X6422UNorm4Pack16 = 1000156010, + + /// + /// B10X6G10X6R10X6G10X6422UNorm4Pack16 + /// + B10X6G10X6R10X6G10X6422UNorm4Pack16 = 1000156011, + + /// + /// G10X6B10X6R10X63Plane420UNorm3Pack16 + /// + G10X6B10X6R10X63Plane420UNorm3Pack16 = 1000156012, + + /// + /// G10X6B10X6R10X62Plane420UNorm3Pack16 + /// + G10X6B10X6R10X62Plane420UNorm3Pack16 = 1000156013, + + /// + /// G10X6B10X6R10X63Plane422UNorm3Pack16 + /// + G10X6B10X6R10X63Plane422UNorm3Pack16 = 1000156014, + + /// + /// G10X6B10X6R10X62Plane422UNorm3Pack16 + /// + G10X6B10X6R10X62Plane422UNorm3Pack16 = 1000156015, + + /// + /// G10X6B10X6R10X63Plane444UNorm3Pack16 + /// + G10X6B10X6R10X63Plane444UNorm3Pack16 = 1000156016, + + /// + /// R12X4UNormPack16 + /// + R12X4UNormPack16 = 1000156017, + + /// + /// R12X4G12X4UNorm2Pack16 + /// + R12X4G12X4UNorm2Pack16 = 1000156018, + + /// + /// R12X4G12X4B12X4A12X4UNorm4Pack16 + /// + R12X4G12X4B12X4A12X4UNorm4Pack16 = 1000156019, + + /// + /// G12X4B12X4G12X4R12X4422UNorm4Pack16 + /// + G12X4B12X4G12X4R12X4422UNorm4Pack16 = 1000156020, + + /// + /// B12X4G12X4R12X4G12X4422UNorm4Pack16 + /// + B12X4G12X4R12X4G12X4422UNorm4Pack16 = 1000156021, + + /// + /// G12X4B12X4R12X43Plane420UNorm3Pack16 + /// + G12X4B12X4R12X43Plane420UNorm3Pack16 = 1000156022, + + /// + /// G12X4B12X4R12X42Plane420UNorm3Pack16 + /// + G12X4B12X4R12X42Plane420UNorm3Pack16 = 1000156023, + + /// + /// G12X4B12X4R12X43Plane422UNorm3Pack16 + /// + G12X4B12X4R12X43Plane422UNorm3Pack16 = 1000156024, + + /// + /// G12X4B12X4R12X42Plane422UNorm3Pack16 + /// + G12X4B12X4R12X42Plane422UNorm3Pack16 = 1000156025, + + /// + /// G12X4B12X4R12X43Plane444UNorm3Pack16 + /// + G12X4B12X4R12X43Plane444UNorm3Pack16 = 1000156026, + + /// + /// G16B16G16R16422UNorm + /// + G16B16G16R16422UNorm = 1000156027, + + /// + /// B16G16R16G16422UNorm + /// + B16G16R16G16422UNorm = 1000156028, + + /// + /// G16B16R163Plane420UNorm + /// + G16B16R163Plane420UNorm = 1000156029, + + /// + /// G16B16R162Plane420UNorm + /// + G16B16R162Plane420UNorm = 1000156030, + + /// + /// G16B16R163Plane422UNorm + /// + G16B16R163Plane422UNorm = 1000156031, + + /// + /// G16B16R162Plane422UNorm + /// + G16B16R162Plane422UNorm = 1000156032, + + /// + /// G16B16R163Plane444UNorm + /// + G16B16R163Plane444UNorm = 1000156033, + + /// + /// G8B8R82Plane444UNorm + /// + G8B8R82Plane444UNorm = 1000330000, + + /// + /// G10X6B10X6R10X62Plane444UNorm3Pack16 + /// + G10X6B10X6R10X62Plane444UNorm3Pack16 = 1000330001, + + /// + /// G12X4B12X4R12X42Plane444UNorm3Pack16 + /// + G12X4B12X4R12X42Plane444UNorm3Pack16 = 1000330002, + + /// + /// G16B16R162Plane444UNorm + /// + G16B16R162Plane444UNorm = 1000330003, + + /// + /// A4R4G4B4UNormPack16 + /// + A4R4G4B4UNormPack16 = 1000340000, + + /// + /// A4B4G4R4UNormPack16 + /// + A4B4G4R4UNormPack16 = 1000340001, + + /// + /// Astc4X4SFloatBlock + /// + Astc4X4SFloatBlock = 1000066000, + + /// + /// Astc5X4SFloatBlock + /// + Astc5X4SFloatBlock = 1000066001, + + /// + /// Astc5X5SFloatBlock + /// + Astc5X5SFloatBlock = 1000066002, + + /// + /// Astc6X5SFloatBlock + /// + Astc6X5SFloatBlock = 1000066003, + + /// + /// Astc6X6SFloatBlock + /// + Astc6X6SFloatBlock = 1000066004, + + /// + /// Astc8X5SFloatBlock + /// + Astc8X5SFloatBlock = 1000066005, + + /// + /// Astc8X6SFloatBlock + /// + Astc8X6SFloatBlock = 1000066006, + + /// + /// Astc8X8SFloatBlock + /// + Astc8X8SFloatBlock = 1000066007, + + /// + /// Astc10X5SFloatBlock + /// + Astc10X5SFloatBlock = 1000066008, + + /// + /// Astc10X6SFloatBlock + /// + Astc10X6SFloatBlock = 1000066009, + + /// + /// Astc10X8SFloatBlock + /// + Astc10X8SFloatBlock = 1000066010, + + /// + /// Astc10X10SFloatBlock + /// + Astc10X10SFloatBlock = 1000066011, + + /// + /// Astc12X10SFloatBlock + /// + Astc12X10SFloatBlock = 1000066012, + + /// + /// Astc12X12SFloatBlock + /// + Astc12X12SFloatBlock = 1000066013, + + /// + /// A1B5G5R5UNormPack16 + /// + A1B5G5R5UNormPack16 = 1000470000, + + /// + /// A8UNorm + /// + A8UNorm = 1000470001, + + /// + /// Pvrtc12BppUNormBlockIMG + /// + Pvrtc12BppUNormBlockIMG = 1000054000, + + /// + /// Pvrtc14BppUNormBlockIMG + /// + Pvrtc14BppUNormBlockIMG = 1000054001, + + /// + /// Pvrtc22BppUNormBlockIMG + /// + Pvrtc22BppUNormBlockIMG = 1000054002, + + /// + /// Pvrtc24BppUNormBlockIMG + /// + Pvrtc24BppUNormBlockIMG = 1000054003, + + /// + /// Pvrtc12BppSRGBBlockIMG + /// + Pvrtc12BppSRGBBlockIMG = 1000054004, + + /// + /// Pvrtc14BppSRGBBlockIMG + /// + Pvrtc14BppSRGBBlockIMG = 1000054005, + + /// + /// Pvrtc22BppSRGBBlockIMG + /// + Pvrtc22BppSRGBBlockIMG = 1000054006, + + /// + /// Pvrtc24BppSRGBBlockIMG + /// + Pvrtc24BppSRGBBlockIMG = 1000054007, + + /// + /// Astc3X3X3UNormBlockEXT + /// + Astc3X3X3UNormBlockEXT = 1000288000, + + /// + /// Astc3X3X3SRGBBlockEXT + /// + Astc3X3X3SRGBBlockEXT = 1000288001, + + /// + /// Astc3X3X3SFloatBlockEXT + /// + Astc3X3X3SFloatBlockEXT = 1000288002, + + /// + /// Astc4X3X3UNormBlockEXT + /// + Astc4X3X3UNormBlockEXT = 1000288003, + + /// + /// Astc4X3X3SRGBBlockEXT + /// + Astc4X3X3SRGBBlockEXT = 1000288004, + + /// + /// Astc4X3X3SFloatBlockEXT + /// + Astc4X3X3SFloatBlockEXT = 1000288005, + + /// + /// Astc4X4X3UNormBlockEXT + /// + Astc4X4X3UNormBlockEXT = 1000288006, + + /// + /// Astc4X4X3SRGBBlockEXT + /// + Astc4X4X3SRGBBlockEXT = 1000288007, + + /// + /// Astc4X4X3SFloatBlockEXT + /// + Astc4X4X3SFloatBlockEXT = 1000288008, + + /// + /// Astc4X4X4UNormBlockEXT + /// + Astc4X4X4UNormBlockEXT = 1000288009, + + /// + /// Astc4X4X4SRGBBlockEXT + /// + Astc4X4X4SRGBBlockEXT = 1000288010, + + /// + /// Astc4X4X4SFloatBlockEXT + /// + Astc4X4X4SFloatBlockEXT = 1000288011, + + /// + /// Astc5X4X4UNormBlockEXT + /// + Astc5X4X4UNormBlockEXT = 1000288012, + + /// + /// Astc5X4X4SRGBBlockEXT + /// + Astc5X4X4SRGBBlockEXT = 1000288013, + + /// + /// Astc5X4X4SFloatBlockEXT + /// + Astc5X4X4SFloatBlockEXT = 1000288014, + + /// + /// Astc5X5X4UNormBlockEXT + /// + Astc5X5X4UNormBlockEXT = 1000288015, + + /// + /// Astc5X5X4SRGBBlockEXT + /// + Astc5X5X4SRGBBlockEXT = 1000288016, + + /// + /// Astc5X5X4SFloatBlockEXT + /// + Astc5X5X4SFloatBlockEXT = 1000288017, + + /// + /// Astc5X5X5UNormBlockEXT + /// + Astc5X5X5UNormBlockEXT = 1000288018, + + /// + /// Astc5X5X5SRGBBlockEXT + /// + Astc5X5X5SRGBBlockEXT = 1000288019, + + /// + /// Astc5X5X5SFloatBlockEXT + /// + Astc5X5X5SFloatBlockEXT = 1000288020, + + /// + /// Astc6X5X5UNormBlockEXT + /// + Astc6X5X5UNormBlockEXT = 1000288021, + + /// + /// Astc6X5X5SRGBBlockEXT + /// + Astc6X5X5SRGBBlockEXT = 1000288022, + + /// + /// Astc6X5X5SFloatBlockEXT + /// + Astc6X5X5SFloatBlockEXT = 1000288023, + + /// + /// Astc6X6X5UNormBlockEXT + /// + Astc6X6X5UNormBlockEXT = 1000288024, + + /// + /// Astc6X6X5SRGBBlockEXT + /// + Astc6X6X5SRGBBlockEXT = 1000288025, + + /// + /// Astc6X6X5SFloatBlockEXT + /// + Astc6X6X5SFloatBlockEXT = 1000288026, + + /// + /// Astc6X6X6UNormBlockEXT + /// + Astc6X6X6UNormBlockEXT = 1000288027, + + /// + /// Astc6X6X6SRGBBlockEXT + /// + Astc6X6X6SRGBBlockEXT = 1000288028, + + /// + /// Astc6X6X6SFloatBlockEXT + /// + Astc6X6X6SFloatBlockEXT = 1000288029, + + /// + /// R8BoolARM + /// + R8BoolARM = 1000460000, + + /// + /// R16SFloatFpencodingBfloat16ARM + /// + R16SFloatFpencodingBfloat16ARM = 1000460001, + + /// + /// R8SFloatFpencodingFloat8E4M3ARM + /// + R8SFloatFpencodingFloat8E4M3ARM = 1000460002, + + /// + /// R8SFloatFpencodingFloat8E5M2ARM + /// + R8SFloatFpencodingFloat8E5M2ARM = 1000460003, + + /// + /// R16G16Sfixed5NV + /// + R16G16Sfixed5NV = 1000464000, + + /// + /// R10X6UIntPack16ARM + /// + R10X6UIntPack16ARM = 1000609000, + + /// + /// R10X6G10X6UInt2Pack16ARM + /// + R10X6G10X6UInt2Pack16ARM = 1000609001, + + /// + /// R10X6G10X6B10X6A10X6UInt4Pack16ARM + /// + R10X6G10X6B10X6A10X6UInt4Pack16ARM = 1000609002, + + /// + /// R12X4UIntPack16ARM + /// + R12X4UIntPack16ARM = 1000609003, + + /// + /// R12X4G12X4UInt2Pack16ARM + /// + R12X4G12X4UInt2Pack16ARM = 1000609004, + + /// + /// R12X4G12X4B12X4A12X4UInt4Pack16ARM + /// + R12X4G12X4B12X4A12X4UInt4Pack16ARM = 1000609005, + + /// + /// R14X2UIntPack16ARM + /// + R14X2UIntPack16ARM = 1000609006, + + /// + /// R14X2G14X2UInt2Pack16ARM + /// + R14X2G14X2UInt2Pack16ARM = 1000609007, + + /// + /// R14X2G14X2B14X2A14X2UInt4Pack16ARM + /// + R14X2G14X2B14X2A14X2UInt4Pack16ARM = 1000609008, + + /// + /// R14X2UNormPack16ARM + /// + R14X2UNormPack16ARM = 1000609009, + + /// + /// R14X2G14X2UNorm2Pack16ARM + /// + R14X2G14X2UNorm2Pack16ARM = 1000609010, + + /// + /// R14X2G14X2B14X2A14X2UNorm4Pack16ARM + /// + R14X2G14X2B14X2A14X2UNorm4Pack16ARM = 1000609011, + + /// + /// G14X2B14X2R14X22Plane420UNorm3Pack16ARM + /// + G14X2B14X2R14X22Plane420UNorm3Pack16ARM = 1000609012, + + /// + /// G14X2B14X2R14X22Plane422UNorm3Pack16ARM + /// + G14X2B14X2R14X22Plane422UNorm3Pack16ARM = 1000609013, + + /// + /// Astc4X4SFloatBlockEXT + /// + Astc4X4SFloatBlockEXT = Astc4X4SFloatBlock, + + /// + /// Astc5X4SFloatBlockEXT + /// + Astc5X4SFloatBlockEXT = Astc5X4SFloatBlock, + + /// + /// Astc5X5SFloatBlockEXT + /// + Astc5X5SFloatBlockEXT = Astc5X5SFloatBlock, + + /// + /// Astc6X5SFloatBlockEXT + /// + Astc6X5SFloatBlockEXT = Astc6X5SFloatBlock, + + /// + /// Astc6X6SFloatBlockEXT + /// + Astc6X6SFloatBlockEXT = Astc6X6SFloatBlock, + + /// + /// Astc8X5SFloatBlockEXT + /// + Astc8X5SFloatBlockEXT = Astc8X5SFloatBlock, + + /// + /// Astc8X6SFloatBlockEXT + /// + Astc8X6SFloatBlockEXT = Astc8X6SFloatBlock, + + /// + /// Astc8X8SFloatBlockEXT + /// + Astc8X8SFloatBlockEXT = Astc8X8SFloatBlock, + + /// + /// Astc10X5SFloatBlockEXT + /// + Astc10X5SFloatBlockEXT = Astc10X5SFloatBlock, + + /// + /// Astc10X6SFloatBlockEXT + /// + Astc10X6SFloatBlockEXT = Astc10X6SFloatBlock, + + /// + /// Astc10X8SFloatBlockEXT + /// + Astc10X8SFloatBlockEXT = Astc10X8SFloatBlock, + + /// + /// Astc10X10SFloatBlockEXT + /// + Astc10X10SFloatBlockEXT = Astc10X10SFloatBlock, + + /// + /// Astc12X10SFloatBlockEXT + /// + Astc12X10SFloatBlockEXT = Astc12X10SFloatBlock, + + /// + /// Astc12X12SFloatBlockEXT + /// + Astc12X12SFloatBlockEXT = Astc12X12SFloatBlock, + + /// + /// G8B8G8R8422UNormKHR + /// + G8B8G8R8422UNormKHR = G8B8G8R8422UNorm, + + /// + /// B8G8R8G8422UNormKHR + /// + B8G8R8G8422UNormKHR = B8G8R8G8422UNorm, + + /// + /// G8B8R83Plane420UNormKHR + /// + G8B8R83Plane420UNormKHR = G8B8R83Plane420UNorm, + + /// + /// G8B8R82Plane420UNormKHR + /// + G8B8R82Plane420UNormKHR = G8B8R82Plane420UNorm, + + /// + /// G8B8R83Plane422UNormKHR + /// + G8B8R83Plane422UNormKHR = G8B8R83Plane422UNorm, + + /// + /// G8B8R82Plane422UNormKHR + /// + G8B8R82Plane422UNormKHR = G8B8R82Plane422UNorm, + + /// + /// G8B8R83Plane444UNormKHR + /// + G8B8R83Plane444UNormKHR = G8B8R83Plane444UNorm, + + /// + /// R10X6UNormPack16KHR + /// + R10X6UNormPack16KHR = R10X6UNormPack16, + + /// + /// R10X6G10X6UNorm2Pack16KHR + /// + R10X6G10X6UNorm2Pack16KHR = R10X6G10X6UNorm2Pack16, + + /// + /// R10X6G10X6B10X6A10X6UNorm4Pack16KHR + /// + R10X6G10X6B10X6A10X6UNorm4Pack16KHR = R10X6G10X6B10X6A10X6UNorm4Pack16, + + /// + /// G10X6B10X6G10X6R10X6422UNorm4Pack16KHR + /// + G10X6B10X6G10X6R10X6422UNorm4Pack16KHR = G10X6B10X6G10X6R10X6422UNorm4Pack16, + + /// + /// B10X6G10X6R10X6G10X6422UNorm4Pack16KHR + /// + B10X6G10X6R10X6G10X6422UNorm4Pack16KHR = B10X6G10X6R10X6G10X6422UNorm4Pack16, + + /// + /// G10X6B10X6R10X63Plane420UNorm3Pack16KHR + /// + G10X6B10X6R10X63Plane420UNorm3Pack16KHR = G10X6B10X6R10X63Plane420UNorm3Pack16, + + /// + /// G10X6B10X6R10X62Plane420UNorm3Pack16KHR + /// + G10X6B10X6R10X62Plane420UNorm3Pack16KHR = G10X6B10X6R10X62Plane420UNorm3Pack16, + + /// + /// G10X6B10X6R10X63Plane422UNorm3Pack16KHR + /// + G10X6B10X6R10X63Plane422UNorm3Pack16KHR = G10X6B10X6R10X63Plane422UNorm3Pack16, + + /// + /// G10X6B10X6R10X62Plane422UNorm3Pack16KHR + /// + G10X6B10X6R10X62Plane422UNorm3Pack16KHR = G10X6B10X6R10X62Plane422UNorm3Pack16, + + /// + /// G10X6B10X6R10X63Plane444UNorm3Pack16KHR + /// + G10X6B10X6R10X63Plane444UNorm3Pack16KHR = G10X6B10X6R10X63Plane444UNorm3Pack16, + + /// + /// R12X4UNormPack16KHR + /// + R12X4UNormPack16KHR = R12X4UNormPack16, + + /// + /// R12X4G12X4UNorm2Pack16KHR + /// + R12X4G12X4UNorm2Pack16KHR = R12X4G12X4UNorm2Pack16, + + /// + /// R12X4G12X4B12X4A12X4UNorm4Pack16KHR + /// + R12X4G12X4B12X4A12X4UNorm4Pack16KHR = R12X4G12X4B12X4A12X4UNorm4Pack16, + + /// + /// G12X4B12X4G12X4R12X4422UNorm4Pack16KHR + /// + G12X4B12X4G12X4R12X4422UNorm4Pack16KHR = G12X4B12X4G12X4R12X4422UNorm4Pack16, + + /// + /// B12X4G12X4R12X4G12X4422UNorm4Pack16KHR + /// + B12X4G12X4R12X4G12X4422UNorm4Pack16KHR = B12X4G12X4R12X4G12X4422UNorm4Pack16, + + /// + /// G12X4B12X4R12X43Plane420UNorm3Pack16KHR + /// + G12X4B12X4R12X43Plane420UNorm3Pack16KHR = G12X4B12X4R12X43Plane420UNorm3Pack16, + + /// + /// G12X4B12X4R12X42Plane420UNorm3Pack16KHR + /// + G12X4B12X4R12X42Plane420UNorm3Pack16KHR = G12X4B12X4R12X42Plane420UNorm3Pack16, + + /// + /// G12X4B12X4R12X43Plane422UNorm3Pack16KHR + /// + G12X4B12X4R12X43Plane422UNorm3Pack16KHR = G12X4B12X4R12X43Plane422UNorm3Pack16, + + /// + /// G12X4B12X4R12X42Plane422UNorm3Pack16KHR + /// + G12X4B12X4R12X42Plane422UNorm3Pack16KHR = G12X4B12X4R12X42Plane422UNorm3Pack16, + + /// + /// G12X4B12X4R12X43Plane444UNorm3Pack16KHR + /// + G12X4B12X4R12X43Plane444UNorm3Pack16KHR = G12X4B12X4R12X43Plane444UNorm3Pack16, + + /// + /// G16B16G16R16422UNormKHR + /// + G16B16G16R16422UNormKHR = G16B16G16R16422UNorm, + + /// + /// B16G16R16G16422UNormKHR + /// + B16G16R16G16422UNormKHR = B16G16R16G16422UNorm, + + /// + /// G16B16R163Plane420UNormKHR + /// + G16B16R163Plane420UNormKHR = G16B16R163Plane420UNorm, + + /// + /// G16B16R162Plane420UNormKHR + /// + G16B16R162Plane420UNormKHR = G16B16R162Plane420UNorm, + + /// + /// G16B16R163Plane422UNormKHR + /// + G16B16R163Plane422UNormKHR = G16B16R163Plane422UNorm, + + /// + /// G16B16R162Plane422UNormKHR + /// + G16B16R162Plane422UNormKHR = G16B16R162Plane422UNorm, + + /// + /// G16B16R163Plane444UNormKHR + /// + G16B16R163Plane444UNormKHR = G16B16R163Plane444UNorm, + + /// + /// G8B8R82Plane444UNormEXT + /// + G8B8R82Plane444UNormEXT = G8B8R82Plane444UNorm, + + /// + /// G10X6B10X6R10X62Plane444UNorm3Pack16EXT + /// + G10X6B10X6R10X62Plane444UNorm3Pack16EXT = G10X6B10X6R10X62Plane444UNorm3Pack16, + + /// + /// G12X4B12X4R12X42Plane444UNorm3Pack16EXT + /// + G12X4B12X4R12X42Plane444UNorm3Pack16EXT = G12X4B12X4R12X42Plane444UNorm3Pack16, + + /// + /// G16B16R162Plane444UNormEXT + /// + G16B16R162Plane444UNormEXT = G16B16R162Plane444UNorm, + + /// + /// A4R4G4B4UNormPack16EXT + /// + A4R4G4B4UNormPack16EXT = A4R4G4B4UNormPack16, + + /// + /// A4B4G4R4UNormPack16EXT + /// + A4B4G4R4UNormPack16EXT = A4B4G4R4UNormPack16, + + /// + /// R16G16S105NV + /// + R16G16S105NV = R16G16Sfixed5NV, + + /// + /// A1B5G5R5UNormPack16KHR + /// + A1B5G5R5UNormPack16KHR = A1B5G5R5UNormPack16, + + /// + /// A8UNormKHR + /// + A8UNormKHR = A8UNorm, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags.gen.cs new file mode 100644 index 0000000..6fbee4a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags.gen.cs @@ -0,0 +1,313 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormatFeatureFlagBits - Bitmask specifying features supported by a buffer + /// + /// + /// + /// Bits which can be set in the VkFormatProperties features + /// linearTilingFeatures, optimalTilingFeatures, + /// and bufferFeatures are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkFormatFeatureFlagBits { + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, + /// VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, + /// VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, + /// VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, + /// VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, + /// VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, + /// VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, + /// VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, + /// VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, + /// VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, + /// VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, + /// VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000, + /// // Provided by VK_VERSION_1_1 + /// VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000, + /// // Provided by VK_VERSION_1_2 + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000, + /// // Provided by VK_EXT_filter_cubic + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000, + /// // Provided by VK_IMG_filter_cubic + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT, + /// // Provided by VK_KHR_maintenance1 + /// VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT, + /// // Provided by VK_KHR_maintenance1 + /// VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT, + /// // Provided by VK_EXT_sampler_filter_minmax + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = VK_FORMAT_FEATURE_DISJOINT_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, + /// } VkFormatFeatureFlagBits; + /// + /// + [Flags] + public enum VkFormatFeatureFlags : int + { + /// No flags set. + None = 0, + + /// + /// SampledImageBit specifies that an image view can be sampled from^. + /// + SampledImageBit = 0x00000001, + + /// + /// StorageImageBit specifies that an image view can be used as a storage image^. + /// + StorageImageBit = 0x00000002, + + /// + /// StorageImageAtomicBit specifies that an image view can be used as storage image that supports atomic operations. + /// + StorageImageAtomicBit = 0x00000004, + + /// + /// UniformTexelBufferBit + /// + UniformTexelBufferBit = 0x00000008, + + /// + /// StorageTexelBufferBit + /// + StorageTexelBufferBit = 0x00000010, + + /// + /// StorageTexelBufferAtomicBit + /// + StorageTexelBufferAtomicBit = 0x00000020, + + /// + /// VertexBufferBit + /// + VertexBufferBit = 0x00000040, + + /// + /// ColorAttachmentBit specifies that an image view can be used as a framebuffer color attachment and as an input attachment. + /// + ColorAttachmentBit = 0x00000080, + + /// + /// ColorAttachmentBlendBit specifies that an image view can be used as a framebuffer color attachment that supports blending. + /// + ColorAttachmentBlendBit = 0x00000100, + + /// + /// DepthStencilAttachmentBit specifies that an image view can be used as a framebuffer depth/stencil attachment and as an input attachment. + /// + DepthStencilAttachmentBit = 0x00000200, + + /// + /// BlitSrcBit specifies that an image can be used as srcImage for the vkCmdBlitImage command. + /// + BlitSrcBit = 0x00000400, + + /// + /// BlitDstBit specifies that an image can be used as dstImage for the vkCmdBlitImage command. + /// + BlitDstBit = 0x00000800, + + /// + /// SampledImageFilterLinearBit specifies that if VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT is also set, an image view can be used with a sampler that has either of magFilter or minFilter set to VK_FILTER_LINEAR, or mipmapMode set to VK_SAMPLER_MIPMAP_MODE_LINEAR. If VK_FORMAT_FEATURE_BLIT_SRC_BIT is also set, an image can be used as the srcImage to vkCmdBlitImage with a filter of VK_FILTER_LINEAR. This bit must only be exposed for formats that also support the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT or VK_FORMAT_FEATURE_BLIT_SRC_BIT. + If the format being queried is a depth/stencil format, this bit only specifies that the depth aspect (not the stencil aspect) of an image of this format supports linear filtering, and that linear filtering of the depth aspect is supported whether depth compare is enabled in the sampler or not. Where depth comparison is supported it may: be linear filtered whether this bit is present or not, but where this bit is not present the filtered value may: be computed in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures. + /// + SampledImageFilterLinearBit = 0x00001000, + + /// + /// TransferSrcBit + /// + TransferSrcBit = 0x00004000, + + /// + /// TransferDstBit + /// + TransferDstBit = 0x00008000, + + /// + /// MidpointChromaSamplesBit + /// + MidpointChromaSamplesBit = 0x00020000, + + /// + /// SampledImageYCbCrConversionLinearFilterBit + /// + SampledImageYCbCrConversionLinearFilterBit = 0x00040000, + + /// + /// SampledImageYCbCrConversionSeparateReconstructionFilterBit + /// + SampledImageYCbCrConversionSeparateReconstructionFilterBit = 0x00080000, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitBit + /// + SampledImageYCbCrConversionChromaReconstructionExplicitBit = 0x00100000, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitForceableBit + /// + SampledImageYCbCrConversionChromaReconstructionExplicitForceableBit = 0x00200000, + + /// + /// DisjointBit + /// + DisjointBit = 0x00400000, + + /// + /// CositedChromaSamplesBit + /// + CositedChromaSamplesBit = 0x00800000, + + /// + /// SampledImageFilterMinmaxBit + /// + SampledImageFilterMinmaxBit = 0x00010000, + + /// + /// VideoDecodeOutputBitKHR + /// + VideoDecodeOutputBitKHR = 0x02000000, + + /// + /// VideoDecodeDpbBitKHR + /// + VideoDecodeDpbBitKHR = 0x04000000, + + /// + /// AccelerationStructureVertexBufferBitKHR + /// + AccelerationStructureVertexBufferBitKHR = 0x20000000, + + /// + /// SampledImageFilterCubicBitEXT + /// + SampledImageFilterCubicBitEXT = 0x00002000, + + /// + /// FragmentDensityMapBitEXT + /// + FragmentDensityMapBitEXT = 0x01000000, + + /// + /// FragmentShadingRateAttachmentBitKHR + /// + FragmentShadingRateAttachmentBitKHR = 0x40000000, + + /// + /// VideoEncodeInputBitKHR + /// + VideoEncodeInputBitKHR = 0x08000000, + + /// + /// VideoEncodeDpbBitKHR + /// + VideoEncodeDpbBitKHR = 0x10000000, + + /// + /// SampledImageFilterCubicBitIMG + /// + SampledImageFilterCubicBitIMG = SampledImageFilterCubicBitEXT, + + /// + /// TransferSrcBitKHR + /// + TransferSrcBitKHR = TransferSrcBit, + + /// + /// TransferDstBitKHR + /// + TransferDstBitKHR = TransferDstBit, + + /// + /// SampledImageFilterMinmaxBitEXT + /// + SampledImageFilterMinmaxBitEXT = SampledImageFilterMinmaxBit, + + /// + /// MidpointChromaSamplesBitKHR + /// + MidpointChromaSamplesBitKHR = MidpointChromaSamplesBit, + + /// + /// SampledImageYCbCrConversionLinearFilterBitKHR + /// + SampledImageYCbCrConversionLinearFilterBitKHR = SampledImageYCbCrConversionLinearFilterBit, + + /// + /// SampledImageYCbCrConversionSeparateReconstructionFilterBitKHR + /// + SampledImageYCbCrConversionSeparateReconstructionFilterBitKHR = + SampledImageYCbCrConversionSeparateReconstructionFilterBit, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitBitKHR + /// + SampledImageYCbCrConversionChromaReconstructionExplicitBitKHR = + SampledImageYCbCrConversionChromaReconstructionExplicitBit, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitForceableBitKHR + /// + SampledImageYCbCrConversionChromaReconstructionExplicitForceableBitKHR = + SampledImageYCbCrConversionChromaReconstructionExplicitForceableBit, + + /// + /// DisjointBitKHR + /// + DisjointBitKHR = DisjointBit, + + /// + /// CositedChromaSamplesBitKHR + /// + CositedChromaSamplesBitKHR = CositedChromaSamplesBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags2.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags2.gen.cs new file mode 100644 index 0000000..b528520 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFormatFeatureFlags2.gen.cs @@ -0,0 +1,607 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormatFeatureFlagBits2 - Bitmask specifying features supported by a buffer + /// + /// + /// + /// Bits which can be set in the VkFormatProperties3 features + /// linearTilingFeatures, optimalTilingFeatures, and + /// bufferFeatures are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// // Flag bits for VkFormatFeatureFlagBits2 + /// typedef VkFlags64 VkFormatFeatureFlagBits2; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 0x00000001ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 0x00000002ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000010ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 0x00000040ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 0x00000080ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT = 0x00000400ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT = 0x00000800ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 0x00004000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT = 0x00008000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT = 0x00400000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 0x00800000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 0x80000000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 0x100000000ULL; + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 0x200000000ULL; + /// // Provided by VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 0x00002000ULL; + /// // Provided by VK_VERSION_1_4 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT = 0x400000000000ULL; + /// // Provided by VK_KHR_video_decode_queue with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000ULL; + /// // Provided by VK_KHR_video_decode_queue with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000ULL; + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000ULL; + /// // Provided by VK_EXT_fragment_density_map with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000ULL; + /// // Provided by VK_KHR_fragment_shading_rate with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000ULL; + /// // Provided by VK_EXT_host_image_copy + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = 0x400000000000ULL; + /// // Provided by VK_KHR_video_encode_queue with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL; + /// // Provided by VK_KHR_video_encode_queue with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL; + /// // Provided by VK_QCOM_image_processing with VK_QCOM_image_processing3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLOCK_MATCHING_SXD_BIT_QCOM = 0x100000000000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 0x00000001ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 0x00000002ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 0x00000004ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000010ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 0x00000020ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 0x00000040ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000200ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 0x00000400ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 0x00000800ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 0x00004000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 0x00008000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 0x00400000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 0x80000000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 0x100000000ULL; + /// // Provided by VK_KHR_format_feature_flags2 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 0x200000000ULL; + /// // Provided by VK_KHR_format_feature_flags2 with VK_VERSION_1_2 or VK_EXT_sampler_filter_minmax + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 0x00010000ULL; + /// // Provided by VK_KHR_format_feature_flags2 with VK_EXT_filter_cubic or VK_IMG_filter_cubic + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000ULL; + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_RADIUS_BUFFER_BIT_NV = 0x8000000000000ULL; + /// // Provided by VK_NV_linear_color_attachment with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 0x4000000000ULL; + /// // Provided by VK_QCOM_image_processing with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 0x400000000ULL; + /// // Provided by VK_QCOM_image_processing with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 0x800000000ULL; + /// // Provided by VK_QCOM_image_processing with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM = 0x1000000000ULL; + /// // Provided by VK_QCOM_image_processing with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM = 0x2000000000ULL; + /// // Provided by VK_ARM_tensors + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TENSOR_SHADER_BIT_ARM = 0x8000000000ULL; + /// // Provided by VK_ARM_tensors + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TENSOR_IMAGE_ALIASING_BIT_ARM = 0x80000000000ULL; + /// // Provided by VK_NV_optical_flow + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 0x10000000000ULL; + /// // Provided by VK_NV_optical_flow + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 0x20000000000ULL; + /// // Provided by VK_NV_optical_flow + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 0x40000000000ULL; + /// // Provided by VK_ARM_data_graph + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TENSOR_DATA_GRAPH_BIT_ARM = 0x1000000000000ULL; + /// // Provided by VK_KHR_copy_memory_indirect + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COPY_IMAGE_INDIRECT_DST_BIT_KHR = 0x800000000000000ULL; + /// // Provided by VK_KHR_video_encode_quantization_map + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x2000000000000ULL; + /// // Provided by VK_KHR_video_encode_quantization_map + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x4000000000000ULL; + /// // Provided by VK_IMG_filter_linear_2d + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_2D_BIT_IMG = 0x200000000000ULL; + /// // Provided by VK_KHR_maintenance10 with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR = 0x10000000000000ULL; + /// // Provided by VK_KHR_maintenance10 with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR = 0x20000000000000ULL; + /// // Provided by VK_KHR_maintenance10 with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR = 0x40000000000000ULL; + /// // Provided by VK_KHR_maintenance10 with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR = 0x80000000000000ULL; + /// // Provided by VK_ARM_data_graph_optical_flow + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DATA_GRAPH_OPTICAL_FLOW_IMAGE_BIT_ARM = 0x100000000000000ULL; + /// // Provided by VK_ARM_data_graph_optical_flow + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DATA_GRAPH_OPTICAL_FLOW_VECTOR_BIT_ARM = 0x200000000000000ULL; + /// // Provided by VK_ARM_data_graph_optical_flow + /// static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DATA_GRAPH_OPTICAL_FLOW_COST_BIT_ARM = 0x400000000000000ULL; + /// + /// + [Flags] + public enum VkFormatFeatureFlags2 : ulong + { + /// No flags set. + None = 0, + + /// + /// SampledImageBit specifies that an image view can be sampled from^. + /// + SampledImageBit = 0x00000001, + + /// + /// StorageImageBit specifies that an image view can be used as a storage image^. + /// + StorageImageBit = 0x00000002, + + /// + /// StorageImageAtomicBit specifies that an image view can be used as storage image that supports atomic operations. + /// + StorageImageAtomicBit = 0x00000004, + + /// + /// UniformTexelBufferBit + /// + UniformTexelBufferBit = 0x00000008, + + /// + /// StorageTexelBufferBit + /// + StorageTexelBufferBit = 0x00000010, + + /// + /// StorageTexelBufferAtomicBit + /// + StorageTexelBufferAtomicBit = 0x00000020, + + /// + /// VertexBufferBit + /// + VertexBufferBit = 0x00000040, + + /// + /// ColorAttachmentBit specifies that an image view can be used as a framebuffer color attachment and as an input attachment. + /// + ColorAttachmentBit = 0x00000080, + + /// + /// ColorAttachmentBlendBit specifies that an image view can be used as a framebuffer color attachment that supports blending. + /// + ColorAttachmentBlendBit = 0x00000100, + + /// + /// DepthStencilAttachmentBit specifies that an image view can be used as a framebuffer depth/stencil attachment and as an input attachment. + /// + DepthStencilAttachmentBit = 0x00000200, + + /// + /// BlitSrcBit specifies that an image can be used as the srcImage for vkCmdBlitImage. + /// + BlitSrcBit = 0x00000400, + + /// + /// BlitDstBit specifies that an image can be used as the dstImage for vkCmdBlitImage. + /// + BlitDstBit = 0x00000800, + + /// + /// SampledImageFilterLinearBit specifies that if VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT is also set, an image view can be used with a sampler that has either of magFilter or minFilter set to VK_FILTER_LINEAR, or mipmapMode set to VK_SAMPLER_MIPMAP_MODE_LINEAR. If VK_FORMAT_FEATURE_2_BLIT_SRC_BIT is also set, an image can be used as the srcImage for vkCmdBlitImage with a filter of VK_FILTER_LINEAR. This bit must only be exposed for formats that also support the VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT or VK_FORMAT_FEATURE_2_BLIT_SRC_BIT. + If the format being queried is a depth/stencil format, this bit only specifies that the depth aspect (not the stencil aspect) of an image of this format supports linear filtering. Where depth comparison is supported it may: be linear filtered whether this bit is present or not, but where this bit is not present the filtered value may: be computed in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures. + /// + SampledImageFilterLinearBit = 0x00001000, + + /// + /// TransferSrcBit + /// + TransferSrcBit = 0x00004000, + + /// + /// TransferDstBit + /// + TransferDstBit = 0x00008000, + + /// + /// SampledImageFilterMinmaxBit + /// + SampledImageFilterMinmaxBit = 0x00010000, + + /// + /// MidpointChromaSamplesBit + /// + MidpointChromaSamplesBit = 0x00020000, + + /// + /// SampledImageYCbCrConversionLinearFilterBit + /// + SampledImageYCbCrConversionLinearFilterBit = 0x00040000, + + /// + /// SampledImageYCbCrConversionSeparateReconstructionFilterBit + /// + SampledImageYCbCrConversionSeparateReconstructionFilterBit = 0x00080000, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitBit + /// + SampledImageYCbCrConversionChromaReconstructionExplicitBit = 0x00100000, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitForceableBit + /// + SampledImageYCbCrConversionChromaReconstructionExplicitForceableBit = 0x00200000, + + /// + /// DisjointBit + /// + DisjointBit = 0x00400000, + + /// + /// CositedChromaSamplesBit + /// + CositedChromaSamplesBit = 0x00800000, + + /// + /// StorageReadWithoutFormatBit + /// + StorageReadWithoutFormatBit = 0x80000000, + + /// + /// StorageWriteWithoutFormatBit + /// + StorageWriteWithoutFormatBit = 0x100000000, + + /// + /// SampledImageDepthComparisonBit + /// + SampledImageDepthComparisonBit = 0x200000000, + + /// + /// SampledImageFilterCubicBit + /// + SampledImageFilterCubicBit = 0x00002000, + + /// + /// HostImageTransferBit + /// + HostImageTransferBit = 0x400000000000, + + /// + /// VideoDecodeOutputBitKHR + /// + VideoDecodeOutputBitKHR = 0x02000000, + + /// + /// VideoDecodeDpbBitKHR + /// + VideoDecodeDpbBitKHR = 0x04000000, + + /// + /// AccelerationStructureVertexBufferBitKHR + /// + AccelerationStructureVertexBufferBitKHR = 0x20000000, + + /// + /// FragmentDensityMapBitEXT + /// + FragmentDensityMapBitEXT = 0x01000000, + + /// + /// FragmentShadingRateAttachmentBitKHR + /// + FragmentShadingRateAttachmentBitKHR = 0x40000000, + + /// + /// HostImageTransferBitEXT + /// + HostImageTransferBitEXT = 0x400000000000, + + /// + /// VideoEncodeInputBitKHR + /// + VideoEncodeInputBitKHR = 0x08000000, + + /// + /// VideoEncodeDpbBitKHR + /// + VideoEncodeDpbBitKHR = 0x10000000, + + /// + /// BlockMatchingSxdBitQCOM + /// + BlockMatchingSxdBitQCOM = 0x100000000000, + + /// + /// SampledImageBitKHR + /// + SampledImageBitKHR = 0x00000001, + + /// + /// StorageImageBitKHR + /// + StorageImageBitKHR = 0x00000002, + + /// + /// StorageImageAtomicBitKHR + /// + StorageImageAtomicBitKHR = 0x00000004, + + /// + /// UniformTexelBufferBitKHR + /// + UniformTexelBufferBitKHR = 0x00000008, + + /// + /// StorageTexelBufferBitKHR + /// + StorageTexelBufferBitKHR = 0x00000010, + + /// + /// StorageTexelBufferAtomicBitKHR + /// + StorageTexelBufferAtomicBitKHR = 0x00000020, + + /// + /// VertexBufferBitKHR + /// + VertexBufferBitKHR = 0x00000040, + + /// + /// ColorAttachmentBitKHR + /// + ColorAttachmentBitKHR = 0x00000080, + + /// + /// ColorAttachmentBlendBitKHR + /// + ColorAttachmentBlendBitKHR = 0x00000100, + + /// + /// DepthStencilAttachmentBitKHR + /// + DepthStencilAttachmentBitKHR = 0x00000200, + + /// + /// BlitSrcBitKHR + /// + BlitSrcBitKHR = 0x00000400, + + /// + /// BlitDstBitKHR + /// + BlitDstBitKHR = 0x00000800, + + /// + /// SampledImageFilterLinearBitKHR + /// + SampledImageFilterLinearBitKHR = 0x00001000, + + /// + /// TransferSrcBitKHR + /// + TransferSrcBitKHR = 0x00004000, + + /// + /// TransferDstBitKHR + /// + TransferDstBitKHR = 0x00008000, + + /// + /// MidpointChromaSamplesBitKHR + /// + MidpointChromaSamplesBitKHR = 0x00020000, + + /// + /// SampledImageYCbCrConversionLinearFilterBitKHR + /// + SampledImageYCbCrConversionLinearFilterBitKHR = 0x00040000, + + /// + /// SampledImageYCbCrConversionSeparateReconstructionFilterBitKHR + /// + SampledImageYCbCrConversionSeparateReconstructionFilterBitKHR = 0x00080000, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitBitKHR + /// + SampledImageYCbCrConversionChromaReconstructionExplicitBitKHR = 0x00100000, + + /// + /// SampledImageYCbCrConversionChromaReconstructionExplicitForceableBitKHR + /// + SampledImageYCbCrConversionChromaReconstructionExplicitForceableBitKHR = 0x00200000, + + /// + /// DisjointBitKHR + /// + DisjointBitKHR = 0x00400000, + + /// + /// CositedChromaSamplesBitKHR + /// + CositedChromaSamplesBitKHR = 0x00800000, + + /// + /// StorageReadWithoutFormatBitKHR + /// + StorageReadWithoutFormatBitKHR = 0x80000000, + + /// + /// StorageWriteWithoutFormatBitKHR + /// + StorageWriteWithoutFormatBitKHR = 0x100000000, + + /// + /// SampledImageDepthComparisonBitKHR + /// + SampledImageDepthComparisonBitKHR = 0x200000000, + + /// + /// SampledImageFilterMinmaxBitKHR + /// + SampledImageFilterMinmaxBitKHR = 0x00010000, + + /// + /// SampledImageFilterCubicBitEXT + /// + SampledImageFilterCubicBitEXT = 0x00002000, + + /// + /// AccelerationStructureRadiusBufferBitNV + /// + AccelerationStructureRadiusBufferBitNV = 0x8000000000000, + + /// + /// LinearColorAttachmentBitNV + /// + LinearColorAttachmentBitNV = 0x4000000000, + + /// + /// WeightImageBitQCOM + /// + WeightImageBitQCOM = 0x400000000, + + /// + /// WeightSampledImageBitQCOM + /// + WeightSampledImageBitQCOM = 0x800000000, + + /// + /// BlockMatchingBitQCOM + /// + BlockMatchingBitQCOM = 0x1000000000, + + /// + /// BoxFilterSampledBitQCOM + /// + BoxFilterSampledBitQCOM = 0x2000000000, + + /// + /// TensorShaderBitARM + /// + TensorShaderBitARM = 0x8000000000, + + /// + /// TensorImageAliasingBitARM + /// + TensorImageAliasingBitARM = 0x80000000000, + + /// + /// OpticalFlowImageBitNV + /// + OpticalFlowImageBitNV = 0x10000000000, + + /// + /// OpticalFlowVectorBitNV + /// + OpticalFlowVectorBitNV = 0x20000000000, + + /// + /// OpticalFlowCostBitNV + /// + OpticalFlowCostBitNV = 0x40000000000, + + /// + /// TensorDataGraphBitARM + /// + TensorDataGraphBitARM = 0x1000000000000, + + /// + /// CopyImageIndirectDstBitKHR + /// + CopyImageIndirectDstBitKHR = 0x800000000000000, + + /// + /// VideoEncodeQuantizationDeltaMapBitKHR + /// + VideoEncodeQuantizationDeltaMapBitKHR = 0x2000000000000, + + /// + /// VideoEncodeEmphasisMapBitKHR + /// + VideoEncodeEmphasisMapBitKHR = 0x4000000000000, + + /// + /// SampledImageFilterLinear2DBitIMG + /// + SampledImageFilterLinear2DBitIMG = 0x200000000000, + + /// + /// DepthCopyOnComputeQueueBitKHR + /// + DepthCopyOnComputeQueueBitKHR = 0x10000000000000, + + /// + /// DepthCopyOnTransferQueueBitKHR + /// + DepthCopyOnTransferQueueBitKHR = 0x20000000000000, + + /// + /// StencilCopyOnComputeQueueBitKHR + /// + StencilCopyOnComputeQueueBitKHR = 0x40000000000000, + + /// + /// StencilCopyOnTransferQueueBitKHR + /// + StencilCopyOnTransferQueueBitKHR = 0x80000000000000, + + /// + /// DataGraphOpticalFlowImageBitARM + /// + DataGraphOpticalFlowImageBitARM = 0x100000000000000, + + /// + /// DataGraphOpticalFlowVectorBitARM + /// + DataGraphOpticalFlowVectorBitARM = 0x200000000000000, + + /// + /// DataGraphOpticalFlowCostBitARM + /// + DataGraphOpticalFlowCostBitARM = 0x400000000000000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateCombinerOpKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateCombinerOpKHR.gen.cs new file mode 100644 index 0000000..b938c56 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateCombinerOpKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFragmentShadingRateCombinerOpKHR - Control how fragment shading rates are combined + /// + /// + /// + /// The equation used for each combiner operation is defined by + /// VkFragmentShadingRateCombinerOpKHR: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// typedef enum VkFragmentShadingRateCombinerOpKHR { + /// VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0, + /// VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1, + /// VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2, + /// VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3, + /// VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4, + /// } VkFragmentShadingRateCombinerOpKHR; + /// + /// + public enum VkFragmentShadingRateCombinerOpKHR : int + { + /// + /// KeepKHR specifies a combiner operation of combine(A~xy~,B~xy~) = A~xy~. + /// + KeepKHR = 0, + + /// + /// ReplaceKHR specifies a combiner operation of combine(A~xy~,B~xy~) = B~xy~. + /// + ReplaceKHR = 1, + + /// + /// MinKHR specifies a combiner operation of combine(A~xy~,B~xy~) = min(A~xy~,B~xy~). + /// + MinKHR = 2, + + /// + /// MaxKHR specifies a combiner operation of combine(A~xy~,B~xy~) = max(A~xy~,B~xy~). + /// + MaxKHR = 3, + + /// + /// MulKHR specifies a combiner operation of combine(A~xy~,B~xy~) = A~xy~*B~xy~. where combine(A~xy~,B~xy~) is the combine operation, and A~xy~ and B~xy~ are the inputs to the operation. If fragmentShadingRateStrictMultiplyCombiner^ is VK_FALSE, using VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR with values of 1 for both A and B in the same dimension results in the value 2 being produced for that dimension. See the definition of fragmentShadingRateStrictMultiplyCombiner^ for more information. These operations are performed in a component-wise fashion. + /// + MulKHR = 4, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateNV.gen.cs new file mode 100644 index 0000000..5179704 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateNV.gen.cs @@ -0,0 +1,97 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFragmentShadingRateNV - Enumeration with fragment shading rates + /// + /// + /// + /// If the fragmentShadingRateEnums^ + /// feature is enabled, fragment shading rates may be specified using the + /// VkFragmentShadingRateNV enumerated type defined as: + /// + /// + /// // Provided by VK_NV_fragment_shading_rate_enums + /// typedef enum VkFragmentShadingRateNV { + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0, + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1, + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4, + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5, + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6, + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9, + /// VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10, + /// VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11, + /// VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12, + /// VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13, + /// VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14, + /// VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15, + /// } VkFragmentShadingRateNV; + /// + /// + public enum VkFragmentShadingRateNV : int + { + /// + /// _1InvocationPerPixelNV specifies a fragment size of 1x1 pixels. + /// + _1InvocationPerPixelNV = 0, + + /// + /// _1InvocationPer1X2PixelsNV specifies a fragment size of 1x2 pixels. + /// + _1InvocationPer1X2PixelsNV = 1, + + /// + /// _1InvocationPer2X1PixelsNV specifies a fragment size of 2x1 pixels. + /// + _1InvocationPer2X1PixelsNV = 4, + + /// + /// _1InvocationPer2X2PixelsNV specifies a fragment size of 2x2 pixels. + /// + _1InvocationPer2X2PixelsNV = 5, + + /// + /// _1InvocationPer2X4PixelsNV specifies a fragment size of 2x4 pixels. + /// + _1InvocationPer2X4PixelsNV = 6, + + /// + /// _1InvocationPer4X2PixelsNV specifies a fragment size of 4x2 pixels. + /// + _1InvocationPer4X2PixelsNV = 9, + + /// + /// _1InvocationPer4X4PixelsNV specifies a fragment size of 4x4 pixels. + /// + _1InvocationPer4X4PixelsNV = 10, + + /// + /// _2InvocationsPerPixelNV specifies a fragment size of 1x1 pixels, with two fragment shader invocations per fragment. + /// + _2InvocationsPerPixelNV = 11, + + /// + /// _4InvocationsPerPixelNV specifies a fragment size of 1x1 pixels, with four fragment shader invocations per fragment. + /// + _4InvocationsPerPixelNV = 12, + + /// + /// _8InvocationsPerPixelNV specifies a fragment size of 1x1 pixels, with eight fragment shader invocations per fragment. + /// + _8InvocationsPerPixelNV = 13, + + /// + /// _16InvocationsPerPixelNV specifies a fragment size of 1x1 pixels, with sixteen fragment shader invocations per fragment. + /// + _16InvocationsPerPixelNV = 14, + + /// + /// NoInvocationsNV specifies that any portions of a primitive that use that shading rate should be discarded without invoking any fragment shader. To use the shading rates VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, and VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV as a pipeline, primitive, or attachment shading rate, the supersampleFragmentShadingRates^ feature must be enabled. To use the shading rate VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV as a pipeline, primitive, or attachment shading rate, the noInvocationFragmentShadingRates^ feature must be enabled. + /// + NoInvocationsNV = 15, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateTypeNV.gen.cs new file mode 100644 index 0000000..71be312 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFragmentShadingRateTypeNV.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFragmentShadingRateTypeNV - Enumeration with fragment shading rate types + /// + /// + /// + /// The VkFragmentShadingRateTypeNV enumerated type specifies whether a + /// graphics pipeline gets its pipeline fragment shading rates and combiners + /// from the VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure + /// or the VkPipelineFragmentShadingRateStateCreateInfoKHR structure. + /// + /// + /// // Provided by VK_NV_fragment_shading_rate_enums + /// typedef enum VkFragmentShadingRateTypeNV { + /// VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0, + /// VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1, + /// } VkFragmentShadingRateTypeNV; + /// + /// + public enum VkFragmentShadingRateTypeNV : int + { + /// + /// FragmentSizeNV specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the VkPipelineFragmentShadingRateStateCreateInfoKHR structure and that any state specified by the VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure should be ignored. + /// + FragmentSizeNV = 0, + + /// + /// EnumsNV specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure and that any state specified by the VkPipelineFragmentShadingRateStateCreateInfoKHR structure should be ignored. + /// + EnumsNV = 1, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFrameBoundaryFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFrameBoundaryFlagsEXT.gen.cs new file mode 100644 index 0000000..b7bc9b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFrameBoundaryFlagsEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFrameBoundaryFlagBitsEXT - Bitmask specifying whether a queue submission is the last one for a given frame + /// + /// + /// + /// The bit which can be set in VkFrameBoundaryEXT::flags is: + /// + /// + /// // Provided by VK_EXT_frame_boundary + /// typedef enum VkFrameBoundaryFlagBitsEXT { + /// VK_FRAME_BOUNDARY_FRAME_END_BIT_EXT = 0x00000001, + /// } VkFrameBoundaryFlagBitsEXT; + /// + /// + [Flags] + public enum VkFrameBoundaryFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// FrameEndBitEXT specifies that this queue submission is the last one for this frame, i.e. once this queue submission has terminated, then the work for this frame is completed. + /// + FrameEndBitEXT = 0x00000001, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFramebufferCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFramebufferCreateFlags.gen.cs new file mode 100644 index 0000000..f51003d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFramebufferCreateFlags.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFramebufferCreateFlagBits - Bitmask specifying framebuffer properties + /// + /// + /// + /// Bits which can be set in VkFramebufferCreateInfo::flags, + /// specifying options for framebuffers, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkFramebufferCreateFlagBits { + /// // Provided by VK_VERSION_1_2 + /// VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT = 0x00000001, + /// // Provided by VK_KHR_imageless_framebuffer + /// VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, + /// } VkFramebufferCreateFlagBits; + /// + /// + [Flags] + public enum VkFramebufferCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// ImagelessBit + /// + ImagelessBit = 0x00000001, + + /// + /// ImagelessBitKHR + /// + ImagelessBitKHR = ImagelessBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkFrontFace.gen.cs b/Brutal.Vulkan/Generated/Enums/VkFrontFace.gen.cs new file mode 100644 index 0000000..25ffa31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkFrontFace.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFrontFace - Interpret polygon front-facing orientation + /// + /// + /// + /// The first step of polygon rasterization is to determine whether the triangle + /// is _back-facing_ or _front-facing_. + /// This determination is made based on the sign of the (clipped or unclipped) + /// polygon's area computed in framebuffer coordinates. + /// One way to compute this area is: + /// + /// + /// [latexmath] + /// ++++ + /// a = -{1 \over 2}\sum_{i=0}^{n-1} + /// x_f^i y_f^{i \oplus 1} - + /// x_f^{i \oplus 1} y_f^i + /// ++++ + /// + /// + /// where latexmath:[x_f^i] and latexmath:[y_f^i] are the x and y + /// framebuffer coordinates of the [eq]##i##th vertex of the n-vertex + /// polygon (vertices are numbered starting at zero for the purposes of this + /// computation) and i {oplus} 1 is (i {plus} 1) mod n. + /// + /// + /// The interpretation of the sign of a is determined by the + /// VkPipelineRasterizationStateCreateInfo::frontFace property of + /// the currently active pipeline. + /// Possible values are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkFrontFace { + /// VK_FRONT_FACE_COUNTER_CLOCKWISE = 0, + /// VK_FRONT_FACE_CLOCKWISE = 1, + /// } VkFrontFace; + /// + /// + public enum VkFrontFace : int + { + /// + /// CounterClockwise specifies that a triangle with positive area is considered front-facing. + /// + CounterClockwise = 0, + + /// + /// Clockwise specifies that a triangle with negative area is considered front-facing. Any triangle which is not front-facing is back-facing, including zero-area triangles. + /// + Clockwise = 1, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGeometryFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGeometryFlagsKHR.gen.cs new file mode 100644 index 0000000..d68895b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGeometryFlagsKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryFlagBitsKHR - Bitmask specifying additional parameters for a geometry + /// + /// + /// + /// :refpage: VkGeometryFlagBitsKHR + /// + /// + /// Bits specifying additional parameters for geometries in acceleration + /// structure builds, are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkGeometryFlagBitsKHR { + /// VK_GEOMETRY_OPAQUE_BIT_KHR = 0x00000001, + /// VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 0x00000002, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_OPAQUE_BIT_NV = VK_GEOMETRY_OPAQUE_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR, + /// } VkGeometryFlagBitsKHR; + /// + /// + [Flags] + public enum VkGeometryFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// OpaqueBitKHR specifies that this geometry does not invoke the any-hit shaders even if present in a hit group. + /// + OpaqueBitKHR = 0x00000001, + + /// + /// NoDuplicateAnyHitInvocationBitKHR specifies that the implementation must only call the any-hit shader a single time for each primitive in this geometry. If this bit is absent an implementation may: invoke the any-hit shader more than once for this geometry. + /// + NoDuplicateAnyHitInvocationBitKHR = 0x00000002, + + /// + /// OpaqueBitNV + /// + OpaqueBitNV = OpaqueBitKHR, + + /// + /// NoDuplicateAnyHitInvocationBitNV + /// + NoDuplicateAnyHitInvocationBitNV = NoDuplicateAnyHitInvocationBitKHR, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGeometryInstanceFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGeometryInstanceFlagsKHR.gen.cs new file mode 100644 index 0000000..1c7434a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGeometryInstanceFlagsKHR.gen.cs @@ -0,0 +1,133 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryInstanceFlagBitsKHR - Instance flag bits + /// + /// + /// + /// :refpage: VkGeometryInstanceFlagBitsKHR + /// + /// + /// Possible values of flags in the instance modifying the behavior of + /// that instance are: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkGeometryInstanceFlagBitsKHR { + /// VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001, + /// VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 0x00000002, + /// VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004, + /// VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008, + /// // Provided by VK_KHR_opacity_micromap + /// VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR = 0x00000010, + /// // Provided by VK_KHR_opacity_micromap + /// VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR = 0x00000020, + /// VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// // VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT is a legacy alias + /// VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT, + /// // Provided by VK_EXT_opacity_micromap + /// VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// // VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT is a legacy alias + /// VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT, + /// } VkGeometryInstanceFlagBitsKHR; + /// + /// + [Flags] + public enum VkGeometryInstanceFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// TriangleFacingCullDisableBitKHR disables face culling for this instance. + /// + TriangleFacingCullDisableBitKHR = 0x00000001, + + /// + /// TriangleFlipFacingBitKHR specifies that the facing determination^ for geometry in this instance is inverted. Because the facing is determined in object space, an instance transform does not change the winding, but a geometry transform does. + /// + TriangleFlipFacingBitKHR = 0x00000002, + + /// + /// ForceOpaqueBitKHR causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were specified on all geometries referenced by this instance. This behavior can be overridden by the SPIR-V NoOpaqueKHR ray flag. + /// + ForceOpaqueBitKHR = 0x00000004, + + /// + /// ForceNoOpaqueBitKHR causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were not specified on all geometries referenced by this instance. This behavior can be overridden by the SPIR-V OpaqueKHR ray flag. VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR and VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR must not be used in the same flag. + /// + ForceNoOpaqueBitKHR = 0x00000008, + + /// + /// ForceOpacityMicromap2StateBitKHR + /// + ForceOpacityMicromap2StateBitKHR = 0x00000010, + + /// + /// DisableOpacityMicromapsBitKHR + /// + DisableOpacityMicromapsBitKHR = 0x00000020, + + /// + /// TriangleFrontCounterclockwiseBitKHR + /// + TriangleFrontCounterclockwiseBitKHR = TriangleFlipFacingBitKHR, + + /// + /// TriangleCullDisableBitNV + /// + TriangleCullDisableBitNV = TriangleFacingCullDisableBitKHR, + + /// + /// TriangleFrontCounterclockwiseBitNV + /// + TriangleFrontCounterclockwiseBitNV = TriangleFrontCounterclockwiseBitKHR, + + /// + /// ForceOpaqueBitNV + /// + ForceOpaqueBitNV = ForceOpaqueBitKHR, + + /// + /// ForceNoOpaqueBitNV + /// + ForceNoOpaqueBitNV = ForceNoOpaqueBitKHR, + + /// + /// ForceOpacityMicromap2StateBitEXT + /// + ForceOpacityMicromap2StateBitEXT = ForceOpacityMicromap2StateBitKHR, + + /// + /// ForceOpacityMicromap2StateEXT + /// + ForceOpacityMicromap2StateEXT = ForceOpacityMicromap2StateBitEXT, + + /// + /// DisableOpacityMicromapsBitEXT + /// + DisableOpacityMicromapsBitEXT = DisableOpacityMicromapsBitKHR, + + /// + /// DisableOpacityMicromapsEXT + /// + DisableOpacityMicromapsEXT = DisableOpacityMicromapsBitEXT, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGeometryTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGeometryTypeKHR.gen.cs new file mode 100644 index 0000000..3714c49 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGeometryTypeKHR.gen.cs @@ -0,0 +1,88 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryTypeKHR - Enum specifying which type of geometry is provided + /// + /// + /// + /// :refpage: VkGeometryTypeKHR + /// + /// + /// Geometry types are specified by VkGeometryTypeKHR, which takes values: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef enum VkGeometryTypeKHR { + /// VK_GEOMETRY_TYPE_TRIANGLES_KHR = 0, + /// VK_GEOMETRY_TYPE_AABBS_KHR = 1, + /// VK_GEOMETRY_TYPE_INSTANCES_KHR = 2, + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// VK_GEOMETRY_TYPE_SPHERES_NV = 1000429004, + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV = 1000429005, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_dense_geometry_format + /// VK_GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX = 1000478000, + /// #endif + /// // Provided by VK_KHR_opacity_micromap + /// VK_GEOMETRY_TYPE_MICROMAP_KHR = 1000623000, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_TYPE_TRIANGLES_NV = VK_GEOMETRY_TYPE_TRIANGLES_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_GEOMETRY_TYPE_AABBS_NV = VK_GEOMETRY_TYPE_AABBS_KHR, + /// } VkGeometryTypeKHR; + /// + /// + public enum VkGeometryTypeKHR : int + { + /// + /// TrianglesKHR specifies a geometry type consisting of triangles^. + /// + TrianglesKHR = 0, + + /// + /// AabbsKHR specifies a geometry type consisting of axis-aligned bounding boxes^. + /// + AabbsKHR = 1, + + /// + /// InstancesKHR + /// + InstancesKHR = 2, + + /// + /// SpheresNV + /// + SpheresNV = 1000429004, + + /// + /// LinearSweptSpheresNV + /// + LinearSweptSpheresNV = 1000429005, + + /// + /// DenseGeometryFormatTrianglesAMDX + /// + DenseGeometryFormatTrianglesAMDX = 1000478000, + + /// + /// MicromapKHR + /// + MicromapKHR = 1000623000, + + /// + /// TrianglesNV + /// + TrianglesNV = TrianglesKHR, + + /// + /// AabbsNV + /// + AabbsNV = AabbsKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGpaDeviceClockModeAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGpaDeviceClockModeAMD.gen.cs new file mode 100644 index 0000000..a0f5f41 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGpaDeviceClockModeAMD.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaDeviceClockModeAMD - Enum providing the clock mode or query + /// + /// + /// + /// Values which can be set in VkGpaDeviceClockModeAMD are: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef enum VkGpaDeviceClockModeAMD { + /// VK_GPA_DEVICE_CLOCK_MODE_DEFAULT_AMD = 0, + /// VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD = 1, + /// VK_GPA_DEVICE_CLOCK_MODE_PROFILING_AMD = 2, + /// VK_GPA_DEVICE_CLOCK_MODE_MIN_MEMORY_AMD = 3, + /// VK_GPA_DEVICE_CLOCK_MODE_MIN_ENGINE_AMD = 4, + /// VK_GPA_DEVICE_CLOCK_MODE_PEAK_AMD = 5, + /// } VkGpaDeviceClockModeAMD; + /// + /// + public enum VkGpaDeviceClockModeAMD : int + { + /// + /// DefaultAMD specifies that device clocks and other power settings are restored to their default values. + /// + DefaultAMD = 0, + + /// + /// QueryAMD specifies that the current clock values should be queried, with no new values set. + /// + QueryAMD = 1, + + /// + /// ProfilingAMD specifies that clocks are set to a constant amount which is known to be power and thermal sustainable. The engine/memory clock ratio will be kept the same as much as possible. + /// + ProfilingAMD = 2, + + /// + /// MinMemoryAMD specifies that the memory clock is set to the lowest available level and the engine clock is set to a thermal and power sustainable level. + /// + MinMemoryAMD = 3, + + /// + /// MinEngineAMD specifies that the engine clock is set to the lowest available level and the memory clock is set to a thermal and power sustainable level. + /// + MinEngineAMD = 4, + + /// + /// PeakAMD specifies that the clocks set to maximum when possible and fans set to maximum. Under power and thermal constraints device will clock down. + /// + PeakAMD = 5, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGpaPerfBlockAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGpaPerfBlockAMD.gen.cs new file mode 100644 index 0000000..cfb812c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGpaPerfBlockAMD.gen.cs @@ -0,0 +1,377 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaPerfBlockAMD - Enum providing performance counter types + /// + /// + /// + /// Values which can be set in VkGpaPerfCounterAMD::blockType are: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef enum VkGpaPerfBlockAMD { + /// VK_GPA_PERF_BLOCK_CPF_AMD = 0, + /// VK_GPA_PERF_BLOCK_IA_AMD = 1, + /// VK_GPA_PERF_BLOCK_VGT_AMD = 2, + /// VK_GPA_PERF_BLOCK_PA_AMD = 3, + /// VK_GPA_PERF_BLOCK_SC_AMD = 4, + /// VK_GPA_PERF_BLOCK_SPI_AMD = 5, + /// VK_GPA_PERF_BLOCK_SQ_AMD = 6, + /// VK_GPA_PERF_BLOCK_SX_AMD = 7, + /// VK_GPA_PERF_BLOCK_TA_AMD = 8, + /// VK_GPA_PERF_BLOCK_TD_AMD = 9, + /// VK_GPA_PERF_BLOCK_TCP_AMD = 10, + /// VK_GPA_PERF_BLOCK_TCC_AMD = 11, + /// VK_GPA_PERF_BLOCK_TCA_AMD = 12, + /// VK_GPA_PERF_BLOCK_DB_AMD = 13, + /// VK_GPA_PERF_BLOCK_CB_AMD = 14, + /// VK_GPA_PERF_BLOCK_GDS_AMD = 15, + /// VK_GPA_PERF_BLOCK_SRBM_AMD = 16, + /// VK_GPA_PERF_BLOCK_GRBM_AMD = 17, + /// VK_GPA_PERF_BLOCK_GRBM_SE_AMD = 18, + /// VK_GPA_PERF_BLOCK_RLC_AMD = 19, + /// VK_GPA_PERF_BLOCK_DMA_AMD = 20, + /// VK_GPA_PERF_BLOCK_MC_AMD = 21, + /// VK_GPA_PERF_BLOCK_CPG_AMD = 22, + /// VK_GPA_PERF_BLOCK_CPC_AMD = 23, + /// VK_GPA_PERF_BLOCK_WD_AMD = 24, + /// VK_GPA_PERF_BLOCK_TCS_AMD = 25, + /// VK_GPA_PERF_BLOCK_ATC_AMD = 26, + /// VK_GPA_PERF_BLOCK_ATC_L2_AMD = 27, + /// VK_GPA_PERF_BLOCK_MC_VM_L2_AMD = 28, + /// VK_GPA_PERF_BLOCK_EA_AMD = 29, + /// VK_GPA_PERF_BLOCK_RPB_AMD = 30, + /// VK_GPA_PERF_BLOCK_RMI_AMD = 31, + /// VK_GPA_PERF_BLOCK_UMCCH_AMD = 32, + /// VK_GPA_PERF_BLOCK_GE_AMD = 33, + /// VK_GPA_PERF_BLOCK_GL1A_AMD = 34, + /// VK_GPA_PERF_BLOCK_GL1C_AMD = 35, + /// VK_GPA_PERF_BLOCK_GL1CG_AMD = 36, + /// VK_GPA_PERF_BLOCK_GL2A_AMD = 37, + /// VK_GPA_PERF_BLOCK_GL2C_AMD = 38, + /// VK_GPA_PERF_BLOCK_CHA_AMD = 39, + /// VK_GPA_PERF_BLOCK_CHC_AMD = 40, + /// VK_GPA_PERF_BLOCK_CHCG_AMD = 41, + /// VK_GPA_PERF_BLOCK_GUS_AMD = 42, + /// VK_GPA_PERF_BLOCK_GCR_AMD = 43, + /// VK_GPA_PERF_BLOCK_PH_AMD = 44, + /// VK_GPA_PERF_BLOCK_UTCL1_AMD = 45, + /// VK_GPA_PERF_BLOCK_GE_DIST_AMD = 46, + /// VK_GPA_PERF_BLOCK_GE_SE_AMD = 47, + /// VK_GPA_PERF_BLOCK_DF_MALL_AMD = 48, + /// VK_GPA_PERF_BLOCK_SQ_WGP_AMD = 49, + /// VK_GPA_PERF_BLOCK_PC_AMD = 50, + /// VK_GPA_PERF_BLOCK_GL1XA_AMD = 51, + /// VK_GPA_PERF_BLOCK_GL1XC_AMD = 52, + /// VK_GPA_PERF_BLOCK_WGS_AMD = 53, + /// VK_GPA_PERF_BLOCK_EACPWD_AMD = 54, + /// VK_GPA_PERF_BLOCK_EASE_AMD = 55, + /// VK_GPA_PERF_BLOCK_RLCUSER_AMD = 56, + /// VK_GPA_PERF_BLOCK_GE1_AMD = VK_GPA_PERF_BLOCK_GE_AMD, + /// VK_GPA_PERF_BLOCK_RLCLOCAL_AMD = VK_GPA_PERF_BLOCK_RLCUSER_AMD, + /// } VkGpaPerfBlockAMD; + /// + /// + public enum VkGpaPerfBlockAMD : int + { + /// + /// CpfAMD + /// + CpfAMD = 0, + + /// + /// IaAMD + /// + IaAMD = 1, + + /// + /// VgtAMD + /// + VgtAMD = 2, + + /// + /// PaAMD + /// + PaAMD = 3, + + /// + /// ScAMD + /// + ScAMD = 4, + + /// + /// SpiAMD + /// + SpiAMD = 5, + + /// + /// SqAMD + /// + SqAMD = 6, + + /// + /// SxAMD + /// + SxAMD = 7, + + /// + /// TaAMD + /// + TaAMD = 8, + + /// + /// TdAMD + /// + TdAMD = 9, + + /// + /// TcpAMD + /// + TcpAMD = 10, + + /// + /// TccAMD + /// + TccAMD = 11, + + /// + /// TcaAMD + /// + TcaAMD = 12, + + /// + /// DbAMD + /// + DbAMD = 13, + + /// + /// CbAMD + /// + CbAMD = 14, + + /// + /// GdsAMD + /// + GdsAMD = 15, + + /// + /// SrbmAMD + /// + SrbmAMD = 16, + + /// + /// GrbmAMD + /// + GrbmAMD = 17, + + /// + /// GrbmSeAMD + /// + GrbmSeAMD = 18, + + /// + /// RlcAMD + /// + RlcAMD = 19, + + /// + /// DmaAMD + /// + DmaAMD = 20, + + /// + /// McAMD + /// + McAMD = 21, + + /// + /// CpgAMD + /// + CpgAMD = 22, + + /// + /// CpcAMD + /// + CpcAMD = 23, + + /// + /// WdAMD + /// + WdAMD = 24, + + /// + /// TcsAMD + /// + TcsAMD = 25, + + /// + /// AtcAMD + /// + AtcAMD = 26, + + /// + /// AtcL2AMD + /// + AtcL2AMD = 27, + + /// + /// McVmL2AMD + /// + McVmL2AMD = 28, + + /// + /// EaAMD + /// + EaAMD = 29, + + /// + /// RpbAMD + /// + RpbAMD = 30, + + /// + /// RmiAMD + /// + RmiAMD = 31, + + /// + /// UmcchAMD + /// + UmcchAMD = 32, + + /// + /// GeAMD + /// + GeAMD = 33, + + /// + /// Gl1AAMD + /// + Gl1AAMD = 34, + + /// + /// Gl1CAMD + /// + Gl1CAMD = 35, + + /// + /// Gl1CgAMD + /// + Gl1CgAMD = 36, + + /// + /// Gl2AAMD + /// + Gl2AAMD = 37, + + /// + /// Gl2CAMD + /// + Gl2CAMD = 38, + + /// + /// ChaAMD + /// + ChaAMD = 39, + + /// + /// ChcAMD + /// + ChcAMD = 40, + + /// + /// ChcgAMD + /// + ChcgAMD = 41, + + /// + /// GusAMD + /// + GusAMD = 42, + + /// + /// GcrAMD + /// + GcrAMD = 43, + + /// + /// PhAMD + /// + PhAMD = 44, + + /// + /// Utcl1AMD + /// + Utcl1AMD = 45, + + /// + /// GeDistAMD + /// + GeDistAMD = 46, + + /// + /// GeSeAMD + /// + GeSeAMD = 47, + + /// + /// DfMallAMD + /// + DfMallAMD = 48, + + /// + /// SqWgpAMD + /// + SqWgpAMD = 49, + + /// + /// PcAMD + /// + PcAMD = 50, + + /// + /// Gl1XaAMD + /// + Gl1XaAMD = 51, + + /// + /// Gl1XcAMD + /// + Gl1XcAMD = 52, + + /// + /// WgsAMD + /// + WgsAMD = 53, + + /// + /// EacpwdAMD + /// + EacpwdAMD = 54, + + /// + /// EaseAMD + /// + EaseAMD = 55, + + /// + /// RlcuserAMD + /// + RlcuserAMD = 56, + + /// + /// Ge1AMD + /// + Ge1AMD = GeAMD, + + /// + /// RlclocalAMD + /// + RlclocalAMD = RlcuserAMD, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGpaSampleTypeAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGpaSampleTypeAMD.gen.cs new file mode 100644 index 0000000..89c1955 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGpaSampleTypeAMD.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaSampleTypeAMD - Enum providing the sample type + /// + /// + /// + /// Values which can be set in VkGpaSampleBeginInfoAMD::sampleType + /// are: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef enum VkGpaSampleTypeAMD { + /// VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD = 0, + /// VK_GPA_SAMPLE_TYPE_TRACE_AMD = 1, + /// VK_GPA_SAMPLE_TYPE_TIMING_AMD = 2, + /// } VkGpaSampleTypeAMD; + /// + /// + public enum VkGpaSampleTypeAMD : int + { + /// + /// CumulativeAMD specifies that one 64-bit result will be returned per global performance counter, representing the cumulative delta for that counter over the sample period. Cumulative samples must begin and end in the same command buffer. + /// + CumulativeAMD = 0, + + /// + /// TraceAMD specifies that a buffer will be filled with SQTT results data in RGP file format, and/or streaming performance monitor data. Trace samples may: span multiple command buffers. + /// + TraceAMD = 1, + + /// + /// TimingAMD specifies that two 64-bit results will be recorded to gather timestamp data. + /// + TimingAMD = 2, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGpaSqShaderStageFlagsAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGpaSqShaderStageFlagsAMD.gen.cs new file mode 100644 index 0000000..2ad9b77 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGpaSqShaderStageFlagsAMD.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaSqShaderStageFlagBitsAMD - Bitmask specifying GPU shader stage to sample + /// + /// + /// + /// Bits which can be set to control which GPU shader stages are sampled, are: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef enum VkGpaSqShaderStageFlagBitsAMD { + /// VK_GPA_SQ_SHADER_STAGE_PS_BIT_AMD = 0x00000001, + /// VK_GPA_SQ_SHADER_STAGE_VS_BIT_AMD = 0x00000002, + /// VK_GPA_SQ_SHADER_STAGE_GS_BIT_AMD = 0x00000004, + /// VK_GPA_SQ_SHADER_STAGE_ES_BIT_AMD = 0x00000008, + /// VK_GPA_SQ_SHADER_STAGE_HS_BIT_AMD = 0x00000010, + /// VK_GPA_SQ_SHADER_STAGE_LS_BIT_AMD = 0x00000020, + /// VK_GPA_SQ_SHADER_STAGE_CS_BIT_AMD = 0x00000040, + /// } VkGpaSqShaderStageFlagBitsAMD; + /// + /// + [Flags] + public enum VkGpaSqShaderStageFlagsAMD : int + { + /// No flags set. + None = 0, + + /// + /// PsBitAMD specifies the pixel shader stage. + /// + PsBitAMD = 0x00000001, + + /// + /// VsBitAMD specifies the vertex shader stage. + /// + VsBitAMD = 0x00000002, + + /// + /// GsBitAMD specifies the geometry shader stage. + /// + GsBitAMD = 0x00000004, + + /// + /// EsBitAMD specifies the export shader stage. + /// + EsBitAMD = 0x00000008, + + /// + /// HsBitAMD specifies the hull shader stage. + /// + HsBitAMD = 0x00000010, + + /// + /// LsBitAMD specifies the local shader stage. + /// + LsBitAMD = 0x00000020, + + /// + /// CsBitAMD specifies the compute shader stage. + /// + CsBitAMD = 0x00000040, + + /// + /// FlagBitsMaxEnumAMD + /// + FlagBitsMaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkGraphicsPipelineLibraryFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkGraphicsPipelineLibraryFlagsEXT.gen.cs new file mode 100644 index 0000000..96b2f58 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkGraphicsPipelineLibraryFlagsEXT.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGraphicsPipelineLibraryFlagBitsEXT - Bitmask specifying the subset of a graphics pipeline to compile + /// + /// + /// + /// Possible values of the flags member of + /// VkGraphicsPipelineLibraryCreateInfoEXT, specifying the subsets of a + /// graphics pipeline to compile are: + /// + /// + /// // Provided by VK_EXT_graphics_pipeline_library + /// typedef enum VkGraphicsPipelineLibraryFlagBitsEXT { + /// VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 0x00000001, + /// VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 0x00000002, + /// VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 0x00000004, + /// VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 0x00000008, + /// } VkGraphicsPipelineLibraryFlagBitsEXT; + /// + /// + [Flags] + public enum VkGraphicsPipelineLibraryFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// VertexInputInterfaceBitEXT specifies that a pipeline will include vertex input interface state^. + /// + VertexInputInterfaceBitEXT = 0x00000001, + + /// + /// PreRasterizationShadersBitEXT specifies that a pipeline will include pre-rasterization shader state^. + /// + PreRasterizationShadersBitEXT = 0x00000002, + + /// + /// FragmentShaderBitEXT specifies that a pipeline will include fragment shader state^. + /// + FragmentShaderBitEXT = 0x00000004, + + /// + /// FragmentOutputInterfaceBitEXT specifies that a pipeline will include fragment output interface state^. + /// + FragmentOutputInterfaceBitEXT = 0x00000008, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkHostImageCopyFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkHostImageCopyFlags.gen.cs new file mode 100644 index 0000000..71937e5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkHostImageCopyFlags.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHostImageCopyFlagBits - Bitmask specifying additional copy parameters + /// + /// + /// + /// Bits which can be set in VkCopyMemoryToImageInfo::flags, + /// VkCopyImageToMemoryInfo::flags, and + /// VkCopyImageToImageInfo::flags, specifying additional copy + /// parameters are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef enum VkHostImageCopyFlagBits { + /// VK_HOST_IMAGE_COPY_MEMCPY_BIT = 0x00000001, + /// // VK_HOST_IMAGE_COPY_MEMCPY is a legacy alias + /// VK_HOST_IMAGE_COPY_MEMCPY = VK_HOST_IMAGE_COPY_MEMCPY_BIT, + /// // Provided by VK_EXT_host_image_copy + /// VK_HOST_IMAGE_COPY_MEMCPY_BIT_EXT = VK_HOST_IMAGE_COPY_MEMCPY_BIT, + /// // Provided by VK_EXT_host_image_copy + /// // VK_HOST_IMAGE_COPY_MEMCPY_EXT is a legacy alias + /// VK_HOST_IMAGE_COPY_MEMCPY_EXT = VK_HOST_IMAGE_COPY_MEMCPY_BIT, + /// } VkHostImageCopyFlagBits; + /// + /// + [Flags] + public enum VkHostImageCopyFlags : int + { + /// No flags set. + None = 0, + + /// + /// MemcpyBit specifies that no memory layout swizzling is to be applied during data copy. For copies between memory and images, this flag indicates that image data in host memory is swizzled in exactly the same way as the image data on the device. Using this flag indicates that the implementations may: use a simple memory copy to transfer the data between the host memory and the device memory. The format of the swizzled data in host memory is platform dependent and is not defined in this specification. + /// + MemcpyBit = 0x00000001, + + /// + /// Memcpy + /// + Memcpy = MemcpyBit, + + /// + /// MemcpyBitEXT + /// + MemcpyBitEXT = MemcpyBit, + + /// + /// MemcpyEXT + /// + MemcpyEXT = MemcpyBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageAspectFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageAspectFlags.gen.cs new file mode 100644 index 0000000..081fb9b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageAspectFlags.gen.cs @@ -0,0 +1,133 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageAspectFlagBits - Bitmask specifying which aspects of an image are included in a view + /// + /// + /// + /// Bits which can be set in an aspect mask to specify aspects of an image for + /// purposes such as identifying a subresource, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageAspectFlagBits { + /// VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, + /// VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, + /// VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, + /// VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040, + /// // Provided by VK_VERSION_1_3 + /// VK_IMAGE_ASPECT_NONE = 0, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT, + /// // Provided by VK_KHR_maintenance4 + /// VK_IMAGE_ASPECT_NONE_KHR = VK_IMAGE_ASPECT_NONE, + /// } VkImageAspectFlagBits; + /// + /// + [Flags] + public enum VkImageAspectFlags : int + { + /// + /// ColorBit specifies the color aspect. + /// + ColorBit = 0x00000001, + + /// + /// DepthBit specifies the depth aspect. + /// + DepthBit = 0x00000002, + + /// + /// StencilBit specifies the stencil aspect. + /// + StencilBit = 0x00000004, + + /// + /// MetadataBit specifies the metadata aspect used for sparse resource^ operations. + /// + MetadataBit = 0x00000008, + + /// + /// Plane0Bit + /// + Plane0Bit = 0x00000010, + + /// + /// Plane1Bit + /// + Plane1Bit = 0x00000020, + + /// + /// Plane2Bit + /// + Plane2Bit = 0x00000040, + + /// + /// None + /// + None = 0, + + /// + /// MemoryPlane0BitEXT + /// + MemoryPlane0BitEXT = 0x00000080, + + /// + /// MemoryPlane1BitEXT + /// + MemoryPlane1BitEXT = 0x00000100, + + /// + /// MemoryPlane2BitEXT + /// + MemoryPlane2BitEXT = 0x00000200, + + /// + /// MemoryPlane3BitEXT + /// + MemoryPlane3BitEXT = 0x00000400, + + /// + /// Plane0BitKHR + /// + Plane0BitKHR = Plane0Bit, + + /// + /// Plane1BitKHR + /// + Plane1BitKHR = Plane1Bit, + + /// + /// Plane2BitKHR + /// + Plane2BitKHR = Plane2Bit, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageCompressionFixedRateFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageCompressionFixedRateFlagsEXT.gen.cs new file mode 100644 index 0000000..a2a5bab --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageCompressionFixedRateFlagsEXT.gen.cs @@ -0,0 +1,179 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCompressionFixedRateFlagBitsEXT - Bitmask specifying fixed rate image compression rates + /// + /// + /// + /// Bits which can be set in + /// VkImageCompressionControlEXT::pFixedRateFlags, specifying + /// allowed compression rates for an image plane, are: + /// + /// + /// // Provided by VK_EXT_image_compression_control + /// typedef enum VkImageCompressionFixedRateFlagBitsEXT { + /// VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 0x00000001, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 0x00000002, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 0x00000004, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 0x00000008, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 0x00000010, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 0x00000020, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 0x00000040, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 0x00000080, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 0x00000100, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 0x00000200, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 0x00000400, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 0x00000800, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 0x00001000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 0x00002000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 0x00004000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 0x00008000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 0x00010000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 0x00020000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 0x00040000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 0x00080000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 0x00100000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 0x00200000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 0x00400000, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 0x00800000, + /// } VkImageCompressionFixedRateFlagBitsEXT; + /// + /// + [Flags] + public enum VkImageCompressionFixedRateFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// NoneEXT specifies that fixed-rate compression must not be used. + /// + NoneEXT = 0, + + /// + /// _1BpcBitEXT specifies that fixed-rate compression with a bitrate of [1,2) bits per component may: be used. + /// + _1BpcBitEXT = 0x00000001, + + /// + /// _2BpcBitEXT specifies that fixed-rate compression with a bitrate of [2,3) bits per component may: be used. + /// + _2BpcBitEXT = 0x00000002, + + /// + /// _3BpcBitEXT specifies that fixed-rate compression with a bitrate of [3,4) bits per component may: be used. + /// + _3BpcBitEXT = 0x00000004, + + /// + /// _4BpcBitEXT specifies that fixed-rate compression with a bitrate of [4,5) bits per component may: be used. + /// + _4BpcBitEXT = 0x00000008, + + /// + /// _5BpcBitEXT specifies that fixed-rate compression with a bitrate of [5,6) bits per component may: be used. + /// + _5BpcBitEXT = 0x00000010, + + /// + /// _6BpcBitEXT specifies that fixed-rate compression with a bitrate of [6,7) bits per component may: be used. + /// + _6BpcBitEXT = 0x00000020, + + /// + /// _7BpcBitEXT specifies that fixed-rate compression with a bitrate of [7,8) bits per component may: be used. + /// + _7BpcBitEXT = 0x00000040, + + /// + /// _8BpcBitEXT specifies that fixed-rate compression with a bitrate of [8,9) bits per component may: be used. + /// + _8BpcBitEXT = 0x00000080, + + /// + /// _9BpcBitEXT specifies that fixed-rate compression with a bitrate of [9,10) bits per component may: be used. + /// + _9BpcBitEXT = 0x00000100, + + /// + /// _10BpcBitEXT specifies that fixed-rate compression with a bitrate of [10,11) bits per component may: be used. + /// + _10BpcBitEXT = 0x00000200, + + /// + /// _11BpcBitEXT specifies that fixed-rate compression with a bitrate of [11,12) bits per component may: be used. + /// + _11BpcBitEXT = 0x00000400, + + /// + /// _12BpcBitEXT specifies that fixed-rate compression with a bitrate of at least 12 bits per component may: be used. If the format has a different bit rate for different components, VkImageCompressionControlEXT::pFixedRateFlags describes the rate of the component with the largest number of bits assigned to it, scaled pro rata. For example, to request that a VK_FORMAT_A2R10G10B10_UNORM_PACK32 format be stored at a rate of 8 bits per pixel, use VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT (10 bits for the largest component, stored at quarter the original size, 2.5 bits, rounded down). If flags includes VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, and multiple bits are set in VkImageCompressionControlEXT::pFixedRateFlags for a plane, implementations should apply the lowest allowed bitrate that is supported. [NOTE] + /// + _12BpcBitEXT = 0x00000800, + + /// + /// _13BpcBitEXT + /// + _13BpcBitEXT = 0x00001000, + + /// + /// _14BpcBitEXT + /// + _14BpcBitEXT = 0x00002000, + + /// + /// _15BpcBitEXT + /// + _15BpcBitEXT = 0x00004000, + + /// + /// _16BpcBitEXT + /// + _16BpcBitEXT = 0x00008000, + + /// + /// _17BpcBitEXT + /// + _17BpcBitEXT = 0x00010000, + + /// + /// _18BpcBitEXT + /// + _18BpcBitEXT = 0x00020000, + + /// + /// _19BpcBitEXT + /// + _19BpcBitEXT = 0x00040000, + + /// + /// _20BpcBitEXT + /// + _20BpcBitEXT = 0x00080000, + + /// + /// _21BpcBitEXT + /// + _21BpcBitEXT = 0x00100000, + + /// + /// _22BpcBitEXT + /// + _22BpcBitEXT = 0x00200000, + + /// + /// _23BpcBitEXT + /// + _23BpcBitEXT = 0x00400000, + + /// + /// _24BpcBitEXT + /// + _24BpcBitEXT = 0x00800000, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageCompressionFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageCompressionFlagsEXT.gen.cs new file mode 100644 index 0000000..d5bce59 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageCompressionFlagsEXT.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCompressionFlagBitsEXT - Bitmask specifying image compression controls + /// + /// + /// + /// Possible values of VkImageCompressionControlEXT::flags, + /// specifying compression controls for an image, are: + /// + /// + /// // Provided by VK_EXT_image_compression_control + /// typedef enum VkImageCompressionFlagBitsEXT { + /// VK_IMAGE_COMPRESSION_DEFAULT_EXT = 0, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 0x00000001, + /// VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 0x00000002, + /// VK_IMAGE_COMPRESSION_DISABLED_EXT = 0x00000004, + /// } VkImageCompressionFlagBitsEXT; + /// + /// + [Flags] + public enum VkImageCompressionFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// DefaultEXT specifies that the default image compression setting is used. Implementations must not apply fixed-rate compression. + /// + DefaultEXT = 0, + + /// + /// FixedRateDefaultEXT specifies that the implementation may: choose any supported fixed-rate compression setting in an implementation-defined manner based on the properties of the image. + /// + FixedRateDefaultEXT = 0x00000001, + + /// + /// FixedRateExplicitEXT specifies that fixed-rate compression may: be used and that the allowed compression rates are specified by VkImageCompressionControlEXT::pFixedRateFlags. + /// + FixedRateExplicitEXT = 0x00000002, + + /// + /// DisabledEXT specifies that all lossless and fixed-rate compression should be disabled. If VkImageCompressionControlEXT::flags is VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then the etext:i^th^ member of the pFixedRateFlags array specifies the allowed compression rates for the image's etext:i^th^ plane. [NOTE] + /// + DisabledEXT = 0x00000004, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageCreateFlags.gen.cs new file mode 100644 index 0000000..38f256c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageCreateFlags.gen.cs @@ -0,0 +1,226 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCreateFlagBits - Bitmask specifying additional parameters of an image + /// + /// + /// + /// Bits which can be set in VkImageCreateInfo::flags, specifying + /// additional parameters of an image, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageCreateFlagBits { + /// VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, + /// VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, + /// VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, + /// VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, + /// VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 0x00000040, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200, + /// // Provided by VK_NV_corner_sampled_image + /// VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000, + /// // Provided by VK_EXT_descriptor_heap + /// VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT = 0x00010000, + /// // Provided by VK_EXT_sample_locations + /// VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT = 0x00004000, + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000, + /// // Provided by VK_EXT_image_2d_view_of_3d + /// VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000, + /// // Provided by VK_KHR_video_maintenance1 + /// VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000, + /// // Provided by VK_EXT_fragment_density_map_offset + /// VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT = 0x00008000, + /// // Provided by VK_KHR_maintenance11 + /// VK_IMAGE_CREATE_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR = 0x00400000, + /// // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group + /// VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, + /// // Provided by VK_KHR_maintenance1 + /// VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, + /// // Provided by VK_KHR_maintenance2 + /// VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, + /// // Provided by VK_KHR_maintenance2 + /// VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_IMAGE_CREATE_DISJOINT_BIT_KHR = VK_IMAGE_CREATE_DISJOINT_BIT, + /// // Provided by VK_KHR_bind_memory2 + /// VK_IMAGE_CREATE_ALIAS_BIT_KHR = VK_IMAGE_CREATE_ALIAS_BIT, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = VK_IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT, + /// // Provided by VK_QCOM_fragment_density_map_offset + /// VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT, + /// } VkImageCreateFlagBits; + /// + /// + [Flags] + public enum VkImageCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// SparseBindingBit specifies that the image will be backed using sparse memory binding. + /// + SparseBindingBit = 0x00000001, + + /// + /// SparseResidencyBit specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag. + /// + SparseResidencyBit = 0x00000002, + + /// + /// SparseAliasedBit specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag. + /// + SparseAliasedBit = 0x00000004, + + /// + /// MutableFormatBit specifies that the image can be used to create a VkImageView with a different format from the image. + /// + MutableFormatBit = 0x00000008, + + /// + /// CubeCompatibleBit specifies that the image can be used to create a VkImageView of type VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY. + /// + CubeCompatibleBit = 0x00000010, + + /// + /// AliasBit + /// + AliasBit = 0x00000400, + + /// + /// SplitInstanceBindRegionsBit + /// + SplitInstanceBindRegionsBit = 0x00000040, + + /// + /// _2DArrayCompatibleBit + /// + _2DArrayCompatibleBit = 0x00000020, + + /// + /// BlockTexelViewCompatibleBit + /// + BlockTexelViewCompatibleBit = 0x00000080, + + /// + /// ExtendedUsageBit + /// + ExtendedUsageBit = 0x00000100, + + /// + /// ProtectedBit + /// + ProtectedBit = 0x00000800, + + /// + /// DisjointBit + /// + DisjointBit = 0x00000200, + + /// + /// CornerSampledBitNV + /// + CornerSampledBitNV = 0x00002000, + + /// + /// DescriptorHeapCaptureReplayBitEXT + /// + DescriptorHeapCaptureReplayBitEXT = 0x00010000, + + /// + /// SampleLocationsCompatibleDepthBitEXT + /// + SampleLocationsCompatibleDepthBitEXT = 0x00001000, + + /// + /// SubsampledBitEXT + /// + SubsampledBitEXT = 0x00004000, + + /// + /// MultisampledRenderToSingleSampledBitEXT + /// + MultisampledRenderToSingleSampledBitEXT = 0x00040000, + + /// + /// _2DViewCompatibleBitEXT + /// + _2DViewCompatibleBitEXT = 0x00020000, + + /// + /// VideoProfileIndependentBitKHR + /// + VideoProfileIndependentBitKHR = 0x00100000, + + /// + /// FragmentDensityMapOffsetBitEXT + /// + FragmentDensityMapOffsetBitEXT = 0x00008000, + + /// + /// AliasSingleLayerDescriptorBitKHR + /// + AliasSingleLayerDescriptorBitKHR = 0x00400000, + + /// + /// SplitInstanceBindRegionsBitKHR + /// + SplitInstanceBindRegionsBitKHR = SplitInstanceBindRegionsBit, + + /// + /// _2DArrayCompatibleBitKHR + /// + _2DArrayCompatibleBitKHR = _2DArrayCompatibleBit, + + /// + /// BlockTexelViewCompatibleBitKHR + /// + BlockTexelViewCompatibleBitKHR = BlockTexelViewCompatibleBit, + + /// + /// ExtendedUsageBitKHR + /// + ExtendedUsageBitKHR = ExtendedUsageBit, + + /// + /// DisjointBitKHR + /// + DisjointBitKHR = DisjointBit, + + /// + /// AliasBitKHR + /// + AliasBitKHR = AliasBit, + + /// + /// DescriptorBufferCaptureReplayBitEXT + /// + DescriptorBufferCaptureReplayBitEXT = DescriptorHeapCaptureReplayBitEXT, + + /// + /// FragmentDensityMapOffsetBitQCOM + /// + FragmentDensityMapOffsetBitQCOM = FragmentDensityMapOffsetBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageCreateFlags2KHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageCreateFlags2KHR.gen.cs new file mode 100644 index 0000000..9e153ee --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageCreateFlags2KHR.gen.cs @@ -0,0 +1,166 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCreateFlagBits2KHR - Bitmask specifying additional parameters of an image + /// + /// + /// + /// Bits which can be set in + /// VkImageCreateFlags2CreateInfoKHR::flags, specifying additional + /// parameters of an image, are: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// // Flag bits for VkImageCreateFlagBits2KHR + /// typedef VkFlags64 VkImageCreateFlagBits2KHR; + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR = 0x00000001ULL; + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_RESIDENCY_BIT_KHR = 0x00000002ULL; + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPARSE_ALIASED_BIT_KHR = 0x00000004ULL; + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_MUTABLE_FORMAT_BIT_KHR = 0x00000008ULL; + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_CUBE_COMPATIBLE_BIT_KHR = 0x00000010ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_maintenance11 + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_ALIAS_SINGLE_LAYER_DESCRIPTOR_BIT_KHR = 0x00400000ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000040ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_EXTENDED_USAGE_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_DISJOINT_BIT_KHR = 0x00000200ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_ALIAS_BIT_KHR = 0x00000400ULL; + /// // Provided by VK_VERSION_1_0 with VK_KHR_extended_flags + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_PROTECTED_BIT_KHR = 0x00000800ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_sample_locations + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000ULL; + /// // Provided by VK_KHR_extended_flags with VK_NV_corner_sampled_image + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_CORNER_SAMPLED_BIT_NV = 0x00002000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_fragment_density_map + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_SUBSAMPLED_BIT_EXT = 0x00004000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_fragment_density_map_offset + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_FRAGMENT_DENSITY_MAP_OFFSET_BIT_EXT = 0x00008000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00010000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_image_2d_view_of_3d + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_multisampled_render_to_single_sampled + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_maintenance1 + /// static const VkImageCreateFlagBits2KHR VK_IMAGE_CREATE_2_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000ULL; + /// + /// + [Flags] + public enum VkImageCreateFlags2KHR : ulong + { + /// No flags set. + None = 0, + + /// + /// SparseBindingBitKHR specifies that the image will be backed using sparse memory binding. + /// + SparseBindingBitKHR = 0x00000001, + + /// + /// SparseResidencyBitKHR specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with the VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR flag. + /// + SparseResidencyBitKHR = 0x00000002, + + /// + /// SparseAliasedBitKHR specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with the VK_IMAGE_CREATE_2_SPARSE_BINDING_BIT_KHR flag. + /// + SparseAliasedBitKHR = 0x00000004, + + /// + /// MutableFormatBitKHR specifies that the image can be used to create a VkImageView with a different format from the image. + /// + MutableFormatBitKHR = 0x00000008, + + /// + /// CubeCompatibleBitKHR specifies that the image can be used to create a VkImageView of type VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY. + /// + CubeCompatibleBitKHR = 0x00000010, + + /// + /// AliasSingleLayerDescriptorBitKHR + /// + AliasSingleLayerDescriptorBitKHR = 0x00400000, + + /// + /// _2DArrayCompatibleBitKHR + /// + _2DArrayCompatibleBitKHR = 0x00000020, + + /// + /// SplitInstanceBindRegionsBitKHR + /// + SplitInstanceBindRegionsBitKHR = 0x00000040, + + /// + /// BlockTexelViewCompatibleBitKHR + /// + BlockTexelViewCompatibleBitKHR = 0x00000080, + + /// + /// ExtendedUsageBitKHR + /// + ExtendedUsageBitKHR = 0x00000100, + + /// + /// DisjointBitKHR + /// + DisjointBitKHR = 0x00000200, + + /// + /// AliasBitKHR + /// + AliasBitKHR = 0x00000400, + + /// + /// ProtectedBitKHR + /// + ProtectedBitKHR = 0x00000800, + + /// + /// SampleLocationsCompatibleDepthBitEXT + /// + SampleLocationsCompatibleDepthBitEXT = 0x00001000, + + /// + /// CornerSampledBitNV + /// + CornerSampledBitNV = 0x00002000, + + /// + /// SubsampledBitEXT + /// + SubsampledBitEXT = 0x00004000, + + /// + /// FragmentDensityMapOffsetBitEXT + /// + FragmentDensityMapOffsetBitEXT = 0x00008000, + + /// + /// DescriptorBufferCaptureReplayBitEXT + /// + DescriptorBufferCaptureReplayBitEXT = 0x00010000, + + /// + /// _2DViewCompatibleBitEXT + /// + _2DViewCompatibleBitEXT = 0x00020000, + + /// + /// MultisampledRenderToSingleSampledBitEXT + /// + MultisampledRenderToSingleSampledBitEXT = 0x00040000, + + /// + /// VideoProfileIndependentBitKHR + /// + VideoProfileIndependentBitKHR = 0x00100000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageLayout.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageLayout.gen.cs new file mode 100644 index 0000000..bc34e31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageLayout.gen.cs @@ -0,0 +1,308 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageLayout - Layout of image and image subresources + /// + /// + /// + /// The set of image layouts consists of: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageLayout { + /// VK_IMAGE_LAYOUT_UNDEFINED = 0, + /// VK_IMAGE_LAYOUT_GENERAL = 1, + /// VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, + /// VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, + /// VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, + /// VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, + /// VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, + /// VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, + /// VK_IMAGE_LAYOUT_PREINITIALIZED = 8, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, + /// // Provided by VK_VERSION_1_1 + /// VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, + /// // Provided by VK_VERSION_1_2 + /// VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL = 1000241000, + /// // Provided by VK_VERSION_1_2 + /// VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL = 1000241001, + /// // Provided by VK_VERSION_1_2 + /// VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL = 1000241002, + /// // Provided by VK_VERSION_1_2 + /// VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003, + /// // Provided by VK_VERSION_1_3 + /// VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000, + /// // Provided by VK_VERSION_1_3 + /// VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001, + /// // Provided by VK_VERSION_1_4 + /// VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000, + /// // Provided by VK_KHR_swapchain + /// VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, + /// // Provided by VK_KHR_video_decode_queue + /// VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001, + /// // Provided by VK_KHR_video_decode_queue + /// VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR = 1000024002, + /// // Provided by VK_KHR_shared_presentable_image + /// VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, + /// // Provided by VK_KHR_video_encode_queue + /// VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001, + /// // Provided by VK_KHR_video_encode_queue + /// VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002, + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, + /// // Provided by VK_ARM_tensors + /// VK_IMAGE_LAYOUT_TENSOR_ALIASING_ARM = 1000460000, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000, + /// // Provided by VK_EXT_zero_initialize_device_memory + /// VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT = 1000620000, + /// // Provided by VK_KHR_maintenance2 + /// VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, + /// // Provided by VK_KHR_maintenance2 + /// VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, + /// // Provided by VK_NV_shading_rate_image + /// VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, + /// // Provided by VK_KHR_dynamic_rendering_local_read + /// VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, + /// // Provided by VK_KHR_synchronization2 + /// VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, + /// // Provided by VK_KHR_synchronization2 + /// VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, + /// } VkImageLayout; + /// + /// + public enum VkImageLayout : int + { + /// + /// Undefined specifies that the layout is unknown. Image memory cannot: be transitioned into this layout. This layout can be used as the initialLayout member of VkImageCreateInfo. This layout can be used in place of the current image layout in a layout transition, but doing so will cause the contents of the image's memory to be undefined:. + /// + Undefined = 0, + + /// + /// General supports all types of device access, unless specified otherwise. + /// + General = 1, + + /// + /// ColorAttachmentOptimal must only be used as a color or resolve attachment in a VkFramebuffer. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set. + /// + ColorAttachmentOptimal = 2, + + /// + /// DepthStencilAttachmentOptimal specifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read and write access as a depth/stencil attachment. + /// + DepthStencilAttachmentOptimal = 3, + + /// + /// DepthStencilReadOnlyOptimal specifies a layout for both the depth and stencil aspects of a depth/stencil format image allowing read only access as a depth/stencil attachment or in shaders as a sampled image, combined image/sampler, or input attachment. + /// + DepthStencilReadOnlyOptimal = 4, + + /// + /// ShaderReadOnlyOptimal specifies a layout allowing read-only access in a shader as a sampled image, combined image/sampler, or input attachment. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage bits enabled. + /// + ShaderReadOnlyOptimal = 5, + + /// + /// TransferSrcOptimal must only be used as a source image of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT^). This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set. + /// + TransferSrcOptimal = 6, + + /// + /// TransferDstOptimal must only be used as a destination image of a transfer command. This layout is valid only for image subresources of images created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set. The layout of each image subresource is not a state of the image subresource itself, but is rather a property of how the data in memory is organized, and thus for each mechanism of accessing an image in the API the application must specify a parameter or structure member that indicates which image layout the image subresource(s) are considered to be in when the image will be accessed. For transfer commands, this is a parameter to the command (see here and here). For use as a framebuffer attachment, this is a member in the substructures of the VkRenderPassCreateInfo (see Render Pass^). For use in a descriptor set, this is a member in the VkDescriptorImageInfo structure (see here). + /// + TransferDstOptimal = 7, + + /// + /// Preinitialized specifies that an image's memory is in a defined layout and can be populated by data, but that it has not yet been initialized by the driver. Image memory cannot: be transitioned into this layout. This layout can be used as the initialLayout member of VkImageCreateInfo. This layout is intended to be used as the initial layout for an image whose contents are written by the host, and hence the data can be written to memory immediately, without first executing a layout transition. Currently, VK_IMAGE_LAYOUT_PREINITIALIZED is only useful with linear^ images because there is not a standard layout defined for VK_IMAGE_TILING_OPTIMAL images. + /// + Preinitialized = 8, + + /// + /// DepthReadOnlyStencilAttachmentOptimal + /// + DepthReadOnlyStencilAttachmentOptimal = 1000117000, + + /// + /// DepthAttachmentStencilReadOnlyOptimal + /// + DepthAttachmentStencilReadOnlyOptimal = 1000117001, + + /// + /// DepthAttachmentOptimal + /// + DepthAttachmentOptimal = 1000241000, + + /// + /// DepthReadOnlyOptimal + /// + DepthReadOnlyOptimal = 1000241001, + + /// + /// StencilAttachmentOptimal + /// + StencilAttachmentOptimal = 1000241002, + + /// + /// StencilReadOnlyOptimal + /// + StencilReadOnlyOptimal = 1000241003, + + /// + /// ReadOnlyOptimal + /// + ReadOnlyOptimal = 1000314000, + + /// + /// AttachmentOptimal + /// + AttachmentOptimal = 1000314001, + + /// + /// RenderingLocalRead + /// + RenderingLocalRead = 1000232000, + + /// + /// PresentSrcKHR + /// + PresentSrcKHR = 1000001002, + + /// + /// VideoDecodeDstKHR + /// + VideoDecodeDstKHR = 1000024000, + + /// + /// VideoDecodeSrcKHR + /// + VideoDecodeSrcKHR = 1000024001, + + /// + /// VideoDecodeDpbKHR + /// + VideoDecodeDpbKHR = 1000024002, + + /// + /// SharedPresentKHR + /// + SharedPresentKHR = 1000111000, + + /// + /// FragmentDensityMapOptimalEXT + /// + FragmentDensityMapOptimalEXT = 1000218000, + + /// + /// FragmentShadingRateAttachmentOptimalKHR + /// + FragmentShadingRateAttachmentOptimalKHR = 1000164003, + + /// + /// VideoEncodeDstKHR + /// + VideoEncodeDstKHR = 1000299000, + + /// + /// VideoEncodeSrcKHR + /// + VideoEncodeSrcKHR = 1000299001, + + /// + /// VideoEncodeDpbKHR + /// + VideoEncodeDpbKHR = 1000299002, + + /// + /// AttachmentFeedbackLoopOptimalEXT + /// + AttachmentFeedbackLoopOptimalEXT = 1000339000, + + /// + /// TensorAliasingARM + /// + TensorAliasingARM = 1000460000, + + /// + /// VideoEncodeQuantizationMapKHR + /// + VideoEncodeQuantizationMapKHR = 1000553000, + + /// + /// ZeroInitializedEXT + /// + ZeroInitializedEXT = 1000620000, + + /// + /// DepthReadOnlyStencilAttachmentOptimalKHR + /// + DepthReadOnlyStencilAttachmentOptimalKHR = DepthReadOnlyStencilAttachmentOptimal, + + /// + /// DepthAttachmentStencilReadOnlyOptimalKHR + /// + DepthAttachmentStencilReadOnlyOptimalKHR = DepthAttachmentStencilReadOnlyOptimal, + + /// + /// ShadingRateOptimalNV + /// + ShadingRateOptimalNV = FragmentShadingRateAttachmentOptimalKHR, + + /// + /// RenderingLocalReadKHR + /// + RenderingLocalReadKHR = RenderingLocalRead, + + /// + /// DepthAttachmentOptimalKHR + /// + DepthAttachmentOptimalKHR = DepthAttachmentOptimal, + + /// + /// DepthReadOnlyOptimalKHR + /// + DepthReadOnlyOptimalKHR = DepthReadOnlyOptimal, + + /// + /// StencilAttachmentOptimalKHR + /// + StencilAttachmentOptimalKHR = StencilAttachmentOptimal, + + /// + /// StencilReadOnlyOptimalKHR + /// + StencilReadOnlyOptimalKHR = StencilReadOnlyOptimal, + + /// + /// ReadOnlyOptimalKHR + /// + ReadOnlyOptimalKHR = ReadOnlyOptimal, + + /// + /// AttachmentOptimalKHR + /// + AttachmentOptimalKHR = AttachmentOptimal, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageTiling.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageTiling.gen.cs new file mode 100644 index 0000000..c635361 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageTiling.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageTiling - Specifies the tiling arrangement of data in an image + /// + /// + /// + /// Possible values of VkImageCreateInfo::tiling, specifying the + /// tiling arrangement of texel blocks in an image, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageTiling { + /// VK_IMAGE_TILING_OPTIMAL = 0, + /// VK_IMAGE_TILING_LINEAR = 1, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000, + /// } VkImageTiling; + /// + /// + public enum VkImageTiling : int + { + /// + /// Optimal specifies optimal tiling (texels are laid out in an implementation-dependent arrangement, for more efficient memory access). + /// + Optimal = 0, + + /// + /// Linear specifies linear tiling (texels are laid out in memory in row-major order, possibly with some padding on each row). + /// + Linear = 1, + + /// + /// DrmFormatModifierEXT + /// + DrmFormatModifierEXT = 1000158000, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageType.gen.cs new file mode 100644 index 0000000..ba756c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageType.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageType - Specifies the type of an image object + /// + /// + /// + /// Possible values of VkImageCreateInfo::imageType, specifying the + /// basic dimensionality of an image, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageType { + /// VK_IMAGE_TYPE_1D = 0, + /// VK_IMAGE_TYPE_2D = 1, + /// VK_IMAGE_TYPE_3D = 2, + /// } VkImageType; + /// + /// + public enum VkImageType : int + { + /// + /// _1D specifies a one-dimensional image. + /// + _1D = 0, + + /// + /// _2D specifies a two-dimensional image. + /// + _2D = 1, + + /// + /// _3D specifies a three-dimensional image. + /// + _3D = 2, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageUsageFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageUsageFlags.gen.cs new file mode 100644 index 0000000..460a7cf --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageUsageFlags.gen.cs @@ -0,0 +1,214 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageUsageFlagBits - Bitmask specifying intended usage of an image + /// + /// + /// + /// Bits which can be set in + /// + /// + /// * VkImageCreateInfo::usage + /// + /// + /// specify intended usage of an image, and are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageUsageFlagBits { + /// VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, + /// VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, + /// VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, + /// VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, + /// VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, + /// VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, + /// VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, + /// VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, + /// // Provided by VK_VERSION_1_4 + /// VK_IMAGE_USAGE_HOST_TRANSFER_BIT = 0x00400000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00000400, + /// // Provided by VK_KHR_video_decode_queue + /// VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800, + /// // Provided by VK_KHR_video_decode_queue + /// VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100, + /// // Provided by VK_KHR_video_encode_queue + /// VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000, + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000, + /// // Provided by VK_HUAWEI_invocation_mask + /// VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000, + /// // Provided by VK_QCOM_image_processing + /// VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000, + /// // Provided by VK_QCOM_image_processing + /// VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000, + /// // Provided by VK_ARM_tensors + /// VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM = 0x00800000, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM = 0x08000000, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000, + /// // Provided by VK_NV_shading_rate_image + /// VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, + /// // Provided by VK_EXT_host_image_copy + /// VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT, + /// } VkImageUsageFlagBits; + /// + /// + [Flags] + public enum VkImageUsageFlags : int + { + /// No flags set. + None = 0, + + /// + /// TransferSrcBit specifies that the image can be used as the source of a transfer command. + /// + TransferSrcBit = 0x00000001, + + /// + /// TransferDstBit specifies that the image can be used as the destination of a transfer command. + /// + TransferDstBit = 0x00000002, + + /// + /// SampledBit specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader. + /// + SampledBit = 0x00000004, + + /// + /// StorageBit specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE. + /// + StorageBit = 0x00000008, + + /// + /// ColorAttachmentBit specifies that the image can be used to create a VkImageView suitable for use as a color or resolve attachment in a VkFramebuffer. + /// + ColorAttachmentBit = 0x00000010, + + /// + /// DepthStencilAttachmentBit specifies that the image can be used to create a VkImageView suitable for use as a depth/stencil attachment in a VkFramebuffer. + /// + DepthStencilAttachmentBit = 0x00000020, + + /// + /// TransientAttachmentBit specifies that implementations may: support using memory allocations^ with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT to back an image with this usage. This bit can be set for any image that can be used to create a VkImageView suitable for use as a color, resolve, depth/stencil, or input attachment. + /// + TransientAttachmentBit = 0x00000040, + + /// + /// InputAttachmentBit specifies that the image can be used to create a VkImageView suitable for occupying VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer. + /// + InputAttachmentBit = 0x00000080, + + /// + /// HostTransferBit + /// + HostTransferBit = 0x00400000, + + /// + /// VideoDecodeDstBitKHR + /// + VideoDecodeDstBitKHR = 0x00000400, + + /// + /// VideoDecodeSrcBitKHR + /// + VideoDecodeSrcBitKHR = 0x00000800, + + /// + /// VideoDecodeDpbBitKHR + /// + VideoDecodeDpbBitKHR = 0x00001000, + + /// + /// FragmentDensityMapBitEXT + /// + FragmentDensityMapBitEXT = 0x00000200, + + /// + /// FragmentShadingRateAttachmentBitKHR + /// + FragmentShadingRateAttachmentBitKHR = 0x00000100, + + /// + /// VideoEncodeDstBitKHR + /// + VideoEncodeDstBitKHR = 0x00002000, + + /// + /// VideoEncodeSrcBitKHR + /// + VideoEncodeSrcBitKHR = 0x00004000, + + /// + /// VideoEncodeDpbBitKHR + /// + VideoEncodeDpbBitKHR = 0x00008000, + + /// + /// AttachmentFeedbackLoopBitEXT + /// + AttachmentFeedbackLoopBitEXT = 0x00080000, + + /// + /// InvocationMaskBitHUAWEI + /// + InvocationMaskBitHUAWEI = 0x00040000, + + /// + /// SampleWeightBitQCOM + /// + SampleWeightBitQCOM = 0x00100000, + + /// + /// SampleBlockMatchBitQCOM + /// + SampleBlockMatchBitQCOM = 0x00200000, + + /// + /// TensorAliasingBitARM + /// + TensorAliasingBitARM = 0x00800000, + + /// + /// TileMemoryBitQCOM + /// + TileMemoryBitQCOM = 0x08000000, + + /// + /// VideoEncodeQuantizationDeltaMapBitKHR + /// + VideoEncodeQuantizationDeltaMapBitKHR = 0x02000000, + + /// + /// VideoEncodeEmphasisMapBitKHR + /// + VideoEncodeEmphasisMapBitKHR = 0x04000000, + + /// + /// ShadingRateImageBitNV + /// + ShadingRateImageBitNV = FragmentShadingRateAttachmentBitKHR, + + /// + /// HostTransferBitEXT + /// + HostTransferBitEXT = HostTransferBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageUsageFlags2KHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageUsageFlags2KHR.gen.cs new file mode 100644 index 0000000..8c8f938 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageUsageFlags2KHR.gen.cs @@ -0,0 +1,191 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageUsageFlagBits2KHR - Bitmask specifying intended use of an image + /// + /// + /// + /// Bits which can be set in + /// VkImageUsageFlags2CreateInfoKHR::usage, specifying intended + /// usage of an image, are: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// // Flag bits for VkImageUsageFlagBits2KHR + /// typedef VkFlags64 VkImageUsageFlagBits2KHR; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLED_BIT_KHR = 0x00000004ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_STORAGE_BIT_KHR = 0x00000008ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000010ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000020ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TRANSIENT_ATTACHMENT_BIT_KHR = 0x00000040ULL; + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_INPUT_ATTACHMENT_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_fragment_shading_rate + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_fragment_density_map + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00000400ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_decode_queue + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_queue + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000ULL; + /// // Provided by VK_KHR_extended_flags with VK_HUAWEI_invocation_mask + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x00040000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_attachment_feedback_loop_layout + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000ULL; + /// // Provided by VK_KHR_extended_flags with VK_QCOM_image_processing + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000ULL; + /// // Provided by VK_KHR_extended_flags with VK_QCOM_image_processing + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000ULL; + /// // Provided by VK_VERSION_1_4 with VK_KHR_extended_flags + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_HOST_TRANSFER_BIT_KHR = 0x00400000ULL; + /// // Provided by VK_KHR_extended_flags with VK_ARM_tensors + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TENSOR_ALIASING_BIT_ARM = 0x00800000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_quantization_map + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_video_encode_quantization_map + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000ULL; + /// // Provided by VK_KHR_extended_flags with VK_QCOM_tile_memory_heap + /// static const VkImageUsageFlagBits2KHR VK_IMAGE_USAGE_2_TILE_MEMORY_BIT_QCOM = 0x08000000ULL; + /// + /// + [Flags] + public enum VkImageUsageFlags2KHR : ulong + { + /// No flags set. + None = 0, + + /// + /// TransferSrcBitKHR specifies that the image can be used as the source of a transfer command. + /// + TransferSrcBitKHR = 0x00000001, + + /// + /// TransferDstBitKHR specifies that the image can be used as the destination of a transfer command. + /// + TransferDstBitKHR = 0x00000002, + + /// + /// SampledBitKHR specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader. + /// + SampledBitKHR = 0x00000004, + + /// + /// StorageBitKHR specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE. + /// + StorageBitKHR = 0x00000008, + + /// + /// ColorAttachmentBitKHR specifies that the image can be used to create a VkImageView suitable for use as a color or resolve attachment in a VkFramebuffer. + /// + ColorAttachmentBitKHR = 0x00000010, + + /// + /// DepthStencilAttachmentBitKHR specifies that the image can be used to create a VkImageView suitable for use as a depth/stencil attachment in a VkFramebuffer. + /// + DepthStencilAttachmentBitKHR = 0x00000020, + + /// + /// TransientAttachmentBitKHR specifies that implementations may: support using memory allocations^ with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT to back an image with this usage. This bit can be set for any image that can be used to create a VkImageView suitable for use as a color, resolve, depth/stencil, or input attachment. + /// + TransientAttachmentBitKHR = 0x00000040, + + /// + /// InputAttachmentBitKHR specifies that the image can be used to create a VkImageView suitable for occupying VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer. + /// + InputAttachmentBitKHR = 0x00000080, + + /// + /// FragmentShadingRateAttachmentBitKHR + /// + FragmentShadingRateAttachmentBitKHR = 0x00000100, + + /// + /// FragmentDensityMapBitEXT + /// + FragmentDensityMapBitEXT = 0x00000200, + + /// + /// VideoDecodeDstBitKHR + /// + VideoDecodeDstBitKHR = 0x00000400, + + /// + /// VideoDecodeSrcBitKHR + /// + VideoDecodeSrcBitKHR = 0x00000800, + + /// + /// VideoDecodeDpbBitKHR + /// + VideoDecodeDpbBitKHR = 0x00001000, + + /// + /// VideoEncodeDstBitKHR + /// + VideoEncodeDstBitKHR = 0x00002000, + + /// + /// VideoEncodeSrcBitKHR + /// + VideoEncodeSrcBitKHR = 0x00004000, + + /// + /// VideoEncodeDpbBitKHR + /// + VideoEncodeDpbBitKHR = 0x00008000, + + /// + /// InvocationMaskBitHUAWEI + /// + InvocationMaskBitHUAWEI = 0x00040000, + + /// + /// AttachmentFeedbackLoopBitEXT + /// + AttachmentFeedbackLoopBitEXT = 0x00080000, + + /// + /// SampleWeightBitQCOM + /// + SampleWeightBitQCOM = 0x00100000, + + /// + /// SampleBlockMatchBitQCOM + /// + SampleBlockMatchBitQCOM = 0x00200000, + + /// + /// HostTransferBitKHR + /// + HostTransferBitKHR = 0x00400000, + + /// + /// TensorAliasingBitARM + /// + TensorAliasingBitARM = 0x00800000, + + /// + /// VideoEncodeQuantizationDeltaMapBitKHR + /// + VideoEncodeQuantizationDeltaMapBitKHR = 0x02000000, + + /// + /// VideoEncodeEmphasisMapBitKHR + /// + VideoEncodeEmphasisMapBitKHR = 0x04000000, + + /// + /// TileMemoryBitQCOM + /// + TileMemoryBitQCOM = 0x08000000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageViewCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageViewCreateFlags.gen.cs new file mode 100644 index 0000000..3e30b1c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageViewCreateFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewCreateFlagBits - Bitmask specifying additional parameters of an image view + /// + /// + /// + /// Bits which can be set in VkImageViewCreateInfo::flags, + /// specifying additional parameters of an image view, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageViewCreateFlagBits { + /// // Provided by VK_EXT_fragment_density_map + /// VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 0x00000001, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000004, + /// // Provided by VK_EXT_fragment_density_map2 + /// VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 0x00000002, + /// } VkImageViewCreateFlagBits; + /// + /// + [Flags] + public enum VkImageViewCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// FragmentDensityMapDynamicBitEXT + /// + FragmentDensityMapDynamicBitEXT = 0x00000001, + + /// + /// DescriptorBufferCaptureReplayBitEXT + /// + DescriptorBufferCaptureReplayBitEXT = 0x00000004, + + /// + /// FragmentDensityMapDeferredBitEXT + /// + FragmentDensityMapDeferredBitEXT = 0x00000002, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkImageViewType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkImageViewType.gen.cs new file mode 100644 index 0000000..b73db31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkImageViewType.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewType - Image view types + /// + /// + /// + /// The types of image views that can be created are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkImageViewType { + /// VK_IMAGE_VIEW_TYPE_1D = 0, + /// VK_IMAGE_VIEW_TYPE_2D = 1, + /// VK_IMAGE_VIEW_TYPE_3D = 2, + /// VK_IMAGE_VIEW_TYPE_CUBE = 3, + /// VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4, + /// VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5, + /// VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6, + /// } VkImageViewType; + /// + /// + public enum VkImageViewType : int + { + /// + /// _1D + /// + _1D = 0, + + /// + /// _2D + /// + _2D = 1, + + /// + /// _3D + /// + _3D = 2, + + /// + /// Cube + /// + Cube = 3, + + /// + /// _1DArray + /// + _1DArray = 4, + + /// + /// _2DArray + /// + _2DArray = 5, + + /// + /// CubeArray + /// + CubeArray = 6, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndexType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndexType.gen.cs new file mode 100644 index 0000000..31905df --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndexType.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndexType - Type of index buffer indices + /// + /// + /// + /// Possible values of + /// vkCmdBindIndexBuffer::indexType, specifying the size of indices, + /// are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkIndexType { + /// VK_INDEX_TYPE_UINT16 = 0, + /// VK_INDEX_TYPE_UINT32 = 1, + /// // Provided by VK_VERSION_1_4 + /// VK_INDEX_TYPE_UINT8 = 1000265000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_INDEX_TYPE_NONE_KHR = 1000165000, + /// // Provided by VK_NV_ray_tracing + /// VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR, + /// // Provided by VK_EXT_index_type_uint8 + /// VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8, + /// // Provided by VK_KHR_index_type_uint8 + /// VK_INDEX_TYPE_UINT8_KHR = VK_INDEX_TYPE_UINT8, + /// } VkIndexType; + /// + /// + public enum VkIndexType : int + { + /// + /// UInt16 specifies that indices are 16-bit unsigned integer values. + /// + UInt16 = 0, + + /// + /// UInt32 specifies that indices are 32-bit unsigned integer values. + /// + UInt32 = 1, + + /// + /// UInt8 + /// + UInt8 = 1000265000, + + /// + /// NoneKHR + /// + NoneKHR = 1000165000, + + /// + /// NoneNV + /// + NoneNV = NoneKHR, + + /// + /// UInt8EXT + /// + UInt8EXT = UInt8, + + /// + /// UInt8KHR + /// + UInt8KHR = UInt8, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsInputModeFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsInputModeFlagsEXT.gen.cs new file mode 100644 index 0000000..2b58b2e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsInputModeFlagsEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsInputModeFlagBitsEXT - Bitmask specifying allowed usage of an indirect commands layout + /// + /// + /// + /// Bits which are set in + /// VkIndirectCommandsIndexBufferTokenEXT::mode, specifying how an + /// index buffer is used, are: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef enum VkIndirectCommandsInputModeFlagBitsEXT { + /// VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT = 0x00000001, + /// VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT = 0x00000002, + /// } VkIndirectCommandsInputModeFlagBitsEXT; + /// + /// + [Flags] + public enum VkIndirectCommandsInputModeFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// VulkanIndexBufferEXT specifies that the indirect buffer contains VkBindIndexBufferIndirectCommandEXT. + /// + VulkanIndexBufferEXT = 0x00000001, + + /// + /// DxgiIndexBufferEXT specifies that the indirect buffer contains `D3D12_INDEX_BUFFER_VIEW`. + /// + DxgiIndexBufferEXT = 0x00000002, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsEXT.gen.cs new file mode 100644 index 0000000..7418df8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutUsageFlagBitsEXT - Bitmask specifying allowed usage of an indirect commands layout + /// + /// + /// + /// Bits which can be set in + /// VkIndirectCommandsLayoutCreateInfoEXT::flags, specifying usage + /// hints of an indirect command layout, are: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef enum VkIndirectCommandsLayoutUsageFlagBitsEXT { + /// VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT = 0x00000001, + /// VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT = 0x00000002, + /// } VkIndirectCommandsLayoutUsageFlagBitsEXT; + /// + /// + [Flags] + public enum VkIndirectCommandsLayoutUsageFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// ExplicitPreprocessBitEXT specifies that the layout is always used with the manual preprocessing step through calling vkCmdPreprocessGeneratedCommandsEXT and executed by vkCmdExecuteGeneratedCommandsEXT with isPreprocessed set to VK_TRUE. + /// + ExplicitPreprocessBitEXT = 0x00000001, + + /// + /// UnorderedSequencesBitEXT specifies that the processing of sequences will happen at an implementation-dependent order, which is not guaranteed to be deterministic using the same input data. This flag is ignored when the shaderStages is VK_SHADER_STAGE_COMPUTE_BIT as it is implied that the dispatch sequence is always unordered. + /// + UnorderedSequencesBitEXT = 0x00000002, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsNV.gen.cs new file mode 100644 index 0000000..33becf7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsLayoutUsageFlagsNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutUsageFlagBitsNV - Bitmask specifying allowed usage of an indirect commands layout + /// + /// + /// + /// Bits which can be set in + /// VkIndirectCommandsLayoutCreateInfoNV::flags, specifying usage + /// hints of an indirect command layout, are: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef enum VkIndirectCommandsLayoutUsageFlagBitsNV { + /// VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 0x00000001, + /// VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 0x00000002, + /// VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 0x00000004, + /// } VkIndirectCommandsLayoutUsageFlagBitsNV; + /// + /// + [Flags] + public enum VkIndirectCommandsLayoutUsageFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// ExplicitPreprocessBitNV specifies that the layout is always used with the manual preprocessing step through calling vkCmdPreprocessGeneratedCommandsNV and executed by vkCmdExecuteGeneratedCommandsNV with isPreprocessed set to VK_TRUE. + /// + ExplicitPreprocessBitNV = 0x00000001, + + /// + /// IndexedSequencesBitNV specifies that the input data for the sequences is not implicitly indexed from 0..sequencesUsed, but an application-provided VkBuffer encoding the index is provided. + /// + IndexedSequencesBitNV = 0x00000002, + + /// + /// UnorderedSequencesBitNV specifies that the processing of sequences can happen at an implementation-dependent order, which is not guaranteed to be coherent using the same input data. + /// + UnorderedSequencesBitNV = 0x00000004, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeEXT.gen.cs new file mode 100644 index 0000000..9f0d6de --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeEXT.gen.cs @@ -0,0 +1,134 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsTokenTypeEXT - Enum specifying token commands + /// + /// + /// + /// Possible values of those elements of the + /// VkIndirectCommandsLayoutCreateInfoEXT::pTokens array specifying + /// command tokens (other elements of the array specify command parameters) are: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef enum VkIndirectCommandsTokenTypeEXT { + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT = 0, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT = 1, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT = 2, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT = 3, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT = 4, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT = 5, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT = 6, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT = 7, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT = 8, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT = 9, + /// // Provided by VK_EXT_descriptor_heap with VK_EXT_device_generated_commands + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT = 1000135000, + /// // Provided by VK_EXT_descriptor_heap with VK_EXT_device_generated_commands + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT = 1000135001, + /// // Provided by VK_EXT_device_generated_commands with VK_NV_mesh_shader + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT = 1000202002, + /// // Provided by VK_EXT_device_generated_commands with VK_NV_mesh_shader + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT = 1000202003, + /// // Provided by VK_EXT_device_generated_commands with VK_EXT_mesh_shader + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT = 1000328000, + /// // Provided by VK_EXT_device_generated_commands with VK_EXT_mesh_shader + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT = 1000328001, + /// // Provided by VK_KHR_ray_tracing_maintenance1 with VK_EXT_device_generated_commands + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT = 1000386004, + /// } VkIndirectCommandsTokenTypeEXT; + /// + /// + public enum VkIndirectCommandsTokenTypeEXT : int + { + /// + /// ExecutionSetEXT + /// + ExecutionSetEXT = 0, + + /// + /// PushConstantEXT + /// + PushConstantEXT = 1, + + /// + /// SequenceIndexEXT + /// + SequenceIndexEXT = 2, + + /// + /// IndexBufferEXT + /// + IndexBufferEXT = 3, + + /// + /// VertexBufferEXT + /// + VertexBufferEXT = 4, + + /// + /// DrawIndexedEXT + /// + DrawIndexedEXT = 5, + + /// + /// DrawEXT + /// + DrawEXT = 6, + + /// + /// DrawIndexedCountEXT + /// + DrawIndexedCountEXT = 7, + + /// + /// DrawCountEXT + /// + DrawCountEXT = 8, + + /// + /// DispatchEXT + /// + DispatchEXT = 9, + + /// + /// PushDataEXT + /// + PushDataEXT = 1000135000, + + /// + /// PushDataSequenceIndexEXT + /// + PushDataSequenceIndexEXT = 1000135001, + + /// + /// DrawMeshTasksNVEXT + /// + DrawMeshTasksNVEXT = 1000202002, + + /// + /// DrawMeshTasksCountNVEXT + /// + DrawMeshTasksCountNVEXT = 1000202003, + + /// + /// DrawMeshTasksEXT + /// + DrawMeshTasksEXT = 1000328000, + + /// + /// DrawMeshTasksCountEXT + /// + DrawMeshTasksCountEXT = 1000328001, + + /// + /// TraceRays2EXT + /// + TraceRays2EXT = 1000386004, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeNV.gen.cs new file mode 100644 index 0000000..36d3c6e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectCommandsTokenTypeNV.gen.cs @@ -0,0 +1,101 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsTokenTypeNV - Enum specifying token commands + /// + /// + /// + /// Possible values of those elements of the + /// VkIndirectCommandsLayoutCreateInfoNV::pTokens array specifying + /// command tokens (other elements of the array specify command parameters) are: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef enum VkIndirectCommandsTokenTypeNV { + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6, + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7, + /// // Provided by VK_EXT_descriptor_heap with VK_NV_device_generated_commands + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_NV = 1000135000, + /// // Provided by VK_EXT_mesh_shader with VK_NV_device_generated_commands + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000, + /// // Provided by VK_NV_device_generated_commands_compute + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV = 1000428003, + /// // Provided by VK_NV_device_generated_commands_compute + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV = 1000428004, + /// } VkIndirectCommandsTokenTypeNV; + /// + /// + public enum VkIndirectCommandsTokenTypeNV : int + { + /// + /// ShaderGroupNV + /// + ShaderGroupNV = 0, + + /// + /// StateFlagsNV + /// + StateFlagsNV = 1, + + /// + /// IndexBufferNV + /// + IndexBufferNV = 2, + + /// + /// VertexBufferNV + /// + VertexBufferNV = 3, + + /// + /// PushConstantNV + /// + PushConstantNV = 4, + + /// + /// DrawIndexedNV + /// + DrawIndexedNV = 5, + + /// + /// DrawNV + /// + DrawNV = 6, + + /// + /// DrawTasksNV + /// + DrawTasksNV = 7, + + /// + /// PushDataNV + /// + PushDataNV = 1000135000, + + /// + /// DrawMeshTasksNV + /// + DrawMeshTasksNV = 1000328000, + + /// + /// PipelineNV + /// + PipelineNV = 1000428003, + + /// + /// DispatchNV + /// + DispatchNV = 1000428004, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectExecutionSetInfoTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectExecutionSetInfoTypeEXT.gen.cs new file mode 100644 index 0000000..da4ece9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectExecutionSetInfoTypeEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetInfoTypeEXT - Enum specifying allowed usage of an indirect execution set + /// + /// + /// + /// Values which can be set in + /// VkIndirectExecutionSetCreateInfoEXT::type, specifying contents + /// of an indirect execution set, are: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef enum VkIndirectExecutionSetInfoTypeEXT { + /// VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT = 0, + /// VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT = 1, + /// } VkIndirectExecutionSetInfoTypeEXT; + /// + /// + public enum VkIndirectExecutionSetInfoTypeEXT : int + { + /// + /// PipelinesEXT specifies that the indirect execution set contains VkPipeline objects. + /// + PipelinesEXT = 0, + + /// + /// ShaderObjectsEXT must not be used. + /// + ShaderObjectsEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkIndirectStateFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkIndirectStateFlagsNV.gen.cs new file mode 100644 index 0000000..484f509 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkIndirectStateFlagsNV.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectStateFlagBitsNV - Bitmask specifying state that can be altered on the device + /// + /// + /// + /// A subset of the graphics pipeline state can be altered using indirect state + /// flags: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef enum VkIndirectStateFlagBitsNV { + /// VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 0x00000001, + /// } VkIndirectStateFlagBitsNV; + /// + /// + [Flags] + public enum VkIndirectStateFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// FlagFrontfaceBitNV allows to toggle the VkFrontFace rasterization state for subsequent drawing commands. + /// + FlagFrontfaceBitNV = 0x00000001, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkInstanceCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkInstanceCreateFlags.gen.cs new file mode 100644 index 0000000..000a141 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkInstanceCreateFlags.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkInstanceCreateFlagBits - Bitmask specifying behavior of the instance + /// + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkInstanceCreateFlagBits { + /// // Provided by VK_KHR_portability_enumeration + /// VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR = 0x00000001, + /// } VkInstanceCreateFlagBits; + /// + /// + [Flags] + public enum VkInstanceCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// EnumeratePortabilityBitKHR + /// + EnumeratePortabilityBitKHR = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkInternalAllocationType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkInternalAllocationType.gen.cs new file mode 100644 index 0000000..f40afb4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkInternalAllocationType.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkInternalAllocationType - Allocation type + /// + /// + /// + /// The allocationType parameter to the pfnInternalAllocation and + /// pfnInternalFree functions may: be one of the following values: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkInternalAllocationType { + /// VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0, + /// } VkInternalAllocationType; + /// + /// + public enum VkInternalAllocationType : int + { + /// + /// Executable specifies that the allocation is intended for execution by the host. + /// + Executable = 0, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkLatencyMarkerNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkLatencyMarkerNV.gen.cs new file mode 100644 index 0000000..662510d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkLatencyMarkerNV.gen.cs @@ -0,0 +1,95 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLatencyMarkerNV - Structure used to mark different points in latency + /// + /// + /// + /// The VkLatencyMarkerNV enum is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef enum VkLatencyMarkerNV { + /// VK_LATENCY_MARKER_SIMULATION_START_NV = 0, + /// VK_LATENCY_MARKER_SIMULATION_END_NV = 1, + /// VK_LATENCY_MARKER_RENDERSUBMIT_START_NV = 2, + /// VK_LATENCY_MARKER_RENDERSUBMIT_END_NV = 3, + /// VK_LATENCY_MARKER_PRESENT_START_NV = 4, + /// VK_LATENCY_MARKER_PRESENT_END_NV = 5, + /// VK_LATENCY_MARKER_INPUT_SAMPLE_NV = 6, + /// VK_LATENCY_MARKER_TRIGGER_FLASH_NV = 7, + /// VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV = 8, + /// VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV = 9, + /// VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV = 10, + /// VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV = 11, + /// } VkLatencyMarkerNV; + /// + /// + public enum VkLatencyMarkerNV : int + { + /// + /// SimulationStartNV should be called at the start of the simulation execution each frame, but after the call to vkLatencySleepNV. + /// + SimulationStartNV = 0, + + /// + /// SimulationEndNV should be called at the end of the simulation execution each frame. + /// + SimulationEndNV = 1, + + /// + /// RendersubmitStartNV should be called at the beginning of the render submission execution each frame. This should be wherever Vulkan API calls are made and must not span into asynchronous rendering. + /// + RendersubmitStartNV = 2, + + /// + /// RendersubmitEndNV should be called at the end of the render submission execution each frame. + /// + RendersubmitEndNV = 3, + + /// + /// PresentStartNV should be called just before vkQueuePresentKHR. + /// + PresentStartNV = 4, + + /// + /// PresentEndNV should be called when vkQueuePresentKHR returns. + /// + PresentEndNV = 5, + + /// + /// InputSampleNV should be called just before the application gathers input data. + /// + InputSampleNV = 6, + + /// + /// TriggerFlashNV should be called anywhere between VK_LATENCY_MARKER_SIMULATION_START_NV and VK_LATENCY_MARKER_SIMULATION_END_NV whenever a left mouse click occurs. + /// + TriggerFlashNV = 7, + + /// + /// OutOfBandRendersubmitStartNV + /// + OutOfBandRendersubmitStartNV = 8, + + /// + /// OutOfBandRendersubmitEndNV + /// + OutOfBandRendersubmitEndNV = 9, + + /// + /// OutOfBandPresentStartNV + /// + OutOfBandPresentStartNV = 10, + + /// + /// OutOfBandPresentEndNV + /// + OutOfBandPresentEndNV = 11, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkLayerSettingTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkLayerSettingTypeEXT.gen.cs new file mode 100644 index 0000000..3dbeec8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkLayerSettingTypeEXT.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLayerSettingTypeEXT - Type of the values that can be passed to a layer + /// + /// + /// + /// Possible values of VkLayerSettingEXT::type, specifying the type + /// of the data returned in VkLayerSettingEXT::pValues, are: + /// + /// + /// // Provided by VK_EXT_layer_settings + /// typedef enum VkLayerSettingTypeEXT { + /// VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0, + /// VK_LAYER_SETTING_TYPE_INT32_EXT = 1, + /// VK_LAYER_SETTING_TYPE_INT64_EXT = 2, + /// VK_LAYER_SETTING_TYPE_UINT32_EXT = 3, + /// VK_LAYER_SETTING_TYPE_UINT64_EXT = 4, + /// VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5, + /// VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6, + /// VK_LAYER_SETTING_TYPE_STRING_EXT = 7, + /// } VkLayerSettingTypeEXT; + /// + /// + public enum VkLayerSettingTypeEXT : int + { + /// + /// Bool32EXT specifies that the layer setting's type is basetype:VkBool32. + /// + Bool32EXT = 0, + + /// + /// Int32EXT specifies that the layer setting's type is signed 32-bit integer. + /// + Int32EXT = 1, + + /// + /// Int64EXT specifies that the layer setting's type is signed 64-bit integer. + /// + Int64EXT = 2, + + /// + /// UInt32EXT specifies that the layer setting's type is unsigned 32-bit integer. + /// + UInt32EXT = 3, + + /// + /// UInt64EXT specifies that the layer setting's type is unsigned 64-bit integer. + /// + UInt64EXT = 4, + + /// + /// Float32EXT specifies that the layer setting's type is 32-bit floating-point. + /// + Float32EXT = 5, + + /// + /// Float64EXT specifies that the layer setting's type is 64-bit floating-point. + /// + Float64EXT = 6, + + /// + /// StringEXT specifies that the layer setting's type is a pointer to a null-terminated UTF-8 string. + /// + StringEXT = 7, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkLayeredDriverUnderlyingApiMSFT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkLayeredDriverUnderlyingApiMSFT.gen.cs new file mode 100644 index 0000000..d9556ee --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkLayeredDriverUnderlyingApiMSFT.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLayeredDriverUnderlyingApiMSFT - Layered driver underlying APIs + /// + /// + /// + /// Underlying APIs which may: be returned in + /// VkPhysicalDeviceLayeredDriverPropertiesMSFT::underlyingAPI are: + /// + /// + /// // Provided by VK_MSFT_layered_driver + /// typedef enum VkLayeredDriverUnderlyingApiMSFT { + /// VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT = 0, + /// VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT = 1, + /// } VkLayeredDriverUnderlyingApiMSFT; + /// + /// + public enum VkLayeredDriverUnderlyingApiMSFT : int + { + /// + /// NoneMSFT + /// + NoneMSFT = 0, + + /// + /// D3D12MSFT + /// + D3D12MSFT = 1, + + /// + /// MaxEnumMSFT + /// + MaxEnumMSFT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkLineRasterizationMode.gen.cs b/Brutal.Vulkan/Generated/Enums/VkLineRasterizationMode.gen.cs new file mode 100644 index 0000000..35cce90 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkLineRasterizationMode.gen.cs @@ -0,0 +1,105 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLineRasterizationMode - Line rasterization modes + /// + /// + /// + /// Possible values of + /// VkPipelineRasterizationLineStateCreateInfo::lineRasterizationMode, + /// specifying the line rasterization mode, are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef enum VkLineRasterizationMode { + /// VK_LINE_RASTERIZATION_MODE_DEFAULT = 0, + /// VK_LINE_RASTERIZATION_MODE_RECTANGULAR = 1, + /// VK_LINE_RASTERIZATION_MODE_BRESENHAM = 2, + /// VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH = 3, + /// // Provided by VK_EXT_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT, + /// // Provided by VK_EXT_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, + /// // Provided by VK_EXT_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM, + /// // Provided by VK_EXT_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, + /// // Provided by VK_KHR_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = VK_LINE_RASTERIZATION_MODE_DEFAULT, + /// // Provided by VK_KHR_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, + /// // Provided by VK_KHR_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = VK_LINE_RASTERIZATION_MODE_BRESENHAM, + /// // Provided by VK_KHR_line_rasterization + /// VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, + /// } VkLineRasterizationMode; + /// + /// + public enum VkLineRasterizationMode : int + { + /// + /// Default is equivalent to VK_LINE_RASTERIZATION_MODE_RECTANGULAR if VkPhysicalDeviceLimits::strictLines is VK_TRUE, otherwise lines are drawn as non-strictLines parallelograms. Both of these modes are defined in Basic Line Segment Rasterization^. + /// + Default = 0, + + /// + /// Rectangular specifies lines drawn as if they were rectangles extruded from the line + /// + Rectangular = 1, + + /// + /// Bresenham specifies lines drawn by determining which pixel diamonds the line intersects and exits, as defined in Bresenham Line Segment Rasterization^. + /// + Bresenham = 2, + + /// + /// RectangularSmooth specifies lines drawn if they were rectangles extruded from the line, with alpha falloff, as defined in Smooth Lines^. + /// + RectangularSmooth = 3, + + /// + /// DefaultEXT + /// + DefaultEXT = Default, + + /// + /// RectangularEXT + /// + RectangularEXT = Rectangular, + + /// + /// BresenhamEXT + /// + BresenhamEXT = Bresenham, + + /// + /// RectangularSmoothEXT + /// + RectangularSmoothEXT = RectangularSmooth, + + /// + /// DefaultKHR + /// + DefaultKHR = Default, + + /// + /// RectangularKHR + /// + RectangularKHR = Rectangular, + + /// + /// BresenhamKHR + /// + BresenhamKHR = Bresenham, + + /// + /// RectangularSmoothKHR + /// + RectangularSmoothKHR = RectangularSmooth, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkLogicOp.gen.cs b/Brutal.Vulkan/Generated/Enums/VkLogicOp.gen.cs new file mode 100644 index 0000000..a463d42 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkLogicOp.gen.cs @@ -0,0 +1,129 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLogicOp - Framebuffer logical operations + /// + /// + /// + /// Logical operations are controlled by the logicOpEnable and + /// logicOp members of VkPipelineColorBlendStateCreateInfo. + /// If logicOpEnable is VK_TRUE, then a logical operation selected + /// by logicOp is applied between each color attachment and the fragment's + /// corresponding output value, and blending of all attachments is treated as if + /// it were disabled. + /// Any attachments using color formats for which logical operations are not + /// supported simply pass through the color values unmodified. + /// The logical operation is applied independently for each of the red, green, + /// blue, and alpha components. + /// The logicOp is selected from the following operations: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkLogicOp { + /// VK_LOGIC_OP_CLEAR = 0, + /// VK_LOGIC_OP_AND = 1, + /// VK_LOGIC_OP_AND_REVERSE = 2, + /// VK_LOGIC_OP_COPY = 3, + /// VK_LOGIC_OP_AND_INVERTED = 4, + /// VK_LOGIC_OP_NO_OP = 5, + /// VK_LOGIC_OP_XOR = 6, + /// VK_LOGIC_OP_OR = 7, + /// VK_LOGIC_OP_NOR = 8, + /// VK_LOGIC_OP_EQUIVALENT = 9, + /// VK_LOGIC_OP_INVERT = 10, + /// VK_LOGIC_OP_OR_REVERSE = 11, + /// VK_LOGIC_OP_COPY_INVERTED = 12, + /// VK_LOGIC_OP_OR_INVERTED = 13, + /// VK_LOGIC_OP_NAND = 14, + /// VK_LOGIC_OP_SET = 15, + /// } VkLogicOp; + /// + /// + public enum VkLogicOp : int + { + /// + /// Clear + /// + Clear = 0, + + /// + /// And + /// + And = 1, + + /// + /// AndReverse + /// + AndReverse = 2, + + /// + /// Copy + /// + Copy = 3, + + /// + /// AndInverted + /// + AndInverted = 4, + + /// + /// NoOp + /// + NoOp = 5, + + /// + /// Xor + /// + Xor = 6, + + /// + /// Or + /// + Or = 7, + + /// + /// Nor + /// + Nor = 8, + + /// + /// Equivalent + /// + Equivalent = 9, + + /// + /// Invert + /// + Invert = 10, + + /// + /// OrReverse + /// + OrReverse = 11, + + /// + /// CopyInverted + /// + CopyInverted = 12, + + /// + /// OrInverted + /// + OrInverted = 13, + + /// + /// Nand + /// + Nand = 14, + + /// + /// Set + /// + Set = 15, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryAllocateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryAllocateFlags.gen.cs new file mode 100644 index 0000000..68dc3e8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryAllocateFlags.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryAllocateFlagBits - Bitmask specifying flags for a device memory allocation + /// + /// + /// + /// Bits which can be set in VkMemoryAllocateFlagsInfo::flags, + /// controlling device memory allocation, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkMemoryAllocateFlagBits { + /// VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001, + /// // Provided by VK_VERSION_1_2 + /// VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT = 0x00000002, + /// // Provided by VK_VERSION_1_2 + /// VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000004, + /// // Provided by VK_EXT_zero_initialize_device_memory + /// VK_MEMORY_ALLOCATE_ZERO_INITIALIZE_BIT_EXT = 0x00000008, + /// // Provided by VK_KHR_device_group + /// VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT, + /// // Provided by VK_KHR_buffer_device_address + /// VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT, + /// // Provided by VK_KHR_buffer_device_address + /// VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, + /// } VkMemoryAllocateFlagBits; + /// + /// + [Flags] + public enum VkMemoryAllocateFlags : int + { + /// No flags set. + None = 0, + + /// + /// DeviceMaskBit specifies that memory will be allocated for the devices in VkMemoryAllocateFlagsInfo::deviceMask. + /// + DeviceMaskBit = 0x00000001, + + /// + /// DeviceAddressBit + /// + DeviceAddressBit = 0x00000002, + + /// + /// DeviceAddressCaptureReplayBit + /// + DeviceAddressCaptureReplayBit = 0x00000004, + + /// + /// ZeroInitializeBitEXT + /// + ZeroInitializeBitEXT = 0x00000008, + + /// + /// DeviceMaskBitKHR + /// + DeviceMaskBitKHR = DeviceMaskBit, + + /// + /// DeviceAddressBitKHR + /// + DeviceAddressBitKHR = DeviceAddressBit, + + /// + /// DeviceAddressCaptureReplayBitKHR + /// + DeviceAddressCaptureReplayBitKHR = DeviceAddressCaptureReplayBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryDecompressionMethodFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryDecompressionMethodFlagsEXT.gen.cs new file mode 100644 index 0000000..1aef16e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryDecompressionMethodFlagsEXT.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryDecompressionMethodFlagBitsEXT - List the supported memory decompression methods + /// + /// + /// + /// Bits which can be set in + /// VkDecompressMemoryRegionEXT::decompressionMethod + /// specifying the decompression method to select, or returned in + /// VkPhysicalDeviceMemoryDecompressionPropertiesEXT::decompressionMethods + /// specifying the available decompression methods are: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// // Flag bits for VkMemoryDecompressionMethodFlagBitsEXT + /// typedef VkFlags64 VkMemoryDecompressionMethodFlagBitsEXT; + /// static const VkMemoryDecompressionMethodFlagBitsEXT VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT = 0x00000001ULL; + /// static const VkMemoryDecompressionMethodFlagBitsEXT VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 0x00000001ULL; + /// + /// + [Flags] + public enum VkMemoryDecompressionMethodFlagsEXT : ulong + { + /// No flags set. + None = 0, + + /// + /// Gdeflate10BitEXT specifies that the GDeflate 1.0 algorithm is used to decompress data. + /// + Gdeflate10BitEXT = 0x00000001, + + /// + /// Gdeflate10BitNV + /// + Gdeflate10BitNV = 0x00000001, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryHeapFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryHeapFlags.gen.cs new file mode 100644 index 0000000..02930f2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryHeapFlags.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryHeapFlagBits - Bitmask specifying attribute flags for a heap + /// + /// + /// + /// Bits which may: be set in VkMemoryHeap::flags, indicating + /// attribute flags for the heap, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkMemoryHeapFlagBits { + /// VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, + /// // Provided by VK_VERSION_1_1 + /// VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM = 0x00000008, + /// // Provided by VK_KHR_device_group_creation + /// VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT, + /// } VkMemoryHeapFlagBits; + /// + /// + [Flags] + public enum VkMemoryHeapFlags : int + { + /// No flags set. + None = 0, + + /// + /// DeviceLocalBit specifies that the heap corresponds to device-local memory. Device-local memory may: have different performance characteristics than host-local memory, and may: support different memory property flags. + /// + DeviceLocalBit = 0x00000001, + + /// + /// MultiInstanceBit + /// + MultiInstanceBit = 0x00000002, + + /// + /// TileMemoryBitQCOM + /// + TileMemoryBitQCOM = 0x00000008, + + /// + /// MultiInstanceBitKHR + /// + MultiInstanceBitKHR = MultiInstanceBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryMapFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryMapFlags.gen.cs new file mode 100644 index 0000000..8d6ec63 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryMapFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryMapFlagBits - Bitmask specifying additional parameters of a memory map + /// + /// + /// + /// Bits which can be set in vkMapMemory::flags and + /// VkMemoryMapInfo::flags, specifying additional properties of a + /// memory map, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkMemoryMapFlagBits { + /// // Provided by VK_EXT_map_memory_placed + /// VK_MEMORY_MAP_PLACED_BIT_EXT = 0x00000001, + /// } VkMemoryMapFlagBits; + /// + /// + [Flags] + public enum VkMemoryMapFlags : int + { + /// No flags set. + None = 0, + + /// + /// PlacedBitEXT requests that the implementation place the memory map at the virtual address specified by the application via VkMemoryMapPlacedInfoEXT::pPlacedAddress, replacing any existing mapping at that address. This flag must not be used with vkMapMemory as there is no way to specify the placement address. + /// + PlacedBitEXT = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryOverallocationBehaviorAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryOverallocationBehaviorAMD.gen.cs new file mode 100644 index 0000000..fa7c680 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryOverallocationBehaviorAMD.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryOverallocationBehaviorAMD - Specify memory overallocation behavior + /// + /// + /// + /// Possible values for + /// VkDeviceMemoryOverallocationCreateInfoAMD::overallocationBehavior + /// include: + /// + /// + /// // Provided by VK_AMD_memory_overallocation_behavior + /// typedef enum VkMemoryOverallocationBehaviorAMD { + /// VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0, + /// VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1, + /// VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2, + /// } VkMemoryOverallocationBehaviorAMD; + /// + /// + public enum VkMemoryOverallocationBehaviorAMD : int + { + /// + /// DefaultAMD lets the implementation decide if overallocation is allowed. + /// + DefaultAMD = 0, + + /// + /// AllowedAMD specifies overallocation is allowed if platform permits. + /// + AllowedAMD = 1, + + /// + /// DisallowedAMD specifies the application is not allowed to allocate device memory beyond the heap sizes reported by VkPhysicalDeviceMemoryProperties. Allocations that are not explicitly made by the application within the scope of the Vulkan instance are not accounted for. + /// + DisallowedAMD = 2, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryPropertyFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryPropertyFlags.gen.cs new file mode 100644 index 0000000..eed2f17 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryPropertyFlags.gen.cs @@ -0,0 +1,86 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryPropertyFlagBits - Bitmask specifying properties for a memory type + /// + /// + /// + /// Bits which may: be set in VkMemoryType::propertyFlags, + /// indicating properties of a memory type, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkMemoryPropertyFlagBits { + /// VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, + /// VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, + /// VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, + /// VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, + /// VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, + /// // Provided by VK_VERSION_1_1 + /// VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020, + /// // Provided by VK_AMD_device_coherent_memory + /// VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD = 0x00000040, + /// // Provided by VK_AMD_device_coherent_memory + /// VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD = 0x00000080, + /// // Provided by VK_NV_external_memory_rdma + /// VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV = 0x00000100, + /// } VkMemoryPropertyFlagBits; + /// + /// + [Flags] + public enum VkMemoryPropertyFlags : int + { + /// No flags set. + None = 0, + + /// + /// DeviceLocalBit bit specifies that memory allocated with this type is the most efficient for device access. This property will be set if and only if the memory type belongs to a heap with the VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set. + /// + DeviceLocalBit = 0x00000001, + + /// + /// HostVisibleBit bit specifies that memory allocated with this type can be mapped for host access using vkMapMemory. + /// + HostVisibleBit = 0x00000002, + + /// + /// HostCoherentBit + /// + HostCoherentBit = 0x00000004, + + /// + /// HostCachedBit bit specifies that memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent. + /// + HostCachedBit = 0x00000008, + + /// + /// LazilyAllocatedBit bit specifies that the memory type only allows device access to the memory. Memory types must not have both VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT and VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set. Additionally, the object's backing memory may: be provided by the implementation lazily as specified in Lazily Allocated Memory^. + /// + LazilyAllocatedBit = 0x00000010, + + /// + /// ProtectedBit + /// + ProtectedBit = 0x00000020, + + /// + /// DeviceCoherentBitAMD + /// + DeviceCoherentBitAMD = 0x00000040, + + /// + /// DeviceUncachedBitAMD + /// + DeviceUncachedBitAMD = 0x00000080, + + /// + /// RdmaCapableBitNV + /// + RdmaCapableBitNV = 0x00000100, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMemoryUnmapFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMemoryUnmapFlags.gen.cs new file mode 100644 index 0000000..587e21c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMemoryUnmapFlags.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryUnmapFlagBits - Bitmask specifying additional parameters of a memory unmap + /// + /// + /// + /// Bits which can be set in VkMemoryUnmapInfo::flags, specifying + /// additional properties of a memory unmap, are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef enum VkMemoryUnmapFlagBits { + /// // Provided by VK_EXT_map_memory_placed + /// VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001, + /// } VkMemoryUnmapFlagBits; + /// + /// + [Flags] + public enum VkMemoryUnmapFlags : int + { + /// No flags set. + None = 0, + + /// + /// ReserveBitEXT requests that virtual address range currently occupied by the memory map remain reserved after the vkUnmapMemory2 call completes. Future system memory map operations or calls to vkMapMemory or vkMapMemory2 will not return addresses in that range unless the range has since been unreserved by the client or the mapping is explicitly placed in that range by calling vkMapMemory2 with VK_MEMORY_MAP_PLACED_BIT_EXT, or doing the system memory map equivalent. When VK_MEMORY_UNMAP_RESERVE_BIT_EXT is set, the memory unmap operation may: fail, in which case the memory object will remain host mapped and vkUnmapMemory2 will return VK_ERROR_MEMORY_MAP_FAILED. + /// + ReserveBitEXT = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMicromapCreateFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMicromapCreateFlagsEXT.gen.cs new file mode 100644 index 0000000..0fdf123 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMicromapCreateFlagsEXT.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapCreateFlagBitsEXT - Bitmask specifying additional creation parameters for micromap + /// + /// + /// + /// Bits which can be set in VkMicromapCreateInfoEXT::createFlags, + /// specifying additional creation parameters for micromaps, are: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef enum VkMicromapCreateFlagBitsEXT { + /// VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 0x00000001, + /// } VkMicromapCreateFlagBitsEXT; + /// + /// + [Flags] + public enum VkMicromapCreateFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// DeviceAddressCaptureReplayBitEXT specifies that the micromap's address can be saved and reused on a subsequent run. + /// + DeviceAddressCaptureReplayBitEXT = 0x00000001, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkMicromapTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkMicromapTypeEXT.gen.cs new file mode 100644 index 0000000..4ac4615 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkMicromapTypeEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapTypeEXT - Type of micromap + /// + /// + /// + /// :refpage: VkMicromapTypeEXT + /// + /// + /// Values which can be set in VkMicromapCreateInfoEXT::type + /// specifying the type of micromap, are: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef enum VkMicromapTypeEXT { + /// VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV = 1000397000, + /// #endif + /// } VkMicromapTypeEXT; + /// + /// + public enum VkMicromapTypeEXT : int + { + /// + /// OpacityMicromapEXT is a micromap containing data to control the opacity of a triangle. + /// + OpacityMicromapEXT = 0, + + /// + /// DisplacementMicromapNV + /// + DisplacementMicromapNV = 1000397000, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkNeuralAcceleratorStatisticsModeARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkNeuralAcceleratorStatisticsModeARM.gen.cs new file mode 100644 index 0000000..f433fe0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkNeuralAcceleratorStatisticsModeARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkNeuralAcceleratorStatisticsModeARM - Enum specifying the mode of operation for neural accelerator statistics + /// + /// + /// + /// The available values for VkNeuralAcceleratorStatisticsModeARM are: + /// + /// + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// typedef enum VkNeuralAcceleratorStatisticsModeARM { + /// VK_NEURAL_ACCELERATOR_STATISTICS_MODE_DISABLED_ARM = 0, + /// VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS0_ARM = 1, + /// VK_NEURAL_ACCELERATOR_STATISTICS_MODE_STATISTICS1_ARM = 2, + /// } VkNeuralAcceleratorStatisticsModeARM; + /// + /// + public enum VkNeuralAcceleratorStatisticsModeARM : int + { + /// + /// DisabledARM specifies that neural accelerator statistics are disabled. + /// + DisabledARM = 0, + + /// + /// Statistics0ARM specifies the `statistics0` mode of operation. + /// + Statistics0ARM = 1, + + /// + /// Statistics1ARM specifies the `statistics1` mode of operation. + /// + Statistics1ARM = 2, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkObjectType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkObjectType.gen.cs new file mode 100644 index 0000000..f5bbf32 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkObjectType.gen.cs @@ -0,0 +1,445 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkObjectType - Specify an enumeration to track object handle types + /// + /// + /// + /// The VkObjectType enumeration defines values, each of which corresponds + /// to a specific Vulkan handle type. + /// These values can be used to associate debug information with a particular + /// type of object through one or more extensions. + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkObjectType { + /// VK_OBJECT_TYPE_UNKNOWN = 0, + /// VK_OBJECT_TYPE_INSTANCE = 1, + /// VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2, + /// VK_OBJECT_TYPE_DEVICE = 3, + /// VK_OBJECT_TYPE_QUEUE = 4, + /// VK_OBJECT_TYPE_SEMAPHORE = 5, + /// VK_OBJECT_TYPE_COMMAND_BUFFER = 6, + /// VK_OBJECT_TYPE_FENCE = 7, + /// VK_OBJECT_TYPE_DEVICE_MEMORY = 8, + /// VK_OBJECT_TYPE_BUFFER = 9, + /// VK_OBJECT_TYPE_IMAGE = 10, + /// VK_OBJECT_TYPE_EVENT = 11, + /// VK_OBJECT_TYPE_QUERY_POOL = 12, + /// VK_OBJECT_TYPE_BUFFER_VIEW = 13, + /// VK_OBJECT_TYPE_IMAGE_VIEW = 14, + /// VK_OBJECT_TYPE_SHADER_MODULE = 15, + /// VK_OBJECT_TYPE_PIPELINE_CACHE = 16, + /// VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17, + /// VK_OBJECT_TYPE_RENDER_PASS = 18, + /// VK_OBJECT_TYPE_PIPELINE = 19, + /// VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20, + /// VK_OBJECT_TYPE_SAMPLER = 21, + /// VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22, + /// VK_OBJECT_TYPE_DESCRIPTOR_SET = 23, + /// VK_OBJECT_TYPE_FRAMEBUFFER = 24, + /// VK_OBJECT_TYPE_COMMAND_POOL = 25, + /// // Provided by VK_VERSION_1_1 + /// VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000, + /// // Provided by VK_VERSION_1_1 + /// VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000, + /// // Provided by VK_VERSION_1_3 + /// VK_OBJECT_TYPE_PRIVATE_DATA_SLOT = 1000295000, + /// // Provided by VK_KHR_surface + /// VK_OBJECT_TYPE_SURFACE_KHR = 1000000000, + /// // Provided by VK_KHR_swapchain + /// VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000, + /// // Provided by VK_KHR_display + /// VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000, + /// // Provided by VK_KHR_display + /// VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001, + /// // Provided by VK_EXT_debug_report + /// VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000, + /// // Provided by VK_KHR_video_queue + /// VK_OBJECT_TYPE_VIDEO_SESSION_KHR = 1000023000, + /// // Provided by VK_KHR_video_queue + /// VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR = 1000023001, + /// // Provided by VK_NVX_binary_import + /// VK_OBJECT_TYPE_CU_MODULE_NVX = 1000029000, + /// // Provided by VK_NVX_binary_import + /// VK_OBJECT_TYPE_CU_FUNCTION_NVX = 1000029001, + /// // Provided by VK_EXT_debug_utils + /// VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000128000, + /// // Provided by VK_AMD_gpa_interface + /// VK_OBJECT_TYPE_GPA_SESSION_AMD = 1000133000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000, + /// // Provided by VK_EXT_validation_cache + /// VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000, + /// // Provided by VK_NV_ray_tracing + /// VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000, + /// // Provided by VK_INTEL_performance_query + /// VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL = 1000210000, + /// // Provided by VK_KHR_deferred_host_operations + /// VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR = 1000268000, + /// // Provided by VK_NV_device_generated_commands + /// VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV = 1000277000, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_OBJECT_TYPE_CUDA_MODULE_NV = 1000307000, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_OBJECT_TYPE_CUDA_FUNCTION_NV = 1000307001, + /// #endif + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA = 1000366000, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OBJECT_TYPE_MICROMAP_EXT = 1000396000, + /// // Provided by VK_ARM_tensors + /// VK_OBJECT_TYPE_TENSOR_ARM = 1000460000, + /// // Provided by VK_ARM_tensors + /// VK_OBJECT_TYPE_TENSOR_VIEW_ARM = 1000460001, + /// // Provided by VK_NV_optical_flow + /// VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV = 1000464000, + /// // Provided by VK_EXT_shader_object + /// VK_OBJECT_TYPE_SHADER_EXT = 1000482000, + /// // Provided by VK_KHR_pipeline_binary + /// VK_OBJECT_TYPE_PIPELINE_BINARY_KHR = 1000483000, + /// // Provided by VK_ARM_data_graph + /// VK_OBJECT_TYPE_DATA_GRAPH_PIPELINE_SESSION_ARM = 1000507000, + /// // Provided by VK_NV_external_compute_queue + /// VK_OBJECT_TYPE_EXTERNAL_COMPUTE_QUEUE_NV = 1000556000, + /// // Provided by VK_EXT_device_generated_commands + /// VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT = 1000572000, + /// // Provided by VK_EXT_device_generated_commands + /// VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT = 1000572001, + /// // Provided by VK_ARM_shader_instrumentation + /// VK_OBJECT_TYPE_SHADER_INSTRUMENTATION_ARM = 1000607000, + /// // Provided by VK_KHR_descriptor_update_template + /// VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, + /// // Provided by VK_EXT_private_data + /// VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT, + /// } VkObjectType; + /// + /// + public enum VkObjectType : int + { + /// + /// Unknown + /// + Unknown = 0, + + /// + /// Instance + /// + Instance = 1, + + /// + /// PhysicalDevice + /// + PhysicalDevice = 2, + + /// + /// Device + /// + Device = 3, + + /// + /// Queue + /// + Queue = 4, + + /// + /// Semaphore + /// + Semaphore = 5, + + /// + /// CommandBuffer + /// + CommandBuffer = 6, + + /// + /// Fence + /// + Fence = 7, + + /// + /// DeviceMemory + /// + DeviceMemory = 8, + + /// + /// Buffer + /// + Buffer = 9, + + /// + /// Image + /// + Image = 10, + + /// + /// Event + /// + Event = 11, + + /// + /// QueryPool + /// + QueryPool = 12, + + /// + /// BufferView + /// + BufferView = 13, + + /// + /// ImageView + /// + ImageView = 14, + + /// + /// ShaderModule + /// + ShaderModule = 15, + + /// + /// PipelineCache + /// + PipelineCache = 16, + + /// + /// PipelineLayout + /// + PipelineLayout = 17, + + /// + /// RenderPass + /// + RenderPass = 18, + + /// + /// Pipeline + /// + Pipeline = 19, + + /// + /// DescriptorSetLayout + /// + DescriptorSetLayout = 20, + + /// + /// Sampler + /// + Sampler = 21, + + /// + /// DescriptorPool + /// + DescriptorPool = 22, + + /// + /// DescriptorSet + /// + DescriptorSet = 23, + + /// + /// Framebuffer + /// + Framebuffer = 24, + + /// + /// CommandPool + /// + CommandPool = 25, + + /// + /// DescriptorUpdateTemplate + /// + DescriptorUpdateTemplate = 1000085000, + + /// + /// SamplerYCbCrConversion + /// + SamplerYCbCrConversion = 1000156000, + + /// + /// PrivateDataSlot + /// + PrivateDataSlot = 1000295000, + + /// + /// SurfaceKHR + /// + SurfaceKHR = 1000000000, + + /// + /// SwapchainKHR + /// + SwapchainKHR = 1000001000, + + /// + /// DisplayKHR + /// + DisplayKHR = 1000002000, + + /// + /// DisplayModeKHR + /// + DisplayModeKHR = 1000002001, + + /// + /// DebugReportCallbackEXT + /// + DebugReportCallbackEXT = 1000011000, + + /// + /// VideoSessionKHR + /// + VideoSessionKHR = 1000023000, + + /// + /// VideoSessionParametersKHR + /// + VideoSessionParametersKHR = 1000023001, + + /// + /// CuModuleNVX + /// + CuModuleNVX = 1000029000, + + /// + /// CuFunctionNVX + /// + CuFunctionNVX = 1000029001, + + /// + /// DebugUtilsMessengerEXT + /// + DebugUtilsMessengerEXT = 1000128000, + + /// + /// GpaSessionAMD + /// + GpaSessionAMD = 1000133000, + + /// + /// AccelerationStructureKHR + /// + AccelerationStructureKHR = 1000150000, + + /// + /// ValidationCacheEXT + /// + ValidationCacheEXT = 1000160000, + + /// + /// AccelerationStructureNV + /// + AccelerationStructureNV = 1000165000, + + /// + /// PerformanceConfigurationINTEL + /// + PerformanceConfigurationINTEL = 1000210000, + + /// + /// DeferredOperationKHR + /// + DeferredOperationKHR = 1000268000, + + /// + /// IndirectCommandsLayoutNV + /// + IndirectCommandsLayoutNV = 1000277000, + + /// + /// CudaModuleNV + /// + CudaModuleNV = 1000307000, + + /// + /// CudaFunctionNV + /// + CudaFunctionNV = 1000307001, + + /// + /// BufferCollectionFUCHSIA + /// + BufferCollectionFUCHSIA = 1000366000, + + /// + /// MicromapEXT + /// + MicromapEXT = 1000396000, + + /// + /// TensorARM + /// + TensorARM = 1000460000, + + /// + /// TensorViewARM + /// + TensorViewARM = 1000460001, + + /// + /// OpticalFlowSessionNV + /// + OpticalFlowSessionNV = 1000464000, + + /// + /// ShaderEXT + /// + ShaderEXT = 1000482000, + + /// + /// PipelineBinaryKHR + /// + PipelineBinaryKHR = 1000483000, + + /// + /// DataGraphPipelineSessionARM + /// + DataGraphPipelineSessionARM = 1000507000, + + /// + /// ExternalComputeQueueNV + /// + ExternalComputeQueueNV = 1000556000, + + /// + /// IndirectCommandsLayoutEXT + /// + IndirectCommandsLayoutEXT = 1000572000, + + /// + /// IndirectExecutionSetEXT + /// + IndirectExecutionSetEXT = 1000572001, + + /// + /// ShaderInstrumentationARM + /// + ShaderInstrumentationARM = 1000607000, + + /// + /// DescriptorUpdateTemplateKHR + /// + DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate, + + /// + /// SamplerYCbCrConversionKHR + /// + SamplerYCbCrConversionKHR = SamplerYCbCrConversion, + + /// + /// PrivateDataSlotEXT + /// + PrivateDataSlotEXT = PrivateDataSlot, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpacityMicromapFormatKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpacityMicromapFormatKHR.gen.cs new file mode 100644 index 0000000..36ac501 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpacityMicromapFormatKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpacityMicromapFormatKHR - Format enum for opacity micromaps + /// + /// + /// + /// :refpage: VkOpacityMicromapFormatKHR + /// + /// + /// Formats which can be set in VkMicromapUsageKHR::format and + /// VkMicromapTriangleKHR::format for micromap builds, are: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef enum VkOpacityMicromapFormatKHR { + /// VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR = 1, + /// VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR = 2, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT = VK_OPACITY_MICROMAP_FORMAT_2_STATE_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT = VK_OPACITY_MICROMAP_FORMAT_4_STATE_KHR, + /// } VkOpacityMicromapFormatKHR; + /// + /// + public enum VkOpacityMicromapFormatKHR : int + { + /// + /// _2StateKHR specifies that the given micromap format has one bit per subtriangle encoding either fully opaque or fully transparent. + /// + _2StateKHR = 1, + + /// + /// _4StateKHR specifies that the given micromap format has two bits per subtriangle encoding four modes which can be interpreted as described in Ray Opacity Micromap^. [NOTE] + /// + _4StateKHR = 2, + + /// + /// _2StateEXT + /// + _2StateEXT = _2StateKHR, + + /// + /// _4StateEXT + /// + _4StateEXT = _4StateKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpacityMicromapSpecialIndexKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpacityMicromapSpecialIndexKHR.gen.cs new file mode 100644 index 0000000..3130d5f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpacityMicromapSpecialIndexKHR.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpacityMicromapSpecialIndexKHR - Enum for special indices in the opacity micromap + /// + /// + /// + /// :refpage: VkOpacityMicromapSpecialIndexKHR + /// + /// + /// The VkOpacityMicromapSpecialIndexKHR enumeration is defined as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef enum VkOpacityMicromapSpecialIndexKHR { + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR = -1, + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR = -2, + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR = -3, + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR = -4, + /// // Provided by VK_EXT_opacity_micromap with VK_NV_cluster_acceleration_structure + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV = -5, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_KHR, + /// // Provided by VK_EXT_opacity_micromap + /// VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_KHR, + /// } VkOpacityMicromapSpecialIndexKHR; + /// + /// + public enum VkOpacityMicromapSpecialIndexKHR : int + { + /// + /// FullyTransparentKHR specifies that the entire triangle is fully transparent. + /// + FullyTransparentKHR = -1, + + /// + /// FullyOpaqueKHR specifies that the entire triangle is fully opaque. + /// + FullyOpaqueKHR = -2, + + /// + /// FullyUnknownTransparentKHR specifies that the entire triangle is unknown-transparent. + /// + FullyUnknownTransparentKHR = -3, + + /// + /// FullyUnknownOpaqueKHR specifies that the entire triangle is unknown-opaque. + /// + FullyUnknownOpaqueKHR = -4, + + /// + /// ClusterGeometryDisableOpacityMicromapNV + /// + ClusterGeometryDisableOpacityMicromapNV = -5, + + /// + /// FullyTransparentEXT + /// + FullyTransparentEXT = FullyTransparentKHR, + + /// + /// FullyOpaqueEXT + /// + FullyOpaqueEXT = FullyOpaqueKHR, + + /// + /// FullyUnknownTransparentEXT + /// + FullyUnknownTransparentEXT = FullyUnknownTransparentKHR, + + /// + /// FullyUnknownOpaqueEXT + /// + FullyUnknownOpaqueEXT = FullyUnknownOpaqueKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpticalFlowExecuteFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowExecuteFlagsNV.gen.cs new file mode 100644 index 0000000..e400a2d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowExecuteFlagsNV.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowExecuteFlagBitsNV - Bits specifying flags for an optical flow vector calculation + /// + /// + /// + /// Bits which can be set in VkOpticalFlowExecuteInfoNV::flags, + /// controlling optical flow execution, are: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef enum VkOpticalFlowExecuteFlagBitsNV { + /// VK_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 0x00000001, + /// } VkOpticalFlowExecuteFlagBitsNV; + /// + /// + [Flags] + public enum VkOpticalFlowExecuteFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// DisableTemporalHintsBitNV specifies that temporal hints from previously generated flow vectors are not used. If temporal hints are enabled, optical flow vectors from previous vkCmdOpticalFlowExecuteNV call are automatically used as hints for the current vkCmdOpticalFlowExecuteNV call, to take advantage of temporal correlation in a video sequence. Temporal hints should be disabled if there is a-priori knowledge of no temporal correlation (e.g. a scene change, independent successive frame pairs). + /// + DisableTemporalHintsBitNV = 0x00000001, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpticalFlowGridSizeFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowGridSizeFlagsNV.gen.cs new file mode 100644 index 0000000..5c3f1ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowGridSizeFlagsNV.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowGridSizeFlagBitsNV - Bits specifying grid sizes for optical flow operations + /// + /// + /// + /// Optical flow vectors are generated block-wise, one vector for each block of + /// NxN pixels (referred to as grid). + /// + /// + /// Bits which can be set in + /// VkOpticalFlowSessionCreateInfoNV::outputGridSize and + /// VkOpticalFlowSessionCreateInfoNV::hintGridSize, or which are + /// returned in + /// VkPhysicalDeviceOpticalFlowPropertiesNV::supportedOutputGridSizes + /// and + /// VkPhysicalDeviceOpticalFlowPropertiesNV::supportedHintGridSizes + /// controlling optical flow grid sizes, are: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef enum VkOpticalFlowGridSizeFlagBitsNV { + /// VK_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0, + /// VK_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 0x00000001, + /// VK_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 0x00000002, + /// VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 0x00000004, + /// VK_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 0x00000008, + /// } VkOpticalFlowGridSizeFlagBitsNV; + /// + /// + [Flags] + public enum VkOpticalFlowGridSizeFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// UnknownNV + /// + UnknownNV = 0, + + /// + /// _1X1BitNV specifies that grid is 1x1 pixel. + /// + _1X1BitNV = 0x00000001, + + /// + /// _2X2BitNV specifies that grid is 2x2 pixel. + /// + _2X2BitNV = 0x00000002, + + /// + /// _4X4BitNV specifies that grid is 4x4 pixel. + /// + _4X4BitNV = 0x00000004, + + /// + /// _8X8BitNV specifies that grid is 8x8 pixel. + /// + _8X8BitNV = 0x00000008, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpticalFlowPerformanceLevelNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowPerformanceLevelNV.gen.cs new file mode 100644 index 0000000..66626f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowPerformanceLevelNV.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowPerformanceLevelNV - Optical flow performance level types + /// + /// + /// + /// Optical flow exposes performance levels which the application can choose + /// based on the desired performance and quality requirement. + /// + /// + /// The optical flow performance level types are defined with the following: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef enum VkOpticalFlowPerformanceLevelNV { + /// VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0, + /// VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1, + /// VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2, + /// VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3, + /// } VkOpticalFlowPerformanceLevelNV; + /// + /// + public enum VkOpticalFlowPerformanceLevelNV : int + { + /// + /// UnknownNV + /// + UnknownNV = 0, + + /// + /// SlowNV is a level with slower performance but higher quality. + /// + SlowNV = 1, + + /// + /// MediumNV is a level with medium performance and medium quality. + /// + MediumNV = 2, + + /// + /// FastNV is a preset with higher performance but lower quality. + /// + FastNV = 3, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionBindingPointNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionBindingPointNV.gen.cs new file mode 100644 index 0000000..e40af88 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionBindingPointNV.gen.cs @@ -0,0 +1,77 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowSessionBindingPointNV - Binding points of an optical flow session + /// + /// + /// + /// The optical flow session binding points are defined with the following: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef enum VkOpticalFlowSessionBindingPointNV { + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7, + /// VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8, + /// } VkOpticalFlowSessionBindingPointNV; + /// + /// + public enum VkOpticalFlowSessionBindingPointNV : int + { + /// + /// UnknownNV + /// + UnknownNV = 0, + + /// + /// InputNV specifies the binding point for the input frame. + /// + InputNV = 1, + + /// + /// ReferenceNV specifies the binding point for the input reference frame. + /// + ReferenceNV = 2, + + /// + /// HintNV specifies the binding point for the optional external hint flow vectors. + /// + HintNV = 3, + + /// + /// FlowVectorNV specifies the binding point for output flow vectors of default forward flow calculation. + /// + FlowVectorNV = 4, + + /// + /// BackwardFlowVectorNV specifies the binding point for the optional output flow vector map of optional backward flow calculation. + /// + BackwardFlowVectorNV = 5, + + /// + /// CostNV specifies the binding point for the optional output cost map of default forward flow calculation. + /// + CostNV = 6, + + /// + /// BackwardCostNV specifies the binding point for the optional output cost map of optional backward flow calculation. + /// + BackwardCostNV = 7, + + /// + /// GlobalFlowNV specifies the binding point for the optional global flow value of default forward flow calculation. + /// + GlobalFlowNV = 8, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionCreateFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionCreateFlagsNV.gen.cs new file mode 100644 index 0000000..030c807 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowSessionCreateFlagsNV.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowSessionCreateFlagBitsNV - Bits specifying flags for optical flow session + /// + /// + /// + /// Bits which can be set in + /// VkOpticalFlowSessionCreateInfoNV::flags, controlling optical + /// flow session operations, are: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef enum VkOpticalFlowSessionCreateFlagBitsNV { + /// VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 0x00000001, + /// VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 0x00000002, + /// VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 0x00000004, + /// VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 0x00000008, + /// VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 0x00000010, + /// } VkOpticalFlowSessionCreateFlagBitsNV; + /// + /// + [Flags] + public enum VkOpticalFlowSessionCreateFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// EnableHintBitNV specifies that a VkImageView with external flow vectors will be used as hints in performing the motion search and must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV. + /// + EnableHintBitNV = 0x00000001, + + /// + /// EnableCostBitNV specifies that the cost for the forward flow is generated in a VkImageView which must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV. Additionally, if VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV is also set, the cost for backward flow is generated in a VkImageView which must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV. The cost is the confidence level of the flow vector for each grid in the frame. The Cost implies how (in)accurate the flow vector is. Higher cost value implies the flow vector to be less accurate and vice-versa. + /// + EnableCostBitNV = 0x00000002, + + /// + /// EnableGlobalFlowBitNV specifies that a global flow vector is estimated from forward flow in a single pixel VkImageView which must be bound to VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV. + /// + EnableGlobalFlowBitNV = 0x00000004, + + /// + /// AllowRegionsBitNV specifies that regions of interest can be specified in VkOpticalFlowExecuteInfoNV. + /// + AllowRegionsBitNV = 0x00000008, + + /// + /// BothDirectionsBitNV specifies that backward flow is generated in addition to forward flow which is always generated. + /// + BothDirectionsBitNV = 0x00000010, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOpticalFlowUsageFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowUsageFlagsNV.gen.cs new file mode 100644 index 0000000..4a6d13c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOpticalFlowUsageFlagsNV.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowUsageFlagBitsNV - Bits specifying usage for optical flow operations + /// + /// + /// + /// Bits which can be set in VkOpticalFlowImageFormatInfoNV::usage, + /// controlling optical flow usage, are: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef enum VkOpticalFlowUsageFlagBitsNV { + /// VK_OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0, + /// VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 0x00000001, + /// VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 0x00000002, + /// VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV = 0x00000004, + /// VK_OPTICAL_FLOW_USAGE_COST_BIT_NV = 0x00000008, + /// VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 0x00000010, + /// } VkOpticalFlowUsageFlagBitsNV; + /// + /// + [Flags] + public enum VkOpticalFlowUsageFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// UnknownNV + /// + UnknownNV = 0, + + /// + /// InputBitNV specifies that the image can be used as input or reference frame for an optical flow operation. + /// + InputBitNV = 0x00000001, + + /// + /// OutputBitNV specifies that the image can be used as output flow vector map for an optical flow operation. + /// + OutputBitNV = 0x00000002, + + /// + /// HintBitNV specifies that the image can be used as hint flow vector map for an optical flow operation. + /// + HintBitNV = 0x00000004, + + /// + /// CostBitNV specifies that the image can be used as output cost map for an optical flow operation. + /// + CostBitNV = 0x00000008, + + /// + /// GlobalFlowBitNV specifies that the image can be used as global flow vector for an optical flow operation. + /// + GlobalFlowBitNV = 0x00000010, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkOutOfBandQueueTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkOutOfBandQueueTypeNV.gen.cs new file mode 100644 index 0000000..4780e5b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkOutOfBandQueueTypeNV.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOutOfBandQueueTypeNV - Type of out of band queue + /// + /// + /// + /// The VkOutOfBandQueueTypeNV enum is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef enum VkOutOfBandQueueTypeNV { + /// VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV = 0, + /// VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV = 1, + /// } VkOutOfBandQueueTypeNV; + /// + /// + public enum VkOutOfBandQueueTypeNV : int + { + /// + /// RenderNV specifies that work will be submitted to this queue. + /// + RenderNV = 0, + + /// + /// PresentNV specifies that this queue will be presented from. + /// + PresentNV = 1, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureInstanceFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureInstanceFlagsNV.gen.cs new file mode 100644 index 0000000..f87b86e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureInstanceFlagsNV.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureInstanceFlagBitsNV - Bitmask specifying flags for PTLAS instances + /// + /// + /// + /// Bits which can be set in + /// VkPartitionedAccelerationStructureWriteInstanceDataNV::instanceFlags, + /// specifying flags for instances, are: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef enum VkPartitionedAccelerationStructureInstanceFlagBitsNV { + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FACING_CULL_DISABLE_BIT_NV = 0x00000001, + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FLIP_FACING_BIT_NV = 0x00000002, + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_OPAQUE_BIT_NV = 0x00000004, + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_NO_OPAQUE_BIT_NV = 0x00000008, + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV = 0x00000010, + /// } VkPartitionedAccelerationStructureInstanceFlagBitsNV; + /// + /// + [Flags] + public enum VkPartitionedAccelerationStructureInstanceFlagsNV : int + { + /// No flags set. + None = 0, + + /// + /// FlagTriangleFacingCullDisableBitNV disables face culling for this instance. + /// + FlagTriangleFacingCullDisableBitNV = 0x00000001, + + /// + /// FlagTriangleFlipFacingBitNV specifies that the facing determination^ for geometry in this instance is inverted. + /// + FlagTriangleFlipFacingBitNV = 0x00000002, + + /// + /// FlagForceOpaqueBitNV causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were specified on all geometries referenced by this instance. + /// + FlagForceOpaqueBitNV = 0x00000004, + + /// + /// FlagForceNoOpaqueBitNV causes this instance to act as though VK_GEOMETRY_OPAQUE_BIT_KHR were not specified on all geometries referenced by this instance. + /// + FlagForceNoOpaqueBitNV = 0x00000008, + + /// + /// FlagEnableExplicitBoundingBoxNV enables use of an explicit bounding box for this instance. + /// + FlagEnableExplicitBoundingBoxNV = 0x00000010, + + /// + /// FlagBitsMaxEnumNV + /// + FlagBitsMaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureOpTypeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureOpTypeNV.gen.cs new file mode 100644 index 0000000..a1c5478 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPartitionedAccelerationStructureOpTypeNV.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureOpTypeNV - Enum providing the type of PTLAS operation to perform + /// + /// + /// + /// Values which can be set in VkPartitionedAccelerationStructureOpTypeNV + /// are: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef enum VkPartitionedAccelerationStructureOpTypeNV { + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_INSTANCE_NV = 0, + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_UPDATE_INSTANCE_NV = 1, + /// VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_PARTITION_TRANSLATION_NV = 2, + /// } VkPartitionedAccelerationStructureOpTypeNV; + /// + /// + public enum VkPartitionedAccelerationStructureOpTypeNV : int + { + /// + /// WriteInstanceNV is used to assign a transformed bottom level acceleration structure to an instance and partition. This is similar to VkAccelerationStructureInstanceKHR that defines the properties and transformations for a single instance in non-partitioned TLAS. Any partition that contains at least one of the affected instances will have their internal acceleration structure rebuilt. + /// + WriteInstanceNV = 0, + + /// + /// UpdateInstanceNV specifies that an instance will be updated with a new bottom level acceleration structure. + /// + UpdateInstanceNV = 1, + + /// + /// WritePartitionTranslationNV specifies that a partition will be assigned a translation vector^. + /// + WritePartitionTranslationNV = 2, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPastPresentationTimingFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPastPresentationTimingFlagsEXT.gen.cs new file mode 100644 index 0000000..7fabd29 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPastPresentationTimingFlagsEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPastPresentationTimingFlagBitsEXT - Bitmask specifying past presentation timing query flags + /// + /// + /// + /// Bits which can be set in + /// VkPastPresentationTimingInfoEXT::flags, specifying options for + /// queries of past presentation timing information, are: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef enum VkPastPresentationTimingFlagBitsEXT { + /// VK_PAST_PRESENTATION_TIMING_ALLOW_PARTIAL_RESULTS_BIT_EXT = 0x00000001, + /// VK_PAST_PRESENTATION_TIMING_ALLOW_OUT_OF_ORDER_RESULTS_BIT_EXT = 0x00000002, + /// } VkPastPresentationTimingFlagBitsEXT; + /// + /// + [Flags] + public enum VkPastPresentationTimingFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// AllowPartialResultsBitEXT specifies that vkGetPastPresentationTimingEXT may: return partial results for presentation requests that have not completed all requested present stages. + /// + AllowPartialResultsBitEXT = 0x00000001, + + /// + /// AllowOutOfOrderResultsBitEXT specifies that vkGetPastPresentationTimingEXT may: return results out of order with respect to the presentation order. + /// + AllowOutOfOrderResultsBitEXT = 0x00000002, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPeerMemoryFeatureFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPeerMemoryFeatureFlags.gen.cs new file mode 100644 index 0000000..a666adb --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPeerMemoryFeatureFlags.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPeerMemoryFeatureFlagBits - Bitmask specifying supported peer memory features + /// + /// + /// + /// Bits which may: be set in + /// vkGetDeviceGroupPeerMemoryFeatures::pPeerMemoryFeatures, + /// indicating supported peer memory features, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkPeerMemoryFeatureFlagBits { + /// VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001, + /// VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002, + /// VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004, + /// VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008, + /// // Provided by VK_KHR_device_group + /// VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT, + /// // Provided by VK_KHR_device_group + /// VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT, + /// // Provided by VK_KHR_device_group + /// VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT, + /// // Provided by VK_KHR_device_group + /// VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT, + /// } VkPeerMemoryFeatureFlagBits; + /// + /// + [Flags] + public enum VkPeerMemoryFeatureFlags : int + { + /// No flags set. + None = 0, + + /// + /// CopySrcBit specifies that the memory can be accessed as the source of any ftext:vkCmdCopy* command. + /// + CopySrcBit = 0x00000001, + + /// + /// CopyDstBit specifies that the memory can be accessed as the destination of any ftext:vkCmdCopy* command. + /// + CopyDstBit = 0x00000002, + + /// + /// GenericSrcBit specifies that the memory can be read as any memory access type. + /// + GenericSrcBit = 0x00000004, + + /// + /// GenericDstBit specifies that the memory can be written as any memory access type. Shader atomics are considered to be writes. [NOTE] + /// + GenericDstBit = 0x00000008, + + /// + /// CopySrcBitKHR + /// + CopySrcBitKHR = CopySrcBit, + + /// + /// CopyDstBitKHR + /// + CopyDstBitKHR = CopyDstBit, + + /// + /// GenericSrcBitKHR + /// + GenericSrcBitKHR = GenericSrcBit, + + /// + /// GenericDstBitKHR + /// + GenericDstBitKHR = GenericDstBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerfHintTypeQCOM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerfHintTypeQCOM.gen.cs new file mode 100644 index 0000000..593aef0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerfHintTypeQCOM.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerfHintTypeQCOM - Specifies the performance hint type + /// + /// + /// + /// Possible values of VkPerfHintInfoQCOM::type, specifying the type + /// of performance hint to apply, are: + /// + /// + /// // Provided by VK_QCOM_queue_perf_hint + /// typedef enum VkPerfHintTypeQCOM { + /// VK_PERF_HINT_TYPE_DEFAULT_QCOM = 0, + /// VK_PERF_HINT_TYPE_FREQUENCY_MIN_QCOM = 1, + /// VK_PERF_HINT_TYPE_FREQUENCY_MAX_QCOM = 2, + /// VK_PERF_HINT_TYPE_FREQUENCY_SCALED_QCOM = 3, + /// } VkPerfHintTypeQCOM; + /// + /// + public enum VkPerfHintTypeQCOM : int + { + /// + /// DefaultQCOM resets the performance hint state back to default for the queue. + /// + DefaultQCOM = 0, + + /// + /// FrequencyMinQCOM specifies the queue should prioritize power and sets the frequency constraints `f~min~` and `f~max~` to `F~min~`. + /// + FrequencyMinQCOM = 1, + + /// + /// FrequencyMaxQCOM specifies the queue should prioritize performance and sets the frequency constraints `f~min~` and `f~max~` to `F~max~`. + /// + FrequencyMaxQCOM = 2, + + /// + /// FrequencyScaledQCOM specifies the queue should be balanced between performance and power and sets the frequency constraint `f~min~` by applying a scale factor to `F~max~`. No constraint is applied to `f~max~`. + /// + FrequencyScaledQCOM = 3, + + /// + /// MaxEnumQCOM + /// + MaxEnumQCOM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceConfigurationTypeINTEL.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceConfigurationTypeINTEL.gen.cs new file mode 100644 index 0000000..9445282 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceConfigurationTypeINTEL.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceConfigurationTypeINTEL - Type of performance configuration + /// + /// + /// + /// Possible values of + /// VkPerformanceConfigurationAcquireInfoINTEL::type, specifying + /// performance configuration types, are: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef enum VkPerformanceConfigurationTypeINTEL { + /// VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0, + /// } VkPerformanceConfigurationTypeINTEL; + /// + /// + public enum VkPerformanceConfigurationTypeINTEL : int + { + /// + /// CommandQueueMetricsDiscoveryActivatedINTEL + /// + CommandQueueMetricsDiscoveryActivatedINTEL = 0, + + /// + /// MaxEnumINTEL + /// + MaxEnumINTEL = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterDescriptionFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterDescriptionFlagsKHR.gen.cs new file mode 100644 index 0000000..69161a1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterDescriptionFlagsKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterDescriptionFlagBitsKHR - Bitmask specifying usage behavior for a counter + /// + /// + /// + /// Bits which can be set in + /// VkPerformanceCounterDescriptionKHR::flags, specifying usage + /// behavior of a performance counter, are: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef enum VkPerformanceCounterDescriptionFlagBitsKHR { + /// VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 0x00000001, + /// VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 0x00000002, + /// // VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR is a legacy alias + /// VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR, + /// // VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR is a legacy alias + /// VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR, + /// } VkPerformanceCounterDescriptionFlagBitsKHR; + /// + /// + [Flags] + public enum VkPerformanceCounterDescriptionFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// PerformanceImpactingBitKHR specifies that recording the counter may: have a noticeable performance impact. + /// + PerformanceImpactingBitKHR = 0x00000001, + + /// + /// ConcurrentlyImpactedBitKHR specifies that concurrently recording the counter while other submitted command buffers are running may: impact the accuracy of the recording. + /// + ConcurrentlyImpactedBitKHR = 0x00000002, + + /// + /// PerformanceImpactingKHR + /// + PerformanceImpactingKHR = PerformanceImpactingBitKHR, + + /// + /// ConcurrentlyImpactedKHR + /// + ConcurrentlyImpactedKHR = ConcurrentlyImpactedBitKHR, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterScopeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterScopeKHR.gen.cs new file mode 100644 index 0000000..eec00ed --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterScopeKHR.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterScopeKHR - Supported counter scope types + /// + /// + /// + /// Performance counters have an associated scope. + /// This scope describes the granularity of a performance counter. + /// + /// + /// The performance counter scope types which may: be returned in + /// VkPerformanceCounterKHR::scope are: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef enum VkPerformanceCounterScopeKHR { + /// VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0, + /// VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1, + /// VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2, + /// // VK_QUERY_SCOPE_COMMAND_BUFFER_KHR is a legacy alias + /// VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, + /// // VK_QUERY_SCOPE_RENDER_PASS_KHR is a legacy alias + /// VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, + /// // VK_QUERY_SCOPE_COMMAND_KHR is a legacy alias + /// VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR, + /// } VkPerformanceCounterScopeKHR; + /// + /// + public enum VkPerformanceCounterScopeKHR : int + { + /// + /// CommandBufferKHR - the performance counter scope is a single complete command buffer. + /// + CommandBufferKHR = 0, + + /// + /// RenderPassKHR - the performance counter scope is zero or more complete render passes. The performance query containing the performance counter must begin and end outside a render pass instance. + /// + RenderPassKHR = 1, + + /// + /// CommandKHR - the performance counter scope is zero or more commands. + /// + CommandKHR = 2, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterStorageKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterStorageKHR.gen.cs new file mode 100644 index 0000000..4ba0ef1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterStorageKHR.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterStorageKHR - Supported counter storage types + /// + /// + /// + /// Performance counters have an associated storage. + /// This storage describes the payload of a counter result. + /// + /// + /// The performance counter storage types which may: be returned in + /// VkPerformanceCounterKHR::storage are: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef enum VkPerformanceCounterStorageKHR { + /// VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0, + /// VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1, + /// VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2, + /// VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3, + /// VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4, + /// VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5, + /// } VkPerformanceCounterStorageKHR; + /// + /// + public enum VkPerformanceCounterStorageKHR : int + { + /// + /// Int32KHR - the performance counter storage is a 32-bit signed integer. + /// + Int32KHR = 0, + + /// + /// Int64KHR - the performance counter storage is a 64-bit signed integer. + /// + Int64KHR = 1, + + /// + /// UInt32KHR - the performance counter storage is a 32-bit unsigned integer. + /// + UInt32KHR = 2, + + /// + /// UInt64KHR - the performance counter storage is a 64-bit unsigned integer. + /// + UInt64KHR = 3, + + /// + /// Float32KHR - the performance counter storage is a 32-bit floating-point. + /// + Float32KHR = 4, + + /// + /// Float64KHR - the performance counter storage is a 64-bit floating-point. + /// + Float64KHR = 5, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterUnitKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterUnitKHR.gen.cs new file mode 100644 index 0000000..5edac3c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceCounterUnitKHR.gen.cs @@ -0,0 +1,94 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterUnitKHR - Supported counter unit types + /// + /// + /// + /// Performance counters have an associated unit. + /// This unit describes how to interpret the performance counter result. + /// + /// + /// The performance counter unit types which may: be returned in + /// VkPerformanceCounterKHR::unit are: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef enum VkPerformanceCounterUnitKHR { + /// VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0, + /// VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1, + /// VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2, + /// VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3, + /// VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4, + /// VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5, + /// VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6, + /// VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7, + /// VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8, + /// VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9, + /// VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10, + /// } VkPerformanceCounterUnitKHR; + /// + /// + public enum VkPerformanceCounterUnitKHR : int + { + /// + /// GenericKHR - the performance counter unit is a generic data point. + /// + GenericKHR = 0, + + /// + /// PercentageKHR - the performance counter unit is a percentage (%). + /// + PercentageKHR = 1, + + /// + /// NanosecondsKHR - the performance counter unit is a value of nanoseconds (ns). + /// + NanosecondsKHR = 2, + + /// + /// BytesKHR - the performance counter unit is a value of bytes. + /// + BytesKHR = 3, + + /// + /// BytesPerSecondKHR - the performance counter unit is a value of bytes/s. + /// + BytesPerSecondKHR = 4, + + /// + /// KelvinKHR - the performance counter unit is a temperature reported in Kelvin. + /// + KelvinKHR = 5, + + /// + /// WattsKHR - the performance counter unit is a value of watts (W). + /// + WattsKHR = 6, + + /// + /// VoltsKHR - the performance counter unit is a value of volts (V). + /// + VoltsKHR = 7, + + /// + /// AmpsKHR - the performance counter unit is a value of amps (A). + /// + AmpsKHR = 8, + + /// + /// HertzKHR - the performance counter unit is a value of hertz (Hz). + /// + HertzKHR = 9, + + /// + /// CyclesKHR - the performance counter unit is a value of cycles. + /// + CyclesKHR = 10, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceOverrideTypeINTEL.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceOverrideTypeINTEL.gen.cs new file mode 100644 index 0000000..363fc47 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceOverrideTypeINTEL.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceOverrideTypeINTEL - Performance override type + /// + /// + /// + /// Possible values of VkPerformanceOverrideInfoINTEL::type, + /// specifying performance override types, are: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef enum VkPerformanceOverrideTypeINTEL { + /// VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0, + /// VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1, + /// } VkPerformanceOverrideTypeINTEL; + /// + /// + public enum VkPerformanceOverrideTypeINTEL : int + { + /// + /// NullHardwareINTEL turns all rendering operations into noop. + /// + NullHardwareINTEL = 0, + + /// + /// FlushGpuCachesINTEL stalls the stream of commands until all previously emitted commands have completed and all caches been flushed and invalidated. + /// + FlushGpuCachesINTEL = 1, + + /// + /// MaxEnumINTEL + /// + MaxEnumINTEL = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceParameterTypeINTEL.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceParameterTypeINTEL.gen.cs new file mode 100644 index 0000000..e3218c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceParameterTypeINTEL.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceParameterTypeINTEL - Parameters that can be queried + /// + /// + /// + /// Possible values of vkGetPerformanceParameterINTEL::parameter, + /// specifying a performance query feature, are: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef enum VkPerformanceParameterTypeINTEL { + /// VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0, + /// VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1, + /// } VkPerformanceParameterTypeINTEL; + /// + /// + public enum VkPerformanceParameterTypeINTEL : int + { + /// + /// HwCountersSupportedINTEL has a boolean result which tells whether hardware counters can be captured. + /// + HwCountersSupportedINTEL = 0, + + /// + /// StreamMarkerValidBitsINTEL has a 32 bits integer result which tells how many bits can be written into the VkPerformanceValueINTEL value. + /// + StreamMarkerValidBitsINTEL = 1, + + /// + /// MaxEnumINTEL + /// + MaxEnumINTEL = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPerformanceValueTypeINTEL.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPerformanceValueTypeINTEL.gen.cs new file mode 100644 index 0000000..071d6bd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPerformanceValueTypeINTEL.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceValueTypeINTEL - Type of the parameters that can be queried + /// + /// + /// + /// Possible values of VkPerformanceValueINTEL::type, specifying the + /// type of the data returned in VkPerformanceValueINTEL::data, are: + /// + /// + /// * VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL specifies that unsigned + /// 32-bit integer data is returned in data.value32. + /// * VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL specifies that unsigned + /// 64-bit integer data is returned in data.value64. + /// * VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL specifies that + /// floating-point data is returned in data.valueFloat. + /// * VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL specifies that + /// basetype:VkBool32 data is returned in data.valueBool. + /// * VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL specifies that a pointer to + /// a null-terminated UTF-8 string is returned in data.valueString. + /// The pointer is valid for the lifetime of the device parameter + /// passed to vkGetPerformanceParameterINTEL. + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef enum VkPerformanceValueTypeINTEL { + /// VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0, + /// VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1, + /// VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2, + /// VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3, + /// VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4, + /// } VkPerformanceValueTypeINTEL; + /// + /// + public enum VkPerformanceValueTypeINTEL : int + { + /// + /// UInt32INTEL + /// + UInt32INTEL = 0, + + /// + /// UInt64INTEL + /// + UInt64INTEL = 1, + + /// + /// FloatINTEL + /// + FloatINTEL = 2, + + /// + /// BoolINTEL + /// + BoolINTEL = 3, + + /// + /// StringINTEL + /// + StringINTEL = 4, + + /// + /// MaxEnumINTEL + /// + MaxEnumINTEL = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphOperationTypeARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphOperationTypeARM.gen.cs new file mode 100644 index 0000000..c3a4e14 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphOperationTypeARM.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphOperationTypeARM - Enumeration describing data graph operations + /// + /// + /// + /// :refpage: VkPhysicalDeviceDataGraphOperationTypeARM + /// + /// + /// The defined data graph operations are: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef enum VkPhysicalDeviceDataGraphOperationTypeARM { + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM = 0, + /// // Provided by VK_QCOM_data_graph_model + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_NEURAL_MODEL_QCOM = 1000629000, + /// // Provided by VK_QCOM_data_graph_model + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_BUILTIN_MODEL_QCOM = 1000629001, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_OPTICAL_FLOW_ARM = 1000631000, + /// } VkPhysicalDeviceDataGraphOperationTypeARM; + /// + /// + public enum VkPhysicalDeviceDataGraphOperationTypeARM : int + { + /// + /// SpirvExtendedInstructionSetARM corresponds to operations provided by a SPIR-V extended instruction set. + /// + SpirvExtendedInstructionSetARM = 0, + + /// + /// NeuralModelQCOM + /// + NeuralModelQCOM = 1000629000, + + /// + /// BuiltinModelQCOM + /// + BuiltinModelQCOM = 1000629001, + + /// + /// OpticalFlowARM + /// + OpticalFlowARM = 1000631000, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphProcessingEngineTypeARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphProcessingEngineTypeARM.gen.cs new file mode 100644 index 0000000..6ed84cc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceDataGraphProcessingEngineTypeARM.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphProcessingEngineTypeARM - Enumeration describing data graph processing engines + /// + /// + /// + /// :refpage: VkPhysicalDeviceDataGraphProcessingEngineTypeARM + /// + /// + /// The defined data graph processing engines are: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef enum VkPhysicalDeviceDataGraphProcessingEngineTypeARM { + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM = 0, + /// // Provided by VK_QCOM_data_graph_model + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOM = 1000629000, + /// // Provided by VK_QCOM_data_graph_model + /// VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM = 1000629001, + /// } VkPhysicalDeviceDataGraphProcessingEngineTypeARM; + /// + /// + public enum VkPhysicalDeviceDataGraphProcessingEngineTypeARM : int + { + /// + /// DefaultARM corresponds to the default data graph processing engine. + /// + DefaultARM = 0, + + /// + /// NeuralQCOM + /// + NeuralQCOM = 1000629000, + + /// + /// ComputeQCOM + /// + ComputeQCOM = 1000629001, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceLayeredApiKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceLayeredApiKHR.gen.cs new file mode 100644 index 0000000..688c166 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceLayeredApiKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLayeredApiKHR - API implemented by the layered implementation + /// + /// + /// + /// The list of possible API implementations of a layered implementation + /// underneath the Vulkan physical device, as returned in + /// VkPhysicalDeviceLayeredApiPropertiesKHR::layeredAPI, are: + /// + /// + /// // Provided by VK_KHR_maintenance7 + /// typedef enum VkPhysicalDeviceLayeredApiKHR { + /// VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR = 0, + /// VK_PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR = 1, + /// VK_PHYSICAL_DEVICE_LAYERED_API_METAL_KHR = 2, + /// VK_PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR = 3, + /// VK_PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR = 4, + /// } VkPhysicalDeviceLayeredApiKHR; + /// + /// + public enum VkPhysicalDeviceLayeredApiKHR : int + { + /// + /// VulkanKHR - the device implements the Vulkan API. + /// + VulkanKHR = 0, + + /// + /// D3D12KHR - the device implements the D3D12 API. + /// + D3D12KHR = 1, + + /// + /// MetalKHR - the device implements the Metal API. + /// + MetalKHR = 2, + + /// + /// OpenglKHR - the device implements the OpenGL API. + /// + OpenglKHR = 3, + + /// + /// OpenglesKHR - the device implements the OpenGL ES API. + /// + OpenglesKHR = 4, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceSchedulingControlsFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceSchedulingControlsFlagsARM.gen.cs new file mode 100644 index 0000000..f2fd5d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceSchedulingControlsFlagsARM.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSchedulingControlsFlagBitsARM - Bitmask specifying scheduling controls supported by a physical device + /// + /// + /// + /// Bits which can be set in + /// VkPhysicalDeviceSchedulingControlsPropertiesARM::schedulingControlsFlags, + /// specifying supported scheduling controls, are: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// // Flag bits for VkPhysicalDeviceSchedulingControlsFlagBitsARM + /// typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagBitsARM; + /// static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM = 0x00000001ULL; + /// static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_ARM = 0x00000002ULL; + /// + /// + [Flags] + public enum VkPhysicalDeviceSchedulingControlsFlagsARM : ulong + { + /// No flags set. + None = 0, + + /// + /// ShaderCoreCountARM specifies that a VkDeviceQueueShaderCoreControlCreateInfoARM structure may: be included in the pNext chain of a VkDeviceQueueCreateInfo or VkDeviceCreateInfo structure. + /// + ShaderCoreCountARM = 0x00000001, + + /// + /// DispatchParametersARM specifies that a vkCmdSetDispatchParametersARM command may: be recorded in a command buffer and that properties returned in VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM are valid. + /// + DispatchParametersARM = 0x00000002, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceType.gen.cs new file mode 100644 index 0000000..884ee54 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPhysicalDeviceType.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceType - Supported physical device types + /// + /// + /// + /// The physical device types which may: be returned in + /// VkPhysicalDeviceProperties::deviceType are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPhysicalDeviceType { + /// VK_PHYSICAL_DEVICE_TYPE_OTHER = 0, + /// VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1, + /// VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2, + /// VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3, + /// VK_PHYSICAL_DEVICE_TYPE_CPU = 4, + /// } VkPhysicalDeviceType; + /// + /// + public enum VkPhysicalDeviceType : int + { + /// + /// Other - the device does not match any other available types. + /// + Other = 0, + + /// + /// IntegratedGpu - the device is typically one embedded in or tightly coupled with the host. + /// + IntegratedGpu = 1, + + /// + /// DiscreteGpu - the device is typically a separate processor connected to the host via an interlink. + /// + DiscreteGpu = 2, + + /// + /// VirtualGpu - the device is typically a virtual node in a virtualization environment. + /// + VirtualGpu = 3, + + /// + /// Cpu - the device is typically running on the same processors as the host. The physical device type is advertised for informational purposes only, and does not directly affect the operation of the system. However, the device type may: correlate with other advertised properties or capabilities of the system, such as how many memory heaps there are. + /// + Cpu = 4, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineBindPoint.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineBindPoint.gen.cs new file mode 100644 index 0000000..d5982c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineBindPoint.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBindPoint - Specify the bind point of a pipeline object to a command buffer + /// + /// + /// + /// Possible values of vkCmdBindPipeline::pipelineBindPoint, + /// specifying the bind point of a pipeline object, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPipelineBindPoint { + /// VK_PIPELINE_BIND_POINT_GRAPHICS = 0, + /// VK_PIPELINE_BIND_POINT_COMPUTE = 1, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX = 1000134000, + /// #endif + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR = 1000165000, + /// // Provided by VK_HUAWEI_subpass_shading + /// VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI = 1000369003, + /// // Provided by VK_ARM_data_graph + /// VK_PIPELINE_BIND_POINT_DATA_GRAPH_ARM = 1000507000, + /// // Provided by VK_NV_ray_tracing + /// VK_PIPELINE_BIND_POINT_RAY_TRACING_NV = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, + /// } VkPipelineBindPoint; + /// + /// + public enum VkPipelineBindPoint : int + { + /// + /// Graphics specifies binding as a graphics pipeline. + /// + Graphics = 0, + + /// + /// Compute specifies binding as a compute pipeline. + /// + Compute = 1, + + /// + /// ExecutionGraphAMDX + /// + ExecutionGraphAMDX = 1000134000, + + /// + /// RayTracingKHR + /// + RayTracingKHR = 1000165000, + + /// + /// SubpassShadingHUAWEI + /// + SubpassShadingHUAWEI = 1000369003, + + /// + /// DataGraphARM + /// + DataGraphARM = 1000507000, + + /// + /// RayTracingNV + /// + RayTracingNV = RayTracingKHR, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineCacheCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineCacheCreateFlags.gen.cs new file mode 100644 index 0000000..2aff2d3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineCacheCreateFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCacheCreateFlagBits - Bitmask specifying the behavior of the pipeline cache + /// + /// + /// + /// Bits which can be set in VkPipelineCacheCreateInfo::flags, + /// specifying behavior of the pipeline cache, are: + /// + /// + /// // Provided by VK_VERSION_1_0, VK_KHR_maintenance8, VK_EXT_pipeline_creation_cache_control + /// typedef enum VkPipelineCacheCreateFlagBits { + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT = 0x00000001, + /// // Provided by VK_KHR_maintenance8 + /// VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR = 0x00000008, + /// // Provided by VK_EXT_pipeline_creation_cache_control + /// VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, + /// } VkPipelineCacheCreateFlagBits; + /// + /// + [Flags] + public enum VkPipelineCacheCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// ExternallySynchronizedBit + /// + ExternallySynchronizedBit = 0x00000001, + + /// + /// InternallySynchronizedMergeBitKHR + /// + InternallySynchronizedMergeBitKHR = 0x00000008, + + /// + /// ExternallySynchronizedBitEXT + /// + ExternallySynchronizedBitEXT = ExternallySynchronizedBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineCacheHeaderVersion.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineCacheHeaderVersion.gen.cs new file mode 100644 index 0000000..7a62cfd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineCacheHeaderVersion.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCacheHeaderVersion - Encode pipeline cache version + /// + /// + /// + /// Possible values of the headerVersion value of the pipeline cache + /// header are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPipelineCacheHeaderVersion { + /// VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, + /// // Provided by VK_QCOM_data_graph_model + /// VK_PIPELINE_CACHE_HEADER_VERSION_DATA_GRAPH_QCOM = 1000629000, + /// } VkPipelineCacheHeaderVersion; + /// + /// + public enum VkPipelineCacheHeaderVersion : int + { + /// + /// One specifies version one of the pipeline cache, described by VkPipelineCacheHeaderVersionOne. + /// + One = 1, + + /// + /// DataGraphQCOM + /// + DataGraphQCOM = 1000629000, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineColorBlendStateCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineColorBlendStateCreateFlags.gen.cs new file mode 100644 index 0000000..5a22422 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineColorBlendStateCreateFlags.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineColorBlendStateCreateFlagBits - Bitmask specifying additional parameters of an image + /// + /// + /// + /// Bits which can be set in the + /// VkPipelineColorBlendStateCreateInfo::flags parameter are: + /// + /// + /// // Provided by VK_VERSION_1_0, VK_EXT_rasterization_order_attachment_access + /// typedef enum VkPipelineColorBlendStateCreateFlagBits { + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 0x00000001, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, + /// } VkPipelineColorBlendStateCreateFlagBits; + /// + /// + [Flags] + public enum VkPipelineColorBlendStateCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// RasterizationOrderAttachmentAccessBitEXT + /// + RasterizationOrderAttachmentAccessBitEXT = 0x00000001, + + /// + /// RasterizationOrderAttachmentAccessBitARM + /// + RasterizationOrderAttachmentAccessBitARM = RasterizationOrderAttachmentAccessBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineCompilerControlFlagsAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineCompilerControlFlagsAMD.gen.cs new file mode 100644 index 0000000..1eb462b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineCompilerControlFlagsAMD.gen.cs @@ -0,0 +1,28 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCompilerControlFlagBitsAMD - Enum specifying available compilation control flags + /// + /// + /// + /// There are currently no available flags for this extension; flags will be + /// added by future versions of this extension. + /// + /// + /// // Provided by VK_AMD_pipeline_compiler_control + /// typedef enum VkPipelineCompilerControlFlagBitsAMD { + /// } VkPipelineCompilerControlFlagBitsAMD; + /// + /// + [Flags] + public enum VkPipelineCompilerControlFlagsAMD : int + { + /// No flags set. + None = 0, + + /// + /// FlagBitsMaxEnumAMD + /// + FlagBitsMaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags.gen.cs new file mode 100644 index 0000000..d40e1a8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags.gen.cs @@ -0,0 +1,321 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreateFlagBits - Bitmask controlling how a pipeline is created + /// + /// + /// + /// Bits which can be set in + /// + /// + /// * VkGraphicsPipelineCreateInfo::flags + /// * VkComputePipelineCreateInfo::flags + /// + /// + /// specify how a pipeline is created, and are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPipelineCreateFlagBits { + /// VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, + /// VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, + /// VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, + /// // Provided by VK_VERSION_1_1 + /// VK_PIPELINE_CREATE_DISPATCH_BASE_BIT = 0x00000010, + /// // Provided by VK_VERSION_1_1 + /// VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008, + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100, + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200, + /// // Provided by VK_VERSION_1_4 + /// VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT = 0x08000000, + /// // Provided by VK_VERSION_1_4 + /// VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT = 0x40000000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000, + /// // Provided by VK_NV_ray_tracing + /// VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV = 0x00000020, + /// // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000, + /// // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR = 0x00000040, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080, + /// // Provided by VK_NV_device_generated_commands + /// VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00040000, + /// // Provided by VK_KHR_pipeline_library + /// VK_PIPELINE_CREATE_LIBRARY_BIT_KHR = 0x00000800, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000, + /// // Provided by VK_EXT_graphics_pipeline_library + /// VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000, + /// // Provided by VK_EXT_graphics_pipeline_library + /// VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400, + /// // Provided by VK_NV_ray_tracing_motion_blur + /// VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000, + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000, + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000, + /// #endif + /// // Provided by VK_KHR_opacity_micromap + /// VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR = 0x01000000, + /// // Provided by VK_VERSION_1_1 + /// // VK_PIPELINE_CREATE_DISPATCH_BASE is a legacy alias + /// VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, + /// // Provided by VK_KHR_device_group + /// VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, + /// // Provided by VK_KHR_device_group + /// VK_PIPELINE_CREATE_DISPATCH_BASE_BIT_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, + /// // Provided by VK_KHR_device_group + /// // VK_PIPELINE_CREATE_DISPATCH_BASE_KHR is a legacy alias + /// VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, + /// // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT is a legacy alias + /// VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, + /// // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR is a legacy alias + /// VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, + /// // Provided by VK_EXT_pipeline_creation_cache_control + /// VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, + /// // Provided by VK_EXT_pipeline_creation_cache_control + /// VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, + /// // Provided by VK_EXT_opacity_micromap + /// VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR, + /// // Provided by VK_EXT_pipeline_protected_access + /// VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, + /// // Provided by VK_EXT_pipeline_protected_access + /// VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, + /// } VkPipelineCreateFlagBits; + /// + /// + [Flags] + public enum VkPipelineCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// DisableOptimizationBit specifies that the created pipeline will not be optimized. Using this flag may: reduce the time taken to create the pipeline. + /// + DisableOptimizationBit = 0x00000001, + + /// + /// AllowDerivativesBit specifies that the pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent pipeline creation call. + /// + AllowDerivativesBit = 0x00000002, + + /// + /// DerivativeBit specifies that the pipeline to be created will be a child of a previously created parent pipeline. It is valid to set both VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT and VK_PIPELINE_CREATE_DERIVATIVE_BIT. This allows a pipeline to be both a parent and possibly a child in a pipeline hierarchy. See Pipeline Derivatives^ for more information. + /// + DerivativeBit = 0x00000004, + + /// + /// DispatchBaseBit + /// + DispatchBaseBit = 0x00000010, + + /// + /// ViewIndexFromDeviceIndexBit + /// + ViewIndexFromDeviceIndexBit = 0x00000008, + + /// + /// FailOnPipelineCompileRequiredBit + /// + FailOnPipelineCompileRequiredBit = 0x00000100, + + /// + /// EarlyReturnOnFailureBit + /// + EarlyReturnOnFailureBit = 0x00000200, + + /// + /// NoProtectedAccessBit + /// + NoProtectedAccessBit = 0x08000000, + + /// + /// ProtectedAccessOnlyBit + /// + ProtectedAccessOnlyBit = 0x40000000, + + /// + /// RayTracingNoNullAnyHitShadersBitKHR + /// + RayTracingNoNullAnyHitShadersBitKHR = 0x00004000, + + /// + /// RayTracingNoNullClosestHitShadersBitKHR + /// + RayTracingNoNullClosestHitShadersBitKHR = 0x00008000, + + /// + /// RayTracingNoNullMissShadersBitKHR + /// + RayTracingNoNullMissShadersBitKHR = 0x00010000, + + /// + /// RayTracingNoNullIntersectionShadersBitKHR + /// + RayTracingNoNullIntersectionShadersBitKHR = 0x00020000, + + /// + /// RayTracingSkipTrianglesBitKHR + /// + RayTracingSkipTrianglesBitKHR = 0x00001000, + + /// + /// RayTracingSkipAabbsBitKHR + /// + RayTracingSkipAabbsBitKHR = 0x00002000, + + /// + /// RayTracingShaderGroupHandleCaptureReplayBitKHR + /// + RayTracingShaderGroupHandleCaptureReplayBitKHR = 0x00080000, + + /// + /// DeferCompileBitNV + /// + DeferCompileBitNV = 0x00000020, + + /// + /// RenderingFragmentDensityMapAttachmentBitEXT + /// + RenderingFragmentDensityMapAttachmentBitEXT = 0x00400000, + + /// + /// RenderingFragmentShadingRateAttachmentBitKHR + /// + RenderingFragmentShadingRateAttachmentBitKHR = 0x00200000, + + /// + /// CaptureStatisticsBitKHR + /// + CaptureStatisticsBitKHR = 0x00000040, + + /// + /// CaptureInternalRepresentationsBitKHR + /// + CaptureInternalRepresentationsBitKHR = 0x00000080, + + /// + /// IndirectBindableBitNV + /// + IndirectBindableBitNV = 0x00040000, + + /// + /// LibraryBitKHR + /// + LibraryBitKHR = 0x00000800, + + /// + /// DescriptorBufferBitEXT + /// + DescriptorBufferBitEXT = 0x20000000, + + /// + /// RetainLinkTimeOptimizationInfoBitEXT + /// + RetainLinkTimeOptimizationInfoBitEXT = 0x00800000, + + /// + /// LinkTimeOptimizationBitEXT + /// + LinkTimeOptimizationBitEXT = 0x00000400, + + /// + /// RayTracingAllowMotionBitNV + /// + RayTracingAllowMotionBitNV = 0x00100000, + + /// + /// ColorAttachmentFeedbackLoopBitEXT + /// + ColorAttachmentFeedbackLoopBitEXT = 0x02000000, + + /// + /// DepthStencilAttachmentFeedbackLoopBitEXT + /// + DepthStencilAttachmentFeedbackLoopBitEXT = 0x04000000, + + /// + /// RayTracingDisplacementMicromapBitNV + /// + RayTracingDisplacementMicromapBitNV = 0x10000000, + + /// + /// RayTracingOpacityMicromapBitKHR + /// + RayTracingOpacityMicromapBitKHR = 0x01000000, + + /// + /// DispatchBase + /// + DispatchBase = DispatchBaseBit, + + /// + /// ViewIndexFromDeviceIndexBitKHR + /// + ViewIndexFromDeviceIndexBitKHR = ViewIndexFromDeviceIndexBit, + + /// + /// DispatchBaseBitKHR + /// + DispatchBaseBitKHR = DispatchBaseBit, + + /// + /// DispatchBaseKHR + /// + DispatchBaseKHR = DispatchBaseBit, + + /// + /// FailOnPipelineCompileRequiredBitEXT + /// + FailOnPipelineCompileRequiredBitEXT = FailOnPipelineCompileRequiredBit, + + /// + /// EarlyReturnOnFailureBitEXT + /// + EarlyReturnOnFailureBitEXT = EarlyReturnOnFailureBit, + + /// + /// RayTracingOpacityMicromapBitEXT + /// + RayTracingOpacityMicromapBitEXT = RayTracingOpacityMicromapBitKHR, + + /// + /// NoProtectedAccessBitEXT + /// + NoProtectedAccessBitEXT = NoProtectedAccessBit, + + /// + /// ProtectedAccessOnlyBitEXT + /// + ProtectedAccessOnlyBitEXT = ProtectedAccessOnlyBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags2.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags2.gen.cs new file mode 100644 index 0000000..640f684 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineCreateFlags2.gen.cs @@ -0,0 +1,390 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreateFlagBits2 - Bitmask controlling how a pipeline is created + /// + /// + /// + /// Bits which can be set in + /// VkPipelineCreateFlags2CreateInfo::flags, specifying how a + /// pipeline is created, are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// // Flag bits for VkPipelineCreateFlagBits2 + /// typedef VkFlags64 VkPipelineCreateFlagBits2; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT = 0x00000001ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT = 0x00000002ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT = 0x00000004ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT = 0x00000010ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT = 0x08000000ULL; + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT = 0x40000000ULL; + /// // Provided by VK_AMDX_shader_enqueue with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5 + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX = 0x100000000ULL; + /// #endif + /// // Provided by VK_EXT_descriptor_heap + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT = 0x1000000000ULL; + /// // Provided by VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_BUILT_IN_PRIMITIVES_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_opacity_micromap, VK_EXT_opacity_micromap with VK_KHR_maintenance5 or VK_VERSION_1_4 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL; + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_SPHERES_AND_LINEAR_SWEPT_SPHERES_BIT_NV = 0x200000000ULL; + /// // Provided by VK_EXT_legacy_dithering with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and (VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5) + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = 0x00000002ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = 0x00000004ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008ULL; + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = 0x00000010ULL; + /// // Provided by VK_KHR_extended_flags with VK_NV_ray_tracing, VK_KHR_maintenance5 with VK_NV_ray_tracing + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_pipeline_executable_properties, VK_KHR_maintenance5 with VK_KHR_pipeline_executable_properties + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_pipeline_executable_properties, VK_KHR_maintenance5 with VK_KHR_pipeline_executable_properties + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_KHR_extended_flags with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control, VK_KHR_maintenance5 with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_KHR_extended_flags with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control, VK_KHR_maintenance5 with VK_VERSION_1_3 or VK_EXT_pipeline_creation_cache_control + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = 0x00000200ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_graphics_pipeline_library, VK_KHR_maintenance5 with VK_EXT_graphics_pipeline_library + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_graphics_pipeline_library, VK_KHR_maintenance5 with VK_EXT_graphics_pipeline_library + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_pipeline_library, VK_KHR_maintenance5 with VK_KHR_pipeline_library + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000ULL; + /// // Provided by VK_KHR_extended_flags with VK_KHR_ray_tracing_pipeline, VK_KHR_maintenance5 with VK_KHR_ray_tracing_pipeline + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000ULL; + /// // Provided by VK_KHR_extended_flags with VK_NV_device_generated_commands, VK_KHR_maintenance5 with VK_NV_device_generated_commands + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000ULL; + /// // Provided by VK_KHR_extended_flags with VK_NV_ray_tracing_motion_blur, VK_KHR_maintenance5 with VK_NV_ray_tracing_motion_blur + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL; + /// // Provided by VK_KHR_extended_flags with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_KHR_fragment_shading_rate, VK_KHR_maintenance5 with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_KHR_fragment_shading_rate + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL; + /// // Provided by VK_KHR_extended_flags with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_EXT_fragment_density_map, VK_KHR_maintenance5 with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and VK_EXT_fragment_density_map + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_attachment_feedback_loop_layout, VK_KHR_maintenance5 with VK_EXT_attachment_feedback_loop_layout + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL; + /// // Provided by VK_KHR_extended_flags with VK_EXT_attachment_feedback_loop_layout, VK_KHR_maintenance5 with VK_EXT_attachment_feedback_loop_layout + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL; + /// // Provided by VK_KHR_maintenance5 with VK_VERSION_1_4 or VK_EXT_pipeline_protected_access + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL; + /// // Provided by VK_KHR_maintenance5 with VK_VERSION_1_4 or VK_EXT_pipeline_protected_access + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL; + /// // Provided by VK_KHR_extended_flags with VK_NV_displacement_micromap, VK_KHR_maintenance5 with VK_NV_displacement_micromap + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL; + /// #endif + /// // Provided by VK_KHR_extended_flags with VK_EXT_descriptor_buffer, VK_KHR_maintenance5 with VK_EXT_descriptor_buffer + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL; + /// // Provided by VK_KHR_extended_flags with VK_ARM_pipeline_opacity_micromap, VK_KHR_maintenance5 with VK_ARM_pipeline_opacity_micromap, VK_ARM_pipeline_opacity_micromap + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM = 0x2000000000ULL; + /// // Provided by VK_KHR_maintenance5 with VK_ARM_shader_instrumentation, VK_ARM_shader_instrumentation + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INSTRUMENT_SHADERS_BIT_ARM = 0x8000000000ULL; + /// // Provided by VK_KHR_pipeline_binary + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL; + /// // Provided by VK_EXT_device_generated_commands + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL; + /// // Provided by VK_VALVE_fragment_density_map_layered + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x10000000000ULL; + /// // Provided by VK_KHR_opacity_micromap with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_KHR = 0x01000000ULL; + /// // Provided by VK_KHR_opacity_micromap with VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5 + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_KHR = 0x20000000000ULL; + /// // Provided by VK_EXT_shader_64bit_indexing + /// static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT = 0x80000000000ULL; + /// + /// + [Flags] + public enum VkPipelineCreateFlags2 : ulong + { + /// No flags set. + None = 0, + + /// + /// DisableOptimizationBit specifies that the created pipeline will not be optimized. Using this flag may: reduce the time taken to create the pipeline. + /// + DisableOptimizationBit = 0x00000001, + + /// + /// AllowDerivativesBit specifies that the pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent pipeline creation call. + /// + AllowDerivativesBit = 0x00000002, + + /// + /// DerivativeBit specifies that the pipeline to be created will be a child of a previously created parent pipeline. It is valid to set both VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT and VK_PIPELINE_CREATE_2_DERIVATIVE_BIT. This allows a pipeline to be both a parent and possibly a child in a pipeline hierarchy. See Pipeline Derivatives^ for more information. + /// + DerivativeBit = 0x00000004, + + /// + /// ViewIndexFromDeviceIndexBit + /// + ViewIndexFromDeviceIndexBit = 0x00000008, + + /// + /// DispatchBaseBit + /// + DispatchBaseBit = 0x00000010, + + /// + /// FailOnPipelineCompileRequiredBit + /// + FailOnPipelineCompileRequiredBit = 0x00000100, + + /// + /// EarlyReturnOnFailureBit + /// + EarlyReturnOnFailureBit = 0x00000200, + + /// + /// NoProtectedAccessBit + /// + NoProtectedAccessBit = 0x08000000, + + /// + /// ProtectedAccessOnlyBit + /// + ProtectedAccessOnlyBit = 0x40000000, + + /// + /// ExecutionGraphBitAMDX + /// + ExecutionGraphBitAMDX = 0x100000000, + + /// + /// DescriptorHeapBitEXT + /// + DescriptorHeapBitEXT = 0x1000000000, + + /// + /// RayTracingSkipBuiltInPrimitivesBitKHR + /// + RayTracingSkipBuiltInPrimitivesBitKHR = 0x00001000, + + /// + /// RayTracingOpacityMicromapBitEXT + /// + RayTracingOpacityMicromapBitEXT = 0x01000000, + + /// + /// RayTracingAllowSpheresAndLinearSweptSpheresBitNV + /// + RayTracingAllowSpheresAndLinearSweptSpheresBitNV = 0x200000000, + + /// + /// EnableLegacyDitheringBitEXT + /// + EnableLegacyDitheringBitEXT = 0x400000000, + + /// + /// DisableOptimizationBitKHR + /// + DisableOptimizationBitKHR = 0x00000001, + + /// + /// AllowDerivativesBitKHR + /// + AllowDerivativesBitKHR = 0x00000002, + + /// + /// DerivativeBitKHR + /// + DerivativeBitKHR = 0x00000004, + + /// + /// ViewIndexFromDeviceIndexBitKHR + /// + ViewIndexFromDeviceIndexBitKHR = 0x00000008, + + /// + /// DispatchBaseBitKHR + /// + DispatchBaseBitKHR = 0x00000010, + + /// + /// DeferCompileBitNV + /// + DeferCompileBitNV = 0x00000020, + + /// + /// CaptureStatisticsBitKHR + /// + CaptureStatisticsBitKHR = 0x00000040, + + /// + /// CaptureInternalRepresentationsBitKHR + /// + CaptureInternalRepresentationsBitKHR = 0x00000080, + + /// + /// FailOnPipelineCompileRequiredBitKHR + /// + FailOnPipelineCompileRequiredBitKHR = 0x00000100, + + /// + /// EarlyReturnOnFailureBitKHR + /// + EarlyReturnOnFailureBitKHR = 0x00000200, + + /// + /// LinkTimeOptimizationBitEXT + /// + LinkTimeOptimizationBitEXT = 0x00000400, + + /// + /// RetainLinkTimeOptimizationInfoBitEXT + /// + RetainLinkTimeOptimizationInfoBitEXT = 0x00800000, + + /// + /// LibraryBitKHR + /// + LibraryBitKHR = 0x00000800, + + /// + /// RayTracingSkipTrianglesBitKHR + /// + RayTracingSkipTrianglesBitKHR = 0x00001000, + + /// + /// RayTracingSkipAabbsBitKHR + /// + RayTracingSkipAabbsBitKHR = 0x00002000, + + /// + /// RayTracingNoNullAnyHitShadersBitKHR + /// + RayTracingNoNullAnyHitShadersBitKHR = 0x00004000, + + /// + /// RayTracingNoNullClosestHitShadersBitKHR + /// + RayTracingNoNullClosestHitShadersBitKHR = 0x00008000, + + /// + /// RayTracingNoNullMissShadersBitKHR + /// + RayTracingNoNullMissShadersBitKHR = 0x00010000, + + /// + /// RayTracingNoNullIntersectionShadersBitKHR + /// + RayTracingNoNullIntersectionShadersBitKHR = 0x00020000, + + /// + /// RayTracingShaderGroupHandleCaptureReplayBitKHR + /// + RayTracingShaderGroupHandleCaptureReplayBitKHR = 0x00080000, + + /// + /// IndirectBindableBitNV + /// + IndirectBindableBitNV = 0x00040000, + + /// + /// RayTracingAllowMotionBitNV + /// + RayTracingAllowMotionBitNV = 0x00100000, + + /// + /// RenderingFragmentShadingRateAttachmentBitKHR + /// + RenderingFragmentShadingRateAttachmentBitKHR = 0x00200000, + + /// + /// RenderingFragmentDensityMapAttachmentBitEXT + /// + RenderingFragmentDensityMapAttachmentBitEXT = 0x00400000, + + /// + /// ColorAttachmentFeedbackLoopBitEXT + /// + ColorAttachmentFeedbackLoopBitEXT = 0x02000000, + + /// + /// DepthStencilAttachmentFeedbackLoopBitEXT + /// + DepthStencilAttachmentFeedbackLoopBitEXT = 0x04000000, + + /// + /// NoProtectedAccessBitEXT + /// + NoProtectedAccessBitEXT = 0x08000000, + + /// + /// ProtectedAccessOnlyBitEXT + /// + ProtectedAccessOnlyBitEXT = 0x40000000, + + /// + /// RayTracingDisplacementMicromapBitNV + /// + RayTracingDisplacementMicromapBitNV = 0x10000000, + + /// + /// DescriptorBufferBitEXT + /// + DescriptorBufferBitEXT = 0x20000000, + + /// + /// DisallowOpacityMicromapBitARM + /// + DisallowOpacityMicromapBitARM = 0x2000000000, + + /// + /// InstrumentShadersBitARM + /// + InstrumentShadersBitARM = 0x8000000000, + + /// + /// CaptureDataBitKHR + /// + CaptureDataBitKHR = 0x80000000, + + /// + /// IndirectBindableBitEXT + /// + IndirectBindableBitEXT = 0x4000000000, + + /// + /// PerLayerFragmentDensityBitVALVE + /// + PerLayerFragmentDensityBitVALVE = 0x10000000000, + + /// + /// RayTracingOpacityMicromapBitKHR + /// + RayTracingOpacityMicromapBitKHR = 0x01000000, + + /// + /// OpacityMicromapDisallowMixedSpecialIndexBitKHR + /// + OpacityMicromapDisallowMixedSpecialIndexBitKHR = 0x20000000000, + + /// + /// _64BitIndexingBitEXT + /// + _64BitIndexingBitEXT = 0x80000000000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineCreationFeedbackFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineCreationFeedbackFlags.gen.cs new file mode 100644 index 0000000..ad1c633 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineCreationFeedbackFlags.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreationFeedbackFlagBits - Bitmask specifying pipeline or pipeline stage creation feedback + /// + /// + /// + /// Possible values of the flags member of + /// VkPipelineCreationFeedback are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef enum VkPipelineCreationFeedbackFlagBits { + /// VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT = 0x00000001, + /// VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT = 0x00000002, + /// VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT = 0x00000004, + /// // Provided by VK_EXT_pipeline_creation_feedback + /// VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT, + /// // Provided by VK_EXT_pipeline_creation_feedback + /// VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT, + /// // Provided by VK_EXT_pipeline_creation_feedback + /// VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT, + /// } VkPipelineCreationFeedbackFlagBits; + /// + /// + [Flags] + public enum VkPipelineCreationFeedbackFlags : int + { + /// No flags set. + None = 0, + + /// + /// ValidBit specifies that the feedback information is valid. + /// + ValidBit = 0x00000001, + + /// + /// ApplicationPipelineCacheHitBit specifies that a readily usable pipeline or pipeline stage was found in the pipelineCache specified by the application in the pipeline creation command. + An implementation should set the VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT bit if it was able to avoid the large majority of pipeline or pipeline stage creation work by using the pipelineCache parameter of vkCreateGraphicsPipelines, or vkCreateComputePipelines. When an implementation sets this bit for the entire pipeline, it may: leave it unset for any stage. + [NOTE] + /// + ApplicationPipelineCacheHitBit = 0x00000002, + + /// + /// BasePipelineAccelerationBit + /// + BasePipelineAccelerationBit = 0x00000004, + + /// + /// ValidBitEXT + /// + ValidBitEXT = ValidBit, + + /// + /// ApplicationPipelineCacheHitBitEXT + /// + ApplicationPipelineCacheHitBitEXT = ApplicationPipelineCacheHitBit, + + /// + /// BasePipelineAccelerationBitEXT + /// + BasePipelineAccelerationBitEXT = BasePipelineAccelerationBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineDepthStencilStateCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineDepthStencilStateCreateFlags.gen.cs new file mode 100644 index 0000000..e15b724 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineDepthStencilStateCreateFlags.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineDepthStencilStateCreateFlagBits - Bitmask specifying additional depth/stencil state information. + /// + /// + /// + /// Bits which can be set in the + /// VkPipelineDepthStencilStateCreateInfo::flags parameter are: + /// + /// + /// // Provided by VK_VERSION_1_0, VK_EXT_rasterization_order_attachment_access + /// typedef enum VkPipelineDepthStencilStateCreateFlagBits { + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000001, + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000002, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, + /// } VkPipelineDepthStencilStateCreateFlagBits; + /// + /// + [Flags] + public enum VkPipelineDepthStencilStateCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// RasterizationOrderAttachmentDepthAccessBitEXT + /// + RasterizationOrderAttachmentDepthAccessBitEXT = 0x00000001, + + /// + /// RasterizationOrderAttachmentStencilAccessBitEXT + /// + RasterizationOrderAttachmentStencilAccessBitEXT = 0x00000002, + + /// + /// RasterizationOrderAttachmentDepthAccessBitARM + /// + RasterizationOrderAttachmentDepthAccessBitARM = RasterizationOrderAttachmentDepthAccessBitEXT, + + /// + /// RasterizationOrderAttachmentStencilAccessBitARM + /// + RasterizationOrderAttachmentStencilAccessBitARM = RasterizationOrderAttachmentStencilAccessBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineExecutableStatisticFormatKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineExecutableStatisticFormatKHR.gen.cs new file mode 100644 index 0000000..099b613 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineExecutableStatisticFormatKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineExecutableStatisticFormatKHR - Enum describing a pipeline executable statistic + /// + /// + /// + /// The VkPipelineExecutableStatisticFormatKHR enum is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef enum VkPipelineExecutableStatisticFormatKHR { + /// VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0, + /// VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1, + /// VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2, + /// VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3, + /// } VkPipelineExecutableStatisticFormatKHR; + /// + /// + public enum VkPipelineExecutableStatisticFormatKHR : int + { + /// + /// Bool32KHR specifies that the statistic is returned as a 32-bit boolean value which must be either VK_TRUE or VK_FALSE and should be read from the b32 field of VkPipelineExecutableStatisticValueKHR. + /// + Bool32KHR = 0, + + /// + /// Int64KHR specifies that the statistic is returned as a signed 64-bit integer and should be read from the i64 field of VkPipelineExecutableStatisticValueKHR. + /// + Int64KHR = 1, + + /// + /// UInt64KHR specifies that the statistic is returned as an unsigned 64-bit integer and should be read from the u64 field of VkPipelineExecutableStatisticValueKHR. + /// + UInt64KHR = 2, + + /// + /// Float64KHR specifies that the statistic is returned as a 64-bit floating-point value and should be read from the f64 field of VkPipelineExecutableStatisticValueKHR. + /// + Float64KHR = 3, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineLayoutCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineLayoutCreateFlags.gen.cs new file mode 100644 index 0000000..5ee2f67 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineLayoutCreateFlags.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineLayoutCreateFlagBits - Pipeline layout creation flag bits + /// + /// + /// + /// // Provided by VK_VERSION_1_0, VK_EXT_graphics_pipeline_library + /// typedef enum VkPipelineLayoutCreateFlagBits { + /// // Provided by VK_KHR_maintenance11 with VK_EXT_shader_object, VK_EXT_graphics_pipeline_library + /// VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT = 0x00000002, + /// // Provided by VK_KHR_maintenance11 with VK_EXT_shader_object and (VK_EXT_mesh_shader or VK_NV_mesh_shader) + /// VK_PIPELINE_LAYOUT_CREATE_NO_TASK_SHADER_BIT_KHR = 0x00000004, + /// } VkPipelineLayoutCreateFlagBits; + /// + /// + [Flags] + public enum VkPipelineLayoutCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// IndependentSetsBitEXT + /// + IndependentSetsBitEXT = 0x00000002, + + /// + /// NoTaskShaderBitKHR + /// + NoTaskShaderBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessBufferBehavior.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessBufferBehavior.gen.cs new file mode 100644 index 0000000..de55b3a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessBufferBehavior.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRobustnessBufferBehavior - Enum controlling the robustness of buffer accesses in a pipeline stage + /// + /// + /// + /// Possible values of the storageBuffers, uniformBuffers, and + /// vertexInputs members of VkPipelineRobustnessCreateInfo are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef enum VkPipelineRobustnessBufferBehavior { + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT = 0, + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED = 1, + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS = 2, + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 = 3, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2, + /// } VkPipelineRobustnessBufferBehavior; + /// + /// + public enum VkPipelineRobustnessBufferBehavior : int + { + /// + /// DeviceDefault specifies that out of bounds^ buffer accesses follow the behavior of robust buffer access features enabled for the device. + /// + DeviceDefault = 0, + + /// + /// Disabled specifies that buffer accesses must not be out of bounds^. + /// + Disabled = 1, + + /// + /// RobustBufferAccess specifies that buffer accesses conform to here guarantees. + /// + RobustBufferAccess = 2, + + /// + /// RobustBufferAccess2 specifies that buffer accesses conform to here guarantees. + /// + RobustBufferAccess2 = 3, + + /// + /// DeviceDefaultEXT + /// + DeviceDefaultEXT = DeviceDefault, + + /// + /// DisabledEXT + /// + DisabledEXT = Disabled, + + /// + /// RobustBufferAccessEXT + /// + RobustBufferAccessEXT = RobustBufferAccess, + + /// + /// RobustBufferAccess2EXT + /// + RobustBufferAccess2EXT = RobustBufferAccess2, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessImageBehavior.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessImageBehavior.gen.cs new file mode 100644 index 0000000..5c86960 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineRobustnessImageBehavior.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRobustnessImageBehavior - Enum controlling the robustness of image accesses in a pipeline stage + /// + /// + /// + /// Possible values of the images member of + /// VkPipelineRobustnessCreateInfo are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef enum VkPipelineRobustnessImageBehavior { + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT = 0, + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED = 1, + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS = 2, + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 = 3, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2, + /// } VkPipelineRobustnessImageBehavior; + /// + /// + public enum VkPipelineRobustnessImageBehavior : int + { + /// + /// DeviceDefault specifies that out of bounds^ image accesses follow the behavior of robust image access features enabled for the device. + /// + DeviceDefault = 0, + + /// + /// Disabled specifies that image accesses must not be out of bounds^. + /// + Disabled = 1, + + /// + /// RobustImageAccess specifies that image accesses conform to here guarantees. + /// + RobustImageAccess = 2, + + /// + /// RobustImageAccess2 specifies that image accesses conform to here guarantees. + /// + RobustImageAccess2 = 3, + + /// + /// DeviceDefaultEXT + /// + DeviceDefaultEXT = DeviceDefault, + + /// + /// DisabledEXT + /// + DisabledEXT = Disabled, + + /// + /// RobustImageAccessEXT + /// + RobustImageAccessEXT = RobustImageAccess, + + /// + /// RobustImageAccess2EXT + /// + RobustImageAccess2EXT = RobustImageAccess2, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineShaderStageCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineShaderStageCreateFlags.gen.cs new file mode 100644 index 0000000..38e5027 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineShaderStageCreateFlags.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineShaderStageCreateFlagBits - Bitmask controlling how a pipeline shader stage is created + /// + /// + /// + /// Possible values of the flags member of + /// VkPipelineShaderStageCreateInfo specifying how a pipeline shader stage + /// is created, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPipelineShaderStageCreateFlagBits { + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT = 0x00000001, + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT = 0x00000002, + /// // Provided by VK_EXT_subgroup_size_control + /// VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT, + /// // Provided by VK_EXT_subgroup_size_control + /// VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, + /// } VkPipelineShaderStageCreateFlagBits; + /// + /// + [Flags] + public enum VkPipelineShaderStageCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// AllowVaryingSubgroupSizeBit + /// + AllowVaryingSubgroupSizeBit = 0x00000001, + + /// + /// RequireFullSubgroupsBit + /// + RequireFullSubgroupsBit = 0x00000002, + + /// + /// AllowVaryingSubgroupSizeBitEXT + /// + AllowVaryingSubgroupSizeBitEXT = AllowVaryingSubgroupSizeBit, + + /// + /// RequireFullSubgroupsBitEXT + /// + RequireFullSubgroupsBitEXT = RequireFullSubgroupsBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags.gen.cs new file mode 100644 index 0000000..99419b7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags.gen.cs @@ -0,0 +1,246 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineStageFlagBits - Bitmask specifying pipeline stages + /// + /// + /// + /// Bits which can be set in a VkPipelineStageFlags mask, specifying + /// stages of execution, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPipelineStageFlagBits { + /// VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, + /// VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, + /// VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, + /// VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, + /// VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, + /// VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, + /// VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, + /// VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, + /// VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, + /// VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, + /// VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, + /// VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, + /// VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, + /// VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, + /// VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, + /// VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, + /// VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_STAGE_NONE = 0, + /// // Provided by VK_EXT_transform_feedback + /// VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000, + /// // Provided by VK_EXT_conditional_rendering + /// VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR = 0x00200000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000, + /// // Provided by VK_EXT_mesh_shader + /// VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT = 0x00080000, + /// // Provided by VK_EXT_mesh_shader + /// VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT = 0x00100000, + /// // Provided by VK_EXT_device_generated_commands + /// VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT = 0x00020000, + /// // Provided by VK_NV_shading_rate_image + /// VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV = VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, + /// // Provided by VK_NV_mesh_shader + /// VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT, + /// // Provided by VK_NV_mesh_shader + /// VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT, + /// // Provided by VK_NV_device_generated_commands + /// VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT, + /// // Provided by VK_KHR_synchronization2 + /// VK_PIPELINE_STAGE_NONE_KHR = VK_PIPELINE_STAGE_NONE, + /// } VkPipelineStageFlagBits; + /// + /// + [Flags] + public enum VkPipelineStageFlags : int + { + /// + /// TopOfPipeBit is equivalent to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT with VkAccessFlags set to `0` when specified in the second synchronization scope, but specifies no stage of execution when specified in the first scope. + /// + TopOfPipeBit = 0x00000001, + + /// + /// DrawIndirectBit specifies the stage of the pipeline where stext:VkDrawIndirect* / stext:VkDispatchIndirect* / stext:VkTraceRaysIndirect* data structures are consumed. + /// + DrawIndirectBit = 0x00000002, + + /// + /// VertexInputBit specifies the stage of the pipeline where vertex and index buffers are consumed. + /// + VertexInputBit = 0x00000004, + + /// + /// VertexShaderBit specifies the vertex shader stage. + /// + VertexShaderBit = 0x00000008, + + /// + /// TessellationControlShaderBit specifies the tessellation control shader stage. + /// + TessellationControlShaderBit = 0x00000010, + + /// + /// TessellationEvaluationShaderBit specifies the tessellation evaluation shader stage. + /// + TessellationEvaluationShaderBit = 0x00000020, + + /// + /// GeometryShaderBit specifies the geometry shader stage. + /// + GeometryShaderBit = 0x00000040, + + /// + /// FragmentShaderBit specifies the fragment shader stage. + /// + FragmentShaderBit = 0x00000080, + + /// + /// EarlyFragmentTestsBit specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes render pass load operations^ for framebuffer attachments with a depth/stencil format. + /// + EarlyFragmentTestsBit = 0x00000100, + + /// + /// LateFragmentTestsBit specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes render pass store operations^ for framebuffer attachments with a depth/stencil format. + /// + LateFragmentTestsBit = 0x00000200, + + /// + /// ColorAttachmentOutputBit specifies the stage of the pipeline after blending where the final color values are output from the pipeline. This stage includes blending^, logic operations^, render pass load^ and store^ operations for color attachments, render pass multisample resolve operations^, and vkCmdClearAttachments. + /// + ColorAttachmentOutputBit = 0x00000400, + + /// + /// ComputeShaderBit specifies the execution of a compute shader. + /// + ComputeShaderBit = 0x00000800, + + /// + /// TransferBit + /// + TransferBit = 0x00001000, + + /// + /// BottomOfPipeBit is equivalent to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT with VkAccessFlags set to `0` when specified in the first synchronization scope, but specifies no stage of execution when specified in the second scope. + /// + BottomOfPipeBit = 0x00002000, + + /// + /// HostBit specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer. + /// + HostBit = 0x00004000, + + /// + /// AllGraphicsBit specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of: + /// + AllGraphicsBit = 0x00008000, + + /// + /// AllCommandsBit specifies all operations performed by all commands supported on the queue it is used with. + /// + AllCommandsBit = 0x00010000, + + /// + /// None + /// + None = 0, + + /// + /// TransformFeedbackBitEXT + /// + TransformFeedbackBitEXT = 0x01000000, + + /// + /// ConditionalRenderingBitEXT + /// + ConditionalRenderingBitEXT = 0x00040000, + + /// + /// AccelerationStructureBuildBitKHR + /// + AccelerationStructureBuildBitKHR = 0x02000000, + + /// + /// RayTracingShaderBitKHR + /// + RayTracingShaderBitKHR = 0x00200000, + + /// + /// FragmentDensityProcessBitEXT + /// + FragmentDensityProcessBitEXT = 0x00800000, + + /// + /// FragmentShadingRateAttachmentBitKHR + /// + FragmentShadingRateAttachmentBitKHR = 0x00400000, + + /// + /// TaskShaderBitEXT + /// + TaskShaderBitEXT = 0x00080000, + + /// + /// MeshShaderBitEXT + /// + MeshShaderBitEXT = 0x00100000, + + /// + /// CommandPreprocessBitEXT + /// + CommandPreprocessBitEXT = 0x00020000, + + /// + /// ShadingRateImageBitNV + /// + ShadingRateImageBitNV = FragmentShadingRateAttachmentBitKHR, + + /// + /// RayTracingShaderBitNV + /// + RayTracingShaderBitNV = RayTracingShaderBitKHR, + + /// + /// AccelerationStructureBuildBitNV + /// + AccelerationStructureBuildBitNV = AccelerationStructureBuildBitKHR, + + /// + /// TaskShaderBitNV + /// + TaskShaderBitNV = TaskShaderBitEXT, + + /// + /// MeshShaderBitNV + /// + MeshShaderBitNV = MeshShaderBitEXT, + + /// + /// CommandPreprocessBitNV + /// + CommandPreprocessBitNV = CommandPreprocessBitEXT, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags2.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags2.gen.cs new file mode 100644 index 0000000..f53d799 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPipelineStageFlags2.gen.cs @@ -0,0 +1,555 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineStageFlagBits2 - Pipeline stage flags for VkPipelineStageFlags2 + /// + /// + /// + /// Bits which can be set in a VkPipelineStageFlags2 mask, specifying + /// stages of execution, are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// // Flag bits for VkPipelineStageFlagBits2 + /// typedef VkFlags64 VkPipelineStageFlagBits2; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE = 0ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 0x00000001ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 0x00000002ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 0x00000004ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 0x00000008ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 0x00000040ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 0x00000080ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 0x00000100ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 0x00000200ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 0x00000800ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 0x00001000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT = 0x00001000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 0x00002000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT = 0x00004000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 0x00008000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 0x00010000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT = 0x100000000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT = 0x200000000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT = 0x400000000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT = 0x800000000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT = 0x1000000000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 0x2000000000ULL; + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 0x4000000000ULL; + /// // Provided by VK_KHR_video_decode_queue + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 0x04000000ULL; + /// // Provided by VK_KHR_video_encode_queue + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE_KHR = 0ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL; + /// // Provided by VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_transform_feedback + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_conditional_rendering + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_device_generated_commands + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_device_generated_commands + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT = 0x00020000ULL; + /// // Provided by VK_KHR_fragment_shading_rate with VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_shading_rate_image + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000ULL; + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000ULL; + /// // Provided by VK_KHR_ray_tracing_pipeline with VK_KHR_synchronization2 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_ray_tracing + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_fragment_density_map + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_mesh_shader + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0x00080000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_NV_mesh_shader + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_mesh_shader + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 0x00080000ULL; + /// // Provided by VK_KHR_synchronization2 with VK_EXT_mesh_shader + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 0x00100000ULL; + /// // Provided by VK_HUAWEI_subpass_shading + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI = 0x8000000000ULL; + /// // Provided by VK_HUAWEI_subpass_shading + /// // VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI is a legacy alias + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 0x8000000000ULL; + /// // Provided by VK_HUAWEI_invocation_mask + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x10000000000ULL; + /// // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_synchronization2 or VK_VERSION_1_3 + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 0x10000000ULL; + /// // Provided by VK_EXT_opacity_micromap + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 0x40000000ULL; + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI = 0x20000000000ULL; + /// // Provided by VK_NV_optical_flow + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 0x20000000ULL; + /// // Provided by VK_NV_cooperative_vector + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV = 0x100000000000ULL; + /// // Provided by VK_ARM_data_graph + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DATA_GRAPH_BIT_ARM = 0x40000000000ULL; + /// // Provided by VK_KHR_copy_memory_indirect + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_INDIRECT_BIT_KHR = 0x400000000000ULL; + /// // Provided by VK_EXT_memory_decompression + /// static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT = 0x200000000000ULL; + /// + /// + [Flags] + public enum VkPipelineStageFlags2 : ulong + { + /// + /// None specifies no stages of execution. + /// + None = 0, + + /// + /// TopOfPipeBit is equivalent to VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT with VkAccessFlags2 set to `0` when specified in the second synchronization scope, but equivalent to VK_PIPELINE_STAGE_2_NONE in the first scope. + /// + TopOfPipeBit = 0x00000001, + + /// + /// DrawIndirectBit specifies the stage of the pipeline where indirect command parameters are consumed. + /// + DrawIndirectBit = 0x00000002, + + /// + /// VertexInputBit is equivalent to the logical OR of: include::{generated}/sync/flagDefinitions/VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT.adoc[] + /// + VertexInputBit = 0x00000004, + + /// + /// VertexShaderBit specifies the vertex shader stage. + /// + VertexShaderBit = 0x00000008, + + /// + /// TessellationControlShaderBit specifies the tessellation control shader stage. + /// + TessellationControlShaderBit = 0x00000010, + + /// + /// TessellationEvaluationShaderBit specifies the tessellation evaluation shader stage. + /// + TessellationEvaluationShaderBit = 0x00000020, + + /// + /// GeometryShaderBit specifies the geometry shader stage. + /// + GeometryShaderBit = 0x00000040, + + /// + /// FragmentShaderBit specifies the fragment shader stage. + /// + FragmentShaderBit = 0x00000080, + + /// + /// EarlyFragmentTestsBit specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes render pass load operations^ for framebuffer attachments with a depth/stencil format. + /// + EarlyFragmentTestsBit = 0x00000100, + + /// + /// LateFragmentTestsBit specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes render pass store operations^ for framebuffer attachments with a depth/stencil format. + /// + LateFragmentTestsBit = 0x00000200, + + /// + /// ColorAttachmentOutputBit specifies the stage of the pipeline where final color values are output from the pipeline. This stage includes blending^, logic operations^, render pass load^ and store^ operations for color attachments, render pass multisample resolve operations^, and vkCmdClearAttachments. + /// + ColorAttachmentOutputBit = 0x00000400, + + /// + /// ComputeShaderBit specifies the compute shader stage. + /// + ComputeShaderBit = 0x00000800, + + /// + /// AllTransferBit is equivalent to specifying all of: include::{generated}/sync/flagDefinitions/VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT.adoc[] + /// + AllTransferBit = 0x00001000, + + /// + /// TransferBit + /// + TransferBit = 0x00001000, + + /// + /// BottomOfPipeBit is equivalent to VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT with VkAccessFlags2 set to `0` when specified in the first synchronization scope, but equivalent to VK_PIPELINE_STAGE_2_NONE in the second scope. [NOTE] + /// + BottomOfPipeBit = 0x00002000, + + /// + /// HostBit specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer. + /// + HostBit = 0x00004000, + + /// + /// AllGraphicsBit specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of: include::{generated}/sync/flagDefinitions/VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT.adoc[] + /// + AllGraphicsBit = 0x00008000, + + /// + /// AllCommandsBit specifies all operations performed by all commands supported on the queue it is used with. + /// + AllCommandsBit = 0x00010000, + + /// + /// CopyBit specifies the execution of all copy commands^, including vkCmdCopyQueryPoolResults. + /// + CopyBit = 0x100000000, + + /// + /// ResolveBit specifies the execution of vkCmdResolveImage. + /// + ResolveBit = 0x200000000, + + /// + /// BlitBit specifies the execution of vkCmdBlitImage. + /// + BlitBit = 0x400000000, + + /// + /// ClearBit specifies the execution of clear commands^, with the exception of vkCmdClearAttachments. + /// + ClearBit = 0x800000000, + + /// + /// IndexInputBit specifies the stage of the pipeline where index buffers are consumed. + /// + IndexInputBit = 0x1000000000, + + /// + /// VertexAttributeInputBit specifies the stage of the pipeline where vertex buffers are consumed. + /// + VertexAttributeInputBit = 0x2000000000, + + /// + /// PreRasterizationShadersBit is equivalent to specifying all supported pre-rasterization shader stages^: include::{generated}/sync/flagDefinitions/VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT.adoc[] + /// + PreRasterizationShadersBit = 0x4000000000, + + /// + /// VideoDecodeBitKHR + /// + VideoDecodeBitKHR = 0x04000000, + + /// + /// VideoEncodeBitKHR + /// + VideoEncodeBitKHR = 0x08000000, + + /// + /// NoneKHR + /// + NoneKHR = 0, + + /// + /// TopOfPipeBitKHR + /// + TopOfPipeBitKHR = 0x00000001, + + /// + /// DrawIndirectBitKHR + /// + DrawIndirectBitKHR = 0x00000002, + + /// + /// VertexInputBitKHR + /// + VertexInputBitKHR = 0x00000004, + + /// + /// VertexShaderBitKHR + /// + VertexShaderBitKHR = 0x00000008, + + /// + /// TessellationControlShaderBitKHR + /// + TessellationControlShaderBitKHR = 0x00000010, + + /// + /// TessellationEvaluationShaderBitKHR + /// + TessellationEvaluationShaderBitKHR = 0x00000020, + + /// + /// GeometryShaderBitKHR + /// + GeometryShaderBitKHR = 0x00000040, + + /// + /// FragmentShaderBitKHR + /// + FragmentShaderBitKHR = 0x00000080, + + /// + /// EarlyFragmentTestsBitKHR + /// + EarlyFragmentTestsBitKHR = 0x00000100, + + /// + /// LateFragmentTestsBitKHR + /// + LateFragmentTestsBitKHR = 0x00000200, + + /// + /// ColorAttachmentOutputBitKHR + /// + ColorAttachmentOutputBitKHR = 0x00000400, + + /// + /// ComputeShaderBitKHR + /// + ComputeShaderBitKHR = 0x00000800, + + /// + /// AllTransferBitKHR + /// + AllTransferBitKHR = 0x00001000, + + /// + /// TransferBitKHR + /// + TransferBitKHR = 0x00001000, + + /// + /// BottomOfPipeBitKHR + /// + BottomOfPipeBitKHR = 0x00002000, + + /// + /// HostBitKHR + /// + HostBitKHR = 0x00004000, + + /// + /// AllGraphicsBitKHR + /// + AllGraphicsBitKHR = 0x00008000, + + /// + /// AllCommandsBitKHR + /// + AllCommandsBitKHR = 0x00010000, + + /// + /// CopyBitKHR + /// + CopyBitKHR = 0x100000000, + + /// + /// ResolveBitKHR + /// + ResolveBitKHR = 0x200000000, + + /// + /// BlitBitKHR + /// + BlitBitKHR = 0x400000000, + + /// + /// ClearBitKHR + /// + ClearBitKHR = 0x800000000, + + /// + /// IndexInputBitKHR + /// + IndexInputBitKHR = 0x1000000000, + + /// + /// VertexAttributeInputBitKHR + /// + VertexAttributeInputBitKHR = 0x2000000000, + + /// + /// PreRasterizationShadersBitKHR + /// + PreRasterizationShadersBitKHR = 0x4000000000, + + /// + /// TransformFeedbackBitEXT + /// + TransformFeedbackBitEXT = 0x01000000, + + /// + /// ConditionalRenderingBitEXT + /// + ConditionalRenderingBitEXT = 0x00040000, + + /// + /// CommandPreprocessBitNV + /// + CommandPreprocessBitNV = 0x00020000, + + /// + /// CommandPreprocessBitEXT + /// + CommandPreprocessBitEXT = 0x00020000, + + /// + /// FragmentShadingRateAttachmentBitKHR + /// + FragmentShadingRateAttachmentBitKHR = 0x00400000, + + /// + /// ShadingRateImageBitNV + /// + ShadingRateImageBitNV = 0x00400000, + + /// + /// AccelerationStructureBuildBitKHR + /// + AccelerationStructureBuildBitKHR = 0x02000000, + + /// + /// RayTracingShaderBitKHR + /// + RayTracingShaderBitKHR = 0x00200000, + + /// + /// RayTracingShaderBitNV + /// + RayTracingShaderBitNV = 0x00200000, + + /// + /// AccelerationStructureBuildBitNV + /// + AccelerationStructureBuildBitNV = 0x02000000, + + /// + /// FragmentDensityProcessBitEXT + /// + FragmentDensityProcessBitEXT = 0x00800000, + + /// + /// TaskShaderBitNV + /// + TaskShaderBitNV = 0x00080000, + + /// + /// MeshShaderBitNV + /// + MeshShaderBitNV = 0x00100000, + + /// + /// TaskShaderBitEXT + /// + TaskShaderBitEXT = 0x00080000, + + /// + /// MeshShaderBitEXT + /// + MeshShaderBitEXT = 0x00100000, + + /// + /// SubpassShaderBitHUAWEI + /// + SubpassShaderBitHUAWEI = 0x8000000000, + + /// + /// SubpassShadingBitHUAWEI + /// + SubpassShadingBitHUAWEI = 0x8000000000, + + /// + /// InvocationMaskBitHUAWEI + /// + InvocationMaskBitHUAWEI = 0x10000000000, + + /// + /// AccelerationStructureCopyBitKHR + /// + AccelerationStructureCopyBitKHR = 0x10000000, + + /// + /// MicromapBuildBitEXT + /// + MicromapBuildBitEXT = 0x40000000, + + /// + /// ClusterCullingShaderBitHUAWEI + /// + ClusterCullingShaderBitHUAWEI = 0x20000000000, + + /// + /// OpticalFlowBitNV + /// + OpticalFlowBitNV = 0x20000000, + + /// + /// ConvertCooperativeVectorMatrixBitNV + /// + ConvertCooperativeVectorMatrixBitNV = 0x100000000000, + + /// + /// DataGraphBitARM + /// + DataGraphBitARM = 0x40000000000, + + /// + /// CopyIndirectBitKHR + /// + CopyIndirectBitKHR = 0x400000000000, + + /// + /// MemoryDecompressionBitEXT + /// + MemoryDecompressionBitEXT = 0x200000000000, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPointClippingBehavior.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPointClippingBehavior.gen.cs new file mode 100644 index 0000000..9e4b4a2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPointClippingBehavior.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPointClippingBehavior - Enum specifying the point clipping behavior + /// + /// + /// + /// Possible values of + /// VkPhysicalDevicePointClippingProperties::pointClippingBehavior, + /// specifying clipping behavior of a point primitive whose vertex lies outside + /// the clip volume, are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkPointClippingBehavior { + /// VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, + /// VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, + /// // Provided by VK_KHR_maintenance2 + /// VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, + /// // Provided by VK_KHR_maintenance2 + /// VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY, + /// } VkPointClippingBehavior; + /// + /// + public enum VkPointClippingBehavior : int + { + /// + /// AllClipPlanes specifies that the primitive is discarded if the vertex lies outside any clip plane, including the planes bounding the view volume. + /// + AllClipPlanes = 0, + + /// + /// UserClipPlanesOnly specifies that the primitive is discarded only if the vertex lies outside any user clip plane. + /// + UserClipPlanesOnly = 1, + + /// + /// AllClipPlanesKHR + /// + AllClipPlanesKHR = AllClipPlanes, + + /// + /// UserClipPlanesOnlyKHR + /// + UserClipPlanesOnlyKHR = UserClipPlanesOnly, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPolygonMode.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPolygonMode.gen.cs new file mode 100644 index 0000000..86a6676 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPolygonMode.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPolygonMode - Control polygon rasterization mode + /// + /// + /// + /// Possible values of the + /// VkPipelineRasterizationStateCreateInfo::polygonMode property of + /// the currently active pipeline, specifying the method of rasterization for + /// polygons, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPolygonMode { + /// VK_POLYGON_MODE_FILL = 0, + /// VK_POLYGON_MODE_LINE = 1, + /// VK_POLYGON_MODE_POINT = 2, + /// // Provided by VK_NV_fill_rectangle + /// VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000, + /// } VkPolygonMode; + /// + /// + public enum VkPolygonMode : int + { + /// + /// Fill specifies that polygons are rendered using the polygon rasterization rules in this section. These modes affect only the final rasterization of polygons: in particular, a polygon's vertices are shaded and the polygon is clipped and possibly culled before these modes are applied. The point size of the final rasterization of polygons when polygon mode^ is VK_POLYGON_MODE_POINT is implementation-dependent, and the point size may: either be PointSize or 1.0. + /// + Fill = 0, + + /// + /// Line specifies that polygon edges are drawn as line segments. + /// + Line = 1, + + /// + /// Point specifies that polygon vertices are drawn as points. + /// + Point = 2, + + /// + /// FillRectangleNV + /// + FillRectangleNV = 1000153000, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPresentGravityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPresentGravityFlagsKHR.gen.cs new file mode 100644 index 0000000..e42a499 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPresentGravityFlagsKHR.gen.cs @@ -0,0 +1,66 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentGravityFlagBitsKHR - Bitmask specifying presentation pixel gravity on either the x or y axis + /// + /// + /// + /// Bits which may: be set in the + /// VkSurfacePresentScalingCapabilitiesKHR::supportedPresentGravityX + /// or supportedPresentGravityY fields, specifying the gravity of + /// presented pixels supported by the surface, are: + /// + /// + /// // Provided by VK_KHR_surface_maintenance1 + /// typedef enum VkPresentGravityFlagBitsKHR { + /// VK_PRESENT_GRAVITY_MIN_BIT_KHR = 0x00000001, + /// VK_PRESENT_GRAVITY_MAX_BIT_KHR = 0x00000002, + /// VK_PRESENT_GRAVITY_CENTERED_BIT_KHR = 0x00000004, + /// VK_PRESENT_GRAVITY_MIN_BIT_EXT = VK_PRESENT_GRAVITY_MIN_BIT_KHR, + /// VK_PRESENT_GRAVITY_MAX_BIT_EXT = VK_PRESENT_GRAVITY_MAX_BIT_KHR, + /// VK_PRESENT_GRAVITY_CENTERED_BIT_EXT = VK_PRESENT_GRAVITY_CENTERED_BIT_KHR, + /// } VkPresentGravityFlagBitsKHR; + /// + /// + [Flags] + public enum VkPresentGravityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// MinBitKHR means that the pixels will gravitate towards the top or left side of the surface. + /// + MinBitKHR = 0x00000001, + + /// + /// MaxBitKHR means that the pixels will gravitate towards the bottom or right side of the surface. + /// + MaxBitKHR = 0x00000002, + + /// + /// CenteredBitKHR means that the pixels will be centered in the surface. If the value in VkSurfaceCapabilitiesKHR::currentTransform is not VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, it is implementation-defined whether the gravity configuration applies to the presented image before or after transformation. + /// + CenteredBitKHR = 0x00000004, + + /// + /// MinBitEXT + /// + MinBitEXT = MinBitKHR, + + /// + /// MaxBitEXT + /// + MaxBitEXT = MaxBitKHR, + + /// + /// CenteredBitEXT + /// + CenteredBitEXT = CenteredBitKHR, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPresentModeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPresentModeKHR.gen.cs new file mode 100644 index 0000000..b048506 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPresentModeKHR.gen.cs @@ -0,0 +1,77 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentModeKHR - Presentation mode supported for a surface + /// + /// + /// + /// Possible values of elements of the + /// vkGetPhysicalDeviceSurfacePresentModesKHR::pPresentModes array, + /// indicating the supported presentation modes for a surface, are: + /// + /// + /// // Provided by VK_KHR_surface + /// typedef enum VkPresentModeKHR { + /// VK_PRESENT_MODE_IMMEDIATE_KHR = 0, + /// VK_PRESENT_MODE_MAILBOX_KHR = 1, + /// VK_PRESENT_MODE_FIFO_KHR = 2, + /// VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3, + /// // Provided by VK_KHR_shared_presentable_image + /// VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, + /// // Provided by VK_KHR_shared_presentable_image + /// VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, + /// // Provided by VK_KHR_present_mode_fifo_latest_ready + /// VK_PRESENT_MODE_FIFO_LATEST_READY_KHR = 1000361000, + /// // Provided by VK_EXT_present_mode_fifo_latest_ready + /// VK_PRESENT_MODE_FIFO_LATEST_READY_EXT = VK_PRESENT_MODE_FIFO_LATEST_READY_KHR, + /// } VkPresentModeKHR; + /// + /// + public enum VkPresentModeKHR : int + { + /// + /// ImmediateKHR specifies that the presentation engine does not wait for a vertical blanking period to update the current image, meaning this mode may: result in visible tearing. No internal queuing of presentation requests is needed, as the requests are applied immediately. + /// + ImmediateKHR = 0, + + /// + /// MailboxKHR specifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot: be observed. An internal single-entry queue is used to hold pending presentation requests. If the queue is full when a new presentation request is received, the new request replaces the existing entry, and any images associated with the prior entry become available for reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty. + /// + MailboxKHR = 1, + + /// + /// FifoKHR specifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot: be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during each vertical blanking period in which the queue is non-empty. This is the only value of presentMode that is required: to be supported. + /// + FifoKHR = 2, + + /// + /// FifoRelaxedKHR specifies that the presentation engine generally waits for the next vertical blanking period to update the current image. If a vertical blanking period has already passed since the last update of the current image then the presentation engine does not wait for another vertical blanking period for the update, meaning this mode may: result in visible tearing in this case. This mode is useful for reducing visual stutter with an application that will mostly present a new image before the next vertical blanking period, but may occasionally be late, and present a new image just after the next vertical blanking period. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during or after each vertical blanking period in which the queue is non-empty. + /// + FifoRelaxedKHR = 3, + + /// + /// SharedDemandRefreshKHR + /// + SharedDemandRefreshKHR = 1000111000, + + /// + /// SharedContinuousRefreshKHR + /// + SharedContinuousRefreshKHR = 1000111001, + + /// + /// FifoLatestReadyKHR + /// + FifoLatestReadyKHR = 1000361000, + + /// + /// FifoLatestReadyEXT + /// + FifoLatestReadyEXT = FifoLatestReadyKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPresentScalingFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPresentScalingFlagsKHR.gen.cs new file mode 100644 index 0000000..72c1efe --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPresentScalingFlagsKHR.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentScalingFlagBitsKHR - Bitmask specifying presentation scaling methods + /// + /// + /// + /// Bits which may: be set in + /// VkSurfacePresentScalingCapabilitiesKHR::supportedPresentScaling, + /// specifying scaling modes supported by the surface, are: + /// + /// + /// // Provided by VK_KHR_surface_maintenance1 + /// typedef enum VkPresentScalingFlagBitsKHR { + /// VK_PRESENT_SCALING_ONE_TO_ONE_BIT_KHR = 0x00000001, + /// VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_KHR = 0x00000002, + /// VK_PRESENT_SCALING_STRETCH_BIT_KHR = 0x00000004, + /// VK_PRESENT_SCALING_ONE_TO_ONE_BIT_EXT = VK_PRESENT_SCALING_ONE_TO_ONE_BIT_KHR, + /// VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT = VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_KHR, + /// VK_PRESENT_SCALING_STRETCH_BIT_EXT = VK_PRESENT_SCALING_STRETCH_BIT_KHR, + /// } VkPresentScalingFlagBitsKHR; + /// + /// + [Flags] + public enum VkPresentScalingFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// OneToOneBitKHR specifies that no scaling occurs, and pixels in the swapchain image are mapped to one and only one pixel in the surface. The mapping between pixels is defined by the chosen presentation gravity. + /// + OneToOneBitKHR = 0x00000001, + + /// + /// AspectRatioStretchBitKHR specifies that the swapchain image will be minified or magnified such that at least one of the resulting width or height is equal to the corresponding surface dimension, and the other resulting dimension is less than or equal to the corresponding surface dimension, with the aspect ratio of the resulting image being identical to that of the original swapchain image. + /// + AspectRatioStretchBitKHR = 0x00000002, + + /// + /// StretchBitKHR specifies that the swapchain image will be minified or magnified such that the resulting image dimensions are equal to those of the surface. + /// + StretchBitKHR = 0x00000004, + + /// + /// OneToOneBitEXT + /// + OneToOneBitEXT = OneToOneBitKHR, + + /// + /// AspectRatioStretchBitEXT + /// + AspectRatioStretchBitEXT = AspectRatioStretchBitKHR, + + /// + /// StretchBitEXT + /// + StretchBitEXT = StretchBitKHR, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPresentStageFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPresentStageFlagsEXT.gen.cs new file mode 100644 index 0000000..b4004a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPresentStageFlagsEXT.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentStageFlagBitsEXT - Bitmask specifying stages of the image presentation process + /// + /// + /// + /// Presenting an image to the user typically involves multiple stages. + /// Bits which can be set to specify present stages are: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef enum VkPresentStageFlagBitsEXT { + /// VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT = 0x00000001, + /// VK_PRESENT_STAGE_REQUEST_DEQUEUED_BIT_EXT = 0x00000002, + /// VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_OUT_BIT_EXT = 0x00000004, + /// VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT = 0x00000008, + /// } VkPresentStageFlagBitsEXT; + /// + /// + [Flags] + public enum VkPresentStageFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// QueueOperationsEndBitEXT marks the end of the set of queue operations enqueued by vkQueuePresentKHR on the provided VkQueue for a presentation request. + /// + QueueOperationsEndBitEXT = 0x00000001, + + /// + /// RequestDequeuedBitEXT is the stage after which the presentation request has been dequeued from the swapchain's internal presentation request queue, if any, as specified by the present mode associated with that request. + /// + RequestDequeuedBitEXT = 0x00000002, + + /// + /// ImageFirstPixelOutBitEXT is the stage after which data for the first pixel of the presentation request associated with the image has left the presentation engine for a display hardware. + /// + ImageFirstPixelOutBitEXT = 0x00000004, + + /// + /// ImageFirstPixelVisibleBitEXT is the stage after which a display hardware has made the first pixel visible for the presentation request associated with the image to be presented. [NOTE] + /// + ImageFirstPixelVisibleBitEXT = 0x00000008, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPresentTimingInfoFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPresentTimingInfoFlagsEXT.gen.cs new file mode 100644 index 0000000..aa631fe --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPresentTimingInfoFlagsEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentTimingInfoFlagBitsEXT - Bitmask specifying present timing info flags + /// + /// + /// + /// Bits which can be set in VkPresentTimingInfoEXT::flags, + /// specifying options for how to interpret timing information: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef enum VkPresentTimingInfoFlagBitsEXT { + /// VK_PRESENT_TIMING_INFO_PRESENT_AT_RELATIVE_TIME_BIT_EXT = 0x00000001, + /// VK_PRESENT_TIMING_INFO_PRESENT_AT_NEAREST_REFRESH_CYCLE_BIT_EXT = 0x00000002, + /// } VkPresentTimingInfoFlagBitsEXT; + /// + /// + [Flags] + public enum VkPresentTimingInfoFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// PresentAtRelativeTimeBitEXT specifies that VkPresentTimingInfoEXT::targetTime is to be interpreted as a relative time from the previous presentation's VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT stage. If the swapchain has never been used to present an image, the provided targetTime is ignored. + /// + PresentAtRelativeTimeBitEXT = 0x00000001, + + /// + /// PresentAtNearestRefreshCycleBitEXT specifies that the application would prefer the image to be presented earlier than the time specified in VkPresentTimingInfoEXT::targetTime if that time falls within the first half of a refresh cycle. In that case, the presentation engine may: choose to display the image at the start of that refresh cycle. + /// + PresentAtNearestRefreshCycleBitEXT = 0x00000002, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkPrimitiveTopology.gen.cs b/Brutal.Vulkan/Generated/Enums/VkPrimitiveTopology.gen.cs new file mode 100644 index 0000000..ce8def6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkPrimitiveTopology.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPrimitiveTopology - Supported primitive topologies + /// + /// + /// + /// The primitive topologies defined by VkPrimitiveTopology are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkPrimitiveTopology { + /// VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, + /// VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, + /// VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, + /// VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, + /// VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, + /// VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, + /// VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, + /// VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, + /// VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, + /// VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, + /// VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10, + /// } VkPrimitiveTopology; + /// + /// + public enum VkPrimitiveTopology : int + { + /// + /// PointList specifies a series of separate point primitives^. + /// + PointList = 0, + + /// + /// LineList specifies a series of separate line primitives^. + /// + LineList = 1, + + /// + /// LineStrip specifies a series of connected line primitives^ with consecutive lines sharing a vertex. + /// + LineStrip = 2, + + /// + /// TriangleList specifies a series of separate triangle primitives^. + /// + TriangleList = 3, + + /// + /// TriangleStrip specifies a series of connected triangle primitives^ with consecutive triangles sharing an edge. + /// + TriangleStrip = 4, + + /// + /// TriangleFan specifies a series of connected triangle primitives^ with all triangles sharing a common vertex. + /// + TriangleFan = 5, + + /// + /// LineListWithAdjacency specifies a series of separate line primitives with adjacency^. + /// + LineListWithAdjacency = 6, + + /// + /// LineStripWithAdjacency specifies a series of connected line primitives with adjacency^, with consecutive primitives sharing three vertices. + /// + LineStripWithAdjacency = 7, + + /// + /// TriangleListWithAdjacency specifies a series of separate triangle primitives with adjacency^. + /// + TriangleListWithAdjacency = 8, + + /// + /// TriangleStripWithAdjacency specifies connected triangle primitives with adjacency^, with consecutive triangles sharing an edge. + /// + TriangleStripWithAdjacency = 9, + + /// + /// PatchList specifies separate patch primitives^. Each primitive topology, and its construction from a list of vertices, is described in detail below with a supporting diagram, according to the following key: [cols="1,2,9"] | + /// + PatchList = 10, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkProvokingVertexModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkProvokingVertexModeEXT.gen.cs new file mode 100644 index 0000000..f6b8e2f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkProvokingVertexModeEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkProvokingVertexModeEXT - Specify which vertex in a primitive is the provoking vertex + /// + /// + /// + /// Possible values of + /// VkPipelineRasterizationProvokingVertexStateCreateInfoEXT::provokingVertexMode + /// are: + /// + /// + /// // Provided by VK_EXT_provoking_vertex + /// typedef enum VkProvokingVertexModeEXT { + /// VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0, + /// VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1, + /// } VkProvokingVertexModeEXT; + /// + /// + public enum VkProvokingVertexModeEXT : int + { + /// + /// FirstVertexEXT specifies that the provoking vertex is the first non-adjacency vertex in the list of vertices used by a primitive. + /// + FirstVertexEXT = 0, + + /// + /// LastVertexEXT specifies that the provoking vertex is the last non-adjacency vertex in the list of vertices used by a primitive. These modes are described more precisely in Primitive Topologies^. + /// + LastVertexEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryControlFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryControlFlags.gen.cs new file mode 100644 index 0000000..cb45da5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryControlFlags.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryControlFlagBits - Bitmask specifying constraints on a query + /// + /// + /// + /// Bits which can be set in vkCmdBeginQuery::flags, specifying + /// constraints on the types of queries that can be performed, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkQueryControlFlagBits { + /// VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, + /// } VkQueryControlFlagBits; + /// + /// + [Flags] + public enum VkQueryControlFlags : int + { + /// No flags set. + None = 0, + + /// + /// PreciseBit specifies the precision of occlusion queries^. + /// + PreciseBit = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryPipelineStatisticFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryPipelineStatisticFlags.gen.cs new file mode 100644 index 0000000..6395729 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryPipelineStatisticFlags.gen.cs @@ -0,0 +1,117 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPipelineStatisticFlagBits - Bitmask specifying queried pipeline statistics + /// + /// + /// + /// Bits which can be set in + /// VkQueryPoolCreateInfo::pipelineStatistics for query pools and in + /// VkCommandBufferInheritanceInfo::pipelineStatistics for secondary + /// command buffers, individually enabling pipeline statistics counters, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkQueryPipelineStatisticFlagBits { + /// VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, + /// VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, + /// VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, + /// VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, + /// VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, + /// VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, + /// VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, + /// VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, + /// VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, + /// VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, + /// VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, + /// // Provided by VK_EXT_mesh_shader + /// VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT = 0x00000800, + /// // Provided by VK_EXT_mesh_shader + /// VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT = 0x00001000, + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// VK_QUERY_PIPELINE_STATISTIC_CLUSTER_CULLING_SHADER_INVOCATIONS_BIT_HUAWEI = 0x00002000, + /// } VkQueryPipelineStatisticFlagBits; + /// + /// + [Flags] + public enum VkQueryPipelineStatisticFlags : int + { + /// No flags set. + None = 0, + + /// + /// InputAssemblyVerticesBit specifies that queries managed by the pool will count the number of vertices processed by the input assembly^ stage. Vertices corresponding to incomplete primitives may: contribute to the count. + /// + InputAssemblyVerticesBit = 0x00000001, + + /// + /// InputAssemblyPrimitivesBit specifies that queries managed by the pool will count the number of primitives processed by the input assembly^ stage. If primitive restart is enabled, restarting the primitive topology has no effect on the count. Incomplete primitives may: be counted. + /// + InputAssemblyPrimitivesBit = 0x00000002, + + /// + /// VertexShaderInvocationsBit specifies that queries managed by the pool will count the number of vertex shader invocations. This counter's value is incremented each time a vertex shader is invoked^. + /// + VertexShaderInvocationsBit = 0x00000004, + + /// + /// GeometryShaderInvocationsBit specifies that queries managed by the pool will count the number of geometry shader invocations. This counter's value is incremented each time a geometry shader is invoked^. In the case of instanced geometry shaders^, the geometry shader invocations count is incremented for each separate instanced invocation. + /// + GeometryShaderInvocationsBit = 0x00000008, + + /// + /// GeometryShaderPrimitivesBit specifies that queries managed by the pool will count the number of primitives generated by geometry shader invocations. The counter's value is incremented each time the geometry shader emits a primitive. Restarting primitive topology using the SPIR-V instructions OpEndPrimitive or OpEndStreamPrimitive has no effect on the geometry shader output primitives count. + /// + GeometryShaderPrimitivesBit = 0x00000010, + + /// + /// ClippingInvocationsBit specifies that queries managed by the pool will count the number of primitives processed by the Primitive Clipping^ stage of the pipeline. The counter's value is incremented each time a primitive reaches the primitive clipping stage. + /// + ClippingInvocationsBit = 0x00000020, + + /// + /// ClippingPrimitivesBit specifies that queries managed by the pool will count the number of primitives output by the Primitive Clipping^ stage of the pipeline. The counter's value is incremented each time a primitive passes the primitive clipping stage. The actual number of primitives output by the primitive clipping stage for a particular input primitive is implementation-dependent but must satisfy the following conditions: + /// + ClippingPrimitivesBit = 0x00000040, + + /// + /// FragmentShaderInvocationsBit specifies that queries managed by the pool will count the number of fragment shader invocations. The counter's value is incremented each time the fragment shader is invoked^. + /// + FragmentShaderInvocationsBit = 0x00000080, + + /// + /// TessellationControlShaderPatchesBit specifies that queries managed by the pool will count the number of patches processed by the tessellation control shader. The counter's value is incremented once for each patch for which a tessellation control shader is invoked^. + /// + TessellationControlShaderPatchesBit = 0x00000100, + + /// + /// TessellationEvaluationShaderInvocationsBit specifies that queries managed by the pool will count the number of invocations of the tessellation evaluation shader. The counter's value is incremented each time the tessellation evaluation shader is invoked^. + /// + TessellationEvaluationShaderInvocationsBit = 0x00000200, + + /// + /// ComputeShaderInvocationsBit specifies that queries managed by the pool will count the number of compute shader invocations. The counter's value is incremented every time the compute shader is invoked. Implementations may: skip the execution of certain compute shader invocations or execute additional compute shader invocations for implementation-dependent reasons as long as the results of rendering otherwise remain unchanged. These values are intended to measure relative statistics on one implementation. Various device architectures will count these values differently. Any or all counters may: be affected by the issues described in Query Operation^. [NOTE] + /// + ComputeShaderInvocationsBit = 0x00000400, + + /// + /// TaskShaderInvocationsBitEXT + /// + TaskShaderInvocationsBitEXT = 0x00000800, + + /// + /// MeshShaderInvocationsBitEXT + /// + MeshShaderInvocationsBitEXT = 0x00001000, + + /// + /// ClusterCullingShaderInvocationsBitHUAWEI + /// + ClusterCullingShaderInvocationsBitHUAWEI = 0x00002000, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryPoolCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryPoolCreateFlags.gen.cs new file mode 100644 index 0000000..48e6e65 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryPoolCreateFlags.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolCreateFlagBits - Bitmask specifying query pool properties + /// + /// + /// + /// Bits which can be set in VkQueryPoolCreateInfo::flags, + /// specifying options for query pools, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkQueryPoolCreateFlagBits { + /// // Provided by VK_KHR_maintenance9 + /// VK_QUERY_POOL_CREATE_RESET_BIT_KHR = 0x00000001, + /// } VkQueryPoolCreateFlagBits; + /// + /// + [Flags] + public enum VkQueryPoolCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// ResetBitKHR + /// + ResetBitKHR = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryPoolSamplingModeINTEL.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryPoolSamplingModeINTEL.gen.cs new file mode 100644 index 0000000..bbfe519 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryPoolSamplingModeINTEL.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolSamplingModeINTEL - Enum specifying how performance queries should be captured + /// + /// + /// + /// Possible values of + /// VkQueryPoolPerformanceQueryCreateInfoINTEL::performanceCountersSampling + /// are: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef enum VkQueryPoolSamplingModeINTEL { + /// VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0, + /// } VkQueryPoolSamplingModeINTEL; + /// + /// + public enum VkQueryPoolSamplingModeINTEL : int + { + /// + /// ManualINTEL is the default mode in which the application calls vkCmdBeginQuery and vkCmdEndQuery to record performance data. + /// + ManualINTEL = 0, + + /// + /// MaxEnumINTEL + /// + MaxEnumINTEL = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryResultFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryResultFlags.gen.cs new file mode 100644 index 0000000..3f5adfc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryResultFlags.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryResultFlagBits - Bitmask specifying how and when query results are returned + /// + /// + /// + /// Bits which can be set in vkGetQueryPoolResults::flags and + /// vkCmdCopyQueryPoolResults::flags, specifying how and when + /// results are returned, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkQueryResultFlagBits { + /// VK_QUERY_RESULT_64_BIT = 0x00000001, + /// VK_QUERY_RESULT_WAIT_BIT = 0x00000002, + /// VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, + /// VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, + /// // Provided by VK_KHR_video_queue + /// VK_QUERY_RESULT_WITH_STATUS_BIT_KHR = 0x00000010, + /// } VkQueryResultFlagBits; + /// + /// + [Flags] + public enum VkQueryResultFlags : int + { + /// No flags set. + None = 0, + + /// + /// _64Bit specifies the results will be written as an array of 64-bit unsigned integer values. If this bit is not set, the results will be written as an array of 32-bit unsigned integer values. + /// + _64Bit = 0x00000001, + + /// + /// WaitBit specifies that Vulkan will wait for each query's status to become available before retrieving its results. + /// + WaitBit = 0x00000002, + + /// + /// WithAvailabilityBit specifies that the availability status accompanies the results. + /// + WithAvailabilityBit = 0x00000004, + + /// + /// PartialBit specifies that returning partial results is acceptable. + /// + PartialBit = 0x00000008, + + /// + /// WithStatusBitKHR + /// + WithStatusBitKHR = 0x00000010, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryResultStatusKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryResultStatusKHR.gen.cs new file mode 100644 index 0000000..b487516 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryResultStatusKHR.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryResultStatusKHR - Specific status codes for operations + /// + /// + /// + /// [[query-result-status-codes]] + /// Specific status codes that can be returned from a query are: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkQueryResultStatusKHR { + /// VK_QUERY_RESULT_STATUS_ERROR_KHR = -1, + /// VK_QUERY_RESULT_STATUS_NOT_READY_KHR = 0, + /// VK_QUERY_RESULT_STATUS_COMPLETE_KHR = 1, + /// // Provided by VK_KHR_video_encode_queue + /// VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR = -1000299000, + /// } VkQueryResultStatusKHR; + /// + /// + public enum VkQueryResultStatusKHR : int + { + /// + /// ErrorKHR specifies that operations did not complete successfully. + /// + ErrorKHR = -1, + + /// + /// NotReadyKHR specifies that the query result is not yet available. + /// + NotReadyKHR = 0, + + /// + /// CompleteKHR specifies that operations completed successfully and the query result is available. + /// + CompleteKHR = 1, + + /// + /// InsufficientBitstreamBufferRangeKHR + /// + InsufficientBitstreamBufferRangeKHR = -1000299000, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueryType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueryType.gen.cs new file mode 100644 index 0000000..12509dd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueryType.gen.cs @@ -0,0 +1,147 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryType - Specify the type of queries managed by a query pool + /// + /// + /// + /// Possible values of VkQueryPoolCreateInfo::queryType, specifying + /// the type of queries managed by the pool, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkQueryType { + /// VK_QUERY_TYPE_OCCLUSION = 0, + /// VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, + /// VK_QUERY_TYPE_TIMESTAMP = 2, + /// // Provided by VK_KHR_video_queue + /// VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR = 1000023000, + /// // Provided by VK_EXT_transform_feedback + /// VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004, + /// // Provided by VK_KHR_performance_query + /// VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR = 1000116000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001, + /// // Provided by VK_NV_ray_tracing + /// VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000, + /// // Provided by VK_QCOM_elapsed_timer_query + /// VK_QUERY_TYPE_TIME_ELAPSED_QCOM = 1000173000, + /// // Provided by VK_INTEL_performance_query + /// VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000, + /// // Provided by VK_EXT_mesh_shader + /// VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000, + /// // Provided by VK_EXT_primitives_generated_query + /// VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT = 1000382000, + /// // Provided by VK_KHR_ray_tracing_maintenance1 + /// VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000, + /// // Provided by VK_KHR_ray_tracing_maintenance1 + /// VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001, + /// // Provided by VK_EXT_opacity_micromap + /// VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000, + /// // Provided by VK_EXT_opacity_micromap + /// VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT = 1000396001, + /// } VkQueryType; + /// + /// + public enum VkQueryType : int + { + /// + /// Occlusion specifies an occlusion query^. + /// + Occlusion = 0, + + /// + /// PipelineStatistics specifies a pipeline statistics query^. + /// + PipelineStatistics = 1, + + /// + /// Timestamp specifies a timestamp query^. + /// + Timestamp = 2, + + /// + /// ResultStatusOnlyKHR + /// + ResultStatusOnlyKHR = 1000023000, + + /// + /// TransformFeedbackStreamEXT + /// + TransformFeedbackStreamEXT = 1000028004, + + /// + /// PerformanceQueryKHR + /// + PerformanceQueryKHR = 1000116000, + + /// + /// AccelerationStructureCompactedSizeKHR + /// + AccelerationStructureCompactedSizeKHR = 1000150000, + + /// + /// AccelerationStructureSerializationSizeKHR + /// + AccelerationStructureSerializationSizeKHR = 1000150001, + + /// + /// AccelerationStructureCompactedSizeNV + /// + AccelerationStructureCompactedSizeNV = 1000165000, + + /// + /// TimeElapsedQCOM + /// + TimeElapsedQCOM = 1000173000, + + /// + /// PerformanceQueryINTEL + /// + PerformanceQueryINTEL = 1000210000, + + /// + /// VideoEncodeFeedbackKHR + /// + VideoEncodeFeedbackKHR = 1000299000, + + /// + /// MeshPrimitivesGeneratedEXT + /// + MeshPrimitivesGeneratedEXT = 1000328000, + + /// + /// PrimitivesGeneratedEXT + /// + PrimitivesGeneratedEXT = 1000382000, + + /// + /// AccelerationStructureSerializationBottomLevelPointersKHR + /// + AccelerationStructureSerializationBottomLevelPointersKHR = 1000386000, + + /// + /// AccelerationStructureSizeKHR + /// + AccelerationStructureSizeKHR = 1000386001, + + /// + /// MicromapSerializationSizeEXT + /// + MicromapSerializationSizeEXT = 1000396000, + + /// + /// MicromapCompactedSizeEXT + /// + MicromapCompactedSizeEXT = 1000396001, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueueFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueueFlags.gen.cs new file mode 100644 index 0000000..a1f83f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueueFlags.gen.cs @@ -0,0 +1,87 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFlagBits - Bitmask specifying capabilities of queues in a queue family + /// + /// + /// + /// Bits which may: be set in VkQueueFamilyProperties::queueFlags, + /// indicating capabilities of queues in a queue family are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkQueueFlagBits { + /// VK_QUEUE_GRAPHICS_BIT = 0x00000001, + /// VK_QUEUE_COMPUTE_BIT = 0x00000002, + /// VK_QUEUE_TRANSFER_BIT = 0x00000004, + /// VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, + /// // Provided by VK_VERSION_1_1 + /// VK_QUEUE_PROTECTED_BIT = 0x00000010, + /// // Provided by VK_KHR_video_decode_queue + /// VK_QUEUE_VIDEO_DECODE_BIT_KHR = 0x00000020, + /// // Provided by VK_KHR_video_encode_queue + /// VK_QUEUE_VIDEO_ENCODE_BIT_KHR = 0x00000040, + /// // Provided by VK_NV_optical_flow + /// VK_QUEUE_OPTICAL_FLOW_BIT_NV = 0x00000100, + /// // Provided by VK_ARM_data_graph + /// VK_QUEUE_DATA_GRAPH_BIT_ARM = 0x00000400, + /// } VkQueueFlagBits; + /// + /// + [Flags] + public enum VkQueueFlags : int + { + /// No flags set. + None = 0, + + /// + /// GraphicsBit specifies that queues in this queue family support graphics operations. + /// + GraphicsBit = 0x00000001, + + /// + /// ComputeBit specifies that queues in this queue family support compute operations. + /// + ComputeBit = 0x00000002, + + /// + /// TransferBit specifies that queues in this queue family support transfer operations. + /// + TransferBit = 0x00000004, + + /// + /// SparseBindingBit specifies that queues in this queue family support sparse memory management operations (see Sparse Resources^). If any of the sparse resource features are supported, then at least one queue family must support this bit. At least one queue family of at least one physical device exposed by the implementation must support at least one of the following sets of operations: + /// + SparseBindingBit = 0x00000008, + + /// + /// ProtectedBit + /// + ProtectedBit = 0x00000010, + + /// + /// VideoDecodeBitKHR + /// + VideoDecodeBitKHR = 0x00000020, + + /// + /// VideoEncodeBitKHR + /// + VideoEncodeBitKHR = 0x00000040, + + /// + /// OpticalFlowBitNV + /// + OpticalFlowBitNV = 0x00000100, + + /// + /// DataGraphBitARM + /// + DataGraphBitARM = 0x00000400, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkQueueGlobalPriority.gen.cs b/Brutal.Vulkan/Generated/Enums/VkQueueGlobalPriority.gen.cs new file mode 100644 index 0000000..6a9271d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkQueueGlobalPriority.gen.cs @@ -0,0 +1,105 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueGlobalPriority - Values specifying a system-wide queue priority + /// + /// + /// + /// Possible values of + /// VkDeviceQueueGlobalPriorityCreateInfo::globalPriority, + /// specifying a system-wide priority level are: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef enum VkQueueGlobalPriority { + /// VK_QUEUE_GLOBAL_PRIORITY_LOW = 128, + /// VK_QUEUE_GLOBAL_PRIORITY_MEDIUM = 256, + /// VK_QUEUE_GLOBAL_PRIORITY_HIGH = 512, + /// VK_QUEUE_GLOBAL_PRIORITY_REALTIME = 1024, + /// // Provided by VK_EXT_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW, + /// // Provided by VK_EXT_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, + /// // Provided by VK_EXT_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = VK_QUEUE_GLOBAL_PRIORITY_HIGH, + /// // Provided by VK_EXT_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, + /// // Provided by VK_KHR_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = VK_QUEUE_GLOBAL_PRIORITY_LOW, + /// // Provided by VK_KHR_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, + /// // Provided by VK_KHR_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = VK_QUEUE_GLOBAL_PRIORITY_HIGH, + /// // Provided by VK_KHR_global_priority + /// VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, + /// } VkQueueGlobalPriority; + /// + /// + public enum VkQueueGlobalPriority : int + { + /// + /// Low is below the system default. Useful for non-interactive tasks. + /// + Low = 128, + + /// + /// Medium is the system default priority. + /// + Medium = 256, + + /// + /// High is above the system default. + /// + High = 512, + + /// + /// Realtime is the highest priority. Useful for critical tasks. + /// + Realtime = 1024, + + /// + /// LowEXT + /// + LowEXT = Low, + + /// + /// MediumEXT + /// + MediumEXT = Medium, + + /// + /// HighEXT + /// + HighEXT = High, + + /// + /// RealtimeEXT + /// + RealtimeEXT = Realtime, + + /// + /// LowKHR + /// + LowKHR = Low, + + /// + /// MediumKHR + /// + MediumKHR = Medium, + + /// + /// HighKHR + /// + HighKHR = High, + + /// + /// RealtimeKHR + /// + RealtimeKHR = Realtime, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRasterizationOrderAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRasterizationOrderAMD.gen.cs new file mode 100644 index 0000000..241ea31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRasterizationOrderAMD.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRasterizationOrderAMD - Specify rasterization order for a graphics pipeline + /// + /// + /// + /// Possible values of + /// VkPipelineRasterizationStateRasterizationOrderAMD::rasterizationOrder, + /// specifying the primitive rasterization order, are: + /// + /// + /// // Provided by VK_AMD_rasterization_order + /// typedef enum VkRasterizationOrderAMD { + /// VK_RASTERIZATION_ORDER_STRICT_AMD = 0, + /// VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, + /// } VkRasterizationOrderAMD; + /// + /// + public enum VkRasterizationOrderAMD : int + { + /// + /// StrictAMD specifies that operations for each primitive in a subpass must occur in primitive order^. + /// + StrictAMD = 0, + + /// + /// RelaxedAMD specifies that operations for each primitive in a subpass may: not occur in primitive order^. + /// + RelaxedAMD = 1, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRayTracingInvocationReorderModeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRayTracingInvocationReorderModeEXT.gen.cs new file mode 100644 index 0000000..1233b44 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRayTracingInvocationReorderModeEXT.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingInvocationReorderModeEXT - Enum providing a hint on how the application may: reorder + /// + /// + /// + /// Values which may: be returned in the + /// rayTracingInvocationReorderReorderingHint field of + /// are: + /// + /// + /// // Provided by VK_EXT_ray_tracing_invocation_reorder + /// typedef enum VkRayTracingInvocationReorderModeEXT { + /// VK_RAY_TRACING_INVOCATION_REORDER_MODE_NONE_EXT = 0, + /// VK_RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_EXT = 1, + /// // Provided by VK_NV_ray_tracing_invocation_reorder + /// VK_RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV = VK_RAY_TRACING_INVOCATION_REORDER_MODE_NONE_EXT, + /// // Provided by VK_NV_ray_tracing_invocation_reorder + /// VK_RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV = VK_RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_EXT, + /// } VkRayTracingInvocationReorderModeEXT; + /// + /// + public enum VkRayTracingInvocationReorderModeEXT : int + { + /// + /// NoneEXT specifies that the implementation does not reorder at reorder calls. + /// + NoneEXT = 0, + + /// + /// ReorderEXT specifies that the implementation may: reorder at reorder calls. + /// + ReorderEXT = 1, + + /// + /// NoneNV + /// + NoneNV = NoneEXT, + + /// + /// ReorderNV + /// + ReorderNV = ReorderEXT, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRayTracingLssIndexingModeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRayTracingLssIndexingModeNV.gen.cs new file mode 100644 index 0000000..e2e128b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRayTracingLssIndexingModeNV.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingLssIndexingModeNV - LSS indexing mode + /// + /// + /// + /// Chaining LSS primitives can be achieved by specifying an index buffer in + /// VkAccelerationStructureGeometryLinearSweptSpheresDataNV::indexData + /// and setting + /// VkAccelerationStructureGeometryLinearSweptSpheresDataNV::indexingMode + /// to one of VkRayTracingLssIndexingModeNV values: + /// + /// + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// typedef enum VkRayTracingLssIndexingModeNV { + /// VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV = 0, + /// VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV = 1, + /// } VkRayTracingLssIndexingModeNV; + /// + /// + public enum VkRayTracingLssIndexingModeNV : int + { + /// + /// ListNV specifies that a list of indices is provided where each consecutive pair of indices define a LSS primitive. + /// + ListNV = 0, + + /// + /// SuccessiveNV specifies a successive implicit indexing format, in which each LSS primitive is defined by two successive positions and radii, (k, k + 1), where k is a single index provided in the index buffer. In this indexing scheme, there is a 1:1 mapping between the index buffer and primitive index within the geometry. + /// + SuccessiveNV = 1, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRayTracingLssPrimitiveEndCapsModeNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRayTracingLssPrimitiveEndCapsModeNV.gen.cs new file mode 100644 index 0000000..87dc1ca --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRayTracingLssPrimitiveEndCapsModeNV.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingLssPrimitiveEndCapsModeNV - LSS endcaps mode + /// + /// + /// + /// The default behavior with endcaps in a LSS chain is that both endcaps will + /// be enabled for all beginning and end points. + /// To change the LSS chain's endcaps mode use + /// VkAccelerationStructureGeometryLinearSweptSpheresDataNV::endCapsMode. + /// The possible values for endCapsMode are: + /// + /// + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// typedef enum VkRayTracingLssPrimitiveEndCapsModeNV { + /// VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_NONE_NV = 0, + /// VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_CHAINED_NV = 1, + /// } VkRayTracingLssPrimitiveEndCapsModeNV; + /// + /// + public enum VkRayTracingLssPrimitiveEndCapsModeNV : int + { + /// + /// NoneNV disables all endcaps and the chain boundaries have no influence. + /// + NoneNV = 0, + + /// + /// ChainedNV specifies that when VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV is used as indexing mode for the LSS primitive, the first primitive in each chain will have both endcaps enabled, and every following primitive in the chain only has endcaps at the trailing position enabled. + /// + ChainedNV = 1, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRayTracingShaderGroupTypeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRayTracingShaderGroupTypeKHR.gen.cs new file mode 100644 index 0000000..6a3e9e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRayTracingShaderGroupTypeKHR.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingShaderGroupTypeKHR - Shader group types + /// + /// + /// + /// :refpage: VkRayTracingShaderGroupTypeKHR + /// + /// + /// The VkRayTracingShaderGroupTypeKHR enumeration is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef enum VkRayTracingShaderGroupTypeKHR { + /// VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0, + /// VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1, + /// VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2, + /// // Provided by VK_NV_ray_tracing + /// VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, + /// } VkRayTracingShaderGroupTypeKHR; + /// + /// + public enum VkRayTracingShaderGroupTypeKHR : int + { + /// + /// GeneralKHR specifies that a shader group with a single VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_KHR, or VK_SHADER_STAGE_CALLABLE_BIT_KHR shader in it. + /// + GeneralKHR = 0, + + /// + /// TrianglesHitGroupKHR specifies that a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit shaders. + /// + TrianglesHitGroupKHR = 1, + + /// + /// ProceduralHitGroupKHR specifies that a shader group that only intersects with custom geometry and must contain an intersection shader and may: contain closest hit and any-hit shaders. [NOTE] + /// + ProceduralHitGroupKHR = 2, + + /// + /// GeneralNV + /// + GeneralNV = GeneralKHR, + + /// + /// TrianglesHitGroupNV + /// + TrianglesHitGroupNV = TrianglesHitGroupKHR, + + /// + /// ProceduralHitGroupNV + /// + ProceduralHitGroupNV = ProceduralHitGroupKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRenderPassCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRenderPassCreateFlags.gen.cs new file mode 100644 index 0000000..00ff31d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRenderPassCreateFlags.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassCreateFlagBits - Bitmask specifying additional properties of a render pass + /// + /// + /// + /// Bits which can be set in VkRenderPassCreateInfo::flags, + /// describing additional properties of the render pass, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkRenderPassCreateFlagBits { + /// // Provided by VK_QCOM_render_pass_transform + /// VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM = 0x00000002, + /// // Provided by VK_VALVE_fragment_density_map_layered + /// VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x00000004, + /// } VkRenderPassCreateFlagBits; + /// + /// + [Flags] + public enum VkRenderPassCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// TransformBitQCOM + /// + TransformBitQCOM = 0x00000002, + + /// + /// PerLayerFragmentDensityBitVALVE + /// + PerLayerFragmentDensityBitVALVE = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRenderingAttachmentFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRenderingAttachmentFlagsKHR.gen.cs new file mode 100644 index 0000000..0f75665 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRenderingAttachmentFlagsKHR.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingAttachmentFlagBitsKHR - Bitmask specifying additional properties of a rendering attachment + /// + /// + /// + /// Bits which can be set in + /// VkRenderingAttachmentFlagsInfoKHR::flags, describing additional + /// properties of a rendering attachment, are: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef enum VkRenderingAttachmentFlagBitsKHR { + /// // Provided by VK_KHR_maintenance10 with (VK_VERSION_1_4 or VK_KHR_dynamic_rendering_local_read) and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering) + /// VK_RENDERING_ATTACHMENT_INPUT_ATTACHMENT_FEEDBACK_BIT_KHR = 0x00000001, + /// // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_RENDERING_ATTACHMENT_RESOLVE_SKIP_TRANSFER_FUNCTION_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_RENDERING_ATTACHMENT_RESOLVE_ENABLE_TRANSFER_FUNCTION_BIT_KHR = 0x00000004, + /// } VkRenderingAttachmentFlagBitsKHR; + /// + /// + [Flags] + public enum VkRenderingAttachmentFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// InputAttachmentFeedbackBitKHR specifies that the attachment can be used concurrently as both an input attachment and a write-only attachment during the render pass, creating a feedback loop while processing a fragment, and without a VK_DEPENDENCY_BY_REGION_BIT barrier separating the write attachment and input attachment usage. Using this flag does not remove the general requirement to use a VK_DEPENDENCY_BY_REGION_BIT barrier to resolve hazards when two different fragments accesses a particular attachment region, where one of them performs an attachment write, and a subsequent fragment performs an input attachment read. If VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR is specified in the rendering info, this flag must be set for an attachment to be used concurrently as an input attachment and a write attachment in this manner. If VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR is not specified in the rendering info, this flag is implied to be set for any attachment which has a combination of image layouts and image view usage flags which support input attachment usage. + /// + InputAttachmentFeedbackBitKHR = 0x00000001, + + /// + /// ResolveSkipTransferFunctionBitKHR specifies that resolve operations happening to an sRGB encoded attachment must not convert samples from nonlinear to linear before averaging. + /// + ResolveSkipTransferFunctionBitKHR = 0x00000002, + + /// + /// ResolveEnableTransferFunctionBitKHR specifies that resolve operations happening to an sRGB encoded attachment must convert samples from nonlinear to linear before averaging. [NOTE] + /// + ResolveEnableTransferFunctionBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkRenderingFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkRenderingFlags.gen.cs new file mode 100644 index 0000000..af61d03 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkRenderingFlags.gen.cs @@ -0,0 +1,116 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingFlagBits - Bitmask specifying additional properties of a dynamic render pass instance + /// + /// + /// + /// Bits which can be set in VkRenderingInfo::flags describing + /// additional properties of the render pass are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef enum VkRenderingFlagBits { + /// VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT = 0x00000001, + /// VK_RENDERING_SUSPENDING_BIT = 0x00000002, + /// VK_RENDERING_RESUMING_BIT = 0x00000004, + /// // Provided by VK_EXT_legacy_dithering with (VK_KHR_dynamic_rendering or VK_VERSION_1_3) and (VK_VERSION_1_4 or VK_KHR_extended_flags or VK_KHR_maintenance5) + /// VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000008, + /// // Provided by VK_KHR_maintenance7 + /// VK_RENDERING_CONTENTS_INLINE_BIT_KHR = 0x00000010, + /// // Provided by VK_VALVE_fragment_density_map_layered + /// VK_RENDERING_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE = 0x00000020, + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// VK_RENDERING_FRAGMENT_REGION_BIT_EXT = 0x00000040, + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// VK_RENDERING_CUSTOM_RESOLVE_BIT_EXT = 0x00000080, + /// // Provided by VK_KHR_maintenance10 with (VK_VERSION_1_4 or VK_KHR_dynamic_rendering_local_read) and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering) + /// VK_RENDERING_LOCAL_READ_CONCURRENT_ACCESS_CONTROL_BIT_KHR = 0x00000100, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_RENDERING_SUSPENDING_BIT_KHR = VK_RENDERING_SUSPENDING_BIT, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_RENDERING_RESUMING_BIT_KHR = VK_RENDERING_RESUMING_BIT, + /// // Provided by VK_EXT_nested_command_buffer + /// VK_RENDERING_CONTENTS_INLINE_BIT_EXT = VK_RENDERING_CONTENTS_INLINE_BIT_KHR, + /// } VkRenderingFlagBits; + /// + /// + [Flags] + public enum VkRenderingFlags : int + { + /// No flags set. + None = 0, + + /// + /// ContentsSecondaryCommandBuffersBit specifies that contents for the render pass instance will be recorded in secondary command buffers, and vkCmdExecuteCommands is the only valid command in the command buffer until vkCmdEndRendering. + /// + ContentsSecondaryCommandBuffersBit = 0x00000001, + + /// + /// SuspendingBit specifies that the render pass instance will be suspended. [[renderpass-suspension]] The contents of pRenderingInfo must match between suspended render pass instances and the render pass instances that resume them, other than the presence or absence of the VK_RENDERING_RESUMING_BIT, VK_RENDERING_SUSPENDING_BIT, and VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT flags. No action or synchronization commands, or other render pass instances, are allowed between suspending and resuming render pass instances. + /// + SuspendingBit = 0x00000002, + + /// + /// ResumingBit specifies that the render pass instance is resuming an earlier suspended render pass instance. + /// + ResumingBit = 0x00000004, + + /// + /// EnableLegacyDitheringBitEXT + /// + EnableLegacyDitheringBitEXT = 0x00000008, + + /// + /// ContentsInlineBitKHR + /// + ContentsInlineBitKHR = 0x00000010, + + /// + /// PerLayerFragmentDensityBitVALVE + /// + PerLayerFragmentDensityBitVALVE = 0x00000020, + + /// + /// FragmentRegionBitEXT + /// + FragmentRegionBitEXT = 0x00000040, + + /// + /// CustomResolveBitEXT + /// + CustomResolveBitEXT = 0x00000080, + + /// + /// LocalReadConcurrentAccessControlBitKHR + /// + LocalReadConcurrentAccessControlBitKHR = 0x00000100, + + /// + /// ContentsSecondaryCommandBuffersBitKHR + /// + ContentsSecondaryCommandBuffersBitKHR = ContentsSecondaryCommandBuffersBit, + + /// + /// SuspendingBitKHR + /// + SuspendingBitKHR = SuspendingBit, + + /// + /// ResumingBitKHR + /// + ResumingBitKHR = ResumingBit, + + /// + /// ContentsInlineBitEXT + /// + ContentsInlineBitEXT = ContentsInlineBitKHR, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkResolveImageFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkResolveImageFlagsKHR.gen.cs new file mode 100644 index 0000000..0c7291d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkResolveImageFlagsKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResolveImageFlagBitsKHR - Bitmask specifying additional properties of a resolve image operation + /// + /// + /// + /// Bits which can be set in VkResolveImageModeInfoKHR::flags, + /// describing additional properties of a resolve operation, are: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef enum VkResolveImageFlagBitsKHR { + /// // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_copy_commands2 + /// VK_RESOLVE_IMAGE_SKIP_TRANSFER_FUNCTION_BIT_KHR = 0x00000001, + /// // Provided by VK_KHR_maintenance10 with VK_VERSION_1_3 or VK_KHR_copy_commands2 + /// VK_RESOLVE_IMAGE_ENABLE_TRANSFER_FUNCTION_BIT_KHR = 0x00000002, + /// } VkResolveImageFlagBitsKHR; + /// + /// + [Flags] + public enum VkResolveImageFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// SkipTransferFunctionBitKHR specifies that resolve operations happening to an sRGB encoded image must not convert samples from nonlinear to linear before averaging. + /// + SkipTransferFunctionBitKHR = 0x00000001, + + /// + /// EnableTransferFunctionBitKHR specifies that resolve operations happening to an sRGB encoded image must convert samples from nonlinear to linear before averaging. + /// + EnableTransferFunctionBitKHR = 0x00000002, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkResolveModeFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkResolveModeFlags.gen.cs new file mode 100644 index 0000000..738bce9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkResolveModeFlags.gen.cs @@ -0,0 +1,112 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResolveModeFlagBits - Bitmask indicating supported depth and stencil resolve modes + /// + /// + /// + /// Multisample values in a multisample attachment are combined according to the + /// resolve mode used: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkResolveModeFlagBits { + /// VK_RESOLVE_MODE_NONE = 0, + /// VK_RESOLVE_MODE_SAMPLE_ZERO_BIT = 0x00000001, + /// VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002, + /// VK_RESOLVE_MODE_MIN_BIT = 0x00000004, + /// VK_RESOLVE_MODE_MAX_BIT = 0x00000008, + /// // Provided by VK_ANDROID_external_format_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID = 0x00000010, + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// VK_RESOLVE_MODE_CUSTOM_BIT_EXT = 0x00000020, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_RESOLVE_MODE_NONE_KHR = VK_RESOLVE_MODE_NONE, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_RESOLVE_MODE_AVERAGE_BIT_KHR = VK_RESOLVE_MODE_AVERAGE_BIT, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_RESOLVE_MODE_MIN_BIT_KHR = VK_RESOLVE_MODE_MIN_BIT, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_RESOLVE_MODE_MAX_BIT_KHR = VK_RESOLVE_MODE_MAX_BIT, + /// // Provided by VK_ANDROID_external_format_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// // VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID is a legacy alias + /// VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_BIT_ANDROID, + /// } VkResolveModeFlagBits; + /// + /// + [Flags] + public enum VkResolveModeFlags : int + { + /// + /// None specifies that no resolve operation is done. + /// + None = 0, + + /// + /// SampleZeroBit specifies that result of the resolve operation is equal to the value of sample 0. + /// + SampleZeroBit = 0x00000001, + + /// + /// AverageBit specifies that result of the resolve operation is the average of the sample values. + /// + AverageBit = 0x00000002, + + /// + /// MinBit specifies that result of the resolve operation is the minimum of the sample values. + /// + MinBit = 0x00000004, + + /// + /// MaxBit specifies that result of the resolve operation is the maximum of the sample values. If no resolve mode is otherwise specified, VK_RESOLVE_MODE_AVERAGE_BIT is used. If VK_RESOLVE_MODE_AVERAGE_BIT is used, and the source format is a floating-point or normalized type, the sample values for each pixel are resolved with implementation-defined numerical precision. If the numeric format^ of the resolve attachment uses sRGB encoding, the implementation should convert samples from nonlinear to linear before averaging samples as described in the "`sRGB EOTF`" section of the Khronos Data Format Specification^. In this case, the implementation must convert the linear averaged value to nonlinear before writing the resolved result to resolve attachment. + /// + MaxBit = 0x00000008, + + /// + /// ExternalFormatDownsampleBitANDROID + /// + ExternalFormatDownsampleBitANDROID = 0x00000010, + + /// + /// CustomBitEXT + /// + CustomBitEXT = 0x00000020, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// SampleZeroBitKHR + /// + SampleZeroBitKHR = SampleZeroBit, + + /// + /// AverageBitKHR + /// + AverageBitKHR = AverageBit, + + /// + /// MinBitKHR + /// + MinBitKHR = MinBit, + + /// + /// MaxBitKHR + /// + MaxBitKHR = MaxBit, + + /// + /// ExternalFormatDownsampleANDROID + /// + ExternalFormatDownsampleANDROID = ExternalFormatDownsampleBitANDROID, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkResult.gen.cs b/Brutal.Vulkan/Generated/Enums/VkResult.gen.cs new file mode 100644 index 0000000..42a5c58 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkResult.gen.cs @@ -0,0 +1,447 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResult - Vulkan command return codes + /// + /// + /// + /// While the core Vulkan API is not designed to capture incorrect usage, some + /// circumstances still require return codes. + /// Commands in Vulkan return their status via return codes that are in one of + /// two categories: + /// + /// + /// * Successful completion codes are returned when a command needs to + /// communicate success or status information. + /// All successful completion codes are non-negative values. + /// * Runtime error codes are returned when a command needs to communicate a + /// failure that could only be detected at runtime. + /// All runtime error codes are negative values. + /// + /// + /// All return codes in Vulkan are reported via VkResult return values. + /// The possible codes are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkResult { + /// VK_SUCCESS = 0, + /// VK_NOT_READY = 1, + /// VK_TIMEOUT = 2, + /// VK_EVENT_SET = 3, + /// VK_EVENT_RESET = 4, + /// VK_INCOMPLETE = 5, + /// VK_ERROR_OUT_OF_HOST_MEMORY = -1, + /// VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, + /// VK_ERROR_INITIALIZATION_FAILED = -3, + /// VK_ERROR_DEVICE_LOST = -4, + /// VK_ERROR_MEMORY_MAP_FAILED = -5, + /// VK_ERROR_LAYER_NOT_PRESENT = -6, + /// VK_ERROR_EXTENSION_NOT_PRESENT = -7, + /// VK_ERROR_FEATURE_NOT_PRESENT = -8, + /// VK_ERROR_INCOMPATIBLE_DRIVER = -9, + /// VK_ERROR_TOO_MANY_OBJECTS = -10, + /// VK_ERROR_FORMAT_NOT_SUPPORTED = -11, + /// VK_ERROR_FRAGMENTED_POOL = -12, + /// VK_ERROR_UNKNOWN = -13, + /// // Provided by VK_VERSION_1_0 + /// VK_ERROR_VALIDATION_FAILED = -1000011001, + /// // Provided by VK_VERSION_1_1 + /// VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000, + /// // Provided by VK_VERSION_1_1 + /// VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003, + /// // Provided by VK_VERSION_1_2 + /// VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = -1000257000, + /// // Provided by VK_VERSION_1_2 + /// VK_ERROR_FRAGMENTATION = -1000161000, + /// // Provided by VK_VERSION_1_3 + /// VK_PIPELINE_COMPILE_REQUIRED = 1000297000, + /// // Provided by VK_VERSION_1_4 + /// VK_ERROR_NOT_PERMITTED = -1000174001, + /// // Provided by VK_KHR_surface + /// VK_ERROR_SURFACE_LOST_KHR = -1000000000, + /// // Provided by VK_KHR_surface + /// VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, + /// // Provided by VK_KHR_swapchain + /// VK_SUBOPTIMAL_KHR = 1000001003, + /// // Provided by VK_KHR_swapchain + /// VK_ERROR_OUT_OF_DATE_KHR = -1000001004, + /// // Provided by VK_KHR_display_swapchain + /// VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, + /// // Provided by VK_NV_glsl_shader + /// VK_ERROR_INVALID_SHADER_NV = -1000012000, + /// // Provided by VK_KHR_video_queue + /// VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = -1000023000, + /// // Provided by VK_KHR_video_queue + /// VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = -1000023001, + /// // Provided by VK_KHR_video_queue + /// VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = -1000023002, + /// // Provided by VK_KHR_video_queue + /// VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = -1000023003, + /// // Provided by VK_KHR_video_queue + /// VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = -1000023004, + /// // Provided by VK_KHR_video_queue + /// VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = -1000023005, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000, + /// // Provided by VK_EXT_present_timing + /// VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT = -1000208000, + /// // Provided by VK_EXT_full_screen_exclusive + /// VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000, + /// // Provided by VK_KHR_deferred_host_operations + /// VK_THREAD_IDLE_KHR = 1000268000, + /// // Provided by VK_KHR_deferred_host_operations + /// VK_THREAD_DONE_KHR = 1000268001, + /// // Provided by VK_KHR_deferred_host_operations + /// VK_OPERATION_DEFERRED_KHR = 1000268002, + /// // Provided by VK_KHR_deferred_host_operations + /// VK_OPERATION_NOT_DEFERRED_KHR = 1000268003, + /// // Provided by VK_KHR_video_encode_queue + /// VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000, + /// // Provided by VK_EXT_image_compression_control + /// VK_ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000, + /// // Provided by VK_EXT_shader_object + /// VK_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000, + /// // Provided by VK_KHR_pipeline_binary + /// VK_PIPELINE_BINARY_MISSING_KHR = 1000483000, + /// // Provided by VK_KHR_pipeline_binary + /// VK_ERROR_NOT_ENOUGH_SPACE_KHR = -1000483000, + /// // Provided by VK_EXT_debug_report + /// VK_ERROR_VALIDATION_FAILED_EXT = VK_ERROR_VALIDATION_FAILED, + /// // Provided by VK_KHR_maintenance1 + /// VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, + /// // Provided by VK_KHR_external_memory + /// VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION, + /// // Provided by VK_EXT_global_priority + /// VK_ERROR_NOT_PERMITTED_EXT = VK_ERROR_NOT_PERMITTED, + /// // Provided by VK_KHR_global_priority + /// VK_ERROR_NOT_PERMITTED_KHR = VK_ERROR_NOT_PERMITTED, + /// // Provided by VK_EXT_buffer_device_address + /// VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, + /// // Provided by VK_KHR_buffer_device_address + /// VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, + /// // Provided by VK_EXT_pipeline_creation_cache_control + /// VK_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED, + /// // Provided by VK_EXT_pipeline_creation_cache_control + /// VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED, + /// // Provided by VK_EXT_shader_object + /// // VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT is a legacy alias + /// VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT, + /// } VkResult; + /// + /// + public enum VkResult : int + { + /// + /// Success + /// + Success = 0, + + /// + /// NotReady + /// + NotReady = 1, + + /// + /// Timeout + /// + Timeout = 2, + + /// + /// EventSet + /// + EventSet = 3, + + /// + /// EventReset + /// + EventReset = 4, + + /// + /// Incomplete + /// + Incomplete = 5, + + /// + /// ErrorOutOfHostMemory + /// + ErrorOutOfHostMemory = -1, + + /// + /// ErrorOutOfDeviceMemory + /// + ErrorOutOfDeviceMemory = -2, + + /// + /// ErrorInitializationFailed + /// + ErrorInitializationFailed = -3, + + /// + /// ErrorDeviceLost + /// + ErrorDeviceLost = -4, + + /// + /// ErrorMemoryMapFailed + /// + ErrorMemoryMapFailed = -5, + + /// + /// ErrorLayerNotPresent + /// + ErrorLayerNotPresent = -6, + + /// + /// ErrorExtensionNotPresent + /// + ErrorExtensionNotPresent = -7, + + /// + /// ErrorFeatureNotPresent + /// + ErrorFeatureNotPresent = -8, + + /// + /// ErrorIncompatibleDriver + /// + ErrorIncompatibleDriver = -9, + + /// + /// ErrorTooManyObjects + /// + ErrorTooManyObjects = -10, + + /// + /// ErrorFormatNotSupported + /// + ErrorFormatNotSupported = -11, + + /// + /// ErrorFragmentedPool + /// + ErrorFragmentedPool = -12, + + /// + /// ErrorUnknown + /// + ErrorUnknown = -13, + + /// + /// ErrorValidationFailed + /// + ErrorValidationFailed = -1000011001, + + /// + /// ErrorOutOfPoolMemory + /// + ErrorOutOfPoolMemory = -1000069000, + + /// + /// ErrorInvalidExternalHandle + /// + ErrorInvalidExternalHandle = -1000072003, + + /// + /// ErrorInvalidOpaqueCaptureAddress + /// + ErrorInvalidOpaqueCaptureAddress = -1000257000, + + /// + /// ErrorFragmentation + /// + ErrorFragmentation = -1000161000, + + /// + /// PipelineCompileRequired + /// + PipelineCompileRequired = 1000297000, + + /// + /// ErrorNotPermitted + /// + ErrorNotPermitted = -1000174001, + + /// + /// ErrorSurfaceLostKHR + /// + ErrorSurfaceLostKHR = -1000000000, + + /// + /// ErrorNativeWindowInUseKHR + /// + ErrorNativeWindowInUseKHR = -1000000001, + + /// + /// SuboptimalKHR + /// + SuboptimalKHR = 1000001003, + + /// + /// ErrorOutOfDateKHR + /// + ErrorOutOfDateKHR = -1000001004, + + /// + /// ErrorIncompatibleDisplayKHR + /// + ErrorIncompatibleDisplayKHR = -1000003001, + + /// + /// ErrorInvalidShaderNV + /// + ErrorInvalidShaderNV = -1000012000, + + /// + /// ErrorImageUsageNotSupportedKHR + /// + ErrorImageUsageNotSupportedKHR = -1000023000, + + /// + /// ErrorVideoPictureLayoutNotSupportedKHR + /// + ErrorVideoPictureLayoutNotSupportedKHR = -1000023001, + + /// + /// ErrorVideoProfileOperationNotSupportedKHR + /// + ErrorVideoProfileOperationNotSupportedKHR = -1000023002, + + /// + /// ErrorVideoProfileFormatNotSupportedKHR + /// + ErrorVideoProfileFormatNotSupportedKHR = -1000023003, + + /// + /// ErrorVideoProfileCodecNotSupportedKHR + /// + ErrorVideoProfileCodecNotSupportedKHR = -1000023004, + + /// + /// ErrorVideoStdVersionNotSupportedKHR + /// + ErrorVideoStdVersionNotSupportedKHR = -1000023005, + + /// + /// ErrorInvalidDrmFormatModifierPlaneLayoutEXT + /// + ErrorInvalidDrmFormatModifierPlaneLayoutEXT = -1000158000, + + /// + /// ErrorPresentTimingQueueFullEXT + /// + ErrorPresentTimingQueueFullEXT = -1000208000, + + /// + /// ErrorFullScreenExclusiveModeLostEXT + /// + ErrorFullScreenExclusiveModeLostEXT = -1000255000, + + /// + /// ThreadIdleKHR + /// + ThreadIdleKHR = 1000268000, + + /// + /// ThreadDoneKHR + /// + ThreadDoneKHR = 1000268001, + + /// + /// OperationDeferredKHR + /// + OperationDeferredKHR = 1000268002, + + /// + /// OperationNotDeferredKHR + /// + OperationNotDeferredKHR = 1000268003, + + /// + /// ErrorInvalidVideoStdParametersKHR + /// + ErrorInvalidVideoStdParametersKHR = -1000299000, + + /// + /// ErrorCompressionExhaustedEXT + /// + ErrorCompressionExhaustedEXT = -1000338000, + + /// + /// IncompatibleShaderBinaryEXT + /// + IncompatibleShaderBinaryEXT = 1000482000, + + /// + /// PipelineBinaryMissingKHR + /// + PipelineBinaryMissingKHR = 1000483000, + + /// + /// ErrorNotEnoughSpaceKHR + /// + ErrorNotEnoughSpaceKHR = -1000483000, + + /// + /// ErrorValidationFailedEXT + /// + ErrorValidationFailedEXT = ErrorValidationFailed, + + /// + /// ErrorOutOfPoolMemoryKHR + /// + ErrorOutOfPoolMemoryKHR = ErrorOutOfPoolMemory, + + /// + /// ErrorInvalidExternalHandleKHR + /// + ErrorInvalidExternalHandleKHR = ErrorInvalidExternalHandle, + + /// + /// ErrorFragmentationEXT + /// + ErrorFragmentationEXT = ErrorFragmentation, + + /// + /// ErrorNotPermittedEXT + /// + ErrorNotPermittedEXT = ErrorNotPermitted, + + /// + /// ErrorNotPermittedKHR + /// + ErrorNotPermittedKHR = ErrorNotPermitted, + + /// + /// ErrorInvalidDeviceAddressEXT + /// + ErrorInvalidDeviceAddressEXT = ErrorInvalidOpaqueCaptureAddress, + + /// + /// ErrorInvalidOpaqueCaptureAddressKHR + /// + ErrorInvalidOpaqueCaptureAddressKHR = ErrorInvalidOpaqueCaptureAddress, + + /// + /// PipelineCompileRequiredEXT + /// + PipelineCompileRequiredEXT = PipelineCompileRequired, + + /// + /// ErrorPipelineCompileRequiredEXT + /// + ErrorPipelineCompileRequiredEXT = PipelineCompileRequired, + + /// + /// ErrorIncompatibleShaderBinaryEXT + /// + ErrorIncompatibleShaderBinaryEXT = IncompatibleShaderBinaryEXT, + + /// + /// ResultMaxEnum + /// + ResultMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSampleCountFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSampleCountFlags.gen.cs new file mode 100644 index 0000000..84d1cbf --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSampleCountFlags.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSampleCountFlagBits - Bitmask specifying sample counts supported for an image used for storage operations + /// + /// + /// + /// Bits which may: be set in the sample count limits returned by + /// VkPhysicalDeviceLimits, as well as in other queries and structures + /// representing image sample counts, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSampleCountFlagBits { + /// VK_SAMPLE_COUNT_1_BIT = 0x00000001, + /// VK_SAMPLE_COUNT_2_BIT = 0x00000002, + /// VK_SAMPLE_COUNT_4_BIT = 0x00000004, + /// VK_SAMPLE_COUNT_8_BIT = 0x00000008, + /// VK_SAMPLE_COUNT_16_BIT = 0x00000010, + /// VK_SAMPLE_COUNT_32_BIT = 0x00000020, + /// VK_SAMPLE_COUNT_64_BIT = 0x00000040, + /// } VkSampleCountFlagBits; + /// + /// + [Flags] + public enum VkSampleCountFlags : int + { + /// No flags set. + None = 0, + + /// + /// _1Bit specifies an image with one sample per pixel. + /// + _1Bit = 0x00000001, + + /// + /// _2Bit specifies an image with 2 samples per pixel. + /// + _2Bit = 0x00000002, + + /// + /// _4Bit specifies an image with 4 samples per pixel. + /// + _4Bit = 0x00000004, + + /// + /// _8Bit specifies an image with 8 samples per pixel. + /// + _8Bit = 0x00000008, + + /// + /// _16Bit specifies an image with 16 samples per pixel. + /// + _16Bit = 0x00000010, + + /// + /// _32Bit specifies an image with 32 samples per pixel. + /// + _32Bit = 0x00000020, + + /// + /// _64Bit specifies an image with 64 samples per pixel. + /// + _64Bit = 0x00000040, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSamplerAddressMode.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSamplerAddressMode.gen.cs new file mode 100644 index 0000000..73fc4ff --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSamplerAddressMode.gen.cs @@ -0,0 +1,63 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerAddressMode - Specify behavior of sampling with texture coordinates outside an image + /// + /// + /// + /// Possible values of the VkSamplerCreateInfo::ptext:addressMode* + /// parameters, corresponding to different wrapping operations^ used during sampling, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSamplerAddressMode { + /// VK_SAMPLER_ADDRESS_MODE_REPEAT = 0, + /// VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, + /// VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, + /// VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, + /// // Provided by VK_VERSION_1_2, VK_KHR_sampler_mirror_clamp_to_edge + /// VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4, + /// // Provided by VK_KHR_sampler_mirror_clamp_to_edge + /// // VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR is a legacy alias + /// VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, + /// } VkSamplerAddressMode; + /// + /// + public enum VkSamplerAddressMode : int + { + /// + /// Repeat specifies that the repeat wrap mode will be used. + /// + Repeat = 0, + + /// + /// MirroredRepeat specifies that the mirrored repeat wrap mode will be used. + /// + MirroredRepeat = 1, + + /// + /// ClampToEdge specifies that the clamp to edge wrap mode will be used. + /// + ClampToEdge = 2, + + /// + /// ClampToBorder specifies that the clamp to border wrap mode will be used. + /// + ClampToBorder = 3, + + /// + /// MirrorClampToEdge + /// + MirrorClampToEdge = 4, + + /// + /// MirrorClampToEdgeKHR + /// + MirrorClampToEdgeKHR = MirrorClampToEdge, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSamplerCreateFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSamplerCreateFlags.gen.cs new file mode 100644 index 0000000..83862ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSamplerCreateFlags.gen.cs @@ -0,0 +1,63 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerCreateFlagBits - Bitmask specifying additional parameters of sampler + /// + /// + /// + /// Bits which can be set in VkSamplerCreateInfo::flags, specifying + /// additional parameters of a sampler, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSamplerCreateFlagBits { + /// // Provided by VK_EXT_fragment_density_map + /// VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = 0x00000001, + /// // Provided by VK_EXT_fragment_density_map + /// VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 0x00000002, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008, + /// // Provided by VK_EXT_non_seamless_cube_map + /// VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT = 0x00000004, + /// // Provided by VK_QCOM_image_processing + /// VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM = 0x00000010, + /// } VkSamplerCreateFlagBits; + /// + /// + [Flags] + public enum VkSamplerCreateFlags : int + { + /// No flags set. + None = 0, + + /// + /// SubsampledBitEXT + /// + SubsampledBitEXT = 0x00000001, + + /// + /// SubsampledCoarseReconstructionBitEXT + /// + SubsampledCoarseReconstructionBitEXT = 0x00000002, + + /// + /// DescriptorBufferCaptureReplayBitEXT + /// + DescriptorBufferCaptureReplayBitEXT = 0x00000008, + + /// + /// NonSeamlessCubeMapBitEXT + /// + NonSeamlessCubeMapBitEXT = 0x00000004, + + /// + /// ImageProcessingBitQCOM + /// + ImageProcessingBitQCOM = 0x00000010, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSamplerMipmapMode.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSamplerMipmapMode.gen.cs new file mode 100644 index 0000000..d7fb065 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSamplerMipmapMode.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerMipmapMode - Specify mipmap mode used for texture lookups + /// + /// + /// + /// Possible values of the VkSamplerCreateInfo::mipmapMode, + /// specifying the mipmap mode used for texture lookups, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSamplerMipmapMode { + /// VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, + /// VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, + /// } VkSamplerMipmapMode; + /// + /// + public enum VkSamplerMipmapMode : int + { + /// + /// Nearest specifies nearest filtering. + /// + Nearest = 0, + + /// + /// Linear specifies linear filtering. These modes are described in detail in Texel Filtering^. + /// + Linear = 1, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSamplerReductionMode.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSamplerReductionMode.gen.cs new file mode 100644 index 0000000..a3dedbd --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSamplerReductionMode.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerReductionMode - Specify reduction mode for texture filtering + /// + /// + /// + /// Reduction modes are specified by VkSamplerReductionMode, which takes + /// values: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkSamplerReductionMode { + /// VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE = 0, + /// VK_SAMPLER_REDUCTION_MODE_MIN = 1, + /// VK_SAMPLER_REDUCTION_MODE_MAX = 2, + /// // Provided by VK_QCOM_filter_cubic_clamp + /// VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM = 1000521000, + /// // Provided by VK_EXT_sampler_filter_minmax + /// VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, + /// // Provided by VK_EXT_sampler_filter_minmax + /// VK_SAMPLER_REDUCTION_MODE_MIN_EXT = VK_SAMPLER_REDUCTION_MODE_MIN, + /// // Provided by VK_EXT_sampler_filter_minmax + /// VK_SAMPLER_REDUCTION_MODE_MAX_EXT = VK_SAMPLER_REDUCTION_MODE_MAX, + /// } VkSamplerReductionMode; + /// + /// + public enum VkSamplerReductionMode : int + { + /// + /// WeightedAverage specifies that texel values are combined by computing a weighted average of values in the footprint, using weights as specified in the image operations chapter^. + /// + WeightedAverage = 0, + + /// + /// Min specifies that texel values are combined by taking the component-wise minimum of values in the footprint with non-zero weights. + /// + Min = 1, + + /// + /// Max specifies that texel values are combined by taking the component-wise maximum of values in the footprint with non-zero weights. + /// + Max = 2, + + /// + /// WeightedAverageRangeclampQCOM + /// + WeightedAverageRangeclampQCOM = 1000521000, + + /// + /// WeightedAverageEXT + /// + WeightedAverageEXT = WeightedAverage, + + /// + /// MinEXT + /// + MinEXT = Min, + + /// + /// MaxEXT + /// + MaxEXT = Max, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrModelConversion.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrModelConversion.gen.cs new file mode 100644 index 0000000..f30d66a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrModelConversion.gen.cs @@ -0,0 +1,90 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrModelConversion - Color model component of a color space + /// + /// + /// + /// VkSamplerYcbcrModelConversion defines the conversion from the source + /// color model to the shader color model. + /// Possible values are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkSamplerYcbcrModelConversion { + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0, + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1, + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2, + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3, + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020, + /// } VkSamplerYcbcrModelConversion; + /// + /// + public enum VkSamplerYCbCrModelConversion : int + { + /// + /// RGBIdentity specifies that the input values to the conversion are unmodified. + /// + RGBIdentity = 0, + + /// + /// YCbCrIdentity specifies no model conversion but the inputs are range expanded as for {YCbCr}. + /// + YCbCrIdentity = 1, + + /// + /// YCbCr709 specifies the color model conversion from {YCbCr} to {RGBprime} defined in BT.709 and described in the "`BT.709 {YCbCr} conversion`" section of the Khronos Data Format Specification^. + /// + YCbCr709 = 2, + + /// + /// YCbCr601 specifies the color model conversion from {YCbCr} to {RGBprime} defined in BT.601 and described in the "`BT.601 {YCbCr} conversion`" section of the Khronos Data Format Specification^. + /// + YCbCr601 = 3, + + /// + /// YCbCr2020 specifies the color model conversion from {YCbCr} to {RGBprime} defined in BT.2020 and described in the "`BT.2020 {YCbCr} conversion`" section of the Khronos Data Format Specification^. In the etext:VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_* color models, for the input to the sampler {YCbCr} range expansion and model conversion: + /// + YCbCr2020 = 4, + + /// + /// RGBIdentityKHR + /// + RGBIdentityKHR = RGBIdentity, + + /// + /// YCbCrIdentityKHR + /// + YCbCrIdentityKHR = YCbCrIdentity, + + /// + /// YCbCr709KHR + /// + YCbCr709KHR = YCbCr709, + + /// + /// YCbCr601KHR + /// + YCbCr601KHR = YCbCr601, + + /// + /// YCbCr2020KHR + /// + YCbCr2020KHR = YCbCr2020, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrRange.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrRange.gen.cs new file mode 100644 index 0000000..e425f31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSamplerYCbCrRange.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrRange - Range of encoded values in a color space + /// + /// + /// + /// The VkSamplerYcbcrRange enum describes whether color components are + /// encoded using the full range of numerical values or whether values are + /// reserved for headroom and foot room. + /// VkSamplerYcbcrRange is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkSamplerYcbcrRange { + /// VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0, + /// VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW, + /// } VkSamplerYcbcrRange; + /// + /// + public enum VkSamplerYCbCrRange : int + { + /// + /// ItuFull specifies that the full range of the encoded values are valid and interpreted according to the ITU "`full range`" quantization rules. + /// + ItuFull = 0, + + /// + /// ItuNarrow specifies that headroom and foot room are reserved in the numerical range of encoded values, and the remaining values are expanded according to the ITU "`narrow range`" quantization rules. The formulae for these conversions is described in the Sampler {YCbCr} Range Expansion^ section of the Image Operations^ chapter. No range modification takes place if ycbcrModel is VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY; the ycbcrRange field of VkSamplerYcbcrConversionCreateInfo is ignored in this case. + /// + ItuNarrow = 1, + + /// + /// ItuFullKHR + /// + ItuFullKHR = ItuFull, + + /// + /// ItuNarrowKHR + /// + ItuNarrowKHR = ItuNarrow, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkScopeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkScopeKHR.gen.cs new file mode 100644 index 0000000..642a793 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkScopeKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkScopeKHR - Specify SPIR-V scope + /// + /// + /// + /// Possible values for VkScopeKHR include: + /// + /// + /// // Provided by VK_KHR_cooperative_matrix + /// typedef enum VkScopeKHR { + /// VK_SCOPE_DEVICE_KHR = 1, + /// VK_SCOPE_WORKGROUP_KHR = 2, + /// VK_SCOPE_SUBGROUP_KHR = 3, + /// VK_SCOPE_QUEUE_FAMILY_KHR = 5, + /// // Provided by VK_NV_cooperative_matrix + /// VK_SCOPE_DEVICE_NV = VK_SCOPE_DEVICE_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_SCOPE_WORKGROUP_NV = VK_SCOPE_WORKGROUP_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_SCOPE_SUBGROUP_NV = VK_SCOPE_SUBGROUP_KHR, + /// // Provided by VK_NV_cooperative_matrix + /// VK_SCOPE_QUEUE_FAMILY_NV = VK_SCOPE_QUEUE_FAMILY_KHR, + /// } VkScopeKHR; + /// + /// + public enum VkScopeKHR : int + { + /// + /// DeviceKHR corresponds to SPIR-V Device scope. + /// + DeviceKHR = 1, + + /// + /// WorkgroupKHR corresponds to SPIR-V Workgroup scope. + /// + WorkgroupKHR = 2, + + /// + /// SubgroupKHR corresponds to SPIR-V Subgroup scope. + /// + SubgroupKHR = 3, + + /// + /// QueueFamilyKHR corresponds to SPIR-V QueueFamily scope. All enum values match the corresponding SPIR-V value. + /// + QueueFamilyKHR = 5, + + /// + /// DeviceNV + /// + DeviceNV = DeviceKHR, + + /// + /// WorkgroupNV + /// + WorkgroupNV = WorkgroupKHR, + + /// + /// SubgroupNV + /// + SubgroupNV = SubgroupKHR, + + /// + /// QueueFamilyNV + /// + QueueFamilyNV = QueueFamilyKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSemaphoreImportFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSemaphoreImportFlags.gen.cs new file mode 100644 index 0000000..41f5832 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSemaphoreImportFlags.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreImportFlagBits - Bitmask specifying additional parameters of semaphore payload import + /// + /// + /// + /// Bits which can be set in + /// + /// + /// * platform-specific semaphore import structures (the current specification + /// build has none enabled) + /// + /// + /// specifying additional parameters of a semaphore import operation are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkSemaphoreImportFlagBits { + /// VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001, + /// // Provided by VK_KHR_external_semaphore + /// VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT, + /// } VkSemaphoreImportFlagBits; + /// + /// + [Flags] + public enum VkSemaphoreImportFlags : int + { + /// No flags set. + None = 0, + + /// + /// TemporaryBit specifies that the semaphore payload will be imported only temporarily, as described in Importing Semaphore Payloads^, regardless of the permanence of handleType. + /// + TemporaryBit = 0x00000001, + + /// + /// TemporaryBitKHR + /// + TemporaryBitKHR = TemporaryBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSemaphoreType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSemaphoreType.gen.cs new file mode 100644 index 0000000..60534bc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSemaphoreType.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreType - Specifies the type of a semaphore object + /// + /// + /// + /// Possible values of VkSemaphoreTypeCreateInfo::semaphoreType, + /// specifying the type of a semaphore, are: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkSemaphoreType { + /// VK_SEMAPHORE_TYPE_BINARY = 0, + /// VK_SEMAPHORE_TYPE_TIMELINE = 1, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_SEMAPHORE_TYPE_BINARY_KHR = VK_SEMAPHORE_TYPE_BINARY, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_SEMAPHORE_TYPE_TIMELINE_KHR = VK_SEMAPHORE_TYPE_TIMELINE, + /// } VkSemaphoreType; + /// + /// + public enum VkSemaphoreType : int + { + /// + /// Binary specifies a binary semaphore type that has a boolean payload indicating whether the semaphore is currently signaled or unsignaled. When created, the semaphore is in the unsignaled state. + /// + Binary = 0, + + /// + /// Timeline specifies a timeline semaphore type that has a strictly increasing 64-bit unsigned integer payload indicating whether the semaphore is signaled with respect to a particular reference value. When created, the semaphore payload has the value given by the initialValue field of VkSemaphoreTypeCreateInfo. + /// + Timeline = 1, + + /// + /// BinaryKHR + /// + BinaryKHR = Binary, + + /// + /// TimelineKHR + /// + TimelineKHR = Timeline, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSemaphoreWaitFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSemaphoreWaitFlags.gen.cs new file mode 100644 index 0000000..1e4d72e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSemaphoreWaitFlags.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreWaitFlagBits - Bitmask specifying additional parameters of a semaphore wait operation + /// + /// + /// + /// Bits which can be set in VkSemaphoreWaitInfo::flags, specifying + /// additional parameters of a semaphore wait operation, are: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkSemaphoreWaitFlagBits { + /// VK_SEMAPHORE_WAIT_ANY_BIT = 0x00000001, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_SEMAPHORE_WAIT_ANY_BIT_KHR = VK_SEMAPHORE_WAIT_ANY_BIT, + /// } VkSemaphoreWaitFlagBits; + /// + /// + [Flags] + public enum VkSemaphoreWaitFlags : int + { + /// No flags set. + None = 0, + + /// + /// AnyBit specifies that the semaphore wait condition is that at least one of the semaphores in VkSemaphoreWaitInfo::pSemaphores has reached the value specified by the corresponding element of VkSemaphoreWaitInfo::pValues. If VK_SEMAPHORE_WAIT_ANY_BIT is not set, the semaphore wait condition is that all of the semaphores in VkSemaphoreWaitInfo::pSemaphores have reached the value specified by the corresponding element of VkSemaphoreWaitInfo::pValues. + /// + AnyBit = 0x00000001, + + /// + /// AnyBitKHR + /// + AnyBitKHR = AnyBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderCodeTypeEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderCodeTypeEXT.gen.cs new file mode 100644 index 0000000..f2e798e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderCodeTypeEXT.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderCodeTypeEXT - Indicate a shader code type + /// + /// + /// + /// Shader objects can be created using different types of shader code. + /// Possible values of VkShaderCreateInfoEXT::codeType, are: + /// + /// + /// // Provided by VK_EXT_shader_object + /// typedef enum VkShaderCodeTypeEXT { + /// VK_SHADER_CODE_TYPE_BINARY_EXT = 0, + /// VK_SHADER_CODE_TYPE_SPIRV_EXT = 1, + /// } VkShaderCodeTypeEXT; + /// + /// + public enum VkShaderCodeTypeEXT : int + { + /// + /// BinaryEXT specifies shader code in an opaque, implementation-defined binary format specific to the physical device. + /// + BinaryEXT = 0, + + /// + /// SpirvEXT specifies shader code in SPIR-V format. + /// + SpirvEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderCorePropertiesFlagsAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderCorePropertiesFlagsAMD.gen.cs new file mode 100644 index 0000000..940e9be --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderCorePropertiesFlagsAMD.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderCorePropertiesFlagBitsAMD - Bitmask specifying shader core properties + /// + /// + /// + /// Bits for this type may: be defined by future extensions, or new versions of + /// the `VK_AMD_shader_core_properties2` extension. + /// Possible values of the flags member of + /// VkShaderCorePropertiesFlagsAMD are: + /// + /// + /// // Provided by VK_AMD_shader_core_properties2 + /// typedef enum VkShaderCorePropertiesFlagBitsAMD { + /// } VkShaderCorePropertiesFlagBitsAMD; + /// + /// + [Flags] + public enum VkShaderCorePropertiesFlagsAMD : int + { + /// No flags set. + None = 0, + + /// + /// FlagBitsMaxEnumAMD + /// + FlagBitsMaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderCreateFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderCreateFlagsEXT.gen.cs new file mode 100644 index 0000000..d71b49a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderCreateFlagsEXT.gen.cs @@ -0,0 +1,118 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderCreateFlagBitsEXT - Bitmask controlling how a shader object is created + /// + /// + /// + /// Possible values of the flags member of VkShaderCreateInfoEXT + /// specifying how a shader object is created, are: + /// + /// + /// // Provided by VK_EXT_shader_object + /// typedef enum VkShaderCreateFlagBitsEXT { + /// VK_SHADER_CREATE_LINK_STAGE_BIT_EXT = 0x00000001, + /// // Provided by VK_EXT_descriptor_heap with VK_EXT_shader_object + /// VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT = 0x00000400, + /// // Provided by VK_KHR_maintenance5 with VK_ARM_shader_instrumentation, VK_EXT_shader_object with VK_ARM_shader_instrumentation + /// VK_SHADER_CREATE_INSTRUMENT_SHADER_BIT_ARM = 0x00000800, + /// // Provided by VK_EXT_shader_object with VK_EXT_subgroup_size_control or VK_VERSION_1_3 + /// VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 0x00000002, + /// // Provided by VK_EXT_shader_object with VK_EXT_subgroup_size_control or VK_VERSION_1_3 + /// VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = 0x00000004, + /// // Provided by VK_EXT_shader_object with VK_EXT_mesh_shader or VK_NV_mesh_shader + /// VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT = 0x00000008, + /// // Provided by VK_EXT_shader_object with VK_KHR_device_group or VK_VERSION_1_1 + /// VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT = 0x00000010, + /// // Provided by VK_KHR_fragment_shading_rate with VK_EXT_shader_object + /// VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = 0x00000020, + /// // Provided by VK_EXT_fragment_density_map with VK_EXT_shader_object + /// VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00000040, + /// // Provided by VK_EXT_device_generated_commands + /// VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT = 0x00000080, + /// // Provided by VK_KHR_opacity_micromap with VK_EXT_shader_object + /// VK_SHADER_CREATE_OPACITY_MICROMAP_DISALLOW_MIXED_SPECIAL_INDEX_BIT_EXT = 0x00001000, + /// // Provided by VK_EXT_shader_64bit_indexing + /// VK_SHADER_CREATE_64_BIT_INDEXING_BIT_EXT = 0x00008000, + /// // Provided by VK_KHR_maintenance11 with VK_EXT_shader_object + /// VK_SHADER_CREATE_INDEPENDENT_SETS_BIT_KHR = 0x00040000, + /// } VkShaderCreateFlagBitsEXT; + /// + /// + [Flags] + public enum VkShaderCreateFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// LinkStageBitEXT specifies that a shader is linked to all other shaders created in the same vkCreateShadersEXT call whose VkShaderCreateInfoEXT structures' flags include VK_SHADER_CREATE_LINK_STAGE_BIT_EXT. + /// + LinkStageBitEXT = 0x00000001, + + /// + /// DescriptorHeapBitEXT + /// + DescriptorHeapBitEXT = 0x00000400, + + /// + /// InstrumentShaderBitARM + /// + InstrumentShaderBitARM = 0x00000800, + + /// + /// AllowVaryingSubgroupSizeBitEXT + /// + AllowVaryingSubgroupSizeBitEXT = 0x00000002, + + /// + /// RequireFullSubgroupsBitEXT + /// + RequireFullSubgroupsBitEXT = 0x00000004, + + /// + /// NoTaskShaderBitEXT + /// + NoTaskShaderBitEXT = 0x00000008, + + /// + /// DispatchBaseBitEXT + /// + DispatchBaseBitEXT = 0x00000010, + + /// + /// FragmentShadingRateAttachmentBitEXT + /// + FragmentShadingRateAttachmentBitEXT = 0x00000020, + + /// + /// FragmentDensityMapAttachmentBitEXT + /// + FragmentDensityMapAttachmentBitEXT = 0x00000040, + + /// + /// IndirectBindableBitEXT + /// + IndirectBindableBitEXT = 0x00000080, + + /// + /// OpacityMicromapDisallowMixedSpecialIndexBitEXT + /// + OpacityMicromapDisallowMixedSpecialIndexBitEXT = 0x00001000, + + /// + /// _64BitIndexingBitEXT + /// + _64BitIndexingBitEXT = 0x00008000, + + /// + /// IndependentSetsBitKHR + /// + IndependentSetsBitKHR = 0x00040000, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderFloatControlsIndependence.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderFloatControlsIndependence.gen.cs new file mode 100644 index 0000000..241a4e5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderFloatControlsIndependence.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderFloatControlsIndependence - Bitmask specifying whether, and how, shader float controls can be set separately + /// + /// + /// + /// Values which may: be returned in the denormBehaviorIndependence and + /// roundingModeIndependence fields of + /// VkPhysicalDeviceFloatControlsProperties are: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef enum VkShaderFloatControlsIndependence { + /// VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY = 0, + /// VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL = 1, + /// VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE = 2, + /// // Provided by VK_KHR_shader_float_controls + /// VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, + /// // Provided by VK_KHR_shader_float_controls + /// VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL, + /// // Provided by VK_KHR_shader_float_controls + /// VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, + /// } VkShaderFloatControlsIndependence; + /// + /// + public enum VkShaderFloatControlsIndependence : int + { + /// + /// _32BitOnly specifies that shader float controls for 32-bit floating-point can be set independently; other bit widths must be set identically to each other. + /// + _32BitOnly = 0, + + /// + /// All specifies that shader float controls for all bit widths can be set independently. + /// + All = 1, + + /// + /// None specifies that shader float controls for all bit widths must be set identically. + /// + None = 2, + + /// + /// _32BitOnlyKHR + /// + _32BitOnlyKHR = _32BitOnly, + + /// + /// AllKHR + /// + AllKHR = All, + + /// + /// NoneKHR + /// + NoneKHR = None, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderGroupShaderKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderGroupShaderKHR.gen.cs new file mode 100644 index 0000000..583f9f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderGroupShaderKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderGroupShaderKHR - Shader group shaders + /// + /// + /// + /// Possible values of groupShader in + /// vkGetRayTracingShaderGroupStackSizeKHR are: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef enum VkShaderGroupShaderKHR { + /// VK_SHADER_GROUP_SHADER_GENERAL_KHR = 0, + /// VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1, + /// VK_SHADER_GROUP_SHADER_ANY_HIT_KHR = 2, + /// VK_SHADER_GROUP_SHADER_INTERSECTION_KHR = 3, + /// } VkShaderGroupShaderKHR; + /// + /// + public enum VkShaderGroupShaderKHR : int + { + /// + /// GeneralKHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::generalShader + /// + GeneralKHR = 0, + + /// + /// ClosestHitKHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::closestHitShader + /// + ClosestHitKHR = 1, + + /// + /// AnyHitKHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::anyHitShader + /// + AnyHitKHR = 2, + + /// + /// IntersectionKHR uses the shader specified in the group with VkRayTracingShaderGroupCreateInfoKHR::intersectionShader + /// + IntersectionKHR = 3, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderInfoTypeAMD.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderInfoTypeAMD.gen.cs new file mode 100644 index 0000000..5615be8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderInfoTypeAMD.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderInfoTypeAMD - Enum specifying which type of shader information to query + /// + /// + /// + /// Possible values of vkGetShaderInfoAMD::infoType, specifying the + /// information being queried from a shader, are: + /// + /// + /// // Provided by VK_AMD_shader_info + /// typedef enum VkShaderInfoTypeAMD { + /// VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0, + /// VK_SHADER_INFO_TYPE_BINARY_AMD = 1, + /// VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2, + /// } VkShaderInfoTypeAMD; + /// + /// + public enum VkShaderInfoTypeAMD : int + { + /// + /// StatisticsAMD specifies that device resources used by a shader will be queried. + /// + StatisticsAMD = 0, + + /// + /// BinaryAMD specifies that implementation-specific information will be queried. + /// + BinaryAMD = 1, + + /// + /// DisassemblyAMD specifies that human-readable disassembly of a shader. + /// + DisassemblyAMD = 2, + + /// + /// MaxEnumAMD + /// + MaxEnumAMD = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShaderStageFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShaderStageFlags.gen.cs new file mode 100644 index 0000000..54e21ee --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShaderStageFlags.gen.cs @@ -0,0 +1,202 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderStageFlagBits - Bitmask specifying a pipeline stage + /// + /// + /// + /// Bits which can be set by commands and structures, specifying one or more + /// shader stages, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkShaderStageFlagBits { + /// VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, + /// VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, + /// VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, + /// VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, + /// VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, + /// VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, + /// VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, + /// VK_SHADER_STAGE_ALL = 0x7FFFFFFF, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_SHADER_STAGE_MISS_BIT_KHR = 0x00000800, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000, + /// // Provided by VK_EXT_mesh_shader + /// VK_SHADER_STAGE_TASK_BIT_EXT = 0x00000040, + /// // Provided by VK_EXT_mesh_shader + /// VK_SHADER_STAGE_MESH_BIT_EXT = 0x00000080, + /// // Provided by VK_HUAWEI_subpass_shading + /// VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI = 0x00004000, + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI = 0x00080000, + /// // Provided by VK_NV_ray_tracing + /// VK_SHADER_STAGE_RAYGEN_BIT_NV = VK_SHADER_STAGE_RAYGEN_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_SHADER_STAGE_ANY_HIT_BIT_NV = VK_SHADER_STAGE_ANY_HIT_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_SHADER_STAGE_MISS_BIT_NV = VK_SHADER_STAGE_MISS_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_SHADER_STAGE_INTERSECTION_BIT_NV = VK_SHADER_STAGE_INTERSECTION_BIT_KHR, + /// // Provided by VK_NV_ray_tracing + /// VK_SHADER_STAGE_CALLABLE_BIT_NV = VK_SHADER_STAGE_CALLABLE_BIT_KHR, + /// // Provided by VK_NV_mesh_shader + /// VK_SHADER_STAGE_TASK_BIT_NV = VK_SHADER_STAGE_TASK_BIT_EXT, + /// // Provided by VK_NV_mesh_shader + /// VK_SHADER_STAGE_MESH_BIT_NV = VK_SHADER_STAGE_MESH_BIT_EXT, + /// } VkShaderStageFlagBits; + /// + /// + [Flags] + public enum VkShaderStageFlags : int + { + /// No flags set. + None = 0, + + /// + /// VertexBit specifies the vertex stage. + /// + VertexBit = 0x00000001, + + /// + /// TessellationControlBit specifies the tessellation control stage. + /// + TessellationControlBit = 0x00000002, + + /// + /// TessellationEvaluationBit specifies the tessellation evaluation stage. + /// + TessellationEvaluationBit = 0x00000004, + + /// + /// GeometryBit specifies the geometry stage. + /// + GeometryBit = 0x00000008, + + /// + /// FragmentBit specifies the fragment stage. + /// + FragmentBit = 0x00000010, + + /// + /// ComputeBit specifies the compute stage. + /// + ComputeBit = 0x00000020, + + /// + /// AllGraphics is a combination of bits used as shorthand to specify all graphics stages defined above (excluding the compute stage). + /// + AllGraphics = 0x0000001F, + + /// + /// All is a combination of bits used as shorthand to specify all shader stages supported by the device, including all additional stages which are introduced by extensions. [NOTE] + /// + All = 0x7FFFFFFF, + + /// + /// RaygenBitKHR + /// + RaygenBitKHR = 0x00000100, + + /// + /// AnyHitBitKHR + /// + AnyHitBitKHR = 0x00000200, + + /// + /// ClosestHitBitKHR + /// + ClosestHitBitKHR = 0x00000400, + + /// + /// MissBitKHR + /// + MissBitKHR = 0x00000800, + + /// + /// IntersectionBitKHR + /// + IntersectionBitKHR = 0x00001000, + + /// + /// CallableBitKHR + /// + CallableBitKHR = 0x00002000, + + /// + /// TaskBitEXT + /// + TaskBitEXT = 0x00000040, + + /// + /// MeshBitEXT + /// + MeshBitEXT = 0x00000080, + + /// + /// SubpassShadingBitHUAWEI + /// + SubpassShadingBitHUAWEI = 0x00004000, + + /// + /// ClusterCullingBitHUAWEI + /// + ClusterCullingBitHUAWEI = 0x00080000, + + /// + /// RaygenBitNV + /// + RaygenBitNV = RaygenBitKHR, + + /// + /// AnyHitBitNV + /// + AnyHitBitNV = AnyHitBitKHR, + + /// + /// ClosestHitBitNV + /// + ClosestHitBitNV = ClosestHitBitKHR, + + /// + /// MissBitNV + /// + MissBitNV = MissBitKHR, + + /// + /// IntersectionBitNV + /// + IntersectionBitNV = IntersectionBitKHR, + + /// + /// CallableBitNV + /// + CallableBitNV = CallableBitKHR, + + /// + /// TaskBitNV + /// + TaskBitNV = TaskBitEXT, + + /// + /// MeshBitNV + /// + MeshBitNV = MeshBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkShadingRatePaletteEntryNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkShadingRatePaletteEntryNV.gen.cs new file mode 100644 index 0000000..e039c31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkShadingRatePaletteEntryNV.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShadingRatePaletteEntryNV - Shading rate image palette entry types + /// + /// + /// + /// The supported shading rate image palette entries are defined by + /// VkShadingRatePaletteEntryNV: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef enum VkShadingRatePaletteEntryNV { + /// VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0, + /// VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1, + /// VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2, + /// VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3, + /// VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10, + /// VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11, + /// } VkShadingRatePaletteEntryNV; + /// + /// + public enum VkShadingRatePaletteEntryNV : int + { + /// + /// NoInvocationsNV + /// + NoInvocationsNV = 0, + + /// + /// _16InvocationsPerPixelNV + /// + _16InvocationsPerPixelNV = 1, + + /// + /// _8InvocationsPerPixelNV + /// + _8InvocationsPerPixelNV = 2, + + /// + /// _4InvocationsPerPixelNV + /// + _4InvocationsPerPixelNV = 3, + + /// + /// _2InvocationsPerPixelNV + /// + _2InvocationsPerPixelNV = 4, + + /// + /// _1InvocationPerPixelNV + /// + _1InvocationPerPixelNV = 5, + + /// + /// _1InvocationPer2X1PixelsNV + /// + _1InvocationPer2X1PixelsNV = 6, + + /// + /// _1InvocationPer1X2PixelsNV + /// + _1InvocationPer1X2PixelsNV = 7, + + /// + /// _1InvocationPer2X2PixelsNV + /// + _1InvocationPer2X2PixelsNV = 8, + + /// + /// _1InvocationPer4X2PixelsNV + /// + _1InvocationPer4X2PixelsNV = 9, + + /// + /// _1InvocationPer2X4PixelsNV + /// + _1InvocationPer2X4PixelsNV = 10, + + /// + /// _1InvocationPer4X4PixelsNV + /// + _1InvocationPer4X4PixelsNV = 11, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSharingMode.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSharingMode.gen.cs new file mode 100644 index 0000000..88bca7c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSharingMode.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSharingMode - Buffer and image sharing modes + /// + /// + /// + /// Buffer and image objects are created with a sharing mode controlling how + /// they can be accessed from queues. + /// The supported sharing modes are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSharingMode { + /// VK_SHARING_MODE_EXCLUSIVE = 0, + /// VK_SHARING_MODE_CONCURRENT = 1, + /// } VkSharingMode; + /// + /// + public enum VkSharingMode : int + { + /// + /// Exclusive specifies that access to any range or image subresource of the object will be exclusive to a single queue family at a time. + /// + Exclusive = 0, + + /// + /// Concurrent specifies that concurrent access to any range or image subresource of the object from multiple queue families is supported. [NOTE] + /// + Concurrent = 1, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSparseImageFormatFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSparseImageFormatFlags.gen.cs new file mode 100644 index 0000000..10780ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSparseImageFormatFlags.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageFormatFlagBits - Bitmask specifying additional information about a sparse image resource + /// + /// + /// + /// Bits which may: be set in VkSparseImageFormatProperties::flags, + /// specifying additional information about the sparse resource, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSparseImageFormatFlagBits { + /// VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, + /// VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002, + /// VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, + /// } VkSparseImageFormatFlagBits; + /// + /// + [Flags] + public enum VkSparseImageFormatFlags : int + { + /// No flags set. + None = 0, + + /// + /// SingleMiptailBit specifies that the image uses a single mip tail region for all array layers. + /// + SingleMiptailBit = 0x00000001, + + /// + /// AlignedMipSizeBit specifies that the first mip level whose dimensions are not integer multiples of the corresponding dimensions of the sparse image block begins the mip tail region. + /// + AlignedMipSizeBit = 0x00000002, + + /// + /// NonstandardBlockSizeBit specifies that the image uses non-standard sparse image block dimensions, and the imageGranularity values do not match the standard sparse image block dimensions for the given format. + /// + NonstandardBlockSizeBit = 0x00000004, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSparseMemoryBindFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSparseMemoryBindFlags.gen.cs new file mode 100644 index 0000000..c06c034 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSparseMemoryBindFlags.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseMemoryBindFlagBits - Bitmask specifying usage of a sparse memory binding operation + /// + /// + /// + /// Bits which can be set in VkSparseMemoryBind::flags, specifying + /// usage of a sparse memory binding operation, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSparseMemoryBindFlagBits { + /// VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, + /// } VkSparseMemoryBindFlagBits; + /// + /// + [Flags] + public enum VkSparseMemoryBindFlags : int + { + /// No flags set. + None = 0, + + /// + /// MetadataBit specifies that the memory being bound is only for the metadata aspect. + /// + MetadataBit = 0x00000001, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSpirvResourceTypeFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSpirvResourceTypeFlagsEXT.gen.cs new file mode 100644 index 0000000..17774ba --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSpirvResourceTypeFlagsEXT.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSpirvResourceTypeFlagBitsEXT - Bitmask specifying different SPIR-V resource declarations + /// + /// + /// + /// Bits which can be set in + /// VkDescriptorSetAndBindingMappingEXT::resourceMask, are: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef enum VkSpirvResourceTypeFlagBitsEXT { + /// VK_SPIRV_RESOURCE_TYPE_ALL_EXT = 0x7FFFFFFF, + /// VK_SPIRV_RESOURCE_TYPE_SAMPLER_BIT_EXT = 0x00000001, + /// VK_SPIRV_RESOURCE_TYPE_SAMPLED_IMAGE_BIT_EXT = 0x00000002, + /// VK_SPIRV_RESOURCE_TYPE_READ_ONLY_IMAGE_BIT_EXT = 0x00000004, + /// VK_SPIRV_RESOURCE_TYPE_READ_WRITE_IMAGE_BIT_EXT = 0x00000008, + /// VK_SPIRV_RESOURCE_TYPE_COMBINED_SAMPLED_IMAGE_BIT_EXT = 0x00000010, + /// VK_SPIRV_RESOURCE_TYPE_UNIFORM_BUFFER_BIT_EXT = 0x00000020, + /// VK_SPIRV_RESOURCE_TYPE_READ_ONLY_STORAGE_BUFFER_BIT_EXT = 0x00000040, + /// VK_SPIRV_RESOURCE_TYPE_READ_WRITE_STORAGE_BUFFER_BIT_EXT = 0x00000080, + /// // Provided by VK_EXT_descriptor_heap with VK_KHR_ray_tracing_pipeline or VK_NV_ray_tracing + /// VK_SPIRV_RESOURCE_TYPE_ACCELERATION_STRUCTURE_BIT_EXT = 0x00000100, + /// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors + /// VK_SPIRV_RESOURCE_TYPE_TENSOR_BIT_ARM = 0x00000200, + /// } VkSpirvResourceTypeFlagBitsEXT; + /// + /// + [Flags] + public enum VkSpirvResourceTypeFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// AllEXT specifies that all resource declarations are included. + /// + AllEXT = 0x7FFFFFFF, + + /// + /// SamplerBitEXT specifies OpTypeSampler variables. + /// + SamplerBitEXT = 0x00000001, + + /// + /// SampledImageBitEXT specifies OpTypeImage variables with a Sampled parameter of 1. + /// + SampledImageBitEXT = 0x00000002, + + /// + /// ReadOnlyImageBitEXT specifies OpTypeImage variables with a Sampled parameter of 2 and decorated with NonWritable. + /// + ReadOnlyImageBitEXT = 0x00000004, + + /// + /// ReadWriteImageBitEXT specifies OpTypeImage variables with a Sampled parameter of 2 and not decorated with NonWritable. + /// + ReadWriteImageBitEXT = 0x00000008, + + /// + /// CombinedSampledImageBitEXT specifies OpTypeSampledImage variables. + /// + CombinedSampledImageBitEXT = 0x00000010, + + /// + /// UniformBufferBitEXT specifies OpTypeStruct variables in the Uniform storage class decorated with Block + /// + UniformBufferBitEXT = 0x00000020, + + /// + /// ReadOnlyStorageBufferBitEXT specifies OpTypeStruct variables either in the StorageBuffer storage class decorated with Block or in the Uniform storage class decorated with BufferBlock, and decorated with NonWritable + /// + ReadOnlyStorageBufferBitEXT = 0x00000040, + + /// + /// ReadWriteStorageBufferBitEXT specifies OpTypeStruct variables either in the StorageBuffer storage class decorated with Block or in the Uniform storage class decorated with BufferBlock, but not decorated with NonWritable + /// + ReadWriteStorageBufferBitEXT = 0x00000080, + + /// + /// AccelerationStructureBitEXT + /// + AccelerationStructureBitEXT = 0x00000100, + + /// + /// TensorBitARM + /// + TensorBitARM = 0x00000200, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkStencilFaceFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkStencilFaceFlags.gen.cs new file mode 100644 index 0000000..2ebc435 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkStencilFaceFlags.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStencilFaceFlagBits - Bitmask specifying sets of stencil state for which to update the compare mask + /// + /// + /// + /// VkStencilFaceFlags values are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkStencilFaceFlagBits { + /// VK_STENCIL_FACE_FRONT_BIT = 0x00000001, + /// VK_STENCIL_FACE_BACK_BIT = 0x00000002, + /// VK_STENCIL_FACE_FRONT_AND_BACK = 0x00000003, + /// // VK_STENCIL_FRONT_AND_BACK is a legacy alias + /// VK_STENCIL_FRONT_AND_BACK = VK_STENCIL_FACE_FRONT_AND_BACK, + /// } VkStencilFaceFlagBits; + /// + /// + [Flags] + public enum VkStencilFaceFlags : int + { + /// No flags set. + None = 0, + + /// + /// FrontBit specifies that only the front set of stencil state is updated. + /// + FrontBit = 0x00000001, + + /// + /// BackBit specifies that only the back set of stencil state is updated. + /// + BackBit = 0x00000002, + + /// + /// FrontAndBack is the combination of VK_STENCIL_FACE_FRONT_BIT and VK_STENCIL_FACE_BACK_BIT, and specifies that both sets of stencil state are updated. + /// + FrontAndBack = 0x00000003, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkStencilOp.gen.cs b/Brutal.Vulkan/Generated/Enums/VkStencilOp.gen.cs new file mode 100644 index 0000000..a614c39 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkStencilOp.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStencilOp - Stencil comparison function + /// + /// + /// + /// Possible values of the failOp, passOp, and depthFailOp + /// members of VkStencilOpState, specifying what happens to the stored + /// stencil value if this or certain subsequent tests fail or pass, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkStencilOp { + /// VK_STENCIL_OP_KEEP = 0, + /// VK_STENCIL_OP_ZERO = 1, + /// VK_STENCIL_OP_REPLACE = 2, + /// VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, + /// VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, + /// VK_STENCIL_OP_INVERT = 5, + /// VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, + /// VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, + /// } VkStencilOp; + /// + /// + public enum VkStencilOp : int + { + /// + /// Keep keeps the current value. + /// + Keep = 0, + + /// + /// Zero sets the value to 0. + /// + Zero = 1, + + /// + /// Replace sets the value to reference. + /// + Replace = 2, + + /// + /// IncrementAndClamp increments the current value and clamps to the maximum representable unsigned value. + /// + IncrementAndClamp = 3, + + /// + /// DecrementAndClamp decrements the current value and clamps to 0. + /// + DecrementAndClamp = 4, + + /// + /// Invert bitwise-inverts the current value. + /// + Invert = 5, + + /// + /// IncrementAndWrap increments the current value and wraps to 0 when the maximum value would have been exceeded. + /// + IncrementAndWrap = 6, + + /// + /// DecrementAndWrap decrements the current value and wraps to the maximum possible value when the value would go below 0. For purposes of increment and decrement, the stencil bits are considered as an unsigned integer. + /// + DecrementAndWrap = 7, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkStructureType.gen.cs b/Brutal.Vulkan/Generated/Enums/VkStructureType.gen.cs new file mode 100644 index 0000000..3bf5564 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkStructureType.gen.cs @@ -0,0 +1,10540 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStructureType - Vulkan structure types (<c>sType</c>) + /// + /// + /// + /// Each value corresponds to a particular structure with a sType member + /// with a matching name. + /// As a general rule, the name of each VkStructureType value is obtained + /// by taking the name of the structure, stripping the leading etext:Vk, + /// prefixing each capital letter except the first with etext:_, converting the + /// entire resulting string to upper case, and prefixing it with + /// etext:VK_STRUCTURE_TYPE_. + /// For example, structures of type VkImageCreateInfo correspond to a + /// VkStructureType value of VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + /// and thus a structure of this type must have its sType member set to + /// this value before it is passed to the API. + /// + /// + /// The values VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO and + /// VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO are reserved for internal + /// use by the loader, and do not have corresponding Vulkan structures in this + /// Specification. + /// + /// + /// Structure types supported by the Vulkan API include: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkStructureType { + /// VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, + /// VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, + /// VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, + /// VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, + /// VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, + /// VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, + /// VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, + /// VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, + /// VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, + /// VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, + /// VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, + /// VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, + /// VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, + /// VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, + /// VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, + /// VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, + /// VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, + /// VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, + /// VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, + /// VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, + /// VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, + /// VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, + /// VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, + /// VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, + /// VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, + /// VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, + /// VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, + /// VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, + /// VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, + /// VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, + /// VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, + /// VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, + /// VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, + /// VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, + /// VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, + /// VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, + /// VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, + /// VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, + /// VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, + /// VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO = 1000207002, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO = 1000207004, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO = 1000207005, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO = 1000244001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2 = 1000109000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 = 1000109001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2 = 1000109002, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2 = 1000109003, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2 = 1000109004, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO = 1000109005, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SUBPASS_END_INFO = 1000109006, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001, + /// // Provided by VK_VERSION_1_2 + /// VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_MEMORY_BARRIER_2 = 1000314000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2 = 1000314001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2 = 1000314002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_DEPENDENCY_INFO = 1000314003, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_SUBMIT_INFO_2 = 1000314004, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO = 1000314005, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO = 1000314006, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2 = 1000337000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2 = 1000337001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_BUFFER_COPY_2 = 1000337006, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_IMAGE_COPY_2 = 1000337007, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2 = 1000337009, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 = 1000360000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2 = 1000337004, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2 = 1000337005, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_IMAGE_BLIT_2 = 1000337008, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2 = 1000337010, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_RENDERING_INFO = 1000044000, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO = 1000044001, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO = 1000044002, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003, + /// // Provided by VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES = 55, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES = 56, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO = 1000174000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES = 1000388000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES = 1000388001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES = 1000265000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_MEMORY_MAP_INFO = 1000271000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO = 1000271001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES = 1000470000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES = 1000470001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO = 1000470004, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2 = 1000338002, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2 = 1000338003, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO = 1000470006, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES = 1000545000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES = 1000545001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS = 1000545002, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES = 1000270000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES = 1000270001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY = 1000270002, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY = 1000270003, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO = 1000270004, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO = 1000270005, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO = 1000270006, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO = 1000270007, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE = 1000270008, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY = 1000270009, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES = 1000416000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES = 1000528000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES = 1000544000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO = 1000470005, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES = 1000080000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO = 1000545003, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO = 1000545004, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO = 1000545005, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO = 1000545006, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES = 1000466000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO = 1000068000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES = 1000068001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES = 1000068002, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES = 1000259000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO = 1000259001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES = 1000259002, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES = 1000525000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO = 1000190001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES = 1000190002, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_RENDERING_AREA_INFO = 1000470003, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES = 1000232000, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO = 1000232001, + /// // Provided by VK_VERSION_1_4 + /// VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO = 1000232002, + /// // Provided by VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, + /// // Provided by VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012, + /// // Provided by VK_KHR_display + /// VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, + /// // Provided by VK_KHR_display + /// VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, + /// // Provided by VK_KHR_display_swapchain + /// VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000, + /// // Provided by VK_KHR_xlib_surface + /// VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, + /// // Provided by VK_KHR_xcb_surface + /// VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, + /// // Provided by VK_KHR_wayland_surface + /// VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, + /// // Provided by VK_KHR_android_surface + /// VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, + /// // Provided by VK_KHR_win32_surface + /// VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, + /// // Provided by VK_EXT_debug_report + /// VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, + /// // Provided by VK_AMD_rasterization_order + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, + /// // Provided by VK_EXT_debug_marker + /// VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, + /// // Provided by VK_EXT_debug_marker + /// VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, + /// // Provided by VK_EXT_debug_marker + /// VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR = 1000023000, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR = 1000023001, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR = 1000023005, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR = 1000023008, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR = 1000023009, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR = 1000023010, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR = 1000023013, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR = 1000023015, + /// // Provided by VK_KHR_video_queue + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016, + /// // Provided by VK_KHR_video_decode_queue + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR = 1000024000, + /// // Provided by VK_KHR_video_decode_queue + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR = 1000024001, + /// // Provided by VK_KHR_video_decode_queue + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR = 1000024002, + /// // Provided by VK_NV_dedicated_allocation + /// VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, + /// // Provided by VK_NV_dedicated_allocation + /// VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, + /// // Provided by VK_NV_dedicated_allocation + /// VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, + /// // Provided by VK_EXT_transform_feedback + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000, + /// // Provided by VK_EXT_transform_feedback + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001, + /// // Provided by VK_EXT_transform_feedback + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, + /// // Provided by VK_NVX_binary_import + /// VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX = 1000029000, + /// // Provided by VK_NVX_binary_import + /// VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX = 1000029001, + /// // Provided by VK_NVX_binary_import + /// VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002, + /// // Provided by VK_NVX_binary_import + /// VK_STRUCTURE_TYPE_CU_MODULE_TEXTURING_MODE_CREATE_INFO_NVX = 1000029004, + /// // Provided by VK_NVX_image_view_handle + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, + /// // Provided by VK_NVX_image_view_handle + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000040004, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000040005, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR = 1000040006, + /// // Provided by VK_AMD_texture_gather_bias_lod + /// VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, + /// // Provided by VK_GGP_stream_descriptor_surface + /// VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000, + /// // Provided by VK_NV_corner_sampled_image + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, + /// // Provided by VK_NV_external_memory + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, + /// // Provided by VK_NV_external_memory + /// VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, + /// // Provided by VK_NV_external_memory_win32 + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, + /// // Provided by VK_NV_external_memory_win32 + /// VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, + /// // Provided by VK_NV_win32_keyed_mutex + /// VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, + /// // Provided by VK_EXT_validation_flags + /// VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, + /// // Provided by VK_NN_vi_surface + /// VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, + /// // Provided by VK_EXT_astc_decode_mode + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000, + /// // Provided by VK_EXT_astc_decode_mode + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001, + /// // Provided by VK_KHR_external_memory_win32 + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000, + /// // Provided by VK_KHR_external_memory_win32 + /// VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001, + /// // Provided by VK_KHR_external_memory_win32 + /// VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002, + /// // Provided by VK_KHR_external_memory_win32 + /// VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003, + /// // Provided by VK_KHR_external_memory_fd + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000, + /// // Provided by VK_KHR_external_memory_fd + /// VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001, + /// // Provided by VK_KHR_external_memory_fd + /// VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002, + /// // Provided by VK_KHR_win32_keyed_mutex + /// VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000, + /// // Provided by VK_KHR_external_semaphore_win32 + /// VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000, + /// // Provided by VK_KHR_external_semaphore_win32 + /// VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001, + /// // Provided by VK_KHR_external_semaphore_win32 + /// VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002, + /// // Provided by VK_KHR_external_semaphore_win32 + /// VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003, + /// // Provided by VK_KHR_external_semaphore_fd + /// VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, + /// // Provided by VK_KHR_external_semaphore_fd + /// VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001, + /// // Provided by VK_EXT_conditional_rendering + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, + /// // Provided by VK_EXT_conditional_rendering + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, + /// // Provided by VK_EXT_conditional_rendering + /// VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, + /// // Provided by VK_KHR_incremental_present + /// VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, + /// // Provided by VK_NV_clip_space_w_scaling + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, + /// // Provided by VK_EXT_display_surface_counter + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000, + /// // Provided by VK_EXT_display_control + /// VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, + /// // Provided by VK_EXT_display_control + /// VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, + /// // Provided by VK_EXT_display_control + /// VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, + /// // Provided by VK_EXT_display_control + /// VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, + /// // Provided by VK_GOOGLE_display_timing + /// VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, + /// // Provided by VK_NVX_multiview_per_view_attributes + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, + /// // Provided by VK_NVX_multiview_per_view_attributes with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000044009, + /// // Provided by VK_NV_viewport_swizzle + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, + /// // Provided by VK_EXT_discard_rectangles + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, + /// // Provided by VK_EXT_discard_rectangles + /// VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, + /// // Provided by VK_EXT_conservative_rasterization + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, + /// // Provided by VK_EXT_conservative_rasterization + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, + /// // Provided by VK_EXT_depth_clip_enable + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000, + /// // Provided by VK_EXT_depth_clip_enable + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001, + /// // Provided by VK_EXT_hdr_metadata + /// VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, + /// // Provided by VK_IMG_relaxed_line_rasterization + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG = 1000110000, + /// // Provided by VK_KHR_shared_presentable_image + /// VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, + /// // Provided by VK_KHR_external_fence_win32 + /// VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, + /// // Provided by VK_KHR_external_fence_win32 + /// VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, + /// // Provided by VK_KHR_external_fence_win32 + /// VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002, + /// // Provided by VK_KHR_external_fence_fd + /// VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000, + /// // Provided by VK_KHR_external_fence_fd + /// VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR = 1000116005, + /// // Provided by VK_KHR_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006, + /// // Provided by VK_KHR_get_surface_capabilities2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, + /// // Provided by VK_KHR_get_surface_capabilities2 + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, + /// // Provided by VK_KHR_get_surface_capabilities2 + /// VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, + /// // Provided by VK_KHR_get_display_properties2 + /// VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000, + /// // Provided by VK_KHR_get_display_properties2 + /// VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001, + /// // Provided by VK_KHR_get_display_properties2 + /// VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002, + /// // Provided by VK_KHR_get_display_properties2 + /// VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003, + /// // Provided by VK_KHR_get_display_properties2 + /// VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004, + /// // Provided by VK_MVK_ios_surface + /// VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, + /// // Provided by VK_MVK_macos_surface + /// VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, + /// // Provided by VK_EXT_debug_utils + /// VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, + /// // Provided by VK_EXT_debug_utils + /// VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001, + /// // Provided by VK_EXT_debug_utils + /// VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002, + /// // Provided by VK_EXT_debug_utils + /// VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003, + /// // Provided by VK_EXT_debug_utils + /// VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005, + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_FEATURES_AMD = 1000133000, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_PROPERTIES_AMD = 1000133001, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_GPA_SAMPLE_BEGIN_INFO_AMD = 1000133002, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_GPA_SESSION_CREATE_INFO_AMD = 1000133003, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_GPA_DEVICE_CLOCK_MODE_INFO_AMD = 1000133004, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GPA_PROPERTIES_2_AMD = 1000133005, + /// // Provided by VK_AMD_gpa_interface + /// VK_STRUCTURE_TYPE_GPA_DEVICE_GET_CLOCK_INFO_AMD = 1000133006, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX = 1000134001, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX = 1000134002, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX = 1000134003, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_shader_enqueue + /// VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX = 1000134004, + /// #endif + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_TEXEL_BUFFER_DESCRIPTOR_INFO_EXT = 1000135000, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_IMAGE_DESCRIPTOR_INFO_EXT = 1000135001, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_RESOURCE_DESCRIPTOR_INFO_EXT = 1000135002, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_BIND_HEAP_INFO_EXT = 1000135003, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_PUSH_DATA_INFO_EXT = 1000135004, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_AND_BINDING_MAPPING_EXT = 1000135005, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_SHADER_DESCRIPTOR_SET_AND_BINDING_MAPPING_INFO_EXT = 1000135006, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DATA_CREATE_INFO_EXT = 1000135007, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_PROPERTIES_EXT = 1000135008, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_FEATURES_EXT = 1000135009, + /// // Provided by VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_DESCRIPTOR_HEAP_INFO_EXT = 1000135010, + /// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap + /// VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_INDEX_CREATE_INFO_EXT = 1000135011, + /// // Provided by VK_EXT_descriptor_heap with VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_PUSH_DATA_TOKEN_NV = 1000135012, + /// // Provided by VK_EXT_descriptor_heap with VK_EXT_fragment_density_map + /// VK_STRUCTURE_TYPE_SUBSAMPLED_IMAGE_FORMAT_PROPERTIES_EXT = 1000135013, + /// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_HEAP_TENSOR_PROPERTIES_ARM = 1000135014, + /// // Provided by VK_AMD_mixed_attachment_samples with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000044008, + /// // Provided by VK_KHR_shader_bfloat16 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_BFLOAT16_FEATURES_KHR = 1000141000, + /// // Provided by VK_EXT_sample_locations + /// VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000, + /// // Provided by VK_EXT_sample_locations + /// VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, + /// // Provided by VK_EXT_sample_locations + /// VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, + /// // Provided by VK_EXT_sample_locations + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, + /// // Provided by VK_EXT_sample_locations + /// VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001, + /// // Provided by VK_EXT_blend_operation_advanced + /// VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, + /// // Provided by VK_NV_fragment_coverage_to_color + /// VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017, + /// // Provided by VK_KHR_acceleration_structure + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000150015, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000150016, + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000150018, + /// // Provided by VK_KHR_ray_query + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013, + /// // Provided by VK_NV_framebuffer_mixed_samples + /// VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, + /// // Provided by VK_NV_shader_sm_builtins + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000, + /// // Provided by VK_NV_shader_sm_builtins + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004, + /// // Provided by VK_EXT_image_drm_format_modifier + /// VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005, + /// // Provided by VK_EXT_image_drm_format_modifier with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006, + /// // Provided by VK_EXT_validation_cache + /// VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, + /// // Provided by VK_EXT_validation_cache + /// VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_KHR_portability_subset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_KHR_portability_subset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001, + /// #endif + /// // Provided by VK_NV_shading_rate_image + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000, + /// // Provided by VK_NV_shading_rate_image + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001, + /// // Provided by VK_NV_shading_rate_image + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002, + /// // Provided by VK_NV_shading_rate_image + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_GEOMETRY_NV = 1000165003, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV = 1000165004, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV = 1000165005, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011, + /// // Provided by VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV = 1000165012, + /// // Provided by VK_NV_representative_fragment_test + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000, + /// // Provided by VK_NV_representative_fragment_test + /// VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001, + /// // Provided by VK_EXT_filter_cubic + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000, + /// // Provided by VK_EXT_filter_cubic + /// VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001, + /// // Provided by VK_QCOM_cooperative_matrix_conversion + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_CONVERSION_FEATURES_QCOM = 1000172000, + /// // Provided by VK_QCOM_elapsed_timer_query + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ELAPSED_TIMER_QUERY_FEATURES_QCOM = 1000173000, + /// // Provided by VK_EXT_external_memory_host + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, + /// // Provided by VK_EXT_external_memory_host + /// VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, + /// // Provided by VK_EXT_external_memory_host + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, + /// // Provided by VK_KHR_shader_clock + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000, + /// // Provided by VK_AMD_pipeline_compiler_control + /// VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000, + /// // Provided by VK_AMD_shader_core_properties + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR = 1000187000, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000187001, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000187002, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR = 1000187003, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR = 1000187004, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR = 1000187005, + /// // Provided by VK_AMD_memory_overallocation_behavior + /// VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, + /// // Provided by VK_EXT_vertex_attribute_divisor + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, + /// // Provided by VK_GGP_frame_token + /// VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000, + /// // Provided by VK_NV_mesh_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000, + /// // Provided by VK_NV_mesh_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001, + /// // Provided by VK_NV_shader_image_footprint + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000, + /// // Provided by VK_NV_scissor_exclusive + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000, + /// // Provided by VK_NV_scissor_exclusive + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002, + /// // Provided by VK_NV_device_diagnostic_checkpoints + /// VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000, + /// // Provided by VK_NV_device_diagnostic_checkpoints + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001, + /// // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000314008, + /// // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV = 1000314009, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT = 1000208000, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_SWAPCHAIN_TIMING_PROPERTIES_EXT = 1000208001, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_SWAPCHAIN_TIME_DOMAIN_PROPERTIES_EXT = 1000208002, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PRESENT_TIMINGS_INFO_EXT = 1000208003, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PRESENT_TIMING_INFO_EXT = 1000208004, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_INFO_EXT = 1000208005, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_PROPERTIES_EXT = 1000208006, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PAST_PRESENTATION_TIMING_EXT = 1000208007, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_PRESENT_TIMING_SURFACE_CAPABILITIES_EXT = 1000208008, + /// // Provided by VK_EXT_present_timing + /// VK_STRUCTURE_TYPE_SWAPCHAIN_CALIBRATED_TIMESTAMP_INFO_EXT = 1000208009, + /// // Provided by VK_INTEL_shader_integer_functions2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000, + /// // Provided by VK_INTEL_performance_query + /// VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000, + /// // Provided by VK_INTEL_performance_query + /// VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001, + /// // Provided by VK_INTEL_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL = 1000210002, + /// // Provided by VK_INTEL_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003, + /// // Provided by VK_INTEL_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004, + /// // Provided by VK_INTEL_performance_query + /// VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005, + /// // Provided by VK_EXT_pci_bus_info + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000, + /// // Provided by VK_AMD_display_native_hdr + /// VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000, + /// // Provided by VK_AMD_display_native_hdr + /// VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001, + /// // Provided by VK_FUCHSIA_imagepipe_surface + /// VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000, + /// // Provided by VK_EXT_metal_surface + /// VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000, + /// // Provided by VK_EXT_fragment_density_map + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001, + /// // Provided by VK_EXT_fragment_density_map + /// VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002, + /// // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000044007, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003, + /// // Provided by VK_KHR_fragment_shading_rate + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004, + /// // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006, + /// // Provided by VK_AMD_shader_core_properties2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000, + /// // Provided by VK_AMD_device_coherent_memory + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000, + /// // Provided by VK_KHR_shader_constant_data + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CONSTANT_DATA_FEATURES_KHR = 1000231000, + /// // Provided by VK_KHR_shader_abort + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ABORT_FEATURES_KHR = 1000233000, + /// // Provided by VK_KHR_shader_abort + /// VK_STRUCTURE_TYPE_DEVICE_FAULT_SHADER_ABORT_MESSAGE_INFO_KHR = 1000233001, + /// // Provided by VK_KHR_shader_abort + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ABORT_PROPERTIES_KHR = 1000233002, + /// // Provided by VK_EXT_shader_image_atomic_int64 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000, + /// // Provided by VK_KHR_shader_quad_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000, + /// // Provided by VK_EXT_memory_budget + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, + /// // Provided by VK_EXT_memory_priority + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000, + /// // Provided by VK_EXT_memory_priority + /// VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001, + /// // Provided by VK_KHR_surface_protected_capabilities + /// VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000, + /// // Provided by VK_NV_dedicated_allocation_image_aliasing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000, + /// // Provided by VK_EXT_buffer_device_address + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000, + /// // Provided by VK_EXT_buffer_device_address + /// VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002, + /// // Provided by VK_EXT_validation_features + /// VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000, + /// // Provided by VK_KHR_present_wait + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000, + /// // Provided by VK_NV_cooperative_matrix + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000, + /// // Provided by VK_NV_cooperative_matrix + /// VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, + /// // Provided by VK_NV_cooperative_matrix + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002, + /// // Provided by VK_NV_coverage_reduction_mode + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000, + /// // Provided by VK_NV_coverage_reduction_mode + /// VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001, + /// // Provided by VK_NV_coverage_reduction_mode + /// VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002, + /// // Provided by VK_EXT_fragment_shader_interlock + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000, + /// // Provided by VK_EXT_ycbcr_image_arrays + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000, + /// // Provided by VK_EXT_provoking_vertex + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000, + /// // Provided by VK_EXT_provoking_vertex + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001, + /// // Provided by VK_EXT_provoking_vertex + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002, + /// // Provided by VK_EXT_full_screen_exclusive + /// VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000, + /// // Provided by VK_EXT_full_screen_exclusive + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002, + /// // Provided by VK_KHR_win32_surface with VK_EXT_full_screen_exclusive + /// VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001, + /// // Provided by VK_EXT_headless_surface + /// VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000, + /// // Provided by VK_EXT_shader_atomic_float + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000, + /// // Provided by VK_EXT_extended_dynamic_state + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004, + /// // Provided by VK_KHR_pipeline_executable_properties + /// VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005, + /// // Provided by VK_EXT_map_memory_placed + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000, + /// // Provided by VK_EXT_map_memory_placed + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001, + /// // Provided by VK_EXT_map_memory_placed + /// VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT = 1000272002, + /// // Provided by VK_EXT_shader_atomic_float2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV = 1000277005, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006, + /// // Provided by VK_NV_device_generated_commands + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007, + /// // Provided by VK_NV_inherited_viewport_scissor + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000, + /// // Provided by VK_NV_inherited_viewport_scissor + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001, + /// // Provided by VK_EXT_texel_buffer_alignment + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000, + /// // Provided by VK_QCOM_render_pass_transform + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000, + /// // Provided by VK_QCOM_render_pass_transform + /// VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001, + /// // Provided by VK_EXT_depth_bias_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT = 1000283000, + /// // Provided by VK_EXT_depth_bias_control + /// VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT = 1000283001, + /// // Provided by VK_EXT_depth_bias_control + /// VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT = 1000283002, + /// // Provided by VK_EXT_device_memory_report + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000, + /// // Provided by VK_EXT_device_memory_report + /// VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001, + /// // Provided by VK_EXT_device_memory_report + /// VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002, + /// // Provided by VK_EXT_custom_border_color + /// VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000, + /// // Provided by VK_EXT_custom_border_color + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001, + /// // Provided by VK_EXT_custom_border_color + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002, + /// // Provided by VK_EXT_texture_compression_astc_3d + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_3D_FEATURES_EXT = 1000288000, + /// // Provided by VK_KHR_pipeline_library + /// VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000, + /// // Provided by VK_NV_present_barrier + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000, + /// // Provided by VK_NV_present_barrier + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001, + /// // Provided by VK_NV_present_barrier + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002, + /// // Provided by VK_KHR_present_id + /// VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000, + /// // Provided by VK_KHR_present_id + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR = 1000299000, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009, + /// // Provided by VK_KHR_video_encode_queue + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010, + /// // Provided by VK_NV_device_diagnostics_config + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000, + /// // Provided by VK_NV_device_diagnostics_config + /// VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001, + /// // Provided by VK_QCOM_queue_perf_hint + /// VK_STRUCTURE_TYPE_PERF_HINT_INFO_QCOM = 1000302000, + /// // Provided by VK_QCOM_queue_perf_hint + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_PERF_HINT_FEATURES_QCOM = 1000302001, + /// // Provided by VK_QCOM_queue_perf_hint + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_PERF_HINT_PROPERTIES_QCOM = 1000302002, + /// // Provided by VK_QCOM_image_processing3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_3_FEATURES_QCOM = 1000303000, + /// // Provided by VK_QCOM_shader_multiple_wait_queues + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MULTIPLE_WAIT_QUEUES_FEATURES_QCOM = 1000304000, + /// // Provided by VK_QCOM_shader_multiple_wait_queues + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MULTIPLE_WAIT_QUEUES_PROPERTIES_QCOM = 1000304001, + /// // Provided by VK_EXT_shader_split_barrier + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SPLIT_BARRIER_FEATURES_EXT = 1000305000, + /// // Provided by VK_EXT_shader_split_barrier + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SPLIT_BARRIER_PROPERTIES_EXT = 1000305001, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV = 1000307001, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV = 1000307002, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV = 1000307003, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_cuda_kernel_launch + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV = 1000307004, + /// #endif + /// // Provided by VK_QCOM_tile_shading + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_SHADING_FEATURES_QCOM = 1000309000, + /// // Provided by VK_QCOM_tile_shading + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_SHADING_PROPERTIES_QCOM = 1000309001, + /// // Provided by VK_QCOM_tile_shading + /// VK_STRUCTURE_TYPE_RENDER_PASS_TILE_SHADING_CREATE_INFO_QCOM = 1000309002, + /// // Provided by VK_QCOM_tile_shading + /// VK_STRUCTURE_TYPE_PER_TILE_BEGIN_INFO_QCOM = 1000309003, + /// // Provided by VK_QCOM_tile_shading + /// VK_STRUCTURE_TYPE_PER_TILE_END_INFO_QCOM = 1000309004, + /// // Provided by VK_QCOM_tile_shading + /// VK_STRUCTURE_TYPE_DISPATCH_TILE_INFO_QCOM = 1000309005, + /// // Provided by VK_NV_low_latency + /// VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV = 1000310000, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT = 1000311002, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT = 1000311004, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT = 1000311005, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010, + /// // Provided by VK_EXT_metal_objects + /// VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT = 1000316004, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011, + /// // Provided by VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012, + /// // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_DEVICE_MEMORY_COPY_KHR = 1000318000, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_INFO_KHR = 1000318001, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_DEVICE_MEMORY_IMAGE_COPY_KHR = 1000318002, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_COPY_DEVICE_MEMORY_IMAGE_INFO_KHR = 1000318003, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIERS_INFO_KHR = 1000318004, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_MEMORY_RANGE_BARRIER_KHR = 1000318005, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_ADDRESS_COMMANDS_FEATURES_KHR = 1000318006, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_BIND_INDEX_BUFFER_3_INFO_KHR = 1000318007, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_BIND_VERTEX_BUFFER_3_INFO_KHR = 1000318008, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_DRAW_INDIRECT_2_INFO_KHR = 1000318009, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_DRAW_INDIRECT_COUNT_2_INFO_KHR = 1000318010, + /// // Provided by VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_DISPATCH_INDIRECT_2_INFO_KHR = 1000318011, + /// // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering + /// VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_2_EXT = 1000318012, + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// VK_STRUCTURE_TYPE_BIND_TRANSFORM_FEEDBACK_BUFFER_2_INFO_EXT = 1000318013, + /// // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker + /// VK_STRUCTURE_TYPE_MEMORY_MARKER_INFO_AMD = 1000318014, + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_2_KHR = 1000318015, + /// // Provided by VK_EXT_graphics_pipeline_library + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000, + /// // Provided by VK_EXT_graphics_pipeline_library + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001, + /// // Provided by VK_EXT_graphics_pipeline_library + /// VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002, + /// // Provided by VK_AMD_shader_early_and_late_fragment_tests + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000, + /// // Provided by VK_KHR_fragment_shader_barycentric + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000203000, + /// // Provided by VK_KHR_fragment_shader_barycentric with VK_EXT_provoking_vertex + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000, + /// // Provided by VK_KHR_shader_subgroup_uniform_control_flow + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000, + /// // Provided by VK_NV_fragment_shading_rate_enums + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000, + /// // Provided by VK_NV_fragment_shading_rate_enums + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001, + /// // Provided by VK_NV_fragment_shading_rate_enums + /// VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002, + /// // Provided by VK_NV_ray_tracing_motion_blur + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000, + /// // Provided by VK_NV_ray_tracing_motion_blur + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001, + /// // Provided by VK_NV_ray_tracing_motion_blur + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002, + /// // Provided by VK_EXT_mesh_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000, + /// // Provided by VK_EXT_mesh_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001, + /// // Provided by VK_EXT_ycbcr_2plane_444_formats + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000, + /// // Provided by VK_EXT_fragment_density_map2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000, + /// // Provided by VK_EXT_fragment_density_map2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001, + /// // Provided by VK_QCOM_rotated_copy_commands + /// VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000, + /// // Provided by VK_KHR_workgroup_memory_explicit_layout + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000, + /// // Provided by VK_EXT_image_compression_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000, + /// // Provided by VK_EXT_image_compression_control + /// VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT = 1000338001, + /// // Provided by VK_EXT_image_compression_control + /// VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004, + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000, + /// // Provided by VK_EXT_4444_formats + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000, + /// // Provided by VK_EXT_device_fault + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000, + /// // Provided by VK_EXT_device_fault + /// VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT = 1000341001, + /// // Provided by VK_EXT_device_fault + /// VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT = 1000341002, + /// // Provided by VK_EXT_rgba10x6_formats + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000, + /// // Provided by VK_EXT_directfb_surface + /// VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000, + /// // Provided by VK_EXT_vertex_input_dynamic_state + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000, + /// // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state + /// VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001, + /// // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state + /// VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002, + /// // Provided by VK_EXT_physical_device_drm + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000, + /// // Provided by VK_EXT_device_address_binding_report + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000, + /// // Provided by VK_EXT_device_address_binding_report + /// VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001, + /// // Provided by VK_EXT_depth_clip_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000, + /// // Provided by VK_EXT_depth_clip_control + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001, + /// // Provided by VK_EXT_primitive_topology_list_restart + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000, + /// // Provided by VK_FUCHSIA_external_memory + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000, + /// // Provided by VK_FUCHSIA_external_memory + /// VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001, + /// // Provided by VK_FUCHSIA_external_memory + /// VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002, + /// // Provided by VK_FUCHSIA_external_semaphore + /// VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000, + /// // Provided by VK_FUCHSIA_external_semaphore + /// VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008, + /// // Provided by VK_FUCHSIA_buffer_collection + /// VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009, + /// // Provided by VK_HUAWEI_subpass_shading + /// VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000, + /// // Provided by VK_HUAWEI_subpass_shading + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001, + /// // Provided by VK_HUAWEI_subpass_shading + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002, + /// // Provided by VK_HUAWEI_invocation_mask + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000, + /// // Provided by VK_NV_external_memory_rdma + /// VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000, + /// // Provided by VK_NV_external_memory_rdma + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001, + /// // Provided by VK_EXT_pipeline_properties + /// VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000, + /// // Provided by VK_EXT_pipeline_properties + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001, + /// // Provided by VK_EXT_frame_boundary + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT = 1000375000, + /// // Provided by VK_EXT_frame_boundary + /// VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT = 1000375001, + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000, + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001, + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002, + /// // Provided by VK_EXT_extended_dynamic_state2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000, + /// // Provided by VK_QNX_screen_surface + /// VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000, + /// // Provided by VK_EXT_color_write_enable + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000, + /// // Provided by VK_EXT_color_write_enable + /// VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001, + /// // Provided by VK_EXT_primitives_generated_query + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000, + /// // Provided by VK_KHR_ray_tracing_maintenance1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000, + /// // Provided by VK_KHR_shader_untyped_pointers + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNTYPED_POINTERS_FEATURES_KHR = 1000387000, + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_RGB_CONVERSION_FEATURES_VALVE = 1000390000, + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_RGB_CONVERSION_CAPABILITIES_VALVE = 1000390001, + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_PROFILE_RGB_CONVERSION_INFO_VALVE = 1000390002, + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_RGB_CONVERSION_CREATE_INFO_VALVE = 1000390003, + /// // Provided by VK_EXT_image_view_min_lod + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000, + /// // Provided by VK_EXT_image_view_min_lod + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001, + /// // Provided by VK_EXT_multi_draw + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000, + /// // Provided by VK_EXT_multi_draw + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001, + /// // Provided by VK_EXT_image_2d_view_of_3d + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000, + /// // Provided by VK_EXT_shader_tile_image + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT = 1000395000, + /// // Provided by VK_EXT_shader_tile_image + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT = 1000395001, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT = 1000396000, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT = 1000396001, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT = 1000396002, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT = 1000396007, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008, + /// // Provided by VK_EXT_opacity_micromap + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV = 1000397000, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV = 1000397001, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_NV_displacement_micromap + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV = 1000397002, + /// #endif + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI = 1000404000, + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI = 1000404001, + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI = 1000404002, + /// // Provided by VK_EXT_border_color_swizzle + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000, + /// // Provided by VK_EXT_border_color_swizzle + /// VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001, + /// // Provided by VK_EXT_pageable_device_local_memory + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, + /// // Provided by VK_ARM_shader_core_properties + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000, + /// // Provided by VK_ARM_scheduling_controls + /// VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000, + /// // Provided by VK_ARM_scheduling_controls + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001, + /// // Provided by VK_ARM_scheduling_controls + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002, + /// // Provided by VK_ARM_scheduling_controls + /// VK_STRUCTURE_TYPE_DISPATCH_PARAMETERS_ARM = 1000417003, + /// // Provided by VK_ARM_scheduling_controls + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_DISPATCH_PARAMETERS_PROPERTIES_ARM = 1000417004, + /// // Provided by VK_EXT_image_sliced_view_of_3d + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000, + /// // Provided by VK_EXT_image_sliced_view_of_3d + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001, + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000, + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001, + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002, + /// // Provided by VK_EXT_non_seamless_cube_map + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000, + /// // Provided by VK_ARM_render_pass_striped + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM = 1000424000, + /// // Provided by VK_ARM_render_pass_striped + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM = 1000424001, + /// // Provided by VK_ARM_render_pass_striped + /// VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM = 1000424002, + /// // Provided by VK_ARM_render_pass_striped + /// VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM = 1000424003, + /// // Provided by VK_ARM_render_pass_striped + /// VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM = 1000424004, + /// // Provided by VK_NV_copy_memory_indirect + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000, + /// // Provided by VK_NV_device_generated_commands_compute + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV = 1000428000, + /// // Provided by VK_NV_device_generated_commands_compute + /// VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001, + /// // Provided by VK_NV_device_generated_commands_compute + /// VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002, + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV = 1000429008, + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV = 1000429009, + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV = 1000429010, + /// // Provided by VK_NV_linear_color_attachment + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000, + /// // Provided by VK_KHR_shader_maximal_reconvergence + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000, + /// // Provided by VK_EXT_image_compression_control_swapchain + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000, + /// // Provided by VK_QCOM_image_processing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000, + /// // Provided by VK_QCOM_image_processing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001, + /// // Provided by VK_QCOM_image_processing + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002, + /// // Provided by VK_EXT_nested_command_buffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT = 1000451000, + /// // Provided by VK_EXT_nested_command_buffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT = 1000451001, + /// // Provided by VK_OHOS_external_memory + /// VK_STRUCTURE_TYPE_NATIVE_BUFFER_USAGE_OHOS = 1000452000, + /// // Provided by VK_OHOS_external_memory + /// VK_STRUCTURE_TYPE_NATIVE_BUFFER_PROPERTIES_OHOS = 1000452001, + /// // Provided by VK_OHOS_external_memory + /// VK_STRUCTURE_TYPE_NATIVE_BUFFER_FORMAT_PROPERTIES_OHOS = 1000452002, + /// // Provided by VK_OHOS_external_memory + /// VK_STRUCTURE_TYPE_IMPORT_NATIVE_BUFFER_INFO_OHOS = 1000452003, + /// // Provided by VK_OHOS_external_memory + /// VK_STRUCTURE_TYPE_MEMORY_GET_NATIVE_BUFFER_INFO_OHOS = 1000452004, + /// // Provided by VK_OHOS_external_memory + /// VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_OHOS = 1000452005, + /// // Provided by VK_EXT_external_memory_acquire_unmodified + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT = 1000453000, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000, + /// // Provided by VK_EXT_extended_dynamic_state3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001, + /// // Provided by VK_EXT_subpass_merge_feedback + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000, + /// // Provided by VK_EXT_subpass_merge_feedback + /// VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT = 1000458001, + /// // Provided by VK_EXT_subpass_merge_feedback + /// VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002, + /// // Provided by VK_EXT_subpass_merge_feedback + /// VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003, + /// // Provided by VK_LUNARG_direct_driver_loading + /// VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG = 1000459000, + /// // Provided by VK_LUNARG_direct_driver_loading + /// VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG = 1000459001, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_CREATE_INFO_ARM = 1000460000, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_VIEW_CREATE_INFO_ARM = 1000460001, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_BIND_TENSOR_MEMORY_INFO_ARM = 1000460002, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_TENSOR_ARM = 1000460003, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TENSOR_PROPERTIES_ARM = 1000460004, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_FORMAT_PROPERTIES_ARM = 1000460005, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_DESCRIPTION_ARM = 1000460006, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_MEMORY_REQUIREMENTS_INFO_ARM = 1000460007, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_MEMORY_BARRIER_ARM = 1000460008, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TENSOR_FEATURES_ARM = 1000460009, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_DEVICE_TENSOR_MEMORY_REQUIREMENTS_ARM = 1000460010, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_COPY_TENSOR_INFO_ARM = 1000460011, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_COPY_ARM = 1000460012, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_DEPENDENCY_INFO_ARM = 1000460013, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_TENSOR_ARM = 1000460014, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_TENSOR_INFO_ARM = 1000460015, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_EXTERNAL_TENSOR_PROPERTIES_ARM = 1000460016, + /// // Provided by VK_ARM_tensors + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_TENSOR_CREATE_INFO_ARM = 1000460017, + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_TENSOR_FEATURES_ARM = 1000460018, + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_TENSOR_PROPERTIES_ARM = 1000460019, + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_DESCRIPTOR_GET_TENSOR_INFO_ARM = 1000460020, + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_CAPTURE_DESCRIPTOR_DATA_INFO_ARM = 1000460021, + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_TENSOR_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_ARM = 1000460022, + /// // Provided by VK_EXT_frame_boundary with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_FRAME_BOUNDARY_TENSORS_ARM = 1000460023, + /// // Provided by VK_EXT_shader_module_identifier + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000, + /// // Provided by VK_EXT_shader_module_identifier + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001, + /// // Provided by VK_EXT_shader_module_identifier + /// VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002, + /// // Provided by VK_EXT_shader_module_identifier + /// VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT = 1000462003, + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000342000, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005, + /// // Provided by VK_NV_optical_flow + /// VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010, + /// // Provided by VK_EXT_legacy_dithering + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000, + /// // Provided by VK_ANDROID_external_format_resolve + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000, + /// // Provided by VK_ANDROID_external_format_resolve + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001, + /// // Provided by VK_ANDROID_external_format_resolve + /// VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002, + /// // Provided by VK_AMD_anti_lag + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000, + /// // Provided by VK_AMD_anti_lag + /// VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD = 1000476001, + /// // Provided by VK_AMD_anti_lag + /// VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002, + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_dense_geometry_format + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DENSE_GEOMETRY_FORMAT_FEATURES_AMDX = 1000478000, + /// #endif + /// #ifdef VK_ENABLE_BETA_EXTENSIONS + /// // Provided by VK_AMDX_dense_geometry_format + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DENSE_GEOMETRY_FORMAT_TRIANGLES_DATA_AMDX = 1000478001, + /// #endif + /// // Provided by VK_KHR_present_id2 + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR = 1000479000, + /// // Provided by VK_KHR_present_id2 + /// VK_STRUCTURE_TYPE_PRESENT_ID_2_KHR = 1000479001, + /// // Provided by VK_KHR_present_id2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_2_FEATURES_KHR = 1000479002, + /// // Provided by VK_KHR_present_wait2 + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_WAIT_2_KHR = 1000480000, + /// // Provided by VK_KHR_present_wait2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_2_FEATURES_KHR = 1000480001, + /// // Provided by VK_KHR_present_wait2 + /// VK_STRUCTURE_TYPE_PRESENT_WAIT_2_INFO_KHR = 1000480002, + /// // Provided by VK_KHR_ray_tracing_position_fetch + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR = 1000481000, + /// // Provided by VK_EXT_shader_object + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT = 1000482000, + /// // Provided by VK_EXT_shader_object + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT = 1000482001, + /// // Provided by VK_EXT_shader_object + /// VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT = 1000482002, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR = 1000483000, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR = 1000483001, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR = 1000483002, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR = 1000483003, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR = 1000483004, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR = 1000483005, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR = 1000483006, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR = 1000483007, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR = 1000483008, + /// // Provided by VK_KHR_pipeline_binary + /// VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR = 1000483009, + /// // Provided by VK_QCOM_tile_properties + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000, + /// // Provided by VK_QCOM_tile_properties + /// VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM = 1000484001, + /// // Provided by VK_SEC_amigo_profiling + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000, + /// // Provided by VK_SEC_amigo_profiling + /// VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001, + /// // Provided by VK_KHR_surface_maintenance1 + /// VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR = 1000274000, + /// // Provided by VK_KHR_surface_maintenance1 + /// VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR = 1000274001, + /// // Provided by VK_KHR_surface_maintenance1 + /// VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR = 1000274002, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR = 1000275000, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_KHR = 1000275001, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_KHR = 1000275002, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_KHR = 1000275003, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_KHR = 1000275004, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_KHR = 1000275005, + /// // Provided by VK_QCOM_multiview_per_view_viewports + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM = 1000488000, + /// // Provided by VK_NV_ray_tracing_invocation_reorder + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000, + /// // Provided by VK_NV_ray_tracing_invocation_reorder + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001, + /// // Provided by VK_NV_cooperative_vector + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV = 1000491000, + /// // Provided by VK_NV_cooperative_vector + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV = 1000491001, + /// // Provided by VK_NV_cooperative_vector + /// VK_STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV = 1000491002, + /// // Provided by VK_NV_cooperative_vector + /// VK_STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV = 1000491004, + /// // Provided by VK_NV_extended_sparse_address_space + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV = 1000492000, + /// // Provided by VK_NV_extended_sparse_address_space + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV = 1000492001, + /// // Provided by VK_EXT_mutable_descriptor_type + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000, + /// // Provided by VK_EXT_mutable_descriptor_type + /// VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002, + /// // Provided by VK_EXT_legacy_vertex_attributes + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT = 1000495000, + /// // Provided by VK_EXT_legacy_vertex_attributes + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT = 1000495001, + /// // Provided by VK_EXT_layer_settings + /// VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000, + /// // Provided by VK_ARM_shader_core_builtins + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000, + /// // Provided by VK_ARM_shader_core_builtins + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001, + /// // Provided by VK_EXT_pipeline_library_group_handles + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT = 1000498000, + /// // Provided by VK_EXT_dynamic_rendering_unused_attachments + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT = 1000499000, + /// // Provided by VK_KHR_internally_synchronized_queues + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INTERNALLY_SYNCHRONIZED_QUEUES_FEATURES_KHR = 1000504000, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV = 1000505000, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV = 1000505001, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV = 1000505002, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV = 1000505003, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV = 1000505004, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV = 1000505005, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV = 1000505006, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV = 1000505007, + /// // Provided by VK_NV_low_latency2 + /// VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV = 1000505008, + /// // Provided by VK_KHR_cooperative_matrix + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR = 1000506000, + /// // Provided by VK_KHR_cooperative_matrix + /// VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506001, + /// // Provided by VK_KHR_cooperative_matrix + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CREATE_INFO_ARM = 1000507000, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_CREATE_INFO_ARM = 1000507001, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_ARM = 1000507002, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_ARM = 1000507003, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_MEMORY_REQUIREMENTS_INFO_ARM = 1000507004, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_BIND_DATA_GRAPH_PIPELINE_SESSION_MEMORY_INFO_ARM = 1000507005, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_FEATURES_ARM = 1000507006, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SHADER_MODULE_CREATE_INFO_ARM = 1000507007, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_PROPERTY_QUERY_RESULT_ARM = 1000507008, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_INFO_ARM = 1000507009, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_COMPILER_CONTROL_CREATE_INFO_ARM = 1000507010, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_REQUIREMENTS_INFO_ARM = 1000507011, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_BIND_POINT_REQUIREMENT_ARM = 1000507012, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_IDENTIFIER_CREATE_INFO_ARM = 1000507013, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_DISPATCH_INFO_ARM = 1000507014, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PROCESSING_ENGINE_CREATE_INFO_ARM = 1000507016, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_PROPERTIES_ARM = 1000507017, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROPERTIES_ARM = 1000507018, + /// // Provided by VK_ARM_data_graph + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_QUEUE_FAMILY_DATA_GRAPH_PROCESSING_ENGINE_INFO_ARM = 1000507019, + /// // Provided by VK_ARM_data_graph with VK_ARM_tensors + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_CONSTANT_TENSOR_SEMI_STRUCTURED_SPARSITY_INFO_ARM = 1000507015, + /// // Provided by VK_ARM_data_graph_instruction_set_tosa + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_TOSA_PROPERTIES_ARM = 1000508000, + /// // Provided by VK_QCOM_multiview_per_view_render_areas + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000, + /// // Provided by VK_QCOM_multiview_per_view_render_areas + /// VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001, + /// // Provided by VK_KHR_compute_shader_derivatives + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000201000, + /// // Provided by VK_KHR_compute_shader_derivatives + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR = 1000511000, + /// // Provided by VK_KHR_video_decode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000, + /// // Provided by VK_KHR_video_decode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001, + /// // Provided by VK_KHR_video_decode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003, + /// // Provided by VK_KHR_video_decode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004, + /// // Provided by VK_KHR_video_decode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR = 1000513000, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000513001, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR = 1000513002, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR = 1000513003, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR = 1000513004, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR = 1000513005, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR = 1000513006, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR = 1000513007, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR = 1000513008, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR = 1000513009, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR = 1000513010, + /// // Provided by VK_KHR_video_decode_vp9 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_DECODE_VP9_FEATURES_KHR = 1000514000, + /// // Provided by VK_KHR_video_decode_vp9 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_CAPABILITIES_KHR = 1000514001, + /// // Provided by VK_KHR_video_decode_vp9 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PICTURE_INFO_KHR = 1000514002, + /// // Provided by VK_KHR_video_decode_vp9 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PROFILE_INFO_KHR = 1000514003, + /// // Provided by VK_KHR_video_maintenance1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000, + /// // Provided by VK_KHR_video_maintenance1 + /// VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR = 1000515001, + /// // Provided by VK_NV_per_stage_descriptor_set + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000, + /// // Provided by VK_QCOM_image_processing2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000, + /// // Provided by VK_QCOM_image_processing2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001, + /// // Provided by VK_QCOM_image_processing2 + /// VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002, + /// // Provided by VK_QCOM_filter_cubic_weights + /// VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM = 1000519000, + /// // Provided by VK_QCOM_filter_cubic_weights + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM = 1000519001, + /// // Provided by VK_QCOM_filter_cubic_weights + /// VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM = 1000519002, + /// // Provided by VK_QCOM_ycbcr_degamma + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM = 1000520000, + /// // Provided by VK_QCOM_ycbcr_degamma + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001, + /// // Provided by VK_QCOM_filter_cubic_clamp + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000, + /// // Provided by VK_EXT_attachment_feedback_loop_dynamic_state + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000, + /// // Provided by VK_KHR_unified_image_layouts + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFIED_IMAGE_LAYOUTS_FEATURES_KHR = 1000527000, + /// // Provided by VK_KHR_unified_image_layouts with VK_EXT_attachment_feedback_loop_layout and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering) + /// VK_STRUCTURE_TYPE_ATTACHMENT_FEEDBACK_LOOP_INFO_EXT = 1000527001, + /// // Provided by VK_QNX_external_memory_screen_buffer + /// VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX = 1000529000, + /// // Provided by VK_QNX_external_memory_screen_buffer + /// VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001, + /// // Provided by VK_QNX_external_memory_screen_buffer + /// VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002, + /// // Provided by VK_QNX_external_memory_screen_buffer + /// VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX = 1000529003, + /// // Provided by VK_QNX_external_memory_screen_buffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004, + /// // Provided by VK_MSFT_layered_driver + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000, + /// // Provided by VK_KHR_calibrated_timestamps + /// VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR = 1000184000, + /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007, + /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer + /// VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008, + /// // Provided by VK_NV_descriptor_pool_overallocation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_MEMORY_HEAP_FEATURES_QCOM = 1000547000, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_MEMORY_HEAP_PROPERTIES_QCOM = 1000547001, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_STRUCTURE_TYPE_TILE_MEMORY_REQUIREMENTS_QCOM = 1000547002, + /// // Provided by VK_QCOM_tile_memory_heap + /// VK_STRUCTURE_TYPE_TILE_MEMORY_BIND_INFO_QCOM = 1000547003, + /// // Provided by VK_QCOM_tile_memory_heap with VK_QCOM_tile_properties + /// VK_STRUCTURE_TYPE_TILE_MEMORY_SIZE_INFO_QCOM = 1000547004, + /// // Provided by VK_KHR_copy_memory_indirect + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_KHR = 1000549000, + /// // Provided by VK_KHR_copy_memory_indirect + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_KHR = 1000426001, + /// // Provided by VK_KHR_copy_memory_indirect + /// VK_STRUCTURE_TYPE_COPY_MEMORY_INDIRECT_INFO_KHR = 1000549002, + /// // Provided by VK_KHR_copy_memory_indirect + /// VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INDIRECT_INFO_KHR = 1000549003, + /// // Provided by VK_EXT_memory_decompression + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_EXT = 1000427000, + /// // Provided by VK_EXT_memory_decompression + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_EXT = 1000427001, + /// // Provided by VK_EXT_memory_decompression + /// VK_STRUCTURE_TYPE_DECOMPRESS_MEMORY_INFO_EXT = 1000550002, + /// // Provided by VK_NV_display_stereo + /// VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV = 1000551000, + /// // Provided by VK_NV_display_stereo + /// VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV = 1000551001, + /// // Provided by VK_KHR_video_encode_intra_refresh + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_INTRA_REFRESH_CAPABILITIES_KHR = 1000552000, + /// // Provided by VK_KHR_video_encode_intra_refresh + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_INTRA_REFRESH_CREATE_INFO_KHR = 1000552001, + /// // Provided by VK_KHR_video_encode_intra_refresh + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_INTRA_REFRESH_INFO_KHR = 1000552002, + /// // Provided by VK_KHR_video_encode_intra_refresh + /// VK_STRUCTURE_TYPE_VIDEO_REFERENCE_INTRA_REFRESH_INFO_KHR = 1000552003, + /// // Provided by VK_KHR_video_encode_intra_refresh + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_INTRA_REFRESH_FEATURES_KHR = 1000552004, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553000, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553001, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR = 1000553002, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000553005, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR = 1000553009, + /// // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553003, + /// // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553004, + /// // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553006, + /// // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553007, + /// // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map + /// VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553008, + /// // Provided by VK_NV_raw_access_chains + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000, + /// // Provided by VK_NV_external_compute_queue + /// VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_DEVICE_CREATE_INFO_NV = 1000556000, + /// // Provided by VK_NV_external_compute_queue + /// VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_CREATE_INFO_NV = 1000556001, + /// // Provided by VK_NV_external_compute_queue + /// VK_STRUCTURE_TYPE_EXTERNAL_COMPUTE_QUEUE_DATA_PARAMS_NV = 1000556002, + /// // Provided by VK_NV_external_compute_queue + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_COMPUTE_QUEUE_PROPERTIES_NV = 1000556003, + /// // Provided by VK_KHR_shader_relaxed_extended_instruction + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000, + /// // Provided by VK_NV_command_buffer_inheritance + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000, + /// // Provided by VK_KHR_maintenance7 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000, + /// // Provided by VK_KHR_maintenance7 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001, + /// // Provided by VK_KHR_maintenance7 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002, + /// // Provided by VK_KHR_maintenance7 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR = 1000562003, + /// // Provided by VK_KHR_maintenance7 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004, + /// // Provided by VK_NV_shader_atomic_float16_vector + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000, + /// // Provided by VK_EXT_shader_replicated_composites + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000, + /// // Provided by VK_ARM_tensor_controls + /// VK_STRUCTURE_TYPE_TENSOR_EXPLICIT_TILING_FORMAT_PROPERTIES_ARM = 1000565000, + /// // Provided by VK_ARM_tensor_controls + /// VK_STRUCTURE_TYPE_TENSOR_ROLLING_BACKING_CREATE_INFO_ARM = 1000565001, + /// // Provided by VK_EXT_shader_float8 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT = 1000567000, + /// // Provided by VK_NV_ray_tracing_validation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV = 1000569000, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_PROPERTIES_NV = 1000569001, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_CLUSTERS_BOTTOM_LEVEL_INPUT_NV = 1000569002, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_TRIANGLE_CLUSTER_INPUT_NV = 1000569003, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_MOVE_OBJECTS_INPUT_NV = 1000569004, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_INPUT_INFO_NV = 1000569005, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_COMMANDS_INFO_NV = 1000569006, + /// // Provided by VK_NV_cluster_acceleration_structure + /// VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CLUSTER_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000569007, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_FEATURES_NV = 1000570000, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_PROPERTIES_NV = 1000570001, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_PARTITIONED_ACCELERATION_STRUCTURE_NV = 1000570002, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCES_INPUT_NV = 1000570003, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_STRUCTURE_TYPE_BUILD_PARTITIONED_ACCELERATION_STRUCTURE_INFO_NV = 1000570004, + /// // Provided by VK_NV_partitioned_acceleration_structure + /// VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_FLAGS_NV = 1000570005, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT = 1000572000, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT = 1000572001, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT = 1000572002, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT = 1000572003, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT = 1000572004, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT = 1000572006, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT = 1000572007, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT = 1000572008, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT = 1000572009, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT = 1000572010, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT = 1000572011, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013, + /// // Provided by VK_EXT_device_generated_commands + /// VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014, + /// // Provided by VK_KHR_device_fault + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_KHR = 1000573000, + /// // Provided by VK_KHR_device_fault + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_PROPERTIES_KHR = 1000573001, + /// // Provided by VK_KHR_device_fault + /// VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_KHR = 1000573002, + /// // Provided by VK_KHR_device_fault + /// VK_STRUCTURE_TYPE_DEVICE_FAULT_DEBUG_INFO_KHR = 1000573003, + /// // Provided by VK_KHR_maintenance8 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR = 1000574000, + /// // Provided by VK_KHR_maintenance8 + /// VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR = 1000574002, + /// // Provided by VK_MESA_image_alignment_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000, + /// // Provided by VK_MESA_image_alignment_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA = 1000575001, + /// // Provided by VK_MESA_image_alignment_control + /// VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA = 1000575002, + /// // Provided by VK_KHR_shader_fma + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FMA_FEATURES_KHR = 1000579000, + /// // Provided by VK_NV_push_constant_bank + /// VK_STRUCTURE_TYPE_PUSH_CONSTANT_BANK_INFO_NV = 1000580000, + /// // Provided by VK_NV_push_constant_bank + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_FEATURES_NV = 1000580001, + /// // Provided by VK_NV_push_constant_bank + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_CONSTANT_BANK_PROPERTIES_NV = 1000580002, + /// // Provided by VK_EXT_ray_tracing_invocation_reorder + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_EXT = 1000581000, + /// // Provided by VK_EXT_ray_tracing_invocation_reorder + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_EXT = 1000581001, + /// // Provided by VK_EXT_depth_clamp_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT = 1000582000, + /// // Provided by VK_EXT_depth_clamp_control + /// VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT = 1000582001, + /// // Provided by VK_KHR_maintenance9 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_FEATURES_KHR = 1000584000, + /// // Provided by VK_KHR_maintenance9 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_9_PROPERTIES_KHR = 1000584001, + /// // Provided by VK_KHR_maintenance9 + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_OWNERSHIP_TRANSFER_PROPERTIES_KHR = 1000584002, + /// // Provided by VK_KHR_video_maintenance2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_2_FEATURES_KHR = 1000586000, + /// // Provided by VK_KHR_video_decode_h264 with VK_KHR_video_maintenance2 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586001, + /// // Provided by VK_KHR_video_decode_h265 with VK_KHR_video_maintenance2 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586002, + /// // Provided by VK_KHR_video_decode_av1 with VK_KHR_video_maintenance2 + /// VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586003, + /// // Provided by VK_OHOS_surface + /// VK_STRUCTURE_TYPE_SURFACE_CREATE_INFO_OHOS = 1000685000, + /// // Provided by VK_HUAWEI_hdr_vivid + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HDR_VIVID_FEATURES_HUAWEI = 1000590000, + /// // Provided by VK_HUAWEI_hdr_vivid + /// VK_STRUCTURE_TYPE_HDR_VIVID_DYNAMIC_METADATA_HUAWEI = 1000590001, + /// // Provided by VK_NV_cooperative_matrix2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV = 1000593000, + /// // Provided by VK_NV_cooperative_matrix2 + /// VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV = 1000593001, + /// // Provided by VK_NV_cooperative_matrix2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV = 1000593002, + /// // Provided by VK_ARM_pipeline_opacity_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_OPACITY_MICROMAP_FEATURES_ARM = 1000596000, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_FEEDBACK_2_FEATURES_KHR = 1000598000, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_STRUCTURE_TYPE_VIDEO_ENCODE_FEEDBACK_2_CAPABILITIES_KHR = 1000598001, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_CREATE_INFO_KHR = 1000598002, + /// // Provided by VK_EXT_external_memory_metal + /// VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT = 1000602000, + /// // Provided by VK_EXT_external_memory_metal + /// VK_STRUCTURE_TYPE_MEMORY_METAL_HANDLE_PROPERTIES_EXT = 1000602001, + /// // Provided by VK_EXT_external_memory_metal + /// VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT = 1000602002, + /// // Provided by VK_KHR_depth_clamp_zero_one + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR = 1000421000, + /// // Provided by VK_ARM_performance_counters_by_region + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_COUNTERS_BY_REGION_FEATURES_ARM = 1000605000, + /// // Provided by VK_ARM_performance_counters_by_region + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_COUNTERS_BY_REGION_PROPERTIES_ARM = 1000605001, + /// // Provided by VK_ARM_performance_counters_by_region + /// VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_ARM = 1000605002, + /// // Provided by VK_ARM_performance_counters_by_region + /// VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_ARM = 1000605003, + /// // Provided by VK_ARM_performance_counters_by_region + /// VK_STRUCTURE_TYPE_RENDER_PASS_PERFORMANCE_COUNTERS_BY_REGION_BEGIN_INFO_ARM = 1000605004, + /// // Provided by VK_ARM_shader_instrumentation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INSTRUMENTATION_FEATURES_ARM = 1000607000, + /// // Provided by VK_ARM_shader_instrumentation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INSTRUMENTATION_PROPERTIES_ARM = 1000607001, + /// // Provided by VK_ARM_shader_instrumentation + /// VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_CREATE_INFO_ARM = 1000607002, + /// // Provided by VK_ARM_shader_instrumentation + /// VK_STRUCTURE_TYPE_SHADER_INSTRUMENTATION_METRIC_DESCRIPTION_ARM = 1000607003, + /// // Provided by VK_EXT_vertex_attribute_robustness + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT = 1000608000, + /// // Provided by VK_ARM_format_pack + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FORMAT_PACK_FEATURES_ARM = 1000609000, + /// // Provided by VK_VALVE_fragment_density_map_layered + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE = 1000611000, + /// // Provided by VK_VALVE_fragment_density_map_layered + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_PROPERTIES_VALVE = 1000611001, + /// // Provided by VK_VALVE_fragment_density_map_layered + /// VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE = 1000611002, + /// // Provided by VK_KHR_robustness2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR = 1000286000, + /// // Provided by VK_KHR_robustness2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR = 1000286001, + /// // Provided by VK_NV_present_metering + /// VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV = 1000613000, + /// // Provided by VK_NV_present_metering + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV = 1000613001, + /// // Provided by VK_EXT_multisampled_render_to_swapchain + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SWAPCHAIN_FEATURES_EXT = 1000616000, + /// // Provided by VK_EXT_multisampled_render_to_swapchain + /// VK_STRUCTURE_TYPE_SWAPCHAIN_FLAGS_SURFACE_CAPABILITIES_EXT = 1000616001, + /// // Provided by VK_EXT_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_EXT = 1000425000, + /// // Provided by VK_EXT_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_EXT = 1000425001, + /// // Provided by VK_EXT_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_EXT = 1000425002, + /// // Provided by VK_EXT_zero_initialize_device_memory + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_DEVICE_MEMORY_FEATURES_EXT = 1000620000, + /// // Provided by VK_KHR_present_mode_fifo_latest_ready + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_KHR = 1000361000, + /// // Provided by VK_KHR_opacity_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_KHR = 1000623000, + /// // Provided by VK_KHR_opacity_micromap + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_KHR = 1000623001, + /// // Provided by VK_KHR_opacity_micromap + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MICROMAP_DATA_KHR = 1000623002, + /// // Provided by VK_KHR_opacity_micromap + /// VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_KHR = 1000623003, + /// // Provided by VK_EXT_shader_64bit_indexing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_64_BIT_INDEXING_FEATURES_EXT = 1000627000, + /// // Provided by VK_EXT_custom_resolve + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_RESOLVE_FEATURES_EXT = 1000628000, + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_BEGIN_CUSTOM_RESOLVE_INFO_EXT = 1000628001, + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// VK_STRUCTURE_TYPE_CUSTOM_RESOLVE_CREATE_INFO_EXT = 1000628002, + /// // Provided by VK_QCOM_data_graph_model + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_MODEL_FEATURES_QCOM = 1000629000, + /// // Provided by VK_QCOM_data_graph_model + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_BUILTIN_MODEL_CREATE_INFO_QCOM = 1000629001, + /// // Provided by VK_KHR_maintenance10 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_10_FEATURES_KHR = 1000630000, + /// // Provided by VK_KHR_maintenance10 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_10_PROPERTIES_KHR = 1000630001, + /// // Provided by VK_KHR_maintenance10 + /// VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_FLAGS_INFO_KHR = 1000630002, + /// // Provided by VK_KHR_maintenance10 + /// VK_STRUCTURE_TYPE_RENDERING_END_INFO_KHR = 1000619003, + /// // Provided by VK_KHR_maintenance10 + /// VK_STRUCTURE_TYPE_RESOLVE_IMAGE_MODE_INFO_KHR = 1000630004, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_OPTICAL_FLOW_FEATURES_ARM = 1000631000, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_OPTICAL_FLOW_PROPERTIES_ARM = 1000631001, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_INFO_ARM = 1000631003, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_ARM = 1000631004, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_DISPATCH_INFO_ARM = 1000631005, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_OPTICAL_FLOW_CREATE_INFO_ARM = 1000631002, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_RESOURCE_INFO_IMAGE_LAYOUT_ARM = 1000631006, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CREATE_INFO_ARM = 1000631007, + /// // Provided by VK_ARM_data_graph_optical_flow + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SINGLE_NODE_CONNECTION_ARM = 1000631008, + /// // Provided by VK_EXT_shader_long_vector + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_FEATURES_EXT = 1000635000, + /// // Provided by VK_EXT_shader_long_vector + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_LONG_VECTOR_PROPERTIES_EXT = 1000635001, + /// // Provided by VK_SEC_pipeline_cache_incremental_mode + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CACHE_INCREMENTAL_MODE_FEATURES_SEC = 1000637000, + /// // Provided by VK_EXT_shader_uniform_buffer_unsized_array + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_UNIFORM_BUFFER_UNSIZED_ARRAY_FEATURES_EXT = 1000642000, + /// // Provided by VK_NV_compute_occupancy_priority + /// VK_STRUCTURE_TYPE_COMPUTE_OCCUPANCY_PRIORITY_PARAMETERS_NV = 1000645000, + /// // Provided by VK_NV_compute_occupancy_priority + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_OCCUPANCY_PRIORITY_FEATURES_NV = 1000645001, + /// // Provided by VK_KHR_maintenance11 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_11_FEATURES_KHR = 1000657000, + /// // Provided by VK_KHR_maintenance11 + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_OPTIMAL_IMAGE_TRANSFER_GRANULARITY_PROPERTIES_KHR = 1000657001, + /// // Provided by VK_EXT_shader_subgroup_partitioned + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_PARTITIONED_FEATURES_EXT = 1000662000, + /// // Provided by VK_SEC_ubm_surface + /// VK_STRUCTURE_TYPE_UBM_SURFACE_CREATE_INFO_SEC = 1000664000, + /// // Provided by VK_KHR_extended_flags + /// VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_4_KHR = 1000668000, + /// // Provided by VK_KHR_extended_flags + /// VK_STRUCTURE_TYPE_IMAGE_CREATE_FLAGS_2_CREATE_INFO_KHR = 1000668001, + /// // Provided by VK_KHR_extended_flags + /// VK_STRUCTURE_TYPE_IMAGE_USAGE_FLAGS_2_CREATE_INFO_KHR = 1000668002, + /// // Provided by VK_KHR_extended_flags + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_2_CREATE_INFO_KHR = 1000668003, + /// // Provided by VK_KHR_extended_flags + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_FLAGS_FEATURES_KHR = 1000668004, + /// // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_EXT_separate_stencil_usage + /// VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_2_CREATE_INFO_KHR = 1000668005, + /// // Provided by VK_KHR_extended_flags with VK_KHR_shared_presentable_image + /// VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_2_KHR = 1000668006, + /// // Provided by VK_EXT_shader_ocp_microscaling_types + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OCP_MICROSCALING_TYPES_FEATURES_EXT = 1000672000, + /// // Provided by VK_VALVE_shader_mixed_float_dot_product + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MIXED_FLOAT_DOT_PRODUCT_FEATURES_VALVE = 1000673000, + /// // Provided by VK_SEC_throttle_hint + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_THROTTLE_HINT_FEATURES_SEC = 1000674000, + /// // Provided by VK_SEC_throttle_hint + /// VK_STRUCTURE_TYPE_THROTTLE_HINT_SUBMIT_INFO_SEC = 1000674001, + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_NEURAL_STATISTICS_CREATE_INFO_ARM = 1000676000, + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// VK_STRUCTURE_TYPE_DATA_GRAPH_PIPELINE_SESSION_NEURAL_STATISTICS_CREATE_INFO_ARM = 1000676001, + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DATA_GRAPH_NEURAL_ACCELERATOR_STATISTICS_FEATURES_ARM = 1000676002, + /// // Provided by VK_EXT_primitive_restart_index + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_RESTART_INDEX_FEATURES_EXT = 1000678000, + /// // Provided by VK_NV_cooperative_matrix_decode_vector + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_DECODE_VECTOR_FEATURES_NV = 1000689000, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, + /// // Provided by VK_VERSION_1_1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, + /// // Provided by VK_EXT_debug_report + /// // VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT is a legacy alias + /// VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INFO, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES, + /// // Provided by VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO, + /// // Provided by VK_KHR_multiview + /// VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, + /// // Provided by VK_KHR_multiview + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, + /// // Provided by VK_KHR_multiview + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, + /// // Provided by VK_KHR_get_physical_device_properties2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, + /// // Provided by VK_KHR_device_group + /// VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, + /// // Provided by VK_KHR_device_group + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, + /// // Provided by VK_KHR_device_group + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, + /// // Provided by VK_KHR_device_group + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, + /// // Provided by VK_KHR_device_group + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, + /// // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group + /// VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, + /// // Provided by VK_KHR_bind_memory2 with VK_KHR_device_group + /// VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, + /// // Provided by VK_EXT_texture_compression_astc_hdr + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES, + /// // Provided by VK_EXT_pipeline_robustness + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES, + /// // Provided by VK_KHR_device_group_creation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, + /// // Provided by VK_KHR_device_group_creation + /// VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, + /// // Provided by VK_KHR_external_memory_capabilities + /// VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, + /// // Provided by VK_KHR_external_fence_capabilities, VK_KHR_external_memory_capabilities, VK_KHR_external_semaphore_capabilities + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, + /// // Provided by VK_KHR_external_memory + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, + /// // Provided by VK_KHR_external_memory + /// VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, + /// // Provided by VK_KHR_external_memory + /// VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, + /// // Provided by VK_KHR_external_semaphore_capabilities + /// VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, + /// // Provided by VK_KHR_external_semaphore + /// VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, + /// // Provided by VK_KHR_push_descriptor + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES, + /// // Provided by VK_KHR_shader_float16_int8 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, + /// // Provided by VK_KHR_shader_float16_int8 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, + /// // Provided by VK_KHR_16bit_storage + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, + /// // Provided by VK_KHR_descriptor_update_template + /// VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, + /// // Provided by VK_EXT_display_surface_counter + /// // VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT is a legacy alias + /// VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, + /// // Provided by VK_KHR_imageless_framebuffer + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES, + /// // Provided by VK_KHR_imageless_framebuffer + /// VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO, + /// // Provided by VK_KHR_imageless_framebuffer + /// VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO, + /// // Provided by VK_KHR_imageless_framebuffer + /// VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO, + /// // Provided by VK_KHR_create_renderpass2 + /// VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, + /// // Provided by VK_KHR_external_fence_capabilities + /// VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, + /// // Provided by VK_KHR_external_fence + /// VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, + /// // Provided by VK_KHR_maintenance2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, + /// // Provided by VK_KHR_maintenance2 + /// VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, + /// // Provided by VK_KHR_maintenance2 + /// VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, + /// // Provided by VK_KHR_maintenance2 + /// VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, + /// // Provided by VK_KHR_variable_pointers + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, + /// // Provided by VK_KHR_variable_pointers + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR, + /// // Provided by VK_KHR_dedicated_allocation + /// VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, + /// // Provided by VK_KHR_dedicated_allocation + /// VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, + /// // Provided by VK_EXT_sampler_filter_minmax + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, + /// // Provided by VK_EXT_sampler_filter_minmax + /// VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO, + /// // Provided by VK_EXT_inline_uniform_block + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES, + /// // Provided by VK_EXT_inline_uniform_block + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES, + /// // Provided by VK_EXT_inline_uniform_block + /// VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK, + /// // Provided by VK_EXT_inline_uniform_block + /// VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO, + /// // Provided by VK_KHR_get_memory_requirements2 + /// VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, + /// // Provided by VK_KHR_get_memory_requirements2 + /// VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, + /// // Provided by VK_KHR_get_memory_requirements2 + /// VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, + /// // Provided by VK_KHR_get_memory_requirements2 + /// VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, + /// // Provided by VK_KHR_get_memory_requirements2 + /// VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, + /// // Provided by VK_KHR_image_format_list + /// VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, + /// // Provided by VK_NV_framebuffer_mixed_samples with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, + /// // Provided by VK_KHR_sampler_ycbcr_conversion + /// VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, + /// // Provided by VK_KHR_bind_memory2 + /// VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, + /// // Provided by VK_KHR_bind_memory2 + /// VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO, + /// // Provided by VK_EXT_descriptor_indexing + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT, + /// // Provided by VK_KHR_maintenance3 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, + /// // Provided by VK_KHR_maintenance3 + /// VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, + /// // Provided by VK_EXT_global_priority + /// VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, + /// // Provided by VK_KHR_shader_subgroup_extended_types + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES, + /// // Provided by VK_KHR_8bit_storage + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, + /// // Provided by VK_KHR_shader_atomic_int64 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, + /// // Provided by VK_EXT_calibrated_timestamps + /// VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, + /// // Provided by VK_KHR_global_priority + /// VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, + /// // Provided by VK_KHR_global_priority + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, + /// // Provided by VK_KHR_global_priority + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, + /// // Provided by VK_EXT_vertex_attribute_divisor + /// VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, + /// // Provided by VK_EXT_vertex_attribute_divisor + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, + /// // Provided by VK_EXT_pipeline_creation_feedback + /// VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO, + /// // Provided by VK_KHR_driver_properties + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, + /// // Provided by VK_KHR_shader_float_controls + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, + /// // Provided by VK_KHR_depth_stencil_resolve + /// VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE, + /// // Provided by VK_NV_compute_shader_derivatives + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR, + /// // Provided by VK_NV_fragment_shader_barycentric + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, + /// // Provided by VK_KHR_timeline_semaphore + /// VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, + /// // Provided by VK_INTEL_performance_query + /// // VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL is a legacy alias + /// VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL, + /// // Provided by VK_KHR_vulkan_memory_model + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES, + /// // Provided by VK_KHR_shader_terminate_invocation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES, + /// // Provided by VK_EXT_scalar_block_layout + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES, + /// // Provided by VK_EXT_subgroup_size_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES, + /// // Provided by VK_EXT_subgroup_size_control + /// VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, + /// // Provided by VK_EXT_subgroup_size_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES, + /// // Provided by VK_KHR_dynamic_rendering_local_read + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES, + /// // Provided by VK_KHR_dynamic_rendering_local_read + /// VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO, + /// // Provided by VK_KHR_dynamic_rendering_local_read + /// VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT, + /// // Provided by VK_KHR_separate_depth_stencil_layouts + /// VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT, + /// // Provided by VK_EXT_buffer_device_address + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, + /// // Provided by VK_EXT_buffer_device_address + /// VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, + /// // Provided by VK_EXT_tooling_info + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, + /// // Provided by VK_EXT_separate_stencil_usage + /// VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO, + /// // Provided by VK_KHR_uniform_buffer_standard_layout + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES, + /// // Provided by VK_KHR_buffer_device_address + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, + /// // Provided by VK_KHR_buffer_device_address + /// VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, + /// // Provided by VK_KHR_buffer_device_address + /// VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO, + /// // Provided by VK_KHR_buffer_device_address + /// VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, + /// // Provided by VK_KHR_buffer_device_address + /// VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO, + /// // Provided by VK_EXT_line_rasterization + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, + /// // Provided by VK_EXT_line_rasterization + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, + /// // Provided by VK_EXT_line_rasterization + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, + /// // Provided by VK_EXT_host_query_reset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, + /// // Provided by VK_EXT_index_type_uint8 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE, + /// // Provided by VK_EXT_host_image_copy + /// VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY, + /// // Provided by VK_KHR_map_memory2 + /// VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO, + /// // Provided by VK_KHR_map_memory2 + /// VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO, + /// // Provided by VK_EXT_surface_maintenance1 + /// VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR, + /// // Provided by VK_EXT_surface_maintenance1 + /// VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR, + /// // Provided by VK_EXT_surface_maintenance1 + /// VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_KHR, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_KHR, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_KHR, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_KHR, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_KHR, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_EXT = VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_KHR, + /// // Provided by VK_EXT_shader_demote_to_helper_invocation + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES, + /// // Provided by VK_KHR_shader_integer_dot_product + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES, + /// // Provided by VK_KHR_shader_integer_dot_product + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES, + /// // Provided by VK_EXT_texel_buffer_alignment + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES, + /// // Provided by VK_EXT_robustness2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_KHR, + /// // Provided by VK_EXT_robustness2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_KHR, + /// // Provided by VK_EXT_private_data + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES, + /// // Provided by VK_EXT_private_data + /// VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO, + /// // Provided by VK_EXT_private_data + /// VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO, + /// // Provided by VK_EXT_pipeline_creation_cache_control + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR = VK_STRUCTURE_TYPE_SUBMIT_INFO_2, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO, + /// // Provided by VK_KHR_synchronization2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES, + /// // Provided by VK_KHR_zero_initialize_workgroup_memory + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES, + /// // Provided by VK_EXT_image_robustness + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_COPY_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_IMAGE_COPY_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2, + /// // Provided by VK_KHR_copy_commands2 + /// VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2, + /// // Provided by VK_EXT_image_compression_control + /// VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, + /// // Provided by VK_EXT_image_compression_control + /// VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT, + /// // Provided by VK_VALVE_mutable_descriptor_type + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT, + /// // Provided by VK_VALVE_mutable_descriptor_type + /// VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT, + /// // Provided by VK_KHR_format_feature_flags2 + /// VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3, + /// // Provided by VK_EXT_present_mode_fifo_latest_ready + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_KHR, + /// // Provided by VK_EXT_pipeline_properties + /// VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR, + /// // Provided by VK_EXT_global_priority_query + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, + /// // Provided by VK_EXT_global_priority_query + /// VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, + /// // Provided by VK_KHR_maintenance4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES, + /// // Provided by VK_KHR_maintenance4 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES, + /// // Provided by VK_KHR_maintenance4 + /// VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS, + /// // Provided by VK_KHR_maintenance4 + /// VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS, + /// // Provided by VK_KHR_shader_subgroup_rotate + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES, + /// // Provided by VK_EXT_depth_clamp_zero_one + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR, + /// // Provided by VK_QCOM_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_EXT, + /// // Provided by VK_QCOM_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_EXT, + /// // Provided by VK_QCOM_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_EXT, + /// // Provided by VK_NV_copy_memory_indirect + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_KHR, + /// // Provided by VK_NV_memory_decompression + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_EXT, + /// // Provided by VK_NV_memory_decompression + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_EXT, + /// // Provided by VK_EXT_pipeline_protected_access + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES, + /// // Provided by VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES, + /// // Provided by VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES, + /// // Provided by VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO, + /// // Provided by VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO, + /// // Provided by VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, + /// // Provided by VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO, + /// // Provided by VK_KHR_extended_flags, VK_KHR_maintenance5 + /// VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO, + /// // Provided by VK_EXT_shader_object + /// VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, + /// // Provided by VK_KHR_vertex_attribute_divisor + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES, + /// // Provided by VK_KHR_vertex_attribute_divisor + /// VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, + /// // Provided by VK_KHR_vertex_attribute_divisor + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, + /// // Provided by VK_KHR_shader_float_controls2 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES, + /// // Provided by VK_KHR_index_type_uint8 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, + /// // Provided by VK_KHR_line_rasterization + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, + /// // Provided by VK_KHR_line_rasterization + /// VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, + /// // Provided by VK_KHR_line_rasterization + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, + /// // Provided by VK_KHR_shader_expect_assume + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES, + /// // Provided by VK_KHR_maintenance6 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES, + /// // Provided by VK_KHR_maintenance6 + /// VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES, + /// // Provided by VK_KHR_maintenance6 + /// VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS, + /// // Provided by VK_KHR_maintenance6 + /// VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO, + /// // Provided by VK_KHR_maintenance6 + /// VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO, + /// // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor + /// VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO, + /// // Provided by VK_KHR_maintenance6 with VK_KHR_push_descriptor + /// VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO, + /// // Provided by VK_EXT_fragment_density_map_offset + /// VK_STRUCTURE_TYPE_RENDERING_END_INFO_EXT = VK_STRUCTURE_TYPE_RENDERING_END_INFO_KHR, + /// } VkStructureType; + /// + /// + public enum VkStructureType : int + { + /// + /// ApplicationInfo + /// + ApplicationInfo = 0, + + /// + /// InstanceCreateInfo + /// + InstanceCreateInfo = 1, + + /// + /// DeviceQueueCreateInfo + /// + DeviceQueueCreateInfo = 2, + + /// + /// DeviceCreateInfo + /// + DeviceCreateInfo = 3, + + /// + /// SubmitInfo + /// + SubmitInfo = 4, + + /// + /// MemoryAllocateInfo + /// + MemoryAllocateInfo = 5, + + /// + /// MappedMemoryRange + /// + MappedMemoryRange = 6, + + /// + /// BindSparseInfo + /// + BindSparseInfo = 7, + + /// + /// FenceCreateInfo + /// + FenceCreateInfo = 8, + + /// + /// SemaphoreCreateInfo + /// + SemaphoreCreateInfo = 9, + + /// + /// EventCreateInfo + /// + EventCreateInfo = 10, + + /// + /// QueryPoolCreateInfo + /// + QueryPoolCreateInfo = 11, + + /// + /// BufferCreateInfo + /// + BufferCreateInfo = 12, + + /// + /// BufferViewCreateInfo + /// + BufferViewCreateInfo = 13, + + /// + /// ImageCreateInfo + /// + ImageCreateInfo = 14, + + /// + /// ImageViewCreateInfo + /// + ImageViewCreateInfo = 15, + + /// + /// ShaderModuleCreateInfo + /// + ShaderModuleCreateInfo = 16, + + /// + /// PipelineCacheCreateInfo + /// + PipelineCacheCreateInfo = 17, + + /// + /// PipelineShaderStageCreateInfo + /// + PipelineShaderStageCreateInfo = 18, + + /// + /// PipelineVertexInputStateCreateInfo + /// + PipelineVertexInputStateCreateInfo = 19, + + /// + /// PipelineInputAssemblyStateCreateInfo + /// + PipelineInputAssemblyStateCreateInfo = 20, + + /// + /// PipelineTessellationStateCreateInfo + /// + PipelineTessellationStateCreateInfo = 21, + + /// + /// PipelineViewportStateCreateInfo + /// + PipelineViewportStateCreateInfo = 22, + + /// + /// PipelineRasterizationStateCreateInfo + /// + PipelineRasterizationStateCreateInfo = 23, + + /// + /// PipelineMultisampleStateCreateInfo + /// + PipelineMultisampleStateCreateInfo = 24, + + /// + /// PipelineDepthStencilStateCreateInfo + /// + PipelineDepthStencilStateCreateInfo = 25, + + /// + /// PipelineColorBlendStateCreateInfo + /// + PipelineColorBlendStateCreateInfo = 26, + + /// + /// PipelineDynamicStateCreateInfo + /// + PipelineDynamicStateCreateInfo = 27, + + /// + /// GraphicsPipelineCreateInfo + /// + GraphicsPipelineCreateInfo = 28, + + /// + /// ComputePipelineCreateInfo + /// + ComputePipelineCreateInfo = 29, + + /// + /// PipelineLayoutCreateInfo + /// + PipelineLayoutCreateInfo = 30, + + /// + /// SamplerCreateInfo + /// + SamplerCreateInfo = 31, + + /// + /// DescriptorSetLayoutCreateInfo + /// + DescriptorSetLayoutCreateInfo = 32, + + /// + /// DescriptorPoolCreateInfo + /// + DescriptorPoolCreateInfo = 33, + + /// + /// DescriptorSetAllocateInfo + /// + DescriptorSetAllocateInfo = 34, + + /// + /// WriteDescriptorSet + /// + WriteDescriptorSet = 35, + + /// + /// CopyDescriptorSet + /// + CopyDescriptorSet = 36, + + /// + /// FramebufferCreateInfo + /// + FramebufferCreateInfo = 37, + + /// + /// RenderPassCreateInfo + /// + RenderPassCreateInfo = 38, + + /// + /// CommandPoolCreateInfo + /// + CommandPoolCreateInfo = 39, + + /// + /// CommandBufferAllocateInfo + /// + CommandBufferAllocateInfo = 40, + + /// + /// CommandBufferInheritanceInfo + /// + CommandBufferInheritanceInfo = 41, + + /// + /// CommandBufferBeginInfo + /// + CommandBufferBeginInfo = 42, + + /// + /// RenderPassBeginInfo + /// + RenderPassBeginInfo = 43, + + /// + /// BufferMemoryBarrier + /// + BufferMemoryBarrier = 44, + + /// + /// ImageMemoryBarrier + /// + ImageMemoryBarrier = 45, + + /// + /// MemoryBarrier + /// + MemoryBarrier = 46, + + /// + /// LoaderInstanceCreateInfo + /// + LoaderInstanceCreateInfo = 47, + + /// + /// LoaderDeviceCreateInfo + /// + LoaderDeviceCreateInfo = 48, + + /// + /// BindBufferMemoryInfo + /// + BindBufferMemoryInfo = 1000157000, + + /// + /// BindImageMemoryInfo + /// + BindImageMemoryInfo = 1000157001, + + /// + /// MemoryDedicatedRequirements + /// + MemoryDedicatedRequirements = 1000127000, + + /// + /// MemoryDedicatedAllocateInfo + /// + MemoryDedicatedAllocateInfo = 1000127001, + + /// + /// MemoryAllocateFlagsInfo + /// + MemoryAllocateFlagsInfo = 1000060000, + + /// + /// DeviceGroupCommandBufferBeginInfo + /// + DeviceGroupCommandBufferBeginInfo = 1000060004, + + /// + /// DeviceGroupSubmitInfo + /// + DeviceGroupSubmitInfo = 1000060005, + + /// + /// DeviceGroupBindSparseInfo + /// + DeviceGroupBindSparseInfo = 1000060006, + + /// + /// BindBufferMemoryDeviceGroupInfo + /// + BindBufferMemoryDeviceGroupInfo = 1000060013, + + /// + /// BindImageMemoryDeviceGroupInfo + /// + BindImageMemoryDeviceGroupInfo = 1000060014, + + /// + /// PhysicalDeviceGroupProperties + /// + PhysicalDeviceGroupProperties = 1000070000, + + /// + /// DeviceGroupDeviceCreateInfo + /// + DeviceGroupDeviceCreateInfo = 1000070001, + + /// + /// BufferMemoryRequirementsInfo2 + /// + BufferMemoryRequirementsInfo2 = 1000146000, + + /// + /// ImageMemoryRequirementsInfo2 + /// + ImageMemoryRequirementsInfo2 = 1000146001, + + /// + /// ImageSparseMemoryRequirementsInfo2 + /// + ImageSparseMemoryRequirementsInfo2 = 1000146002, + + /// + /// MemoryRequirements2 + /// + MemoryRequirements2 = 1000146003, + + /// + /// SparseImageMemoryRequirements2 + /// + SparseImageMemoryRequirements2 = 1000146004, + + /// + /// PhysicalDeviceFeatures2 + /// + PhysicalDeviceFeatures2 = 1000059000, + + /// + /// PhysicalDeviceProperties2 + /// + PhysicalDeviceProperties2 = 1000059001, + + /// + /// FormatProperties2 + /// + FormatProperties2 = 1000059002, + + /// + /// ImageFormatProperties2 + /// + ImageFormatProperties2 = 1000059003, + + /// + /// PhysicalDeviceImageFormatInfo2 + /// + PhysicalDeviceImageFormatInfo2 = 1000059004, + + /// + /// QueueFamilyProperties2 + /// + QueueFamilyProperties2 = 1000059005, + + /// + /// PhysicalDeviceMemoryProperties2 + /// + PhysicalDeviceMemoryProperties2 = 1000059006, + + /// + /// SparseImageFormatProperties2 + /// + SparseImageFormatProperties2 = 1000059007, + + /// + /// PhysicalDeviceSparseImageFormatInfo2 + /// + PhysicalDeviceSparseImageFormatInfo2 = 1000059008, + + /// + /// ImageViewUsageCreateInfo + /// + ImageViewUsageCreateInfo = 1000117002, + + /// + /// ProtectedSubmitInfo + /// + ProtectedSubmitInfo = 1000145000, + + /// + /// PhysicalDeviceProtectedMemoryFeatures + /// + PhysicalDeviceProtectedMemoryFeatures = 1000145001, + + /// + /// PhysicalDeviceProtectedMemoryProperties + /// + PhysicalDeviceProtectedMemoryProperties = 1000145002, + + /// + /// DeviceQueueInfo2 + /// + DeviceQueueInfo2 = 1000145003, + + /// + /// PhysicalDeviceExternalImageFormatInfo + /// + PhysicalDeviceExternalImageFormatInfo = 1000071000, + + /// + /// ExternalImageFormatProperties + /// + ExternalImageFormatProperties = 1000071001, + + /// + /// PhysicalDeviceExternalBufferInfo + /// + PhysicalDeviceExternalBufferInfo = 1000071002, + + /// + /// ExternalBufferProperties + /// + ExternalBufferProperties = 1000071003, + + /// + /// PhysicalDeviceIdProperties + /// + PhysicalDeviceIdProperties = 1000071004, + + /// + /// ExternalMemoryBufferCreateInfo + /// + ExternalMemoryBufferCreateInfo = 1000072000, + + /// + /// ExternalMemoryImageCreateInfo + /// + ExternalMemoryImageCreateInfo = 1000072001, + + /// + /// ExportMemoryAllocateInfo + /// + ExportMemoryAllocateInfo = 1000072002, + + /// + /// PhysicalDeviceExternalFenceInfo + /// + PhysicalDeviceExternalFenceInfo = 1000112000, + + /// + /// ExternalFenceProperties + /// + ExternalFenceProperties = 1000112001, + + /// + /// ExportFenceCreateInfo + /// + ExportFenceCreateInfo = 1000113000, + + /// + /// ExportSemaphoreCreateInfo + /// + ExportSemaphoreCreateInfo = 1000077000, + + /// + /// PhysicalDeviceExternalSemaphoreInfo + /// + PhysicalDeviceExternalSemaphoreInfo = 1000076000, + + /// + /// ExternalSemaphoreProperties + /// + ExternalSemaphoreProperties = 1000076001, + + /// + /// PhysicalDeviceSubgroupProperties + /// + PhysicalDeviceSubgroupProperties = 1000094000, + + /// + /// PhysicalDevice16BitStorageFeatures + /// + PhysicalDevice16BitStorageFeatures = 1000083000, + + /// + /// PhysicalDeviceVariablePointersFeatures + /// + PhysicalDeviceVariablePointersFeatures = 1000120000, + + /// + /// DescriptorUpdateTemplateCreateInfo + /// + DescriptorUpdateTemplateCreateInfo = 1000085000, + + /// + /// PhysicalDeviceMaintenance3Properties + /// + PhysicalDeviceMaintenance3Properties = 1000168000, + + /// + /// DescriptorSetLayoutSupport + /// + DescriptorSetLayoutSupport = 1000168001, + + /// + /// SamplerYCbCrConversionCreateInfo + /// + SamplerYCbCrConversionCreateInfo = 1000156000, + + /// + /// SamplerYCbCrConversionInfo + /// + SamplerYCbCrConversionInfo = 1000156001, + + /// + /// BindImagePlaneMemoryInfo + /// + BindImagePlaneMemoryInfo = 1000156002, + + /// + /// ImagePlaneMemoryRequirementsInfo + /// + ImagePlaneMemoryRequirementsInfo = 1000156003, + + /// + /// PhysicalDeviceSamplerYCbCrConversionFeatures + /// + PhysicalDeviceSamplerYCbCrConversionFeatures = 1000156004, + + /// + /// SamplerYCbCrConversionImageFormatProperties + /// + SamplerYCbCrConversionImageFormatProperties = 1000156005, + + /// + /// DeviceGroupRenderPassBeginInfo + /// + DeviceGroupRenderPassBeginInfo = 1000060003, + + /// + /// PhysicalDevicePointClippingProperties + /// + PhysicalDevicePointClippingProperties = 1000117000, + + /// + /// RenderPassInputAttachmentAspectCreateInfo + /// + RenderPassInputAttachmentAspectCreateInfo = 1000117001, + + /// + /// PipelineTessellationDomainOriginStateCreateInfo + /// + PipelineTessellationDomainOriginStateCreateInfo = 1000117003, + + /// + /// RenderPassMultiviewCreateInfo + /// + RenderPassMultiviewCreateInfo = 1000053000, + + /// + /// PhysicalDeviceMultiviewFeatures + /// + PhysicalDeviceMultiviewFeatures = 1000053001, + + /// + /// PhysicalDeviceMultiviewProperties + /// + PhysicalDeviceMultiviewProperties = 1000053002, + + /// + /// PhysicalDeviceShaderDrawParametersFeatures + /// + PhysicalDeviceShaderDrawParametersFeatures = 1000063000, + + /// + /// PhysicalDeviceDriverProperties + /// + PhysicalDeviceDriverProperties = 1000196000, + + /// + /// PhysicalDeviceVulkan11Features + /// + PhysicalDeviceVulkan11Features = 49, + + /// + /// PhysicalDeviceVulkan11Properties + /// + PhysicalDeviceVulkan11Properties = 50, + + /// + /// PhysicalDeviceVulkan12Features + /// + PhysicalDeviceVulkan12Features = 51, + + /// + /// PhysicalDeviceVulkan12Properties + /// + PhysicalDeviceVulkan12Properties = 52, + + /// + /// ImageFormatListCreateInfo + /// + ImageFormatListCreateInfo = 1000147000, + + /// + /// PhysicalDeviceVulkanMemoryModelFeatures + /// + PhysicalDeviceVulkanMemoryModelFeatures = 1000211000, + + /// + /// PhysicalDeviceHostQueryResetFeatures + /// + PhysicalDeviceHostQueryResetFeatures = 1000261000, + + /// + /// PhysicalDeviceTimelineSemaphoreFeatures + /// + PhysicalDeviceTimelineSemaphoreFeatures = 1000207000, + + /// + /// PhysicalDeviceTimelineSemaphoreProperties + /// + PhysicalDeviceTimelineSemaphoreProperties = 1000207001, + + /// + /// SemaphoreTypeCreateInfo + /// + SemaphoreTypeCreateInfo = 1000207002, + + /// + /// TimelineSemaphoreSubmitInfo + /// + TimelineSemaphoreSubmitInfo = 1000207003, + + /// + /// SemaphoreWaitInfo + /// + SemaphoreWaitInfo = 1000207004, + + /// + /// SemaphoreSignalInfo + /// + SemaphoreSignalInfo = 1000207005, + + /// + /// PhysicalDeviceBufferDeviceAddressFeatures + /// + PhysicalDeviceBufferDeviceAddressFeatures = 1000257000, + + /// + /// BufferDeviceAddressInfo + /// + BufferDeviceAddressInfo = 1000244001, + + /// + /// BufferOpaqueCaptureAddressCreateInfo + /// + BufferOpaqueCaptureAddressCreateInfo = 1000257002, + + /// + /// MemoryOpaqueCaptureAddressAllocateInfo + /// + MemoryOpaqueCaptureAddressAllocateInfo = 1000257003, + + /// + /// DeviceMemoryOpaqueCaptureAddressInfo + /// + DeviceMemoryOpaqueCaptureAddressInfo = 1000257004, + + /// + /// PhysicalDevice8BitStorageFeatures + /// + PhysicalDevice8BitStorageFeatures = 1000177000, + + /// + /// PhysicalDeviceShaderAtomicInt64Features + /// + PhysicalDeviceShaderAtomicInt64Features = 1000180000, + + /// + /// PhysicalDeviceShaderFloat16Int8Features + /// + PhysicalDeviceShaderFloat16Int8Features = 1000082000, + + /// + /// PhysicalDeviceFloatControlsProperties + /// + PhysicalDeviceFloatControlsProperties = 1000197000, + + /// + /// DescriptorSetLayoutBindingFlagsCreateInfo + /// + DescriptorSetLayoutBindingFlagsCreateInfo = 1000161000, + + /// + /// PhysicalDeviceDescriptorIndexingFeatures + /// + PhysicalDeviceDescriptorIndexingFeatures = 1000161001, + + /// + /// PhysicalDeviceDescriptorIndexingProperties + /// + PhysicalDeviceDescriptorIndexingProperties = 1000161002, + + /// + /// DescriptorSetVariableDescriptorCountAllocateInfo + /// + DescriptorSetVariableDescriptorCountAllocateInfo = 1000161003, + + /// + /// DescriptorSetVariableDescriptorCountLayoutSupport + /// + DescriptorSetVariableDescriptorCountLayoutSupport = 1000161004, + + /// + /// PhysicalDeviceScalarBlockLayoutFeatures + /// + PhysicalDeviceScalarBlockLayoutFeatures = 1000221000, + + /// + /// PhysicalDeviceSamplerFilterMinmaxProperties + /// + PhysicalDeviceSamplerFilterMinmaxProperties = 1000130000, + + /// + /// SamplerReductionModeCreateInfo + /// + SamplerReductionModeCreateInfo = 1000130001, + + /// + /// PhysicalDeviceUniformBufferStandardLayoutFeatures + /// + PhysicalDeviceUniformBufferStandardLayoutFeatures = 1000253000, + + /// + /// PhysicalDeviceShaderSubgroupExtendedTypesFeatures + /// + PhysicalDeviceShaderSubgroupExtendedTypesFeatures = 1000175000, + + /// + /// AttachmentDescription2 + /// + AttachmentDescription2 = 1000109000, + + /// + /// AttachmentReference2 + /// + AttachmentReference2 = 1000109001, + + /// + /// SubpassDescription2 + /// + SubpassDescription2 = 1000109002, + + /// + /// SubpassDependency2 + /// + SubpassDependency2 = 1000109003, + + /// + /// RenderPassCreateInfo2 + /// + RenderPassCreateInfo2 = 1000109004, + + /// + /// SubpassBeginInfo + /// + SubpassBeginInfo = 1000109005, + + /// + /// SubpassEndInfo + /// + SubpassEndInfo = 1000109006, + + /// + /// PhysicalDeviceDepthStencilResolveProperties + /// + PhysicalDeviceDepthStencilResolveProperties = 1000199000, + + /// + /// SubpassDescriptionDepthStencilResolve + /// + SubpassDescriptionDepthStencilResolve = 1000199001, + + /// + /// ImageStencilUsageCreateInfo + /// + ImageStencilUsageCreateInfo = 1000246000, + + /// + /// PhysicalDeviceImagelessFramebufferFeatures + /// + PhysicalDeviceImagelessFramebufferFeatures = 1000108000, + + /// + /// FramebufferAttachmentsCreateInfo + /// + FramebufferAttachmentsCreateInfo = 1000108001, + + /// + /// FramebufferAttachmentImageInfo + /// + FramebufferAttachmentImageInfo = 1000108002, + + /// + /// RenderPassAttachmentBeginInfo + /// + RenderPassAttachmentBeginInfo = 1000108003, + + /// + /// PhysicalDeviceSeparateDepthStencilLayoutsFeatures + /// + PhysicalDeviceSeparateDepthStencilLayoutsFeatures = 1000241000, + + /// + /// AttachmentReferenceStencilLayout + /// + AttachmentReferenceStencilLayout = 1000241001, + + /// + /// AttachmentDescriptionStencilLayout + /// + AttachmentDescriptionStencilLayout = 1000241002, + + /// + /// PhysicalDeviceVulkan13Features + /// + PhysicalDeviceVulkan13Features = 53, + + /// + /// PhysicalDeviceVulkan13Properties + /// + PhysicalDeviceVulkan13Properties = 54, + + /// + /// PhysicalDeviceToolProperties + /// + PhysicalDeviceToolProperties = 1000245000, + + /// + /// PhysicalDevicePrivateDataFeatures + /// + PhysicalDevicePrivateDataFeatures = 1000295000, + + /// + /// DevicePrivateDataCreateInfo + /// + DevicePrivateDataCreateInfo = 1000295001, + + /// + /// PrivateDataSlotCreateInfo + /// + PrivateDataSlotCreateInfo = 1000295002, + + /// + /// MemoryBarrier2 + /// + MemoryBarrier2 = 1000314000, + + /// + /// BufferMemoryBarrier2 + /// + BufferMemoryBarrier2 = 1000314001, + + /// + /// ImageMemoryBarrier2 + /// + ImageMemoryBarrier2 = 1000314002, + + /// + /// DependencyInfo + /// + DependencyInfo = 1000314003, + + /// + /// SubmitInfo2 + /// + SubmitInfo2 = 1000314004, + + /// + /// SemaphoreSubmitInfo + /// + SemaphoreSubmitInfo = 1000314005, + + /// + /// CommandBufferSubmitInfo + /// + CommandBufferSubmitInfo = 1000314006, + + /// + /// PhysicalDeviceSynchronization2Features + /// + PhysicalDeviceSynchronization2Features = 1000314007, + + /// + /// CopyBufferInfo2 + /// + CopyBufferInfo2 = 1000337000, + + /// + /// CopyImageInfo2 + /// + CopyImageInfo2 = 1000337001, + + /// + /// CopyBufferToImageInfo2 + /// + CopyBufferToImageInfo2 = 1000337002, + + /// + /// CopyImageToBufferInfo2 + /// + CopyImageToBufferInfo2 = 1000337003, + + /// + /// BufferCopy2 + /// + BufferCopy2 = 1000337006, + + /// + /// ImageCopy2 + /// + ImageCopy2 = 1000337007, + + /// + /// BufferImageCopy2 + /// + BufferImageCopy2 = 1000337009, + + /// + /// PhysicalDeviceTextureCompressionAstcHdrFeatures + /// + PhysicalDeviceTextureCompressionAstcHdrFeatures = 1000066000, + + /// + /// FormatProperties3 + /// + FormatProperties3 = 1000360000, + + /// + /// PhysicalDeviceMaintenance4Features + /// + PhysicalDeviceMaintenance4Features = 1000413000, + + /// + /// PhysicalDeviceMaintenance4Properties + /// + PhysicalDeviceMaintenance4Properties = 1000413001, + + /// + /// DeviceBufferMemoryRequirements + /// + DeviceBufferMemoryRequirements = 1000413002, + + /// + /// DeviceImageMemoryRequirements + /// + DeviceImageMemoryRequirements = 1000413003, + + /// + /// PipelineCreationFeedbackCreateInfo + /// + PipelineCreationFeedbackCreateInfo = 1000192000, + + /// + /// PhysicalDeviceShaderTerminateInvocationFeatures + /// + PhysicalDeviceShaderTerminateInvocationFeatures = 1000215000, + + /// + /// PhysicalDeviceShaderDemoteToHelperInvocationFeatures + /// + PhysicalDeviceShaderDemoteToHelperInvocationFeatures = 1000276000, + + /// + /// PhysicalDevicePipelineCreationCacheControlFeatures + /// + PhysicalDevicePipelineCreationCacheControlFeatures = 1000297000, + + /// + /// PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures + /// + PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures = 1000325000, + + /// + /// PhysicalDeviceImageRobustnessFeatures + /// + PhysicalDeviceImageRobustnessFeatures = 1000335000, + + /// + /// PhysicalDeviceSubgroupSizeControlProperties + /// + PhysicalDeviceSubgroupSizeControlProperties = 1000225000, + + /// + /// PipelineShaderStageRequiredSubgroupSizeCreateInfo + /// + PipelineShaderStageRequiredSubgroupSizeCreateInfo = 1000225001, + + /// + /// PhysicalDeviceSubgroupSizeControlFeatures + /// + PhysicalDeviceSubgroupSizeControlFeatures = 1000225002, + + /// + /// PhysicalDeviceInlineUniformBlockFeatures + /// + PhysicalDeviceInlineUniformBlockFeatures = 1000138000, + + /// + /// PhysicalDeviceInlineUniformBlockProperties + /// + PhysicalDeviceInlineUniformBlockProperties = 1000138001, + + /// + /// WriteDescriptorSetInlineUniformBlock + /// + WriteDescriptorSetInlineUniformBlock = 1000138002, + + /// + /// DescriptorPoolInlineUniformBlockCreateInfo + /// + DescriptorPoolInlineUniformBlockCreateInfo = 1000138003, + + /// + /// PhysicalDeviceShaderIntegerDotProductFeatures + /// + PhysicalDeviceShaderIntegerDotProductFeatures = 1000280000, + + /// + /// PhysicalDeviceShaderIntegerDotProductProperties + /// + PhysicalDeviceShaderIntegerDotProductProperties = 1000280001, + + /// + /// PhysicalDeviceTexelBufferAlignmentProperties + /// + PhysicalDeviceTexelBufferAlignmentProperties = 1000281001, + + /// + /// BlitImageInfo2 + /// + BlitImageInfo2 = 1000337004, + + /// + /// ResolveImageInfo2 + /// + ResolveImageInfo2 = 1000337005, + + /// + /// ImageBlit2 + /// + ImageBlit2 = 1000337008, + + /// + /// ImageResolve2 + /// + ImageResolve2 = 1000337010, + + /// + /// RenderingInfo + /// + RenderingInfo = 1000044000, + + /// + /// RenderingAttachmentInfo + /// + RenderingAttachmentInfo = 1000044001, + + /// + /// PipelineRenderingCreateInfo + /// + PipelineRenderingCreateInfo = 1000044002, + + /// + /// PhysicalDeviceDynamicRenderingFeatures + /// + PhysicalDeviceDynamicRenderingFeatures = 1000044003, + + /// + /// CommandBufferInheritanceRenderingInfo + /// + CommandBufferInheritanceRenderingInfo = 1000044004, + + /// + /// PhysicalDeviceVulkan14Features + /// + PhysicalDeviceVulkan14Features = 55, + + /// + /// PhysicalDeviceVulkan14Properties + /// + PhysicalDeviceVulkan14Properties = 56, + + /// + /// DeviceQueueGlobalPriorityCreateInfo + /// + DeviceQueueGlobalPriorityCreateInfo = 1000174000, + + /// + /// PhysicalDeviceGlobalPriorityQueryFeatures + /// + PhysicalDeviceGlobalPriorityQueryFeatures = 1000388000, + + /// + /// QueueFamilyGlobalPriorityProperties + /// + QueueFamilyGlobalPriorityProperties = 1000388001, + + /// + /// PhysicalDeviceIndexTypeUInt8Features + /// + PhysicalDeviceIndexTypeUInt8Features = 1000265000, + + /// + /// MemoryMapInfo + /// + MemoryMapInfo = 1000271000, + + /// + /// MemoryUnmapInfo + /// + MemoryUnmapInfo = 1000271001, + + /// + /// PhysicalDeviceMaintenance5Features + /// + PhysicalDeviceMaintenance5Features = 1000470000, + + /// + /// PhysicalDeviceMaintenance5Properties + /// + PhysicalDeviceMaintenance5Properties = 1000470001, + + /// + /// DeviceImageSubresourceInfo + /// + DeviceImageSubresourceInfo = 1000470004, + + /// + /// SubresourceLayout2 + /// + SubresourceLayout2 = 1000338002, + + /// + /// ImageSubresource2 + /// + ImageSubresource2 = 1000338003, + + /// + /// BufferUsageFlags2CreateInfo + /// + BufferUsageFlags2CreateInfo = 1000470006, + + /// + /// PhysicalDeviceMaintenance6Features + /// + PhysicalDeviceMaintenance6Features = 1000545000, + + /// + /// PhysicalDeviceMaintenance6Properties + /// + PhysicalDeviceMaintenance6Properties = 1000545001, + + /// + /// BindMemoryStatus + /// + BindMemoryStatus = 1000545002, + + /// + /// PhysicalDeviceHostImageCopyFeatures + /// + PhysicalDeviceHostImageCopyFeatures = 1000270000, + + /// + /// PhysicalDeviceHostImageCopyProperties + /// + PhysicalDeviceHostImageCopyProperties = 1000270001, + + /// + /// MemoryToImageCopy + /// + MemoryToImageCopy = 1000270002, + + /// + /// ImageToMemoryCopy + /// + ImageToMemoryCopy = 1000270003, + + /// + /// CopyImageToMemoryInfo + /// + CopyImageToMemoryInfo = 1000270004, + + /// + /// CopyMemoryToImageInfo + /// + CopyMemoryToImageInfo = 1000270005, + + /// + /// HostImageLayoutTransitionInfo + /// + HostImageLayoutTransitionInfo = 1000270006, + + /// + /// CopyImageToImageInfo + /// + CopyImageToImageInfo = 1000270007, + + /// + /// SubresourceHostMemcpySize + /// + SubresourceHostMemcpySize = 1000270008, + + /// + /// HostImageCopyDevicePerformanceQuery + /// + HostImageCopyDevicePerformanceQuery = 1000270009, + + /// + /// PhysicalDeviceShaderSubgroupRotateFeatures + /// + PhysicalDeviceShaderSubgroupRotateFeatures = 1000416000, + + /// + /// PhysicalDeviceShaderFloatControls2Features + /// + PhysicalDeviceShaderFloatControls2Features = 1000528000, + + /// + /// PhysicalDeviceShaderExpectAssumeFeatures + /// + PhysicalDeviceShaderExpectAssumeFeatures = 1000544000, + + /// + /// PipelineCreateFlags2CreateInfo + /// + PipelineCreateFlags2CreateInfo = 1000470005, + + /// + /// PhysicalDevicePushDescriptorProperties + /// + PhysicalDevicePushDescriptorProperties = 1000080000, + + /// + /// BindDescriptorSetsInfo + /// + BindDescriptorSetsInfo = 1000545003, + + /// + /// PushConstantsInfo + /// + PushConstantsInfo = 1000545004, + + /// + /// PushDescriptorSetInfo + /// + PushDescriptorSetInfo = 1000545005, + + /// + /// PushDescriptorSetWithTemplateInfo + /// + PushDescriptorSetWithTemplateInfo = 1000545006, + + /// + /// PhysicalDevicePipelineProtectedAccessFeatures + /// + PhysicalDevicePipelineProtectedAccessFeatures = 1000466000, + + /// + /// PipelineRobustnessCreateInfo + /// + PipelineRobustnessCreateInfo = 1000068000, + + /// + /// PhysicalDevicePipelineRobustnessFeatures + /// + PhysicalDevicePipelineRobustnessFeatures = 1000068001, + + /// + /// PhysicalDevicePipelineRobustnessProperties + /// + PhysicalDevicePipelineRobustnessProperties = 1000068002, + + /// + /// PhysicalDeviceLineRasterizationFeatures + /// + PhysicalDeviceLineRasterizationFeatures = 1000259000, + + /// + /// PipelineRasterizationLineStateCreateInfo + /// + PipelineRasterizationLineStateCreateInfo = 1000259001, + + /// + /// PhysicalDeviceLineRasterizationProperties + /// + PhysicalDeviceLineRasterizationProperties = 1000259002, + + /// + /// PhysicalDeviceVertexAttributeDivisorProperties + /// + PhysicalDeviceVertexAttributeDivisorProperties = 1000525000, + + /// + /// PipelineVertexInputDivisorStateCreateInfo + /// + PipelineVertexInputDivisorStateCreateInfo = 1000190001, + + /// + /// PhysicalDeviceVertexAttributeDivisorFeatures + /// + PhysicalDeviceVertexAttributeDivisorFeatures = 1000190002, + + /// + /// RenderingAreaInfo + /// + RenderingAreaInfo = 1000470003, + + /// + /// PhysicalDeviceDynamicRenderingLocalReadFeatures + /// + PhysicalDeviceDynamicRenderingLocalReadFeatures = 1000232000, + + /// + /// RenderingAttachmentLocationInfo + /// + RenderingAttachmentLocationInfo = 1000232001, + + /// + /// RenderingInputAttachmentIndexInfo + /// + RenderingInputAttachmentIndexInfo = 1000232002, + + /// + /// SwapchainCreateInfoKHR + /// + SwapchainCreateInfoKHR = 1000001000, + + /// + /// PresentInfoKHR + /// + PresentInfoKHR = 1000001001, + + /// + /// DeviceGroupPresentCapabilitiesKHR + /// + DeviceGroupPresentCapabilitiesKHR = 1000060007, + + /// + /// ImageSwapchainCreateInfoKHR + /// + ImageSwapchainCreateInfoKHR = 1000060008, + + /// + /// BindImageMemorySwapchainInfoKHR + /// + BindImageMemorySwapchainInfoKHR = 1000060009, + + /// + /// AcquireNextImageInfoKHR + /// + AcquireNextImageInfoKHR = 1000060010, + + /// + /// DeviceGroupPresentInfoKHR + /// + DeviceGroupPresentInfoKHR = 1000060011, + + /// + /// DeviceGroupSwapchainCreateInfoKHR + /// + DeviceGroupSwapchainCreateInfoKHR = 1000060012, + + /// + /// DisplayModeCreateInfoKHR + /// + DisplayModeCreateInfoKHR = 1000002000, + + /// + /// DisplaySurfaceCreateInfoKHR + /// + DisplaySurfaceCreateInfoKHR = 1000002001, + + /// + /// DisplayPresentInfoKHR + /// + DisplayPresentInfoKHR = 1000003000, + + /// + /// XlibSurfaceCreateInfoKHR + /// + XlibSurfaceCreateInfoKHR = 1000004000, + + /// + /// XcbSurfaceCreateInfoKHR + /// + XcbSurfaceCreateInfoKHR = 1000005000, + + /// + /// WaylandSurfaceCreateInfoKHR + /// + WaylandSurfaceCreateInfoKHR = 1000006000, + + /// + /// ANDROIDSurfaceCreateInfoKHR + /// + ANDROIDSurfaceCreateInfoKHR = 1000008000, + + /// + /// Win32SurfaceCreateInfoKHR + /// + Win32SurfaceCreateInfoKHR = 1000009000, + + /// + /// DebugReportCallbackCreateInfoEXT + /// + DebugReportCallbackCreateInfoEXT = 1000011000, + + /// + /// PipelineRasterizationStateRasterizationOrderAMD + /// + PipelineRasterizationStateRasterizationOrderAMD = 1000018000, + + /// + /// DebugMarkerObjectNameInfoEXT + /// + DebugMarkerObjectNameInfoEXT = 1000022000, + + /// + /// DebugMarkerObjectTagInfoEXT + /// + DebugMarkerObjectTagInfoEXT = 1000022001, + + /// + /// DebugMarkerMarkerInfoEXT + /// + DebugMarkerMarkerInfoEXT = 1000022002, + + /// + /// VideoProfileInfoKHR + /// + VideoProfileInfoKHR = 1000023000, + + /// + /// VideoCapabilitiesKHR + /// + VideoCapabilitiesKHR = 1000023001, + + /// + /// VideoPictureResourceInfoKHR + /// + VideoPictureResourceInfoKHR = 1000023002, + + /// + /// VideoSessionMemoryRequirementsKHR + /// + VideoSessionMemoryRequirementsKHR = 1000023003, + + /// + /// BindVideoSessionMemoryInfoKHR + /// + BindVideoSessionMemoryInfoKHR = 1000023004, + + /// + /// VideoSessionCreateInfoKHR + /// + VideoSessionCreateInfoKHR = 1000023005, + + /// + /// VideoSessionParametersCreateInfoKHR + /// + VideoSessionParametersCreateInfoKHR = 1000023006, + + /// + /// VideoSessionParametersUpdateInfoKHR + /// + VideoSessionParametersUpdateInfoKHR = 1000023007, + + /// + /// VideoBeginCodingInfoKHR + /// + VideoBeginCodingInfoKHR = 1000023008, + + /// + /// VideoEndCodingInfoKHR + /// + VideoEndCodingInfoKHR = 1000023009, + + /// + /// VideoCodingControlInfoKHR + /// + VideoCodingControlInfoKHR = 1000023010, + + /// + /// VideoReferenceSlotInfoKHR + /// + VideoReferenceSlotInfoKHR = 1000023011, + + /// + /// QueueFamilyVideoPropertiesKHR + /// + QueueFamilyVideoPropertiesKHR = 1000023012, + + /// + /// VideoProfileListInfoKHR + /// + VideoProfileListInfoKHR = 1000023013, + + /// + /// PhysicalDeviceVideoFormatInfoKHR + /// + PhysicalDeviceVideoFormatInfoKHR = 1000023014, + + /// + /// VideoFormatPropertiesKHR + /// + VideoFormatPropertiesKHR = 1000023015, + + /// + /// QueueFamilyQueryResultStatusPropertiesKHR + /// + QueueFamilyQueryResultStatusPropertiesKHR = 1000023016, + + /// + /// VideoDecodeInfoKHR + /// + VideoDecodeInfoKHR = 1000024000, + + /// + /// VideoDecodeCapabilitiesKHR + /// + VideoDecodeCapabilitiesKHR = 1000024001, + + /// + /// VideoDecodeUsageInfoKHR + /// + VideoDecodeUsageInfoKHR = 1000024002, + + /// + /// DedicatedAllocationImageCreateInfoNV + /// + DedicatedAllocationImageCreateInfoNV = 1000026000, + + /// + /// DedicatedAllocationBufferCreateInfoNV + /// + DedicatedAllocationBufferCreateInfoNV = 1000026001, + + /// + /// DedicatedAllocationMemoryAllocateInfoNV + /// + DedicatedAllocationMemoryAllocateInfoNV = 1000026002, + + /// + /// PhysicalDeviceTransformFeedbackFeaturesEXT + /// + PhysicalDeviceTransformFeedbackFeaturesEXT = 1000028000, + + /// + /// PhysicalDeviceTransformFeedbackPropertiesEXT + /// + PhysicalDeviceTransformFeedbackPropertiesEXT = 1000028001, + + /// + /// PipelineRasterizationStateStreamCreateInfoEXT + /// + PipelineRasterizationStateStreamCreateInfoEXT = 1000028002, + + /// + /// CuModuleCreateInfoNVX + /// + CuModuleCreateInfoNVX = 1000029000, + + /// + /// CuFunctionCreateInfoNVX + /// + CuFunctionCreateInfoNVX = 1000029001, + + /// + /// CuLaunchInfoNVX + /// + CuLaunchInfoNVX = 1000029002, + + /// + /// CuModuleTexturingModeCreateInfoNVX + /// + CuModuleTexturingModeCreateInfoNVX = 1000029004, + + /// + /// ImageViewHandleInfoNVX + /// + ImageViewHandleInfoNVX = 1000030000, + + /// + /// ImageViewAddressPropertiesNVX + /// + ImageViewAddressPropertiesNVX = 1000030001, + + /// + /// VideoEncodeH264CapabilitiesKHR + /// + VideoEncodeH264CapabilitiesKHR = 1000038000, + + /// + /// VideoEncodeH264SessionParametersCreateInfoKHR + /// + VideoEncodeH264SessionParametersCreateInfoKHR = 1000038001, + + /// + /// VideoEncodeH264SessionParametersAddInfoKHR + /// + VideoEncodeH264SessionParametersAddInfoKHR = 1000038002, + + /// + /// VideoEncodeH264PictureInfoKHR + /// + VideoEncodeH264PictureInfoKHR = 1000038003, + + /// + /// VideoEncodeH264DpbSlotInfoKHR + /// + VideoEncodeH264DpbSlotInfoKHR = 1000038004, + + /// + /// VideoEncodeH264NaluSliceInfoKHR + /// + VideoEncodeH264NaluSliceInfoKHR = 1000038005, + + /// + /// VideoEncodeH264GopRemainingFrameInfoKHR + /// + VideoEncodeH264GopRemainingFrameInfoKHR = 1000038006, + + /// + /// VideoEncodeH264ProfileInfoKHR + /// + VideoEncodeH264ProfileInfoKHR = 1000038007, + + /// + /// VideoEncodeH264RateControlInfoKHR + /// + VideoEncodeH264RateControlInfoKHR = 1000038008, + + /// + /// VideoEncodeH264RateControlLayerInfoKHR + /// + VideoEncodeH264RateControlLayerInfoKHR = 1000038009, + + /// + /// VideoEncodeH264SessionCreateInfoKHR + /// + VideoEncodeH264SessionCreateInfoKHR = 1000038010, + + /// + /// VideoEncodeH264QualityLevelPropertiesKHR + /// + VideoEncodeH264QualityLevelPropertiesKHR = 1000038011, + + /// + /// VideoEncodeH264SessionParametersGetInfoKHR + /// + VideoEncodeH264SessionParametersGetInfoKHR = 1000038012, + + /// + /// VideoEncodeH264SessionParametersFeedbackInfoKHR + /// + VideoEncodeH264SessionParametersFeedbackInfoKHR = 1000038013, + + /// + /// VideoEncodeH265CapabilitiesKHR + /// + VideoEncodeH265CapabilitiesKHR = 1000039000, + + /// + /// VideoEncodeH265SessionParametersCreateInfoKHR + /// + VideoEncodeH265SessionParametersCreateInfoKHR = 1000039001, + + /// + /// VideoEncodeH265SessionParametersAddInfoKHR + /// + VideoEncodeH265SessionParametersAddInfoKHR = 1000039002, + + /// + /// VideoEncodeH265PictureInfoKHR + /// + VideoEncodeH265PictureInfoKHR = 1000039003, + + /// + /// VideoEncodeH265DpbSlotInfoKHR + /// + VideoEncodeH265DpbSlotInfoKHR = 1000039004, + + /// + /// VideoEncodeH265NaluSliceSegmentInfoKHR + /// + VideoEncodeH265NaluSliceSegmentInfoKHR = 1000039005, + + /// + /// VideoEncodeH265GopRemainingFrameInfoKHR + /// + VideoEncodeH265GopRemainingFrameInfoKHR = 1000039006, + + /// + /// VideoEncodeH265ProfileInfoKHR + /// + VideoEncodeH265ProfileInfoKHR = 1000039007, + + /// + /// VideoEncodeH265RateControlInfoKHR + /// + VideoEncodeH265RateControlInfoKHR = 1000039009, + + /// + /// VideoEncodeH265RateControlLayerInfoKHR + /// + VideoEncodeH265RateControlLayerInfoKHR = 1000039010, + + /// + /// VideoEncodeH265SessionCreateInfoKHR + /// + VideoEncodeH265SessionCreateInfoKHR = 1000039011, + + /// + /// VideoEncodeH265QualityLevelPropertiesKHR + /// + VideoEncodeH265QualityLevelPropertiesKHR = 1000039012, + + /// + /// VideoEncodeH265SessionParametersGetInfoKHR + /// + VideoEncodeH265SessionParametersGetInfoKHR = 1000039013, + + /// + /// VideoEncodeH265SessionParametersFeedbackInfoKHR + /// + VideoEncodeH265SessionParametersFeedbackInfoKHR = 1000039014, + + /// + /// VideoDecodeH264CapabilitiesKHR + /// + VideoDecodeH264CapabilitiesKHR = 1000040000, + + /// + /// VideoDecodeH264PictureInfoKHR + /// + VideoDecodeH264PictureInfoKHR = 1000040001, + + /// + /// VideoDecodeH264ProfileInfoKHR + /// + VideoDecodeH264ProfileInfoKHR = 1000040003, + + /// + /// VideoDecodeH264SessionParametersCreateInfoKHR + /// + VideoDecodeH264SessionParametersCreateInfoKHR = 1000040004, + + /// + /// VideoDecodeH264SessionParametersAddInfoKHR + /// + VideoDecodeH264SessionParametersAddInfoKHR = 1000040005, + + /// + /// VideoDecodeH264DpbSlotInfoKHR + /// + VideoDecodeH264DpbSlotInfoKHR = 1000040006, + + /// + /// TextureLodGatherFormatPropertiesAMD + /// + TextureLodGatherFormatPropertiesAMD = 1000041000, + + /// + /// StreamDescriptorSurfaceCreateInfoGGP + /// + StreamDescriptorSurfaceCreateInfoGGP = 1000049000, + + /// + /// PhysicalDeviceCornerSampledImageFeaturesNV + /// + PhysicalDeviceCornerSampledImageFeaturesNV = 1000050000, + + /// + /// ExternalMemoryImageCreateInfoNV + /// + ExternalMemoryImageCreateInfoNV = 1000056000, + + /// + /// ExportMemoryAllocateInfoNV + /// + ExportMemoryAllocateInfoNV = 1000056001, + + /// + /// ImportMemoryWin32HandleInfoNV + /// + ImportMemoryWin32HandleInfoNV = 1000057000, + + /// + /// ExportMemoryWin32HandleInfoNV + /// + ExportMemoryWin32HandleInfoNV = 1000057001, + + /// + /// Win32KeyedMutexAcquireReleaseInfoNV + /// + Win32KeyedMutexAcquireReleaseInfoNV = 1000058000, + + /// + /// ValidationFlagsEXT + /// + ValidationFlagsEXT = 1000061000, + + /// + /// ViSurfaceCreateInfoNN + /// + ViSurfaceCreateInfoNN = 1000062000, + + /// + /// ImageViewAstcDecodeModeEXT + /// + ImageViewAstcDecodeModeEXT = 1000067000, + + /// + /// PhysicalDeviceAstcDecodeFeaturesEXT + /// + PhysicalDeviceAstcDecodeFeaturesEXT = 1000067001, + + /// + /// ImportMemoryWin32HandleInfoKHR + /// + ImportMemoryWin32HandleInfoKHR = 1000073000, + + /// + /// ExportMemoryWin32HandleInfoKHR + /// + ExportMemoryWin32HandleInfoKHR = 1000073001, + + /// + /// MemoryWin32HandlePropertiesKHR + /// + MemoryWin32HandlePropertiesKHR = 1000073002, + + /// + /// MemoryGetWin32HandleInfoKHR + /// + MemoryGetWin32HandleInfoKHR = 1000073003, + + /// + /// ImportMemoryFdInfoKHR + /// + ImportMemoryFdInfoKHR = 1000074000, + + /// + /// MemoryFdPropertiesKHR + /// + MemoryFdPropertiesKHR = 1000074001, + + /// + /// MemoryGetFdInfoKHR + /// + MemoryGetFdInfoKHR = 1000074002, + + /// + /// Win32KeyedMutexAcquireReleaseInfoKHR + /// + Win32KeyedMutexAcquireReleaseInfoKHR = 1000075000, + + /// + /// ImportSemaphoreWin32HandleInfoKHR + /// + ImportSemaphoreWin32HandleInfoKHR = 1000078000, + + /// + /// ExportSemaphoreWin32HandleInfoKHR + /// + ExportSemaphoreWin32HandleInfoKHR = 1000078001, + + /// + /// D3D12FenceSubmitInfoKHR + /// + D3D12FenceSubmitInfoKHR = 1000078002, + + /// + /// SemaphoreGetWin32HandleInfoKHR + /// + SemaphoreGetWin32HandleInfoKHR = 1000078003, + + /// + /// ImportSemaphoreFdInfoKHR + /// + ImportSemaphoreFdInfoKHR = 1000079000, + + /// + /// SemaphoreGetFdInfoKHR + /// + SemaphoreGetFdInfoKHR = 1000079001, + + /// + /// CommandBufferInheritanceConditionalRenderingInfoEXT + /// + CommandBufferInheritanceConditionalRenderingInfoEXT = 1000081000, + + /// + /// PhysicalDeviceConditionalRenderingFeaturesEXT + /// + PhysicalDeviceConditionalRenderingFeaturesEXT = 1000081001, + + /// + /// ConditionalRenderingBeginInfoEXT + /// + ConditionalRenderingBeginInfoEXT = 1000081002, + + /// + /// PresentRegionsKHR + /// + PresentRegionsKHR = 1000084000, + + /// + /// PipelineViewportWScalingStateCreateInfoNV + /// + PipelineViewportWScalingStateCreateInfoNV = 1000087000, + + /// + /// SurfaceCapabilities2EXT + /// + SurfaceCapabilities2EXT = 1000090000, + + /// + /// DisplayPowerInfoEXT + /// + DisplayPowerInfoEXT = 1000091000, + + /// + /// DeviceEventInfoEXT + /// + DeviceEventInfoEXT = 1000091001, + + /// + /// DisplayEventInfoEXT + /// + DisplayEventInfoEXT = 1000091002, + + /// + /// SwapchainCounterCreateInfoEXT + /// + SwapchainCounterCreateInfoEXT = 1000091003, + + /// + /// PresentTimesInfoGOOGLE + /// + PresentTimesInfoGOOGLE = 1000092000, + + /// + /// PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX + /// + PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX = 1000097000, + + /// + /// MultiviewPerViewAttributesInfoNVX + /// + MultiviewPerViewAttributesInfoNVX = 1000044009, + + /// + /// PipelineViewportSwizzleStateCreateInfoNV + /// + PipelineViewportSwizzleStateCreateInfoNV = 1000098000, + + /// + /// PhysicalDeviceDiscardRectanglePropertiesEXT + /// + PhysicalDeviceDiscardRectanglePropertiesEXT = 1000099000, + + /// + /// PipelineDiscardRectangleStateCreateInfoEXT + /// + PipelineDiscardRectangleStateCreateInfoEXT = 1000099001, + + /// + /// PhysicalDeviceConservativeRasterizationPropertiesEXT + /// + PhysicalDeviceConservativeRasterizationPropertiesEXT = 1000101000, + + /// + /// PipelineRasterizationConservativeStateCreateInfoEXT + /// + PipelineRasterizationConservativeStateCreateInfoEXT = 1000101001, + + /// + /// PhysicalDeviceDepthClipEnableFeaturesEXT + /// + PhysicalDeviceDepthClipEnableFeaturesEXT = 1000102000, + + /// + /// PipelineRasterizationDepthClipStateCreateInfoEXT + /// + PipelineRasterizationDepthClipStateCreateInfoEXT = 1000102001, + + /// + /// HdrMetadataEXT + /// + HdrMetadataEXT = 1000105000, + + /// + /// PhysicalDeviceRelaxedLineRasterizationFeaturesIMG + /// + PhysicalDeviceRelaxedLineRasterizationFeaturesIMG = 1000110000, + + /// + /// SharedPresentSurfaceCapabilitiesKHR + /// + SharedPresentSurfaceCapabilitiesKHR = 1000111000, + + /// + /// ImportFenceWin32HandleInfoKHR + /// + ImportFenceWin32HandleInfoKHR = 1000114000, + + /// + /// ExportFenceWin32HandleInfoKHR + /// + ExportFenceWin32HandleInfoKHR = 1000114001, + + /// + /// FenceGetWin32HandleInfoKHR + /// + FenceGetWin32HandleInfoKHR = 1000114002, + + /// + /// ImportFenceFdInfoKHR + /// + ImportFenceFdInfoKHR = 1000115000, + + /// + /// FenceGetFdInfoKHR + /// + FenceGetFdInfoKHR = 1000115001, + + /// + /// PhysicalDevicePerformanceQueryFeaturesKHR + /// + PhysicalDevicePerformanceQueryFeaturesKHR = 1000116000, + + /// + /// PhysicalDevicePerformanceQueryPropertiesKHR + /// + PhysicalDevicePerformanceQueryPropertiesKHR = 1000116001, + + /// + /// QueryPoolPerformanceCreateInfoKHR + /// + QueryPoolPerformanceCreateInfoKHR = 1000116002, + + /// + /// PerformanceQuerySubmitInfoKHR + /// + PerformanceQuerySubmitInfoKHR = 1000116003, + + /// + /// AcquireProfilingLockInfoKHR + /// + AcquireProfilingLockInfoKHR = 1000116004, + + /// + /// PerformanceCounterKHR + /// + PerformanceCounterKHR = 1000116005, + + /// + /// PerformanceCounterDescriptionKHR + /// + PerformanceCounterDescriptionKHR = 1000116006, + + /// + /// PhysicalDeviceSurfaceInfo2KHR + /// + PhysicalDeviceSurfaceInfo2KHR = 1000119000, + + /// + /// SurfaceCapabilities2KHR + /// + SurfaceCapabilities2KHR = 1000119001, + + /// + /// SurfaceFormat2KHR + /// + SurfaceFormat2KHR = 1000119002, + + /// + /// DisplayProperties2KHR + /// + DisplayProperties2KHR = 1000121000, + + /// + /// DisplayPlaneProperties2KHR + /// + DisplayPlaneProperties2KHR = 1000121001, + + /// + /// DisplayModeProperties2KHR + /// + DisplayModeProperties2KHR = 1000121002, + + /// + /// DisplayPlaneInfo2KHR + /// + DisplayPlaneInfo2KHR = 1000121003, + + /// + /// DisplayPlaneCapabilities2KHR + /// + DisplayPlaneCapabilities2KHR = 1000121004, + + /// + /// IosSurfaceCreateInfoMVK + /// + IosSurfaceCreateInfoMVK = 1000122000, + + /// + /// MacosSurfaceCreateInfoMVK + /// + MacosSurfaceCreateInfoMVK = 1000123000, + + /// + /// DebugUtilsObjectNameInfoEXT + /// + DebugUtilsObjectNameInfoEXT = 1000128000, + + /// + /// DebugUtilsObjectTagInfoEXT + /// + DebugUtilsObjectTagInfoEXT = 1000128001, + + /// + /// DebugUtilsLabelEXT + /// + DebugUtilsLabelEXT = 1000128002, + + /// + /// DebugUtilsMessengerCallbackDataEXT + /// + DebugUtilsMessengerCallbackDataEXT = 1000128003, + + /// + /// DebugUtilsMessengerCreateInfoEXT + /// + DebugUtilsMessengerCreateInfoEXT = 1000128004, + + /// + /// ANDROIDHardwareBufferUsageANDROID + /// + ANDROIDHardwareBufferUsageANDROID = 1000129000, + + /// + /// ANDROIDHardwareBufferPropertiesANDROID + /// + ANDROIDHardwareBufferPropertiesANDROID = 1000129001, + + /// + /// ANDROIDHardwareBufferFormatPropertiesANDROID + /// + ANDROIDHardwareBufferFormatPropertiesANDROID = 1000129002, + + /// + /// ImportANDROIDHardwareBufferInfoANDROID + /// + ImportANDROIDHardwareBufferInfoANDROID = 1000129003, + + /// + /// MemoryGetANDROIDHardwareBufferInfoANDROID + /// + MemoryGetANDROIDHardwareBufferInfoANDROID = 1000129004, + + /// + /// ExternalFormatANDROID + /// + ExternalFormatANDROID = 1000129005, + + /// + /// ANDROIDHardwareBufferFormatProperties2ANDROID + /// + ANDROIDHardwareBufferFormatProperties2ANDROID = 1000129006, + + /// + /// PhysicalDeviceGpaFeaturesAMD + /// + PhysicalDeviceGpaFeaturesAMD = 1000133000, + + /// + /// PhysicalDeviceGpaPropertiesAMD + /// + PhysicalDeviceGpaPropertiesAMD = 1000133001, + + /// + /// GpaSampleBeginInfoAMD + /// + GpaSampleBeginInfoAMD = 1000133002, + + /// + /// GpaSessionCreateInfoAMD + /// + GpaSessionCreateInfoAMD = 1000133003, + + /// + /// GpaDeviceClockModeInfoAMD + /// + GpaDeviceClockModeInfoAMD = 1000133004, + + /// + /// PhysicalDeviceGpaProperties2AMD + /// + PhysicalDeviceGpaProperties2AMD = 1000133005, + + /// + /// GpaDeviceGetClockInfoAMD + /// + GpaDeviceGetClockInfoAMD = 1000133006, + + /// + /// PhysicalDeviceShaderEnqueueFeaturesAMDX + /// + PhysicalDeviceShaderEnqueueFeaturesAMDX = 1000134000, + + /// + /// PhysicalDeviceShaderEnqueuePropertiesAMDX + /// + PhysicalDeviceShaderEnqueuePropertiesAMDX = 1000134001, + + /// + /// ExecutionGraphPipelineScratchSizeAMDX + /// + ExecutionGraphPipelineScratchSizeAMDX = 1000134002, + + /// + /// ExecutionGraphPipelineCreateInfoAMDX + /// + ExecutionGraphPipelineCreateInfoAMDX = 1000134003, + + /// + /// PipelineShaderStageNodeCreateInfoAMDX + /// + PipelineShaderStageNodeCreateInfoAMDX = 1000134004, + + /// + /// TexelBufferDescriptorInfoEXT + /// + TexelBufferDescriptorInfoEXT = 1000135000, + + /// + /// ImageDescriptorInfoEXT + /// + ImageDescriptorInfoEXT = 1000135001, + + /// + /// ResourceDescriptorInfoEXT + /// + ResourceDescriptorInfoEXT = 1000135002, + + /// + /// BindHeapInfoEXT + /// + BindHeapInfoEXT = 1000135003, + + /// + /// PushDataInfoEXT + /// + PushDataInfoEXT = 1000135004, + + /// + /// DescriptorSetAndBindingMappingEXT + /// + DescriptorSetAndBindingMappingEXT = 1000135005, + + /// + /// ShaderDescriptorSetAndBindingMappingInfoEXT + /// + ShaderDescriptorSetAndBindingMappingInfoEXT = 1000135006, + + /// + /// OpaqueCaptureDataCreateInfoEXT + /// + OpaqueCaptureDataCreateInfoEXT = 1000135007, + + /// + /// PhysicalDeviceDescriptorHeapPropertiesEXT + /// + PhysicalDeviceDescriptorHeapPropertiesEXT = 1000135008, + + /// + /// PhysicalDeviceDescriptorHeapFeaturesEXT + /// + PhysicalDeviceDescriptorHeapFeaturesEXT = 1000135009, + + /// + /// CommandBufferInheritanceDescriptorHeapInfoEXT + /// + CommandBufferInheritanceDescriptorHeapInfoEXT = 1000135010, + + /// + /// SamplerCustomBorderColorIndexCreateInfoEXT + /// + SamplerCustomBorderColorIndexCreateInfoEXT = 1000135011, + + /// + /// IndirectCommandsLayoutPushDataTokenNV + /// + IndirectCommandsLayoutPushDataTokenNV = 1000135012, + + /// + /// SubsampledImageFormatPropertiesEXT + /// + SubsampledImageFormatPropertiesEXT = 1000135013, + + /// + /// PhysicalDeviceDescriptorHeapTensorPropertiesARM + /// + PhysicalDeviceDescriptorHeapTensorPropertiesARM = 1000135014, + + /// + /// AttachmentSampleCountInfoAMD + /// + AttachmentSampleCountInfoAMD = 1000044008, + + /// + /// PhysicalDeviceShaderBfloat16FeaturesKHR + /// + PhysicalDeviceShaderBfloat16FeaturesKHR = 1000141000, + + /// + /// SampleLocationsInfoEXT + /// + SampleLocationsInfoEXT = 1000143000, + + /// + /// RenderPassSampleLocationsBeginInfoEXT + /// + RenderPassSampleLocationsBeginInfoEXT = 1000143001, + + /// + /// PipelineSampleLocationsStateCreateInfoEXT + /// + PipelineSampleLocationsStateCreateInfoEXT = 1000143002, + + /// + /// PhysicalDeviceSampleLocationsPropertiesEXT + /// + PhysicalDeviceSampleLocationsPropertiesEXT = 1000143003, + + /// + /// MultisamplePropertiesEXT + /// + MultisamplePropertiesEXT = 1000143004, + + /// + /// PhysicalDeviceBlendOperationAdvancedFeaturesEXT + /// + PhysicalDeviceBlendOperationAdvancedFeaturesEXT = 1000148000, + + /// + /// PhysicalDeviceBlendOperationAdvancedPropertiesEXT + /// + PhysicalDeviceBlendOperationAdvancedPropertiesEXT = 1000148001, + + /// + /// PipelineColorBlendAdvancedStateCreateInfoEXT + /// + PipelineColorBlendAdvancedStateCreateInfoEXT = 1000148002, + + /// + /// PipelineCoverageToColorStateCreateInfoNV + /// + PipelineCoverageToColorStateCreateInfoNV = 1000149000, + + /// + /// WriteDescriptorSetAccelerationStructureKHR + /// + WriteDescriptorSetAccelerationStructureKHR = 1000150007, + + /// + /// AccelerationStructureBuildGeometryInfoKHR + /// + AccelerationStructureBuildGeometryInfoKHR = 1000150000, + + /// + /// AccelerationStructureDeviceAddressInfoKHR + /// + AccelerationStructureDeviceAddressInfoKHR = 1000150002, + + /// + /// AccelerationStructureGeometryAabbsDataKHR + /// + AccelerationStructureGeometryAabbsDataKHR = 1000150003, + + /// + /// AccelerationStructureGeometryInstancesDataKHR + /// + AccelerationStructureGeometryInstancesDataKHR = 1000150004, + + /// + /// AccelerationStructureGeometryTrianglesDataKHR + /// + AccelerationStructureGeometryTrianglesDataKHR = 1000150005, + + /// + /// AccelerationStructureGeometryKHR + /// + AccelerationStructureGeometryKHR = 1000150006, + + /// + /// AccelerationStructureVersionInfoKHR + /// + AccelerationStructureVersionInfoKHR = 1000150009, + + /// + /// CopyAccelerationStructureInfoKHR + /// + CopyAccelerationStructureInfoKHR = 1000150010, + + /// + /// CopyAccelerationStructureToMemoryInfoKHR + /// + CopyAccelerationStructureToMemoryInfoKHR = 1000150011, + + /// + /// CopyMemoryToAccelerationStructureInfoKHR + /// + CopyMemoryToAccelerationStructureInfoKHR = 1000150012, + + /// + /// PhysicalDeviceAccelerationStructureFeaturesKHR + /// + PhysicalDeviceAccelerationStructureFeaturesKHR = 1000150013, + + /// + /// PhysicalDeviceAccelerationStructurePropertiesKHR + /// + PhysicalDeviceAccelerationStructurePropertiesKHR = 1000150014, + + /// + /// AccelerationStructureCreateInfoKHR + /// + AccelerationStructureCreateInfoKHR = 1000150017, + + /// + /// AccelerationStructureBuildSizesInfoKHR + /// + AccelerationStructureBuildSizesInfoKHR = 1000150020, + + /// + /// PhysicalDeviceRayTracingPipelineFeaturesKHR + /// + PhysicalDeviceRayTracingPipelineFeaturesKHR = 1000347000, + + /// + /// PhysicalDeviceRayTracingPipelinePropertiesKHR + /// + PhysicalDeviceRayTracingPipelinePropertiesKHR = 1000347001, + + /// + /// RayTracingPipelineCreateInfoKHR + /// + RayTracingPipelineCreateInfoKHR = 1000150015, + + /// + /// RayTracingShaderGroupCreateInfoKHR + /// + RayTracingShaderGroupCreateInfoKHR = 1000150016, + + /// + /// RayTracingPipelineInterfaceCreateInfoKHR + /// + RayTracingPipelineInterfaceCreateInfoKHR = 1000150018, + + /// + /// PhysicalDeviceRayQueryFeaturesKHR + /// + PhysicalDeviceRayQueryFeaturesKHR = 1000348013, + + /// + /// PipelineCoverageModulationStateCreateInfoNV + /// + PipelineCoverageModulationStateCreateInfoNV = 1000152000, + + /// + /// PhysicalDeviceShaderSmBuiltinsFeaturesNV + /// + PhysicalDeviceShaderSmBuiltinsFeaturesNV = 1000154000, + + /// + /// PhysicalDeviceShaderSmBuiltinsPropertiesNV + /// + PhysicalDeviceShaderSmBuiltinsPropertiesNV = 1000154001, + + /// + /// DrmFormatModifierPropertiesListEXT + /// + DrmFormatModifierPropertiesListEXT = 1000158000, + + /// + /// PhysicalDeviceImageDrmFormatModifierInfoEXT + /// + PhysicalDeviceImageDrmFormatModifierInfoEXT = 1000158002, + + /// + /// ImageDrmFormatModifierListCreateInfoEXT + /// + ImageDrmFormatModifierListCreateInfoEXT = 1000158003, + + /// + /// ImageDrmFormatModifierExplicitCreateInfoEXT + /// + ImageDrmFormatModifierExplicitCreateInfoEXT = 1000158004, + + /// + /// ImageDrmFormatModifierPropertiesEXT + /// + ImageDrmFormatModifierPropertiesEXT = 1000158005, + + /// + /// DrmFormatModifierPropertiesList2EXT + /// + DrmFormatModifierPropertiesList2EXT = 1000158006, + + /// + /// ValidationCacheCreateInfoEXT + /// + ValidationCacheCreateInfoEXT = 1000160000, + + /// + /// ShaderModuleValidationCacheCreateInfoEXT + /// + ShaderModuleValidationCacheCreateInfoEXT = 1000160001, + + /// + /// PhysicalDevicePortabilitySubsetFeaturesKHR + /// + PhysicalDevicePortabilitySubsetFeaturesKHR = 1000163000, + + /// + /// PhysicalDevicePortabilitySubsetPropertiesKHR + /// + PhysicalDevicePortabilitySubsetPropertiesKHR = 1000163001, + + /// + /// PipelineViewportShadingRateImageStateCreateInfoNV + /// + PipelineViewportShadingRateImageStateCreateInfoNV = 1000164000, + + /// + /// PhysicalDeviceShadingRateImageFeaturesNV + /// + PhysicalDeviceShadingRateImageFeaturesNV = 1000164001, + + /// + /// PhysicalDeviceShadingRateImagePropertiesNV + /// + PhysicalDeviceShadingRateImagePropertiesNV = 1000164002, + + /// + /// PipelineViewportCoarseSampleOrderStateCreateInfoNV + /// + PipelineViewportCoarseSampleOrderStateCreateInfoNV = 1000164005, + + /// + /// RayTracingPipelineCreateInfoNV + /// + RayTracingPipelineCreateInfoNV = 1000165000, + + /// + /// AccelerationStructureCreateInfoNV + /// + AccelerationStructureCreateInfoNV = 1000165001, + + /// + /// GeometryNV + /// + GeometryNV = 1000165003, + + /// + /// GeometryTrianglesNV + /// + GeometryTrianglesNV = 1000165004, + + /// + /// GeometryAabbNV + /// + GeometryAabbNV = 1000165005, + + /// + /// BindAccelerationStructureMemoryInfoNV + /// + BindAccelerationStructureMemoryInfoNV = 1000165006, + + /// + /// WriteDescriptorSetAccelerationStructureNV + /// + WriteDescriptorSetAccelerationStructureNV = 1000165007, + + /// + /// AccelerationStructureMemoryRequirementsInfoNV + /// + AccelerationStructureMemoryRequirementsInfoNV = 1000165008, + + /// + /// PhysicalDeviceRayTracingPropertiesNV + /// + PhysicalDeviceRayTracingPropertiesNV = 1000165009, + + /// + /// RayTracingShaderGroupCreateInfoNV + /// + RayTracingShaderGroupCreateInfoNV = 1000165011, + + /// + /// AccelerationStructureInfoNV + /// + AccelerationStructureInfoNV = 1000165012, + + /// + /// PhysicalDeviceRepresentativeFragmentTestFeaturesNV + /// + PhysicalDeviceRepresentativeFragmentTestFeaturesNV = 1000166000, + + /// + /// PipelineRepresentativeFragmentTestStateCreateInfoNV + /// + PipelineRepresentativeFragmentTestStateCreateInfoNV = 1000166001, + + /// + /// PhysicalDeviceImageViewImageFormatInfoEXT + /// + PhysicalDeviceImageViewImageFormatInfoEXT = 1000170000, + + /// + /// FilterCubicImageViewImageFormatPropertiesEXT + /// + FilterCubicImageViewImageFormatPropertiesEXT = 1000170001, + + /// + /// PhysicalDeviceCooperativeMatrixConversionFeaturesQCOM + /// + PhysicalDeviceCooperativeMatrixConversionFeaturesQCOM = 1000172000, + + /// + /// PhysicalDeviceElapsedTimerQueryFeaturesQCOM + /// + PhysicalDeviceElapsedTimerQueryFeaturesQCOM = 1000173000, + + /// + /// ImportMemoryHostPointerInfoEXT + /// + ImportMemoryHostPointerInfoEXT = 1000178000, + + /// + /// MemoryHostPointerPropertiesEXT + /// + MemoryHostPointerPropertiesEXT = 1000178001, + + /// + /// PhysicalDeviceExternalMemoryHostPropertiesEXT + /// + PhysicalDeviceExternalMemoryHostPropertiesEXT = 1000178002, + + /// + /// PhysicalDeviceShaderClockFeaturesKHR + /// + PhysicalDeviceShaderClockFeaturesKHR = 1000181000, + + /// + /// PipelineCompilerControlCreateInfoAMD + /// + PipelineCompilerControlCreateInfoAMD = 1000183000, + + /// + /// PhysicalDeviceShaderCorePropertiesAMD + /// + PhysicalDeviceShaderCorePropertiesAMD = 1000185000, + + /// + /// VideoDecodeH265CapabilitiesKHR + /// + VideoDecodeH265CapabilitiesKHR = 1000187000, + + /// + /// VideoDecodeH265SessionParametersCreateInfoKHR + /// + VideoDecodeH265SessionParametersCreateInfoKHR = 1000187001, + + /// + /// VideoDecodeH265SessionParametersAddInfoKHR + /// + VideoDecodeH265SessionParametersAddInfoKHR = 1000187002, + + /// + /// VideoDecodeH265ProfileInfoKHR + /// + VideoDecodeH265ProfileInfoKHR = 1000187003, + + /// + /// VideoDecodeH265PictureInfoKHR + /// + VideoDecodeH265PictureInfoKHR = 1000187004, + + /// + /// VideoDecodeH265DpbSlotInfoKHR + /// + VideoDecodeH265DpbSlotInfoKHR = 1000187005, + + /// + /// DeviceMemoryOverallocationCreateInfoAMD + /// + DeviceMemoryOverallocationCreateInfoAMD = 1000189000, + + /// + /// PhysicalDeviceVertexAttributeDivisorPropertiesEXT + /// + PhysicalDeviceVertexAttributeDivisorPropertiesEXT = 1000190000, + + /// + /// PresentFrameTokenGGP + /// + PresentFrameTokenGGP = 1000191000, + + /// + /// PhysicalDeviceMeshShaderFeaturesNV + /// + PhysicalDeviceMeshShaderFeaturesNV = 1000202000, + + /// + /// PhysicalDeviceMeshShaderPropertiesNV + /// + PhysicalDeviceMeshShaderPropertiesNV = 1000202001, + + /// + /// PhysicalDeviceShaderImageFootprintFeaturesNV + /// + PhysicalDeviceShaderImageFootprintFeaturesNV = 1000204000, + + /// + /// PipelineViewportExclusiveScissorStateCreateInfoNV + /// + PipelineViewportExclusiveScissorStateCreateInfoNV = 1000205000, + + /// + /// PhysicalDeviceExclusiveScissorFeaturesNV + /// + PhysicalDeviceExclusiveScissorFeaturesNV = 1000205002, + + /// + /// CheckpointDataNV + /// + CheckpointDataNV = 1000206000, + + /// + /// QueueFamilyCheckpointPropertiesNV + /// + QueueFamilyCheckpointPropertiesNV = 1000206001, + + /// + /// QueueFamilyCheckpointProperties2NV + /// + QueueFamilyCheckpointProperties2NV = 1000314008, + + /// + /// CheckpointData2NV + /// + CheckpointData2NV = 1000314009, + + /// + /// PhysicalDevicePresentTimingFeaturesEXT + /// + PhysicalDevicePresentTimingFeaturesEXT = 1000208000, + + /// + /// SwapchainTimingPropertiesEXT + /// + SwapchainTimingPropertiesEXT = 1000208001, + + /// + /// SwapchainTimeDomainPropertiesEXT + /// + SwapchainTimeDomainPropertiesEXT = 1000208002, + + /// + /// PresentTimingsInfoEXT + /// + PresentTimingsInfoEXT = 1000208003, + + /// + /// PresentTimingInfoEXT + /// + PresentTimingInfoEXT = 1000208004, + + /// + /// PastPresentationTimingInfoEXT + /// + PastPresentationTimingInfoEXT = 1000208005, + + /// + /// PastPresentationTimingPropertiesEXT + /// + PastPresentationTimingPropertiesEXT = 1000208006, + + /// + /// PastPresentationTimingEXT + /// + PastPresentationTimingEXT = 1000208007, + + /// + /// PresentTimingSurfaceCapabilitiesEXT + /// + PresentTimingSurfaceCapabilitiesEXT = 1000208008, + + /// + /// SwapchainCalibratedTimestampInfoEXT + /// + SwapchainCalibratedTimestampInfoEXT = 1000208009, + + /// + /// PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL + /// + PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL = 1000209000, + + /// + /// QueryPoolPerformanceQueryCreateInfoINTEL + /// + QueryPoolPerformanceQueryCreateInfoINTEL = 1000210000, + + /// + /// InitializePerformanceApiInfoINTEL + /// + InitializePerformanceApiInfoINTEL = 1000210001, + + /// + /// PerformanceMarkerInfoINTEL + /// + PerformanceMarkerInfoINTEL = 1000210002, + + /// + /// PerformanceStreamMarkerInfoINTEL + /// + PerformanceStreamMarkerInfoINTEL = 1000210003, + + /// + /// PerformanceOverrideInfoINTEL + /// + PerformanceOverrideInfoINTEL = 1000210004, + + /// + /// PerformanceConfigurationAcquireInfoINTEL + /// + PerformanceConfigurationAcquireInfoINTEL = 1000210005, + + /// + /// PhysicalDevicePciBusInfoPropertiesEXT + /// + PhysicalDevicePciBusInfoPropertiesEXT = 1000212000, + + /// + /// DisplayNativeHdrSurfaceCapabilitiesAMD + /// + DisplayNativeHdrSurfaceCapabilitiesAMD = 1000213000, + + /// + /// SwapchainDisplayNativeHdrCreateInfoAMD + /// + SwapchainDisplayNativeHdrCreateInfoAMD = 1000213001, + + /// + /// ImagepipeSurfaceCreateInfoFUCHSIA + /// + ImagepipeSurfaceCreateInfoFUCHSIA = 1000214000, + + /// + /// MetalSurfaceCreateInfoEXT + /// + MetalSurfaceCreateInfoEXT = 1000217000, + + /// + /// PhysicalDeviceFragmentDensityMapFeaturesEXT + /// + PhysicalDeviceFragmentDensityMapFeaturesEXT = 1000218000, + + /// + /// PhysicalDeviceFragmentDensityMapPropertiesEXT + /// + PhysicalDeviceFragmentDensityMapPropertiesEXT = 1000218001, + + /// + /// RenderPassFragmentDensityMapCreateInfoEXT + /// + RenderPassFragmentDensityMapCreateInfoEXT = 1000218002, + + /// + /// RenderingFragmentDensityMapAttachmentInfoEXT + /// + RenderingFragmentDensityMapAttachmentInfoEXT = 1000044007, + + /// + /// FragmentShadingRateAttachmentInfoKHR + /// + FragmentShadingRateAttachmentInfoKHR = 1000226000, + + /// + /// PipelineFragmentShadingRateStateCreateInfoKHR + /// + PipelineFragmentShadingRateStateCreateInfoKHR = 1000226001, + + /// + /// PhysicalDeviceFragmentShadingRatePropertiesKHR + /// + PhysicalDeviceFragmentShadingRatePropertiesKHR = 1000226002, + + /// + /// PhysicalDeviceFragmentShadingRateFeaturesKHR + /// + PhysicalDeviceFragmentShadingRateFeaturesKHR = 1000226003, + + /// + /// PhysicalDeviceFragmentShadingRateKHR + /// + PhysicalDeviceFragmentShadingRateKHR = 1000226004, + + /// + /// RenderingFragmentShadingRateAttachmentInfoKHR + /// + RenderingFragmentShadingRateAttachmentInfoKHR = 1000044006, + + /// + /// PhysicalDeviceShaderCoreProperties2AMD + /// + PhysicalDeviceShaderCoreProperties2AMD = 1000227000, + + /// + /// PhysicalDeviceCoherentMemoryFeaturesAMD + /// + PhysicalDeviceCoherentMemoryFeaturesAMD = 1000229000, + + /// + /// PhysicalDeviceShaderConstantDataFeaturesKHR + /// + PhysicalDeviceShaderConstantDataFeaturesKHR = 1000231000, + + /// + /// PhysicalDeviceShaderAbortFeaturesKHR + /// + PhysicalDeviceShaderAbortFeaturesKHR = 1000233000, + + /// + /// DeviceFaultShaderAbortMessageInfoKHR + /// + DeviceFaultShaderAbortMessageInfoKHR = 1000233001, + + /// + /// PhysicalDeviceShaderAbortPropertiesKHR + /// + PhysicalDeviceShaderAbortPropertiesKHR = 1000233002, + + /// + /// PhysicalDeviceShaderImageAtomicInt64FeaturesEXT + /// + PhysicalDeviceShaderImageAtomicInt64FeaturesEXT = 1000234000, + + /// + /// PhysicalDeviceShaderQuadControlFeaturesKHR + /// + PhysicalDeviceShaderQuadControlFeaturesKHR = 1000235000, + + /// + /// PhysicalDeviceMemoryBudgetPropertiesEXT + /// + PhysicalDeviceMemoryBudgetPropertiesEXT = 1000237000, + + /// + /// PhysicalDeviceMemoryPriorityFeaturesEXT + /// + PhysicalDeviceMemoryPriorityFeaturesEXT = 1000238000, + + /// + /// MemoryPriorityAllocateInfoEXT + /// + MemoryPriorityAllocateInfoEXT = 1000238001, + + /// + /// SurfaceProtectedCapabilitiesKHR + /// + SurfaceProtectedCapabilitiesKHR = 1000239000, + + /// + /// PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV + /// + PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV = 1000240000, + + /// + /// PhysicalDeviceBufferDeviceAddressFeaturesEXT + /// + PhysicalDeviceBufferDeviceAddressFeaturesEXT = 1000244000, + + /// + /// BufferDeviceAddressCreateInfoEXT + /// + BufferDeviceAddressCreateInfoEXT = 1000244002, + + /// + /// ValidationFeaturesEXT + /// + ValidationFeaturesEXT = 1000247000, + + /// + /// PhysicalDevicePresentWaitFeaturesKHR + /// + PhysicalDevicePresentWaitFeaturesKHR = 1000248000, + + /// + /// PhysicalDeviceCooperativeMatrixFeaturesNV + /// + PhysicalDeviceCooperativeMatrixFeaturesNV = 1000249000, + + /// + /// CooperativeMatrixPropertiesNV + /// + CooperativeMatrixPropertiesNV = 1000249001, + + /// + /// PhysicalDeviceCooperativeMatrixPropertiesNV + /// + PhysicalDeviceCooperativeMatrixPropertiesNV = 1000249002, + + /// + /// PhysicalDeviceCoverageReductionModeFeaturesNV + /// + PhysicalDeviceCoverageReductionModeFeaturesNV = 1000250000, + + /// + /// PipelineCoverageReductionStateCreateInfoNV + /// + PipelineCoverageReductionStateCreateInfoNV = 1000250001, + + /// + /// FramebufferMixedSamplesCombinationNV + /// + FramebufferMixedSamplesCombinationNV = 1000250002, + + /// + /// PhysicalDeviceFragmentShaderInterlockFeaturesEXT + /// + PhysicalDeviceFragmentShaderInterlockFeaturesEXT = 1000251000, + + /// + /// PhysicalDeviceYCbCrImageArraysFeaturesEXT + /// + PhysicalDeviceYCbCrImageArraysFeaturesEXT = 1000252000, + + /// + /// PhysicalDeviceProvokingVertexFeaturesEXT + /// + PhysicalDeviceProvokingVertexFeaturesEXT = 1000254000, + + /// + /// PipelineRasterizationProvokingVertexStateCreateInfoEXT + /// + PipelineRasterizationProvokingVertexStateCreateInfoEXT = 1000254001, + + /// + /// PhysicalDeviceProvokingVertexPropertiesEXT + /// + PhysicalDeviceProvokingVertexPropertiesEXT = 1000254002, + + /// + /// SurfaceFullScreenExclusiveInfoEXT + /// + SurfaceFullScreenExclusiveInfoEXT = 1000255000, + + /// + /// SurfaceCapabilitiesFullScreenExclusiveEXT + /// + SurfaceCapabilitiesFullScreenExclusiveEXT = 1000255002, + + /// + /// SurfaceFullScreenExclusiveWin32InfoEXT + /// + SurfaceFullScreenExclusiveWin32InfoEXT = 1000255001, + + /// + /// HeadlessSurfaceCreateInfoEXT + /// + HeadlessSurfaceCreateInfoEXT = 1000256000, + + /// + /// PhysicalDeviceShaderAtomicFloatFeaturesEXT + /// + PhysicalDeviceShaderAtomicFloatFeaturesEXT = 1000260000, + + /// + /// PhysicalDeviceExtendedDynamicStateFeaturesEXT + /// + PhysicalDeviceExtendedDynamicStateFeaturesEXT = 1000267000, + + /// + /// PhysicalDevicePipelineExecutablePropertiesFeaturesKHR + /// + PhysicalDevicePipelineExecutablePropertiesFeaturesKHR = 1000269000, + + /// + /// PipelineInfoKHR + /// + PipelineInfoKHR = 1000269001, + + /// + /// PipelineExecutablePropertiesKHR + /// + PipelineExecutablePropertiesKHR = 1000269002, + + /// + /// PipelineExecutableInfoKHR + /// + PipelineExecutableInfoKHR = 1000269003, + + /// + /// PipelineExecutableStatisticKHR + /// + PipelineExecutableStatisticKHR = 1000269004, + + /// + /// PipelineExecutableInternalRepresentationKHR + /// + PipelineExecutableInternalRepresentationKHR = 1000269005, + + /// + /// PhysicalDeviceMapMemoryPlacedFeaturesEXT + /// + PhysicalDeviceMapMemoryPlacedFeaturesEXT = 1000272000, + + /// + /// PhysicalDeviceMapMemoryPlacedPropertiesEXT + /// + PhysicalDeviceMapMemoryPlacedPropertiesEXT = 1000272001, + + /// + /// MemoryMapPlacedInfoEXT + /// + MemoryMapPlacedInfoEXT = 1000272002, + + /// + /// PhysicalDeviceShaderAtomicFloat2FeaturesEXT + /// + PhysicalDeviceShaderAtomicFloat2FeaturesEXT = 1000273000, + + /// + /// PhysicalDeviceDeviceGeneratedCommandsPropertiesNV + /// + PhysicalDeviceDeviceGeneratedCommandsPropertiesNV = 1000277000, + + /// + /// GraphicsShaderGroupCreateInfoNV + /// + GraphicsShaderGroupCreateInfoNV = 1000277001, + + /// + /// GraphicsPipelineShaderGroupsCreateInfoNV + /// + GraphicsPipelineShaderGroupsCreateInfoNV = 1000277002, + + /// + /// IndirectCommandsLayoutTokenNV + /// + IndirectCommandsLayoutTokenNV = 1000277003, + + /// + /// IndirectCommandsLayoutCreateInfoNV + /// + IndirectCommandsLayoutCreateInfoNV = 1000277004, + + /// + /// GeneratedCommandsInfoNV + /// + GeneratedCommandsInfoNV = 1000277005, + + /// + /// GeneratedCommandsMemoryRequirementsInfoNV + /// + GeneratedCommandsMemoryRequirementsInfoNV = 1000277006, + + /// + /// PhysicalDeviceDeviceGeneratedCommandsFeaturesNV + /// + PhysicalDeviceDeviceGeneratedCommandsFeaturesNV = 1000277007, + + /// + /// PhysicalDeviceInheritedViewportScissorFeaturesNV + /// + PhysicalDeviceInheritedViewportScissorFeaturesNV = 1000278000, + + /// + /// CommandBufferInheritanceViewportScissorInfoNV + /// + CommandBufferInheritanceViewportScissorInfoNV = 1000278001, + + /// + /// PhysicalDeviceTexelBufferAlignmentFeaturesEXT + /// + PhysicalDeviceTexelBufferAlignmentFeaturesEXT = 1000281000, + + /// + /// CommandBufferInheritanceRenderPassTransformInfoQCOM + /// + CommandBufferInheritanceRenderPassTransformInfoQCOM = 1000282000, + + /// + /// RenderPassTransformBeginInfoQCOM + /// + RenderPassTransformBeginInfoQCOM = 1000282001, + + /// + /// PhysicalDeviceDepthBiasControlFeaturesEXT + /// + PhysicalDeviceDepthBiasControlFeaturesEXT = 1000283000, + + /// + /// DepthBiasInfoEXT + /// + DepthBiasInfoEXT = 1000283001, + + /// + /// DepthBiasRepresentationInfoEXT + /// + DepthBiasRepresentationInfoEXT = 1000283002, + + /// + /// PhysicalDeviceDeviceMemoryReportFeaturesEXT + /// + PhysicalDeviceDeviceMemoryReportFeaturesEXT = 1000284000, + + /// + /// DeviceDeviceMemoryReportCreateInfoEXT + /// + DeviceDeviceMemoryReportCreateInfoEXT = 1000284001, + + /// + /// DeviceMemoryReportCallbackDataEXT + /// + DeviceMemoryReportCallbackDataEXT = 1000284002, + + /// + /// SamplerCustomBorderColorCreateInfoEXT + /// + SamplerCustomBorderColorCreateInfoEXT = 1000287000, + + /// + /// PhysicalDeviceCustomBorderColorPropertiesEXT + /// + PhysicalDeviceCustomBorderColorPropertiesEXT = 1000287001, + + /// + /// PhysicalDeviceCustomBorderColorFeaturesEXT + /// + PhysicalDeviceCustomBorderColorFeaturesEXT = 1000287002, + + /// + /// PhysicalDeviceTextureCompressionAstc3DFeaturesEXT + /// + PhysicalDeviceTextureCompressionAstc3DFeaturesEXT = 1000288000, + + /// + /// PipelineLibraryCreateInfoKHR + /// + PipelineLibraryCreateInfoKHR = 1000290000, + + /// + /// PhysicalDevicePresentBarrierFeaturesNV + /// + PhysicalDevicePresentBarrierFeaturesNV = 1000292000, + + /// + /// SurfaceCapabilitiesPresentBarrierNV + /// + SurfaceCapabilitiesPresentBarrierNV = 1000292001, + + /// + /// SwapchainPresentBarrierCreateInfoNV + /// + SwapchainPresentBarrierCreateInfoNV = 1000292002, + + /// + /// PresentIdKHR + /// + PresentIdKHR = 1000294000, + + /// + /// PhysicalDevicePresentIdFeaturesKHR + /// + PhysicalDevicePresentIdFeaturesKHR = 1000294001, + + /// + /// VideoEncodeInfoKHR + /// + VideoEncodeInfoKHR = 1000299000, + + /// + /// VideoEncodeRateControlInfoKHR + /// + VideoEncodeRateControlInfoKHR = 1000299001, + + /// + /// VideoEncodeRateControlLayerInfoKHR + /// + VideoEncodeRateControlLayerInfoKHR = 1000299002, + + /// + /// VideoEncodeCapabilitiesKHR + /// + VideoEncodeCapabilitiesKHR = 1000299003, + + /// + /// VideoEncodeUsageInfoKHR + /// + VideoEncodeUsageInfoKHR = 1000299004, + + /// + /// QueryPoolVideoEncodeFeedbackCreateInfoKHR + /// + QueryPoolVideoEncodeFeedbackCreateInfoKHR = 1000299005, + + /// + /// PhysicalDeviceVideoEncodeQualityLevelInfoKHR + /// + PhysicalDeviceVideoEncodeQualityLevelInfoKHR = 1000299006, + + /// + /// VideoEncodeQualityLevelPropertiesKHR + /// + VideoEncodeQualityLevelPropertiesKHR = 1000299007, + + /// + /// VideoEncodeQualityLevelInfoKHR + /// + VideoEncodeQualityLevelInfoKHR = 1000299008, + + /// + /// VideoEncodeSessionParametersGetInfoKHR + /// + VideoEncodeSessionParametersGetInfoKHR = 1000299009, + + /// + /// VideoEncodeSessionParametersFeedbackInfoKHR + /// + VideoEncodeSessionParametersFeedbackInfoKHR = 1000299010, + + /// + /// PhysicalDeviceDiagnosticsConfigFeaturesNV + /// + PhysicalDeviceDiagnosticsConfigFeaturesNV = 1000300000, + + /// + /// DeviceDiagnosticsConfigCreateInfoNV + /// + DeviceDiagnosticsConfigCreateInfoNV = 1000300001, + + /// + /// PerfHintInfoQCOM + /// + PerfHintInfoQCOM = 1000302000, + + /// + /// PhysicalDeviceQueuePerfHintFeaturesQCOM + /// + PhysicalDeviceQueuePerfHintFeaturesQCOM = 1000302001, + + /// + /// PhysicalDeviceQueuePerfHintPropertiesQCOM + /// + PhysicalDeviceQueuePerfHintPropertiesQCOM = 1000302002, + + /// + /// PhysicalDeviceImageProcessing3FeaturesQCOM + /// + PhysicalDeviceImageProcessing3FeaturesQCOM = 1000303000, + + /// + /// PhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM + /// + PhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM = 1000304000, + + /// + /// PhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM + /// + PhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM = 1000304001, + + /// + /// PhysicalDeviceShaderSplitBarrierFeaturesEXT + /// + PhysicalDeviceShaderSplitBarrierFeaturesEXT = 1000305000, + + /// + /// PhysicalDeviceShaderSplitBarrierPropertiesEXT + /// + PhysicalDeviceShaderSplitBarrierPropertiesEXT = 1000305001, + + /// + /// CudaModuleCreateInfoNV + /// + CudaModuleCreateInfoNV = 1000307000, + + /// + /// CudaFunctionCreateInfoNV + /// + CudaFunctionCreateInfoNV = 1000307001, + + /// + /// CudaLaunchInfoNV + /// + CudaLaunchInfoNV = 1000307002, + + /// + /// PhysicalDeviceCudaKernelLaunchFeaturesNV + /// + PhysicalDeviceCudaKernelLaunchFeaturesNV = 1000307003, + + /// + /// PhysicalDeviceCudaKernelLaunchPropertiesNV + /// + PhysicalDeviceCudaKernelLaunchPropertiesNV = 1000307004, + + /// + /// PhysicalDeviceTileShadingFeaturesQCOM + /// + PhysicalDeviceTileShadingFeaturesQCOM = 1000309000, + + /// + /// PhysicalDeviceTileShadingPropertiesQCOM + /// + PhysicalDeviceTileShadingPropertiesQCOM = 1000309001, + + /// + /// RenderPassTileShadingCreateInfoQCOM + /// + RenderPassTileShadingCreateInfoQCOM = 1000309002, + + /// + /// PerTileBeginInfoQCOM + /// + PerTileBeginInfoQCOM = 1000309003, + + /// + /// PerTileEndInfoQCOM + /// + PerTileEndInfoQCOM = 1000309004, + + /// + /// DispatchTileInfoQCOM + /// + DispatchTileInfoQCOM = 1000309005, + + /// + /// QueryLowLatencySupportNV + /// + QueryLowLatencySupportNV = 1000310000, + + /// + /// ExportMetalObjectCreateInfoEXT + /// + ExportMetalObjectCreateInfoEXT = 1000311000, + + /// + /// ExportMetalObjectsInfoEXT + /// + ExportMetalObjectsInfoEXT = 1000311001, + + /// + /// ExportMetalDeviceInfoEXT + /// + ExportMetalDeviceInfoEXT = 1000311002, + + /// + /// ExportMetalCommandQueueInfoEXT + /// + ExportMetalCommandQueueInfoEXT = 1000311003, + + /// + /// ExportMetalBufferInfoEXT + /// + ExportMetalBufferInfoEXT = 1000311004, + + /// + /// ImportMetalBufferInfoEXT + /// + ImportMetalBufferInfoEXT = 1000311005, + + /// + /// ExportMetalTextureInfoEXT + /// + ExportMetalTextureInfoEXT = 1000311006, + + /// + /// ImportMetalTextureInfoEXT + /// + ImportMetalTextureInfoEXT = 1000311007, + + /// + /// ExportMetalIoSurfaceInfoEXT + /// + ExportMetalIoSurfaceInfoEXT = 1000311008, + + /// + /// ImportMetalIoSurfaceInfoEXT + /// + ImportMetalIoSurfaceInfoEXT = 1000311009, + + /// + /// ExportMetalSharedEventInfoEXT + /// + ExportMetalSharedEventInfoEXT = 1000311010, + + /// + /// ImportMetalSharedEventInfoEXT + /// + ImportMetalSharedEventInfoEXT = 1000311011, + + /// + /// PhysicalDeviceDescriptorBufferPropertiesEXT + /// + PhysicalDeviceDescriptorBufferPropertiesEXT = 1000316000, + + /// + /// PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT + /// + PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT = 1000316001, + + /// + /// PhysicalDeviceDescriptorBufferFeaturesEXT + /// + PhysicalDeviceDescriptorBufferFeaturesEXT = 1000316002, + + /// + /// DescriptorAddressInfoEXT + /// + DescriptorAddressInfoEXT = 1000316003, + + /// + /// DescriptorGetInfoEXT + /// + DescriptorGetInfoEXT = 1000316004, + + /// + /// BufferCaptureDescriptorDataInfoEXT + /// + BufferCaptureDescriptorDataInfoEXT = 1000316005, + + /// + /// ImageCaptureDescriptorDataInfoEXT + /// + ImageCaptureDescriptorDataInfoEXT = 1000316006, + + /// + /// ImageViewCaptureDescriptorDataInfoEXT + /// + ImageViewCaptureDescriptorDataInfoEXT = 1000316007, + + /// + /// SamplerCaptureDescriptorDataInfoEXT + /// + SamplerCaptureDescriptorDataInfoEXT = 1000316008, + + /// + /// OpaqueCaptureDescriptorDataCreateInfoEXT + /// + OpaqueCaptureDescriptorDataCreateInfoEXT = 1000316010, + + /// + /// DescriptorBufferBindingInfoEXT + /// + DescriptorBufferBindingInfoEXT = 1000316011, + + /// + /// DescriptorBufferBindingPushDescriptorBufferHandleEXT + /// + DescriptorBufferBindingPushDescriptorBufferHandleEXT = 1000316012, + + /// + /// AccelerationStructureCaptureDescriptorDataInfoEXT + /// + AccelerationStructureCaptureDescriptorDataInfoEXT = 1000316009, + + /// + /// DeviceMemoryCopyKHR + /// + DeviceMemoryCopyKHR = 1000318000, + + /// + /// CopyDeviceMemoryInfoKHR + /// + CopyDeviceMemoryInfoKHR = 1000318001, + + /// + /// DeviceMemoryImageCopyKHR + /// + DeviceMemoryImageCopyKHR = 1000318002, + + /// + /// CopyDeviceMemoryImageInfoKHR + /// + CopyDeviceMemoryImageInfoKHR = 1000318003, + + /// + /// MemoryRangeBarriersInfoKHR + /// + MemoryRangeBarriersInfoKHR = 1000318004, + + /// + /// MemoryRangeBarrierKHR + /// + MemoryRangeBarrierKHR = 1000318005, + + /// + /// PhysicalDeviceDeviceAddressCommandsFeaturesKHR + /// + PhysicalDeviceDeviceAddressCommandsFeaturesKHR = 1000318006, + + /// + /// BindIndexBuffer3InfoKHR + /// + BindIndexBuffer3InfoKHR = 1000318007, + + /// + /// BindVertexBuffer3InfoKHR + /// + BindVertexBuffer3InfoKHR = 1000318008, + + /// + /// DrawIndirect2InfoKHR + /// + DrawIndirect2InfoKHR = 1000318009, + + /// + /// DrawIndirectCount2InfoKHR + /// + DrawIndirectCount2InfoKHR = 1000318010, + + /// + /// DispatchIndirect2InfoKHR + /// + DispatchIndirect2InfoKHR = 1000318011, + + /// + /// ConditionalRenderingBeginInfo2EXT + /// + ConditionalRenderingBeginInfo2EXT = 1000318012, + + /// + /// BindTransformFeedbackBuffer2InfoEXT + /// + BindTransformFeedbackBuffer2InfoEXT = 1000318013, + + /// + /// MemoryMarkerInfoAMD + /// + MemoryMarkerInfoAMD = 1000318014, + + /// + /// AccelerationStructureCreateInfo2KHR + /// + AccelerationStructureCreateInfo2KHR = 1000318015, + + /// + /// PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT + /// + PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT = 1000320000, + + /// + /// PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT + /// + PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT = 1000320001, + + /// + /// GraphicsPipelineLibraryCreateInfoEXT + /// + GraphicsPipelineLibraryCreateInfoEXT = 1000320002, + + /// + /// PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD + /// + PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD = 1000321000, + + /// + /// PhysicalDeviceFragmentShaderBarycentricFeaturesKHR + /// + PhysicalDeviceFragmentShaderBarycentricFeaturesKHR = 1000203000, + + /// + /// PhysicalDeviceFragmentShaderBarycentricPropertiesKHR + /// + PhysicalDeviceFragmentShaderBarycentricPropertiesKHR = 1000322000, + + /// + /// PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR + /// + PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR = 1000323000, + + /// + /// PhysicalDeviceFragmentShadingRateEnumsPropertiesNV + /// + PhysicalDeviceFragmentShadingRateEnumsPropertiesNV = 1000326000, + + /// + /// PhysicalDeviceFragmentShadingRateEnumsFeaturesNV + /// + PhysicalDeviceFragmentShadingRateEnumsFeaturesNV = 1000326001, + + /// + /// PipelineFragmentShadingRateEnumStateCreateInfoNV + /// + PipelineFragmentShadingRateEnumStateCreateInfoNV = 1000326002, + + /// + /// AccelerationStructureGeometryMotionTrianglesDataNV + /// + AccelerationStructureGeometryMotionTrianglesDataNV = 1000327000, + + /// + /// PhysicalDeviceRayTracingMotionBlurFeaturesNV + /// + PhysicalDeviceRayTracingMotionBlurFeaturesNV = 1000327001, + + /// + /// AccelerationStructureMotionInfoNV + /// + AccelerationStructureMotionInfoNV = 1000327002, + + /// + /// PhysicalDeviceMeshShaderFeaturesEXT + /// + PhysicalDeviceMeshShaderFeaturesEXT = 1000328000, + + /// + /// PhysicalDeviceMeshShaderPropertiesEXT + /// + PhysicalDeviceMeshShaderPropertiesEXT = 1000328001, + + /// + /// PhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT + /// + PhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT = 1000330000, + + /// + /// PhysicalDeviceFragmentDensityMap2FeaturesEXT + /// + PhysicalDeviceFragmentDensityMap2FeaturesEXT = 1000332000, + + /// + /// PhysicalDeviceFragmentDensityMap2PropertiesEXT + /// + PhysicalDeviceFragmentDensityMap2PropertiesEXT = 1000332001, + + /// + /// CopyCommandTransformInfoQCOM + /// + CopyCommandTransformInfoQCOM = 1000333000, + + /// + /// PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR + /// + PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR = 1000336000, + + /// + /// PhysicalDeviceImageCompressionControlFeaturesEXT + /// + PhysicalDeviceImageCompressionControlFeaturesEXT = 1000338000, + + /// + /// ImageCompressionControlEXT + /// + ImageCompressionControlEXT = 1000338001, + + /// + /// ImageCompressionPropertiesEXT + /// + ImageCompressionPropertiesEXT = 1000338004, + + /// + /// PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT + /// + PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT = 1000339000, + + /// + /// PhysicalDevice4444FormatsFeaturesEXT + /// + PhysicalDevice4444FormatsFeaturesEXT = 1000340000, + + /// + /// PhysicalDeviceFaultFeaturesEXT + /// + PhysicalDeviceFaultFeaturesEXT = 1000341000, + + /// + /// DeviceFaultCountsEXT + /// + DeviceFaultCountsEXT = 1000341001, + + /// + /// DeviceFaultInfoEXT + /// + DeviceFaultInfoEXT = 1000341002, + + /// + /// PhysicalDeviceRgba10X6FormatsFeaturesEXT + /// + PhysicalDeviceRgba10X6FormatsFeaturesEXT = 1000344000, + + /// + /// DirectfbSurfaceCreateInfoEXT + /// + DirectfbSurfaceCreateInfoEXT = 1000346000, + + /// + /// PhysicalDeviceVertexInputDynamicStateFeaturesEXT + /// + PhysicalDeviceVertexInputDynamicStateFeaturesEXT = 1000352000, + + /// + /// VertexInputBindingDescription2EXT + /// + VertexInputBindingDescription2EXT = 1000352001, + + /// + /// VertexInputAttributeDescription2EXT + /// + VertexInputAttributeDescription2EXT = 1000352002, + + /// + /// PhysicalDeviceDrmPropertiesEXT + /// + PhysicalDeviceDrmPropertiesEXT = 1000353000, + + /// + /// PhysicalDeviceAddressBindingReportFeaturesEXT + /// + PhysicalDeviceAddressBindingReportFeaturesEXT = 1000354000, + + /// + /// DeviceAddressBindingCallbackDataEXT + /// + DeviceAddressBindingCallbackDataEXT = 1000354001, + + /// + /// PhysicalDeviceDepthClipControlFeaturesEXT + /// + PhysicalDeviceDepthClipControlFeaturesEXT = 1000355000, + + /// + /// PipelineViewportDepthClipControlCreateInfoEXT + /// + PipelineViewportDepthClipControlCreateInfoEXT = 1000355001, + + /// + /// PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT + /// + PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT = 1000356000, + + /// + /// ImportMemoryZirconHandleInfoFUCHSIA + /// + ImportMemoryZirconHandleInfoFUCHSIA = 1000364000, + + /// + /// MemoryZirconHandlePropertiesFUCHSIA + /// + MemoryZirconHandlePropertiesFUCHSIA = 1000364001, + + /// + /// MemoryGetZirconHandleInfoFUCHSIA + /// + MemoryGetZirconHandleInfoFUCHSIA = 1000364002, + + /// + /// ImportSemaphoreZirconHandleInfoFUCHSIA + /// + ImportSemaphoreZirconHandleInfoFUCHSIA = 1000365000, + + /// + /// SemaphoreGetZirconHandleInfoFUCHSIA + /// + SemaphoreGetZirconHandleInfoFUCHSIA = 1000365001, + + /// + /// BufferCollectionCreateInfoFUCHSIA + /// + BufferCollectionCreateInfoFUCHSIA = 1000366000, + + /// + /// ImportMemoryBufferCollectionFUCHSIA + /// + ImportMemoryBufferCollectionFUCHSIA = 1000366001, + + /// + /// BufferCollectionImageCreateInfoFUCHSIA + /// + BufferCollectionImageCreateInfoFUCHSIA = 1000366002, + + /// + /// BufferCollectionPropertiesFUCHSIA + /// + BufferCollectionPropertiesFUCHSIA = 1000366003, + + /// + /// BufferConstraintsInfoFUCHSIA + /// + BufferConstraintsInfoFUCHSIA = 1000366004, + + /// + /// BufferCollectionBufferCreateInfoFUCHSIA + /// + BufferCollectionBufferCreateInfoFUCHSIA = 1000366005, + + /// + /// ImageConstraintsInfoFUCHSIA + /// + ImageConstraintsInfoFUCHSIA = 1000366006, + + /// + /// ImageFormatConstraintsInfoFUCHSIA + /// + ImageFormatConstraintsInfoFUCHSIA = 1000366007, + + /// + /// SysmemColorSpaceFUCHSIA + /// + SysmemColorSpaceFUCHSIA = 1000366008, + + /// + /// BufferCollectionConstraintsInfoFUCHSIA + /// + BufferCollectionConstraintsInfoFUCHSIA = 1000366009, + + /// + /// SubpassShadingPipelineCreateInfoHUAWEI + /// + SubpassShadingPipelineCreateInfoHUAWEI = 1000369000, + + /// + /// PhysicalDeviceSubpassShadingFeaturesHUAWEI + /// + PhysicalDeviceSubpassShadingFeaturesHUAWEI = 1000369001, + + /// + /// PhysicalDeviceSubpassShadingPropertiesHUAWEI + /// + PhysicalDeviceSubpassShadingPropertiesHUAWEI = 1000369002, + + /// + /// PhysicalDeviceInvocationMaskFeaturesHUAWEI + /// + PhysicalDeviceInvocationMaskFeaturesHUAWEI = 1000370000, + + /// + /// MemoryGetRemoteAddressInfoNV + /// + MemoryGetRemoteAddressInfoNV = 1000371000, + + /// + /// PhysicalDeviceExternalMemoryRdmaFeaturesNV + /// + PhysicalDeviceExternalMemoryRdmaFeaturesNV = 1000371001, + + /// + /// PipelinePropertiesIdentifierEXT + /// + PipelinePropertiesIdentifierEXT = 1000372000, + + /// + /// PhysicalDevicePipelinePropertiesFeaturesEXT + /// + PhysicalDevicePipelinePropertiesFeaturesEXT = 1000372001, + + /// + /// PhysicalDeviceFrameBoundaryFeaturesEXT + /// + PhysicalDeviceFrameBoundaryFeaturesEXT = 1000375000, + + /// + /// FrameBoundaryEXT + /// + FrameBoundaryEXT = 1000375001, + + /// + /// PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT + /// + PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT = 1000376000, + + /// + /// SubpassResolvePerformanceQueryEXT + /// + SubpassResolvePerformanceQueryEXT = 1000376001, + + /// + /// MultisampledRenderToSingleSampledInfoEXT + /// + MultisampledRenderToSingleSampledInfoEXT = 1000376002, + + /// + /// PhysicalDeviceExtendedDynamicState2FeaturesEXT + /// + PhysicalDeviceExtendedDynamicState2FeaturesEXT = 1000377000, + + /// + /// ScreenSurfaceCreateInfoQNX + /// + ScreenSurfaceCreateInfoQNX = 1000378000, + + /// + /// PhysicalDeviceColorWriteEnableFeaturesEXT + /// + PhysicalDeviceColorWriteEnableFeaturesEXT = 1000381000, + + /// + /// PipelineColorWriteCreateInfoEXT + /// + PipelineColorWriteCreateInfoEXT = 1000381001, + + /// + /// PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT + /// + PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT = 1000382000, + + /// + /// PhysicalDeviceRayTracingMaintenance1FeaturesKHR + /// + PhysicalDeviceRayTracingMaintenance1FeaturesKHR = 1000386000, + + /// + /// PhysicalDeviceShaderUntypedPointersFeaturesKHR + /// + PhysicalDeviceShaderUntypedPointersFeaturesKHR = 1000387000, + + /// + /// PhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE + /// + PhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE = 1000390000, + + /// + /// VideoEncodeRGBConversionCapabilitiesVALVE + /// + VideoEncodeRGBConversionCapabilitiesVALVE = 1000390001, + + /// + /// VideoEncodeProfileRGBConversionInfoVALVE + /// + VideoEncodeProfileRGBConversionInfoVALVE = 1000390002, + + /// + /// VideoEncodeSessionRGBConversionCreateInfoVALVE + /// + VideoEncodeSessionRGBConversionCreateInfoVALVE = 1000390003, + + /// + /// PhysicalDeviceImageViewMinLodFeaturesEXT + /// + PhysicalDeviceImageViewMinLodFeaturesEXT = 1000391000, + + /// + /// ImageViewMinLodCreateInfoEXT + /// + ImageViewMinLodCreateInfoEXT = 1000391001, + + /// + /// PhysicalDeviceMultiDrawFeaturesEXT + /// + PhysicalDeviceMultiDrawFeaturesEXT = 1000392000, + + /// + /// PhysicalDeviceMultiDrawPropertiesEXT + /// + PhysicalDeviceMultiDrawPropertiesEXT = 1000392001, + + /// + /// PhysicalDeviceImage2DViewOf3DFeaturesEXT + /// + PhysicalDeviceImage2DViewOf3DFeaturesEXT = 1000393000, + + /// + /// PhysicalDeviceShaderTileImageFeaturesEXT + /// + PhysicalDeviceShaderTileImageFeaturesEXT = 1000395000, + + /// + /// PhysicalDeviceShaderTileImagePropertiesEXT + /// + PhysicalDeviceShaderTileImagePropertiesEXT = 1000395001, + + /// + /// MicromapBuildInfoEXT + /// + MicromapBuildInfoEXT = 1000396000, + + /// + /// MicromapVersionInfoEXT + /// + MicromapVersionInfoEXT = 1000396001, + + /// + /// CopyMicromapInfoEXT + /// + CopyMicromapInfoEXT = 1000396002, + + /// + /// CopyMicromapToMemoryInfoEXT + /// + CopyMicromapToMemoryInfoEXT = 1000396003, + + /// + /// CopyMemoryToMicromapInfoEXT + /// + CopyMemoryToMicromapInfoEXT = 1000396004, + + /// + /// PhysicalDeviceOpacityMicromapFeaturesEXT + /// + PhysicalDeviceOpacityMicromapFeaturesEXT = 1000396005, + + /// + /// PhysicalDeviceOpacityMicromapPropertiesEXT + /// + PhysicalDeviceOpacityMicromapPropertiesEXT = 1000396006, + + /// + /// MicromapCreateInfoEXT + /// + MicromapCreateInfoEXT = 1000396007, + + /// + /// MicromapBuildSizesInfoEXT + /// + MicromapBuildSizesInfoEXT = 1000396008, + + /// + /// AccelerationStructureTrianglesOpacityMicromapEXT + /// + AccelerationStructureTrianglesOpacityMicromapEXT = 1000396009, + + /// + /// PhysicalDeviceDisplacementMicromapFeaturesNV + /// + PhysicalDeviceDisplacementMicromapFeaturesNV = 1000397000, + + /// + /// PhysicalDeviceDisplacementMicromapPropertiesNV + /// + PhysicalDeviceDisplacementMicromapPropertiesNV = 1000397001, + + /// + /// AccelerationStructureTrianglesDisplacementMicromapNV + /// + AccelerationStructureTrianglesDisplacementMicromapNV = 1000397002, + + /// + /// PhysicalDeviceClusterCullingShaderFeaturesHUAWEI + /// + PhysicalDeviceClusterCullingShaderFeaturesHUAWEI = 1000404000, + + /// + /// PhysicalDeviceClusterCullingShaderPropertiesHUAWEI + /// + PhysicalDeviceClusterCullingShaderPropertiesHUAWEI = 1000404001, + + /// + /// PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI + /// + PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI = 1000404002, + + /// + /// PhysicalDeviceBorderColorSwizzleFeaturesEXT + /// + PhysicalDeviceBorderColorSwizzleFeaturesEXT = 1000411000, + + /// + /// SamplerBorderColorComponentMappingCreateInfoEXT + /// + SamplerBorderColorComponentMappingCreateInfoEXT = 1000411001, + + /// + /// PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT + /// + PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT = 1000412000, + + /// + /// PhysicalDeviceShaderCorePropertiesARM + /// + PhysicalDeviceShaderCorePropertiesARM = 1000415000, + + /// + /// DeviceQueueShaderCoreControlCreateInfoARM + /// + DeviceQueueShaderCoreControlCreateInfoARM = 1000417000, + + /// + /// PhysicalDeviceSchedulingControlsFeaturesARM + /// + PhysicalDeviceSchedulingControlsFeaturesARM = 1000417001, + + /// + /// PhysicalDeviceSchedulingControlsPropertiesARM + /// + PhysicalDeviceSchedulingControlsPropertiesARM = 1000417002, + + /// + /// DispatchParametersARM + /// + DispatchParametersARM = 1000417003, + + /// + /// PhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM + /// + PhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM = 1000417004, + + /// + /// PhysicalDeviceImageSlicedViewOf3DFeaturesEXT + /// + PhysicalDeviceImageSlicedViewOf3DFeaturesEXT = 1000418000, + + /// + /// ImageViewSlicedCreateInfoEXT + /// + ImageViewSlicedCreateInfoEXT = 1000418001, + + /// + /// PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE + /// + PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE = 1000420000, + + /// + /// DescriptorSetBindingReferenceVALVE + /// + DescriptorSetBindingReferenceVALVE = 1000420001, + + /// + /// DescriptorSetLayoutHostMappingInfoVALVE + /// + DescriptorSetLayoutHostMappingInfoVALVE = 1000420002, + + /// + /// PhysicalDeviceNonSeamlessCubeMapFeaturesEXT + /// + PhysicalDeviceNonSeamlessCubeMapFeaturesEXT = 1000422000, + + /// + /// PhysicalDeviceRenderPassStripedFeaturesARM + /// + PhysicalDeviceRenderPassStripedFeaturesARM = 1000424000, + + /// + /// PhysicalDeviceRenderPassStripedPropertiesARM + /// + PhysicalDeviceRenderPassStripedPropertiesARM = 1000424001, + + /// + /// RenderPassStripeBeginInfoARM + /// + RenderPassStripeBeginInfoARM = 1000424002, + + /// + /// RenderPassStripeInfoARM + /// + RenderPassStripeInfoARM = 1000424003, + + /// + /// RenderPassStripeSubmitInfoARM + /// + RenderPassStripeSubmitInfoARM = 1000424004, + + /// + /// PhysicalDeviceCopyMemoryIndirectFeaturesNV + /// + PhysicalDeviceCopyMemoryIndirectFeaturesNV = 1000426000, + + /// + /// PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV + /// + PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV = 1000428000, + + /// + /// ComputePipelineIndirectBufferInfoNV + /// + ComputePipelineIndirectBufferInfoNV = 1000428001, + + /// + /// PipelineIndirectDeviceAddressInfoNV + /// + PipelineIndirectDeviceAddressInfoNV = 1000428002, + + /// + /// PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV + /// + PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV = 1000429008, + + /// + /// AccelerationStructureGeometryLinearSweptSpheresDataNV + /// + AccelerationStructureGeometryLinearSweptSpheresDataNV = 1000429009, + + /// + /// AccelerationStructureGeometrySpheresDataNV + /// + AccelerationStructureGeometrySpheresDataNV = 1000429010, + + /// + /// PhysicalDeviceLinearColorAttachmentFeaturesNV + /// + PhysicalDeviceLinearColorAttachmentFeaturesNV = 1000430000, + + /// + /// PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR + /// + PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR = 1000434000, + + /// + /// PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT + /// + PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT = 1000437000, + + /// + /// PhysicalDeviceImageProcessingFeaturesQCOM + /// + PhysicalDeviceImageProcessingFeaturesQCOM = 1000440000, + + /// + /// PhysicalDeviceImageProcessingPropertiesQCOM + /// + PhysicalDeviceImageProcessingPropertiesQCOM = 1000440001, + + /// + /// ImageViewSampleWeightCreateInfoQCOM + /// + ImageViewSampleWeightCreateInfoQCOM = 1000440002, + + /// + /// PhysicalDeviceNestedCommandBufferFeaturesEXT + /// + PhysicalDeviceNestedCommandBufferFeaturesEXT = 1000451000, + + /// + /// PhysicalDeviceNestedCommandBufferPropertiesEXT + /// + PhysicalDeviceNestedCommandBufferPropertiesEXT = 1000451001, + + /// + /// NativeBufferUsageOHOS + /// + NativeBufferUsageOHOS = 1000452000, + + /// + /// NativeBufferPropertiesOHOS + /// + NativeBufferPropertiesOHOS = 1000452001, + + /// + /// NativeBufferFormatPropertiesOHOS + /// + NativeBufferFormatPropertiesOHOS = 1000452002, + + /// + /// ImportNativeBufferInfoOHOS + /// + ImportNativeBufferInfoOHOS = 1000452003, + + /// + /// MemoryGetNativeBufferInfoOHOS + /// + MemoryGetNativeBufferInfoOHOS = 1000452004, + + /// + /// ExternalFormatOHOS + /// + ExternalFormatOHOS = 1000452005, + + /// + /// ExternalMemoryAcquireUnmodifiedEXT + /// + ExternalMemoryAcquireUnmodifiedEXT = 1000453000, + + /// + /// PhysicalDeviceExtendedDynamicState3FeaturesEXT + /// + PhysicalDeviceExtendedDynamicState3FeaturesEXT = 1000455000, + + /// + /// PhysicalDeviceExtendedDynamicState3PropertiesEXT + /// + PhysicalDeviceExtendedDynamicState3PropertiesEXT = 1000455001, + + /// + /// PhysicalDeviceSubpassMergeFeedbackFeaturesEXT + /// + PhysicalDeviceSubpassMergeFeedbackFeaturesEXT = 1000458000, + + /// + /// RenderPassCreationControlEXT + /// + RenderPassCreationControlEXT = 1000458001, + + /// + /// RenderPassCreationFeedbackCreateInfoEXT + /// + RenderPassCreationFeedbackCreateInfoEXT = 1000458002, + + /// + /// RenderPassSubpassFeedbackCreateInfoEXT + /// + RenderPassSubpassFeedbackCreateInfoEXT = 1000458003, + + /// + /// DirectDriverLoadingInfoLUNARG + /// + DirectDriverLoadingInfoLUNARG = 1000459000, + + /// + /// DirectDriverLoadingListLUNARG + /// + DirectDriverLoadingListLUNARG = 1000459001, + + /// + /// TensorCreateInfoARM + /// + TensorCreateInfoARM = 1000460000, + + /// + /// TensorViewCreateInfoARM + /// + TensorViewCreateInfoARM = 1000460001, + + /// + /// BindTensorMemoryInfoARM + /// + BindTensorMemoryInfoARM = 1000460002, + + /// + /// WriteDescriptorSetTensorARM + /// + WriteDescriptorSetTensorARM = 1000460003, + + /// + /// PhysicalDeviceTensorPropertiesARM + /// + PhysicalDeviceTensorPropertiesARM = 1000460004, + + /// + /// TensorFormatPropertiesARM + /// + TensorFormatPropertiesARM = 1000460005, + + /// + /// TensorDescriptionARM + /// + TensorDescriptionARM = 1000460006, + + /// + /// TensorMemoryRequirementsInfoARM + /// + TensorMemoryRequirementsInfoARM = 1000460007, + + /// + /// TensorMemoryBarrierARM + /// + TensorMemoryBarrierARM = 1000460008, + + /// + /// PhysicalDeviceTensorFeaturesARM + /// + PhysicalDeviceTensorFeaturesARM = 1000460009, + + /// + /// DeviceTensorMemoryRequirementsARM + /// + DeviceTensorMemoryRequirementsARM = 1000460010, + + /// + /// CopyTensorInfoARM + /// + CopyTensorInfoARM = 1000460011, + + /// + /// TensorCopyARM + /// + TensorCopyARM = 1000460012, + + /// + /// TensorDependencyInfoARM + /// + TensorDependencyInfoARM = 1000460013, + + /// + /// MemoryDedicatedAllocateInfoTensorARM + /// + MemoryDedicatedAllocateInfoTensorARM = 1000460014, + + /// + /// PhysicalDeviceExternalTensorInfoARM + /// + PhysicalDeviceExternalTensorInfoARM = 1000460015, + + /// + /// ExternalTensorPropertiesARM + /// + ExternalTensorPropertiesARM = 1000460016, + + /// + /// ExternalMemoryTensorCreateInfoARM + /// + ExternalMemoryTensorCreateInfoARM = 1000460017, + + /// + /// PhysicalDeviceDescriptorBufferTensorFeaturesARM + /// + PhysicalDeviceDescriptorBufferTensorFeaturesARM = 1000460018, + + /// + /// PhysicalDeviceDescriptorBufferTensorPropertiesARM + /// + PhysicalDeviceDescriptorBufferTensorPropertiesARM = 1000460019, + + /// + /// DescriptorGetTensorInfoARM + /// + DescriptorGetTensorInfoARM = 1000460020, + + /// + /// TensorCaptureDescriptorDataInfoARM + /// + TensorCaptureDescriptorDataInfoARM = 1000460021, + + /// + /// TensorViewCaptureDescriptorDataInfoARM + /// + TensorViewCaptureDescriptorDataInfoARM = 1000460022, + + /// + /// FrameBoundaryTensorsARM + /// + FrameBoundaryTensorsARM = 1000460023, + + /// + /// PhysicalDeviceShaderModuleIdentifierFeaturesEXT + /// + PhysicalDeviceShaderModuleIdentifierFeaturesEXT = 1000462000, + + /// + /// PhysicalDeviceShaderModuleIdentifierPropertiesEXT + /// + PhysicalDeviceShaderModuleIdentifierPropertiesEXT = 1000462001, + + /// + /// PipelineShaderStageModuleIdentifierCreateInfoEXT + /// + PipelineShaderStageModuleIdentifierCreateInfoEXT = 1000462002, + + /// + /// ShaderModuleIdentifierEXT + /// + ShaderModuleIdentifierEXT = 1000462003, + + /// + /// PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT + /// + PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT = 1000342000, + + /// + /// PhysicalDeviceOpticalFlowFeaturesNV + /// + PhysicalDeviceOpticalFlowFeaturesNV = 1000464000, + + /// + /// PhysicalDeviceOpticalFlowPropertiesNV + /// + PhysicalDeviceOpticalFlowPropertiesNV = 1000464001, + + /// + /// OpticalFlowImageFormatInfoNV + /// + OpticalFlowImageFormatInfoNV = 1000464002, + + /// + /// OpticalFlowImageFormatPropertiesNV + /// + OpticalFlowImageFormatPropertiesNV = 1000464003, + + /// + /// OpticalFlowSessionCreateInfoNV + /// + OpticalFlowSessionCreateInfoNV = 1000464004, + + /// + /// OpticalFlowExecuteInfoNV + /// + OpticalFlowExecuteInfoNV = 1000464005, + + /// + /// OpticalFlowSessionCreatePrivateDataInfoNV + /// + OpticalFlowSessionCreatePrivateDataInfoNV = 1000464010, + + /// + /// PhysicalDeviceLegacyDitheringFeaturesEXT + /// + PhysicalDeviceLegacyDitheringFeaturesEXT = 1000465000, + + /// + /// PhysicalDeviceExternalFormatResolveFeaturesANDROID + /// + PhysicalDeviceExternalFormatResolveFeaturesANDROID = 1000468000, + + /// + /// PhysicalDeviceExternalFormatResolvePropertiesANDROID + /// + PhysicalDeviceExternalFormatResolvePropertiesANDROID = 1000468001, + + /// + /// ANDROIDHardwareBufferFormatResolvePropertiesANDROID + /// + ANDROIDHardwareBufferFormatResolvePropertiesANDROID = 1000468002, + + /// + /// PhysicalDeviceAntiLagFeaturesAMD + /// + PhysicalDeviceAntiLagFeaturesAMD = 1000476000, + + /// + /// AntiLagDataAMD + /// + AntiLagDataAMD = 1000476001, + + /// + /// AntiLagPresentationInfoAMD + /// + AntiLagPresentationInfoAMD = 1000476002, + + /// + /// PhysicalDeviceDenseGeometryFormatFeaturesAMDX + /// + PhysicalDeviceDenseGeometryFormatFeaturesAMDX = 1000478000, + + /// + /// AccelerationStructureDenseGeometryFormatTrianglesDataAMDX + /// + AccelerationStructureDenseGeometryFormatTrianglesDataAMDX = 1000478001, + + /// + /// SurfaceCapabilitiesPresentId2KHR + /// + SurfaceCapabilitiesPresentId2KHR = 1000479000, + + /// + /// PresentId2KHR + /// + PresentId2KHR = 1000479001, + + /// + /// PhysicalDevicePresentId2FeaturesKHR + /// + PhysicalDevicePresentId2FeaturesKHR = 1000479002, + + /// + /// SurfaceCapabilitiesPresentWait2KHR + /// + SurfaceCapabilitiesPresentWait2KHR = 1000480000, + + /// + /// PhysicalDevicePresentWait2FeaturesKHR + /// + PhysicalDevicePresentWait2FeaturesKHR = 1000480001, + + /// + /// PresentWait2InfoKHR + /// + PresentWait2InfoKHR = 1000480002, + + /// + /// PhysicalDeviceRayTracingPositionFetchFeaturesKHR + /// + PhysicalDeviceRayTracingPositionFetchFeaturesKHR = 1000481000, + + /// + /// PhysicalDeviceShaderObjectFeaturesEXT + /// + PhysicalDeviceShaderObjectFeaturesEXT = 1000482000, + + /// + /// PhysicalDeviceShaderObjectPropertiesEXT + /// + PhysicalDeviceShaderObjectPropertiesEXT = 1000482001, + + /// + /// ShaderCreateInfoEXT + /// + ShaderCreateInfoEXT = 1000482002, + + /// + /// PhysicalDevicePipelineBinaryFeaturesKHR + /// + PhysicalDevicePipelineBinaryFeaturesKHR = 1000483000, + + /// + /// PipelineBinaryCreateInfoKHR + /// + PipelineBinaryCreateInfoKHR = 1000483001, + + /// + /// PipelineBinaryInfoKHR + /// + PipelineBinaryInfoKHR = 1000483002, + + /// + /// PipelineBinaryKeyKHR + /// + PipelineBinaryKeyKHR = 1000483003, + + /// + /// PhysicalDevicePipelineBinaryPropertiesKHR + /// + PhysicalDevicePipelineBinaryPropertiesKHR = 1000483004, + + /// + /// ReleaseCapturedPipelineDataInfoKHR + /// + ReleaseCapturedPipelineDataInfoKHR = 1000483005, + + /// + /// PipelineBinaryDataInfoKHR + /// + PipelineBinaryDataInfoKHR = 1000483006, + + /// + /// PipelineCreateInfoKHR + /// + PipelineCreateInfoKHR = 1000483007, + + /// + /// DevicePipelineBinaryInternalCacheControlKHR + /// + DevicePipelineBinaryInternalCacheControlKHR = 1000483008, + + /// + /// PipelineBinaryHandlesInfoKHR + /// + PipelineBinaryHandlesInfoKHR = 1000483009, + + /// + /// PhysicalDeviceTilePropertiesFeaturesQCOM + /// + PhysicalDeviceTilePropertiesFeaturesQCOM = 1000484000, + + /// + /// TilePropertiesQCOM + /// + TilePropertiesQCOM = 1000484001, + + /// + /// PhysicalDeviceAmigoProfilingFeaturesSEC + /// + PhysicalDeviceAmigoProfilingFeaturesSEC = 1000485000, + + /// + /// AmigoProfilingSubmitInfoSEC + /// + AmigoProfilingSubmitInfoSEC = 1000485001, + + /// + /// SurfacePresentModeKHR + /// + SurfacePresentModeKHR = 1000274000, + + /// + /// SurfacePresentScalingCapabilitiesKHR + /// + SurfacePresentScalingCapabilitiesKHR = 1000274001, + + /// + /// SurfacePresentModeCompatibilityKHR + /// + SurfacePresentModeCompatibilityKHR = 1000274002, + + /// + /// PhysicalDeviceSwapchainMaintenance1FeaturesKHR + /// + PhysicalDeviceSwapchainMaintenance1FeaturesKHR = 1000275000, + + /// + /// SwapchainPresentFenceInfoKHR + /// + SwapchainPresentFenceInfoKHR = 1000275001, + + /// + /// SwapchainPresentModesCreateInfoKHR + /// + SwapchainPresentModesCreateInfoKHR = 1000275002, + + /// + /// SwapchainPresentModeInfoKHR + /// + SwapchainPresentModeInfoKHR = 1000275003, + + /// + /// SwapchainPresentScalingCreateInfoKHR + /// + SwapchainPresentScalingCreateInfoKHR = 1000275004, + + /// + /// ReleaseSwapchainImagesInfoKHR + /// + ReleaseSwapchainImagesInfoKHR = 1000275005, + + /// + /// PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM + /// + PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM = 1000488000, + + /// + /// PhysicalDeviceRayTracingInvocationReorderFeaturesNV + /// + PhysicalDeviceRayTracingInvocationReorderFeaturesNV = 1000490000, + + /// + /// PhysicalDeviceRayTracingInvocationReorderPropertiesNV + /// + PhysicalDeviceRayTracingInvocationReorderPropertiesNV = 1000490001, + + /// + /// PhysicalDeviceCooperativeVectorFeaturesNV + /// + PhysicalDeviceCooperativeVectorFeaturesNV = 1000491000, + + /// + /// PhysicalDeviceCooperativeVectorPropertiesNV + /// + PhysicalDeviceCooperativeVectorPropertiesNV = 1000491001, + + /// + /// CooperativeVectorPropertiesNV + /// + CooperativeVectorPropertiesNV = 1000491002, + + /// + /// ConvertCooperativeVectorMatrixInfoNV + /// + ConvertCooperativeVectorMatrixInfoNV = 1000491004, + + /// + /// PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV + /// + PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV = 1000492000, + + /// + /// PhysicalDeviceExtendedSparseAddressSpacePropertiesNV + /// + PhysicalDeviceExtendedSparseAddressSpacePropertiesNV = 1000492001, + + /// + /// PhysicalDeviceMutableDescriptorTypeFeaturesEXT + /// + PhysicalDeviceMutableDescriptorTypeFeaturesEXT = 1000351000, + + /// + /// MutableDescriptorTypeCreateInfoEXT + /// + MutableDescriptorTypeCreateInfoEXT = 1000351002, + + /// + /// PhysicalDeviceLegacyVertexAttributesFeaturesEXT + /// + PhysicalDeviceLegacyVertexAttributesFeaturesEXT = 1000495000, + + /// + /// PhysicalDeviceLegacyVertexAttributesPropertiesEXT + /// + PhysicalDeviceLegacyVertexAttributesPropertiesEXT = 1000495001, + + /// + /// LayerSettingsCreateInfoEXT + /// + LayerSettingsCreateInfoEXT = 1000496000, + + /// + /// PhysicalDeviceShaderCoreBuiltinsFeaturesARM + /// + PhysicalDeviceShaderCoreBuiltinsFeaturesARM = 1000497000, + + /// + /// PhysicalDeviceShaderCoreBuiltinsPropertiesARM + /// + PhysicalDeviceShaderCoreBuiltinsPropertiesARM = 1000497001, + + /// + /// PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT + /// + PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT = 1000498000, + + /// + /// PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT + /// + PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT = 1000499000, + + /// + /// PhysicalDeviceInternallySynchronizedQueuesFeaturesKHR + /// + PhysicalDeviceInternallySynchronizedQueuesFeaturesKHR = 1000504000, + + /// + /// LatencySleepModeInfoNV + /// + LatencySleepModeInfoNV = 1000505000, + + /// + /// LatencySleepInfoNV + /// + LatencySleepInfoNV = 1000505001, + + /// + /// SetLatencyMarkerInfoNV + /// + SetLatencyMarkerInfoNV = 1000505002, + + /// + /// GetLatencyMarkerInfoNV + /// + GetLatencyMarkerInfoNV = 1000505003, + + /// + /// LatencyTimingsFrameReportNV + /// + LatencyTimingsFrameReportNV = 1000505004, + + /// + /// LatencySubmissionPresentIdNV + /// + LatencySubmissionPresentIdNV = 1000505005, + + /// + /// OutOfBandQueueTypeInfoNV + /// + OutOfBandQueueTypeInfoNV = 1000505006, + + /// + /// SwapchainLatencyCreateInfoNV + /// + SwapchainLatencyCreateInfoNV = 1000505007, + + /// + /// LatencySurfaceCapabilitiesNV + /// + LatencySurfaceCapabilitiesNV = 1000505008, + + /// + /// PhysicalDeviceCooperativeMatrixFeaturesKHR + /// + PhysicalDeviceCooperativeMatrixFeaturesKHR = 1000506000, + + /// + /// CooperativeMatrixPropertiesKHR + /// + CooperativeMatrixPropertiesKHR = 1000506001, + + /// + /// PhysicalDeviceCooperativeMatrixPropertiesKHR + /// + PhysicalDeviceCooperativeMatrixPropertiesKHR = 1000506002, + + /// + /// DataGraphPipelineCreateInfoARM + /// + DataGraphPipelineCreateInfoARM = 1000507000, + + /// + /// DataGraphPipelineSessionCreateInfoARM + /// + DataGraphPipelineSessionCreateInfoARM = 1000507001, + + /// + /// DataGraphPipelineResourceInfoARM + /// + DataGraphPipelineResourceInfoARM = 1000507002, + + /// + /// DataGraphPipelineConstantARM + /// + DataGraphPipelineConstantARM = 1000507003, + + /// + /// DataGraphPipelineSessionMemoryRequirementsInfoARM + /// + DataGraphPipelineSessionMemoryRequirementsInfoARM = 1000507004, + + /// + /// BindDataGraphPipelineSessionMemoryInfoARM + /// + BindDataGraphPipelineSessionMemoryInfoARM = 1000507005, + + /// + /// PhysicalDeviceDataGraphFeaturesARM + /// + PhysicalDeviceDataGraphFeaturesARM = 1000507006, + + /// + /// DataGraphPipelineShaderModuleCreateInfoARM + /// + DataGraphPipelineShaderModuleCreateInfoARM = 1000507007, + + /// + /// DataGraphPipelinePropertyQueryResultARM + /// + DataGraphPipelinePropertyQueryResultARM = 1000507008, + + /// + /// DataGraphPipelineInfoARM + /// + DataGraphPipelineInfoARM = 1000507009, + + /// + /// DataGraphPipelineCompilerControlCreateInfoARM + /// + DataGraphPipelineCompilerControlCreateInfoARM = 1000507010, + + /// + /// DataGraphPipelineSessionBindPointRequirementsInfoARM + /// + DataGraphPipelineSessionBindPointRequirementsInfoARM = 1000507011, + + /// + /// DataGraphPipelineSessionBindPointRequirementARM + /// + DataGraphPipelineSessionBindPointRequirementARM = 1000507012, + + /// + /// DataGraphPipelineIdentifierCreateInfoARM + /// + DataGraphPipelineIdentifierCreateInfoARM = 1000507013, + + /// + /// DataGraphPipelineDispatchInfoARM + /// + DataGraphPipelineDispatchInfoARM = 1000507014, + + /// + /// DataGraphProcessingEngineCreateInfoARM + /// + DataGraphProcessingEngineCreateInfoARM = 1000507016, + + /// + /// QueueFamilyDataGraphProcessingEnginePropertiesARM + /// + QueueFamilyDataGraphProcessingEnginePropertiesARM = 1000507017, + + /// + /// QueueFamilyDataGraphPropertiesARM + /// + QueueFamilyDataGraphPropertiesARM = 1000507018, + + /// + /// PhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM + /// + PhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM = 1000507019, + + /// + /// DataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM + /// + DataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM = 1000507015, + + /// + /// QueueFamilyDataGraphTosaPropertiesARM + /// + QueueFamilyDataGraphTosaPropertiesARM = 1000508000, + + /// + /// PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM + /// + PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM = 1000510000, + + /// + /// MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM + /// + MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM = 1000510001, + + /// + /// PhysicalDeviceComputeShaderDerivativesFeaturesKHR + /// + PhysicalDeviceComputeShaderDerivativesFeaturesKHR = 1000201000, + + /// + /// PhysicalDeviceComputeShaderDerivativesPropertiesKHR + /// + PhysicalDeviceComputeShaderDerivativesPropertiesKHR = 1000511000, + + /// + /// VideoDecodeAV1CapabilitiesKHR + /// + VideoDecodeAV1CapabilitiesKHR = 1000512000, + + /// + /// VideoDecodeAV1PictureInfoKHR + /// + VideoDecodeAV1PictureInfoKHR = 1000512001, + + /// + /// VideoDecodeAV1ProfileInfoKHR + /// + VideoDecodeAV1ProfileInfoKHR = 1000512003, + + /// + /// VideoDecodeAV1SessionParametersCreateInfoKHR + /// + VideoDecodeAV1SessionParametersCreateInfoKHR = 1000512004, + + /// + /// VideoDecodeAV1DpbSlotInfoKHR + /// + VideoDecodeAV1DpbSlotInfoKHR = 1000512005, + + /// + /// VideoEncodeAV1CapabilitiesKHR + /// + VideoEncodeAV1CapabilitiesKHR = 1000513000, + + /// + /// VideoEncodeAV1SessionParametersCreateInfoKHR + /// + VideoEncodeAV1SessionParametersCreateInfoKHR = 1000513001, + + /// + /// VideoEncodeAV1PictureInfoKHR + /// + VideoEncodeAV1PictureInfoKHR = 1000513002, + + /// + /// VideoEncodeAV1DpbSlotInfoKHR + /// + VideoEncodeAV1DpbSlotInfoKHR = 1000513003, + + /// + /// PhysicalDeviceVideoEncodeAV1FeaturesKHR + /// + PhysicalDeviceVideoEncodeAV1FeaturesKHR = 1000513004, + + /// + /// VideoEncodeAV1ProfileInfoKHR + /// + VideoEncodeAV1ProfileInfoKHR = 1000513005, + + /// + /// VideoEncodeAV1RateControlInfoKHR + /// + VideoEncodeAV1RateControlInfoKHR = 1000513006, + + /// + /// VideoEncodeAV1RateControlLayerInfoKHR + /// + VideoEncodeAV1RateControlLayerInfoKHR = 1000513007, + + /// + /// VideoEncodeAV1QualityLevelPropertiesKHR + /// + VideoEncodeAV1QualityLevelPropertiesKHR = 1000513008, + + /// + /// VideoEncodeAV1SessionCreateInfoKHR + /// + VideoEncodeAV1SessionCreateInfoKHR = 1000513009, + + /// + /// VideoEncodeAV1GopRemainingFrameInfoKHR + /// + VideoEncodeAV1GopRemainingFrameInfoKHR = 1000513010, + + /// + /// PhysicalDeviceVideoDecodeVP9FeaturesKHR + /// + PhysicalDeviceVideoDecodeVP9FeaturesKHR = 1000514000, + + /// + /// VideoDecodeVP9CapabilitiesKHR + /// + VideoDecodeVP9CapabilitiesKHR = 1000514001, + + /// + /// VideoDecodeVP9PictureInfoKHR + /// + VideoDecodeVP9PictureInfoKHR = 1000514002, + + /// + /// VideoDecodeVP9ProfileInfoKHR + /// + VideoDecodeVP9ProfileInfoKHR = 1000514003, + + /// + /// PhysicalDeviceVideoMaintenance1FeaturesKHR + /// + PhysicalDeviceVideoMaintenance1FeaturesKHR = 1000515000, + + /// + /// VideoInlineQueryInfoKHR + /// + VideoInlineQueryInfoKHR = 1000515001, + + /// + /// PhysicalDevicePerStageDescriptorSetFeaturesNV + /// + PhysicalDevicePerStageDescriptorSetFeaturesNV = 1000516000, + + /// + /// PhysicalDeviceImageProcessing2FeaturesQCOM + /// + PhysicalDeviceImageProcessing2FeaturesQCOM = 1000518000, + + /// + /// PhysicalDeviceImageProcessing2PropertiesQCOM + /// + PhysicalDeviceImageProcessing2PropertiesQCOM = 1000518001, + + /// + /// SamplerBlockMatchWindowCreateInfoQCOM + /// + SamplerBlockMatchWindowCreateInfoQCOM = 1000518002, + + /// + /// SamplerCubicWeightsCreateInfoQCOM + /// + SamplerCubicWeightsCreateInfoQCOM = 1000519000, + + /// + /// PhysicalDeviceCubicWeightsFeaturesQCOM + /// + PhysicalDeviceCubicWeightsFeaturesQCOM = 1000519001, + + /// + /// BlitImageCubicWeightsInfoQCOM + /// + BlitImageCubicWeightsInfoQCOM = 1000519002, + + /// + /// PhysicalDeviceYCbCrDegammaFeaturesQCOM + /// + PhysicalDeviceYCbCrDegammaFeaturesQCOM = 1000520000, + + /// + /// SamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM + /// + SamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM = 1000520001, + + /// + /// PhysicalDeviceCubicClampFeaturesQCOM + /// + PhysicalDeviceCubicClampFeaturesQCOM = 1000521000, + + /// + /// PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT + /// + PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT = 1000524000, + + /// + /// PhysicalDeviceUnifiedImageLayoutsFeaturesKHR + /// + PhysicalDeviceUnifiedImageLayoutsFeaturesKHR = 1000527000, + + /// + /// AttachmentFeedbackLoopInfoEXT + /// + AttachmentFeedbackLoopInfoEXT = 1000527001, + + /// + /// ScreenBufferPropertiesQNX + /// + ScreenBufferPropertiesQNX = 1000529000, + + /// + /// ScreenBufferFormatPropertiesQNX + /// + ScreenBufferFormatPropertiesQNX = 1000529001, + + /// + /// ImportScreenBufferInfoQNX + /// + ImportScreenBufferInfoQNX = 1000529002, + + /// + /// ExternalFormatQNX + /// + ExternalFormatQNX = 1000529003, + + /// + /// PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX + /// + PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX = 1000529004, + + /// + /// PhysicalDeviceLayeredDriverPropertiesMSFT + /// + PhysicalDeviceLayeredDriverPropertiesMSFT = 1000530000, + + /// + /// CalibratedTimestampInfoKHR + /// + CalibratedTimestampInfoKHR = 1000184000, + + /// + /// SetDescriptorBufferOffsetsInfoEXT + /// + SetDescriptorBufferOffsetsInfoEXT = 1000545007, + + /// + /// BindDescriptorBufferEmbeddedSamplersInfoEXT + /// + BindDescriptorBufferEmbeddedSamplersInfoEXT = 1000545008, + + /// + /// PhysicalDeviceDescriptorPoolOverallocationFeaturesNV + /// + PhysicalDeviceDescriptorPoolOverallocationFeaturesNV = 1000546000, + + /// + /// PhysicalDeviceTileMemoryHeapFeaturesQCOM + /// + PhysicalDeviceTileMemoryHeapFeaturesQCOM = 1000547000, + + /// + /// PhysicalDeviceTileMemoryHeapPropertiesQCOM + /// + PhysicalDeviceTileMemoryHeapPropertiesQCOM = 1000547001, + + /// + /// TileMemoryRequirementsQCOM + /// + TileMemoryRequirementsQCOM = 1000547002, + + /// + /// TileMemoryBindInfoQCOM + /// + TileMemoryBindInfoQCOM = 1000547003, + + /// + /// TileMemorySizeInfoQCOM + /// + TileMemorySizeInfoQCOM = 1000547004, + + /// + /// PhysicalDeviceCopyMemoryIndirectFeaturesKHR + /// + PhysicalDeviceCopyMemoryIndirectFeaturesKHR = 1000549000, + + /// + /// PhysicalDeviceCopyMemoryIndirectPropertiesKHR + /// + PhysicalDeviceCopyMemoryIndirectPropertiesKHR = 1000426001, + + /// + /// CopyMemoryIndirectInfoKHR + /// + CopyMemoryIndirectInfoKHR = 1000549002, + + /// + /// CopyMemoryToImageIndirectInfoKHR + /// + CopyMemoryToImageIndirectInfoKHR = 1000549003, + + /// + /// PhysicalDeviceMemoryDecompressionFeaturesEXT + /// + PhysicalDeviceMemoryDecompressionFeaturesEXT = 1000427000, + + /// + /// PhysicalDeviceMemoryDecompressionPropertiesEXT + /// + PhysicalDeviceMemoryDecompressionPropertiesEXT = 1000427001, + + /// + /// DecompressMemoryInfoEXT + /// + DecompressMemoryInfoEXT = 1000550002, + + /// + /// DisplaySurfaceStereoCreateInfoNV + /// + DisplaySurfaceStereoCreateInfoNV = 1000551000, + + /// + /// DisplayModeStereoPropertiesNV + /// + DisplayModeStereoPropertiesNV = 1000551001, + + /// + /// VideoEncodeIntraRefreshCapabilitiesKHR + /// + VideoEncodeIntraRefreshCapabilitiesKHR = 1000552000, + + /// + /// VideoEncodeSessionIntraRefreshCreateInfoKHR + /// + VideoEncodeSessionIntraRefreshCreateInfoKHR = 1000552001, + + /// + /// VideoEncodeIntraRefreshInfoKHR + /// + VideoEncodeIntraRefreshInfoKHR = 1000552002, + + /// + /// VideoReferenceIntraRefreshInfoKHR + /// + VideoReferenceIntraRefreshInfoKHR = 1000552003, + + /// + /// PhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR + /// + PhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR = 1000552004, + + /// + /// VideoEncodeQuantizationMapCapabilitiesKHR + /// + VideoEncodeQuantizationMapCapabilitiesKHR = 1000553000, + + /// + /// VideoFormatQuantizationMapPropertiesKHR + /// + VideoFormatQuantizationMapPropertiesKHR = 1000553001, + + /// + /// VideoEncodeQuantizationMapInfoKHR + /// + VideoEncodeQuantizationMapInfoKHR = 1000553002, + + /// + /// VideoEncodeQuantizationMapSessionParametersCreateInfoKHR + /// + VideoEncodeQuantizationMapSessionParametersCreateInfoKHR = 1000553005, + + /// + /// PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR + /// + PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR = 1000553009, + + /// + /// VideoEncodeH264QuantizationMapCapabilitiesKHR + /// + VideoEncodeH264QuantizationMapCapabilitiesKHR = 1000553003, + + /// + /// VideoEncodeH265QuantizationMapCapabilitiesKHR + /// + VideoEncodeH265QuantizationMapCapabilitiesKHR = 1000553004, + + /// + /// VideoFormatH265QuantizationMapPropertiesKHR + /// + VideoFormatH265QuantizationMapPropertiesKHR = 1000553006, + + /// + /// VideoEncodeAV1QuantizationMapCapabilitiesKHR + /// + VideoEncodeAV1QuantizationMapCapabilitiesKHR = 1000553007, + + /// + /// VideoFormatAV1QuantizationMapPropertiesKHR + /// + VideoFormatAV1QuantizationMapPropertiesKHR = 1000553008, + + /// + /// PhysicalDeviceRawAccessChainsFeaturesNV + /// + PhysicalDeviceRawAccessChainsFeaturesNV = 1000555000, + + /// + /// ExternalComputeQueueDeviceCreateInfoNV + /// + ExternalComputeQueueDeviceCreateInfoNV = 1000556000, + + /// + /// ExternalComputeQueueCreateInfoNV + /// + ExternalComputeQueueCreateInfoNV = 1000556001, + + /// + /// ExternalComputeQueueDataParamsNV + /// + ExternalComputeQueueDataParamsNV = 1000556002, + + /// + /// PhysicalDeviceExternalComputeQueuePropertiesNV + /// + PhysicalDeviceExternalComputeQueuePropertiesNV = 1000556003, + + /// + /// PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR + /// + PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR = 1000558000, + + /// + /// PhysicalDeviceCommandBufferInheritanceFeaturesNV + /// + PhysicalDeviceCommandBufferInheritanceFeaturesNV = 1000559000, + + /// + /// PhysicalDeviceMaintenance7FeaturesKHR + /// + PhysicalDeviceMaintenance7FeaturesKHR = 1000562000, + + /// + /// PhysicalDeviceMaintenance7PropertiesKHR + /// + PhysicalDeviceMaintenance7PropertiesKHR = 1000562001, + + /// + /// PhysicalDeviceLayeredApiPropertiesListKHR + /// + PhysicalDeviceLayeredApiPropertiesListKHR = 1000562002, + + /// + /// PhysicalDeviceLayeredApiPropertiesKHR + /// + PhysicalDeviceLayeredApiPropertiesKHR = 1000562003, + + /// + /// PhysicalDeviceLayeredApiVulkanPropertiesKHR + /// + PhysicalDeviceLayeredApiVulkanPropertiesKHR = 1000562004, + + /// + /// PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV + /// + PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV = 1000563000, + + /// + /// PhysicalDeviceShaderReplicatedCompositesFeaturesEXT + /// + PhysicalDeviceShaderReplicatedCompositesFeaturesEXT = 1000564000, + + /// + /// TensorExplicitTilingFormatPropertiesARM + /// + TensorExplicitTilingFormatPropertiesARM = 1000565000, + + /// + /// TensorRollingBackingCreateInfoARM + /// + TensorRollingBackingCreateInfoARM = 1000565001, + + /// + /// PhysicalDeviceShaderFloat8FeaturesEXT + /// + PhysicalDeviceShaderFloat8FeaturesEXT = 1000567000, + + /// + /// PhysicalDeviceRayTracingValidationFeaturesNV + /// + PhysicalDeviceRayTracingValidationFeaturesNV = 1000568000, + + /// + /// PhysicalDeviceClusterAccelerationStructureFeaturesNV + /// + PhysicalDeviceClusterAccelerationStructureFeaturesNV = 1000569000, + + /// + /// PhysicalDeviceClusterAccelerationStructurePropertiesNV + /// + PhysicalDeviceClusterAccelerationStructurePropertiesNV = 1000569001, + + /// + /// ClusterAccelerationStructureClustersBottomLevelInputNV + /// + ClusterAccelerationStructureClustersBottomLevelInputNV = 1000569002, + + /// + /// ClusterAccelerationStructureTriangleClusterInputNV + /// + ClusterAccelerationStructureTriangleClusterInputNV = 1000569003, + + /// + /// ClusterAccelerationStructureMoveObjectsInputNV + /// + ClusterAccelerationStructureMoveObjectsInputNV = 1000569004, + + /// + /// ClusterAccelerationStructureInputInfoNV + /// + ClusterAccelerationStructureInputInfoNV = 1000569005, + + /// + /// ClusterAccelerationStructureCommandsInfoNV + /// + ClusterAccelerationStructureCommandsInfoNV = 1000569006, + + /// + /// RayTracingPipelineClusterAccelerationStructureCreateInfoNV + /// + RayTracingPipelineClusterAccelerationStructureCreateInfoNV = 1000569007, + + /// + /// PhysicalDevicePartitionedAccelerationStructureFeaturesNV + /// + PhysicalDevicePartitionedAccelerationStructureFeaturesNV = 1000570000, + + /// + /// PhysicalDevicePartitionedAccelerationStructurePropertiesNV + /// + PhysicalDevicePartitionedAccelerationStructurePropertiesNV = 1000570001, + + /// + /// WriteDescriptorSetPartitionedAccelerationStructureNV + /// + WriteDescriptorSetPartitionedAccelerationStructureNV = 1000570002, + + /// + /// PartitionedAccelerationStructureInstancesInputNV + /// + PartitionedAccelerationStructureInstancesInputNV = 1000570003, + + /// + /// BuildPartitionedAccelerationStructureInfoNV + /// + BuildPartitionedAccelerationStructureInfoNV = 1000570004, + + /// + /// PartitionedAccelerationStructureFlagsNV + /// + PartitionedAccelerationStructureFlagsNV = 1000570005, + + /// + /// PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT + /// + PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT = 1000572000, + + /// + /// PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT + /// + PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT = 1000572001, + + /// + /// GeneratedCommandsMemoryRequirementsInfoEXT + /// + GeneratedCommandsMemoryRequirementsInfoEXT = 1000572002, + + /// + /// IndirectExecutionSetCreateInfoEXT + /// + IndirectExecutionSetCreateInfoEXT = 1000572003, + + /// + /// GeneratedCommandsInfoEXT + /// + GeneratedCommandsInfoEXT = 1000572004, + + /// + /// IndirectCommandsLayoutCreateInfoEXT + /// + IndirectCommandsLayoutCreateInfoEXT = 1000572006, + + /// + /// IndirectCommandsLayoutTokenEXT + /// + IndirectCommandsLayoutTokenEXT = 1000572007, + + /// + /// WriteIndirectExecutionSetPipelineEXT + /// + WriteIndirectExecutionSetPipelineEXT = 1000572008, + + /// + /// WriteIndirectExecutionSetShaderEXT + /// + WriteIndirectExecutionSetShaderEXT = 1000572009, + + /// + /// IndirectExecutionSetPipelineInfoEXT + /// + IndirectExecutionSetPipelineInfoEXT = 1000572010, + + /// + /// IndirectExecutionSetShaderInfoEXT + /// + IndirectExecutionSetShaderInfoEXT = 1000572011, + + /// + /// IndirectExecutionSetShaderLayoutInfoEXT + /// + IndirectExecutionSetShaderLayoutInfoEXT = 1000572012, + + /// + /// GeneratedCommandsPipelineInfoEXT + /// + GeneratedCommandsPipelineInfoEXT = 1000572013, + + /// + /// GeneratedCommandsShaderInfoEXT + /// + GeneratedCommandsShaderInfoEXT = 1000572014, + + /// + /// PhysicalDeviceFaultFeaturesKHR + /// + PhysicalDeviceFaultFeaturesKHR = 1000573000, + + /// + /// PhysicalDeviceFaultPropertiesKHR + /// + PhysicalDeviceFaultPropertiesKHR = 1000573001, + + /// + /// DeviceFaultInfoKHR + /// + DeviceFaultInfoKHR = 1000573002, + + /// + /// DeviceFaultDebugInfoKHR + /// + DeviceFaultDebugInfoKHR = 1000573003, + + /// + /// PhysicalDeviceMaintenance8FeaturesKHR + /// + PhysicalDeviceMaintenance8FeaturesKHR = 1000574000, + + /// + /// MemoryBarrierAccessFlags3KHR + /// + MemoryBarrierAccessFlags3KHR = 1000574002, + + /// + /// PhysicalDeviceImageAlignmentControlFeaturesMESA + /// + PhysicalDeviceImageAlignmentControlFeaturesMESA = 1000575000, + + /// + /// PhysicalDeviceImageAlignmentControlPropertiesMESA + /// + PhysicalDeviceImageAlignmentControlPropertiesMESA = 1000575001, + + /// + /// ImageAlignmentControlCreateInfoMESA + /// + ImageAlignmentControlCreateInfoMESA = 1000575002, + + /// + /// PhysicalDeviceShaderFmaFeaturesKHR + /// + PhysicalDeviceShaderFmaFeaturesKHR = 1000579000, + + /// + /// PushConstantBankInfoNV + /// + PushConstantBankInfoNV = 1000580000, + + /// + /// PhysicalDevicePushConstantBankFeaturesNV + /// + PhysicalDevicePushConstantBankFeaturesNV = 1000580001, + + /// + /// PhysicalDevicePushConstantBankPropertiesNV + /// + PhysicalDevicePushConstantBankPropertiesNV = 1000580002, + + /// + /// PhysicalDeviceRayTracingInvocationReorderFeaturesEXT + /// + PhysicalDeviceRayTracingInvocationReorderFeaturesEXT = 1000581000, + + /// + /// PhysicalDeviceRayTracingInvocationReorderPropertiesEXT + /// + PhysicalDeviceRayTracingInvocationReorderPropertiesEXT = 1000581001, + + /// + /// PhysicalDeviceDepthClampControlFeaturesEXT + /// + PhysicalDeviceDepthClampControlFeaturesEXT = 1000582000, + + /// + /// PipelineViewportDepthClampControlCreateInfoEXT + /// + PipelineViewportDepthClampControlCreateInfoEXT = 1000582001, + + /// + /// PhysicalDeviceMaintenance9FeaturesKHR + /// + PhysicalDeviceMaintenance9FeaturesKHR = 1000584000, + + /// + /// PhysicalDeviceMaintenance9PropertiesKHR + /// + PhysicalDeviceMaintenance9PropertiesKHR = 1000584001, + + /// + /// QueueFamilyOwnershipTransferPropertiesKHR + /// + QueueFamilyOwnershipTransferPropertiesKHR = 1000584002, + + /// + /// PhysicalDeviceVideoMaintenance2FeaturesKHR + /// + PhysicalDeviceVideoMaintenance2FeaturesKHR = 1000586000, + + /// + /// VideoDecodeH264InlineSessionParametersInfoKHR + /// + VideoDecodeH264InlineSessionParametersInfoKHR = 1000586001, + + /// + /// VideoDecodeH265InlineSessionParametersInfoKHR + /// + VideoDecodeH265InlineSessionParametersInfoKHR = 1000586002, + + /// + /// VideoDecodeAV1InlineSessionParametersInfoKHR + /// + VideoDecodeAV1InlineSessionParametersInfoKHR = 1000586003, + + /// + /// SurfaceCreateInfoOHOS + /// + SurfaceCreateInfoOHOS = 1000685000, + + /// + /// PhysicalDeviceHdrVividFeaturesHUAWEI + /// + PhysicalDeviceHdrVividFeaturesHUAWEI = 1000590000, + + /// + /// HdrVividDynamicMetadataHUAWEI + /// + HdrVividDynamicMetadataHUAWEI = 1000590001, + + /// + /// PhysicalDeviceCooperativeMatrix2FeaturesNV + /// + PhysicalDeviceCooperativeMatrix2FeaturesNV = 1000593000, + + /// + /// CooperativeMatrixFlexibleDimensionsPropertiesNV + /// + CooperativeMatrixFlexibleDimensionsPropertiesNV = 1000593001, + + /// + /// PhysicalDeviceCooperativeMatrix2PropertiesNV + /// + PhysicalDeviceCooperativeMatrix2PropertiesNV = 1000593002, + + /// + /// PhysicalDevicePipelineOpacityMicromapFeaturesARM + /// + PhysicalDevicePipelineOpacityMicromapFeaturesARM = 1000596000, + + /// + /// PhysicalDeviceVideoEncodeFeedback2FeaturesKHR + /// + PhysicalDeviceVideoEncodeFeedback2FeaturesKHR = 1000598000, + + /// + /// VideoEncodeFeedback2CapabilitiesKHR + /// + VideoEncodeFeedback2CapabilitiesKHR = 1000598001, + + /// + /// QueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR + /// + QueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR = 1000598002, + + /// + /// ImportMemoryMetalHandleInfoEXT + /// + ImportMemoryMetalHandleInfoEXT = 1000602000, + + /// + /// MemoryMetalHandlePropertiesEXT + /// + MemoryMetalHandlePropertiesEXT = 1000602001, + + /// + /// MemoryGetMetalHandleInfoEXT + /// + MemoryGetMetalHandleInfoEXT = 1000602002, + + /// + /// PhysicalDeviceDepthClampZeroOneFeaturesKHR + /// + PhysicalDeviceDepthClampZeroOneFeaturesKHR = 1000421000, + + /// + /// PhysicalDevicePerformanceCountersByRegionFeaturesARM + /// + PhysicalDevicePerformanceCountersByRegionFeaturesARM = 1000605000, + + /// + /// PhysicalDevicePerformanceCountersByRegionPropertiesARM + /// + PhysicalDevicePerformanceCountersByRegionPropertiesARM = 1000605001, + + /// + /// PerformanceCounterARM + /// + PerformanceCounterARM = 1000605002, + + /// + /// PerformanceCounterDescriptionARM + /// + PerformanceCounterDescriptionARM = 1000605003, + + /// + /// RenderPassPerformanceCountersByRegionBeginInfoARM + /// + RenderPassPerformanceCountersByRegionBeginInfoARM = 1000605004, + + /// + /// PhysicalDeviceShaderInstrumentationFeaturesARM + /// + PhysicalDeviceShaderInstrumentationFeaturesARM = 1000607000, + + /// + /// PhysicalDeviceShaderInstrumentationPropertiesARM + /// + PhysicalDeviceShaderInstrumentationPropertiesARM = 1000607001, + + /// + /// ShaderInstrumentationCreateInfoARM + /// + ShaderInstrumentationCreateInfoARM = 1000607002, + + /// + /// ShaderInstrumentationMetricDescriptionARM + /// + ShaderInstrumentationMetricDescriptionARM = 1000607003, + + /// + /// PhysicalDeviceVertexAttributeRobustnessFeaturesEXT + /// + PhysicalDeviceVertexAttributeRobustnessFeaturesEXT = 1000608000, + + /// + /// PhysicalDeviceFormatPackFeaturesARM + /// + PhysicalDeviceFormatPackFeaturesARM = 1000609000, + + /// + /// PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE + /// + PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE = 1000611000, + + /// + /// PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE + /// + PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE = 1000611001, + + /// + /// PipelineFragmentDensityMapLayeredCreateInfoVALVE + /// + PipelineFragmentDensityMapLayeredCreateInfoVALVE = 1000611002, + + /// + /// PhysicalDeviceRobustness2FeaturesKHR + /// + PhysicalDeviceRobustness2FeaturesKHR = 1000286000, + + /// + /// PhysicalDeviceRobustness2PropertiesKHR + /// + PhysicalDeviceRobustness2PropertiesKHR = 1000286001, + + /// + /// SetPresentConfigNV + /// + SetPresentConfigNV = 1000613000, + + /// + /// PhysicalDevicePresentMeteringFeaturesNV + /// + PhysicalDevicePresentMeteringFeaturesNV = 1000613001, + + /// + /// PhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT + /// + PhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT = 1000616000, + + /// + /// SwapchainFlagsSurfaceCapabilitiesEXT + /// + SwapchainFlagsSurfaceCapabilitiesEXT = 1000616001, + + /// + /// PhysicalDeviceFragmentDensityMapOffsetFeaturesEXT + /// + PhysicalDeviceFragmentDensityMapOffsetFeaturesEXT = 1000425000, + + /// + /// PhysicalDeviceFragmentDensityMapOffsetPropertiesEXT + /// + PhysicalDeviceFragmentDensityMapOffsetPropertiesEXT = 1000425001, + + /// + /// RenderPassFragmentDensityMapOffsetEndInfoEXT + /// + RenderPassFragmentDensityMapOffsetEndInfoEXT = 1000425002, + + /// + /// PhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT + /// + PhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT = 1000620000, + + /// + /// PhysicalDevicePresentModeFifoLatestReadyFeaturesKHR + /// + PhysicalDevicePresentModeFifoLatestReadyFeaturesKHR = 1000361000, + + /// + /// PhysicalDeviceOpacityMicromapFeaturesKHR + /// + PhysicalDeviceOpacityMicromapFeaturesKHR = 1000623000, + + /// + /// PhysicalDeviceOpacityMicromapPropertiesKHR + /// + PhysicalDeviceOpacityMicromapPropertiesKHR = 1000623001, + + /// + /// AccelerationStructureGeometryMicromapDataKHR + /// + AccelerationStructureGeometryMicromapDataKHR = 1000623002, + + /// + /// AccelerationStructureTrianglesOpacityMicromapKHR + /// + AccelerationStructureTrianglesOpacityMicromapKHR = 1000623003, + + /// + /// PhysicalDeviceShader64BitIndexingFeaturesEXT + /// + PhysicalDeviceShader64BitIndexingFeaturesEXT = 1000627000, + + /// + /// PhysicalDeviceCustomResolveFeaturesEXT + /// + PhysicalDeviceCustomResolveFeaturesEXT = 1000628000, + + /// + /// BeginCustomResolveInfoEXT + /// + BeginCustomResolveInfoEXT = 1000628001, + + /// + /// CustomResolveCreateInfoEXT + /// + CustomResolveCreateInfoEXT = 1000628002, + + /// + /// PhysicalDeviceDataGraphModelFeaturesQCOM + /// + PhysicalDeviceDataGraphModelFeaturesQCOM = 1000629000, + + /// + /// DataGraphPipelineBuiltinModelCreateInfoQCOM + /// + DataGraphPipelineBuiltinModelCreateInfoQCOM = 1000629001, + + /// + /// PhysicalDeviceMaintenance10FeaturesKHR + /// + PhysicalDeviceMaintenance10FeaturesKHR = 1000630000, + + /// + /// PhysicalDeviceMaintenance10PropertiesKHR + /// + PhysicalDeviceMaintenance10PropertiesKHR = 1000630001, + + /// + /// RenderingAttachmentFlagsInfoKHR + /// + RenderingAttachmentFlagsInfoKHR = 1000630002, + + /// + /// RenderingEndInfoKHR + /// + RenderingEndInfoKHR = 1000619003, + + /// + /// ResolveImageModeInfoKHR + /// + ResolveImageModeInfoKHR = 1000630004, + + /// + /// PhysicalDeviceDataGraphOpticalFlowFeaturesARM + /// + PhysicalDeviceDataGraphOpticalFlowFeaturesARM = 1000631000, + + /// + /// QueueFamilyDataGraphOpticalFlowPropertiesARM + /// + QueueFamilyDataGraphOpticalFlowPropertiesARM = 1000631001, + + /// + /// DataGraphOpticalFlowImageFormatInfoARM + /// + DataGraphOpticalFlowImageFormatInfoARM = 1000631003, + + /// + /// DataGraphOpticalFlowImageFormatPropertiesARM + /// + DataGraphOpticalFlowImageFormatPropertiesARM = 1000631004, + + /// + /// DataGraphPipelineOpticalFlowDispatchInfoARM + /// + DataGraphPipelineOpticalFlowDispatchInfoARM = 1000631005, + + /// + /// DataGraphPipelineOpticalFlowCreateInfoARM + /// + DataGraphPipelineOpticalFlowCreateInfoARM = 1000631002, + + /// + /// DataGraphPipelineResourceInfoImageLayoutARM + /// + DataGraphPipelineResourceInfoImageLayoutARM = 1000631006, + + /// + /// DataGraphPipelineSingleNodeCreateInfoARM + /// + DataGraphPipelineSingleNodeCreateInfoARM = 1000631007, + + /// + /// DataGraphPipelineSingleNodeConnectionARM + /// + DataGraphPipelineSingleNodeConnectionARM = 1000631008, + + /// + /// PhysicalDeviceShaderLongVectorFeaturesEXT + /// + PhysicalDeviceShaderLongVectorFeaturesEXT = 1000635000, + + /// + /// PhysicalDeviceShaderLongVectorPropertiesEXT + /// + PhysicalDeviceShaderLongVectorPropertiesEXT = 1000635001, + + /// + /// PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC + /// + PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC = 1000637000, + + /// + /// PhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT + /// + PhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT = 1000642000, + + /// + /// ComputeOccupancyPriorityParametersNV + /// + ComputeOccupancyPriorityParametersNV = 1000645000, + + /// + /// PhysicalDeviceComputeOccupancyPriorityFeaturesNV + /// + PhysicalDeviceComputeOccupancyPriorityFeaturesNV = 1000645001, + + /// + /// PhysicalDeviceMaintenance11FeaturesKHR + /// + PhysicalDeviceMaintenance11FeaturesKHR = 1000657000, + + /// + /// QueueFamilyOptimalImageTransferGranularityPropertiesKHR + /// + QueueFamilyOptimalImageTransferGranularityPropertiesKHR = 1000657001, + + /// + /// PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT + /// + PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT = 1000662000, + + /// + /// UbmSurfaceCreateInfoSEC + /// + UbmSurfaceCreateInfoSEC = 1000664000, + + /// + /// FormatProperties4KHR + /// + FormatProperties4KHR = 1000668000, + + /// + /// ImageCreateFlags2CreateInfoKHR + /// + ImageCreateFlags2CreateInfoKHR = 1000668001, + + /// + /// ImageUsageFlags2CreateInfoKHR + /// + ImageUsageFlags2CreateInfoKHR = 1000668002, + + /// + /// ImageViewUsage2CreateInfoKHR + /// + ImageViewUsage2CreateInfoKHR = 1000668003, + + /// + /// PhysicalDeviceExtendedFlagsFeaturesKHR + /// + PhysicalDeviceExtendedFlagsFeaturesKHR = 1000668004, + + /// + /// ImageStencilUsage2CreateInfoKHR + /// + ImageStencilUsage2CreateInfoKHR = 1000668005, + + /// + /// SharedPresentSurfaceCapabilities2KHR + /// + SharedPresentSurfaceCapabilities2KHR = 1000668006, + + /// + /// PhysicalDeviceShaderOcpMicroscalingTypesFeaturesEXT + /// + PhysicalDeviceShaderOcpMicroscalingTypesFeaturesEXT = 1000672000, + + /// + /// PhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE + /// + PhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE = 1000673000, + + /// + /// PhysicalDeviceThrottleHintFeaturesSEC + /// + PhysicalDeviceThrottleHintFeaturesSEC = 1000674000, + + /// + /// ThrottleHintSubmitInfoSEC + /// + ThrottleHintSubmitInfoSEC = 1000674001, + + /// + /// DataGraphPipelineNeuralStatisticsCreateInfoARM + /// + DataGraphPipelineNeuralStatisticsCreateInfoARM = 1000676000, + + /// + /// DataGraphPipelineSessionNeuralStatisticsCreateInfoARM + /// + DataGraphPipelineSessionNeuralStatisticsCreateInfoARM = 1000676001, + + /// + /// PhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM + /// + PhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM = 1000676002, + + /// + /// PhysicalDevicePrimitiveRestartIndexFeaturesEXT + /// + PhysicalDevicePrimitiveRestartIndexFeaturesEXT = 1000678000, + + /// + /// PhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV + /// + PhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV = 1000689000, + + /// + /// PhysicalDeviceVariablePointerFeatures + /// + PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures, + + /// + /// PhysicalDeviceShaderDrawParameterFeatures + /// + PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures, + + /// + /// DebugReportCreateInfoEXT + /// + DebugReportCreateInfoEXT = DebugReportCallbackCreateInfoEXT, + + /// + /// RenderingInfoKHR + /// + RenderingInfoKHR = RenderingInfo, + + /// + /// RenderingAttachmentInfoKHR + /// + RenderingAttachmentInfoKHR = RenderingAttachmentInfo, + + /// + /// PipelineRenderingCreateInfoKHR + /// + PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo, + + /// + /// PhysicalDeviceDynamicRenderingFeaturesKHR + /// + PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures, + + /// + /// CommandBufferInheritanceRenderingInfoKHR + /// + CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo, + + /// + /// RenderPassMultiviewCreateInfoKHR + /// + RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo, + + /// + /// PhysicalDeviceMultiviewFeaturesKHR + /// + PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures, + + /// + /// PhysicalDeviceMultiviewPropertiesKHR + /// + PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties, + + /// + /// PhysicalDeviceFeatures2KHR + /// + PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2, + + /// + /// PhysicalDeviceProperties2KHR + /// + PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2, + + /// + /// FormatProperties2KHR + /// + FormatProperties2KHR = FormatProperties2, + + /// + /// ImageFormatProperties2KHR + /// + ImageFormatProperties2KHR = ImageFormatProperties2, + + /// + /// PhysicalDeviceImageFormatInfo2KHR + /// + PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2, + + /// + /// QueueFamilyProperties2KHR + /// + QueueFamilyProperties2KHR = QueueFamilyProperties2, + + /// + /// PhysicalDeviceMemoryProperties2KHR + /// + PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2, + + /// + /// SparseImageFormatProperties2KHR + /// + SparseImageFormatProperties2KHR = SparseImageFormatProperties2, + + /// + /// PhysicalDeviceSparseImageFormatInfo2KHR + /// + PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2, + + /// + /// MemoryAllocateFlagsInfoKHR + /// + MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo, + + /// + /// DeviceGroupRenderPassBeginInfoKHR + /// + DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo, + + /// + /// DeviceGroupCommandBufferBeginInfoKHR + /// + DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo, + + /// + /// DeviceGroupSubmitInfoKHR + /// + DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo, + + /// + /// DeviceGroupBindSparseInfoKHR + /// + DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo, + + /// + /// BindBufferMemoryDeviceGroupInfoKHR + /// + BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo, + + /// + /// BindImageMemoryDeviceGroupInfoKHR + /// + BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo, + + /// + /// PhysicalDeviceTextureCompressionAstcHdrFeaturesEXT + /// + PhysicalDeviceTextureCompressionAstcHdrFeaturesEXT = PhysicalDeviceTextureCompressionAstcHdrFeatures, + + /// + /// PipelineRobustnessCreateInfoEXT + /// + PipelineRobustnessCreateInfoEXT = PipelineRobustnessCreateInfo, + + /// + /// PhysicalDevicePipelineRobustnessFeaturesEXT + /// + PhysicalDevicePipelineRobustnessFeaturesEXT = PhysicalDevicePipelineRobustnessFeatures, + + /// + /// PhysicalDevicePipelineRobustnessPropertiesEXT + /// + PhysicalDevicePipelineRobustnessPropertiesEXT = PhysicalDevicePipelineRobustnessProperties, + + /// + /// PhysicalDeviceGroupPropertiesKHR + /// + PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties, + + /// + /// DeviceGroupDeviceCreateInfoKHR + /// + DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo, + + /// + /// PhysicalDeviceExternalImageFormatInfoKHR + /// + PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo, + + /// + /// ExternalImageFormatPropertiesKHR + /// + ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties, + + /// + /// PhysicalDeviceExternalBufferInfoKHR + /// + PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo, + + /// + /// ExternalBufferPropertiesKHR + /// + ExternalBufferPropertiesKHR = ExternalBufferProperties, + + /// + /// PhysicalDeviceIdPropertiesKHR + /// + PhysicalDeviceIdPropertiesKHR = PhysicalDeviceIdProperties, + + /// + /// ExternalMemoryBufferCreateInfoKHR + /// + ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo, + + /// + /// ExternalMemoryImageCreateInfoKHR + /// + ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo, + + /// + /// ExportMemoryAllocateInfoKHR + /// + ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo, + + /// + /// PhysicalDeviceExternalSemaphoreInfoKHR + /// + PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo, + + /// + /// ExternalSemaphorePropertiesKHR + /// + ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties, + + /// + /// ExportSemaphoreCreateInfoKHR + /// + ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo, + + /// + /// PhysicalDevicePushDescriptorPropertiesKHR + /// + PhysicalDevicePushDescriptorPropertiesKHR = PhysicalDevicePushDescriptorProperties, + + /// + /// PhysicalDeviceShaderFloat16Int8FeaturesKHR + /// + PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features, + + /// + /// PhysicalDeviceFloat16Int8FeaturesKHR + /// + PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features, + + /// + /// PhysicalDevice16BitStorageFeaturesKHR + /// + PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures, + + /// + /// DescriptorUpdateTemplateCreateInfoKHR + /// + DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo, + + /// + /// PhysicalDeviceImagelessFramebufferFeaturesKHR + /// + PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures, + + /// + /// FramebufferAttachmentsCreateInfoKHR + /// + FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo, + + /// + /// FramebufferAttachmentImageInfoKHR + /// + FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo, + + /// + /// RenderPassAttachmentBeginInfoKHR + /// + RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo, + + /// + /// AttachmentDescription2KHR + /// + AttachmentDescription2KHR = AttachmentDescription2, + + /// + /// AttachmentReference2KHR + /// + AttachmentReference2KHR = AttachmentReference2, + + /// + /// SubpassDescription2KHR + /// + SubpassDescription2KHR = SubpassDescription2, + + /// + /// SubpassDependency2KHR + /// + SubpassDependency2KHR = SubpassDependency2, + + /// + /// RenderPassCreateInfo2KHR + /// + RenderPassCreateInfo2KHR = RenderPassCreateInfo2, + + /// + /// SubpassBeginInfoKHR + /// + SubpassBeginInfoKHR = SubpassBeginInfo, + + /// + /// SubpassEndInfoKHR + /// + SubpassEndInfoKHR = SubpassEndInfo, + + /// + /// PhysicalDeviceExternalFenceInfoKHR + /// + PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo, + + /// + /// ExternalFencePropertiesKHR + /// + ExternalFencePropertiesKHR = ExternalFenceProperties, + + /// + /// ExportFenceCreateInfoKHR + /// + ExportFenceCreateInfoKHR = ExportFenceCreateInfo, + + /// + /// PhysicalDevicePointClippingPropertiesKHR + /// + PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties, + + /// + /// RenderPassInputAttachmentAspectCreateInfoKHR + /// + RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo, + + /// + /// ImageViewUsageCreateInfoKHR + /// + ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo, + + /// + /// PipelineTessellationDomainOriginStateCreateInfoKHR + /// + PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo, + + /// + /// PhysicalDeviceVariablePointersFeaturesKHR + /// + PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures, + + /// + /// PhysicalDeviceVariablePointerFeaturesKHR + /// + PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeaturesKHR, + + /// + /// MemoryDedicatedRequirementsKHR + /// + MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements, + + /// + /// MemoryDedicatedAllocateInfoKHR + /// + MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo, + + /// + /// PhysicalDeviceSamplerFilterMinmaxPropertiesEXT + /// + PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties, + + /// + /// SamplerReductionModeCreateInfoEXT + /// + SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo, + + /// + /// PhysicalDeviceInlineUniformBlockFeaturesEXT + /// + PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures, + + /// + /// PhysicalDeviceInlineUniformBlockPropertiesEXT + /// + PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties, + + /// + /// WriteDescriptorSetInlineUniformBlockEXT + /// + WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock, + + /// + /// DescriptorPoolInlineUniformBlockCreateInfoEXT + /// + DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo, + + /// + /// BufferMemoryRequirementsInfo2KHR + /// + BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2, + + /// + /// ImageMemoryRequirementsInfo2KHR + /// + ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2, + + /// + /// ImageSparseMemoryRequirementsInfo2KHR + /// + ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2, + + /// + /// MemoryRequirements2KHR + /// + MemoryRequirements2KHR = MemoryRequirements2, + + /// + /// SparseImageMemoryRequirements2KHR + /// + SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2, + + /// + /// ImageFormatListCreateInfoKHR + /// + ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo, + + /// + /// AttachmentSampleCountInfoNV + /// + AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD, + + /// + /// SamplerYCbCrConversionCreateInfoKHR + /// + SamplerYCbCrConversionCreateInfoKHR = SamplerYCbCrConversionCreateInfo, + + /// + /// SamplerYCbCrConversionInfoKHR + /// + SamplerYCbCrConversionInfoKHR = SamplerYCbCrConversionInfo, + + /// + /// BindImagePlaneMemoryInfoKHR + /// + BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo, + + /// + /// ImagePlaneMemoryRequirementsInfoKHR + /// + ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo, + + /// + /// PhysicalDeviceSamplerYCbCrConversionFeaturesKHR + /// + PhysicalDeviceSamplerYCbCrConversionFeaturesKHR = PhysicalDeviceSamplerYCbCrConversionFeatures, + + /// + /// SamplerYCbCrConversionImageFormatPropertiesKHR + /// + SamplerYCbCrConversionImageFormatPropertiesKHR = SamplerYCbCrConversionImageFormatProperties, + + /// + /// BindBufferMemoryInfoKHR + /// + BindBufferMemoryInfoKHR = BindBufferMemoryInfo, + + /// + /// BindImageMemoryInfoKHR + /// + BindImageMemoryInfoKHR = BindImageMemoryInfo, + + /// + /// DescriptorSetLayoutBindingFlagsCreateInfoEXT + /// + DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo, + + /// + /// PhysicalDeviceDescriptorIndexingFeaturesEXT + /// + PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures, + + /// + /// PhysicalDeviceDescriptorIndexingPropertiesEXT + /// + PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties, + + /// + /// DescriptorSetVariableDescriptorCountAllocateInfoEXT + /// + DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo, + + /// + /// DescriptorSetVariableDescriptorCountLayoutSupportEXT + /// + DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport, + + /// + /// PhysicalDeviceMaintenance3PropertiesKHR + /// + PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties, + + /// + /// DescriptorSetLayoutSupportKHR + /// + DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport, + + /// + /// DeviceQueueGlobalPriorityCreateInfoEXT + /// + DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfo, + + /// + /// PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR + /// + PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures, + + /// + /// PhysicalDevice8BitStorageFeaturesKHR + /// + PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures, + + /// + /// PhysicalDeviceShaderAtomicInt64FeaturesKHR + /// + PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features, + + /// + /// CalibratedTimestampInfoEXT + /// + CalibratedTimestampInfoEXT = CalibratedTimestampInfoKHR, + + /// + /// DeviceQueueGlobalPriorityCreateInfoKHR + /// + DeviceQueueGlobalPriorityCreateInfoKHR = DeviceQueueGlobalPriorityCreateInfo, + + /// + /// PhysicalDeviceGlobalPriorityQueryFeaturesKHR + /// + PhysicalDeviceGlobalPriorityQueryFeaturesKHR = PhysicalDeviceGlobalPriorityQueryFeatures, + + /// + /// QueueFamilyGlobalPriorityPropertiesKHR + /// + QueueFamilyGlobalPriorityPropertiesKHR = QueueFamilyGlobalPriorityProperties, + + /// + /// PipelineVertexInputDivisorStateCreateInfoEXT + /// + PipelineVertexInputDivisorStateCreateInfoEXT = PipelineVertexInputDivisorStateCreateInfo, + + /// + /// PhysicalDeviceVertexAttributeDivisorFeaturesEXT + /// + PhysicalDeviceVertexAttributeDivisorFeaturesEXT = PhysicalDeviceVertexAttributeDivisorFeatures, + + /// + /// PipelineCreationFeedbackCreateInfoEXT + /// + PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo, + + /// + /// PhysicalDeviceDriverPropertiesKHR + /// + PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties, + + /// + /// PhysicalDeviceFloatControlsPropertiesKHR + /// + PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties, + + /// + /// PhysicalDeviceDepthStencilResolvePropertiesKHR + /// + PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties, + + /// + /// SubpassDescriptionDepthStencilResolveKHR + /// + SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve, + + /// + /// PhysicalDeviceComputeShaderDerivativesFeaturesNV + /// + PhysicalDeviceComputeShaderDerivativesFeaturesNV = PhysicalDeviceComputeShaderDerivativesFeaturesKHR, + + /// + /// PhysicalDeviceFragmentShaderBarycentricFeaturesNV + /// + PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR, + + /// + /// PhysicalDeviceTimelineSemaphoreFeaturesKHR + /// + PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures, + + /// + /// PhysicalDeviceTimelineSemaphorePropertiesKHR + /// + PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties, + + /// + /// SemaphoreTypeCreateInfoKHR + /// + SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo, + + /// + /// TimelineSemaphoreSubmitInfoKHR + /// + TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo, + + /// + /// SemaphoreWaitInfoKHR + /// + SemaphoreWaitInfoKHR = SemaphoreWaitInfo, + + /// + /// SemaphoreSignalInfoKHR + /// + SemaphoreSignalInfoKHR = SemaphoreSignalInfo, + + /// + /// QueryPoolCreateInfoINTEL + /// + QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL, + + /// + /// PhysicalDeviceVulkanMemoryModelFeaturesKHR + /// + PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures, + + /// + /// PhysicalDeviceShaderTerminateInvocationFeaturesKHR + /// + PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures, + + /// + /// PhysicalDeviceScalarBlockLayoutFeaturesEXT + /// + PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures, + + /// + /// PhysicalDeviceSubgroupSizeControlPropertiesEXT + /// + PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties, + + /// + /// PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT + /// + PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo, + + /// + /// PhysicalDeviceSubgroupSizeControlFeaturesEXT + /// + PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures, + + /// + /// PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR + /// + PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR = PhysicalDeviceDynamicRenderingLocalReadFeatures, + + /// + /// RenderingAttachmentLocationInfoKHR + /// + RenderingAttachmentLocationInfoKHR = RenderingAttachmentLocationInfo, + + /// + /// RenderingInputAttachmentIndexInfoKHR + /// + RenderingInputAttachmentIndexInfoKHR = RenderingInputAttachmentIndexInfo, + + /// + /// PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR + /// + PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures, + + /// + /// AttachmentReferenceStencilLayoutKHR + /// + AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout, + + /// + /// AttachmentDescriptionStencilLayoutKHR + /// + AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout, + + /// + /// PhysicalDeviceBufferAddressFeaturesEXT + /// + PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT, + + /// + /// BufferDeviceAddressInfoEXT + /// + BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo, + + /// + /// PhysicalDeviceToolPropertiesEXT + /// + PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties, + + /// + /// ImageStencilUsageCreateInfoEXT + /// + ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo, + + /// + /// PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR + /// + PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures, + + /// + /// PhysicalDeviceBufferDeviceAddressFeaturesKHR + /// + PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures, + + /// + /// BufferDeviceAddressInfoKHR + /// + BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo, + + /// + /// BufferOpaqueCaptureAddressCreateInfoKHR + /// + BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo, + + /// + /// MemoryOpaqueCaptureAddressAllocateInfoKHR + /// + MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo, + + /// + /// DeviceMemoryOpaqueCaptureAddressInfoKHR + /// + DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo, + + /// + /// PhysicalDeviceLineRasterizationFeaturesEXT + /// + PhysicalDeviceLineRasterizationFeaturesEXT = PhysicalDeviceLineRasterizationFeatures, + + /// + /// PipelineRasterizationLineStateCreateInfoEXT + /// + PipelineRasterizationLineStateCreateInfoEXT = PipelineRasterizationLineStateCreateInfo, + + /// + /// PhysicalDeviceLineRasterizationPropertiesEXT + /// + PhysicalDeviceLineRasterizationPropertiesEXT = PhysicalDeviceLineRasterizationProperties, + + /// + /// PhysicalDeviceHostQueryResetFeaturesEXT + /// + PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures, + + /// + /// PhysicalDeviceIndexTypeUInt8FeaturesEXT + /// + PhysicalDeviceIndexTypeUInt8FeaturesEXT = PhysicalDeviceIndexTypeUInt8Features, + + /// + /// PhysicalDeviceHostImageCopyFeaturesEXT + /// + PhysicalDeviceHostImageCopyFeaturesEXT = PhysicalDeviceHostImageCopyFeatures, + + /// + /// PhysicalDeviceHostImageCopyPropertiesEXT + /// + PhysicalDeviceHostImageCopyPropertiesEXT = PhysicalDeviceHostImageCopyProperties, + + /// + /// MemoryToImageCopyEXT + /// + MemoryToImageCopyEXT = MemoryToImageCopy, + + /// + /// ImageToMemoryCopyEXT + /// + ImageToMemoryCopyEXT = ImageToMemoryCopy, + + /// + /// CopyImageToMemoryInfoEXT + /// + CopyImageToMemoryInfoEXT = CopyImageToMemoryInfo, + + /// + /// CopyMemoryToImageInfoEXT + /// + CopyMemoryToImageInfoEXT = CopyMemoryToImageInfo, + + /// + /// HostImageLayoutTransitionInfoEXT + /// + HostImageLayoutTransitionInfoEXT = HostImageLayoutTransitionInfo, + + /// + /// CopyImageToImageInfoEXT + /// + CopyImageToImageInfoEXT = CopyImageToImageInfo, + + /// + /// SubresourceHostMemcpySizeEXT + /// + SubresourceHostMemcpySizeEXT = SubresourceHostMemcpySize, + + /// + /// HostImageCopyDevicePerformanceQueryEXT + /// + HostImageCopyDevicePerformanceQueryEXT = HostImageCopyDevicePerformanceQuery, + + /// + /// MemoryMapInfoKHR + /// + MemoryMapInfoKHR = MemoryMapInfo, + + /// + /// MemoryUnmapInfoKHR + /// + MemoryUnmapInfoKHR = MemoryUnmapInfo, + + /// + /// SurfacePresentModeEXT + /// + SurfacePresentModeEXT = SurfacePresentModeKHR, + + /// + /// SurfacePresentScalingCapabilitiesEXT + /// + SurfacePresentScalingCapabilitiesEXT = SurfacePresentScalingCapabilitiesKHR, + + /// + /// SurfacePresentModeCompatibilityEXT + /// + SurfacePresentModeCompatibilityEXT = SurfacePresentModeCompatibilityKHR, + + /// + /// PhysicalDeviceSwapchainMaintenance1FeaturesEXT + /// + PhysicalDeviceSwapchainMaintenance1FeaturesEXT = PhysicalDeviceSwapchainMaintenance1FeaturesKHR, + + /// + /// SwapchainPresentFenceInfoEXT + /// + SwapchainPresentFenceInfoEXT = SwapchainPresentFenceInfoKHR, + + /// + /// SwapchainPresentModesCreateInfoEXT + /// + SwapchainPresentModesCreateInfoEXT = SwapchainPresentModesCreateInfoKHR, + + /// + /// SwapchainPresentModeInfoEXT + /// + SwapchainPresentModeInfoEXT = SwapchainPresentModeInfoKHR, + + /// + /// SwapchainPresentScalingCreateInfoEXT + /// + SwapchainPresentScalingCreateInfoEXT = SwapchainPresentScalingCreateInfoKHR, + + /// + /// ReleaseSwapchainImagesInfoEXT + /// + ReleaseSwapchainImagesInfoEXT = ReleaseSwapchainImagesInfoKHR, + + /// + /// PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT + /// + PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures, + + /// + /// PhysicalDeviceShaderIntegerDotProductFeaturesKHR + /// + PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures, + + /// + /// PhysicalDeviceShaderIntegerDotProductPropertiesKHR + /// + PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties, + + /// + /// PhysicalDeviceTexelBufferAlignmentPropertiesEXT + /// + PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties, + + /// + /// PhysicalDeviceRobustness2FeaturesEXT + /// + PhysicalDeviceRobustness2FeaturesEXT = PhysicalDeviceRobustness2FeaturesKHR, + + /// + /// PhysicalDeviceRobustness2PropertiesEXT + /// + PhysicalDeviceRobustness2PropertiesEXT = PhysicalDeviceRobustness2PropertiesKHR, + + /// + /// PhysicalDevicePrivateDataFeaturesEXT + /// + PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures, + + /// + /// DevicePrivateDataCreateInfoEXT + /// + DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo, + + /// + /// PrivateDataSlotCreateInfoEXT + /// + PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo, + + /// + /// PhysicalDevicePipelineCreationCacheControlFeaturesEXT + /// + PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures, + + /// + /// MemoryBarrier2KHR + /// + MemoryBarrier2KHR = MemoryBarrier2, + + /// + /// BufferMemoryBarrier2KHR + /// + BufferMemoryBarrier2KHR = BufferMemoryBarrier2, + + /// + /// ImageMemoryBarrier2KHR + /// + ImageMemoryBarrier2KHR = ImageMemoryBarrier2, + + /// + /// DependencyInfoKHR + /// + DependencyInfoKHR = DependencyInfo, + + /// + /// SubmitInfo2KHR + /// + SubmitInfo2KHR = SubmitInfo2, + + /// + /// SemaphoreSubmitInfoKHR + /// + SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo, + + /// + /// CommandBufferSubmitInfoKHR + /// + CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo, + + /// + /// PhysicalDeviceSynchronization2FeaturesKHR + /// + PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features, + + /// + /// PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR + /// + PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures, + + /// + /// PhysicalDeviceImageRobustnessFeaturesEXT + /// + PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures, + + /// + /// CopyBufferInfo2KHR + /// + CopyBufferInfo2KHR = CopyBufferInfo2, + + /// + /// CopyImageInfo2KHR + /// + CopyImageInfo2KHR = CopyImageInfo2, + + /// + /// CopyBufferToImageInfo2KHR + /// + CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2, + + /// + /// CopyImageToBufferInfo2KHR + /// + CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2, + + /// + /// BlitImageInfo2KHR + /// + BlitImageInfo2KHR = BlitImageInfo2, + + /// + /// ResolveImageInfo2KHR + /// + ResolveImageInfo2KHR = ResolveImageInfo2, + + /// + /// BufferCopy2KHR + /// + BufferCopy2KHR = BufferCopy2, + + /// + /// ImageCopy2KHR + /// + ImageCopy2KHR = ImageCopy2, + + /// + /// ImageBlit2KHR + /// + ImageBlit2KHR = ImageBlit2, + + /// + /// BufferImageCopy2KHR + /// + BufferImageCopy2KHR = BufferImageCopy2, + + /// + /// ImageResolve2KHR + /// + ImageResolve2KHR = ImageResolve2, + + /// + /// SubresourceLayout2EXT + /// + SubresourceLayout2EXT = SubresourceLayout2, + + /// + /// ImageSubresource2EXT + /// + ImageSubresource2EXT = ImageSubresource2, + + /// + /// PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM + /// + PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = + PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT, + + /// + /// PhysicalDeviceMutableDescriptorTypeFeaturesVALVE + /// + PhysicalDeviceMutableDescriptorTypeFeaturesVALVE = PhysicalDeviceMutableDescriptorTypeFeaturesEXT, + + /// + /// MutableDescriptorTypeCreateInfoVALVE + /// + MutableDescriptorTypeCreateInfoVALVE = MutableDescriptorTypeCreateInfoEXT, + + /// + /// FormatProperties3KHR + /// + FormatProperties3KHR = FormatProperties3, + + /// + /// PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT + /// + PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT = PhysicalDevicePresentModeFifoLatestReadyFeaturesKHR, + + /// + /// PipelineInfoEXT + /// + PipelineInfoEXT = PipelineInfoKHR, + + /// + /// PhysicalDeviceGlobalPriorityQueryFeaturesEXT + /// + PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeatures, + + /// + /// QueueFamilyGlobalPriorityPropertiesEXT + /// + QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityProperties, + + /// + /// PhysicalDeviceMaintenance4FeaturesKHR + /// + PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features, + + /// + /// PhysicalDeviceMaintenance4PropertiesKHR + /// + PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties, + + /// + /// DeviceBufferMemoryRequirementsKHR + /// + DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements, + + /// + /// DeviceImageMemoryRequirementsKHR + /// + DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements, + + /// + /// PhysicalDeviceShaderSubgroupRotateFeaturesKHR + /// + PhysicalDeviceShaderSubgroupRotateFeaturesKHR = PhysicalDeviceShaderSubgroupRotateFeatures, + + /// + /// PhysicalDeviceDepthClampZeroOneFeaturesEXT + /// + PhysicalDeviceDepthClampZeroOneFeaturesEXT = PhysicalDeviceDepthClampZeroOneFeaturesKHR, + + /// + /// PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM + /// + PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM = PhysicalDeviceFragmentDensityMapOffsetFeaturesEXT, + + /// + /// PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM + /// + PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM = PhysicalDeviceFragmentDensityMapOffsetPropertiesEXT, + + /// + /// SubpassFragmentDensityMapOffsetEndInfoQCOM + /// + SubpassFragmentDensityMapOffsetEndInfoQCOM = RenderPassFragmentDensityMapOffsetEndInfoEXT, + + /// + /// PhysicalDeviceCopyMemoryIndirectPropertiesNV + /// + PhysicalDeviceCopyMemoryIndirectPropertiesNV = PhysicalDeviceCopyMemoryIndirectPropertiesKHR, + + /// + /// PhysicalDeviceMemoryDecompressionFeaturesNV + /// + PhysicalDeviceMemoryDecompressionFeaturesNV = PhysicalDeviceMemoryDecompressionFeaturesEXT, + + /// + /// PhysicalDeviceMemoryDecompressionPropertiesNV + /// + PhysicalDeviceMemoryDecompressionPropertiesNV = PhysicalDeviceMemoryDecompressionPropertiesEXT, + + /// + /// PhysicalDevicePipelineProtectedAccessFeaturesEXT + /// + PhysicalDevicePipelineProtectedAccessFeaturesEXT = PhysicalDevicePipelineProtectedAccessFeatures, + + /// + /// PhysicalDeviceMaintenance5FeaturesKHR + /// + PhysicalDeviceMaintenance5FeaturesKHR = PhysicalDeviceMaintenance5Features, + + /// + /// PhysicalDeviceMaintenance5PropertiesKHR + /// + PhysicalDeviceMaintenance5PropertiesKHR = PhysicalDeviceMaintenance5Properties, + + /// + /// RenderingAreaInfoKHR + /// + RenderingAreaInfoKHR = RenderingAreaInfo, + + /// + /// DeviceImageSubresourceInfoKHR + /// + DeviceImageSubresourceInfoKHR = DeviceImageSubresourceInfo, + + /// + /// SubresourceLayout2KHR + /// + SubresourceLayout2KHR = SubresourceLayout2, + + /// + /// ImageSubresource2KHR + /// + ImageSubresource2KHR = ImageSubresource2, + + /// + /// PipelineCreateFlags2CreateInfoKHR + /// + PipelineCreateFlags2CreateInfoKHR = PipelineCreateFlags2CreateInfo, + + /// + /// BufferUsageFlags2CreateInfoKHR + /// + BufferUsageFlags2CreateInfoKHR = BufferUsageFlags2CreateInfo, + + /// + /// ShaderRequiredSubgroupSizeCreateInfoEXT + /// + ShaderRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo, + + /// + /// PhysicalDeviceVertexAttributeDivisorPropertiesKHR + /// + PhysicalDeviceVertexAttributeDivisorPropertiesKHR = PhysicalDeviceVertexAttributeDivisorProperties, + + /// + /// PipelineVertexInputDivisorStateCreateInfoKHR + /// + PipelineVertexInputDivisorStateCreateInfoKHR = PipelineVertexInputDivisorStateCreateInfo, + + /// + /// PhysicalDeviceVertexAttributeDivisorFeaturesKHR + /// + PhysicalDeviceVertexAttributeDivisorFeaturesKHR = PhysicalDeviceVertexAttributeDivisorFeatures, + + /// + /// PhysicalDeviceShaderFloatControls2FeaturesKHR + /// + PhysicalDeviceShaderFloatControls2FeaturesKHR = PhysicalDeviceShaderFloatControls2Features, + + /// + /// PhysicalDeviceIndexTypeUInt8FeaturesKHR + /// + PhysicalDeviceIndexTypeUInt8FeaturesKHR = PhysicalDeviceIndexTypeUInt8Features, + + /// + /// PhysicalDeviceLineRasterizationFeaturesKHR + /// + PhysicalDeviceLineRasterizationFeaturesKHR = PhysicalDeviceLineRasterizationFeatures, + + /// + /// PipelineRasterizationLineStateCreateInfoKHR + /// + PipelineRasterizationLineStateCreateInfoKHR = PipelineRasterizationLineStateCreateInfo, + + /// + /// PhysicalDeviceLineRasterizationPropertiesKHR + /// + PhysicalDeviceLineRasterizationPropertiesKHR = PhysicalDeviceLineRasterizationProperties, + + /// + /// PhysicalDeviceShaderExpectAssumeFeaturesKHR + /// + PhysicalDeviceShaderExpectAssumeFeaturesKHR = PhysicalDeviceShaderExpectAssumeFeatures, + + /// + /// PhysicalDeviceMaintenance6FeaturesKHR + /// + PhysicalDeviceMaintenance6FeaturesKHR = PhysicalDeviceMaintenance6Features, + + /// + /// PhysicalDeviceMaintenance6PropertiesKHR + /// + PhysicalDeviceMaintenance6PropertiesKHR = PhysicalDeviceMaintenance6Properties, + + /// + /// BindMemoryStatusKHR + /// + BindMemoryStatusKHR = BindMemoryStatus, + + /// + /// BindDescriptorSetsInfoKHR + /// + BindDescriptorSetsInfoKHR = BindDescriptorSetsInfo, + + /// + /// PushConstantsInfoKHR + /// + PushConstantsInfoKHR = PushConstantsInfo, + + /// + /// PushDescriptorSetInfoKHR + /// + PushDescriptorSetInfoKHR = PushDescriptorSetInfo, + + /// + /// PushDescriptorSetWithTemplateInfoKHR + /// + PushDescriptorSetWithTemplateInfoKHR = PushDescriptorSetWithTemplateInfo, + + /// + /// RenderingEndInfoEXT + /// + RenderingEndInfoEXT = RenderingEndInfoKHR, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSubgroupFeatureFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSubgroupFeatureFlags.gen.cs new file mode 100644 index 0000000..99d0350 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSubgroupFeatureFlags.gen.cs @@ -0,0 +1,120 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubgroupFeatureFlagBits - Bitmask describing what group operations are supported with subgroup scope + /// + /// + /// + /// Bits which can be set in + /// VkPhysicalDeviceSubgroupProperties::supportedOperations + /// to specify supported group operations^ with + /// subgroup scope^ are: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkSubgroupFeatureFlagBits { + /// VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, + /// VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, + /// VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004, + /// VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008, + /// VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010, + /// VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, + /// VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, + /// VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, + /// // Provided by VK_VERSION_1_4 + /// VK_SUBGROUP_FEATURE_ROTATE_BIT = 0x00000200, + /// // Provided by VK_VERSION_1_4 + /// VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT = 0x00000400, + /// // Provided by VK_EXT_shader_subgroup_partitioned + /// VK_SUBGROUP_FEATURE_PARTITIONED_BIT_EXT = 0x00000100, + /// // Provided by VK_NV_shader_subgroup_partitioned + /// VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_EXT, + /// // Provided by VK_KHR_shader_subgroup_rotate + /// VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_BIT, + /// // Provided by VK_KHR_shader_subgroup_rotate + /// VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT, + /// } VkSubgroupFeatureFlagBits; + /// + /// + [Flags] + public enum VkSubgroupFeatureFlags : int + { + /// No flags set. + None = 0, + + /// + /// BasicBit + /// + BasicBit = 0x00000001, + + /// + /// VoteBit + /// + VoteBit = 0x00000002, + + /// + /// ArithmeticBit + /// + ArithmeticBit = 0x00000004, + + /// + /// BallotBit + /// + BallotBit = 0x00000008, + + /// + /// ShuffleBit + /// + ShuffleBit = 0x00000010, + + /// + /// ShuffleRelativeBit + /// + ShuffleRelativeBit = 0x00000020, + + /// + /// ClusteredBit + /// + ClusteredBit = 0x00000040, + + /// + /// QuadBit + /// + QuadBit = 0x00000080, + + /// + /// RotateBit + /// + RotateBit = 0x00000200, + + /// + /// RotateClusteredBit + /// + RotateClusteredBit = 0x00000400, + + /// + /// PartitionedBitEXT + /// + PartitionedBitEXT = 0x00000100, + + /// + /// PartitionedBitNV + /// + PartitionedBitNV = PartitionedBitEXT, + + /// + /// RotateBitKHR + /// + RotateBitKHR = RotateBit, + + /// + /// RotateClusteredBitKHR + /// + RotateClusteredBitKHR = RotateClusteredBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSubmitFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSubmitFlags.gen.cs new file mode 100644 index 0000000..6517b2c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSubmitFlags.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubmitFlagBits - Bitmask specifying behavior of a submission + /// + /// + /// + /// Bits which can be set in VkSubmitInfo2::flags, specifying + /// submission behavior, are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef enum VkSubmitFlagBits { + /// VK_SUBMIT_PROTECTED_BIT = 0x00000001, + /// // Provided by VK_KHR_synchronization2 + /// VK_SUBMIT_PROTECTED_BIT_KHR = VK_SUBMIT_PROTECTED_BIT, + /// } VkSubmitFlagBits; + /// + /// + [Flags] + public enum VkSubmitFlags : int + { + /// No flags set. + None = 0, + + /// + /// ProtectedBit specifies that this batch is a protected submission. + /// + ProtectedBit = 0x00000001, + + /// + /// ProtectedBitKHR + /// + ProtectedBitKHR = ProtectedBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSubpassContents.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSubpassContents.gen.cs new file mode 100644 index 0000000..3297c53 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSubpassContents.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassContents - Specify how commands in the first subpass of a render pass are provided + /// + /// + /// + /// Possible values of vkCmdBeginRenderPass::contents, specifying + /// how the commands in the first subpass will be provided, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSubpassContents { + /// VK_SUBPASS_CONTENTS_INLINE = 0, + /// VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1, + /// // Provided by VK_KHR_maintenance7 + /// VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR = 1000451000, + /// // Provided by VK_EXT_nested_command_buffer + /// VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR, + /// } VkSubpassContents; + /// + /// + public enum VkSubpassContents : int + { + /// + /// Inline specifies that the contents of the subpass will be recorded inline in the primary command buffer, and secondary command buffers must not be executed within the subpass. + /// + Inline = 0, + + /// + /// SecondaryCommandBuffers specifies that the contents are recorded in secondary command buffers that will be called from the primary command buffer, and vkCmdExecuteCommands is the only valid command in the command buffer until vkCmdNextSubpass or vkCmdEndRenderPass. + /// + SecondaryCommandBuffers = 1, + + /// + /// InlineAndSecondaryCommandBuffersKHR + /// + InlineAndSecondaryCommandBuffersKHR = 1000451000, + + /// + /// InlineAndSecondaryCommandBuffersEXT + /// + InlineAndSecondaryCommandBuffersEXT = InlineAndSecondaryCommandBuffersKHR, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSubpassDescriptionFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSubpassDescriptionFlags.gen.cs new file mode 100644 index 0000000..3a659c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSubpassDescriptionFlags.gen.cs @@ -0,0 +1,126 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassDescriptionFlagBits - Bitmask specifying usage of a subpass + /// + /// + /// + /// Bits which can be set in VkSubpassDescription::flags, + /// specifying usage of the subpass, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSubpassDescriptionFlagBits { + /// // Provided by VK_NVX_multiview_per_view_attributes + /// VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, + /// // Provided by VK_NVX_multiview_per_view_attributes + /// VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, + /// // Provided by VK_QCOM_tile_shading + /// VK_SUBPASS_DESCRIPTION_TILE_SHADING_APRON_BIT_QCOM = 0x00000100, + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 0x00000010, + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000020, + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000040, + /// // Provided by VK_EXT_legacy_dithering + /// VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000080, + /// // Provided by VK_EXT_custom_resolve + /// VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT = 0x00000004, + /// // Provided by VK_EXT_custom_resolve + /// VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT = 0x00000008, + /// // Provided by VK_QCOM_render_pass_shader_resolve + /// VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM = VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_EXT, + /// // Provided by VK_QCOM_render_pass_shader_resolve + /// VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM = VK_SUBPASS_DESCRIPTION_CUSTOM_RESOLVE_BIT_EXT, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, + /// // Provided by VK_ARM_rasterization_order_attachment_access + /// VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, + /// } VkSubpassDescriptionFlagBits; + /// + /// + [Flags] + public enum VkSubpassDescriptionFlags : int + { + /// No flags set. + None = 0, + + /// + /// PerViewAttributesBitNVX + /// + PerViewAttributesBitNVX = 0x00000001, + + /// + /// PerViewPositionXOnlyBitNVX + /// + PerViewPositionXOnlyBitNVX = 0x00000002, + + /// + /// TileShadingApronBitQCOM + /// + TileShadingApronBitQCOM = 0x00000100, + + /// + /// RasterizationOrderAttachmentColorAccessBitEXT + /// + RasterizationOrderAttachmentColorAccessBitEXT = 0x00000010, + + /// + /// RasterizationOrderAttachmentDepthAccessBitEXT + /// + RasterizationOrderAttachmentDepthAccessBitEXT = 0x00000020, + + /// + /// RasterizationOrderAttachmentStencilAccessBitEXT + /// + RasterizationOrderAttachmentStencilAccessBitEXT = 0x00000040, + + /// + /// EnableLegacyDitheringBitEXT + /// + EnableLegacyDitheringBitEXT = 0x00000080, + + /// + /// FragmentRegionBitEXT + /// + FragmentRegionBitEXT = 0x00000004, + + /// + /// CustomResolveBitEXT + /// + CustomResolveBitEXT = 0x00000008, + + /// + /// FragmentRegionBitQCOM + /// + FragmentRegionBitQCOM = FragmentRegionBitEXT, + + /// + /// ShaderResolveBitQCOM + /// + ShaderResolveBitQCOM = CustomResolveBitEXT, + + /// + /// RasterizationOrderAttachmentColorAccessBitARM + /// + RasterizationOrderAttachmentColorAccessBitARM = RasterizationOrderAttachmentColorAccessBitEXT, + + /// + /// RasterizationOrderAttachmentDepthAccessBitARM + /// + RasterizationOrderAttachmentDepthAccessBitARM = RasterizationOrderAttachmentDepthAccessBitEXT, + + /// + /// RasterizationOrderAttachmentStencilAccessBitARM + /// + RasterizationOrderAttachmentStencilAccessBitARM = RasterizationOrderAttachmentStencilAccessBitEXT, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSubpassMergeStatusEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSubpassMergeStatusEXT.gen.cs new file mode 100644 index 0000000..d40ee7f --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSubpassMergeStatusEXT.gen.cs @@ -0,0 +1,108 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassMergeStatusEXT - Specify a subpass merging status + /// + /// + /// + /// Possible values of + /// VkRenderPassSubpassFeedbackInfoEXT:subpassMergeStatus are: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef enum VkSubpassMergeStatusEXT { + /// VK_SUBPASS_MERGE_STATUS_MERGED_EXT = 0, + /// VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12, + /// VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13, + /// } VkSubpassMergeStatusEXT; + /// + /// + public enum VkSubpassMergeStatusEXT : int + { + /// + /// MergedEXT specifies that the subpass is merged with a previous subpass. + /// + MergedEXT = 0, + + /// + /// DisallowedEXT specifies that the subpass is not merged because merging was disabled using VkRenderPassCreationControlEXT. If the render pass does not allow subpass merging, then all subpass statuses are set to this value. If a subpass description does not allow subpass merging, then only that subpass's status is set to this value. + /// + DisallowedEXT = 1, + + /// + /// NotMergedSideEffectsEXT specifies that the subpass is not merged because it contains side effects. + /// + NotMergedSideEffectsEXT = 2, + + /// + /// NotMergedSamplesMismatchEXT specifies that the subpass is not merged because sample count is not compatible with the previous subpass. + /// + NotMergedSamplesMismatchEXT = 3, + + /// + /// NotMergedViewsMismatchEXT specifies that the subpass is not merged because view masks do not match with previous subpass. + /// + NotMergedViewsMismatchEXT = 4, + + /// + /// NotMergedAliasingEXT specifies that the subpass is not merged because of attachments aliasing between them. + /// + NotMergedAliasingEXT = 5, + + /// + /// NotMergedDependenciesEXT specifies that the subpass is not merged because subpass dependencies do not allow merging. + /// + NotMergedDependenciesEXT = 6, + + /// + /// NotMergedIncompatibleInputAttachmentEXT specifies that the subpass is not merged because input attachment is not a color attachment from previous subpass or the formats are incompatible. + /// + NotMergedIncompatibleInputAttachmentEXT = 7, + + /// + /// NotMergedTooManyAttachmentsEXT specifies that the subpass is not merged because of too many attachments. + /// + NotMergedTooManyAttachmentsEXT = 8, + + /// + /// NotMergedInsufficientStorageEXT specifies that the subpass is not merged because of insufficient memory. + /// + NotMergedInsufficientStorageEXT = 9, + + /// + /// NotMergedDepthStencilCountEXT specifies that the subpass is not merged because of too many depth/stencil attachments. + /// + NotMergedDepthStencilCountEXT = 10, + + /// + /// NotMergedResolveAttachmentReuseEXT specifies that the subpass is not merged because a resolve attachment is reused as an input attachment in a subsequent subpass. + /// + NotMergedResolveAttachmentReuseEXT = 11, + + /// + /// NotMergedSingleSubpassEXT specifies that the subpass is not merged because the render pass has only one subpass. + /// + NotMergedSingleSubpassEXT = 12, + + /// + /// NotMergedUnspecifiedEXT specifies that the subpass is not merged for unspecified reasons. Implementations should return this value when no other VkSubpassMergeStatusEXT value is appropriate. + /// + NotMergedUnspecifiedEXT = 13, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSurfaceCounterFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSurfaceCounterFlagsEXT.gen.cs new file mode 100644 index 0000000..5620bf4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSurfaceCounterFlagsEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCounterFlagBitsEXT - Surface-relative counter types + /// + /// + /// + /// Bits which can be set in + /// VkSurfaceCapabilities2EXT::supportedSurfaceCounters, indicating + /// supported surface counter types, are: + /// + /// + /// // Provided by VK_EXT_display_surface_counter + /// typedef enum VkSurfaceCounterFlagBitsEXT { + /// VK_SURFACE_COUNTER_VBLANK_BIT_EXT = 0x00000001, + /// // VK_SURFACE_COUNTER_VBLANK_EXT is a legacy alias + /// VK_SURFACE_COUNTER_VBLANK_EXT = VK_SURFACE_COUNTER_VBLANK_BIT_EXT, + /// } VkSurfaceCounterFlagBitsEXT; + /// + /// + [Flags] + public enum VkSurfaceCounterFlagsEXT : int + { + /// No flags set. + None = 0, + + /// + /// VblankBitEXT specifies a counter incrementing once every time a vertical blanking period occurs on the display associated with the surface. + /// + VblankBitEXT = 0x00000001, + + /// + /// VblankEXT + /// + VblankEXT = VblankBitEXT, + + /// + /// FlagBitsMaxEnumEXT + /// + FlagBitsMaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSurfaceTransformFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSurfaceTransformFlagsKHR.gen.cs new file mode 100644 index 0000000..7fc3c81 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSurfaceTransformFlagsKHR.gen.cs @@ -0,0 +1,87 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a device + /// + /// + /// + /// Bits which may: be set in + /// VkSurfaceCapabilitiesKHR::supportedTransforms indicating the + /// presentation transforms supported for the surface on the specified device, + /// and possible values of + /// VkSurfaceCapabilitiesKHR::currentTransform indicating the + /// surface's current transform relative to the presentation engine's natural + /// orientation, are: + /// + /// + /// // Provided by VK_KHR_surface + /// typedef enum VkSurfaceTransformFlagBitsKHR { + /// VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, + /// VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, + /// VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, + /// VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, + /// VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, + /// VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, + /// VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, + /// VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, + /// VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, + /// } VkSurfaceTransformFlagBitsKHR; + /// + /// + [Flags] + public enum VkSurfaceTransformFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// IdentityBitKHR specifies that image content is presented without being transformed. + /// + IdentityBitKHR = 0x00000001, + + /// + /// Rotate90BitKHR specifies that image content is rotated 90 degrees clockwise. + /// + Rotate90BitKHR = 0x00000002, + + /// + /// Rotate180BitKHR specifies that image content is rotated 180 degrees clockwise. + /// + Rotate180BitKHR = 0x00000004, + + /// + /// Rotate270BitKHR specifies that image content is rotated 270 degrees clockwise. + /// + Rotate270BitKHR = 0x00000008, + + /// + /// HorizontalMirrorBitKHR specifies that image content is mirrored horizontally. + /// + HorizontalMirrorBitKHR = 0x00000010, + + /// + /// HorizontalMirrorRotate90BitKHR specifies that image content is mirrored horizontally, then rotated 90 degrees clockwise. + /// + HorizontalMirrorRotate90BitKHR = 0x00000020, + + /// + /// HorizontalMirrorRotate180BitKHR specifies that image content is mirrored horizontally, then rotated 180 degrees clockwise. + /// + HorizontalMirrorRotate180BitKHR = 0x00000040, + + /// + /// HorizontalMirrorRotate270BitKHR specifies that image content is mirrored horizontally, then rotated 270 degrees clockwise. + /// + HorizontalMirrorRotate270BitKHR = 0x00000080, + + /// + /// InheritBitKHR specifies that the presentation transform is not specified, and is instead determined by platform-specific considerations and mechanisms outside Vulkan. + /// + InheritBitKHR = 0x00000100, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSwapchainCreateFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSwapchainCreateFlagsKHR.gen.cs new file mode 100644 index 0000000..91b2dec --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSwapchainCreateFlagsKHR.gen.cs @@ -0,0 +1,91 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainCreateFlagBitsKHR - Bitmask controlling swapchain creation + /// + /// + /// + /// Bits which can be set in VkSwapchainCreateInfoKHR::flags, + /// specifying parameters of swapchain creation, are: + /// + /// + /// // Provided by VK_KHR_swapchain + /// typedef enum VkSwapchainCreateFlagBitsKHR { + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001, + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain + /// VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_swapchain_mutable_format + /// VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 0x00000004, + /// // Provided by VK_EXT_present_timing + /// VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT = 0x00000200, + /// // Provided by VK_KHR_present_id2 + /// VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR = 0x00000040, + /// // Provided by VK_KHR_present_wait2 + /// VK_SWAPCHAIN_CREATE_PRESENT_WAIT_2_BIT_KHR = 0x00000080, + /// // Provided by VK_KHR_swapchain_maintenance1 + /// VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR = 0x00000008, + /// // Provided by VK_EXT_multisampled_render_to_swapchain + /// VK_SWAPCHAIN_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00000100, + /// // Provided by VK_EXT_swapchain_maintenance1 + /// VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT = VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR, + /// } VkSwapchainCreateFlagBitsKHR; + /// + /// + [Flags] + public enum VkSwapchainCreateFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// SplitInstanceBindRegionsBitKHR + /// + SplitInstanceBindRegionsBitKHR = 0x00000001, + + /// + /// ProtectedBitKHR + /// + ProtectedBitKHR = 0x00000002, + + /// + /// MutableFormatBitKHR + /// + MutableFormatBitKHR = 0x00000004, + + /// + /// PresentTimingBitEXT + /// + PresentTimingBitEXT = 0x00000200, + + /// + /// PresentId2BitKHR + /// + PresentId2BitKHR = 0x00000040, + + /// + /// PresentWait2BitKHR + /// + PresentWait2BitKHR = 0x00000080, + + /// + /// DeferredMemoryAllocationBitKHR + /// + DeferredMemoryAllocationBitKHR = 0x00000008, + + /// + /// MultisampledRenderToSingleSampledBitEXT + /// + MultisampledRenderToSingleSampledBitEXT = 0x00000100, + + /// + /// DeferredMemoryAllocationBitEXT + /// + DeferredMemoryAllocationBitEXT = DeferredMemoryAllocationBitKHR, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkSystemAllocationScope.gen.cs b/Brutal.Vulkan/Generated/Enums/VkSystemAllocationScope.gen.cs new file mode 100644 index 0000000..4334b76 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkSystemAllocationScope.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSystemAllocationScope - Allocation scope + /// + /// + /// + /// [[memory-host-allocation-scope]] + /// Each allocation has an allocation scope defining its lifetime and which + /// object it is associated with. + /// Possible values passed to the allocationScope parameter of the + /// callback functions specified by VkAllocationCallbacks, indicating the + /// allocation scope, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkSystemAllocationScope { + /// VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0, + /// VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1, + /// VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2, + /// VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3, + /// VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4, + /// } VkSystemAllocationScope; + /// + /// + public enum VkSystemAllocationScope : int + { + /// + /// Command specifies that the allocation is scoped to the duration of the Vulkan command. + /// + Command = 0, + + /// + /// Object specifies that the allocation is scoped to the lifetime of the Vulkan object that is being created or used. + /// + Object = 1, + + /// + /// Cache specifies that the allocation is scoped to the lifetime of a VkPipelineCache object. + /// + Cache = 2, + + /// + /// Device specifies that the allocation is scoped to the lifetime of the Vulkan device. + /// + Device = 3, + + /// + /// Instance specifies that the allocation is scoped to the lifetime of the Vulkan instance. Most Vulkan commands operate on a single object, or there is a sole object that is being created or manipulated. When an allocation uses an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_OBJECT or VK_SYSTEM_ALLOCATION_SCOPE_CACHE, the allocation is scoped to the object being created or manipulated. When an implementation requires host memory, it will make callbacks to the application using the most specific allocator and allocation scope available: + /// + Instance = 4, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTensorCreateFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTensorCreateFlagsARM.gen.cs new file mode 100644 index 0000000..7132506 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTensorCreateFlagsARM.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorCreateFlagBitsARM - Bitmask specifying additional parameters of a tensor + /// + /// + /// + /// Bits which can be set in VkTensorCreateInfoARM::flags, + /// specifying additional parameters of a tensor, are: + /// + /// + /// // Provided by VK_ARM_tensors + /// // Flag bits for VkTensorCreateFlagBitsARM + /// typedef VkFlags64 VkTensorCreateFlagBitsARM; + /// static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_MUTABLE_FORMAT_BIT_ARM = 0x00000001ULL; + /// static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_PROTECTED_BIT_ARM = 0x00000002ULL; + /// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors + /// static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_ARM = 0x00000008ULL; + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// static const VkTensorCreateFlagBitsARM VK_TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM = 0x00000004ULL; + /// + /// + [Flags] + public enum VkTensorCreateFlagsARM : ulong + { + /// No flags set. + None = 0, + + /// + /// MutableFormatBitARM specifies that the tensor can be used to create a VkTensorViewARM with a different format from the tensor. + /// + MutableFormatBitARM = 0x00000001, + + /// + /// ProtectedBitARM specifies that the tensor is a protected tensor. + /// + ProtectedBitARM = 0x00000002, + + /// + /// DescriptorHeapCaptureReplayBitARM + /// + DescriptorHeapCaptureReplayBitARM = 0x00000008, + + /// + /// DescriptorBufferCaptureReplayBitARM + /// + DescriptorBufferCaptureReplayBitARM = 0x00000004, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTensorTilingARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTensorTilingARM.gen.cs new file mode 100644 index 0000000..efbb89d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTensorTilingARM.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorTilingARM - Specifies the tiling arrangement of data in an tensor + /// + /// + /// + /// Possible values of VkTensorCreateInfoARM::tiling, specifying the + /// tiling arrangement of elements in the tensor, are: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef enum VkTensorTilingARM { + /// VK_TENSOR_TILING_OPTIMAL_ARM = 0, + /// VK_TENSOR_TILING_LINEAR_ARM = 1, + /// // Provided by VK_ARM_tensor_controls + /// VK_TENSOR_TILING_BRICK_16_WIDE_ARM = 1000565000, + /// // Provided by VK_ARM_tensor_controls + /// VK_TENSOR_TILING_BRICK_8_WIDE_ARM = 1000565001, + /// // Provided by VK_ARM_tensor_controls + /// VK_TENSOR_TILING_BRICK_4_WIDE_ARM = 1000565002, + /// // Provided by VK_ARM_tensor_controls + /// VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM = 1000565003, + /// // Provided by VK_ARM_tensor_controls + /// VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM = 1000565004, + /// } VkTensorTilingARM; + /// + /// + public enum VkTensorTilingARM : int + { + /// + /// OptimalARM specifies optimal tiling (elements are laid out in an implementation-dependent arrangement, for more efficient memory access). + /// + OptimalARM = 0, + + /// + /// LinearARM specifies linear tiling (elements are laid out linearly and the offset between each element is determined by the strides^ of the tensor). + /// + LinearARM = 1, + + /// + /// Brick16WideARM + /// + Brick16WideARM = 1000565000, + + /// + /// Brick8WideARM + /// + Brick8WideARM = 1000565001, + + /// + /// Brick4WideARM + /// + Brick4WideARM = 1000565002, + + /// + /// BlockUInterleavedARM + /// + BlockUInterleavedARM = 1000565003, + + /// + /// BlockUInterleaved64KARM + /// + BlockUInterleaved64KARM = 1000565004, + + /// + /// MaxEnumARM + /// + MaxEnumARM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTensorUsageFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTensorUsageFlagsARM.gen.cs new file mode 100644 index 0000000..c8c8fcf --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTensorUsageFlagsARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorUsageFlagBitsARM - Bitmask specifying allowed usage of a tensor + /// + /// + /// + /// Bits which can be set in VkTensorDescriptionARM::usage, + /// specifying usage behavior of a tensor, are: + /// + /// + /// // Provided by VK_ARM_tensors + /// // Flag bits for VkTensorUsageFlagBitsARM + /// typedef VkFlags64 VkTensorUsageFlagBitsARM; + /// static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_SHADER_BIT_ARM = 0x00000002ULL; + /// static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_TRANSFER_SRC_BIT_ARM = 0x00000004ULL; + /// static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_TRANSFER_DST_BIT_ARM = 0x00000008ULL; + /// static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_IMAGE_ALIASING_BIT_ARM = 0x00000010ULL; + /// // Provided by VK_ARM_data_graph + /// static const VkTensorUsageFlagBitsARM VK_TENSOR_USAGE_DATA_GRAPH_BIT_ARM = 0x00000020ULL; + /// + /// + [Flags] + public enum VkTensorUsageFlagsARM : ulong + { + /// No flags set. + None = 0, + + /// + /// ShaderBitARM specifies that the tensor can be used to create a VkTensorViewARM suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_TENSOR_ARM accessed by shader stages. + /// + ShaderBitARM = 0x00000002, + + /// + /// TransferSrcBitARM specifies that the tensor can be used as the source of a transfer command (see the definition of VK_PIPELINE_STAGE_TRANSFER_BIT^). + /// + TransferSrcBitARM = 0x00000004, + + /// + /// TransferDstBitARM specifies that the tensor can be used as the destination of a transfer command. + /// + TransferDstBitARM = 0x00000008, + + /// + /// ImageAliasingBitARM specifies that the tensor can be bound to a range of memory aliased with an image created with VK_IMAGE_TILING_OPTIMAL. See here for a complete set of rules for tensor/image aliasing. + /// + ImageAliasingBitARM = 0x00000010, + + /// + /// DataGraphBitARM + /// + DataGraphBitARM = 0x00000020, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTensorViewCreateFlagsARM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTensorViewCreateFlagsARM.gen.cs new file mode 100644 index 0000000..6a0f378 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTensorViewCreateFlagsARM.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorViewCreateFlagBitsARM - Bitmask specifying additional parameters of an tensor view + /// + /// + /// + /// Bits which can be set in VkTensorViewCreateInfoARM::flags, + /// specifying additional parameters of an tensor, are: + /// + /// + /// // Provided by VK_ARM_tensors + /// // Flag bits for VkTensorViewCreateFlagBitsARM + /// typedef VkFlags64 VkTensorViewCreateFlagBitsARM; + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// static const VkTensorViewCreateFlagBitsARM VK_TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM = 0x00000001ULL; + /// + /// + [Flags] + public enum VkTensorViewCreateFlagsARM : ulong + { + /// No flags set. + None = 0, + + /// + /// DescriptorBufferCaptureReplayBitARM + /// + DescriptorBufferCaptureReplayBitARM = 0x00000001, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTessellationDomainOrigin.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTessellationDomainOrigin.gen.cs new file mode 100644 index 0000000..2119092 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTessellationDomainOrigin.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTessellationDomainOrigin - Enum describing tessellation domain origin + /// + /// + /// + /// The possible tessellation domain origins are specified by the + /// VkTessellationDomainOrigin enumeration: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef enum VkTessellationDomainOrigin { + /// VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0, + /// VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1, + /// // Provided by VK_KHR_maintenance2 + /// VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT, + /// // Provided by VK_KHR_maintenance2 + /// VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT, + /// } VkTessellationDomainOrigin; + /// + /// + public enum VkTessellationDomainOrigin : int + { + /// + /// UpperLeft specifies that the origin of the domain space is in the upper left corner, as shown in figure here. + /// + UpperLeft = 0, + + /// + /// LowerLeft specifies that the origin of the domain space is in the lower left corner, as shown in figure here. This enum affects how the VertexOrderCw and VertexOrderCcw tessellation execution modes are interpreted, since the winding is defined relative to the orientation of the domain. + /// + LowerLeft = 1, + + /// + /// UpperLeftKHR + /// + UpperLeftKHR = UpperLeft, + + /// + /// LowerLeftKHR + /// + LowerLeftKHR = LowerLeft, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkThrottleHintTypeSEC.gen.cs b/Brutal.Vulkan/Generated/Enums/VkThrottleHintTypeSEC.gen.cs new file mode 100644 index 0000000..9b66a1d --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkThrottleHintTypeSEC.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkThrottleHintTypeSEC - Stub description of VkThrottleHintTypeSEC + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_SEC_throttle_hint + /// typedef enum VkThrottleHintTypeSEC { + /// VK_THROTTLE_HINT_TYPE_DEFAULT_SEC = 0, + /// VK_THROTTLE_HINT_TYPE_LOW_SEC = 1, + /// VK_THROTTLE_HINT_TYPE_HIGH_SEC = 2, + /// } VkThrottleHintTypeSEC; + /// + /// + public enum VkThrottleHintTypeSEC : int + { + /// + /// DefaultSEC + /// + DefaultSEC = 0, + + /// + /// LowSEC + /// + LowSEC = 1, + + /// + /// HighSEC + /// + HighSEC = 2, + + /// + /// MaxEnumSEC + /// + MaxEnumSEC = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTileShadingRenderPassFlagsQCOM.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTileShadingRenderPassFlagsQCOM.gen.cs new file mode 100644 index 0000000..c62d44b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTileShadingRenderPassFlagsQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTileShadingRenderPassFlagBitsQCOM - Bitmask specifying flags for tile shading + /// + /// + /// + /// Bits which can be set in + /// VkRenderPassTileShadingCreateInfoQCOM::flags describing + /// additional properties of the render pass are: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef enum VkTileShadingRenderPassFlagBitsQCOM { + /// VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM = 0x00000001, + /// VK_TILE_SHADING_RENDER_PASS_PER_TILE_EXECUTION_BIT_QCOM = 0x00000002, + /// } VkTileShadingRenderPassFlagBitsQCOM; + /// + /// + [Flags] + public enum VkTileShadingRenderPassFlagsQCOM : int + { + /// No flags set. + None = 0, + + /// + /// EnableBitQCOM specifies that the render pass has tile shading enabled. + /// + EnableBitQCOM = 0x00000001, + + /// + /// PerTileExecutionBitQCOM specifies that the secondary command buffer will be executed within a per-tile execution block^. + /// + PerTileExecutionBitQCOM = 0x00000002, + + /// + /// FlagBitsMaxEnumQCOM + /// + FlagBitsMaxEnumQCOM = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkTimeDomainKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkTimeDomainKHR.gen.cs new file mode 100644 index 0000000..72b1e91 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkTimeDomainKHR.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTimeDomainKHR - Supported time domains + /// + /// + /// + /// The set of supported time domains consists of: + /// + /// + /// // Provided by VK_KHR_calibrated_timestamps + /// typedef enum VkTimeDomainKHR { + /// VK_TIME_DOMAIN_DEVICE_KHR = 0, + /// VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR = 1, + /// VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = 2, + /// VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = 3, + /// // Provided by VK_EXT_present_timing + /// VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT = 1000208000, + /// // Provided by VK_EXT_present_timing + /// VK_TIME_DOMAIN_SWAPCHAIN_LOCAL_EXT = 1000208001, + /// // Provided by VK_EXT_calibrated_timestamps + /// VK_TIME_DOMAIN_DEVICE_EXT = VK_TIME_DOMAIN_DEVICE_KHR, + /// // Provided by VK_EXT_calibrated_timestamps + /// VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR, + /// // Provided by VK_EXT_calibrated_timestamps + /// VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR, + /// // Provided by VK_EXT_calibrated_timestamps + /// VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR, + /// } VkTimeDomainKHR; + /// + /// + public enum VkTimeDomainKHR : int + { + /// + /// DeviceKHR specifies the device time domain. Timestamp values in this time domain use the same units and are comparable with device timestamp values captured using vkCmdWriteTimestamp and are defined to be incrementing according to the timestampPeriod^ of the device. + /// + DeviceKHR = 0, + + /// + /// ClockMonotonicKHR specifies the CLOCK_MONOTONIC time domain available on POSIX platforms. Timestamp values in this time domain are in units of nanoseconds and are comparable with platform timestamp values captured using the POSIX clock_gettime API as computed by this example: [NOTE] + /// + ClockMonotonicKHR = 1, + + /// + /// ClockMonotonicRawKHR + /// + ClockMonotonicRawKHR = 2, + + /// + /// QueryPerformanceCounterKHR + /// + QueryPerformanceCounterKHR = 3, + + /// + /// PresentStageLocalEXT + /// + PresentStageLocalEXT = 1000208000, + + /// + /// SwapchainLocalEXT + /// + SwapchainLocalEXT = 1000208001, + + /// + /// DeviceEXT + /// + DeviceEXT = DeviceKHR, + + /// + /// ClockMonotonicEXT + /// + ClockMonotonicEXT = ClockMonotonicKHR, + + /// + /// ClockMonotonicRawEXT + /// + ClockMonotonicRawEXT = ClockMonotonicRawKHR, + + /// + /// QueryPerformanceCounterEXT + /// + QueryPerformanceCounterEXT = QueryPerformanceCounterKHR, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkToolPurposeFlags.gen.cs b/Brutal.Vulkan/Generated/Enums/VkToolPurposeFlags.gen.cs new file mode 100644 index 0000000..c0e3eeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkToolPurposeFlags.gen.cs @@ -0,0 +1,108 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkToolPurposeFlagBits - Bitmask specifying the purposes of an active tool + /// + /// + /// + /// Bits which can be set in + /// VkPhysicalDeviceToolProperties::purposes, specifying the + /// purposes of an active tool, are: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef enum VkToolPurposeFlagBits { + /// VK_TOOL_PURPOSE_VALIDATION_BIT = 0x00000001, + /// VK_TOOL_PURPOSE_PROFILING_BIT = 0x00000002, + /// VK_TOOL_PURPOSE_TRACING_BIT = 0x00000004, + /// VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT = 0x00000008, + /// VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT = 0x00000010, + /// // Provided by VK_EXT_debug_report with VK_EXT_tooling_info, VK_EXT_debug_utils with VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT = 0x00000020, + /// // Provided by VK_EXT_debug_marker with VK_EXT_tooling_info, VK_EXT_debug_utils with VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT = 0x00000040, + /// // Provided by VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_VALIDATION_BIT_EXT = VK_TOOL_PURPOSE_VALIDATION_BIT, + /// // Provided by VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_PROFILING_BIT_EXT = VK_TOOL_PURPOSE_PROFILING_BIT, + /// // Provided by VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_TRACING_BIT_EXT = VK_TOOL_PURPOSE_TRACING_BIT, + /// // Provided by VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT = VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT, + /// // Provided by VK_EXT_tooling_info + /// VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT = VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT, + /// } VkToolPurposeFlagBits; + /// + /// + [Flags] + public enum VkToolPurposeFlags : int + { + /// No flags set. + None = 0, + + /// + /// ValidationBit specifies that the tool provides validation of API usage. + /// + ValidationBit = 0x00000001, + + /// + /// ProfilingBit specifies that the tool provides profiling of API usage. + /// + ProfilingBit = 0x00000002, + + /// + /// TracingBit specifies that the tool is capturing data about the application's API usage, including anything from simple logging to capturing data for later replay. + /// + TracingBit = 0x00000004, + + /// + /// AdditionalFeaturesBit specifies that the tool provides additional API features/extensions on top of the underlying implementation. + /// + AdditionalFeaturesBit = 0x00000008, + + /// + /// ModifyingFeaturesBit specifies that the tool modifies the API features/limits/extensions presented to the application. + /// + ModifyingFeaturesBit = 0x00000010, + + /// + /// DebugReportingBitEXT + /// + DebugReportingBitEXT = 0x00000020, + + /// + /// DebugMarkersBitEXT + /// + DebugMarkersBitEXT = 0x00000040, + + /// + /// ValidationBitEXT + /// + ValidationBitEXT = ValidationBit, + + /// + /// ProfilingBitEXT + /// + ProfilingBitEXT = ProfilingBit, + + /// + /// TracingBitEXT + /// + TracingBitEXT = TracingBit, + + /// + /// AdditionalFeaturesBitEXT + /// + AdditionalFeaturesBitEXT = AdditionalFeaturesBit, + + /// + /// ModifyingFeaturesBitEXT + /// + ModifyingFeaturesBitEXT = ModifyingFeaturesBit, + + /// + /// FlagBitsMaxEnum + /// + FlagBitsMaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkValidationCacheHeaderVersionEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkValidationCacheHeaderVersionEXT.gen.cs new file mode 100644 index 0000000..c3678c3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkValidationCacheHeaderVersionEXT.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationCacheHeaderVersionEXT - Encode validation cache version + /// + /// + /// + /// Possible values of the second group of four bytes in the header returned by + /// vkGetValidationCacheDataEXT, encoding the validation cache version, + /// are: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// typedef enum VkValidationCacheHeaderVersionEXT { + /// VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, + /// } VkValidationCacheHeaderVersionEXT; + /// + /// + public enum VkValidationCacheHeaderVersionEXT : int + { + /// + /// OneEXT specifies version one of the validation cache. + /// + OneEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkValidationCheckEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkValidationCheckEXT.gen.cs new file mode 100644 index 0000000..5d92d16 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkValidationCheckEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationCheckEXT - Specify validation checks to disable + /// + /// + /// + /// Possible values of elements of the + /// VkValidationFlagsEXT::pDisabledValidationChecks array, + /// specifying validation checks to be disabled, are: + /// + /// + /// // Provided by VK_EXT_validation_flags + /// typedef enum VkValidationCheckEXT { + /// VK_VALIDATION_CHECK_ALL_EXT = 0, + /// VK_VALIDATION_CHECK_SHADERS_EXT = 1, + /// } VkValidationCheckEXT; + /// + /// + public enum VkValidationCheckEXT : int + { + /// + /// AllEXT specifies that all validation checks are disabled. + /// + AllEXT = 0, + + /// + /// ShadersEXT specifies that shader validation is disabled. + /// + ShadersEXT = 1, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkValidationFeatureDisableEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkValidationFeatureDisableEXT.gen.cs new file mode 100644 index 0000000..6e588c7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkValidationFeatureDisableEXT.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationFeatureDisableEXT - Specify validation features to disable + /// + /// + /// + /// Possible values of elements of the + /// VkValidationFeaturesEXT::pDisabledValidationFeatures array, + /// specifying validation features to be disabled, are: + /// + /// + /// // Provided by VK_EXT_validation_features + /// typedef enum VkValidationFeatureDisableEXT { + /// VK_VALIDATION_FEATURE_DISABLE_ALL_EXT = 0, + /// VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1, + /// VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2, + /// VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3, + /// VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4, + /// VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5, + /// VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6, + /// VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7, + /// } VkValidationFeatureDisableEXT; + /// + /// + public enum VkValidationFeatureDisableEXT : int + { + /// + /// AllEXT specifies that all validation checks are disabled. + /// + AllEXT = 0, + + /// + /// ShadersEXT specifies that shader validation, both runtime and standalone, is disabled. This validation occurs inside VkShaderModuleCreateInfo. This feature is enabled by default. + /// + ShadersEXT = 1, + + /// + /// ThreadSafetyEXT specifies that thread safety validation is disabled. This feature is enabled by default. + /// + ThreadSafetyEXT = 2, + + /// + /// ApiParametersEXT specifies that stateless parameter validation is disabled. This feature is enabled by default. + /// + ApiParametersEXT = 3, + + /// + /// ObjectLifetimesEXT specifies that object lifetime validation is disabled. This feature is enabled by default. + /// + ObjectLifetimesEXT = 4, + + /// + /// CoreChecksEXT specifies that core validation checks are disabled. This feature is enabled by default. If this feature is disabled, VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT is implied. + /// + CoreChecksEXT = 5, + + /// + /// UniqueHandlesEXT specifies that protection against duplicate non-dispatchable object handles is disabled. This feature is enabled by default. + /// + UniqueHandlesEXT = 6, + + /// + /// ShaderValidationCacheEXT specifies that there will be no caching of shader validation results and every shader will be validated on every application execution. Shader validation caching is enabled by default. + /// + ShaderValidationCacheEXT = 7, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkValidationFeatureEnableEXT.gen.cs b/Brutal.Vulkan/Generated/Enums/VkValidationFeatureEnableEXT.gen.cs new file mode 100644 index 0000000..4b36a4b --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkValidationFeatureEnableEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationFeatureEnableEXT - Specify validation features to enable + /// + /// + /// + /// Possible values of elements of the + /// VkValidationFeaturesEXT::pEnabledValidationFeatures array, + /// specifying validation features to be enabled, are: + /// + /// + /// // Provided by VK_EXT_validation_features + /// typedef enum VkValidationFeatureEnableEXT { + /// VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0, + /// VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1, + /// VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2, + /// VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3, + /// VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4, + /// } VkValidationFeatureEnableEXT; + /// + /// + public enum VkValidationFeatureEnableEXT : int + { + /// + /// GpuAssistedEXT specifies that GPU-assisted validation is enabled. Activating this feature instruments shader programs to generate additional diagnostic data. This feature is disabled by default. + /// + GpuAssistedEXT = 0, + + /// + /// GpuAssistedReserveBindingSlotEXT specifies that the validation layers reserve a descriptor set binding slot for their own use. The layer reports a value for VkPhysicalDeviceLimits::maxBoundDescriptorSets that is one less than the value reported by the device. If the device supports the binding of only one descriptor set, the validation layer does not perform GPU-assisted validation. This feature is disabled by default. + /// + GpuAssistedReserveBindingSlotEXT = 1, + + /// + /// BestPracticesEXT specifies that Vulkan best-practices validation is enabled. Activating this feature enables the output of warnings related to common misuse of the API, but which are not explicitly prohibited by the specification. This feature is disabled by default. + /// + BestPracticesEXT = 2, + + /// + /// DebugPrintfEXT specifies that the layers will process debugPrintfEXT operations in shaders and send the resulting output to the debug callback. This feature is disabled by default. + /// + DebugPrintfEXT = 3, + + /// + /// SynchronizationValidationEXT specifies that Vulkan synchronization validation is enabled. This feature reports resource access conflicts due to missing or incorrect synchronization operations between actions (Draw, Copy, Dispatch, Blit) reading or writing the same regions of memory. This feature is disabled by default. + /// + SynchronizationValidationEXT = 4, + + /// + /// MaxEnumEXT + /// + MaxEnumEXT = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVendorId.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVendorId.gen.cs new file mode 100644 index 0000000..e5faacc --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVendorId.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVendorId - Khronos vendor IDs + /// + /// + /// + /// Khronos vendor IDs which may: be returned in + /// VkPhysicalDeviceProperties::vendorID are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkVendorId { + /// VK_VENDOR_ID_KHRONOS = 0x10000, + /// VK_VENDOR_ID_VIV = 0x10001, + /// VK_VENDOR_ID_VSI = 0x10002, + /// VK_VENDOR_ID_KAZAN = 0x10003, + /// VK_VENDOR_ID_CODEPLAY = 0x10004, + /// VK_VENDOR_ID_MESA = 0x10005, + /// VK_VENDOR_ID_POCL = 0x10006, + /// VK_VENDOR_ID_MOBILEYE = 0x10007, + /// VK_VENDOR_ID_APE = 0x10008, + /// } VkVendorId; + /// + /// + public enum VkVendorId : int + { + /// + /// Khronos + /// + Khronos = 0x10000, + + /// + /// VIV + /// + VIV = 0x10001, + + /// + /// VSI + /// + VSI = 0x10002, + + /// + /// Kazan + /// + Kazan = 0x10003, + + /// + /// Codeplay + /// + Codeplay = 0x10004, + + /// + /// MESA + /// + MESA = 0x10005, + + /// + /// Pocl + /// + Pocl = 0x10006, + + /// + /// Mobileye + /// + Mobileye = 0x10007, + + /// + /// Ape + /// + Ape = 0x10008, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVertexInputRate.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVertexInputRate.gen.cs new file mode 100644 index 0000000..b9b99b8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVertexInputRate.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVertexInputRate - Specify rate at which vertex attributes are pulled from buffers + /// + /// + /// + /// Possible values of VkVertexInputBindingDescription::inputRate, + /// specifying the rate at which vertex attributes are pulled from buffers, are: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef enum VkVertexInputRate { + /// VK_VERTEX_INPUT_RATE_VERTEX = 0, + /// VK_VERTEX_INPUT_RATE_INSTANCE = 1, + /// } VkVertexInputRate; + /// + /// + public enum VkVertexInputRate : int + { + /// + /// Vertex specifies that vertex attribute addressing is a function of the vertex index. + /// + Vertex = 0, + + /// + /// Instance specifies that vertex attribute addressing is a function of the instance index. + /// + Instance = 1, + + /// + /// MaxEnum + /// + MaxEnum = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoCapabilityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoCapabilityFlagsKHR.gen.cs new file mode 100644 index 0000000..d7df767 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoCapabilityFlagsKHR.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoCapabilityFlagBitsKHR - Video decode and encode capability bits + /// + /// + /// + /// Bits which can be set in VkVideoCapabilitiesKHR::flags are: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkVideoCapabilityFlagBitsKHR { + /// VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 0x00000001, + /// VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002, + /// } VkVideoCapabilityFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoCapabilityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// ProtectedContentBitKHR specifies that video sessions support producing and consuming protected content. + /// + ProtectedContentBitKHR = 0x00000001, + + /// + /// SeparateReferenceImagesBitKHR + /// + SeparateReferenceImagesBitKHR = 0x00000002, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoChromaSubsamplingFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoChromaSubsamplingFlagsKHR.gen.cs new file mode 100644 index 0000000..552daa0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoChromaSubsamplingFlagsKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoChromaSubsamplingFlagBitsKHR - Video format chroma subsampling bits + /// + /// + /// + /// The video format chroma subsampling is defined with the following enums: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkVideoChromaSubsamplingFlagBitsKHR { + /// VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0, + /// VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 0x00000001, + /// VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 0x00000002, + /// VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 0x00000004, + /// VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 0x00000008, + /// } VkVideoChromaSubsamplingFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoChromaSubsamplingFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// InvalidKHR + /// + InvalidKHR = 0, + + /// + /// MonochromeBitKHR specifies that the format is monochrome. + /// + MonochromeBitKHR = 0x00000001, + + /// + /// _420BitKHR specified that the format is 4:2:0 chroma subsampled, i.e. the two chroma components are sampled horizontally and vertically at half the sample rate of the luma component. + /// + _420BitKHR = 0x00000002, + + /// + /// _422BitKHR - the format is 4:2:2 chroma subsampled, i.e. the two chroma components are sampled horizontally at half the sample rate of luma component. + /// + _422BitKHR = 0x00000004, + + /// + /// _444BitKHR - the format is 4:4:4 chroma sampled, i.e. all three components of the {YCbCr} format are sampled at the same rate, thus there is no chroma subsampling. + /// + _444BitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoCodecOperationFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoCodecOperationFlagsKHR.gen.cs new file mode 100644 index 0000000..3d02035 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoCodecOperationFlagsKHR.gen.cs @@ -0,0 +1,84 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoCodecOperationFlagBitsKHR - Video codec operation bits + /// + /// + /// + /// Possible values of VkVideoProfileInfoKHR::videoCodecOperation, + /// specifying the type of video coding operation and video compression standard + /// used by a video profile, are: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkVideoCodecOperationFlagBitsKHR { + /// VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0, + /// // Provided by VK_KHR_video_encode_h264 + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR = 0x00010000, + /// // Provided by VK_KHR_video_encode_h265 + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR = 0x00020000, + /// // Provided by VK_KHR_video_decode_h264 + /// VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR = 0x00000001, + /// // Provided by VK_KHR_video_decode_h265 + /// VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_video_decode_av1 + /// VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR = 0x00000004, + /// // Provided by VK_KHR_video_encode_av1 + /// VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR = 0x00040000, + /// // Provided by VK_KHR_video_decode_vp9 + /// VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR = 0x00000008, + /// } VkVideoCodecOperationFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoCodecOperationFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// NoneKHR specifies that no video codec operations are supported. + /// + NoneKHR = 0, + + /// + /// EncodeH264BitKHR + /// + EncodeH264BitKHR = 0x00010000, + + /// + /// EncodeH265BitKHR + /// + EncodeH265BitKHR = 0x00020000, + + /// + /// DecodeH264BitKHR + /// + DecodeH264BitKHR = 0x00000001, + + /// + /// DecodeH265BitKHR + /// + DecodeH265BitKHR = 0x00000002, + + /// + /// DecodeAV1BitKHR + /// + DecodeAV1BitKHR = 0x00000004, + + /// + /// EncodeAV1BitKHR + /// + EncodeAV1BitKHR = 0x00040000, + + /// + /// DecodeVP9BitKHR + /// + DecodeVP9BitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoCodingControlFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoCodingControlFlagsKHR.gen.cs new file mode 100644 index 0000000..6ffe790 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoCodingControlFlagsKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoCodingControlFlagBitsKHR - Video coding control flags + /// + /// + /// + /// Bits which can be set in VkVideoCodingControlInfoKHR::flags, + /// specifying the video coding control parameters to be modified, are: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkVideoCodingControlFlagBitsKHR { + /// VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001, + /// // Provided by VK_KHR_video_encode_queue + /// VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_video_encode_queue + /// VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR = 0x00000004, + /// } VkVideoCodingControlFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoCodingControlFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// ResetBitKHR specifies a request for the bound video session to be reset before other coding control parameters are applied. + /// + ResetBitKHR = 0x00000001, + + /// + /// EncodeRateControlBitKHR + /// + EncodeRateControlBitKHR = 0x00000002, + + /// + /// EncodeQualityLevelBitKHR + /// + EncodeQualityLevelBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoComponentBitDepthFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoComponentBitDepthFlagsKHR.gen.cs new file mode 100644 index 0000000..d81c078 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoComponentBitDepthFlagsKHR.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoComponentBitDepthFlagBitsKHR - Video format component bit depth + /// + /// + /// + /// Possible values for the video format component bit depth are: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkVideoComponentBitDepthFlagBitsKHR { + /// VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0, + /// VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 0x00000001, + /// VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 0x00000004, + /// VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 0x00000010, + /// } VkVideoComponentBitDepthFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoComponentBitDepthFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// InvalidKHR + /// + InvalidKHR = 0, + + /// + /// _8BitKHR specifies a component bit depth of 8 bits. + /// + _8BitKHR = 0x00000001, + + /// + /// _10BitKHR specifies a component bit depth of 10 bits. + /// + _10BitKHR = 0x00000004, + + /// + /// _12BitKHR specifies a component bit depth of 12 bits. + /// + _12BitKHR = 0x00000010, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoDecodeCapabilityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoDecodeCapabilityFlagsKHR.gen.cs new file mode 100644 index 0000000..eeb3a0e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoDecodeCapabilityFlagsKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeCapabilityFlagBitsKHR - Video decode capability flags + /// + /// + /// + /// Bits which may: be set in VkVideoDecodeCapabilitiesKHR::flags, + /// indicating the decoding capabilities supported, are: + /// + /// + /// // Provided by VK_KHR_video_decode_queue + /// typedef enum VkVideoDecodeCapabilityFlagBitsKHR { + /// VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 0x00000001, + /// VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 0x00000002, + /// } VkVideoDecodeCapabilityFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoDecodeCapabilityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DpbAndOutputCoincideBitKHR specifies support for using the same video picture resource as the reconstructed picture^ and decode output picture^ in a video decode operation. + /// + DpbAndOutputCoincideBitKHR = 0x00000001, + + /// + /// DpbAndOutputDistinctBitKHR specifies support for using distinct video picture resources as the reconstructed picture^ and decode output picture^ in a video decode operation. + /// + DpbAndOutputDistinctBitKHR = 0x00000002, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoDecodeH264PictureLayoutFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoDecodeH264PictureLayoutFlagsKHR.gen.cs new file mode 100644 index 0000000..6a53e05 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoDecodeH264PictureLayoutFlagsKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264PictureLayoutFlagBitsKHR - H.264 video decode picture layout flags + /// + /// + /// + /// The H.264 video decode picture layout flags are defined as follows: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef enum VkVideoDecodeH264PictureLayoutFlagBitsKHR { + /// VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR = 0, + /// VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR = 0x00000001, + /// VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR = 0x00000002, + /// } VkVideoDecodeH264PictureLayoutFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoDecodeH264PictureLayoutFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// ProgressiveKHR specifies support for progressive content. This flag has the value `0`. + /// + ProgressiveKHR = 0, + + /// + /// InterlacedInterleavedLinesBitKHR specifies support for or use of a picture layout for interlaced content where all lines belonging to the top field are decoded to the even-numbered lines within the picture resource, and all lines belonging to the bottom field are decoded to the odd-numbered lines within the picture resource. + /// + InterlacedInterleavedLinesBitKHR = 0x00000001, + + /// + /// InterlacedSeparatePlanesBitKHR specifies support for or use of a picture layout for interlaced content where all lines belonging to a field are grouped together in a single image subregion, and the two fields comprising the frame can be stored in separate image subregions of the same image subresource or in separate image subresources. + /// + InterlacedSeparatePlanesBitKHR = 0x00000002, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoDecodeUsageFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoDecodeUsageFlagsKHR.gen.cs new file mode 100644 index 0000000..49ba828 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoDecodeUsageFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeUsageFlagBitsKHR - Video decode usage flags + /// + /// + /// + /// The following bits can be specified in + /// VkVideoDecodeUsageInfoKHR::videoUsageHints as a hint about the + /// video decode use case: + /// + /// + /// // Provided by VK_KHR_video_decode_queue + /// typedef enum VkVideoDecodeUsageFlagBitsKHR { + /// VK_VIDEO_DECODE_USAGE_DEFAULT_KHR = 0, + /// VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, + /// VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 0x00000002, + /// VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 0x00000004, + /// } VkVideoDecodeUsageFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoDecodeUsageFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DefaultKHR + /// + DefaultKHR = 0, + + /// + /// TranscodingBitKHR specifies that video decoding is intended to be used in conjunction with video encoding to transcode a video bitstream with the same and/or different codecs. + /// + TranscodingBitKHR = 0x00000001, + + /// + /// OfflineBitKHR specifies that video decoding is intended to be used to consume a local video bitstream. + /// + OfflineBitKHR = 0x00000002, + + /// + /// StreamingBitKHR specifies that video decoding is intended to be used to consume a video bitstream received as a continuous flow over network. [NOTE] + /// + StreamingBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1CapabilityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1CapabilityFlagsKHR.gen.cs new file mode 100644 index 0000000..a12be61 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1CapabilityFlagsKHR.gen.cs @@ -0,0 +1,66 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1CapabilityFlagBitsKHR - AV1 encode capability flags + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeAV1CapabilitiesKHR::flags, indicating the AV1 + /// encoding capabilities supported, are: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef enum VkVideoEncodeAV1CapabilityFlagBitsKHR { + /// VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR = 0x00000010, + /// // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_intra_refresh + /// VK_VIDEO_ENCODE_AV1_CAPABILITY_COMPOUND_PREDICTION_INTRA_REFRESH_BIT_KHR = 0x00000020, + /// } VkVideoEncodeAV1CapabilityFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeAV1CapabilityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// PerRateControlGroupMinMaxQIndexBitKHR specifies support for specifying different quantizer index values in the members of VkVideoEncodeAV1QIndexKHR. + /// + PerRateControlGroupMinMaxQIndexBitKHR = 0x00000001, + + /// + /// GenerateObuExtensionHeaderBitKHR specifies support for generating OBU extension headers, as defined in section 5.3.3 of the AV1 Specification^. + /// + GenerateObuExtensionHeaderBitKHR = 0x00000002, + + /// + /// PrimaryReferenceCdfOnlyBitKHR specifies support for using the primary reference frame indicated by the value of StdVideoEncodeAV1PictureInfo::primary_ref_frame in the AV1 picture information^ only for CDF data reference, as defined in section 6.8.2 of the AV1 Specification^. + /// + PrimaryReferenceCdfOnlyBitKHR = 0x00000004, + + /// + /// FrameSizeOverrideBitKHR specifies support for encoding a picture with a frame size different from the maximum frame size defined in the active AV1 sequence header^. If this capability is not supported, then frame_size_override_flag must not be set in the AV1 picture information^ of the encoded frame and the coded extent of the encode input picture^ must match the maximum coded extent allowed by the active AV1 sequence header^, i.e. (max_frame_width_minus_1 {plus} 1, max_frame_height_minus_1 {plus} 1). + /// + FrameSizeOverrideBitKHR = 0x00000008, + + /// + /// MotionVectorScalingBitKHR specifies support for motion vector scaling, as defined in section 7.11.3.3 of the AV1 Specification^. If this capability is not supported, then the coded extent of all active reference pictures^ must match the coded extent of the encode input picture^. This capability may: only be supported by a video profile when VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR is also supported. + /// + MotionVectorScalingBitKHR = 0x00000010, + + /// + /// CompoundPredictionIntraRefreshBitKHR + /// + CompoundPredictionIntraRefreshBitKHR = 0x00000020, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1PredictionModeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1PredictionModeKHR.gen.cs new file mode 100644 index 0000000..3f822d0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1PredictionModeKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1PredictionModeKHR - AV1 encode prediction mode + /// + /// + /// + /// Possible AV1 encode prediction modes are as follows: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef enum VkVideoEncodeAV1PredictionModeKHR { + /// VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR = 0, + /// VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR = 1, + /// VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR = 2, + /// VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR = 3, + /// } VkVideoEncodeAV1PredictionModeKHR; + /// + /// + public enum VkVideoEncodeAV1PredictionModeKHR : int + { + /// + /// IntraOnlyKHR specifies the use of _intra-only prediction mode_, used when encoding AV1 frames of type STD_VIDEO_AV1_FRAME_TYPE_KEY or STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY. + /// + IntraOnlyKHR = 0, + + /// + /// SingleReferenceKHR specifies the use of single reference prediction mode, used when encoding AV1 frames of type STD_VIDEO_AV1_FRAME_TYPE_INTER or STD_VIDEO_AV1_FRAME_TYPE_SWITCH with reference_select, as defined in section 6.8.23 of the AV1 Specification^, equal to 0. When using this prediction mode, the application must specify a reference picture for at least one AV1 reference name^ in VkVideoEncodeAV1PictureInfoKHR::referenceNameSlotIndices that is supported by the implementation, as reported in VkVideoEncodeAV1CapabilitiesKHR::singleReferenceNameMask. + /// + SingleReferenceKHR = 1, + + /// + /// UnidirectionalCompoundKHR specifies the use of unidirectional compound prediction mode, used when encoding AV1 frames of type STD_VIDEO_AV1_FRAME_TYPE_INTER or STD_VIDEO_AV1_FRAME_TYPE_SWITCH with reference_select, as defined in section 6.8.23 of the AV1 Specification^, equal to 1, and both reference names^ used for prediction are from the same reference frame group, as defined in section 6.10.24 of the AV1 Specification^. When using this prediction mode, the application must specify a reference picture for at least two AV1 reference names^ in VkVideoEncodeAV1PictureInfoKHR::referenceNameSlotIndices that is supported by the implementation, as reported in VkVideoEncodeAV1CapabilitiesKHR::unidirectionalCompoundReferenceNameMask, where those two reference names are one of the allowed pairs of reference names, as defined in section 5.11.25 of the AV1 Specification^, listed below: + /// + UnidirectionalCompoundKHR = 2, + + /// + /// BidirectionalCompoundKHR specifies the use of bidirectional compound prediction mode, used when encoding AV1 frames of type STD_VIDEO_AV1_FRAME_TYPE_INTER or STD_VIDEO_AV1_FRAME_TYPE_SWITCH with reference_select, as defined in section 6.8.23 of the AV1 Specification^, equal to 1, and the two reference names^ used for prediction are from different reference frame groups, as defined in section 6.10.24 of the AV1 Specification^. When using this prediction mode, the application must specify a reference picture for at least one AV1 reference name^ from each reference frame group in VkVideoEncodeAV1PictureInfoKHR::referenceNameSlotIndices that is supported by the implementation, as reported in VkVideoEncodeAV1CapabilitiesKHR::bidirectionalCompoundReferenceNameMask. The effective prediction mode used to encode individual AV1 mode info blocks may: use simpler prediction modes than the one set by the application for the frame, as allowed by the AV1 Specification^, in particular: + /// + BidirectionalCompoundKHR = 3, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlFlagsKHR.gen.cs new file mode 100644 index 0000000..901458e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1RateControlFlagBitsKHR - AV1 encode rate control bits + /// + /// + /// + /// Bits which can be set in + /// VkVideoEncodeAV1RateControlInfoKHR::flags, specifying AV1 rate + /// control flags, are: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef enum VkVideoEncodeAV1RateControlFlagBitsKHR { + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, + /// } VkVideoEncodeAV1RateControlFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeAV1RateControlFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// RegularGopBitKHR specifies that the application intends to use a regular GOP structure^ according to the parameters specified in the gopFrameCount and keyFramePeriod members of the VkVideoEncodeAV1RateControlInfoKHR structure. + /// + RegularGopBitKHR = 0x00000001, + + /// + /// TemporalLayerPatternDyadicBitKHR specifies that the application intends to follow a dyadic temporal layer pattern^. + /// + TemporalLayerPatternDyadicBitKHR = 0x00000002, + + /// + /// ReferencePatternFlatBitKHR specifies that the application intends to follow a flat reference pattern^ in the GOP. + /// + ReferencePatternFlatBitKHR = 0x00000004, + + /// + /// ReferencePatternDyadicBitKHR specifies that the application intends to follow a dyadic reference pattern^ in the GOP. + /// + ReferencePatternDyadicBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlGroupKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlGroupKHR.gen.cs new file mode 100644 index 0000000..fa1bff9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1RateControlGroupKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1RateControlGroupKHR - AV1 encode rate control group + /// + /// + /// + /// Possible AV1 encode rate control groups are as follows: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef enum VkVideoEncodeAV1RateControlGroupKHR { + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR = 0, + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR = 1, + /// VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR = 2, + /// } VkVideoEncodeAV1RateControlGroupKHR; + /// + /// + public enum VkVideoEncodeAV1RateControlGroupKHR : int + { + /// + /// IntraKHR should be specified when encoding AV1 frames that use intra-only prediction (e.g. when encoding AV1 frames of type STD_VIDEO_AV1_FRAME_TYPE_KEY or STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY). + /// + IntraKHR = 0, + + /// + /// PredictiveKHR should be specified when encoding AV1 frames that only have forward references in display order. + /// + PredictiveKHR = 1, + + /// + /// BipredictiveKHR should be specified when encoding AV1 frames that have backward references in display order. [NOTE] + /// + BipredictiveKHR = 2, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1StdFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1StdFlagsKHR.gen.cs new file mode 100644 index 0000000..8eb4745 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1StdFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1StdFlagBitsKHR - Video encode AV1 syntax capability flags + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeAV1CapabilitiesKHR::stdSyntaxFlags, indicating the + /// capabilities related to the AV1 syntax elements, are: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef enum VkVideoEncodeAV1StdFlagBitsKHR { + /// VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR = 0x00000008, + /// } VkVideoEncodeAV1StdFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeAV1StdFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// UniformTileSpacingFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoAV1TileInfoFlags::uniform_tile_spacing_flag in the AV1 tile parameters^ when that value is `1`, regardless of the coded extent of the encode input picture^ and the number of tile columns and rows requested in the TileCols and TileRows members of StdVideoAV1TileInfo. + /// + UniformTileSpacingFlagSetBitKHR = 0x00000001, + + /// + /// SkipModePresentUnsetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeAV1PictureInfoFlags::skip_mode_present when that value is `0`. + /// + SkipModePresentUnsetBitKHR = 0x00000002, + + /// + /// PrimaryRefFrameBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeAV1PictureInfo::primary_ref_frame. + /// + PrimaryRefFrameBitKHR = 0x00000004, + + /// + /// DeltaQBitKHR specifies whether the implementation supports using the application-provided values for the DeltaQYDc, DeltaQUDc, DeltaQUAc, DeltaQVDc, and DeltaQVAc members of StdVideoAV1Quantization. These capability flags provide information to the application about specific AV1 syntax element values that the implementation supports without having to override^ them and do not otherwise restrict the values that the application can specify for any of the mentioned AV1 syntax elements. + /// + DeltaQBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1SuperblockSizeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1SuperblockSizeFlagsKHR.gen.cs new file mode 100644 index 0000000..a54be01 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeAV1SuperblockSizeFlagsKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1SuperblockSizeFlagBitsKHR - Supported superblock sizes for AV1 video encode + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeAV1CapabilitiesKHR::superblockSizes, indicating the + /// superblock sizes supported by the implementation, are: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef enum VkVideoEncodeAV1SuperblockSizeFlagBitsKHR { + /// VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR = 0x00000002, + /// } VkVideoEncodeAV1SuperblockSizeFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeAV1SuperblockSizeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// _64BitKHR specifies that a superblock size of 64x64 is supported. + /// + _64BitKHR = 0x00000001, + + /// + /// _128BitKHR specifies that a superblock size of 128x128 is supported. + /// + _128BitKHR = 0x00000002, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeCapabilityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeCapabilityFlagsKHR.gen.cs new file mode 100644 index 0000000..7671eb7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeCapabilityFlagsKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeCapabilityFlagBitsKHR - Video encode capability flags + /// + /// + /// + /// Bits which may: be set in VkVideoEncodeCapabilitiesKHR::flags, + /// indicating the encoding tools supported, are: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef enum VkVideoEncodeCapabilityFlagBitsKHR { + /// VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000004, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR = 0x00000008, + /// } VkVideoEncodeCapabilityFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeCapabilityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// PrecedingExternallyEncodedBytesBitKHR specifies that the implementation supports the use of VkVideoEncodeInfoKHR::precedingExternallyEncodedBytes. + /// + PrecedingExternallyEncodedBytesBitKHR = 0x00000001, + + /// + /// InsufficientBitstreamBufferRangeDetectionBitKHR specifies that the implementation is able to detect and report when the destination video bitstream buffer range provided by the application is not sufficiently large to fit the encoded bitstream data produced by a video encode operation by reporting the VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR query result status code^. + [NOTE] + /// + InsufficientBitstreamBufferRangeDetectionBitKHR = 0x00000002, + + /// + /// QuantizationDeltaMapBitKHR + /// + QuantizationDeltaMapBitKHR = 0x00000004, + + /// + /// EmphasisMapBitKHR + /// + EmphasisMapBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeContentFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeContentFlagsKHR.gen.cs new file mode 100644 index 0000000..7fb0fc5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeContentFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeContentFlagBitsKHR - Video encode content flags + /// + /// + /// + /// The following bits can be specified in + /// VkVideoEncodeUsageInfoKHR::videoContentHints as a hint about the + /// encoded video content: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef enum VkVideoEncodeContentFlagBitsKHR { + /// VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, + /// VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004, + /// } VkVideoEncodeContentFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeContentFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DefaultKHR + /// + DefaultKHR = 0, + + /// + /// CameraBitKHR specifies that video encoding is intended to be used to encode camera content. + /// + CameraBitKHR = 0x00000001, + + /// + /// DesktopBitKHR specifies that video encoding is intended to be used to encode desktop content. + /// + DesktopBitKHR = 0x00000002, + + /// + /// RenderedBitKHR specified that video encoding is intended to be used to encode rendered (e.g. game) content. [NOTE] + /// + RenderedBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeFeedbackFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeFeedbackFlagsKHR.gen.cs new file mode 100644 index 0000000..d2d5606 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeFeedbackFlagsKHR.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeFeedbackFlagBitsKHR - Bits specifying queried video encode feedback values + /// + /// + /// + /// Bits which can be set in + /// VkQueryPoolVideoEncodeFeedbackCreateInfoKHR::encodeFeedbackFlags + /// for video encode feedback query pools are: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef enum VkVideoEncodeFeedbackFlagBitsKHR { + /// VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR = 0x00000008, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR = 0x00000010, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR = 0x00000020, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR = 0x00000040, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR = 0x00000080, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR = 0x00000100, + /// // Provided by VK_KHR_video_encode_feedback2 + /// VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR = 0x00000200, + /// } VkVideoEncodeFeedbackFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeFeedbackFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// BitstreamBufferOffsetBitKHR specifies that queries managed by the pool will capture the byte offset of the bitstream data written by the video encode operation to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer relative to the offset specified in VkVideoEncodeInfoKHR::dstBufferOffset. For the first video encode operation issued by any video encode command^, this value will always be zero, meaning that bitstream data is always written to the buffer specified in VkVideoEncodeInfoKHR::dstBuffer starting from the offset specified in VkVideoEncodeInfoKHR::dstBufferOffset. + /// + BitstreamBufferOffsetBitKHR = 0x00000001, + + /// + /// BitstreamBytesWrittenBitKHR specifies that queries managed by the pool will capture the number of bytes written by the video encode operation to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer. + /// + BitstreamBytesWrittenBitKHR = 0x00000002, + + /// + /// BitstreamHasOverridesBitKHR specifies that queries managed by the pool will capture a boolean value indicating that the data written to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer contains overridden parameters^. + /// + BitstreamHasOverridesBitKHR = 0x00000004, + + /// + /// AverageQuantizationBitKHR + /// + AverageQuantizationBitKHR = 0x00000008, + + /// + /// MinQuantizationBitKHR + /// + MinQuantizationBitKHR = 0x00000010, + + /// + /// MaxQuantizationBitKHR + /// + MaxQuantizationBitKHR = 0x00000020, + + /// + /// IntraPixelsBitKHR + /// + IntraPixelsBitKHR = 0x00000040, + + /// + /// InterPixelsBitKHR + /// + InterPixelsBitKHR = 0x00000080, + + /// + /// SkippedPixelsBitKHR + /// + SkippedPixelsBitKHR = 0x00000100, + + /// + /// PicturePartitionCountBitKHR + /// + PicturePartitionCountBitKHR = 0x00000200, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeFlagsKHR.gen.cs new file mode 100644 index 0000000..2dfb629 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeFlagsKHR.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeFlagBitsKHR - Video encode flags + /// + /// + /// + /// Bits which can be set in VkVideoEncodeInfoKHR::flags, + /// specifying video encode flags, are: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef enum VkVideoEncodeFlagBitsKHR { + /// // Provided by VK_KHR_video_encode_intra_refresh + /// VK_VIDEO_ENCODE_INTRA_REFRESH_BIT_KHR = 0x00000004, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000001, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR = 0x00000002, + /// } VkVideoEncodeFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// IntraRefreshBitKHR + /// + IntraRefreshBitKHR = 0x00000004, + + /// + /// WithQuantizationDeltaMapBitKHR + /// + WithQuantizationDeltaMapBitKHR = 0x00000001, + + /// + /// WithEmphasisMapBitKHR + /// + WithEmphasisMapBitKHR = 0x00000002, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264CapabilityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264CapabilityFlagsKHR.gen.cs new file mode 100644 index 0000000..3b8cff0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264CapabilityFlagsKHR.gen.cs @@ -0,0 +1,97 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264CapabilityFlagBitsKHR - H.264 encode capability flags + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeH264CapabilitiesKHR::flags, indicating the H.264 + /// encoding capabilities supported, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef enum VkVideoEncodeH264CapabilityFlagBitsKHR { + /// VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR = 0x00000080, + /// VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR = 0x00000100, + /// // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_intra_refresh + /// VK_VIDEO_ENCODE_H264_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR = 0x00000400, + /// // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_quantization_map + /// VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000200, + /// } VkVideoEncodeH264CapabilityFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH264CapabilityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// HrdComplianceBitKHR specifies whether the implementation may: be able to generate HRD compliant bitstreams if any of the nal_hrd_parameters_present_flag or vcl_hrd_parameters_present_flag members of StdVideoH264SpsVuiFlags are set to `1` in the active SPS^. + /// + HrdComplianceBitKHR = 0x00000001, + + /// + /// PredictionWeightTableGeneratedBitKHR specifies that if StdVideoH264PpsFlags::weighted_pred_flag is set to `1` or StdVideoH264PictureParameterSet::weighted_bipred_idc is set to STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT in the active PPS^ when encoding a P picture^ or B picture^, respectively, then the implementation is able to internally decide syntax for pred_weight_table, as defined in section 7.4.3.2 of the ITU-T H.264 Specification^, and the application is not required: to provide a weight table in the H.264 slice header parameters^. + /// + PredictionWeightTableGeneratedBitKHR = 0x00000002, + + /// + /// RowUnalignedSliceBitKHR specifies that each slice in a frame with multiple slices may begin or finish at any offset in a macroblock row. If not supported, all slices in the frame must begin at the start of a macroblock row (and hence each slice must finish at the end of a macroblock row). + /// + RowUnalignedSliceBitKHR = 0x00000004, + + /// + /// DifferentSliceTypeBitKHR specifies that when a frame is encoded with multiple slices, the implementation allows encoding each slice with a different StdVideoEncodeH264SliceHeader::slice_type specified in the H.264 slice header parameters^. If not supported, all slices of the frame must be encoded with the same slice_type which corresponds to the picture type of the frame. + /// + DifferentSliceTypeBitKHR = 0x00000008, + + /// + /// BFrameInL0ListBitKHR specifies support for using a B frame^ as L0 reference, as specified in StdVideoEncodeH264ReferenceListsInfo::RefPicList0 in the H.264 picture information^. + /// + BFrameInL0ListBitKHR = 0x00000010, + + /// + /// BFrameInL1ListBitKHR specifies support for using a B frame^ as L1 reference, as specified in StdVideoEncodeH264ReferenceListsInfo::RefPicList1 in the H.264 picture information^. + /// + BFrameInL1ListBitKHR = 0x00000020, + + /// + /// PerPictureTypeMinMaxQpBitKHR specifies support for specifying different QP values in the members of VkVideoEncodeH264QpKHR. + /// + PerPictureTypeMinMaxQpBitKHR = 0x00000040, + + /// + /// PerSliceConstantQpBitKHR specifies support for specifying different constant QP values for each slice. + /// + PerSliceConstantQpBitKHR = 0x00000080, + + /// + /// GeneratePrefixNaluBitKHR specifies support for generating prefix NAL units by setting VkVideoEncodeH264PictureInfoKHR::generatePrefixNalu to VK_TRUE. + /// + GeneratePrefixNaluBitKHR = 0x00000100, + + /// + /// BPictureIntraRefreshBitKHR + /// + BPictureIntraRefreshBitKHR = 0x00000400, + + /// + /// MbQpDiffWraparoundBitKHR + /// + MbQpDiffWraparoundBitKHR = 0x00000200, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264RateControlFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264RateControlFlagsKHR.gen.cs new file mode 100644 index 0000000..213e7f0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264RateControlFlagsKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264RateControlFlagBitsKHR - H.264 encode rate control bits + /// + /// + /// + /// Bits which can be set in + /// VkVideoEncodeH264RateControlInfoKHR::flags, specifying H.264 + /// rate control flags, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef enum VkVideoEncodeH264RateControlFlagBitsKHR { + /// VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010, + /// } VkVideoEncodeH264RateControlFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH264RateControlFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// AttemptHrdComplianceBitKHR specifies that rate control should attempt to produce an HRD compliant bitstream, as defined in annex C of the ITU-T H.264 Specification^. + /// + AttemptHrdComplianceBitKHR = 0x00000001, + + /// + /// RegularGopBitKHR specifies that the application intends to use a regular GOP structure^ according to the parameters specified in the gopFrameCount, idrPeriod, and consecutiveBFrameCount members of the VkVideoEncodeH264RateControlInfoKHR structure. + /// + RegularGopBitKHR = 0x00000002, + + /// + /// ReferencePatternFlatBitKHR specifies that the application intends to follow a flat reference pattern^ in the GOP. + /// + ReferencePatternFlatBitKHR = 0x00000004, + + /// + /// ReferencePatternDyadicBitKHR specifies that the application intends to follow a dyadic reference pattern^ in the GOP. + /// + ReferencePatternDyadicBitKHR = 0x00000008, + + /// + /// TemporalLayerPatternDyadicBitKHR specifies that the application intends to follow a dyadic temporal layer pattern^. + /// + TemporalLayerPatternDyadicBitKHR = 0x00000010, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264StdFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264StdFlagsKHR.gen.cs new file mode 100644 index 0000000..53667a2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH264StdFlagsKHR.gen.cs @@ -0,0 +1,149 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264StdFlagBitsKHR - Video encode H.264 syntax capability flags + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeH264CapabilitiesKHR::stdSyntaxFlags, indicating the + /// capabilities related to the H.264 syntax elements, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef enum VkVideoEncodeH264StdFlagBitsKHR { + /// VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000010, + /// VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR = 0x00000020, + /// VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040, + /// VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR = 0x00000080, + /// VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR = 0x00000100, + /// VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR = 0x00000200, + /// VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR = 0x00000400, + /// VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR = 0x00000800, + /// VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR = 0x00001000, + /// VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR = 0x00002000, + /// VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000, + /// VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR = 0x00008000, + /// VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR = 0x00010000, + /// VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR = 0x00020000, + /// VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000, + /// VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000, + /// } VkVideoEncodeH264StdFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH264StdFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// SeparateColorPlaneFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264SpsFlags::separate_colour_plane_flag in the SPS^ when that value is `1`. + /// + SeparateColorPlaneFlagSetBitKHR = 0x00000001, + + /// + /// QpprimeYZeroTransformBypassFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264SpsFlags::qpprime_y_zero_transform_bypass_flag in the SPS^ when that value is `1`. + /// + QpprimeYZeroTransformBypassFlagSetBitKHR = 0x00000002, + + /// + /// ScalingMatrixPresentFlagSetBitKHR specifies whether the implementation supports using the application-provided values for StdVideoH264SpsFlags::seq_scaling_matrix_present_flag in the SPS^ and StdVideoH264PpsFlags::pic_scaling_matrix_present_flag in the PPS^ when any of those values are `1`. + /// + ScalingMatrixPresentFlagSetBitKHR = 0x00000004, + + /// + /// ChromaQpIndexOffsetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PictureParameterSet::chroma_qp_index_offset in the PPS^ when that value is non-zero. + /// + ChromaQpIndexOffsetBitKHR = 0x00000008, + + /// + /// SecondChromaQpIndexOffsetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PictureParameterSet::second_chroma_qp_index_offset in the PPS^ when that value is non-zero. + /// + SecondChromaQpIndexOffsetBitKHR = 0x00000010, + + /// + /// PicInitQpMinus26BitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PictureParameterSet::pic_init_qp_minus26 in the PPS^ when that value is non-zero. + /// + PicInitQpMinus26BitKHR = 0x00000020, + + /// + /// WeightedPredFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PpsFlags::weighted_pred_flag in the PPS^ when that value is `1`. + /// + WeightedPredFlagSetBitKHR = 0x00000040, + + /// + /// WeightedBipredIdcExplicitBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PictureParameterSet::weighted_bipred_idc in the PPS^ when that value is STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT. + /// + WeightedBipredIdcExplicitBitKHR = 0x00000080, + + /// + /// WeightedBipredIdcImplicitBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PictureParameterSet::weighted_bipred_idc in the PPS^ when that value is STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT. + /// + WeightedBipredIdcImplicitBitKHR = 0x00000100, + + /// + /// Transform8X8ModeFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PpsFlags::transform_8x8_mode_flag in the PPS^ when that value is `1`. + /// + Transform8X8ModeFlagSetBitKHR = 0x00000200, + + /// + /// DirectSpatialMvPredFlagUnsetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH264SliceHeaderFlags::direct_spatial_mv_pred_flag in the H.264 slice header parameters^ when that value is `0`. + /// + DirectSpatialMvPredFlagUnsetBitKHR = 0x00000400, + + /// + /// EntropyCodingModeFlagUnsetBitKHR specifies whether the implementation supports CAVLC entropy coding, as defined in section 9.2 of the ITU-T H.264 Specification^, and thus supports using the application-provided value for StdVideoH264PpsFlags::entropy_coding_mode_flag in the PPS^ when that value is `0`. + /// + EntropyCodingModeFlagUnsetBitKHR = 0x00000800, + + /// + /// EntropyCodingModeFlagSetBitKHR specifies whether the implementation supports CABAC entropy coding, as defined in section 9.3 of the ITU-T H.264 Specification^, and thus supports using the application-provided value for StdVideoH264PpsFlags::entropy_coding_mode_flag in the PPS^ when that value is `1`. + /// + EntropyCodingModeFlagSetBitKHR = 0x00001000, + + /// + /// Direct8X8InferenceFlagUnsetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264SpsFlags::direct_8x8_inference_flag in the SPS^ when that value is `0`. + /// + Direct8X8InferenceFlagUnsetBitKHR = 0x00002000, + + /// + /// ConstrainedIntraPredFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH264PpsFlags::constrained_intra_pred_flag in the PPS^ when that value is `1`. + /// + ConstrainedIntraPredFlagSetBitKHR = 0x00004000, + + /// + /// DeblockingFilterDisabledBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH264SliceHeader::disable_deblocking_filter_idc in the H.264 slice header parameters^ when that value is STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED. + /// + DeblockingFilterDisabledBitKHR = 0x00008000, + + /// + /// DeblockingFilterEnabledBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH264SliceHeader::disable_deblocking_filter_idc in the H.264 slice header parameters^ when that value is STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED. + /// + DeblockingFilterEnabledBitKHR = 0x00010000, + + /// + /// DeblockingFilterPartialBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH264SliceHeader::disable_deblocking_filter_idc in the H.264 slice header parameters^ when that value is STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL. + /// + DeblockingFilterPartialBitKHR = 0x00020000, + + /// + /// SliceQpDeltaBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH264SliceHeader::slice_qp_delta in the H.264 slice header parameters^ when that value is identical across the slices of the encoded frame. + /// + SliceQpDeltaBitKHR = 0x00080000, + + /// + /// DifferentSliceQpDeltaBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH264SliceHeader::slice_qp_delta in the H.264 slice header parameters^ when that value is different across the slices of the encoded frame. These capability flags provide information to the application about specific H.264 syntax element values that the implementation supports without having to override^ them and do not otherwise restrict the values that the application can specify for any of the mentioned H.264 syntax elements. + /// + DifferentSliceQpDeltaBitKHR = 0x00100000, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CapabilityFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CapabilityFlagsKHR.gen.cs new file mode 100644 index 0000000..05e2658 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CapabilityFlagsKHR.gen.cs @@ -0,0 +1,103 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265CapabilityFlagBitsKHR - Video encode H.265 capability flags + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeH265CapabilitiesKHR::flags, indicating the H.265 + /// encoding capabilities supported, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef enum VkVideoEncodeH265CapabilityFlagBitsKHR { + /// VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR = 0x00000080, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR = 0x00000100, + /// VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR = 0x00000200, + /// // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_intra_refresh + /// VK_VIDEO_ENCODE_H265_CAPABILITY_B_PICTURE_INTRA_REFRESH_BIT_KHR = 0x00000800, + /// // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map + /// VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000400, + /// } VkVideoEncodeH265CapabilityFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH265CapabilityFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// HrdComplianceBitKHR specifies whether the implementation may: be able to generate HRD compliant bitstreams if any of the nal_hrd_parameters_present_flag, vcl_hrd_parameters_present_flag, or sub_pic_hrd_params_present_flag members of StdVideoH265HrdFlags are set to `1` in the HRD parameters of the active VPS^ or active SPS^, or if StdVideoH265SpsVuiFlags::vui_hrd_parameters_present_flag is set to `1` in the active SPS^. + /// + HrdComplianceBitKHR = 0x00000001, + + /// + /// PredictionWeightTableGeneratedBitKHR specifies that if the weighted_pred_flag or the weighted_bipred_flag member of StdVideoH265PpsFlags is set to `1` in the active PPS^ when encoding a P picture^ or B picture^, respectively, then the implementation is able to internally decide syntax for pred_weight_table, as defined in section 7.4.7.3 of the ITU-T H.265 Specification^, and the application is not required: to provide a weight table in the H.265 slice segment header parameters^. + /// + PredictionWeightTableGeneratedBitKHR = 0x00000002, + + /// + /// RowUnalignedSliceSegmentBitKHR specifies that each slice segment in a frame with a single or multiple tiles per slice may begin or finish at any offset in a CTB row. If not supported, all slice segments in such a frame must begin at the start of a CTB row (and hence each slice segment must finish at the end of a CTB row). Also indicates that each slice segment in a frame with multiple slices per tile may begin or finish at any offset within the enclosing tile's CTB row. If not supported, slice segments in such a frame must begin at the start of the enclosing tile's CTB row (and hence each slice segment must finish at the end of the enclosing tile's CTB row). + /// + RowUnalignedSliceSegmentBitKHR = 0x00000004, + + /// + /// DifferentSliceSegmentTypeBitKHR specifies that when a frame is encoded with multiple slice segments, the implementation allows encoding each slice segment with a different StdVideoEncodeH265SliceSegmentHeader::slice_type specified in the H.265 slice segment header parameters^. If not supported, all slice segments of the frame must be encoded with the same slice_type which corresponds to the picture type of the frame. + /// + DifferentSliceSegmentTypeBitKHR = 0x00000008, + + /// + /// BFrameInL0ListBitKHR specifies support for using a B frame^ as L0 reference, as specified in StdVideoEncodeH265ReferenceListsInfo::RefPicList0 in the H.265 picture information^. + /// + BFrameInL0ListBitKHR = 0x00000010, + + /// + /// BFrameInL1ListBitKHR specifies support for using a B frame^ as L1 reference, as specified in StdVideoEncodeH265ReferenceListsInfo::RefPicList1 in the H.265 picture information^. + /// + BFrameInL1ListBitKHR = 0x00000020, + + /// + /// PerPictureTypeMinMaxQpBitKHR specifies support for specifying different QP values in the members of VkVideoEncodeH265QpKHR. + /// + PerPictureTypeMinMaxQpBitKHR = 0x00000040, + + /// + /// PerSliceSegmentConstantQpBitKHR specifies support for specifying different constant QP values for each slice segment. + /// + PerSliceSegmentConstantQpBitKHR = 0x00000080, + + /// + /// MultipleTilesPerSliceSegmentBitKHR specifies whether encoding multiple tiles per slice segment, as defined in section 6.3.1 of the ITU-T H.265 Specification^, is supported. If this capability flag is not present, then the implementation is only able to encode a single tile for each slice segment. + /// + MultipleTilesPerSliceSegmentBitKHR = 0x00000100, + + /// + /// MultipleSliceSegmentsPerTileBitKHR specifies whether encoding multiple slice segments per tile, as defined in section 6.3.1 of the ITU-T H.265 Specification^, is supported. If this capability flag is not present, then the implementation is only able to encode a single slice segment for each tile. + /// + MultipleSliceSegmentsPerTileBitKHR = 0x00000200, + + /// + /// BPictureIntraRefreshBitKHR + /// + BPictureIntraRefreshBitKHR = 0x00000800, + + /// + /// CuQpDiffWraparoundBitKHR + /// + CuQpDiffWraparoundBitKHR = 0x00000400, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CtbSizeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CtbSizeFlagsKHR.gen.cs new file mode 100644 index 0000000..506d082 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265CtbSizeFlagsKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265CtbSizeFlagBitsKHR - Supported CTB sizes for H.265 video encode + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeH265CapabilitiesKHR::ctbSizes, indicating the CTB + /// sizes supported by the implementation, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef enum VkVideoEncodeH265CtbSizeFlagBitsKHR { + /// VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR = 0x00000004, + /// } VkVideoEncodeH265CtbSizeFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH265CtbSizeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// _16BitKHR specifies that a CTB size of 16x16 is supported. + /// + _16BitKHR = 0x00000001, + + /// + /// _32BitKHR specifies that a CTB size of 32x32 is supported. + /// + _32BitKHR = 0x00000002, + + /// + /// _64BitKHR specifies that a CTB size of 64x64 is supported. + /// + _64BitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265RateControlFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265RateControlFlagsKHR.gen.cs new file mode 100644 index 0000000..5c063df --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265RateControlFlagsKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265RateControlFlagBitsKHR - H.265 encode rate control bits + /// + /// + /// + /// Bits which can be set in + /// VkVideoEncodeH265RateControlInfoKHR::flags, specifying H.265 + /// rate control flags, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef enum VkVideoEncodeH265RateControlFlagBitsKHR { + /// VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010, + /// } VkVideoEncodeH265RateControlFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH265RateControlFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// AttemptHrdComplianceBitKHR specifies that rate control should attempt to produce an HRD compliant bitstream, as defined in annex C of the ITU-T H.265 Specification^. + /// + AttemptHrdComplianceBitKHR = 0x00000001, + + /// + /// RegularGopBitKHR specifies that the application intends to use a regular GOP structure^ according to the parameters specified in the gopFrameCount, idrPeriod, and consecutiveBFrameCount members of the VkVideoEncodeH265RateControlInfoKHR structure. + /// + RegularGopBitKHR = 0x00000002, + + /// + /// ReferencePatternFlatBitKHR specifies that the application intends to follow a flat reference pattern^ in the GOP. + /// + ReferencePatternFlatBitKHR = 0x00000004, + + /// + /// ReferencePatternDyadicBitKHR specifies that the application intends to follow a dyadic reference pattern^ in the GOP. + /// + ReferencePatternDyadicBitKHR = 0x00000008, + + /// + /// TemporalSubLayerPatternDyadicBitKHR specifies that the application intends to follow a dyadic temporal sub-layer pattern^. + /// + TemporalSubLayerPatternDyadicBitKHR = 0x00000010, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265StdFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265StdFlagsKHR.gen.cs new file mode 100644 index 0000000..43d02b3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265StdFlagsKHR.gen.cs @@ -0,0 +1,155 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265StdFlagBitsKHR - Video encode H.265 syntax capability flags + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeH265CapabilitiesKHR::stdSyntaxFlags, indicating the + /// capabilities related to the H.265 syntax elements, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef enum VkVideoEncodeH265StdFlagBitsKHR { + /// VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR = 0x00000008, + /// VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR = 0x00000010, + /// VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR = 0x00000020, + /// VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040, + /// VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR = 0x00000080, + /// VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR = 0x00000100, + /// VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR = 0x00000200, + /// VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR = 0x00000400, + /// VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR = 0x00000800, + /// VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR = 0x00001000, + /// VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR = 0x00002000, + /// VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000, + /// VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR = 0x00008000, + /// VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR = 0x00010000, + /// VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR = 0x00020000, + /// VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR = 0x00040000, + /// VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000, + /// VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000, + /// } VkVideoEncodeH265StdFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH265StdFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// SeparateColorPlaneFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265SpsFlags::separate_colour_plane_flag in the SPS^ when that value is `1`. + /// + SeparateColorPlaneFlagSetBitKHR = 0x00000001, + + /// + /// SampleAdaptiveOffsetEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265SpsFlags::sample_adaptive_offset_enabled_flag in the SPS^ when that value is `1`. + /// + SampleAdaptiveOffsetEnabledFlagSetBitKHR = 0x00000002, + + /// + /// ScalingListDataPresentFlagSetBitKHR specifies whether the implementation supports using the application-provided value for the scaling_list_enabled_flag and sps_scaling_list_data_present_flag members of StdVideoH265SpsFlags in the SPS^, and the application-provided value for StdVideoH265PpsFlags::pps_scaling_list_data_present_flag in the PPS^ when those values are `1`. + /// + ScalingListDataPresentFlagSetBitKHR = 0x00000004, + + /// + /// PcmEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265SpsFlags::pcm_enable_flag in the SPS^ when that value is `1`. + /// + PcmEnabledFlagSetBitKHR = 0x00000008, + + /// + /// SpsTemporalMvpEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265SpsFlags::sps_temporal_mvp_enabled_flag in the SPS^ when that value is `1`. + /// + SpsTemporalMvpEnabledFlagSetBitKHR = 0x00000010, + + /// + /// InitQpMinus26BitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PictureParameterSet::init_qp_minus26 in the PPS^ when that value is non-zero. + /// + InitQpMinus26BitKHR = 0x00000020, + + /// + /// WeightedPredFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::weighted_pred_flag in the PPS^ when that value is `1`. + /// + WeightedPredFlagSetBitKHR = 0x00000040, + + /// + /// WeightedBipredFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::weighted_bipred_flag in the PPS^ when that value is `1`. + /// + WeightedBipredFlagSetBitKHR = 0x00000080, + + /// + /// Log2ParallelMergeLevelMinus2BitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PictureParameterSet::log2_parallel_merge_level_minus2 in the PPS^ when that value is non-zero. + /// + Log2ParallelMergeLevelMinus2BitKHR = 0x00000100, + + /// + /// SignDataHidingEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::sign_data_hiding_enabled_flag in the PPS^ when that value is `1`. + /// + SignDataHidingEnabledFlagSetBitKHR = 0x00000200, + + /// + /// TransformSkipEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::transform_skip_enabled_flag in the PPS^ when that value is `1`. + /// + TransformSkipEnabledFlagSetBitKHR = 0x00000400, + + /// + /// TransformSkipEnabledFlagUnsetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::transform_skip_enabled_flag in the PPS^ when that value is `0`. + /// + TransformSkipEnabledFlagUnsetBitKHR = 0x00000800, + + /// + /// PpsSliceChromaQpOffsetsPresentFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::pps_slice_chroma_qp_offsets_present_flag in the PPS^ when that value is `1`. + /// + PpsSliceChromaQpOffsetsPresentFlagSetBitKHR = 0x00001000, + + /// + /// TransquantBypassEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::transquant_bypass_enabled_flag in the PPS^ when that value is `1`. + /// + TransquantBypassEnabledFlagSetBitKHR = 0x00002000, + + /// + /// ConstrainedIntraPredFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::constrained_intra_pred_flag in the PPS^ when that value is `1`. + /// + ConstrainedIntraPredFlagSetBitKHR = 0x00004000, + + /// + /// EntropyCodingSyncEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::entropy_coding_sync_enabled_flag in the PPS^ when that value is `1`. + /// + EntropyCodingSyncEnabledFlagSetBitKHR = 0x00008000, + + /// + /// DeblockingFilterOverrideEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::deblocking_filter_override_enabled_flag in the PPS^ when that value is `1`. + /// + DeblockingFilterOverrideEnabledFlagSetBitKHR = 0x00010000, + + /// + /// DependentSliceSegmentsEnabledFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoH265PpsFlags::dependent_slice_segments_enabled_flag in the PPS^ when that value is `1`. + /// + DependentSliceSegmentsEnabledFlagSetBitKHR = 0x00020000, + + /// + /// DependentSliceSegmentFlagSetBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH265SliceSegmentHeader::dependent_slice_segment_flag in the H.265 slice segment header parameters^ when that value is `1`. + /// + DependentSliceSegmentFlagSetBitKHR = 0x00040000, + + /// + /// SliceQpDeltaBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH265SliceSegmentHeader::slice_qp_delta in the H.265 slice segment header parameters^ when that value is identical across the slice segments of the encoded frame. + /// + SliceQpDeltaBitKHR = 0x00080000, + + /// + /// DifferentSliceQpDeltaBitKHR specifies whether the implementation supports using the application-provided value for StdVideoEncodeH265SliceSegmentHeader::slice_qp_delta in the H.265 slice segment header parameters^ when that value is different across the slice segments of the encoded frame. These capability flags provide information to the application about specific H.265 syntax element values that the implementation supports without having to override^ them and do not otherwise restrict the values that the application can specify for any of the mentioned H.265 syntax elements. + /// + DifferentSliceQpDeltaBitKHR = 0x00100000, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265TransformBlockSizeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265TransformBlockSizeFlagsKHR.gen.cs new file mode 100644 index 0000000..53efa4a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeH265TransformBlockSizeFlagsKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265TransformBlockSizeFlagBitsKHR - Supported transform block sizes for H.265 video encode + /// + /// + /// + /// Bits which may: be set in + /// VkVideoEncodeH265CapabilitiesKHR::transformBlockSizes, + /// indicating the transform block sizes supported by the implementation, are: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsKHR { + /// VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR = 0x00000008, + /// } VkVideoEncodeH265TransformBlockSizeFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeH265TransformBlockSizeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// _4BitKHR specifies that a transform block size of 4x4 is supported. + /// + _4BitKHR = 0x00000001, + + /// + /// _8BitKHR specifies that a transform block size of 8x8 is supported. + /// + _8BitKHR = 0x00000002, + + /// + /// _16BitKHR specifies that a transform block size of 16x16 is supported. + /// + _16BitKHR = 0x00000004, + + /// + /// _32BitKHR specifies that a transform block size of 32x32 is supported. + /// + _32BitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeIntraRefreshModeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeIntraRefreshModeFlagsKHR.gen.cs new file mode 100644 index 0000000..1190779 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeIntraRefreshModeFlagsKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeIntraRefreshModeFlagBitsKHR - Video encode intra refresh modes + /// + /// + /// + /// The intra refresh modes are defined with the following enums: + /// + /// + /// // Provided by VK_KHR_video_encode_intra_refresh + /// typedef enum VkVideoEncodeIntraRefreshModeFlagBitsKHR { + /// VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_NONE_KHR = 0, + /// VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_BASED_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_ROW_BASED_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_BLOCK_COLUMN_BASED_BIT_KHR = 0x00000008, + /// } VkVideoEncodeIntraRefreshModeFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeIntraRefreshModeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// NoneKHR specifies that intra refresh must not be used. + /// + NoneKHR = 0, + + /// + /// PerPicturePartitionBitKHR specifies the use of per picture partition intra refresh. In this mode each intra refresh region i corresponds to the encoded picture partition i. + /// + PerPicturePartitionBitKHR = 0x00000001, + + /// + /// BlockBasedBitKHR specifies the use of any _block-based intra refresh_. In this mode each intra refresh region encompasses a set of coding blocks, independent of encoded picture partitions but without any additional guarantees on the granularity at which the picture is split into intra refresh regions. When using this mode, the set of coding blocks comprising the intra refresh regions and the direction of intra refresh are implementation-defined. + /// + BlockBasedBitKHR = 0x00000002, + + /// + /// BlockRowBasedBitKHR specifies the use of _block-row-based intra refresh_. This mode is a block-based intra refresh mode where each intra refresh region encompasses a set of coding block rows. + /// + BlockRowBasedBitKHR = 0x00000004, + + /// + /// BlockColumnBasedBitKHR specifies the use of _block-column-based intra refresh_. This mode is a block-based intra refresh mode where each intra refresh region encompasses a set of coding block columns. + /// + BlockColumnBasedBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodePerPartitionFeedbackFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodePerPartitionFeedbackFlagsKHR.gen.cs new file mode 100644 index 0000000..c68686e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodePerPartitionFeedbackFlagsKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodePerPartitionFeedbackFlagBitsKHR - Bits specifying queried per picture partition video encode feedback values + /// + /// + /// + /// Bits which can be set in + /// VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::perPartitionEncodeFeedbackFlags + /// for video encode feedback query pools are: + /// + /// + /// // Provided by VK_KHR_video_encode_feedback2 + /// typedef enum VkVideoEncodePerPartitionFeedbackFlagBitsKHR { + /// VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_STATUS_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_PER_PARTITION_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000004, + /// } VkVideoEncodePerPartitionFeedbackFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodePerPartitionFeedbackFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// StatusBitKHR specifies that queries managed by the pool will capture the result status of each encoded picture partition. These result status values are reported as VkQueryResultStatusKHR values, similar to result status queries^ but indicate the result status of the encoding of individual picture partitions instead of that of the whole video encode operation. + /// + StatusBitKHR = 0x00000001, + + /// + /// BitstreamBufferOffsetBitKHR specifies that queries managed by the pool will capture the byte offset of the bitstream data of the corresponding picture partition written to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer relative to the offset specified in VkVideoEncodeInfoKHR::dstBufferOffset. + /// + BitstreamBufferOffsetBitKHR = 0x00000002, + + /// + /// BitstreamBytesWrittenBitKHR specifies that queries managed by the pool will capture the number of bytes written by the video encode operation for the corresponding picture partition to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer. The bitstream offsets reported for subsequent picture partitions are always monotonically increasing and the bitstream buffer ranges corresponding to individual picture partitions do not overlap. [NOTE] + /// + BitstreamBytesWrittenBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBChromaOffsetFlagsVALVE.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBChromaOffsetFlagsVALVE.gen.cs new file mode 100644 index 0000000..b54177c --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBChromaOffsetFlagsVALVE.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRgbChromaOffsetFlagBitsVALVE - Position of downsampled chroma samples for encode RGB conversion + /// + /// + /// + /// The model-converted values are chroma subsampled and quantized, according to + /// the chromaSubsampling, lumaBitDepth and chromaBitDepth + /// values specified by the bound video session. + /// + /// + /// The VkVideoEncodeRgbChromaOffsetFlagsVALVE enum defines the + /// location of downsampled chroma component samples relative to the luma + /// samples for video encode {RGBprime} conversion, and is defined as: + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef enum VkVideoEncodeRgbChromaOffsetFlagBitsVALVE { + /// VK_VIDEO_ENCODE_RGB_CHROMA_OFFSET_COSITED_EVEN_BIT_VALVE = 0x00000001, + /// VK_VIDEO_ENCODE_RGB_CHROMA_OFFSET_MIDPOINT_BIT_VALVE = 0x00000002, + /// } VkVideoEncodeRgbChromaOffsetFlagBitsVALVE; + /// + /// + [Flags] + public enum VkVideoEncodeRGBChromaOffsetFlagsVALVE : int + { + /// No flags set. + None = 0, + + /// + /// CositedEvenBitVALVE specifies that downsampled chroma samples are aligned with luma samples with even coordinates. + /// + CositedEvenBitVALVE = 0x00000001, + + /// + /// MidpointBitVALVE specifies that downsampled chroma samples are located half way between each even luma sample and the nearest higher odd luma sample. The output location of downsampled chroma components are specified by the xChromaOffset and yChromaOffset values of the VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure: Chroma subsampling is described in more detail in the Chroma Reconstruction^ section. + /// + MidpointBitVALVE = 0x00000002, + + /// + /// FlagBitsMaxEnumVALVE + /// + FlagBitsMaxEnumVALVE = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBModelConversionFlagsVALVE.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBModelConversionFlagsVALVE.gen.cs new file mode 100644 index 0000000..a1222b2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBModelConversionFlagsVALVE.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRgbModelConversionFlagBitsVALVE - Color model conversions for encode RGB conversion + /// + /// + /// + /// The range-compressed values are converted between color models, according to + /// the color model conversion specified in the rgbModel member of the + /// VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure. + /// + /// + /// VkVideoEncodeRgbModelConversionFlagsVALVE defines the conversion + /// from the encode input picture^'s color model to + /// the encode color model. + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef enum VkVideoEncodeRgbModelConversionFlagBitsVALVE { + /// VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_RGB_IDENTITY_BIT_VALVE = 0x00000001, + /// VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_IDENTITY_BIT_VALVE = 0x00000002, + /// VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_709_BIT_VALVE = 0x00000004, + /// VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_601_BIT_VALVE = 0x00000008, + /// VK_VIDEO_ENCODE_RGB_MODEL_CONVERSION_YCBCR_2020_BIT_VALVE = 0x00000010, + /// } VkVideoEncodeRgbModelConversionFlagBitsVALVE; + /// + /// + [Flags] + public enum VkVideoEncodeRGBModelConversionFlagsVALVE : int + { + /// No flags set. + None = 0, + + /// + /// RGBIdentityBitVALVE specifies the color components are not modified by the color model conversion since they are assumed to represent the desired color model for video coding; {RGBprime} range compression is applied to the components. + /// + RGBIdentityBitVALVE = 0x00000001, + + /// + /// YCbCrIdentityBitVALVE specifies the color components are not modified by the color model conversion are assumed to be treated as though in {YCbCr} form; video encode {RGBprime} range compression and video encode {RGBprime} chroma subsampling is also ignored. + /// + YCbCrIdentityBitVALVE = 0x00000002, + + /// + /// YCbCr709BitVALVE specifies the color components are transformed from an {RGBprime} representation to a {YCbCr} representation as described in the "`BT.709 {YCbCr} conversion`" section of the Khronos Data Format Specification^. + /// + YCbCr709BitVALVE = 0x00000004, + + /// + /// YCbCr601BitVALVE specifies the color components are transformed from an {RGBprime} representation to a {YCbCr} representation as described in the "`BT.601 {YCbCr} conversion`" section of the Khronos Data Format Specification^. + /// + YCbCr601BitVALVE = 0x00000008, + + /// + /// YCbCr2020BitVALVE specifies the color components are transformed from an {RGBprime} representation to a {YCbCr} representation as described in the "`BT.2020 {YCbCr} conversion`" section of the Khronos Data Format Specification^. [NOTE] + /// + YCbCr2020BitVALVE = 0x00000010, + + /// + /// FlagBitsMaxEnumVALVE + /// + FlagBitsMaxEnumVALVE = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBRangeCompressionFlagsVALVE.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBRangeCompressionFlagsVALVE.gen.cs new file mode 100644 index 0000000..673f07e --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRGBRangeCompressionFlagsVALVE.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRgbRangeCompressionFlagBitsVALVE - Range compression operation to perform for encode rgb conversion + /// + /// + /// + /// The video encode {RGBprime} range compression to be applied to color + /// component values of the encode input picture^ before + /// video coding is defined by the rgbRange member of the + /// VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure. + /// + /// + /// The VkVideoEncodeRgbRangeCompressionFlagsVALVE enum describes + /// whether color components are encoded using the full range of numerical + /// values or whether values are reserved for headroom and foot room: + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef enum VkVideoEncodeRgbRangeCompressionFlagBitsVALVE { + /// VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_FULL_RANGE_BIT_VALVE = 0x00000001, + /// VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_NARROW_RANGE_BIT_VALVE = 0x00000002, + /// } VkVideoEncodeRgbRangeCompressionFlagBitsVALVE; + /// + /// + [Flags] + public enum VkVideoEncodeRGBRangeCompressionFlagsVALVE : int + { + /// No flags set. + None = 0, + + /// + /// FullRangeBitVALVE specifies the following transformations are applied: + [latexmath] ++++ \begin{aligned} Y' &= C'_{rgba}[G] \\ C_B &= C'_{rgba}[B] - {{2^{(n-1)}}\over{(2^n) - 1}} \\ C_R &= C'_{rgba}[R] - {{2^{(n-1)}}\over{(2^n) - 1}} \end{aligned} ++++ + [NOTE] + /// + FullRangeBitVALVE = 0x00000001, + + /// + /// NarrowRangeBitVALVE + /// + NarrowRangeBitVALVE = 0x00000002, + + /// + /// FlagBitsMaxEnumVALVE + /// + FlagBitsMaxEnumVALVE = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRateControlModeFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRateControlModeFlagsKHR.gen.cs new file mode 100644 index 0000000..a4e1439 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeRateControlModeFlagsKHR.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRateControlModeFlagBitsKHR - Video encode rate control modes + /// + /// + /// + /// The rate control modes are defined with the following enums: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef enum VkVideoEncodeRateControlModeFlagBitsKHR { + /// VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0, + /// VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004, + /// } VkVideoEncodeRateControlModeFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeRateControlModeFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DefaultKHR specifies the use of implementation-specific rate control. + /// + DefaultKHR = 0, + + /// + /// DisabledBitKHR specifies that rate control is disabled and the application will specify per-operation rate control parameters controlling the encoding quality. In this mode implementations will encode pictures independently of the output bitrate of prior video encode operations. + /// + DisabledBitKHR = 0x00000001, + + /// + /// CbrBitKHR specifies the use of constant bitrate (CBR) rate control mode. In this mode the implementation will attempt to produce the encoded bitstream at a constant bitrate while conforming to the constraints of other rate control parameters. + /// + CbrBitKHR = 0x00000002, + + /// + /// VbrBitKHR specifies the use of variable bitrate (VBR) rate control mode. In this mode the implementation will produce the encoded bitstream at a variable bitrate according to the constraints of other rate control parameters. + /// + VbrBitKHR = 0x00000004, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeTuningModeKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeTuningModeKHR.gen.cs new file mode 100644 index 0000000..9578d3a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeTuningModeKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeTuningModeKHR - Video encode tuning mode + /// + /// + /// + /// Possible video encode tuning mode values are as follows: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef enum VkVideoEncodeTuningModeKHR { + /// VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, + /// VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, + /// VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, + /// VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, + /// VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, + /// } VkVideoEncodeTuningModeKHR; + /// + /// + public enum VkVideoEncodeTuningModeKHR : int + { + /// + /// DefaultKHR specifies the default tuning mode. + /// + DefaultKHR = 0, + + /// + /// HighQualityKHR specifies that video encoding is tuned for high quality. When using this tuning mode, the implementation may: compromise the latency of video encoding operations to improve quality. + /// + HighQualityKHR = 1, + + /// + /// LowLatencyKHR specifies that video encoding is tuned for low latency. When using this tuning mode, the implementation may: compromise quality to increase the performance and lower the latency of video encode operations. + /// + LowLatencyKHR = 2, + + /// + /// UltraLowLatencyKHR specifies that video encoding is tuned for ultra-low latency. When using this tuning mode, the implementation may: compromise quality to maximize the performance and minimize the latency of video encoding operations. + /// + UltraLowLatencyKHR = 3, + + /// + /// LosslessKHR specifies that video encoding is tuned for lossless encoding. When using this tuning mode, video encode operations produce lossless output. + /// + LosslessKHR = 4, + + /// + /// MaxEnumKHR + /// + MaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoEncodeUsageFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeUsageFlagsKHR.gen.cs new file mode 100644 index 0000000..f4eb8c4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoEncodeUsageFlagsKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeUsageFlagBitsKHR - Video encode usage flags + /// + /// + /// + /// The following bits can be specified in + /// VkVideoEncodeUsageInfoKHR::videoUsageHints as a hint about the + /// video encode use case: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef enum VkVideoEncodeUsageFlagBitsKHR { + /// VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, + /// VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, + /// VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002, + /// VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004, + /// VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008, + /// } VkVideoEncodeUsageFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoEncodeUsageFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// DefaultKHR + /// + DefaultKHR = 0, + + /// + /// TranscodingBitKHR specifies that video encoding is intended to be used in conjunction with video decoding to transcode a video bitstream with the same and/or different codecs. + /// + TranscodingBitKHR = 0x00000001, + + /// + /// StreamingBitKHR specifies that video encoding is intended to be used to produce a video bitstream that is expected to be sent as a continuous flow over network. + /// + StreamingBitKHR = 0x00000002, + + /// + /// RecordingBitKHR specifies that video encoding is intended to be used for real-time recording for offline consumption. + /// + RecordingBitKHR = 0x00000004, + + /// + /// ConferencingBitKHR specifies that video encoding is intended to be used in a video conferencing scenario. [NOTE] + /// + ConferencingBitKHR = 0x00000008, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoSessionCreateFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoSessionCreateFlagsKHR.gen.cs new file mode 100644 index 0000000..ec5ca4a --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoSessionCreateFlagsKHR.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionCreateFlagBitsKHR - Video session creation flags + /// + /// + /// + /// Bits which can be set in VkVideoSessionCreateInfoKHR::flags + /// are: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef enum VkVideoSessionCreateFlagBitsKHR { + /// VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001, + /// // Provided by VK_KHR_video_encode_queue + /// VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002, + /// // Provided by VK_KHR_video_maintenance1 + /// VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000008, + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x00000010, + /// // Provided by VK_KHR_video_decode_queue with VK_KHR_video_maintenance2 + /// VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR = 0x00000020, + /// } VkVideoSessionCreateFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoSessionCreateFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// ProtectedContentBitKHR specifies that the video session uses protected video content. + /// + ProtectedContentBitKHR = 0x00000001, + + /// + /// AllowEncodeParameterOptimizationsBitKHR + /// + AllowEncodeParameterOptimizationsBitKHR = 0x00000002, + + /// + /// InlineQueriesBitKHR + /// + InlineQueriesBitKHR = 0x00000004, + + /// + /// AllowEncodeQuantizationDeltaMapBitKHR + /// + AllowEncodeQuantizationDeltaMapBitKHR = 0x00000008, + + /// + /// AllowEncodeEmphasisMapBitKHR + /// + AllowEncodeEmphasisMapBitKHR = 0x00000010, + + /// + /// InlineSessionParametersBitKHR + /// + InlineSessionParametersBitKHR = 0x00000020, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkVideoSessionParametersCreateFlagsKHR.gen.cs b/Brutal.Vulkan/Generated/Enums/VkVideoSessionParametersCreateFlagsKHR.gen.cs new file mode 100644 index 0000000..2ab7ff9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkVideoSessionParametersCreateFlagsKHR.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionParametersCreateFlagBitsKHR - Video session parameters creation flags + /// + /// + /// + /// Bits which can be set in + /// VkVideoSessionParametersCreateInfoKHR::flags are: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef enum VkVideoSessionParametersCreateFlagBitsKHR { + /// // Provided by VK_KHR_video_encode_quantization_map + /// VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR = 0x00000001, + /// } VkVideoSessionParametersCreateFlagBitsKHR; + /// + /// + [Flags] + public enum VkVideoSessionParametersCreateFlagsKHR : int + { + /// No flags set. + None = 0, + + /// + /// QuantizationMapCompatibleBitKHR specifies that the created video session parameters object can be used with quantization maps^. + /// + QuantizationMapCompatibleBitKHR = 0x00000001, + + /// + /// FlagBitsMaxEnumKHR + /// + FlagBitsMaxEnumKHR = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Enums/VkViewportCoordinateSwizzleNV.gen.cs b/Brutal.Vulkan/Generated/Enums/VkViewportCoordinateSwizzleNV.gen.cs new file mode 100644 index 0000000..ff47e19 --- /dev/null +++ b/Brutal.Vulkan/Generated/Enums/VkViewportCoordinateSwizzleNV.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkViewportCoordinateSwizzleNV - Specify how a viewport coordinate is swizzled + /// + /// + /// + /// Possible values of the VkViewportSwizzleNV::x, y, z, + /// and w members, specifying swizzling of the corresponding components of + /// primitives, are: + /// + /// + /// // Provided by VK_NV_viewport_swizzle + /// typedef enum VkViewportCoordinateSwizzleNV { + /// VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, + /// VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, + /// } VkViewportCoordinateSwizzleNV; + /// + /// + public enum VkViewportCoordinateSwizzleNV : int + { + /// + /// PositiveXNV + /// + PositiveXNV = 0, + + /// + /// NegativeXNV + /// + NegativeXNV = 1, + + /// + /// PositiveYNV + /// + PositiveYNV = 2, + + /// + /// NegativeYNV + /// + NegativeYNV = 3, + + /// + /// PositiveZNV + /// + PositiveZNV = 4, + + /// + /// NegativeZNV + /// + NegativeZNV = 5, + + /// + /// PositiveWNV + /// + PositiveWNV = 6, + + /// + /// NegativeWNV + /// + NegativeWNV = 7, + + /// + /// MaxEnumNV + /// + MaxEnumNV = 0x7FFFFFFF, + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/Platforms/AndroidExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/Platforms/AndroidExtensions.gen.cs new file mode 100644 index 0000000..80247c2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/Platforms/AndroidExtensions.gen.cs @@ -0,0 +1,215 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + public static unsafe partial class AndroidExtensions + { + /// + /// vkCreateAndroidSurfaceKHR - Create a <c>VkSurfaceKHR</c> object for an Android native window + /// + /// + /// + /// :refpage: vkCreateAndroidSurfaceKHR + /// + /// + /// To create a VkSurfaceKHR object for an Android native window, call: + /// + /// + /// // Provided by VK_KHR_android_surface + /// VkResult vkCreateAndroidSurfaceKHR( + /// VkInstance instance, + /// const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("android")] + public static unsafe void CreateAndroidSurfaceKHR( + this VulkanHandleWrapper handle, + in VkAndroidSurfaceCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator, + out VkSurfaceKHR pSurface + ) + { + fixed (VkAndroidSurfaceCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateAndroidSurfaceKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateAndroidSurfaceKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateAndroidSurfaceKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorNativeWindowInUseKHR: + throw new VkResultError( + VkResult.ErrorNativeWindowInUseKHR, + "Vulkan call to vkCreateAndroidSurfaceKHR failed with error: VK_ERROR_NATIVE_WINDOW_IN_USE_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateAndroidSurfaceKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateAndroidSurfaceKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + pSurface = pSurfaceLocal; + } + } + + /// + /// vkGetAndroidHardwareBufferPropertiesANDROID - Get Properties of External Memory Android Hardware Buffers + /// + /// + /// + /// To determine the memory parameters to use when importing an Android hardware + /// buffer, call: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VkResult vkGetAndroidHardwareBufferPropertiesANDROID( + /// VkDevice device, + /// const struct AHardwareBuffer* buffer, + /// VkAndroidHardwareBufferPropertiesANDROID* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("android")] + public static unsafe void GetAndroidHardwareBufferPropertiesANDROID( + this VulkanHandleWrapper handle, + void* buffer, + ref VkAndroidHardwareBufferPropertiesANDROID pProperties + ) + { + fixed (VkAndroidHardwareBufferPropertiesANDROID* pPropertiesFixed = &pProperties) + { + VkResult result = handle.PInvoke.vkGetAndroidHardwareBufferPropertiesANDROID.Invoke( + handle.Handle, + buffer, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetAndroidHardwareBufferPropertiesANDROID failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandleKHR: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandleKHR, + "Vulkan call to vkGetAndroidHardwareBufferPropertiesANDROID failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetAndroidHardwareBufferPropertiesANDROID failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetAndroidHardwareBufferPropertiesANDROID failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkAndroidHardwareBufferPropertiesANDROID. + [SupportedOSPlatform("android")] + public static unsafe VkAndroidHardwareBufferPropertiesANDROID GetAndroidHardwareBufferPropertiesANDROID( + this VulkanHandleWrapper handle, + void* buffer + ) + { + VkAndroidHardwareBufferPropertiesANDROID outValue = new(); + GetAndroidHardwareBufferPropertiesANDROID(handle, buffer, ref outValue); + return outValue; + } + + /// + /// vkGetMemoryAndroidHardwareBufferANDROID - Get an Android hardware buffer for a memory object + /// + /// + /// + /// To export an Android hardware buffer referencing the payload of a Vulkan + /// device memory object, call: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// VkResult vkGetMemoryAndroidHardwareBufferANDROID( + /// VkDevice device, + /// const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + /// struct AHardwareBuffer** pBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("android")] + public static unsafe void* GetMemoryAndroidHardwareBufferANDROID( + this VulkanHandleWrapper handle, + in VkMemoryGetAndroidHardwareBufferInfoANDROID pInfo + ) + { + fixed (VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfoFixed = &pInfo) + { + void* pBufferLocal = default; + VkResult result = handle.PInvoke.vkGetMemoryAndroidHardwareBufferANDROID.Invoke( + handle.Handle, + pInfoFixed, + &pBufferLocal + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetMemoryAndroidHardwareBufferANDROID failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryAndroidHardwareBufferANDROID failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryAndroidHardwareBufferANDROID failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryAndroidHardwareBufferANDROID failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pBufferLocal; + } + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/Platforms/MetalExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/Platforms/MetalExtensions.gen.cs new file mode 100644 index 0000000..25ec11d --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/Platforms/MetalExtensions.gen.cs @@ -0,0 +1,248 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + public static unsafe partial class MetalExtensions + { + /// + /// vkCreateMetalSurfaceEXT - Create a VkSurfaceKHR object for CAMetalLayer + /// + /// + /// + /// :refpage: vkCreateMetalSurfaceEXT + /// + /// + /// To create a VkSurfaceKHR object for a basetype:CAMetalLayer, call: + /// + /// + /// // Provided by VK_EXT_metal_surface + /// VkResult vkCreateMetalSurfaceEXT( + /// VkInstance instance, + /// const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public static unsafe void CreateMetalSurfaceEXT( + this VulkanHandleWrapper handle, + in VkMetalSurfaceCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator, + out VkSurfaceKHR pSurface + ) + { + fixed (VkMetalSurfaceCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateMetalSurfaceEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateMetalSurfaceEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateMetalSurfaceEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorNativeWindowInUseKHR: + throw new VkResultError( + VkResult.ErrorNativeWindowInUseKHR, + "Vulkan call to vkCreateMetalSurfaceEXT failed with error: VK_ERROR_NATIVE_WINDOW_IN_USE_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateMetalSurfaceEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateMetalSurfaceEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + pSurface = pSurfaceLocal; + } + } + + /// + /// vkExportMetalObjectsEXT - Export Metal objects from the corresponding Vulkan objects + /// + /// + /// + /// To export Metal objects that underlie Vulkan objects, call: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// void vkExportMetalObjectsEXT( + /// VkDevice device, + /// VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public static unsafe void ExportMetalObjectsEXT( + this VulkanHandleWrapper handle, + ref VkExportMetalObjectsInfoEXT pMetalObjectsInfo + ) + { + fixed (VkExportMetalObjectsInfoEXT* pMetalObjectsInfoFixed = &pMetalObjectsInfo) + { + handle.PInvoke.vkExportMetalObjectsEXT.Invoke(handle.Handle, pMetalObjectsInfoFixed); + } + } + + /// + /// vkGetMemoryMetalHandleEXT - Get a Metal handle for a memory object + /// + /// + /// + /// To export a Metal handle representing the payload of a Vulkan device memory + /// object, call: + /// + /// + /// // Provided by VK_EXT_external_memory_metal + /// VkResult vkGetMemoryMetalHandleEXT( + /// VkDevice device, + /// const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, + /// void** pHandle); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public static unsafe void* GetMemoryMetalHandleEXT( + this VulkanHandleWrapper handle, + in VkMemoryGetMetalHandleInfoEXT pGetMetalHandleInfo + ) + { + fixed (VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfoFixed = &pGetMetalHandleInfo) + { + void* pHandleLocal = default; + VkResult result = handle.PInvoke.vkGetMemoryMetalHandleEXT.Invoke( + handle.Handle, + pGetMetalHandleInfoFixed, + &pHandleLocal + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetMemoryMetalHandleEXT failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryMetalHandleEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryMetalHandleEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryMetalHandleEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pHandleLocal; + } + } + + /// + /// vkGetMemoryMetalHandlePropertiesEXT - Get Properties of External Memory Metal Handles + /// + /// + /// + /// Metal memory handles compatible with Vulkan may: also be created by + /// non-Vulkan APIs using methods beyond the scope of this specification. + /// To determine the correct parameters to use when importing such handles, + /// call: + /// + /// + /// // Provided by VK_EXT_external_memory_metal + /// VkResult vkGetMemoryMetalHandlePropertiesEXT( + /// VkDevice device, + /// VkExternalMemoryHandleTypeFlagBits handleType, + /// const void* pHandle, + /// VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public static unsafe void GetMemoryMetalHandlePropertiesEXT( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + void* pHandle, + ref VkMemoryMetalHandlePropertiesEXT pMemoryMetalHandleProperties + ) + { + fixed (VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandlePropertiesFixed = &pMemoryMetalHandleProperties) + { + VkResult result = handle.PInvoke.vkGetMemoryMetalHandlePropertiesEXT.Invoke( + handle.Handle, + handleType, + pHandle, + pMemoryMetalHandlePropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryMetalHandlePropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkGetMemoryMetalHandlePropertiesEXT failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryMetalHandlePropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryMetalHandlePropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryMetalHandlePropertiesEXT. + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public static unsafe VkMemoryMetalHandlePropertiesEXT GetMemoryMetalHandlePropertiesEXT( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + void* pHandle + ) + { + VkMemoryMetalHandlePropertiesEXT outValue = new(); + GetMemoryMetalHandlePropertiesEXT(handle, handleType, pHandle, ref outValue); + return outValue; + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/Platforms/WaylandExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/Platforms/WaylandExtensions.gen.cs new file mode 100644 index 0000000..351a973 --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/Platforms/WaylandExtensions.gen.cs @@ -0,0 +1,106 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Wayland +{ + public static unsafe partial class WaylandExtensions + { + /// + /// vkCreateWaylandSurfaceKHR - Create a <c>VkSurfaceKHR</c> object for a Wayland window + /// + /// + /// + /// :refpage: vkCreateWaylandSurfaceKHR + /// + /// + /// To create a VkSurfaceKHR object for a Wayland surface, call: + /// + /// + /// // Provided by VK_KHR_wayland_surface + /// VkResult vkCreateWaylandSurfaceKHR( + /// VkInstance instance, + /// const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe void CreateWaylandSurfaceKHR( + this VulkanHandleWrapper handle, + in VkWaylandSurfaceCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator, + out VkSurfaceKHR pSurface + ) + { + fixed (VkWaylandSurfaceCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateWaylandSurfaceKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateWaylandSurfaceKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateWaylandSurfaceKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateWaylandSurfaceKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateWaylandSurfaceKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + pSurface = pSurfaceLocal; + } + } + + /// + /// vkGetPhysicalDeviceWaylandPresentationSupportKHR - Query physical device for presentation to Wayland + /// + /// + /// + /// To determine whether a queue family of a physical device supports + /// presentation to a Wayland compositor, call: + /// + /// + /// // Provided by VK_KHR_wayland_surface + /// VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// struct wl_display* display); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe Brutal.Bool32 GetWaylandPresentationSupportKHR( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + void* display + ) + { + return handle.PInvoke.vkGetPhysicalDeviceWaylandPresentationSupportKHR.Invoke( + handle.Handle, + queueFamilyIndex, + display + ); + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/Platforms/Win32Extensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/Platforms/Win32Extensions.gen.cs new file mode 100644 index 0000000..0569224 --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/Platforms/Win32Extensions.gen.cs @@ -0,0 +1,962 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + public static unsafe partial class Win32Extensions + { + /// + /// vkCreateWin32SurfaceKHR - Create a VkSurfaceKHR object for a Win32 native window + /// + /// + /// + /// :refpage: vkCreateWin32SurfaceKHR + /// + /// + /// To create a VkSurfaceKHR object for a Win32 window, call: + /// + /// + /// // Provided by VK_KHR_win32_surface + /// VkResult vkCreateWin32SurfaceKHR( + /// VkInstance instance, + /// const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe void CreateWin32SurfaceKHR( + this VulkanHandleWrapper handle, + in VkWin32SurfaceCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator, + out VkSurfaceKHR pSurface + ) + { + fixed (VkWin32SurfaceCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateWin32SurfaceKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateWin32SurfaceKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateWin32SurfaceKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateWin32SurfaceKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateWin32SurfaceKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + pSurface = pSurfaceLocal; + } + } + + /// + /// vkGetPhysicalDeviceWin32PresentationSupportKHR - Query queue family support for presentation on a Win32 display + /// + /// + /// + /// To determine whether a queue family of a physical device supports + /// presentation to the Microsoft Windows desktop, call: + /// + /// + /// // Provided by VK_KHR_win32_surface + /// VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static Brutal.Bool32 GetWin32PresentationSupportKHR( + this VulkanHandleWrapper handle, + int queueFamilyIndex + ) + { + return handle.PInvoke.vkGetPhysicalDeviceWin32PresentationSupportKHR.Invoke( + handle.Handle, + queueFamilyIndex + ); + } + + /// + /// vkGetMemoryWin32HandleKHR - Get a Windows HANDLE for a memory object + /// + /// + /// + /// To export a Windows handle representing the payload of a Vulkan device + /// memory object, call: + /// + /// + /// // Provided by VK_KHR_external_memory_win32 + /// VkResult vkGetMemoryWin32HandleKHR( + /// VkDevice device, + /// const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, + /// HANDLE* pHandle); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe nint GetMemoryWin32HandleKHR( + this VulkanHandleWrapper handle, + in VkMemoryGetWin32HandleInfoKHR pGetWin32HandleInfo + ) + { + fixed (VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfoFixed = &pGetWin32HandleInfo) + { + nint pHandleLocal = default; + VkResult result = handle.PInvoke.vkGetMemoryWin32HandleKHR.Invoke( + handle.Handle, + pGetWin32HandleInfoFixed, + &pHandleLocal + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetMemoryWin32HandleKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryWin32HandleKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryWin32HandleKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryWin32HandleKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pHandleLocal; + } + } + + /// + /// vkGetMemoryWin32HandlePropertiesKHR - Get Properties of External Memory Win32 Handles + /// + /// + /// + /// Windows memory handles compatible with Vulkan may: also be created by + /// non-Vulkan APIs using methods beyond the scope of this specification. + /// To determine the correct parameters to use when importing such handles, + /// call: + /// + /// + /// // Provided by VK_KHR_external_memory_win32 + /// VkResult vkGetMemoryWin32HandlePropertiesKHR( + /// VkDevice device, + /// VkExternalMemoryHandleTypeFlagBits handleType, + /// HANDLE handle, + /// VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe void GetMemoryWin32HandlePropertiesKHR( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + nint win32Handle, + ref VkMemoryWin32HandlePropertiesKHR pMemoryWin32HandleProperties + ) + { + fixed (VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandlePropertiesFixed = &pMemoryWin32HandleProperties) + { + VkResult result = handle.PInvoke.vkGetMemoryWin32HandlePropertiesKHR.Invoke( + handle.Handle, + handleType, + win32Handle, + pMemoryWin32HandlePropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryWin32HandlePropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkGetMemoryWin32HandlePropertiesKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryWin32HandlePropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryWin32HandlePropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryWin32HandlePropertiesKHR. + [SupportedOSPlatform("windows")] + public static VkMemoryWin32HandlePropertiesKHR GetMemoryWin32HandlePropertiesKHR( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + nint win32Handle + ) + { + VkMemoryWin32HandlePropertiesKHR outValue = new(); + GetMemoryWin32HandlePropertiesKHR(handle, handleType, win32Handle, ref outValue); + return outValue; + } + + /// + /// vkImportSemaphoreWin32HandleKHR - Import a semaphore from a Windows HANDLE + /// + /// + /// + /// To import a semaphore payload from a Windows handle, call: + /// + /// + /// // Provided by VK_KHR_external_semaphore_win32 + /// VkResult vkImportSemaphoreWin32HandleKHR( + /// VkDevice device, + /// const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe void ImportSemaphoreWin32HandleKHR( + this VulkanHandleWrapper handle, + in VkImportSemaphoreWin32HandleInfoKHR pImportSemaphoreWin32HandleInfo + ) + { + fixed ( + VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfoFixed = + &pImportSemaphoreWin32HandleInfo + ) + { + VkResult result = handle.PInvoke.vkImportSemaphoreWin32HandleKHR.Invoke( + handle.Handle, + pImportSemaphoreWin32HandleInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkImportSemaphoreWin32HandleKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkImportSemaphoreWin32HandleKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkImportSemaphoreWin32HandleKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkImportSemaphoreWin32HandleKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetSemaphoreWin32HandleKHR - Get a Windows HANDLE for a semaphore + /// + /// + /// + /// To export a Windows handle representing the payload of a semaphore, call: + /// + /// + /// // Provided by VK_KHR_external_semaphore_win32 + /// VkResult vkGetSemaphoreWin32HandleKHR( + /// VkDevice device, + /// const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, + /// HANDLE* pHandle); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe nint GetSemaphoreWin32HandleKHR( + this VulkanHandleWrapper handle, + in VkSemaphoreGetWin32HandleInfoKHR pGetWin32HandleInfo + ) + { + fixed (VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfoFixed = &pGetWin32HandleInfo) + { + nint pHandleLocal = default; + VkResult result = handle.PInvoke.vkGetSemaphoreWin32HandleKHR.Invoke( + handle.Handle, + pGetWin32HandleInfoFixed, + &pHandleLocal + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetSemaphoreWin32HandleKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSemaphoreWin32HandleKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSemaphoreWin32HandleKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSemaphoreWin32HandleKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pHandleLocal; + } + } + + /// + /// vkImportFenceWin32HandleKHR - Import a fence from a Windows HANDLE + /// + /// + /// + /// To import a fence payload from a Windows handle, call: + /// + /// + /// // Provided by VK_KHR_external_fence_win32 + /// VkResult vkImportFenceWin32HandleKHR( + /// VkDevice device, + /// const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe void ImportFenceWin32HandleKHR( + this VulkanHandleWrapper handle, + in VkImportFenceWin32HandleInfoKHR pImportFenceWin32HandleInfo + ) + { + fixed (VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfoFixed = &pImportFenceWin32HandleInfo) + { + VkResult result = handle.PInvoke.vkImportFenceWin32HandleKHR.Invoke( + handle.Handle, + pImportFenceWin32HandleInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkImportFenceWin32HandleKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkImportFenceWin32HandleKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkImportFenceWin32HandleKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkImportFenceWin32HandleKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetFenceWin32HandleKHR - Get a Windows HANDLE for a fence + /// + /// + /// + /// To export a Windows handle representing the state of a fence, call: + /// + /// + /// // Provided by VK_KHR_external_fence_win32 + /// VkResult vkGetFenceWin32HandleKHR( + /// VkDevice device, + /// const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, + /// HANDLE* pHandle); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe nint GetFenceWin32HandleKHR( + this VulkanHandleWrapper handle, + in VkFenceGetWin32HandleInfoKHR pGetWin32HandleInfo + ) + { + fixed (VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfoFixed = &pGetWin32HandleInfo) + { + nint pHandleLocal = default; + VkResult result = handle.PInvoke.vkGetFenceWin32HandleKHR.Invoke( + handle.Handle, + pGetWin32HandleInfoFixed, + &pHandleLocal + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetFenceWin32HandleKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetFenceWin32HandleKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetFenceWin32HandleKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetFenceWin32HandleKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pHandleLocal; + } + } + + /// + /// vkGetMemoryWin32HandleNV - Retrieve Win32 handle to a device memory object + /// + /// + /// + /// To retrieve the handle corresponding to a device memory object created with + /// VkExportMemoryAllocateInfoNV::handleTypes set to include + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV or + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, call: + /// + /// + /// // Provided by VK_NV_external_memory_win32 + /// VkResult vkGetMemoryWin32HandleNV( + /// VkDevice device, + /// VkDeviceMemory memory, + /// VkExternalMemoryHandleTypeFlagsNV handleType, + /// HANDLE* pHandle); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe nint GetMemoryWin32HandleNV( + this VulkanHandleWrapper handle, + VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType + ) + { + nint pHandleLocal = default; + VkResult result = handle.PInvoke.vkGetMemoryWin32HandleNV.Invoke( + handle.Handle, + memory, + handleType, + &pHandleLocal + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetMemoryWin32HandleNV failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryWin32HandleNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryWin32HandleNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryWin32HandleNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pHandleLocal; + } + + /// + /// vkGetPhysicalDeviceSurfacePresentModes2EXT - Query supported presentation modes + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfacePresentModes2EXT + /// + /// + /// To query the supported presentation modes for a surface combined with select + /// other fixed swapchain creation parameters, call: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive + /// VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + /// uint32_t* pPresentModeCount, + /// VkPresentModeKHR* pPresentModes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + private static unsafe VkResult GetSurfacePresentModes2EXT( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo, + ref int pPresentModeCount, + scoped ReadOnlySpan pPresentModes + ) + { + fixed (VkPresentModeKHR* pPresentModesFixed = pPresentModes) + fixed (VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfoFixed = &pSurfaceInfo) + fixed (int* pPresentModeCountFixed = &pPresentModeCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfacePresentModes2EXT.Invoke( + handle.Handle, + pSurfaceInfoFixed, + pPresentModeCountFixed, + pPresentModesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModes2EXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModes2EXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModes2EXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModes2EXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModes2EXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + [SupportedOSPlatform("windows")] + public static int GetSurfacePresentModes2EXT_Count( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo + ) + { + int pPresentModeCount = default; + GetSurfacePresentModes2EXT(handle, pSurfaceInfo, ref pPresentModeCount, null); + return pPresentModeCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + [SupportedOSPlatform("windows")] + public static VkResult GetSurfacePresentModes2EXT_Write( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo, + scoped ReadOnlySpan pPresentModes + ) + { + int pPresentModeCount = pPresentModes.Length; + return GetSurfacePresentModes2EXT(handle, pSurfaceInfo, ref pPresentModeCount, pPresentModes); + } + + /// + /// vkAcquireFullScreenExclusiveModeEXT - Acquire full-screen exclusive mode for a swapchain + /// + /// + /// + /// To acquire exclusive full-screen access for a swapchain, call: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive + /// VkResult vkAcquireFullScreenExclusiveModeEXT( + /// VkDevice device, + /// VkSwapchainKHR swapchain); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static void AcquireFullScreenExclusiveModeEXT( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain + ) + { + VkResult result = handle.PInvoke.vkAcquireFullScreenExclusiveModeEXT.Invoke(handle.Handle, swapchain); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquireFullScreenExclusiveModeEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkAcquireFullScreenExclusiveModeEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkAcquireFullScreenExclusiveModeEXT failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkAcquireFullScreenExclusiveModeEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireFullScreenExclusiveModeEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireFullScreenExclusiveModeEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkReleaseFullScreenExclusiveModeEXT - Release full-screen exclusive mode from a swapchain + /// + /// + /// + /// To release exclusive full-screen access from a swapchain, call: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive + /// VkResult vkReleaseFullScreenExclusiveModeEXT( + /// VkDevice device, + /// VkSwapchainKHR swapchain); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static void ReleaseFullScreenExclusiveModeEXT( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain + ) + { + VkResult result = handle.PInvoke.vkReleaseFullScreenExclusiveModeEXT.Invoke(handle.Handle, swapchain); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkReleaseFullScreenExclusiveModeEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkReleaseFullScreenExclusiveModeEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkReleaseFullScreenExclusiveModeEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkReleaseFullScreenExclusiveModeEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkReleaseFullScreenExclusiveModeEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetDeviceGroupSurfacePresentModes2EXT - Query device group present capabilities for a surface + /// + /// + /// + /// To query the supported device group presentation modes for a surface + /// combined with select other fixed swapchain creation parameters, call: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive with VK_KHR_device_group or VK_VERSION_1_1 + /// VkResult vkGetDeviceGroupSurfacePresentModes2EXT( + /// VkDevice device, + /// const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + /// VkDeviceGroupPresentModeFlagsKHR* pModes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe VkDeviceGroupPresentModeFlagsKHR GetGroupSurfacePresentModes2EXT( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo + ) + { + fixed (VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfoFixed = &pSurfaceInfo) + { + VkDeviceGroupPresentModeFlagsKHR pModesLocal = default; + VkResult result = handle.PInvoke.vkGetDeviceGroupSurfacePresentModes2EXT.Invoke( + handle.Handle, + pSurfaceInfoFixed, + &pModesLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceGroupSurfacePresentModes2EXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDeviceGroupSurfacePresentModes2EXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetDeviceGroupSurfacePresentModes2EXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceGroupSurfacePresentModes2EXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceGroupSurfacePresentModes2EXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pModesLocal; + } + } + + /// + /// vkAcquireWinrtDisplayNV - Acquire access to a VkDisplayKHR + /// + /// + /// + /// :refpage: vkAcquireWinrtDisplayNV + /// + /// + /// To acquire permission to directly access a display in Vulkan on Windows 10, + /// call: + /// + /// + /// // Provided by VK_NV_acquire_winrt_display + /// VkResult vkAcquireWinrtDisplayNV( + /// VkPhysicalDevice physicalDevice, + /// VkDisplayKHR display); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static void AcquireWinrtDisplayNV( + this VulkanHandleWrapper handle, + VkDisplayKHR display + ) + { + VkResult result = handle.PInvoke.vkAcquireWinrtDisplayNV.Invoke(handle.Handle, display); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquireWinrtDisplayNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkAcquireWinrtDisplayNV failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkAcquireWinrtDisplayNV failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireWinrtDisplayNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireWinrtDisplayNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetWinrtDisplayNV - Query the VkDisplayKHR corresponding to a WinRT DisplayTarget + /// + /// + /// + /// :refpage: vkGetWinrtDisplayNV + /// + /// + /// When acquiring displays on Windows 10, an application may also wish to + /// enumerate and identify them using a native handle rather than a + /// VkDisplayKHR handle. + /// + /// + /// To determine the VkDisplayKHR handle corresponding to a + /// https://docs.microsoft.com/en-us/uwp/api/windows.devices.display.core.displaytarget["`winrt::Windows::Devices::Display::Core::DisplayTarget`"], + /// call: + /// + /// + /// // Provided by VK_NV_acquire_winrt_display + /// VkResult vkGetWinrtDisplayNV( + /// VkPhysicalDevice physicalDevice, + /// uint32_t deviceRelativeId, + /// VkDisplayKHR* pDisplay); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("windows")] + public static unsafe VkDisplayKHR GetWinrtDisplayNV( + this VulkanHandleWrapper handle, + int deviceRelativeId + ) + { + VkDisplayKHR pDisplayLocal = default; + VkResult result = handle.PInvoke.vkGetWinrtDisplayNV.Invoke( + handle.Handle, + deviceRelativeId, + &pDisplayLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetWinrtDisplayNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetWinrtDisplayNV failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkGetWinrtDisplayNV failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetWinrtDisplayNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetWinrtDisplayNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDisplayLocal; + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/Platforms/XcbExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/Platforms/XcbExtensions.gen.cs new file mode 100644 index 0000000..8a6b4ff --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/Platforms/XcbExtensions.gen.cs @@ -0,0 +1,110 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Xcb +{ + public static unsafe partial class XcbExtensions + { + /// + /// vkCreateXcbSurfaceKHR - Create a <c>VkSurfaceKHR</c> object for a X11 window, using the XCB client-side library + /// + /// + /// + /// :refpage: vkCreateXcbSurfaceKHR + /// + /// + /// To create a VkSurfaceKHR object for an X11 window, using the XCB + /// client-side library, call: + /// + /// + /// // Provided by VK_KHR_xcb_surface + /// VkResult vkCreateXcbSurfaceKHR( + /// VkInstance instance, + /// const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe void CreateXcbSurfaceKHR( + this VulkanHandleWrapper handle, + in VkXcbSurfaceCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator, + out VkSurfaceKHR pSurface + ) + { + fixed (VkXcbSurfaceCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateXcbSurfaceKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateXcbSurfaceKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateXcbSurfaceKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateXcbSurfaceKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateXcbSurfaceKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + pSurface = pSurfaceLocal; + } + } + + /// + /// vkGetPhysicalDeviceXcbPresentationSupportKHR - Query physical device for presentation to X11 server using XCB + /// + /// + /// + /// To determine whether a queue family of a physical device supports + /// presentation to an X11 server, using the XCB client-side library, call: + /// + /// + /// // Provided by VK_KHR_xcb_surface + /// VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// xcb_connection_t* connection, + /// xcb_visualid_t visual_id); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe Brutal.Bool32 GetXcbPresentationSupportKHR( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + void* connection, + int visual_id + ) + { + return handle.PInvoke.vkGetPhysicalDeviceXcbPresentationSupportKHR.Invoke( + handle.Handle, + queueFamilyIndex, + connection, + visual_id + ); + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/Platforms/XlibExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/Platforms/XlibExtensions.gen.cs new file mode 100644 index 0000000..0409760 --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/Platforms/XlibExtensions.gen.cs @@ -0,0 +1,223 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Xlib +{ + public static unsafe partial class XlibExtensions + { + /// + /// vkCreateXlibSurfaceKHR - Create a <c>VkSurfaceKHR</c> object for an X11 window, using the Xlib client-side library + /// + /// + /// + /// :refpage: vkCreateXlibSurfaceKHR + /// + /// + /// To create a VkSurfaceKHR object for an X11 window, using the Xlib + /// client-side library, call: + /// + /// + /// // Provided by VK_KHR_xlib_surface + /// VkResult vkCreateXlibSurfaceKHR( + /// VkInstance instance, + /// const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe void CreateXlibSurfaceKHR( + this VulkanHandleWrapper handle, + in VkXlibSurfaceCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator, + out VkSurfaceKHR pSurface + ) + { + fixed (VkXlibSurfaceCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateXlibSurfaceKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateXlibSurfaceKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateXlibSurfaceKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateXlibSurfaceKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateXlibSurfaceKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + pSurface = pSurfaceLocal; + } + } + + /// + /// vkGetPhysicalDeviceXlibPresentationSupportKHR - Query physical device for presentation to X11 server using Xlib + /// + /// + /// + /// To determine whether a queue family of a physical device supports + /// presentation to an X11 server, using the Xlib client-side library, call: + /// + /// + /// // Provided by VK_KHR_xlib_surface + /// VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// Display* dpy, + /// VisualID visualID); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe Brutal.Bool32 GetXlibPresentationSupportKHR( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + void* dpy, + nint visualID + ) + { + return handle.PInvoke.vkGetPhysicalDeviceXlibPresentationSupportKHR.Invoke( + handle.Handle, + queueFamilyIndex, + dpy, + visualID + ); + } + + /// + /// vkAcquireXlibDisplayEXT - Acquire access to a VkDisplayKHR using Xlib + /// + /// + /// + /// To acquire permission to directly access a display in Vulkan from an X11 + /// server, call: + /// + /// + /// // Provided by VK_EXT_acquire_xlib_display + /// VkResult vkAcquireXlibDisplayEXT( + /// VkPhysicalDevice physicalDevice, + /// Display* dpy, + /// VkDisplayKHR display); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe void AcquireXlibDisplayEXT( + this VulkanHandleWrapper handle, + void* dpy, + VkDisplayKHR display + ) + { + VkResult result = handle.PInvoke.vkAcquireXlibDisplayEXT.Invoke(handle.Handle, dpy, display); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquireXlibDisplayEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkAcquireXlibDisplayEXT failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireXlibDisplayEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireXlibDisplayEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetRandROutputDisplayEXT - Query the VkDisplayKHR corresponding to an X11 RandR Output + /// + /// + /// + /// When acquiring displays from an X11 server, an application may also wish to + /// enumerate and identify them using a native handle rather than a + /// VkDisplayKHR handle. + /// To determine the VkDisplayKHR handle corresponding to an X11 RandR + /// Output, call: + /// + /// + /// // Provided by VK_EXT_acquire_xlib_display + /// VkResult vkGetRandROutputDisplayEXT( + /// VkPhysicalDevice physicalDevice, + /// Display* dpy, + /// RROutput rrOutput, + /// VkDisplayKHR* pDisplay); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [SupportedOSPlatform("linux")] + public static unsafe VkDisplayKHR GetRandROutputDisplayEXT( + this VulkanHandleWrapper handle, + void* dpy, + nint rrOutput + ) + { + VkDisplayKHR pDisplayLocal = default; + VkResult result = handle.PInvoke.vkGetRandROutputDisplayEXT.Invoke( + handle.Handle, + dpy, + rrOutput, + &pDisplayLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetRandROutputDisplayEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetRandROutputDisplayEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetRandROutputDisplayEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDisplayLocal; + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/VkDeviceExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/VkDeviceExtensions.gen.cs new file mode 100644 index 0000000..42cb480 --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/VkDeviceExtensions.gen.cs @@ -0,0 +1,26687 @@ +namespace Brutal.VulkanApi +{ + public static unsafe partial class VkDeviceExtensions + { + /// + /// vkGetDeviceProcAddr - Return a function pointer for a command + /// + /// + /// + /// In order to support systems with multiple Vulkan implementations, the + /// function pointers returned by vkGetInstanceProcAddr may: point to + /// dispatch code that calls a different real implementation for different + /// VkDevice objects or their child objects. + /// The overhead of the internal dispatch for VkDevice objects can be + /// avoided by obtaining device-specific function pointers for any commands that + /// use a device or device-child object as their dispatchable object. + /// Such function pointers can be obtained by calling: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// PFN_vkVoidFunction vkGetDeviceProcAddr( + /// VkDevice device, + /// const char* pName); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe PfnVkVoidFunction GetProcAddr( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pName + ) + { + fixed (byte* pNameFixed = pName) + { + return handle.PInvoke.vkGetDeviceProcAddr.Invoke(handle.Handle, pNameFixed); + } + } + + /// + /// vkDestroyDevice - Destroy a logical device + /// + /// + /// + /// To destroy a device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyDevice( + /// VkDevice device, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void DestroyDeviceInternal( + this VulkanHandleWrapper handle, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDevice.Invoke(handle.Handle, pAllocator); + } + + /// + /// vkGetDeviceQueue - Get a queue handle from a device + /// + /// + /// + /// To retrieve a handle to a VkQueue object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetDeviceQueue( + /// VkDevice device, + /// uint32_t queueFamilyIndex, + /// uint32_t queueIndex, + /// VkQueue* pQueue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe VkQueue GetQueueInternal( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + int queueIndex + ) + { + VkQueue pQueueLocal = default; + handle.PInvoke.vkGetDeviceQueue.Invoke(handle.Handle, queueFamilyIndex, queueIndex, &pQueueLocal); + return pQueueLocal; + } + + /// + /// vkQueueSubmit - Submits a sequence of semaphores or command buffers to a queue + /// + /// + /// + /// :refpage: vkQueueSubmit + /// + /// + /// To submit command buffers to a queue, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkQueueSubmit( + /// VkQueue queue, + /// uint32_t submitCount, + /// const VkSubmitInfo* pSubmits, + /// VkFence fence); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void SubmitInternal( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pSubmits, + VkFence fence + ) + { + fixed (VkSubmitInfo* pSubmitsFixed = pSubmits) + { + VkResult result = handle.PInvoke.vkQueueSubmit.Invoke( + handle.Handle, + pSubmits.Length, + pSubmitsFixed, + fence + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkQueueWaitIdle - Wait for a queue to become idle + /// + /// + /// + /// :refpage: vkQueueWaitIdle + /// + /// + /// To wait on the host for the completion of outstanding queue operations for a + /// given queue, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkQueueWaitIdle( + /// VkQueue queue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void WaitIdleInternal(this VulkanHandleWrapper handle) + { + VkResult result = handle.PInvoke.vkQueueWaitIdle.Invoke(handle.Handle); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkDeviceWaitIdle - Wait for a device to become idle + /// + /// + /// + /// :refpage: vkDeviceWaitIdle + /// + /// + /// To wait on the host for the completion of outstanding queue operations for + /// all queues on a given logical device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkDeviceWaitIdle( + /// VkDevice device); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WaitIdle(this VulkanHandleWrapper handle) + { + VkResult result = handle.PInvoke.vkDeviceWaitIdle.Invoke(handle.Handle); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkAllocateMemory - Allocate device memory + /// + /// + /// + /// :refpage: vkAllocateMemory + /// :objectnameplural: device memory objects + /// :objectnamecamelcase: deviceMemory + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To allocate memory objects, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkAllocateMemory( + /// VkDevice device, + /// const VkMemoryAllocateInfo* pAllocateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDeviceMemory* pMemory); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceMemory AllocateMemory( + this VulkanHandleWrapper handle, + in VkMemoryAllocateInfo pAllocateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkMemoryAllocateInfo* pAllocateInfoFixed = &pAllocateInfo) + { + VkDeviceMemory pMemoryLocal = default; + VkResult result = handle.PInvoke.vkAllocateMemory.Invoke( + handle.Handle, + pAllocateInfoFixed, + pAllocator, + &pMemoryLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pMemoryLocal; + } + } + + /// + /// vkFreeMemory - Free device memory + /// + /// + /// + /// To free a memory object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkFreeMemory( + /// VkDevice device, + /// VkDeviceMemory memory, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FreeMemory( + this VulkanHandleWrapper handle, + VkDeviceMemory memory, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkFreeMemory.Invoke(handle.Handle, memory, pAllocator); + } + + /// + /// vkMapMemory - Map a memory object into application address space + /// + /// + /// + /// :refpage: vkMapMemory + /// + /// + /// To retrieve a host virtual address pointer to a region of a mappable memory + /// object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkMapMemory( + /// VkDevice device, + /// VkDeviceMemory memory, + /// VkDeviceSize offset, + /// VkDeviceSize size, + /// VkMemoryMapFlags flags, + /// void** ppData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void* MapMemory( + this VulkanHandleWrapper handle, + VkDeviceMemory memory, + ByteSize64 offset, + ByteSize64 size, + VkMemoryMapFlags flags + ) + { + void* ppDataLocal = default; + VkResult result = handle.PInvoke.vkMapMemory.Invoke( + handle.Handle, + memory, + offset, + size, + flags, + &ppDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkMapMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkMapMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkMapMemory failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkMapMemory failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkMapMemory failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return ppDataLocal; + } + + /// + /// vkUnmapMemory - Unmap a previously mapped memory object + /// + /// + /// + /// To unmap a memory object once host access to it is no longer needed by the + /// application, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkUnmapMemory( + /// VkDevice device, + /// VkDeviceMemory memory); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnmapMemory( + this VulkanHandleWrapper handle, + VkDeviceMemory memory + ) + { + handle.PInvoke.vkUnmapMemory.Invoke(handle.Handle, memory); + } + + /// + /// vkFlushMappedMemoryRanges - Flush mapped memory ranges + /// + /// + /// + /// :refpage: vkFlushMappedMemoryRanges + /// + /// + /// To flush ranges of non-coherent memory from the host caches, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkFlushMappedMemoryRanges( + /// VkDevice device, + /// uint32_t memoryRangeCount, + /// const VkMappedMemoryRange* pMemoryRanges); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FlushMappedMemoryRanges( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pMemoryRanges + ) + { + fixed (VkMappedMemoryRange* pMemoryRangesFixed = pMemoryRanges) + { + VkResult result = handle.PInvoke.vkFlushMappedMemoryRanges.Invoke( + handle.Handle, + pMemoryRanges.Length, + pMemoryRangesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkInvalidateMappedMemoryRanges - Invalidate ranges of mapped memory objects + /// + /// + /// + /// :refpage: vkInvalidateMappedMemoryRanges + /// + /// + /// To invalidate ranges of non-coherent memory from the host caches, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkInvalidateMappedMemoryRanges( + /// VkDevice device, + /// uint32_t memoryRangeCount, + /// const VkMappedMemoryRange* pMemoryRanges); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InvalidateMappedMemoryRanges( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pMemoryRanges + ) + { + fixed (VkMappedMemoryRange* pMemoryRangesFixed = pMemoryRanges) + { + VkResult result = handle.PInvoke.vkInvalidateMappedMemoryRanges.Invoke( + handle.Handle, + pMemoryRanges.Length, + pMemoryRangesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetDeviceMemoryCommitment - Query the current commitment for a VkDeviceMemory + /// + /// + /// + /// To determine the amount of lazily-allocated memory that is currently + /// committed for a memory object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetDeviceMemoryCommitment( + /// VkDevice device, + /// VkDeviceMemory memory, + /// VkDeviceSize* pCommittedMemoryInBytes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe ByteSize64 GetMemoryCommitment( + this VulkanHandleWrapper handle, + VkDeviceMemory memory + ) + { + ByteSize64 pCommittedMemoryInBytesLocal = default; + handle.PInvoke.vkGetDeviceMemoryCommitment.Invoke(handle.Handle, memory, &pCommittedMemoryInBytesLocal); + return pCommittedMemoryInBytesLocal; + } + + /// + /// vkBindBufferMemory - Bind device memory to a buffer object + /// + /// + /// + /// :refpage: vkBindBufferMemory + /// + /// + /// To attach memory to a buffer object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkBindBufferMemory( + /// VkDevice device, + /// VkBuffer buffer, + /// VkDeviceMemory memory, + /// VkDeviceSize memoryOffset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindBufferMemory( + this VulkanHandleWrapper handle, + VkBuffer buffer, + VkDeviceMemory memory, + ByteSize64 memoryOffset + ) + { + VkResult result = handle.PInvoke.vkBindBufferMemory.Invoke(handle.Handle, buffer, memory, memoryOffset); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkBindImageMemory - Bind device memory to an image object + /// + /// + /// + /// :refpage: vkBindImageMemory + /// + /// + /// To attach memory to an image object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkBindImageMemory( + /// VkDevice device, + /// VkImage image, + /// VkDeviceMemory memory, + /// VkDeviceSize memoryOffset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindImageMemory( + this VulkanHandleWrapper handle, + VkImage image, + VkDeviceMemory memory, + ByteSize64 memoryOffset + ) + { + VkResult result = handle.PInvoke.vkBindImageMemory.Invoke(handle.Handle, image, memory, memoryOffset); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for a buffer resource, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetBufferMemoryRequirements( + /// VkDevice device, + /// VkBuffer buffer, + /// VkMemoryRequirements* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferMemoryRequirements( + this VulkanHandleWrapper handle, + VkBuffer buffer, + ref VkMemoryRequirements pMemoryRequirements + ) + { + fixed (VkMemoryRequirements* pMemoryRequirementsFixed = &pMemoryRequirements) + { + handle.PInvoke.vkGetBufferMemoryRequirements.Invoke(handle.Handle, buffer, pMemoryRequirementsFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements. + public static VkMemoryRequirements GetBufferMemoryRequirements( + this VulkanHandleWrapper handle, + VkBuffer buffer + ) + { + VkMemoryRequirements outValue = new(); + GetBufferMemoryRequirements(handle, buffer, ref outValue); + return outValue; + } + + /// + /// vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for an image resource, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetImageMemoryRequirements( + /// VkDevice device, + /// VkImage image, + /// VkMemoryRequirements* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageMemoryRequirements( + this VulkanHandleWrapper handle, + VkImage image, + ref VkMemoryRequirements pMemoryRequirements + ) + { + fixed (VkMemoryRequirements* pMemoryRequirementsFixed = &pMemoryRequirements) + { + handle.PInvoke.vkGetImageMemoryRequirements.Invoke(handle.Handle, image, pMemoryRequirementsFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements. + public static VkMemoryRequirements GetImageMemoryRequirements( + this VulkanHandleWrapper handle, + VkImage image + ) + { + VkMemoryRequirements outValue = new(); + GetImageMemoryRequirements(handle, image, ref outValue); + return outValue; + } + + /// + /// vkGetImageSparseMemoryRequirements - Query the memory requirements for a sparse image + /// + /// + /// + /// To query sparse memory requirements for an image, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetImageSparseMemoryRequirements( + /// VkDevice device, + /// VkImage image, + /// uint32_t* pSparseMemoryRequirementCount, + /// VkSparseImageMemoryRequirements* pSparseMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetImageSparseMemoryRequirements( + this VulkanHandleWrapper handle, + VkImage image, + ref int pSparseMemoryRequirementCount, + scoped ReadOnlySpan pSparseMemoryRequirements + ) + { + fixed (VkSparseImageMemoryRequirements* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements) + fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount) + { + handle.PInvoke.vkGetImageSparseMemoryRequirements.Invoke( + handle.Handle, + image, + pSparseMemoryRequirementCountFixed, + pSparseMemoryRequirementsFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetImageSparseMemoryRequirements_Count( + this VulkanHandleWrapper handle, + VkImage image + ) + { + int pSparseMemoryRequirementCount = default; + GetImageSparseMemoryRequirements(handle, image, ref pSparseMemoryRequirementCount, null); + return pSparseMemoryRequirementCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetImageSparseMemoryRequirements_Write( + this VulkanHandleWrapper handle, + VkImage image, + scoped ReadOnlySpan pSparseMemoryRequirements + ) + { + int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length; + GetImageSparseMemoryRequirements( + handle, + image, + ref pSparseMemoryRequirementCount, + pSparseMemoryRequirements + ); + } + + /// + /// vkQueueBindSparse - Bind device memory to a sparse resource object + /// + /// + /// + /// To submit sparse binding operations to a queue, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkQueueBindSparse( + /// VkQueue queue, + /// uint32_t bindInfoCount, + /// const VkBindSparseInfo* pBindInfo, + /// VkFence fence); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void BindSparseInternal( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBindInfo, + VkFence fence + ) + { + fixed (VkBindSparseInfo* pBindInfoFixed = pBindInfo) + { + VkResult result = handle.PInvoke.vkQueueBindSparse.Invoke( + handle.Handle, + pBindInfo.Length, + pBindInfoFixed, + fence + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCreateFence - Create a new fence object + /// + /// + /// + /// :refpage: vkCreateFence + /// :objectnameplural: fences + /// :objectnamecamelcase: fence + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a fence, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateFence( + /// VkDevice device, + /// const VkFenceCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkFence* pFence); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkFence CreateFence( + this VulkanHandleWrapper handle, + in VkFenceCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkFenceCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkFence pFenceLocal = default; + VkResult result = handle.PInvoke.vkCreateFence.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pFenceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateFence failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateFence failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateFence failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateFence failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pFenceLocal; + } + } + + /// + /// vkDestroyFence - Destroy a fence object + /// + /// + /// + /// To destroy a fence, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyFence( + /// VkDevice device, + /// VkFence fence, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyFence( + this VulkanHandleWrapper handle, + VkFence fence, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyFence.Invoke(handle.Handle, fence, pAllocator); + } + + /// + /// vkResetFences - Resets one or more fence objects + /// + /// + /// + /// To set the state of fences to unsignaled from the host, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkResetFences( + /// VkDevice device, + /// uint32_t fenceCount, + /// const VkFence* pFences); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ResetFences( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pFences + ) + { + fixed (VkFence* pFencesFixed = pFences) + { + VkResult result = handle.PInvoke.vkResetFences.Invoke(handle.Handle, pFences.Length, pFencesFixed); + switch (result) + { + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkResetFences failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkResetFences failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkResetFences failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetFenceStatus - Return the status of a fence + /// + /// + /// + /// :refpage: vkGetFenceStatus + /// + /// + /// To query the status of a fence from the host, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkGetFenceStatus( + /// VkDevice device, + /// VkFence fence); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult GetFenceStatus( + this VulkanHandleWrapper handle, + VkFence fence + ) + { + VkResult result = handle.PInvoke.vkGetFenceStatus.Invoke(handle.Handle, fence); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.NotReady: + default: + break; + } + + return result; + } + + /// + /// vkWaitForFences - Wait for one or more fences to become signaled + /// + /// + /// + /// :refpage: vkWaitForFences + /// + /// + /// To wait for one or more fences to enter the signaled state on the host, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkWaitForFences( + /// VkDevice device, + /// uint32_t fenceCount, + /// const VkFence* pFences, + /// VkBool32 waitAll, + /// uint64_t timeout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult WaitForFences( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pFences, + Brutal.Bool32 waitAll, + nint timeout + ) + { + fixed (VkFence* pFencesFixed = pFences) + { + VkResult result = handle.PInvoke.vkWaitForFences.Invoke( + handle.Handle, + pFences.Length, + pFencesFixed, + waitAll, + timeout + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWaitForFences failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWaitForFences failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkWaitForFences failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWaitForFences failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWaitForFences failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Timeout: + default: + break; + } + + return result; + } + } + + /// + /// vkCreateSemaphore - Create a new queue semaphore object + /// + /// + /// + /// :refpage: vkCreateSemaphore + /// :objectnameplural: semaphores + /// :objectnamecamelcase: semaphore + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a semaphore, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateSemaphore( + /// VkDevice device, + /// const VkSemaphoreCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSemaphore* pSemaphore); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkSemaphore CreateSemaphore( + this VulkanHandleWrapper handle, + in VkSemaphoreCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkSemaphoreCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkSemaphore pSemaphoreLocal = default; + VkResult result = handle.PInvoke.vkCreateSemaphore.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSemaphoreLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSemaphoreLocal; + } + } + + /// + /// vkDestroySemaphore - Destroy a semaphore object + /// + /// + /// + /// To destroy a semaphore, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroySemaphore( + /// VkDevice device, + /// VkSemaphore semaphore, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroySemaphore( + this VulkanHandleWrapper handle, + VkSemaphore semaphore, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroySemaphore.Invoke(handle.Handle, semaphore, pAllocator); + } + + /// + /// vkCreateQueryPool - Create a new query pool object + /// + /// + /// + /// :refpage: vkCreateQueryPool + /// :objectnameplural: query pools + /// :objectnamecamelcase: queryPool + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a query pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateQueryPool( + /// VkDevice device, + /// const VkQueryPoolCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkQueryPool* pQueryPool); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkQueryPool CreateQueryPool( + this VulkanHandleWrapper handle, + in VkQueryPoolCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkQueryPoolCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkQueryPool pQueryPoolLocal = default; + VkResult result = handle.PInvoke.vkCreateQueryPool.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pQueryPoolLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pQueryPoolLocal; + } + } + + /// + /// vkDestroyQueryPool - Destroy a query pool object + /// + /// + /// + /// To destroy a query pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyQueryPool( + /// VkDevice device, + /// VkQueryPool queryPool, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyQueryPool( + this VulkanHandleWrapper handle, + VkQueryPool queryPool, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyQueryPool.Invoke(handle.Handle, queryPool, pAllocator); + } + + /// + /// vkGetQueryPoolResults - Copy results of queries in a query pool to a host memory region + /// + /// + /// + /// :refpage: vkGetQueryPoolResults + /// + /// + /// To retrieve status and results for a set of queries, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkGetQueryPoolResults( + /// VkDevice device, + /// VkQueryPool queryPool, + /// uint32_t firstQuery, + /// uint32_t queryCount, + /// size_t dataSize, + /// void* pData, + /// VkDeviceSize stride, + /// VkQueryResultFlags flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetQueryPoolResults( + this VulkanHandleWrapper handle, + VkQueryPool queryPool, + int firstQuery, + int queryCount, + scoped ReadOnlySpan pData, + ByteSize64 stride, + VkQueryResultFlags flags + ) + { + fixed (byte* pDataFixed = pData) + { + VkResult result = handle.PInvoke.vkGetQueryPoolResults.Invoke( + handle.Handle, + queryPool, + firstQuery, + queryCount, + (nuint)pData.Length, + pDataFixed, + stride, + flags + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.NotReady: + default: + break; + } + + return result; + } + } + + /// + /// vkCreateBuffer - Create a new buffer object + /// + /// + /// + /// :refpage: vkCreateBuffer + /// :objectnameplural: buffers + /// :objectnamecamelcase: buffer + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create buffers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateBuffer( + /// VkDevice device, + /// const VkBufferCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkBuffer* pBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkBuffer CreateBuffer( + this VulkanHandleWrapper handle, + in VkBufferCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkBufferCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkBuffer pBufferLocal = default; + VkResult result = handle.PInvoke.vkCreateBuffer.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pBufferLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pBufferLocal; + } + } + + /// + /// vkDestroyBuffer - Destroy a buffer object + /// + /// + /// + /// To destroy a buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyBuffer( + /// VkDevice device, + /// VkBuffer buffer, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyBuffer( + this VulkanHandleWrapper handle, + VkBuffer buffer, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyBuffer.Invoke(handle.Handle, buffer, pAllocator); + } + + /// + /// vkCreateImage - Create a new image object + /// + /// + /// + /// :refpage: vkCreateImage + /// :objectnameplural: images + /// :objectnamecamelcase: image + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create images, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateImage( + /// VkDevice device, + /// const VkImageCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkImage* pImage); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkImage CreateImage( + this VulkanHandleWrapper handle, + in VkImageCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkImageCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkImage pImageLocal = default; + VkResult result = handle.PInvoke.vkCreateImage.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pImageLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateImage failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateImage failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorCompressionExhaustedEXT: + throw new VkResultError( + VkResult.ErrorCompressionExhaustedEXT, + "Vulkan call to vkCreateImage failed with error: VK_ERROR_COMPRESSION_EXHAUSTED_EXT" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateImage failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateImage failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateImage failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pImageLocal; + } + } + + /// + /// vkDestroyImage - Destroy an image object + /// + /// + /// + /// To destroy an image, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyImage( + /// VkDevice device, + /// VkImage image, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyImage( + this VulkanHandleWrapper handle, + VkImage image, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyImage.Invoke(handle.Handle, image, pAllocator); + } + + /// + /// vkGetImageSubresourceLayout - Retrieve information about an image subresource + /// + /// + /// + /// :refpage: vkGetImageSubresourceLayout + /// + /// + /// To query the memory layout of an image subresource, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetImageSubresourceLayout( + /// VkDevice device, + /// VkImage image, + /// const VkImageSubresource* pSubresource, + /// VkSubresourceLayout* pLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSubresourceLayout( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource* pSubresource, + ref VkSubresourceLayout pLayout + ) + { + fixed (VkSubresourceLayout* pLayoutFixed = &pLayout) + { + handle.PInvoke.vkGetImageSubresourceLayout.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSubresourceLayout. + public static unsafe VkSubresourceLayout GetImageSubresourceLayout( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource* pSubresource + ) + { + VkSubresourceLayout outValue = new(); + GetImageSubresourceLayout(handle, image, pSubresource, ref outValue); + return outValue; + } + + /// + /// vkCreateImageView - Create an image view from an existing image + /// + /// + /// + /// :refpage: vkCreateImageView + /// :objectnameplural: image views + /// :objectnamecamelcase: imageView + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create an image view, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateImageView( + /// VkDevice device, + /// const VkImageViewCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkImageView* pView); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkImageView CreateImageView( + this VulkanHandleWrapper handle, + in VkImageViewCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkImageViewCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkImageView pViewLocal = default; + VkResult result = handle.PInvoke.vkCreateImageView.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pViewLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateImageView failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateImageView failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateImageView failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateImageView failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateImageView failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pViewLocal; + } + } + + /// + /// vkDestroyImageView - Destroy an image view object + /// + /// + /// + /// To destroy an image view, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyImageView( + /// VkDevice device, + /// VkImageView imageView, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyImageView( + this VulkanHandleWrapper handle, + VkImageView imageView, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyImageView.Invoke(handle.Handle, imageView, pAllocator); + } + + /// + /// vkCreateCommandPool - Create a new command pool object + /// + /// + /// + /// :refpage: vkCreateCommandPool + /// :objectnameplural: command pools + /// :objectnamecamelcase: commandPool + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a command pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateCommandPool( + /// VkDevice device, + /// const VkCommandPoolCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkCommandPool* pCommandPool); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkCommandPool CreateCommandPool( + this VulkanHandleWrapper handle, + in VkCommandPoolCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkCommandPoolCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkCommandPool pCommandPoolLocal = default; + VkResult result = handle.PInvoke.vkCreateCommandPool.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pCommandPoolLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pCommandPoolLocal; + } + } + + /// + /// vkDestroyCommandPool - Destroy a command pool object + /// + /// + /// + /// To destroy a command pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyCommandPool( + /// VkDevice device, + /// VkCommandPool commandPool, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyCommandPool( + this VulkanHandleWrapper handle, + VkCommandPool commandPool, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyCommandPool.Invoke(handle.Handle, commandPool, pAllocator); + } + + /// + /// vkResetCommandPool - Reset a command pool + /// + /// + /// + /// To reset a command pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkResetCommandPool( + /// VkDevice device, + /// VkCommandPool commandPool, + /// VkCommandPoolResetFlags flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetCommandPool( + this VulkanHandleWrapper handle, + VkCommandPool commandPool, + VkCommandPoolResetFlags flags + ) + { + VkResult result = handle.PInvoke.vkResetCommandPool.Invoke(handle.Handle, commandPool, flags); + switch (result) + { + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkResetCommandPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkResetCommandPool failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkResetCommandPool failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkAllocateCommandBuffers - Allocate command buffers from an existing command pool + /// + /// + /// + /// :refpage: vkAllocateCommandBuffers + /// + /// + /// To allocate command buffers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkAllocateCommandBuffers( + /// VkDevice device, + /// const VkCommandBufferAllocateInfo* pAllocateInfo, + /// VkCommandBuffer* pCommandBuffers); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void AllocateCommandBuffersInternal( + this VulkanHandleWrapper handle, + in VkCommandBufferAllocateInfo pAllocateInfo, + scoped ReadOnlySpan pCommandBuffers + ) + { + fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers) + fixed (VkCommandBufferAllocateInfo* pAllocateInfoFixed = &pAllocateInfo) + { + VkResult result = handle.PInvoke.vkAllocateCommandBuffers.Invoke( + handle.Handle, + pAllocateInfoFixed, + pCommandBuffersFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkFreeCommandBuffers - Free command buffers + /// + /// + /// + /// To free command buffers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkFreeCommandBuffers( + /// VkDevice device, + /// VkCommandPool commandPool, + /// uint32_t commandBufferCount, + /// const VkCommandBuffer* pCommandBuffers); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void FreeCommandBuffersInternal( + this VulkanHandleWrapper handle, + VkCommandPool commandPool, + scoped ReadOnlySpan pCommandBuffers + ) + { + fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers) + { + handle.PInvoke.vkFreeCommandBuffers.Invoke( + handle.Handle, + commandPool, + pCommandBuffers.Length, + pCommandBuffersFixed + ); + } + } + + /// + /// vkBeginCommandBuffer - Start recording a command buffer + /// + /// + /// + /// :refpage: vkBeginCommandBuffer + /// + /// + /// To begin recording a command buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkBeginCommandBuffer( + /// VkCommandBuffer commandBuffer, + /// const VkCommandBufferBeginInfo* pBeginInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void Begin(this T handle, in VkCommandBufferBeginInfo pBeginInfo) + where T : VulkanHandleWrapper + { + fixed (VkCommandBufferBeginInfo* pBeginInfoFixed = &pBeginInfo) + { + VkResult result = handle.PInvoke.vkBeginCommandBuffer.Invoke(handle.Handle, pBeginInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkEndCommandBuffer - Finish recording a command buffer + /// + /// + /// + /// :refpage: vkEndCommandBuffer + /// + /// + /// To complete recording of a command buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEndCommandBuffer( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void End(this T handle) + where T : VulkanHandleWrapper + { + VkResult result = handle.PInvoke.vkEndCommandBuffer.Invoke(handle.Handle); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidVideoStdParametersKHR: + throw new VkResultError( + VkResult.ErrorInvalidVideoStdParametersKHR, + "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkResetCommandBuffer - Reset a command buffer to the initial state + /// + /// + /// + /// To reset a command buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkResetCommandBuffer( + /// VkCommandBuffer commandBuffer, + /// VkCommandBufferResetFlags flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Reset(this T handle, VkCommandBufferResetFlags flags) + where T : VulkanHandleWrapper + { + VkResult result = handle.PInvoke.vkResetCommandBuffer.Invoke(handle.Handle, flags); + switch (result) + { + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkResetCommandBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkResetCommandBuffer failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkResetCommandBuffer failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkCmdCopyBuffer - Copy data between buffer regions + /// + /// + /// + /// :refpage: vkCmdCopyBuffer + /// + /// + /// To copy data between buffer objects, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdCopyBuffer( + /// VkCommandBuffer commandBuffer, + /// VkBuffer srcBuffer, + /// VkBuffer dstBuffer, + /// uint32_t regionCount, + /// const VkBufferCopy* pRegions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBuffer( + this T handle, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + scoped ReadOnlySpan pRegions + ) + where T : VulkanHandleWrapper + { + fixed (VkBufferCopy* pRegionsFixed = pRegions) + { + handle.PInvoke.vkCmdCopyBuffer.Invoke( + handle.Handle, + srcBuffer, + dstBuffer, + pRegions.Length, + pRegionsFixed + ); + } + } + + /// + /// vkCmdCopyImage - Copy data between images + /// + /// + /// + /// :refpage: vkCmdCopyImage + /// + /// + /// To copy data between image objects, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdCopyImage( + /// VkCommandBuffer commandBuffer, + /// VkImage srcImage, + /// VkImageLayout srcImageLayout, + /// VkImage dstImage, + /// VkImageLayout dstImageLayout, + /// uint32_t regionCount, + /// const VkImageCopy* pRegions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImage( + this T handle, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + scoped ReadOnlySpan pRegions + ) + where T : VulkanHandleWrapper + { + fixed (VkImageCopy* pRegionsFixed = pRegions) + { + handle.PInvoke.vkCmdCopyImage.Invoke( + handle.Handle, + srcImage, + srcImageLayout, + dstImage, + dstImageLayout, + pRegions.Length, + pRegionsFixed + ); + } + } + + /// + /// vkCmdCopyBufferToImage - Copy data from a buffer into an image + /// + /// + /// + /// :refpage: vkCmdCopyBufferToImage + /// + /// + /// To copy data from a buffer object to an image object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdCopyBufferToImage( + /// VkCommandBuffer commandBuffer, + /// VkBuffer srcBuffer, + /// VkImage dstImage, + /// VkImageLayout dstImageLayout, + /// uint32_t regionCount, + /// const VkBufferImageCopy* pRegions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBufferToImage( + this T handle, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + scoped ReadOnlySpan pRegions + ) + where T : VulkanHandleWrapper + { + fixed (VkBufferImageCopy* pRegionsFixed = pRegions) + { + handle.PInvoke.vkCmdCopyBufferToImage.Invoke( + handle.Handle, + srcBuffer, + dstImage, + dstImageLayout, + pRegions.Length, + pRegionsFixed + ); + } + } + + /// + /// vkCmdCopyImageToBuffer - Copy image data into a buffer + /// + /// + /// + /// :refpage: vkCmdCopyImageToBuffer + /// + /// + /// To copy data from an image object to a buffer object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdCopyImageToBuffer( + /// VkCommandBuffer commandBuffer, + /// VkImage srcImage, + /// VkImageLayout srcImageLayout, + /// VkBuffer dstBuffer, + /// uint32_t regionCount, + /// const VkBufferImageCopy* pRegions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageToBuffer( + this T handle, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + scoped ReadOnlySpan pRegions + ) + where T : VulkanHandleWrapper + { + fixed (VkBufferImageCopy* pRegionsFixed = pRegions) + { + handle.PInvoke.vkCmdCopyImageToBuffer.Invoke( + handle.Handle, + srcImage, + srcImageLayout, + dstBuffer, + pRegions.Length, + pRegionsFixed + ); + } + } + + /// + /// vkCmdUpdateBuffer - Update a buffer&apos;s contents from host memory + /// + /// + /// + /// To update buffer data inline in a command buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdUpdateBuffer( + /// VkCommandBuffer commandBuffer, + /// VkBuffer dstBuffer, + /// VkDeviceSize dstOffset, + /// VkDeviceSize dataSize, + /// const void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateBuffer( + this T handle, + VkBuffer dstBuffer, + ByteSize64 dstOffset, + scoped ReadOnlySpan pData + ) + where T : VulkanHandleWrapper + { + fixed (byte* pDataFixed = pData) + { + handle.PInvoke.vkCmdUpdateBuffer.Invoke( + handle.Handle, + dstBuffer, + dstOffset, + (ByteSize64)pData.Length, + pDataFixed + ); + } + } + + /// + /// vkCmdFillBuffer - Fill a region of a buffer with a fixed value + /// + /// + /// + /// To clear buffer data, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdFillBuffer( + /// VkCommandBuffer commandBuffer, + /// VkBuffer dstBuffer, + /// VkDeviceSize dstOffset, + /// VkDeviceSize size, + /// uint32_t data); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void FillBuffer( + this T handle, + VkBuffer dstBuffer, + ByteSize64 dstOffset, + ByteSize64 size, + int data + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdFillBuffer.Invoke(handle.Handle, dstBuffer, dstOffset, size, data); + } + + /// + /// vkCmdPipelineBarrier - Insert a memory dependency + /// + /// + /// + /// :refpage: vkCmdPipelineBarrier + /// + /// + /// To record a pipeline barrier, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdPipelineBarrier( + /// VkCommandBuffer commandBuffer, + /// VkPipelineStageFlags srcStageMask, + /// VkPipelineStageFlags dstStageMask, + /// VkDependencyFlags dependencyFlags, + /// uint32_t memoryBarrierCount, + /// const VkMemoryBarrier* pMemoryBarriers, + /// uint32_t bufferMemoryBarrierCount, + /// const VkBufferMemoryBarrier* pBufferMemoryBarriers, + /// uint32_t imageMemoryBarrierCount, + /// const VkImageMemoryBarrier* pImageMemoryBarriers); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PipelineBarrier( + this T handle, + VkPipelineStageFlags srcStageMask, + VkPipelineStageFlags dstStageMask, + VkDependencyFlags dependencyFlags, + scoped ReadOnlySpan pMemoryBarriers, + scoped ReadOnlySpan pBufferMemoryBarriers, + scoped ReadOnlySpan pImageMemoryBarriers + ) + where T : VulkanHandleWrapper + { + fixed (VkImageMemoryBarrier* pImageMemoryBarriersFixed = pImageMemoryBarriers) + fixed (VkBufferMemoryBarrier* pBufferMemoryBarriersFixed = pBufferMemoryBarriers) + fixed (VkMemoryBarrier* pMemoryBarriersFixed = pMemoryBarriers) + { + handle.PInvoke.vkCmdPipelineBarrier.Invoke( + handle.Handle, + srcStageMask, + dstStageMask, + dependencyFlags, + pMemoryBarriers.Length, + pMemoryBarriersFixed, + pBufferMemoryBarriers.Length, + pBufferMemoryBarriersFixed, + pImageMemoryBarriers.Length, + pImageMemoryBarriersFixed + ); + } + } + + /// + /// vkCmdBeginQuery - Begin a query + /// + /// + /// + /// :refpage: vkCmdBeginQuery + /// + /// + /// To begin a query, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBeginQuery( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t query, + /// VkQueryControlFlags flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BeginQuery(this T handle, VkQueryPool queryPool, int query, VkQueryControlFlags flags) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBeginQuery.Invoke(handle.Handle, queryPool, query, flags); + } + + /// + /// vkCmdEndQuery - Ends a query + /// + /// + /// + /// :refpage: vkCmdEndQuery + /// + /// + /// To end a query after the set of desired commands is recorded, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdEndQuery( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t query); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndQuery(this T handle, VkQueryPool queryPool, int query) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndQuery.Invoke(handle.Handle, queryPool, query); + } + + /// + /// vkCmdResetQueryPool - Reset queries in a query pool + /// + /// + /// + /// :refpage: vkCmdResetQueryPool + /// + /// + /// To reset a range of queries in a query pool on a queue, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdResetQueryPool( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t firstQuery, + /// uint32_t queryCount); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetQueryPool(this T handle, VkQueryPool queryPool, int firstQuery, int queryCount) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdResetQueryPool.Invoke(handle.Handle, queryPool, firstQuery, queryCount); + } + + /// + /// vkCmdWriteTimestamp - Write a device timestamp into a query object + /// + /// + /// + /// :refpage: vkCmdWriteTimestamp + /// + /// + /// To request a timestamp and write the value to memory, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdWriteTimestamp( + /// VkCommandBuffer commandBuffer, + /// VkPipelineStageFlagBits pipelineStage, + /// VkQueryPool queryPool, + /// uint32_t query); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WriteTimestamp( + this T handle, + VkPipelineStageFlags pipelineStage, + VkQueryPool queryPool, + int query + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdWriteTimestamp.Invoke(handle.Handle, pipelineStage, queryPool, query); + } + + /// + /// vkCmdCopyQueryPoolResults - Copy the results of queries in a query pool to a buffer object + /// + /// + /// + /// :refpage: vkCmdCopyQueryPoolResults + /// + /// + /// To copy query statuses and numerical results directly to buffer memory, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdCopyQueryPoolResults( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t firstQuery, + /// uint32_t queryCount, + /// VkBuffer dstBuffer, + /// VkDeviceSize dstOffset, + /// VkDeviceSize stride, + /// VkQueryResultFlags flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyQueryPoolResults( + this T handle, + VkQueryPool queryPool, + int firstQuery, + int queryCount, + VkBuffer dstBuffer, + ByteSize64 dstOffset, + ByteSize64 stride, + VkQueryResultFlags flags + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdCopyQueryPoolResults.Invoke( + handle.Handle, + queryPool, + firstQuery, + queryCount, + dstBuffer, + dstOffset, + stride, + flags + ); + } + + /// + /// vkCmdExecuteCommands - Execute a secondary command buffer from a primary command buffer + /// + /// + /// + /// Secondary command buffers must not be directly submitted to a queue. + /// To record a secondary command buffer to execute as part of a primary command + /// buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdExecuteCommands( + /// VkCommandBuffer commandBuffer, + /// uint32_t commandBufferCount, + /// const VkCommandBuffer* pCommandBuffers); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void CmdExecuteCommandsInternal( + this T handle, + scoped ReadOnlySpan pCommandBuffers + ) + where T : VulkanHandleWrapper + { + fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers) + { + handle.PInvoke.vkCmdExecuteCommands.Invoke(handle.Handle, pCommandBuffers.Length, pCommandBuffersFixed); + } + } + + /// + /// vkCreateEvent - Create a new event object + /// + /// + /// + /// :refpage: vkCreateEvent + /// :objectnameplural: events + /// :objectnamecamelcase: event + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create an event, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateEvent( + /// VkDevice device, + /// const VkEventCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkEvent* pEvent); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkEvent CreateEvent( + this VulkanHandleWrapper handle, + in VkEventCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkEventCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkEvent pEventLocal = default; + VkResult result = handle.PInvoke.vkCreateEvent.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pEventLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateEvent failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateEvent failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateEvent failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateEvent failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pEventLocal; + } + } + + /// + /// vkDestroyEvent - Destroy an event object + /// + /// + /// + /// To destroy an event, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyEvent( + /// VkDevice device, + /// VkEvent event, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyEvent( + this VulkanHandleWrapper handle, + VkEvent @event, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyEvent.Invoke(handle.Handle, @event, pAllocator); + } + + /// + /// vkGetEventStatus - Retrieve the status of an event object + /// + /// + /// + /// :refpage: vkGetEventStatus + /// + /// + /// To query the state of an event from the host, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkGetEventStatus( + /// VkDevice device, + /// VkEvent event); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult GetEventStatus( + this VulkanHandleWrapper handle, + VkEvent @event + ) + { + VkResult result = handle.PInvoke.vkGetEventStatus.Invoke(handle.Handle, @event); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.EventSet: + case VkResult.EventReset: + default: + break; + } + + return result; + } + + /// + /// vkSetEvent - Set an event to signaled state + /// + /// + /// + /// :refpage: vkSetEvent + /// + /// + /// To set the state of an event to signaled from the host, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkSetEvent( + /// VkDevice device, + /// VkEvent event); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetEvent(this VulkanHandleWrapper handle, VkEvent @event) + { + VkResult result = handle.PInvoke.vkSetEvent.Invoke(handle.Handle, @event); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSetEvent failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkSetEvent failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetEvent failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetEvent failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkResetEvent - Reset an event to non-signaled state + /// + /// + /// + /// To set the state of an event to unsignaled from the host, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkResetEvent( + /// VkDevice device, + /// VkEvent event); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetEvent(this VulkanHandleWrapper handle, VkEvent @event) + { + VkResult result = handle.PInvoke.vkResetEvent.Invoke(handle.Handle, @event); + switch (result) + { + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkResetEvent failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkResetEvent failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkResetEvent failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkCreateBufferView - Create a new buffer view object + /// + /// + /// + /// :refpage: vkCreateBufferView + /// :objectnameplural: buffer views + /// :objectnamecamelcase: bufferView + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a buffer view, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateBufferView( + /// VkDevice device, + /// const VkBufferViewCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkBufferView* pView); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkBufferView CreateBufferView( + this VulkanHandleWrapper handle, + in VkBufferViewCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkBufferViewCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkBufferView pViewLocal = default; + VkResult result = handle.PInvoke.vkCreateBufferView.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pViewLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pViewLocal; + } + } + + /// + /// vkDestroyBufferView - Destroy a buffer view object + /// + /// + /// + /// To destroy a buffer view, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyBufferView( + /// VkDevice device, + /// VkBufferView bufferView, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyBufferView( + this VulkanHandleWrapper handle, + VkBufferView bufferView, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyBufferView.Invoke(handle.Handle, bufferView, pAllocator); + } + + /// + /// vkCreateShaderModule - Creates a new shader module object + /// + /// + /// + /// To create a shader module, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateShaderModule( + /// VkDevice device, + /// const VkShaderModuleCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkShaderModule* pShaderModule); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkShaderModule CreateShaderModule( + this VulkanHandleWrapper handle, + in VkShaderModuleCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkShaderModuleCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkShaderModule pShaderModuleLocal = default; + VkResult result = handle.PInvoke.vkCreateShaderModule.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pShaderModuleLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidShaderNV: + throw new VkResultError( + VkResult.ErrorInvalidShaderNV, + "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_INVALID_SHADER_NV" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pShaderModuleLocal; + } + } + + /// + /// vkDestroyShaderModule - Destroy a shader module + /// + /// + /// + /// To destroy a shader module, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyShaderModule( + /// VkDevice device, + /// VkShaderModule shaderModule, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyShaderModule( + this VulkanHandleWrapper handle, + VkShaderModule shaderModule, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyShaderModule.Invoke(handle.Handle, shaderModule, pAllocator); + } + + /// + /// vkCreatePipelineCache - Creates a new pipeline cache + /// + /// + /// + /// :refpage: vkCreatePipelineCache + /// :objectnameplural: pipeline caches + /// :objectnamecamelcase: pipelineCache + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create pipeline cache objects, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreatePipelineCache( + /// VkDevice device, + /// const VkPipelineCacheCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipelineCache* pPipelineCache); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPipelineCache CreatePipelineCache( + this VulkanHandleWrapper handle, + in VkPipelineCacheCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkPipelineCacheCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkPipelineCache pPipelineCacheLocal = default; + VkResult result = handle.PInvoke.vkCreatePipelineCache.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pPipelineCacheLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pPipelineCacheLocal; + } + } + + /// + /// vkDestroyPipelineCache - Destroy a pipeline cache object + /// + /// + /// + /// To destroy a pipeline cache, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyPipelineCache( + /// VkDevice device, + /// VkPipelineCache pipelineCache, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyPipelineCache( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyPipelineCache.Invoke(handle.Handle, pipelineCache, pAllocator); + } + + /// + /// vkGetPipelineCacheData - Get the data store from a pipeline cache + /// + /// + /// + /// Data can be retrieved from a pipeline cache object using the command: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkGetPipelineCacheData( + /// VkDevice device, + /// VkPipelineCache pipelineCache, + /// size_t* pDataSize, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetPipelineCacheData( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache, + ref nuint pDataSize, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + fixed (nuint* pDataSizeFixed = &pDataSize) + { + VkResult result = handle.PInvoke.vkGetPipelineCacheData.Invoke( + handle.Handle, + pipelineCache, + pDataSizeFixed, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetPipelineCacheData_Count( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache + ) + { + nuint pDataSize = default; + GetPipelineCacheData(handle, pipelineCache, ref pDataSize, null); + return pDataSize; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetPipelineCacheData_Write( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache, + scoped ReadOnlySpan pData + ) + { + nuint pDataSize = (nuint)pData.Length; + return GetPipelineCacheData(handle, pipelineCache, ref pDataSize, pData); + } + + /// + /// vkMergePipelineCaches - Combine the data stores of pipeline caches + /// + /// + /// + /// Pipeline cache objects can be merged using the command: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkMergePipelineCaches( + /// VkDevice device, + /// VkPipelineCache dstCache, + /// uint32_t srcCacheCount, + /// const VkPipelineCache* pSrcCaches); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MergePipelineCaches( + this VulkanHandleWrapper handle, + VkPipelineCache dstCache, + scoped ReadOnlySpan pSrcCaches + ) + { + fixed (VkPipelineCache* pSrcCachesFixed = pSrcCaches) + { + VkResult result = handle.PInvoke.vkMergePipelineCaches.Invoke( + handle.Handle, + dstCache, + pSrcCaches.Length, + pSrcCachesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCreateComputePipelines - Creates a new compute pipeline object + /// + /// + /// + /// :refpage: vkCreateComputePipelines + /// :objectnameplural: compute pipelines + /// :objectnamecamelcase: computePipeline + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: createInfoCount + /// + /// + /// To create compute pipelines, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateComputePipelines( + /// VkDevice device, + /// VkPipelineCache pipelineCache, + /// uint32_t createInfoCount, + /// const VkComputePipelineCreateInfo* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipeline* pPipelines); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateComputePipelines( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache, + scoped ReadOnlySpan pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pPipelines + ) + { + fixed (VkPipeline* pPipelinesFixed = pPipelines) + fixed (VkComputePipelineCreateInfo* pCreateInfosFixed = pCreateInfos) + { + VkResult result = handle.PInvoke.vkCreateComputePipelines.Invoke( + handle.Handle, + pipelineCache, + pCreateInfos.Length, + pCreateInfosFixed, + pAllocator, + pPipelinesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidShaderNV: + throw new VkResultError( + VkResult.ErrorInvalidShaderNV, + "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_INVALID_SHADER_NV" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.PipelineCompileRequiredEXT: + default: + break; + } + + return result; + } + } + + /// + /// vkDestroyPipeline - Destroy a pipeline object + /// + /// + /// + /// To destroy a pipeline, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyPipeline( + /// VkDevice device, + /// VkPipeline pipeline, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyPipeline( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyPipeline.Invoke(handle.Handle, pipeline, pAllocator); + } + + /// + /// vkCreatePipelineLayout - Creates a new pipeline layout object + /// + /// + /// + /// :refpage: vkCreatePipelineLayout + /// :objectnameplural: pipeline layouts + /// :objectnamecamelcase: pipelineLayout + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a pipeline layout, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreatePipelineLayout( + /// VkDevice device, + /// const VkPipelineLayoutCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipelineLayout* pPipelineLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPipelineLayout CreatePipelineLayout( + this VulkanHandleWrapper handle, + in VkPipelineLayoutCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkPipelineLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkPipelineLayout pPipelineLayoutLocal = default; + VkResult result = handle.PInvoke.vkCreatePipelineLayout.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pPipelineLayoutLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pPipelineLayoutLocal; + } + } + + /// + /// vkDestroyPipelineLayout - Destroy a pipeline layout object + /// + /// + /// + /// To destroy a pipeline layout, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyPipelineLayout( + /// VkDevice device, + /// VkPipelineLayout pipelineLayout, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyPipelineLayout( + this VulkanHandleWrapper handle, + VkPipelineLayout pipelineLayout, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyPipelineLayout.Invoke(handle.Handle, pipelineLayout, pAllocator); + } + + /// + /// vkCreateSampler - Create a new sampler object + /// + /// + /// + /// :refpage: vkCreateSampler + /// :objectnameplural: samplers + /// :objectnamecamelcase: sampler + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a sampler object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateSampler( + /// VkDevice device, + /// const VkSamplerCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSampler* pSampler); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkSampler CreateSampler( + this VulkanHandleWrapper handle, + in VkSamplerCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkSamplerCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkSampler pSamplerLocal = default; + VkResult result = handle.PInvoke.vkCreateSampler.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSamplerLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateSampler failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateSampler failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateSampler failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateSampler failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateSampler failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSamplerLocal; + } + } + + /// + /// vkDestroySampler - Destroy a sampler object + /// + /// + /// + /// To destroy a sampler, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroySampler( + /// VkDevice device, + /// VkSampler sampler, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroySampler( + this VulkanHandleWrapper handle, + VkSampler sampler, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroySampler.Invoke(handle.Handle, sampler, pAllocator); + } + + /// + /// vkCreateDescriptorSetLayout - Create a new descriptor set layout + /// + /// + /// + /// :refpage: vkCreateDescriptorSetLayout + /// :objectnameplural: descriptor set layouts + /// :objectnamecamelcase: descriptorSetLayout + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create descriptor set layout objects, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateDescriptorSetLayout( + /// VkDevice device, + /// const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDescriptorSetLayout* pSetLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDescriptorSetLayout CreateDescriptorSetLayout( + this VulkanHandleWrapper handle, + in VkDescriptorSetLayoutCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkDescriptorSetLayout pSetLayoutLocal = default; + VkResult result = handle.PInvoke.vkCreateDescriptorSetLayout.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSetLayoutLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSetLayoutLocal; + } + } + + /// + /// vkDestroyDescriptorSetLayout - Destroy a descriptor set layout object + /// + /// + /// + /// To destroy a descriptor set layout, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyDescriptorSetLayout( + /// VkDevice device, + /// VkDescriptorSetLayout descriptorSetLayout, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDescriptorSetLayout( + this VulkanHandleWrapper handle, + VkDescriptorSetLayout descriptorSetLayout, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDescriptorSetLayout.Invoke(handle.Handle, descriptorSetLayout, pAllocator); + } + + /// + /// vkCreateDescriptorPool - Creates a descriptor pool object + /// + /// + /// + /// :refpage: vkCreateDescriptorPool + /// :objectnameplural: descriptor pools + /// :objectnamecamelcase: descriptorPool + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a descriptor pool object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateDescriptorPool( + /// VkDevice device, + /// const VkDescriptorPoolCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDescriptorPool* pDescriptorPool); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDescriptorPool CreateDescriptorPool( + this VulkanHandleWrapper handle, + in VkDescriptorPoolCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDescriptorPoolCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkDescriptorPool pDescriptorPoolLocal = default; + VkResult result = handle.PInvoke.vkCreateDescriptorPool.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pDescriptorPoolLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorFragmentationEXT: + throw new VkResultError( + VkResult.ErrorFragmentationEXT, + "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_FRAGMENTATION_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDescriptorPoolLocal; + } + } + + /// + /// vkDestroyDescriptorPool - Destroy a descriptor pool object + /// + /// + /// + /// To destroy a descriptor pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyDescriptorPool( + /// VkDevice device, + /// VkDescriptorPool descriptorPool, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDescriptorPool( + this VulkanHandleWrapper handle, + VkDescriptorPool descriptorPool, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDescriptorPool.Invoke(handle.Handle, descriptorPool, pAllocator); + } + + /// + /// vkResetDescriptorPool - Resets a descriptor pool object + /// + /// + /// + /// To return all descriptor sets allocated from a given pool to the pool, + /// rather than freeing individual descriptor sets, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkResetDescriptorPool( + /// VkDevice device, + /// VkDescriptorPool descriptorPool, + /// VkDescriptorPoolResetFlags flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetDescriptorPool( + this VulkanHandleWrapper handle, + VkDescriptorPool descriptorPool, + VkDescriptorPoolResetFlags flags + ) + { + VkResult result = handle.PInvoke.vkResetDescriptorPool.Invoke(handle.Handle, descriptorPool, flags); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkResetDescriptorPool failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkResetDescriptorPool failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkAllocateDescriptorSets - Allocate one or more descriptor sets + /// + /// + /// + /// :refpage: vkAllocateDescriptorSets + /// :objectnameplural: descriptor sets + /// :objectnamecamelcase: descriptorSet + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: VkDescriptorSetAllocateInfo::descriptorSetCount + /// + /// + /// To allocate descriptor sets from a descriptor pool, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkAllocateDescriptorSets( + /// VkDevice device, + /// const VkDescriptorSetAllocateInfo* pAllocateInfo, + /// VkDescriptorSet* pDescriptorSets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void AllocateDescriptorSets( + this VulkanHandleWrapper handle, + in VkDescriptorSetAllocateInfo pAllocateInfo, + scoped ReadOnlySpan pDescriptorSets + ) + { + fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets) + fixed (VkDescriptorSetAllocateInfo* pAllocateInfoFixed = &pAllocateInfo) + { + VkResult result = handle.PInvoke.vkAllocateDescriptorSets.Invoke( + handle.Handle, + pAllocateInfoFixed, + pDescriptorSetsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorFragmentedPool: + throw new VkResultError( + VkResult.ErrorFragmentedPool, + "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_FRAGMENTED_POOL" + ); + case VkResult.ErrorOutOfPoolMemory: + throw new VkResultError( + VkResult.ErrorOutOfPoolMemory, + "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_OUT_OF_POOL_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkFreeDescriptorSets - Free one or more descriptor sets + /// + /// + /// + /// To free allocated descriptor sets, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkFreeDescriptorSets( + /// VkDevice device, + /// VkDescriptorPool descriptorPool, + /// uint32_t descriptorSetCount, + /// const VkDescriptorSet* pDescriptorSets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void FreeDescriptorSetsInternal( + this VulkanHandleWrapper handle, + VkDescriptorPool descriptorPool, + scoped ReadOnlySpan pDescriptorSets + ) + { + fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets) + { + VkResult result = handle.PInvoke.vkFreeDescriptorSets.Invoke( + handle.Handle, + descriptorPool, + pDescriptorSets.Length, + pDescriptorSetsFixed + ); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkFreeDescriptorSets failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkFreeDescriptorSets failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkUpdateDescriptorSets - Update the contents of a descriptor set object + /// + /// + /// + /// Once allocated, descriptor sets can be updated with a combination of write + /// and copy operations. + /// To update descriptor sets, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkUpdateDescriptorSets( + /// VkDevice device, + /// uint32_t descriptorWriteCount, + /// const VkWriteDescriptorSet* pDescriptorWrites, + /// uint32_t descriptorCopyCount, + /// const VkCopyDescriptorSet* pDescriptorCopies); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateDescriptorSets( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pDescriptorWrites, + scoped ReadOnlySpan pDescriptorCopies + ) + { + fixed (VkCopyDescriptorSet* pDescriptorCopiesFixed = pDescriptorCopies) + fixed (VkWriteDescriptorSet* pDescriptorWritesFixed = pDescriptorWrites) + { + handle.PInvoke.vkUpdateDescriptorSets.Invoke( + handle.Handle, + pDescriptorWrites.Length, + pDescriptorWritesFixed, + pDescriptorCopies.Length, + pDescriptorCopiesFixed + ); + } + } + + /// + /// vkCmdBindPipeline - Bind a pipeline object to a command buffer + /// + /// + /// + /// Once a pipeline has been created, it can be bound to the command buffer + /// using the command: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBindPipeline( + /// VkCommandBuffer commandBuffer, + /// VkPipelineBindPoint pipelineBindPoint, + /// VkPipeline pipeline); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindPipeline(this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindPipeline.Invoke(handle.Handle, pipelineBindPoint, pipeline); + } + + /// + /// vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindDescriptorSets + /// + /// + /// To bind one or more descriptor sets to a command buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBindDescriptorSets( + /// VkCommandBuffer commandBuffer, + /// VkPipelineBindPoint pipelineBindPoint, + /// VkPipelineLayout layout, + /// uint32_t firstSet, + /// uint32_t descriptorSetCount, + /// const VkDescriptorSet* pDescriptorSets, + /// uint32_t dynamicOffsetCount, + /// const uint32_t* pDynamicOffsets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDescriptorSets( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + int firstSet, + scoped ReadOnlySpan pDescriptorSets, + scoped Span pDynamicOffsets + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize32* pDynamicOffsetsFixed = pDynamicOffsets) + fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets) + { + handle.PInvoke.vkCmdBindDescriptorSets.Invoke( + handle.Handle, + pipelineBindPoint, + layout, + firstSet, + pDescriptorSets.Length, + pDescriptorSetsFixed, + pDynamicOffsets.Length, + (int*)pDynamicOffsetsFixed + ); + } + } + + /// + /// vkCmdClearColorImage - Clear regions of a color image + /// + /// + /// + /// To clear one or more subranges of a color image, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdClearColorImage( + /// VkCommandBuffer commandBuffer, + /// VkImage image, + /// VkImageLayout imageLayout, + /// const VkClearColorValue* pColor, + /// uint32_t rangeCount, + /// const VkImageSubresourceRange* pRanges); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearColorImage( + this T handle, + VkImage image, + VkImageLayout imageLayout, + VkClearColorValue* pColor, + scoped ReadOnlySpan pRanges + ) + where T : VulkanHandleWrapper + { + fixed (VkImageSubresourceRange* pRangesFixed = pRanges) + { + handle.PInvoke.vkCmdClearColorImage.Invoke( + handle.Handle, + image, + imageLayout, + pColor, + pRanges.Length, + pRangesFixed + ); + } + } + + /// + /// vkCmdDispatch - Dispatch compute work items + /// + /// + /// + /// :refpage: vkCmdDispatch + /// + /// + /// To record a dispatch, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdDispatch( + /// VkCommandBuffer commandBuffer, + /// uint32_t groupCountX, + /// uint32_t groupCountY, + /// uint32_t groupCountZ); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Dispatch(this T handle, int groupCountX, int groupCountY, int groupCountZ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDispatch.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ); + } + + /// + /// vkCmdDispatchIndirect - Dispatch compute work items with indirect parameters + /// + /// + /// + /// :refpage: vkCmdDispatchIndirect + /// + /// + /// To record an indirect dispatching command, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdDispatchIndirect( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DispatchIndirect(this T handle, VkBuffer buffer, ByteSize64 offset) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDispatchIndirect.Invoke(handle.Handle, buffer, offset); + } + + /// + /// vkCmdSetEvent - Set an event object to signaled state + /// + /// + /// + /// :refpage: vkCmdSetEvent + /// + /// + /// To set the state of an event to signaled from a device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetEvent( + /// VkCommandBuffer commandBuffer, + /// VkEvent event, + /// VkPipelineStageFlags stageMask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetEvent(this T handle, VkEvent @event, VkPipelineStageFlags stageMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetEvent.Invoke(handle.Handle, @event, stageMask); + } + + /// + /// vkCmdResetEvent - Reset an event object to non-signaled state + /// + /// + /// + /// :refpage: vkCmdResetEvent + /// + /// + /// To set the state of an event to unsignaled from a device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdResetEvent( + /// VkCommandBuffer commandBuffer, + /// VkEvent event, + /// VkPipelineStageFlags stageMask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetEvent(this T handle, VkEvent @event, VkPipelineStageFlags stageMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdResetEvent.Invoke(handle.Handle, @event, stageMask); + } + + /// + /// vkCmdWaitEvents - Wait for one or more events and insert a set of memory + /// + /// + /// + /// :refpage: vkCmdWaitEvents + /// + /// + /// To wait for one or more events to enter the signaled state on a device, + /// call: + /// + /// + /// [[synchronization-events-waiting-device]] + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdWaitEvents( + /// VkCommandBuffer commandBuffer, + /// uint32_t eventCount, + /// const VkEvent* pEvents, + /// VkPipelineStageFlags srcStageMask, + /// VkPipelineStageFlags dstStageMask, + /// uint32_t memoryBarrierCount, + /// const VkMemoryBarrier* pMemoryBarriers, + /// uint32_t bufferMemoryBarrierCount, + /// const VkBufferMemoryBarrier* pBufferMemoryBarriers, + /// uint32_t imageMemoryBarrierCount, + /// const VkImageMemoryBarrier* pImageMemoryBarriers); + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WaitEvents( + this T handle, + scoped ReadOnlySpan pEvents, + VkPipelineStageFlags srcStageMask, + VkPipelineStageFlags dstStageMask, + scoped ReadOnlySpan pMemoryBarriers, + scoped ReadOnlySpan pBufferMemoryBarriers, + scoped ReadOnlySpan pImageMemoryBarriers + ) + where T : VulkanHandleWrapper + { + fixed (VkImageMemoryBarrier* pImageMemoryBarriersFixed = pImageMemoryBarriers) + fixed (VkBufferMemoryBarrier* pBufferMemoryBarriersFixed = pBufferMemoryBarriers) + fixed (VkMemoryBarrier* pMemoryBarriersFixed = pMemoryBarriers) + fixed (VkEvent* pEventsFixed = pEvents) + { + handle.PInvoke.vkCmdWaitEvents.Invoke( + handle.Handle, + pEvents.Length, + pEventsFixed, + srcStageMask, + dstStageMask, + pMemoryBarriers.Length, + pMemoryBarriersFixed, + pBufferMemoryBarriers.Length, + pBufferMemoryBarriersFixed, + pImageMemoryBarriers.Length, + pImageMemoryBarriersFixed + ); + } + } + + /// + /// vkCmdPushConstants - Update the values of push constants + /// + /// + /// + /// :refpage: vkCmdPushConstants + /// + /// + /// To update push constants, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdPushConstants( + /// VkCommandBuffer commandBuffer, + /// VkPipelineLayout layout, + /// VkShaderStageFlags stageFlags, + /// uint32_t offset, + /// uint32_t size, + /// const void* pValues); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushConstants( + this T handle, + VkPipelineLayout layout, + VkShaderStageFlags stageFlags, + int offset, + scoped ReadOnlySpan pValues + ) + where T : VulkanHandleWrapper + { + fixed (byte* pValuesFixed = pValues) + { + handle.PInvoke.vkCmdPushConstants.Invoke( + handle.Handle, + layout, + stageFlags, + offset, + pValues.Length, + pValuesFixed + ); + } + } + + /// + /// vkCreateGraphicsPipelines - Create graphics pipelines + /// + /// + /// + /// :refpage: vkCreateGraphicsPipelines + /// :objectnameplural: graphics pipelines + /// :objectnamecamelcase: graphicsPipeline + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: createInfoCount + /// + /// + /// To create graphics pipelines, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateGraphicsPipelines( + /// VkDevice device, + /// VkPipelineCache pipelineCache, + /// uint32_t createInfoCount, + /// const VkGraphicsPipelineCreateInfo* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipeline* pPipelines); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateGraphicsPipelines( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache, + scoped ReadOnlySpan pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pPipelines + ) + { + fixed (VkPipeline* pPipelinesFixed = pPipelines) + fixed (VkGraphicsPipelineCreateInfo* pCreateInfosFixed = pCreateInfos) + { + VkResult result = handle.PInvoke.vkCreateGraphicsPipelines.Invoke( + handle.Handle, + pipelineCache, + pCreateInfos.Length, + pCreateInfosFixed, + pAllocator, + pPipelinesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidShaderNV: + throw new VkResultError( + VkResult.ErrorInvalidShaderNV, + "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_INVALID_SHADER_NV" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.PipelineCompileRequiredEXT: + default: + break; + } + + return result; + } + } + + /// + /// vkCreateFramebuffer - Create a new framebuffer object + /// + /// + /// + /// :refpage: vkCreateFramebuffer + /// :objectnameplural: framebuffers + /// :objectnamecamelcase: framebuffer + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a framebuffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateFramebuffer( + /// VkDevice device, + /// const VkFramebufferCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkFramebuffer* pFramebuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkFramebuffer CreateFramebuffer( + this VulkanHandleWrapper handle, + in VkFramebufferCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkFramebufferCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkFramebuffer pFramebufferLocal = default; + VkResult result = handle.PInvoke.vkCreateFramebuffer.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pFramebufferLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pFramebufferLocal; + } + } + + /// + /// vkDestroyFramebuffer - Destroy a framebuffer object + /// + /// + /// + /// To destroy a framebuffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyFramebuffer( + /// VkDevice device, + /// VkFramebuffer framebuffer, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyFramebuffer( + this VulkanHandleWrapper handle, + VkFramebuffer framebuffer, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyFramebuffer.Invoke(handle.Handle, framebuffer, pAllocator); + } + + /// + /// vkCreateRenderPass - Create a new render pass object + /// + /// + /// + /// :refpage: vkCreateRenderPass + /// :objectnameplural: render passes + /// :objectnamecamelcase: renderPass + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a render pass, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateRenderPass( + /// VkDevice device, + /// const VkRenderPassCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkRenderPass* pRenderPass); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkRenderPass CreateRenderPass( + this VulkanHandleWrapper handle, + in VkRenderPassCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkRenderPassCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkRenderPass pRenderPassLocal = default; + VkResult result = handle.PInvoke.vkCreateRenderPass.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pRenderPassLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pRenderPassLocal; + } + } + + /// + /// vkDestroyRenderPass - Destroy a render pass object + /// + /// + /// + /// To destroy a render pass, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyRenderPass( + /// VkDevice device, + /// VkRenderPass renderPass, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyRenderPass( + this VulkanHandleWrapper handle, + VkRenderPass renderPass, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyRenderPass.Invoke(handle.Handle, renderPass, pAllocator); + } + + /// + /// vkGetRenderAreaGranularity - Returns the granularity for optimal render area + /// + /// + /// + /// To query the render area granularity, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetRenderAreaGranularity( + /// VkDevice device, + /// VkRenderPass renderPass, + /// VkExtent2D* pGranularity); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRenderAreaGranularity( + this VulkanHandleWrapper handle, + VkRenderPass renderPass, + ref VkExtent2D pGranularity + ) + { + fixed (VkExtent2D* pGranularityFixed = &pGranularity) + { + handle.PInvoke.vkGetRenderAreaGranularity.Invoke(handle.Handle, renderPass, pGranularityFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExtent2D. + public static VkExtent2D GetRenderAreaGranularity( + this VulkanHandleWrapper handle, + VkRenderPass renderPass + ) + { + VkExtent2D outValue = new(); + GetRenderAreaGranularity(handle, renderPass, ref outValue); + return outValue; + } + + /// + /// vkCmdSetViewport - Set the viewport dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the viewport transformation + /// parameters, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetViewport( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstViewport, + /// uint32_t viewportCount, + /// const VkViewport* pViewports); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetViewport( + this T handle, + int firstViewport, + scoped ReadOnlySpan pViewports + ) + where T : VulkanHandleWrapper + { + fixed (VkViewport* pViewportsFixed = pViewports) + { + handle.PInvoke.vkCmdSetViewport.Invoke( + handle.Handle, + firstViewport, + pViewports.Length, + pViewportsFixed + ); + } + } + + /// + /// vkCmdSetScissor - Set scissor rectangles dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the scissor rectangles, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetScissor( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstScissor, + /// uint32_t scissorCount, + /// const VkRect2D* pScissors); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetScissor( + this T handle, + int firstScissor, + scoped ReadOnlySpan pScissors + ) + where T : VulkanHandleWrapper + { + fixed (VkRect2D* pScissorsFixed = pScissors) + { + handle.PInvoke.vkCmdSetScissor.Invoke(handle.Handle, firstScissor, pScissors.Length, pScissorsFixed); + } + } + + /// + /// vkCmdSetLineWidth - Set line width dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the line width, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetLineWidth( + /// VkCommandBuffer commandBuffer, + /// float lineWidth); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLineWidth(this T handle, float lineWidth) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLineWidth.Invoke(handle.Handle, lineWidth); + } + + /// + /// vkCmdSetDepthBias - Set depth bias factors and clamp dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the depth bias parameters, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetDepthBias( + /// VkCommandBuffer commandBuffer, + /// float depthBiasConstantFactor, + /// float depthBiasClamp, + /// float depthBiasSlopeFactor); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthBias( + this T handle, + float depthBiasConstantFactor, + float depthBiasClamp, + float depthBiasSlopeFactor + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthBias.Invoke( + handle.Handle, + depthBiasConstantFactor, + depthBiasClamp, + depthBiasSlopeFactor + ); + } + + /// + /// vkCmdSetBlendConstants - Set the values of blend constants + /// + /// + /// + /// To dynamically set and change^ the blend + /// constants, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetBlendConstants( + /// VkCommandBuffer commandBuffer, + /// const float blendConstants[4]); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetBlendConstants(this T handle, float* blendConstants) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetBlendConstants.Invoke(handle.Handle, blendConstants); + } + + /// + /// vkCmdSetDepthBounds - Set depth bounds range dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the depth bounds range, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetDepthBounds( + /// VkCommandBuffer commandBuffer, + /// float minDepthBounds, + /// float maxDepthBounds); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthBounds(this T handle, float minDepthBounds, float maxDepthBounds) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthBounds.Invoke(handle.Handle, minDepthBounds, maxDepthBounds); + } + + /// + /// vkCmdSetStencilCompareMask - Set stencil compare mask dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the stencil compare mask, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetStencilCompareMask( + /// VkCommandBuffer commandBuffer, + /// VkStencilFaceFlags faceMask, + /// uint32_t compareMask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilCompareMask(this T handle, VkStencilFaceFlags faceMask, int compareMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilCompareMask.Invoke(handle.Handle, faceMask, compareMask); + } + + /// + /// vkCmdSetStencilWriteMask - Set stencil write mask dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the stencil write mask, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetStencilWriteMask( + /// VkCommandBuffer commandBuffer, + /// VkStencilFaceFlags faceMask, + /// uint32_t writeMask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilWriteMask(this T handle, VkStencilFaceFlags faceMask, int writeMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilWriteMask.Invoke(handle.Handle, faceMask, writeMask); + } + + /// + /// vkCmdSetStencilReference - Set stencil reference value dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the stencil reference value, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdSetStencilReference( + /// VkCommandBuffer commandBuffer, + /// VkStencilFaceFlags faceMask, + /// uint32_t reference); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilReference(this T handle, VkStencilFaceFlags faceMask, int reference) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilReference.Invoke(handle.Handle, faceMask, reference); + } + + /// + /// vkCmdBindIndexBuffer - Bind an index buffer to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindIndexBuffer + /// + /// + /// To bind an index buffer to a command buffer, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBindIndexBuffer( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// VkIndexType indexType); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindIndexBuffer(this T handle, VkBuffer buffer, ByteSize64 offset, VkIndexType indexType) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindIndexBuffer.Invoke(handle.Handle, buffer, offset, indexType); + } + + /// + /// vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer + /// + /// + /// + /// To bind vertex buffers to a command buffer for use in subsequent drawing + /// commands, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBindVertexBuffers( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstBinding, + /// uint32_t bindingCount, + /// const VkBuffer* pBuffers, + /// const VkDeviceSize* pOffsets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVertexBuffers( + this T handle, + int firstBinding, + scoped ReadOnlySpan pBuffers, + scoped ReadOnlySpan pOffsets + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize64* pOffsetsFixed = pOffsets) + fixed (VkBuffer* pBuffersFixed = pBuffers) + { + handle.PInvoke.vkCmdBindVertexBuffers.Invoke( + handle.Handle, + firstBinding, + pBuffers.Length, + pBuffersFixed, + pOffsetsFixed + ); + } + } + + /// + /// vkCmdDraw - Draw primitives + /// + /// + /// + /// :refpage: vkCmdDraw + /// + /// + /// To record a non-indexed draw, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdDraw( + /// VkCommandBuffer commandBuffer, + /// uint32_t vertexCount, + /// uint32_t instanceCount, + /// uint32_t firstVertex, + /// uint32_t firstInstance); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Draw( + this T handle, + int vertexCount, + int instanceCount, + int firstVertex, + int firstInstance + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDraw.Invoke(handle.Handle, vertexCount, instanceCount, firstVertex, firstInstance); + } + + /// + /// vkCmdDrawIndexed - Draw primitives with indexed vertices + /// + /// + /// + /// :refpage: vkCmdDrawIndexed + /// + /// + /// To record an indexed draw, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdDrawIndexed( + /// VkCommandBuffer commandBuffer, + /// uint32_t indexCount, + /// uint32_t instanceCount, + /// uint32_t firstIndex, + /// int32_t vertexOffset, + /// uint32_t firstInstance); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndexed( + this T handle, + int indexCount, + int instanceCount, + int firstIndex, + int vertexOffset, + int firstInstance + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndexed.Invoke( + handle.Handle, + indexCount, + instanceCount, + firstIndex, + vertexOffset, + firstInstance + ); + } + + /// + /// vkCmdDrawIndirect - Draw primitives with indirect parameters + /// + /// + /// + /// :refpage: vkCmdDrawIndirect + /// + /// + /// To record a non-indexed indirect drawing command, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdDrawIndirect( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// uint32_t drawCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndirect( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + int drawCount, + ByteSize32 stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndirect.Invoke(handle.Handle, buffer, offset, drawCount, stride); + } + + /// + /// vkCmdDrawIndexedIndirect - Draw primitives with indirect parameters and indexed vertices + /// + /// + /// + /// :refpage: vkCmdDrawIndexedIndirect + /// + /// + /// To record an indexed indirect drawing command, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdDrawIndexedIndirect( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// uint32_t drawCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndexedIndirect( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + int drawCount, + ByteSize32 stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndexedIndirect.Invoke(handle.Handle, buffer, offset, drawCount, stride); + } + + /// + /// vkCmdBlitImage - Copy regions of an image, potentially performing format conversion, + /// + /// + /// + /// :refpage: vkCmdBlitImage + /// + /// + /// To copy regions of a source image into a destination image, potentially + /// performing format conversion, arbitrary scaling, and filtering, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBlitImage( + /// VkCommandBuffer commandBuffer, + /// VkImage srcImage, + /// VkImageLayout srcImageLayout, + /// VkImage dstImage, + /// VkImageLayout dstImageLayout, + /// uint32_t regionCount, + /// const VkImageBlit* pRegions, + /// VkFilter filter); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlitImage( + this T handle, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + scoped ReadOnlySpan pRegions, + VkFilter filter + ) + where T : VulkanHandleWrapper + { + fixed (VkImageBlit* pRegionsFixed = pRegions) + { + handle.PInvoke.vkCmdBlitImage.Invoke( + handle.Handle, + srcImage, + srcImageLayout, + dstImage, + dstImageLayout, + pRegions.Length, + pRegionsFixed, + filter + ); + } + } + + /// + /// vkCmdClearDepthStencilImage - Fill regions of a combined depth/stencil image + /// + /// + /// + /// To clear one or more subranges of a depth/stencil image, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdClearDepthStencilImage( + /// VkCommandBuffer commandBuffer, + /// VkImage image, + /// VkImageLayout imageLayout, + /// const VkClearDepthStencilValue* pDepthStencil, + /// uint32_t rangeCount, + /// const VkImageSubresourceRange* pRanges); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearDepthStencilImage( + this T handle, + VkImage image, + VkImageLayout imageLayout, + VkClearDepthStencilValue* pDepthStencil, + scoped ReadOnlySpan pRanges + ) + where T : VulkanHandleWrapper + { + fixed (VkImageSubresourceRange* pRangesFixed = pRanges) + { + handle.PInvoke.vkCmdClearDepthStencilImage.Invoke( + handle.Handle, + image, + imageLayout, + pDepthStencil, + pRanges.Length, + pRangesFixed + ); + } + } + + /// + /// vkCmdClearAttachments - Clear regions within bound framebuffer attachments + /// + /// + /// + /// To clear one or more regions of color and depth/stencil attachments inside a + /// render pass instance, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdClearAttachments( + /// VkCommandBuffer commandBuffer, + /// uint32_t attachmentCount, + /// const VkClearAttachment* pAttachments, + /// uint32_t rectCount, + /// const VkClearRect* pRects); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ClearAttachments( + this T handle, + scoped ReadOnlySpan pAttachments, + scoped ReadOnlySpan pRects + ) + where T : VulkanHandleWrapper + { + fixed (VkClearRect* pRectsFixed = pRects) + fixed (VkClearAttachment* pAttachmentsFixed = pAttachments) + { + handle.PInvoke.vkCmdClearAttachments.Invoke( + handle.Handle, + pAttachments.Length, + pAttachmentsFixed, + pRects.Length, + pRectsFixed + ); + } + } + + /// + /// vkCmdResolveImage - Resolve regions of an image + /// + /// + /// + /// :refpage: vkCmdResolveImage + /// + /// + /// To resolve a multisample color image to a non-multisample color image, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdResolveImage( + /// VkCommandBuffer commandBuffer, + /// VkImage srcImage, + /// VkImageLayout srcImageLayout, + /// VkImage dstImage, + /// VkImageLayout dstImageLayout, + /// uint32_t regionCount, + /// const VkImageResolve* pRegions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ResolveImage( + this T handle, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + scoped ReadOnlySpan pRegions + ) + where T : VulkanHandleWrapper + { + fixed (VkImageResolve* pRegionsFixed = pRegions) + { + handle.PInvoke.vkCmdResolveImage.Invoke( + handle.Handle, + srcImage, + srcImageLayout, + dstImage, + dstImageLayout, + pRegions.Length, + pRegionsFixed + ); + } + } + + /// + /// vkCmdBeginRenderPass - Begin a new render pass + /// + /// + /// + /// To begin a render pass instance, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdBeginRenderPass( + /// VkCommandBuffer commandBuffer, + /// const VkRenderPassBeginInfo* pRenderPassBegin, + /// VkSubpassContents contents); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginRenderPass( + this T handle, + in VkRenderPassBeginInfo pRenderPassBegin, + VkSubpassContents contents + ) + where T : VulkanHandleWrapper + { + fixed (VkRenderPassBeginInfo* pRenderPassBeginFixed = &pRenderPassBegin) + { + handle.PInvoke.vkCmdBeginRenderPass.Invoke(handle.Handle, pRenderPassBeginFixed, contents); + } + } + + /// + /// vkCmdNextSubpass - Transition to the next subpass of a render pass + /// + /// + /// + /// To transition to the next subpass in the render pass instance after + /// recording the commands for a subpass, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdNextSubpass( + /// VkCommandBuffer commandBuffer, + /// VkSubpassContents contents); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void NextSubpass(this T handle, VkSubpassContents contents) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdNextSubpass.Invoke(handle.Handle, contents); + } + + /// + /// vkCmdEndRenderPass - End the current render pass + /// + /// + /// + /// To record a command to end a render pass instance after recording the + /// commands for the last subpass, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkCmdEndRenderPass( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndRenderPass(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndRenderPass.Invoke(handle.Handle); + } + + /// + /// vkBindBufferMemory2 - Bind device memory to buffer objects + /// + /// + /// + /// :refpage: vkBindBufferMemory2 + /// + /// + /// To attach memory to buffer objects for one or more buffers at a time, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindBufferMemory2( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBindInfos + ) + { + fixed (VkBindBufferMemoryInfo* pBindInfosFixed = pBindInfos) + { + VkResult result = handle.PInvoke.vkBindBufferMemory2.Invoke( + handle.Handle, + pBindInfos.Length, + pBindInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkBindImageMemory2 - Bind device memory to image objects + /// + /// + /// + /// :refpage: vkBindImageMemory2 + /// + /// + /// To attach memory to image objects for one or more images at a time, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindImageMemory2( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBindInfos + ) + { + fixed (VkBindImageMemoryInfo* pBindInfosFixed = pBindInfos) + { + VkResult result = handle.PInvoke.vkBindImageMemory2.Invoke( + handle.Handle, + pBindInfos.Length, + pBindInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetDeviceGroupPeerMemoryFeatures - Query supported peer memory features of a device + /// + /// + /// + /// Peer memory is memory that is allocated for a given physical device and + /// then bound to a resource and accessed by a different physical device, in a + /// logical device that represents multiple physical devices. + /// Some ways of reading and writing peer memory may: not be supported by a + /// device. + /// + /// + /// To determine how peer memory can be accessed, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPeerMemoryFeatureFlags GetGroupPeerMemoryFeatures( + this VulkanHandleWrapper handle, + int heapIndex, + int localDeviceIndex, + int remoteDeviceIndex + ) + { + VkPeerMemoryFeatureFlags pPeerMemoryFeaturesLocal = default; + handle.PInvoke.vkGetDeviceGroupPeerMemoryFeatures.Invoke( + handle.Handle, + heapIndex, + localDeviceIndex, + remoteDeviceIndex, + &pPeerMemoryFeaturesLocal + ); + return pPeerMemoryFeaturesLocal; + } + + /// + /// vkCmdSetDeviceMask - Modify device mask of a command buffer + /// + /// + /// + /// To update the current device mask of a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDeviceMask(this T handle, int deviceMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDeviceMask.Invoke(handle.Handle, deviceMask); + } + + /// + /// vkGetImageMemoryRequirements2 - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for an image resource, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageMemoryRequirements2( + this VulkanHandleWrapper handle, + in VkImageMemoryRequirementsInfo2 pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkImageMemoryRequirementsInfo2* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetImageMemoryRequirements2.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetImageMemoryRequirements2( + this VulkanHandleWrapper handle, + in VkImageMemoryRequirementsInfo2 pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetImageMemoryRequirements2(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkGetBufferMemoryRequirements2 - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for a buffer resource, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferMemoryRequirements2( + this VulkanHandleWrapper handle, + in VkBufferMemoryRequirementsInfo2 pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkBufferMemoryRequirementsInfo2* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetBufferMemoryRequirements2.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetBufferMemoryRequirements2( + this VulkanHandleWrapper handle, + in VkBufferMemoryRequirementsInfo2 pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetBufferMemoryRequirements2(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkGetImageSparseMemoryRequirements2 - Query the memory requirements for a sparse image + /// + /// + /// + /// To query sparse memory requirements for an image, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetImageSparseMemoryRequirements2( + this VulkanHandleWrapper handle, + in VkImageSparseMemoryRequirementsInfo2 pInfo, + ref int pSparseMemoryRequirementCount, + scoped ReadOnlySpan pSparseMemoryRequirements + ) + { + fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements) + fixed (VkImageSparseMemoryRequirementsInfo2* pInfoFixed = &pInfo) + fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount) + { + handle.PInvoke.vkGetImageSparseMemoryRequirements2.Invoke( + handle.Handle, + pInfoFixed, + pSparseMemoryRequirementCountFixed, + pSparseMemoryRequirementsFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetImageSparseMemoryRequirements2_Count( + this VulkanHandleWrapper handle, + in VkImageSparseMemoryRequirementsInfo2 pInfo + ) + { + int pSparseMemoryRequirementCount = default; + GetImageSparseMemoryRequirements2(handle, pInfo, ref pSparseMemoryRequirementCount, null); + return pSparseMemoryRequirementCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetImageSparseMemoryRequirements2_Write( + this VulkanHandleWrapper handle, + in VkImageSparseMemoryRequirementsInfo2 pInfo, + scoped ReadOnlySpan pSparseMemoryRequirements + ) + { + int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length; + GetImageSparseMemoryRequirements2( + handle, + pInfo, + ref pSparseMemoryRequirementCount, + pSparseMemoryRequirements + ); + } + + /// + /// vkTrimCommandPool - Trim a command pool + /// + /// + /// + /// To trim a command pool, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void TrimCommandPool( + this VulkanHandleWrapper handle, + VkCommandPool commandPool, + VkCommandPoolTrimFlags flags + ) + { + handle.PInvoke.vkTrimCommandPool.Invoke(handle.Handle, commandPool, flags); + } + + /// + /// vkGetDeviceQueue2 - Get a queue handle from a device + /// + /// + /// + /// To retrieve a handle to a VkQueue object with specific + /// VkDeviceQueueCreateFlags creation flags, call: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// void vkGetDeviceQueue2( + /// VkDevice device, + /// const VkDeviceQueueInfo2* pQueueInfo, + /// VkQueue* pQueue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkQueue GetQueue2( + this VulkanHandleWrapper handle, + in VkDeviceQueueInfo2 pQueueInfo + ) + { + fixed (VkDeviceQueueInfo2* pQueueInfoFixed = &pQueueInfo) + { + VkQueue pQueueLocal = default; + handle.PInvoke.vkGetDeviceQueue2.Invoke(handle.Handle, pQueueInfoFixed, &pQueueLocal); + return pQueueLocal; + } + } + + /// + /// vkCmdDispatchBase - Dispatch compute work items with non-zero base values for the workgroup IDs + /// + /// + /// + /// :refpage: vkCmdDispatchBase + /// + /// + /// To record a dispatch using non-zero base values for the components of + /// WorkgroupId, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DispatchBase( + this T handle, + int baseGroupX, + int baseGroupY, + int baseGroupZ, + int groupCountX, + int groupCountY, + int groupCountZ + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDispatchBase.Invoke( + handle.Handle, + baseGroupX, + baseGroupY, + baseGroupZ, + groupCountX, + groupCountY, + groupCountZ + ); + } + + /// + /// vkCreateDescriptorUpdateTemplate - Create a new descriptor update template + /// + /// + /// + /// Updating a large VkDescriptorSet array can be an expensive operation + /// since an application must specify one VkWriteDescriptorSet structure + /// for each descriptor or descriptor array to update, each of which + /// re-specifies the same state when updating the same descriptor in multiple + /// descriptor sets. + /// For cases when an application wishes to update the same set of descriptors + /// in multiple descriptor sets allocated using the same + /// VkDescriptorSetLayout, vkUpdateDescriptorSetWithTemplate can be + /// used as a replacement for vkUpdateDescriptorSets. + /// + /// + /// VkDescriptorUpdateTemplate allows implementations to convert a set of + /// descriptor update operations on a single descriptor set to an internal + /// format. + /// In conjunction with + /// vkUpdateDescriptorSetWithTemplate, this can be more efficient + /// compared to calling + /// vkUpdateDescriptorSets. + /// The descriptors themselves are not specified in the + /// VkDescriptorUpdateTemplate, rather, offsets into an application + /// provided pointer to host memory are specified, which are combined with a + /// pointer passed to + /// vkUpdateDescriptorSetWithTemplate. + /// This allows large batches of updates to be executed without having to + /// convert application data structures into a strictly-defined Vulkan data + /// structure. + /// + /// + /// To create a descriptor update template, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDescriptorUpdateTemplate CreateDescriptorUpdateTemplate( + this VulkanHandleWrapper handle, + in VkDescriptorUpdateTemplateCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDescriptorUpdateTemplateCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkDescriptorUpdateTemplate pDescriptorUpdateTemplateLocal = default; + VkResult result = handle.PInvoke.vkCreateDescriptorUpdateTemplate.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pDescriptorUpdateTemplateLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDescriptorUpdateTemplateLocal; + } + } + + /// + /// vkDestroyDescriptorUpdateTemplate - Destroy a descriptor update template object + /// + /// + /// + /// To destroy a descriptor update template, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDescriptorUpdateTemplate( + this VulkanHandleWrapper handle, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDescriptorUpdateTemplate.Invoke( + handle.Handle, + descriptorUpdateTemplate, + pAllocator + ); + } + + /// + /// vkUpdateDescriptorSetWithTemplate - Update the contents of a descriptor set object using an update template + /// + /// + /// + /// Once a VkDescriptorUpdateTemplate has been created, descriptor sets + /// can be updated by calling: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateDescriptorSetWithTemplate( + this VulkanHandleWrapper handle, + VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + void* pData + ) + { + handle.PInvoke.vkUpdateDescriptorSetWithTemplate.Invoke( + handle.Handle, + descriptorSet, + descriptorUpdateTemplate, + pData + ); + } + + /// + /// vkGetDescriptorSetLayoutSupport - Query whether a descriptor set layout can be created + /// + /// + /// + /// To query information about whether a descriptor set layout can be created, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDescriptorSetLayoutSupport( + this VulkanHandleWrapper handle, + in VkDescriptorSetLayoutCreateInfo pCreateInfo, + ref VkDescriptorSetLayoutSupport pSupport + ) + { + fixed (VkDescriptorSetLayoutSupport* pSupportFixed = &pSupport) + fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + handle.PInvoke.vkGetDescriptorSetLayoutSupport.Invoke(handle.Handle, pCreateInfoFixed, pSupportFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkDescriptorSetLayoutSupport. + public static VkDescriptorSetLayoutSupport GetDescriptorSetLayoutSupport( + this VulkanHandleWrapper handle, + in VkDescriptorSetLayoutCreateInfo pCreateInfo + ) + { + VkDescriptorSetLayoutSupport outValue = new(); + GetDescriptorSetLayoutSupport(handle, pCreateInfo, ref outValue); + return outValue; + } + + /// + /// vkCreateSamplerYcbcrConversion - Create a new {YCbCr} conversion + /// + /// + /// + /// :refpage: vkCreateSamplerYcbcrConversion + /// :objectnameplural: sampler conversions + /// :objectnamecamelcase: samplerYcbcrConversion + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a VkSamplerYcbcrConversion, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkSamplerYCbCrConversion CreateSamplerYcbcrConversion( + this VulkanHandleWrapper handle, + in VkSamplerYCbCrConversionCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkSamplerYCbCrConversionCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkSamplerYCbCrConversion pYcbcrConversionLocal = default; + VkResult result = handle.PInvoke.vkCreateSamplerYcbcrConversion.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pYcbcrConversionLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pYcbcrConversionLocal; + } + } + + /// + /// vkDestroySamplerYcbcrConversion - Destroy a created {YCbCr} conversion + /// + /// + /// + /// To destroy a sampler {YCbCr} conversion, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroySamplerYcbcrConversion( + this VulkanHandleWrapper handle, + VkSamplerYCbCrConversion ycbcrConversion, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroySamplerYcbcrConversion.Invoke(handle.Handle, ycbcrConversion, pAllocator); + } + + /// + /// vkResetQueryPool - Reset queries in a query pool + /// + /// + /// + /// :refpage: vkResetQueryPool + /// + /// + /// To reset a range of queries in a query pool on the host, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetQueryPool( + this VulkanHandleWrapper handle, + VkQueryPool queryPool, + int firstQuery, + int queryCount + ) + { + handle.PInvoke.vkResetQueryPool.Invoke(handle.Handle, queryPool, firstQuery, queryCount); + } + + /// + /// vkGetSemaphoreCounterValue - Query the current state of a timeline semaphore + /// + /// + /// + /// :refpage: vkGetSemaphoreCounterValue + /// + /// + /// To query the current counter value of a semaphore created with a + /// VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE from the host, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetSemaphoreCounterValue( + this VulkanHandleWrapper handle, + VkSemaphore semaphore + ) + { + nint pValueLocal = default; + VkResult result = handle.PInvoke.vkGetSemaphoreCounterValue.Invoke(handle.Handle, semaphore, &pValueLocal); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pValueLocal; + } + + /// + /// vkWaitSemaphores - Wait for timeline semaphores on the host + /// + /// + /// + /// :refpage: vkWaitSemaphores + /// + /// + /// To wait for a set of semaphores created with a VkSemaphoreType of + /// VK_SEMAPHORE_TYPE_TIMELINE to reach particular counter values on the + /// host, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult WaitSemaphores( + this VulkanHandleWrapper handle, + in VkSemaphoreWaitInfo pWaitInfo, + nint timeout + ) + { + fixed (VkSemaphoreWaitInfo* pWaitInfoFixed = &pWaitInfo) + { + VkResult result = handle.PInvoke.vkWaitSemaphores.Invoke(handle.Handle, pWaitInfoFixed, timeout); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Timeout: + default: + break; + } + + return result; + } + } + + /// + /// vkSignalSemaphore - Signal a timeline semaphore on the host + /// + /// + /// + /// :refpage: vkSignalSemaphore + /// + /// + /// To signal a semaphore created with a VkSemaphoreType of + /// VK_SEMAPHORE_TYPE_TIMELINE with a particular counter value, on the + /// host, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SignalSemaphore( + this VulkanHandleWrapper handle, + in VkSemaphoreSignalInfo pSignalInfo + ) + { + fixed (VkSemaphoreSignalInfo* pSignalInfoFixed = &pSignalInfo) + { + VkResult result = handle.PInvoke.vkSignalSemaphore.Invoke(handle.Handle, pSignalInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetBufferDeviceAddress - Query an address of a buffer + /// + /// + /// + /// To query a 64-bit buffer device address value which can be used to identify + /// a buffer to API commands or through which buffer memory can be accessed, + /// call: + /// + /// + /// // Jon: 3-way conditional logic here is wrong + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceAddress GetBufferDeviceAddress( + this VulkanHandleWrapper handle, + in VkBufferDeviceAddressInfo pInfo + ) + { + fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetBufferDeviceAddress.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkGetBufferOpaqueCaptureAddress - Query an opaque capture address of a buffer + /// + /// + /// + /// To query a 64-bit buffer opaque capture address, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetBufferOpaqueCaptureAddress( + this VulkanHandleWrapper handle, + in VkBufferDeviceAddressInfo pInfo + ) + { + fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetBufferOpaqueCaptureAddress.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkGetDeviceMemoryOpaqueCaptureAddress - Query an opaque capture address of a memory object + /// + /// + /// + /// To query a 64-bit opaque capture address value from a memory object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetMemoryOpaqueCaptureAddress( + this VulkanHandleWrapper handle, + in VkDeviceMemoryOpaqueCaptureAddressInfo pInfo + ) + { + fixed (VkDeviceMemoryOpaqueCaptureAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetDeviceMemoryOpaqueCaptureAddress.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdDrawIndirectCount - Draw primitives with indirect parameters and draw count + /// + /// + /// + /// :refpage: vkCmdDrawIndirectCount + /// + /// + /// To record a non-indexed draw call with a draw call count sourced from a + /// buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndirectCount( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndirectCount.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// vkCmdDrawIndexedIndirectCount - Draw parameters with indirect parameters, indexed vertices, and draw count + /// + /// + /// + /// :refpage: vkCmdDrawIndexedIndirectCount + /// + /// + /// To record an indexed draw call with a draw call count sourced from a buffer, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndexedIndirectCount( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndexedIndirectCount.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// vkCreateRenderPass2 - Create a new render pass object + /// + /// + /// + /// :refpage: vkCreateRenderPass2 + /// :objectnameplural: render passes + /// :objectnamecamelcase: renderPass + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a render pass, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkRenderPass CreateRenderPass2( + this VulkanHandleWrapper handle, + in VkRenderPassCreateInfo2 pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkRenderPassCreateInfo2* pCreateInfoFixed = &pCreateInfo) + { + VkRenderPass pRenderPassLocal = default; + VkResult result = handle.PInvoke.vkCreateRenderPass2.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pRenderPassLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pRenderPassLocal; + } + } + + /// + /// vkCmdBeginRenderPass2 - Begin a new render pass + /// + /// + /// + /// To begin a render pass, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginRenderPass2( + this T handle, + VkRenderPassBeginInfo* pRenderPassBegin, + in VkSubpassBeginInfo pSubpassBeginInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) + { + handle.PInvoke.vkCmdBeginRenderPass2.Invoke(handle.Handle, pRenderPassBegin, pSubpassBeginInfoFixed); + } + } + + /// + /// vkCmdNextSubpass2 - Transition to the next subpass of a render pass + /// + /// + /// + /// To transition to the next subpass in the render pass instance after + /// recording the commands for a subpass, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NextSubpass2( + this T handle, + in VkSubpassBeginInfo pSubpassBeginInfo, + in VkSubpassEndInfo pSubpassEndInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) + fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) + { + handle.PInvoke.vkCmdNextSubpass2.Invoke(handle.Handle, pSubpassBeginInfoFixed, pSubpassEndInfoFixed); + } + } + + /// + /// vkCmdEndRenderPass2 - End the current render pass + /// + /// + /// + /// To record a command to end a render pass instance after recording the + /// commands for the last subpass, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndRenderPass2(this T handle, in VkSubpassEndInfo pSubpassEndInfo) + where T : VulkanHandleWrapper + { + fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) + { + handle.PInvoke.vkCmdEndRenderPass2.Invoke(handle.Handle, pSubpassEndInfoFixed); + } + } + + /// + /// vkCreatePrivateDataSlot - Create a slot for private data storage + /// + /// + /// + /// To create a private data slot, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPrivateDataSlot CreatePrivateDataSlot( + this VulkanHandleWrapper handle, + in VkPrivateDataSlotCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkPrivateDataSlotCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkPrivateDataSlot pPrivateDataSlotLocal = default; + VkResult result = handle.PInvoke.vkCreatePrivateDataSlot.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pPrivateDataSlotLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreatePrivateDataSlot failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreatePrivateDataSlot failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreatePrivateDataSlot failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pPrivateDataSlotLocal; + } + } + + /// + /// vkDestroyPrivateDataSlot - Destroy a private data slot + /// + /// + /// + /// To destroy a private data slot, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyPrivateDataSlot( + this VulkanHandleWrapper handle, + VkPrivateDataSlot privateDataSlot, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyPrivateDataSlot.Invoke(handle.Handle, privateDataSlot, pAllocator); + } + + /// + /// vkSetPrivateData - Associate data with a Vulkan object + /// + /// + /// + /// To store application-defined data in a slot associated with a Vulkan object, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPrivateData( + this VulkanHandleWrapper handle, + VkObjectType objectType, + nint objectHandle, + VkPrivateDataSlot privateDataSlot, + nint data + ) + { + VkResult result = handle.PInvoke.vkSetPrivateData.Invoke( + handle.Handle, + objectType, + objectHandle, + privateDataSlot, + data + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSetPrivateData failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetPrivateData failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetPrivateData failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetPrivateData - Retrieve data associated with a Vulkan object + /// + /// + /// + /// To retrieve application-defined data from a slot associated with a Vulkan + /// object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetPrivateData( + this VulkanHandleWrapper handle, + VkObjectType objectType, + nint objectHandle, + VkPrivateDataSlot privateDataSlot + ) + { + nint pDataLocal = default; + handle.PInvoke.vkGetPrivateData.Invoke( + handle.Handle, + objectType, + objectHandle, + privateDataSlot, + &pDataLocal + ); + return pDataLocal; + } + + /// + /// vkCmdPipelineBarrier2 - Insert a memory dependency + /// + /// + /// + /// :refpage: vkCmdPipelineBarrier2 + /// + /// + /// To record a pipeline barrier, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PipelineBarrier2(this T handle, in VkDependencyInfo pDependencyInfo) + where T : VulkanHandleWrapper + { + fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) + { + handle.PInvoke.vkCmdPipelineBarrier2.Invoke(handle.Handle, pDependencyInfoFixed); + } + } + + /// + /// vkCmdWriteTimestamp2 - Write a device timestamp into a query object + /// + /// + /// + /// :refpage: vkCmdWriteTimestamp2 + /// + /// + /// To request a timestamp and write the value to memory, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WriteTimestamp2( + this T handle, + VkPipelineStageFlags2 stage, + VkQueryPool queryPool, + int query + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdWriteTimestamp2.Invoke(handle.Handle, stage, queryPool, query); + } + + /// + /// vkQueueSubmit2 - Submits command buffers to a queue + /// + /// + /// + /// :refpage: vkQueueSubmit2KHR + /// + /// + /// To submit command buffers to a queue, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void Submit2Internal( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pSubmits, + VkFence fence + ) + { + fixed (VkSubmitInfo2* pSubmitsFixed = pSubmits) + { + VkResult result = handle.PInvoke.vkQueueSubmit2.Invoke( + handle.Handle, + pSubmits.Length, + pSubmitsFixed, + fence + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdCopyBuffer2 - Copy data between buffer regions + /// + /// + /// + /// :refpage: vkCmdCopyBuffer2 + /// + /// + /// To copy data between buffer objects, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBuffer2(this T handle, in VkCopyBufferInfo2 pCopyBufferInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyBufferInfo2* pCopyBufferInfoFixed = &pCopyBufferInfo) + { + handle.PInvoke.vkCmdCopyBuffer2.Invoke(handle.Handle, pCopyBufferInfoFixed); + } + } + + /// + /// vkCmdCopyImage2 - Copy data between images + /// + /// + /// + /// :refpage: vkCmdCopyImage2 + /// + /// + /// To copy data between image objects, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImage2(this T handle, in VkCopyImageInfo2 pCopyImageInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyImageInfo2* pCopyImageInfoFixed = &pCopyImageInfo) + { + handle.PInvoke.vkCmdCopyImage2.Invoke(handle.Handle, pCopyImageInfoFixed); + } + } + + /// + /// vkCmdCopyBufferToImage2 - Copy data from a buffer into an image + /// + /// + /// + /// :refpage: vkCmdCopyBufferToImage2 + /// + /// + /// To copy data from a buffer object to an image object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBufferToImage2( + this T handle, + in VkCopyBufferToImageInfo2 pCopyBufferToImageInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyBufferToImageInfo2* pCopyBufferToImageInfoFixed = &pCopyBufferToImageInfo) + { + handle.PInvoke.vkCmdCopyBufferToImage2.Invoke(handle.Handle, pCopyBufferToImageInfoFixed); + } + } + + /// + /// vkCmdCopyImageToBuffer2 - Copy image data into a buffer + /// + /// + /// + /// :refpage: vkCmdCopyImageToBuffer2 + /// + /// + /// To copy data from an image object to a buffer object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageToBuffer2( + this T handle, + in VkCopyImageToBufferInfo2 pCopyImageToBufferInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyImageToBufferInfo2* pCopyImageToBufferInfoFixed = &pCopyImageToBufferInfo) + { + handle.PInvoke.vkCmdCopyImageToBuffer2.Invoke(handle.Handle, pCopyImageToBufferInfoFixed); + } + } + + /// + /// vkGetDeviceBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for a buffer resource without creating + /// an object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferMemoryRequirements( + this VulkanHandleWrapper handle, + in VkDeviceBufferMemoryRequirements pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkDeviceBufferMemoryRequirements* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceBufferMemoryRequirements.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetBufferMemoryRequirements( + this VulkanHandleWrapper handle, + in VkDeviceBufferMemoryRequirements pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetBufferMemoryRequirements(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkGetDeviceImageMemoryRequirements - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for an image resource without creating + /// an object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageMemoryRequirements( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceImageMemoryRequirements.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetImageMemoryRequirements( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetImageMemoryRequirements(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkGetDeviceImageSparseMemoryRequirements - Query the memory requirements for a sparse image + /// + /// + /// + /// To determine the sparse memory requirements for an image resource without + /// creating an object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetImageSparseMemoryRequirements( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo, + ref int pSparseMemoryRequirementCount, + scoped ReadOnlySpan pSparseMemoryRequirements + ) + { + fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements) + fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) + fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount) + { + handle.PInvoke.vkGetDeviceImageSparseMemoryRequirements.Invoke( + handle.Handle, + pInfoFixed, + pSparseMemoryRequirementCountFixed, + pSparseMemoryRequirementsFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetImageSparseMemoryRequirements_Count( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo + ) + { + int pSparseMemoryRequirementCount = default; + GetImageSparseMemoryRequirements(handle, pInfo, ref pSparseMemoryRequirementCount, null); + return pSparseMemoryRequirementCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetImageSparseMemoryRequirements_Write( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo, + scoped ReadOnlySpan pSparseMemoryRequirements + ) + { + int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length; + GetImageSparseMemoryRequirements( + handle, + pInfo, + ref pSparseMemoryRequirementCount, + pSparseMemoryRequirements + ); + } + + /// + /// vkCmdSetEvent2 - Set an event object to signaled state + /// + /// + /// + /// To signal an event from a device, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetEvent2(this T handle, VkEvent @event, in VkDependencyInfo pDependencyInfo) + where T : VulkanHandleWrapper + { + fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) + { + handle.PInvoke.vkCmdSetEvent2.Invoke(handle.Handle, @event, pDependencyInfoFixed); + } + } + + /// + /// vkCmdResetEvent2 - Reset an event object to non-signaled state + /// + /// + /// + /// :refpage: vkCmdResetEvent2 + /// + /// + /// To unsignal the event from a device, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetEvent2(this T handle, VkEvent @event, VkPipelineStageFlags2 stageMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdResetEvent2.Invoke(handle.Handle, @event, stageMask); + } + + /// + /// vkCmdWaitEvents2 - Wait for one or more events + /// + /// + /// + /// :refpage: vkCmdWaitEvents2 + /// + /// + /// To wait for one or more events to enter the signaled state on a device, + /// call: + /// + /// + /// [[synchronization-events-waiting-device]] + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WaitEvents2( + this T handle, + scoped ReadOnlySpan pEvents, + scoped ReadOnlySpan pDependencyInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkDependencyInfo* pDependencyInfosFixed = pDependencyInfos) + fixed (VkEvent* pEventsFixed = pEvents) + { + handle.PInvoke.vkCmdWaitEvents2.Invoke( + handle.Handle, + pEvents.Length, + pEventsFixed, + pDependencyInfosFixed + ); + } + } + + /// + /// vkCmdBlitImage2 - Copy regions of an image, potentially performing format conversion, + /// + /// + /// + /// :refpage: vkCmdBlitImage2 + /// + /// + /// To copy regions of a source image into a destination image, potentially + /// performing format conversion, arbitrary scaling, and filtering, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlitImage2(this T handle, in VkBlitImageInfo2 pBlitImageInfo) + where T : VulkanHandleWrapper + { + fixed (VkBlitImageInfo2* pBlitImageInfoFixed = &pBlitImageInfo) + { + handle.PInvoke.vkCmdBlitImage2.Invoke(handle.Handle, pBlitImageInfoFixed); + } + } + + /// + /// vkCmdResolveImage2 - Resolve regions of an image + /// + /// + /// + /// :refpage: vkCmdResolveImage2 + /// + /// + /// To resolve a multisample image to a non-multisample image, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ResolveImage2(this T handle, in VkResolveImageInfo2 pResolveImageInfo) + where T : VulkanHandleWrapper + { + fixed (VkResolveImageInfo2* pResolveImageInfoFixed = &pResolveImageInfo) + { + handle.PInvoke.vkCmdResolveImage2.Invoke(handle.Handle, pResolveImageInfoFixed); + } + } + + /// + /// vkCmdBeginRendering - Begin a dynamic render pass instance + /// + /// + /// + /// To begin a render pass instance, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginRendering(this T handle, in VkRenderingInfo pRenderingInfo) + where T : VulkanHandleWrapper + { + fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo) + { + handle.PInvoke.vkCmdBeginRendering.Invoke(handle.Handle, pRenderingInfoFixed); + } + } + + /// + /// vkCmdEndRendering - End a dynamic render pass instance + /// + /// + /// + /// To end a render pass instance, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndRendering(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndRendering.Invoke(handle.Handle); + } + + /// + /// vkCmdSetCullMode - Set cull mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the cull mode, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCullMode(this T handle, VkCullModeFlags cullMode) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCullMode.Invoke(handle.Handle, cullMode); + } + + /// + /// vkCmdSetFrontFace - Set front face orientation dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the front face orientation, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFrontFace(this T handle, VkFrontFace frontFace) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetFrontFace.Invoke(handle.Handle, frontFace); + } + + /// + /// vkCmdSetPrimitiveTopology - Set primitive topology state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ primitive topology, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPrimitiveTopology(this T handle, VkPrimitiveTopology primitiveTopology) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPrimitiveTopology.Invoke(handle.Handle, primitiveTopology); + } + + /// + /// vkCmdSetViewportWithCount - Set the viewport count and viewports dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the viewport count and + /// viewports, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetViewportWithCount(this T handle, scoped ReadOnlySpan pViewports) + where T : VulkanHandleWrapper + { + fixed (VkViewport* pViewportsFixed = pViewports) + { + handle.PInvoke.vkCmdSetViewportWithCount.Invoke(handle.Handle, pViewports.Length, pViewportsFixed); + } + } + + /// + /// vkCmdSetScissorWithCount - Set the scissor count and scissor rectangular bounds dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the scissor count and + /// scissor rectangular bounds, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetScissorWithCount(this T handle, scoped ReadOnlySpan pScissors) + where T : VulkanHandleWrapper + { + fixed (VkRect2D* pScissorsFixed = pScissors) + { + handle.PInvoke.vkCmdSetScissorWithCount.Invoke(handle.Handle, pScissors.Length, pScissorsFixed); + } + } + + /// + /// vkCmdBindVertexBuffers2 - Bind vertex buffers to a command buffer and dynamically set strides + /// + /// + /// + /// To bind vertex buffers, along with their sizes and strides, to a command + /// buffer for use in subsequent drawing commands, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVertexBuffers2( + this T handle, + int firstBinding, + scoped ReadOnlySpan pBuffers, + scoped ReadOnlySpan pOffsets, + scoped ReadOnlySpan pSizes, + scoped ReadOnlySpan pStrides + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize64* pStridesFixed = pStrides) + fixed (ByteSize64* pSizesFixed = pSizes) + fixed (ByteSize64* pOffsetsFixed = pOffsets) + fixed (VkBuffer* pBuffersFixed = pBuffers) + { + handle.PInvoke.vkCmdBindVertexBuffers2.Invoke( + handle.Handle, + firstBinding, + pBuffers.Length, + pBuffersFixed, + pOffsetsFixed, + pSizesFixed, + pStridesFixed + ); + } + } + + /// + /// vkCmdSetDepthTestEnable - Set depth test enable dynamically for a command buffer + /// + /// + /// + /// To dynamically enable or disable^ the depth + /// test, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthTestEnable(this T handle, Brutal.Bool32 depthTestEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthTestEnable.Invoke(handle.Handle, depthTestEnable); + } + + /// + /// vkCmdSetDepthWriteEnable - Set depth write enable dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the depth write enable, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthWriteEnable(this T handle, Brutal.Bool32 depthWriteEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthWriteEnable.Invoke(handle.Handle, depthWriteEnable); + } + + /// + /// vkCmdSetDepthCompareOp - Set depth comparison operator dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the depth compare operator, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthCompareOp(this T handle, VkCompareOp depthCompareOp) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthCompareOp.Invoke(handle.Handle, depthCompareOp); + } + + /// + /// vkCmdSetDepthBoundsTestEnable - Set depth bounds test enable dynamically for a command buffer + /// + /// + /// + /// To dynamically enable or disable^ the depth + /// bounds test, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthBoundsTestEnable(this T handle, Brutal.Bool32 depthBoundsTestEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthBoundsTestEnable.Invoke(handle.Handle, depthBoundsTestEnable); + } + + /// + /// vkCmdSetStencilTestEnable - Set stencil test enable dynamically for a command buffer + /// + /// + /// + /// To dynamically enable or disable^ the stencil + /// test, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilTestEnable(this T handle, Brutal.Bool32 stencilTestEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilTestEnable.Invoke(handle.Handle, stencilTestEnable); + } + + /// + /// vkCmdSetStencilOp - Set stencil operation dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the stencil operation, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilOp( + this T handle, + VkStencilFaceFlags faceMask, + VkStencilOp failOp, + VkStencilOp passOp, + VkStencilOp depthFailOp, + VkCompareOp compareOp + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilOp.Invoke(handle.Handle, faceMask, failOp, passOp, depthFailOp, compareOp); + } + + /// + /// vkCmdSetRasterizerDiscardEnable - Control whether primitives are discarded before the rasterization stage dynamically for a command buffer + /// + /// + /// + /// To dynamically enable^ whether primitives are + /// discarded before the rasterization stage, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRasterizerDiscardEnable(this T handle, Brutal.Bool32 rasterizerDiscardEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetRasterizerDiscardEnable.Invoke(handle.Handle, rasterizerDiscardEnable); + } + + /// + /// vkCmdSetDepthBiasEnable - Control whether to bias fragment depth values dynamically for a command buffer + /// + /// + /// + /// To dynamically enable^ whether to bias fragment + /// depth values, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthBiasEnable(this T handle, Brutal.Bool32 depthBiasEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthBiasEnable.Invoke(handle.Handle, depthBiasEnable); + } + + /// + /// vkCmdSetPrimitiveRestartEnable - Set primitive assembly restart state dynamically for a command buffer + /// + /// + /// + /// To dynamically control^ whether a special vertex + /// index value is treated as restarting the assembly of primitives, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPrimitiveRestartEnable(this T handle, Brutal.Bool32 primitiveRestartEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPrimitiveRestartEnable.Invoke(handle.Handle, primitiveRestartEnable); + } + + /// + /// vkMapMemory2 - Map a memory object into application address space + /// + /// + /// + /// To retrieve a host virtual address pointer to a region of a mappable memory + /// object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MapMemory2( + this VulkanHandleWrapper handle, + in VkMemoryMapInfo pMemoryMapInfo, + void** ppData + ) + { + fixed (VkMemoryMapInfo* pMemoryMapInfoFixed = &pMemoryMapInfo) + { + VkResult result = handle.PInvoke.vkMapMemory2.Invoke(handle.Handle, pMemoryMapInfoFixed, ppData); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkUnmapMemory2 - Unmap a previously mapped memory object + /// + /// + /// + /// To unmap a memory object once host access to it is no longer needed by the + /// application, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UnmapMemory2( + this VulkanHandleWrapper handle, + in VkMemoryUnmapInfo pMemoryUnmapInfo + ) + { + fixed (VkMemoryUnmapInfo* pMemoryUnmapInfoFixed = &pMemoryUnmapInfo) + { + VkResult result = handle.PInvoke.vkUnmapMemory2.Invoke(handle.Handle, pMemoryUnmapInfoFixed); + switch (result) + { + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkUnmapMemory2 failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkUnmapMemory2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkUnmapMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetDeviceImageSubresourceLayout - Retrieve information about an image subresource without an image object + /// + /// + /// + /// To query the memory layout of an image subresource, without an image object, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSubresourceLayout( + this VulkanHandleWrapper handle, + in VkDeviceImageSubresourceInfo pInfo, + ref VkSubresourceLayout2 pLayout + ) + { + fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) + fixed (VkDeviceImageSubresourceInfo* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceImageSubresourceLayout.Invoke(handle.Handle, pInfoFixed, pLayoutFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSubresourceLayout2. + public static VkSubresourceLayout2 GetImageSubresourceLayout( + this VulkanHandleWrapper handle, + in VkDeviceImageSubresourceInfo pInfo + ) + { + VkSubresourceLayout2 outValue = new(); + GetImageSubresourceLayout(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkGetImageSubresourceLayout2 - Retrieve information about an image subresource + /// + /// + /// + /// :refpage: vkGetImageSubresourceLayout2 + /// + /// + /// To query the memory layout of an image subresource, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSubresourceLayout2( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource2* pSubresource, + ref VkSubresourceLayout2 pLayout + ) + { + fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) + { + handle.PInvoke.vkGetImageSubresourceLayout2.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSubresourceLayout2. + public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource2* pSubresource + ) + { + VkSubresourceLayout2 outValue = new(); + GetImageSubresourceLayout2(handle, image, pSubresource, ref outValue); + return outValue; + } + + /// + /// vkCopyMemoryToImage - Copy data from host memory into an image + /// + /// + /// + /// :refpage: vkCopyMemoryToImage + /// + /// + /// To copy data from host memory to an image object, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryToImage( + this VulkanHandleWrapper handle, + in VkCopyMemoryToImageInfo pCopyMemoryToImageInfo + ) + { + fixed (VkCopyMemoryToImageInfo* pCopyMemoryToImageInfoFixed = &pCopyMemoryToImageInfo) + { + VkResult result = handle.PInvoke.vkCopyMemoryToImage.Invoke(handle.Handle, pCopyMemoryToImageInfoFixed); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCopyImageToMemory - Copy image data into host memory + /// + /// + /// + /// :refpage: vkCopyImageToMemory + /// + /// + /// To copy data from an image object to host memory, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageToMemory( + this VulkanHandleWrapper handle, + in VkCopyImageToMemoryInfo pCopyImageToMemoryInfo + ) + { + fixed (VkCopyImageToMemoryInfo* pCopyImageToMemoryInfoFixed = &pCopyImageToMemoryInfo) + { + VkResult result = handle.PInvoke.vkCopyImageToMemory.Invoke(handle.Handle, pCopyImageToMemoryInfoFixed); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCopyImageToImage - Copy image data using the host + /// + /// + /// + /// :refpage: vkCopyImageToImage + /// + /// + /// To copy data from an image object to another image object using the host, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageToImage( + this VulkanHandleWrapper handle, + in VkCopyImageToImageInfo pCopyImageToImageInfo + ) + { + fixed (VkCopyImageToImageInfo* pCopyImageToImageInfoFixed = &pCopyImageToImageInfo) + { + VkResult result = handle.PInvoke.vkCopyImageToImage.Invoke(handle.Handle, pCopyImageToImageInfoFixed); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkTransitionImageLayout - Perform an image layout transition on the host + /// + /// + /// + /// To perform an image layout transition on the host, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TransitionImageLayout( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pTransitions + ) + { + fixed (VkHostImageLayoutTransitionInfo* pTransitionsFixed = pTransitions) + { + VkResult result = handle.PInvoke.vkTransitionImageLayout.Invoke( + handle.Handle, + pTransitions.Length, + pTransitionsFixed + ); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorMemoryMapFailed: + throw new VkResultError( + VkResult.ErrorMemoryMapFailed, + "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_MEMORY_MAP_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdPushDescriptorSet - Pushes descriptor updates into a command buffer + /// + /// + /// + /// :refpage: vkCmdPushDescriptorSet + /// + /// + /// To push descriptor updates into a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSet( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + int set, + scoped ReadOnlySpan pDescriptorWrites + ) + where T : VulkanHandleWrapper + { + fixed (VkWriteDescriptorSet* pDescriptorWritesFixed = pDescriptorWrites) + { + handle.PInvoke.vkCmdPushDescriptorSet.Invoke( + handle.Handle, + pipelineBindPoint, + layout, + set, + pDescriptorWrites.Length, + pDescriptorWritesFixed + ); + } + } + + /// + /// vkCmdPushDescriptorSetWithTemplate - Pushes descriptor updates into a command buffer using a descriptor update template + /// + /// + /// + /// :refpage: vkCmdPushDescriptorSetWithTemplate + /// + /// + /// To use a descriptor update template to specify the push descriptors to + /// update in a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSetWithTemplate( + this T handle, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, + int set, + void* pData + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdPushDescriptorSetWithTemplate.Invoke( + handle.Handle, + descriptorUpdateTemplate, + layout, + set, + pData + ); + } + + /// + /// vkCmdBindDescriptorSets2 - Binds descriptor sets to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindDescriptorSets2 + /// + /// + /// To bind one or more descriptor sets to a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDescriptorSets2( + this T handle, + in VkBindDescriptorSetsInfo pBindDescriptorSetsInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkBindDescriptorSetsInfo* pBindDescriptorSetsInfoFixed = &pBindDescriptorSetsInfo) + { + handle.PInvoke.vkCmdBindDescriptorSets2.Invoke(handle.Handle, pBindDescriptorSetsInfoFixed); + } + } + + /// + /// vkCmdPushConstants2 - Update the values of push constants + /// + /// + /// + /// :refpage: vkCmdPushConstants2 + /// + /// + /// To update push constants, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushConstants2(this T handle, in VkPushConstantsInfo pPushConstantsInfo) + where T : VulkanHandleWrapper + { + fixed (VkPushConstantsInfo* pPushConstantsInfoFixed = &pPushConstantsInfo) + { + handle.PInvoke.vkCmdPushConstants2.Invoke(handle.Handle, pPushConstantsInfoFixed); + } + } + + /// + /// vkCmdPushDescriptorSet2 - Pushes descriptor updates into a command buffer + /// + /// + /// + /// :refpage: vkCmdPushDescriptorSet2 + /// + /// + /// To push descriptor updates into a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSet2( + this T handle, + in VkPushDescriptorSetInfo pPushDescriptorSetInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkPushDescriptorSetInfo* pPushDescriptorSetInfoFixed = &pPushDescriptorSetInfo) + { + handle.PInvoke.vkCmdPushDescriptorSet2.Invoke(handle.Handle, pPushDescriptorSetInfoFixed); + } + } + + /// + /// vkCmdPushDescriptorSetWithTemplate2 - Pushes descriptor updates into a command buffer using a descriptor update template + /// + /// + /// + /// :refpage: vkCmdPushDescriptorSetWithTemplate2 + /// + /// + /// To use a descriptor update template to specify the push descriptors to + /// update in a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSetWithTemplate2( + this T handle, + in VkPushDescriptorSetWithTemplateInfo pPushDescriptorSetWithTemplateInfo + ) + where T : VulkanHandleWrapper + { + fixed ( + VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfoFixed = + &pPushDescriptorSetWithTemplateInfo + ) + { + handle.PInvoke.vkCmdPushDescriptorSetWithTemplate2.Invoke( + handle.Handle, + pPushDescriptorSetWithTemplateInfoFixed + ); + } + } + + /// + /// vkCmdSetLineStipple - Set line stipple dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the line stipple state, + /// call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLineStipple(this T handle, int lineStippleFactor, ushort lineStipplePattern) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLineStipple.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern); + } + + /// + /// vkCmdBindIndexBuffer2 - Bind an index buffer to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindIndexBuffer2 + /// + /// + /// To bind an index buffer, along with its size, to a command buffer, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindIndexBuffer2( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + ByteSize64 size, + VkIndexType indexType + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindIndexBuffer2.Invoke(handle.Handle, buffer, offset, size, indexType); + } + + /// + /// vkGetRenderingAreaGranularity - Returns the granularity for dynamic rendering optimal render area + /// + /// + /// + /// To query the render area granularity for a render pass instance, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRenderingAreaGranularity( + this VulkanHandleWrapper handle, + in VkRenderingAreaInfo pRenderingAreaInfo, + ref VkExtent2D pGranularity + ) + { + fixed (VkExtent2D* pGranularityFixed = &pGranularity) + fixed (VkRenderingAreaInfo* pRenderingAreaInfoFixed = &pRenderingAreaInfo) + { + handle.PInvoke.vkGetRenderingAreaGranularity.Invoke( + handle.Handle, + pRenderingAreaInfoFixed, + pGranularityFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExtent2D. + public static VkExtent2D GetRenderingAreaGranularity( + this VulkanHandleWrapper handle, + in VkRenderingAreaInfo pRenderingAreaInfo + ) + { + VkExtent2D outValue = new(); + GetRenderingAreaGranularity(handle, pRenderingAreaInfo, ref outValue); + return outValue; + } + + /// + /// vkCmdSetRenderingAttachmentLocations - Set color attachment location mappings for a command buffer + /// + /// + /// + /// To set the fragment output location mappings during rendering, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetRenderingAttachmentLocations( + this T handle, + in VkRenderingAttachmentLocationInfo pLocationInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkRenderingAttachmentLocationInfo* pLocationInfoFixed = &pLocationInfo) + { + handle.PInvoke.vkCmdSetRenderingAttachmentLocations.Invoke(handle.Handle, pLocationInfoFixed); + } + } + + /// + /// vkCmdSetRenderingInputAttachmentIndices - Set input attachment index mappings for a command buffer + /// + /// + /// + /// To set the input attachment index mappings during dynamic rendering, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetRenderingInputAttachmentIndices( + this T handle, + in VkRenderingInputAttachmentIndexInfo pInputAttachmentIndexInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfoFixed = &pInputAttachmentIndexInfo) + { + handle.PInvoke.vkCmdSetRenderingInputAttachmentIndices.Invoke( + handle.Handle, + pInputAttachmentIndexInfoFixed + ); + } + } + + /// + /// vkCreateSwapchainKHR - Create a swapchain + /// + /// + /// + /// :refpage: vkCreateSwapchainKHR + /// :objectnameplural: swapchains + /// :objectnamecamelcase: swapchain + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a swapchain, call: + /// + /// + /// // Provided by VK_KHR_swapchain + /// VkResult vkCreateSwapchainKHR( + /// VkDevice device, + /// const VkSwapchainCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSwapchainKHR* pSwapchain); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkSwapchainKHR CreateSwapchainKHR( + this VulkanHandleWrapper handle, + in VkSwapchainCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkSwapchainCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSwapchainKHR pSwapchainLocal = default; + VkResult result = handle.PInvoke.vkCreateSwapchainKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSwapchainLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorNativeWindowInUseKHR: + throw new VkResultError( + VkResult.ErrorNativeWindowInUseKHR, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_NATIVE_WINDOW_IN_USE_KHR" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorCompressionExhaustedEXT: + throw new VkResultError( + VkResult.ErrorCompressionExhaustedEXT, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_COMPRESSION_EXHAUSTED_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSwapchainLocal; + } + } + + /// + /// vkDestroySwapchainKHR - Destroy a swapchain object + /// + /// + /// + /// To destroy a swapchain object call: + /// + /// + /// // Provided by VK_KHR_swapchain + /// void vkDestroySwapchainKHR( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroySwapchainKHR( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroySwapchainKHR.Invoke(handle.Handle, swapchain, pAllocator); + } + + /// + /// vkGetSwapchainImagesKHR - Obtain the array of presentable images associated with a swapchain + /// + /// + /// + /// :refpage: vkGetSwapchainImagesKHR + /// + /// + /// To obtain the array of presentable images associated with a swapchain, call: + /// + /// + /// // Provided by VK_KHR_swapchain + /// VkResult vkGetSwapchainImagesKHR( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// uint32_t* pSwapchainImageCount, + /// VkImage* pSwapchainImages); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetSwapchainImagesKHR( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + ref int pSwapchainImageCount, + scoped ReadOnlySpan pSwapchainImages + ) + { + fixed (VkImage* pSwapchainImagesFixed = pSwapchainImages) + fixed (int* pSwapchainImageCountFixed = &pSwapchainImageCount) + { + VkResult result = handle.PInvoke.vkGetSwapchainImagesKHR.Invoke( + handle.Handle, + swapchain, + pSwapchainImageCountFixed, + pSwapchainImagesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetSwapchainImagesKHR_Count( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain + ) + { + int pSwapchainImageCount = default; + GetSwapchainImagesKHR(handle, swapchain, ref pSwapchainImageCount, null); + return pSwapchainImageCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetSwapchainImagesKHR_Write( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + scoped ReadOnlySpan pSwapchainImages + ) + { + int pSwapchainImageCount = pSwapchainImages.Length; + return GetSwapchainImagesKHR(handle, swapchain, ref pSwapchainImageCount, pSwapchainImages); + } + + /// + /// vkAcquireNextImageKHR - Retrieve the index of the next available presentable image + /// + /// + /// + /// :refpage: vkAcquireNextImageKHR + /// + /// + /// To acquire an available presentable image to use, and retrieve the index of + /// that image, call: + /// + /// + /// // Provided by VK_KHR_swapchain + /// VkResult vkAcquireNextImageKHR( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// uint64_t timeout, + /// VkSemaphore semaphore, + /// VkFence fence, + /// uint32_t* pImageIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult AcquireNextImageKHR( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + nint timeout, + VkSemaphore semaphore, + VkFence fence, + out int pImageIndex + ) + { + int pImageIndexLocal = default; + VkResult result = handle.PInvoke.vkAcquireNextImageKHR.Invoke( + handle.Handle, + swapchain, + timeout, + semaphore, + fence, + &pImageIndexLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorFullScreenExclusiveModeLostEXT: + throw new VkResultError( + VkResult.ErrorFullScreenExclusiveModeLostEXT, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Timeout: + case VkResult.NotReady: + case VkResult.SuboptimalKHR: + default: + break; + } + + pImageIndex = pImageIndexLocal; + return result; + } + + /// + /// vkQueuePresentKHR - Queue an image for presentation + /// + /// + /// + /// :refpage: vkQueuePresentKHR + /// + /// + /// After queueing all rendering commands and transitioning the image to the + /// correct layout, to queue an image for presentation, call: + /// + /// + /// // Provided by VK_KHR_swapchain + /// VkResult vkQueuePresentKHR( + /// VkQueue queue, + /// const VkPresentInfoKHR* pPresentInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe VkResult PresentKHRInternal( + this VulkanHandleWrapper handle, + in VkPresentInfoKHR pPresentInfo + ) + { + fixed (VkPresentInfoKHR* pPresentInfoFixed = &pPresentInfo) + { + VkResult result = handle.PInvoke.vkQueuePresentKHR.Invoke(handle.Handle, pPresentInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorFullScreenExclusiveModeLostEXT: + throw new VkResultError( + VkResult.ErrorFullScreenExclusiveModeLostEXT, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.ErrorPresentTimingQueueFullEXT: + throw new VkResultError( + VkResult.ErrorPresentTimingQueueFullEXT, + "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT" + ); + case VkResult.Success: + case VkResult.SuboptimalKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkGetDeviceGroupPresentCapabilitiesKHR - Query present capabilities from other physical devices + /// + /// + /// + /// :refpage: vkGetDeviceGroupPresentCapabilitiesKHR + /// + /// + /// A logical device that represents multiple physical devices may: support + /// presenting from images on more than one physical device, or combining images + /// from multiple physical devices. + /// + /// + /// To query these capabilities, call: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface + /// VkResult vkGetDeviceGroupPresentCapabilitiesKHR( + /// VkDevice device, + /// VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetGroupPresentCapabilitiesKHR( + this VulkanHandleWrapper handle, + ref VkDeviceGroupPresentCapabilitiesKHR pDeviceGroupPresentCapabilities + ) + { + fixed ( + VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilitiesFixed = + &pDeviceGroupPresentCapabilities + ) + { + VkResult result = handle.PInvoke.vkGetDeviceGroupPresentCapabilitiesKHR.Invoke( + handle.Handle, + pDeviceGroupPresentCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkDeviceGroupPresentCapabilitiesKHR. + public static VkDeviceGroupPresentCapabilitiesKHR GetGroupPresentCapabilitiesKHR( + this VulkanHandleWrapper handle + ) + { + VkDeviceGroupPresentCapabilitiesKHR outValue = new(); + GetGroupPresentCapabilitiesKHR(handle, ref outValue); + return outValue; + } + + /// + /// vkGetDeviceGroupSurfacePresentModesKHR - Query present capabilities for a surface + /// + /// + /// + /// :refpage: vkGetDeviceGroupSurfacePresentModesKHR + /// + /// + /// Some surfaces may: not be capable of using all the device group present + /// modes. + /// + /// + /// To query the supported device group present modes for a particular surface, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface + /// VkResult vkGetDeviceGroupSurfacePresentModesKHR( + /// VkDevice device, + /// VkSurfaceKHR surface, + /// VkDeviceGroupPresentModeFlagsKHR* pModes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceGroupPresentModeFlagsKHR GetGroupSurfacePresentModesKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface + ) + { + VkDeviceGroupPresentModeFlagsKHR pModesLocal = default; + VkResult result = handle.PInvoke.vkGetDeviceGroupSurfacePresentModesKHR.Invoke( + handle.Handle, + surface, + &pModesLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pModesLocal; + } + + /// + /// vkAcquireNextImage2KHR - Retrieve the index of the next available presentable image + /// + /// + /// + /// :refpage: vkAcquireNextImage2KHR + /// + /// + /// To acquire an available presentable image to use, and retrieve the index of + /// that image, call: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// VkResult vkAcquireNextImage2KHR( + /// VkDevice device, + /// const VkAcquireNextImageInfoKHR* pAcquireInfo, + /// uint32_t* pImageIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult AcquireNextImage2KHR( + this VulkanHandleWrapper handle, + in VkAcquireNextImageInfoKHR pAcquireInfo, + out int pImageIndex + ) + { + fixed (VkAcquireNextImageInfoKHR* pAcquireInfoFixed = &pAcquireInfo) + { + int pImageIndexLocal = default; + VkResult result = handle.PInvoke.vkAcquireNextImage2KHR.Invoke( + handle.Handle, + pAcquireInfoFixed, + &pImageIndexLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorFullScreenExclusiveModeLostEXT: + throw new VkResultError( + VkResult.ErrorFullScreenExclusiveModeLostEXT, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Timeout: + case VkResult.NotReady: + case VkResult.SuboptimalKHR: + default: + break; + } + + pImageIndex = pImageIndexLocal; + return result; + } + } + + /// + /// vkCreateSharedSwapchainsKHR - Create multiple swapchains that share presentable images + /// + /// + /// + /// :refpage: vkCreateSharedSwapchainsKHR + /// :objectnameplural: swapchains + /// :objectnamecamelcase: swapchain + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: swapchainCount + /// + /// + /// When the `VK_KHR_display_swapchain` extension is enabled, multiple + /// swapchains that share presentable images are created by calling: + /// + /// + /// // Provided by VK_KHR_display_swapchain + /// VkResult vkCreateSharedSwapchainsKHR( + /// VkDevice device, + /// uint32_t swapchainCount, + /// const VkSwapchainCreateInfoKHR* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkSwapchainKHR* pSwapchains); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CreateSharedSwapchainsKHR( + this VulkanHandleWrapper handle, + VkSwapchainCreateInfoKHR* pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pSwapchains + ) + { + fixed (VkSwapchainKHR* pSwapchainsFixed = pSwapchains) + { + VkResult result = handle.PInvoke.vkCreateSharedSwapchainsKHR.Invoke( + handle.Handle, + pSwapchains.Length, + pCreateInfos, + pAllocator, + pSwapchainsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorIncompatibleDisplayKHR: + throw new VkResultError( + VkResult.ErrorIncompatibleDisplayKHR, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_INCOMPATIBLE_DISPLAY_KHR" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCreateVideoSessionKHR - Creates a video session object + /// + /// + /// + /// To create a video session object, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkCreateVideoSessionKHR( + /// VkDevice device, + /// const VkVideoSessionCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkVideoSessionKHR* pVideoSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkVideoSessionKHR CreateVideoSessionKHR( + this VulkanHandleWrapper handle, + in VkVideoSessionCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkVideoSessionCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkVideoSessionKHR pVideoSessionLocal = default; + VkResult result = handle.PInvoke.vkCreateVideoSessionKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pVideoSessionLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorVideoStdVersionNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoStdVersionNotSupportedKHR, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorInvalidVideoStdParametersKHR: + throw new VkResultError( + VkResult.ErrorInvalidVideoStdParametersKHR, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pVideoSessionLocal; + } + } + + /// + /// vkDestroyVideoSessionKHR - Destroy video session object + /// + /// + /// + /// To destroy a video session, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// void vkDestroyVideoSessionKHR( + /// VkDevice device, + /// VkVideoSessionKHR videoSession, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyVideoSessionKHR( + this VulkanHandleWrapper handle, + VkVideoSessionKHR videoSession, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyVideoSessionKHR.Invoke(handle.Handle, videoSession, pAllocator); + } + + /// + /// vkGetVideoSessionMemoryRequirementsKHR - Get the memory requirements for a video session + /// + /// + /// + /// To determine the memory requirements for a video session object, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkGetVideoSessionMemoryRequirementsKHR( + /// VkDevice device, + /// VkVideoSessionKHR videoSession, + /// uint32_t* pMemoryRequirementsCount, + /// VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetVideoSessionMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + VkVideoSessionKHR videoSession, + ref int pMemoryRequirementsCount, + scoped ReadOnlySpan pMemoryRequirements + ) + { + fixed (VkVideoSessionMemoryRequirementsKHR* pMemoryRequirementsFixed = pMemoryRequirements) + fixed (int* pMemoryRequirementsCountFixed = &pMemoryRequirementsCount) + { + VkResult result = handle.PInvoke.vkGetVideoSessionMemoryRequirementsKHR.Invoke( + handle.Handle, + videoSession, + pMemoryRequirementsCountFixed, + pMemoryRequirementsFixed + ); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetVideoSessionMemoryRequirementsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetVideoSessionMemoryRequirementsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetVideoSessionMemoryRequirementsKHR_Count( + this VulkanHandleWrapper handle, + VkVideoSessionKHR videoSession + ) + { + int pMemoryRequirementsCount = default; + GetVideoSessionMemoryRequirementsKHR(handle, videoSession, ref pMemoryRequirementsCount, null); + return pMemoryRequirementsCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetVideoSessionMemoryRequirementsKHR_Write( + this VulkanHandleWrapper handle, + VkVideoSessionKHR videoSession, + scoped ReadOnlySpan pMemoryRequirements + ) + { + int pMemoryRequirementsCount = pMemoryRequirements.Length; + return GetVideoSessionMemoryRequirementsKHR( + handle, + videoSession, + ref pMemoryRequirementsCount, + pMemoryRequirements + ); + } + + /// + /// vkBindVideoSessionMemoryKHR - Bind Video Memory + /// + /// + /// + /// To attach memory to a video session object, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkBindVideoSessionMemoryKHR( + /// VkDevice device, + /// VkVideoSessionKHR videoSession, + /// uint32_t bindSessionMemoryInfoCount, + /// const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVideoSessionMemoryKHR( + this VulkanHandleWrapper handle, + VkVideoSessionKHR videoSession, + scoped ReadOnlySpan pBindSessionMemoryInfos + ) + { + fixed (VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfosFixed = pBindSessionMemoryInfos) + { + VkResult result = handle.PInvoke.vkBindVideoSessionMemoryKHR.Invoke( + handle.Handle, + videoSession, + pBindSessionMemoryInfos.Length, + pBindSessionMemoryInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCreateVideoSessionParametersKHR - Creates video session parameters object + /// + /// + /// + /// To create a video session parameters object, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkCreateVideoSessionParametersKHR( + /// VkDevice device, + /// const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkVideoSessionParametersKHR* pVideoSessionParameters); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkVideoSessionParametersKHR CreateVideoSessionParametersKHR( + this VulkanHandleWrapper handle, + in VkVideoSessionParametersCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkVideoSessionParametersCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkVideoSessionParametersKHR pVideoSessionParametersLocal = default; + VkResult result = handle.PInvoke.vkCreateVideoSessionParametersKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pVideoSessionParametersLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorInvalidVideoStdParametersKHR: + throw new VkResultError( + VkResult.ErrorInvalidVideoStdParametersKHR, + "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pVideoSessionParametersLocal; + } + } + + /// + /// vkUpdateVideoSessionParametersKHR - Update video session parameters object + /// + /// + /// + /// To update video session parameters object with new parameters, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkUpdateVideoSessionParametersKHR( + /// VkDevice device, + /// VkVideoSessionParametersKHR videoSessionParameters, + /// const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateVideoSessionParametersKHR( + this VulkanHandleWrapper handle, + VkVideoSessionParametersKHR videoSessionParameters, + in VkVideoSessionParametersUpdateInfoKHR pUpdateInfo + ) + { + fixed (VkVideoSessionParametersUpdateInfoKHR* pUpdateInfoFixed = &pUpdateInfo) + { + VkResult result = handle.PInvoke.vkUpdateVideoSessionParametersKHR.Invoke( + handle.Handle, + videoSessionParameters, + pUpdateInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidVideoStdParametersKHR: + throw new VkResultError( + VkResult.ErrorInvalidVideoStdParametersKHR, + "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkDestroyVideoSessionParametersKHR - Destroy video session parameters object + /// + /// + /// + /// To destroy a video session parameters object, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// void vkDestroyVideoSessionParametersKHR( + /// VkDevice device, + /// VkVideoSessionParametersKHR videoSessionParameters, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyVideoSessionParametersKHR( + this VulkanHandleWrapper handle, + VkVideoSessionParametersKHR videoSessionParameters, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyVideoSessionParametersKHR.Invoke(handle.Handle, videoSessionParameters, pAllocator); + } + + /// + /// vkCmdBeginVideoCodingKHR - Begin video coding scope + /// + /// + /// + /// To begin a video coding scope, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// void vkCmdBeginVideoCodingKHR( + /// VkCommandBuffer commandBuffer, + /// const VkVideoBeginCodingInfoKHR* pBeginInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginVideoCodingKHR(this T handle, in VkVideoBeginCodingInfoKHR pBeginInfo) + where T : VulkanHandleWrapper + { + fixed (VkVideoBeginCodingInfoKHR* pBeginInfoFixed = &pBeginInfo) + { + handle.PInvoke.vkCmdBeginVideoCodingKHR.Invoke(handle.Handle, pBeginInfoFixed); + } + } + + /// + /// vkCmdEndVideoCodingKHR - End video coding scope + /// + /// + /// + /// To end a video coding scope, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// void vkCmdEndVideoCodingKHR( + /// VkCommandBuffer commandBuffer, + /// const VkVideoEndCodingInfoKHR* pEndCodingInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndVideoCodingKHR(this T handle, in VkVideoEndCodingInfoKHR pEndCodingInfo) + where T : VulkanHandleWrapper + { + fixed (VkVideoEndCodingInfoKHR* pEndCodingInfoFixed = &pEndCodingInfo) + { + handle.PInvoke.vkCmdEndVideoCodingKHR.Invoke(handle.Handle, pEndCodingInfoFixed); + } + } + + /// + /// vkCmdControlVideoCodingKHR - Control video coding parameters + /// + /// + /// + /// To apply dynamic controls to the bound video session object, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// void vkCmdControlVideoCodingKHR( + /// VkCommandBuffer commandBuffer, + /// const VkVideoCodingControlInfoKHR* pCodingControlInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ControlVideoCodingKHR( + this T handle, + in VkVideoCodingControlInfoKHR pCodingControlInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkVideoCodingControlInfoKHR* pCodingControlInfoFixed = &pCodingControlInfo) + { + handle.PInvoke.vkCmdControlVideoCodingKHR.Invoke(handle.Handle, pCodingControlInfoFixed); + } + } + + /// + /// vkCmdDecodeVideoKHR - Launch a video decode operation + /// + /// + /// + /// To launch video decode operations, call: + /// + /// + /// // Provided by VK_KHR_video_decode_queue + /// void vkCmdDecodeVideoKHR( + /// VkCommandBuffer commandBuffer, + /// const VkVideoDecodeInfoKHR* pDecodeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DecodeVideoKHR(this T handle, in VkVideoDecodeInfoKHR pDecodeInfo) + where T : VulkanHandleWrapper + { + fixed (VkVideoDecodeInfoKHR* pDecodeInfoFixed = &pDecodeInfo) + { + handle.PInvoke.vkCmdDecodeVideoKHR.Invoke(handle.Handle, pDecodeInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginRenderingKHR(this T handle, in VkRenderingInfo pRenderingInfo) + where T : VulkanHandleWrapper + { + fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo) + { + handle.PInvoke.vkCmdBeginRenderingKHR.Invoke(handle.Handle, pRenderingInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndRenderingKHR(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndRenderingKHR.Invoke(handle.Handle); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkPeerMemoryFeatureFlags GetGroupPeerMemoryFeaturesKHR( + this VulkanHandleWrapper handle, + int heapIndex, + int localDeviceIndex, + int remoteDeviceIndex + ) + { + VkPeerMemoryFeatureFlags pPeerMemoryFeaturesLocal = default; + handle.PInvoke.vkGetDeviceGroupPeerMemoryFeaturesKHR.Invoke( + handle.Handle, + heapIndex, + localDeviceIndex, + remoteDeviceIndex, + &pPeerMemoryFeaturesLocal + ); + return pPeerMemoryFeaturesLocal; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDeviceMaskKHR(this T handle, int deviceMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDeviceMaskKHR.Invoke(handle.Handle, deviceMask); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DispatchBaseKHR( + this T handle, + int baseGroupX, + int baseGroupY, + int baseGroupZ, + int groupCountX, + int groupCountY, + int groupCountZ + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDispatchBaseKHR.Invoke( + handle.Handle, + baseGroupX, + baseGroupY, + baseGroupZ, + groupCountX, + groupCountY, + groupCountZ + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void TrimCommandPoolKHR( + this VulkanHandleWrapper handle, + VkCommandPool commandPool, + VkCommandPoolTrimFlags flags + ) + { + handle.PInvoke.vkTrimCommandPoolKHR.Invoke(handle.Handle, commandPool, flags); + } + + /// + /// vkGetMemoryFdKHR - Get a POSIX file descriptor for a memory object + /// + /// + /// + /// :refpage: vkGetMemoryFdKHR + /// + /// + /// To export a POSIX file descriptor referencing the payload of a Vulkan device + /// memory object, call: + /// + /// + /// // Provided by VK_KHR_external_memory_fd + /// VkResult vkGetMemoryFdKHR( + /// VkDevice device, + /// const VkMemoryGetFdInfoKHR* pGetFdInfo, + /// int* pFd); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetMemoryFdKHR( + this VulkanHandleWrapper handle, + in VkMemoryGetFdInfoKHR pGetFdInfo + ) + { + fixed (VkMemoryGetFdInfoKHR* pGetFdInfoFixed = &pGetFdInfo) + { + int pFdLocal = default; + VkResult result = handle.PInvoke.vkGetMemoryFdKHR.Invoke(handle.Handle, pGetFdInfoFixed, &pFdLocal); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pFdLocal; + } + } + + /// + /// vkGetMemoryFdPropertiesKHR - Get Properties of External Memory File Descriptors + /// + /// + /// + /// :refpage: vkGetMemoryFdPropertiesKHR + /// + /// + /// POSIX file descriptor memory handles compatible with Vulkan may: also be + /// created by non-Vulkan APIs using methods beyond the scope of this + /// specification. + /// To determine the correct parameters to use when importing such handles, + /// call: + /// + /// + /// // Provided by VK_KHR_external_memory_fd + /// VkResult vkGetMemoryFdPropertiesKHR( + /// VkDevice device, + /// VkExternalMemoryHandleTypeFlagBits handleType, + /// int fd, + /// VkMemoryFdPropertiesKHR* pMemoryFdProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMemoryFdPropertiesKHR( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + int fd, + ref VkMemoryFdPropertiesKHR pMemoryFdProperties + ) + { + fixed (VkMemoryFdPropertiesKHR* pMemoryFdPropertiesFixed = &pMemoryFdProperties) + { + VkResult result = handle.PInvoke.vkGetMemoryFdPropertiesKHR.Invoke( + handle.Handle, + handleType, + fd, + pMemoryFdPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryFdPropertiesKHR. + public static VkMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + int fd + ) + { + VkMemoryFdPropertiesKHR outValue = new(); + GetMemoryFdPropertiesKHR(handle, handleType, fd, ref outValue); + return outValue; + } + + /// + /// vkImportSemaphoreFdKHR - Import a semaphore from a POSIX file descriptor + /// + /// + /// + /// :refpage: vkImportSemaphoreFdKHR + /// + /// + /// To import a semaphore payload from a POSIX file descriptor, call: + /// + /// + /// // Provided by VK_KHR_external_semaphore_fd + /// VkResult vkImportSemaphoreFdKHR( + /// VkDevice device, + /// const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ImportSemaphoreFdKHR( + this VulkanHandleWrapper handle, + in VkImportSemaphoreFdInfoKHR pImportSemaphoreFdInfo + ) + { + fixed (VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfoFixed = &pImportSemaphoreFdInfo) + { + VkResult result = handle.PInvoke.vkImportSemaphoreFdKHR.Invoke( + handle.Handle, + pImportSemaphoreFdInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetSemaphoreFdKHR - Get a POSIX file descriptor handle for a semaphore + /// + /// + /// + /// :refpage: vkGetSemaphoreFdKHR + /// + /// + /// To export a POSIX file descriptor representing the payload of a semaphore, + /// call: + /// + /// + /// // Provided by VK_KHR_external_semaphore_fd + /// VkResult vkGetSemaphoreFdKHR( + /// VkDevice device, + /// const VkSemaphoreGetFdInfoKHR* pGetFdInfo, + /// int* pFd); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetSemaphoreFdKHR( + this VulkanHandleWrapper handle, + in VkSemaphoreGetFdInfoKHR pGetFdInfo + ) + { + fixed (VkSemaphoreGetFdInfoKHR* pGetFdInfoFixed = &pGetFdInfo) + { + int pFdLocal = default; + VkResult result = handle.PInvoke.vkGetSemaphoreFdKHR.Invoke(handle.Handle, pGetFdInfoFixed, &pFdLocal); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pFdLocal; + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSetKHR( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + int set, + int descriptorWriteCount, + VkWriteDescriptorSet* pDescriptorWrites + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdPushDescriptorSetKHR.Invoke( + handle.Handle, + pipelineBindPoint, + layout, + set, + descriptorWriteCount, + pDescriptorWrites + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSetWithTemplateKHR( + this T handle, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, + int set, + void* pData + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdPushDescriptorSetWithTemplateKHR.Invoke( + handle.Handle, + descriptorUpdateTemplate, + layout, + set, + pData + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateDescriptorUpdateTemplateKHR( + this VulkanHandleWrapper handle, + in VkDescriptorUpdateTemplateCreateInfo pCreateInfo, + VkAllocator? pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate + ) + { + fixed (VkDescriptorUpdateTemplateCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + return handle.PInvoke.vkCreateDescriptorUpdateTemplateKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + pDescriptorUpdateTemplate + ); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDescriptorUpdateTemplateKHR( + this VulkanHandleWrapper handle, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDescriptorUpdateTemplateKHR.Invoke( + handle.Handle, + descriptorUpdateTemplate, + pAllocator + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateDescriptorSetWithTemplateKHR( + this VulkanHandleWrapper handle, + VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + void* pData + ) + { + handle.PInvoke.vkUpdateDescriptorSetWithTemplateKHR.Invoke( + handle.Handle, + descriptorSet, + descriptorUpdateTemplate, + pData + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateRenderPass2KHR( + this VulkanHandleWrapper handle, + in VkRenderPassCreateInfo2 pCreateInfo, + VkAllocator? pAllocator, + VkRenderPass* pRenderPass + ) + { + fixed (VkRenderPassCreateInfo2* pCreateInfoFixed = &pCreateInfo) + { + return handle.PInvoke.vkCreateRenderPass2KHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + pRenderPass + ); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginRenderPass2KHR( + this T handle, + VkRenderPassBeginInfo* pRenderPassBegin, + in VkSubpassBeginInfo pSubpassBeginInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) + { + handle.PInvoke.vkCmdBeginRenderPass2KHR.Invoke(handle.Handle, pRenderPassBegin, pSubpassBeginInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NextSubpass2KHR( + this T handle, + in VkSubpassBeginInfo pSubpassBeginInfo, + in VkSubpassEndInfo pSubpassEndInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) + fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) + { + handle.PInvoke.vkCmdNextSubpass2KHR.Invoke(handle.Handle, pSubpassBeginInfoFixed, pSubpassEndInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndRenderPass2KHR(this T handle, in VkSubpassEndInfo pSubpassEndInfo) + where T : VulkanHandleWrapper + { + fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) + { + handle.PInvoke.vkCmdEndRenderPass2KHR.Invoke(handle.Handle, pSubpassEndInfoFixed); + } + } + + /// + /// vkGetSwapchainStatusKHR - Get a swapchain&apos;s status + /// + /// + /// + /// :refpage: vkGetSwapchainStatusKHR + /// + /// + /// In order to query a swapchain's status when rendering to a shared + /// presentable image, call: + /// + /// // Provided by VK_KHR_shared_presentable_image + /// VkResult vkGetSwapchainStatusKHR( + /// VkDevice device, + /// VkSwapchainKHR swapchain); + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult GetSwapchainStatusKHR( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain + ) + { + VkResult result = handle.PInvoke.vkGetSwapchainStatusKHR.Invoke(handle.Handle, swapchain); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorFullScreenExclusiveModeLostEXT: + throw new VkResultError( + VkResult.ErrorFullScreenExclusiveModeLostEXT, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.SuboptimalKHR: + default: + break; + } + + return result; + } + + /// + /// vkImportFenceFdKHR - Import a fence from a POSIX file descriptor + /// + /// + /// + /// :refpage: vkImportFenceFdKHR + /// + /// + /// To import a fence payload from a POSIX file descriptor, call: + /// + /// + /// // Provided by VK_KHR_external_fence_fd + /// VkResult vkImportFenceFdKHR( + /// VkDevice device, + /// const VkImportFenceFdInfoKHR* pImportFenceFdInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ImportFenceFdKHR( + this VulkanHandleWrapper handle, + in VkImportFenceFdInfoKHR pImportFenceFdInfo + ) + { + fixed (VkImportFenceFdInfoKHR* pImportFenceFdInfoFixed = &pImportFenceFdInfo) + { + VkResult result = handle.PInvoke.vkImportFenceFdKHR.Invoke(handle.Handle, pImportFenceFdInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetFenceFdKHR - Get a POSIX file descriptor handle for a fence + /// + /// + /// + /// :refpage: vkGetFenceFdKHR + /// + /// + /// To export a POSIX file descriptor representing the payload of a fence, call: + /// + /// + /// // Provided by VK_KHR_external_fence_fd + /// VkResult vkGetFenceFdKHR( + /// VkDevice device, + /// const VkFenceGetFdInfoKHR* pGetFdInfo, + /// int* pFd); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetFenceFdKHR( + this VulkanHandleWrapper handle, + in VkFenceGetFdInfoKHR pGetFdInfo + ) + { + fixed (VkFenceGetFdInfoKHR* pGetFdInfoFixed = &pGetFdInfo) + { + int pFdLocal = default; + VkResult result = handle.PInvoke.vkGetFenceFdKHR.Invoke(handle.Handle, pGetFdInfoFixed, &pFdLocal); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pFdLocal; + } + } + + /// + /// vkAcquireProfilingLockKHR - Acquires the profiling lock + /// + /// + /// + /// :refpage: vkAcquireProfilingLockKHR + /// + /// + /// To record and submit a command buffer containing a performance query pool + /// the profiling lock must be held. + /// The profiling lock must be acquired prior to any call to + /// vkBeginCommandBuffer that will be using a performance query pool. + /// The profiling lock must be held while any command buffer containing a + /// performance query pool is in the recording, executable, or _pending + /// state_. + /// To acquire the profiling lock, call: + /// + /// + /// // Provided by VK_KHR_performance_query + /// VkResult vkAcquireProfilingLockKHR( + /// VkDevice device, + /// const VkAcquireProfilingLockInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void AcquireProfilingLockKHR( + this VulkanHandleWrapper handle, + in VkAcquireProfilingLockInfoKHR pInfo + ) + { + fixed (VkAcquireProfilingLockInfoKHR* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkAcquireProfilingLockKHR.Invoke(handle.Handle, pInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.Timeout: + throw new VkResultError( + VkResult.Timeout, + "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_TIMEOUT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkReleaseProfilingLockKHR - Releases the profiling lock + /// + /// + /// + /// To release the profiling lock, call: + /// + /// + /// // Provided by VK_KHR_performance_query + /// void vkReleaseProfilingLockKHR( + /// VkDevice device); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseProfilingLockKHR(this VulkanHandleWrapper handle) + { + handle.PInvoke.vkReleaseProfilingLockKHR.Invoke(handle.Handle); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageMemoryRequirements2KHR( + this VulkanHandleWrapper handle, + in VkImageMemoryRequirementsInfo2 pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkImageMemoryRequirementsInfo2* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetImageMemoryRequirements2KHR.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetImageMemoryRequirements2KHR( + this VulkanHandleWrapper handle, + in VkImageMemoryRequirementsInfo2 pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetImageMemoryRequirements2KHR(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferMemoryRequirements2KHR( + this VulkanHandleWrapper handle, + in VkBufferMemoryRequirementsInfo2 pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkBufferMemoryRequirementsInfo2* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetBufferMemoryRequirements2KHR.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetBufferMemoryRequirements2KHR( + this VulkanHandleWrapper handle, + in VkBufferMemoryRequirementsInfo2 pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetBufferMemoryRequirements2KHR(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSparseMemoryRequirements2KHR( + this VulkanHandleWrapper handle, + in VkImageSparseMemoryRequirementsInfo2 pInfo, + int* pSparseMemoryRequirementCount, + ref VkSparseImageMemoryRequirements2 pSparseMemoryRequirements + ) + { + fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = &pSparseMemoryRequirements) + fixed (VkImageSparseMemoryRequirementsInfo2* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetImageSparseMemoryRequirements2KHR.Invoke( + handle.Handle, + pInfoFixed, + pSparseMemoryRequirementCount, + pSparseMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSparseImageMemoryRequirements2. + public static unsafe VkSparseImageMemoryRequirements2 GetImageSparseMemoryRequirements2KHR( + this VulkanHandleWrapper handle, + in VkImageSparseMemoryRequirementsInfo2 pInfo, + int* pSparseMemoryRequirementCount + ) + { + VkSparseImageMemoryRequirements2 outValue = new(); + GetImageSparseMemoryRequirements2KHR(handle, pInfo, pSparseMemoryRequirementCount, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateSamplerYcbcrConversionKHR( + this VulkanHandleWrapper handle, + in VkSamplerYCbCrConversionCreateInfo pCreateInfo, + VkAllocator? pAllocator, + VkSamplerYCbCrConversion* pYcbcrConversion + ) + { + fixed (VkSamplerYCbCrConversionCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + return handle.PInvoke.vkCreateSamplerYcbcrConversionKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + pYcbcrConversion + ); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroySamplerYcbcrConversionKHR( + this VulkanHandleWrapper handle, + VkSamplerYCbCrConversion ycbcrConversion, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroySamplerYcbcrConversionKHR.Invoke(handle.Handle, ycbcrConversion, pAllocator); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult BindBufferMemory2KHR( + this VulkanHandleWrapper handle, + int bindInfoCount, + VkBindBufferMemoryInfo* pBindInfos + ) + { + return handle.PInvoke.vkBindBufferMemory2KHR.Invoke(handle.Handle, bindInfoCount, pBindInfos); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult BindImageMemory2KHR( + this VulkanHandleWrapper handle, + int bindInfoCount, + VkBindImageMemoryInfo* pBindInfos + ) + { + return handle.PInvoke.vkBindImageMemory2KHR.Invoke(handle.Handle, bindInfoCount, pBindInfos); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDescriptorSetLayoutSupportKHR( + this VulkanHandleWrapper handle, + in VkDescriptorSetLayoutCreateInfo pCreateInfo, + ref VkDescriptorSetLayoutSupport pSupport + ) + { + fixed (VkDescriptorSetLayoutSupport* pSupportFixed = &pSupport) + fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + handle.PInvoke.vkGetDescriptorSetLayoutSupportKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pSupportFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkDescriptorSetLayoutSupport. + public static VkDescriptorSetLayoutSupport GetDescriptorSetLayoutSupportKHR( + this VulkanHandleWrapper handle, + in VkDescriptorSetLayoutCreateInfo pCreateInfo + ) + { + VkDescriptorSetLayoutSupport outValue = new(); + GetDescriptorSetLayoutSupportKHR(handle, pCreateInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndirectCountKHR( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndirectCountKHR.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndexedIndirectCountKHR( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndexedIndirectCountKHR.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetSemaphoreCounterValueKHR( + this VulkanHandleWrapper handle, + VkSemaphore semaphore, + nint* pValue + ) + { + return handle.PInvoke.vkGetSemaphoreCounterValueKHR.Invoke(handle.Handle, semaphore, pValue); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult WaitSemaphoresKHR( + this VulkanHandleWrapper handle, + in VkSemaphoreWaitInfo pWaitInfo, + nint timeout + ) + { + fixed (VkSemaphoreWaitInfo* pWaitInfoFixed = &pWaitInfo) + { + return handle.PInvoke.vkWaitSemaphoresKHR.Invoke(handle.Handle, pWaitInfoFixed, timeout); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult SignalSemaphoreKHR( + this VulkanHandleWrapper handle, + in VkSemaphoreSignalInfo pSignalInfo + ) + { + fixed (VkSemaphoreSignalInfo* pSignalInfoFixed = &pSignalInfo) + { + return handle.PInvoke.vkSignalSemaphoreKHR.Invoke(handle.Handle, pSignalInfoFixed); + } + } + + /// + /// vkCmdSetFragmentShadingRateKHR - Set pipeline fragment shading rate and combiner operation dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the pipeline fragment + /// shading rate and combiner operation, call: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// void vkCmdSetFragmentShadingRateKHR( + /// VkCommandBuffer commandBuffer, + /// const VkExtent2D* pFragmentSize, + /// const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetFragmentShadingRateKHR( + this T handle, + VkExtent2D* pFragmentSize, + VkFragmentShadingRateCombinerOpKHR* combinerOps + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetFragmentShadingRateKHR.Invoke(handle.Handle, pFragmentSize, combinerOps); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetRenderingAttachmentLocationsKHR( + this T handle, + in VkRenderingAttachmentLocationInfo pLocationInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkRenderingAttachmentLocationInfo* pLocationInfoFixed = &pLocationInfo) + { + handle.PInvoke.vkCmdSetRenderingAttachmentLocationsKHR.Invoke(handle.Handle, pLocationInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetRenderingInputAttachmentIndicesKHR( + this T handle, + in VkRenderingInputAttachmentIndexInfo pInputAttachmentIndexInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfoFixed = &pInputAttachmentIndexInfo) + { + handle.PInvoke.vkCmdSetRenderingInputAttachmentIndicesKHR.Invoke( + handle.Handle, + pInputAttachmentIndexInfoFixed + ); + } + } + + /// + /// vkWaitForPresentKHR - Wait for presentation + /// + /// + /// + /// When the presentWait^ feature is enabled, an + /// application can wait for an image to be presented to the user by first + /// specifying a presentId for the target presentation by adding a + /// VkPresentIdKHR structure to the pNext chain of the + /// VkPresentInfoKHR structure and then waiting for that presentation to + /// complete by calling: + /// + /// + /// // Provided by VK_KHR_present_wait + /// VkResult vkWaitForPresentKHR( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// uint64_t presentId, + /// uint64_t timeout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult WaitForPresentKHR( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + nint presentId, + nint timeout + ) + { + VkResult result = handle.PInvoke.vkWaitForPresentKHR.Invoke(handle.Handle, swapchain, presentId, timeout); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorFullScreenExclusiveModeLostEXT: + throw new VkResultError( + VkResult.ErrorFullScreenExclusiveModeLostEXT, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Timeout: + case VkResult.SuboptimalKHR: + default: + break; + } + + return result; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceAddress GetBufferDeviceAddressKHR( + this VulkanHandleWrapper handle, + in VkBufferDeviceAddressInfo pInfo + ) + { + fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetBufferDeviceAddressKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetBufferOpaqueCaptureAddressKHR( + this VulkanHandleWrapper handle, + in VkBufferDeviceAddressInfo pInfo + ) + { + fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetBufferOpaqueCaptureAddressKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetMemoryOpaqueCaptureAddressKHR( + this VulkanHandleWrapper handle, + in VkDeviceMemoryOpaqueCaptureAddressInfo pInfo + ) + { + fixed (VkDeviceMemoryOpaqueCaptureAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetDeviceMemoryOpaqueCaptureAddressKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCreateDeferredOperationKHR - Create a deferred operation handle + /// + /// + /// + /// :refpage: vkCreateDeferredOperationKHR + /// + /// + /// To construct the tracking object for a deferred command, call: + /// + /// + /// // Provided by VK_KHR_deferred_host_operations + /// VkResult vkCreateDeferredOperationKHR( + /// VkDevice device, + /// const VkAllocationCallbacks* pAllocator, + /// VkDeferredOperationKHR* pDeferredOperation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeferredOperationKHR CreateDeferredOperationKHR( + this VulkanHandleWrapper handle, + VkAllocator? pAllocator + ) + { + VkDeferredOperationKHR pDeferredOperationLocal = default; + VkResult result = handle.PInvoke.vkCreateDeferredOperationKHR.Invoke( + handle.Handle, + pAllocator, + &pDeferredOperationLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDeferredOperationKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDeferredOperationKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDeferredOperationKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDeferredOperationLocal; + } + + /// + /// vkDestroyDeferredOperationKHR - Destroy a deferred operation handle + /// + /// + /// + /// :refpage: vkDestroyDeferredOperationKHR + /// + /// + /// When a deferred operation is completed, the application can destroy the + /// tracking object by calling: + /// + /// + /// // Provided by VK_KHR_deferred_host_operations + /// void vkDestroyDeferredOperationKHR( + /// VkDevice device, + /// VkDeferredOperationKHR operation, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDeferredOperationKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR operation, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDeferredOperationKHR.Invoke(handle.Handle, operation, pAllocator); + } + + /// + /// vkGetDeferredOperationMaxConcurrencyKHR - Query the maximum concurrency on a deferred operation + /// + /// + /// + /// :refpage: vkGetDeferredOperationMaxConcurrencyKHR + /// + /// + /// To query the number of additional threads that can usefully be joined to a + /// deferred operation, call: + /// + /// + /// // Provided by VK_KHR_deferred_host_operations + /// uint32_t vkGetDeferredOperationMaxConcurrencyKHR( + /// VkDevice device, + /// VkDeferredOperationKHR operation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetDeferredOperationMaxConcurrencyKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR operation + ) + { + return handle.PInvoke.vkGetDeferredOperationMaxConcurrencyKHR.Invoke(handle.Handle, operation); + } + + /// + /// vkGetDeferredOperationResultKHR - Query the result of a deferred operation + /// + /// + /// + /// :refpage: vkGetDeferredOperationResultKHR + /// + /// + /// The vkGetDeferredOperationResultKHR function is defined as: + /// + /// + /// // Provided by VK_KHR_deferred_host_operations + /// VkResult vkGetDeferredOperationResultKHR( + /// VkDevice device, + /// VkDeferredOperationKHR operation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult GetDeferredOperationResultKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR operation + ) + { + VkResult result = handle.PInvoke.vkGetDeferredOperationResultKHR.Invoke(handle.Handle, operation); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeferredOperationResultKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeferredOperationResultKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.NotReady: + default: + break; + } + + return result; + } + + /// + /// vkDeferredOperationJoinKHR - Assign a thread to a deferred operation + /// + /// + /// + /// :refpage: vkDeferredOperationJoinKHR + /// + /// + /// To assign a thread to a deferred operation, call: + /// + /// + /// // Provided by VK_KHR_deferred_host_operations + /// VkResult vkDeferredOperationJoinKHR( + /// VkDevice device, + /// VkDeferredOperationKHR operation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult DeferredOperationJoinKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR operation + ) + { + VkResult result = handle.PInvoke.vkDeferredOperationJoinKHR.Invoke(handle.Handle, operation); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.ThreadDoneKHR: + case VkResult.ThreadIdleKHR: + default: + break; + } + + return result; + } + + /// + /// vkGetPipelineExecutablePropertiesKHR - Get the executables associated with a pipeline + /// + /// + /// + /// When a pipeline is created, its state and shaders are compiled into zero or + /// more device-specific executables, which are used when executing commands + /// against that pipeline. + /// To query the properties of these pipeline executables, call: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// VkResult vkGetPipelineExecutablePropertiesKHR( + /// VkDevice device, + /// const VkPipelineInfoKHR* pPipelineInfo, + /// uint32_t* pExecutableCount, + /// VkPipelineExecutablePropertiesKHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetPipelineExecutablePropertiesKHR( + this VulkanHandleWrapper handle, + in VkPipelineInfoKHR pPipelineInfo, + ref int pExecutableCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkPipelineExecutablePropertiesKHR* pPropertiesFixed = pProperties) + fixed (VkPipelineInfoKHR* pPipelineInfoFixed = &pPipelineInfo) + fixed (int* pExecutableCountFixed = &pExecutableCount) + { + VkResult result = handle.PInvoke.vkGetPipelineExecutablePropertiesKHR.Invoke( + handle.Handle, + pPipelineInfoFixed, + pExecutableCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetPipelineExecutablePropertiesKHR_Count( + this VulkanHandleWrapper handle, + in VkPipelineInfoKHR pPipelineInfo + ) + { + int pExecutableCount = default; + GetPipelineExecutablePropertiesKHR(handle, pPipelineInfo, ref pExecutableCount, null); + return pExecutableCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetPipelineExecutablePropertiesKHR_Write( + this VulkanHandleWrapper handle, + in VkPipelineInfoKHR pPipelineInfo, + scoped ReadOnlySpan pProperties + ) + { + int pExecutableCount = pProperties.Length; + return GetPipelineExecutablePropertiesKHR(handle, pPipelineInfo, ref pExecutableCount, pProperties); + } + + /// + /// vkGetPipelineExecutableStatisticsKHR - Get compile time statistics associated with a pipeline executable + /// + /// + /// + /// Each pipeline executable may: have a set of statistics associated with it + /// that are generated by the pipeline compilation process. + /// These statistics may: include things such as instruction counts, amount of + /// spilling (if any), maximum number of simultaneous threads, or anything else + /// which may: aid developers in evaluating the expected performance of a + /// shader. + /// To query the compile time statistics associated with a pipeline executable, + /// call: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// VkResult vkGetPipelineExecutableStatisticsKHR( + /// VkDevice device, + /// const VkPipelineExecutableInfoKHR* pExecutableInfo, + /// uint32_t* pStatisticCount, + /// VkPipelineExecutableStatisticKHR* pStatistics); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetPipelineExecutableStatisticsKHR( + this VulkanHandleWrapper handle, + in VkPipelineExecutableInfoKHR pExecutableInfo, + ref int pStatisticCount, + scoped ReadOnlySpan pStatistics + ) + { + fixed (VkPipelineExecutableStatisticKHR* pStatisticsFixed = pStatistics) + fixed (VkPipelineExecutableInfoKHR* pExecutableInfoFixed = &pExecutableInfo) + fixed (int* pStatisticCountFixed = &pStatisticCount) + { + VkResult result = handle.PInvoke.vkGetPipelineExecutableStatisticsKHR.Invoke( + handle.Handle, + pExecutableInfoFixed, + pStatisticCountFixed, + pStatisticsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetPipelineExecutableStatisticsKHR_Count( + this VulkanHandleWrapper handle, + in VkPipelineExecutableInfoKHR pExecutableInfo + ) + { + int pStatisticCount = default; + GetPipelineExecutableStatisticsKHR(handle, pExecutableInfo, ref pStatisticCount, null); + return pStatisticCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetPipelineExecutableStatisticsKHR_Write( + this VulkanHandleWrapper handle, + in VkPipelineExecutableInfoKHR pExecutableInfo, + scoped ReadOnlySpan pStatistics + ) + { + int pStatisticCount = pStatistics.Length; + return GetPipelineExecutableStatisticsKHR(handle, pExecutableInfo, ref pStatisticCount, pStatistics); + } + + /// + /// vkGetPipelineExecutableInternalRepresentationsKHR - Get internal representations of the pipeline executable + /// + /// + /// + /// Each pipeline executable may: have one or more text or binary internal + /// representations associated with it which are generated as part of the + /// compile process. + /// These may: include the final shader assembly, a binary form of the compiled + /// shader, or the shader compiler's internal representation at any number of + /// intermediate compile steps. + /// To query the internal representations associated with a pipeline executable, + /// call: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// VkResult vkGetPipelineExecutableInternalRepresentationsKHR( + /// VkDevice device, + /// const VkPipelineExecutableInfoKHR* pExecutableInfo, + /// uint32_t* pInternalRepresentationCount, + /// VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetPipelineExecutableInternalRepresentationsKHR( + this VulkanHandleWrapper handle, + in VkPipelineExecutableInfoKHR pExecutableInfo, + ref int pInternalRepresentationCount, + scoped ReadOnlySpan pInternalRepresentations + ) + { + fixed ( + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentationsFixed = pInternalRepresentations + ) + fixed (VkPipelineExecutableInfoKHR* pExecutableInfoFixed = &pExecutableInfo) + fixed (int* pInternalRepresentationCountFixed = &pInternalRepresentationCount) + { + VkResult result = handle.PInvoke.vkGetPipelineExecutableInternalRepresentationsKHR.Invoke( + handle.Handle, + pExecutableInfoFixed, + pInternalRepresentationCountFixed, + pInternalRepresentationsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetPipelineExecutableInternalRepresentationsKHR_Count( + this VulkanHandleWrapper handle, + in VkPipelineExecutableInfoKHR pExecutableInfo + ) + { + int pInternalRepresentationCount = default; + GetPipelineExecutableInternalRepresentationsKHR( + handle, + pExecutableInfo, + ref pInternalRepresentationCount, + null + ); + return pInternalRepresentationCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetPipelineExecutableInternalRepresentationsKHR_Write( + this VulkanHandleWrapper handle, + in VkPipelineExecutableInfoKHR pExecutableInfo, + scoped ReadOnlySpan pInternalRepresentations + ) + { + int pInternalRepresentationCount = pInternalRepresentations.Length; + return GetPipelineExecutableInternalRepresentationsKHR( + handle, + pExecutableInfo, + ref pInternalRepresentationCount, + pInternalRepresentations + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult MapMemory2KHR( + this VulkanHandleWrapper handle, + in VkMemoryMapInfo pMemoryMapInfo, + void** ppData + ) + { + fixed (VkMemoryMapInfo* pMemoryMapInfoFixed = &pMemoryMapInfo) + { + return handle.PInvoke.vkMapMemory2KHR.Invoke(handle.Handle, pMemoryMapInfoFixed, ppData); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult UnmapMemory2KHR( + this VulkanHandleWrapper handle, + in VkMemoryUnmapInfo pMemoryUnmapInfo + ) + { + fixed (VkMemoryUnmapInfo* pMemoryUnmapInfoFixed = &pMemoryUnmapInfo) + { + return handle.PInvoke.vkUnmapMemory2KHR.Invoke(handle.Handle, pMemoryUnmapInfoFixed); + } + } + + /// + /// vkGetEncodedVideoSessionParametersKHR - Get encoded parameter sets from a video session parameters object + /// + /// + /// + /// Encoded parameter data can be retrieved from a video session parameters + /// object created with a video encode operation using the command: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// VkResult vkGetEncodedVideoSessionParametersKHR( + /// VkDevice device, + /// const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + /// VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, + /// size_t* pDataSize, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetEncodedVideoSessionParametersKHR( + this VulkanHandleWrapper handle, + in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo, + in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo, + ref nuint pDataSize, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + fixed (VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfoFixed = &pFeedbackInfo) + fixed ( + VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfoFixed = + &pVideoSessionParametersInfo + ) + fixed (nuint* pDataSizeFixed = &pDataSize) + { + VkResult result = handle.PInvoke.vkGetEncodedVideoSessionParametersKHR.Invoke( + handle.Handle, + pVideoSessionParametersInfoFixed, + pFeedbackInfoFixed, + pDataSizeFixed, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetEncodedVideoSessionParametersKHR_Count( + this VulkanHandleWrapper handle, + in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo, + in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo + ) + { + nuint pDataSize = default; + GetEncodedVideoSessionParametersKHR( + handle, + pVideoSessionParametersInfo, + pFeedbackInfo, + ref pDataSize, + null + ); + return pDataSize; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetEncodedVideoSessionParametersKHR_Write( + this VulkanHandleWrapper handle, + in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo, + in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo, + scoped ReadOnlySpan pData + ) + { + nuint pDataSize = (nuint)pData.Length; + return GetEncodedVideoSessionParametersKHR( + handle, + pVideoSessionParametersInfo, + pFeedbackInfo, + ref pDataSize, + pData + ); + } + + /// + /// vkCmdEncodeVideoKHR - Launch video encode operations + /// + /// + /// + /// To launch video encode operations, call: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// void vkCmdEncodeVideoKHR( + /// VkCommandBuffer commandBuffer, + /// const VkVideoEncodeInfoKHR* pEncodeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EncodeVideoKHR(this T handle, in VkVideoEncodeInfoKHR pEncodeInfo) + where T : VulkanHandleWrapper + { + fixed (VkVideoEncodeInfoKHR* pEncodeInfoFixed = &pEncodeInfo) + { + handle.PInvoke.vkCmdEncodeVideoKHR.Invoke(handle.Handle, pEncodeInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetEvent2KHR(this T handle, VkEvent @event, in VkDependencyInfo pDependencyInfo) + where T : VulkanHandleWrapper + { + fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) + { + handle.PInvoke.vkCmdSetEvent2KHR.Invoke(handle.Handle, @event, pDependencyInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetEvent2KHR(this T handle, VkEvent @event, VkPipelineStageFlags2 stageMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdResetEvent2KHR.Invoke(handle.Handle, @event, stageMask); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WaitEvents2KHR( + this T handle, + int eventCount, + VkEvent* pEvents, + VkDependencyInfo* pDependencyInfos + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdWaitEvents2KHR.Invoke(handle.Handle, eventCount, pEvents, pDependencyInfos); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PipelineBarrier2KHR(this T handle, in VkDependencyInfo pDependencyInfo) + where T : VulkanHandleWrapper + { + fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) + { + handle.PInvoke.vkCmdPipelineBarrier2KHR.Invoke(handle.Handle, pDependencyInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WriteTimestamp2KHR( + this T handle, + VkPipelineStageFlags2 stage, + VkQueryPool queryPool, + int query + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdWriteTimestamp2KHR.Invoke(handle.Handle, stage, queryPool, query); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult Submit2KHR( + this VulkanHandleWrapper handle, + int submitCount, + VkSubmitInfo2* pSubmits, + VkFence fence + ) + { + return handle.PInvoke.vkQueueSubmit2KHR.Invoke(handle.Handle, submitCount, pSubmits, fence); + } + + /// + /// vkCmdBindIndexBuffer3KHR - Bind an address range as an index buffer to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindIndexBuffer3KHR + /// + /// + /// To bind an address range as an index buffer to a command buffer, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdBindIndexBuffer3KHR( + /// VkCommandBuffer commandBuffer, + /// const VkBindIndexBuffer3InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindIndexBuffer3KHR(this T handle, in VkBindIndexBuffer3InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkBindIndexBuffer3InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdBindIndexBuffer3KHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdBindVertexBuffers3KHR - Bind strided address ranges as vertex buffers to a command buffer and dynamically set strides + /// + /// + /// + /// To bind strided address ranges as vertex buffers to a command buffer for use + /// in subsequent drawing commands, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdBindVertexBuffers3KHR( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstBinding, + /// uint32_t bindingCount, + /// const VkBindVertexBuffer3InfoKHR* pBindingInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVertexBuffers3KHR( + this T handle, + int firstBinding, + scoped ReadOnlySpan pBindingInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkBindVertexBuffer3InfoKHR* pBindingInfosFixed = pBindingInfos) + { + handle.PInvoke.vkCmdBindVertexBuffers3KHR.Invoke( + handle.Handle, + firstBinding, + pBindingInfos.Length, + pBindingInfosFixed + ); + } + } + + /// + /// vkCmdDrawIndirect2KHR - Draw primitives with indirect parameters through an address range + /// + /// + /// + /// :refpage: vkCmdDrawIndirect2KHR + /// + /// + /// To record a non-indexed indirect drawing command, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdDrawIndirect2KHR( + /// VkCommandBuffer commandBuffer, + /// const VkDrawIndirect2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndirect2KHR(this T handle, in VkDrawIndirect2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDrawIndirect2KHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdDrawIndexedIndirect2KHR - Draw primitives with indirect parameters through an address range and with indexed vertices + /// + /// + /// + /// :refpage: vkCmdDrawIndexedIndirect2KHR + /// + /// + /// To record an indexed indirect drawing command, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdDrawIndexedIndirect2KHR( + /// VkCommandBuffer commandBuffer, + /// const VkDrawIndirect2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndexedIndirect2KHR(this T handle, in VkDrawIndirect2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDrawIndexedIndirect2KHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdDispatchIndirect2KHR - Dispatch compute work items with indirect parameters through an address range + /// + /// + /// + /// :refpage: vkCmdDispatchIndirect2KHR + /// + /// + /// To record an indirect dispatching command, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdDispatchIndirect2KHR( + /// VkCommandBuffer commandBuffer, + /// const VkDispatchIndirect2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DispatchIndirect2KHR(this T handle, in VkDispatchIndirect2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDispatchIndirect2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDispatchIndirect2KHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdCopyMemoryKHR - Copy data between memory ranges + /// + /// + /// + /// :refpage: vkCmdCopyMemoryKHR + /// + /// + /// To copy data between memory ranges, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdCopyMemoryKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryKHR(this T handle, in VkCopyDeviceMemoryInfoKHR pCopyMemoryInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo) + { + handle.PInvoke.vkCmdCopyMemoryKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed); + } + } + + /// + /// vkCmdCopyMemoryToImageKHR - Copy data from memory ranges to an image + /// + /// + /// + /// :refpage: vkCmdCopyMemoryToImageKHR + /// + /// + /// To copy data from an image to memory ranges, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdCopyMemoryToImageKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryToImageKHR( + this T handle, + in VkCopyDeviceMemoryImageInfoKHR pCopyMemoryInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo) + { + handle.PInvoke.vkCmdCopyMemoryToImageKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed); + } + } + + /// + /// vkCmdCopyImageToMemoryKHR - Copy data from an image to memory ranges + /// + /// + /// + /// :refpage: vkCmdCopyImageToMemoryKHR + /// + /// + /// To copy data from an image to memory ranges, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdCopyImageToMemoryKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageToMemoryKHR( + this T handle, + in VkCopyDeviceMemoryImageInfoKHR pCopyMemoryInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo) + { + handle.PInvoke.vkCmdCopyImageToMemoryKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed); + } + } + + /// + /// vkCmdUpdateMemoryKHR - Update the content of device memory from host memory + /// + /// + /// + /// :refpage: vkCmdUpdateMemoryKHR + /// + /// + /// To update device memory inline in a command buffer, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdUpdateMemoryKHR( + /// VkCommandBuffer commandBuffer, + /// const VkDeviceAddressRangeKHR* pDstRange, + /// VkAddressCommandFlagsKHR dstFlags, + /// VkDeviceSize dataSize, + /// const void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateMemoryKHR( + this T handle, + VkDeviceAddressRangeKHR* pDstRange, + VkAddressCommandFlagsKHR dstFlags, + scoped ReadOnlySpan pData + ) + where T : VulkanHandleWrapper + { + fixed (byte* pDataFixed = pData) + { + handle.PInvoke.vkCmdUpdateMemoryKHR.Invoke( + handle.Handle, + pDstRange, + dstFlags, + (ByteSize64)pData.Length, + pDataFixed + ); + } + } + + /// + /// vkCmdFillMemoryKHR - Fill a memory range with a fixed 4-byte bit pattern + /// + /// + /// + /// :refpage: vkCmdFillMemoryKHR + /// + /// + /// To fill a memory range with a fixed 4-byte bit pattern, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdFillMemoryKHR( + /// VkCommandBuffer commandBuffer, + /// const VkDeviceAddressRangeKHR* pDstRange, + /// VkAddressCommandFlagsKHR dstFlags, + /// uint32_t data); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void FillMemoryKHR( + this T handle, + VkDeviceAddressRangeKHR* pDstRange, + VkAddressCommandFlagsKHR dstFlags, + int data + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdFillMemoryKHR.Invoke(handle.Handle, pDstRange, dstFlags, data); + } + + /// + /// vkCmdCopyQueryPoolResultsToMemoryKHR - Copy the results of queries in a query pool to a memory range + /// + /// + /// + /// :refpage: vkCmdCopyQueryPoolResultsToMemoryKHR + /// + /// + /// To copy query statuses and numerical results directly to buffer memory, + /// call: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// void vkCmdCopyQueryPoolResultsToMemoryKHR( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t firstQuery, + /// uint32_t queryCount, + /// const VkStridedDeviceAddressRangeKHR* pDstRange, + /// VkAddressCommandFlagsKHR dstFlags, + /// VkQueryResultFlags queryResultFlags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyQueryPoolResultsToMemoryKHR( + this T handle, + VkQueryPool queryPool, + int firstQuery, + int queryCount, + VkStridedDeviceAddressRangeKHR* pDstRange, + VkAddressCommandFlagsKHR dstFlags, + VkQueryResultFlags queryResultFlags + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdCopyQueryPoolResultsToMemoryKHR.Invoke( + handle.Handle, + queryPool, + firstQuery, + queryCount, + pDstRange, + dstFlags, + queryResultFlags + ); + } + + /// + /// vkCmdDrawIndirectCount2KHR - Draw primitives with indirect parameters and draw count through address ranges + /// + /// + /// + /// :refpage: vkCmdDrawIndirectCount2KHR + /// + /// + /// To record a non-indexed indirect drawing command, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_KHR_draw_indirect_count or VK_VERSION_1_2 + /// void vkCmdDrawIndirectCount2KHR( + /// VkCommandBuffer commandBuffer, + /// const VkDrawIndirectCount2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndirectCount2KHR(this T handle, in VkDrawIndirectCount2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDrawIndirectCount2KHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdDrawIndexedIndirectCount2KHR - Draw primitives with indirect parameters and draw count through address ranges and with indexed vertices + /// + /// + /// + /// :refpage: vkCmdDrawIndexedIndirectCount2KHR + /// + /// + /// To record a non-indexed indirect drawing command, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_KHR_draw_indirect_count or VK_VERSION_1_2 + /// void vkCmdDrawIndexedIndirectCount2KHR( + /// VkCommandBuffer commandBuffer, + /// const VkDrawIndirectCount2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndexedIndirectCount2KHR(this T handle, in VkDrawIndirectCount2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDrawIndexedIndirectCount2KHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdBeginConditionalRendering2EXT - Define the beginning of a conditional rendering block + /// + /// + /// + /// To begin conditional rendering, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering + /// void vkCmdBeginConditionalRendering2EXT( + /// VkCommandBuffer commandBuffer, + /// const VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginConditionalRendering2EXT( + this T handle, + VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBeginConditionalRendering2EXT.Invoke(handle.Handle, pConditionalRenderingBegin); + } + + /// + /// vkCmdBindTransformFeedbackBuffers2EXT - Bind transform feedback memory ranges to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindTransformFeedbackBuffers2EXT + /// + /// + /// To bind transform feedback memory ranges to a command buffer for use in + /// subsequent drawing commands, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// void vkCmdBindTransformFeedbackBuffers2EXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstBinding, + /// uint32_t bindingCount, + /// const VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTransformFeedbackBuffers2EXT( + this T handle, + int firstBinding, + scoped ReadOnlySpan pBindingInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfosFixed = pBindingInfos) + { + handle.PInvoke.vkCmdBindTransformFeedbackBuffers2EXT.Invoke( + handle.Handle, + firstBinding, + pBindingInfos.Length, + pBindingInfosFixed + ); + } + } + + /// + /// vkCmdBeginTransformFeedback2EXT - Make transform feedback active in the command buffer + /// + /// + /// + /// :refpage: vkCmdBeginTransformFeedback2EXT + /// :firstcounter: firstCounterRange + /// :countercount: counterRangeCount + /// :bindCommand: vkCmdBindTransformFeedbackBuffers2EXT + /// + /// + /// Transform feedback for specific transform feedback buffers is made active by + /// calling: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// void vkCmdBeginTransformFeedback2EXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstCounterRange, + /// uint32_t counterRangeCount, + /// const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginTransformFeedback2EXT( + this T handle, + int firstCounterRange, + scoped ReadOnlySpan pCounterInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfosFixed = pCounterInfos) + { + handle.PInvoke.vkCmdBeginTransformFeedback2EXT.Invoke( + handle.Handle, + firstCounterRange, + pCounterInfos.Length, + pCounterInfosFixed + ); + } + } + + /// + /// vkCmdEndTransformFeedback2EXT - Make transform feedback inactive in the command buffer + /// + /// + /// + /// :refpage: vkCmdEndTransformFeedback2EXT + /// :countercount: counterRangeCount + /// + /// + /// Transform feedback for specific transform feedback buffers is made inactive + /// by calling: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// void vkCmdEndTransformFeedback2EXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstCounterRange, + /// uint32_t counterRangeCount, + /// const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndTransformFeedback2EXT( + this T handle, + int firstCounterRange, + scoped ReadOnlySpan pCounterInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfosFixed = pCounterInfos) + { + handle.PInvoke.vkCmdEndTransformFeedback2EXT.Invoke( + handle.Handle, + firstCounterRange, + pCounterInfos.Length, + pCounterInfosFixed + ); + } + } + + /// + /// vkCmdDrawIndirectByteCount2EXT - Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter memory range + /// + /// + /// + /// :refpage: vkCmdDrawIndirectByteCount2EXT + /// + /// + /// To record a non-indexed draw call, where the vertex count is based on a byte + /// count read from a memory range and the passed in vertex stride parameter, + /// call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// void vkCmdDrawIndirectByteCount2EXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t instanceCount, + /// uint32_t firstInstance, + /// const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfo, + /// uint32_t counterOffset, + /// uint32_t vertexStride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawIndirectByteCount2EXT( + this T handle, + int instanceCount, + int firstInstance, + in VkBindTransformFeedbackBuffer2InfoEXT pCounterInfo, + int counterOffset, + int vertexStride + ) + where T : VulkanHandleWrapper + { + fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfoFixed = &pCounterInfo) + { + handle.PInvoke.vkCmdDrawIndirectByteCount2EXT.Invoke( + handle.Handle, + instanceCount, + firstInstance, + pCounterInfoFixed, + counterOffset, + vertexStride + ); + } + } + + /// + /// vkCmdDrawMeshTasksIndirect2EXT - Issue a mesh tasks draw with indirect parameters through an address range + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksIndirect2EXT + /// + /// + /// To record an indirect mesh tasks drawing command, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_mesh_shader + /// void vkCmdDrawMeshTasksIndirect2EXT( + /// VkCommandBuffer commandBuffer, + /// const VkDrawIndirect2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawMeshTasksIndirect2EXT(this T handle, in VkDrawIndirect2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDrawMeshTasksIndirect2EXT.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdDrawMeshTasksIndirectCount2EXT - Perform an indirect mesh tasks draw with the draw count sourced from an address range + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksIndirectCount2EXT + /// + /// + /// To record an indirect mesh tasks drawing command with the draw count sourced + /// from an address range, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with (VK_KHR_draw_indirect_count or VK_VERSION_1_2) and VK_EXT_mesh_shader + /// void vkCmdDrawMeshTasksIndirectCount2EXT( + /// VkCommandBuffer commandBuffer, + /// const VkDrawIndirectCount2InfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawMeshTasksIndirectCount2EXT(this T handle, in VkDrawIndirectCount2InfoKHR pInfo) + where T : VulkanHandleWrapper + { + fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDrawMeshTasksIndirectCount2EXT.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdWriteMarkerToMemoryAMD - Execute a pipelined write of a marker value into a memory range + /// + /// + /// + /// :refpage: vkCmdWriteMarkerToMemoryAMD + /// + /// + /// To write a 32-bit marker value into memory as a pipelined operation, call: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker + /// void vkCmdWriteMarkerToMemoryAMD( + /// VkCommandBuffer commandBuffer, + /// const VkMemoryMarkerInfoAMD* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteMarkerToMemoryAMD(this T handle, in VkMemoryMarkerInfoAMD pInfo) + where T : VulkanHandleWrapper + { + fixed (VkMemoryMarkerInfoAMD* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdWriteMarkerToMemoryAMD.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCreateAccelerationStructure2KHR - Create a new acceleration structure object using a device address + /// + /// + /// + /// :refpage: vkCreateAccelerationStructure2KHR + /// + /// + /// To create an acceleration structure using a device address, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands + /// VkResult vkCreateAccelerationStructure2KHR( + /// VkDevice device, + /// const VkAccelerationStructureCreateInfo2KHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkAccelerationStructureKHR* pAccelerationStructure); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkAccelerationStructureKHR CreateAccelerationStructure2KHR( + this VulkanHandleWrapper handle, + in VkAccelerationStructureCreateInfo2KHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkAccelerationStructureCreateInfo2KHR* pCreateInfoFixed = &pCreateInfo) + { + VkAccelerationStructureKHR pAccelerationStructureLocal = default; + VkResult result = handle.PInvoke.vkCreateAccelerationStructure2KHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pAccelerationStructureLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.Success: + default: + break; + } + + return pAccelerationStructureLocal; + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBuffer2KHR(this T handle, in VkCopyBufferInfo2 pCopyBufferInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyBufferInfo2* pCopyBufferInfoFixed = &pCopyBufferInfo) + { + handle.PInvoke.vkCmdCopyBuffer2KHR.Invoke(handle.Handle, pCopyBufferInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImage2KHR(this T handle, in VkCopyImageInfo2 pCopyImageInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyImageInfo2* pCopyImageInfoFixed = &pCopyImageInfo) + { + handle.PInvoke.vkCmdCopyImage2KHR.Invoke(handle.Handle, pCopyImageInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyBufferToImage2KHR( + this T handle, + in VkCopyBufferToImageInfo2 pCopyBufferToImageInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyBufferToImageInfo2* pCopyBufferToImageInfoFixed = &pCopyBufferToImageInfo) + { + handle.PInvoke.vkCmdCopyBufferToImage2KHR.Invoke(handle.Handle, pCopyBufferToImageInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyImageToBuffer2KHR( + this T handle, + in VkCopyImageToBufferInfo2 pCopyImageToBufferInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyImageToBufferInfo2* pCopyImageToBufferInfoFixed = &pCopyImageToBufferInfo) + { + handle.PInvoke.vkCmdCopyImageToBuffer2KHR.Invoke(handle.Handle, pCopyImageToBufferInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BlitImage2KHR(this T handle, in VkBlitImageInfo2 pBlitImageInfo) + where T : VulkanHandleWrapper + { + fixed (VkBlitImageInfo2* pBlitImageInfoFixed = &pBlitImageInfo) + { + handle.PInvoke.vkCmdBlitImage2KHR.Invoke(handle.Handle, pBlitImageInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ResolveImage2KHR(this T handle, in VkResolveImageInfo2 pResolveImageInfo) + where T : VulkanHandleWrapper + { + fixed (VkResolveImageInfo2* pResolveImageInfoFixed = &pResolveImageInfo) + { + handle.PInvoke.vkCmdResolveImage2KHR.Invoke(handle.Handle, pResolveImageInfoFixed); + } + } + + /// + /// vkCmdTraceRaysIndirect2KHR - Initialize an indirect ray tracing dispatch with indirect shader binding tables + /// + /// + /// + /// :refpage: vkCmdTraceRaysIndirect2KHR + /// + /// + /// To dispatch ray tracing, with some parameters sourced on the device, use: + /// + /// + /// // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline + /// void vkCmdTraceRaysIndirect2KHR( + /// VkCommandBuffer commandBuffer, + /// VkDeviceAddress indirectDeviceAddress); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void TraceRaysIndirect2KHR(this T handle, VkDeviceAddress indirectDeviceAddress) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdTraceRaysIndirect2KHR.Invoke(handle.Handle, indirectDeviceAddress); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetBufferMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + in VkDeviceBufferMemoryRequirements pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkDeviceBufferMemoryRequirements* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceBufferMemoryRequirementsKHR.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetBufferMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + in VkDeviceBufferMemoryRequirements pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetBufferMemoryRequirementsKHR(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceImageMemoryRequirementsKHR.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetImageMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetImageMemoryRequirementsKHR(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSparseMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo, + int* pSparseMemoryRequirementCount, + ref VkSparseImageMemoryRequirements2 pSparseMemoryRequirements + ) + { + fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = &pSparseMemoryRequirements) + fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceImageSparseMemoryRequirementsKHR.Invoke( + handle.Handle, + pInfoFixed, + pSparseMemoryRequirementCount, + pSparseMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSparseImageMemoryRequirements2. + public static unsafe VkSparseImageMemoryRequirements2 GetImageSparseMemoryRequirementsKHR( + this VulkanHandleWrapper handle, + in VkDeviceImageMemoryRequirements pInfo, + int* pSparseMemoryRequirementCount + ) + { + VkSparseImageMemoryRequirements2 outValue = new(); + GetImageSparseMemoryRequirementsKHR(handle, pInfo, pSparseMemoryRequirementCount, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindIndexBuffer2KHR( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + ByteSize64 size, + VkIndexType indexType + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindIndexBuffer2KHR.Invoke(handle.Handle, buffer, offset, size, indexType); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRenderingAreaGranularityKHR( + this VulkanHandleWrapper handle, + in VkRenderingAreaInfo pRenderingAreaInfo, + ref VkExtent2D pGranularity + ) + { + fixed (VkExtent2D* pGranularityFixed = &pGranularity) + fixed (VkRenderingAreaInfo* pRenderingAreaInfoFixed = &pRenderingAreaInfo) + { + handle.PInvoke.vkGetRenderingAreaGranularityKHR.Invoke( + handle.Handle, + pRenderingAreaInfoFixed, + pGranularityFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExtent2D. + public static VkExtent2D GetRenderingAreaGranularityKHR( + this VulkanHandleWrapper handle, + in VkRenderingAreaInfo pRenderingAreaInfo + ) + { + VkExtent2D outValue = new(); + GetRenderingAreaGranularityKHR(handle, pRenderingAreaInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSubresourceLayoutKHR( + this VulkanHandleWrapper handle, + in VkDeviceImageSubresourceInfo pInfo, + ref VkSubresourceLayout2 pLayout + ) + { + fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) + fixed (VkDeviceImageSubresourceInfo* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceImageSubresourceLayoutKHR.Invoke(handle.Handle, pInfoFixed, pLayoutFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSubresourceLayout2. + public static VkSubresourceLayout2 GetImageSubresourceLayoutKHR( + this VulkanHandleWrapper handle, + in VkDeviceImageSubresourceInfo pInfo + ) + { + VkSubresourceLayout2 outValue = new(); + GetImageSubresourceLayoutKHR(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSubresourceLayout2KHR( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource2* pSubresource, + ref VkSubresourceLayout2 pLayout + ) + { + fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) + { + handle.PInvoke.vkGetImageSubresourceLayout2KHR.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSubresourceLayout2. + public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2KHR( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource2* pSubresource + ) + { + VkSubresourceLayout2 outValue = new(); + GetImageSubresourceLayout2KHR(handle, image, pSubresource, ref outValue); + return outValue; + } + + /// + /// vkWaitForPresent2KHR - Wait for presentation + /// + /// + /// + /// When the VkSurfaceCapabilitiesPresentWait2KHR surface capability is + /// present for a given surface, an application can wait for an image to be + /// presented to the user by first specifying a presentId for the target + /// presentation by adding a VkPresentId2KHR structure to the pNext + /// chain of the VkPresentInfoKHR structure and then waiting for that + /// presentation to complete by calling: + /// + /// + /// // Provided by VK_KHR_present_wait2 + /// VkResult vkWaitForPresent2KHR( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// const VkPresentWait2InfoKHR* pPresentWait2Info); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult WaitForPresent2KHR( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + in VkPresentWait2InfoKHR pPresentWait2Info + ) + { + fixed (VkPresentWait2InfoKHR* pPresentWait2InfoFixed = &pPresentWait2Info) + { + VkResult result = handle.PInvoke.vkWaitForPresent2KHR.Invoke( + handle.Handle, + swapchain, + pPresentWait2InfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorFullScreenExclusiveModeLostEXT: + throw new VkResultError( + VkResult.ErrorFullScreenExclusiveModeLostEXT, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Timeout: + case VkResult.SuboptimalKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCreatePipelineBinariesKHR - Create pipeline binaries from a pipeline or previously retrieved data + /// + /// + /// + /// To create pipeline binary objects, call: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// VkResult vkCreatePipelineBinariesKHR( + /// VkDevice device, + /// const VkPipelineBinaryCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipelineBinaryHandlesInfoKHR* pBinaries); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreatePipelineBinariesKHR( + this VulkanHandleWrapper handle, + in VkPipelineBinaryCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator, + VkPipelineBinaryHandlesInfoKHR* pBinaries + ) + { + fixed (VkPipelineBinaryCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkResult result = handle.PInvoke.vkCreatePipelineBinariesKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + pBinaries + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + case VkResult.PipelineBinaryMissingKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkDestroyPipelineBinaryKHR - Destroy a pipeline binary + /// + /// + /// + /// To destroy a VkPipelineBinaryKHR, call: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// void vkDestroyPipelineBinaryKHR( + /// VkDevice device, + /// VkPipelineBinaryKHR pipelineBinary, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyPipelineBinaryKHR( + this VulkanHandleWrapper handle, + VkPipelineBinaryKHR pipelineBinary, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyPipelineBinaryKHR.Invoke(handle.Handle, pipelineBinary, pAllocator); + } + + /// + /// vkGetPipelineKeyKHR - Generate the pipeline key from pipeline creation info + /// + /// + /// + /// To generate the key for a particular pipeline creation info, call: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// VkResult vkGetPipelineKeyKHR( + /// VkDevice device, + /// const VkPipelineCreateInfoKHR* pPipelineCreateInfo, + /// VkPipelineBinaryKeyKHR* pPipelineKey); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetPipelineKeyKHR( + this VulkanHandleWrapper handle, + in VkPipelineCreateInfoKHR pPipelineCreateInfo, + ref VkPipelineBinaryKeyKHR pPipelineKey + ) + { + fixed (VkPipelineBinaryKeyKHR* pPipelineKeyFixed = &pPipelineKey) + fixed (VkPipelineCreateInfoKHR* pPipelineCreateInfoFixed = &pPipelineCreateInfo) + { + VkResult result = handle.PInvoke.vkGetPipelineKeyKHR.Invoke( + handle.Handle, + pPipelineCreateInfoFixed, + pPipelineKeyFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPipelineBinaryKeyKHR. + public static VkPipelineBinaryKeyKHR GetPipelineKeyKHR( + this VulkanHandleWrapper handle, + in VkPipelineCreateInfoKHR pPipelineCreateInfo + ) + { + VkPipelineBinaryKeyKHR outValue = new(); + GetPipelineKeyKHR(handle, pPipelineCreateInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPipelineBinaryDataKHR - Get the data store from a pipeline binary + /// + /// + /// + /// Data can be retrieved from a pipeline binary object using the command: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// VkResult vkGetPipelineBinaryDataKHR( + /// VkDevice device, + /// const VkPipelineBinaryDataInfoKHR* pInfo, + /// VkPipelineBinaryKeyKHR* pPipelineBinaryKey, + /// size_t* pPipelineBinaryDataSize, + /// void* pPipelineBinaryData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetPipelineBinaryDataKHR( + this VulkanHandleWrapper handle, + in VkPipelineBinaryDataInfoKHR pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, + ref nuint pPipelineBinaryDataSize, + scoped ReadOnlySpan pPipelineBinaryData + ) + { + fixed (byte* pPipelineBinaryDataFixed = pPipelineBinaryData) + fixed (VkPipelineBinaryDataInfoKHR* pInfoFixed = &pInfo) + fixed (nuint* pPipelineBinaryDataSizeFixed = &pPipelineBinaryDataSize) + { + VkResult result = handle.PInvoke.vkGetPipelineBinaryDataKHR.Invoke( + handle.Handle, + pInfoFixed, + pPipelineBinaryKey, + pPipelineBinaryDataSizeFixed, + pPipelineBinaryDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorNotEnoughSpaceKHR: + throw new VkResultError( + VkResult.ErrorNotEnoughSpaceKHR, + "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_NOT_ENOUGH_SPACE_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetPipelineBinaryDataKHR_Count( + this VulkanHandleWrapper handle, + in VkPipelineBinaryDataInfoKHR pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey + ) + { + nuint pPipelineBinaryDataSize = default; + GetPipelineBinaryDataKHR(handle, pInfo, pPipelineBinaryKey, ref pPipelineBinaryDataSize, null); + return pPipelineBinaryDataSize; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetPipelineBinaryDataKHR_Write( + this VulkanHandleWrapper handle, + in VkPipelineBinaryDataInfoKHR pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, + scoped ReadOnlySpan pPipelineBinaryData + ) + { + nuint pPipelineBinaryDataSize = (nuint)pPipelineBinaryData.Length; + GetPipelineBinaryDataKHR( + handle, + pInfo, + pPipelineBinaryKey, + ref pPipelineBinaryDataSize, + pPipelineBinaryData + ); + } + + /// + /// vkReleaseCapturedPipelineDataKHR - Release captured pipeline binary data + /// + /// + /// + /// To release pipeline resources captured with + /// VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR, call: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// VkResult vkReleaseCapturedPipelineDataKHR( + /// VkDevice device, + /// const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ReleaseCapturedPipelineDataKHR( + this VulkanHandleWrapper handle, + in VkReleaseCapturedPipelineDataInfoKHR pInfo, + VkAllocator? pAllocator + ) + { + fixed (VkReleaseCapturedPipelineDataInfoKHR* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkReleaseCapturedPipelineDataKHR.Invoke( + handle.Handle, + pInfoFixed, + pAllocator + ); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkReleaseCapturedPipelineDataKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkReleaseCapturedPipelineDataKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkReleaseSwapchainImagesKHR - Release previously acquired but unused images + /// + /// + /// + /// To release images previously acquired through + /// vkAcquireNextImageKHR, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ReleaseSwapchainImagesKHR( + this VulkanHandleWrapper handle, + in VkReleaseSwapchainImagesInfoKHR pReleaseInfo + ) + { + fixed (VkReleaseSwapchainImagesInfoKHR* pReleaseInfoFixed = &pReleaseInfo) + { + VkResult result = handle.PInvoke.vkReleaseSwapchainImagesKHR.Invoke(handle.Handle, pReleaseInfoFixed); + switch (result) + { + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkReleaseSwapchainImagesKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkReleaseSwapchainImagesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkReleaseSwapchainImagesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLineStippleKHR(this T handle, int lineStippleFactor, ushort lineStipplePattern) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLineStippleKHR.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern); + } + + /// + /// vkGetCalibratedTimestampsKHR - Query calibrated timestamps + /// + /// + /// + /// :refpage: vkGetCalibratedTimestampsKHR + /// + /// + /// In order to be able to correlate the time a particular operation took place + /// at on timelines of different time domains (e.g. a device operation vs. a + /// host operation), Vulkan allows querying calibrated timestamps from multiple + /// time domains. + /// + /// + /// To query calibrated timestamps from a set of time domains, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetCalibratedTimestampsKHR( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pTimestampInfos, + scoped ReadOnlySpan pTimestamps + ) + { + fixed (nint* pTimestampsFixed = pTimestamps) + fixed (VkCalibratedTimestampInfoKHR* pTimestampInfosFixed = pTimestampInfos) + { + nint pMaxDeviationLocal = default; + VkResult result = handle.PInvoke.vkGetCalibratedTimestampsKHR.Invoke( + handle.Handle, + pTimestampInfos.Length, + pTimestampInfosFixed, + pTimestampsFixed, + &pMaxDeviationLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pMaxDeviationLocal; + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDescriptorSets2KHR( + this T handle, + in VkBindDescriptorSetsInfo pBindDescriptorSetsInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkBindDescriptorSetsInfo* pBindDescriptorSetsInfoFixed = &pBindDescriptorSetsInfo) + { + handle.PInvoke.vkCmdBindDescriptorSets2KHR.Invoke(handle.Handle, pBindDescriptorSetsInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushConstants2KHR(this T handle, in VkPushConstantsInfo pPushConstantsInfo) + where T : VulkanHandleWrapper + { + fixed (VkPushConstantsInfo* pPushConstantsInfoFixed = &pPushConstantsInfo) + { + handle.PInvoke.vkCmdPushConstants2KHR.Invoke(handle.Handle, pPushConstantsInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSet2KHR( + this T handle, + in VkPushDescriptorSetInfo pPushDescriptorSetInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkPushDescriptorSetInfo* pPushDescriptorSetInfoFixed = &pPushDescriptorSetInfo) + { + handle.PInvoke.vkCmdPushDescriptorSet2KHR.Invoke(handle.Handle, pPushDescriptorSetInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDescriptorSetWithTemplate2KHR( + this T handle, + in VkPushDescriptorSetWithTemplateInfo pPushDescriptorSetWithTemplateInfo + ) + where T : VulkanHandleWrapper + { + fixed ( + VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfoFixed = + &pPushDescriptorSetWithTemplateInfo + ) + { + handle.PInvoke.vkCmdPushDescriptorSetWithTemplate2KHR.Invoke( + handle.Handle, + pPushDescriptorSetWithTemplateInfoFixed + ); + } + } + + /// + /// vkCmdSetDescriptorBufferOffsets2EXT - Setting descriptor buffer offsets in a command buffer + /// + /// + /// + /// :refpage: vkCmdSetDescriptorBufferOffsets2EXT + /// + /// + /// To set descriptor buffer offsets in a command buffer, call: + /// + /// + /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer + /// void vkCmdSetDescriptorBufferOffsets2EXT( + /// VkCommandBuffer commandBuffer, + /// const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDescriptorBufferOffsets2EXT( + this T handle, + in VkSetDescriptorBufferOffsetsInfoEXT pSetDescriptorBufferOffsetsInfo + ) + where T : VulkanHandleWrapper + { + fixed ( + VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfoFixed = + &pSetDescriptorBufferOffsetsInfo + ) + { + handle.PInvoke.vkCmdSetDescriptorBufferOffsets2EXT.Invoke( + handle.Handle, + pSetDescriptorBufferOffsetsInfoFixed + ); + } + } + + /// + /// vkCmdBindDescriptorBufferEmbeddedSamplers2EXT - Setting embedded immutable samplers offsets in a command buffer + /// + /// + /// + /// :refpage: vkCmdBindDescriptorBufferEmbeddedSamplers2EXT + /// + /// + /// To bind an embedded immutable sampler set to a command buffer, call: + /// + /// + /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer + /// void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( + /// VkCommandBuffer commandBuffer, + /// const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDescriptorBufferEmbeddedSamplers2EXT( + this T handle, + in VkBindDescriptorBufferEmbeddedSamplersInfoEXT pBindDescriptorBufferEmbeddedSamplersInfo + ) + where T : VulkanHandleWrapper + { + fixed ( + VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfoFixed = + &pBindDescriptorBufferEmbeddedSamplersInfo + ) + { + handle.PInvoke.vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.Invoke( + handle.Handle, + pBindDescriptorBufferEmbeddedSamplersInfoFixed + ); + } + } + + /// + /// vkCmdCopyMemoryIndirectKHR - Copy data between memory regions + /// + /// + /// + /// To copy data between two memory regions by specifying copy parameters + /// indirectly in memory, call: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// void vkCmdCopyMemoryIndirectKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryIndirectKHR( + this T handle, + in VkCopyMemoryIndirectInfoKHR pCopyMemoryIndirectInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfoFixed = &pCopyMemoryIndirectInfo) + { + handle.PInvoke.vkCmdCopyMemoryIndirectKHR.Invoke(handle.Handle, pCopyMemoryIndirectInfoFixed); + } + } + + /// + /// vkCmdCopyMemoryToImageIndirectKHR - Copy data from a memory region to an image object + /// + /// + /// + /// :refpage: vkCmdCopyMemoryToImageIndirectKHR + /// + /// + /// To copy data from a memory region to an image object by specifying copy + /// parameters in memory, call: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// void vkCmdCopyMemoryToImageIndirectKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryToImageIndirectKHR( + this T handle, + in VkCopyMemoryToImageIndirectInfoKHR pCopyMemoryToImageIndirectInfo + ) + where T : VulkanHandleWrapper + { + fixed ( + VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfoFixed = + &pCopyMemoryToImageIndirectInfo + ) + { + handle.PInvoke.vkCmdCopyMemoryToImageIndirectKHR.Invoke( + handle.Handle, + pCopyMemoryToImageIndirectInfoFixed + ); + } + } + + /// + /// vkGetDeviceFaultReportsKHR - Reports fault information for the specified device + /// + /// + /// + /// To retrieve diagnostic information about faults call: + /// + /// + /// // Provided by VK_KHR_device_fault + /// VkResult vkGetDeviceFaultReportsKHR( + /// VkDevice device, + /// uint64_t timeout, + /// uint32_t* pFaultCounts, + /// VkDeviceFaultInfoKHR* pFaultInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetFaultReportsKHR( + this VulkanHandleWrapper handle, + nint timeout, + ref int pFaultCounts, + scoped ReadOnlySpan pFaultInfo + ) + { + fixed (VkDeviceFaultInfoKHR* pFaultInfoFixed = pFaultInfo) + fixed (int* pFaultCountsFixed = &pFaultCounts) + { + VkResult result = handle.PInvoke.vkGetDeviceFaultReportsKHR.Invoke( + handle.Handle, + timeout, + pFaultCountsFixed, + pFaultInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceFaultReportsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceFaultReportsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceFaultReportsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + case VkResult.Timeout: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetFaultReportsKHR_Count( + this VulkanHandleWrapper handle, + nint timeout + ) + { + int pFaultCounts = default; + GetFaultReportsKHR(handle, timeout, ref pFaultCounts, null); + return pFaultCounts; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetFaultReportsKHR_Write( + this VulkanHandleWrapper handle, + nint timeout, + scoped ReadOnlySpan pFaultInfo + ) + { + int pFaultCounts = pFaultInfo.Length; + return GetFaultReportsKHR(handle, timeout, ref pFaultCounts, pFaultInfo); + } + + /// + /// vkGetDeviceFaultDebugInfoKHR - Retrieve vendor-specific crash dump data for the specified logical device + /// + /// + /// + /// To retrieve a vendor-specific binary crash dump call: + /// + /// + /// // Provided by VK_KHR_device_fault + /// VkResult vkGetDeviceFaultDebugInfoKHR( + /// VkDevice device, + /// VkDeviceFaultDebugInfoKHR* pDebugInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetFaultDebugInfoKHR( + this VulkanHandleWrapper handle, + ref VkDeviceFaultDebugInfoKHR pDebugInfo + ) + { + fixed (VkDeviceFaultDebugInfoKHR* pDebugInfoFixed = &pDebugInfo) + { + VkResult result = handle.PInvoke.vkGetDeviceFaultDebugInfoKHR.Invoke(handle.Handle, pDebugInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorNotEnoughSpaceKHR: + throw new VkResultError( + VkResult.ErrorNotEnoughSpaceKHR, + "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_NOT_ENOUGH_SPACE_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// + /// vkCmdEndRendering2KHR - End a dynamic render pass instance + /// + /// + /// + /// To end a render pass instance, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndRendering2KHR(this T handle, in VkRenderingEndInfoKHR pRenderingEndInfo) + where T : VulkanHandleWrapper + { + fixed (VkRenderingEndInfoKHR* pRenderingEndInfoFixed = &pRenderingEndInfo) + { + handle.PInvoke.vkCmdEndRendering2KHR.Invoke(handle.Handle, pRenderingEndInfoFixed); + } + } + + /// + /// vkDebugMarkerSetObjectTagEXT - Attach arbitrary data to an object + /// + /// + /// + /// In addition to setting a name for an object, debugging and validation layers + /// may have uses for additional binary data on a per-object basis that has no + /// other place in the Vulkan API. + /// For example, a VkShaderModule could have additional debugging data + /// attached to it to aid in offline shader tracing. + /// To attach data to an object, call: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// VkResult vkDebugMarkerSetObjectTagEXT( + /// VkDevice device, + /// const VkDebugMarkerObjectTagInfoEXT* pTagInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMarkerSetObjectTagEXT( + this VulkanHandleWrapper handle, + in VkDebugMarkerObjectTagInfoEXT pTagInfo + ) + { + fixed (VkDebugMarkerObjectTagInfoEXT* pTagInfoFixed = &pTagInfo) + { + VkResult result = handle.PInvoke.vkDebugMarkerSetObjectTagEXT.Invoke(handle.Handle, pTagInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkDebugMarkerSetObjectNameEXT - Give an application-defined name to an object + /// + /// + /// + /// An object can be given an application-defined name by calling: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// VkResult vkDebugMarkerSetObjectNameEXT( + /// VkDevice device, + /// const VkDebugMarkerObjectNameInfoEXT* pNameInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMarkerSetObjectNameEXT( + this VulkanHandleWrapper handle, + in VkDebugMarkerObjectNameInfoEXT pNameInfo + ) + { + fixed (VkDebugMarkerObjectNameInfoEXT* pNameInfoFixed = &pNameInfo) + { + VkResult result = handle.PInvoke.vkDebugMarkerSetObjectNameEXT.Invoke(handle.Handle, pNameInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdDebugMarkerBeginEXT - Open a command buffer marker region + /// + /// + /// + /// A marker region can be opened by calling: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// void vkCmdDebugMarkerBeginEXT( + /// VkCommandBuffer commandBuffer, + /// const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMarkerBeginEXT(this T handle, in VkDebugMarkerMarkerInfoEXT pMarkerInfo) + where T : VulkanHandleWrapper + { + fixed (VkDebugMarkerMarkerInfoEXT* pMarkerInfoFixed = &pMarkerInfo) + { + handle.PInvoke.vkCmdDebugMarkerBeginEXT.Invoke(handle.Handle, pMarkerInfoFixed); + } + } + + /// + /// vkCmdDebugMarkerEndEXT - Close a command buffer marker region + /// + /// + /// + /// A marker region can be closed by calling: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// void vkCmdDebugMarkerEndEXT( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DebugMarkerEndEXT(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDebugMarkerEndEXT.Invoke(handle.Handle); + } + + /// + /// vkCmdDebugMarkerInsertEXT - Insert a marker label into a command buffer + /// + /// + /// + /// A single marker label can be inserted into a command buffer by calling: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// void vkCmdDebugMarkerInsertEXT( + /// VkCommandBuffer commandBuffer, + /// const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugMarkerInsertEXT(this T handle, in VkDebugMarkerMarkerInfoEXT pMarkerInfo) + where T : VulkanHandleWrapper + { + fixed (VkDebugMarkerMarkerInfoEXT* pMarkerInfoFixed = &pMarkerInfo) + { + handle.PInvoke.vkCmdDebugMarkerInsertEXT.Invoke(handle.Handle, pMarkerInfoFixed); + } + } + + /// + /// vkCmdBindTransformFeedbackBuffersEXT - Bind transform feedback buffers to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindTransformFeedbackBuffersEXT + /// + /// + /// To bind transform feedback buffers to a command buffer for use in subsequent + /// drawing commands, call: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// void vkCmdBindTransformFeedbackBuffersEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstBinding, + /// uint32_t bindingCount, + /// const VkBuffer* pBuffers, + /// const VkDeviceSize* pOffsets, + /// const VkDeviceSize* pSizes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTransformFeedbackBuffersEXT( + this T handle, + int firstBinding, + scoped ReadOnlySpan pBuffers, + scoped ReadOnlySpan pOffsets, + scoped ReadOnlySpan pSizes + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize64* pSizesFixed = pSizes) + fixed (ByteSize64* pOffsetsFixed = pOffsets) + fixed (VkBuffer* pBuffersFixed = pBuffers) + { + handle.PInvoke.vkCmdBindTransformFeedbackBuffersEXT.Invoke( + handle.Handle, + firstBinding, + pBuffers.Length, + pBuffersFixed, + pOffsetsFixed, + pSizesFixed + ); + } + } + + /// + /// vkCmdBeginTransformFeedbackEXT - Make transform feedback active in the command buffer + /// + /// + /// + /// :refpage: vkCmdBeginTransformFeedbackEXT + /// :firstcounter: firstCounterBuffer + /// :countercount: counterBufferCount + /// :bindCommand: vkCmdBindTransformFeedbackBuffersEXT + /// + /// + /// Transform feedback for specific transform feedback buffers is made active by + /// calling: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// void vkCmdBeginTransformFeedbackEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstCounterBuffer, + /// uint32_t counterBufferCount, + /// const VkBuffer* pCounterBuffers, + /// const VkDeviceSize* pCounterBufferOffsets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginTransformFeedbackEXT( + this T handle, + int firstCounterBuffer, + scoped ReadOnlySpan pCounterBuffers, + scoped ReadOnlySpan pCounterBufferOffsets + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize64* pCounterBufferOffsetsFixed = pCounterBufferOffsets) + fixed (VkBuffer* pCounterBuffersFixed = pCounterBuffers) + { + handle.PInvoke.vkCmdBeginTransformFeedbackEXT.Invoke( + handle.Handle, + firstCounterBuffer, + pCounterBuffers.Length, + pCounterBuffersFixed, + pCounterBufferOffsetsFixed + ); + } + } + + /// + /// vkCmdEndTransformFeedbackEXT - Make transform feedback inactive in the command buffer + /// + /// + /// + /// :refpage: vkCmdEndTransformFeedbackEXT + /// :countercount: counterBufferCount + /// + /// + /// Transform feedback for specific transform feedback buffers is made inactive + /// by calling: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// void vkCmdEndTransformFeedbackEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstCounterBuffer, + /// uint32_t counterBufferCount, + /// const VkBuffer* pCounterBuffers, + /// const VkDeviceSize* pCounterBufferOffsets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndTransformFeedbackEXT( + this T handle, + int firstCounterBuffer, + scoped ReadOnlySpan pCounterBuffers, + scoped ReadOnlySpan pCounterBufferOffsets + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize64* pCounterBufferOffsetsFixed = pCounterBufferOffsets) + fixed (VkBuffer* pCounterBuffersFixed = pCounterBuffers) + { + handle.PInvoke.vkCmdEndTransformFeedbackEXT.Invoke( + handle.Handle, + firstCounterBuffer, + pCounterBuffers.Length, + pCounterBuffersFixed, + pCounterBufferOffsetsFixed + ); + } + } + + /// + /// vkCmdBeginQueryIndexedEXT - Begin an indexed query + /// + /// + /// + /// :refpage: vkCmdBeginQueryIndexedEXT + /// + /// + /// To begin an indexed query, call: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// void vkCmdBeginQueryIndexedEXT( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t query, + /// VkQueryControlFlags flags, + /// uint32_t index); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BeginQueryIndexedEXT( + this T handle, + VkQueryPool queryPool, + int query, + VkQueryControlFlags flags, + int index + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBeginQueryIndexedEXT.Invoke(handle.Handle, queryPool, query, flags, index); + } + + /// + /// vkCmdEndQueryIndexedEXT - Ends a query + /// + /// + /// + /// :refpage: vkCmdEndQueryIndexedEXT + /// + /// + /// To end an indexed query after the set of desired drawing or dispatching + /// commands is recorded, call: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// void vkCmdEndQueryIndexedEXT( + /// VkCommandBuffer commandBuffer, + /// VkQueryPool queryPool, + /// uint32_t query, + /// uint32_t index); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndQueryIndexedEXT(this T handle, VkQueryPool queryPool, int query, int index) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndQueryIndexedEXT.Invoke(handle.Handle, queryPool, query, index); + } + + /// + /// vkCmdDrawIndirectByteCountEXT - Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter buffer + /// + /// + /// + /// :refpage: vkCmdDrawIndirectByteCountEXT + /// + /// + /// To record a non-indexed draw call, where the vertex count is based on a byte + /// count read from a buffer and the passed in vertex stride parameter, call: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// void vkCmdDrawIndirectByteCountEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t instanceCount, + /// uint32_t firstInstance, + /// VkBuffer counterBuffer, + /// VkDeviceSize counterBufferOffset, + /// uint32_t counterOffset, + /// uint32_t vertexStride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndirectByteCountEXT( + this T handle, + int instanceCount, + int firstInstance, + VkBuffer counterBuffer, + ByteSize64 counterBufferOffset, + int counterOffset, + int vertexStride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndirectByteCountEXT.Invoke( + handle.Handle, + instanceCount, + firstInstance, + counterBuffer, + counterBufferOffset, + counterOffset, + vertexStride + ); + } + + /// + /// vkCreateCuModuleNVX - Stub description of vkCreateCuModuleNVX + /// + /// + /// + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// VkResult vkCreateCuModuleNVX( + /// VkDevice device, + /// const VkCuModuleCreateInfoNVX* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkCuModuleNVX* pModule); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkCuModuleNVX CreateCuModuleNVX( + this VulkanHandleWrapper handle, + in VkCuModuleCreateInfoNVX pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkCuModuleCreateInfoNVX* pCreateInfoFixed = &pCreateInfo) + { + VkCuModuleNVX pModuleLocal = default; + VkResult result = handle.PInvoke.vkCreateCuModuleNVX.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pModuleLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pModuleLocal; + } + } + + /// + /// vkCreateCuFunctionNVX - Stub description of vkCreateCuFunctionNVX + /// + /// + /// + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// VkResult vkCreateCuFunctionNVX( + /// VkDevice device, + /// const VkCuFunctionCreateInfoNVX* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkCuFunctionNVX* pFunction); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkCuFunctionNVX CreateCuFunctionNVX( + this VulkanHandleWrapper handle, + in VkCuFunctionCreateInfoNVX pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkCuFunctionCreateInfoNVX* pCreateInfoFixed = &pCreateInfo) + { + VkCuFunctionNVX pFunctionLocal = default; + VkResult result = handle.PInvoke.vkCreateCuFunctionNVX.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pFunctionLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pFunctionLocal; + } + } + + /// + /// vkDestroyCuModuleNVX - Stub description of vkDestroyCuModuleNVX + /// + /// + /// + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// void vkDestroyCuModuleNVX( + /// VkDevice device, + /// VkCuModuleNVX module, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyCuModuleNVX( + this VulkanHandleWrapper handle, + VkCuModuleNVX module, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyCuModuleNVX.Invoke(handle.Handle, module, pAllocator); + } + + /// + /// vkDestroyCuFunctionNVX - Stub description of vkDestroyCuFunctionNVX + /// + /// + /// + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// void vkDestroyCuFunctionNVX( + /// VkDevice device, + /// VkCuFunctionNVX function, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyCuFunctionNVX( + this VulkanHandleWrapper handle, + VkCuFunctionNVX function, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyCuFunctionNVX.Invoke(handle.Handle, function, pAllocator); + } + + /// + /// vkCmdCuLaunchKernelNVX - Stub description of vkCmdCuLaunchKernelNVX + /// + /// + /// + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// void vkCmdCuLaunchKernelNVX( + /// VkCommandBuffer commandBuffer, + /// const VkCuLaunchInfoNVX* pLaunchInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CuLaunchKernelNVX(this T handle, in VkCuLaunchInfoNVX pLaunchInfo) + where T : VulkanHandleWrapper + { + fixed (VkCuLaunchInfoNVX* pLaunchInfoFixed = &pLaunchInfo) + { + handle.PInvoke.vkCmdCuLaunchKernelNVX.Invoke(handle.Handle, pLaunchInfoFixed); + } + } + + /// + /// vkGetImageViewHandleNVX - Get the handle for an image view for a specific descriptor type + /// + /// + /// + /// To get the handle for an image view, call: + /// + /// + /// // Provided by VK_NVX_image_view_handle + /// uint32_t vkGetImageViewHandleNVX( + /// VkDevice device, + /// const VkImageViewHandleInfoNVX* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetImageViewHandleNVX( + this VulkanHandleWrapper handle, + in VkImageViewHandleInfoNVX pInfo + ) + { + fixed (VkImageViewHandleInfoNVX* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetImageViewHandleNVX.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkGetImageViewHandle64NVX - Get the 64-bit handle for an image view for a specific descriptor type + /// + /// + /// + /// To get the 64-bit handle for an image view, call: + /// + /// + /// // Provided by VK_NVX_image_view_handle + /// uint64_t vkGetImageViewHandle64NVX( + /// VkDevice device, + /// const VkImageViewHandleInfoNVX* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetImageViewHandle64NVX( + this VulkanHandleWrapper handle, + in VkImageViewHandleInfoNVX pInfo + ) + { + fixed (VkImageViewHandleInfoNVX* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetImageViewHandle64NVX.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkGetImageViewAddressNVX - Get the device address of an image view + /// + /// + /// + /// To get the device address for an image view, call: + /// + /// + /// // Provided by VK_NVX_image_view_handle + /// VkResult vkGetImageViewAddressNVX( + /// VkDevice device, + /// VkImageView imageView, + /// VkImageViewAddressPropertiesNVX* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageViewAddressNVX( + this VulkanHandleWrapper handle, + VkImageView imageView, + ref VkImageViewAddressPropertiesNVX pProperties + ) + { + fixed (VkImageViewAddressPropertiesNVX* pPropertiesFixed = &pProperties) + { + VkResult result = handle.PInvoke.vkGetImageViewAddressNVX.Invoke( + handle.Handle, + imageView, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetImageViewAddressNVX failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetImageViewAddressNVX failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetImageViewAddressNVX failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkImageViewAddressPropertiesNVX. + public static VkImageViewAddressPropertiesNVX GetImageViewAddressNVX( + this VulkanHandleWrapper handle, + VkImageView imageView + ) + { + VkImageViewAddressPropertiesNVX outValue = new(); + GetImageViewAddressNVX(handle, imageView, ref outValue); + return outValue; + } + + /// + /// vkGetDeviceCombinedImageSamplerIndexNVX - Get the handle for an image view and sampler index + /// + /// + /// + /// To get the handle for a combined image sampler, call: + /// + /// + /// // Provided by VK_NVX_image_view_handle + /// uint64_t vkGetDeviceCombinedImageSamplerIndexNVX( + /// VkDevice device, + /// uint64_t imageViewIndex, + /// uint64_t samplerIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static nint GetCombinedImageSamplerIndexNVX( + this VulkanHandleWrapper handle, + nint imageViewIndex, + nint samplerIndex + ) + { + return handle.PInvoke.vkGetDeviceCombinedImageSamplerIndexNVX.Invoke( + handle.Handle, + imageViewIndex, + samplerIndex + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndirectCountAMD( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndirectCountAMD.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawIndexedIndirectCountAMD( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawIndexedIndirectCountAMD.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// vkGetShaderInfoAMD - Get information about a shader in a pipeline + /// + /// + /// + /// Information about a particular shader that has been compiled as part of a + /// pipeline object can be extracted by calling: + /// + /// + /// // Provided by VK_AMD_shader_info + /// VkResult vkGetShaderInfoAMD( + /// VkDevice device, + /// VkPipeline pipeline, + /// VkShaderStageFlagBits shaderStage, + /// VkShaderInfoTypeAMD infoType, + /// size_t* pInfoSize, + /// void* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetShaderInfoAMD( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + VkShaderStageFlags shaderStage, + VkShaderInfoTypeAMD infoType, + ref nuint pInfoSize, + scoped ReadOnlySpan pInfo + ) + { + fixed (byte* pInfoFixed = pInfo) + fixed (nuint* pInfoSizeFixed = &pInfoSize) + { + VkResult result = handle.PInvoke.vkGetShaderInfoAMD.Invoke( + handle.Handle, + pipeline, + shaderStage, + infoType, + pInfoSizeFixed, + pInfoFixed + ); + switch (result) + { + case VkResult.ErrorFeatureNotPresent: + throw new VkResultError( + VkResult.ErrorFeatureNotPresent, + "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_FEATURE_NOT_PRESENT" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetShaderInfoAMD_Count( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + VkShaderStageFlags shaderStage, + VkShaderInfoTypeAMD infoType + ) + { + nuint pInfoSize = default; + GetShaderInfoAMD(handle, pipeline, shaderStage, infoType, ref pInfoSize, null); + return pInfoSize; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetShaderInfoAMD_Write( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + VkShaderStageFlags shaderStage, + VkShaderInfoTypeAMD infoType, + scoped ReadOnlySpan pInfo + ) + { + nuint pInfoSize = (nuint)pInfo.Length; + return GetShaderInfoAMD(handle, pipeline, shaderStage, infoType, ref pInfoSize, pInfo); + } + + /// + /// vkCmdBeginConditionalRenderingEXT - Define the beginning of a conditional rendering block + /// + /// + /// + /// To begin conditional rendering, call: + /// + /// + /// // Provided by VK_EXT_conditional_rendering + /// void vkCmdBeginConditionalRenderingEXT( + /// VkCommandBuffer commandBuffer, + /// const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginConditionalRenderingEXT( + this T handle, + VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBeginConditionalRenderingEXT.Invoke(handle.Handle, pConditionalRenderingBegin); + } + + /// + /// vkCmdEndConditionalRenderingEXT - Define the end of a conditional rendering block + /// + /// + /// + /// To end conditional rendering, call: + /// + /// + /// // Provided by VK_EXT_conditional_rendering + /// void vkCmdEndConditionalRenderingEXT( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndConditionalRenderingEXT(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndConditionalRenderingEXT.Invoke(handle.Handle); + } + + /// + /// vkCmdSetViewportWScalingNV - Set the viewport W scaling dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the viewport *W* scaling + /// parameters, call: + /// + /// + /// // Provided by VK_NV_clip_space_w_scaling + /// void vkCmdSetViewportWScalingNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstViewport, + /// uint32_t viewportCount, + /// const VkViewportWScalingNV* pViewportWScalings); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetViewportWScalingNV( + this T handle, + int firstViewport, + scoped ReadOnlySpan pViewportWScalings + ) + where T : VulkanHandleWrapper + { + fixed (VkViewportWScalingNV* pViewportWScalingsFixed = pViewportWScalings) + { + handle.PInvoke.vkCmdSetViewportWScalingNV.Invoke( + handle.Handle, + firstViewport, + pViewportWScalings.Length, + pViewportWScalingsFixed + ); + } + } + + /// + /// vkDisplayPowerControlEXT - Set the power state of a display + /// + /// + /// + /// :refpage: vkDisplayPowerControlEXT + /// + /// + /// To set the power state of a display, call: + /// + /// + /// // Provided by VK_EXT_display_control + /// VkResult vkDisplayPowerControlEXT( + /// VkDevice device, + /// VkDisplayKHR display, + /// const VkDisplayPowerInfoEXT* pDisplayPowerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DisplayPowerControlEXT( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + in VkDisplayPowerInfoEXT pDisplayPowerInfo + ) + { + fixed (VkDisplayPowerInfoEXT* pDisplayPowerInfoFixed = &pDisplayPowerInfo) + { + VkResult result = handle.PInvoke.vkDisplayPowerControlEXT.Invoke( + handle.Handle, + display, + pDisplayPowerInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkDisplayPowerControlEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkDisplayPowerControlEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkDisplayPowerControlEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkRegisterDeviceEventEXT - Signal a fence when a device event occurs + /// + /// + /// + /// :refpage: vkRegisterDeviceEventEXT + /// + /// + /// To create a fence that will be signaled when an event occurs on a device, + /// call: + /// + /// + /// // Provided by VK_EXT_display_control + /// VkResult vkRegisterDeviceEventEXT( + /// VkDevice device, + /// const VkDeviceEventInfoEXT* pDeviceEventInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkFence* pFence); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void RegisterDeviceEventEXT( + this VulkanHandleWrapper handle, + in VkDeviceEventInfoEXT pDeviceEventInfo, + VkAllocator? pAllocator, + VkFence* pFence + ) + { + fixed (VkDeviceEventInfoEXT* pDeviceEventInfoFixed = &pDeviceEventInfo) + { + VkResult result = handle.PInvoke.vkRegisterDeviceEventEXT.Invoke( + handle.Handle, + pDeviceEventInfoFixed, + pAllocator, + pFence + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkRegisterDeviceEventEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkRegisterDeviceEventEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkRegisterDeviceEventEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkRegisterDisplayEventEXT - Signal a fence when a display event occurs + /// + /// + /// + /// :refpage: vkRegisterDisplayEventEXT + /// + /// + /// To create a fence that will be signaled when an event occurs on a + /// VkDisplayKHR object, call: + /// + /// + /// // Provided by VK_EXT_display_control + /// VkResult vkRegisterDisplayEventEXT( + /// VkDevice device, + /// VkDisplayKHR display, + /// const VkDisplayEventInfoEXT* pDisplayEventInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkFence* pFence); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void RegisterDisplayEventEXT( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + in VkDisplayEventInfoEXT pDisplayEventInfo, + VkAllocator? pAllocator, + VkFence* pFence + ) + { + fixed (VkDisplayEventInfoEXT* pDisplayEventInfoFixed = &pDisplayEventInfo) + { + VkResult result = handle.PInvoke.vkRegisterDisplayEventEXT.Invoke( + handle.Handle, + display, + pDisplayEventInfoFixed, + pAllocator, + pFence + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkRegisterDisplayEventEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkRegisterDisplayEventEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkRegisterDisplayEventEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetSwapchainCounterEXT - Query the current value of a surface counter + /// + /// + /// + /// :refpage: vkGetSwapchainCounterEXT + /// + /// + /// The requested counters become active when the first presentation command for + /// the associated swapchain is processed by the presentation engine. + /// To query the value of an active counter, use: + /// + /// + /// // Provided by VK_EXT_display_control + /// VkResult vkGetSwapchainCounterEXT( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// VkSurfaceCounterFlagBitsEXT counter, + /// uint64_t* pCounterValue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetSwapchainCounterEXT( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + VkSurfaceCounterFlagsEXT counter + ) + { + nint pCounterValueLocal = default; + VkResult result = handle.PInvoke.vkGetSwapchainCounterEXT.Invoke( + handle.Handle, + swapchain, + counter, + &pCounterValueLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pCounterValueLocal; + } + + /// + /// vkGetRefreshCycleDurationGOOGLE - Obtain the RC duration of the PE&apos;s display + /// + /// + /// + /// To query the duration of a refresh cycle (RC) for the presentation engine's + /// display, call: + /// + /// + /// // Provided by VK_GOOGLE_display_timing + /// VkResult vkGetRefreshCycleDurationGOOGLE( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRefreshCycleDurationGOOGLE( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + ref VkRefreshCycleDurationGOOGLE pDisplayTimingProperties + ) + { + fixed (VkRefreshCycleDurationGOOGLE* pDisplayTimingPropertiesFixed = &pDisplayTimingProperties) + { + VkResult result = handle.PInvoke.vkGetRefreshCycleDurationGOOGLE.Invoke( + handle.Handle, + swapchain, + pDisplayTimingPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkRefreshCycleDurationGOOGLE. + public static VkRefreshCycleDurationGOOGLE GetRefreshCycleDurationGOOGLE( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain + ) + { + VkRefreshCycleDurationGOOGLE outValue = new(); + GetRefreshCycleDurationGOOGLE(handle, swapchain, ref outValue); + return outValue; + } + + /// + /// vkGetPastPresentationTimingGOOGLE - Obtain timing of a previously-presented image + /// + /// + /// + /// The implementation will maintain a limited amount of history of timing + /// information about previous presents. + /// Because of the asynchronous nature of the presentation engine, the timing + /// information for a given vkQueuePresentKHR command will become + /// available some time later. + /// These time values can be asynchronously queried, and will be returned if + /// available. + /// All time values are in nanoseconds, relative to a monotonically-increasing + /// clock (e.g. `CLOCK_MONOTONIC` (see clock_gettime(2)) on Android and Linux). + /// + /// + /// To asynchronously query the presentation engine, for newly-available timing + /// information about one or more previous presents to a given swapchain, call: + /// + /// + /// // Provided by VK_GOOGLE_display_timing + /// VkResult vkGetPastPresentationTimingGOOGLE( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// uint32_t* pPresentationTimingCount, + /// VkPastPresentationTimingGOOGLE* pPresentationTimings); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetPastPresentationTimingGOOGLE( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + ref int pPresentationTimingCount, + scoped ReadOnlySpan pPresentationTimings + ) + { + fixed (VkPastPresentationTimingGOOGLE* pPresentationTimingsFixed = pPresentationTimings) + fixed (int* pPresentationTimingCountFixed = &pPresentationTimingCount) + { + VkResult result = handle.PInvoke.vkGetPastPresentationTimingGOOGLE.Invoke( + handle.Handle, + swapchain, + pPresentationTimingCountFixed, + pPresentationTimingsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetPastPresentationTimingGOOGLE_Count( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain + ) + { + int pPresentationTimingCount = default; + GetPastPresentationTimingGOOGLE(handle, swapchain, ref pPresentationTimingCount, null); + return pPresentationTimingCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetPastPresentationTimingGOOGLE_Write( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + scoped ReadOnlySpan pPresentationTimings + ) + { + int pPresentationTimingCount = pPresentationTimings.Length; + return GetPastPresentationTimingGOOGLE( + handle, + swapchain, + ref pPresentationTimingCount, + pPresentationTimings + ); + } + + /// + /// vkCmdSetDiscardRectangleEXT - Set discard rectangles dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the discard rectangles, + /// call: + /// + /// + /// // Provided by VK_EXT_discard_rectangles + /// void vkCmdSetDiscardRectangleEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstDiscardRectangle, + /// uint32_t discardRectangleCount, + /// const VkRect2D* pDiscardRectangles); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDiscardRectangleEXT( + this T handle, + int firstDiscardRectangle, + scoped ReadOnlySpan pDiscardRectangles + ) + where T : VulkanHandleWrapper + { + fixed (VkRect2D* pDiscardRectanglesFixed = pDiscardRectangles) + { + handle.PInvoke.vkCmdSetDiscardRectangleEXT.Invoke( + handle.Handle, + firstDiscardRectangle, + pDiscardRectangles.Length, + pDiscardRectanglesFixed + ); + } + } + + /// + /// vkCmdSetDiscardRectangleEnableEXT - Enable discard rectangles dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ whether discard rectangles + /// are enabled, call: + /// + /// + /// // Provided by VK_EXT_discard_rectangles + /// void vkCmdSetDiscardRectangleEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 discardRectangleEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDiscardRectangleEnableEXT(this T handle, Brutal.Bool32 discardRectangleEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDiscardRectangleEnableEXT.Invoke(handle.Handle, discardRectangleEnable); + } + + /// + /// vkCmdSetDiscardRectangleModeEXT - Sets the discard rectangle mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the discard rectangle mode, + /// call: + /// + /// + /// // Provided by VK_EXT_discard_rectangles + /// void vkCmdSetDiscardRectangleModeEXT( + /// VkCommandBuffer commandBuffer, + /// VkDiscardRectangleModeEXT discardRectangleMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDiscardRectangleModeEXT(this T handle, VkDiscardRectangleModeEXT discardRectangleMode) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDiscardRectangleModeEXT.Invoke(handle.Handle, discardRectangleMode); + } + + /// + /// vkSetHdrMetadataEXT - Set HDR metadata + /// + /// + /// + /// To provide HDR metadata to an implementation, call: + /// + /// + /// // Provided by VK_EXT_hdr_metadata + /// void vkSetHdrMetadataEXT( + /// VkDevice device, + /// uint32_t swapchainCount, + /// const VkSwapchainKHR* pSwapchains, + /// const VkHdrMetadataEXT* pMetadata); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetHdrMetadataEXT( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pSwapchains, + scoped ReadOnlySpan pMetadata + ) + { + fixed (VkHdrMetadataEXT* pMetadataFixed = pMetadata) + fixed (VkSwapchainKHR* pSwapchainsFixed = pSwapchains) + { + handle.PInvoke.vkSetHdrMetadataEXT.Invoke( + handle.Handle, + pSwapchains.Length, + pSwapchainsFixed, + pMetadataFixed + ); + } + } + + /// + /// vkSetDebugUtilsObjectNameEXT - Give an application-defined name to an object + /// + /// + /// + /// An object can be given an application-defined name by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// VkResult vkSetDebugUtilsObjectNameEXT( + /// VkDevice device, + /// const VkDebugUtilsObjectNameInfoEXT* pNameInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDebugUtilsObjectNameEXT( + this VulkanHandleWrapper handle, + in VkDebugUtilsObjectNameInfoEXT pNameInfo + ) + { + fixed (VkDebugUtilsObjectNameInfoEXT* pNameInfoFixed = &pNameInfo) + { + VkResult result = handle.PInvoke.vkSetDebugUtilsObjectNameEXT.Invoke(handle.Handle, pNameInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkSetDebugUtilsObjectTagEXT - Attach arbitrary data to an object + /// + /// + /// + /// // Provided by VK_EXT_debug_utils + /// VkResult vkSetDebugUtilsObjectTagEXT( + /// VkDevice device, + /// const VkDebugUtilsObjectTagInfoEXT* pTagInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDebugUtilsObjectTagEXT( + this VulkanHandleWrapper handle, + in VkDebugUtilsObjectTagInfoEXT pTagInfo + ) + { + fixed (VkDebugUtilsObjectTagInfoEXT* pTagInfoFixed = &pTagInfo) + { + VkResult result = handle.PInvoke.vkSetDebugUtilsObjectTagEXT.Invoke(handle.Handle, pTagInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkQueueBeginDebugUtilsLabelEXT - Open a queue debug label region + /// + /// + /// + /// A queue debug label region is opened by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkQueueBeginDebugUtilsLabelEXT( + /// VkQueue queue, + /// const VkDebugUtilsLabelEXT* pLabelInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void BeginDebugUtilsLabelEXTInternal( + this VulkanHandleWrapper handle, + in VkDebugUtilsLabelEXT pLabelInfo + ) + { + fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) + { + handle.PInvoke.vkQueueBeginDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); + } + } + + /// + /// vkQueueEndDebugUtilsLabelEXT - Close a queue debug label region + /// + /// + /// + /// A queue debug label region is closed by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkQueueEndDebugUtilsLabelEXT( + /// VkQueue queue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static void EndDebugUtilsLabelEXTInternal( + this VulkanHandleWrapper handle + ) + { + handle.PInvoke.vkQueueEndDebugUtilsLabelEXT.Invoke(handle.Handle); + } + + /// + /// vkQueueInsertDebugUtilsLabelEXT - Insert a label into a queue + /// + /// + /// + /// A single label can be inserted into a queue by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkQueueInsertDebugUtilsLabelEXT( + /// VkQueue queue, + /// const VkDebugUtilsLabelEXT* pLabelInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void InsertDebugUtilsLabelEXTInternal( + this VulkanHandleWrapper handle, + in VkDebugUtilsLabelEXT pLabelInfo + ) + { + fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) + { + handle.PInvoke.vkQueueInsertDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); + } + } + + /// + /// vkCmdBeginDebugUtilsLabelEXT - Open a command buffer debug label region + /// + /// + /// + /// A command buffer debug label region can be opened by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkCmdBeginDebugUtilsLabelEXT( + /// VkCommandBuffer commandBuffer, + /// const VkDebugUtilsLabelEXT* pLabelInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginDebugUtilsLabelEXT(this T handle, in VkDebugUtilsLabelEXT pLabelInfo) + where T : VulkanHandleWrapper + { + fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) + { + handle.PInvoke.vkCmdBeginDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); + } + } + + /// + /// vkCmdEndDebugUtilsLabelEXT - Close a command buffer label region + /// + /// + /// + /// A command buffer label region can be closed by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkCmdEndDebugUtilsLabelEXT( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndDebugUtilsLabelEXT(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndDebugUtilsLabelEXT.Invoke(handle.Handle); + } + + /// + /// vkCmdInsertDebugUtilsLabelEXT - Insert a label into a command buffer + /// + /// + /// + /// A single debug label can be inserted into a command buffer by calling: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkCmdInsertDebugUtilsLabelEXT( + /// VkCommandBuffer commandBuffer, + /// const VkDebugUtilsLabelEXT* pLabelInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InsertDebugUtilsLabelEXT(this T handle, in VkDebugUtilsLabelEXT pLabelInfo) + where T : VulkanHandleWrapper + { + fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) + { + handle.PInvoke.vkCmdInsertDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); + } + } + + /// + /// vkCreateGpaSessionAMD - Create a new GPA session object + /// + /// + /// + /// :refpage: vkCreateGpaSessionAMD + /// :objectnameplural: GPA sessions + /// :objectnamecamelcase: gpaSession + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a GPA session object, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkCreateGpaSessionAMD( + /// VkDevice device, + /// const VkGpaSessionCreateInfoAMD* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkGpaSessionAMD* pGpaSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkGpaSessionAMD CreateGpaSessionAMD( + this VulkanHandleWrapper handle, + in VkGpaSessionCreateInfoAMD pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkGpaSessionCreateInfoAMD* pCreateInfoFixed = &pCreateInfo) + { + VkGpaSessionAMD pGpaSessionLocal = default; + VkResult result = handle.PInvoke.vkCreateGpaSessionAMD.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pGpaSessionLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pGpaSessionLocal; + } + } + + /// + /// vkDestroyGpaSessionAMD - Destroy a GPA session object + /// + /// + /// + /// To destroy a GPA session object, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// void vkDestroyGpaSessionAMD( + /// VkDevice device, + /// VkGpaSessionAMD gpaSession, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyGpaSessionAMD( + this VulkanHandleWrapper handle, + VkGpaSessionAMD gpaSession, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyGpaSessionAMD.Invoke(handle.Handle, gpaSession, pAllocator); + } + + /// + /// vkSetGpaDeviceClockModeAMD - Setting a device clock + /// + /// + /// + /// To set or query GPU clocks, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkSetGpaDeviceClockModeAMD( + /// VkDevice device, + /// VkGpaDeviceClockModeInfoAMD* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetGpaDeviceClockModeAMD( + this VulkanHandleWrapper handle, + in VkGpaDeviceClockModeInfoAMD pInfo + ) + { + fixed (VkGpaDeviceClockModeInfoAMD* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkSetGpaDeviceClockModeAMD.Invoke(handle.Handle, pInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetGpaDeviceClockInfoAMD - Getting device clocks and ratios + /// + /// + /// + /// To query the GPU clock current values and their ratios to their maximums, + /// call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkGetGpaDeviceClockInfoAMD( + /// VkDevice device, + /// VkGpaDeviceGetClockInfoAMD* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetGpaDeviceClockInfoAMD( + this VulkanHandleWrapper handle, + ref VkGpaDeviceGetClockInfoAMD pInfo + ) + { + fixed (VkGpaDeviceGetClockInfoAMD* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkGetGpaDeviceClockInfoAMD.Invoke(handle.Handle, pInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkGpaDeviceGetClockInfoAMD. + public static VkGpaDeviceGetClockInfoAMD GetGpaDeviceClockInfoAMD( + this VulkanHandleWrapper handle + ) + { + VkGpaDeviceGetClockInfoAMD outValue = new(); + GetGpaDeviceClockInfoAMD(handle, ref outValue); + return outValue; + } + + /// + /// vkCmdBeginGpaSessionAMD - Begin a GPA session + /// + /// + /// + /// To begin a GPA session, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkCmdBeginGpaSessionAMD( + /// VkCommandBuffer commandBuffer, + /// VkGpaSessionAMD gpaSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BeginGpaSessionAMD(this T handle, VkGpaSessionAMD gpaSession) + where T : VulkanHandleWrapper + { + VkResult result = handle.PInvoke.vkCmdBeginGpaSessionAMD.Invoke(handle.Handle, gpaSession); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkCmdEndGpaSessionAMD - End a GPA session + /// + /// + /// + /// To end a GPA session, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkCmdEndGpaSessionAMD( + /// VkCommandBuffer commandBuffer, + /// VkGpaSessionAMD gpaSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndGpaSessionAMD(this T handle, VkGpaSessionAMD gpaSession) + where T : VulkanHandleWrapper + { + VkResult result = handle.PInvoke.vkCmdEndGpaSessionAMD.Invoke(handle.Handle, gpaSession); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkCmdBeginGpaSampleAMD - Beginning a sample + /// + /// + /// + /// To begin a GPA sample, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkCmdBeginGpaSampleAMD( + /// VkCommandBuffer commandBuffer, + /// VkGpaSessionAMD gpaSession, + /// const VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfo, + /// uint32_t* pSampleID); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginGpaSampleAMD( + this T handle, + VkGpaSessionAMD gpaSession, + in VkGpaSampleBeginInfoAMD pGpaSampleBeginInfo, + int* pSampleID + ) + where T : VulkanHandleWrapper + { + fixed (VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfoFixed = &pGpaSampleBeginInfo) + { + VkResult result = handle.PInvoke.vkCmdBeginGpaSampleAMD.Invoke( + handle.Handle, + gpaSession, + pGpaSampleBeginInfoFixed, + pSampleID + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdEndGpaSampleAMD - Ending a sample + /// + /// + /// + /// To end a GPA sample, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// void vkCmdEndGpaSampleAMD( + /// VkCommandBuffer commandBuffer, + /// VkGpaSessionAMD gpaSession, + /// uint32_t sampleID); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndGpaSampleAMD(this T handle, VkGpaSessionAMD gpaSession, int sampleID) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndGpaSampleAMD.Invoke(handle.Handle, gpaSession, sampleID); + } + + /// + /// vkGetGpaSessionStatusAMD - Getting the status of a GPA session + /// + /// + /// + /// Once a GPA session has ended, its status can be queried by: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkGetGpaSessionStatusAMD( + /// VkDevice device, + /// VkGpaSessionAMD gpaSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void GetGpaSessionStatusAMD( + this VulkanHandleWrapper handle, + VkGpaSessionAMD gpaSession + ) + { + VkResult result = handle.PInvoke.vkGetGpaSessionStatusAMD.Invoke(handle.Handle, gpaSession); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetGpaSessionResultsAMD - Getting the status of a GPA session + /// + /// + /// + /// Once a GPA session's results are available, they can be obtained by: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkGetGpaSessionResultsAMD( + /// VkDevice device, + /// VkGpaSessionAMD gpaSession, + /// uint32_t sampleID, + /// size_t* pSizeInBytes, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetGpaSessionResultsAMD( + this VulkanHandleWrapper handle, + VkGpaSessionAMD gpaSession, + int sampleID, + ref nuint pSizeInBytes, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + fixed (nuint* pSizeInBytesFixed = &pSizeInBytes) + { + VkResult result = handle.PInvoke.vkGetGpaSessionResultsAMD.Invoke( + handle.Handle, + gpaSession, + sampleID, + pSizeInBytesFixed, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetGpaSessionResultsAMD_Count( + this VulkanHandleWrapper handle, + VkGpaSessionAMD gpaSession, + int sampleID + ) + { + nuint pSizeInBytes = default; + GetGpaSessionResultsAMD(handle, gpaSession, sampleID, ref pSizeInBytes, null); + return pSizeInBytes; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetGpaSessionResultsAMD_Write( + this VulkanHandleWrapper handle, + VkGpaSessionAMD gpaSession, + int sampleID, + scoped ReadOnlySpan pData + ) + { + nuint pSizeInBytes = (nuint)pData.Length; + GetGpaSessionResultsAMD(handle, gpaSession, sampleID, ref pSizeInBytes, pData); + } + + /// + /// vkResetGpaSessionAMD - Reset a GPA session + /// + /// + /// + /// To reset a GPA session for reuse, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VkResult vkResetGpaSessionAMD( + /// VkDevice device, + /// VkGpaSessionAMD gpaSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetGpaSessionAMD( + this VulkanHandleWrapper handle, + VkGpaSessionAMD gpaSession + ) + { + VkResult result = handle.PInvoke.vkResetGpaSessionAMD.Invoke(handle.Handle, gpaSession); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkCmdCopyGpaSessionResultsAMD - Copying GPA session results + /// + /// + /// + /// To copy the results of a GPA session into another, call: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// void vkCmdCopyGpaSessionResultsAMD( + /// VkCommandBuffer commandBuffer, + /// VkGpaSessionAMD gpaSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyGpaSessionResultsAMD(this T handle, VkGpaSessionAMD gpaSession) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdCopyGpaSessionResultsAMD.Invoke(handle.Handle, gpaSession); + } + + /// + /// vkWriteSamplerDescriptorsEXT - Write sampler descriptors to memory + /// + /// + /// + /// To write sampler descriptors to memory, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// VkResult vkWriteSamplerDescriptorsEXT( + /// VkDevice device, + /// uint32_t samplerCount, + /// const VkSamplerCreateInfo* pSamplers, + /// const VkHostAddressRangeEXT* pDescriptors); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteSamplerDescriptorsEXT( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pSamplers, + scoped ReadOnlySpan pDescriptors + ) + { + fixed (VkHostAddressRangeEXT* pDescriptorsFixed = pDescriptors) + fixed (VkSamplerCreateInfo* pSamplersFixed = pSamplers) + { + VkResult result = handle.PInvoke.vkWriteSamplerDescriptorsEXT.Invoke( + handle.Handle, + pSamplers.Length, + pSamplersFixed, + pDescriptorsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkWriteResourceDescriptorsEXT - Write resource descriptors to memory + /// + /// + /// + /// To write resource descriptors to memory, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// VkResult vkWriteResourceDescriptorsEXT( + /// VkDevice device, + /// uint32_t resourceCount, + /// const VkResourceDescriptorInfoEXT* pResources, + /// const VkHostAddressRangeEXT* pDescriptors); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteResourceDescriptorsEXT( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pResources, + scoped ReadOnlySpan pDescriptors + ) + { + fixed (VkHostAddressRangeEXT* pDescriptorsFixed = pDescriptors) + fixed (VkResourceDescriptorInfoEXT* pResourcesFixed = pResources) + { + VkResult result = handle.PInvoke.vkWriteResourceDescriptorsEXT.Invoke( + handle.Handle, + pResources.Length, + pResourcesFixed, + pDescriptorsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdBindSamplerHeapEXT - Binds a sampler heap to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindSamplerHeapEXT + /// + /// + /// To bind a sampler heap to a command buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// void vkCmdBindSamplerHeapEXT( + /// VkCommandBuffer commandBuffer, + /// const VkBindHeapInfoEXT* pBindInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindSamplerHeapEXT(this T handle, in VkBindHeapInfoEXT pBindInfo) + where T : VulkanHandleWrapper + { + fixed (VkBindHeapInfoEXT* pBindInfoFixed = &pBindInfo) + { + handle.PInvoke.vkCmdBindSamplerHeapEXT.Invoke(handle.Handle, pBindInfoFixed); + } + } + + /// + /// vkCmdBindResourceHeapEXT - Binds a resource heap to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindResourceHeapEXT + /// + /// + /// To bind a resource heap to a command buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// void vkCmdBindResourceHeapEXT( + /// VkCommandBuffer commandBuffer, + /// const VkBindHeapInfoEXT* pBindInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindResourceHeapEXT(this T handle, in VkBindHeapInfoEXT pBindInfo) + where T : VulkanHandleWrapper + { + fixed (VkBindHeapInfoEXT* pBindInfoFixed = &pBindInfo) + { + handle.PInvoke.vkCmdBindResourceHeapEXT.Invoke(handle.Handle, pBindInfoFixed); + } + } + + /// + /// vkCmdPushDataEXT - Update the values of push data + /// + /// + /// + /// To update push data when using descriptor heaps, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// void vkCmdPushDataEXT( + /// VkCommandBuffer commandBuffer, + /// const VkPushDataInfoEXT* pPushDataInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PushDataEXT(this T handle, in VkPushDataInfoEXT pPushDataInfo) + where T : VulkanHandleWrapper + { + fixed (VkPushDataInfoEXT* pPushDataInfoFixed = &pPushDataInfo) + { + handle.PInvoke.vkCmdPushDataEXT.Invoke(handle.Handle, pPushDataInfoFixed); + } + } + + /// + /// vkGetImageOpaqueCaptureDataEXT - Get image opaque capture descriptor data for descriptor heap replay + /// + /// + /// + /// To get the opaque capture descriptor data for images, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// VkResult vkGetImageOpaqueCaptureDataEXT( + /// VkDevice device, + /// uint32_t imageCount, + /// const VkImage* pImages, + /// VkHostAddressRangeEXT* pDatas); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageOpaqueCaptureDataEXT( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pImages, + scoped ReadOnlySpan pDatas + ) + { + fixed (VkHostAddressRangeEXT* pDatasFixed = pDatas) + fixed (VkImage* pImagesFixed = pImages) + { + VkResult result = handle.PInvoke.vkGetImageOpaqueCaptureDataEXT.Invoke( + handle.Handle, + pImages.Length, + pImagesFixed, + pDatasFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkRegisterCustomBorderColorEXT - Register a custom border color + /// + /// + /// + /// To register a custom border color, call: + /// + /// + /// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap + /// VkResult vkRegisterCustomBorderColorEXT( + /// VkDevice device, + /// const VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor, + /// VkBool32 requestIndex, + /// uint32_t* pIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void RegisterCustomBorderColorEXT( + this VulkanHandleWrapper handle, + VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor, + Brutal.Bool32 requestIndex, + int* pIndex + ) + { + VkResult result = handle.PInvoke.vkRegisterCustomBorderColorEXT.Invoke( + handle.Handle, + pBorderColor, + requestIndex, + pIndex + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddress: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddress, + "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkUnregisterCustomBorderColorEXT - Unregister a custom border color + /// + /// + /// + /// To unregister a custom border color, call: + /// + /// + /// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap + /// void vkUnregisterCustomBorderColorEXT( + /// VkDevice device, + /// uint32_t index); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UnregisterCustomBorderColorEXT( + this VulkanHandleWrapper handle, + int index + ) + { + handle.PInvoke.vkUnregisterCustomBorderColorEXT.Invoke(handle.Handle, index); + } + + /// + /// vkGetTensorOpaqueCaptureDataARM - Get tensor opaque capture descriptor data for descriptor heap replay + /// + /// + /// + /// To get the opaque capture descriptor data for tensors, call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors + /// VkResult vkGetTensorOpaqueCaptureDataARM( + /// VkDevice device, + /// uint32_t tensorCount, + /// const VkTensorARM* pTensors, + /// VkHostAddressRangeEXT* pDatas); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTensorOpaqueCaptureDataARM( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pTensors, + scoped ReadOnlySpan pDatas + ) + { + fixed (VkHostAddressRangeEXT* pDatasFixed = pDatas) + fixed (VkTensorARM* pTensorsFixed = pTensors) + { + VkResult result = handle.PInvoke.vkGetTensorOpaqueCaptureDataARM.Invoke( + handle.Handle, + pTensors.Length, + pTensorsFixed, + pDatasFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdSetSampleLocationsEXT - Set sample locations dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the sample locations used + /// for rasterization, call: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// void vkCmdSetSampleLocationsEXT( + /// VkCommandBuffer commandBuffer, + /// const VkSampleLocationsInfoEXT* pSampleLocationsInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetSampleLocationsEXT( + this T handle, + in VkSampleLocationsInfoEXT pSampleLocationsInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkSampleLocationsInfoEXT* pSampleLocationsInfoFixed = &pSampleLocationsInfo) + { + handle.PInvoke.vkCmdSetSampleLocationsEXT.Invoke(handle.Handle, pSampleLocationsInfoFixed); + } + } + + /// + /// vkGetImageDrmFormatModifierPropertiesEXT - Returns an image&apos;s DRM format modifier + /// + /// + /// + /// :refpage: vkGetImageDrmFormatModifierPropertiesEXT + /// + /// + /// If an image was created with VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, + /// then the image has a Linux DRM format + /// modifier^. + /// To query the modifier, call: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// VkResult vkGetImageDrmFormatModifierPropertiesEXT( + /// VkDevice device, + /// VkImage image, + /// VkImageDrmFormatModifierPropertiesEXT* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageDrmFormatModifierPropertiesEXT( + this VulkanHandleWrapper handle, + VkImage image, + ref VkImageDrmFormatModifierPropertiesEXT pProperties + ) + { + fixed (VkImageDrmFormatModifierPropertiesEXT* pPropertiesFixed = &pProperties) + { + VkResult result = handle.PInvoke.vkGetImageDrmFormatModifierPropertiesEXT.Invoke( + handle.Handle, + image, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetImageDrmFormatModifierPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetImageDrmFormatModifierPropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetImageDrmFormatModifierPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkImageDrmFormatModifierPropertiesEXT. + public static VkImageDrmFormatModifierPropertiesEXT GetImageDrmFormatModifierPropertiesEXT( + this VulkanHandleWrapper handle, + VkImage image + ) + { + VkImageDrmFormatModifierPropertiesEXT outValue = new(); + GetImageDrmFormatModifierPropertiesEXT(handle, image, ref outValue); + return outValue; + } + + /// + /// vkCreateValidationCacheEXT - Creates a new validation cache + /// + /// + /// + /// To create validation cache objects, call: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// VkResult vkCreateValidationCacheEXT( + /// VkDevice device, + /// const VkValidationCacheCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkValidationCacheEXT* pValidationCache); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkValidationCacheEXT CreateValidationCacheEXT( + this VulkanHandleWrapper handle, + in VkValidationCacheCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkValidationCacheCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkValidationCacheEXT pValidationCacheLocal = default; + VkResult result = handle.PInvoke.vkCreateValidationCacheEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pValidationCacheLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateValidationCacheEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateValidationCacheEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateValidationCacheEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pValidationCacheLocal; + } + } + + /// + /// vkDestroyValidationCacheEXT - Destroy a validation cache object + /// + /// + /// + /// To destroy a validation cache, call: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// void vkDestroyValidationCacheEXT( + /// VkDevice device, + /// VkValidationCacheEXT validationCache, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyValidationCacheEXT( + this VulkanHandleWrapper handle, + VkValidationCacheEXT validationCache, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyValidationCacheEXT.Invoke(handle.Handle, validationCache, pAllocator); + } + + /// + /// vkMergeValidationCachesEXT - Combine the data stores of validation caches + /// + /// + /// + /// Validation cache objects can be merged using the command: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// VkResult vkMergeValidationCachesEXT( + /// VkDevice device, + /// VkValidationCacheEXT dstCache, + /// uint32_t srcCacheCount, + /// const VkValidationCacheEXT* pSrcCaches); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void MergeValidationCachesEXT( + this VulkanHandleWrapper handle, + VkValidationCacheEXT dstCache, + scoped ReadOnlySpan pSrcCaches + ) + { + fixed (VkValidationCacheEXT* pSrcCachesFixed = pSrcCaches) + { + VkResult result = handle.PInvoke.vkMergeValidationCachesEXT.Invoke( + handle.Handle, + dstCache, + pSrcCaches.Length, + pSrcCachesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetValidationCacheDataEXT - Get the data store from a validation cache + /// + /// + /// + /// Data can be retrieved from a validation cache object using the command: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// VkResult vkGetValidationCacheDataEXT( + /// VkDevice device, + /// VkValidationCacheEXT validationCache, + /// size_t* pDataSize, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetValidationCacheDataEXT( + this VulkanHandleWrapper handle, + VkValidationCacheEXT validationCache, + ref nuint pDataSize, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + fixed (nuint* pDataSizeFixed = &pDataSize) + { + VkResult result = handle.PInvoke.vkGetValidationCacheDataEXT.Invoke( + handle.Handle, + validationCache, + pDataSizeFixed, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetValidationCacheDataEXT_Count( + this VulkanHandleWrapper handle, + VkValidationCacheEXT validationCache + ) + { + nuint pDataSize = default; + GetValidationCacheDataEXT(handle, validationCache, ref pDataSize, null); + return pDataSize; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetValidationCacheDataEXT_Write( + this VulkanHandleWrapper handle, + VkValidationCacheEXT validationCache, + scoped ReadOnlySpan pData + ) + { + nuint pDataSize = (nuint)pData.Length; + return GetValidationCacheDataEXT(handle, validationCache, ref pDataSize, pData); + } + + /// + /// vkCmdBindShadingRateImageNV - Bind a shading rate image on a command buffer + /// + /// + /// + /// When shading rate image usage is enabled in the bound pipeline, the pipeline + /// uses a shading rate image specified by the command: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// void vkCmdBindShadingRateImageNV( + /// VkCommandBuffer commandBuffer, + /// VkImageView imageView, + /// VkImageLayout imageLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindShadingRateImageNV(this T handle, VkImageView imageView, VkImageLayout imageLayout) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindShadingRateImageNV.Invoke(handle.Handle, imageView, imageLayout); + } + + /// + /// vkCmdSetViewportShadingRatePaletteNV - Set shading rate image palettes dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the per-viewport shading + /// rate image palettes, call: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// void vkCmdSetViewportShadingRatePaletteNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstViewport, + /// uint32_t viewportCount, + /// const VkShadingRatePaletteNV* pShadingRatePalettes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetViewportShadingRatePaletteNV( + this T handle, + int firstViewport, + scoped ReadOnlySpan pShadingRatePalettes + ) + where T : VulkanHandleWrapper + { + fixed (VkShadingRatePaletteNV* pShadingRatePalettesFixed = pShadingRatePalettes) + { + handle.PInvoke.vkCmdSetViewportShadingRatePaletteNV.Invoke( + handle.Handle, + firstViewport, + pShadingRatePalettes.Length, + pShadingRatePalettesFixed + ); + } + } + + /// + /// vkCmdSetCoarseSampleOrderNV - Set order of coverage samples for coarse fragments dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the order of coverage + /// samples in fragments larger than one pixel, call: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// void vkCmdSetCoarseSampleOrderNV( + /// VkCommandBuffer commandBuffer, + /// VkCoarseSampleOrderTypeNV sampleOrderType, + /// uint32_t customSampleOrderCount, + /// const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetCoarseSampleOrderNV( + this T handle, + VkCoarseSampleOrderTypeNV sampleOrderType, + scoped ReadOnlySpan pCustomSampleOrders + ) + where T : VulkanHandleWrapper + { + fixed (VkCoarseSampleOrderCustomNV* pCustomSampleOrdersFixed = pCustomSampleOrders) + { + handle.PInvoke.vkCmdSetCoarseSampleOrderNV.Invoke( + handle.Handle, + sampleOrderType, + pCustomSampleOrders.Length, + pCustomSampleOrdersFixed + ); + } + } + + /// + /// vkCreateAccelerationStructureNV - Create a new acceleration structure object + /// + /// + /// + /// :refpage: vkCreateAccelerationStructureNV + /// + /// + /// To create acceleration structures, call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// VkResult vkCreateAccelerationStructureNV( + /// VkDevice device, + /// const VkAccelerationStructureCreateInfoNV* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkAccelerationStructureNV* pAccelerationStructure); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkAccelerationStructureNV CreateAccelerationStructureNV( + this VulkanHandleWrapper handle, + in VkAccelerationStructureCreateInfoNV pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkAccelerationStructureCreateInfoNV* pCreateInfoFixed = &pCreateInfo) + { + VkAccelerationStructureNV pAccelerationStructureLocal = default; + VkResult result = handle.PInvoke.vkCreateAccelerationStructureNV.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pAccelerationStructureLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateAccelerationStructureNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateAccelerationStructureNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateAccelerationStructureNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pAccelerationStructureLocal; + } + } + + /// + /// vkDestroyAccelerationStructureNV - Destroy an acceleration structure object + /// + /// + /// + /// :refpage: vkDestroyAccelerationStructureNV + /// + /// + /// To destroy an acceleration structure, call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// void vkDestroyAccelerationStructureNV( + /// VkDevice device, + /// VkAccelerationStructureNV accelerationStructure, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyAccelerationStructureNV( + this VulkanHandleWrapper handle, + VkAccelerationStructureNV accelerationStructure, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyAccelerationStructureNV.Invoke(handle.Handle, accelerationStructure, pAllocator); + } + + /// + /// vkGetAccelerationStructureMemoryRequirementsNV - Get acceleration structure memory requirements + /// + /// + /// + /// :refpage: vkGetAccelerationStructureMemoryRequirementsNV + /// + /// + /// An acceleration structure has memory requirements for the structure object + /// itself, scratch space for the build, and scratch space for the update. + /// + /// + /// Scratch space is allocated as a VkBuffer, so for + /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV + /// and + /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV + /// the pMemoryRequirements->alignment and + /// pMemoryRequirements->memoryTypeBits values returned by this call must + /// be filled with zero, and should be ignored by the application. + /// + /// + /// To query the memory requirements, call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// void vkGetAccelerationStructureMemoryRequirementsNV( + /// VkDevice device, + /// const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetAccelerationStructureMemoryRequirementsNV( + this VulkanHandleWrapper handle, + in VkAccelerationStructureMemoryRequirementsInfoNV pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkAccelerationStructureMemoryRequirementsInfoNV* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetAccelerationStructureMemoryRequirementsNV.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetAccelerationStructureMemoryRequirementsNV( + this VulkanHandleWrapper handle, + in VkAccelerationStructureMemoryRequirementsInfoNV pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetAccelerationStructureMemoryRequirementsNV(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkBindAccelerationStructureMemoryNV - Bind acceleration structure memory + /// + /// + /// + /// :refpage: vkBindAccelerationStructureMemoryNV + /// + /// + /// To attach memory to one or more acceleration structures at a time, call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// VkResult vkBindAccelerationStructureMemoryNV( + /// VkDevice device, + /// uint32_t bindInfoCount, + /// const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindAccelerationStructureMemoryNV( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBindInfos + ) + { + fixed (VkBindAccelerationStructureMemoryInfoNV* pBindInfosFixed = pBindInfos) + { + VkResult result = handle.PInvoke.vkBindAccelerationStructureMemoryNV.Invoke( + handle.Handle, + pBindInfos.Length, + pBindInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdBuildAccelerationStructureNV - Build an acceleration structure + /// + /// + /// + /// :refpage: vkCmdBuildAccelerationStructureNV + /// + /// + /// To build an acceleration structure for the `VK_NV_ray_tracing` + /// extension call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// void vkCmdBuildAccelerationStructureNV( + /// VkCommandBuffer commandBuffer, + /// const VkAccelerationStructureInfoNV* pInfo, + /// VkBuffer instanceData, + /// VkDeviceSize instanceOffset, + /// VkBool32 update, + /// VkAccelerationStructureNV dst, + /// VkAccelerationStructureNV src, + /// VkBuffer scratch, + /// VkDeviceSize scratchOffset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BuildAccelerationStructureNV( + this T handle, + in VkAccelerationStructureInfoNV pInfo, + VkBuffer instanceData, + ByteSize64 instanceOffset, + Brutal.Bool32 update, + VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, + VkBuffer scratch, + ByteSize64 scratchOffset + ) + where T : VulkanHandleWrapper + { + fixed (VkAccelerationStructureInfoNV* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdBuildAccelerationStructureNV.Invoke( + handle.Handle, + pInfoFixed, + instanceData, + instanceOffset, + update, + dst, + src, + scratch, + scratchOffset + ); + } + } + + /// + /// vkCmdCopyAccelerationStructureNV - Copy an acceleration structure + /// + /// + /// + /// :refpage: vkCmdCopyAccelerationStructureNV + /// + /// + /// To copy an acceleration structure for the `VK_NV_ray_tracing` + /// extension call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// void vkCmdCopyAccelerationStructureNV( + /// VkCommandBuffer commandBuffer, + /// VkAccelerationStructureNV dst, + /// VkAccelerationStructureNV src, + /// VkCopyAccelerationStructureModeKHR mode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyAccelerationStructureNV( + this T handle, + VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, + VkCopyAccelerationStructureModeKHR mode + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdCopyAccelerationStructureNV.Invoke(handle.Handle, dst, src, mode); + } + + /// + /// vkCmdTraceRaysNV - Initialize a ray tracing dispatch + /// + /// + /// + /// :refpage: vkCmdTraceRaysNV + /// + /// + /// To dispatch ray tracing for the `VK_NV_ray_tracing` extension use: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// void vkCmdTraceRaysNV( + /// VkCommandBuffer commandBuffer, + /// VkBuffer raygenShaderBindingTableBuffer, + /// VkDeviceSize raygenShaderBindingOffset, + /// VkBuffer missShaderBindingTableBuffer, + /// VkDeviceSize missShaderBindingOffset, + /// VkDeviceSize missShaderBindingStride, + /// VkBuffer hitShaderBindingTableBuffer, + /// VkDeviceSize hitShaderBindingOffset, + /// VkDeviceSize hitShaderBindingStride, + /// VkBuffer callableShaderBindingTableBuffer, + /// VkDeviceSize callableShaderBindingOffset, + /// VkDeviceSize callableShaderBindingStride, + /// uint32_t width, + /// uint32_t height, + /// uint32_t depth); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void TraceRaysNV( + this T handle, + VkBuffer raygenShaderBindingTableBuffer, + ByteSize64 raygenShaderBindingOffset, + VkBuffer missShaderBindingTableBuffer, + ByteSize64 missShaderBindingOffset, + ByteSize64 missShaderBindingStride, + VkBuffer hitShaderBindingTableBuffer, + ByteSize64 hitShaderBindingOffset, + ByteSize64 hitShaderBindingStride, + VkBuffer callableShaderBindingTableBuffer, + ByteSize64 callableShaderBindingOffset, + ByteSize64 callableShaderBindingStride, + int width, + int height, + int depth + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdTraceRaysNV.Invoke( + handle.Handle, + raygenShaderBindingTableBuffer, + raygenShaderBindingOffset, + missShaderBindingTableBuffer, + missShaderBindingOffset, + missShaderBindingStride, + hitShaderBindingTableBuffer, + hitShaderBindingOffset, + hitShaderBindingStride, + callableShaderBindingTableBuffer, + callableShaderBindingOffset, + callableShaderBindingStride, + width, + height, + depth + ); + } + + /// + /// vkCreateRayTracingPipelinesNV - Creates a new ray tracing pipeline object + /// + /// + /// + /// :refpage: vkCreateRayTracingPipelinesNV + /// + /// + /// To create ray tracing pipelines, call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// VkResult vkCreateRayTracingPipelinesNV( + /// VkDevice device, + /// VkPipelineCache pipelineCache, + /// uint32_t createInfoCount, + /// const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipeline* pPipelines); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateRayTracingPipelinesNV( + this VulkanHandleWrapper handle, + VkPipelineCache pipelineCache, + scoped ReadOnlySpan pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pPipelines + ) + { + fixed (VkPipeline* pPipelinesFixed = pPipelines) + fixed (VkRayTracingPipelineCreateInfoNV* pCreateInfosFixed = pCreateInfos) + { + VkResult result = handle.PInvoke.vkCreateRayTracingPipelinesNV.Invoke( + handle.Handle, + pipelineCache, + pCreateInfos.Length, + pCreateInfosFixed, + pAllocator, + pPipelinesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidShaderNV: + throw new VkResultError( + VkResult.ErrorInvalidShaderNV, + "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_INVALID_SHADER_NV" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.PipelineCompileRequiredEXT: + default: + break; + } + + return result; + } + } + + /// + /// vkGetRayTracingShaderGroupHandlesKHR - Query ray tracing pipeline shader group handles + /// + /// + /// + /// :refpage: vkGetRayTracingShaderGroupHandlesKHR + /// + /// + /// To query the opaque handles of shaders in the ray tracing pipeline, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRayTracingShaderGroupHandlesKHR( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + int firstGroup, + int groupCount, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + { + VkResult result = handle.PInvoke.vkGetRayTracingShaderGroupHandlesKHR.Invoke( + handle.Handle, + pipeline, + firstGroup, + groupCount, + (nuint)pData.Length, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetRayTracingShaderGroupHandlesNV( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + int firstGroup, + int groupCount, + nuint dataSize, + void* pData + ) + { + return handle.PInvoke.vkGetRayTracingShaderGroupHandlesNV.Invoke( + handle.Handle, + pipeline, + firstGroup, + groupCount, + dataSize, + pData + ); + } + + /// + /// vkGetAccelerationStructureHandleNV - Get opaque acceleration structure handle + /// + /// + /// + /// :refpage: vkGetAccelerationStructureHandleNV + /// + /// + /// To allow constructing geometry instances with device code if desired, we + /// need to be able to query an opaque handle for an acceleration structure. + /// This handle is a value of 8 bytes. + /// To get this handle, call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// VkResult vkGetAccelerationStructureHandleNV( + /// VkDevice device, + /// VkAccelerationStructureNV accelerationStructure, + /// size_t dataSize, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetAccelerationStructureHandleNV( + this VulkanHandleWrapper handle, + VkAccelerationStructureNV accelerationStructure, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + { + VkResult result = handle.PInvoke.vkGetAccelerationStructureHandleNV.Invoke( + handle.Handle, + accelerationStructure, + (nuint)pData.Length, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdWriteAccelerationStructuresPropertiesNV - Write acceleration structure result parameters to query results. + /// + /// + /// + /// :refpage: vkCmdWriteAccelerationStructuresPropertiesNV + /// + /// + /// To query acceleration structure size parameters for the + /// `VK_NV_ray_tracing` extension call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// void vkCmdWriteAccelerationStructuresPropertiesNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t accelerationStructureCount, + /// const VkAccelerationStructureNV* pAccelerationStructures, + /// VkQueryType queryType, + /// VkQueryPool queryPool, + /// uint32_t firstQuery); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteAccelerationStructuresPropertiesNV( + this T handle, + scoped ReadOnlySpan pAccelerationStructures, + VkQueryType queryType, + VkQueryPool queryPool, + int firstQuery + ) + where T : VulkanHandleWrapper + { + fixed (VkAccelerationStructureNV* pAccelerationStructuresFixed = pAccelerationStructures) + { + handle.PInvoke.vkCmdWriteAccelerationStructuresPropertiesNV.Invoke( + handle.Handle, + pAccelerationStructures.Length, + pAccelerationStructuresFixed, + queryType, + queryPool, + firstQuery + ); + } + } + + /// + /// vkCompileDeferredNV - Deferred compilation of shaders + /// + /// + /// + /// :refpage: vkCompileDeferredNV + /// + /// + /// To compile a deferred shader in a pipeline call: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// VkResult vkCompileDeferredNV( + /// VkDevice device, + /// VkPipeline pipeline, + /// uint32_t shader); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CompileDeferredNV( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + int shader + ) + { + VkResult result = handle.PInvoke.vkCompileDeferredNV.Invoke(handle.Handle, pipeline, shader); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetMemoryHostPointerPropertiesEXT - Get properties of external memory host pointer + /// + /// + /// + /// :refpage: vkGetMemoryHostPointerPropertiesEXT + /// + /// + /// To determine the correct parameters to use when importing host pointers, + /// call: + /// + /// + /// // Provided by VK_EXT_external_memory_host + /// VkResult vkGetMemoryHostPointerPropertiesEXT( + /// VkDevice device, + /// VkExternalMemoryHandleTypeFlagBits handleType, + /// const void* pHostPointer, + /// VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMemoryHostPointerPropertiesEXT( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + void* pHostPointer, + ref VkMemoryHostPointerPropertiesEXT pMemoryHostPointerProperties + ) + { + fixed (VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerPropertiesFixed = &pMemoryHostPointerProperties) + { + VkResult result = handle.PInvoke.vkGetMemoryHostPointerPropertiesEXT.Invoke( + handle.Handle, + handleType, + pHostPointer, + pMemoryHostPointerPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryHostPointerPropertiesEXT. + public static unsafe VkMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT( + this VulkanHandleWrapper handle, + VkExternalMemoryHandleTypeFlags handleType, + void* pHostPointer + ) + { + VkMemoryHostPointerPropertiesEXT outValue = new(); + GetMemoryHostPointerPropertiesEXT(handle, handleType, pHostPointer, ref outValue); + return outValue; + } + + /// + /// vkCmdWriteBufferMarkerAMD - Execute a pipelined write of a marker value into a buffer + /// + /// + /// + /// :refpage: vkCmdWriteBufferMarkerAMD + /// + /// + /// To write a 32-bit marker value into a buffer as a pipelined operation, call: + /// + /// + /// // Provided by VK_AMD_buffer_marker + /// void vkCmdWriteBufferMarkerAMD( + /// VkCommandBuffer commandBuffer, + /// VkPipelineStageFlagBits pipelineStage, + /// VkBuffer dstBuffer, + /// VkDeviceSize dstOffset, + /// uint32_t marker); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WriteBufferMarkerAMD( + this T handle, + VkPipelineStageFlags pipelineStage, + VkBuffer dstBuffer, + ByteSize64 dstOffset, + int marker + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdWriteBufferMarkerAMD.Invoke(handle.Handle, pipelineStage, dstBuffer, dstOffset, marker); + } + + /// + /// vkCmdWriteBufferMarker2AMD - Execute a pipelined write of a marker value into a buffer + /// + /// + /// + /// :refpage: vkCmdWriteBufferMarker2AMD + /// + /// + /// To write a 32-bit marker value into a buffer as a pipelined operation, call: + /// + /// + /// // Provided by VK_AMD_buffer_marker with VK_VERSION_1_3 or VK_KHR_synchronization2 + /// void vkCmdWriteBufferMarker2AMD( + /// VkCommandBuffer commandBuffer, + /// VkPipelineStageFlags2 stage, + /// VkBuffer dstBuffer, + /// VkDeviceSize dstOffset, + /// uint32_t marker); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void WriteBufferMarker2AMD( + this T handle, + VkPipelineStageFlags2 stage, + VkBuffer dstBuffer, + ByteSize64 dstOffset, + int marker + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdWriteBufferMarker2AMD.Invoke(handle.Handle, stage, dstBuffer, dstOffset, marker); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetCalibratedTimestampsEXT( + this VulkanHandleWrapper handle, + int timestampCount, + VkCalibratedTimestampInfoKHR* pTimestampInfos, + nint* pTimestamps, + nint* pMaxDeviation + ) + { + return handle.PInvoke.vkGetCalibratedTimestampsEXT.Invoke( + handle.Handle, + timestampCount, + pTimestampInfos, + pTimestamps, + pMaxDeviation + ); + } + + /// + /// vkCmdDrawMeshTasksNV - Draw mesh task work items + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksNV + /// + /// + /// To record a mesh tasks drawing command, call: + /// + /// + /// // Provided by VK_NV_mesh_shader + /// void vkCmdDrawMeshTasksNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t taskCount, + /// uint32_t firstTask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawMeshTasksNV(this T handle, int taskCount, int firstTask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawMeshTasksNV.Invoke(handle.Handle, taskCount, firstTask); + } + + /// + /// vkCmdDrawMeshTasksIndirectNV - Issue an indirect mesh tasks draw into a command buffer + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksIndirectNV + /// + /// + /// To record an indirect mesh tasks drawing command, call: + /// + /// + /// // Provided by VK_NV_mesh_shader + /// void vkCmdDrawMeshTasksIndirectNV( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// uint32_t drawCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawMeshTasksIndirectNV( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + int drawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawMeshTasksIndirectNV.Invoke(handle.Handle, buffer, offset, drawCount, stride); + } + + /// + /// vkCmdDrawMeshTasksIndirectCountNV - Perform an indirect mesh tasks draw with the draw count sourced from a buffer + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksIndirectCountNV + /// + /// + /// To record an indirect mesh tasks drawing command with the draw count sourced + /// from a buffer, call: + /// + /// + /// // Provided by VK_NV_mesh_shader with VK_VERSION_1_2 or VK_KHR_draw_indirect_count or VK_AMD_draw_indirect_count + /// void vkCmdDrawMeshTasksIndirectCountNV( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// VkBuffer countBuffer, + /// VkDeviceSize countBufferOffset, + /// uint32_t maxDrawCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawMeshTasksIndirectCountNV( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawMeshTasksIndirectCountNV.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// vkCmdSetExclusiveScissorEnableNV - Dynamically enable each exclusive scissor for a command buffer + /// + /// + /// + /// To dynamically set^ whether an exclusive scissor + /// is enabled or not, call: + /// + /// + /// // Provided by VK_NV_scissor_exclusive + /// void vkCmdSetExclusiveScissorEnableNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstExclusiveScissor, + /// uint32_t exclusiveScissorCount, + /// const VkBool32* pExclusiveScissorEnables); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetExclusiveScissorEnableNV( + this T handle, + int firstExclusiveScissor, + scoped ReadOnlySpan pExclusiveScissorEnables + ) + where T : VulkanHandleWrapper + { + fixed (Brutal.Bool32* pExclusiveScissorEnablesFixed = pExclusiveScissorEnables) + { + handle.PInvoke.vkCmdSetExclusiveScissorEnableNV.Invoke( + handle.Handle, + firstExclusiveScissor, + pExclusiveScissorEnables.Length, + pExclusiveScissorEnablesFixed + ); + } + } + + /// + /// vkCmdSetExclusiveScissorNV - Set exclusive scissor rectangles dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the exclusive scissor + /// rectangles, call: + /// + /// + /// // Provided by VK_NV_scissor_exclusive + /// void vkCmdSetExclusiveScissorNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstExclusiveScissor, + /// uint32_t exclusiveScissorCount, + /// const VkRect2D* pExclusiveScissors); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetExclusiveScissorNV( + this T handle, + int firstExclusiveScissor, + scoped ReadOnlySpan pExclusiveScissors + ) + where T : VulkanHandleWrapper + { + fixed (VkRect2D* pExclusiveScissorsFixed = pExclusiveScissors) + { + handle.PInvoke.vkCmdSetExclusiveScissorNV.Invoke( + handle.Handle, + firstExclusiveScissor, + pExclusiveScissors.Length, + pExclusiveScissorsFixed + ); + } + } + + /// + /// vkCmdSetCheckpointNV - Insert diagnostic checkpoint in command stream + /// + /// + /// + /// Device diagnostic checkpoints are inserted into the command stream by + /// calling vkCmdSetCheckpointNV. + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints + /// void vkCmdSetCheckpointNV( + /// VkCommandBuffer commandBuffer, + /// const void* pCheckpointMarker); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetCheckpointNV(this T handle, void* pCheckpointMarker) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCheckpointNV.Invoke(handle.Handle, pCheckpointMarker); + } + + /// + /// vkGetQueueCheckpointDataNV - Retrieve diagnostic checkpoint data + /// + /// + /// + /// If the device encounters an error during execution, the implementation will + /// return a VK_ERROR_DEVICE_LOST error to the application at a certain + /// point during host execution. + /// When this happens, the application can call + /// vkGetQueueCheckpointDataNV to retrieve information on the most recent + /// diagnostic checkpoints that were executed by the device. + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints + /// void vkGetQueueCheckpointDataNV( + /// VkQueue queue, + /// uint32_t* pCheckpointDataCount, + /// VkCheckpointDataNV* pCheckpointData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetCheckpointDataNV( + this VulkanHandleWrapper handle, + ref int pCheckpointDataCount, + scoped ReadOnlySpan pCheckpointData + ) + { + fixed (VkCheckpointDataNV* pCheckpointDataFixed = pCheckpointData) + fixed (int* pCheckpointDataCountFixed = &pCheckpointDataCount) + { + handle.PInvoke.vkGetQueueCheckpointDataNV.Invoke( + handle.Handle, + pCheckpointDataCountFixed, + pCheckpointDataFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetCheckpointDataNV_Count(this VulkanHandleWrapper handle) + { + int pCheckpointDataCount = default; + GetCheckpointDataNV(handle, ref pCheckpointDataCount, null); + return pCheckpointDataCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetCheckpointDataNV_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pCheckpointData + ) + { + int pCheckpointDataCount = pCheckpointData.Length; + GetCheckpointDataNV(handle, ref pCheckpointDataCount, pCheckpointData); + } + + /// + /// vkGetQueueCheckpointData2NV - Retrieve diagnostic checkpoint data + /// + /// + /// + /// If the device encounters an error during execution, the implementation will + /// return a VK_ERROR_DEVICE_LOST error to the application at some point + /// during host execution. + /// When this happens, the application can call + /// vkGetQueueCheckpointData2NV to retrieve information on the most recent + /// diagnostic checkpoints that were executed by the device. + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2 + /// void vkGetQueueCheckpointData2NV( + /// VkQueue queue, + /// uint32_t* pCheckpointDataCount, + /// VkCheckpointData2NV* pCheckpointData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetCheckpointData2NV( + this VulkanHandleWrapper handle, + ref int pCheckpointDataCount, + scoped ReadOnlySpan pCheckpointData + ) + { + fixed (VkCheckpointData2NV* pCheckpointDataFixed = pCheckpointData) + fixed (int* pCheckpointDataCountFixed = &pCheckpointDataCount) + { + handle.PInvoke.vkGetQueueCheckpointData2NV.Invoke( + handle.Handle, + pCheckpointDataCountFixed, + pCheckpointDataFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetCheckpointData2NV_Count(this VulkanHandleWrapper handle) + { + int pCheckpointDataCount = default; + GetCheckpointData2NV(handle, ref pCheckpointDataCount, null); + return pCheckpointDataCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetCheckpointData2NV_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pCheckpointData + ) + { + int pCheckpointDataCount = pCheckpointData.Length; + GetCheckpointData2NV(handle, ref pCheckpointDataCount, pCheckpointData); + } + + /// + /// vkSetSwapchainPresentTimingQueueSizeEXT - Allocate memory for the swapchain-internal timing results queue + /// + /// + /// + /// In order to collect timing information about presentation, a swapchain needs + /// an internal queue to store asynchronously updated results until applications + /// collect them. + /// + /// + /// To allocate the swapchain's internal timing results queue, call: + /// + /// + /// // Provided by VK_EXT_present_timing + /// VkResult vkSetSwapchainPresentTimingQueueSizeEXT( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// uint32_t size); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult SetSwapchainPresentTimingQueueSizeEXT( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + int size + ) + { + VkResult result = handle.PInvoke.vkSetSwapchainPresentTimingQueueSizeEXT.Invoke( + handle.Handle, + swapchain, + size + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.NotReady: + default: + break; + } + + return result; + } + + /// + /// vkGetSwapchainTimingPropertiesEXT - Obtain the display timing properties of the PE&apos;s display + /// + /// + /// + /// The implementation maintains an internal monotonically increasing counter + /// which updates when the presentation engine's timing properties are modified. + /// + /// + /// To query the presentation engine's current timing properties for a given + /// swapchain, call: + /// + /// + /// // Provided by VK_EXT_present_timing + /// VkResult vkGetSwapchainTimingPropertiesEXT( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// VkSwapchainTimingPropertiesEXT* pSwapchainTimingProperties, + /// uint64_t* pSwapchainTimingPropertiesCounter); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetSwapchainTimingPropertiesEXT( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + VkSwapchainTimingPropertiesEXT* pSwapchainTimingProperties, + nint* pSwapchainTimingPropertiesCounter + ) + { + VkResult result = handle.PInvoke.vkGetSwapchainTimingPropertiesEXT.Invoke( + handle.Handle, + swapchain, + pSwapchainTimingProperties, + pSwapchainTimingPropertiesCounter + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.NotReady: + default: + break; + } + + return result; + } + + /// + /// vkGetSwapchainTimeDomainPropertiesEXT - Obtain the time domains supported by the PE for the swapchain + /// + /// + /// + /// The implementation maintains an internal monotonically increasing counter + /// which updates when the presentation engine's list of supported time domains + /// for a swapchain is modified. + /// + /// + /// To query the time domains supported by the presentation engine for a given + /// swapchain, call: + /// + /// + /// // Provided by VK_EXT_present_timing + /// VkResult vkGetSwapchainTimeDomainPropertiesEXT( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// VkSwapchainTimeDomainPropertiesEXT* pSwapchainTimeDomainProperties, + /// uint64_t* pTimeDomainsCounter); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetSwapchainTimeDomainPropertiesEXT( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + VkSwapchainTimeDomainPropertiesEXT* pSwapchainTimeDomainProperties, + nint* pTimeDomainsCounter + ) + { + VkResult result = handle.PInvoke.vkGetSwapchainTimeDomainPropertiesEXT.Invoke( + handle.Handle, + swapchain, + pSwapchainTimeDomainProperties, + pTimeDomainsCounter + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + + /// + /// vkGetPastPresentationTimingEXT - Obtain timing of previously-presented images + /// + /// + /// + /// Because of the asynchronous nature of the presentation engine, the timing + /// information for a given vkQueuePresentKHR command may: only becomes + /// available some time after the presentation has occurred. + /// These time values should be asynchronously queried, and are returned if + /// available. + /// All time values are in nanoseconds, according to the time-domain being used. + /// + /// + /// To asynchronously query the presentation engine for newly-available timing + /// information about one or more previous presents to a given swapchain, call: + /// + /// + /// // Provided by VK_EXT_present_timing + /// VkResult vkGetPastPresentationTimingEXT( + /// VkDevice device, + /// const VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfo, + /// VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetPastPresentationTimingEXT( + this VulkanHandleWrapper handle, + in VkPastPresentationTimingInfoEXT pPastPresentationTimingInfo, + VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties + ) + { + fixed (VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfoFixed = &pPastPresentationTimingInfo) + { + VkResult result = handle.PInvoke.vkGetPastPresentationTimingEXT.Invoke( + handle.Handle, + pPastPresentationTimingInfoFixed, + pPastPresentationTimingProperties + ); + switch (result) + { + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorOutOfDateKHR: + throw new VkResultError( + VkResult.ErrorOutOfDateKHR, + "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_OUT_OF_DATE_KHR" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// + /// vkInitializePerformanceApiINTEL - Initialize a device for performance queries + /// + /// + /// + /// Prior to creating a performance query pool, initialize the device for + /// performance queries with the call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkInitializePerformanceApiINTEL( + /// VkDevice device, + /// const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void InitializePerformanceApiINTEL( + this VulkanHandleWrapper handle, + in VkInitializePerformanceApiInfoINTEL pInitializeInfo + ) + { + fixed (VkInitializePerformanceApiInfoINTEL* pInitializeInfoFixed = &pInitializeInfo) + { + VkResult result = handle.PInvoke.vkInitializePerformanceApiINTEL.Invoke( + handle.Handle, + pInitializeInfoFixed + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkUninitializePerformanceApiINTEL - Uninitialize a device for performance queries + /// + /// + /// + /// Once performance query operations have completed, uninitialize the device + /// for performance queries with the call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// void vkUninitializePerformanceApiINTEL( + /// VkDevice device); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UninitializePerformanceApiINTEL( + this VulkanHandleWrapper handle + ) + { + handle.PInvoke.vkUninitializePerformanceApiINTEL.Invoke(handle.Handle); + } + + /// + /// vkCmdSetPerformanceMarkerINTEL - Markers + /// + /// + /// + /// To help associate query results with a particular point at which an + /// application emitted commands, markers can be set into the command buffers + /// with the call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkCmdSetPerformanceMarkerINTEL( + /// VkCommandBuffer commandBuffer, + /// const VkPerformanceMarkerInfoINTEL* pMarkerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetPerformanceMarkerINTEL( + this T handle, + in VkPerformanceMarkerInfoINTEL pMarkerInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkPerformanceMarkerInfoINTEL* pMarkerInfoFixed = &pMarkerInfo) + { + VkResult result = handle.PInvoke.vkCmdSetPerformanceMarkerINTEL.Invoke(handle.Handle, pMarkerInfoFixed); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdSetPerformanceStreamMarkerINTEL - Markers + /// + /// + /// + /// When monitoring the behavior of an application within the dataset generated + /// by the entire set of applications running on the system, it is useful to + /// identify draw calls within a potentially huge amount of performance data. + /// To do so, application can generate stream markers that will be used to trace + /// back a particular draw call with a particular performance data item. + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkCmdSetPerformanceStreamMarkerINTEL( + /// VkCommandBuffer commandBuffer, + /// const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetPerformanceStreamMarkerINTEL( + this T handle, + in VkPerformanceStreamMarkerInfoINTEL pMarkerInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkPerformanceStreamMarkerInfoINTEL* pMarkerInfoFixed = &pMarkerInfo) + { + VkResult result = handle.PInvoke.vkCmdSetPerformanceStreamMarkerINTEL.Invoke( + handle.Handle, + pMarkerInfoFixed + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdSetPerformanceOverrideINTEL - Performance override settings + /// + /// + /// + /// Some applications might want measure the effect of a set of commands with a + /// different settings. + /// It is possible to override a particular settings using : + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkCmdSetPerformanceOverrideINTEL( + /// VkCommandBuffer commandBuffer, + /// const VkPerformanceOverrideInfoINTEL* pOverrideInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetPerformanceOverrideINTEL( + this T handle, + in VkPerformanceOverrideInfoINTEL pOverrideInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkPerformanceOverrideInfoINTEL* pOverrideInfoFixed = &pOverrideInfo) + { + VkResult result = handle.PInvoke.vkCmdSetPerformanceOverrideINTEL.Invoke( + handle.Handle, + pOverrideInfoFixed + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkAcquirePerformanceConfigurationINTEL - Acquire the performance query capability + /// + /// + /// + /// To acquire a device performance configuration, call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkAcquirePerformanceConfigurationINTEL( + /// VkDevice device, + /// const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + /// VkPerformanceConfigurationINTEL* pConfiguration); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void AcquirePerformanceConfigurationINTEL( + this VulkanHandleWrapper handle, + in VkPerformanceConfigurationAcquireInfoINTEL pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration + ) + { + fixed (VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfoFixed = &pAcquireInfo) + { + VkResult result = handle.PInvoke.vkAcquirePerformanceConfigurationINTEL.Invoke( + handle.Handle, + pAcquireInfoFixed, + pConfiguration + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkReleasePerformanceConfigurationINTEL - Release a configuration to capture performance data + /// + /// + /// + /// To release a device performance configuration, call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkReleasePerformanceConfigurationINTEL( + /// VkDevice device, + /// VkPerformanceConfigurationINTEL configuration); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleasePerformanceConfigurationINTEL( + this VulkanHandleWrapper handle, + VkPerformanceConfigurationINTEL configuration + ) + { + VkResult result = handle.PInvoke.vkReleasePerformanceConfigurationINTEL.Invoke( + handle.Handle, + configuration + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkQueueSetPerformanceConfigurationINTEL - Set a performance query + /// + /// + /// + /// To set a performance configuration, call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkQueueSetPerformanceConfigurationINTEL( + /// VkQueue queue, + /// VkPerformanceConfigurationINTEL configuration); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPerformanceConfigurationINTEL( + this VulkanHandleWrapper handle, + VkPerformanceConfigurationINTEL configuration + ) + { + VkResult result = handle.PInvoke.vkQueueSetPerformanceConfigurationINTEL.Invoke( + handle.Handle, + configuration + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetPerformanceParameterINTEL - Query performance capabilities of the device + /// + /// + /// + /// Some performance query features of a device can be discovered with the call: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VkResult vkGetPerformanceParameterINTEL( + /// VkDevice device, + /// VkPerformanceParameterTypeINTEL parameter, + /// VkPerformanceValueINTEL* pValue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetPerformanceParameterINTEL( + this VulkanHandleWrapper handle, + VkPerformanceParameterTypeINTEL parameter, + ref VkPerformanceValueINTEL pValue + ) + { + fixed (VkPerformanceValueINTEL* pValueFixed = &pValue) + { + VkResult result = handle.PInvoke.vkGetPerformanceParameterINTEL.Invoke( + handle.Handle, + parameter, + pValueFixed + ); + switch (result) + { + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPerformanceValueINTEL. + public static VkPerformanceValueINTEL GetPerformanceParameterINTEL( + this VulkanHandleWrapper handle, + VkPerformanceParameterTypeINTEL parameter + ) + { + VkPerformanceValueINTEL outValue = new(); + GetPerformanceParameterINTEL(handle, parameter, ref outValue); + return outValue; + } + + /// + /// vkSetLocalDimmingAMD - Set Local Dimming + /// + /// + /// + /// The local dimming HDR setting may also be changed over the life of a + /// swapchain by calling: + /// + /// + /// // Provided by VK_AMD_display_native_hdr + /// void vkSetLocalDimmingAMD( + /// VkDevice device, + /// VkSwapchainKHR swapChain, + /// VkBool32 localDimmingEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLocalDimmingAMD( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapChain, + Brutal.Bool32 localDimmingEnable + ) + { + handle.PInvoke.vkSetLocalDimmingAMD.Invoke(handle.Handle, swapChain, localDimmingEnable); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceAddress GetBufferDeviceAddressEXT( + this VulkanHandleWrapper handle, + in VkBufferDeviceAddressInfo pInfo + ) + { + fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetBufferDeviceAddressEXT.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLineStippleEXT(this T handle, int lineStippleFactor, ushort lineStipplePattern) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLineStippleEXT.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ResetQueryPoolEXT( + this VulkanHandleWrapper handle, + VkQueryPool queryPool, + int firstQuery, + int queryCount + ) + { + handle.PInvoke.vkResetQueryPoolEXT.Invoke(handle.Handle, queryPool, firstQuery, queryCount); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCullModeEXT(this T handle, VkCullModeFlags cullMode) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCullModeEXT.Invoke(handle.Handle, cullMode); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetFrontFaceEXT(this T handle, VkFrontFace frontFace) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetFrontFaceEXT.Invoke(handle.Handle, frontFace); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPrimitiveTopologyEXT(this T handle, VkPrimitiveTopology primitiveTopology) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPrimitiveTopologyEXT.Invoke(handle.Handle, primitiveTopology); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetViewportWithCountEXT(this T handle, int viewportCount, VkViewport* pViewports) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetViewportWithCountEXT.Invoke(handle.Handle, viewportCount, pViewports); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetScissorWithCountEXT(this T handle, int scissorCount, VkRect2D* pScissors) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetScissorWithCountEXT.Invoke(handle.Handle, scissorCount, pScissors); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindVertexBuffers2EXT( + this T handle, + int firstBinding, + int bindingCount, + VkBuffer* pBuffers, + ByteSize64* pOffsets, + ByteSize64* pSizes, + ByteSize64* pStrides + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindVertexBuffers2EXT.Invoke( + handle.Handle, + firstBinding, + bindingCount, + pBuffers, + pOffsets, + pSizes, + pStrides + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthTestEnableEXT(this T handle, Brutal.Bool32 depthTestEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthTestEnableEXT.Invoke(handle.Handle, depthTestEnable); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthWriteEnableEXT(this T handle, Brutal.Bool32 depthWriteEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthWriteEnableEXT.Invoke(handle.Handle, depthWriteEnable); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthCompareOpEXT(this T handle, VkCompareOp depthCompareOp) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthCompareOpEXT.Invoke(handle.Handle, depthCompareOp); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthBoundsTestEnableEXT(this T handle, Brutal.Bool32 depthBoundsTestEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthBoundsTestEnableEXT.Invoke(handle.Handle, depthBoundsTestEnable); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilTestEnableEXT(this T handle, Brutal.Bool32 stencilTestEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilTestEnableEXT.Invoke(handle.Handle, stencilTestEnable); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetStencilOpEXT( + this T handle, + VkStencilFaceFlags faceMask, + VkStencilOp failOp, + VkStencilOp passOp, + VkStencilOp depthFailOp, + VkCompareOp compareOp + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetStencilOpEXT.Invoke(handle.Handle, faceMask, failOp, passOp, depthFailOp, compareOp); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyMemoryToImageEXT( + this VulkanHandleWrapper handle, + in VkCopyMemoryToImageInfo pCopyMemoryToImageInfo + ) + { + fixed (VkCopyMemoryToImageInfo* pCopyMemoryToImageInfoFixed = &pCopyMemoryToImageInfo) + { + return handle.PInvoke.vkCopyMemoryToImageEXT.Invoke(handle.Handle, pCopyMemoryToImageInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyImageToMemoryEXT( + this VulkanHandleWrapper handle, + in VkCopyImageToMemoryInfo pCopyImageToMemoryInfo + ) + { + fixed (VkCopyImageToMemoryInfo* pCopyImageToMemoryInfoFixed = &pCopyImageToMemoryInfo) + { + return handle.PInvoke.vkCopyImageToMemoryEXT.Invoke(handle.Handle, pCopyImageToMemoryInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyImageToImageEXT( + this VulkanHandleWrapper handle, + in VkCopyImageToImageInfo pCopyImageToImageInfo + ) + { + fixed (VkCopyImageToImageInfo* pCopyImageToImageInfoFixed = &pCopyImageToImageInfo) + { + return handle.PInvoke.vkCopyImageToImageEXT.Invoke(handle.Handle, pCopyImageToImageInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult TransitionImageLayoutEXT( + this VulkanHandleWrapper handle, + int transitionCount, + VkHostImageLayoutTransitionInfo* pTransitions + ) + { + return handle.PInvoke.vkTransitionImageLayoutEXT.Invoke(handle.Handle, transitionCount, pTransitions); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageSubresourceLayout2EXT( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource2* pSubresource, + ref VkSubresourceLayout2 pLayout + ) + { + fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) + { + handle.PInvoke.vkGetImageSubresourceLayout2EXT.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSubresourceLayout2. + public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2EXT( + this VulkanHandleWrapper handle, + VkImage image, + VkImageSubresource2* pSubresource + ) + { + VkSubresourceLayout2 outValue = new(); + GetImageSubresourceLayout2EXT(handle, image, pSubresource, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult ReleaseSwapchainImagesEXT( + this VulkanHandleWrapper handle, + in VkReleaseSwapchainImagesInfoKHR pReleaseInfo + ) + { + fixed (VkReleaseSwapchainImagesInfoKHR* pReleaseInfoFixed = &pReleaseInfo) + { + return handle.PInvoke.vkReleaseSwapchainImagesEXT.Invoke(handle.Handle, pReleaseInfoFixed); + } + } + + /// + /// vkGetGeneratedCommandsMemoryRequirementsNV - Retrieve the buffer allocation requirements for generated commands + /// + /// + /// + /// With `VK_NV_device_generated_commands`, to retrieve the memory size + /// and alignment requirements of a particular execution state call: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// void vkGetGeneratedCommandsMemoryRequirementsNV( + /// VkDevice device, + /// const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetGeneratedCommandsMemoryRequirementsNV( + this VulkanHandleWrapper handle, + in VkGeneratedCommandsMemoryRequirementsInfoNV pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkGeneratedCommandsMemoryRequirementsInfoNV* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetGeneratedCommandsMemoryRequirementsNV.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetGeneratedCommandsMemoryRequirementsNV( + this VulkanHandleWrapper handle, + in VkGeneratedCommandsMemoryRequirementsInfoNV pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetGeneratedCommandsMemoryRequirementsNV(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkCmdPreprocessGeneratedCommandsNV - Performs preprocessing for generated commands + /// + /// + /// + /// Commands can be preprocessed prior execution using the following command: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// void vkCmdPreprocessGeneratedCommandsNV( + /// VkCommandBuffer commandBuffer, + /// const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PreprocessGeneratedCommandsNV( + this T handle, + in VkGeneratedCommandsInfoNV pGeneratedCommandsInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkGeneratedCommandsInfoNV* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) + { + handle.PInvoke.vkCmdPreprocessGeneratedCommandsNV.Invoke(handle.Handle, pGeneratedCommandsInfoFixed); + } + } + + /// + /// vkCmdExecuteGeneratedCommandsNV - Generate and execute commands on the device + /// + /// + /// + /// :refpage: vkCmdExecuteGeneratedCommandsNV + /// + /// + /// With `VK_NV_device_generated_commands`, the actual generation of + /// commands as well as their execution on the device is handled as single + /// action with: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// void vkCmdExecuteGeneratedCommandsNV( + /// VkCommandBuffer commandBuffer, + /// VkBool32 isPreprocessed, + /// const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ExecuteGeneratedCommandsNV( + this T handle, + Brutal.Bool32 isPreprocessed, + in VkGeneratedCommandsInfoNV pGeneratedCommandsInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkGeneratedCommandsInfoNV* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) + { + handle.PInvoke.vkCmdExecuteGeneratedCommandsNV.Invoke( + handle.Handle, + isPreprocessed, + pGeneratedCommandsInfoFixed + ); + } + } + + /// + /// vkCmdBindPipelineShaderGroupNV - Bind a pipeline object + /// + /// + /// + /// For pipelines that were created with the support of multiple shader groups + /// (see Graphics Pipeline Shader Groups^), the regular + /// vkCmdBindPipeline command will bind Shader Group `0`. + /// To explicitly bind a shader group use: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// void vkCmdBindPipelineShaderGroupNV( + /// VkCommandBuffer commandBuffer, + /// VkPipelineBindPoint pipelineBindPoint, + /// VkPipeline pipeline, + /// uint32_t groupIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindPipelineShaderGroupNV( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, + int groupIndex + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindPipelineShaderGroupNV.Invoke( + handle.Handle, + pipelineBindPoint, + pipeline, + groupIndex + ); + } + + /// + /// vkCreateIndirectCommandsLayoutNV - Create an indirect command layout object + /// + /// + /// + /// Indirect command layouts for `VK_NV_device_generated_commands` are + /// created by: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// VkResult vkCreateIndirectCommandsLayoutNV( + /// VkDevice device, + /// const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkIndirectCommandsLayoutNV CreateIndirectCommandsLayoutNV( + this VulkanHandleWrapper handle, + in VkIndirectCommandsLayoutCreateInfoNV pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkIndirectCommandsLayoutCreateInfoNV* pCreateInfoFixed = &pCreateInfo) + { + VkIndirectCommandsLayoutNV pIndirectCommandsLayoutLocal = default; + VkResult result = handle.PInvoke.vkCreateIndirectCommandsLayoutNV.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pIndirectCommandsLayoutLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pIndirectCommandsLayoutLocal; + } + } + + /// + /// vkDestroyIndirectCommandsLayoutNV - Destroy an indirect commands layout + /// + /// + /// + /// Indirect command layouts for `VK_NV_device_generated_commands` are + /// destroyed by: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// void vkDestroyIndirectCommandsLayoutNV( + /// VkDevice device, + /// VkIndirectCommandsLayoutNV indirectCommandsLayout, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyIndirectCommandsLayoutNV( + this VulkanHandleWrapper handle, + VkIndirectCommandsLayoutNV indirectCommandsLayout, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyIndirectCommandsLayoutNV.Invoke(handle.Handle, indirectCommandsLayout, pAllocator); + } + + /// + /// vkCmdSetDepthBias2EXT - Set depth bias factors and clamp dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the depth bias parameters, + /// call: + /// + /// + /// // Provided by VK_EXT_depth_bias_control + /// void vkCmdSetDepthBias2EXT( + /// VkCommandBuffer commandBuffer, + /// const VkDepthBiasInfoEXT* pDepthBiasInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDepthBias2EXT(this T handle, in VkDepthBiasInfoEXT pDepthBiasInfo) + where T : VulkanHandleWrapper + { + fixed (VkDepthBiasInfoEXT* pDepthBiasInfoFixed = &pDepthBiasInfo) + { + handle.PInvoke.vkCmdSetDepthBias2EXT.Invoke(handle.Handle, pDepthBiasInfoFixed); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreatePrivateDataSlotEXT( + this VulkanHandleWrapper handle, + in VkPrivateDataSlotCreateInfo pCreateInfo, + VkAllocator? pAllocator, + VkPrivateDataSlot* pPrivateDataSlot + ) + { + fixed (VkPrivateDataSlotCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + return handle.PInvoke.vkCreatePrivateDataSlotEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + pPrivateDataSlot + ); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyPrivateDataSlotEXT( + this VulkanHandleWrapper handle, + VkPrivateDataSlot privateDataSlot, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyPrivateDataSlotEXT.Invoke(handle.Handle, privateDataSlot, pAllocator); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static VkResult SetPrivateDataEXT( + this VulkanHandleWrapper handle, + VkObjectType objectType, + nint objectHandle, + VkPrivateDataSlot privateDataSlot, + nint data + ) + { + return handle.PInvoke.vkSetPrivateDataEXT.Invoke( + handle.Handle, + objectType, + objectHandle, + privateDataSlot, + data + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe nint GetPrivateDataEXT( + this VulkanHandleWrapper handle, + VkObjectType objectType, + nint objectHandle, + VkPrivateDataSlot privateDataSlot + ) + { + nint pDataLocal = default; + handle.PInvoke.vkGetPrivateDataEXT.Invoke( + handle.Handle, + objectType, + objectHandle, + privateDataSlot, + &pDataLocal + ); + return pDataLocal; + } + + /// + /// vkQueueSetPerfHintQCOM - Set a performance hint on a queue + /// + /// + /// + /// To set a performance hint on a VkQueue object, call: + /// + /// + /// // Provided by VK_QCOM_queue_perf_hint + /// VkResult vkQueueSetPerfHintQCOM( + /// VkQueue queue, + /// const VkPerfHintInfoQCOM* pPerfHintInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetPerfHintQCOM( + this VulkanHandleWrapper handle, + in VkPerfHintInfoQCOM pPerfHintInfo + ) + { + fixed (VkPerfHintInfoQCOM* pPerfHintInfoFixed = &pPerfHintInfo) + { + VkResult result = handle.PInvoke.vkQueueSetPerfHintQCOM.Invoke(handle.Handle, pPerfHintInfoFixed); + switch (result) + { + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkQueueSetPerfHintQCOM failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkQueueSetPerfHintQCOM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkQueueSetPerfHintQCOM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdDispatchTileQCOM - Dispatch per-tile work items + /// + /// + /// + /// :refpage: vkCmdDispatchTileQCOM + /// + /// + /// To record an area-based dispatch, call: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// void vkCmdDispatchTileQCOM( + /// VkCommandBuffer commandBuffer, + /// const VkDispatchTileInfoQCOM* pDispatchTileInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DispatchTileQCOM(this T handle, in VkDispatchTileInfoQCOM pDispatchTileInfo) + where T : VulkanHandleWrapper + { + fixed (VkDispatchTileInfoQCOM* pDispatchTileInfoFixed = &pDispatchTileInfo) + { + handle.PInvoke.vkCmdDispatchTileQCOM.Invoke(handle.Handle, pDispatchTileInfoFixed); + } + } + + /// + /// vkCmdBeginPerTileExecutionQCOM - Begin per-tile execution mode + /// + /// + /// + /// :refpage: vkCmdBeginPerTileExecutionQCOM + /// + /// + /// To enable the per-tile execution model, call: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// void vkCmdBeginPerTileExecutionQCOM( + /// VkCommandBuffer commandBuffer, + /// const VkPerTileBeginInfoQCOM* pPerTileBeginInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginPerTileExecutionQCOM( + this T handle, + in VkPerTileBeginInfoQCOM pPerTileBeginInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkPerTileBeginInfoQCOM* pPerTileBeginInfoFixed = &pPerTileBeginInfo) + { + handle.PInvoke.vkCmdBeginPerTileExecutionQCOM.Invoke(handle.Handle, pPerTileBeginInfoFixed); + } + } + + /// + /// vkCmdEndPerTileExecutionQCOM - End per-tile execution mode + /// + /// + /// + /// :refpage: vkCmdEndPerTileExecutionQCOM + /// + /// + /// To disable per-tile execution model, call: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// void vkCmdEndPerTileExecutionQCOM( + /// VkCommandBuffer commandBuffer, + /// const VkPerTileEndInfoQCOM* pPerTileEndInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndPerTileExecutionQCOM(this T handle, in VkPerTileEndInfoQCOM pPerTileEndInfo) + where T : VulkanHandleWrapper + { + fixed (VkPerTileEndInfoQCOM* pPerTileEndInfoFixed = &pPerTileEndInfo) + { + handle.PInvoke.vkCmdEndPerTileExecutionQCOM.Invoke(handle.Handle, pPerTileEndInfoFixed); + } + } + + /// + /// vkSetLatencySleepModeLegacyNV - Stub description of vkSetLatencySleepModeLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkSetLatencySleepModeLegacyNV( + /// VkDevice device, + /// VkBool32 lowLatencyMode, + /// VkBool32 lowLatencyBoost, + /// uint32_t minimumIntervalUs); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLatencySleepModeLegacyNV( + this VulkanHandleWrapper handle, + Brutal.Bool32 lowLatencyMode, + Brutal.Bool32 lowLatencyBoost, + int minimumIntervalUs + ) + { + handle.PInvoke.vkSetLatencySleepModeLegacyNV.Invoke( + handle.Handle, + lowLatencyMode, + lowLatencyBoost, + minimumIntervalUs + ); + } + + /// + /// vkLatencySleepLegacyNV - Stub description of vkLatencySleepLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkLatencySleepLegacyNV( + /// VkDevice device, + /// VkSemaphore signalSemaphore, + /// uint64_t value); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LatencySleepLegacyNV( + this VulkanHandleWrapper handle, + VkSemaphore signalSemaphore, + nint value + ) + { + handle.PInvoke.vkLatencySleepLegacyNV.Invoke(handle.Handle, signalSemaphore, value); + } + + /// + /// vkSetLatencyMarkerLegacyNV - Stub description of vkSetLatencyMarkerLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkSetLatencyMarkerLegacyNV( + /// VkDevice device, + /// uint64_t frameID, + /// uint32_t marker); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLatencyMarkerLegacyNV( + this VulkanHandleWrapper handle, + nint frameID, + int marker + ) + { + handle.PInvoke.vkSetLatencyMarkerLegacyNV.Invoke(handle.Handle, frameID, marker); + } + + /// + /// vkGetLatencyTimingsLegacyNV - Stub description of vkGetLatencyTimingsLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkGetLatencyTimingsLegacyNV( + /// VkDevice device, + /// void* pTimings); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetLatencyTimingsLegacyNV( + this VulkanHandleWrapper handle + ) + { + void* pTimingsLocal = default; + handle.PInvoke.vkGetLatencyTimingsLegacyNV.Invoke(handle.Handle, pTimingsLocal); + return pTimingsLocal; + } + + /// + /// vkQueueNotifyOutOfBandLegacyNV - Stub description of vkQueueNotifyOutOfBandLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkQueueNotifyOutOfBandLegacyNV( + /// VkQueue queue, + /// uint32_t queueType); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void NotifyOutOfBandLegacyNV( + this VulkanHandleWrapper handle, + int queueType + ) + { + handle.PInvoke.vkQueueNotifyOutOfBandLegacyNV.Invoke(handle.Handle, queueType); + } + + /// + /// vkGetSleepStatusLegacyNV - Stub description of vkGetSleepStatusLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkGetSleepStatusLegacyNV( + /// VkDevice device, + /// VkBool32* pLowLatencyMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool32 GetSleepStatusLegacyNV( + this VulkanHandleWrapper handle + ) + { + Brutal.Bool32 pLowLatencyModeLocal = default; + handle.PInvoke.vkGetSleepStatusLegacyNV.Invoke(handle.Handle, &pLowLatencyModeLocal); + return pLowLatencyModeLocal; + } + + /// + /// vkShutdownLatencyDeviceLegacyNV - Stub description of vkShutdownLatencyDeviceLegacyNV + /// + /// + /// + /// This is an undocumented legacy function and is superseded by the + /// VK_NV_low_latency2 extension. + /// + /// + /// // Provided by VK_NV_low_latency + /// void vkShutdownLatencyDeviceLegacyNV( + /// VkDevice device); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ShutdownLatencyDeviceLegacyNV( + this VulkanHandleWrapper handle + ) + { + handle.PInvoke.vkShutdownLatencyDeviceLegacyNV.Invoke(handle.Handle); + } + + /// + /// vkGetDescriptorSetLayoutSizeEXT - Get the size of a descriptor set layout in memory + /// + /// + /// + /// To determine the amount of memory needed to store all descriptors with a + /// given layout, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// void vkGetDescriptorSetLayoutSizeEXT( + /// VkDevice device, + /// VkDescriptorSetLayout layout, + /// VkDeviceSize* pLayoutSizeInBytes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe ByteSize64 GetDescriptorSetLayoutSizeEXT( + this VulkanHandleWrapper handle, + VkDescriptorSetLayout layout + ) + { + ByteSize64 pLayoutSizeInBytesLocal = default; + handle.PInvoke.vkGetDescriptorSetLayoutSizeEXT.Invoke(handle.Handle, layout, &pLayoutSizeInBytesLocal); + return pLayoutSizeInBytesLocal; + } + + /// + /// vkGetDescriptorSetLayoutBindingOffsetEXT - Get the offset of a binding within a descriptor set layout + /// + /// + /// + /// To get the offset of a binding within a descriptor set layout in memory, + /// call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// void vkGetDescriptorSetLayoutBindingOffsetEXT( + /// VkDevice device, + /// VkDescriptorSetLayout layout, + /// uint32_t binding, + /// VkDeviceSize* pOffset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe ByteSize64 GetDescriptorSetLayoutBindingOffsetEXT( + this VulkanHandleWrapper handle, + VkDescriptorSetLayout layout, + int binding + ) + { + ByteSize64 pOffsetLocal = default; + handle.PInvoke.vkGetDescriptorSetLayoutBindingOffsetEXT.Invoke( + handle.Handle, + layout, + binding, + &pOffsetLocal + ); + return pOffsetLocal; + } + + /// + /// vkGetDescriptorEXT - To get a descriptor to place in a buffer + /// + /// + /// + /// To get descriptor data to place in a buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// void vkGetDescriptorEXT( + /// VkDevice device, + /// const VkDescriptorGetInfoEXT* pDescriptorInfo, + /// size_t dataSize, + /// void* pDescriptor); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDescriptorEXT( + this VulkanHandleWrapper handle, + in VkDescriptorGetInfoEXT pDescriptorInfo, + scoped ReadOnlySpan pDescriptor + ) + { + fixed (byte* pDescriptorFixed = pDescriptor) + fixed (VkDescriptorGetInfoEXT* pDescriptorInfoFixed = &pDescriptorInfo) + { + handle.PInvoke.vkGetDescriptorEXT.Invoke( + handle.Handle, + pDescriptorInfoFixed, + (nuint)pDescriptor.Length, + pDescriptorFixed + ); + } + } + + /// + /// vkCmdBindDescriptorBuffersEXT - Binding descriptor buffers to a command buffer + /// + /// + /// + /// :refpage: vkCmdBindDescriptorBuffersEXT + /// + /// + /// To bind descriptor buffers to a command buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// void vkCmdBindDescriptorBuffersEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t bufferCount, + /// const VkDescriptorBufferBindingInfoEXT* pBindingInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDescriptorBuffersEXT( + this T handle, + scoped ReadOnlySpan pBindingInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkDescriptorBufferBindingInfoEXT* pBindingInfosFixed = pBindingInfos) + { + handle.PInvoke.vkCmdBindDescriptorBuffersEXT.Invoke( + handle.Handle, + pBindingInfos.Length, + pBindingInfosFixed + ); + } + } + + /// + /// vkCmdSetDescriptorBufferOffsetsEXT - Setting descriptor buffer offsets in a command buffer + /// + /// + /// + /// :refpage: vkCmdSetDescriptorBufferOffsetsEXT + /// + /// + /// To set descriptor buffer offsets in a command buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// void vkCmdSetDescriptorBufferOffsetsEXT( + /// VkCommandBuffer commandBuffer, + /// VkPipelineBindPoint pipelineBindPoint, + /// VkPipelineLayout layout, + /// uint32_t firstSet, + /// uint32_t setCount, + /// const uint32_t* pBufferIndices, + /// const VkDeviceSize* pOffsets); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDescriptorBufferOffsetsEXT( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + int firstSet, + scoped ReadOnlySpan pBufferIndices, + scoped ReadOnlySpan pOffsets + ) + where T : VulkanHandleWrapper + { + fixed (ByteSize64* pOffsetsFixed = pOffsets) + fixed (int* pBufferIndicesFixed = pBufferIndices) + { + handle.PInvoke.vkCmdSetDescriptorBufferOffsetsEXT.Invoke( + handle.Handle, + pipelineBindPoint, + layout, + firstSet, + pBufferIndices.Length, + pBufferIndicesFixed, + pOffsetsFixed + ); + } + } + + /// + /// vkCmdBindDescriptorBufferEmbeddedSamplersEXT - Setting embedded immutable samplers offsets in a command buffer + /// + /// + /// + /// :refpage: vkCmdBindDescriptorBufferEmbeddedSamplersEXT + /// + /// + /// To bind an embedded immutable sampler set to a command buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// void vkCmdBindDescriptorBufferEmbeddedSamplersEXT( + /// VkCommandBuffer commandBuffer, + /// VkPipelineBindPoint pipelineBindPoint, + /// VkPipelineLayout layout, + /// uint32_t set); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindDescriptorBufferEmbeddedSamplersEXT( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + int set + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindDescriptorBufferEmbeddedSamplersEXT.Invoke( + handle.Handle, + pipelineBindPoint, + layout, + set + ); + } + + /// + /// vkGetBufferOpaqueCaptureDescriptorDataEXT - Get buffer opaque capture descriptor data + /// + /// + /// + /// To get the opaque descriptor data for a buffer, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// VkResult vkGetBufferOpaqueCaptureDescriptorDataEXT( + /// VkDevice device, + /// const VkBufferCaptureDescriptorDataInfoEXT* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetBufferOpaqueCaptureDescriptorDataEXT( + this VulkanHandleWrapper handle, + in VkBufferCaptureDescriptorDataInfoEXT pInfo + ) + { + fixed (VkBufferCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetBufferOpaqueCaptureDescriptorDataEXT.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkGetImageOpaqueCaptureDescriptorDataEXT - Get image opaque capture descriptor data + /// + /// + /// + /// To get the opaque capture descriptor data for an image, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// VkResult vkGetImageOpaqueCaptureDescriptorDataEXT( + /// VkDevice device, + /// const VkImageCaptureDescriptorDataInfoEXT* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetImageOpaqueCaptureDescriptorDataEXT( + this VulkanHandleWrapper handle, + in VkImageCaptureDescriptorDataInfoEXT pInfo + ) + { + fixed (VkImageCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetImageOpaqueCaptureDescriptorDataEXT.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkGetImageViewOpaqueCaptureDescriptorDataEXT - Get image view opaque capture descriptor data + /// + /// + /// + /// To get the opaque capture descriptor data for an image view, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// VkResult vkGetImageViewOpaqueCaptureDescriptorDataEXT( + /// VkDevice device, + /// const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetImageViewOpaqueCaptureDescriptorDataEXT( + this VulkanHandleWrapper handle, + in VkImageViewCaptureDescriptorDataInfoEXT pInfo + ) + { + fixed (VkImageViewCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetImageViewOpaqueCaptureDescriptorDataEXT.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkGetSamplerOpaqueCaptureDescriptorDataEXT - Get sampler opaque capture descriptor data + /// + /// + /// + /// To get the opaque capture descriptor data for a sampler, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// VkResult vkGetSamplerOpaqueCaptureDescriptorDataEXT( + /// VkDevice device, + /// const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetSamplerOpaqueCaptureDescriptorDataEXT( + this VulkanHandleWrapper handle, + in VkSamplerCaptureDescriptorDataInfoEXT pInfo + ) + { + fixed (VkSamplerCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetSamplerOpaqueCaptureDescriptorDataEXT.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT - Get acceleration structure opaque capture descriptor data + /// + /// + /// + /// To get the opaque capture descriptor data for an acceleration structure, + /// call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing + /// VkResult vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + /// VkDevice device, + /// const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + this VulkanHandleWrapper handle, + in VkAccelerationStructureCaptureDescriptorDataInfoEXT pInfo + ) + { + fixed (VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkCmdSetFragmentShadingRateEnumNV - Set pipeline fragment shading rate dynamically for a command buffer using enums + /// + /// + /// + /// To dynamically set^ the pipeline fragment + /// shading rate and combiner operation, call: + /// + /// + /// // Provided by VK_NV_fragment_shading_rate_enums + /// void vkCmdSetFragmentShadingRateEnumNV( + /// VkCommandBuffer commandBuffer, + /// VkFragmentShadingRateNV shadingRate, + /// const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetFragmentShadingRateEnumNV( + this T handle, + VkFragmentShadingRateNV shadingRate, + VkFragmentShadingRateCombinerOpKHR* combinerOps + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetFragmentShadingRateEnumNV.Invoke(handle.Handle, shadingRate, combinerOps); + } + + /// + /// vkGetDeviceFaultInfoEXT - Reports fault information for the specified device + /// + /// + /// + /// To retrieve diagnostic information about faults that may: have caused device + /// loss, call: + /// + /// + /// // Provided by VK_EXT_device_fault + /// VkResult vkGetDeviceFaultInfoEXT( + /// VkDevice device, + /// VkDeviceFaultCountsEXT* pFaultCounts, + /// VkDeviceFaultInfoEXT* pFaultInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetFaultInfoEXT( + this VulkanHandleWrapper handle, + VkDeviceFaultCountsEXT* pFaultCounts, + in VkDeviceFaultInfoEXT pFaultInfo + ) + { + fixed (VkDeviceFaultInfoEXT* pFaultInfoFixed = &pFaultInfo) + { + VkResult result = handle.PInvoke.vkGetDeviceFaultInfoEXT.Invoke( + handle.Handle, + pFaultCounts, + pFaultInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceFaultInfoEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceFaultInfoEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceFaultInfoEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// + /// vkCmdSetVertexInputEXT - Set the vertex input state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the vertex input attribute + /// and vertex input binding descriptions, call: + /// + /// + /// // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state + /// void vkCmdSetVertexInputEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t vertexBindingDescriptionCount, + /// const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + /// uint32_t vertexAttributeDescriptionCount, + /// const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetVertexInputEXT( + this T handle, + scoped ReadOnlySpan pVertexBindingDescriptions, + scoped ReadOnlySpan pVertexAttributeDescriptions + ) + where T : VulkanHandleWrapper + { + fixed ( + VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptionsFixed = pVertexAttributeDescriptions + ) + fixed (VkVertexInputBindingDescription2EXT* pVertexBindingDescriptionsFixed = pVertexBindingDescriptions) + { + handle.PInvoke.vkCmdSetVertexInputEXT.Invoke( + handle.Handle, + pVertexBindingDescriptions.Length, + pVertexBindingDescriptionsFixed, + pVertexAttributeDescriptions.Length, + pVertexAttributeDescriptionsFixed + ); + } + } + + /// + /// vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI - Query maximum supported subpass shading workgroup size for a give render pass + /// + /// + /// + /// A subpass shading pipeline's workgroup size is a 2D vector with number of + /// power-of-two in width and height. + /// The maximum number of width and height is implementation-dependent, and may: + /// vary for different formats and sample counts of attachments in a render + /// pass. + /// + /// + /// To query the maximum workgroup size, call: + /// + /// + /// // Provided by VK_HUAWEI_subpass_shading + /// VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( + /// VkDevice device, + /// VkRenderPass renderpass, + /// VkExtent2D* pMaxWorkgroupSize); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSubpassShadingMaxWorkgroupSizeHUAWEI( + this VulkanHandleWrapper handle, + VkRenderPass renderpass, + scoped ReadOnlySpan pMaxWorkgroupSize + ) + { + fixed (VkExtent2D* pMaxWorkgroupSizeFixed = pMaxWorkgroupSize) + { + VkResult result = handle.PInvoke.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.Invoke( + handle.Handle, + renderpass, + pMaxWorkgroupSizeFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdSubpassShadingHUAWEI - Dispatch compute work items + /// + /// + /// + /// :refpage: vkCmdSubpassShadingHUAWEI + /// + /// + /// A subpass shading dispatches a compute pipeline work with the work dimension + /// of render area of the calling subpass and work groups are partitioned by + /// specified work group size. + /// Subpass operations like subpassLoad are allowed to be used. + /// + /// + /// To record a subpass shading, call: + /// + /// + /// // Provided by VK_HUAWEI_subpass_shading + /// void vkCmdSubpassShadingHUAWEI( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SubpassShadingHUAWEI(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSubpassShadingHUAWEI.Invoke(handle.Handle); + } + + /// + /// vkCmdBindInvocationMaskHUAWEI - Bind an invocation mask image on a command buffer + /// + /// + /// + /// When invocation mask image usage is enabled in the bound ray tracing + /// pipeline, the pipeline uses an invocation mask image specified by the + /// command: + /// + /// + /// // Provided by VK_HUAWEI_invocation_mask + /// void vkCmdBindInvocationMaskHUAWEI( + /// VkCommandBuffer commandBuffer, + /// VkImageView imageView, + /// VkImageLayout imageLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindInvocationMaskHUAWEI(this T handle, VkImageView imageView, VkImageLayout imageLayout) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBindInvocationMaskHUAWEI.Invoke(handle.Handle, imageView, imageLayout); + } + + /// + /// vkGetMemoryRemoteAddressNV - Get an address for a memory object accessible by remote devices + /// + /// + /// + /// To export an address representing the payload of a Vulkan device memory + /// object accessible by remote devices, call: + /// + /// + /// // Provided by VK_NV_external_memory_rdma + /// VkResult vkGetMemoryRemoteAddressNV( + /// VkDevice device, + /// const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + /// VkRemoteAddressNV* pAddress); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkRemoteAddressNV GetMemoryRemoteAddressNV( + this VulkanHandleWrapper handle, + in VkMemoryGetRemoteAddressInfoNV pMemoryGetRemoteAddressInfo + ) + { + fixed (VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfoFixed = &pMemoryGetRemoteAddressInfo) + { + VkRemoteAddressNV pAddressLocal = default; + VkResult result = handle.PInvoke.vkGetMemoryRemoteAddressNV.Invoke( + handle.Handle, + pMemoryGetRemoteAddressInfoFixed, + &pAddressLocal + ); + switch (result) + { + case VkResult.ErrorInvalidExternalHandle: + throw new VkResultError( + VkResult.ErrorInvalidExternalHandle, + "Vulkan call to vkGetMemoryRemoteAddressNV failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetMemoryRemoteAddressNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetMemoryRemoteAddressNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pAddressLocal; + } + } + + /// + /// vkGetPipelinePropertiesEXT - Query pipeline properties + /// + /// + /// + /// To query the pipeline properties call: + /// + /// + /// // Provided by VK_EXT_pipeline_properties + /// VkResult vkGetPipelinePropertiesEXT( + /// VkDevice device, + /// const VkPipelineInfoKHR* pPipelineInfo, + /// VkBaseOutStructure* pPipelineProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetPipelinePropertiesEXT( + this VulkanHandleWrapper handle, + in VkPipelineInfoKHR pPipelineInfo, + ref VkBaseOutStructure pPipelineProperties + ) + { + fixed (VkBaseOutStructure* pPipelinePropertiesFixed = &pPipelineProperties) + fixed (VkPipelineInfoKHR* pPipelineInfoFixed = &pPipelineInfo) + { + VkResult result = handle.PInvoke.vkGetPipelinePropertiesEXT.Invoke( + handle.Handle, + pPipelineInfoFixed, + pPipelinePropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPipelinePropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPipelinePropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPipelinePropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkBaseOutStructure. + public static VkBaseOutStructure GetPipelinePropertiesEXT( + this VulkanHandleWrapper handle, + in VkPipelineInfoKHR pPipelineInfo + ) + { + VkBaseOutStructure outValue = new(); + GetPipelinePropertiesEXT(handle, pPipelineInfo, ref outValue); + return outValue; + } + + /// + /// vkCmdSetPatchControlPointsEXT - Specify the number of control points per patch dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the number of control points + /// per patch, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object + /// void vkCmdSetPatchControlPointsEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t patchControlPoints); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPatchControlPointsEXT(this T handle, int patchControlPoints) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPatchControlPointsEXT.Invoke(handle.Handle, patchControlPoints); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRasterizerDiscardEnableEXT(this T handle, Brutal.Bool32 rasterizerDiscardEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetRasterizerDiscardEnableEXT.Invoke(handle.Handle, rasterizerDiscardEnable); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthBiasEnableEXT(this T handle, Brutal.Bool32 depthBiasEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthBiasEnableEXT.Invoke(handle.Handle, depthBiasEnable); + } + + /// + /// vkCmdSetLogicOpEXT - Select which logical operation to apply for blend state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the logical operation to + /// apply for blend state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object + /// void vkCmdSetLogicOpEXT( + /// VkCommandBuffer commandBuffer, + /// VkLogicOp logicOp); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLogicOpEXT(this T handle, VkLogicOp logicOp) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLogicOpEXT.Invoke(handle.Handle, logicOp); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPrimitiveRestartEnableEXT(this T handle, Brutal.Bool32 primitiveRestartEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPrimitiveRestartEnableEXT.Invoke(handle.Handle, primitiveRestartEnable); + } + + /// + /// vkCmdSetColorWriteEnableEXT - Enable or disable writes to a color attachment dynamically for a command buffer + /// + /// + /// + /// To dynamically enable or disable^ writes to a + /// color attachment, call: + /// + /// + /// // Provided by VK_EXT_color_write_enable + /// void vkCmdSetColorWriteEnableEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t attachmentCount, + /// const VkBool32* pColorWriteEnables); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetColorWriteEnableEXT( + this T handle, + scoped ReadOnlySpan pColorWriteEnables + ) + where T : VulkanHandleWrapper + { + fixed (Brutal.Bool32* pColorWriteEnablesFixed = pColorWriteEnables) + { + handle.PInvoke.vkCmdSetColorWriteEnableEXT.Invoke( + handle.Handle, + pColorWriteEnables.Length, + pColorWriteEnablesFixed + ); + } + } + + /// + /// vkCmdDrawMultiEXT - Draw primitives + /// + /// + /// + /// :refpage: vkCmdDrawMultiEXT + /// + /// + /// To record an ordered sequence of draws which have no state changes between + /// them, call: + /// + /// + /// // Provided by VK_EXT_multi_draw + /// void vkCmdDrawMultiEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t drawCount, + /// const VkMultiDrawInfoEXT* pVertexInfo, + /// uint32_t instanceCount, + /// uint32_t firstInstance, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawMultiEXT( + this T handle, + scoped ReadOnlySpan pVertexInfo, + int instanceCount, + int firstInstance, + int stride + ) + where T : VulkanHandleWrapper + { + fixed (VkMultiDrawInfoEXT* pVertexInfoFixed = pVertexInfo) + { + handle.PInvoke.vkCmdDrawMultiEXT.Invoke( + handle.Handle, + pVertexInfo.Length, + pVertexInfoFixed, + instanceCount, + firstInstance, + stride + ); + } + } + + /// + /// vkCmdDrawMultiIndexedEXT - Draw primitives + /// + /// + /// + /// :refpage: vkCmdDrawMultiIndexedEXT + /// + /// + /// To record an ordered sequence of indexed draws which have no state changes + /// between them, call: + /// + /// + /// // Provided by VK_EXT_multi_draw + /// void vkCmdDrawMultiIndexedEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t drawCount, + /// const VkMultiDrawIndexedInfoEXT* pIndexInfo, + /// uint32_t instanceCount, + /// uint32_t firstInstance, + /// uint32_t stride, + /// const int32_t* pVertexOffset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DrawMultiIndexedEXT( + this T handle, + scoped ReadOnlySpan pIndexInfo, + int instanceCount, + int firstInstance, + int stride, + int* pVertexOffset + ) + where T : VulkanHandleWrapper + { + fixed (VkMultiDrawIndexedInfoEXT* pIndexInfoFixed = pIndexInfo) + { + handle.PInvoke.vkCmdDrawMultiIndexedEXT.Invoke( + handle.Handle, + pIndexInfo.Length, + pIndexInfoFixed, + instanceCount, + firstInstance, + stride, + pVertexOffset + ); + } + } + + /// + /// vkCreateMicromapEXT - Create a new micromap object + /// + /// + /// + /// :refpage: vkCreateMicromapEXT + /// + /// + /// To create a micromap, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VkResult vkCreateMicromapEXT( + /// VkDevice device, + /// const VkMicromapCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkMicromapEXT* pMicromap); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkMicromapEXT CreateMicromapEXT( + this VulkanHandleWrapper handle, + in VkMicromapCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkMicromapCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkMicromapEXT pMicromapLocal = default; + VkResult result = handle.PInvoke.vkCreateMicromapEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pMicromapLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pMicromapLocal; + } + } + + /// + /// vkDestroyMicromapEXT - Destroy a micromap object + /// + /// + /// + /// :refpage: vkDestroyMicromapEXT + /// + /// + /// To destroy a micromap, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkDestroyMicromapEXT( + /// VkDevice device, + /// VkMicromapEXT micromap, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyMicromapEXT( + this VulkanHandleWrapper handle, + VkMicromapEXT micromap, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyMicromapEXT.Invoke(handle.Handle, micromap, pAllocator); + } + + /// + /// vkCmdBuildMicromapsEXT - Build a micromap + /// + /// + /// + /// :refpage: vkCmdBuildMicromapsEXT + /// + /// + /// To build micromaps represented as a VkMicromapEXT object call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkCmdBuildMicromapsEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t infoCount, + /// const VkMicromapBuildInfoEXT* pInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BuildMicromapsEXT( + this T handle, + scoped ReadOnlySpan pInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkMicromapBuildInfoEXT* pInfosFixed = pInfos) + { + handle.PInvoke.vkCmdBuildMicromapsEXT.Invoke(handle.Handle, pInfos.Length, pInfosFixed); + } + } + + /// + /// vkBuildMicromapsEXT - Build a micromap on the host + /// + /// + /// + /// :refpage: vkBuildMicromapsEXT + /// + /// + /// To build VkMicromapEXT on the host, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VkResult vkBuildMicromapsEXT( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// uint32_t infoCount, + /// const VkMicromapBuildInfoEXT* pInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult BuildMicromapsEXT( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + scoped ReadOnlySpan pInfos + ) + { + fixed (VkMicromapBuildInfoEXT* pInfosFixed = pInfos) + { + VkResult result = handle.PInvoke.vkBuildMicromapsEXT.Invoke( + handle.Handle, + deferredOperation, + pInfos.Length, + pInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCopyMicromapEXT - Copy a micromap on the host + /// + /// + /// + /// :refpage: vkCopyMicromapEXT + /// + /// + /// To copy or compact a VkMicromapEXT on the host, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VkResult vkCopyMicromapEXT( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// const VkCopyMicromapInfoEXT* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyMicromapEXT( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + in VkCopyMicromapInfoEXT pInfo + ) + { + fixed (VkCopyMicromapInfoEXT* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkCopyMicromapEXT.Invoke(handle.Handle, deferredOperation, pInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCopyMicromapToMemoryEXT - Serialize a micromap on the host + /// + /// + /// + /// :refpage: vkCopyMicromapToMemoryEXT + /// + /// + /// To copy a VkMicromapEXT to host accessible memory, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VkResult vkCopyMicromapToMemoryEXT( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// const VkCopyMicromapToMemoryInfoEXT* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyMicromapToMemoryEXT( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + in VkCopyMicromapToMemoryInfoEXT pInfo + ) + { + fixed (VkCopyMicromapToMemoryInfoEXT* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkCopyMicromapToMemoryEXT.Invoke( + handle.Handle, + deferredOperation, + pInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCopyMemoryToMicromapEXT - Deserialize a micromap on the host + /// + /// + /// + /// :refpage: vkCopyMemoryToMicromapEXT + /// + /// + /// To copy host accessible VkMicromapEXT to a micromap, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VkResult vkCopyMemoryToMicromapEXT( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// const VkCopyMemoryToMicromapInfoEXT* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyMemoryToMicromapEXT( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + in VkCopyMemoryToMicromapInfoEXT pInfo + ) + { + fixed (VkCopyMemoryToMicromapInfoEXT* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkCopyMemoryToMicromapEXT.Invoke( + handle.Handle, + deferredOperation, + pInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkWriteMicromapsPropertiesEXT - Query micromap meta-data on the host + /// + /// + /// + /// :refpage: vkWriteMicromapsPropertiesEXT + /// + /// + /// To query VkMicromapEXT size parameters on the host, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VkResult vkWriteMicromapsPropertiesEXT( + /// VkDevice device, + /// uint32_t micromapCount, + /// const VkMicromapEXT* pMicromaps, + /// VkQueryType queryType, + /// size_t dataSize, + /// void* pData, + /// size_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteMicromapsPropertiesEXT( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pMicromaps, + VkQueryType queryType, + scoped ReadOnlySpan pData, + nuint stride + ) + { + fixed (byte* pDataFixed = pData) + fixed (VkMicromapEXT* pMicromapsFixed = pMicromaps) + { + VkResult result = handle.PInvoke.vkWriteMicromapsPropertiesEXT.Invoke( + handle.Handle, + pMicromaps.Length, + pMicromapsFixed, + queryType, + (nuint)pData.Length, + pDataFixed, + stride + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdCopyMicromapEXT - Copy a micromap + /// + /// + /// + /// :refpage: vkCmdCopyMicromapEXT + /// + /// + /// To copy a VkMicromapEXT call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkCmdCopyMicromapEXT( + /// VkCommandBuffer commandBuffer, + /// const VkCopyMicromapInfoEXT* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMicromapEXT(this T handle, in VkCopyMicromapInfoEXT pInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyMicromapInfoEXT* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdCopyMicromapEXT.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdCopyMicromapToMemoryEXT - Copy a micromap to device memory + /// + /// + /// + /// :refpage: vkCmdCopyMicromapToMemoryEXT + /// + /// + /// To copy a VkMicromapEXT to device memory call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkCmdCopyMicromapToMemoryEXT( + /// VkCommandBuffer commandBuffer, + /// const VkCopyMicromapToMemoryInfoEXT* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMicromapToMemoryEXT(this T handle, in VkCopyMicromapToMemoryInfoEXT pInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyMicromapToMemoryInfoEXT* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdCopyMicromapToMemoryEXT.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdCopyMemoryToMicromapEXT - Copy device memory to a micromap + /// + /// + /// + /// :refpage: vkCmdCopyMemoryToMicromapEXT + /// + /// + /// To copy device memory to a micromap call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkCmdCopyMemoryToMicromapEXT( + /// VkCommandBuffer commandBuffer, + /// const VkCopyMemoryToMicromapInfoEXT* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryToMicromapEXT(this T handle, in VkCopyMemoryToMicromapInfoEXT pInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyMemoryToMicromapInfoEXT* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdCopyMemoryToMicromapEXT.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdWriteMicromapsPropertiesEXT - Write micromap result parameters to query results. + /// + /// + /// + /// :refpage: vkCmdWriteMicromapsPropertiesEXT + /// + /// + /// To query VkMicromapEXT size parameters call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkCmdWriteMicromapsPropertiesEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t micromapCount, + /// const VkMicromapEXT* pMicromaps, + /// VkQueryType queryType, + /// VkQueryPool queryPool, + /// uint32_t firstQuery); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteMicromapsPropertiesEXT( + this T handle, + scoped ReadOnlySpan pMicromaps, + VkQueryType queryType, + VkQueryPool queryPool, + int firstQuery + ) + where T : VulkanHandleWrapper + { + fixed (VkMicromapEXT* pMicromapsFixed = pMicromaps) + { + handle.PInvoke.vkCmdWriteMicromapsPropertiesEXT.Invoke( + handle.Handle, + pMicromaps.Length, + pMicromapsFixed, + queryType, + queryPool, + firstQuery + ); + } + } + + /// + /// vkGetDeviceMicromapCompatibilityEXT - Check if a serialized micromap is compatible with the current device + /// + /// + /// + /// :refpage: vkGetDeviceMicromapCompatibilityEXT + /// + /// + /// To check if a serialized VkMicromapEXT is compatible with the current + /// device call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkGetDeviceMicromapCompatibilityEXT( + /// VkDevice device, + /// const VkMicromapVersionInfoEXT* pVersionInfo, + /// VkAccelerationStructureCompatibilityKHR* pCompatibility); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkAccelerationStructureCompatibilityKHR GetMicromapCompatibilityEXT( + this VulkanHandleWrapper handle, + in VkMicromapVersionInfoEXT pVersionInfo + ) + { + fixed (VkMicromapVersionInfoEXT* pVersionInfoFixed = &pVersionInfo) + { + VkAccelerationStructureCompatibilityKHR pCompatibilityLocal = default; + handle.PInvoke.vkGetDeviceMicromapCompatibilityEXT.Invoke( + handle.Handle, + pVersionInfoFixed, + &pCompatibilityLocal + ); + return pCompatibilityLocal; + } + } + + /// + /// vkGetMicromapBuildSizesEXT - Retrieve the required size for a micromap + /// + /// + /// + /// :refpage: vkGetMicromapBuildSizesEXT + /// + /// + /// To get the build sizes for a micromap, call: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// void vkGetMicromapBuildSizesEXT( + /// VkDevice device, + /// VkAccelerationStructureBuildTypeKHR buildType, + /// const VkMicromapBuildInfoEXT* pBuildInfo, + /// VkMicromapBuildSizesInfoEXT* pSizeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMicromapBuildSizesEXT( + this VulkanHandleWrapper handle, + VkAccelerationStructureBuildTypeKHR buildType, + in VkMicromapBuildInfoEXT pBuildInfo, + in VkMicromapBuildSizesInfoEXT pSizeInfo + ) + { + fixed (VkMicromapBuildSizesInfoEXT* pSizeInfoFixed = &pSizeInfo) + fixed (VkMicromapBuildInfoEXT* pBuildInfoFixed = &pBuildInfo) + { + handle.PInvoke.vkGetMicromapBuildSizesEXT.Invoke( + handle.Handle, + buildType, + pBuildInfoFixed, + pSizeInfoFixed + ); + } + } + + /// + /// vkCmdDrawClusterHUAWEI - Draw cluster culling work items + /// + /// + /// + /// :refpage: vkCmdDrawClusterHUAWEI + /// + /// + /// To record a cluster culling shader drawing command, call: + /// + /// + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// void vkCmdDrawClusterHUAWEI( + /// VkCommandBuffer commandBuffer, + /// uint32_t groupCountX, + /// uint32_t groupCountY, + /// uint32_t groupCountZ); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawClusterHUAWEI(this T handle, int groupCountX, int groupCountY, int groupCountZ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawClusterHUAWEI.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ); + } + + /// + /// vkCmdDrawClusterIndirectHUAWEI - Issue an indirect cluster culling draw into a command buffer + /// + /// + /// + /// :refpage: vkCmdDrawClusterIndirectHUAWEI + /// + /// + /// To record an indirect cluster culling drawing command, call: + /// + /// + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// void vkCmdDrawClusterIndirectHUAWEI( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawClusterIndirectHUAWEI(this T handle, VkBuffer buffer, ByteSize64 offset) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawClusterIndirectHUAWEI.Invoke(handle.Handle, buffer, offset); + } + + /// + /// vkSetDeviceMemoryPriorityEXT - Change a memory allocation priority + /// + /// + /// + /// To modify the priority of an existing memory allocation, call: + /// + /// + /// // Provided by VK_EXT_pageable_device_local_memory + /// void vkSetDeviceMemoryPriorityEXT( + /// VkDevice device, + /// VkDeviceMemory memory, + /// float priority); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDeviceMemoryPriorityEXT( + this VulkanHandleWrapper handle, + VkDeviceMemory memory, + float priority + ) + { + handle.PInvoke.vkSetDeviceMemoryPriorityEXT.Invoke(handle.Handle, memory, priority); + } + + /// + /// vkCmdSetDispatchParametersARM - Set parameters that affect dispatch commands + /// + /// + /// + /// :refpage: vkCmdSetDispatchParametersARM + /// + /// + /// To set parameters that affect dispatch commands, call: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// void vkCmdSetDispatchParametersARM( + /// VkCommandBuffer commandBuffer, + /// const VkDispatchParametersARM* pDispatchParameters); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDispatchParametersARM( + this T handle, + VkDispatchParametersARM* pDispatchParameters + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDispatchParametersARM.Invoke(handle.Handle, pDispatchParameters); + } + + /// + /// vkGetDescriptorSetLayoutHostMappingInfoVALVE - Stub description of vkGetDescriptorSetLayoutHostMappingInfoVALVE + /// + /// + /// + /// [[features-descriptorSetHostMapping]] + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// void vkGetDescriptorSetLayoutHostMappingInfoVALVE( + /// VkDevice device, + /// const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + /// VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDescriptorSetLayoutHostMappingInfoVALVE( + this VulkanHandleWrapper handle, + VkDescriptorSetBindingReferenceVALVE* pBindingReference, + ref VkDescriptorSetLayoutHostMappingInfoVALVE pHostMapping + ) + { + fixed (VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMappingFixed = &pHostMapping) + { + handle.PInvoke.vkGetDescriptorSetLayoutHostMappingInfoVALVE.Invoke( + handle.Handle, + pBindingReference, + pHostMappingFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkDescriptorSetLayoutHostMappingInfoVALVE. + public static unsafe VkDescriptorSetLayoutHostMappingInfoVALVE GetDescriptorSetLayoutHostMappingInfoVALVE( + this VulkanHandleWrapper handle, + VkDescriptorSetBindingReferenceVALVE* pBindingReference + ) + { + VkDescriptorSetLayoutHostMappingInfoVALVE outValue = new(); + GetDescriptorSetLayoutHostMappingInfoVALVE(handle, pBindingReference, ref outValue); + return outValue; + } + + /// + /// vkGetDescriptorSetHostMappingVALVE - Stub description of vkGetDescriptorSetHostMappingVALVE + /// + /// + /// + /// There is currently no specification language written for this command. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// void vkGetDescriptorSetHostMappingVALVE( + /// VkDevice device, + /// VkDescriptorSet descriptorSet, + /// void** ppData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetDescriptorSetHostMappingVALVE( + this VulkanHandleWrapper handle, + VkDescriptorSet descriptorSet + ) + { + void* ppDataLocal = default; + handle.PInvoke.vkGetDescriptorSetHostMappingVALVE.Invoke(handle.Handle, descriptorSet, &ppDataLocal); + return ppDataLocal; + } + + /// + /// vkCmdCopyMemoryIndirectNV - Copy data between memory regions + /// + /// + /// + /// To copy data between two memory regions by specifying copy parameters + /// indirectly in memory, call: + /// + /// + /// // Provided by VK_NV_copy_memory_indirect + /// void vkCmdCopyMemoryIndirectNV( + /// VkCommandBuffer commandBuffer, + /// VkDeviceAddress copyBufferAddress, + /// uint32_t copyCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void CopyMemoryIndirectNV( + this T handle, + VkDeviceAddress copyBufferAddress, + int copyCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdCopyMemoryIndirectNV.Invoke(handle.Handle, copyBufferAddress, copyCount, stride); + } + + /// + /// vkCmdCopyMemoryToImageIndirectNV - Copy data from a memory region to an image object + /// + /// + /// + /// :refpage: vkCmdCopyMemoryToImageIndirectNV + /// + /// + /// To copy data from a memory region to an image object by specifying copy + /// parameters in memory, call: + /// + /// + /// // Provided by VK_NV_copy_memory_indirect + /// void vkCmdCopyMemoryToImageIndirectNV( + /// VkCommandBuffer commandBuffer, + /// VkDeviceAddress copyBufferAddress, + /// uint32_t copyCount, + /// uint32_t stride, + /// VkImage dstImage, + /// VkImageLayout dstImageLayout, + /// const VkImageSubresourceLayers* pImageSubresources); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryToImageIndirectNV( + this T handle, + VkDeviceAddress copyBufferAddress, + int stride, + VkImage dstImage, + VkImageLayout dstImageLayout, + scoped ReadOnlySpan pImageSubresources + ) + where T : VulkanHandleWrapper + { + fixed (VkImageSubresourceLayers* pImageSubresourcesFixed = pImageSubresources) + { + handle.PInvoke.vkCmdCopyMemoryToImageIndirectNV.Invoke( + handle.Handle, + copyBufferAddress, + pImageSubresources.Length, + stride, + dstImage, + dstImageLayout, + pImageSubresourcesFixed + ); + } + } + + /// + /// vkCmdDecompressMemoryNV - Decompress memory containing compressed data + /// + /// + /// + /// :refpage: vkCmdDecompressMemoryNV + /// To decompress memory containing compressed data, call: + /// + /// + /// // Provided by VK_NV_memory_decompression + /// void vkCmdDecompressMemoryNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t decompressRegionCount, + /// const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DecompressMemoryNV( + this T handle, + scoped ReadOnlySpan pDecompressMemoryRegions + ) + where T : VulkanHandleWrapper + { + fixed (VkDecompressMemoryRegionNV* pDecompressMemoryRegionsFixed = pDecompressMemoryRegions) + { + handle.PInvoke.vkCmdDecompressMemoryNV.Invoke( + handle.Handle, + pDecompressMemoryRegions.Length, + pDecompressMemoryRegionsFixed + ); + } + } + + /// + /// vkCmdDecompressMemoryIndirectCountNV - Indirect decompress data between memory regions + /// + /// + /// + /// :refpage: vkCmdDecompressMemoryIndirectCountNV + /// + /// + /// To decompress data between one or more memory regions by specifying + /// decompression parameters indirectly in a buffer, call: + /// + /// + /// // Provided by VK_NV_memory_decompression + /// void vkCmdDecompressMemoryIndirectCountNV( + /// VkCommandBuffer commandBuffer, + /// VkDeviceAddress indirectCommandsAddress, + /// VkDeviceAddress indirectCommandsCountAddress, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DecompressMemoryIndirectCountNV( + this T handle, + VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDecompressMemoryIndirectCountNV.Invoke( + handle.Handle, + indirectCommandsAddress, + indirectCommandsCountAddress, + stride + ); + } + + /// + /// vkGetPipelineIndirectMemoryRequirementsNV - Get the memory requirements for the compute indirect pipeline + /// + /// + /// + /// :refpage: vkGetPipelineIndirectMemoryRequirementsNV + /// + /// + /// To determine the memory requirements for a compute pipeline's metadata, + /// call: + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// void vkGetPipelineIndirectMemoryRequirementsNV( + /// VkDevice device, + /// const VkComputePipelineCreateInfo* pCreateInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetPipelineIndirectMemoryRequirementsNV( + this VulkanHandleWrapper handle, + in VkComputePipelineCreateInfo pCreateInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkComputePipelineCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + handle.PInvoke.vkGetPipelineIndirectMemoryRequirementsNV.Invoke( + handle.Handle, + pCreateInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetPipelineIndirectMemoryRequirementsNV( + this VulkanHandleWrapper handle, + in VkComputePipelineCreateInfo pCreateInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetPipelineIndirectMemoryRequirementsNV(handle, pCreateInfo, ref outValue); + return outValue; + } + + /// + /// vkCmdUpdatePipelineIndirectBufferNV - Update the indirect compute pipeline&apos;s metadata + /// + /// + /// + /// To save a compute pipeline's metadata at a device address call: + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// void vkCmdUpdatePipelineIndirectBufferNV( + /// VkCommandBuffer commandBuffer, + /// VkPipelineBindPoint pipelineBindPoint, + /// VkPipeline pipeline); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void UpdatePipelineIndirectBufferNV( + this T handle, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdUpdatePipelineIndirectBufferNV.Invoke(handle.Handle, pipelineBindPoint, pipeline); + } + + /// + /// vkGetPipelineIndirectDeviceAddressNV - Get pipeline&apos;s 64-bit device address + /// + /// + /// + /// :refpage: vkGetPipelineIndirectDeviceAddressNV + /// + /// + /// To query a compute pipeline's 64-bit device address, call: + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// VkDeviceAddress vkGetPipelineIndirectDeviceAddressNV( + /// VkDevice device, + /// const VkPipelineIndirectDeviceAddressInfoNV* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceAddress GetPipelineIndirectDeviceAddressNV( + this VulkanHandleWrapper handle, + in VkPipelineIndirectDeviceAddressInfoNV pInfo + ) + { + fixed (VkPipelineIndirectDeviceAddressInfoNV* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetPipelineIndirectDeviceAddressNV.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdSetDepthClampEnableEXT - Specify dynamically whether depth clamping is enabled in the command buffer + /// + /// + /// + /// To dynamically set^ enable or disable depth + /// clamping, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetDepthClampEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 depthClampEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthClampEnableEXT(this T handle, Brutal.Bool32 depthClampEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthClampEnableEXT.Invoke(handle.Handle, depthClampEnable); + } + + /// + /// vkCmdSetPolygonModeEXT - Specify polygon mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the polygon mode, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetPolygonModeEXT( + /// VkCommandBuffer commandBuffer, + /// VkPolygonMode polygonMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPolygonModeEXT(this T handle, VkPolygonMode polygonMode) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPolygonModeEXT.Invoke(handle.Handle, polygonMode); + } + + /// + /// vkCmdSetRasterizationSamplesEXT - Specify the rasterization samples dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// rasterizationSamples, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetRasterizationSamplesEXT( + /// VkCommandBuffer commandBuffer, + /// VkSampleCountFlagBits rasterizationSamples); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRasterizationSamplesEXT(this T handle, VkSampleCountFlags rasterizationSamples) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetRasterizationSamplesEXT.Invoke(handle.Handle, rasterizationSamples); + } + + /// + /// vkCmdSetSampleMaskEXT - Specify the sample mask dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the sample mask, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetSampleMaskEXT( + /// VkCommandBuffer commandBuffer, + /// VkSampleCountFlagBits samples, + /// const VkSampleMask* pSampleMask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetSampleMaskEXT( + this T handle, + VkSampleCountFlags samples, + scoped ReadOnlySpan pSampleMask + ) + where T : VulkanHandleWrapper + { + fixed (VkSampleMask* pSampleMaskFixed = pSampleMask) + { + handle.PInvoke.vkCmdSetSampleMaskEXT.Invoke(handle.Handle, samples, pSampleMaskFixed); + } + } + + /// + /// vkCmdSetAlphaToCoverageEnableEXT - Specify the alpha to coverage enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// alphaToCoverageEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetAlphaToCoverageEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 alphaToCoverageEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetAlphaToCoverageEnableEXT(this T handle, Brutal.Bool32 alphaToCoverageEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetAlphaToCoverageEnableEXT.Invoke(handle.Handle, alphaToCoverageEnable); + } + + /// + /// vkCmdSetAlphaToOneEnableEXT - Specify the alpha to one enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the alphaToOneEnable + /// state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetAlphaToOneEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 alphaToOneEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetAlphaToOneEnableEXT(this T handle, Brutal.Bool32 alphaToOneEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetAlphaToOneEnableEXT.Invoke(handle.Handle, alphaToOneEnable); + } + + /// + /// vkCmdSetLogicOpEnableEXT - Specify dynamically whether logical operations are enabled for a command buffer + /// + /// + /// + /// To dynamically set^ whether logical operations + /// are enabled, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetLogicOpEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 logicOpEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLogicOpEnableEXT(this T handle, Brutal.Bool32 logicOpEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLogicOpEnableEXT.Invoke(handle.Handle, logicOpEnable); + } + + /// + /// vkCmdSetColorBlendEnableEXT - Specify the <c>blendEnable</c> for each attachment dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ blendEnable, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetColorBlendEnableEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstAttachment, + /// uint32_t attachmentCount, + /// const VkBool32* pColorBlendEnables); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetColorBlendEnableEXT( + this T handle, + int firstAttachment, + scoped ReadOnlySpan pColorBlendEnables + ) + where T : VulkanHandleWrapper + { + fixed (Brutal.Bool32* pColorBlendEnablesFixed = pColorBlendEnables) + { + handle.PInvoke.vkCmdSetColorBlendEnableEXT.Invoke( + handle.Handle, + firstAttachment, + pColorBlendEnables.Length, + pColorBlendEnablesFixed + ); + } + } + + /// + /// vkCmdSetColorBlendEquationEXT - Specify the blend factors and operations dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ color blend factors and + /// operations, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetColorBlendEquationEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstAttachment, + /// uint32_t attachmentCount, + /// const VkColorBlendEquationEXT* pColorBlendEquations); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetColorBlendEquationEXT( + this T handle, + int firstAttachment, + scoped ReadOnlySpan pColorBlendEquations + ) + where T : VulkanHandleWrapper + { + fixed (VkColorBlendEquationEXT* pColorBlendEquationsFixed = pColorBlendEquations) + { + handle.PInvoke.vkCmdSetColorBlendEquationEXT.Invoke( + handle.Handle, + firstAttachment, + pColorBlendEquations.Length, + pColorBlendEquationsFixed + ); + } + } + + /// + /// vkCmdSetColorWriteMaskEXT - Specify the color write masks for each attachment dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the color write masks, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// void vkCmdSetColorWriteMaskEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstAttachment, + /// uint32_t attachmentCount, + /// const VkColorComponentFlags* pColorWriteMasks); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetColorWriteMaskEXT( + this T handle, + int firstAttachment, + scoped ReadOnlySpan pColorWriteMasks + ) + where T : VulkanHandleWrapper + { + fixed (VkColorComponentFlags* pColorWriteMasksFixed = pColorWriteMasks) + { + handle.PInvoke.vkCmdSetColorWriteMaskEXT.Invoke( + handle.Handle, + firstAttachment, + pColorWriteMasks.Length, + pColorWriteMasksFixed + ); + } + } + + /// + /// vkCmdSetTessellationDomainOriginEXT - Specify the origin of the tessellation domain space dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the origin of the + /// tessellation domain space, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_KHR_maintenance2 or VK_VERSION_1_1, VK_EXT_shader_object + /// void vkCmdSetTessellationDomainOriginEXT( + /// VkCommandBuffer commandBuffer, + /// VkTessellationDomainOrigin domainOrigin); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetTessellationDomainOriginEXT(this T handle, VkTessellationDomainOrigin domainOrigin) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetTessellationDomainOriginEXT.Invoke(handle.Handle, domainOrigin); + } + + /// + /// vkCmdSetRasterizationStreamEXT - Specify the rasterization stream dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// rasterizationStream state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_transform_feedback, VK_EXT_shader_object with VK_EXT_transform_feedback + /// void vkCmdSetRasterizationStreamEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t rasterizationStream); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRasterizationStreamEXT(this T handle, int rasterizationStream) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetRasterizationStreamEXT.Invoke(handle.Handle, rasterizationStream); + } + + /// + /// vkCmdSetConservativeRasterizationModeEXT - Specify the conservative rasterization mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// conservativeRasterizationMode, call: + /// + /// + /// // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3, VK_EXT_conservative_rasterization with VK_EXT_shader_object + /// void vkCmdSetConservativeRasterizationModeEXT( + /// VkCommandBuffer commandBuffer, + /// VkConservativeRasterizationModeEXT conservativeRasterizationMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetConservativeRasterizationModeEXT( + this T handle, + VkConservativeRasterizationModeEXT conservativeRasterizationMode + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetConservativeRasterizationModeEXT.Invoke( + handle.Handle, + conservativeRasterizationMode + ); + } + + /// + /// vkCmdSetExtraPrimitiveOverestimationSizeEXT - Specify the conservative rasterization extra primitive overestimation size dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// extraPrimitiveOverestimationSize, call: + /// + /// + /// // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3, VK_EXT_conservative_rasterization with VK_EXT_shader_object + /// void vkCmdSetExtraPrimitiveOverestimationSizeEXT( + /// VkCommandBuffer commandBuffer, + /// float extraPrimitiveOverestimationSize); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetExtraPrimitiveOverestimationSizeEXT( + this T handle, + float extraPrimitiveOverestimationSize + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetExtraPrimitiveOverestimationSizeEXT.Invoke( + handle.Handle, + extraPrimitiveOverestimationSize + ); + } + + /// + /// vkCmdSetDepthClipEnableEXT - Specify dynamically whether depth clipping is enabled in the command buffer + /// + /// + /// + /// To dynamically set^ enable or disable depth + /// clipping, call: + /// + /// + /// // Provided by VK_EXT_depth_clip_enable with VK_EXT_extended_dynamic_state3, VK_EXT_depth_clip_enable with VK_EXT_shader_object + /// void vkCmdSetDepthClipEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 depthClipEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthClipEnableEXT(this T handle, Brutal.Bool32 depthClipEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthClipEnableEXT.Invoke(handle.Handle, depthClipEnable); + } + + /// + /// vkCmdSetSampleLocationsEnableEXT - Specify the samples locations enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// sampleLocationsEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_sample_locations, VK_EXT_sample_locations with VK_EXT_shader_object + /// void vkCmdSetSampleLocationsEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 sampleLocationsEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetSampleLocationsEnableEXT(this T handle, Brutal.Bool32 sampleLocationsEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetSampleLocationsEnableEXT.Invoke(handle.Handle, sampleLocationsEnable); + } + + /// + /// vkCmdSetColorBlendAdvancedEXT - Specify the advanced color blend state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the advanced blend state, + /// call: + /// + /// + /// // Provided by VK_EXT_blend_operation_advanced with VK_EXT_extended_dynamic_state3, VK_EXT_blend_operation_advanced with VK_EXT_shader_object + /// void vkCmdSetColorBlendAdvancedEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstAttachment, + /// uint32_t attachmentCount, + /// const VkColorBlendAdvancedEXT* pColorBlendAdvanced); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetColorBlendAdvancedEXT( + this T handle, + int firstAttachment, + scoped ReadOnlySpan pColorBlendAdvanced + ) + where T : VulkanHandleWrapper + { + fixed (VkColorBlendAdvancedEXT* pColorBlendAdvancedFixed = pColorBlendAdvanced) + { + handle.PInvoke.vkCmdSetColorBlendAdvancedEXT.Invoke( + handle.Handle, + firstAttachment, + pColorBlendAdvanced.Length, + pColorBlendAdvancedFixed + ); + } + } + + /// + /// vkCmdSetProvokingVertexModeEXT - Specify the provoking vertex mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// provokingVertexMode state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_provoking_vertex, VK_EXT_provoking_vertex with VK_EXT_shader_object + /// void vkCmdSetProvokingVertexModeEXT( + /// VkCommandBuffer commandBuffer, + /// VkProvokingVertexModeEXT provokingVertexMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetProvokingVertexModeEXT(this T handle, VkProvokingVertexModeEXT provokingVertexMode) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetProvokingVertexModeEXT.Invoke(handle.Handle, provokingVertexMode); + } + + /// + /// vkCmdSetLineRasterizationModeEXT - Specify the line rasterization mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// lineRasterizationMode state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization, VK_EXT_shader_object with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization + /// void vkCmdSetLineRasterizationModeEXT( + /// VkCommandBuffer commandBuffer, + /// VkLineRasterizationModeEXT lineRasterizationMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLineRasterizationModeEXT( + this T handle, + VkLineRasterizationModeEXT lineRasterizationMode + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLineRasterizationModeEXT.Invoke(handle.Handle, lineRasterizationMode); + } + + /// + /// vkCmdSetLineStippleEnableEXT - Specify the line stipple enable dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the stippledLineEnable + /// state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization, VK_EXT_shader_object with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization + /// void vkCmdSetLineStippleEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 stippledLineEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetLineStippleEnableEXT(this T handle, Brutal.Bool32 stippledLineEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetLineStippleEnableEXT.Invoke(handle.Handle, stippledLineEnable); + } + + /// + /// vkCmdSetDepthClipNegativeOneToOneEXT - Specify the negative one to one depth clip mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ negativeOneToOne, + /// call: + /// + /// + /// // Provided by VK_EXT_depth_clip_control with VK_EXT_extended_dynamic_state3, VK_EXT_depth_clip_control with VK_EXT_shader_object + /// void vkCmdSetDepthClipNegativeOneToOneEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 negativeOneToOne); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetDepthClipNegativeOneToOneEXT(this T handle, Brutal.Bool32 negativeOneToOne) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthClipNegativeOneToOneEXT.Invoke(handle.Handle, negativeOneToOne); + } + + /// + /// vkCmdSetViewportWScalingEnableNV - Specify the viewport W scaling enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// viewportWScalingEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_clip_space_w_scaling, VK_EXT_shader_object with VK_NV_clip_space_w_scaling + /// void vkCmdSetViewportWScalingEnableNV( + /// VkCommandBuffer commandBuffer, + /// VkBool32 viewportWScalingEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetViewportWScalingEnableNV(this T handle, Brutal.Bool32 viewportWScalingEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetViewportWScalingEnableNV.Invoke(handle.Handle, viewportWScalingEnable); + } + + /// + /// vkCmdSetViewportSwizzleNV - Specify the viewport swizzle state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the viewport swizzle state, + /// call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_viewport_swizzle, VK_EXT_shader_object with VK_NV_viewport_swizzle + /// void vkCmdSetViewportSwizzleNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t firstViewport, + /// uint32_t viewportCount, + /// const VkViewportSwizzleNV* pViewportSwizzles); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetViewportSwizzleNV( + this T handle, + int firstViewport, + scoped ReadOnlySpan pViewportSwizzles + ) + where T : VulkanHandleWrapper + { + fixed (VkViewportSwizzleNV* pViewportSwizzlesFixed = pViewportSwizzles) + { + handle.PInvoke.vkCmdSetViewportSwizzleNV.Invoke( + handle.Handle, + firstViewport, + pViewportSwizzles.Length, + pViewportSwizzlesFixed + ); + } + } + + /// + /// vkCmdSetCoverageToColorEnableNV - Specify the coverage to color enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// coverageToColorEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color, VK_EXT_shader_object with VK_NV_fragment_coverage_to_color + /// void vkCmdSetCoverageToColorEnableNV( + /// VkCommandBuffer commandBuffer, + /// VkBool32 coverageToColorEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCoverageToColorEnableNV(this T handle, Brutal.Bool32 coverageToColorEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCoverageToColorEnableNV.Invoke(handle.Handle, coverageToColorEnable); + } + + /// + /// vkCmdSetCoverageToColorLocationNV - Specify the coverage to color location dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// coverageToColorLocation state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color, VK_EXT_shader_object with VK_NV_fragment_coverage_to_color + /// void vkCmdSetCoverageToColorLocationNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t coverageToColorLocation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCoverageToColorLocationNV(this T handle, int coverageToColorLocation) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCoverageToColorLocationNV.Invoke(handle.Handle, coverageToColorLocation); + } + + /// + /// vkCmdSetCoverageModulationModeNV - Specify the coverage modulation mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// coverageModulationMode state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples + /// void vkCmdSetCoverageModulationModeNV( + /// VkCommandBuffer commandBuffer, + /// VkCoverageModulationModeNV coverageModulationMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCoverageModulationModeNV( + this T handle, + VkCoverageModulationModeNV coverageModulationMode + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCoverageModulationModeNV.Invoke(handle.Handle, coverageModulationMode); + } + + /// + /// vkCmdSetCoverageModulationTableEnableNV - Specify the coverage modulation table enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// coverageModulationTableEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples + /// void vkCmdSetCoverageModulationTableEnableNV( + /// VkCommandBuffer commandBuffer, + /// VkBool32 coverageModulationTableEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCoverageModulationTableEnableNV( + this T handle, + Brutal.Bool32 coverageModulationTableEnable + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCoverageModulationTableEnableNV.Invoke(handle.Handle, coverageModulationTableEnable); + } + + /// + /// vkCmdSetCoverageModulationTableNV - Specify the coverage modulation table dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// pCoverageModulationTable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples + /// void vkCmdSetCoverageModulationTableNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t coverageModulationTableCount, + /// const float* pCoverageModulationTable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetCoverageModulationTableNV( + this T handle, + scoped ReadOnlySpan pCoverageModulationTable + ) + where T : VulkanHandleWrapper + { + fixed (float* pCoverageModulationTableFixed = pCoverageModulationTable) + { + handle.PInvoke.vkCmdSetCoverageModulationTableNV.Invoke( + handle.Handle, + pCoverageModulationTable.Length, + pCoverageModulationTableFixed + ); + } + } + + /// + /// vkCmdSetShadingRateImageEnableNV - Specify the shading rate image enable state dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// shadingRateImageEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_shading_rate_image, VK_EXT_shader_object with VK_NV_shading_rate_image + /// void vkCmdSetShadingRateImageEnableNV( + /// VkCommandBuffer commandBuffer, + /// VkBool32 shadingRateImageEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetShadingRateImageEnableNV(this T handle, Brutal.Bool32 shadingRateImageEnable) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetShadingRateImageEnableNV.Invoke(handle.Handle, shadingRateImageEnable); + } + + /// + /// vkCmdSetRepresentativeFragmentTestEnableNV - Specify the representative fragment test enable dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// representativeFragmentTestEnable state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_representative_fragment_test, VK_EXT_shader_object with VK_NV_representative_fragment_test + /// void vkCmdSetRepresentativeFragmentTestEnableNV( + /// VkCommandBuffer commandBuffer, + /// VkBool32 representativeFragmentTestEnable); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRepresentativeFragmentTestEnableNV( + this T handle, + Brutal.Bool32 representativeFragmentTestEnable + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetRepresentativeFragmentTestEnableNV.Invoke( + handle.Handle, + representativeFragmentTestEnable + ); + } + + /// + /// vkCmdSetCoverageReductionModeNV - Specify the coverage reduction mode dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the + /// coverageReductionMode state, call: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_coverage_reduction_mode, VK_EXT_shader_object with VK_NV_coverage_reduction_mode + /// void vkCmdSetCoverageReductionModeNV( + /// VkCommandBuffer commandBuffer, + /// VkCoverageReductionModeNV coverageReductionMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetCoverageReductionModeNV(this T handle, VkCoverageReductionModeNV coverageReductionMode) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetCoverageReductionModeNV.Invoke(handle.Handle, coverageReductionMode); + } + + /// + /// vkCreateTensorARM - Create a new tensor object + /// + /// + /// + /// To create tensors, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// VkResult vkCreateTensorARM( + /// VkDevice device, + /// const VkTensorCreateInfoARM* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkTensorARM* pTensor); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkTensorARM CreateTensorARM( + this VulkanHandleWrapper handle, + in VkTensorCreateInfoARM pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkTensorCreateInfoARM* pCreateInfoFixed = &pCreateInfo) + { + VkTensorARM pTensorLocal = default; + VkResult result = handle.PInvoke.vkCreateTensorARM.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pTensorLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pTensorLocal; + } + } + + /// + /// vkDestroyTensorARM - Destroy a tensor object + /// + /// + /// + /// To destroy a tensor, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// void vkDestroyTensorARM( + /// VkDevice device, + /// VkTensorARM tensor, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyTensorARM( + this VulkanHandleWrapper handle, + VkTensorARM tensor, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyTensorARM.Invoke(handle.Handle, tensor, pAllocator); + } + + /// + /// vkCreateTensorViewARM - Create an tensor view from an existing tensor + /// + /// + /// + /// To create a tensor view, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// VkResult vkCreateTensorViewARM( + /// VkDevice device, + /// const VkTensorViewCreateInfoARM* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkTensorViewARM* pView); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkTensorViewARM CreateTensorViewARM( + this VulkanHandleWrapper handle, + in VkTensorViewCreateInfoARM pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkTensorViewCreateInfoARM* pCreateInfoFixed = &pCreateInfo) + { + VkTensorViewARM pViewLocal = default; + VkResult result = handle.PInvoke.vkCreateTensorViewARM.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pViewLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pViewLocal; + } + } + + /// + /// vkDestroyTensorViewARM - Destroy a tensor view object + /// + /// + /// + /// To destroy a tensor view, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// void vkDestroyTensorViewARM( + /// VkDevice device, + /// VkTensorViewARM tensorView, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyTensorViewARM( + this VulkanHandleWrapper handle, + VkTensorViewARM tensorView, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyTensorViewARM.Invoke(handle.Handle, tensorView, pAllocator); + } + + /// + /// vkGetTensorMemoryRequirementsARM - Returns the memory requirements for specified Vulkan object + /// + /// + /// + /// To determine the memory requirements for a tensor resource, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// void vkGetTensorMemoryRequirementsARM( + /// VkDevice device, + /// const VkTensorMemoryRequirementsInfoARM* pInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTensorMemoryRequirementsARM( + this VulkanHandleWrapper handle, + in VkTensorMemoryRequirementsInfoARM pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkTensorMemoryRequirementsInfoARM* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetTensorMemoryRequirementsARM.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetTensorMemoryRequirementsARM( + this VulkanHandleWrapper handle, + in VkTensorMemoryRequirementsInfoARM pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetTensorMemoryRequirementsARM(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkBindTensorMemoryARM - Bind device memory to tensor objects + /// + /// + /// + /// To attach memory to tensor objects call: + /// + /// + /// // Provided by VK_ARM_tensors + /// VkResult vkBindTensorMemoryARM( + /// VkDevice device, + /// uint32_t bindInfoCount, + /// const VkBindTensorMemoryInfoARM* pBindInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTensorMemoryARM( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBindInfos + ) + { + fixed (VkBindTensorMemoryInfoARM* pBindInfosFixed = pBindInfos) + { + VkResult result = handle.PInvoke.vkBindTensorMemoryARM.Invoke( + handle.Handle, + pBindInfos.Length, + pBindInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkGetDeviceTensorMemoryRequirementsARM - Returns the memory requirements for specified tensor creation infos + /// + /// + /// + /// To determine the memory requirements for a tensor resource without creating + /// an object, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// void vkGetDeviceTensorMemoryRequirementsARM( + /// VkDevice device, + /// const VkDeviceTensorMemoryRequirementsARM* pInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetTensorMemoryRequirementsARM( + this VulkanHandleWrapper handle, + in VkDeviceTensorMemoryRequirementsARM pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkDeviceTensorMemoryRequirementsARM* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDeviceTensorMemoryRequirementsARM.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetTensorMemoryRequirementsARM( + this VulkanHandleWrapper handle, + in VkDeviceTensorMemoryRequirementsARM pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetTensorMemoryRequirementsARM(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkCmdCopyTensorARM - Copy data between tensors + /// + /// + /// + /// To copy data between tensor objects, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// void vkCmdCopyTensorARM( + /// VkCommandBuffer commandBuffer, + /// const VkCopyTensorInfoARM* pCopyTensorInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyTensorARM(this T handle, in VkCopyTensorInfoARM pCopyTensorInfo) + where T : VulkanHandleWrapper + { + fixed (VkCopyTensorInfoARM* pCopyTensorInfoFixed = &pCopyTensorInfo) + { + handle.PInvoke.vkCmdCopyTensorARM.Invoke(handle.Handle, pCopyTensorInfoFixed); + } + } + + /// + /// vkGetTensorOpaqueCaptureDescriptorDataARM - Get tensor opaque capture descriptor data + /// + /// + /// + /// To get the opaque capture descriptor data for a tensor, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VkResult vkGetTensorOpaqueCaptureDescriptorDataARM( + /// VkDevice device, + /// const VkTensorCaptureDescriptorDataInfoARM* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetTensorOpaqueCaptureDescriptorDataARM( + this VulkanHandleWrapper handle, + in VkTensorCaptureDescriptorDataInfoARM pInfo + ) + { + fixed (VkTensorCaptureDescriptorDataInfoARM* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetTensorOpaqueCaptureDescriptorDataARM.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkGetTensorViewOpaqueCaptureDescriptorDataARM - Get tensor view opaque capture descriptor data + /// + /// + /// + /// To get the opaque capture descriptor data for a tensor view, call: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// VkResult vkGetTensorViewOpaqueCaptureDescriptorDataARM( + /// VkDevice device, + /// const VkTensorViewCaptureDescriptorDataInfoARM* pInfo, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetTensorViewOpaqueCaptureDescriptorDataARM( + this VulkanHandleWrapper handle, + in VkTensorViewCaptureDescriptorDataInfoARM pInfo + ) + { + fixed (VkTensorViewCaptureDescriptorDataInfoARM* pInfoFixed = &pInfo) + { + void* pDataLocal = default; + VkResult result = handle.PInvoke.vkGetTensorViewOpaqueCaptureDescriptorDataARM.Invoke( + handle.Handle, + pInfoFixed, + pDataLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDataLocal; + } + } + + /// + /// vkGetShaderModuleIdentifierEXT - Query a unique identifier for a shader module + /// + /// + /// + /// Shader modules have unique identifiers associated with them. + /// To query an implementation provided identifier, call: + /// + /// + /// // Provided by VK_EXT_shader_module_identifier + /// void vkGetShaderModuleIdentifierEXT( + /// VkDevice device, + /// VkShaderModule shaderModule, + /// VkShaderModuleIdentifierEXT* pIdentifier); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetShaderModuleIdentifierEXT( + this VulkanHandleWrapper handle, + VkShaderModule shaderModule, + ref VkShaderModuleIdentifierEXT pIdentifier + ) + { + fixed (VkShaderModuleIdentifierEXT* pIdentifierFixed = &pIdentifier) + { + handle.PInvoke.vkGetShaderModuleIdentifierEXT.Invoke(handle.Handle, shaderModule, pIdentifierFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkShaderModuleIdentifierEXT. + public static VkShaderModuleIdentifierEXT GetShaderModuleIdentifierEXT( + this VulkanHandleWrapper handle, + VkShaderModule shaderModule + ) + { + VkShaderModuleIdentifierEXT outValue = new(); + GetShaderModuleIdentifierEXT(handle, shaderModule, ref outValue); + return outValue; + } + + /// + /// vkGetShaderModuleCreateInfoIdentifierEXT - Query a unique identifier for a shader module create info + /// + /// + /// + /// VkShaderModuleCreateInfo structures have unique identifiers associated + /// with them. + /// To query an implementation provided identifier, call: + /// + /// + /// // Provided by VK_EXT_shader_module_identifier + /// void vkGetShaderModuleCreateInfoIdentifierEXT( + /// VkDevice device, + /// const VkShaderModuleCreateInfo* pCreateInfo, + /// VkShaderModuleIdentifierEXT* pIdentifier); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetShaderModuleCreateInfoIdentifierEXT( + this VulkanHandleWrapper handle, + in VkShaderModuleCreateInfo pCreateInfo, + ref VkShaderModuleIdentifierEXT pIdentifier + ) + { + fixed (VkShaderModuleIdentifierEXT* pIdentifierFixed = &pIdentifier) + fixed (VkShaderModuleCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + handle.PInvoke.vkGetShaderModuleCreateInfoIdentifierEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pIdentifierFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkShaderModuleIdentifierEXT. + public static VkShaderModuleIdentifierEXT GetShaderModuleCreateInfoIdentifierEXT( + this VulkanHandleWrapper handle, + in VkShaderModuleCreateInfo pCreateInfo + ) + { + VkShaderModuleIdentifierEXT outValue = new(); + GetShaderModuleCreateInfoIdentifierEXT(handle, pCreateInfo, ref outValue); + return outValue; + } + + /// + /// vkCreateOpticalFlowSessionNV - Creates an optical flow session object + /// + /// + /// + /// To create an optical flow session object, call: + /// + /// + /// // Provided by VK_NV_optical_flow + /// VkResult vkCreateOpticalFlowSessionNV( + /// VkDevice device, + /// const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkOpticalFlowSessionNV* pSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkOpticalFlowSessionNV CreateOpticalFlowSessionNV( + this VulkanHandleWrapper handle, + in VkOpticalFlowSessionCreateInfoNV pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkOpticalFlowSessionCreateInfoNV* pCreateInfoFixed = &pCreateInfo) + { + VkOpticalFlowSessionNV pSessionLocal = default; + VkResult result = handle.PInvoke.vkCreateOpticalFlowSessionNV.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSessionLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSessionLocal; + } + } + + /// + /// vkDestroyOpticalFlowSessionNV - Destroy optical flow session object + /// + /// + /// + /// To destroy an optical flow session object, call: + /// + /// + /// // Provided by VK_NV_optical_flow + /// void vkDestroyOpticalFlowSessionNV( + /// VkDevice device, + /// VkOpticalFlowSessionNV session, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyOpticalFlowSessionNV( + this VulkanHandleWrapper handle, + VkOpticalFlowSessionNV session, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyOpticalFlowSessionNV.Invoke(handle.Handle, session, pAllocator); + } + + /// + /// vkBindOpticalFlowSessionImageNV - Bind image to an optical flow session + /// + /// + /// + /// To bind a Vulkan image to an optical flow session object, call: + /// + /// + /// // Provided by VK_NV_optical_flow + /// VkResult vkBindOpticalFlowSessionImageNV( + /// VkDevice device, + /// VkOpticalFlowSessionNV session, + /// VkOpticalFlowSessionBindingPointNV bindingPoint, + /// VkImageView view, + /// VkImageLayout layout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindOpticalFlowSessionImageNV( + this VulkanHandleWrapper handle, + VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, + VkImageView view, + VkImageLayout layout + ) + { + VkResult result = handle.PInvoke.vkBindOpticalFlowSessionImageNV.Invoke( + handle.Handle, + session, + bindingPoint, + view, + layout + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkCmdOpticalFlowExecuteNV - Calculate optical flow vectors + /// + /// + /// + /// Default direction of flow estimation is forward which calculates the optical + /// flow from input frame to reference frame. + /// Optionally backward flow estimation can be additionally calculated. + /// An output flow vector (Vx, Vy) means that current pixel (x, y) of input + /// frame can be found at location (x+Vx, y+Vy) in reference frame. + /// A backward flow vector (Vx, Vy) means that current pixel (x, y) of reference + /// frame can be found at location (x+Vx, y+Vy) in input frame. + /// + /// + /// To calculate optical flow vectors from two input frames, call: + /// + /// + /// // Provided by VK_NV_optical_flow + /// void vkCmdOpticalFlowExecuteNV( + /// VkCommandBuffer commandBuffer, + /// VkOpticalFlowSessionNV session, + /// const VkOpticalFlowExecuteInfoNV* pExecuteInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void OpticalFlowExecuteNV( + this T handle, + VkOpticalFlowSessionNV session, + in VkOpticalFlowExecuteInfoNV pExecuteInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkOpticalFlowExecuteInfoNV* pExecuteInfoFixed = &pExecuteInfo) + { + handle.PInvoke.vkCmdOpticalFlowExecuteNV.Invoke(handle.Handle, session, pExecuteInfoFixed); + } + } + + /// + /// vkAntiLagUpdateAMD - Provide information to reduce latency + /// + /// + /// + /// To lower latency, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void AntiLagUpdateAMD( + this VulkanHandleWrapper handle, + VkAntiLagDataAMD* pData + ) + { + handle.PInvoke.vkAntiLagUpdateAMD.Invoke(handle.Handle, pData); + } + + /// + /// vkCreateShadersEXT - Create one or more new shaders + /// + /// + /// + /// To create one or more shader objects, call: + /// + /// + /// // Provided by VK_EXT_shader_object + /// VkResult vkCreateShadersEXT( + /// VkDevice device, + /// uint32_t createInfoCount, + /// const VkShaderCreateInfoEXT* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkShaderEXT* pShaders); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateShadersEXT( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pShaders + ) + { + fixed (VkShaderEXT* pShadersFixed = pShaders) + fixed (VkShaderCreateInfoEXT* pCreateInfosFixed = pCreateInfos) + { + VkResult result = handle.PInvoke.vkCreateShadersEXT.Invoke( + handle.Handle, + pCreateInfos.Length, + pCreateInfosFixed, + pAllocator, + pShadersFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.IncompatibleShaderBinaryEXT: + default: + break; + } + + return result; + } + } + + /// + /// vkDestroyShaderEXT - Destroy a shader object + /// + /// + /// + /// To destroy a shader object, call: + /// + /// + /// // Provided by VK_EXT_shader_object + /// void vkDestroyShaderEXT( + /// VkDevice device, + /// VkShaderEXT shader, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyShaderEXT( + this VulkanHandleWrapper handle, + VkShaderEXT shader, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyShaderEXT.Invoke(handle.Handle, shader, pAllocator); + } + + /// + /// vkGetShaderBinaryDataEXT - Get the binary shader code from a shader object + /// + /// + /// + /// Binary shader code can be retrieved from a shader object using the command: + /// + /// + /// // Provided by VK_EXT_shader_object + /// VkResult vkGetShaderBinaryDataEXT( + /// VkDevice device, + /// VkShaderEXT shader, + /// size_t* pDataSize, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetShaderBinaryDataEXT( + this VulkanHandleWrapper handle, + VkShaderEXT shader, + ref nuint pDataSize, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + fixed (nuint* pDataSizeFixed = &pDataSize) + { + VkResult result = handle.PInvoke.vkGetShaderBinaryDataEXT.Invoke( + handle.Handle, + shader, + pDataSizeFixed, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static nuint GetShaderBinaryDataEXT_Count( + this VulkanHandleWrapper handle, + VkShaderEXT shader + ) + { + nuint pDataSize = default; + GetShaderBinaryDataEXT(handle, shader, ref pDataSize, null); + return pDataSize; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetShaderBinaryDataEXT_Write( + this VulkanHandleWrapper handle, + VkShaderEXT shader, + scoped ReadOnlySpan pData + ) + { + nuint pDataSize = (nuint)pData.Length; + return GetShaderBinaryDataEXT(handle, shader, ref pDataSize, pData); + } + + /// + /// vkCmdBindShadersEXT - Bind shader objects to a command buffer + /// + /// + /// + /// Once shader objects have been created, they can be bound to the command + /// buffer using the command: + /// + /// + /// // Provided by VK_EXT_shader_object + /// void vkCmdBindShadersEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t stageCount, + /// const VkShaderStageFlagBits* pStages, + /// const VkShaderEXT* pShaders); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindShadersEXT( + this T handle, + scoped ReadOnlySpan pStages, + scoped ReadOnlySpan pShaders + ) + where T : VulkanHandleWrapper + { + fixed (VkShaderEXT* pShadersFixed = pShaders) + fixed (VkShaderStageFlags* pStagesFixed = pStages) + { + handle.PInvoke.vkCmdBindShadersEXT.Invoke(handle.Handle, pStages.Length, pStagesFixed, pShadersFixed); + } + } + + /// + /// vkCmdSetDepthClampRangeEXT - Set the viewport depth clamp range dynamically for a command buffer + /// + /// + /// + /// To dynamically set^ the viewport depth clamp + /// range parameters, call: + /// + /// + /// // Provided by VK_EXT_depth_clamp_control, VK_EXT_depth_clamp_control with VK_EXT_shader_object + /// void vkCmdSetDepthClampRangeEXT( + /// VkCommandBuffer commandBuffer, + /// VkDepthClampModeEXT depthClampMode, + /// const VkDepthClampRangeEXT* pDepthClampRange); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetDepthClampRangeEXT( + this T handle, + VkDepthClampModeEXT depthClampMode, + VkDepthClampRangeEXT* pDepthClampRange + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetDepthClampRangeEXT.Invoke(handle.Handle, depthClampMode, pDepthClampRange); + } + + /// + /// vkGetFramebufferTilePropertiesQCOM - Get tile properties from the attachments in framebuffer + /// + /// + /// + /// To query the tile properties from the attachments in framebuffer, call: + /// + /// + /// // Provided by VK_QCOM_tile_properties + /// VkResult vkGetFramebufferTilePropertiesQCOM( + /// VkDevice device, + /// VkFramebuffer framebuffer, + /// uint32_t* pPropertiesCount, + /// VkTilePropertiesQCOM* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetFramebufferTilePropertiesQCOM( + this VulkanHandleWrapper handle, + VkFramebuffer framebuffer, + ref int pPropertiesCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkTilePropertiesQCOM* pPropertiesFixed = pProperties) + fixed (int* pPropertiesCountFixed = &pPropertiesCount) + { + VkResult result = handle.PInvoke.vkGetFramebufferTilePropertiesQCOM.Invoke( + handle.Handle, + framebuffer, + pPropertiesCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetFramebufferTilePropertiesQCOM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetFramebufferTilePropertiesQCOM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetFramebufferTilePropertiesQCOM_Count( + this VulkanHandleWrapper handle, + VkFramebuffer framebuffer + ) + { + int pPropertiesCount = default; + GetFramebufferTilePropertiesQCOM(handle, framebuffer, ref pPropertiesCount, null); + return pPropertiesCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetFramebufferTilePropertiesQCOM_Write( + this VulkanHandleWrapper handle, + VkFramebuffer framebuffer, + scoped ReadOnlySpan pProperties + ) + { + int pPropertiesCount = pProperties.Length; + return GetFramebufferTilePropertiesQCOM(handle, framebuffer, ref pPropertiesCount, pProperties); + } + + /// + /// vkGetDynamicRenderingTilePropertiesQCOM - Get the properties when using dynamic rendering + /// + /// + /// + /// To query the tile properties when using dynamic rendering, call: + /// + /// + /// // Provided by VK_QCOM_tile_properties + /// VkResult vkGetDynamicRenderingTilePropertiesQCOM( + /// VkDevice device, + /// const VkRenderingInfo* pRenderingInfo, + /// VkTilePropertiesQCOM* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDynamicRenderingTilePropertiesQCOM( + this VulkanHandleWrapper handle, + in VkRenderingInfo pRenderingInfo, + ref VkTilePropertiesQCOM pProperties + ) + { + fixed (VkTilePropertiesQCOM* pPropertiesFixed = &pProperties) + fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo) + { + VkResult result = handle.PInvoke.vkGetDynamicRenderingTilePropertiesQCOM.Invoke( + handle.Handle, + pRenderingInfoFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDynamicRenderingTilePropertiesQCOM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDynamicRenderingTilePropertiesQCOM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkTilePropertiesQCOM. + public static VkTilePropertiesQCOM GetDynamicRenderingTilePropertiesQCOM( + this VulkanHandleWrapper handle, + in VkRenderingInfo pRenderingInfo + ) + { + VkTilePropertiesQCOM outValue = new(); + GetDynamicRenderingTilePropertiesQCOM(handle, pRenderingInfo, ref outValue); + return outValue; + } + + /// + /// vkConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix from one layout and type to another + /// + /// + /// + /// To query the size of a cooperative vector matrix, or to convert a matrix to + /// another layout and type, call: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// VkResult vkConvertCooperativeVectorMatrixNV( + /// VkDevice device, + /// const VkConvertCooperativeVectorMatrixInfoNV* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult ConvertCooperativeVectorMatrixNV( + this VulkanHandleWrapper handle, + in VkConvertCooperativeVectorMatrixInfoNV pInfo + ) + { + fixed (VkConvertCooperativeVectorMatrixInfoNV* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkConvertCooperativeVectorMatrixNV.Invoke(handle.Handle, pInfoFixed); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkConvertCooperativeVectorMatrixNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkConvertCooperativeVectorMatrixNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkConvertCooperativeVectorMatrixNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// + /// vkCmdConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix from one layout and type to another + /// + /// + /// + /// To convert a matrix to another layout and type, call: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// void vkCmdConvertCooperativeVectorMatrixNV( + /// VkCommandBuffer commandBuffer, + /// uint32_t infoCount, + /// const VkConvertCooperativeVectorMatrixInfoNV* pInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ConvertCooperativeVectorMatrixNV( + this T handle, + scoped ReadOnlySpan pInfos + ) + where T : VulkanHandleWrapper + { + fixed (VkConvertCooperativeVectorMatrixInfoNV* pInfosFixed = pInfos) + { + handle.PInvoke.vkCmdConvertCooperativeVectorMatrixNV.Invoke(handle.Handle, pInfos.Length, pInfosFixed); + } + } + + /// + /// vkSetLatencySleepModeNV - Enable or Disable low latency mode on a swapchain + /// + /// + /// + /// To enable or disable low latency mode on a swapchain, call: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// VkResult vkSetLatencySleepModeNV( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// const VkLatencySleepModeInfoNV* pSleepModeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetLatencySleepModeNV( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + in VkLatencySleepModeInfoNV pSleepModeInfo + ) + { + fixed (VkLatencySleepModeInfoNV* pSleepModeInfoFixed = &pSleepModeInfo) + { + VkResult result = handle.PInvoke.vkSetLatencySleepModeNV.Invoke( + handle.Handle, + swapchain, + pSleepModeInfoFixed + ); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkSetLatencySleepModeNV failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkSetLatencySleepModeNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkSetLatencySleepModeNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkLatencySleepNV - Trigger low latency mode Sleep + /// + /// + /// + /// To provide the synchronization primitive used to delay host CPU work for + /// lower latency rendering, call: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// VkResult vkLatencySleepNV( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// const VkLatencySleepInfoNV* pSleepInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void LatencySleepNV( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + in VkLatencySleepInfoNV pSleepInfo + ) + { + fixed (VkLatencySleepInfoNV* pSleepInfoFixed = &pSleepInfo) + { + VkResult result = handle.PInvoke.vkLatencySleepNV.Invoke(handle.Handle, swapchain, pSleepInfoFixed); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkLatencySleepNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkLatencySleepNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkSetLatencyMarkerNV - Pass in marker for timing info + /// + /// + /// + /// An application can provide timestamps at various stages of its frame + /// generation work by calling: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// void vkSetLatencyMarkerNV( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetLatencyMarkerNV( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + in VkSetLatencyMarkerInfoNV pLatencyMarkerInfo + ) + { + fixed (VkSetLatencyMarkerInfoNV* pLatencyMarkerInfoFixed = &pLatencyMarkerInfo) + { + handle.PInvoke.vkSetLatencyMarkerNV.Invoke(handle.Handle, swapchain, pLatencyMarkerInfoFixed); + } + } + + /// + /// vkGetLatencyTimingsNV - Get latency marker results + /// + /// + /// + /// To get an array containing the newest collected latency data, call: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// void vkGetLatencyTimingsNV( + /// VkDevice device, + /// VkSwapchainKHR swapchain, + /// VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetLatencyTimingsNV( + this VulkanHandleWrapper handle, + VkSwapchainKHR swapchain, + in VkGetLatencyMarkerInfoNV pLatencyMarkerInfo + ) + { + fixed (VkGetLatencyMarkerInfoNV* pLatencyMarkerInfoFixed = &pLatencyMarkerInfo) + { + handle.PInvoke.vkGetLatencyTimingsNV.Invoke(handle.Handle, swapchain, pLatencyMarkerInfoFixed); + } + } + + /// + /// vkQueueNotifyOutOfBandNV - Notify out of band queue + /// + /// + /// + /// To mark a queue as out of band, so that all vkQueueSubmit calls on + /// the queue are ignored for latency evaluation, call: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// void vkQueueNotifyOutOfBandNV( + /// VkQueue queue, + /// const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void NotifyOutOfBandNV( + this VulkanHandleWrapper handle, + in VkOutOfBandQueueTypeInfoNV pQueueTypeInfo + ) + { + fixed (VkOutOfBandQueueTypeInfoNV* pQueueTypeInfoFixed = &pQueueTypeInfo) + { + handle.PInvoke.vkQueueNotifyOutOfBandNV.Invoke(handle.Handle, pQueueTypeInfoFixed); + } + } + + /// + /// vkCreateDataGraphPipelinesARM - Create data graph pipeline objects + /// + /// + /// + /// :refpage: vkCreateDataGraphPipelinesARM + /// + /// + /// To create data graph pipelines, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkCreateDataGraphPipelinesARM( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// VkPipelineCache pipelineCache, + /// uint32_t createInfoCount, + /// const VkDataGraphPipelineCreateInfoARM* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipeline* pPipelines); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateDataGraphPipelinesARM( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, + scoped ReadOnlySpan pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pPipelines + ) + { + fixed (VkPipeline* pPipelinesFixed = pPipelines) + fixed (VkDataGraphPipelineCreateInfoARM* pCreateInfosFixed = pCreateInfos) + { + VkResult result = handle.PInvoke.vkCreateDataGraphPipelinesARM.Invoke( + handle.Handle, + deferredOperation, + pipelineCache, + pCreateInfos.Length, + pCreateInfosFixed, + pAllocator, + pPipelinesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.PipelineCompileRequiredEXT: + default: + break; + } + + return result; + } + } + + /// + /// vkCreateDataGraphPipelineSessionARM - Create a data graph pipeline session + /// + /// + /// + /// :refpage: vkCreateDataGraphPipelineSessionARM + /// + /// + /// To create a data graph pipeline session, call + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkCreateDataGraphPipelineSessionARM( + /// VkDevice device, + /// const VkDataGraphPipelineSessionCreateInfoARM* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDataGraphPipelineSessionARM* pSession); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDataGraphPipelineSessionARM CreateDataGraphPipelineSessionARM( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineSessionCreateInfoARM pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDataGraphPipelineSessionCreateInfoARM* pCreateInfoFixed = &pCreateInfo) + { + VkDataGraphPipelineSessionARM pSessionLocal = default; + VkResult result = handle.PInvoke.vkCreateDataGraphPipelineSessionARM.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSessionLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSessionLocal; + } + } + + /// + /// vkGetDataGraphPipelineSessionBindPointRequirementsARM - Get the bind point requirements of a data graph pipeline session + /// + /// + /// + /// :refpage: vkGetDataGraphPipelineSessionBindPointRequirementsARM + /// + /// + /// To determine the bind point requirements for a data graph pipeline session, + /// call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkGetDataGraphPipelineSessionBindPointRequirementsARM( + /// VkDevice device, + /// const VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfo, + /// uint32_t* pBindPointRequirementCount, + /// VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDataGraphPipelineSessionBindPointRequirementsARM( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo, + ref int pBindPointRequirementCount, + scoped ReadOnlySpan pBindPointRequirements + ) + { + fixed ( + VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirementsFixed = pBindPointRequirements + ) + fixed (VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfoFixed = &pInfo) + fixed (int* pBindPointRequirementCountFixed = &pBindPointRequirementCount) + { + VkResult result = handle.PInvoke.vkGetDataGraphPipelineSessionBindPointRequirementsARM.Invoke( + handle.Handle, + pInfoFixed, + pBindPointRequirementCountFixed, + pBindPointRequirementsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDataGraphPipelineSessionBindPointRequirementsARM_Count( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo + ) + { + int pBindPointRequirementCount = default; + GetDataGraphPipelineSessionBindPointRequirementsARM(handle, pInfo, ref pBindPointRequirementCount, null); + return pBindPointRequirementCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDataGraphPipelineSessionBindPointRequirementsARM_Write( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo, + scoped ReadOnlySpan pBindPointRequirements + ) + { + int pBindPointRequirementCount = pBindPointRequirements.Length; + return GetDataGraphPipelineSessionBindPointRequirementsARM( + handle, + pInfo, + ref pBindPointRequirementCount, + pBindPointRequirements + ); + } + + /// + /// vkGetDataGraphPipelineSessionMemoryRequirementsARM - Get the memory requirements of a data graph pipeline session + /// + /// + /// + /// :refpage: vkGetDataGraphPipelineSessionMemoryRequirementsARM + /// + /// + /// To determine the memory requirements for a data graph pipeline session, + /// call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// void vkGetDataGraphPipelineSessionMemoryRequirementsARM( + /// VkDevice device, + /// const VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDataGraphPipelineSessionMemoryRequirementsARM( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineSessionMemoryRequirementsInfoARM pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetDataGraphPipelineSessionMemoryRequirementsARM.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetDataGraphPipelineSessionMemoryRequirementsARM( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineSessionMemoryRequirementsInfoARM pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetDataGraphPipelineSessionMemoryRequirementsARM(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkBindDataGraphPipelineSessionMemoryARM - Bind device memory to a data graph pipeline session object + /// + /// + /// + /// :refpage: vkBindDataGraphPipelineSessionMemoryARM + /// + /// + /// To attach memory to a data graph pipeline session object, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkBindDataGraphPipelineSessionMemoryARM( + /// VkDevice device, + /// uint32_t bindInfoCount, + /// const VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindDataGraphPipelineSessionMemoryARM( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBindInfos + ) + { + fixed (VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfosFixed = pBindInfos) + { + VkResult result = handle.PInvoke.vkBindDataGraphPipelineSessionMemoryARM.Invoke( + handle.Handle, + pBindInfos.Length, + pBindInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkDestroyDataGraphPipelineSessionARM - Destroy a data graph pipeline session object + /// + /// + /// + /// :refpage: vkDestroyDataGraphPipelineSessionARM + /// + /// + /// To destroy a data graph pipeline session, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// void vkDestroyDataGraphPipelineSessionARM( + /// VkDevice device, + /// VkDataGraphPipelineSessionARM session, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDataGraphPipelineSessionARM( + this VulkanHandleWrapper handle, + VkDataGraphPipelineSessionARM session, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDataGraphPipelineSessionARM.Invoke(handle.Handle, session, pAllocator); + } + + /// + /// vkCmdDispatchDataGraphARM - Dispatch a data graph pipeline within a session + /// + /// + /// + /// :refpage: vkCmdDispatchDataGraphARM + /// + /// + /// To record a data graph pipeline dispatch, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// void vkCmdDispatchDataGraphARM( + /// VkCommandBuffer commandBuffer, + /// VkDataGraphPipelineSessionARM session, + /// const VkDataGraphPipelineDispatchInfoARM* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DispatchDataGraphARM( + this T handle, + VkDataGraphPipelineSessionARM session, + in VkDataGraphPipelineDispatchInfoARM pInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkDataGraphPipelineDispatchInfoARM* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdDispatchDataGraphARM.Invoke(handle.Handle, session, pInfoFixed); + } + } + + /// + /// vkGetDataGraphPipelineAvailablePropertiesARM - Query available properties of a data graph pipeline + /// + /// + /// + /// :refpage: vkGetDataGraphPipelineAvailablePropertiesARM + /// + /// + /// To query the properties of a data graph pipeline that can be obtained, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkGetDataGraphPipelineAvailablePropertiesARM( + /// VkDevice device, + /// const VkDataGraphPipelineInfoARM* pPipelineInfo, + /// uint32_t* pPropertiesCount, + /// VkDataGraphPipelinePropertyARM* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDataGraphPipelineAvailablePropertiesARM( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineInfoARM pPipelineInfo, + ref int pPropertiesCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDataGraphPipelinePropertyARM* pPropertiesFixed = pProperties) + fixed (VkDataGraphPipelineInfoARM* pPipelineInfoFixed = &pPipelineInfo) + fixed (int* pPropertiesCountFixed = &pPropertiesCount) + { + VkResult result = handle.PInvoke.vkGetDataGraphPipelineAvailablePropertiesARM.Invoke( + handle.Handle, + pPipelineInfoFixed, + pPropertiesCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDataGraphPipelineAvailablePropertiesARM_Count( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineInfoARM pPipelineInfo + ) + { + int pPropertiesCount = default; + GetDataGraphPipelineAvailablePropertiesARM(handle, pPipelineInfo, ref pPropertiesCount, null); + return pPropertiesCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDataGraphPipelineAvailablePropertiesARM_Write( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineInfoARM pPipelineInfo, + scoped ReadOnlySpan pProperties + ) + { + int pPropertiesCount = pProperties.Length; + return GetDataGraphPipelineAvailablePropertiesARM(handle, pPipelineInfo, ref pPropertiesCount, pProperties); + } + + /// + /// vkGetDataGraphPipelinePropertiesARM - Query properties of a data graph pipeline + /// + /// + /// + /// :refpage: vkGetDataGraphPipelinePropertiesARM + /// + /// + /// To query properties of a data graph pipeline, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkGetDataGraphPipelinePropertiesARM( + /// VkDevice device, + /// const VkDataGraphPipelineInfoARM* pPipelineInfo, + /// uint32_t propertiesCount, + /// VkDataGraphPipelinePropertyQueryResultARM* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetDataGraphPipelinePropertiesARM( + this VulkanHandleWrapper handle, + in VkDataGraphPipelineInfoARM pPipelineInfo, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDataGraphPipelinePropertyQueryResultARM* pPropertiesFixed = pProperties) + fixed (VkDataGraphPipelineInfoARM* pPipelineInfoFixed = &pPipelineInfo) + { + VkResult result = handle.PInvoke.vkGetDataGraphPipelinePropertiesARM.Invoke( + handle.Handle, + pPipelineInfoFixed, + pProperties.Length, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// + /// vkCmdSetAttachmentFeedbackLoopEnableEXT - Specify whether attachment feedback loops are enabled dynamically on a command buffer + /// + /// + /// + /// :refpage: vkCmdSetAttachmentFeedbackLoopEnableEXT + /// + /// + /// To dynamically set^ whether a pipeline can + /// access a resource as a non-attachment while it is also used as an attachment + /// that is written to, call: + /// + /// + /// // Provided by VK_EXT_attachment_feedback_loop_dynamic_state + /// void vkCmdSetAttachmentFeedbackLoopEnableEXT( + /// VkCommandBuffer commandBuffer, + /// VkImageAspectFlags aspectMask); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetAttachmentFeedbackLoopEnableEXT(this T handle, VkImageAspectFlags aspectMask) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetAttachmentFeedbackLoopEnableEXT.Invoke(handle.Handle, aspectMask); + } + + /// + /// vkCmdBindTileMemoryQCOM - Bind tile memory to a command buffer + /// + /// + /// + /// To bind a range of tile memory to the command buffer, call: + /// + /// + /// // Provided by VK_QCOM_tile_memory_heap + /// void vkCmdBindTileMemoryQCOM( + /// VkCommandBuffer commandBuffer, + /// const VkTileMemoryBindInfoQCOM* pTileMemoryBindInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BindTileMemoryQCOM(this T handle, in VkTileMemoryBindInfoQCOM pTileMemoryBindInfo) + where T : VulkanHandleWrapper + { + fixed (VkTileMemoryBindInfoQCOM* pTileMemoryBindInfoFixed = &pTileMemoryBindInfo) + { + handle.PInvoke.vkCmdBindTileMemoryQCOM.Invoke(handle.Handle, pTileMemoryBindInfoFixed); + } + } + + /// + /// vkCmdDecompressMemoryEXT - Decompress data between memory regions + /// + /// + /// + /// To decompress memory containing compressed data, call: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// void vkCmdDecompressMemoryEXT( + /// VkCommandBuffer commandBuffer, + /// const VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DecompressMemoryEXT( + this T handle, + VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDecompressMemoryEXT.Invoke(handle.Handle, pDecompressMemoryInfoEXT); + } + + /// + /// vkCmdDecompressMemoryIndirectCountEXT - Indirect decompress data between memory regions + /// + /// + /// + /// :refpage: vkCmdDecompressMemoryIndirectCountEXT + /// + /// + /// To decompress data between one or more memory regions by specifying + /// decompression parameters indirectly in a buffer, call: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// void vkCmdDecompressMemoryIndirectCountEXT( + /// VkCommandBuffer commandBuffer, + /// VkMemoryDecompressionMethodFlagsEXT decompressionMethod, + /// VkDeviceAddress indirectCommandsAddress, + /// VkDeviceAddress indirectCommandsCountAddress, + /// uint32_t maxDecompressionCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DecompressMemoryIndirectCountEXT( + this T handle, + VkMemoryDecompressionMethodFlagsEXT decompressionMethod, + VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, + int maxDecompressionCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDecompressMemoryIndirectCountEXT.Invoke( + handle.Handle, + decompressionMethod, + indirectCommandsAddress, + indirectCommandsCountAddress, + maxDecompressionCount, + stride + ); + } + + /// + /// vkCreateExternalComputeQueueNV - Create an external compute queue for use by a compatible external API. + /// + /// + /// + /// To create an external compute queue for use by compatible external APIs + /// call: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// VkResult vkCreateExternalComputeQueueNV( + /// VkDevice device, + /// const VkExternalComputeQueueCreateInfoNV* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkExternalComputeQueueNV* pExternalQueue); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkExternalComputeQueueNV CreateExternalComputeQueueNV( + this VulkanHandleWrapper handle, + in VkExternalComputeQueueCreateInfoNV pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkExternalComputeQueueCreateInfoNV* pCreateInfoFixed = &pCreateInfo) + { + VkExternalComputeQueueNV pExternalQueueLocal = default; + VkResult result = handle.PInvoke.vkCreateExternalComputeQueueNV.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pExternalQueueLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pExternalQueueLocal; + } + } + + /// + /// vkDestroyExternalComputeQueueNV - Destroys an external queue. + /// + /// + /// + /// To destroy a previously created external compute queue call: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// void vkDestroyExternalComputeQueueNV( + /// VkDevice device, + /// VkExternalComputeQueueNV externalQueue, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyExternalComputeQueueNV( + this VulkanHandleWrapper handle, + VkExternalComputeQueueNV externalQueue, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyExternalComputeQueueNV.Invoke(handle.Handle, externalQueue, pAllocator); + } + + /// + /// vkGetExternalComputeQueueDataNV - Retrieves data necessary for compatible external API initialization + /// + /// + /// + /// To query the implementation-specific data that must be passed to compatible + /// external APIs during their initialization process call: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// void vkGetExternalComputeQueueDataNV( + /// VkExternalComputeQueueNV externalQueue, + /// VkExternalComputeQueueDataParamsNV* params, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void* GetExternalComputeQueueDataNV( + this VulkanHandleWrapper handle, + VkExternalComputeQueueDataParamsNV* @params + ) + { + void* pDataLocal = default; + handle.PInvoke.vkGetExternalComputeQueueDataNV.Invoke(handle.Handle, @params, pDataLocal); + return pDataLocal; + } + + /// + /// vkGetClusterAccelerationStructureBuildSizesNV - Retrieve the buffer allocation requirements for cluster geometry command + /// + /// + /// + /// These cluster acceleration structures can be built or moved by a single + /// versatile multi-indirect function + /// vkCmdBuildClusterAccelerationStructureIndirectNV. + /// To determine the memory requirements for executing this function, call: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// void vkGetClusterAccelerationStructureBuildSizesNV( + /// VkDevice device, + /// const VkClusterAccelerationStructureInputInfoNV* pInfo, + /// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetClusterAccelerationStructureBuildSizesNV( + this VulkanHandleWrapper handle, + in VkClusterAccelerationStructureInputInfoNV pInfo, + in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo + ) + { + fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo) + fixed (VkClusterAccelerationStructureInputInfoNV* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetClusterAccelerationStructureBuildSizesNV.Invoke( + handle.Handle, + pInfoFixed, + pSizeInfoFixed + ); + } + } + + /// + /// vkCmdBuildClusterAccelerationStructureIndirectNV - Build or move cluster acceleration structures + /// + /// + /// + /// To build or move a cluster acceleration structure or a cluster acceleration + /// structure template call: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// void vkCmdBuildClusterAccelerationStructureIndirectNV( + /// VkCommandBuffer commandBuffer, + /// const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BuildClusterAccelerationStructureIndirectNV( + this T handle, + VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBuildClusterAccelerationStructureIndirectNV.Invoke(handle.Handle, pCommandInfos); + } + + /// + /// vkGetPartitionedAccelerationStructuresBuildSizesNV - Retrieve the buffer allocation requirements for partitioned acceleration structure command + /// + /// + /// + /// To determine the memory requirements for a PTAS, call: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// void vkGetPartitionedAccelerationStructuresBuildSizesNV( + /// VkDevice device, + /// const VkPartitionedAccelerationStructureInstancesInputNV* pInfo, + /// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetPartitionedAccelerationStructuresBuildSizesNV( + this VulkanHandleWrapper handle, + in VkPartitionedAccelerationStructureInstancesInputNV pInfo, + in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo + ) + { + fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo) + fixed (VkPartitionedAccelerationStructureInstancesInputNV* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetPartitionedAccelerationStructuresBuildSizesNV.Invoke( + handle.Handle, + pInfoFixed, + pSizeInfoFixed + ); + } + } + + /// + /// vkCmdBuildPartitionedAccelerationStructuresNV - Command for building a PTLAS + /// + /// + /// + /// To build a partitioned top level acceleration structure, call: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// void vkCmdBuildPartitionedAccelerationStructuresNV( + /// VkCommandBuffer commandBuffer, + /// const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BuildPartitionedAccelerationStructuresNV( + this T handle, + in VkBuildPartitionedAccelerationStructureInfoNV pBuildInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfoFixed = &pBuildInfo) + { + handle.PInvoke.vkCmdBuildPartitionedAccelerationStructuresNV.Invoke(handle.Handle, pBuildInfoFixed); + } + } + + /// + /// vkGetGeneratedCommandsMemoryRequirementsEXT - Retrieve the buffer allocation requirements for generated commands + /// + /// + /// + /// With `VK_EXT_device_generated_commands`, to retrieve the memory size + /// and alignment requirements of a particular execution state call: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkGetGeneratedCommandsMemoryRequirementsEXT( + /// VkDevice device, + /// const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + /// VkMemoryRequirements2* pMemoryRequirements); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetGeneratedCommandsMemoryRequirementsEXT( + this VulkanHandleWrapper handle, + in VkGeneratedCommandsMemoryRequirementsInfoEXT pInfo, + ref VkMemoryRequirements2 pMemoryRequirements + ) + { + fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) + fixed (VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfoFixed = &pInfo) + { + handle.PInvoke.vkGetGeneratedCommandsMemoryRequirementsEXT.Invoke( + handle.Handle, + pInfoFixed, + pMemoryRequirementsFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMemoryRequirements2. + public static VkMemoryRequirements2 GetGeneratedCommandsMemoryRequirementsEXT( + this VulkanHandleWrapper handle, + in VkGeneratedCommandsMemoryRequirementsInfoEXT pInfo + ) + { + VkMemoryRequirements2 outValue = new(); + GetGeneratedCommandsMemoryRequirementsEXT(handle, pInfo, ref outValue); + return outValue; + } + + /// + /// vkCmdPreprocessGeneratedCommandsEXT - Performs preprocessing for generated commands + /// + /// + /// + /// Commands can be preprocessed prior execution using the following command: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkCmdPreprocessGeneratedCommandsEXT( + /// VkCommandBuffer commandBuffer, + /// const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + /// VkCommandBuffer stateCommandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void PreprocessGeneratedCommandsEXT( + this T handle, + in VkGeneratedCommandsInfoEXT pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer + ) + where T : VulkanHandleWrapper + { + fixed (VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) + { + handle.PInvoke.vkCmdPreprocessGeneratedCommandsEXT.Invoke( + handle.Handle, + pGeneratedCommandsInfoFixed, + stateCommandBuffer + ); + } + } + + /// + /// vkCmdExecuteGeneratedCommandsEXT - Generate and execute commands on the device + /// + /// + /// + /// :refpage: vkCmdExecuteGeneratedCommandsEXT + /// + /// + /// With `VK_EXT_device_generated_commands`, the actual generation of + /// commands as well as their execution on the device is handled as single + /// action with: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkCmdExecuteGeneratedCommandsEXT( + /// VkCommandBuffer commandBuffer, + /// VkBool32 isPreprocessed, + /// const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void ExecuteGeneratedCommandsEXT( + this T handle, + Brutal.Bool32 isPreprocessed, + in VkGeneratedCommandsInfoEXT pGeneratedCommandsInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) + { + handle.PInvoke.vkCmdExecuteGeneratedCommandsEXT.Invoke( + handle.Handle, + isPreprocessed, + pGeneratedCommandsInfoFixed + ); + } + } + + /// + /// vkCreateIndirectCommandsLayoutEXT - Create an indirect command layout object + /// + /// + /// + /// Indirect command layouts for `VK_EXT_device_generated_commands` are + /// created by: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// VkResult vkCreateIndirectCommandsLayoutEXT( + /// VkDevice device, + /// const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkIndirectCommandsLayoutEXT CreateIndirectCommandsLayoutEXT( + this VulkanHandleWrapper handle, + in VkIndirectCommandsLayoutCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkIndirectCommandsLayoutEXT pIndirectCommandsLayoutLocal = default; + VkResult result = handle.PInvoke.vkCreateIndirectCommandsLayoutEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pIndirectCommandsLayoutLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pIndirectCommandsLayoutLocal; + } + } + + /// + /// vkDestroyIndirectCommandsLayoutEXT - Destroy an indirect commands layout + /// + /// + /// + /// Indirect command layouts for `VK_EXT_device_generated_commands` are + /// destroyed by: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkDestroyIndirectCommandsLayoutEXT( + /// VkDevice device, + /// VkIndirectCommandsLayoutEXT indirectCommandsLayout, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyIndirectCommandsLayoutEXT( + this VulkanHandleWrapper handle, + VkIndirectCommandsLayoutEXT indirectCommandsLayout, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyIndirectCommandsLayoutEXT.Invoke(handle.Handle, indirectCommandsLayout, pAllocator); + } + + /// + /// vkCreateIndirectExecutionSetEXT - Create an indirect execution set + /// + /// + /// + /// :refpage: vkCreateIndirectExecutionSetEXT + /// + /// + /// Indirect Execution Sets are created by calling: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// VkResult vkCreateIndirectExecutionSetEXT( + /// VkDevice device, + /// const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkIndirectExecutionSetEXT* pIndirectExecutionSet); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkIndirectExecutionSetEXT CreateIndirectExecutionSetEXT( + this VulkanHandleWrapper handle, + in VkIndirectExecutionSetCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkIndirectExecutionSetCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkIndirectExecutionSetEXT pIndirectExecutionSetLocal = default; + VkResult result = handle.PInvoke.vkCreateIndirectExecutionSetEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pIndirectExecutionSetLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pIndirectExecutionSetLocal; + } + } + + /// + /// vkDestroyIndirectExecutionSetEXT - Destroy an indirect execution set + /// + /// + /// + /// :refpage: vkDestroyIndirectExecutionSetEXT + /// + /// + /// Destroy an Indirect Execution Set by calling: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkDestroyIndirectExecutionSetEXT( + /// VkDevice device, + /// VkIndirectExecutionSetEXT indirectExecutionSet, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyIndirectExecutionSetEXT( + this VulkanHandleWrapper handle, + VkIndirectExecutionSetEXT indirectExecutionSet, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyIndirectExecutionSetEXT.Invoke(handle.Handle, indirectExecutionSet, pAllocator); + } + + /// + /// vkUpdateIndirectExecutionSetPipelineEXT - Update the contents of an indirect execution set + /// + /// + /// + /// :refpage: vkUpdateIndirectExecutionSetPipelineEXT + /// + /// + /// Pipeline elements in an Indirect Execution Set can be updated by calling: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkUpdateIndirectExecutionSetPipelineEXT( + /// VkDevice device, + /// VkIndirectExecutionSetEXT indirectExecutionSet, + /// uint32_t executionSetWriteCount, + /// const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateIndirectExecutionSetPipelineEXT( + this VulkanHandleWrapper handle, + VkIndirectExecutionSetEXT indirectExecutionSet, + scoped ReadOnlySpan pExecutionSetWrites + ) + { + fixed (VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWritesFixed = pExecutionSetWrites) + { + handle.PInvoke.vkUpdateIndirectExecutionSetPipelineEXT.Invoke( + handle.Handle, + indirectExecutionSet, + pExecutionSetWrites.Length, + pExecutionSetWritesFixed + ); + } + } + + /// + /// vkUpdateIndirectExecutionSetShaderEXT - Update the contents of an indirect execution set + /// + /// + /// + /// :refpage: vkUpdateIndirectExecutionSetShaderEXT + /// + /// + /// Shader object elements in an Indirect Execution Set can be updated by + /// calling: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// void vkUpdateIndirectExecutionSetShaderEXT( + /// VkDevice device, + /// VkIndirectExecutionSetEXT indirectExecutionSet, + /// uint32_t executionSetWriteCount, + /// const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void UpdateIndirectExecutionSetShaderEXT( + this VulkanHandleWrapper handle, + VkIndirectExecutionSetEXT indirectExecutionSet, + scoped ReadOnlySpan pExecutionSetWrites + ) + { + fixed (VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWritesFixed = pExecutionSetWrites) + { + handle.PInvoke.vkUpdateIndirectExecutionSetShaderEXT.Invoke( + handle.Handle, + indirectExecutionSet, + pExecutionSetWrites.Length, + pExecutionSetWritesFixed + ); + } + } + + /// + /// vkCreateShaderInstrumentationARM - Create a new shader instrumentation object + /// + /// + /// + /// :refpage: vkCreateShaderInstrumentationARM + /// :objectnameplural: shader instrumentation + /// :objectnamecamelcase: shaderInstrumentation + /// :objectnamestruct: VkDeviceObjectReservationCreateInfo + /// :objectcount: 1 + /// + /// + /// To create a shader instrumentation object, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// VkResult vkCreateShaderInstrumentationARM( + /// VkDevice device, + /// const VkShaderInstrumentationCreateInfoARM* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkShaderInstrumentationARM* pInstrumentation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkShaderInstrumentationARM CreateShaderInstrumentationARM( + this VulkanHandleWrapper handle, + in VkShaderInstrumentationCreateInfoARM pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkShaderInstrumentationCreateInfoARM* pCreateInfoFixed = &pCreateInfo) + { + VkShaderInstrumentationARM pInstrumentationLocal = default; + VkResult result = handle.PInvoke.vkCreateShaderInstrumentationARM.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pInstrumentationLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pInstrumentationLocal; + } + } + + /// + /// vkDestroyShaderInstrumentationARM - Destroy a shader instrumentation object + /// + /// + /// + /// To destroy a shader instrumentation object, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// void vkDestroyShaderInstrumentationARM( + /// VkDevice device, + /// VkShaderInstrumentationARM instrumentation, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyShaderInstrumentationARM( + this VulkanHandleWrapper handle, + VkShaderInstrumentationARM instrumentation, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyShaderInstrumentationARM.Invoke(handle.Handle, instrumentation, pAllocator); + } + + /// + /// vkCmdBeginShaderInstrumentationARM - Begin shader instrumentation + /// + /// + /// + /// To begin shader instrumentation, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// void vkCmdBeginShaderInstrumentationARM( + /// VkCommandBuffer commandBuffer, + /// VkShaderInstrumentationARM instrumentation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BeginShaderInstrumentationARM(this T handle, VkShaderInstrumentationARM instrumentation) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdBeginShaderInstrumentationARM.Invoke(handle.Handle, instrumentation); + } + + /// + /// vkCmdEndShaderInstrumentationARM - End shader instrumentation + /// + /// + /// + /// To end shader instrumentation, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// void vkCmdEndShaderInstrumentationARM( + /// VkCommandBuffer commandBuffer); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void EndShaderInstrumentationARM(this T handle) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdEndShaderInstrumentationARM.Invoke(handle.Handle); + } + + /// + /// vkGetShaderInstrumentationValuesARM - Retrieve shader instrumentation data + /// + /// + /// + /// Data can be retrieved from an instrumentation object in units of metric + /// blocks. + /// The size of each metric block in bytes is + /// sizeof(VkShaderInstrumentationMetricDataHeaderARM) {plus} + /// sizeof(uint64_t) {times} + /// VkPhysicalDeviceShaderInstrumentationPropertiesARM::numMetrics. + /// + /// + /// To retrieve metric blocks from an instrumentation object, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// VkResult vkGetShaderInstrumentationValuesARM( + /// VkDevice device, + /// VkShaderInstrumentationARM instrumentation, + /// uint32_t* pMetricBlockCount, + /// void* pMetricValues, + /// VkShaderInstrumentationValuesFlagsARM flags); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetShaderInstrumentationValuesARM( + this VulkanHandleWrapper handle, + VkShaderInstrumentationARM instrumentation, + int* pMetricBlockCount, + void* pMetricValues, + VkShaderInstrumentationValuesFlagsARM flags + ) + { + VkResult result = handle.PInvoke.vkGetShaderInstrumentationValuesARM.Invoke( + handle.Handle, + instrumentation, + pMetricBlockCount, + pMetricValues, + flags + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + + /// + /// vkClearShaderInstrumentationMetricsARM - Clear shader instrumentation metrics to zero + /// + /// + /// + /// [[shaders-instrumentation-clear]] + /// To clear the value of all metric blocks in an instrumentation object to + /// zero, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// void vkClearShaderInstrumentationMetricsARM( + /// VkDevice device, + /// VkShaderInstrumentationARM instrumentation); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ClearShaderInstrumentationMetricsARM( + this VulkanHandleWrapper handle, + VkShaderInstrumentationARM instrumentation + ) + { + handle.PInvoke.vkClearShaderInstrumentationMetricsARM.Invoke(handle.Handle, instrumentation); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EndRendering2EXT(this T handle, in VkRenderingEndInfoKHR pRenderingEndInfo) + where T : VulkanHandleWrapper + { + fixed (VkRenderingEndInfoKHR* pRenderingEndInfoFixed = &pRenderingEndInfo) + { + handle.PInvoke.vkCmdEndRendering2EXT.Invoke(handle.Handle, pRenderingEndInfoFixed); + } + } + + /// + /// vkCmdBeginCustomResolveEXT - Begins a shader resolve operation + /// + /// + /// + /// To begin resolving attachments using render pass draws, call: + /// + /// + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// void vkCmdBeginCustomResolveEXT( + /// VkCommandBuffer commandBuffer, + /// const VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BeginCustomResolveEXT( + this T handle, + in VkBeginCustomResolveInfoEXT pBeginCustomResolveInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfoFixed = &pBeginCustomResolveInfo) + { + handle.PInvoke.vkCmdBeginCustomResolveEXT.Invoke(handle.Handle, pBeginCustomResolveInfoFixed); + } + } + + /// + /// vkCmdSetComputeOccupancyPriorityNV - Set the compute occupancy priority for subsequent compute dispatches + /// + /// + /// + /// To set the compute occupancy priority for subsequent compute dispatches, + /// call: + /// + /// + /// // Provided by VK_NV_compute_occupancy_priority + /// void vkCmdSetComputeOccupancyPriorityNV( + /// VkCommandBuffer commandBuffer, + /// const VkComputeOccupancyPriorityParametersNV* pParameters); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SetComputeOccupancyPriorityNV( + this T handle, + VkComputeOccupancyPriorityParametersNV* pParameters + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetComputeOccupancyPriorityNV.Invoke(handle.Handle, pParameters); + } + + /// + /// vkCmdSetPrimitiveRestartIndexEXT - Set primitive assembly restart index dynamically for a command buffer + /// + /// + /// + /// To dynamically control^ which special vertex + /// index value is treated as restarting the assembly of primitives, call: + /// + /// + /// // Provided by VK_EXT_primitive_restart_index + /// void vkCmdSetPrimitiveRestartIndexEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t primitiveRestartIndex); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetPrimitiveRestartIndexEXT(this T handle, int primitiveRestartIndex) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetPrimitiveRestartIndexEXT.Invoke(handle.Handle, primitiveRestartIndex); + } + + /// + /// vkCreateAccelerationStructureKHR - Create a new acceleration structure object + /// + /// + /// + /// :refpage: vkCreateAccelerationStructureKHR + /// + /// + /// To create an acceleration structure using a buffer, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkResult vkCreateAccelerationStructureKHR( + /// VkDevice device, + /// const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkAccelerationStructureKHR* pAccelerationStructure); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkAccelerationStructureKHR CreateAccelerationStructureKHR( + this VulkanHandleWrapper handle, + in VkAccelerationStructureCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkAccelerationStructureCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkAccelerationStructureKHR pAccelerationStructureLocal = default; + VkResult result = handle.PInvoke.vkCreateAccelerationStructureKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pAccelerationStructureLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddressKHR, + "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pAccelerationStructureLocal; + } + } + + /// + /// vkDestroyAccelerationStructureKHR - Destroy an acceleration structure object + /// + /// + /// + /// :refpage: vkDestroyAccelerationStructureKHR + /// + /// + /// To destroy an acceleration structure, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkDestroyAccelerationStructureKHR( + /// VkDevice device, + /// VkAccelerationStructureKHR accelerationStructure, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyAccelerationStructureKHR( + this VulkanHandleWrapper handle, + VkAccelerationStructureKHR accelerationStructure, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyAccelerationStructureKHR.Invoke(handle.Handle, accelerationStructure, pAllocator); + } + + /// + /// vkCmdBuildAccelerationStructuresKHR - Build an acceleration structure + /// + /// + /// + /// :refpage: vkCmdBuildAccelerationStructuresKHR + /// + /// + /// To build acceleration structures call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkCmdBuildAccelerationStructuresKHR( + /// VkCommandBuffer commandBuffer, + /// uint32_t infoCount, + /// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + /// const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BuildAccelerationStructuresKHR( + this T handle, + scoped ReadOnlySpan pInfos, + scoped ReadOnlySpan> ppBuildRangeInfos + ) + where T : VulkanHandleWrapper + { + fixed (Ptr* ppBuildRangeInfosFixed = ppBuildRangeInfos) + fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos) + { + handle.PInvoke.vkCmdBuildAccelerationStructuresKHR.Invoke( + handle.Handle, + pInfos.Length, + pInfosFixed, + (VkAccelerationStructureBuildRangeInfoKHR**)ppBuildRangeInfosFixed + ); + } + } + + /// + /// vkCmdBuildAccelerationStructuresIndirectKHR - Build an acceleration structure with some parameters provided on the device + /// + /// + /// + /// :refpage: vkCmdBuildAccelerationStructuresIndirectKHR + /// + /// + /// To build acceleration structures with some parameters sourced on the device + /// call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkCmdBuildAccelerationStructuresIndirectKHR( + /// VkCommandBuffer commandBuffer, + /// uint32_t infoCount, + /// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + /// const VkDeviceAddress* pIndirectDeviceAddresses, + /// const uint32_t* pIndirectStrides, + /// const uint32_t* const* ppMaxPrimitiveCounts); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void BuildAccelerationStructuresIndirectKHR( + this T handle, + scoped ReadOnlySpan pInfos, + scoped ReadOnlySpan pIndirectDeviceAddresses, + scoped ReadOnlySpan pIndirectStrides, + scoped ReadOnlySpan> ppMaxPrimitiveCounts + ) + where T : VulkanHandleWrapper + { + fixed (Ptr* ppMaxPrimitiveCountsFixed = ppMaxPrimitiveCounts) + fixed (int* pIndirectStridesFixed = pIndirectStrides) + fixed (VkDeviceAddress* pIndirectDeviceAddressesFixed = pIndirectDeviceAddresses) + fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos) + { + handle.PInvoke.vkCmdBuildAccelerationStructuresIndirectKHR.Invoke( + handle.Handle, + pInfos.Length, + pInfosFixed, + pIndirectDeviceAddressesFixed, + pIndirectStridesFixed, + (int**)ppMaxPrimitiveCountsFixed + ); + } + } + + /// + /// vkBuildAccelerationStructuresKHR - Build an acceleration structure on the host + /// + /// + /// + /// :refpage: vkBuildAccelerationStructuresKHR + /// + /// + /// To build acceleration structures on the host, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkResult vkBuildAccelerationStructuresKHR( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// uint32_t infoCount, + /// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + /// const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult BuildAccelerationStructuresKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + scoped ReadOnlySpan pInfos, + scoped ReadOnlySpan> ppBuildRangeInfos + ) + { + fixed (Ptr* ppBuildRangeInfosFixed = ppBuildRangeInfos) + fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos) + { + VkResult result = handle.PInvoke.vkBuildAccelerationStructuresKHR.Invoke( + handle.Handle, + deferredOperation, + pInfos.Length, + pInfosFixed, + (VkAccelerationStructureBuildRangeInfoKHR**)ppBuildRangeInfosFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCopyAccelerationStructureKHR - Copy an acceleration structure on the host + /// + /// + /// + /// :refpage: vkCopyAccelerationStructureKHR + /// + /// + /// To copy or compact an acceleration structure on the host, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkResult vkCopyAccelerationStructureKHR( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// const VkCopyAccelerationStructureInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyAccelerationStructureKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + in VkCopyAccelerationStructureInfoKHR pInfo + ) + { + fixed (VkCopyAccelerationStructureInfoKHR* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkCopyAccelerationStructureKHR.Invoke( + handle.Handle, + deferredOperation, + pInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCopyAccelerationStructureToMemoryKHR - Serialize an acceleration structure on the host + /// + /// + /// + /// :refpage: vkCopyAccelerationStructureToMemoryKHR + /// + /// + /// To copy an acceleration structure to host accessible memory, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkResult vkCopyAccelerationStructureToMemoryKHR( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyAccelerationStructureToMemoryKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + in VkCopyAccelerationStructureToMemoryInfoKHR pInfo + ) + { + fixed (VkCopyAccelerationStructureToMemoryInfoKHR* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkCopyAccelerationStructureToMemoryKHR.Invoke( + handle.Handle, + deferredOperation, + pInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkCopyMemoryToAccelerationStructureKHR - Deserialize an acceleration structure on the host + /// + /// + /// + /// :refpage: vkCopyMemoryToAccelerationStructureKHR + /// + /// + /// To copy host accessible memory to an acceleration structure, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkResult vkCopyMemoryToAccelerationStructureKHR( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CopyMemoryToAccelerationStructureKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + in VkCopyMemoryToAccelerationStructureInfoKHR pInfo + ) + { + fixed (VkCopyMemoryToAccelerationStructureInfoKHR* pInfoFixed = &pInfo) + { + VkResult result = handle.PInvoke.vkCopyMemoryToAccelerationStructureKHR.Invoke( + handle.Handle, + deferredOperation, + pInfoFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + default: + break; + } + + return result; + } + } + + /// + /// vkWriteAccelerationStructuresPropertiesKHR - Query acceleration structure meta-data on the host + /// + /// + /// + /// :refpage: vkWriteAccelerationStructuresPropertiesKHR + /// + /// + /// To query acceleration structure size parameters on the host, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkResult vkWriteAccelerationStructuresPropertiesKHR( + /// VkDevice device, + /// uint32_t accelerationStructureCount, + /// const VkAccelerationStructureKHR* pAccelerationStructures, + /// VkQueryType queryType, + /// size_t dataSize, + /// void* pData, + /// size_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteAccelerationStructuresPropertiesKHR( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pAccelerationStructures, + VkQueryType queryType, + scoped ReadOnlySpan pData, + nuint stride + ) + { + fixed (byte* pDataFixed = pData) + fixed (VkAccelerationStructureKHR* pAccelerationStructuresFixed = pAccelerationStructures) + { + VkResult result = handle.PInvoke.vkWriteAccelerationStructuresPropertiesKHR.Invoke( + handle.Handle, + pAccelerationStructures.Length, + pAccelerationStructuresFixed, + queryType, + (nuint)pData.Length, + pDataFixed, + stride + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdCopyAccelerationStructureKHR - Copy an acceleration structure + /// + /// + /// + /// :refpage: vkCmdCopyAccelerationStructureKHR + /// + /// + /// To copy an acceleration structure call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkCmdCopyAccelerationStructureKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyAccelerationStructureInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyAccelerationStructureKHR( + this T handle, + in VkCopyAccelerationStructureInfoKHR pInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyAccelerationStructureInfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdCopyAccelerationStructureKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdCopyAccelerationStructureToMemoryKHR - Copy an acceleration structure to device memory + /// + /// + /// + /// :refpage: vkCmdCopyAccelerationStructureToMemoryKHR + /// + /// + /// To copy an acceleration structure to device memory call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkCmdCopyAccelerationStructureToMemoryKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyAccelerationStructureToMemoryKHR( + this T handle, + in VkCopyAccelerationStructureToMemoryInfoKHR pInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyAccelerationStructureToMemoryInfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdCopyAccelerationStructureToMemoryKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdCopyMemoryToAccelerationStructureKHR - Copy device memory to an acceleration structure + /// + /// + /// + /// :refpage: vkCmdCopyMemoryToAccelerationStructureKHR + /// + /// + /// To copy device memory to an acceleration structure call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkCmdCopyMemoryToAccelerationStructureKHR( + /// VkCommandBuffer commandBuffer, + /// const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void CopyMemoryToAccelerationStructureKHR( + this T handle, + in VkCopyMemoryToAccelerationStructureInfoKHR pInfo + ) + where T : VulkanHandleWrapper + { + fixed (VkCopyMemoryToAccelerationStructureInfoKHR* pInfoFixed = &pInfo) + { + handle.PInvoke.vkCmdCopyMemoryToAccelerationStructureKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkGetAccelerationStructureDeviceAddressKHR - Query an address of an acceleration structure + /// + /// + /// + /// :refpage: vkGetAccelerationStructureDeviceAddressKHR + /// + /// + /// To query the 64-bit device address for an acceleration structure, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR( + /// VkDevice device, + /// const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDeviceAddress GetAccelerationStructureDeviceAddressKHR( + this VulkanHandleWrapper handle, + in VkAccelerationStructureDeviceAddressInfoKHR pInfo + ) + { + fixed (VkAccelerationStructureDeviceAddressInfoKHR* pInfoFixed = &pInfo) + { + return handle.PInvoke.vkGetAccelerationStructureDeviceAddressKHR.Invoke(handle.Handle, pInfoFixed); + } + } + + /// + /// vkCmdWriteAccelerationStructuresPropertiesKHR - Write acceleration structure result parameters to query results. + /// + /// + /// + /// :refpage: vkCmdWriteAccelerationStructuresPropertiesKHR + /// + /// + /// To query acceleration structure size parameters call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkCmdWriteAccelerationStructuresPropertiesKHR( + /// VkCommandBuffer commandBuffer, + /// uint32_t accelerationStructureCount, + /// const VkAccelerationStructureKHR* pAccelerationStructures, + /// VkQueryType queryType, + /// VkQueryPool queryPool, + /// uint32_t firstQuery); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void WriteAccelerationStructuresPropertiesKHR( + this T handle, + scoped ReadOnlySpan pAccelerationStructures, + VkQueryType queryType, + VkQueryPool queryPool, + int firstQuery + ) + where T : VulkanHandleWrapper + { + fixed (VkAccelerationStructureKHR* pAccelerationStructuresFixed = pAccelerationStructures) + { + handle.PInvoke.vkCmdWriteAccelerationStructuresPropertiesKHR.Invoke( + handle.Handle, + pAccelerationStructures.Length, + pAccelerationStructuresFixed, + queryType, + queryPool, + firstQuery + ); + } + } + + /// + /// vkGetDeviceAccelerationStructureCompatibilityKHR - Check if a serialized acceleration structure is compatible with the current device + /// + /// + /// + /// :refpage: vkGetDeviceAccelerationStructureCompatibilityKHR + /// + /// + /// To check if a serialized acceleration structure is compatible with the + /// current device call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkGetDeviceAccelerationStructureCompatibilityKHR( + /// VkDevice device, + /// const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + /// VkAccelerationStructureCompatibilityKHR* pCompatibility); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkAccelerationStructureCompatibilityKHR GetAccelerationStructureCompatibilityKHR( + this VulkanHandleWrapper handle, + in VkAccelerationStructureVersionInfoKHR pVersionInfo + ) + { + fixed (VkAccelerationStructureVersionInfoKHR* pVersionInfoFixed = &pVersionInfo) + { + VkAccelerationStructureCompatibilityKHR pCompatibilityLocal = default; + handle.PInvoke.vkGetDeviceAccelerationStructureCompatibilityKHR.Invoke( + handle.Handle, + pVersionInfoFixed, + &pCompatibilityLocal + ); + return pCompatibilityLocal; + } + } + + /// + /// vkGetAccelerationStructureBuildSizesKHR - Retrieve the required size for an acceleration structure + /// + /// + /// + /// :refpage: vkGetAccelerationStructureBuildSizesKHR + /// + /// + /// To get the build sizes for an acceleration structure, call: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// void vkGetAccelerationStructureBuildSizesKHR( + /// VkDevice device, + /// VkAccelerationStructureBuildTypeKHR buildType, + /// const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, + /// const uint32_t* pMaxPrimitiveCounts, + /// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetAccelerationStructureBuildSizesKHR( + this VulkanHandleWrapper handle, + VkAccelerationStructureBuildTypeKHR buildType, + in VkAccelerationStructureBuildGeometryInfoKHR pBuildInfo, + scoped ReadOnlySpan pMaxPrimitiveCounts, + in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo + ) + { + fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo) + fixed (int* pMaxPrimitiveCountsFixed = pMaxPrimitiveCounts) + fixed (VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfoFixed = &pBuildInfo) + { + handle.PInvoke.vkGetAccelerationStructureBuildSizesKHR.Invoke( + handle.Handle, + buildType, + pBuildInfoFixed, + pMaxPrimitiveCountsFixed, + pSizeInfoFixed + ); + } + } + + /// + /// vkCmdTraceRaysKHR - Initialize a ray tracing dispatch + /// + /// + /// + /// :refpage: vkCmdTraceRaysKHR + /// + /// + /// To dispatch ray tracing use: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// void vkCmdTraceRaysKHR( + /// VkCommandBuffer commandBuffer, + /// const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + /// const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + /// const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + /// const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + /// uint32_t width, + /// uint32_t height, + /// uint32_t depth); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TraceRaysKHR( + this T handle, + VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + int width, + int height, + int depth + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdTraceRaysKHR.Invoke( + handle.Handle, + pRaygenShaderBindingTable, + pMissShaderBindingTable, + pHitShaderBindingTable, + pCallableShaderBindingTable, + width, + height, + depth + ); + } + + /// + /// vkCreateRayTracingPipelinesKHR - Creates a new ray tracing pipeline object + /// + /// + /// + /// :refpage: vkCreateRayTracingPipelinesKHR + /// + /// + /// To create ray tracing pipelines, call: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VkResult vkCreateRayTracingPipelinesKHR( + /// VkDevice device, + /// VkDeferredOperationKHR deferredOperation, + /// VkPipelineCache pipelineCache, + /// uint32_t createInfoCount, + /// const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + /// const VkAllocationCallbacks* pAllocator, + /// VkPipeline* pPipelines); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult CreateRayTracingPipelinesKHR( + this VulkanHandleWrapper handle, + VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, + scoped ReadOnlySpan pCreateInfos, + VkAllocator? pAllocator, + scoped ReadOnlySpan pPipelines + ) + { + fixed (VkPipeline* pPipelinesFixed = pPipelines) + fixed (VkRayTracingPipelineCreateInfoKHR* pCreateInfosFixed = pCreateInfos) + { + VkResult result = handle.PInvoke.vkCreateRayTracingPipelinesKHR.Invoke( + handle.Handle, + deferredOperation, + pipelineCache, + pCreateInfos.Length, + pCreateInfosFixed, + pAllocator, + pPipelinesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInvalidOpaqueCaptureAddress: + throw new VkResultError( + VkResult.ErrorInvalidOpaqueCaptureAddress, + "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.OperationDeferredKHR: + case VkResult.OperationNotDeferredKHR: + case VkResult.PipelineCompileRequiredEXT: + default: + break; + } + + return result; + } + } + + /// + /// vkGetRayTracingCaptureReplayShaderGroupHandlesKHR - Query opaque capture replay data for pipeline shader group handles + /// + /// + /// + /// :refpage: vkGetRayTracingCaptureReplayShaderGroupHandlesKHR + /// + /// + /// To query the opaque capture data of shader groups in a ray tracing pipeline, + /// call: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( + /// VkDevice device, + /// VkPipeline pipeline, + /// uint32_t firstGroup, + /// uint32_t groupCount, + /// size_t dataSize, + /// void* pData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetRayTracingCaptureReplayShaderGroupHandlesKHR( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + int firstGroup, + int groupCount, + scoped ReadOnlySpan pData + ) + { + fixed (byte* pDataFixed = pData) + { + VkResult result = handle.PInvoke.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.Invoke( + handle.Handle, + pipeline, + firstGroup, + groupCount, + (nuint)pData.Length, + pDataFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// + /// vkCmdTraceRaysIndirectKHR - Initialize an indirect ray tracing dispatch + /// + /// + /// + /// :refpage: vkCmdTraceRaysIndirectKHR + /// + /// + /// To dispatch ray tracing, with some parameters sourced on the device, use: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// void vkCmdTraceRaysIndirectKHR( + /// VkCommandBuffer commandBuffer, + /// const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + /// const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + /// const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + /// const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + /// VkDeviceAddress indirectDeviceAddress); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void TraceRaysIndirectKHR( + this T handle, + VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdTraceRaysIndirectKHR.Invoke( + handle.Handle, + pRaygenShaderBindingTable, + pMissShaderBindingTable, + pHitShaderBindingTable, + pCallableShaderBindingTable, + indirectDeviceAddress + ); + } + + /// + /// vkGetRayTracingShaderGroupStackSizeKHR - Query ray tracing pipeline shader group shader stack size + /// + /// + /// + /// To query the pipeline stack size of shaders in a shader group in the ray + /// tracing pipeline, call: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR( + /// VkDevice device, + /// VkPipeline pipeline, + /// uint32_t group, + /// VkShaderGroupShaderKHR groupShader); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize64 GetRayTracingShaderGroupStackSizeKHR( + this VulkanHandleWrapper handle, + VkPipeline pipeline, + int group, + VkShaderGroupShaderKHR groupShader + ) + { + return handle.PInvoke.vkGetRayTracingShaderGroupStackSizeKHR.Invoke( + handle.Handle, + pipeline, + group, + groupShader + ); + } + + /// + /// vkCmdSetRayTracingPipelineStackSizeKHR - Set the stack size dynamically for a ray tracing pipeline + /// + /// + /// + /// :refpage: vkCmdSetRayTracingPipelineStackSizeKHR + /// + /// + /// To dynamically set^ the stack size for a ray + /// tracing pipeline, call: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// void vkCmdSetRayTracingPipelineStackSizeKHR( + /// VkCommandBuffer commandBuffer, + /// uint32_t pipelineStackSize); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SetRayTracingPipelineStackSizeKHR(this T handle, int pipelineStackSize) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdSetRayTracingPipelineStackSizeKHR.Invoke(handle.Handle, pipelineStackSize); + } + + /// + /// vkCmdDrawMeshTasksEXT - Draw mesh task work items + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksEXT + /// + /// + /// To record a mesh tasks drawing command, call: + /// + /// + /// // Provided by VK_EXT_mesh_shader + /// void vkCmdDrawMeshTasksEXT( + /// VkCommandBuffer commandBuffer, + /// uint32_t groupCountX, + /// uint32_t groupCountY, + /// uint32_t groupCountZ); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawMeshTasksEXT(this T handle, int groupCountX, int groupCountY, int groupCountZ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawMeshTasksEXT.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ); + } + + /// + /// vkCmdDrawMeshTasksIndirectEXT - Issue an indirect mesh tasks draw into a command buffer + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksIndirectEXT + /// + /// + /// To record an indirect mesh tasks drawing command, call: + /// + /// + /// // Provided by VK_EXT_mesh_shader + /// void vkCmdDrawMeshTasksIndirectEXT( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// uint32_t drawCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawMeshTasksIndirectEXT( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + int drawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawMeshTasksIndirectEXT.Invoke(handle.Handle, buffer, offset, drawCount, stride); + } + + /// + /// vkCmdDrawMeshTasksIndirectCountEXT - Perform an indirect mesh tasks draw with the draw count sourced from a buffer + /// + /// + /// + /// :refpage: vkCmdDrawMeshTasksIndirectCountEXT + /// + /// + /// To record an indirect mesh tasks drawing command with the draw count sourced + /// from a buffer, call: + /// + /// + /// // Provided by VK_EXT_mesh_shader with VK_VERSION_1_2 or VK_KHR_draw_indirect_count or VK_AMD_draw_indirect_count + /// void vkCmdDrawMeshTasksIndirectCountEXT( + /// VkCommandBuffer commandBuffer, + /// VkBuffer buffer, + /// VkDeviceSize offset, + /// VkBuffer countBuffer, + /// VkDeviceSize countBufferOffset, + /// uint32_t maxDrawCount, + /// uint32_t stride); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void DrawMeshTasksIndirectCountEXT( + this T handle, + VkBuffer buffer, + ByteSize64 offset, + VkBuffer countBuffer, + ByteSize64 countBufferOffset, + int maxDrawCount, + int stride + ) + where T : VulkanHandleWrapper + { + handle.PInvoke.vkCmdDrawMeshTasksIndirectCountEXT.Invoke( + handle.Handle, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyImages( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pImages, + VkAllocator? pAllocator + ) + { + fixed (VkImage* pImagesFixed = pImages) + { + handle.PInvoke.vxDestroyImages.Invoke(handle.Handle, pImagesFixed, pImages.Length, pAllocator); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyImageViews( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pImageViews, + VkAllocator? pAllocator + ) + { + fixed (VkImageView* pImageViewsFixed = pImageViews) + { + handle.PInvoke.vxDestroyImageViews.Invoke( + handle.Handle, + pImageViewsFixed, + pImageViews.Length, + pAllocator + ); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyBuffers( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBuffers, + VkAllocator? pAllocator + ) + { + fixed (VkBuffer* pBuffersFixed = pBuffers) + { + handle.PInvoke.vxDestroyBuffers.Invoke(handle.Handle, pBuffersFixed, pBuffers.Length, pAllocator); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyBufferViews( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pBufferViews, + VkAllocator? pAllocator + ) + { + fixed (VkBufferView* pBufferViewsFixed = pBufferViews) + { + handle.PInvoke.vxDestroyBufferViews.Invoke( + handle.Handle, + pBufferViewsFixed, + pBufferViews.Length, + pAllocator + ); + } + } + } +} diff --git a/Brutal.Vulkan/Generated/Extensions/VkInstanceExtensions.gen.cs b/Brutal.Vulkan/Generated/Extensions/VkInstanceExtensions.gen.cs new file mode 100644 index 0000000..63c03d1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Extensions/VkInstanceExtensions.gen.cs @@ -0,0 +1,5883 @@ +namespace Brutal.VulkanApi +{ + public static unsafe partial class VkInstanceExtensions + { + /// + /// vkDestroyInstance - Destroy an instance of Vulkan + /// + /// + /// + /// To destroy an instance, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkDestroyInstance( + /// VkInstance instance, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe void DestroyInstanceInternal( + this VulkanHandleWrapper handle, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyInstance.Invoke(handle.Handle, pAllocator); + } + + /// + /// vkEnumeratePhysicalDevices - Enumerates the physical devices accessible to a Vulkan instance + /// + /// + /// + /// To retrieve a list of physical device objects representing the physical + /// devices installed in the system, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumeratePhysicalDevices( + /// VkInstance instance, + /// uint32_t* pPhysicalDeviceCount, + /// VkPhysicalDevice* pPhysicalDevices); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumeratePhysicalDevicesInternal( + this VulkanHandleWrapper handle, + ref int pPhysicalDeviceCount, + scoped ReadOnlySpan pPhysicalDevices + ) + { + fixed (VkPhysicalDevice* pPhysicalDevicesFixed = pPhysicalDevices) + fixed (int* pPhysicalDeviceCountFixed = &pPhysicalDeviceCount) + { + VkResult result = handle.PInvoke.vkEnumeratePhysicalDevices.Invoke( + handle.Handle, + pPhysicalDeviceCountFixed, + pPhysicalDevicesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumeratePhysicalDevices failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumeratePhysicalDevices failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkEnumeratePhysicalDevices failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumeratePhysicalDevices failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumeratePhysicalDevices failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumeratePhysicalDevicesInternal_Count( + this VulkanHandleWrapper handle + ) + { + int pPhysicalDeviceCount = default; + EnumeratePhysicalDevicesInternal(handle, ref pPhysicalDeviceCount, null); + return pPhysicalDeviceCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumeratePhysicalDevicesInternal_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pPhysicalDevices + ) + { + int pPhysicalDeviceCount = pPhysicalDevices.Length; + return EnumeratePhysicalDevicesInternal(handle, ref pPhysicalDeviceCount, pPhysicalDevices); + } + + /// + /// vkGetPhysicalDeviceFeatures - Reports capabilities of a physical device + /// + /// + /// + /// To query supported features, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetPhysicalDeviceFeatures( + /// VkPhysicalDevice physicalDevice, + /// VkPhysicalDeviceFeatures* pFeatures); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFeatures( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceFeatures pFeatures + ) + { + fixed (VkPhysicalDeviceFeatures* pFeaturesFixed = &pFeatures) + { + handle.PInvoke.vkGetPhysicalDeviceFeatures.Invoke(handle.Handle, pFeaturesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceFeatures. + public static VkPhysicalDeviceFeatures GetFeatures( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceFeatures outValue = new(); + GetFeatures(handle, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceFormatProperties - Lists physical device&apos;s format capabilities + /// + /// + /// + /// To query supported format features which are properties of the physical + /// device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetPhysicalDeviceFormatProperties( + /// VkPhysicalDevice physicalDevice, + /// VkFormat format, + /// VkFormatProperties* pFormatProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFormatProperties( + this VulkanHandleWrapper handle, + VkFormat format, + ref VkFormatProperties pFormatProperties + ) + { + fixed (VkFormatProperties* pFormatPropertiesFixed = &pFormatProperties) + { + handle.PInvoke.vkGetPhysicalDeviceFormatProperties.Invoke( + handle.Handle, + format, + pFormatPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkFormatProperties. + public static VkFormatProperties GetFormatProperties( + this VulkanHandleWrapper handle, + VkFormat format + ) + { + VkFormatProperties outValue = new(); + GetFormatProperties(handle, format, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceImageFormatProperties - Lists physical device&apos;s image format capabilities + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceImageFormatProperties + /// + /// + /// To query additional capabilities specific to image types, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkGetPhysicalDeviceImageFormatProperties( + /// VkPhysicalDevice physicalDevice, + /// VkFormat format, + /// VkImageType type, + /// VkImageTiling tiling, + /// VkImageUsageFlags usage, + /// VkImageCreateFlags flags, + /// VkImageFormatProperties* pImageFormatProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageFormatProperties( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags, + ref VkImageFormatProperties pImageFormatProperties + ) + { + fixed (VkImageFormatProperties* pImageFormatPropertiesFixed = &pImageFormatProperties) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceImageFormatProperties.Invoke( + handle.Handle, + format, + type, + tiling, + usage, + flags, + pImageFormatPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorFormatNotSupported: + throw new VkResultError( + VkResult.ErrorFormatNotSupported, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties failed with error: VK_ERROR_FORMAT_NOT_SUPPORTED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkImageFormatProperties. + public static VkImageFormatProperties GetImageFormatProperties( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags + ) + { + VkImageFormatProperties outValue = new(); + GetImageFormatProperties(handle, format, type, tiling, usage, flags, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceProperties - Returns properties of a physical device + /// + /// + /// + /// To query general properties of physical devices once enumerated, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetPhysicalDeviceProperties( + /// VkPhysicalDevice physicalDevice, + /// VkPhysicalDeviceProperties* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProperties( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceProperties pProperties + ) + { + fixed (VkPhysicalDeviceProperties* pPropertiesFixed = &pProperties) + { + handle.PInvoke.vkGetPhysicalDeviceProperties.Invoke(handle.Handle, pPropertiesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceProperties. + public static VkPhysicalDeviceProperties GetProperties( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceProperties outValue = new(); + GetProperties(handle, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceQueueFamilyProperties - Reports properties of the queues of the specified physical device + /// + /// + /// + /// To query properties of queues available on a physical device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetPhysicalDeviceQueueFamilyProperties( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pQueueFamilyPropertyCount, + /// VkQueueFamilyProperties* pQueueFamilyProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetQueueFamilyProperties( + this VulkanHandleWrapper handle, + ref int pQueueFamilyPropertyCount, + scoped ReadOnlySpan pQueueFamilyProperties + ) + { + fixed (VkQueueFamilyProperties* pQueueFamilyPropertiesFixed = pQueueFamilyProperties) + fixed (int* pQueueFamilyPropertyCountFixed = &pQueueFamilyPropertyCount) + { + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyProperties.Invoke( + handle.Handle, + pQueueFamilyPropertyCountFixed, + pQueueFamilyPropertiesFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetQueueFamilyProperties_Count( + this VulkanHandleWrapper handle + ) + { + int pQueueFamilyPropertyCount = default; + GetQueueFamilyProperties(handle, ref pQueueFamilyPropertyCount, null); + return pQueueFamilyPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetQueueFamilyProperties_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pQueueFamilyProperties + ) + { + int pQueueFamilyPropertyCount = pQueueFamilyProperties.Length; + GetQueueFamilyProperties(handle, ref pQueueFamilyPropertyCount, pQueueFamilyProperties); + } + + /// + /// vkGetPhysicalDeviceMemoryProperties - Reports memory information for the specified physical device + /// + /// + /// + /// To query memory properties, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetPhysicalDeviceMemoryProperties( + /// VkPhysicalDevice physicalDevice, + /// VkPhysicalDeviceMemoryProperties* pMemoryProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMemoryProperties( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceMemoryProperties pMemoryProperties + ) + { + fixed (VkPhysicalDeviceMemoryProperties* pMemoryPropertiesFixed = &pMemoryProperties) + { + handle.PInvoke.vkGetPhysicalDeviceMemoryProperties.Invoke(handle.Handle, pMemoryPropertiesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceMemoryProperties. + public static VkPhysicalDeviceMemoryProperties GetMemoryProperties( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceMemoryProperties outValue = new(); + GetMemoryProperties(handle, ref outValue); + return outValue; + } + + /// + /// vkGetInstanceProcAddr - Return a function pointer for a command + /// + /// + /// + /// Function pointers for all Vulkan commands can be obtained by calling: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// PFN_vkVoidFunction vkGetInstanceProcAddr( + /// VkInstance instance, + /// const char* pName); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe PfnVkVoidFunction GetProcAddr( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pName + ) + { + fixed (byte* pNameFixed = pName) + { + return handle.PInvoke.vkGetInstanceProcAddr.Invoke(handle.Handle, pNameFixed); + } + } + + /// + /// vkCreateDevice - Create a new device instance + /// + /// + /// + /// A logical device is created as a connection to a physical device. + /// To create a logical device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateDevice( + /// VkPhysicalDevice physicalDevice, + /// const VkDeviceCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDevice* pDevice); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe VkDevice CreateDeviceInternal( + this VulkanHandleWrapper handle, + in VkDeviceCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDeviceCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkDevice pDeviceLocal = default; + VkResult result = handle.PInvoke.vkCreateDevice.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pDeviceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorExtensionNotPresent: + throw new VkResultError( + VkResult.ErrorExtensionNotPresent, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_EXTENSION_NOT_PRESENT" + ); + case VkResult.ErrorFeatureNotPresent: + throw new VkResultError( + VkResult.ErrorFeatureNotPresent, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_FEATURE_NOT_PRESENT" + ); + case VkResult.ErrorTooManyObjects: + throw new VkResultError( + VkResult.ErrorTooManyObjects, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_TOO_MANY_OBJECTS" + ); + case VkResult.ErrorDeviceLost: + throw new VkResultError( + VkResult.ErrorDeviceLost, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_DEVICE_LOST" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDevice failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pDeviceLocal; + } + } + + /// + /// vkEnumerateDeviceExtensionProperties - Returns properties of available physical device extensions + /// + /// + /// + /// :refpage: vkEnumerateDeviceExtensionProperties + /// + /// + /// To query the extensions available to a given physical device, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumerateDeviceExtensionProperties( + /// VkPhysicalDevice physicalDevice, + /// const char* pLayerName, + /// uint32_t* pPropertyCount, + /// VkExtensionProperties* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumerateDeviceExtensionProperties( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pLayerName, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkExtensionProperties* pPropertiesFixed = pProperties) + fixed (byte* pLayerNameFixed = pLayerName) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkEnumerateDeviceExtensionProperties.Invoke( + handle.Handle, + pLayerNameFixed, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumerateDeviceExtensionProperties failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumerateDeviceExtensionProperties failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorLayerNotPresent: + throw new VkResultError( + VkResult.ErrorLayerNotPresent, + "Vulkan call to vkEnumerateDeviceExtensionProperties failed with error: VK_ERROR_LAYER_NOT_PRESENT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumerateDeviceExtensionProperties failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumerateDeviceExtensionProperties failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumerateDeviceExtensionProperties_Count( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pLayerName + ) + { + int pPropertyCount = default; + EnumerateDeviceExtensionProperties(handle, pLayerName, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumerateDeviceExtensionProperties_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pLayerName, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return EnumerateDeviceExtensionProperties(handle, pLayerName, ref pPropertyCount, pProperties); + } + + /// + /// vkEnumerateDeviceLayerProperties - Returns properties of available physical device layers + /// + /// + /// + /// :refpage: vkEnumerateDeviceLayerProperties + /// + /// + /// To enumerate device layers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumerateDeviceLayerProperties( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkLayerProperties* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumerateDeviceLayerProperties( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkLayerProperties* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkEnumerateDeviceLayerProperties.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumerateDeviceLayerProperties failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumerateDeviceLayerProperties failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumerateDeviceLayerProperties failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumerateDeviceLayerProperties failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumerateDeviceLayerProperties_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + EnumerateDeviceLayerProperties(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumerateDeviceLayerProperties_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return EnumerateDeviceLayerProperties(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceSparseImageFormatProperties - Retrieve properties of an image format applied to sparse images + /// + /// + /// + /// vkGetPhysicalDeviceSparseImageFormatProperties returns an array of + /// VkSparseImageFormatProperties. + /// Each element describes properties for one set of image aspects that are + /// bound simultaneously for a VkImage created with the provided image + /// creation parameters. + /// This is usually one element for each aspect in the image, but for + /// interleaved depth/stencil images there is only one element describing the + /// combined aspects. + /// + /// + /// // Provided by VK_VERSION_1_0 + /// void vkGetPhysicalDeviceSparseImageFormatProperties( + /// VkPhysicalDevice physicalDevice, + /// VkFormat format, + /// VkImageType type, + /// VkSampleCountFlagBits samples, + /// VkImageUsageFlags usage, + /// VkImageTiling tiling, + /// uint32_t* pPropertyCount, + /// VkSparseImageFormatProperties* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetSparseImageFormatProperties( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkSampleCountFlags samples, + VkImageUsageFlags usage, + VkImageTiling tiling, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkSparseImageFormatProperties* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + handle.PInvoke.vkGetPhysicalDeviceSparseImageFormatProperties.Invoke( + handle.Handle, + format, + type, + samples, + usage, + tiling, + pPropertyCountFixed, + pPropertiesFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetSparseImageFormatProperties_Count( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkSampleCountFlags samples, + VkImageUsageFlags usage, + VkImageTiling tiling + ) + { + int pPropertyCount = default; + GetSparseImageFormatProperties(handle, format, type, samples, usage, tiling, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetSparseImageFormatProperties_Write( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkSampleCountFlags samples, + VkImageUsageFlags usage, + VkImageTiling tiling, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + GetSparseImageFormatProperties( + handle, + format, + type, + samples, + usage, + tiling, + ref pPropertyCount, + pProperties + ); + } + + /// + /// vkEnumeratePhysicalDeviceGroups - Enumerates groups of physical devices that can be used to create a single logical device + /// + /// + /// + /// To retrieve a list of the device groups present in the system, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumeratePhysicalDeviceGroups( + this VulkanHandleWrapper handle, + ref int pPhysicalDeviceGroupCount, + scoped ReadOnlySpan pPhysicalDeviceGroupProperties + ) + { + fixed ( + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupPropertiesFixed = pPhysicalDeviceGroupProperties + ) + fixed (int* pPhysicalDeviceGroupCountFixed = &pPhysicalDeviceGroupCount) + { + VkResult result = handle.PInvoke.vkEnumeratePhysicalDeviceGroups.Invoke( + handle.Handle, + pPhysicalDeviceGroupCountFixed, + pPhysicalDeviceGroupPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumeratePhysicalDeviceGroups failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumeratePhysicalDeviceGroups failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceGroups failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumeratePhysicalDeviceGroups failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceGroups failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumeratePhysicalDeviceGroups_Count( + this VulkanHandleWrapper handle + ) + { + int pPhysicalDeviceGroupCount = default; + EnumeratePhysicalDeviceGroups(handle, ref pPhysicalDeviceGroupCount, null); + return pPhysicalDeviceGroupCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumeratePhysicalDeviceGroups_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pPhysicalDeviceGroupProperties + ) + { + int pPhysicalDeviceGroupCount = pPhysicalDeviceGroupProperties.Length; + return EnumeratePhysicalDeviceGroups(handle, ref pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + } + + /// + /// vkGetPhysicalDeviceFeatures2 - Reports capabilities of a physical device + /// + /// + /// + /// To query supported features defined by the core or extensions, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFeatures2( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceFeatures2 pFeatures + ) + { + fixed (VkPhysicalDeviceFeatures2* pFeaturesFixed = &pFeatures) + { + handle.PInvoke.vkGetPhysicalDeviceFeatures2.Invoke(handle.Handle, pFeaturesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceFeatures2. + public static VkPhysicalDeviceFeatures2 GetFeatures2( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceFeatures2 outValue = new(); + GetFeatures2(handle, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceProperties2 - Returns properties of a physical device + /// + /// + /// + /// To query general properties of physical devices once enumerated, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProperties2( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceProperties2 pProperties + ) + { + fixed (VkPhysicalDeviceProperties2* pPropertiesFixed = &pProperties) + { + handle.PInvoke.vkGetPhysicalDeviceProperties2.Invoke(handle.Handle, pPropertiesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceProperties2. + public static VkPhysicalDeviceProperties2 GetProperties2( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceProperties2 outValue = new(); + GetProperties2(handle, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceFormatProperties2 - Lists physical device&apos;s format capabilities + /// + /// + /// + /// To query supported format features which are properties of the physical + /// device, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFormatProperties2( + this VulkanHandleWrapper handle, + VkFormat format, + ref VkFormatProperties2 pFormatProperties + ) + { + fixed (VkFormatProperties2* pFormatPropertiesFixed = &pFormatProperties) + { + handle.PInvoke.vkGetPhysicalDeviceFormatProperties2.Invoke( + handle.Handle, + format, + pFormatPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkFormatProperties2. + public static VkFormatProperties2 GetFormatProperties2( + this VulkanHandleWrapper handle, + VkFormat format + ) + { + VkFormatProperties2 outValue = new(); + GetFormatProperties2(handle, format, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceImageFormatProperties2 - Lists physical device&apos;s image format capabilities + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceImageFormatProperties2 + /// + /// + /// To query additional capabilities specific to image types, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetImageFormatProperties2( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceImageFormatInfo2 pImageFormatInfo, + ref VkImageFormatProperties2 pImageFormatProperties + ) + { + fixed (VkImageFormatProperties2* pImageFormatPropertiesFixed = &pImageFormatProperties) + fixed (VkPhysicalDeviceImageFormatInfo2* pImageFormatInfoFixed = &pImageFormatInfo) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceImageFormatProperties2.Invoke( + handle.Handle, + pImageFormatInfoFixed, + pImageFormatPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorFormatNotSupported: + throw new VkResultError( + VkResult.ErrorFormatNotSupported, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_FORMAT_NOT_SUPPORTED" + ); + case VkResult.ErrorImageUsageNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorImageUsageNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileOperationNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileOperationNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileFormatNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileFormatNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoPictureLayoutNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoPictureLayoutNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileCodecNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileCodecNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceImageFormatProperties2 failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkImageFormatProperties2. + public static VkImageFormatProperties2 GetImageFormatProperties2( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceImageFormatInfo2 pImageFormatInfo + ) + { + VkImageFormatProperties2 outValue = new(); + GetImageFormatProperties2(handle, pImageFormatInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceQueueFamilyProperties2 - Reports properties of the queues of the specified physical device + /// + /// + /// + /// To query properties of queues available on a physical device, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetQueueFamilyProperties2( + this VulkanHandleWrapper handle, + ref int pQueueFamilyPropertyCount, + scoped ReadOnlySpan pQueueFamilyProperties + ) + { + fixed (VkQueueFamilyProperties2* pQueueFamilyPropertiesFixed = pQueueFamilyProperties) + fixed (int* pQueueFamilyPropertyCountFixed = &pQueueFamilyPropertyCount) + { + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyProperties2.Invoke( + handle.Handle, + pQueueFamilyPropertyCountFixed, + pQueueFamilyPropertiesFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetQueueFamilyProperties2_Count( + this VulkanHandleWrapper handle + ) + { + int pQueueFamilyPropertyCount = default; + GetQueueFamilyProperties2(handle, ref pQueueFamilyPropertyCount, null); + return pQueueFamilyPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetQueueFamilyProperties2_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pQueueFamilyProperties + ) + { + int pQueueFamilyPropertyCount = pQueueFamilyProperties.Length; + GetQueueFamilyProperties2(handle, ref pQueueFamilyPropertyCount, pQueueFamilyProperties); + } + + /// + /// vkGetPhysicalDeviceMemoryProperties2 - Reports memory information for the specified physical device + /// + /// + /// + /// To query memory properties, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMemoryProperties2( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceMemoryProperties2 pMemoryProperties + ) + { + fixed (VkPhysicalDeviceMemoryProperties2* pMemoryPropertiesFixed = &pMemoryProperties) + { + handle.PInvoke.vkGetPhysicalDeviceMemoryProperties2.Invoke(handle.Handle, pMemoryPropertiesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceMemoryProperties2. + public static VkPhysicalDeviceMemoryProperties2 GetMemoryProperties2( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceMemoryProperties2 outValue = new(); + GetMemoryProperties2(handle, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceSparseImageFormatProperties2 - Retrieve properties of an image format applied to sparse images + /// + /// + /// + /// vkGetPhysicalDeviceSparseImageFormatProperties2 returns an array of + /// VkSparseImageFormatProperties2. + /// Each element describes properties for one set of image aspects that are + /// bound simultaneously for a VkImage created with the provided image + /// creation parameters. + /// This is usually one element for each aspect in the image, but for + /// interleaved depth/stencil images there is only one element describing the + /// combined aspects. + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void GetSparseImageFormatProperties2( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSparseImageFormatInfo2 pFormatInfo, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkSparseImageFormatProperties2* pPropertiesFixed = pProperties) + fixed (VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfoFixed = &pFormatInfo) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + handle.PInvoke.vkGetPhysicalDeviceSparseImageFormatProperties2.Invoke( + handle.Handle, + pFormatInfoFixed, + pPropertyCountFixed, + pPropertiesFixed + ); + } + } + + /// Queries the required length. + /// The required length. + public static int GetSparseImageFormatProperties2_Count( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSparseImageFormatInfo2 pFormatInfo + ) + { + int pPropertyCount = default; + GetSparseImageFormatProperties2(handle, pFormatInfo, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static void GetSparseImageFormatProperties2_Write( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSparseImageFormatInfo2 pFormatInfo, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + GetSparseImageFormatProperties2(handle, pFormatInfo, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceExternalBufferProperties - Query external handle types supported by buffers + /// + /// + /// + /// To query the external handle types supported by buffers, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalBufferProperties( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalBufferInfo pExternalBufferInfo, + ref VkExternalBufferProperties pExternalBufferProperties + ) + { + fixed (VkExternalBufferProperties* pExternalBufferPropertiesFixed = &pExternalBufferProperties) + fixed (VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfoFixed = &pExternalBufferInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalBufferProperties.Invoke( + handle.Handle, + pExternalBufferInfoFixed, + pExternalBufferPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalBufferProperties. + public static VkExternalBufferProperties GetExternalBufferProperties( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalBufferInfo pExternalBufferInfo + ) + { + VkExternalBufferProperties outValue = new(); + GetExternalBufferProperties(handle, pExternalBufferInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceExternalFenceProperties - Function for querying external fence handle capabilities. + /// + /// + /// + /// Fences may: support import and export of their + /// payload^ to external handles. + /// To query the external handle types supported by fences, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalFenceProperties( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalFenceInfo pExternalFenceInfo, + ref VkExternalFenceProperties pExternalFenceProperties + ) + { + fixed (VkExternalFenceProperties* pExternalFencePropertiesFixed = &pExternalFenceProperties) + fixed (VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfoFixed = &pExternalFenceInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalFenceProperties.Invoke( + handle.Handle, + pExternalFenceInfoFixed, + pExternalFencePropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalFenceProperties. + public static VkExternalFenceProperties GetExternalFenceProperties( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalFenceInfo pExternalFenceInfo + ) + { + VkExternalFenceProperties outValue = new(); + GetExternalFenceProperties(handle, pExternalFenceInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceExternalSemaphoreProperties - Function for querying external semaphore handle capabilities. + /// + /// + /// + /// Semaphores may: support import and export of their + /// payload^ to external handles. + /// To query the external handle types supported by semaphores, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalSemaphoreProperties( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalSemaphoreInfo pExternalSemaphoreInfo, + ref VkExternalSemaphoreProperties pExternalSemaphoreProperties + ) + { + fixed (VkExternalSemaphoreProperties* pExternalSemaphorePropertiesFixed = &pExternalSemaphoreProperties) + fixed (VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfoFixed = &pExternalSemaphoreInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalSemaphoreProperties.Invoke( + handle.Handle, + pExternalSemaphoreInfoFixed, + pExternalSemaphorePropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalSemaphoreProperties. + public static VkExternalSemaphoreProperties GetExternalSemaphoreProperties( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalSemaphoreInfo pExternalSemaphoreInfo + ) + { + VkExternalSemaphoreProperties outValue = new(); + GetExternalSemaphoreProperties(handle, pExternalSemaphoreInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceToolProperties - Reports properties of tools active on the specified physical device + /// + /// + /// + /// Information about tools providing debugging, profiling, or similar services, + /// active for a given physical device, can be obtained by calling: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetToolProperties( + this VulkanHandleWrapper handle, + ref int pToolCount, + scoped ReadOnlySpan pToolProperties + ) + { + fixed (VkPhysicalDeviceToolProperties* pToolPropertiesFixed = pToolProperties) + fixed (int* pToolCountFixed = &pToolCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceToolProperties.Invoke( + handle.Handle, + pToolCountFixed, + pToolPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceToolProperties failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceToolProperties failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceToolProperties failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetToolProperties_Count( + this VulkanHandleWrapper handle + ) + { + int pToolCount = default; + GetToolProperties(handle, ref pToolCount, null); + return pToolCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetToolProperties_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pToolProperties + ) + { + int pToolCount = pToolProperties.Length; + return GetToolProperties(handle, ref pToolCount, pToolProperties); + } + + /// + /// vkDestroySurfaceKHR - Destroy a VkSurfaceKHR object + /// + /// + /// + /// To destroy a VkSurfaceKHR object, call: + /// + /// + /// // Provided by VK_KHR_surface + /// void vkDestroySurfaceKHR( + /// VkInstance instance, + /// VkSurfaceKHR surface, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroySurfaceKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroySurfaceKHR.Invoke(handle.Handle, surface, pAllocator); + } + + /// + /// vkGetPhysicalDeviceSurfaceSupportKHR - Query if presentation is supported + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfaceSupportKHR + /// + /// + /// To determine whether a queue family of a physical device supports + /// presentation to a given surface, call: + /// + /// + /// // Provided by VK_KHR_surface + /// VkResult vkGetPhysicalDeviceSurfaceSupportKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// VkSurfaceKHR surface, + /// VkBool32* pSupported); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe Brutal.Bool32 GetSurfaceSupportKHR( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + VkSurfaceKHR surface + ) + { + Brutal.Bool32 pSupportedLocal = default; + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfaceSupportKHR.Invoke( + handle.Handle, + queueFamilyIndex, + surface, + &pSupportedLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceSupportKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceSupportKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfaceSupportKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfaceSupportKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfaceSupportKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSupportedLocal; + } + + /// + /// vkGetPhysicalDeviceSurfaceCapabilitiesKHR - Query surface capabilities + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfaceCapabilitiesKHR + /// + /// + /// To query the basic capabilities of a surface, needed in order to create a + /// swapchain, call: + /// + /// + /// // Provided by VK_KHR_surface + /// VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( + /// VkPhysicalDevice physicalDevice, + /// VkSurfaceKHR surface, + /// VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSurfaceCapabilitiesKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + ref VkSurfaceCapabilitiesKHR pSurfaceCapabilities + ) + { + fixed (VkSurfaceCapabilitiesKHR* pSurfaceCapabilitiesFixed = &pSurfaceCapabilities) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfaceCapabilitiesKHR.Invoke( + handle.Handle, + surface, + pSurfaceCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSurfaceCapabilitiesKHR. + public static VkSurfaceCapabilitiesKHR GetSurfaceCapabilitiesKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface + ) + { + VkSurfaceCapabilitiesKHR outValue = new(); + GetSurfaceCapabilitiesKHR(handle, surface, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceSurfaceFormatsKHR - Query color formats supported by surface + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfaceFormatsKHR + /// + /// + /// To query the supported swapchain format-color space pairs for a surface, + /// call: + /// + /// + /// // Provided by VK_KHR_surface + /// VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( + /// VkPhysicalDevice physicalDevice, + /// VkSurfaceKHR surface, + /// uint32_t* pSurfaceFormatCount, + /// VkSurfaceFormatKHR* pSurfaceFormats); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetSurfaceFormatsKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + ref int pSurfaceFormatCount, + scoped ReadOnlySpan pSurfaceFormats + ) + { + fixed (VkSurfaceFormatKHR* pSurfaceFormatsFixed = pSurfaceFormats) + fixed (int* pSurfaceFormatCountFixed = &pSurfaceFormatCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfaceFormatsKHR.Invoke( + handle.Handle, + surface, + pSurfaceFormatCountFixed, + pSurfaceFormatsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormatsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormatsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormatsKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormatsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormatsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetSurfaceFormatsKHR_Count( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface + ) + { + int pSurfaceFormatCount = default; + GetSurfaceFormatsKHR(handle, surface, ref pSurfaceFormatCount, null); + return pSurfaceFormatCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetSurfaceFormatsKHR_Write( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + scoped ReadOnlySpan pSurfaceFormats + ) + { + int pSurfaceFormatCount = pSurfaceFormats.Length; + return GetSurfaceFormatsKHR(handle, surface, ref pSurfaceFormatCount, pSurfaceFormats); + } + + /// + /// vkGetPhysicalDeviceSurfacePresentModesKHR - Query supported presentation modes + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfacePresentModesKHR + /// + /// + /// To query the supported presentation modes for a surface, call: + /// + /// + /// // Provided by VK_KHR_surface + /// VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( + /// VkPhysicalDevice physicalDevice, + /// VkSurfaceKHR surface, + /// uint32_t* pPresentModeCount, + /// VkPresentModeKHR* pPresentModes); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetSurfacePresentModesKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + ref int pPresentModeCount, + scoped ReadOnlySpan pPresentModes + ) + { + fixed (VkPresentModeKHR* pPresentModesFixed = pPresentModes) + fixed (int* pPresentModeCountFixed = &pPresentModeCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfacePresentModesKHR.Invoke( + handle.Handle, + surface, + pPresentModeCountFixed, + pPresentModesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModesKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfacePresentModesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetSurfacePresentModesKHR_Count( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface + ) + { + int pPresentModeCount = default; + GetSurfacePresentModesKHR(handle, surface, ref pPresentModeCount, null); + return pPresentModeCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetSurfacePresentModesKHR_Write( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + scoped ReadOnlySpan pPresentModes + ) + { + int pPresentModeCount = pPresentModes.Length; + return GetSurfacePresentModesKHR(handle, surface, ref pPresentModeCount, pPresentModes); + } + + /// + /// vkGetPhysicalDevicePresentRectanglesKHR - Query present rectangles for a surface on a physical device + /// + /// + /// + /// :refpage: vkGetPhysicalDevicePresentRectanglesKHR + /// + /// + /// When using VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR, + /// the application may: need to know which regions of the surface are used when + /// presenting locally on each physical device. + /// Presentation of swapchain images to this surface need only have valid + /// contents in the regions returned by this command. + /// + /// + /// To query a set of rectangles used in presentation on the physical device, + /// call: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface + /// VkResult vkGetPhysicalDevicePresentRectanglesKHR( + /// VkPhysicalDevice physicalDevice, + /// VkSurfaceKHR surface, + /// uint32_t* pRectCount, + /// VkRect2D* pRects); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetPresentRectanglesKHR( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + ref int pRectCount, + scoped ReadOnlySpan pRects + ) + { + fixed (VkRect2D* pRectsFixed = pRects) + fixed (int* pRectCountFixed = &pRectCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDevicePresentRectanglesKHR.Invoke( + handle.Handle, + surface, + pRectCountFixed, + pRectsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDevicePresentRectanglesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDevicePresentRectanglesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDevicePresentRectanglesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDevicePresentRectanglesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetPresentRectanglesKHR_Count( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface + ) + { + int pRectCount = default; + GetPresentRectanglesKHR(handle, surface, ref pRectCount, null); + return pRectCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetPresentRectanglesKHR_Write( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + scoped ReadOnlySpan pRects + ) + { + int pRectCount = pRects.Length; + return GetPresentRectanglesKHR(handle, surface, ref pRectCount, pRects); + } + + /// + /// vkGetPhysicalDeviceDisplayPropertiesKHR - Query information about the available displays + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceDisplayPropertiesKHR + /// + /// + /// Various functions are provided for enumerating the available display devices + /// present on a Vulkan physical device. + /// To query information about the available displays, call: + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkDisplayPropertiesKHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayPropertiesKHR( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDisplayPropertiesKHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceDisplayPropertiesKHR.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayPropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceDisplayPropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceDisplayPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayPropertiesKHR_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetDisplayPropertiesKHR(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayPropertiesKHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetDisplayPropertiesKHR(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceDisplayPlanePropertiesKHR - Query the plane properties + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceDisplayPlanePropertiesKHR + /// + /// + /// Images are presented to individual planes on a display. + /// Devices must support at least one plane on each display. + /// Planes can be stacked and blended to composite multiple images on one + /// display. + /// Devices may: support only a fixed stacking order and fixed mapping between + /// planes and displays, or they may: allow arbitrary application-specified + /// stacking orders and mappings between planes and displays. + /// To query the properties of device display planes, call: + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkDisplayPlanePropertiesKHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayPlanePropertiesKHR( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDisplayPlanePropertiesKHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceDisplayPlanePropertiesKHR.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayPlanePropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayPlanePropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceDisplayPlanePropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceDisplayPlanePropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayPlanePropertiesKHR_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetDisplayPlanePropertiesKHR(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayPlanePropertiesKHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetDisplayPlanePropertiesKHR(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetDisplayPlaneSupportedDisplaysKHR - Query the list of displays a plane supports + /// + /// + /// + /// :refpage: vkGetDisplayPlaneSupportedDisplaysKHR + /// + /// + /// To determine which displays a plane is usable with, call + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkGetDisplayPlaneSupportedDisplaysKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t planeIndex, + /// uint32_t* pDisplayCount, + /// VkDisplayKHR* pDisplays); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayPlaneSupportedDisplaysKHR( + this VulkanHandleWrapper handle, + int planeIndex, + ref int pDisplayCount, + scoped ReadOnlySpan pDisplays + ) + { + fixed (VkDisplayKHR* pDisplaysFixed = pDisplays) + fixed (int* pDisplayCountFixed = &pDisplayCount) + { + VkResult result = handle.PInvoke.vkGetDisplayPlaneSupportedDisplaysKHR.Invoke( + handle.Handle, + planeIndex, + pDisplayCountFixed, + pDisplaysFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDisplayPlaneSupportedDisplaysKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDisplayPlaneSupportedDisplaysKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDisplayPlaneSupportedDisplaysKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDisplayPlaneSupportedDisplaysKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayPlaneSupportedDisplaysKHR_Count( + this VulkanHandleWrapper handle, + int planeIndex + ) + { + int pDisplayCount = default; + GetDisplayPlaneSupportedDisplaysKHR(handle, planeIndex, ref pDisplayCount, null); + return pDisplayCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayPlaneSupportedDisplaysKHR_Write( + this VulkanHandleWrapper handle, + int planeIndex, + scoped ReadOnlySpan pDisplays + ) + { + int pDisplayCount = pDisplays.Length; + return GetDisplayPlaneSupportedDisplaysKHR(handle, planeIndex, ref pDisplayCount, pDisplays); + } + + /// + /// vkGetDisplayModePropertiesKHR - Query the set of mode properties supported by the display + /// + /// + /// + /// :refpage: vkGetDisplayModePropertiesKHR + /// + /// + /// Each display has one or more supported modes associated with it by default. + /// These built-in modes are queried by calling: + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkGetDisplayModePropertiesKHR( + /// VkPhysicalDevice physicalDevice, + /// VkDisplayKHR display, + /// uint32_t* pPropertyCount, + /// VkDisplayModePropertiesKHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayModePropertiesKHR( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDisplayModePropertiesKHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetDisplayModePropertiesKHR.Invoke( + handle.Handle, + display, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDisplayModePropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDisplayModePropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDisplayModePropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDisplayModePropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayModePropertiesKHR_Count( + this VulkanHandleWrapper handle, + VkDisplayKHR display + ) + { + int pPropertyCount = default; + GetDisplayModePropertiesKHR(handle, display, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayModePropertiesKHR_Write( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetDisplayModePropertiesKHR(handle, display, ref pPropertyCount, pProperties); + } + + /// + /// vkCreateDisplayModeKHR - Create a display mode + /// + /// + /// + /// :refpage: vkCreateDisplayModeKHR + /// + /// + /// Additional modes may: also be created by calling: + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkCreateDisplayModeKHR( + /// VkPhysicalDevice physicalDevice, + /// VkDisplayKHR display, + /// const VkDisplayModeCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDisplayModeKHR* pMode); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDisplayModeKHR CreateDisplayModeKHR( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + in VkDisplayModeCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDisplayModeCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkDisplayModeKHR pModeLocal = default; + VkResult result = handle.PInvoke.vkCreateDisplayModeKHR.Invoke( + handle.Handle, + display, + pCreateInfoFixed, + pAllocator, + &pModeLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDisplayModeKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDisplayModeKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateDisplayModeKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDisplayModeKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDisplayModeKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pModeLocal; + } + } + + /// + /// vkGetDisplayPlaneCapabilitiesKHR - Query capabilities of a mode and plane combination + /// + /// + /// + /// :refpage: vkGetDisplayPlaneCapabilitiesKHR + /// + /// + /// Applications that wish to present directly to a display must select which + /// layer, or "`plane`" of the display they wish to target, and a mode to use + /// with the display. + /// Each display supports at least one plane. + /// The capabilities of a given mode and plane combination are determined by + /// calling: + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkGetDisplayPlaneCapabilitiesKHR( + /// VkPhysicalDevice physicalDevice, + /// VkDisplayModeKHR mode, + /// uint32_t planeIndex, + /// VkDisplayPlaneCapabilitiesKHR* pCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDisplayPlaneCapabilitiesKHR( + this VulkanHandleWrapper handle, + VkDisplayModeKHR mode, + int planeIndex, + ref VkDisplayPlaneCapabilitiesKHR pCapabilities + ) + { + fixed (VkDisplayPlaneCapabilitiesKHR* pCapabilitiesFixed = &pCapabilities) + { + VkResult result = handle.PInvoke.vkGetDisplayPlaneCapabilitiesKHR.Invoke( + handle.Handle, + mode, + planeIndex, + pCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDisplayPlaneCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDisplayPlaneCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDisplayPlaneCapabilitiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDisplayPlaneCapabilitiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkDisplayPlaneCapabilitiesKHR. + public static VkDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR( + this VulkanHandleWrapper handle, + VkDisplayModeKHR mode, + int planeIndex + ) + { + VkDisplayPlaneCapabilitiesKHR outValue = new(); + GetDisplayPlaneCapabilitiesKHR(handle, mode, planeIndex, ref outValue); + return outValue; + } + + /// + /// vkCreateDisplayPlaneSurfaceKHR - Create a <c>VkSurfaceKHR</c> structure representing a display plane and mode + /// + /// + /// + /// :refpage: vkCreateDisplayPlaneSurfaceKHR + /// + /// + /// A complete display configuration includes a mode, one or more display planes + /// and any parameters describing their behavior, and parameters describing some + /// aspects of the images associated with those planes. + /// Display surfaces describe the configuration of a single plane within a + /// complete display configuration. + /// To create a VkSurfaceKHR object for a display plane, call: + /// + /// + /// // Provided by VK_KHR_display + /// VkResult vkCreateDisplayPlaneSurfaceKHR( + /// VkInstance instance, + /// const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkSurfaceKHR CreateDisplayPlaneSurfaceKHR( + this VulkanHandleWrapper handle, + in VkDisplaySurfaceCreateInfoKHR pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDisplaySurfaceCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateDisplayPlaneSurfaceKHR.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDisplayPlaneSurfaceKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateDisplayPlaneSurfaceKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDisplayPlaneSurfaceKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDisplayPlaneSurfaceKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSurfaceLocal; + } + } + + /// + /// vkGetPhysicalDeviceVideoCapabilitiesKHR - Query video coding capabilities + /// + /// + /// + /// To query video coding capabilities for a specific video profile, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkGetPhysicalDeviceVideoCapabilitiesKHR( + /// VkPhysicalDevice physicalDevice, + /// const VkVideoProfileInfoKHR* pVideoProfile, + /// VkVideoCapabilitiesKHR* pCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetVideoCapabilitiesKHR( + this VulkanHandleWrapper handle, + VkVideoProfileInfoKHR* pVideoProfile, + ref VkVideoCapabilitiesKHR pCapabilities + ) + { + fixed (VkVideoCapabilitiesKHR* pCapabilitiesFixed = &pCapabilities) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceVideoCapabilitiesKHR.Invoke( + handle.Handle, + pVideoProfile, + pCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorVideoProfileOperationNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileOperationNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileFormatNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileFormatNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoPictureLayoutNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoPictureLayoutNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileCodecNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileCodecNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceVideoCapabilitiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkVideoCapabilitiesKHR. + public static unsafe VkVideoCapabilitiesKHR GetVideoCapabilitiesKHR( + this VulkanHandleWrapper handle, + VkVideoProfileInfoKHR* pVideoProfile + ) + { + VkVideoCapabilitiesKHR outValue = new(); + GetVideoCapabilitiesKHR(handle, pVideoProfile, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceVideoFormatPropertiesKHR - Query supported video decode and encode image formats and capabilities + /// + /// + /// + /// To enumerate the supported video formats and corresponding capabilities for + /// a specific video profile, call: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VkResult vkGetPhysicalDeviceVideoFormatPropertiesKHR( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + /// uint32_t* pVideoFormatPropertyCount, + /// VkVideoFormatPropertiesKHR* pVideoFormatProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetVideoFormatPropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceVideoFormatInfoKHR pVideoFormatInfo, + ref int pVideoFormatPropertyCount, + scoped ReadOnlySpan pVideoFormatProperties + ) + { + fixed (VkVideoFormatPropertiesKHR* pVideoFormatPropertiesFixed = pVideoFormatProperties) + fixed (VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfoFixed = &pVideoFormatInfo) + fixed (int* pVideoFormatPropertyCountFixed = &pVideoFormatPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceVideoFormatPropertiesKHR.Invoke( + handle.Handle, + pVideoFormatInfoFixed, + pVideoFormatPropertyCountFixed, + pVideoFormatPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorImageUsageNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorImageUsageNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileOperationNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileOperationNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileFormatNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileFormatNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoPictureLayoutNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoPictureLayoutNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileCodecNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileCodecNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceVideoFormatPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetVideoFormatPropertiesKHR_Count( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceVideoFormatInfoKHR pVideoFormatInfo + ) + { + int pVideoFormatPropertyCount = default; + GetVideoFormatPropertiesKHR(handle, pVideoFormatInfo, ref pVideoFormatPropertyCount, null); + return pVideoFormatPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetVideoFormatPropertiesKHR_Write( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceVideoFormatInfoKHR pVideoFormatInfo, + scoped ReadOnlySpan pVideoFormatProperties + ) + { + int pVideoFormatPropertyCount = pVideoFormatProperties.Length; + return GetVideoFormatPropertiesKHR( + handle, + pVideoFormatInfo, + ref pVideoFormatPropertyCount, + pVideoFormatProperties + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFeatures2KHR( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceFeatures2 pFeatures + ) + { + fixed (VkPhysicalDeviceFeatures2* pFeaturesFixed = &pFeatures) + { + handle.PInvoke.vkGetPhysicalDeviceFeatures2KHR.Invoke(handle.Handle, pFeaturesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceFeatures2. + public static VkPhysicalDeviceFeatures2 GetFeatures2KHR( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceFeatures2 outValue = new(); + GetFeatures2KHR(handle, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetProperties2KHR( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceProperties2 pProperties + ) + { + fixed (VkPhysicalDeviceProperties2* pPropertiesFixed = &pProperties) + { + handle.PInvoke.vkGetPhysicalDeviceProperties2KHR.Invoke(handle.Handle, pPropertiesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceProperties2. + public static VkPhysicalDeviceProperties2 GetProperties2KHR( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceProperties2 outValue = new(); + GetProperties2KHR(handle, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetFormatProperties2KHR( + this VulkanHandleWrapper handle, + VkFormat format, + ref VkFormatProperties2 pFormatProperties + ) + { + fixed (VkFormatProperties2* pFormatPropertiesFixed = &pFormatProperties) + { + handle.PInvoke.vkGetPhysicalDeviceFormatProperties2KHR.Invoke( + handle.Handle, + format, + pFormatPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkFormatProperties2. + public static VkFormatProperties2 GetFormatProperties2KHR( + this VulkanHandleWrapper handle, + VkFormat format + ) + { + VkFormatProperties2 outValue = new(); + GetFormatProperties2KHR(handle, format, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetImageFormatProperties2KHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceImageFormatInfo2 pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties + ) + { + fixed (VkPhysicalDeviceImageFormatInfo2* pImageFormatInfoFixed = &pImageFormatInfo) + { + return handle.PInvoke.vkGetPhysicalDeviceImageFormatProperties2KHR.Invoke( + handle.Handle, + pImageFormatInfoFixed, + pImageFormatProperties + ); + } + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueueFamilyProperties2KHR( + this VulkanHandleWrapper handle, + int* pQueueFamilyPropertyCount, + ref VkQueueFamilyProperties2 pQueueFamilyProperties + ) + { + fixed (VkQueueFamilyProperties2* pQueueFamilyPropertiesFixed = &pQueueFamilyProperties) + { + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyProperties2KHR.Invoke( + handle.Handle, + pQueueFamilyPropertyCount, + pQueueFamilyPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkQueueFamilyProperties2. + public static unsafe VkQueueFamilyProperties2 GetQueueFamilyProperties2KHR( + this VulkanHandleWrapper handle, + int* pQueueFamilyPropertyCount + ) + { + VkQueueFamilyProperties2 outValue = new(); + GetQueueFamilyProperties2KHR(handle, pQueueFamilyPropertyCount, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMemoryProperties2KHR( + this VulkanHandleWrapper handle, + ref VkPhysicalDeviceMemoryProperties2 pMemoryProperties + ) + { + fixed (VkPhysicalDeviceMemoryProperties2* pMemoryPropertiesFixed = &pMemoryProperties) + { + handle.PInvoke.vkGetPhysicalDeviceMemoryProperties2KHR.Invoke(handle.Handle, pMemoryPropertiesFixed); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkPhysicalDeviceMemoryProperties2. + public static VkPhysicalDeviceMemoryProperties2 GetMemoryProperties2KHR( + this VulkanHandleWrapper handle + ) + { + VkPhysicalDeviceMemoryProperties2 outValue = new(); + GetMemoryProperties2KHR(handle, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSparseImageFormatProperties2KHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSparseImageFormatInfo2 pFormatInfo, + int* pPropertyCount, + ref VkSparseImageFormatProperties2 pProperties + ) + { + fixed (VkSparseImageFormatProperties2* pPropertiesFixed = &pProperties) + fixed (VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfoFixed = &pFormatInfo) + { + handle.PInvoke.vkGetPhysicalDeviceSparseImageFormatProperties2KHR.Invoke( + handle.Handle, + pFormatInfoFixed, + pPropertyCount, + pPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSparseImageFormatProperties2. + public static unsafe VkSparseImageFormatProperties2 GetSparseImageFormatProperties2KHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSparseImageFormatInfo2 pFormatInfo, + int* pPropertyCount + ) + { + VkSparseImageFormatProperties2 outValue = new(); + GetSparseImageFormatProperties2KHR(handle, pFormatInfo, pPropertyCount, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult EnumeratePhysicalDeviceGroupsKHR( + this VulkanHandleWrapper handle, + int* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties + ) + { + return handle.PInvoke.vkEnumeratePhysicalDeviceGroupsKHR.Invoke( + handle.Handle, + pPhysicalDeviceGroupCount, + pPhysicalDeviceGroupProperties + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalBufferPropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalBufferInfo pExternalBufferInfo, + ref VkExternalBufferProperties pExternalBufferProperties + ) + { + fixed (VkExternalBufferProperties* pExternalBufferPropertiesFixed = &pExternalBufferProperties) + fixed (VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfoFixed = &pExternalBufferInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalBufferPropertiesKHR.Invoke( + handle.Handle, + pExternalBufferInfoFixed, + pExternalBufferPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalBufferProperties. + public static VkExternalBufferProperties GetExternalBufferPropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalBufferInfo pExternalBufferInfo + ) + { + VkExternalBufferProperties outValue = new(); + GetExternalBufferPropertiesKHR(handle, pExternalBufferInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalSemaphorePropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalSemaphoreInfo pExternalSemaphoreInfo, + ref VkExternalSemaphoreProperties pExternalSemaphoreProperties + ) + { + fixed (VkExternalSemaphoreProperties* pExternalSemaphorePropertiesFixed = &pExternalSemaphoreProperties) + fixed (VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfoFixed = &pExternalSemaphoreInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR.Invoke( + handle.Handle, + pExternalSemaphoreInfoFixed, + pExternalSemaphorePropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalSemaphoreProperties. + public static VkExternalSemaphoreProperties GetExternalSemaphorePropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalSemaphoreInfo pExternalSemaphoreInfo + ) + { + VkExternalSemaphoreProperties outValue = new(); + GetExternalSemaphorePropertiesKHR(handle, pExternalSemaphoreInfo, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalFencePropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalFenceInfo pExternalFenceInfo, + ref VkExternalFenceProperties pExternalFenceProperties + ) + { + fixed (VkExternalFenceProperties* pExternalFencePropertiesFixed = &pExternalFenceProperties) + fixed (VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfoFixed = &pExternalFenceInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalFencePropertiesKHR.Invoke( + handle.Handle, + pExternalFenceInfoFixed, + pExternalFencePropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalFenceProperties. + public static VkExternalFenceProperties GetExternalFencePropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalFenceInfo pExternalFenceInfo + ) + { + VkExternalFenceProperties outValue = new(); + GetExternalFencePropertiesKHR(handle, pExternalFenceInfo, ref outValue); + return outValue; + } + + /// + /// vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR - Reports properties of the performance query counters available on a queue family of a device + /// + /// + /// + /// :refpage: vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR + /// + /// + /// To enumerate the performance query counters available on a queue family of a + /// physical device, call: + /// + /// + /// // Provided by VK_KHR_performance_query + /// VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// uint32_t* pCounterCount, + /// VkPerformanceCounterKHR* pCounters, + /// VkPerformanceCounterDescriptionKHR* pCounterDescriptions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + ref int pCounterCount, + scoped ReadOnlySpan pCounters, + scoped ReadOnlySpan pCounterDescriptions + ) + { + fixed (VkPerformanceCounterDescriptionKHR* pCounterDescriptionsFixed = pCounterDescriptions) + fixed (VkPerformanceCounterKHR* pCountersFixed = pCounters) + fixed (int* pCounterCountFixed = &pCounterCount) + { + VkResult result = handle.PInvoke.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR.Invoke( + handle.Handle, + queueFamilyIndex, + pCounterCountFixed, + pCountersFixed, + pCounterDescriptionsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR_Count( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + scoped ReadOnlySpan pCounterDescriptions + ) + { + int pCounterCount = default; + EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + handle, + queueFamilyIndex, + ref pCounterCount, + null, + pCounterDescriptions + ); + return pCounterCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR_Write( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + scoped ReadOnlySpan pCounters, + scoped ReadOnlySpan pCounterDescriptions + ) + { + int pCounterCount = pCounters.Length; + return EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + handle, + queueFamilyIndex, + ref pCounterCount, + pCounters, + pCounterDescriptions + ); + } + + /// + /// vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR - Reports the number of passes require for a performance query pool type + /// + /// + /// + /// To query the number of passes required to query a performance query pool on + /// a physical device, call: + /// + /// + /// // Provided by VK_KHR_performance_query + /// void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + /// VkPhysicalDevice physicalDevice, + /// const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, + /// uint32_t* pNumPasses); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int GetQueueFamilyPerformanceQueryPassesKHR( + this VulkanHandleWrapper handle, + in VkQueryPoolPerformanceCreateInfoKHR pPerformanceQueryCreateInfo + ) + { + fixed (VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfoFixed = &pPerformanceQueryCreateInfo) + { + int pNumPassesLocal = default; + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR.Invoke( + handle.Handle, + pPerformanceQueryCreateInfoFixed, + &pNumPassesLocal + ); + return pNumPassesLocal; + } + } + + /// + /// vkGetPhysicalDeviceSurfaceCapabilities2KHR - Reports capabilities of a surface on a physical device + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfaceCapabilities2KHR + /// + /// + /// To query the basic capabilities of a surface defined by the core or + /// extensions, call: + /// + /// + /// // Provided by VK_KHR_get_surface_capabilities2 + /// VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + /// VkSurfaceCapabilities2KHR* pSurfaceCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSurfaceCapabilities2KHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo, + ref VkSurfaceCapabilities2KHR pSurfaceCapabilities + ) + { + fixed (VkSurfaceCapabilities2KHR* pSurfaceCapabilitiesFixed = &pSurfaceCapabilities) + fixed (VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfoFixed = &pSurfaceInfo) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfaceCapabilities2KHR.Invoke( + handle.Handle, + pSurfaceInfoFixed, + pSurfaceCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2KHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSurfaceCapabilities2KHR. + public static VkSurfaceCapabilities2KHR GetSurfaceCapabilities2KHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo + ) + { + VkSurfaceCapabilities2KHR outValue = new(); + GetSurfaceCapabilities2KHR(handle, pSurfaceInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceSurfaceFormats2KHR - Query color formats supported by surface + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfaceFormats2KHR + /// + /// + /// To query the supported swapchain format tuples for a surface, call: + /// + /// + /// // Provided by VK_KHR_get_surface_capabilities2 + /// VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + /// uint32_t* pSurfaceFormatCount, + /// VkSurfaceFormat2KHR* pSurfaceFormats); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetSurfaceFormats2KHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo, + ref int pSurfaceFormatCount, + scoped ReadOnlySpan pSurfaceFormats + ) + { + fixed (VkSurfaceFormat2KHR* pSurfaceFormatsFixed = pSurfaceFormats) + fixed (VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfoFixed = &pSurfaceInfo) + fixed (int* pSurfaceFormatCountFixed = &pSurfaceFormatCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfaceFormats2KHR.Invoke( + handle.Handle, + pSurfaceInfoFixed, + pSurfaceFormatCountFixed, + pSurfaceFormatsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormats2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormats2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormats2KHR failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormats2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfaceFormats2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetSurfaceFormats2KHR_Count( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo + ) + { + int pSurfaceFormatCount = default; + GetSurfaceFormats2KHR(handle, pSurfaceInfo, ref pSurfaceFormatCount, null); + return pSurfaceFormatCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetSurfaceFormats2KHR_Write( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo, + scoped ReadOnlySpan pSurfaceFormats + ) + { + int pSurfaceFormatCount = pSurfaceFormats.Length; + return GetSurfaceFormats2KHR(handle, pSurfaceInfo, ref pSurfaceFormatCount, pSurfaceFormats); + } + + /// + /// vkGetPhysicalDeviceDisplayProperties2KHR - Query information about the available displays + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceDisplayProperties2KHR + /// + /// + /// To query information about the available displays, call: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// VkResult vkGetPhysicalDeviceDisplayProperties2KHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkDisplayProperties2KHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayProperties2KHR( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDisplayProperties2KHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceDisplayProperties2KHR.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayProperties2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayProperties2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceDisplayProperties2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceDisplayProperties2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayProperties2KHR_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetDisplayProperties2KHR(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayProperties2KHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetDisplayProperties2KHR(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceDisplayPlaneProperties2KHR - Query information about the available display planes. + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceDisplayPlaneProperties2KHR + /// + /// + /// To query the properties of a device's display planes, call: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkDisplayPlaneProperties2KHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayPlaneProperties2KHR( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDisplayPlaneProperties2KHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceDisplayPlaneProperties2KHR.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayPlaneProperties2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceDisplayPlaneProperties2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceDisplayPlaneProperties2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceDisplayPlaneProperties2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayPlaneProperties2KHR_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetDisplayPlaneProperties2KHR(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayPlaneProperties2KHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetDisplayPlaneProperties2KHR(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetDisplayModeProperties2KHR - Query information about the available display modes. + /// + /// + /// + /// :refpage: vkGetDisplayModeProperties2KHR + /// + /// + /// To query the properties of a device's built-in display modes, call: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// VkResult vkGetDisplayModeProperties2KHR( + /// VkPhysicalDevice physicalDevice, + /// VkDisplayKHR display, + /// uint32_t* pPropertyCount, + /// VkDisplayModeProperties2KHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetDisplayModeProperties2KHR( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkDisplayModeProperties2KHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetDisplayModeProperties2KHR.Invoke( + handle.Handle, + display, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDisplayModeProperties2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDisplayModeProperties2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDisplayModeProperties2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDisplayModeProperties2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetDisplayModeProperties2KHR_Count( + this VulkanHandleWrapper handle, + VkDisplayKHR display + ) + { + int pPropertyCount = default; + GetDisplayModeProperties2KHR(handle, display, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetDisplayModeProperties2KHR_Write( + this VulkanHandleWrapper handle, + VkDisplayKHR display, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetDisplayModeProperties2KHR(handle, display, ref pPropertyCount, pProperties); + } + + /// + /// vkGetDisplayPlaneCapabilities2KHR - Query capabilities of a mode and plane combination + /// + /// + /// + /// :refpage: vkGetDisplayPlaneCapabilities2KHR + /// + /// + /// To query the capabilities of a given mode and plane combination, call: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// VkResult vkGetDisplayPlaneCapabilities2KHR( + /// VkPhysicalDevice physicalDevice, + /// const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + /// VkDisplayPlaneCapabilities2KHR* pCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetDisplayPlaneCapabilities2KHR( + this VulkanHandleWrapper handle, + in VkDisplayPlaneInfo2KHR pDisplayPlaneInfo, + ref VkDisplayPlaneCapabilities2KHR pCapabilities + ) + { + fixed (VkDisplayPlaneCapabilities2KHR* pCapabilitiesFixed = &pCapabilities) + fixed (VkDisplayPlaneInfo2KHR* pDisplayPlaneInfoFixed = &pDisplayPlaneInfo) + { + VkResult result = handle.PInvoke.vkGetDisplayPlaneCapabilities2KHR.Invoke( + handle.Handle, + pDisplayPlaneInfoFixed, + pCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDisplayPlaneCapabilities2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetDisplayPlaneCapabilities2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDisplayPlaneCapabilities2KHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDisplayPlaneCapabilities2KHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkDisplayPlaneCapabilities2KHR. + public static VkDisplayPlaneCapabilities2KHR GetDisplayPlaneCapabilities2KHR( + this VulkanHandleWrapper handle, + in VkDisplayPlaneInfo2KHR pDisplayPlaneInfo + ) + { + VkDisplayPlaneCapabilities2KHR outValue = new(); + GetDisplayPlaneCapabilities2KHR(handle, pDisplayPlaneInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceFragmentShadingRatesKHR - Get available shading rates for a physical device + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceFragmentShadingRatesKHR + /// + /// + /// To query available shading rates, call: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// VkResult vkGetPhysicalDeviceFragmentShadingRatesKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pFragmentShadingRateCount, + /// VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetFragmentShadingRatesKHR( + this VulkanHandleWrapper handle, + ref int pFragmentShadingRateCount, + scoped ReadOnlySpan pFragmentShadingRates + ) + { + fixed (VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRatesFixed = pFragmentShadingRates) + fixed (int* pFragmentShadingRateCountFixed = &pFragmentShadingRateCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceFragmentShadingRatesKHR.Invoke( + handle.Handle, + pFragmentShadingRateCountFixed, + pFragmentShadingRatesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceFragmentShadingRatesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceFragmentShadingRatesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceFragmentShadingRatesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetFragmentShadingRatesKHR_Count( + this VulkanHandleWrapper handle + ) + { + int pFragmentShadingRateCount = default; + GetFragmentShadingRatesKHR(handle, ref pFragmentShadingRateCount, null); + return pFragmentShadingRateCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetFragmentShadingRatesKHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pFragmentShadingRates + ) + { + int pFragmentShadingRateCount = pFragmentShadingRates.Length; + return GetFragmentShadingRatesKHR(handle, ref pFragmentShadingRateCount, pFragmentShadingRates); + } + + /// + /// vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR - Query video encode quality level properties + /// + /// + /// + /// To query properties for a specific video encode quality level supported by a + /// video encode profile, call: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// VkResult vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + /// VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetVideoEncodeQualityLevelPropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR pQualityLevelInfo, + ref VkVideoEncodeQualityLevelPropertiesKHR pQualityLevelProperties + ) + { + fixed (VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelPropertiesFixed = &pQualityLevelProperties) + fixed (VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfoFixed = &pQualityLevelInfo) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR.Invoke( + handle.Handle, + pQualityLevelInfoFixed, + pQualityLevelPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorVideoProfileOperationNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileOperationNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileFormatNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileFormatNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoPictureLayoutNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoPictureLayoutNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorVideoProfileCodecNotSupportedKHR: + throw new VkResultError( + VkResult.ErrorVideoProfileCodecNotSupportedKHR, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkVideoEncodeQualityLevelPropertiesKHR. + public static VkVideoEncodeQualityLevelPropertiesKHR GetVideoEncodeQualityLevelPropertiesKHR( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR pQualityLevelInfo + ) + { + VkVideoEncodeQualityLevelPropertiesKHR outValue = new(); + GetVideoEncodeQualityLevelPropertiesKHR(handle, pQualityLevelInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR - Returns properties describing what cooperative matrix types are supported + /// + /// + /// + /// To enumerate the supported cooperative matrix types and operations, call: + /// + /// + /// // Provided by VK_KHR_cooperative_matrix + /// VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkCooperativeMatrixPropertiesKHR* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetCooperativeMatrixPropertiesKHR( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkCooperativeMatrixPropertiesKHR* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetCooperativeMatrixPropertiesKHR_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetCooperativeMatrixPropertiesKHR(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetCooperativeMatrixPropertiesKHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetCooperativeMatrixPropertiesKHR(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceCalibrateableTimeDomainsKHR - Query calibrateable time domains + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceCalibrateableTimeDomainsKHR + /// + /// + /// To query the set of time domains for which a physical device supports + /// timestamp calibration, call: + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetCalibrateableTimeDomainsKHR( + this VulkanHandleWrapper handle, + ref int pTimeDomainCount, + scoped ReadOnlySpan pTimeDomains + ) + { + fixed (VkTimeDomainKHR* pTimeDomainsFixed = pTimeDomains) + fixed (int* pTimeDomainCountFixed = &pTimeDomainCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR.Invoke( + handle.Handle, + pTimeDomainCountFixed, + pTimeDomainsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceCalibrateableTimeDomainsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceCalibrateableTimeDomainsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceCalibrateableTimeDomainsKHR failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceCalibrateableTimeDomainsKHR failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetCalibrateableTimeDomainsKHR_Count( + this VulkanHandleWrapper handle + ) + { + int pTimeDomainCount = default; + GetCalibrateableTimeDomainsKHR(handle, ref pTimeDomainCount, null); + return pTimeDomainCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetCalibrateableTimeDomainsKHR_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pTimeDomains + ) + { + int pTimeDomainCount = pTimeDomains.Length; + return GetCalibrateableTimeDomainsKHR(handle, ref pTimeDomainCount, pTimeDomains); + } + + /// + /// vkCreateDebugReportCallbackEXT - Create a debug report callback object + /// + /// + /// + /// Debug report callbacks give more detailed feedback on the application's use + /// of Vulkan when events of interest occur. + /// + /// + /// To register a debug report callback, an application uses + /// vkCreateDebugReportCallbackEXT. + /// + /// + /// // Provided by VK_EXT_debug_report + /// VkResult vkCreateDebugReportCallbackEXT( + /// VkInstance instance, + /// const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDebugReportCallbackEXT* pCallback); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDebugReportCallbackEXT CreateDebugReportCallbackEXT( + this VulkanHandleWrapper handle, + in VkDebugReportCallbackCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDebugReportCallbackCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkDebugReportCallbackEXT pCallbackLocal = default; + VkResult result = handle.PInvoke.vkCreateDebugReportCallbackEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pCallbackLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDebugReportCallbackEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDebugReportCallbackEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDebugReportCallbackEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pCallbackLocal; + } + } + + /// + /// vkDestroyDebugReportCallbackEXT - Destroy a debug report callback object + /// + /// + /// + /// To destroy a VkDebugReportCallbackEXT object, call: + /// + /// + /// // Provided by VK_EXT_debug_report + /// void vkDestroyDebugReportCallbackEXT( + /// VkInstance instance, + /// VkDebugReportCallbackEXT callback, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDebugReportCallbackEXT( + this VulkanHandleWrapper handle, + VkDebugReportCallbackEXT callback, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDebugReportCallbackEXT.Invoke(handle.Handle, callback, pAllocator); + } + + /// + /// vkDebugReportMessageEXT - Inject a message into a debug stream + /// + /// + /// + /// To inject its own messages into the debug stream, call: + /// + /// + /// // Provided by VK_EXT_debug_report + /// void vkDebugReportMessageEXT( + /// VkInstance instance, + /// VkDebugReportFlagsEXT flags, + /// VkDebugReportObjectTypeEXT objectType, + /// uint64_t object, + /// size_t location, + /// int32_t messageCode, + /// const char* pLayerPrefix, + /// const char* pMessage); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DebugReportMessageEXT( + this VulkanHandleWrapper handle, + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, + nint @object, + nuint location, + int messageCode, + scoped ReadOnlySpan pLayerPrefix, + scoped ReadOnlySpan pMessage + ) + { + fixed (byte* pMessageFixed = pMessage) + fixed (byte* pLayerPrefixFixed = pLayerPrefix) + { + handle.PInvoke.vkDebugReportMessageEXT.Invoke( + handle.Handle, + flags, + objectType, + @object, + location, + messageCode, + pLayerPrefixFixed, + pMessageFixed + ); + } + } + + /// + /// vkGetPhysicalDeviceExternalImageFormatPropertiesNV - Determine image capabilities compatible with external memory handle types + /// + /// + /// + /// To determine the image capabilities compatible with an external memory + /// handle type, call: + /// + /// + /// // Provided by VK_NV_external_memory_capabilities + /// VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( + /// VkPhysicalDevice physicalDevice, + /// VkFormat format, + /// VkImageType type, + /// VkImageTiling tiling, + /// VkImageUsageFlags usage, + /// VkImageCreateFlags flags, + /// VkExternalMemoryHandleTypeFlagsNV externalHandleType, + /// VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalImageFormatPropertiesNV( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkExternalMemoryHandleTypeFlagsNV externalHandleType, + ref VkExternalImageFormatPropertiesNV pExternalImageFormatProperties + ) + { + fixed ( + VkExternalImageFormatPropertiesNV* pExternalImageFormatPropertiesFixed = &pExternalImageFormatProperties + ) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceExternalImageFormatPropertiesNV.Invoke( + handle.Handle, + format, + type, + tiling, + usage, + flags, + externalHandleType, + pExternalImageFormatPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceExternalImageFormatPropertiesNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceExternalImageFormatPropertiesNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorFormatNotSupported: + throw new VkResultError( + VkResult.ErrorFormatNotSupported, + "Vulkan call to vkGetPhysicalDeviceExternalImageFormatPropertiesNV failed with error: VK_ERROR_FORMAT_NOT_SUPPORTED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceExternalImageFormatPropertiesNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceExternalImageFormatPropertiesNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalImageFormatPropertiesNV. + public static VkExternalImageFormatPropertiesNV GetExternalImageFormatPropertiesNV( + this VulkanHandleWrapper handle, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkExternalMemoryHandleTypeFlagsNV externalHandleType + ) + { + VkExternalImageFormatPropertiesNV outValue = new(); + GetExternalImageFormatPropertiesNV( + handle, + format, + type, + tiling, + usage, + flags, + externalHandleType, + ref outValue + ); + return outValue; + } + + /// + /// vkReleaseDisplayEXT - Release access to an acquired VkDisplayKHR + /// + /// + /// + /// To release a previously acquired display, call: + /// + /// + /// // Provided by VK_EXT_direct_mode_display + /// VkResult vkReleaseDisplayEXT( + /// VkPhysicalDevice physicalDevice, + /// VkDisplayKHR display); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseDisplayEXT( + this VulkanHandleWrapper handle, + VkDisplayKHR display + ) + { + VkResult result = handle.PInvoke.vkReleaseDisplayEXT.Invoke(handle.Handle, display); + switch (result) + { + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkReleaseDisplayEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkReleaseDisplayEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetPhysicalDeviceSurfaceCapabilities2EXT - Query surface capabilities + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceSurfaceCapabilities2EXT + /// + /// + /// To query the basic capabilities of a surface, needed in order to create a + /// swapchain, call: + /// + /// + /// // Provided by VK_EXT_display_surface_counter + /// VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( + /// VkPhysicalDevice physicalDevice, + /// VkSurfaceKHR surface, + /// VkSurfaceCapabilities2EXT* pSurfaceCapabilities); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetSurfaceCapabilities2EXT( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface, + ref VkSurfaceCapabilities2EXT pSurfaceCapabilities + ) + { + fixed (VkSurfaceCapabilities2EXT* pSurfaceCapabilitiesFixed = &pSurfaceCapabilities) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceSurfaceCapabilities2EXT.Invoke( + handle.Handle, + surface, + pSurfaceCapabilitiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2EXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2EXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorSurfaceLostKHR: + throw new VkResultError( + VkResult.ErrorSurfaceLostKHR, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2EXT failed with error: VK_ERROR_SURFACE_LOST_KHR" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2EXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSurfaceCapabilities2EXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkSurfaceCapabilities2EXT. + public static VkSurfaceCapabilities2EXT GetSurfaceCapabilities2EXT( + this VulkanHandleWrapper handle, + VkSurfaceKHR surface + ) + { + VkSurfaceCapabilities2EXT outValue = new(); + GetSurfaceCapabilities2EXT(handle, surface, ref outValue); + return outValue; + } + + /// + /// vkCreateDebugUtilsMessengerEXT - Create a debug messenger object + /// + /// + /// + /// A debug messenger triggers a debug callback with a debug message when an + /// event of interest occurs. + /// To create a debug messenger which will trigger a debug callback, call: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// VkResult vkCreateDebugUtilsMessengerEXT( + /// VkInstance instance, + /// const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkDebugUtilsMessengerEXT* pMessenger); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT( + this VulkanHandleWrapper handle, + in VkDebugUtilsMessengerCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkDebugUtilsMessengerCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkDebugUtilsMessengerEXT pMessengerLocal = default; + VkResult result = handle.PInvoke.vkCreateDebugUtilsMessengerEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pMessengerLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateDebugUtilsMessengerEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateDebugUtilsMessengerEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateDebugUtilsMessengerEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pMessengerLocal; + } + } + + /// + /// vkDestroyDebugUtilsMessengerEXT - Destroy a debug messenger object + /// + /// + /// + /// To destroy a VkDebugUtilsMessengerEXT object, call: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkDestroyDebugUtilsMessengerEXT( + /// VkInstance instance, + /// VkDebugUtilsMessengerEXT messenger, + /// const VkAllocationCallbacks* pAllocator); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void DestroyDebugUtilsMessengerEXT( + this VulkanHandleWrapper handle, + VkDebugUtilsMessengerEXT messenger, + VkAllocator? pAllocator + ) + { + handle.PInvoke.vkDestroyDebugUtilsMessengerEXT.Invoke(handle.Handle, messenger, pAllocator); + } + + /// + /// vkSubmitDebugUtilsMessageEXT - Inject a message into a debug stream + /// + /// + /// + /// To intentionally submit a debug message, call: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// void vkSubmitDebugUtilsMessageEXT( + /// VkInstance instance, + /// VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + /// VkDebugUtilsMessageTypeFlagsEXT messageTypes, + /// const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void SubmitDebugUtilsMessageEXT( + this VulkanHandleWrapper handle, + VkDebugUtilsMessageSeverityFlagsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + VkDebugUtilsMessengerCallbackDataEXT* pCallbackData + ) + { + handle.PInvoke.vkSubmitDebugUtilsMessageEXT.Invoke( + handle.Handle, + messageSeverity, + messageTypes, + pCallbackData + ); + } + + /// + /// vkGetPhysicalDeviceDescriptorSizeEXT - Report specific descriptor sizes for each descriptor type + /// + /// + /// + /// To query the size of heap descriptor for a specific VkDescriptorType, + /// call: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// VkDeviceSize vkGetPhysicalDeviceDescriptorSizeEXT( + /// VkPhysicalDevice physicalDevice, + /// VkDescriptorType descriptorType); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ByteSize64 GetDescriptorSizeEXT( + this VulkanHandleWrapper handle, + VkDescriptorType descriptorType + ) + { + return handle.PInvoke.vkGetPhysicalDeviceDescriptorSizeEXT.Invoke(handle.Handle, descriptorType); + } + + /// + /// vkGetPhysicalDeviceMultisamplePropertiesEXT - Report sample count specific multisampling capabilities of a physical device + /// + /// + /// + /// To query additional multisampling capabilities which may: be supported for a + /// specific sample count, beyond the minimum capabilities described for + /// Limits^ above, call: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// void vkGetPhysicalDeviceMultisamplePropertiesEXT( + /// VkPhysicalDevice physicalDevice, + /// VkSampleCountFlagBits samples, + /// VkMultisamplePropertiesEXT* pMultisampleProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetMultisamplePropertiesEXT( + this VulkanHandleWrapper handle, + VkSampleCountFlags samples, + ref VkMultisamplePropertiesEXT pMultisampleProperties + ) + { + fixed (VkMultisamplePropertiesEXT* pMultisamplePropertiesFixed = &pMultisampleProperties) + { + handle.PInvoke.vkGetPhysicalDeviceMultisamplePropertiesEXT.Invoke( + handle.Handle, + samples, + pMultisamplePropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkMultisamplePropertiesEXT. + public static VkMultisamplePropertiesEXT GetMultisamplePropertiesEXT( + this VulkanHandleWrapper handle, + VkSampleCountFlags samples + ) + { + VkMultisamplePropertiesEXT outValue = new(); + GetMultisamplePropertiesEXT(handle, samples, ref outValue); + return outValue; + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetCalibrateableTimeDomainsEXT( + this VulkanHandleWrapper handle, + int* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains + ) + { + return handle.PInvoke.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT.Invoke( + handle.Handle, + pTimeDomainCount, + pTimeDomains + ); + } + + /// + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkResult GetToolPropertiesEXT( + this VulkanHandleWrapper handle, + int* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties + ) + { + return handle.PInvoke.vkGetPhysicalDeviceToolPropertiesEXT.Invoke( + handle.Handle, + pToolCount, + pToolProperties + ); + } + + /// + /// vkGetPhysicalDeviceCooperativeMatrixPropertiesNV - Returns properties describing what cooperative matrix types are supported + /// + /// + /// + /// To enumerate the supported cooperative matrix types and operations, call: + /// + /// + /// // Provided by VK_NV_cooperative_matrix + /// VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkCooperativeMatrixPropertiesNV* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetCooperativeMatrixPropertiesNV( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkCooperativeMatrixPropertiesNV* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixPropertiesNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetCooperativeMatrixPropertiesNV_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetCooperativeMatrixPropertiesNV(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetCooperativeMatrixPropertiesNV_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetCooperativeMatrixPropertiesNV(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV - Query supported sample count combinations + /// + /// + /// + /// To query the set of mixed sample combinations of coverage reduction mode, + /// rasterization samples and color, depth, stencil attachment sample counts + /// that are supported by a physical device, call: + /// + /// + /// // Provided by VK_NV_coverage_reduction_mode + /// VkResult vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pCombinationCount, + /// VkFramebufferMixedSamplesCombinationNV* pCombinations); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetSupportedFramebufferMixedSamplesCombinationsNV( + this VulkanHandleWrapper handle, + ref int pCombinationCount, + scoped ReadOnlySpan pCombinations + ) + { + fixed (VkFramebufferMixedSamplesCombinationNV* pCombinationsFixed = pCombinations) + fixed (int* pCombinationCountFixed = &pCombinationCount) + { + VkResult result = + handle.PInvoke.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV.Invoke( + handle.Handle, + pCombinationCountFixed, + pCombinationsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetSupportedFramebufferMixedSamplesCombinationsNV_Count( + this VulkanHandleWrapper handle + ) + { + int pCombinationCount = default; + GetSupportedFramebufferMixedSamplesCombinationsNV(handle, ref pCombinationCount, null); + return pCombinationCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetSupportedFramebufferMixedSamplesCombinationsNV_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pCombinations + ) + { + int pCombinationCount = pCombinations.Length; + return GetSupportedFramebufferMixedSamplesCombinationsNV(handle, ref pCombinationCount, pCombinations); + } + + /// + /// vkCreateHeadlessSurfaceEXT - Create a headless <c>VkSurfaceKHR</c> object + /// + /// + /// + /// :refpage: vkCreateHeadlessSurfaceEXT + /// + /// + /// To create a headless VkSurfaceKHR object, call: + /// + /// + /// // Provided by VK_EXT_headless_surface + /// VkResult vkCreateHeadlessSurfaceEXT( + /// VkInstance instance, + /// const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkSurfaceKHR* pSurface); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkSurfaceKHR CreateHeadlessSurfaceEXT( + this VulkanHandleWrapper handle, + in VkHeadlessSurfaceCreateInfoEXT pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkHeadlessSurfaceCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) + { + VkSurfaceKHR pSurfaceLocal = default; + VkResult result = handle.PInvoke.vkCreateHeadlessSurfaceEXT.Invoke( + handle.Handle, + pCreateInfoFixed, + pAllocator, + &pSurfaceLocal + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateHeadlessSurfaceEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateHeadlessSurfaceEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateHeadlessSurfaceEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateHeadlessSurfaceEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pSurfaceLocal; + } + } + + /// + /// vkAcquireDrmDisplayEXT - Acquire access to a VkDisplayKHR using DRM + /// + /// + /// + /// To acquire permission to directly control a display in Vulkan from the + /// Direct Rendering Manager (DRM) interface, call: + /// + /// + /// // Provided by VK_EXT_acquire_drm_display + /// VkResult vkAcquireDrmDisplayEXT( + /// VkPhysicalDevice physicalDevice, + /// int32_t drmFd, + /// VkDisplayKHR display); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void AcquireDrmDisplayEXT( + this VulkanHandleWrapper handle, + int drmFd, + VkDisplayKHR display + ) + { + VkResult result = handle.PInvoke.vkAcquireDrmDisplayEXT.Invoke(handle.Handle, drmFd, display); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkAcquireDrmDisplayEXT failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkAcquireDrmDisplayEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkAcquireDrmDisplayEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + + /// + /// vkGetDrmDisplayEXT - Query the VkDisplayKHR corresponding to a DRM connector ID + /// + /// + /// + /// Before acquiring a display from the DRM interface, the caller may want to + /// select a specific VkDisplayKHR handle by identifying it using a + /// connectorId. + /// To do so, call: + /// + /// + /// // Provided by VK_EXT_acquire_drm_display + /// VkResult vkGetDrmDisplayEXT( + /// VkPhysicalDevice physicalDevice, + /// int32_t drmFd, + /// uint32_t connectorId, + /// VkDisplayKHR* display); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe VkDisplayKHR GetDrmDisplayEXT( + this VulkanHandleWrapper handle, + int drmFd, + int connectorId + ) + { + VkDisplayKHR displayLocal = default; + VkResult result = handle.PInvoke.vkGetDrmDisplayEXT.Invoke( + handle.Handle, + drmFd, + connectorId, + &displayLocal + ); + switch (result) + { + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkGetDrmDisplayEXT failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetDrmDisplayEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetDrmDisplayEXT failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetDrmDisplayEXT failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return displayLocal; + } + + /// + /// vkGetPhysicalDeviceExternalTensorPropertiesARM - Function for querying external tensor handle capabilities. + /// + /// + /// + /// To query the external handle types supported by tensors, call: + /// + /// + /// // Provided by VK_ARM_tensors + /// void vkGetPhysicalDeviceExternalTensorPropertiesARM( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceExternalTensorInfoARM* pExternalTensorInfo, + /// VkExternalTensorPropertiesARM* pExternalTensorProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetExternalTensorPropertiesARM( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalTensorInfoARM pExternalTensorInfo, + ref VkExternalTensorPropertiesARM pExternalTensorProperties + ) + { + fixed (VkExternalTensorPropertiesARM* pExternalTensorPropertiesFixed = &pExternalTensorProperties) + fixed (VkPhysicalDeviceExternalTensorInfoARM* pExternalTensorInfoFixed = &pExternalTensorInfo) + { + handle.PInvoke.vkGetPhysicalDeviceExternalTensorPropertiesARM.Invoke( + handle.Handle, + pExternalTensorInfoFixed, + pExternalTensorPropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkExternalTensorPropertiesARM. + public static VkExternalTensorPropertiesARM GetExternalTensorPropertiesARM( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceExternalTensorInfoARM pExternalTensorInfo + ) + { + VkExternalTensorPropertiesARM outValue = new(); + GetExternalTensorPropertiesARM(handle, pExternalTensorInfo, ref outValue); + return outValue; + } + + /// + /// vkGetPhysicalDeviceOpticalFlowImageFormatsNV - Query image formats for optical flow + /// + /// + /// + /// To enumerate the supported image formats for a specific optical flow usage, + /// call: + /// + /// + /// // Provided by VK_NV_optical_flow + /// VkResult vkGetPhysicalDeviceOpticalFlowImageFormatsNV( + /// VkPhysicalDevice physicalDevice, + /// const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, + /// uint32_t* pFormatCount, + /// VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetOpticalFlowImageFormatsNV( + this VulkanHandleWrapper handle, + in VkOpticalFlowImageFormatInfoNV pOpticalFlowImageFormatInfo, + ref int pFormatCount, + scoped ReadOnlySpan pImageFormatProperties + ) + { + fixed (VkOpticalFlowImageFormatPropertiesNV* pImageFormatPropertiesFixed = pImageFormatProperties) + fixed (VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfoFixed = &pOpticalFlowImageFormatInfo) + fixed (int* pFormatCountFixed = &pFormatCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceOpticalFlowImageFormatsNV.Invoke( + handle.Handle, + pOpticalFlowImageFormatInfoFixed, + pFormatCountFixed, + pImageFormatPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorExtensionNotPresent: + throw new VkResultError( + VkResult.ErrorExtensionNotPresent, + "Vulkan call to vkGetPhysicalDeviceOpticalFlowImageFormatsNV failed with error: VK_ERROR_EXTENSION_NOT_PRESENT" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkGetPhysicalDeviceOpticalFlowImageFormatsNV failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorFormatNotSupported: + throw new VkResultError( + VkResult.ErrorFormatNotSupported, + "Vulkan call to vkGetPhysicalDeviceOpticalFlowImageFormatsNV failed with error: VK_ERROR_FORMAT_NOT_SUPPORTED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceOpticalFlowImageFormatsNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceOpticalFlowImageFormatsNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetOpticalFlowImageFormatsNV_Count( + this VulkanHandleWrapper handle, + in VkOpticalFlowImageFormatInfoNV pOpticalFlowImageFormatInfo + ) + { + int pFormatCount = default; + GetOpticalFlowImageFormatsNV(handle, pOpticalFlowImageFormatInfo, ref pFormatCount, null); + return pFormatCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetOpticalFlowImageFormatsNV_Write( + this VulkanHandleWrapper handle, + in VkOpticalFlowImageFormatInfoNV pOpticalFlowImageFormatInfo, + scoped ReadOnlySpan pImageFormatProperties + ) + { + int pFormatCount = pImageFormatProperties.Length; + return GetOpticalFlowImageFormatsNV( + handle, + pOpticalFlowImageFormatInfo, + ref pFormatCount, + pImageFormatProperties + ); + } + + /// + /// vkGetPhysicalDeviceCooperativeVectorPropertiesNV - Returns properties describing what cooperative vector types are supported + /// + /// + /// + /// To enumerate the supported cooperative vector type combinations, call: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// VkResult vkGetPhysicalDeviceCooperativeVectorPropertiesNV( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkCooperativeVectorPropertiesNV* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetCooperativeVectorPropertiesNV( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkCooperativeVectorPropertiesNV* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceCooperativeVectorPropertiesNV.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeVectorPropertiesNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeVectorPropertiesNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceCooperativeVectorPropertiesNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceCooperativeVectorPropertiesNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetCooperativeVectorPropertiesNV_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetCooperativeVectorPropertiesNV(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetCooperativeVectorPropertiesNV_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetCooperativeVectorPropertiesNV(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM - Query the data processing engines and the operations they support for a given queue family of a physical device + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM + /// + /// + /// To query the data graph processing engines and operations they support for a + /// specific queue family of a physical device, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VkResult vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// uint32_t* pQueueFamilyDataGraphPropertyCount, + /// VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetQueueFamilyDataGraphPropertiesARM( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + ref int pQueueFamilyDataGraphPropertyCount, + scoped ReadOnlySpan pQueueFamilyDataGraphProperties + ) + { + fixed ( + VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphPropertiesFixed = + pQueueFamilyDataGraphProperties + ) + fixed (int* pQueueFamilyDataGraphPropertyCountFixed = &pQueueFamilyDataGraphPropertyCount) + { + VkResult result = handle.PInvoke.vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM.Invoke( + handle.Handle, + queueFamilyIndex, + pQueueFamilyDataGraphPropertyCountFixed, + pQueueFamilyDataGraphPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetQueueFamilyDataGraphPropertiesARM_Count( + this VulkanHandleWrapper handle, + int queueFamilyIndex + ) + { + int pQueueFamilyDataGraphPropertyCount = default; + GetQueueFamilyDataGraphPropertiesARM( + handle, + queueFamilyIndex, + ref pQueueFamilyDataGraphPropertyCount, + null + ); + return pQueueFamilyDataGraphPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetQueueFamilyDataGraphPropertiesARM_Write( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + scoped ReadOnlySpan pQueueFamilyDataGraphProperties + ) + { + int pQueueFamilyDataGraphPropertyCount = pQueueFamilyDataGraphProperties.Length; + return GetQueueFamilyDataGraphPropertiesARM( + handle, + queueFamilyIndex, + ref pQueueFamilyDataGraphPropertyCount, + pQueueFamilyDataGraphProperties + ); + } + + /// + /// vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM - Query the properties of a data graph processing engine for a specific queue family of a physical device + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM + /// + /// + /// To query the properties of a data graph processing engine for a specific + /// queue family of a physical device, call: + /// + /// + /// // Provided by VK_ARM_data_graph + /// void vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM( + /// VkPhysicalDevice physicalDevice, + /// const VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM* pQueueFamilyDataGraphProcessingEngineInfo, + /// VkQueueFamilyDataGraphProcessingEnginePropertiesARM* pQueueFamilyDataGraphProcessingEngineProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueueFamilyDataGraphProcessingEnginePropertiesARM( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM pQueueFamilyDataGraphProcessingEngineInfo, + ref VkQueueFamilyDataGraphProcessingEnginePropertiesARM pQueueFamilyDataGraphProcessingEngineProperties + ) + { + fixed ( + VkQueueFamilyDataGraphProcessingEnginePropertiesARM* pQueueFamilyDataGraphProcessingEnginePropertiesFixed = + &pQueueFamilyDataGraphProcessingEngineProperties + ) + fixed ( + VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM* pQueueFamilyDataGraphProcessingEngineInfoFixed = + &pQueueFamilyDataGraphProcessingEngineInfo + ) + { + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM.Invoke( + handle.Handle, + pQueueFamilyDataGraphProcessingEngineInfoFixed, + pQueueFamilyDataGraphProcessingEnginePropertiesFixed + ); + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkQueueFamilyDataGraphProcessingEnginePropertiesARM. + public static VkQueueFamilyDataGraphProcessingEnginePropertiesARM GetQueueFamilyDataGraphProcessingEnginePropertiesARM( + this VulkanHandleWrapper handle, + in VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM pQueueFamilyDataGraphProcessingEngineInfo + ) + { + VkQueueFamilyDataGraphProcessingEnginePropertiesARM outValue = new(); + GetQueueFamilyDataGraphProcessingEnginePropertiesARM( + handle, + pQueueFamilyDataGraphProcessingEngineInfo, + ref outValue + ); + return outValue; + } + + /// + /// vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM - Query the properties of a data graph processing engine and operation set combination for a specific queue family of a physical device + /// + /// + /// + /// :refpage: vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM + /// + /// + /// To query the properties of a data graph processing engine and operation set + /// combination for a specific queue family of a physical device, call: + /// + /// + /// // Provided by VK_ARM_data_graph_instruction_set_tosa, VK_ARM_data_graph_optical_flow + /// VkResult vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// const VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + /// VkBaseOutStructure* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void GetQueueFamilyDataGraphEngineOperationPropertiesARM( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + ref VkBaseOutStructure pProperties + ) + { + fixed (VkBaseOutStructure* pPropertiesFixed = &pProperties) + { + VkResult result = + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM.Invoke( + handle.Handle, + queueFamilyIndex, + pQueueFamilyDataGraphProperties, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } + + /// Wrapper that returns the struct instead of taking it as a ref parameter. + /// The VkBaseOutStructure. + public static unsafe VkBaseOutStructure GetQueueFamilyDataGraphEngineOperationPropertiesARM( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties + ) + { + VkBaseOutStructure outValue = new(); + GetQueueFamilyDataGraphEngineOperationPropertiesARM( + handle, + queueFamilyIndex, + pQueueFamilyDataGraphProperties, + ref outValue + ); + return outValue; + } + + /// + /// vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV - Returns properties describing what cooperative matrix types are supported + /// + /// + /// + /// To enumerate additional supported cooperative matrix types and operations, + /// call: + /// + /// + /// // Provided by VK_NV_cooperative_matrix2 + /// VkResult vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pPropertyCount, + /// VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetCooperativeMatrixFlexibleDimensionsPropertiesNV( + this VulkanHandleWrapper handle, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = + handle.PInvoke.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV.Invoke( + handle.Handle, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetCooperativeMatrixFlexibleDimensionsPropertiesNV_Count( + this VulkanHandleWrapper handle + ) + { + int pPropertyCount = default; + GetCooperativeMatrixFlexibleDimensionsPropertiesNV(handle, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetCooperativeMatrixFlexibleDimensionsPropertiesNV_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return GetCooperativeMatrixFlexibleDimensionsPropertiesNV(handle, ref pPropertyCount, pProperties); + } + + /// + /// vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM - Reports properties of the by region performance counters available on a queue family of a device + /// + /// + /// + /// :refpage: vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM + /// + /// + /// To enumerate the by region performance counters available on a queue family + /// of a physical device, call: + /// + /// + /// // Provided by VK_ARM_performance_counters_by_region + /// VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// uint32_t* pCounterCount, + /// VkPerformanceCounterARM* pCounters, + /// VkPerformanceCounterDescriptionARM* pCounterDescriptions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + ref int pCounterCount, + scoped ReadOnlySpan pCounters, + scoped ReadOnlySpan pCounterDescriptions + ) + { + fixed (VkPerformanceCounterDescriptionARM* pCounterDescriptionsFixed = pCounterDescriptions) + fixed (VkPerformanceCounterARM* pCountersFixed = pCounters) + fixed (int* pCounterCountFixed = &pCounterCount) + { + VkResult result = + handle.PInvoke.vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM.Invoke( + handle.Handle, + queueFamilyIndex, + pCounterCountFixed, + pCountersFixed, + pCounterDescriptionsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM_Count( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + scoped ReadOnlySpan pCounterDescriptions + ) + { + int pCounterCount = default; + EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + handle, + queueFamilyIndex, + ref pCounterCount, + null, + pCounterDescriptions + ); + return pCounterCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM_Write( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + scoped ReadOnlySpan pCounters, + scoped ReadOnlySpan pCounterDescriptions + ) + { + int pCounterCount = pCounters.Length; + return EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + handle, + queueFamilyIndex, + ref pCounterCount, + pCounters, + pCounterDescriptions + ); + } + + /// + /// vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM - Returns properties describing what shader instrumentation metrics are supported + /// + /// + /// + /// To enumerate the available shader instrumentation metrics, call: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// VkResult vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM( + /// VkPhysicalDevice physicalDevice, + /// uint32_t* pDescriptionCount, + /// VkShaderInstrumentationMetricDescriptionARM* pDescriptions); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumeratePhysicalDeviceShaderInstrumentationMetricsARM( + this VulkanHandleWrapper handle, + ref int pDescriptionCount, + scoped ReadOnlySpan pDescriptions + ) + { + fixed (VkShaderInstrumentationMetricDescriptionARM* pDescriptionsFixed = pDescriptions) + fixed (int* pDescriptionCountFixed = &pDescriptionCount) + { + VkResult result = handle.PInvoke.vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM.Invoke( + handle.Handle, + pDescriptionCountFixed, + pDescriptionsFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumeratePhysicalDeviceShaderInstrumentationMetricsARM_Count( + this VulkanHandleWrapper handle + ) + { + int pDescriptionCount = default; + EnumeratePhysicalDeviceShaderInstrumentationMetricsARM(handle, ref pDescriptionCount, null); + return pDescriptionCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumeratePhysicalDeviceShaderInstrumentationMetricsARM_Write( + this VulkanHandleWrapper handle, + scoped ReadOnlySpan pDescriptions + ) + { + int pDescriptionCount = pDescriptions.Length; + return EnumeratePhysicalDeviceShaderInstrumentationMetricsARM(handle, ref pDescriptionCount, pDescriptions); + } + + /// + /// vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM - Query image formats for data graph optical flow + /// + /// + /// + /// To enumerate the supported image formats for a specific data graph optical + /// flow usage, call: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// VkResult vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM( + /// VkPhysicalDevice physicalDevice, + /// uint32_t queueFamilyIndex, + /// const VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + /// const VkDataGraphOpticalFlowImageFormatInfoARM* pOpticalFlowImageFormatInfo, + /// uint32_t* pFormatCount, + /// VkDataGraphOpticalFlowImageFormatPropertiesARM* pImageFormatProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult GetQueueFamilyDataGraphOpticalFlowImageFormatsARM( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + in VkDataGraphOpticalFlowImageFormatInfoARM pOpticalFlowImageFormatInfo, + ref int pFormatCount, + scoped ReadOnlySpan pImageFormatProperties + ) + { + fixed (VkDataGraphOpticalFlowImageFormatPropertiesARM* pImageFormatPropertiesFixed = pImageFormatProperties) + fixed ( + VkDataGraphOpticalFlowImageFormatInfoARM* pOpticalFlowImageFormatInfoFixed = + &pOpticalFlowImageFormatInfo + ) + fixed (int* pFormatCountFixed = &pFormatCount) + { + VkResult result = + handle.PInvoke.vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM.Invoke( + handle.Handle, + queueFamilyIndex, + pQueueFamilyDataGraphProperties, + pOpticalFlowImageFormatInfoFixed, + pFormatCountFixed, + pImageFormatPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorExtensionNotPresent: + throw new VkResultError( + VkResult.ErrorExtensionNotPresent, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM failed with error: VK_ERROR_EXTENSION_NOT_PRESENT" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorFormatNotSupported: + throw new VkResultError( + VkResult.ErrorFormatNotSupported, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM failed with error: VK_ERROR_FORMAT_NOT_SUPPORTED" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int GetQueueFamilyDataGraphOpticalFlowImageFormatsARM_Count( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + in VkDataGraphOpticalFlowImageFormatInfoARM pOpticalFlowImageFormatInfo + ) + { + int pFormatCount = default; + GetQueueFamilyDataGraphOpticalFlowImageFormatsARM( + handle, + queueFamilyIndex, + pQueueFamilyDataGraphProperties, + pOpticalFlowImageFormatInfo, + ref pFormatCount, + null + ); + return pFormatCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult GetQueueFamilyDataGraphOpticalFlowImageFormatsARM_Write( + this VulkanHandleWrapper handle, + int queueFamilyIndex, + VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties, + in VkDataGraphOpticalFlowImageFormatInfoARM pOpticalFlowImageFormatInfo, + scoped ReadOnlySpan pImageFormatProperties + ) + { + int pFormatCount = pImageFormatProperties.Length; + return GetQueueFamilyDataGraphOpticalFlowImageFormatsARM( + handle, + queueFamilyIndex, + pQueueFamilyDataGraphProperties, + pOpticalFlowImageFormatInfo, + ref pFormatCount, + pImageFormatProperties + ); + } + } +} diff --git a/Brutal.Vulkan/Generated/Functions.gen.cs b/Brutal.Vulkan/Generated/Functions.gen.cs new file mode 100644 index 0000000..630c2a6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Functions.gen.cs @@ -0,0 +1,15805 @@ +using Brutal.VulkanApi.Android; +using Brutal.VulkanApi.Metal; +using Brutal.VulkanApi.Wayland; +using Brutal.VulkanApi.Win32; +using Brutal.VulkanApi.Xcb; +using Brutal.VulkanApi.Xlib; + +namespace Brutal.VulkanApi +{ + public readonly unsafe struct VkDestroyInstance( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyInstance(PfnVkVoidFunction func) + { + return new VkDestroyInstance( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkEnumeratePhysicalDevices( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkEnumeratePhysicalDevices(PfnVkVoidFunction func) + { + return new VkEnumeratePhysicalDevices( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFeatures( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceFeatures(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFeatures( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFormatProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceFormatProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFormatProperties( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceImageFormatProperties( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkImageTiling, + VkImageUsageFlags, + VkImageCreateFlags, + VkImageFormatProperties*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkImageTiling, + VkImageUsageFlags, + VkImageCreateFlags, + VkImageFormatProperties*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceImageFormatProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceImageFormatProperties( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkImageTiling, + VkImageUsageFlags, + VkImageCreateFlags, + VkImageFormatProperties*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceProperties( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceQueueFamilyProperties( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceMemoryProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceMemoryProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceMemoryProperties( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetInstanceProcAddr( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetInstanceProcAddr(PfnVkVoidFunction func) + { + return new VkGetInstanceProcAddr( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceProcAddr( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceProcAddr(PfnVkVoidFunction func) + { + return new VkGetDeviceProcAddr((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCreateDevice( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDeviceCreateInfo*, + VkAllocationCallbacks*, + VkDevice*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDeviceCreateInfo*, + VkAllocationCallbacks*, + VkDevice*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDevice(PfnVkVoidFunction func) + { + return new VkCreateDevice( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDeviceCreateInfo*, + VkAllocationCallbacks*, + VkDevice*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDevice( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyDevice(PfnVkVoidFunction func) + { + return new VkDestroyDevice((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkEnumerateDeviceExtensionProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + byte*, + int*, + VkExtensionProperties*, + VkResult> Invoke = handle; + + public static explicit operator VkEnumerateDeviceExtensionProperties(PfnVkVoidFunction func) + { + return new VkEnumerateDeviceExtensionProperties( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkEnumerateDeviceLayerProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkEnumerateDeviceLayerProperties(PfnVkVoidFunction func) + { + return new VkEnumerateDeviceLayerProperties( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceQueue( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceQueue(PfnVkVoidFunction func) + { + return new VkGetDeviceQueue((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkQueueSubmit( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueSubmit(PfnVkVoidFunction func) + { + return new VkQueueSubmit( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueWaitIdle(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueWaitIdle(PfnVkVoidFunction func) + { + return new VkQueueWaitIdle((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkDeviceWaitIdle(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDeviceWaitIdle(PfnVkVoidFunction func) + { + return new VkDeviceWaitIdle((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkAllocateMemory( + delegate* unmanaged[Cdecl]< + VkDevice, + VkMemoryAllocateInfo*, + VkAllocationCallbacks*, + VkDeviceMemory*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkMemoryAllocateInfo*, + VkAllocationCallbacks*, + VkDeviceMemory*, + VkResult> Invoke = handle; + + public static explicit operator VkAllocateMemory(PfnVkVoidFunction func) + { + return new VkAllocateMemory( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkMemoryAllocateInfo*, + VkAllocationCallbacks*, + VkDeviceMemory*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkFreeMemory( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkFreeMemory(PfnVkVoidFunction func) + { + return new VkFreeMemory( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkMapMemory( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceMemory, + ByteSize64, + ByteSize64, + VkMemoryMapFlags, + void**, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceMemory, + ByteSize64, + ByteSize64, + VkMemoryMapFlags, + void**, + VkResult> Invoke = handle; + + public static explicit operator VkMapMemory(PfnVkVoidFunction func) + { + return new VkMapMemory( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceMemory, + ByteSize64, + ByteSize64, + VkMemoryMapFlags, + void**, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUnmapMemory(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkUnmapMemory(PfnVkVoidFunction func) + { + return new VkUnmapMemory((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkFlushMappedMemoryRanges( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkFlushMappedMemoryRanges(PfnVkVoidFunction func) + { + return new VkFlushMappedMemoryRanges( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkInvalidateMappedMemoryRanges( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkInvalidateMappedMemoryRanges(PfnVkVoidFunction func) + { + return new VkInvalidateMappedMemoryRanges( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceMemoryCommitment( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceMemoryCommitment(PfnVkVoidFunction func) + { + return new VkGetDeviceMemoryCommitment( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBindBufferMemory( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkBindBufferMemory(PfnVkVoidFunction func) + { + return new VkBindBufferMemory( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBindImageMemory( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkBindImageMemory(PfnVkVoidFunction func) + { + return new VkBindImageMemory( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferMemoryRequirements( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetBufferMemoryRequirements(PfnVkVoidFunction func) + { + return new VkGetBufferMemoryRequirements( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageMemoryRequirements( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetImageMemoryRequirements(PfnVkVoidFunction func) + { + return new VkGetImageMemoryRequirements( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSparseMemoryRequirements( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImage, + int*, + VkSparseImageMemoryRequirements*, + void> Invoke = handle; + + public static explicit operator VkGetImageSparseMemoryRequirements(PfnVkVoidFunction func) + { + return new VkGetImageSparseMemoryRequirements( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSparseImageFormatProperties( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkSampleCountFlags, + VkImageUsageFlags, + VkImageTiling, + int*, + VkSparseImageFormatProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkSampleCountFlags, + VkImageUsageFlags, + VkImageTiling, + int*, + VkSparseImageFormatProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSparseImageFormatProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSparseImageFormatProperties( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkSampleCountFlags, + VkImageUsageFlags, + VkImageTiling, + int*, + VkSparseImageFormatProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueBindSparse( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueBindSparse(PfnVkVoidFunction func) + { + return new VkQueueBindSparse( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateFence( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkFenceCreateInfo*, + VkAllocationCallbacks*, + VkFence*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateFence(PfnVkVoidFunction func) + { + return new VkCreateFence( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyFence( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyFence(PfnVkVoidFunction func) + { + return new VkDestroyFence( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkResetFences(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkResetFences(PfnVkVoidFunction func) + { + return new VkResetFences((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetFenceStatus(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetFenceStatus(PfnVkVoidFunction func) + { + return new VkGetFenceStatus((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkWaitForFences( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkWaitForFences(PfnVkVoidFunction func) + { + return new VkWaitForFences( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateSemaphore( + delegate* unmanaged[Cdecl]< + VkDevice, + VkSemaphoreCreateInfo*, + VkAllocationCallbacks*, + VkSemaphore*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSemaphoreCreateInfo*, + VkAllocationCallbacks*, + VkSemaphore*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateSemaphore(PfnVkVoidFunction func) + { + return new VkCreateSemaphore( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSemaphoreCreateInfo*, + VkAllocationCallbacks*, + VkSemaphore*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroySemaphore( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroySemaphore(PfnVkVoidFunction func) + { + return new VkDestroySemaphore( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateQueryPool( + delegate* unmanaged[Cdecl]< + VkDevice, + VkQueryPoolCreateInfo*, + VkAllocationCallbacks*, + VkQueryPool*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkQueryPoolCreateInfo*, + VkAllocationCallbacks*, + VkQueryPool*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateQueryPool(PfnVkVoidFunction func) + { + return new VkCreateQueryPool( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkQueryPoolCreateInfo*, + VkAllocationCallbacks*, + VkQueryPool*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyQueryPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyQueryPool(PfnVkVoidFunction func) + { + return new VkDestroyQueryPool( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetQueryPoolResults( + delegate* unmanaged[Cdecl]< + VkDevice, + VkQueryPool, + int, + int, + nuint, + void*, + ByteSize64, + VkQueryResultFlags, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkQueryPool, + int, + int, + nuint, + void*, + ByteSize64, + VkQueryResultFlags, + VkResult> Invoke = handle; + + public static explicit operator VkGetQueryPoolResults(PfnVkVoidFunction func) + { + return new VkGetQueryPoolResults( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkQueryPool, + int, + int, + nuint, + void*, + ByteSize64, + VkQueryResultFlags, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferCreateInfo*, + VkAllocationCallbacks*, + VkBuffer*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateBuffer(PfnVkVoidFunction func) + { + return new VkCreateBuffer( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyBuffer(PfnVkVoidFunction func) + { + return new VkDestroyBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateImage( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageCreateInfo*, + VkAllocationCallbacks*, + VkImage*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateImage(PfnVkVoidFunction func) + { + return new VkCreateImage( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyImage( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyImage(PfnVkVoidFunction func) + { + return new VkDestroyImage( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSubresourceLayout( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImage, + VkImageSubresource*, + VkSubresourceLayout*, + void> Invoke = handle; + + public static explicit operator VkGetImageSubresourceLayout(PfnVkVoidFunction func) + { + return new VkGetImageSubresourceLayout( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateImageView( + delegate* unmanaged[Cdecl]< + VkDevice, + VkImageViewCreateInfo*, + VkAllocationCallbacks*, + VkImageView*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageViewCreateInfo*, + VkAllocationCallbacks*, + VkImageView*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateImageView(PfnVkVoidFunction func) + { + return new VkCreateImageView( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkImageViewCreateInfo*, + VkAllocationCallbacks*, + VkImageView*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyImageView( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyImageView(PfnVkVoidFunction func) + { + return new VkDestroyImageView( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateCommandPool( + delegate* unmanaged[Cdecl]< + VkDevice, + VkCommandPoolCreateInfo*, + VkAllocationCallbacks*, + VkCommandPool*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkCommandPoolCreateInfo*, + VkAllocationCallbacks*, + VkCommandPool*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateCommandPool(PfnVkVoidFunction func) + { + return new VkCreateCommandPool( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkCommandPoolCreateInfo*, + VkAllocationCallbacks*, + VkCommandPool*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyCommandPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyCommandPool(PfnVkVoidFunction func) + { + return new VkDestroyCommandPool( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkResetCommandPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkResetCommandPool(PfnVkVoidFunction func) + { + return new VkResetCommandPool( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkAllocateCommandBuffers( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkCommandBufferAllocateInfo*, + VkCommandBuffer*, + VkResult> Invoke = handle; + + public static explicit operator VkAllocateCommandBuffers(PfnVkVoidFunction func) + { + return new VkAllocateCommandBuffers( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkFreeCommandBuffers( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkFreeCommandBuffers(PfnVkVoidFunction func) + { + return new VkFreeCommandBuffers( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBeginCommandBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkBeginCommandBuffer(PfnVkVoidFunction func) + { + return new VkBeginCommandBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkEndCommandBuffer(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkEndCommandBuffer(PfnVkVoidFunction func) + { + return new VkEndCommandBuffer((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkResetCommandBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkResetCommandBuffer(PfnVkVoidFunction func) + { + return new VkResetCommandBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + VkBuffer, + int, + VkBufferCopy*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyBuffer(PfnVkVoidFunction func) + { + return new VkCmdCopyBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImage( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageCopy*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageCopy*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyImage(PfnVkVoidFunction func) + { + return new VkCmdCopyImage( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageCopy*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyBufferToImage( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + VkImage, + VkImageLayout, + int, + VkBufferImageCopy*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + VkImage, + VkImageLayout, + int, + VkBufferImageCopy*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyBufferToImage(PfnVkVoidFunction func) + { + return new VkCmdCopyBufferToImage( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + VkImage, + VkImageLayout, + int, + VkBufferImageCopy*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImageToBuffer( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkBuffer, + int, + VkBufferImageCopy*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkBuffer, + int, + VkBufferImageCopy*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyImageToBuffer(PfnVkVoidFunction func) + { + return new VkCmdCopyImageToBuffer( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkBuffer, + int, + VkBufferImageCopy*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdUpdateBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + ByteSize64, + void*, + void> Invoke = handle; + + public static explicit operator VkCmdUpdateBuffer(PfnVkVoidFunction func) + { + return new VkCmdUpdateBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdFillBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + ByteSize64, + int, + void> Invoke = handle; + + public static explicit operator VkCmdFillBuffer(PfnVkVoidFunction func) + { + return new VkCmdFillBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPipelineBarrier( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags, + VkPipelineStageFlags, + VkDependencyFlags, + int, + VkMemoryBarrier*, + int, + VkBufferMemoryBarrier*, + int, + VkImageMemoryBarrier*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags, + VkPipelineStageFlags, + VkDependencyFlags, + int, + VkMemoryBarrier*, + int, + VkBufferMemoryBarrier*, + int, + VkImageMemoryBarrier*, + void> Invoke = handle; + + public static explicit operator VkCmdPipelineBarrier(PfnVkVoidFunction func) + { + return new VkCmdPipelineBarrier( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags, + VkPipelineStageFlags, + VkDependencyFlags, + int, + VkMemoryBarrier*, + int, + VkBufferMemoryBarrier*, + int, + VkImageMemoryBarrier*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginQuery( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + VkQueryControlFlags, + void> Invoke = handle; + + public static explicit operator VkCmdBeginQuery(PfnVkVoidFunction func) + { + return new VkCmdBeginQuery( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndQuery( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndQuery(PfnVkVoidFunction func) + { + return new VkCmdEndQuery((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdResetQueryPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdResetQueryPool(PfnVkVoidFunction func) + { + return new VkCmdResetQueryPool( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteTimestamp( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags, + VkQueryPool, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteTimestamp(PfnVkVoidFunction func) + { + return new VkCmdWriteTimestamp( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyQueryPoolResults( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + int, + VkBuffer, + ByteSize64, + ByteSize64, + VkQueryResultFlags, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + int, + VkBuffer, + ByteSize64, + ByteSize64, + VkQueryResultFlags, + void> Invoke = handle; + + public static explicit operator VkCmdCopyQueryPoolResults(PfnVkVoidFunction func) + { + return new VkCmdCopyQueryPoolResults( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + int, + VkBuffer, + ByteSize64, + ByteSize64, + VkQueryResultFlags, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdExecuteCommands( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdExecuteCommands(PfnVkVoidFunction func) + { + return new VkCmdExecuteCommands( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateEvent( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkEventCreateInfo*, + VkAllocationCallbacks*, + VkEvent*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateEvent(PfnVkVoidFunction func) + { + return new VkCreateEvent( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyEvent( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyEvent(PfnVkVoidFunction func) + { + return new VkDestroyEvent( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetEventStatus(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetEventStatus(PfnVkVoidFunction func) + { + return new VkGetEventStatus((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkSetEvent(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetEvent(PfnVkVoidFunction func) + { + return new VkSetEvent((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkResetEvent(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkResetEvent(PfnVkVoidFunction func) + { + return new VkResetEvent((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCreateBufferView( + delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferViewCreateInfo*, + VkAllocationCallbacks*, + VkBufferView*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferViewCreateInfo*, + VkAllocationCallbacks*, + VkBufferView*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateBufferView(PfnVkVoidFunction func) + { + return new VkCreateBufferView( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferViewCreateInfo*, + VkAllocationCallbacks*, + VkBufferView*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyBufferView( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyBufferView(PfnVkVoidFunction func) + { + return new VkDestroyBufferView( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateShaderModule( + delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderModuleCreateInfo*, + VkAllocationCallbacks*, + VkShaderModule*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderModuleCreateInfo*, + VkAllocationCallbacks*, + VkShaderModule*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateShaderModule(PfnVkVoidFunction func) + { + return new VkCreateShaderModule( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderModuleCreateInfo*, + VkAllocationCallbacks*, + VkShaderModule*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyShaderModule( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyShaderModule(PfnVkVoidFunction func) + { + return new VkDestroyShaderModule( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreatePipelineCache( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCacheCreateInfo*, + VkAllocationCallbacks*, + VkPipelineCache*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCacheCreateInfo*, + VkAllocationCallbacks*, + VkPipelineCache*, + VkResult> Invoke = handle; + + public static explicit operator VkCreatePipelineCache(PfnVkVoidFunction func) + { + return new VkCreatePipelineCache( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCacheCreateInfo*, + VkAllocationCallbacks*, + VkPipelineCache*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyPipelineCache( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyPipelineCache(PfnVkVoidFunction func) + { + return new VkDestroyPipelineCache( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineCacheData( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPipelineCacheData(PfnVkVoidFunction func) + { + return new VkGetPipelineCacheData( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkMergePipelineCaches( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkMergePipelineCaches(PfnVkVoidFunction func) + { + return new VkMergePipelineCaches( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateComputePipelines( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkComputePipelineCreateInfo*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkComputePipelineCreateInfo*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateComputePipelines(PfnVkVoidFunction func) + { + return new VkCreateComputePipelines( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkComputePipelineCreateInfo*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyPipeline( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyPipeline(PfnVkVoidFunction func) + { + return new VkDestroyPipeline( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreatePipelineLayout( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineLayoutCreateInfo*, + VkAllocationCallbacks*, + VkPipelineLayout*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineLayoutCreateInfo*, + VkAllocationCallbacks*, + VkPipelineLayout*, + VkResult> Invoke = handle; + + public static explicit operator VkCreatePipelineLayout(PfnVkVoidFunction func) + { + return new VkCreatePipelineLayout( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineLayoutCreateInfo*, + VkAllocationCallbacks*, + VkPipelineLayout*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyPipelineLayout( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyPipelineLayout(PfnVkVoidFunction func) + { + return new VkDestroyPipelineLayout( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateSampler( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerCreateInfo*, + VkAllocationCallbacks*, + VkSampler*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateSampler(PfnVkVoidFunction func) + { + return new VkCreateSampler( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerCreateInfo*, + VkAllocationCallbacks*, + VkSampler*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroySampler( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroySampler(PfnVkVoidFunction func) + { + return new VkDestroySampler( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDescriptorSetLayout( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorSetLayout*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorSetLayout*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDescriptorSetLayout(PfnVkVoidFunction func) + { + return new VkCreateDescriptorSetLayout( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorSetLayout*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDescriptorSetLayout( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayout, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDescriptorSetLayout(PfnVkVoidFunction func) + { + return new VkDestroyDescriptorSetLayout( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDescriptorPool( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorPoolCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorPool*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorPoolCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorPool*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDescriptorPool(PfnVkVoidFunction func) + { + return new VkCreateDescriptorPool( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorPoolCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorPool*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDescriptorPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyDescriptorPool(PfnVkVoidFunction func) + { + return new VkDestroyDescriptorPool( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkResetDescriptorPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorPool, + VkDescriptorPoolResetFlags, + VkResult> Invoke = handle; + + public static explicit operator VkResetDescriptorPool(PfnVkVoidFunction func) + { + return new VkResetDescriptorPool( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkAllocateDescriptorSets( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetAllocateInfo*, + VkDescriptorSet*, + VkResult> Invoke = handle; + + public static explicit operator VkAllocateDescriptorSets(PfnVkVoidFunction func) + { + return new VkAllocateDescriptorSets( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkFreeDescriptorSets( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkFreeDescriptorSets(PfnVkVoidFunction func) + { + return new VkFreeDescriptorSets( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkUpdateDescriptorSets( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkWriteDescriptorSet*, + int, + VkCopyDescriptorSet*, + void> Invoke = handle; + + public static explicit operator VkUpdateDescriptorSets(PfnVkVoidFunction func) + { + return new VkUpdateDescriptorSets( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindPipeline( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBindPipeline(PfnVkVoidFunction func) + { + return new VkCmdBindPipeline( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindDescriptorSets( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkDescriptorSet*, + int, + int*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkDescriptorSet*, + int, + int*, + void> Invoke = handle; + + public static explicit operator VkCmdBindDescriptorSets(PfnVkVoidFunction func) + { + return new VkCmdBindDescriptorSets( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkDescriptorSet*, + int, + int*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdClearColorImage( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkClearColorValue*, + int, + VkImageSubresourceRange*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkClearColorValue*, + int, + VkImageSubresourceRange*, + void> Invoke = handle; + + public static explicit operator VkCmdClearColorImage(PfnVkVoidFunction func) + { + return new VkCmdClearColorImage( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkClearColorValue*, + int, + VkImageSubresourceRange*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDispatch(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDispatch(PfnVkVoidFunction func) + { + return new VkCmdDispatch((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdDispatchIndirect( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDispatchIndirect(PfnVkVoidFunction func) + { + return new VkCmdDispatchIndirect( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetEvent( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetEvent(PfnVkVoidFunction func) + { + return new VkCmdSetEvent( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdResetEvent( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdResetEvent(PfnVkVoidFunction func) + { + return new VkCmdResetEvent( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWaitEvents( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkEvent*, + VkPipelineStageFlags, + VkPipelineStageFlags, + int, + VkMemoryBarrier*, + int, + VkBufferMemoryBarrier*, + int, + VkImageMemoryBarrier*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkEvent*, + VkPipelineStageFlags, + VkPipelineStageFlags, + int, + VkMemoryBarrier*, + int, + VkBufferMemoryBarrier*, + int, + VkImageMemoryBarrier*, + void> Invoke = handle; + + public static explicit operator VkCmdWaitEvents(PfnVkVoidFunction func) + { + return new VkCmdWaitEvents( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkEvent*, + VkPipelineStageFlags, + VkPipelineStageFlags, + int, + VkMemoryBarrier*, + int, + VkBufferMemoryBarrier*, + int, + VkImageMemoryBarrier*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushConstants( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineLayout, + VkShaderStageFlags, + int, + int, + void*, + void> Invoke = handle; + + public static explicit operator VkCmdPushConstants(PfnVkVoidFunction func) + { + return new VkCmdPushConstants( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineLayout, + VkShaderStageFlags, + int, + int, + void*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateGraphicsPipelines( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkGraphicsPipelineCreateInfo*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkGraphicsPipelineCreateInfo*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateGraphicsPipelines(PfnVkVoidFunction func) + { + return new VkCreateGraphicsPipelines( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkGraphicsPipelineCreateInfo*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateFramebuffer( + delegate* unmanaged[Cdecl]< + VkDevice, + VkFramebufferCreateInfo*, + VkAllocationCallbacks*, + VkFramebuffer*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkFramebufferCreateInfo*, + VkAllocationCallbacks*, + VkFramebuffer*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateFramebuffer(PfnVkVoidFunction func) + { + return new VkCreateFramebuffer( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkFramebufferCreateInfo*, + VkAllocationCallbacks*, + VkFramebuffer*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyFramebuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyFramebuffer(PfnVkVoidFunction func) + { + return new VkDestroyFramebuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateRenderPass( + delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateRenderPass(PfnVkVoidFunction func) + { + return new VkCreateRenderPass( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyRenderPass( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyRenderPass(PfnVkVoidFunction func) + { + return new VkDestroyRenderPass( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRenderAreaGranularity( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetRenderAreaGranularity(PfnVkVoidFunction func) + { + return new VkGetRenderAreaGranularity( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetViewport( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetViewport(PfnVkVoidFunction func) + { + return new VkCmdSetViewport( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetScissor( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetScissor(PfnVkVoidFunction func) + { + return new VkCmdSetScissor( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLineWidth(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLineWidth(PfnVkVoidFunction func) + { + return new VkCmdSetLineWidth((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetDepthBias( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBias(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBias( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetBlendConstants( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetBlendConstants(PfnVkVoidFunction func) + { + return new VkCmdSetBlendConstants((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetDepthBounds( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBounds(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBounds( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilCompareMask( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetStencilCompareMask(PfnVkVoidFunction func) + { + return new VkCmdSetStencilCompareMask( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilWriteMask( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetStencilWriteMask(PfnVkVoidFunction func) + { + return new VkCmdSetStencilWriteMask( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilReference( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetStencilReference(PfnVkVoidFunction func) + { + return new VkCmdSetStencilReference( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindIndexBuffer( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBindIndexBuffer(PfnVkVoidFunction func) + { + return new VkCmdBindIndexBuffer( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindVertexBuffers( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBindVertexBuffers(PfnVkVoidFunction func) + { + return new VkCmdBindVertexBuffers( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDraw( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDraw(PfnVkVoidFunction func) + { + return new VkCmdDraw((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdDrawIndexed( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawIndexed(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexed( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirect( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdDrawIndirect(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirect( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndexedIndirect( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdDrawIndexedIndirect(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexedIndirect( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBlitImage( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageBlit*, + VkFilter, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageBlit*, + VkFilter, + void> Invoke = handle; + + public static explicit operator VkCmdBlitImage(PfnVkVoidFunction func) + { + return new VkCmdBlitImage( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageBlit*, + VkFilter, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdClearDepthStencilImage( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkClearDepthStencilValue*, + int, + VkImageSubresourceRange*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkClearDepthStencilValue*, + int, + VkImageSubresourceRange*, + void> Invoke = handle; + + public static explicit operator VkCmdClearDepthStencilImage(PfnVkVoidFunction func) + { + return new VkCmdClearDepthStencilImage( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkClearDepthStencilValue*, + int, + VkImageSubresourceRange*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdClearAttachments( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkClearAttachment*, + int, + VkClearRect*, + void> Invoke = handle; + + public static explicit operator VkCmdClearAttachments(PfnVkVoidFunction func) + { + return new VkCmdClearAttachments( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdResolveImage( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageResolve*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageResolve*, + void> Invoke = handle; + + public static explicit operator VkCmdResolveImage(PfnVkVoidFunction func) + { + return new VkCmdResolveImage( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkImage, + VkImageLayout, + VkImage, + VkImageLayout, + int, + VkImageResolve*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginRenderPass( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkRenderPassBeginInfo*, + VkSubpassContents, + void> Invoke = handle; + + public static explicit operator VkCmdBeginRenderPass(PfnVkVoidFunction func) + { + return new VkCmdBeginRenderPass( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdNextSubpass( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdNextSubpass(PfnVkVoidFunction func) + { + return new VkCmdNextSubpass( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRenderPass(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRenderPass(PfnVkVoidFunction func) + { + return new VkCmdEndRenderPass((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkBindBufferMemory2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkBindBufferMemory2(PfnVkVoidFunction func) + { + return new VkBindBufferMemory2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBindImageMemory2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkBindImageMemory2(PfnVkVoidFunction func) + { + return new VkBindImageMemory2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceGroupPeerMemoryFeatures( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDeviceGroupPeerMemoryFeatures(PfnVkVoidFunction func) + { + return new VkGetDeviceGroupPeerMemoryFeatures( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDeviceMask(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDeviceMask(PfnVkVoidFunction func) + { + return new VkCmdSetDeviceMask((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkEnumeratePhysicalDeviceGroups( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + int*, + VkPhysicalDeviceGroupProperties*, + VkResult> Invoke = handle; + + public static explicit operator VkEnumeratePhysicalDeviceGroups(PfnVkVoidFunction func) + { + return new VkEnumeratePhysicalDeviceGroups( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageMemoryRequirements2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageMemoryRequirementsInfo2*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetImageMemoryRequirements2(PfnVkVoidFunction func) + { + return new VkGetImageMemoryRequirements2( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferMemoryRequirements2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferMemoryRequirementsInfo2*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetBufferMemoryRequirements2(PfnVkVoidFunction func) + { + return new VkGetBufferMemoryRequirements2( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSparseMemoryRequirements2( + delegate* unmanaged[Cdecl]< + VkDevice, + VkImageSparseMemoryRequirementsInfo2*, + int*, + VkSparseImageMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageSparseMemoryRequirementsInfo2*, + int*, + VkSparseImageMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetImageSparseMemoryRequirements2(PfnVkVoidFunction func) + { + return new VkGetImageSparseMemoryRequirements2( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkImageSparseMemoryRequirementsInfo2*, + int*, + VkSparseImageMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFeatures2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceFeatures2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFeatures2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceProperties2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceProperties2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceProperties2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFormatProperties2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceFormatProperties2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFormatProperties2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceImageFormatProperties2( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceImageFormatInfo2*, + VkImageFormatProperties2*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceImageFormatInfo2*, + VkImageFormatProperties2*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceImageFormatProperties2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceImageFormatProperties2( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceImageFormatInfo2*, + VkImageFormatProperties2*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyProperties2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyProperties2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceQueueFamilyProperties2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceMemoryProperties2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceMemoryProperties2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceMemoryProperties2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSparseImageFormatProperties2( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSparseImageFormatInfo2*, + int*, + VkSparseImageFormatProperties2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSparseImageFormatInfo2*, + int*, + VkSparseImageFormatProperties2*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSparseImageFormatProperties2(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSparseImageFormatProperties2( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSparseImageFormatInfo2*, + int*, + VkSparseImageFormatProperties2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkTrimCommandPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkTrimCommandPool(PfnVkVoidFunction func) + { + return new VkTrimCommandPool( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceQueue2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceQueue2(PfnVkVoidFunction func) + { + return new VkGetDeviceQueue2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalBufferProperties( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalBufferInfo*, + VkExternalBufferProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalBufferInfo*, + VkExternalBufferProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalBufferProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalBufferProperties( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalBufferInfo*, + VkExternalBufferProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalFenceProperties( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalFenceInfo*, + VkExternalFenceProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalFenceInfo*, + VkExternalFenceProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalFenceProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalFenceProperties( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalFenceInfo*, + VkExternalFenceProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalSemaphoreProperties( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalSemaphoreInfo*, + VkExternalSemaphoreProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalSemaphoreInfo*, + VkExternalSemaphoreProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalSemaphoreProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalSemaphoreProperties( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalSemaphoreInfo*, + VkExternalSemaphoreProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDispatchBase( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDispatchBase(PfnVkVoidFunction func) + { + return new VkCmdDispatchBase( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDescriptorUpdateTemplate( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplateCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorUpdateTemplate*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplateCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorUpdateTemplate*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDescriptorUpdateTemplate(PfnVkVoidFunction func) + { + return new VkCreateDescriptorUpdateTemplate( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplateCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorUpdateTemplate*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDescriptorUpdateTemplate( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplate, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDescriptorUpdateTemplate(PfnVkVoidFunction func) + { + return new VkDestroyDescriptorUpdateTemplate( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUpdateDescriptorSetWithTemplate( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSet, + VkDescriptorUpdateTemplate, + void*, + void> Invoke = handle; + + public static explicit operator VkUpdateDescriptorSetWithTemplate(PfnVkVoidFunction func) + { + return new VkUpdateDescriptorSetWithTemplate( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDescriptorSetLayoutSupport( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkDescriptorSetLayoutSupport*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkDescriptorSetLayoutSupport*, + void> Invoke = handle; + + public static explicit operator VkGetDescriptorSetLayoutSupport(PfnVkVoidFunction func) + { + return new VkGetDescriptorSetLayoutSupport( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkDescriptorSetLayoutSupport*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateSamplerYcbcrConversion( + delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversionCreateInfo*, + VkAllocationCallbacks*, + VkSamplerYCbCrConversion*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversionCreateInfo*, + VkAllocationCallbacks*, + VkSamplerYCbCrConversion*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateSamplerYcbcrConversion(PfnVkVoidFunction func) + { + return new VkCreateSamplerYcbcrConversion( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversionCreateInfo*, + VkAllocationCallbacks*, + VkSamplerYCbCrConversion*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroySamplerYcbcrConversion( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversion, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroySamplerYcbcrConversion(PfnVkVoidFunction func) + { + return new VkDestroySamplerYcbcrConversion( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkResetQueryPool( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkResetQueryPool(PfnVkVoidFunction func) + { + return new VkResetQueryPool((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetSemaphoreCounterValue( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetSemaphoreCounterValue(PfnVkVoidFunction func) + { + return new VkGetSemaphoreCounterValue( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkWaitSemaphores( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkWaitSemaphores(PfnVkVoidFunction func) + { + return new VkWaitSemaphores( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSignalSemaphore( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSignalSemaphore(PfnVkVoidFunction func) + { + return new VkSignalSemaphore( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferDeviceAddress( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetBufferDeviceAddress(PfnVkVoidFunction func) + { + return new VkGetBufferDeviceAddress( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferOpaqueCaptureAddress( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetBufferOpaqueCaptureAddress(PfnVkVoidFunction func) + { + return new VkGetBufferOpaqueCaptureAddress( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceMemoryOpaqueCaptureAddress( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDeviceMemoryOpaqueCaptureAddress(PfnVkVoidFunction func) + { + return new VkGetDeviceMemoryOpaqueCaptureAddress( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirectCount( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndirectCount(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirectCount( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndexedIndirectCount( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndexedIndirectCount(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexedIndirectCount( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateRenderPass2( + delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo2*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo2*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateRenderPass2(PfnVkVoidFunction func) + { + return new VkCreateRenderPass2( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo2*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginRenderPass2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkRenderPassBeginInfo*, + VkSubpassBeginInfo*, + void> Invoke = handle; + + public static explicit operator VkCmdBeginRenderPass2(PfnVkVoidFunction func) + { + return new VkCmdBeginRenderPass2( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdNextSubpass2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkSubpassBeginInfo*, + VkSubpassEndInfo*, + void> Invoke = handle; + + public static explicit operator VkCmdNextSubpass2(PfnVkVoidFunction func) + { + return new VkCmdNextSubpass2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRenderPass2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRenderPass2(PfnVkVoidFunction func) + { + return new VkCmdEndRenderPass2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceToolProperties( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkPhysicalDeviceToolProperties*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceToolProperties(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceToolProperties( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreatePrivateDataSlot( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPrivateDataSlotCreateInfo*, + VkAllocationCallbacks*, + VkPrivateDataSlot*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPrivateDataSlotCreateInfo*, + VkAllocationCallbacks*, + VkPrivateDataSlot*, + VkResult> Invoke = handle; + + public static explicit operator VkCreatePrivateDataSlot(PfnVkVoidFunction func) + { + return new VkCreatePrivateDataSlot( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPrivateDataSlotCreateInfo*, + VkAllocationCallbacks*, + VkPrivateDataSlot*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyPrivateDataSlot( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyPrivateDataSlot(PfnVkVoidFunction func) + { + return new VkDestroyPrivateDataSlot( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetPrivateData( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkObjectType, + nint, + VkPrivateDataSlot, + nint, + VkResult> Invoke = handle; + + public static explicit operator VkSetPrivateData(PfnVkVoidFunction func) + { + return new VkSetPrivateData( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPrivateData( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkObjectType, + nint, + VkPrivateDataSlot, + nint*, + void> Invoke = handle; + + public static explicit operator VkGetPrivateData(PfnVkVoidFunction func) + { + return new VkGetPrivateData( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPipelineBarrier2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPipelineBarrier2(PfnVkVoidFunction func) + { + return new VkCmdPipelineBarrier2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteTimestamp2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags2, + VkQueryPool, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteTimestamp2(PfnVkVoidFunction func) + { + return new VkCmdWriteTimestamp2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueSubmit2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueSubmit2(PfnVkVoidFunction func) + { + return new VkQueueSubmit2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyBuffer2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyBuffer2(PfnVkVoidFunction func) + { + return new VkCmdCopyBuffer2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImage2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyImage2(PfnVkVoidFunction func) + { + return new VkCmdCopyImage2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyBufferToImage2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyBufferToImage2(PfnVkVoidFunction func) + { + return new VkCmdCopyBufferToImage2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImageToBuffer2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyImageToBuffer2(PfnVkVoidFunction func) + { + return new VkCmdCopyImageToBuffer2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceBufferMemoryRequirements( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceBufferMemoryRequirements*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceBufferMemoryRequirements(PfnVkVoidFunction func) + { + return new VkGetDeviceBufferMemoryRequirements( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceImageMemoryRequirements( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceImageMemoryRequirements(PfnVkVoidFunction func) + { + return new VkGetDeviceImageMemoryRequirements( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceImageSparseMemoryRequirements( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + int*, + VkSparseImageMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + int*, + VkSparseImageMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceImageSparseMemoryRequirements(PfnVkVoidFunction func) + { + return new VkGetDeviceImageSparseMemoryRequirements( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + int*, + VkSparseImageMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetEvent2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetEvent2(PfnVkVoidFunction func) + { + return new VkCmdSetEvent2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdResetEvent2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdResetEvent2(PfnVkVoidFunction func) + { + return new VkCmdResetEvent2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWaitEvents2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdWaitEvents2(PfnVkVoidFunction func) + { + return new VkCmdWaitEvents2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBlitImage2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBlitImage2(PfnVkVoidFunction func) + { + return new VkCmdBlitImage2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdResolveImage2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdResolveImage2(PfnVkVoidFunction func) + { + return new VkCmdResolveImage2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginRendering( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginRendering(PfnVkVoidFunction func) + { + return new VkCmdBeginRendering( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRendering(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRendering(PfnVkVoidFunction func) + { + return new VkCmdEndRendering((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetCullMode( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCullMode(PfnVkVoidFunction func) + { + return new VkCmdSetCullMode( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetFrontFace( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetFrontFace(PfnVkVoidFunction func) + { + return new VkCmdSetFrontFace((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetPrimitiveTopology( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPrimitiveTopology(PfnVkVoidFunction func) + { + return new VkCmdSetPrimitiveTopology( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetViewportWithCount( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetViewportWithCount(PfnVkVoidFunction func) + { + return new VkCmdSetViewportWithCount( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetScissorWithCount( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetScissorWithCount(PfnVkVoidFunction func) + { + return new VkCmdSetScissorWithCount( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindVertexBuffers2( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + ByteSize64*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + ByteSize64*, + void> Invoke = handle; + + public static explicit operator VkCmdBindVertexBuffers2(PfnVkVoidFunction func) + { + return new VkCmdBindVertexBuffers2( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + ByteSize64*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthTestEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthTestEnable(PfnVkVoidFunction func) + { + return new VkCmdSetDepthTestEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthWriteEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthWriteEnable(PfnVkVoidFunction func) + { + return new VkCmdSetDepthWriteEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthCompareOp( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthCompareOp(PfnVkVoidFunction func) + { + return new VkCmdSetDepthCompareOp( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthBoundsTestEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBoundsTestEnable(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBoundsTestEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilTestEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetStencilTestEnable(PfnVkVoidFunction func) + { + return new VkCmdSetStencilTestEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilOp( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStencilFaceFlags, + VkStencilOp, + VkStencilOp, + VkStencilOp, + VkCompareOp, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStencilFaceFlags, + VkStencilOp, + VkStencilOp, + VkStencilOp, + VkCompareOp, + void> Invoke = handle; + + public static explicit operator VkCmdSetStencilOp(PfnVkVoidFunction func) + { + return new VkCmdSetStencilOp( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStencilFaceFlags, + VkStencilOp, + VkStencilOp, + VkStencilOp, + VkCompareOp, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRasterizerDiscardEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetRasterizerDiscardEnable(PfnVkVoidFunction func) + { + return new VkCmdSetRasterizerDiscardEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthBiasEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBiasEnable(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBiasEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPrimitiveRestartEnable( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPrimitiveRestartEnable(PfnVkVoidFunction func) + { + return new VkCmdSetPrimitiveRestartEnable( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkMapMemory2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkMapMemory2(PfnVkVoidFunction func) + { + return new VkMapMemory2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkUnmapMemory2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkUnmapMemory2(PfnVkVoidFunction func) + { + return new VkUnmapMemory2((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetDeviceImageSubresourceLayout( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageSubresourceInfo*, + VkSubresourceLayout2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceImageSubresourceLayout(PfnVkVoidFunction func) + { + return new VkGetDeviceImageSubresourceLayout( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSubresourceLayout2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImage, + VkImageSubresource2*, + VkSubresourceLayout2*, + void> Invoke = handle; + + public static explicit operator VkGetImageSubresourceLayout2(PfnVkVoidFunction func) + { + return new VkGetImageSubresourceLayout2( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyMemoryToImage( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCopyMemoryToImage(PfnVkVoidFunction func) + { + return new VkCopyMemoryToImage( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyImageToMemory( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCopyImageToMemory(PfnVkVoidFunction func) + { + return new VkCopyImageToMemory( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyImageToImage( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCopyImageToImage(PfnVkVoidFunction func) + { + return new VkCopyImageToImage( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkTransitionImageLayout( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkTransitionImageLayout(PfnVkVoidFunction func) + { + return new VkTransitionImageLayout( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSet( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkWriteDescriptorSet*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkWriteDescriptorSet*, + void> Invoke = handle; + + public static explicit operator VkCmdPushDescriptorSet(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSet( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkWriteDescriptorSet*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSetWithTemplate( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDescriptorUpdateTemplate, + VkPipelineLayout, + int, + void*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDescriptorUpdateTemplate, + VkPipelineLayout, + int, + void*, + void> Invoke = handle; + + public static explicit operator VkCmdPushDescriptorSetWithTemplate(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSetWithTemplate( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDescriptorUpdateTemplate, + VkPipelineLayout, + int, + void*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindDescriptorSets2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindDescriptorSets2(PfnVkVoidFunction func) + { + return new VkCmdBindDescriptorSets2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushConstants2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPushConstants2(PfnVkVoidFunction func) + { + return new VkCmdPushConstants2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSet2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPushDescriptorSet2(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSet2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSetWithTemplate2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdPushDescriptorSetWithTemplate2(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSetWithTemplate2( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLineStipple( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLineStipple(PfnVkVoidFunction func) + { + return new VkCmdSetLineStipple((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdBindIndexBuffer2( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + ByteSize64, + VkIndexType, + void> Invoke = handle; + + public static explicit operator VkCmdBindIndexBuffer2(PfnVkVoidFunction func) + { + return new VkCmdBindIndexBuffer2( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRenderingAreaGranularity( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetRenderingAreaGranularity(PfnVkVoidFunction func) + { + return new VkGetRenderingAreaGranularity( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRenderingAttachmentLocations( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetRenderingAttachmentLocations(PfnVkVoidFunction func) + { + return new VkCmdSetRenderingAttachmentLocations( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRenderingInputAttachmentIndices( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetRenderingInputAttachmentIndices(PfnVkVoidFunction func) + { + return new VkCmdSetRenderingInputAttachmentIndices( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroySurfaceKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroySurfaceKHR(PfnVkVoidFunction func) + { + return new VkDestroySurfaceKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfaceSupportKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkSurfaceKHR, + Brutal.Bool32*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfaceSupportKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfaceSupportKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfaceCapabilitiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkSurfaceKHR, + VkSurfaceCapabilitiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfaceCapabilitiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfaceCapabilitiesKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfaceFormatsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkSurfaceKHR, + int*, + VkSurfaceFormatKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfaceFormatsKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfaceFormatsKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfacePresentModesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkSurfaceKHR, + int*, + VkPresentModeKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfacePresentModesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfacePresentModesKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateSwapchainKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainCreateInfoKHR*, + VkAllocationCallbacks*, + VkSwapchainKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainCreateInfoKHR*, + VkAllocationCallbacks*, + VkSwapchainKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateSwapchainKHR(PfnVkVoidFunction func) + { + return new VkCreateSwapchainKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainCreateInfoKHR*, + VkAllocationCallbacks*, + VkSwapchainKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroySwapchainKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroySwapchainKHR(PfnVkVoidFunction func) + { + return new VkDestroySwapchainKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSwapchainImagesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetSwapchainImagesKHR(PfnVkVoidFunction func) + { + return new VkGetSwapchainImagesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireNextImageKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + nint, + VkSemaphore, + VkFence, + int*, + VkResult> Invoke = handle; + + public static explicit operator VkAcquireNextImageKHR(PfnVkVoidFunction func) + { + return new VkAcquireNextImageKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkQueuePresentKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueuePresentKHR(PfnVkVoidFunction func) + { + return new VkQueuePresentKHR((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetDeviceGroupPresentCapabilitiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDeviceGroupPresentCapabilitiesKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceGroupPresentCapabilitiesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceGroupSurfacePresentModesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSurfaceKHR, + VkDeviceGroupPresentModeFlagsKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDeviceGroupSurfacePresentModesKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceGroupSurfacePresentModesKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDevicePresentRectanglesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDevicePresentRectanglesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDevicePresentRectanglesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireNextImage2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkAcquireNextImage2KHR(PfnVkVoidFunction func) + { + return new VkAcquireNextImage2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceDisplayPropertiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceDisplayPropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceDisplayPropertiesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceDisplayPlanePropertiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkDisplayPlanePropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceDisplayPlanePropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceDisplayPlanePropertiesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDisplayPlaneSupportedDisplaysKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDisplayPlaneSupportedDisplaysKHR(PfnVkVoidFunction func) + { + return new VkGetDisplayPlaneSupportedDisplaysKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDisplayModePropertiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + int*, + VkDisplayModePropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDisplayModePropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetDisplayModePropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + int*, + VkDisplayModePropertiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDisplayModeKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + VkDisplayModeCreateInfoKHR*, + VkAllocationCallbacks*, + VkDisplayModeKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + VkDisplayModeCreateInfoKHR*, + VkAllocationCallbacks*, + VkDisplayModeKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDisplayModeKHR(PfnVkVoidFunction func) + { + return new VkCreateDisplayModeKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + VkDisplayModeCreateInfoKHR*, + VkAllocationCallbacks*, + VkDisplayModeKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDisplayPlaneCapabilitiesKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayModeKHR, + int, + VkDisplayPlaneCapabilitiesKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayModeKHR, + int, + VkDisplayPlaneCapabilitiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDisplayPlaneCapabilitiesKHR(PfnVkVoidFunction func) + { + return new VkGetDisplayPlaneCapabilitiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayModeKHR, + int, + VkDisplayPlaneCapabilitiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDisplayPlaneSurfaceKHR( + delegate* unmanaged[Cdecl]< + VkInstance, + VkDisplaySurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDisplaySurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDisplayPlaneSurfaceKHR(PfnVkVoidFunction func) + { + return new VkCreateDisplayPlaneSurfaceKHR( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkDisplaySurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateSharedSwapchainsKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkSwapchainCreateInfoKHR*, + VkAllocationCallbacks*, + VkSwapchainKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkSwapchainCreateInfoKHR*, + VkAllocationCallbacks*, + VkSwapchainKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateSharedSwapchainsKHR(PfnVkVoidFunction func) + { + return new VkCreateSharedSwapchainsKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkSwapchainCreateInfoKHR*, + VkAllocationCallbacks*, + VkSwapchainKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceVideoCapabilitiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkVideoProfileInfoKHR*, + VkVideoCapabilitiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceVideoCapabilitiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceVideoCapabilitiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkVideoProfileInfoKHR*, + VkVideoCapabilitiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceVideoFormatPropertiesKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceVideoFormatInfoKHR*, + int*, + VkVideoFormatPropertiesKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceVideoFormatInfoKHR*, + int*, + VkVideoFormatPropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceVideoFormatPropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceVideoFormatPropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceVideoFormatInfoKHR*, + int*, + VkVideoFormatPropertiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateVideoSessionKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionCreateInfoKHR*, + VkAllocationCallbacks*, + VkVideoSessionKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionCreateInfoKHR*, + VkAllocationCallbacks*, + VkVideoSessionKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateVideoSessionKHR(PfnVkVoidFunction func) + { + return new VkCreateVideoSessionKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionCreateInfoKHR*, + VkAllocationCallbacks*, + VkVideoSessionKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyVideoSessionKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyVideoSessionKHR(PfnVkVoidFunction func) + { + return new VkDestroyVideoSessionKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetVideoSessionMemoryRequirementsKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionKHR, + int*, + VkVideoSessionMemoryRequirementsKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionKHR, + int*, + VkVideoSessionMemoryRequirementsKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetVideoSessionMemoryRequirementsKHR(PfnVkVoidFunction func) + { + return new VkGetVideoSessionMemoryRequirementsKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionKHR, + int*, + VkVideoSessionMemoryRequirementsKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkBindVideoSessionMemoryKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionKHR, + int, + VkBindVideoSessionMemoryInfoKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkBindVideoSessionMemoryKHR(PfnVkVoidFunction func) + { + return new VkBindVideoSessionMemoryKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionKHR, + int, + VkBindVideoSessionMemoryInfoKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateVideoSessionParametersKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersCreateInfoKHR*, + VkAllocationCallbacks*, + VkVideoSessionParametersKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersCreateInfoKHR*, + VkAllocationCallbacks*, + VkVideoSessionParametersKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateVideoSessionParametersKHR(PfnVkVoidFunction func) + { + return new VkCreateVideoSessionParametersKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersCreateInfoKHR*, + VkAllocationCallbacks*, + VkVideoSessionParametersKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUpdateVideoSessionParametersKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersKHR, + VkVideoSessionParametersUpdateInfoKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersKHR, + VkVideoSessionParametersUpdateInfoKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkUpdateVideoSessionParametersKHR(PfnVkVoidFunction func) + { + return new VkUpdateVideoSessionParametersKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersKHR, + VkVideoSessionParametersUpdateInfoKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyVideoSessionParametersKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoSessionParametersKHR, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyVideoSessionParametersKHR(PfnVkVoidFunction func) + { + return new VkDestroyVideoSessionParametersKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginVideoCodingKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginVideoCodingKHR(PfnVkVoidFunction func) + { + return new VkCmdBeginVideoCodingKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndVideoCodingKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndVideoCodingKHR(PfnVkVoidFunction func) + { + return new VkCmdEndVideoCodingKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdControlVideoCodingKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdControlVideoCodingKHR(PfnVkVoidFunction func) + { + return new VkCmdControlVideoCodingKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDecodeVideoKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDecodeVideoKHR(PfnVkVoidFunction func) + { + return new VkCmdDecodeVideoKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginRenderingKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginRenderingKHR(PfnVkVoidFunction func) + { + return new VkCmdBeginRenderingKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRenderingKHR(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRenderingKHR(PfnVkVoidFunction func) + { + return new VkCmdEndRenderingKHR((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFeatures2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceFeatures2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFeatures2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceProperties2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFormatProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceFormatProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFormatProperties2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceImageFormatProperties2KHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceImageFormatInfo2*, + VkImageFormatProperties2*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceImageFormatInfo2*, + VkImageFormatProperties2*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceImageFormatProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceImageFormatProperties2KHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceImageFormatInfo2*, + VkImageFormatProperties2*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceQueueFamilyProperties2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceMemoryProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceMemoryProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceMemoryProperties2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSparseImageFormatProperties2KHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSparseImageFormatInfo2*, + int*, + VkSparseImageFormatProperties2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSparseImageFormatInfo2*, + int*, + VkSparseImageFormatProperties2*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSparseImageFormatProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSparseImageFormatProperties2KHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSparseImageFormatInfo2*, + int*, + VkSparseImageFormatProperties2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceGroupPeerMemoryFeaturesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDeviceGroupPeerMemoryFeaturesKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceGroupPeerMemoryFeaturesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDeviceMaskKHR(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDeviceMaskKHR(PfnVkVoidFunction func) + { + return new VkCmdSetDeviceMaskKHR((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdDispatchBaseKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDispatchBaseKHR(PfnVkVoidFunction func) + { + return new VkCmdDispatchBaseKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkTrimCommandPoolKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkTrimCommandPoolKHR(PfnVkVoidFunction func) + { + return new VkTrimCommandPoolKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkEnumeratePhysicalDeviceGroupsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + int*, + VkPhysicalDeviceGroupProperties*, + VkResult> Invoke = handle; + + public static explicit operator VkEnumeratePhysicalDeviceGroupsKHR(PfnVkVoidFunction func) + { + return new VkEnumeratePhysicalDeviceGroupsKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalBufferPropertiesKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalBufferInfo*, + VkExternalBufferProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalBufferInfo*, + VkExternalBufferProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalBufferPropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalBufferPropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalBufferInfo*, + VkExternalBufferProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryFdKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetMemoryFdKHR(PfnVkVoidFunction func) + { + return new VkGetMemoryFdKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryFdPropertiesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + int, + VkMemoryFdPropertiesKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + int, + VkMemoryFdPropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryFdPropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetMemoryFdPropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + int, + VkMemoryFdPropertiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalSemaphorePropertiesKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalSemaphoreInfo*, + VkExternalSemaphoreProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalSemaphoreInfo*, + VkExternalSemaphoreProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalSemaphorePropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalSemaphorePropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalSemaphoreInfo*, + VkExternalSemaphoreProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkImportSemaphoreFdKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkImportSemaphoreFdKHR(PfnVkVoidFunction func) + { + return new VkImportSemaphoreFdKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSemaphoreFdKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetSemaphoreFdKHR(PfnVkVoidFunction func) + { + return new VkGetSemaphoreFdKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSetKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkWriteDescriptorSet*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkWriteDescriptorSet*, + void> Invoke = handle; + + public static explicit operator VkCmdPushDescriptorSetKHR(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSetKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + VkWriteDescriptorSet*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSetWithTemplateKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDescriptorUpdateTemplate, + VkPipelineLayout, + int, + void*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDescriptorUpdateTemplate, + VkPipelineLayout, + int, + void*, + void> Invoke = handle; + + public static explicit operator VkCmdPushDescriptorSetWithTemplateKHR(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSetWithTemplateKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDescriptorUpdateTemplate, + VkPipelineLayout, + int, + void*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDescriptorUpdateTemplateKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplateCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorUpdateTemplate*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplateCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorUpdateTemplate*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDescriptorUpdateTemplateKHR(PfnVkVoidFunction func) + { + return new VkCreateDescriptorUpdateTemplateKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplateCreateInfo*, + VkAllocationCallbacks*, + VkDescriptorUpdateTemplate*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDescriptorUpdateTemplateKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorUpdateTemplate, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDescriptorUpdateTemplateKHR(PfnVkVoidFunction func) + { + return new VkDestroyDescriptorUpdateTemplateKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUpdateDescriptorSetWithTemplateKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSet, + VkDescriptorUpdateTemplate, + void*, + void> Invoke = handle; + + public static explicit operator VkUpdateDescriptorSetWithTemplateKHR(PfnVkVoidFunction func) + { + return new VkUpdateDescriptorSetWithTemplateKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateRenderPass2KHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo2*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo2*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateRenderPass2KHR(PfnVkVoidFunction func) + { + return new VkCreateRenderPass2KHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkRenderPassCreateInfo2*, + VkAllocationCallbacks*, + VkRenderPass*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginRenderPass2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkRenderPassBeginInfo*, + VkSubpassBeginInfo*, + void> Invoke = handle; + + public static explicit operator VkCmdBeginRenderPass2KHR(PfnVkVoidFunction func) + { + return new VkCmdBeginRenderPass2KHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdNextSubpass2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkSubpassBeginInfo*, + VkSubpassEndInfo*, + void> Invoke = handle; + + public static explicit operator VkCmdNextSubpass2KHR(PfnVkVoidFunction func) + { + return new VkCmdNextSubpass2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRenderPass2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRenderPass2KHR(PfnVkVoidFunction func) + { + return new VkCmdEndRenderPass2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSwapchainStatusKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetSwapchainStatusKHR(PfnVkVoidFunction func) + { + return new VkGetSwapchainStatusKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalFencePropertiesKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalFenceInfo*, + VkExternalFenceProperties*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalFenceInfo*, + VkExternalFenceProperties*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalFencePropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalFencePropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalFenceInfo*, + VkExternalFenceProperties*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkImportFenceFdKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkImportFenceFdKHR(PfnVkVoidFunction func) + { + return new VkImportFenceFdKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetFenceFdKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetFenceFdKHR(PfnVkVoidFunction func) + { + return new VkGetFenceFdKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkPerformanceCounterKHR*, + VkPerformanceCounterDescriptionKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkPerformanceCounterKHR*, + VkPerformanceCounterDescriptionKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + PfnVkVoidFunction func + ) + { + return new VkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkPerformanceCounterKHR*, + VkPerformanceCounterDescriptionKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkQueryPoolPerformanceCreateInfoKHR*, + int*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireProfilingLockKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkAcquireProfilingLockKHR(PfnVkVoidFunction func) + { + return new VkAcquireProfilingLockKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkReleaseProfilingLockKHR(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkReleaseProfilingLockKHR(PfnVkVoidFunction func) + { + return new VkReleaseProfilingLockKHR((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfaceCapabilities2KHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + VkSurfaceCapabilities2KHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + VkSurfaceCapabilities2KHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfaceCapabilities2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfaceCapabilities2KHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + VkSurfaceCapabilities2KHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfaceFormats2KHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + int*, + VkSurfaceFormat2KHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + int*, + VkSurfaceFormat2KHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfaceFormats2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfaceFormats2KHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + int*, + VkSurfaceFormat2KHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceDisplayProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPhysicalDeviceDisplayProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceDisplayProperties2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceDisplayPlaneProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkDisplayPlaneProperties2KHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceDisplayPlaneProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceDisplayPlaneProperties2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDisplayModeProperties2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + int*, + VkDisplayModeProperties2KHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDisplayModeProperties2KHR(PfnVkVoidFunction func) + { + return new VkGetDisplayModeProperties2KHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayKHR, + int*, + VkDisplayModeProperties2KHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDisplayPlaneCapabilities2KHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayPlaneInfo2KHR*, + VkDisplayPlaneCapabilities2KHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayPlaneInfo2KHR*, + VkDisplayPlaneCapabilities2KHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDisplayPlaneCapabilities2KHR(PfnVkVoidFunction func) + { + return new VkGetDisplayPlaneCapabilities2KHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkDisplayPlaneInfo2KHR*, + VkDisplayPlaneCapabilities2KHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageMemoryRequirements2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageMemoryRequirementsInfo2*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetImageMemoryRequirements2KHR(PfnVkVoidFunction func) + { + return new VkGetImageMemoryRequirements2KHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferMemoryRequirements2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferMemoryRequirementsInfo2*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetBufferMemoryRequirements2KHR(PfnVkVoidFunction func) + { + return new VkGetBufferMemoryRequirements2KHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSparseMemoryRequirements2KHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkImageSparseMemoryRequirementsInfo2*, + int*, + VkSparseImageMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageSparseMemoryRequirementsInfo2*, + int*, + VkSparseImageMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetImageSparseMemoryRequirements2KHR(PfnVkVoidFunction func) + { + return new VkGetImageSparseMemoryRequirements2KHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkImageSparseMemoryRequirementsInfo2*, + int*, + VkSparseImageMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateSamplerYcbcrConversionKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversionCreateInfo*, + VkAllocationCallbacks*, + VkSamplerYCbCrConversion*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversionCreateInfo*, + VkAllocationCallbacks*, + VkSamplerYCbCrConversion*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateSamplerYcbcrConversionKHR(PfnVkVoidFunction func) + { + return new VkCreateSamplerYcbcrConversionKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversionCreateInfo*, + VkAllocationCallbacks*, + VkSamplerYCbCrConversion*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroySamplerYcbcrConversionKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerYCbCrConversion, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroySamplerYcbcrConversionKHR(PfnVkVoidFunction func) + { + return new VkDestroySamplerYcbcrConversionKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkBindBufferMemory2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkBindBufferMemory2KHR(PfnVkVoidFunction func) + { + return new VkBindBufferMemory2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBindImageMemory2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkBindImageMemory2KHR(PfnVkVoidFunction func) + { + return new VkBindImageMemory2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDescriptorSetLayoutSupportKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkDescriptorSetLayoutSupport*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkDescriptorSetLayoutSupport*, + void> Invoke = handle; + + public static explicit operator VkGetDescriptorSetLayoutSupportKHR(PfnVkVoidFunction func) + { + return new VkGetDescriptorSetLayoutSupportKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetLayoutCreateInfo*, + VkDescriptorSetLayoutSupport*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirectCountKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndirectCountKHR(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirectCountKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndexedIndirectCountKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndexedIndirectCountKHR(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexedIndirectCountKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSemaphoreCounterValueKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetSemaphoreCounterValueKHR(PfnVkVoidFunction func) + { + return new VkGetSemaphoreCounterValueKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkWaitSemaphoresKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkWaitSemaphoresKHR(PfnVkVoidFunction func) + { + return new VkWaitSemaphoresKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSignalSemaphoreKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSignalSemaphoreKHR(PfnVkVoidFunction func) + { + return new VkSignalSemaphoreKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceFragmentShadingRatesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkPhysicalDeviceFragmentShadingRateKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceFragmentShadingRatesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceFragmentShadingRatesKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetFragmentShadingRateKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkExtent2D*, + VkFragmentShadingRateCombinerOpKHR*, + void> Invoke = handle; + + public static explicit operator VkCmdSetFragmentShadingRateKHR(PfnVkVoidFunction func) + { + return new VkCmdSetFragmentShadingRateKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRenderingAttachmentLocationsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetRenderingAttachmentLocationsKHR(PfnVkVoidFunction func) + { + return new VkCmdSetRenderingAttachmentLocationsKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRenderingInputAttachmentIndicesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetRenderingInputAttachmentIndicesKHR(PfnVkVoidFunction func) + { + return new VkCmdSetRenderingInputAttachmentIndicesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkWaitForPresentKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkWaitForPresentKHR(PfnVkVoidFunction func) + { + return new VkWaitForPresentKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferDeviceAddressKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetBufferDeviceAddressKHR(PfnVkVoidFunction func) + { + return new VkGetBufferDeviceAddressKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferOpaqueCaptureAddressKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetBufferOpaqueCaptureAddressKHR(PfnVkVoidFunction func) + { + return new VkGetBufferOpaqueCaptureAddressKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceMemoryOpaqueCaptureAddressKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDeviceMemoryOpaqueCaptureAddressKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceMemoryOpaqueCaptureAddressKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDeferredOperationKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAllocationCallbacks*, + VkDeferredOperationKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDeferredOperationKHR(PfnVkVoidFunction func) + { + return new VkCreateDeferredOperationKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDeferredOperationKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDeferredOperationKHR(PfnVkVoidFunction func) + { + return new VkDestroyDeferredOperationKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeferredOperationMaxConcurrencyKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeferredOperationMaxConcurrencyKHR(PfnVkVoidFunction func) + { + return new VkGetDeferredOperationMaxConcurrencyKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeferredOperationResultKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeferredOperationResultKHR(PfnVkVoidFunction func) + { + return new VkGetDeferredOperationResultKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkDeferredOperationJoinKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDeferredOperationJoinKHR(PfnVkVoidFunction func) + { + return new VkDeferredOperationJoinKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineExecutablePropertiesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineInfoKHR*, + int*, + VkPipelineExecutablePropertiesKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineInfoKHR*, + int*, + VkPipelineExecutablePropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPipelineExecutablePropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPipelineExecutablePropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineInfoKHR*, + int*, + VkPipelineExecutablePropertiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineExecutableStatisticsKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineExecutableInfoKHR*, + int*, + VkPipelineExecutableStatisticKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineExecutableInfoKHR*, + int*, + VkPipelineExecutableStatisticKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPipelineExecutableStatisticsKHR(PfnVkVoidFunction func) + { + return new VkGetPipelineExecutableStatisticsKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineExecutableInfoKHR*, + int*, + VkPipelineExecutableStatisticKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineExecutableInternalRepresentationsKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineExecutableInfoKHR*, + int*, + VkPipelineExecutableInternalRepresentationKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineExecutableInfoKHR*, + int*, + VkPipelineExecutableInternalRepresentationKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPipelineExecutableInternalRepresentationsKHR(PfnVkVoidFunction func) + { + return new VkGetPipelineExecutableInternalRepresentationsKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineExecutableInfoKHR*, + int*, + VkPipelineExecutableInternalRepresentationKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkMapMemory2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkMapMemory2KHR(PfnVkVoidFunction func) + { + return new VkMapMemory2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkUnmapMemory2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkUnmapMemory2KHR(PfnVkVoidFunction func) + { + return new VkUnmapMemory2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR*, + VkVideoEncodeQualityLevelPropertiesKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR*, + VkVideoEncodeQualityLevelPropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR*, + VkVideoEncodeQualityLevelPropertiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetEncodedVideoSessionParametersKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoEncodeSessionParametersGetInfoKHR*, + VkVideoEncodeSessionParametersFeedbackInfoKHR*, + nuint*, + void*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoEncodeSessionParametersGetInfoKHR*, + VkVideoEncodeSessionParametersFeedbackInfoKHR*, + nuint*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetEncodedVideoSessionParametersKHR(PfnVkVoidFunction func) + { + return new VkGetEncodedVideoSessionParametersKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkVideoEncodeSessionParametersGetInfoKHR*, + VkVideoEncodeSessionParametersFeedbackInfoKHR*, + nuint*, + void*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEncodeVideoKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEncodeVideoKHR(PfnVkVoidFunction func) + { + return new VkCmdEncodeVideoKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetEvent2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetEvent2KHR(PfnVkVoidFunction func) + { + return new VkCmdSetEvent2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdResetEvent2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdResetEvent2KHR(PfnVkVoidFunction func) + { + return new VkCmdResetEvent2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWaitEvents2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdWaitEvents2KHR(PfnVkVoidFunction func) + { + return new VkCmdWaitEvents2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPipelineBarrier2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPipelineBarrier2KHR(PfnVkVoidFunction func) + { + return new VkCmdPipelineBarrier2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteTimestamp2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags2, + VkQueryPool, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteTimestamp2KHR(PfnVkVoidFunction func) + { + return new VkCmdWriteTimestamp2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueSubmit2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueSubmit2KHR(PfnVkVoidFunction func) + { + return new VkQueueSubmit2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindIndexBuffer3KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindIndexBuffer3KHR(PfnVkVoidFunction func) + { + return new VkCmdBindIndexBuffer3KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindVertexBuffers3KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindVertexBuffer3InfoKHR*, + void> Invoke = handle; + + public static explicit operator VkCmdBindVertexBuffers3KHR(PfnVkVoidFunction func) + { + return new VkCmdBindVertexBuffers3KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirect2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawIndirect2KHR(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirect2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndexedIndirect2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawIndexedIndirect2KHR(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexedIndirect2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDispatchIndirect2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDispatchIndirect2KHR(PfnVkVoidFunction func) + { + return new VkCmdDispatchIndirect2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyMemoryKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryToImageKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdCopyMemoryToImageKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryToImageKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImageToMemoryKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdCopyImageToMemoryKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyImageToMemoryKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdUpdateMemoryKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + ByteSize64, + void*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + ByteSize64, + void*, + void> Invoke = handle; + + public static explicit operator VkCmdUpdateMemoryKHR(PfnVkVoidFunction func) + { + return new VkCmdUpdateMemoryKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + ByteSize64, + void*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdFillMemoryKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + int, + void> Invoke = handle; + + public static explicit operator VkCmdFillMemoryKHR(PfnVkVoidFunction func) + { + return new VkCmdFillMemoryKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyQueryPoolResultsToMemoryKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + int, + VkStridedDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + VkQueryResultFlags, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + int, + VkStridedDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + VkQueryResultFlags, + void> Invoke = handle; + + public static explicit operator VkCmdCopyQueryPoolResultsToMemoryKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyQueryPoolResultsToMemoryKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + int, + VkStridedDeviceAddressRangeKHR*, + VkAddressCommandFlagsKHR, + VkQueryResultFlags, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirectCount2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawIndirectCount2KHR(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirectCount2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndexedIndirectCount2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawIndexedIndirectCount2KHR(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexedIndirectCount2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginConditionalRendering2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBeginConditionalRendering2EXT(PfnVkVoidFunction func) + { + return new VkCmdBeginConditionalRendering2EXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindTransformFeedbackBuffers2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindTransformFeedbackBuffer2InfoEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdBindTransformFeedbackBuffers2EXT(PfnVkVoidFunction func) + { + return new VkCmdBindTransformFeedbackBuffers2EXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginTransformFeedback2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindTransformFeedbackBuffer2InfoEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdBeginTransformFeedback2EXT(PfnVkVoidFunction func) + { + return new VkCmdBeginTransformFeedback2EXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndTransformFeedback2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindTransformFeedbackBuffer2InfoEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdEndTransformFeedback2EXT(PfnVkVoidFunction func) + { + return new VkCmdEndTransformFeedback2EXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirectByteCount2EXT( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindTransformFeedbackBuffer2InfoEXT*, + int, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindTransformFeedbackBuffer2InfoEXT*, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndirectByteCount2EXT(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirectByteCount2EXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBindTransformFeedbackBuffer2InfoEXT*, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksIndirect2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawMeshTasksIndirect2EXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksIndirect2EXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksIndirectCount2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawMeshTasksIndirectCount2EXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksIndirectCount2EXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteMarkerToMemoryAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdWriteMarkerToMemoryAMD(PfnVkVoidFunction func) + { + return new VkCmdWriteMarkerToMemoryAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateAccelerationStructure2KHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfo2KHR*, + VkAllocationCallbacks*, + VkAccelerationStructureKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfo2KHR*, + VkAllocationCallbacks*, + VkAccelerationStructureKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateAccelerationStructure2KHR(PfnVkVoidFunction func) + { + return new VkCreateAccelerationStructure2KHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfo2KHR*, + VkAllocationCallbacks*, + VkAccelerationStructureKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyBuffer2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyBuffer2KHR(PfnVkVoidFunction func) + { + return new VkCmdCopyBuffer2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImage2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyImage2KHR(PfnVkVoidFunction func) + { + return new VkCmdCopyImage2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyBufferToImage2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyBufferToImage2KHR(PfnVkVoidFunction func) + { + return new VkCmdCopyBufferToImage2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyImageToBuffer2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyImageToBuffer2KHR(PfnVkVoidFunction func) + { + return new VkCmdCopyImageToBuffer2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBlitImage2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBlitImage2KHR(PfnVkVoidFunction func) + { + return new VkCmdBlitImage2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdResolveImage2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdResolveImage2KHR(PfnVkVoidFunction func) + { + return new VkCmdResolveImage2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdTraceRaysIndirect2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdTraceRaysIndirect2KHR(PfnVkVoidFunction func) + { + return new VkCmdTraceRaysIndirect2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceBufferMemoryRequirementsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceBufferMemoryRequirements*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceBufferMemoryRequirementsKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceBufferMemoryRequirementsKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceImageMemoryRequirementsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceImageMemoryRequirementsKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceImageMemoryRequirementsKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceImageSparseMemoryRequirementsKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + int*, + VkSparseImageMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + int*, + VkSparseImageMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceImageSparseMemoryRequirementsKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceImageSparseMemoryRequirementsKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageMemoryRequirements*, + int*, + VkSparseImageMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindIndexBuffer2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + ByteSize64, + VkIndexType, + void> Invoke = handle; + + public static explicit operator VkCmdBindIndexBuffer2KHR(PfnVkVoidFunction func) + { + return new VkCmdBindIndexBuffer2KHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRenderingAreaGranularityKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetRenderingAreaGranularityKHR(PfnVkVoidFunction func) + { + return new VkGetRenderingAreaGranularityKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceImageSubresourceLayoutKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceImageSubresourceInfo*, + VkSubresourceLayout2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceImageSubresourceLayoutKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceImageSubresourceLayoutKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSubresourceLayout2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImage, + VkImageSubresource2*, + VkSubresourceLayout2*, + void> Invoke = handle; + + public static explicit operator VkGetImageSubresourceLayout2KHR(PfnVkVoidFunction func) + { + return new VkGetImageSubresourceLayout2KHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkWaitForPresent2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkWaitForPresent2KHR(PfnVkVoidFunction func) + { + return new VkWaitForPresent2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreatePipelineBinariesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineBinaryCreateInfoKHR*, + VkAllocationCallbacks*, + VkPipelineBinaryHandlesInfoKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineBinaryCreateInfoKHR*, + VkAllocationCallbacks*, + VkPipelineBinaryHandlesInfoKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreatePipelineBinariesKHR(PfnVkVoidFunction func) + { + return new VkCreatePipelineBinariesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineBinaryCreateInfoKHR*, + VkAllocationCallbacks*, + VkPipelineBinaryHandlesInfoKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyPipelineBinaryKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyPipelineBinaryKHR(PfnVkVoidFunction func) + { + return new VkDestroyPipelineBinaryKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineKeyKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCreateInfoKHR*, + VkPipelineBinaryKeyKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPipelineKeyKHR(PfnVkVoidFunction func) + { + return new VkGetPipelineKeyKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineBinaryDataKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineBinaryDataInfoKHR*, + VkPipelineBinaryKeyKHR*, + nuint*, + void*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineBinaryDataInfoKHR*, + VkPipelineBinaryKeyKHR*, + nuint*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPipelineBinaryDataKHR(PfnVkVoidFunction func) + { + return new VkGetPipelineBinaryDataKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineBinaryDataInfoKHR*, + VkPipelineBinaryKeyKHR*, + nuint*, + void*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkReleaseCapturedPipelineDataKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkReleaseCapturedPipelineDataInfoKHR*, + VkAllocationCallbacks*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkReleaseCapturedPipelineDataInfoKHR*, + VkAllocationCallbacks*, + VkResult> Invoke = handle; + + public static explicit operator VkReleaseCapturedPipelineDataKHR(PfnVkVoidFunction func) + { + return new VkReleaseCapturedPipelineDataKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkReleaseCapturedPipelineDataInfoKHR*, + VkAllocationCallbacks*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkReleaseSwapchainImagesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkReleaseSwapchainImagesKHR(PfnVkVoidFunction func) + { + return new VkReleaseSwapchainImagesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkCooperativeMatrixPropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLineStippleKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLineStippleKHR(PfnVkVoidFunction func) + { + return new VkCmdSetLineStippleKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceCalibrateableTimeDomainsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceCalibrateableTimeDomainsKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceCalibrateableTimeDomainsKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetCalibratedTimestampsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkCalibratedTimestampInfoKHR*, + nint*, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetCalibratedTimestampsKHR(PfnVkVoidFunction func) + { + return new VkGetCalibratedTimestampsKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindDescriptorSets2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindDescriptorSets2KHR(PfnVkVoidFunction func) + { + return new VkCmdBindDescriptorSets2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushConstants2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPushConstants2KHR(PfnVkVoidFunction func) + { + return new VkCmdPushConstants2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSet2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPushDescriptorSet2KHR(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSet2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDescriptorSetWithTemplate2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdPushDescriptorSetWithTemplate2KHR(PfnVkVoidFunction func) + { + return new VkCmdPushDescriptorSetWithTemplate2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDescriptorBufferOffsets2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetDescriptorBufferOffsets2EXT(PfnVkVoidFunction func) + { + return new VkCmdSetDescriptorBufferOffsets2EXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindDescriptorBufferEmbeddedSamplers2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBindDescriptorBufferEmbeddedSamplersInfoEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdBindDescriptorBufferEmbeddedSamplers2EXT(PfnVkVoidFunction func) + { + return new VkCmdBindDescriptorBufferEmbeddedSamplers2EXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryIndirectKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyMemoryIndirectKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryIndirectKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryToImageIndirectKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdCopyMemoryToImageIndirectKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryToImageIndirectKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceFaultReportsKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDeviceFaultReportsKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceFaultReportsKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceFaultDebugInfoKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceFaultDebugInfoKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceFaultDebugInfoKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRendering2KHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRendering2KHR(PfnVkVoidFunction func) + { + return new VkCmdEndRendering2KHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDebugReportCallbackEXT( + delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportCallbackCreateInfoEXT*, + VkAllocationCallbacks*, + VkDebugReportCallbackEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportCallbackCreateInfoEXT*, + VkAllocationCallbacks*, + VkDebugReportCallbackEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDebugReportCallbackEXT(PfnVkVoidFunction func) + { + return new VkCreateDebugReportCallbackEXT( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportCallbackCreateInfoEXT*, + VkAllocationCallbacks*, + VkDebugReportCallbackEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDebugReportCallbackEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportCallbackEXT, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDebugReportCallbackEXT(PfnVkVoidFunction func) + { + return new VkDestroyDebugReportCallbackEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDebugReportMessageEXT( + delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportFlagsEXT, + VkDebugReportObjectTypeEXT, + nint, + nuint, + int, + byte*, + byte*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportFlagsEXT, + VkDebugReportObjectTypeEXT, + nint, + nuint, + int, + byte*, + byte*, + void> Invoke = handle; + + public static explicit operator VkDebugReportMessageEXT(PfnVkVoidFunction func) + { + return new VkDebugReportMessageEXT( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugReportFlagsEXT, + VkDebugReportObjectTypeEXT, + nint, + nuint, + int, + byte*, + byte*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDebugMarkerSetObjectTagEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDebugMarkerSetObjectTagEXT(PfnVkVoidFunction func) + { + return new VkDebugMarkerSetObjectTagEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkDebugMarkerSetObjectNameEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDebugMarkerSetObjectNameEXT(PfnVkVoidFunction func) + { + return new VkDebugMarkerSetObjectNameEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDebugMarkerBeginEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDebugMarkerBeginEXT(PfnVkVoidFunction func) + { + return new VkCmdDebugMarkerBeginEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDebugMarkerEndEXT(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDebugMarkerEndEXT(PfnVkVoidFunction func) + { + return new VkCmdDebugMarkerEndEXT((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdDebugMarkerInsertEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDebugMarkerInsertEXT(PfnVkVoidFunction func) + { + return new VkCmdDebugMarkerInsertEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindTransformFeedbackBuffersEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + void> Invoke = handle; + + public static explicit operator VkCmdBindTransformFeedbackBuffersEXT(PfnVkVoidFunction func) + { + return new VkCmdBindTransformFeedbackBuffersEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginTransformFeedbackEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBeginTransformFeedbackEXT(PfnVkVoidFunction func) + { + return new VkCmdBeginTransformFeedbackEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndTransformFeedbackEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdEndTransformFeedbackEXT(PfnVkVoidFunction func) + { + return new VkCmdEndTransformFeedbackEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginQueryIndexedEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkQueryPool, + int, + VkQueryControlFlags, + int, + void> Invoke = handle; + + public static explicit operator VkCmdBeginQueryIndexedEXT(PfnVkVoidFunction func) + { + return new VkCmdBeginQueryIndexedEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndQueryIndexedEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndQueryIndexedEXT(PfnVkVoidFunction func) + { + return new VkCmdEndQueryIndexedEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirectByteCountEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndirectByteCountEXT(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirectByteCountEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateCuModuleNVX( + delegate* unmanaged[Cdecl]< + VkDevice, + VkCuModuleCreateInfoNVX*, + VkAllocationCallbacks*, + VkCuModuleNVX*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkCuModuleCreateInfoNVX*, + VkAllocationCallbacks*, + VkCuModuleNVX*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateCuModuleNVX(PfnVkVoidFunction func) + { + return new VkCreateCuModuleNVX( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkCuModuleCreateInfoNVX*, + VkAllocationCallbacks*, + VkCuModuleNVX*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateCuFunctionNVX( + delegate* unmanaged[Cdecl]< + VkDevice, + VkCuFunctionCreateInfoNVX*, + VkAllocationCallbacks*, + VkCuFunctionNVX*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkCuFunctionCreateInfoNVX*, + VkAllocationCallbacks*, + VkCuFunctionNVX*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateCuFunctionNVX(PfnVkVoidFunction func) + { + return new VkCreateCuFunctionNVX( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkCuFunctionCreateInfoNVX*, + VkAllocationCallbacks*, + VkCuFunctionNVX*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyCuModuleNVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyCuModuleNVX(PfnVkVoidFunction func) + { + return new VkDestroyCuModuleNVX( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyCuFunctionNVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyCuFunctionNVX(PfnVkVoidFunction func) + { + return new VkDestroyCuFunctionNVX( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCuLaunchKernelNVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCuLaunchKernelNVX(PfnVkVoidFunction func) + { + return new VkCmdCuLaunchKernelNVX( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageViewHandleNVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetImageViewHandleNVX(PfnVkVoidFunction func) + { + return new VkGetImageViewHandleNVX( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageViewHandle64NVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetImageViewHandle64NVX(PfnVkVoidFunction func) + { + return new VkGetImageViewHandle64NVX( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageViewAddressNVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageView, + VkImageViewAddressPropertiesNVX*, + VkResult> Invoke = handle; + + public static explicit operator VkGetImageViewAddressNVX(PfnVkVoidFunction func) + { + return new VkGetImageViewAddressNVX( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceCombinedImageSamplerIndexNVX( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceCombinedImageSamplerIndexNVX(PfnVkVoidFunction func) + { + return new VkGetDeviceCombinedImageSamplerIndexNVX( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndirectCountAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndirectCountAMD(PfnVkVoidFunction func) + { + return new VkCmdDrawIndirectCountAMD( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawIndexedIndirectCountAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawIndexedIndirectCountAMD(PfnVkVoidFunction func) + { + return new VkCmdDrawIndexedIndirectCountAMD( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetShaderInfoAMD( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipeline, + VkShaderStageFlags, + VkShaderInfoTypeAMD, + nuint*, + void*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipeline, + VkShaderStageFlags, + VkShaderInfoTypeAMD, + nuint*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetShaderInfoAMD(PfnVkVoidFunction func) + { + return new VkGetShaderInfoAMD( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipeline, + VkShaderStageFlags, + VkShaderInfoTypeAMD, + nuint*, + void*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalImageFormatPropertiesNV( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkImageTiling, + VkImageUsageFlags, + VkImageCreateFlags, + VkExternalMemoryHandleTypeFlagsNV, + VkExternalImageFormatPropertiesNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkImageTiling, + VkImageUsageFlags, + VkImageCreateFlags, + VkExternalMemoryHandleTypeFlagsNV, + VkExternalImageFormatPropertiesNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalImageFormatPropertiesNV(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalImageFormatPropertiesNV( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkFormat, + VkImageType, + VkImageTiling, + VkImageUsageFlags, + VkImageCreateFlags, + VkExternalMemoryHandleTypeFlagsNV, + VkExternalImageFormatPropertiesNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginConditionalRenderingEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBeginConditionalRenderingEXT(PfnVkVoidFunction func) + { + return new VkCmdBeginConditionalRenderingEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndConditionalRenderingEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndConditionalRenderingEXT(PfnVkVoidFunction func) + { + return new VkCmdEndConditionalRenderingEXT((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetViewportWScalingNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetViewportWScalingNV(PfnVkVoidFunction func) + { + return new VkCmdSetViewportWScalingNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkReleaseDisplayEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkReleaseDisplayEXT(PfnVkVoidFunction func) + { + return new VkReleaseDisplayEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfaceCapabilities2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkSurfaceKHR, + VkSurfaceCapabilities2EXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfaceCapabilities2EXT(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfaceCapabilities2EXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDisplayPowerControlEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDisplayPowerControlEXT(PfnVkVoidFunction func) + { + return new VkDisplayPowerControlEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkRegisterDeviceEventEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceEventInfoEXT*, + VkAllocationCallbacks*, + VkFence*, + VkResult> Invoke = handle; + + public static explicit operator VkRegisterDeviceEventEXT(PfnVkVoidFunction func) + { + return new VkRegisterDeviceEventEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceEventInfoEXT*, + VkAllocationCallbacks*, + VkFence*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkRegisterDisplayEventEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDisplayKHR, + VkDisplayEventInfoEXT*, + VkAllocationCallbacks*, + VkFence*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDisplayKHR, + VkDisplayEventInfoEXT*, + VkAllocationCallbacks*, + VkFence*, + VkResult> Invoke = handle; + + public static explicit operator VkRegisterDisplayEventEXT(PfnVkVoidFunction func) + { + return new VkRegisterDisplayEventEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDisplayKHR, + VkDisplayEventInfoEXT*, + VkAllocationCallbacks*, + VkFence*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSwapchainCounterEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkSurfaceCounterFlagsEXT, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetSwapchainCounterEXT(PfnVkVoidFunction func) + { + return new VkGetSwapchainCounterEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRefreshCycleDurationGOOGLE( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkRefreshCycleDurationGOOGLE*, + VkResult> Invoke = handle; + + public static explicit operator VkGetRefreshCycleDurationGOOGLE(PfnVkVoidFunction func) + { + return new VkGetRefreshCycleDurationGOOGLE( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPastPresentationTimingGOOGLE( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + int*, + VkPastPresentationTimingGOOGLE*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPastPresentationTimingGOOGLE(PfnVkVoidFunction func) + { + return new VkGetPastPresentationTimingGOOGLE( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDiscardRectangleEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDiscardRectangleEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDiscardRectangleEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDiscardRectangleEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDiscardRectangleEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDiscardRectangleEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDiscardRectangleModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDiscardRectangleModeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDiscardRectangleModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetHdrMetadataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkSetHdrMetadataEXT(PfnVkVoidFunction func) + { + return new VkSetHdrMetadataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetDebugUtilsObjectNameEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetDebugUtilsObjectNameEXT(PfnVkVoidFunction func) + { + return new VkSetDebugUtilsObjectNameEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetDebugUtilsObjectTagEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetDebugUtilsObjectTagEXT(PfnVkVoidFunction func) + { + return new VkSetDebugUtilsObjectTagEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueBeginDebugUtilsLabelEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueBeginDebugUtilsLabelEXT(PfnVkVoidFunction func) + { + return new VkQueueBeginDebugUtilsLabelEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueEndDebugUtilsLabelEXT(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueEndDebugUtilsLabelEXT(PfnVkVoidFunction func) + { + return new VkQueueEndDebugUtilsLabelEXT((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkQueueInsertDebugUtilsLabelEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueInsertDebugUtilsLabelEXT(PfnVkVoidFunction func) + { + return new VkQueueInsertDebugUtilsLabelEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginDebugUtilsLabelEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginDebugUtilsLabelEXT(PfnVkVoidFunction func) + { + return new VkCmdBeginDebugUtilsLabelEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndDebugUtilsLabelEXT(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndDebugUtilsLabelEXT(PfnVkVoidFunction func) + { + return new VkCmdEndDebugUtilsLabelEXT((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdInsertDebugUtilsLabelEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdInsertDebugUtilsLabelEXT(PfnVkVoidFunction func) + { + return new VkCmdInsertDebugUtilsLabelEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDebugUtilsMessengerEXT( + delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessengerCreateInfoEXT*, + VkAllocationCallbacks*, + VkDebugUtilsMessengerEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessengerCreateInfoEXT*, + VkAllocationCallbacks*, + VkDebugUtilsMessengerEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDebugUtilsMessengerEXT(PfnVkVoidFunction func) + { + return new VkCreateDebugUtilsMessengerEXT( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessengerCreateInfoEXT*, + VkAllocationCallbacks*, + VkDebugUtilsMessengerEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDebugUtilsMessengerEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessengerEXT, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDebugUtilsMessengerEXT(PfnVkVoidFunction func) + { + return new VkDestroyDebugUtilsMessengerEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkSubmitDebugUtilsMessageEXT( + delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessageSeverityFlagsEXT, + VkDebugUtilsMessageTypeFlagsEXT, + VkDebugUtilsMessengerCallbackDataEXT*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessageSeverityFlagsEXT, + VkDebugUtilsMessageTypeFlagsEXT, + VkDebugUtilsMessengerCallbackDataEXT*, + void> Invoke = handle; + + public static explicit operator VkSubmitDebugUtilsMessageEXT(PfnVkVoidFunction func) + { + return new VkSubmitDebugUtilsMessageEXT( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkDebugUtilsMessageSeverityFlagsEXT, + VkDebugUtilsMessageTypeFlagsEXT, + VkDebugUtilsMessengerCallbackDataEXT*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateGpaSessionAMD( + delegate* unmanaged[Cdecl]< + VkDevice, + VkGpaSessionCreateInfoAMD*, + VkAllocationCallbacks*, + VkGpaSessionAMD*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkGpaSessionCreateInfoAMD*, + VkAllocationCallbacks*, + VkGpaSessionAMD*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateGpaSessionAMD(PfnVkVoidFunction func) + { + return new VkCreateGpaSessionAMD( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkGpaSessionCreateInfoAMD*, + VkAllocationCallbacks*, + VkGpaSessionAMD*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyGpaSessionAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyGpaSessionAMD(PfnVkVoidFunction func) + { + return new VkDestroyGpaSessionAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetGpaDeviceClockModeAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetGpaDeviceClockModeAMD(PfnVkVoidFunction func) + { + return new VkSetGpaDeviceClockModeAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetGpaDeviceClockInfoAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetGpaDeviceClockInfoAMD(PfnVkVoidFunction func) + { + return new VkGetGpaDeviceClockInfoAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginGpaSessionAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginGpaSessionAMD(PfnVkVoidFunction func) + { + return new VkCmdBeginGpaSessionAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndGpaSessionAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndGpaSessionAMD(PfnVkVoidFunction func) + { + return new VkCmdEndGpaSessionAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginGpaSampleAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkGpaSessionAMD, + VkGpaSampleBeginInfoAMD*, + int*, + VkResult> Invoke = handle; + + public static explicit operator VkCmdBeginGpaSampleAMD(PfnVkVoidFunction func) + { + return new VkCmdBeginGpaSampleAMD( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndGpaSampleAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndGpaSampleAMD(PfnVkVoidFunction func) + { + return new VkCmdEndGpaSampleAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetGpaSessionStatusAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetGpaSessionStatusAMD(PfnVkVoidFunction func) + { + return new VkGetGpaSessionStatusAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetGpaSessionResultsAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetGpaSessionResultsAMD(PfnVkVoidFunction func) + { + return new VkGetGpaSessionResultsAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkResetGpaSessionAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkResetGpaSessionAMD(PfnVkVoidFunction func) + { + return new VkResetGpaSessionAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyGpaSessionResultsAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyGpaSessionResultsAMD(PfnVkVoidFunction func) + { + return new VkCmdCopyGpaSessionResultsAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkWriteSamplerDescriptorsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkSamplerCreateInfo*, + VkHostAddressRangeEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkWriteSamplerDescriptorsEXT(PfnVkVoidFunction func) + { + return new VkWriteSamplerDescriptorsEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkWriteResourceDescriptorsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkResourceDescriptorInfoEXT*, + VkHostAddressRangeEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkWriteResourceDescriptorsEXT(PfnVkVoidFunction func) + { + return new VkWriteResourceDescriptorsEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkResourceDescriptorInfoEXT*, + VkHostAddressRangeEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindSamplerHeapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindSamplerHeapEXT(PfnVkVoidFunction func) + { + return new VkCmdBindSamplerHeapEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindResourceHeapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindResourceHeapEXT(PfnVkVoidFunction func) + { + return new VkCmdBindResourceHeapEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPushDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPushDataEXT(PfnVkVoidFunction func) + { + return new VkCmdPushDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageOpaqueCaptureDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetImageOpaqueCaptureDataEXT(PfnVkVoidFunction func) + { + return new VkGetImageOpaqueCaptureDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceDescriptorSizeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceDescriptorSizeEXT(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceDescriptorSizeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkRegisterCustomBorderColorEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerCustomBorderColorCreateInfoEXT*, + Brutal.Bool32, + int*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerCustomBorderColorCreateInfoEXT*, + Brutal.Bool32, + int*, + VkResult> Invoke = handle; + + public static explicit operator VkRegisterCustomBorderColorEXT(PfnVkVoidFunction func) + { + return new VkRegisterCustomBorderColorEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerCustomBorderColorCreateInfoEXT*, + Brutal.Bool32, + int*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUnregisterCustomBorderColorEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkUnregisterCustomBorderColorEXT(PfnVkVoidFunction func) + { + return new VkUnregisterCustomBorderColorEXT((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetTensorOpaqueCaptureDataARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkTensorARM*, + VkHostAddressRangeEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetTensorOpaqueCaptureDataARM(PfnVkVoidFunction func) + { + return new VkGetTensorOpaqueCaptureDataARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetSampleLocationsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetSampleLocationsEXT(PfnVkVoidFunction func) + { + return new VkCmdSetSampleLocationsEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceMultisamplePropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkSampleCountFlags, + VkMultisamplePropertiesEXT*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceMultisamplePropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceMultisamplePropertiesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageDrmFormatModifierPropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImage, + VkImageDrmFormatModifierPropertiesEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetImageDrmFormatModifierPropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetImageDrmFormatModifierPropertiesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateValidationCacheEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkValidationCacheCreateInfoEXT*, + VkAllocationCallbacks*, + VkValidationCacheEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkValidationCacheCreateInfoEXT*, + VkAllocationCallbacks*, + VkValidationCacheEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateValidationCacheEXT(PfnVkVoidFunction func) + { + return new VkCreateValidationCacheEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkValidationCacheCreateInfoEXT*, + VkAllocationCallbacks*, + VkValidationCacheEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyValidationCacheEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkValidationCacheEXT, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyValidationCacheEXT(PfnVkVoidFunction func) + { + return new VkDestroyValidationCacheEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkMergeValidationCachesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkValidationCacheEXT, + int, + VkValidationCacheEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkMergeValidationCachesEXT(PfnVkVoidFunction func) + { + return new VkMergeValidationCachesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetValidationCacheDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetValidationCacheDataEXT(PfnVkVoidFunction func) + { + return new VkGetValidationCacheDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindShadingRateImageNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindShadingRateImageNV(PfnVkVoidFunction func) + { + return new VkCmdBindShadingRateImageNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetViewportShadingRatePaletteNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetViewportShadingRatePaletteNV(PfnVkVoidFunction func) + { + return new VkCmdSetViewportShadingRatePaletteNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoarseSampleOrderNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkCoarseSampleOrderTypeNV, + int, + VkCoarseSampleOrderCustomNV*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkCoarseSampleOrderTypeNV, + int, + VkCoarseSampleOrderCustomNV*, + void> Invoke = handle; + + public static explicit operator VkCmdSetCoarseSampleOrderNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoarseSampleOrderNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkCoarseSampleOrderTypeNV, + int, + VkCoarseSampleOrderCustomNV*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateAccelerationStructureNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfoNV*, + VkAllocationCallbacks*, + VkAccelerationStructureNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfoNV*, + VkAllocationCallbacks*, + VkAccelerationStructureNV*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateAccelerationStructureNV(PfnVkVoidFunction func) + { + return new VkCreateAccelerationStructureNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfoNV*, + VkAllocationCallbacks*, + VkAccelerationStructureNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyAccelerationStructureNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureNV, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyAccelerationStructureNV(PfnVkVoidFunction func) + { + return new VkDestroyAccelerationStructureNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetAccelerationStructureMemoryRequirementsNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureMemoryRequirementsInfoNV*, + VkMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureMemoryRequirementsInfoNV*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetAccelerationStructureMemoryRequirementsNV(PfnVkVoidFunction func) + { + return new VkGetAccelerationStructureMemoryRequirementsNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureMemoryRequirementsInfoNV*, + VkMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkBindAccelerationStructureMemoryNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkBindAccelerationStructureMemoryInfoNV*, + VkResult> Invoke = handle; + + public static explicit operator VkBindAccelerationStructureMemoryNV(PfnVkVoidFunction func) + { + return new VkBindAccelerationStructureMemoryNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBuildAccelerationStructureNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkAccelerationStructureInfoNV*, + VkBuffer, + ByteSize64, + Brutal.Bool32, + VkAccelerationStructureNV, + VkAccelerationStructureNV, + VkBuffer, + ByteSize64, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkAccelerationStructureInfoNV*, + VkBuffer, + ByteSize64, + Brutal.Bool32, + VkAccelerationStructureNV, + VkAccelerationStructureNV, + VkBuffer, + ByteSize64, + void> Invoke = handle; + + public static explicit operator VkCmdBuildAccelerationStructureNV(PfnVkVoidFunction func) + { + return new VkCmdBuildAccelerationStructureNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkAccelerationStructureInfoNV*, + VkBuffer, + ByteSize64, + Brutal.Bool32, + VkAccelerationStructureNV, + VkAccelerationStructureNV, + VkBuffer, + ByteSize64, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyAccelerationStructureNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkAccelerationStructureNV, + VkAccelerationStructureNV, + VkCopyAccelerationStructureModeKHR, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkAccelerationStructureNV, + VkAccelerationStructureNV, + VkCopyAccelerationStructureModeKHR, + void> Invoke = handle; + + public static explicit operator VkCmdCopyAccelerationStructureNV(PfnVkVoidFunction func) + { + return new VkCmdCopyAccelerationStructureNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkAccelerationStructureNV, + VkAccelerationStructureNV, + VkCopyAccelerationStructureModeKHR, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdTraceRaysNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + int, + int, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + int, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdTraceRaysNV(PfnVkVoidFunction func) + { + return new VkCmdTraceRaysNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + VkBuffer, + ByteSize64, + ByteSize64, + int, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateRayTracingPipelinesNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkRayTracingPipelineCreateInfoNV*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkRayTracingPipelineCreateInfoNV*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateRayTracingPipelinesNV(PfnVkVoidFunction func) + { + return new VkCreateRayTracingPipelinesNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineCache, + int, + VkRayTracingPipelineCreateInfoNV*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRayTracingShaderGroupHandlesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetRayTracingShaderGroupHandlesKHR(PfnVkVoidFunction func) + { + return new VkGetRayTracingShaderGroupHandlesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRayTracingShaderGroupHandlesNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetRayTracingShaderGroupHandlesNV(PfnVkVoidFunction func) + { + return new VkGetRayTracingShaderGroupHandlesNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetAccelerationStructureHandleNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetAccelerationStructureHandleNV(PfnVkVoidFunction func) + { + return new VkGetAccelerationStructureHandleNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteAccelerationStructuresPropertiesNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureNV*, + VkQueryType, + VkQueryPool, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureNV*, + VkQueryType, + VkQueryPool, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteAccelerationStructuresPropertiesNV(PfnVkVoidFunction func) + { + return new VkCmdWriteAccelerationStructuresPropertiesNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureNV*, + VkQueryType, + VkQueryPool, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCompileDeferredNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCompileDeferredNV(PfnVkVoidFunction func) + { + return new VkCompileDeferredNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryHostPointerPropertiesEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + void*, + VkMemoryHostPointerPropertiesEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + void*, + VkMemoryHostPointerPropertiesEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryHostPointerPropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetMemoryHostPointerPropertiesEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + void*, + VkMemoryHostPointerPropertiesEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteBufferMarkerAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags, + VkBuffer, + ByteSize64, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteBufferMarkerAMD(PfnVkVoidFunction func) + { + return new VkCmdWriteBufferMarkerAMD( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteBufferMarker2AMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineStageFlags2, + VkBuffer, + ByteSize64, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteBufferMarker2AMD(PfnVkVoidFunction func) + { + return new VkCmdWriteBufferMarker2AMD( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceCalibrateableTimeDomainsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceCalibrateableTimeDomainsEXT(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceCalibrateableTimeDomainsEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetCalibratedTimestampsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkCalibratedTimestampInfoKHR*, + nint*, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetCalibratedTimestampsEXT(PfnVkVoidFunction func) + { + return new VkGetCalibratedTimestampsEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawMeshTasksNV(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksNV((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksIndirectNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdDrawMeshTasksIndirectNV(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksIndirectNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksIndirectCountNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawMeshTasksIndirectCountNV(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksIndirectCountNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetExclusiveScissorEnableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetExclusiveScissorEnableNV(PfnVkVoidFunction func) + { + return new VkCmdSetExclusiveScissorEnableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetExclusiveScissorNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetExclusiveScissorNV(PfnVkVoidFunction func) + { + return new VkCmdSetExclusiveScissorNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCheckpointNV(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCheckpointNV(PfnVkVoidFunction func) + { + return new VkCmdSetCheckpointNV((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetQueueCheckpointDataNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetQueueCheckpointDataNV(PfnVkVoidFunction func) + { + return new VkGetQueueCheckpointDataNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetQueueCheckpointData2NV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetQueueCheckpointData2NV(PfnVkVoidFunction func) + { + return new VkGetQueueCheckpointData2NV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetSwapchainPresentTimingQueueSizeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetSwapchainPresentTimingQueueSizeEXT(PfnVkVoidFunction func) + { + return new VkSetSwapchainPresentTimingQueueSizeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSwapchainTimingPropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkSwapchainTimingPropertiesEXT*, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetSwapchainTimingPropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetSwapchainTimingPropertiesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSwapchainTimeDomainPropertiesEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkSwapchainTimeDomainPropertiesEXT*, + nint*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkSwapchainTimeDomainPropertiesEXT*, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetSwapchainTimeDomainPropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetSwapchainTimeDomainPropertiesEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkSwapchainTimeDomainPropertiesEXT*, + nint*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPastPresentationTimingEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPastPresentationTimingInfoEXT*, + VkPastPresentationTimingPropertiesEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPastPresentationTimingInfoEXT*, + VkPastPresentationTimingPropertiesEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPastPresentationTimingEXT(PfnVkVoidFunction func) + { + return new VkGetPastPresentationTimingEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPastPresentationTimingInfoEXT*, + VkPastPresentationTimingPropertiesEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkInitializePerformanceApiINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkInitializePerformanceApiINTEL(PfnVkVoidFunction func) + { + return new VkInitializePerformanceApiINTEL( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkUninitializePerformanceApiINTEL(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkUninitializePerformanceApiINTEL(PfnVkVoidFunction func) + { + return new VkUninitializePerformanceApiINTEL((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetPerformanceMarkerINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetPerformanceMarkerINTEL(PfnVkVoidFunction func) + { + return new VkCmdSetPerformanceMarkerINTEL( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPerformanceStreamMarkerINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPerformanceStreamMarkerInfoINTEL*, + VkResult> Invoke = handle; + + public static explicit operator VkCmdSetPerformanceStreamMarkerINTEL(PfnVkVoidFunction func) + { + return new VkCmdSetPerformanceStreamMarkerINTEL( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPerformanceOverrideINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetPerformanceOverrideINTEL(PfnVkVoidFunction func) + { + return new VkCmdSetPerformanceOverrideINTEL( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquirePerformanceConfigurationINTEL( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPerformanceConfigurationAcquireInfoINTEL*, + VkPerformanceConfigurationINTEL*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPerformanceConfigurationAcquireInfoINTEL*, + VkPerformanceConfigurationINTEL*, + VkResult> Invoke = handle; + + public static explicit operator VkAcquirePerformanceConfigurationINTEL(PfnVkVoidFunction func) + { + return new VkAcquirePerformanceConfigurationINTEL( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPerformanceConfigurationAcquireInfoINTEL*, + VkPerformanceConfigurationINTEL*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkReleasePerformanceConfigurationINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkReleasePerformanceConfigurationINTEL(PfnVkVoidFunction func) + { + return new VkReleasePerformanceConfigurationINTEL( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueSetPerformanceConfigurationINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueSetPerformanceConfigurationINTEL(PfnVkVoidFunction func) + { + return new VkQueueSetPerformanceConfigurationINTEL( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPerformanceParameterINTEL( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPerformanceParameterTypeINTEL, + VkPerformanceValueINTEL*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPerformanceParameterINTEL(PfnVkVoidFunction func) + { + return new VkGetPerformanceParameterINTEL( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPerformanceParameterTypeINTEL, + VkPerformanceValueINTEL*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkSetLocalDimmingAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetLocalDimmingAMD(PfnVkVoidFunction func) + { + return new VkSetLocalDimmingAMD( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferDeviceAddressEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetBufferDeviceAddressEXT(PfnVkVoidFunction func) + { + return new VkGetBufferDeviceAddressEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceToolPropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkPhysicalDeviceToolProperties*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceToolPropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceToolPropertiesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkCooperativeMatrixPropertiesNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceCooperativeMatrixPropertiesNV(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkFramebufferMixedSamplesCombinationNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + PfnVkVoidFunction func + ) + { + return new VkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateHeadlessSurfaceEXT( + delegate* unmanaged[Cdecl]< + VkInstance, + VkHeadlessSurfaceCreateInfoEXT*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkHeadlessSurfaceCreateInfoEXT*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateHeadlessSurfaceEXT(PfnVkVoidFunction func) + { + return new VkCreateHeadlessSurfaceEXT( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkHeadlessSurfaceCreateInfoEXT*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLineStippleEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLineStippleEXT(PfnVkVoidFunction func) + { + return new VkCmdSetLineStippleEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkResetQueryPoolEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkResetQueryPoolEXT(PfnVkVoidFunction func) + { + return new VkResetQueryPoolEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCullModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCullModeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetCullModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetFrontFaceEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetFrontFaceEXT(PfnVkVoidFunction func) + { + return new VkCmdSetFrontFaceEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPrimitiveTopologyEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPrimitiveTopologyEXT(PfnVkVoidFunction func) + { + return new VkCmdSetPrimitiveTopologyEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetViewportWithCountEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetViewportWithCountEXT(PfnVkVoidFunction func) + { + return new VkCmdSetViewportWithCountEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetScissorWithCountEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetScissorWithCountEXT(PfnVkVoidFunction func) + { + return new VkCmdSetScissorWithCountEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindVertexBuffers2EXT( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + ByteSize64*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + ByteSize64*, + void> Invoke = handle; + + public static explicit operator VkCmdBindVertexBuffers2EXT(PfnVkVoidFunction func) + { + return new VkCmdBindVertexBuffers2EXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + int, + VkBuffer*, + ByteSize64*, + ByteSize64*, + ByteSize64*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthTestEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthTestEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthTestEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthWriteEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthWriteEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthWriteEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthCompareOpEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthCompareOpEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthCompareOpEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthBoundsTestEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBoundsTestEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBoundsTestEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilTestEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetStencilTestEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetStencilTestEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetStencilOpEXT( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStencilFaceFlags, + VkStencilOp, + VkStencilOp, + VkStencilOp, + VkCompareOp, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStencilFaceFlags, + VkStencilOp, + VkStencilOp, + VkStencilOp, + VkCompareOp, + void> Invoke = handle; + + public static explicit operator VkCmdSetStencilOpEXT(PfnVkVoidFunction func) + { + return new VkCmdSetStencilOpEXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStencilFaceFlags, + VkStencilOp, + VkStencilOp, + VkStencilOp, + VkCompareOp, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyMemoryToImageEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCopyMemoryToImageEXT(PfnVkVoidFunction func) + { + return new VkCopyMemoryToImageEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyImageToMemoryEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCopyImageToMemoryEXT(PfnVkVoidFunction func) + { + return new VkCopyImageToMemoryEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyImageToImageEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCopyImageToImageEXT(PfnVkVoidFunction func) + { + return new VkCopyImageToImageEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkTransitionImageLayoutEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkTransitionImageLayoutEXT(PfnVkVoidFunction func) + { + return new VkTransitionImageLayoutEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageSubresourceLayout2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImage, + VkImageSubresource2*, + VkSubresourceLayout2*, + void> Invoke = handle; + + public static explicit operator VkGetImageSubresourceLayout2EXT(PfnVkVoidFunction func) + { + return new VkGetImageSubresourceLayout2EXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkReleaseSwapchainImagesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkReleaseSwapchainImagesEXT(PfnVkVoidFunction func) + { + return new VkReleaseSwapchainImagesEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetGeneratedCommandsMemoryRequirementsNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkGeneratedCommandsMemoryRequirementsInfoNV*, + VkMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkGeneratedCommandsMemoryRequirementsInfoNV*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetGeneratedCommandsMemoryRequirementsNV(PfnVkVoidFunction func) + { + return new VkGetGeneratedCommandsMemoryRequirementsNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkGeneratedCommandsMemoryRequirementsInfoNV*, + VkMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPreprocessGeneratedCommandsNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdPreprocessGeneratedCommandsNV(PfnVkVoidFunction func) + { + return new VkCmdPreprocessGeneratedCommandsNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdExecuteGeneratedCommandsNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + Brutal.Bool32, + VkGeneratedCommandsInfoNV*, + void> Invoke = handle; + + public static explicit operator VkCmdExecuteGeneratedCommandsNV(PfnVkVoidFunction func) + { + return new VkCmdExecuteGeneratedCommandsNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindPipelineShaderGroupNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdBindPipelineShaderGroupNV(PfnVkVoidFunction func) + { + return new VkCmdBindPipelineShaderGroupNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateIndirectCommandsLayoutNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutCreateInfoNV*, + VkAllocationCallbacks*, + VkIndirectCommandsLayoutNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutCreateInfoNV*, + VkAllocationCallbacks*, + VkIndirectCommandsLayoutNV*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateIndirectCommandsLayoutNV(PfnVkVoidFunction func) + { + return new VkCreateIndirectCommandsLayoutNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutCreateInfoNV*, + VkAllocationCallbacks*, + VkIndirectCommandsLayoutNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyIndirectCommandsLayoutNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutNV, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyIndirectCommandsLayoutNV(PfnVkVoidFunction func) + { + return new VkDestroyIndirectCommandsLayoutNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthBias2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBias2EXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBias2EXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireDrmDisplayEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkAcquireDrmDisplayEXT(PfnVkVoidFunction func) + { + return new VkAcquireDrmDisplayEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDrmDisplayEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDrmDisplayEXT(PfnVkVoidFunction func) + { + return new VkGetDrmDisplayEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreatePrivateDataSlotEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPrivateDataSlotCreateInfo*, + VkAllocationCallbacks*, + VkPrivateDataSlot*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPrivateDataSlotCreateInfo*, + VkAllocationCallbacks*, + VkPrivateDataSlot*, + VkResult> Invoke = handle; + + public static explicit operator VkCreatePrivateDataSlotEXT(PfnVkVoidFunction func) + { + return new VkCreatePrivateDataSlotEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPrivateDataSlotCreateInfo*, + VkAllocationCallbacks*, + VkPrivateDataSlot*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyPrivateDataSlotEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyPrivateDataSlotEXT(PfnVkVoidFunction func) + { + return new VkDestroyPrivateDataSlotEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetPrivateDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkObjectType, + nint, + VkPrivateDataSlot, + nint, + VkResult> Invoke = handle; + + public static explicit operator VkSetPrivateDataEXT(PfnVkVoidFunction func) + { + return new VkSetPrivateDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPrivateDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkObjectType, + nint, + VkPrivateDataSlot, + nint*, + void> Invoke = handle; + + public static explicit operator VkGetPrivateDataEXT(PfnVkVoidFunction func) + { + return new VkGetPrivateDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueSetPerfHintQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueSetPerfHintQCOM(PfnVkVoidFunction func) + { + return new VkQueueSetPerfHintQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDispatchTileQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDispatchTileQCOM(PfnVkVoidFunction func) + { + return new VkCmdDispatchTileQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginPerTileExecutionQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginPerTileExecutionQCOM(PfnVkVoidFunction func) + { + return new VkCmdBeginPerTileExecutionQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndPerTileExecutionQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndPerTileExecutionQCOM(PfnVkVoidFunction func) + { + return new VkCmdEndPerTileExecutionQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetLatencySleepModeLegacyNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetLatencySleepModeLegacyNV(PfnVkVoidFunction func) + { + return new VkSetLatencySleepModeLegacyNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkLatencySleepLegacyNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkLatencySleepLegacyNV(PfnVkVoidFunction func) + { + return new VkLatencySleepLegacyNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetLatencyMarkerLegacyNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetLatencyMarkerLegacyNV(PfnVkVoidFunction func) + { + return new VkSetLatencyMarkerLegacyNV((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetLatencyTimingsLegacyNV(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetLatencyTimingsLegacyNV(PfnVkVoidFunction func) + { + return new VkGetLatencyTimingsLegacyNV((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkQueueNotifyOutOfBandLegacyNV(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueNotifyOutOfBandLegacyNV(PfnVkVoidFunction func) + { + return new VkQueueNotifyOutOfBandLegacyNV((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetSleepStatusLegacyNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetSleepStatusLegacyNV(PfnVkVoidFunction func) + { + return new VkGetSleepStatusLegacyNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkShutdownLatencyDeviceLegacyNV(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkShutdownLatencyDeviceLegacyNV(PfnVkVoidFunction func) + { + return new VkShutdownLatencyDeviceLegacyNV((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetDescriptorSetLayoutSizeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDescriptorSetLayoutSizeEXT(PfnVkVoidFunction func) + { + return new VkGetDescriptorSetLayoutSizeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDescriptorSetLayoutBindingOffsetEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDescriptorSetLayoutBindingOffsetEXT(PfnVkVoidFunction func) + { + return new VkGetDescriptorSetLayoutBindingOffsetEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDescriptorEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDescriptorEXT(PfnVkVoidFunction func) + { + return new VkGetDescriptorEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindDescriptorBuffersEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkDescriptorBufferBindingInfoEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdBindDescriptorBuffersEXT(PfnVkVoidFunction func) + { + return new VkCmdBindDescriptorBuffersEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDescriptorBufferOffsetsEXT( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + int*, + ByteSize64*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + int*, + ByteSize64*, + void> Invoke = handle; + + public static explicit operator VkCmdSetDescriptorBufferOffsetsEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDescriptorBufferOffsetsEXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + int, + int*, + ByteSize64*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindDescriptorBufferEmbeddedSamplersEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkPipelineBindPoint, + VkPipelineLayout, + int, + void> Invoke = handle; + + public static explicit operator VkCmdBindDescriptorBufferEmbeddedSamplersEXT(PfnVkVoidFunction func) + { + return new VkCmdBindDescriptorBufferEmbeddedSamplersEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetBufferOpaqueCaptureDescriptorDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkBufferCaptureDescriptorDataInfoEXT*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetBufferOpaqueCaptureDescriptorDataEXT(PfnVkVoidFunction func) + { + return new VkGetBufferOpaqueCaptureDescriptorDataEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageOpaqueCaptureDescriptorDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageCaptureDescriptorDataInfoEXT*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetImageOpaqueCaptureDescriptorDataEXT(PfnVkVoidFunction func) + { + return new VkGetImageOpaqueCaptureDescriptorDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetImageViewOpaqueCaptureDescriptorDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkImageViewCaptureDescriptorDataInfoEXT*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetImageViewOpaqueCaptureDescriptorDataEXT(PfnVkVoidFunction func) + { + return new VkGetImageViewOpaqueCaptureDescriptorDataEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSamplerOpaqueCaptureDescriptorDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSamplerCaptureDescriptorDataInfoEXT*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetSamplerOpaqueCaptureDescriptorDataEXT(PfnVkVoidFunction func) + { + return new VkGetSamplerOpaqueCaptureDescriptorDataEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCaptureDescriptorDataInfoEXT*, + void*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCaptureDescriptorDataInfoEXT*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(PfnVkVoidFunction func) + { + return new VkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCaptureDescriptorDataInfoEXT*, + void*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetFragmentShadingRateEnumNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkFragmentShadingRateNV, + VkFragmentShadingRateCombinerOpKHR*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkFragmentShadingRateNV, + VkFragmentShadingRateCombinerOpKHR*, + void> Invoke = handle; + + public static explicit operator VkCmdSetFragmentShadingRateEnumNV(PfnVkVoidFunction func) + { + return new VkCmdSetFragmentShadingRateEnumNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkFragmentShadingRateNV, + VkFragmentShadingRateCombinerOpKHR*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceFaultInfoEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceFaultCountsEXT*, + VkDeviceFaultInfoEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDeviceFaultInfoEXT(PfnVkVoidFunction func) + { + return new VkGetDeviceFaultInfoEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetVertexInputEXT( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkVertexInputBindingDescription2EXT*, + int, + VkVertexInputAttributeDescription2EXT*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkVertexInputBindingDescription2EXT*, + int, + VkVertexInputAttributeDescription2EXT*, + void> Invoke = handle; + + public static explicit operator VkCmdSetVertexInputEXT(PfnVkVoidFunction func) + { + return new VkCmdSetVertexInputEXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkVertexInputBindingDescription2EXT*, + int, + VkVertexInputAttributeDescription2EXT*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(PfnVkVoidFunction func) + { + return new VkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSubpassShadingHUAWEI(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSubpassShadingHUAWEI(PfnVkVoidFunction func) + { + return new VkCmdSubpassShadingHUAWEI((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdBindInvocationMaskHUAWEI( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindInvocationMaskHUAWEI(PfnVkVoidFunction func) + { + return new VkCmdBindInvocationMaskHUAWEI( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryRemoteAddressNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkMemoryGetRemoteAddressInfoNV*, + VkRemoteAddressNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryRemoteAddressNV(PfnVkVoidFunction func) + { + return new VkGetMemoryRemoteAddressNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelinePropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetPipelinePropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetPipelinePropertiesEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPatchControlPointsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPatchControlPointsEXT(PfnVkVoidFunction func) + { + return new VkCmdSetPatchControlPointsEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRasterizerDiscardEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetRasterizerDiscardEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetRasterizerDiscardEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthBiasEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthBiasEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthBiasEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLogicOpEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLogicOpEXT(PfnVkVoidFunction func) + { + return new VkCmdSetLogicOpEXT((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCmdSetPrimitiveRestartEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPrimitiveRestartEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetPrimitiveRestartEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetColorWriteEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetColorWriteEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetColorWriteEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMultiEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkMultiDrawInfoEXT*, + int, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawMultiEXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMultiEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMultiIndexedEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkMultiDrawIndexedInfoEXT*, + int, + int, + int, + int*, + void> Invoke = handle; + + public static explicit operator VkCmdDrawMultiIndexedEXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMultiIndexedEXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkMultiDrawIndexedInfoEXT*, + int, + int, + int, + int*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateMicromapEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkMicromapCreateInfoEXT*, + VkAllocationCallbacks*, + VkMicromapEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkMicromapCreateInfoEXT*, + VkAllocationCallbacks*, + VkMicromapEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateMicromapEXT(PfnVkVoidFunction func) + { + return new VkCreateMicromapEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkMicromapCreateInfoEXT*, + VkAllocationCallbacks*, + VkMicromapEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyMicromapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyMicromapEXT(PfnVkVoidFunction func) + { + return new VkDestroyMicromapEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBuildMicromapsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBuildMicromapsEXT(PfnVkVoidFunction func) + { + return new VkCmdBuildMicromapsEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBuildMicromapsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + int, + VkMicromapBuildInfoEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkBuildMicromapsEXT(PfnVkVoidFunction func) + { + return new VkBuildMicromapsEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyMicromapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyMicromapInfoEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCopyMicromapEXT(PfnVkVoidFunction func) + { + return new VkCopyMicromapEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyMicromapToMemoryEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyMicromapToMemoryInfoEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCopyMicromapToMemoryEXT(PfnVkVoidFunction func) + { + return new VkCopyMicromapToMemoryEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyMemoryToMicromapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyMemoryToMicromapInfoEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCopyMemoryToMicromapEXT(PfnVkVoidFunction func) + { + return new VkCopyMemoryToMicromapEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkWriteMicromapsPropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkMicromapEXT*, + VkQueryType, + nuint, + void*, + nuint, + VkResult> Invoke = handle; + + public static explicit operator VkWriteMicromapsPropertiesEXT(PfnVkVoidFunction func) + { + return new VkWriteMicromapsPropertiesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMicromapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyMicromapEXT(PfnVkVoidFunction func) + { + return new VkCmdCopyMicromapEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMicromapToMemoryEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdCopyMicromapToMemoryEXT(PfnVkVoidFunction func) + { + return new VkCmdCopyMicromapToMemoryEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryToMicromapEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdCopyMemoryToMicromapEXT(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryToMicromapEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteMicromapsPropertiesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkMicromapEXT*, + VkQueryType, + VkQueryPool, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteMicromapsPropertiesEXT(PfnVkVoidFunction func) + { + return new VkCmdWriteMicromapsPropertiesEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceMicromapCompatibilityEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkMicromapVersionInfoEXT*, + VkAccelerationStructureCompatibilityKHR*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkMicromapVersionInfoEXT*, + VkAccelerationStructureCompatibilityKHR*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceMicromapCompatibilityEXT(PfnVkVoidFunction func) + { + return new VkGetDeviceMicromapCompatibilityEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkMicromapVersionInfoEXT*, + VkAccelerationStructureCompatibilityKHR*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMicromapBuildSizesEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureBuildTypeKHR, + VkMicromapBuildInfoEXT*, + VkMicromapBuildSizesInfoEXT*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureBuildTypeKHR, + VkMicromapBuildInfoEXT*, + VkMicromapBuildSizesInfoEXT*, + void> Invoke = handle; + + public static explicit operator VkGetMicromapBuildSizesEXT(PfnVkVoidFunction func) + { + return new VkGetMicromapBuildSizesEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureBuildTypeKHR, + VkMicromapBuildInfoEXT*, + VkMicromapBuildSizesInfoEXT*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawClusterHUAWEI( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawClusterHUAWEI(PfnVkVoidFunction func) + { + return new VkCmdDrawClusterHUAWEI( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawClusterIndirectHUAWEI( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawClusterIndirectHUAWEI(PfnVkVoidFunction func) + { + return new VkCmdDrawClusterIndirectHUAWEI( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetDeviceMemoryPriorityEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkSetDeviceMemoryPriorityEXT(PfnVkVoidFunction func) + { + return new VkSetDeviceMemoryPriorityEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDispatchParametersARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDispatchParametersARM(PfnVkVoidFunction func) + { + return new VkCmdSetDispatchParametersARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDescriptorSetLayoutHostMappingInfoVALVE( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetBindingReferenceVALVE*, + VkDescriptorSetLayoutHostMappingInfoVALVE*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetBindingReferenceVALVE*, + VkDescriptorSetLayoutHostMappingInfoVALVE*, + void> Invoke = handle; + + public static explicit operator VkGetDescriptorSetLayoutHostMappingInfoVALVE(PfnVkVoidFunction func) + { + return new VkGetDescriptorSetLayoutHostMappingInfoVALVE( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDescriptorSetBindingReferenceVALVE*, + VkDescriptorSetLayoutHostMappingInfoVALVE*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDescriptorSetHostMappingVALVE( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetDescriptorSetHostMappingVALVE(PfnVkVoidFunction func) + { + return new VkGetDescriptorSetHostMappingVALVE( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryIndirectNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyMemoryIndirectNV(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryIndirectNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryToImageIndirectNV( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddress, + int, + int, + VkImage, + VkImageLayout, + VkImageSubresourceLayers*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddress, + int, + int, + VkImage, + VkImageLayout, + VkImageSubresourceLayers*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyMemoryToImageIndirectNV(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryToImageIndirectNV( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddress, + int, + int, + VkImage, + VkImageLayout, + VkImageSubresourceLayers*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDecompressMemoryNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdDecompressMemoryNV(PfnVkVoidFunction func) + { + return new VkCmdDecompressMemoryNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDecompressMemoryIndirectCountNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDeviceAddress, + VkDeviceAddress, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDecompressMemoryIndirectCountNV(PfnVkVoidFunction func) + { + return new VkCmdDecompressMemoryIndirectCountNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineIndirectMemoryRequirementsNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkComputePipelineCreateInfo*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetPipelineIndirectMemoryRequirementsNV(PfnVkVoidFunction func) + { + return new VkGetPipelineIndirectMemoryRequirementsNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdUpdatePipelineIndirectBufferNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdUpdatePipelineIndirectBufferNV(PfnVkVoidFunction func) + { + return new VkCmdUpdatePipelineIndirectBufferNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPipelineIndirectDeviceAddressNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipelineIndirectDeviceAddressInfoNV*, + VkDeviceAddress> Invoke = handle; + + public static explicit operator VkGetPipelineIndirectDeviceAddressNV(PfnVkVoidFunction func) + { + return new VkGetPipelineIndirectDeviceAddressNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthClampEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthClampEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthClampEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPolygonModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPolygonModeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetPolygonModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRasterizationSamplesEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetRasterizationSamplesEXT(PfnVkVoidFunction func) + { + return new VkCmdSetRasterizationSamplesEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetSampleMaskEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetSampleMaskEXT(PfnVkVoidFunction func) + { + return new VkCmdSetSampleMaskEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetAlphaToCoverageEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetAlphaToCoverageEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetAlphaToCoverageEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetAlphaToOneEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetAlphaToOneEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetAlphaToOneEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLogicOpEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLogicOpEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetLogicOpEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetColorBlendEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetColorBlendEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetColorBlendEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetColorBlendEquationEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetColorBlendEquationEXT(PfnVkVoidFunction func) + { + return new VkCmdSetColorBlendEquationEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetColorWriteMaskEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetColorWriteMaskEXT(PfnVkVoidFunction func) + { + return new VkCmdSetColorWriteMaskEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetTessellationDomainOriginEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetTessellationDomainOriginEXT(PfnVkVoidFunction func) + { + return new VkCmdSetTessellationDomainOriginEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRasterizationStreamEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetRasterizationStreamEXT(PfnVkVoidFunction func) + { + return new VkCmdSetRasterizationStreamEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetConservativeRasterizationModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetConservativeRasterizationModeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetConservativeRasterizationModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetExtraPrimitiveOverestimationSizeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetExtraPrimitiveOverestimationSizeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetExtraPrimitiveOverestimationSizeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthClipEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthClipEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthClipEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetSampleLocationsEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetSampleLocationsEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetSampleLocationsEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetColorBlendAdvancedEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetColorBlendAdvancedEXT(PfnVkVoidFunction func) + { + return new VkCmdSetColorBlendAdvancedEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetProvokingVertexModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetProvokingVertexModeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetProvokingVertexModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLineRasterizationModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLineRasterizationModeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetLineRasterizationModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetLineStippleEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetLineStippleEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetLineStippleEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthClipNegativeOneToOneEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetDepthClipNegativeOneToOneEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthClipNegativeOneToOneEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetViewportWScalingEnableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetViewportWScalingEnableNV(PfnVkVoidFunction func) + { + return new VkCmdSetViewportWScalingEnableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetViewportSwizzleNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdSetViewportSwizzleNV(PfnVkVoidFunction func) + { + return new VkCmdSetViewportSwizzleNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoverageToColorEnableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCoverageToColorEnableNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoverageToColorEnableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoverageToColorLocationNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCoverageToColorLocationNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoverageToColorLocationNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoverageModulationModeNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCoverageModulationModeNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoverageModulationModeNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoverageModulationTableEnableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCoverageModulationTableEnableNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoverageModulationTableEnableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoverageModulationTableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCoverageModulationTableNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoverageModulationTableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetShadingRateImageEnableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetShadingRateImageEnableNV(PfnVkVoidFunction func) + { + return new VkCmdSetShadingRateImageEnableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRepresentativeFragmentTestEnableNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetRepresentativeFragmentTestEnableNV(PfnVkVoidFunction func) + { + return new VkCmdSetRepresentativeFragmentTestEnableNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetCoverageReductionModeNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetCoverageReductionModeNV(PfnVkVoidFunction func) + { + return new VkCmdSetCoverageReductionModeNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateTensorARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorCreateInfoARM*, + VkAllocationCallbacks*, + VkTensorARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorCreateInfoARM*, + VkAllocationCallbacks*, + VkTensorARM*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateTensorARM(PfnVkVoidFunction func) + { + return new VkCreateTensorARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorCreateInfoARM*, + VkAllocationCallbacks*, + VkTensorARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyTensorARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyTensorARM(PfnVkVoidFunction func) + { + return new VkDestroyTensorARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateTensorViewARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorViewCreateInfoARM*, + VkAllocationCallbacks*, + VkTensorViewARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorViewCreateInfoARM*, + VkAllocationCallbacks*, + VkTensorViewARM*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateTensorViewARM(PfnVkVoidFunction func) + { + return new VkCreateTensorViewARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorViewCreateInfoARM*, + VkAllocationCallbacks*, + VkTensorViewARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyTensorViewARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkDestroyTensorViewARM(PfnVkVoidFunction func) + { + return new VkDestroyTensorViewARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetTensorMemoryRequirementsARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorMemoryRequirementsInfoARM*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetTensorMemoryRequirementsARM(PfnVkVoidFunction func) + { + return new VkGetTensorMemoryRequirementsARM( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkBindTensorMemoryARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkBindTensorMemoryARM(PfnVkVoidFunction func) + { + return new VkBindTensorMemoryARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceTensorMemoryRequirementsARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceTensorMemoryRequirementsARM*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceTensorMemoryRequirementsARM(PfnVkVoidFunction func) + { + return new VkGetDeviceTensorMemoryRequirementsARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceTensorMemoryRequirementsARM*, + VkMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyTensorARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdCopyTensorARM(PfnVkVoidFunction func) + { + return new VkCmdCopyTensorARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceExternalTensorPropertiesARM( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalTensorInfoARM*, + VkExternalTensorPropertiesARM*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalTensorInfoARM*, + VkExternalTensorPropertiesARM*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceExternalTensorPropertiesARM(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceExternalTensorPropertiesARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceExternalTensorInfoARM*, + VkExternalTensorPropertiesARM*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetTensorOpaqueCaptureDescriptorDataARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorCaptureDescriptorDataInfoARM*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetTensorOpaqueCaptureDescriptorDataARM(PfnVkVoidFunction func) + { + return new VkGetTensorOpaqueCaptureDescriptorDataARM( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetTensorViewOpaqueCaptureDescriptorDataARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkTensorViewCaptureDescriptorDataInfoARM*, + void*, + VkResult> Invoke = handle; + + public static explicit operator VkGetTensorViewOpaqueCaptureDescriptorDataARM(PfnVkVoidFunction func) + { + return new VkGetTensorViewOpaqueCaptureDescriptorDataARM( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetShaderModuleIdentifierEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderModule, + VkShaderModuleIdentifierEXT*, + void> Invoke = handle; + + public static explicit operator VkGetShaderModuleIdentifierEXT(PfnVkVoidFunction func) + { + return new VkGetShaderModuleIdentifierEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetShaderModuleCreateInfoIdentifierEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderModuleCreateInfo*, + VkShaderModuleIdentifierEXT*, + void> Invoke = handle; + + public static explicit operator VkGetShaderModuleCreateInfoIdentifierEXT(PfnVkVoidFunction func) + { + return new VkGetShaderModuleCreateInfoIdentifierEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceOpticalFlowImageFormatsNV( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkOpticalFlowImageFormatInfoNV*, + int*, + VkOpticalFlowImageFormatPropertiesNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkOpticalFlowImageFormatInfoNV*, + int*, + VkOpticalFlowImageFormatPropertiesNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceOpticalFlowImageFormatsNV(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceOpticalFlowImageFormatsNV( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkOpticalFlowImageFormatInfoNV*, + int*, + VkOpticalFlowImageFormatPropertiesNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateOpticalFlowSessionNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionCreateInfoNV*, + VkAllocationCallbacks*, + VkOpticalFlowSessionNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionCreateInfoNV*, + VkAllocationCallbacks*, + VkOpticalFlowSessionNV*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateOpticalFlowSessionNV(PfnVkVoidFunction func) + { + return new VkCreateOpticalFlowSessionNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionCreateInfoNV*, + VkAllocationCallbacks*, + VkOpticalFlowSessionNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyOpticalFlowSessionNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionNV, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyOpticalFlowSessionNV(PfnVkVoidFunction func) + { + return new VkDestroyOpticalFlowSessionNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkBindOpticalFlowSessionImageNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionNV, + VkOpticalFlowSessionBindingPointNV, + VkImageView, + VkImageLayout, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionNV, + VkOpticalFlowSessionBindingPointNV, + VkImageView, + VkImageLayout, + VkResult> Invoke = handle; + + public static explicit operator VkBindOpticalFlowSessionImageNV(PfnVkVoidFunction func) + { + return new VkBindOpticalFlowSessionImageNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkOpticalFlowSessionNV, + VkOpticalFlowSessionBindingPointNV, + VkImageView, + VkImageLayout, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdOpticalFlowExecuteNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkOpticalFlowSessionNV, + VkOpticalFlowExecuteInfoNV*, + void> Invoke = handle; + + public static explicit operator VkCmdOpticalFlowExecuteNV(PfnVkVoidFunction func) + { + return new VkCmdOpticalFlowExecuteNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkAntiLagUpdateAMD( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkAntiLagUpdateAMD(PfnVkVoidFunction func) + { + return new VkAntiLagUpdateAMD((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkCreateShadersEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkShaderCreateInfoEXT*, + VkAllocationCallbacks*, + VkShaderEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkShaderCreateInfoEXT*, + VkAllocationCallbacks*, + VkShaderEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateShadersEXT(PfnVkVoidFunction func) + { + return new VkCreateShadersEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkShaderCreateInfoEXT*, + VkAllocationCallbacks*, + VkShaderEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyShaderEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkDestroyShaderEXT(PfnVkVoidFunction func) + { + return new VkDestroyShaderEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetShaderBinaryDataEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetShaderBinaryDataEXT(PfnVkVoidFunction func) + { + return new VkGetShaderBinaryDataEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindShadersEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkShaderStageFlags*, + VkShaderEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdBindShadersEXT(PfnVkVoidFunction func) + { + return new VkCmdBindShadersEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetDepthClampRangeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDepthClampModeEXT, + VkDepthClampRangeEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdSetDepthClampRangeEXT(PfnVkVoidFunction func) + { + return new VkCmdSetDepthClampRangeEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetFramebufferTilePropertiesQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkFramebuffer, + int*, + VkTilePropertiesQCOM*, + VkResult> Invoke = handle; + + public static explicit operator VkGetFramebufferTilePropertiesQCOM(PfnVkVoidFunction func) + { + return new VkGetFramebufferTilePropertiesQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDynamicRenderingTilePropertiesQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetDynamicRenderingTilePropertiesQCOM(PfnVkVoidFunction func) + { + return new VkGetDynamicRenderingTilePropertiesQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceCooperativeVectorPropertiesNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkCooperativeVectorPropertiesNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceCooperativeVectorPropertiesNV(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceCooperativeVectorPropertiesNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkConvertCooperativeVectorMatrixNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkConvertCooperativeVectorMatrixNV(PfnVkVoidFunction func) + { + return new VkConvertCooperativeVectorMatrixNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdConvertCooperativeVectorMatrixNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkConvertCooperativeVectorMatrixInfoNV*, + void> Invoke = handle; + + public static explicit operator VkCmdConvertCooperativeVectorMatrixNV(PfnVkVoidFunction func) + { + return new VkCmdConvertCooperativeVectorMatrixNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkSetLatencySleepModeNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSwapchainKHR, + VkLatencySleepModeInfoNV*, + VkResult> Invoke = handle; + + public static explicit operator VkSetLatencySleepModeNV(PfnVkVoidFunction func) + { + return new VkSetLatencySleepModeNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkLatencySleepNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkLatencySleepNV(PfnVkVoidFunction func) + { + return new VkLatencySleepNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkSetLatencyMarkerNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkSetLatencyMarkerNV(PfnVkVoidFunction func) + { + return new VkSetLatencyMarkerNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetLatencyTimingsNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetLatencyTimingsNV(PfnVkVoidFunction func) + { + return new VkGetLatencyTimingsNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkQueueNotifyOutOfBandNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkQueueNotifyOutOfBandNV(PfnVkVoidFunction func) + { + return new VkQueueNotifyOutOfBandNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDataGraphPipelinesARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkPipelineCache, + int, + VkDataGraphPipelineCreateInfoARM*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkPipelineCache, + int, + VkDataGraphPipelineCreateInfoARM*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDataGraphPipelinesARM(PfnVkVoidFunction func) + { + return new VkCreateDataGraphPipelinesARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkPipelineCache, + int, + VkDataGraphPipelineCreateInfoARM*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateDataGraphPipelineSessionARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionCreateInfoARM*, + VkAllocationCallbacks*, + VkDataGraphPipelineSessionARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionCreateInfoARM*, + VkAllocationCallbacks*, + VkDataGraphPipelineSessionARM*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateDataGraphPipelineSessionARM(PfnVkVoidFunction func) + { + return new VkCreateDataGraphPipelineSessionARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionCreateInfoARM*, + VkAllocationCallbacks*, + VkDataGraphPipelineSessionARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDataGraphPipelineSessionBindPointRequirementsARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionBindPointRequirementsInfoARM*, + int*, + VkDataGraphPipelineSessionBindPointRequirementARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionBindPointRequirementsInfoARM*, + int*, + VkDataGraphPipelineSessionBindPointRequirementARM*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDataGraphPipelineSessionBindPointRequirementsARM(PfnVkVoidFunction func) + { + return new VkGetDataGraphPipelineSessionBindPointRequirementsARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionBindPointRequirementsInfoARM*, + int*, + VkDataGraphPipelineSessionBindPointRequirementARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDataGraphPipelineSessionMemoryRequirementsARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionMemoryRequirementsInfoARM*, + VkMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionMemoryRequirementsInfoARM*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetDataGraphPipelineSessionMemoryRequirementsARM(PfnVkVoidFunction func) + { + return new VkGetDataGraphPipelineSessionMemoryRequirementsARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionMemoryRequirementsInfoARM*, + VkMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkBindDataGraphPipelineSessionMemoryARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkBindDataGraphPipelineSessionMemoryInfoARM*, + VkResult> Invoke = handle; + + public static explicit operator VkBindDataGraphPipelineSessionMemoryARM(PfnVkVoidFunction func) + { + return new VkBindDataGraphPipelineSessionMemoryARM( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyDataGraphPipelineSessionARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineSessionARM, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyDataGraphPipelineSessionARM(PfnVkVoidFunction func) + { + return new VkDestroyDataGraphPipelineSessionARM( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDispatchDataGraphARM( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDataGraphPipelineSessionARM, + VkDataGraphPipelineDispatchInfoARM*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDataGraphPipelineSessionARM, + VkDataGraphPipelineDispatchInfoARM*, + void> Invoke = handle; + + public static explicit operator VkCmdDispatchDataGraphARM(PfnVkVoidFunction func) + { + return new VkCmdDispatchDataGraphARM( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkDataGraphPipelineSessionARM, + VkDataGraphPipelineDispatchInfoARM*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDataGraphPipelineAvailablePropertiesARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineInfoARM*, + int*, + VkDataGraphPipelinePropertyARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineInfoARM*, + int*, + VkDataGraphPipelinePropertyARM*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDataGraphPipelineAvailablePropertiesARM(PfnVkVoidFunction func) + { + return new VkGetDataGraphPipelineAvailablePropertiesARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineInfoARM*, + int*, + VkDataGraphPipelinePropertyARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDataGraphPipelinePropertiesARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineInfoARM*, + int, + VkDataGraphPipelinePropertyQueryResultARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineInfoARM*, + int, + VkDataGraphPipelinePropertyQueryResultARM*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDataGraphPipelinePropertiesARM(PfnVkVoidFunction func) + { + return new VkGetDataGraphPipelinePropertiesARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDataGraphPipelineInfoARM*, + int, + VkDataGraphPipelinePropertyQueryResultARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkQueueFamilyDataGraphPropertiesARM*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkQueueFamilyDataGraphPropertiesARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM*, + VkQueueFamilyDataGraphProcessingEnginePropertiesARM*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM*, + VkQueueFamilyDataGraphProcessingEnginePropertiesARM*, + void> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM( + PfnVkVoidFunction func + ) + { + return new VkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM*, + VkQueueFamilyDataGraphProcessingEnginePropertiesARM*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkQueueFamilyDataGraphPropertiesARM*, + VkBaseOutStructure*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkQueueFamilyDataGraphPropertiesARM*, + VkBaseOutStructure*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM( + PfnVkVoidFunction func + ) + { + return new VkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkQueueFamilyDataGraphPropertiesARM*, + VkBaseOutStructure*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetAttachmentFeedbackLoopEnableEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetAttachmentFeedbackLoopEnableEXT(PfnVkVoidFunction func) + { + return new VkCmdSetAttachmentFeedbackLoopEnableEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBindTileMemoryQCOM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBindTileMemoryQCOM(PfnVkVoidFunction func) + { + return new VkCmdBindTileMemoryQCOM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDecompressMemoryEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDecompressMemoryEXT(PfnVkVoidFunction func) + { + return new VkCmdDecompressMemoryEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDecompressMemoryIndirectCountEXT( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkMemoryDecompressionMethodFlagsEXT, + VkDeviceAddress, + VkDeviceAddress, + int, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkMemoryDecompressionMethodFlagsEXT, + VkDeviceAddress, + VkDeviceAddress, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDecompressMemoryIndirectCountEXT(PfnVkVoidFunction func) + { + return new VkCmdDecompressMemoryIndirectCountEXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkMemoryDecompressionMethodFlagsEXT, + VkDeviceAddress, + VkDeviceAddress, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateExternalComputeQueueNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalComputeQueueCreateInfoNV*, + VkAllocationCallbacks*, + VkExternalComputeQueueNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalComputeQueueCreateInfoNV*, + VkAllocationCallbacks*, + VkExternalComputeQueueNV*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateExternalComputeQueueNV(PfnVkVoidFunction func) + { + return new VkCreateExternalComputeQueueNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalComputeQueueCreateInfoNV*, + VkAllocationCallbacks*, + VkExternalComputeQueueNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyExternalComputeQueueNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalComputeQueueNV, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyExternalComputeQueueNV(PfnVkVoidFunction func) + { + return new VkDestroyExternalComputeQueueNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetExternalComputeQueueDataNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkExternalComputeQueueNV, + VkExternalComputeQueueDataParamsNV*, + void*, + void> Invoke = handle; + + public static explicit operator VkGetExternalComputeQueueDataNV(PfnVkVoidFunction func) + { + return new VkGetExternalComputeQueueDataNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetClusterAccelerationStructureBuildSizesNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkClusterAccelerationStructureInputInfoNV*, + VkAccelerationStructureBuildSizesInfoKHR*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkClusterAccelerationStructureInputInfoNV*, + VkAccelerationStructureBuildSizesInfoKHR*, + void> Invoke = handle; + + public static explicit operator VkGetClusterAccelerationStructureBuildSizesNV(PfnVkVoidFunction func) + { + return new VkGetClusterAccelerationStructureBuildSizesNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkClusterAccelerationStructureInputInfoNV*, + VkAccelerationStructureBuildSizesInfoKHR*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBuildClusterAccelerationStructureIndirectNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkClusterAccelerationStructureCommandsInfoNV*, + void> Invoke = handle; + + public static explicit operator VkCmdBuildClusterAccelerationStructureIndirectNV(PfnVkVoidFunction func) + { + return new VkCmdBuildClusterAccelerationStructureIndirectNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPartitionedAccelerationStructuresBuildSizesNV( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPartitionedAccelerationStructureInstancesInputNV*, + VkAccelerationStructureBuildSizesInfoKHR*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPartitionedAccelerationStructureInstancesInputNV*, + VkAccelerationStructureBuildSizesInfoKHR*, + void> Invoke = handle; + + public static explicit operator VkGetPartitionedAccelerationStructuresBuildSizesNV(PfnVkVoidFunction func) + { + return new VkGetPartitionedAccelerationStructuresBuildSizesNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPartitionedAccelerationStructureInstancesInputNV*, + VkAccelerationStructureBuildSizesInfoKHR*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBuildPartitionedAccelerationStructuresNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuildPartitionedAccelerationStructureInfoNV*, + void> Invoke = handle; + + public static explicit operator VkCmdBuildPartitionedAccelerationStructuresNV(PfnVkVoidFunction func) + { + return new VkCmdBuildPartitionedAccelerationStructuresNV( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetGeneratedCommandsMemoryRequirementsEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkGeneratedCommandsMemoryRequirementsInfoEXT*, + VkMemoryRequirements2*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkGeneratedCommandsMemoryRequirementsInfoEXT*, + VkMemoryRequirements2*, + void> Invoke = handle; + + public static explicit operator VkGetGeneratedCommandsMemoryRequirementsEXT(PfnVkVoidFunction func) + { + return new VkGetGeneratedCommandsMemoryRequirementsEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkGeneratedCommandsMemoryRequirementsInfoEXT*, + VkMemoryRequirements2*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdPreprocessGeneratedCommandsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkGeneratedCommandsInfoEXT*, + VkCommandBuffer, + void> Invoke = handle; + + public static explicit operator VkCmdPreprocessGeneratedCommandsEXT(PfnVkVoidFunction func) + { + return new VkCmdPreprocessGeneratedCommandsEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdExecuteGeneratedCommandsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + Brutal.Bool32, + VkGeneratedCommandsInfoEXT*, + void> Invoke = handle; + + public static explicit operator VkCmdExecuteGeneratedCommandsEXT(PfnVkVoidFunction func) + { + return new VkCmdExecuteGeneratedCommandsEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateIndirectCommandsLayoutEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutCreateInfoEXT*, + VkAllocationCallbacks*, + VkIndirectCommandsLayoutEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutCreateInfoEXT*, + VkAllocationCallbacks*, + VkIndirectCommandsLayoutEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateIndirectCommandsLayoutEXT(PfnVkVoidFunction func) + { + return new VkCreateIndirectCommandsLayoutEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutCreateInfoEXT*, + VkAllocationCallbacks*, + VkIndirectCommandsLayoutEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyIndirectCommandsLayoutEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectCommandsLayoutEXT, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyIndirectCommandsLayoutEXT(PfnVkVoidFunction func) + { + return new VkDestroyIndirectCommandsLayoutEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateIndirectExecutionSetEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetCreateInfoEXT*, + VkAllocationCallbacks*, + VkIndirectExecutionSetEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetCreateInfoEXT*, + VkAllocationCallbacks*, + VkIndirectExecutionSetEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateIndirectExecutionSetEXT(PfnVkVoidFunction func) + { + return new VkCreateIndirectExecutionSetEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetCreateInfoEXT*, + VkAllocationCallbacks*, + VkIndirectExecutionSetEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyIndirectExecutionSetEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyIndirectExecutionSetEXT(PfnVkVoidFunction func) + { + return new VkDestroyIndirectExecutionSetEXT( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUpdateIndirectExecutionSetPipelineEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + int, + VkWriteIndirectExecutionSetPipelineEXT*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + int, + VkWriteIndirectExecutionSetPipelineEXT*, + void> Invoke = handle; + + public static explicit operator VkUpdateIndirectExecutionSetPipelineEXT(PfnVkVoidFunction func) + { + return new VkUpdateIndirectExecutionSetPipelineEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + int, + VkWriteIndirectExecutionSetPipelineEXT*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkUpdateIndirectExecutionSetShaderEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + int, + VkWriteIndirectExecutionSetShaderEXT*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + int, + VkWriteIndirectExecutionSetShaderEXT*, + void> Invoke = handle; + + public static explicit operator VkUpdateIndirectExecutionSetShaderEXT(PfnVkVoidFunction func) + { + return new VkUpdateIndirectExecutionSetShaderEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkIndirectExecutionSetEXT, + int, + VkWriteIndirectExecutionSetShaderEXT*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkCooperativeMatrixFlexibleDimensionsPropertiesNV*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkCooperativeMatrixFlexibleDimensionsPropertiesNV*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + PfnVkVoidFunction func + ) + { + return new VkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkCooperativeMatrixFlexibleDimensionsPropertiesNV*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkPerformanceCounterARM*, + VkPerformanceCounterDescriptionARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkPerformanceCounterARM*, + VkPerformanceCounterDescriptionARM*, + VkResult> Invoke = handle; + + public static explicit operator VkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + PfnVkVoidFunction func + ) + { + return new VkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + int*, + VkPerformanceCounterARM*, + VkPerformanceCounterDescriptionARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkShaderInstrumentationMetricDescriptionARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkShaderInstrumentationMetricDescriptionARM*, + VkResult> Invoke = handle; + + public static explicit operator VkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM(PfnVkVoidFunction func) + { + return new VkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int*, + VkShaderInstrumentationMetricDescriptionARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateShaderInstrumentationARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationCreateInfoARM*, + VkAllocationCallbacks*, + VkShaderInstrumentationARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationCreateInfoARM*, + VkAllocationCallbacks*, + VkShaderInstrumentationARM*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateShaderInstrumentationARM(PfnVkVoidFunction func) + { + return new VkCreateShaderInstrumentationARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationCreateInfoARM*, + VkAllocationCallbacks*, + VkShaderInstrumentationARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyShaderInstrumentationARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationARM, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyShaderInstrumentationARM(PfnVkVoidFunction func) + { + return new VkDestroyShaderInstrumentationARM( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginShaderInstrumentationARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginShaderInstrumentationARM(PfnVkVoidFunction func) + { + return new VkCmdBeginShaderInstrumentationARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndShaderInstrumentationARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndShaderInstrumentationARM(PfnVkVoidFunction func) + { + return new VkCmdEndShaderInstrumentationARM((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct VkGetShaderInstrumentationValuesARM( + delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationARM, + int*, + void*, + VkShaderInstrumentationValuesFlagsARM, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationARM, + int*, + void*, + VkShaderInstrumentationValuesFlagsARM, + VkResult> Invoke = handle; + + public static explicit operator VkGetShaderInstrumentationValuesARM(PfnVkVoidFunction func) + { + return new VkGetShaderInstrumentationValuesARM( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkShaderInstrumentationARM, + int*, + void*, + VkShaderInstrumentationValuesFlagsARM, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkClearShaderInstrumentationMetricsARM( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkClearShaderInstrumentationMetricsARM(PfnVkVoidFunction func) + { + return new VkClearShaderInstrumentationMetricsARM( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdEndRendering2EXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdEndRendering2EXT(PfnVkVoidFunction func) + { + return new VkCmdEndRendering2EXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBeginCustomResolveEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdBeginCustomResolveEXT(PfnVkVoidFunction func) + { + return new VkCmdBeginCustomResolveEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkQueueFamilyDataGraphPropertiesARM*, + VkDataGraphOpticalFlowImageFormatInfoARM*, + int*, + VkDataGraphOpticalFlowImageFormatPropertiesARM*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkQueueFamilyDataGraphPropertiesARM*, + VkDataGraphOpticalFlowImageFormatInfoARM*, + int*, + VkDataGraphOpticalFlowImageFormatPropertiesARM*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM( + PfnVkVoidFunction func + ) + { + return new VkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + int, + VkQueueFamilyDataGraphPropertiesARM*, + VkDataGraphOpticalFlowImageFormatInfoARM*, + int*, + VkDataGraphOpticalFlowImageFormatPropertiesARM*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetComputeOccupancyPriorityNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkComputeOccupancyPriorityParametersNV*, + void> Invoke = handle; + + public static explicit operator VkCmdSetComputeOccupancyPriorityNV(PfnVkVoidFunction func) + { + return new VkCmdSetComputeOccupancyPriorityNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetPrimitiveRestartIndexEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetPrimitiveRestartIndexEXT(PfnVkVoidFunction func) + { + return new VkCmdSetPrimitiveRestartIndexEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateAccelerationStructureKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfoKHR*, + VkAllocationCallbacks*, + VkAccelerationStructureKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfoKHR*, + VkAllocationCallbacks*, + VkAccelerationStructureKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateAccelerationStructureKHR(PfnVkVoidFunction func) + { + return new VkCreateAccelerationStructureKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureCreateInfoKHR*, + VkAllocationCallbacks*, + VkAccelerationStructureKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkDestroyAccelerationStructureKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureKHR, + VkAllocationCallbacks*, + void> Invoke = handle; + + public static explicit operator VkDestroyAccelerationStructureKHR(PfnVkVoidFunction func) + { + return new VkDestroyAccelerationStructureKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBuildAccelerationStructuresKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkAccelerationStructureBuildRangeInfoKHR**, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkAccelerationStructureBuildRangeInfoKHR**, + void> Invoke = handle; + + public static explicit operator VkCmdBuildAccelerationStructuresKHR(PfnVkVoidFunction func) + { + return new VkCmdBuildAccelerationStructuresKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkAccelerationStructureBuildRangeInfoKHR**, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdBuildAccelerationStructuresIndirectKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkDeviceAddress*, + int*, + int**, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkDeviceAddress*, + int*, + int**, + void> Invoke = handle; + + public static explicit operator VkCmdBuildAccelerationStructuresIndirectKHR(PfnVkVoidFunction func) + { + return new VkCmdBuildAccelerationStructuresIndirectKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkDeviceAddress*, + int*, + int**, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkBuildAccelerationStructuresKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkAccelerationStructureBuildRangeInfoKHR**, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkAccelerationStructureBuildRangeInfoKHR**, + VkResult> Invoke = handle; + + public static explicit operator VkBuildAccelerationStructuresKHR(PfnVkVoidFunction func) + { + return new VkBuildAccelerationStructuresKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + int, + VkAccelerationStructureBuildGeometryInfoKHR*, + VkAccelerationStructureBuildRangeInfoKHR**, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyAccelerationStructureKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyAccelerationStructureInfoKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyAccelerationStructureInfoKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCopyAccelerationStructureKHR(PfnVkVoidFunction func) + { + return new VkCopyAccelerationStructureKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyAccelerationStructureInfoKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyAccelerationStructureToMemoryKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyAccelerationStructureToMemoryInfoKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyAccelerationStructureToMemoryInfoKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCopyAccelerationStructureToMemoryKHR(PfnVkVoidFunction func) + { + return new VkCopyAccelerationStructureToMemoryKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyAccelerationStructureToMemoryInfoKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCopyMemoryToAccelerationStructureKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyMemoryToAccelerationStructureInfoKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyMemoryToAccelerationStructureInfoKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCopyMemoryToAccelerationStructureKHR(PfnVkVoidFunction func) + { + return new VkCopyMemoryToAccelerationStructureKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkCopyMemoryToAccelerationStructureInfoKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkWriteAccelerationStructuresPropertiesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkAccelerationStructureKHR*, + VkQueryType, + nuint, + void*, + nuint, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkAccelerationStructureKHR*, + VkQueryType, + nuint, + void*, + nuint, + VkResult> Invoke = handle; + + public static explicit operator VkWriteAccelerationStructuresPropertiesKHR(PfnVkVoidFunction func) + { + return new VkWriteAccelerationStructuresPropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + int, + VkAccelerationStructureKHR*, + VkQueryType, + nuint, + void*, + nuint, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyAccelerationStructureKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdCopyAccelerationStructureKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyAccelerationStructureKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyAccelerationStructureToMemoryKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkCopyAccelerationStructureToMemoryInfoKHR*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyAccelerationStructureToMemoryKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyAccelerationStructureToMemoryKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdCopyMemoryToAccelerationStructureKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkCopyMemoryToAccelerationStructureInfoKHR*, + void> Invoke = handle; + + public static explicit operator VkCmdCopyMemoryToAccelerationStructureKHR(PfnVkVoidFunction func) + { + return new VkCmdCopyMemoryToAccelerationStructureKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetAccelerationStructureDeviceAddressKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureDeviceAddressInfoKHR*, + VkDeviceAddress> Invoke = handle; + + public static explicit operator VkGetAccelerationStructureDeviceAddressKHR(PfnVkVoidFunction func) + { + return new VkGetAccelerationStructureDeviceAddressKHR( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdWriteAccelerationStructuresPropertiesKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureKHR*, + VkQueryType, + VkQueryPool, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureKHR*, + VkQueryType, + VkQueryPool, + int, + void> Invoke = handle; + + public static explicit operator VkCmdWriteAccelerationStructuresPropertiesKHR(PfnVkVoidFunction func) + { + return new VkCmdWriteAccelerationStructuresPropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + int, + VkAccelerationStructureKHR*, + VkQueryType, + VkQueryPool, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceAccelerationStructureCompatibilityKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureVersionInfoKHR*, + VkAccelerationStructureCompatibilityKHR*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureVersionInfoKHR*, + VkAccelerationStructureCompatibilityKHR*, + void> Invoke = handle; + + public static explicit operator VkGetDeviceAccelerationStructureCompatibilityKHR(PfnVkVoidFunction func) + { + return new VkGetDeviceAccelerationStructureCompatibilityKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureVersionInfoKHR*, + VkAccelerationStructureCompatibilityKHR*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetAccelerationStructureBuildSizesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureBuildTypeKHR, + VkAccelerationStructureBuildGeometryInfoKHR*, + int*, + VkAccelerationStructureBuildSizesInfoKHR*, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureBuildTypeKHR, + VkAccelerationStructureBuildGeometryInfoKHR*, + int*, + VkAccelerationStructureBuildSizesInfoKHR*, + void> Invoke = handle; + + public static explicit operator VkGetAccelerationStructureBuildSizesKHR(PfnVkVoidFunction func) + { + return new VkGetAccelerationStructureBuildSizesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkAccelerationStructureBuildTypeKHR, + VkAccelerationStructureBuildGeometryInfoKHR*, + int*, + VkAccelerationStructureBuildSizesInfoKHR*, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdTraceRaysKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + int, + int, + int, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + int, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdTraceRaysKHR(PfnVkVoidFunction func) + { + return new VkCmdTraceRaysKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + int, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateRayTracingPipelinesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkPipelineCache, + int, + VkRayTracingPipelineCreateInfoKHR*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkPipelineCache, + int, + VkRayTracingPipelineCreateInfoKHR*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateRayTracingPipelinesKHR(PfnVkVoidFunction func) + { + return new VkCreateRayTracingPipelinesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeferredOperationKHR, + VkPipelineCache, + int, + VkRayTracingPipelineCreateInfoKHR*, + VkAllocationCallbacks*, + VkPipeline*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRayTracingCaptureReplayShaderGroupHandlesKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetRayTracingCaptureReplayShaderGroupHandlesKHR(PfnVkVoidFunction func) + { + return new VkGetRayTracingCaptureReplayShaderGroupHandlesKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdTraceRaysIndirectKHR( + delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkDeviceAddress, + void> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkDeviceAddress, + void> Invoke = handle; + + public static explicit operator VkCmdTraceRaysIndirectKHR(PfnVkVoidFunction func) + { + return new VkCmdTraceRaysIndirectKHR( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkStridedDeviceAddressRegionKHR*, + VkDeviceAddress, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRayTracingShaderGroupStackSizeKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPipeline, + int, + VkShaderGroupShaderKHR, + ByteSize64> Invoke = handle; + + public static explicit operator VkGetRayTracingShaderGroupStackSizeKHR(PfnVkVoidFunction func) + { + return new VkGetRayTracingShaderGroupStackSizeKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdSetRayTracingPipelineStackSizeKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdSetRayTracingPipelineStackSizeKHR(PfnVkVoidFunction func) + { + return new VkCmdSetRayTracingPipelineStackSizeKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkCmdDrawMeshTasksEXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksIndirectEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkCmdDrawMeshTasksIndirectEXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksIndirectEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCmdDrawMeshTasksIndirectCountEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void> Invoke = handle; + + public static explicit operator VkCmdDrawMeshTasksIndirectCountEXT(PfnVkVoidFunction func) + { + return new VkCmdDrawMeshTasksIndirectCountEXT( + (delegate* unmanaged[Cdecl]< + VkCommandBuffer, + VkBuffer, + ByteSize64, + VkBuffer, + ByteSize64, + int, + int, + void>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateWin32SurfaceKHR( + delegate* unmanaged[Cdecl]< + VkInstance, + VkWin32SurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkWin32SurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateWin32SurfaceKHR(PfnVkVoidFunction func) + { + return new VkCreateWin32SurfaceKHR( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkWin32SurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceWin32PresentationSupportKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceWin32PresentationSupportKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceWin32PresentationSupportKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryWin32HandleKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetMemoryWin32HandleKHR(PfnVkVoidFunction func) + { + return new VkGetMemoryWin32HandleKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryWin32HandlePropertiesKHR( + delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + nint, + VkMemoryWin32HandlePropertiesKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + nint, + VkMemoryWin32HandlePropertiesKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryWin32HandlePropertiesKHR(PfnVkVoidFunction func) + { + return new VkGetMemoryWin32HandlePropertiesKHR( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + nint, + VkMemoryWin32HandlePropertiesKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkImportSemaphoreWin32HandleKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkImportSemaphoreWin32HandleKHR(PfnVkVoidFunction func) + { + return new VkImportSemaphoreWin32HandleKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetSemaphoreWin32HandleKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkSemaphoreGetWin32HandleInfoKHR*, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetSemaphoreWin32HandleKHR(PfnVkVoidFunction func) + { + return new VkGetSemaphoreWin32HandleKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkImportFenceWin32HandleKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkImportFenceWin32HandleKHR(PfnVkVoidFunction func) + { + return new VkImportFenceWin32HandleKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetFenceWin32HandleKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetFenceWin32HandleKHR(PfnVkVoidFunction func) + { + return new VkGetFenceWin32HandleKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryWin32HandleNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceMemory, + VkExternalMemoryHandleTypeFlagsNV, + nint*, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryWin32HandleNV(PfnVkVoidFunction func) + { + return new VkGetMemoryWin32HandleNV( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkDeviceMemory, + VkExternalMemoryHandleTypeFlagsNV, + nint*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceSurfacePresentModes2EXT( + delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + int*, + VkPresentModeKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + int*, + VkPresentModeKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceSurfacePresentModes2EXT(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceSurfacePresentModes2EXT( + (delegate* unmanaged[Cdecl]< + VkPhysicalDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + int*, + VkPresentModeKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireFullScreenExclusiveModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkAcquireFullScreenExclusiveModeEXT(PfnVkVoidFunction func) + { + return new VkAcquireFullScreenExclusiveModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkReleaseFullScreenExclusiveModeEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkReleaseFullScreenExclusiveModeEXT(PfnVkVoidFunction func) + { + return new VkReleaseFullScreenExclusiveModeEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetDeviceGroupSurfacePresentModes2EXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + VkDeviceGroupPresentModeFlagsKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + VkDeviceGroupPresentModeFlagsKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkGetDeviceGroupSurfacePresentModes2EXT(PfnVkVoidFunction func) + { + return new VkGetDeviceGroupSurfacePresentModes2EXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkPhysicalDeviceSurfaceInfo2KHR*, + VkDeviceGroupPresentModeFlagsKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireWinrtDisplayNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkAcquireWinrtDisplayNV(PfnVkVoidFunction func) + { + return new VkAcquireWinrtDisplayNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetWinrtDisplayNV( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetWinrtDisplayNV(PfnVkVoidFunction func) + { + return new VkGetWinrtDisplayNV( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateXlibSurfaceKHR( + delegate* unmanaged[Cdecl]< + VkInstance, + VkXlibSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkXlibSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateXlibSurfaceKHR(PfnVkVoidFunction func) + { + return new VkCreateXlibSurfaceKHR( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkXlibSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceXlibPresentationSupportKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceXlibPresentationSupportKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceXlibPresentationSupportKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkAcquireXlibDisplayEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkAcquireXlibDisplayEXT(PfnVkVoidFunction func) + { + return new VkAcquireXlibDisplayEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetRandROutputDisplayEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetRandROutputDisplayEXT(PfnVkVoidFunction func) + { + return new VkGetRandROutputDisplayEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateXcbSurfaceKHR( + delegate* unmanaged[Cdecl]< + VkInstance, + VkXcbSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkXcbSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateXcbSurfaceKHR(PfnVkVoidFunction func) + { + return new VkCreateXcbSurfaceKHR( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkXcbSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceXcbPresentationSupportKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceXcbPresentationSupportKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceXcbPresentationSupportKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateWaylandSurfaceKHR( + delegate* unmanaged[Cdecl]< + VkInstance, + VkWaylandSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkWaylandSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateWaylandSurfaceKHR(PfnVkVoidFunction func) + { + return new VkCreateWaylandSurfaceKHR( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkWaylandSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetPhysicalDeviceWaylandPresentationSupportKHR( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkGetPhysicalDeviceWaylandPresentationSupportKHR(PfnVkVoidFunction func) + { + return new VkGetPhysicalDeviceWaylandPresentationSupportKHR( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateMetalSurfaceEXT( + delegate* unmanaged[Cdecl]< + VkInstance, + VkMetalSurfaceCreateInfoEXT*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkMetalSurfaceCreateInfoEXT*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateMetalSurfaceEXT(PfnVkVoidFunction func) + { + return new VkCreateMetalSurfaceEXT( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkMetalSurfaceCreateInfoEXT*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkExportMetalObjectsEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator VkExportMetalObjectsEXT(PfnVkVoidFunction func) + { + return new VkExportMetalObjectsEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryMetalHandleEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VkGetMemoryMetalHandleEXT(PfnVkVoidFunction func) + { + return new VkGetMemoryMetalHandleEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryMetalHandlePropertiesEXT( + delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + void*, + VkMemoryMetalHandlePropertiesEXT*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + void*, + VkMemoryMetalHandlePropertiesEXT*, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryMetalHandlePropertiesEXT(PfnVkVoidFunction func) + { + return new VkGetMemoryMetalHandlePropertiesEXT( + (delegate* unmanaged[Cdecl]< + VkDevice, + VkExternalMemoryHandleTypeFlags, + void*, + VkMemoryMetalHandlePropertiesEXT*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkCreateAndroidSurfaceKHR( + delegate* unmanaged[Cdecl]< + VkInstance, + VkAndroidSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkInstance, + VkAndroidSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult> Invoke = handle; + + public static explicit operator VkCreateAndroidSurfaceKHR(PfnVkVoidFunction func) + { + return new VkCreateAndroidSurfaceKHR( + (delegate* unmanaged[Cdecl]< + VkInstance, + VkAndroidSurfaceCreateInfoKHR*, + VkAllocationCallbacks*, + VkSurfaceKHR*, + VkResult>) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetAndroidHardwareBufferPropertiesANDROID( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + void*, + VkAndroidHardwareBufferPropertiesANDROID*, + VkResult> Invoke = handle; + + public static explicit operator VkGetAndroidHardwareBufferPropertiesANDROID(PfnVkVoidFunction func) + { + return new VkGetAndroidHardwareBufferPropertiesANDROID( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VkGetMemoryAndroidHardwareBufferANDROID( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDevice, + VkMemoryGetAndroidHardwareBufferInfoANDROID*, + void**, + VkResult> Invoke = handle; + + public static explicit operator VkGetMemoryAndroidHardwareBufferANDROID(PfnVkVoidFunction func) + { + return new VkGetMemoryAndroidHardwareBufferANDROID( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct VxDestroyImages( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VxDestroyImages(PfnVkVoidFunction func) + { + return new VxDestroyImages( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VxDestroyImageViews( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VxDestroyImageViews(PfnVkVoidFunction func) + { + return new VxDestroyImageViews( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VxDestroyBuffers( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VxDestroyBuffers(PfnVkVoidFunction func) + { + return new VxDestroyBuffers( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct VxDestroyBufferViews( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator VxDestroyBufferViews(PfnVkVoidFunction func) + { + return new VxDestroyBufferViews( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkAllocationFunction( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator PfnVkAllocationFunction(PfnVkVoidFunction func) + { + return new PfnVkAllocationFunction( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkFreeFunction(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator PfnVkFreeFunction(PfnVkVoidFunction func) + { + return new PfnVkFreeFunction((delegate* unmanaged[Cdecl])func.Invoke); + } + } + + public readonly unsafe struct PfnVkInternalAllocationNotification( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + void*, + nuint, + VkInternalAllocationType, + VkSystemAllocationScope, + void> Invoke = handle; + + public static explicit operator PfnVkInternalAllocationNotification(PfnVkVoidFunction func) + { + return new PfnVkInternalAllocationNotification( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkInternalFreeNotification( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + void*, + nuint, + VkInternalAllocationType, + VkSystemAllocationScope, + void> Invoke = handle; + + public static explicit operator PfnVkInternalFreeNotification(PfnVkVoidFunction func) + { + return new PfnVkInternalFreeNotification( + (delegate* unmanaged[Cdecl]) + func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkReallocationFunction( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = + handle; + + public static explicit operator PfnVkReallocationFunction(PfnVkVoidFunction func) + { + return new PfnVkReallocationFunction( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkVoidFunction(delegate* unmanaged[Cdecl] handle) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + } + + public readonly unsafe struct PfnVkDebugReportCallbackEXT( + delegate* unmanaged[Cdecl]< + VkDebugReportFlagsEXT, + VkDebugReportObjectTypeEXT, + nint, + nuint, + int, + byte*, + byte*, + void*, + Brutal.Bool32> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDebugReportFlagsEXT, + VkDebugReportObjectTypeEXT, + nint, + nuint, + int, + byte*, + byte*, + void*, + Brutal.Bool32> Invoke = handle; + + public static explicit operator PfnVkDebugReportCallbackEXT(PfnVkVoidFunction func) + { + return new PfnVkDebugReportCallbackEXT( + (delegate* unmanaged[Cdecl]< + VkDebugReportFlagsEXT, + VkDebugReportObjectTypeEXT, + nint, + nuint, + int, + byte*, + byte*, + void*, + Brutal.Bool32>) + func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkDebugUtilsMessengerCallbackEXT( + delegate* unmanaged[Cdecl]< + VkDebugUtilsMessageSeverityFlagsEXT, + VkDebugUtilsMessageTypeFlagsEXT, + VkDebugUtilsMessengerCallbackDataEXT*, + void*, + Brutal.Bool32> handle + ) + { + public readonly delegate* unmanaged[Cdecl]< + VkDebugUtilsMessageSeverityFlagsEXT, + VkDebugUtilsMessageTypeFlagsEXT, + VkDebugUtilsMessengerCallbackDataEXT*, + void*, + Brutal.Bool32> Invoke = handle; + + public static explicit operator PfnVkDebugUtilsMessengerCallbackEXT(PfnVkVoidFunction func) + { + return new PfnVkDebugUtilsMessengerCallbackEXT( + (delegate* unmanaged[Cdecl]< + VkDebugUtilsMessageSeverityFlagsEXT, + VkDebugUtilsMessageTypeFlagsEXT, + VkDebugUtilsMessengerCallbackDataEXT*, + void*, + Brutal.Bool32>) + func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkDeviceMemoryReportCallbackEXT( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator PfnVkDeviceMemoryReportCallbackEXT(PfnVkVoidFunction func) + { + return new PfnVkDeviceMemoryReportCallbackEXT( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } + + public readonly unsafe struct PfnVkGetInstanceProcAddrLUNARG( + delegate* unmanaged[Cdecl] handle + ) + { + public readonly delegate* unmanaged[Cdecl] Invoke = handle; + + public static explicit operator PfnVkGetInstanceProcAddrLUNARG(PfnVkVoidFunction func) + { + return new PfnVkGetInstanceProcAddrLUNARG( + (delegate* unmanaged[Cdecl])func.Invoke + ); + } + } +} diff --git a/Brutal.Vulkan/Generated/Globals.gen.cs b/Brutal.Vulkan/Generated/Globals.gen.cs new file mode 100644 index 0000000..78ea742 --- /dev/null +++ b/Brutal.Vulkan/Generated/Globals.gen.cs @@ -0,0 +1,556 @@ +global using VkAabbPositionsNV = Brutal.VulkanApi.VkAabbPositionsKHR; +global using VkAccelerationStructureCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkAccelerationStructureInstanceNV = Brutal.VulkanApi.VkAccelerationStructureInstanceKHR; +global using VkAccelerationStructureMotionInfoFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkAccelerationStructureMotionInstanceFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkAccelerationStructureTypeNV = Brutal.VulkanApi.VkAccelerationStructureTypeKHR; +global using VkAccessFlags = Brutal.VulkanApi.VkFlags; +global using VkAccessFlags2 = Brutal.VulkanApi.VkFlags64; +global using VkAccessFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkAccessFlags3KHR = Brutal.VulkanApi.VkFlags64; +global using VkAcquireProfilingLockFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkAddressCommandFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkAddressCopyFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkAndroidSurfaceCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkAttachmentDescription2KHR = Brutal.VulkanApi.VkAttachmentDescription2; +global using VkAttachmentDescriptionFlags = Brutal.VulkanApi.VkFlags; +global using VkAttachmentDescriptionStencilLayoutKHR = Brutal.VulkanApi.VkAttachmentDescriptionStencilLayout; +global using VkAttachmentReference2KHR = Brutal.VulkanApi.VkAttachmentReference2; +global using VkAttachmentReferenceStencilLayoutKHR = Brutal.VulkanApi.VkAttachmentReferenceStencilLayout; +global using VkAttachmentSampleCountInfoNV = Brutal.VulkanApi.VkAttachmentSampleCountInfoAMD; +global using VkBindBufferMemoryDeviceGroupInfoKHR = Brutal.VulkanApi.VkBindBufferMemoryDeviceGroupInfo; +global using VkBindBufferMemoryInfoKHR = Brutal.VulkanApi.VkBindBufferMemoryInfo; +global using VkBindDescriptorSetsInfoKHR = Brutal.VulkanApi.VkBindDescriptorSetsInfo; +global using VkBindImageMemoryDeviceGroupInfoKHR = Brutal.VulkanApi.VkBindImageMemoryDeviceGroupInfo; +global using VkBindImageMemoryInfoKHR = Brutal.VulkanApi.VkBindImageMemoryInfo; +global using VkBindImagePlaneMemoryInfoKHR = Brutal.VulkanApi.VkBindImagePlaneMemoryInfo; +global using VkBindMemoryStatusKHR = Brutal.VulkanApi.VkBindMemoryStatus; +global using VkBlitImageInfo2KHR = Brutal.VulkanApi.VkBlitImageInfo2; +global using VkBool32 = Brutal.Bool32; +global using VkBufferCopy2KHR = Brutal.VulkanApi.VkBufferCopy2; +global using VkBufferCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkBufferDeviceAddressInfoEXT = Brutal.VulkanApi.VkBufferDeviceAddressInfo; +global using VkBufferDeviceAddressInfoKHR = Brutal.VulkanApi.VkBufferDeviceAddressInfo; +global using VkBufferImageCopy2KHR = Brutal.VulkanApi.VkBufferImageCopy2; +global using VkBufferMemoryBarrier2KHR = Brutal.VulkanApi.VkBufferMemoryBarrier2; +global using VkBufferMemoryRequirementsInfo2KHR = Brutal.VulkanApi.VkBufferMemoryRequirementsInfo2; +global using VkBufferOpaqueCaptureAddressCreateInfoKHR = Brutal.VulkanApi.VkBufferOpaqueCaptureAddressCreateInfo; +global using VkBufferUsageFlags = Brutal.VulkanApi.VkFlags; +global using VkBufferUsageFlags2 = Brutal.VulkanApi.VkFlags64; +global using VkBufferUsageFlags2CreateInfoKHR = Brutal.VulkanApi.VkBufferUsageFlags2CreateInfo; +global using VkBufferUsageFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkBufferViewCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkBuildAccelerationStructureFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkBuildAccelerationStructureFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkBuildMicromapFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkCalibratedTimestampInfoEXT = Brutal.VulkanApi.VkCalibratedTimestampInfoKHR; +global using VkChromaLocationKHR = Brutal.VulkanApi.VkChromaLocation; +global using VkClusterAccelerationStructureAddressResolutionFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkClusterAccelerationStructureClusterFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkClusterAccelerationStructureGeometryFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkClusterAccelerationStructureIndexFormatFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkColorComponentFlags = Brutal.VulkanApi.VkFlags; +global using VkCommandBufferInheritanceRenderingInfoKHR = Brutal.VulkanApi.VkCommandBufferInheritanceRenderingInfo; +global using VkCommandBufferResetFlags = Brutal.VulkanApi.VkFlags; +global using VkCommandBufferSubmitInfoKHR = Brutal.VulkanApi.VkCommandBufferSubmitInfo; +global using VkCommandBufferUsageFlags = Brutal.VulkanApi.VkFlags; +global using VkCommandPoolCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkCommandPoolResetFlags = Brutal.VulkanApi.VkFlags; +global using VkCommandPoolTrimFlags = Brutal.VulkanApi.VkFlags; +global using VkCommandPoolTrimFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkComponentTypeNV = Brutal.VulkanApi.VkComponentTypeKHR; +global using VkCompositeAlphaFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkConditionalRenderingFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkConformanceVersionKHR = Brutal.VulkanApi.VkConformanceVersion; +global using VkCopyAccelerationStructureModeNV = Brutal.VulkanApi.VkCopyAccelerationStructureModeKHR; +global using VkCopyBufferInfo2KHR = Brutal.VulkanApi.VkCopyBufferInfo2; +global using VkCopyBufferToImageInfo2KHR = Brutal.VulkanApi.VkCopyBufferToImageInfo2; +global using VkCopyImageInfo2KHR = Brutal.VulkanApi.VkCopyImageInfo2; +global using VkCopyImageToBufferInfo2KHR = Brutal.VulkanApi.VkCopyImageToBufferInfo2; +global using VkCopyImageToImageInfoEXT = Brutal.VulkanApi.VkCopyImageToImageInfo; +global using VkCopyImageToMemoryInfoEXT = Brutal.VulkanApi.VkCopyImageToMemoryInfo; +global using VkCopyMemoryIndirectCommandNV = Brutal.VulkanApi.VkCopyMemoryIndirectCommandKHR; +global using VkCopyMemoryToImageIndirectCommandNV = Brutal.VulkanApi.VkCopyMemoryToImageIndirectCommandKHR; +global using VkCopyMemoryToImageInfoEXT = Brutal.VulkanApi.VkCopyMemoryToImageInfo; +global using VkCullModeFlags = Brutal.VulkanApi.VkFlags; +global using VkDataGraphOpticalFlowCreateFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkDataGraphOpticalFlowExecuteFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkDataGraphOpticalFlowGridSizeFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkDataGraphOpticalFlowImageUsageFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkDataGraphPipelineDispatchFlagsARM = Brutal.VulkanApi.VkFlags64; +global using VkDataGraphPipelineSessionCreateFlagsARM = Brutal.VulkanApi.VkFlags64; +global using VkDataGraphTosaQualityFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkDebugReportFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDebugUtilsMessageSeverityFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDebugUtilsMessageTypeFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDebugUtilsMessengerCallbackDataFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDebugUtilsMessengerCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDependencyFlags = Brutal.VulkanApi.VkFlags; +global using VkDependencyInfoKHR = Brutal.VulkanApi.VkDependencyInfo; +global using VkDescriptorBindingFlags = Brutal.VulkanApi.VkFlags; +global using VkDescriptorBindingFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDescriptorPoolCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkDescriptorPoolInlineUniformBlockCreateInfoEXT = Brutal.VulkanApi.VkDescriptorPoolInlineUniformBlockCreateInfo; +global using VkDescriptorPoolResetFlags = Brutal.VulkanApi.VkFlags; +global using VkDescriptorSetLayoutBindingFlagsCreateInfoEXT = Brutal.VulkanApi.VkDescriptorSetLayoutBindingFlagsCreateInfo; +global using VkDescriptorSetLayoutCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkDescriptorSetLayoutSupportKHR = Brutal.VulkanApi.VkDescriptorSetLayoutSupport; +global using VkDescriptorSetVariableDescriptorCountAllocateInfoEXT = Brutal.VulkanApi.VkDescriptorSetVariableDescriptorCountAllocateInfo; +global using VkDescriptorSetVariableDescriptorCountLayoutSupportEXT = Brutal.VulkanApi.VkDescriptorSetVariableDescriptorCountLayoutSupport; +global using VkDescriptorUpdateTemplateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkDescriptorUpdateTemplateCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkDescriptorUpdateTemplateCreateInfoKHR = Brutal.VulkanApi.VkDescriptorUpdateTemplateCreateInfo; +global using VkDescriptorUpdateTemplateEntryKHR = Brutal.VulkanApi.VkDescriptorUpdateTemplateEntry; +global using VkDescriptorUpdateTemplateKHR = Brutal.VulkanApi.VkDescriptorUpdateTemplate; +global using VkDescriptorUpdateTemplateTypeKHR = Brutal.VulkanApi.VkDescriptorUpdateTemplateType; +global using VkDeviceAddressBindingFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDeviceAddressRangeEXT = Brutal.VulkanApi.VkDeviceAddressRangeKHR; +global using VkDeviceBufferMemoryRequirementsKHR = Brutal.VulkanApi.VkDeviceBufferMemoryRequirements; +global using VkDeviceCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkDeviceDiagnosticsConfigFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkDeviceFaultAddressInfoEXT = Brutal.VulkanApi.VkDeviceFaultAddressInfoKHR; +global using VkDeviceFaultAddressTypeEXT = Brutal.VulkanApi.VkDeviceFaultAddressTypeKHR; +global using VkDeviceFaultFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkDeviceFaultVendorBinaryHeaderVersionEXT = Brutal.VulkanApi.VkDeviceFaultVendorBinaryHeaderVersionKHR; +global using VkDeviceFaultVendorBinaryHeaderVersionOneEXT = Brutal.VulkanApi.VkDeviceFaultVendorBinaryHeaderVersionOneKHR; +global using VkDeviceFaultVendorInfoEXT = Brutal.VulkanApi.VkDeviceFaultVendorInfoKHR; +global using VkDeviceGroupBindSparseInfoKHR = Brutal.VulkanApi.VkDeviceGroupBindSparseInfo; +global using VkDeviceGroupCommandBufferBeginInfoKHR = Brutal.VulkanApi.VkDeviceGroupCommandBufferBeginInfo; +global using VkDeviceGroupDeviceCreateInfoKHR = Brutal.VulkanApi.VkDeviceGroupDeviceCreateInfo; +global using VkDeviceGroupPresentModeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkDeviceGroupRenderPassBeginInfoKHR = Brutal.VulkanApi.VkDeviceGroupRenderPassBeginInfo; +global using VkDeviceGroupSubmitInfoKHR = Brutal.VulkanApi.VkDeviceGroupSubmitInfo; +global using VkDeviceImageMemoryRequirementsKHR = Brutal.VulkanApi.VkDeviceImageMemoryRequirements; +global using VkDeviceImageSubresourceInfoKHR = Brutal.VulkanApi.VkDeviceImageSubresourceInfo; +global using VkDeviceMemoryOpaqueCaptureAddressInfoKHR = Brutal.VulkanApi.VkDeviceMemoryOpaqueCaptureAddressInfo; +global using VkDeviceMemoryReportFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkDevicePrivateDataCreateInfoEXT = Brutal.VulkanApi.VkDevicePrivateDataCreateInfo; +global using VkDeviceQueueCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkDeviceQueueGlobalPriorityCreateInfoEXT = Brutal.VulkanApi.VkDeviceQueueGlobalPriorityCreateInfo; +global using VkDeviceQueueGlobalPriorityCreateInfoKHR = Brutal.VulkanApi.VkDeviceQueueGlobalPriorityCreateInfo; +global using VkDirectDriverLoadingFlagsLUNARG = Brutal.VulkanApi.VkFlags; +global using VkDisplayModeCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkDisplayPlaneAlphaFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkDisplaySurfaceCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkDriverIdKHR = Brutal.VulkanApi.VkDriverId; +global using VkEventCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkExportFenceCreateInfoKHR = Brutal.VulkanApi.VkExportFenceCreateInfo; +global using VkExportMemoryAllocateInfoKHR = Brutal.VulkanApi.VkExportMemoryAllocateInfo; +global using VkExportMetalObjectTypeFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkExportSemaphoreCreateInfoKHR = Brutal.VulkanApi.VkExportSemaphoreCreateInfo; +global using VkExternalBufferPropertiesKHR = Brutal.VulkanApi.VkExternalBufferProperties; +global using VkExternalFenceFeatureFlags = Brutal.VulkanApi.VkFlags; +global using VkExternalFenceFeatureFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkExternalFenceHandleTypeFlags = Brutal.VulkanApi.VkFlags; +global using VkExternalFenceHandleTypeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkExternalFencePropertiesKHR = Brutal.VulkanApi.VkExternalFenceProperties; +global using VkExternalImageFormatPropertiesKHR = Brutal.VulkanApi.VkExternalImageFormatProperties; +global using VkExternalMemoryBufferCreateInfoKHR = Brutal.VulkanApi.VkExternalMemoryBufferCreateInfo; +global using VkExternalMemoryFeatureFlags = Brutal.VulkanApi.VkFlags; +global using VkExternalMemoryFeatureFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkExternalMemoryFeatureFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkExternalMemoryHandleTypeFlags = Brutal.VulkanApi.VkFlags; +global using VkExternalMemoryHandleTypeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkExternalMemoryHandleTypeFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkExternalMemoryImageCreateInfoKHR = Brutal.VulkanApi.VkExternalMemoryImageCreateInfo; +global using VkExternalMemoryPropertiesKHR = Brutal.VulkanApi.VkExternalMemoryProperties; +global using VkExternalSemaphoreFeatureFlags = Brutal.VulkanApi.VkFlags; +global using VkExternalSemaphoreFeatureFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkExternalSemaphoreHandleTypeFlags = Brutal.VulkanApi.VkFlags; +global using VkExternalSemaphoreHandleTypeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkExternalSemaphorePropertiesKHR = Brutal.VulkanApi.VkExternalSemaphoreProperties; +global using VkFenceCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkFenceImportFlags = Brutal.VulkanApi.VkFlags; +global using VkFenceImportFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkFormatFeatureFlags = Brutal.VulkanApi.VkFlags; +global using VkFormatFeatureFlags2 = Brutal.VulkanApi.VkFlags64; +global using VkFormatFeatureFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkFormatFeatureFlags4KHR = Brutal.VulkanApi.VkFlags64; +global using VkFormatProperties2KHR = Brutal.VulkanApi.VkFormatProperties2; +global using VkFormatProperties3KHR = Brutal.VulkanApi.VkFormatProperties3; +global using VkFrameBoundaryFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkFramebufferAttachmentImageInfoKHR = Brutal.VulkanApi.VkFramebufferAttachmentImageInfo; +global using VkFramebufferAttachmentsCreateInfoKHR = Brutal.VulkanApi.VkFramebufferAttachmentsCreateInfo; +global using VkFramebufferCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkGeometryFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkGeometryFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkGeometryInstanceFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkGeometryInstanceFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkGeometryTypeNV = Brutal.VulkanApi.VkGeometryTypeKHR; +global using VkGpaPerfBlockPropertiesFlagsAMD = Brutal.VulkanApi.VkFlags; +global using VkGpaSqShaderStageFlagsAMD = Brutal.VulkanApi.VkFlags; +global using VkGraphicsPipelineLibraryFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkHeadlessSurfaceCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkHostImageCopyDevicePerformanceQueryEXT = Brutal.VulkanApi.VkHostImageCopyDevicePerformanceQuery; +global using VkHostImageCopyFlags = Brutal.VulkanApi.VkFlags; +global using VkHostImageCopyFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkHostImageLayoutTransitionInfoEXT = Brutal.VulkanApi.VkHostImageLayoutTransitionInfo; +global using VkImageAspectFlags = Brutal.VulkanApi.VkFlags; +global using VkImageBlit2KHR = Brutal.VulkanApi.VkImageBlit2; +global using VkImageCompressionFixedRateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkImageCompressionFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkImageCopy2KHR = Brutal.VulkanApi.VkImageCopy2; +global using VkImageCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkImageCreateFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkImageFormatListCreateInfoKHR = Brutal.VulkanApi.VkImageFormatListCreateInfo; +global using VkImageFormatProperties2KHR = Brutal.VulkanApi.VkImageFormatProperties2; +global using VkImageMemoryBarrier2KHR = Brutal.VulkanApi.VkImageMemoryBarrier2; +global using VkImageMemoryRequirementsInfo2KHR = Brutal.VulkanApi.VkImageMemoryRequirementsInfo2; +global using VkImagePlaneMemoryRequirementsInfoKHR = Brutal.VulkanApi.VkImagePlaneMemoryRequirementsInfo; +global using VkImageResolve2KHR = Brutal.VulkanApi.VkImageResolve2; +global using VkImageSparseMemoryRequirementsInfo2KHR = Brutal.VulkanApi.VkImageSparseMemoryRequirementsInfo2; +global using VkImageStencilUsageCreateInfoEXT = Brutal.VulkanApi.VkImageStencilUsageCreateInfo; +global using VkImageSubresource2EXT = Brutal.VulkanApi.VkImageSubresource2; +global using VkImageSubresource2KHR = Brutal.VulkanApi.VkImageSubresource2; +global using VkImageToMemoryCopyEXT = Brutal.VulkanApi.VkImageToMemoryCopy; +global using VkImageUsageFlags = Brutal.VulkanApi.VkFlags; +global using VkImageUsageFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkImageViewCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkImageViewUsageCreateInfoKHR = Brutal.VulkanApi.VkImageViewUsageCreateInfo; +global using VkIndirectCommandsInputModeFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkIndirectCommandsLayoutUsageFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkIndirectCommandsLayoutUsageFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkIndirectStateFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkInputAttachmentAspectReferenceKHR = Brutal.VulkanApi.VkInputAttachmentAspectReference; +global using VkInstanceCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkLineRasterizationModeEXT = Brutal.VulkanApi.VkLineRasterizationMode; +global using VkLineRasterizationModeKHR = Brutal.VulkanApi.VkLineRasterizationMode; +global using VkMemoryAllocateFlags = Brutal.VulkanApi.VkFlags; +global using VkMemoryAllocateFlagsInfoKHR = Brutal.VulkanApi.VkMemoryAllocateFlagsInfo; +global using VkMemoryAllocateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkMemoryBarrier2KHR = Brutal.VulkanApi.VkMemoryBarrier2; +global using VkMemoryDecompressionMethodFlagsEXT = Brutal.VulkanApi.VkFlags64; +global using VkMemoryDecompressionMethodFlagsNV = Brutal.VulkanApi.VkFlags64; +global using VkMemoryDedicatedAllocateInfoKHR = Brutal.VulkanApi.VkMemoryDedicatedAllocateInfo; +global using VkMemoryDedicatedRequirementsKHR = Brutal.VulkanApi.VkMemoryDedicatedRequirements; +global using VkMemoryHeapFlags = Brutal.VulkanApi.VkFlags; +global using VkMemoryMapFlags = Brutal.VulkanApi.VkFlags; +global using VkMemoryMapInfoKHR = Brutal.VulkanApi.VkMemoryMapInfo; +global using VkMemoryOpaqueCaptureAddressAllocateInfoKHR = Brutal.VulkanApi.VkMemoryOpaqueCaptureAddressAllocateInfo; +global using VkMemoryPropertyFlags = Brutal.VulkanApi.VkFlags; +global using VkMemoryRequirements2KHR = Brutal.VulkanApi.VkMemoryRequirements2; +global using VkMemoryToImageCopyEXT = Brutal.VulkanApi.VkMemoryToImageCopy; +global using VkMemoryUnmapFlags = Brutal.VulkanApi.VkFlags; +global using VkMemoryUnmapFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkMemoryUnmapInfoKHR = Brutal.VulkanApi.VkMemoryUnmapInfo; +global using VkMetalSurfaceCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkMicromapCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkMicromapTriangleEXT = Brutal.VulkanApi.VkMicromapTriangleKHR; +global using VkMutableDescriptorTypeCreateInfoVALVE = Brutal.VulkanApi.VkMutableDescriptorTypeCreateInfoEXT; +global using VkMutableDescriptorTypeListVALVE = Brutal.VulkanApi.VkMutableDescriptorTypeListEXT; +global using VkOpacityMicromapFormatEXT = Brutal.VulkanApi.VkOpacityMicromapFormatKHR; +global using VkOpacityMicromapSpecialIndexEXT = Brutal.VulkanApi.VkOpacityMicromapSpecialIndexKHR; +global using VkOpticalFlowExecuteFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkOpticalFlowGridSizeFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkOpticalFlowSessionCreateFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkOpticalFlowUsageFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkPartitionedAccelerationStructureInstanceFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkPastPresentationTimingFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPeerMemoryFeatureFlags = Brutal.VulkanApi.VkFlags; +global using VkPeerMemoryFeatureFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkPerformanceCounterDescriptionFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkPerformanceCounterDescriptionFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkPhysicalDevice16BitStorageFeaturesKHR = Brutal.VulkanApi.VkPhysicalDevice16BitStorageFeatures; +global using VkPhysicalDevice8BitStorageFeaturesKHR = Brutal.VulkanApi.VkPhysicalDevice8BitStorageFeatures; +global using VkPhysicalDeviceBufferAddressFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceBufferDeviceAddressFeaturesEXT; +global using VkPhysicalDeviceBufferDeviceAddressFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceBufferDeviceAddressFeatures; +global using VkPhysicalDeviceComputeShaderDerivativesFeaturesNV = Brutal.VulkanApi.VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR; +global using VkPhysicalDeviceCopyMemoryIndirectPropertiesNV = Brutal.VulkanApi.VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR; +global using VkPhysicalDeviceDepthClampZeroOneFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceDepthClampZeroOneFeaturesKHR; +global using VkPhysicalDeviceDepthStencilResolvePropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceDepthStencilResolveProperties; +global using VkPhysicalDeviceDescriptorIndexingFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceDescriptorIndexingFeatures; +global using VkPhysicalDeviceDescriptorIndexingPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceDescriptorIndexingProperties; +global using VkPhysicalDeviceDriverPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceDriverProperties; +global using VkPhysicalDeviceDynamicRenderingFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceDynamicRenderingFeatures; +global using VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceDynamicRenderingLocalReadFeatures; +global using VkPhysicalDeviceExternalBufferInfoKHR = Brutal.VulkanApi.VkPhysicalDeviceExternalBufferInfo; +global using VkPhysicalDeviceExternalFenceInfoKHR = Brutal.VulkanApi.VkPhysicalDeviceExternalFenceInfo; +global using VkPhysicalDeviceExternalImageFormatInfoKHR = Brutal.VulkanApi.VkPhysicalDeviceExternalImageFormatInfo; +global using VkPhysicalDeviceExternalSemaphoreInfoKHR = Brutal.VulkanApi.VkPhysicalDeviceExternalSemaphoreInfo; +global using VkPhysicalDeviceFeatures2KHR = Brutal.VulkanApi.VkPhysicalDeviceFeatures2; +global using VkPhysicalDeviceFloat16Int8FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderFloat16Int8Features; +global using VkPhysicalDeviceFloatControlsPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceFloatControlsProperties; +global using VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM = Brutal.VulkanApi.VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT; +global using VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM = Brutal.VulkanApi.VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT; +global using VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV = Brutal.VulkanApi.VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR; +global using VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceGlobalPriorityQueryFeatures; +global using VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceGlobalPriorityQueryFeatures; +global using VkPhysicalDeviceGpaPropertiesFlagsAMD = Brutal.VulkanApi.VkFlags; +global using VkPhysicalDeviceGroupPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceGroupProperties; +global using VkPhysicalDeviceHostImageCopyFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceHostImageCopyFeatures; +global using VkPhysicalDeviceHostImageCopyPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceHostImageCopyProperties; +global using VkPhysicalDeviceHostQueryResetFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceHostQueryResetFeatures; +global using VkPhysicalDeviceIdPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceIdProperties; +global using VkPhysicalDeviceImageFormatInfo2KHR = Brutal.VulkanApi.VkPhysicalDeviceImageFormatInfo2; +global using VkPhysicalDeviceImagelessFramebufferFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceImagelessFramebufferFeatures; +global using VkPhysicalDeviceImageRobustnessFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceImageRobustnessFeatures; +global using VkPhysicalDeviceIndexTypeUInt8FeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceIndexTypeUInt8Features; +global using VkPhysicalDeviceIndexTypeUInt8FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceIndexTypeUInt8Features; +global using VkPhysicalDeviceInlineUniformBlockFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceInlineUniformBlockFeatures; +global using VkPhysicalDeviceInlineUniformBlockPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceInlineUniformBlockProperties; +global using VkPhysicalDeviceLineRasterizationFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceLineRasterizationFeatures; +global using VkPhysicalDeviceLineRasterizationFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceLineRasterizationFeatures; +global using VkPhysicalDeviceLineRasterizationPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceLineRasterizationProperties; +global using VkPhysicalDeviceLineRasterizationPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceLineRasterizationProperties; +global using VkPhysicalDeviceMaintenance3PropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance3Properties; +global using VkPhysicalDeviceMaintenance4FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance4Features; +global using VkPhysicalDeviceMaintenance4PropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance4Properties; +global using VkPhysicalDeviceMaintenance5FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance5Features; +global using VkPhysicalDeviceMaintenance5PropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance5Properties; +global using VkPhysicalDeviceMaintenance6FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance6Features; +global using VkPhysicalDeviceMaintenance6PropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceMaintenance6Properties; +global using VkPhysicalDeviceMemoryDecompressionFeaturesNV = Brutal.VulkanApi.VkPhysicalDeviceMemoryDecompressionFeaturesEXT; +global using VkPhysicalDeviceMemoryDecompressionPropertiesNV = Brutal.VulkanApi.VkPhysicalDeviceMemoryDecompressionPropertiesEXT; +global using VkPhysicalDeviceMemoryProperties2KHR = Brutal.VulkanApi.VkPhysicalDeviceMemoryProperties2; +global using VkPhysicalDeviceMultiviewFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceMultiviewFeatures; +global using VkPhysicalDeviceMultiviewPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceMultiviewProperties; +global using VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE = Brutal.VulkanApi.VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT; +global using VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT = Brutal.VulkanApi.VkPhysicalDevicePipelineCreationCacheControlFeatures; +global using VkPhysicalDevicePipelineProtectedAccessFeaturesEXT = Brutal.VulkanApi.VkPhysicalDevicePipelineProtectedAccessFeatures; +global using VkPhysicalDevicePipelineRobustnessFeaturesEXT = Brutal.VulkanApi.VkPhysicalDevicePipelineRobustnessFeatures; +global using VkPhysicalDevicePipelineRobustnessPropertiesEXT = Brutal.VulkanApi.VkPhysicalDevicePipelineRobustnessProperties; +global using VkPhysicalDevicePointClippingPropertiesKHR = Brutal.VulkanApi.VkPhysicalDevicePointClippingProperties; +global using VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT = Brutal.VulkanApi.VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR; +global using VkPhysicalDevicePrivateDataFeaturesEXT = Brutal.VulkanApi.VkPhysicalDevicePrivateDataFeatures; +global using VkPhysicalDeviceProperties2KHR = Brutal.VulkanApi.VkPhysicalDeviceProperties2; +global using VkPhysicalDevicePushDescriptorPropertiesKHR = Brutal.VulkanApi.VkPhysicalDevicePushDescriptorProperties; +global using VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = Brutal.VulkanApi.VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; +global using VkPhysicalDeviceRobustness2FeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceRobustness2FeaturesKHR; +global using VkPhysicalDeviceRobustness2PropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceRobustness2PropertiesKHR; +global using VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceSamplerFilterMinmaxProperties; +global using VkPhysicalDeviceSamplerYCbCrConversionFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceSamplerYCbCrConversionFeatures; +global using VkPhysicalDeviceScalarBlockLayoutFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceScalarBlockLayoutFeatures; +global using VkPhysicalDeviceSchedulingControlsFlagsARM = Brutal.VulkanApi.VkFlags64; +global using VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures; +global using VkPhysicalDeviceShaderAtomicInt64FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderAtomicInt64Features; +global using VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures; +global using VkPhysicalDeviceShaderDrawParameterFeatures = Brutal.VulkanApi.VkPhysicalDeviceShaderDrawParametersFeatures; +global using VkPhysicalDeviceShaderExpectAssumeFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderExpectAssumeFeatures; +global using VkPhysicalDeviceShaderFloat16Int8FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderFloat16Int8Features; +global using VkPhysicalDeviceShaderFloatControls2FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderFloatControls2Features; +global using VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderIntegerDotProductFeatures; +global using VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderIntegerDotProductProperties; +global using VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures; +global using VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderSubgroupRotateFeatures; +global using VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceShaderTerminateInvocationFeatures; +global using VkPhysicalDeviceSparseImageFormatInfo2KHR = Brutal.VulkanApi.VkPhysicalDeviceSparseImageFormatInfo2; +global using VkPhysicalDeviceSubgroupSizeControlFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceSubgroupSizeControlFeatures; +global using VkPhysicalDeviceSubgroupSizeControlPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceSubgroupSizeControlProperties; +global using VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR; +global using VkPhysicalDeviceSynchronization2FeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceSynchronization2Features; +global using VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceTexelBufferAlignmentProperties; +global using VkPhysicalDeviceTextureCompressionAstcHdrFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceTextureCompressionAstcHdrFeatures; +global using VkPhysicalDeviceTimelineSemaphoreFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceTimelineSemaphoreFeatures; +global using VkPhysicalDeviceTimelineSemaphorePropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceTimelineSemaphoreProperties; +global using VkPhysicalDeviceToolPropertiesEXT = Brutal.VulkanApi.VkPhysicalDeviceToolProperties; +global using VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceUniformBufferStandardLayoutFeatures; +global using VkPhysicalDeviceVariablePointerFeatures = Brutal.VulkanApi.VkPhysicalDeviceVariablePointersFeatures; +global using VkPhysicalDeviceVariablePointerFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceVariablePointersFeatures; +global using VkPhysicalDeviceVariablePointersFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceVariablePointersFeatures; +global using VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT = Brutal.VulkanApi.VkPhysicalDeviceVertexAttributeDivisorFeatures; +global using VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceVertexAttributeDivisorFeatures; +global using VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR = Brutal.VulkanApi.VkPhysicalDeviceVertexAttributeDivisorProperties; +global using VkPhysicalDeviceVulkanMemoryModelFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceVulkanMemoryModelFeatures; +global using VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = Brutal.VulkanApi.VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; +global using VkPipelineCacheCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineColorBlendStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineCompilerControlFlagsAMD = Brutal.VulkanApi.VkFlags; +global using VkPipelineCoverageModulationStateCreateFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkPipelineCoverageReductionStateCreateFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkPipelineCoverageToColorStateCreateFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkPipelineCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineCreateFlags2 = Brutal.VulkanApi.VkFlags64; +global using VkPipelineCreateFlags2CreateInfoKHR = Brutal.VulkanApi.VkPipelineCreateFlags2CreateInfo; +global using VkPipelineCreateFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkPipelineCreationFeedbackCreateInfoEXT = Brutal.VulkanApi.VkPipelineCreationFeedbackCreateInfo; +global using VkPipelineCreationFeedbackEXT = Brutal.VulkanApi.VkPipelineCreationFeedback; +global using VkPipelineCreationFeedbackFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineCreationFeedbackFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPipelineDepthStencilStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineDiscardRectangleStateCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPipelineDynamicStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineInfoEXT = Brutal.VulkanApi.VkPipelineInfoKHR; +global using VkPipelineInputAssemblyStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineLayoutCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineMultisampleStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineRasterizationConservativeStateCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPipelineRasterizationDepthClipStateCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPipelineRasterizationLineStateCreateInfoEXT = Brutal.VulkanApi.VkPipelineRasterizationLineStateCreateInfo; +global using VkPipelineRasterizationLineStateCreateInfoKHR = Brutal.VulkanApi.VkPipelineRasterizationLineStateCreateInfo; +global using VkPipelineRasterizationStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineRasterizationStateStreamCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPipelineRenderingCreateInfoKHR = Brutal.VulkanApi.VkPipelineRenderingCreateInfo; +global using VkPipelineRobustnessBufferBehaviorEXT = Brutal.VulkanApi.VkPipelineRobustnessBufferBehavior; +global using VkPipelineRobustnessCreateInfoEXT = Brutal.VulkanApi.VkPipelineRobustnessCreateInfo; +global using VkPipelineRobustnessImageBehaviorEXT = Brutal.VulkanApi.VkPipelineRobustnessImageBehavior; +global using VkPipelineShaderStageCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = Brutal.VulkanApi.VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; +global using VkPipelineStageFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineStageFlags2 = Brutal.VulkanApi.VkFlags64; +global using VkPipelineStageFlags2KHR = Brutal.VulkanApi.VkFlags64; +global using VkPipelineTessellationDomainOriginStateCreateInfoKHR = Brutal.VulkanApi.VkPipelineTessellationDomainOriginStateCreateInfo; +global using VkPipelineTessellationStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineVertexInputDivisorStateCreateInfoEXT = Brutal.VulkanApi.VkPipelineVertexInputDivisorStateCreateInfo; +global using VkPipelineVertexInputDivisorStateCreateInfoKHR = Brutal.VulkanApi.VkPipelineVertexInputDivisorStateCreateInfo; +global using VkPipelineVertexInputStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineViewportStateCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPipelineViewportSwizzleStateCreateFlagsNV = Brutal.VulkanApi.VkFlags; +global using VkPointClippingBehaviorKHR = Brutal.VulkanApi.VkPointClippingBehavior; +global using VkPresentGravityFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPresentGravityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkPresentScalingFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPresentScalingFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkPresentStageFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPresentTimingInfoFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPrivateDataSlotCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkPrivateDataSlotCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkPrivateDataSlotCreateInfoEXT = Brutal.VulkanApi.VkPrivateDataSlotCreateInfo; +global using VkPrivateDataSlotEXT = Brutal.VulkanApi.VkPrivateDataSlot; +global using VkPushConstantsInfoKHR = Brutal.VulkanApi.VkPushConstantsInfo; +global using VkPushDescriptorSetInfoKHR = Brutal.VulkanApi.VkPushDescriptorSetInfo; +global using VkPushDescriptorSetWithTemplateInfoKHR = Brutal.VulkanApi.VkPushDescriptorSetWithTemplateInfo; +global using VkQueryControlFlags = Brutal.VulkanApi.VkFlags; +global using VkQueryPipelineStatisticFlags = Brutal.VulkanApi.VkFlags; +global using VkQueryPoolCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkQueryPoolCreateInfoINTEL = Brutal.VulkanApi.VkQueryPoolPerformanceQueryCreateInfoINTEL; +global using VkQueryResultFlags = Brutal.VulkanApi.VkFlags; +global using VkQueueFamilyGlobalPriorityPropertiesEXT = Brutal.VulkanApi.VkQueueFamilyGlobalPriorityProperties; +global using VkQueueFamilyGlobalPriorityPropertiesKHR = Brutal.VulkanApi.VkQueueFamilyGlobalPriorityProperties; +global using VkQueueFamilyProperties2KHR = Brutal.VulkanApi.VkQueueFamilyProperties2; +global using VkQueueFlags = Brutal.VulkanApi.VkFlags; +global using VkQueueGlobalPriorityEXT = Brutal.VulkanApi.VkQueueGlobalPriority; +global using VkQueueGlobalPriorityKHR = Brutal.VulkanApi.VkQueueGlobalPriority; +global using VkRayTracingInvocationReorderModeNV = Brutal.VulkanApi.VkRayTracingInvocationReorderModeEXT; +global using VkRayTracingShaderGroupTypeNV = Brutal.VulkanApi.VkRayTracingShaderGroupTypeKHR; +global using VkReleaseSwapchainImagesInfoEXT = Brutal.VulkanApi.VkReleaseSwapchainImagesInfoKHR; +global using VkRenderingAreaInfoKHR = Brutal.VulkanApi.VkRenderingAreaInfo; +global using VkRenderingAttachmentFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkRenderingAttachmentInfoKHR = Brutal.VulkanApi.VkRenderingAttachmentInfo; +global using VkRenderingAttachmentLocationInfoKHR = Brutal.VulkanApi.VkRenderingAttachmentLocationInfo; +global using VkRenderingEndInfoEXT = Brutal.VulkanApi.VkRenderingEndInfoKHR; +global using VkRenderingFlags = Brutal.VulkanApi.VkFlags; +global using VkRenderingFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkRenderingInfoKHR = Brutal.VulkanApi.VkRenderingInfo; +global using VkRenderingInputAttachmentIndexInfoKHR = Brutal.VulkanApi.VkRenderingInputAttachmentIndexInfo; +global using VkRenderPassAttachmentBeginInfoKHR = Brutal.VulkanApi.VkRenderPassAttachmentBeginInfo; +global using VkRenderPassCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkRenderPassCreateInfo2KHR = Brutal.VulkanApi.VkRenderPassCreateInfo2; +global using VkRenderPassInputAttachmentAspectCreateInfoKHR = Brutal.VulkanApi.VkRenderPassInputAttachmentAspectCreateInfo; +global using VkRenderPassMultiviewCreateInfoKHR = Brutal.VulkanApi.VkRenderPassMultiviewCreateInfo; +global using VkResolveImageFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkResolveImageInfo2KHR = Brutal.VulkanApi.VkResolveImageInfo2; +global using VkResolveModeFlags = Brutal.VulkanApi.VkFlags; +global using VkResolveModeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkSampleCountFlags = Brutal.VulkanApi.VkFlags; +global using VkSamplerCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkSamplerReductionModeCreateInfoEXT = Brutal.VulkanApi.VkSamplerReductionModeCreateInfo; +global using VkSamplerReductionModeEXT = Brutal.VulkanApi.VkSamplerReductionMode; +global using VkSamplerYCbCrConversionCreateInfoKHR = Brutal.VulkanApi.VkSamplerYCbCrConversionCreateInfo; +global using VkSamplerYCbCrConversionImageFormatPropertiesKHR = Brutal.VulkanApi.VkSamplerYCbCrConversionImageFormatProperties; +global using VkSamplerYCbCrConversionInfoKHR = Brutal.VulkanApi.VkSamplerYCbCrConversionInfo; +global using VkSamplerYCbCrConversionKHR = Brutal.VulkanApi.VkSamplerYCbCrConversion; +global using VkSamplerYCbCrModelConversionKHR = Brutal.VulkanApi.VkSamplerYCbCrModelConversion; +global using VkSamplerYCbCrRangeKHR = Brutal.VulkanApi.VkSamplerYCbCrRange; +global using VkScopeNV = Brutal.VulkanApi.VkScopeKHR; +global using VkSemaphoreCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkSemaphoreImportFlags = Brutal.VulkanApi.VkFlags; +global using VkSemaphoreImportFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkSemaphoreSignalInfoKHR = Brutal.VulkanApi.VkSemaphoreSignalInfo; +global using VkSemaphoreSubmitInfoKHR = Brutal.VulkanApi.VkSemaphoreSubmitInfo; +global using VkSemaphoreTypeCreateInfoKHR = Brutal.VulkanApi.VkSemaphoreTypeCreateInfo; +global using VkSemaphoreTypeKHR = Brutal.VulkanApi.VkSemaphoreType; +global using VkSemaphoreWaitFlags = Brutal.VulkanApi.VkFlags; +global using VkSemaphoreWaitFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkSemaphoreWaitInfoKHR = Brutal.VulkanApi.VkSemaphoreWaitInfo; +global using VkShaderCorePropertiesFlagsAMD = Brutal.VulkanApi.VkFlags; +global using VkShaderCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkShaderFloatControlsIndependenceKHR = Brutal.VulkanApi.VkShaderFloatControlsIndependence; +global using VkShaderInstrumentationValuesFlagsARM = Brutal.VulkanApi.VkFlags; +global using VkShaderModuleCreateFlags = Brutal.VulkanApi.VkFlags; +global using VkShaderRequiredSubgroupSizeCreateInfoEXT = Brutal.VulkanApi.VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; +global using VkShaderStageFlags = Brutal.VulkanApi.VkFlags; +global using VkSparseImageFormatFlags = Brutal.VulkanApi.VkFlags; +global using VkSparseImageFormatProperties2KHR = Brutal.VulkanApi.VkSparseImageFormatProperties2; +global using VkSparseImageMemoryRequirements2KHR = Brutal.VulkanApi.VkSparseImageMemoryRequirements2; +global using VkSparseMemoryBindFlags = Brutal.VulkanApi.VkFlags; +global using VkSpirvResourceTypeFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkStencilFaceFlags = Brutal.VulkanApi.VkFlags; +global using VkSubgroupFeatureFlags = Brutal.VulkanApi.VkFlags; +global using VkSubmitFlags = Brutal.VulkanApi.VkFlags; +global using VkSubmitFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkSubmitInfo2KHR = Brutal.VulkanApi.VkSubmitInfo2; +global using VkSubpassBeginInfoKHR = Brutal.VulkanApi.VkSubpassBeginInfo; +global using VkSubpassDependency2KHR = Brutal.VulkanApi.VkSubpassDependency2; +global using VkSubpassDescription2KHR = Brutal.VulkanApi.VkSubpassDescription2; +global using VkSubpassDescriptionDepthStencilResolveKHR = Brutal.VulkanApi.VkSubpassDescriptionDepthStencilResolve; +global using VkSubpassDescriptionFlags = Brutal.VulkanApi.VkFlags; +global using VkSubpassEndInfoKHR = Brutal.VulkanApi.VkSubpassEndInfo; +global using VkSubpassFragmentDensityMapOffsetEndInfoQCOM = Brutal.VulkanApi.VkRenderPassFragmentDensityMapOffsetEndInfoEXT; +global using VkSubresourceHostMemcpySizeEXT = Brutal.VulkanApi.VkSubresourceHostMemcpySize; +global using VkSubresourceLayout2EXT = Brutal.VulkanApi.VkSubresourceLayout2; +global using VkSubresourceLayout2KHR = Brutal.VulkanApi.VkSubresourceLayout2; +global using VkSurfaceCounterFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkSurfacePresentModeCompatibilityEXT = Brutal.VulkanApi.VkSurfacePresentModeCompatibilityKHR; +global using VkSurfacePresentModeEXT = Brutal.VulkanApi.VkSurfacePresentModeKHR; +global using VkSurfacePresentScalingCapabilitiesEXT = Brutal.VulkanApi.VkSurfacePresentScalingCapabilitiesKHR; +global using VkSurfaceTransformFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkSwapchainCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkSwapchainPresentFenceInfoEXT = Brutal.VulkanApi.VkSwapchainPresentFenceInfoKHR; +global using VkSwapchainPresentModeInfoEXT = Brutal.VulkanApi.VkSwapchainPresentModeInfoKHR; +global using VkSwapchainPresentModesCreateInfoEXT = Brutal.VulkanApi.VkSwapchainPresentModesCreateInfoKHR; +global using VkSwapchainPresentScalingCreateInfoEXT = Brutal.VulkanApi.VkSwapchainPresentScalingCreateInfoKHR; +global using VkTensorCreateFlagsARM = Brutal.VulkanApi.VkFlags64; +global using VkTensorUsageFlagsARM = Brutal.VulkanApi.VkFlags64; +global using VkTensorViewCreateFlagsARM = Brutal.VulkanApi.VkFlags64; +global using VkTessellationDomainOriginKHR = Brutal.VulkanApi.VkTessellationDomainOrigin; +global using VkTileShadingRenderPassFlagsQCOM = Brutal.VulkanApi.VkFlags; +global using VkTimeDomainEXT = Brutal.VulkanApi.VkTimeDomainKHR; +global using VkTimelineSemaphoreSubmitInfoKHR = Brutal.VulkanApi.VkTimelineSemaphoreSubmitInfo; +global using VkToolPurposeFlags = Brutal.VulkanApi.VkFlags; +global using VkToolPurposeFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkTransformMatrixNV = Brutal.VulkanApi.VkTransformMatrixKHR; +global using VkValidationCacheCreateFlagsEXT = Brutal.VulkanApi.VkFlags; +global using VkVertexInputBindingDivisorDescriptionEXT = Brutal.VulkanApi.VkVertexInputBindingDivisorDescription; +global using VkVertexInputBindingDivisorDescriptionKHR = Brutal.VulkanApi.VkVertexInputBindingDivisorDescription; +global using VkVideoBeginCodingFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoCapabilityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoChromaSubsamplingFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoCodecOperationFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoCodingControlFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoComponentBitDepthFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoDecodeCapabilityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoDecodeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoDecodeH264PictureLayoutFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoDecodeUsageFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeAV1CapabilityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeAV1RateControlFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeAV1StdFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeAV1SuperblockSizeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeCapabilityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeContentFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeFeedbackFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH264CapabilityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH264RateControlFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH264StdFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH265CapabilityFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH265CtbSizeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH265RateControlFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH265StdFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeH265TransformBlockSizeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeIntraRefreshModeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodePerPartitionFeedbackFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeRateControlFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeRateControlModeFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeRGBChromaOffsetFlagsVALVE = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeRGBModelConversionFlagsVALVE = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeRGBRangeCompressionFlagsVALVE = Brutal.VulkanApi.VkFlags; +global using VkVideoEncodeUsageFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoEndCodingFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoSessionCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkVideoSessionParametersCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkWaylandSurfaceCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkWin32SurfaceCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkWriteDescriptorSetInlineUniformBlockEXT = Brutal.VulkanApi.VkWriteDescriptorSetInlineUniformBlock; +global using VkXcbSurfaceCreateFlagsKHR = Brutal.VulkanApi.VkFlags; +global using VkXlibSurfaceCreateFlagsKHR = Brutal.VulkanApi.VkFlags; diff --git a/Brutal.Vulkan/Generated/Handles/VkAccelerationStructureKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkAccelerationStructureKHR.gen.cs new file mode 100644 index 0000000..0d01f38 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkAccelerationStructureKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureKHR - Opaque handle to an acceleration structure object + /// + /// + /// + /// :refpage: VkAccelerationStructureKHR + /// + /// + /// Acceleration structures for the `VK_KHR_acceleration_structure + /// extension` + /// are represented by VkAccelerationStructureKHR handles: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) + /// + /// + public readonly unsafe struct VkAccelerationStructureKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.AccelerationStructureKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkAccelerationStructureKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkAccelerationStructureKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkAccelerationStructureNV.gen.cs b/Brutal.Vulkan/Generated/Handles/VkAccelerationStructureNV.gen.cs new file mode 100644 index 0000000..d848ca1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkAccelerationStructureNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureNV - Opaque handle to an acceleration structure object + /// + /// + /// + /// :refpage: VkAccelerationStructureNV + /// + /// + /// Acceleration structures for the `VK_NV_ray_tracing extension` are + /// represented by the similar VkAccelerationStructureNV handles: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV) + /// + /// + public readonly unsafe struct VkAccelerationStructureNV : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.AccelerationStructureNV; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkAccelerationStructureNV(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkAccelerationStructureNV NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkBuffer.gen.cs b/Brutal.Vulkan/Generated/Handles/VkBuffer.gen.cs new file mode 100644 index 0000000..8c04199 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkBuffer.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuffer - Opaque handle to a buffer object + /// + /// + /// + /// Buffers represent linear arrays of data which are used for various purposes + /// by binding them to a graphics or compute pipeline via descriptor sets or + /// certain commands, or by directly specifying them as parameters to certain + /// commands. + /// + /// + /// Buffers are represented by VkBuffer handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) + /// + /// + public readonly unsafe struct VkBuffer : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Buffer; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkBuffer(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkBuffer NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkBufferView.gen.cs b/Brutal.Vulkan/Generated/Handles/VkBufferView.gen.cs new file mode 100644 index 0000000..dad78f2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkBufferView.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferView - Opaque handle to a buffer view object + /// + /// + /// + /// A buffer view represents a contiguous range of a buffer and a specific + /// format to be used to interpret the data. + /// Buffer views are used to enable shaders to access buffer contents using + /// image operations^. + /// In order to create a valid buffer view, the buffer must have been created + /// with at least one of the following usage flags: + /// + /// + /// * VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT + /// * VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT + /// + /// + /// Buffer views are represented by VkBufferView handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) + /// + /// + public readonly unsafe struct VkBufferView : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.BufferView; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkBufferView(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkBufferView NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkCommandBuffer.gen.cs b/Brutal.Vulkan/Generated/Handles/VkCommandBuffer.gen.cs new file mode 100644 index 0000000..5a8c4f8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkCommandBuffer.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBuffer - Opaque handle to a command buffer object + /// + /// + /// + /// Command buffers are objects used to record commands which can be + /// subsequently submitted to a device queue for execution. + /// There are two levels of command buffers - primary command buffers, which + /// can execute secondary command buffers, and which are submitted to queues, + /// and secondary command buffers, which can be executed by primary command + /// buffers, and which are not directly submitted to queues. + /// + /// + /// Command buffers are represented by VkCommandBuffer handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_HANDLE(VkCommandBuffer) + /// + /// + public readonly unsafe struct VkCommandBuffer : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.CommandBuffer; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkCommandBuffer(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkCommandBuffer NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkCommandPool.gen.cs b/Brutal.Vulkan/Generated/Handles/VkCommandPool.gen.cs new file mode 100644 index 0000000..f0d2a18 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkCommandPool.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandPool - Opaque handle to a command pool object + /// + /// + /// + /// Command pools are opaque objects that command buffer memory is allocated + /// from, and which allow the implementation to amortize the cost of resource + /// creation across multiple command buffers. + /// Command pools are externally synchronized, meaning that a command pool must + /// not be used concurrently in multiple threads. + /// That includes use via recording commands on any command buffers allocated + /// from the pool, as well as operations that allocate, free, and reset command + /// buffers or the pool itself. + /// + /// + /// Command pools are represented by VkCommandPool handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) + /// + /// + public readonly unsafe struct VkCommandPool : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.CommandPool; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkCommandPool(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkCommandPool NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkCuFunctionNVX.gen.cs b/Brutal.Vulkan/Generated/Handles/VkCuFunctionNVX.gen.cs new file mode 100644 index 0000000..db450a4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkCuFunctionNVX.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCuFunctionNVX - Stub description of VkCuFunctionNVX + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuFunctionNVX) + /// + /// + public readonly unsafe struct VkCuFunctionNVX : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.CuFunctionNVX; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkCuFunctionNVX(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkCuFunctionNVX NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkCuModuleNVX.gen.cs b/Brutal.Vulkan/Generated/Handles/VkCuModuleNVX.gen.cs new file mode 100644 index 0000000..659dd8e --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkCuModuleNVX.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCuModuleNVX - Stub description of VkCuModuleNVX + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuModuleNVX) + /// + /// + public readonly unsafe struct VkCuModuleNVX : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.CuModuleNVX; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkCuModuleNVX(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkCuModuleNVX NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDataGraphPipelineSessionARM.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDataGraphPipelineSessionARM.gen.cs new file mode 100644 index 0000000..8d219cc --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDataGraphPipelineSessionARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionARM - Opaque handle to a data graph pipeline session object + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionARM + /// + /// + /// Graph pipeline sessions are represented by + /// VkDataGraphPipelineSessionARM handles: + /// + /// + /// // Provided by VK_ARM_data_graph + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDataGraphPipelineSessionARM) + /// + /// + public readonly unsafe struct VkDataGraphPipelineSessionARM : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DataGraphPipelineSessionARM; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDataGraphPipelineSessionARM(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDataGraphPipelineSessionARM NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDebugReportCallbackEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDebugReportCallbackEXT.gen.cs new file mode 100644 index 0000000..8994fc0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDebugReportCallbackEXT.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugReportCallbackEXT - Opaque handle to a debug report callback object + /// + /// + /// + /// Debug report callbacks are represented by VkDebugReportCallbackEXT + /// handles: + /// + /// + /// // Provided by VK_EXT_debug_report + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) + /// + /// + public readonly unsafe struct VkDebugReportCallbackEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DebugReportCallbackEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDebugReportCallbackEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDebugReportCallbackEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDebugUtilsMessengerEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDebugUtilsMessengerEXT.gen.cs new file mode 100644 index 0000000..5f59a25 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDebugUtilsMessengerEXT.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsMessengerEXT - Opaque handle to a debug messenger object + /// + /// + /// + /// A VkDebugUtilsMessengerEXT is a messenger object which handles passing + /// along debug messages to a provided debug callback. + /// + /// + /// // Provided by VK_EXT_debug_utils + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) + /// + /// + public readonly unsafe struct VkDebugUtilsMessengerEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DebugUtilsMessengerEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDebugUtilsMessengerEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDebugUtilsMessengerEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDeferredOperationKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDeferredOperationKHR.gen.cs new file mode 100644 index 0000000..0701689 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDeferredOperationKHR.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeferredOperationKHR - A deferred operation + /// + /// + /// + /// The VkDeferredOperationKHR handle is defined as: + /// + /// + /// // Provided by VK_KHR_deferred_host_operations + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR) + /// + /// + public readonly unsafe struct VkDeferredOperationKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DeferredOperationKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDeferredOperationKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDeferredOperationKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDescriptorPool.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDescriptorPool.gen.cs new file mode 100644 index 0000000..38bf2c7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDescriptorPool.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorPool - Opaque handle to a descriptor pool object + /// + /// + /// + /// A descriptor pool maintains a pool of descriptors, from which descriptor + /// sets are allocated. + /// Descriptor pools are externally synchronized, meaning that the application + /// must not allocate and/or free descriptor sets from the same pool in + /// multiple threads simultaneously. + /// + /// + /// Descriptor pools are represented by VkDescriptorPool handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) + /// + /// + public readonly unsafe struct VkDescriptorPool : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DescriptorPool; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDescriptorPool(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDescriptorPool NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDescriptorSet.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDescriptorSet.gen.cs new file mode 100644 index 0000000..78cd3bf --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDescriptorSet.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSet - Opaque handle to a descriptor set object + /// + /// + /// + /// Descriptor sets are allocated from descriptor pool objects, and are + /// represented by VkDescriptorSet handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) + /// + /// + public readonly unsafe struct VkDescriptorSet : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DescriptorSet; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDescriptorSet(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDescriptorSet NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDescriptorSetLayout.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDescriptorSetLayout.gen.cs new file mode 100644 index 0000000..86afcc9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDescriptorSetLayout.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayout - Opaque handle to a descriptor set layout object + /// + /// + /// + /// A descriptor set layout object is defined by an array of zero or more + /// descriptor bindings. + /// Each individual descriptor binding is specified by a descriptor type, a + /// count (array size) of the number of descriptors in the binding, a set of + /// shader stages that can access the binding, and (if using immutable + /// samplers) an array of sampler descriptors. + /// + /// + /// Descriptor set layout objects are represented by VkDescriptorSetLayout + /// handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) + /// + /// + public readonly unsafe struct VkDescriptorSetLayout : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DescriptorSetLayout; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDescriptorSetLayout(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDescriptorSetLayout NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDescriptorUpdateTemplate.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDescriptorUpdateTemplate.gen.cs new file mode 100644 index 0000000..f8ea6eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDescriptorUpdateTemplate.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorUpdateTemplate - Opaque handle to a descriptor update template + /// + /// + /// + /// A descriptor update template specifies a mapping from descriptor update + /// information in host memory to descriptors in a descriptor set. + /// It is designed to avoid passing redundant information to the driver when + /// frequently updating the same set of descriptors in descriptor sets. + /// + /// + /// Descriptor update template objects are represented by + /// VkDescriptorUpdateTemplate handles: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) + /// + /// + public readonly unsafe struct VkDescriptorUpdateTemplate : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DescriptorUpdateTemplate; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDescriptorUpdateTemplate(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDescriptorUpdateTemplate NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDevice.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDevice.gen.cs new file mode 100644 index 0000000..579fd30 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDevice.gen.cs @@ -0,0 +1,1993 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDevice - Opaque handle to a device object + /// + /// + /// + /// Logical devices are represented by VkDevice handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_HANDLE(VkDevice) + /// + /// + public readonly unsafe struct VkDevice : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Device; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDevice(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDevice NullHandle = new(); + + public struct FunctionTable + { + public VkGetDeviceProcAddr vkGetDeviceProcAddr; + public VkDestroyDevice vkDestroyDevice; + public VkGetDeviceQueue vkGetDeviceQueue; + public VkQueueSubmit vkQueueSubmit; + public VkQueueWaitIdle vkQueueWaitIdle; + public VkDeviceWaitIdle vkDeviceWaitIdle; + public VkAllocateMemory vkAllocateMemory; + public VkFreeMemory vkFreeMemory; + public VkMapMemory vkMapMemory; + public VkUnmapMemory vkUnmapMemory; + public VkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; + public VkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; + public VkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment; + public VkBindBufferMemory vkBindBufferMemory; + public VkBindImageMemory vkBindImageMemory; + public VkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; + public VkGetImageMemoryRequirements vkGetImageMemoryRequirements; + public VkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements; + public VkQueueBindSparse vkQueueBindSparse; + public VkCreateFence vkCreateFence; + public VkDestroyFence vkDestroyFence; + public VkResetFences vkResetFences; + public VkGetFenceStatus vkGetFenceStatus; + public VkWaitForFences vkWaitForFences; + public VkCreateSemaphore vkCreateSemaphore; + public VkDestroySemaphore vkDestroySemaphore; + public VkCreateQueryPool vkCreateQueryPool; + public VkDestroyQueryPool vkDestroyQueryPool; + public VkGetQueryPoolResults vkGetQueryPoolResults; + public VkCreateBuffer vkCreateBuffer; + public VkDestroyBuffer vkDestroyBuffer; + public VkCreateImage vkCreateImage; + public VkDestroyImage vkDestroyImage; + public VkGetImageSubresourceLayout vkGetImageSubresourceLayout; + public VkCreateImageView vkCreateImageView; + public VkDestroyImageView vkDestroyImageView; + public VkCreateCommandPool vkCreateCommandPool; + public VkDestroyCommandPool vkDestroyCommandPool; + public VkResetCommandPool vkResetCommandPool; + public VkAllocateCommandBuffers vkAllocateCommandBuffers; + public VkFreeCommandBuffers vkFreeCommandBuffers; + public VkBeginCommandBuffer vkBeginCommandBuffer; + public VkEndCommandBuffer vkEndCommandBuffer; + public VkResetCommandBuffer vkResetCommandBuffer; + public VkCmdCopyBuffer vkCmdCopyBuffer; + public VkCmdCopyImage vkCmdCopyImage; + public VkCmdCopyBufferToImage vkCmdCopyBufferToImage; + public VkCmdCopyImageToBuffer vkCmdCopyImageToBuffer; + public VkCmdUpdateBuffer vkCmdUpdateBuffer; + public VkCmdFillBuffer vkCmdFillBuffer; + public VkCmdPipelineBarrier vkCmdPipelineBarrier; + public VkCmdBeginQuery vkCmdBeginQuery; + public VkCmdEndQuery vkCmdEndQuery; + public VkCmdResetQueryPool vkCmdResetQueryPool; + public VkCmdWriteTimestamp vkCmdWriteTimestamp; + public VkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults; + public VkCmdExecuteCommands vkCmdExecuteCommands; + public VkCreateEvent vkCreateEvent; + public VkDestroyEvent vkDestroyEvent; + public VkGetEventStatus vkGetEventStatus; + public VkSetEvent vkSetEvent; + public VkResetEvent vkResetEvent; + public VkCreateBufferView vkCreateBufferView; + public VkDestroyBufferView vkDestroyBufferView; + public VkCreateShaderModule vkCreateShaderModule; + public VkDestroyShaderModule vkDestroyShaderModule; + public VkCreatePipelineCache vkCreatePipelineCache; + public VkDestroyPipelineCache vkDestroyPipelineCache; + public VkGetPipelineCacheData vkGetPipelineCacheData; + public VkMergePipelineCaches vkMergePipelineCaches; + public VkCreateComputePipelines vkCreateComputePipelines; + public VkDestroyPipeline vkDestroyPipeline; + public VkCreatePipelineLayout vkCreatePipelineLayout; + public VkDestroyPipelineLayout vkDestroyPipelineLayout; + public VkCreateSampler vkCreateSampler; + public VkDestroySampler vkDestroySampler; + public VkCreateDescriptorSetLayout vkCreateDescriptorSetLayout; + public VkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout; + public VkCreateDescriptorPool vkCreateDescriptorPool; + public VkDestroyDescriptorPool vkDestroyDescriptorPool; + public VkResetDescriptorPool vkResetDescriptorPool; + public VkAllocateDescriptorSets vkAllocateDescriptorSets; + public VkFreeDescriptorSets vkFreeDescriptorSets; + public VkUpdateDescriptorSets vkUpdateDescriptorSets; + public VkCmdBindPipeline vkCmdBindPipeline; + public VkCmdBindDescriptorSets vkCmdBindDescriptorSets; + public VkCmdClearColorImage vkCmdClearColorImage; + public VkCmdDispatch vkCmdDispatch; + public VkCmdDispatchIndirect vkCmdDispatchIndirect; + public VkCmdSetEvent vkCmdSetEvent; + public VkCmdResetEvent vkCmdResetEvent; + public VkCmdWaitEvents vkCmdWaitEvents; + public VkCmdPushConstants vkCmdPushConstants; + public VkCreateGraphicsPipelines vkCreateGraphicsPipelines; + public VkCreateFramebuffer vkCreateFramebuffer; + public VkDestroyFramebuffer vkDestroyFramebuffer; + public VkCreateRenderPass vkCreateRenderPass; + public VkDestroyRenderPass vkDestroyRenderPass; + public VkGetRenderAreaGranularity vkGetRenderAreaGranularity; + public VkCmdSetViewport vkCmdSetViewport; + public VkCmdSetScissor vkCmdSetScissor; + public VkCmdSetLineWidth vkCmdSetLineWidth; + public VkCmdSetDepthBias vkCmdSetDepthBias; + public VkCmdSetBlendConstants vkCmdSetBlendConstants; + public VkCmdSetDepthBounds vkCmdSetDepthBounds; + public VkCmdSetStencilCompareMask vkCmdSetStencilCompareMask; + public VkCmdSetStencilWriteMask vkCmdSetStencilWriteMask; + public VkCmdSetStencilReference vkCmdSetStencilReference; + public VkCmdBindIndexBuffer vkCmdBindIndexBuffer; + public VkCmdBindVertexBuffers vkCmdBindVertexBuffers; + public VkCmdDraw vkCmdDraw; + public VkCmdDrawIndexed vkCmdDrawIndexed; + public VkCmdDrawIndirect vkCmdDrawIndirect; + public VkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect; + public VkCmdBlitImage vkCmdBlitImage; + public VkCmdClearDepthStencilImage vkCmdClearDepthStencilImage; + public VkCmdClearAttachments vkCmdClearAttachments; + public VkCmdResolveImage vkCmdResolveImage; + public VkCmdBeginRenderPass vkCmdBeginRenderPass; + public VkCmdNextSubpass vkCmdNextSubpass; + public VkCmdEndRenderPass vkCmdEndRenderPass; + public VkBindBufferMemory2 vkBindBufferMemory2; + public VkBindImageMemory2 vkBindImageMemory2; + public VkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures; + public VkCmdSetDeviceMask vkCmdSetDeviceMask; + public VkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2; + public VkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2; + public VkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2; + public VkTrimCommandPool vkTrimCommandPool; + public VkGetDeviceQueue2 vkGetDeviceQueue2; + public VkCmdDispatchBase vkCmdDispatchBase; + public VkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate; + public VkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate; + public VkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate; + public VkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport; + public VkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion; + public VkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion; + public VkResetQueryPool vkResetQueryPool; + public VkGetSemaphoreCounterValue vkGetSemaphoreCounterValue; + public VkWaitSemaphores vkWaitSemaphores; + public VkSignalSemaphore vkSignalSemaphore; + public VkGetBufferDeviceAddress vkGetBufferDeviceAddress; + public VkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress; + public VkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress; + public VkCmdDrawIndirectCount vkCmdDrawIndirectCount; + public VkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount; + public VkCreateRenderPass2 vkCreateRenderPass2; + public VkCmdBeginRenderPass2 vkCmdBeginRenderPass2; + public VkCmdNextSubpass2 vkCmdNextSubpass2; + public VkCmdEndRenderPass2 vkCmdEndRenderPass2; + public VkCreatePrivateDataSlot vkCreatePrivateDataSlot; + public VkDestroyPrivateDataSlot vkDestroyPrivateDataSlot; + public VkSetPrivateData vkSetPrivateData; + public VkGetPrivateData vkGetPrivateData; + public VkCmdPipelineBarrier2 vkCmdPipelineBarrier2; + public VkCmdWriteTimestamp2 vkCmdWriteTimestamp2; + public VkQueueSubmit2 vkQueueSubmit2; + public VkCmdCopyBuffer2 vkCmdCopyBuffer2; + public VkCmdCopyImage2 vkCmdCopyImage2; + public VkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2; + public VkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2; + public VkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements; + public VkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements; + public VkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements; + public VkCmdSetEvent2 vkCmdSetEvent2; + public VkCmdResetEvent2 vkCmdResetEvent2; + public VkCmdWaitEvents2 vkCmdWaitEvents2; + public VkCmdBlitImage2 vkCmdBlitImage2; + public VkCmdResolveImage2 vkCmdResolveImage2; + public VkCmdBeginRendering vkCmdBeginRendering; + public VkCmdEndRendering vkCmdEndRendering; + public VkCmdSetCullMode vkCmdSetCullMode; + public VkCmdSetFrontFace vkCmdSetFrontFace; + public VkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology; + public VkCmdSetViewportWithCount vkCmdSetViewportWithCount; + public VkCmdSetScissorWithCount vkCmdSetScissorWithCount; + public VkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2; + public VkCmdSetDepthTestEnable vkCmdSetDepthTestEnable; + public VkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable; + public VkCmdSetDepthCompareOp vkCmdSetDepthCompareOp; + public VkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable; + public VkCmdSetStencilTestEnable vkCmdSetStencilTestEnable; + public VkCmdSetStencilOp vkCmdSetStencilOp; + public VkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable; + public VkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable; + public VkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable; + public VkMapMemory2 vkMapMemory2; + public VkUnmapMemory2 vkUnmapMemory2; + public VkGetDeviceImageSubresourceLayout vkGetDeviceImageSubresourceLayout; + public VkGetImageSubresourceLayout2 vkGetImageSubresourceLayout2; + public VkCopyMemoryToImage vkCopyMemoryToImage; + public VkCopyImageToMemory vkCopyImageToMemory; + public VkCopyImageToImage vkCopyImageToImage; + public VkTransitionImageLayout vkTransitionImageLayout; + public VkCmdPushDescriptorSet vkCmdPushDescriptorSet; + public VkCmdPushDescriptorSetWithTemplate vkCmdPushDescriptorSetWithTemplate; + public VkCmdBindDescriptorSets2 vkCmdBindDescriptorSets2; + public VkCmdPushConstants2 vkCmdPushConstants2; + public VkCmdPushDescriptorSet2 vkCmdPushDescriptorSet2; + public VkCmdPushDescriptorSetWithTemplate2 vkCmdPushDescriptorSetWithTemplate2; + public VkCmdSetLineStipple vkCmdSetLineStipple; + public VkCmdBindIndexBuffer2 vkCmdBindIndexBuffer2; + public VkGetRenderingAreaGranularity vkGetRenderingAreaGranularity; + public VkCmdSetRenderingAttachmentLocations vkCmdSetRenderingAttachmentLocations; + public VkCmdSetRenderingInputAttachmentIndices vkCmdSetRenderingInputAttachmentIndices; + public VkCreateSwapchainKHR vkCreateSwapchainKHR; + public VkDestroySwapchainKHR vkDestroySwapchainKHR; + public VkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; + public VkAcquireNextImageKHR vkAcquireNextImageKHR; + public VkQueuePresentKHR vkQueuePresentKHR; + public VkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR; + public VkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR; + public VkAcquireNextImage2KHR vkAcquireNextImage2KHR; + public VkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR; + public VkCreateVideoSessionKHR vkCreateVideoSessionKHR; + public VkDestroyVideoSessionKHR vkDestroyVideoSessionKHR; + public VkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR; + public VkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR; + public VkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR; + public VkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR; + public VkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR; + public VkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR; + public VkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR; + public VkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR; + public VkCmdDecodeVideoKHR vkCmdDecodeVideoKHR; + public VkCmdBeginRenderingKHR vkCmdBeginRenderingKHR; + public VkCmdEndRenderingKHR vkCmdEndRenderingKHR; + public VkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR; + public VkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR; + public VkCmdDispatchBaseKHR vkCmdDispatchBaseKHR; + public VkTrimCommandPoolKHR vkTrimCommandPoolKHR; + public VkGetMemoryFdKHR vkGetMemoryFdKHR; + public VkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR; + public VkImportSemaphoreFdKHR vkImportSemaphoreFdKHR; + public VkGetSemaphoreFdKHR vkGetSemaphoreFdKHR; + public VkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR; + public VkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR; + public VkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR; + public VkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR; + public VkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR; + public VkCreateRenderPass2KHR vkCreateRenderPass2KHR; + public VkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR; + public VkCmdNextSubpass2KHR vkCmdNextSubpass2KHR; + public VkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR; + public VkGetSwapchainStatusKHR vkGetSwapchainStatusKHR; + public VkImportFenceFdKHR vkImportFenceFdKHR; + public VkGetFenceFdKHR vkGetFenceFdKHR; + public VkAcquireProfilingLockKHR vkAcquireProfilingLockKHR; + public VkReleaseProfilingLockKHR vkReleaseProfilingLockKHR; + public VkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR; + public VkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR; + public VkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR; + public VkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR; + public VkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR; + public VkBindBufferMemory2KHR vkBindBufferMemory2KHR; + public VkBindImageMemory2KHR vkBindImageMemory2KHR; + public VkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR; + public VkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR; + public VkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR; + public VkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR; + public VkWaitSemaphoresKHR vkWaitSemaphoresKHR; + public VkSignalSemaphoreKHR vkSignalSemaphoreKHR; + public VkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR; + public VkCmdSetRenderingAttachmentLocationsKHR vkCmdSetRenderingAttachmentLocationsKHR; + public VkCmdSetRenderingInputAttachmentIndicesKHR vkCmdSetRenderingInputAttachmentIndicesKHR; + public VkWaitForPresentKHR vkWaitForPresentKHR; + public VkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR; + public VkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR; + public VkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR; + public VkCreateDeferredOperationKHR vkCreateDeferredOperationKHR; + public VkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR; + public VkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR; + public VkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR; + public VkDeferredOperationJoinKHR vkDeferredOperationJoinKHR; + public VkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR; + public VkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR; + public VkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR; + public VkMapMemory2KHR vkMapMemory2KHR; + public VkUnmapMemory2KHR vkUnmapMemory2KHR; + public VkGetEncodedVideoSessionParametersKHR vkGetEncodedVideoSessionParametersKHR; + public VkCmdEncodeVideoKHR vkCmdEncodeVideoKHR; + public VkCmdSetEvent2KHR vkCmdSetEvent2KHR; + public VkCmdResetEvent2KHR vkCmdResetEvent2KHR; + public VkCmdWaitEvents2KHR vkCmdWaitEvents2KHR; + public VkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR; + public VkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR; + public VkQueueSubmit2KHR vkQueueSubmit2KHR; + public VkCmdBindIndexBuffer3KHR vkCmdBindIndexBuffer3KHR; + public VkCmdBindVertexBuffers3KHR vkCmdBindVertexBuffers3KHR; + public VkCmdDrawIndirect2KHR vkCmdDrawIndirect2KHR; + public VkCmdDrawIndexedIndirect2KHR vkCmdDrawIndexedIndirect2KHR; + public VkCmdDispatchIndirect2KHR vkCmdDispatchIndirect2KHR; + public VkCmdCopyMemoryKHR vkCmdCopyMemoryKHR; + public VkCmdCopyMemoryToImageKHR vkCmdCopyMemoryToImageKHR; + public VkCmdCopyImageToMemoryKHR vkCmdCopyImageToMemoryKHR; + public VkCmdUpdateMemoryKHR vkCmdUpdateMemoryKHR; + public VkCmdFillMemoryKHR vkCmdFillMemoryKHR; + public VkCmdCopyQueryPoolResultsToMemoryKHR vkCmdCopyQueryPoolResultsToMemoryKHR; + public VkCmdDrawIndirectCount2KHR vkCmdDrawIndirectCount2KHR; + public VkCmdDrawIndexedIndirectCount2KHR vkCmdDrawIndexedIndirectCount2KHR; + public VkCmdBeginConditionalRendering2EXT vkCmdBeginConditionalRendering2EXT; + public VkCmdBindTransformFeedbackBuffers2EXT vkCmdBindTransformFeedbackBuffers2EXT; + public VkCmdBeginTransformFeedback2EXT vkCmdBeginTransformFeedback2EXT; + public VkCmdEndTransformFeedback2EXT vkCmdEndTransformFeedback2EXT; + public VkCmdDrawIndirectByteCount2EXT vkCmdDrawIndirectByteCount2EXT; + public VkCmdDrawMeshTasksIndirect2EXT vkCmdDrawMeshTasksIndirect2EXT; + public VkCmdDrawMeshTasksIndirectCount2EXT vkCmdDrawMeshTasksIndirectCount2EXT; + public VkCmdWriteMarkerToMemoryAMD vkCmdWriteMarkerToMemoryAMD; + public VkCreateAccelerationStructure2KHR vkCreateAccelerationStructure2KHR; + public VkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR; + public VkCmdCopyImage2KHR vkCmdCopyImage2KHR; + public VkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR; + public VkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR; + public VkCmdBlitImage2KHR vkCmdBlitImage2KHR; + public VkCmdResolveImage2KHR vkCmdResolveImage2KHR; + public VkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR; + public VkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR; + public VkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR; + public VkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR; + public VkCmdBindIndexBuffer2KHR vkCmdBindIndexBuffer2KHR; + public VkGetRenderingAreaGranularityKHR vkGetRenderingAreaGranularityKHR; + public VkGetDeviceImageSubresourceLayoutKHR vkGetDeviceImageSubresourceLayoutKHR; + public VkGetImageSubresourceLayout2KHR vkGetImageSubresourceLayout2KHR; + public VkWaitForPresent2KHR vkWaitForPresent2KHR; + public VkCreatePipelineBinariesKHR vkCreatePipelineBinariesKHR; + public VkDestroyPipelineBinaryKHR vkDestroyPipelineBinaryKHR; + public VkGetPipelineKeyKHR vkGetPipelineKeyKHR; + public VkGetPipelineBinaryDataKHR vkGetPipelineBinaryDataKHR; + public VkReleaseCapturedPipelineDataKHR vkReleaseCapturedPipelineDataKHR; + public VkReleaseSwapchainImagesKHR vkReleaseSwapchainImagesKHR; + public VkCmdSetLineStippleKHR vkCmdSetLineStippleKHR; + public VkGetCalibratedTimestampsKHR vkGetCalibratedTimestampsKHR; + public VkCmdBindDescriptorSets2KHR vkCmdBindDescriptorSets2KHR; + public VkCmdPushConstants2KHR vkCmdPushConstants2KHR; + public VkCmdPushDescriptorSet2KHR vkCmdPushDescriptorSet2KHR; + public VkCmdPushDescriptorSetWithTemplate2KHR vkCmdPushDescriptorSetWithTemplate2KHR; + public VkCmdSetDescriptorBufferOffsets2EXT vkCmdSetDescriptorBufferOffsets2EXT; + public VkCmdBindDescriptorBufferEmbeddedSamplers2EXT vkCmdBindDescriptorBufferEmbeddedSamplers2EXT; + public VkCmdCopyMemoryIndirectKHR vkCmdCopyMemoryIndirectKHR; + public VkCmdCopyMemoryToImageIndirectKHR vkCmdCopyMemoryToImageIndirectKHR; + public VkGetDeviceFaultReportsKHR vkGetDeviceFaultReportsKHR; + public VkGetDeviceFaultDebugInfoKHR vkGetDeviceFaultDebugInfoKHR; + public VkCmdEndRendering2KHR vkCmdEndRendering2KHR; + public VkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT; + public VkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT; + public VkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT; + public VkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT; + public VkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT; + public VkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT; + public VkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT; + public VkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT; + public VkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT; + public VkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT; + public VkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT; + public VkCreateCuModuleNVX vkCreateCuModuleNVX; + public VkCreateCuFunctionNVX vkCreateCuFunctionNVX; + public VkDestroyCuModuleNVX vkDestroyCuModuleNVX; + public VkDestroyCuFunctionNVX vkDestroyCuFunctionNVX; + public VkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX; + public VkGetImageViewHandleNVX vkGetImageViewHandleNVX; + public VkGetImageViewHandle64NVX vkGetImageViewHandle64NVX; + public VkGetImageViewAddressNVX vkGetImageViewAddressNVX; + public VkGetDeviceCombinedImageSamplerIndexNVX vkGetDeviceCombinedImageSamplerIndexNVX; + public VkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD; + public VkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD; + public VkGetShaderInfoAMD vkGetShaderInfoAMD; + public VkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT; + public VkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT; + public VkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV; + public VkDisplayPowerControlEXT vkDisplayPowerControlEXT; + public VkRegisterDeviceEventEXT vkRegisterDeviceEventEXT; + public VkRegisterDisplayEventEXT vkRegisterDisplayEventEXT; + public VkGetSwapchainCounterEXT vkGetSwapchainCounterEXT; + public VkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE; + public VkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE; + public VkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT; + public VkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT; + public VkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT; + public VkSetHdrMetadataEXT vkSetHdrMetadataEXT; + public VkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT; + public VkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT; + public VkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT; + public VkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT; + public VkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT; + public VkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT; + public VkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT; + public VkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT; + public VkCreateGpaSessionAMD vkCreateGpaSessionAMD; + public VkDestroyGpaSessionAMD vkDestroyGpaSessionAMD; + public VkSetGpaDeviceClockModeAMD vkSetGpaDeviceClockModeAMD; + public VkGetGpaDeviceClockInfoAMD vkGetGpaDeviceClockInfoAMD; + public VkCmdBeginGpaSessionAMD vkCmdBeginGpaSessionAMD; + public VkCmdEndGpaSessionAMD vkCmdEndGpaSessionAMD; + public VkCmdBeginGpaSampleAMD vkCmdBeginGpaSampleAMD; + public VkCmdEndGpaSampleAMD vkCmdEndGpaSampleAMD; + public VkGetGpaSessionStatusAMD vkGetGpaSessionStatusAMD; + public VkGetGpaSessionResultsAMD vkGetGpaSessionResultsAMD; + public VkResetGpaSessionAMD vkResetGpaSessionAMD; + public VkCmdCopyGpaSessionResultsAMD vkCmdCopyGpaSessionResultsAMD; + public VkWriteSamplerDescriptorsEXT vkWriteSamplerDescriptorsEXT; + public VkWriteResourceDescriptorsEXT vkWriteResourceDescriptorsEXT; + public VkCmdBindSamplerHeapEXT vkCmdBindSamplerHeapEXT; + public VkCmdBindResourceHeapEXT vkCmdBindResourceHeapEXT; + public VkCmdPushDataEXT vkCmdPushDataEXT; + public VkGetImageOpaqueCaptureDataEXT vkGetImageOpaqueCaptureDataEXT; + public VkRegisterCustomBorderColorEXT vkRegisterCustomBorderColorEXT; + public VkUnregisterCustomBorderColorEXT vkUnregisterCustomBorderColorEXT; + public VkGetTensorOpaqueCaptureDataARM vkGetTensorOpaqueCaptureDataARM; + public VkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT; + public VkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT; + public VkCreateValidationCacheEXT vkCreateValidationCacheEXT; + public VkDestroyValidationCacheEXT vkDestroyValidationCacheEXT; + public VkMergeValidationCachesEXT vkMergeValidationCachesEXT; + public VkGetValidationCacheDataEXT vkGetValidationCacheDataEXT; + public VkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV; + public VkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV; + public VkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV; + public VkCreateAccelerationStructureNV vkCreateAccelerationStructureNV; + public VkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV; + public VkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV; + public VkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV; + public VkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV; + public VkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV; + public VkCmdTraceRaysNV vkCmdTraceRaysNV; + public VkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV; + public VkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR; + public VkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV; + public VkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV; + public VkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV; + public VkCompileDeferredNV vkCompileDeferredNV; + public VkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT; + public VkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD; + public VkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD; + public VkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT; + public VkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV; + public VkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV; + public VkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV; + public VkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV; + public VkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV; + public VkCmdSetCheckpointNV vkCmdSetCheckpointNV; + public VkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV; + public VkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV; + public VkSetSwapchainPresentTimingQueueSizeEXT vkSetSwapchainPresentTimingQueueSizeEXT; + public VkGetSwapchainTimingPropertiesEXT vkGetSwapchainTimingPropertiesEXT; + public VkGetSwapchainTimeDomainPropertiesEXT vkGetSwapchainTimeDomainPropertiesEXT; + public VkGetPastPresentationTimingEXT vkGetPastPresentationTimingEXT; + public VkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL; + public VkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL; + public VkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL; + public VkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL; + public VkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL; + public VkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL; + public VkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL; + public VkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL; + public VkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL; + public VkSetLocalDimmingAMD vkSetLocalDimmingAMD; + public VkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT; + public VkCmdSetLineStippleEXT vkCmdSetLineStippleEXT; + public VkResetQueryPoolEXT vkResetQueryPoolEXT; + public VkCmdSetCullModeEXT vkCmdSetCullModeEXT; + public VkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT; + public VkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT; + public VkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT; + public VkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT; + public VkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT; + public VkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT; + public VkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT; + public VkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT; + public VkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT; + public VkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT; + public VkCmdSetStencilOpEXT vkCmdSetStencilOpEXT; + public VkCopyMemoryToImageEXT vkCopyMemoryToImageEXT; + public VkCopyImageToMemoryEXT vkCopyImageToMemoryEXT; + public VkCopyImageToImageEXT vkCopyImageToImageEXT; + public VkTransitionImageLayoutEXT vkTransitionImageLayoutEXT; + public VkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT; + public VkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT; + public VkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV; + public VkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV; + public VkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV; + public VkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV; + public VkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV; + public VkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV; + public VkCmdSetDepthBias2EXT vkCmdSetDepthBias2EXT; + public VkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT; + public VkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT; + public VkSetPrivateDataEXT vkSetPrivateDataEXT; + public VkGetPrivateDataEXT vkGetPrivateDataEXT; + public VkQueueSetPerfHintQCOM vkQueueSetPerfHintQCOM; + public VkCmdDispatchTileQCOM vkCmdDispatchTileQCOM; + public VkCmdBeginPerTileExecutionQCOM vkCmdBeginPerTileExecutionQCOM; + public VkCmdEndPerTileExecutionQCOM vkCmdEndPerTileExecutionQCOM; + public VkSetLatencySleepModeLegacyNV vkSetLatencySleepModeLegacyNV; + public VkLatencySleepLegacyNV vkLatencySleepLegacyNV; + public VkSetLatencyMarkerLegacyNV vkSetLatencyMarkerLegacyNV; + public VkGetLatencyTimingsLegacyNV vkGetLatencyTimingsLegacyNV; + public VkQueueNotifyOutOfBandLegacyNV vkQueueNotifyOutOfBandLegacyNV; + public VkGetSleepStatusLegacyNV vkGetSleepStatusLegacyNV; + public VkShutdownLatencyDeviceLegacyNV vkShutdownLatencyDeviceLegacyNV; + public VkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT; + public VkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT; + public VkGetDescriptorEXT vkGetDescriptorEXT; + public VkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT; + public VkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT; + public VkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT; + public VkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT; + public VkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT; + public VkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT; + public VkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT; + public VkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT; + public VkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV; + public VkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT; + public VkCmdSetVertexInputEXT vkCmdSetVertexInputEXT; + public VkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI; + public VkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI; + public VkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI; + public VkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV; + public VkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT; + public VkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT; + public VkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT; + public VkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT; + public VkCmdSetLogicOpEXT vkCmdSetLogicOpEXT; + public VkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT; + public VkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT; + public VkCmdDrawMultiEXT vkCmdDrawMultiEXT; + public VkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT; + public VkCreateMicromapEXT vkCreateMicromapEXT; + public VkDestroyMicromapEXT vkDestroyMicromapEXT; + public VkCmdBuildMicromapsEXT vkCmdBuildMicromapsEXT; + public VkBuildMicromapsEXT vkBuildMicromapsEXT; + public VkCopyMicromapEXT vkCopyMicromapEXT; + public VkCopyMicromapToMemoryEXT vkCopyMicromapToMemoryEXT; + public VkCopyMemoryToMicromapEXT vkCopyMemoryToMicromapEXT; + public VkWriteMicromapsPropertiesEXT vkWriteMicromapsPropertiesEXT; + public VkCmdCopyMicromapEXT vkCmdCopyMicromapEXT; + public VkCmdCopyMicromapToMemoryEXT vkCmdCopyMicromapToMemoryEXT; + public VkCmdCopyMemoryToMicromapEXT vkCmdCopyMemoryToMicromapEXT; + public VkCmdWriteMicromapsPropertiesEXT vkCmdWriteMicromapsPropertiesEXT; + public VkGetDeviceMicromapCompatibilityEXT vkGetDeviceMicromapCompatibilityEXT; + public VkGetMicromapBuildSizesEXT vkGetMicromapBuildSizesEXT; + public VkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI; + public VkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI; + public VkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT; + public VkCmdSetDispatchParametersARM vkCmdSetDispatchParametersARM; + public VkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE; + public VkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE; + public VkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV; + public VkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV; + public VkCmdDecompressMemoryNV vkCmdDecompressMemoryNV; + public VkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV; + public VkGetPipelineIndirectMemoryRequirementsNV vkGetPipelineIndirectMemoryRequirementsNV; + public VkCmdUpdatePipelineIndirectBufferNV vkCmdUpdatePipelineIndirectBufferNV; + public VkGetPipelineIndirectDeviceAddressNV vkGetPipelineIndirectDeviceAddressNV; + public VkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT; + public VkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT; + public VkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT; + public VkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT; + public VkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT; + public VkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT; + public VkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT; + public VkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT; + public VkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT; + public VkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT; + public VkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT; + public VkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT; + public VkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT; + public VkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT; + public VkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT; + public VkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT; + public VkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT; + public VkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT; + public VkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT; + public VkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT; + public VkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT; + public VkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV; + public VkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV; + public VkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV; + public VkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV; + public VkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV; + public VkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV; + public VkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV; + public VkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV; + public VkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV; + public VkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV; + public VkCreateTensorARM vkCreateTensorARM; + public VkDestroyTensorARM vkDestroyTensorARM; + public VkCreateTensorViewARM vkCreateTensorViewARM; + public VkDestroyTensorViewARM vkDestroyTensorViewARM; + public VkGetTensorMemoryRequirementsARM vkGetTensorMemoryRequirementsARM; + public VkBindTensorMemoryARM vkBindTensorMemoryARM; + public VkGetDeviceTensorMemoryRequirementsARM vkGetDeviceTensorMemoryRequirementsARM; + public VkCmdCopyTensorARM vkCmdCopyTensorARM; + public VkGetTensorOpaqueCaptureDescriptorDataARM vkGetTensorOpaqueCaptureDescriptorDataARM; + public VkGetTensorViewOpaqueCaptureDescriptorDataARM vkGetTensorViewOpaqueCaptureDescriptorDataARM; + public VkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT; + public VkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT; + public VkCreateOpticalFlowSessionNV vkCreateOpticalFlowSessionNV; + public VkDestroyOpticalFlowSessionNV vkDestroyOpticalFlowSessionNV; + public VkBindOpticalFlowSessionImageNV vkBindOpticalFlowSessionImageNV; + public VkCmdOpticalFlowExecuteNV vkCmdOpticalFlowExecuteNV; + public VkAntiLagUpdateAMD vkAntiLagUpdateAMD; + public VkCreateShadersEXT vkCreateShadersEXT; + public VkDestroyShaderEXT vkDestroyShaderEXT; + public VkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT; + public VkCmdBindShadersEXT vkCmdBindShadersEXT; + public VkCmdSetDepthClampRangeEXT vkCmdSetDepthClampRangeEXT; + public VkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM; + public VkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM; + public VkConvertCooperativeVectorMatrixNV vkConvertCooperativeVectorMatrixNV; + public VkCmdConvertCooperativeVectorMatrixNV vkCmdConvertCooperativeVectorMatrixNV; + public VkSetLatencySleepModeNV vkSetLatencySleepModeNV; + public VkLatencySleepNV vkLatencySleepNV; + public VkSetLatencyMarkerNV vkSetLatencyMarkerNV; + public VkGetLatencyTimingsNV vkGetLatencyTimingsNV; + public VkQueueNotifyOutOfBandNV vkQueueNotifyOutOfBandNV; + public VkCreateDataGraphPipelinesARM vkCreateDataGraphPipelinesARM; + public VkCreateDataGraphPipelineSessionARM vkCreateDataGraphPipelineSessionARM; + public VkGetDataGraphPipelineSessionBindPointRequirementsARM vkGetDataGraphPipelineSessionBindPointRequirementsARM; + public VkGetDataGraphPipelineSessionMemoryRequirementsARM vkGetDataGraphPipelineSessionMemoryRequirementsARM; + public VkBindDataGraphPipelineSessionMemoryARM vkBindDataGraphPipelineSessionMemoryARM; + public VkDestroyDataGraphPipelineSessionARM vkDestroyDataGraphPipelineSessionARM; + public VkCmdDispatchDataGraphARM vkCmdDispatchDataGraphARM; + public VkGetDataGraphPipelineAvailablePropertiesARM vkGetDataGraphPipelineAvailablePropertiesARM; + public VkGetDataGraphPipelinePropertiesARM vkGetDataGraphPipelinePropertiesARM; + public VkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT; + public VkCmdBindTileMemoryQCOM vkCmdBindTileMemoryQCOM; + public VkCmdDecompressMemoryEXT vkCmdDecompressMemoryEXT; + public VkCmdDecompressMemoryIndirectCountEXT vkCmdDecompressMemoryIndirectCountEXT; + public VkCreateExternalComputeQueueNV vkCreateExternalComputeQueueNV; + public VkDestroyExternalComputeQueueNV vkDestroyExternalComputeQueueNV; + public VkGetExternalComputeQueueDataNV vkGetExternalComputeQueueDataNV; + public VkGetClusterAccelerationStructureBuildSizesNV vkGetClusterAccelerationStructureBuildSizesNV; + public VkCmdBuildClusterAccelerationStructureIndirectNV vkCmdBuildClusterAccelerationStructureIndirectNV; + public VkGetPartitionedAccelerationStructuresBuildSizesNV vkGetPartitionedAccelerationStructuresBuildSizesNV; + public VkCmdBuildPartitionedAccelerationStructuresNV vkCmdBuildPartitionedAccelerationStructuresNV; + public VkGetGeneratedCommandsMemoryRequirementsEXT vkGetGeneratedCommandsMemoryRequirementsEXT; + public VkCmdPreprocessGeneratedCommandsEXT vkCmdPreprocessGeneratedCommandsEXT; + public VkCmdExecuteGeneratedCommandsEXT vkCmdExecuteGeneratedCommandsEXT; + public VkCreateIndirectCommandsLayoutEXT vkCreateIndirectCommandsLayoutEXT; + public VkDestroyIndirectCommandsLayoutEXT vkDestroyIndirectCommandsLayoutEXT; + public VkCreateIndirectExecutionSetEXT vkCreateIndirectExecutionSetEXT; + public VkDestroyIndirectExecutionSetEXT vkDestroyIndirectExecutionSetEXT; + public VkUpdateIndirectExecutionSetPipelineEXT vkUpdateIndirectExecutionSetPipelineEXT; + public VkUpdateIndirectExecutionSetShaderEXT vkUpdateIndirectExecutionSetShaderEXT; + public VkCreateShaderInstrumentationARM vkCreateShaderInstrumentationARM; + public VkDestroyShaderInstrumentationARM vkDestroyShaderInstrumentationARM; + public VkCmdBeginShaderInstrumentationARM vkCmdBeginShaderInstrumentationARM; + public VkCmdEndShaderInstrumentationARM vkCmdEndShaderInstrumentationARM; + public VkGetShaderInstrumentationValuesARM vkGetShaderInstrumentationValuesARM; + public VkClearShaderInstrumentationMetricsARM vkClearShaderInstrumentationMetricsARM; + public VkCmdEndRendering2EXT vkCmdEndRendering2EXT; + public VkCmdBeginCustomResolveEXT vkCmdBeginCustomResolveEXT; + public VkCmdSetComputeOccupancyPriorityNV vkCmdSetComputeOccupancyPriorityNV; + public VkCmdSetPrimitiveRestartIndexEXT vkCmdSetPrimitiveRestartIndexEXT; + public VkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR; + public VkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR; + public VkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR; + public VkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR; + public VkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR; + public VkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR; + public VkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR; + public VkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR; + public VkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR; + public VkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR; + public VkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR; + public VkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR; + public VkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR; + public VkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR; + public VkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR; + public VkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR; + public VkCmdTraceRaysKHR vkCmdTraceRaysKHR; + public VkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR; + public VkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR; + public VkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR; + public VkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR; + public VkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR; + public VkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT; + public VkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT; + public VkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT; + public VkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; + public VkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; + public VkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; + public VkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; + public VkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; + public VkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; + public VkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; + public VkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT; + public VkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT; + public VkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT; + public VkExportMetalObjectsEXT vkExportMetalObjectsEXT; + public VkGetMemoryMetalHandleEXT vkGetMemoryMetalHandleEXT; + public VkGetMemoryMetalHandlePropertiesEXT vkGetMemoryMetalHandlePropertiesEXT; + public VkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; + public VkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; + public VxDestroyImages vxDestroyImages; + public VxDestroyImageViews vxDestroyImageViews; + public VxDestroyBuffers vxDestroyBuffers; + public VxDestroyBufferViews vxDestroyBufferViews; + + public FunctionTable(VkDevice device, VkGetDeviceProcAddr getProc) + { + vkGetDeviceProcAddr = getProc; + vkDestroyDevice = (VkDestroyDevice)getProc.Invoke(device, "vkDestroyDevice"u8.AsPointer()); + vkGetDeviceQueue = (VkGetDeviceQueue)getProc.Invoke(device, "vkGetDeviceQueue"u8.AsPointer()); + vkQueueSubmit = (VkQueueSubmit)getProc.Invoke(device, "vkQueueSubmit"u8.AsPointer()); + vkQueueWaitIdle = (VkQueueWaitIdle)getProc.Invoke(device, "vkQueueWaitIdle"u8.AsPointer()); + vkDeviceWaitIdle = (VkDeviceWaitIdle)getProc.Invoke(device, "vkDeviceWaitIdle"u8.AsPointer()); + vkAllocateMemory = (VkAllocateMemory)getProc.Invoke(device, "vkAllocateMemory"u8.AsPointer()); + vkFreeMemory = (VkFreeMemory)getProc.Invoke(device, "vkFreeMemory"u8.AsPointer()); + vkMapMemory = (VkMapMemory)getProc.Invoke(device, "vkMapMemory"u8.AsPointer()); + vkUnmapMemory = (VkUnmapMemory)getProc.Invoke(device, "vkUnmapMemory"u8.AsPointer()); + vkFlushMappedMemoryRanges = (VkFlushMappedMemoryRanges) + getProc.Invoke(device, "vkFlushMappedMemoryRanges"u8.AsPointer()); + vkInvalidateMappedMemoryRanges = (VkInvalidateMappedMemoryRanges) + getProc.Invoke(device, "vkInvalidateMappedMemoryRanges"u8.AsPointer()); + vkGetDeviceMemoryCommitment = (VkGetDeviceMemoryCommitment) + getProc.Invoke(device, "vkGetDeviceMemoryCommitment"u8.AsPointer()); + vkBindBufferMemory = (VkBindBufferMemory)getProc.Invoke(device, "vkBindBufferMemory"u8.AsPointer()); + vkBindImageMemory = (VkBindImageMemory)getProc.Invoke(device, "vkBindImageMemory"u8.AsPointer()); + vkGetBufferMemoryRequirements = (VkGetBufferMemoryRequirements) + getProc.Invoke(device, "vkGetBufferMemoryRequirements"u8.AsPointer()); + vkGetImageMemoryRequirements = (VkGetImageMemoryRequirements) + getProc.Invoke(device, "vkGetImageMemoryRequirements"u8.AsPointer()); + vkGetImageSparseMemoryRequirements = (VkGetImageSparseMemoryRequirements) + getProc.Invoke(device, "vkGetImageSparseMemoryRequirements"u8.AsPointer()); + vkQueueBindSparse = (VkQueueBindSparse)getProc.Invoke(device, "vkQueueBindSparse"u8.AsPointer()); + vkCreateFence = (VkCreateFence)getProc.Invoke(device, "vkCreateFence"u8.AsPointer()); + vkDestroyFence = (VkDestroyFence)getProc.Invoke(device, "vkDestroyFence"u8.AsPointer()); + vkResetFences = (VkResetFences)getProc.Invoke(device, "vkResetFences"u8.AsPointer()); + vkGetFenceStatus = (VkGetFenceStatus)getProc.Invoke(device, "vkGetFenceStatus"u8.AsPointer()); + vkWaitForFences = (VkWaitForFences)getProc.Invoke(device, "vkWaitForFences"u8.AsPointer()); + vkCreateSemaphore = (VkCreateSemaphore)getProc.Invoke(device, "vkCreateSemaphore"u8.AsPointer()); + vkDestroySemaphore = (VkDestroySemaphore)getProc.Invoke(device, "vkDestroySemaphore"u8.AsPointer()); + vkCreateQueryPool = (VkCreateQueryPool)getProc.Invoke(device, "vkCreateQueryPool"u8.AsPointer()); + vkDestroyQueryPool = (VkDestroyQueryPool)getProc.Invoke(device, "vkDestroyQueryPool"u8.AsPointer()); + vkGetQueryPoolResults = (VkGetQueryPoolResults) + getProc.Invoke(device, "vkGetQueryPoolResults"u8.AsPointer()); + vkCreateBuffer = (VkCreateBuffer)getProc.Invoke(device, "vkCreateBuffer"u8.AsPointer()); + vkDestroyBuffer = (VkDestroyBuffer)getProc.Invoke(device, "vkDestroyBuffer"u8.AsPointer()); + vkCreateImage = (VkCreateImage)getProc.Invoke(device, "vkCreateImage"u8.AsPointer()); + vkDestroyImage = (VkDestroyImage)getProc.Invoke(device, "vkDestroyImage"u8.AsPointer()); + vkGetImageSubresourceLayout = (VkGetImageSubresourceLayout) + getProc.Invoke(device, "vkGetImageSubresourceLayout"u8.AsPointer()); + vkCreateImageView = (VkCreateImageView)getProc.Invoke(device, "vkCreateImageView"u8.AsPointer()); + vkDestroyImageView = (VkDestroyImageView)getProc.Invoke(device, "vkDestroyImageView"u8.AsPointer()); + vkCreateCommandPool = (VkCreateCommandPool)getProc.Invoke(device, "vkCreateCommandPool"u8.AsPointer()); + vkDestroyCommandPool = (VkDestroyCommandPool) + getProc.Invoke(device, "vkDestroyCommandPool"u8.AsPointer()); + vkResetCommandPool = (VkResetCommandPool)getProc.Invoke(device, "vkResetCommandPool"u8.AsPointer()); + vkAllocateCommandBuffers = (VkAllocateCommandBuffers) + getProc.Invoke(device, "vkAllocateCommandBuffers"u8.AsPointer()); + vkFreeCommandBuffers = (VkFreeCommandBuffers) + getProc.Invoke(device, "vkFreeCommandBuffers"u8.AsPointer()); + vkBeginCommandBuffer = (VkBeginCommandBuffer) + getProc.Invoke(device, "vkBeginCommandBuffer"u8.AsPointer()); + vkEndCommandBuffer = (VkEndCommandBuffer)getProc.Invoke(device, "vkEndCommandBuffer"u8.AsPointer()); + vkResetCommandBuffer = (VkResetCommandBuffer) + getProc.Invoke(device, "vkResetCommandBuffer"u8.AsPointer()); + vkCmdCopyBuffer = (VkCmdCopyBuffer)getProc.Invoke(device, "vkCmdCopyBuffer"u8.AsPointer()); + vkCmdCopyImage = (VkCmdCopyImage)getProc.Invoke(device, "vkCmdCopyImage"u8.AsPointer()); + vkCmdCopyBufferToImage = (VkCmdCopyBufferToImage) + getProc.Invoke(device, "vkCmdCopyBufferToImage"u8.AsPointer()); + vkCmdCopyImageToBuffer = (VkCmdCopyImageToBuffer) + getProc.Invoke(device, "vkCmdCopyImageToBuffer"u8.AsPointer()); + vkCmdUpdateBuffer = (VkCmdUpdateBuffer)getProc.Invoke(device, "vkCmdUpdateBuffer"u8.AsPointer()); + vkCmdFillBuffer = (VkCmdFillBuffer)getProc.Invoke(device, "vkCmdFillBuffer"u8.AsPointer()); + vkCmdPipelineBarrier = (VkCmdPipelineBarrier) + getProc.Invoke(device, "vkCmdPipelineBarrier"u8.AsPointer()); + vkCmdBeginQuery = (VkCmdBeginQuery)getProc.Invoke(device, "vkCmdBeginQuery"u8.AsPointer()); + vkCmdEndQuery = (VkCmdEndQuery)getProc.Invoke(device, "vkCmdEndQuery"u8.AsPointer()); + vkCmdResetQueryPool = (VkCmdResetQueryPool)getProc.Invoke(device, "vkCmdResetQueryPool"u8.AsPointer()); + vkCmdWriteTimestamp = (VkCmdWriteTimestamp)getProc.Invoke(device, "vkCmdWriteTimestamp"u8.AsPointer()); + vkCmdCopyQueryPoolResults = (VkCmdCopyQueryPoolResults) + getProc.Invoke(device, "vkCmdCopyQueryPoolResults"u8.AsPointer()); + vkCmdExecuteCommands = (VkCmdExecuteCommands) + getProc.Invoke(device, "vkCmdExecuteCommands"u8.AsPointer()); + vkCreateEvent = (VkCreateEvent)getProc.Invoke(device, "vkCreateEvent"u8.AsPointer()); + vkDestroyEvent = (VkDestroyEvent)getProc.Invoke(device, "vkDestroyEvent"u8.AsPointer()); + vkGetEventStatus = (VkGetEventStatus)getProc.Invoke(device, "vkGetEventStatus"u8.AsPointer()); + vkSetEvent = (VkSetEvent)getProc.Invoke(device, "vkSetEvent"u8.AsPointer()); + vkResetEvent = (VkResetEvent)getProc.Invoke(device, "vkResetEvent"u8.AsPointer()); + vkCreateBufferView = (VkCreateBufferView)getProc.Invoke(device, "vkCreateBufferView"u8.AsPointer()); + vkDestroyBufferView = (VkDestroyBufferView)getProc.Invoke(device, "vkDestroyBufferView"u8.AsPointer()); + vkCreateShaderModule = (VkCreateShaderModule) + getProc.Invoke(device, "vkCreateShaderModule"u8.AsPointer()); + vkDestroyShaderModule = (VkDestroyShaderModule) + getProc.Invoke(device, "vkDestroyShaderModule"u8.AsPointer()); + vkCreatePipelineCache = (VkCreatePipelineCache) + getProc.Invoke(device, "vkCreatePipelineCache"u8.AsPointer()); + vkDestroyPipelineCache = (VkDestroyPipelineCache) + getProc.Invoke(device, "vkDestroyPipelineCache"u8.AsPointer()); + vkGetPipelineCacheData = (VkGetPipelineCacheData) + getProc.Invoke(device, "vkGetPipelineCacheData"u8.AsPointer()); + vkMergePipelineCaches = (VkMergePipelineCaches) + getProc.Invoke(device, "vkMergePipelineCaches"u8.AsPointer()); + vkCreateComputePipelines = (VkCreateComputePipelines) + getProc.Invoke(device, "vkCreateComputePipelines"u8.AsPointer()); + vkDestroyPipeline = (VkDestroyPipeline)getProc.Invoke(device, "vkDestroyPipeline"u8.AsPointer()); + vkCreatePipelineLayout = (VkCreatePipelineLayout) + getProc.Invoke(device, "vkCreatePipelineLayout"u8.AsPointer()); + vkDestroyPipelineLayout = (VkDestroyPipelineLayout) + getProc.Invoke(device, "vkDestroyPipelineLayout"u8.AsPointer()); + vkCreateSampler = (VkCreateSampler)getProc.Invoke(device, "vkCreateSampler"u8.AsPointer()); + vkDestroySampler = (VkDestroySampler)getProc.Invoke(device, "vkDestroySampler"u8.AsPointer()); + vkCreateDescriptorSetLayout = (VkCreateDescriptorSetLayout) + getProc.Invoke(device, "vkCreateDescriptorSetLayout"u8.AsPointer()); + vkDestroyDescriptorSetLayout = (VkDestroyDescriptorSetLayout) + getProc.Invoke(device, "vkDestroyDescriptorSetLayout"u8.AsPointer()); + vkCreateDescriptorPool = (VkCreateDescriptorPool) + getProc.Invoke(device, "vkCreateDescriptorPool"u8.AsPointer()); + vkDestroyDescriptorPool = (VkDestroyDescriptorPool) + getProc.Invoke(device, "vkDestroyDescriptorPool"u8.AsPointer()); + vkResetDescriptorPool = (VkResetDescriptorPool) + getProc.Invoke(device, "vkResetDescriptorPool"u8.AsPointer()); + vkAllocateDescriptorSets = (VkAllocateDescriptorSets) + getProc.Invoke(device, "vkAllocateDescriptorSets"u8.AsPointer()); + vkFreeDescriptorSets = (VkFreeDescriptorSets) + getProc.Invoke(device, "vkFreeDescriptorSets"u8.AsPointer()); + vkUpdateDescriptorSets = (VkUpdateDescriptorSets) + getProc.Invoke(device, "vkUpdateDescriptorSets"u8.AsPointer()); + vkCmdBindPipeline = (VkCmdBindPipeline)getProc.Invoke(device, "vkCmdBindPipeline"u8.AsPointer()); + vkCmdBindDescriptorSets = (VkCmdBindDescriptorSets) + getProc.Invoke(device, "vkCmdBindDescriptorSets"u8.AsPointer()); + vkCmdClearColorImage = (VkCmdClearColorImage) + getProc.Invoke(device, "vkCmdClearColorImage"u8.AsPointer()); + vkCmdDispatch = (VkCmdDispatch)getProc.Invoke(device, "vkCmdDispatch"u8.AsPointer()); + vkCmdDispatchIndirect = (VkCmdDispatchIndirect) + getProc.Invoke(device, "vkCmdDispatchIndirect"u8.AsPointer()); + vkCmdSetEvent = (VkCmdSetEvent)getProc.Invoke(device, "vkCmdSetEvent"u8.AsPointer()); + vkCmdResetEvent = (VkCmdResetEvent)getProc.Invoke(device, "vkCmdResetEvent"u8.AsPointer()); + vkCmdWaitEvents = (VkCmdWaitEvents)getProc.Invoke(device, "vkCmdWaitEvents"u8.AsPointer()); + vkCmdPushConstants = (VkCmdPushConstants)getProc.Invoke(device, "vkCmdPushConstants"u8.AsPointer()); + vkCreateGraphicsPipelines = (VkCreateGraphicsPipelines) + getProc.Invoke(device, "vkCreateGraphicsPipelines"u8.AsPointer()); + vkCreateFramebuffer = (VkCreateFramebuffer)getProc.Invoke(device, "vkCreateFramebuffer"u8.AsPointer()); + vkDestroyFramebuffer = (VkDestroyFramebuffer) + getProc.Invoke(device, "vkDestroyFramebuffer"u8.AsPointer()); + vkCreateRenderPass = (VkCreateRenderPass)getProc.Invoke(device, "vkCreateRenderPass"u8.AsPointer()); + vkDestroyRenderPass = (VkDestroyRenderPass)getProc.Invoke(device, "vkDestroyRenderPass"u8.AsPointer()); + vkGetRenderAreaGranularity = (VkGetRenderAreaGranularity) + getProc.Invoke(device, "vkGetRenderAreaGranularity"u8.AsPointer()); + vkCmdSetViewport = (VkCmdSetViewport)getProc.Invoke(device, "vkCmdSetViewport"u8.AsPointer()); + vkCmdSetScissor = (VkCmdSetScissor)getProc.Invoke(device, "vkCmdSetScissor"u8.AsPointer()); + vkCmdSetLineWidth = (VkCmdSetLineWidth)getProc.Invoke(device, "vkCmdSetLineWidth"u8.AsPointer()); + vkCmdSetDepthBias = (VkCmdSetDepthBias)getProc.Invoke(device, "vkCmdSetDepthBias"u8.AsPointer()); + vkCmdSetBlendConstants = (VkCmdSetBlendConstants) + getProc.Invoke(device, "vkCmdSetBlendConstants"u8.AsPointer()); + vkCmdSetDepthBounds = (VkCmdSetDepthBounds)getProc.Invoke(device, "vkCmdSetDepthBounds"u8.AsPointer()); + vkCmdSetStencilCompareMask = (VkCmdSetStencilCompareMask) + getProc.Invoke(device, "vkCmdSetStencilCompareMask"u8.AsPointer()); + vkCmdSetStencilWriteMask = (VkCmdSetStencilWriteMask) + getProc.Invoke(device, "vkCmdSetStencilWriteMask"u8.AsPointer()); + vkCmdSetStencilReference = (VkCmdSetStencilReference) + getProc.Invoke(device, "vkCmdSetStencilReference"u8.AsPointer()); + vkCmdBindIndexBuffer = (VkCmdBindIndexBuffer) + getProc.Invoke(device, "vkCmdBindIndexBuffer"u8.AsPointer()); + vkCmdBindVertexBuffers = (VkCmdBindVertexBuffers) + getProc.Invoke(device, "vkCmdBindVertexBuffers"u8.AsPointer()); + vkCmdDraw = (VkCmdDraw)getProc.Invoke(device, "vkCmdDraw"u8.AsPointer()); + vkCmdDrawIndexed = (VkCmdDrawIndexed)getProc.Invoke(device, "vkCmdDrawIndexed"u8.AsPointer()); + vkCmdDrawIndirect = (VkCmdDrawIndirect)getProc.Invoke(device, "vkCmdDrawIndirect"u8.AsPointer()); + vkCmdDrawIndexedIndirect = (VkCmdDrawIndexedIndirect) + getProc.Invoke(device, "vkCmdDrawIndexedIndirect"u8.AsPointer()); + vkCmdBlitImage = (VkCmdBlitImage)getProc.Invoke(device, "vkCmdBlitImage"u8.AsPointer()); + vkCmdClearDepthStencilImage = (VkCmdClearDepthStencilImage) + getProc.Invoke(device, "vkCmdClearDepthStencilImage"u8.AsPointer()); + vkCmdClearAttachments = (VkCmdClearAttachments) + getProc.Invoke(device, "vkCmdClearAttachments"u8.AsPointer()); + vkCmdResolveImage = (VkCmdResolveImage)getProc.Invoke(device, "vkCmdResolveImage"u8.AsPointer()); + vkCmdBeginRenderPass = (VkCmdBeginRenderPass) + getProc.Invoke(device, "vkCmdBeginRenderPass"u8.AsPointer()); + vkCmdNextSubpass = (VkCmdNextSubpass)getProc.Invoke(device, "vkCmdNextSubpass"u8.AsPointer()); + vkCmdEndRenderPass = (VkCmdEndRenderPass)getProc.Invoke(device, "vkCmdEndRenderPass"u8.AsPointer()); + vkBindBufferMemory2 = (VkBindBufferMemory2)getProc.Invoke(device, "vkBindBufferMemory2"u8.AsPointer()); + vkBindImageMemory2 = (VkBindImageMemory2)getProc.Invoke(device, "vkBindImageMemory2"u8.AsPointer()); + vkGetDeviceGroupPeerMemoryFeatures = (VkGetDeviceGroupPeerMemoryFeatures) + getProc.Invoke(device, "vkGetDeviceGroupPeerMemoryFeatures"u8.AsPointer()); + vkCmdSetDeviceMask = (VkCmdSetDeviceMask)getProc.Invoke(device, "vkCmdSetDeviceMask"u8.AsPointer()); + vkGetImageMemoryRequirements2 = (VkGetImageMemoryRequirements2) + getProc.Invoke(device, "vkGetImageMemoryRequirements2"u8.AsPointer()); + vkGetBufferMemoryRequirements2 = (VkGetBufferMemoryRequirements2) + getProc.Invoke(device, "vkGetBufferMemoryRequirements2"u8.AsPointer()); + vkGetImageSparseMemoryRequirements2 = (VkGetImageSparseMemoryRequirements2) + getProc.Invoke(device, "vkGetImageSparseMemoryRequirements2"u8.AsPointer()); + vkTrimCommandPool = (VkTrimCommandPool)getProc.Invoke(device, "vkTrimCommandPool"u8.AsPointer()); + vkGetDeviceQueue2 = (VkGetDeviceQueue2)getProc.Invoke(device, "vkGetDeviceQueue2"u8.AsPointer()); + vkCmdDispatchBase = (VkCmdDispatchBase)getProc.Invoke(device, "vkCmdDispatchBase"u8.AsPointer()); + vkCreateDescriptorUpdateTemplate = (VkCreateDescriptorUpdateTemplate) + getProc.Invoke(device, "vkCreateDescriptorUpdateTemplate"u8.AsPointer()); + vkDestroyDescriptorUpdateTemplate = (VkDestroyDescriptorUpdateTemplate) + getProc.Invoke(device, "vkDestroyDescriptorUpdateTemplate"u8.AsPointer()); + vkUpdateDescriptorSetWithTemplate = (VkUpdateDescriptorSetWithTemplate) + getProc.Invoke(device, "vkUpdateDescriptorSetWithTemplate"u8.AsPointer()); + vkGetDescriptorSetLayoutSupport = (VkGetDescriptorSetLayoutSupport) + getProc.Invoke(device, "vkGetDescriptorSetLayoutSupport"u8.AsPointer()); + vkCreateSamplerYcbcrConversion = (VkCreateSamplerYcbcrConversion) + getProc.Invoke(device, "vkCreateSamplerYcbcrConversion"u8.AsPointer()); + vkDestroySamplerYcbcrConversion = (VkDestroySamplerYcbcrConversion) + getProc.Invoke(device, "vkDestroySamplerYcbcrConversion"u8.AsPointer()); + vkResetQueryPool = (VkResetQueryPool)getProc.Invoke(device, "vkResetQueryPool"u8.AsPointer()); + vkGetSemaphoreCounterValue = (VkGetSemaphoreCounterValue) + getProc.Invoke(device, "vkGetSemaphoreCounterValue"u8.AsPointer()); + vkWaitSemaphores = (VkWaitSemaphores)getProc.Invoke(device, "vkWaitSemaphores"u8.AsPointer()); + vkSignalSemaphore = (VkSignalSemaphore)getProc.Invoke(device, "vkSignalSemaphore"u8.AsPointer()); + vkGetBufferDeviceAddress = (VkGetBufferDeviceAddress) + getProc.Invoke(device, "vkGetBufferDeviceAddress"u8.AsPointer()); + vkGetBufferOpaqueCaptureAddress = (VkGetBufferOpaqueCaptureAddress) + getProc.Invoke(device, "vkGetBufferOpaqueCaptureAddress"u8.AsPointer()); + vkGetDeviceMemoryOpaqueCaptureAddress = (VkGetDeviceMemoryOpaqueCaptureAddress) + getProc.Invoke(device, "vkGetDeviceMemoryOpaqueCaptureAddress"u8.AsPointer()); + vkCmdDrawIndirectCount = (VkCmdDrawIndirectCount) + getProc.Invoke(device, "vkCmdDrawIndirectCount"u8.AsPointer()); + vkCmdDrawIndexedIndirectCount = (VkCmdDrawIndexedIndirectCount) + getProc.Invoke(device, "vkCmdDrawIndexedIndirectCount"u8.AsPointer()); + vkCreateRenderPass2 = (VkCreateRenderPass2)getProc.Invoke(device, "vkCreateRenderPass2"u8.AsPointer()); + vkCmdBeginRenderPass2 = (VkCmdBeginRenderPass2) + getProc.Invoke(device, "vkCmdBeginRenderPass2"u8.AsPointer()); + vkCmdNextSubpass2 = (VkCmdNextSubpass2)getProc.Invoke(device, "vkCmdNextSubpass2"u8.AsPointer()); + vkCmdEndRenderPass2 = (VkCmdEndRenderPass2)getProc.Invoke(device, "vkCmdEndRenderPass2"u8.AsPointer()); + vkCreatePrivateDataSlot = (VkCreatePrivateDataSlot) + getProc.Invoke(device, "vkCreatePrivateDataSlot"u8.AsPointer()); + vkDestroyPrivateDataSlot = (VkDestroyPrivateDataSlot) + getProc.Invoke(device, "vkDestroyPrivateDataSlot"u8.AsPointer()); + vkSetPrivateData = (VkSetPrivateData)getProc.Invoke(device, "vkSetPrivateData"u8.AsPointer()); + vkGetPrivateData = (VkGetPrivateData)getProc.Invoke(device, "vkGetPrivateData"u8.AsPointer()); + vkCmdPipelineBarrier2 = (VkCmdPipelineBarrier2) + getProc.Invoke(device, "vkCmdPipelineBarrier2"u8.AsPointer()); + vkCmdWriteTimestamp2 = (VkCmdWriteTimestamp2) + getProc.Invoke(device, "vkCmdWriteTimestamp2"u8.AsPointer()); + vkQueueSubmit2 = (VkQueueSubmit2)getProc.Invoke(device, "vkQueueSubmit2"u8.AsPointer()); + vkCmdCopyBuffer2 = (VkCmdCopyBuffer2)getProc.Invoke(device, "vkCmdCopyBuffer2"u8.AsPointer()); + vkCmdCopyImage2 = (VkCmdCopyImage2)getProc.Invoke(device, "vkCmdCopyImage2"u8.AsPointer()); + vkCmdCopyBufferToImage2 = (VkCmdCopyBufferToImage2) + getProc.Invoke(device, "vkCmdCopyBufferToImage2"u8.AsPointer()); + vkCmdCopyImageToBuffer2 = (VkCmdCopyImageToBuffer2) + getProc.Invoke(device, "vkCmdCopyImageToBuffer2"u8.AsPointer()); + vkGetDeviceBufferMemoryRequirements = (VkGetDeviceBufferMemoryRequirements) + getProc.Invoke(device, "vkGetDeviceBufferMemoryRequirements"u8.AsPointer()); + vkGetDeviceImageMemoryRequirements = (VkGetDeviceImageMemoryRequirements) + getProc.Invoke(device, "vkGetDeviceImageMemoryRequirements"u8.AsPointer()); + vkGetDeviceImageSparseMemoryRequirements = (VkGetDeviceImageSparseMemoryRequirements) + getProc.Invoke(device, "vkGetDeviceImageSparseMemoryRequirements"u8.AsPointer()); + vkCmdSetEvent2 = (VkCmdSetEvent2)getProc.Invoke(device, "vkCmdSetEvent2"u8.AsPointer()); + vkCmdResetEvent2 = (VkCmdResetEvent2)getProc.Invoke(device, "vkCmdResetEvent2"u8.AsPointer()); + vkCmdWaitEvents2 = (VkCmdWaitEvents2)getProc.Invoke(device, "vkCmdWaitEvents2"u8.AsPointer()); + vkCmdBlitImage2 = (VkCmdBlitImage2)getProc.Invoke(device, "vkCmdBlitImage2"u8.AsPointer()); + vkCmdResolveImage2 = (VkCmdResolveImage2)getProc.Invoke(device, "vkCmdResolveImage2"u8.AsPointer()); + vkCmdBeginRendering = (VkCmdBeginRendering)getProc.Invoke(device, "vkCmdBeginRendering"u8.AsPointer()); + vkCmdEndRendering = (VkCmdEndRendering)getProc.Invoke(device, "vkCmdEndRendering"u8.AsPointer()); + vkCmdSetCullMode = (VkCmdSetCullMode)getProc.Invoke(device, "vkCmdSetCullMode"u8.AsPointer()); + vkCmdSetFrontFace = (VkCmdSetFrontFace)getProc.Invoke(device, "vkCmdSetFrontFace"u8.AsPointer()); + vkCmdSetPrimitiveTopology = (VkCmdSetPrimitiveTopology) + getProc.Invoke(device, "vkCmdSetPrimitiveTopology"u8.AsPointer()); + vkCmdSetViewportWithCount = (VkCmdSetViewportWithCount) + getProc.Invoke(device, "vkCmdSetViewportWithCount"u8.AsPointer()); + vkCmdSetScissorWithCount = (VkCmdSetScissorWithCount) + getProc.Invoke(device, "vkCmdSetScissorWithCount"u8.AsPointer()); + vkCmdBindVertexBuffers2 = (VkCmdBindVertexBuffers2) + getProc.Invoke(device, "vkCmdBindVertexBuffers2"u8.AsPointer()); + vkCmdSetDepthTestEnable = (VkCmdSetDepthTestEnable) + getProc.Invoke(device, "vkCmdSetDepthTestEnable"u8.AsPointer()); + vkCmdSetDepthWriteEnable = (VkCmdSetDepthWriteEnable) + getProc.Invoke(device, "vkCmdSetDepthWriteEnable"u8.AsPointer()); + vkCmdSetDepthCompareOp = (VkCmdSetDepthCompareOp) + getProc.Invoke(device, "vkCmdSetDepthCompareOp"u8.AsPointer()); + vkCmdSetDepthBoundsTestEnable = (VkCmdSetDepthBoundsTestEnable) + getProc.Invoke(device, "vkCmdSetDepthBoundsTestEnable"u8.AsPointer()); + vkCmdSetStencilTestEnable = (VkCmdSetStencilTestEnable) + getProc.Invoke(device, "vkCmdSetStencilTestEnable"u8.AsPointer()); + vkCmdSetStencilOp = (VkCmdSetStencilOp)getProc.Invoke(device, "vkCmdSetStencilOp"u8.AsPointer()); + vkCmdSetRasterizerDiscardEnable = (VkCmdSetRasterizerDiscardEnable) + getProc.Invoke(device, "vkCmdSetRasterizerDiscardEnable"u8.AsPointer()); + vkCmdSetDepthBiasEnable = (VkCmdSetDepthBiasEnable) + getProc.Invoke(device, "vkCmdSetDepthBiasEnable"u8.AsPointer()); + vkCmdSetPrimitiveRestartEnable = (VkCmdSetPrimitiveRestartEnable) + getProc.Invoke(device, "vkCmdSetPrimitiveRestartEnable"u8.AsPointer()); + vkMapMemory2 = (VkMapMemory2)getProc.Invoke(device, "vkMapMemory2"u8.AsPointer()); + vkUnmapMemory2 = (VkUnmapMemory2)getProc.Invoke(device, "vkUnmapMemory2"u8.AsPointer()); + vkGetDeviceImageSubresourceLayout = (VkGetDeviceImageSubresourceLayout) + getProc.Invoke(device, "vkGetDeviceImageSubresourceLayout"u8.AsPointer()); + vkGetImageSubresourceLayout2 = (VkGetImageSubresourceLayout2) + getProc.Invoke(device, "vkGetImageSubresourceLayout2"u8.AsPointer()); + vkCopyMemoryToImage = (VkCopyMemoryToImage)getProc.Invoke(device, "vkCopyMemoryToImage"u8.AsPointer()); + vkCopyImageToMemory = (VkCopyImageToMemory)getProc.Invoke(device, "vkCopyImageToMemory"u8.AsPointer()); + vkCopyImageToImage = (VkCopyImageToImage)getProc.Invoke(device, "vkCopyImageToImage"u8.AsPointer()); + vkTransitionImageLayout = (VkTransitionImageLayout) + getProc.Invoke(device, "vkTransitionImageLayout"u8.AsPointer()); + vkCmdPushDescriptorSet = (VkCmdPushDescriptorSet) + getProc.Invoke(device, "vkCmdPushDescriptorSet"u8.AsPointer()); + vkCmdPushDescriptorSetWithTemplate = (VkCmdPushDescriptorSetWithTemplate) + getProc.Invoke(device, "vkCmdPushDescriptorSetWithTemplate"u8.AsPointer()); + vkCmdBindDescriptorSets2 = (VkCmdBindDescriptorSets2) + getProc.Invoke(device, "vkCmdBindDescriptorSets2"u8.AsPointer()); + vkCmdPushConstants2 = (VkCmdPushConstants2)getProc.Invoke(device, "vkCmdPushConstants2"u8.AsPointer()); + vkCmdPushDescriptorSet2 = (VkCmdPushDescriptorSet2) + getProc.Invoke(device, "vkCmdPushDescriptorSet2"u8.AsPointer()); + vkCmdPushDescriptorSetWithTemplate2 = (VkCmdPushDescriptorSetWithTemplate2) + getProc.Invoke(device, "vkCmdPushDescriptorSetWithTemplate2"u8.AsPointer()); + vkCmdSetLineStipple = (VkCmdSetLineStipple)getProc.Invoke(device, "vkCmdSetLineStipple"u8.AsPointer()); + vkCmdBindIndexBuffer2 = (VkCmdBindIndexBuffer2) + getProc.Invoke(device, "vkCmdBindIndexBuffer2"u8.AsPointer()); + vkGetRenderingAreaGranularity = (VkGetRenderingAreaGranularity) + getProc.Invoke(device, "vkGetRenderingAreaGranularity"u8.AsPointer()); + vkCmdSetRenderingAttachmentLocations = (VkCmdSetRenderingAttachmentLocations) + getProc.Invoke(device, "vkCmdSetRenderingAttachmentLocations"u8.AsPointer()); + vkCmdSetRenderingInputAttachmentIndices = (VkCmdSetRenderingInputAttachmentIndices) + getProc.Invoke(device, "vkCmdSetRenderingInputAttachmentIndices"u8.AsPointer()); + vkCreateSwapchainKHR = (VkCreateSwapchainKHR) + getProc.Invoke(device, "vkCreateSwapchainKHR"u8.AsPointer()); + vkDestroySwapchainKHR = (VkDestroySwapchainKHR) + getProc.Invoke(device, "vkDestroySwapchainKHR"u8.AsPointer()); + vkGetSwapchainImagesKHR = (VkGetSwapchainImagesKHR) + getProc.Invoke(device, "vkGetSwapchainImagesKHR"u8.AsPointer()); + vkAcquireNextImageKHR = (VkAcquireNextImageKHR) + getProc.Invoke(device, "vkAcquireNextImageKHR"u8.AsPointer()); + vkQueuePresentKHR = (VkQueuePresentKHR)getProc.Invoke(device, "vkQueuePresentKHR"u8.AsPointer()); + vkGetDeviceGroupPresentCapabilitiesKHR = (VkGetDeviceGroupPresentCapabilitiesKHR) + getProc.Invoke(device, "vkGetDeviceGroupPresentCapabilitiesKHR"u8.AsPointer()); + vkGetDeviceGroupSurfacePresentModesKHR = (VkGetDeviceGroupSurfacePresentModesKHR) + getProc.Invoke(device, "vkGetDeviceGroupSurfacePresentModesKHR"u8.AsPointer()); + vkAcquireNextImage2KHR = (VkAcquireNextImage2KHR) + getProc.Invoke(device, "vkAcquireNextImage2KHR"u8.AsPointer()); + vkCreateSharedSwapchainsKHR = (VkCreateSharedSwapchainsKHR) + getProc.Invoke(device, "vkCreateSharedSwapchainsKHR"u8.AsPointer()); + vkCreateVideoSessionKHR = (VkCreateVideoSessionKHR) + getProc.Invoke(device, "vkCreateVideoSessionKHR"u8.AsPointer()); + vkDestroyVideoSessionKHR = (VkDestroyVideoSessionKHR) + getProc.Invoke(device, "vkDestroyVideoSessionKHR"u8.AsPointer()); + vkGetVideoSessionMemoryRequirementsKHR = (VkGetVideoSessionMemoryRequirementsKHR) + getProc.Invoke(device, "vkGetVideoSessionMemoryRequirementsKHR"u8.AsPointer()); + vkBindVideoSessionMemoryKHR = (VkBindVideoSessionMemoryKHR) + getProc.Invoke(device, "vkBindVideoSessionMemoryKHR"u8.AsPointer()); + vkCreateVideoSessionParametersKHR = (VkCreateVideoSessionParametersKHR) + getProc.Invoke(device, "vkCreateVideoSessionParametersKHR"u8.AsPointer()); + vkUpdateVideoSessionParametersKHR = (VkUpdateVideoSessionParametersKHR) + getProc.Invoke(device, "vkUpdateVideoSessionParametersKHR"u8.AsPointer()); + vkDestroyVideoSessionParametersKHR = (VkDestroyVideoSessionParametersKHR) + getProc.Invoke(device, "vkDestroyVideoSessionParametersKHR"u8.AsPointer()); + vkCmdBeginVideoCodingKHR = (VkCmdBeginVideoCodingKHR) + getProc.Invoke(device, "vkCmdBeginVideoCodingKHR"u8.AsPointer()); + vkCmdEndVideoCodingKHR = (VkCmdEndVideoCodingKHR) + getProc.Invoke(device, "vkCmdEndVideoCodingKHR"u8.AsPointer()); + vkCmdControlVideoCodingKHR = (VkCmdControlVideoCodingKHR) + getProc.Invoke(device, "vkCmdControlVideoCodingKHR"u8.AsPointer()); + vkCmdDecodeVideoKHR = (VkCmdDecodeVideoKHR)getProc.Invoke(device, "vkCmdDecodeVideoKHR"u8.AsPointer()); + vkCmdBeginRenderingKHR = (VkCmdBeginRenderingKHR) + getProc.Invoke(device, "vkCmdBeginRenderingKHR"u8.AsPointer()); + vkCmdEndRenderingKHR = (VkCmdEndRenderingKHR) + getProc.Invoke(device, "vkCmdEndRenderingKHR"u8.AsPointer()); + vkGetDeviceGroupPeerMemoryFeaturesKHR = (VkGetDeviceGroupPeerMemoryFeaturesKHR) + getProc.Invoke(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR"u8.AsPointer()); + vkCmdSetDeviceMaskKHR = (VkCmdSetDeviceMaskKHR) + getProc.Invoke(device, "vkCmdSetDeviceMaskKHR"u8.AsPointer()); + vkCmdDispatchBaseKHR = (VkCmdDispatchBaseKHR) + getProc.Invoke(device, "vkCmdDispatchBaseKHR"u8.AsPointer()); + vkTrimCommandPoolKHR = (VkTrimCommandPoolKHR) + getProc.Invoke(device, "vkTrimCommandPoolKHR"u8.AsPointer()); + vkGetMemoryFdKHR = (VkGetMemoryFdKHR)getProc.Invoke(device, "vkGetMemoryFdKHR"u8.AsPointer()); + vkGetMemoryFdPropertiesKHR = (VkGetMemoryFdPropertiesKHR) + getProc.Invoke(device, "vkGetMemoryFdPropertiesKHR"u8.AsPointer()); + vkImportSemaphoreFdKHR = (VkImportSemaphoreFdKHR) + getProc.Invoke(device, "vkImportSemaphoreFdKHR"u8.AsPointer()); + vkGetSemaphoreFdKHR = (VkGetSemaphoreFdKHR)getProc.Invoke(device, "vkGetSemaphoreFdKHR"u8.AsPointer()); + vkCmdPushDescriptorSetKHR = (VkCmdPushDescriptorSetKHR) + getProc.Invoke(device, "vkCmdPushDescriptorSetKHR"u8.AsPointer()); + vkCmdPushDescriptorSetWithTemplateKHR = (VkCmdPushDescriptorSetWithTemplateKHR) + getProc.Invoke(device, "vkCmdPushDescriptorSetWithTemplateKHR"u8.AsPointer()); + vkCreateDescriptorUpdateTemplateKHR = (VkCreateDescriptorUpdateTemplateKHR) + getProc.Invoke(device, "vkCreateDescriptorUpdateTemplateKHR"u8.AsPointer()); + vkDestroyDescriptorUpdateTemplateKHR = (VkDestroyDescriptorUpdateTemplateKHR) + getProc.Invoke(device, "vkDestroyDescriptorUpdateTemplateKHR"u8.AsPointer()); + vkUpdateDescriptorSetWithTemplateKHR = (VkUpdateDescriptorSetWithTemplateKHR) + getProc.Invoke(device, "vkUpdateDescriptorSetWithTemplateKHR"u8.AsPointer()); + vkCreateRenderPass2KHR = (VkCreateRenderPass2KHR) + getProc.Invoke(device, "vkCreateRenderPass2KHR"u8.AsPointer()); + vkCmdBeginRenderPass2KHR = (VkCmdBeginRenderPass2KHR) + getProc.Invoke(device, "vkCmdBeginRenderPass2KHR"u8.AsPointer()); + vkCmdNextSubpass2KHR = (VkCmdNextSubpass2KHR) + getProc.Invoke(device, "vkCmdNextSubpass2KHR"u8.AsPointer()); + vkCmdEndRenderPass2KHR = (VkCmdEndRenderPass2KHR) + getProc.Invoke(device, "vkCmdEndRenderPass2KHR"u8.AsPointer()); + vkGetSwapchainStatusKHR = (VkGetSwapchainStatusKHR) + getProc.Invoke(device, "vkGetSwapchainStatusKHR"u8.AsPointer()); + vkImportFenceFdKHR = (VkImportFenceFdKHR)getProc.Invoke(device, "vkImportFenceFdKHR"u8.AsPointer()); + vkGetFenceFdKHR = (VkGetFenceFdKHR)getProc.Invoke(device, "vkGetFenceFdKHR"u8.AsPointer()); + vkAcquireProfilingLockKHR = (VkAcquireProfilingLockKHR) + getProc.Invoke(device, "vkAcquireProfilingLockKHR"u8.AsPointer()); + vkReleaseProfilingLockKHR = (VkReleaseProfilingLockKHR) + getProc.Invoke(device, "vkReleaseProfilingLockKHR"u8.AsPointer()); + vkGetImageMemoryRequirements2KHR = (VkGetImageMemoryRequirements2KHR) + getProc.Invoke(device, "vkGetImageMemoryRequirements2KHR"u8.AsPointer()); + vkGetBufferMemoryRequirements2KHR = (VkGetBufferMemoryRequirements2KHR) + getProc.Invoke(device, "vkGetBufferMemoryRequirements2KHR"u8.AsPointer()); + vkGetImageSparseMemoryRequirements2KHR = (VkGetImageSparseMemoryRequirements2KHR) + getProc.Invoke(device, "vkGetImageSparseMemoryRequirements2KHR"u8.AsPointer()); + vkCreateSamplerYcbcrConversionKHR = (VkCreateSamplerYcbcrConversionKHR) + getProc.Invoke(device, "vkCreateSamplerYcbcrConversionKHR"u8.AsPointer()); + vkDestroySamplerYcbcrConversionKHR = (VkDestroySamplerYcbcrConversionKHR) + getProc.Invoke(device, "vkDestroySamplerYcbcrConversionKHR"u8.AsPointer()); + vkBindBufferMemory2KHR = (VkBindBufferMemory2KHR) + getProc.Invoke(device, "vkBindBufferMemory2KHR"u8.AsPointer()); + vkBindImageMemory2KHR = (VkBindImageMemory2KHR) + getProc.Invoke(device, "vkBindImageMemory2KHR"u8.AsPointer()); + vkGetDescriptorSetLayoutSupportKHR = (VkGetDescriptorSetLayoutSupportKHR) + getProc.Invoke(device, "vkGetDescriptorSetLayoutSupportKHR"u8.AsPointer()); + vkCmdDrawIndirectCountKHR = (VkCmdDrawIndirectCountKHR) + getProc.Invoke(device, "vkCmdDrawIndirectCountKHR"u8.AsPointer()); + vkCmdDrawIndexedIndirectCountKHR = (VkCmdDrawIndexedIndirectCountKHR) + getProc.Invoke(device, "vkCmdDrawIndexedIndirectCountKHR"u8.AsPointer()); + vkGetSemaphoreCounterValueKHR = (VkGetSemaphoreCounterValueKHR) + getProc.Invoke(device, "vkGetSemaphoreCounterValueKHR"u8.AsPointer()); + vkWaitSemaphoresKHR = (VkWaitSemaphoresKHR)getProc.Invoke(device, "vkWaitSemaphoresKHR"u8.AsPointer()); + vkSignalSemaphoreKHR = (VkSignalSemaphoreKHR) + getProc.Invoke(device, "vkSignalSemaphoreKHR"u8.AsPointer()); + vkCmdSetFragmentShadingRateKHR = (VkCmdSetFragmentShadingRateKHR) + getProc.Invoke(device, "vkCmdSetFragmentShadingRateKHR"u8.AsPointer()); + vkCmdSetRenderingAttachmentLocationsKHR = (VkCmdSetRenderingAttachmentLocationsKHR) + getProc.Invoke(device, "vkCmdSetRenderingAttachmentLocationsKHR"u8.AsPointer()); + vkCmdSetRenderingInputAttachmentIndicesKHR = (VkCmdSetRenderingInputAttachmentIndicesKHR) + getProc.Invoke(device, "vkCmdSetRenderingInputAttachmentIndicesKHR"u8.AsPointer()); + vkWaitForPresentKHR = (VkWaitForPresentKHR)getProc.Invoke(device, "vkWaitForPresentKHR"u8.AsPointer()); + vkGetBufferDeviceAddressKHR = (VkGetBufferDeviceAddressKHR) + getProc.Invoke(device, "vkGetBufferDeviceAddressKHR"u8.AsPointer()); + vkGetBufferOpaqueCaptureAddressKHR = (VkGetBufferOpaqueCaptureAddressKHR) + getProc.Invoke(device, "vkGetBufferOpaqueCaptureAddressKHR"u8.AsPointer()); + vkGetDeviceMemoryOpaqueCaptureAddressKHR = (VkGetDeviceMemoryOpaqueCaptureAddressKHR) + getProc.Invoke(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR"u8.AsPointer()); + vkCreateDeferredOperationKHR = (VkCreateDeferredOperationKHR) + getProc.Invoke(device, "vkCreateDeferredOperationKHR"u8.AsPointer()); + vkDestroyDeferredOperationKHR = (VkDestroyDeferredOperationKHR) + getProc.Invoke(device, "vkDestroyDeferredOperationKHR"u8.AsPointer()); + vkGetDeferredOperationMaxConcurrencyKHR = (VkGetDeferredOperationMaxConcurrencyKHR) + getProc.Invoke(device, "vkGetDeferredOperationMaxConcurrencyKHR"u8.AsPointer()); + vkGetDeferredOperationResultKHR = (VkGetDeferredOperationResultKHR) + getProc.Invoke(device, "vkGetDeferredOperationResultKHR"u8.AsPointer()); + vkDeferredOperationJoinKHR = (VkDeferredOperationJoinKHR) + getProc.Invoke(device, "vkDeferredOperationJoinKHR"u8.AsPointer()); + vkGetPipelineExecutablePropertiesKHR = (VkGetPipelineExecutablePropertiesKHR) + getProc.Invoke(device, "vkGetPipelineExecutablePropertiesKHR"u8.AsPointer()); + vkGetPipelineExecutableStatisticsKHR = (VkGetPipelineExecutableStatisticsKHR) + getProc.Invoke(device, "vkGetPipelineExecutableStatisticsKHR"u8.AsPointer()); + vkGetPipelineExecutableInternalRepresentationsKHR = (VkGetPipelineExecutableInternalRepresentationsKHR) + getProc.Invoke(device, "vkGetPipelineExecutableInternalRepresentationsKHR"u8.AsPointer()); + vkMapMemory2KHR = (VkMapMemory2KHR)getProc.Invoke(device, "vkMapMemory2KHR"u8.AsPointer()); + vkUnmapMemory2KHR = (VkUnmapMemory2KHR)getProc.Invoke(device, "vkUnmapMemory2KHR"u8.AsPointer()); + vkGetEncodedVideoSessionParametersKHR = (VkGetEncodedVideoSessionParametersKHR) + getProc.Invoke(device, "vkGetEncodedVideoSessionParametersKHR"u8.AsPointer()); + vkCmdEncodeVideoKHR = (VkCmdEncodeVideoKHR)getProc.Invoke(device, "vkCmdEncodeVideoKHR"u8.AsPointer()); + vkCmdSetEvent2KHR = (VkCmdSetEvent2KHR)getProc.Invoke(device, "vkCmdSetEvent2KHR"u8.AsPointer()); + vkCmdResetEvent2KHR = (VkCmdResetEvent2KHR)getProc.Invoke(device, "vkCmdResetEvent2KHR"u8.AsPointer()); + vkCmdWaitEvents2KHR = (VkCmdWaitEvents2KHR)getProc.Invoke(device, "vkCmdWaitEvents2KHR"u8.AsPointer()); + vkCmdPipelineBarrier2KHR = (VkCmdPipelineBarrier2KHR) + getProc.Invoke(device, "vkCmdPipelineBarrier2KHR"u8.AsPointer()); + vkCmdWriteTimestamp2KHR = (VkCmdWriteTimestamp2KHR) + getProc.Invoke(device, "vkCmdWriteTimestamp2KHR"u8.AsPointer()); + vkQueueSubmit2KHR = (VkQueueSubmit2KHR)getProc.Invoke(device, "vkQueueSubmit2KHR"u8.AsPointer()); + vkCmdBindIndexBuffer3KHR = (VkCmdBindIndexBuffer3KHR) + getProc.Invoke(device, "vkCmdBindIndexBuffer3KHR"u8.AsPointer()); + vkCmdBindVertexBuffers3KHR = (VkCmdBindVertexBuffers3KHR) + getProc.Invoke(device, "vkCmdBindVertexBuffers3KHR"u8.AsPointer()); + vkCmdDrawIndirect2KHR = (VkCmdDrawIndirect2KHR) + getProc.Invoke(device, "vkCmdDrawIndirect2KHR"u8.AsPointer()); + vkCmdDrawIndexedIndirect2KHR = (VkCmdDrawIndexedIndirect2KHR) + getProc.Invoke(device, "vkCmdDrawIndexedIndirect2KHR"u8.AsPointer()); + vkCmdDispatchIndirect2KHR = (VkCmdDispatchIndirect2KHR) + getProc.Invoke(device, "vkCmdDispatchIndirect2KHR"u8.AsPointer()); + vkCmdCopyMemoryKHR = (VkCmdCopyMemoryKHR)getProc.Invoke(device, "vkCmdCopyMemoryKHR"u8.AsPointer()); + vkCmdCopyMemoryToImageKHR = (VkCmdCopyMemoryToImageKHR) + getProc.Invoke(device, "vkCmdCopyMemoryToImageKHR"u8.AsPointer()); + vkCmdCopyImageToMemoryKHR = (VkCmdCopyImageToMemoryKHR) + getProc.Invoke(device, "vkCmdCopyImageToMemoryKHR"u8.AsPointer()); + vkCmdUpdateMemoryKHR = (VkCmdUpdateMemoryKHR) + getProc.Invoke(device, "vkCmdUpdateMemoryKHR"u8.AsPointer()); + vkCmdFillMemoryKHR = (VkCmdFillMemoryKHR)getProc.Invoke(device, "vkCmdFillMemoryKHR"u8.AsPointer()); + vkCmdCopyQueryPoolResultsToMemoryKHR = (VkCmdCopyQueryPoolResultsToMemoryKHR) + getProc.Invoke(device, "vkCmdCopyQueryPoolResultsToMemoryKHR"u8.AsPointer()); + vkCmdDrawIndirectCount2KHR = (VkCmdDrawIndirectCount2KHR) + getProc.Invoke(device, "vkCmdDrawIndirectCount2KHR"u8.AsPointer()); + vkCmdDrawIndexedIndirectCount2KHR = (VkCmdDrawIndexedIndirectCount2KHR) + getProc.Invoke(device, "vkCmdDrawIndexedIndirectCount2KHR"u8.AsPointer()); + vkCmdBeginConditionalRendering2EXT = (VkCmdBeginConditionalRendering2EXT) + getProc.Invoke(device, "vkCmdBeginConditionalRendering2EXT"u8.AsPointer()); + vkCmdBindTransformFeedbackBuffers2EXT = (VkCmdBindTransformFeedbackBuffers2EXT) + getProc.Invoke(device, "vkCmdBindTransformFeedbackBuffers2EXT"u8.AsPointer()); + vkCmdBeginTransformFeedback2EXT = (VkCmdBeginTransformFeedback2EXT) + getProc.Invoke(device, "vkCmdBeginTransformFeedback2EXT"u8.AsPointer()); + vkCmdEndTransformFeedback2EXT = (VkCmdEndTransformFeedback2EXT) + getProc.Invoke(device, "vkCmdEndTransformFeedback2EXT"u8.AsPointer()); + vkCmdDrawIndirectByteCount2EXT = (VkCmdDrawIndirectByteCount2EXT) + getProc.Invoke(device, "vkCmdDrawIndirectByteCount2EXT"u8.AsPointer()); + vkCmdDrawMeshTasksIndirect2EXT = (VkCmdDrawMeshTasksIndirect2EXT) + getProc.Invoke(device, "vkCmdDrawMeshTasksIndirect2EXT"u8.AsPointer()); + vkCmdDrawMeshTasksIndirectCount2EXT = (VkCmdDrawMeshTasksIndirectCount2EXT) + getProc.Invoke(device, "vkCmdDrawMeshTasksIndirectCount2EXT"u8.AsPointer()); + vkCmdWriteMarkerToMemoryAMD = (VkCmdWriteMarkerToMemoryAMD) + getProc.Invoke(device, "vkCmdWriteMarkerToMemoryAMD"u8.AsPointer()); + vkCreateAccelerationStructure2KHR = (VkCreateAccelerationStructure2KHR) + getProc.Invoke(device, "vkCreateAccelerationStructure2KHR"u8.AsPointer()); + vkCmdCopyBuffer2KHR = (VkCmdCopyBuffer2KHR)getProc.Invoke(device, "vkCmdCopyBuffer2KHR"u8.AsPointer()); + vkCmdCopyImage2KHR = (VkCmdCopyImage2KHR)getProc.Invoke(device, "vkCmdCopyImage2KHR"u8.AsPointer()); + vkCmdCopyBufferToImage2KHR = (VkCmdCopyBufferToImage2KHR) + getProc.Invoke(device, "vkCmdCopyBufferToImage2KHR"u8.AsPointer()); + vkCmdCopyImageToBuffer2KHR = (VkCmdCopyImageToBuffer2KHR) + getProc.Invoke(device, "vkCmdCopyImageToBuffer2KHR"u8.AsPointer()); + vkCmdBlitImage2KHR = (VkCmdBlitImage2KHR)getProc.Invoke(device, "vkCmdBlitImage2KHR"u8.AsPointer()); + vkCmdResolveImage2KHR = (VkCmdResolveImage2KHR) + getProc.Invoke(device, "vkCmdResolveImage2KHR"u8.AsPointer()); + vkCmdTraceRaysIndirect2KHR = (VkCmdTraceRaysIndirect2KHR) + getProc.Invoke(device, "vkCmdTraceRaysIndirect2KHR"u8.AsPointer()); + vkGetDeviceBufferMemoryRequirementsKHR = (VkGetDeviceBufferMemoryRequirementsKHR) + getProc.Invoke(device, "vkGetDeviceBufferMemoryRequirementsKHR"u8.AsPointer()); + vkGetDeviceImageMemoryRequirementsKHR = (VkGetDeviceImageMemoryRequirementsKHR) + getProc.Invoke(device, "vkGetDeviceImageMemoryRequirementsKHR"u8.AsPointer()); + vkGetDeviceImageSparseMemoryRequirementsKHR = (VkGetDeviceImageSparseMemoryRequirementsKHR) + getProc.Invoke(device, "vkGetDeviceImageSparseMemoryRequirementsKHR"u8.AsPointer()); + vkCmdBindIndexBuffer2KHR = (VkCmdBindIndexBuffer2KHR) + getProc.Invoke(device, "vkCmdBindIndexBuffer2KHR"u8.AsPointer()); + vkGetRenderingAreaGranularityKHR = (VkGetRenderingAreaGranularityKHR) + getProc.Invoke(device, "vkGetRenderingAreaGranularityKHR"u8.AsPointer()); + vkGetDeviceImageSubresourceLayoutKHR = (VkGetDeviceImageSubresourceLayoutKHR) + getProc.Invoke(device, "vkGetDeviceImageSubresourceLayoutKHR"u8.AsPointer()); + vkGetImageSubresourceLayout2KHR = (VkGetImageSubresourceLayout2KHR) + getProc.Invoke(device, "vkGetImageSubresourceLayout2KHR"u8.AsPointer()); + vkWaitForPresent2KHR = (VkWaitForPresent2KHR) + getProc.Invoke(device, "vkWaitForPresent2KHR"u8.AsPointer()); + vkCreatePipelineBinariesKHR = (VkCreatePipelineBinariesKHR) + getProc.Invoke(device, "vkCreatePipelineBinariesKHR"u8.AsPointer()); + vkDestroyPipelineBinaryKHR = (VkDestroyPipelineBinaryKHR) + getProc.Invoke(device, "vkDestroyPipelineBinaryKHR"u8.AsPointer()); + vkGetPipelineKeyKHR = (VkGetPipelineKeyKHR)getProc.Invoke(device, "vkGetPipelineKeyKHR"u8.AsPointer()); + vkGetPipelineBinaryDataKHR = (VkGetPipelineBinaryDataKHR) + getProc.Invoke(device, "vkGetPipelineBinaryDataKHR"u8.AsPointer()); + vkReleaseCapturedPipelineDataKHR = (VkReleaseCapturedPipelineDataKHR) + getProc.Invoke(device, "vkReleaseCapturedPipelineDataKHR"u8.AsPointer()); + vkReleaseSwapchainImagesKHR = (VkReleaseSwapchainImagesKHR) + getProc.Invoke(device, "vkReleaseSwapchainImagesKHR"u8.AsPointer()); + vkCmdSetLineStippleKHR = (VkCmdSetLineStippleKHR) + getProc.Invoke(device, "vkCmdSetLineStippleKHR"u8.AsPointer()); + vkGetCalibratedTimestampsKHR = (VkGetCalibratedTimestampsKHR) + getProc.Invoke(device, "vkGetCalibratedTimestampsKHR"u8.AsPointer()); + vkCmdBindDescriptorSets2KHR = (VkCmdBindDescriptorSets2KHR) + getProc.Invoke(device, "vkCmdBindDescriptorSets2KHR"u8.AsPointer()); + vkCmdPushConstants2KHR = (VkCmdPushConstants2KHR) + getProc.Invoke(device, "vkCmdPushConstants2KHR"u8.AsPointer()); + vkCmdPushDescriptorSet2KHR = (VkCmdPushDescriptorSet2KHR) + getProc.Invoke(device, "vkCmdPushDescriptorSet2KHR"u8.AsPointer()); + vkCmdPushDescriptorSetWithTemplate2KHR = (VkCmdPushDescriptorSetWithTemplate2KHR) + getProc.Invoke(device, "vkCmdPushDescriptorSetWithTemplate2KHR"u8.AsPointer()); + vkCmdSetDescriptorBufferOffsets2EXT = (VkCmdSetDescriptorBufferOffsets2EXT) + getProc.Invoke(device, "vkCmdSetDescriptorBufferOffsets2EXT"u8.AsPointer()); + vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = (VkCmdBindDescriptorBufferEmbeddedSamplers2EXT) + getProc.Invoke(device, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT"u8.AsPointer()); + vkCmdCopyMemoryIndirectKHR = (VkCmdCopyMemoryIndirectKHR) + getProc.Invoke(device, "vkCmdCopyMemoryIndirectKHR"u8.AsPointer()); + vkCmdCopyMemoryToImageIndirectKHR = (VkCmdCopyMemoryToImageIndirectKHR) + getProc.Invoke(device, "vkCmdCopyMemoryToImageIndirectKHR"u8.AsPointer()); + vkGetDeviceFaultReportsKHR = (VkGetDeviceFaultReportsKHR) + getProc.Invoke(device, "vkGetDeviceFaultReportsKHR"u8.AsPointer()); + vkGetDeviceFaultDebugInfoKHR = (VkGetDeviceFaultDebugInfoKHR) + getProc.Invoke(device, "vkGetDeviceFaultDebugInfoKHR"u8.AsPointer()); + vkCmdEndRendering2KHR = (VkCmdEndRendering2KHR) + getProc.Invoke(device, "vkCmdEndRendering2KHR"u8.AsPointer()); + vkDebugMarkerSetObjectTagEXT = (VkDebugMarkerSetObjectTagEXT) + getProc.Invoke(device, "vkDebugMarkerSetObjectTagEXT"u8.AsPointer()); + vkDebugMarkerSetObjectNameEXT = (VkDebugMarkerSetObjectNameEXT) + getProc.Invoke(device, "vkDebugMarkerSetObjectNameEXT"u8.AsPointer()); + vkCmdDebugMarkerBeginEXT = (VkCmdDebugMarkerBeginEXT) + getProc.Invoke(device, "vkCmdDebugMarkerBeginEXT"u8.AsPointer()); + vkCmdDebugMarkerEndEXT = (VkCmdDebugMarkerEndEXT) + getProc.Invoke(device, "vkCmdDebugMarkerEndEXT"u8.AsPointer()); + vkCmdDebugMarkerInsertEXT = (VkCmdDebugMarkerInsertEXT) + getProc.Invoke(device, "vkCmdDebugMarkerInsertEXT"u8.AsPointer()); + vkCmdBindTransformFeedbackBuffersEXT = (VkCmdBindTransformFeedbackBuffersEXT) + getProc.Invoke(device, "vkCmdBindTransformFeedbackBuffersEXT"u8.AsPointer()); + vkCmdBeginTransformFeedbackEXT = (VkCmdBeginTransformFeedbackEXT) + getProc.Invoke(device, "vkCmdBeginTransformFeedbackEXT"u8.AsPointer()); + vkCmdEndTransformFeedbackEXT = (VkCmdEndTransformFeedbackEXT) + getProc.Invoke(device, "vkCmdEndTransformFeedbackEXT"u8.AsPointer()); + vkCmdBeginQueryIndexedEXT = (VkCmdBeginQueryIndexedEXT) + getProc.Invoke(device, "vkCmdBeginQueryIndexedEXT"u8.AsPointer()); + vkCmdEndQueryIndexedEXT = (VkCmdEndQueryIndexedEXT) + getProc.Invoke(device, "vkCmdEndQueryIndexedEXT"u8.AsPointer()); + vkCmdDrawIndirectByteCountEXT = (VkCmdDrawIndirectByteCountEXT) + getProc.Invoke(device, "vkCmdDrawIndirectByteCountEXT"u8.AsPointer()); + vkCreateCuModuleNVX = (VkCreateCuModuleNVX)getProc.Invoke(device, "vkCreateCuModuleNVX"u8.AsPointer()); + vkCreateCuFunctionNVX = (VkCreateCuFunctionNVX) + getProc.Invoke(device, "vkCreateCuFunctionNVX"u8.AsPointer()); + vkDestroyCuModuleNVX = (VkDestroyCuModuleNVX) + getProc.Invoke(device, "vkDestroyCuModuleNVX"u8.AsPointer()); + vkDestroyCuFunctionNVX = (VkDestroyCuFunctionNVX) + getProc.Invoke(device, "vkDestroyCuFunctionNVX"u8.AsPointer()); + vkCmdCuLaunchKernelNVX = (VkCmdCuLaunchKernelNVX) + getProc.Invoke(device, "vkCmdCuLaunchKernelNVX"u8.AsPointer()); + vkGetImageViewHandleNVX = (VkGetImageViewHandleNVX) + getProc.Invoke(device, "vkGetImageViewHandleNVX"u8.AsPointer()); + vkGetImageViewHandle64NVX = (VkGetImageViewHandle64NVX) + getProc.Invoke(device, "vkGetImageViewHandle64NVX"u8.AsPointer()); + vkGetImageViewAddressNVX = (VkGetImageViewAddressNVX) + getProc.Invoke(device, "vkGetImageViewAddressNVX"u8.AsPointer()); + vkGetDeviceCombinedImageSamplerIndexNVX = (VkGetDeviceCombinedImageSamplerIndexNVX) + getProc.Invoke(device, "vkGetDeviceCombinedImageSamplerIndexNVX"u8.AsPointer()); + vkCmdDrawIndirectCountAMD = (VkCmdDrawIndirectCountAMD) + getProc.Invoke(device, "vkCmdDrawIndirectCountAMD"u8.AsPointer()); + vkCmdDrawIndexedIndirectCountAMD = (VkCmdDrawIndexedIndirectCountAMD) + getProc.Invoke(device, "vkCmdDrawIndexedIndirectCountAMD"u8.AsPointer()); + vkGetShaderInfoAMD = (VkGetShaderInfoAMD)getProc.Invoke(device, "vkGetShaderInfoAMD"u8.AsPointer()); + vkCmdBeginConditionalRenderingEXT = (VkCmdBeginConditionalRenderingEXT) + getProc.Invoke(device, "vkCmdBeginConditionalRenderingEXT"u8.AsPointer()); + vkCmdEndConditionalRenderingEXT = (VkCmdEndConditionalRenderingEXT) + getProc.Invoke(device, "vkCmdEndConditionalRenderingEXT"u8.AsPointer()); + vkCmdSetViewportWScalingNV = (VkCmdSetViewportWScalingNV) + getProc.Invoke(device, "vkCmdSetViewportWScalingNV"u8.AsPointer()); + vkDisplayPowerControlEXT = (VkDisplayPowerControlEXT) + getProc.Invoke(device, "vkDisplayPowerControlEXT"u8.AsPointer()); + vkRegisterDeviceEventEXT = (VkRegisterDeviceEventEXT) + getProc.Invoke(device, "vkRegisterDeviceEventEXT"u8.AsPointer()); + vkRegisterDisplayEventEXT = (VkRegisterDisplayEventEXT) + getProc.Invoke(device, "vkRegisterDisplayEventEXT"u8.AsPointer()); + vkGetSwapchainCounterEXT = (VkGetSwapchainCounterEXT) + getProc.Invoke(device, "vkGetSwapchainCounterEXT"u8.AsPointer()); + vkGetRefreshCycleDurationGOOGLE = (VkGetRefreshCycleDurationGOOGLE) + getProc.Invoke(device, "vkGetRefreshCycleDurationGOOGLE"u8.AsPointer()); + vkGetPastPresentationTimingGOOGLE = (VkGetPastPresentationTimingGOOGLE) + getProc.Invoke(device, "vkGetPastPresentationTimingGOOGLE"u8.AsPointer()); + vkCmdSetDiscardRectangleEXT = (VkCmdSetDiscardRectangleEXT) + getProc.Invoke(device, "vkCmdSetDiscardRectangleEXT"u8.AsPointer()); + vkCmdSetDiscardRectangleEnableEXT = (VkCmdSetDiscardRectangleEnableEXT) + getProc.Invoke(device, "vkCmdSetDiscardRectangleEnableEXT"u8.AsPointer()); + vkCmdSetDiscardRectangleModeEXT = (VkCmdSetDiscardRectangleModeEXT) + getProc.Invoke(device, "vkCmdSetDiscardRectangleModeEXT"u8.AsPointer()); + vkSetHdrMetadataEXT = (VkSetHdrMetadataEXT)getProc.Invoke(device, "vkSetHdrMetadataEXT"u8.AsPointer()); + vkSetDebugUtilsObjectNameEXT = (VkSetDebugUtilsObjectNameEXT) + getProc.Invoke(device, "vkSetDebugUtilsObjectNameEXT"u8.AsPointer()); + vkSetDebugUtilsObjectTagEXT = (VkSetDebugUtilsObjectTagEXT) + getProc.Invoke(device, "vkSetDebugUtilsObjectTagEXT"u8.AsPointer()); + vkQueueBeginDebugUtilsLabelEXT = (VkQueueBeginDebugUtilsLabelEXT) + getProc.Invoke(device, "vkQueueBeginDebugUtilsLabelEXT"u8.AsPointer()); + vkQueueEndDebugUtilsLabelEXT = (VkQueueEndDebugUtilsLabelEXT) + getProc.Invoke(device, "vkQueueEndDebugUtilsLabelEXT"u8.AsPointer()); + vkQueueInsertDebugUtilsLabelEXT = (VkQueueInsertDebugUtilsLabelEXT) + getProc.Invoke(device, "vkQueueInsertDebugUtilsLabelEXT"u8.AsPointer()); + vkCmdBeginDebugUtilsLabelEXT = (VkCmdBeginDebugUtilsLabelEXT) + getProc.Invoke(device, "vkCmdBeginDebugUtilsLabelEXT"u8.AsPointer()); + vkCmdEndDebugUtilsLabelEXT = (VkCmdEndDebugUtilsLabelEXT) + getProc.Invoke(device, "vkCmdEndDebugUtilsLabelEXT"u8.AsPointer()); + vkCmdInsertDebugUtilsLabelEXT = (VkCmdInsertDebugUtilsLabelEXT) + getProc.Invoke(device, "vkCmdInsertDebugUtilsLabelEXT"u8.AsPointer()); + vkCreateGpaSessionAMD = (VkCreateGpaSessionAMD) + getProc.Invoke(device, "vkCreateGpaSessionAMD"u8.AsPointer()); + vkDestroyGpaSessionAMD = (VkDestroyGpaSessionAMD) + getProc.Invoke(device, "vkDestroyGpaSessionAMD"u8.AsPointer()); + vkSetGpaDeviceClockModeAMD = (VkSetGpaDeviceClockModeAMD) + getProc.Invoke(device, "vkSetGpaDeviceClockModeAMD"u8.AsPointer()); + vkGetGpaDeviceClockInfoAMD = (VkGetGpaDeviceClockInfoAMD) + getProc.Invoke(device, "vkGetGpaDeviceClockInfoAMD"u8.AsPointer()); + vkCmdBeginGpaSessionAMD = (VkCmdBeginGpaSessionAMD) + getProc.Invoke(device, "vkCmdBeginGpaSessionAMD"u8.AsPointer()); + vkCmdEndGpaSessionAMD = (VkCmdEndGpaSessionAMD) + getProc.Invoke(device, "vkCmdEndGpaSessionAMD"u8.AsPointer()); + vkCmdBeginGpaSampleAMD = (VkCmdBeginGpaSampleAMD) + getProc.Invoke(device, "vkCmdBeginGpaSampleAMD"u8.AsPointer()); + vkCmdEndGpaSampleAMD = (VkCmdEndGpaSampleAMD) + getProc.Invoke(device, "vkCmdEndGpaSampleAMD"u8.AsPointer()); + vkGetGpaSessionStatusAMD = (VkGetGpaSessionStatusAMD) + getProc.Invoke(device, "vkGetGpaSessionStatusAMD"u8.AsPointer()); + vkGetGpaSessionResultsAMD = (VkGetGpaSessionResultsAMD) + getProc.Invoke(device, "vkGetGpaSessionResultsAMD"u8.AsPointer()); + vkResetGpaSessionAMD = (VkResetGpaSessionAMD) + getProc.Invoke(device, "vkResetGpaSessionAMD"u8.AsPointer()); + vkCmdCopyGpaSessionResultsAMD = (VkCmdCopyGpaSessionResultsAMD) + getProc.Invoke(device, "vkCmdCopyGpaSessionResultsAMD"u8.AsPointer()); + vkWriteSamplerDescriptorsEXT = (VkWriteSamplerDescriptorsEXT) + getProc.Invoke(device, "vkWriteSamplerDescriptorsEXT"u8.AsPointer()); + vkWriteResourceDescriptorsEXT = (VkWriteResourceDescriptorsEXT) + getProc.Invoke(device, "vkWriteResourceDescriptorsEXT"u8.AsPointer()); + vkCmdBindSamplerHeapEXT = (VkCmdBindSamplerHeapEXT) + getProc.Invoke(device, "vkCmdBindSamplerHeapEXT"u8.AsPointer()); + vkCmdBindResourceHeapEXT = (VkCmdBindResourceHeapEXT) + getProc.Invoke(device, "vkCmdBindResourceHeapEXT"u8.AsPointer()); + vkCmdPushDataEXT = (VkCmdPushDataEXT)getProc.Invoke(device, "vkCmdPushDataEXT"u8.AsPointer()); + vkGetImageOpaqueCaptureDataEXT = (VkGetImageOpaqueCaptureDataEXT) + getProc.Invoke(device, "vkGetImageOpaqueCaptureDataEXT"u8.AsPointer()); + vkRegisterCustomBorderColorEXT = (VkRegisterCustomBorderColorEXT) + getProc.Invoke(device, "vkRegisterCustomBorderColorEXT"u8.AsPointer()); + vkUnregisterCustomBorderColorEXT = (VkUnregisterCustomBorderColorEXT) + getProc.Invoke(device, "vkUnregisterCustomBorderColorEXT"u8.AsPointer()); + vkGetTensorOpaqueCaptureDataARM = (VkGetTensorOpaqueCaptureDataARM) + getProc.Invoke(device, "vkGetTensorOpaqueCaptureDataARM"u8.AsPointer()); + vkCmdSetSampleLocationsEXT = (VkCmdSetSampleLocationsEXT) + getProc.Invoke(device, "vkCmdSetSampleLocationsEXT"u8.AsPointer()); + vkGetImageDrmFormatModifierPropertiesEXT = (VkGetImageDrmFormatModifierPropertiesEXT) + getProc.Invoke(device, "vkGetImageDrmFormatModifierPropertiesEXT"u8.AsPointer()); + vkCreateValidationCacheEXT = (VkCreateValidationCacheEXT) + getProc.Invoke(device, "vkCreateValidationCacheEXT"u8.AsPointer()); + vkDestroyValidationCacheEXT = (VkDestroyValidationCacheEXT) + getProc.Invoke(device, "vkDestroyValidationCacheEXT"u8.AsPointer()); + vkMergeValidationCachesEXT = (VkMergeValidationCachesEXT) + getProc.Invoke(device, "vkMergeValidationCachesEXT"u8.AsPointer()); + vkGetValidationCacheDataEXT = (VkGetValidationCacheDataEXT) + getProc.Invoke(device, "vkGetValidationCacheDataEXT"u8.AsPointer()); + vkCmdBindShadingRateImageNV = (VkCmdBindShadingRateImageNV) + getProc.Invoke(device, "vkCmdBindShadingRateImageNV"u8.AsPointer()); + vkCmdSetViewportShadingRatePaletteNV = (VkCmdSetViewportShadingRatePaletteNV) + getProc.Invoke(device, "vkCmdSetViewportShadingRatePaletteNV"u8.AsPointer()); + vkCmdSetCoarseSampleOrderNV = (VkCmdSetCoarseSampleOrderNV) + getProc.Invoke(device, "vkCmdSetCoarseSampleOrderNV"u8.AsPointer()); + vkCreateAccelerationStructureNV = (VkCreateAccelerationStructureNV) + getProc.Invoke(device, "vkCreateAccelerationStructureNV"u8.AsPointer()); + vkDestroyAccelerationStructureNV = (VkDestroyAccelerationStructureNV) + getProc.Invoke(device, "vkDestroyAccelerationStructureNV"u8.AsPointer()); + vkGetAccelerationStructureMemoryRequirementsNV = (VkGetAccelerationStructureMemoryRequirementsNV) + getProc.Invoke(device, "vkGetAccelerationStructureMemoryRequirementsNV"u8.AsPointer()); + vkBindAccelerationStructureMemoryNV = (VkBindAccelerationStructureMemoryNV) + getProc.Invoke(device, "vkBindAccelerationStructureMemoryNV"u8.AsPointer()); + vkCmdBuildAccelerationStructureNV = (VkCmdBuildAccelerationStructureNV) + getProc.Invoke(device, "vkCmdBuildAccelerationStructureNV"u8.AsPointer()); + vkCmdCopyAccelerationStructureNV = (VkCmdCopyAccelerationStructureNV) + getProc.Invoke(device, "vkCmdCopyAccelerationStructureNV"u8.AsPointer()); + vkCmdTraceRaysNV = (VkCmdTraceRaysNV)getProc.Invoke(device, "vkCmdTraceRaysNV"u8.AsPointer()); + vkCreateRayTracingPipelinesNV = (VkCreateRayTracingPipelinesNV) + getProc.Invoke(device, "vkCreateRayTracingPipelinesNV"u8.AsPointer()); + vkGetRayTracingShaderGroupHandlesKHR = (VkGetRayTracingShaderGroupHandlesKHR) + getProc.Invoke(device, "vkGetRayTracingShaderGroupHandlesKHR"u8.AsPointer()); + vkGetRayTracingShaderGroupHandlesNV = (VkGetRayTracingShaderGroupHandlesNV) + getProc.Invoke(device, "vkGetRayTracingShaderGroupHandlesNV"u8.AsPointer()); + vkGetAccelerationStructureHandleNV = (VkGetAccelerationStructureHandleNV) + getProc.Invoke(device, "vkGetAccelerationStructureHandleNV"u8.AsPointer()); + vkCmdWriteAccelerationStructuresPropertiesNV = (VkCmdWriteAccelerationStructuresPropertiesNV) + getProc.Invoke(device, "vkCmdWriteAccelerationStructuresPropertiesNV"u8.AsPointer()); + vkCompileDeferredNV = (VkCompileDeferredNV)getProc.Invoke(device, "vkCompileDeferredNV"u8.AsPointer()); + vkGetMemoryHostPointerPropertiesEXT = (VkGetMemoryHostPointerPropertiesEXT) + getProc.Invoke(device, "vkGetMemoryHostPointerPropertiesEXT"u8.AsPointer()); + vkCmdWriteBufferMarkerAMD = (VkCmdWriteBufferMarkerAMD) + getProc.Invoke(device, "vkCmdWriteBufferMarkerAMD"u8.AsPointer()); + vkCmdWriteBufferMarker2AMD = (VkCmdWriteBufferMarker2AMD) + getProc.Invoke(device, "vkCmdWriteBufferMarker2AMD"u8.AsPointer()); + vkGetCalibratedTimestampsEXT = (VkGetCalibratedTimestampsEXT) + getProc.Invoke(device, "vkGetCalibratedTimestampsEXT"u8.AsPointer()); + vkCmdDrawMeshTasksNV = (VkCmdDrawMeshTasksNV) + getProc.Invoke(device, "vkCmdDrawMeshTasksNV"u8.AsPointer()); + vkCmdDrawMeshTasksIndirectNV = (VkCmdDrawMeshTasksIndirectNV) + getProc.Invoke(device, "vkCmdDrawMeshTasksIndirectNV"u8.AsPointer()); + vkCmdDrawMeshTasksIndirectCountNV = (VkCmdDrawMeshTasksIndirectCountNV) + getProc.Invoke(device, "vkCmdDrawMeshTasksIndirectCountNV"u8.AsPointer()); + vkCmdSetExclusiveScissorEnableNV = (VkCmdSetExclusiveScissorEnableNV) + getProc.Invoke(device, "vkCmdSetExclusiveScissorEnableNV"u8.AsPointer()); + vkCmdSetExclusiveScissorNV = (VkCmdSetExclusiveScissorNV) + getProc.Invoke(device, "vkCmdSetExclusiveScissorNV"u8.AsPointer()); + vkCmdSetCheckpointNV = (VkCmdSetCheckpointNV) + getProc.Invoke(device, "vkCmdSetCheckpointNV"u8.AsPointer()); + vkGetQueueCheckpointDataNV = (VkGetQueueCheckpointDataNV) + getProc.Invoke(device, "vkGetQueueCheckpointDataNV"u8.AsPointer()); + vkGetQueueCheckpointData2NV = (VkGetQueueCheckpointData2NV) + getProc.Invoke(device, "vkGetQueueCheckpointData2NV"u8.AsPointer()); + vkSetSwapchainPresentTimingQueueSizeEXT = (VkSetSwapchainPresentTimingQueueSizeEXT) + getProc.Invoke(device, "vkSetSwapchainPresentTimingQueueSizeEXT"u8.AsPointer()); + vkGetSwapchainTimingPropertiesEXT = (VkGetSwapchainTimingPropertiesEXT) + getProc.Invoke(device, "vkGetSwapchainTimingPropertiesEXT"u8.AsPointer()); + vkGetSwapchainTimeDomainPropertiesEXT = (VkGetSwapchainTimeDomainPropertiesEXT) + getProc.Invoke(device, "vkGetSwapchainTimeDomainPropertiesEXT"u8.AsPointer()); + vkGetPastPresentationTimingEXT = (VkGetPastPresentationTimingEXT) + getProc.Invoke(device, "vkGetPastPresentationTimingEXT"u8.AsPointer()); + vkInitializePerformanceApiINTEL = (VkInitializePerformanceApiINTEL) + getProc.Invoke(device, "vkInitializePerformanceApiINTEL"u8.AsPointer()); + vkUninitializePerformanceApiINTEL = (VkUninitializePerformanceApiINTEL) + getProc.Invoke(device, "vkUninitializePerformanceApiINTEL"u8.AsPointer()); + vkCmdSetPerformanceMarkerINTEL = (VkCmdSetPerformanceMarkerINTEL) + getProc.Invoke(device, "vkCmdSetPerformanceMarkerINTEL"u8.AsPointer()); + vkCmdSetPerformanceStreamMarkerINTEL = (VkCmdSetPerformanceStreamMarkerINTEL) + getProc.Invoke(device, "vkCmdSetPerformanceStreamMarkerINTEL"u8.AsPointer()); + vkCmdSetPerformanceOverrideINTEL = (VkCmdSetPerformanceOverrideINTEL) + getProc.Invoke(device, "vkCmdSetPerformanceOverrideINTEL"u8.AsPointer()); + vkAcquirePerformanceConfigurationINTEL = (VkAcquirePerformanceConfigurationINTEL) + getProc.Invoke(device, "vkAcquirePerformanceConfigurationINTEL"u8.AsPointer()); + vkReleasePerformanceConfigurationINTEL = (VkReleasePerformanceConfigurationINTEL) + getProc.Invoke(device, "vkReleasePerformanceConfigurationINTEL"u8.AsPointer()); + vkQueueSetPerformanceConfigurationINTEL = (VkQueueSetPerformanceConfigurationINTEL) + getProc.Invoke(device, "vkQueueSetPerformanceConfigurationINTEL"u8.AsPointer()); + vkGetPerformanceParameterINTEL = (VkGetPerformanceParameterINTEL) + getProc.Invoke(device, "vkGetPerformanceParameterINTEL"u8.AsPointer()); + vkSetLocalDimmingAMD = (VkSetLocalDimmingAMD) + getProc.Invoke(device, "vkSetLocalDimmingAMD"u8.AsPointer()); + vkGetBufferDeviceAddressEXT = (VkGetBufferDeviceAddressEXT) + getProc.Invoke(device, "vkGetBufferDeviceAddressEXT"u8.AsPointer()); + vkCmdSetLineStippleEXT = (VkCmdSetLineStippleEXT) + getProc.Invoke(device, "vkCmdSetLineStippleEXT"u8.AsPointer()); + vkResetQueryPoolEXT = (VkResetQueryPoolEXT)getProc.Invoke(device, "vkResetQueryPoolEXT"u8.AsPointer()); + vkCmdSetCullModeEXT = (VkCmdSetCullModeEXT)getProc.Invoke(device, "vkCmdSetCullModeEXT"u8.AsPointer()); + vkCmdSetFrontFaceEXT = (VkCmdSetFrontFaceEXT) + getProc.Invoke(device, "vkCmdSetFrontFaceEXT"u8.AsPointer()); + vkCmdSetPrimitiveTopologyEXT = (VkCmdSetPrimitiveTopologyEXT) + getProc.Invoke(device, "vkCmdSetPrimitiveTopologyEXT"u8.AsPointer()); + vkCmdSetViewportWithCountEXT = (VkCmdSetViewportWithCountEXT) + getProc.Invoke(device, "vkCmdSetViewportWithCountEXT"u8.AsPointer()); + vkCmdSetScissorWithCountEXT = (VkCmdSetScissorWithCountEXT) + getProc.Invoke(device, "vkCmdSetScissorWithCountEXT"u8.AsPointer()); + vkCmdBindVertexBuffers2EXT = (VkCmdBindVertexBuffers2EXT) + getProc.Invoke(device, "vkCmdBindVertexBuffers2EXT"u8.AsPointer()); + vkCmdSetDepthTestEnableEXT = (VkCmdSetDepthTestEnableEXT) + getProc.Invoke(device, "vkCmdSetDepthTestEnableEXT"u8.AsPointer()); + vkCmdSetDepthWriteEnableEXT = (VkCmdSetDepthWriteEnableEXT) + getProc.Invoke(device, "vkCmdSetDepthWriteEnableEXT"u8.AsPointer()); + vkCmdSetDepthCompareOpEXT = (VkCmdSetDepthCompareOpEXT) + getProc.Invoke(device, "vkCmdSetDepthCompareOpEXT"u8.AsPointer()); + vkCmdSetDepthBoundsTestEnableEXT = (VkCmdSetDepthBoundsTestEnableEXT) + getProc.Invoke(device, "vkCmdSetDepthBoundsTestEnableEXT"u8.AsPointer()); + vkCmdSetStencilTestEnableEXT = (VkCmdSetStencilTestEnableEXT) + getProc.Invoke(device, "vkCmdSetStencilTestEnableEXT"u8.AsPointer()); + vkCmdSetStencilOpEXT = (VkCmdSetStencilOpEXT) + getProc.Invoke(device, "vkCmdSetStencilOpEXT"u8.AsPointer()); + vkCopyMemoryToImageEXT = (VkCopyMemoryToImageEXT) + getProc.Invoke(device, "vkCopyMemoryToImageEXT"u8.AsPointer()); + vkCopyImageToMemoryEXT = (VkCopyImageToMemoryEXT) + getProc.Invoke(device, "vkCopyImageToMemoryEXT"u8.AsPointer()); + vkCopyImageToImageEXT = (VkCopyImageToImageEXT) + getProc.Invoke(device, "vkCopyImageToImageEXT"u8.AsPointer()); + vkTransitionImageLayoutEXT = (VkTransitionImageLayoutEXT) + getProc.Invoke(device, "vkTransitionImageLayoutEXT"u8.AsPointer()); + vkGetImageSubresourceLayout2EXT = (VkGetImageSubresourceLayout2EXT) + getProc.Invoke(device, "vkGetImageSubresourceLayout2EXT"u8.AsPointer()); + vkReleaseSwapchainImagesEXT = (VkReleaseSwapchainImagesEXT) + getProc.Invoke(device, "vkReleaseSwapchainImagesEXT"u8.AsPointer()); + vkGetGeneratedCommandsMemoryRequirementsNV = (VkGetGeneratedCommandsMemoryRequirementsNV) + getProc.Invoke(device, "vkGetGeneratedCommandsMemoryRequirementsNV"u8.AsPointer()); + vkCmdPreprocessGeneratedCommandsNV = (VkCmdPreprocessGeneratedCommandsNV) + getProc.Invoke(device, "vkCmdPreprocessGeneratedCommandsNV"u8.AsPointer()); + vkCmdExecuteGeneratedCommandsNV = (VkCmdExecuteGeneratedCommandsNV) + getProc.Invoke(device, "vkCmdExecuteGeneratedCommandsNV"u8.AsPointer()); + vkCmdBindPipelineShaderGroupNV = (VkCmdBindPipelineShaderGroupNV) + getProc.Invoke(device, "vkCmdBindPipelineShaderGroupNV"u8.AsPointer()); + vkCreateIndirectCommandsLayoutNV = (VkCreateIndirectCommandsLayoutNV) + getProc.Invoke(device, "vkCreateIndirectCommandsLayoutNV"u8.AsPointer()); + vkDestroyIndirectCommandsLayoutNV = (VkDestroyIndirectCommandsLayoutNV) + getProc.Invoke(device, "vkDestroyIndirectCommandsLayoutNV"u8.AsPointer()); + vkCmdSetDepthBias2EXT = (VkCmdSetDepthBias2EXT) + getProc.Invoke(device, "vkCmdSetDepthBias2EXT"u8.AsPointer()); + vkCreatePrivateDataSlotEXT = (VkCreatePrivateDataSlotEXT) + getProc.Invoke(device, "vkCreatePrivateDataSlotEXT"u8.AsPointer()); + vkDestroyPrivateDataSlotEXT = (VkDestroyPrivateDataSlotEXT) + getProc.Invoke(device, "vkDestroyPrivateDataSlotEXT"u8.AsPointer()); + vkSetPrivateDataEXT = (VkSetPrivateDataEXT)getProc.Invoke(device, "vkSetPrivateDataEXT"u8.AsPointer()); + vkGetPrivateDataEXT = (VkGetPrivateDataEXT)getProc.Invoke(device, "vkGetPrivateDataEXT"u8.AsPointer()); + vkQueueSetPerfHintQCOM = (VkQueueSetPerfHintQCOM) + getProc.Invoke(device, "vkQueueSetPerfHintQCOM"u8.AsPointer()); + vkCmdDispatchTileQCOM = (VkCmdDispatchTileQCOM) + getProc.Invoke(device, "vkCmdDispatchTileQCOM"u8.AsPointer()); + vkCmdBeginPerTileExecutionQCOM = (VkCmdBeginPerTileExecutionQCOM) + getProc.Invoke(device, "vkCmdBeginPerTileExecutionQCOM"u8.AsPointer()); + vkCmdEndPerTileExecutionQCOM = (VkCmdEndPerTileExecutionQCOM) + getProc.Invoke(device, "vkCmdEndPerTileExecutionQCOM"u8.AsPointer()); + vkSetLatencySleepModeLegacyNV = (VkSetLatencySleepModeLegacyNV) + getProc.Invoke(device, "vkSetLatencySleepModeLegacyNV"u8.AsPointer()); + vkLatencySleepLegacyNV = (VkLatencySleepLegacyNV) + getProc.Invoke(device, "vkLatencySleepLegacyNV"u8.AsPointer()); + vkSetLatencyMarkerLegacyNV = (VkSetLatencyMarkerLegacyNV) + getProc.Invoke(device, "vkSetLatencyMarkerLegacyNV"u8.AsPointer()); + vkGetLatencyTimingsLegacyNV = (VkGetLatencyTimingsLegacyNV) + getProc.Invoke(device, "vkGetLatencyTimingsLegacyNV"u8.AsPointer()); + vkQueueNotifyOutOfBandLegacyNV = (VkQueueNotifyOutOfBandLegacyNV) + getProc.Invoke(device, "vkQueueNotifyOutOfBandLegacyNV"u8.AsPointer()); + vkGetSleepStatusLegacyNV = (VkGetSleepStatusLegacyNV) + getProc.Invoke(device, "vkGetSleepStatusLegacyNV"u8.AsPointer()); + vkShutdownLatencyDeviceLegacyNV = (VkShutdownLatencyDeviceLegacyNV) + getProc.Invoke(device, "vkShutdownLatencyDeviceLegacyNV"u8.AsPointer()); + vkGetDescriptorSetLayoutSizeEXT = (VkGetDescriptorSetLayoutSizeEXT) + getProc.Invoke(device, "vkGetDescriptorSetLayoutSizeEXT"u8.AsPointer()); + vkGetDescriptorSetLayoutBindingOffsetEXT = (VkGetDescriptorSetLayoutBindingOffsetEXT) + getProc.Invoke(device, "vkGetDescriptorSetLayoutBindingOffsetEXT"u8.AsPointer()); + vkGetDescriptorEXT = (VkGetDescriptorEXT)getProc.Invoke(device, "vkGetDescriptorEXT"u8.AsPointer()); + vkCmdBindDescriptorBuffersEXT = (VkCmdBindDescriptorBuffersEXT) + getProc.Invoke(device, "vkCmdBindDescriptorBuffersEXT"u8.AsPointer()); + vkCmdSetDescriptorBufferOffsetsEXT = (VkCmdSetDescriptorBufferOffsetsEXT) + getProc.Invoke(device, "vkCmdSetDescriptorBufferOffsetsEXT"u8.AsPointer()); + vkCmdBindDescriptorBufferEmbeddedSamplersEXT = (VkCmdBindDescriptorBufferEmbeddedSamplersEXT) + getProc.Invoke(device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT"u8.AsPointer()); + vkGetBufferOpaqueCaptureDescriptorDataEXT = (VkGetBufferOpaqueCaptureDescriptorDataEXT) + getProc.Invoke(device, "vkGetBufferOpaqueCaptureDescriptorDataEXT"u8.AsPointer()); + vkGetImageOpaqueCaptureDescriptorDataEXT = (VkGetImageOpaqueCaptureDescriptorDataEXT) + getProc.Invoke(device, "vkGetImageOpaqueCaptureDescriptorDataEXT"u8.AsPointer()); + vkGetImageViewOpaqueCaptureDescriptorDataEXT = (VkGetImageViewOpaqueCaptureDescriptorDataEXT) + getProc.Invoke(device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT"u8.AsPointer()); + vkGetSamplerOpaqueCaptureDescriptorDataEXT = (VkGetSamplerOpaqueCaptureDescriptorDataEXT) + getProc.Invoke(device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT"u8.AsPointer()); + vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = + (VkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT) + getProc.Invoke( + device, + "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT"u8.AsPointer() + ); + vkCmdSetFragmentShadingRateEnumNV = (VkCmdSetFragmentShadingRateEnumNV) + getProc.Invoke(device, "vkCmdSetFragmentShadingRateEnumNV"u8.AsPointer()); + vkGetDeviceFaultInfoEXT = (VkGetDeviceFaultInfoEXT) + getProc.Invoke(device, "vkGetDeviceFaultInfoEXT"u8.AsPointer()); + vkCmdSetVertexInputEXT = (VkCmdSetVertexInputEXT) + getProc.Invoke(device, "vkCmdSetVertexInputEXT"u8.AsPointer()); + vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (VkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI) + getProc.Invoke(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI"u8.AsPointer()); + vkCmdSubpassShadingHUAWEI = (VkCmdSubpassShadingHUAWEI) + getProc.Invoke(device, "vkCmdSubpassShadingHUAWEI"u8.AsPointer()); + vkCmdBindInvocationMaskHUAWEI = (VkCmdBindInvocationMaskHUAWEI) + getProc.Invoke(device, "vkCmdBindInvocationMaskHUAWEI"u8.AsPointer()); + vkGetMemoryRemoteAddressNV = (VkGetMemoryRemoteAddressNV) + getProc.Invoke(device, "vkGetMemoryRemoteAddressNV"u8.AsPointer()); + vkGetPipelinePropertiesEXT = (VkGetPipelinePropertiesEXT) + getProc.Invoke(device, "vkGetPipelinePropertiesEXT"u8.AsPointer()); + vkCmdSetPatchControlPointsEXT = (VkCmdSetPatchControlPointsEXT) + getProc.Invoke(device, "vkCmdSetPatchControlPointsEXT"u8.AsPointer()); + vkCmdSetRasterizerDiscardEnableEXT = (VkCmdSetRasterizerDiscardEnableEXT) + getProc.Invoke(device, "vkCmdSetRasterizerDiscardEnableEXT"u8.AsPointer()); + vkCmdSetDepthBiasEnableEXT = (VkCmdSetDepthBiasEnableEXT) + getProc.Invoke(device, "vkCmdSetDepthBiasEnableEXT"u8.AsPointer()); + vkCmdSetLogicOpEXT = (VkCmdSetLogicOpEXT)getProc.Invoke(device, "vkCmdSetLogicOpEXT"u8.AsPointer()); + vkCmdSetPrimitiveRestartEnableEXT = (VkCmdSetPrimitiveRestartEnableEXT) + getProc.Invoke(device, "vkCmdSetPrimitiveRestartEnableEXT"u8.AsPointer()); + vkCmdSetColorWriteEnableEXT = (VkCmdSetColorWriteEnableEXT) + getProc.Invoke(device, "vkCmdSetColorWriteEnableEXT"u8.AsPointer()); + vkCmdDrawMultiEXT = (VkCmdDrawMultiEXT)getProc.Invoke(device, "vkCmdDrawMultiEXT"u8.AsPointer()); + vkCmdDrawMultiIndexedEXT = (VkCmdDrawMultiIndexedEXT) + getProc.Invoke(device, "vkCmdDrawMultiIndexedEXT"u8.AsPointer()); + vkCreateMicromapEXT = (VkCreateMicromapEXT)getProc.Invoke(device, "vkCreateMicromapEXT"u8.AsPointer()); + vkDestroyMicromapEXT = (VkDestroyMicromapEXT) + getProc.Invoke(device, "vkDestroyMicromapEXT"u8.AsPointer()); + vkCmdBuildMicromapsEXT = (VkCmdBuildMicromapsEXT) + getProc.Invoke(device, "vkCmdBuildMicromapsEXT"u8.AsPointer()); + vkBuildMicromapsEXT = (VkBuildMicromapsEXT)getProc.Invoke(device, "vkBuildMicromapsEXT"u8.AsPointer()); + vkCopyMicromapEXT = (VkCopyMicromapEXT)getProc.Invoke(device, "vkCopyMicromapEXT"u8.AsPointer()); + vkCopyMicromapToMemoryEXT = (VkCopyMicromapToMemoryEXT) + getProc.Invoke(device, "vkCopyMicromapToMemoryEXT"u8.AsPointer()); + vkCopyMemoryToMicromapEXT = (VkCopyMemoryToMicromapEXT) + getProc.Invoke(device, "vkCopyMemoryToMicromapEXT"u8.AsPointer()); + vkWriteMicromapsPropertiesEXT = (VkWriteMicromapsPropertiesEXT) + getProc.Invoke(device, "vkWriteMicromapsPropertiesEXT"u8.AsPointer()); + vkCmdCopyMicromapEXT = (VkCmdCopyMicromapEXT) + getProc.Invoke(device, "vkCmdCopyMicromapEXT"u8.AsPointer()); + vkCmdCopyMicromapToMemoryEXT = (VkCmdCopyMicromapToMemoryEXT) + getProc.Invoke(device, "vkCmdCopyMicromapToMemoryEXT"u8.AsPointer()); + vkCmdCopyMemoryToMicromapEXT = (VkCmdCopyMemoryToMicromapEXT) + getProc.Invoke(device, "vkCmdCopyMemoryToMicromapEXT"u8.AsPointer()); + vkCmdWriteMicromapsPropertiesEXT = (VkCmdWriteMicromapsPropertiesEXT) + getProc.Invoke(device, "vkCmdWriteMicromapsPropertiesEXT"u8.AsPointer()); + vkGetDeviceMicromapCompatibilityEXT = (VkGetDeviceMicromapCompatibilityEXT) + getProc.Invoke(device, "vkGetDeviceMicromapCompatibilityEXT"u8.AsPointer()); + vkGetMicromapBuildSizesEXT = (VkGetMicromapBuildSizesEXT) + getProc.Invoke(device, "vkGetMicromapBuildSizesEXT"u8.AsPointer()); + vkCmdDrawClusterHUAWEI = (VkCmdDrawClusterHUAWEI) + getProc.Invoke(device, "vkCmdDrawClusterHUAWEI"u8.AsPointer()); + vkCmdDrawClusterIndirectHUAWEI = (VkCmdDrawClusterIndirectHUAWEI) + getProc.Invoke(device, "vkCmdDrawClusterIndirectHUAWEI"u8.AsPointer()); + vkSetDeviceMemoryPriorityEXT = (VkSetDeviceMemoryPriorityEXT) + getProc.Invoke(device, "vkSetDeviceMemoryPriorityEXT"u8.AsPointer()); + vkCmdSetDispatchParametersARM = (VkCmdSetDispatchParametersARM) + getProc.Invoke(device, "vkCmdSetDispatchParametersARM"u8.AsPointer()); + vkGetDescriptorSetLayoutHostMappingInfoVALVE = (VkGetDescriptorSetLayoutHostMappingInfoVALVE) + getProc.Invoke(device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE"u8.AsPointer()); + vkGetDescriptorSetHostMappingVALVE = (VkGetDescriptorSetHostMappingVALVE) + getProc.Invoke(device, "vkGetDescriptorSetHostMappingVALVE"u8.AsPointer()); + vkCmdCopyMemoryIndirectNV = (VkCmdCopyMemoryIndirectNV) + getProc.Invoke(device, "vkCmdCopyMemoryIndirectNV"u8.AsPointer()); + vkCmdCopyMemoryToImageIndirectNV = (VkCmdCopyMemoryToImageIndirectNV) + getProc.Invoke(device, "vkCmdCopyMemoryToImageIndirectNV"u8.AsPointer()); + vkCmdDecompressMemoryNV = (VkCmdDecompressMemoryNV) + getProc.Invoke(device, "vkCmdDecompressMemoryNV"u8.AsPointer()); + vkCmdDecompressMemoryIndirectCountNV = (VkCmdDecompressMemoryIndirectCountNV) + getProc.Invoke(device, "vkCmdDecompressMemoryIndirectCountNV"u8.AsPointer()); + vkGetPipelineIndirectMemoryRequirementsNV = (VkGetPipelineIndirectMemoryRequirementsNV) + getProc.Invoke(device, "vkGetPipelineIndirectMemoryRequirementsNV"u8.AsPointer()); + vkCmdUpdatePipelineIndirectBufferNV = (VkCmdUpdatePipelineIndirectBufferNV) + getProc.Invoke(device, "vkCmdUpdatePipelineIndirectBufferNV"u8.AsPointer()); + vkGetPipelineIndirectDeviceAddressNV = (VkGetPipelineIndirectDeviceAddressNV) + getProc.Invoke(device, "vkGetPipelineIndirectDeviceAddressNV"u8.AsPointer()); + vkCmdSetDepthClampEnableEXT = (VkCmdSetDepthClampEnableEXT) + getProc.Invoke(device, "vkCmdSetDepthClampEnableEXT"u8.AsPointer()); + vkCmdSetPolygonModeEXT = (VkCmdSetPolygonModeEXT) + getProc.Invoke(device, "vkCmdSetPolygonModeEXT"u8.AsPointer()); + vkCmdSetRasterizationSamplesEXT = (VkCmdSetRasterizationSamplesEXT) + getProc.Invoke(device, "vkCmdSetRasterizationSamplesEXT"u8.AsPointer()); + vkCmdSetSampleMaskEXT = (VkCmdSetSampleMaskEXT) + getProc.Invoke(device, "vkCmdSetSampleMaskEXT"u8.AsPointer()); + vkCmdSetAlphaToCoverageEnableEXT = (VkCmdSetAlphaToCoverageEnableEXT) + getProc.Invoke(device, "vkCmdSetAlphaToCoverageEnableEXT"u8.AsPointer()); + vkCmdSetAlphaToOneEnableEXT = (VkCmdSetAlphaToOneEnableEXT) + getProc.Invoke(device, "vkCmdSetAlphaToOneEnableEXT"u8.AsPointer()); + vkCmdSetLogicOpEnableEXT = (VkCmdSetLogicOpEnableEXT) + getProc.Invoke(device, "vkCmdSetLogicOpEnableEXT"u8.AsPointer()); + vkCmdSetColorBlendEnableEXT = (VkCmdSetColorBlendEnableEXT) + getProc.Invoke(device, "vkCmdSetColorBlendEnableEXT"u8.AsPointer()); + vkCmdSetColorBlendEquationEXT = (VkCmdSetColorBlendEquationEXT) + getProc.Invoke(device, "vkCmdSetColorBlendEquationEXT"u8.AsPointer()); + vkCmdSetColorWriteMaskEXT = (VkCmdSetColorWriteMaskEXT) + getProc.Invoke(device, "vkCmdSetColorWriteMaskEXT"u8.AsPointer()); + vkCmdSetTessellationDomainOriginEXT = (VkCmdSetTessellationDomainOriginEXT) + getProc.Invoke(device, "vkCmdSetTessellationDomainOriginEXT"u8.AsPointer()); + vkCmdSetRasterizationStreamEXT = (VkCmdSetRasterizationStreamEXT) + getProc.Invoke(device, "vkCmdSetRasterizationStreamEXT"u8.AsPointer()); + vkCmdSetConservativeRasterizationModeEXT = (VkCmdSetConservativeRasterizationModeEXT) + getProc.Invoke(device, "vkCmdSetConservativeRasterizationModeEXT"u8.AsPointer()); + vkCmdSetExtraPrimitiveOverestimationSizeEXT = (VkCmdSetExtraPrimitiveOverestimationSizeEXT) + getProc.Invoke(device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT"u8.AsPointer()); + vkCmdSetDepthClipEnableEXT = (VkCmdSetDepthClipEnableEXT) + getProc.Invoke(device, "vkCmdSetDepthClipEnableEXT"u8.AsPointer()); + vkCmdSetSampleLocationsEnableEXT = (VkCmdSetSampleLocationsEnableEXT) + getProc.Invoke(device, "vkCmdSetSampleLocationsEnableEXT"u8.AsPointer()); + vkCmdSetColorBlendAdvancedEXT = (VkCmdSetColorBlendAdvancedEXT) + getProc.Invoke(device, "vkCmdSetColorBlendAdvancedEXT"u8.AsPointer()); + vkCmdSetProvokingVertexModeEXT = (VkCmdSetProvokingVertexModeEXT) + getProc.Invoke(device, "vkCmdSetProvokingVertexModeEXT"u8.AsPointer()); + vkCmdSetLineRasterizationModeEXT = (VkCmdSetLineRasterizationModeEXT) + getProc.Invoke(device, "vkCmdSetLineRasterizationModeEXT"u8.AsPointer()); + vkCmdSetLineStippleEnableEXT = (VkCmdSetLineStippleEnableEXT) + getProc.Invoke(device, "vkCmdSetLineStippleEnableEXT"u8.AsPointer()); + vkCmdSetDepthClipNegativeOneToOneEXT = (VkCmdSetDepthClipNegativeOneToOneEXT) + getProc.Invoke(device, "vkCmdSetDepthClipNegativeOneToOneEXT"u8.AsPointer()); + vkCmdSetViewportWScalingEnableNV = (VkCmdSetViewportWScalingEnableNV) + getProc.Invoke(device, "vkCmdSetViewportWScalingEnableNV"u8.AsPointer()); + vkCmdSetViewportSwizzleNV = (VkCmdSetViewportSwizzleNV) + getProc.Invoke(device, "vkCmdSetViewportSwizzleNV"u8.AsPointer()); + vkCmdSetCoverageToColorEnableNV = (VkCmdSetCoverageToColorEnableNV) + getProc.Invoke(device, "vkCmdSetCoverageToColorEnableNV"u8.AsPointer()); + vkCmdSetCoverageToColorLocationNV = (VkCmdSetCoverageToColorLocationNV) + getProc.Invoke(device, "vkCmdSetCoverageToColorLocationNV"u8.AsPointer()); + vkCmdSetCoverageModulationModeNV = (VkCmdSetCoverageModulationModeNV) + getProc.Invoke(device, "vkCmdSetCoverageModulationModeNV"u8.AsPointer()); + vkCmdSetCoverageModulationTableEnableNV = (VkCmdSetCoverageModulationTableEnableNV) + getProc.Invoke(device, "vkCmdSetCoverageModulationTableEnableNV"u8.AsPointer()); + vkCmdSetCoverageModulationTableNV = (VkCmdSetCoverageModulationTableNV) + getProc.Invoke(device, "vkCmdSetCoverageModulationTableNV"u8.AsPointer()); + vkCmdSetShadingRateImageEnableNV = (VkCmdSetShadingRateImageEnableNV) + getProc.Invoke(device, "vkCmdSetShadingRateImageEnableNV"u8.AsPointer()); + vkCmdSetRepresentativeFragmentTestEnableNV = (VkCmdSetRepresentativeFragmentTestEnableNV) + getProc.Invoke(device, "vkCmdSetRepresentativeFragmentTestEnableNV"u8.AsPointer()); + vkCmdSetCoverageReductionModeNV = (VkCmdSetCoverageReductionModeNV) + getProc.Invoke(device, "vkCmdSetCoverageReductionModeNV"u8.AsPointer()); + vkCreateTensorARM = (VkCreateTensorARM)getProc.Invoke(device, "vkCreateTensorARM"u8.AsPointer()); + vkDestroyTensorARM = (VkDestroyTensorARM)getProc.Invoke(device, "vkDestroyTensorARM"u8.AsPointer()); + vkCreateTensorViewARM = (VkCreateTensorViewARM) + getProc.Invoke(device, "vkCreateTensorViewARM"u8.AsPointer()); + vkDestroyTensorViewARM = (VkDestroyTensorViewARM) + getProc.Invoke(device, "vkDestroyTensorViewARM"u8.AsPointer()); + vkGetTensorMemoryRequirementsARM = (VkGetTensorMemoryRequirementsARM) + getProc.Invoke(device, "vkGetTensorMemoryRequirementsARM"u8.AsPointer()); + vkBindTensorMemoryARM = (VkBindTensorMemoryARM) + getProc.Invoke(device, "vkBindTensorMemoryARM"u8.AsPointer()); + vkGetDeviceTensorMemoryRequirementsARM = (VkGetDeviceTensorMemoryRequirementsARM) + getProc.Invoke(device, "vkGetDeviceTensorMemoryRequirementsARM"u8.AsPointer()); + vkCmdCopyTensorARM = (VkCmdCopyTensorARM)getProc.Invoke(device, "vkCmdCopyTensorARM"u8.AsPointer()); + vkGetTensorOpaqueCaptureDescriptorDataARM = (VkGetTensorOpaqueCaptureDescriptorDataARM) + getProc.Invoke(device, "vkGetTensorOpaqueCaptureDescriptorDataARM"u8.AsPointer()); + vkGetTensorViewOpaqueCaptureDescriptorDataARM = (VkGetTensorViewOpaqueCaptureDescriptorDataARM) + getProc.Invoke(device, "vkGetTensorViewOpaqueCaptureDescriptorDataARM"u8.AsPointer()); + vkGetShaderModuleIdentifierEXT = (VkGetShaderModuleIdentifierEXT) + getProc.Invoke(device, "vkGetShaderModuleIdentifierEXT"u8.AsPointer()); + vkGetShaderModuleCreateInfoIdentifierEXT = (VkGetShaderModuleCreateInfoIdentifierEXT) + getProc.Invoke(device, "vkGetShaderModuleCreateInfoIdentifierEXT"u8.AsPointer()); + vkCreateOpticalFlowSessionNV = (VkCreateOpticalFlowSessionNV) + getProc.Invoke(device, "vkCreateOpticalFlowSessionNV"u8.AsPointer()); + vkDestroyOpticalFlowSessionNV = (VkDestroyOpticalFlowSessionNV) + getProc.Invoke(device, "vkDestroyOpticalFlowSessionNV"u8.AsPointer()); + vkBindOpticalFlowSessionImageNV = (VkBindOpticalFlowSessionImageNV) + getProc.Invoke(device, "vkBindOpticalFlowSessionImageNV"u8.AsPointer()); + vkCmdOpticalFlowExecuteNV = (VkCmdOpticalFlowExecuteNV) + getProc.Invoke(device, "vkCmdOpticalFlowExecuteNV"u8.AsPointer()); + vkAntiLagUpdateAMD = (VkAntiLagUpdateAMD)getProc.Invoke(device, "vkAntiLagUpdateAMD"u8.AsPointer()); + vkCreateShadersEXT = (VkCreateShadersEXT)getProc.Invoke(device, "vkCreateShadersEXT"u8.AsPointer()); + vkDestroyShaderEXT = (VkDestroyShaderEXT)getProc.Invoke(device, "vkDestroyShaderEXT"u8.AsPointer()); + vkGetShaderBinaryDataEXT = (VkGetShaderBinaryDataEXT) + getProc.Invoke(device, "vkGetShaderBinaryDataEXT"u8.AsPointer()); + vkCmdBindShadersEXT = (VkCmdBindShadersEXT)getProc.Invoke(device, "vkCmdBindShadersEXT"u8.AsPointer()); + vkCmdSetDepthClampRangeEXT = (VkCmdSetDepthClampRangeEXT) + getProc.Invoke(device, "vkCmdSetDepthClampRangeEXT"u8.AsPointer()); + vkGetFramebufferTilePropertiesQCOM = (VkGetFramebufferTilePropertiesQCOM) + getProc.Invoke(device, "vkGetFramebufferTilePropertiesQCOM"u8.AsPointer()); + vkGetDynamicRenderingTilePropertiesQCOM = (VkGetDynamicRenderingTilePropertiesQCOM) + getProc.Invoke(device, "vkGetDynamicRenderingTilePropertiesQCOM"u8.AsPointer()); + vkConvertCooperativeVectorMatrixNV = (VkConvertCooperativeVectorMatrixNV) + getProc.Invoke(device, "vkConvertCooperativeVectorMatrixNV"u8.AsPointer()); + vkCmdConvertCooperativeVectorMatrixNV = (VkCmdConvertCooperativeVectorMatrixNV) + getProc.Invoke(device, "vkCmdConvertCooperativeVectorMatrixNV"u8.AsPointer()); + vkSetLatencySleepModeNV = (VkSetLatencySleepModeNV) + getProc.Invoke(device, "vkSetLatencySleepModeNV"u8.AsPointer()); + vkLatencySleepNV = (VkLatencySleepNV)getProc.Invoke(device, "vkLatencySleepNV"u8.AsPointer()); + vkSetLatencyMarkerNV = (VkSetLatencyMarkerNV) + getProc.Invoke(device, "vkSetLatencyMarkerNV"u8.AsPointer()); + vkGetLatencyTimingsNV = (VkGetLatencyTimingsNV) + getProc.Invoke(device, "vkGetLatencyTimingsNV"u8.AsPointer()); + vkQueueNotifyOutOfBandNV = (VkQueueNotifyOutOfBandNV) + getProc.Invoke(device, "vkQueueNotifyOutOfBandNV"u8.AsPointer()); + vkCreateDataGraphPipelinesARM = (VkCreateDataGraphPipelinesARM) + getProc.Invoke(device, "vkCreateDataGraphPipelinesARM"u8.AsPointer()); + vkCreateDataGraphPipelineSessionARM = (VkCreateDataGraphPipelineSessionARM) + getProc.Invoke(device, "vkCreateDataGraphPipelineSessionARM"u8.AsPointer()); + vkGetDataGraphPipelineSessionBindPointRequirementsARM = + (VkGetDataGraphPipelineSessionBindPointRequirementsARM) + getProc.Invoke(device, "vkGetDataGraphPipelineSessionBindPointRequirementsARM"u8.AsPointer()); + vkGetDataGraphPipelineSessionMemoryRequirementsARM = + (VkGetDataGraphPipelineSessionMemoryRequirementsARM) + getProc.Invoke(device, "vkGetDataGraphPipelineSessionMemoryRequirementsARM"u8.AsPointer()); + vkBindDataGraphPipelineSessionMemoryARM = (VkBindDataGraphPipelineSessionMemoryARM) + getProc.Invoke(device, "vkBindDataGraphPipelineSessionMemoryARM"u8.AsPointer()); + vkDestroyDataGraphPipelineSessionARM = (VkDestroyDataGraphPipelineSessionARM) + getProc.Invoke(device, "vkDestroyDataGraphPipelineSessionARM"u8.AsPointer()); + vkCmdDispatchDataGraphARM = (VkCmdDispatchDataGraphARM) + getProc.Invoke(device, "vkCmdDispatchDataGraphARM"u8.AsPointer()); + vkGetDataGraphPipelineAvailablePropertiesARM = (VkGetDataGraphPipelineAvailablePropertiesARM) + getProc.Invoke(device, "vkGetDataGraphPipelineAvailablePropertiesARM"u8.AsPointer()); + vkGetDataGraphPipelinePropertiesARM = (VkGetDataGraphPipelinePropertiesARM) + getProc.Invoke(device, "vkGetDataGraphPipelinePropertiesARM"u8.AsPointer()); + vkCmdSetAttachmentFeedbackLoopEnableEXT = (VkCmdSetAttachmentFeedbackLoopEnableEXT) + getProc.Invoke(device, "vkCmdSetAttachmentFeedbackLoopEnableEXT"u8.AsPointer()); + vkCmdBindTileMemoryQCOM = (VkCmdBindTileMemoryQCOM) + getProc.Invoke(device, "vkCmdBindTileMemoryQCOM"u8.AsPointer()); + vkCmdDecompressMemoryEXT = (VkCmdDecompressMemoryEXT) + getProc.Invoke(device, "vkCmdDecompressMemoryEXT"u8.AsPointer()); + vkCmdDecompressMemoryIndirectCountEXT = (VkCmdDecompressMemoryIndirectCountEXT) + getProc.Invoke(device, "vkCmdDecompressMemoryIndirectCountEXT"u8.AsPointer()); + vkCreateExternalComputeQueueNV = (VkCreateExternalComputeQueueNV) + getProc.Invoke(device, "vkCreateExternalComputeQueueNV"u8.AsPointer()); + vkDestroyExternalComputeQueueNV = (VkDestroyExternalComputeQueueNV) + getProc.Invoke(device, "vkDestroyExternalComputeQueueNV"u8.AsPointer()); + vkGetExternalComputeQueueDataNV = (VkGetExternalComputeQueueDataNV) + getProc.Invoke(device, "vkGetExternalComputeQueueDataNV"u8.AsPointer()); + vkGetClusterAccelerationStructureBuildSizesNV = (VkGetClusterAccelerationStructureBuildSizesNV) + getProc.Invoke(device, "vkGetClusterAccelerationStructureBuildSizesNV"u8.AsPointer()); + vkCmdBuildClusterAccelerationStructureIndirectNV = (VkCmdBuildClusterAccelerationStructureIndirectNV) + getProc.Invoke(device, "vkCmdBuildClusterAccelerationStructureIndirectNV"u8.AsPointer()); + vkGetPartitionedAccelerationStructuresBuildSizesNV = + (VkGetPartitionedAccelerationStructuresBuildSizesNV) + getProc.Invoke(device, "vkGetPartitionedAccelerationStructuresBuildSizesNV"u8.AsPointer()); + vkCmdBuildPartitionedAccelerationStructuresNV = (VkCmdBuildPartitionedAccelerationStructuresNV) + getProc.Invoke(device, "vkCmdBuildPartitionedAccelerationStructuresNV"u8.AsPointer()); + vkGetGeneratedCommandsMemoryRequirementsEXT = (VkGetGeneratedCommandsMemoryRequirementsEXT) + getProc.Invoke(device, "vkGetGeneratedCommandsMemoryRequirementsEXT"u8.AsPointer()); + vkCmdPreprocessGeneratedCommandsEXT = (VkCmdPreprocessGeneratedCommandsEXT) + getProc.Invoke(device, "vkCmdPreprocessGeneratedCommandsEXT"u8.AsPointer()); + vkCmdExecuteGeneratedCommandsEXT = (VkCmdExecuteGeneratedCommandsEXT) + getProc.Invoke(device, "vkCmdExecuteGeneratedCommandsEXT"u8.AsPointer()); + vkCreateIndirectCommandsLayoutEXT = (VkCreateIndirectCommandsLayoutEXT) + getProc.Invoke(device, "vkCreateIndirectCommandsLayoutEXT"u8.AsPointer()); + vkDestroyIndirectCommandsLayoutEXT = (VkDestroyIndirectCommandsLayoutEXT) + getProc.Invoke(device, "vkDestroyIndirectCommandsLayoutEXT"u8.AsPointer()); + vkCreateIndirectExecutionSetEXT = (VkCreateIndirectExecutionSetEXT) + getProc.Invoke(device, "vkCreateIndirectExecutionSetEXT"u8.AsPointer()); + vkDestroyIndirectExecutionSetEXT = (VkDestroyIndirectExecutionSetEXT) + getProc.Invoke(device, "vkDestroyIndirectExecutionSetEXT"u8.AsPointer()); + vkUpdateIndirectExecutionSetPipelineEXT = (VkUpdateIndirectExecutionSetPipelineEXT) + getProc.Invoke(device, "vkUpdateIndirectExecutionSetPipelineEXT"u8.AsPointer()); + vkUpdateIndirectExecutionSetShaderEXT = (VkUpdateIndirectExecutionSetShaderEXT) + getProc.Invoke(device, "vkUpdateIndirectExecutionSetShaderEXT"u8.AsPointer()); + vkCreateShaderInstrumentationARM = (VkCreateShaderInstrumentationARM) + getProc.Invoke(device, "vkCreateShaderInstrumentationARM"u8.AsPointer()); + vkDestroyShaderInstrumentationARM = (VkDestroyShaderInstrumentationARM) + getProc.Invoke(device, "vkDestroyShaderInstrumentationARM"u8.AsPointer()); + vkCmdBeginShaderInstrumentationARM = (VkCmdBeginShaderInstrumentationARM) + getProc.Invoke(device, "vkCmdBeginShaderInstrumentationARM"u8.AsPointer()); + vkCmdEndShaderInstrumentationARM = (VkCmdEndShaderInstrumentationARM) + getProc.Invoke(device, "vkCmdEndShaderInstrumentationARM"u8.AsPointer()); + vkGetShaderInstrumentationValuesARM = (VkGetShaderInstrumentationValuesARM) + getProc.Invoke(device, "vkGetShaderInstrumentationValuesARM"u8.AsPointer()); + vkClearShaderInstrumentationMetricsARM = (VkClearShaderInstrumentationMetricsARM) + getProc.Invoke(device, "vkClearShaderInstrumentationMetricsARM"u8.AsPointer()); + vkCmdEndRendering2EXT = (VkCmdEndRendering2EXT) + getProc.Invoke(device, "vkCmdEndRendering2EXT"u8.AsPointer()); + vkCmdBeginCustomResolveEXT = (VkCmdBeginCustomResolveEXT) + getProc.Invoke(device, "vkCmdBeginCustomResolveEXT"u8.AsPointer()); + vkCmdSetComputeOccupancyPriorityNV = (VkCmdSetComputeOccupancyPriorityNV) + getProc.Invoke(device, "vkCmdSetComputeOccupancyPriorityNV"u8.AsPointer()); + vkCmdSetPrimitiveRestartIndexEXT = (VkCmdSetPrimitiveRestartIndexEXT) + getProc.Invoke(device, "vkCmdSetPrimitiveRestartIndexEXT"u8.AsPointer()); + vkCreateAccelerationStructureKHR = (VkCreateAccelerationStructureKHR) + getProc.Invoke(device, "vkCreateAccelerationStructureKHR"u8.AsPointer()); + vkDestroyAccelerationStructureKHR = (VkDestroyAccelerationStructureKHR) + getProc.Invoke(device, "vkDestroyAccelerationStructureKHR"u8.AsPointer()); + vkCmdBuildAccelerationStructuresKHR = (VkCmdBuildAccelerationStructuresKHR) + getProc.Invoke(device, "vkCmdBuildAccelerationStructuresKHR"u8.AsPointer()); + vkCmdBuildAccelerationStructuresIndirectKHR = (VkCmdBuildAccelerationStructuresIndirectKHR) + getProc.Invoke(device, "vkCmdBuildAccelerationStructuresIndirectKHR"u8.AsPointer()); + vkBuildAccelerationStructuresKHR = (VkBuildAccelerationStructuresKHR) + getProc.Invoke(device, "vkBuildAccelerationStructuresKHR"u8.AsPointer()); + vkCopyAccelerationStructureKHR = (VkCopyAccelerationStructureKHR) + getProc.Invoke(device, "vkCopyAccelerationStructureKHR"u8.AsPointer()); + vkCopyAccelerationStructureToMemoryKHR = (VkCopyAccelerationStructureToMemoryKHR) + getProc.Invoke(device, "vkCopyAccelerationStructureToMemoryKHR"u8.AsPointer()); + vkCopyMemoryToAccelerationStructureKHR = (VkCopyMemoryToAccelerationStructureKHR) + getProc.Invoke(device, "vkCopyMemoryToAccelerationStructureKHR"u8.AsPointer()); + vkWriteAccelerationStructuresPropertiesKHR = (VkWriteAccelerationStructuresPropertiesKHR) + getProc.Invoke(device, "vkWriteAccelerationStructuresPropertiesKHR"u8.AsPointer()); + vkCmdCopyAccelerationStructureKHR = (VkCmdCopyAccelerationStructureKHR) + getProc.Invoke(device, "vkCmdCopyAccelerationStructureKHR"u8.AsPointer()); + vkCmdCopyAccelerationStructureToMemoryKHR = (VkCmdCopyAccelerationStructureToMemoryKHR) + getProc.Invoke(device, "vkCmdCopyAccelerationStructureToMemoryKHR"u8.AsPointer()); + vkCmdCopyMemoryToAccelerationStructureKHR = (VkCmdCopyMemoryToAccelerationStructureKHR) + getProc.Invoke(device, "vkCmdCopyMemoryToAccelerationStructureKHR"u8.AsPointer()); + vkGetAccelerationStructureDeviceAddressKHR = (VkGetAccelerationStructureDeviceAddressKHR) + getProc.Invoke(device, "vkGetAccelerationStructureDeviceAddressKHR"u8.AsPointer()); + vkCmdWriteAccelerationStructuresPropertiesKHR = (VkCmdWriteAccelerationStructuresPropertiesKHR) + getProc.Invoke(device, "vkCmdWriteAccelerationStructuresPropertiesKHR"u8.AsPointer()); + vkGetDeviceAccelerationStructureCompatibilityKHR = (VkGetDeviceAccelerationStructureCompatibilityKHR) + getProc.Invoke(device, "vkGetDeviceAccelerationStructureCompatibilityKHR"u8.AsPointer()); + vkGetAccelerationStructureBuildSizesKHR = (VkGetAccelerationStructureBuildSizesKHR) + getProc.Invoke(device, "vkGetAccelerationStructureBuildSizesKHR"u8.AsPointer()); + vkCmdTraceRaysKHR = (VkCmdTraceRaysKHR)getProc.Invoke(device, "vkCmdTraceRaysKHR"u8.AsPointer()); + vkCreateRayTracingPipelinesKHR = (VkCreateRayTracingPipelinesKHR) + getProc.Invoke(device, "vkCreateRayTracingPipelinesKHR"u8.AsPointer()); + vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = (VkGetRayTracingCaptureReplayShaderGroupHandlesKHR) + getProc.Invoke(device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"u8.AsPointer()); + vkCmdTraceRaysIndirectKHR = (VkCmdTraceRaysIndirectKHR) + getProc.Invoke(device, "vkCmdTraceRaysIndirectKHR"u8.AsPointer()); + vkGetRayTracingShaderGroupStackSizeKHR = (VkGetRayTracingShaderGroupStackSizeKHR) + getProc.Invoke(device, "vkGetRayTracingShaderGroupStackSizeKHR"u8.AsPointer()); + vkCmdSetRayTracingPipelineStackSizeKHR = (VkCmdSetRayTracingPipelineStackSizeKHR) + getProc.Invoke(device, "vkCmdSetRayTracingPipelineStackSizeKHR"u8.AsPointer()); + vkCmdDrawMeshTasksEXT = (VkCmdDrawMeshTasksEXT) + getProc.Invoke(device, "vkCmdDrawMeshTasksEXT"u8.AsPointer()); + vkCmdDrawMeshTasksIndirectEXT = (VkCmdDrawMeshTasksIndirectEXT) + getProc.Invoke(device, "vkCmdDrawMeshTasksIndirectEXT"u8.AsPointer()); + vkCmdDrawMeshTasksIndirectCountEXT = (VkCmdDrawMeshTasksIndirectCountEXT) + getProc.Invoke(device, "vkCmdDrawMeshTasksIndirectCountEXT"u8.AsPointer()); + vkGetMemoryWin32HandleKHR = (VkGetMemoryWin32HandleKHR) + getProc.Invoke(device, "vkGetMemoryWin32HandleKHR"u8.AsPointer()); + vkGetMemoryWin32HandlePropertiesKHR = (VkGetMemoryWin32HandlePropertiesKHR) + getProc.Invoke(device, "vkGetMemoryWin32HandlePropertiesKHR"u8.AsPointer()); + vkImportSemaphoreWin32HandleKHR = (VkImportSemaphoreWin32HandleKHR) + getProc.Invoke(device, "vkImportSemaphoreWin32HandleKHR"u8.AsPointer()); + vkGetSemaphoreWin32HandleKHR = (VkGetSemaphoreWin32HandleKHR) + getProc.Invoke(device, "vkGetSemaphoreWin32HandleKHR"u8.AsPointer()); + vkImportFenceWin32HandleKHR = (VkImportFenceWin32HandleKHR) + getProc.Invoke(device, "vkImportFenceWin32HandleKHR"u8.AsPointer()); + vkGetFenceWin32HandleKHR = (VkGetFenceWin32HandleKHR) + getProc.Invoke(device, "vkGetFenceWin32HandleKHR"u8.AsPointer()); + vkGetMemoryWin32HandleNV = (VkGetMemoryWin32HandleNV) + getProc.Invoke(device, "vkGetMemoryWin32HandleNV"u8.AsPointer()); + vkAcquireFullScreenExclusiveModeEXT = (VkAcquireFullScreenExclusiveModeEXT) + getProc.Invoke(device, "vkAcquireFullScreenExclusiveModeEXT"u8.AsPointer()); + vkReleaseFullScreenExclusiveModeEXT = (VkReleaseFullScreenExclusiveModeEXT) + getProc.Invoke(device, "vkReleaseFullScreenExclusiveModeEXT"u8.AsPointer()); + vkGetDeviceGroupSurfacePresentModes2EXT = (VkGetDeviceGroupSurfacePresentModes2EXT) + getProc.Invoke(device, "vkGetDeviceGroupSurfacePresentModes2EXT"u8.AsPointer()); + vkExportMetalObjectsEXT = (VkExportMetalObjectsEXT) + getProc.Invoke(device, "vkExportMetalObjectsEXT"u8.AsPointer()); + vkGetMemoryMetalHandleEXT = (VkGetMemoryMetalHandleEXT) + getProc.Invoke(device, "vkGetMemoryMetalHandleEXT"u8.AsPointer()); + vkGetMemoryMetalHandlePropertiesEXT = (VkGetMemoryMetalHandlePropertiesEXT) + getProc.Invoke(device, "vkGetMemoryMetalHandlePropertiesEXT"u8.AsPointer()); + vkGetAndroidHardwareBufferPropertiesANDROID = (VkGetAndroidHardwareBufferPropertiesANDROID) + getProc.Invoke(device, "vkGetAndroidHardwareBufferPropertiesANDROID"u8.AsPointer()); + vkGetMemoryAndroidHardwareBufferANDROID = (VkGetMemoryAndroidHardwareBufferANDROID) + getProc.Invoke(device, "vkGetMemoryAndroidHardwareBufferANDROID"u8.AsPointer()); + vxDestroyImages = (VxDestroyImages)getProc.Invoke(device, "vxDestroyImages"u8.AsPointer()); + vxDestroyImageViews = (VxDestroyImageViews)getProc.Invoke(device, "vxDestroyImageViews"u8.AsPointer()); + vxDestroyBuffers = (VxDestroyBuffers)getProc.Invoke(device, "vxDestroyBuffers"u8.AsPointer()); + vxDestroyBufferViews = (VxDestroyBufferViews) + getProc.Invoke(device, "vxDestroyBufferViews"u8.AsPointer()); + } + } + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDeviceMemory.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDeviceMemory.gen.cs new file mode 100644 index 0000000..442d3eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDeviceMemory.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemory - Opaque handle to a device memory object + /// + /// + /// + /// A Vulkan device operates on data in device memory via memory objects that + /// are represented in the API by a VkDeviceMemory handle: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) + /// + /// + public readonly unsafe struct VkDeviceMemory : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DeviceMemory; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDeviceMemory(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDeviceMemory NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDisplayKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDisplayKHR.gen.cs new file mode 100644 index 0000000..17ccb94 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDisplayKHR.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayKHR - Opaque handle to a display object + /// + /// + /// + /// Displays are represented by VkDisplayKHR handles: + /// + /// + /// // Provided by VK_KHR_display + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) + /// + /// + public readonly unsafe struct VkDisplayKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DisplayKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDisplayKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDisplayKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkDisplayModeKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkDisplayModeKHR.gen.cs new file mode 100644 index 0000000..9360d61 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkDisplayModeKHR.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayModeKHR - Opaque handle to a display mode object + /// + /// + /// + /// Display modes are represented by VkDisplayModeKHR handles: + /// + /// + /// // Provided by VK_KHR_display + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) + /// + /// + public readonly unsafe struct VkDisplayModeKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.DisplayModeKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkDisplayModeKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkDisplayModeKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkEvent.gen.cs b/Brutal.Vulkan/Generated/Handles/VkEvent.gen.cs new file mode 100644 index 0000000..c67faf7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkEvent.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkEvent - Opaque handle to an event object + /// + /// + /// + /// Events are a synchronization primitive that can be used to insert a + /// fine-grained dependency between commands submitted to the same queue, or + /// between the host and a queue. + /// Events must not be used to insert a dependency between commands submitted + /// to different queues. + /// Events have two states - signaled and unsignaled. + /// An application can signal or unsignal an event either on the host or on the + /// device. + /// A device can be made to wait for an event to become signaled before + /// executing further operations. + /// No command exists to wait for an event to become signaled on the host, but + /// the current state of an event can be queried. + /// + /// + /// Events are represented by VkEvent handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) + /// + /// + public readonly unsafe struct VkEvent : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Event; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkEvent(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkEvent NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkExternalComputeQueueNV.gen.cs b/Brutal.Vulkan/Generated/Handles/VkExternalComputeQueueNV.gen.cs new file mode 100644 index 0000000..f1d1bc9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkExternalComputeQueueNV.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalComputeQueueNV - Opaque handle to an external compute queue + /// + /// + /// + /// External compute queues are used to join compatible external APIs to a + /// VkDevice, allowing workloads submitted through these external APIs to + /// be executed simultaneously to workloads submitted through Vulkan. + /// + /// + /// External compute queues are represented by VkExternalComputeQueueNV + /// handles: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// VK_DEFINE_HANDLE(VkExternalComputeQueueNV) + /// + /// + public readonly unsafe struct VkExternalComputeQueueNV : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.ExternalComputeQueueNV; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkExternalComputeQueueNV(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkExternalComputeQueueNV NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkFence.gen.cs b/Brutal.Vulkan/Generated/Handles/VkFence.gen.cs new file mode 100644 index 0000000..c88e139 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkFence.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFence - Opaque handle to a fence object + /// + /// + /// + /// Fences are a synchronization primitive that can be used to insert a + /// dependency from a queue to the host. + /// Fences have two states - signaled and unsignaled. + /// A fence can be signaled as part of the execution of a + /// queue submission^ command. + /// Fences can be unsignaled on the host with vkResetFences. + /// Fences can be waited on by the host with the vkWaitForFences command, + /// and the current state can be queried with vkGetFenceStatus. + /// + /// + /// Fences are represented by VkFence handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) + /// + /// + public readonly unsafe struct VkFence : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Fence; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkFence(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkFence NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkFramebuffer.gen.cs b/Brutal.Vulkan/Generated/Handles/VkFramebuffer.gen.cs new file mode 100644 index 0000000..803032b --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkFramebuffer.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFramebuffer - Opaque handle to a framebuffer object + /// + /// + /// + /// Render passes operate in conjunction with framebuffers. + /// Framebuffers represent a collection of specific memory attachments that a + /// render pass instance uses. + /// + /// + /// Framebuffers are represented by VkFramebuffer handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) + /// + /// + public readonly unsafe struct VkFramebuffer : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Framebuffer; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkFramebuffer(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkFramebuffer NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkGpaSessionAMD.gen.cs b/Brutal.Vulkan/Generated/Handles/VkGpaSessionAMD.gen.cs new file mode 100644 index 0000000..3d37001 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkGpaSessionAMD.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaSessionAMD - Opaque handle to a GPU Performance API object + /// + /// + /// + /// GPU Performance API (GPA) session objects hold the results of sampled + /// performance counters and are represented by VkGpaSessionAMD handles: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkGpaSessionAMD) + /// + /// + public readonly unsafe struct VkGpaSessionAMD : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.GpaSessionAMD; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkGpaSessionAMD(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkGpaSessionAMD NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkImage.gen.cs b/Brutal.Vulkan/Generated/Handles/VkImage.gen.cs new file mode 100644 index 0000000..5485db4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkImage.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImage - Opaque handle to an image object + /// + /// + /// + /// Images are specialized resources that have multi-dimensional access, as + /// outlined in the here chapter. + /// Images can be used for various purposes, such as rendering + /// attachments^, for copy operations^, or accessed through shaders + /// via resource descriptors^. + /// + /// + /// Images are represented by VkImage handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) + /// + /// + public readonly unsafe struct VkImage : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Image; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkImage(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkImage NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkImageView.gen.cs b/Brutal.Vulkan/Generated/Handles/VkImageView.gen.cs new file mode 100644 index 0000000..11f974a --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkImageView.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageView - Opaque handle to an image view object + /// + /// + /// + /// Image objects are not directly accessed by pipeline shaders for reading or + /// writing image data. + /// Instead, image views representing contiguous ranges of the image + /// subresources and containing additional metadata are used for that purpose. + /// Views must be created on images of compatible types, and must represent a + /// valid subset of image subresources. + /// + /// + /// Image views are represented by VkImageView handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) + /// + /// + public readonly unsafe struct VkImageView : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.ImageView; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkImageView(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkImageView NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutEXT.gen.cs new file mode 100644 index 0000000..3f0611b --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutEXT.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutEXT - Opaque handle to an indirect commands layout object + /// + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutEXT) + /// + /// + public readonly unsafe struct VkIndirectCommandsLayoutEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.IndirectCommandsLayoutEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkIndirectCommandsLayoutEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkIndirectCommandsLayoutEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutNV.gen.cs b/Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutNV.gen.cs new file mode 100644 index 0000000..bed90e1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkIndirectCommandsLayoutNV.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutNV - Opaque handle to an indirect commands layout object + /// + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV) + /// + /// + public readonly unsafe struct VkIndirectCommandsLayoutNV : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.IndirectCommandsLayoutNV; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkIndirectCommandsLayoutNV(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkIndirectCommandsLayoutNV NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkIndirectExecutionSetEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkIndirectExecutionSetEXT.gen.cs new file mode 100644 index 0000000..1b3f9b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkIndirectExecutionSetEXT.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetEXT - Opaque handle to an indirect execution set object + /// + /// + /// + /// Indirect Execution Sets contain sets of pipelines + /// which can be bound individually. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectExecutionSetEXT) + /// + /// + public readonly unsafe struct VkIndirectExecutionSetEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.IndirectExecutionSetEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkIndirectExecutionSetEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkIndirectExecutionSetEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkInstance.gen.cs b/Brutal.Vulkan/Generated/Handles/VkInstance.gen.cs new file mode 100644 index 0000000..e03909f --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkInstance.gen.cs @@ -0,0 +1,408 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkInstance - Opaque handle to an instance object + /// + /// + /// + /// There is no global state in Vulkan and all per-application state is stored + /// in a VkInstance object. + /// Creating a VkInstance object initializes the Vulkan library and allows + /// the application to pass information about itself to the implementation. + /// + /// + /// Instances are represented by VkInstance handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_HANDLE(VkInstance) + /// + /// + public readonly unsafe struct VkInstance : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Instance; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkInstance(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkInstance NullHandle = new(); + + public struct FunctionTable + { + public VkDestroyInstance vkDestroyInstance; + public VkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; + public VkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures; + public VkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties; + public VkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties; + public VkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; + public VkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties; + public VkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; + public VkGetInstanceProcAddr vkGetInstanceProcAddr; + public VkCreateDevice vkCreateDevice; + public VkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties; + public VkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties; + public VkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties; + public VkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups; + public VkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2; + public VkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2; + public VkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2; + public VkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2; + public VkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2; + public VkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2; + public VkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2; + public VkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties; + public VkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties; + public VkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties; + public VkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties; + public VkDestroySurfaceKHR vkDestroySurfaceKHR; + public VkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR; + public VkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR; + public VkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; + public VkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR; + public VkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR; + public VkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR; + public VkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR; + public VkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR; + public VkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR; + public VkCreateDisplayModeKHR vkCreateDisplayModeKHR; + public VkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR; + public VkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR; + public VkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR; + public VkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR; + public VkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR; + public VkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR; + public VkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR; + public VkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR; + public VkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR; + public VkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR; + public VkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR; + public VkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR; + public VkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR; + public VkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; + public VkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR; + public VkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR; + public VkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR; + public VkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR; + public VkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR; + public VkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR; + public VkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR; + public VkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR; + public VkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR; + public VkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR; + public VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR; + public VkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR; + public VkGetPhysicalDeviceCalibrateableTimeDomainsKHR vkGetPhysicalDeviceCalibrateableTimeDomainsKHR; + public VkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT; + public VkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT; + public VkDebugReportMessageEXT vkDebugReportMessageEXT; + public VkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV; + public VkReleaseDisplayEXT vkReleaseDisplayEXT; + public VkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT; + public VkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT; + public VkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT; + public VkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT; + public VkGetPhysicalDeviceDescriptorSizeEXT vkGetPhysicalDeviceDescriptorSizeEXT; + public VkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT; + public VkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; + public VkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT; + public VkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV; + public VkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV; + public VkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT; + public VkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT; + public VkGetDrmDisplayEXT vkGetDrmDisplayEXT; + public VkGetPhysicalDeviceExternalTensorPropertiesARM vkGetPhysicalDeviceExternalTensorPropertiesARM; + public VkGetPhysicalDeviceOpticalFlowImageFormatsNV vkGetPhysicalDeviceOpticalFlowImageFormatsNV; + public VkGetPhysicalDeviceCooperativeVectorPropertiesNV vkGetPhysicalDeviceCooperativeVectorPropertiesNV; + public VkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM; + public VkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM; + public VkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM; + public VkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; + public VkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM; + public VkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM; + public VkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM; + public VkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; + public VkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; + public VkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT; + public VkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV; + public VkGetWinrtDisplayNV vkGetWinrtDisplayNV; + public VkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; + public VkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; + public VkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT; + public VkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT; + public VkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; + public VkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; + public VkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; + public VkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; + public VkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT; + public VkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; + + public FunctionTable(VkInstance instance, VkGetInstanceProcAddr getProc) + { + vkGetInstanceProcAddr = getProc; + vkDestroyInstance = (VkDestroyInstance)getProc.Invoke(instance, "vkDestroyInstance"u8.AsPointer()); + vkEnumeratePhysicalDevices = (VkEnumeratePhysicalDevices) + getProc.Invoke(instance, "vkEnumeratePhysicalDevices"u8.AsPointer()); + vkGetPhysicalDeviceFeatures = (VkGetPhysicalDeviceFeatures) + getProc.Invoke(instance, "vkGetPhysicalDeviceFeatures"u8.AsPointer()); + vkGetPhysicalDeviceFormatProperties = (VkGetPhysicalDeviceFormatProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceFormatProperties"u8.AsPointer()); + vkGetPhysicalDeviceImageFormatProperties = (VkGetPhysicalDeviceImageFormatProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceImageFormatProperties"u8.AsPointer()); + vkGetPhysicalDeviceProperties = (VkGetPhysicalDeviceProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceProperties"u8.AsPointer()); + vkGetPhysicalDeviceQueueFamilyProperties = (VkGetPhysicalDeviceQueueFamilyProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceQueueFamilyProperties"u8.AsPointer()); + vkGetPhysicalDeviceMemoryProperties = (VkGetPhysicalDeviceMemoryProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceMemoryProperties"u8.AsPointer()); + vkCreateDevice = (VkCreateDevice)getProc.Invoke(instance, "vkCreateDevice"u8.AsPointer()); + vkEnumerateDeviceExtensionProperties = (VkEnumerateDeviceExtensionProperties) + getProc.Invoke(instance, "vkEnumerateDeviceExtensionProperties"u8.AsPointer()); + vkEnumerateDeviceLayerProperties = (VkEnumerateDeviceLayerProperties) + getProc.Invoke(instance, "vkEnumerateDeviceLayerProperties"u8.AsPointer()); + vkGetPhysicalDeviceSparseImageFormatProperties = (VkGetPhysicalDeviceSparseImageFormatProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceSparseImageFormatProperties"u8.AsPointer()); + vkEnumeratePhysicalDeviceGroups = (VkEnumeratePhysicalDeviceGroups) + getProc.Invoke(instance, "vkEnumeratePhysicalDeviceGroups"u8.AsPointer()); + vkGetPhysicalDeviceFeatures2 = (VkGetPhysicalDeviceFeatures2) + getProc.Invoke(instance, "vkGetPhysicalDeviceFeatures2"u8.AsPointer()); + vkGetPhysicalDeviceProperties2 = (VkGetPhysicalDeviceProperties2) + getProc.Invoke(instance, "vkGetPhysicalDeviceProperties2"u8.AsPointer()); + vkGetPhysicalDeviceFormatProperties2 = (VkGetPhysicalDeviceFormatProperties2) + getProc.Invoke(instance, "vkGetPhysicalDeviceFormatProperties2"u8.AsPointer()); + vkGetPhysicalDeviceImageFormatProperties2 = (VkGetPhysicalDeviceImageFormatProperties2) + getProc.Invoke(instance, "vkGetPhysicalDeviceImageFormatProperties2"u8.AsPointer()); + vkGetPhysicalDeviceQueueFamilyProperties2 = (VkGetPhysicalDeviceQueueFamilyProperties2) + getProc.Invoke(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"u8.AsPointer()); + vkGetPhysicalDeviceMemoryProperties2 = (VkGetPhysicalDeviceMemoryProperties2) + getProc.Invoke(instance, "vkGetPhysicalDeviceMemoryProperties2"u8.AsPointer()); + vkGetPhysicalDeviceSparseImageFormatProperties2 = (VkGetPhysicalDeviceSparseImageFormatProperties2) + getProc.Invoke(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"u8.AsPointer()); + vkGetPhysicalDeviceExternalBufferProperties = (VkGetPhysicalDeviceExternalBufferProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalBufferProperties"u8.AsPointer()); + vkGetPhysicalDeviceExternalFenceProperties = (VkGetPhysicalDeviceExternalFenceProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalFenceProperties"u8.AsPointer()); + vkGetPhysicalDeviceExternalSemaphoreProperties = (VkGetPhysicalDeviceExternalSemaphoreProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties"u8.AsPointer()); + vkGetPhysicalDeviceToolProperties = (VkGetPhysicalDeviceToolProperties) + getProc.Invoke(instance, "vkGetPhysicalDeviceToolProperties"u8.AsPointer()); + vkDestroySurfaceKHR = (VkDestroySurfaceKHR) + getProc.Invoke(instance, "vkDestroySurfaceKHR"u8.AsPointer()); + vkGetPhysicalDeviceSurfaceSupportKHR = (VkGetPhysicalDeviceSurfaceSupportKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfaceSupportKHR"u8.AsPointer()); + vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (VkGetPhysicalDeviceSurfaceCapabilitiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceSurfaceFormatsKHR = (VkGetPhysicalDeviceSurfaceFormatsKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR"u8.AsPointer()); + vkGetPhysicalDeviceSurfacePresentModesKHR = (VkGetPhysicalDeviceSurfacePresentModesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR"u8.AsPointer()); + vkGetPhysicalDevicePresentRectanglesKHR = (VkGetPhysicalDevicePresentRectanglesKHR) + getProc.Invoke(instance, "vkGetPhysicalDevicePresentRectanglesKHR"u8.AsPointer()); + vkGetPhysicalDeviceDisplayPropertiesKHR = (VkGetPhysicalDeviceDisplayPropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceDisplayPlanePropertiesKHR = (VkGetPhysicalDeviceDisplayPlanePropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"u8.AsPointer()); + vkGetDisplayPlaneSupportedDisplaysKHR = (VkGetDisplayPlaneSupportedDisplaysKHR) + getProc.Invoke(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"u8.AsPointer()); + vkGetDisplayModePropertiesKHR = (VkGetDisplayModePropertiesKHR) + getProc.Invoke(instance, "vkGetDisplayModePropertiesKHR"u8.AsPointer()); + vkCreateDisplayModeKHR = (VkCreateDisplayModeKHR) + getProc.Invoke(instance, "vkCreateDisplayModeKHR"u8.AsPointer()); + vkGetDisplayPlaneCapabilitiesKHR = (VkGetDisplayPlaneCapabilitiesKHR) + getProc.Invoke(instance, "vkGetDisplayPlaneCapabilitiesKHR"u8.AsPointer()); + vkCreateDisplayPlaneSurfaceKHR = (VkCreateDisplayPlaneSurfaceKHR) + getProc.Invoke(instance, "vkCreateDisplayPlaneSurfaceKHR"u8.AsPointer()); + vkGetPhysicalDeviceVideoCapabilitiesKHR = (VkGetPhysicalDeviceVideoCapabilitiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceVideoFormatPropertiesKHR = (VkGetPhysicalDeviceVideoFormatPropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceFeatures2KHR = (VkGetPhysicalDeviceFeatures2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceFeatures2KHR"u8.AsPointer()); + vkGetPhysicalDeviceProperties2KHR = (VkGetPhysicalDeviceProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceProperties2KHR"u8.AsPointer()); + vkGetPhysicalDeviceFormatProperties2KHR = (VkGetPhysicalDeviceFormatProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceFormatProperties2KHR"u8.AsPointer()); + vkGetPhysicalDeviceImageFormatProperties2KHR = (VkGetPhysicalDeviceImageFormatProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"u8.AsPointer()); + vkGetPhysicalDeviceQueueFamilyProperties2KHR = (VkGetPhysicalDeviceQueueFamilyProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"u8.AsPointer()); + vkGetPhysicalDeviceMemoryProperties2KHR = (VkGetPhysicalDeviceMemoryProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"u8.AsPointer()); + vkGetPhysicalDeviceSparseImageFormatProperties2KHR = + (VkGetPhysicalDeviceSparseImageFormatProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"u8.AsPointer()); + vkEnumeratePhysicalDeviceGroupsKHR = (VkEnumeratePhysicalDeviceGroupsKHR) + getProc.Invoke(instance, "vkEnumeratePhysicalDeviceGroupsKHR"u8.AsPointer()); + vkGetPhysicalDeviceExternalBufferPropertiesKHR = (VkGetPhysicalDeviceExternalBufferPropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = (VkGetPhysicalDeviceExternalSemaphorePropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceExternalFencePropertiesKHR = (VkGetPhysicalDeviceExternalFencePropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR"u8.AsPointer()); + vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = + (VkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) + getProc.Invoke( + instance, + "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"u8.AsPointer() + ); + vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = + (VkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"u8.AsPointer() + ); + vkGetPhysicalDeviceSurfaceCapabilities2KHR = (VkGetPhysicalDeviceSurfaceCapabilities2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"u8.AsPointer()); + vkGetPhysicalDeviceSurfaceFormats2KHR = (VkGetPhysicalDeviceSurfaceFormats2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"u8.AsPointer()); + vkGetPhysicalDeviceDisplayProperties2KHR = (VkGetPhysicalDeviceDisplayProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceDisplayProperties2KHR"u8.AsPointer()); + vkGetPhysicalDeviceDisplayPlaneProperties2KHR = (VkGetPhysicalDeviceDisplayPlaneProperties2KHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"u8.AsPointer()); + vkGetDisplayModeProperties2KHR = (VkGetDisplayModeProperties2KHR) + getProc.Invoke(instance, "vkGetDisplayModeProperties2KHR"u8.AsPointer()); + vkGetDisplayPlaneCapabilities2KHR = (VkGetDisplayPlaneCapabilities2KHR) + getProc.Invoke(instance, "vkGetDisplayPlaneCapabilities2KHR"u8.AsPointer()); + vkGetPhysicalDeviceFragmentShadingRatesKHR = (VkGetPhysicalDeviceFragmentShadingRatesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR"u8.AsPointer()); + vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = + (VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR"u8.AsPointer() + ); + vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = (VkGetPhysicalDeviceCooperativeMatrixPropertiesKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR"u8.AsPointer()); + vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = (VkGetPhysicalDeviceCalibrateableTimeDomainsKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR"u8.AsPointer()); + vkCreateDebugReportCallbackEXT = (VkCreateDebugReportCallbackEXT) + getProc.Invoke(instance, "vkCreateDebugReportCallbackEXT"u8.AsPointer()); + vkDestroyDebugReportCallbackEXT = (VkDestroyDebugReportCallbackEXT) + getProc.Invoke(instance, "vkDestroyDebugReportCallbackEXT"u8.AsPointer()); + vkDebugReportMessageEXT = (VkDebugReportMessageEXT) + getProc.Invoke(instance, "vkDebugReportMessageEXT"u8.AsPointer()); + vkGetPhysicalDeviceExternalImageFormatPropertiesNV = + (VkGetPhysicalDeviceExternalImageFormatPropertiesNV) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"u8.AsPointer()); + vkReleaseDisplayEXT = (VkReleaseDisplayEXT) + getProc.Invoke(instance, "vkReleaseDisplayEXT"u8.AsPointer()); + vkGetPhysicalDeviceSurfaceCapabilities2EXT = (VkGetPhysicalDeviceSurfaceCapabilities2EXT) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"u8.AsPointer()); + vkCreateDebugUtilsMessengerEXT = (VkCreateDebugUtilsMessengerEXT) + getProc.Invoke(instance, "vkCreateDebugUtilsMessengerEXT"u8.AsPointer()); + vkDestroyDebugUtilsMessengerEXT = (VkDestroyDebugUtilsMessengerEXT) + getProc.Invoke(instance, "vkDestroyDebugUtilsMessengerEXT"u8.AsPointer()); + vkSubmitDebugUtilsMessageEXT = (VkSubmitDebugUtilsMessageEXT) + getProc.Invoke(instance, "vkSubmitDebugUtilsMessageEXT"u8.AsPointer()); + vkGetPhysicalDeviceDescriptorSizeEXT = (VkGetPhysicalDeviceDescriptorSizeEXT) + getProc.Invoke(instance, "vkGetPhysicalDeviceDescriptorSizeEXT"u8.AsPointer()); + vkGetPhysicalDeviceMultisamplePropertiesEXT = (VkGetPhysicalDeviceMultisamplePropertiesEXT) + getProc.Invoke(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT"u8.AsPointer()); + vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = (VkGetPhysicalDeviceCalibrateableTimeDomainsEXT) + getProc.Invoke(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"u8.AsPointer()); + vkGetPhysicalDeviceToolPropertiesEXT = (VkGetPhysicalDeviceToolPropertiesEXT) + getProc.Invoke(instance, "vkGetPhysicalDeviceToolPropertiesEXT"u8.AsPointer()); + vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = (VkGetPhysicalDeviceCooperativeMatrixPropertiesNV) + getProc.Invoke(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV"u8.AsPointer()); + vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = + (VkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"u8.AsPointer() + ); + vkCreateHeadlessSurfaceEXT = (VkCreateHeadlessSurfaceEXT) + getProc.Invoke(instance, "vkCreateHeadlessSurfaceEXT"u8.AsPointer()); + vkAcquireDrmDisplayEXT = (VkAcquireDrmDisplayEXT) + getProc.Invoke(instance, "vkAcquireDrmDisplayEXT"u8.AsPointer()); + vkGetDrmDisplayEXT = (VkGetDrmDisplayEXT)getProc.Invoke(instance, "vkGetDrmDisplayEXT"u8.AsPointer()); + vkGetPhysicalDeviceExternalTensorPropertiesARM = (VkGetPhysicalDeviceExternalTensorPropertiesARM) + getProc.Invoke(instance, "vkGetPhysicalDeviceExternalTensorPropertiesARM"u8.AsPointer()); + vkGetPhysicalDeviceOpticalFlowImageFormatsNV = (VkGetPhysicalDeviceOpticalFlowImageFormatsNV) + getProc.Invoke(instance, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV"u8.AsPointer()); + vkGetPhysicalDeviceCooperativeVectorPropertiesNV = (VkGetPhysicalDeviceCooperativeVectorPropertiesNV) + getProc.Invoke(instance, "vkGetPhysicalDeviceCooperativeVectorPropertiesNV"u8.AsPointer()); + vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM = + (VkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM) + getProc.Invoke(instance, "vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM"u8.AsPointer()); + vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM = + (VkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM"u8.AsPointer() + ); + vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM = + (VkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM"u8.AsPointer() + ); + vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = + (VkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"u8.AsPointer() + ); + vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM = + (VkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM) + getProc.Invoke( + instance, + "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM"u8.AsPointer() + ); + vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM = + (VkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM) + getProc.Invoke( + instance, + "vkEnumeratePhysicalDeviceShaderInstrumentationMetricsARM"u8.AsPointer() + ); + vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM = + (VkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM) + getProc.Invoke( + instance, + "vkGetPhysicalDeviceQueueFamilyDataGraphOpticalFlowImageFormatsARM"u8.AsPointer() + ); + vkCreateWin32SurfaceKHR = (VkCreateWin32SurfaceKHR) + getProc.Invoke(instance, "vkCreateWin32SurfaceKHR"u8.AsPointer()); + vkGetPhysicalDeviceWin32PresentationSupportKHR = (VkGetPhysicalDeviceWin32PresentationSupportKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR"u8.AsPointer()); + vkGetPhysicalDeviceSurfacePresentModes2EXT = (VkGetPhysicalDeviceSurfacePresentModes2EXT) + getProc.Invoke(instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT"u8.AsPointer()); + vkAcquireWinrtDisplayNV = (VkAcquireWinrtDisplayNV) + getProc.Invoke(instance, "vkAcquireWinrtDisplayNV"u8.AsPointer()); + vkGetWinrtDisplayNV = (VkGetWinrtDisplayNV) + getProc.Invoke(instance, "vkGetWinrtDisplayNV"u8.AsPointer()); + vkCreateXlibSurfaceKHR = (VkCreateXlibSurfaceKHR) + getProc.Invoke(instance, "vkCreateXlibSurfaceKHR"u8.AsPointer()); + vkGetPhysicalDeviceXlibPresentationSupportKHR = (VkGetPhysicalDeviceXlibPresentationSupportKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR"u8.AsPointer()); + vkAcquireXlibDisplayEXT = (VkAcquireXlibDisplayEXT) + getProc.Invoke(instance, "vkAcquireXlibDisplayEXT"u8.AsPointer()); + vkGetRandROutputDisplayEXT = (VkGetRandROutputDisplayEXT) + getProc.Invoke(instance, "vkGetRandROutputDisplayEXT"u8.AsPointer()); + vkCreateXcbSurfaceKHR = (VkCreateXcbSurfaceKHR) + getProc.Invoke(instance, "vkCreateXcbSurfaceKHR"u8.AsPointer()); + vkGetPhysicalDeviceXcbPresentationSupportKHR = (VkGetPhysicalDeviceXcbPresentationSupportKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"u8.AsPointer()); + vkCreateWaylandSurfaceKHR = (VkCreateWaylandSurfaceKHR) + getProc.Invoke(instance, "vkCreateWaylandSurfaceKHR"u8.AsPointer()); + vkGetPhysicalDeviceWaylandPresentationSupportKHR = (VkGetPhysicalDeviceWaylandPresentationSupportKHR) + getProc.Invoke(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"u8.AsPointer()); + vkCreateMetalSurfaceEXT = (VkCreateMetalSurfaceEXT) + getProc.Invoke(instance, "vkCreateMetalSurfaceEXT"u8.AsPointer()); + vkCreateAndroidSurfaceKHR = (VkCreateAndroidSurfaceKHR) + getProc.Invoke(instance, "vkCreateAndroidSurfaceKHR"u8.AsPointer()); + } + } + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkMicromapEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkMicromapEXT.gen.cs new file mode 100644 index 0000000..6e4bc7a --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkMicromapEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapEXT - Opaque handle to a micromap object + /// + /// + /// + /// :refpage: VkMicromapEXT + /// + /// + /// Micromaps are represented by VkMicromapEXT handles for use with + /// `VK_EXT_opacity_micromap` commands: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkMicromapEXT) + /// + /// + public readonly unsafe struct VkMicromapEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.MicromapEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkMicromapEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkMicromapEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkOpticalFlowSessionNV.gen.cs b/Brutal.Vulkan/Generated/Handles/VkOpticalFlowSessionNV.gen.cs new file mode 100644 index 0000000..af4abb6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkOpticalFlowSessionNV.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowSessionNV - Opaque handle to an optical flow session object + /// + /// + /// + /// Optical flow session objects are abstracted and represented by + /// VkOpticalFlowSessionNV handles: + /// + /// + /// // Provided by VK_NV_optical_flow + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkOpticalFlowSessionNV) + /// + /// + public readonly unsafe struct VkOpticalFlowSessionNV : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.OpticalFlowSessionNV; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkOpticalFlowSessionNV(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkOpticalFlowSessionNV NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPerformanceConfigurationINTEL.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPerformanceConfigurationINTEL.gen.cs new file mode 100644 index 0000000..8c45a23 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPerformanceConfigurationINTEL.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceConfigurationINTEL - Device configuration for performance queries + /// + /// + /// + /// Before submitting command buffers containing performance queries commands to + /// a device queue, the application must acquire and set a performance query + /// configuration. + /// The configuration can be released once all command buffers containing + /// performance query commands are not in a pending state. + /// + /// + /// // Provided by VK_INTEL_performance_query + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPerformanceConfigurationINTEL) + /// + /// + public readonly unsafe struct VkPerformanceConfigurationINTEL : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.PerformanceConfigurationINTEL; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPerformanceConfigurationINTEL(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPerformanceConfigurationINTEL NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPhysicalDevice.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPhysicalDevice.gen.cs new file mode 100644 index 0000000..978a629 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPhysicalDevice.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevice - Opaque handle to a physical device object + /// + /// + /// + /// Vulkan separates the concept of physical and logical devices. + /// A physical device usually represents a single complete implementation of + /// Vulkan (excluding instance-level functionality) available to the host, of + /// which there are a finite number. + /// A logical device represents an instance of that implementation with its own + /// state and resources independent of other logical devices. + /// + /// + /// Physical devices cannot: be independently destroyed, and are instead + /// destroyed with the VkInstance that they were retrieved from. + /// + /// + /// Physical devices are represented by VkPhysicalDevice handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_HANDLE(VkPhysicalDevice) + /// + /// + public readonly unsafe struct VkPhysicalDevice : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.PhysicalDevice; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPhysicalDevice(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPhysicalDevice NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPipeline.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPipeline.gen.cs new file mode 100644 index 0000000..d814162 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPipeline.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipeline - Opaque handle to a pipeline object + /// + /// + /// + /// Compute, + /// pipelines are each represented by VkPipeline handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) + /// + /// + public readonly unsafe struct VkPipeline : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Pipeline; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPipeline(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPipeline NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPipelineBinaryKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPipelineBinaryKHR.gen.cs new file mode 100644 index 0000000..052c80c --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPipelineBinaryKHR.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryKHR - Opaque handle to a pipeline binary object + /// + /// + /// + /// Pipeline binary objects allow the result of pipeline construction to be + /// reused between pipelines and between runs of an application. + /// Reuse is achieved by extracting pipeline binaries from a VkPipeline + /// object, associating them with a corresponding VkPipelineBinaryKeyKHR + /// and then adding a VkPipelineBinaryInfoKHR to the pNext chain of + /// any stext:Vk*PipelineCreateInfo when creating a pipeline. + /// Pipeline binaries can be reused between runs by extracting + /// VkPipelineBinaryDataKHR from VkPipelineBinaryKHR objects, saving + /// the contents, and then using them to create a VkPipelineBinaryKHR + /// object on subsequent runs. + /// + /// + /// When creating a pipeline that includes VkPipelineBinaryInfoKHR in the + /// pNext chain, or has the + /// VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR flag set, the use of + /// VkPipelineCache objects is not allowed. + /// + /// + /// Pipeline binary objects are represented by VkPipelineBinaryKHR + /// handles: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineBinaryKHR) + /// + /// + public readonly unsafe struct VkPipelineBinaryKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.PipelineBinaryKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPipelineBinaryKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPipelineBinaryKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPipelineCache.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPipelineCache.gen.cs new file mode 100644 index 0000000..d4885eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPipelineCache.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCache - Opaque handle to a pipeline cache object + /// + /// + /// + /// Pipeline cache objects allow the result of pipeline construction to be + /// reused between pipelines and between runs of an application. + /// Reuse between pipelines is achieved by passing the same pipeline cache + /// object when creating multiple related pipelines. + /// Reuse across runs of an application is achieved by retrieving pipeline cache + /// contents in one run of an application, saving the contents, and using them + /// to preinitialize a pipeline cache on a subsequent run. + /// The contents of the pipeline cache objects are managed by the + /// implementation. + /// Applications can manage the host memory consumed by a pipeline cache object + /// and control the amount of data retrieved from a pipeline cache object. + /// + /// + /// Pipeline cache objects are represented by VkPipelineCache handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) + /// + /// + public readonly unsafe struct VkPipelineCache : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.PipelineCache; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPipelineCache(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPipelineCache NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPipelineLayout.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPipelineLayout.gen.cs new file mode 100644 index 0000000..3045ca2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPipelineLayout.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineLayout - Opaque handle to a pipeline layout object + /// + /// + /// + /// Access to descriptor sets from a pipeline is accomplished through a + /// pipeline layout. + /// Zero or more descriptor set layouts and zero or more push constant ranges + /// are combined to form a pipeline layout object describing the complete set of + /// resources that can be accessed by a pipeline. + /// The pipeline layout represents a sequence of descriptor sets with each + /// having a specific layout. + /// This sequence of layouts is used to determine the interface between shader + /// stages and shader resources. + /// Each pipeline is created using a pipeline layout. + /// + /// + /// Pipeline layout objects are represented by VkPipelineLayout handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) + /// + /// + public readonly unsafe struct VkPipelineLayout : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.PipelineLayout; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPipelineLayout(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPipelineLayout NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkPrivateDataSlot.gen.cs b/Brutal.Vulkan/Generated/Handles/VkPrivateDataSlot.gen.cs new file mode 100644 index 0000000..8d387cb --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkPrivateDataSlot.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPrivateDataSlot - Opaque handle to a private data slot object + /// + /// + /// + /// Private data slots are represented by VkPrivateDataSlot handles: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlot) + /// + /// + public readonly unsafe struct VkPrivateDataSlot : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.PrivateDataSlot; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkPrivateDataSlot(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkPrivateDataSlot NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkQueryPool.gen.cs b/Brutal.Vulkan/Generated/Handles/VkQueryPool.gen.cs new file mode 100644 index 0000000..9c5f515 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkQueryPool.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPool - Opaque handle to a query pool object + /// + /// + /// + /// Queries are managed using query pool objects. + /// Each query pool is a collection of a specific number of queries of a + /// particular type. + /// + /// + /// Query pools are represented by VkQueryPool handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) + /// + /// + public readonly unsafe struct VkQueryPool : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.QueryPool; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkQueryPool(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkQueryPool NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkQueue.gen.cs b/Brutal.Vulkan/Generated/Handles/VkQueue.gen.cs new file mode 100644 index 0000000..f8a11b4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkQueue.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueue - Opaque handle to a queue object + /// + /// + /// + /// Creating a logical device also creates the queues associated with that + /// device. + /// The queues to create are described by a set of VkDeviceQueueCreateInfo + /// structures that are passed to vkCreateDevice in + /// pQueueCreateInfos. + /// Queues cannot: be independently destroyed, and are instead destroyed with + /// the VkDevice that they were created from. + /// + /// + /// Queues are represented by VkQueue handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_HANDLE(VkQueue) + /// + /// + public readonly unsafe struct VkQueue : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Queue; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkQueue(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkQueue NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkRenderPass.gen.cs b/Brutal.Vulkan/Generated/Handles/VkRenderPass.gen.cs new file mode 100644 index 0000000..241364d --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkRenderPass.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPass - Opaque handle to a render pass object + /// + /// + /// + /// A render pass object represents a collection of attachments, subpasses, and + /// dependencies between the subpasses, and describes how the attachments are + /// used over the course of the subpasses. + /// + /// + /// Render passes are represented by VkRenderPass handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) + /// + /// + public readonly unsafe struct VkRenderPass : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.RenderPass; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkRenderPass(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkRenderPass NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkSampler.gen.cs b/Brutal.Vulkan/Generated/Handles/VkSampler.gen.cs new file mode 100644 index 0000000..c4f6555 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkSampler.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSampler - Opaque handle to a sampler object + /// + /// + /// + /// VkSampler objects represent the state of an image sampler which is + /// used by the implementation to read image data and apply filtering and other + /// transformations for the shader. + /// + /// + /// Samplers are represented by VkSampler handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) + /// + /// + public readonly unsafe struct VkSampler : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Sampler; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkSampler(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkSampler NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkSamplerYcbcrConversion.gen.cs b/Brutal.Vulkan/Generated/Handles/VkSamplerYcbcrConversion.gen.cs new file mode 100644 index 0000000..8248011 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkSamplerYcbcrConversion.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrConversion - Opaque handle to a device-specific sampler {YCbCr} conversion description + /// + /// + /// + /// A sampler {YCbCr} conversion is an opaque representation of a + /// device-specific sampler {YCbCr} conversion description, represented as a + /// VkSamplerYcbcrConversion handle: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) + /// + /// + public readonly unsafe struct VkSamplerYCbCrConversion : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.SamplerYCbCrConversion; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkSamplerYCbCrConversion(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkSamplerYCbCrConversion NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkSemaphore.gen.cs b/Brutal.Vulkan/Generated/Handles/VkSemaphore.gen.cs new file mode 100644 index 0000000..c3ee672 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkSemaphore.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphore - Opaque handle to a semaphore object + /// + /// + /// + /// Semaphores are a synchronization primitive that can be used to insert a + /// dependency + /// between queue operations. + /// Semaphores have two states - signaled and unsignaled. + /// A semaphore can be signaled after execution of a queue operation is + /// completed, and a queue operation can wait for a semaphore to become + /// signaled before it begins execution. + /// + /// + /// Semaphores are represented by VkSemaphore handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) + /// + /// + public readonly unsafe struct VkSemaphore : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.Semaphore; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkSemaphore(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkSemaphore NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkShaderEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkShaderEXT.gen.cs new file mode 100644 index 0000000..883d59c --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkShaderEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderEXT - Opaque handle to a shader object + /// + /// + /// + /// Shader objects are represented by VkShaderEXT handles: + /// + /// + /// // Provided by VK_EXT_shader_object + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderEXT) + /// + /// + public readonly unsafe struct VkShaderEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.ShaderEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkShaderEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkShaderEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkShaderInstrumentationARM.gen.cs b/Brutal.Vulkan/Generated/Handles/VkShaderInstrumentationARM.gen.cs new file mode 100644 index 0000000..021db96 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkShaderInstrumentationARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderInstrumentationARM - Opaque handle to a shader instrumentation object + /// + /// + /// + /// Shader instrumentation metrics are captured via instrumentation objects. + /// + /// + /// Shader instrumentation objects are represented by + /// VkShaderInstrumentationARM handles: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderInstrumentationARM) + /// + /// + public readonly unsafe struct VkShaderInstrumentationARM : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.ShaderInstrumentationARM; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkShaderInstrumentationARM(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkShaderInstrumentationARM NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkShaderModule.gen.cs b/Brutal.Vulkan/Generated/Handles/VkShaderModule.gen.cs new file mode 100644 index 0000000..5ad36ef --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkShaderModule.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderModule - Opaque handle to a shader module object + /// + /// + /// + /// Shader modules contain shader code and one or more entry points. + /// Shaders are selected from a shader module by specifying an entry point as + /// part of pipeline^ creation. + /// The stages of a pipeline can use shaders that come from different modules. + /// The shader code defining a shader module must be in the SPIR-V format, as + /// described by the Vulkan Environment for SPIR-V^ appendix. + /// + /// + /// Shader modules are represented by VkShaderModule handles: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) + /// + /// + public readonly unsafe struct VkShaderModule : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.ShaderModule; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkShaderModule(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkShaderModule NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkSurfaceKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkSurfaceKHR.gen.cs new file mode 100644 index 0000000..ce06476 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkSurfaceKHR.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceKHR - Opaque handle to a surface object + /// + /// + /// + /// Native platform surface or window objects are abstracted by surface objects, + /// which are represented by VkSurfaceKHR handles: + /// + /// + /// // Provided by VK_KHR_surface + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) + /// + /// + public readonly unsafe struct VkSurfaceKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.SurfaceKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkSurfaceKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkSurfaceKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkSwapchainKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkSwapchainKHR.gen.cs new file mode 100644 index 0000000..e27f0a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkSwapchainKHR.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainKHR - Opaque handle to a swapchain object + /// + /// + /// + /// A swapchain object (a.k.a. + /// swapchain) provides the ability to present rendering results to a surface. + /// Swapchain objects are represented by VkSwapchainKHR handles: + /// + /// + /// // Provided by VK_KHR_swapchain + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) + /// + /// + public readonly unsafe struct VkSwapchainKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.SwapchainKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkSwapchainKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkSwapchainKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkTensorARM.gen.cs b/Brutal.Vulkan/Generated/Handles/VkTensorARM.gen.cs new file mode 100644 index 0000000..29b7e68 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkTensorARM.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorARM - Opaque handle to a tensor object + /// + /// + /// + /// Tensors are similar to images^, in that they have + /// multi-dimensional access as documented in the here chapter, but a + /// tensor's dimensions are not predefined. + /// A tensor can have an arbitrary number of dimensions, up to + /// maxTensorDimensionCount^, with one + /// index per dimension used to access the tensor. + /// + /// + /// Tensors can be used by binding them to pipelines via descriptor sets, or by + /// directly specifying them as parameters to certain commands. + /// + /// + /// Tensors are represented by VkTensorARM handles: + /// + /// + /// // Provided by VK_EXT_descriptor_heap, VK_ARM_tensors + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorARM) + /// + /// + public readonly unsafe struct VkTensorARM : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.TensorARM; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkTensorARM(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkTensorARM NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkTensorViewARM.gen.cs b/Brutal.Vulkan/Generated/Handles/VkTensorViewARM.gen.cs new file mode 100644 index 0000000..9b233d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkTensorViewARM.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorViewARM - Opaque handle to an tensor view object + /// + /// + /// + /// Tensor objects are not directly accessed by pipelines for reading or writing + /// tensor data. + /// Instead, tensor views representing the tensor subresources and containing + /// additional metadata are used for that purpose. + /// Views must be created on tensors of compatible types. + /// + /// + /// Tensor views are represented by VkTensorViewARM handles: + /// + /// + /// // Provided by VK_ARM_tensors + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkTensorViewARM) + /// + /// + public readonly unsafe struct VkTensorViewARM : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.TensorViewARM; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkTensorViewARM(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkTensorViewARM NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkValidationCacheEXT.gen.cs b/Brutal.Vulkan/Generated/Handles/VkValidationCacheEXT.gen.cs new file mode 100644 index 0000000..9388e76 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkValidationCacheEXT.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationCacheEXT - Opaque handle to a validation cache object + /// + /// + /// + /// Validation cache objects allow the result of internal validation to be + /// reused, both within a single application run and between multiple runs. + /// Reuse within a single run is achieved by passing the same validation cache + /// object when creating supported Vulkan objects. + /// Reuse across runs of an application is achieved by retrieving validation + /// cache contents in one run of an application, saving the contents, and using + /// them to preinitialize a validation cache on a subsequent run. + /// The contents of the validation cache objects are managed by the validation + /// layers. + /// Applications can manage the host memory consumed by a validation cache + /// object and control the amount of data retrieved from a validation cache + /// object. + /// + /// + /// Validation cache objects are represented by VkValidationCacheEXT + /// handles: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) + /// + /// + public readonly unsafe struct VkValidationCacheEXT : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.ValidationCacheEXT; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkValidationCacheEXT(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkValidationCacheEXT NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkVideoSessionKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkVideoSessionKHR.gen.cs new file mode 100644 index 0000000..d1e85d9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkVideoSessionKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionKHR - Opaque handle to a video session object + /// + /// + /// + /// Video sessions are objects that represent and maintain the state needed to + /// perform video decode or encode operations using a specific video profile. + /// + /// + /// Video sessions are represented by VkVideoSessionKHR handles: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR) + /// + /// + public readonly unsafe struct VkVideoSessionKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.VideoSessionKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkVideoSessionKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkVideoSessionKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/Handles/VkVideoSessionParametersKHR.gen.cs b/Brutal.Vulkan/Generated/Handles/VkVideoSessionParametersKHR.gen.cs new file mode 100644 index 0000000..51e1919 --- /dev/null +++ b/Brutal.Vulkan/Generated/Handles/VkVideoSessionParametersKHR.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionParametersKHR - Opaque handle to a video session parameters object + /// + /// + /// + /// Video session parameters are represented by + /// VkVideoSessionParametersKHR handles: + /// + /// + /// // Provided by VK_KHR_video_queue + /// VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR) + /// + /// + public readonly unsafe struct VkVideoSessionParametersKHR : IVulkanHandle + { + /// + public VkObjectType VkObjectType => VkObjectType.VideoSessionParametersKHR; + + /// + public nint VkHandle { get; } + + /// Construct from an existing pointer + public VkVideoSessionParametersKHR(nint handle) + { + VkHandle = handle; + } + + /// + public bool IsNull() + { + return VkHandle == 0; + } + + public static VkVideoSessionParametersKHR NullHandle = new(); + } +} diff --git a/Brutal.Vulkan/Generated/InlineArrays.gen.cs b/Brutal.Vulkan/Generated/InlineArrays.gen.cs new file mode 100644 index 0000000..4d1c294 --- /dev/null +++ b/Brutal.Vulkan/Generated/InlineArrays.gen.cs @@ -0,0 +1,292 @@ +using System.Runtime.CompilerServices; + +namespace Brutal.VulkanApi +{ + /// + /// Represents an inline array of VkMemoryType with a fixed size of 32. + /// + [InlineArray(32)] + public struct VkMemoryType_32 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public VkMemoryType Items; + } + + /// + /// Represents an inline array of VkMemoryHeap with a fixed size of 16. + /// + [InlineArray(16)] + public struct VkMemoryHeap_16 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public VkMemoryHeap Items; + } + + /// + /// Represents an inline array of VkOffset3D with a fixed size of 2. + /// + [InlineArray(2)] + public struct VkOffset3D_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public VkOffset3D Items; + } + + /// + /// Represents an inline array of VkPhysicalDevice with a fixed size of 32. + /// + [InlineArray(32)] + public struct VkPhysicalDevice_32 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public VkPhysicalDevice Items; + } + + /// + /// Represents an inline array of VkQueueGlobalPriority with a fixed size of 16. + /// + [InlineArray(16)] + public struct VkQueueGlobalPriority_16 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public VkQueueGlobalPriority Items; + } + + /// + /// Represents an inline array of VkFragmentShadingRateCombinerOpKHR with a fixed size of 2. + /// + [InlineArray(2)] + public struct VkFragmentShadingRateCombinerOpKHR_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public VkFragmentShadingRateCombinerOpKHR Items; + } + + /// + /// Represents an inline array of ByteSize64 with a fixed size of 16. + /// + [InlineArray(16)] + public struct ByteSize64_16 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ByteSize64 Items; + } + + /// + /// Represents an inline array of byte with a fixed size of 16. + /// + [InlineArray(16)] + public struct byte_16 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte Items; + } + + /// + /// Represents an inline array of byte_16 with a fixed size of 6. + /// + [InlineArray(6)] + public struct byte_16_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte_16 Items; + } + + /// + /// Represents an inline array of byte with a fixed size of 64. + /// + [InlineArray(64)] + public struct byte_64 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte Items; + } + + /// + /// Represents an inline array of byte_64 with a fixed size of 6. + /// + [InlineArray(6)] + public struct byte_64_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte_64 Items; + } + + /// + /// Represents an inline array of byte with a fixed size of 2. + /// + [InlineArray(2)] + public struct byte_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte Items; + } + + /// + /// Represents an inline array of byte_2 with a fixed size of 32. + /// + [InlineArray(32)] + public struct byte_2_32 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte_2 Items; + } + + /// + /// Represents an inline array of byte_64 with a fixed size of 2. + /// + [InlineArray(2)] + public struct byte_64_2 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte_64 Items; + } + + /// + /// Represents an inline array of ushort with a fixed size of 128. + /// + [InlineArray(128)] + public struct ushort_128 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ushort Items; + } + + /// + /// Represents an inline array of ushort_128 with a fixed size of 3. + /// + [InlineArray(3)] + public struct ushort_128_3 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public ushort_128 Items; + } + + /// + /// Represents an inline array of byte_2 with a fixed size of 15. + /// + [InlineArray(15)] + public struct byte_2_15 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public byte_2 Items; + } + + /// + /// Represents an inline array of short with a fixed size of 4. + /// + [InlineArray(4)] + public struct short_4 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public short Items; + } + + /// + /// Represents an inline array of short_4 with a fixed size of 8. + /// + [InlineArray(8)] + public struct short_4_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public short_4 Items; + } + + /// + /// Represents an inline array of short with a fixed size of 8. + /// + [InlineArray(8)] + public struct short_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public short Items; + } + + /// + /// Represents an inline array of short_8 with a fixed size of 8. + /// + [InlineArray(8)] + public struct short_8_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public short_8 Items; + } + + /// + /// Represents an inline array of StdVideoAV1FrameRestorationType with a fixed size of 3. + /// + [InlineArray(3)] + public struct StdVideoAV1FrameRestorationType_3 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public StdVideoAV1FrameRestorationType Items; + } + + /// + /// Represents an inline array of int with a fixed size of 6. + /// + [InlineArray(6)] + public struct int_6 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public int Items; + } + + /// + /// Represents an inline array of int_6 with a fixed size of 8. + /// + [InlineArray(8)] + public struct int_6_8 + { + /// + /// Internal member used to represent the type we have an inline array for. + /// + public int_6 Items; + } +} diff --git a/Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApi.gen.cs b/Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApi.gen.cs new file mode 100644 index 0000000..efdcf12 --- /dev/null +++ b/Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApi.gen.cs @@ -0,0 +1,98 @@ +namespace Brutal.VulkanApi +{ + public static partial class Vulkan + { + public static unsafe partial class PInvoke + { + /// + /// vkCreateInstance - Create a new Vulkan instance + /// + /// + /// + /// To create an instance object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateInstance( + /// const VkInstanceCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkInstance* pInstance); + /// + /// + /// is a pointer to a VkInstanceCreateInfo structure controlling creation of the instance. + /// controls host memory allocation as described in the Memory Allocation^ chapter. + /// points a VkInstance handle in which the resulting instance is returned. + [LibraryImport("vulkan")] + public static unsafe partial VkResult vkCreateInstance( + VkInstanceCreateInfo* pCreateInfo, + VkAllocationCallbacks* pAllocator, + VkInstance* pInstance + ); + + /// + /// vkEnumerateInstanceExtensionProperties - Returns up to requested number of global extension properties + /// + /// + /// + /// To query the available instance extensions, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumerateInstanceExtensionProperties( + /// const char* pLayerName, + /// uint32_t* pPropertyCount, + /// VkExtensionProperties* pProperties); + /// + /// + /// is either `NULL` or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from. + /// is a pointer to an integer related to the number of extension properties available or queried, as described below. + /// is either `NULL` or a pointer to an array of VkExtensionProperties structures. + [LibraryImport("vulkan")] + public static unsafe partial VkResult vkEnumerateInstanceExtensionProperties( + byte* pLayerName, + int* pPropertyCount, + VkExtensionProperties* pProperties + ); + + /// + /// vkEnumerateInstanceLayerProperties - Returns up to requested number of global layer properties + /// + /// + /// + /// To query the available layers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumerateInstanceLayerProperties( + /// uint32_t* pPropertyCount, + /// VkLayerProperties* pProperties); + /// + /// + /// is a pointer to an integer related to the number of layer properties available or queried, as described below. + /// is either `NULL` or a pointer to an array of VkLayerProperties structures. + [LibraryImport("vulkan")] + public static unsafe partial VkResult vkEnumerateInstanceLayerProperties( + int* pPropertyCount, + VkLayerProperties* pProperties + ); + + /// + /// vkEnumerateInstanceVersion - Query instance-level version before instance creation + /// + /// + /// + /// To query the version of instance-level functionality supported by the + /// implementation, call: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// VkResult vkEnumerateInstanceVersion( + /// uint32_t* pApiVersion); + /// + /// + /// is a pointer to a uint32_t, which is the version of Vulkan supported by instance-level functionality, encoded as described in here. + [LibraryImport("vulkan")] + public static unsafe partial VkResult vkEnumerateInstanceVersion(int* pApiVersion); + } + } +} diff --git a/Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApiEx.gen.cs b/Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApiEx.gen.cs new file mode 100644 index 0000000..033e4a0 --- /dev/null +++ b/Brutal.Vulkan/Generated/PInvoke/VulkanApi/VulkanApiEx.gen.cs @@ -0,0 +1,290 @@ +namespace Brutal.VulkanApi +{ + public static partial class Vulkan + { + /// + /// vkCreateInstance - Create a new Vulkan instance + /// + /// + /// + /// To create an instance object, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkCreateInstance( + /// const VkInstanceCreateInfo* pCreateInfo, + /// const VkAllocationCallbacks* pAllocator, + /// VkInstance* pInstance); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static unsafe VkInstance CreateInstanceInternal( + in VkInstanceCreateInfo pCreateInfo, + VkAllocator? pAllocator + ) + { + fixed (VkInstanceCreateInfo* pCreateInfoFixed = &pCreateInfo) + { + VkInstance pInstanceLocal = default; + VkResult result = Vulkan.PInvoke.vkCreateInstance(pCreateInfoFixed, pAllocator, &pInstanceLocal); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorInitializationFailed: + throw new VkResultError( + VkResult.ErrorInitializationFailed, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_INITIALIZATION_FAILED" + ); + case VkResult.ErrorLayerNotPresent: + throw new VkResultError( + VkResult.ErrorLayerNotPresent, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_LAYER_NOT_PRESENT" + ); + case VkResult.ErrorExtensionNotPresent: + throw new VkResultError( + VkResult.ErrorExtensionNotPresent, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_EXTENSION_NOT_PRESENT" + ); + case VkResult.ErrorIncompatibleDriver: + throw new VkResultError( + VkResult.ErrorIncompatibleDriver, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_INCOMPATIBLE_DRIVER" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkCreateInstance failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + + return pInstanceLocal; + } + } + + /// + /// vkEnumerateInstanceExtensionProperties - Returns up to requested number of global extension properties + /// + /// + /// + /// To query the available instance extensions, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumerateInstanceExtensionProperties( + /// const char* pLayerName, + /// uint32_t* pPropertyCount, + /// VkExtensionProperties* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumerateInstanceExtensionProperties( + scoped ReadOnlySpan pLayerName, + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkExtensionProperties* pPropertiesFixed = pProperties) + fixed (byte* pLayerNameFixed = pLayerName) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = Vulkan.PInvoke.vkEnumerateInstanceExtensionProperties( + pLayerNameFixed, + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumerateInstanceExtensionProperties failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumerateInstanceExtensionProperties failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorLayerNotPresent: + throw new VkResultError( + VkResult.ErrorLayerNotPresent, + "Vulkan call to vkEnumerateInstanceExtensionProperties failed with error: VK_ERROR_LAYER_NOT_PRESENT" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumerateInstanceExtensionProperties failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumerateInstanceExtensionProperties failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumerateInstanceExtensionProperties_Count(scoped ReadOnlySpan pLayerName) + { + int pPropertyCount = default; + EnumerateInstanceExtensionProperties(pLayerName, ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumerateInstanceExtensionProperties_Write( + scoped ReadOnlySpan pLayerName, + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return EnumerateInstanceExtensionProperties(pLayerName, ref pPropertyCount, pProperties); + } + + /// + /// vkEnumerateInstanceLayerProperties - Returns up to requested number of global layer properties + /// + /// + /// + /// To query the available layers, call: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// VkResult vkEnumerateInstanceLayerProperties( + /// uint32_t* pPropertyCount, + /// VkLayerProperties* pProperties); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe VkResult EnumerateInstanceLayerProperties( + ref int pPropertyCount, + scoped ReadOnlySpan pProperties + ) + { + fixed (VkLayerProperties* pPropertiesFixed = pProperties) + fixed (int* pPropertyCountFixed = &pPropertyCount) + { + VkResult result = Vulkan.PInvoke.vkEnumerateInstanceLayerProperties( + pPropertyCountFixed, + pPropertiesFixed + ); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumerateInstanceLayerProperties failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorOutOfDeviceMemory: + throw new VkResultError( + VkResult.ErrorOutOfDeviceMemory, + "Vulkan call to vkEnumerateInstanceLayerProperties failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumerateInstanceLayerProperties failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumerateInstanceLayerProperties failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + case VkResult.Incomplete: + default: + break; + } + + return result; + } + } + + /// Queries the required length. + /// The required length. + public static int EnumerateInstanceLayerProperties_Count() + { + int pPropertyCount = default; + EnumerateInstanceLayerProperties(ref pPropertyCount, null); + return pPropertyCount; + } + + /// Writes to a provided span. + /// The span to write to. + /// Return value of the underlying function. + public static VkResult EnumerateInstanceLayerProperties_Write( + scoped ReadOnlySpan pProperties + ) + { + int pPropertyCount = pProperties.Length; + return EnumerateInstanceLayerProperties(ref pPropertyCount, pProperties); + } + + /// + /// vkEnumerateInstanceVersion - Query instance-level version before instance creation + /// + /// + /// + /// To query the version of instance-level functionality supported by the + /// implementation, call: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// VkResult vkEnumerateInstanceVersion( + /// uint32_t* pApiVersion); + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe void EnumerateInstanceVersion(int* pApiVersion) + { + VkResult result = Vulkan.PInvoke.vkEnumerateInstanceVersion(pApiVersion); + switch (result) + { + case VkResult.ErrorOutOfHostMemory: + throw new VkResultError( + VkResult.ErrorOutOfHostMemory, + "Vulkan call to vkEnumerateInstanceVersion failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" + ); + case VkResult.ErrorUnknown: + throw new VkResultError( + VkResult.ErrorUnknown, + "Vulkan call to vkEnumerateInstanceVersion failed with error: VK_ERROR_UNKNOWN" + ); + case VkResult.ErrorValidationFailed: + throw new VkResultError( + VkResult.ErrorValidationFailed, + "Vulkan call to vkEnumerateInstanceVersion failed with error: VK_ERROR_VALIDATION_FAILED" + ); + case VkResult.Success: + default: + break; + } + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatProperties2ANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatProperties2ANDROID.gen.cs new file mode 100644 index 0000000..85f6d66 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatProperties2ANDROID.gen.cs @@ -0,0 +1,97 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkAndroidHardwareBufferFormatProperties2ANDROID - Structure describing the image format properties of an Android hardware buffer + /// + /// + /// + /// The format properties of an Android hardware buffer can be obtained by + /// including a VkAndroidHardwareBufferFormatProperties2ANDROID structure + /// in the pNext chain of the + /// VkAndroidHardwareBufferPropertiesANDROID structure passed to + /// vkGetAndroidHardwareBufferPropertiesANDROID. + /// This structure is defined as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat format; + /// uint64_t externalFormat; + /// VkFormatFeatureFlags2 formatFeatures; + /// VkComponentMapping samplerYcbcrConversionComponents; + /// VkSamplerYcbcrModelConversion suggestedYcbcrModel; + /// VkSamplerYcbcrRange suggestedYcbcrRange; + /// VkChromaLocation suggestedXChromaOffset; + /// VkChromaLocation suggestedYChromaOffset; + /// } VkAndroidHardwareBufferFormatProperties2ANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkAndroidHardwareBufferFormatProperties2ANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ANDROIDHardwareBufferFormatProperties2ANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is the Vulkan format corresponding to the Android hardware buffer's format, or VK_FORMAT_UNDEFINED if there is not an equivalent Vulkan format. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// ExternalFormat is an implementation-defined external format identifier for use with VkExternalFormatANDROID. It must not be zero. + /// + [FieldOffset(24)] + public nint ExternalFormat; + + /// + /// FormatFeatures describes the capabilities of this external format when used with an image bound to memory imported from buffer. + /// + [FieldOffset(32)] + public VkFormatFeatureFlags2 FormatFeatures; + + /// + /// SamplerYcbcrConversionComponents is the component swizzle that should be used in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(40)] + public VkComponentMapping SamplerYcbcrConversionComponents; + + /// + /// SuggestedYcbcrModel is a suggested color model to use in the VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(56)] + public VkSamplerYCbCrModelConversion SuggestedYcbcrModel; + + /// + /// SuggestedYcbcrRange is a suggested numerical value range to use in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(60)] + public VkSamplerYCbCrRange SuggestedYcbcrRange; + + /// + /// SuggestedXChromaOffset is a suggested X chroma offset to use in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(64)] + public VkChromaLocation SuggestedXChromaOffset; + + /// + /// SuggestedYChromaOffset is a suggested Y chroma offset to use in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(68)] + public VkChromaLocation SuggestedYChromaOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatPropertiesANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatPropertiesANDROID.gen.cs new file mode 100644 index 0000000..dfa485c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatPropertiesANDROID.gen.cs @@ -0,0 +1,96 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkAndroidHardwareBufferFormatPropertiesANDROID - Structure describing the image format properties of an Android hardware buffer + /// + /// + /// + /// To obtain format properties of an Android hardware buffer, include a + /// VkAndroidHardwareBufferFormatPropertiesANDROID structure in the + /// pNext chain of the VkAndroidHardwareBufferPropertiesANDROID + /// structure passed to vkGetAndroidHardwareBufferPropertiesANDROID. + /// This structure is defined as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat format; + /// uint64_t externalFormat; + /// VkFormatFeatureFlags formatFeatures; + /// VkComponentMapping samplerYcbcrConversionComponents; + /// VkSamplerYcbcrModelConversion suggestedYcbcrModel; + /// VkSamplerYcbcrRange suggestedYcbcrRange; + /// VkChromaLocation suggestedXChromaOffset; + /// VkChromaLocation suggestedYChromaOffset; + /// } VkAndroidHardwareBufferFormatPropertiesANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkAndroidHardwareBufferFormatPropertiesANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ANDROIDHardwareBufferFormatPropertiesANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is the Vulkan format corresponding to the Android hardware buffer's format, or VK_FORMAT_UNDEFINED if there is not an equivalent Vulkan format. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// ExternalFormat is an implementation-defined external format identifier for use with VkExternalFormatANDROID. It must not be zero. + /// + [FieldOffset(24)] + public nint ExternalFormat; + + /// + /// FormatFeatures describes the capabilities of this external format when used with an image bound to memory imported from buffer. + /// + [FieldOffset(32)] + public VkFormatFeatureFlags FormatFeatures; + + /// + /// SamplerYcbcrConversionComponents is the component swizzle that should be used in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(36)] + public VkComponentMapping SamplerYcbcrConversionComponents; + + /// + /// SuggestedYcbcrModel is a suggested color model to use in the VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(52)] + public VkSamplerYCbCrModelConversion SuggestedYcbcrModel; + + /// + /// SuggestedYcbcrRange is a suggested numerical value range to use in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(56)] + public VkSamplerYCbCrRange SuggestedYcbcrRange; + + /// + /// SuggestedXChromaOffset is a suggested X chroma offset to use in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(60)] + public VkChromaLocation SuggestedXChromaOffset; + + /// + /// SuggestedYChromaOffset is a suggested Y chroma offset to use in VkSamplerYcbcrConversionCreateInfo. + /// + [FieldOffset(64)] + public VkChromaLocation SuggestedYChromaOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.gen.cs new file mode 100644 index 0000000..7bd031b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferFormatResolvePropertiesANDROID.gen.cs @@ -0,0 +1,44 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkAndroidHardwareBufferFormatResolvePropertiesANDROID - Structure defining properties of resolves using an external format + /// + /// + /// + /// The VkAndroidHardwareBufferFormatResolvePropertiesANDROID structure is + /// defined as: + /// + /// + /// // Provided by VK_ANDROID_external_format_resolve + /// typedef struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat colorAttachmentFormat; + /// } VkAndroidHardwareBufferFormatResolvePropertiesANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ANDROIDHardwareBufferFormatResolvePropertiesANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ColorAttachmentFormat is a VkFormat specifying the format of color attachment images that must be used for color attachments when resolving to the specified external format. If the implementation supports external format resolves for the specified external format, this value will be a color format supporting the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT in VkFormatProperties::optimalTilingFeatures as returned by vkGetPhysicalDeviceFormatProperties with format equal to colorAttachmentFormat If external format resolves are not supported, this value will be VK_FORMAT_UNDEFINED. + /// + [FieldOffset(16)] + public VkFormat ColorAttachmentFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferPropertiesANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferPropertiesANDROID.gen.cs new file mode 100644 index 0000000..1b0397d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferPropertiesANDROID.gen.cs @@ -0,0 +1,51 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkAndroidHardwareBufferPropertiesANDROID - Properties of External Memory Android Hardware Buffers + /// + /// + /// + /// The VkAndroidHardwareBufferPropertiesANDROID structure returned is + /// defined as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// typedef struct VkAndroidHardwareBufferPropertiesANDROID { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize allocationSize; + /// uint32_t memoryTypeBits; + /// } VkAndroidHardwareBufferPropertiesANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkAndroidHardwareBufferPropertiesANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ANDROIDHardwareBufferPropertiesANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AllocationSize is the size of the external memory + /// + [FieldOffset(16)] + public ByteSize64 AllocationSize; + + /// + /// MemoryTypeBits is a bitmask containing one bit set for every memory type which the specified Android hardware buffer can be imported as. + /// + [FieldOffset(24)] + public int MemoryTypeBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferUsageANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferUsageANDROID.gen.cs new file mode 100644 index 0000000..d9498d7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidHardwareBufferUsageANDROID.gen.cs @@ -0,0 +1,47 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkAndroidHardwareBufferUsageANDROID - Struct containing Android hardware buffer usage flags + /// + /// + /// + /// To obtain optimal Android hardware buffer usage flags for specific image + /// creation parameters, add a VkAndroidHardwareBufferUsageANDROID + /// structure to the pNext chain of a VkImageFormatProperties2 + /// structure passed to vkGetPhysicalDeviceImageFormatProperties2. + /// This structure is defined as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// typedef struct VkAndroidHardwareBufferUsageANDROID { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t androidHardwareBufferUsage; + /// } VkAndroidHardwareBufferUsageANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkAndroidHardwareBufferUsageANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ANDROIDHardwareBufferUsageANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AndroidHardwareBufferUsage returns the Android hardware buffer usage flags. + /// + [FieldOffset(16)] + public nint AndroidHardwareBufferUsage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidSurfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidSurfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..02d810d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkAndroidSurfaceCreateInfoKHR.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkAndroidSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Android surface object + /// + /// + /// + /// The VkAndroidSurfaceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_android_surface + /// typedef struct VkAndroidSurfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAndroidSurfaceCreateFlagsKHR flags; + /// struct ANativeWindow* window; + /// } VkAndroidSurfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkAndroidSurfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ANDROIDSurfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkAndroidSurfaceCreateFlagsKHR Flags; + + /// + /// Window is a pointer to the basetype:ANativeWindow to associate the surface with. + /// + [FieldOffset(24)] + public void* Window; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkD3D12FenceSubmitInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkD3D12FenceSubmitInfoKHR.gen.cs new file mode 100644 index 0000000..b0150ff --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkD3D12FenceSubmitInfoKHR.gen.cs @@ -0,0 +1,68 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkD3D12FenceSubmitInfoKHR - Structure specifying values for Direct3D 12 fence-backed semaphores + /// + /// + /// + /// To specify the values to use when waiting for and signaling semaphores whose + /// current payload^ refers to a + /// Direct3D 12 fence, add a VkD3D12FenceSubmitInfoKHR structure to the + /// pNext chain of the VkSubmitInfo structure. + /// The VkD3D12FenceSubmitInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_semaphore_win32 + /// typedef struct VkD3D12FenceSubmitInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t waitSemaphoreValuesCount; + /// const uint64_t* pWaitSemaphoreValues; + /// uint32_t signalSemaphoreValuesCount; + /// const uint64_t* pSignalSemaphoreValues; + /// } VkD3D12FenceSubmitInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkD3D12FenceSubmitInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.D3D12FenceSubmitInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WaitSemaphoreValuesCount is the number of semaphore wait values specified in pWaitSemaphoreValues. + /// + [FieldOffset(16)] + public int WaitSemaphoreValuesCount; + + /// + /// WaitSemaphoreValues is a pointer to an array of waitSemaphoreValuesCount values for the corresponding semaphores in VkSubmitInfo::pWaitSemaphores to wait for. + /// + [FieldOffset(24)] + public nint* WaitSemaphoreValues; + + /// + /// SignalSemaphoreValuesCount is the number of semaphore signal values specified in pSignalSemaphoreValues. + /// + [FieldOffset(32)] + public int SignalSemaphoreValuesCount; + + /// + /// SignalSemaphoreValues is a pointer to an array of signalSemaphoreValuesCount values for the corresponding semaphores in VkSubmitInfo::pSignalSemaphores to set when signaled. + /// + [FieldOffset(40)] + public nint* SignalSemaphoreValues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportFenceWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportFenceWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..1bf6fb0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportFenceWin32HandleInfoKHR.gen.cs @@ -0,0 +1,60 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkExportFenceWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a fence + /// + /// + /// + /// To specify additional attributes of NT handles exported from a fence, add a + /// VkExportFenceWin32HandleInfoKHR structure to the pNext chain of + /// the VkFenceCreateInfo structure. + /// The VkExportFenceWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_fence_win32 + /// typedef struct VkExportFenceWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const SECURITY_ATTRIBUTES* pAttributes; + /// DWORD dwAccess; + /// LPCWSTR name; + /// } VkExportFenceWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkExportFenceWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportFenceWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Attributes is a pointer to a Windows SECURITY_ATTRIBUTES structure specifying security attributes of the handle. + /// + [FieldOffset(16)] + public void* Attributes; + + /// + /// DwAccess is a DWORD specifying access rights of the handle. + /// + [FieldOffset(24)] + public int DwAccess; + + /// + /// Name is a null-terminated UTF-16 string to associate with the underlying synchronization primitive referenced by NT handles exported from the created fence. + /// + [FieldOffset(32)] + public char* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..f399264 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoKHR.gen.cs @@ -0,0 +1,60 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkExportMemoryWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a memory + /// + /// + /// + /// To specify additional attributes of NT handles exported from a memory + /// object, add a VkExportMemoryWin32HandleInfoKHR structure to the + /// pNext chain of the VkMemoryAllocateInfo structure. + /// The VkExportMemoryWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_win32 + /// typedef struct VkExportMemoryWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const SECURITY_ATTRIBUTES* pAttributes; + /// DWORD dwAccess; + /// LPCWSTR name; + /// } VkExportMemoryWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkExportMemoryWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMemoryWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Attributes is a pointer to a Windows SECURITY_ATTRIBUTES structure specifying security attributes of the handle. + /// + [FieldOffset(16)] + public void* Attributes; + + /// + /// DwAccess is a DWORD specifying access rights of the handle. + /// + [FieldOffset(24)] + public int DwAccess; + + /// + /// Name is a null-terminated UTF-16 string to associate with the payload referenced by NT handles exported from the created memory. + /// + [FieldOffset(32)] + public char* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoNV.gen.cs new file mode 100644 index 0000000..209c2b9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMemoryWin32HandleInfoNV.gen.cs @@ -0,0 +1,57 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkExportMemoryWin32HandleInfoNV - Specify security attributes and access rights for Win32 memory handles + /// + /// + /// + /// When VkExportMemoryAllocateInfoNV::handleTypes includes + /// VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV, add a + /// VkExportMemoryWin32HandleInfoNV structure to the pNext chain of + /// the VkExportMemoryAllocateInfoNV structure to specify security + /// attributes and access rights for the memory object's external handle. + /// + /// + /// The VkExportMemoryWin32HandleInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_memory_win32 + /// typedef struct VkExportMemoryWin32HandleInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// const SECURITY_ATTRIBUTES* pAttributes; + /// DWORD dwAccess; + /// } VkExportMemoryWin32HandleInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkExportMemoryWin32HandleInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMemoryWin32HandleInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Attributes is a pointer to a Windows SECURITY_ATTRIBUTES structure specifying security attributes of the handle. + /// + [FieldOffset(16)] + public void* Attributes; + + /// + /// DwAccess is a DWORD specifying access rights of the handle. + /// + [FieldOffset(24)] + public int DwAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalBufferInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalBufferInfoEXT.gen.cs new file mode 100644 index 0000000..92cbef4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalBufferInfoEXT.gen.cs @@ -0,0 +1,56 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalBufferInfoEXT - Structure that identifies a VkDeviceMemory object and corresponding Metal MTLBuffer object + /// + /// + /// + /// To export the Metal MTLBuffer object underlying a VkDeviceMemory + /// object, include a VkExportMetalBufferInfoEXT structure in the + /// pNext chain of the pMetalObjectsInfo parameter of a + /// vkExportMetalObjectsEXT call. + /// + /// + /// The VkExportMetalBufferInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalBufferInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// MTLBuffer_id mtlBuffer; + /// } VkExportMetalBufferInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalBufferInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalBufferInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is a VkDeviceMemory. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// MtlBuffer is the Metal `id<MTLBuffer>` object underlying the VkDeviceMemory object in memory. The implementation will return the MTLBuffer in this member, or it will return `NULL` if no MTLBuffer could be found underlying the VkDeviceMemory object. + /// + [FieldOffset(24)] + public nint MtlBuffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalCommandQueueInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalCommandQueueInfoEXT.gen.cs new file mode 100644 index 0000000..949f8f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalCommandQueueInfoEXT.gen.cs @@ -0,0 +1,56 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalCommandQueueInfoEXT - Structure that identifies a VkQueue object and corresponding Metal MTLCommandQueue object + /// + /// + /// + /// To export the Metal MTLCommandQueue object underlying a VkQueue + /// object, include a VkExportMetalCommandQueueInfoEXT structure in the + /// pNext chain of the pMetalObjectsInfo parameter of a + /// vkExportMetalObjectsEXT call. + /// + /// + /// The VkExportMetalCommandQueueInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalCommandQueueInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkQueue queue; + /// MTLCommandQueue_id mtlCommandQueue; + /// } VkExportMetalCommandQueueInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalCommandQueueInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalCommandQueueInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Queue is a VkQueue. + /// + [FieldOffset(16)] + public VkQueue Queue; + + /// + /// MtlCommandQueue is the Metal `id<MTLCommandQueue>` object underlying the VkQueue object in queue. The implementation will return the MTLCommandQueue in this member, or it will return `NULL` if no MTLCommandQueue could be found underlying the VkQueue object. + /// + [FieldOffset(24)] + public nint MtlCommandQueue; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalDeviceInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalDeviceInfoEXT.gen.cs new file mode 100644 index 0000000..66ad12c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalDeviceInfoEXT.gen.cs @@ -0,0 +1,49 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalDeviceInfoEXT - Structure that identifies a VkDevice object and corresponding Metal MTLDevice object + /// + /// + /// + /// To export the Metal MTLDevice object underlying the + /// VkPhysicalDevice associated with a VkDevice object, include a + /// VkExportMetalDeviceInfoEXT structure in the pNext chain of the + /// pMetalObjectsInfo parameter of a vkExportMetalObjectsEXT call. + /// + /// + /// The VkExportMetalDeviceInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalDeviceInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// MTLDevice_id mtlDevice; + /// } VkExportMetalDeviceInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalDeviceInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalDeviceInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MtlDevice is the Metal `id<MTLDevice>` object underlying the VkPhysicalDevice associated with the VkDevice object identified in the call. The implementation will return the MTLDevice in this member, or it will return `NULL` if no MTLDevice could be found underlying the VkPhysicalDevice object. + /// + [FieldOffset(16)] + public nint MtlDevice; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalIOSurfaceInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalIOSurfaceInfoEXT.gen.cs new file mode 100644 index 0000000..51043dc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalIOSurfaceInfoEXT.gen.cs @@ -0,0 +1,56 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalIOSurfaceInfoEXT - Structure that identifies a VkImage object and corresponding Metal IOSurfaceRef object + /// + /// + /// + /// To export the Metal basetype:IOSurfaceRef object underlying a VkImage + /// object, include a VkExportMetalIOSurfaceInfoEXT structure in the + /// pNext chain of the pMetalObjectsInfo parameter of a + /// vkExportMetalObjectsEXT call. + /// + /// + /// The VkExportMetalIOSurfaceInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalIOSurfaceInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// IOSurfaceRef ioSurface; + /// } VkExportMetalIOSurfaceInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalIOSurfaceInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalIoSurfaceInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is a VkImage. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// IoSurface is the Metal basetype:IOSurfaceRef object underlying the VkImage object in image. The implementation will return the basetype:IOSurfaceRef in this member, or it will return `NULL` if no basetype:IOSurfaceRef could be found underlying the VkImage object. + /// + [FieldOffset(24)] + public nint IoSurface; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectCreateInfoEXT.gen.cs new file mode 100644 index 0000000..4df74c7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectCreateInfoEXT.gen.cs @@ -0,0 +1,53 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalObjectCreateInfoEXT - Structure that identifies the Metal objects that can be exported from Vulkan objects + /// + /// + /// + /// To export Metal objects from Vulkan objects, the application must first + /// indicate the intention to do so during the creation of the Vulkan object, by + /// including one or more VkExportMetalObjectCreateInfoEXT structures in + /// the pNext chain of the VkInstanceCreateInfo, + /// VkMemoryAllocateInfo, VkImageCreateInfo, + /// VkImageViewCreateInfo, VkBufferViewCreateInfo, + /// VkSemaphoreCreateInfo, or VkEventCreateInfo, in the + /// corresponding Vulkan object creation command. + /// + /// + /// The VkExportMetalObjectCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalObjectCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkExportMetalObjectTypeFlagBitsEXT exportObjectType; + /// } VkExportMetalObjectCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalObjectCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalObjectCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExportObjectType is a VkExportMetalObjectTypeFlagsEXT indicating the type of Metal object that the application may request to be exported from the Vulkan object. + /// + [FieldOffset(16)] + public VkExportMetalObjectTypeFlagsEXT ExportObjectType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectsInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectsInfoEXT.gen.cs new file mode 100644 index 0000000..0e47f37 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalObjectsInfoEXT.gen.cs @@ -0,0 +1,36 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalObjectsInfoEXT - Structure whose pNext chain identifies Vulkan objects and corresponding Metal objects + /// + /// + /// + /// The VkExportMetalObjectsInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalObjectsInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// } VkExportMetalObjectsInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalObjectsInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalObjectsInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalSharedEventInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalSharedEventInfoEXT.gen.cs new file mode 100644 index 0000000..6092c3d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalSharedEventInfoEXT.gen.cs @@ -0,0 +1,64 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalSharedEventInfoEXT - Structure that identifies a VkSemaphore or VkEvent object and corresponding Metal MTLSharedEvent object + /// + /// + /// + /// To export the Metal MTLSharedEvent object underlying a + /// VkSemaphore or VkEvent object, include a + /// VkExportMetalSharedEventInfoEXT structure in the pNext chain of + /// the pMetalObjectsInfo parameter of a vkExportMetalObjectsEXT + /// call. + /// + /// + /// The VkExportMetalSharedEventInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalSharedEventInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// VkEvent event; + /// MTLSharedEvent_id mtlSharedEvent; + /// } VkExportMetalSharedEventInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalSharedEventInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalSharedEventInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is VK_NULL_HANDLE or a VkSemaphore. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// Event is VK_NULL_HANDLE or a VkEvent. + /// + [FieldOffset(24)] + public VkEvent Event; + + /// + /// MtlSharedEvent is the Metal `id<MTLSharedEvent>` object underlying the VkSemaphore or VkEvent object in semaphore or event, respectively. The implementation will return the MTLSharedEvent in this member, or it will return `NULL` if no MTLSharedEvent could be found underlying the VkSemaphore or VkEvent object. + /// + [FieldOffset(32)] + public nint MtlSharedEvent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalTextureInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalTextureInfoEXT.gen.cs new file mode 100644 index 0000000..dbb7884 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportMetalTextureInfoEXT.gen.cs @@ -0,0 +1,77 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkExportMetalTextureInfoEXT - Structure that identifies a VkImage, VkImageView, or VkBufferView object and corresponding Metal MTLTexture object + /// + /// + /// + /// To export a Metal MTLTexture object underlying a VkImage, + /// VkImageView, or VkBufferView object, include a + /// VkExportMetalTextureInfoEXT structure in the pNext chain of the + /// pMetalObjectsInfo parameter of a vkExportMetalObjectsEXT call. + /// + /// + /// The VkExportMetalTextureInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkExportMetalTextureInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// VkImageView imageView; + /// VkBufferView bufferView; + /// VkImageAspectFlagBits plane; + /// MTLTexture_id mtlTexture; + /// } VkExportMetalTextureInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkExportMetalTextureInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMetalTextureInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is VK_NULL_HANDLE or a VkImage. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// ImageView is VK_NULL_HANDLE or a VkImageView. + /// + [FieldOffset(24)] + public VkImageView ImageView; + + /// + /// BufferView is VK_NULL_HANDLE or a VkBufferView. + /// + [FieldOffset(32)] + public VkBufferView BufferView; + + /// + /// Plane specifies the plane of a multi-planar VkImage or VkImageView. + /// + [FieldOffset(40)] + public VkImageAspectFlags Plane; + + /// + /// MtlTexture is the Metal `id<MTLTexture>` object underlying the VkImage, VkImageView, or VkBufferView object in image, imageView, or bufferView, respectively, at the plane indicated in aspectMask. The implementation will return the MTLTexture in this member, or it will return `NULL` if no MTLTexture could be found underlying the VkImage, VkImageView, or VkBufferView object, at the plane indicated in aspectMask. + /// + [FieldOffset(48)] + public nint MtlTexture; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExportSemaphoreWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportSemaphoreWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..ed73f64 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExportSemaphoreWin32HandleInfoKHR.gen.cs @@ -0,0 +1,60 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkExportSemaphoreWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a semaphore + /// + /// + /// + /// To specify additional attributes of NT handles exported from a semaphore, + /// add a VkExportSemaphoreWin32HandleInfoKHR structure to the pNext + /// chain of the VkSemaphoreCreateInfo structure. + /// The VkExportSemaphoreWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_semaphore_win32 + /// typedef struct VkExportSemaphoreWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const SECURITY_ATTRIBUTES* pAttributes; + /// DWORD dwAccess; + /// LPCWSTR name; + /// } VkExportSemaphoreWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkExportSemaphoreWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportSemaphoreWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Attributes is a pointer to a Windows SECURITY_ATTRIBUTES structure specifying security attributes of the handle. + /// + [FieldOffset(16)] + public void* Attributes; + + /// + /// DwAccess is a DWORD specifying access rights of the handle. + /// + [FieldOffset(24)] + public int DwAccess; + + /// + /// Name is a null-terminated UTF-16 string to associate with the underlying synchronization primitive referenced by NT handles exported from the created semaphore. + /// + [FieldOffset(32)] + public char* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkExternalFormatANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkExternalFormatANDROID.gen.cs new file mode 100644 index 0000000..76635ef --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkExternalFormatANDROID.gen.cs @@ -0,0 +1,43 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkExternalFormatANDROID - Structure containing an Android hardware buffer external format + /// + /// + /// + /// VkExternalFormatANDROID is defined as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// typedef struct VkExternalFormatANDROID { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t externalFormat; + /// } VkExternalFormatANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkExternalFormatANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalFormatANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalFormat is an implementation-defined identifier for the external format + /// + [FieldOffset(16)] + public nint ExternalFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkFenceGetWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkFenceGetWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..88beb4b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkFenceGetWin32HandleInfoKHR.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkFenceGetWin32HandleInfoKHR - Structure describing a Win32 handle fence export operation + /// + /// + /// + /// The VkFenceGetWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_fence_win32 + /// typedef struct VkFenceGetWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkFence fence; + /// VkExternalFenceHandleTypeFlagBits handleType; + /// } VkFenceGetWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkFenceGetWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FenceGetWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Fence is the fence from which state will be exported. + /// + [FieldOffset(16)] + public VkFence Fence; + + /// + /// HandleType is a VkExternalFenceHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalFenceHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportAndroidHardwareBufferInfoANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportAndroidHardwareBufferInfoANDROID.gen.cs new file mode 100644 index 0000000..21a206c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportAndroidHardwareBufferInfoANDROID.gen.cs @@ -0,0 +1,47 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkImportAndroidHardwareBufferInfoANDROID - Import memory from an Android hardware buffer + /// + /// + /// + /// To import memory created outside of the current Vulkan instance from an + /// Android hardware buffer, add a + /// VkImportAndroidHardwareBufferInfoANDROID structure to the pNext + /// chain of the VkMemoryAllocateInfo structure. + /// The VkImportAndroidHardwareBufferInfoANDROID structure is defined as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// typedef struct VkImportAndroidHardwareBufferInfoANDROID { + /// VkStructureType sType; + /// const void* pNext; + /// struct AHardwareBuffer* buffer; + /// } VkImportAndroidHardwareBufferInfoANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkImportAndroidHardwareBufferInfoANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportANDROIDHardwareBufferInfoANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer is the Android hardware buffer to import. + /// + [FieldOffset(16)] + public void* Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportFenceWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportFenceWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..6f7a610 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportFenceWin32HandleInfoKHR.gen.cs @@ -0,0 +1,71 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkImportFenceWin32HandleInfoKHR - (None) + /// + /// + /// + /// The VkImportFenceWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_fence_win32 + /// typedef struct VkImportFenceWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkFence fence; + /// VkFenceImportFlags flags; + /// VkExternalFenceHandleTypeFlagBits handleType; + /// HANDLE handle; + /// LPCWSTR name; + /// } VkImportFenceWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkImportFenceWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportFenceWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Fence is the fence into which the state will be imported. + /// + [FieldOffset(16)] + public VkFence Fence; + + /// + /// Flags is a bitmask of VkFenceImportFlags specifying additional parameters for the fence payload import operation. + /// + [FieldOffset(24)] + public VkFenceImportFlags Flags; + + /// + /// HandleType is a VkExternalFenceHandleTypeFlags value specifying the type of handle. + /// + [FieldOffset(28)] + public VkExternalFenceHandleTypeFlags HandleType; + + /// + /// Handle is `NULL` or the external handle to import. + /// + [FieldOffset(32)] + public nint Handle; + + /// + /// Name is `NULL` or a null-terminated UTF-16 string naming the underlying synchronization primitive to import. + /// + [FieldOffset(40)] + public char* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryMetalHandleInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryMetalHandleInfoEXT.gen.cs new file mode 100644 index 0000000..49a4f34 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryMetalHandleInfoEXT.gen.cs @@ -0,0 +1,55 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkImportMemoryMetalHandleInfoEXT - Import Metal memory created on the same physical device + /// + /// + /// + /// To import memory from a Metal handle, add a + /// VkImportMemoryMetalHandleInfoEXT structure to the pNext chain of + /// the VkMemoryAllocateInfo structure. + /// + /// + /// The VkImportMemoryMetalHandleInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_metal + /// typedef struct VkImportMemoryMetalHandleInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// void* handle; + /// } VkImportMemoryMetalHandleInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkImportMemoryMetalHandleInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMemoryMetalHandleInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the type of handle or name. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleType; + + /// + /// Handle is `NULL` or the external handle to import. + /// + [FieldOffset(24)] + public void* Handle; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..1dbbac7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoKHR.gen.cs @@ -0,0 +1,62 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkImportMemoryWin32HandleInfoKHR - Import Win32 memory created on the same physical device + /// + /// + /// + /// To import memory from a Windows handle, add a + /// VkImportMemoryWin32HandleInfoKHR structure to the pNext chain of + /// the VkMemoryAllocateInfo structure. + /// + /// + /// The VkImportMemoryWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_win32 + /// typedef struct VkImportMemoryWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// HANDLE handle; + /// LPCWSTR name; + /// } VkImportMemoryWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkImportMemoryWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMemoryWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the type of handle or name. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleType; + + /// + /// Handle is `NULL` or the external handle to import. + /// + [FieldOffset(24)] + public nint Handle; + + /// + /// Name is `NULL` or a null-terminated UTF-16 string naming the payload to import. + /// + [FieldOffset(32)] + public char* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoNV.gen.cs new file mode 100644 index 0000000..525e3ed --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMemoryWin32HandleInfoNV.gen.cs @@ -0,0 +1,56 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkImportMemoryWin32HandleInfoNV - Import Win32 memory created on the same physical device + /// + /// + /// + /// To import memory created on the same physical device but outside of the + /// current Vulkan instance, add a VkImportMemoryWin32HandleInfoNV + /// structure to the pNext chain of the VkMemoryAllocateInfo + /// structure, specifying a handle to and the type of the memory. + /// + /// + /// The VkImportMemoryWin32HandleInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_memory_win32 + /// typedef struct VkImportMemoryWin32HandleInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagsNV handleType; + /// HANDLE handle; + /// } VkImportMemoryWin32HandleInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkImportMemoryWin32HandleInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMemoryWin32HandleInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is `0` or a VkExternalMemoryHandleTypeFlagsNV value specifying the type of memory handle in handle. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlagsNV HandleType; + + /// + /// Handle is a Windows HANDLE referring to the memory. + /// + [FieldOffset(24)] + public nint Handle; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalBufferInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalBufferInfoEXT.gen.cs new file mode 100644 index 0000000..abda07d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalBufferInfoEXT.gen.cs @@ -0,0 +1,49 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkImportMetalBufferInfoEXT - Structure that identifies a Metal MTLBuffer object to use when creating a VkDeviceMemory object. + /// + /// + /// + /// To import a Metal MTLBuffer object to underlie a VkDeviceMemory + /// object, include a VkImportMetalBufferInfoEXT structure in the + /// pNext chain of the VkMemoryAllocateInfo structure in a + /// vkAllocateMemory command. + /// + /// + /// The VkImportMetalBufferInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkImportMetalBufferInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// MTLBuffer_id mtlBuffer; + /// } VkImportMetalBufferInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkImportMetalBufferInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMetalBufferInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MtlBuffer is the Metal `id<MTLBuffer>` object that is to underlie the VkDeviceMemory. + /// + [FieldOffset(16)] + public nint MtlBuffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalIOSurfaceInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalIOSurfaceInfoEXT.gen.cs new file mode 100644 index 0000000..6f11d1d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalIOSurfaceInfoEXT.gen.cs @@ -0,0 +1,49 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkImportMetalIOSurfaceInfoEXT - Structure that identifies a VkImage object and corresponding Metal IOSurfaceRef object to use. + /// + /// + /// + /// To import, or create, a Metal basetype:IOSurfaceRef object to underlie a + /// VkImage object, include a VkImportMetalIOSurfaceInfoEXT + /// structure in the pNext chain of the VkImageCreateInfo structure + /// in a vkCreateImage command. + /// + /// + /// The VkImportMetalIOSurfaceInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkImportMetalIOSurfaceInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// IOSurfaceRef ioSurface; + /// } VkImportMetalIOSurfaceInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkImportMetalIOSurfaceInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMetalIoSurfaceInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IoSurface is VK_NULL_HANDLE or the Metal basetype:IOSurfaceRef object that is to underlie the VkImage. + /// + [FieldOffset(16)] + public nint IoSurface; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalSharedEventInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalSharedEventInfoEXT.gen.cs new file mode 100644 index 0000000..7a3d432 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalSharedEventInfoEXT.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkImportMetalSharedEventInfoEXT - Structure that identifies a VkSemaphore or VkEvent object and corresponding Metal Shared Event object to use. + /// + /// + /// + /// To import a Metal `id<MTLSharedEvent>` object to underlie a + /// VkSemaphore or VkEvent object, include a + /// VkImportMetalSharedEventInfoEXT structure in the pNext chain of + /// the VkSemaphoreCreateInfo or VkEventCreateInfo structure in a + /// vkCreateSemaphore or vkCreateEvent command, respectively. + /// + /// + /// The VkImportMetalSharedEventInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkImportMetalSharedEventInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// MTLSharedEvent_id mtlSharedEvent; + /// } VkImportMetalSharedEventInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkImportMetalSharedEventInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMetalSharedEventInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MtlSharedEvent is the Metal `id<MTLSharedEvent>` object that is to underlie the VkSemaphore or VkEvent. + /// + [FieldOffset(16)] + public nint MtlSharedEvent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalTextureInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalTextureInfoEXT.gen.cs new file mode 100644 index 0000000..8e01fc3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportMetalTextureInfoEXT.gen.cs @@ -0,0 +1,56 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkImportMetalTextureInfoEXT - Structure that identifies Metal MTLTexture objects to use when creating a VkImage. + /// + /// + /// + /// To import one or more existing Metal MTLTexture objects to underlie a + /// VkImage object, include one or more VkImportMetalTextureInfoEXT + /// structures in the pNext chain of the VkImageCreateInfo structure + /// in a vkCreateImage command. + /// + /// + /// The VkImportMetalTextureInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_objects + /// typedef struct VkImportMetalTextureInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageAspectFlagBits plane; + /// MTLTexture_id mtlTexture; + /// } VkImportMetalTextureInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkImportMetalTextureInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMetalTextureInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Plane specifies the plane of the VkImage that the `id<MTLTexture>` object should be attached to. + /// + [FieldOffset(16)] + public VkImageAspectFlags Plane; + + /// + /// MtlTexture is a the Metal `id<MTLTexture>` object that is to underlie the VkImage plane. + /// + [FieldOffset(24)] + public nint MtlTexture; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkImportSemaphoreWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportSemaphoreWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..631b624 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkImportSemaphoreWin32HandleInfoKHR.gen.cs @@ -0,0 +1,71 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkImportSemaphoreWin32HandleInfoKHR - Structure specifying Windows handle to import to a semaphore + /// + /// + /// + /// The VkImportSemaphoreWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_semaphore_win32 + /// typedef struct VkImportSemaphoreWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// VkSemaphoreImportFlags flags; + /// VkExternalSemaphoreHandleTypeFlagBits handleType; + /// HANDLE handle; + /// LPCWSTR name; + /// } VkImportSemaphoreWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkImportSemaphoreWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportSemaphoreWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is the semaphore into which the payload will be imported. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// Flags is a bitmask of VkSemaphoreImportFlags specifying additional parameters for the semaphore payload import operation. + /// + [FieldOffset(24)] + public VkSemaphoreImportFlags Flags; + + /// + /// HandleType is a VkExternalSemaphoreHandleTypeFlags value specifying the type of handle. + /// + [FieldOffset(28)] + public VkExternalSemaphoreHandleTypeFlags HandleType; + + /// + /// Handle is `NULL` or the external handle to import. + /// + [FieldOffset(32)] + public nint Handle; + + /// + /// Name is `NULL` or a null-terminated UTF-16 string naming the underlying synchronization primitive to import. + /// + [FieldOffset(40)] + public char* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetAndroidHardwareBufferInfoANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetAndroidHardwareBufferInfoANDROID.gen.cs new file mode 100644 index 0000000..0356fe6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetAndroidHardwareBufferInfoANDROID.gen.cs @@ -0,0 +1,44 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkMemoryGetAndroidHardwareBufferInfoANDROID - Structure describing an Android hardware buffer memory export operation + /// + /// + /// + /// The VkMemoryGetAndroidHardwareBufferInfoANDROID structure is defined + /// as: + /// + /// + /// // Provided by VK_ANDROID_external_memory_android_hardware_buffer + /// typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// } VkMemoryGetAndroidHardwareBufferInfoANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkMemoryGetAndroidHardwareBufferInfoANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryGetANDROIDHardwareBufferInfoANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the memory object from which the Android hardware buffer will be exported. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetMetalHandleInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetMetalHandleInfoEXT.gen.cs new file mode 100644 index 0000000..74693f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetMetalHandleInfoEXT.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkMemoryGetMetalHandleInfoEXT - Structure describing a Metal handle memory export operation + /// + /// + /// + /// The VkMemoryGetMetalHandleInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_metal + /// typedef struct VkMemoryGetMetalHandleInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkMemoryGetMetalHandleInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkMemoryGetMetalHandleInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryGetMetalHandleInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the memory object from which the handle will be exported. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..0b5612d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryGetWin32HandleInfoKHR.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkMemoryGetWin32HandleInfoKHR - Structure describing a Win32 handle memory export operation + /// + /// + /// + /// The VkMemoryGetWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_win32 + /// typedef struct VkMemoryGetWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkMemoryGetWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkMemoryGetWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryGetWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the memory object from which the handle will be exported. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryMetalHandlePropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryMetalHandlePropertiesEXT.gen.cs new file mode 100644 index 0000000..7e00b2f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryMetalHandlePropertiesEXT.gen.cs @@ -0,0 +1,43 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkMemoryMetalHandlePropertiesEXT - Properties of External Memory Metal Handles + /// + /// + /// + /// The VkMemoryMetalHandlePropertiesEXT structure returned is defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_metal + /// typedef struct VkMemoryMetalHandlePropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t memoryTypeBits; + /// } VkMemoryMetalHandlePropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkMemoryMetalHandlePropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryMetalHandlePropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryTypeBits is a bitmask containing one bit set for every memory type which the specified Metal handle can be imported as. + /// + [FieldOffset(16)] + public int MemoryTypeBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryWin32HandlePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryWin32HandlePropertiesKHR.gen.cs new file mode 100644 index 0000000..579ef30 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkMemoryWin32HandlePropertiesKHR.gen.cs @@ -0,0 +1,43 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkMemoryWin32HandlePropertiesKHR - Properties of External Memory Windows Handles + /// + /// + /// + /// The VkMemoryWin32HandlePropertiesKHR structure returned is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_win32 + /// typedef struct VkMemoryWin32HandlePropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t memoryTypeBits; + /// } VkMemoryWin32HandlePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkMemoryWin32HandlePropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryWin32HandlePropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryTypeBits is a bitmask containing one bit set for every memory type which the specified windows handle can be imported as. + /// + [FieldOffset(16)] + public int MemoryTypeBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkMetalSurfaceCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkMetalSurfaceCreateInfoEXT.gen.cs new file mode 100644 index 0000000..62f8054 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkMetalSurfaceCreateInfoEXT.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Metal +{ + /// + /// VkMetalSurfaceCreateInfoEXT - Structure specifying parameters of a newly created Metal surface object + /// + /// + /// + /// The VkMetalSurfaceCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_metal_surface + /// typedef struct VkMetalSurfaceCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkMetalSurfaceCreateFlagsEXT flags; + /// const CAMetalLayer* pLayer; + /// } VkMetalSurfaceCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("macos"), SupportedOSPlatform("ios")] + public unsafe partial struct VkMetalSurfaceCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MetalSurfaceCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkMetalSurfaceCreateFlagsEXT Flags; + + /// + /// Layer is a reference to a basetype:CAMetalLayer object representing a renderable surface. + /// + [FieldOffset(24)] + public void* Layer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.gen.cs new file mode 100644 index 0000000..6480900 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolveFeaturesANDROID.gen.cs @@ -0,0 +1,44 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkPhysicalDeviceExternalFormatResolveFeaturesANDROID - Structure describing whether external format resolves are supported + /// + /// + /// + /// The VkPhysicalDeviceExternalFormatResolveFeaturesANDROID structure is + /// defined as: + /// + /// + /// // Provided by VK_ANDROID_external_format_resolve + /// typedef struct VkPhysicalDeviceExternalFormatResolveFeaturesANDROID { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 externalFormatResolve; + /// } VkPhysicalDeviceExternalFormatResolveFeaturesANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkPhysicalDeviceExternalFormatResolveFeaturesANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalFormatResolveFeaturesANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalFormatResolve + /// + [FieldOffset(16)] + public Brutal.Bool32 ExternalFormatResolve; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.gen.cs new file mode 100644 index 0000000..b1ff032 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkPhysicalDeviceExternalFormatResolvePropertiesANDROID.gen.cs @@ -0,0 +1,58 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Android +{ + /// + /// VkPhysicalDeviceExternalFormatResolvePropertiesANDROID - Structure describing external format resolve supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceExternalFormatResolvePropertiesANDROID structure + /// is defined as: + /// + /// + /// // Provided by VK_ANDROID_external_format_resolve + /// typedef struct VkPhysicalDeviceExternalFormatResolvePropertiesANDROID { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 nullColorAttachmentWithExternalFormatResolve; + /// VkChromaLocation externalFormatResolveChromaOffsetX; + /// VkChromaLocation externalFormatResolveChromaOffsetY; + /// } VkPhysicalDeviceExternalFormatResolvePropertiesANDROID; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("android")] + public unsafe partial struct VkPhysicalDeviceExternalFormatResolvePropertiesANDROID() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalFormatResolvePropertiesANDROID; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NullColorAttachmentWithExternalFormatResolve + /// + [FieldOffset(16)] + public Brutal.Bool32 NullColorAttachmentWithExternalFormatResolve; + + /// + /// ExternalFormatResolveChromaOffsetX + /// + [FieldOffset(20)] + public VkChromaLocation ExternalFormatResolveChromaOffsetX; + + /// + /// ExternalFormatResolveChromaOffsetY + /// + [FieldOffset(24)] + public VkChromaLocation ExternalFormatResolveChromaOffsetY; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkSemaphoreGetWin32HandleInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkSemaphoreGetWin32HandleInfoKHR.gen.cs new file mode 100644 index 0000000..baed988 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkSemaphoreGetWin32HandleInfoKHR.gen.cs @@ -0,0 +1,50 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkSemaphoreGetWin32HandleInfoKHR - Structure describing a Win32 handle semaphore export operation + /// + /// + /// + /// The VkSemaphoreGetWin32HandleInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_semaphore_win32 + /// typedef struct VkSemaphoreGetWin32HandleInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// VkExternalSemaphoreHandleTypeFlagBits handleType; + /// } VkSemaphoreGetWin32HandleInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkSemaphoreGetWin32HandleInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreGetWin32HandleInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is the semaphore from which state will be exported. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// HandleType is a VkExternalSemaphoreHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalSemaphoreHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceCapabilitiesFullScreenExclusiveEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceCapabilitiesFullScreenExclusiveEXT.gen.cs new file mode 100644 index 0000000..e16eb78 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceCapabilitiesFullScreenExclusiveEXT.gen.cs @@ -0,0 +1,44 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkSurfaceCapabilitiesFullScreenExclusiveEXT - Structure describing full screen exclusive capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilitiesFullScreenExclusiveEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive + /// typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fullScreenExclusiveSupported; + /// } VkSurfaceCapabilitiesFullScreenExclusiveEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkSurfaceCapabilitiesFullScreenExclusiveEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceCapabilitiesFullScreenExclusiveEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FullScreenExclusiveSupported is a boolean describing whether the surface is able to make use of exclusive full-screen access. + /// + [FieldOffset(16)] + public Brutal.Bool32 FullScreenExclusiveSupported; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveInfoEXT.gen.cs new file mode 100644 index 0000000..e0ecb52 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveInfoEXT.gen.cs @@ -0,0 +1,48 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkSurfaceFullScreenExclusiveInfoEXT - Structure specifying the preferred full-screen transition behavior + /// + /// + /// + /// If the pNext chain of VkSwapchainCreateInfoKHR includes a + /// VkSurfaceFullScreenExclusiveInfoEXT structure, then that structure + /// specifies the application's preferred full-screen transition behavior. + /// + /// + /// The VkSurfaceFullScreenExclusiveInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_full_screen_exclusive + /// typedef struct VkSurfaceFullScreenExclusiveInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkFullScreenExclusiveEXT fullScreenExclusive; + /// } VkSurfaceFullScreenExclusiveInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkSurfaceFullScreenExclusiveInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceFullScreenExclusiveInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FullScreenExclusive is a VkFullScreenExclusiveEXT value specifying the preferred full-screen transition behavior. + /// + [FieldOffset(16)] + public VkFullScreenExclusiveEXT FullScreenExclusive; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveWin32InfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveWin32InfoEXT.gen.cs new file mode 100644 index 0000000..1f3f436 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkSurfaceFullScreenExclusiveWin32InfoEXT.gen.cs @@ -0,0 +1,43 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkSurfaceFullScreenExclusiveWin32InfoEXT - Structure specifying additional creation parameters specific to Win32 fullscreen exclusive mode + /// + /// + /// + /// The VkSurfaceFullScreenExclusiveWin32InfoEXT structure is defined as: + /// + /// + /// // Provided by VK_KHR_win32_surface with VK_EXT_full_screen_exclusive + /// typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// HMONITOR hmonitor; + /// } VkSurfaceFullScreenExclusiveWin32InfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkSurfaceFullScreenExclusiveWin32InfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceFullScreenExclusiveWin32InfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Hmonitor is the Win32 HMONITOR handle identifying the display to create the surface with. + /// + [FieldOffset(16)] + public nint Hmonitor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkWaylandSurfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkWaylandSurfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..bcb000f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkWaylandSurfaceCreateInfoKHR.gen.cs @@ -0,0 +1,57 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Wayland +{ + /// + /// VkWaylandSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Wayland surface object + /// + /// + /// + /// The VkWaylandSurfaceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_wayland_surface + /// typedef struct VkWaylandSurfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkWaylandSurfaceCreateFlagsKHR flags; + /// struct wl_display* display; + /// struct wl_surface* surface; + /// } VkWaylandSurfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("linux")] + public unsafe partial struct VkWaylandSurfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WaylandSurfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkWaylandSurfaceCreateFlagsKHR Flags; + + /// + /// Display and surface are pointers to the Wayland wl_display and wl_surface to associate the surface with. + /// + [FieldOffset(24)] + public void* Display; + + /// + /// Surface + /// + [FieldOffset(32)] + public void* Surface; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoKHR.gen.cs new file mode 100644 index 0000000..bb158b1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoKHR.gen.cs @@ -0,0 +1,99 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkWin32KeyedMutexAcquireReleaseInfoKHR - Use the Windows keyed mutex mechanism to synchronize work + /// + /// + /// + /// When submitting work that operates on memory imported from a Direct3D 11 + /// resource to a queue, the keyed mutex mechanism may: be used in addition to + /// Vulkan semaphores to synchronize the work. + /// Keyed mutexes are a property of a properly created shareable Direct3D 11 + /// resource. + /// They can only be used if the imported resource was created with the + /// etext:D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag. + /// + /// + /// To acquire keyed mutexes before submitted work and/or release them after, + /// add a VkWin32KeyedMutexAcquireReleaseInfoKHR structure to the + /// pNext chain of the VkSubmitInfo structure. + /// + /// + /// The VkWin32KeyedMutexAcquireReleaseInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_win32_keyed_mutex + /// typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t acquireCount; + /// const VkDeviceMemory* pAcquireSyncs; + /// const uint64_t* pAcquireKeys; + /// const uint32_t* pAcquireTimeouts; + /// uint32_t releaseCount; + /// const VkDeviceMemory* pReleaseSyncs; + /// const uint64_t* pReleaseKeys; + /// } VkWin32KeyedMutexAcquireReleaseInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkWin32KeyedMutexAcquireReleaseInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.Win32KeyedMutexAcquireReleaseInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AcquireCount is the number of entries in the pAcquireSyncs, pAcquireKeys, and pAcquireTimeouts arrays. + /// + [FieldOffset(16)] + public int AcquireCount; + + /// + /// AcquireSyncs is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources. + /// + [FieldOffset(24)] + public VkDeviceMemory* AcquireSyncs; + + /// + /// AcquireKeys is a pointer to an array of mutex key values to wait for prior to beginning the submitted work. Entries refer to the keyed mutex associated with the corresponding entries in pAcquireSyncs. + /// + [FieldOffset(32)] + public nint* AcquireKeys; + + /// + /// AcquireTimeouts is a pointer to an array of timeout values, in millisecond units, for each acquire specified in pAcquireKeys. + /// + [FieldOffset(40)] + public int* AcquireTimeouts; + + /// + /// ReleaseCount is the number of entries in the pReleaseSyncs and pReleaseKeys arrays. + /// + [FieldOffset(48)] + public int ReleaseCount; + + /// + /// ReleaseSyncs is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources. + /// + [FieldOffset(56)] + public VkDeviceMemory* ReleaseSyncs; + + /// + /// ReleaseKeys is a pointer to an array of mutex key values to set when the submitted work has completed. Entries refer to the keyed mutex associated with the corresponding entries in pReleaseSyncs. + /// + [FieldOffset(64)] + public nint* ReleaseKeys; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoNV.gen.cs new file mode 100644 index 0000000..6d220e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32KeyedMutexAcquireReleaseInfoNV.gen.cs @@ -0,0 +1,99 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkWin32KeyedMutexAcquireReleaseInfoNV - Use Windows keyex mutex mechanism to synchronize work + /// + /// + /// + /// When submitting work that operates on memory imported from a Direct3D 11 + /// resource to a queue, the keyed mutex mechanism may: be used in addition to + /// Vulkan semaphores to synchronize the work. + /// Keyed mutexes are a property of a properly created shareable Direct3D 11 + /// resource. + /// They can only be used if the imported resource was created with the + /// etext:D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag. + /// + /// + /// To acquire keyed mutexes before submitted work and/or release them after, + /// add a VkWin32KeyedMutexAcquireReleaseInfoNV structure to the + /// pNext chain of the VkSubmitInfo structure. + /// + /// + /// The VkWin32KeyedMutexAcquireReleaseInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_win32_keyed_mutex + /// typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t acquireCount; + /// const VkDeviceMemory* pAcquireSyncs; + /// const uint64_t* pAcquireKeys; + /// const uint32_t* pAcquireTimeoutMilliseconds; + /// uint32_t releaseCount; + /// const VkDeviceMemory* pReleaseSyncs; + /// const uint64_t* pReleaseKeys; + /// } VkWin32KeyedMutexAcquireReleaseInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkWin32KeyedMutexAcquireReleaseInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.Win32KeyedMutexAcquireReleaseInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AcquireCount is the number of entries in the pAcquireSyncs, pAcquireKeys, and pAcquireTimeoutMilliseconds arrays. + /// + [FieldOffset(16)] + public int AcquireCount; + + /// + /// AcquireSyncs is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources. + /// + [FieldOffset(24)] + public VkDeviceMemory* AcquireSyncs; + + /// + /// AcquireKeys is a pointer to an array of mutex key values to wait for prior to beginning the submitted work. Entries refer to the keyed mutex associated with the corresponding entries in pAcquireSyncs. + /// + [FieldOffset(32)] + public nint* AcquireKeys; + + /// + /// AcquireTimeoutMilliseconds is a pointer to an array of timeout values, in millisecond units, for each acquire specified in pAcquireKeys. + /// + [FieldOffset(40)] + public int* AcquireTimeoutMilliseconds; + + /// + /// ReleaseCount is the number of entries in the pReleaseSyncs and pReleaseKeys arrays. + /// + [FieldOffset(48)] + public int ReleaseCount; + + /// + /// ReleaseSyncs is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources. + /// + [FieldOffset(56)] + public VkDeviceMemory* ReleaseSyncs; + + /// + /// ReleaseKeys is a pointer to an array of mutex key values to set when the submitted work has completed. Entries refer to the keyed mutex associated with the corresponding entries in pReleaseSyncs. + /// + [FieldOffset(64)] + public nint* ReleaseKeys; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32SurfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32SurfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..1117b15 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkWin32SurfaceCreateInfoKHR.gen.cs @@ -0,0 +1,57 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Win32 +{ + /// + /// VkWin32SurfaceCreateInfoKHR - Structure specifying parameters of a newly created Win32 surface object + /// + /// + /// + /// The VkWin32SurfaceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_win32_surface + /// typedef struct VkWin32SurfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkWin32SurfaceCreateFlagsKHR flags; + /// HINSTANCE hinstance; + /// HWND hwnd; + /// } VkWin32SurfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("windows")] + public unsafe partial struct VkWin32SurfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.Win32SurfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkWin32SurfaceCreateFlagsKHR Flags; + + /// + /// Hinstance is the Win32 HINSTANCE for the window to associate the surface with. + /// + [FieldOffset(24)] + public nint Hinstance; + + /// + /// Hwnd is the Win32 HWND for the window to associate the surface with. + /// + [FieldOffset(32)] + public nint Hwnd; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkXcbSurfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkXcbSurfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..2e9bc46 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkXcbSurfaceCreateInfoKHR.gen.cs @@ -0,0 +1,57 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Xcb +{ + /// + /// VkXcbSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Xcb surface object + /// + /// + /// + /// The VkXcbSurfaceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_xcb_surface + /// typedef struct VkXcbSurfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkXcbSurfaceCreateFlagsKHR flags; + /// xcb_connection_t* connection; + /// xcb_window_t window; + /// } VkXcbSurfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("linux")] + public unsafe partial struct VkXcbSurfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.XcbSurfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkXcbSurfaceCreateFlagsKHR Flags; + + /// + /// Connection is a pointer to an xcb_connection_t to the X server. + /// + [FieldOffset(24)] + public void* Connection; + + /// + /// Window is the xcb_window_t for the X11 window to associate the surface with. + /// + [FieldOffset(32)] + public int Window; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/Platforms/VkXlibSurfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/Platforms/VkXlibSurfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..bb6956b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/Platforms/VkXlibSurfaceCreateInfoKHR.gen.cs @@ -0,0 +1,57 @@ +using System.Runtime.Versioning; + +namespace Brutal.VulkanApi.Xlib +{ + /// + /// VkXlibSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Xlib surface object + /// + /// + /// + /// The VkXlibSurfaceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_xlib_surface + /// typedef struct VkXlibSurfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkXlibSurfaceCreateFlagsKHR flags; + /// Display* dpy; + /// Window window; + /// } VkXlibSurfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + [SupportedOSPlatform("linux")] + public unsafe partial struct VkXlibSurfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.XlibSurfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkXlibSurfaceCreateFlagsKHR Flags; + + /// + /// Dpy is a pointer to an Xlib Display connection to the X server. + /// + [FieldOffset(24)] + public void* Dpy; + + /// + /// Window is an Xlib Window to associate the surface with. + /// + [FieldOffset(32)] + public nint Window; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1CDEF.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1CDEF.gen.cs new file mode 100644 index 0000000..01d5f0f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1CDEF.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 34)] + public unsafe partial struct StdVideoAV1CDEF() + { + /// + /// CdefDampingMinus_3 + /// + [FieldOffset(0)] + public byte CdefDampingMinus_3; + + /// + /// CdefBits + /// + [FieldOffset(1)] + public byte CdefBits; + + /// + [FieldOffset(2)] + public fixed byte CdefYPriStrength[8]; + + /// + [FieldOffset(10)] + public fixed byte CdefYSecStrength[8]; + + /// + [FieldOffset(18)] + public fixed byte CdefUvPriStrength[8]; + + /// + [FieldOffset(26)] + public fixed byte CdefUvSecStrength[8]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfig.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfig.gen.cs new file mode 100644 index 0000000..4d6c18c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfig.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct StdVideoAV1ColorConfig() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1ColorConfigFlags Flags; + + /// + /// BitDepth + /// + [FieldOffset(4)] + public byte BitDepth; + + /// + /// SubsamplingX + /// + [FieldOffset(5)] + public byte SubsamplingX; + + /// + /// SubsamplingY + /// + [FieldOffset(6)] + public byte SubsamplingY; + + /// + /// Reserved1 + /// + [FieldOffset(7)] + public byte Reserved1; + + /// + /// ColorPrimaries + /// + [FieldOffset(8)] + public StdVideoAV1ColorPrimaries ColorPrimaries; + + /// + /// TransferCharacteristics + /// + [FieldOffset(12)] + public StdVideoAV1TransferCharacteristics TransferCharacteristics; + + /// + /// MatrixCoefficients + /// + [FieldOffset(16)] + public StdVideoAV1MatrixCoefficients MatrixCoefficients; + + /// + /// ChromaSamplePosition + /// + [FieldOffset(20)] + public StdVideoAV1ChromaSamplePosition ChromaSamplePosition; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfigFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfigFlags.gen.cs new file mode 100644 index 0000000..308d41f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1ColorConfigFlags.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1ColorConfigFlags() + { + /// + /// MonoChrome + /// + [FieldOffset(0)] + private int _monoChrome; + + /// + /// ColorRange + /// + [FieldOffset(0)] + private int _colorRange; + + /// + /// SeparateUvDeltaQ + /// + [FieldOffset(0)] + private int _separateUvDeltaQ; + + /// + /// ColorDescriptionPresentFlag + /// + [FieldOffset(0)] + private int _colorDescriptionPresentFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1ColorConfigFlags + { + /// + public bool MonoChrome + { + get => BitFields.HasFlag(_monoChrome, 0); + set => BitFields.SetFlag(ref _monoChrome, 0, value); + } + + /// + public bool ColorRange + { + get => BitFields.HasFlag(_colorRange, 1); + set => BitFields.SetFlag(ref _colorRange, 1, value); + } + + /// + public bool SeparateUvDeltaQ + { + get => BitFields.HasFlag(_separateUvDeltaQ, 2); + set => BitFields.SetFlag(ref _separateUvDeltaQ, 2, value); + } + + /// + public bool ColorDescriptionPresentFlag + { + get => BitFields.HasFlag(_colorDescriptionPresentFlag, 3); + set => BitFields.SetFlag(ref _colorDescriptionPresentFlag, 3, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 4, length: 28); + set => BitFields.SetRange(ref _reserved, start: 4, length: 28, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrain.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrain.gen.cs new file mode 100644 index 0000000..b275278 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrain.gen.cs @@ -0,0 +1,139 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 164)] + public unsafe partial struct StdVideoAV1FilmGrain() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1FilmGrainFlags Flags; + + /// + /// GrainScalingMinus_8 + /// + [FieldOffset(4)] + public byte GrainScalingMinus_8; + + /// + /// ArCoeffLag + /// + [FieldOffset(5)] + public byte ArCoeffLag; + + /// + /// ArCoeffShiftMinus_6 + /// + [FieldOffset(6)] + public byte ArCoeffShiftMinus_6; + + /// + /// GrainScaleShift + /// + [FieldOffset(7)] + public byte GrainScaleShift; + + /// + /// GrainSeed + /// + [FieldOffset(8)] + public ushort GrainSeed; + + /// + /// FilmGrainParamsRefIdx + /// + [FieldOffset(10)] + public byte FilmGrainParamsRefIdx; + + /// + /// NumYPoints + /// + [FieldOffset(11)] + public byte NumYPoints; + + /// + [FieldOffset(12)] + public fixed byte PointYValue[14]; + + /// + [FieldOffset(26)] + public fixed byte PointYScaling[14]; + + /// + /// NumCbPoints + /// + [FieldOffset(40)] + public byte NumCbPoints; + + /// + [FieldOffset(41)] + public fixed byte PointCbValue[10]; + + /// + [FieldOffset(51)] + public fixed byte PointCbScaling[10]; + + /// + /// NumCrPoints + /// + [FieldOffset(61)] + public byte NumCrPoints; + + /// + [FieldOffset(62)] + public fixed byte PointCrValue[10]; + + /// + [FieldOffset(72)] + public fixed byte PointCrScaling[10]; + + /// + [FieldOffset(82)] + public fixed byte ArCoeffsYPlus_128[24]; + + /// + [FieldOffset(106)] + public fixed byte ArCoeffsCbPlus_128[25]; + + /// + [FieldOffset(131)] + public fixed byte ArCoeffsCrPlus_128[25]; + + /// + /// CbMult + /// + [FieldOffset(156)] + public byte CbMult; + + /// + /// CbLumaMult + /// + [FieldOffset(157)] + public byte CbLumaMult; + + /// + /// CbOffset + /// + [FieldOffset(158)] + public ushort CbOffset; + + /// + /// CrMult + /// + [FieldOffset(160)] + public byte CrMult; + + /// + /// CrLumaMult + /// + [FieldOffset(161)] + public byte CrLumaMult; + + /// + /// CrOffset + /// + [FieldOffset(162)] + public ushort CrOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrainFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrainFlags.gen.cs new file mode 100644 index 0000000..0376b64 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1FilmGrainFlags.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1FilmGrainFlags() + { + /// + /// ChromaScalingFromLuma + /// + [FieldOffset(0)] + private int _chromaScalingFromLuma; + + /// + /// OverlapFlag + /// + [FieldOffset(0)] + private int _overlapFlag; + + /// + /// ClipToRestrictedRange + /// + [FieldOffset(0)] + private int _clipToRestrictedRange; + + /// + /// UpdateGrain + /// + [FieldOffset(0)] + private int _updateGrain; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1FilmGrainFlags + { + /// + public bool ChromaScalingFromLuma + { + get => BitFields.HasFlag(_chromaScalingFromLuma, 0); + set => BitFields.SetFlag(ref _chromaScalingFromLuma, 0, value); + } + + /// + public bool OverlapFlag + { + get => BitFields.HasFlag(_overlapFlag, 1); + set => BitFields.SetFlag(ref _overlapFlag, 1, value); + } + + /// + public bool ClipToRestrictedRange + { + get => BitFields.HasFlag(_clipToRestrictedRange, 2); + set => BitFields.SetFlag(ref _clipToRestrictedRange, 2, value); + } + + /// + public bool UpdateGrain + { + get => BitFields.HasFlag(_updateGrain, 3); + set => BitFields.SetFlag(ref _updateGrain, 3, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 4, length: 28); + set => BitFields.SetRange(ref _reserved, start: 4, length: 28, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1GlobalMotion.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1GlobalMotion.gen.cs new file mode 100644 index 0000000..7794da8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1GlobalMotion.gen.cs @@ -0,0 +1,17 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 200)] + public unsafe partial struct StdVideoAV1GlobalMotion() + { + /// + [FieldOffset(0)] + public fixed byte GmType[8]; + + /// + /// GmParams + /// + [FieldOffset(8)] + public int_6_8 GmParams; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilter.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilter.gen.cs new file mode 100644 index 0000000..f255dc3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilter.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct StdVideoAV1LoopFilter() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1LoopFilterFlags Flags; + + /// + /// LoopFilterLevel + /// + [FieldOffset(4)] + public byte4 LoopFilterLevel; + + /// + /// LoopFilterSharpness + /// + [FieldOffset(8)] + public byte LoopFilterSharpness; + + /// + /// UpdateRefDelta + /// + [FieldOffset(9)] + public byte UpdateRefDelta; + + /// + [FieldOffset(10)] + public fixed byte LoopFilterRefDeltas[8]; + + /// + /// UpdateModeDelta + /// + [FieldOffset(18)] + public byte UpdateModeDelta; + + /// + /// LoopFilterModeDeltas + /// + [FieldOffset(19)] + public byte2 LoopFilterModeDeltas; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilterFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilterFlags.gen.cs new file mode 100644 index 0000000..ec5aef1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopFilterFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1LoopFilterFlags() + { + /// + /// LoopFilterDeltaEnabled + /// + [FieldOffset(0)] + private int _loopFilterDeltaEnabled; + + /// + /// LoopFilterDeltaUpdate + /// + [FieldOffset(0)] + private int _loopFilterDeltaUpdate; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1LoopFilterFlags + { + /// + public bool LoopFilterDeltaEnabled + { + get => BitFields.HasFlag(_loopFilterDeltaEnabled, 0); + set => BitFields.SetFlag(ref _loopFilterDeltaEnabled, 0, value); + } + + /// + public bool LoopFilterDeltaUpdate + { + get => BitFields.HasFlag(_loopFilterDeltaUpdate, 1); + set => BitFields.SetFlag(ref _loopFilterDeltaUpdate, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopRestoration.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopRestoration.gen.cs new file mode 100644 index 0000000..ecafbbc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1LoopRestoration.gen.cs @@ -0,0 +1,19 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct StdVideoAV1LoopRestoration() + { + /// + /// FrameRestorationType + /// + [FieldOffset(0)] + public StdVideoAV1FrameRestorationType_3 FrameRestorationType; + + /// + /// LoopRestorationSize + /// + [FieldOffset(12)] + public ushort3 LoopRestorationSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1Quantization.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1Quantization.gen.cs new file mode 100644 index 0000000..bcb4100 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1Quantization.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct StdVideoAV1Quantization() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1QuantizationFlags Flags; + + /// + /// BaseQIdx + /// + [FieldOffset(4)] + public byte BaseQIdx; + + /// + /// DeltaQYDc + /// + [FieldOffset(5)] + public byte DeltaQYDc; + + /// + /// DeltaQUDc + /// + [FieldOffset(6)] + public byte DeltaQUDc; + + /// + /// DeltaQUAc + /// + [FieldOffset(7)] + public byte DeltaQUAc; + + /// + /// DeltaQVDc + /// + [FieldOffset(8)] + public byte DeltaQVDc; + + /// + /// DeltaQVAc + /// + [FieldOffset(9)] + public byte DeltaQVAc; + + /// + /// QmY + /// + [FieldOffset(10)] + public byte QmY; + + /// + /// QmU + /// + [FieldOffset(11)] + public byte QmU; + + /// + /// QmV + /// + [FieldOffset(12)] + public byte QmV; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1QuantizationFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1QuantizationFlags.gen.cs new file mode 100644 index 0000000..203201f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1QuantizationFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1QuantizationFlags() + { + /// + /// UsingQmatrix + /// + [FieldOffset(0)] + private int _usingQmatrix; + + /// + /// DiffUvDelta + /// + [FieldOffset(0)] + private int _diffUvDelta; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1QuantizationFlags + { + /// + public bool UsingQmatrix + { + get => BitFields.HasFlag(_usingQmatrix, 0); + set => BitFields.SetFlag(ref _usingQmatrix, 0, value); + } + + /// + public bool DiffUvDelta + { + get => BitFields.HasFlag(_diffUvDelta, 1); + set => BitFields.SetFlag(ref _diffUvDelta, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1Segmentation.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1Segmentation.gen.cs new file mode 100644 index 0000000..9f009f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1Segmentation.gen.cs @@ -0,0 +1,17 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public unsafe partial struct StdVideoAV1Segmentation() + { + /// + [FieldOffset(0)] + public fixed byte FeatureEnabled[8]; + + /// + /// FeatureData + /// + [FieldOffset(8)] + public short_8_8 FeatureData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeader.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeader.gen.cs new file mode 100644 index 0000000..d68ee09 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeader.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct StdVideoAV1SequenceHeader() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1SequenceHeaderFlags Flags; + + /// + /// SeqProfile + /// + [FieldOffset(4)] + public StdVideoAV1Profile SeqProfile; + + /// + /// FrameWidthBitsMinus_1 + /// + [FieldOffset(8)] + public byte FrameWidthBitsMinus_1; + + /// + /// FrameHeightBitsMinus_1 + /// + [FieldOffset(9)] + public byte FrameHeightBitsMinus_1; + + /// + /// MaxFrameWidthMinus_1 + /// + [FieldOffset(10)] + public ushort MaxFrameWidthMinus_1; + + /// + /// MaxFrameHeightMinus_1 + /// + [FieldOffset(12)] + public ushort MaxFrameHeightMinus_1; + + /// + /// DeltaFrameIdLengthMinus_2 + /// + [FieldOffset(14)] + public byte DeltaFrameIdLengthMinus_2; + + /// + /// AdditionalFrameIdLengthMinus_1 + /// + [FieldOffset(15)] + public byte AdditionalFrameIdLengthMinus_1; + + /// + /// OrderHintBitsMinus_1 + /// + [FieldOffset(16)] + public byte OrderHintBitsMinus_1; + + /// + /// SeqForceIntegerMv + /// + [FieldOffset(17)] + public byte SeqForceIntegerMv; + + /// + /// SeqForceScreenContentTools + /// + [FieldOffset(18)] + public byte SeqForceScreenContentTools; + + /// + [FieldOffset(19)] + public fixed byte Reserved1[5]; + + /// + /// ColorConfig + /// + [FieldOffset(24)] + public StdVideoAV1ColorConfig* ColorConfig; + + /// + /// TimingInfo + /// + [FieldOffset(32)] + public StdVideoAV1TimingInfo* TimingInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeaderFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeaderFlags.gen.cs new file mode 100644 index 0000000..1f5f97c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1SequenceHeaderFlags.gen.cs @@ -0,0 +1,270 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1SequenceHeaderFlags() + { + /// + /// StillPicture + /// + [FieldOffset(0)] + private int _stillPicture; + + /// + /// ReducedStillPictureHeader + /// + [FieldOffset(0)] + private int _reducedStillPictureHeader; + + /// + /// Use_128x128Superblock + /// + [FieldOffset(0)] + private int _use_128x128Superblock; + + /// + /// EnableFilterIntra + /// + [FieldOffset(0)] + private int _enableFilterIntra; + + /// + /// EnableIntraEdgeFilter + /// + [FieldOffset(0)] + private int _enableIntraEdgeFilter; + + /// + /// EnableInterintraCompound + /// + [FieldOffset(0)] + private int _enableInterintraCompound; + + /// + /// EnableMaskedCompound + /// + [FieldOffset(0)] + private int _enableMaskedCompound; + + /// + /// EnableWarpedMotion + /// + [FieldOffset(0)] + private int _enableWarpedMotion; + + /// + /// EnableDualFilter + /// + [FieldOffset(0)] + private int _enableDualFilter; + + /// + /// EnableOrderHint + /// + [FieldOffset(0)] + private int _enableOrderHint; + + /// + /// EnableJntComp + /// + [FieldOffset(0)] + private int _enableJntComp; + + /// + /// EnableRefFrameMvs + /// + [FieldOffset(0)] + private int _enableRefFrameMvs; + + /// + /// FrameIdNumbersPresentFlag + /// + [FieldOffset(0)] + private int _frameIdNumbersPresentFlag; + + /// + /// EnableSuperres + /// + [FieldOffset(0)] + private int _enableSuperres; + + /// + /// EnableCdef + /// + [FieldOffset(0)] + private int _enableCdef; + + /// + /// EnableRestoration + /// + [FieldOffset(0)] + private int _enableRestoration; + + /// + /// FilmGrainParamsPresent + /// + [FieldOffset(0)] + private int _filmGrainParamsPresent; + + /// + /// TimingInfoPresentFlag + /// + [FieldOffset(0)] + private int _timingInfoPresentFlag; + + /// + /// InitialDisplayDelayPresentFlag + /// + [FieldOffset(0)] + private int _initialDisplayDelayPresentFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1SequenceHeaderFlags + { + /// + public bool StillPicture + { + get => BitFields.HasFlag(_stillPicture, 0); + set => BitFields.SetFlag(ref _stillPicture, 0, value); + } + + /// + public bool ReducedStillPictureHeader + { + get => BitFields.HasFlag(_reducedStillPictureHeader, 1); + set => BitFields.SetFlag(ref _reducedStillPictureHeader, 1, value); + } + + /// + public bool Use_128x128Superblock + { + get => BitFields.HasFlag(_use_128x128Superblock, 2); + set => BitFields.SetFlag(ref _use_128x128Superblock, 2, value); + } + + /// + public bool EnableFilterIntra + { + get => BitFields.HasFlag(_enableFilterIntra, 3); + set => BitFields.SetFlag(ref _enableFilterIntra, 3, value); + } + + /// + public bool EnableIntraEdgeFilter + { + get => BitFields.HasFlag(_enableIntraEdgeFilter, 4); + set => BitFields.SetFlag(ref _enableIntraEdgeFilter, 4, value); + } + + /// + public bool EnableInterintraCompound + { + get => BitFields.HasFlag(_enableInterintraCompound, 5); + set => BitFields.SetFlag(ref _enableInterintraCompound, 5, value); + } + + /// + public bool EnableMaskedCompound + { + get => BitFields.HasFlag(_enableMaskedCompound, 6); + set => BitFields.SetFlag(ref _enableMaskedCompound, 6, value); + } + + /// + public bool EnableWarpedMotion + { + get => BitFields.HasFlag(_enableWarpedMotion, 7); + set => BitFields.SetFlag(ref _enableWarpedMotion, 7, value); + } + + /// + public bool EnableDualFilter + { + get => BitFields.HasFlag(_enableDualFilter, 8); + set => BitFields.SetFlag(ref _enableDualFilter, 8, value); + } + + /// + public bool EnableOrderHint + { + get => BitFields.HasFlag(_enableOrderHint, 9); + set => BitFields.SetFlag(ref _enableOrderHint, 9, value); + } + + /// + public bool EnableJntComp + { + get => BitFields.HasFlag(_enableJntComp, 10); + set => BitFields.SetFlag(ref _enableJntComp, 10, value); + } + + /// + public bool EnableRefFrameMvs + { + get => BitFields.HasFlag(_enableRefFrameMvs, 11); + set => BitFields.SetFlag(ref _enableRefFrameMvs, 11, value); + } + + /// + public bool FrameIdNumbersPresentFlag + { + get => BitFields.HasFlag(_frameIdNumbersPresentFlag, 12); + set => BitFields.SetFlag(ref _frameIdNumbersPresentFlag, 12, value); + } + + /// + public bool EnableSuperres + { + get => BitFields.HasFlag(_enableSuperres, 13); + set => BitFields.SetFlag(ref _enableSuperres, 13, value); + } + + /// + public bool EnableCdef + { + get => BitFields.HasFlag(_enableCdef, 14); + set => BitFields.SetFlag(ref _enableCdef, 14, value); + } + + /// + public bool EnableRestoration + { + get => BitFields.HasFlag(_enableRestoration, 15); + set => BitFields.SetFlag(ref _enableRestoration, 15, value); + } + + /// + public bool FilmGrainParamsPresent + { + get => BitFields.HasFlag(_filmGrainParamsPresent, 16); + set => BitFields.SetFlag(ref _filmGrainParamsPresent, 16, value); + } + + /// + public bool TimingInfoPresentFlag + { + get => BitFields.HasFlag(_timingInfoPresentFlag, 17); + set => BitFields.SetFlag(ref _timingInfoPresentFlag, 17, value); + } + + /// + public bool InitialDisplayDelayPresentFlag + { + get => BitFields.HasFlag(_initialDisplayDelayPresentFlag, 18); + set => BitFields.SetFlag(ref _initialDisplayDelayPresentFlag, 18, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 19, length: 13); + set => BitFields.SetRange(ref _reserved, start: 19, length: 13, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfo.gen.cs new file mode 100644 index 0000000..740c0ae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfo.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct StdVideoAV1TileInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1TileInfoFlags Flags; + + /// + /// TileCols + /// + [FieldOffset(4)] + public byte TileCols; + + /// + /// TileRows + /// + [FieldOffset(5)] + public byte TileRows; + + /// + /// ContextUpdateTileId + /// + [FieldOffset(6)] + public ushort ContextUpdateTileId; + + /// + /// TileSizeBytesMinus_1 + /// + [FieldOffset(8)] + public byte TileSizeBytesMinus_1; + + /// + [FieldOffset(9)] + public fixed byte Reserved1[7]; + + /// + /// MiColStarts + /// + [FieldOffset(16)] + public ushort* MiColStarts; + + /// + /// MiRowStarts + /// + [FieldOffset(24)] + public ushort* MiRowStarts; + + /// + /// WidthInSbsMinus1 + /// + [FieldOffset(32)] + public ushort* WidthInSbsMinus1; + + /// + /// HeightInSbsMinus1 + /// + [FieldOffset(40)] + public ushort* HeightInSbsMinus1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfoFlags.gen.cs new file mode 100644 index 0000000..e838714 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TileInfoFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1TileInfoFlags() + { + /// + /// UniformTileSpacingFlag + /// + [FieldOffset(0)] + private int _uniformTileSpacingFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1TileInfoFlags + { + /// + public bool UniformTileSpacingFlag + { + get => BitFields.HasFlag(_uniformTileSpacingFlag, 0); + set => BitFields.SetFlag(ref _uniformTileSpacingFlag, 0, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 1, length: 31); + set => BitFields.SetRange(ref _reserved, start: 1, length: 31, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfo.gen.cs new file mode 100644 index 0000000..92406ae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfo.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct StdVideoAV1TimingInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoAV1TimingInfoFlags Flags; + + /// + /// NumUnitsInDisplayTick + /// + [FieldOffset(4)] + public int NumUnitsInDisplayTick; + + /// + /// TimeScale + /// + [FieldOffset(8)] + public int TimeScale; + + /// + /// NumTicksPerPictureMinus_1 + /// + [FieldOffset(12)] + public int NumTicksPerPictureMinus_1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfoFlags.gen.cs new file mode 100644 index 0000000..16b875a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoAV1TimingInfoFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoAV1TimingInfoFlags() + { + /// + /// EqualPictureInterval + /// + [FieldOffset(0)] + private int _equalPictureInterval; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoAV1TimingInfoFlags + { + /// + public bool EqualPictureInterval + { + get => BitFields.HasFlag(_equalPictureInterval, 0); + set => BitFields.SetFlag(ref _equalPictureInterval, 0, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 1, length: 31); + set => BitFields.SetRange(ref _reserved, start: 1, length: 31, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfo.gen.cs new file mode 100644 index 0000000..218eee7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfo.gen.cs @@ -0,0 +1,147 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public unsafe partial struct StdVideoDecodeAV1PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeAV1PictureInfoFlags Flags; + + /// + /// FrameType + /// + [FieldOffset(4)] + public StdVideoAV1FrameType FrameType; + + /// + /// CurrentFrameId + /// + [FieldOffset(8)] + public int CurrentFrameId; + + /// + /// OrderHint + /// + [FieldOffset(12)] + public byte OrderHint; + + /// + /// PrimaryRefFrame + /// + [FieldOffset(13)] + public byte PrimaryRefFrame; + + /// + /// RefreshFrameFlags + /// + [FieldOffset(14)] + public byte RefreshFrameFlags; + + /// + /// Reserved1 + /// + [FieldOffset(15)] + public byte Reserved1; + + /// + /// InterpolationFilter + /// + [FieldOffset(16)] + public StdVideoAV1InterpolationFilter InterpolationFilter; + + /// + /// TxMode + /// + [FieldOffset(20)] + public StdVideoAV1TxMode TxMode; + + /// + /// DeltaQRes + /// + [FieldOffset(24)] + public byte DeltaQRes; + + /// + /// DeltaLfRes + /// + [FieldOffset(25)] + public byte DeltaLfRes; + + /// + /// SkipModeFrame + /// + [FieldOffset(26)] + public byte2 SkipModeFrame; + + /// + /// CodedDenom + /// + [FieldOffset(28)] + public byte CodedDenom; + + /// + /// Reserved2 + /// + [FieldOffset(29)] + public byte3 Reserved2; + + /// + [FieldOffset(32)] + public fixed byte OrderHints[8]; + + /// + [FieldOffset(40)] + public fixed int ExpectedFrameId[8]; + + /// + /// TileInfo + /// + [FieldOffset(72)] + public StdVideoAV1TileInfo* TileInfo; + + /// + /// Quantization + /// + [FieldOffset(80)] + public StdVideoAV1Quantization* Quantization; + + /// + /// Segmentation + /// + [FieldOffset(88)] + public StdVideoAV1Segmentation* Segmentation; + + /// + /// LoopFilter + /// + [FieldOffset(96)] + public StdVideoAV1LoopFilter* LoopFilter; + + /// + /// CDEF + /// + [FieldOffset(104)] + public StdVideoAV1CDEF* CDEF; + + /// + /// LoopRestoration + /// + [FieldOffset(112)] + public StdVideoAV1LoopRestoration* LoopRestoration; + + /// + /// GlobalMotion + /// + [FieldOffset(120)] + public StdVideoAV1GlobalMotion* GlobalMotion; + + /// + /// FilmGrain + /// + [FieldOffset(128)] + public StdVideoAV1FilmGrain* FilmGrain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfoFlags.gen.cs new file mode 100644 index 0000000..4e42d55 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1PictureInfoFlags.gen.cs @@ -0,0 +1,400 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeAV1PictureInfoFlags() + { + /// + /// ErrorResilientMode + /// + [FieldOffset(0)] + private int _errorResilientMode; + + /// + /// DisableCdfUpdate + /// + [FieldOffset(0)] + private int _disableCdfUpdate; + + /// + /// UseSuperres + /// + [FieldOffset(0)] + private int _useSuperres; + + /// + /// RenderAndFrameSizeDifferent + /// + [FieldOffset(0)] + private int _renderAndFrameSizeDifferent; + + /// + /// AllowScreenContentTools + /// + [FieldOffset(0)] + private int _allowScreenContentTools; + + /// + /// IsFilterSwitchable + /// + [FieldOffset(0)] + private int _isFilterSwitchable; + + /// + /// ForceIntegerMv + /// + [FieldOffset(0)] + private int _forceIntegerMv; + + /// + /// FrameSizeOverrideFlag + /// + [FieldOffset(0)] + private int _frameSizeOverrideFlag; + + /// + /// BufferRemovalTimePresentFlag + /// + [FieldOffset(0)] + private int _bufferRemovalTimePresentFlag; + + /// + /// AllowIntrabc + /// + [FieldOffset(0)] + private int _allowIntrabc; + + /// + /// FrameRefsShortSignaling + /// + [FieldOffset(0)] + private int _frameRefsShortSignaling; + + /// + /// AllowHighPrecisionMv + /// + [FieldOffset(0)] + private int _allowHighPrecisionMv; + + /// + /// IsMotionModeSwitchable + /// + [FieldOffset(0)] + private int _isMotionModeSwitchable; + + /// + /// UseRefFrameMvs + /// + [FieldOffset(0)] + private int _useRefFrameMvs; + + /// + /// DisableFrameEndUpdateCdf + /// + [FieldOffset(0)] + private int _disableFrameEndUpdateCdf; + + /// + /// AllowWarpedMotion + /// + [FieldOffset(0)] + private int _allowWarpedMotion; + + /// + /// ReducedTxSet + /// + [FieldOffset(0)] + private int _reducedTxSet; + + /// + /// ReferenceSelect + /// + [FieldOffset(0)] + private int _referenceSelect; + + /// + /// SkipModePresent + /// + [FieldOffset(0)] + private int _skipModePresent; + + /// + /// DeltaQPresent + /// + [FieldOffset(0)] + private int _deltaQPresent; + + /// + /// DeltaLfPresent + /// + [FieldOffset(0)] + private int _deltaLfPresent; + + /// + /// DeltaLfMulti + /// + [FieldOffset(0)] + private int _deltaLfMulti; + + /// + /// SegmentationEnabled + /// + [FieldOffset(0)] + private int _segmentationEnabled; + + /// + /// SegmentationUpdateMap + /// + [FieldOffset(0)] + private int _segmentationUpdateMap; + + /// + /// SegmentationTemporalUpdate + /// + [FieldOffset(0)] + private int _segmentationTemporalUpdate; + + /// + /// SegmentationUpdateData + /// + [FieldOffset(0)] + private int _segmentationUpdateData; + + /// + /// UsesLr + /// + [FieldOffset(0)] + private int _usesLr; + + /// + /// UsesChromaLr + /// + [FieldOffset(0)] + private int _usesChromaLr; + + /// + /// ApplyGrain + /// + [FieldOffset(0)] + private int _applyGrain; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoDecodeAV1PictureInfoFlags + { + /// + public bool ErrorResilientMode + { + get => BitFields.HasFlag(_errorResilientMode, 0); + set => BitFields.SetFlag(ref _errorResilientMode, 0, value); + } + + /// + public bool DisableCdfUpdate + { + get => BitFields.HasFlag(_disableCdfUpdate, 1); + set => BitFields.SetFlag(ref _disableCdfUpdate, 1, value); + } + + /// + public bool UseSuperres + { + get => BitFields.HasFlag(_useSuperres, 2); + set => BitFields.SetFlag(ref _useSuperres, 2, value); + } + + /// + public bool RenderAndFrameSizeDifferent + { + get => BitFields.HasFlag(_renderAndFrameSizeDifferent, 3); + set => BitFields.SetFlag(ref _renderAndFrameSizeDifferent, 3, value); + } + + /// + public bool AllowScreenContentTools + { + get => BitFields.HasFlag(_allowScreenContentTools, 4); + set => BitFields.SetFlag(ref _allowScreenContentTools, 4, value); + } + + /// + public bool IsFilterSwitchable + { + get => BitFields.HasFlag(_isFilterSwitchable, 5); + set => BitFields.SetFlag(ref _isFilterSwitchable, 5, value); + } + + /// + public bool ForceIntegerMv + { + get => BitFields.HasFlag(_forceIntegerMv, 6); + set => BitFields.SetFlag(ref _forceIntegerMv, 6, value); + } + + /// + public bool FrameSizeOverrideFlag + { + get => BitFields.HasFlag(_frameSizeOverrideFlag, 7); + set => BitFields.SetFlag(ref _frameSizeOverrideFlag, 7, value); + } + + /// + public bool BufferRemovalTimePresentFlag + { + get => BitFields.HasFlag(_bufferRemovalTimePresentFlag, 8); + set => BitFields.SetFlag(ref _bufferRemovalTimePresentFlag, 8, value); + } + + /// + public bool AllowIntrabc + { + get => BitFields.HasFlag(_allowIntrabc, 9); + set => BitFields.SetFlag(ref _allowIntrabc, 9, value); + } + + /// + public bool FrameRefsShortSignaling + { + get => BitFields.HasFlag(_frameRefsShortSignaling, 10); + set => BitFields.SetFlag(ref _frameRefsShortSignaling, 10, value); + } + + /// + public bool AllowHighPrecisionMv + { + get => BitFields.HasFlag(_allowHighPrecisionMv, 11); + set => BitFields.SetFlag(ref _allowHighPrecisionMv, 11, value); + } + + /// + public bool IsMotionModeSwitchable + { + get => BitFields.HasFlag(_isMotionModeSwitchable, 12); + set => BitFields.SetFlag(ref _isMotionModeSwitchable, 12, value); + } + + /// + public bool UseRefFrameMvs + { + get => BitFields.HasFlag(_useRefFrameMvs, 13); + set => BitFields.SetFlag(ref _useRefFrameMvs, 13, value); + } + + /// + public bool DisableFrameEndUpdateCdf + { + get => BitFields.HasFlag(_disableFrameEndUpdateCdf, 14); + set => BitFields.SetFlag(ref _disableFrameEndUpdateCdf, 14, value); + } + + /// + public bool AllowWarpedMotion + { + get => BitFields.HasFlag(_allowWarpedMotion, 15); + set => BitFields.SetFlag(ref _allowWarpedMotion, 15, value); + } + + /// + public bool ReducedTxSet + { + get => BitFields.HasFlag(_reducedTxSet, 16); + set => BitFields.SetFlag(ref _reducedTxSet, 16, value); + } + + /// + public bool ReferenceSelect + { + get => BitFields.HasFlag(_referenceSelect, 17); + set => BitFields.SetFlag(ref _referenceSelect, 17, value); + } + + /// + public bool SkipModePresent + { + get => BitFields.HasFlag(_skipModePresent, 18); + set => BitFields.SetFlag(ref _skipModePresent, 18, value); + } + + /// + public bool DeltaQPresent + { + get => BitFields.HasFlag(_deltaQPresent, 19); + set => BitFields.SetFlag(ref _deltaQPresent, 19, value); + } + + /// + public bool DeltaLfPresent + { + get => BitFields.HasFlag(_deltaLfPresent, 20); + set => BitFields.SetFlag(ref _deltaLfPresent, 20, value); + } + + /// + public bool DeltaLfMulti + { + get => BitFields.HasFlag(_deltaLfMulti, 21); + set => BitFields.SetFlag(ref _deltaLfMulti, 21, value); + } + + /// + public bool SegmentationEnabled + { + get => BitFields.HasFlag(_segmentationEnabled, 22); + set => BitFields.SetFlag(ref _segmentationEnabled, 22, value); + } + + /// + public bool SegmentationUpdateMap + { + get => BitFields.HasFlag(_segmentationUpdateMap, 23); + set => BitFields.SetFlag(ref _segmentationUpdateMap, 23, value); + } + + /// + public bool SegmentationTemporalUpdate + { + get => BitFields.HasFlag(_segmentationTemporalUpdate, 24); + set => BitFields.SetFlag(ref _segmentationTemporalUpdate, 24, value); + } + + /// + public bool SegmentationUpdateData + { + get => BitFields.HasFlag(_segmentationUpdateData, 25); + set => BitFields.SetFlag(ref _segmentationUpdateData, 25, value); + } + + /// + public bool UsesLr + { + get => BitFields.HasFlag(_usesLr, 26); + set => BitFields.SetFlag(ref _usesLr, 26, value); + } + + /// + public bool UsesChromaLr + { + get => BitFields.HasFlag(_usesChromaLr, 27); + set => BitFields.SetFlag(ref _usesChromaLr, 27, value); + } + + /// + public bool ApplyGrain + { + get => BitFields.HasFlag(_applyGrain, 28); + set => BitFields.SetFlag(ref _applyGrain, 28, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 29, length: 3); + set => BitFields.SetRange(ref _reserved, start: 29, length: 3, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfo.gen.cs new file mode 100644 index 0000000..8314eaa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfo.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct StdVideoDecodeAV1ReferenceInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeAV1ReferenceInfoFlags Flags; + + /// + /// FrameType + /// + [FieldOffset(4)] + public byte FrameType; + + /// + /// RefFrameSignBias + /// + [FieldOffset(5)] + public byte RefFrameSignBias; + + /// + /// OrderHint + /// + [FieldOffset(6)] + public byte OrderHint; + + /// + [FieldOffset(7)] + public fixed byte SavedOrderHints[8]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfoFlags.gen.cs new file mode 100644 index 0000000..ceb6085 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeAV1ReferenceInfoFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeAV1ReferenceInfoFlags() + { + /// + /// DisableFrameEndUpdateCdf + /// + [FieldOffset(0)] + private int _disableFrameEndUpdateCdf; + + /// + /// SegmentationEnabled + /// + [FieldOffset(0)] + private int _segmentationEnabled; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoDecodeAV1ReferenceInfoFlags + { + /// + public bool DisableFrameEndUpdateCdf + { + get => BitFields.HasFlag(_disableFrameEndUpdateCdf, 0); + set => BitFields.SetFlag(ref _disableFrameEndUpdateCdf, 0, value); + } + + /// + public bool SegmentationEnabled + { + get => BitFields.HasFlag(_segmentationEnabled, 1); + set => BitFields.SetFlag(ref _segmentationEnabled, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfo.gen.cs new file mode 100644 index 0000000..dcbf211 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfo.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct StdVideoDecodeH264PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeH264PictureInfoFlags Flags; + + /// + /// SeqParameterSetId + /// + [FieldOffset(4)] + public byte SeqParameterSetId; + + /// + /// PicParameterSetId + /// + [FieldOffset(5)] + public byte PicParameterSetId; + + /// + /// Reserved1 + /// + [FieldOffset(6)] + public byte Reserved1; + + /// + /// Reserved2 + /// + [FieldOffset(7)] + public byte Reserved2; + + /// + /// FrameNum + /// + [FieldOffset(8)] + public ushort FrameNum; + + /// + /// IdrPicId + /// + [FieldOffset(10)] + public ushort IdrPicId; + + /// + /// PicOrderCnt + /// + [FieldOffset(12)] + public int2 PicOrderCnt; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfoFlags.gen.cs new file mode 100644 index 0000000..5dd8ada --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264PictureInfoFlags.gen.cs @@ -0,0 +1,88 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeH264PictureInfoFlags() + { + /// + /// FieldPicFlag + /// + [FieldOffset(0)] + private int _fieldPicFlag; + + /// + /// IsIntra + /// + [FieldOffset(0)] + private int _isIntra; + + /// + /// IdrPicFlag + /// + [FieldOffset(0)] + private int _idrPicFlag; + + /// + /// BottomFieldFlag + /// + [FieldOffset(0)] + private int _bottomFieldFlag; + + /// + /// IsReference + /// + [FieldOffset(0)] + private int _isReference; + + /// + /// ComplementaryFieldPair + /// + [FieldOffset(0)] + private int _complementaryFieldPair; + } + + public partial struct StdVideoDecodeH264PictureInfoFlags + { + /// + public bool FieldPicFlag + { + get => BitFields.HasFlag(_fieldPicFlag, 0); + set => BitFields.SetFlag(ref _fieldPicFlag, 0, value); + } + + /// + public bool IsIntra + { + get => BitFields.HasFlag(_isIntra, 1); + set => BitFields.SetFlag(ref _isIntra, 1, value); + } + + /// + public bool IdrPicFlag + { + get => BitFields.HasFlag(_idrPicFlag, 2); + set => BitFields.SetFlag(ref _idrPicFlag, 2, value); + } + + /// + public bool BottomFieldFlag + { + get => BitFields.HasFlag(_bottomFieldFlag, 3); + set => BitFields.SetFlag(ref _bottomFieldFlag, 3, value); + } + + /// + public bool IsReference + { + get => BitFields.HasFlag(_isReference, 4); + set => BitFields.SetFlag(ref _isReference, 4, value); + } + + /// + public bool ComplementaryFieldPair + { + get => BitFields.HasFlag(_complementaryFieldPair, 5); + set => BitFields.SetFlag(ref _complementaryFieldPair, 5, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfo.gen.cs new file mode 100644 index 0000000..1221484 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfo.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct StdVideoDecodeH264ReferenceInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeH264ReferenceInfoFlags Flags; + + /// + /// FrameNum + /// + [FieldOffset(4)] + public ushort FrameNum; + + /// + /// Reserved + /// + [FieldOffset(6)] + public ushort Reserved; + + /// + /// PicOrderCnt + /// + [FieldOffset(8)] + public int2 PicOrderCnt; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfoFlags.gen.cs new file mode 100644 index 0000000..d4eab71 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH264ReferenceInfoFlags.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeH264ReferenceInfoFlags() + { + /// + /// TopFieldFlag + /// + [FieldOffset(0)] + private int _topFieldFlag; + + /// + /// BottomFieldFlag + /// + [FieldOffset(0)] + private int _bottomFieldFlag; + + /// + /// UsedForLongTermReference + /// + [FieldOffset(0)] + private int _usedForLongTermReference; + + /// + /// IsNonExisting + /// + [FieldOffset(0)] + private int _isNonExisting; + } + + public partial struct StdVideoDecodeH264ReferenceInfoFlags + { + /// + public bool TopFieldFlag + { + get => BitFields.HasFlag(_topFieldFlag, 0); + set => BitFields.SetFlag(ref _topFieldFlag, 0, value); + } + + /// + public bool BottomFieldFlag + { + get => BitFields.HasFlag(_bottomFieldFlag, 1); + set => BitFields.SetFlag(ref _bottomFieldFlag, 1, value); + } + + /// + public bool UsedForLongTermReference + { + get => BitFields.HasFlag(_usedForLongTermReference, 2); + set => BitFields.SetFlag(ref _usedForLongTermReference, 2, value); + } + + /// + public bool IsNonExisting + { + get => BitFields.HasFlag(_isNonExisting, 3); + set => BitFields.SetFlag(ref _isNonExisting, 3, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfo.gen.cs new file mode 100644 index 0000000..dd24bdc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfo.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct StdVideoDecodeH265PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeH265PictureInfoFlags Flags; + + /// + /// SpsVideoParameterSetId + /// + [FieldOffset(4)] + public byte SpsVideoParameterSetId; + + /// + /// PpsSeqParameterSetId + /// + [FieldOffset(5)] + public byte PpsSeqParameterSetId; + + /// + /// PpsPicParameterSetId + /// + [FieldOffset(6)] + public byte PpsPicParameterSetId; + + /// + /// NumDeltaPocsOfRefRpsIdx + /// + [FieldOffset(7)] + public byte NumDeltaPocsOfRefRpsIdx; + + /// + /// PicOrderCntVal + /// + [FieldOffset(8)] + public int PicOrderCntVal; + + /// + /// NumBitsForSTRefPicSetInSlice + /// + [FieldOffset(12)] + public ushort NumBitsForSTRefPicSetInSlice; + + /// + /// Reserved + /// + [FieldOffset(14)] + public ushort Reserved; + + /// + [FieldOffset(16)] + public fixed byte RefPicSetStCurrBefore[8]; + + /// + [FieldOffset(24)] + public fixed byte RefPicSetStCurrAfter[8]; + + /// + [FieldOffset(32)] + public fixed byte RefPicSetLtCurr[8]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfoFlags.gen.cs new file mode 100644 index 0000000..3d44683 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265PictureInfoFlags.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeH265PictureInfoFlags() + { + /// + /// IrapPicFlag + /// + [FieldOffset(0)] + private int _irapPicFlag; + + /// + /// IdrPicFlag + /// + [FieldOffset(0)] + private int _idrPicFlag; + + /// + /// IsReference + /// + [FieldOffset(0)] + private int _isReference; + + /// + /// ShortTermRefPicSetSpsFlag + /// + [FieldOffset(0)] + private int _shortTermRefPicSetSpsFlag; + } + + public partial struct StdVideoDecodeH265PictureInfoFlags + { + /// + public bool IrapPicFlag + { + get => BitFields.HasFlag(_irapPicFlag, 0); + set => BitFields.SetFlag(ref _irapPicFlag, 0, value); + } + + /// + public bool IdrPicFlag + { + get => BitFields.HasFlag(_idrPicFlag, 1); + set => BitFields.SetFlag(ref _idrPicFlag, 1, value); + } + + /// + public bool IsReference + { + get => BitFields.HasFlag(_isReference, 2); + set => BitFields.SetFlag(ref _isReference, 2, value); + } + + /// + public bool ShortTermRefPicSetSpsFlag + { + get => BitFields.HasFlag(_shortTermRefPicSetSpsFlag, 3); + set => BitFields.SetFlag(ref _shortTermRefPicSetSpsFlag, 3, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfo.gen.cs new file mode 100644 index 0000000..c05f2d8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfo.gen.cs @@ -0,0 +1,19 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct StdVideoDecodeH265ReferenceInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeH265ReferenceInfoFlags Flags; + + /// + /// PicOrderCntVal + /// + [FieldOffset(4)] + public int PicOrderCntVal; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfoFlags.gen.cs new file mode 100644 index 0000000..d4cd36a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeH265ReferenceInfoFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeH265ReferenceInfoFlags() + { + /// + /// UsedForLongTermReference + /// + [FieldOffset(0)] + private int _usedForLongTermReference; + + /// + /// UnusedForReference + /// + [FieldOffset(0)] + private int _unusedForReference; + } + + public partial struct StdVideoDecodeH265ReferenceInfoFlags + { + /// + public bool UsedForLongTermReference + { + get => BitFields.HasFlag(_usedForLongTermReference, 0); + set => BitFields.SetFlag(ref _usedForLongTermReference, 0, value); + } + + /// + public bool UnusedForReference + { + get => BitFields.HasFlag(_unusedForReference, 1); + set => BitFields.SetFlag(ref _unusedForReference, 1, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfo.gen.cs new file mode 100644 index 0000000..1135890 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfo.gen.cs @@ -0,0 +1,115 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct StdVideoDecodeVP9PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoDecodeVP9PictureInfoFlags Flags; + + /// + /// Profile + /// + [FieldOffset(4)] + public StdVideoVP9Profile Profile; + + /// + /// FrameType + /// + [FieldOffset(8)] + public StdVideoVP9FrameType FrameType; + + /// + /// FrameContextIdx + /// + [FieldOffset(12)] + public byte FrameContextIdx; + + /// + /// ResetFrameContext + /// + [FieldOffset(13)] + public byte ResetFrameContext; + + /// + /// RefreshFrameFlags + /// + [FieldOffset(14)] + public byte RefreshFrameFlags; + + /// + /// RefFrameSignBiasMask + /// + [FieldOffset(15)] + public byte RefFrameSignBiasMask; + + /// + /// InterpolationFilter + /// + [FieldOffset(16)] + public StdVideoVP9InterpolationFilter InterpolationFilter; + + /// + /// BaseQIdx + /// + [FieldOffset(20)] + public byte BaseQIdx; + + /// + /// DeltaQYDc + /// + [FieldOffset(21)] + public byte DeltaQYDc; + + /// + /// DeltaQUvDc + /// + [FieldOffset(22)] + public byte DeltaQUvDc; + + /// + /// DeltaQUvAc + /// + [FieldOffset(23)] + public byte DeltaQUvAc; + + /// + /// TileColsLog2 + /// + [FieldOffset(24)] + public byte TileColsLog2; + + /// + /// TileRowsLog2 + /// + [FieldOffset(25)] + public byte TileRowsLog2; + + /// + /// Reserved1 + /// + [FieldOffset(26)] + public ushort3 Reserved1; + + /// + /// ColorConfig + /// + [FieldOffset(32)] + public StdVideoVP9ColorConfig* ColorConfig; + + /// + /// LoopFilter + /// + [FieldOffset(40)] + public StdVideoVP9LoopFilter* LoopFilter; + + /// + /// Segmentation + /// + [FieldOffset(48)] + public StdVideoVP9Segmentation* Segmentation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfoFlags.gen.cs new file mode 100644 index 0000000..4d7e219 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoDecodeVP9PictureInfoFlags.gen.cs @@ -0,0 +1,127 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoDecodeVP9PictureInfoFlags() + { + /// + /// ErrorResilientMode + /// + [FieldOffset(0)] + private int _errorResilientMode; + + /// + /// IntraOnly + /// + [FieldOffset(0)] + private int _intraOnly; + + /// + /// AllowHighPrecisionMv + /// + [FieldOffset(0)] + private int _allowHighPrecisionMv; + + /// + /// RefreshFrameContext + /// + [FieldOffset(0)] + private int _refreshFrameContext; + + /// + /// FrameParallelDecodingMode + /// + [FieldOffset(0)] + private int _frameParallelDecodingMode; + + /// + /// SegmentationEnabled + /// + [FieldOffset(0)] + private int _segmentationEnabled; + + /// + /// ShowFrame + /// + [FieldOffset(0)] + private int _showFrame; + + /// + /// UsePrevFrameMvs + /// + [FieldOffset(0)] + private int _usePrevFrameMvs; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoDecodeVP9PictureInfoFlags + { + /// + public bool ErrorResilientMode + { + get => BitFields.HasFlag(_errorResilientMode, 0); + set => BitFields.SetFlag(ref _errorResilientMode, 0, value); + } + + /// + public bool IntraOnly + { + get => BitFields.HasFlag(_intraOnly, 1); + set => BitFields.SetFlag(ref _intraOnly, 1, value); + } + + /// + public bool AllowHighPrecisionMv + { + get => BitFields.HasFlag(_allowHighPrecisionMv, 2); + set => BitFields.SetFlag(ref _allowHighPrecisionMv, 2, value); + } + + /// + public bool RefreshFrameContext + { + get => BitFields.HasFlag(_refreshFrameContext, 3); + set => BitFields.SetFlag(ref _refreshFrameContext, 3, value); + } + + /// + public bool FrameParallelDecodingMode + { + get => BitFields.HasFlag(_frameParallelDecodingMode, 4); + set => BitFields.SetFlag(ref _frameParallelDecodingMode, 4, value); + } + + /// + public bool SegmentationEnabled + { + get => BitFields.HasFlag(_segmentationEnabled, 5); + set => BitFields.SetFlag(ref _segmentationEnabled, 5, value); + } + + /// + public bool ShowFrame + { + get => BitFields.HasFlag(_showFrame, 6); + set => BitFields.SetFlag(ref _showFrame, 6, value); + } + + /// + public bool UsePrevFrameMvs + { + get => BitFields.HasFlag(_usePrevFrameMvs, 7); + set => BitFields.SetFlag(ref _usePrevFrameMvs, 7, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 8, length: 24); + set => BitFields.SetRange(ref _reserved, start: 8, length: 24, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1DecoderModelInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1DecoderModelInfo.gen.cs new file mode 100644 index 0000000..8bf3816 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1DecoderModelInfo.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct StdVideoEncodeAV1DecoderModelInfo() + { + /// + /// BufferDelayLengthMinus_1 + /// + [FieldOffset(0)] + public byte BufferDelayLengthMinus_1; + + /// + /// BufferRemovalTimeLengthMinus_1 + /// + [FieldOffset(1)] + public byte BufferRemovalTimeLengthMinus_1; + + /// + /// FramePresentationTimeLengthMinus_1 + /// + [FieldOffset(2)] + public byte FramePresentationTimeLengthMinus_1; + + /// + /// Reserved1 + /// + [FieldOffset(3)] + public byte Reserved1; + + /// + /// NumUnitsInDecodingTick + /// + [FieldOffset(4)] + public int NumUnitsInDecodingTick; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ExtensionHeader.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ExtensionHeader.gen.cs new file mode 100644 index 0000000..c29235f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ExtensionHeader.gen.cs @@ -0,0 +1,19 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 2)] + public partial struct StdVideoEncodeAV1ExtensionHeader() + { + /// + /// TemporalId + /// + [FieldOffset(0)] + public byte TemporalId; + + /// + /// SpatialId + /// + [FieldOffset(1)] + public byte SpatialId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfo.gen.cs new file mode 100644 index 0000000..f6091da --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfo.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct StdVideoEncodeAV1OperatingPointInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeAV1OperatingPointInfoFlags Flags; + + /// + /// OperatingPointIdc + /// + [FieldOffset(4)] + public ushort OperatingPointIdc; + + /// + /// SeqLevelIdx + /// + [FieldOffset(6)] + public byte SeqLevelIdx; + + /// + /// SeqTier + /// + [FieldOffset(7)] + public byte SeqTier; + + /// + /// DecoderBufferDelay + /// + [FieldOffset(8)] + public int DecoderBufferDelay; + + /// + /// EncoderBufferDelay + /// + [FieldOffset(12)] + public int EncoderBufferDelay; + + /// + /// InitialDisplayDelayMinus_1 + /// + [FieldOffset(16)] + public byte InitialDisplayDelayMinus_1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfoFlags.gen.cs new file mode 100644 index 0000000..7485d36 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1OperatingPointInfoFlags.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeAV1OperatingPointInfoFlags() + { + /// + /// DecoderModelPresentForThisOp + /// + [FieldOffset(0)] + private int _decoderModelPresentForThisOp; + + /// + /// LowDelayModeFlag + /// + [FieldOffset(0)] + private int _lowDelayModeFlag; + + /// + /// InitialDisplayDelayPresentForThisOp + /// + [FieldOffset(0)] + private int _initialDisplayDelayPresentForThisOp; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeAV1OperatingPointInfoFlags + { + /// + public bool DecoderModelPresentForThisOp + { + get => BitFields.HasFlag(_decoderModelPresentForThisOp, 0); + set => BitFields.SetFlag(ref _decoderModelPresentForThisOp, 0, value); + } + + /// + public bool LowDelayModeFlag + { + get => BitFields.HasFlag(_lowDelayModeFlag, 1); + set => BitFields.SetFlag(ref _lowDelayModeFlag, 1, value); + } + + /// + public bool InitialDisplayDelayPresentForThisOp + { + get => BitFields.HasFlag(_initialDisplayDelayPresentForThisOp, 2); + set => BitFields.SetFlag(ref _initialDisplayDelayPresentForThisOp, 2, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 3, length: 29); + set => BitFields.SetRange(ref _reserved, start: 3, length: 29, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfo.gen.cs new file mode 100644 index 0000000..606e598 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfo.gen.cs @@ -0,0 +1,163 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public unsafe partial struct StdVideoEncodeAV1PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeAV1PictureInfoFlags Flags; + + /// + /// FrameType + /// + [FieldOffset(4)] + public StdVideoAV1FrameType FrameType; + + /// + /// FramePresentationTime + /// + [FieldOffset(8)] + public int FramePresentationTime; + + /// + /// CurrentFrameId + /// + [FieldOffset(12)] + public int CurrentFrameId; + + /// + /// OrderHint + /// + [FieldOffset(16)] + public byte OrderHint; + + /// + /// PrimaryRefFrame + /// + [FieldOffset(17)] + public byte PrimaryRefFrame; + + /// + /// RefreshFrameFlags + /// + [FieldOffset(18)] + public byte RefreshFrameFlags; + + /// + /// CodedDenom + /// + [FieldOffset(19)] + public byte CodedDenom; + + /// + /// RenderWidthMinus_1 + /// + [FieldOffset(20)] + public ushort RenderWidthMinus_1; + + /// + /// RenderHeightMinus_1 + /// + [FieldOffset(22)] + public ushort RenderHeightMinus_1; + + /// + /// InterpolationFilter + /// + [FieldOffset(24)] + public StdVideoAV1InterpolationFilter InterpolationFilter; + + /// + /// TxMode + /// + [FieldOffset(28)] + public StdVideoAV1TxMode TxMode; + + /// + /// DeltaQRes + /// + [FieldOffset(32)] + public byte DeltaQRes; + + /// + /// DeltaLfRes + /// + [FieldOffset(33)] + public byte DeltaLfRes; + + /// + [FieldOffset(34)] + public fixed byte RefOrderHint[8]; + + /// + [FieldOffset(42)] + public fixed byte RefFrameIdx[7]; + + /// + /// Reserved1 + /// + [FieldOffset(49)] + public byte3 Reserved1; + + /// + [FieldOffset(52)] + public fixed int DeltaFrameIdMinus_1[7]; + + /// + /// TileInfo + /// + [FieldOffset(80)] + public StdVideoAV1TileInfo* TileInfo; + + /// + /// Quantization + /// + [FieldOffset(88)] + public StdVideoAV1Quantization* Quantization; + + /// + /// Segmentation + /// + [FieldOffset(96)] + public StdVideoAV1Segmentation* Segmentation; + + /// + /// LoopFilter + /// + [FieldOffset(104)] + public StdVideoAV1LoopFilter* LoopFilter; + + /// + /// CDEF + /// + [FieldOffset(112)] + public StdVideoAV1CDEF* CDEF; + + /// + /// LoopRestoration + /// + [FieldOffset(120)] + public StdVideoAV1LoopRestoration* LoopRestoration; + + /// + /// GlobalMotion + /// + [FieldOffset(128)] + public StdVideoAV1GlobalMotion* GlobalMotion; + + /// + /// ExtensionHeader + /// + [FieldOffset(136)] + public StdVideoEncodeAV1ExtensionHeader* ExtensionHeader; + + /// + /// BufferRemovalTimes + /// + [FieldOffset(144)] + public int* BufferRemovalTimes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfoFlags.gen.cs new file mode 100644 index 0000000..4080deb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1PictureInfoFlags.gen.cs @@ -0,0 +1,400 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeAV1PictureInfoFlags() + { + /// + /// ErrorResilientMode + /// + [FieldOffset(0)] + private int _errorResilientMode; + + /// + /// DisableCdfUpdate + /// + [FieldOffset(0)] + private int _disableCdfUpdate; + + /// + /// UseSuperres + /// + [FieldOffset(0)] + private int _useSuperres; + + /// + /// RenderAndFrameSizeDifferent + /// + [FieldOffset(0)] + private int _renderAndFrameSizeDifferent; + + /// + /// AllowScreenContentTools + /// + [FieldOffset(0)] + private int _allowScreenContentTools; + + /// + /// IsFilterSwitchable + /// + [FieldOffset(0)] + private int _isFilterSwitchable; + + /// + /// ForceIntegerMv + /// + [FieldOffset(0)] + private int _forceIntegerMv; + + /// + /// FrameSizeOverrideFlag + /// + [FieldOffset(0)] + private int _frameSizeOverrideFlag; + + /// + /// BufferRemovalTimePresentFlag + /// + [FieldOffset(0)] + private int _bufferRemovalTimePresentFlag; + + /// + /// AllowIntrabc + /// + [FieldOffset(0)] + private int _allowIntrabc; + + /// + /// FrameRefsShortSignaling + /// + [FieldOffset(0)] + private int _frameRefsShortSignaling; + + /// + /// AllowHighPrecisionMv + /// + [FieldOffset(0)] + private int _allowHighPrecisionMv; + + /// + /// IsMotionModeSwitchable + /// + [FieldOffset(0)] + private int _isMotionModeSwitchable; + + /// + /// UseRefFrameMvs + /// + [FieldOffset(0)] + private int _useRefFrameMvs; + + /// + /// DisableFrameEndUpdateCdf + /// + [FieldOffset(0)] + private int _disableFrameEndUpdateCdf; + + /// + /// AllowWarpedMotion + /// + [FieldOffset(0)] + private int _allowWarpedMotion; + + /// + /// ReducedTxSet + /// + [FieldOffset(0)] + private int _reducedTxSet; + + /// + /// SkipModePresent + /// + [FieldOffset(0)] + private int _skipModePresent; + + /// + /// DeltaQPresent + /// + [FieldOffset(0)] + private int _deltaQPresent; + + /// + /// DeltaLfPresent + /// + [FieldOffset(0)] + private int _deltaLfPresent; + + /// + /// DeltaLfMulti + /// + [FieldOffset(0)] + private int _deltaLfMulti; + + /// + /// SegmentationEnabled + /// + [FieldOffset(0)] + private int _segmentationEnabled; + + /// + /// SegmentationUpdateMap + /// + [FieldOffset(0)] + private int _segmentationUpdateMap; + + /// + /// SegmentationTemporalUpdate + /// + [FieldOffset(0)] + private int _segmentationTemporalUpdate; + + /// + /// SegmentationUpdateData + /// + [FieldOffset(0)] + private int _segmentationUpdateData; + + /// + /// UsesLr + /// + [FieldOffset(0)] + private int _usesLr; + + /// + /// UsesChromaLr + /// + [FieldOffset(0)] + private int _usesChromaLr; + + /// + /// ShowFrame + /// + [FieldOffset(0)] + private int _showFrame; + + /// + /// ShowableFrame + /// + [FieldOffset(0)] + private int _showableFrame; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeAV1PictureInfoFlags + { + /// + public bool ErrorResilientMode + { + get => BitFields.HasFlag(_errorResilientMode, 0); + set => BitFields.SetFlag(ref _errorResilientMode, 0, value); + } + + /// + public bool DisableCdfUpdate + { + get => BitFields.HasFlag(_disableCdfUpdate, 1); + set => BitFields.SetFlag(ref _disableCdfUpdate, 1, value); + } + + /// + public bool UseSuperres + { + get => BitFields.HasFlag(_useSuperres, 2); + set => BitFields.SetFlag(ref _useSuperres, 2, value); + } + + /// + public bool RenderAndFrameSizeDifferent + { + get => BitFields.HasFlag(_renderAndFrameSizeDifferent, 3); + set => BitFields.SetFlag(ref _renderAndFrameSizeDifferent, 3, value); + } + + /// + public bool AllowScreenContentTools + { + get => BitFields.HasFlag(_allowScreenContentTools, 4); + set => BitFields.SetFlag(ref _allowScreenContentTools, 4, value); + } + + /// + public bool IsFilterSwitchable + { + get => BitFields.HasFlag(_isFilterSwitchable, 5); + set => BitFields.SetFlag(ref _isFilterSwitchable, 5, value); + } + + /// + public bool ForceIntegerMv + { + get => BitFields.HasFlag(_forceIntegerMv, 6); + set => BitFields.SetFlag(ref _forceIntegerMv, 6, value); + } + + /// + public bool FrameSizeOverrideFlag + { + get => BitFields.HasFlag(_frameSizeOverrideFlag, 7); + set => BitFields.SetFlag(ref _frameSizeOverrideFlag, 7, value); + } + + /// + public bool BufferRemovalTimePresentFlag + { + get => BitFields.HasFlag(_bufferRemovalTimePresentFlag, 8); + set => BitFields.SetFlag(ref _bufferRemovalTimePresentFlag, 8, value); + } + + /// + public bool AllowIntrabc + { + get => BitFields.HasFlag(_allowIntrabc, 9); + set => BitFields.SetFlag(ref _allowIntrabc, 9, value); + } + + /// + public bool FrameRefsShortSignaling + { + get => BitFields.HasFlag(_frameRefsShortSignaling, 10); + set => BitFields.SetFlag(ref _frameRefsShortSignaling, 10, value); + } + + /// + public bool AllowHighPrecisionMv + { + get => BitFields.HasFlag(_allowHighPrecisionMv, 11); + set => BitFields.SetFlag(ref _allowHighPrecisionMv, 11, value); + } + + /// + public bool IsMotionModeSwitchable + { + get => BitFields.HasFlag(_isMotionModeSwitchable, 12); + set => BitFields.SetFlag(ref _isMotionModeSwitchable, 12, value); + } + + /// + public bool UseRefFrameMvs + { + get => BitFields.HasFlag(_useRefFrameMvs, 13); + set => BitFields.SetFlag(ref _useRefFrameMvs, 13, value); + } + + /// + public bool DisableFrameEndUpdateCdf + { + get => BitFields.HasFlag(_disableFrameEndUpdateCdf, 14); + set => BitFields.SetFlag(ref _disableFrameEndUpdateCdf, 14, value); + } + + /// + public bool AllowWarpedMotion + { + get => BitFields.HasFlag(_allowWarpedMotion, 15); + set => BitFields.SetFlag(ref _allowWarpedMotion, 15, value); + } + + /// + public bool ReducedTxSet + { + get => BitFields.HasFlag(_reducedTxSet, 16); + set => BitFields.SetFlag(ref _reducedTxSet, 16, value); + } + + /// + public bool SkipModePresent + { + get => BitFields.HasFlag(_skipModePresent, 17); + set => BitFields.SetFlag(ref _skipModePresent, 17, value); + } + + /// + public bool DeltaQPresent + { + get => BitFields.HasFlag(_deltaQPresent, 18); + set => BitFields.SetFlag(ref _deltaQPresent, 18, value); + } + + /// + public bool DeltaLfPresent + { + get => BitFields.HasFlag(_deltaLfPresent, 19); + set => BitFields.SetFlag(ref _deltaLfPresent, 19, value); + } + + /// + public bool DeltaLfMulti + { + get => BitFields.HasFlag(_deltaLfMulti, 20); + set => BitFields.SetFlag(ref _deltaLfMulti, 20, value); + } + + /// + public bool SegmentationEnabled + { + get => BitFields.HasFlag(_segmentationEnabled, 21); + set => BitFields.SetFlag(ref _segmentationEnabled, 21, value); + } + + /// + public bool SegmentationUpdateMap + { + get => BitFields.HasFlag(_segmentationUpdateMap, 22); + set => BitFields.SetFlag(ref _segmentationUpdateMap, 22, value); + } + + /// + public bool SegmentationTemporalUpdate + { + get => BitFields.HasFlag(_segmentationTemporalUpdate, 23); + set => BitFields.SetFlag(ref _segmentationTemporalUpdate, 23, value); + } + + /// + public bool SegmentationUpdateData + { + get => BitFields.HasFlag(_segmentationUpdateData, 24); + set => BitFields.SetFlag(ref _segmentationUpdateData, 24, value); + } + + /// + public bool UsesLr + { + get => BitFields.HasFlag(_usesLr, 25); + set => BitFields.SetFlag(ref _usesLr, 25, value); + } + + /// + public bool UsesChromaLr + { + get => BitFields.HasFlag(_usesChromaLr, 26); + set => BitFields.SetFlag(ref _usesChromaLr, 26, value); + } + + /// + public bool ShowFrame + { + get => BitFields.HasFlag(_showFrame, 27); + set => BitFields.SetFlag(ref _showFrame, 27, value); + } + + /// + public bool ShowableFrame + { + get => BitFields.HasFlag(_showableFrame, 28); + set => BitFields.SetFlag(ref _showableFrame, 28, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 29, length: 3); + set => BitFields.SetRange(ref _reserved, start: 29, length: 3, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfo.gen.cs new file mode 100644 index 0000000..49cbcb5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct StdVideoEncodeAV1ReferenceInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeAV1ReferenceInfoFlags Flags; + + /// + /// RefFrameId + /// + [FieldOffset(4)] + public int RefFrameId; + + /// + /// FrameType + /// + [FieldOffset(8)] + public StdVideoAV1FrameType FrameType; + + /// + /// OrderHint + /// + [FieldOffset(12)] + public byte OrderHint; + + /// + /// Reserved1 + /// + [FieldOffset(13)] + public byte3 Reserved1; + + /// + /// ExtensionHeader + /// + [FieldOffset(16)] + public StdVideoEncodeAV1ExtensionHeader* ExtensionHeader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfoFlags.gen.cs new file mode 100644 index 0000000..bece692 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeAV1ReferenceInfoFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeAV1ReferenceInfoFlags() + { + /// + /// DisableFrameEndUpdateCdf + /// + [FieldOffset(0)] + private int _disableFrameEndUpdateCdf; + + /// + /// SegmentationEnabled + /// + [FieldOffset(0)] + private int _segmentationEnabled; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeAV1ReferenceInfoFlags + { + /// + public bool DisableFrameEndUpdateCdf + { + get => BitFields.HasFlag(_disableFrameEndUpdateCdf, 0); + set => BitFields.SetFlag(ref _disableFrameEndUpdateCdf, 0, value); + } + + /// + public bool SegmentationEnabled + { + get => BitFields.HasFlag(_segmentationEnabled, 1); + set => BitFields.SetFlag(ref _segmentationEnabled, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfo.gen.cs new file mode 100644 index 0000000..4ae8541 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfo.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct StdVideoEncodeH264PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH264PictureInfoFlags Flags; + + /// + /// SeqParameterSetId + /// + [FieldOffset(4)] + public byte SeqParameterSetId; + + /// + /// PicParameterSetId + /// + [FieldOffset(5)] + public byte PicParameterSetId; + + /// + /// IdrPicId + /// + [FieldOffset(6)] + public ushort IdrPicId; + + /// + /// PrimaryPicType + /// + [FieldOffset(8)] + public StdVideoH264PictureType PrimaryPicType; + + /// + /// FrameNum + /// + [FieldOffset(12)] + public int FrameNum; + + /// + /// PicOrderCnt + /// + [FieldOffset(16)] + public int PicOrderCnt; + + /// + /// TemporalId + /// + [FieldOffset(20)] + public byte TemporalId; + + /// + /// Reserved1 + /// + [FieldOffset(21)] + public byte3 Reserved1; + + /// + /// RefLists + /// + [FieldOffset(24)] + public StdVideoEncodeH264ReferenceListsInfo* RefLists; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfoFlags.gen.cs new file mode 100644 index 0000000..3d0b1c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264PictureInfoFlags.gen.cs @@ -0,0 +1,88 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH264PictureInfoFlags() + { + /// + /// IdrPicFlag + /// + [FieldOffset(0)] + private int _idrPicFlag; + + /// + /// IsReference + /// + [FieldOffset(0)] + private int _isReference; + + /// + /// NoOutputOfPriorPicsFlag + /// + [FieldOffset(0)] + private int _noOutputOfPriorPicsFlag; + + /// + /// LongTermReferenceFlag + /// + [FieldOffset(0)] + private int _longTermReferenceFlag; + + /// + /// AdaptiveRefPicMarkingModeFlag + /// + [FieldOffset(0)] + private int _adaptiveRefPicMarkingModeFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH264PictureInfoFlags + { + /// + public bool IdrPicFlag + { + get => BitFields.HasFlag(_idrPicFlag, 0); + set => BitFields.SetFlag(ref _idrPicFlag, 0, value); + } + + /// + public bool IsReference + { + get => BitFields.HasFlag(_isReference, 1); + set => BitFields.SetFlag(ref _isReference, 1, value); + } + + /// + public bool NoOutputOfPriorPicsFlag + { + get => BitFields.HasFlag(_noOutputOfPriorPicsFlag, 2); + set => BitFields.SetFlag(ref _noOutputOfPriorPicsFlag, 2, value); + } + + /// + public bool LongTermReferenceFlag + { + get => BitFields.HasFlag(_longTermReferenceFlag, 3); + set => BitFields.SetFlag(ref _longTermReferenceFlag, 3, value); + } + + /// + public bool AdaptiveRefPicMarkingModeFlag + { + get => BitFields.HasFlag(_adaptiveRefPicMarkingModeFlag, 4); + set => BitFields.SetFlag(ref _adaptiveRefPicMarkingModeFlag, 4, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 5, length: 27); + set => BitFields.SetRange(ref _reserved, start: 5, length: 27, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefListModEntry.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefListModEntry.gen.cs new file mode 100644 index 0000000..e196da9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefListModEntry.gen.cs @@ -0,0 +1,25 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct StdVideoEncodeH264RefListModEntry() + { + /// + /// ModificationOfPicNumsIdc + /// + [FieldOffset(0)] + public StdVideoH264ModificationOfPicNumsIdc ModificationOfPicNumsIdc; + + /// + /// AbsDiffPicNumMinus1 + /// + [FieldOffset(4)] + public ushort AbsDiffPicNumMinus1; + + /// + /// LongTermPicNum + /// + [FieldOffset(6)] + public ushort LongTermPicNum; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefPicMarkingEntry.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefPicMarkingEntry.gen.cs new file mode 100644 index 0000000..b74ef36 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264RefPicMarkingEntry.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct StdVideoEncodeH264RefPicMarkingEntry() + { + /// + /// MemoryManagementControlOperation + /// + [FieldOffset(0)] + public StdVideoH264MemMgmtControlOp MemoryManagementControlOperation; + + /// + /// DifferenceOfPicNumsMinus1 + /// + [FieldOffset(4)] + public ushort DifferenceOfPicNumsMinus1; + + /// + /// LongTermPicNum + /// + [FieldOffset(6)] + public ushort LongTermPicNum; + + /// + /// LongTermFrameIdx + /// + [FieldOffset(8)] + public ushort LongTermFrameIdx; + + /// + /// MaxLongTermFrameIdxPlus1 + /// + [FieldOffset(10)] + public ushort MaxLongTermFrameIdxPlus1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfo.gen.cs new file mode 100644 index 0000000..d603bec --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfo.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct StdVideoEncodeH264ReferenceInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH264ReferenceInfoFlags Flags; + + /// + /// PrimaryPicType + /// + [FieldOffset(4)] + public StdVideoH264PictureType PrimaryPicType; + + /// + /// FrameNum + /// + [FieldOffset(8)] + public int FrameNum; + + /// + /// PicOrderCnt + /// + [FieldOffset(12)] + public int PicOrderCnt; + + /// + /// LongTermPicNum + /// + [FieldOffset(16)] + public ushort LongTermPicNum; + + /// + /// LongTermFrameIdx + /// + [FieldOffset(18)] + public ushort LongTermFrameIdx; + + /// + /// TemporalId + /// + [FieldOffset(20)] + public byte TemporalId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfoFlags.gen.cs new file mode 100644 index 0000000..c5b9657 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceInfoFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH264ReferenceInfoFlags() + { + /// + /// UsedForLongTermReference + /// + [FieldOffset(0)] + private int _usedForLongTermReference; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH264ReferenceInfoFlags + { + /// + public bool UsedForLongTermReference + { + get => BitFields.HasFlag(_usedForLongTermReference, 0); + set => BitFields.SetFlag(ref _usedForLongTermReference, 0, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 1, length: 31); + set => BitFields.SetRange(ref _reserved, start: 1, length: 31, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfo.gen.cs new file mode 100644 index 0000000..da76f38 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfo.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct StdVideoEncodeH264ReferenceListsInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH264ReferenceListsInfoFlags Flags; + + /// + /// NumRefIdxL0ActiveMinus1 + /// + [FieldOffset(4)] + public byte NumRefIdxL0ActiveMinus1; + + /// + /// NumRefIdxL1ActiveMinus1 + /// + [FieldOffset(5)] + public byte NumRefIdxL1ActiveMinus1; + + /// + [FieldOffset(6)] + public fixed byte RefPicList0[32]; + + /// + [FieldOffset(38)] + public fixed byte RefPicList1[32]; + + /// + /// RefList0ModOpCount + /// + [FieldOffset(70)] + public byte RefList0ModOpCount; + + /// + /// RefList1ModOpCount + /// + [FieldOffset(71)] + public byte RefList1ModOpCount; + + /// + /// RefPicMarkingOpCount + /// + [FieldOffset(72)] + public byte RefPicMarkingOpCount; + + /// + [FieldOffset(73)] + public fixed byte Reserved1[7]; + + /// + /// RefList0ModOperations + /// + [FieldOffset(80)] + public StdVideoEncodeH264RefListModEntry* RefList0ModOperations; + + /// + /// RefList1ModOperations + /// + [FieldOffset(88)] + public StdVideoEncodeH264RefListModEntry* RefList1ModOperations; + + /// + /// RefPicMarkingOperations + /// + [FieldOffset(96)] + public StdVideoEncodeH264RefPicMarkingEntry* RefPicMarkingOperations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfoFlags.gen.cs new file mode 100644 index 0000000..22d1ea7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264ReferenceListsInfoFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH264ReferenceListsInfoFlags() + { + /// + /// RefPicListModificationFlagL0 + /// + [FieldOffset(0)] + private int _refPicListModificationFlagL0; + + /// + /// RefPicListModificationFlagL1 + /// + [FieldOffset(0)] + private int _refPicListModificationFlagL1; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH264ReferenceListsInfoFlags + { + /// + public bool RefPicListModificationFlagL0 + { + get => BitFields.HasFlag(_refPicListModificationFlagL0, 0); + set => BitFields.SetFlag(ref _refPicListModificationFlagL0, 0, value); + } + + /// + public bool RefPicListModificationFlagL1 + { + get => BitFields.HasFlag(_refPicListModificationFlagL1, 1); + set => BitFields.SetFlag(ref _refPicListModificationFlagL1, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeader.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeader.gen.cs new file mode 100644 index 0000000..bed7027 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeader.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct StdVideoEncodeH264SliceHeader() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH264SliceHeaderFlags Flags; + + /// + /// FirstMbInSlice + /// + [FieldOffset(4)] + public int FirstMbInSlice; + + /// + /// SliceType + /// + [FieldOffset(8)] + public StdVideoH264SliceType SliceType; + + /// + /// SliceAlphaC0OffsetDiv2 + /// + [FieldOffset(12)] + public byte SliceAlphaC0OffsetDiv2; + + /// + /// SliceBetaOffsetDiv2 + /// + [FieldOffset(13)] + public byte SliceBetaOffsetDiv2; + + /// + /// SliceQpDelta + /// + [FieldOffset(14)] + public byte SliceQpDelta; + + /// + /// Reserved1 + /// + [FieldOffset(15)] + public byte Reserved1; + + /// + /// CabacInitIdc + /// + [FieldOffset(16)] + public StdVideoH264CabacInitIdc CabacInitIdc; + + /// + /// DisableDeblockingFilterIdc + /// + [FieldOffset(20)] + public StdVideoH264DisableDeblockingFilterIdc DisableDeblockingFilterIdc; + + /// + /// WeightTable + /// + [FieldOffset(24)] + public StdVideoEncodeH264WeightTable* WeightTable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeaderFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeaderFlags.gen.cs new file mode 100644 index 0000000..3628b27 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264SliceHeaderFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH264SliceHeaderFlags() + { + /// + /// DirectSpatialMvPredFlag + /// + [FieldOffset(0)] + private int _directSpatialMvPredFlag; + + /// + /// NumRefIdxActiveOverrideFlag + /// + [FieldOffset(0)] + private int _numRefIdxActiveOverrideFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH264SliceHeaderFlags + { + /// + public bool DirectSpatialMvPredFlag + { + get => BitFields.HasFlag(_directSpatialMvPredFlag, 0); + set => BitFields.SetFlag(ref _directSpatialMvPredFlag, 0, value); + } + + /// + public bool NumRefIdxActiveOverrideFlag + { + get => BitFields.HasFlag(_numRefIdxActiveOverrideFlag, 1); + set => BitFields.SetFlag(ref _numRefIdxActiveOverrideFlag, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTable.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTable.gen.cs new file mode 100644 index 0000000..0664a72 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTable.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 404)] + public unsafe partial struct StdVideoEncodeH264WeightTable() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH264WeightTableFlags Flags; + + /// + /// LumaLog2WeightDenom + /// + [FieldOffset(16)] + public byte LumaLog2WeightDenom; + + /// + /// ChromaLog2WeightDenom + /// + [FieldOffset(17)] + public byte ChromaLog2WeightDenom; + + /// + [FieldOffset(18)] + public fixed byte LumaWeightL0[32]; + + /// + [FieldOffset(50)] + public fixed byte LumaOffsetL0[32]; + + /// + /// ChromaWeightL0 + /// + [FieldOffset(82)] + public byte_2_32 ChromaWeightL0; + + /// + /// ChromaOffsetL0 + /// + [FieldOffset(146)] + public byte_2_32 ChromaOffsetL0; + + /// + [FieldOffset(210)] + public fixed byte LumaWeightL1[32]; + + /// + [FieldOffset(242)] + public fixed byte LumaOffsetL1[32]; + + /// + /// ChromaWeightL1 + /// + [FieldOffset(274)] + public byte_2_32 ChromaWeightL1; + + /// + /// ChromaOffsetL1 + /// + [FieldOffset(338)] + public byte_2_32 ChromaOffsetL1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTableFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTableFlags.gen.cs new file mode 100644 index 0000000..2d5b134 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH264WeightTableFlags.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct StdVideoEncodeH264WeightTableFlags() + { + /// + /// LumaWeightL0Flag + /// + [FieldOffset(0)] + public int LumaWeightL0Flag; + + /// + /// ChromaWeightL0Flag + /// + [FieldOffset(4)] + public int ChromaWeightL0Flag; + + /// + /// LumaWeightL1Flag + /// + [FieldOffset(8)] + public int LumaWeightL1Flag; + + /// + /// ChromaWeightL1Flag + /// + [FieldOffset(12)] + public int ChromaWeightL1Flag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265LongTermRefPics.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265LongTermRefPics.gen.cs new file mode 100644 index 0000000..fdcf9f9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265LongTermRefPics.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 148)] + public unsafe partial struct StdVideoEncodeH265LongTermRefPics() + { + /// + /// NumLongTermSps + /// + [FieldOffset(0)] + public byte NumLongTermSps; + + /// + /// NumLongTermPics + /// + [FieldOffset(1)] + public byte NumLongTermPics; + + /// + [FieldOffset(2)] + public fixed byte LtIdxSps[32]; + + /// + [FieldOffset(34)] + public fixed byte PocLsbLt[16]; + + /// + /// UsedByCurrPicLtFlag + /// + [FieldOffset(50)] + public ushort UsedByCurrPicLtFlag; + + /// + [FieldOffset(52)] + public fixed byte DeltaPocMsbPresentFlag[48]; + + /// + [FieldOffset(100)] + public fixed byte DeltaPocMsbCycleLt[48]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfo.gen.cs new file mode 100644 index 0000000..f80481c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfo.gen.cs @@ -0,0 +1,77 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct StdVideoEncodeH265PictureInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH265PictureInfoFlags Flags; + + /// + /// PicType + /// + [FieldOffset(4)] + public StdVideoH265PictureType PicType; + + /// + /// SpsVideoParameterSetId + /// + [FieldOffset(8)] + public byte SpsVideoParameterSetId; + + /// + /// PpsSeqParameterSetId + /// + [FieldOffset(9)] + public byte PpsSeqParameterSetId; + + /// + /// PpsPicParameterSetId + /// + [FieldOffset(10)] + public byte PpsPicParameterSetId; + + /// + /// ShortTermRefPicSetIdx + /// + [FieldOffset(11)] + public byte ShortTermRefPicSetIdx; + + /// + /// PicOrderCntVal + /// + [FieldOffset(12)] + public int PicOrderCntVal; + + /// + /// TemporalId + /// + [FieldOffset(16)] + public byte TemporalId; + + /// + [FieldOffset(17)] + public fixed byte Reserved1[7]; + + /// + /// RefLists + /// + [FieldOffset(24)] + public StdVideoEncodeH265ReferenceListsInfo* RefLists; + + /// + /// ShortTermRefPicSet + /// + [FieldOffset(32)] + public StdVideoH265ShortTermRefPicSet* ShortTermRefPicSet; + + /// + /// LongTermRefPics + /// + [FieldOffset(40)] + public StdVideoEncodeH265LongTermRefPics* LongTermRefPics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfoFlags.gen.cs new file mode 100644 index 0000000..476a04d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265PictureInfoFlags.gen.cs @@ -0,0 +1,140 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH265PictureInfoFlags() + { + /// + /// IsReference + /// + [FieldOffset(0)] + private int _isReference; + + /// + /// IrapPicFlag + /// + [FieldOffset(0)] + private int _irapPicFlag; + + /// + /// UsedForLongTermReference + /// + [FieldOffset(0)] + private int _usedForLongTermReference; + + /// + /// DiscardableFlag + /// + [FieldOffset(0)] + private int _discardableFlag; + + /// + /// CrossLayerBlaFlag + /// + [FieldOffset(0)] + private int _crossLayerBlaFlag; + + /// + /// PicOutputFlag + /// + [FieldOffset(0)] + private int _picOutputFlag; + + /// + /// NoOutputOfPriorPicsFlag + /// + [FieldOffset(0)] + private int _noOutputOfPriorPicsFlag; + + /// + /// ShortTermRefPicSetSpsFlag + /// + [FieldOffset(0)] + private int _shortTermRefPicSetSpsFlag; + + /// + /// SliceTemporalMvpEnabledFlag + /// + [FieldOffset(0)] + private int _sliceTemporalMvpEnabledFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH265PictureInfoFlags + { + /// + public bool IsReference + { + get => BitFields.HasFlag(_isReference, 0); + set => BitFields.SetFlag(ref _isReference, 0, value); + } + + /// + public bool IrapPicFlag + { + get => BitFields.HasFlag(_irapPicFlag, 1); + set => BitFields.SetFlag(ref _irapPicFlag, 1, value); + } + + /// + public bool UsedForLongTermReference + { + get => BitFields.HasFlag(_usedForLongTermReference, 2); + set => BitFields.SetFlag(ref _usedForLongTermReference, 2, value); + } + + /// + public bool DiscardableFlag + { + get => BitFields.HasFlag(_discardableFlag, 3); + set => BitFields.SetFlag(ref _discardableFlag, 3, value); + } + + /// + public bool CrossLayerBlaFlag + { + get => BitFields.HasFlag(_crossLayerBlaFlag, 4); + set => BitFields.SetFlag(ref _crossLayerBlaFlag, 4, value); + } + + /// + public bool PicOutputFlag + { + get => BitFields.HasFlag(_picOutputFlag, 5); + set => BitFields.SetFlag(ref _picOutputFlag, 5, value); + } + + /// + public bool NoOutputOfPriorPicsFlag + { + get => BitFields.HasFlag(_noOutputOfPriorPicsFlag, 6); + set => BitFields.SetFlag(ref _noOutputOfPriorPicsFlag, 6, value); + } + + /// + public bool ShortTermRefPicSetSpsFlag + { + get => BitFields.HasFlag(_shortTermRefPicSetSpsFlag, 7); + set => BitFields.SetFlag(ref _shortTermRefPicSetSpsFlag, 7, value); + } + + /// + public bool SliceTemporalMvpEnabledFlag + { + get => BitFields.HasFlag(_sliceTemporalMvpEnabledFlag, 8); + set => BitFields.SetFlag(ref _sliceTemporalMvpEnabledFlag, 8, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 9, length: 23); + set => BitFields.SetRange(ref _reserved, start: 9, length: 23, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfo.gen.cs new file mode 100644 index 0000000..87dda56 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfo.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct StdVideoEncodeH265ReferenceInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH265ReferenceInfoFlags Flags; + + /// + /// PicType + /// + [FieldOffset(4)] + public StdVideoH265PictureType PicType; + + /// + /// PicOrderCntVal + /// + [FieldOffset(8)] + public int PicOrderCntVal; + + /// + /// TemporalId + /// + [FieldOffset(12)] + public byte TemporalId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfoFlags.gen.cs new file mode 100644 index 0000000..671fda8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceInfoFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH265ReferenceInfoFlags() + { + /// + /// UsedForLongTermReference + /// + [FieldOffset(0)] + private int _usedForLongTermReference; + + /// + /// UnusedForReference + /// + [FieldOffset(0)] + private int _unusedForReference; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH265ReferenceInfoFlags + { + /// + public bool UsedForLongTermReference + { + get => BitFields.HasFlag(_usedForLongTermReference, 0); + set => BitFields.SetFlag(ref _usedForLongTermReference, 0, value); + } + + /// + public bool UnusedForReference + { + get => BitFields.HasFlag(_unusedForReference, 1); + set => BitFields.SetFlag(ref _unusedForReference, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfo.gen.cs new file mode 100644 index 0000000..9b0f64a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfo.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 68)] + public unsafe partial struct StdVideoEncodeH265ReferenceListsInfo() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH265ReferenceListsInfoFlags Flags; + + /// + /// NumRefIdxL0ActiveMinus1 + /// + [FieldOffset(4)] + public byte NumRefIdxL0ActiveMinus1; + + /// + /// NumRefIdxL1ActiveMinus1 + /// + [FieldOffset(5)] + public byte NumRefIdxL1ActiveMinus1; + + /// + [FieldOffset(6)] + public fixed byte RefPicList0[15]; + + /// + [FieldOffset(21)] + public fixed byte RefPicList1[15]; + + /// + [FieldOffset(36)] + public fixed byte ListEntryL0[15]; + + /// + [FieldOffset(51)] + public fixed byte ListEntryL1[15]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfoFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfoFlags.gen.cs new file mode 100644 index 0000000..ceb1d42 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265ReferenceListsInfoFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH265ReferenceListsInfoFlags() + { + /// + /// RefPicListModificationFlagL0 + /// + [FieldOffset(0)] + private int _refPicListModificationFlagL0; + + /// + /// RefPicListModificationFlagL1 + /// + [FieldOffset(0)] + private int _refPicListModificationFlagL1; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH265ReferenceListsInfoFlags + { + /// + public bool RefPicListModificationFlagL0 + { + get => BitFields.HasFlag(_refPicListModificationFlagL0, 0); + set => BitFields.SetFlag(ref _refPicListModificationFlagL0, 0, value); + } + + /// + public bool RefPicListModificationFlagL1 + { + get => BitFields.HasFlag(_refPicListModificationFlagL1, 1); + set => BitFields.SetFlag(ref _refPicListModificationFlagL1, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeader.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeader.gen.cs new file mode 100644 index 0000000..f5d1828 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeader.gen.cs @@ -0,0 +1,97 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct StdVideoEncodeH265SliceSegmentHeader() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH265SliceSegmentHeaderFlags Flags; + + /// + /// SliceType + /// + [FieldOffset(4)] + public StdVideoH265SliceType SliceType; + + /// + /// SliceSegmentAddress + /// + [FieldOffset(8)] + public int SliceSegmentAddress; + + /// + /// CollocatedRefIdx + /// + [FieldOffset(12)] + public byte CollocatedRefIdx; + + /// + /// MaxNumMergeCand + /// + [FieldOffset(13)] + public byte MaxNumMergeCand; + + /// + /// SliceCbQpOffset + /// + [FieldOffset(14)] + public byte SliceCbQpOffset; + + /// + /// SliceCrQpOffset + /// + [FieldOffset(15)] + public byte SliceCrQpOffset; + + /// + /// SliceBetaOffsetDiv2 + /// + [FieldOffset(16)] + public byte SliceBetaOffsetDiv2; + + /// + /// SliceTcOffsetDiv2 + /// + [FieldOffset(17)] + public byte SliceTcOffsetDiv2; + + /// + /// SliceActYQpOffset + /// + [FieldOffset(18)] + public byte SliceActYQpOffset; + + /// + /// SliceActCbQpOffset + /// + [FieldOffset(19)] + public byte SliceActCbQpOffset; + + /// + /// SliceActCrQpOffset + /// + [FieldOffset(20)] + public byte SliceActCrQpOffset; + + /// + /// SliceQpDelta + /// + [FieldOffset(21)] + public byte SliceQpDelta; + + /// + /// Reserved1 + /// + [FieldOffset(22)] + public ushort Reserved1; + + /// + /// WeightTable + /// + [FieldOffset(24)] + public StdVideoEncodeH265WeightTable* WeightTable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeaderFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeaderFlags.gen.cs new file mode 100644 index 0000000..49b7ca3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265SliceSegmentHeaderFlags.gen.cs @@ -0,0 +1,179 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoEncodeH265SliceSegmentHeaderFlags() + { + /// + /// FirstSliceSegmentInPicFlag + /// + [FieldOffset(0)] + private int _firstSliceSegmentInPicFlag; + + /// + /// DependentSliceSegmentFlag + /// + [FieldOffset(0)] + private int _dependentSliceSegmentFlag; + + /// + /// SliceSaoLumaFlag + /// + [FieldOffset(0)] + private int _sliceSaoLumaFlag; + + /// + /// SliceSaoChromaFlag + /// + [FieldOffset(0)] + private int _sliceSaoChromaFlag; + + /// + /// NumRefIdxActiveOverrideFlag + /// + [FieldOffset(0)] + private int _numRefIdxActiveOverrideFlag; + + /// + /// MvdL1ZeroFlag + /// + [FieldOffset(0)] + private int _mvdL1ZeroFlag; + + /// + /// CabacInitFlag + /// + [FieldOffset(0)] + private int _cabacInitFlag; + + /// + /// CuChromaQpOffsetEnabledFlag + /// + [FieldOffset(0)] + private int _cuChromaQpOffsetEnabledFlag; + + /// + /// DeblockingFilterOverrideFlag + /// + [FieldOffset(0)] + private int _deblockingFilterOverrideFlag; + + /// + /// SliceDeblockingFilterDisabledFlag + /// + [FieldOffset(0)] + private int _sliceDeblockingFilterDisabledFlag; + + /// + /// CollocatedFromL0Flag + /// + [FieldOffset(0)] + private int _collocatedFromL0Flag; + + /// + /// SliceLoopFilterAcrossSlicesEnabledFlag + /// + [FieldOffset(0)] + private int _sliceLoopFilterAcrossSlicesEnabledFlag; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoEncodeH265SliceSegmentHeaderFlags + { + /// + public bool FirstSliceSegmentInPicFlag + { + get => BitFields.HasFlag(_firstSliceSegmentInPicFlag, 0); + set => BitFields.SetFlag(ref _firstSliceSegmentInPicFlag, 0, value); + } + + /// + public bool DependentSliceSegmentFlag + { + get => BitFields.HasFlag(_dependentSliceSegmentFlag, 1); + set => BitFields.SetFlag(ref _dependentSliceSegmentFlag, 1, value); + } + + /// + public bool SliceSaoLumaFlag + { + get => BitFields.HasFlag(_sliceSaoLumaFlag, 2); + set => BitFields.SetFlag(ref _sliceSaoLumaFlag, 2, value); + } + + /// + public bool SliceSaoChromaFlag + { + get => BitFields.HasFlag(_sliceSaoChromaFlag, 3); + set => BitFields.SetFlag(ref _sliceSaoChromaFlag, 3, value); + } + + /// + public bool NumRefIdxActiveOverrideFlag + { + get => BitFields.HasFlag(_numRefIdxActiveOverrideFlag, 4); + set => BitFields.SetFlag(ref _numRefIdxActiveOverrideFlag, 4, value); + } + + /// + public bool MvdL1ZeroFlag + { + get => BitFields.HasFlag(_mvdL1ZeroFlag, 5); + set => BitFields.SetFlag(ref _mvdL1ZeroFlag, 5, value); + } + + /// + public bool CabacInitFlag + { + get => BitFields.HasFlag(_cabacInitFlag, 6); + set => BitFields.SetFlag(ref _cabacInitFlag, 6, value); + } + + /// + public bool CuChromaQpOffsetEnabledFlag + { + get => BitFields.HasFlag(_cuChromaQpOffsetEnabledFlag, 7); + set => BitFields.SetFlag(ref _cuChromaQpOffsetEnabledFlag, 7, value); + } + + /// + public bool DeblockingFilterOverrideFlag + { + get => BitFields.HasFlag(_deblockingFilterOverrideFlag, 8); + set => BitFields.SetFlag(ref _deblockingFilterOverrideFlag, 8, value); + } + + /// + public bool SliceDeblockingFilterDisabledFlag + { + get => BitFields.HasFlag(_sliceDeblockingFilterDisabledFlag, 9); + set => BitFields.SetFlag(ref _sliceDeblockingFilterDisabledFlag, 9, value); + } + + /// + public bool CollocatedFromL0Flag + { + get => BitFields.HasFlag(_collocatedFromL0Flag, 10); + set => BitFields.SetFlag(ref _collocatedFromL0Flag, 10, value); + } + + /// + public bool SliceLoopFilterAcrossSlicesEnabledFlag + { + get => BitFields.HasFlag(_sliceLoopFilterAcrossSlicesEnabledFlag, 11); + set => BitFields.SetFlag(ref _sliceLoopFilterAcrossSlicesEnabledFlag, 11, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 12, length: 20); + set => BitFields.SetRange(ref _reserved, start: 12, length: 20, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTable.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTable.gen.cs new file mode 100644 index 0000000..a506090 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTable.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 190)] + public unsafe partial struct StdVideoEncodeH265WeightTable() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoEncodeH265WeightTableFlags Flags; + + /// + /// LumaLog2WeightDenom + /// + [FieldOffset(8)] + public byte LumaLog2WeightDenom; + + /// + /// DeltaChromaLog2WeightDenom + /// + [FieldOffset(9)] + public byte DeltaChromaLog2WeightDenom; + + /// + [FieldOffset(10)] + public fixed byte DeltaLumaWeightL0[15]; + + /// + [FieldOffset(25)] + public fixed byte LumaOffsetL0[15]; + + /// + /// DeltaChromaWeightL0 + /// + [FieldOffset(40)] + public byte_2_15 DeltaChromaWeightL0; + + /// + /// DeltaChromaOffsetL0 + /// + [FieldOffset(70)] + public byte_2_15 DeltaChromaOffsetL0; + + /// + [FieldOffset(100)] + public fixed byte DeltaLumaWeightL1[15]; + + /// + [FieldOffset(115)] + public fixed byte LumaOffsetL1[15]; + + /// + /// DeltaChromaWeightL1 + /// + [FieldOffset(130)] + public byte_2_15 DeltaChromaWeightL1; + + /// + /// DeltaChromaOffsetL1 + /// + [FieldOffset(160)] + public byte_2_15 DeltaChromaOffsetL1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTableFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTableFlags.gen.cs new file mode 100644 index 0000000..5c9aede --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoEncodeH265WeightTableFlags.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct StdVideoEncodeH265WeightTableFlags() + { + /// + /// LumaWeightL0Flag + /// + [FieldOffset(0)] + public ushort LumaWeightL0Flag; + + /// + /// ChromaWeightL0Flag + /// + [FieldOffset(2)] + public ushort ChromaWeightL0Flag; + + /// + /// LumaWeightL1Flag + /// + [FieldOffset(4)] + public ushort LumaWeightL1Flag; + + /// + /// ChromaWeightL1Flag + /// + [FieldOffset(6)] + public ushort ChromaWeightL1Flag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264HrdParameters.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264HrdParameters.gen.cs new file mode 100644 index 0000000..fca60bc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264HrdParameters.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 308)] + public unsafe partial struct StdVideoH264HrdParameters() + { + /// + /// CpbCntMinus1 + /// + [FieldOffset(0)] + public byte CpbCntMinus1; + + /// + /// BitRateScale + /// + [FieldOffset(1)] + public byte BitRateScale; + + /// + /// CpbSizeScale + /// + [FieldOffset(2)] + public byte CpbSizeScale; + + /// + /// Reserved1 + /// + [FieldOffset(3)] + public byte Reserved1; + + /// + [FieldOffset(4)] + public fixed int BitRateValueMinus1[32]; + + /// + [FieldOffset(132)] + public fixed int CpbSizeValueMinus1[32]; + + /// + [FieldOffset(260)] + public fixed byte CbrFlag[32]; + + /// + /// InitialCpbRemovalDelayLengthMinus1 + /// + [FieldOffset(292)] + public int InitialCpbRemovalDelayLengthMinus1; + + /// + /// CpbRemovalDelayLengthMinus1 + /// + [FieldOffset(296)] + public int CpbRemovalDelayLengthMinus1; + + /// + /// DpbOutputDelayLengthMinus1 + /// + [FieldOffset(300)] + public int DpbOutputDelayLengthMinus1; + + /// + /// TimeOffsetLength + /// + [FieldOffset(304)] + public int TimeOffsetLength; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264PictureParameterSet.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264PictureParameterSet.gen.cs new file mode 100644 index 0000000..a389645 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264PictureParameterSet.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct StdVideoH264PictureParameterSet() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH264PpsFlags Flags; + + /// + /// SeqParameterSetId + /// + [FieldOffset(4)] + public byte SeqParameterSetId; + + /// + /// PicParameterSetId + /// + [FieldOffset(5)] + public byte PicParameterSetId; + + /// + /// NumRefIdxL0DefaultActiveMinus1 + /// + [FieldOffset(6)] + public byte NumRefIdxL0DefaultActiveMinus1; + + /// + /// NumRefIdxL1DefaultActiveMinus1 + /// + [FieldOffset(7)] + public byte NumRefIdxL1DefaultActiveMinus1; + + /// + /// WeightedBipredIdc + /// + [FieldOffset(8)] + public StdVideoH264WeightedBipredIdc WeightedBipredIdc; + + /// + /// PicInitQpMinus26 + /// + [FieldOffset(12)] + public byte PicInitQpMinus26; + + /// + /// PicInitQsMinus26 + /// + [FieldOffset(13)] + public byte PicInitQsMinus26; + + /// + /// ChromaQpIndexOffset + /// + [FieldOffset(14)] + public byte ChromaQpIndexOffset; + + /// + /// SecondChromaQpIndexOffset + /// + [FieldOffset(15)] + public byte SecondChromaQpIndexOffset; + + /// + /// ScalingLists + /// + [FieldOffset(16)] + public StdVideoH264ScalingLists* ScalingLists; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264PpsFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264PpsFlags.gen.cs new file mode 100644 index 0000000..a461f4b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264PpsFlags.gen.cs @@ -0,0 +1,114 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH264PpsFlags() + { + /// + /// Transform_8x8ModeFlag + /// + [FieldOffset(0)] + private int _transform_8x8ModeFlag; + + /// + /// RedundantPicCntPresentFlag + /// + [FieldOffset(0)] + private int _redundantPicCntPresentFlag; + + /// + /// ConstrainedIntraPredFlag + /// + [FieldOffset(0)] + private int _constrainedIntraPredFlag; + + /// + /// DeblockingFilterControlPresentFlag + /// + [FieldOffset(0)] + private int _deblockingFilterControlPresentFlag; + + /// + /// WeightedPredFlag + /// + [FieldOffset(0)] + private int _weightedPredFlag; + + /// + /// BottomFieldPicOrderInFramePresentFlag + /// + [FieldOffset(0)] + private int _bottomFieldPicOrderInFramePresentFlag; + + /// + /// EntropyCodingModeFlag + /// + [FieldOffset(0)] + private int _entropyCodingModeFlag; + + /// + /// PicScalingMatrixPresentFlag + /// + [FieldOffset(0)] + private int _picScalingMatrixPresentFlag; + } + + public partial struct StdVideoH264PpsFlags + { + /// + public bool Transform_8x8ModeFlag + { + get => BitFields.HasFlag(_transform_8x8ModeFlag, 0); + set => BitFields.SetFlag(ref _transform_8x8ModeFlag, 0, value); + } + + /// + public bool RedundantPicCntPresentFlag + { + get => BitFields.HasFlag(_redundantPicCntPresentFlag, 1); + set => BitFields.SetFlag(ref _redundantPicCntPresentFlag, 1, value); + } + + /// + public bool ConstrainedIntraPredFlag + { + get => BitFields.HasFlag(_constrainedIntraPredFlag, 2); + set => BitFields.SetFlag(ref _constrainedIntraPredFlag, 2, value); + } + + /// + public bool DeblockingFilterControlPresentFlag + { + get => BitFields.HasFlag(_deblockingFilterControlPresentFlag, 3); + set => BitFields.SetFlag(ref _deblockingFilterControlPresentFlag, 3, value); + } + + /// + public bool WeightedPredFlag + { + get => BitFields.HasFlag(_weightedPredFlag, 4); + set => BitFields.SetFlag(ref _weightedPredFlag, 4, value); + } + + /// + public bool BottomFieldPicOrderInFramePresentFlag + { + get => BitFields.HasFlag(_bottomFieldPicOrderInFramePresentFlag, 5); + set => BitFields.SetFlag(ref _bottomFieldPicOrderInFramePresentFlag, 5, value); + } + + /// + public bool EntropyCodingModeFlag + { + get => BitFields.HasFlag(_entropyCodingModeFlag, 6); + set => BitFields.SetFlag(ref _entropyCodingModeFlag, 6, value); + } + + /// + public bool PicScalingMatrixPresentFlag + { + get => BitFields.HasFlag(_picScalingMatrixPresentFlag, 7); + set => BitFields.SetFlag(ref _picScalingMatrixPresentFlag, 7, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264ScalingLists.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264ScalingLists.gen.cs new file mode 100644 index 0000000..53ea209 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264ScalingLists.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 484)] + public partial struct StdVideoH264ScalingLists() + { + /// + /// ScalingListPresentMask + /// + [FieldOffset(0)] + public ushort ScalingListPresentMask; + + /// + /// UseDefaultScalingMatrixMask + /// + [FieldOffset(2)] + public ushort UseDefaultScalingMatrixMask; + + /// + /// ScalingList4x4 + /// + [FieldOffset(4)] + public byte_16_6 ScalingList4x4; + + /// + /// ScalingList8x8 + /// + [FieldOffset(100)] + public byte_64_6 ScalingList8x8; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSet.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSet.gen.cs new file mode 100644 index 0000000..42f69f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSet.gen.cs @@ -0,0 +1,157 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct StdVideoH264SequenceParameterSet() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH264SpsFlags Flags; + + /// + /// ProfileIdc + /// + [FieldOffset(4)] + public StdVideoH264ProfileIdc ProfileIdc; + + /// + /// LevelIdc + /// + [FieldOffset(8)] + public StdVideoH264LevelIdc LevelIdc; + + /// + /// ChromaFormatIdc + /// + [FieldOffset(12)] + public StdVideoH264ChromaFormatIdc ChromaFormatIdc; + + /// + /// SeqParameterSetId + /// + [FieldOffset(16)] + public byte SeqParameterSetId; + + /// + /// BitDepthLumaMinus8 + /// + [FieldOffset(17)] + public byte BitDepthLumaMinus8; + + /// + /// BitDepthChromaMinus8 + /// + [FieldOffset(18)] + public byte BitDepthChromaMinus8; + + /// + /// Log2MaxFrameNumMinus4 + /// + [FieldOffset(19)] + public byte Log2MaxFrameNumMinus4; + + /// + /// PicOrderCntType + /// + [FieldOffset(20)] + public StdVideoH264PocType PicOrderCntType; + + /// + /// OffsetForNonRefPic + /// + [FieldOffset(24)] + public int OffsetForNonRefPic; + + /// + /// OffsetForTopToBottomField + /// + [FieldOffset(28)] + public int OffsetForTopToBottomField; + + /// + /// Log2MaxPicOrderCntLsbMinus4 + /// + [FieldOffset(32)] + public byte Log2MaxPicOrderCntLsbMinus4; + + /// + /// NumRefFramesInPicOrderCntCycle + /// + [FieldOffset(33)] + public byte NumRefFramesInPicOrderCntCycle; + + /// + /// MaxNumRefFrames + /// + [FieldOffset(34)] + public byte MaxNumRefFrames; + + /// + /// Reserved1 + /// + [FieldOffset(35)] + public byte Reserved1; + + /// + /// PicWidthInMbsMinus1 + /// + [FieldOffset(36)] + public int PicWidthInMbsMinus1; + + /// + /// PicHeightInMapUnitsMinus1 + /// + [FieldOffset(40)] + public int PicHeightInMapUnitsMinus1; + + /// + /// FrameCropLeftOffset + /// + [FieldOffset(44)] + public int FrameCropLeftOffset; + + /// + /// FrameCropRightOffset + /// + [FieldOffset(48)] + public int FrameCropRightOffset; + + /// + /// FrameCropTopOffset + /// + [FieldOffset(52)] + public int FrameCropTopOffset; + + /// + /// FrameCropBottomOffset + /// + [FieldOffset(56)] + public int FrameCropBottomOffset; + + /// + /// Reserved2 + /// + [FieldOffset(60)] + public int Reserved2; + + /// + /// OffsetForRefFrame + /// + [FieldOffset(64)] + public int* OffsetForRefFrame; + + /// + /// ScalingLists + /// + [FieldOffset(72)] + public StdVideoH264ScalingLists* ScalingLists; + + /// + /// SequenceParameterSetVui + /// + [FieldOffset(80)] + public StdVideoH264SequenceParameterSetVui* SequenceParameterSetVui; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSetVui.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSetVui.gen.cs new file mode 100644 index 0000000..538189a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264SequenceParameterSetVui.gen.cs @@ -0,0 +1,103 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct StdVideoH264SequenceParameterSetVui() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH264SpsVuiFlags Flags; + + /// + /// AspectRatioIdc + /// + [FieldOffset(4)] + public StdVideoH264AspectRatioIdc AspectRatioIdc; + + /// + /// SarWidth + /// + [FieldOffset(8)] + public ushort SarWidth; + + /// + /// SarHeight + /// + [FieldOffset(10)] + public ushort SarHeight; + + /// + /// VideoFormat + /// + [FieldOffset(12)] + public byte VideoFormat; + + /// + /// ColourPrimaries + /// + [FieldOffset(13)] + public byte ColourPrimaries; + + /// + /// TransferCharacteristics + /// + [FieldOffset(14)] + public byte TransferCharacteristics; + + /// + /// MatrixCoefficients + /// + [FieldOffset(15)] + public byte MatrixCoefficients; + + /// + /// NumUnitsInTick + /// + [FieldOffset(16)] + public int NumUnitsInTick; + + /// + /// TimeScale + /// + [FieldOffset(20)] + public int TimeScale; + + /// + /// MaxNumReorderFrames + /// + [FieldOffset(24)] + public byte MaxNumReorderFrames; + + /// + /// MaxDecFrameBuffering + /// + [FieldOffset(25)] + public byte MaxDecFrameBuffering; + + /// + /// ChromaSampleLocTypeTopField + /// + [FieldOffset(26)] + public byte ChromaSampleLocTypeTopField; + + /// + /// ChromaSampleLocTypeBottomField + /// + [FieldOffset(27)] + public byte ChromaSampleLocTypeBottomField; + + /// + /// Reserved1 + /// + [FieldOffset(28)] + public int Reserved1; + + /// + /// HrdParameters + /// + [FieldOffset(32)] + public StdVideoH264HrdParameters* HrdParameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264SpsFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264SpsFlags.gen.cs new file mode 100644 index 0000000..79e8ae9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264SpsFlags.gen.cs @@ -0,0 +1,218 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH264SpsFlags() + { + /// + /// ConstraintSet0Flag + /// + [FieldOffset(0)] + private int _constraintSet0Flag; + + /// + /// ConstraintSet1Flag + /// + [FieldOffset(0)] + private int _constraintSet1Flag; + + /// + /// ConstraintSet2Flag + /// + [FieldOffset(0)] + private int _constraintSet2Flag; + + /// + /// ConstraintSet3Flag + /// + [FieldOffset(0)] + private int _constraintSet3Flag; + + /// + /// ConstraintSet4Flag + /// + [FieldOffset(0)] + private int _constraintSet4Flag; + + /// + /// ConstraintSet5Flag + /// + [FieldOffset(0)] + private int _constraintSet5Flag; + + /// + /// Direct_8x8InferenceFlag + /// + [FieldOffset(0)] + private int _direct_8x8InferenceFlag; + + /// + /// MbAdaptiveFrameFieldFlag + /// + [FieldOffset(0)] + private int _mbAdaptiveFrameFieldFlag; + + /// + /// FrameMbsOnlyFlag + /// + [FieldOffset(0)] + private int _frameMbsOnlyFlag; + + /// + /// DeltaPicOrderAlwaysZeroFlag + /// + [FieldOffset(0)] + private int _deltaPicOrderAlwaysZeroFlag; + + /// + /// SeparateColourPlaneFlag + /// + [FieldOffset(0)] + private int _separateColourPlaneFlag; + + /// + /// GapsInFrameNumValueAllowedFlag + /// + [FieldOffset(0)] + private int _gapsInFrameNumValueAllowedFlag; + + /// + /// QpprimeYZeroTransformBypassFlag + /// + [FieldOffset(0)] + private int _qpprimeYZeroTransformBypassFlag; + + /// + /// FrameCroppingFlag + /// + [FieldOffset(0)] + private int _frameCroppingFlag; + + /// + /// SeqScalingMatrixPresentFlag + /// + [FieldOffset(0)] + private int _seqScalingMatrixPresentFlag; + + /// + /// VuiParametersPresentFlag + /// + [FieldOffset(0)] + private int _vuiParametersPresentFlag; + } + + public partial struct StdVideoH264SpsFlags + { + /// + public bool ConstraintSet0Flag + { + get => BitFields.HasFlag(_constraintSet0Flag, 0); + set => BitFields.SetFlag(ref _constraintSet0Flag, 0, value); + } + + /// + public bool ConstraintSet1Flag + { + get => BitFields.HasFlag(_constraintSet1Flag, 1); + set => BitFields.SetFlag(ref _constraintSet1Flag, 1, value); + } + + /// + public bool ConstraintSet2Flag + { + get => BitFields.HasFlag(_constraintSet2Flag, 2); + set => BitFields.SetFlag(ref _constraintSet2Flag, 2, value); + } + + /// + public bool ConstraintSet3Flag + { + get => BitFields.HasFlag(_constraintSet3Flag, 3); + set => BitFields.SetFlag(ref _constraintSet3Flag, 3, value); + } + + /// + public bool ConstraintSet4Flag + { + get => BitFields.HasFlag(_constraintSet4Flag, 4); + set => BitFields.SetFlag(ref _constraintSet4Flag, 4, value); + } + + /// + public bool ConstraintSet5Flag + { + get => BitFields.HasFlag(_constraintSet5Flag, 5); + set => BitFields.SetFlag(ref _constraintSet5Flag, 5, value); + } + + /// + public bool Direct_8x8InferenceFlag + { + get => BitFields.HasFlag(_direct_8x8InferenceFlag, 6); + set => BitFields.SetFlag(ref _direct_8x8InferenceFlag, 6, value); + } + + /// + public bool MbAdaptiveFrameFieldFlag + { + get => BitFields.HasFlag(_mbAdaptiveFrameFieldFlag, 7); + set => BitFields.SetFlag(ref _mbAdaptiveFrameFieldFlag, 7, value); + } + + /// + public bool FrameMbsOnlyFlag + { + get => BitFields.HasFlag(_frameMbsOnlyFlag, 8); + set => BitFields.SetFlag(ref _frameMbsOnlyFlag, 8, value); + } + + /// + public bool DeltaPicOrderAlwaysZeroFlag + { + get => BitFields.HasFlag(_deltaPicOrderAlwaysZeroFlag, 9); + set => BitFields.SetFlag(ref _deltaPicOrderAlwaysZeroFlag, 9, value); + } + + /// + public bool SeparateColourPlaneFlag + { + get => BitFields.HasFlag(_separateColourPlaneFlag, 10); + set => BitFields.SetFlag(ref _separateColourPlaneFlag, 10, value); + } + + /// + public bool GapsInFrameNumValueAllowedFlag + { + get => BitFields.HasFlag(_gapsInFrameNumValueAllowedFlag, 11); + set => BitFields.SetFlag(ref _gapsInFrameNumValueAllowedFlag, 11, value); + } + + /// + public bool QpprimeYZeroTransformBypassFlag + { + get => BitFields.HasFlag(_qpprimeYZeroTransformBypassFlag, 12); + set => BitFields.SetFlag(ref _qpprimeYZeroTransformBypassFlag, 12, value); + } + + /// + public bool FrameCroppingFlag + { + get => BitFields.HasFlag(_frameCroppingFlag, 13); + set => BitFields.SetFlag(ref _frameCroppingFlag, 13, value); + } + + /// + public bool SeqScalingMatrixPresentFlag + { + get => BitFields.HasFlag(_seqScalingMatrixPresentFlag, 14); + set => BitFields.SetFlag(ref _seqScalingMatrixPresentFlag, 14, value); + } + + /// + public bool VuiParametersPresentFlag + { + get => BitFields.HasFlag(_vuiParametersPresentFlag, 15); + set => BitFields.SetFlag(ref _vuiParametersPresentFlag, 15, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH264SpsVuiFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH264SpsVuiFlags.gen.cs new file mode 100644 index 0000000..b4aafbd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH264SpsVuiFlags.gen.cs @@ -0,0 +1,166 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH264SpsVuiFlags() + { + /// + /// AspectRatioInfoPresentFlag + /// + [FieldOffset(0)] + private int _aspectRatioInfoPresentFlag; + + /// + /// OverscanInfoPresentFlag + /// + [FieldOffset(0)] + private int _overscanInfoPresentFlag; + + /// + /// OverscanAppropriateFlag + /// + [FieldOffset(0)] + private int _overscanAppropriateFlag; + + /// + /// VideoSignalTypePresentFlag + /// + [FieldOffset(0)] + private int _videoSignalTypePresentFlag; + + /// + /// VideoFullRangeFlag + /// + [FieldOffset(0)] + private int _videoFullRangeFlag; + + /// + /// ColorDescriptionPresentFlag + /// + [FieldOffset(0)] + private int _colorDescriptionPresentFlag; + + /// + /// ChromaLocInfoPresentFlag + /// + [FieldOffset(0)] + private int _chromaLocInfoPresentFlag; + + /// + /// TimingInfoPresentFlag + /// + [FieldOffset(0)] + private int _timingInfoPresentFlag; + + /// + /// FixedFrameRateFlag + /// + [FieldOffset(0)] + private int _fixedFrameRateFlag; + + /// + /// BitstreamRestrictionFlag + /// + [FieldOffset(0)] + private int _bitstreamRestrictionFlag; + + /// + /// NalHrdParametersPresentFlag + /// + [FieldOffset(0)] + private int _nalHrdParametersPresentFlag; + + /// + /// VclHrdParametersPresentFlag + /// + [FieldOffset(0)] + private int _vclHrdParametersPresentFlag; + } + + public partial struct StdVideoH264SpsVuiFlags + { + /// + public bool AspectRatioInfoPresentFlag + { + get => BitFields.HasFlag(_aspectRatioInfoPresentFlag, 0); + set => BitFields.SetFlag(ref _aspectRatioInfoPresentFlag, 0, value); + } + + /// + public bool OverscanInfoPresentFlag + { + get => BitFields.HasFlag(_overscanInfoPresentFlag, 1); + set => BitFields.SetFlag(ref _overscanInfoPresentFlag, 1, value); + } + + /// + public bool OverscanAppropriateFlag + { + get => BitFields.HasFlag(_overscanAppropriateFlag, 2); + set => BitFields.SetFlag(ref _overscanAppropriateFlag, 2, value); + } + + /// + public bool VideoSignalTypePresentFlag + { + get => BitFields.HasFlag(_videoSignalTypePresentFlag, 3); + set => BitFields.SetFlag(ref _videoSignalTypePresentFlag, 3, value); + } + + /// + public bool VideoFullRangeFlag + { + get => BitFields.HasFlag(_videoFullRangeFlag, 4); + set => BitFields.SetFlag(ref _videoFullRangeFlag, 4, value); + } + + /// + public bool ColorDescriptionPresentFlag + { + get => BitFields.HasFlag(_colorDescriptionPresentFlag, 5); + set => BitFields.SetFlag(ref _colorDescriptionPresentFlag, 5, value); + } + + /// + public bool ChromaLocInfoPresentFlag + { + get => BitFields.HasFlag(_chromaLocInfoPresentFlag, 6); + set => BitFields.SetFlag(ref _chromaLocInfoPresentFlag, 6, value); + } + + /// + public bool TimingInfoPresentFlag + { + get => BitFields.HasFlag(_timingInfoPresentFlag, 7); + set => BitFields.SetFlag(ref _timingInfoPresentFlag, 7, value); + } + + /// + public bool FixedFrameRateFlag + { + get => BitFields.HasFlag(_fixedFrameRateFlag, 8); + set => BitFields.SetFlag(ref _fixedFrameRateFlag, 8, value); + } + + /// + public bool BitstreamRestrictionFlag + { + get => BitFields.HasFlag(_bitstreamRestrictionFlag, 9); + set => BitFields.SetFlag(ref _bitstreamRestrictionFlag, 9, value); + } + + /// + public bool NalHrdParametersPresentFlag + { + get => BitFields.HasFlag(_nalHrdParametersPresentFlag, 10); + set => BitFields.SetFlag(ref _nalHrdParametersPresentFlag, 10, value); + } + + /// + public bool VclHrdParametersPresentFlag + { + get => BitFields.HasFlag(_vclHrdParametersPresentFlag, 11); + set => BitFields.SetFlag(ref _vclHrdParametersPresentFlag, 11, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265DecPicBufMgr.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265DecPicBufMgr.gen.cs new file mode 100644 index 0000000..e392257 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265DecPicBufMgr.gen.cs @@ -0,0 +1,19 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 44)] + public unsafe partial struct StdVideoH265DecPicBufMgr() + { + /// + [FieldOffset(0)] + public fixed int MaxLatencyIncreasePlus1[7]; + + /// + [FieldOffset(28)] + public fixed byte MaxDecPicBufferingMinus1[7]; + + /// + [FieldOffset(35)] + public fixed byte MaxNumReorderPics[7]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265HrdFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265HrdFlags.gen.cs new file mode 100644 index 0000000..150f26d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265HrdFlags.gen.cs @@ -0,0 +1,101 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265HrdFlags() + { + /// + /// NalHrdParametersPresentFlag + /// + [FieldOffset(0)] + private int _nalHrdParametersPresentFlag; + + /// + /// VclHrdParametersPresentFlag + /// + [FieldOffset(0)] + private int _vclHrdParametersPresentFlag; + + /// + /// SubPicHrdParamsPresentFlag + /// + [FieldOffset(0)] + private int _subPicHrdParamsPresentFlag; + + /// + /// SubPicCpbParamsInPicTimingSeiFlag + /// + [FieldOffset(0)] + private int _subPicCpbParamsInPicTimingSeiFlag; + + /// + /// FixedPicRateGeneralFlag + /// + [FieldOffset(0)] + private int _fixedPicRateGeneralFlag; + + /// + /// FixedPicRateWithinCvsFlag + /// + [FieldOffset(0)] + private int _fixedPicRateWithinCvsFlag; + + /// + /// LowDelayHrdFlag + /// + [FieldOffset(0)] + private int _lowDelayHrdFlag; + } + + public partial struct StdVideoH265HrdFlags + { + /// + public bool NalHrdParametersPresentFlag + { + get => BitFields.HasFlag(_nalHrdParametersPresentFlag, 0); + set => BitFields.SetFlag(ref _nalHrdParametersPresentFlag, 0, value); + } + + /// + public bool VclHrdParametersPresentFlag + { + get => BitFields.HasFlag(_vclHrdParametersPresentFlag, 1); + set => BitFields.SetFlag(ref _vclHrdParametersPresentFlag, 1, value); + } + + /// + public bool SubPicHrdParamsPresentFlag + { + get => BitFields.HasFlag(_subPicHrdParamsPresentFlag, 2); + set => BitFields.SetFlag(ref _subPicHrdParamsPresentFlag, 2, value); + } + + /// + public bool SubPicCpbParamsInPicTimingSeiFlag + { + get => BitFields.HasFlag(_subPicCpbParamsInPicTimingSeiFlag, 3); + set => BitFields.SetFlag(ref _subPicCpbParamsInPicTimingSeiFlag, 3, value); + } + + /// + public int FixedPicRateGeneralFlag + { + get => BitFields.ExtractRange(_fixedPicRateGeneralFlag, start: 4, length: 8); + set => BitFields.SetRange(ref _fixedPicRateGeneralFlag, start: 4, length: 8, value); + } + + /// + public int FixedPicRateWithinCvsFlag + { + get => BitFields.ExtractRange(_fixedPicRateWithinCvsFlag, start: 12, length: 8); + set => BitFields.SetRange(ref _fixedPicRateWithinCvsFlag, start: 12, length: 8, value); + } + + /// + public int LowDelayHrdFlag + { + get => BitFields.ExtractRange(_lowDelayHrdFlag, start: 20, length: 8); + set => BitFields.SetRange(ref _lowDelayHrdFlag, start: 20, length: 8, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265HrdParameters.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265HrdParameters.gen.cs new file mode 100644 index 0000000..fb051b5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265HrdParameters.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct StdVideoH265HrdParameters() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265HrdFlags Flags; + + /// + /// TickDivisorMinus2 + /// + [FieldOffset(4)] + public byte TickDivisorMinus2; + + /// + /// DuCpbRemovalDelayIncrementLengthMinus1 + /// + [FieldOffset(5)] + public byte DuCpbRemovalDelayIncrementLengthMinus1; + + /// + /// DpbOutputDelayDuLengthMinus1 + /// + [FieldOffset(6)] + public byte DpbOutputDelayDuLengthMinus1; + + /// + /// BitRateScale + /// + [FieldOffset(7)] + public byte BitRateScale; + + /// + /// CpbSizeScale + /// + [FieldOffset(8)] + public byte CpbSizeScale; + + /// + /// CpbSizeDuScale + /// + [FieldOffset(9)] + public byte CpbSizeDuScale; + + /// + /// InitialCpbRemovalDelayLengthMinus1 + /// + [FieldOffset(10)] + public byte InitialCpbRemovalDelayLengthMinus1; + + /// + /// AuCpbRemovalDelayLengthMinus1 + /// + [FieldOffset(11)] + public byte AuCpbRemovalDelayLengthMinus1; + + /// + /// DpbOutputDelayLengthMinus1 + /// + [FieldOffset(12)] + public byte DpbOutputDelayLengthMinus1; + + /// + [FieldOffset(13)] + public fixed byte CpbCntMinus1[7]; + + /// + [FieldOffset(20)] + public fixed ushort ElementalDurationInTcMinus1[7]; + + /// + /// Reserved + /// + [FieldOffset(34)] + public ushort3 Reserved; + + /// + /// SubLayerHrdParametersNal + /// + [FieldOffset(40)] + public StdVideoH265SubLayerHrdParameters* SubLayerHrdParametersNal; + + /// + /// SubLayerHrdParametersVcl + /// + [FieldOffset(48)] + public StdVideoH265SubLayerHrdParameters* SubLayerHrdParametersVcl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265LongTermRefPicsSps.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265LongTermRefPicsSps.gen.cs new file mode 100644 index 0000000..2ba7afa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265LongTermRefPicsSps.gen.cs @@ -0,0 +1,17 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 132)] + public unsafe partial struct StdVideoH265LongTermRefPicsSps() + { + /// + /// UsedByCurrPicLtSpsFlag + /// + [FieldOffset(0)] + public int UsedByCurrPicLtSpsFlag; + + /// + [FieldOffset(4)] + public fixed int LtRefPicPocLsbSps[32]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265PictureParameterSet.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265PictureParameterSet.gen.cs new file mode 100644 index 0000000..ca14f52 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265PictureParameterSet.gen.cs @@ -0,0 +1,215 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 144)] + public unsafe partial struct StdVideoH265PictureParameterSet() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265PpsFlags Flags; + + /// + /// PpsPicParameterSetId + /// + [FieldOffset(4)] + public byte PpsPicParameterSetId; + + /// + /// PpsSeqParameterSetId + /// + [FieldOffset(5)] + public byte PpsSeqParameterSetId; + + /// + /// SpsVideoParameterSetId + /// + [FieldOffset(6)] + public byte SpsVideoParameterSetId; + + /// + /// NumExtraSliceHeaderBits + /// + [FieldOffset(7)] + public byte NumExtraSliceHeaderBits; + + /// + /// NumRefIdxL0DefaultActiveMinus1 + /// + [FieldOffset(8)] + public byte NumRefIdxL0DefaultActiveMinus1; + + /// + /// NumRefIdxL1DefaultActiveMinus1 + /// + [FieldOffset(9)] + public byte NumRefIdxL1DefaultActiveMinus1; + + /// + /// InitQpMinus26 + /// + [FieldOffset(10)] + public byte InitQpMinus26; + + /// + /// DiffCuQpDeltaDepth + /// + [FieldOffset(11)] + public byte DiffCuQpDeltaDepth; + + /// + /// PpsCbQpOffset + /// + [FieldOffset(12)] + public byte PpsCbQpOffset; + + /// + /// PpsCrQpOffset + /// + [FieldOffset(13)] + public byte PpsCrQpOffset; + + /// + /// PpsBetaOffsetDiv2 + /// + [FieldOffset(14)] + public byte PpsBetaOffsetDiv2; + + /// + /// PpsTcOffsetDiv2 + /// + [FieldOffset(15)] + public byte PpsTcOffsetDiv2; + + /// + /// Log2ParallelMergeLevelMinus2 + /// + [FieldOffset(16)] + public byte Log2ParallelMergeLevelMinus2; + + /// + /// Log2MaxTransformSkipBlockSizeMinus2 + /// + [FieldOffset(17)] + public byte Log2MaxTransformSkipBlockSizeMinus2; + + /// + /// DiffCuChromaQpOffsetDepth + /// + [FieldOffset(18)] + public byte DiffCuChromaQpOffsetDepth; + + /// + /// ChromaQpOffsetListLenMinus1 + /// + [FieldOffset(19)] + public byte ChromaQpOffsetListLenMinus1; + + /// + [FieldOffset(20)] + public fixed byte CbQpOffsetList[6]; + + /// + [FieldOffset(26)] + public fixed byte CrQpOffsetList[6]; + + /// + /// Log2SaoOffsetScaleLuma + /// + [FieldOffset(32)] + public byte Log2SaoOffsetScaleLuma; + + /// + /// Log2SaoOffsetScaleChroma + /// + [FieldOffset(33)] + public byte Log2SaoOffsetScaleChroma; + + /// + /// PpsActYQpOffsetPlus5 + /// + [FieldOffset(34)] + public byte PpsActYQpOffsetPlus5; + + /// + /// PpsActCbQpOffsetPlus5 + /// + [FieldOffset(35)] + public byte PpsActCbQpOffsetPlus5; + + /// + /// PpsActCrQpOffsetPlus3 + /// + [FieldOffset(36)] + public byte PpsActCrQpOffsetPlus3; + + /// + /// PpsNumPalettePredictorInitializers + /// + [FieldOffset(37)] + public byte PpsNumPalettePredictorInitializers; + + /// + /// LumaBitDepthEntryMinus8 + /// + [FieldOffset(38)] + public byte LumaBitDepthEntryMinus8; + + /// + /// ChromaBitDepthEntryMinus8 + /// + [FieldOffset(39)] + public byte ChromaBitDepthEntryMinus8; + + /// + /// NumTileColumnsMinus1 + /// + [FieldOffset(40)] + public byte NumTileColumnsMinus1; + + /// + /// NumTileRowsMinus1 + /// + [FieldOffset(41)] + public byte NumTileRowsMinus1; + + /// + /// Reserved1 + /// + [FieldOffset(42)] + public byte Reserved1; + + /// + /// Reserved2 + /// + [FieldOffset(43)] + public byte Reserved2; + + /// + [FieldOffset(44)] + public fixed ushort ColumnWidthMinus1[19]; + + /// + [FieldOffset(82)] + public fixed ushort RowHeightMinus1[21]; + + /// + /// Reserved3 + /// + [FieldOffset(124)] + public int Reserved3; + + /// + /// ScalingLists + /// + [FieldOffset(128)] + public StdVideoH265ScalingLists* ScalingLists; + + /// + /// PredictorPaletteEntries + /// + [FieldOffset(136)] + public StdVideoH265PredictorPaletteEntries* PredictorPaletteEntries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265PpsFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265PpsFlags.gen.cs new file mode 100644 index 0000000..46376b1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265PpsFlags.gen.cs @@ -0,0 +1,413 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265PpsFlags() + { + /// + /// DependentSliceSegmentsEnabledFlag + /// + [FieldOffset(0)] + private int _dependentSliceSegmentsEnabledFlag; + + /// + /// OutputFlagPresentFlag + /// + [FieldOffset(0)] + private int _outputFlagPresentFlag; + + /// + /// SignDataHidingEnabledFlag + /// + [FieldOffset(0)] + private int _signDataHidingEnabledFlag; + + /// + /// CabacInitPresentFlag + /// + [FieldOffset(0)] + private int _cabacInitPresentFlag; + + /// + /// ConstrainedIntraPredFlag + /// + [FieldOffset(0)] + private int _constrainedIntraPredFlag; + + /// + /// TransformSkipEnabledFlag + /// + [FieldOffset(0)] + private int _transformSkipEnabledFlag; + + /// + /// CuQpDeltaEnabledFlag + /// + [FieldOffset(0)] + private int _cuQpDeltaEnabledFlag; + + /// + /// PpsSliceChromaQpOffsetsPresentFlag + /// + [FieldOffset(0)] + private int _ppsSliceChromaQpOffsetsPresentFlag; + + /// + /// WeightedPredFlag + /// + [FieldOffset(0)] + private int _weightedPredFlag; + + /// + /// WeightedBipredFlag + /// + [FieldOffset(0)] + private int _weightedBipredFlag; + + /// + /// TransquantBypassEnabledFlag + /// + [FieldOffset(0)] + private int _transquantBypassEnabledFlag; + + /// + /// TilesEnabledFlag + /// + [FieldOffset(0)] + private int _tilesEnabledFlag; + + /// + /// EntropyCodingSyncEnabledFlag + /// + [FieldOffset(0)] + private int _entropyCodingSyncEnabledFlag; + + /// + /// UniformSpacingFlag + /// + [FieldOffset(0)] + private int _uniformSpacingFlag; + + /// + /// LoopFilterAcrossTilesEnabledFlag + /// + [FieldOffset(0)] + private int _loopFilterAcrossTilesEnabledFlag; + + /// + /// PpsLoopFilterAcrossSlicesEnabledFlag + /// + [FieldOffset(0)] + private int _ppsLoopFilterAcrossSlicesEnabledFlag; + + /// + /// DeblockingFilterControlPresentFlag + /// + [FieldOffset(0)] + private int _deblockingFilterControlPresentFlag; + + /// + /// DeblockingFilterOverrideEnabledFlag + /// + [FieldOffset(0)] + private int _deblockingFilterOverrideEnabledFlag; + + /// + /// PpsDeblockingFilterDisabledFlag + /// + [FieldOffset(0)] + private int _ppsDeblockingFilterDisabledFlag; + + /// + /// PpsScalingListDataPresentFlag + /// + [FieldOffset(0)] + private int _ppsScalingListDataPresentFlag; + + /// + /// ListsModificationPresentFlag + /// + [FieldOffset(0)] + private int _listsModificationPresentFlag; + + /// + /// SliceSegmentHeaderExtensionPresentFlag + /// + [FieldOffset(0)] + private int _sliceSegmentHeaderExtensionPresentFlag; + + /// + /// PpsExtensionPresentFlag + /// + [FieldOffset(0)] + private int _ppsExtensionPresentFlag; + + /// + /// CrossComponentPredictionEnabledFlag + /// + [FieldOffset(0)] + private int _crossComponentPredictionEnabledFlag; + + /// + /// ChromaQpOffsetListEnabledFlag + /// + [FieldOffset(0)] + private int _chromaQpOffsetListEnabledFlag; + + /// + /// PpsCurrPicRefEnabledFlag + /// + [FieldOffset(0)] + private int _ppsCurrPicRefEnabledFlag; + + /// + /// ResidualAdaptiveColourTransformEnabledFlag + /// + [FieldOffset(0)] + private int _residualAdaptiveColourTransformEnabledFlag; + + /// + /// PpsSliceActQpOffsetsPresentFlag + /// + [FieldOffset(0)] + private int _ppsSliceActQpOffsetsPresentFlag; + + /// + /// PpsPalettePredictorInitializersPresentFlag + /// + [FieldOffset(0)] + private int _ppsPalettePredictorInitializersPresentFlag; + + /// + /// MonochromePaletteFlag + /// + [FieldOffset(0)] + private int _monochromePaletteFlag; + + /// + /// PpsRangeExtensionFlag + /// + [FieldOffset(0)] + private int _ppsRangeExtensionFlag; + } + + public partial struct StdVideoH265PpsFlags + { + /// + public bool DependentSliceSegmentsEnabledFlag + { + get => BitFields.HasFlag(_dependentSliceSegmentsEnabledFlag, 0); + set => BitFields.SetFlag(ref _dependentSliceSegmentsEnabledFlag, 0, value); + } + + /// + public bool OutputFlagPresentFlag + { + get => BitFields.HasFlag(_outputFlagPresentFlag, 1); + set => BitFields.SetFlag(ref _outputFlagPresentFlag, 1, value); + } + + /// + public bool SignDataHidingEnabledFlag + { + get => BitFields.HasFlag(_signDataHidingEnabledFlag, 2); + set => BitFields.SetFlag(ref _signDataHidingEnabledFlag, 2, value); + } + + /// + public bool CabacInitPresentFlag + { + get => BitFields.HasFlag(_cabacInitPresentFlag, 3); + set => BitFields.SetFlag(ref _cabacInitPresentFlag, 3, value); + } + + /// + public bool ConstrainedIntraPredFlag + { + get => BitFields.HasFlag(_constrainedIntraPredFlag, 4); + set => BitFields.SetFlag(ref _constrainedIntraPredFlag, 4, value); + } + + /// + public bool TransformSkipEnabledFlag + { + get => BitFields.HasFlag(_transformSkipEnabledFlag, 5); + set => BitFields.SetFlag(ref _transformSkipEnabledFlag, 5, value); + } + + /// + public bool CuQpDeltaEnabledFlag + { + get => BitFields.HasFlag(_cuQpDeltaEnabledFlag, 6); + set => BitFields.SetFlag(ref _cuQpDeltaEnabledFlag, 6, value); + } + + /// + public bool PpsSliceChromaQpOffsetsPresentFlag + { + get => BitFields.HasFlag(_ppsSliceChromaQpOffsetsPresentFlag, 7); + set => BitFields.SetFlag(ref _ppsSliceChromaQpOffsetsPresentFlag, 7, value); + } + + /// + public bool WeightedPredFlag + { + get => BitFields.HasFlag(_weightedPredFlag, 8); + set => BitFields.SetFlag(ref _weightedPredFlag, 8, value); + } + + /// + public bool WeightedBipredFlag + { + get => BitFields.HasFlag(_weightedBipredFlag, 9); + set => BitFields.SetFlag(ref _weightedBipredFlag, 9, value); + } + + /// + public bool TransquantBypassEnabledFlag + { + get => BitFields.HasFlag(_transquantBypassEnabledFlag, 10); + set => BitFields.SetFlag(ref _transquantBypassEnabledFlag, 10, value); + } + + /// + public bool TilesEnabledFlag + { + get => BitFields.HasFlag(_tilesEnabledFlag, 11); + set => BitFields.SetFlag(ref _tilesEnabledFlag, 11, value); + } + + /// + public bool EntropyCodingSyncEnabledFlag + { + get => BitFields.HasFlag(_entropyCodingSyncEnabledFlag, 12); + set => BitFields.SetFlag(ref _entropyCodingSyncEnabledFlag, 12, value); + } + + /// + public bool UniformSpacingFlag + { + get => BitFields.HasFlag(_uniformSpacingFlag, 13); + set => BitFields.SetFlag(ref _uniformSpacingFlag, 13, value); + } + + /// + public bool LoopFilterAcrossTilesEnabledFlag + { + get => BitFields.HasFlag(_loopFilterAcrossTilesEnabledFlag, 14); + set => BitFields.SetFlag(ref _loopFilterAcrossTilesEnabledFlag, 14, value); + } + + /// + public bool PpsLoopFilterAcrossSlicesEnabledFlag + { + get => BitFields.HasFlag(_ppsLoopFilterAcrossSlicesEnabledFlag, 15); + set => BitFields.SetFlag(ref _ppsLoopFilterAcrossSlicesEnabledFlag, 15, value); + } + + /// + public bool DeblockingFilterControlPresentFlag + { + get => BitFields.HasFlag(_deblockingFilterControlPresentFlag, 16); + set => BitFields.SetFlag(ref _deblockingFilterControlPresentFlag, 16, value); + } + + /// + public bool DeblockingFilterOverrideEnabledFlag + { + get => BitFields.HasFlag(_deblockingFilterOverrideEnabledFlag, 17); + set => BitFields.SetFlag(ref _deblockingFilterOverrideEnabledFlag, 17, value); + } + + /// + public bool PpsDeblockingFilterDisabledFlag + { + get => BitFields.HasFlag(_ppsDeblockingFilterDisabledFlag, 18); + set => BitFields.SetFlag(ref _ppsDeblockingFilterDisabledFlag, 18, value); + } + + /// + public bool PpsScalingListDataPresentFlag + { + get => BitFields.HasFlag(_ppsScalingListDataPresentFlag, 19); + set => BitFields.SetFlag(ref _ppsScalingListDataPresentFlag, 19, value); + } + + /// + public bool ListsModificationPresentFlag + { + get => BitFields.HasFlag(_listsModificationPresentFlag, 20); + set => BitFields.SetFlag(ref _listsModificationPresentFlag, 20, value); + } + + /// + public bool SliceSegmentHeaderExtensionPresentFlag + { + get => BitFields.HasFlag(_sliceSegmentHeaderExtensionPresentFlag, 21); + set => BitFields.SetFlag(ref _sliceSegmentHeaderExtensionPresentFlag, 21, value); + } + + /// + public bool PpsExtensionPresentFlag + { + get => BitFields.HasFlag(_ppsExtensionPresentFlag, 22); + set => BitFields.SetFlag(ref _ppsExtensionPresentFlag, 22, value); + } + + /// + public bool CrossComponentPredictionEnabledFlag + { + get => BitFields.HasFlag(_crossComponentPredictionEnabledFlag, 23); + set => BitFields.SetFlag(ref _crossComponentPredictionEnabledFlag, 23, value); + } + + /// + public bool ChromaQpOffsetListEnabledFlag + { + get => BitFields.HasFlag(_chromaQpOffsetListEnabledFlag, 24); + set => BitFields.SetFlag(ref _chromaQpOffsetListEnabledFlag, 24, value); + } + + /// + public bool PpsCurrPicRefEnabledFlag + { + get => BitFields.HasFlag(_ppsCurrPicRefEnabledFlag, 25); + set => BitFields.SetFlag(ref _ppsCurrPicRefEnabledFlag, 25, value); + } + + /// + public bool ResidualAdaptiveColourTransformEnabledFlag + { + get => BitFields.HasFlag(_residualAdaptiveColourTransformEnabledFlag, 26); + set => BitFields.SetFlag(ref _residualAdaptiveColourTransformEnabledFlag, 26, value); + } + + /// + public bool PpsSliceActQpOffsetsPresentFlag + { + get => BitFields.HasFlag(_ppsSliceActQpOffsetsPresentFlag, 27); + set => BitFields.SetFlag(ref _ppsSliceActQpOffsetsPresentFlag, 27, value); + } + + /// + public bool PpsPalettePredictorInitializersPresentFlag + { + get => BitFields.HasFlag(_ppsPalettePredictorInitializersPresentFlag, 28); + set => BitFields.SetFlag(ref _ppsPalettePredictorInitializersPresentFlag, 28, value); + } + + /// + public bool MonochromePaletteFlag + { + get => BitFields.HasFlag(_monochromePaletteFlag, 29); + set => BitFields.SetFlag(ref _monochromePaletteFlag, 29, value); + } + + /// + public bool PpsRangeExtensionFlag + { + get => BitFields.HasFlag(_ppsRangeExtensionFlag, 30); + set => BitFields.SetFlag(ref _ppsRangeExtensionFlag, 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265PredictorPaletteEntries.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265PredictorPaletteEntries.gen.cs new file mode 100644 index 0000000..5e54472 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265PredictorPaletteEntries.gen.cs @@ -0,0 +1,13 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 768)] + public partial struct StdVideoH265PredictorPaletteEntries() + { + /// + /// PredictorPaletteEntries + /// + [FieldOffset(0)] + public ushort_128_3 PredictorPaletteEntries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevel.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevel.gen.cs new file mode 100644 index 0000000..16a6603 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevel.gen.cs @@ -0,0 +1,25 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct StdVideoH265ProfileTierLevel() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265ProfileTierLevelFlags Flags; + + /// + /// GeneralProfileIdc + /// + [FieldOffset(4)] + public StdVideoH265ProfileIdc GeneralProfileIdc; + + /// + /// GeneralLevelIdc + /// + [FieldOffset(8)] + public StdVideoH265LevelIdc GeneralLevelIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevelFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevelFlags.gen.cs new file mode 100644 index 0000000..7840670 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265ProfileTierLevelFlags.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265ProfileTierLevelFlags() + { + /// + /// GeneralTierFlag + /// + [FieldOffset(0)] + private int _generalTierFlag; + + /// + /// GeneralProgressiveSourceFlag + /// + [FieldOffset(0)] + private int _generalProgressiveSourceFlag; + + /// + /// GeneralInterlacedSourceFlag + /// + [FieldOffset(0)] + private int _generalInterlacedSourceFlag; + + /// + /// GeneralNonPackedConstraintFlag + /// + [FieldOffset(0)] + private int _generalNonPackedConstraintFlag; + + /// + /// GeneralFrameOnlyConstraintFlag + /// + [FieldOffset(0)] + private int _generalFrameOnlyConstraintFlag; + } + + public partial struct StdVideoH265ProfileTierLevelFlags + { + /// + public bool GeneralTierFlag + { + get => BitFields.HasFlag(_generalTierFlag, 0); + set => BitFields.SetFlag(ref _generalTierFlag, 0, value); + } + + /// + public bool GeneralProgressiveSourceFlag + { + get => BitFields.HasFlag(_generalProgressiveSourceFlag, 1); + set => BitFields.SetFlag(ref _generalProgressiveSourceFlag, 1, value); + } + + /// + public bool GeneralInterlacedSourceFlag + { + get => BitFields.HasFlag(_generalInterlacedSourceFlag, 2); + set => BitFields.SetFlag(ref _generalInterlacedSourceFlag, 2, value); + } + + /// + public bool GeneralNonPackedConstraintFlag + { + get => BitFields.HasFlag(_generalNonPackedConstraintFlag, 3); + set => BitFields.SetFlag(ref _generalNonPackedConstraintFlag, 3, value); + } + + /// + public bool GeneralFrameOnlyConstraintFlag + { + get => BitFields.HasFlag(_generalFrameOnlyConstraintFlag, 4); + set => BitFields.SetFlag(ref _generalFrameOnlyConstraintFlag, 4, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265ScalingLists.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265ScalingLists.gen.cs new file mode 100644 index 0000000..9fa244a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265ScalingLists.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 1000)] + public unsafe partial struct StdVideoH265ScalingLists() + { + /// + /// ScalingList4x4 + /// + [FieldOffset(0)] + public byte_16_6 ScalingList4x4; + + /// + /// ScalingList8x8 + /// + [FieldOffset(96)] + public byte_64_6 ScalingList8x8; + + /// + /// ScalingList16x16 + /// + [FieldOffset(480)] + public byte_64_6 ScalingList16x16; + + /// + /// ScalingList32x32 + /// + [FieldOffset(864)] + public byte_64_2 ScalingList32x32; + + /// + [FieldOffset(992)] + public fixed byte ScalingListDCCoef16x16[6]; + + /// + /// ScalingListDCCoef32x32 + /// + [FieldOffset(998)] + public byte2 ScalingListDCCoef32x32; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSet.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSet.gen.cs new file mode 100644 index 0000000..2e19ecd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSet.gen.cs @@ -0,0 +1,241 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 112)] + public unsafe partial struct StdVideoH265SequenceParameterSet() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265SpsFlags Flags; + + /// + /// ChromaFormatIdc + /// + [FieldOffset(4)] + public StdVideoH265ChromaFormatIdc ChromaFormatIdc; + + /// + /// PicWidthInLumaSamples + /// + [FieldOffset(8)] + public int PicWidthInLumaSamples; + + /// + /// PicHeightInLumaSamples + /// + [FieldOffset(12)] + public int PicHeightInLumaSamples; + + /// + /// SpsVideoParameterSetId + /// + [FieldOffset(16)] + public byte SpsVideoParameterSetId; + + /// + /// SpsMaxSubLayersMinus1 + /// + [FieldOffset(17)] + public byte SpsMaxSubLayersMinus1; + + /// + /// SpsSeqParameterSetId + /// + [FieldOffset(18)] + public byte SpsSeqParameterSetId; + + /// + /// BitDepthLumaMinus8 + /// + [FieldOffset(19)] + public byte BitDepthLumaMinus8; + + /// + /// BitDepthChromaMinus8 + /// + [FieldOffset(20)] + public byte BitDepthChromaMinus8; + + /// + /// Log2MaxPicOrderCntLsbMinus4 + /// + [FieldOffset(21)] + public byte Log2MaxPicOrderCntLsbMinus4; + + /// + /// Log2MinLumaCodingBlockSizeMinus3 + /// + [FieldOffset(22)] + public byte Log2MinLumaCodingBlockSizeMinus3; + + /// + /// Log2DiffMaxMinLumaCodingBlockSize + /// + [FieldOffset(23)] + public byte Log2DiffMaxMinLumaCodingBlockSize; + + /// + /// Log2MinLumaTransformBlockSizeMinus2 + /// + [FieldOffset(24)] + public byte Log2MinLumaTransformBlockSizeMinus2; + + /// + /// Log2DiffMaxMinLumaTransformBlockSize + /// + [FieldOffset(25)] + public byte Log2DiffMaxMinLumaTransformBlockSize; + + /// + /// MaxTransformHierarchyDepthInter + /// + [FieldOffset(26)] + public byte MaxTransformHierarchyDepthInter; + + /// + /// MaxTransformHierarchyDepthIntra + /// + [FieldOffset(27)] + public byte MaxTransformHierarchyDepthIntra; + + /// + /// NumShortTermRefPicSets + /// + [FieldOffset(28)] + public byte NumShortTermRefPicSets; + + /// + /// NumLongTermRefPicsSps + /// + [FieldOffset(29)] + public byte NumLongTermRefPicsSps; + + /// + /// PcmSampleBitDepthLumaMinus1 + /// + [FieldOffset(30)] + public byte PcmSampleBitDepthLumaMinus1; + + /// + /// PcmSampleBitDepthChromaMinus1 + /// + [FieldOffset(31)] + public byte PcmSampleBitDepthChromaMinus1; + + /// + /// Log2MinPcmLumaCodingBlockSizeMinus3 + /// + [FieldOffset(32)] + public byte Log2MinPcmLumaCodingBlockSizeMinus3; + + /// + /// Log2DiffMaxMinPcmLumaCodingBlockSize + /// + [FieldOffset(33)] + public byte Log2DiffMaxMinPcmLumaCodingBlockSize; + + /// + /// Reserved1 + /// + [FieldOffset(34)] + public byte Reserved1; + + /// + /// Reserved2 + /// + [FieldOffset(35)] + public byte Reserved2; + + /// + /// PaletteMaxSize + /// + [FieldOffset(36)] + public byte PaletteMaxSize; + + /// + /// DeltaPaletteMaxPredictorSize + /// + [FieldOffset(37)] + public byte DeltaPaletteMaxPredictorSize; + + /// + /// MotionVectorResolutionControlIdc + /// + [FieldOffset(38)] + public byte MotionVectorResolutionControlIdc; + + /// + /// SpsNumPalettePredictorInitializersMinus1 + /// + [FieldOffset(39)] + public byte SpsNumPalettePredictorInitializersMinus1; + + /// + /// ConfWinLeftOffset + /// + [FieldOffset(40)] + public int ConfWinLeftOffset; + + /// + /// ConfWinRightOffset + /// + [FieldOffset(44)] + public int ConfWinRightOffset; + + /// + /// ConfWinTopOffset + /// + [FieldOffset(48)] + public int ConfWinTopOffset; + + /// + /// ConfWinBottomOffset + /// + [FieldOffset(52)] + public int ConfWinBottomOffset; + + /// + /// ProfileTierLevel + /// + [FieldOffset(56)] + public StdVideoH265ProfileTierLevel* ProfileTierLevel; + + /// + /// DecPicBufMgr + /// + [FieldOffset(64)] + public StdVideoH265DecPicBufMgr* DecPicBufMgr; + + /// + /// ScalingLists + /// + [FieldOffset(72)] + public StdVideoH265ScalingLists* ScalingLists; + + /// + /// ShortTermRefPicSet + /// + [FieldOffset(80)] + public StdVideoH265ShortTermRefPicSet* ShortTermRefPicSet; + + /// + /// LongTermRefPicsSps + /// + [FieldOffset(88)] + public StdVideoH265LongTermRefPicsSps* LongTermRefPicsSps; + + /// + /// SequenceParameterSetVui + /// + [FieldOffset(96)] + public StdVideoH265SequenceParameterSetVui* SequenceParameterSetVui; + + /// + /// PredictorPaletteEntries + /// + [FieldOffset(104)] + public StdVideoH265PredictorPaletteEntries* PredictorPaletteEntries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSetVui.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSetVui.gen.cs new file mode 100644 index 0000000..127e85c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265SequenceParameterSetVui.gen.cs @@ -0,0 +1,163 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct StdVideoH265SequenceParameterSetVui() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265SpsVuiFlags Flags; + + /// + /// AspectRatioIdc + /// + [FieldOffset(4)] + public StdVideoH265AspectRatioIdc AspectRatioIdc; + + /// + /// SarWidth + /// + [FieldOffset(8)] + public ushort SarWidth; + + /// + /// SarHeight + /// + [FieldOffset(10)] + public ushort SarHeight; + + /// + /// VideoFormat + /// + [FieldOffset(12)] + public byte VideoFormat; + + /// + /// ColourPrimaries + /// + [FieldOffset(13)] + public byte ColourPrimaries; + + /// + /// TransferCharacteristics + /// + [FieldOffset(14)] + public byte TransferCharacteristics; + + /// + /// MatrixCoeffs + /// + [FieldOffset(15)] + public byte MatrixCoeffs; + + /// + /// ChromaSampleLocTypeTopField + /// + [FieldOffset(16)] + public byte ChromaSampleLocTypeTopField; + + /// + /// ChromaSampleLocTypeBottomField + /// + [FieldOffset(17)] + public byte ChromaSampleLocTypeBottomField; + + /// + /// Reserved1 + /// + [FieldOffset(18)] + public byte Reserved1; + + /// + /// Reserved2 + /// + [FieldOffset(19)] + public byte Reserved2; + + /// + /// DefDispWinLeftOffset + /// + [FieldOffset(20)] + public ushort DefDispWinLeftOffset; + + /// + /// DefDispWinRightOffset + /// + [FieldOffset(22)] + public ushort DefDispWinRightOffset; + + /// + /// DefDispWinTopOffset + /// + [FieldOffset(24)] + public ushort DefDispWinTopOffset; + + /// + /// DefDispWinBottomOffset + /// + [FieldOffset(26)] + public ushort DefDispWinBottomOffset; + + /// + /// VuiNumUnitsInTick + /// + [FieldOffset(28)] + public int VuiNumUnitsInTick; + + /// + /// VuiTimeScale + /// + [FieldOffset(32)] + public int VuiTimeScale; + + /// + /// VuiNumTicksPocDiffOneMinus1 + /// + [FieldOffset(36)] + public int VuiNumTicksPocDiffOneMinus1; + + /// + /// MinSpatialSegmentationIdc + /// + [FieldOffset(40)] + public ushort MinSpatialSegmentationIdc; + + /// + /// Reserved3 + /// + [FieldOffset(42)] + public ushort Reserved3; + + /// + /// MaxBytesPerPicDenom + /// + [FieldOffset(44)] + public byte MaxBytesPerPicDenom; + + /// + /// MaxBitsPerMinCuDenom + /// + [FieldOffset(45)] + public byte MaxBitsPerMinCuDenom; + + /// + /// Log2MaxMvLengthHorizontal + /// + [FieldOffset(46)] + public byte Log2MaxMvLengthHorizontal; + + /// + /// Log2MaxMvLengthVertical + /// + [FieldOffset(47)] + public byte Log2MaxMvLengthVertical; + + /// + /// HrdParameters + /// + [FieldOffset(48)] + public StdVideoH265HrdParameters* HrdParameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSet.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSet.gen.cs new file mode 100644 index 0000000..a0ad165 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSet.gen.cs @@ -0,0 +1,87 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct StdVideoH265ShortTermRefPicSet() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265ShortTermRefPicSetFlags Flags; + + /// + /// DeltaIdxMinus1 + /// + [FieldOffset(4)] + public int DeltaIdxMinus1; + + /// + /// UseDeltaFlag + /// + [FieldOffset(8)] + public ushort UseDeltaFlag; + + /// + /// AbsDeltaRpsMinus1 + /// + [FieldOffset(10)] + public ushort AbsDeltaRpsMinus1; + + /// + /// UsedByCurrPicFlag + /// + [FieldOffset(12)] + public ushort UsedByCurrPicFlag; + + /// + /// UsedByCurrPicS0Flag + /// + [FieldOffset(14)] + public ushort UsedByCurrPicS0Flag; + + /// + /// UsedByCurrPicS1Flag + /// + [FieldOffset(16)] + public ushort UsedByCurrPicS1Flag; + + /// + /// Reserved1 + /// + [FieldOffset(18)] + public ushort Reserved1; + + /// + /// Reserved2 + /// + [FieldOffset(20)] + public byte Reserved2; + + /// + /// Reserved3 + /// + [FieldOffset(21)] + public byte Reserved3; + + /// + /// NumNegativePics + /// + [FieldOffset(22)] + public byte NumNegativePics; + + /// + /// NumPositivePics + /// + [FieldOffset(23)] + public byte NumPositivePics; + + /// + [FieldOffset(24)] + public fixed ushort DeltaPocS0Minus1[16]; + + /// + [FieldOffset(56)] + public fixed ushort DeltaPocS1Minus1[16]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSetFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSetFlags.gen.cs new file mode 100644 index 0000000..ac819d9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265ShortTermRefPicSetFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265ShortTermRefPicSetFlags() + { + /// + /// InterRefPicSetPredictionFlag + /// + [FieldOffset(0)] + private int _interRefPicSetPredictionFlag; + + /// + /// DeltaRpsSign + /// + [FieldOffset(0)] + private int _deltaRpsSign; + } + + public partial struct StdVideoH265ShortTermRefPicSetFlags + { + /// + public bool InterRefPicSetPredictionFlag + { + get => BitFields.HasFlag(_interRefPicSetPredictionFlag, 0); + set => BitFields.SetFlag(ref _interRefPicSetPredictionFlag, 0, value); + } + + /// + public bool DeltaRpsSign + { + get => BitFields.HasFlag(_deltaRpsSign, 1); + set => BitFields.SetFlag(ref _deltaRpsSign, 1, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265SpsFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265SpsFlags.gen.cs new file mode 100644 index 0000000..f206ebe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265SpsFlags.gen.cs @@ -0,0 +1,400 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265SpsFlags() + { + /// + /// SpsTemporalIdNestingFlag + /// + [FieldOffset(0)] + private int _spsTemporalIdNestingFlag; + + /// + /// SeparateColourPlaneFlag + /// + [FieldOffset(0)] + private int _separateColourPlaneFlag; + + /// + /// ConformanceWindowFlag + /// + [FieldOffset(0)] + private int _conformanceWindowFlag; + + /// + /// SpsSubLayerOrderingInfoPresentFlag + /// + [FieldOffset(0)] + private int _spsSubLayerOrderingInfoPresentFlag; + + /// + /// ScalingListEnabledFlag + /// + [FieldOffset(0)] + private int _scalingListEnabledFlag; + + /// + /// SpsScalingListDataPresentFlag + /// + [FieldOffset(0)] + private int _spsScalingListDataPresentFlag; + + /// + /// AmpEnabledFlag + /// + [FieldOffset(0)] + private int _ampEnabledFlag; + + /// + /// SampleAdaptiveOffsetEnabledFlag + /// + [FieldOffset(0)] + private int _sampleAdaptiveOffsetEnabledFlag; + + /// + /// PcmEnabledFlag + /// + [FieldOffset(0)] + private int _pcmEnabledFlag; + + /// + /// PcmLoopFilterDisabledFlag + /// + [FieldOffset(0)] + private int _pcmLoopFilterDisabledFlag; + + /// + /// LongTermRefPicsPresentFlag + /// + [FieldOffset(0)] + private int _longTermRefPicsPresentFlag; + + /// + /// SpsTemporalMvpEnabledFlag + /// + [FieldOffset(0)] + private int _spsTemporalMvpEnabledFlag; + + /// + /// StrongIntraSmoothingEnabledFlag + /// + [FieldOffset(0)] + private int _strongIntraSmoothingEnabledFlag; + + /// + /// VuiParametersPresentFlag + /// + [FieldOffset(0)] + private int _vuiParametersPresentFlag; + + /// + /// SpsExtensionPresentFlag + /// + [FieldOffset(0)] + private int _spsExtensionPresentFlag; + + /// + /// SpsRangeExtensionFlag + /// + [FieldOffset(0)] + private int _spsRangeExtensionFlag; + + /// + /// TransformSkipRotationEnabledFlag + /// + [FieldOffset(0)] + private int _transformSkipRotationEnabledFlag; + + /// + /// TransformSkipContextEnabledFlag + /// + [FieldOffset(0)] + private int _transformSkipContextEnabledFlag; + + /// + /// ImplicitRdpcmEnabledFlag + /// + [FieldOffset(0)] + private int _implicitRdpcmEnabledFlag; + + /// + /// ExplicitRdpcmEnabledFlag + /// + [FieldOffset(0)] + private int _explicitRdpcmEnabledFlag; + + /// + /// ExtendedPrecisionProcessingFlag + /// + [FieldOffset(0)] + private int _extendedPrecisionProcessingFlag; + + /// + /// IntraSmoothingDisabledFlag + /// + [FieldOffset(0)] + private int _intraSmoothingDisabledFlag; + + /// + /// HighPrecisionOffsetsEnabledFlag + /// + [FieldOffset(0)] + private int _highPrecisionOffsetsEnabledFlag; + + /// + /// PersistentRiceAdaptationEnabledFlag + /// + [FieldOffset(0)] + private int _persistentRiceAdaptationEnabledFlag; + + /// + /// CabacBypassAlignmentEnabledFlag + /// + [FieldOffset(0)] + private int _cabacBypassAlignmentEnabledFlag; + + /// + /// SpsSccExtensionFlag + /// + [FieldOffset(0)] + private int _spsSccExtensionFlag; + + /// + /// SpsCurrPicRefEnabledFlag + /// + [FieldOffset(0)] + private int _spsCurrPicRefEnabledFlag; + + /// + /// PaletteModeEnabledFlag + /// + [FieldOffset(0)] + private int _paletteModeEnabledFlag; + + /// + /// SpsPalettePredictorInitializersPresentFlag + /// + [FieldOffset(0)] + private int _spsPalettePredictorInitializersPresentFlag; + + /// + /// IntraBoundaryFilteringDisabledFlag + /// + [FieldOffset(0)] + private int _intraBoundaryFilteringDisabledFlag; + } + + public partial struct StdVideoH265SpsFlags + { + /// + public bool SpsTemporalIdNestingFlag + { + get => BitFields.HasFlag(_spsTemporalIdNestingFlag, 0); + set => BitFields.SetFlag(ref _spsTemporalIdNestingFlag, 0, value); + } + + /// + public bool SeparateColourPlaneFlag + { + get => BitFields.HasFlag(_separateColourPlaneFlag, 1); + set => BitFields.SetFlag(ref _separateColourPlaneFlag, 1, value); + } + + /// + public bool ConformanceWindowFlag + { + get => BitFields.HasFlag(_conformanceWindowFlag, 2); + set => BitFields.SetFlag(ref _conformanceWindowFlag, 2, value); + } + + /// + public bool SpsSubLayerOrderingInfoPresentFlag + { + get => BitFields.HasFlag(_spsSubLayerOrderingInfoPresentFlag, 3); + set => BitFields.SetFlag(ref _spsSubLayerOrderingInfoPresentFlag, 3, value); + } + + /// + public bool ScalingListEnabledFlag + { + get => BitFields.HasFlag(_scalingListEnabledFlag, 4); + set => BitFields.SetFlag(ref _scalingListEnabledFlag, 4, value); + } + + /// + public bool SpsScalingListDataPresentFlag + { + get => BitFields.HasFlag(_spsScalingListDataPresentFlag, 5); + set => BitFields.SetFlag(ref _spsScalingListDataPresentFlag, 5, value); + } + + /// + public bool AmpEnabledFlag + { + get => BitFields.HasFlag(_ampEnabledFlag, 6); + set => BitFields.SetFlag(ref _ampEnabledFlag, 6, value); + } + + /// + public bool SampleAdaptiveOffsetEnabledFlag + { + get => BitFields.HasFlag(_sampleAdaptiveOffsetEnabledFlag, 7); + set => BitFields.SetFlag(ref _sampleAdaptiveOffsetEnabledFlag, 7, value); + } + + /// + public bool PcmEnabledFlag + { + get => BitFields.HasFlag(_pcmEnabledFlag, 8); + set => BitFields.SetFlag(ref _pcmEnabledFlag, 8, value); + } + + /// + public bool PcmLoopFilterDisabledFlag + { + get => BitFields.HasFlag(_pcmLoopFilterDisabledFlag, 9); + set => BitFields.SetFlag(ref _pcmLoopFilterDisabledFlag, 9, value); + } + + /// + public bool LongTermRefPicsPresentFlag + { + get => BitFields.HasFlag(_longTermRefPicsPresentFlag, 10); + set => BitFields.SetFlag(ref _longTermRefPicsPresentFlag, 10, value); + } + + /// + public bool SpsTemporalMvpEnabledFlag + { + get => BitFields.HasFlag(_spsTemporalMvpEnabledFlag, 11); + set => BitFields.SetFlag(ref _spsTemporalMvpEnabledFlag, 11, value); + } + + /// + public bool StrongIntraSmoothingEnabledFlag + { + get => BitFields.HasFlag(_strongIntraSmoothingEnabledFlag, 12); + set => BitFields.SetFlag(ref _strongIntraSmoothingEnabledFlag, 12, value); + } + + /// + public bool VuiParametersPresentFlag + { + get => BitFields.HasFlag(_vuiParametersPresentFlag, 13); + set => BitFields.SetFlag(ref _vuiParametersPresentFlag, 13, value); + } + + /// + public bool SpsExtensionPresentFlag + { + get => BitFields.HasFlag(_spsExtensionPresentFlag, 14); + set => BitFields.SetFlag(ref _spsExtensionPresentFlag, 14, value); + } + + /// + public bool SpsRangeExtensionFlag + { + get => BitFields.HasFlag(_spsRangeExtensionFlag, 15); + set => BitFields.SetFlag(ref _spsRangeExtensionFlag, 15, value); + } + + /// + public bool TransformSkipRotationEnabledFlag + { + get => BitFields.HasFlag(_transformSkipRotationEnabledFlag, 16); + set => BitFields.SetFlag(ref _transformSkipRotationEnabledFlag, 16, value); + } + + /// + public bool TransformSkipContextEnabledFlag + { + get => BitFields.HasFlag(_transformSkipContextEnabledFlag, 17); + set => BitFields.SetFlag(ref _transformSkipContextEnabledFlag, 17, value); + } + + /// + public bool ImplicitRdpcmEnabledFlag + { + get => BitFields.HasFlag(_implicitRdpcmEnabledFlag, 18); + set => BitFields.SetFlag(ref _implicitRdpcmEnabledFlag, 18, value); + } + + /// + public bool ExplicitRdpcmEnabledFlag + { + get => BitFields.HasFlag(_explicitRdpcmEnabledFlag, 19); + set => BitFields.SetFlag(ref _explicitRdpcmEnabledFlag, 19, value); + } + + /// + public bool ExtendedPrecisionProcessingFlag + { + get => BitFields.HasFlag(_extendedPrecisionProcessingFlag, 20); + set => BitFields.SetFlag(ref _extendedPrecisionProcessingFlag, 20, value); + } + + /// + public bool IntraSmoothingDisabledFlag + { + get => BitFields.HasFlag(_intraSmoothingDisabledFlag, 21); + set => BitFields.SetFlag(ref _intraSmoothingDisabledFlag, 21, value); + } + + /// + public bool HighPrecisionOffsetsEnabledFlag + { + get => BitFields.HasFlag(_highPrecisionOffsetsEnabledFlag, 22); + set => BitFields.SetFlag(ref _highPrecisionOffsetsEnabledFlag, 22, value); + } + + /// + public bool PersistentRiceAdaptationEnabledFlag + { + get => BitFields.HasFlag(_persistentRiceAdaptationEnabledFlag, 23); + set => BitFields.SetFlag(ref _persistentRiceAdaptationEnabledFlag, 23, value); + } + + /// + public bool CabacBypassAlignmentEnabledFlag + { + get => BitFields.HasFlag(_cabacBypassAlignmentEnabledFlag, 24); + set => BitFields.SetFlag(ref _cabacBypassAlignmentEnabledFlag, 24, value); + } + + /// + public bool SpsSccExtensionFlag + { + get => BitFields.HasFlag(_spsSccExtensionFlag, 25); + set => BitFields.SetFlag(ref _spsSccExtensionFlag, 25, value); + } + + /// + public bool SpsCurrPicRefEnabledFlag + { + get => BitFields.HasFlag(_spsCurrPicRefEnabledFlag, 26); + set => BitFields.SetFlag(ref _spsCurrPicRefEnabledFlag, 26, value); + } + + /// + public bool PaletteModeEnabledFlag + { + get => BitFields.HasFlag(_paletteModeEnabledFlag, 27); + set => BitFields.SetFlag(ref _paletteModeEnabledFlag, 27, value); + } + + /// + public bool SpsPalettePredictorInitializersPresentFlag + { + get => BitFields.HasFlag(_spsPalettePredictorInitializersPresentFlag, 28); + set => BitFields.SetFlag(ref _spsPalettePredictorInitializersPresentFlag, 28, value); + } + + /// + public bool IntraBoundaryFilteringDisabledFlag + { + get => BitFields.HasFlag(_intraBoundaryFilteringDisabledFlag, 29); + set => BitFields.SetFlag(ref _intraBoundaryFilteringDisabledFlag, 29, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265SpsVuiFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265SpsVuiFlags.gen.cs new file mode 100644 index 0000000..76994d8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265SpsVuiFlags.gen.cs @@ -0,0 +1,244 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265SpsVuiFlags() + { + /// + /// AspectRatioInfoPresentFlag + /// + [FieldOffset(0)] + private int _aspectRatioInfoPresentFlag; + + /// + /// OverscanInfoPresentFlag + /// + [FieldOffset(0)] + private int _overscanInfoPresentFlag; + + /// + /// OverscanAppropriateFlag + /// + [FieldOffset(0)] + private int _overscanAppropriateFlag; + + /// + /// VideoSignalTypePresentFlag + /// + [FieldOffset(0)] + private int _videoSignalTypePresentFlag; + + /// + /// VideoFullRangeFlag + /// + [FieldOffset(0)] + private int _videoFullRangeFlag; + + /// + /// ColourDescriptionPresentFlag + /// + [FieldOffset(0)] + private int _colourDescriptionPresentFlag; + + /// + /// ChromaLocInfoPresentFlag + /// + [FieldOffset(0)] + private int _chromaLocInfoPresentFlag; + + /// + /// NeutralChromaIndicationFlag + /// + [FieldOffset(0)] + private int _neutralChromaIndicationFlag; + + /// + /// FieldSeqFlag + /// + [FieldOffset(0)] + private int _fieldSeqFlag; + + /// + /// FrameFieldInfoPresentFlag + /// + [FieldOffset(0)] + private int _frameFieldInfoPresentFlag; + + /// + /// DefaultDisplayWindowFlag + /// + [FieldOffset(0)] + private int _defaultDisplayWindowFlag; + + /// + /// VuiTimingInfoPresentFlag + /// + [FieldOffset(0)] + private int _vuiTimingInfoPresentFlag; + + /// + /// VuiPocProportionalToTimingFlag + /// + [FieldOffset(0)] + private int _vuiPocProportionalToTimingFlag; + + /// + /// VuiHrdParametersPresentFlag + /// + [FieldOffset(0)] + private int _vuiHrdParametersPresentFlag; + + /// + /// BitstreamRestrictionFlag + /// + [FieldOffset(0)] + private int _bitstreamRestrictionFlag; + + /// + /// TilesFixedStructureFlag + /// + [FieldOffset(0)] + private int _tilesFixedStructureFlag; + + /// + /// MotionVectorsOverPicBoundariesFlag + /// + [FieldOffset(0)] + private int _motionVectorsOverPicBoundariesFlag; + + /// + /// RestrictedRefPicListsFlag + /// + [FieldOffset(0)] + private int _restrictedRefPicListsFlag; + } + + public partial struct StdVideoH265SpsVuiFlags + { + /// + public bool AspectRatioInfoPresentFlag + { + get => BitFields.HasFlag(_aspectRatioInfoPresentFlag, 0); + set => BitFields.SetFlag(ref _aspectRatioInfoPresentFlag, 0, value); + } + + /// + public bool OverscanInfoPresentFlag + { + get => BitFields.HasFlag(_overscanInfoPresentFlag, 1); + set => BitFields.SetFlag(ref _overscanInfoPresentFlag, 1, value); + } + + /// + public bool OverscanAppropriateFlag + { + get => BitFields.HasFlag(_overscanAppropriateFlag, 2); + set => BitFields.SetFlag(ref _overscanAppropriateFlag, 2, value); + } + + /// + public bool VideoSignalTypePresentFlag + { + get => BitFields.HasFlag(_videoSignalTypePresentFlag, 3); + set => BitFields.SetFlag(ref _videoSignalTypePresentFlag, 3, value); + } + + /// + public bool VideoFullRangeFlag + { + get => BitFields.HasFlag(_videoFullRangeFlag, 4); + set => BitFields.SetFlag(ref _videoFullRangeFlag, 4, value); + } + + /// + public bool ColourDescriptionPresentFlag + { + get => BitFields.HasFlag(_colourDescriptionPresentFlag, 5); + set => BitFields.SetFlag(ref _colourDescriptionPresentFlag, 5, value); + } + + /// + public bool ChromaLocInfoPresentFlag + { + get => BitFields.HasFlag(_chromaLocInfoPresentFlag, 6); + set => BitFields.SetFlag(ref _chromaLocInfoPresentFlag, 6, value); + } + + /// + public bool NeutralChromaIndicationFlag + { + get => BitFields.HasFlag(_neutralChromaIndicationFlag, 7); + set => BitFields.SetFlag(ref _neutralChromaIndicationFlag, 7, value); + } + + /// + public bool FieldSeqFlag + { + get => BitFields.HasFlag(_fieldSeqFlag, 8); + set => BitFields.SetFlag(ref _fieldSeqFlag, 8, value); + } + + /// + public bool FrameFieldInfoPresentFlag + { + get => BitFields.HasFlag(_frameFieldInfoPresentFlag, 9); + set => BitFields.SetFlag(ref _frameFieldInfoPresentFlag, 9, value); + } + + /// + public bool DefaultDisplayWindowFlag + { + get => BitFields.HasFlag(_defaultDisplayWindowFlag, 10); + set => BitFields.SetFlag(ref _defaultDisplayWindowFlag, 10, value); + } + + /// + public bool VuiTimingInfoPresentFlag + { + get => BitFields.HasFlag(_vuiTimingInfoPresentFlag, 11); + set => BitFields.SetFlag(ref _vuiTimingInfoPresentFlag, 11, value); + } + + /// + public bool VuiPocProportionalToTimingFlag + { + get => BitFields.HasFlag(_vuiPocProportionalToTimingFlag, 12); + set => BitFields.SetFlag(ref _vuiPocProportionalToTimingFlag, 12, value); + } + + /// + public bool VuiHrdParametersPresentFlag + { + get => BitFields.HasFlag(_vuiHrdParametersPresentFlag, 13); + set => BitFields.SetFlag(ref _vuiHrdParametersPresentFlag, 13, value); + } + + /// + public bool BitstreamRestrictionFlag + { + get => BitFields.HasFlag(_bitstreamRestrictionFlag, 14); + set => BitFields.SetFlag(ref _bitstreamRestrictionFlag, 14, value); + } + + /// + public bool TilesFixedStructureFlag + { + get => BitFields.HasFlag(_tilesFixedStructureFlag, 15); + set => BitFields.SetFlag(ref _tilesFixedStructureFlag, 15, value); + } + + /// + public bool MotionVectorsOverPicBoundariesFlag + { + get => BitFields.HasFlag(_motionVectorsOverPicBoundariesFlag, 16); + set => BitFields.SetFlag(ref _motionVectorsOverPicBoundariesFlag, 16, value); + } + + /// + public bool RestrictedRefPicListsFlag + { + get => BitFields.HasFlag(_restrictedRefPicListsFlag, 17); + set => BitFields.SetFlag(ref _restrictedRefPicListsFlag, 17, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265SubLayerHrdParameters.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265SubLayerHrdParameters.gen.cs new file mode 100644 index 0000000..bd00a8d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265SubLayerHrdParameters.gen.cs @@ -0,0 +1,29 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 516)] + public unsafe partial struct StdVideoH265SubLayerHrdParameters() + { + /// + [FieldOffset(0)] + public fixed int BitRateValueMinus1[32]; + + /// + [FieldOffset(128)] + public fixed int CpbSizeValueMinus1[32]; + + /// + [FieldOffset(256)] + public fixed int CpbSizeDuValueMinus1[32]; + + /// + [FieldOffset(384)] + public fixed int BitRateDuValueMinus1[32]; + + /// + /// CbrFlag + /// + [FieldOffset(512)] + public int CbrFlag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265VideoParameterSet.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265VideoParameterSet.gen.cs new file mode 100644 index 0000000..dc0c6d4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265VideoParameterSet.gen.cs @@ -0,0 +1,79 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct StdVideoH265VideoParameterSet() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoH265VpsFlags Flags; + + /// + /// VpsVideoParameterSetId + /// + [FieldOffset(4)] + public byte VpsVideoParameterSetId; + + /// + /// VpsMaxSubLayersMinus1 + /// + [FieldOffset(5)] + public byte VpsMaxSubLayersMinus1; + + /// + /// Reserved1 + /// + [FieldOffset(6)] + public byte Reserved1; + + /// + /// Reserved2 + /// + [FieldOffset(7)] + public byte Reserved2; + + /// + /// VpsNumUnitsInTick + /// + [FieldOffset(8)] + public int VpsNumUnitsInTick; + + /// + /// VpsTimeScale + /// + [FieldOffset(12)] + public int VpsTimeScale; + + /// + /// VpsNumTicksPocDiffOneMinus1 + /// + [FieldOffset(16)] + public int VpsNumTicksPocDiffOneMinus1; + + /// + /// Reserved3 + /// + [FieldOffset(20)] + public int Reserved3; + + /// + /// DecPicBufMgr + /// + [FieldOffset(24)] + public StdVideoH265DecPicBufMgr* DecPicBufMgr; + + /// + /// HrdParameters + /// + [FieldOffset(32)] + public StdVideoH265HrdParameters* HrdParameters; + + /// + /// ProfileTierLevel + /// + [FieldOffset(40)] + public StdVideoH265ProfileTierLevel* ProfileTierLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoH265VpsFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoH265VpsFlags.gen.cs new file mode 100644 index 0000000..107b839 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoH265VpsFlags.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoH265VpsFlags() + { + /// + /// VpsTemporalIdNestingFlag + /// + [FieldOffset(0)] + private int _vpsTemporalIdNestingFlag; + + /// + /// VpsSubLayerOrderingInfoPresentFlag + /// + [FieldOffset(0)] + private int _vpsSubLayerOrderingInfoPresentFlag; + + /// + /// VpsTimingInfoPresentFlag + /// + [FieldOffset(0)] + private int _vpsTimingInfoPresentFlag; + + /// + /// VpsPocProportionalToTimingFlag + /// + [FieldOffset(0)] + private int _vpsPocProportionalToTimingFlag; + } + + public partial struct StdVideoH265VpsFlags + { + /// + public bool VpsTemporalIdNestingFlag + { + get => BitFields.HasFlag(_vpsTemporalIdNestingFlag, 0); + set => BitFields.SetFlag(ref _vpsTemporalIdNestingFlag, 0, value); + } + + /// + public bool VpsSubLayerOrderingInfoPresentFlag + { + get => BitFields.HasFlag(_vpsSubLayerOrderingInfoPresentFlag, 1); + set => BitFields.SetFlag(ref _vpsSubLayerOrderingInfoPresentFlag, 1, value); + } + + /// + public bool VpsTimingInfoPresentFlag + { + get => BitFields.HasFlag(_vpsTimingInfoPresentFlag, 2); + set => BitFields.SetFlag(ref _vpsTimingInfoPresentFlag, 2, value); + } + + /// + public bool VpsPocProportionalToTimingFlag + { + get => BitFields.HasFlag(_vpsPocProportionalToTimingFlag, 3); + set => BitFields.SetFlag(ref _vpsPocProportionalToTimingFlag, 3, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfig.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfig.gen.cs new file mode 100644 index 0000000..a752bd4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfig.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct StdVideoVP9ColorConfig() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoVP9ColorConfigFlags Flags; + + /// + /// BitDepth + /// + [FieldOffset(4)] + public byte BitDepth; + + /// + /// SubsamplingX + /// + [FieldOffset(5)] + public byte SubsamplingX; + + /// + /// SubsamplingY + /// + [FieldOffset(6)] + public byte SubsamplingY; + + /// + /// Reserved1 + /// + [FieldOffset(7)] + public byte Reserved1; + + /// + /// ColorSpace + /// + [FieldOffset(8)] + public StdVideoVP9ColorSpace ColorSpace; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfigFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfigFlags.gen.cs new file mode 100644 index 0000000..3e50596 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoVP9ColorConfigFlags.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoVP9ColorConfigFlags() + { + /// + /// ColorRange + /// + [FieldOffset(0)] + private int _colorRange; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoVP9ColorConfigFlags + { + /// + public bool ColorRange + { + get => BitFields.HasFlag(_colorRange, 0); + set => BitFields.SetFlag(ref _colorRange, 0, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 1, length: 31); + set => BitFields.SetRange(ref _reserved, start: 1, length: 31, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilter.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilter.gen.cs new file mode 100644 index 0000000..9d55d8d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilter.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct StdVideoVP9LoopFilter() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoVP9LoopFilterFlags Flags; + + /// + /// LoopFilterLevel + /// + [FieldOffset(4)] + public byte LoopFilterLevel; + + /// + /// LoopFilterSharpness + /// + [FieldOffset(5)] + public byte LoopFilterSharpness; + + /// + /// UpdateRefDelta + /// + [FieldOffset(6)] + public byte UpdateRefDelta; + + /// + /// LoopFilterRefDeltas + /// + [FieldOffset(7)] + public byte4 LoopFilterRefDeltas; + + /// + /// UpdateModeDelta + /// + [FieldOffset(11)] + public byte UpdateModeDelta; + + /// + /// LoopFilterModeDeltas + /// + [FieldOffset(12)] + public byte2 LoopFilterModeDeltas; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilterFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilterFlags.gen.cs new file mode 100644 index 0000000..21cf27f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoVP9LoopFilterFlags.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoVP9LoopFilterFlags() + { + /// + /// LoopFilterDeltaEnabled + /// + [FieldOffset(0)] + private int _loopFilterDeltaEnabled; + + /// + /// LoopFilterDeltaUpdate + /// + [FieldOffset(0)] + private int _loopFilterDeltaUpdate; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoVP9LoopFilterFlags + { + /// + public bool LoopFilterDeltaEnabled + { + get => BitFields.HasFlag(_loopFilterDeltaEnabled, 0); + set => BitFields.SetFlag(ref _loopFilterDeltaEnabled, 0, value); + } + + /// + public bool LoopFilterDeltaUpdate + { + get => BitFields.HasFlag(_loopFilterDeltaUpdate, 1); + set => BitFields.SetFlag(ref _loopFilterDeltaUpdate, 1, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 2, length: 30); + set => BitFields.SetRange(ref _reserved, start: 2, length: 30, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoVP9Segmentation.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoVP9Segmentation.gen.cs new file mode 100644 index 0000000..f07b02e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoVP9Segmentation.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct StdVideoVP9Segmentation() + { + /// + /// Flags + /// + [FieldOffset(0)] + public StdVideoVP9SegmentationFlags Flags; + + /// + [FieldOffset(4)] + public fixed byte SegmentationTreeProbs[7]; + + /// + /// SegmentationPredProb + /// + [FieldOffset(11)] + public byte3 SegmentationPredProb; + + /// + [FieldOffset(14)] + public fixed byte FeatureEnabled[8]; + + /// + /// FeatureData + /// + [FieldOffset(22)] + public short_4_8 FeatureData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/StdVideoVP9SegmentationFlags.gen.cs b/Brutal.Vulkan/Generated/Structs/StdVideoVP9SegmentationFlags.gen.cs new file mode 100644 index 0000000..e387dcf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/StdVideoVP9SegmentationFlags.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct StdVideoVP9SegmentationFlags() + { + /// + /// SegmentationUpdateMap + /// + [FieldOffset(0)] + private int _segmentationUpdateMap; + + /// + /// SegmentationTemporalUpdate + /// + [FieldOffset(0)] + private int _segmentationTemporalUpdate; + + /// + /// SegmentationUpdateData + /// + [FieldOffset(0)] + private int _segmentationUpdateData; + + /// + /// SegmentationAbsOrDeltaUpdate + /// + [FieldOffset(0)] + private int _segmentationAbsOrDeltaUpdate; + + /// + /// Reserved + /// + [FieldOffset(0)] + private int _reserved; + } + + public partial struct StdVideoVP9SegmentationFlags + { + /// + public bool SegmentationUpdateMap + { + get => BitFields.HasFlag(_segmentationUpdateMap, 0); + set => BitFields.SetFlag(ref _segmentationUpdateMap, 0, value); + } + + /// + public bool SegmentationTemporalUpdate + { + get => BitFields.HasFlag(_segmentationTemporalUpdate, 1); + set => BitFields.SetFlag(ref _segmentationTemporalUpdate, 1, value); + } + + /// + public bool SegmentationUpdateData + { + get => BitFields.HasFlag(_segmentationUpdateData, 2); + set => BitFields.SetFlag(ref _segmentationUpdateData, 2, value); + } + + /// + public bool SegmentationAbsOrDeltaUpdate + { + get => BitFields.HasFlag(_segmentationAbsOrDeltaUpdate, 3); + set => BitFields.SetFlag(ref _segmentationAbsOrDeltaUpdate, 3, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 4, length: 28); + set => BitFields.SetRange(ref _reserved, start: 4, length: 28, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAabbPositionsKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAabbPositionsKHR.gen.cs new file mode 100644 index 0000000..4ddb155 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAabbPositionsKHR.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAabbPositionsKHR - Structure specifying two opposing corners of an axis-aligned bounding box + /// + /// + /// + /// :refpage: VkAabbPositionsKHR + /// + /// + /// The VkAabbPositionsKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAabbPositionsKHR { + /// float minX; + /// float minY; + /// float minZ; + /// float maxX; + /// float maxY; + /// float maxZ; + /// } VkAabbPositionsKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkAabbPositionsKHR() + { + /// + /// MinX is the x position of one opposing corner of a bounding box. + /// + [FieldOffset(0)] + public float MinX; + + /// + /// MinY is the y position of one opposing corner of a bounding box. + /// + [FieldOffset(4)] + public float MinY; + + /// + /// MinZ is the z position of one opposing corner of a bounding box. + /// + [FieldOffset(8)] + public float MinZ; + + /// + /// MaxX is the x position of the other opposing corner of a bounding box. + /// + [FieldOffset(12)] + public float MaxX; + + /// + /// MaxY is the y position of the other opposing corner of a bounding box. + /// + [FieldOffset(16)] + public float MaxY; + + /// + /// MaxZ is the z position of the other opposing corner of a bounding box. + /// + [FieldOffset(20)] + public float MaxZ; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildGeometryInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildGeometryInfoKHR.gen.cs new file mode 100644 index 0000000..6600f06 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildGeometryInfoKHR.gen.cs @@ -0,0 +1,100 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureBuildGeometryInfoKHR - Structure specifying the geometry data used to build an acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureBuildGeometryInfoKHR + /// + /// + /// The VkAccelerationStructureBuildGeometryInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureBuildGeometryInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureTypeKHR type; + /// VkBuildAccelerationStructureFlagsKHR flags; + /// VkBuildAccelerationStructureModeKHR mode; + /// VkAccelerationStructureKHR srcAccelerationStructure; + /// VkAccelerationStructureKHR dstAccelerationStructure; + /// uint32_t geometryCount; + /// const VkAccelerationStructureGeometryKHR* pGeometries; + /// const VkAccelerationStructureGeometryKHR* const* ppGeometries; + /// VkDeviceOrHostAddressKHR scratchData; + /// } VkAccelerationStructureBuildGeometryInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkAccelerationStructureBuildGeometryInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureBuildGeometryInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is a VkAccelerationStructureTypeKHR value specifying the type of acceleration structure being built. + /// + [FieldOffset(16)] + public VkAccelerationStructureTypeKHR Type; + + /// + /// Flags is a bitmask of VkBuildAccelerationStructureFlagsKHR specifying additional parameters of the acceleration structure. + /// + [FieldOffset(20)] + public VkBuildAccelerationStructureFlagsKHR Flags; + + /// + /// Mode is a VkBuildAccelerationStructureModeKHR value specifying the type of operation to perform. + /// + [FieldOffset(24)] + public VkBuildAccelerationStructureModeKHR Mode; + + /// + /// SrcAccelerationStructure is a pointer to an existing acceleration structure that is to be used to update the dstAccelerationStructure acceleration structure when mode is VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR. + /// + [FieldOffset(32)] + public VkAccelerationStructureKHR SrcAccelerationStructure; + + /// + /// DstAccelerationStructure is a pointer to the target acceleration structure for the build. + /// + [FieldOffset(40)] + public VkAccelerationStructureKHR DstAccelerationStructure; + + /// + /// GeometryCount specifies the number of geometries that will be built into dstAccelerationStructure. + /// + [FieldOffset(48)] + public int GeometryCount; + + /// + /// Geometries is a pointer to an array of VkAccelerationStructureGeometryKHR structures. + /// + [FieldOffset(56)] + public VkAccelerationStructureGeometryKHR* Geometries; + + /// + /// ppGeometries is a pointer to an array of pointers to VkAccelerationStructureGeometryKHR structures. + /// + [FieldOffset(64)] + public VkAccelerationStructureGeometryKHR** ppGeometries; + + /// + /// ScratchData is the device or host address of memory that will be used as scratch memory for the build. + /// + [FieldOffset(72)] + public VkDeviceOrHostAddressKHR ScratchData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildRangeInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildRangeInfoKHR.gen.cs new file mode 100644 index 0000000..b107439 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildRangeInfoKHR.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureBuildRangeInfoKHR - Structure specifying build offsets and counts for acceleration structure builds + /// + /// + /// + /// :refpage: VkAccelerationStructureBuildRangeInfoKHR + /// + /// + /// VkAccelerationStructureBuildRangeInfoKHR is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureBuildRangeInfoKHR { + /// uint32_t primitiveCount; + /// uint32_t primitiveOffset; + /// uint32_t firstVertex; + /// uint32_t transformOffset; + /// } VkAccelerationStructureBuildRangeInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkAccelerationStructureBuildRangeInfoKHR() + { + /// + /// PrimitiveCount defines the number of primitives for a corresponding acceleration structure geometry. + /// + [FieldOffset(0)] + public int PrimitiveCount; + + /// + /// PrimitiveOffset defines an offset in bytes into the memory where primitive data is defined. + /// + [FieldOffset(4)] + public int PrimitiveOffset; + + /// + /// FirstVertex is the index of the first vertex to build from for triangle geometry. + /// + [FieldOffset(8)] + public int FirstVertex; + + /// + /// TransformOffset defines an offset in bytes into the memory where a transform matrix is defined. + /// + [FieldOffset(12)] + public int TransformOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildSizesInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildSizesInfoKHR.gen.cs new file mode 100644 index 0000000..a81a1a8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureBuildSizesInfoKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureBuildSizesInfoKHR - Structure specifying build sizes for an acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureBuildSizesInfoKHR + /// + /// + /// The VkAccelerationStructureBuildSizesInfoKHR structure describes the + /// required build sizes for an acceleration structure and scratch buffers and + /// is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureBuildSizesInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize accelerationStructureSize; + /// VkDeviceSize updateScratchSize; + /// VkDeviceSize buildScratchSize; + /// } VkAccelerationStructureBuildSizesInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkAccelerationStructureBuildSizesInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureBuildSizesInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructureSize is the size in bytes required in a VkAccelerationStructureKHR for a build or update operation. + /// + [FieldOffset(16)] + public ByteSize64 AccelerationStructureSize; + + /// + /// UpdateScratchSize is the size in bytes required in a scratch buffer for an update operation. + /// + [FieldOffset(24)] + public ByteSize64 UpdateScratchSize; + + /// + /// BuildScratchSize is the size in bytes required in a scratch buffer for a build operation. + /// + [FieldOffset(32)] + public ByteSize64 BuildScratchSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCaptureDescriptorDataInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCaptureDescriptorDataInfoEXT.gen.cs new file mode 100644 index 0000000..d106a2b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCaptureDescriptorDataInfoEXT.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureCaptureDescriptorDataInfoEXT - Structure specifying an acceleration structure for descriptor capture + /// + /// + /// + /// Information about the acceleration structure to get descriptor buffer + /// capture data for is passed in a + /// VkAccelerationStructureCaptureDescriptorDataInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing + /// typedef struct VkAccelerationStructureCaptureDescriptorDataInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureKHR accelerationStructure; + /// VkAccelerationStructureNV accelerationStructureNV; + /// } VkAccelerationStructureCaptureDescriptorDataInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAccelerationStructureCaptureDescriptorDataInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureCaptureDescriptorDataInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructure is the VkAccelerationStructureKHR handle of the acceleration structure to get opaque capture data for. + /// + [FieldOffset(16)] + public VkAccelerationStructureKHR AccelerationStructure; + + /// + /// AccelerationStructureNV is the VkAccelerationStructureNV handle of the acceleration structure to get opaque capture data for. + /// + [FieldOffset(24)] + public VkAccelerationStructureNV AccelerationStructureNV; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfo2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfo2KHR.gen.cs new file mode 100644 index 0000000..b250ab2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfo2KHR.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureCreateInfo2KHR - Structure specifying the parameters of a newly created acceleration structure object using a device address + /// + /// + /// + /// :refpage: VkAccelerationStructureCreateInfo2KHR + /// + /// + /// The VkAccelerationStructureCreateInfo2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands + /// typedef struct VkAccelerationStructureCreateInfo2KHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureCreateFlagsKHR createFlags; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// VkAccelerationStructureTypeKHR type; + /// } VkAccelerationStructureCreateInfo2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkAccelerationStructureCreateInfo2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureCreateInfo2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateFlags is a bitmask of VkAccelerationStructureCreateFlagsKHR specifying additional creation parameters of the acceleration structure. + /// + [FieldOffset(16)] + public VkAccelerationStructureCreateFlagsKHR CreateFlags; + + /// + /// AddressRange is a VkDeviceAddressRangeKHR structure defining the size required for the acceleration structure and its starting address. + /// + [FieldOffset(24)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(40)] + public VkAddressCommandFlagsKHR AddressFlags; + + /// + /// Type is a VkAccelerationStructureTypeKHR value specifying the type of acceleration structure that will be created. + /// + [FieldOffset(44)] + public VkAccelerationStructureTypeKHR Type; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoKHR.gen.cs new file mode 100644 index 0000000..43145cb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoKHR.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureCreateInfoKHR - Structure specifying the parameters of a newly created acceleration structure object + /// + /// + /// + /// :refpage: VkAccelerationStructureCreateInfoKHR + /// + /// + /// The VkAccelerationStructureCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureCreateFlagsKHR createFlags; + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// VkAccelerationStructureTypeKHR type; + /// VkDeviceAddress deviceAddress; + /// } VkAccelerationStructureCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkAccelerationStructureCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateFlags is a bitmask of VkAccelerationStructureCreateFlagsKHR specifying additional creation parameters of the acceleration structure. + /// + [FieldOffset(16)] + public VkAccelerationStructureCreateFlagsKHR CreateFlags; + + /// + /// Buffer is the buffer on which the acceleration structure will be stored. + /// + [FieldOffset(24)] + public VkBuffer Buffer; + + /// + /// Offset is an offset in bytes from the base address of the buffer at which the acceleration structure will be stored, and must be a multiple of `256`. + /// + [FieldOffset(32)] + public ByteSize64 Offset; + + /// + /// Size is the size required for the acceleration structure. + /// + [FieldOffset(40)] + public ByteSize64 Size; + + /// + /// Type is a VkAccelerationStructureTypeKHR value specifying the type of acceleration structure that will be created. + /// + [FieldOffset(48)] + public VkAccelerationStructureTypeKHR Type; + + /// + /// DeviceAddress is the device address requested for the acceleration structure, obtained from vkGetAccelerationStructureDeviceAddressKHR, if the accelerationStructureCaptureReplay^ feature is being used. If deviceAddress is zero, no specific address is requested. + /// + [FieldOffset(56)] + public VkDeviceAddress DeviceAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoNV.gen.cs new file mode 100644 index 0000000..e64d913 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureCreateInfoNV.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureCreateInfoNV - Structure specifying the parameters of a newly created acceleration structure object + /// + /// + /// + /// :refpage: VkAccelerationStructureCreateInfoNV + /// + /// + /// The VkAccelerationStructureCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkAccelerationStructureCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceSize compactedSize; + /// VkAccelerationStructureInfoNV info; + /// } VkAccelerationStructureCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkAccelerationStructureCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CompactedSize is the size from the result of vkCmdWriteAccelerationStructuresPropertiesNV if this acceleration structure is going to be the target of a compacting copy. + /// + [FieldOffset(16)] + public ByteSize64 CompactedSize; + + /// + /// Info is the VkAccelerationStructureInfoNV structure specifying further parameters of the created acceleration structure. + /// + [FieldOffset(24)] + public VkAccelerationStructureInfoNV Info; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureDeviceAddressInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureDeviceAddressInfoKHR.gen.cs new file mode 100644 index 0000000..d58475f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureDeviceAddressInfoKHR.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureDeviceAddressInfoKHR - Structure specifying the acceleration structure to query an address for + /// + /// + /// + /// :refpage: VkAccelerationStructureDeviceAddressInfoKHR + /// + /// + /// The VkAccelerationStructureDeviceAddressInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureDeviceAddressInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureKHR accelerationStructure; + /// } VkAccelerationStructureDeviceAddressInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAccelerationStructureDeviceAddressInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureDeviceAddressInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructure specifies the acceleration structure whose address is being queried. + /// + [FieldOffset(16)] + public VkAccelerationStructureKHR AccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryAabbsDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryAabbsDataKHR.gen.cs new file mode 100644 index 0000000..10d57b4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryAabbsDataKHR.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryAabbsDataKHR - Structure specifying axis-aligned bounding box geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryAabbsDataKHR + /// + /// + /// The VkAccelerationStructureGeometryAabbsDataKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureGeometryAabbsDataKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceOrHostAddressConstKHR data; + /// VkDeviceSize stride; + /// } VkAccelerationStructureGeometryAabbsDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAccelerationStructureGeometryAabbsDataKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryAabbsDataKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Data is a device or host address of memory containing VkAabbPositionsKHR structures containing position data for each axis-aligned bounding box in the geometry. + /// + [FieldOffset(16)] + public VkDeviceOrHostAddressConstKHR Data; + + /// + /// Stride is the stride in bytes between each entry in data. The stride must be a multiple of `8`. + /// + [FieldOffset(24)] + public ByteSize64 Stride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryDataKHR.gen.cs new file mode 100644 index 0000000..48e44b9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryDataKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryDataKHR - Union specifying acceleration structure geometry data + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryDataKHR + /// + /// + /// The VkAccelerationStructureGeometryDataKHR union is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef union VkAccelerationStructureGeometryDataKHR { + /// VkAccelerationStructureGeometryTrianglesDataKHR triangles; + /// VkAccelerationStructureGeometryAabbsDataKHR aabbs; + /// VkAccelerationStructureGeometryInstancesDataKHR instances; + /// } VkAccelerationStructureGeometryDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct VkAccelerationStructureGeometryDataKHR() + { + /// + /// Triangles is a VkAccelerationStructureGeometryTrianglesDataKHR structure. + /// + [FieldOffset(0)] + public VkAccelerationStructureGeometryTrianglesDataKHR Triangles; + + /// + /// Aabbs is a VkAccelerationStructureGeometryAabbsDataKHR structure. + /// + [FieldOffset(0)] + public VkAccelerationStructureGeometryAabbsDataKHR Aabbs; + + /// + /// Instances is a VkAccelerationStructureGeometryInstancesDataKHR structure. + /// + [FieldOffset(0)] + public VkAccelerationStructureGeometryInstancesDataKHR Instances; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryInstancesDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryInstancesDataKHR.gen.cs new file mode 100644 index 0000000..75da479 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryInstancesDataKHR.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryInstancesDataKHR - Structure specifying a geometry consisting of instances of other acceleration structures + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryInstancesDataKHR + /// + /// + /// The VkAccelerationStructureGeometryInstancesDataKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureGeometryInstancesDataKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 arrayOfPointers; + /// VkDeviceOrHostAddressConstKHR data; + /// } VkAccelerationStructureGeometryInstancesDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAccelerationStructureGeometryInstancesDataKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryInstancesDataKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ArrayOfPointers specifies whether data is used as an array of addresses or just an array. + /// + [FieldOffset(16)] + public Brutal.Bool32 ArrayOfPointers; + + /// + /// Data is either the address of an array of device or host addresses referencing individual VkAccelerationStructureInstanceKHR structures if arrayOfPointers is VK_TRUE, or the address of an array of VkAccelerationStructureInstanceKHR structures. Addresses and VkAccelerationStructureInstanceKHR structures are tightly packed. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressConstKHR Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryKHR.gen.cs new file mode 100644 index 0000000..84ea293 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryKHR - Structure specifying geometries to be built into an acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryKHR + /// + /// + /// The VkAccelerationStructureGeometryKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureGeometryKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkGeometryTypeKHR geometryType; + /// VkAccelerationStructureGeometryDataKHR geometry; + /// VkGeometryFlagsKHR flags; + /// } VkAccelerationStructureGeometryKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkAccelerationStructureGeometryKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GeometryType describes which type of geometry this VkAccelerationStructureGeometryKHR refers to. + /// + [FieldOffset(16)] + public VkGeometryTypeKHR GeometryType; + + /// + /// Geometry is a VkAccelerationStructureGeometryDataKHR union describing the geometry data for the relevant geometry type. + /// + [FieldOffset(24)] + public VkAccelerationStructureGeometryDataKHR Geometry; + + /// + /// Flags is a bitmask of VkGeometryFlagsKHR values describing additional properties of how the geometry should be built. + /// + [FieldOffset(88)] + public VkGeometryFlagsKHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryLinearSweptSpheresDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryLinearSweptSpheresDataNV.gen.cs new file mode 100644 index 0000000..26e8461 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryLinearSweptSpheresDataNV.gen.cs @@ -0,0 +1,120 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryLinearSweptSpheresDataNV - Structure specifying a LSS geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryLinearSweptSpheresDataNV + /// + /// + /// If VkAccelerationStructureGeometryLinearSweptSpheresDataNV is included + /// in the pNext chain of a VkAccelerationStructureGeometryKHR + /// structure, then that structures defines the linear swept sphere's (LSS) + /// geometry data. + /// + /// + /// The VkAccelerationStructureGeometryLinearSweptSpheresDataNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// typedef struct VkAccelerationStructureGeometryLinearSweptSpheresDataNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat vertexFormat; + /// VkDeviceOrHostAddressConstKHR vertexData; + /// VkDeviceSize vertexStride; + /// VkFormat radiusFormat; + /// VkDeviceOrHostAddressConstKHR radiusData; + /// VkDeviceSize radiusStride; + /// VkIndexType indexType; + /// VkDeviceOrHostAddressConstKHR indexData; + /// VkDeviceSize indexStride; + /// VkRayTracingLssIndexingModeNV indexingMode; + /// VkRayTracingLssPrimitiveEndCapsModeNV endCapsMode; + /// } VkAccelerationStructureGeometryLinearSweptSpheresDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkAccelerationStructureGeometryLinearSweptSpheresDataNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryLinearSweptSpheresDataNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexFormat is the VkFormat of each LSS vertex element. + /// + [FieldOffset(16)] + public VkFormat VertexFormat; + + /// + /// VertexData is a device or host address of memory containing vertex data for this geometry. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressConstKHR VertexData; + + /// + /// VertexStride is the stride in bytes between each vertex element. + /// + [FieldOffset(32)] + public ByteSize64 VertexStride; + + /// + /// RadiusFormat is the VkFormat of each LSS radius. + /// + [FieldOffset(40)] + public VkFormat RadiusFormat; + + /// + /// RadiusData is a device or host address of memory containing LSS radius data value. + /// + [FieldOffset(48)] + public VkDeviceOrHostAddressConstKHR RadiusData; + + /// + /// RadiusStride is the stride in bytes between each radius value. + /// + [FieldOffset(56)] + public ByteSize64 RadiusStride; + + /// + /// IndexType is the VkIndexType of each index element. + /// + [FieldOffset(64)] + public VkIndexType IndexType; + + /// + /// IndexData is a device or host address of memory containing index data for vertex and radius buffers for this geometry. When indexType is VK_INDEX_TYPE_NONE_KHR it must be `NULL`. + /// + [FieldOffset(72)] + public VkDeviceOrHostAddressConstKHR IndexData; + + /// + /// IndexStride is the stride in bytes between each index element. + /// + [FieldOffset(80)] + public ByteSize64 IndexStride; + + /// + /// IndexingMode is a VkRayTracingLssIndexingModeNV value specifying the mode of indexing. + /// + [FieldOffset(88)] + public VkRayTracingLssIndexingModeNV IndexingMode; + + /// + /// EndCapsMode is a VkRayTracingLssPrimitiveEndCapsModeNV value specifying the endcaps mode for LSS primitives. + /// + [FieldOffset(92)] + public VkRayTracingLssPrimitiveEndCapsModeNV EndCapsMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMicromapDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMicromapDataKHR.gen.cs new file mode 100644 index 0000000..6061c7a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMicromapDataKHR.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryMicromapDataKHR - Structure specifying the data used to build a micromap + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryMicromapDataKHR + /// + /// + /// When building micromaps with vkCmdBuildAccelerationStructuresKHR, a + /// VkAccelerationStructureGeometryMicromapDataKHR structure can be added + /// to the pNext chain of VkAccelerationStructureGeometryKHR to + /// specify the data used to build the micromap. + /// + /// + /// The VkAccelerationStructureGeometryMicromapDataKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef struct VkAccelerationStructureGeometryMicromapDataKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t usageCountsCount; + /// const VkMicromapUsageKHR* pUsageCounts; + /// const VkMicromapUsageKHR* const* ppUsageCounts; + /// VkDeviceAddress data; + /// VkDeviceAddress triangleArray; + /// VkDeviceSize triangleArrayStride; + /// } VkAccelerationStructureGeometryMicromapDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkAccelerationStructureGeometryMicromapDataKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryMicromapDataKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UsageCountsCount specifies the number of usage counts structures that will be used to determine the size of this micromap. + /// + [FieldOffset(16)] + public int UsageCountsCount; + + /// + /// UsageCounts is a pointer to an array of VkMicromapUsageKHR structures. + /// + [FieldOffset(24)] + public VkMicromapUsageKHR* UsageCounts; + + /// + /// ppUsageCounts is a pointer to an array of pointers to VkMicromapUsageKHR structures. + /// + [FieldOffset(32)] + public VkMicromapUsageKHR** ppUsageCounts; + + /// + /// Data is the device address to memory which contains the data for the micromap. + /// + [FieldOffset(40)] + public VkDeviceAddress Data; + + /// + /// TriangleArray is the device address to memory containing the VkMicromapTriangleKHR data + /// + [FieldOffset(48)] + public VkDeviceAddress TriangleArray; + + /// + /// TriangleArrayStride is the stride in bytes between each element of triangleArray + /// + [FieldOffset(56)] + public ByteSize64 TriangleArrayStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMotionTrianglesDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMotionTrianglesDataNV.gen.cs new file mode 100644 index 0000000..43ae844 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryMotionTrianglesDataNV.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryMotionTrianglesDataNV - Structure specifying vertex motion in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryMotionTrianglesDataNV + /// + /// + /// The VkAccelerationStructureGeometryMotionTrianglesDataNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkAccelerationStructureGeometryMotionTrianglesDataNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceOrHostAddressConstKHR vertexData; + /// } VkAccelerationStructureGeometryMotionTrianglesDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAccelerationStructureGeometryMotionTrianglesDataNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryMotionTrianglesDataNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexData is a pointer to vertex data for this geometry at time 1.0 + /// + [FieldOffset(16)] + public VkDeviceOrHostAddressConstKHR VertexData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometrySpheresDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometrySpheresDataNV.gen.cs new file mode 100644 index 0000000..3d7f84f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometrySpheresDataNV.gen.cs @@ -0,0 +1,105 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometrySpheresDataNV - Structure specifying a sphere geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometrySpheresDataNV + /// + /// + /// If VkAccelerationStructureGeometrySpheresDataNV is included in the + /// pNext chain of a VkAccelerationStructureGeometryKHR structure, + /// then that structures defines the sphere's geometry data. + /// + /// + /// The VkAccelerationStructureGeometrySpheresDataNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// typedef struct VkAccelerationStructureGeometrySpheresDataNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat vertexFormat; + /// VkDeviceOrHostAddressConstKHR vertexData; + /// VkDeviceSize vertexStride; + /// VkFormat radiusFormat; + /// VkDeviceOrHostAddressConstKHR radiusData; + /// VkDeviceSize radiusStride; + /// VkIndexType indexType; + /// VkDeviceOrHostAddressConstKHR indexData; + /// VkDeviceSize indexStride; + /// } VkAccelerationStructureGeometrySpheresDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkAccelerationStructureGeometrySpheresDataNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometrySpheresDataNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexFormat is the VkFormat of each sphere's vertex element. + /// + [FieldOffset(16)] + public VkFormat VertexFormat; + + /// + /// VertexData is a device or host address of memory containing vertex data in form of pairs of centers of spheres that define all sphere geometry. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressConstKHR VertexData; + + /// + /// VertexStride is the stride in bytes between each vertex element. + /// + [FieldOffset(32)] + public ByteSize64 VertexStride; + + /// + /// RadiusFormat is the VkFormat of each sphere's radius. + /// + [FieldOffset(40)] + public VkFormat RadiusFormat; + + /// + /// RadiusData is a device or host address of memory containing sphere's radius data value. + /// + [FieldOffset(48)] + public VkDeviceOrHostAddressConstKHR RadiusData; + + /// + /// RadiusStride is the stride in bytes between each radius value. + /// + [FieldOffset(56)] + public ByteSize64 RadiusStride; + + /// + /// IndexType is the VkIndexType of each index element. + /// + [FieldOffset(64)] + public VkIndexType IndexType; + + /// + /// IndexData is a device or host address of memory containing index data for vertex and radius buffers for this geometry. When indexType is VK_INDEX_TYPE_NONE_KHR it must be `NULL`. + /// + [FieldOffset(72)] + public VkDeviceOrHostAddressConstKHR IndexData; + + /// + /// IndexStride is the stride in bytes between each index element. + /// + [FieldOffset(80)] + public ByteSize64 IndexStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryTrianglesDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryTrianglesDataKHR.gen.cs new file mode 100644 index 0000000..08cd45c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureGeometryTrianglesDataKHR.gen.cs @@ -0,0 +1,86 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureGeometryTrianglesDataKHR - Structure specifying a triangle geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureGeometryTrianglesDataKHR + /// + /// + /// The VkAccelerationStructureGeometryTrianglesDataKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureGeometryTrianglesDataKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat vertexFormat; + /// VkDeviceOrHostAddressConstKHR vertexData; + /// VkDeviceSize vertexStride; + /// uint32_t maxVertex; + /// VkIndexType indexType; + /// VkDeviceOrHostAddressConstKHR indexData; + /// VkDeviceOrHostAddressConstKHR transformData; + /// } VkAccelerationStructureGeometryTrianglesDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkAccelerationStructureGeometryTrianglesDataKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureGeometryTrianglesDataKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexFormat is the VkFormat of each vertex element. + /// + [FieldOffset(16)] + public VkFormat VertexFormat; + + /// + /// VertexData is a device or host address of memory containing vertex data for this geometry. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressConstKHR VertexData; + + /// + /// VertexStride is the stride in bytes between each vertex. + /// + [FieldOffset(32)] + public ByteSize64 VertexStride; + + /// + /// MaxVertex is the number of vertices in vertexData minus one. + /// + [FieldOffset(40)] + public int MaxVertex; + + /// + /// IndexType is the VkIndexType of each index element. + /// + [FieldOffset(44)] + public VkIndexType IndexType; + + /// + /// IndexData is a device or host address of memory containing index data for this geometry. When indexType is VK_INDEX_TYPE_NONE_KHR it must be `NULL`. + /// + [FieldOffset(48)] + public VkDeviceOrHostAddressConstKHR IndexData; + + /// + /// TransformData is a device or host address to memory containing an optional reference to a VkTransformMatrixKHR structure describing a transformation from the space in which the vertices in this geometry are described to the space in which the acceleration structure is defined. + /// + [FieldOffset(56)] + public VkDeviceOrHostAddressConstKHR TransformData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInfoNV.gen.cs new file mode 100644 index 0000000..43d24c3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInfoNV.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureInfoNV - Structure specifying the parameters of acceleration structure object + /// + /// + /// + /// :refpage: VkAccelerationStructureInfoNV + /// + /// + /// The VkAccelerationStructureInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkAccelerationStructureInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureTypeNV type; + /// VkBuildAccelerationStructureFlagsKHR flags; + /// uint32_t instanceCount; + /// uint32_t geometryCount; + /// const VkGeometryNV* pGeometries; + /// } VkAccelerationStructureInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkAccelerationStructureInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is a VkAccelerationStructureTypeNV value specifying the type of acceleration structure that will be created. + /// + [FieldOffset(16)] + public VkAccelerationStructureTypeNV Type; + + /// + /// Flags is a bitmask of VkBuildAccelerationStructureFlagsNV specifying additional parameters of the acceleration structure. + /// + [FieldOffset(20)] + public VkBuildAccelerationStructureFlagsKHR Flags; + + /// + /// InstanceCount specifies the number of instances that will be in the new acceleration structure. + /// + [FieldOffset(24)] + public int InstanceCount; + + /// + /// GeometryCount specifies the number of geometries that will be in the new acceleration structure. + /// + [FieldOffset(28)] + public int GeometryCount; + + /// + /// Geometries is a pointer to an array of geometryCount VkGeometryNV structures containing the scene data being passed into the acceleration structure. + /// + [FieldOffset(32)] + public VkGeometryNV* Geometries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInstanceKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInstanceKHR.gen.cs new file mode 100644 index 0000000..a66ab63 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureInstanceKHR.gen.cs @@ -0,0 +1,104 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureInstanceKHR - Structure specifying a single acceleration structure instance for building into an acceleration structure geometry + /// + /// + /// + /// :refpage: VkAccelerationStructureInstanceKHR + /// + /// + /// Acceleration structure instances can be built into top-level acceleration + /// structures. + /// Each acceleration structure instance is a separate entry in the top-level + /// acceleration structure which includes all the geometry of a bottom-level + /// acceleration structure at a transformed location. + /// Multiple instances can point to the same bottom level acceleration + /// structure. + /// + /// + /// An acceleration structure instance is defined by the structure: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureInstanceKHR { + /// VkTransformMatrixKHR transform; + /// uint32_t instanceCustomIndex:24; + /// uint32_t mask:8; + /// uint32_t instanceShaderBindingTableRecordOffset:24; + /// VkGeometryInstanceFlagsKHR flags:8; + /// uint64_t accelerationStructureReference; + /// } VkAccelerationStructureInstanceKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct VkAccelerationStructureInstanceKHR() + { + /// + /// Transform is a VkTransformMatrixKHR structure describing a transformation to be applied to the acceleration structure. + /// + [FieldOffset(0)] + public VkTransformMatrixKHR Transform; + + /// + /// InstanceCustomIndex is a 24-bit application-specified index value accessible to ray shaders in the InstanceCustomIndexKHR built-in. + /// + [FieldOffset(48)] + private int _instanceCustomIndex; + + /// + /// Mask is an 8-bit visibility mask for the geometry. The instance may: only be hit if `Cull Mask & instance.mask != 0` + /// + [FieldOffset(48)] + private int _mask; + + /// + /// InstanceShaderBindingTableRecordOffset is a 24-bit offset used in calculating the hit shader binding table index. + /// + [FieldOffset(52)] + private int _instanceShaderBindingTableRecordOffset; + + /// + /// Flags is an 8-bit mask of VkGeometryInstanceFlagsKHR values to apply to this instance. + /// + [FieldOffset(52)] + private VkGeometryInstanceFlagsKHR _flags; + + /// + /// AccelerationStructureReference is : + /// + [FieldOffset(56)] + public nint AccelerationStructureReference; + } + + public partial struct VkAccelerationStructureInstanceKHR + { + /// + public int InstanceCustomIndex + { + get => BitFields.ExtractRange(_instanceCustomIndex, start: 0, length: 24); + set => BitFields.SetRange(ref _instanceCustomIndex, start: 0, length: 24, value); + } + + /// + public int Mask + { + get => BitFields.ExtractRange(_mask, start: 24, length: 8); + set => BitFields.SetRange(ref _mask, start: 24, length: 8, value); + } + + /// + public int InstanceShaderBindingTableRecordOffset + { + get => BitFields.ExtractRange(_instanceShaderBindingTableRecordOffset, start: 0, length: 24); + set => BitFields.SetRange(ref _instanceShaderBindingTableRecordOffset, start: 0, length: 24, value); + } + + /// + public VkGeometryInstanceFlagsKHR Flags + { + get => BitFields.ExtractRange(_flags, start: 24, length: 8); + set => BitFields.SetRange(ref _flags, start: 24, length: 8, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMatrixMotionInstanceNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMatrixMotionInstanceNV.gen.cs new file mode 100644 index 0000000..462d0b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMatrixMotionInstanceNV.gen.cs @@ -0,0 +1,103 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMatrixMotionInstanceNV - Structure specifying a single acceleration structure matrix motion instance for building into an acceleration structure geometry + /// + /// + /// + /// :refpage: VkAccelerationStructureMatrixMotionInstanceNV + /// + /// + /// An acceleration structure matrix motion instance is defined by the + /// structure: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkAccelerationStructureMatrixMotionInstanceNV { + /// VkTransformMatrixKHR transformT0; + /// VkTransformMatrixKHR transformT1; + /// uint32_t instanceCustomIndex:24; + /// uint32_t mask:8; + /// uint32_t instanceShaderBindingTableRecordOffset:24; + /// VkGeometryInstanceFlagsKHR flags:8; + /// uint64_t accelerationStructureReference; + /// } VkAccelerationStructureMatrixMotionInstanceNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 112)] + public partial struct VkAccelerationStructureMatrixMotionInstanceNV() + { + /// + /// TransformT0 is a VkTransformMatrixKHR structure describing a transformation to be applied to the acceleration structure at time 0. + /// + [FieldOffset(0)] + public VkTransformMatrixKHR TransformT0; + + /// + /// TransformT1 is a VkTransformMatrixKHR structure describing a transformation to be applied to the acceleration structure at time 1. + /// + [FieldOffset(48)] + public VkTransformMatrixKHR TransformT1; + + /// + /// InstanceCustomIndex is a 24-bit application-specified index value accessible to ray shaders in the InstanceCustomIndexKHR built-in. + /// + [FieldOffset(96)] + private int _instanceCustomIndex; + + /// + /// Mask is an 8-bit visibility mask for the geometry. The instance may: only be hit if `Cull Mask & instance.mask != 0` + /// + [FieldOffset(96)] + private int _mask; + + /// + /// InstanceShaderBindingTableRecordOffset is a 24-bit offset used in calculating the hit shader binding table index. + /// + [FieldOffset(100)] + private int _instanceShaderBindingTableRecordOffset; + + /// + /// Flags is an 8-bit mask of VkGeometryInstanceFlagsKHR values to apply to this instance. + /// + [FieldOffset(100)] + private VkGeometryInstanceFlagsKHR _flags; + + /// + /// AccelerationStructureReference is either: + /// + [FieldOffset(104)] + public nint AccelerationStructureReference; + } + + public partial struct VkAccelerationStructureMatrixMotionInstanceNV + { + /// + public int InstanceCustomIndex + { + get => BitFields.ExtractRange(_instanceCustomIndex, start: 0, length: 24); + set => BitFields.SetRange(ref _instanceCustomIndex, start: 0, length: 24, value); + } + + /// + public int Mask + { + get => BitFields.ExtractRange(_mask, start: 24, length: 8); + set => BitFields.SetRange(ref _mask, start: 24, length: 8, value); + } + + /// + public int InstanceShaderBindingTableRecordOffset + { + get => BitFields.ExtractRange(_instanceShaderBindingTableRecordOffset, start: 0, length: 24); + set => BitFields.SetRange(ref _instanceShaderBindingTableRecordOffset, start: 0, length: 24, value); + } + + /// + public VkGeometryInstanceFlagsKHR Flags + { + get => BitFields.ExtractRange(_flags, start: 24, length: 8); + set => BitFields.SetRange(ref _flags, start: 24, length: 8, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMemoryRequirementsInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMemoryRequirementsInfoNV.gen.cs new file mode 100644 index 0000000..64b07a9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMemoryRequirementsInfoNV.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMemoryRequirementsInfoNV - Structure specifying acceleration to query for memory requirements + /// + /// + /// + /// :refpage: VkAccelerationStructureMemoryRequirementsInfoNV + /// + /// + /// The VkAccelerationStructureMemoryRequirementsInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkAccelerationStructureMemoryRequirementsInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureMemoryRequirementsTypeNV type; + /// VkAccelerationStructureNV accelerationStructure; + /// } VkAccelerationStructureMemoryRequirementsInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAccelerationStructureMemoryRequirementsInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureMemoryRequirementsInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type selects the type of memory requirement being queried. VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV returns the memory requirements for the object itself. VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV returns the memory requirements for the scratch memory when doing a build. VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV returns the memory requirements for the scratch memory when doing an update. + /// + [FieldOffset(16)] + public VkAccelerationStructureMemoryRequirementsTypeNV Type; + + /// + /// AccelerationStructure is the acceleration structure to be queried for memory requirements. + /// + [FieldOffset(24)] + public VkAccelerationStructureNV AccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInfoNV.gen.cs new file mode 100644 index 0000000..3be6ab8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInfoNV.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMotionInfoNV - Structure specifying the parameters of a newly created acceleration structure object + /// + /// + /// + /// :refpage: VkAccelerationStructureMotionInfoNV + /// + /// + /// The VkAccelerationStructureMotionInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkAccelerationStructureMotionInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxInstances; + /// VkAccelerationStructureMotionInfoFlagsNV flags; + /// } VkAccelerationStructureMotionInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAccelerationStructureMotionInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureMotionInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxInstances is the maximum number of instances that may: be used in the motion top-level acceleration structure. + /// + [FieldOffset(16)] + public int MaxInstances; + + /// + /// Flags is 0 and reserved for future use. + /// + [FieldOffset(20)] + public VkAccelerationStructureMotionInfoFlagsNV Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceDataNV.gen.cs new file mode 100644 index 0000000..c6d6eb4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceDataNV.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMotionInstanceDataNV - Union specifying an acceleration structure motion instance data for building into an acceleration structure geometry + /// + /// + /// + /// :refpage: VkAccelerationStructureMotionInstanceDataNV + /// + /// + /// Acceleration structure motion instance is defined by the union: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef union VkAccelerationStructureMotionInstanceDataNV { + /// VkAccelerationStructureInstanceKHR staticInstance; + /// VkAccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; + /// VkAccelerationStructureSRTMotionInstanceNV srtMotionInstance; + /// } VkAccelerationStructureMotionInstanceDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 144)] + public partial struct VkAccelerationStructureMotionInstanceDataNV() + { + /// + /// StaticInstance is a VkAccelerationStructureInstanceKHR structure containing data for a static instance. + /// + [FieldOffset(0)] + public VkAccelerationStructureInstanceKHR StaticInstance; + + /// + /// MatrixMotionInstance is a VkAccelerationStructureMatrixMotionInstanceNV structure containing data for a matrix motion instance. + /// + [FieldOffset(0)] + public VkAccelerationStructureMatrixMotionInstanceNV MatrixMotionInstance; + + /// + /// SrtMotionInstance is a VkAccelerationStructureSRTMotionInstanceNV structure containing data for an SRT motion instance. + /// + [FieldOffset(0)] + public VkAccelerationStructureSRTMotionInstanceNV SrtMotionInstance; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceNV.gen.cs new file mode 100644 index 0000000..e2aa67d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureMotionInstanceNV.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureMotionInstanceNV - Structure specifying a single acceleration structure motion instance for building into an acceleration structure geometry + /// + /// + /// + /// :refpage: VkAccelerationStructureMotionInstanceNV + /// + /// + /// Acceleration structure motion instances can be built into top-level + /// acceleration structures. + /// Each acceleration structure instance is a separate entry in the top-level + /// acceleration structure which includes all the geometry of a bottom-level + /// acceleration structure at a transformed location including a type of motion + /// and parameters to determine the motion of the instance over time. + /// + /// + /// An acceleration structure motion instance is defined by the structure: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkAccelerationStructureMotionInstanceNV { + /// VkAccelerationStructureMotionInstanceTypeNV type; + /// VkAccelerationStructureMotionInstanceFlagsNV flags; + /// VkAccelerationStructureMotionInstanceDataNV data; + /// } VkAccelerationStructureMotionInstanceNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public partial struct VkAccelerationStructureMotionInstanceNV() + { + /// + /// Type is a VkAccelerationStructureMotionInstanceTypeNV enumerant identifying which type of motion instance this is and which type of the union is valid. + /// + [FieldOffset(0)] + public VkAccelerationStructureMotionInstanceTypeNV Type; + + /// + /// Flags is currently unused, but is required to keep natural alignment of data. + /// + [FieldOffset(4)] + public VkAccelerationStructureMotionInstanceFlagsNV Flags; + + /// + /// Data is a VkAccelerationStructureMotionInstanceDataNV containing motion instance data for this instance. + /// + [FieldOffset(8)] + public VkAccelerationStructureMotionInstanceDataNV Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureSRTMotionInstanceNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureSRTMotionInstanceNV.gen.cs new file mode 100644 index 0000000..5259e80 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureSRTMotionInstanceNV.gen.cs @@ -0,0 +1,102 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureSRTMotionInstanceNV - Structure specifying a single acceleration structure SRT motion instance for building into an acceleration structure geometry + /// + /// + /// + /// :refpage: VkAccelerationStructureSRTMotionInstanceNV + /// + /// + /// An acceleration structure SRT motion instance is defined by the structure: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkAccelerationStructureSRTMotionInstanceNV { + /// VkSRTDataNV transformT0; + /// VkSRTDataNV transformT1; + /// uint32_t instanceCustomIndex:24; + /// uint32_t mask:8; + /// uint32_t instanceShaderBindingTableRecordOffset:24; + /// VkGeometryInstanceFlagsKHR flags:8; + /// uint64_t accelerationStructureReference; + /// } VkAccelerationStructureSRTMotionInstanceNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 144)] + public partial struct VkAccelerationStructureSRTMotionInstanceNV() + { + /// + /// TransformT0 is a VkSRTDataNV structure describing a transformation to be applied to the acceleration structure at time 0. + /// + [FieldOffset(0)] + public VkSRTDataNV TransformT0; + + /// + /// TransformT1 is a VkSRTDataNV structure describing a transformation to be applied to the acceleration structure at time 1. + /// + [FieldOffset(64)] + public VkSRTDataNV TransformT1; + + /// + /// InstanceCustomIndex is a 24-bit application-specified index value accessible to ray shaders in the InstanceCustomIndexKHR built-in. + /// + [FieldOffset(128)] + private int _instanceCustomIndex; + + /// + /// Mask is an 8-bit visibility mask for the geometry. The instance may: only be hit if `Cull Mask & instance.mask != 0` + /// + [FieldOffset(128)] + private int _mask; + + /// + /// InstanceShaderBindingTableRecordOffset is a 24-bit offset used in calculating the hit shader binding table index. + /// + [FieldOffset(132)] + private int _instanceShaderBindingTableRecordOffset; + + /// + /// Flags is an 8-bit mask of VkGeometryInstanceFlagsKHR values to apply to this instance. + /// + [FieldOffset(132)] + private VkGeometryInstanceFlagsKHR _flags; + + /// + /// AccelerationStructureReference is either: + /// + [FieldOffset(136)] + public nint AccelerationStructureReference; + } + + public partial struct VkAccelerationStructureSRTMotionInstanceNV + { + /// + public int InstanceCustomIndex + { + get => BitFields.ExtractRange(_instanceCustomIndex, start: 0, length: 24); + set => BitFields.SetRange(ref _instanceCustomIndex, start: 0, length: 24, value); + } + + /// + public int Mask + { + get => BitFields.ExtractRange(_mask, start: 24, length: 8); + set => BitFields.SetRange(ref _mask, start: 24, length: 8, value); + } + + /// + public int InstanceShaderBindingTableRecordOffset + { + get => BitFields.ExtractRange(_instanceShaderBindingTableRecordOffset, start: 0, length: 24); + set => BitFields.SetRange(ref _instanceShaderBindingTableRecordOffset, start: 0, length: 24, value); + } + + /// + public VkGeometryInstanceFlagsKHR Flags + { + get => BitFields.ExtractRange(_flags, start: 24, length: 8); + set => BitFields.SetRange(ref _flags, start: 24, length: 8, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapEXT.gen.cs new file mode 100644 index 0000000..0b6fd1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapEXT.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureTrianglesOpacityMicromapEXT - Structure specifying an opacity micromap in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureTrianglesOpacityMicromapEXT + /// + /// + /// The VkAccelerationStructureTrianglesOpacityMicromapEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkAccelerationStructureTrianglesOpacityMicromapEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkIndexType indexType; + /// VkDeviceOrHostAddressConstKHR indexBuffer; + /// VkDeviceSize indexStride; + /// uint32_t baseTriangle; + /// uint32_t usageCountsCount; + /// const VkMicromapUsageEXT* pUsageCounts; + /// const VkMicromapUsageEXT* const* ppUsageCounts; + /// VkMicromapEXT micromap; + /// } VkAccelerationStructureTrianglesOpacityMicromapEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkAccelerationStructureTrianglesOpacityMicromapEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureTrianglesOpacityMicromapEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IndexType is the type of triangle indices used when indexing this micromap. + /// + [FieldOffset(16)] + public VkIndexType IndexType; + + /// + /// IndexBuffer is a device or host address of memory containing the triangle indices. When indexType is VK_INDEX_TYPE_NONE_KHR it must be `NULL`. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressConstKHR IndexBuffer; + + /// + /// IndexStride is the byte stride between triangle indices. + /// + [FieldOffset(32)] + public ByteSize64 IndexStride; + + /// + /// BaseTriangle is the base value added to the non-negative triangle indices. + /// + [FieldOffset(40)] + public int BaseTriangle; + + /// + /// UsageCountsCount specifies the number of usage counts structures that will be used to determine the size of this micromap. + /// + [FieldOffset(44)] + public int UsageCountsCount; + + /// + /// UsageCounts is a pointer to an array of VkMicromapUsageEXT structures. + /// + [FieldOffset(48)] + public VkMicromapUsageEXT* UsageCounts; + + /// + /// ppUsageCounts is a pointer to an array of pointers to VkMicromapUsageEXT structures. + /// + [FieldOffset(56)] + public VkMicromapUsageEXT** ppUsageCounts; + + /// + /// Micromap is the handle to the micromap object to include in this geometry. + /// + [FieldOffset(64)] + public VkMicromapEXT Micromap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapKHR.gen.cs new file mode 100644 index 0000000..d68c1ee --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureTrianglesOpacityMicromapKHR.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureTrianglesOpacityMicromapKHR - Structure specifying an opacity micromap in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkAccelerationStructureTrianglesOpacityMicromapKHR + /// + /// + /// The VkAccelerationStructureTrianglesOpacityMicromapKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef struct VkAccelerationStructureTrianglesOpacityMicromapKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkIndexType indexType; + /// VkDeviceAddress indexBuffer; + /// VkDeviceSize indexStride; + /// uint32_t baseTriangle; + /// VkAccelerationStructureKHR micromap; + /// } VkAccelerationStructureTrianglesOpacityMicromapKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkAccelerationStructureTrianglesOpacityMicromapKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureTrianglesOpacityMicromapKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IndexType is the type of triangle indices used when indexing this micromap + /// + [FieldOffset(16)] + public VkIndexType IndexType; + + /// + /// IndexBuffer is the address containing the triangle indices + /// + [FieldOffset(24)] + public VkDeviceAddress IndexBuffer; + + /// + /// IndexStride is the byte stride between triangle indices + /// + [FieldOffset(32)] + public ByteSize64 IndexStride; + + /// + /// BaseTriangle is the base value added to the non-negative triangle indices + /// + [FieldOffset(40)] + public int BaseTriangle; + + /// + /// Micromap is the handle to the micromap object to include in this geometry + /// + [FieldOffset(48)] + public VkAccelerationStructureKHR Micromap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureVersionInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureVersionInfoKHR.gen.cs new file mode 100644 index 0000000..d7ce605 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAccelerationStructureVersionInfoKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAccelerationStructureVersionInfoKHR - Acceleration structure version information + /// + /// + /// + /// :refpage: VkAccelerationStructureVersionKHR + /// + /// + /// The VkAccelerationStructureVersionInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkAccelerationStructureVersionInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const uint8_t* pVersionData; + /// } VkAccelerationStructureVersionInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAccelerationStructureVersionInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AccelerationStructureVersionInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VersionData is a pointer to the version header of an acceleration structure as defined in vkCmdCopyAccelerationStructureToMemoryKHR + /// + [FieldOffset(16)] + public byte* VersionData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAcquireNextImageInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAcquireNextImageInfoKHR.gen.cs new file mode 100644 index 0000000..5a8f6af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAcquireNextImageInfoKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAcquireNextImageInfoKHR - Structure specifying parameters of the acquire + /// + /// + /// + /// The VkAcquireNextImageInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// typedef struct VkAcquireNextImageInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSwapchainKHR swapchain; + /// uint64_t timeout; + /// VkSemaphore semaphore; + /// VkFence fence; + /// uint32_t deviceMask; + /// } VkAcquireNextImageInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkAcquireNextImageInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AcquireNextImageInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Swapchain is a non-retired swapchain from which an image is acquired. + /// + [FieldOffset(16)] + public VkSwapchainKHR Swapchain; + + /// + /// Timeout specifies how long the function waits, in nanoseconds, if no image is available. + /// + [FieldOffset(24)] + public nint Timeout; + + /// + /// Semaphore is VK_NULL_HANDLE or a semaphore that defines a semaphore signal operation^. + /// + [FieldOffset(32)] + public VkSemaphore Semaphore; + + /// + /// Fence is VK_NULL_HANDLE or a fence to signal. + /// + [FieldOffset(40)] + public VkFence Fence; + + /// + /// DeviceMask is a mask of physical devices for which the swapchain image will be ready to use when the semaphore or fence is signaled. + /// + [FieldOffset(48)] + public int DeviceMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAcquireProfilingLockInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAcquireProfilingLockInfoKHR.gen.cs new file mode 100644 index 0000000..02f03a9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAcquireProfilingLockInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAcquireProfilingLockInfoKHR - Structure specifying parameters to acquire the profiling lock + /// + /// + /// + /// The VkAcquireProfilingLockInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkAcquireProfilingLockInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAcquireProfilingLockFlagsKHR flags; + /// uint64_t timeout; + /// } VkAcquireProfilingLockInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAcquireProfilingLockInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AcquireProfilingLockInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkAcquireProfilingLockFlagsKHR Flags; + + /// + /// Timeout indicates how long the function waits, in nanoseconds, if the profiling lock is not available. + /// + [FieldOffset(24)] + public nint Timeout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAllocationCallbacks.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAllocationCallbacks.gen.cs new file mode 100644 index 0000000..42c53ea --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAllocationCallbacks.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAllocationCallbacks - Structure containing callback function pointers for memory allocation + /// + /// + /// + /// Allocators are provided by the application as a pointer to a + /// VkAllocationCallbacks structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkAllocationCallbacks { + /// void* pUserData; + /// PFN_vkAllocationFunction pfnAllocation; + /// PFN_vkReallocationFunction pfnReallocation; + /// PFN_vkFreeFunction pfnFree; + /// PFN_vkInternalAllocationNotification pfnInternalAllocation; + /// PFN_vkInternalFreeNotification pfnInternalFree; + /// } VkAllocationCallbacks; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkAllocationCallbacks() + { + /// + /// UserData + /// + [FieldOffset(0)] + public void* UserData; + + /// + /// PfnAllocation + /// + [FieldOffset(8)] + public PfnVkAllocationFunction PfnAllocation; + + /// + /// PfnReallocation + /// + [FieldOffset(16)] + public PfnVkReallocationFunction PfnReallocation; + + /// + /// PfnFree + /// + [FieldOffset(24)] + public PfnVkFreeFunction PfnFree; + + /// + /// PfnInternalAllocation + /// + [FieldOffset(32)] + public PfnVkInternalAllocationNotification PfnInternalAllocation; + + /// + /// PfnInternalFree + /// + [FieldOffset(40)] + public PfnVkInternalFreeNotification PfnInternalFree; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAmigoProfilingSubmitInfoSEC.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAmigoProfilingSubmitInfoSEC.gen.cs new file mode 100644 index 0000000..c731728 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAmigoProfilingSubmitInfoSEC.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAmigoProfilingSubmitInfoSEC - Stub description of VkAmigoProfilingSubmitInfoSEC + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_SEC_amigo_profiling + /// typedef struct VkAmigoProfilingSubmitInfoSEC { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t firstDrawTimestamp; + /// uint64_t swapBufferTimestamp; + /// } VkAmigoProfilingSubmitInfoSEC; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAmigoProfilingSubmitInfoSEC() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AmigoProfilingSubmitInfoSEC; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FirstDrawTimestamp + /// + [FieldOffset(16)] + public nint FirstDrawTimestamp; + + /// + /// SwapBufferTimestamp + /// + [FieldOffset(24)] + public nint SwapBufferTimestamp; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAntiLagDataAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAntiLagDataAMD.gen.cs new file mode 100644 index 0000000..c0aab06 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAntiLagDataAMD.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAntiLagDataAMD - Structure specifying the parameters for vkAntiLagUpdateAMD + /// + /// + /// + /// The VkAntiLagDataAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_anti_lag + /// typedef struct VkAntiLagDataAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkAntiLagModeAMD mode; + /// uint32_t maxFPS; + /// const VkAntiLagPresentationInfoAMD* pPresentationInfo; + /// } VkAntiLagDataAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAntiLagDataAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AntiLagDataAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Mode is a VkAntiLagModeAMD value specifying the anti-lag status. + /// + [FieldOffset(16)] + public VkAntiLagModeAMD Mode; + + /// + /// MaxFPS is the framerate limit, in frames per second, used by the application. This limit will be imposed if anti-lag is enabled. If the application tries to render faster, the framerate will be reduced to match this limit. A value of 0 will disable the limit. + /// + [FieldOffset(20)] + public int MaxFPS; + + /// + /// PresentationInfo is a pointer to a VkAntiLagPresentationInfoAMD structure containing information about the application stage. + /// + [FieldOffset(24)] + public VkAntiLagPresentationInfoAMD* PresentationInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAntiLagPresentationInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAntiLagPresentationInfoAMD.gen.cs new file mode 100644 index 0000000..d149570 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAntiLagPresentationInfoAMD.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAntiLagPresentationInfoAMD - Structure specifying information about stage + /// + /// + /// + /// The VkAntiLagPresentationInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_anti_lag + /// typedef struct VkAntiLagPresentationInfoAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkAntiLagStageAMD stage; + /// uint64_t frameIndex; + /// } VkAntiLagPresentationInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAntiLagPresentationInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AntiLagPresentationInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Stage is a VkAntiLagStageAMD value specifying the current application stage. + /// + [FieldOffset(16)] + public VkAntiLagStageAMD Stage; + + /// + /// FrameIndex is set just before the application processes input data (VK_ANTI_LAG_STAGE_INPUT_AMD). The same frameIndex value should be set before the frame with current input data will be presented by vkQueuePresentKHR (VK_ANTI_LAG_STAGE_PRESENT_AMD). This should be done for each frame. + /// + [FieldOffset(24)] + public nint FrameIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkApplicationInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkApplicationInfo.gen.cs new file mode 100644 index 0000000..836b283 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkApplicationInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkApplicationInfo - Structure specifying application information + /// + /// + /// + /// The VkApplicationInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkApplicationInfo { + /// VkStructureType sType; + /// const void* pNext; + /// const char* pApplicationName; + /// uint32_t applicationVersion; + /// const char* pEngineName; + /// uint32_t engineVersion; + /// uint32_t apiVersion; + /// } VkApplicationInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkApplicationInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ApplicationInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ApplicationName is `NULL` or is a pointer to a null-terminated UTF-8 string containing the name of the application. + /// + [FieldOffset(16)] + public byte* ApplicationName; + + /// + /// ApplicationVersion is an unsigned integer variable containing the developer-supplied version number of the application. + /// + [FieldOffset(24)] + public int ApplicationVersion; + + /// + /// EngineName is `NULL` or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application. + /// + [FieldOffset(32)] + public byte* EngineName; + + /// + /// EngineVersion is an unsigned integer variable containing the developer-supplied version number of the engine used to create the application. + /// + [FieldOffset(40)] + public int EngineVersion; + + /// + /// ApiVersion is the version of the Vulkan API against which the application expects to run, encoded as described in here. If apiVersion is 0 the implementation must ignore it, otherwise if the implementation does not support the requested apiVersion, or an effective substitute for apiVersion, it must return VK_ERROR_INCOMPATIBLE_DRIVER. The patch version number specified in apiVersion is ignored when creating an instance object. The variant version of the instance must match that requested in apiVersion. + /// + [FieldOffset(44)] + public int ApiVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentDescription.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentDescription.gen.cs new file mode 100644 index 0000000..658de29 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentDescription.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentDescription - Structure specifying an attachment description + /// + /// + /// + /// :refpage: VkAttachmentDescription + /// + /// + /// The VkAttachmentDescription structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkAttachmentDescription { + /// VkAttachmentDescriptionFlags flags; + /// VkFormat format; + /// VkSampleCountFlagBits samples; + /// VkAttachmentLoadOp loadOp; + /// VkAttachmentStoreOp storeOp; + /// VkAttachmentLoadOp stencilLoadOp; + /// VkAttachmentStoreOp stencilStoreOp; + /// VkImageLayout initialLayout; + /// VkImageLayout finalLayout; + /// } VkAttachmentDescription; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 36)] + public partial struct VkAttachmentDescription() + { + /// + /// Flags is a bitmask of VkAttachmentDescriptionFlags specifying additional properties of the attachment. + /// + [FieldOffset(0)] + public VkAttachmentDescriptionFlags Flags; + + /// + /// Format is a VkFormat value specifying the format of the image view that will be used for the attachment. + /// + [FieldOffset(4)] + public VkFormat Format; + + /// + /// Samples is a VkSampleCountFlags value specifying the number of samples of the image. + /// + [FieldOffset(8)] + public VkSampleCountFlags Samples; + + /// + /// LoadOp is a VkAttachmentLoadOp value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used. + /// + [FieldOffset(12)] + public VkAttachmentLoadOp LoadOp; + + /// + /// StoreOp is a VkAttachmentStoreOp value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used. + /// + [FieldOffset(16)] + public VkAttachmentStoreOp StoreOp; + + /// + /// StencilLoadOp is a VkAttachmentLoadOp value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used. + /// + [FieldOffset(20)] + public VkAttachmentLoadOp StencilLoadOp; + + /// + /// StencilStoreOp is a VkAttachmentStoreOp value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used. + /// + [FieldOffset(24)] + public VkAttachmentStoreOp StencilStoreOp; + + /// + /// InitialLayout is the layout the attachment image subresource will be in when a render pass instance begins. + /// + [FieldOffset(28)] + public VkImageLayout InitialLayout; + + /// + /// FinalLayout is the layout the attachment image subresource will be transitioned to when a render pass instance ends. + /// + [FieldOffset(32)] + public VkImageLayout FinalLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentDescription2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentDescription2.gen.cs new file mode 100644 index 0000000..1a48510 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentDescription2.gen.cs @@ -0,0 +1,99 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentDescription2 - Structure specifying an attachment description + /// + /// + /// + /// :refpage: VkAttachmentDescription2 + /// + /// + /// The VkAttachmentDescription2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkAttachmentDescription2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkAttachmentDescriptionFlags flags; + /// VkFormat format; + /// VkSampleCountFlagBits samples; + /// VkAttachmentLoadOp loadOp; + /// VkAttachmentStoreOp storeOp; + /// VkAttachmentLoadOp stencilLoadOp; + /// VkAttachmentStoreOp stencilStoreOp; + /// VkImageLayout initialLayout; + /// VkImageLayout finalLayout; + /// } VkAttachmentDescription2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkAttachmentDescription2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AttachmentDescription2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkAttachmentDescriptionFlags specifying additional properties of the attachment. + /// + [FieldOffset(16)] + public VkAttachmentDescriptionFlags Flags; + + /// + /// Format is a VkFormat value specifying the format of the image that will be used for the attachment. + /// + [FieldOffset(20)] + public VkFormat Format; + + /// + /// Samples is a VkSampleCountFlags value specifying the number of samples of the image. + /// + [FieldOffset(24)] + public VkSampleCountFlags Samples; + + /// + /// LoadOp is a VkAttachmentLoadOp value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used. + /// + [FieldOffset(28)] + public VkAttachmentLoadOp LoadOp; + + /// + /// StoreOp is a VkAttachmentStoreOp value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used. + /// + [FieldOffset(32)] + public VkAttachmentStoreOp StoreOp; + + /// + /// StencilLoadOp is a VkAttachmentLoadOp value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used. + /// + [FieldOffset(36)] + public VkAttachmentLoadOp StencilLoadOp; + + /// + /// StencilStoreOp is a VkAttachmentStoreOp value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used. + /// + [FieldOffset(40)] + public VkAttachmentStoreOp StencilStoreOp; + + /// + /// InitialLayout is the layout the attachment image subresource will be in when a render pass instance begins. + /// + [FieldOffset(44)] + public VkImageLayout InitialLayout; + + /// + /// FinalLayout is the layout the attachment image subresource will be transitioned to when a render pass instance ends. + /// + [FieldOffset(48)] + public VkImageLayout FinalLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentDescriptionStencilLayout.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentDescriptionStencilLayout.gen.cs new file mode 100644 index 0000000..fef4189 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentDescriptionStencilLayout.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentDescriptionStencilLayout - Structure specifying an attachment description + /// + /// + /// + /// The VkAttachmentDescriptionStencilLayout structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkAttachmentDescriptionStencilLayout { + /// VkStructureType sType; + /// void* pNext; + /// VkImageLayout stencilInitialLayout; + /// VkImageLayout stencilFinalLayout; + /// } VkAttachmentDescriptionStencilLayout; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAttachmentDescriptionStencilLayout() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AttachmentDescriptionStencilLayout; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StencilInitialLayout is the layout the stencil aspect of the attachment image subresource will be in when a render pass instance begins. + /// + [FieldOffset(16)] + public VkImageLayout StencilInitialLayout; + + /// + /// StencilFinalLayout is the layout the stencil aspect of the attachment image subresource will be transitioned to when a render pass instance ends. + /// + [FieldOffset(20)] + public VkImageLayout StencilFinalLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentFeedbackLoopInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentFeedbackLoopInfoEXT.gen.cs new file mode 100644 index 0000000..0b09d51 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentFeedbackLoopInfoEXT.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentFeedbackLoopInfoEXT - Structure specifying whether feedback loop is enabled for an attachment + /// + /// + /// + /// To enable feedback loop^ for an attachment, the + /// VkAttachmentFeedbackLoopInfoEXT structure can be added to the + /// pNext chain of VkRenderingAttachmentInfo. + /// + /// + /// The VkAttachmentFeedbackLoopInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_KHR_unified_image_layouts with VK_EXT_attachment_feedback_loop_layout and (VK_VERSION_1_3 or VK_KHR_dynamic_rendering) + /// typedef struct VkAttachmentFeedbackLoopInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 feedbackLoopEnable; + /// } VkAttachmentFeedbackLoopInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAttachmentFeedbackLoopInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AttachmentFeedbackLoopInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FeedbackLoopEnable specifies that feedback loop is enabled^ for the attachment identified by VkRenderingAttachmentInfo::imageView. + /// + [FieldOffset(16)] + public Brutal.Bool32 FeedbackLoopEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentReference.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentReference.gen.cs new file mode 100644 index 0000000..b99e370 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentReference.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentReference - Structure specifying an attachment reference + /// + /// + /// + /// :refpage: VkAttachmentReference + /// + /// + /// The VkAttachmentReference structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkAttachmentReference { + /// uint32_t attachment; + /// VkImageLayout layout; + /// } VkAttachmentReference; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkAttachmentReference() + { + /// + /// Attachment is either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo::pAttachments, or VK_ATTACHMENT_UNUSED to signify that this attachment is not used. + /// + [FieldOffset(0)] + public int Attachment; + + /// + /// Layout is a VkImageLayout value specifying the layout the attachment uses during the subpass. + /// + [FieldOffset(4)] + public VkImageLayout Layout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentReference2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentReference2.gen.cs new file mode 100644 index 0000000..d0541ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentReference2.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentReference2 - Structure specifying an attachment reference + /// + /// + /// + /// :refpage: VkAttachmentReference2 + /// + /// + /// The VkAttachmentReference2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkAttachmentReference2 { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t attachment; + /// VkImageLayout layout; + /// VkImageAspectFlags aspectMask; + /// } VkAttachmentReference2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkAttachmentReference2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AttachmentReference2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Attachment is either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo2::pAttachments, or VK_ATTACHMENT_UNUSED to signify that this attachment is not used. + /// + [FieldOffset(16)] + public int Attachment; + + /// + /// Layout is a VkImageLayout value specifying the layout the attachment uses during the subpass. + /// + [FieldOffset(20)] + public VkImageLayout Layout; + + /// + /// AspectMask is a mask of which aspect(s) can be accessed within the specified subpass as an input attachment. + /// + [FieldOffset(24)] + public VkImageAspectFlags AspectMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentReferenceStencilLayout.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentReferenceStencilLayout.gen.cs new file mode 100644 index 0000000..440cf04 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentReferenceStencilLayout.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentReferenceStencilLayout - Structure specifying an attachment description + /// + /// + /// + /// The VkAttachmentReferenceStencilLayout structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkAttachmentReferenceStencilLayout { + /// VkStructureType sType; + /// void* pNext; + /// VkImageLayout stencilLayout; + /// } VkAttachmentReferenceStencilLayout; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkAttachmentReferenceStencilLayout() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AttachmentReferenceStencilLayout; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StencilLayout is a VkImageLayout value specifying the layout the stencil aspect of the attachment uses during the subpass. + /// + [FieldOffset(16)] + public VkImageLayout StencilLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentSampleCountInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentSampleCountInfoAMD.gen.cs new file mode 100644 index 0000000..28aee25 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentSampleCountInfoAMD.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentSampleCountInfoAMD - Structure specifying command buffer inheritance info for dynamic render pass instances + /// + /// + /// + /// The + /// structure is defined as: + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkAttachmentSampleCountInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.AttachmentSampleCountInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ColorAttachmentCount is the number of color attachments specified in a render pass instance. + /// + [FieldOffset(16)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentSamples is a pointer to an array of VkSampleCountFlags values defining the sample count of color attachments. + /// + [FieldOffset(24)] + public VkSampleCountFlags* ColorAttachmentSamples; + + /// + /// DepthStencilAttachmentSamples is a VkSampleCountFlags value defining the sample count of a depth/stencil attachment. + /// + [FieldOffset(32)] + public VkSampleCountFlags DepthStencilAttachmentSamples; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkAttachmentSampleLocationsEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkAttachmentSampleLocationsEXT.gen.cs new file mode 100644 index 0000000..72215b8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkAttachmentSampleLocationsEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkAttachmentSampleLocationsEXT - Structure specifying the sample locations state to use in the initial layout transition of attachments + /// + /// + /// + /// The VkAttachmentSampleLocationsEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkAttachmentSampleLocationsEXT { + /// uint32_t attachmentIndex; + /// VkSampleLocationsInfoEXT sampleLocationsInfo; + /// } VkAttachmentSampleLocationsEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct VkAttachmentSampleLocationsEXT() + { + /// + /// AttachmentIndex is the index of the attachment for which the sample locations state is provided. + /// + [FieldOffset(0)] + public int AttachmentIndex; + + /// + /// SampleLocationsInfo is the sample locations state to use for the layout transition of the given attachment from the initial layout of the attachment to the image layout specified for the attachment in the first subpass using it. + /// + [FieldOffset(8)] + public VkSampleLocationsInfoEXT SampleLocationsInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBaseInStructure.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBaseInStructure.gen.cs new file mode 100644 index 0000000..ea13dc6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBaseInStructure.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBaseInStructure - Base structure for a read-only pointer chain + /// + /// + /// + /// The VkBaseInStructure structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBaseInStructure { + /// VkStructureType sType; + /// const struct VkBaseInStructure* pNext; + /// } VkBaseInStructure; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkBaseInStructure() + { + /// + /// sType is the structure type of the structure being iterated through. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType; + + /// + /// Next is `NULL` or a pointer to the next structure in a structure chain. + /// + [FieldOffset(8)] + public VkBaseInStructure* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBaseOutStructure.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBaseOutStructure.gen.cs new file mode 100644 index 0000000..8f8e909 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBaseOutStructure.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBaseOutStructure - Base structure for a read-only pointer chain + /// + /// + /// + /// The VkBaseOutStructure structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBaseOutStructure { + /// VkStructureType sType; + /// struct VkBaseOutStructure* pNext; + /// } VkBaseOutStructure; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkBaseOutStructure() + { + /// + /// sType is the structure type of the structure being iterated through. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType; + + /// + /// Next is `NULL` or a pointer to the next structure in a structure chain. + /// + [FieldOffset(8)] + public VkBaseOutStructure* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBeginCustomResolveInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBeginCustomResolveInfoEXT.gen.cs new file mode 100644 index 0000000..beac97e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBeginCustomResolveInfoEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBeginCustomResolveInfoEXT - Structure specifying shader resolve information + /// + /// + /// + /// The VkBeginCustomResolveInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// typedef struct VkBeginCustomResolveInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// } VkBeginCustomResolveInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkBeginCustomResolveInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BeginCustomResolveInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindAccelerationStructureMemoryInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindAccelerationStructureMemoryInfoNV.gen.cs new file mode 100644 index 0000000..34c935b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindAccelerationStructureMemoryInfoNV.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindAccelerationStructureMemoryInfoNV - Structure specifying acceleration structure memory binding + /// + /// + /// + /// :refpage: VkBindAccelerationStructureMemoryInfoNV + /// + /// + /// The VkBindAccelerationStructureMemoryInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkBindAccelerationStructureMemoryInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureNV accelerationStructure; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// uint32_t deviceIndexCount; + /// const uint32_t* pDeviceIndices; + /// } VkBindAccelerationStructureMemoryInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkBindAccelerationStructureMemoryInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindAccelerationStructureMemoryInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructure is the acceleration structure to be attached to memory. + /// + [FieldOffset(16)] + public VkAccelerationStructureNV AccelerationStructure; + + /// + /// Memory is a VkDeviceMemory object describing the device memory to attach. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the start offset of the region of memory that is to be bound to the acceleration structure. The number of bytes returned in the VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified acceleration structure. + /// + [FieldOffset(32)] + public ByteSize64 MemoryOffset; + + /// + /// DeviceIndexCount is the number of elements in pDeviceIndices. + /// + [FieldOffset(40)] + public int DeviceIndexCount; + + /// + /// DeviceIndices is a pointer to an array of device indices. + /// + [FieldOffset(48)] + public int* DeviceIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryDeviceGroupInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryDeviceGroupInfo.gen.cs new file mode 100644 index 0000000..f4480ec --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryDeviceGroupInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindBufferMemoryDeviceGroupInfo - Structure specifying device within a group to bind to + /// + /// + /// + /// The VkBindBufferMemoryDeviceGroupInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkBindBufferMemoryDeviceGroupInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t deviceIndexCount; + /// const uint32_t* pDeviceIndices; + /// } VkBindBufferMemoryDeviceGroupInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkBindBufferMemoryDeviceGroupInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindBufferMemoryDeviceGroupInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceIndexCount is the number of elements in pDeviceIndices. + /// + [FieldOffset(16)] + public int DeviceIndexCount; + + /// + /// DeviceIndices is a pointer to an array of device indices. + /// + [FieldOffset(24)] + public int* DeviceIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryInfo.gen.cs new file mode 100644 index 0000000..94b1536 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindBufferMemoryInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindBufferMemoryInfo - Structure specifying how to bind a buffer to memory + /// + /// + /// + /// :refpage: VkBindBufferMemoryInfo + /// + /// + /// VkBindBufferMemoryInfo contains members corresponding to the + /// parameters of vkBindBufferMemory. + /// + /// + /// The VkBindBufferMemoryInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkBindBufferMemoryInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer buffer; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// } VkBindBufferMemoryInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBindBufferMemoryInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindBufferMemoryInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer is the buffer to be attached to memory. + /// + [FieldOffset(16)] + public VkBuffer Buffer; + + /// + /// Memory is a VkDeviceMemory object describing the device memory to attach. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the start offset of the region of memory which is to be bound to the buffer. The number of bytes returned in the VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified buffer. + /// + [FieldOffset(32)] + public ByteSize64 MemoryOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindDataGraphPipelineSessionMemoryInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindDataGraphPipelineSessionMemoryInfoARM.gen.cs new file mode 100644 index 0000000..2496826 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindDataGraphPipelineSessionMemoryInfoARM.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindDataGraphPipelineSessionMemoryInfoARM - Structure describing how to bind a data graph pipeline session to memory + /// + /// + /// + /// :refpage: VkBindDataGraphPipelineSessionMemoryInfoARM + /// + /// + /// The VkBindDataGraphPipelineSessionMemoryInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkBindDataGraphPipelineSessionMemoryInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDataGraphPipelineSessionARM session; + /// VkDataGraphPipelineSessionBindPointARM bindPoint; + /// uint32_t objectIndex; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// } VkBindDataGraphPipelineSessionMemoryInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkBindDataGraphPipelineSessionMemoryInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindDataGraphPipelineSessionMemoryInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Session is the data graph pipeline session to be attached to memory. + /// + [FieldOffset(16)] + public VkDataGraphPipelineSessionARM Session; + + /// + /// BindPoint is the data graph pipeline session bind point to which memory is to be attached. + /// + [FieldOffset(24)] + public VkDataGraphPipelineSessionBindPointARM BindPoint; + + /// + /// ObjectIndex is the index of the object for bindPoint at which memory is to be attached. + /// + [FieldOffset(28)] + public int ObjectIndex; + + /// + /// Memory is a VkDeviceMemory object describing the device memory to attach. + /// + [FieldOffset(32)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the start offset of the resion of memory which is to be bound to the data graph pipeline session. + /// + [FieldOffset(40)] + public ByteSize64 MemoryOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.gen.cs new file mode 100644 index 0000000..70ac363 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindDescriptorBufferEmbeddedSamplersInfoEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindDescriptorBufferEmbeddedSamplersInfoEXT - Structure specifying embedded immutable sampler offsets to set in a command buffer + /// + /// + /// + /// :refpage: VkBindDescriptorBufferEmbeddedSamplersInfoEXT + /// + /// + /// The VkBindDescriptorBufferEmbeddedSamplersInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer + /// typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderStageFlags stageFlags; + /// VkPipelineLayout layout; + /// uint32_t set; + /// } VkBindDescriptorBufferEmbeddedSamplersInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindDescriptorBufferEmbeddedSamplersInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StageFlags is a bitmask of VkShaderStageFlags specifying the shader stages that will use the embedded immutable samplers. + /// + [FieldOffset(16)] + public VkShaderStageFlags StageFlags; + + /// + /// Layout is a VkPipelineLayout object used to program the bindings. + /// + [FieldOffset(24)] + public VkPipelineLayout Layout; + + /// + /// Set is the number of the set to be bound. + /// + [FieldOffset(32)] + public int Set; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindDescriptorSetsInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindDescriptorSetsInfo.gen.cs new file mode 100644 index 0000000..954eb2c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindDescriptorSetsInfo.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindDescriptorSetsInfo - Structure specifying a descriptor set binding operation + /// + /// + /// + /// :refpage: VkBindDescriptorSetsInfo + /// + /// + /// The VkBindDescriptorSetsInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkBindDescriptorSetsInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderStageFlags stageFlags; + /// VkPipelineLayout layout; + /// uint32_t firstSet; + /// uint32_t descriptorSetCount; + /// const VkDescriptorSet* pDescriptorSets; + /// uint32_t dynamicOffsetCount; + /// const uint32_t* pDynamicOffsets; + /// } VkBindDescriptorSetsInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkBindDescriptorSetsInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindDescriptorSetsInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StageFlags is a bitmask of VkShaderStageFlags specifying the shader stages the descriptor sets will be bound to. + /// + [FieldOffset(16)] + public VkShaderStageFlags StageFlags; + + /// + /// Layout is a VkPipelineLayout object used to program the bindings. + /// + [FieldOffset(24)] + public VkPipelineLayout Layout; + + /// + /// FirstSet is the set number of the first descriptor set to be bound. + /// + [FieldOffset(32)] + public int FirstSet; + + /// + /// DescriptorSetCount is the number of elements in the pDescriptorSets array. + /// + [FieldOffset(36)] + public int DescriptorSetCount; + + /// + /// DescriptorSets is a pointer to an array of handles to VkDescriptorSet objects describing the descriptor sets to bind to. + /// + [FieldOffset(40)] + public VkDescriptorSet* DescriptorSets; + + /// + /// DynamicOffsetCount is the number of dynamic offsets in the pDynamicOffsets array. + /// + [FieldOffset(48)] + public int DynamicOffsetCount; + + /// + /// DynamicOffsets is a pointer to an array of uint32_t values specifying dynamic offsets. + /// + [FieldOffset(56)] + public int* DynamicOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindHeapInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindHeapInfoEXT.gen.cs new file mode 100644 index 0000000..71fbfbc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindHeapInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindHeapInfoEXT - Structure describing a device address range and implementation reservation for a descriptor heap + /// + /// + /// + /// VkBindHeapInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkBindHeapInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeEXT heapRange; + /// VkDeviceSize reservedRangeOffset; + /// VkDeviceSize reservedRangeSize; + /// } VkBindHeapInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkBindHeapInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindHeapInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HeapRange is a VkDeviceAddressRangeKHR defining the device address range used for the heap, inclusive of the implementation reserved range. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeEXT HeapRange; + + /// + /// ReservedRangeOffset is the offset within heapRange to the start of the reserved range for the implementation. + /// + [FieldOffset(32)] + public ByteSize64 ReservedRangeOffset; + + /// + /// ReservedRangeSize is the size of the reserved range for the implementation within heapRange. + /// + [FieldOffset(40)] + public ByteSize64 ReservedRangeSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindImageMemoryDeviceGroupInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindImageMemoryDeviceGroupInfo.gen.cs new file mode 100644 index 0000000..f755976 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindImageMemoryDeviceGroupInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindImageMemoryDeviceGroupInfo - Structure specifying device within a group to bind to + /// + /// + /// + /// The VkBindImageMemoryDeviceGroupInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkBindImageMemoryDeviceGroupInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t deviceIndexCount; + /// const uint32_t* pDeviceIndices; + /// uint32_t splitInstanceBindRegionCount; + /// const VkRect2D* pSplitInstanceBindRegions; + /// } VkBindImageMemoryDeviceGroupInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkBindImageMemoryDeviceGroupInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindImageMemoryDeviceGroupInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceIndexCount is the number of elements in pDeviceIndices. + /// + [FieldOffset(16)] + public int DeviceIndexCount; + + /// + /// DeviceIndices is a pointer to an array of device indices. + /// + [FieldOffset(24)] + public int* DeviceIndices; + + /// + /// SplitInstanceBindRegionCount is the number of elements in pSplitInstanceBindRegions. + /// + [FieldOffset(32)] + public int SplitInstanceBindRegionCount; + + /// + /// SplitInstanceBindRegions is a pointer to an array of VkRect2D structures describing which regions of the image are attached to each instance of memory. + /// + [FieldOffset(40)] + public VkRect2D* SplitInstanceBindRegions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindImageMemoryInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindImageMemoryInfo.gen.cs new file mode 100644 index 0000000..2cc59f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindImageMemoryInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindImageMemoryInfo - Structure specifying how to bind an image to memory + /// + /// + /// + /// :refpage: VkBindImageMemoryInfo + /// + /// + /// VkBindImageMemoryInfo contains members corresponding to the parameters + /// of vkBindImageMemory. + /// + /// + /// The VkBindImageMemoryInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkBindImageMemoryInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// } VkBindImageMemoryInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBindImageMemoryInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindImageMemoryInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is the image to be attached to memory. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// Memory is a VkDeviceMemory object describing the device memory to attach. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the start offset of the region of memory which is to be bound to the image. The number of bytes returned in the VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified image. + /// + [FieldOffset(32)] + public ByteSize64 MemoryOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindImageMemorySwapchainInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindImageMemorySwapchainInfoKHR.gen.cs new file mode 100644 index 0000000..445105a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindImageMemorySwapchainInfoKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindImageMemorySwapchainInfoKHR - Structure specifying swapchain image memory to bind to + /// + /// + /// + /// If the pNext chain of VkBindImageMemoryInfo includes a + /// VkBindImageMemorySwapchainInfoKHR structure, then that structure + /// includes a swapchain handle and image index indicating that the image will + /// be bound to memory from that swapchain. + /// + /// + /// The VkBindImageMemorySwapchainInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// typedef struct VkBindImageMemorySwapchainInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSwapchainKHR swapchain; + /// uint32_t imageIndex; + /// } VkBindImageMemorySwapchainInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkBindImageMemorySwapchainInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindImageMemorySwapchainInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Swapchain is VK_NULL_HANDLE or a swapchain handle. + /// + [FieldOffset(16)] + public VkSwapchainKHR Swapchain; + + /// + /// ImageIndex is an image index within swapchain. + /// + [FieldOffset(24)] + public int ImageIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindImagePlaneMemoryInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindImagePlaneMemoryInfo.gen.cs new file mode 100644 index 0000000..90b9007 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindImagePlaneMemoryInfo.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindImagePlaneMemoryInfo - Structure specifying how to bind an image plane to memory + /// + /// + /// + /// In order to bind planes of a disjoint image, add a + /// VkBindImagePlaneMemoryInfo structure to the pNext chain of + /// VkBindImageMemoryInfo. + /// + /// + /// The VkBindImagePlaneMemoryInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkBindImagePlaneMemoryInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageAspectFlagBits planeAspect; + /// } VkBindImagePlaneMemoryInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBindImagePlaneMemoryInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindImagePlaneMemoryInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PlaneAspect is a VkImageAspectFlags value specifying the aspect of the disjoint image plane to bind. + /// + [FieldOffset(16)] + public VkImageAspectFlags PlaneAspect; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindIndexBuffer3InfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindIndexBuffer3InfoKHR.gen.cs new file mode 100644 index 0000000..45579e7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindIndexBuffer3InfoKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindIndexBuffer3InfoKHR - Index buffer binding info + /// + /// + /// + /// :refpage: VkBindIndexBuffer3InfoKHR + /// + /// + /// VkBindIndexBuffer3InfoKHR is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkBindIndexBuffer3InfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// VkIndexType indexType; + /// } VkBindIndexBuffer3InfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBindIndexBuffer3InfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindIndexBuffer3InfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is the VkDeviceAddressRangeKHR of the address range to bind. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(32)] + public VkAddressCommandFlagsKHR AddressFlags; + + /// + /// IndexType is a VkIndexType value specifying the size of the indices. + /// + [FieldOffset(36)] + public VkIndexType IndexType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandEXT.gen.cs new file mode 100644 index 0000000..65e560e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindIndexBufferIndirectCommandEXT - Structure specifying input data for a single index buffer command token + /// + /// + /// + /// The VkBindIndexBufferIndirectCommandEXT structure specifies the input + /// data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT token. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkBindIndexBufferIndirectCommandEXT { + /// VkDeviceAddress bufferAddress; + /// uint32_t size; + /// VkIndexType indexType; + /// } VkBindIndexBufferIndirectCommandEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkBindIndexBufferIndirectCommandEXT() + { + /// + /// BufferAddress specifies a physical address of the VkBuffer used as index buffer. + /// + [FieldOffset(0)] + public VkDeviceAddress BufferAddress; + + /// + /// Size is the byte size range which is available for this operation from the provided address. + /// + [FieldOffset(8)] + public int Size; + + /// + /// IndexType is a VkIndexType value specifying how indices are treated. + /// + [FieldOffset(12)] + public VkIndexType IndexType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandNV.gen.cs new file mode 100644 index 0000000..69c2af4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindIndexBufferIndirectCommandNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindIndexBufferIndirectCommandNV - Structure specifying input data for a single index buffer command token + /// + /// + /// + /// The VkBindIndexBufferIndirectCommandNV structure specifies the input + /// data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV token. + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkBindIndexBufferIndirectCommandNV { + /// VkDeviceAddress bufferAddress; + /// uint32_t size; + /// VkIndexType indexType; + /// } VkBindIndexBufferIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkBindIndexBufferIndirectCommandNV() + { + /// + /// BufferAddress specifies a physical address of the VkBuffer used as index buffer. + /// + [FieldOffset(0)] + public VkDeviceAddress BufferAddress; + + /// + /// Size is the byte size range which is available for this operation from the provided address. + /// + [FieldOffset(8)] + public int Size; + + /// + /// IndexType is a VkIndexType value specifying how indices are treated. Instead of the Vulkan enum values, a custom `uint32_t` value can be mapped to VkIndexType by specifying the VkIndirectCommandsLayoutTokenNV::pIndexTypes and VkIndirectCommandsLayoutTokenNV::pIndexTypeValues arrays. + /// + [FieldOffset(12)] + public VkIndexType IndexType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindMemoryStatus.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindMemoryStatus.gen.cs new file mode 100644 index 0000000..c2bae28 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindMemoryStatus.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindMemoryStatus - Structure specifying where to return memory binding status + /// + /// + /// + /// The VkBindMemoryStatus structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkBindMemoryStatus { + /// VkStructureType sType; + /// const void* pNext; + /// VkResult* pResult; + /// } VkBindMemoryStatus; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBindMemoryStatus() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindMemoryStatus; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Result is a pointer to a VkResult value. + /// + [FieldOffset(16)] + public VkResult* Result; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindPipelineIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindPipelineIndirectCommandNV.gen.cs new file mode 100644 index 0000000..5465855 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindPipelineIndirectCommandNV.gen.cs @@ -0,0 +1,27 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindPipelineIndirectCommandNV - Structure specifying input data for the compute pipeline dispatch token + /// + /// + /// + /// The VkBindPipelineIndirectCommandNV structure specifies the input data + /// for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV token. + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// typedef struct VkBindPipelineIndirectCommandNV { + /// VkDeviceAddress pipelineAddress; + /// } VkBindPipelineIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkBindPipelineIndirectCommandNV() + { + /// + /// PipelineAddress specifies the pipeline address of the compute pipeline that will be used in device generated rendering. + /// + [FieldOffset(0)] + public VkDeviceAddress PipelineAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindShaderGroupIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindShaderGroupIndirectCommandNV.gen.cs new file mode 100644 index 0000000..e5bbdff --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindShaderGroupIndirectCommandNV.gen.cs @@ -0,0 +1,27 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindShaderGroupIndirectCommandNV - Structure specifying input data for a single shader group command token + /// + /// + /// + /// The VkBindShaderGroupIndirectCommandNV structure specifies the input + /// data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV token. + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkBindShaderGroupIndirectCommandNV { + /// uint32_t groupIndex; + /// } VkBindShaderGroupIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkBindShaderGroupIndirectCommandNV() + { + /// + /// GroupIndex specifies which shader group of the current bound graphics pipeline is used. + /// + [FieldOffset(0)] + public int GroupIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindSparseInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindSparseInfo.gen.cs new file mode 100644 index 0000000..46522b1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindSparseInfo.gen.cs @@ -0,0 +1,103 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindSparseInfo - Structure specifying a sparse binding operation + /// + /// + /// + /// The VkBindSparseInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBindSparseInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t waitSemaphoreCount; + /// const VkSemaphore* pWaitSemaphores; + /// uint32_t bufferBindCount; + /// const VkSparseBufferMemoryBindInfo* pBufferBinds; + /// uint32_t imageOpaqueBindCount; + /// const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds; + /// uint32_t imageBindCount; + /// const VkSparseImageMemoryBindInfo* pImageBinds; + /// uint32_t signalSemaphoreCount; + /// const VkSemaphore* pSignalSemaphores; + /// } VkBindSparseInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkBindSparseInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindSparseInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WaitSemaphoreCount is the number of semaphores upon which to wait before executing the sparse binding operations for the batch. + /// + [FieldOffset(16)] + public int WaitSemaphoreCount; + + /// + /// WaitSemaphores is a pointer to an array of semaphores upon which to wait on before the sparse binding operations for this batch begin execution. If semaphores to wait on are provided, they define a semaphore wait operation^. + /// + [FieldOffset(24)] + public VkSemaphore* WaitSemaphores; + + /// + /// BufferBindCount is the number of sparse buffer bindings to perform in the batch. + /// + [FieldOffset(32)] + public int BufferBindCount; + + /// + /// BufferBinds is a pointer to an array of VkSparseBufferMemoryBindInfo structures. + /// + [FieldOffset(40)] + public VkSparseBufferMemoryBindInfo* BufferBinds; + + /// + /// ImageOpaqueBindCount is the number of opaque sparse image bindings to perform. + /// + [FieldOffset(48)] + public int ImageOpaqueBindCount; + + /// + /// ImageOpaqueBinds is a pointer to an array of VkSparseImageOpaqueMemoryBindInfo structures, indicating opaque sparse image bindings to perform. + /// + [FieldOffset(56)] + public VkSparseImageOpaqueMemoryBindInfo* ImageOpaqueBinds; + + /// + /// ImageBindCount is the number of sparse image bindings to perform. + /// + [FieldOffset(64)] + public int ImageBindCount; + + /// + /// ImageBinds is a pointer to an array of VkSparseImageMemoryBindInfo structures, indicating sparse image bindings to perform. + /// + [FieldOffset(72)] + public VkSparseImageMemoryBindInfo* ImageBinds; + + /// + /// SignalSemaphoreCount is the number of semaphores to be signaled once the sparse binding operations specified by the structure have completed execution. + /// + [FieldOffset(80)] + public int SignalSemaphoreCount; + + /// + /// SignalSemaphores is a pointer to an array of semaphores which will be signaled when the sparse binding operations for this batch have completed execution. If semaphores to be signaled are provided, they define a semaphore signal operation^. + /// + [FieldOffset(88)] + public VkSemaphore* SignalSemaphores; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindTensorMemoryInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindTensorMemoryInfoARM.gen.cs new file mode 100644 index 0000000..dae2398 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindTensorMemoryInfoARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindTensorMemoryInfoARM - Structure specifying how to bind a tensor to memory + /// + /// + /// + /// The VkBindTensorMemoryInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkBindTensorMemoryInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorARM tensor; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// } VkBindTensorMemoryInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBindTensorMemoryInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindTensorMemoryInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Tensor is the tensor to be attached to memory. + /// + [FieldOffset(16)] + public VkTensorARM Tensor; + + /// + /// Memory is a VkDeviceMemory object describing the device memory to attach. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the start offset of the region of memory which is to be bound to the tensor. The number of bytes returned in the VkMemoryRequirements::size member in memory, starting from memoryOffset bytes, will be bound to the specified tensor. + /// + [FieldOffset(32)] + public ByteSize64 MemoryOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindTransformFeedbackBuffer2InfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindTransformFeedbackBuffer2InfoEXT.gen.cs new file mode 100644 index 0000000..0c657ea --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindTransformFeedbackBuffer2InfoEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindTransformFeedbackBuffer2InfoEXT - Bind transform feedback buffer info + /// + /// + /// + /// :refpage: VkBindTransformFeedbackBuffer2InfoEXT + /// + /// + /// VkBindTransformFeedbackBuffer2InfoEXT is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback + /// typedef struct VkBindTransformFeedbackBuffer2InfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// } VkBindTransformFeedbackBuffer2InfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBindTransformFeedbackBuffer2InfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindTransformFeedbackBuffer2InfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is the VkDeviceAddressRangeKHR of the address range to use. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(32)] + public VkAddressCommandFlagsKHR AddressFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindVertexBuffer3InfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindVertexBuffer3InfoKHR.gen.cs new file mode 100644 index 0000000..c7135d4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindVertexBuffer3InfoKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindVertexBuffer3InfoKHR - Bind vertex buffer info + /// + /// + /// + /// :refpage: VkBindVertexBuffer3InfoKHR + /// + /// + /// VkBindVertexBuffer3InfoKHR is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkBindVertexBuffer3InfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 setStride; + /// VkStridedDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// } VkBindVertexBuffer3InfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkBindVertexBuffer3InfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindVertexBuffer3InfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SetStride is a basetype:VkBool32 value indicating whether addressRange.stride sets the stride for the buffer. If setStride is VK_TRUE, the dynamic stride is set for all attributes from this buffer. If setStride is VK_FALSE, the stride value is not set. + /// + [FieldOffset(16)] + public Brutal.Bool32 SetStride; + + /// + /// AddressRange is the VkStridedDeviceAddressRangeKHR of the address range to bind. + /// + [FieldOffset(24)] + public VkStridedDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(48)] + public VkAddressCommandFlagsKHR AddressFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandEXT.gen.cs new file mode 100644 index 0000000..a6485dc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindVertexBufferIndirectCommandEXT - Structure specifying input data for a single vertex buffer command token + /// + /// + /// + /// The VkBindVertexBufferIndirectCommandEXT structure specifies the input + /// data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT token. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkBindVertexBufferIndirectCommandEXT { + /// VkDeviceAddress bufferAddress; + /// uint32_t size; + /// uint32_t stride; + /// } VkBindVertexBufferIndirectCommandEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkBindVertexBufferIndirectCommandEXT() + { + /// + /// BufferAddress specifies a physical address of the VkBuffer used as vertex input binding. + /// + [FieldOffset(0)] + public VkDeviceAddress BufferAddress; + + /// + /// Size is the byte size range which is available for this operation from the provided address. + /// + [FieldOffset(8)] + public int Size; + + /// + /// Stride is the byte size stride for this vertex input binding as in VkVertexInputBindingDescription::stride. + /// + [FieldOffset(12)] + public int Stride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandNV.gen.cs new file mode 100644 index 0000000..40b0ced --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindVertexBufferIndirectCommandNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindVertexBufferIndirectCommandNV - Structure specifying input data for a single vertex buffer command token + /// + /// + /// + /// The VkBindVertexBufferIndirectCommandNV structure specifies the input + /// data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV token. + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkBindVertexBufferIndirectCommandNV { + /// VkDeviceAddress bufferAddress; + /// uint32_t size; + /// uint32_t stride; + /// } VkBindVertexBufferIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkBindVertexBufferIndirectCommandNV() + { + /// + /// BufferAddress specifies a physical address of the VkBuffer used as vertex input binding. + /// + [FieldOffset(0)] + public VkDeviceAddress BufferAddress; + + /// + /// Size is the byte size range which is available for this operation from the provided address. + /// + [FieldOffset(8)] + public int Size; + + /// + /// Stride is the byte size stride for this vertex input binding as in VkVertexInputBindingDescription::stride. It is only used if VkIndirectCommandsLayoutTokenNV::vertexDynamicStride was set, otherwise the stride is inherited from the current bound graphics pipeline. + /// + [FieldOffset(12)] + public int Stride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBindVideoSessionMemoryInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBindVideoSessionMemoryInfoKHR.gen.cs new file mode 100644 index 0000000..5e82dbe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBindVideoSessionMemoryInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBindVideoSessionMemoryInfoKHR - Structure specifying memory bindings for a video session object + /// + /// + /// + /// The VkBindVideoSessionMemoryInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkBindVideoSessionMemoryInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t memoryBindIndex; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// VkDeviceSize memorySize; + /// } VkBindVideoSessionMemoryInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkBindVideoSessionMemoryInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BindVideoSessionMemoryInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryBindIndex is the memory binding index to bind memory to. + /// + [FieldOffset(16)] + public int MemoryBindIndex; + + /// + /// Memory is the allocated device memory to be bound to the video session's memory binding with index memoryBindIndex. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the start offset of the region of memory which is to be bound. + /// + [FieldOffset(32)] + public ByteSize64 MemoryOffset; + + /// + /// MemorySize is the size in bytes of the region of memory, starting from memoryOffset bytes, to be bound. + /// + [FieldOffset(40)] + public ByteSize64 MemorySize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBlitImageCubicWeightsInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBlitImageCubicWeightsInfoQCOM.gen.cs new file mode 100644 index 0000000..b79f0fd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBlitImageCubicWeightsInfoQCOM.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBlitImageCubicWeightsInfoQCOM - Structure specifying image blit cubic weight info + /// + /// + /// + /// :refpage: VkBlitImageCubicWeightsInfoQCOM + /// + /// + /// The VkBlitImageCubicWeightsInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_filter_cubic_weights + /// typedef struct VkBlitImageCubicWeightsInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkCubicFilterWeightsQCOM cubicWeights; + /// } VkBlitImageCubicWeightsInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBlitImageCubicWeightsInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BlitImageCubicWeightsInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CubicWeights is a VkCubicFilterWeightsQCOM value controlling cubic filter weights for the blit. + /// + [FieldOffset(16)] + public VkCubicFilterWeightsQCOM CubicWeights; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBlitImageInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBlitImageInfo2.gen.cs new file mode 100644 index 0000000..8f1db6b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBlitImageInfo2.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBlitImageInfo2 - Structure specifying parameters of blit image command + /// + /// + /// + /// :refpage: VkBlitImageInfo2 + /// + /// + /// The VkBlitImageInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkBlitImageInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage srcImage; + /// VkImageLayout srcImageLayout; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// uint32_t regionCount; + /// const VkImageBlit2* pRegions; + /// VkFilter filter; + /// } VkBlitImageInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkBlitImageInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BlitImageInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcImage is the source image. + /// + [FieldOffset(16)] + public VkImage SrcImage; + + /// + /// SrcImageLayout is the layout of the source image subresources for the blit. + /// + [FieldOffset(24)] + public VkImageLayout SrcImageLayout; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(32)] + public VkImage DstImage; + + /// + /// DstImageLayout is the layout of the destination image subresources for the blit. + /// + [FieldOffset(40)] + public VkImageLayout DstImageLayout; + + /// + /// RegionCount is the number of regions to blit. + /// + [FieldOffset(44)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkImageBlit2 structures specifying the regions to blit. + /// + [FieldOffset(48)] + public VkImageBlit2* Regions; + + /// + /// Filter is a VkFilter specifying the filter to apply if the blits require scaling. + /// + [FieldOffset(56)] + public VkFilter Filter; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferCaptureDescriptorDataInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferCaptureDescriptorDataInfoEXT.gen.cs new file mode 100644 index 0000000..aac6838 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferCaptureDescriptorDataInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferCaptureDescriptorDataInfoEXT - Structure specifying a buffer for descriptor capture + /// + /// + /// + /// Information about the buffer to get descriptor buffer capture data for is + /// passed in a VkBufferCaptureDescriptorDataInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkBufferCaptureDescriptorDataInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer buffer; + /// } VkBufferCaptureDescriptorDataInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBufferCaptureDescriptorDataInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferCaptureDescriptorDataInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer is the VkBuffer handle of the buffer to get opaque capture data for. + /// + [FieldOffset(16)] + public VkBuffer Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferCopy.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferCopy.gen.cs new file mode 100644 index 0000000..78f0af1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferCopy.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferCopy - Structure specifying a buffer copy operation + /// + /// + /// + /// :refpage: VkBufferCopy + /// + /// + /// The VkBufferCopy structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBufferCopy { + /// VkDeviceSize srcOffset; + /// VkDeviceSize dstOffset; + /// VkDeviceSize size; + /// } VkBufferCopy; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkBufferCopy() + { + /// + /// SrcOffset is the starting offset in bytes from the start of srcBuffer. + /// + [FieldOffset(0)] + public ByteSize64 SrcOffset; + + /// + /// DstOffset is the starting offset in bytes from the start of dstBuffer. + /// + [FieldOffset(8)] + public ByteSize64 DstOffset; + + /// + /// Size is the number of bytes to copy. + /// + [FieldOffset(16)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferCopy2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferCopy2.gen.cs new file mode 100644 index 0000000..4cb16da --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferCopy2.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferCopy2 - Structure specifying a buffer copy operation + /// + /// + /// + /// :refpage: VkBufferCopy2 + /// + /// + /// The VkBufferCopy2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkBufferCopy2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceSize srcOffset; + /// VkDeviceSize dstOffset; + /// VkDeviceSize size; + /// } VkBufferCopy2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkBufferCopy2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferCopy2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcOffset is the starting offset in bytes from the start of srcBuffer. + /// + [FieldOffset(16)] + public ByteSize64 SrcOffset; + + /// + /// DstOffset is the starting offset in bytes from the start of dstBuffer. + /// + [FieldOffset(24)] + public ByteSize64 DstOffset; + + /// + /// Size is the number of bytes to copy. + /// + [FieldOffset(32)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferCreateInfo.gen.cs new file mode 100644 index 0000000..882493e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferCreateInfo.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferCreateInfo - Structure specifying the parameters of a newly created buffer object + /// + /// + /// + /// :refpage: VkBufferCreateInfo + /// + /// + /// The VkBufferCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBufferCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBufferCreateFlags flags; + /// VkDeviceSize size; + /// VkBufferUsageFlags usage; + /// VkSharingMode sharingMode; + /// uint32_t queueFamilyIndexCount; + /// const uint32_t* pQueueFamilyIndices; + /// } VkBufferCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkBufferCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkBufferCreateFlags specifying additional parameters of the buffer. + /// + [FieldOffset(16)] + public VkBufferCreateFlags Flags; + + /// + /// Size is the size in bytes of the buffer to be created. + /// + [FieldOffset(24)] + public ByteSize64 Size; + + /// + /// Usage is a bitmask of VkBufferUsageFlags specifying allowed usages of the buffer. + /// + [FieldOffset(32)] + public VkBufferUsageFlags Usage; + + /// + /// SharingMode is a VkSharingMode value specifying the sharing mode of the buffer when it will be accessed by multiple queue families. + /// + [FieldOffset(36)] + public VkSharingMode SharingMode; + + /// + /// QueueFamilyIndexCount is the number of entries in the pQueueFamilyIndices array. + /// + [FieldOffset(40)] + public int QueueFamilyIndexCount; + + /// + /// QueueFamilyIndices is a pointer to an array of queue families that will access this buffer. It is ignored if sharingMode is not VK_SHARING_MODE_CONCURRENT. + /// + [FieldOffset(48)] + public int* QueueFamilyIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressCreateInfoEXT.gen.cs new file mode 100644 index 0000000..27778c4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressCreateInfoEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferDeviceAddressCreateInfoEXT - Request a specific address for a buffer + /// + /// + /// + /// To request a specific device address for a buffer, add a + /// VkBufferDeviceAddressCreateInfoEXT structure to the pNext chain + /// of the VkBufferCreateInfo structure. + /// The VkBufferDeviceAddressCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_buffer_device_address + /// typedef struct VkBufferDeviceAddressCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddress deviceAddress; + /// } VkBufferDeviceAddressCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBufferDeviceAddressCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferDeviceAddressCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceAddress is the device address requested for the buffer. + /// + [FieldOffset(16)] + public VkDeviceAddress DeviceAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressInfo.gen.cs new file mode 100644 index 0000000..de7b1dc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferDeviceAddressInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferDeviceAddressInfo - Structure specifying the buffer to query an address for + /// + /// + /// + /// The VkBufferDeviceAddressInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkBufferDeviceAddressInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer buffer; + /// } VkBufferDeviceAddressInfo; + /// + /// + /// // Jon: three-way conditional logic is broken + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBufferDeviceAddressInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferDeviceAddressInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer specifies the buffer whose address is being queried. + /// + [FieldOffset(16)] + public VkBuffer Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferImageCopy.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferImageCopy.gen.cs new file mode 100644 index 0000000..29e26dc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferImageCopy.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferImageCopy - Structure specifying a buffer image copy operation + /// + /// + /// + /// :refpage: VkBufferImageCopy + /// + /// + /// For both vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer, each + /// element of pRegions is a structure defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBufferImageCopy { + /// VkDeviceSize bufferOffset; + /// uint32_t bufferRowLength; + /// uint32_t bufferImageHeight; + /// VkImageSubresourceLayers imageSubresource; + /// VkOffset3D imageOffset; + /// VkExtent3D imageExtent; + /// } VkBufferImageCopy; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct VkBufferImageCopy() + { + /// + /// BufferOffset is the offset in bytes from the start of the buffer object where the image data is copied from or to. + /// + [FieldOffset(0)] + public ByteSize64 BufferOffset; + + /// + /// BufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent. + /// + [FieldOffset(8)] + public int BufferRowLength; + + /// + /// BufferImageHeight + /// + [FieldOffset(12)] + public int BufferImageHeight; + + /// + /// ImageSubresource is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data. + /// + [FieldOffset(16)] + public VkImageSubresourceLayers ImageSubresource; + + /// + /// ImageOffset selects the initial x, y, z offsets in texels of the sub-region of the source or destination image data. + /// + [FieldOffset(32)] + public VkOffset3D ImageOffset; + + /// + /// ImageExtent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(44)] + public VkExtent3D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferImageCopy2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferImageCopy2.gen.cs new file mode 100644 index 0000000..df3fbeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferImageCopy2.gen.cs @@ -0,0 +1,79 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferImageCopy2 - Structure specifying a buffer image copy operation + /// + /// + /// + /// :refpage: VkBufferImageCopy2 + /// + /// + /// For both vkCmdCopyBufferToImage2 and vkCmdCopyImageToBuffer2, + /// each element of pRegions is a structure defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkBufferImageCopy2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceSize bufferOffset; + /// uint32_t bufferRowLength; + /// uint32_t bufferImageHeight; + /// VkImageSubresourceLayers imageSubresource; + /// VkOffset3D imageOffset; + /// VkExtent3D imageExtent; + /// } VkBufferImageCopy2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkBufferImageCopy2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferImageCopy2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BufferOffset is the offset in bytes from the start of the buffer object where the image data is copied from or to. + /// + [FieldOffset(16)] + public ByteSize64 BufferOffset; + + /// + /// BufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent. + /// + [FieldOffset(24)] + public int BufferRowLength; + + /// + /// BufferImageHeight + /// + [FieldOffset(28)] + public int BufferImageHeight; + + /// + /// ImageSubresource is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data. + /// + [FieldOffset(32)] + public VkImageSubresourceLayers ImageSubresource; + + /// + /// ImageOffset selects the initial x, y, z offsets in texels of the sub-region of the source or destination image data. + /// + [FieldOffset(48)] + public VkOffset3D ImageOffset; + + /// + /// ImageExtent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(60)] + public VkExtent3D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier.gen.cs new file mode 100644 index 0000000..bff34dc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferMemoryBarrier - Structure specifying a buffer memory barrier + /// + /// + /// + /// :refpage: VkBufferMemoryBarrier + /// + /// + /// The VkBufferMemoryBarrier structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBufferMemoryBarrier { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccessFlags srcAccessMask; + /// VkAccessFlags dstAccessMask; + /// uint32_t srcQueueFamilyIndex; + /// uint32_t dstQueueFamilyIndex; + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// } VkBufferMemoryBarrier; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkBufferMemoryBarrier() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferMemoryBarrier; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcAccessMask is a bitmask of VkAccessFlags specifying a source access mask^. + /// + [FieldOffset(16)] + public VkAccessFlags SrcAccessMask; + + /// + /// DstAccessMask is a bitmask of VkAccessFlags specifying a destination access mask^. + /// + [FieldOffset(20)] + public VkAccessFlags DstAccessMask; + + /// + /// SrcQueueFamilyIndex is the source queue family for a queue family ownership transfer^. + /// + [FieldOffset(24)] + public int SrcQueueFamilyIndex; + + /// + /// DstQueueFamilyIndex is the destination queue family for a queue family ownership transfer^. + /// + [FieldOffset(28)] + public int DstQueueFamilyIndex; + + /// + /// Buffer is a handle to the buffer whose backing memory is affected by the barrier. + /// + [FieldOffset(32)] + public VkBuffer Buffer; + + /// + /// Offset is an offset in bytes into the backing memory for buffer; this is relative to the base offset as bound to the buffer (see vkBindBufferMemory). + /// + [FieldOffset(40)] + public ByteSize64 Offset; + + /// + /// Size is a size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer. + /// + [FieldOffset(48)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier2.gen.cs new file mode 100644 index 0000000..91cf1ad --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferMemoryBarrier2.gen.cs @@ -0,0 +1,99 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferMemoryBarrier2 - Structure specifying a buffer memory barrier + /// + /// + /// + /// :refpage: VkBufferMemoryBarrier2 + /// + /// + /// The VkBufferMemoryBarrier2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkBufferMemoryBarrier2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineStageFlags2 srcStageMask; + /// VkAccessFlags2 srcAccessMask; + /// VkPipelineStageFlags2 dstStageMask; + /// VkAccessFlags2 dstAccessMask; + /// uint32_t srcQueueFamilyIndex; + /// uint32_t dstQueueFamilyIndex; + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// } VkBufferMemoryBarrier2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkBufferMemoryBarrier2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferMemoryBarrier2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope^. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 SrcStageMask; + + /// + /// SrcAccessMask is a VkAccessFlags2 mask of access flags to be included in the first access scope^. + /// + [FieldOffset(24)] + public VkAccessFlags2 SrcAccessMask; + + /// + /// DstStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope^. + /// + [FieldOffset(32)] + public VkPipelineStageFlags2 DstStageMask; + + /// + /// DstAccessMask is a VkAccessFlags2 mask of access flags to be included in the second access scope^. + /// + [FieldOffset(40)] + public VkAccessFlags2 DstAccessMask; + + /// + /// SrcQueueFamilyIndex is the source queue family for a queue family ownership transfer^. + /// + [FieldOffset(48)] + public int SrcQueueFamilyIndex; + + /// + /// DstQueueFamilyIndex is the destination queue family for a queue family ownership transfer^. + /// + [FieldOffset(52)] + public int DstQueueFamilyIndex; + + /// + /// Buffer is a handle to the buffer whose backing memory is affected by the barrier. + /// + [FieldOffset(56)] + public VkBuffer Buffer; + + /// + /// Offset is an offset in bytes into the backing memory for buffer; this is relative to the base offset as bound to the buffer (see vkBindBufferMemory). + /// + [FieldOffset(64)] + public ByteSize64 Offset; + + /// + /// Size is a size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer. + /// + [FieldOffset(72)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferMemoryRequirementsInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferMemoryRequirementsInfo2.gen.cs new file mode 100644 index 0000000..cf70187 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferMemoryRequirementsInfo2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferMemoryRequirementsInfo2 - (None) + /// + /// + /// + /// The VkBufferMemoryRequirementsInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkBufferMemoryRequirementsInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer buffer; + /// } VkBufferMemoryRequirementsInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBufferMemoryRequirementsInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferMemoryRequirementsInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer is the buffer to query. + /// + [FieldOffset(16)] + public VkBuffer Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferOpaqueCaptureAddressCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferOpaqueCaptureAddressCreateInfo.gen.cs new file mode 100644 index 0000000..44a0999 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferOpaqueCaptureAddressCreateInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferOpaqueCaptureAddressCreateInfo - Request a specific address for a buffer + /// + /// + /// + /// To request a specific device address for a buffer, add a + /// VkBufferOpaqueCaptureAddressCreateInfo structure to the pNext + /// chain of the VkBufferCreateInfo structure. + /// The VkBufferOpaqueCaptureAddressCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkBufferOpaqueCaptureAddressCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t opaqueCaptureAddress; + /// } VkBufferOpaqueCaptureAddressCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBufferOpaqueCaptureAddressCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferOpaqueCaptureAddressCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OpaqueCaptureAddress is the opaque capture address requested for the buffer. + /// + [FieldOffset(16)] + public nint OpaqueCaptureAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferUsageFlags2CreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferUsageFlags2CreateInfo.gen.cs new file mode 100644 index 0000000..2d3cc93 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferUsageFlags2CreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferUsageFlags2CreateInfo - Extended buffer usage flags + /// + /// + /// + /// The VkBufferUsageFlags2CreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkBufferUsageFlags2CreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBufferUsageFlags2 usage; + /// } VkBufferUsageFlags2CreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkBufferUsageFlags2CreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferUsageFlags2CreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Usage is a bitmask of VkBufferUsageFlags2 specifying allowed usages of the buffer. + /// + [FieldOffset(16)] + public VkBufferUsageFlags2 Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBufferViewCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBufferViewCreateInfo.gen.cs new file mode 100644 index 0000000..9d59b97 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBufferViewCreateInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view + /// + /// + /// + /// The VkBufferViewCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkBufferViewCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBufferViewCreateFlags flags; + /// VkBuffer buffer; + /// VkFormat format; + /// VkDeviceSize offset; + /// VkDeviceSize range; + /// } VkBufferViewCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkBufferViewCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BufferViewCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkBufferViewCreateFlags Flags; + + /// + /// Buffer is a VkBuffer on which the view will be created. + /// + [FieldOffset(24)] + public VkBuffer Buffer; + + /// + /// Format is a VkFormat describing the format of the data elements in the buffer. + /// + [FieldOffset(32)] + public VkFormat Format; + + /// + /// Offset is an offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset. + /// + [FieldOffset(40)] + public ByteSize64 Offset; + + /// + /// Range is a size in bytes of the buffer view. If range is equal to VK_WHOLE_SIZE, the range from offset to the end of the buffer is used. If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the texel block size^ of format, the nearest smaller multiple is used. + /// + [FieldOffset(48)] + public ByteSize64 Range; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureIndirectCommandNV.gen.cs new file mode 100644 index 0000000..6c81855 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureIndirectCommandNV.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuildPartitionedAccelerationStructureIndirectCommandNV - Structure describing PTLAS operation to perform + /// + /// + /// + /// :refpage: VkBuildPartitionedAccelerationStructureIndirectCommandNV + /// + /// + /// The VkBuildPartitionedAccelerationStructureIndirectCommandNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkBuildPartitionedAccelerationStructureIndirectCommandNV { + /// VkPartitionedAccelerationStructureOpTypeNV opType; + /// uint32_t argCount; + /// VkStridedDeviceAddressNV argData; + /// } VkBuildPartitionedAccelerationStructureIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkBuildPartitionedAccelerationStructureIndirectCommandNV() + { + /// + /// OpType is a VkPartitionedAccelerationStructureOpTypeNV describing the type of operation. + /// + [FieldOffset(0)] + public VkPartitionedAccelerationStructureOpTypeNV OpType; + + /// + /// ArgCount the number of structures in argData array. + /// + [FieldOffset(4)] + public int ArgCount; + + /// + /// ArgData is an array of VkStridedDeviceAddressNV structures containing the write or update data for instances and partitions in the PTLAS. The structure is dependent on opType as shown in the table below. [options="header"] | + /// + [FieldOffset(8)] + public VkStridedDeviceAddressNV ArgData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureInfoNV.gen.cs new file mode 100644 index 0000000..29d25ab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkBuildPartitionedAccelerationStructureInfoNV.gen.cs @@ -0,0 +1,79 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkBuildPartitionedAccelerationStructureInfoNV - Structure describing build parameters for a PTLAS + /// + /// + /// + /// :refpage: VkBuildPartitionedAccelerationStructureInfoNV + /// + /// + /// The VkBuildPartitionedAccelerationStructureInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkBuildPartitionedAccelerationStructureInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// VkPartitionedAccelerationStructureInstancesInputNV input; + /// VkDeviceAddress srcAccelerationStructureData; + /// VkDeviceAddress dstAccelerationStructureData; + /// VkDeviceAddress scratchData; + /// VkDeviceAddress srcInfos; + /// VkDeviceAddress srcInfosCount; + /// } VkBuildPartitionedAccelerationStructureInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkBuildPartitionedAccelerationStructureInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.BuildPartitionedAccelerationStructureInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Input is a VkPartitionedAccelerationStructureInstancesInputNV structure describing the instance and partition count information in the PTLAS. + /// + [FieldOffset(16)] + public VkPartitionedAccelerationStructureInstancesInputNV Input; + + /// + /// SrcAccelerationStructureData is `NULL` or an address of a previously built PTLAS. If non-`NULL`, the PTLAS stored at this address is used as a basis to create new PTLAS. + /// + [FieldOffset(56)] + public VkDeviceAddress SrcAccelerationStructureData; + + /// + /// DstAccelerationStructureData is the address to store the built PTLAS. + /// + [FieldOffset(64)] + public VkDeviceAddress DstAccelerationStructureData; + + /// + /// ScratchData is the device address of scratch memory that will be used during PTLAS build. + /// + [FieldOffset(72)] + public VkDeviceAddress ScratchData; + + /// + /// SrcInfos is the device address of an array of VkBuildPartitionedAccelerationStructureIndirectCommandNV structures describing the type of operation to perform. + /// + [FieldOffset(80)] + public VkDeviceAddress SrcInfos; + + /// + /// SrcInfosCount is a device address containing the size of srcInfos array. + /// + [FieldOffset(88)] + public VkDeviceAddress SrcInfosCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCalibratedTimestampInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCalibratedTimestampInfoKHR.gen.cs new file mode 100644 index 0000000..91471b7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCalibratedTimestampInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCalibratedTimestampInfoKHR - Structure specifying the input parameters of a calibrated timestamp query + /// + /// + /// + /// The VkCalibratedTimestampInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_calibrated_timestamps + /// typedef struct VkCalibratedTimestampInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkTimeDomainKHR timeDomain; + /// } VkCalibratedTimestampInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkCalibratedTimestampInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CalibratedTimestampInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TimeDomain is a VkTimeDomainKHR value specifying the time domain from which the calibrated timestamp value should be returned. + /// + [FieldOffset(16)] + public VkTimeDomainKHR TimeDomain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCheckpointData2NV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCheckpointData2NV.gen.cs new file mode 100644 index 0000000..556bacc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCheckpointData2NV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCheckpointData2NV - Return structure for command buffer checkpoint data + /// + /// + /// + /// The VkCheckpointData2NV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2 + /// typedef struct VkCheckpointData2NV { + /// VkStructureType sType; + /// void* pNext; + /// VkPipelineStageFlags2 stage; + /// void* pCheckpointMarker; + /// } VkCheckpointData2NV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCheckpointData2NV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CheckpointData2NV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Stage indicates a single pipeline stage which the checkpoint marker data refers to. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 Stage; + + /// + /// CheckpointMarker contains the value of the last checkpoint marker executed in the stage that stage refers to. + /// + [FieldOffset(24)] + public void* CheckpointMarker; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCheckpointDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCheckpointDataNV.gen.cs new file mode 100644 index 0000000..9418894 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCheckpointDataNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCheckpointDataNV - Return structure for command buffer checkpoint data + /// + /// + /// + /// The VkCheckpointDataNV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints + /// typedef struct VkCheckpointDataNV { + /// VkStructureType sType; + /// void* pNext; + /// VkPipelineStageFlagBits stage; + /// void* pCheckpointMarker; + /// } VkCheckpointDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCheckpointDataNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CheckpointDataNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Stage is a VkPipelineStageFlags value specifying which pipeline stage the checkpoint marker data refers to. + /// + [FieldOffset(16)] + public VkPipelineStageFlags Stage; + + /// + /// CheckpointMarker contains the value of the last checkpoint marker executed in the stage that stage refers to. + /// + [FieldOffset(24)] + public void* CheckpointMarker; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClearAttachment.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClearAttachment.gen.cs new file mode 100644 index 0000000..49a31f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClearAttachment.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClearAttachment - Structure specifying a clear attachment + /// + /// + /// + /// The VkClearAttachment structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkClearAttachment { + /// VkImageAspectFlags aspectMask; + /// uint32_t colorAttachment; + /// VkClearValue clearValue; + /// } VkClearAttachment; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkClearAttachment() + { + /// + /// AspectMask is a mask selecting the color, depth and/or stencil aspects of the attachment to be cleared. + /// + [FieldOffset(0)] + public VkImageAspectFlags AspectMask; + + /// + /// ColorAttachment is only meaningful if VK_IMAGE_ASPECT_COLOR_BIT is set in aspectMask, in which case it is an index into the bound color attachments. + /// + [FieldOffset(4)] + public int ColorAttachment; + + /// + /// ClearValue is the color or depth/stencil value to clear the attachment to, as described in Clear Values^ below. + /// + [FieldOffset(8)] + public VkClearValue ClearValue; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClearColorValue.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClearColorValue.gen.cs new file mode 100644 index 0000000..0c889f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClearColorValue.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClearColorValue - Structure specifying a clear color value + /// + /// + /// + /// The VkClearColorValue structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef union VkClearColorValue { + /// float float32[4]; + /// int32_t int32[4]; + /// uint32_t uint32[4]; + /// } VkClearColorValue; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkClearColorValue() + { + /// + /// Float32 are the color clear values when the format of the image or attachment is one of the numeric formats^ with a numeric type that is floating-point. Floating-point values are automatically converted to the format of the image, with the clear value being treated as linear if the image is sRGB. + /// + [FieldOffset(0)] + public float4 Float32; + + /// + /// Int32 are the color clear values when the format of the image or attachment has a numeric type that is signed integer (etext:SINT). Signed integer values are converted to the format of the image by casting to the smaller type (with negative 32-bit values mapping to negative values in the smaller type). If the integer clear value is not representable in the target type (e.g. would overflow in conversion to that type), the clear value is undefined:. + /// + [FieldOffset(0)] + public int4 Int32; + + /// + /// Uint32 are the color clear values when the format of the image or attachment has a numeric type that is unsigned integer (etext:UINT). Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits. + /// + [FieldOffset(0)] + public uint4 Uint32; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClearDepthStencilValue.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClearDepthStencilValue.gen.cs new file mode 100644 index 0000000..ce3b583 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClearDepthStencilValue.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClearDepthStencilValue - Structure specifying a clear depth stencil value + /// + /// + /// + /// The VkClearDepthStencilValue structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkClearDepthStencilValue { + /// float depth; + /// uint32_t stencil; + /// } VkClearDepthStencilValue; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkClearDepthStencilValue() + { + /// + /// Depth is the clear value for the depth aspect of the depth/stencil attachment. It is a floating-point value which is automatically converted to the attachment's format. + /// + [FieldOffset(0)] + public float Depth; + + /// + /// Stencil is the clear value for the stencil aspect of the depth/stencil attachment. It is a 32-bit integer value which is converted to the attachment's format by taking the appropriate number of LSBs. + /// + [FieldOffset(4)] + public int Stencil; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClearRect.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClearRect.gen.cs new file mode 100644 index 0000000..a012f7e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClearRect.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClearRect - Structure specifying a clear rectangle + /// + /// + /// + /// The VkClearRect structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkClearRect { + /// VkRect2D rect; + /// uint32_t baseArrayLayer; + /// uint32_t layerCount; + /// } VkClearRect; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkClearRect() + { + /// + /// Rect is the two-dimensional region to be cleared. + /// + [FieldOffset(0)] + public VkRect2D Rect; + + /// + /// BaseArrayLayer is the first layer to be cleared. + /// + [FieldOffset(16)] + public int BaseArrayLayer; + + /// + /// LayerCount is the number of layers to clear. + /// + [FieldOffset(20)] + public int LayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClearValue.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClearValue.gen.cs new file mode 100644 index 0000000..a3431d9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClearValue.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClearValue - Structure specifying a clear value + /// + /// + /// + /// The VkClearValue union is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef union VkClearValue { + /// VkClearColorValue color; + /// VkClearDepthStencilValue depthStencil; + /// } VkClearValue; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkClearValue() + { + /// + /// Color specifies the color image clear values to use when clearing a color image or attachment. + /// + [FieldOffset(0)] + public VkClearColorValue Color; + + /// + /// DepthStencil specifies the depth and stencil clear values to use when clearing a depth/stencil image or attachment. + /// + [FieldOffset(0)] + public VkClearDepthStencilValue DepthStencil; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV.gen.cs new file mode 100644 index 0000000..6ca24fa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV - Parameters describing build operation for a bottom level cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV + /// + /// + /// The VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV { + /// uint32_t clusterReferencesCount; + /// uint32_t clusterReferencesStride; + /// VkDeviceAddress clusterReferences; + /// } VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV() + { + /// + /// ClusterReferencesCount is the number of clusters this bottom level acceleration structure will be built from. + /// + [FieldOffset(0)] + public int ClusterReferencesCount; + + /// + /// ClusterReferencesStride is the stride in clusterReferences. + /// + [FieldOffset(4)] + public int ClusterReferencesStride; + + /// + /// ClusterReferences is the device memory containing the address of the clusters. + /// + [FieldOffset(8)] + public VkDeviceAddress ClusterReferences; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterInfoNV.gen.cs new file mode 100644 index 0000000..b325f2a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterInfoNV.gen.cs @@ -0,0 +1,180 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureBuildTriangleClusterInfoNV - Parameters describing build operation for a cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureBuildTriangleClusterInfoNV + /// + /// + /// The VkClusterAccelerationStructureBuildTriangleClusterInfoNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureBuildTriangleClusterInfoNV { + /// uint32_t clusterID; + /// VkClusterAccelerationStructureClusterFlagsNV clusterFlags; + /// uint32_t triangleCount:9; + /// uint32_t vertexCount:9; + /// uint32_t positionTruncateBitCount:6; + /// uint32_t indexType:4; + /// uint32_t opacityMicromapIndexType:4; + /// VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags; + /// uint16_t indexBufferStride; + /// uint16_t vertexBufferStride; + /// uint16_t geometryIndexAndFlagsBufferStride; + /// uint16_t opacityMicromapIndexBufferStride; + /// VkDeviceAddress indexBuffer; + /// VkDeviceAddress vertexBuffer; + /// VkDeviceAddress geometryIndexAndFlagsBuffer; + /// VkDeviceAddress opacityMicromapArray; + /// VkDeviceAddress opacityMicromapIndexBuffer; + /// } VkClusterAccelerationStructureBuildTriangleClusterInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct VkClusterAccelerationStructureBuildTriangleClusterInfoNV() + { + /// + /// ClusterID is a user specified identifier assigned to this cluster. + /// + [FieldOffset(0)] + public int ClusterID; + + /// + /// ClusterFlags is a bitmask of VkClusterAccelerationStructureClusterFlagsNV values describing flags how the cluster should be built. + /// + [FieldOffset(4)] + public VkClusterAccelerationStructureClusterFlagsNV ClusterFlags; + + /// + /// TriangleCount is the number of triangles in this cluster. + /// + [FieldOffset(8)] + private int _triangleCount; + + /// + /// VertexCount is the number of unique vertices in this cluster. + /// + [FieldOffset(8)] + private int _vertexCount; + + /// + /// PositionTruncateBitCount is the number of bits starting at the lowest bit (i.e. the LSBs of the mantissa), of each vertex position that will be truncated to zero to improve floating-point compression. + /// + [FieldOffset(8)] + private int _positionTruncateBitCount; + + /// + /// IndexType is a single VkClusterAccelerationStructureIndexFormatFlagsNV value specifying the index type in indexBuffer. + /// + [FieldOffset(8)] + private int _indexType; + + /// + /// OpacityMicromapIndexType is a single VkClusterAccelerationStructureIndexFormatFlagsNV value specifying the index type in opacityMicromapIndexBuffer. + /// + [FieldOffset(8)] + private int _opacityMicromapIndexType; + + /// + /// BaseGeometryIndexAndGeometryFlags is a VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV value specifying the base geometry index and flags for all triangles in the cluster. + /// + [FieldOffset(12)] + public VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV BaseGeometryIndexAndGeometryFlags; + + /// + /// IndexBufferStride is the stride in bytes in indexBuffer with `0` meaning the values are tightly-packed. + /// + [FieldOffset(16)] + public ushort IndexBufferStride; + + /// + /// VertexBufferStride is the stride in bytes in vertexBuffer with `0` meaning the values are tightly-packed. + /// + [FieldOffset(18)] + public ushort VertexBufferStride; + + /// + /// GeometryIndexAndFlagsBufferStride is the stride in bytes in geometryIndexAndFlagsBuffer with `0` meaning the values are tightly-packed. + /// + [FieldOffset(20)] + public ushort GeometryIndexAndFlagsBufferStride; + + /// + /// OpacityMicromapIndexBufferStride is the stride in bytes in opacityMicromapIndexBuffer with `0` meaning the values are tightly-packed. + /// + [FieldOffset(22)] + public ushort OpacityMicromapIndexBufferStride; + + /// + /// IndexBuffer is a device address containing the indices of the vertices in the cluster and are of type indexType. + /// + [FieldOffset(24)] + public VkDeviceAddress IndexBuffer; + + /// + /// VertexBuffer is a device address containing the vertex data of the triangles in the cluster with format specified in VkClusterAccelerationStructureTriangleClusterInputNV::vertexFormat. + /// + [FieldOffset(32)] + public VkDeviceAddress VertexBuffer; + + /// + /// GeometryIndexAndFlagsBuffer + /// + [FieldOffset(40)] + public VkDeviceAddress GeometryIndexAndFlagsBuffer; + + /// + /// OpacityMicromapArray is either `0` or specifies the address of a valid opacity micromap array to reference from the cluster acceleration structure. If it is `0`, then opacity micromaps will be disabled for this cluster acceleration structure. + /// + [FieldOffset(48)] + public VkDeviceAddress OpacityMicromapArray; + + /// + /// OpacityMicromapIndexBuffer is either `0` or specifies the address of a strided array with size equal to the number of triangles or indices into the opacity micromap array. If opacityMicromapIndexBuffer is `0` then the index used is the index of the triangle in the geometry. + /// + [FieldOffset(56)] + public VkDeviceAddress OpacityMicromapIndexBuffer; + } + + public partial struct VkClusterAccelerationStructureBuildTriangleClusterInfoNV + { + /// + public int TriangleCount + { + get => BitFields.ExtractRange(_triangleCount, start: 0, length: 9); + set => BitFields.SetRange(ref _triangleCount, start: 0, length: 9, value); + } + + /// + public int VertexCount + { + get => BitFields.ExtractRange(_vertexCount, start: 9, length: 9); + set => BitFields.SetRange(ref _vertexCount, start: 9, length: 9, value); + } + + /// + public int PositionTruncateBitCount + { + get => BitFields.ExtractRange(_positionTruncateBitCount, start: 18, length: 6); + set => BitFields.SetRange(ref _positionTruncateBitCount, start: 18, length: 6, value); + } + + /// + public int IndexType + { + get => BitFields.ExtractRange(_indexType, start: 24, length: 4); + set => BitFields.SetRange(ref _indexType, start: 24, length: 4, value); + } + + /// + public int OpacityMicromapIndexType + { + get => BitFields.ExtractRange(_opacityMicromapIndexType, start: 28, length: 4); + set => BitFields.SetRange(ref _opacityMicromapIndexType, start: 28, length: 4, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.gen.cs new file mode 100644 index 0000000..c62953d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.gen.cs @@ -0,0 +1,187 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV - Parameters describing build operation for a template cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV + /// + /// + /// The VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV { + /// uint32_t clusterID; + /// VkClusterAccelerationStructureClusterFlagsNV clusterFlags; + /// uint32_t triangleCount:9; + /// uint32_t vertexCount:9; + /// uint32_t positionTruncateBitCount:6; + /// uint32_t indexType:4; + /// uint32_t opacityMicromapIndexType:4; + /// VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags; + /// uint16_t indexBufferStride; + /// uint16_t vertexBufferStride; + /// uint16_t geometryIndexAndFlagsBufferStride; + /// uint16_t opacityMicromapIndexBufferStride; + /// VkDeviceAddress indexBuffer; + /// VkDeviceAddress vertexBuffer; + /// VkDeviceAddress geometryIndexAndFlagsBuffer; + /// VkDeviceAddress opacityMicromapArray; + /// VkDeviceAddress opacityMicromapIndexBuffer; + /// VkDeviceAddress instantiationBoundingBoxLimit; + /// } VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public partial struct VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV() + { + /// + /// ClusterID is a user specified identifier assigned to this cluster template. + /// + [FieldOffset(0)] + public int ClusterID; + + /// + /// ClusterFlags is a bitmask of VkClusterAccelerationStructureClusterFlagsNV values describing flags how the cluster template should be built. + /// + [FieldOffset(4)] + public VkClusterAccelerationStructureClusterFlagsNV ClusterFlags; + + /// + /// TriangleCount is the number of triangles in this cluster. + /// + [FieldOffset(8)] + private int _triangleCount; + + /// + /// VertexCount is the number of unique vertices in this cluster. + /// + [FieldOffset(8)] + private int _vertexCount; + + /// + /// PositionTruncateBitCount is the number of bits starting at the lowest bit (i.e. the LSBs of the mantissa), of each vertex position that will be truncated to zero to improve floating-point compression. + /// + [FieldOffset(8)] + private int _positionTruncateBitCount; + + /// + /// IndexType is a single VkClusterAccelerationStructureIndexFormatFlagsNV value specifying the index type in indexBuffer. + /// + [FieldOffset(8)] + private int _indexType; + + /// + /// OpacityMicromapIndexType is a single VkClusterAccelerationStructureIndexFormatFlagsNV value specifying the index type in opacityMicromapIndexBuffer. + /// + [FieldOffset(8)] + private int _opacityMicromapIndexType; + + /// + /// BaseGeometryIndexAndGeometryFlags is a VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV value specifying the base geometry index and flags for all triangles in the cluster template. + /// + [FieldOffset(12)] + public VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV BaseGeometryIndexAndGeometryFlags; + + /// + /// IndexBufferStride is the stride in bytes in indexBuffer. + /// + [FieldOffset(16)] + public ushort IndexBufferStride; + + /// + /// VertexBufferStride is the stride in bytes in vertexBuffer. + /// + [FieldOffset(18)] + public ushort VertexBufferStride; + + /// + /// GeometryIndexAndFlagsBufferStride is the stride in bytes in geometryIndexAndFlagsBuffer. + /// + [FieldOffset(20)] + public ushort GeometryIndexAndFlagsBufferStride; + + /// + /// OpacityMicromapIndexBufferStride is the stride in bytes in opacityMicromapIndexBuffer. + /// + [FieldOffset(22)] + public ushort OpacityMicromapIndexBufferStride; + + /// + /// IndexBuffer contains the indices of vertices in the cluster and is of type indexType. + /// + [FieldOffset(24)] + public VkDeviceAddress IndexBuffer; + + /// + /// VertexBuffer is either `0` or specifies the vertex data of the triangles in the cluster template with format specified in VkClusterAccelerationStructureTriangleClusterInputNV::vertexFormat. + /// + [FieldOffset(32)] + public VkDeviceAddress VertexBuffer; + + /// + /// GeometryIndexAndFlagsBuffer is either `0` or an address containing strided VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV values specifying the geometry index and flag for every triangle in the cluster. + /// + [FieldOffset(40)] + public VkDeviceAddress GeometryIndexAndFlagsBuffer; + + /// + /// OpacityMicromapArray is either `0` or specifies the address of a valid opacity micromap array to reference from the cluster acceleration structure. If it is `0`, then opacity micromaps will be disabled for this cluster acceleration structure. + /// + [FieldOffset(48)] + public VkDeviceAddress OpacityMicromapArray; + + /// + /// OpacityMicromapIndexBuffer is either `0` or specifies the address of a strided array with size equal to the number of triangles or indices into the opacity micromap array. If opacityMicromapIndexBuffer is `0` then the index used is the index of the triangle in the geometry. + /// + [FieldOffset(56)] + public VkDeviceAddress OpacityMicromapIndexBuffer; + + /// + /// InstantiationBoundingBoxLimit is either `0` or specifies the address of a bounding box within which all instantiated clusters must lie. The bounding box is specified by six 32-bit floating-point values in the order MinX, MinY, MinZ, MaxX, MaxY, MaxZ. + /// + [FieldOffset(64)] + public VkDeviceAddress InstantiationBoundingBoxLimit; + } + + public partial struct VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV + { + /// + public int TriangleCount + { + get => BitFields.ExtractRange(_triangleCount, start: 0, length: 9); + set => BitFields.SetRange(ref _triangleCount, start: 0, length: 9, value); + } + + /// + public int VertexCount + { + get => BitFields.ExtractRange(_vertexCount, start: 9, length: 9); + set => BitFields.SetRange(ref _vertexCount, start: 9, length: 9, value); + } + + /// + public int PositionTruncateBitCount + { + get => BitFields.ExtractRange(_positionTruncateBitCount, start: 18, length: 6); + set => BitFields.SetRange(ref _positionTruncateBitCount, start: 18, length: 6, value); + } + + /// + public int IndexType + { + get => BitFields.ExtractRange(_indexType, start: 24, length: 4); + set => BitFields.SetRange(ref _indexType, start: 24, length: 4, value); + } + + /// + public int OpacityMicromapIndexType + { + get => BitFields.ExtractRange(_opacityMicromapIndexType, start: 28, length: 4); + set => BitFields.SetRange(ref _opacityMicromapIndexType, start: 28, length: 4, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureClustersBottomLevelInputNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureClustersBottomLevelInputNV.gen.cs new file mode 100644 index 0000000..4f400cc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureClustersBottomLevelInputNV.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureClustersBottomLevelInputNV - Parameters describing bottom level acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureClustersBottomLevelInputNV + /// + /// + /// The VkClusterAccelerationStructureClustersBottomLevelInputNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureClustersBottomLevelInputNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxTotalClusterCount; + /// uint32_t maxClusterCountPerAccelerationStructure; + /// } VkClusterAccelerationStructureClustersBottomLevelInputNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkClusterAccelerationStructureClustersBottomLevelInputNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.ClusterAccelerationStructureClustersBottomLevelInputNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxTotalClusterCount is the total number of clusters acceleration structures that will be built or moved across all input arguments. + /// + [FieldOffset(16)] + public int MaxTotalClusterCount; + + /// + /// MaxClusterCountPerAccelerationStructure is the maximum number of clusters acceleration structures that will be built or moved per input argument. + /// + [FieldOffset(20)] + public int MaxClusterCountPerAccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureCommandsInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureCommandsInfoNV.gen.cs new file mode 100644 index 0000000..b3a5dbf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureCommandsInfoNV.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureCommandsInfoNV - Structure describing parameters for building for moving an acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureCommandsInfoNV + /// + /// + /// The VkClusterAccelerationStructureCommandsInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureCommandsInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// VkClusterAccelerationStructureInputInfoNV input; + /// VkDeviceAddress dstImplicitData; + /// VkDeviceAddress scratchData; + /// VkStridedDeviceAddressRegionKHR dstAddressesArray; + /// VkStridedDeviceAddressRegionKHR dstSizesArray; + /// VkStridedDeviceAddressRegionKHR srcInfosArray; + /// VkDeviceAddress srcInfosCount; + /// VkClusterAccelerationStructureAddressResolutionFlagsNV addressResolutionFlags; + /// } VkClusterAccelerationStructureCommandsInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 160)] + public unsafe partial struct VkClusterAccelerationStructureCommandsInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ClusterAccelerationStructureCommandsInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Input is VkClusterAccelerationStructureInputInfoNV structure describing the build or move parameters for the cluster acceleration structure. + /// + [FieldOffset(16)] + public VkClusterAccelerationStructureInputInfoNV Input; + + /// + /// DstImplicitData is the device address for memory where the implicit build of cluster acceleration structure will be saved. If VkClusterAccelerationStructureInputInfoNV::opMode is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV or VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, this value is ignored. + /// + [FieldOffset(56)] + public VkDeviceAddress DstImplicitData; + + /// + /// ScratchData is the device address of scratch memory that will be used during cluster acceleration structure move or build. + /// + [FieldOffset(64)] + public VkDeviceAddress ScratchData; + + /// + /// DstAddressesArray is a VkStridedDeviceAddressRegionKHR that specifies addresses and stride for moved or built cluster acceleration structures, depending on the value of VkClusterAccelerationStructureInputInfoNV::opMode. If VkClusterAccelerationStructureInputInfoNV::opMode is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV and VkStridedDeviceAddressRegionKHR::deviceAddress is not `0`, then the implementation writes the cluster addresses to the specified region. If VkClusterAccelerationStructureInputInfoNV::opMode is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, the implementation reads the cluster addresses from the specified region. If VkClusterAccelerationStructureInputInfoNV::opMode is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, this member is ignored. + /// + [FieldOffset(72)] + public VkStridedDeviceAddressRegionKHR DstAddressesArray; + + /// + /// DstSizesArray is a VkStridedDeviceAddressRegionKHR containing sizes of moved or built cluster acceleration structures. If VkClusterAccelerationStructureInputInfoNV::opMode is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV or VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV, then the sizes are saved. If VkClusterAccelerationStructureInputInfoNV::opMode is VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, then the sizes are read from. + /// + [FieldOffset(96)] + public VkStridedDeviceAddressRegionKHR DstSizesArray; + + /// + /// SrcInfosArray is a VkStridedDeviceAddressRegionKHR where input data for the build or move operation is read from. If the stride is `0`, the structures are assumed to be packed tightly. Its format is dependent on VkClusterAccelerationStructureInputInfoNV::opType as per the table below. [options="header"] | + /// + [FieldOffset(120)] + public VkStridedDeviceAddressRegionKHR SrcInfosArray; + + /// + /// SrcInfosCount + /// + [FieldOffset(144)] + public VkDeviceAddress SrcInfosCount; + + /// + /// AddressResolutionFlags + /// + [FieldOffset(152)] + public VkClusterAccelerationStructureAddressResolutionFlagsNV AddressResolutionFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.gen.cs new file mode 100644 index 0000000..402837b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV - Parameters describing geometry index and flags values for cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV + /// + /// + /// The VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV { + /// uint32_t geometryIndex:24; + /// uint32_t reserved:5; + /// uint32_t geometryFlags:3; + /// } VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV() + { + /// + /// GeometryIndex specifies the geometry index for all triangles in the cluster acceleration structure. + /// + [FieldOffset(0)] + private int _geometryIndex; + + /// + /// Reserved is reserved for future use. + /// + [FieldOffset(0)] + private int _reserved; + + /// + /// GeometryFlags is a bitmask of VkClusterAccelerationStructureGeometryFlagsNV values describing geometry flags for the cluster acceleration structure. + /// + [FieldOffset(0)] + private int _geometryFlags; + } + + public partial struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV + { + /// + public int GeometryIndex + { + get => BitFields.ExtractRange(_geometryIndex, start: 0, length: 24); + set => BitFields.SetRange(ref _geometryIndex, start: 0, length: 24, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 24, length: 5); + set => BitFields.SetRange(ref _reserved, start: 24, length: 5, value); + } + + /// + public int GeometryFlags + { + get => BitFields.ExtractRange(_geometryFlags, start: 29, length: 3); + set => BitFields.SetRange(ref _geometryFlags, start: 29, length: 3, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGetTemplateIndicesInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGetTemplateIndicesInfoNV.gen.cs new file mode 100644 index 0000000..fd1de37 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureGetTemplateIndicesInfoNV.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureGetTemplateIndicesInfoNV - Parameters describing addresses of cluster template acceleration structure whose index data is requested + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureGetTemplateIndicesInfoNV + /// + /// + /// The VkClusterAccelerationStructureGetTemplateIndicesInfoNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureGetTemplateIndicesInfoNV { + /// VkDeviceAddress clusterTemplateAddress; + /// } VkClusterAccelerationStructureGetTemplateIndicesInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkClusterAccelerationStructureGetTemplateIndicesInfoNV() + { + /// + /// ClusterTemplateAddress is the device address of the cluster template acceleration structure whose index data is being fetched. + /// + [FieldOffset(0)] + public VkDeviceAddress ClusterTemplateAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInputInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInputInfoNV.gen.cs new file mode 100644 index 0000000..4015432 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInputInfoNV.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureInputInfoNV - Structure describing a cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureInputInfoNV + /// + /// + /// The VkClusterAccelerationStructureInputInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureInputInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxAccelerationStructureCount; + /// VkBuildAccelerationStructureFlagsKHR flags; + /// VkClusterAccelerationStructureOpTypeNV opType; + /// VkClusterAccelerationStructureOpModeNV opMode; + /// VkClusterAccelerationStructureOpInputNV opInput; + /// } VkClusterAccelerationStructureInputInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkClusterAccelerationStructureInputInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ClusterAccelerationStructureInputInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxAccelerationStructureCount is the maximum number of acceleration structures that will be provided to the multi indirect operation. + /// + [FieldOffset(16)] + public int MaxAccelerationStructureCount; + + /// + /// Flags is a bitmask of VkBuildAccelerationStructureFlagsKHR specifying flags for the multi indirect operation. + /// + [FieldOffset(20)] + public VkBuildAccelerationStructureFlagsKHR Flags; + + /// + /// OpType is a VkClusterAccelerationStructureOpTypeNV value specifying the type of operation to perform. + /// + [FieldOffset(24)] + public VkClusterAccelerationStructureOpTypeNV OpType; + + /// + /// OpMode is a VkClusterAccelerationStructureOpModeNV value specifying the mode of operation. + /// + [FieldOffset(28)] + public VkClusterAccelerationStructureOpModeNV OpMode; + + /// + /// OpInput is a VkClusterAccelerationStructureOpInputNV value specifying the descriptions of the operation. + /// + [FieldOffset(32)] + public VkClusterAccelerationStructureOpInputNV OpInput; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInstantiateClusterInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInstantiateClusterInfoNV.gen.cs new file mode 100644 index 0000000..cb9c78d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureInstantiateClusterInfoNV.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureInstantiateClusterInfoNV - Parameters describing instantiate operation for a template cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureInstantiateClusterInfoNV + /// + /// + /// The VkClusterAccelerationStructureInstantiateClusterInfoNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureInstantiateClusterInfoNV { + /// uint32_t clusterIdOffset; + /// uint32_t geometryIndexOffset:24; + /// uint32_t reserved:8; + /// VkDeviceAddress clusterTemplateAddress; + /// VkStridedDeviceAddressNV vertexBuffer; + /// } VkClusterAccelerationStructureInstantiateClusterInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct VkClusterAccelerationStructureInstantiateClusterInfoNV() + { + /// + /// ClusterIdOffset is an unsigned offset applied to the clusterID value stored in the cluster template. + /// + [FieldOffset(0)] + public int ClusterIdOffset; + + /// + /// GeometryIndexOffset is a signed offset applied to the geometry index of each triangle. + /// + [FieldOffset(4)] + private int _geometryIndexOffset; + + /// + /// Reserved is reserved for future use. + /// + [FieldOffset(4)] + private int _reserved; + + /// + /// ClusterTemplateAddress is the address of a previously built cluster template. + /// + [FieldOffset(8)] + public VkDeviceAddress ClusterTemplateAddress; + + /// + /// VertexBuffer is a VkStridedDeviceAddressNV structure containing the vertex data for the indexed triangles stored in the cluster template. If the address in VkStridedDeviceAddressNV is `0` the vertex data is sourced from the cluster template. + /// + [FieldOffset(16)] + public VkStridedDeviceAddressNV VertexBuffer; + } + + public partial struct VkClusterAccelerationStructureInstantiateClusterInfoNV + { + /// + public int GeometryIndexOffset + { + get => BitFields.ExtractRange(_geometryIndexOffset, start: 0, length: 24); + set => BitFields.SetRange(ref _geometryIndexOffset, start: 0, length: 24, value); + } + + /// + public int Reserved + { + get => BitFields.ExtractRange(_reserved, start: 24, length: 8); + set => BitFields.SetRange(ref _reserved, start: 24, length: 8, value); + } + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInfoNV.gen.cs new file mode 100644 index 0000000..a01d6e6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInfoNV.gen.cs @@ -0,0 +1,30 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureMoveObjectsInfoNV - Parameters describing move operation for a cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureMoveObjectsInfoNV + /// + /// + /// The VkClusterAccelerationStructureMoveObjectsInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureMoveObjectsInfoNV { + /// VkDeviceAddress srcAccelerationStructure; + /// } VkClusterAccelerationStructureMoveObjectsInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkClusterAccelerationStructureMoveObjectsInfoNV() + { + /// + /// SrcAccelerationStructure is the device address of the source cluster acceleration structure that will be moved. + /// + [FieldOffset(0)] + public VkDeviceAddress SrcAccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInputNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInputNV.gen.cs new file mode 100644 index 0000000..d4dccdd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureMoveObjectsInputNV.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureMoveObjectsInputNV - Parameters describing move information for an acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureMoveObjectsInputNV + /// + /// + /// The VkClusterAccelerationStructureMoveObjectsInputNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureMoveObjectsInputNV { + /// VkStructureType sType; + /// void* pNext; + /// VkClusterAccelerationStructureTypeNV type; + /// VkBool32 noMoveOverlap; + /// VkDeviceSize maxMovedBytes; + /// } VkClusterAccelerationStructureMoveObjectsInputNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkClusterAccelerationStructureMoveObjectsInputNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ClusterAccelerationStructureMoveObjectsInputNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is a VkClusterAccelerationStructureTypeNV value identifying the type of cluster acceleration structure. + /// + [FieldOffset(16)] + public VkClusterAccelerationStructureTypeNV Type; + + /// + /// NoMoveOverlap specifies if the source and destination cluster acceleration structures overlap in memory for the move operation. If set to VK_TRUE, the source cluster acceleration structure remains valid after the move and move operation acts like a copy. + /// + [FieldOffset(20)] + public Brutal.Bool32 NoMoveOverlap; + + /// + /// MaxMovedBytes is the maximum number of bytes that may: be moved in this operation. + /// + [FieldOffset(24)] + public ByteSize64 MaxMovedBytes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureOpInputNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureOpInputNV.gen.cs new file mode 100644 index 0000000..c17b52c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureOpInputNV.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureOpInputNV - Union specifying cluster acceleration structure description + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureOpInputNV + /// + /// + /// The VkClusterAccelerationStructureOpInputNV union is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef union VkClusterAccelerationStructureOpInputNV { + /// VkClusterAccelerationStructureClustersBottomLevelInputNV* pClustersBottomLevel; + /// VkClusterAccelerationStructureTriangleClusterInputNV* pTriangleClusters; + /// VkClusterAccelerationStructureMoveObjectsInputNV* pMoveObjects; + /// } VkClusterAccelerationStructureOpInputNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkClusterAccelerationStructureOpInputNV() + { + /// + /// ClustersBottomLevel is a VkClusterAccelerationStructureClustersBottomLevelInputNV structure specifying an upper threshold on parameters to build multiple bottom level acceleration structures from multiple cluster level acceleration structures. + /// + [FieldOffset(0)] + public VkClusterAccelerationStructureClustersBottomLevelInputNV* ClustersBottomLevel; + + /// + /// TriangleClusters is a VkClusterAccelerationStructureTriangleClusterInputNV structure specifying an upper threshold on parameters to build a regular or templated cluster acceleration structure. + /// + [FieldOffset(0)] + public VkClusterAccelerationStructureTriangleClusterInputNV* TriangleClusters; + + /// + /// MoveObjects is a VkClusterAccelerationStructureMoveObjectsInputNV structure specifying an upper threshold on the number of bytes moved and the type of acceleration structure being moved. + /// + [FieldOffset(0)] + public VkClusterAccelerationStructureMoveObjectsInputNV* MoveObjects; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureTriangleClusterInputNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureTriangleClusterInputNV.gen.cs new file mode 100644 index 0000000..a36a72b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkClusterAccelerationStructureTriangleClusterInputNV.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkClusterAccelerationStructureTriangleClusterInputNV - Parameters describing a cluster acceleration structure + /// + /// + /// + /// :refpage: VkClusterAccelerationStructureTriangleClusterInputNV + /// + /// + /// The VkClusterAccelerationStructureTriangleClusterInputNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkClusterAccelerationStructureTriangleClusterInputNV { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat vertexFormat; + /// uint32_t maxGeometryIndexValue; + /// uint32_t maxClusterUniqueGeometryCount; + /// uint32_t maxClusterTriangleCount; + /// uint32_t maxClusterVertexCount; + /// uint32_t maxTotalTriangleCount; + /// uint32_t maxTotalVertexCount; + /// uint32_t minPositionTruncateBitCount; + /// } VkClusterAccelerationStructureTriangleClusterInputNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkClusterAccelerationStructureTriangleClusterInputNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ClusterAccelerationStructureTriangleClusterInputNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexFormat is the VkFormat of each vertex element. + /// + [FieldOffset(16)] + public VkFormat VertexFormat; + + /// + /// MaxGeometryIndexValue is the maximum geometry index value for any constructed geometry. + /// + [FieldOffset(20)] + public int MaxGeometryIndexValue; + + /// + /// MaxClusterUniqueGeometryCount is the maximum number of unique values of the geometry index for each cluster or cluster template. + /// + [FieldOffset(24)] + public int MaxClusterUniqueGeometryCount; + + /// + /// MaxClusterTriangleCount + /// + [FieldOffset(28)] + public int MaxClusterTriangleCount; + + /// + /// MaxClusterVertexCount is the maximum number of unique vertices in the cluster's index buffer. + /// + [FieldOffset(32)] + public int MaxClusterVertexCount; + + /// + /// MaxTotalTriangleCount is the sum of all triangles across all clusters or cluster templates. + /// + [FieldOffset(36)] + public int MaxTotalTriangleCount; + + /// + /// MaxTotalVertexCount is the maximum number of vertices across all clusters or cluster templates. + /// + [FieldOffset(40)] + public int MaxTotalVertexCount; + + /// + /// MinPositionTruncateBitCount + /// + [FieldOffset(44)] + public int MinPositionTruncateBitCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCoarseSampleLocationNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCoarseSampleLocationNV.gen.cs new file mode 100644 index 0000000..9307d6e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCoarseSampleLocationNV.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCoarseSampleLocationNV - Structure specifying parameters controlling shading rate image usage + /// + /// + /// + /// The VkCoarseSampleLocationNV structure identifies a specific pixel and + /// sample index^ for one of the + /// coverage samples in a fragment that is larger than one pixel. + /// This structure is defined as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkCoarseSampleLocationNV { + /// uint32_t pixelX; + /// uint32_t pixelY; + /// uint32_t sample; + /// } VkCoarseSampleLocationNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkCoarseSampleLocationNV() + { + /// + /// PixelX is added to the x coordinate of the upper-leftmost pixel of each fragment to identify the pixel containing the coverage sample. + /// + [FieldOffset(0)] + public int PixelX; + + /// + /// PixelY is added to the y coordinate of the upper-leftmost pixel of each fragment to identify the pixel containing the coverage sample. + /// + [FieldOffset(4)] + public int PixelY; + + /// + /// Sample is the number of the coverage sample in the pixel identified by pixelX and pixelY. + /// + [FieldOffset(8)] + public int Sample; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCoarseSampleOrderCustomNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCoarseSampleOrderCustomNV.gen.cs new file mode 100644 index 0000000..20d513f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCoarseSampleOrderCustomNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCoarseSampleOrderCustomNV - Structure specifying parameters controlling shading rate image usage + /// + /// + /// + /// The VkCoarseSampleOrderCustomNV structure is defined as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkCoarseSampleOrderCustomNV { + /// VkShadingRatePaletteEntryNV shadingRate; + /// uint32_t sampleCount; + /// uint32_t sampleLocationCount; + /// const VkCoarseSampleLocationNV* pSampleLocations; + /// } VkCoarseSampleOrderCustomNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkCoarseSampleOrderCustomNV() + { + /// + /// ShadingRate is a shading rate palette entry that identifies the fragment width and height for the combination of fragment area and per-pixel coverage sample count to control. + /// + [FieldOffset(0)] + public VkShadingRatePaletteEntryNV ShadingRate; + + /// + /// SampleCount identifies the per-pixel coverage sample count for the combination of fragment area and coverage sample count to control. + /// + [FieldOffset(4)] + public int SampleCount; + + /// + /// SampleLocationCount specifies the number of sample locations in the custom ordering. + /// + [FieldOffset(8)] + public int SampleLocationCount; + + /// + /// SampleLocations is a pointer to an array of VkCoarseSampleLocationNV structures specifying the location of each sample in the custom ordering. + /// + [FieldOffset(16)] + public VkCoarseSampleLocationNV* SampleLocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkColorBlendAdvancedEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkColorBlendAdvancedEXT.gen.cs new file mode 100644 index 0000000..01a49ae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkColorBlendAdvancedEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkColorBlendAdvancedEXT - Structure specifying the advanced blend operation parameters for an attachment + /// + /// + /// + /// The VkColorBlendAdvancedEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// typedef struct VkColorBlendAdvancedEXT { + /// VkBlendOp advancedBlendOp; + /// VkBool32 srcPremultiplied; + /// VkBool32 dstPremultiplied; + /// VkBlendOverlapEXT blendOverlap; + /// VkBool32 clampResults; + /// } VkColorBlendAdvancedEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VkColorBlendAdvancedEXT() + { + /// + /// AdvancedBlendOp selects which blend operation is used to calculate the RGB values to write to the color attachment. + /// + [FieldOffset(0)] + public VkBlendOp AdvancedBlendOp; + + /// + /// SrcPremultiplied specifies whether the source color of the blend operation is treated as premultiplied. + /// + [FieldOffset(4)] + public Brutal.Bool32 SrcPremultiplied; + + /// + /// DstPremultiplied specifies whether the destination color of the blend operation is treated as premultiplied. + /// + [FieldOffset(8)] + public Brutal.Bool32 DstPremultiplied; + + /// + /// BlendOverlap is a VkBlendOverlapEXT value specifying how the source and destination sample's coverage is correlated. + /// + [FieldOffset(12)] + public VkBlendOverlapEXT BlendOverlap; + + /// + /// ClampResults specifies that results must be clamped to the [0,1] range before writing to the attachment, which is useful when the attachment format is not normalized fixed-point. + /// + [FieldOffset(16)] + public Brutal.Bool32 ClampResults; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkColorBlendEquationEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkColorBlendEquationEXT.gen.cs new file mode 100644 index 0000000..9e086fd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkColorBlendEquationEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkColorBlendEquationEXT - Structure specifying the color blend factors and operations for an attachment + /// + /// + /// + /// The VkColorBlendEquationEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object + /// typedef struct VkColorBlendEquationEXT { + /// VkBlendFactor srcColorBlendFactor; + /// VkBlendFactor dstColorBlendFactor; + /// VkBlendOp colorBlendOp; + /// VkBlendFactor srcAlphaBlendFactor; + /// VkBlendFactor dstAlphaBlendFactor; + /// VkBlendOp alphaBlendOp; + /// } VkColorBlendEquationEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkColorBlendEquationEXT() + { + /// + /// SrcColorBlendFactor selects which blend factor is used to determine the source factors (S~r~,S~g~,S~b~). + /// + [FieldOffset(0)] + public VkBlendFactor SrcColorBlendFactor; + + /// + /// DstColorBlendFactor selects which blend factor is used to determine the destination factors (D~r~,D~g~,D~b~). + /// + [FieldOffset(4)] + public VkBlendFactor DstColorBlendFactor; + + /// + /// ColorBlendOp selects which blend operation is used to calculate the RGB values to write to the color attachment. + /// + [FieldOffset(8)] + public VkBlendOp ColorBlendOp; + + /// + /// SrcAlphaBlendFactor selects which blend factor is used to determine the source factor S~a~. + /// + [FieldOffset(12)] + public VkBlendFactor SrcAlphaBlendFactor; + + /// + /// DstAlphaBlendFactor selects which blend factor is used to determine the destination factor D~a~. + /// + [FieldOffset(16)] + public VkBlendFactor DstAlphaBlendFactor; + + /// + /// AlphaBlendOp selects which blend operation is use to calculate the alpha values to write to the color attachment. + /// + [FieldOffset(20)] + public VkBlendOp AlphaBlendOp; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferAllocateInfo.gen.cs new file mode 100644 index 0000000..fcd52b5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferAllocateInfo.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferAllocateInfo - Structure specifying the allocation parameters for command buffer object + /// + /// + /// + /// The VkCommandBufferAllocateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkCommandBufferAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkCommandPool commandPool; + /// VkCommandBufferLevel level; + /// uint32_t commandBufferCount; + /// } VkCommandBufferAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCommandBufferAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CommandPool is the command pool from which the command buffers are allocated. + /// + [FieldOffset(16)] + public VkCommandPool CommandPool; + + /// + /// Level is a VkCommandBufferLevel value specifying the command buffer level. + /// + [FieldOffset(24)] + public VkCommandBufferLevel Level; + + /// + /// CommandBufferCount is the number of command buffers to allocate from the pool. + /// + [FieldOffset(28)] + internal int CommandBufferCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferBeginInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferBeginInfo.gen.cs new file mode 100644 index 0000000..bfa4afd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferBeginInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferBeginInfo - Structure specifying a command buffer begin operation + /// + /// + /// + /// The VkCommandBufferBeginInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkCommandBufferBeginInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkCommandBufferUsageFlags flags; + /// const VkCommandBufferInheritanceInfo* pInheritanceInfo; + /// } VkCommandBufferBeginInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCommandBufferBeginInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferBeginInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkCommandBufferUsageFlags specifying usage behavior for the command buffer. + /// + [FieldOffset(16)] + public VkCommandBufferUsageFlags Flags; + + /// + /// InheritanceInfo is a pointer to a VkCommandBufferInheritanceInfo structure, used if commandBuffer is a secondary command buffer. If this is a primary command buffer, then this value is ignored. + /// + [FieldOffset(24)] + public VkCommandBufferInheritanceInfo* InheritanceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceConditionalRenderingInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceConditionalRenderingInfoEXT.gen.cs new file mode 100644 index 0000000..ebbbaae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceConditionalRenderingInfoEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferInheritanceConditionalRenderingInfoEXT - Structure specifying command buffer inheritance information + /// + /// + /// + /// If the pNext chain of VkCommandBufferInheritanceInfo includes a + /// VkCommandBufferInheritanceConditionalRenderingInfoEXT structure, then + /// that structure controls whether a command buffer can be executed while + /// conditional rendering is active^ in the + /// primary command buffer. + /// + /// + /// The VkCommandBufferInheritanceConditionalRenderingInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_conditional_rendering + /// typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 conditionalRenderingEnable; + /// } VkCommandBufferInheritanceConditionalRenderingInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkCommandBufferInheritanceConditionalRenderingInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferInheritanceConditionalRenderingInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ConditionalRenderingEnable specifies whether the command buffer can be executed while conditional rendering is active in the primary command buffer. If this is VK_TRUE, then this command buffer can be executed whether the primary command buffer has active conditional rendering or not. If this is VK_FALSE, then the primary command buffer must not have conditional rendering active. + /// + [FieldOffset(16)] + public Brutal.Bool32 ConditionalRenderingEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceDescriptorHeapInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceDescriptorHeapInfoEXT.gen.cs new file mode 100644 index 0000000..a78afba --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceDescriptorHeapInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferInheritanceDescriptorHeapInfoEXT - Structure specifying command buffer inheritance information + /// + /// + /// + /// If the pNext chain of VkCommandBufferInheritanceInfo includes a + /// VkCommandBufferInheritanceDescriptorHeapInfoEXT structure, then that + /// structure indicates that the secondary will use the same descriptor heaps as + /// the primary command buffer. + /// + /// + /// The VkCommandBufferInheritanceDescriptorHeapInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkCommandBufferInheritanceDescriptorHeapInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const VkBindHeapInfoEXT* pSamplerHeapBindInfo; + /// const VkBindHeapInfoEXT* pResourceHeapBindInfo; + /// } VkCommandBufferInheritanceDescriptorHeapInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCommandBufferInheritanceDescriptorHeapInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferInheritanceDescriptorHeapInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SamplerHeapBindInfo specifies the VkBindHeapInfoEXT of the sampler heap bound using vkCmdBindSamplerHeapEXT in the primary. If this is `NULL`, it indicates that no sampler heap is bound. + /// + [FieldOffset(16)] + public VkBindHeapInfoEXT* SamplerHeapBindInfo; + + /// + /// ResourceHeapBindInfo specifies the VkBindHeapInfoEXT of the resource heap bound using vkCmdBindResourceHeapEXT in the primary. If this is `NULL`, it indicates that no resource heap is bound. + /// + [FieldOffset(24)] + public VkBindHeapInfoEXT* ResourceHeapBindInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceInfo.gen.cs new file mode 100644 index 0000000..c5c0827 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceInfo.gen.cs @@ -0,0 +1,77 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferInheritanceInfo - Structure specifying command buffer inheritance information + /// + /// + /// + /// If the command buffer is a secondary command buffer, then the + /// VkCommandBufferInheritanceInfo structure defines any state that will + /// be inherited from the primary command buffer: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkCommandBufferInheritanceInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderPass renderPass; + /// uint32_t subpass; + /// VkFramebuffer framebuffer; + /// VkBool32 occlusionQueryEnable; + /// VkQueryControlFlags queryFlags; + /// VkQueryPipelineStatisticFlags pipelineStatistics; + /// } VkCommandBufferInheritanceInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCommandBufferInheritanceInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferInheritanceInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RenderPass is a VkRenderPass object defining which render passes the VkCommandBuffer will be compatible^ with and can be executed within. + /// + [FieldOffset(16)] + public VkRenderPass RenderPass; + + /// + /// Subpass is the index of the subpass within the render pass instance that the VkCommandBuffer will be executed within. + /// + [FieldOffset(24)] + public int Subpass; + + /// + /// Framebuffer can refer to the VkFramebuffer object that the VkCommandBuffer will be rendering to if it is executed within a render pass instance. It can be VK_NULL_HANDLE if the framebuffer is not known. + [NOTE] + /// + [FieldOffset(32)] + public VkFramebuffer Framebuffer; + + /// + /// OcclusionQueryEnable + /// + [FieldOffset(40)] + public Brutal.Bool32 OcclusionQueryEnable; + + /// + /// QueryFlags + /// + [FieldOffset(44)] + public VkQueryControlFlags QueryFlags; + + /// + /// PipelineStatistics + /// + [FieldOffset(48)] + public VkQueryPipelineStatisticFlags PipelineStatistics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.gen.cs new file mode 100644 index 0000000..1ba3861 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderPassTransformInfoQCOM.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferInheritanceRenderPassTransformInfoQCOM - Structure describing transformed render pass parameters command buffer + /// + /// + /// + /// To begin recording a secondary command buffer compatible with execution + /// inside a render pass using render + /// pass transform^, add the + /// VkCommandBufferInheritanceRenderPassTransformInfoQCOM to the + /// pNext chain of VkCommandBufferInheritanceInfo structure passed + /// to the vkBeginCommandBuffer command specifying the parameters for + /// transformed rasterization. + /// + /// + /// The VkCommandBufferInheritanceRenderPassTransformInfoQCOM structure is + /// defined as: + /// + /// + /// // Provided by VK_QCOM_render_pass_transform + /// typedef struct VkCommandBufferInheritanceRenderPassTransformInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkSurfaceTransformFlagBitsKHR transform; + /// VkRect2D renderArea; + /// } VkCommandBufferInheritanceRenderPassTransformInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCommandBufferInheritanceRenderPassTransformInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferInheritanceRenderPassTransformInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Transform is a VkSurfaceTransformFlagsKHR value describing the transform to be applied to the render pass. + /// + [FieldOffset(16)] + public VkSurfaceTransformFlagsKHR Transform; + + /// + /// RenderArea is the render area that is affected by the command buffer. + /// + [FieldOffset(20)] + public VkRect2D RenderArea; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderingInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderingInfo.gen.cs new file mode 100644 index 0000000..3aaaa6a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceRenderingInfo.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferInheritanceRenderingInfo - Structure specifying command buffer inheritance info for dynamic render pass instances + /// + /// + /// + /// The VkCommandBufferInheritanceRenderingInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkCommandBufferInheritanceRenderingInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderingFlags flags; + /// uint32_t viewMask; + /// uint32_t colorAttachmentCount; + /// const VkFormat* pColorAttachmentFormats; + /// VkFormat depthAttachmentFormat; + /// VkFormat stencilAttachmentFormat; + /// VkSampleCountFlagBits rasterizationSamples; + /// } VkCommandBufferInheritanceRenderingInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCommandBufferInheritanceRenderingInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferInheritanceRenderingInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkRenderingFlags used by the render pass instance. + /// + [FieldOffset(16)] + public VkRenderingFlags Flags; + + /// + /// ViewMask is the view mask used for rendering. + /// + [FieldOffset(20)] + public int ViewMask; + + /// + /// ColorAttachmentCount is the number of color attachments specified in the render pass instance. + /// + [FieldOffset(24)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentFormats is a pointer to an array of VkFormat values defining the format of color attachments. + /// + [FieldOffset(32)] + public VkFormat* ColorAttachmentFormats; + + /// + /// DepthAttachmentFormat is a VkFormat value defining the format of the depth attachment. + /// + [FieldOffset(40)] + public VkFormat DepthAttachmentFormat; + + /// + /// StencilAttachmentFormat is a VkFormat value defining the format of the stencil attachment. + /// + [FieldOffset(44)] + public VkFormat StencilAttachmentFormat; + + /// + /// RasterizationSamples is a VkSampleCountFlags specifying the number of samples used in rasterization. + /// + [FieldOffset(48)] + public VkSampleCountFlags RasterizationSamples; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceViewportScissorInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceViewportScissorInfoNV.gen.cs new file mode 100644 index 0000000..2701d8a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferInheritanceViewportScissorInfoNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferInheritanceViewportScissorInfoNV - Structure specifying command buffer inheritance information + /// + /// + /// + /// The VkCommandBufferInheritanceViewportScissorInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_inherited_viewport_scissor + /// typedef struct VkCommandBufferInheritanceViewportScissorInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 viewportScissor2D; + /// uint32_t viewportDepthCount; + /// const VkViewport* pViewportDepths; + /// } VkCommandBufferInheritanceViewportScissorInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCommandBufferInheritanceViewportScissorInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferInheritanceViewportScissorInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ViewportScissor2D specifies whether the listed dynamic state is inherited. + /// + [FieldOffset(16)] + public Brutal.Bool32 ViewportScissor2D; + + /// + /// ViewportDepthCount specifies the maximum number of viewports to inherit. When viewportScissor2D is VK_FALSE, the behavior is as if this value is zero. + /// + [FieldOffset(20)] + public int ViewportDepthCount; + + /// + /// ViewportDepths is a pointer to a VkViewport structure specifying the expected depth range for each inherited viewport. + /// + [FieldOffset(24)] + public VkViewport* ViewportDepths; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandBufferSubmitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandBufferSubmitInfo.gen.cs new file mode 100644 index 0000000..865ac30 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandBufferSubmitInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandBufferSubmitInfo - Structure specifying a command buffer submission + /// + /// + /// + /// The VkCommandBufferSubmitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkCommandBufferSubmitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkCommandBuffer commandBuffer; + /// uint32_t deviceMask; + /// } VkCommandBufferSubmitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCommandBufferSubmitInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandBufferSubmitInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CommandBuffer is a VkCommandBuffer to be submitted for execution. + /// + [FieldOffset(16)] + public VkCommandBuffer CommandBuffer; + + /// + /// DeviceMask is a bitmask indicating which devices in a device group execute the command buffer. A deviceMask of `0` is equivalent to setting all bits corresponding to valid devices in the group to `1`. + /// + [FieldOffset(24)] + public int DeviceMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCommandPoolCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCommandPoolCreateInfo.gen.cs new file mode 100644 index 0000000..a4bfc65 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCommandPoolCreateInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCommandPoolCreateInfo - Structure specifying parameters of a newly created command pool + /// + /// + /// + /// The VkCommandPoolCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkCommandPoolCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkCommandPoolCreateFlags flags; + /// uint32_t queueFamilyIndex; + /// } VkCommandPoolCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkCommandPoolCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CommandPoolCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkCommandPoolCreateFlags indicating usage behavior for the pool and command buffers allocated from it. + /// + [FieldOffset(16)] + public VkCommandPoolCreateFlags Flags; + + /// + /// QueueFamilyIndex designates a queue family as described in section Queue Family Properties^. All command buffers allocated from this command pool must be submitted on queues from the same queue family. + /// + [FieldOffset(20)] + public int QueueFamilyIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkComponentMapping.gen.cs b/Brutal.Vulkan/Generated/Structs/VkComponentMapping.gen.cs new file mode 100644 index 0000000..e1425e8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkComponentMapping.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkComponentMapping - Structure specifying a color component mapping + /// + /// + /// + /// The VkComponentMapping structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkComponentMapping { + /// VkComponentSwizzle r; + /// VkComponentSwizzle g; + /// VkComponentSwizzle b; + /// VkComponentSwizzle a; + /// } VkComponentMapping; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkComponentMapping() + { + /// + /// R is a VkComponentSwizzle specifying the component value placed in the R component of the output vector. + /// + [FieldOffset(0)] + public VkComponentSwizzle R; + + /// + /// G is a VkComponentSwizzle specifying the component value placed in the G component of the output vector. + /// + [FieldOffset(4)] + public VkComponentSwizzle G; + + /// + /// B is a VkComponentSwizzle specifying the component value placed in the B component of the output vector. + /// + [FieldOffset(8)] + public VkComponentSwizzle B; + + /// + /// A is a VkComponentSwizzle specifying the component value placed in the A component of the output vector. + /// + [FieldOffset(12)] + public VkComponentSwizzle A; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkComputeOccupancyPriorityParametersNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkComputeOccupancyPriorityParametersNV.gen.cs new file mode 100644 index 0000000..a480af5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkComputeOccupancyPriorityParametersNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkComputeOccupancyPriorityParametersNV - Structure specifying compute occupancy priority parameters + /// + /// + /// + /// The VkComputeOccupancyPriorityParametersNV structure is defined as: + /// + /// + /// // Provided by VK_NV_compute_occupancy_priority + /// typedef struct VkComputeOccupancyPriorityParametersNV { + /// VkStructureType sType; + /// const void* pNext; + /// float occupancyPriority; + /// float occupancyThrottling; + /// } VkComputeOccupancyPriorityParametersNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkComputeOccupancyPriorityParametersNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ComputeOccupancyPriorityParametersNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OccupancyPriority is a value specifying the occupancy priority for subsequent compute workloads, with a valid range of [0.0, 1.0]. A value of 0.0 represents the lowest priority, while a value of 1.0 is the maximum priority. Default priority is specified by a value of 0.5. + /// + [FieldOffset(16)] + public float OccupancyPriority; + + /// + /// OccupancyThrottling is a value specifying the level of occupancy throttling applied to subsequent workloads, with a valid range of [0.0, 1.0]. A value of 0.0 (the default) means no throttling is applied, allowing workloads to use the full available compute capacity. Non-zero values represent increasing levels of throttling, with higher values resulting in more restrictive occupancy limits. A value of 1.0 represents the maximum level of throttling supported by the implementation. + /// + [FieldOffset(20)] + public float OccupancyThrottling; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkComputePipelineCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkComputePipelineCreateInfo.gen.cs new file mode 100644 index 0000000..44e6d3c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkComputePipelineCreateInfo.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkComputePipelineCreateInfo - Structure specifying parameters of a newly created compute pipeline + /// + /// + /// + /// :refpage: VkComputePipelineCreateInfo + /// + /// + /// The VkComputePipelineCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkComputePipelineCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreateFlags flags; + /// VkPipelineShaderStageCreateInfo stage; + /// VkPipelineLayout layout; + /// VkPipeline basePipelineHandle; + /// int32_t basePipelineIndex; + /// } VkComputePipelineCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkComputePipelineCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ComputePipelineCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineCreateFlags specifying how the pipeline will be generated. + /// + [FieldOffset(16)] + public VkPipelineCreateFlags Flags; + + /// + /// Stage is a VkPipelineShaderStageCreateInfo structure describing the compute shader. + /// + [FieldOffset(24)] + public VkPipelineShaderStageCreateInfo Stage; + + /// + /// Layout is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. + /// + [FieldOffset(72)] + public VkPipelineLayout Layout; + + /// + /// BasePipelineHandle is a pipeline to derive from. + /// + [FieldOffset(80)] + public VkPipeline BasePipelineHandle; + + /// + /// BasePipelineIndex is an index into the pCreateInfos parameter to use as a pipeline to derive from. + /// + [FieldOffset(88)] + public int BasePipelineIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkComputePipelineIndirectBufferInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkComputePipelineIndirectBufferInfoNV.gen.cs new file mode 100644 index 0000000..4caa584 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkComputePipelineIndirectBufferInfoNV.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkComputePipelineIndirectBufferInfoNV - Structure describing the device address where pipeline&apos;s metadata will be saved + /// + /// + /// + /// The VkComputePipelineIndirectBufferInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// typedef struct VkComputePipelineIndirectBufferInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddress deviceAddress; + /// VkDeviceSize size; + /// VkDeviceAddress pipelineDeviceAddressCaptureReplay; + /// } VkComputePipelineIndirectBufferInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkComputePipelineIndirectBufferInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ComputePipelineIndirectBufferInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceAddress is the address where the pipeline's metadata will be stored. + /// + [FieldOffset(16)] + public VkDeviceAddress DeviceAddress; + + /// + /// Size is the size of pipeline's metadata that was queried using vkGetPipelineIndirectMemoryRequirementsNV. + /// + [FieldOffset(24)] + public ByteSize64 Size; + + /// + /// PipelineDeviceAddressCaptureReplay is the device address where pipeline's metadata was originally saved and can now be used to re-populate deviceAddress for replay. + /// + [FieldOffset(32)] + public VkDeviceAddress PipelineDeviceAddressCaptureReplay; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfo2EXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfo2EXT.gen.cs new file mode 100644 index 0000000..cf665c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfo2EXT.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkConditionalRenderingBeginInfo2EXT - Structure specifying conditional rendering begin information + /// + /// + /// + /// :refpage: VkConditionalRenderingBeginInfo2EXT + /// + /// + /// The VkConditionalRenderingBeginInfo2EXT structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering + /// typedef struct VkConditionalRenderingBeginInfo2EXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// VkConditionalRenderingFlagsEXT flags; + /// } VkConditionalRenderingBeginInfo2EXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkConditionalRenderingBeginInfo2EXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ConditionalRenderingBeginInfo2EXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is the VkDeviceAddressRangeKHR containing the predicate for conditional rendering. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(32)] + public VkAddressCommandFlagsKHR AddressFlags; + + /// + /// Flags is a bitmask of VkConditionalRenderingFlagsEXT specifying the behavior of conditional rendering. + /// + [FieldOffset(36)] + public VkConditionalRenderingFlagsEXT Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfoEXT.gen.cs new file mode 100644 index 0000000..2c265db --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkConditionalRenderingBeginInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkConditionalRenderingBeginInfoEXT - Structure specifying conditional rendering begin information + /// + /// + /// + /// The VkConditionalRenderingBeginInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_conditional_rendering + /// typedef struct VkConditionalRenderingBeginInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// VkConditionalRenderingFlagsEXT flags; + /// } VkConditionalRenderingBeginInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkConditionalRenderingBeginInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ConditionalRenderingBeginInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer is a buffer containing the predicate for conditional rendering. + /// + [FieldOffset(16)] + public VkBuffer Buffer; + + /// + /// Offset is the byte offset into buffer where the predicate is located. + /// + [FieldOffset(24)] + public ByteSize64 Offset; + + /// + /// Flags is a bitmask of VkConditionalRenderingFlagsEXT specifying the behavior of conditional rendering. + /// + [FieldOffset(32)] + public VkConditionalRenderingFlagsEXT Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkConformanceVersion.gen.cs b/Brutal.Vulkan/Generated/Structs/VkConformanceVersion.gen.cs new file mode 100644 index 0000000..5e95879 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkConformanceVersion.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkConformanceVersion - Structure containing the conformance test suite version the implementation is compliant with + /// + /// + /// + /// The conformance test suite version an implementation is compliant with is + /// described with the VkConformanceVersion structure: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkConformanceVersion { + /// uint8_t major; + /// uint8_t minor; + /// uint8_t subminor; + /// uint8_t patch; + /// } VkConformanceVersion; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkConformanceVersion() + { + /// + /// Major is the major version number of the conformance test suite. + /// + [FieldOffset(0)] + public byte Major; + + /// + /// Minor is the minor version number of the conformance test suite. + /// + [FieldOffset(1)] + public byte Minor; + + /// + /// Subminor is the subminor version number of the conformance test suite. + /// + [FieldOffset(2)] + public byte Subminor; + + /// + /// Patch is the patch version number of the conformance test suite. + /// + [FieldOffset(3)] + public byte Patch; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkConvertCooperativeVectorMatrixInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkConvertCooperativeVectorMatrixInfoNV.gen.cs new file mode 100644 index 0000000..0a1d42d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkConvertCooperativeVectorMatrixInfoNV.gen.cs @@ -0,0 +1,121 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkConvertCooperativeVectorMatrixInfoNV - Structure specifying a request to convert the layout and type of a cooperative vector matrix + /// + /// + /// + /// Each VkConvertCooperativeVectorMatrixInfoNV structure describes a + /// request to convert the layout and type of a cooperative vector matrix. + /// + /// + /// The VkConvertCooperativeVectorMatrixInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// typedef struct VkConvertCooperativeVectorMatrixInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// size_t srcSize; + /// VkDeviceOrHostAddressConstKHR srcData; + /// size_t* pDstSize; + /// VkDeviceOrHostAddressKHR dstData; + /// VkComponentTypeKHR srcComponentType; + /// VkComponentTypeKHR dstComponentType; + /// uint32_t numRows; + /// uint32_t numColumns; + /// VkCooperativeVectorMatrixLayoutNV srcLayout; + /// size_t srcStride; + /// VkCooperativeVectorMatrixLayoutNV dstLayout; + /// size_t dstStride; + /// } VkConvertCooperativeVectorMatrixInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkConvertCooperativeVectorMatrixInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ConvertCooperativeVectorMatrixInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcSize is the length in bytes of srcData. + /// + [FieldOffset(16)] + public nuint SrcSize; + + /// + /// SrcData is either `NULL` or a pointer to the source data in the source layout. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressConstKHR SrcData; + + /// + /// DstSize is a pointer to an integer related to the number of bytes required or requested to convert. + /// + [FieldOffset(32)] + public nuint* DstSize; + + /// + /// DstData is either `NULL` or a pointer to the destination data in the destination layout. + /// + [FieldOffset(40)] + public VkDeviceOrHostAddressKHR DstData; + + /// + /// SrcComponentType is the type of a source matrix element. + /// + [FieldOffset(48)] + public VkComponentTypeKHR SrcComponentType; + + /// + /// DstComponentType is the type of a destination matrix element. + /// + [FieldOffset(52)] + public VkComponentTypeKHR DstComponentType; + + /// + /// NumRows is the number of rows in the matrix. + /// + [FieldOffset(56)] + public int NumRows; + + /// + /// NumColumns is the number of columns in the matrix. + /// + [FieldOffset(60)] + public int NumColumns; + + /// + /// SrcLayout is the layout of the source matrix. + /// + [FieldOffset(64)] + public VkCooperativeVectorMatrixLayoutNV SrcLayout; + + /// + /// SrcStride is the number of bytes between a consecutive row or column (depending on srcLayout) of the source matrix, if it is row-major or column-major. + /// + [FieldOffset(72)] + public nuint SrcStride; + + /// + /// DstLayout is the layout the matrix is converted to. + /// + [FieldOffset(80)] + public VkCooperativeVectorMatrixLayoutNV DstLayout; + + /// + /// DstStride is the number of bytes between a consecutive row or column (depending on dstLayout) of destination matrix, if it is row-major or column-major. + /// + [FieldOffset(88)] + public nuint DstStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.gen.cs new file mode 100644 index 0000000..b9e6dcd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixFlexibleDimensionsPropertiesNV.gen.cs @@ -0,0 +1,104 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCooperativeMatrixFlexibleDimensionsPropertiesNV - Structure specifying cooperative matrix properties + /// + /// + /// + /// The VkCooperativeMatrixFlexibleDimensionsPropertiesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix2 + /// typedef struct VkCooperativeMatrixFlexibleDimensionsPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t MGranularity; + /// uint32_t NGranularity; + /// uint32_t KGranularity; + /// VkComponentTypeKHR AType; + /// VkComponentTypeKHR BType; + /// VkComponentTypeKHR CType; + /// VkComponentTypeKHR ResultType; + /// VkBool32 saturatingAccumulation; + /// VkScopeKHR scope; + /// uint32_t workgroupInvocations; + /// } VkCooperativeMatrixFlexibleDimensionsPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCooperativeMatrixFlexibleDimensionsPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CooperativeMatrixFlexibleDimensionsPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MGranularity is the granularity of the number of rows in matrices A, C, and Result. The rows must be an integer multiple of this value. + /// + [FieldOffset(16)] + public int MGranularity; + + /// + /// NGranularity is the granularity of columns in matrices B, C, Result. The columns must be an integer multiple of this value. + /// + [FieldOffset(20)] + public int NGranularity; + + /// + /// KGranularity is the granularity of columns in matrix A and rows in matrix B. The columns/rows must be an integer multiple of this value. + /// + [FieldOffset(24)] + public int KGranularity; + + /// + /// AType is the component type of matrix A, of type VkComponentTypeKHR. + /// + [FieldOffset(28)] + public VkComponentTypeKHR AType; + + /// + /// BType is the component type of matrix B, of type VkComponentTypeKHR. + /// + [FieldOffset(32)] + public VkComponentTypeKHR BType; + + /// + /// CType is the component type of matrix C, of type VkComponentTypeKHR. + /// + [FieldOffset(36)] + public VkComponentTypeKHR CType; + + /// + /// ResultType is the component type of matrix Result, of type VkComponentTypeKHR. + /// + [FieldOffset(40)] + public VkComponentTypeKHR ResultType; + + /// + /// SaturatingAccumulation indicates whether the SaturatingAccumulation operand to OpCooperativeMatrixMulAddKHR must be present or not. If it is VK_TRUE, the SaturatingAccumulation operand must be present. If it is VK_FALSE, the SaturatingAccumulation operand must not be present. + /// + [FieldOffset(44)] + public Brutal.Bool32 SaturatingAccumulation; + + /// + /// Scope is the scope of all the matrix types, of type VkScopeKHR. + /// + [FieldOffset(48)] + public VkScopeKHR Scope; + + /// + /// WorkgroupInvocations is the number of invocations in the local workgroup when this combination of values is supported. + /// + [FieldOffset(52)] + public int WorkgroupInvocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesKHR.gen.cs new file mode 100644 index 0000000..b85fcde --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesKHR.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCooperativeMatrixPropertiesKHR - Structure specifying cooperative matrix properties + /// + /// + /// + /// The VkCooperativeMatrixPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_cooperative_matrix + /// typedef struct VkCooperativeMatrixPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t MSize; + /// uint32_t NSize; + /// uint32_t KSize; + /// VkComponentTypeKHR AType; + /// VkComponentTypeKHR BType; + /// VkComponentTypeKHR CType; + /// VkComponentTypeKHR ResultType; + /// VkBool32 saturatingAccumulation; + /// VkScopeKHR scope; + /// } VkCooperativeMatrixPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCooperativeMatrixPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CooperativeMatrixPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MSize is the number of rows in matrices A, C, and Result. + /// + [FieldOffset(16)] + public int MSize; + + /// + /// NSize is the number of columns in matrices B, C, Result. + /// + [FieldOffset(20)] + public int NSize; + + /// + /// KSize is the number of columns in matrix A and rows in matrix B. + /// + [FieldOffset(24)] + public int KSize; + + /// + /// AType is the component type of matrix A, of type VkComponentTypeKHR. + /// + [FieldOffset(28)] + public VkComponentTypeKHR AType; + + /// + /// BType is the component type of matrix B, of type VkComponentTypeKHR. + /// + [FieldOffset(32)] + public VkComponentTypeKHR BType; + + /// + /// CType is the component type of matrix C, of type VkComponentTypeKHR. + /// + [FieldOffset(36)] + public VkComponentTypeKHR CType; + + /// + /// ResultType is the component type of matrix Result, of type VkComponentTypeKHR. + /// + [FieldOffset(40)] + public VkComponentTypeKHR ResultType; + + /// + /// SaturatingAccumulation indicates whether the SaturatingAccumulation operand to OpCooperativeMatrixMulAddKHR must be present or not. If it is VK_TRUE, the SaturatingAccumulation operand must be present. If it is VK_FALSE, the SaturatingAccumulation operand must not be present. + /// + [FieldOffset(44)] + public Brutal.Bool32 SaturatingAccumulation; + + /// + /// Scope is the scope of all the matrix types, of type VkScopeKHR. + /// + [FieldOffset(48)] + public VkScopeKHR Scope; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesNV.gen.cs new file mode 100644 index 0000000..62bffb2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCooperativeMatrixPropertiesNV.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCooperativeMatrixPropertiesNV - Structure specifying cooperative matrix properties + /// + /// + /// + /// The VkCooperativeMatrixPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix + /// typedef struct VkCooperativeMatrixPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t MSize; + /// uint32_t NSize; + /// uint32_t KSize; + /// VkComponentTypeNV AType; + /// VkComponentTypeNV BType; + /// VkComponentTypeNV CType; + /// VkComponentTypeNV DType; + /// VkScopeNV scope; + /// } VkCooperativeMatrixPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkCooperativeMatrixPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CooperativeMatrixPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MSize is the number of rows in matrices A, C, and D. + /// + [FieldOffset(16)] + public int MSize; + + /// + /// NSize is the number of columns in matrices B, C, D. + /// + [FieldOffset(20)] + public int NSize; + + /// + /// KSize is the number of columns in matrix A and rows in matrix B. + /// + [FieldOffset(24)] + public int KSize; + + /// + /// AType is the component type of matrix A, of type VkComponentTypeNV. + /// + [FieldOffset(28)] + public VkComponentTypeNV AType; + + /// + /// BType is the component type of matrix B, of type VkComponentTypeNV. + /// + [FieldOffset(32)] + public VkComponentTypeNV BType; + + /// + /// CType is the component type of matrix C, of type VkComponentTypeNV. + /// + [FieldOffset(36)] + public VkComponentTypeNV CType; + + /// + /// DType is the component type of matrix D, of type VkComponentTypeNV. + /// + [FieldOffset(40)] + public VkComponentTypeNV DType; + + /// + /// Scope is the scope of all the matrix types, of type VkScopeNV. + /// + [FieldOffset(44)] + public VkScopeNV Scope; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCooperativeVectorPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCooperativeVectorPropertiesNV.gen.cs new file mode 100644 index 0000000..81c5d23 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCooperativeVectorPropertiesNV.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCooperativeVectorPropertiesNV - Structure specifying cooperative vector properties + /// + /// + /// + /// Each VkCooperativeVectorPropertiesNV structure describes a single + /// supported combination of types for a matrix-vector multiply (or + /// multiply-add) operation (OpCooperativeVectorMatrixMulNV or + /// OpCooperativeVectorMatrixMulAddNV). + /// + /// + /// The VkCooperativeVectorPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// typedef struct VkCooperativeVectorPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkComponentTypeKHR inputType; + /// VkComponentTypeKHR inputInterpretation; + /// VkComponentTypeKHR matrixInterpretation; + /// VkComponentTypeKHR biasInterpretation; + /// VkComponentTypeKHR resultType; + /// VkBool32 transpose; + /// } VkCooperativeVectorPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCooperativeVectorPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CooperativeVectorPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// InputType is the component type of vector Input, of type VkComponentTypeKHR. + /// + [FieldOffset(16)] + public VkComponentTypeKHR InputType; + + /// + /// InputInterpretation is the value of InputInterpretation, of type VkComponentTypeKHR. + /// + [FieldOffset(20)] + public VkComponentTypeKHR InputInterpretation; + + /// + /// MatrixInterpretation is the value of MatrixInterpretation, of type VkComponentTypeKHR. + /// + [FieldOffset(24)] + public VkComponentTypeKHR MatrixInterpretation; + + /// + /// BiasInterpretation is the value of BiasInterpretation, of type VkComponentTypeKHR. + /// + [FieldOffset(28)] + public VkComponentTypeKHR BiasInterpretation; + + /// + /// ResultType is the component type of Result Type, of type VkComponentTypeKHR. + /// + [FieldOffset(32)] + public VkComponentTypeKHR ResultType; + + /// + /// Transpose is a boolean indicating whether opaque layout matrices with this combination of input and output types supports transposition. + /// + [FieldOffset(36)] + public Brutal.Bool32 Transpose; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureInfoKHR.gen.cs new file mode 100644 index 0000000..15b1c63 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureInfoKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyAccelerationStructureInfoKHR - Parameters for copying an acceleration structure + /// + /// + /// + /// :refpage: VkCopyAccelerationStructureInfoKHR + /// + /// + /// The VkCopyAccelerationStructureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkCopyAccelerationStructureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureKHR src; + /// VkAccelerationStructureKHR dst; + /// VkCopyAccelerationStructureModeKHR mode; + /// } VkCopyAccelerationStructureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyAccelerationStructureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyAccelerationStructureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Src is the source acceleration structure for the copy. + /// + [FieldOffset(16)] + public VkAccelerationStructureKHR Src; + + /// + /// Dst is the target acceleration structure for the copy. + /// + [FieldOffset(24)] + public VkAccelerationStructureKHR Dst; + + /// + /// Mode is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy. + /// + [FieldOffset(32)] + public VkCopyAccelerationStructureModeKHR Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureToMemoryInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureToMemoryInfoKHR.gen.cs new file mode 100644 index 0000000..8bae715 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyAccelerationStructureToMemoryInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyAccelerationStructureToMemoryInfoKHR - Parameters for serializing an acceleration structure + /// + /// + /// + /// :refpage: VkCopyAccelerationStructureToMemoryInfoKHR + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkCopyAccelerationStructureToMemoryInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccelerationStructureKHR src; + /// VkDeviceOrHostAddressKHR dst; + /// VkCopyAccelerationStructureModeKHR mode; + /// } VkCopyAccelerationStructureToMemoryInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyAccelerationStructureToMemoryInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyAccelerationStructureToMemoryInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Src is the source acceleration structure for the copy. + /// + [FieldOffset(16)] + public VkAccelerationStructureKHR Src; + + /// + /// Dst is the device or host address of memory which is the target for the copy. + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressKHR Dst; + + /// + /// Mode is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy. + /// + [FieldOffset(32)] + public VkCopyAccelerationStructureModeKHR Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyBufferInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyBufferInfo2.gen.cs new file mode 100644 index 0000000..e53ab78 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyBufferInfo2.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyBufferInfo2 - Structure specifying parameters of a buffer copy command + /// + /// + /// + /// :refpage: VkCopyBufferInfo2 + /// + /// + /// The VkCopyBufferInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkCopyBufferInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer srcBuffer; + /// VkBuffer dstBuffer; + /// uint32_t regionCount; + /// const VkBufferCopy2* pRegions; + /// } VkCopyBufferInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkCopyBufferInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyBufferInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcBuffer is the source buffer. + /// + [FieldOffset(16)] + public VkBuffer SrcBuffer; + + /// + /// DstBuffer is the destination buffer. + /// + [FieldOffset(24)] + public VkBuffer DstBuffer; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(32)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkBufferCopy2 structures specifying the regions to copy. + /// + [FieldOffset(40)] + public VkBufferCopy2* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyBufferToImageInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyBufferToImageInfo2.gen.cs new file mode 100644 index 0000000..3fc7fdf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyBufferToImageInfo2.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyBufferToImageInfo2 - Structure specifying parameters of a buffer to image copy command + /// + /// + /// + /// :refpage: VkCopyBufferToImageInfo2 + /// + /// + /// The VkCopyBufferToImageInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkCopyBufferToImageInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer srcBuffer; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// uint32_t regionCount; + /// const VkBufferImageCopy2* pRegions; + /// } VkCopyBufferToImageInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkCopyBufferToImageInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyBufferToImageInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcBuffer is the source buffer. + /// + [FieldOffset(16)] + public VkBuffer SrcBuffer; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(24)] + public VkImage DstImage; + + /// + /// DstImageLayout is the layout of the destination image subresources for the copy. + /// + [FieldOffset(32)] + public VkImageLayout DstImageLayout; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(36)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkBufferImageCopy2 structures specifying the regions to copy. + /// + [FieldOffset(40)] + public VkBufferImageCopy2* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyCommandTransformInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyCommandTransformInfoQCOM.gen.cs new file mode 100644 index 0000000..8b722fc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyCommandTransformInfoQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyCommandTransformInfoQCOM - Structure describing transform parameters of rotated copy command + /// + /// + /// + /// The VkCopyCommandTransformInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_rotated_copy_commands + /// typedef struct VkCopyCommandTransformInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkSurfaceTransformFlagBitsKHR transform; + /// } VkCopyCommandTransformInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkCopyCommandTransformInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyCommandTransformInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Transform is a VkSurfaceTransformFlagsKHR value describing the transform to be applied. + /// + [FieldOffset(16)] + public VkSurfaceTransformFlagsKHR Transform; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyDescriptorSet.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyDescriptorSet.gen.cs new file mode 100644 index 0000000..b4a6057 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyDescriptorSet.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyDescriptorSet - Structure specifying a copy descriptor set operation + /// + /// + /// + /// The VkCopyDescriptorSet structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkCopyDescriptorSet { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorSet srcSet; + /// uint32_t srcBinding; + /// uint32_t srcArrayElement; + /// VkDescriptorSet dstSet; + /// uint32_t dstBinding; + /// uint32_t dstArrayElement; + /// uint32_t descriptorCount; + /// } VkCopyDescriptorSet; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCopyDescriptorSet() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyDescriptorSet; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcSet + /// + [FieldOffset(16)] + public VkDescriptorSet SrcSet; + + /// + /// SrcBinding + /// + [FieldOffset(24)] + public int SrcBinding; + + /// + /// SrcArrayElement + /// + [FieldOffset(28)] + public int SrcArrayElement; + + /// + /// DstSet + /// + [FieldOffset(32)] + public VkDescriptorSet DstSet; + + /// + /// DstBinding + /// + [FieldOffset(40)] + public int DstBinding; + + /// + /// DstArrayElement + /// + [FieldOffset(44)] + public int DstArrayElement; + + /// + /// DescriptorCount is the number of descriptors to copy from the source to destination. If descriptorCount is greater than the number of remaining array elements in the source or destination binding, those affect consecutive bindings in a manner similar to VkWriteDescriptorSet above. + /// + [FieldOffset(48)] + public int DescriptorCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryImageInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryImageInfoKHR.gen.cs new file mode 100644 index 0000000..efcc553 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryImageInfoKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyDeviceMemoryImageInfoKHR - Structure specifying copy operations between an image and memory ranges + /// + /// + /// + /// :refpage: VkCopyDeviceMemoryImageInfoKHR + /// + /// + /// The VkCopyDeviceMemoryImageInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkCopyDeviceMemoryImageInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// uint32_t regionCount; + /// const VkDeviceMemoryImageCopyKHR* pRegions; + /// } VkCopyDeviceMemoryImageInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyDeviceMemoryImageInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyDeviceMemoryImageInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is the base image accessed by the copy command. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// RegionCount is the number of copies to be performed. + /// + [FieldOffset(24)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkDeviceMemoryImageCopyKHR structures describing individual copy operations between two memory ranges. + /// + [FieldOffset(32)] + public VkDeviceMemoryImageCopyKHR* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryInfoKHR.gen.cs new file mode 100644 index 0000000..f43b5e2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyDeviceMemoryInfoKHR.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyDeviceMemoryInfoKHR - Structure specifying a buffer copy operation + /// + /// + /// + /// :refpage: VkCopyDeviceMemoryInfoKHR + /// + /// + /// The VkCopyDeviceMemoryInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkCopyDeviceMemoryInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t regionCount; + /// const VkDeviceMemoryCopyKHR* pRegions; + /// } VkCopyDeviceMemoryInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCopyDeviceMemoryInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyDeviceMemoryInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RegionCount is the number of copies to be performed. + /// + [FieldOffset(16)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkDeviceMemoryCopyKHR structures describing individual copy operations between two memory ranges. + /// + [FieldOffset(24)] + public VkDeviceMemoryCopyKHR* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyImageInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyImageInfo2.gen.cs new file mode 100644 index 0000000..a958183 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyImageInfo2.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyImageInfo2 - Structure specifying parameters of an image copy command + /// + /// + /// + /// :refpage: VkCopyImageInfo2 + /// + /// + /// The VkCopyImageInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkCopyImageInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage srcImage; + /// VkImageLayout srcImageLayout; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// uint32_t regionCount; + /// const VkImageCopy2* pRegions; + /// } VkCopyImageInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCopyImageInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyImageInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcImage is the source image. + /// + [FieldOffset(16)] + public VkImage SrcImage; + + /// + /// SrcImageLayout is the current layout of the source image subresource. + /// + [FieldOffset(24)] + public VkImageLayout SrcImageLayout; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(32)] + public VkImage DstImage; + + /// + /// DstImageLayout is the current layout of the destination image subresource. + /// + [FieldOffset(40)] + public VkImageLayout DstImageLayout; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(44)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkImageCopy2 structures specifying the regions to copy. + /// + [FieldOffset(48)] + public VkImageCopy2* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyImageToBufferInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyImageToBufferInfo2.gen.cs new file mode 100644 index 0000000..a52cbb0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyImageToBufferInfo2.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyImageToBufferInfo2 - Structure specifying parameters of an image to buffer copy command + /// + /// + /// + /// :refpage: VkCopyImageToBufferInfo2 + /// + /// + /// The VkCopyImageToBufferInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkCopyImageToBufferInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage srcImage; + /// VkImageLayout srcImageLayout; + /// VkBuffer dstBuffer; + /// uint32_t regionCount; + /// const VkBufferImageCopy2* pRegions; + /// } VkCopyImageToBufferInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCopyImageToBufferInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyImageToBufferInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcImage is the source image. + /// + [FieldOffset(16)] + public VkImage SrcImage; + + /// + /// SrcImageLayout is the layout of the source image subresources for the copy. + /// + [FieldOffset(24)] + public VkImageLayout SrcImageLayout; + + /// + /// DstBuffer is the destination buffer. + /// + [FieldOffset(32)] + public VkBuffer DstBuffer; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(40)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkBufferImageCopy2 structures specifying the regions to copy. + /// + [FieldOffset(48)] + public VkBufferImageCopy2* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyImageToImageInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyImageToImageInfo.gen.cs new file mode 100644 index 0000000..ee7b344 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyImageToImageInfo.gen.cs @@ -0,0 +1,85 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyImageToImageInfo - Structure specifying parameters of an image to image host copy command + /// + /// + /// + /// :refpage: VkCopyImageToImageInfo + /// + /// + /// The VkCopyImageToImageInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkCopyImageToImageInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkHostImageCopyFlags flags; + /// VkImage srcImage; + /// VkImageLayout srcImageLayout; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// uint32_t regionCount; + /// const VkImageCopy2* pRegions; + /// } VkCopyImageToImageInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkCopyImageToImageInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyImageToImageInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkHostImageCopyFlags values describing additional copy parameters. + /// + [FieldOffset(16)] + public VkHostImageCopyFlags Flags; + + /// + /// SrcImage is the source image. + /// + [FieldOffset(24)] + public VkImage SrcImage; + + /// + /// SrcImageLayout is the layout of the source image subresources for the copy. + /// + [FieldOffset(32)] + public VkImageLayout SrcImageLayout; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(40)] + public VkImage DstImage; + + /// + /// DstImageLayout is the layout of the destination image subresources for the copy. + /// + [FieldOffset(48)] + public VkImageLayout DstImageLayout; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(52)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkImageCopy2 structures specifying the regions to copy. + /// + [FieldOffset(56)] + public VkImageCopy2* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyImageToMemoryInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyImageToMemoryInfo.gen.cs new file mode 100644 index 0000000..16c2a31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyImageToMemoryInfo.gen.cs @@ -0,0 +1,77 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyImageToMemoryInfo - Structure specifying parameters of an image to host memory copy command + /// + /// + /// + /// :refpage: VkCopyImageToMemoryInfo + /// :imageparam: srcImage + /// :imagesubresource: imageSubresource + /// :imageoffset: imageOffset + /// :imageextent: imageExtent + /// :bufferrowlength: memoryRowLength + /// :bufferimageheight: memoryImageHeight + /// + /// + /// The VkCopyImageToMemoryInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkCopyImageToMemoryInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkHostImageCopyFlags flags; + /// VkImage srcImage; + /// VkImageLayout srcImageLayout; + /// uint32_t regionCount; + /// const VkImageToMemoryCopy* pRegions; + /// } VkCopyImageToMemoryInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkCopyImageToMemoryInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyImageToMemoryInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkHostImageCopyFlags values describing additional copy parameters. + /// + [FieldOffset(16)] + public VkHostImageCopyFlags Flags; + + /// + /// SrcImage is the source image. + /// + [FieldOffset(24)] + public VkImage SrcImage; + + /// + /// SrcImageLayout is the layout of the source image subresources for the copy. + /// + [FieldOffset(32)] + public VkImageLayout SrcImageLayout; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(36)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkImageToMemoryCopy structures specifying the regions to copy. + /// + [FieldOffset(40)] + public VkImageToMemoryCopy* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectCommandKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectCommandKHR.gen.cs new file mode 100644 index 0000000..6cd8e24 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectCommandKHR.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryIndirectCommandKHR - Structure specifying indirect memory region copy operation + /// + /// + /// + /// :refpage: VkCopyMemoryIndirectCommandKHR + /// + /// + /// The structure describing source and destination memory regions, + /// VkCopyMemoryIndirectCommandKHR is defined as: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef struct VkCopyMemoryIndirectCommandKHR { + /// VkDeviceAddress srcAddress; + /// VkDeviceAddress dstAddress; + /// VkDeviceSize size; + /// } VkCopyMemoryIndirectCommandKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkCopyMemoryIndirectCommandKHR() + { + /// + /// SrcAddress is the starting address of the source device memory to copy from. + /// + [FieldOffset(0)] + public VkDeviceAddress SrcAddress; + + /// + /// DstAddress is the starting address of the destination device memory to copy to. + /// + [FieldOffset(8)] + public VkDeviceAddress DstAddress; + + /// + /// Size is the size of the copy in bytes. + /// + [FieldOffset(16)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectInfoKHR.gen.cs new file mode 100644 index 0000000..67527af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryIndirectInfoKHR.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryIndirectInfoKHR - Parameters describing indirect copy parameters + /// + /// + /// + /// :refpage: VkCopyMemoryIndirectInfoKHR + /// + /// + /// The VkCopyMemoryIndirectInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef struct VkCopyMemoryIndirectInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAddressCopyFlagsKHR srcCopyFlags; + /// VkAddressCopyFlagsKHR dstCopyFlags; + /// uint32_t copyCount; + /// VkStridedDeviceAddressRangeKHR copyAddressRange; + /// } VkCopyMemoryIndirectInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkCopyMemoryIndirectInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMemoryIndirectInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcCopyFlags is a VkAddressCopyFlagsKHR value defining the copy flags for the source address range. + /// + [FieldOffset(16)] + public VkAddressCopyFlagsKHR SrcCopyFlags; + + /// + /// DstCopyFlags is a VkAddressCopyFlagsKHR value defining the copy flags for the destination address range. + /// + [FieldOffset(20)] + public VkAddressCopyFlagsKHR DstCopyFlags; + + /// + /// CopyCount is the number of copies to execute, and can be zero. + /// + [FieldOffset(24)] + public int CopyCount; + + /// + /// CopyAddressRange is a memory region specifying the copy parameters. It is laid out as an array of VkCopyMemoryIndirectCommandKHR structures. + /// + [FieldOffset(32)] + public VkStridedDeviceAddressRangeKHR CopyAddressRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToAccelerationStructureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToAccelerationStructureInfoKHR.gen.cs new file mode 100644 index 0000000..a5aa070 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToAccelerationStructureInfoKHR.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryToAccelerationStructureInfoKHR - Parameters for deserializing an acceleration structure + /// + /// + /// + /// :refpage: VkCopyMemoryToAccelerationStructureInfoKHR + /// + /// + /// The VkCopyMemoryToAccelerationStructureInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkCopyMemoryToAccelerationStructureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceOrHostAddressConstKHR src; + /// VkAccelerationStructureKHR dst; + /// VkCopyAccelerationStructureModeKHR mode; + /// } VkCopyMemoryToAccelerationStructureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyMemoryToAccelerationStructureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMemoryToAccelerationStructureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Src is the device or host address of memory containing the source data for the copy. + /// + [FieldOffset(16)] + public VkDeviceOrHostAddressConstKHR Src; + + /// + /// Dst is the target acceleration structure for the copy. + /// + [FieldOffset(24)] + public VkAccelerationStructureKHR Dst; + + /// + /// Mode is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy. + /// + [FieldOffset(32)] + public VkCopyAccelerationStructureModeKHR Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectCommandKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectCommandKHR.gen.cs new file mode 100644 index 0000000..b30efeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectCommandKHR.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryToImageIndirectCommandKHR - Structure specifying indirect memory region to image copy operation + /// + /// + /// + /// :refpage: VkCopyMemoryToImageIndirectCommandKHR + /// + /// + /// The structure describing source and destination memory regions, + /// VkCopyMemoryToImageIndirectCommandKHR is defined as: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef struct VkCopyMemoryToImageIndirectCommandKHR { + /// VkDeviceAddress srcAddress; + /// uint32_t bufferRowLength; + /// uint32_t bufferImageHeight; + /// VkImageSubresourceLayers imageSubresource; + /// VkOffset3D imageOffset; + /// VkExtent3D imageExtent; + /// } VkCopyMemoryToImageIndirectCommandKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct VkCopyMemoryToImageIndirectCommandKHR() + { + /// + /// SrcAddress is the starting address of the source device memory to copy from. + /// + [FieldOffset(0)] + public VkDeviceAddress SrcAddress; + + /// + /// BufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent. + /// + [FieldOffset(8)] + public int BufferRowLength; + + /// + /// BufferImageHeight + /// + [FieldOffset(12)] + public int BufferImageHeight; + + /// + /// ImageSubresource is a VkImageSubresourceLayers structure used to specify the specific image subresources of the image used for the destination image data, which must match the value specified in corresponding index of the pCopyMemoryToImageIndirectInfo->pImageSubresources array of vkCmdCopyMemoryToImageIndirectKHR during command recording. + /// + [FieldOffset(16)] + public VkImageSubresourceLayers ImageSubresource; + + /// + /// ImageOffset selects the initial x, y, z offsets in texels of the sub-region of the destination image data. + /// + [FieldOffset(32)] + public VkOffset3D ImageOffset; + + /// + /// ImageExtent is the size in texels of the destination image in width, height and depth. + /// + [FieldOffset(44)] + public VkExtent3D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectInfoKHR.gen.cs new file mode 100644 index 0000000..f23470c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageIndirectInfoKHR.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryToImageIndirectInfoKHR - Parameters describing indirect image copy parameters + /// + /// + /// + /// :refpage: VkCopyMemoryToImageIndirectInfoKHR + /// + /// + /// The VkCopyMemoryToImageIndirectInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef struct VkCopyMemoryToImageIndirectInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAddressCopyFlagsKHR srcCopyFlags; + /// uint32_t copyCount; + /// VkStridedDeviceAddressRangeKHR copyAddressRange; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// const VkImageSubresourceLayers* pImageSubresources; + /// } VkCopyMemoryToImageIndirectInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkCopyMemoryToImageIndirectInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMemoryToImageIndirectInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcCopyFlags is a VkAddressCopyFlagsKHR value defining the copy flags for the source address range. + /// + [FieldOffset(16)] + public VkAddressCopyFlagsKHR SrcCopyFlags; + + /// + /// CopyCount is the number of copies to execute, and can be zero. + /// + [FieldOffset(20)] + public int CopyCount; + + /// + /// CopyAddressRange is a memory region specifying the copy parameters. It is laid out as an array of VkCopyMemoryToImageIndirectCommandKHR structures. + /// + [FieldOffset(24)] + public VkStridedDeviceAddressRangeKHR CopyAddressRange; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(48)] + public VkImage DstImage; + + /// + /// DstImageLayout is the layout of the destination image subresources for the copy. + /// + [FieldOffset(56)] + public VkImageLayout DstImageLayout; + + /// + /// ImageSubresources is a pointer to an array of copyCount VkImageSubresourceLayers structures, specifying the image subresources of the destination image data for the copy operation. + /// + [FieldOffset(64)] + public VkImageSubresourceLayers* ImageSubresources; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageInfo.gen.cs new file mode 100644 index 0000000..7d620ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToImageInfo.gen.cs @@ -0,0 +1,77 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryToImageInfo - Structure specifying parameters of host memory to image copy command + /// + /// + /// + /// :refpage: VkCopyMemoryToImageInfo + /// :imageparam: dstImage + /// :imagesubresource: imageSubresource + /// :imageoffset: imageOffset + /// :imageextent: imageExtent + /// :bufferrowlength: memoryRowLength + /// :bufferimageheight: memoryImageHeight + /// + /// + /// The VkCopyMemoryToImageInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkCopyMemoryToImageInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkHostImageCopyFlags flags; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// uint32_t regionCount; + /// const VkMemoryToImageCopy* pRegions; + /// } VkCopyMemoryToImageInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkCopyMemoryToImageInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMemoryToImageInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkHostImageCopyFlags values describing additional copy parameters. + /// + [FieldOffset(16)] + public VkHostImageCopyFlags Flags; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(24)] + public VkImage DstImage; + + /// + /// DstImageLayout is the layout of the destination image subresources for the copy. + /// + [FieldOffset(32)] + public VkImageLayout DstImageLayout; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(36)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkMemoryToImageCopy structures specifying the regions to copy. + /// + [FieldOffset(40)] + public VkMemoryToImageCopy* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToMicromapInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToMicromapInfoEXT.gen.cs new file mode 100644 index 0000000..40fa6e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMemoryToMicromapInfoEXT.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMemoryToMicromapInfoEXT - Parameters for deserializing a micromap + /// + /// + /// + /// :refpage: VkCopyMemoryToMicromapInfoEXT + /// + /// + /// The VkCopyMemoryToMicromapInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkCopyMemoryToMicromapInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceOrHostAddressConstKHR src; + /// VkMicromapEXT dst; + /// VkCopyMicromapModeEXT mode; + /// } VkCopyMemoryToMicromapInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyMemoryToMicromapInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMemoryToMicromapInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Src is the device or host address of memory containing the source data for the copy. + /// + [FieldOffset(16)] + public VkDeviceOrHostAddressConstKHR Src; + + /// + /// Dst is the target micromap for the copy. + /// + [FieldOffset(24)] + public VkMicromapEXT Dst; + + /// + /// Mode is a VkCopyMicromapModeEXT value specifying additional operations to perform during the copy. + /// + [FieldOffset(32)] + public VkCopyMicromapModeEXT Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMicromapInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMicromapInfoEXT.gen.cs new file mode 100644 index 0000000..fefdbe6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMicromapInfoEXT.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMicromapInfoEXT - Parameters for copying a micromap + /// + /// + /// + /// :refpage: VkCopyMicromapInfoEXT + /// + /// + /// The VkCopyMicromapInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkCopyMicromapInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkMicromapEXT src; + /// VkMicromapEXT dst; + /// VkCopyMicromapModeEXT mode; + /// } VkCopyMicromapInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyMicromapInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMicromapInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Src is the source micromap for the copy. + /// + [FieldOffset(16)] + public VkMicromapEXT Src; + + /// + /// Dst is the target micromap for the copy. + /// + [FieldOffset(24)] + public VkMicromapEXT Dst; + + /// + /// Mode is a VkCopyMicromapModeEXT value specifying additional operations to perform during the copy. + /// + [FieldOffset(32)] + public VkCopyMicromapModeEXT Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyMicromapToMemoryInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyMicromapToMemoryInfoEXT.gen.cs new file mode 100644 index 0000000..c95c4f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyMicromapToMemoryInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyMicromapToMemoryInfoEXT - Parameters for serializing a micromap + /// + /// + /// + /// :refpage: VkCopyMicromapToMemoryInfoEXT + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkCopyMicromapToMemoryInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkMicromapEXT src; + /// VkDeviceOrHostAddressKHR dst; + /// VkCopyMicromapModeEXT mode; + /// } VkCopyMicromapToMemoryInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCopyMicromapToMemoryInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyMicromapToMemoryInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Src is the source micromap for the copy + /// + [FieldOffset(16)] + public VkMicromapEXT Src; + + /// + /// Dst is the device or host address of memory which is the target for the copy + /// + [FieldOffset(24)] + public VkDeviceOrHostAddressKHR Dst; + + /// + /// Mode is a VkCopyMicromapModeEXT value specifying additional operations to perform during the copy. + /// + [FieldOffset(32)] + public VkCopyMicromapModeEXT Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCopyTensorInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCopyTensorInfoARM.gen.cs new file mode 100644 index 0000000..0162e17 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCopyTensorInfoARM.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCopyTensorInfoARM - Structure specifying an tensor copy operation + /// + /// + /// + /// The VkCopyTensorInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkCopyTensorInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorARM srcTensor; + /// VkTensorARM dstTensor; + /// uint32_t regionCount; + /// const VkTensorCopyARM* pRegions; + /// } VkCopyTensorInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkCopyTensorInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CopyTensorInfoARM; + + /// + /// Next is NULL or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcTensor is the source tensor. + /// + [FieldOffset(16)] + public VkTensorARM SrcTensor; + + /// + /// DstTensor is the destination tensor. + /// + [FieldOffset(24)] + public VkTensorARM DstTensor; + + /// + /// RegionCount is the number of regions to copy. + /// + [FieldOffset(32)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkTensorCopyARM structures specifying the regions to copy. + /// + [FieldOffset(40)] + public VkTensorCopyARM* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCuFunctionCreateInfoNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCuFunctionCreateInfoNVX.gen.cs new file mode 100644 index 0000000..b6eef3a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCuFunctionCreateInfoNVX.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCuFunctionCreateInfoNVX - Stub description of VkCuFunctionCreateInfoNVX + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// typedef struct VkCuFunctionCreateInfoNVX { + /// VkStructureType sType; + /// const void* pNext; + /// VkCuModuleNVX module; + /// const char* pName; + /// } VkCuFunctionCreateInfoNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCuFunctionCreateInfoNVX() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CuFunctionCreateInfoNVX; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Module + /// + [FieldOffset(16)] + public VkCuModuleNVX Module; + + /// + /// Name + /// + [FieldOffset(24)] + public byte* Name; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCuLaunchInfoNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCuLaunchInfoNVX.gen.cs new file mode 100644 index 0000000..d5c0caf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCuLaunchInfoNVX.gen.cs @@ -0,0 +1,119 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCuLaunchInfoNVX - Stub description of VkCuLaunchInfoNVX + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// typedef struct VkCuLaunchInfoNVX { + /// VkStructureType sType; + /// const void* pNext; + /// VkCuFunctionNVX function; + /// uint32_t gridDimX; + /// uint32_t gridDimY; + /// uint32_t gridDimZ; + /// uint32_t blockDimX; + /// uint32_t blockDimY; + /// uint32_t blockDimZ; + /// uint32_t sharedMemBytes; + /// size_t paramCount; + /// const void* const * pParams; + /// size_t extraCount; + /// const void* const * pExtras; + /// } VkCuLaunchInfoNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkCuLaunchInfoNVX() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CuLaunchInfoNVX; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Function + /// + [FieldOffset(16)] + public VkCuFunctionNVX Function; + + /// + /// GridDimX + /// + [FieldOffset(24)] + public int GridDimX; + + /// + /// GridDimY + /// + [FieldOffset(28)] + public int GridDimY; + + /// + /// GridDimZ + /// + [FieldOffset(32)] + public int GridDimZ; + + /// + /// BlockDimX + /// + [FieldOffset(36)] + public int BlockDimX; + + /// + /// BlockDimY + /// + [FieldOffset(40)] + public int BlockDimY; + + /// + /// BlockDimZ + /// + [FieldOffset(44)] + public int BlockDimZ; + + /// + /// SharedMemBytes + /// + [FieldOffset(48)] + public int SharedMemBytes; + + /// + /// ParamCount + /// + [FieldOffset(56)] + public nuint ParamCount; + + /// + /// Params + /// + [FieldOffset(64)] + public void** Params; + + /// + /// ExtraCount + /// + [FieldOffset(72)] + public nuint ExtraCount; + + /// + /// Extras + /// + [FieldOffset(80)] + public void** Extras; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCuModuleCreateInfoNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCuModuleCreateInfoNVX.gen.cs new file mode 100644 index 0000000..78a4e86 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCuModuleCreateInfoNVX.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCuModuleCreateInfoNVX - Stub description of VkCuModuleCreateInfoNVX + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// typedef struct VkCuModuleCreateInfoNVX { + /// VkStructureType sType; + /// const void* pNext; + /// size_t dataSize; + /// const void* pData; + /// } VkCuModuleCreateInfoNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkCuModuleCreateInfoNVX() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CuModuleCreateInfoNVX; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataSize + /// + [FieldOffset(16)] + public nuint DataSize; + + /// + /// Data + /// + [FieldOffset(24)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCuModuleTexturingModeCreateInfoNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCuModuleTexturingModeCreateInfoNVX.gen.cs new file mode 100644 index 0000000..865db60 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCuModuleTexturingModeCreateInfoNVX.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCuModuleTexturingModeCreateInfoNVX - Stub description of VkCuModuleTexturingModeCreateInfoNVX + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_NVX_binary_import + /// typedef struct VkCuModuleTexturingModeCreateInfoNVX { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 use64bitTexturing; + /// } VkCuModuleTexturingModeCreateInfoNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkCuModuleTexturingModeCreateInfoNVX() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CuModuleTexturingModeCreateInfoNVX; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Use64bitTexturing + /// + [FieldOffset(16)] + public Brutal.Bool32 Use64bitTexturing; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkCustomResolveCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkCustomResolveCreateInfoEXT.gen.cs new file mode 100644 index 0000000..1c7d193 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkCustomResolveCreateInfoEXT.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkCustomResolveCreateInfoEXT - Structure specifying format info for custom resolves + /// + /// + /// + /// The VkCustomResolveCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 + /// typedef struct VkCustomResolveCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 customResolve; + /// uint32_t colorAttachmentCount; + /// const VkFormat* pColorAttachmentFormats; + /// VkFormat depthAttachmentFormat; + /// VkFormat stencilAttachmentFormat; + /// } VkCustomResolveCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkCustomResolveCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.CustomResolveCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CustomResolve indicates whether this pipeline will be used for a resolve operation. + /// + [FieldOffset(16)] + public Brutal.Bool32 CustomResolve; + + /// + /// ColorAttachmentCount is the number of entries in pColorAttachmentFormats. + /// + [FieldOffset(20)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentFormats is a pointer to an array of VkFormat values defining the format of color resolve attachments used in custom resolves in the same render pass. + /// + [FieldOffset(24)] + public VkFormat* ColorAttachmentFormats; + + /// + /// DepthAttachmentFormat is a VkFormat value defining the format of the depth resolve attachment used in custom resolves in the same render pass. + /// + [FieldOffset(32)] + public VkFormat DepthAttachmentFormat; + + /// + /// StencilAttachmentFormat is a VkFormat value defining the format of the stencil resolve attachment used in custom resolves in the same render pass. + /// + [FieldOffset(36)] + public VkFormat StencilAttachmentFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatInfoARM.gen.cs new file mode 100644 index 0000000..1742df9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowImageFormatInfoARM - Structure describing data graph optical flow image format info + /// + /// + /// + /// The VkDataGraphOpticalFlowImageFormatInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphOpticalFlowImageFormatInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDataGraphOpticalFlowImageUsageFlagsARM usage; + /// } VkDataGraphOpticalFlowImageFormatInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphOpticalFlowImageFormatInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphOpticalFlowImageFormatInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Usage + /// + [FieldOffset(16)] + public VkDataGraphOpticalFlowImageUsageFlagsARM Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatPropertiesARM.gen.cs new file mode 100644 index 0000000..a3ce352 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphOpticalFlowImageFormatPropertiesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphOpticalFlowImageFormatPropertiesARM - Structure describing properties of an optical flow image format + /// + /// + /// + /// The VkDataGraphOpticalFlowImageFormatPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphOpticalFlowImageFormatPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat format; + /// } VkDataGraphOpticalFlowImageFormatPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphOpticalFlowImageFormatPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphOpticalFlowImageFormatPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format + /// + [FieldOffset(16)] + public VkFormat Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineBuiltinModelCreateInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineBuiltinModelCreateInfoQCOM.gen.cs new file mode 100644 index 0000000..87a8a88 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineBuiltinModelCreateInfoQCOM.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineBuiltinModelCreateInfoQCOM - Structure specifying a built-in model for the newly created data graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineBuiltinModelCreateInfoQCOM + /// + /// + /// The VkDataGraphPipelineBuiltinModelCreateInfoQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_data_graph_model + /// typedef struct VkDataGraphPipelineBuiltinModelCreateInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// const VkPhysicalDeviceDataGraphOperationSupportARM* pOperation; + /// } VkDataGraphPipelineBuiltinModelCreateInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineBuiltinModelCreateInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineBuiltinModelCreateInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Operation is a VkPhysicalDeviceDataGraphOperationSupportARM specifying the built-in operation. + /// + [FieldOffset(16)] + public VkPhysicalDeviceDataGraphOperationSupportARM* Operation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCompilerControlCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCompilerControlCreateInfoARM.gen.cs new file mode 100644 index 0000000..7e3e7db --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCompilerControlCreateInfoARM.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineCompilerControlCreateInfoARM - Structure specifying compiler control parameters of a newly created data graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineCompilerControlCreateInfoARM + /// + /// + /// The VkDataGraphPipelineCompilerControlCreateInfoARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineCompilerControlCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// const char* pVendorOptions; + /// } VkDataGraphPipelineCompilerControlCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineCompilerControlCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineCompilerControlCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VendorOptions is a null-terminated UTF-8 string specifying implementation-specific options that affect the creation of a data graph pipeline. + /// + [FieldOffset(16)] + public byte* VendorOptions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantARM.gen.cs new file mode 100644 index 0000000..5b3b5e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantARM.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineConstantARM - Structure specifying parameters of a data graph pipeline constant + /// + /// + /// + /// :refpage: VkDataGraphPipelineConstantARM + /// + /// + /// The VkDataGraphPipelineConstantARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineConstantARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t id; + /// const void* pConstantData; + /// } VkDataGraphPipelineConstantARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineConstantARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineConstantARM; + + /// + /// Next is a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Id is the unique identifier of the graph constant this structure describes. + /// + [FieldOffset(16)] + public int Id; + + /// + /// ConstantData is a pointer to the data for this graph constant. + /// + [FieldOffset(24)] + public void* ConstantData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM.gen.cs new file mode 100644 index 0000000..3be1510 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM - Structure specifying semi-structured sparsity parameters of a tensor data graph pipeline constant + /// + /// + /// + /// :refpage: VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM + /// + /// + /// The VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM + /// structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph with VK_ARM_tensors + /// typedef struct VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t dimension; + /// uint32_t zeroCount; + /// uint32_t groupSize; + /// } VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.DataGraphPipelineConstantTensorSemiStructuredSparsityInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Dimension is the dimension of the tensor along which its data is sparse. + /// + [FieldOffset(16)] + public int Dimension; + + /// + /// ZeroCount is the number of tensor elements that must be zero in every group of groupSize elements. + /// + [FieldOffset(20)] + public int ZeroCount; + + /// + /// GroupSize is the number of tensor elements in a group. + /// + [FieldOffset(24)] + public int GroupSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCreateInfoARM.gen.cs new file mode 100644 index 0000000..832b38f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineCreateInfoARM.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineCreateInfoARM - Structure specifying parameters of a newly created data graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineCreateInfoARM + /// + /// + /// The VkDataGraphPipelineCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreateFlags2 flags; + /// VkPipelineLayout layout; + /// uint32_t resourceInfoCount; + /// const VkDataGraphPipelineResourceInfoARM* pResourceInfos; + /// } VkDataGraphPipelineCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDataGraphPipelineCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineCreateFlags2KHR specifying how the pipeline will be generated. + /// + [FieldOffset(16)] + public VkPipelineCreateFlags2 Flags; + + /// + /// Layout is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. + /// + [FieldOffset(24)] + public VkPipelineLayout Layout; + + /// + /// ResourceInfoCount is the length of the pResourceInfos array. + /// + [FieldOffset(32)] + public int ResourceInfoCount; + + /// + /// ResourceInfos is a pointer to an array of VkDataGraphPipelineResourceInfoARM structures. + /// + [FieldOffset(40)] + public VkDataGraphPipelineResourceInfoARM* ResourceInfos; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineDispatchInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineDispatchInfoARM.gen.cs new file mode 100644 index 0000000..5ea4a9c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineDispatchInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineDispatchInfoARM - Structure specifying parameters of a data graph pipeline dispatch + /// + /// + /// + /// The VkDataGraphPipelineDispatchInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineDispatchInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDataGraphPipelineDispatchFlagsARM flags; + /// } VkDataGraphPipelineDispatchInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineDispatchInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineDispatchInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDataGraphPipelineDispatchFlagsARM describing additional parameters of the dispatch. + /// + [FieldOffset(16)] + public VkDataGraphPipelineDispatchFlagsARM Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineIdentifierCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineIdentifierCreateInfoARM.gen.cs new file mode 100644 index 0000000..3f61e0c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineIdentifierCreateInfoARM.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineIdentifierCreateInfoARM - Structure specifying an identifier for the newly created data graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineIdentifierCreateInfoARM + /// + /// + /// The VkDataGraphPipelineIdentifierCreateInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineIdentifierCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t identifierSize; + /// const uint8_t* pIdentifier; + /// } VkDataGraphPipelineIdentifierCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineIdentifierCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineIdentifierCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IdentifierSize is the size in bytes of the identifier data accessible via pIdentifier. + /// + [FieldOffset(16)] + public int IdentifierSize; + + /// + /// Identifier is a pointer to identifierSize bytes of data that describe the pipeline being created. + /// + [FieldOffset(24)] + public byte* Identifier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineInfoARM.gen.cs new file mode 100644 index 0000000..da0f5a0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineInfoARM.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineInfoARM - Structure describing a data graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineInfoARM + /// + /// + /// The VkDataGraphPipelineInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipeline dataGraphPipeline; + /// } VkDataGraphPipelineInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataGraphPipeline is a VkPipeline handle. + /// + [FieldOffset(16)] + public VkPipeline DataGraphPipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineNeuralStatisticsCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineNeuralStatisticsCreateInfoARM.gen.cs new file mode 100644 index 0000000..5d852b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineNeuralStatisticsCreateInfoARM.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineNeuralStatisticsCreateInfoARM - Structure specifying neural statistics parameters of a newly created graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineNeuralStatisticsCreateInfoARM + /// + /// + /// The VkDataGraphPipelineNeuralStatisticsCreateInfoARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// typedef struct VkDataGraphPipelineNeuralStatisticsCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 allowNeuralStatistics; + /// } VkDataGraphPipelineNeuralStatisticsCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineNeuralStatisticsCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineNeuralStatisticsCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AllowNeuralStatistics specifies whether sessions for the newly created pipeline may: enable neural statistics reporting. + /// + [FieldOffset(16)] + public Brutal.Bool32 AllowNeuralStatistics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowCreateInfoARM.gen.cs new file mode 100644 index 0000000..6f58d5c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowCreateInfoARM.gen.cs @@ -0,0 +1,97 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineOpticalFlowCreateInfoARM - Structure specifying the parameters of a newly-created optical flow graph pipeline + /// + /// + /// + /// The VkDataGraphPipelineOpticalFlowCreateInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphPipelineOpticalFlowCreateInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t width; + /// uint32_t height; + /// VkFormat imageFormat; + /// VkFormat flowVectorFormat; + /// VkFormat costFormat; + /// VkDataGraphOpticalFlowGridSizeFlagsARM outputGridSize; + /// VkDataGraphOpticalFlowGridSizeFlagsARM hintGridSize; + /// VkDataGraphOpticalFlowPerformanceLevelARM performanceLevel; + /// VkDataGraphOpticalFlowCreateFlagsARM flags; + /// } VkDataGraphPipelineOpticalFlowCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDataGraphPipelineOpticalFlowCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineOpticalFlowCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Width is the width in pixels of the input or reference image to be bound to this optical flow pipeline. + /// + [FieldOffset(16)] + public int Width; + + /// + /// Height is the height in pixels of the input or reference image to be bound to this optical flow pipeline. + /// + [FieldOffset(20)] + public int Height; + + /// + /// ImageFormat is the VkFormat of the input and reference image to be bound to this optical flow pipeline. + /// + [FieldOffset(24)] + public VkFormat ImageFormat; + + /// + /// FlowVectorFormat is the VkFormat of the flow vector maps (output or hint) to be bound to this optical flow pipeline. + /// + [FieldOffset(28)] + public VkFormat FlowVectorFormat; + + /// + /// CostFormat is the VkFormat of the cost maps to be bound to this optical flow pipeline. + /// + [FieldOffset(32)] + public VkFormat CostFormat; + + /// + /// OutputGridSize is exactly one bit of VkDataGraphOpticalFlowGridSizeFlagsARM specifying the grid size of the output flow and cost maps to be bound to this optical flow pipeline. The size of the output flow and cost maps is a function of the input image dimensions and outputGridSize and is calculated as follows: + OutputWidth = {lceil} width / OutputGridWidth {rceil} + OutputHeight = {lceil} height / OutputGridHeight {rceil} + where OutputGridWidth and OutputGridHeight are determined by outputGridSize. + /// + [FieldOffset(36)] + public VkDataGraphOpticalFlowGridSizeFlagsARM OutputGridSize; + + /// + /// HintGridSize is one exactly bit of VkDataGraphOpticalFlowGridSizeFlagsARM specifying the grid size of the hint flow vector map to be bound to this optical flow pipeline. The size of the hint maps is a function of the input image dimensions and hintGridSize and is calculated as follows: + HintWidth = {lceil} width / HintGridWidth {rceil} + HintHeight = {lceil} height / HintGridHeight {rceil} + where HintGridWidth and HintGridHeight are determined by hintGridSize. + /// + [FieldOffset(40)] + public VkDataGraphOpticalFlowGridSizeFlagsARM HintGridSize; + + /// + /// PerformanceLevel is the VkDataGraphOpticalFlowPerformanceLevelARM used for this optical flow pipeline. + /// + [FieldOffset(44)] + public VkDataGraphOpticalFlowPerformanceLevelARM PerformanceLevel; + + /// + /// Flags are the VkDataGraphOpticalFlowCreateFlagsARM used for this optical flow pipeline. + /// + [FieldOffset(48)] + public VkDataGraphOpticalFlowCreateFlagsARM Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowDispatchInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowDispatchInfoARM.gen.cs new file mode 100644 index 0000000..fd06a2d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineOpticalFlowDispatchInfoARM.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineOpticalFlowDispatchInfoARM - Structure specifying parameters of a optical flow vector calculation + /// + /// + /// + /// The VkDataGraphPipelineOpticalFlowDispatchInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphPipelineOpticalFlowDispatchInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDataGraphOpticalFlowExecuteFlagsARM flags; + /// uint32_t meanFlowL1NormHint; + /// } VkDataGraphPipelineOpticalFlowDispatchInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineOpticalFlowDispatchInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineOpticalFlowDispatchInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags are the VkDataGraphOpticalFlowExecuteFlagsARM used for this command. + /// + [FieldOffset(16)] + public VkDataGraphOpticalFlowExecuteFlagsARM Flags; + + /// + /// MeanFlowL1NormHint is an integer used to hint to the implementation that the mean L1 norm of flow vectors is expected to be centered around this value (in number of pixels of the input image). The implementation may use this value to influence how flow vectors are computed. Different values may result in different flow vectors and will affect the cost of computing the flow vectors. A value of 0 means that the application does not wish to provide a hint. + /// + [FieldOffset(20)] + public int MeanFlowL1NormHint; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelinePropertyQueryResultARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelinePropertyQueryResultARM.gen.cs new file mode 100644 index 0000000..cc51700 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelinePropertyQueryResultARM.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelinePropertyQueryResultARM - Structure describing a data graph pipeline property query or result + /// + /// + /// + /// :refpage: VkDataGraphPipelinePropertyQueryResultARM + /// + /// + /// The VkDataGraphPipelinePropertyQueryResultARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelinePropertyQueryResultARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDataGraphPipelinePropertyARM property; + /// VkBool32 isText; + /// size_t dataSize; + /// void* pData; + /// } VkDataGraphPipelinePropertyQueryResultARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDataGraphPipelinePropertyQueryResultARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelinePropertyQueryResultARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Property is a VkDataGraphPipelinePropertyARM specifying the property of the data graph pipeline being queried. + /// + [FieldOffset(16)] + public VkDataGraphPipelinePropertyARM Property; + + /// + /// IsText specifies whether the returned data is text or opaque data. If isText is VK_TRUE then the data returned in pData is text and guaranteed to be a null-terminated UTF-8 string. + /// + [FieldOffset(20)] + public Brutal.Bool32 IsText; + + /// + /// DataSize is an integer related to the size, in bytes, of the data, as described below. + /// + [FieldOffset(24)] + public nuint DataSize; + + /// + /// Data is either `NULL` or a pointer to a block of memory into which the implementation will return the property data. + /// + [FieldOffset(32)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoARM.gen.cs new file mode 100644 index 0000000..7cd89e0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoARM.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineResourceInfoARM - Structure specifying parameters of a data graph pipeline resource + /// + /// + /// + /// :refpage: VkDataGraphPipelineResourceInfoARM + /// + /// + /// The VkDataGraphPipelineResourceInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineResourceInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t descriptorSet; + /// uint32_t binding; + /// uint32_t arrayElement; + /// } VkDataGraphPipelineResourceInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineResourceInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineResourceInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorSet is the descriptor set number of the resource being described. + /// + [FieldOffset(16)] + public int DescriptorSet; + + /// + /// Binding is the binding number of the resource being described. + /// + [FieldOffset(20)] + public int Binding; + + /// + /// ArrayElement is the element in the resource array if descriptorSet and binding identifies an array of resources or 0 otherwise. + /// + [FieldOffset(24)] + public int ArrayElement; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoImageLayoutARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoImageLayoutARM.gen.cs new file mode 100644 index 0000000..57ef3c1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineResourceInfoImageLayoutARM.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineResourceInfoImageLayoutARM - Structure specifying parameters of a graph pipeline image resource + /// + /// + /// + /// :refpage: VkDataGraphPipelineResourceInfoImageLayoutARM + /// + /// + /// The VkDataGraphPipelineResourceInfoImageLayoutARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphPipelineResourceInfoImageLayoutARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageLayout layout; + /// } VkDataGraphPipelineResourceInfoImageLayoutARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineResourceInfoImageLayoutARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineResourceInfoImageLayoutARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Layout specifies the layout that the image subresource accessible from the view provided as a graph pipeline resource must be in at the time where the graph pipeline being created is dispatched. + /// + [FieldOffset(16)] + public VkImageLayout Layout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementARM.gen.cs new file mode 100644 index 0000000..706e2f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionBindPointRequirementARM - Structure specifying the requirements of a bind point of a data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionBindPointRequirementARM + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineSessionBindPointRequirementARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDataGraphPipelineSessionBindPointARM bindPoint; + /// VkDataGraphPipelineSessionBindPointTypeARM bindPointType; + /// uint32_t numObjects; + /// } VkDataGraphPipelineSessionBindPointRequirementARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineSessionBindPointRequirementARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSessionBindPointRequirementARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BindPoint is a VkDataGraphPipelineSessionBindPointARM specifying the data graph pipeline session bind point being required. + /// + [FieldOffset(16)] + public VkDataGraphPipelineSessionBindPointARM BindPoint; + + /// + /// BindPointType is a VkDataGraphPipelineSessionBindPointTypeARM specifying the type of object required for bindPoint. + /// + [FieldOffset(20)] + public VkDataGraphPipelineSessionBindPointTypeARM BindPointType; + + /// + /// NumObjects is the number of objects required for bindPoint. + /// + [FieldOffset(24)] + public int NumObjects; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementsInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementsInfoARM.gen.cs new file mode 100644 index 0000000..7b5ad10 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionBindPointRequirementsInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionBindPointRequirementsInfoARM - Structure specifying info to query the bind point requirements of a data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionBindPointRequirementsInfoARM + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineSessionBindPointRequirementsInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDataGraphPipelineSessionARM session; + /// } VkDataGraphPipelineSessionBindPointRequirementsInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineSessionBindPointRequirementsInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSessionBindPointRequirementsInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Session is a VkDataGraphPipelineSessionARM specifying the data graph pipeline session whose bind point requirements are being queried. + /// + [FieldOffset(16)] + public VkDataGraphPipelineSessionARM Session; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionCreateInfoARM.gen.cs new file mode 100644 index 0000000..50cffeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionCreateInfoARM.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionCreateInfoARM - Structure specifying parameters of a newly created data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionCreateInfoARM + /// + /// + /// The VkDataGraphPipelineSessionCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineSessionCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDataGraphPipelineSessionCreateFlagsARM flags; + /// VkPipeline dataGraphPipeline; + /// } VkDataGraphPipelineSessionCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineSessionCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSessionCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDataGraphPipelineSessionCreateFlagsARM describing additional parameters of the session. + /// + [FieldOffset(16)] + public VkDataGraphPipelineSessionCreateFlagsARM Flags; + + /// + /// DataGraphPipeline is the VkPipeline handle of the data graph pipeline for which a session is being created. + /// + [FieldOffset(24)] + public VkPipeline DataGraphPipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionMemoryRequirementsInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionMemoryRequirementsInfoARM.gen.cs new file mode 100644 index 0000000..d5aaa35 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionMemoryRequirementsInfoARM.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionMemoryRequirementsInfoARM - Structure specifying parameters to query the memory requirements of a data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionMemoryRequirementsInfoARM + /// + /// + /// The VkDataGraphPipelineSessionMemoryRequirementsInfoARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineSessionMemoryRequirementsInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDataGraphPipelineSessionARM session; + /// VkDataGraphPipelineSessionBindPointARM bindPoint; + /// uint32_t objectIndex; + /// } VkDataGraphPipelineSessionMemoryRequirementsInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineSessionMemoryRequirementsInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSessionMemoryRequirementsInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Session is the data graph pipeline session to query. + /// + [FieldOffset(16)] + public VkDataGraphPipelineSessionARM Session; + + /// + /// BindPoint is the bind point of a data graph pipeline session for which memory requirements are being queried. + /// + [FieldOffset(24)] + public VkDataGraphPipelineSessionBindPointARM BindPoint; + + /// + /// ObjectIndex is the index of the object whose memory requirements are being queried. + /// + [FieldOffset(28)] + public int ObjectIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM.gen.cs new file mode 100644 index 0000000..1052f08 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM - Structure specifying neural statistics parameters of a newly created data graph pipeline session + /// + /// + /// + /// :refpage: VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM + /// + /// + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// typedef struct VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkNeuralAcceleratorStatisticsModeARM mode; + /// } VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDataGraphPipelineSessionNeuralStatisticsCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSessionNeuralStatisticsCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Mode is a VkNeuralAcceleratorStatisticsModeARM specifying the neural statistics mode for the session being created. + /// + [FieldOffset(16)] + public VkNeuralAcceleratorStatisticsModeARM Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineShaderModuleCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineShaderModuleCreateInfoARM.gen.cs new file mode 100644 index 0000000..6d02c0a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineShaderModuleCreateInfoARM.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineShaderModuleCreateInfoARM - Structure specifying shader module parameters of a newly created data graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineShaderModuleCreateInfoARM + /// + /// + /// The VkDataGraphPipelineShaderModuleCreateInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphPipelineShaderModuleCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderModule module; + /// const char* pName; + /// const VkSpecializationInfo* pSpecializationInfo; + /// uint32_t constantCount; + /// const VkDataGraphPipelineConstantARM* pConstants; + /// } VkDataGraphPipelineShaderModuleCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDataGraphPipelineShaderModuleCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineShaderModuleCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Module is optionally a VkShaderModule object containing the description of the graph. + /// + [FieldOffset(16)] + public VkShaderModule Module; + + /// + /// Name is a pointer to a null-terminated UTF-8 string specifying the graph entry point name for this pipeline. + /// + [FieldOffset(24)] + public byte* Name; + + /// + /// SpecializationInfo is a pointer to a VkSpecializationInfo structure as described in Specialization Constants^, or `NULL`. + /// + [FieldOffset(32)] + public VkSpecializationInfo* SpecializationInfo; + + /// + /// ConstantCount is the length of the pConstants array. + /// + [FieldOffset(40)] + public int ConstantCount; + + /// + /// Constants is a pointer to an array of VkDataGraphPipelineConstantARM structures. + /// + [FieldOffset(48)] + public VkDataGraphPipelineConstantARM* Constants; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeConnectionARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeConnectionARM.gen.cs new file mode 100644 index 0000000..260c2eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeConnectionARM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSingleNodeConnectionARM - Structure describing a single connection between a data graph node and the pipeline layout of a graph pipeline + /// + /// + /// + /// The VkDataGraphPipelineSingleNodeConnectionARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphPipelineSingleNodeConnectionARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t set; + /// uint32_t binding; + /// VkDataGraphPipelineNodeConnectionTypeARM connection; + /// } VkDataGraphPipelineSingleNodeConnectionARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineSingleNodeConnectionARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSingleNodeConnectionARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Set is the descriptor set number of the graph pipeline layout resource to be connected to this connection point. + /// + [FieldOffset(16)] + public int Set; + + /// + /// Binding is the binding number of the graph pipeline layout resource to be connected to this connection point. + /// + [FieldOffset(20)] + public int Binding; + + /// + /// Connection is a VkDataGraphPipelineNodeConnectionTypeARM specifying the connection point to link to a graph pipeline layout resource. + /// + [FieldOffset(24)] + public VkDataGraphPipelineNodeConnectionTypeARM Connection; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeCreateInfoARM.gen.cs new file mode 100644 index 0000000..16a6788 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphPipelineSingleNodeCreateInfoARM.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphPipelineSingleNodeCreateInfoARM - Structure specifying parameters of a newly-created single fixed-function node graph pipeline + /// + /// + /// + /// :refpage: VkDataGraphPipelineSingleNodeCreateInfoARM + /// + /// + /// The VkDataGraphPipelineSingleNodeCreateInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkDataGraphPipelineSingleNodeCreateInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDataGraphPipelineNodeTypeARM nodeType; + /// uint32_t connectionCount; + /// const VkDataGraphPipelineSingleNodeConnectionARM* pConnections; + /// } VkDataGraphPipelineSingleNodeCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphPipelineSingleNodeCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphPipelineSingleNodeCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NodeType is a VkDataGraphPipelineNodeTypeARM describing the type of this node. + /// + [FieldOffset(16)] + public VkDataGraphPipelineNodeTypeARM NodeType; + + /// + /// ConnectionCount is the length of the pConnections array. + /// + [FieldOffset(20)] + public int ConnectionCount; + + /// + /// Connections is a pointer to an array of connectionCount VkDataGraphPipelineSingleNodeConnectionARM structures. + /// + [FieldOffset(24)] + public VkDataGraphPipelineSingleNodeConnectionARM* Connections; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphProcessingEngineCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphProcessingEngineCreateInfoARM.gen.cs new file mode 100644 index 0000000..78a21aa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphProcessingEngineCreateInfoARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphProcessingEngineCreateInfoARM - Structure describing a collection of data graph processing engines for which the object being created is specialized + /// + /// + /// + /// The VkDataGraphProcessingEngineCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkDataGraphProcessingEngineCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t processingEngineCount; + /// VkPhysicalDeviceDataGraphProcessingEngineARM* pProcessingEngines; + /// } VkDataGraphProcessingEngineCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDataGraphProcessingEngineCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DataGraphProcessingEngineCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProcessingEngineCount is the number of elements in pProcessingEngines. + /// + [FieldOffset(16)] + public int ProcessingEngineCount; + + /// + /// ProcessingEngines is a pointer to an array of processingEngineCount VkPhysicalDeviceDataGraphProcessingEngineARM structures. + /// + [FieldOffset(24)] + public VkPhysicalDeviceDataGraphProcessingEngineARM* ProcessingEngines; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDataGraphTosaNameQualityARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDataGraphTosaNameQualityARM.gen.cs new file mode 100644 index 0000000..628ea3e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDataGraphTosaNameQualityARM.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDataGraphTOSANameQualityARM - Structure describing the name and quality level of a TOSA profile or extension + /// + /// + /// + /// The VkDataGraphTOSANameQualityARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_instruction_set_tosa + /// typedef struct VkDataGraphTOSANameQualityARM { + /// char name[VK_MAX_DATA_GRAPH_TOSA_NAME_SIZE_ARM]; + /// VkDataGraphTOSAQualityFlagsARM qualityFlags; + /// } VkDataGraphTOSANameQualityARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 132)] + public unsafe partial struct VkDataGraphTosaNameQualityARM() + { + /// + [FieldOffset(0)] + public fixed byte Name[128]; + + /// + /// QualityFlags + /// + [FieldOffset(128)] + public VkDataGraphTosaQualityFlagsARM QualityFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugMarkerMarkerInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugMarkerMarkerInfoEXT.gen.cs new file mode 100644 index 0000000..5b98964 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugMarkerMarkerInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugMarkerMarkerInfoEXT - Specify parameters of a command buffer marker region + /// + /// + /// + /// The VkDebugMarkerMarkerInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// typedef struct VkDebugMarkerMarkerInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const char* pMarkerName; + /// float color[4]; + /// } VkDebugMarkerMarkerInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDebugMarkerMarkerInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugMarkerMarkerInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MarkerName is a pointer to a null-terminated UTF-8 string containing the name of the marker. + /// + [FieldOffset(16)] + public byte* MarkerName; + + /// + /// Color is an optional: RGBA color value that can be associated with the marker. A particular implementation may: choose to ignore this color value. The values contain RGBA values in order, in the range 0.0 to 1.0. If all elements in color are 0.0, then it is ignored. + /// + [FieldOffset(24)] + public float4 Color; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectNameInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectNameInfoEXT.gen.cs new file mode 100644 index 0000000..4588c14 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectNameInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugMarkerObjectNameInfoEXT - Specify parameters of a name to give to an object + /// + /// + /// + /// The VkDebugMarkerObjectNameInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// typedef struct VkDebugMarkerObjectNameInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDebugReportObjectTypeEXT objectType; + /// uint64_t object; + /// const char* pObjectName; + /// } VkDebugMarkerObjectNameInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDebugMarkerObjectNameInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugMarkerObjectNameInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ObjectType is a VkDebugReportObjectTypeEXT specifying the type of the object to be named. + /// + [FieldOffset(16)] + public VkDebugReportObjectTypeEXT ObjectType; + + /// + /// Object is the object to be named. + /// + [FieldOffset(24)] + public nint Object; + + /// + /// ObjectName is a null-terminated UTF-8 string specifying the name to apply to object. + /// + [FieldOffset(32)] + public byte* ObjectName; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectTagInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectTagInfoEXT.gen.cs new file mode 100644 index 0000000..65c2341 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugMarkerObjectTagInfoEXT.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugMarkerObjectTagInfoEXT - Specify parameters of a tag to attach to an object + /// + /// + /// + /// The VkDebugMarkerObjectTagInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_debug_marker + /// typedef struct VkDebugMarkerObjectTagInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDebugReportObjectTypeEXT objectType; + /// uint64_t object; + /// uint64_t tagName; + /// size_t tagSize; + /// const void* pTag; + /// } VkDebugMarkerObjectTagInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDebugMarkerObjectTagInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugMarkerObjectTagInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ObjectType is a VkDebugReportObjectTypeEXT specifying the type of the object to be named. + /// + [FieldOffset(16)] + public VkDebugReportObjectTypeEXT ObjectType; + + /// + /// Object is the object to be tagged. + /// + [FieldOffset(24)] + public nint Object; + + /// + /// TagName is a numerical identifier of the tag. + /// + [FieldOffset(32)] + public nint TagName; + + /// + /// TagSize is the number of bytes of data to attach to the object. + /// + [FieldOffset(40)] + public nuint TagSize; + + /// + /// Tag is a pointer to an array of tagSize bytes containing the data to be associated with the object. + /// + [FieldOffset(48)] + public void* Tag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugReportCallbackCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugReportCallbackCreateInfoEXT.gen.cs new file mode 100644 index 0000000..3b1c35f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugReportCallbackCreateInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugReportCallbackCreateInfoEXT - Structure specifying parameters of a newly created debug report callback + /// + /// + /// + /// The definition of VkDebugReportCallbackCreateInfoEXT is: + /// + /// + /// // Provided by VK_EXT_debug_report + /// typedef struct VkDebugReportCallbackCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDebugReportFlagsEXT flags; + /// PFN_vkDebugReportCallbackEXT pfnCallback; + /// void* pUserData; + /// } VkDebugReportCallbackCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDebugReportCallbackCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugReportCallbackCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDebugReportFlagsEXT specifying which event(s) will cause this callback to be called. + /// + [FieldOffset(16)] + public VkDebugReportFlagsEXT Flags; + + /// + /// PfnCallback is the application callback function to call. + /// + [FieldOffset(24)] + public PfnVkDebugReportCallbackEXT PfnCallback; + + /// + /// UserData is NULL or an application-defined user data pointer to be passed to the callback. + /// + [FieldOffset(32)] + public void* UserData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugUtilsLabelEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsLabelEXT.gen.cs new file mode 100644 index 0000000..e991c9f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsLabelEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsLabelEXT - Specify parameters of a label region + /// + /// + /// + /// The VkDebugUtilsLabelEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef struct VkDebugUtilsLabelEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const char* pLabelName; + /// float color[4]; + /// } VkDebugUtilsLabelEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDebugUtilsLabelEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugUtilsLabelEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LabelName is a pointer to a null-terminated UTF-8 string containing the name of the label. + /// + [FieldOffset(16)] + public byte* LabelName; + + /// + /// Color is an optional RGBA color value that can be associated with the label. A particular implementation may: choose to ignore this color value. The values contain RGBA values in order, in the range 0.0 to 1.0. If all elements in color are 0.0, then it is ignored. + /// + [FieldOffset(24)] + public float4 Color; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCallbackDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCallbackDataEXT.gen.cs new file mode 100644 index 0000000..b91597b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCallbackDataEXT.gen.cs @@ -0,0 +1,103 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsMessengerCallbackDataEXT - Structure specifying parameters returned to the callback + /// + /// + /// + /// The definition of VkDebugUtilsMessengerCallbackDataEXT is: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef struct VkDebugUtilsMessengerCallbackDataEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDebugUtilsMessengerCallbackDataFlagsEXT flags; + /// const char* pMessageIdName; + /// int32_t messageIdNumber; + /// const char* pMessage; + /// uint32_t queueLabelCount; + /// const VkDebugUtilsLabelEXT* pQueueLabels; + /// uint32_t cmdBufLabelCount; + /// const VkDebugUtilsLabelEXT* pCmdBufLabels; + /// uint32_t objectCount; + /// const VkDebugUtilsObjectNameInfoEXT* pObjects; + /// } VkDebugUtilsMessengerCallbackDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkDebugUtilsMessengerCallbackDataEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugUtilsMessengerCallbackDataEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is `0` and is reserved for future use. + /// + [FieldOffset(16)] + public VkDebugUtilsMessengerCallbackDataFlagsEXT Flags; + + /// + /// MessageIdName is `NULL` or a null-terminated UTF-8 string that identifies the particular message ID that is associated with the provided message. If the message corresponds to a validation layer message, then this string will be the VUID. + /// + [FieldOffset(24)] + public byte* MessageIdName; + + /// + /// MessageIdNumber is the ID number of the triggering message. If the message corresponds to a validation layer message, then this number is an internal hash of the VUID. + /// + [FieldOffset(32)] + public int MessageIdNumber; + + /// + /// Message is a null-terminated UTF-8 string detailing the trigger conditions. If the message corresponds to a validation layer message, then this will contain the main message with the specification text and link. + /// + [FieldOffset(40)] + public byte* Message; + + /// + /// QueueLabelCount is a count of items contained in the pQueueLabels array. + /// + [FieldOffset(48)] + public int QueueLabelCount; + + /// + /// QueueLabels is `NULL` or a pointer to an array of VkDebugUtilsLabelEXT active in the current VkQueue at the time the callback was triggered. Refer to Queue Labels^ for more information. + /// + [FieldOffset(56)] + public VkDebugUtilsLabelEXT* QueueLabels; + + /// + /// CmdBufLabelCount is a count of items contained in the pCmdBufLabels array. + /// + [FieldOffset(64)] + public int CmdBufLabelCount; + + /// + /// CmdBufLabels is `NULL` or a pointer to an array of VkDebugUtilsLabelEXT active in the current VkCommandBuffer at the time the callback was triggered. Refer to Command Buffer Labels^ for more information. + /// + [FieldOffset(72)] + public VkDebugUtilsLabelEXT* CmdBufLabels; + + /// + /// ObjectCount is a count of items contained in the pObjects array. + /// + [FieldOffset(80)] + public int ObjectCount; + + /// + /// Objects is a pointer to an array of VkDebugUtilsObjectNameInfoEXT objects related to the detected issue. The array is roughly in order of importance, but the 0th element is always guaranteed to be the most important object for this message. + /// + [FieldOffset(88)] + public VkDebugUtilsObjectNameInfoEXT* Objects; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCreateInfoEXT.gen.cs new file mode 100644 index 0000000..0c7bd72 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsMessengerCreateInfoEXT.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsMessengerCreateInfoEXT - Structure specifying parameters of a newly created debug messenger + /// + /// + /// + /// The definition of VkDebugUtilsMessengerCreateInfoEXT is: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef struct VkDebugUtilsMessengerCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDebugUtilsMessengerCreateFlagsEXT flags; + /// VkDebugUtilsMessageSeverityFlagsEXT messageSeverity; + /// VkDebugUtilsMessageTypeFlagsEXT messageType; + /// PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback; + /// void* pUserData; + /// } VkDebugUtilsMessengerCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDebugUtilsMessengerCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugUtilsMessengerCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is `0` and is reserved for future use. + /// + [FieldOffset(16)] + public VkDebugUtilsMessengerCreateFlagsEXT Flags; + + /// + /// MessageSeverity is a bitmask of VkDebugUtilsMessageSeverityFlagsEXT specifying which severity of event(s) will cause this callback to be called. + /// + [FieldOffset(20)] + public VkDebugUtilsMessageSeverityFlagsEXT MessageSeverity; + + /// + /// MessageType is a bitmask of VkDebugUtilsMessageTypeFlagsEXT specifying which type of event(s) will cause this callback to be called. + /// + [FieldOffset(24)] + public VkDebugUtilsMessageTypeFlagsEXT MessageType; + + /// + /// PfnUserCallback is the application callback function to call. + /// + [FieldOffset(32)] + public PfnVkDebugUtilsMessengerCallbackEXT PfnUserCallback; + + /// + /// UserData is NULL or an application-defined user data pointer to be passed to the callback. + /// + [FieldOffset(40)] + public void* UserData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectNameInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectNameInfoEXT.gen.cs new file mode 100644 index 0000000..fa5cd14 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectNameInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsObjectNameInfoEXT - Specify parameters of a name to give to an object + /// + /// + /// + /// The VkDebugUtilsObjectNameInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef struct VkDebugUtilsObjectNameInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkObjectType objectType; + /// uint64_t objectHandle; + /// const char* pObjectName; + /// } VkDebugUtilsObjectNameInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDebugUtilsObjectNameInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugUtilsObjectNameInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ObjectType is a VkObjectType specifying the type of the object to be named. + /// + [FieldOffset(16)] + public VkObjectType ObjectType; + + /// + /// ObjectHandle is the object to be named. + /// + [FieldOffset(24)] + public nint ObjectHandle; + + /// + /// ObjectName is either `NULL` or a null-terminated UTF-8 string specifying the name to apply to objectHandle. + /// + [FieldOffset(32)] + public byte* ObjectName; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectTagInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectTagInfoEXT.gen.cs new file mode 100644 index 0000000..fc5c7cf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDebugUtilsObjectTagInfoEXT.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDebugUtilsObjectTagInfoEXT - Specify parameters of a tag to attach to an object + /// + /// + /// + /// The VkDebugUtilsObjectTagInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_debug_utils + /// typedef struct VkDebugUtilsObjectTagInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkObjectType objectType; + /// uint64_t objectHandle; + /// uint64_t tagName; + /// size_t tagSize; + /// const void* pTag; + /// } VkDebugUtilsObjectTagInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDebugUtilsObjectTagInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DebugUtilsObjectTagInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ObjectType is a VkObjectType specifying the type of the object to be named. + /// + [FieldOffset(16)] + public VkObjectType ObjectType; + + /// + /// ObjectHandle is the object to be tagged. + /// + [FieldOffset(24)] + public nint ObjectHandle; + + /// + /// TagName is a numerical identifier of the tag. + /// + [FieldOffset(32)] + public nint TagName; + + /// + /// TagSize is the number of bytes of data to attach to the object. + /// + [FieldOffset(40)] + public nuint TagSize; + + /// + /// Tag is a pointer to an array of tagSize bytes containing the data to be associated with the object. + /// + [FieldOffset(48)] + public void* Tag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryInfoEXT.gen.cs new file mode 100644 index 0000000..2fb6911 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryInfoEXT.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDecompressMemoryInfoEXT - Structure specifying decompression memory info + /// + /// + /// + /// :refpage: VkDecompressMemoryInfoEXT + /// + /// + /// The VkDecompressMemoryInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// typedef struct VkDecompressMemoryInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkMemoryDecompressionMethodFlagsEXT decompressionMethod; + /// uint32_t regionCount; + /// const VkDecompressMemoryRegionEXT* pRegions; + /// } VkDecompressMemoryInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDecompressMemoryInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DecompressMemoryInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DecompressionMethod is a bitmask of VkMemoryDecompressionMethodFlagsEXT with a single bit set specifying the method used to decompress data. + /// + [FieldOffset(16)] + public VkMemoryDecompressionMethodFlagsEXT DecompressionMethod; + + /// + /// RegionCount is the number of regions to decompress. + /// + [FieldOffset(24)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkDecompressMemoryRegionEXT structures specifying the regions to decompress. + /// + [FieldOffset(32)] + public VkDecompressMemoryRegionEXT* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionEXT.gen.cs new file mode 100644 index 0000000..8185c37 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDecompressMemoryRegionEXT - Structure specifying decompression region + /// + /// + /// + /// :refpage: VkDecompressMemoryRegionEXT + /// + /// + /// The VkDecompressMemoryRegionEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// typedef struct VkDecompressMemoryRegionEXT { + /// VkDeviceAddress srcAddress; + /// VkDeviceAddress dstAddress; + /// VkDeviceSize compressedSize; + /// VkDeviceSize decompressedSize; + /// } VkDecompressMemoryRegionEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct VkDecompressMemoryRegionEXT() + { + /// + /// SrcAddress is the address where compressed data is stored. + /// + [FieldOffset(0)] + public VkDeviceAddress SrcAddress; + + /// + /// DstAddress is the destination address where decompressed data will be written. + /// + [FieldOffset(8)] + public VkDeviceAddress DstAddress; + + /// + /// CompressedSize is the size of compressed data in bytes. + /// + [FieldOffset(16)] + public ByteSize64 CompressedSize; + + /// + /// DecompressedSize is the size of decompressed data in bytes. + /// + [FieldOffset(24)] + public ByteSize64 DecompressedSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionNV.gen.cs new file mode 100644 index 0000000..c8f74e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDecompressMemoryRegionNV.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDecompressMemoryRegionNV - Structure specifying decompression region parameters + /// + /// + /// + /// :refpage: VkDecompressMemoryRegionNV + /// + /// + /// The VkDecompressMemoryRegionNV structure is defined as: + /// + /// + /// // Provided by VK_NV_memory_decompression + /// typedef struct VkDecompressMemoryRegionNV { + /// VkDeviceAddress srcAddress; + /// VkDeviceAddress dstAddress; + /// VkDeviceSize compressedSize; + /// VkDeviceSize decompressedSize; + /// VkMemoryDecompressionMethodFlagsEXT decompressionMethod; + /// } VkDecompressMemoryRegionNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct VkDecompressMemoryRegionNV() + { + /// + /// SrcAddress is the address where compressed data is stored. + /// + [FieldOffset(0)] + public VkDeviceAddress SrcAddress; + + /// + /// DstAddress is the destination address where decompressed data will be written. + /// + [FieldOffset(8)] + public VkDeviceAddress DstAddress; + + /// + /// CompressedSize is the size of compressed data in bytes. + /// + [FieldOffset(16)] + public ByteSize64 CompressedSize; + + /// + /// DecompressedSize is the size of decompressed data in bytes. + /// + [FieldOffset(24)] + public ByteSize64 DecompressedSize; + + /// + /// DecompressionMethod is a bitmask of VkMemoryDecompressionMethodFlagsNV with a single bit set specifying the method used to decompress data. + /// + [FieldOffset(32)] + public VkMemoryDecompressionMethodFlagsEXT DecompressionMethod; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationBufferCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationBufferCreateInfoNV.gen.cs new file mode 100644 index 0000000..a865881 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationBufferCreateInfoNV.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDedicatedAllocationBufferCreateInfoNV - Specify that a buffer is bound to a dedicated memory resource + /// + /// + /// + /// If the pNext chain includes a + /// VkDedicatedAllocationBufferCreateInfoNV structure, then that structure + /// includes an enable controlling whether the buffer will have a dedicated + /// memory allocation bound to it. + /// + /// + /// The VkDedicatedAllocationBufferCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_dedicated_allocation + /// typedef struct VkDedicatedAllocationBufferCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 dedicatedAllocation; + /// } VkDedicatedAllocationBufferCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDedicatedAllocationBufferCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DedicatedAllocationBufferCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DedicatedAllocation specifies whether the buffer will have a dedicated allocation bound to it. + /// + [FieldOffset(16)] + public Brutal.Bool32 DedicatedAllocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationImageCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationImageCreateInfoNV.gen.cs new file mode 100644 index 0000000..7c3b3dd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationImageCreateInfoNV.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDedicatedAllocationImageCreateInfoNV - Specify that an image is bound to a dedicated memory resource + /// + /// + /// + /// If the pNext chain includes a + /// VkDedicatedAllocationImageCreateInfoNV structure, then that structure + /// includes an enable controlling whether the image will have a dedicated + /// memory allocation bound to it. + /// + /// + /// The VkDedicatedAllocationImageCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_dedicated_allocation + /// typedef struct VkDedicatedAllocationImageCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 dedicatedAllocation; + /// } VkDedicatedAllocationImageCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDedicatedAllocationImageCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DedicatedAllocationImageCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DedicatedAllocation specifies whether the image will have a dedicated allocation bound to it. + /// + [FieldOffset(16)] + public Brutal.Bool32 DedicatedAllocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationMemoryAllocateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationMemoryAllocateInfoNV.gen.cs new file mode 100644 index 0000000..a81dc7a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDedicatedAllocationMemoryAllocateInfoNV.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDedicatedAllocationMemoryAllocateInfoNV - Specify a dedicated memory allocation resource + /// + /// + /// + /// If the pNext chain includes a + /// VkDedicatedAllocationMemoryAllocateInfoNV structure, then that + /// structure includes a handle of the sole buffer or image resource that the + /// memory can be bound to. + /// + /// + /// The VkDedicatedAllocationMemoryAllocateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_dedicated_allocation + /// typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// VkBuffer buffer; + /// } VkDedicatedAllocationMemoryAllocateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDedicatedAllocationMemoryAllocateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DedicatedAllocationMemoryAllocateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is VK_NULL_HANDLE or a handle of an image which this memory will be bound to. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// Buffer is VK_NULL_HANDLE or a handle of a buffer which this memory will be bound to. + /// + [FieldOffset(24)] + public VkBuffer Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDependencyInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDependencyInfo.gen.cs new file mode 100644 index 0000000..f1344c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDependencyInfo.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDependencyInfo - Structure specifying dependency information for a synchronization command + /// + /// + /// + /// The VkDependencyInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkDependencyInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDependencyFlags dependencyFlags; + /// uint32_t memoryBarrierCount; + /// const VkMemoryBarrier2* pMemoryBarriers; + /// uint32_t bufferMemoryBarrierCount; + /// const VkBufferMemoryBarrier2* pBufferMemoryBarriers; + /// uint32_t imageMemoryBarrierCount; + /// const VkImageMemoryBarrier2* pImageMemoryBarriers; + /// } VkDependencyInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkDependencyInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DependencyInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DependencyFlags is a bitmask of VkDependencyFlags specifying how execution and memory dependencies are formed. + /// + [FieldOffset(16)] + public VkDependencyFlags DependencyFlags; + + /// + /// MemoryBarrierCount is the length of the pMemoryBarriers array. + /// + [FieldOffset(20)] + public int MemoryBarrierCount; + + /// + /// MemoryBarriers is a pointer to an array of VkMemoryBarrier2 structures defining memory dependencies between any memory accesses. + /// + [FieldOffset(24)] + public VkMemoryBarrier2* MemoryBarriers; + + /// + /// BufferMemoryBarrierCount is the length of the pBufferMemoryBarriers array. + /// + [FieldOffset(32)] + public int BufferMemoryBarrierCount; + + /// + /// BufferMemoryBarriers is a pointer to an array of VkBufferMemoryBarrier2 structures defining memory dependencies between buffer ranges. + /// + [FieldOffset(40)] + public VkBufferMemoryBarrier2* BufferMemoryBarriers; + + /// + /// ImageMemoryBarrierCount is the length of the pImageMemoryBarriers array. + /// + [FieldOffset(48)] + public int ImageMemoryBarrierCount; + + /// + /// ImageMemoryBarriers is a pointer to an array of VkImageMemoryBarrier2 structures defining memory dependencies between image subresources. + /// + [FieldOffset(56)] + public VkImageMemoryBarrier2* ImageMemoryBarriers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDepthBiasInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDepthBiasInfoEXT.gen.cs new file mode 100644 index 0000000..50c5d45 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDepthBiasInfoEXT.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDepthBiasInfoEXT - Structure specifying depth bias parameters + /// + /// + /// + /// :refpage: VkDepthBiasInfoEXT + /// + /// + /// The VkDepthBiasInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_depth_bias_control + /// typedef struct VkDepthBiasInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// float depthBiasConstantFactor; + /// float depthBiasClamp; + /// float depthBiasSlopeFactor; + /// } VkDepthBiasInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDepthBiasInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DepthBiasInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthBiasConstantFactor is a scalar factor controlling the constant depth value added to each fragment. + /// + [FieldOffset(16)] + public float DepthBiasConstantFactor; + + /// + /// DepthBiasClamp is the maximum (or minimum) depth bias of a fragment. + /// + [FieldOffset(20)] + public float DepthBiasClamp; + + /// + /// DepthBiasSlopeFactor is a scalar factor applied to a fragment's slope in depth bias calculations. + /// + [FieldOffset(24)] + public float DepthBiasSlopeFactor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDepthBiasRepresentationInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDepthBiasRepresentationInfoEXT.gen.cs new file mode 100644 index 0000000..d1101e6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDepthBiasRepresentationInfoEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDepthBiasRepresentationInfoEXT - Structure specifying depth bias parameters + /// + /// + /// + /// :refpage: VkDepthBiasRepresentationInfoEXT + /// + /// + /// The VkDepthBiasRepresentationInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_depth_bias_control + /// typedef struct VkDepthBiasRepresentationInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDepthBiasRepresentationEXT depthBiasRepresentation; + /// VkBool32 depthBiasExact; + /// } VkDepthBiasRepresentationInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDepthBiasRepresentationInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DepthBiasRepresentationInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthBiasRepresentation is a VkDepthBiasRepresentationEXT value specifying the depth bias representation. + /// + [FieldOffset(16)] + public VkDepthBiasRepresentationEXT DepthBiasRepresentation; + + /// + /// DepthBiasExact specifies that the implementation is not allowed to scale the depth bias value to ensure a minimum resolvable distance. + /// + [FieldOffset(20)] + public Brutal.Bool32 DepthBiasExact; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDepthClampRangeEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDepthClampRangeEXT.gen.cs new file mode 100644 index 0000000..91c7dbe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDepthClampRangeEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDepthClampRangeEXT - Structure specifying a depth clamp range + /// + /// + /// + /// The VkDepthClampRangeEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_depth_clamp_control + /// typedef struct VkDepthClampRangeEXT { + /// float minDepthClamp; + /// float maxDepthClamp; + /// } VkDepthClampRangeEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkDepthClampRangeEXT() + { + /// + /// MinDepthClamp sets z~min~ in the depth clamp range of the viewport. + /// + [FieldOffset(0)] + public float MinDepthClamp; + + /// + /// MaxDepthClamp sets z~max~ in the depth clamp range of the viewport. + /// + [FieldOffset(4)] + public float MaxDepthClamp; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorAddressInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorAddressInfoEXT.gen.cs new file mode 100644 index 0000000..f8e3430 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorAddressInfoEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorAddressInfoEXT - Structure specifying descriptor buffer address info + /// + /// + /// + /// Data describing a VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, + /// VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, + /// VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, or + /// VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is passed in a + /// VkDescriptorAddressInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkDescriptorAddressInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceAddress address; + /// VkDeviceSize range; + /// VkFormat format; + /// } VkDescriptorAddressInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDescriptorAddressInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorAddressInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Address is either `0` or a device address at an offset in a buffer, where the base address can be queried from vkGetBufferDeviceAddress. + /// + [FieldOffset(16)] + public VkDeviceAddress Address; + + /// + /// Range is the size in bytes of the buffer or buffer view used by the descriptor. + /// + [FieldOffset(24)] + public ByteSize64 Range; + + /// + /// Format is the format of the data elements in the buffer view and is ignored for buffers. + /// + [FieldOffset(32)] + public VkFormat Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingInfoEXT.gen.cs new file mode 100644 index 0000000..bef517e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingInfoEXT.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorBufferBindingInfoEXT - Structure specifying descriptor buffer binding information + /// + /// + /// + /// :refpage: VkDescriptorBufferBindingInfoEXT + /// + /// + /// Data describing a descriptor buffer binding is passed in a + /// VkDescriptorBufferBindingInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkDescriptorBufferBindingInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddress address; + /// VkBufferUsageFlags usage; + /// } VkDescriptorBufferBindingInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorBufferBindingInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorBufferBindingInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Address is a basetype:VkDeviceAddress specifying the device address defining the descriptor buffer to be bound. + /// + [FieldOffset(16)] + public VkDeviceAddress Address; + + /// + /// Usage is a bitmask of VkBufferUsageFlags specifying the VkBufferCreateInfo::usage for the buffer from which address was queried. Usage flags other than VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, and VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT are ignored. + /// + [FieldOffset(24)] + public VkBufferUsageFlags Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.gen.cs new file mode 100644 index 0000000..16115ec --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferBindingPushDescriptorBufferHandleEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorBufferBindingPushDescriptorBufferHandleEXT - Structure specifying push descriptor buffer binding information + /// + /// + /// + /// When the VkPhysicalDeviceDescriptorBufferPropertiesEXT::bufferlessPushDescriptors^ + /// property is VK_FALSE, the VkBuffer handle of the buffer for push + /// descriptors is passed in a + /// VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer buffer; + /// } VkDescriptorBufferBindingPushDescriptorBufferHandleEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorBufferBindingPushDescriptorBufferHandleEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Buffer is the VkBuffer handle of the buffer for push descriptors. + /// + [FieldOffset(16)] + public VkBuffer Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferInfo.gen.cs new file mode 100644 index 0000000..103452c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorBufferInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorBufferInfo - Structure specifying descriptor buffer information + /// + /// + /// + /// The VkDescriptorBufferInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorBufferInfo { + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// VkDeviceSize range; + /// } VkDescriptorBufferInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkDescriptorBufferInfo() + { + /// + /// Buffer is the buffer resource. + /// + [FieldOffset(0)] + public VkBuffer Buffer; + + /// + /// Offset is the offset in bytes from the start of buffer. Access to buffer memory via this descriptor uses addressing that is relative to this starting offset. + /// + [FieldOffset(8)] + public ByteSize64 Offset; + + /// + /// Range is the size in bytes that is used for this descriptor update, or VK_WHOLE_SIZE to use the range from offset to the end of the buffer. + [NOTE] + /// + [FieldOffset(16)] + public ByteSize64 Range; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorDataEXT.gen.cs new file mode 100644 index 0000000..3e42f23 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorDataEXT.gen.cs @@ -0,0 +1,90 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorDataEXT - Structure specifying descriptor data + /// + /// + /// + /// Data describing the descriptor is passed in a VkDescriptorDataEXT + /// structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef union VkDescriptorDataEXT { + /// const VkSampler* pSampler; + /// const VkDescriptorImageInfo* pCombinedImageSampler; + /// const VkDescriptorImageInfo* pInputAttachmentImage; + /// const VkDescriptorImageInfo* pSampledImage; + /// const VkDescriptorImageInfo* pStorageImage; + /// const VkDescriptorAddressInfoEXT* pUniformTexelBuffer; + /// const VkDescriptorAddressInfoEXT* pStorageTexelBuffer; + /// const VkDescriptorAddressInfoEXT* pUniformBuffer; + /// const VkDescriptorAddressInfoEXT* pStorageBuffer; + /// VkDeviceAddress accelerationStructure; + /// } VkDescriptorDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkDescriptorDataEXT() + { + /// + /// Sampler is a pointer to a VkSampler handle specifying the parameters of a VK_DESCRIPTOR_TYPE_SAMPLER descriptor. + /// + [FieldOffset(0)] + public VkSampler* Sampler; + + /// + /// CombinedImageSampler is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor. + /// + [FieldOffset(0)] + public VkDescriptorImageInfo* CombinedImageSampler; + + /// + /// InputAttachmentImage is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT descriptor. + /// + [FieldOffset(0)] + public VkDescriptorImageInfo* InputAttachmentImage; + + /// + /// SampledImage is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE descriptor. + /// + [FieldOffset(0)] + public VkDescriptorImageInfo* SampledImage; + + /// + /// StorageImage is a pointer to a VkDescriptorImageInfo structure specifying the parameters of a VK_DESCRIPTOR_TYPE_STORAGE_IMAGE descriptor. + /// + [FieldOffset(0)] + public VkDescriptorImageInfo* StorageImage; + + /// + /// UniformTexelBuffer is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER descriptor. + /// + [FieldOffset(0)] + public VkDescriptorAddressInfoEXT* UniformTexelBuffer; + + /// + /// StorageTexelBuffer is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor. + /// + [FieldOffset(0)] + public VkDescriptorAddressInfoEXT* StorageTexelBuffer; + + /// + /// UniformBuffer is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER descriptor. + /// + [FieldOffset(0)] + public VkDescriptorAddressInfoEXT* UniformBuffer; + + /// + /// StorageBuffer is a pointer to a VkDescriptorAddressInfoEXT structure specifying the parameters of a VK_DESCRIPTOR_TYPE_STORAGE_BUFFER descriptor. + /// + [FieldOffset(0)] + public VkDescriptorAddressInfoEXT* StorageBuffer; + + /// + /// AccelerationStructure is reserved for future use and is ignored. + /// + [FieldOffset(0)] + public VkDeviceAddress AccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorGetInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorGetInfoEXT.gen.cs new file mode 100644 index 0000000..81db7d4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorGetInfoEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorGetInfoEXT - Structure specifying parameters of descriptor to get + /// + /// + /// + /// Information about the descriptor to get is passed in a + /// VkDescriptorGetInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkDescriptorGetInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorType type; + /// VkDescriptorDataEXT data; + /// } VkDescriptorGetInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorGetInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorGetInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is the type of descriptor to get. + /// + [FieldOffset(16)] + public VkDescriptorType Type; + + /// + /// Data is a VkDescriptorDataEXT union containing the information needed to get the descriptor. + /// + [FieldOffset(24)] + public VkDescriptorDataEXT Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorGetTensorInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorGetTensorInfoARM.gen.cs new file mode 100644 index 0000000..274615e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorGetTensorInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorGetTensorInfoARM - Structure specifying parameters to get descriptor data for tensor views + /// + /// + /// + /// The VkDescriptorGetTensorInfoARM is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// typedef struct VkDescriptorGetTensorInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorViewARM tensorView; + /// } VkDescriptorGetTensorInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorGetTensorInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorGetTensorInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorView is a VkTensorViewARM handle specifying the parameters of a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor. + /// + [FieldOffset(16)] + public VkTensorViewARM TensorView; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorImageInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorImageInfo.gen.cs new file mode 100644 index 0000000..4c4d7c7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorImageInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorImageInfo - Structure specifying descriptor image information + /// + /// + /// + /// The VkDescriptorImageInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorImageInfo { + /// VkSampler sampler; + /// VkImageView imageView; + /// VkImageLayout imageLayout; + /// } VkDescriptorImageInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkDescriptorImageInfo() + { + /// + /// Sampler is a sampler handle, and is used in descriptor updates for types VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER if the binding being updated does not use immutable samplers. + /// + [FieldOffset(0)] + public VkSampler Sampler; + + /// + /// ImageView is an image view handle, and is used in descriptor updates for types VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT. + /// + [FieldOffset(8)] + public VkImageView ImageView; + + /// + /// ImageLayout is the layout that the image subresources accessible from imageView will be in at the time this descriptor is accessed. imageLayout is used in descriptor updates for types VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT. + /// + [FieldOffset(16)] + public VkImageLayout ImageLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceConstantOffsetEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceConstantOffsetEXT.gen.cs new file mode 100644 index 0000000..e0a0779 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceConstantOffsetEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceConstantOffsetEXT - Structure specifying mapping resources to a constant heap index + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceConstantOffsetEXT + /// + /// + /// The VkDescriptorMappingSourceConstantOffsetEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourceConstantOffsetEXT { + /// uint32_t heapOffset; + /// uint32_t heapArrayStride; + /// const VkSamplerCreateInfo* pEmbeddedSampler; + /// uint32_t samplerHeapOffset; + /// uint32_t samplerHeapArrayStride; + /// } VkDescriptorMappingSourceConstantOffsetEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorMappingSourceConstantOffsetEXT() + { + /// + /// HeapOffset is a constant byte offset added to the heap address for the mapped resource or sampler. + /// + [FieldOffset(0)] + public int HeapOffset; + + /// + /// HeapArrayStride is a constant byte stride that multiplies the shader binding and array index. + /// + [FieldOffset(4)] + public int HeapArrayStride; + + /// + /// EmbeddedSampler is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap. + /// + [FieldOffset(8)] + public VkSamplerCreateInfo* EmbeddedSampler; + + /// + /// SamplerHeapOffset is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler. + /// + [FieldOffset(16)] + public int SamplerHeapOffset; + + /// + /// SamplerHeapArrayStride is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler. + /// + [FieldOffset(20)] + public int SamplerHeapArrayStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceDataEXT.gen.cs new file mode 100644 index 0000000..8b24641 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceDataEXT.gen.cs @@ -0,0 +1,99 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceDataEXT - Union descriptor mapping source information + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceDataEXT + /// + /// + /// The VkDescriptorMappingSourceDataEXT union is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef union VkDescriptorMappingSourceDataEXT { + /// VkDescriptorMappingSourceConstantOffsetEXT constantOffset; + /// VkDescriptorMappingSourcePushIndexEXT pushIndex; + /// VkDescriptorMappingSourceIndirectIndexEXT indirectIndex; + /// VkDescriptorMappingSourceIndirectIndexArrayEXT indirectIndexArray; + /// VkDescriptorMappingSourceHeapDataEXT heapData; + /// uint32_t pushDataOffset; + /// uint32_t pushAddressOffset; + /// VkDescriptorMappingSourceIndirectAddressEXT indirectAddress; + /// VkDescriptorMappingSourceShaderRecordIndexEXT shaderRecordIndex; + /// uint32_t shaderRecordDataOffset; + /// uint32_t shaderRecordAddressOffset; + /// } VkDescriptorMappingSourceDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public partial struct VkDescriptorMappingSourceDataEXT() + { + /// + /// ConstantOffset is a VkDescriptorMappingSourceConstantOffsetEXT structure specifying the mapping for resources at a constant byte offset into a heap. + /// + [FieldOffset(0)] + public VkDescriptorMappingSourceConstantOffsetEXT ConstantOffset; + + /// + /// PushIndex is a VkDescriptorMappingSourcePushIndexEXT structure specifying the mapping for resources at an index into a heap source from push data. + /// + [FieldOffset(0)] + public VkDescriptorMappingSourcePushIndexEXT PushIndex; + + /// + /// IndirectIndex is a VkDescriptorMappingSourceIndirectIndexEXT structure specifying the mapping for resources at an index into a heap source from an address in push data. + /// + [FieldOffset(0)] + public VkDescriptorMappingSourceIndirectIndexEXT IndirectIndex; + + /// + /// IndirectIndexArray is a VkDescriptorMappingSourceIndirectIndexArrayEXT structure specifying the mapping for resources to an array of indices into a heap source from an address in push data. + /// + [FieldOffset(0)] + public VkDescriptorMappingSourceIndirectIndexArrayEXT IndirectIndexArray; + + /// + /// HeapData is a VkDescriptorMappingSourceHeapDataEXT structure specifying an offset into heap data for a uniform buffer to map to. + /// + [FieldOffset(0)] + public VkDescriptorMappingSourceHeapDataEXT HeapData; + + /// + /// PushDataOffset an offset into push data for a uniform buffer to map to. + /// + [FieldOffset(0)] + public int PushDataOffset; + + /// + /// PushAddressOffset an offset into push data storing an address for a resource to map to. + /// + [FieldOffset(0)] + public int PushAddressOffset; + + /// + /// IndirectAddress is a VkDescriptorMappingSourceIndirectAddressEXT structure specifying an address in push data containing another address for a resource to map to. + /// + [FieldOffset(0)] + public VkDescriptorMappingSourceIndirectAddressEXT IndirectAddress; + + /// + /// ShaderRecordIndex + /// + [FieldOffset(0)] + public VkDescriptorMappingSourceShaderRecordIndexEXT ShaderRecordIndex; + + /// + /// ShaderRecordDataOffset + /// + [FieldOffset(0)] + public int ShaderRecordDataOffset; + + /// + /// ShaderRecordAddressOffset + /// + [FieldOffset(0)] + public int ShaderRecordAddressOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceHeapDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceHeapDataEXT.gen.cs new file mode 100644 index 0000000..bad6008 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceHeapDataEXT.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceHeapDataEXT - Structure specifying mapping a uniform buffer to heap data + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceHeapDataEXT + /// + /// + /// The VkDescriptorMappingSourceHeapDataEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourceHeapDataEXT { + /// uint32_t heapOffset; + /// uint32_t pushOffset; + /// } VkDescriptorMappingSourceHeapDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkDescriptorMappingSourceHeapDataEXT() + { + /// + /// HeapOffset is a constant byte offset added to the heap address for the mapped buffer. + /// + [FieldOffset(0)] + public int HeapOffset; + + /// + /// PushOffset is an index into push data where an additional offset into the heap for the mapped resource will be retrieved. + /// + [FieldOffset(4)] + public int PushOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectAddressEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectAddressEXT.gen.cs new file mode 100644 index 0000000..b262145 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectAddressEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceIndirectAddressEXT - Structure specifying mapping a uniform buffer to an address specified indirectly + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceIndirectAddressEXT + /// + /// + /// The VkDescriptorMappingSourceIndirectAddressEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourceIndirectAddressEXT { + /// uint32_t pushOffset; + /// uint32_t addressOffset; + /// } VkDescriptorMappingSourceIndirectAddressEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkDescriptorMappingSourceIndirectAddressEXT() + { + /// + /// PushOffset is a byte offset into push data where an indirect address containing the address for the mapped resource will be retrieved. + /// + [FieldOffset(0)] + public int PushOffset; + + /// + /// AddressOffset is a byte offset into the indirect address where the address for the mapped resource will be retrieved. + /// + [FieldOffset(4)] + public int AddressOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexArrayEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexArrayEXT.gen.cs new file mode 100644 index 0000000..8f3344e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexArrayEXT.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceIndirectIndexArrayEXT - Structure specifying mapping resources to a heap index array in indirect data + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceIndirectIndexArrayEXT + /// + /// + /// The VkDescriptorMappingSourceIndirectIndexArrayEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourceIndirectIndexArrayEXT { + /// uint32_t heapOffset; + /// uint32_t pushOffset; + /// uint32_t addressOffset; + /// uint32_t heapIndexStride; + /// const VkSamplerCreateInfo* pEmbeddedSampler; + /// VkBool32 useCombinedImageSamplerIndex; + /// uint32_t samplerHeapOffset; + /// uint32_t samplerPushOffset; + /// uint32_t samplerAddressOffset; + /// uint32_t samplerHeapIndexStride; + /// } VkDescriptorMappingSourceIndirectIndexArrayEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDescriptorMappingSourceIndirectIndexArrayEXT() + { + /// + /// HeapOffset is a constant byte offset added to the heap address for the mapped resource or sampler. + /// + [FieldOffset(0)] + public int HeapOffset; + + /// + /// PushOffset is an offset into push data where an the indirect address will be. + /// + [FieldOffset(4)] + public int PushOffset; + + /// + /// AddressOffset is an index into the address in push data where an index into the heap for the mapped resource will be retrieved. + /// + [FieldOffset(8)] + public int AddressOffset; + + /// + /// HeapIndexStride is a constant byte stride that multiplies the index in indirect data. + /// + [FieldOffset(12)] + public int HeapIndexStride; + + /// + /// EmbeddedSampler is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap. + /// + [FieldOffset(16)] + public VkSamplerCreateInfo* EmbeddedSampler; + + /// + /// UseCombinedImageSamplerIndex specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an OpTypeSampledImage. + /// + [FieldOffset(24)] + public Brutal.Bool32 UseCombinedImageSamplerIndex; + + /// + /// SamplerHeapOffset is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler. + /// + [FieldOffset(28)] + public int SamplerHeapOffset; + + /// + /// SamplerPushOffset is used only when mapping a combined image sampler, used in place of `pushOffset` to retrieve the sampler. + /// + [FieldOffset(32)] + public int SamplerPushOffset; + + /// + /// SamplerAddressOffset is used only when mapping a combined image sampler, used in place of `addressOffset` to retrieve the sampler. + /// + [FieldOffset(36)] + public int SamplerAddressOffset; + + /// + /// SamplerHeapIndexStride is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler. + /// + [FieldOffset(40)] + public int SamplerHeapIndexStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexEXT.gen.cs new file mode 100644 index 0000000..4aec662 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceIndirectIndexEXT.gen.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceIndirectIndexEXT - Structure specifying mapping resources to a heap index in indirect data + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceIndirectIndexEXT + /// + /// + /// The VkDescriptorMappingSourceIndirectIndexEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourceIndirectIndexEXT { + /// uint32_t heapOffset; + /// uint32_t pushOffset; + /// uint32_t addressOffset; + /// uint32_t heapIndexStride; + /// uint32_t heapArrayStride; + /// const VkSamplerCreateInfo* pEmbeddedSampler; + /// VkBool32 useCombinedImageSamplerIndex; + /// uint32_t samplerHeapOffset; + /// uint32_t samplerPushOffset; + /// uint32_t samplerAddressOffset; + /// uint32_t samplerHeapIndexStride; + /// uint32_t samplerHeapArrayStride; + /// } VkDescriptorMappingSourceIndirectIndexEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDescriptorMappingSourceIndirectIndexEXT() + { + /// + /// HeapOffset is a constant byte offset added to the heap address for the mapped resource or sampler. + /// + [FieldOffset(0)] + public int HeapOffset; + + /// + /// PushOffset is an offset into push data where an the indirect address will be. + /// + [FieldOffset(4)] + public int PushOffset; + + /// + /// AddressOffset is an index into the address in push data where an index into the heap for the mapped resource will be retrieved. + /// + [FieldOffset(8)] + public int AddressOffset; + + /// + /// HeapIndexStride is a constant byte stride that multiplies the index in indirect data. + /// + [FieldOffset(12)] + public int HeapIndexStride; + + /// + /// HeapArrayStride is a constant byte stride that multiplies the shader binding and array index. + /// + [FieldOffset(16)] + public int HeapArrayStride; + + /// + /// EmbeddedSampler is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap. + /// + [FieldOffset(24)] + public VkSamplerCreateInfo* EmbeddedSampler; + + /// + /// UseCombinedImageSamplerIndex specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an OpTypeSampledImage. + /// + [FieldOffset(32)] + public Brutal.Bool32 UseCombinedImageSamplerIndex; + + /// + /// SamplerHeapOffset is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler. + /// + [FieldOffset(36)] + public int SamplerHeapOffset; + + /// + /// SamplerPushOffset is used only when mapping a combined image sampler, used in place of `pushOffset` to retrieve the sampler. + /// + [FieldOffset(40)] + public int SamplerPushOffset; + + /// + /// SamplerAddressOffset is used only when mapping a combined image sampler, used in place of `addressOffset` to retrieve the sampler. + /// + [FieldOffset(44)] + public int SamplerAddressOffset; + + /// + /// SamplerHeapIndexStride is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler. + /// + [FieldOffset(48)] + public int SamplerHeapIndexStride; + + /// + /// SamplerHeapArrayStride is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler. + /// + [FieldOffset(52)] + public int SamplerHeapArrayStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourcePushIndexEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourcePushIndexEXT.gen.cs new file mode 100644 index 0000000..4228631 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourcePushIndexEXT.gen.cs @@ -0,0 +1,92 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourcePushIndexEXT - Structure specifying mapping resources to a heap index in push data + /// + /// + /// + /// :refpage: VkDescriptorMappingSourcePushIndexEXT + /// + /// + /// The VkDescriptorMappingSourcePushIndexEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourcePushIndexEXT { + /// uint32_t heapOffset; + /// uint32_t pushOffset; + /// uint32_t heapIndexStride; + /// uint32_t heapArrayStride; + /// const VkSamplerCreateInfo* pEmbeddedSampler; + /// VkBool32 useCombinedImageSamplerIndex; + /// uint32_t samplerHeapOffset; + /// uint32_t samplerPushOffset; + /// uint32_t samplerHeapIndexStride; + /// uint32_t samplerHeapArrayStride; + /// } VkDescriptorMappingSourcePushIndexEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDescriptorMappingSourcePushIndexEXT() + { + /// + /// HeapOffset is a constant byte offset added to the heap address for the mapped resource or sampler. + /// + [FieldOffset(0)] + public int HeapOffset; + + /// + /// PushOffset is an index into push data where an index into the heap for the mapped resource will be retrieved. + /// + [FieldOffset(4)] + public int PushOffset; + + /// + /// HeapIndexStride is a constant byte stride that multiplies the index in push data. + /// + [FieldOffset(8)] + public int HeapIndexStride; + + /// + /// HeapArrayStride is a constant byte stride that multiplies the shader binding and array index. + /// + [FieldOffset(12)] + public int HeapArrayStride; + + /// + /// EmbeddedSampler is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap. + /// + [FieldOffset(16)] + public VkSamplerCreateInfo* EmbeddedSampler; + + /// + /// UseCombinedImageSamplerIndex specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an OpTypeSampledImage. + /// + [FieldOffset(24)] + public Brutal.Bool32 UseCombinedImageSamplerIndex; + + /// + /// SamplerHeapOffset is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler. + /// + [FieldOffset(28)] + public int SamplerHeapOffset; + + /// + /// SamplerPushOffset is used only when mapping a combined image sampler, used in place of `pushOffset` to retrieve the sampler. + /// + [FieldOffset(32)] + public int SamplerPushOffset; + + /// + /// SamplerHeapIndexStride is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler. + /// + [FieldOffset(36)] + public int SamplerHeapIndexStride; + + /// + /// SamplerHeapArrayStride is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler. + /// + [FieldOffset(40)] + public int SamplerHeapArrayStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceShaderRecordIndexEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceShaderRecordIndexEXT.gen.cs new file mode 100644 index 0000000..eb71878 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorMappingSourceShaderRecordIndexEXT.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorMappingSourceShaderRecordIndexEXT - Structure specifying mapping resources to a heap index in shader record data + /// + /// + /// + /// :refpage: VkDescriptorMappingSourceShaderRecordIndexEXT + /// + /// + /// The VkDescriptorMappingSourceShaderRecordIndexEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorMappingSourceShaderRecordIndexEXT { + /// uint32_t heapOffset; + /// uint32_t shaderRecordOffset; + /// uint32_t heapIndexStride; + /// uint32_t heapArrayStride; + /// const VkSamplerCreateInfo* pEmbeddedSampler; + /// VkBool32 useCombinedImageSamplerIndex; + /// uint32_t samplerHeapOffset; + /// uint32_t samplerShaderRecordOffset; + /// uint32_t samplerHeapIndexStride; + /// uint32_t samplerHeapArrayStride; + /// } VkDescriptorMappingSourceShaderRecordIndexEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDescriptorMappingSourceShaderRecordIndexEXT() + { + /// + /// HeapOffset is a constant byte offset added to the heap address for the mapped resource or sampler. + /// + [FieldOffset(0)] + public int HeapOffset; + + /// + /// ShaderRecordOffset is an index into shader record data where an index into the heap for the mapped resource will be retrieved. + /// + [FieldOffset(4)] + public int ShaderRecordOffset; + + /// + /// HeapIndexStride is a constant byte stride that multiplies the index in shader record data. + /// + [FieldOffset(8)] + public int HeapIndexStride; + + /// + /// HeapArrayStride is a constant byte stride that multiplies the shader binding and array index. + /// + [FieldOffset(12)] + public int HeapArrayStride; + + /// + /// EmbeddedSampler is an optional VkSamplerCreateInfo structure specifying a sampler to embed into the shader, in place of looking the sampler up in a heap. + /// + [FieldOffset(16)] + public VkSamplerCreateInfo* EmbeddedSampler; + + /// + /// UseCombinedImageSamplerIndex specifies whether the generated index value will be decoded as two packed indices if the mapped resource is an OpTypeSampledImage. + /// + [FieldOffset(24)] + public Brutal.Bool32 UseCombinedImageSamplerIndex; + + /// + /// SamplerHeapOffset is used only when mapping a combined image sampler, used in place of `heapOffset` to retrieve the sampler. + /// + [FieldOffset(28)] + public int SamplerHeapOffset; + + /// + /// SamplerShaderRecordOffset is used only when mapping a combined image sampler, used in place of `shaderRecordOffset` to retrieve the sampler. + /// + [FieldOffset(32)] + public int SamplerShaderRecordOffset; + + /// + /// SamplerHeapIndexStride is used only when mapping a combined image sampler, used in place of `heapIndexStride` to retrieve the sampler. + /// + [FieldOffset(36)] + public int SamplerHeapIndexStride; + + /// + /// SamplerHeapArrayStride is used only when mapping a combined image sampler, used in place of `heapArrayStride` to retrieve the sampler. + /// + [FieldOffset(40)] + public int SamplerHeapArrayStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolCreateInfo.gen.cs new file mode 100644 index 0000000..13f91ad --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolCreateInfo.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorPoolCreateInfo - Structure specifying parameters of a newly created descriptor pool + /// + /// + /// + /// Additional information about the pool is passed in a + /// VkDescriptorPoolCreateInfo structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorPoolCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorPoolCreateFlags flags; + /// uint32_t maxSets; + /// uint32_t poolSizeCount; + /// const VkDescriptorPoolSize* pPoolSizes; + /// } VkDescriptorPoolCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDescriptorPoolCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorPoolCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDescriptorPoolCreateFlags specifying certain supported operations on the pool. + /// + [FieldOffset(16)] + public VkDescriptorPoolCreateFlags Flags; + + /// + /// MaxSets is the maximum number of descriptor sets that can be allocated from the pool. + /// + [FieldOffset(20)] + public int MaxSets; + + /// + /// PoolSizeCount is the number of elements in pPoolSizes. + /// + [FieldOffset(24)] + public int PoolSizeCount; + + /// + /// PoolSizes is a pointer to an array of VkDescriptorPoolSize structures, each containing a descriptor type and number of descriptors of that type to be allocated in the pool. + /// + [FieldOffset(32)] + public VkDescriptorPoolSize* PoolSizes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolInlineUniformBlockCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolInlineUniformBlockCreateInfo.gen.cs new file mode 100644 index 0000000..7604701 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolInlineUniformBlockCreateInfo.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorPoolInlineUniformBlockCreateInfo - Structure specifying the maximum number of inline uniform block bindings of a newly created descriptor pool + /// + /// + /// + /// In order to be able to allocate descriptor sets having + /// inline uniform block^ bindings the + /// descriptor pool must be created with specifying the inline uniform block + /// binding capacity of the descriptor pool, in addition to the total inline + /// uniform data capacity in bytes which is specified through a + /// VkDescriptorPoolSize structure with a descriptorType value of + /// VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK. + /// This can be done by adding a + /// VkDescriptorPoolInlineUniformBlockCreateInfo structure to the + /// pNext chain of VkDescriptorPoolCreateInfo. + /// + /// + /// The VkDescriptorPoolInlineUniformBlockCreateInfo structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkDescriptorPoolInlineUniformBlockCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxInlineUniformBlockBindings; + /// } VkDescriptorPoolInlineUniformBlockCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorPoolInlineUniformBlockCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorPoolInlineUniformBlockCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxInlineUniformBlockBindings is the number of inline uniform block bindings to allocate. + /// + [FieldOffset(16)] + public int MaxInlineUniformBlockBindings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolSize.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolSize.gen.cs new file mode 100644 index 0000000..0f27c4a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorPoolSize.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorPoolSize - Structure specifying descriptor pool size + /// + /// + /// + /// The VkDescriptorPoolSize structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorPoolSize { + /// VkDescriptorType type; + /// uint32_t descriptorCount; + /// } VkDescriptorPoolSize; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkDescriptorPoolSize() + { + /// + /// Type is the type of descriptor. + /// + [FieldOffset(0)] + public VkDescriptorType Type; + + /// + /// DescriptorCount is the number of descriptors of that type to allocate. + /// + [FieldOffset(4)] + public int DescriptorCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetAllocateInfo.gen.cs new file mode 100644 index 0000000..6d3f087 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetAllocateInfo.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetAllocateInfo - Structure specifying the allocation parameters for descriptor sets + /// + /// + /// + /// The VkDescriptorSetAllocateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorSetAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorPool descriptorPool; + /// uint32_t descriptorSetCount; + /// const VkDescriptorSetLayout* pSetLayouts; + /// } VkDescriptorSetAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDescriptorSetAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorPool is the pool which the sets will be allocated from. + /// + [FieldOffset(16)] + public VkDescriptorPool DescriptorPool; + + /// + /// DescriptorSetCount determines the number of descriptor sets to be allocated from the pool. + /// + [FieldOffset(24)] + public int DescriptorSetCount; + + /// + /// SetLayouts is a pointer to an array of descriptor set layouts, with each member specifying how the corresponding descriptor set is allocated. + /// + [FieldOffset(32)] + public VkDescriptorSetLayout* SetLayouts; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetAndBindingMappingEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetAndBindingMappingEXT.gen.cs new file mode 100644 index 0000000..acb54fb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetAndBindingMappingEXT.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetAndBindingMappingEXT - Structure specifying mappings from a set of shader resources to a descriptor heap + /// + /// + /// + /// :refpage: VkDescriptorSetAndBindingMappingEXT + /// + /// + /// The VkDescriptorSetAndBindingMappingEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkDescriptorSetAndBindingMappingEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t descriptorSet; + /// uint32_t firstBinding; + /// uint32_t bindingCount; + /// VkSpirvResourceTypeFlagsEXT resourceMask; + /// VkDescriptorMappingSourceEXT source; + /// VkDescriptorMappingSourceDataEXT sourceData; + /// } VkDescriptorSetAndBindingMappingEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkDescriptorSetAndBindingMappingEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetAndBindingMappingEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorSet is the value of DescriptorSet for resources that this mapping affects. + /// + [FieldOffset(16)] + public int DescriptorSet; + + /// + /// FirstBinding is the first value of Binding of resources that this mapping affects. + /// + [FieldOffset(20)] + public int FirstBinding; + + /// + /// BindingCount is the number of consecutive Binding values of resources that this mapping affects. + /// + [FieldOffset(24)] + public int BindingCount; + + /// + /// ResourceMask is a mask of VkSpirvResourceTypeFlagsEXT values indicating which resource types are specified by this mapping. + /// + [FieldOffset(28)] + public VkSpirvResourceTypeFlagsEXT ResourceMask; + + /// + /// Source is a VkDescriptorMappingSourceEXT value specifying the method of mapping specified for the affected resources. + /// + [FieldOffset(32)] + public VkDescriptorMappingSourceEXT Source; + + /// + /// SourceData is a VkDescriptorMappingSourceDataEXT that provides the details of how each mapping is specified according to source. + /// + [FieldOffset(40)] + public VkDescriptorMappingSourceDataEXT SourceData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetBindingReferenceVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetBindingReferenceVALVE.gen.cs new file mode 100644 index 0000000..633dc32 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetBindingReferenceVALVE.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetBindingReferenceVALVE - Stub description of VkDescriptorSetBindingReferenceVALVE + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// typedef struct VkDescriptorSetBindingReferenceVALVE { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorSetLayout descriptorSetLayout; + /// uint32_t binding; + /// } VkDescriptorSetBindingReferenceVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorSetBindingReferenceVALVE() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetBindingReferenceVALVE; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorSetLayout + /// + [FieldOffset(16)] + public VkDescriptorSetLayout DescriptorSetLayout; + + /// + /// Binding + /// + [FieldOffset(24)] + public int Binding; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBinding.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBinding.gen.cs new file mode 100644 index 0000000..ab15507 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBinding.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayoutBinding - Structure specifying a descriptor set layout binding + /// + /// + /// + /// The VkDescriptorSetLayoutBinding structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorSetLayoutBinding { + /// uint32_t binding; + /// VkDescriptorType descriptorType; + /// uint32_t descriptorCount; + /// VkShaderStageFlags stageFlags; + /// const VkSampler* pImmutableSamplers; + /// } VkDescriptorSetLayoutBinding; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorSetLayoutBinding() + { + /// + /// Binding is the binding number of this entry and corresponds to a resource of the same binding number in the shader stages. + /// + [FieldOffset(0)] + public int Binding; + + /// + /// DescriptorType is a VkDescriptorType specifying which type of resource descriptors are used for this binding. + /// + [FieldOffset(4)] + public VkDescriptorType DescriptorType; + + /// + /// DescriptorCount is the number of descriptors contained in the binding, accessed in a shader as an array. If descriptorCount is zero this binding entry is reserved and the resource must not be accessed from any stage via this binding within any pipeline using the set layout. + /// + [FieldOffset(8)] + public int DescriptorCount; + + /// + /// StageFlags member is a bitmask of VkShaderStageFlags specifying which pipeline shader stages can access a resource for this binding. VK_SHADER_STAGE_ALL is a shorthand specifying that all defined shader stages, including any additional stages defined by extensions, can access the resource. + If a shader stage is not included in stageFlags, then a resource must not be accessed from that stage via this binding within any pipeline using the set layout. Other than input attachments which are limited to the fragment shader, there are no limitations on what combinations of stages can use a descriptor binding, and in particular a binding can be used by both graphics stages and the compute stage. + /// + [FieldOffset(12)] + public VkShaderStageFlags StageFlags; + + /// + /// ImmutableSamplers affects initialization of samplers. If descriptorType specifies a VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER type descriptor, then pImmutableSamplers can be used to initialize a set of immutable samplers. Immutable samplers are permanently bound into the set layout and must not be changed; updating a VK_DESCRIPTOR_TYPE_SAMPLER descriptor with immutable samplers is not allowed and updates to a VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor with immutable samplers does not modify the samplers (the image views are updated, but the sampler updates are ignored). If pImmutableSamplers is not `NULL`, then it is a pointer to an array of sampler handles that will be copied into the set layout and used for the corresponding binding. Only the sampler handles are copied; the sampler objects must not be destroyed before the final use of the set layout and any descriptor pools and sets created using it. If pImmutableSamplers is `NULL`, then the sampler slots are dynamic and sampler handles must be bound into descriptor sets using this layout. If descriptorType is not one of these descriptor types, then pImmutableSamplers is ignored. + /// + [FieldOffset(16)] + public VkSampler* ImmutableSamplers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBindingFlagsCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBindingFlagsCreateInfo.gen.cs new file mode 100644 index 0000000..533206e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutBindingFlagsCreateInfo.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayoutBindingFlagsCreateInfo - Structure specifying creation flags for descriptor set layout bindings + /// + /// + /// + /// If the pNext chain of a VkDescriptorSetLayoutCreateInfo + /// structure includes a VkDescriptorSetLayoutBindingFlagsCreateInfo + /// structure, then that structure includes an array of flags, one for each + /// descriptor set layout binding. + /// + /// + /// The VkDescriptorSetLayoutBindingFlagsCreateInfo structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t bindingCount; + /// const VkDescriptorBindingFlags* pBindingFlags; + /// } VkDescriptorSetLayoutBindingFlagsCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorSetLayoutBindingFlagsCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetLayoutBindingFlagsCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BindingCount is zero or the number of elements in pBindingFlags. + /// + [FieldOffset(16)] + public int BindingCount; + + /// + /// BindingFlags is a pointer to an array of VkDescriptorBindingFlags bitfields, one for each descriptor set layout binding. + /// + [FieldOffset(24)] + public VkDescriptorBindingFlags* BindingFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutCreateInfo.gen.cs new file mode 100644 index 0000000..a41b3b5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutCreateInfo.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayoutCreateInfo - Structure specifying parameters of a newly created descriptor set layout + /// + /// + /// + /// Information about the descriptor set layout is passed in a + /// VkDescriptorSetLayoutCreateInfo structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDescriptorSetLayoutCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorSetLayoutCreateFlags flags; + /// uint32_t bindingCount; + /// const VkDescriptorSetLayoutBinding* pBindings; + /// } VkDescriptorSetLayoutCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorSetLayoutCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetLayoutCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask specifying options for descriptor set layout creation. + /// + [FieldOffset(16)] + public VkDescriptorSetLayoutCreateFlags Flags; + + /// + /// BindingCount is the number of elements in pBindings. + /// + [FieldOffset(20)] + public int BindingCount; + + /// + /// Bindings is a pointer to an array of VkDescriptorSetLayoutBinding structures. + /// + [FieldOffset(24)] + public VkDescriptorSetLayoutBinding* Bindings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutHostMappingInfoVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutHostMappingInfoVALVE.gen.cs new file mode 100644 index 0000000..62534a8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutHostMappingInfoVALVE.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayoutHostMappingInfoVALVE - Stub description of VkDescriptorSetLayoutHostMappingInfoVALVE + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// typedef struct VkDescriptorSetLayoutHostMappingInfoVALVE { + /// VkStructureType sType; + /// void* pNext; + /// size_t descriptorOffset; + /// uint32_t descriptorSize; + /// } VkDescriptorSetLayoutHostMappingInfoVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorSetLayoutHostMappingInfoVALVE() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetLayoutHostMappingInfoVALVE; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorOffset + /// + [FieldOffset(16)] + public nuint DescriptorOffset; + + /// + /// DescriptorSize + /// + [FieldOffset(24)] + public int DescriptorSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutSupport.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutSupport.gen.cs new file mode 100644 index 0000000..eebe5ab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetLayoutSupport.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetLayoutSupport - Structure returning information about whether a descriptor set layout can be supported + /// + /// + /// + /// Information about support for the descriptor set layout is returned in a + /// VkDescriptorSetLayoutSupport structure: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDescriptorSetLayoutSupport { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 supported; + /// } VkDescriptorSetLayoutSupport; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorSetLayoutSupport() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetLayoutSupport; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Supported specifies whether the descriptor set layout can be created. + /// + [FieldOffset(16)] + public Brutal.Bool32 Supported; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountAllocateInfo.gen.cs new file mode 100644 index 0000000..ec104d7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountAllocateInfo.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetVariableDescriptorCountAllocateInfo - Structure specifying additional allocation parameters for descriptor sets + /// + /// + /// + /// If the pNext chain of a VkDescriptorSetAllocateInfo structure + /// includes a VkDescriptorSetVariableDescriptorCountAllocateInfo + /// structure, then that structure includes an array of descriptor counts for + /// variable-sized descriptor bindings, one for each descriptor set being + /// allocated. + /// + /// + /// The VkDescriptorSetVariableDescriptorCountAllocateInfo structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t descriptorSetCount; + /// const uint32_t* pDescriptorCounts; + /// } VkDescriptorSetVariableDescriptorCountAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDescriptorSetVariableDescriptorCountAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetVariableDescriptorCountAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorSetCount is zero or the number of elements in pDescriptorCounts. + /// + [FieldOffset(16)] + public int DescriptorSetCount; + + /// + /// DescriptorCounts is a pointer to an array of descriptor counts, with each member specifying the number of descriptors in a variable-sized descriptor binding in the corresponding descriptor set being allocated. + /// + [FieldOffset(24)] + public int* DescriptorCounts; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountLayoutSupport.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountLayoutSupport.gen.cs new file mode 100644 index 0000000..894b8c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorSetVariableDescriptorCountLayoutSupport.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorSetVariableDescriptorCountLayoutSupport - Structure returning information about whether a descriptor set layout can be supported + /// + /// + /// + /// If the pNext chain of a VkDescriptorSetLayoutSupport structure + /// includes a VkDescriptorSetVariableDescriptorCountLayoutSupport + /// structure, then that structure returns additional information about whether + /// the descriptor set layout is supported. + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupport { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxVariableDescriptorCount; + /// } VkDescriptorSetVariableDescriptorCountLayoutSupport; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDescriptorSetVariableDescriptorCountLayoutSupport() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorSetVariableDescriptorCountLayoutSupport; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxVariableDescriptorCount indicates the maximum number of descriptors supported in the highest numbered binding of the layout, if that binding is variable-sized. + /// + [FieldOffset(16)] + public int MaxVariableDescriptorCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateCreateInfo.gen.cs new file mode 100644 index 0000000..5204026 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateCreateInfo.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorUpdateTemplateCreateInfo - Structure specifying parameters of a newly created descriptor update template + /// + /// + /// + /// The VkDescriptorUpdateTemplateCreateInfo structure is defined as: + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDescriptorUpdateTemplateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorUpdateTemplateCreateFlags flags; + /// uint32_t descriptorUpdateEntryCount; + /// const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntries; + /// VkDescriptorUpdateTemplateType templateType; + /// VkDescriptorSetLayout descriptorSetLayout; + /// VkPipelineBindPoint pipelineBindPoint; + /// VkPipelineLayout pipelineLayout; + /// uint32_t set; + /// } VkDescriptorUpdateTemplateCreateInfo; + /// + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkDescriptorUpdateTemplateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DescriptorUpdateTemplateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkDescriptorUpdateTemplateCreateFlags Flags; + + /// + /// DescriptorUpdateEntryCount is the number of elements in the pDescriptorUpdateEntries array. + /// + [FieldOffset(20)] + public int DescriptorUpdateEntryCount; + + /// + /// DescriptorUpdateEntries is a pointer to an array of VkDescriptorUpdateTemplateEntry structures describing the descriptors to be updated by the descriptor update template. + /// + [FieldOffset(24)] + public VkDescriptorUpdateTemplateEntry* DescriptorUpdateEntries; + + /// + /// TemplateType Specifies the type of the descriptor update template. If set to VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET it can only be used to update descriptor sets with a fixed descriptorSetLayout. + /// + [FieldOffset(32)] + public VkDescriptorUpdateTemplateType TemplateType; + + /// + /// DescriptorSetLayout is the descriptor set layout used to build the descriptor update template. All descriptor sets which are going to be updated through the newly created descriptor update template must be created with a layout that matches (is the same as, or defined identically to) this layout. This parameter is ignored if templateType is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET. The implementation must not access this object outside of the duration of the command this structure is passed to. + /// + [FieldOffset(40)] + public VkDescriptorSetLayout DescriptorSetLayout; + + /// + /// PipelineBindPoint is reserved for future use and is ignored + /// + [FieldOffset(48)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// PipelineLayout is reserved for future use and is ignored + /// + [FieldOffset(56)] + public VkPipelineLayout PipelineLayout; + + /// + /// Set is reserved for future use and is ignored + /// + [FieldOffset(64)] + public int Set; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateEntry.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateEntry.gen.cs new file mode 100644 index 0000000..6b0837f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDescriptorUpdateTemplateEntry.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDescriptorUpdateTemplateEntry - Describes a single descriptor update of the descriptor update template + /// + /// + /// + /// The VkDescriptorUpdateTemplateEntry structure is defined as: + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDescriptorUpdateTemplateEntry { + /// uint32_t dstBinding; + /// uint32_t dstArrayElement; + /// uint32_t descriptorCount; + /// VkDescriptorType descriptorType; + /// size_t offset; + /// size_t stride; + /// } VkDescriptorUpdateTemplateEntry; + /// + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct VkDescriptorUpdateTemplateEntry() + { + /// + /// DstBinding is the descriptor binding to update when using this descriptor update template. + /// + [FieldOffset(0)] + public int DstBinding; + + /// + /// DstArrayElement is the starting element in the array belonging to dstBinding. + /// + [FieldOffset(4)] + public int DstArrayElement; + + /// + /// DescriptorCount is the number of descriptors to update. If descriptorCount is greater than the number of remaining array elements in the destination binding, those affect consecutive bindings in a manner similar to VkWriteDescriptorSet above. + /// + [FieldOffset(8)] + public int DescriptorCount; + + /// + /// DescriptorType is a VkDescriptorType specifying the type of the descriptor. + /// + [FieldOffset(12)] + public VkDescriptorType DescriptorType; + + /// + /// Offset is the offset in bytes of the first binding in the raw data structure. + /// + [FieldOffset(16)] + public nuint Offset; + + /// + /// Stride is the stride in bytes between two consecutive array elements of the descriptor update information in the raw data structure. The actual pointer ptr for each array element j of update entry i is computed using the following formula: + [source,c++] ---- const char *ptr = (const char *)pData + pDescriptorUpdateEntries[i].offset + j * pDescriptorUpdateEntries[i].stride ---- + The stride is useful in case the bindings are stored in structs along with other data. + /// + [FieldOffset(24)] + public nuint Stride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceAddressBindingCallbackDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceAddressBindingCallbackDataEXT.gen.cs new file mode 100644 index 0000000..5acc0a6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceAddressBindingCallbackDataEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceAddressBindingCallbackDataEXT - Structure specifying parameters returned to the callback + /// + /// + /// + /// The definition of VkDeviceAddressBindingCallbackDataEXT is: + /// + /// + /// // Provided by VK_EXT_device_address_binding_report + /// typedef struct VkDeviceAddressBindingCallbackDataEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceAddressBindingFlagsEXT flags; + /// VkDeviceAddress baseAddress; + /// VkDeviceSize size; + /// VkDeviceAddressBindingTypeEXT bindingType; + /// } VkDeviceAddressBindingCallbackDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDeviceAddressBindingCallbackDataEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceAddressBindingCallbackDataEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDeviceAddressBindingFlagsEXT specifying additional information about the binding event that caused the callback to be called. + /// + [FieldOffset(16)] + public VkDeviceAddressBindingFlagsEXT Flags; + + /// + /// BaseAddress is a GPU-accessible virtual address identifying the start of a region of the virtual address space associated with a Vulkan object, as identified by the pObjects member of VkDebugUtilsMessengerCallbackDataEXT. + /// + [FieldOffset(24)] + public VkDeviceAddress BaseAddress; + + /// + /// Size is the size in bytes of a region of GPU-accessible virtual address space. + /// + [FieldOffset(32)] + public ByteSize64 Size; + + /// + /// BindingType is a VkDeviceAddressBindingTypeEXT specifying the type of binding event that caused the callback to be called. + /// + [FieldOffset(40)] + public VkDeviceAddressBindingTypeEXT BindingType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceAddressRangeKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceAddressRangeKHR.gen.cs new file mode 100644 index 0000000..63d8bf6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceAddressRangeKHR.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceAddressRangeKHR - Structure specifying a device address range + /// + /// + /// + /// :refpage: VkDeviceAddressRangeKHR + /// + /// + /// A device address range indicates a sized range of device memory. + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkDeviceAddressRangeKHR { + /// VkDeviceAddress address; + /// VkDeviceSize size; + /// } VkDeviceAddressRangeKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkDeviceAddressRangeKHR() + { + /// + /// Address is 0 or a basetype:VkDeviceAddress specifying the start of the range. + /// + [FieldOffset(0)] + public VkDeviceAddress Address; + + /// + /// Size is a basetype:VkDeviceSize specifying the size of the range. + /// + [FieldOffset(8)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceBufferMemoryRequirements.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceBufferMemoryRequirements.gen.cs new file mode 100644 index 0000000..7b52c76 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceBufferMemoryRequirements.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceBufferMemoryRequirements - (None) + /// + /// + /// + /// The VkDeviceBufferMemoryRequirements structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkDeviceBufferMemoryRequirements { + /// VkStructureType sType; + /// const void* pNext; + /// const VkBufferCreateInfo* pCreateInfo; + /// } VkDeviceBufferMemoryRequirements; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceBufferMemoryRequirements() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceBufferMemoryRequirements; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateInfo is a pointer to a VkBufferCreateInfo structure containing parameters affecting creation of the buffer to query. + /// + [FieldOffset(16)] + public VkBufferCreateInfo* CreateInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceCreateInfo.gen.cs new file mode 100644 index 0000000..754844d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceCreateInfo.gen.cs @@ -0,0 +1,91 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceCreateInfo - Structure specifying parameters of a newly created device + /// + /// + /// + /// The VkDeviceCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDeviceCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceCreateFlags flags; + /// uint32_t queueCreateInfoCount; + /// const VkDeviceQueueCreateInfo* pQueueCreateInfos; + /// // enabledLayerCount is legacy and not used + /// uint32_t enabledLayerCount; + /// // ppEnabledLayerNames is legacy and not used + /// const char* const* ppEnabledLayerNames; + /// uint32_t enabledExtensionCount; + /// const char* const* ppEnabledExtensionNames; + /// const VkPhysicalDeviceFeatures* pEnabledFeatures; + /// } VkDeviceCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkDeviceCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkDeviceCreateFlags Flags; + + /// + /// QueueCreateInfoCount is the unsigned integer size of the pQueueCreateInfos array. Refer to the Queue Creation^ section below for further details. + /// + [FieldOffset(20)] + public int QueueCreateInfoCount; + + /// + /// QueueCreateInfos is a pointer to an array of VkDeviceQueueCreateInfo structures describing the queues that are requested to be created along with the logical device. Refer to the Queue Creation^ section below for further details. + /// + [FieldOffset(24)] + public VkDeviceQueueCreateInfo* QueueCreateInfos; + + /// + /// EnabledLayerCount is legacy and not used. Implementations must not access this parameter. It must be 0. See here. + /// + [FieldOffset(32)] + public int EnabledLayerCount; + + /// + /// ppEnabledLayerNames is legacy and not used. Implementations must not access this parameter. It must be `NULL`. See here. + /// + [FieldOffset(40)] + public byte** ppEnabledLayerNames; + + /// + /// EnabledExtensionCount is the number of device extensions to enable. + /// + [FieldOffset(48)] + public int EnabledExtensionCount; + + /// + /// ppEnabledExtensionNames is a pointer to an array of enabledExtensionCount null-terminated UTF-8 strings containing the names of extensions to enable for the created device. See the here section for further details. + /// + [FieldOffset(56)] + public byte** ppEnabledExtensionNames; + + /// + /// EnabledFeatures is `NULL` or a pointer to a VkPhysicalDeviceFeatures structure containing boolean indicators of all the features to be enabled. Refer to the Features^ section for further details. + /// + [FieldOffset(64)] + public VkPhysicalDeviceFeatures* EnabledFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceDeviceMemoryReportCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceDeviceMemoryReportCreateInfoEXT.gen.cs new file mode 100644 index 0000000..511b84e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceDeviceMemoryReportCreateInfoEXT.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceDeviceMemoryReportCreateInfoEXT - Register device memory report callbacks for a Vulkan device + /// + /// + /// + /// To register callbacks for underlying device memory events of type + /// VkDeviceMemoryReportEventTypeEXT, add one or multiple + /// VkDeviceDeviceMemoryReportCreateInfoEXT structures to the pNext + /// chain of the VkDeviceCreateInfo structure. + /// + /// + /// // Provided by VK_EXT_device_memory_report + /// typedef struct VkDeviceDeviceMemoryReportCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemoryReportFlagsEXT flags; + /// PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback; + /// void* pUserData; + /// } VkDeviceDeviceMemoryReportCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDeviceDeviceMemoryReportCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceDeviceMemoryReportCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is 0 and reserved for future use. + /// + [FieldOffset(16)] + public VkDeviceMemoryReportFlagsEXT Flags; + + /// + /// PfnUserCallback is the application callback function to call. + /// + [FieldOffset(24)] + public PfnVkDeviceMemoryReportCallbackEXT PfnUserCallback; + + /// + /// UserData is NULL or an application-defined user data pointer to be passed to the callback. + /// + [FieldOffset(32)] + public void* UserData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceDiagnosticsConfigCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceDiagnosticsConfigCreateInfoNV.gen.cs new file mode 100644 index 0000000..48906d5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceDiagnosticsConfigCreateInfoNV.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceDiagnosticsConfigCreateInfoNV - Specify diagnostics config for a Vulkan device + /// + /// + /// + /// When using the Nsight^(TM)^ Aftermath SDK, to configure how device crash + /// dumps are created, add a VkDeviceDiagnosticsConfigCreateInfoNV + /// structure to the pNext chain of the VkDeviceCreateInfo + /// structure. + /// + /// + /// // Provided by VK_NV_device_diagnostics_config + /// typedef struct VkDeviceDiagnosticsConfigCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceDiagnosticsConfigFlagsNV flags; + /// } VkDeviceDiagnosticsConfigCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceDiagnosticsConfigCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceDiagnosticsConfigCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDeviceDiagnosticsConfigFlagsNV specifying additional parameters for configuring diagnostic tools. + /// + [FieldOffset(16)] + public VkDeviceDiagnosticsConfigFlagsNV Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceEventInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceEventInfoEXT.gen.cs new file mode 100644 index 0000000..b691380 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceEventInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceEventInfoEXT - Describe a device event to create + /// + /// + /// + /// The VkDeviceEventInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef struct VkDeviceEventInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceEventTypeEXT deviceEvent; + /// } VkDeviceEventInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceEventInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceEventInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceEvent is a VkDeviceEventTypeEXT value specifying when the fence will be signaled. + /// + [FieldOffset(16)] + public VkDeviceEventTypeEXT DeviceEvent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultAddressInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultAddressInfoKHR.gen.cs new file mode 100644 index 0000000..ec74426 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultAddressInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultAddressInfoKHR - Structure specifying GPU virtual address information + /// + /// + /// + /// The VkDeviceFaultAddressInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkDeviceFaultAddressInfoKHR { + /// VkDeviceFaultAddressTypeKHR addressType; + /// VkDeviceAddress reportedAddress; + /// VkDeviceSize addressPrecision; + /// } VkDeviceFaultAddressInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkDeviceFaultAddressInfoKHR() + { + /// + /// AddressType is either the type of memory operation that triggered a page fault, or the type of association between an instruction pointer and a fault. + /// + [FieldOffset(0)] + public VkDeviceFaultAddressTypeKHR AddressType; + + /// + /// ReportedAddress is the GPU virtual address recorded by the device. + /// + [FieldOffset(8)] + public VkDeviceAddress ReportedAddress; + + /// + /// AddressPrecision is a power of two value that specifies how precisely the device can report the address. + /// + [FieldOffset(16)] + public ByteSize64 AddressPrecision; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultCountsEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultCountsEXT.gen.cs new file mode 100644 index 0000000..4cbecec --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultCountsEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultCountsEXT - Structure specifying device fault information + /// + /// + /// + /// The VkDeviceFaultCountsEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_fault + /// typedef struct VkDeviceFaultCountsEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t addressInfoCount; + /// uint32_t vendorInfoCount; + /// VkDeviceSize vendorBinarySize; + /// } VkDeviceFaultCountsEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceFaultCountsEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceFaultCountsEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressInfoCount is the number of VkDeviceFaultAddressInfoEXT structures describing either memory accesses which may: have caused a page fault, or the addresses of active instructions at the time of the fault. + /// + [FieldOffset(16)] + public int AddressInfoCount; + + /// + /// VendorInfoCount is the number of VkDeviceFaultVendorInfoEXT structures describing vendor-specific fault information. + /// + [FieldOffset(20)] + public int VendorInfoCount; + + /// + /// VendorBinarySize is the size in bytes of a vendor-specific binary crash dump, which may provide additional information when imported into external tools. + /// + [FieldOffset(24)] + public ByteSize64 VendorBinarySize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultDebugInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultDebugInfoKHR.gen.cs new file mode 100644 index 0000000..1a49054 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultDebugInfoKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultDebugInfoKHR - Structure allowing retrieval of the vendor binary crash dump + /// + /// + /// + /// The VkDeviceFaultDebugInfoKHR structure is defined as: + /// + /// + /// * sType is a VkStructureType value identifying this structure. + /// * pNext is `NULL` or a pointer to a structure extending this + /// structure. + /// * vendorBinarySize is the size in bytes of a vendor-specific binary + /// crash dump, which may: provide additional information when imported into + /// external tools. + /// * pVendorBinaryData is `NULL` or a pointer to vendorBinarySize + /// number of bytes of data, which will be populated with a vendor-specific + /// binary crash dump, as described in Vendor + /// Binary Crash Dumps^. + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkDeviceFaultDebugInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t vendorBinarySize; + /// void* pVendorBinaryData; + /// } VkDeviceFaultDebugInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceFaultDebugInfoKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceFaultDebugInfoKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VendorBinarySize + /// + [FieldOffset(16)] + public int VendorBinarySize; + + /// + /// VendorBinaryData + /// + [FieldOffset(24)] + public void* VendorBinaryData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoEXT.gen.cs new file mode 100644 index 0000000..cd2d031 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoEXT.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultInfoEXT - Structure specifying device fault information + /// + /// + /// + /// The VkDeviceFaultInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_fault + /// typedef struct VkDeviceFaultInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// VkDeviceFaultAddressInfoKHR* pAddressInfos; + /// VkDeviceFaultVendorInfoKHR* pVendorInfos; + /// void* pVendorBinaryData; + /// } VkDeviceFaultInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 296)] + public unsafe partial struct VkDeviceFaultInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceFaultInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte Description[256]; + + /// + /// AddressInfos is `NULL` or a pointer to an array of VkDeviceFaultAddressInfoEXT structures describing either memory accesses which may: have caused a page fault, or describing active instruction pointers at the time of the fault. The length of pAddressInfos is specified by the VkDeviceFaultCountsEXT::addressInfoCount value passed to vkGetDeviceFaultInfoEXT. If not `NULL`, each element of pAddressInfos describes a bounded region of GPU virtual address space containing either the GPU virtual address accessed, or the value of an active instruction pointer. + /// + [FieldOffset(272)] + public VkDeviceFaultAddressInfoKHR* AddressInfos; + + /// + /// VendorInfos is `NULL` or a pointer to an array of VkDeviceFaultVendorInfoEXT structures describing vendor-specific fault information. The length of pVendorInfos is specified by the VkDeviceFaultCountsEXT::vendorInfoCount value passed to vkGetDeviceFaultInfoEXT. + /// + [FieldOffset(280)] + public VkDeviceFaultVendorInfoKHR* VendorInfos; + + /// + /// VendorBinaryData is `NULL` or a pointer to memory which will be populated with a vendor-specific binary crash dump, as described in Vendor Binary Crash Dumps^. The size of pVendorBinaryData is specified by the VkDeviceFaultCountsEXT::vendorBinarySize value passed to vkGetDeviceFaultInfoEXT. + /// + [FieldOffset(288)] + public void* VendorBinaryData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoKHR.gen.cs new file mode 100644 index 0000000..5087475 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultInfoKHR.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultInfoKHR - Structure specifying device fault information + /// + /// + /// + /// The VkDeviceFaultInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkDeviceFaultInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceFaultFlagsKHR flags; + /// uint64_t groupId; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// VkDeviceFaultAddressInfoKHR faultAddressInfo; + /// VkDeviceFaultAddressInfoKHR instructionAddressInfo; + /// VkDeviceFaultVendorInfoKHR vendorInfo; + /// } VkDeviceFaultInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 608)] + public unsafe partial struct VkDeviceFaultInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceFaultInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkDeviceFaultFlagsKHR values giving information as to the type of fault and which additional fields have been populated by the driver provide further information. + /// + [FieldOffset(16)] + public VkDeviceFaultFlagsKHR Flags; + + /// + /// GroupId + /// + [FieldOffset(24)] + public nint GroupId; + + /// + [FieldOffset(32)] + public fixed byte Description[256]; + + /// + /// FaultAddressInfo is a VkDeviceFaultAddressInfoKHR structure providing details of the memory access which caused a fault. + /// + [FieldOffset(288)] + public VkDeviceFaultAddressInfoKHR FaultAddressInfo; + + /// + /// InstructionAddressInfo is a VkDeviceFaultAddressInfoKHR structure providing details of the GPU instruction which cause a fault. + /// + [FieldOffset(312)] + public VkDeviceFaultAddressInfoKHR InstructionAddressInfo; + + /// + /// VendorInfo is a VkDeviceFaultVendorInfoKHR structure providing vendor specific fault information. + /// + [FieldOffset(336)] + public VkDeviceFaultVendorInfoKHR VendorInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultShaderAbortMessageInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultShaderAbortMessageInfoKHR.gen.cs new file mode 100644 index 0000000..f2e73c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultShaderAbortMessageInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultShaderAbortMessageInfoKHR - Structure specifying message data from <c>OpAbortKHR</c> + /// + /// + /// + /// The VkDeviceFaultShaderAbortMessageInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_abort + /// typedef struct VkDeviceFaultShaderAbortMessageInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t messageDataSize; + /// void* pMessageData; + /// } VkDeviceFaultShaderAbortMessageInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceFaultShaderAbortMessageInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceFaultShaderAbortMessageInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MessageDataSize is the size of pMessageData in bytes. If pMessageData is `NULL`, this value is populated by the implementation. + /// + [FieldOffset(16)] + public nint MessageDataSize; + + /// + /// MessageData is `NULL` or a pointer to messageDataSize bytes of data, which will be populated with data for messages reported via OpAbortKHR. If `pMessageData` is `NULL` then messageDataSize will be populated with the required size. + /// + [FieldOffset(24)] + public void* MessageData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorBinaryHeaderVersionOneKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorBinaryHeaderVersionOneKHR.gen.cs new file mode 100644 index 0000000..00b9727 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorBinaryHeaderVersionOneKHR.gen.cs @@ -0,0 +1,94 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultVendorBinaryHeaderVersionOneKHR - Structure describing the layout of the vendor binary crash dump header + /// + /// + /// + /// Version one of the crash dump header is defined as: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkDeviceFaultVendorBinaryHeaderVersionOneKHR { + /// uint32_t headerSize; + /// VkDeviceFaultVendorBinaryHeaderVersionKHR headerVersion; + /// uint32_t vendorID; + /// uint32_t deviceID; + /// uint32_t driverVersion; + /// uint8_t pipelineCacheUUID[VK_UUID_SIZE]; + /// uint32_t applicationNameOffset; + /// uint32_t applicationVersion; + /// uint32_t engineNameOffset; + /// uint32_t engineVersion; + /// uint32_t apiVersion; + /// } VkDeviceFaultVendorBinaryHeaderVersionOneKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDeviceFaultVendorBinaryHeaderVersionOneKHR() + { + /// + /// HeaderSize is the length in bytes of the crash dump header. + /// + [FieldOffset(0)] + public int HeaderSize; + + /// + /// HeaderVersion is a VkDeviceFaultVendorBinaryHeaderVersionKHR enum value specifying the version of the header. A consumer of the crash dump should use the header version to interpret the remainder of the header. headerVersion must be written as exactly 4 bytes. + /// + [FieldOffset(4)] + public VkDeviceFaultVendorBinaryHeaderVersionKHR HeaderVersion; + + /// + /// VendorID is the VkPhysicalDeviceProperties::vendorID of the implementation. + /// + [FieldOffset(8)] + public int VendorID; + + /// + /// DeviceID is the VkPhysicalDeviceProperties::deviceID of the implementation. + /// + [FieldOffset(12)] + public int DeviceID; + + /// + /// DriverVersion is the VkPhysicalDeviceProperties::driverVersion of the implementation. + /// + [FieldOffset(16)] + public int DriverVersion; + + /// + [FieldOffset(20)] + public fixed byte PipelineCacheUUID[16]; + + /// + /// ApplicationNameOffset is zero, or an offset from the base address of the crash dump header to a null-terminated UTF-8 string containing the name of the application. If applicationNameOffset is non-zero, this string must match the application name specified via VkApplicationInfo::pApplicationName during instance creation. + /// + [FieldOffset(36)] + public int ApplicationNameOffset; + + /// + /// ApplicationVersion must be zero or the value specified by VkApplicationInfo::applicationVersion during instance creation. + /// + [FieldOffset(40)] + public int ApplicationVersion; + + /// + /// EngineNameOffset is zero, or an offset from the base address of the crash dump header to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application. If engineNameOffset is non-zero, this string must match the engine name specified via VkApplicationInfo::pEngineName during instance creation. + /// + [FieldOffset(44)] + public int EngineNameOffset; + + /// + /// EngineVersion must be zero or the value specified by VkApplicationInfo::engineVersion during instance creation. + /// + [FieldOffset(48)] + public int EngineVersion; + + /// + /// ApiVersion must be zero or the value specified by VkApplicationInfo::apiVersion during instance creation. + /// + [FieldOffset(52)] + public int ApiVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorInfoKHR.gen.cs new file mode 100644 index 0000000..c446ffa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceFaultVendorInfoKHR.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceFaultVendorInfoKHR - Structure specifying vendor-specific fault information + /// + /// + /// + /// The VkDeviceFaultVendorInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkDeviceFaultVendorInfoKHR { + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// uint64_t vendorFaultCode; + /// uint64_t vendorFaultData; + /// } VkDeviceFaultVendorInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 272)] + public unsafe partial struct VkDeviceFaultVendorInfoKHR() + { + /// + [FieldOffset(0)] + public fixed byte Description[256]; + + /// + /// VendorFaultCode is the vendor-specific fault code for this fault. + /// + [FieldOffset(256)] + public nint VendorFaultCode; + + /// + /// VendorFaultData is the vendor-specific fault data associated with this fault. + /// + [FieldOffset(264)] + public nint VendorFaultData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupBindSparseInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupBindSparseInfo.gen.cs new file mode 100644 index 0000000..38cd703 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupBindSparseInfo.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupBindSparseInfo - Structure indicating which instances are bound + /// + /// + /// + /// If the pNext chain of VkBindSparseInfo includes a + /// VkDeviceGroupBindSparseInfo structure, then that structure includes + /// device indices specifying which instance of the resources and memory are + /// bound. + /// + /// + /// The VkDeviceGroupBindSparseInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDeviceGroupBindSparseInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t resourceDeviceIndex; + /// uint32_t memoryDeviceIndex; + /// } VkDeviceGroupBindSparseInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceGroupBindSparseInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupBindSparseInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ResourceDeviceIndex is a device index indicating which instance of the resource is bound. + /// + [FieldOffset(16)] + public int ResourceDeviceIndex; + + /// + /// MemoryDeviceIndex is a device index indicating which instance of the memory the resource instance is bound to. + /// + [FieldOffset(20)] + public int MemoryDeviceIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupCommandBufferBeginInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupCommandBufferBeginInfo.gen.cs new file mode 100644 index 0000000..c26b84f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupCommandBufferBeginInfo.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupCommandBufferBeginInfo - Set the initial device mask for a command buffer + /// + /// + /// + /// If the pNext chain of VkCommandBufferBeginInfo includes a + /// VkDeviceGroupCommandBufferBeginInfo structure, then that structure + /// includes an initial device mask for the command buffer. + /// + /// + /// The VkDeviceGroupCommandBufferBeginInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDeviceGroupCommandBufferBeginInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t deviceMask; + /// } VkDeviceGroupCommandBufferBeginInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceGroupCommandBufferBeginInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupCommandBufferBeginInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceMask is the initial value of the command buffer's device mask. + /// + [FieldOffset(16)] + public int DeviceMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupDeviceCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupDeviceCreateInfo.gen.cs new file mode 100644 index 0000000..c3bdd20 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupDeviceCreateInfo.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupDeviceCreateInfo - Create a logical device from multiple physical devices + /// + /// + /// + /// A logical device can be created that connects to one or more physical + /// devices by adding a VkDeviceGroupDeviceCreateInfo structure to the + /// pNext chain of VkDeviceCreateInfo. + /// The VkDeviceGroupDeviceCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDeviceGroupDeviceCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t physicalDeviceCount; + /// const VkPhysicalDevice* pPhysicalDevices; + /// } VkDeviceGroupDeviceCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceGroupDeviceCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupDeviceCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PhysicalDeviceCount is the number of elements in the pPhysicalDevices array. + /// + [FieldOffset(16)] + public int PhysicalDeviceCount; + + /// + /// PhysicalDevices is a pointer to an array of physical device handles belonging to the same device group. + /// + [FieldOffset(24)] + public VkPhysicalDevice* PhysicalDevices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..ea8d2b1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentCapabilitiesKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupPresentCapabilitiesKHR - Present capabilities from other physical devices + /// + /// + /// + /// The VkDeviceGroupPresentCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface + /// typedef struct VkDeviceGroupPresentCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE]; + /// VkDeviceGroupPresentModeFlagsKHR modes; + /// } VkDeviceGroupPresentCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public unsafe partial struct VkDeviceGroupPresentCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupPresentCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed int PresentMask[32]; + + /// + /// Modes is a bitmask of VkDeviceGroupPresentModeFlagsKHR indicating which device group presentation modes are supported. + /// + [FieldOffset(144)] + public VkDeviceGroupPresentModeFlagsKHR Modes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentInfoKHR.gen.cs new file mode 100644 index 0000000..dc08c48 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupPresentInfoKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupPresentInfoKHR - Mode and mask controlling which physical devices&apos; images are presented + /// + /// + /// + /// If the pNext chain of VkPresentInfoKHR includes a + /// VkDeviceGroupPresentInfoKHR structure, then that structure includes an + /// array of device masks and a device group present mode. + /// + /// + /// The VkDeviceGroupPresentInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// typedef struct VkDeviceGroupPresentInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const uint32_t* pDeviceMasks; + /// VkDeviceGroupPresentModeFlagBitsKHR mode; + /// } VkDeviceGroupPresentInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDeviceGroupPresentInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupPresentInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is zero or the number of elements in pDeviceMasks. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// DeviceMasks is a pointer to an array of device masks, one for each element of VkPresentInfoKHR::pSwapchains. + /// + [FieldOffset(24)] + public int* DeviceMasks; + + /// + /// Mode is a VkDeviceGroupPresentModeFlagsKHR value specifying the device group present mode that will be used for this present. + /// + [FieldOffset(32)] + public VkDeviceGroupPresentModeFlagsKHR Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupRenderPassBeginInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupRenderPassBeginInfo.gen.cs new file mode 100644 index 0000000..be24fbb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupRenderPassBeginInfo.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupRenderPassBeginInfo - Set the initial device mask and render areas for a render pass instance + /// + /// + /// + /// If the pNext chain of VkRenderPassBeginInfo + /// includes a VkDeviceGroupRenderPassBeginInfo structure, then that + /// structure includes a device mask and set of render areas for the render pass + /// instance. + /// + /// + /// The VkDeviceGroupRenderPassBeginInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDeviceGroupRenderPassBeginInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t deviceMask; + /// uint32_t deviceRenderAreaCount; + /// const VkRect2D* pDeviceRenderAreas; + /// } VkDeviceGroupRenderPassBeginInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceGroupRenderPassBeginInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupRenderPassBeginInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceMask is the device mask for the render pass instance. + /// + [FieldOffset(16)] + public int DeviceMask; + + /// + /// DeviceRenderAreaCount is the number of elements in the pDeviceRenderAreas array. + /// + [FieldOffset(20)] + public int DeviceRenderAreaCount; + + /// + /// DeviceRenderAreas is a pointer to an array of VkRect2D structures defining the render area for each physical device. + /// + [FieldOffset(24)] + public VkRect2D* DeviceRenderAreas; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupSubmitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupSubmitInfo.gen.cs new file mode 100644 index 0000000..aad3c7d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupSubmitInfo.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupSubmitInfo - Structure indicating which physical devices execute semaphore operations and command buffers + /// + /// + /// + /// If the pNext chain of VkSubmitInfo includes a + /// VkDeviceGroupSubmitInfo structure, then that structure includes device + /// indices and masks specifying which physical devices execute semaphore + /// operations and command buffers. + /// + /// + /// The VkDeviceGroupSubmitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDeviceGroupSubmitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t waitSemaphoreCount; + /// const uint32_t* pWaitSemaphoreDeviceIndices; + /// uint32_t commandBufferCount; + /// const uint32_t* pCommandBufferDeviceMasks; + /// uint32_t signalSemaphoreCount; + /// const uint32_t* pSignalSemaphoreDeviceIndices; + /// } VkDeviceGroupSubmitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkDeviceGroupSubmitInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupSubmitInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WaitSemaphoreCount is the number of elements in the pWaitSemaphoreDeviceIndices array. + /// + [FieldOffset(16)] + public int WaitSemaphoreCount; + + /// + /// WaitSemaphoreDeviceIndices is a pointer to an array of waitSemaphoreCount device indices indicating which physical device executes the semaphore wait operation in the corresponding element of VkSubmitInfo::pWaitSemaphores. + /// + [FieldOffset(24)] + public int* WaitSemaphoreDeviceIndices; + + /// + /// CommandBufferCount is the number of elements in the pCommandBufferDeviceMasks array. + /// + [FieldOffset(32)] + public int CommandBufferCount; + + /// + /// CommandBufferDeviceMasks is a pointer to an array of commandBufferCount device masks indicating which physical devices execute the command buffer in the corresponding element of VkSubmitInfo::pCommandBuffers. A physical device executes the command buffer if the corresponding bit is set in the mask. + /// + [FieldOffset(40)] + public int* CommandBufferDeviceMasks; + + /// + /// SignalSemaphoreCount is the number of elements in the pSignalSemaphoreDeviceIndices array. + /// + [FieldOffset(48)] + public int SignalSemaphoreCount; + + /// + /// SignalSemaphoreDeviceIndices is a pointer to an array of signalSemaphoreCount device indices indicating which physical device executes the semaphore signal operation in the corresponding element of VkSubmitInfo::pSignalSemaphores. + /// + [FieldOffset(56)] + public int* SignalSemaphoreDeviceIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceGroupSwapchainCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupSwapchainCreateInfoKHR.gen.cs new file mode 100644 index 0000000..f309d3f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceGroupSwapchainCreateInfoKHR.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceGroupSwapchainCreateInfoKHR - Structure specifying parameters of a newly created swapchain object + /// + /// + /// + /// If the pNext chain of VkSwapchainCreateInfoKHR includes a + /// VkDeviceGroupSwapchainCreateInfoKHR structure, then that structure + /// includes a set of device group present modes that the swapchain can be used + /// with. + /// + /// + /// The VkDeviceGroupSwapchainCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// typedef struct VkDeviceGroupSwapchainCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceGroupPresentModeFlagsKHR modes; + /// } VkDeviceGroupSwapchainCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceGroupSwapchainCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceGroupSwapchainCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Modes is a bitfield of modes that the swapchain can be used with. + /// + [FieldOffset(16)] + public VkDeviceGroupPresentModeFlagsKHR Modes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceImageMemoryRequirements.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceImageMemoryRequirements.gen.cs new file mode 100644 index 0000000..1915c66 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceImageMemoryRequirements.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceImageMemoryRequirements - (None) + /// + /// + /// + /// The VkDeviceImageMemoryRequirements structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkDeviceImageMemoryRequirements { + /// VkStructureType sType; + /// const void* pNext; + /// const VkImageCreateInfo* pCreateInfo; + /// VkImageAspectFlagBits planeAspect; + /// } VkDeviceImageMemoryRequirements; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceImageMemoryRequirements() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceImageMemoryRequirements; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateInfo is a pointer to a VkImageCreateInfo structure containing parameters affecting creation of the image to query. + /// + [FieldOffset(16)] + public VkImageCreateInfo* CreateInfo; + + /// + /// PlaneAspect is a VkImageAspectFlags value specifying the aspect corresponding to the image plane to query. This parameter is ignored unless pCreateInfo->flags has VK_IMAGE_CREATE_DISJOINT_BIT set. + /// + [FieldOffset(24)] + public VkImageAspectFlags PlaneAspect; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceImageSubresourceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceImageSubresourceInfo.gen.cs new file mode 100644 index 0000000..2100f86 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceImageSubresourceInfo.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceImageSubresourceInfo - Image creation information for querying subresource layout + /// + /// + /// + /// :refpage: VkDeviceImageSubresourceInfo + /// + /// + /// The VkDeviceImageSubresourceInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkDeviceImageSubresourceInfo { + /// VkStructureType sType; + /// const void* pNext; + /// const VkImageCreateInfo* pCreateInfo; + /// const VkImageSubresource2* pSubresource; + /// } VkDeviceImageSubresourceInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceImageSubresourceInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceImageSubresourceInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateInfo is a pointer to a VkImageCreateInfo structure containing parameters affecting creation of the image to query. + /// + [FieldOffset(16)] + public VkImageCreateInfo* CreateInfo; + + /// + /// Subresource is a pointer to a VkImageSubresource2 structure selecting a specific image subresource for the query. + /// + [FieldOffset(24)] + public VkImageSubresource2* Subresource; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryCopyKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryCopyKHR.gen.cs new file mode 100644 index 0000000..c3b89d6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryCopyKHR.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemoryCopyKHR - Structure specifying a memory range copy operation + /// + /// + /// + /// :refpage: VkDeviceMemoryCopyKHR + /// + /// + /// The VkDeviceMemoryCopyKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkDeviceMemoryCopyKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeKHR srcRange; + /// VkAddressCommandFlagsKHR srcFlags; + /// VkDeviceAddressRangeKHR dstRange; + /// VkAddressCommandFlagsKHR dstFlags; + /// } VkDeviceMemoryCopyKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkDeviceMemoryCopyKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceMemoryCopyKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcRange is a VkDeviceAddressRangeKHR structure defining the source memory to copy from. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeKHR SrcRange; + + /// + /// SrcFlags is a VkAddressCommandFlagsKHR value defining the copy flags for the source address range. + /// + [FieldOffset(32)] + public VkAddressCommandFlagsKHR SrcFlags; + + /// + /// DstRange is a VkDeviceAddressRangeKHR structure defining the destination memory to copy to. + /// + [FieldOffset(40)] + public VkDeviceAddressRangeKHR DstRange; + + /// + /// DstFlags is a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range. + /// + [FieldOffset(56)] + public VkAddressCommandFlagsKHR DstFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryImageCopyKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryImageCopyKHR.gen.cs new file mode 100644 index 0000000..65335f6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryImageCopyKHR.gen.cs @@ -0,0 +1,92 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemoryImageCopyKHR - Structure specifying a copy operation between a memory range and texels in an image + /// + /// + /// + /// :refpage: VkDeviceMemoryImageCopyKHR + /// + /// + /// The VkDeviceMemoryImageCopyKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkDeviceMemoryImageCopyKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// uint32_t addressRowLength; + /// uint32_t addressImageHeight; + /// VkImageSubresourceLayers imageSubresource; + /// VkImageLayout imageLayout; + /// VkOffset3D imageOffset; + /// VkExtent3D imageExtent; + /// } VkDeviceMemoryImageCopyKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkDeviceMemoryImageCopyKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceMemoryImageCopyKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is a VkDeviceAddressRangeKHR structure defining the address range accessed by the copy operation. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the copy flags for the source address range. + /// + [FieldOffset(32)] + public VkAddressCommandFlagsKHR AddressFlags; + + /// + /// AddressRowLength specifies the total number of texels in the address range representing a row of texels in the x dimension. Each new row of pixels in the copy will be read at an offset increment by this number of texels. + /// + [FieldOffset(36)] + public int AddressRowLength; + + /// + /// AddressImageHeight specifies the total number of rows of texels in the address range representing a 2D slice of texels in the x and y dimensions. Each new 2D slice of pixels in the copy will be read at an offset increment by this number of rows of texels. + /// + [FieldOffset(40)] + public int AddressImageHeight; + + /// + /// ImageSubresource is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data. + /// + [FieldOffset(44)] + public VkImageSubresourceLayers ImageSubresource; + + /// + /// ImageLayout is the VkImageLayout of the image subresource accessed by this copy. + /// + [FieldOffset(60)] + public VkImageLayout ImageLayout; + + /// + /// ImageOffset selects the initial x, y, z offsets in texels of the sub-region of the source or destination image data. + /// + [FieldOffset(64)] + public VkOffset3D ImageOffset; + + /// + /// ImageExtent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(76)] + public VkExtent3D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOpaqueCaptureAddressInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOpaqueCaptureAddressInfo.gen.cs new file mode 100644 index 0000000..04890df --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOpaqueCaptureAddressInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemoryOpaqueCaptureAddressInfo - Structure specifying the memory object to query an address for + /// + /// + /// + /// The VkDeviceMemoryOpaqueCaptureAddressInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkDeviceMemoryOpaqueCaptureAddressInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// } VkDeviceMemoryOpaqueCaptureAddressInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceMemoryOpaqueCaptureAddressInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceMemoryOpaqueCaptureAddressInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory specifies the memory whose address is being queried. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOverallocationCreateInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOverallocationCreateInfoAMD.gen.cs new file mode 100644 index 0000000..799693e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryOverallocationCreateInfoAMD.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemoryOverallocationCreateInfoAMD - Specify memory overallocation behavior for a Vulkan device + /// + /// + /// + /// To specify whether device memory allocation is allowed beyond the size + /// reported by VkPhysicalDeviceMemoryProperties, add a + /// VkDeviceMemoryOverallocationCreateInfoAMD structure to the pNext + /// chain of the VkDeviceCreateInfo structure. + /// If this structure is not specified, it is as if the + /// VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD value is used. + /// + /// + /// // Provided by VK_AMD_memory_overallocation_behavior + /// typedef struct VkDeviceMemoryOverallocationCreateInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkMemoryOverallocationBehaviorAMD overallocationBehavior; + /// } VkDeviceMemoryOverallocationCreateInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceMemoryOverallocationCreateInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceMemoryOverallocationCreateInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OverallocationBehavior is the desired overallocation behavior. + /// + [FieldOffset(16)] + public VkMemoryOverallocationBehaviorAMD OverallocationBehavior; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryReportCallbackDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryReportCallbackDataEXT.gen.cs new file mode 100644 index 0000000..1d51fa7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceMemoryReportCallbackDataEXT.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceMemoryReportCallbackDataEXT - Structure specifying parameters returned to the callback + /// + /// + /// + /// The definition of VkDeviceMemoryReportCallbackDataEXT is: + /// + /// + /// // Provided by VK_EXT_device_memory_report + /// typedef struct VkDeviceMemoryReportCallbackDataEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceMemoryReportFlagsEXT flags; + /// VkDeviceMemoryReportEventTypeEXT type; + /// uint64_t memoryObjectId; + /// VkDeviceSize size; + /// VkObjectType objectType; + /// uint64_t objectHandle; + /// uint32_t heapIndex; + /// } VkDeviceMemoryReportCallbackDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkDeviceMemoryReportCallbackDataEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceMemoryReportCallbackDataEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is 0 and reserved for future use. + /// + [FieldOffset(16)] + public VkDeviceMemoryReportFlagsEXT Flags; + + /// + /// Type is a VkDeviceMemoryReportEventTypeEXT type specifying the type of event reported in this VkDeviceMemoryReportCallbackDataEXT structure. + /// + [FieldOffset(20)] + public VkDeviceMemoryReportEventTypeEXT Type; + + /// + /// MemoryObjectId is the unique id for the underlying memory object as described below. + /// + [FieldOffset(24)] + public nint MemoryObjectId; + + /// + /// Size is the size of the memory object in bytes. If type is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, size is a valid basetype:VkDeviceSize value. Otherwise, size is undefined:. + /// + [FieldOffset(32)] + public ByteSize64 Size; + + /// + /// ObjectType is a VkObjectType value specifying the type of the object associated with this device memory report event. If type is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, objectType is a valid VkObjectType enum. Otherwise, objectType is undefined:. + /// + [FieldOffset(40)] + public VkObjectType ObjectType; + + /// + /// ObjectHandle is the object this device memory report event is attributed to. If type is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT, objectHandle is a valid Vulkan handle of the type associated with objectType as defined in the `VkObjectType` and Vulkan Handle Relationship^ table. Otherwise, objectHandle is undefined:. + /// + [FieldOffset(48)] + public nint ObjectHandle; + + /// + /// HeapIndex describes which memory heap this device memory allocation is made from. If type is VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT or VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT, heapIndex corresponds to one of the valid heaps from the VkPhysicalDeviceMemoryProperties structure. Otherwise, heapIndex is undefined:. + /// + [FieldOffset(56)] + public int HeapIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressConstKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressConstKHR.gen.cs new file mode 100644 index 0000000..2d6550a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressConstKHR.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceOrHostAddressConstKHR - Union specifying a const device or host address + /// + /// + /// + /// :refpage: VkDeviceOrHostAddressConstKHR + /// + /// + /// The VkDeviceOrHostAddressConstKHR union is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure, VK_NV_cooperative_vector + /// typedef union VkDeviceOrHostAddressConstKHR { + /// VkDeviceAddress deviceAddress; + /// const void* hostAddress; + /// } VkDeviceOrHostAddressConstKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkDeviceOrHostAddressConstKHR() + { + /// + /// DeviceAddress is a buffer device address as returned by the vkGetBufferDeviceAddressKHR command. + /// + [FieldOffset(0)] + public VkDeviceAddress DeviceAddress; + + /// + /// HostAddress is a const host memory address. + /// + [FieldOffset(0)] + public void* HostAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressKHR.gen.cs new file mode 100644 index 0000000..6cc6ea7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceOrHostAddressKHR.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceOrHostAddressKHR - Union specifying a device or host address + /// + /// + /// + /// :refpage: VkDeviceOrHostAddressKHR + /// + /// + /// The VkDeviceOrHostAddressKHR union is defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure, VK_NV_cooperative_vector + /// typedef union VkDeviceOrHostAddressKHR { + /// VkDeviceAddress deviceAddress; + /// void* hostAddress; + /// } VkDeviceOrHostAddressKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkDeviceOrHostAddressKHR() + { + /// + /// DeviceAddress is a buffer device address as returned by the vkGetBufferDeviceAddressKHR command. + /// + [FieldOffset(0)] + public VkDeviceAddress DeviceAddress; + + /// + /// HostAddress is a host memory address. + /// + [FieldOffset(0)] + public void* HostAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDevicePipelineBinaryInternalCacheControlKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDevicePipelineBinaryInternalCacheControlKHR.gen.cs new file mode 100644 index 0000000..2ed0285 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDevicePipelineBinaryInternalCacheControlKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDevicePipelineBinaryInternalCacheControlKHR - Structure specifying parameter to disable the internal pipeline cache + /// + /// + /// + /// To disable the implementation's internal pipeline cache, add a + /// VkDevicePipelineBinaryInternalCacheControlKHR structure to the + /// pNext chain of the VkDeviceCreateInfo structure. + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkDevicePipelineBinaryInternalCacheControlKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 disableInternalCache; + /// } VkDevicePipelineBinaryInternalCacheControlKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDevicePipelineBinaryInternalCacheControlKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DevicePipelineBinaryInternalCacheControlKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisableInternalCache specifies whether or not to disable the implementation's internal pipeline cache. + /// + [FieldOffset(16)] + public Brutal.Bool32 DisableInternalCache; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDevicePrivateDataCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDevicePrivateDataCreateInfo.gen.cs new file mode 100644 index 0000000..e8f6e9a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDevicePrivateDataCreateInfo.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDevicePrivateDataCreateInfo - Reserve private data slots + /// + /// + /// + /// To reserve private data storage slots, add a + /// VkDevicePrivateDataCreateInfo structure to the pNext chain of + /// the VkDeviceCreateInfo structure. + /// Reserving slots in this manner is not strictly necessary, but doing so may: + /// improve performance. + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkDevicePrivateDataCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t privateDataSlotRequestCount; + /// } VkDevicePrivateDataCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDevicePrivateDataCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DevicePrivateDataCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrivateDataSlotRequestCount is the amount of slots to reserve. + /// + [FieldOffset(16)] + public int PrivateDataSlotRequestCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceQueueCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueCreateInfo.gen.cs new file mode 100644 index 0000000..099cdf4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueCreateInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceQueueCreateInfo - Structure specifying parameters of a newly created device queue + /// + /// + /// + /// The VkDeviceQueueCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDeviceQueueCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceQueueCreateFlags flags; + /// uint32_t queueFamilyIndex; + /// uint32_t queueCount; + /// const float* pQueuePriorities; + /// } VkDeviceQueueCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDeviceQueueCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceQueueCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkDeviceQueueCreateFlags Flags; + + /// + /// QueueFamilyIndex is an unsigned integer indicating the index of the queue family in which to create the queues on this device. This index corresponds to the index of an element of the pQueueFamilyProperties array that was returned by vkGetPhysicalDeviceQueueFamilyProperties. + /// + [FieldOffset(20)] + public int QueueFamilyIndex; + + /// + /// QueueCount is an unsigned integer specifying the number of queues to create in the queue family indicated by queueFamilyIndex, and with the behavior specified by flags. + /// + [FieldOffset(24)] + public int QueueCount; + + /// + /// QueuePriorities is a pointer to an array of queueCount normalized floating-point values, specifying priorities of work that will be submitted to each created queue. See Queue Priority^ for more information. + /// + [FieldOffset(32)] + public float* QueuePriorities; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceQueueGlobalPriorityCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueGlobalPriorityCreateInfo.gen.cs new file mode 100644 index 0000000..2db500a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueGlobalPriorityCreateInfo.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceQueueGlobalPriorityCreateInfo - Specify a system wide priority + /// + /// + /// + /// Queues can be created with a system-wide priority by adding a + /// VkDeviceQueueGlobalPriorityCreateInfo structure to the pNext + /// chain of VkDeviceQueueCreateInfo. + /// + /// + /// The VkDeviceQueueGlobalPriorityCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkDeviceQueueGlobalPriorityCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkQueueGlobalPriority globalPriority; + /// } VkDeviceQueueGlobalPriorityCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceQueueGlobalPriorityCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceQueueGlobalPriorityCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GlobalPriority is the system-wide priority associated to these queues as specified by VkQueueGlobalPriority + /// + [FieldOffset(16)] + public VkQueueGlobalPriority GlobalPriority; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceQueueInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueInfo2.gen.cs new file mode 100644 index 0000000..ba7943e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueInfo2.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceQueueInfo2 - Structure specifying the parameters used for device queue creation + /// + /// + /// + /// The VkDeviceQueueInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkDeviceQueueInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceQueueCreateFlags flags; + /// uint32_t queueFamilyIndex; + /// uint32_t queueIndex; + /// } VkDeviceQueueInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDeviceQueueInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceQueueInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. The pNext chain of VkDeviceQueueInfo2 can be used to provide additional device queue parameters to vkGetDeviceQueue2. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a VkDeviceQueueCreateFlags value indicating the flags used to create the device queue. + /// + [FieldOffset(16)] + public VkDeviceQueueCreateFlags Flags; + + /// + /// QueueFamilyIndex is the index of the queue family to which the queue belongs. + /// + [FieldOffset(20)] + public int QueueFamilyIndex; + + /// + /// QueueIndex is the index of the queue to retrieve from within the set of queues that share both the queue family and flags specified. + /// + [FieldOffset(24)] + public int QueueIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceQueueShaderCoreControlCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueShaderCoreControlCreateInfoARM.gen.cs new file mode 100644 index 0000000..2b8421b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceQueueShaderCoreControlCreateInfoARM.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceQueueShaderCoreControlCreateInfoARM - Control the number of shader cores used by queues + /// + /// + /// + /// The number of shader cores used by a queue can be controlled by adding a + /// VkDeviceQueueShaderCoreControlCreateInfoARM structure to the + /// pNext chain of VkDeviceQueueCreateInfo structures. + /// + /// + /// The VkDeviceQueueShaderCoreControlCreateInfoARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// typedef struct VkDeviceQueueShaderCoreControlCreateInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t shaderCoreCount; + /// } VkDeviceQueueShaderCoreControlCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceQueueShaderCoreControlCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceQueueShaderCoreControlCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderCoreCount is the number of shader cores this queue uses. + /// + [FieldOffset(16)] + public int ShaderCoreCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDeviceTensorMemoryRequirementsARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDeviceTensorMemoryRequirementsARM.gen.cs new file mode 100644 index 0000000..10d27ef --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDeviceTensorMemoryRequirementsARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDeviceTensorMemoryRequirementsARM - (None) + /// + /// + /// + /// The VkDeviceTensorMemoryRequirementsARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkDeviceTensorMemoryRequirementsARM { + /// VkStructureType sType; + /// const void* pNext; + /// const VkTensorCreateInfoARM* pCreateInfo; + /// } VkDeviceTensorMemoryRequirementsARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDeviceTensorMemoryRequirementsARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DeviceTensorMemoryRequirementsARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateInfo is a pointer to a VkTensorCreateInfoARM structure containing parameters affecting the creation of the tensor to query. + /// + [FieldOffset(16)] + public VkTensorCreateInfoARM* CreateInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingInfoLUNARG.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingInfoLUNARG.gen.cs new file mode 100644 index 0000000..58524b4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingInfoLUNARG.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDirectDriverLoadingInfoLUNARG - Structure specifying the information required to load an additional driver + /// + /// + /// + /// The VkDirectDriverLoadingInfoLUNARG structure is defined as: + /// + /// + /// // Provided by VK_LUNARG_direct_driver_loading + /// typedef struct VkDirectDriverLoadingInfoLUNARG { + /// VkStructureType sType; + /// void* pNext; + /// VkDirectDriverLoadingFlagsLUNARG flags; + /// PFN_vkGetInstanceProcAddrLUNARG pfnGetInstanceProcAddr; + /// } VkDirectDriverLoadingInfoLUNARG; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDirectDriverLoadingInfoLUNARG() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DirectDriverLoadingInfoLUNARG; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkDirectDriverLoadingFlagsLUNARG Flags; + + /// + /// PfnGetInstanceProcAddr is a PFN_vkGetInstanceProcAddrLUNARG pointer to the driver vkGetInstanceProcAddr function. + /// + [FieldOffset(24)] + public PfnVkGetInstanceProcAddrLUNARG PfnGetInstanceProcAddr; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingListLUNARG.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingListLUNARG.gen.cs new file mode 100644 index 0000000..9494124 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDirectDriverLoadingListLUNARG.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDirectDriverLoadingListLUNARG - Structure specifying additional drivers to load + /// + /// + /// + /// The VkDirectDriverLoadingListLUNARG structure is defined as: + /// + /// + /// // Provided by VK_LUNARG_direct_driver_loading + /// typedef struct VkDirectDriverLoadingListLUNARG { + /// VkStructureType sType; + /// const void* pNext; + /// VkDirectDriverLoadingModeLUNARG mode; + /// uint32_t driverCount; + /// const VkDirectDriverLoadingInfoLUNARG* pDrivers; + /// } VkDirectDriverLoadingListLUNARG; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDirectDriverLoadingListLUNARG() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DirectDriverLoadingListLUNARG; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Mode controls the mode in which to load the provided drivers. + /// + [FieldOffset(16)] + public VkDirectDriverLoadingModeLUNARG Mode; + + /// + /// DriverCount is the number of driver manifest paths. + /// + [FieldOffset(20)] + public int DriverCount; + + /// + /// Drivers is a pointer to an array of driverCount VkDirectDriverLoadingInfoLUNARG structures. + /// + [FieldOffset(24)] + public VkDirectDriverLoadingInfoLUNARG* Drivers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDispatchIndirect2InfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDispatchIndirect2InfoKHR.gen.cs new file mode 100644 index 0000000..6d633d1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDispatchIndirect2InfoKHR.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDispatchIndirect2InfoKHR - Dispatch indirect info + /// + /// + /// + /// :refpage: VkDispatchIndirect2InfoKHR + /// + /// + /// VkDispatchIndirect2InfoKHR is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkDispatchIndirect2InfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// } VkDispatchIndirect2InfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDispatchIndirect2InfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DispatchIndirect2InfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is the VkDeviceAddressRangeKHR containing dispatch parameters. + /// + [FieldOffset(16)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(32)] + public VkAddressCommandFlagsKHR AddressFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDispatchIndirectCommand.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDispatchIndirectCommand.gen.cs new file mode 100644 index 0000000..c1a9756 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDispatchIndirectCommand.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDispatchIndirectCommand - Structure specifying an indirect dispatching command + /// + /// + /// + /// The VkDispatchIndirectCommand structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDispatchIndirectCommand { + /// uint32_t x; + /// uint32_t y; + /// uint32_t z; + /// } VkDispatchIndirectCommand; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkDispatchIndirectCommand() + { + /// + /// X is the number of local workgroups to dispatch in the X dimension. + /// + [FieldOffset(0)] + public int X; + + /// + /// Y is the number of local workgroups to dispatch in the Y dimension. + /// + [FieldOffset(4)] + public int Y; + + /// + /// Z is the number of local workgroups to dispatch in the Z dimension. + /// + [FieldOffset(8)] + public int Z; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDispatchParametersARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDispatchParametersARM.gen.cs new file mode 100644 index 0000000..85ae3a2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDispatchParametersARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDispatchParametersARM - Structure specifying parameters that affect dispatch commands + /// + /// + /// + /// The VkDispatchParametersARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// typedef struct VkDispatchParametersARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t workGroupBatchSize; + /// uint32_t maxQueuedWorkGroupBatches; + /// uint32_t maxWarpsPerShaderCore; + /// } VkDispatchParametersARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDispatchParametersARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DispatchParametersARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WorkGroupBatchSize + /// + [FieldOffset(16)] + public int WorkGroupBatchSize; + + /// + /// MaxQueuedWorkGroupBatches + /// + [FieldOffset(20)] + public int MaxQueuedWorkGroupBatches; + + /// + /// MaxWarpsPerShaderCore + /// + [FieldOffset(24)] + public int MaxWarpsPerShaderCore; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDispatchTileInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDispatchTileInfoQCOM.gen.cs new file mode 100644 index 0000000..104defe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDispatchTileInfoQCOM.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDispatchTileInfoQCOM - Structure specifying dispatch tile info + /// + /// + /// + /// The VkDispatchTileInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef struct VkDispatchTileInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// } VkDispatchTileInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkDispatchTileInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DispatchTileInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayEventInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayEventInfoEXT.gen.cs new file mode 100644 index 0000000..1f9d255 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayEventInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayEventInfoEXT - Describe a display event to create + /// + /// + /// + /// The VkDisplayEventInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef struct VkDisplayEventInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDisplayEventTypeEXT displayEvent; + /// } VkDisplayEventInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDisplayEventInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayEventInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisplayEvent is a VkDisplayEventTypeEXT specifying when the fence will be signaled. + /// + [FieldOffset(16)] + public VkDisplayEventTypeEXT DisplayEvent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayModeCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayModeCreateInfoKHR.gen.cs new file mode 100644 index 0000000..3951d24 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayModeCreateInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayModeCreateInfoKHR - Structure specifying parameters of a newly created display mode object + /// + /// + /// + /// The VkDisplayModeCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplayModeCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDisplayModeCreateFlagsKHR flags; + /// VkDisplayModeParametersKHR parameters; + /// } VkDisplayModeCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDisplayModeCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayModeCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use, and must be zero. + /// + [FieldOffset(16)] + public VkDisplayModeCreateFlagsKHR Flags; + + /// + /// Parameters is a VkDisplayModeParametersKHR structure describing the display parameters to use in creating the new mode. If the parameters are not compatible with the specified display, the implementation must return VK_ERROR_INITIALIZATION_FAILED. + /// + [FieldOffset(20)] + public VkDisplayModeParametersKHR Parameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayModeParametersKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayModeParametersKHR.gen.cs new file mode 100644 index 0000000..8868c1d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayModeParametersKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayModeParametersKHR - Structure describing display parameters associated with a display mode + /// + /// + /// + /// The VkDisplayModeParametersKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplayModeParametersKHR { + /// VkExtent2D visibleRegion; + /// uint32_t refreshRate; + /// } VkDisplayModeParametersKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkDisplayModeParametersKHR() + { + /// + /// VisibleRegion is the 2D extents of the visible region. + /// + [FieldOffset(0)] + public VkExtent2D VisibleRegion; + + /// + /// RefreshRate is a uint32_t that is the number of times the display is refreshed each second multiplied by 1000. + /// + [FieldOffset(8)] + public int RefreshRate; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayModeProperties2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayModeProperties2KHR.gen.cs new file mode 100644 index 0000000..0b81886 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayModeProperties2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayModeProperties2KHR - Structure describing an available display mode + /// + /// + /// + /// The VkDisplayModeProperties2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// typedef struct VkDisplayModeProperties2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDisplayModePropertiesKHR displayModeProperties; + /// } VkDisplayModeProperties2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkDisplayModeProperties2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayModeProperties2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisplayModeProperties is a VkDisplayModePropertiesKHR structure. + /// + [FieldOffset(16)] + public VkDisplayModePropertiesKHR DisplayModeProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayModePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayModePropertiesKHR.gen.cs new file mode 100644 index 0000000..76288ae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayModePropertiesKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayModePropertiesKHR - Structure describing display mode properties + /// + /// + /// + /// The VkDisplayModePropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplayModePropertiesKHR { + /// VkDisplayModeKHR displayMode; + /// VkDisplayModeParametersKHR parameters; + /// } VkDisplayModePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkDisplayModePropertiesKHR() + { + /// + /// DisplayMode is a handle to the display mode described in this structure. This handle will be valid for the lifetime of the Vulkan instance. + /// + [FieldOffset(0)] + public VkDisplayModeKHR DisplayMode; + + /// + /// Parameters is a VkDisplayModeParametersKHR structure describing the display parameters associated with displayMode. + /// + [FieldOffset(8)] + public VkDisplayModeParametersKHR Parameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayModeStereoPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayModeStereoPropertiesNV.gen.cs new file mode 100644 index 0000000..0f8d784 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayModeStereoPropertiesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayModeStereoPropertiesNV - Structure describing the stereo properties of a display mode + /// + /// + /// + /// The VkDisplayModeStereoPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_display_stereo + /// typedef struct VkDisplayModeStereoPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hdmi3DSupported; + /// } VkDisplayModeStereoPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDisplayModeStereoPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayModeStereoPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Hdmi3DSupported indicates whether this display mode can be used for a display surface configured for VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV. + /// + [FieldOffset(16)] + public Brutal.Bool32 Hdmi3DSupported; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayNativeHdrSurfaceCapabilitiesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayNativeHdrSurfaceCapabilitiesAMD.gen.cs new file mode 100644 index 0000000..1d1808b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayNativeHdrSurfaceCapabilitiesAMD.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayNativeHdrSurfaceCapabilitiesAMD - Structure describing display native HDR specific capabilities of a surface + /// + /// + /// + /// The VkDisplayNativeHdrSurfaceCapabilitiesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_display_native_hdr + /// typedef struct VkDisplayNativeHdrSurfaceCapabilitiesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 localDimmingSupport; + /// } VkDisplayNativeHdrSurfaceCapabilitiesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDisplayNativeHdrSurfaceCapabilitiesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayNativeHdrSurfaceCapabilitiesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LocalDimmingSupport specifies whether the surface supports local dimming. If this is VK_TRUE, VkSwapchainDisplayNativeHdrCreateInfoAMD can be used to explicitly enable or disable local dimming for the surface. Local dimming may also be overridden by vkSetLocalDimmingAMD during the lifetime of the swapchain. + /// + [FieldOffset(16)] + public Brutal.Bool32 LocalDimmingSupport; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilities2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilities2KHR.gen.cs new file mode 100644 index 0000000..fec7fce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilities2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPlaneCapabilities2KHR - Structure describing the capabilities of a mode and plane combination + /// + /// + /// + /// The VkDisplayPlaneCapabilities2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// typedef struct VkDisplayPlaneCapabilities2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDisplayPlaneCapabilitiesKHR capabilities; + /// } VkDisplayPlaneCapabilities2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkDisplayPlaneCapabilities2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayPlaneCapabilities2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Capabilities is a VkDisplayPlaneCapabilitiesKHR structure. + /// + [FieldOffset(16)] + public VkDisplayPlaneCapabilitiesKHR Capabilities; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..f2d35a2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneCapabilitiesKHR.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPlaneCapabilitiesKHR - Structure describing capabilities of a mode and plane combination + /// + /// + /// + /// The VkDisplayPlaneCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplayPlaneCapabilitiesKHR { + /// VkDisplayPlaneAlphaFlagsKHR supportedAlpha; + /// VkOffset2D minSrcPosition; + /// VkOffset2D maxSrcPosition; + /// VkExtent2D minSrcExtent; + /// VkExtent2D maxSrcExtent; + /// VkOffset2D minDstPosition; + /// VkOffset2D maxDstPosition; + /// VkExtent2D minDstExtent; + /// VkExtent2D maxDstExtent; + /// } VkDisplayPlaneCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 68)] + public partial struct VkDisplayPlaneCapabilitiesKHR() + { + /// + /// SupportedAlpha is a bitmask of VkDisplayPlaneAlphaFlagsKHR describing the supported alpha blending modes. + /// + [FieldOffset(0)] + public VkDisplayPlaneAlphaFlagsKHR SupportedAlpha; + + /// + /// MinSrcPosition is the minimum source rectangle offset supported by this plane using the specified mode. + /// + [FieldOffset(4)] + public VkOffset2D MinSrcPosition; + + /// + /// MaxSrcPosition is the maximum source rectangle offset supported by this plane using the specified mode. The x and y components of maxSrcPosition must each be greater than or equal to the x and y components of minSrcPosition, respectively. + /// + [FieldOffset(12)] + public VkOffset2D MaxSrcPosition; + + /// + /// MinSrcExtent is the minimum source rectangle size supported by this plane using the specified mode. + /// + [FieldOffset(20)] + public VkExtent2D MinSrcExtent; + + /// + /// MaxSrcExtent is the maximum source rectangle size supported by this plane using the specified mode. + /// + [FieldOffset(28)] + public VkExtent2D MaxSrcExtent; + + /// + /// MinDstPosition + /// + [FieldOffset(36)] + public VkOffset2D MinDstPosition; + + /// + /// MaxDstPosition + /// + [FieldOffset(44)] + public VkOffset2D MaxDstPosition; + + /// + /// MinDstExtent + /// + [FieldOffset(52)] + public VkExtent2D MinDstExtent; + + /// + /// MaxDstExtent + /// + [FieldOffset(60)] + public VkExtent2D MaxDstExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneInfo2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneInfo2KHR.gen.cs new file mode 100644 index 0000000..bf35b61 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneInfo2KHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPlaneInfo2KHR - Structure defining the intended configuration of a display plane + /// + /// + /// + /// The VkDisplayPlaneInfo2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// typedef struct VkDisplayPlaneInfo2KHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDisplayModeKHR mode; + /// uint32_t planeIndex; + /// } VkDisplayPlaneInfo2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDisplayPlaneInfo2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayPlaneInfo2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Mode is the display mode the application intends to program when using the specified plane. + /// + [FieldOffset(16)] + public VkDisplayModeKHR Mode; + + /// + /// PlaneIndex + /// + [FieldOffset(24)] + public int PlaneIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneProperties2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneProperties2KHR.gen.cs new file mode 100644 index 0000000..1caf475 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPlaneProperties2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPlaneProperties2KHR - Structure describing an available display plane + /// + /// + /// + /// The VkDisplayPlaneProperties2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// typedef struct VkDisplayPlaneProperties2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDisplayPlanePropertiesKHR displayPlaneProperties; + /// } VkDisplayPlaneProperties2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDisplayPlaneProperties2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayPlaneProperties2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisplayPlaneProperties is a VkDisplayPlanePropertiesKHR structure. + /// + [FieldOffset(16)] + public VkDisplayPlanePropertiesKHR DisplayPlaneProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPlanePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPlanePropertiesKHR.gen.cs new file mode 100644 index 0000000..3d47d5a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPlanePropertiesKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPlanePropertiesKHR - Structure describing display plane properties + /// + /// + /// + /// The VkDisplayPlanePropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplayPlanePropertiesKHR { + /// VkDisplayKHR currentDisplay; + /// uint32_t currentStackIndex; + /// } VkDisplayPlanePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkDisplayPlanePropertiesKHR() + { + /// + /// CurrentDisplay is the handle of the display the plane is currently associated with. If the plane is not currently attached to any displays, this will be VK_NULL_HANDLE. + /// + [FieldOffset(0)] + public VkDisplayKHR CurrentDisplay; + + /// + /// CurrentStackIndex is the current z-order of the plane. This will be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR in pPropertyCount. + /// + [FieldOffset(8)] + public int CurrentStackIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPowerInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPowerInfoEXT.gen.cs new file mode 100644 index 0000000..83cdf22 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPowerInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPowerInfoEXT - Describe the power state of a display + /// + /// + /// + /// The VkDisplayPowerInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef struct VkDisplayPowerInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDisplayPowerStateEXT powerState; + /// } VkDisplayPowerInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDisplayPowerInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayPowerInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PowerState is a VkDisplayPowerStateEXT value specifying the new power state of the display. + /// + [FieldOffset(16)] + public VkDisplayPowerStateEXT PowerState; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPresentInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPresentInfoKHR.gen.cs new file mode 100644 index 0000000..414f210 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPresentInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPresentInfoKHR - Structure describing parameters of a queue presentation to a swapchain + /// + /// + /// + /// The VkDisplayPresentInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display_swapchain + /// typedef struct VkDisplayPresentInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkRect2D srcRect; + /// VkRect2D dstRect; + /// VkBool32 persistent; + /// } VkDisplayPresentInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkDisplayPresentInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayPresentInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcRect is a rectangular region of pixels to present. It must be a subset of the image being presented. If VkDisplayPresentInfoKHR is not specified, this region will be assumed to be the entire presentable image. + /// + [FieldOffset(16)] + public VkRect2D SrcRect; + + /// + /// DstRect is a rectangular region within the visible region of the swapchain's display mode. If VkDisplayPresentInfoKHR is not specified, this region will be assumed to be the entire visible region of the swapchain's mode. If the specified rectangle is a subset of the display mode's visible region, content from display planes below the swapchain's plane will be visible outside the rectangle. If there are no planes below the swapchain's, the area outside the specified rectangle will be black. If portions of the specified rectangle are outside of the display's visible region, pixels mapping only to those portions of the rectangle will be discarded. + /// + [FieldOffset(32)] + public VkRect2D DstRect; + + /// + /// Persistent + /// + [FieldOffset(48)] + public Brutal.Bool32 Persistent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayProperties2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayProperties2KHR.gen.cs new file mode 100644 index 0000000..abb0c87 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayProperties2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayProperties2KHR - Structure describing an available display device + /// + /// + /// + /// The VkDisplayProperties2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_display_properties2 + /// typedef struct VkDisplayProperties2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDisplayPropertiesKHR displayProperties; + /// } VkDisplayProperties2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkDisplayProperties2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplayProperties2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisplayProperties is a VkDisplayPropertiesKHR structure. + /// + [FieldOffset(16)] + public VkDisplayPropertiesKHR DisplayProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplayPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplayPropertiesKHR.gen.cs new file mode 100644 index 0000000..840a1ef --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplayPropertiesKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplayPropertiesKHR - Structure describing an available display device + /// + /// + /// + /// The VkDisplayPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplayPropertiesKHR { + /// VkDisplayKHR display; + /// const char* displayName; + /// VkExtent2D physicalDimensions; + /// VkExtent2D physicalResolution; + /// VkSurfaceTransformFlagsKHR supportedTransforms; + /// VkBool32 planeReorderPossible; + /// VkBool32 persistentContent; + /// } VkDisplayPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDisplayPropertiesKHR() + { + /// + /// Display is a handle that is used to refer to the display described here. This handle will be valid for the lifetime of the Vulkan instance. + /// + [FieldOffset(0)] + public VkDisplayKHR Display; + + /// + /// DisplayName is `NULL` or a pointer to a null-terminated UTF-8 string containing the name of the display. Generally, this will be the name provided by the display's EDID. If `NULL`, no suitable name is available. If not `NULL`, the string pointed to must remain accessible and unmodified as long as display is valid. + /// + [FieldOffset(8)] + public byte* DisplayName; + + /// + /// PhysicalDimensions describes the physical width and height of the visible portion of the display, in millimeters. + /// + [FieldOffset(16)] + public VkExtent2D PhysicalDimensions; + + /// + /// PhysicalResolution describes the physical, native, or preferred resolution of the display. + /// + [FieldOffset(24)] + public VkExtent2D PhysicalResolution; + + /// + /// SupportedTransforms + /// + [FieldOffset(32)] + public VkSurfaceTransformFlagsKHR SupportedTransforms; + + /// + /// PlaneReorderPossible + /// + [FieldOffset(36)] + public Brutal.Bool32 PlaneReorderPossible; + + /// + /// PersistentContent + /// + [FieldOffset(40)] + public Brutal.Bool32 PersistentContent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..95947ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceCreateInfoKHR.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplaySurfaceCreateInfoKHR - Structure specifying parameters of a newly created display plane surface object + /// + /// + /// + /// The VkDisplaySurfaceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_display + /// typedef struct VkDisplaySurfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDisplaySurfaceCreateFlagsKHR flags; + /// VkDisplayModeKHR displayMode; + /// uint32_t planeIndex; + /// uint32_t planeStackIndex; + /// VkSurfaceTransformFlagBitsKHR transform; + /// float globalAlpha; + /// VkDisplayPlaneAlphaFlagBitsKHR alphaMode; + /// VkExtent2D imageExtent; + /// } VkDisplaySurfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkDisplaySurfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplaySurfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use, and must be zero. + /// + [FieldOffset(16)] + public VkDisplaySurfaceCreateFlagsKHR Flags; + + /// + /// DisplayMode is a VkDisplayModeKHR handle specifying the mode to use when displaying this surface. + /// + [FieldOffset(24)] + public VkDisplayModeKHR DisplayMode; + + /// + /// PlaneIndex is the plane on which this surface appears. + /// + [FieldOffset(32)] + public int PlaneIndex; + + /// + /// PlaneStackIndex is the z-order of the plane. + /// + [FieldOffset(36)] + public int PlaneStackIndex; + + /// + /// Transform is a VkSurfaceTransformFlagsKHR value specifying the transformation to apply to images as part of the scanout operation. + /// + [FieldOffset(40)] + public VkSurfaceTransformFlagsKHR Transform; + + /// + /// GlobalAlpha is the global alpha value. This value is ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR. + /// + [FieldOffset(44)] + public float GlobalAlpha; + + /// + /// AlphaMode is a VkDisplayPlaneAlphaFlagsKHR value specifying the type of alpha blending to use. + /// + [FieldOffset(48)] + public VkDisplayPlaneAlphaFlagsKHR AlphaMode; + + /// + /// ImageExtent is the size of the presentable images to use with the surface. + /// + [FieldOffset(52)] + public VkExtent2D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceStereoCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceStereoCreateInfoNV.gen.cs new file mode 100644 index 0000000..f37c32f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDisplaySurfaceStereoCreateInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDisplaySurfaceStereoCreateInfoNV - Structure specifying stereo parameters of a newly created display plane surface object + /// + /// + /// + /// The VkDisplaySurfaceStereoCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_display_stereo + /// typedef struct VkDisplaySurfaceStereoCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkDisplaySurfaceStereoTypeNV stereoType; + /// } VkDisplaySurfaceStereoCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkDisplaySurfaceStereoCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DisplaySurfaceStereoCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StereoType + /// + [FieldOffset(16)] + public VkDisplaySurfaceStereoTypeNV StereoType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawIndexedIndirectCommand.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawIndexedIndirectCommand.gen.cs new file mode 100644 index 0000000..c5ca758 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawIndexedIndirectCommand.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawIndexedIndirectCommand - Structure specifying an indexed indirect drawing command + /// + /// + /// + /// :refpage: VkDrawIndexedIndirectCommand + /// + /// + /// The VkDrawIndexedIndirectCommand structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDrawIndexedIndirectCommand { + /// uint32_t indexCount; + /// uint32_t instanceCount; + /// uint32_t firstIndex; + /// int32_t vertexOffset; + /// uint32_t firstInstance; + /// } VkDrawIndexedIndirectCommand; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VkDrawIndexedIndirectCommand() + { + /// + /// IndexCount is the number of vertices to draw. + /// + [FieldOffset(0)] + public int IndexCount; + + /// + /// InstanceCount is the number of instances to draw. + /// + [FieldOffset(4)] + public int InstanceCount; + + /// + /// FirstIndex is the base index within the index buffer. + /// + [FieldOffset(8)] + public int FirstIndex; + + /// + /// VertexOffset is the value added to the vertex index before indexing into the vertex buffer. + /// + [FieldOffset(12)] + public int VertexOffset; + + /// + /// FirstInstance is the instance ID of the first instance to draw. + /// + [FieldOffset(16)] + public int FirstInstance; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawIndirect2InfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawIndirect2InfoKHR.gen.cs new file mode 100644 index 0000000..07920c3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawIndirect2InfoKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawIndirect2InfoKHR - Draw indirect info + /// + /// + /// + /// :refpage: VkDrawIndirect2InfoKHR + /// + /// + /// VkDrawIndirect2InfoKHR is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkDrawIndirect2InfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkStridedDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// uint32_t drawCount; + /// } VkDrawIndirect2InfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkDrawIndirect2InfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DrawIndirect2InfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is the VkStridedDeviceAddressRangeKHR containing draw parameters. + /// + [FieldOffset(16)] + public VkStridedDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(40)] + public VkAddressCommandFlagsKHR AddressFlags; + + /// + /// DrawCount is the number of draws to execute, and can be zero. + /// + [FieldOffset(44)] + public int DrawCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCommand.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCommand.gen.cs new file mode 100644 index 0000000..c8a2593 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCommand.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawIndirectCommand - Structure specifying an indirect drawing command + /// + /// + /// + /// :refpage: VkDrawIndirectCommand + /// + /// + /// The VkDrawIndirectCommand structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkDrawIndirectCommand { + /// uint32_t vertexCount; + /// uint32_t instanceCount; + /// uint32_t firstVertex; + /// uint32_t firstInstance; + /// } VkDrawIndirectCommand; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkDrawIndirectCommand() + { + /// + /// VertexCount is the number of vertices to draw. + /// + [FieldOffset(0)] + public int VertexCount; + + /// + /// InstanceCount is the number of instances to draw. + /// + [FieldOffset(4)] + public int InstanceCount; + + /// + /// FirstVertex is the index of the first vertex to draw. + /// + [FieldOffset(8)] + public int FirstVertex; + + /// + /// FirstInstance is the instance ID of the first instance to draw. + /// + [FieldOffset(12)] + public int FirstInstance; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCount2InfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCount2InfoKHR.gen.cs new file mode 100644 index 0000000..c84c0da --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCount2InfoKHR.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawIndirectCount2InfoKHR - Draw indirect count info + /// + /// + /// + /// :refpage: VkDrawIndirectCount2InfoKHR + /// + /// + /// VkDrawIndirectCount2InfoKHR is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkDrawIndirectCount2InfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkStridedDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// VkDeviceAddressRangeKHR countAddressRange; + /// VkAddressCommandFlagsKHR countAddressFlags; + /// uint32_t maxDrawCount; + /// } VkDrawIndirectCount2InfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkDrawIndirectCount2InfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DrawIndirectCount2InfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AddressRange is the VkStridedDeviceAddressRangeKHR containing draw parameters. + /// + [FieldOffset(16)] + public VkStridedDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(40)] + public VkAddressCommandFlagsKHR AddressFlags; + + /// + /// CountAddressRange is the VkDeviceAddressRangeKHR containing the draw count. + /// + [FieldOffset(48)] + public VkDeviceAddressRangeKHR CountAddressRange; + + /// + /// CountAddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the count address range. + /// + [FieldOffset(64)] + public VkAddressCommandFlagsKHR CountAddressFlags; + + /// + /// MaxDrawCount specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in countAddressRange and maxDrawCount. + /// + [FieldOffset(68)] + public int MaxDrawCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCountIndirectCommandEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCountIndirectCommandEXT.gen.cs new file mode 100644 index 0000000..96c85a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawIndirectCountIndirectCommandEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawIndirectCountIndirectCommandEXT - Structure specifying input data for a single draw-type command token + /// + /// + /// + /// The VkDrawIndirectCountIndirectCommandEXT structure specifies the + /// input data for all draw-type tokens. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkDrawIndirectCountIndirectCommandEXT { + /// VkDeviceAddress bufferAddress; + /// uint32_t stride; + /// uint32_t commandCount; + /// } VkDrawIndirectCountIndirectCommandEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkDrawIndirectCountIndirectCommandEXT() + { + /// + /// BufferAddress specifies a physical address of the VkBuffer used for draw commands. + /// + [FieldOffset(0)] + public VkDeviceAddress BufferAddress; + + /// + /// Stride is the byte size stride for the command arguments + /// + [FieldOffset(8)] + public int Stride; + + /// + /// CommandCount is the number of commands to execute + /// + [FieldOffset(12)] + public int CommandCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandEXT.gen.cs new file mode 100644 index 0000000..eb2e3d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawMeshTasksIndirectCommandEXT - Structure specifying a mesh tasks draw indirect command + /// + /// + /// + /// :refpage: VkDrawMeshTasksIndirectCommandEXT + /// + /// + /// The VkDrawMeshTasksIndirectCommandEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_mesh_shader + /// typedef struct VkDrawMeshTasksIndirectCommandEXT { + /// uint32_t groupCountX; + /// uint32_t groupCountY; + /// uint32_t groupCountZ; + /// } VkDrawMeshTasksIndirectCommandEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkDrawMeshTasksIndirectCommandEXT() + { + /// + /// GroupCountX is the number of local workgroups to dispatch in the X dimension. + /// + [FieldOffset(0)] + public int GroupCountX; + + /// + /// GroupCountY is the number of local workgroups to dispatch in the Y dimension. + /// + [FieldOffset(4)] + public int GroupCountY; + + /// + /// GroupCountZ is the number of local workgroups to dispatch in the Z dimension. + /// + [FieldOffset(8)] + public int GroupCountZ; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandNV.gen.cs new file mode 100644 index 0000000..4b8c6cb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrawMeshTasksIndirectCommandNV.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrawMeshTasksIndirectCommandNV - Structure specifying a mesh tasks draw indirect command + /// + /// + /// + /// The VkDrawMeshTasksIndirectCommandNV structure is defined as: + /// + /// + /// // Provided by VK_NV_mesh_shader + /// typedef struct VkDrawMeshTasksIndirectCommandNV { + /// uint32_t taskCount; + /// uint32_t firstTask; + /// } VkDrawMeshTasksIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkDrawMeshTasksIndirectCommandNV() + { + /// + /// TaskCount is the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one. + /// + [FieldOffset(0)] + public int TaskCount; + + /// + /// FirstTask is the X component of the first workgroup ID. + /// + [FieldOffset(4)] + public int FirstTask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierProperties2EXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierProperties2EXT.gen.cs new file mode 100644 index 0000000..771ad92 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierProperties2EXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrmFormatModifierProperties2EXT - Structure specifying properties of a format when combined with a DRM format modifier + /// + /// + /// + /// The VkDrmFormatModifierProperties2EXT structure describes properties + /// of a VkFormat when that format is combined with a + /// Linux DRM format modifier^. + /// These properties, like those of VkFormatProperties2, are independent + /// of any particular image. + /// + /// + /// The VkDrmFormatModifierPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// typedef struct VkDrmFormatModifierProperties2EXT { + /// uint64_t drmFormatModifier; + /// uint32_t drmFormatModifierPlaneCount; + /// VkFormatFeatureFlags2 drmFormatModifierTilingFeatures; + /// } VkDrmFormatModifierProperties2EXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkDrmFormatModifierProperties2EXT() + { + /// + /// DrmFormatModifier is a Linux DRM format modifier. + /// + [FieldOffset(0)] + public nint DrmFormatModifier; + + /// + /// DrmFormatModifierPlaneCount is the number of memory planes in any image created with format and drmFormatModifier. An image's memory planecount is distinct from its format planecount, as explained below. + /// + [FieldOffset(8)] + public int DrmFormatModifierPlaneCount; + + /// + /// DrmFormatModifierTilingFeatures is a bitmask of VkFormatFeatureFlags2 that are supported by any image created with format and drmFormatModifier. + /// + [FieldOffset(16)] + public VkFormatFeatureFlags2 DrmFormatModifierTilingFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesEXT.gen.cs new file mode 100644 index 0000000..1a5dceb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrmFormatModifierPropertiesEXT - Structure specifying properties of a format when combined with a DRM format modifier + /// + /// + /// + /// The VkDrmFormatModifierPropertiesEXT structure describes properties of + /// a VkFormat when that format is combined with a + /// Linux DRM format modifier^. + /// These properties, like those of VkFormatProperties2, are independent + /// of any particular image. + /// + /// + /// The VkDrmFormatModifierPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// typedef struct VkDrmFormatModifierPropertiesEXT { + /// uint64_t drmFormatModifier; + /// uint32_t drmFormatModifierPlaneCount; + /// VkFormatFeatureFlags drmFormatModifierTilingFeatures; + /// } VkDrmFormatModifierPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkDrmFormatModifierPropertiesEXT() + { + /// + /// DrmFormatModifier is a Linux DRM format modifier. + /// + [FieldOffset(0)] + public nint DrmFormatModifier; + + /// + /// DrmFormatModifierPlaneCount is the number of memory planes in any image created with format and drmFormatModifier. An image's memory planecount is distinct from its format planecount, as explained below. + /// + [FieldOffset(8)] + public int DrmFormatModifierPlaneCount; + + /// + /// DrmFormatModifierTilingFeatures is a bitmask of VkFormatFeatureFlags that are supported by any image created with format and drmFormatModifier. + /// + [FieldOffset(12)] + public VkFormatFeatureFlags DrmFormatModifierTilingFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesList2EXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesList2EXT.gen.cs new file mode 100644 index 0000000..003e41a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesList2EXT.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrmFormatModifierPropertiesList2EXT - Structure specifying the list of DRM format modifiers supported for a format + /// + /// + /// + /// The list of Linux DRM format modifiers^ + /// compatible with a VkFormat can be obtained by adding a + /// VkDrmFormatModifierPropertiesList2EXT structure to the pNext + /// chain of VkFormatProperties2. + /// + /// + /// The VkDrmFormatModifierPropertiesList2EXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier with VK_KHR_format_feature_flags2 or VK_VERSION_1_3 + /// typedef struct VkDrmFormatModifierPropertiesList2EXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t drmFormatModifierCount; + /// VkDrmFormatModifierProperties2EXT* pDrmFormatModifierProperties; + /// } VkDrmFormatModifierPropertiesList2EXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDrmFormatModifierPropertiesList2EXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DrmFormatModifierPropertiesList2EXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DrmFormatModifierCount is an inout parameter related to the number of modifiers compatible with the format, as described below. + /// + [FieldOffset(16)] + public int DrmFormatModifierCount; + + /// + /// DrmFormatModifierProperties is either `NULL` or a pointer to an array of VkDrmFormatModifierProperties2EXT structures. + /// + [FieldOffset(24)] + public VkDrmFormatModifierProperties2EXT* DrmFormatModifierProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesListEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesListEXT.gen.cs new file mode 100644 index 0000000..002b3d8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkDrmFormatModifierPropertiesListEXT.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkDrmFormatModifierPropertiesListEXT - Structure specifying the list of DRM format modifiers supported for a format + /// + /// + /// + /// To obtain the list of Linux DRM format + /// modifiers^ compatible with a VkFormat, add a + /// VkDrmFormatModifierPropertiesListEXT structure to the pNext + /// chain of VkFormatProperties2. + /// + /// + /// The VkDrmFormatModifierPropertiesListEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// typedef struct VkDrmFormatModifierPropertiesListEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t drmFormatModifierCount; + /// VkDrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties; + /// } VkDrmFormatModifierPropertiesListEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkDrmFormatModifierPropertiesListEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.DrmFormatModifierPropertiesListEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DrmFormatModifierCount is an inout parameter related to the number of modifiers compatible with the format, as described below. + /// + [FieldOffset(16)] + public int DrmFormatModifierCount; + + /// + /// DrmFormatModifierProperties is either `NULL` or a pointer to an array of VkDrmFormatModifierPropertiesEXT structures. + /// + [FieldOffset(24)] + public VkDrmFormatModifierPropertiesEXT* DrmFormatModifierProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkEventCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkEventCreateInfo.gen.cs new file mode 100644 index 0000000..16574df --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkEventCreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkEventCreateInfo - Structure specifying parameters of a newly created event + /// + /// + /// + /// The VkEventCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkEventCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkEventCreateFlags flags; + /// } VkEventCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkEventCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.EventCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkEventCreateFlags defining additional creation parameters. + /// + [FieldOffset(16)] + public VkEventCreateFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExportFenceCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExportFenceCreateInfo.gen.cs new file mode 100644 index 0000000..8ee0afb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExportFenceCreateInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExportFenceCreateInfo - Structure specifying handle types that can be exported from a fence + /// + /// + /// + /// To create a fence whose payload can be exported to external handles, add a + /// VkExportFenceCreateInfo structure to the pNext chain of the + /// VkFenceCreateInfo structure. + /// The VkExportFenceCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExportFenceCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalFenceHandleTypeFlags handleTypes; + /// } VkExportFenceCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExportFenceCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportFenceCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes is a bitmask of VkExternalFenceHandleTypeFlags specifying one or more fence handle types the application can export from the resulting fence. The application can request multiple handle types for the same fence. + /// + [FieldOffset(16)] + public VkExternalFenceHandleTypeFlags HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfo.gen.cs new file mode 100644 index 0000000..edff8c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfo.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExportMemoryAllocateInfo - Specify exportable handle types for a device memory object + /// + /// + /// + /// When allocating memory whose payload may: be exported to another process or + /// Vulkan instance, add a VkExportMemoryAllocateInfo structure to the + /// pNext chain of the VkMemoryAllocateInfo structure, specifying + /// the handle types that may: be exported. + /// + /// + /// The VkExportMemoryAllocateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExportMemoryAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlags handleTypes; + /// } VkExportMemoryAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExportMemoryAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMemoryAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes is zero or a bitmask of VkExternalMemoryHandleTypeFlags specifying one or more memory handle types the application can export from the resulting allocation. The application can request multiple handle types for the same allocation. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfoNV.gen.cs new file mode 100644 index 0000000..481ee2d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExportMemoryAllocateInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExportMemoryAllocateInfoNV - Specify memory handle types that may be exported + /// + /// + /// + /// The VkExportMemoryAllocateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_memory + /// typedef struct VkExportMemoryAllocateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagsNV handleTypes; + /// } VkExportMemoryAllocateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExportMemoryAllocateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportMemoryAllocateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes is a bitmask of VkExternalMemoryHandleTypeFlagsNV specifying one or more memory handle types that may: be exported. Multiple handle types may: be requested for the same allocation as long as they are compatible, as reported by vkGetPhysicalDeviceExternalImageFormatPropertiesNV. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlagsNV HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExportSemaphoreCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExportSemaphoreCreateInfo.gen.cs new file mode 100644 index 0000000..d8febaf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExportSemaphoreCreateInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExportSemaphoreCreateInfo - Structure specifying handle types that can be exported from a semaphore + /// + /// + /// + /// To create a semaphore whose payload can be exported to external handles, + /// add a VkExportSemaphoreCreateInfo structure to the pNext chain + /// of the VkSemaphoreCreateInfo structure. + /// The VkExportSemaphoreCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExportSemaphoreCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalSemaphoreHandleTypeFlags handleTypes; + /// } VkExportSemaphoreCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExportSemaphoreCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExportSemaphoreCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes is a bitmask of VkExternalSemaphoreHandleTypeFlags specifying one or more semaphore handle types the application can export from the resulting semaphore. The application can request multiple handle types for the same semaphore. + /// + [FieldOffset(16)] + public VkExternalSemaphoreHandleTypeFlags HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExtensionProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExtensionProperties.gen.cs new file mode 100644 index 0000000..8839d12 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExtensionProperties.gen.cs @@ -0,0 +1,31 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExtensionProperties - Structure specifying an extension properties + /// + /// + /// + /// The VkExtensionProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkExtensionProperties { + /// char extensionName[VK_MAX_EXTENSION_NAME_SIZE]; + /// uint32_t specVersion; + /// } VkExtensionProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 260)] + public unsafe partial struct VkExtensionProperties() + { + /// + [FieldOffset(0)] + public fixed byte ExtensionName[256]; + + /// + /// SpecVersion is the version of this extension. It is an integer, incremented with backward compatible changes. + /// + [FieldOffset(256)] + public int SpecVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExtent2D.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExtent2D.gen.cs new file mode 100644 index 0000000..3981466 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExtent2D.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExtent2D - Structure specifying a two-dimensional extent + /// + /// + /// + /// A two-dimensional extent is defined by the structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkExtent2D { + /// uint32_t width; + /// uint32_t height; + /// } VkExtent2D; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkExtent2D() + { + /// + /// Width is the width of the extent. + /// + [FieldOffset(0)] + public int Width; + + /// + /// Height is the height of the extent. + /// + [FieldOffset(4)] + public int Height; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExtent3D.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExtent3D.gen.cs new file mode 100644 index 0000000..4140516 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExtent3D.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExtent3D - Structure specifying a three-dimensional extent + /// + /// + /// + /// A three-dimensional extent is defined by the structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkExtent3D { + /// uint32_t width; + /// uint32_t height; + /// uint32_t depth; + /// } VkExtent3D; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkExtent3D() + { + /// + /// Width is the width of the extent. + /// + [FieldOffset(0)] + public int Width; + + /// + /// Height is the height of the extent. + /// + [FieldOffset(4)] + public int Height; + + /// + /// Depth is the depth of the extent. + /// + [FieldOffset(8)] + public int Depth; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalBufferProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalBufferProperties.gen.cs new file mode 100644 index 0000000..be7e9d4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalBufferProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalBufferProperties - Structure specifying supported external handle capabilities + /// + /// + /// + /// The VkExternalBufferProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalBufferProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkExternalMemoryProperties externalMemoryProperties; + /// } VkExternalBufferProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkExternalBufferProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalBufferProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalMemoryProperties is a VkExternalMemoryProperties structure specifying various capabilities of the external handle type when used with the specified buffer creation parameters. + /// + [FieldOffset(16)] + public VkExternalMemoryProperties ExternalMemoryProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueCreateInfoNV.gen.cs new file mode 100644 index 0000000..4e2f2bb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueCreateInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalComputeQueueCreateInfoNV - Structure specifying configuration parameters for external compute queue creation + /// + /// + /// + /// The VkExternalComputeQueueCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// typedef struct VkExternalComputeQueueCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkQueue preferredQueue; + /// } VkExternalComputeQueueCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalComputeQueueCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalComputeQueueCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PreferredQueue is a VkQueue supporting graphics commands. + /// + [FieldOffset(16)] + public VkQueue PreferredQueue; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDataParamsNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDataParamsNV.gen.cs new file mode 100644 index 0000000..177380b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDataParamsNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalComputeQueueDataParamsNV - Structure specifying parameters for implementation-specific data retrieval from the external compute queue + /// + /// + /// + /// The VkExternalComputeQueueDataParamsNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// typedef struct VkExternalComputeQueueDataParamsNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t deviceIndex; + /// } VkExternalComputeQueueDataParamsNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalComputeQueueDataParamsNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalComputeQueueDataParamsNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceIndex is the index of the device within a device group that the data is being queried for. This is ignored if device groups are not utilized. + /// + [FieldOffset(16)] + public int DeviceIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDeviceCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDeviceCreateInfoNV.gen.cs new file mode 100644 index 0000000..89ff552 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalComputeQueueDeviceCreateInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalComputeQueueDeviceCreateInfoNV - Structure specifying information about external compute queues relevant to device creation + /// + /// + /// + /// The VkExternalComputeQueueDeviceCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// typedef struct VkExternalComputeQueueDeviceCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t reservedExternalQueues; + /// } VkExternalComputeQueueDeviceCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalComputeQueueDeviceCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalComputeQueueDeviceCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ReservedExternalQueues is the maximum number of external queues an application can create at once. This must be less than or equal to the maxExternalQueues value reported by VkPhysicalDeviceExternalComputeQueuePropertiesNV + /// + [FieldOffset(16)] + public int ReservedExternalQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalFenceProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalFenceProperties.gen.cs new file mode 100644 index 0000000..2191d52 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalFenceProperties.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalFenceProperties - Structure describing supported external fence handle features + /// + /// + /// + /// The VkExternalFenceProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalFenceProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes; + /// VkExternalFenceHandleTypeFlags compatibleHandleTypes; + /// VkExternalFenceFeatureFlags externalFenceFeatures; + /// } VkExternalFenceProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkExternalFenceProperties() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalFenceProperties; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExportFromImportedHandleTypes is a bitmask of VkExternalFenceHandleTypeFlags indicating which types of imported handle handleType can be exported from. + /// + [FieldOffset(16)] + public VkExternalFenceHandleTypeFlags ExportFromImportedHandleTypes; + + /// + /// CompatibleHandleTypes is a bitmask of VkExternalFenceHandleTypeFlags specifying handle types which can be specified at the same time as handleType when creating a fence. + /// + [FieldOffset(20)] + public VkExternalFenceHandleTypeFlags CompatibleHandleTypes; + + /// + /// ExternalFenceFeatures is a bitmask of VkExternalFenceFeatureFlags indicating the features of handleType. + /// + [FieldOffset(24)] + public VkExternalFenceFeatureFlags ExternalFenceFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalImageFormatProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalImageFormatProperties.gen.cs new file mode 100644 index 0000000..4293ddf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalImageFormatProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalImageFormatProperties - Structure specifying supported external handle properties + /// + /// + /// + /// The VkExternalImageFormatProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalImageFormatProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkExternalMemoryProperties externalMemoryProperties; + /// } VkExternalImageFormatProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkExternalImageFormatProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalImageFormatProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalMemoryProperties is a VkExternalMemoryProperties structure specifying various capabilities of the external handle type when used with the specified image creation parameters. + /// + [FieldOffset(16)] + public VkExternalMemoryProperties ExternalMemoryProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalImageFormatPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalImageFormatPropertiesNV.gen.cs new file mode 100644 index 0000000..db6218a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalImageFormatPropertiesNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalImageFormatPropertiesNV - Structure specifying external image format properties + /// + /// + /// + /// The VkExternalImageFormatPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_memory_capabilities + /// typedef struct VkExternalImageFormatPropertiesNV { + /// VkImageFormatProperties imageFormatProperties; + /// VkExternalMemoryFeatureFlagsNV externalMemoryFeatures; + /// VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes; + /// VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; + /// } VkExternalImageFormatPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct VkExternalImageFormatPropertiesNV() + { + /// + /// ImageFormatProperties will be filled in as when calling vkGetPhysicalDeviceImageFormatProperties, but the values returned may: vary depending on the external handle type requested. + /// + [FieldOffset(0)] + public VkImageFormatProperties ImageFormatProperties; + + /// + /// ExternalMemoryFeatures is a bitmask of VkExternalMemoryFeatureFlagsNV, indicating properties of the external memory handle type (vkGetPhysicalDeviceExternalImageFormatPropertiesNV::externalHandleType) being queried, or 0 if the external memory handle type is 0. + /// + [FieldOffset(32)] + public VkExternalMemoryFeatureFlagsNV ExternalMemoryFeatures; + + /// + /// ExportFromImportedHandleTypes is a bitmask of VkExternalMemoryHandleTypeFlagsNV containing a bit set for every external handle type that may: be used to create memory from which the handles of the type specified in vkGetPhysicalDeviceExternalImageFormatPropertiesNV::externalHandleType can be exported, or 0 if the external memory handle type is 0. + /// + [FieldOffset(36)] + public VkExternalMemoryHandleTypeFlagsNV ExportFromImportedHandleTypes; + + /// + /// CompatibleHandleTypes is a bitmask of VkExternalMemoryHandleTypeFlagsNV containing a bit set for every external handle type that may: be specified simultaneously with the handle type specified by vkGetPhysicalDeviceExternalImageFormatPropertiesNV::externalHandleType when calling vkAllocateMemory, or 0 if the external memory handle type is 0. compatibleHandleTypes will always contain vkGetPhysicalDeviceExternalImageFormatPropertiesNV::externalHandleType + /// + [FieldOffset(40)] + public VkExternalMemoryHandleTypeFlagsNV CompatibleHandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalMemoryAcquireUnmodifiedEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryAcquireUnmodifiedEXT.gen.cs new file mode 100644 index 0000000..f63ba6a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryAcquireUnmodifiedEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryAcquireUnmodifiedEXT - Structure specifying that external memory has remained unmodified since releasing ownership + /// + /// + /// + /// An acquire operation may: have a performance penalty when acquiring + /// ownership of a subresource range from one of the special queue families + /// reserved for external memory ownership transfers described above. + /// The application can reduce the performance penalty in some cases by adding + /// a VkExternalMemoryAcquireUnmodifiedEXT structure to the pNext + /// chain of the acquire operation's memory barrier structure. + /// + /// + /// The VkExternalMemoryAcquireUnmodifiedEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_acquire_unmodified + /// typedef struct VkExternalMemoryAcquireUnmodifiedEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 acquireUnmodifiedMemory; + /// } VkExternalMemoryAcquireUnmodifiedEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalMemoryAcquireUnmodifiedEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalMemoryAcquireUnmodifiedEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AcquireUnmodifiedMemory specifies, if VK_TRUE, that no range of VkDeviceMemory bound to the resource of the memory barrier's subresource range was modified at any time since the resource's most recent release of ownership to the queue family specified by the memory barrier's srcQueueFamilyIndex. If VK_FALSE, it specifies nothing. + /// + [FieldOffset(16)] + public Brutal.Bool32 AcquireUnmodifiedMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalMemoryBufferCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryBufferCreateInfo.gen.cs new file mode 100644 index 0000000..6ee3051 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryBufferCreateInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryBufferCreateInfo - Specify that a buffer may be backed by external memory + /// + /// + /// + /// To define a set of external memory handle types that may: be used as backing + /// store for a buffer, add a VkExternalMemoryBufferCreateInfo structure + /// to the pNext chain of the VkBufferCreateInfo structure. + /// The VkExternalMemoryBufferCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalMemoryBufferCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlags handleTypes; + /// } VkExternalMemoryBufferCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalMemoryBufferCreateInfo() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalMemoryBufferCreateInfo; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfo.gen.cs new file mode 100644 index 0000000..b968ce9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryImageCreateInfo - Specify that an image may be backed by external memory + /// + /// + /// + /// To define a set of external memory handle types that may: be used as backing + /// store for an image, add a VkExternalMemoryImageCreateInfo structure to + /// the pNext chain of the VkImageCreateInfo structure. + /// The VkExternalMemoryImageCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalMemoryImageCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlags handleTypes; + /// } VkExternalMemoryImageCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalMemoryImageCreateInfo() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalMemoryImageCreateInfo; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfoNV.gen.cs new file mode 100644 index 0000000..4ef1a39 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryImageCreateInfoNV.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryImageCreateInfoNV - Specify that an image may be backed by external memory + /// + /// + /// + /// If the pNext chain includes a VkExternalMemoryImageCreateInfoNV + /// structure, then that structure defines a set of external memory handle types + /// that may: be used as backing store for the image. + /// + /// + /// The VkExternalMemoryImageCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_memory + /// typedef struct VkExternalMemoryImageCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagsNV handleTypes; + /// } VkExternalMemoryImageCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalMemoryImageCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalMemoryImageCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes is zero or a bitmask of VkExternalMemoryHandleTypeFlagsNV specifying one or more external memory handle types. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlagsNV HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalMemoryProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryProperties.gen.cs new file mode 100644 index 0000000..5b9279f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryProperties - Structure specifying external memory handle type capabilities + /// + /// + /// + /// The VkExternalMemoryProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalMemoryProperties { + /// VkExternalMemoryFeatureFlags externalMemoryFeatures; + /// VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes; + /// VkExternalMemoryHandleTypeFlags compatibleHandleTypes; + /// } VkExternalMemoryProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkExternalMemoryProperties() + { + /// + /// ExternalMemoryFeatures is a bitmask of VkExternalMemoryFeatureFlags specifying the features of handleType. + /// + [FieldOffset(0)] + public VkExternalMemoryFeatureFlags ExternalMemoryFeatures; + + /// + /// ExportFromImportedHandleTypes is a bitmask of VkExternalMemoryHandleTypeFlags specifying which types of imported handle handleType can be exported from. + /// + [FieldOffset(4)] + public VkExternalMemoryHandleTypeFlags ExportFromImportedHandleTypes; + + /// + /// CompatibleHandleTypes is a bitmask of VkExternalMemoryHandleTypeFlags specifying handle types which can be specified at the same time as handleType when creating an image compatible with external memory. + /// + [FieldOffset(8)] + public VkExternalMemoryHandleTypeFlags CompatibleHandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalMemoryTensorCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryTensorCreateInfoARM.gen.cs new file mode 100644 index 0000000..c74617f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalMemoryTensorCreateInfoARM.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalMemoryTensorCreateInfoARM - Specify that a tensor may be backed by external memory + /// + /// + /// + /// To define a set of external memory handle types that may: be used as backing + /// store for a tensor, add a VkExternalMemoryTensorCreateInfoARM + /// structure to the pNext chain of the VkTensorCreateInfoARM + /// structure. + /// + /// + /// The VkExternalMemoryTensorCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkExternalMemoryTensorCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlags handleTypes; + /// } VkExternalMemoryTensorCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkExternalMemoryTensorCreateInfoARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalMemoryTensorCreateInfoARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleTypes + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalSemaphoreProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalSemaphoreProperties.gen.cs new file mode 100644 index 0000000..a4882a5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalSemaphoreProperties.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalSemaphoreProperties - Structure describing supported external semaphore handle features + /// + /// + /// + /// The VkExternalSemaphoreProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkExternalSemaphoreProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes; + /// VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes; + /// VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures; + /// } VkExternalSemaphoreProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkExternalSemaphoreProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalSemaphoreProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExportFromImportedHandleTypes is a bitmask of VkExternalSemaphoreHandleTypeFlags specifying which types of imported handle handleType can be exported from. + /// + [FieldOffset(16)] + public VkExternalSemaphoreHandleTypeFlags ExportFromImportedHandleTypes; + + /// + /// CompatibleHandleTypes is a bitmask of VkExternalSemaphoreHandleTypeFlags specifying handle types which can be specified at the same time as handleType when creating a semaphore. + /// + [FieldOffset(20)] + public VkExternalSemaphoreHandleTypeFlags CompatibleHandleTypes; + + /// + /// ExternalSemaphoreFeatures is a bitmask of VkExternalSemaphoreFeatureFlags describing the features of handleType. + /// + [FieldOffset(24)] + public VkExternalSemaphoreFeatureFlags ExternalSemaphoreFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkExternalTensorPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkExternalTensorPropertiesARM.gen.cs new file mode 100644 index 0000000..f1a8218 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkExternalTensorPropertiesARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkExternalTensorPropertiesARM - Structure specifying supported external handle capabilities for a tensor + /// + /// + /// + /// The VkExternalTensorPropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkExternalTensorPropertiesARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryProperties externalMemoryProperties; + /// } VkExternalTensorPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkExternalTensorPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ExternalTensorPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalMemoryProperties is a VkExternalMemoryProperties structure specifying various capabilities of the external handle type when used with the specified tensor creation parameters. + /// + [FieldOffset(16)] + public VkExternalMemoryProperties ExternalMemoryProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFenceCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFenceCreateInfo.gen.cs new file mode 100644 index 0000000..276801e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFenceCreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFenceCreateInfo - Structure specifying parameters of a newly created fence + /// + /// + /// + /// The VkFenceCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkFenceCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkFenceCreateFlags flags; + /// } VkFenceCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkFenceCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FenceCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkFenceCreateFlags specifying the initial state and behavior of the fence. + /// + [FieldOffset(16)] + public VkFenceCreateFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFenceGetFdInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFenceGetFdInfoKHR.gen.cs new file mode 100644 index 0000000..917a9b6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFenceGetFdInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFenceGetFdInfoKHR - Structure describing a POSIX FD fence export operation + /// + /// + /// + /// The VkFenceGetFdInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_fence_fd + /// typedef struct VkFenceGetFdInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkFence fence; + /// VkExternalFenceHandleTypeFlagBits handleType; + /// } VkFenceGetFdInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkFenceGetFdInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FenceGetFdInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Fence is the fence from which state will be exported. + /// + [FieldOffset(16)] + public VkFence Fence; + + /// + /// HandleType is a VkExternalFenceHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalFenceHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFilterCubicImageViewImageFormatPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFilterCubicImageViewImageFormatPropertiesEXT.gen.cs new file mode 100644 index 0000000..1063542 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFilterCubicImageViewImageFormatPropertiesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFilterCubicImageViewImageFormatPropertiesEXT - Structure for querying cubic filtering capabilities of an image view type + /// + /// + /// + /// The VkFilterCubicImageViewImageFormatPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_filter_cubic + /// typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 filterCubic; + /// VkBool32 filterCubicMinmax; + /// } VkFilterCubicImageViewImageFormatPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkFilterCubicImageViewImageFormatPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FilterCubicImageViewImageFormatPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FilterCubic tells if image format, image type and image view type can be used with cubic filtering. This field is set by the implementation. An application-specified value is ignored. + /// + [FieldOffset(16)] + public Brutal.Bool32 FilterCubic; + + /// + /// FilterCubicMinmax tells if image format, image type and image view type can be used with cubic filtering and minmax filtering. This field is set by the implementation. An application-specified value is ignored. + /// + [FieldOffset(20)] + public Brutal.Bool32 FilterCubicMinmax; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFormatProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFormatProperties.gen.cs new file mode 100644 index 0000000..e01d654 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFormatProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormatProperties - Structure specifying image format properties + /// + /// + /// + /// The VkFormatProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkFormatProperties { + /// VkFormatFeatureFlags linearTilingFeatures; + /// VkFormatFeatureFlags optimalTilingFeatures; + /// VkFormatFeatureFlags bufferFeatures; + /// } VkFormatProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkFormatProperties() + { + /// + /// LinearTilingFeatures is a bitmask of VkFormatFeatureFlags specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR. + /// + [FieldOffset(0)] + public VkFormatFeatureFlags LinearTilingFeatures; + + /// + /// OptimalTilingFeatures is a bitmask of VkFormatFeatureFlags specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL. + /// + [FieldOffset(4)] + public VkFormatFeatureFlags OptimalTilingFeatures; + + /// + /// BufferFeatures is a bitmask of VkFormatFeatureFlags specifying features supported by buffers. + /// + [FieldOffset(8)] + public VkFormatFeatureFlags BufferFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFormatProperties2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFormatProperties2.gen.cs new file mode 100644 index 0000000..6a1c56b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFormatProperties2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormatProperties2 - Structure specifying image format properties + /// + /// + /// + /// The VkFormatProperties2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkFormatProperties2 { + /// VkStructureType sType; + /// void* pNext; + /// VkFormatProperties formatProperties; + /// } VkFormatProperties2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkFormatProperties2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FormatProperties2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FormatProperties is a VkFormatProperties structure describing features supported by the requested format. + /// + [FieldOffset(16)] + public VkFormatProperties FormatProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFormatProperties3.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFormatProperties3.gen.cs new file mode 100644 index 0000000..d71825b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFormatProperties3.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormatProperties3 - Structure specifying image format properties + /// + /// + /// + /// To query supported format extended features which are properties of the + /// physical device, add VkFormatProperties3 structure to the pNext + /// chain of VkFormatProperties2. + /// + /// + /// The VkFormatProperties3 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkFormatProperties3 { + /// VkStructureType sType; + /// void* pNext; + /// VkFormatFeatureFlags2 linearTilingFeatures; + /// VkFormatFeatureFlags2 optimalTilingFeatures; + /// VkFormatFeatureFlags2 bufferFeatures; + /// } VkFormatProperties3; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkFormatProperties3() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FormatProperties3; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LinearTilingFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR. + /// + [FieldOffset(16)] + public VkFormatFeatureFlags2 LinearTilingFeatures; + + /// + /// OptimalTilingFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL. + /// + [FieldOffset(24)] + public VkFormatFeatureFlags2 OptimalTilingFeatures; + + /// + /// BufferFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by buffers. + /// + [FieldOffset(32)] + public VkFormatFeatureFlags2 BufferFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFormatProperties4KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFormatProperties4KHR.gen.cs new file mode 100644 index 0000000..2e5c4d1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFormatProperties4KHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFormatProperties4KHR - Structure specifying additional image format properties + /// + /// + /// + /// The VkFormatProperties4KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// typedef struct VkFormatProperties4KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkFormatFeatureFlags4KHR linearTilingFeatures; + /// VkFormatFeatureFlags4KHR optimalTilingFeatures; + /// VkFormatFeatureFlags4KHR bufferFeatures; + /// } VkFormatProperties4KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkFormatProperties4KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FormatProperties4KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LinearTilingFeatures is a bitmask of VkFormatFeatureFlags4KHR specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_LINEAR. + /// + [FieldOffset(16)] + public VkFormatFeatureFlags4KHR LinearTilingFeatures; + + /// + /// OptimalTilingFeatures is a bitmask of VkFormatFeatureFlags4KHR specifying features supported by images created with a tiling parameter of VK_IMAGE_TILING_OPTIMAL. + /// + [FieldOffset(24)] + public VkFormatFeatureFlags4KHR OptimalTilingFeatures; + + /// + /// BufferFeatures is a bitmask of VkFormatFeatureFlags4KHR specifying features supported by buffers. + /// + [FieldOffset(32)] + public VkFormatFeatureFlags4KHR BufferFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFragmentShadingRateAttachmentInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFragmentShadingRateAttachmentInfoKHR.gen.cs new file mode 100644 index 0000000..16fddc9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFragmentShadingRateAttachmentInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFragmentShadingRateAttachmentInfoKHR - Structure specifying a fragment shading rate attachment for a subpass + /// + /// + /// + /// The VkFragmentShadingRateAttachmentInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// typedef struct VkFragmentShadingRateAttachmentInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const VkAttachmentReference2* pFragmentShadingRateAttachment; + /// VkExtent2D shadingRateAttachmentTexelSize; + /// } VkFragmentShadingRateAttachmentInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkFragmentShadingRateAttachmentInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FragmentShadingRateAttachmentInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentShadingRateAttachment is `NULL` or a pointer to a VkAttachmentReference2 structure defining the fragment shading rate attachment for this subpass. + /// + [FieldOffset(16)] + public VkAttachmentReference2* FragmentShadingRateAttachment; + + /// + /// ShadingRateAttachmentTexelSize specifies the size of the portion of the framebuffer corresponding to each texel in pFragmentShadingRateAttachment. + /// + [FieldOffset(24)] + public VkExtent2D ShadingRateAttachmentTexelSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFrameBoundaryEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFrameBoundaryEXT.gen.cs new file mode 100644 index 0000000..d1c8f6e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFrameBoundaryEXT.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFrameBoundaryEXT - Add frame boundary information to queue submissions + /// + /// + /// + /// The VkFrameBoundaryEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_frame_boundary + /// typedef struct VkFrameBoundaryEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkFrameBoundaryFlagsEXT flags; + /// uint64_t frameID; + /// uint32_t imageCount; + /// const VkImage* pImages; + /// uint32_t bufferCount; + /// const VkBuffer* pBuffers; + /// uint64_t tagName; + /// size_t tagSize; + /// const void* pTag; + /// } VkFrameBoundaryEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkFrameBoundaryEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FrameBoundaryEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkFrameBoundaryFlagsEXT that can flag the last submission of a frame identifier. + /// + [FieldOffset(16)] + public VkFrameBoundaryFlagsEXT Flags; + + /// + /// FrameID is the frame identifier. + /// + [FieldOffset(24)] + public nint FrameID; + + /// + /// ImageCount is the number of images that store frame results. + /// + [FieldOffset(32)] + public int ImageCount; + + /// + /// Images is a pointer to an array of VkImage objects with imageCount entries. + /// + [FieldOffset(40)] + public VkImage* Images; + + /// + /// BufferCount is the number of buffers the store the frame results. + /// + [FieldOffset(48)] + public int BufferCount; + + /// + /// Buffers is a pointer to an array of VkBuffer objects with bufferCount entries. + /// + [FieldOffset(56)] + public VkBuffer* Buffers; + + /// + /// TagName is a numerical identifier for tag data. + /// + [FieldOffset(64)] + public nint TagName; + + /// + /// TagSize is the number of bytes of tag data. + /// + [FieldOffset(72)] + public nuint TagSize; + + /// + /// Tag is a pointer to an array of tagSize bytes containing tag data. + /// + [FieldOffset(80)] + public void* Tag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFrameBoundaryTensorsARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFrameBoundaryTensorsARM.gen.cs new file mode 100644 index 0000000..01585db --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFrameBoundaryTensorsARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFrameBoundaryTensorsARM - Add tensor frame boundary information to queue submissions + /// + /// + /// + /// The VkFrameBoundaryTensorsARM structure is defined as: + /// + /// + /// // Provided by VK_EXT_frame_boundary with VK_ARM_tensors + /// typedef struct VkFrameBoundaryTensorsARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t tensorCount; + /// const VkTensorARM* pTensors; + /// } VkFrameBoundaryTensorsARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkFrameBoundaryTensorsARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FrameBoundaryTensorsARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorCount is the number of tensors that store frame results. + /// + [FieldOffset(16)] + public int TensorCount; + + /// + /// Tensors is a pointer to an array of VkTensorARM objects with tensorCount entries. + /// + [FieldOffset(24)] + public VkTensorARM* Tensors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentImageInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentImageInfo.gen.cs new file mode 100644 index 0000000..3c546e5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentImageInfo.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFramebufferAttachmentImageInfo - Structure specifying parameters of an image that will be used with a framebuffer + /// + /// + /// + /// The VkFramebufferAttachmentImageInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkFramebufferAttachmentImageInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageCreateFlags flags; + /// VkImageUsageFlags usage; + /// uint32_t width; + /// uint32_t height; + /// uint32_t layerCount; + /// uint32_t viewFormatCount; + /// const VkFormat* pViewFormats; + /// } VkFramebufferAttachmentImageInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkFramebufferAttachmentImageInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FramebufferAttachmentImageInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkImageCreateFlags, matching the value of VkImageCreateInfo::flags used to create an image that will be used with this framebuffer. + /// + [FieldOffset(16)] + public VkImageCreateFlags Flags; + + /// + /// Usage is a bitmask of VkImageUsageFlags, matching the value of VkImageCreateInfo::usage used to create an image used with this framebuffer. + /// + [FieldOffset(20)] + public VkImageUsageFlags Usage; + + /// + /// Width is the width of the image view used for rendering. + /// + [FieldOffset(24)] + public int Width; + + /// + /// Height is the height of the image view used for rendering. + /// + [FieldOffset(28)] + public int Height; + + /// + /// LayerCount is the number of array layers of the image view used for rendering. + /// + [FieldOffset(32)] + public int LayerCount; + + /// + /// ViewFormatCount is the number of entries in the pViewFormats array, matching the value of VkImageFormatListCreateInfo::viewFormatCount used to create an image used with this framebuffer. + /// + [FieldOffset(36)] + public int ViewFormatCount; + + /// + /// ViewFormats is a pointer to an array of VkFormat values specifying all of the formats which can be used when creating views of the image, matching the value of VkImageFormatListCreateInfo::pViewFormats used to create an image used with this framebuffer. + /// + [FieldOffset(40)] + public VkFormat* ViewFormats; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentsCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentsCreateInfo.gen.cs new file mode 100644 index 0000000..0de3eef --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFramebufferAttachmentsCreateInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFramebufferAttachmentsCreateInfo - Structure specifying parameters of images that will be used with a framebuffer + /// + /// + /// + /// The VkFramebufferAttachmentsCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkFramebufferAttachmentsCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t attachmentImageInfoCount; + /// const VkFramebufferAttachmentImageInfo* pAttachmentImageInfos; + /// } VkFramebufferAttachmentsCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkFramebufferAttachmentsCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FramebufferAttachmentsCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AttachmentImageInfoCount is the number of attachments being described. + /// + [FieldOffset(16)] + public int AttachmentImageInfoCount; + + /// + /// AttachmentImageInfos is a pointer to an array of VkFramebufferAttachmentImageInfo structures, each structure describing a number of parameters of the corresponding attachment in a render pass instance. + /// + [FieldOffset(24)] + public VkFramebufferAttachmentImageInfo* AttachmentImageInfos; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFramebufferCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFramebufferCreateInfo.gen.cs new file mode 100644 index 0000000..04918af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFramebufferCreateInfo.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFramebufferCreateInfo - Structure specifying parameters of a newly created framebuffer + /// + /// + /// + /// The VkFramebufferCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkFramebufferCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkFramebufferCreateFlags flags; + /// VkRenderPass renderPass; + /// uint32_t attachmentCount; + /// const VkImageView* pAttachments; + /// uint32_t width; + /// uint32_t height; + /// uint32_t layers; + /// } VkFramebufferCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkFramebufferCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FramebufferCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkFramebufferCreateFlags + /// + [FieldOffset(16)] + public VkFramebufferCreateFlags Flags; + + /// + /// RenderPass is a render pass defining what render passes the framebuffer will be compatible with. See Render Pass Compatibility^ for details. The implementation must not access this object outside of the duration of the command this structure is passed to. + /// + [FieldOffset(24)] + public VkRenderPass RenderPass; + + /// + /// AttachmentCount is the number of attachments. + /// + [FieldOffset(32)] + public int AttachmentCount; + + /// + /// Attachments is a pointer to an array of VkImageView handles, each of which will be used as the corresponding attachment in a render pass instance. + /// + [FieldOffset(40)] + public VkImageView* Attachments; + + /// + /// Width + /// + [FieldOffset(48)] + public int Width; + + /// + /// Height + /// + [FieldOffset(52)] + public int Height; + + /// + /// Layers + /// + [FieldOffset(56)] + public int Layers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkFramebufferMixedSamplesCombinationNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkFramebufferMixedSamplesCombinationNV.gen.cs new file mode 100644 index 0000000..794975d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkFramebufferMixedSamplesCombinationNV.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkFramebufferMixedSamplesCombinationNV - Structure specifying a supported sample count combination + /// + /// + /// + /// The VkFramebufferMixedSamplesCombinationNV structure is defined as: + /// + /// + /// // Provided by VK_NV_coverage_reduction_mode + /// typedef struct VkFramebufferMixedSamplesCombinationNV { + /// VkStructureType sType; + /// void* pNext; + /// VkCoverageReductionModeNV coverageReductionMode; + /// VkSampleCountFlagBits rasterizationSamples; + /// VkSampleCountFlags depthStencilSamples; + /// VkSampleCountFlags colorSamples; + /// } VkFramebufferMixedSamplesCombinationNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkFramebufferMixedSamplesCombinationNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.FramebufferMixedSamplesCombinationNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CoverageReductionMode is a VkCoverageReductionModeNV value specifying the coverage reduction mode. + /// + [FieldOffset(16)] + public VkCoverageReductionModeNV CoverageReductionMode; + + /// + /// RasterizationSamples is a VkSampleCountFlags specifying the number of rasterization samples in the supported combination. + /// + [FieldOffset(20)] + public VkSampleCountFlags RasterizationSamples; + + /// + /// DepthStencilSamples specifies the number of samples in the depth stencil attachment in the supported combination. A value of 0 indicates the combination does not have a depth stencil attachment. + /// + [FieldOffset(24)] + public VkSampleCountFlags DepthStencilSamples; + + /// + /// ColorSamples specifies the number of color samples in a color attachment in the supported combination. A value of 0 indicates the combination does not have a color attachment. + /// + [FieldOffset(28)] + public VkSampleCountFlags ColorSamples; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoEXT.gen.cs new file mode 100644 index 0000000..103f3e1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoEXT.gen.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeneratedCommandsInfoEXT - Structure specifying parameters for the generation of commands + /// + /// + /// + /// :refpage: + /// + /// + /// The VkGeneratedCommandsInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkGeneratedCommandsInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderStageFlags shaderStages; + /// VkIndirectExecutionSetEXT indirectExecutionSet; + /// VkIndirectCommandsLayoutEXT indirectCommandsLayout; + /// VkDeviceAddress indirectAddress; + /// VkDeviceSize indirectAddressSize; + /// VkDeviceAddress preprocessAddress; + /// VkDeviceSize preprocessSize; + /// uint32_t maxSequenceCount; + /// VkDeviceAddress sequenceCountAddress; + /// uint32_t maxDrawCount; + /// } VkGeneratedCommandsInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkGeneratedCommandsInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeneratedCommandsInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderStages is the mask of shader stages used by the commands. + /// + [FieldOffset(16)] + public VkShaderStageFlags ShaderStages; + + /// + /// IndirectExecutionSet is the indirect execution set to be used for binding shaders. + /// + [FieldOffset(24)] + public VkIndirectExecutionSetEXT IndirectExecutionSet; + + /// + /// IndirectCommandsLayout is the VkIndirectCommandsLayoutEXT that specifies the command sequence data. + /// + [FieldOffset(32)] + public VkIndirectCommandsLayoutEXT IndirectCommandsLayout; + + /// + /// IndirectAddress is an address that holds the indirect buffer data. + /// + [FieldOffset(40)] + public VkDeviceAddress IndirectAddress; + + /// + /// IndirectAddressSize is the size in bytes of indirect buffer data starting at indirectAddress. + /// + [FieldOffset(48)] + public ByteSize64 IndirectAddressSize; + + /// + /// PreprocessAddress specifies a physical address of the VkBuffer used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsEXT with its isPreprocessed set to VK_TRUE, then the preprocessing step is skipped but data in this address may: still be modified. The contents and the layout of this address are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse. + /// + [FieldOffset(56)] + public VkDeviceAddress PreprocessAddress; + + /// + /// PreprocessSize is the maximum byte size within preprocessAddress that is available for preprocessing. + /// + [FieldOffset(64)] + public ByteSize64 PreprocessSize; + + /// + /// MaxSequenceCount is used to determine the number of sequences to execute. + /// + [FieldOffset(72)] + public int MaxSequenceCount; + + /// + /// SequenceCountAddress specifies an optional physical address of a single uint32_t value containing the requested number of sequences to execute. + /// + [FieldOffset(80)] + public VkDeviceAddress SequenceCountAddress; + + /// + /// MaxDrawCount is the maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens. The draw count in the indirect buffer is clamped to this value for these token types. + /// + [FieldOffset(88)] + public int MaxDrawCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoNV.gen.cs new file mode 100644 index 0000000..98055be --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsInfoNV.gen.cs @@ -0,0 +1,127 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeneratedCommandsInfoNV - Structure specifying parameters for the generation of commands + /// + /// + /// + /// :refpage: + /// + /// + /// The VkGeneratedCommandsInfoNV is defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkGeneratedCommandsInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineBindPoint pipelineBindPoint; + /// VkPipeline pipeline; + /// VkIndirectCommandsLayoutNV indirectCommandsLayout; + /// uint32_t streamCount; + /// const VkIndirectCommandsStreamNV* pStreams; + /// uint32_t sequencesCount; + /// VkBuffer preprocessBuffer; + /// VkDeviceSize preprocessOffset; + /// VkDeviceSize preprocessSize; + /// VkBuffer sequencesCountBuffer; + /// VkDeviceSize sequencesCountOffset; + /// VkBuffer sequencesIndexBuffer; + /// VkDeviceSize sequencesIndexOffset; + /// } VkGeneratedCommandsInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 120)] + public unsafe partial struct VkGeneratedCommandsInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeneratedCommandsInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBindPoint is the VkPipelineBindPoint used for the pipeline. + /// + [FieldOffset(16)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// Pipeline is the VkPipeline used in the generation and execution process. + /// + [FieldOffset(24)] + public VkPipeline Pipeline; + + /// + /// IndirectCommandsLayout is the VkIndirectCommandsLayoutNV that provides the command sequence to generate. + /// + [FieldOffset(32)] + public VkIndirectCommandsLayoutNV IndirectCommandsLayout; + + /// + /// StreamCount defines the number of input streams + /// + [FieldOffset(40)] + public int StreamCount; + + /// + /// Streams is a pointer to an array of streamCount VkIndirectCommandsStreamNV structures providing the input data for the tokens used in indirectCommandsLayout. + /// + [FieldOffset(48)] + public VkIndirectCommandsStreamNV* Streams; + + /// + /// SequencesCount is the maximum number of sequences to reserve. If sequencesCountBuffer is VK_NULL_HANDLE, this is also the actual number of sequences generated. + /// + [FieldOffset(56)] + public int SequencesCount; + + /// + /// PreprocessBuffer is the VkBuffer that is used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsNV with its isPreprocessed set to VK_TRUE, then the preprocessing step is skipped and data in this buffer will not be modified. The contents and the layout of this buffer are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse. + /// + [FieldOffset(64)] + public VkBuffer PreprocessBuffer; + + /// + /// PreprocessOffset is the byte offset into preprocessBuffer where the preprocessed data is stored. + /// + [FieldOffset(72)] + public ByteSize64 PreprocessOffset; + + /// + /// PreprocessSize is the maximum byte size within the preprocessBuffer after the preprocessOffset that is available for preprocessing. + /// + [FieldOffset(80)] + public ByteSize64 PreprocessSize; + + /// + /// SequencesCountBuffer is a VkBuffer in which the actual number of sequences is provided as single uint32_t value. + /// + [FieldOffset(88)] + public VkBuffer SequencesCountBuffer; + + /// + /// SequencesCountOffset is the byte offset into sequencesCountBuffer where the count value is stored. + /// + [FieldOffset(96)] + public ByteSize64 SequencesCountOffset; + + /// + /// SequencesIndexBuffer is a VkBuffer that encodes the used sequence indices as uint32_t array. + /// + [FieldOffset(104)] + public VkBuffer SequencesIndexBuffer; + + /// + /// SequencesIndexOffset is the byte offset into sequencesIndexBuffer where the index values start. + /// + [FieldOffset(112)] + public ByteSize64 SequencesIndexOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoEXT.gen.cs new file mode 100644 index 0000000..c50ac34 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeneratedCommandsMemoryRequirementsInfoEXT - Structure specifying parameters for the reservation of preprocess buffer space + /// + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkGeneratedCommandsMemoryRequirementsInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkIndirectExecutionSetEXT indirectExecutionSet; + /// VkIndirectCommandsLayoutEXT indirectCommandsLayout; + /// uint32_t maxSequenceCount; + /// uint32_t maxDrawCount; + /// } VkGeneratedCommandsMemoryRequirementsInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkGeneratedCommandsMemoryRequirementsInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeneratedCommandsMemoryRequirementsInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IndirectExecutionSet is the indirect execution set to be used for binding shaders. + /// + [FieldOffset(16)] + public VkIndirectExecutionSetEXT IndirectExecutionSet; + + /// + /// IndirectCommandsLayout is the VkIndirectCommandsLayoutEXT that this buffer memory is intended to be used with. + /// + [FieldOffset(24)] + public VkIndirectCommandsLayoutEXT IndirectCommandsLayout; + + /// + /// MaxSequenceCount is the maximum number of sequences that this buffer memory can be used with. + /// + [FieldOffset(32)] + public int MaxSequenceCount; + + /// + /// MaxDrawCount is the maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens. The draw count in the indirect buffer is clamped to this value for these token types. + /// + [FieldOffset(36)] + public int MaxDrawCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoNV.gen.cs new file mode 100644 index 0000000..b5981c0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsMemoryRequirementsInfoNV.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeneratedCommandsMemoryRequirementsInfoNV - Structure specifying parameters for the reservation of preprocess buffer space + /// + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkGeneratedCommandsMemoryRequirementsInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineBindPoint pipelineBindPoint; + /// VkPipeline pipeline; + /// VkIndirectCommandsLayoutNV indirectCommandsLayout; + /// uint32_t maxSequencesCount; + /// } VkGeneratedCommandsMemoryRequirementsInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkGeneratedCommandsMemoryRequirementsInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeneratedCommandsMemoryRequirementsInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBindPoint is the VkPipelineBindPoint of the pipeline that this buffer memory is intended to be used with during the execution. + /// + [FieldOffset(16)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// Pipeline is the VkPipeline that this buffer memory is intended to be used with during the execution. + /// + [FieldOffset(24)] + public VkPipeline Pipeline; + + /// + /// IndirectCommandsLayout is the VkIndirectCommandsLayoutNV that this buffer memory is intended to be used with. + /// + [FieldOffset(32)] + public VkIndirectCommandsLayoutNV IndirectCommandsLayout; + + /// + /// MaxSequencesCount is the maximum number of sequences that this buffer memory in combination with the other state provided can be used with. + /// + [FieldOffset(40)] + public int MaxSequencesCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsPipelineInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsPipelineInfoEXT.gen.cs new file mode 100644 index 0000000..ca64131 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsPipelineInfoEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeneratedCommandsPipelineInfoEXT - Structure specifying a pipeline for use with indirect command preprocessing + /// + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkGeneratedCommandsPipelineInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkPipeline pipeline; + /// } VkGeneratedCommandsPipelineInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkGeneratedCommandsPipelineInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeneratedCommandsPipelineInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Pipeline is a valid pipeline object. + /// + [FieldOffset(16)] + public VkPipeline Pipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsShaderInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsShaderInfoEXT.gen.cs new file mode 100644 index 0000000..095fc28 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeneratedCommandsShaderInfoEXT.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeneratedCommandsShaderInfoEXT - Structure specifying shader objects for use with indirect command preprocessing + /// + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkGeneratedCommandsShaderInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t shaderCount; + /// const VkShaderEXT* pShaders; + /// } VkGeneratedCommandsShaderInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkGeneratedCommandsShaderInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeneratedCommandsShaderInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderCount is the size of the pShaders array. + /// + [FieldOffset(16)] + public int ShaderCount; + + /// + /// Shaders is a pointer to an array of shader objects. + /// + [FieldOffset(24)] + public VkShaderEXT* Shaders; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeometryAabbNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeometryAabbNV.gen.cs new file mode 100644 index 0000000..626bc7b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeometryAabbNV.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryAABBNV - Structure specifying axis-aligned bounding box geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkGeometryAABBNV + /// + /// + /// The VkGeometryAABBNV structure specifies axis-aligned bounding box + /// geometry in a bottom-level acceleration structure, and is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkGeometryAABBNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer aabbData; + /// uint32_t numAABBs; + /// uint32_t stride; + /// VkDeviceSize offset; + /// } VkGeometryAABBNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkGeometryAabbNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeometryAabbNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AabbData is the buffer containing axis-aligned bounding box data. + /// + [FieldOffset(16)] + public VkBuffer AabbData; + + /// + /// NumAABBs is the number of AABBs in this geometry. + /// + [FieldOffset(24)] + public int NumAABBs; + + /// + /// Stride is the stride in bytes between AABBs in aabbData. + /// + [FieldOffset(28)] + public int Stride; + + /// + /// Offset is the offset in bytes of the first AABB in aabbData. + /// + [FieldOffset(32)] + public ByteSize64 Offset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeometryDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeometryDataNV.gen.cs new file mode 100644 index 0000000..159e321 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeometryDataNV.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryDataNV - Structure specifying geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkGeometryDataNV + /// + /// + /// The VkGeometryDataNV structure specifies geometry in a bottom-level + /// acceleration structure and is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkGeometryDataNV { + /// VkGeometryTrianglesNV triangles; + /// VkGeometryAABBNV aabbs; + /// } VkGeometryDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public partial struct VkGeometryDataNV() + { + /// + /// Triangles contains triangle data if VkGeometryNV::geometryType is VK_GEOMETRY_TYPE_TRIANGLES_NV. + /// + [FieldOffset(0)] + public VkGeometryTrianglesNV Triangles; + + /// + /// Aabbs contains axis-aligned bounding box data if VkGeometryNV::geometryType is VK_GEOMETRY_TYPE_AABBS_NV. + /// + [FieldOffset(96)] + public VkGeometryAabbNV Aabbs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeometryNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeometryNV.gen.cs new file mode 100644 index 0000000..a3cec85 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeometryNV.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryNV - Structure specifying a geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkGeometryNV + /// + /// + /// The VkGeometryNV structure describes geometry in a bottom-level + /// acceleration structure and is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkGeometryNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkGeometryTypeKHR geometryType; + /// VkGeometryDataNV geometry; + /// VkGeometryFlagsKHR flags; + /// } VkGeometryNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 168)] + public unsafe partial struct VkGeometryNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeometryNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GeometryType specifies the VkGeometryTypeKHR which this geometry refers to. + /// + [FieldOffset(16)] + public VkGeometryTypeKHR GeometryType; + + /// + /// Geometry contains the geometry data as described in VkGeometryDataNV. + /// + [FieldOffset(24)] + public VkGeometryDataNV Geometry; + + /// + /// Flags has VkGeometryFlagsKHR describing options for this geometry. + /// + [FieldOffset(160)] + public VkGeometryFlagsKHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGeometryTrianglesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGeometryTrianglesNV.gen.cs new file mode 100644 index 0000000..c1f05f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGeometryTrianglesNV.gen.cs @@ -0,0 +1,114 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGeometryTrianglesNV - Structure specifying a triangle geometry in a bottom-level acceleration structure + /// + /// + /// + /// :refpage: VkGeometryTrianglesNV + /// + /// + /// The VkGeometryTrianglesNV structure specifies triangle geometry in a + /// bottom-level acceleration structure and is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkGeometryTrianglesNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBuffer vertexData; + /// VkDeviceSize vertexOffset; + /// uint32_t vertexCount; + /// VkDeviceSize vertexStride; + /// VkFormat vertexFormat; + /// VkBuffer indexData; + /// VkDeviceSize indexOffset; + /// uint32_t indexCount; + /// VkIndexType indexType; + /// VkBuffer transformData; + /// VkDeviceSize transformOffset; + /// } VkGeometryTrianglesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkGeometryTrianglesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GeometryTrianglesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexData is the buffer containing vertex data for this geometry. + /// + [FieldOffset(16)] + public VkBuffer VertexData; + + /// + /// VertexOffset is the offset in bytes within vertexData containing vertex data for this geometry. + /// + [FieldOffset(24)] + public ByteSize64 VertexOffset; + + /// + /// VertexCount is the number of valid vertices. + /// + [FieldOffset(32)] + public int VertexCount; + + /// + /// VertexStride is the stride in bytes between each vertex. + /// + [FieldOffset(40)] + public ByteSize64 VertexStride; + + /// + /// VertexFormat is a VkFormat describing the format of each vertex element. + /// + [FieldOffset(48)] + public VkFormat VertexFormat; + + /// + /// IndexData is the buffer containing index data for this geometry. + /// + [FieldOffset(56)] + public VkBuffer IndexData; + + /// + /// IndexOffset is the offset in bytes within indexData containing index data for this geometry. + /// + [FieldOffset(64)] + public ByteSize64 IndexOffset; + + /// + /// IndexCount is the number of indices to include in this geometry. + /// + [FieldOffset(72)] + public int IndexCount; + + /// + /// IndexType is a VkIndexType describing the format of each index. + /// + [FieldOffset(76)] + public VkIndexType IndexType; + + /// + /// TransformData is an optional buffer containing an VkTransformMatrixNV structure defining a transformation to be applied to this geometry. + /// + [FieldOffset(80)] + public VkBuffer TransformData; + + /// + /// TransformOffset is the offset in bytes in transformData of the transform information described above. + /// + [FieldOffset(88)] + public ByteSize64 TransformOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGetLatencyMarkerInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGetLatencyMarkerInfoNV.gen.cs new file mode 100644 index 0000000..87da44e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGetLatencyMarkerInfoNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGetLatencyMarkerInfoNV - Structure specifying the parameters of vkGetLatencyTimingsNV + /// + /// + /// + /// The VkGetLatencyMarkerInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkGetLatencyMarkerInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t timingCount; + /// VkLatencyTimingsFrameReportNV* pTimings; + /// } VkGetLatencyMarkerInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkGetLatencyMarkerInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GetLatencyMarkerInfoNV; + + /// + /// Next is either `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TimingCount is an integer related to the number of previous frames of latency data available or queried, as described below. + /// + [FieldOffset(16)] + public int TimingCount; + + /// + /// Timings is either `NULL` or a pointer to an array of VkLatencyTimingsFrameReportNV structures. + /// + [FieldOffset(24)] + public VkLatencyTimingsFrameReportNV* Timings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGpaDeviceClockModeInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGpaDeviceClockModeInfoAMD.gen.cs new file mode 100644 index 0000000..2b31d9e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGpaDeviceClockModeInfoAMD.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaDeviceClockModeInfoAMD - Structure containing returned clock ratios or clock mode to set + /// + /// + /// + /// :refpage: VkGpaDeviceClockModeInfoAMD + /// + /// + /// The VkGpaDeviceClockModeInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkGpaDeviceClockModeInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkGpaDeviceClockModeAMD clockMode; + /// float memoryClockRatioToPeak; + /// float engineClockRatioToPeak; + /// } VkGpaDeviceClockModeInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkGpaDeviceClockModeInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GpaDeviceClockModeInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ClockMode is a enum:VkGpaDeviceClockModeAMD value specify which clock mode to set, or whether to query the current clocks. + /// + [FieldOffset(16)] + public VkGpaDeviceClockModeAMD ClockMode; + + /// + /// MemoryClockRatioToPeak is the returned ratio of the current memory clock to the maximum memory clock, if clockMode is VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD. + /// + [FieldOffset(20)] + public float MemoryClockRatioToPeak; + + /// + /// EngineClockRatioToPeak is the returned ratio of the current engine clock to the maximum engine clock, if clockMode is VK_GPA_DEVICE_CLOCK_MODE_QUERY_AMD. + /// + [FieldOffset(24)] + public float EngineClockRatioToPeak; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGpaDeviceGetClockInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGpaDeviceGetClockInfoAMD.gen.cs new file mode 100644 index 0000000..0d377c7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGpaDeviceGetClockInfoAMD.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaDeviceGetClockInfoAMD - Structure containing returned clock ratios or clock mode to set + /// + /// + /// + /// :refpage: VkGpaDeviceGetClockInfoAMD + /// + /// + /// The VkGpaDeviceGetClockInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkGpaDeviceGetClockInfoAMD { + /// VkStructureType sType; + /// void* pNext; + /// float memoryClockRatioToPeak; + /// float engineClockRatioToPeak; + /// uint32_t memoryClockFrequency; + /// uint32_t engineClockFrequency; + /// } VkGpaDeviceGetClockInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkGpaDeviceGetClockInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GpaDeviceGetClockInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryClockRatioToPeak is the returned ratio of the current memory clock to the maximum memory clock. + /// + [FieldOffset(16)] + public float MemoryClockRatioToPeak; + + /// + /// EngineClockRatioToPeak is the returned ratio of the current engine clock to the maximum engine clock. + /// + [FieldOffset(20)] + public float EngineClockRatioToPeak; + + /// + /// MemoryClockFrequency is the current memory clock frequency in MHz. + /// + [FieldOffset(24)] + public int MemoryClockFrequency; + + /// + /// EngineClockFrequency is the current engine clock frequency in MHz. + /// + [FieldOffset(28)] + public int EngineClockFrequency; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGpaPerfBlockPropertiesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGpaPerfBlockPropertiesAMD.gen.cs new file mode 100644 index 0000000..659e80a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGpaPerfBlockPropertiesAMD.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaPerfBlockPropertiesAMD - Structure describing GPU performance API block properties for a physical device + /// + /// + /// + /// The VkGpaPerfBlockPropertiesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkGpaPerfBlockPropertiesAMD { + /// VkGpaPerfBlockAMD blockType; + /// VkGpaPerfBlockPropertiesFlagsAMD flags; + /// uint32_t instanceCount; + /// uint32_t maxEventID; + /// uint32_t maxGlobalOnlyCounters; + /// uint32_t maxGlobalSharedCounters; + /// uint32_t maxStreamingCounters; + /// } VkGpaPerfBlockPropertiesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct VkGpaPerfBlockPropertiesAMD() + { + /// + /// BlockType + /// + [FieldOffset(0)] + public VkGpaPerfBlockAMD BlockType; + + /// + /// Flags + /// + [FieldOffset(4)] + public VkGpaPerfBlockPropertiesFlagsAMD Flags; + + /// + /// InstanceCount + /// + [FieldOffset(8)] + public int InstanceCount; + + /// + /// MaxEventID + /// + [FieldOffset(12)] + public int MaxEventID; + + /// + /// MaxGlobalOnlyCounters + /// + [FieldOffset(16)] + public int MaxGlobalOnlyCounters; + + /// + /// MaxGlobalSharedCounters + /// + [FieldOffset(20)] + public int MaxGlobalSharedCounters; + + /// + /// MaxStreamingCounters + /// + [FieldOffset(24)] + public int MaxStreamingCounters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGpaPerfCounterAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGpaPerfCounterAMD.gen.cs new file mode 100644 index 0000000..d0562bb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGpaPerfCounterAMD.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaPerfCounterAMD - Structure specifying parameters of a GPA sample + /// + /// + /// + /// The VkGpaPerfCounterAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkGpaPerfCounterAMD { + /// VkGpaPerfBlockAMD blockType; + /// uint32_t blockInstance; + /// uint32_t eventID; + /// } VkGpaPerfCounterAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkGpaPerfCounterAMD() + { + /// + /// BlockType is a VkGpaPerfBlockAMD value specifying the GPU block type to sample. + /// + [FieldOffset(0)] + public VkGpaPerfBlockAMD BlockType; + + /// + /// BlockInstance is a value specifying which instance of the GPU block to sample. + /// + [FieldOffset(4)] + public int BlockInstance; + + /// + /// EventID is a value specifying the hardware-specific identifier of the performance counter to sample. + /// + [FieldOffset(8)] + public int EventID; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGpaSampleBeginInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGpaSampleBeginInfoAMD.gen.cs new file mode 100644 index 0000000..363d975 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGpaSampleBeginInfoAMD.gen.cs @@ -0,0 +1,131 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaSampleBeginInfoAMD - Structure specifying parameters of a GPA sample + /// + /// + /// + /// The VkGpaSampleBeginInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkGpaSampleBeginInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkGpaSampleTypeAMD sampleType; + /// VkBool32 sampleInternalOperations; + /// VkBool32 cacheFlushOnCounterCollection; + /// VkBool32 sqShaderMaskEnable; + /// VkGpaSqShaderStageFlagsAMD sqShaderMask; + /// uint32_t perfCounterCount; + /// const VkGpaPerfCounterAMD* pPerfCounters; + /// uint32_t streamingPerfTraceSampleInterval; + /// VkDeviceSize perfCounterDeviceMemoryLimit; + /// VkBool32 sqThreadTraceEnable; + /// VkBool32 sqThreadTraceSuppressInstructionTokens; + /// VkDeviceSize sqThreadTraceDeviceMemoryLimit; + /// VkPipelineStageFlags timingPreSample; + /// VkPipelineStageFlags timingPostSample; + /// } VkGpaSampleBeginInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkGpaSampleBeginInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GpaSampleBeginInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SampleType is a VkGpaSampleTypeAMD value specifying the type of sample. + /// + [FieldOffset(16)] + public VkGpaSampleTypeAMD SampleType; + + /// + /// SampleInternalOperations is a boolean indicating whether internal driver operations are included in the results. + /// + [FieldOffset(20)] + public Brutal.Bool32 SampleInternalOperations; + + /// + /// CacheFlushOnCounterCollection is a boolean indicating whether the driver should insert cache flush and invalidate events before and after every sample. + /// + [FieldOffset(24)] + public Brutal.Bool32 CacheFlushOnCounterCollection; + + /// + /// SqShaderMaskEnable is a boolean indicating whether sqShaderMask specifies the shader stages to sample. If VK_FALSE, all shader stages are sampled. + /// + [FieldOffset(28)] + public Brutal.Bool32 SqShaderMaskEnable; + + /// + /// SqShaderMask is a bitmask of VkGpaSqShaderStageFlagsAMD values specifying which shader stages to sample. Shader stage bits that are not relevant to the specific device are ignored. + /// + [FieldOffset(32)] + public VkGpaSqShaderStageFlagsAMD SqShaderMask; + + /// + /// PerfCounterCount is the number of counters in the pPerfCounters array + /// + [FieldOffset(36)] + public int PerfCounterCount; + + /// + /// PerfCounters is a pointer to an array of VkGpaPerfCounterAMD structures specifying the counters to be sampled. If sampleType is VK_GPA_SAMPLE_TYPE_CUMULATIVE_AMD pPerfCounters specifies the counters that are sampled at the beginning and at end of the sample period. If sampleType is VK_GPA_SAMPLE_TYPE_TRACE_AMD then the SPM data will be added to the samples RGP data blob. + /// + [FieldOffset(40)] + public VkGpaPerfCounterAMD* PerfCounters; + + /// + /// StreamingPerfTraceSampleInterval is a value specifying the period for SPM samples in cycles, and is ignored if sampleType is not VK_GPA_SAMPLE_TYPE_TRACE_AMD. + /// + [FieldOffset(48)] + public int StreamingPerfTraceSampleInterval; + + /// + /// PerfCounterDeviceMemoryLimit is a value specifying the maximum amount of GPU memory that this sample can allocate for SPM data. If sampleType is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored. + /// + [FieldOffset(56)] + public ByteSize64 PerfCounterDeviceMemoryLimit; + + /// + /// SqThreadTraceEnable is a boolean specifying whether SQTT data should be included. If sampleType is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored. + /// + [FieldOffset(64)] + public Brutal.Bool32 SqThreadTraceEnable; + + /// + /// SqThreadTraceSuppressInstructionTokens is a boolean specifying whether instruction-level SQTT tokens should be captured. If VK_FALSE, the amount of sample data is significantly reduced. If sampleType is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored. + /// + [FieldOffset(68)] + public Brutal.Bool32 SqThreadTraceSuppressInstructionTokens; + + /// + /// SqThreadTraceDeviceMemoryLimit is a value specifying the maximum amount of GPU memory in bytes that this sample can allocate for the SQTT buffer. If `0`, the maximum size to prevent dropping tokens towards the end of the sample is allocated. If sampleType is not VK_GPA_SAMPLE_TYPE_TRACE_AMD this value is ignored. + /// + [FieldOffset(72)] + public ByteSize64 SqThreadTraceDeviceMemoryLimit; + + /// + /// TimingPreSample is a VkPipelineStageFlags2 mask of pipeline stages specifying where the begin timestamp should take place. If sampleType is not VK_GPA_SAMPLE_TYPE_TIMING_AMD this value is ignored. + /// + [FieldOffset(80)] + public VkPipelineStageFlags TimingPreSample; + + /// + /// TimingPostSample is a VkPipelineStageFlags2 mask of pipeline stages specifying where the end timestamp should take place. If sampleType is not VK_GPA_SAMPLE_TYPE_TIMING_AMD this value is ignored. + /// + [FieldOffset(84)] + public VkPipelineStageFlags TimingPostSample; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGpaSessionCreateInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGpaSessionCreateInfoAMD.gen.cs new file mode 100644 index 0000000..5ba05a8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGpaSessionCreateInfoAMD.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGpaSessionCreateInfoAMD - Structure specifying parameters of a newly created GPA session + /// + /// + /// + /// The VkGpaSessionCreateInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkGpaSessionCreateInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkGpaSessionAMD secondaryCopySource; + /// } VkGpaSessionCreateInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkGpaSessionCreateInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GpaSessionCreateInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SecondaryCopySource is a VkGpaSessionAMD handle whose results can be copied into this session. + /// + [FieldOffset(16)] + public VkGpaSessionAMD SecondaryCopySource; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineCreateInfo.gen.cs new file mode 100644 index 0000000..7a045a9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineCreateInfo.gen.cs @@ -0,0 +1,155 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGraphicsPipelineCreateInfo - Structure specifying parameters of a newly created graphics pipeline + /// + /// + /// + /// :refpage: VkGraphicsPipelineCreateInfo + /// + /// + /// The VkGraphicsPipelineCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkGraphicsPipelineCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreateFlags flags; + /// uint32_t stageCount; + /// const VkPipelineShaderStageCreateInfo* pStages; + /// const VkPipelineVertexInputStateCreateInfo* pVertexInputState; + /// const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState; + /// const VkPipelineTessellationStateCreateInfo* pTessellationState; + /// const VkPipelineViewportStateCreateInfo* pViewportState; + /// const VkPipelineRasterizationStateCreateInfo* pRasterizationState; + /// const VkPipelineMultisampleStateCreateInfo* pMultisampleState; + /// const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState; + /// const VkPipelineColorBlendStateCreateInfo* pColorBlendState; + /// const VkPipelineDynamicStateCreateInfo* pDynamicState; + /// VkPipelineLayout layout; + /// VkRenderPass renderPass; + /// uint32_t subpass; + /// VkPipeline basePipelineHandle; + /// int32_t basePipelineIndex; + /// } VkGraphicsPipelineCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 144)] + public unsafe partial struct VkGraphicsPipelineCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GraphicsPipelineCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineCreateFlags specifying how the pipeline will be generated. + /// + [FieldOffset(16)] + public VkPipelineCreateFlags Flags; + + /// + /// StageCount is the number of entries in the pStages array. + /// + [FieldOffset(20)] + public int StageCount; + + /// + /// Stages is a pointer to an array of stageCount VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the graphics pipeline. + /// + [FieldOffset(24)] + public VkPipelineShaderStageCreateInfo* Stages; + + /// + /// VertexInputState is a pointer to a VkPipelineVertexInputStateCreateInfo structure. + /// + [FieldOffset(32)] + public VkPipelineVertexInputStateCreateInfo* VertexInputState; + + /// + /// InputAssemblyState is a pointer to a VkPipelineInputAssemblyStateCreateInfo structure which determines input assembly behavior for vertex shading, as described in Drawing Commands^. + /// + [FieldOffset(40)] + public VkPipelineInputAssemblyStateCreateInfo* InputAssemblyState; + + /// + /// TessellationState is a pointer to a VkPipelineTessellationStateCreateInfo structure defining tessellation state used by tessellation shaders. + /// + [FieldOffset(48)] + public VkPipelineTessellationStateCreateInfo* TessellationState; + + /// + /// ViewportState is a pointer to a VkPipelineViewportStateCreateInfo structure defining viewport state used when rasterization is enabled. + /// + [FieldOffset(56)] + public VkPipelineViewportStateCreateInfo* ViewportState; + + /// + /// RasterizationState is a pointer to a VkPipelineRasterizationStateCreateInfo structure defining rasterization state. + /// + [FieldOffset(64)] + public VkPipelineRasterizationStateCreateInfo* RasterizationState; + + /// + /// MultisampleState is a pointer to a VkPipelineMultisampleStateCreateInfo structure defining multisample state used when rasterization is enabled. + /// + [FieldOffset(72)] + public VkPipelineMultisampleStateCreateInfo* MultisampleState; + + /// + /// DepthStencilState is a pointer to a VkPipelineDepthStencilStateCreateInfo structure defining depth/stencil state used when rasterization is enabled for depth or stencil attachments accessed during rendering. + /// + [FieldOffset(80)] + public VkPipelineDepthStencilStateCreateInfo* DepthStencilState; + + /// + /// ColorBlendState is a pointer to a VkPipelineColorBlendStateCreateInfo structure defining color blend state used when rasterization is enabled for any color attachments accessed during rendering. + /// + [FieldOffset(88)] + public VkPipelineColorBlendStateCreateInfo* ColorBlendState; + + /// + /// DynamicState is a pointer to a VkPipelineDynamicStateCreateInfo structure defining which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state. This can be `NULL`, which means no state in the pipeline is considered dynamic. + /// + [FieldOffset(96)] + public VkPipelineDynamicStateCreateInfo* DynamicState; + + /// + /// Layout is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. + /// + [FieldOffset(104)] + public VkPipelineLayout Layout; + + /// + /// RenderPass is a handle to a render pass object describing the environment in which the pipeline will be used. The pipeline must only be used with a render pass instance compatible with the one provided. See Render Pass Compatibility^ for more information. The implementation must not access this object outside of the duration of the command this structure is passed to. + /// + [FieldOffset(112)] + public VkRenderPass RenderPass; + + /// + /// Subpass is the index of the subpass in the render pass where this pipeline will be used. + /// + [FieldOffset(120)] + public int Subpass; + + /// + /// BasePipelineHandle is a pipeline to derive from. + /// + [FieldOffset(128)] + public VkPipeline BasePipelineHandle; + + /// + /// BasePipelineIndex is an index into the pCreateInfos parameter to use as a pipeline to derive from. + /// + [FieldOffset(136)] + public int BasePipelineIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineLibraryCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineLibraryCreateInfoEXT.gen.cs new file mode 100644 index 0000000..86321cd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineLibraryCreateInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGraphicsPipelineLibraryCreateInfoEXT - Structure specifying the subsets of the graphics pipeline being compiled + /// + /// + /// + /// The VkGraphicsPipelineLibraryCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_graphics_pipeline_library + /// typedef struct VkGraphicsPipelineLibraryCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkGraphicsPipelineLibraryFlagsEXT flags; + /// } VkGraphicsPipelineLibraryCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkGraphicsPipelineLibraryCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GraphicsPipelineLibraryCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkGraphicsPipelineLibraryFlagsEXT specifying the subsets of the graphics pipeline that are being compiled. + /// + [FieldOffset(16)] + public VkGraphicsPipelineLibraryFlagsEXT Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.gen.cs new file mode 100644 index 0000000..d884717 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGraphicsPipelineShaderGroupsCreateInfoNV - Structure specifying parameters of a newly created multi shader group pipeline + /// + /// + /// + /// The VkGraphicsPipelineShaderGroupsCreateInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkGraphicsPipelineShaderGroupsCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t groupCount; + /// const VkGraphicsShaderGroupCreateInfoNV* pGroups; + /// uint32_t pipelineCount; + /// const VkPipeline* pPipelines; + /// } VkGraphicsPipelineShaderGroupsCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkGraphicsPipelineShaderGroupsCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GraphicsPipelineShaderGroupsCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GroupCount is the number of elements in the pGroups array. + /// + [FieldOffset(16)] + public int GroupCount; + + /// + /// Groups is a pointer to an array of VkGraphicsShaderGroupCreateInfoNV structures specifying which state of the original VkGraphicsPipelineCreateInfo each shader group overrides. + /// + [FieldOffset(24)] + public VkGraphicsShaderGroupCreateInfoNV* Groups; + + /// + /// PipelineCount is the number of elements in the pPipelines array. + /// + [FieldOffset(32)] + public int PipelineCount; + + /// + /// Pipelines is a pointer to an array of graphics VkPipeline structures which are referenced within the created pipeline, including all their shader groups. + /// + [FieldOffset(40)] + public VkPipeline* Pipelines; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkGraphicsShaderGroupCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkGraphicsShaderGroupCreateInfoNV.gen.cs new file mode 100644 index 0000000..6cac970 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkGraphicsShaderGroupCreateInfoNV.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkGraphicsShaderGroupCreateInfoNV - Structure specifying override parameters for each shader group + /// + /// + /// + /// The VkGraphicsShaderGroupCreateInfoNV structure provides the state + /// overrides for each shader group. + /// Each shader group behaves like a pipeline that was created from its state as + /// well as the remaining parent's state. + /// It is defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkGraphicsShaderGroupCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stageCount; + /// const VkPipelineShaderStageCreateInfo* pStages; + /// const VkPipelineVertexInputStateCreateInfo* pVertexInputState; + /// const VkPipelineTessellationStateCreateInfo* pTessellationState; + /// } VkGraphicsShaderGroupCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkGraphicsShaderGroupCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.GraphicsShaderGroupCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StageCount is the number of entries in the pStages array. + /// + [FieldOffset(16)] + public int StageCount; + + /// + /// Stages is a pointer to an array VkPipelineShaderStageCreateInfo structures specifying the set of the shader stages to be included in this shader group. + /// + [FieldOffset(24)] + public VkPipelineShaderStageCreateInfo* Stages; + + /// + /// VertexInputState is a pointer to a VkPipelineVertexInputStateCreateInfo structure. + /// + [FieldOffset(32)] + public VkPipelineVertexInputStateCreateInfo* VertexInputState; + + /// + /// TessellationState is a pointer to a VkPipelineTessellationStateCreateInfo structure, and is ignored if the shader group does not include a tessellation control shader stage and tessellation evaluation shader stage. + /// + [FieldOffset(40)] + public VkPipelineTessellationStateCreateInfo* TessellationState; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHdrMetadataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHdrMetadataEXT.gen.cs new file mode 100644 index 0000000..07914a3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHdrMetadataEXT.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHdrMetadataEXT - Specify HDR metadata + /// + /// + /// + /// The VkHdrMetadataEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_hdr_metadata + /// typedef struct VkHdrMetadataEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkXYColorEXT displayPrimaryRed; + /// VkXYColorEXT displayPrimaryGreen; + /// VkXYColorEXT displayPrimaryBlue; + /// VkXYColorEXT whitePoint; + /// float maxLuminance; + /// float minLuminance; + /// float maxContentLightLevel; + /// float maxFrameAverageLightLevel; + /// } VkHdrMetadataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkHdrMetadataEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.HdrMetadataEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisplayPrimaryRed is a VkXYColorEXT structure specifying the red primary of the display used to optimize the content + /// + [FieldOffset(16)] + public VkXYColorEXT DisplayPrimaryRed; + + /// + /// DisplayPrimaryGreen is a VkXYColorEXT structure specifying the green primary of the display used to optimize the content + /// + [FieldOffset(24)] + public VkXYColorEXT DisplayPrimaryGreen; + + /// + /// DisplayPrimaryBlue is a VkXYColorEXT structure specifying the blue primary of the display used to optimize the content + /// + [FieldOffset(32)] + public VkXYColorEXT DisplayPrimaryBlue; + + /// + /// WhitePoint is a VkXYColorEXT structure specifying the white-point of the display used to optimize the content + /// + [FieldOffset(40)] + public VkXYColorEXT WhitePoint; + + /// + /// MaxLuminance is the maximum luminance of the display used to optimize the content in nits + /// + [FieldOffset(48)] + public float MaxLuminance; + + /// + /// MinLuminance is the minimum luminance of the display used to optimize the content in nits + /// + [FieldOffset(52)] + public float MinLuminance; + + /// + /// MaxContentLightLevel is the value in nits of the desired luminance for the brightest pixels in the displayed image. + /// + [FieldOffset(56)] + public float MaxContentLightLevel; + + /// + /// MaxFrameAverageLightLevel is the value in nits of the average luminance of the frame which has the brightest average luminance anywhere in the content. + /// + [FieldOffset(60)] + public float MaxFrameAverageLightLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHdrVividDynamicMetadataHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHdrVividDynamicMetadataHUAWEI.gen.cs new file mode 100644 index 0000000..dce720d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHdrVividDynamicMetadataHUAWEI.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHdrVividDynamicMetadataHUAWEI - specify HDR Vivid dynamic metadata + /// + /// + /// + /// When hdrVivid^ feature is enabled, HDR Vivid + /// dynamic metadata can be set to control the reproduction of content by + /// including the VkHdrVividDynamicMetadataHUAWEI in the pNext chain + /// of VkHdrMetadataEXT. + /// + /// + /// The VkHdrVividDynamicMetadataHUAWEI structure is defined as: + /// + /// + /// // Provided by VK_HUAWEI_hdr_vivid + /// typedef struct VkHdrVividDynamicMetadataHUAWEI { + /// VkStructureType sType; + /// const void* pNext; + /// size_t dynamicMetadataSize; + /// const void* pDynamicMetadata; + /// } VkHdrVividDynamicMetadataHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkHdrVividDynamicMetadataHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.HdrVividDynamicMetadataHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DynamicMetadataSize is the size in bytes of the dynamic metadata. + /// + [FieldOffset(16)] + public nuint DynamicMetadataSize; + + /// + /// DynamicMetadata is a pointer to the dynamic metadata. + /// + [FieldOffset(24)] + public void* DynamicMetadata; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHeadlessSurfaceCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHeadlessSurfaceCreateInfoEXT.gen.cs new file mode 100644 index 0000000..d76014c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHeadlessSurfaceCreateInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHeadlessSurfaceCreateInfoEXT - Structure specifying parameters of a newly created headless surface object + /// + /// + /// + /// The VkHeadlessSurfaceCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_headless_surface + /// typedef struct VkHeadlessSurfaceCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkHeadlessSurfaceCreateFlagsEXT flags; + /// } VkHeadlessSurfaceCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkHeadlessSurfaceCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.HeadlessSurfaceCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkHeadlessSurfaceCreateFlagsEXT Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHostAddressRangeConstEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHostAddressRangeConstEXT.gen.cs new file mode 100644 index 0000000..029d1d3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHostAddressRangeConstEXT.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHostAddressRangeConstEXT - Structure specifying a constant host address range + /// + /// + /// + /// A constant host address range indicates a range of host memory that cannot + /// be altered. + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkHostAddressRangeConstEXT { + /// const void* address; + /// size_t size; + /// } VkHostAddressRangeConstEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkHostAddressRangeConstEXT() + { + /// + /// Address is a read-only host memory address. + /// + [FieldOffset(0)] + public void* Address; + + /// + /// Size is the size of the range. + /// + [FieldOffset(8)] + public nuint Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHostAddressRangeEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHostAddressRangeEXT.gen.cs new file mode 100644 index 0000000..65915bd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHostAddressRangeEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHostAddressRangeEXT - Structure specifying a host address range + /// + /// + /// + /// A host address range indicates a range of host memory. + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkHostAddressRangeEXT { + /// void* address; + /// size_t size; + /// } VkHostAddressRangeEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkHostAddressRangeEXT() + { + /// + /// Address is a host memory address. + /// + [FieldOffset(0)] + public void* Address; + + /// + /// Size is the size of the range. + /// + [FieldOffset(8)] + public nuint Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHostImageCopyDevicePerformanceQuery.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHostImageCopyDevicePerformanceQuery.gen.cs new file mode 100644 index 0000000..083c872 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHostImageCopyDevicePerformanceQuery.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHostImageCopyDevicePerformanceQuery - Struct containing information about optimality of device access + /// + /// + /// + /// To query if using VK_IMAGE_USAGE_HOST_TRANSFER_BIT has a negative + /// impact on device performance when accessing an image, add + /// VK_IMAGE_USAGE_HOST_TRANSFER_BIT to + /// VkPhysicalDeviceImageFormatInfo2::usage, and add a + /// VkHostImageCopyDevicePerformanceQuery structure to the pNext + /// chain of a VkImageFormatProperties2 structure passed to + /// vkGetPhysicalDeviceImageFormatProperties2. + /// This structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkHostImageCopyDevicePerformanceQuery { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 optimalDeviceAccess; + /// VkBool32 identicalMemoryLayout; + /// } VkHostImageCopyDevicePerformanceQuery; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkHostImageCopyDevicePerformanceQuery() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.HostImageCopyDevicePerformanceQuery; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OptimalDeviceAccess returns VK_TRUE if use of host image copy has no adverse effect on device access performance, compared to an image that is created with exact same creation parameters, and bound to the same VkDeviceMemory, except that the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag is replaced with VK_IMAGE_USAGE_TRANSFER_SRC_BIT and VK_IMAGE_USAGE_TRANSFER_DST_BIT. + /// + [FieldOffset(16)] + public Brutal.Bool32 OptimalDeviceAccess; + + /// + /// IdenticalMemoryLayout returns VK_TRUE if use of host image copy has no impact on memory layout compared to an image that is created with exact same creation parameters, and bound to the same VkDeviceMemory, except that the VK_IMAGE_USAGE_HOST_TRANSFER_BIT usage flag is replaced with VK_IMAGE_USAGE_TRANSFER_SRC_BIT and VK_IMAGE_USAGE_TRANSFER_DST_BIT. + /// + [FieldOffset(20)] + public Brutal.Bool32 IdenticalMemoryLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkHostImageLayoutTransitionInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkHostImageLayoutTransitionInfo.gen.cs new file mode 100644 index 0000000..ee61d43 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkHostImageLayoutTransitionInfo.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkHostImageLayoutTransitionInfo - Structure specifying the parameters of a host-side image layout transition + /// + /// + /// + /// :refpage: VkHostImageLayoutTransitionInfo + /// + /// + /// The VkHostImageLayoutTransitionInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkHostImageLayoutTransitionInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// VkImageLayout oldLayout; + /// VkImageLayout newLayout; + /// VkImageSubresourceRange subresourceRange; + /// } VkHostImageLayoutTransitionInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkHostImageLayoutTransitionInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.HostImageLayoutTransitionInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is a handle to the image affected by this layout transition. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// OldLayout is the old layout in an image layout transition^. + /// + [FieldOffset(24)] + public VkImageLayout OldLayout; + + /// + /// NewLayout is the new layout in an image layout transition^. + /// + [FieldOffset(28)] + public VkImageLayout NewLayout; + + /// + /// SubresourceRange describes the image subresource range^ within image that is affected by this layout transition. + /// + [FieldOffset(32)] + public VkImageSubresourceRange SubresourceRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageAlignmentControlCreateInfoMESA.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageAlignmentControlCreateInfoMESA.gen.cs new file mode 100644 index 0000000..b3081fe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageAlignmentControlCreateInfoMESA.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageAlignmentControlCreateInfoMESA - Specify image alignment + /// + /// + /// + /// If the pNext list of VkImageCreateInfo includes a + /// VkImageAlignmentControlCreateInfoMESA structure, then that structure + /// describes desired alignment for this image. + /// + /// + /// The VkImageAlignmentControlCreateInfoMESA structure is defined as: + /// + /// + /// // Provided by VK_MESA_image_alignment_control + /// typedef struct VkImageAlignmentControlCreateInfoMESA { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maximumRequestedAlignment; + /// } VkImageAlignmentControlCreateInfoMESA; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageAlignmentControlCreateInfoMESA() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageAlignmentControlCreateInfoMESA; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaximumRequestedAlignment specifies the maximum alignment for the image. + /// + [FieldOffset(16)] + public int MaximumRequestedAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageBlit.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageBlit.gen.cs new file mode 100644 index 0000000..8d783b5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageBlit.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageBlit - Structure specifying an image blit operation + /// + /// + /// + /// :refpage: VkImageBlit + /// + /// + /// The VkImageBlit structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageBlit { + /// VkImageSubresourceLayers srcSubresource; + /// VkOffset3D srcOffsets[2]; + /// VkImageSubresourceLayers dstSubresource; + /// VkOffset3D dstOffsets[2]; + /// } VkImageBlit; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public partial struct VkImageBlit() + { + /// + /// SrcSubresource is the subresource to blit from. + /// + [FieldOffset(0)] + public VkImageSubresourceLayers SrcSubresource; + + /// + /// SrcOffsets is a pointer to an array of two VkOffset3D structures specifying the bounds of the source region within srcSubresource. + /// + [FieldOffset(16)] + public VkOffset3D_2 SrcOffsets; + + /// + /// DstSubresource is the subresource to blit into. + /// + [FieldOffset(40)] + public VkImageSubresourceLayers DstSubresource; + + /// + /// DstOffsets is a pointer to an array of two VkOffset3D structures specifying the bounds of the destination region within dstSubresource. + /// + [FieldOffset(56)] + public VkOffset3D_2 DstOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageBlit2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageBlit2.gen.cs new file mode 100644 index 0000000..614b748 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageBlit2.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageBlit2 - Structure specifying an image blit operation + /// + /// + /// + /// :refpage: VkImageBlit2 + /// + /// + /// The VkImageBlit2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkImageBlit2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageSubresourceLayers srcSubresource; + /// VkOffset3D srcOffsets[2]; + /// VkImageSubresourceLayers dstSubresource; + /// VkOffset3D dstOffsets[2]; + /// } VkImageBlit2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkImageBlit2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageBlit2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcSubresource is the subresource to blit from. + /// + [FieldOffset(16)] + public VkImageSubresourceLayers SrcSubresource; + + /// + /// SrcOffsets is a pointer to an array of two VkOffset3D structures specifying the bounds of the source region within srcSubresource. + /// + [FieldOffset(32)] + public VkOffset3D_2 SrcOffsets; + + /// + /// DstSubresource is the subresource to blit into. + /// + [FieldOffset(56)] + public VkImageSubresourceLayers DstSubresource; + + /// + /// DstOffsets is a pointer to an array of two VkOffset3D structures specifying the bounds of the destination region within dstSubresource. + /// + [FieldOffset(72)] + public VkOffset3D_2 DstOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCaptureDescriptorDataInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCaptureDescriptorDataInfoEXT.gen.cs new file mode 100644 index 0000000..bb0a32d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCaptureDescriptorDataInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCaptureDescriptorDataInfoEXT - Structure specifying an image for descriptor capture + /// + /// + /// + /// Information about the image to get descriptor buffer capture data for is + /// passed in a VkImageCaptureDescriptorDataInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkImageCaptureDescriptorDataInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// } VkImageCaptureDescriptorDataInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageCaptureDescriptorDataInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageCaptureDescriptorDataInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is the VkImage handle of the image to get opaque capture data for. + /// + [FieldOffset(16)] + public VkImage Image; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCompressionControlEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCompressionControlEXT.gen.cs new file mode 100644 index 0000000..6fe4a03 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCompressionControlEXT.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCompressionControlEXT - Specify image compression properties + /// + /// + /// + /// If the pNext list of VkImageCreateInfo includes a + /// VkImageCompressionControlEXT structure, then that structure describes + /// compression controls for this image. + /// + /// + /// The VkImageCompressionControlEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_compression_control + /// typedef struct VkImageCompressionControlEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageCompressionFlagsEXT flags; + /// uint32_t compressionControlPlaneCount; + /// VkImageCompressionFixedRateFlagsEXT* pFixedRateFlags; + /// } VkImageCompressionControlEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImageCompressionControlEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageCompressionControlEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkImageCompressionFlagsEXT describing compression controls for the image. + /// + [FieldOffset(16)] + public VkImageCompressionFlagsEXT Flags; + + /// + /// CompressionControlPlaneCount is the number of entries in the pFixedRateFlags array. + /// + [FieldOffset(20)] + public int CompressionControlPlaneCount; + + /// + /// FixedRateFlags is `NULL` or a pointer to an array of VkImageCompressionFixedRateFlagsEXT bitfields describing allowed fixed-rate compression rates of each image plane. It is ignored if flags does not include VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT. + /// + [FieldOffset(24)] + public VkImageCompressionFixedRateFlagsEXT* FixedRateFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCompressionPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCompressionPropertiesEXT.gen.cs new file mode 100644 index 0000000..429a3cb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCompressionPropertiesEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCompressionPropertiesEXT - Compression properties of an image + /// + /// + /// + /// To query the compression properties of an image, add a + /// VkImageCompressionPropertiesEXT structure to the pNext chain of + /// the VkSubresourceLayout2 structure in a call to + /// vkGetImageSubresourceLayout2. + /// + /// + /// To determine the compression rates that are supported for a given image + /// format, add a VkImageCompressionPropertiesEXT structure to the + /// pNext chain of the VkImageFormatProperties2 structure in a call + /// to vkGetPhysicalDeviceImageFormatProperties2. + /// + /// + /// [NOTE] + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageCompressionPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageCompressionPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageCompressionFlags returns a value describing the compression controls that apply to the image. The value will be either VK_IMAGE_COMPRESSION_DEFAULT_EXT to indicate no fixed-rate compression, VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT to indicate fixed-rate compression, or VK_IMAGE_COMPRESSION_DISABLED_EXT to indicate no compression. + /// + [FieldOffset(16)] + public VkImageCompressionFlagsEXT ImageCompressionFlags; + + /// + /// ImageCompressionFixedRateFlags returns a VkImageCompressionFixedRateFlagsEXT value describing the compression rates that apply to the specified aspect of the image. + /// + [FieldOffset(20)] + public VkImageCompressionFixedRateFlagsEXT ImageCompressionFixedRateFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCopy.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCopy.gen.cs new file mode 100644 index 0000000..b3d95c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCopy.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCopy - Structure specifying an image copy operation + /// + /// + /// + /// :refpage: VkImageCopy + /// + /// + /// The VkImageCopy structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageCopy { + /// VkImageSubresourceLayers srcSubresource; + /// VkOffset3D srcOffset; + /// VkImageSubresourceLayers dstSubresource; + /// VkOffset3D dstOffset; + /// VkExtent3D extent; + /// } VkImageCopy; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 68)] + public partial struct VkImageCopy() + { + /// + /// SrcSubresource and dstSubresource are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively. + /// + [FieldOffset(0)] + public VkImageSubresourceLayers SrcSubresource; + + /// + /// SrcOffset and dstOffset select the initial x, y, and z offsets in texels of the sub-regions of the source and destination image data. + /// + [FieldOffset(16)] + public VkOffset3D SrcOffset; + + /// + /// DstSubresource + /// + [FieldOffset(28)] + public VkImageSubresourceLayers DstSubresource; + + /// + /// DstOffset + /// + [FieldOffset(44)] + public VkOffset3D DstOffset; + + /// + /// Extent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(56)] + public VkExtent3D Extent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCopy2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCopy2.gen.cs new file mode 100644 index 0000000..fcdfcaa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCopy2.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCopy2 - Structure specifying an image copy operation + /// + /// + /// + /// :refpage: VkImageCopy2 + /// + /// + /// The VkImageCopy2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkImageCopy2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageSubresourceLayers srcSubresource; + /// VkOffset3D srcOffset; + /// VkImageSubresourceLayers dstSubresource; + /// VkOffset3D dstOffset; + /// VkExtent3D extent; + /// } VkImageCopy2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkImageCopy2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageCopy2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcSubresource and dstSubresource are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively. + /// + [FieldOffset(16)] + public VkImageSubresourceLayers SrcSubresource; + + /// + /// SrcOffset and dstOffset select the initial x, y, and z offsets in texels of the sub-regions of the source and destination image data. + /// + [FieldOffset(32)] + public VkOffset3D SrcOffset; + + /// + /// DstSubresource + /// + [FieldOffset(44)] + public VkImageSubresourceLayers DstSubresource; + + /// + /// DstOffset + /// + [FieldOffset(60)] + public VkOffset3D DstOffset; + + /// + /// Extent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(72)] + public VkExtent3D Extent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCreateFlags2CreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCreateFlags2CreateInfoKHR.gen.cs new file mode 100644 index 0000000..99ccedc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCreateFlags2CreateInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCreateFlags2CreateInfoKHR - Extended image usage flags + /// + /// + /// + /// The VkImageCreateFlags2CreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// typedef struct VkImageCreateFlags2CreateInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkImageCreateFlags2KHR flags; + /// } VkImageCreateFlags2CreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageCreateFlags2CreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageCreateFlags2CreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkImageCreateFlags2KHR specifying creation flags of the image. + /// + [FieldOffset(16)] + public VkImageCreateFlags2KHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageCreateInfo.gen.cs new file mode 100644 index 0000000..97f2541 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageCreateInfo.gen.cs @@ -0,0 +1,124 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageCreateInfo - Structure specifying the parameters of a newly created image object + /// + /// + /// + /// The VkImageCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageCreateFlags flags; + /// VkImageType imageType; + /// VkFormat format; + /// VkExtent3D extent; + /// uint32_t mipLevels; + /// uint32_t arrayLayers; + /// VkSampleCountFlagBits samples; + /// VkImageTiling tiling; + /// VkImageUsageFlags usage; + /// VkSharingMode sharingMode; + /// uint32_t queueFamilyIndexCount; + /// const uint32_t* pQueueFamilyIndices; + /// VkImageLayout initialLayout; + /// } VkImageCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkImageCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkImageCreateFlags describing additional parameters of the image. + /// + [FieldOffset(16)] + public VkImageCreateFlags Flags; + + /// + /// ImageType is a VkImageType value specifying the basic dimensionality of the image. Layers in array textures do not count as a dimension for the purposes of the image type. + /// + [FieldOffset(20)] + public VkImageType ImageType; + + /// + /// Format is a VkFormat describing the format and type of the texel blocks that will be contained in the image. + /// + [FieldOffset(24)] + public VkFormat Format; + + /// + /// Extent is a VkExtent3D describing the number of texels/pixels in each dimension of the base level. + /// + [FieldOffset(28)] + public VkExtent3D Extent; + + /// + /// MipLevels describes the number of levels of detail available for minified sampling of the image. + /// + [FieldOffset(40)] + public int MipLevels; + + /// + /// ArrayLayers is the number of layers in the image. + /// + [FieldOffset(44)] + public int ArrayLayers; + + /// + /// Samples is a VkSampleCountFlags value specifying the number of samples per texel^. + /// + [FieldOffset(48)] + public VkSampleCountFlags Samples; + + /// + /// Tiling is a VkImageTiling value specifying the tiling arrangement of the texel blocks in memory. + /// + [FieldOffset(52)] + public VkImageTiling Tiling; + + /// + /// Usage is a bitmask of VkImageUsageFlags describing the intended usage of the image. + /// + [FieldOffset(56)] + public VkImageUsageFlags Usage; + + /// + /// SharingMode is a VkSharingMode value specifying the sharing mode of the image when it will be accessed by multiple queue families. + /// + [FieldOffset(60)] + public VkSharingMode SharingMode; + + /// + /// QueueFamilyIndexCount is the number of entries in the pQueueFamilyIndices array. + /// + [FieldOffset(64)] + public int QueueFamilyIndexCount; + + /// + /// QueueFamilyIndices is a pointer to an array of queue families that will access this image. It is ignored if sharingMode is not VK_SHARING_MODE_CONCURRENT. + /// + [FieldOffset(72)] + public int* QueueFamilyIndices; + + /// + /// InitialLayout is a VkImageLayout value specifying the initial VkImageLayout of all image subresources of the image. See Image Layouts^. + /// + [FieldOffset(80)] + public VkImageLayout InitialLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageDescriptorInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageDescriptorInfoEXT.gen.cs new file mode 100644 index 0000000..9edc837 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageDescriptorInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageDescriptorInfoEXT - Structure describing an image descriptor created from an image + /// + /// + /// + /// VkImageDescriptorInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkImageDescriptorInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const VkImageViewCreateInfo* pView; + /// VkImageLayout layout; + /// } VkImageDescriptorInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImageDescriptorInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageDescriptorInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// View is an VkImageViewCreateInfo describing the descriptor. + /// + [FieldOffset(16)] + public VkImageViewCreateInfo* View; + + /// + /// Layout is the VkImageLayout that the image view will be in when accessed as a descriptor. + /// + [FieldOffset(24)] + public VkImageLayout Layout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.gen.cs new file mode 100644 index 0000000..0665975 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageDrmFormatModifierExplicitCreateInfoEXT - Specify that an image be created with the provided DRM format modifier and explicit memory layout + /// + /// + /// + /// If the pNext chain of VkImageCreateInfo includes a + /// VkImageDrmFormatModifierExplicitCreateInfoEXT structure, then the + /// image will be created with the Linux DRM + /// format modifier^ and memory layout defined by the structure. + /// + /// + /// The VkImageDrmFormatModifierExplicitCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// typedef struct VkImageDrmFormatModifierExplicitCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t drmFormatModifier; + /// uint32_t drmFormatModifierPlaneCount; + /// const VkSubresourceLayout* pPlaneLayouts; + /// } VkImageDrmFormatModifierExplicitCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkImageDrmFormatModifierExplicitCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageDrmFormatModifierExplicitCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DrmFormatModifier is the Linux DRM format modifier with which the image will be created. + /// + [FieldOffset(16)] + public nint DrmFormatModifier; + + /// + /// DrmFormatModifierPlaneCount is the number of memory planes in the image (as reported by VkDrmFormatModifierPropertiesEXT) as well as the length of the pPlaneLayouts array. + /// + [FieldOffset(24)] + public int DrmFormatModifierPlaneCount; + + /// + /// PlaneLayouts is a pointer to an array of VkSubresourceLayout structures describing the image's memory planes. + /// + [FieldOffset(32)] + public VkSubresourceLayout* PlaneLayouts; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierListCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierListCreateInfoEXT.gen.cs new file mode 100644 index 0000000..2506b86 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierListCreateInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageDrmFormatModifierListCreateInfoEXT - Specify that an image must be created with a DRM format modifier from the provided list + /// + /// + /// + /// If the pNext chain of VkImageCreateInfo includes a + /// VkImageDrmFormatModifierListCreateInfoEXT structure, then the image + /// will be created with one of the Linux DRM + /// format modifiers^ listed in the structure. + /// The choice of modifier is implementation-dependent. + /// + /// + /// The VkImageDrmFormatModifierListCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// typedef struct VkImageDrmFormatModifierListCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t drmFormatModifierCount; + /// const uint64_t* pDrmFormatModifiers; + /// } VkImageDrmFormatModifierListCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImageDrmFormatModifierListCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageDrmFormatModifierListCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DrmFormatModifierCount is the length of the pDrmFormatModifiers array. + /// + [FieldOffset(16)] + public int DrmFormatModifierCount; + + /// + /// DrmFormatModifiers is a pointer to an array of Linux DRM format modifiers. + /// + [FieldOffset(24)] + public nint* DrmFormatModifiers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierPropertiesEXT.gen.cs new file mode 100644 index 0000000..f013d37 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageDrmFormatModifierPropertiesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageDrmFormatModifierPropertiesEXT - Properties of an image&apos;s Linux DRM format modifier + /// + /// + /// + /// The VkImageDrmFormatModifierPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// typedef struct VkImageDrmFormatModifierPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t drmFormatModifier; + /// } VkImageDrmFormatModifierPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageDrmFormatModifierPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageDrmFormatModifierPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DrmFormatModifier returns the image's Linux DRM format modifier^. + /// + [FieldOffset(16)] + public nint DrmFormatModifier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageFormatListCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageFormatListCreateInfo.gen.cs new file mode 100644 index 0000000..a8ce93d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageFormatListCreateInfo.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageFormatListCreateInfo - Specify that an image <i>can</i> be used with a particular set of formats + /// + /// + /// + /// If the pNext chain of VkImageCreateInfo includes a + /// VkImageFormatListCreateInfo structure, then that structure contains a + /// list of all formats that can be used when creating views of this image. + /// + /// + /// The VkImageFormatListCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkImageFormatListCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t viewFormatCount; + /// const VkFormat* pViewFormats; + /// } VkImageFormatListCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImageFormatListCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageFormatListCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ViewFormatCount is the number of entries in the pViewFormats array. + /// + [FieldOffset(16)] + public int ViewFormatCount; + + /// + /// ViewFormats is a pointer to an array of VkFormat values specifying all formats which can be used when creating views of this image. + /// + [FieldOffset(24)] + public VkFormat* ViewFormats; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageFormatProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageFormatProperties.gen.cs new file mode 100644 index 0000000..5de6e8c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageFormatProperties.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageFormatProperties - Structure specifying an image format properties + /// + /// + /// + /// The VkImageFormatProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageFormatProperties { + /// VkExtent3D maxExtent; + /// uint32_t maxMipLevels; + /// uint32_t maxArrayLayers; + /// VkSampleCountFlags sampleCounts; + /// VkDeviceSize maxResourceSize; + /// } VkImageFormatProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct VkImageFormatProperties() + { + /// + /// MaxExtent are the maximum image dimensions. See the Allowed Extent Values^ section below for how these values are constrained by type. + /// + [FieldOffset(0)] + public VkExtent3D MaxExtent; + + /// + /// MaxMipLevels is the maximum number of mipmap levels. maxMipLevels must be equal to the number of levels in the complete mipmap chain based on the maxExtent.width, maxExtent.height, and maxExtent.depth, except when one of the following conditions is true, in which case it may: instead be `1`: + /// + [FieldOffset(12)] + public int MaxMipLevels; + + /// + /// MaxArrayLayers is the maximum number of array layers. maxArrayLayers must be no less than VkPhysicalDeviceLimits::maxImageArrayLayers, except when one of the following conditions is true, in which case it may: instead be `1`: + /// + [FieldOffset(16)] + public int MaxArrayLayers; + + /// + /// SampleCounts is a bitmask of VkSampleCountFlags specifying all the supported sample counts for this image as described below^. + /// + [FieldOffset(20)] + public VkSampleCountFlags SampleCounts; + + /// + /// MaxResourceSize is an upper bound on the total image size in bytes, inclusive of all image subresources. Implementations may: have an address space limit on total size of a resource, which is advertised by this property. maxResourceSize must be at least 2^31^. + /// + [FieldOffset(24)] + public ByteSize64 MaxResourceSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageFormatProperties2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageFormatProperties2.gen.cs new file mode 100644 index 0000000..1b1ae9c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageFormatProperties2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageFormatProperties2 - Structure specifying an image format properties + /// + /// + /// + /// The VkImageFormatProperties2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkImageFormatProperties2 { + /// VkStructureType sType; + /// void* pNext; + /// VkImageFormatProperties imageFormatProperties; + /// } VkImageFormatProperties2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkImageFormatProperties2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageFormatProperties2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. The pNext chain of VkImageFormatProperties2 is used to allow the specification of additional capabilities to be returned from vkGetPhysicalDeviceImageFormatProperties2. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageFormatProperties is a VkImageFormatProperties structure in which capabilities are returned. + /// + [FieldOffset(16)] + public VkImageFormatProperties ImageFormatProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier.gen.cs new file mode 100644 index 0000000..40a3b94 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier.gen.cs @@ -0,0 +1,92 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageMemoryBarrier - Structure specifying the parameters of an image memory barrier + /// + /// + /// + /// :refpage: VkImageMemoryBarrier + /// + /// + /// The VkImageMemoryBarrier structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageMemoryBarrier { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccessFlags srcAccessMask; + /// VkAccessFlags dstAccessMask; + /// VkImageLayout oldLayout; + /// VkImageLayout newLayout; + /// uint32_t srcQueueFamilyIndex; + /// uint32_t dstQueueFamilyIndex; + /// VkImage image; + /// VkImageSubresourceRange subresourceRange; + /// } VkImageMemoryBarrier; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkImageMemoryBarrier() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageMemoryBarrier; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcAccessMask is a bitmask of VkAccessFlags specifying a source access mask^. + /// + [FieldOffset(16)] + public VkAccessFlags SrcAccessMask; + + /// + /// DstAccessMask is a bitmask of VkAccessFlags specifying a destination access mask^. + /// + [FieldOffset(20)] + public VkAccessFlags DstAccessMask; + + /// + /// OldLayout is the old layout in an image layout transition^. + /// + [FieldOffset(24)] + public VkImageLayout OldLayout; + + /// + /// NewLayout is the new layout in an image layout transition^. + /// + [FieldOffset(28)] + public VkImageLayout NewLayout; + + /// + /// SrcQueueFamilyIndex is the source queue family for a queue family ownership transfer^. + /// + [FieldOffset(32)] + public int SrcQueueFamilyIndex; + + /// + /// DstQueueFamilyIndex is the destination queue family for a queue family ownership transfer^. + /// + [FieldOffset(36)] + public int DstQueueFamilyIndex; + + /// + /// Image is a handle to the image affected by this barrier. + /// + [FieldOffset(40)] + public VkImage Image; + + /// + /// SubresourceRange describes the image subresource range^ within image that is affected by this barrier. + /// + [FieldOffset(48)] + public VkImageSubresourceRange SubresourceRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier2.gen.cs new file mode 100644 index 0000000..8612e3c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageMemoryBarrier2.gen.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageMemoryBarrier2 - Structure specifying an image memory barrier + /// + /// + /// + /// :refpage: VkImageMemoryBarrier2 + /// + /// + /// The VkImageMemoryBarrier2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkImageMemoryBarrier2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineStageFlags2 srcStageMask; + /// VkAccessFlags2 srcAccessMask; + /// VkPipelineStageFlags2 dstStageMask; + /// VkAccessFlags2 dstAccessMask; + /// VkImageLayout oldLayout; + /// VkImageLayout newLayout; + /// uint32_t srcQueueFamilyIndex; + /// uint32_t dstQueueFamilyIndex; + /// VkImage image; + /// VkImageSubresourceRange subresourceRange; + /// } VkImageMemoryBarrier2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkImageMemoryBarrier2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageMemoryBarrier2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope^. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 SrcStageMask; + + /// + /// SrcAccessMask is a VkAccessFlags2 mask of access flags to be included in the first access scope^. + /// + [FieldOffset(24)] + public VkAccessFlags2 SrcAccessMask; + + /// + /// DstStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope^. + /// + [FieldOffset(32)] + public VkPipelineStageFlags2 DstStageMask; + + /// + /// DstAccessMask is a VkAccessFlags2 mask of access flags to be included in the second access scope^. + /// + [FieldOffset(40)] + public VkAccessFlags2 DstAccessMask; + + /// + /// OldLayout is the old layout in an image layout transition^. + /// + [FieldOffset(48)] + public VkImageLayout OldLayout; + + /// + /// NewLayout is the new layout in an image layout transition^. + /// + [FieldOffset(52)] + public VkImageLayout NewLayout; + + /// + /// SrcQueueFamilyIndex is the source queue family for a queue family ownership transfer^. + /// + [FieldOffset(56)] + public int SrcQueueFamilyIndex; + + /// + /// DstQueueFamilyIndex is the destination queue family for a queue family ownership transfer^. + /// + [FieldOffset(60)] + public int DstQueueFamilyIndex; + + /// + /// Image is a handle to the image affected by this barrier. + /// + [FieldOffset(64)] + public VkImage Image; + + /// + /// SubresourceRange describes the image subresource range^ within image that is affected by this barrier. + /// + [FieldOffset(72)] + public VkImageSubresourceRange SubresourceRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageMemoryRequirementsInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageMemoryRequirementsInfo2.gen.cs new file mode 100644 index 0000000..47ec54f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageMemoryRequirementsInfo2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageMemoryRequirementsInfo2 - (None) + /// + /// + /// + /// The VkImageMemoryRequirementsInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkImageMemoryRequirementsInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// } VkImageMemoryRequirementsInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageMemoryRequirementsInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageMemoryRequirementsInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is the image to query. + /// + [FieldOffset(16)] + public VkImage Image; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImagePlaneMemoryRequirementsInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImagePlaneMemoryRequirementsInfo.gen.cs new file mode 100644 index 0000000..f0566be --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImagePlaneMemoryRequirementsInfo.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImagePlaneMemoryRequirementsInfo - Structure specifying image plane for memory requirements + /// + /// + /// + /// To determine the memory requirements for a plane of a disjoint image, add a + /// VkImagePlaneMemoryRequirementsInfo structure to the pNext chain + /// of the VkImageMemoryRequirementsInfo2 structure. + /// + /// + /// The VkImagePlaneMemoryRequirementsInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkImagePlaneMemoryRequirementsInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageAspectFlagBits planeAspect; + /// } VkImagePlaneMemoryRequirementsInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImagePlaneMemoryRequirementsInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImagePlaneMemoryRequirementsInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PlaneAspect is a VkImageAspectFlags value specifying the aspect corresponding to the image plane to query. + /// + [FieldOffset(16)] + public VkImageAspectFlags PlaneAspect; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageResolve.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageResolve.gen.cs new file mode 100644 index 0000000..b14a4ae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageResolve.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageResolve - Structure specifying an image resolve operation + /// + /// + /// + /// :refpage: VkImageResolve + /// + /// + /// The VkImageResolve structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageResolve { + /// VkImageSubresourceLayers srcSubresource; + /// VkOffset3D srcOffset; + /// VkImageSubresourceLayers dstSubresource; + /// VkOffset3D dstOffset; + /// VkExtent3D extent; + /// } VkImageResolve; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 68)] + public partial struct VkImageResolve() + { + /// + /// SrcSubresource and dstSubresource are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively. Resolve of depth/stencil images is not supported. + /// + [FieldOffset(0)] + public VkImageSubresourceLayers SrcSubresource; + + /// + /// SrcOffset and dstOffset select the initial x, y, and z offsets in texels of the sub-regions of the source and destination image data. + /// + [FieldOffset(16)] + public VkOffset3D SrcOffset; + + /// + /// DstSubresource + /// + [FieldOffset(28)] + public VkImageSubresourceLayers DstSubresource; + + /// + /// DstOffset + /// + [FieldOffset(44)] + public VkOffset3D DstOffset; + + /// + /// Extent is the size in texels of the source image to resolve in width, height and depth. + /// + [FieldOffset(56)] + public VkExtent3D Extent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageResolve2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageResolve2.gen.cs new file mode 100644 index 0000000..e300b0b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageResolve2.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageResolve2 - Structure specifying an image resolve operation + /// + /// + /// + /// :refpage: VkImageResolve2 + /// + /// + /// The VkImageResolve2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkImageResolve2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageSubresourceLayers srcSubresource; + /// VkOffset3D srcOffset; + /// VkImageSubresourceLayers dstSubresource; + /// VkOffset3D dstOffset; + /// VkExtent3D extent; + /// } VkImageResolve2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkImageResolve2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageResolve2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcSubresource and dstSubresource are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively. Resolve of depth/stencil images is not supported. + /// + [FieldOffset(16)] + public VkImageSubresourceLayers SrcSubresource; + + /// + /// SrcOffset and dstOffset select the initial x, y, and z offsets in texels of the sub-regions of the source and destination image data. + /// + [FieldOffset(32)] + public VkOffset3D SrcOffset; + + /// + /// DstSubresource + /// + [FieldOffset(44)] + public VkImageSubresourceLayers DstSubresource; + + /// + /// DstOffset + /// + [FieldOffset(60)] + public VkOffset3D DstOffset; + + /// + /// Extent is the size in texels of the source image to resolve in width, height and depth. + /// + [FieldOffset(72)] + public VkExtent3D Extent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageSparseMemoryRequirementsInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageSparseMemoryRequirementsInfo2.gen.cs new file mode 100644 index 0000000..2731684 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageSparseMemoryRequirementsInfo2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageSparseMemoryRequirementsInfo2 - (None) + /// + /// + /// + /// The VkImageSparseMemoryRequirementsInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkImageSparseMemoryRequirementsInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// } VkImageSparseMemoryRequirementsInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageSparseMemoryRequirementsInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageSparseMemoryRequirementsInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is the image to query. + /// + [FieldOffset(16)] + public VkImage Image; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageStencilUsage2CreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageStencilUsage2CreateInfoKHR.gen.cs new file mode 100644 index 0000000..15ad0cf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageStencilUsage2CreateInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageStencilUsage2CreateInfoKHR - Specify separate 64-bit usage flags for the stencil aspect of a depth-stencil image + /// + /// + /// + /// The VkImageStencilUsage2CreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_EXT_separate_stencil_usage + /// typedef struct VkImageStencilUsage2CreateInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkImageUsageFlags2KHR stencilUsage; + /// } VkImageStencilUsage2CreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageStencilUsage2CreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageStencilUsage2CreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StencilUsage is a bitmask of VkImageUsageFlags2KHR describing the intended usage of the stencil aspect of the image. + /// + [FieldOffset(16)] + public VkImageUsageFlags2KHR StencilUsage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageStencilUsageCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageStencilUsageCreateInfo.gen.cs new file mode 100644 index 0000000..dffb68e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageStencilUsageCreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageStencilUsageCreateInfo - Specify separate usage flags for the stencil aspect of a depth-stencil image + /// + /// + /// + /// The VkImageStencilUsageCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkImageStencilUsageCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageUsageFlags stencilUsage; + /// } VkImageStencilUsageCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageStencilUsageCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageStencilUsageCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StencilUsage is a bitmask of VkImageUsageFlags describing the intended usage of the stencil aspect of the image. + /// + [FieldOffset(16)] + public VkImageUsageFlags StencilUsage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageSubresource.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageSubresource.gen.cs new file mode 100644 index 0000000..28377d7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageSubresource.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageSubresource - Structure specifying an image subresource + /// + /// + /// + /// The VkImageSubresource structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageSubresource { + /// VkImageAspectFlags aspectMask; + /// uint32_t mipLevel; + /// uint32_t arrayLayer; + /// } VkImageSubresource; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkImageSubresource() + { + /// + /// AspectMask is a VkImageAspectFlags value selecting the image aspect. + /// + [FieldOffset(0)] + public VkImageAspectFlags AspectMask; + + /// + /// MipLevel selects the mipmap level. + /// + [FieldOffset(4)] + public int MipLevel; + + /// + /// ArrayLayer selects the array layer. + /// + [FieldOffset(8)] + public int ArrayLayer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageSubresource2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageSubresource2.gen.cs new file mode 100644 index 0000000..feea6c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageSubresource2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageSubresource2 - Structure specifying an image subresource + /// + /// + /// + /// The VkImageSubresource2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkImageSubresource2 { + /// VkStructureType sType; + /// void* pNext; + /// VkImageSubresource imageSubresource; + /// } VkImageSubresource2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImageSubresource2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageSubresource2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageSubresource is a VkImageSubresource structure. + /// + [FieldOffset(16)] + public VkImageSubresource ImageSubresource; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageSubresourceLayers.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageSubresourceLayers.gen.cs new file mode 100644 index 0000000..4ba739f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageSubresourceLayers.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageSubresourceLayers - Structure specifying an image subresource layers + /// + /// + /// + /// The VkImageSubresourceLayers structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageSubresourceLayers { + /// VkImageAspectFlags aspectMask; + /// uint32_t mipLevel; + /// uint32_t baseArrayLayer; + /// uint32_t layerCount; + /// } VkImageSubresourceLayers; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkImageSubresourceLayers() + { + /// + /// AspectMask is a combination of VkImageAspectFlags, selecting the color, depth and/or stencil aspects to be copied. + /// + [FieldOffset(0)] + public VkImageAspectFlags AspectMask; + + /// + /// MipLevel is the mipmap level to copy + /// + [FieldOffset(4)] + public int MipLevel; + + /// + /// BaseArrayLayer and layerCount are the starting layer and number of layers to copy. + /// + [FieldOffset(8)] + public int BaseArrayLayer; + + /// + /// LayerCount + /// + [FieldOffset(12)] + public int LayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageSubresourceRange.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageSubresourceRange.gen.cs new file mode 100644 index 0000000..d7551f6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageSubresourceRange.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageSubresourceRange - Structure specifying an image subresource range + /// + /// + /// + /// The VkImageSubresourceRange structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageSubresourceRange { + /// VkImageAspectFlags aspectMask; + /// uint32_t baseMipLevel; + /// uint32_t levelCount; + /// uint32_t baseArrayLayer; + /// uint32_t layerCount; + /// } VkImageSubresourceRange; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VkImageSubresourceRange() + { + /// + /// AspectMask is a bitmask of VkImageAspectFlags specifying which aspect(s) of the image are included in the view. + /// + [FieldOffset(0)] + public VkImageAspectFlags AspectMask; + + /// + /// BaseMipLevel is the first mipmap level accessible to the view. + /// + [FieldOffset(4)] + public int BaseMipLevel; + + /// + /// LevelCount is the number of mipmap levels (starting from baseMipLevel) accessible to the view. + /// + [FieldOffset(8)] + public int LevelCount; + + /// + /// BaseArrayLayer is the first array layer accessible to the view. + /// + [FieldOffset(12)] + public int BaseArrayLayer; + + /// + /// LayerCount is the number of array layers (starting from baseArrayLayer) accessible to the view. + /// + [FieldOffset(16)] + public int LayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageSwapchainCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageSwapchainCreateInfoKHR.gen.cs new file mode 100644 index 0000000..5691da3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageSwapchainCreateInfoKHR.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageSwapchainCreateInfoKHR - Specify that an image will be bound to swapchain memory + /// + /// + /// + /// If the pNext chain of VkImageCreateInfo includes a + /// VkImageSwapchainCreateInfoKHR structure, then that structure includes + /// a swapchain handle indicating that the image will be bound to memory from + /// that swapchain. + /// + /// + /// The VkImageSwapchainCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain + /// typedef struct VkImageSwapchainCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSwapchainKHR swapchain; + /// } VkImageSwapchainCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageSwapchainCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageSwapchainCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Swapchain is VK_NULL_HANDLE or a handle of a swapchain that the image will be bound to. + /// + [FieldOffset(16)] + public VkSwapchainKHR Swapchain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageToMemoryCopy.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageToMemoryCopy.gen.cs new file mode 100644 index 0000000..02d5567 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageToMemoryCopy.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageToMemoryCopy - Structure specifying an image to host memory copy operation + /// + /// + /// + /// :refpage: VkImageToMemoryCopy + /// :bufferrowlength: memoryRowLength + /// :bufferimageheight: memoryImageHeight + /// + /// + /// Each element of VkCopyImageToMemoryInfo::pRegions is a structure + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkImageToMemoryCopy { + /// VkStructureType sType; + /// const void* pNext; + /// void* pHostPointer; + /// uint32_t memoryRowLength; + /// uint32_t memoryImageHeight; + /// VkImageSubresourceLayers imageSubresource; + /// VkOffset3D imageOffset; + /// VkExtent3D imageExtent; + /// } VkImageToMemoryCopy; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkImageToMemoryCopy() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageToMemoryCopy; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HostPointer is the host memory address which is the destination of the copy. + /// + [FieldOffset(16)] + public void* HostPointer; + + /// + /// MemoryRowLength and memoryImageHeight specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the imageExtent. + /// + [FieldOffset(24)] + public int MemoryRowLength; + + /// + /// MemoryImageHeight + /// + [FieldOffset(28)] + public int MemoryImageHeight; + + /// + /// ImageSubresource is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data. + /// + [FieldOffset(32)] + public VkImageSubresourceLayers ImageSubresource; + + /// + /// ImageOffset selects the initial x, y, z offsets in texels of the sub-region of the source image data. + /// + [FieldOffset(48)] + public VkOffset3D ImageOffset; + + /// + /// ImageExtent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(60)] + public VkExtent3D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageUsageFlags2CreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageUsageFlags2CreateInfoKHR.gen.cs new file mode 100644 index 0000000..b46c601 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageUsageFlags2CreateInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageUsageFlags2CreateInfoKHR - Extended image usage flags + /// + /// + /// + /// The VkImageUsageFlags2CreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// typedef struct VkImageUsageFlags2CreateInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkImageUsageFlags2KHR usage; + /// } VkImageUsageFlags2CreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageUsageFlags2CreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageUsageFlags2CreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Usage is a bitmask of VkImageUsageFlags2KHR specifying allowed usages of the image. + /// + [FieldOffset(16)] + public VkImageUsageFlags2KHR Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewAddressPropertiesNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewAddressPropertiesNVX.gen.cs new file mode 100644 index 0000000..2b48d17 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewAddressPropertiesNVX.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewAddressPropertiesNVX - Structure specifying the image view for handle queries + /// + /// + /// + /// The VkImageViewAddressPropertiesNVX structure is defined as: + /// + /// + /// // Provided by VK_NVX_image_view_handle + /// typedef struct VkImageViewAddressPropertiesNVX { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceAddress deviceAddress; + /// VkDeviceSize size; + /// } VkImageViewAddressPropertiesNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImageViewAddressPropertiesNVX() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewAddressPropertiesNVX; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceAddress is the device address of the image view. + /// + [FieldOffset(16)] + public VkDeviceAddress DeviceAddress; + + /// + /// Size is the size in bytes of the image view device memory. + /// + [FieldOffset(24)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewAstcDecodeModeEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewAstcDecodeModeEXT.gen.cs new file mode 100644 index 0000000..b3beed2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewAstcDecodeModeEXT.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewASTCDecodeModeEXT - Structure describing the ASTC decode mode for an image view + /// + /// + /// + /// If the pNext chain includes a VkImageViewASTCDecodeModeEXT + /// structure, then that structure includes a parameter specifying the decode + /// mode for image views using ASTC compressed formats. + /// + /// + /// The VkImageViewASTCDecodeModeEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_astc_decode_mode + /// typedef struct VkImageViewASTCDecodeModeEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat decodeMode; + /// } VkImageViewASTCDecodeModeEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageViewAstcDecodeModeEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewAstcDecodeModeEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DecodeMode is the intermediate format used to decode ASTC compressed formats. + /// + [FieldOffset(16)] + public VkFormat DecodeMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewCaptureDescriptorDataInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewCaptureDescriptorDataInfoEXT.gen.cs new file mode 100644 index 0000000..66e9b0f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewCaptureDescriptorDataInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewCaptureDescriptorDataInfoEXT - Structure specifying an image view for descriptor capture + /// + /// + /// + /// Information about the image view to get descriptor buffer capture data for + /// is passed in a VkImageViewCaptureDescriptorDataInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkImageViewCaptureDescriptorDataInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageView imageView; + /// } VkImageViewCaptureDescriptorDataInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageViewCaptureDescriptorDataInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewCaptureDescriptorDataInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageView is the VkImageView handle of the image view to get opaque capture data for. + /// + [FieldOffset(16)] + public VkImageView ImageView; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewCreateInfo.gen.cs new file mode 100644 index 0000000..f0f162e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewCreateInfo.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewCreateInfo - Structure specifying parameters of a newly created image view + /// + /// + /// + /// The VkImageViewCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkImageViewCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageViewCreateFlags flags; + /// VkImage image; + /// VkImageViewType viewType; + /// VkFormat format; + /// VkComponentMapping components; + /// VkImageSubresourceRange subresourceRange; + /// } VkImageViewCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkImageViewCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkImageViewCreateFlags specifying additional parameters of the image view. + /// + [FieldOffset(16)] + public VkImageViewCreateFlags Flags; + + /// + /// Image is a VkImage on which the view will be created. + /// + [FieldOffset(24)] + public VkImage Image; + + /// + /// ViewType is a VkImageViewType value specifying the type of the image view. + /// + [FieldOffset(32)] + public VkImageViewType ViewType; + + /// + /// Format is a VkFormat specifying the format and type used to interpret texel blocks of the image. + /// + [FieldOffset(36)] + public VkFormat Format; + + /// + /// Components is a VkComponentMapping structure specifying a remapping of color components (or of depth or stencil components after they have been converted into color components). + /// + [FieldOffset(40)] + public VkComponentMapping Components; + + /// + /// SubresourceRange is a VkImageSubresourceRange structure selecting the set of mipmap levels and array layers to be accessible to the view. + /// + [FieldOffset(56)] + public VkImageSubresourceRange SubresourceRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewHandleInfoNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewHandleInfoNVX.gen.cs new file mode 100644 index 0000000..23f5e89 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewHandleInfoNVX.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewHandleInfoNVX - Structure specifying the image view for handle queries + /// + /// + /// + /// The VkImageViewHandleInfoNVX structure is defined as: + /// + /// + /// // Provided by VK_NVX_image_view_handle + /// typedef struct VkImageViewHandleInfoNVX { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageView imageView; + /// VkDescriptorType descriptorType; + /// VkSampler sampler; + /// } VkImageViewHandleInfoNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkImageViewHandleInfoNVX() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewHandleInfoNVX; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageView is the image view to query. + /// + [FieldOffset(16)] + public VkImageView ImageView; + + /// + /// DescriptorType is the type of descriptor for which to query a handle. + /// + [FieldOffset(24)] + public VkDescriptorType DescriptorType; + + /// + /// Sampler is the sampler to combine with the image view when generating the handle. + /// + [FieldOffset(32)] + public VkSampler Sampler; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewMinLodCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewMinLodCreateInfoEXT.gen.cs new file mode 100644 index 0000000..ef4e998 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewMinLodCreateInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewMinLodCreateInfoEXT - Structure describing the minimum LOD of an image view + /// + /// + /// + /// The VkImageViewMinLodCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_view_min_lod + /// typedef struct VkImageViewMinLodCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// float minLod; + /// } VkImageViewMinLodCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageViewMinLodCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewMinLodCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinLod is the value to clamp the minimum LOD accessible by this VkImageView. + /// + [FieldOffset(16)] + public float MinLod; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewSampleWeightCreateInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewSampleWeightCreateInfoQCOM.gen.cs new file mode 100644 index 0000000..ef71b91 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewSampleWeightCreateInfoQCOM.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewSampleWeightCreateInfoQCOM - Structure describing weight sampling parameters for image view + /// + /// + /// + /// If the pNext chain includes a + /// VkImageViewSampleWeightCreateInfoQCOM structure, then that structure + /// includes a parameter specifying the parameters for weight image views used + /// in weight image sampling^. + /// + /// + /// The VkImageViewSampleWeightCreateInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_image_processing + /// typedef struct VkImageViewSampleWeightCreateInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkOffset2D filterCenter; + /// VkExtent2D filterSize; + /// uint32_t numPhases; + /// } VkImageViewSampleWeightCreateInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkImageViewSampleWeightCreateInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewSampleWeightCreateInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FilterCenter is a VkOffset2D describing the location of the weight filter origin. + /// + [FieldOffset(16)] + public VkOffset2D FilterCenter; + + /// + /// FilterSize is a VkExtent2D specifying weight filter dimensions. + /// + [FieldOffset(24)] + public VkExtent2D FilterSize; + + /// + /// NumPhases is the number of sub-pixel filter phases. + /// + [FieldOffset(32)] + public int NumPhases; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewSlicedCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewSlicedCreateInfoEXT.gen.cs new file mode 100644 index 0000000..1aafd36 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewSlicedCreateInfoEXT.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewSlicedCreateInfoEXT - Specify the subset of 3D slices of an image view + /// + /// + /// + /// The range of 3D slices for the created image view can be restricted to a + /// subset of the parent image's Z range by adding a + /// VkImageViewSlicedCreateInfoEXT structure to the pNext chain of + /// VkImageViewCreateInfo. + /// + /// + /// The VkImageViewSlicedCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_sliced_view_of_3d + /// typedef struct VkImageViewSlicedCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t sliceOffset; + /// uint32_t sliceCount; + /// } VkImageViewSlicedCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageViewSlicedCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewSlicedCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SliceOffset is the Z-offset for the first 3D slice accessible to the image view. + /// + [FieldOffset(16)] + public int SliceOffset; + + /// + /// SliceCount is the number of 3D slices accessible to the image view. + /// + [FieldOffset(20)] + public int SliceCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewUsage2CreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewUsage2CreateInfoKHR.gen.cs new file mode 100644 index 0000000..c7ed651 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewUsage2CreateInfoKHR.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewUsage2CreateInfoKHR - Specify the intended usage of an image view + /// + /// + /// + /// The set of usages for the created image view can be restricted compared to + /// the parent image's usage flags by adding a + /// VkImageViewUsage2CreateInfoKHR structure to the pNext chain of + /// VkImageViewCreateInfo. + /// + /// + /// The VkImageViewUsage2CreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// typedef struct VkImageViewUsage2CreateInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkImageUsageFlags2KHR usage; + /// } VkImageViewUsage2CreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageViewUsage2CreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewUsage2CreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Usage is a bitmask of VkImageUsageFlags2KHR specifying allowed usages of the image view. + /// + [FieldOffset(16)] + public VkImageUsageFlags2KHR Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImageViewUsageCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImageViewUsageCreateInfo.gen.cs new file mode 100644 index 0000000..67ec593 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImageViewUsageCreateInfo.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImageViewUsageCreateInfo - Specify the intended usage of an image view + /// + /// + /// + /// The set of usages for the created image view can be restricted compared to + /// the parent image's usage flags by adding a + /// VkImageViewUsageCreateInfo structure to the pNext chain of + /// VkImageViewCreateInfo. + /// + /// + /// The VkImageViewUsageCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkImageViewUsageCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageUsageFlags usage; + /// } VkImageViewUsageCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImageViewUsageCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImageViewUsageCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Usage is a bitmask of VkImageUsageFlags specifying allowed usages of the image view. + /// + [FieldOffset(16)] + public VkImageUsageFlags Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImportFenceFdInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImportFenceFdInfoKHR.gen.cs new file mode 100644 index 0000000..6f057e1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImportFenceFdInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImportFenceFdInfoKHR - (None) + /// + /// + /// + /// The VkImportFenceFdInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_fence_fd + /// typedef struct VkImportFenceFdInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkFence fence; + /// VkFenceImportFlags flags; + /// VkExternalFenceHandleTypeFlagBits handleType; + /// int fd; + /// } VkImportFenceFdInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkImportFenceFdInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportFenceFdInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Fence is the fence into which the payload will be imported. + /// + [FieldOffset(16)] + public VkFence Fence; + + /// + /// Flags is a bitmask of VkFenceImportFlags specifying additional parameters for the fence payload import operation. + /// + [FieldOffset(24)] + public VkFenceImportFlags Flags; + + /// + /// HandleType is a VkExternalFenceHandleTypeFlags value specifying the type of fd. + /// + [FieldOffset(28)] + public VkExternalFenceHandleTypeFlags HandleType; + + /// + /// Fd is the external handle to import. + /// + [FieldOffset(32)] + public int Fd; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImportMemoryFdInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImportMemoryFdInfoKHR.gen.cs new file mode 100644 index 0000000..4701ad7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImportMemoryFdInfoKHR.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImportMemoryFdInfoKHR - Import memory created on the same physical device from a file descriptor + /// + /// + /// + /// To import memory from a POSIX file descriptor handle, add a + /// VkImportMemoryFdInfoKHR structure to the pNext chain of the + /// VkMemoryAllocateInfo structure. + /// The VkImportMemoryFdInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_fd + /// typedef struct VkImportMemoryFdInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// int fd; + /// } VkImportMemoryFdInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkImportMemoryFdInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMemoryFdInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the handle type of fd. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleType; + + /// + /// Fd is the external handle to import. + /// + [FieldOffset(20)] + public int Fd; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImportMemoryHostPointerInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImportMemoryHostPointerInfoEXT.gen.cs new file mode 100644 index 0000000..51fcab9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImportMemoryHostPointerInfoEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImportMemoryHostPointerInfoEXT - Import memory from a host pointer + /// + /// + /// + /// To import memory from a host pointer, add a + /// VkImportMemoryHostPointerInfoEXT structure to the pNext chain of + /// the VkMemoryAllocateInfo structure. + /// The VkImportMemoryHostPointerInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_host + /// typedef struct VkImportMemoryHostPointerInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// void* pHostPointer; + /// } VkImportMemoryHostPointerInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkImportMemoryHostPointerInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportMemoryHostPointerInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the handle type. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleType; + + /// + /// HostPointer is the host pointer to import from. + /// + [FieldOffset(24)] + public void* HostPointer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkImportSemaphoreFdInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkImportSemaphoreFdInfoKHR.gen.cs new file mode 100644 index 0000000..b4022c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkImportSemaphoreFdInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkImportSemaphoreFdInfoKHR - Structure specifying POSIX file descriptor to import to a semaphore + /// + /// + /// + /// The VkImportSemaphoreFdInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_semaphore_fd + /// typedef struct VkImportSemaphoreFdInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// VkSemaphoreImportFlags flags; + /// VkExternalSemaphoreHandleTypeFlagBits handleType; + /// int fd; + /// } VkImportSemaphoreFdInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkImportSemaphoreFdInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ImportSemaphoreFdInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is the semaphore into which the payload will be imported. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// Flags is a bitmask of VkSemaphoreImportFlags specifying additional parameters for the semaphore payload import operation. + /// + [FieldOffset(24)] + public VkSemaphoreImportFlags Flags; + + /// + /// HandleType is a VkExternalSemaphoreHandleTypeFlags value specifying the type of fd. + /// + [FieldOffset(28)] + public VkExternalSemaphoreHandleTypeFlags HandleType; + + /// + /// Fd is the external handle to import. + /// + [FieldOffset(32)] + public int Fd; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsExecutionSetTokenEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsExecutionSetTokenEXT.gen.cs new file mode 100644 index 0000000..57e9844 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsExecutionSetTokenEXT.gen.cs @@ -0,0 +1,35 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsExecutionSetTokenEXT - Structure specifying input data for a single execution set command token + /// + /// + /// + /// The VkIndirectCommandsExecutionSetTokenEXT structure specifies the + /// input data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT + /// token. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectCommandsExecutionSetTokenEXT { + /// VkIndirectExecutionSetInfoTypeEXT type; + /// VkShaderStageFlags shaderStages; + /// } VkIndirectCommandsExecutionSetTokenEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkIndirectCommandsExecutionSetTokenEXT() + { + /// + /// Type describes the type of indirect execution set in use. + /// + [FieldOffset(0)] + public VkIndirectExecutionSetInfoTypeEXT Type; + + /// + /// ShaderStages specifies the shaders that will be changed by this token. + /// + [FieldOffset(4)] + public VkShaderStageFlags ShaderStages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsIndexBufferTokenEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsIndexBufferTokenEXT.gen.cs new file mode 100644 index 0000000..0205707 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsIndexBufferTokenEXT.gen.cs @@ -0,0 +1,28 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsIndexBufferTokenEXT - Structure specifying layout token info for a single index buffer command token + /// + /// + /// + /// The VkIndirectCommandsIndexBufferTokenEXT structure specifies the + /// layout token info for the + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT token. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectCommandsIndexBufferTokenEXT { + /// VkIndirectCommandsInputModeFlagBitsEXT mode; + /// } VkIndirectCommandsIndexBufferTokenEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkIndirectCommandsIndexBufferTokenEXT() + { + /// + /// Mode specifies the mode to use with this token. + /// + [FieldOffset(0)] + public VkIndirectCommandsInputModeFlagsEXT Mode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoEXT.gen.cs new file mode 100644 index 0000000..3263b54 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoEXT.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutCreateInfoEXT - Structure specifying the parameters of a newly created indirect commands layout object + /// + /// + /// + /// The VkIndirectCommandsLayoutCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectCommandsLayoutCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkIndirectCommandsLayoutUsageFlagsEXT flags; + /// VkShaderStageFlags shaderStages; + /// uint32_t indirectStride; + /// VkPipelineLayout pipelineLayout; + /// uint32_t tokenCount; + /// const VkIndirectCommandsLayoutTokenEXT* pTokens; + /// } VkIndirectCommandsLayoutCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkIndirectCommandsLayoutCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectCommandsLayoutCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkIndirectCommandsLayoutUsageFlagsEXT specifying usage rules for this layout. + /// + [FieldOffset(16)] + public VkIndirectCommandsLayoutUsageFlagsEXT Flags; + + /// + /// ShaderStages is the VkShaderStageFlags that this layout supports. + /// + [FieldOffset(20)] + public VkShaderStageFlags ShaderStages; + + /// + /// IndirectStride is the distance in bytes between sequences in the indirect buffer + /// + [FieldOffset(24)] + public int IndirectStride; + + /// + /// PipelineLayout is the optional VkPipelineLayout that tokens in this layout use. If the dynamicGeneratedPipelineLayout^ feature is enabled, pipelineLayout can be VK_NULL_HANDLE and the layout must be specified by chaining the VkPipelineLayoutCreateInfo structure off the pNext. + /// + [FieldOffset(32)] + public VkPipelineLayout PipelineLayout; + + /// + /// TokenCount is the length of the individual command sequence. + /// + [FieldOffset(40)] + public int TokenCount; + + /// + /// Tokens is a pointer to an array of VkIndirectCommandsLayoutTokenEXT describing each command token in detail. + /// + [FieldOffset(48)] + public VkIndirectCommandsLayoutTokenEXT* Tokens; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoNV.gen.cs new file mode 100644 index 0000000..23d0548 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutCreateInfoNV.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutCreateInfoNV - Structure specifying the parameters of a newly created indirect commands layout object + /// + /// + /// + /// The VkIndirectCommandsLayoutCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkIndirectCommandsLayoutCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkIndirectCommandsLayoutUsageFlagsNV flags; + /// VkPipelineBindPoint pipelineBindPoint; + /// uint32_t tokenCount; + /// const VkIndirectCommandsLayoutTokenNV* pTokens; + /// uint32_t streamCount; + /// const uint32_t* pStreamStrides; + /// } VkIndirectCommandsLayoutCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkIndirectCommandsLayoutCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectCommandsLayoutCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkIndirectCommandsLayoutUsageFlagsNV specifying usage hints of this layout. + /// + [FieldOffset(16)] + public VkIndirectCommandsLayoutUsageFlagsNV Flags; + + /// + /// PipelineBindPoint is the VkPipelineBindPoint that this layout targets. + /// + [FieldOffset(20)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// TokenCount is the length of the individual command sequence. + /// + [FieldOffset(24)] + public int TokenCount; + + /// + /// Tokens is an array describing each command token in detail. See VkIndirectCommandsTokenTypeNV and VkIndirectCommandsLayoutTokenNV below for details. + /// + [FieldOffset(32)] + public VkIndirectCommandsLayoutTokenNV* Tokens; + + /// + /// StreamCount is the number of streams used to provide the token inputs. + /// + [FieldOffset(40)] + public int StreamCount; + + /// + /// StreamStrides is an array defining the byte stride for each input stream. + /// + [FieldOffset(48)] + public int* StreamStrides; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutPushDataTokenNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutPushDataTokenNV.gen.cs new file mode 100644 index 0000000..640ebfa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutPushDataTokenNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutPushDataTokenNV - Struct specifying the details of an indirect push data command layout token + /// + /// + /// + /// The VkIndirectCommandsLayoutTokenNV structure specifies details to the + /// function arguments that need to be known at layout creation time: + /// + /// + /// // Provided by VK_EXT_descriptor_heap with VK_NV_device_generated_commands + /// typedef struct VkIndirectCommandsLayoutPushDataTokenNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t pushDataOffset; + /// uint32_t pushDataSize; + /// } VkIndirectCommandsLayoutPushDataTokenNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkIndirectCommandsLayoutPushDataTokenNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectCommandsLayoutPushDataTokenNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PushDataOffset is the offset used for the push data command. + /// + [FieldOffset(16)] + public int PushDataOffset; + + /// + /// PushDataSize is the size used for the push data command. + /// + [FieldOffset(20)] + public int PushDataSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenEXT.gen.cs new file mode 100644 index 0000000..350a90f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutTokenEXT - Struct specifying the details of an indirect command layout token + /// + /// + /// + /// The VkIndirectCommandsLayoutTokenEXT structure specifies details to + /// the function arguments that need to be known at layout creation time: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectCommandsLayoutTokenEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkIndirectCommandsTokenTypeEXT type; + /// VkIndirectCommandsTokenDataEXT data; + /// uint32_t offset; + /// } VkIndirectCommandsLayoutTokenEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkIndirectCommandsLayoutTokenEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectCommandsLayoutTokenEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type specifies the VkIndirectCommandsTokenTypeEXT for data. + /// + [FieldOffset(16)] + public VkIndirectCommandsTokenTypeEXT Type; + + /// + /// Data specifies a VkIndirectCommandsTokenDataEXT containing token-specific details for command execution. It is ignored if type does not match any member of the VkIndirectCommandsTokenDataEXT union. + /// + [FieldOffset(24)] + public VkIndirectCommandsTokenDataEXT Data; + + /// + /// Offset is the relative byte offset for the token within one sequence of the indirect buffer. The data stored at that offset is the command data for the token, e.g. VkDispatchIndirectCommand. + /// + [FieldOffset(32)] + public int Offset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenNV.gen.cs new file mode 100644 index 0000000..63ddc29 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsLayoutTokenNV.gen.cs @@ -0,0 +1,125 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsLayoutTokenNV - Struct specifying the details of an indirect command layout token + /// + /// + /// + /// The VkIndirectCommandsLayoutTokenNV structure specifies details to the + /// function arguments that need to be known at layout creation time: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkIndirectCommandsLayoutTokenNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkIndirectCommandsTokenTypeNV tokenType; + /// uint32_t stream; + /// uint32_t offset; + /// uint32_t vertexBindingUnit; + /// VkBool32 vertexDynamicStride; + /// VkPipelineLayout pushconstantPipelineLayout; + /// VkShaderStageFlags pushconstantShaderStageFlags; + /// uint32_t pushconstantOffset; + /// uint32_t pushconstantSize; + /// VkIndirectStateFlagsNV indirectStateFlags; + /// uint32_t indexTypeCount; + /// const VkIndexType* pIndexTypes; + /// const uint32_t* pIndexTypeValues; + /// } VkIndirectCommandsLayoutTokenNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkIndirectCommandsLayoutTokenNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectCommandsLayoutTokenNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TokenType is a VkIndirectCommandsTokenTypeNV specifying the token command type. + /// + [FieldOffset(16)] + public VkIndirectCommandsTokenTypeNV TokenType; + + /// + /// Stream is the index of the input stream containing the token argument data. + /// + [FieldOffset(20)] + public int Stream; + + /// + /// Offset is a relative starting offset within the input stream memory for the token argument data. + /// + [FieldOffset(24)] + public int Offset; + + /// + /// VertexBindingUnit is used for the vertex buffer binding command. + /// + [FieldOffset(28)] + public int VertexBindingUnit; + + /// + /// VertexDynamicStride sets if the vertex buffer stride is provided by the binding command rather than the current bound graphics pipeline state. + /// + [FieldOffset(32)] + public Brutal.Bool32 VertexDynamicStride; + + /// + /// PushconstantPipelineLayout is the VkPipelineLayout used for the push constant command. + /// + [FieldOffset(40)] + public VkPipelineLayout PushconstantPipelineLayout; + + /// + /// PushconstantShaderStageFlags are the shader stage flags used for the push constant command. + /// + [FieldOffset(48)] + public VkShaderStageFlags PushconstantShaderStageFlags; + + /// + /// PushconstantOffset is the offset used for the push constant command. + /// + [FieldOffset(52)] + public int PushconstantOffset; + + /// + /// PushconstantSize is the size used for the push constant command. + /// + [FieldOffset(56)] + public int PushconstantSize; + + /// + /// IndirectStateFlags is a VkIndirectStateFlagsNV bitfield indicating the active states for the state flag command. + /// + [FieldOffset(60)] + public VkIndirectStateFlagsNV IndirectStateFlags; + + /// + /// IndexTypeCount is the optional size of the pIndexTypes and pIndexTypeValues array pairings. If not zero, it allows to register a custom `uint32_t` value to be treated as specific VkIndexType. + /// + [FieldOffset(64)] + public int IndexTypeCount; + + /// + /// IndexTypes is the used VkIndexType for the corresponding `uint32_t` value entry in pIndexTypeValues. + /// + [FieldOffset(72)] + public VkIndexType* IndexTypes; + + /// + /// IndexTypeValues + /// + [FieldOffset(80)] + public int* IndexTypeValues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsPushConstantTokenEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsPushConstantTokenEXT.gen.cs new file mode 100644 index 0000000..ffaa03e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsPushConstantTokenEXT.gen.cs @@ -0,0 +1,29 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsPushConstantTokenEXT - Structure specifying layout token info for a single push constant command token + /// + /// + /// + /// The VkIndirectCommandsPushConstantTokenEXT structure specifies the + /// layout token info for + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, + /// and VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT tokens. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectCommandsPushConstantTokenEXT { + /// VkPushConstantRange updateRange; + /// } VkIndirectCommandsPushConstantTokenEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkIndirectCommandsPushConstantTokenEXT() + { + /// + /// UpdateRange is the push constant range that will be updated by the token. + /// + [FieldOffset(0)] + public VkPushConstantRange UpdateRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsStreamNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsStreamNV.gen.cs new file mode 100644 index 0000000..c6689a3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsStreamNV.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsStreamNV - Structure specifying input streams for generated command tokens + /// + /// + /// + /// The VkIndirectCommandsStreamNV structure specifies the input data for + /// one or more tokens at processing time. + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkIndirectCommandsStreamNV { + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// } VkIndirectCommandsStreamNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkIndirectCommandsStreamNV() + { + /// + /// Buffer specifies the VkBuffer storing the functional arguments for each sequence. These arguments can be written by the device. + /// + [FieldOffset(0)] + public VkBuffer Buffer; + + /// + /// Offset specified an offset into buffer where the arguments start. + /// + [FieldOffset(8)] + public ByteSize64 Offset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsTokenDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsTokenDataEXT.gen.cs new file mode 100644 index 0000000..7271ebb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsTokenDataEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsTokenDataEXT - Union specifying the token-specific details of an indirect command layout token + /// + /// + /// + /// The VkIndirectCommandsTokenDataEXT structure provides token-specific + /// details used to generate the indirect execution layout. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef union VkIndirectCommandsTokenDataEXT { + /// const VkIndirectCommandsPushConstantTokenEXT* pPushConstant; + /// const VkIndirectCommandsVertexBufferTokenEXT* pVertexBuffer; + /// const VkIndirectCommandsIndexBufferTokenEXT* pIndexBuffer; + /// const VkIndirectCommandsExecutionSetTokenEXT* pExecutionSet; + /// } VkIndirectCommandsTokenDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkIndirectCommandsTokenDataEXT() + { + /// + /// PushConstant is a pointer to a VkIndirectCommandsPushConstantTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, and VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT tokens + /// + [FieldOffset(0)] + public VkIndirectCommandsPushConstantTokenEXT* PushConstant; + + /// + /// VertexBuffer is a pointer to a VkIndirectCommandsVertexBufferTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT tokens + /// + [FieldOffset(0)] + public VkIndirectCommandsVertexBufferTokenEXT* VertexBuffer; + + /// + /// IndexBuffer is a pointer to a VkIndirectCommandsIndexBufferTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT tokens + /// + [FieldOffset(0)] + public VkIndirectCommandsIndexBufferTokenEXT* IndexBuffer; + + /// + /// ExecutionSet is a pointer to a VkIndirectCommandsExecutionSetTokenEXT structure needed for VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT tokens + /// + [FieldOffset(0)] + public VkIndirectCommandsExecutionSetTokenEXT* ExecutionSet; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsVertexBufferTokenEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsVertexBufferTokenEXT.gen.cs new file mode 100644 index 0000000..7b27b5c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectCommandsVertexBufferTokenEXT.gen.cs @@ -0,0 +1,28 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectCommandsVertexBufferTokenEXT - Structure specifying layout token info for a single index buffer command token + /// + /// + /// + /// The VkIndirectCommandsVertexBufferTokenEXT structure specifies the + /// layout token info for the + /// VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT token. + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectCommandsVertexBufferTokenEXT { + /// uint32_t vertexBindingUnit; + /// } VkIndirectCommandsVertexBufferTokenEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkIndirectCommandsVertexBufferTokenEXT() + { + /// + /// VertexBindingUnit is the vertex input binding number to be bound. + /// + [FieldOffset(0)] + public int VertexBindingUnit; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetCreateInfoEXT.gen.cs new file mode 100644 index 0000000..e2a8ed4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetCreateInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetCreateInfoEXT - Structure specifying parameters of a newly created indirect execution set + /// + /// + /// + /// The VkIndirectExecutionSetCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectExecutionSetCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkIndirectExecutionSetInfoTypeEXT type; + /// VkIndirectExecutionSetInfoEXT info; + /// } VkIndirectExecutionSetCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkIndirectExecutionSetCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectExecutionSetCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is a VkIndirectExecutionSetInfoTypeEXT describing the type of set being created and determining which field of the info union will be used. + /// + [FieldOffset(16)] + public VkIndirectExecutionSetInfoTypeEXT Type; + + /// + /// Info is a VkIndirectExecutionSetInfoEXT union containing layout information for the set. + /// + [FieldOffset(24)] + public VkIndirectExecutionSetInfoEXT Info; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetInfoEXT.gen.cs new file mode 100644 index 0000000..ce9de20 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetInfoEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetInfoEXT - Union specifying parameters of a newly created indirect execution set + /// + /// + /// + /// The VkIndirectExecutionSetInfoEXT union is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef union VkIndirectExecutionSetInfoEXT { + /// const VkIndirectExecutionSetPipelineInfoEXT* pPipelineInfo; + /// const VkIndirectExecutionSetShaderInfoEXT* pShaderInfo; + /// } VkIndirectExecutionSetInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkIndirectExecutionSetInfoEXT() + { + /// + /// PipelineInfo is a pointer to a VkIndirectExecutionSetPipelineInfoEXT structure containing pipeline layout information for the set. + /// + [FieldOffset(0)] + public VkIndirectExecutionSetPipelineInfoEXT* PipelineInfo; + + /// + /// ShaderInfo is a pointer to a VkIndirectExecutionSetShaderInfoEXT structure containing shader object layout information for the set. + /// + [FieldOffset(0)] + public VkIndirectExecutionSetShaderInfoEXT* ShaderInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetPipelineInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetPipelineInfoEXT.gen.cs new file mode 100644 index 0000000..17f9c00 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetPipelineInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetPipelineInfoEXT - Struct specifying parameters of a newly created indirect execution set containing only pipelines + /// + /// + /// + /// The VkIndirectExecutionSetPipelineInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectExecutionSetPipelineInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipeline initialPipeline; + /// uint32_t maxPipelineCount; + /// } VkIndirectExecutionSetPipelineInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkIndirectExecutionSetPipelineInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectExecutionSetPipelineInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// InitialPipeline is the initial pipeline for the set. This pipeline will be automatically added to the set at index `0`. + /// + [FieldOffset(16)] + public VkPipeline InitialPipeline; + + /// + /// MaxPipelineCount is the maximum number of pipelines stored in the set. + /// + [FieldOffset(24)] + public int MaxPipelineCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderInfoEXT.gen.cs new file mode 100644 index 0000000..55fcf88 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderInfoEXT.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetShaderInfoEXT - Struct specifying parameters of a newly created indirect execution set containing only shader objects + /// + /// + /// + /// The VkIndirectExecutionSetShaderInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectExecutionSetShaderInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t shaderCount; + /// const VkShaderEXT* pInitialShaders; + /// const VkIndirectExecutionSetShaderLayoutInfoEXT* pSetLayoutInfos; + /// uint32_t maxShaderCount; + /// uint32_t pushConstantRangeCount; + /// const VkPushConstantRange* pPushConstantRanges; + /// } VkIndirectExecutionSetShaderInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkIndirectExecutionSetShaderInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectExecutionSetShaderInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderCount is the number of members in the pInitialShaders and pSetLayoutInfos arrays. + /// + [FieldOffset(16)] + public int ShaderCount; + + /// + /// InitialShaders is a pointer to an array containing a VkShaderEXT object for each shader stage that will be used in the set. These shaders will be automatically added to the set beginning at index `0`. + /// + [FieldOffset(24)] + public VkShaderEXT* InitialShaders; + + /// + /// SetLayoutInfos is NULL or a pointer to an array containing a VkIndirectExecutionSetShaderLayoutInfoEXT used by each corresponding pInitialShaders shader stage in the set. + /// + [FieldOffset(32)] + public VkIndirectExecutionSetShaderLayoutInfoEXT* SetLayoutInfos; + + /// + /// MaxShaderCount is the maximum number of shader objects stored in the set. + /// + [FieldOffset(40)] + public int MaxShaderCount; + + /// + /// PushConstantRangeCount is the number of members in the pPushConstantRanges array. + /// + [FieldOffset(44)] + public int PushConstantRangeCount; + + /// + /// PushConstantRanges is a pointer to the array of VkPushConstantRange ranges used by all shaders in the set. + /// + [FieldOffset(48)] + public VkPushConstantRange* PushConstantRanges; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderLayoutInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderLayoutInfoEXT.gen.cs new file mode 100644 index 0000000..1579733 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkIndirectExecutionSetShaderLayoutInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkIndirectExecutionSetShaderLayoutInfoEXT - Struct specifying descriptor layout parameters of a newly created indirect execution set containing only shader objects + /// + /// + /// + /// The VkIndirectExecutionSetShaderLayoutInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkIndirectExecutionSetShaderLayoutInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t setLayoutCount; + /// const VkDescriptorSetLayout* pSetLayouts; + /// } VkIndirectExecutionSetShaderLayoutInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkIndirectExecutionSetShaderLayoutInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.IndirectExecutionSetShaderLayoutInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SetLayoutCount is the number of members in the pSetLayouts array + /// + [FieldOffset(16)] + public int SetLayoutCount; + + /// + /// SetLayouts is a pointer to an array containing VkDescriptorSetLayout objects used by the shader stage. The implementation must not access these objects outside of the duration of the command this structure is passed to. + /// + [FieldOffset(24)] + public VkDescriptorSetLayout* SetLayouts; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkInitializePerformanceApiInfoINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkInitializePerformanceApiInfoINTEL.gen.cs new file mode 100644 index 0000000..58cf7b4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkInitializePerformanceApiInfoINTEL.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkInitializePerformanceApiInfoINTEL - Structure specifying parameters of initialize of the device + /// + /// + /// + /// The VkInitializePerformanceApiInfoINTEL structure is defined as : + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkInitializePerformanceApiInfoINTEL { + /// VkStructureType sType; + /// const void* pNext; + /// void* pUserData; + /// } VkInitializePerformanceApiInfoINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkInitializePerformanceApiInfoINTEL() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.InitializePerformanceApiInfoINTEL; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UserData is NULL or a pointer for application data. + /// + [FieldOffset(16)] + public void* UserData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkInputAttachmentAspectReference.gen.cs b/Brutal.Vulkan/Generated/Structs/VkInputAttachmentAspectReference.gen.cs new file mode 100644 index 0000000..f9602f8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkInputAttachmentAspectReference.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkInputAttachmentAspectReference - Structure specifying a subpass/input attachment pair and an aspect mask that <i>can</i> be read. + /// + /// + /// + /// The VkInputAttachmentAspectReference structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkInputAttachmentAspectReference { + /// uint32_t subpass; + /// uint32_t inputAttachmentIndex; + /// VkImageAspectFlags aspectMask; + /// } VkInputAttachmentAspectReference; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkInputAttachmentAspectReference() + { + /// + /// Subpass is an index into the pSubpasses array of the parent VkRenderPassCreateInfo structure. + /// + [FieldOffset(0)] + public int Subpass; + + /// + /// InputAttachmentIndex is an index into the pInputAttachments of the specified subpass. + /// + [FieldOffset(4)] + public int InputAttachmentIndex; + + /// + /// AspectMask is a mask of which aspect(s) can be accessed within the specified subpass. + /// + [FieldOffset(8)] + public VkImageAspectFlags AspectMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkInstanceCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkInstanceCreateInfo.gen.cs new file mode 100644 index 0000000..4870f6f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkInstanceCreateInfo.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkInstanceCreateInfo - Structure specifying parameters of a newly created instance + /// + /// + /// + /// The VkInstanceCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkInstanceCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkInstanceCreateFlags flags; + /// const VkApplicationInfo* pApplicationInfo; + /// uint32_t enabledLayerCount; + /// const char* const* ppEnabledLayerNames; + /// uint32_t enabledExtensionCount; + /// const char* const* ppEnabledExtensionNames; + /// } VkInstanceCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkInstanceCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.InstanceCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkInstanceCreateFlags indicating the behavior of the instance. + /// + [FieldOffset(16)] + public VkInstanceCreateFlags Flags; + + /// + /// ApplicationInfo is `NULL` or a pointer to a VkApplicationInfo structure. If not `NULL`, this information helps implementations recognize behavior inherent to classes of applications. VkApplicationInfo is defined in detail below. + /// + [FieldOffset(24)] + public VkApplicationInfo* ApplicationInfo; + + /// + /// EnabledLayerCount is the number of global layers to enable. + /// + [FieldOffset(32)] + public int EnabledLayerCount; + + /// + /// ppEnabledLayerNames is a pointer to an array of enabledLayerCount null-terminated UTF-8 strings containing the names of layers to enable for the created instance. The layers are loaded in the order they are listed in this array, with the first array element being the closest to the application, and the last array element being the closest to the driver. See the here section for further details. + /// + [FieldOffset(40)] + public byte** ppEnabledLayerNames; + + /// + /// EnabledExtensionCount is the number of global extensions to enable. + /// + [FieldOffset(48)] + public int EnabledExtensionCount; + + /// + /// ppEnabledExtensionNames is a pointer to an array of enabledExtensionCount null-terminated UTF-8 strings containing the names of extensions to enable. + /// + [FieldOffset(56)] + public byte** ppEnabledExtensionNames; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLatencySleepInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLatencySleepInfoNV.gen.cs new file mode 100644 index 0000000..59f8ba4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLatencySleepInfoNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLatencySleepInfoNV - Structure specifying the parameters of vkLatencySleepNV + /// + /// + /// + /// The VkLatencySleepInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkLatencySleepInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore signalSemaphore; + /// uint64_t value; + /// } VkLatencySleepInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkLatencySleepInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.LatencySleepInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SignalSemaphore is a semaphore that is signaled to indicate that the application should resume input sampling work. + /// + [FieldOffset(16)] + public VkSemaphore SignalSemaphore; + + /// + /// Value is the value that signalSemaphore is set to for resuming sampling work. + /// + [FieldOffset(24)] + public nint Value; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLatencySleepModeInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLatencySleepModeInfoNV.gen.cs new file mode 100644 index 0000000..61cedaa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLatencySleepModeInfoNV.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLatencySleepModeInfoNV - Structure to set low latency mode + /// + /// + /// + /// The VkLatencySleepModeInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkLatencySleepModeInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 lowLatencyMode; + /// VkBool32 lowLatencyBoost; + /// uint32_t minimumIntervalUs; + /// } VkLatencySleepModeInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkLatencySleepModeInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.LatencySleepModeInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LowLatencyMode is the toggle to enable or disable low latency mode. + /// + [FieldOffset(16)] + public Brutal.Bool32 LowLatencyMode; + + /// + /// LowLatencyBoost allows an application to hint to the GPU to increase performance to provide additional latency savings at a cost of increased power consumption. + /// + [FieldOffset(20)] + public Brutal.Bool32 LowLatencyBoost; + + /// + /// MinimumIntervalUs is the microseconds between vkQueuePresentKHR calls for a given swapchain that vkLatencySleepNV will enforce. + /// + [FieldOffset(24)] + public int MinimumIntervalUs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLatencySubmissionPresentIdNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLatencySubmissionPresentIdNV.gen.cs new file mode 100644 index 0000000..123e119 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLatencySubmissionPresentIdNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLatencySubmissionPresentIdNV - Structure used to associate a queueSubmit with a presentId + /// + /// + /// + /// The VkLatencySubmissionPresentIdNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkLatencySubmissionPresentIdNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t presentID; + /// } VkLatencySubmissionPresentIdNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkLatencySubmissionPresentIdNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.LatencySubmissionPresentIdNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentID is used to associate the vkQueueSubmit with the presentId used for a given vkQueuePresentKHR via + /// + [FieldOffset(16)] + public nint PresentID; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLatencySurfaceCapabilitiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLatencySurfaceCapabilitiesNV.gen.cs new file mode 100644 index 0000000..cce6039 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLatencySurfaceCapabilitiesNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLatencySurfaceCapabilitiesNV - Structure describing surface optimized presentation modes for use with low latency mode + /// + /// + /// + /// The VkLatencySurfaceCapabilitiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkLatencySurfaceCapabilitiesNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t presentModeCount; + /// VkPresentModeKHR* pPresentModes; + /// } VkLatencySurfaceCapabilitiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkLatencySurfaceCapabilitiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.LatencySurfaceCapabilitiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentModeCount is the number of presentation modes provided. + /// + [FieldOffset(16)] + public int PresentModeCount; + + /// + /// PresentModes is list of presentation modes optimized for use with low latency mode with presentModeCount entries. + /// + [FieldOffset(24)] + public VkPresentModeKHR* PresentModes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLatencyTimingsFrameReportNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLatencyTimingsFrameReportNV.gen.cs new file mode 100644 index 0000000..34e7922 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLatencyTimingsFrameReportNV.gen.cs @@ -0,0 +1,132 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLatencyTimingsFrameReportNV - Structure containing latency data + /// + /// + /// + /// The VkLatencyTimingsFrameReportNV structure describes latency data + /// returned by vkGetLatencyTimingsNV + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkLatencyTimingsFrameReportNV { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t presentID; + /// uint64_t inputSampleTimeUs; + /// uint64_t simStartTimeUs; + /// uint64_t simEndTimeUs; + /// uint64_t renderSubmitStartTimeUs; + /// uint64_t renderSubmitEndTimeUs; + /// uint64_t presentStartTimeUs; + /// uint64_t presentEndTimeUs; + /// uint64_t driverStartTimeUs; + /// uint64_t driverEndTimeUs; + /// uint64_t osRenderQueueStartTimeUs; + /// uint64_t osRenderQueueEndTimeUs; + /// uint64_t gpuRenderStartTimeUs; + /// uint64_t gpuRenderEndTimeUs; + /// } VkLatencyTimingsFrameReportNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 128)] + public unsafe partial struct VkLatencyTimingsFrameReportNV() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.LatencyTimingsFrameReportNV; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentID + /// + [FieldOffset(16)] + public nint PresentID; + + /// + /// InputSampleTimeUs + /// + [FieldOffset(24)] + public nint InputSampleTimeUs; + + /// + /// SimStartTimeUs + /// + [FieldOffset(32)] + public nint SimStartTimeUs; + + /// + /// SimEndTimeUs + /// + [FieldOffset(40)] + public nint SimEndTimeUs; + + /// + /// RenderSubmitStartTimeUs + /// + [FieldOffset(48)] + public nint RenderSubmitStartTimeUs; + + /// + /// RenderSubmitEndTimeUs + /// + [FieldOffset(56)] + public nint RenderSubmitEndTimeUs; + + /// + /// PresentStartTimeUs + /// + [FieldOffset(64)] + public nint PresentStartTimeUs; + + /// + /// PresentEndTimeUs + /// + [FieldOffset(72)] + public nint PresentEndTimeUs; + + /// + /// DriverStartTimeUs + /// + [FieldOffset(80)] + public nint DriverStartTimeUs; + + /// + /// DriverEndTimeUs + /// + [FieldOffset(88)] + public nint DriverEndTimeUs; + + /// + /// OsRenderQueueStartTimeUs + /// + [FieldOffset(96)] + public nint OsRenderQueueStartTimeUs; + + /// + /// OsRenderQueueEndTimeUs + /// + [FieldOffset(104)] + public nint OsRenderQueueEndTimeUs; + + /// + /// GpuRenderStartTimeUs + /// + [FieldOffset(112)] + public nint GpuRenderStartTimeUs; + + /// + /// GpuRenderEndTimeUs + /// + [FieldOffset(120)] + public nint GpuRenderEndTimeUs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLayerProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLayerProperties.gen.cs new file mode 100644 index 0000000..6d7aed5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLayerProperties.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLayerProperties - Structure specifying layer properties + /// + /// + /// + /// The VkLayerProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkLayerProperties { + /// char layerName[VK_MAX_EXTENSION_NAME_SIZE]; + /// uint32_t specVersion; + /// uint32_t implementationVersion; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// } VkLayerProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 520)] + public unsafe partial struct VkLayerProperties() + { + /// + [FieldOffset(0)] + public fixed byte LayerName[256]; + + /// + /// SpecVersion is the Vulkan version the layer was written to, encoded as described in here. + /// + [FieldOffset(256)] + public int SpecVersion; + + /// + /// ImplementationVersion is the version of this layer. It is an integer, increasing with backward compatible changes. + /// + [FieldOffset(260)] + public int ImplementationVersion; + + /// + [FieldOffset(264)] + public fixed byte Description[256]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLayerSettingEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLayerSettingEXT.gen.cs new file mode 100644 index 0000000..1e34e8d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLayerSettingEXT.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLayerSettingEXT - Specify a layer capability to configure + /// + /// + /// + /// The values of elements of the + /// VkLayerSettingsCreateInfoEXT::pSettings array, specifying layer + /// settings to be configured, are: + /// + /// + /// // Provided by VK_EXT_layer_settings + /// typedef struct VkLayerSettingEXT { + /// const char* pLayerName; + /// const char* pSettingName; + /// VkLayerSettingTypeEXT type; + /// uint32_t valueCount; + /// const void* pValues; + /// } VkLayerSettingEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkLayerSettingEXT() + { + /// + /// LayerName is a pointer to a null-terminated UTF-8 string naming the layer to configure the setting from. + /// + [FieldOffset(0)] + public byte* LayerName; + + /// + /// SettingName is a pointer to a null-terminated UTF-8 string naming the setting to configure. Values of pSettingName that are unknown to the layer are ignored. + /// + [FieldOffset(8)] + public byte* SettingName; + + /// + /// Type is a VkLayerSettingTypeEXT value specifying the type of the pValues values. + /// + [FieldOffset(16)] + public VkLayerSettingTypeEXT Type; + + /// + /// ValueCount is the number of values used to configure the layer setting. + /// + [FieldOffset(20)] + public int ValueCount; + + /// + /// Values is a pointer to an array of valueCount values of the type indicated by type to configure the layer setting. + /// + [FieldOffset(24)] + public void* Values; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkLayerSettingsCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkLayerSettingsCreateInfoEXT.gen.cs new file mode 100644 index 0000000..bbdc3b2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkLayerSettingsCreateInfoEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkLayerSettingsCreateInfoEXT - Specify layer capabilities for a Vulkan instance + /// + /// + /// + /// To create a Vulkan instance with a specific configuration of layer settings, + /// add VkLayerSettingsCreateInfoEXT structures to the pNext chain + /// of the VkInstanceCreateInfo structure, specifying the settings to be + /// configured. + /// + /// + /// // Provided by VK_EXT_layer_settings + /// typedef struct VkLayerSettingsCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t settingCount; + /// const VkLayerSettingEXT* pSettings; + /// } VkLayerSettingsCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkLayerSettingsCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.LayerSettingsCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SettingCount is the number of settings to configure. + /// + [FieldOffset(16)] + public int SettingCount; + + /// + /// Settings is a pointer to an array of settingCount VkLayerSettingEXT values specifying the settings to be configured. + /// + [FieldOffset(24)] + public VkLayerSettingEXT* Settings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMappedMemoryRange.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMappedMemoryRange.gen.cs new file mode 100644 index 0000000..4d5ac83 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMappedMemoryRange.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMappedMemoryRange - Structure specifying a mapped memory range + /// + /// + /// + /// The VkMappedMemoryRange structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkMappedMemoryRange { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// } VkMappedMemoryRange; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkMappedMemoryRange() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MappedMemoryRange; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the memory object to which this range belongs. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// Offset is the zero-based byte offset from the beginning of the memory object. + /// + [FieldOffset(24)] + public ByteSize64 Offset; + + /// + /// Size is either the size of range, or VK_WHOLE_SIZE to affect the range from offset to the end of the current mapping of the allocation. + /// + [FieldOffset(32)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryAllocateFlagsInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryAllocateFlagsInfo.gen.cs new file mode 100644 index 0000000..93f0353 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryAllocateFlagsInfo.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryAllocateFlagsInfo - Structure controlling how many instances of memory will be allocated + /// + /// + /// + /// If the pNext chain of VkMemoryAllocateInfo includes a + /// VkMemoryAllocateFlagsInfo structure, then that structure includes + /// flags and a device mask controlling how many instances of the memory will be + /// allocated. + /// + /// + /// The VkMemoryAllocateFlagsInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkMemoryAllocateFlagsInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkMemoryAllocateFlags flags; + /// uint32_t deviceMask; + /// } VkMemoryAllocateFlagsInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryAllocateFlagsInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryAllocateFlagsInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkMemoryAllocateFlags controlling the allocation. + /// + [FieldOffset(16)] + public VkMemoryAllocateFlags Flags; + + /// + /// DeviceMask is a mask of physical devices in the logical device, indicating that memory must be allocated on each device in the mask, if VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT is set in flags. + /// + [FieldOffset(20)] + public int DeviceMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryAllocateInfo.gen.cs new file mode 100644 index 0000000..67620a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryAllocateInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryAllocateInfo - Structure containing parameters of a memory allocation + /// + /// + /// + /// The VkMemoryAllocateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkMemoryAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceSize allocationSize; + /// uint32_t memoryTypeIndex; + /// } VkMemoryAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AllocationSize is the size of the allocation in bytes. + /// + [FieldOffset(16)] + public ByteSize64 AllocationSize; + + /// + /// MemoryTypeIndex is an index identifying a memory type from the memoryTypes array of the VkPhysicalDeviceMemoryProperties structure. + /// + [FieldOffset(24)] + public int MemoryTypeIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryBarrier.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryBarrier.gen.cs new file mode 100644 index 0000000..c806c5c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryBarrier.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryBarrier - Structure specifying a global memory barrier + /// + /// + /// + /// The VkMemoryBarrier structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkMemoryBarrier { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccessFlags srcAccessMask; + /// VkAccessFlags dstAccessMask; + /// } VkMemoryBarrier; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryBarrier() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryBarrier; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcAccessMask is a bitmask of VkAccessFlags specifying a source access mask^. + /// + [FieldOffset(16)] + public VkAccessFlags SrcAccessMask; + + /// + /// DstAccessMask is a bitmask of VkAccessFlags specifying a destination access mask^. + /// + [FieldOffset(20)] + public VkAccessFlags DstAccessMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryBarrier2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryBarrier2.gen.cs new file mode 100644 index 0000000..5bf7295 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryBarrier2.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryBarrier2 - Structure specifying a global memory barrier + /// + /// + /// + /// :refpage: VkMemoryBarrier2 + /// + /// + /// The VkMemoryBarrier2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkMemoryBarrier2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineStageFlags2 srcStageMask; + /// VkAccessFlags2 srcAccessMask; + /// VkPipelineStageFlags2 dstStageMask; + /// VkAccessFlags2 dstAccessMask; + /// } VkMemoryBarrier2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkMemoryBarrier2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryBarrier2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope^. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 SrcStageMask; + + /// + /// SrcAccessMask is a VkAccessFlags2 mask of access flags to be included in the first access scope^. + /// + [FieldOffset(24)] + public VkAccessFlags2 SrcAccessMask; + + /// + /// DstStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope^. + /// + [FieldOffset(32)] + public VkPipelineStageFlags2 DstStageMask; + + /// + /// DstAccessMask is a VkAccessFlags2 mask of access flags to be included in the second access scope^. + /// + [FieldOffset(40)] + public VkAccessFlags2 DstAccessMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryBarrierAccessFlags3KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryBarrierAccessFlags3KHR.gen.cs new file mode 100644 index 0000000..7013b65 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryBarrierAccessFlags3KHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryBarrierAccessFlags3KHR - Structure specifying additional access flags + /// + /// + /// + /// The VkMemoryBarrierAccessFlags3KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance8 + /// typedef struct VkMemoryBarrierAccessFlags3KHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkAccessFlags3KHR srcAccessMask3; + /// VkAccessFlags3KHR dstAccessMask3; + /// } VkMemoryBarrierAccessFlags3KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryBarrierAccessFlags3KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryBarrierAccessFlags3KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcAccessMask3 is a VkAccessFlags3KHR mask of access flags to be included in the first access scope^. + /// + [FieldOffset(16)] + public VkAccessFlags3KHR SrcAccessMask3; + + /// + /// DstAccessMask3 is a VkAccessFlags3KHR mask of access flags to be included in the second access scope^. + /// + [FieldOffset(24)] + public VkAccessFlags3KHR DstAccessMask3; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfo.gen.cs new file mode 100644 index 0000000..b65b23f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfo.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryDedicatedAllocateInfo - Specify a dedicated memory allocation resource + /// + /// + /// + /// If the pNext chain includes a VkMemoryDedicatedAllocateInfo + /// structure, then that structure includes a handle of the sole buffer or image + /// resource that the memory can be bound to. + /// + /// + /// The VkMemoryDedicatedAllocateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkMemoryDedicatedAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage image; + /// VkBuffer buffer; + /// } VkMemoryDedicatedAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryDedicatedAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryDedicatedAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image is VK_NULL_HANDLE or a handle of an image which this memory will be bound to. + /// + [FieldOffset(16)] + public VkImage Image; + + /// + /// Buffer is VK_NULL_HANDLE or a handle of a buffer which this memory will be bound to. + /// + [FieldOffset(24)] + public VkBuffer Buffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfoTensorARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfoTensorARM.gen.cs new file mode 100644 index 0000000..1382a59 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedAllocateInfoTensorARM.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryDedicatedAllocateInfoTensorARM - Specify a dedicated memory allocation tensor resource + /// + /// + /// + /// If the pNext chain includes a + /// VkMemoryDedicatedAllocateInfoTensorARM structure, then that structure + /// includes a handle of the sole tensor resource that the memory can be bound + /// to. + /// + /// + /// The VkMemoryDedicatedAllocateInfoTensorARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkMemoryDedicatedAllocateInfoTensorARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorARM tensor; + /// } VkMemoryDedicatedAllocateInfoTensorARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryDedicatedAllocateInfoTensorARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryDedicatedAllocateInfoTensorARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Tensor is a handle of a tensor which this memory will be bound to. + /// + [FieldOffset(16)] + public VkTensorARM Tensor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedRequirements.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedRequirements.gen.cs new file mode 100644 index 0000000..0a3970b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryDedicatedRequirements.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryDedicatedRequirements - Structure describing dedicated allocation requirements of buffer and image resources + /// + /// + /// + /// The VkMemoryDedicatedRequirements structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkMemoryDedicatedRequirements { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 prefersDedicatedAllocation; + /// VkBool32 requiresDedicatedAllocation; + /// } VkMemoryDedicatedRequirements; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryDedicatedRequirements() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryDedicatedRequirements; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrefersDedicatedAllocation specifies that the implementation would prefer a dedicated allocation for this resource. The application is still free to suballocate the resource but it may: get better performance if a dedicated allocation is used. + /// + [FieldOffset(16)] + public Brutal.Bool32 PrefersDedicatedAllocation; + + /// + /// RequiresDedicatedAllocation specifies that a dedicated allocation is required for this resource. + /// + [FieldOffset(20)] + public Brutal.Bool32 RequiresDedicatedAllocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryFdPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryFdPropertiesKHR.gen.cs new file mode 100644 index 0000000..d393366 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryFdPropertiesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryFdPropertiesKHR - Properties of External Memory File Descriptors + /// + /// + /// + /// The VkMemoryFdPropertiesKHR structure returned is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_fd + /// typedef struct VkMemoryFdPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t memoryTypeBits; + /// } VkMemoryFdPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryFdPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryFdPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryTypeBits is a bitmask containing one bit set for every memory type which the specified file descriptor can be imported as. + /// + [FieldOffset(16)] + public int MemoryTypeBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryGetFdInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryGetFdInfoKHR.gen.cs new file mode 100644 index 0000000..cb65d8e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryGetFdInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryGetFdInfoKHR - Structure describing a POSIX FD memory export operation + /// + /// + /// + /// The VkMemoryGetFdInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_memory_fd + /// typedef struct VkMemoryGetFdInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkMemoryGetFdInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryGetFdInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryGetFdInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the memory object from which the handle will be exported. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryGetRemoteAddressInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryGetRemoteAddressInfoNV.gen.cs new file mode 100644 index 0000000..7e0320c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryGetRemoteAddressInfoNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryGetRemoteAddressInfoNV - Structure describing a remote accessible address export operation + /// + /// + /// + /// The VkMemoryGetRemoteAddressInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_external_memory_rdma + /// typedef struct VkMemoryGetRemoteAddressInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkMemoryGetRemoteAddressInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryGetRemoteAddressInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryGetRemoteAddressInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the memory object from which the remote accessible address will be exported. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// HandleType is the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryHeap.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryHeap.gen.cs new file mode 100644 index 0000000..5b4f373 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryHeap.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryHeap - Structure specifying a memory heap + /// + /// + /// + /// The VkMemoryHeap structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkMemoryHeap { + /// VkDeviceSize size; + /// VkMemoryHeapFlags flags; + /// } VkMemoryHeap; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkMemoryHeap() + { + /// + /// Size is the total memory size in bytes in the heap. + /// + [FieldOffset(0)] + public ByteSize64 Size; + + /// + /// Flags is a bitmask of VkMemoryHeapFlags specifying attribute flags for the heap. + /// + [FieldOffset(8)] + public VkMemoryHeapFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryHostPointerPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryHostPointerPropertiesEXT.gen.cs new file mode 100644 index 0000000..6a38157 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryHostPointerPropertiesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryHostPointerPropertiesEXT - Properties of external memory host pointer + /// + /// + /// + /// The VkMemoryHostPointerPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_host + /// typedef struct VkMemoryHostPointerPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t memoryTypeBits; + /// } VkMemoryHostPointerPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryHostPointerPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryHostPointerPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryTypeBits is a bitmask containing one bit set for every memory type which the specified host pointer can be imported as. + /// + [FieldOffset(16)] + public int MemoryTypeBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryMapInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryMapInfo.gen.cs new file mode 100644 index 0000000..d554612 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryMapInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryMapInfo - Structure containing parameters of a memory map operation + /// + /// + /// + /// The VkMemoryMapInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkMemoryMapInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkMemoryMapFlags flags; + /// VkDeviceMemory memory; + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// } VkMemoryMapInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkMemoryMapInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryMapInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkMemoryMapFlags specifying additional parameters of the memory map operation. + /// + [FieldOffset(16)] + public VkMemoryMapFlags Flags; + + /// + /// Memory is the VkDeviceMemory object to be mapped. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + + /// + /// Offset is a zero-based byte offset from the beginning of the memory object. + /// + [FieldOffset(32)] + public ByteSize64 Offset; + + /// + /// Size is the size of the memory range to map, or VK_WHOLE_SIZE to map from offset to the end of the allocation. + /// + [FieldOffset(40)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryMapPlacedInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryMapPlacedInfoEXT.gen.cs new file mode 100644 index 0000000..996bf15 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryMapPlacedInfoEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryMapPlacedInfoEXT - Structure containing memory map placement parameters + /// + /// + /// + /// If VK_MEMORY_MAP_PLACED_BIT_EXT is set in + /// VkMemoryMapInfo::flags and the pNext chain of + /// VkMemoryMapInfo includes a VkMemoryMapPlacedInfoEXT structure, + /// then that structure specifies the placement address of the memory map. + /// The implementation will place the memory map at the specified address, + /// replacing any existing maps in the specified memory range. + /// Replacing memory maps in this way does not implicitly unmap Vulkan memory + /// objects. + /// Instead, the application must ensure no other Vulkan memory objects are + /// mapped anywhere in the specified virtual address range. + /// If successful, ppData will be set to the same value as + /// VkMemoryMapPlacedInfoEXT::pPlacedAddress and vkMapMemory2 + /// will return VK_SUCCESS. + /// If it cannot place the map at the requested address for any reason, the + /// memory object is left unmapped and vkMapMemory2 will return + /// VK_ERROR_MEMORY_MAP_FAILED. + /// + /// + /// The VkMemoryMapPlacedInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_map_memory_placed + /// typedef struct VkMemoryMapPlacedInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// void* pPlacedAddress; + /// } VkMemoryMapPlacedInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryMapPlacedInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryMapPlacedInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PlacedAddress is the virtual address at which to place the address. If VkMemoryMapInfo::flags does not contain VK_MEMORY_MAP_PLACED_BIT_EXT, this value is ignored. + /// + [FieldOffset(16)] + public void* PlacedAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryMarkerInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryMarkerInfoAMD.gen.cs new file mode 100644 index 0000000..0d0c868 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryMarkerInfoAMD.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryMarkerInfoAMD - Memory marker write info + /// + /// + /// + /// :refpage: VkMemoryMarkerInfoAMD + /// + /// + /// VkMemoryMarkerInfoAMD is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker + /// typedef struct VkMemoryMarkerInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineStageFlags2KHR stage; + /// VkDeviceAddressRangeKHR dstRange; + /// VkAddressCommandFlagsKHR dstFlags; + /// uint32_t marker; + /// } VkMemoryMarkerInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkMemoryMarkerInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryMarkerInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Stage specifies the pipeline stage whose completion triggers the marker write. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2KHR Stage; + + /// + /// DstRange is the VkDeviceAddressRangeKHR where the marker will be written. + /// + [FieldOffset(24)] + public VkDeviceAddressRangeKHR DstRange; + + /// + /// DstFlags is a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range. + /// + [FieldOffset(40)] + public VkAddressCommandFlagsKHR DstFlags; + + /// + /// Marker is the 32-bit value of the marker. + /// + [FieldOffset(44)] + public int Marker; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryOpaqueCaptureAddressAllocateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryOpaqueCaptureAddressAllocateInfo.gen.cs new file mode 100644 index 0000000..4a40dbd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryOpaqueCaptureAddressAllocateInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryOpaqueCaptureAddressAllocateInfo - Request a specific address for a memory allocation + /// + /// + /// + /// To request a specific device address for a memory allocation, add a + /// VkMemoryOpaqueCaptureAddressAllocateInfo structure to the pNext + /// chain of the VkMemoryAllocateInfo structure. + /// The VkMemoryOpaqueCaptureAddressAllocateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkMemoryOpaqueCaptureAddressAllocateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t opaqueCaptureAddress; + /// } VkMemoryOpaqueCaptureAddressAllocateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryOpaqueCaptureAddressAllocateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryOpaqueCaptureAddressAllocateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OpaqueCaptureAddress is the opaque capture address requested for the memory allocation. + /// + [FieldOffset(16)] + public nint OpaqueCaptureAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryPriorityAllocateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryPriorityAllocateInfoEXT.gen.cs new file mode 100644 index 0000000..84d1446 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryPriorityAllocateInfoEXT.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryPriorityAllocateInfoEXT - Specify a memory allocation priority + /// + /// + /// + /// If the pNext chain includes a VkMemoryPriorityAllocateInfoEXT + /// structure, then that structure includes a priority for the memory. + /// + /// + /// The VkMemoryPriorityAllocateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_memory_priority + /// typedef struct VkMemoryPriorityAllocateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// float priority; + /// } VkMemoryPriorityAllocateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMemoryPriorityAllocateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryPriorityAllocateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Priority is a floating-point value between `0` and `1`, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent. + /// + [FieldOffset(16)] + public float Priority; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarrierKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarrierKHR.gen.cs new file mode 100644 index 0000000..09620b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarrierKHR.gen.cs @@ -0,0 +1,92 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryRangeBarrierKHR - Structure specifying a memory range barrier + /// + /// + /// + /// :refpage: VkMemoryRangeBarrierKHR + /// + /// + /// The VkMemoryRangeBarrierKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkMemoryRangeBarrierKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineStageFlags2 srcStageMask; + /// VkAccessFlags2 srcAccessMask; + /// VkPipelineStageFlags2 dstStageMask; + /// VkAccessFlags2 dstAccessMask; + /// uint32_t srcQueueFamilyIndex; + /// uint32_t dstQueueFamilyIndex; + /// VkDeviceAddressRangeKHR addressRange; + /// VkAddressCommandFlagsKHR addressFlags; + /// } VkMemoryRangeBarrierKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkMemoryRangeBarrierKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryRangeBarrierKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope^. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 SrcStageMask; + + /// + /// SrcAccessMask is a VkAccessFlags2 mask of access flags to be included in the first access scope^. + /// + [FieldOffset(24)] + public VkAccessFlags2 SrcAccessMask; + + /// + /// DstStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope^. + /// + [FieldOffset(32)] + public VkPipelineStageFlags2 DstStageMask; + + /// + /// DstAccessMask is a VkAccessFlags2 mask of access flags to be included in the second access scope^. + /// + [FieldOffset(40)] + public VkAccessFlags2 DstAccessMask; + + /// + /// SrcQueueFamilyIndex is the source queue family for a queue family ownership transfer^. + /// + [FieldOffset(48)] + public int SrcQueueFamilyIndex; + + /// + /// DstQueueFamilyIndex is the destination queue family for a queue family ownership transfer^. + /// + [FieldOffset(52)] + public int DstQueueFamilyIndex; + + /// + /// AddressRange is a VkDeviceAddressRangeKHR structure specifying the address range affected by the barrier. + /// + [FieldOffset(56)] + public VkDeviceAddressRangeKHR AddressRange; + + /// + /// AddressFlags is a VkAddressCommandFlagsKHR value defining the flags for the address range. + /// + [FieldOffset(72)] + public VkAddressCommandFlagsKHR AddressFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarriersInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarriersInfoKHR.gen.cs new file mode 100644 index 0000000..db71124 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryRangeBarriersInfoKHR.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryRangeBarriersInfoKHR - Structure specifying memory range barriers + /// + /// + /// + /// :refpage: VkMemoryRangeBarriersInfoKHR + /// + /// + /// The VkMemoryRangeBarriersInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkMemoryRangeBarriersInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t memoryRangeBarrierCount; + /// const VkMemoryRangeBarrierKHR* pMemoryRangeBarriers; + /// } VkMemoryRangeBarriersInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryRangeBarriersInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryRangeBarriersInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryRangeBarrierCount is the length of the pMemoryRangeBarriers array + /// + [FieldOffset(16)] + public int MemoryRangeBarrierCount; + + /// + /// MemoryRangeBarriers is a pointer to an array of VkMemoryRangeBarrierKHR structures defining memory dependencies between accesses to specified memory ranges. + /// + [FieldOffset(24)] + public VkMemoryRangeBarrierKHR* MemoryRangeBarriers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryRequirements.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryRequirements.gen.cs new file mode 100644 index 0000000..c3eb04a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryRequirements.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryRequirements - Structure specifying memory requirements + /// + /// + /// + /// The VkMemoryRequirements structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkMemoryRequirements { + /// VkDeviceSize size; + /// VkDeviceSize alignment; + /// uint32_t memoryTypeBits; + /// } VkMemoryRequirements; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkMemoryRequirements() + { + /// + /// Size is the size, in bytes, of the memory allocation required: for the resource. + /// + [FieldOffset(0)] + public ByteSize64 Size; + + /// + /// Alignment is the alignment, in bytes, of the offset within the allocation required: for the resource. + /// + [FieldOffset(8)] + public ByteSize64 Alignment; + + /// + /// MemoryTypeBits is a bitmask and contains one bit set for every supported memory type for the resource. Bit `i` is set if and only if the memory type `i` in the VkPhysicalDeviceMemoryProperties structure for the physical device is supported for the resource. + /// + [FieldOffset(16)] + public int MemoryTypeBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryRequirements2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryRequirements2.gen.cs new file mode 100644 index 0000000..6cb4bfe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryRequirements2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryRequirements2 - Structure specifying memory requirements + /// + /// + /// + /// The VkMemoryRequirements2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkMemoryRequirements2 { + /// VkStructureType sType; + /// void* pNext; + /// VkMemoryRequirements memoryRequirements; + /// } VkMemoryRequirements2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkMemoryRequirements2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryRequirements2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryRequirements is a VkMemoryRequirements structure describing the memory requirements of the resource. + /// + [FieldOffset(16)] + public VkMemoryRequirements MemoryRequirements; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryToImageCopy.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryToImageCopy.gen.cs new file mode 100644 index 0000000..3655cca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryToImageCopy.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryToImageCopy - Structure specifying a host memory to image copy operation + /// + /// + /// + /// :refpage: VkMemoryToImageCopy + /// :bufferrowlength: memoryRowLength + /// :bufferimageheight: memoryImageHeight + /// + /// + /// Each element of VkCopyMemoryToImageInfo::pRegions is a structure + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkMemoryToImageCopy { + /// VkStructureType sType; + /// const void* pNext; + /// const void* pHostPointer; + /// uint32_t memoryRowLength; + /// uint32_t memoryImageHeight; + /// VkImageSubresourceLayers imageSubresource; + /// VkOffset3D imageOffset; + /// VkExtent3D imageExtent; + /// } VkMemoryToImageCopy; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkMemoryToImageCopy() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryToImageCopy; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HostPointer is the host memory address which is the source of the copy. + /// + [FieldOffset(16)] + public void* HostPointer; + + /// + /// MemoryRowLength and memoryImageHeight specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the imageExtent. + /// + [FieldOffset(24)] + public int MemoryRowLength; + + /// + /// MemoryImageHeight + /// + [FieldOffset(28)] + public int MemoryImageHeight; + + /// + /// ImageSubresource is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data. + /// + [FieldOffset(32)] + public VkImageSubresourceLayers ImageSubresource; + + /// + /// ImageOffset selects the initial x, y, z offsets in texels of the sub-region of the destination image data. + /// + [FieldOffset(48)] + public VkOffset3D ImageOffset; + + /// + /// ImageExtent is the size in texels of the image to copy in width, height and depth. + /// + [FieldOffset(60)] + public VkExtent3D ImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryType.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryType.gen.cs new file mode 100644 index 0000000..47e824b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryType.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryType - Structure specifying memory type + /// + /// + /// + /// The VkMemoryType structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkMemoryType { + /// VkMemoryPropertyFlags propertyFlags; + /// uint32_t heapIndex; + /// } VkMemoryType; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkMemoryType() + { + /// + /// PropertyFlags is a bitmask of VkMemoryPropertyFlags of properties for this memory type. + /// + [FieldOffset(0)] + public VkMemoryPropertyFlags PropertyFlags; + + /// + /// HeapIndex describes which memory heap this memory type corresponds to, and must be less than memoryHeapCount from the VkPhysicalDeviceMemoryProperties structure. + /// + [FieldOffset(4)] + public int HeapIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMemoryUnmapInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMemoryUnmapInfo.gen.cs new file mode 100644 index 0000000..ddb1b00 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMemoryUnmapInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMemoryUnmapInfo - Structure containing parameters of a memory unmap operation + /// + /// + /// + /// The VkMemoryUnmapInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkMemoryUnmapInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkMemoryUnmapFlags flags; + /// VkDeviceMemory memory; + /// } VkMemoryUnmapInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMemoryUnmapInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MemoryUnmapInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkMemoryUnmapFlags specifying additional parameters of the memory map operation. + /// + [FieldOffset(16)] + public VkMemoryUnmapFlags Flags; + + /// + /// Memory is the VkDeviceMemory object to be unmapped. + /// + [FieldOffset(24)] + public VkDeviceMemory Memory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapBuildInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapBuildInfoEXT.gen.cs new file mode 100644 index 0000000..95053ed --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapBuildInfoEXT.gen.cs @@ -0,0 +1,113 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapBuildInfoEXT - Structure specifying the data used to build a micromap + /// + /// + /// + /// :refpage: VkMicromapBuildInfoEXT + /// + /// + /// The VkMicromapBuildInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkMicromapBuildInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkMicromapTypeEXT type; + /// VkBuildMicromapFlagsEXT flags; + /// VkBuildMicromapModeEXT mode; + /// VkMicromapEXT dstMicromap; + /// uint32_t usageCountsCount; + /// const VkMicromapUsageEXT* pUsageCounts; + /// const VkMicromapUsageEXT* const* ppUsageCounts; + /// VkDeviceOrHostAddressConstKHR data; + /// VkDeviceOrHostAddressKHR scratchData; + /// VkDeviceOrHostAddressConstKHR triangleArray; + /// VkDeviceSize triangleArrayStride; + /// } VkMicromapBuildInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkMicromapBuildInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MicromapBuildInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is a VkMicromapTypeEXT value specifying the type of micromap being built. + /// + [FieldOffset(16)] + public VkMicromapTypeEXT Type; + + /// + /// Flags is a bitmask of VkBuildMicromapFlagsEXT specifying additional parameters of the micromap. + /// + [FieldOffset(20)] + public VkBuildMicromapFlagsEXT Flags; + + /// + /// Mode is a VkBuildMicromapModeEXT value specifying the type of operation to perform. + /// + [FieldOffset(24)] + public VkBuildMicromapModeEXT Mode; + + /// + /// DstMicromap is a pointer to the target micromap for the build. + /// + [FieldOffset(32)] + public VkMicromapEXT DstMicromap; + + /// + /// UsageCountsCount specifies the number of usage counts structures that will be used to determine the size of this micromap. + /// + [FieldOffset(40)] + public int UsageCountsCount; + + /// + /// UsageCounts is a pointer to an array of VkMicromapUsageEXT structures. + /// + [FieldOffset(48)] + public VkMicromapUsageEXT* UsageCounts; + + /// + /// ppUsageCounts is a pointer to an array of pointers to VkMicromapUsageEXT structures. + /// + [FieldOffset(56)] + public VkMicromapUsageEXT** ppUsageCounts; + + /// + /// Data is the device or host address of memory which contains the data for the micromap. + /// + [FieldOffset(64)] + public VkDeviceOrHostAddressConstKHR Data; + + /// + /// ScratchData is the device or host address of memory that will be used as scratch memory for the build. + /// + [FieldOffset(72)] + public VkDeviceOrHostAddressKHR ScratchData; + + /// + /// TriangleArray is the device or host address of memory containing the VkMicromapTriangleEXT data + /// + [FieldOffset(80)] + public VkDeviceOrHostAddressConstKHR TriangleArray; + + /// + /// TriangleArrayStride is the stride in bytes between each element of triangleArray + /// + [FieldOffset(88)] + public ByteSize64 TriangleArrayStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapBuildSizesInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapBuildSizesInfoEXT.gen.cs new file mode 100644 index 0000000..2923578 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapBuildSizesInfoEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapBuildSizesInfoEXT - Structure specifying build sizes for a micromap + /// + /// + /// + /// :refpage: VkMicromapBuildSizesInfoEXT + /// + /// + /// The VkMicromapBuildSizesInfoEXT structure describes the required build + /// sizes for a micromap and scratch buffers and is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkMicromapBuildSizesInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceSize micromapSize; + /// VkDeviceSize buildScratchSize; + /// VkBool32 discardable; + /// } VkMicromapBuildSizesInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkMicromapBuildSizesInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MicromapBuildSizesInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MicromapSize is the size in bytes required in a VkMicromapEXT for a build or update operation. + /// + [FieldOffset(16)] + public ByteSize64 MicromapSize; + + /// + /// BuildScratchSize is the size in bytes required in a scratch buffer for a build operation. + /// + [FieldOffset(24)] + public ByteSize64 BuildScratchSize; + + /// + /// Discardable indicates whether or not the micromap object may be destroyed after an acceleration structure build or update. A false value means that acceleration structures built with this micromap may: contain references to the data contained therein, and the application must not destroy the micromap until ray traversal has concluded. A true value means that the information in the micromap will be copied by value into the acceleration structure, and the micromap can be destroyed after the acceleration structure build concludes. + /// + [FieldOffset(32)] + public Brutal.Bool32 Discardable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapCreateInfoEXT.gen.cs new file mode 100644 index 0000000..5be93fc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapCreateInfoEXT.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapCreateInfoEXT - Structure specifying the parameters of a newly created micromap object + /// + /// + /// + /// :refpage: VkMicromapCreateInfoEXT + /// + /// + /// The VkMicromapCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkMicromapCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkMicromapCreateFlagsEXT createFlags; + /// VkBuffer buffer; + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// VkMicromapTypeEXT type; + /// VkDeviceAddress deviceAddress; + /// } VkMicromapCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkMicromapCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MicromapCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CreateFlags is a bitmask of VkMicromapCreateFlagsEXT specifying additional creation parameters of the micromap. + /// + [FieldOffset(16)] + public VkMicromapCreateFlagsEXT CreateFlags; + + /// + /// Buffer is the buffer on which the micromap will be stored. + /// + [FieldOffset(24)] + public VkBuffer Buffer; + + /// + /// Offset is an offset in bytes from the base address of the buffer at which the micromap will be stored, and must be a multiple of `256`. + /// + [FieldOffset(32)] + public ByteSize64 Offset; + + /// + /// Size is the size required for the micromap. + /// + [FieldOffset(40)] + public ByteSize64 Size; + + /// + /// Type is a VkMicromapTypeEXT value specifying the type of micromap that will be created. + /// + [FieldOffset(48)] + public VkMicromapTypeEXT Type; + + /// + /// DeviceAddress is the device address requested for the micromap if the VkPhysicalDeviceOpacityMicromapFeaturesEXT::micromapCaptureReplay^ feature is being used. + /// + [FieldOffset(56)] + public VkDeviceAddress DeviceAddress; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapTriangleKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapTriangleKHR.gen.cs new file mode 100644 index 0000000..6efe81f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapTriangleKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapTriangleKHR - Structure specifying the micromap format and data for a triangle + /// + /// + /// + /// :refpage: VkMicromapTriangleKHR + /// + /// + /// The VkMicromapTriangleKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef struct VkMicromapTriangleKHR { + /// uint32_t dataOffset; + /// uint16_t subdivisionLevel; + /// uint16_t format; + /// } VkMicromapTriangleKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkMicromapTriangleKHR() + { + /// + /// DataOffset is the offset in bytes of the start of the data for this triangle. This is a byte aligned value. + /// + [FieldOffset(0)] + public int DataOffset; + + /// + /// SubdivisionLevel is the subdivision level of this triangle + /// + [FieldOffset(4)] + public ushort SubdivisionLevel; + + /// + /// Format is the format of this triangle + /// + [FieldOffset(6)] + public ushort Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapUsageEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapUsageEXT.gen.cs new file mode 100644 index 0000000..1763d4a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapUsageEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapUsageEXT - Structure specifying the usage information used to build a micromap + /// + /// + /// + /// :refpage: VkMicromapUsageEXT + /// + /// + /// The VkMicromapUsageEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkMicromapUsageEXT { + /// uint32_t count; + /// uint32_t subdivisionLevel; + /// uint32_t format; + /// } VkMicromapUsageEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkMicromapUsageEXT() + { + /// + /// Count is the number of triangles in the usage format defined by the subdivisionLevel and format below in the micromap + /// + [FieldOffset(0)] + public int Count; + + /// + /// SubdivisionLevel is the subdivision level of this usage format + /// + [FieldOffset(4)] + public int SubdivisionLevel; + + /// + /// Format is the format of this usage format + /// + [FieldOffset(8)] + public int Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapUsageKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapUsageKHR.gen.cs new file mode 100644 index 0000000..90188e3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapUsageKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapUsageKHR - Structure specifying the usage information used to build a micromap + /// + /// + /// + /// :refpage: VkMicromapUsageKHR + /// + /// + /// The VkMicromapUsageKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef struct VkMicromapUsageKHR { + /// uint32_t count; + /// uint32_t subdivisionLevel; + /// VkOpacityMicromapFormatKHR format; + /// } VkMicromapUsageKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkMicromapUsageKHR() + { + /// + /// Count is the number of triangles in the usage format defined by the subdivisionLevel and format below in the micromap + /// + [FieldOffset(0)] + public int Count; + + /// + /// SubdivisionLevel is the subdivision level of this usage format + /// + [FieldOffset(4)] + public int SubdivisionLevel; + + /// + /// Format is the format of this usage format + /// + [FieldOffset(8)] + public VkOpacityMicromapFormatKHR Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMicromapVersionInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMicromapVersionInfoEXT.gen.cs new file mode 100644 index 0000000..34f9b7b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMicromapVersionInfoEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMicromapVersionInfoEXT - Micromap version information + /// + /// + /// + /// :refpage: VkMicromapVersionInfoEXT + /// + /// + /// The VkMicromapVersionInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkMicromapVersionInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const uint8_t* pVersionData; + /// } VkMicromapVersionInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMicromapVersionInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MicromapVersionInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VersionData is a pointer to the version header of a micromap as defined in vkCmdCopyMicromapToMemoryEXT + /// + [FieldOffset(16)] + public byte* VersionData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMultiDrawIndexedInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMultiDrawIndexedInfoEXT.gen.cs new file mode 100644 index 0000000..b25bc92 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMultiDrawIndexedInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMultiDrawIndexedInfoEXT - Structure specifying a multi-draw command + /// + /// + /// + /// The VkMultiDrawIndexedInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_multi_draw + /// typedef struct VkMultiDrawIndexedInfoEXT { + /// uint32_t firstIndex; + /// uint32_t indexCount; + /// int32_t vertexOffset; + /// } VkMultiDrawIndexedInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkMultiDrawIndexedInfoEXT() + { + /// + /// FirstIndex is the first index to draw. + /// + [FieldOffset(0)] + public int FirstIndex; + + /// + /// IndexCount is the number of vertices to draw. + /// + [FieldOffset(4)] + public int IndexCount; + + /// + /// VertexOffset is the value added to the vertex index before indexing into the vertex buffer for indexed multidraws. + /// + [FieldOffset(8)] + public int VertexOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMultiDrawInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMultiDrawInfoEXT.gen.cs new file mode 100644 index 0000000..8cc893c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMultiDrawInfoEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMultiDrawInfoEXT - Structure specifying a multi-draw command + /// + /// + /// + /// The VkMultiDrawInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_multi_draw + /// typedef struct VkMultiDrawInfoEXT { + /// uint32_t firstVertex; + /// uint32_t vertexCount; + /// } VkMultiDrawInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkMultiDrawInfoEXT() + { + /// + /// FirstVertex is the first vertex to draw. + /// + [FieldOffset(0)] + public int FirstVertex; + + /// + /// VertexCount is the number of vertices to draw. + /// + [FieldOffset(4)] + public int VertexCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMultisamplePropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMultisamplePropertiesEXT.gen.cs new file mode 100644 index 0000000..0a6843a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMultisamplePropertiesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMultisamplePropertiesEXT - Structure returning information about sample count specific additional multisampling capabilities + /// + /// + /// + /// The VkMultisamplePropertiesEXT structure is defined as + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkMultisamplePropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D maxSampleLocationGridSize; + /// } VkMultisamplePropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMultisamplePropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MultisamplePropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxSampleLocationGridSize is the maximum size of the pixel grid in which sample locations can vary. + /// + [FieldOffset(16)] + public VkExtent2D MaxSampleLocationGridSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMultisampledRenderToSingleSampledInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMultisampledRenderToSingleSampledInfoEXT.gen.cs new file mode 100644 index 0000000..c6b5af3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMultisampledRenderToSingleSampledInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMultisampledRenderToSingleSampledInfoEXT - Structure containing info for multisampled rendering to single-sampled attachments in a subpass + /// + /// + /// + /// If the pNext chain of VkSubpassDescription2 + /// includes a VkMultisampledRenderToSingleSampledInfoEXT structure, then + /// that structure describes how multisampled rendering is performed on single + /// sampled attachments in that subpass. + /// + /// + /// The VkMultisampledRenderToSingleSampledInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// typedef struct VkMultisampledRenderToSingleSampledInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 multisampledRenderToSingleSampledEnable; + /// VkSampleCountFlagBits rasterizationSamples; + /// } VkMultisampledRenderToSingleSampledInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMultisampledRenderToSingleSampledInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MultisampledRenderToSingleSampledInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MultisampledRenderToSingleSampledEnable controls whether multisampled rendering to single-sampled attachments is performed as described below^. + /// + [FieldOffset(16)] + public Brutal.Bool32 MultisampledRenderToSingleSampledEnable; + + /// + /// RasterizationSamples is a VkSampleCountFlags specifying the number of samples used in rasterization. + /// + [FieldOffset(20)] + public VkSampleCountFlags RasterizationSamples; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewAttributesInfoNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewAttributesInfoNVX.gen.cs new file mode 100644 index 0000000..8fe3aa1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewAttributesInfoNVX.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMultiviewPerViewAttributesInfoNVX - Structure specifying the multiview per-attribute properties + /// + /// + /// + /// The VkMultiviewPerViewAttributesInfoNVX structure is defined as: + /// + /// + /// // Provided by VK_NVX_multiview_per_view_attributes with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// typedef struct VkMultiviewPerViewAttributesInfoNVX { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 perViewAttributes; + /// VkBool32 perViewAttributesPositionXOnly; + /// } VkMultiviewPerViewAttributesInfoNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkMultiviewPerViewAttributesInfoNVX() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MultiviewPerViewAttributesInfoNVX; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerViewAttributes specifies that shaders compiled for this pipeline write the attributes for all views in a single invocation of each vertex processing stage. All pipelines executed within a render pass instance that includes this bit must write per-view attributes to the `*PerViewNV[]` shader outputs, in addition to the non-per-view (e.g. Position) outputs. + /// + [FieldOffset(16)] + public Brutal.Bool32 PerViewAttributes; + + /// + /// PerViewAttributesPositionXOnly specifies that shaders compiled for this pipeline use per-view positions which only differ in value in the x component. Per-view viewport mask can also be used. + /// + [FieldOffset(20)] + public Brutal.Bool32 PerViewAttributesPositionXOnly; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.gen.cs new file mode 100644 index 0000000..0692d78 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM - Set the multiview per view render areas for a render pass instance + /// + /// + /// + /// If a render pass instance enables multiview and if the + /// multiviewPerViewRenderAreas^ + /// feature is enabled, the + /// VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure can be + /// included in the pNext chain of VkRenderPassBeginInfo + /// + /// + /// The VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure is + /// defined as: + /// + /// + /// // Provided by VK_QCOM_multiview_per_view_render_areas + /// typedef struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t perViewRenderAreaCount; + /// const VkRect2D* pPerViewRenderAreas; + /// } VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerViewRenderAreaCount is the number of elements in the pPerViewRenderAreas array. + /// + [FieldOffset(16)] + public int PerViewRenderAreaCount; + + /// + /// PerViewRenderAreas is a pointer to an array of VkRect2D structures defining the render area for each view. + /// + [FieldOffset(24)] + public VkRect2D* PerViewRenderAreas; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeCreateInfoEXT.gen.cs new file mode 100644 index 0000000..2ae1f28 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeCreateInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMutableDescriptorTypeCreateInfoEXT - Structure describing the list of possible active descriptor types for mutable type descriptors + /// + /// + /// + /// If the pNext chain of a VkDescriptorSetLayoutCreateInfo or + /// VkDescriptorPoolCreateInfo structure includes a + /// VkMutableDescriptorTypeCreateInfoEXT structure, then that structure + /// specifies Information about the possible descriptor types for mutable + /// descriptor types. + /// + /// + /// The VkMutableDescriptorTypeCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_mutable_descriptor_type + /// typedef struct VkMutableDescriptorTypeCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t mutableDescriptorTypeListCount; + /// const VkMutableDescriptorTypeListEXT* pMutableDescriptorTypeLists; + /// } VkMutableDescriptorTypeCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkMutableDescriptorTypeCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.MutableDescriptorTypeCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MutableDescriptorTypeListCount is the number of elements in pMutableDescriptorTypeLists. + /// + [FieldOffset(16)] + public int MutableDescriptorTypeListCount; + + /// + /// MutableDescriptorTypeLists is a pointer to an array of VkMutableDescriptorTypeListEXT structures. + /// + [FieldOffset(24)] + public VkMutableDescriptorTypeListEXT* MutableDescriptorTypeLists; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeListEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeListEXT.gen.cs new file mode 100644 index 0000000..36bbd62 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkMutableDescriptorTypeListEXT.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkMutableDescriptorTypeListEXT - Structure describing descriptor types that a given descriptor may mutate to + /// + /// + /// + /// The list of potential descriptor types a given mutable descriptor can + /// mutate to is passed in a VkMutableDescriptorTypeListEXT structure. + /// + /// + /// The VkMutableDescriptorTypeListEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_mutable_descriptor_type + /// typedef struct VkMutableDescriptorTypeListEXT { + /// uint32_t descriptorTypeCount; + /// const VkDescriptorType* pDescriptorTypes; + /// } VkMutableDescriptorTypeListEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkMutableDescriptorTypeListEXT() + { + /// + /// DescriptorTypeCount is the number of elements in pDescriptorTypes. + /// + [FieldOffset(0)] + public int DescriptorTypeCount; + + /// + /// DescriptorTypes is `NULL` or a pointer to an array of descriptorTypeCount VkDescriptorType values defining which descriptor types a given binding may mutate to. + /// + [FieldOffset(8)] + public VkDescriptorType* DescriptorTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOffset2D.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOffset2D.gen.cs new file mode 100644 index 0000000..4c6f766 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOffset2D.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOffset2D - Structure specifying a two-dimensional offset + /// + /// + /// + /// A two-dimensional offset is defined by the structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkOffset2D { + /// int32_t x; + /// int32_t y; + /// } VkOffset2D; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkOffset2D() + { + /// + /// X is the x offset. + /// + [FieldOffset(0)] + public int X; + + /// + /// Y is the y offset. + /// + [FieldOffset(4)] + public int Y; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOffset3D.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOffset3D.gen.cs new file mode 100644 index 0000000..3aedec4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOffset3D.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOffset3D - Structure specifying a three-dimensional offset + /// + /// + /// + /// A three-dimensional offset is defined by the structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkOffset3D { + /// int32_t x; + /// int32_t y; + /// int32_t z; + /// } VkOffset3D; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkOffset3D() + { + /// + /// X is the x offset. + /// + [FieldOffset(0)] + public int X; + + /// + /// Y is the y offset. + /// + [FieldOffset(4)] + public int Y; + + /// + /// Z is the z offset. + /// + [FieldOffset(8)] + public int Z; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDataCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDataCreateInfoEXT.gen.cs new file mode 100644 index 0000000..cbc2333 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDataCreateInfoEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpaqueCaptureDataCreateInfoEXT - Structure specifying opaque capture data + /// + /// + /// + /// The VkOpaqueCaptureDataCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkOpaqueCaptureDataCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const VkHostAddressRangeConstEXT* pData; + /// } VkOpaqueCaptureDataCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkOpaqueCaptureDataCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpaqueCaptureDataCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Data is a pointer to the range of host memory containing opaque data previously captured via vkGetImageOpaqueCaptureDataEXT. + /// + [FieldOffset(16)] + public VkHostAddressRangeConstEXT* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDescriptorDataCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDescriptorDataCreateInfoEXT.gen.cs new file mode 100644 index 0000000..a17d198 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpaqueCaptureDescriptorDataCreateInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpaqueCaptureDescriptorDataCreateInfoEXT - Structure specifying opaque capture descriptor data + /// + /// + /// + /// The VkOpaqueCaptureDescriptorDataCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkOpaqueCaptureDescriptorDataCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// const void* opaqueCaptureDescriptorData; + /// } VkOpaqueCaptureDescriptorDataCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkOpaqueCaptureDescriptorDataCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpaqueCaptureDescriptorDataCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OpaqueCaptureDescriptorData is a pointer to an application-allocated buffer containing opaque capture data retrieved using vkGetBufferOpaqueCaptureDescriptorDataEXT, vkGetImageOpaqueCaptureDescriptorDataEXT, vkGetImageViewOpaqueCaptureDescriptorDataEXT, vkGetSamplerOpaqueCaptureDescriptorDataEXT, or vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT. + /// + [FieldOffset(16)] + public void* OpaqueCaptureDescriptorData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpticalFlowExecuteInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowExecuteInfoNV.gen.cs new file mode 100644 index 0000000..c94d95d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowExecuteInfoNV.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowExecuteInfoNV - Structure specifying parameters of an optical flow vector calculation + /// + /// + /// + /// The VkOpticalFlowExecuteInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkOpticalFlowExecuteInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// VkOpticalFlowExecuteFlagsNV flags; + /// uint32_t regionCount; + /// const VkRect2D* pRegions; + /// } VkOpticalFlowExecuteInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkOpticalFlowExecuteInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpticalFlowExecuteInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags are the VkOpticalFlowExecuteFlagsNV used for this command. + /// + [FieldOffset(16)] + public VkOpticalFlowExecuteFlagsNV Flags; + + /// + /// RegionCount is the number of regions of interest specified in pRegions. + /// + [FieldOffset(20)] + public int RegionCount; + + /// + /// Regions is a pointer to regionCount VkRect2D regions of interest. + /// + [FieldOffset(24)] + public VkRect2D* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatInfoNV.gen.cs new file mode 100644 index 0000000..79365fa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowImageFormatInfoNV - Structure describing optical flow image format info + /// + /// + /// + /// The VkOpticalFlowImageFormatInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkOpticalFlowImageFormatInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkOpticalFlowUsageFlagsNV usage; + /// } VkOpticalFlowImageFormatInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkOpticalFlowImageFormatInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpticalFlowImageFormatInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Usage + /// + [FieldOffset(16)] + public VkOpticalFlowUsageFlagsNV Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatPropertiesNV.gen.cs new file mode 100644 index 0000000..737b3ba --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowImageFormatPropertiesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowImageFormatPropertiesNV - Structure describing properties of an optical flow image format + /// + /// + /// + /// The VkOpticalFlowImageFormatPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkOpticalFlowImageFormatPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat format; + /// } VkOpticalFlowImageFormatPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkOpticalFlowImageFormatPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpticalFlowImageFormatPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format + /// + [FieldOffset(16)] + public VkFormat Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreateInfoNV.gen.cs new file mode 100644 index 0000000..d78d312 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreateInfoNV.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowSessionCreateInfoNV - Structure specifying parameters of a newly created optical flow session + /// + /// + /// + /// The VkOpticalFlowSessionCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkOpticalFlowSessionCreateInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t width; + /// uint32_t height; + /// VkFormat imageFormat; + /// VkFormat flowVectorFormat; + /// VkFormat costFormat; + /// VkOpticalFlowGridSizeFlagsNV outputGridSize; + /// VkOpticalFlowGridSizeFlagsNV hintGridSize; + /// VkOpticalFlowPerformanceLevelNV performanceLevel; + /// VkOpticalFlowSessionCreateFlagsNV flags; + /// } VkOpticalFlowSessionCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkOpticalFlowSessionCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpticalFlowSessionCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Width is the width in pixels of the input or reference frame to be bound to this optical flow session. + /// + [FieldOffset(16)] + public int Width; + + /// + /// Height is the height in pixels of the input or reference frame to be bound to this optical flow session. + /// + [FieldOffset(20)] + public int Height; + + /// + /// ImageFormat is the VkFormat of the input and reference frame to be bound to this optical flow session. + /// + [FieldOffset(24)] + public VkFormat ImageFormat; + + /// + /// FlowVectorFormat is the VkFormat of the flow vector maps (output or hint) to be bound to this optical flow session. + /// + [FieldOffset(28)] + public VkFormat FlowVectorFormat; + + /// + /// CostFormat is the VkFormat of the cost maps to be bound to this optical flow session. + /// + [FieldOffset(32)] + public VkFormat CostFormat; + + /// + /// OutputGridSize is exactly one bit of VkOpticalFlowGridSizeFlagsNV specifying the grid size of the output flow and cost maps to be bound to this optical flow session. The size of the output flow and cost maps is determined by VkOpticalFlowSessionCreateInfoNV::width and VkOpticalFlowSessionCreateInfoNV::height divided by VkOpticalFlowSessionCreateInfoNV::outputGridSize. + /// + [FieldOffset(36)] + public VkOpticalFlowGridSizeFlagsNV OutputGridSize; + + /// + /// HintGridSize is one exactly bit of VkOpticalFlowGridSizeFlagsNV specifying the grid size of the hint flow vector maps to be bound to this optical flow session. The size of the hint maps is determined by VkOpticalFlowSessionCreateInfoNV::width and VkOpticalFlowSessionCreateInfoNV::height divided by VkOpticalFlowSessionCreateInfoNV::hintGridSize. + /// + [FieldOffset(40)] + public VkOpticalFlowGridSizeFlagsNV HintGridSize; + + /// + /// PerformanceLevel is the VkOpticalFlowPerformanceLevelNV used for this optical flow session. + /// + [FieldOffset(44)] + public VkOpticalFlowPerformanceLevelNV PerformanceLevel; + + /// + /// Flags are the VkOpticalFlowSessionCreateFlagsNV used for this optical flow session. + /// + [FieldOffset(48)] + public VkOpticalFlowSessionCreateFlagsNV Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreatePrivateDataInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreatePrivateDataInfoNV.gen.cs new file mode 100644 index 0000000..92bc885 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOpticalFlowSessionCreatePrivateDataInfoNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOpticalFlowSessionCreatePrivateDataInfoNV - Structure for NV internal use only + /// + /// + /// + /// The VkOpticalFlowSessionCreatePrivateDataInfoNV structure is for NV + /// internal use only and is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkOpticalFlowSessionCreatePrivateDataInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t id; + /// uint32_t size; + /// const void* pPrivateData; + /// } VkOpticalFlowSessionCreatePrivateDataInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkOpticalFlowSessionCreatePrivateDataInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OpticalFlowSessionCreatePrivateDataInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Id is an identifier for data which is passed at a memory location specified in VkOpticalFlowSessionCreatePrivateDataInfoNV::pPrivateData. + /// + [FieldOffset(16)] + public int Id; + + /// + /// Size is the size of data in bytes which is passed at a memory location specified in VkOpticalFlowSessionCreatePrivateDataInfoNV::pPrivateData. + /// + [FieldOffset(20)] + public int Size; + + /// + /// PrivateData is a pointer to NV internal data. + /// + [FieldOffset(24)] + public void* PrivateData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkOutOfBandQueueTypeInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkOutOfBandQueueTypeInfoNV.gen.cs new file mode 100644 index 0000000..cc770d7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkOutOfBandQueueTypeInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkOutOfBandQueueTypeInfoNV - Structure used to describe the queue that is being marked as Out of Band + /// + /// + /// + /// The VkOutOfBandQueueTypeInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkOutOfBandQueueTypeInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkOutOfBandQueueTypeNV queueType; + /// } VkOutOfBandQueueTypeInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkOutOfBandQueueTypeInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.OutOfBandQueueTypeInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueueType describes the usage of the queue to be marked as out of band. + /// + [FieldOffset(16)] + public VkOutOfBandQueueTypeNV QueueType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureFlagsNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureFlagsNV.gen.cs new file mode 100644 index 0000000..3c892b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureFlagsNV.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureFlagsNV - Structure describing additional flags for PTLAS + /// + /// + /// + /// :refpage: VkPartitionedAccelerationStructureFlagsNV + /// + /// + /// The VkPartitionedAccelerationStructureFlagsNV structure is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPartitionedAccelerationStructureFlagsNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 enablePartitionTranslation; + /// } VkPartitionedAccelerationStructureFlagsNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPartitionedAccelerationStructureFlagsNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PartitionedAccelerationStructureFlagsNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// EnablePartitionTranslation specifies if a partition translation^ may: be applied with VkPartitionedAccelerationStructureWritePartitionTranslationDataNV. + /// + [FieldOffset(16)] + public Brutal.Bool32 EnablePartitionTranslation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureInstancesInputNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureInstancesInputNV.gen.cs new file mode 100644 index 0000000..2fee64b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureInstancesInputNV.gen.cs @@ -0,0 +1,72 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureInstancesInputNV - Parameters describing a PTLAS structure + /// + /// + /// + /// :refpage: VkPartitionedAccelerationStructureInstancesInputNV + /// + /// + /// The VkPartitionedAccelerationStructureInstancesInputNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPartitionedAccelerationStructureInstancesInputNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBuildAccelerationStructureFlagsKHR flags; + /// uint32_t instanceCount; + /// uint32_t maxInstancePerPartitionCount; + /// uint32_t partitionCount; + /// uint32_t maxInstanceInGlobalPartitionCount; + /// } VkPartitionedAccelerationStructureInstancesInputNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPartitionedAccelerationStructureInstancesInputNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PartitionedAccelerationStructureInstancesInputNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkBuildAccelerationStructureFlagsKHR specifying flags for the PTLAS build operation. + /// + [FieldOffset(16)] + public VkBuildAccelerationStructureFlagsKHR Flags; + + /// + /// InstanceCount is the number of instances in this PTLAS. + /// + [FieldOffset(20)] + public int InstanceCount; + + /// + /// MaxInstancePerPartitionCount is the maximum number of instances per partition in the PTLAS. + /// + [FieldOffset(24)] + public int MaxInstancePerPartitionCount; + + /// + /// PartitionCount is the number of partitions in the PTLAS. + /// + [FieldOffset(28)] + public int PartitionCount; + + /// + /// MaxInstanceInGlobalPartitionCount is maximum number of instances in the global partition^. + /// + [FieldOffset(32)] + public int MaxInstanceInGlobalPartitionCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureUpdateInstanceDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureUpdateInstanceDataNV.gen.cs new file mode 100644 index 0000000..56bf298 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureUpdateInstanceDataNV.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureUpdateInstanceDataNV - Structure describing instance data to update in PTLAS + /// + /// + /// + /// :refpage: VkPartitionedAccelerationStructureUpdateInstanceDataNV + /// + /// + /// The VkPartitionedAccelerationStructureUpdateInstanceDataNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPartitionedAccelerationStructureUpdateInstanceDataNV { + /// uint32_t instanceIndex; + /// uint32_t instanceContributionToHitGroupIndex; + /// VkDeviceAddress accelerationStructure; + /// } VkPartitionedAccelerationStructureUpdateInstanceDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkPartitionedAccelerationStructureUpdateInstanceDataNV() + { + /// + /// InstanceIndex is the index of the instance being updated. + /// + [FieldOffset(0)] + public int InstanceIndex; + + /// + /// InstanceContributionToHitGroupIndex is a 24-bit per instance value added in the indexing into the shader binding table to fetch the hit group to use. + /// + [FieldOffset(4)] + public int InstanceContributionToHitGroupIndex; + + /// + /// AccelerationStructure is the device address of the bottom level acceleration structure or a clustered bottom level acceleration structure whose instance is being updated. The instance is disabled if the device address is `0`. + /// + [FieldOffset(8)] + public VkDeviceAddress AccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWriteInstanceDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWriteInstanceDataNV.gen.cs new file mode 100644 index 0000000..303a561 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWriteInstanceDataNV.gen.cs @@ -0,0 +1,84 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureWriteInstanceDataNV - Structure describing instance data to write in PTLAS + /// + /// + /// + /// :refpage: VkPartitionedAccelerationStructureWriteInstanceDataNV + /// + /// + /// The VkPartitionedAccelerationStructureWriteInstanceDataNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPartitionedAccelerationStructureWriteInstanceDataNV { + /// VkTransformMatrixKHR transform; + /// float explicitAABB[6]; + /// uint32_t instanceID; + /// uint32_t instanceMask; + /// uint32_t instanceContributionToHitGroupIndex; + /// VkPartitionedAccelerationStructureInstanceFlagsNV instanceFlags; + /// uint32_t instanceIndex; + /// uint32_t partitionIndex; + /// VkDeviceAddress accelerationStructure; + /// } VkPartitionedAccelerationStructureWriteInstanceDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct VkPartitionedAccelerationStructureWriteInstanceDataNV() + { + /// + /// Transform is a VkTransformMatrixKHR structure describing the transformation to be applied to the instance in PTLAS. + /// + [FieldOffset(0)] + public VkTransformMatrixKHR Transform; + + /// + [FieldOffset(48)] + public fixed float ExplicitAABB[6]; + + /// + /// InstanceID is a user specified constant assigned to an instance in the PTLAS. + /// + [FieldOffset(72)] + public int InstanceID; + + /// + /// InstanceMask is a 8-bit mask assigned to the instance that may: be used to include or reject group of instances. + /// + [FieldOffset(76)] + public int InstanceMask; + + /// + /// InstanceContributionToHitGroupIndex is a 24-bit per application specified instance value added in the indexing into the shader binding table to fetch the hit group to use. + /// + [FieldOffset(80)] + public int InstanceContributionToHitGroupIndex; + + /// + /// InstanceFlags is a bitmask of VkPartitionedAccelerationStructureInstanceFlagsNV specifying flags an instance in the PTLAS. + /// + [FieldOffset(84)] + public VkPartitionedAccelerationStructureInstanceFlagsNV InstanceFlags; + + /// + /// InstanceIndex is the index of the instance within the PTLAS. + /// + [FieldOffset(88)] + public int InstanceIndex; + + /// + /// PartitionIndex is the index of the partition to which this instance belongs. Global partitions^ are referred to by VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV. + /// + [FieldOffset(92)] + public int PartitionIndex; + + /// + /// AccelerationStructure is the device address of the bottom level acceleration structure or a clustered bottom level acceleration structure that is being instanced. This instance is disabled if the device address is `0`. + /// + [FieldOffset(96)] + public VkDeviceAddress AccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWritePartitionTranslationDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWritePartitionTranslationDataNV.gen.cs new file mode 100644 index 0000000..7da43bb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPartitionedAccelerationStructureWritePartitionTranslationDataNV.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPartitionedAccelerationStructureWritePartitionTranslationDataNV - Structure describing partition translation data to write in PTLAS + /// + /// + /// + /// :refpage: VkPartitionedAccelerationStructureWritePartitionTranslationDataNV + /// + /// + /// The VkPartitionedAccelerationStructureWritePartitionTranslationDataNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPartitionedAccelerationStructureWritePartitionTranslationDataNV { + /// uint32_t partitionIndex; + /// float partitionTranslation[3]; + /// } VkPartitionedAccelerationStructureWritePartitionTranslationDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkPartitionedAccelerationStructureWritePartitionTranslationDataNV() + { + /// + /// PartitionIndex is the index of partition to write. Global partition^ is referred to by VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV. + /// + [FieldOffset(0)] + public int PartitionIndex; + + /// + /// PartitionTranslation sets the translation vector^ for this partition. When tracing this partition, the contained instances will behave as if the partition translation was added to the translation component of the instance transform. This translation vector is also added to the instances in the partition that had their bounding box specified. + /// + [FieldOffset(4)] + public float3 PartitionTranslation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingEXT.gen.cs new file mode 100644 index 0000000..15f733a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingEXT.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPastPresentationTimingEXT - Structure containing timing information about a previously-presented image + /// + /// + /// + /// The VkPastPresentationTimingEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPastPresentationTimingEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t presentId; + /// uint64_t targetTime; + /// uint32_t presentStageCount; + /// VkPresentStageTimeEXT* pPresentStages; + /// VkTimeDomainKHR timeDomain; + /// uint64_t timeDomainId; + /// VkBool32 reportComplete; + /// } VkPastPresentationTimingEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkPastPresentationTimingEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PastPresentationTimingEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentId is zero or a value that was given to a previous vkQueuePresentKHR command via VkPresentId2KHR::pPresentIds. + /// + [FieldOffset(16)] + public nint PresentId; + + /// + /// TargetTime is the application-provided target absolute time or duration of the associated presentation request in VkPresentTimingInfoEXT::targetTime. + /// + [FieldOffset(24)] + public nint TargetTime; + + /// + /// PresentStageCount is a count of items contained in pPresentStages. + /// + [FieldOffset(32)] + public int PresentStageCount; + + /// + /// PresentStages a pointer to an array of VkPresentStageTimeEXT providing timing information for the presentation request associated with presentId. + /// + [FieldOffset(40)] + public VkPresentStageTimeEXT* PresentStages; + + /// + /// TimeDomain is the time domain used by the presentation engine to report times in pPresentStages. + /// + [FieldOffset(48)] + public VkTimeDomainKHR TimeDomain; + + /// + /// TimeDomainId is the id associated with timeDomain. + /// + [FieldOffset(56)] + public nint TimeDomainId; + + /// + /// ReportComplete is VK_TRUE if the presentation engine has reported all the requested results in pPresentStages. + /// + [FieldOffset(64)] + public Brutal.Bool32 ReportComplete; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingGOOGLE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingGOOGLE.gen.cs new file mode 100644 index 0000000..a3b540d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingGOOGLE.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPastPresentationTimingGOOGLE - Structure containing timing information about a previously-presented image + /// + /// + /// + /// The VkPastPresentationTimingGOOGLE structure is defined as: + /// + /// + /// // Provided by VK_GOOGLE_display_timing + /// typedef struct VkPastPresentationTimingGOOGLE { + /// uint32_t presentID; + /// uint64_t desiredPresentTime; + /// uint64_t actualPresentTime; + /// uint64_t earliestPresentTime; + /// uint64_t presentMargin; + /// } VkPastPresentationTimingGOOGLE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct VkPastPresentationTimingGOOGLE() + { + /// + /// PresentID is an application-provided value that was given to a previous vkQueuePresentKHR command via VkPresentTimeGOOGLE::presentID (see below). It can be used to uniquely identify a previous present with the vkQueuePresentKHR command. + /// + [FieldOffset(0)] + public int PresentID; + + /// + /// DesiredPresentTime is an application-provided value that was given to a previous vkQueuePresentKHR command via VkPresentTimeGOOGLE::desiredPresentTime. If non-zero, it was used by the application to indicate that an image not be presented any sooner than desiredPresentTime. + /// + [FieldOffset(8)] + public nint DesiredPresentTime; + + /// + /// ActualPresentTime is the time when the image of the swapchain was actually displayed. + /// + [FieldOffset(16)] + public nint ActualPresentTime; + + /// + /// EarliestPresentTime is the time when the image of the swapchain could have been displayed. This may: differ from actualPresentTime if the application requested that the image be presented no sooner than VkPresentTimeGOOGLE::desiredPresentTime. + /// + [FieldOffset(24)] + public nint EarliestPresentTime; + + /// + /// PresentMargin is an indication of how early the vkQueuePresentKHR command was processed compared to how soon it needed to be processed, and still be presented at earliestPresentTime. + /// + [FieldOffset(32)] + public nint PresentMargin; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingInfoEXT.gen.cs new file mode 100644 index 0000000..7e66cf5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPastPresentationTimingInfoEXT - Structure specifying swapchain present timing query parameters + /// + /// + /// + /// The VkPastPresentationTimingInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPastPresentationTimingInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPastPresentationTimingFlagsEXT flags; + /// VkSwapchainKHR swapchain; + /// } VkPastPresentationTimingInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPastPresentationTimingInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PastPresentationTimingInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPastPresentationTimingFlagsEXT specifying options for queries of past presentation timing information. + /// + [FieldOffset(16)] + public VkPastPresentationTimingFlagsEXT Flags; + + /// + /// Swapchain is the swapchain to obtain presentation timing information for. + /// + [FieldOffset(24)] + public VkSwapchainKHR Swapchain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingPropertiesEXT.gen.cs new file mode 100644 index 0000000..60e5f7c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPastPresentationTimingPropertiesEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPastPresentationTimingPropertiesEXT - Structure containing details about a swapchain past presentation activity + /// + /// + /// + /// The VkPastPresentationTimingPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPastPresentationTimingPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t timingPropertiesCounter; + /// uint64_t timeDomainsCounter; + /// uint32_t presentationTimingCount; + /// VkPastPresentationTimingEXT* pPresentationTimings; + /// } VkPastPresentationTimingPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPastPresentationTimingPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PastPresentationTimingPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TimingPropertiesCounter is a 64-bit unsigned integer set by the implementation to the current value of the swapchain's internal timing properties counter. + /// + [FieldOffset(16)] + public nint TimingPropertiesCounter; + + /// + /// TimeDomainsCounter is a 64-bit unsigned integer set by the implementation to the current value of the swapchain's internal time domains list counter. + /// + [FieldOffset(24)] + public nint TimeDomainsCounter; + + /// + /// PresentationTimingCount is an integer related to the number of VkPastPresentationTimingEXT structures available or queried, as described below. + /// + [FieldOffset(32)] + public int PresentationTimingCount; + + /// + /// PresentationTimings is `NULL` or a pointer to an array of VkPastPresentationTimingEXT structures. + /// + [FieldOffset(40)] + public VkPastPresentationTimingEXT* PresentationTimings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerTileBeginInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerTileBeginInfoQCOM.gen.cs new file mode 100644 index 0000000..532253e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerTileBeginInfoQCOM.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerTileBeginInfoQCOM - Structure specifying per-tile begin information + /// + /// + /// + /// The VkPerTileBeginInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef struct VkPerTileBeginInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// } VkPerTileBeginInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkPerTileBeginInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerTileBeginInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerTileEndInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerTileEndInfoQCOM.gen.cs new file mode 100644 index 0000000..cf52e6e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerTileEndInfoQCOM.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerTileEndInfoQCOM - Structure specifying per-tile end information + /// + /// + /// + /// The VkPerTileEndInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef struct VkPerTileEndInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// } VkPerTileEndInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkPerTileEndInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerTileEndInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerfHintInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerfHintInfoQCOM.gen.cs new file mode 100644 index 0000000..6458704 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerfHintInfoQCOM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerfHintInfoQCOM - Structure specifying the parameters used for setting a performance hint on a queue + /// + /// + /// + /// The VkPerfHintInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_queue_perf_hint + /// typedef struct VkPerfHintInfoQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkPerfHintTypeQCOM type; + /// uint32_t scale; + /// } VkPerfHintInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPerfHintInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerfHintInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is a VkPerfHintTypeQCOM value indicating the type of performance hint to apply. + /// + [FieldOffset(16)] + public VkPerfHintTypeQCOM Type; + + /// + /// Scale is a normalized fixed-point scale factor. + /// + [FieldOffset(20)] + public int Scale; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceConfigurationAcquireInfoINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceConfigurationAcquireInfoINTEL.gen.cs new file mode 100644 index 0000000..e9a998c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceConfigurationAcquireInfoINTEL.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceConfigurationAcquireInfoINTEL - Acquire a configuration to capture performance data + /// + /// + /// + /// The VkPerformanceConfigurationAcquireInfoINTEL structure is defined + /// as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkPerformanceConfigurationAcquireInfoINTEL { + /// VkStructureType sType; + /// const void* pNext; + /// VkPerformanceConfigurationTypeINTEL type; + /// } VkPerformanceConfigurationAcquireInfoINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPerformanceConfigurationAcquireInfoINTEL() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceConfigurationAcquireInfoINTEL; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is one of the VkPerformanceConfigurationTypeINTEL type of performance configuration that will be acquired. + /// + [FieldOffset(16)] + public VkPerformanceConfigurationTypeINTEL Type; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterARM.gen.cs new file mode 100644 index 0000000..adc5f1b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterARM - Structure providing information about a counter + /// + /// + /// + /// The VkPerformanceCounterARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_performance_counters_by_region + /// typedef struct VkPerformanceCounterARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t counterID; + /// } VkPerformanceCounterARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPerformanceCounterARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceCounterARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CounterID is an identifier for the counter of the physical device. + /// + [FieldOffset(16)] + public int CounterID; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionARM.gen.cs new file mode 100644 index 0000000..76c6911 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionARM.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterDescriptionARM - Structure providing more detailed information about a counter + /// + /// + /// + /// The VkPerformanceCounterDescriptionARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_performance_counters_by_region + /// typedef struct VkPerformanceCounterDescriptionARM { + /// VkStructureType sType; + /// void* pNext; + /// VkPerformanceCounterDescriptionFlagsARM flags; + /// char name[VK_MAX_DESCRIPTION_SIZE]; + /// } VkPerformanceCounterDescriptionARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 280)] + public unsafe partial struct VkPerformanceCounterDescriptionARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceCounterDescriptionARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPerformanceCounterDescriptionFlagsARM Flags; + + /// + [FieldOffset(20)] + public fixed byte Name[256]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionKHR.gen.cs new file mode 100644 index 0000000..6e16c39 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterDescriptionKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterDescriptionKHR - Structure providing more detailed information about a counter + /// + /// + /// + /// The VkPerformanceCounterDescriptionKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkPerformanceCounterDescriptionKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPerformanceCounterDescriptionFlagsKHR flags; + /// char name[VK_MAX_DESCRIPTION_SIZE]; + /// char category[VK_MAX_DESCRIPTION_SIZE]; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// } VkPerformanceCounterDescriptionKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 792)] + public unsafe partial struct VkPerformanceCounterDescriptionKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceCounterDescriptionKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPerformanceCounterDescriptionFlagsKHR indicating the usage behavior for the counter. + /// + [FieldOffset(16)] + public VkPerformanceCounterDescriptionFlagsKHR Flags; + + /// + [FieldOffset(20)] + public fixed byte Name[256]; + + /// + [FieldOffset(276)] + public fixed byte Category[256]; + + /// + [FieldOffset(532)] + public fixed byte Description[256]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterKHR.gen.cs new file mode 100644 index 0000000..94c6a66 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterKHR - Structure providing information about a counter + /// + /// + /// + /// The VkPerformanceCounterKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkPerformanceCounterKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPerformanceCounterUnitKHR unit; + /// VkPerformanceCounterScopeKHR scope; + /// VkPerformanceCounterStorageKHR storage; + /// uint8_t uuid[VK_UUID_SIZE]; + /// } VkPerformanceCounterKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPerformanceCounterKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceCounterKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Unit is a VkPerformanceCounterUnitKHR specifying the unit that the counter data will record. + /// + [FieldOffset(16)] + public VkPerformanceCounterUnitKHR Unit; + + /// + /// Scope is a VkPerformanceCounterScopeKHR specifying the scope that the counter belongs to. + /// + [FieldOffset(20)] + public VkPerformanceCounterScopeKHR Scope; + + /// + /// Storage is a VkPerformanceCounterStorageKHR specifying the storage type that the counter's data uses. + /// + [FieldOffset(24)] + public VkPerformanceCounterStorageKHR Storage; + + /// + [FieldOffset(28)] + public fixed byte Uuid[16]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterResultKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterResultKHR.gen.cs new file mode 100644 index 0000000..4a65869 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceCounterResultKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceCounterResultKHR - Union containing a performance counter result + /// + /// + /// + /// The VkPerformanceCounterResultKHR union is defined as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef union VkPerformanceCounterResultKHR { + /// int32_t int32; + /// int64_t int64; + /// uint32_t uint32; + /// uint64_t uint64; + /// float float32; + /// double float64; + /// } VkPerformanceCounterResultKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkPerformanceCounterResultKHR() + { + /// + /// Int32 is a 32-bit signed integer value. + /// + [FieldOffset(0)] + public int Int32; + + /// + /// Int64 is a 64-bit signed integer value. + /// + [FieldOffset(0)] + public long Int64; + + /// + /// Uint32 is a 32-bit unsigned integer value. + /// + [FieldOffset(0)] + public int Uint32; + + /// + /// Uint64 is a 64-bit unsigned integer value. + /// + [FieldOffset(0)] + public nint Uint64; + + /// + /// Float32 is a 32-bit floating-point value. + /// + [FieldOffset(0)] + public float Float32; + + /// + /// Float64 is a 64-bit floating-point value. + /// + [FieldOffset(0)] + public double Float64; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceMarkerInfoINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceMarkerInfoINTEL.gen.cs new file mode 100644 index 0000000..8ac3d4c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceMarkerInfoINTEL.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceMarkerInfoINTEL - Structure specifying performance markers + /// + /// + /// + /// The VkPerformanceMarkerInfoINTEL structure is defined as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkPerformanceMarkerInfoINTEL { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t marker; + /// } VkPerformanceMarkerInfoINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPerformanceMarkerInfoINTEL() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceMarkerInfoINTEL; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Marker is the marker value that will be recorded into the opaque query results. + /// + [FieldOffset(16)] + public nint Marker; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceOverrideInfoINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceOverrideInfoINTEL.gen.cs new file mode 100644 index 0000000..c6676ee --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceOverrideInfoINTEL.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceOverrideInfoINTEL - Performance override information + /// + /// + /// + /// The VkPerformanceOverrideInfoINTEL structure is defined as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkPerformanceOverrideInfoINTEL { + /// VkStructureType sType; + /// const void* pNext; + /// VkPerformanceOverrideTypeINTEL type; + /// VkBool32 enable; + /// uint64_t parameter; + /// } VkPerformanceOverrideInfoINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPerformanceOverrideInfoINTEL() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceOverrideInfoINTEL; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is the particular VkPerformanceOverrideTypeINTEL to set. + /// + [FieldOffset(16)] + public VkPerformanceOverrideTypeINTEL Type; + + /// + /// Enable defines whether the override is enabled. + /// + [FieldOffset(20)] + public Brutal.Bool32 Enable; + + /// + /// Parameter is a potential required parameter for the override. + /// + [FieldOffset(24)] + public nint Parameter; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceQuerySubmitInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceQuerySubmitInfoKHR.gen.cs new file mode 100644 index 0000000..1454226 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceQuerySubmitInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceQuerySubmitInfoKHR - Structure indicating which counter pass index is active for performance queries + /// + /// + /// + /// The VkPerformanceQuerySubmitInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkPerformanceQuerySubmitInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t counterPassIndex; + /// } VkPerformanceQuerySubmitInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPerformanceQuerySubmitInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceQuerySubmitInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CounterPassIndex specifies which counter pass index is active. + /// + [FieldOffset(16)] + public int CounterPassIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceStreamMarkerInfoINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceStreamMarkerInfoINTEL.gen.cs new file mode 100644 index 0000000..29eb5eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceStreamMarkerInfoINTEL.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceStreamMarkerInfoINTEL - Structure specifying stream performance markers + /// + /// + /// + /// The VkPerformanceStreamMarkerInfoINTEL structure is defined as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkPerformanceStreamMarkerInfoINTEL { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t marker; + /// } VkPerformanceStreamMarkerInfoINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPerformanceStreamMarkerInfoINTEL() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PerformanceStreamMarkerInfoINTEL; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Marker is the marker value that will be recorded into the reports consumed by an external application. + /// + [FieldOffset(16)] + public int Marker; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceValueDataINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceValueDataINTEL.gen.cs new file mode 100644 index 0000000..3623920 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceValueDataINTEL.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceValueDataINTEL - Values returned for the parameters + /// + /// + /// + /// The VkPerformanceValueDataINTEL union is defined as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef union VkPerformanceValueDataINTEL { + /// uint32_t value32; + /// uint64_t value64; + /// float valueFloat; + /// VkBool32 valueBool; + /// const char* valueString; + /// } VkPerformanceValueDataINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkPerformanceValueDataINTEL() + { + /// + /// Value32 represents 32-bit integer data. + /// + [FieldOffset(0)] + public int Value32; + + /// + /// Value64 represents 64-bit integer data. + /// + [FieldOffset(0)] + public nint Value64; + + /// + /// ValueFloat represents floating-point data. + /// + [FieldOffset(0)] + public float ValueFloat; + + /// + /// ValueBool represents basetype:VkBool32 data. + /// + [FieldOffset(0)] + public Brutal.Bool32 ValueBool; + + /// + /// ValueString represents a pointer to a null-terminated UTF-8 string. + /// + [FieldOffset(0)] + public byte* ValueString; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPerformanceValueINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPerformanceValueINTEL.gen.cs new file mode 100644 index 0000000..16c9ce6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPerformanceValueINTEL.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPerformanceValueINTEL - Container for value and types of parameters that can be queried + /// + /// + /// + /// The VkPerformanceValueINTEL structure is defined as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkPerformanceValueINTEL { + /// VkPerformanceValueTypeINTEL type; + /// VkPerformanceValueDataINTEL data; + /// } VkPerformanceValueINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkPerformanceValueINTEL() + { + /// + /// Type is a VkPerformanceValueTypeINTEL value specifying the type of the returned data. + /// + [FieldOffset(0)] + public VkPerformanceValueTypeINTEL Type; + + /// + /// Data is a VkPerformanceValueDataINTEL union specifying the value of the returned data. + /// + [FieldOffset(8)] + public VkPerformanceValueDataINTEL Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice16BitStorageFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice16BitStorageFeatures.gen.cs new file mode 100644 index 0000000..ed40d9b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice16BitStorageFeatures.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevice16BitStorageFeatures - Structure describing features supported by VK_KHR_16bit_storage + /// + /// + /// + /// The VkPhysicalDevice16BitStorageFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDevice16BitStorageFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 storageBuffer16BitAccess; + /// VkBool32 uniformAndStorageBuffer16BitAccess; + /// VkBool32 storagePushConstant16; + /// VkBool32 storageInputOutput16; + /// } VkPhysicalDevice16BitStorageFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevice16BitStorageFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevice16BitStorageFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StorageBuffer16BitAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 StorageBuffer16BitAccess; + + /// + /// UniformAndStorageBuffer16BitAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 UniformAndStorageBuffer16BitAccess; + + /// + /// StoragePushConstant16 + /// + [FieldOffset(24)] + public Brutal.Bool32 StoragePushConstant16; + + /// + /// StorageInputOutput16 + /// + [FieldOffset(28)] + public Brutal.Bool32 StorageInputOutput16; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice4444FormatsFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice4444FormatsFeaturesEXT.gen.cs new file mode 100644 index 0000000..2e4154e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice4444FormatsFeaturesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevice4444FormatsFeaturesEXT - Structure describing additional 4444 formats supported by an implementation + /// + /// + /// + /// The VkPhysicalDevice4444FormatsFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_4444_formats + /// typedef struct VkPhysicalDevice4444FormatsFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 formatA4R4G4B4; + /// VkBool32 formatA4B4G4R4; + /// } VkPhysicalDevice4444FormatsFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevice4444FormatsFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevice4444FormatsFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FormatA4R4G4B4 + /// + [FieldOffset(16)] + public Brutal.Bool32 FormatA4R4G4B4; + + /// + /// FormatA4B4G4R4 + /// + [FieldOffset(20)] + public Brutal.Bool32 FormatA4B4G4R4; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice8BitStorageFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice8BitStorageFeatures.gen.cs new file mode 100644 index 0000000..30d3adc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevice8BitStorageFeatures.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevice8BitStorageFeatures - Structure describing features supported by VK_KHR_8bit_storage + /// + /// + /// + /// The VkPhysicalDevice8BitStorageFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDevice8BitStorageFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 storageBuffer8BitAccess; + /// VkBool32 uniformAndStorageBuffer8BitAccess; + /// VkBool32 storagePushConstant8; + /// } VkPhysicalDevice8BitStorageFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevice8BitStorageFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevice8BitStorageFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StorageBuffer8BitAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 StorageBuffer8BitAccess; + + /// + /// UniformAndStorageBuffer8BitAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 UniformAndStorageBuffer8BitAccess; + + /// + /// StoragePushConstant8 + /// + [FieldOffset(24)] + public Brutal.Bool32 StoragePushConstant8; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructureFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructureFeaturesKHR.gen.cs new file mode 100644 index 0000000..f2d090a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructureFeaturesKHR.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAccelerationStructureFeaturesKHR - Structure describing the acceleration structure features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceAccelerationStructureFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 accelerationStructure; + /// VkBool32 accelerationStructureCaptureReplay; + /// VkBool32 accelerationStructureIndirectBuild; + /// // accelerationStructureHostCommands is legacy, but no reason was given in the API XML + /// VkBool32 accelerationStructureHostCommands; + /// VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind; + /// } VkPhysicalDeviceAccelerationStructureFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceAccelerationStructureFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAccelerationStructureFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructure + /// + [FieldOffset(16)] + public Brutal.Bool32 AccelerationStructure; + + /// + /// AccelerationStructureCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 AccelerationStructureCaptureReplay; + + /// + /// AccelerationStructureIndirectBuild + /// + [FieldOffset(24)] + public Brutal.Bool32 AccelerationStructureIndirectBuild; + + /// + /// AccelerationStructureHostCommands + /// + [FieldOffset(28)] + public Brutal.Bool32 AccelerationStructureHostCommands; + + /// + /// DescriptorBindingAccelerationStructureUpdateAfterBind + /// + [FieldOffset(32)] + public Brutal.Bool32 DescriptorBindingAccelerationStructureUpdateAfterBind; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructurePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructurePropertiesKHR.gen.cs new file mode 100644 index 0000000..34053fa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAccelerationStructurePropertiesKHR.gen.cs @@ -0,0 +1,90 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAccelerationStructurePropertiesKHR - Properties of the physical device for acceleration structure + /// + /// + /// + /// The VkPhysicalDeviceAccelerationStructurePropertiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkPhysicalDeviceAccelerationStructurePropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t maxGeometryCount; + /// uint64_t maxInstanceCount; + /// uint64_t maxPrimitiveCount; + /// uint32_t maxPerStageDescriptorAccelerationStructures; + /// uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures; + /// uint32_t maxDescriptorSetAccelerationStructures; + /// uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures; + /// uint32_t minAccelerationStructureScratchOffsetAlignment; + /// } VkPhysicalDeviceAccelerationStructurePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceAccelerationStructurePropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAccelerationStructurePropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxGeometryCount + /// + [FieldOffset(16)] + public nint MaxGeometryCount; + + /// + /// MaxInstanceCount + /// + [FieldOffset(24)] + public nint MaxInstanceCount; + + /// + /// MaxPrimitiveCount + /// + [FieldOffset(32)] + public nint MaxPrimitiveCount; + + /// + /// MaxPerStageDescriptorAccelerationStructures + /// + [FieldOffset(40)] + public int MaxPerStageDescriptorAccelerationStructures; + + /// + /// MaxPerStageDescriptorUpdateAfterBindAccelerationStructures + /// + [FieldOffset(44)] + public int MaxPerStageDescriptorUpdateAfterBindAccelerationStructures; + + /// + /// MaxDescriptorSetAccelerationStructures + /// + [FieldOffset(48)] + public int MaxDescriptorSetAccelerationStructures; + + /// + /// MaxDescriptorSetUpdateAfterBindAccelerationStructures + /// + [FieldOffset(52)] + public int MaxDescriptorSetUpdateAfterBindAccelerationStructures; + + /// + /// MinAccelerationStructureScratchOffsetAlignment + /// + [FieldOffset(56)] + public int MinAccelerationStructureScratchOffsetAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAddressBindingReportFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAddressBindingReportFeaturesEXT.gen.cs new file mode 100644 index 0000000..4daf53f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAddressBindingReportFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAddressBindingReportFeaturesEXT - Structure describing the virtual allocation reporting feature supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceAddressBindingReportFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_device_address_binding_report + /// typedef struct VkPhysicalDeviceAddressBindingReportFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 reportAddressBinding; + /// } VkPhysicalDeviceAddressBindingReportFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceAddressBindingReportFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAddressBindingReportFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ReportAddressBinding + /// + [FieldOffset(16)] + public Brutal.Bool32 ReportAddressBinding; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAmigoProfilingFeaturesSEC.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAmigoProfilingFeaturesSEC.gen.cs new file mode 100644 index 0000000..a6d08d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAmigoProfilingFeaturesSEC.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAmigoProfilingFeaturesSEC - Stub description of VkPhysicalDeviceAmigoProfilingFeaturesSEC + /// + /// + /// + /// [[features-amigoProfiling]] + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_SEC_amigo_profiling + /// typedef struct VkPhysicalDeviceAmigoProfilingFeaturesSEC { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 amigoProfiling; + /// } VkPhysicalDeviceAmigoProfilingFeaturesSEC; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceAmigoProfilingFeaturesSEC() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAmigoProfilingFeaturesSEC; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AmigoProfiling + /// + [FieldOffset(16)] + public Brutal.Bool32 AmigoProfiling; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAntiLagFeaturesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAntiLagFeaturesAMD.gen.cs new file mode 100644 index 0000000..b29c7c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAntiLagFeaturesAMD.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAntiLagFeaturesAMD - Structure describing whether VK_AMD_anti_lag can be supported by an implementation. + /// + /// + /// + /// The VkPhysicalDeviceAntiLagFeaturesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_anti_lag + /// typedef struct VkPhysicalDeviceAntiLagFeaturesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 antiLag; + /// } VkPhysicalDeviceAntiLagFeaturesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceAntiLagFeaturesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAntiLagFeaturesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AntiLag + /// + [FieldOffset(16)] + public Brutal.Bool32 AntiLag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAstcDecodeFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAstcDecodeFeaturesEXT.gen.cs new file mode 100644 index 0000000..eea932c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAstcDecodeFeaturesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceASTCDecodeFeaturesEXT - Structure describing ASTC decode mode features + /// + /// + /// + /// The VkPhysicalDeviceASTCDecodeFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_astc_decode_mode + /// typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 decodeModeSharedExponent; + /// } VkPhysicalDeviceASTCDecodeFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceAstcDecodeFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAstcDecodeFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DecodeModeSharedExponent + /// + [FieldOffset(16)] + public Brutal.Bool32 DecodeModeSharedExponent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.gen.cs new file mode 100644 index 0000000..d22af1b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT - Structure describing if dynamic feedback loops can be used + /// + /// + /// + /// The VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT + /// structure is defined as: + /// + /// + /// // Provided by VK_EXT_attachment_feedback_loop_dynamic_state + /// typedef struct VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 attachmentFeedbackLoopDynamicState; + /// } VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AttachmentFeedbackLoopDynamicState + /// + [FieldOffset(16)] + public Brutal.Bool32 AttachmentFeedbackLoopDynamicState; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.gen.cs new file mode 100644 index 0000000..d42b9db --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT - Structure indicating support for a render feedback loop image layout + /// + /// + /// + /// The VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_attachment_feedback_loop_layout + /// typedef struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 attachmentFeedbackLoopLayout; + /// } VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AttachmentFeedbackLoopLayout + /// + [FieldOffset(16)] + public Brutal.Bool32 AttachmentFeedbackLoopLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.gen.cs new file mode 100644 index 0000000..7e0a4ed --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT - Structure describing advanced blending features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_blend_operation_advanced + /// typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 advancedBlendCoherentOperations; + /// } VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceBlendOperationAdvancedFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AdvancedBlendCoherentOperations + /// + [FieldOffset(16)] + public Brutal.Bool32 AdvancedBlendCoherentOperations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.gen.cs new file mode 100644 index 0000000..bf78513 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT - Structure describing advanced blending limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_blend_operation_advanced + /// typedef struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t advancedBlendMaxColorAttachments; + /// VkBool32 advancedBlendIndependentBlend; + /// VkBool32 advancedBlendNonPremultipliedSrcColor; + /// VkBool32 advancedBlendNonPremultipliedDstColor; + /// VkBool32 advancedBlendCorrelatedOverlap; + /// VkBool32 advancedBlendAllOperations; + /// } VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceBlendOperationAdvancedPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AdvancedBlendMaxColorAttachments + /// + [FieldOffset(16)] + public int AdvancedBlendMaxColorAttachments; + + /// + /// AdvancedBlendIndependentBlend + /// + [FieldOffset(20)] + public Brutal.Bool32 AdvancedBlendIndependentBlend; + + /// + /// AdvancedBlendNonPremultipliedSrcColor + /// + [FieldOffset(24)] + public Brutal.Bool32 AdvancedBlendNonPremultipliedSrcColor; + + /// + /// AdvancedBlendNonPremultipliedDstColor + /// + [FieldOffset(28)] + public Brutal.Bool32 AdvancedBlendNonPremultipliedDstColor; + + /// + /// AdvancedBlendCorrelatedOverlap + /// + [FieldOffset(32)] + public Brutal.Bool32 AdvancedBlendCorrelatedOverlap; + + /// + /// AdvancedBlendAllOperations + /// + [FieldOffset(36)] + public Brutal.Bool32 AdvancedBlendAllOperations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.gen.cs new file mode 100644 index 0000000..ec98f78 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBorderColorSwizzleFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceBorderColorSwizzleFeaturesEXT - Structure describing whether samplers with custom border colors require the component swizzle specified in order to have defined behavior + /// + /// + /// + /// The VkPhysicalDeviceBorderColorSwizzleFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_border_color_swizzle + /// typedef struct VkPhysicalDeviceBorderColorSwizzleFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 borderColorSwizzle; + /// VkBool32 borderColorSwizzleFromImage; + /// } VkPhysicalDeviceBorderColorSwizzleFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceBorderColorSwizzleFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceBorderColorSwizzleFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BorderColorSwizzle + /// + [FieldOffset(16)] + public Brutal.Bool32 BorderColorSwizzle; + + /// + /// BorderColorSwizzleFromImage + /// + [FieldOffset(20)] + public Brutal.Bool32 BorderColorSwizzleFromImage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeatures.gen.cs new file mode 100644 index 0000000..f95c1c3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeatures.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceBufferDeviceAddressFeatures - Structure describing buffer address features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceBufferDeviceAddressFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceBufferDeviceAddressFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 bufferDeviceAddress; + /// VkBool32 bufferDeviceAddressCaptureReplay; + /// VkBool32 bufferDeviceAddressMultiDevice; + /// } VkPhysicalDeviceBufferDeviceAddressFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceBufferDeviceAddressFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceBufferDeviceAddressFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BufferDeviceAddress + /// + [FieldOffset(16)] + public Brutal.Bool32 BufferDeviceAddress; + + /// + /// BufferDeviceAddressCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 BufferDeviceAddressCaptureReplay; + + /// + /// BufferDeviceAddressMultiDevice + /// + [FieldOffset(24)] + public Brutal.Bool32 BufferDeviceAddressMultiDevice; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.gen.cs new file mode 100644 index 0000000..0aac382 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceBufferDeviceAddressFeaturesEXT.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceBufferDeviceAddressFeaturesEXT - Structure describing buffer address features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceBufferDeviceAddressFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_buffer_device_address + /// typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 bufferDeviceAddress; + /// VkBool32 bufferDeviceAddressCaptureReplay; + /// VkBool32 bufferDeviceAddressMultiDevice; + /// } VkPhysicalDeviceBufferDeviceAddressFeaturesEXT; + /// + /// + /// // Provided by VK_EXT_buffer_device_address + /// // Equivalent to VkPhysicalDeviceBufferDeviceAddressFeaturesEXT + /// typedef VkPhysicalDeviceBufferDeviceAddressFeaturesEXT VkPhysicalDeviceBufferAddressFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceBufferDeviceAddressFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BufferDeviceAddress + /// + [FieldOffset(16)] + public Brutal.Bool32 BufferDeviceAddress; + + /// + /// BufferDeviceAddressCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 BufferDeviceAddressCaptureReplay; + + /// + /// BufferDeviceAddressMultiDevice + /// + [FieldOffset(24)] + public Brutal.Bool32 BufferDeviceAddressMultiDevice; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructureFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructureFeaturesNV.gen.cs new file mode 100644 index 0000000..bec665b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructureFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceClusterAccelerationStructureFeaturesNV - Structure describing the ray tracing cluster geometry feature supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceClusterAccelerationStructureFeaturesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkPhysicalDeviceClusterAccelerationStructureFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 clusterAccelerationStructure; + /// } VkPhysicalDeviceClusterAccelerationStructureFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceClusterAccelerationStructureFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceClusterAccelerationStructureFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ClusterAccelerationStructure + /// + [FieldOffset(16)] + public Brutal.Bool32 ClusterAccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructurePropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructurePropertiesNV.gen.cs new file mode 100644 index 0000000..e91a42c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterAccelerationStructurePropertiesNV.gen.cs @@ -0,0 +1,91 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceClusterAccelerationStructurePropertiesNV - Structure describing properties supported by a cluster acceleration structure implementation + /// + /// + /// + /// The VkPhysicalDeviceClusterAccelerationStructurePropertiesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkPhysicalDeviceClusterAccelerationStructurePropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxVerticesPerCluster; + /// uint32_t maxTrianglesPerCluster; + /// uint32_t clusterScratchByteAlignment; + /// uint32_t clusterByteAlignment; + /// uint32_t clusterTemplateByteAlignment; + /// uint32_t clusterBottomLevelByteAlignment; + /// uint32_t clusterTemplateBoundsByteAlignment; + /// uint32_t maxClusterGeometryIndex; + /// } VkPhysicalDeviceClusterAccelerationStructurePropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceClusterAccelerationStructurePropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceClusterAccelerationStructurePropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxVerticesPerCluster + /// + [FieldOffset(16)] + public int MaxVerticesPerCluster; + + /// + /// MaxTrianglesPerCluster + /// + [FieldOffset(20)] + public int MaxTrianglesPerCluster; + + /// + /// ClusterScratchByteAlignment + /// + [FieldOffset(24)] + public int ClusterScratchByteAlignment; + + /// + /// ClusterByteAlignment + /// + [FieldOffset(28)] + public int ClusterByteAlignment; + + /// + /// ClusterTemplateByteAlignment + /// + [FieldOffset(32)] + public int ClusterTemplateByteAlignment; + + /// + /// ClusterBottomLevelByteAlignment + /// + [FieldOffset(36)] + public int ClusterBottomLevelByteAlignment; + + /// + /// ClusterTemplateBoundsByteAlignment + /// + [FieldOffset(40)] + public int ClusterTemplateBoundsByteAlignment; + + /// + /// MaxClusterGeometryIndex + /// + [FieldOffset(44)] + public int MaxClusterGeometryIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.gen.cs new file mode 100644 index 0000000..07dfd5c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI - Structure describing whether cluster culling shader is enabled + /// + /// + /// + /// The VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI structure is + /// defined as: + /// + /// + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// typedef struct VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 clustercullingShader; + /// VkBool32 multiviewClusterCullingShader; + /// } VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceClusterCullingShaderFeaturesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ClustercullingShader + /// + [FieldOffset(16)] + public Brutal.Bool32 ClustercullingShader; + + /// + /// MultiviewClusterCullingShader + /// + [FieldOffset(20)] + public Brutal.Bool32 MultiviewClusterCullingShader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs new file mode 100644 index 0000000..2710d8b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI - Structure describing cluster culling shader properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI structure is + /// defined as: + /// + /// + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// typedef struct VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxWorkGroupCount[3]; + /// uint32_t maxWorkGroupSize[3]; + /// uint32_t maxOutputClusterCount; + /// VkDeviceSize indirectBufferOffsetAlignment; + /// } VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceClusterCullingShaderPropertiesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxWorkGroupCount + /// + [FieldOffset(16)] + public uint3 MaxWorkGroupCount; + + /// + /// MaxWorkGroupSize + /// + [FieldOffset(28)] + public uint3 MaxWorkGroupSize; + + /// + /// MaxOutputClusterCount is the maximum number of output cluster a single cluster culling shader workgroup can emit. + /// + [FieldOffset(40)] + public int MaxOutputClusterCount; + + /// + /// IndirectBufferOffsetAlignment indicates the alignment for cluster drawing command buffer stride. vkCmdDrawClusterIndirectHUAWEI::offset must be a multiple of this value. + /// + [FieldOffset(48)] + public ByteSize64 IndirectBufferOffsetAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.gen.cs new file mode 100644 index 0000000..36beb46 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI - Structure describing whether cluster culling shader support VRS + /// + /// + /// + /// To query whether a Cluster Culling Shader supports the per-cluster shading + /// rate feature, include a + /// VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI structure in the + /// pNext chain of the + /// VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI structure. + /// This structure is defined as: + /// + /// + /// // Provided by VK_HUAWEI_cluster_culling_shader + /// typedef struct VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 clusterShadingRate; + /// } VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ClusterShadingRate + /// + [FieldOffset(16)] + public Brutal.Bool32 ClusterShadingRate; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoherentMemoryFeaturesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoherentMemoryFeaturesAMD.gen.cs new file mode 100644 index 0000000..cffaa84 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoherentMemoryFeaturesAMD.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCoherentMemoryFeaturesAMD - Structure describing whether device coherent memory can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCoherentMemoryFeaturesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_device_coherent_memory + /// typedef struct VkPhysicalDeviceCoherentMemoryFeaturesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceCoherentMemory; + /// } VkPhysicalDeviceCoherentMemoryFeaturesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCoherentMemoryFeaturesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCoherentMemoryFeaturesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceCoherentMemory + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceCoherentMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceColorWriteEnableFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceColorWriteEnableFeaturesEXT.gen.cs new file mode 100644 index 0000000..1e1a3e3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceColorWriteEnableFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceColorWriteEnableFeaturesEXT - Structure describing whether writes to color attachments can be enabled and disabled dynamically + /// + /// + /// + /// The VkPhysicalDeviceColorWriteEnableFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_color_write_enable + /// typedef struct VkPhysicalDeviceColorWriteEnableFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 colorWriteEnable; + /// } VkPhysicalDeviceColorWriteEnableFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceColorWriteEnableFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceColorWriteEnableFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ColorWriteEnable + /// + [FieldOffset(16)] + public Brutal.Bool32 ColorWriteEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.gen.cs new file mode 100644 index 0000000..9f27c44 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCommandBufferInheritanceFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCommandBufferInheritanceFeaturesNV - Structure describing whether the command buffer inheritance feature is supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCommandBufferInheritanceFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_command_buffer_inheritance + /// typedef struct VkPhysicalDeviceCommandBufferInheritanceFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 commandBufferInheritance; + /// } VkPhysicalDeviceCommandBufferInheritanceFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCommandBufferInheritanceFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCommandBufferInheritanceFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CommandBufferInheritance + /// + [FieldOffset(16)] + public Brutal.Bool32 CommandBufferInheritance; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV.gen.cs new file mode 100644 index 0000000..a4d396a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV - Structure describing whether compute occupancy priority is supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_compute_occupancy_priority + /// typedef struct VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 computeOccupancyPriority; + /// } VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceComputeOccupancyPriorityFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceComputeOccupancyPriorityFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ComputeOccupancyPriority + /// + [FieldOffset(16)] + public Brutal.Bool32 ComputeOccupancyPriority; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.gen.cs new file mode 100644 index 0000000..0e8b08a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR - Structure describing compute shader derivative features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_compute_shader_derivatives + /// typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 computeDerivativeGroupQuads; + /// VkBool32 computeDerivativeGroupLinear; + /// } VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceComputeShaderDerivativesFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ComputeDerivativeGroupQuads + /// + [FieldOffset(16)] + public Brutal.Bool32 ComputeDerivativeGroupQuads; + + /// + /// ComputeDerivativeGroupLinear + /// + [FieldOffset(20)] + public Brutal.Bool32 ComputeDerivativeGroupLinear; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.gen.cs new file mode 100644 index 0000000..5e57096 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR - Structure describing compute shader derivative operations supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_compute_shader_derivatives + /// typedef struct VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 meshAndTaskShaderDerivatives; + /// } VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceComputeShaderDerivativesPropertiesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MeshAndTaskShaderDerivatives + /// + [FieldOffset(16)] + public Brutal.Bool32 MeshAndTaskShaderDerivatives; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConditionalRenderingFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConditionalRenderingFeaturesEXT.gen.cs new file mode 100644 index 0000000..0214a9e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConditionalRenderingFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceConditionalRenderingFeaturesEXT - Structure describing if a secondary command buffer can be executed if conditional rendering is active in the primary command buffer + /// + /// + /// + /// The VkPhysicalDeviceConditionalRenderingFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_conditional_rendering + /// typedef struct VkPhysicalDeviceConditionalRenderingFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 conditionalRendering; + /// VkBool32 inheritedConditionalRendering; + /// } VkPhysicalDeviceConditionalRenderingFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceConditionalRenderingFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceConditionalRenderingFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ConditionalRendering + /// + [FieldOffset(16)] + public Brutal.Bool32 ConditionalRendering; + + /// + /// InheritedConditionalRendering + /// + [FieldOffset(20)] + public Brutal.Bool32 InheritedConditionalRendering; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.gen.cs new file mode 100644 index 0000000..01a0d95 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceConservativeRasterizationPropertiesEXT.gen.cs @@ -0,0 +1,97 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceConservativeRasterizationPropertiesEXT - Structure describing conservative raster properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceConservativeRasterizationPropertiesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_conservative_rasterization + /// typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// float primitiveOverestimationSize; + /// float maxExtraPrimitiveOverestimationSize; + /// float extraPrimitiveOverestimationSizeGranularity; + /// VkBool32 primitiveUnderestimation; + /// VkBool32 conservativePointAndLineRasterization; + /// VkBool32 degenerateTrianglesRasterized; + /// VkBool32 degenerateLinesRasterized; + /// VkBool32 fullyCoveredFragmentShaderInputVariable; + /// VkBool32 conservativeRasterizationPostDepthCoverage; + /// } VkPhysicalDeviceConservativeRasterizationPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceConservativeRasterizationPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrimitiveOverestimationSize + /// + [FieldOffset(16)] + public float PrimitiveOverestimationSize; + + /// + /// MaxExtraPrimitiveOverestimationSize + /// + [FieldOffset(20)] + public float MaxExtraPrimitiveOverestimationSize; + + /// + /// ExtraPrimitiveOverestimationSizeGranularity + /// + [FieldOffset(24)] + public float ExtraPrimitiveOverestimationSizeGranularity; + + /// + /// PrimitiveUnderestimation + /// + [FieldOffset(28)] + public Brutal.Bool32 PrimitiveUnderestimation; + + /// + /// ConservativePointAndLineRasterization + /// + [FieldOffset(32)] + public Brutal.Bool32 ConservativePointAndLineRasterization; + + /// + /// DegenerateTrianglesRasterized + /// + [FieldOffset(36)] + public Brutal.Bool32 DegenerateTrianglesRasterized; + + /// + /// DegenerateLinesRasterized + /// + [FieldOffset(40)] + public Brutal.Bool32 DegenerateLinesRasterized; + + /// + /// FullyCoveredFragmentShaderInputVariable + /// + [FieldOffset(44)] + public Brutal.Bool32 FullyCoveredFragmentShaderInputVariable; + + /// + /// ConservativeRasterizationPostDepthCoverage + /// + [FieldOffset(48)] + public Brutal.Bool32 ConservativeRasterizationPostDepthCoverage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.gen.cs new file mode 100644 index 0000000..36e1118 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2FeaturesNV.gen.cs @@ -0,0 +1,83 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrix2FeaturesNV - Structure describing cooperative matrix features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrix2FeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix2 + /// typedef struct VkPhysicalDeviceCooperativeMatrix2FeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cooperativeMatrixWorkgroupScope; + /// VkBool32 cooperativeMatrixFlexibleDimensions; + /// VkBool32 cooperativeMatrixReductions; + /// VkBool32 cooperativeMatrixConversions; + /// VkBool32 cooperativeMatrixPerElementOperations; + /// VkBool32 cooperativeMatrixTensorAddressing; + /// VkBool32 cooperativeMatrixBlockLoads; + /// } VkPhysicalDeviceCooperativeMatrix2FeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrix2FeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrix2FeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrixWorkgroupScope + /// + [FieldOffset(16)] + public Brutal.Bool32 CooperativeMatrixWorkgroupScope; + + /// + /// CooperativeMatrixFlexibleDimensions + /// + [FieldOffset(20)] + public Brutal.Bool32 CooperativeMatrixFlexibleDimensions; + + /// + /// CooperativeMatrixReductions + /// + [FieldOffset(24)] + public Brutal.Bool32 CooperativeMatrixReductions; + + /// + /// CooperativeMatrixConversions + /// + [FieldOffset(28)] + public Brutal.Bool32 CooperativeMatrixConversions; + + /// + /// CooperativeMatrixPerElementOperations + /// + [FieldOffset(32)] + public Brutal.Bool32 CooperativeMatrixPerElementOperations; + + /// + /// CooperativeMatrixTensorAddressing + /// + [FieldOffset(36)] + public Brutal.Bool32 CooperativeMatrixTensorAddressing; + + /// + /// CooperativeMatrixBlockLoads + /// + [FieldOffset(40)] + public Brutal.Bool32 CooperativeMatrixBlockLoads; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.gen.cs new file mode 100644 index 0000000..3344ef7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrix2PropertiesNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrix2PropertiesNV - Structure describing cooperative matrix properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrix2PropertiesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix2 + /// typedef struct VkPhysicalDeviceCooperativeMatrix2PropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t cooperativeMatrixWorkgroupScopeMaxWorkgroupSize; + /// uint32_t cooperativeMatrixFlexibleDimensionsMaxDimension; + /// uint32_t cooperativeMatrixWorkgroupScopeReservedSharedMemory; + /// } VkPhysicalDeviceCooperativeMatrix2PropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrix2PropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrix2PropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrixWorkgroupScopeMaxWorkgroupSize + /// + [FieldOffset(16)] + public int CooperativeMatrixWorkgroupScopeMaxWorkgroupSize; + + /// + /// CooperativeMatrixFlexibleDimensionsMaxDimension + /// + [FieldOffset(20)] + public int CooperativeMatrixFlexibleDimensionsMaxDimension; + + /// + /// CooperativeMatrixWorkgroupScopeReservedSharedMemory + /// + [FieldOffset(24)] + public int CooperativeMatrixWorkgroupScopeReservedSharedMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM.gen.cs new file mode 100644 index 0000000..daf1785 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM - Structure describing cooperative matrix conversion features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM structure + /// is defined as: + /// + /// + /// // Provided by VK_QCOM_cooperative_matrix_conversion + /// typedef struct VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cooperativeMatrixConversion; + /// } VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrixConversionFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrixConversionFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrixConversion + /// + [FieldOffset(16)] + public Brutal.Bool32 CooperativeMatrixConversion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV.gen.cs new file mode 100644 index 0000000..88192f7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV - Structure describing cooperative matrix decode vector features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix_decode_vector + /// typedef struct VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cooperativeMatrixDecodeVector; + /// } VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrixDecodeVector + /// + [FieldOffset(16)] + public Brutal.Bool32 CooperativeMatrixDecodeVector; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.gen.cs new file mode 100644 index 0000000..aa3a4ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrixFeaturesKHR - Structure describing cooperative matrix features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrixFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_cooperative_matrix + /// typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cooperativeMatrix; + /// VkBool32 cooperativeMatrixRobustBufferAccess; + /// } VkPhysicalDeviceCooperativeMatrixFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrixFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrix + /// + [FieldOffset(16)] + public Brutal.Bool32 CooperativeMatrix; + + /// + /// CooperativeMatrixRobustBufferAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 CooperativeMatrixRobustBufferAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesNV.gen.cs new file mode 100644 index 0000000..d5ba8dd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixFeaturesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrixFeaturesNV - Structure describing cooperative matrix features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrixFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix + /// typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cooperativeMatrix; + /// VkBool32 cooperativeMatrixRobustBufferAccess; + /// } VkPhysicalDeviceCooperativeMatrixFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrixFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrixFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrix + /// + [FieldOffset(16)] + public Brutal.Bool32 CooperativeMatrix; + + /// + /// CooperativeMatrixRobustBufferAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 CooperativeMatrixRobustBufferAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.gen.cs new file mode 100644 index 0000000..b2cf267 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrixPropertiesKHR - Structure describing cooperative matrix properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrixPropertiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_cooperative_matrix + /// typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkShaderStageFlags cooperativeMatrixSupportedStages; + /// } VkPhysicalDeviceCooperativeMatrixPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrixPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrixPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrixSupportedStages + /// + [FieldOffset(16)] + public VkShaderStageFlags CooperativeMatrixSupportedStages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesNV.gen.cs new file mode 100644 index 0000000..a7382f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeMatrixPropertiesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeMatrixPropertiesNV - Structure describing cooperative matrix properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeMatrixPropertiesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_cooperative_matrix + /// typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkShaderStageFlags cooperativeMatrixSupportedStages; + /// } VkPhysicalDeviceCooperativeMatrixPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeMatrixPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeMatrixPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeMatrixSupportedStages + /// + [FieldOffset(16)] + public VkShaderStageFlags CooperativeMatrixSupportedStages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorFeaturesNV.gen.cs new file mode 100644 index 0000000..5388658 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorFeaturesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeVectorFeaturesNV - Structure describing cooperative vector features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeVectorFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// typedef struct VkPhysicalDeviceCooperativeVectorFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cooperativeVector; + /// VkBool32 cooperativeVectorTraining; + /// } VkPhysicalDeviceCooperativeVectorFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCooperativeVectorFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeVectorFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeVector + /// + [FieldOffset(16)] + public Brutal.Bool32 CooperativeVector; + + /// + /// CooperativeVectorTraining + /// + [FieldOffset(20)] + public Brutal.Bool32 CooperativeVectorTraining; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorPropertiesNV.gen.cs new file mode 100644 index 0000000..73a040c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCooperativeVectorPropertiesNV.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCooperativeVectorPropertiesNV - Structure describing cooperative vector properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCooperativeVectorPropertiesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_cooperative_vector + /// typedef struct VkPhysicalDeviceCooperativeVectorPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkShaderStageFlags cooperativeVectorSupportedStages; + /// VkBool32 cooperativeVectorTrainingFloat16Accumulation; + /// VkBool32 cooperativeVectorTrainingFloat32Accumulation; + /// uint32_t maxCooperativeVectorComponents; + /// } VkPhysicalDeviceCooperativeVectorPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceCooperativeVectorPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCooperativeVectorPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CooperativeVectorSupportedStages + /// + [FieldOffset(16)] + public VkShaderStageFlags CooperativeVectorSupportedStages; + + /// + /// CooperativeVectorTrainingFloat16Accumulation + /// + [FieldOffset(20)] + public Brutal.Bool32 CooperativeVectorTrainingFloat16Accumulation; + + /// + /// CooperativeVectorTrainingFloat32Accumulation + /// + [FieldOffset(24)] + public Brutal.Bool32 CooperativeVectorTrainingFloat32Accumulation; + + /// + /// MaxCooperativeVectorComponents + /// + [FieldOffset(28)] + public int MaxCooperativeVectorComponents; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR.gen.cs new file mode 100644 index 0000000..a452c9d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR - Structure describing indirect copy features supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef struct VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 indirectMemoryCopy; + /// VkBool32 indirectMemoryToImageCopy; + /// } VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCopyMemoryIndirectFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IndirectMemoryCopy + /// + [FieldOffset(16)] + public Brutal.Bool32 IndirectMemoryCopy; + + /// + /// IndirectMemoryToImageCopy + /// + [FieldOffset(20)] + public Brutal.Bool32 IndirectMemoryToImageCopy; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.gen.cs new file mode 100644 index 0000000..a6ba61f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCopyMemoryIndirectFeaturesNV - Structure describing indirect copy features supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCopyMemoryIndirectFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_copy_memory_indirect + /// typedef struct VkPhysicalDeviceCopyMemoryIndirectFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 indirectCopy; + /// } VkPhysicalDeviceCopyMemoryIndirectFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCopyMemoryIndirectFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCopyMemoryIndirectFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IndirectCopy + /// + [FieldOffset(16)] + public Brutal.Bool32 IndirectCopy; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR.gen.cs new file mode 100644 index 0000000..7828209 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR - Structure describing supported queues for indirect copy + /// + /// + /// + /// The VkPhysicalDeviceCopyMemoryIndirectPropertiesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect + /// typedef struct VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkQueueFlags supportedQueues; + /// } VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCopyMemoryIndirectPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedQueues is a bitmask of VkQueueFlags indicating the types of queues on which indirect copy commands^ are supported. If a queue family supports any of the bits set in supportedQueues, then it must support at least one indirect copy command^. + /// + [FieldOffset(16)] + public VkQueueFlags SupportedQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCornerSampledImageFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCornerSampledImageFeaturesNV.gen.cs new file mode 100644 index 0000000..7d07f3b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCornerSampledImageFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCornerSampledImageFeaturesNV - Structure describing corner sampled image features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCornerSampledImageFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_corner_sampled_image + /// typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cornerSampledImage; + /// } VkPhysicalDeviceCornerSampledImageFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCornerSampledImageFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCornerSampledImageFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CornerSampledImage + /// + [FieldOffset(16)] + public Brutal.Bool32 CornerSampledImage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoverageReductionModeFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoverageReductionModeFeaturesNV.gen.cs new file mode 100644 index 0000000..1b09e15 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCoverageReductionModeFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCoverageReductionModeFeaturesNV - Structure describing the coverage reduction mode features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCoverageReductionModeFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_coverage_reduction_mode + /// typedef struct VkPhysicalDeviceCoverageReductionModeFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 coverageReductionMode; + /// } VkPhysicalDeviceCoverageReductionModeFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCoverageReductionModeFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCoverageReductionModeFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CoverageReductionMode + /// + [FieldOffset(16)] + public Brutal.Bool32 CoverageReductionMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicClampFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicClampFeaturesQCOM.gen.cs new file mode 100644 index 0000000..9107ec8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicClampFeaturesQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCubicClampFeaturesQCOM - Structure describing cubic clamp features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCubicClampFeaturesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_filter_cubic_clamp + /// typedef struct VkPhysicalDeviceCubicClampFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 cubicRangeClamp; + /// } VkPhysicalDeviceCubicClampFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCubicClampFeaturesQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCubicClampFeaturesQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CubicRangeClamp + /// + [FieldOffset(16)] + public Brutal.Bool32 CubicRangeClamp; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicWeightsFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicWeightsFeaturesQCOM.gen.cs new file mode 100644 index 0000000..fe412c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCubicWeightsFeaturesQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCubicWeightsFeaturesQCOM - Structure describing cubic weight selection features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCubicWeightsFeaturesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_filter_cubic_weights + /// typedef struct VkPhysicalDeviceCubicWeightsFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 selectableCubicWeights; + /// } VkPhysicalDeviceCubicWeightsFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCubicWeightsFeaturesQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCubicWeightsFeaturesQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SelectableCubicWeights + /// + [FieldOffset(16)] + public Brutal.Bool32 SelectableCubicWeights; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorFeaturesEXT.gen.cs new file mode 100644 index 0000000..519e113 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCustomBorderColorFeaturesEXT - Structure describing whether custom border colors can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCustomBorderColorFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_custom_border_color + /// typedef struct VkPhysicalDeviceCustomBorderColorFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 customBorderColors; + /// VkBool32 customBorderColorWithoutFormat; + /// } VkPhysicalDeviceCustomBorderColorFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCustomBorderColorFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCustomBorderColorFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CustomBorderColors + /// + [FieldOffset(16)] + public Brutal.Bool32 CustomBorderColors; + + /// + /// CustomBorderColorWithoutFormat + /// + [FieldOffset(20)] + public Brutal.Bool32 CustomBorderColorWithoutFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorPropertiesEXT.gen.cs new file mode 100644 index 0000000..04f7834 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomBorderColorPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCustomBorderColorPropertiesEXT - Structure describing whether custom border colors can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceCustomBorderColorPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_custom_border_color + /// typedef struct VkPhysicalDeviceCustomBorderColorPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxCustomBorderColorSamplers; + /// } VkPhysicalDeviceCustomBorderColorPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCustomBorderColorPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCustomBorderColorPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxCustomBorderColorSamplers + /// + [FieldOffset(16)] + public int MaxCustomBorderColorSamplers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomResolveFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomResolveFeaturesEXT.gen.cs new file mode 100644 index 0000000..bdc67b7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceCustomResolveFeaturesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceCustomResolveFeaturesEXT - Structure indicating support for shader resolves + /// + /// + /// + /// The VkPhysicalDeviceCustomResolveFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_custom_resolve + /// typedef struct VkPhysicalDeviceCustomResolveFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 customResolve; + /// } VkPhysicalDeviceCustomResolveFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceCustomResolveFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceCustomResolveFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CustomResolve + /// + [FieldOffset(16)] + public Brutal.Bool32 CustomResolve; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphFeaturesARM.gen.cs new file mode 100644 index 0000000..82eba6d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphFeaturesARM.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphFeaturesARM - Structure describing features to control data graph pipelines + /// + /// + /// + /// The VkPhysicalDeviceDataGraphFeaturesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkPhysicalDeviceDataGraphFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dataGraph; + /// VkBool32 dataGraphUpdateAfterBind; + /// VkBool32 dataGraphSpecializationConstants; + /// VkBool32 dataGraphDescriptorBuffer; + /// VkBool32 dataGraphShaderModule; + /// } VkPhysicalDeviceDataGraphFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceDataGraphFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDataGraphFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataGraph + /// + [FieldOffset(16)] + public Brutal.Bool32 DataGraph; + + /// + /// DataGraphUpdateAfterBind + /// + [FieldOffset(20)] + public Brutal.Bool32 DataGraphUpdateAfterBind; + + /// + /// DataGraphSpecializationConstants + /// + [FieldOffset(24)] + public Brutal.Bool32 DataGraphSpecializationConstants; + + /// + /// DataGraphDescriptorBuffer + /// + [FieldOffset(28)] + public Brutal.Bool32 DataGraphDescriptorBuffer; + + /// + /// DataGraphShaderModule + /// + [FieldOffset(32)] + public Brutal.Bool32 DataGraphShaderModule; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphModelFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphModelFeaturesQCOM.gen.cs new file mode 100644 index 0000000..16f1b8c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphModelFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphModelFeaturesQCOM - Structure describing features to control data graph model + /// + /// + /// + /// The VkPhysicalDeviceDataGraphModelFeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_data_graph_model + /// typedef struct VkPhysicalDeviceDataGraphModelFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dataGraphModel; + /// } VkPhysicalDeviceDataGraphModelFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDataGraphModelFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDataGraphModelFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataGraphModel + /// + [FieldOffset(16)] + public Brutal.Bool32 DataGraphModel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM.gen.cs new file mode 100644 index 0000000..489a05f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM - Structure describing features to control data graph neural accelerator statistics + /// + /// + /// + /// The VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM + /// structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_neural_accelerator_statistics + /// typedef struct VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dataGraphNeuralAcceleratorStatistics; + /// } VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceDataGraphNeuralAcceleratorStatisticsFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataGraphNeuralAcceleratorStatistics + /// + [FieldOffset(16)] + public Brutal.Bool32 DataGraphNeuralAcceleratorStatistics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOperationSupportARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOperationSupportARM.gen.cs new file mode 100644 index 0000000..6d9d3ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOperationSupportARM.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphOperationSupportARM - Structure describing an operation or set of operations supported by a data graph processing engine + /// + /// + /// + /// The VkPhysicalDeviceDataGraphOperationSupportARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkPhysicalDeviceDataGraphOperationSupportARM { + /// VkPhysicalDeviceDataGraphOperationTypeARM operationType; + /// char name[VK_MAX_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_SET_NAME_SIZE_ARM]; + /// uint32_t version; + /// } VkPhysicalDeviceDataGraphOperationSupportARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public unsafe partial struct VkPhysicalDeviceDataGraphOperationSupportARM() + { + /// + /// OperationType is a VkPhysicalDeviceDataGraphOperationTypeARM enum specifying the type of the operation whose support is being described. + /// + [FieldOffset(0)] + public VkPhysicalDeviceDataGraphOperationTypeARM OperationType; + + /// + [FieldOffset(4)] + public fixed byte Name[128]; + + /// + /// Version is an integer specifying the version of the operation whose support is being described. + /// + [FieldOffset(132)] + public int Version; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM.gen.cs new file mode 100644 index 0000000..d66b517 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM - Structure describing the data graph optical flow features supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dataGraphOpticalFlow; + /// } VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDataGraphOpticalFlowFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDataGraphOpticalFlowFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataGraphOpticalFlow + /// + [FieldOffset(16)] + public Brutal.Bool32 DataGraphOpticalFlow; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphProcessingEngineARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphProcessingEngineARM.gen.cs new file mode 100644 index 0000000..5a7f369 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDataGraphProcessingEngineARM.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDataGraphProcessingEngineARM - Structure describing a data graph processing engine supported by a physical device + /// + /// + /// + /// The VkPhysicalDeviceDataGraphProcessingEngineARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkPhysicalDeviceDataGraphProcessingEngineARM { + /// VkPhysicalDeviceDataGraphProcessingEngineTypeARM type; + /// VkBool32 isForeign; + /// } VkPhysicalDeviceDataGraphProcessingEngineARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkPhysicalDeviceDataGraphProcessingEngineARM() + { + /// + /// Type is a VkPhysicalDeviceDataGraphProcessingEngineTypeARM that specifies the type of the processing engine. + /// + [FieldOffset(0)] + public VkPhysicalDeviceDataGraphProcessingEngineTypeARM Type; + + /// + /// IsForeign specifies whether the processing engine is foreign. + /// + [FieldOffset(4)] + public Brutal.Bool32 IsForeign; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.gen.cs new file mode 100644 index 0000000..0323380 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV - Structure describing dedicated allocation image aliasing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_dedicated_allocation_image_aliasing + /// typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dedicatedAllocationImageAliasing; + /// } VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DedicatedAllocationImageAliasing + /// + [FieldOffset(16)] + public Brutal.Bool32 DedicatedAllocationImageAliasing; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthBiasControlFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthBiasControlFeaturesEXT.gen.cs new file mode 100644 index 0000000..ca6192e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthBiasControlFeaturesEXT.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDepthBiasControlFeaturesEXT - Structure indicating support for depth bias scaling and representation control + /// + /// + /// + /// The VkPhysicalDeviceDepthBiasControlFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_depth_bias_control + /// typedef struct VkPhysicalDeviceDepthBiasControlFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 depthBiasControl; + /// VkBool32 leastRepresentableValueForceUnormRepresentation; + /// VkBool32 floatRepresentation; + /// VkBool32 depthBiasExact; + /// } VkPhysicalDeviceDepthBiasControlFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceDepthBiasControlFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDepthBiasControlFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthBiasControl + /// + [FieldOffset(16)] + public Brutal.Bool32 DepthBiasControl; + + /// + /// LeastRepresentableValueForceUnormRepresentation + /// + [FieldOffset(20)] + public Brutal.Bool32 LeastRepresentableValueForceUnormRepresentation; + + /// + /// FloatRepresentation + /// + [FieldOffset(24)] + public Brutal.Bool32 FloatRepresentation; + + /// + /// DepthBiasExact + /// + [FieldOffset(28)] + public Brutal.Bool32 DepthBiasExact; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampControlFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampControlFeaturesEXT.gen.cs new file mode 100644 index 0000000..bb27c57 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampControlFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDepthClampControlFeaturesEXT - Structure describing additional depth clamp control supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDepthClampControlFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_depth_clamp_control + /// typedef struct VkPhysicalDeviceDepthClampControlFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 depthClampControl; + /// } VkPhysicalDeviceDepthClampControlFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDepthClampControlFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDepthClampControlFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthClampControl + /// + [FieldOffset(16)] + public Brutal.Bool32 DepthClampControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampZeroOneFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampZeroOneFeaturesKHR.gen.cs new file mode 100644 index 0000000..5c8bd34 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClampZeroOneFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDepthClampZeroOneFeaturesKHR - Structure describing feature to control zero to one depth clamping + /// + /// + /// + /// The VkPhysicalDeviceDepthClampZeroOneFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_depth_clamp_zero_one + /// typedef struct VkPhysicalDeviceDepthClampZeroOneFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 depthClampZeroOne; + /// } VkPhysicalDeviceDepthClampZeroOneFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDepthClampZeroOneFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDepthClampZeroOneFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthClampZeroOne + /// + [FieldOffset(16)] + public Brutal.Bool32 DepthClampZeroOne; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipControlFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipControlFeaturesEXT.gen.cs new file mode 100644 index 0000000..70dc741 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipControlFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDepthClipControlFeaturesEXT - Structure describing additional depth clip control supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDepthClipControlFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_depth_clip_control + /// typedef struct VkPhysicalDeviceDepthClipControlFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 depthClipControl; + /// } VkPhysicalDeviceDepthClipControlFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDepthClipControlFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDepthClipControlFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthClipControl + /// + [FieldOffset(16)] + public Brutal.Bool32 DepthClipControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipEnableFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipEnableFeaturesEXT.gen.cs new file mode 100644 index 0000000..2aa2258 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthClipEnableFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDepthClipEnableFeaturesEXT - Structure indicating support for explicit enable of depth clip + /// + /// + /// + /// The VkPhysicalDeviceDepthClipEnableFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_depth_clip_enable + /// typedef struct VkPhysicalDeviceDepthClipEnableFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 depthClipEnable; + /// } VkPhysicalDeviceDepthClipEnableFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDepthClipEnableFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDepthClipEnableFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthClipEnable + /// + [FieldOffset(16)] + public Brutal.Bool32 DepthClipEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthStencilResolveProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthStencilResolveProperties.gen.cs new file mode 100644 index 0000000..5677490 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDepthStencilResolveProperties.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDepthStencilResolveProperties - Structure describing depth/stencil resolve properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDepthStencilResolveProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceDepthStencilResolveProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkResolveModeFlags supportedDepthResolveModes; + /// VkResolveModeFlags supportedStencilResolveModes; + /// VkBool32 independentResolveNone; + /// VkBool32 independentResolve; + /// } VkPhysicalDeviceDepthStencilResolveProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceDepthStencilResolveProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDepthStencilResolveProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedDepthResolveModes + /// + [FieldOffset(16)] + public VkResolveModeFlags SupportedDepthResolveModes; + + /// + /// SupportedStencilResolveModes + /// + [FieldOffset(20)] + public VkResolveModeFlags SupportedStencilResolveModes; + + /// + /// IndependentResolveNone + /// + [FieldOffset(24)] + public Brutal.Bool32 IndependentResolveNone; + + /// + /// IndependentResolve + /// + [FieldOffset(28)] + public Brutal.Bool32 IndependentResolve; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.gen.cs new file mode 100644 index 0000000..dfa2de3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT - Structure describing descriptor buffer density map properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_EXT_fragment_density_map + /// typedef struct VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// size_t combinedImageSamplerDensityMapDescriptorSize; + /// } VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CombinedImageSamplerDensityMapDescriptorSize + /// + [FieldOffset(16)] + public nuint CombinedImageSamplerDensityMapDescriptorSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferFeaturesEXT.gen.cs new file mode 100644 index 0000000..116ad31 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferFeaturesEXT.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorBufferFeaturesEXT - Structure describing the descriptor buffer features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorBufferFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkPhysicalDeviceDescriptorBufferFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 descriptorBuffer; + /// VkBool32 descriptorBufferCaptureReplay; + /// VkBool32 descriptorBufferImageLayoutIgnored; + /// VkBool32 descriptorBufferPushDescriptors; + /// } VkPhysicalDeviceDescriptorBufferFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceDescriptorBufferFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorBufferFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorBuffer + /// + [FieldOffset(16)] + public Brutal.Bool32 DescriptorBuffer; + + /// + /// DescriptorBufferCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 DescriptorBufferCaptureReplay; + + /// + /// DescriptorBufferImageLayoutIgnored + /// + [FieldOffset(24)] + public Brutal.Bool32 DescriptorBufferImageLayoutIgnored; + + /// + /// DescriptorBufferPushDescriptors + /// + [FieldOffset(28)] + public Brutal.Bool32 DescriptorBufferPushDescriptors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferPropertiesEXT.gen.cs new file mode 100644 index 0000000..5e942d4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferPropertiesEXT.gen.cs @@ -0,0 +1,265 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorBufferPropertiesEXT - Structure describing descriptor buffer properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorBufferPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkPhysicalDeviceDescriptorBufferPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 combinedImageSamplerDescriptorSingleArray; + /// VkBool32 bufferlessPushDescriptors; + /// VkBool32 allowSamplerImageViewPostSubmitCreation; + /// VkDeviceSize descriptorBufferOffsetAlignment; + /// uint32_t maxDescriptorBufferBindings; + /// uint32_t maxResourceDescriptorBufferBindings; + /// uint32_t maxSamplerDescriptorBufferBindings; + /// uint32_t maxEmbeddedImmutableSamplerBindings; + /// uint32_t maxEmbeddedImmutableSamplers; + /// size_t bufferCaptureReplayDescriptorDataSize; + /// size_t imageCaptureReplayDescriptorDataSize; + /// size_t imageViewCaptureReplayDescriptorDataSize; + /// size_t samplerCaptureReplayDescriptorDataSize; + /// size_t accelerationStructureCaptureReplayDescriptorDataSize; + /// size_t samplerDescriptorSize; + /// size_t combinedImageSamplerDescriptorSize; + /// size_t sampledImageDescriptorSize; + /// size_t storageImageDescriptorSize; + /// size_t uniformTexelBufferDescriptorSize; + /// size_t robustUniformTexelBufferDescriptorSize; + /// size_t storageTexelBufferDescriptorSize; + /// size_t robustStorageTexelBufferDescriptorSize; + /// size_t uniformBufferDescriptorSize; + /// size_t robustUniformBufferDescriptorSize; + /// size_t storageBufferDescriptorSize; + /// size_t robustStorageBufferDescriptorSize; + /// size_t inputAttachmentDescriptorSize; + /// size_t accelerationStructureDescriptorSize; + /// VkDeviceSize maxSamplerDescriptorBufferRange; + /// VkDeviceSize maxResourceDescriptorBufferRange; + /// VkDeviceSize samplerDescriptorBufferAddressSpaceSize; + /// VkDeviceSize resourceDescriptorBufferAddressSpaceSize; + /// VkDeviceSize descriptorBufferAddressSpaceSize; + /// } VkPhysicalDeviceDescriptorBufferPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 256)] + public unsafe partial struct VkPhysicalDeviceDescriptorBufferPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorBufferPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CombinedImageSamplerDescriptorSingleArray + /// + [FieldOffset(16)] + public Brutal.Bool32 CombinedImageSamplerDescriptorSingleArray; + + /// + /// BufferlessPushDescriptors + /// + [FieldOffset(20)] + public Brutal.Bool32 BufferlessPushDescriptors; + + /// + /// AllowSamplerImageViewPostSubmitCreation + /// + [FieldOffset(24)] + public Brutal.Bool32 AllowSamplerImageViewPostSubmitCreation; + + /// + /// DescriptorBufferOffsetAlignment + /// + [FieldOffset(32)] + public ByteSize64 DescriptorBufferOffsetAlignment; + + /// + /// MaxDescriptorBufferBindings + /// + [FieldOffset(40)] + public int MaxDescriptorBufferBindings; + + /// + /// MaxResourceDescriptorBufferBindings + /// + [FieldOffset(44)] + public int MaxResourceDescriptorBufferBindings; + + /// + /// MaxSamplerDescriptorBufferBindings + /// + [FieldOffset(48)] + public int MaxSamplerDescriptorBufferBindings; + + /// + /// MaxEmbeddedImmutableSamplerBindings + /// + [FieldOffset(52)] + public int MaxEmbeddedImmutableSamplerBindings; + + /// + /// MaxEmbeddedImmutableSamplers + /// + [FieldOffset(56)] + public int MaxEmbeddedImmutableSamplers; + + /// + /// BufferCaptureReplayDescriptorDataSize + /// + [FieldOffset(64)] + public nuint BufferCaptureReplayDescriptorDataSize; + + /// + /// ImageCaptureReplayDescriptorDataSize + /// + [FieldOffset(72)] + public nuint ImageCaptureReplayDescriptorDataSize; + + /// + /// ImageViewCaptureReplayDescriptorDataSize + /// + [FieldOffset(80)] + public nuint ImageViewCaptureReplayDescriptorDataSize; + + /// + /// SamplerCaptureReplayDescriptorDataSize + /// + [FieldOffset(88)] + public nuint SamplerCaptureReplayDescriptorDataSize; + + /// + /// AccelerationStructureCaptureReplayDescriptorDataSize + /// + [FieldOffset(96)] + public nuint AccelerationStructureCaptureReplayDescriptorDataSize; + + /// + /// SamplerDescriptorSize + /// + [FieldOffset(104)] + public nuint SamplerDescriptorSize; + + /// + /// CombinedImageSamplerDescriptorSize + /// + [FieldOffset(112)] + public nuint CombinedImageSamplerDescriptorSize; + + /// + /// SampledImageDescriptorSize + /// + [FieldOffset(120)] + public nuint SampledImageDescriptorSize; + + /// + /// StorageImageDescriptorSize + /// + [FieldOffset(128)] + public nuint StorageImageDescriptorSize; + + /// + /// UniformTexelBufferDescriptorSize + /// + [FieldOffset(136)] + public nuint UniformTexelBufferDescriptorSize; + + /// + /// RobustUniformTexelBufferDescriptorSize + /// + [FieldOffset(144)] + public nuint RobustUniformTexelBufferDescriptorSize; + + /// + /// StorageTexelBufferDescriptorSize + /// + [FieldOffset(152)] + public nuint StorageTexelBufferDescriptorSize; + + /// + /// RobustStorageTexelBufferDescriptorSize + /// + [FieldOffset(160)] + public nuint RobustStorageTexelBufferDescriptorSize; + + /// + /// UniformBufferDescriptorSize + /// + [FieldOffset(168)] + public nuint UniformBufferDescriptorSize; + + /// + /// RobustUniformBufferDescriptorSize + /// + [FieldOffset(176)] + public nuint RobustUniformBufferDescriptorSize; + + /// + /// StorageBufferDescriptorSize + /// + [FieldOffset(184)] + public nuint StorageBufferDescriptorSize; + + /// + /// RobustStorageBufferDescriptorSize + /// + [FieldOffset(192)] + public nuint RobustStorageBufferDescriptorSize; + + /// + /// InputAttachmentDescriptorSize + /// + [FieldOffset(200)] + public nuint InputAttachmentDescriptorSize; + + /// + /// AccelerationStructureDescriptorSize + /// + [FieldOffset(208)] + public nuint AccelerationStructureDescriptorSize; + + /// + /// MaxSamplerDescriptorBufferRange + /// + [FieldOffset(216)] + public ByteSize64 MaxSamplerDescriptorBufferRange; + + /// + /// MaxResourceDescriptorBufferRange + /// + [FieldOffset(224)] + public ByteSize64 MaxResourceDescriptorBufferRange; + + /// + /// SamplerDescriptorBufferAddressSpaceSize + /// + [FieldOffset(232)] + public ByteSize64 SamplerDescriptorBufferAddressSpaceSize; + + /// + /// ResourceDescriptorBufferAddressSpaceSize + /// + [FieldOffset(240)] + public ByteSize64 ResourceDescriptorBufferAddressSpaceSize; + + /// + /// DescriptorBufferAddressSpaceSize + /// + [FieldOffset(248)] + public ByteSize64 DescriptorBufferAddressSpaceSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorFeaturesARM.gen.cs new file mode 100644 index 0000000..4f0d77c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorBufferTensorFeaturesARM - Structure describing the descriptor buffer tensor features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorBufferTensorFeaturesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// typedef struct VkPhysicalDeviceDescriptorBufferTensorFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 descriptorBufferTensorDescriptors; + /// } VkPhysicalDeviceDescriptorBufferTensorFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDescriptorBufferTensorFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorBufferTensorFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorBufferTensorDescriptors + /// + [FieldOffset(16)] + public Brutal.Bool32 DescriptorBufferTensorDescriptors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorPropertiesARM.gen.cs new file mode 100644 index 0000000..bc84f00 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorBufferTensorPropertiesARM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorBufferTensorPropertiesARM - Structure describing descriptor buffer tensor properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorBufferTensorPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// typedef struct VkPhysicalDeviceDescriptorBufferTensorPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// size_t tensorCaptureReplayDescriptorDataSize; + /// size_t tensorViewCaptureReplayDescriptorDataSize; + /// size_t tensorDescriptorSize; + /// } VkPhysicalDeviceDescriptorBufferTensorPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceDescriptorBufferTensorPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorBufferTensorPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorCaptureReplayDescriptorDataSize indicates the maximum size in bytes of the opaque data used for capture and replay with tensors. + /// + [FieldOffset(16)] + public nuint TensorCaptureReplayDescriptorDataSize; + + /// + /// TensorViewCaptureReplayDescriptorDataSize indicates the maximum size in bytes of the opaque data used for capture and replay with tensor views. + /// + [FieldOffset(24)] + public nuint TensorViewCaptureReplayDescriptorDataSize; + + /// + /// TensorDescriptorSize indicates the size in bytes of a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor. + /// + [FieldOffset(32)] + public nuint TensorDescriptorSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapFeaturesEXT.gen.cs new file mode 100644 index 0000000..e3f2532 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapFeaturesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorHeapFeaturesEXT - Structure describing support for descriptor heaps + /// + /// + /// + /// The VkPhysicalDeviceDescriptorHeapFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkPhysicalDeviceDescriptorHeapFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 descriptorHeap; + /// VkBool32 descriptorHeapCaptureReplay; + /// } VkPhysicalDeviceDescriptorHeapFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDescriptorHeapFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorHeapFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorHeap + /// + [FieldOffset(16)] + public Brutal.Bool32 DescriptorHeap; + + /// + /// DescriptorHeapCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 DescriptorHeapCaptureReplay; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapPropertiesEXT.gen.cs new file mode 100644 index 0000000..d774b8c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapPropertiesEXT.gen.cs @@ -0,0 +1,167 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorHeapPropertiesEXT - Structure describing supported image alignments for a physical device + /// + /// + /// + /// The VkPhysicalDeviceDescriptorHeapPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkPhysicalDeviceDescriptorHeapPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize samplerHeapAlignment; + /// VkDeviceSize resourceHeapAlignment; + /// VkDeviceSize maxSamplerHeapSize; + /// VkDeviceSize maxResourceHeapSize; + /// VkDeviceSize minSamplerHeapReservedRange; + /// VkDeviceSize minSamplerHeapReservedRangeWithEmbedded; + /// VkDeviceSize minResourceHeapReservedRange; + /// VkDeviceSize samplerDescriptorSize; + /// VkDeviceSize imageDescriptorSize; + /// VkDeviceSize bufferDescriptorSize; + /// VkDeviceSize samplerDescriptorAlignment; + /// VkDeviceSize imageDescriptorAlignment; + /// VkDeviceSize bufferDescriptorAlignment; + /// VkDeviceSize maxPushDataSize; + /// size_t imageCaptureReplayOpaqueDataSize; + /// uint32_t maxDescriptorHeapEmbeddedSamplers; + /// uint32_t samplerYcbcrConversionCount; + /// VkBool32 sparseDescriptorHeaps; + /// VkBool32 protectedDescriptorHeaps; + /// } VkPhysicalDeviceDescriptorHeapPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 152)] + public unsafe partial struct VkPhysicalDeviceDescriptorHeapPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorHeapPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SamplerHeapAlignment + /// + [FieldOffset(16)] + public ByteSize64 SamplerHeapAlignment; + + /// + /// ResourceHeapAlignment + /// + [FieldOffset(24)] + public ByteSize64 ResourceHeapAlignment; + + /// + /// MaxSamplerHeapSize + /// + [FieldOffset(32)] + public ByteSize64 MaxSamplerHeapSize; + + /// + /// MaxResourceHeapSize + /// + [FieldOffset(40)] + public ByteSize64 MaxResourceHeapSize; + + /// + /// MinSamplerHeapReservedRange + /// + [FieldOffset(48)] + public ByteSize64 MinSamplerHeapReservedRange; + + /// + /// MinSamplerHeapReservedRangeWithEmbedded + /// + [FieldOffset(56)] + public ByteSize64 MinSamplerHeapReservedRangeWithEmbedded; + + /// + /// MinResourceHeapReservedRange + /// + [FieldOffset(64)] + public ByteSize64 MinResourceHeapReservedRange; + + /// + /// SamplerDescriptorSize + /// + [FieldOffset(72)] + public ByteSize64 SamplerDescriptorSize; + + /// + /// ImageDescriptorSize + /// + [FieldOffset(80)] + public ByteSize64 ImageDescriptorSize; + + /// + /// BufferDescriptorSize + /// + [FieldOffset(88)] + public ByteSize64 BufferDescriptorSize; + + /// + /// SamplerDescriptorAlignment + /// + [FieldOffset(96)] + public ByteSize64 SamplerDescriptorAlignment; + + /// + /// ImageDescriptorAlignment + /// + [FieldOffset(104)] + public ByteSize64 ImageDescriptorAlignment; + + /// + /// BufferDescriptorAlignment + /// + [FieldOffset(112)] + public ByteSize64 BufferDescriptorAlignment; + + /// + /// MaxPushDataSize + /// + [FieldOffset(120)] + public ByteSize64 MaxPushDataSize; + + /// + /// ImageCaptureReplayOpaqueDataSize + /// + [FieldOffset(128)] + public nuint ImageCaptureReplayOpaqueDataSize; + + /// + /// MaxDescriptorHeapEmbeddedSamplers + /// + [FieldOffset(136)] + public int MaxDescriptorHeapEmbeddedSamplers; + + /// + /// SamplerYcbcrConversionCount + /// + [FieldOffset(140)] + public int SamplerYcbcrConversionCount; + + /// + /// SparseDescriptorHeaps + /// + [FieldOffset(144)] + public Brutal.Bool32 SparseDescriptorHeaps; + + /// + /// ProtectedDescriptorHeaps + /// + [FieldOffset(148)] + public Brutal.Bool32 ProtectedDescriptorHeaps; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapTensorPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapTensorPropertiesARM.gen.cs new file mode 100644 index 0000000..b4038ab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorHeapTensorPropertiesARM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorHeapTensorPropertiesARM - Structure describing descriptor heap tensor properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorHeapTensorPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors + /// typedef struct VkPhysicalDeviceDescriptorHeapTensorPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize tensorDescriptorSize; + /// VkDeviceSize tensorDescriptorAlignment; + /// size_t tensorCaptureReplayOpaqueDataSize; + /// } VkPhysicalDeviceDescriptorHeapTensorPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceDescriptorHeapTensorPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorHeapTensorPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorDescriptorSize + /// + [FieldOffset(16)] + public ByteSize64 TensorDescriptorSize; + + /// + /// TensorDescriptorAlignment + /// + [FieldOffset(24)] + public ByteSize64 TensorDescriptorAlignment; + + /// + /// TensorCaptureReplayOpaqueDataSize + /// + [FieldOffset(32)] + public nuint TensorCaptureReplayOpaqueDataSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingFeatures.gen.cs new file mode 100644 index 0000000..578ceb2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingFeatures.gen.cs @@ -0,0 +1,174 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorIndexingFeatures - Structure describing descriptor indexing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorIndexingFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceDescriptorIndexingFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderInputAttachmentArrayDynamicIndexing; + /// VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; + /// VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; + /// VkBool32 shaderUniformBufferArrayNonUniformIndexing; + /// VkBool32 shaderSampledImageArrayNonUniformIndexing; + /// VkBool32 shaderStorageBufferArrayNonUniformIndexing; + /// VkBool32 shaderStorageImageArrayNonUniformIndexing; + /// VkBool32 shaderInputAttachmentArrayNonUniformIndexing; + /// VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; + /// VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; + /// VkBool32 descriptorBindingUniformBufferUpdateAfterBind; + /// VkBool32 descriptorBindingSampledImageUpdateAfterBind; + /// VkBool32 descriptorBindingStorageImageUpdateAfterBind; + /// VkBool32 descriptorBindingStorageBufferUpdateAfterBind; + /// VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; + /// VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; + /// VkBool32 descriptorBindingUpdateUnusedWhilePending; + /// VkBool32 descriptorBindingPartiallyBound; + /// VkBool32 descriptorBindingVariableDescriptorCount; + /// VkBool32 runtimeDescriptorArray; + /// } VkPhysicalDeviceDescriptorIndexingFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkPhysicalDeviceDescriptorIndexingFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorIndexingFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderInputAttachmentArrayDynamicIndexing + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderInputAttachmentArrayDynamicIndexing; + + /// + /// ShaderUniformTexelBufferArrayDynamicIndexing + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderUniformTexelBufferArrayDynamicIndexing; + + /// + /// ShaderStorageTexelBufferArrayDynamicIndexing + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderStorageTexelBufferArrayDynamicIndexing; + + /// + /// ShaderUniformBufferArrayNonUniformIndexing + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderUniformBufferArrayNonUniformIndexing; + + /// + /// ShaderSampledImageArrayNonUniformIndexing + /// + [FieldOffset(32)] + public Brutal.Bool32 ShaderSampledImageArrayNonUniformIndexing; + + /// + /// ShaderStorageBufferArrayNonUniformIndexing + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderStorageBufferArrayNonUniformIndexing; + + /// + /// ShaderStorageImageArrayNonUniformIndexing + /// + [FieldOffset(40)] + public Brutal.Bool32 ShaderStorageImageArrayNonUniformIndexing; + + /// + /// ShaderInputAttachmentArrayNonUniformIndexing + /// + [FieldOffset(44)] + public Brutal.Bool32 ShaderInputAttachmentArrayNonUniformIndexing; + + /// + /// ShaderUniformTexelBufferArrayNonUniformIndexing + /// + [FieldOffset(48)] + public Brutal.Bool32 ShaderUniformTexelBufferArrayNonUniformIndexing; + + /// + /// ShaderStorageTexelBufferArrayNonUniformIndexing + /// + [FieldOffset(52)] + public Brutal.Bool32 ShaderStorageTexelBufferArrayNonUniformIndexing; + + /// + /// DescriptorBindingUniformBufferUpdateAfterBind + /// + [FieldOffset(56)] + public Brutal.Bool32 DescriptorBindingUniformBufferUpdateAfterBind; + + /// + /// DescriptorBindingSampledImageUpdateAfterBind + /// + [FieldOffset(60)] + public Brutal.Bool32 DescriptorBindingSampledImageUpdateAfterBind; + + /// + /// DescriptorBindingStorageImageUpdateAfterBind + /// + [FieldOffset(64)] + public Brutal.Bool32 DescriptorBindingStorageImageUpdateAfterBind; + + /// + /// DescriptorBindingStorageBufferUpdateAfterBind + /// + [FieldOffset(68)] + public Brutal.Bool32 DescriptorBindingStorageBufferUpdateAfterBind; + + /// + /// DescriptorBindingUniformTexelBufferUpdateAfterBind + /// + [FieldOffset(72)] + public Brutal.Bool32 DescriptorBindingUniformTexelBufferUpdateAfterBind; + + /// + /// DescriptorBindingStorageTexelBufferUpdateAfterBind + /// + [FieldOffset(76)] + public Brutal.Bool32 DescriptorBindingStorageTexelBufferUpdateAfterBind; + + /// + /// DescriptorBindingUpdateUnusedWhilePending + /// + [FieldOffset(80)] + public Brutal.Bool32 DescriptorBindingUpdateUnusedWhilePending; + + /// + /// DescriptorBindingPartiallyBound + /// + [FieldOffset(84)] + public Brutal.Bool32 DescriptorBindingPartiallyBound; + + /// + /// DescriptorBindingVariableDescriptorCount + /// + [FieldOffset(88)] + public Brutal.Bool32 DescriptorBindingVariableDescriptorCount; + + /// + /// RuntimeDescriptorArray + /// + [FieldOffset(92)] + public Brutal.Bool32 RuntimeDescriptorArray; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingProperties.gen.cs new file mode 100644 index 0000000..af63124 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorIndexingProperties.gen.cs @@ -0,0 +1,195 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorIndexingProperties - Structure describing descriptor indexing properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorIndexingProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceDescriptorIndexingProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxUpdateAfterBindDescriptorsInAllPools; + /// VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; + /// VkBool32 shaderSampledImageArrayNonUniformIndexingNative; + /// VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; + /// VkBool32 shaderStorageImageArrayNonUniformIndexingNative; + /// VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; + /// VkBool32 robustBufferAccessUpdateAfterBind; + /// VkBool32 quadDivergentImplicitLod; + /// uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; + /// uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; + /// uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; + /// uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; + /// uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; + /// uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; + /// uint32_t maxPerStageUpdateAfterBindResources; + /// uint32_t maxDescriptorSetUpdateAfterBindSamplers; + /// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; + /// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindSampledImages; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageImages; + /// uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; + /// } VkPhysicalDeviceDescriptorIndexingProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 112)] + public unsafe partial struct VkPhysicalDeviceDescriptorIndexingProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorIndexingProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxUpdateAfterBindDescriptorsInAllPools + /// + [FieldOffset(16)] + public int MaxUpdateAfterBindDescriptorsInAllPools; + + /// + /// ShaderUniformBufferArrayNonUniformIndexingNative + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderUniformBufferArrayNonUniformIndexingNative; + + /// + /// ShaderSampledImageArrayNonUniformIndexingNative + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderSampledImageArrayNonUniformIndexingNative; + + /// + /// ShaderStorageBufferArrayNonUniformIndexingNative + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderStorageBufferArrayNonUniformIndexingNative; + + /// + /// ShaderStorageImageArrayNonUniformIndexingNative + /// + [FieldOffset(32)] + public Brutal.Bool32 ShaderStorageImageArrayNonUniformIndexingNative; + + /// + /// ShaderInputAttachmentArrayNonUniformIndexingNative + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderInputAttachmentArrayNonUniformIndexingNative; + + /// + /// RobustBufferAccessUpdateAfterBind + /// + [FieldOffset(40)] + public Brutal.Bool32 RobustBufferAccessUpdateAfterBind; + + /// + /// QuadDivergentImplicitLod + /// + [FieldOffset(44)] + public Brutal.Bool32 QuadDivergentImplicitLod; + + /// + /// MaxPerStageDescriptorUpdateAfterBindSamplers + /// + [FieldOffset(48)] + public int MaxPerStageDescriptorUpdateAfterBindSamplers; + + /// + /// MaxPerStageDescriptorUpdateAfterBindUniformBuffers + /// + [FieldOffset(52)] + public int MaxPerStageDescriptorUpdateAfterBindUniformBuffers; + + /// + /// MaxPerStageDescriptorUpdateAfterBindStorageBuffers + /// + [FieldOffset(56)] + public int MaxPerStageDescriptorUpdateAfterBindStorageBuffers; + + /// + /// MaxPerStageDescriptorUpdateAfterBindSampledImages + /// + [FieldOffset(60)] + public int MaxPerStageDescriptorUpdateAfterBindSampledImages; + + /// + /// MaxPerStageDescriptorUpdateAfterBindStorageImages + /// + [FieldOffset(64)] + public int MaxPerStageDescriptorUpdateAfterBindStorageImages; + + /// + /// MaxPerStageDescriptorUpdateAfterBindInputAttachments + /// + [FieldOffset(68)] + public int MaxPerStageDescriptorUpdateAfterBindInputAttachments; + + /// + /// MaxPerStageUpdateAfterBindResources + /// + [FieldOffset(72)] + public int MaxPerStageUpdateAfterBindResources; + + /// + /// MaxDescriptorSetUpdateAfterBindSamplers + /// + [FieldOffset(76)] + public int MaxDescriptorSetUpdateAfterBindSamplers; + + /// + /// MaxDescriptorSetUpdateAfterBindUniformBuffers + /// + [FieldOffset(80)] + public int MaxDescriptorSetUpdateAfterBindUniformBuffers; + + /// + /// MaxDescriptorSetUpdateAfterBindUniformBuffersDynamic + /// + [FieldOffset(84)] + public int MaxDescriptorSetUpdateAfterBindUniformBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageBuffers + /// + [FieldOffset(88)] + public int MaxDescriptorSetUpdateAfterBindStorageBuffers; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageBuffersDynamic + /// + [FieldOffset(92)] + public int MaxDescriptorSetUpdateAfterBindStorageBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindSampledImages + /// + [FieldOffset(96)] + public int MaxDescriptorSetUpdateAfterBindSampledImages; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageImages + /// + [FieldOffset(100)] + public int MaxDescriptorSetUpdateAfterBindStorageImages; + + /// + /// MaxDescriptorSetUpdateAfterBindInputAttachments + /// + [FieldOffset(104)] + public int MaxDescriptorSetUpdateAfterBindInputAttachments; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.gen.cs new file mode 100644 index 0000000..3c808e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV - Structure describing feature to allow descriptor pool overallocation + /// + /// + /// + /// The VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_descriptor_pool_overallocation + /// typedef struct VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 descriptorPoolOverallocation; + /// } VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorPoolOverallocationFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorPoolOverallocation + /// + [FieldOffset(16)] + public Brutal.Bool32 DescriptorPoolOverallocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.gen.cs new file mode 100644 index 0000000..11d187b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE - Stub description of VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_VALVE_descriptor_set_host_mapping + /// typedef struct VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 descriptorSetHostMapping; + /// } VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorSetHostMapping + /// + [FieldOffset(16)] + public Brutal.Bool32 DescriptorSetHostMapping; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR.gen.cs new file mode 100644 index 0000000..fdcdad5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR - Structure describing support for device address commands + /// + /// + /// + /// The VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_device_address_commands + /// typedef struct VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceAddressCommands; + /// } VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDeviceAddressCommandsFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceAddressCommands + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceAddressCommands; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.gen.cs new file mode 100644 index 0000000..4078ecb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV - Structure describing the device-generated compute features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceGeneratedCompute; + /// VkBool32 deviceGeneratedComputePipelines; + /// VkBool32 deviceGeneratedComputeCaptureReplay; + /// } VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceGeneratedCompute + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceGeneratedCompute; + + /// + /// DeviceGeneratedComputePipelines + /// + [FieldOffset(20)] + public Brutal.Bool32 DeviceGeneratedComputePipelines; + + /// + /// DeviceGeneratedComputeCaptureReplay + /// + [FieldOffset(24)] + public Brutal.Bool32 DeviceGeneratedComputeCaptureReplay; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.gen.cs new file mode 100644 index 0000000..34cd057 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT - Structure describing the device-generated compute features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceGeneratedCommands; + /// VkBool32 dynamicGeneratedPipelineLayout; + /// } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceGeneratedCommands + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceGeneratedCommands; + + /// + /// DynamicGeneratedPipelineLayout + /// + [FieldOffset(20)] + public Brutal.Bool32 DynamicGeneratedPipelineLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.gen.cs new file mode 100644 index 0000000..af090e2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV - Structure describing the device-generated commands features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceGeneratedCommands; + /// } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDeviceGeneratedCommandsFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceGeneratedCommands + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceGeneratedCommands; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.gen.cs new file mode 100644 index 0000000..68537ea --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT.gen.cs @@ -0,0 +1,118 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT - Structure describing push descriptor limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxIndirectPipelineCount; + /// uint32_t maxIndirectShaderObjectCount; + /// uint32_t maxIndirectSequenceCount; + /// uint32_t maxIndirectCommandsTokenCount; + /// uint32_t maxIndirectCommandsTokenOffset; + /// uint32_t maxIndirectCommandsIndirectStride; + /// VkIndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes; + /// VkShaderStageFlags supportedIndirectCommandsShaderStages; + /// VkShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding; + /// VkShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding; + /// VkBool32 deviceGeneratedCommandsTransformFeedback; + /// VkBool32 deviceGeneratedCommandsMultiDrawIndirectCount; + /// } VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxIndirectPipelineCount + /// + [FieldOffset(16)] + public int MaxIndirectPipelineCount; + + /// + /// MaxIndirectShaderObjectCount + /// + [FieldOffset(20)] + public int MaxIndirectShaderObjectCount; + + /// + /// MaxIndirectSequenceCount + /// + [FieldOffset(24)] + public int MaxIndirectSequenceCount; + + /// + /// MaxIndirectCommandsTokenCount + /// + [FieldOffset(28)] + public int MaxIndirectCommandsTokenCount; + + /// + /// MaxIndirectCommandsTokenOffset + /// + [FieldOffset(32)] + public int MaxIndirectCommandsTokenOffset; + + /// + /// MaxIndirectCommandsIndirectStride + /// + [FieldOffset(36)] + public int MaxIndirectCommandsIndirectStride; + + /// + /// SupportedIndirectCommandsInputModes + /// + [FieldOffset(40)] + public VkIndirectCommandsInputModeFlagsEXT SupportedIndirectCommandsInputModes; + + /// + /// SupportedIndirectCommandsShaderStages + /// + [FieldOffset(44)] + public VkShaderStageFlags SupportedIndirectCommandsShaderStages; + + /// + /// SupportedIndirectCommandsShaderStagesPipelineBinding + /// + [FieldOffset(48)] + public VkShaderStageFlags SupportedIndirectCommandsShaderStagesPipelineBinding; + + /// + /// SupportedIndirectCommandsShaderStagesShaderBinding + /// + [FieldOffset(52)] + public VkShaderStageFlags SupportedIndirectCommandsShaderStagesShaderBinding; + + /// + /// DeviceGeneratedCommandsTransformFeedback + /// + [FieldOffset(56)] + public Brutal.Bool32 DeviceGeneratedCommandsTransformFeedback; + + /// + /// DeviceGeneratedCommandsMultiDrawIndirectCount + /// + [FieldOffset(60)] + public Brutal.Bool32 DeviceGeneratedCommandsMultiDrawIndirectCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.gen.cs new file mode 100644 index 0000000..a9f638d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV.gen.cs @@ -0,0 +1,97 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV - Structure describing push descriptor limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxGraphicsShaderGroupCount; + /// uint32_t maxIndirectSequenceCount; + /// uint32_t maxIndirectCommandsTokenCount; + /// uint32_t maxIndirectCommandsStreamCount; + /// uint32_t maxIndirectCommandsTokenOffset; + /// uint32_t maxIndirectCommandsStreamStride; + /// uint32_t minSequencesCountBufferOffsetAlignment; + /// uint32_t minSequencesIndexBufferOffsetAlignment; + /// uint32_t minIndirectCommandsBufferOffsetAlignment; + /// } VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDeviceGeneratedCommandsPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxGraphicsShaderGroupCount is the maximum number of shader groups in VkGraphicsPipelineShaderGroupsCreateInfoNV. + /// + [FieldOffset(16)] + public int MaxGraphicsShaderGroupCount; + + /// + /// MaxIndirectSequenceCount is the maximum number of sequences in VkGeneratedCommandsInfoNV and in VkGeneratedCommandsMemoryRequirementsInfoNV. + /// + [FieldOffset(20)] + public int MaxIndirectSequenceCount; + + /// + /// MaxIndirectCommandsTokenCount is the maximum number of tokens in VkIndirectCommandsLayoutCreateInfoNV. + /// + [FieldOffset(24)] + public int MaxIndirectCommandsTokenCount; + + /// + /// MaxIndirectCommandsStreamCount is the maximum number of streams in VkIndirectCommandsLayoutCreateInfoNV. + /// + [FieldOffset(28)] + public int MaxIndirectCommandsStreamCount; + + /// + /// MaxIndirectCommandsTokenOffset is the maximum offset in VkIndirectCommandsLayoutTokenNV. + /// + [FieldOffset(32)] + public int MaxIndirectCommandsTokenOffset; + + /// + /// MaxIndirectCommandsStreamStride is the maximum stream stride in VkIndirectCommandsLayoutCreateInfoNV. + /// + [FieldOffset(36)] + public int MaxIndirectCommandsStreamStride; + + /// + /// MinSequencesCountBufferOffsetAlignment is the minimum alignment for memory addresses which can be used in VkGeneratedCommandsInfoNV. + /// + [FieldOffset(40)] + public int MinSequencesCountBufferOffsetAlignment; + + /// + /// MinSequencesIndexBufferOffsetAlignment is the minimum alignment for memory addresses which can be used in VkGeneratedCommandsInfoNV. + /// + [FieldOffset(44)] + public int MinSequencesIndexBufferOffsetAlignment; + + /// + /// MinIndirectCommandsBufferOffsetAlignment is the minimum alignment for memory addresses used in VkIndirectCommandsStreamNV, and as preprocess buffer in VkGeneratedCommandsInfoNV. + /// + [FieldOffset(48)] + public int MinIndirectCommandsBufferOffsetAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.gen.cs new file mode 100644 index 0000000..d42e26b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDeviceMemoryReportFeaturesEXT - Structure describing whether device memory report callback can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDeviceMemoryReportFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_device_memory_report + /// typedef struct VkPhysicalDeviceDeviceMemoryReportFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceMemoryReport; + /// } VkPhysicalDeviceDeviceMemoryReportFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDeviceMemoryReportFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDeviceMemoryReportFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceMemoryReport + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceMemoryReport; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.gen.cs new file mode 100644 index 0000000..dd87acf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiagnosticsConfigFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDiagnosticsConfigFeaturesNV - Structure describing the device-generated diagnostic configuration features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDiagnosticsConfigFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_device_diagnostics_config + /// typedef struct VkPhysicalDeviceDiagnosticsConfigFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 diagnosticsConfig; + /// } VkPhysicalDeviceDiagnosticsConfigFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDiagnosticsConfigFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDiagnosticsConfigFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DiagnosticsConfig + /// + [FieldOffset(16)] + public Brutal.Bool32 DiagnosticsConfig; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiscardRectanglePropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiscardRectanglePropertiesEXT.gen.cs new file mode 100644 index 0000000..5d09a8f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDiscardRectanglePropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDiscardRectanglePropertiesEXT - Structure describing discard rectangle limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDiscardRectanglePropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_discard_rectangles + /// typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxDiscardRectangles; + /// } VkPhysicalDeviceDiscardRectanglePropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDiscardRectanglePropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDiscardRectanglePropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxDiscardRectangles + /// + [FieldOffset(16)] + public int MaxDiscardRectangles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDriverProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDriverProperties.gen.cs new file mode 100644 index 0000000..c942946 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDriverProperties.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDriverProperties - Structure containing driver identification information + /// + /// + /// + /// The VkPhysicalDeviceDriverProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceDriverProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkDriverId driverID; + /// char driverName[VK_MAX_DRIVER_NAME_SIZE]; + /// char driverInfo[VK_MAX_DRIVER_INFO_SIZE]; + /// VkConformanceVersion conformanceVersion; + /// } VkPhysicalDeviceDriverProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 536)] + public unsafe partial struct VkPhysicalDeviceDriverProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDriverProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DriverID + /// + [FieldOffset(16)] + public VkDriverId DriverID; + + /// + [FieldOffset(20)] + public fixed byte DriverName[256]; + + /// + [FieldOffset(276)] + public fixed byte DriverInfo[256]; + + /// + /// ConformanceVersion + /// + [FieldOffset(532)] + public VkConformanceVersion ConformanceVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDrmPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDrmPropertiesEXT.gen.cs new file mode 100644 index 0000000..fc660b1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDrmPropertiesEXT.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDrmPropertiesEXT - Structure containing DRM information of a physical device + /// + /// + /// + /// The VkPhysicalDeviceDrmPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_physical_device_drm + /// typedef struct VkPhysicalDeviceDrmPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hasPrimary; + /// VkBool32 hasRender; + /// int64_t primaryMajor; + /// int64_t primaryMinor; + /// int64_t renderMajor; + /// int64_t renderMinor; + /// } VkPhysicalDeviceDrmPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkPhysicalDeviceDrmPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDrmPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HasPrimary is a boolean indicating whether the physical device has a DRM primary node. + /// + [FieldOffset(16)] + public Brutal.Bool32 HasPrimary; + + /// + /// HasRender is a boolean indicating whether the physical device has a DRM render node. + /// + [FieldOffset(20)] + public Brutal.Bool32 HasRender; + + /// + /// PrimaryMajor is the DRM primary node major number, if any. + /// + [FieldOffset(24)] + public long PrimaryMajor; + + /// + /// PrimaryMinor is the DRM primary node minor number, if any. + /// + [FieldOffset(32)] + public long PrimaryMinor; + + /// + /// RenderMajor is the DRM render node major number, if any. + /// + [FieldOffset(40)] + public long RenderMajor; + + /// + /// RenderMinor is the DRM render node minor number, if any. + /// + [FieldOffset(48)] + public long RenderMinor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingFeatures.gen.cs new file mode 100644 index 0000000..1bd1759 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDynamicRenderingFeatures - Structure indicating support for dynamic render pass instances + /// + /// + /// + /// The VkPhysicalDeviceDynamicRenderingFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceDynamicRenderingFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dynamicRendering; + /// } VkPhysicalDeviceDynamicRenderingFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDynamicRenderingFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDynamicRenderingFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DynamicRendering + /// + [FieldOffset(16)] + public Brutal.Bool32 DynamicRendering; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.gen.cs new file mode 100644 index 0000000..897cb94 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingLocalReadFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDynamicRenderingLocalReadFeatures - Structure indicating support for local reads in dynamic render pass instances + /// + /// + /// + /// The VkPhysicalDeviceDynamicRenderingLocalReadFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceDynamicRenderingLocalReadFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dynamicRenderingLocalRead; + /// } VkPhysicalDeviceDynamicRenderingLocalReadFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDynamicRenderingLocalReadFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceDynamicRenderingLocalReadFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DynamicRenderingLocalRead + /// + [FieldOffset(16)] + public Brutal.Bool32 DynamicRenderingLocalRead; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.gen.cs new file mode 100644 index 0000000..b447148 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT - Structure describing the dynamic rendering unused attachment features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT + /// structure is defined as: + /// + /// + /// // Provided by VK_EXT_dynamic_rendering_unused_attachments + /// typedef struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dynamicRenderingUnusedAttachments; + /// } VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DynamicRenderingUnusedAttachments + /// + [FieldOffset(16)] + public Brutal.Bool32 DynamicRenderingUnusedAttachments; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM.gen.cs new file mode 100644 index 0000000..6a2a2c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM - Structure describing elapsed timer query features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_elapsed_timer_query + /// typedef struct VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 elapsedTimerQuery; + /// } VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceElapsedTimerQueryFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceElapsedTimerQueryFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ElapsedTimerQuery + /// + [FieldOffset(16)] + public Brutal.Bool32 ElapsedTimerQuery; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExclusiveScissorFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExclusiveScissorFeaturesNV.gen.cs new file mode 100644 index 0000000..5ffa17e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExclusiveScissorFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExclusiveScissorFeaturesNV - Structure describing exclusive scissor features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceExclusiveScissorFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_scissor_exclusive + /// typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 exclusiveScissor; + /// } VkPhysicalDeviceExclusiveScissorFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExclusiveScissorFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExclusiveScissorFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExclusiveScissor + /// + [FieldOffset(16)] + public Brutal.Bool32 ExclusiveScissor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.gen.cs new file mode 100644 index 0000000..3dbc50b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState2FeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedDynamicState2FeaturesEXT - Structure describing what extended dynamic state can be used + /// + /// + /// + /// The VkPhysicalDeviceExtendedDynamicState2FeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state2 + /// typedef struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 extendedDynamicState2; + /// VkBool32 extendedDynamicState2LogicOp; + /// VkBool32 extendedDynamicState2PatchControlPoints; + /// } VkPhysicalDeviceExtendedDynamicState2FeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedDynamicState2FeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExtendedDynamicState2 + /// + [FieldOffset(16)] + public Brutal.Bool32 ExtendedDynamicState2; + + /// + /// ExtendedDynamicState2LogicOp + /// + [FieldOffset(20)] + public Brutal.Bool32 ExtendedDynamicState2LogicOp; + + /// + /// ExtendedDynamicState2PatchControlPoints + /// + [FieldOffset(24)] + public Brutal.Bool32 ExtendedDynamicState2PatchControlPoints; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.gen.cs new file mode 100644 index 0000000..6b1cb3d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3FeaturesEXT.gen.cs @@ -0,0 +1,251 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedDynamicState3FeaturesEXT - Structure describing what extended dynamic state is supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceExtendedDynamicState3FeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 + /// typedef struct VkPhysicalDeviceExtendedDynamicState3FeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 extendedDynamicState3TessellationDomainOrigin; + /// VkBool32 extendedDynamicState3DepthClampEnable; + /// VkBool32 extendedDynamicState3PolygonMode; + /// VkBool32 extendedDynamicState3RasterizationSamples; + /// VkBool32 extendedDynamicState3SampleMask; + /// VkBool32 extendedDynamicState3AlphaToCoverageEnable; + /// VkBool32 extendedDynamicState3AlphaToOneEnable; + /// VkBool32 extendedDynamicState3LogicOpEnable; + /// VkBool32 extendedDynamicState3ColorBlendEnable; + /// VkBool32 extendedDynamicState3ColorBlendEquation; + /// VkBool32 extendedDynamicState3ColorWriteMask; + /// VkBool32 extendedDynamicState3RasterizationStream; + /// VkBool32 extendedDynamicState3ConservativeRasterizationMode; + /// VkBool32 extendedDynamicState3ExtraPrimitiveOverestimationSize; + /// VkBool32 extendedDynamicState3DepthClipEnable; + /// VkBool32 extendedDynamicState3SampleLocationsEnable; + /// VkBool32 extendedDynamicState3ColorBlendAdvanced; + /// VkBool32 extendedDynamicState3ProvokingVertexMode; + /// VkBool32 extendedDynamicState3LineRasterizationMode; + /// VkBool32 extendedDynamicState3LineStippleEnable; + /// VkBool32 extendedDynamicState3DepthClipNegativeOneToOne; + /// VkBool32 extendedDynamicState3ViewportWScalingEnable; + /// VkBool32 extendedDynamicState3ViewportSwizzle; + /// VkBool32 extendedDynamicState3CoverageToColorEnable; + /// VkBool32 extendedDynamicState3CoverageToColorLocation; + /// VkBool32 extendedDynamicState3CoverageModulationMode; + /// VkBool32 extendedDynamicState3CoverageModulationTableEnable; + /// VkBool32 extendedDynamicState3CoverageModulationTable; + /// VkBool32 extendedDynamicState3CoverageReductionMode; + /// VkBool32 extendedDynamicState3RepresentativeFragmentTestEnable; + /// VkBool32 extendedDynamicState3ShadingRateImageEnable; + /// } VkPhysicalDeviceExtendedDynamicState3FeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 144)] + public unsafe partial struct VkPhysicalDeviceExtendedDynamicState3FeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedDynamicState3FeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExtendedDynamicState3TessellationDomainOrigin + /// + [FieldOffset(16)] + public Brutal.Bool32 ExtendedDynamicState3TessellationDomainOrigin; + + /// + /// ExtendedDynamicState3DepthClampEnable + /// + [FieldOffset(20)] + public Brutal.Bool32 ExtendedDynamicState3DepthClampEnable; + + /// + /// ExtendedDynamicState3PolygonMode + /// + [FieldOffset(24)] + public Brutal.Bool32 ExtendedDynamicState3PolygonMode; + + /// + /// ExtendedDynamicState3RasterizationSamples + /// + [FieldOffset(28)] + public Brutal.Bool32 ExtendedDynamicState3RasterizationSamples; + + /// + /// ExtendedDynamicState3SampleMask + /// + [FieldOffset(32)] + public Brutal.Bool32 ExtendedDynamicState3SampleMask; + + /// + /// ExtendedDynamicState3AlphaToCoverageEnable + /// + [FieldOffset(36)] + public Brutal.Bool32 ExtendedDynamicState3AlphaToCoverageEnable; + + /// + /// ExtendedDynamicState3AlphaToOneEnable + /// + [FieldOffset(40)] + public Brutal.Bool32 ExtendedDynamicState3AlphaToOneEnable; + + /// + /// ExtendedDynamicState3LogicOpEnable + /// + [FieldOffset(44)] + public Brutal.Bool32 ExtendedDynamicState3LogicOpEnable; + + /// + /// ExtendedDynamicState3ColorBlendEnable + /// + [FieldOffset(48)] + public Brutal.Bool32 ExtendedDynamicState3ColorBlendEnable; + + /// + /// ExtendedDynamicState3ColorBlendEquation + /// + [FieldOffset(52)] + public Brutal.Bool32 ExtendedDynamicState3ColorBlendEquation; + + /// + /// ExtendedDynamicState3ColorWriteMask + /// + [FieldOffset(56)] + public Brutal.Bool32 ExtendedDynamicState3ColorWriteMask; + + /// + /// ExtendedDynamicState3RasterizationStream + /// + [FieldOffset(60)] + public Brutal.Bool32 ExtendedDynamicState3RasterizationStream; + + /// + /// ExtendedDynamicState3ConservativeRasterizationMode + /// + [FieldOffset(64)] + public Brutal.Bool32 ExtendedDynamicState3ConservativeRasterizationMode; + + /// + /// ExtendedDynamicState3ExtraPrimitiveOverestimationSize + /// + [FieldOffset(68)] + public Brutal.Bool32 ExtendedDynamicState3ExtraPrimitiveOverestimationSize; + + /// + /// ExtendedDynamicState3DepthClipEnable + /// + [FieldOffset(72)] + public Brutal.Bool32 ExtendedDynamicState3DepthClipEnable; + + /// + /// ExtendedDynamicState3SampleLocationsEnable + /// + [FieldOffset(76)] + public Brutal.Bool32 ExtendedDynamicState3SampleLocationsEnable; + + /// + /// ExtendedDynamicState3ColorBlendAdvanced + /// + [FieldOffset(80)] + public Brutal.Bool32 ExtendedDynamicState3ColorBlendAdvanced; + + /// + /// ExtendedDynamicState3ProvokingVertexMode + /// + [FieldOffset(84)] + public Brutal.Bool32 ExtendedDynamicState3ProvokingVertexMode; + + /// + /// ExtendedDynamicState3LineRasterizationMode + /// + [FieldOffset(88)] + public Brutal.Bool32 ExtendedDynamicState3LineRasterizationMode; + + /// + /// ExtendedDynamicState3LineStippleEnable + /// + [FieldOffset(92)] + public Brutal.Bool32 ExtendedDynamicState3LineStippleEnable; + + /// + /// ExtendedDynamicState3DepthClipNegativeOneToOne + /// + [FieldOffset(96)] + public Brutal.Bool32 ExtendedDynamicState3DepthClipNegativeOneToOne; + + /// + /// ExtendedDynamicState3ViewportWScalingEnable + /// + [FieldOffset(100)] + public Brutal.Bool32 ExtendedDynamicState3ViewportWScalingEnable; + + /// + /// ExtendedDynamicState3ViewportSwizzle + /// + [FieldOffset(104)] + public Brutal.Bool32 ExtendedDynamicState3ViewportSwizzle; + + /// + /// ExtendedDynamicState3CoverageToColorEnable + /// + [FieldOffset(108)] + public Brutal.Bool32 ExtendedDynamicState3CoverageToColorEnable; + + /// + /// ExtendedDynamicState3CoverageToColorLocation + /// + [FieldOffset(112)] + public Brutal.Bool32 ExtendedDynamicState3CoverageToColorLocation; + + /// + /// ExtendedDynamicState3CoverageModulationMode + /// + [FieldOffset(116)] + public Brutal.Bool32 ExtendedDynamicState3CoverageModulationMode; + + /// + /// ExtendedDynamicState3CoverageModulationTableEnable + /// + [FieldOffset(120)] + public Brutal.Bool32 ExtendedDynamicState3CoverageModulationTableEnable; + + /// + /// ExtendedDynamicState3CoverageModulationTable + /// + [FieldOffset(124)] + public Brutal.Bool32 ExtendedDynamicState3CoverageModulationTable; + + /// + /// ExtendedDynamicState3CoverageReductionMode + /// + [FieldOffset(128)] + public Brutal.Bool32 ExtendedDynamicState3CoverageReductionMode; + + /// + /// ExtendedDynamicState3RepresentativeFragmentTestEnable + /// + [FieldOffset(132)] + public Brutal.Bool32 ExtendedDynamicState3RepresentativeFragmentTestEnable; + + /// + /// ExtendedDynamicState3ShadingRateImageEnable + /// + [FieldOffset(136)] + public Brutal.Bool32 ExtendedDynamicState3ShadingRateImageEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.gen.cs new file mode 100644 index 0000000..3b217e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicState3PropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedDynamicState3PropertiesEXT - Structure describing capabilities of extended dynamic state + /// + /// + /// + /// The VkPhysicalDeviceExtendedDynamicState3PropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state3 + /// typedef struct VkPhysicalDeviceExtendedDynamicState3PropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 dynamicPrimitiveTopologyUnrestricted; + /// } VkPhysicalDeviceExtendedDynamicState3PropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExtendedDynamicState3PropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedDynamicState3PropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DynamicPrimitiveTopologyUnrestricted + /// + [FieldOffset(16)] + public Brutal.Bool32 DynamicPrimitiveTopologyUnrestricted; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.gen.cs new file mode 100644 index 0000000..5d041fa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedDynamicStateFeaturesEXT - Structure describing what extended dynamic state can be used + /// + /// + /// + /// The VkPhysicalDeviceExtendedDynamicStateFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_extended_dynamic_state + /// typedef struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 extendedDynamicState; + /// } VkPhysicalDeviceExtendedDynamicStateFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedDynamicStateFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExtendedDynamicState + /// + [FieldOffset(16)] + public Brutal.Bool32 ExtendedDynamicState; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedFlagsFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedFlagsFeaturesKHR.gen.cs new file mode 100644 index 0000000..6af4da7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedFlagsFeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedFlagsFeaturesKHR - Structure describing whether the implementation supports extended flags functionality + /// + /// + /// + /// The VkPhysicalDeviceExtendedFlagsFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags + /// typedef struct VkPhysicalDeviceExtendedFlagsFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 extendedFlags; + /// } VkPhysicalDeviceExtendedFlagsFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExtendedFlagsFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedFlagsFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExtendedFlags + /// + [FieldOffset(16)] + public Brutal.Bool32 ExtendedFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.gen.cs new file mode 100644 index 0000000..3f9f562 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV - Structure describing feature to use extended sparse address space + /// + /// + /// + /// The VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_extended_sparse_address_space + /// typedef struct VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 extendedSparseAddressSpace; + /// } VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExtendedSparseAddressSpace + /// + [FieldOffset(16)] + public Brutal.Bool32 ExtendedSparseAddressSpace; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.gen.cs new file mode 100644 index 0000000..e4739df --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV - Structure describing sparse address space limits of an implementation + /// + /// + /// + /// The VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_extended_sparse_address_space + /// typedef struct VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize extendedSparseAddressSpaceSize; + /// VkImageUsageFlags extendedSparseImageUsageFlags; + /// VkBufferUsageFlags extendedSparseBufferUsageFlags; + /// } VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExtendedSparseAddressSpacePropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExtendedSparseAddressSpaceSize + /// + [FieldOffset(16)] + public ByteSize64 ExtendedSparseAddressSpaceSize; + + /// + /// ExtendedSparseImageUsageFlags + /// + [FieldOffset(24)] + public VkImageUsageFlags ExtendedSparseImageUsageFlags; + + /// + /// ExtendedSparseBufferUsageFlags + /// + [FieldOffset(28)] + public VkBufferUsageFlags ExtendedSparseBufferUsageFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalBufferInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalBufferInfo.gen.cs new file mode 100644 index 0000000..d2df956 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalBufferInfo.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalBufferInfo - Structure specifying buffer creation parameters + /// + /// + /// + /// :refpage: VkPhysicalDeviceExternalBufferInfo + /// + /// + /// The VkPhysicalDeviceExternalBufferInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceExternalBufferInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBufferCreateFlags flags; + /// VkBufferUsageFlags usage; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkPhysicalDeviceExternalBufferInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceExternalBufferInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalBufferInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkBufferCreateFlags describing additional parameters of the buffer, corresponding to VkBufferCreateInfo::flags. + /// + [FieldOffset(16)] + public VkBufferCreateFlags Flags; + + /// + /// Usage is a bitmask of VkBufferUsageFlags describing the intended usage of the buffer, corresponding to VkBufferCreateInfo::usage. + /// + [FieldOffset(20)] + public VkBufferUsageFlags Usage; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the memory handle type that will be used with the memory associated with the buffer. + /// + [FieldOffset(24)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalComputeQueuePropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalComputeQueuePropertiesNV.gen.cs new file mode 100644 index 0000000..ef948a1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalComputeQueuePropertiesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalComputeQueuePropertiesNV - Structure specifying hardware specific information and limits for VK_NV_external_compute_queue functionality + /// + /// + /// + /// The VkPhysicalDeviceExternalComputeQueuePropertiesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_external_compute_queue + /// typedef struct VkPhysicalDeviceExternalComputeQueuePropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t externalDataSize; + /// uint32_t maxExternalQueues; + /// } VkPhysicalDeviceExternalComputeQueuePropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExternalComputeQueuePropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalComputeQueuePropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalDataSize is the minimum size of the memory allocation that applications can pass to vkGetExternalComputeQueueDataNV. + /// + [FieldOffset(16)] + public int ExternalDataSize; + + /// + /// MaxExternalQueues is the maximum number of external queues that an application can create. + /// + [FieldOffset(20)] + public int MaxExternalQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalFenceInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalFenceInfo.gen.cs new file mode 100644 index 0000000..5c9d23c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalFenceInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalFenceInfo - Structure specifying fence creation parameters. + /// + /// + /// + /// The VkPhysicalDeviceExternalFenceInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceExternalFenceInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalFenceHandleTypeFlagBits handleType; + /// } VkPhysicalDeviceExternalFenceInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExternalFenceInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalFenceInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalFenceHandleTypeFlags value specifying an external fence handle type for which capabilities will be returned. + /// + [FieldOffset(16)] + public VkExternalFenceHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalImageFormatInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalImageFormatInfo.gen.cs new file mode 100644 index 0000000..6d4e1fa --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalImageFormatInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalImageFormatInfo - Structure specifying external image creation parameters + /// + /// + /// + /// To determine the image capabilities compatible with an external memory + /// handle type, add a VkPhysicalDeviceExternalImageFormatInfo structure + /// to the pNext chain of the VkPhysicalDeviceImageFormatInfo2 + /// structure and a VkExternalImageFormatProperties structure to the + /// pNext chain of the VkImageFormatProperties2 structure. + /// + /// + /// The VkPhysicalDeviceExternalImageFormatInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceExternalImageFormatInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkPhysicalDeviceExternalImageFormatInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExternalImageFormatInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalImageFormatInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the memory handle type that will be used with the memory associated with the image. + /// + [FieldOffset(16)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.gen.cs new file mode 100644 index 0000000..ce3d0bc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalMemoryHostPropertiesEXT - Structure describing external memory host pointer limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceExternalMemoryHostPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_external_memory_host + /// typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize minImportedHostPointerAlignment; + /// } VkPhysicalDeviceExternalMemoryHostPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalMemoryHostPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinImportedHostPointerAlignment + /// + [FieldOffset(16)] + public ByteSize64 MinImportedHostPointerAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryRdmaFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryRdmaFeaturesNV.gen.cs new file mode 100644 index 0000000..bfc988c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalMemoryRdmaFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalMemoryRDMAFeaturesNV - Structure describing the external memory RDMA features supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceExternalMemoryRDMAFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_external_memory_rdma + /// typedef struct VkPhysicalDeviceExternalMemoryRDMAFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 externalMemoryRDMA; + /// } VkPhysicalDeviceExternalMemoryRDMAFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExternalMemoryRdmaFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalMemoryRdmaFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExternalMemoryRDMA + /// + [FieldOffset(16)] + public Brutal.Bool32 ExternalMemoryRDMA; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalSemaphoreInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalSemaphoreInfo.gen.cs new file mode 100644 index 0000000..47cb53a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalSemaphoreInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalSemaphoreInfo - Structure specifying semaphore creation parameters. + /// + /// + /// + /// The VkPhysicalDeviceExternalSemaphoreInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceExternalSemaphoreInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkExternalSemaphoreHandleTypeFlagBits handleType; + /// } VkPhysicalDeviceExternalSemaphoreInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceExternalSemaphoreInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalSemaphoreInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HandleType is a VkExternalSemaphoreHandleTypeFlags value specifying the external semaphore handle type for which capabilities will be returned. + /// + [FieldOffset(16)] + public VkExternalSemaphoreHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalTensorInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalTensorInfoARM.gen.cs new file mode 100644 index 0000000..e853cce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceExternalTensorInfoARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceExternalTensorInfoARM - Structure specifying tensor creation parameters. + /// + /// + /// + /// The VkPhysicalDeviceExternalTensorInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkPhysicalDeviceExternalTensorInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorCreateFlagsARM flags; + /// const VkTensorDescriptionARM* pDescription; + /// VkExternalMemoryHandleTypeFlagBits handleType; + /// } VkPhysicalDeviceExternalTensorInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceExternalTensorInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceExternalTensorInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkTensorCreateFlagsARM describing additional parameters of the tensor, corresponding to VkTensorCreateInfoARM::flags. + /// + [FieldOffset(16)] + public VkTensorCreateFlagsARM Flags; + + /// + /// Description is a VkTensorDescriptionARM structure describing the tensor, corresponding to VkTensorCreateInfoARM::pDescription. + /// + [FieldOffset(24)] + public VkTensorDescriptionARM* Description; + + /// + /// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the external memory handle type for which capabilities will be returned. + /// + [FieldOffset(32)] + public VkExternalMemoryHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesEXT.gen.cs new file mode 100644 index 0000000..1ae2b3a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFaultFeaturesEXT - Structure indicating support for device fault reporting + /// + /// + /// + /// The VkPhysicalDeviceFaultFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_fault + /// typedef struct VkPhysicalDeviceFaultFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceFault; + /// VkBool32 deviceFaultVendorBinary; + /// } VkPhysicalDeviceFaultFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFaultFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFaultFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceFault + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceFault; + + /// + /// DeviceFaultVendorBinary + /// + [FieldOffset(20)] + public Brutal.Bool32 DeviceFaultVendorBinary; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesKHR.gen.cs new file mode 100644 index 0000000..7c7714f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultFeaturesKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFaultFeaturesKHR - Structure indicating support for device fault reporting + /// + /// + /// + /// The VkPhysicalDeviceFaultFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkPhysicalDeviceFaultFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 deviceFault; + /// VkBool32 deviceFaultVendorBinary; + /// VkBool32 deviceFaultReportMasked; + /// VkBool32 deviceFaultDeviceLostOnMasked; + /// } VkPhysicalDeviceFaultFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFaultFeaturesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFaultFeaturesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DeviceFault + /// + [FieldOffset(16)] + public Brutal.Bool32 DeviceFault; + + /// + /// DeviceFaultVendorBinary + /// + [FieldOffset(20)] + public Brutal.Bool32 DeviceFaultVendorBinary; + + /// + /// DeviceFaultReportMasked + /// + [FieldOffset(24)] + public Brutal.Bool32 DeviceFaultReportMasked; + + /// + /// DeviceFaultDeviceLostOnMasked + /// + [FieldOffset(28)] + public Brutal.Bool32 DeviceFaultDeviceLostOnMasked; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultPropertiesKHR.gen.cs new file mode 100644 index 0000000..ba74e71 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFaultPropertiesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFaultPropertiesKHR - Structure describing fault reporting properties for the physical device + /// + /// + /// + /// The VkPhysicalDeviceFaultPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_device_fault + /// typedef struct VkPhysicalDeviceFaultPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxDeviceFaultCount; + /// } VkPhysicalDeviceFaultPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFaultPropertiesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFaultPropertiesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxDeviceFaultCount + /// + [FieldOffset(16)] + public int MaxDeviceFaultCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures.gen.cs new file mode 100644 index 0000000..35f97f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures.gen.cs @@ -0,0 +1,404 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFeatures - Structure describing the fine-grained features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPhysicalDeviceFeatures { + /// VkBool32 robustBufferAccess; + /// VkBool32 fullDrawIndexUint32; + /// VkBool32 imageCubeArray; + /// VkBool32 independentBlend; + /// VkBool32 geometryShader; + /// VkBool32 tessellationShader; + /// VkBool32 sampleRateShading; + /// VkBool32 dualSrcBlend; + /// VkBool32 logicOp; + /// VkBool32 multiDrawIndirect; + /// VkBool32 drawIndirectFirstInstance; + /// VkBool32 depthClamp; + /// VkBool32 depthBiasClamp; + /// VkBool32 fillModeNonSolid; + /// VkBool32 depthBounds; + /// VkBool32 wideLines; + /// VkBool32 largePoints; + /// VkBool32 alphaToOne; + /// VkBool32 multiViewport; + /// VkBool32 samplerAnisotropy; + /// VkBool32 textureCompressionETC2; + /// VkBool32 textureCompressionASTC_LDR; + /// VkBool32 textureCompressionBC; + /// VkBool32 occlusionQueryPrecise; + /// VkBool32 pipelineStatisticsQuery; + /// VkBool32 vertexPipelineStoresAndAtomics; + /// VkBool32 fragmentStoresAndAtomics; + /// VkBool32 shaderTessellationAndGeometryPointSize; + /// VkBool32 shaderImageGatherExtended; + /// VkBool32 shaderStorageImageExtendedFormats; + /// VkBool32 shaderStorageImageMultisample; + /// VkBool32 shaderStorageImageReadWithoutFormat; + /// VkBool32 shaderStorageImageWriteWithoutFormat; + /// VkBool32 shaderUniformBufferArrayDynamicIndexing; + /// VkBool32 shaderSampledImageArrayDynamicIndexing; + /// VkBool32 shaderStorageBufferArrayDynamicIndexing; + /// VkBool32 shaderStorageImageArrayDynamicIndexing; + /// VkBool32 shaderClipDistance; + /// VkBool32 shaderCullDistance; + /// VkBool32 shaderFloat64; + /// VkBool32 shaderInt64; + /// VkBool32 shaderInt16; + /// VkBool32 shaderResourceResidency; + /// VkBool32 shaderResourceMinLod; + /// VkBool32 sparseBinding; + /// VkBool32 sparseResidencyBuffer; + /// VkBool32 sparseResidencyImage2D; + /// VkBool32 sparseResidencyImage3D; + /// VkBool32 sparseResidency2Samples; + /// VkBool32 sparseResidency4Samples; + /// VkBool32 sparseResidency8Samples; + /// VkBool32 sparseResidency16Samples; + /// VkBool32 sparseResidencyAliased; + /// VkBool32 variableMultisampleRate; + /// VkBool32 inheritedQueries; + /// } VkPhysicalDeviceFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 220)] + public partial struct VkPhysicalDeviceFeatures() + { + /// + /// RobustBufferAccess + /// + [FieldOffset(0)] + public Brutal.Bool32 RobustBufferAccess; + + /// + /// FullDrawIndexUint32 + /// + [FieldOffset(4)] + public Brutal.Bool32 FullDrawIndexUint32; + + /// + /// ImageCubeArray + /// + [FieldOffset(8)] + public Brutal.Bool32 ImageCubeArray; + + /// + /// IndependentBlend + /// + [FieldOffset(12)] + public Brutal.Bool32 IndependentBlend; + + /// + /// GeometryShader + /// + [FieldOffset(16)] + public Brutal.Bool32 GeometryShader; + + /// + /// TessellationShader + /// + [FieldOffset(20)] + public Brutal.Bool32 TessellationShader; + + /// + /// SampleRateShading + /// + [FieldOffset(24)] + public Brutal.Bool32 SampleRateShading; + + /// + /// DualSrcBlend + /// + [FieldOffset(28)] + public Brutal.Bool32 DualSrcBlend; + + /// + /// LogicOp + /// + [FieldOffset(32)] + public Brutal.Bool32 LogicOp; + + /// + /// MultiDrawIndirect + /// + [FieldOffset(36)] + public Brutal.Bool32 MultiDrawIndirect; + + /// + /// DrawIndirectFirstInstance + /// + [FieldOffset(40)] + public Brutal.Bool32 DrawIndirectFirstInstance; + + /// + /// DepthClamp + /// + [FieldOffset(44)] + public Brutal.Bool32 DepthClamp; + + /// + /// DepthBiasClamp + /// + [FieldOffset(48)] + public Brutal.Bool32 DepthBiasClamp; + + /// + /// FillModeNonSolid + /// + [FieldOffset(52)] + public Brutal.Bool32 FillModeNonSolid; + + /// + /// DepthBounds + /// + [FieldOffset(56)] + public Brutal.Bool32 DepthBounds; + + /// + /// WideLines + /// + [FieldOffset(60)] + public Brutal.Bool32 WideLines; + + /// + /// LargePoints + /// + [FieldOffset(64)] + public Brutal.Bool32 LargePoints; + + /// + /// AlphaToOne + /// + [FieldOffset(68)] + public Brutal.Bool32 AlphaToOne; + + /// + /// MultiViewport + /// + [FieldOffset(72)] + public Brutal.Bool32 MultiViewport; + + /// + /// SamplerAnisotropy + /// + [FieldOffset(76)] + public Brutal.Bool32 SamplerAnisotropy; + + /// + /// TextureCompressionETC2 + /// + [FieldOffset(80)] + public Brutal.Bool32 TextureCompressionETC2; + + /// + /// TextureCompressionASTCLDR + /// + [FieldOffset(84)] + public Brutal.Bool32 TextureCompressionASTCLDR; + + /// + /// TextureCompressionBC + /// + [FieldOffset(88)] + public Brutal.Bool32 TextureCompressionBC; + + /// + /// OcclusionQueryPrecise + /// + [FieldOffset(92)] + public Brutal.Bool32 OcclusionQueryPrecise; + + /// + /// PipelineStatisticsQuery + /// + [FieldOffset(96)] + public Brutal.Bool32 PipelineStatisticsQuery; + + /// + /// VertexPipelineStoresAndAtomics + /// + [FieldOffset(100)] + public Brutal.Bool32 VertexPipelineStoresAndAtomics; + + /// + /// FragmentStoresAndAtomics + /// + [FieldOffset(104)] + public Brutal.Bool32 FragmentStoresAndAtomics; + + /// + /// ShaderTessellationAndGeometryPointSize + /// + [FieldOffset(108)] + public Brutal.Bool32 ShaderTessellationAndGeometryPointSize; + + /// + /// ShaderImageGatherExtended + /// + [FieldOffset(112)] + public Brutal.Bool32 ShaderImageGatherExtended; + + /// + /// ShaderStorageImageExtendedFormats + /// + [FieldOffset(116)] + public Brutal.Bool32 ShaderStorageImageExtendedFormats; + + /// + /// ShaderStorageImageMultisample + /// + [FieldOffset(120)] + public Brutal.Bool32 ShaderStorageImageMultisample; + + /// + /// ShaderStorageImageReadWithoutFormat + /// + [FieldOffset(124)] + public Brutal.Bool32 ShaderStorageImageReadWithoutFormat; + + /// + /// ShaderStorageImageWriteWithoutFormat + /// + [FieldOffset(128)] + public Brutal.Bool32 ShaderStorageImageWriteWithoutFormat; + + /// + /// ShaderUniformBufferArrayDynamicIndexing + /// + [FieldOffset(132)] + public Brutal.Bool32 ShaderUniformBufferArrayDynamicIndexing; + + /// + /// ShaderSampledImageArrayDynamicIndexing + /// + [FieldOffset(136)] + public Brutal.Bool32 ShaderSampledImageArrayDynamicIndexing; + + /// + /// ShaderStorageBufferArrayDynamicIndexing + /// + [FieldOffset(140)] + public Brutal.Bool32 ShaderStorageBufferArrayDynamicIndexing; + + /// + /// ShaderStorageImageArrayDynamicIndexing + /// + [FieldOffset(144)] + public Brutal.Bool32 ShaderStorageImageArrayDynamicIndexing; + + /// + /// ShaderClipDistance + /// + [FieldOffset(148)] + public Brutal.Bool32 ShaderClipDistance; + + /// + /// ShaderCullDistance + /// + [FieldOffset(152)] + public Brutal.Bool32 ShaderCullDistance; + + /// + /// ShaderFloat64 + /// + [FieldOffset(156)] + public Brutal.Bool32 ShaderFloat64; + + /// + /// ShaderInt64 + /// + [FieldOffset(160)] + public Brutal.Bool32 ShaderInt64; + + /// + /// ShaderInt16 + /// + [FieldOffset(164)] + public Brutal.Bool32 ShaderInt16; + + /// + /// ShaderResourceResidency + /// + [FieldOffset(168)] + public Brutal.Bool32 ShaderResourceResidency; + + /// + /// ShaderResourceMinLod + /// + [FieldOffset(172)] + public Brutal.Bool32 ShaderResourceMinLod; + + /// + /// SparseBinding + /// + [FieldOffset(176)] + public Brutal.Bool32 SparseBinding; + + /// + /// SparseResidencyBuffer + /// + [FieldOffset(180)] + public Brutal.Bool32 SparseResidencyBuffer; + + /// + /// SparseResidencyImage2D + /// + [FieldOffset(184)] + public Brutal.Bool32 SparseResidencyImage2D; + + /// + /// SparseResidencyImage3D + /// + [FieldOffset(188)] + public Brutal.Bool32 SparseResidencyImage3D; + + /// + /// SparseResidency2Samples + /// + [FieldOffset(192)] + public Brutal.Bool32 SparseResidency2Samples; + + /// + /// SparseResidency4Samples + /// + [FieldOffset(196)] + public Brutal.Bool32 SparseResidency4Samples; + + /// + /// SparseResidency8Samples + /// + [FieldOffset(200)] + public Brutal.Bool32 SparseResidency8Samples; + + /// + /// SparseResidency16Samples + /// + [FieldOffset(204)] + public Brutal.Bool32 SparseResidency16Samples; + + /// + /// SparseResidencyAliased + /// + [FieldOffset(208)] + public Brutal.Bool32 SparseResidencyAliased; + + /// + /// VariableMultisampleRate + /// + [FieldOffset(212)] + public Brutal.Bool32 VariableMultisampleRate; + + /// + /// InheritedQueries + /// + [FieldOffset(216)] + public Brutal.Bool32 InheritedQueries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures2.gen.cs new file mode 100644 index 0000000..be220de --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFeatures2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFeatures2 - Structure describing the fine-grained features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFeatures2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceFeatures2 { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceFeatures features; + /// } VkPhysicalDeviceFeatures2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 240)] + public unsafe partial struct VkPhysicalDeviceFeatures2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFeatures2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Features is a VkPhysicalDeviceFeatures structure describing the fine-grained features of the Vulkan 1.0 API. + /// + [FieldOffset(16)] + public VkPhysicalDeviceFeatures Features; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFloatControlsProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFloatControlsProperties.gen.cs new file mode 100644 index 0000000..4d9fc5f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFloatControlsProperties.gen.cs @@ -0,0 +1,152 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFloatControlsProperties - Structure describing properties supported by VK_KHR_shader_float_controls + /// + /// + /// + /// The VkPhysicalDeviceFloatControlsProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceFloatControlsProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkShaderFloatControlsIndependence denormBehaviorIndependence; + /// VkShaderFloatControlsIndependence roundingModeIndependence; + /// VkBool32 shaderSignedZeroInfNanPreserveFloat16; + /// VkBool32 shaderSignedZeroInfNanPreserveFloat32; + /// VkBool32 shaderSignedZeroInfNanPreserveFloat64; + /// VkBool32 shaderDenormPreserveFloat16; + /// VkBool32 shaderDenormPreserveFloat32; + /// VkBool32 shaderDenormPreserveFloat64; + /// VkBool32 shaderDenormFlushToZeroFloat16; + /// VkBool32 shaderDenormFlushToZeroFloat32; + /// VkBool32 shaderDenormFlushToZeroFloat64; + /// VkBool32 shaderRoundingModeRTEFloat16; + /// VkBool32 shaderRoundingModeRTEFloat32; + /// VkBool32 shaderRoundingModeRTEFloat64; + /// VkBool32 shaderRoundingModeRTZFloat16; + /// VkBool32 shaderRoundingModeRTZFloat32; + /// VkBool32 shaderRoundingModeRTZFloat64; + /// } VkPhysicalDeviceFloatControlsProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkPhysicalDeviceFloatControlsProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFloatControlsProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DenormBehaviorIndependence + /// + [FieldOffset(16)] + public VkShaderFloatControlsIndependence DenormBehaviorIndependence; + + /// + /// RoundingModeIndependence + /// + [FieldOffset(20)] + public VkShaderFloatControlsIndependence RoundingModeIndependence; + + /// + /// ShaderSignedZeroInfNanPreserveFloat16 + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderSignedZeroInfNanPreserveFloat16; + + /// + /// ShaderSignedZeroInfNanPreserveFloat32 + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderSignedZeroInfNanPreserveFloat32; + + /// + /// ShaderSignedZeroInfNanPreserveFloat64 + /// + [FieldOffset(32)] + public Brutal.Bool32 ShaderSignedZeroInfNanPreserveFloat64; + + /// + /// ShaderDenormPreserveFloat16 + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderDenormPreserveFloat16; + + /// + /// ShaderDenormPreserveFloat32 + /// + [FieldOffset(40)] + public Brutal.Bool32 ShaderDenormPreserveFloat32; + + /// + /// ShaderDenormPreserveFloat64 + /// + [FieldOffset(44)] + public Brutal.Bool32 ShaderDenormPreserveFloat64; + + /// + /// ShaderDenormFlushToZeroFloat16 + /// + [FieldOffset(48)] + public Brutal.Bool32 ShaderDenormFlushToZeroFloat16; + + /// + /// ShaderDenormFlushToZeroFloat32 + /// + [FieldOffset(52)] + public Brutal.Bool32 ShaderDenormFlushToZeroFloat32; + + /// + /// ShaderDenormFlushToZeroFloat64 + /// + [FieldOffset(56)] + public Brutal.Bool32 ShaderDenormFlushToZeroFloat64; + + /// + /// ShaderRoundingModeRTEFloat16 + /// + [FieldOffset(60)] + public Brutal.Bool32 ShaderRoundingModeRTEFloat16; + + /// + /// ShaderRoundingModeRTEFloat32 + /// + [FieldOffset(64)] + public Brutal.Bool32 ShaderRoundingModeRTEFloat32; + + /// + /// ShaderRoundingModeRTEFloat64 + /// + [FieldOffset(68)] + public Brutal.Bool32 ShaderRoundingModeRTEFloat64; + + /// + /// ShaderRoundingModeRTZFloat16 + /// + [FieldOffset(72)] + public Brutal.Bool32 ShaderRoundingModeRTZFloat16; + + /// + /// ShaderRoundingModeRTZFloat32 + /// + [FieldOffset(76)] + public Brutal.Bool32 ShaderRoundingModeRTZFloat32; + + /// + /// ShaderRoundingModeRTZFloat64 + /// + [FieldOffset(80)] + public Brutal.Bool32 ShaderRoundingModeRTZFloat64; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFormatPackFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFormatPackFeaturesARM.gen.cs new file mode 100644 index 0000000..4102657 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFormatPackFeaturesARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFormatPackFeaturesARM - Structure describing whether the additional formats feature is supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFormatPackFeaturesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_format_pack + /// typedef struct VkPhysicalDeviceFormatPackFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 formatPack; + /// } VkPhysicalDeviceFormatPackFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFormatPackFeaturesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFormatPackFeaturesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FormatPack + /// + [FieldOffset(16)] + public Brutal.Bool32 FormatPack; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.gen.cs new file mode 100644 index 0000000..ccd46a9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2FeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMap2FeaturesEXT - Structure describing additional fragment density map features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMap2FeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map2 + /// typedef struct VkPhysicalDeviceFragmentDensityMap2FeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentDensityMapDeferred; + /// } VkPhysicalDeviceFragmentDensityMap2FeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMap2FeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMap2FeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityMapDeferred + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentDensityMapDeferred; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.gen.cs new file mode 100644 index 0000000..7116c50 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMap2PropertiesEXT.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMap2PropertiesEXT - Structure describing additional fragment density map properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMap2PropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map2 + /// typedef struct VkPhysicalDeviceFragmentDensityMap2PropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 subsampledLoads; + /// VkBool32 subsampledCoarseReconstructionEarlyAccess; + /// uint32_t maxSubsampledArrayLayers; + /// uint32_t maxDescriptorSetSubsampledSamplers; + /// } VkPhysicalDeviceFragmentDensityMap2PropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMap2PropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMap2PropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubsampledLoads + /// + [FieldOffset(16)] + public Brutal.Bool32 SubsampledLoads; + + /// + /// SubsampledCoarseReconstructionEarlyAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 SubsampledCoarseReconstructionEarlyAccess; + + /// + /// MaxSubsampledArrayLayers + /// + [FieldOffset(24)] + public int MaxSubsampledArrayLayers; + + /// + /// MaxDescriptorSetSubsampledSamplers + /// + [FieldOffset(28)] + public int MaxDescriptorSetSubsampledSamplers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.gen.cs new file mode 100644 index 0000000..2147604 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapFeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMapFeaturesEXT - Structure describing fragment density map features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMapFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map + /// typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentDensityMap; + /// VkBool32 fragmentDensityMapDynamic; + /// VkBool32 fragmentDensityMapNonSubsampledImages; + /// } VkPhysicalDeviceFragmentDensityMapFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMapFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityMap + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentDensityMap; + + /// + /// FragmentDensityMapDynamic + /// + [FieldOffset(20)] + public Brutal.Bool32 FragmentDensityMapDynamic; + + /// + /// FragmentDensityMapNonSubsampledImages + /// + [FieldOffset(24)] + public Brutal.Bool32 FragmentDensityMapNonSubsampledImages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE.gen.cs new file mode 100644 index 0000000..b8d4109 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE - Structure describing additional layered fragment density map features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE structure + /// is defined as: + /// + /// + /// // Provided by VK_VALVE_fragment_density_map_layered + /// typedef struct VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentDensityMapLayered; + /// } VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityMapLayered + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentDensityMapLayered; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE.gen.cs new file mode 100644 index 0000000..d67c3df --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE - Structure describing fragment density map layered properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE structure + /// is defined as: + /// + /// + /// // Provided by VK_VALVE_fragment_density_map_layered + /// typedef struct VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxFragmentDensityMapLayers; + /// } VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxFragmentDensityMapLayers + /// + [FieldOffset(16)] + public int MaxFragmentDensityMapLayers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT.gen.cs new file mode 100644 index 0000000..a38350d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT - Structure describing fragment density map offset features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map_offset + /// typedef struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentDensityMapOffset; + /// } VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMapOffsetFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityMapOffset + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentDensityMapOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT.gen.cs new file mode 100644 index 0000000..9902297 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT - Structure describing fragment density map offset properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map_offset + /// typedef struct VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D fragmentDensityOffsetGranularity; + /// } VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMapOffsetPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMapOffsetPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityOffsetGranularity + /// + [FieldOffset(16)] + public VkExtent2D FragmentDensityOffsetGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.gen.cs new file mode 100644 index 0000000..9a2a48a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentDensityMapPropertiesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentDensityMapPropertiesEXT - Structure describing fragment density map properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentDensityMapPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map + /// typedef struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D minFragmentDensityTexelSize; + /// VkExtent2D maxFragmentDensityTexelSize; + /// VkBool32 fragmentDensityInvocations; + /// } VkPhysicalDeviceFragmentDensityMapPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentDensityMapPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinFragmentDensityTexelSize + /// + [FieldOffset(16)] + public VkExtent2D MinFragmentDensityTexelSize; + + /// + /// MaxFragmentDensityTexelSize + /// + [FieldOffset(24)] + public VkExtent2D MaxFragmentDensityTexelSize; + + /// + /// FragmentDensityInvocations + /// + [FieldOffset(32)] + public Brutal.Bool32 FragmentDensityInvocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.gen.cs new file mode 100644 index 0000000..1bb95fb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR - Structure describing barycentric support in fragment shaders that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shader_barycentric + /// typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentShaderBarycentric; + /// } VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentShaderBarycentric + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentShaderBarycentric; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.gen.cs new file mode 100644 index 0000000..73ec443 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR - Structure describing fragment shader barycentric limits of an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR structure + /// is defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shader_barycentric with VK_EXT_provoking_vertex + /// typedef struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 triStripVertexOrderIndependentOfProvokingVertex; + /// } VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShaderBarycentricPropertiesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TriStripVertexOrderIndependentOfProvokingVertex + /// + [FieldOffset(16)] + public Brutal.Bool32 TriStripVertexOrderIndependentOfProvokingVertex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.gen.cs new file mode 100644 index 0000000..ea91061 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT - Structure describing fragment shader interlock features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_shader_interlock + /// typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentShaderSampleInterlock; + /// VkBool32 fragmentShaderPixelInterlock; + /// VkBool32 fragmentShaderShadingRateInterlock; + /// } VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShaderInterlockFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentShaderSampleInterlock + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentShaderSampleInterlock; + + /// + /// FragmentShaderPixelInterlock + /// + [FieldOffset(20)] + public Brutal.Bool32 FragmentShaderPixelInterlock; + + /// + /// FragmentShaderShadingRateInterlock + /// + [FieldOffset(24)] + public Brutal.Bool32 FragmentShaderShadingRateInterlock; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.gen.cs new file mode 100644 index 0000000..7bcac8a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV - Structure indicating support for fragment shading rate enums + /// + /// + /// + /// The VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_fragment_shading_rate_enums + /// typedef struct VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 fragmentShadingRateEnums; + /// VkBool32 supersampleFragmentShadingRates; + /// VkBool32 noInvocationFragmentShadingRates; + /// } VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShadingRateEnumsFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentShadingRateEnums + /// + [FieldOffset(16)] + public Brutal.Bool32 FragmentShadingRateEnums; + + /// + /// SupersampleFragmentShadingRates + /// + [FieldOffset(20)] + public Brutal.Bool32 SupersampleFragmentShadingRates; + + /// + /// NoInvocationFragmentShadingRates + /// + [FieldOffset(24)] + public Brutal.Bool32 NoInvocationFragmentShadingRates; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.gen.cs new file mode 100644 index 0000000..51655a9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV - Structure describing fragment shading rate limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_fragment_shading_rate_enums + /// typedef struct VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkSampleCountFlagBits maxFragmentShadingRateInvocationCount; + /// } VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShadingRateEnumsPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxFragmentShadingRateInvocationCount + /// + [FieldOffset(16)] + public VkSampleCountFlags MaxFragmentShadingRateInvocationCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.gen.cs new file mode 100644 index 0000000..3aa841c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateFeaturesKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShadingRateFeaturesKHR - Structure indicating support for variable rate fragment shading + /// + /// + /// + /// The VkPhysicalDeviceFragmentShadingRateFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// typedef struct VkPhysicalDeviceFragmentShadingRateFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineFragmentShadingRate; + /// VkBool32 primitiveFragmentShadingRate; + /// VkBool32 attachmentFragmentShadingRate; + /// } VkPhysicalDeviceFragmentShadingRateFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFragmentShadingRateFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShadingRateFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineFragmentShadingRate + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineFragmentShadingRate; + + /// + /// PrimitiveFragmentShadingRate + /// + [FieldOffset(20)] + public Brutal.Bool32 PrimitiveFragmentShadingRate; + + /// + /// AttachmentFragmentShadingRate + /// + [FieldOffset(24)] + public Brutal.Bool32 AttachmentFragmentShadingRate; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateKHR.gen.cs new file mode 100644 index 0000000..f66d3a1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRateKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShadingRateKHR - Structure returning information about sample count specific additional multisampling capabilities + /// + /// + /// + /// The VkPhysicalDeviceFragmentShadingRateKHR structure is defined as + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// typedef struct VkPhysicalDeviceFragmentShadingRateKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkSampleCountFlags sampleCounts; + /// VkExtent2D fragmentSize; + /// } VkPhysicalDeviceFragmentShadingRateKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceFragmentShadingRateKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShadingRateKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SampleCounts is a bitmask of sample counts for which the shading rate described by fragmentSize is supported. + /// + [FieldOffset(16)] + public VkSampleCountFlags SampleCounts; + + /// + /// FragmentSize is a VkExtent2D describing the width and height of a supported shading rate. + /// + [FieldOffset(20)] + public VkExtent2D FragmentSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.gen.cs new file mode 100644 index 0000000..9d9fe3c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFragmentShadingRatePropertiesKHR.gen.cs @@ -0,0 +1,153 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFragmentShadingRatePropertiesKHR - Structure describing variable fragment shading rate limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFragmentShadingRatePropertiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// typedef struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D minFragmentShadingRateAttachmentTexelSize; + /// VkExtent2D maxFragmentShadingRateAttachmentTexelSize; + /// uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio; + /// VkBool32 primitiveFragmentShadingRateWithMultipleViewports; + /// VkBool32 layeredShadingRateAttachments; + /// VkBool32 fragmentShadingRateNonTrivialCombinerOps; + /// VkExtent2D maxFragmentSize; + /// uint32_t maxFragmentSizeAspectRatio; + /// uint32_t maxFragmentShadingRateCoverageSamples; + /// VkSampleCountFlagBits maxFragmentShadingRateRasterizationSamples; + /// VkBool32 fragmentShadingRateWithShaderDepthStencilWrites; + /// VkBool32 fragmentShadingRateWithSampleMask; + /// VkBool32 fragmentShadingRateWithShaderSampleMask; + /// VkBool32 fragmentShadingRateWithConservativeRasterization; + /// VkBool32 fragmentShadingRateWithFragmentShaderInterlock; + /// VkBool32 fragmentShadingRateWithCustomSampleLocations; + /// VkBool32 fragmentShadingRateStrictMultiplyCombiner; + /// } VkPhysicalDeviceFragmentShadingRatePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFragmentShadingRatePropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinFragmentShadingRateAttachmentTexelSize + /// + [FieldOffset(16)] + public VkExtent2D MinFragmentShadingRateAttachmentTexelSize; + + /// + /// MaxFragmentShadingRateAttachmentTexelSize + /// + [FieldOffset(24)] + public VkExtent2D MaxFragmentShadingRateAttachmentTexelSize; + + /// + /// MaxFragmentShadingRateAttachmentTexelSizeAspectRatio + /// + [FieldOffset(32)] + public int MaxFragmentShadingRateAttachmentTexelSizeAspectRatio; + + /// + /// PrimitiveFragmentShadingRateWithMultipleViewports + /// + [FieldOffset(36)] + public Brutal.Bool32 PrimitiveFragmentShadingRateWithMultipleViewports; + + /// + /// LayeredShadingRateAttachments + /// + [FieldOffset(40)] + public Brutal.Bool32 LayeredShadingRateAttachments; + + /// + /// FragmentShadingRateNonTrivialCombinerOps + /// + [FieldOffset(44)] + public Brutal.Bool32 FragmentShadingRateNonTrivialCombinerOps; + + /// + /// MaxFragmentSize + /// + [FieldOffset(48)] + public VkExtent2D MaxFragmentSize; + + /// + /// MaxFragmentSizeAspectRatio + /// + [FieldOffset(56)] + public int MaxFragmentSizeAspectRatio; + + /// + /// MaxFragmentShadingRateCoverageSamples + /// + [FieldOffset(60)] + public int MaxFragmentShadingRateCoverageSamples; + + /// + /// MaxFragmentShadingRateRasterizationSamples + /// + [FieldOffset(64)] + public VkSampleCountFlags MaxFragmentShadingRateRasterizationSamples; + + /// + /// FragmentShadingRateWithShaderDepthStencilWrites + /// + [FieldOffset(68)] + public Brutal.Bool32 FragmentShadingRateWithShaderDepthStencilWrites; + + /// + /// FragmentShadingRateWithSampleMask + /// + [FieldOffset(72)] + public Brutal.Bool32 FragmentShadingRateWithSampleMask; + + /// + /// FragmentShadingRateWithShaderSampleMask + /// + [FieldOffset(76)] + public Brutal.Bool32 FragmentShadingRateWithShaderSampleMask; + + /// + /// FragmentShadingRateWithConservativeRasterization + /// + [FieldOffset(80)] + public Brutal.Bool32 FragmentShadingRateWithConservativeRasterization; + + /// + /// FragmentShadingRateWithFragmentShaderInterlock + /// + [FieldOffset(84)] + public Brutal.Bool32 FragmentShadingRateWithFragmentShaderInterlock; + + /// + /// FragmentShadingRateWithCustomSampleLocations + /// + [FieldOffset(88)] + public Brutal.Bool32 FragmentShadingRateWithCustomSampleLocations; + + /// + /// FragmentShadingRateStrictMultiplyCombiner + /// + [FieldOffset(92)] + public Brutal.Bool32 FragmentShadingRateStrictMultiplyCombiner; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFrameBoundaryFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFrameBoundaryFeaturesEXT.gen.cs new file mode 100644 index 0000000..2c890bc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceFrameBoundaryFeaturesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceFrameBoundaryFeaturesEXT - Structure describing the frame boundary features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceFrameBoundaryFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_frame_boundary + /// typedef struct VkPhysicalDeviceFrameBoundaryFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 frameBoundary; + /// } VkPhysicalDeviceFrameBoundaryFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceFrameBoundaryFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceFrameBoundaryFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FrameBoundary + /// + [FieldOffset(16)] + public Brutal.Bool32 FrameBoundary; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGlobalPriorityQueryFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGlobalPriorityQueryFeatures.gen.cs new file mode 100644 index 0000000..91c7ca0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGlobalPriorityQueryFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGlobalPriorityQueryFeatures - Structure describing whether global priority query can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceGlobalPriorityQueryFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceGlobalPriorityQueryFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 globalPriorityQuery; + /// } VkPhysicalDeviceGlobalPriorityQueryFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceGlobalPriorityQueryFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGlobalPriorityQueryFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GlobalPriorityQuery + /// + [FieldOffset(16)] + public Brutal.Bool32 GlobalPriorityQuery; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaFeaturesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaFeaturesAMD.gen.cs new file mode 100644 index 0000000..36fa0e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaFeaturesAMD.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGpaFeaturesAMD - Structure describing support for GPU performance API + /// + /// + /// + /// The VkPhysicalDeviceGpaFeaturesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkPhysicalDeviceGpaFeaturesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 perfCounters; + /// VkBool32 streamingPerfCounters; + /// VkBool32 sqThreadTracing; + /// VkBool32 clockModes; + /// } VkPhysicalDeviceGpaFeaturesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceGpaFeaturesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGpaFeaturesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerfCounters + /// + [FieldOffset(16)] + public Brutal.Bool32 PerfCounters; + + /// + /// StreamingPerfCounters + /// + [FieldOffset(20)] + public Brutal.Bool32 StreamingPerfCounters; + + /// + /// SqThreadTracing + /// + [FieldOffset(24)] + public Brutal.Bool32 SqThreadTracing; + + /// + /// ClockModes + /// + [FieldOffset(28)] + public Brutal.Bool32 ClockModes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaProperties2AMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaProperties2AMD.gen.cs new file mode 100644 index 0000000..dd15285 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaProperties2AMD.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGpaProperties2AMD - Structure describing additional GPU performance API properties for a physical device + /// + /// + /// + /// The VkPhysicalDeviceGpaProperties2AMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkPhysicalDeviceGpaProperties2AMD { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t revisionId; + /// } VkPhysicalDeviceGpaProperties2AMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceGpaProperties2AMD() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGpaProperties2AMD; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RevisionId + /// + [FieldOffset(16)] + public int RevisionId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaPropertiesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaPropertiesAMD.gen.cs new file mode 100644 index 0000000..ec3155b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGpaPropertiesAMD.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGpaPropertiesAMD - Structure describing GPU performance API properties for a physical device + /// + /// + /// + /// The VkPhysicalDeviceGpaPropertiesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_gpa_interface + /// typedef struct VkPhysicalDeviceGpaPropertiesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceGpaPropertiesFlagsAMD flags; + /// VkDeviceSize maxSqttSeBufferSize; + /// uint32_t shaderEngineCount; + /// uint32_t perfBlockCount; + /// VkGpaPerfBlockPropertiesAMD* pPerfBlocks; + /// } VkPhysicalDeviceGpaPropertiesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceGpaPropertiesAMD() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGpaPropertiesAMD; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags + /// + [FieldOffset(16)] + public VkPhysicalDeviceGpaPropertiesFlagsAMD Flags; + + /// + /// MaxSqttSeBufferSize + /// + [FieldOffset(24)] + public ByteSize64 MaxSqttSeBufferSize; + + /// + /// ShaderEngineCount + /// + [FieldOffset(32)] + public int ShaderEngineCount; + + /// + /// PerfBlockCount + /// + [FieldOffset(36)] + public int PerfBlockCount; + + /// + /// PerfBlocks + /// + [FieldOffset(40)] + public VkGpaPerfBlockPropertiesAMD* PerfBlocks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.gen.cs new file mode 100644 index 0000000..d103f90 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT - Structure describing support for graphics pipeline libraries + /// + /// + /// + /// The VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_graphics_pipeline_library + /// typedef struct VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 graphicsPipelineLibrary; + /// } VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GraphicsPipelineLibrary + /// + [FieldOffset(16)] + public Brutal.Bool32 GraphicsPipelineLibrary; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.gen.cs new file mode 100644 index 0000000..07cd39d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT - Structure describing additional properties of graphics pipeline libraries + /// + /// + /// + /// The VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_graphics_pipeline_library + /// typedef struct VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 graphicsPipelineLibraryFastLinking; + /// VkBool32 graphicsPipelineLibraryIndependentInterpolationDecoration; + /// } VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GraphicsPipelineLibraryFastLinking + /// + [FieldOffset(16)] + public Brutal.Bool32 GraphicsPipelineLibraryFastLinking; + + /// + /// GraphicsPipelineLibraryIndependentInterpolationDecoration + /// + [FieldOffset(20)] + public Brutal.Bool32 GraphicsPipelineLibraryIndependentInterpolationDecoration; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGroupProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGroupProperties.gen.cs new file mode 100644 index 0000000..e27ee83 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceGroupProperties.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceGroupProperties - Structure specifying physical device group properties + /// + /// + /// + /// The VkPhysicalDeviceGroupProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceGroupProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t physicalDeviceCount; + /// VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE]; + /// VkBool32 subsetAllocation; + /// } VkPhysicalDeviceGroupProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 288)] + public unsafe partial struct VkPhysicalDeviceGroupProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceGroupProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PhysicalDeviceCount is the number of physical devices in the group. + /// + [FieldOffset(16)] + public int PhysicalDeviceCount; + + /// + /// PhysicalDevices is an array of VK_MAX_DEVICE_GROUP_SIZE VkPhysicalDevice handles representing all physical devices in the group. The first physicalDeviceCount elements of the array will be valid. + /// + [FieldOffset(24)] + public VkPhysicalDevice_32 PhysicalDevices; + + /// + /// SubsetAllocation specifies whether logical devices created from the group support allocating device memory on a subset of devices, via the deviceMask member of the VkMemoryAllocateFlagsInfo. If this is VK_FALSE, then all device memory allocations are made across all physical devices in the group. If physicalDeviceCount is `1`, then subsetAllocation must be VK_FALSE. + /// + [FieldOffset(280)] + public Brutal.Bool32 SubsetAllocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHdrVividFeaturesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHdrVividFeaturesHUAWEI.gen.cs new file mode 100644 index 0000000..bdbc700 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHdrVividFeaturesHUAWEI.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceHdrVividFeaturesHUAWEI - Structure describing whether HDR Vivid metadata is supported + /// + /// + /// + /// The VkPhysicalDeviceHdrVividFeaturesHUAWEI structure is defined as: + /// + /// + /// // Provided by VK_HUAWEI_hdr_vivid + /// typedef struct VkPhysicalDeviceHdrVividFeaturesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hdrVivid; + /// } VkPhysicalDeviceHdrVividFeaturesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceHdrVividFeaturesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceHdrVividFeaturesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HdrVivid + /// + [FieldOffset(16)] + public Brutal.Bool32 HdrVivid; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyFeatures.gen.cs new file mode 100644 index 0000000..6148d10 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceHostImageCopyFeatures - Structure indicating support for copies to or from images from host memory + /// + /// + /// + /// The VkPhysicalDeviceHostImageCopyFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceHostImageCopyFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hostImageCopy; + /// } VkPhysicalDeviceHostImageCopyFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceHostImageCopyFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceHostImageCopyFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HostImageCopy + /// + [FieldOffset(16)] + public Brutal.Bool32 HostImageCopy; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyProperties.gen.cs new file mode 100644 index 0000000..3f63a6c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostImageCopyProperties.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceHostImageCopyProperties - Structure enumerating image layouts supported by an implementation for host memory copies + /// + /// + /// + /// The VkPhysicalDeviceHostImageCopyProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceHostImageCopyProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t copySrcLayoutCount; + /// VkImageLayout* pCopySrcLayouts; + /// uint32_t copyDstLayoutCount; + /// VkImageLayout* pCopyDstLayouts; + /// uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; + /// VkBool32 identicalMemoryTypeRequirements; + /// } VkPhysicalDeviceHostImageCopyProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkPhysicalDeviceHostImageCopyProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceHostImageCopyProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CopySrcLayoutCount + /// + [FieldOffset(16)] + public int CopySrcLayoutCount; + + /// + /// CopySrcLayouts + /// + [FieldOffset(24)] + public VkImageLayout* CopySrcLayouts; + + /// + /// CopyDstLayoutCount + /// + [FieldOffset(32)] + public int CopyDstLayoutCount; + + /// + /// CopyDstLayouts + /// + [FieldOffset(40)] + public VkImageLayout* CopyDstLayouts; + + /// + [FieldOffset(48)] + public fixed byte OptimalTilingLayoutUUID[16]; + + /// + /// IdenticalMemoryTypeRequirements + /// + [FieldOffset(64)] + public Brutal.Bool32 IdenticalMemoryTypeRequirements; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostQueryResetFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostQueryResetFeatures.gen.cs new file mode 100644 index 0000000..dff257c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceHostQueryResetFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceHostQueryResetFeatures - Structure describing whether queries can be reset from the host + /// + /// + /// + /// The VkPhysicalDeviceHostQueryResetFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceHostQueryResetFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hostQueryReset; + /// } VkPhysicalDeviceHostQueryResetFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceHostQueryResetFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceHostQueryResetFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HostQueryReset + /// + [FieldOffset(16)] + public Brutal.Bool32 HostQueryReset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIdProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIdProperties.gen.cs new file mode 100644 index 0000000..b4e5c8b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIdProperties.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceIDProperties - Structure specifying IDs related to the physical device + /// + /// + /// + /// The VkPhysicalDeviceIDProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceIDProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint8_t deviceUUID[VK_UUID_SIZE]; + /// uint8_t driverUUID[VK_UUID_SIZE]; + /// uint8_t deviceLUID[VK_LUID_SIZE]; + /// uint32_t deviceNodeMask; + /// VkBool32 deviceLUIDValid; + /// } VkPhysicalDeviceIDProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceIdProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceIdProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte DeviceUUID[16]; + + /// + [FieldOffset(32)] + public fixed byte DriverUUID[16]; + + /// + [FieldOffset(48)] + public fixed byte DeviceLUID[8]; + + /// + /// DeviceNodeMask + /// + [FieldOffset(56)] + public int DeviceNodeMask; + + /// + /// DeviceLUIDValid + /// + [FieldOffset(60)] + public Brutal.Bool32 DeviceLUIDValid; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.gen.cs new file mode 100644 index 0000000..58bd49a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImage2DViewOf3DFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImage2DViewOf3DFeaturesEXT - Structure describing whether single-slice 2D views of 3D images can be used in image descriptors + /// + /// + /// + /// The VkPhysicalDeviceImage2DViewOf3DFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_image_2d_view_of_3d + /// typedef struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 image2DViewOf3D; + /// VkBool32 sampler2DViewOf3D; + /// } VkPhysicalDeviceImage2DViewOf3DFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImage2DViewOf3DFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image2DViewOf3D + /// + [FieldOffset(16)] + public Brutal.Bool32 Image2DViewOf3D; + + /// + /// Sampler2DViewOf3D + /// + [FieldOffset(20)] + public Brutal.Bool32 Sampler2DViewOf3D; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.gen.cs new file mode 100644 index 0000000..0c2aa6f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlFeaturesMESA.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageAlignmentControlFeaturesMESA - Structure describing features supported by VK_MESA_image_alignment_control + /// + /// + /// + /// The VkPhysicalDeviceImageAlignmentControlFeaturesMESA structure is + /// defined as: + /// + /// + /// // Provided by VK_MESA_image_alignment_control + /// typedef struct VkPhysicalDeviceImageAlignmentControlFeaturesMESA { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imageAlignmentControl; + /// } VkPhysicalDeviceImageAlignmentControlFeaturesMESA; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageAlignmentControlFeaturesMESA() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageAlignmentControlFeaturesMESA; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageAlignmentControl + /// + [FieldOffset(16)] + public Brutal.Bool32 ImageAlignmentControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.gen.cs new file mode 100644 index 0000000..a7641af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageAlignmentControlPropertiesMESA.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageAlignmentControlPropertiesMESA - Structure describing supported image alignments for a physical device + /// + /// + /// + /// The VkPhysicalDeviceImageAlignmentControlPropertiesMESA structure is + /// defined as: + /// + /// + /// // Provided by VK_MESA_image_alignment_control + /// typedef struct VkPhysicalDeviceImageAlignmentControlPropertiesMESA { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t supportedImageAlignmentMask; + /// } VkPhysicalDeviceImageAlignmentControlPropertiesMESA; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageAlignmentControlPropertiesMESA() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageAlignmentControlPropertiesMESA; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedImageAlignmentMask + /// + [FieldOffset(16)] + public int SupportedImageAlignmentMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlFeaturesEXT.gen.cs new file mode 100644 index 0000000..8c0bcff --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageCompressionControlFeaturesEXT - Structure describing whether image compression controls can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceImageCompressionControlFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_image_compression_control + /// typedef struct VkPhysicalDeviceImageCompressionControlFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imageCompressionControl; + /// } VkPhysicalDeviceImageCompressionControlFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageCompressionControlFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageCompressionControlFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageCompressionControl + /// + [FieldOffset(16)] + public Brutal.Bool32 ImageCompressionControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.gen.cs new file mode 100644 index 0000000..5dcf1fd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT - Structure describing whether per-swapchain image compression controls can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT + /// structure is defined as: + /// + /// + /// // Provided by VK_EXT_image_compression_control_swapchain + /// typedef struct VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imageCompressionControlSwapchain; + /// } VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageCompressionControlSwapchain + /// + [FieldOffset(16)] + public Brutal.Bool32 ImageCompressionControlSwapchain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.gen.cs new file mode 100644 index 0000000..949b419 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageDrmFormatModifierInfoEXT - Structure specifying a DRM format modifier as image creation parameter + /// + /// + /// + /// To query the image capabilities that are compatible with a + /// Linux DRM format modifier^, set + /// VkPhysicalDeviceImageFormatInfo2::tiling to + /// VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and add a + /// VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure to the + /// pNext chain of VkPhysicalDeviceImageFormatInfo2. + /// + /// + /// The VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_image_drm_format_modifier + /// typedef struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t drmFormatModifier; + /// VkSharingMode sharingMode; + /// uint32_t queueFamilyIndexCount; + /// const uint32_t* pQueueFamilyIndices; + /// } VkPhysicalDeviceImageDrmFormatModifierInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageDrmFormatModifierInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DrmFormatModifier is the image's Linux DRM format modifier, corresponding to VkImageDrmFormatModifierExplicitCreateInfoEXT::drmFormatModifier or to VkImageDrmFormatModifierListCreateInfoEXT::pDrmFormatModifiers. + /// + [FieldOffset(16)] + public nint DrmFormatModifier; + + /// + /// SharingMode specifies how the image will be accessed by multiple queue families. + /// + [FieldOffset(24)] + public VkSharingMode SharingMode; + + /// + /// QueueFamilyIndexCount is the number of entries in the pQueueFamilyIndices array. + /// + [FieldOffset(28)] + public int QueueFamilyIndexCount; + + /// + /// QueueFamilyIndices is a pointer to an array of queue families that will access the image. It is ignored if sharingMode is not VK_SHARING_MODE_CONCURRENT. + /// + [FieldOffset(32)] + public int* QueueFamilyIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageFormatInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageFormatInfo2.gen.cs new file mode 100644 index 0000000..92462d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageFormatInfo2.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageFormatInfo2 - Structure specifying image creation parameters + /// + /// + /// + /// The VkPhysicalDeviceImageFormatInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceImageFormatInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat format; + /// VkImageType type; + /// VkImageTiling tiling; + /// VkImageUsageFlags usage; + /// VkImageCreateFlags flags; + /// } VkPhysicalDeviceImageFormatInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceImageFormatInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageFormatInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. The pNext chain of VkPhysicalDeviceImageFormatInfo2 is used to provide additional image parameters to vkGetPhysicalDeviceImageFormatProperties2. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is a VkFormat value indicating the image format, corresponding to VkImageCreateInfo::format. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// Type is a VkImageType value indicating the image type, corresponding to VkImageCreateInfo::imageType. + /// + [FieldOffset(20)] + public VkImageType Type; + + /// + /// Tiling is a VkImageTiling value indicating the image tiling, corresponding to VkImageCreateInfo::tiling. + /// + [FieldOffset(24)] + public VkImageTiling Tiling; + + /// + /// Usage is a bitmask of VkImageUsageFlags indicating the intended usage of the image, corresponding to VkImageCreateInfo::usage. + /// + [FieldOffset(28)] + public VkImageUsageFlags Usage; + + /// + /// Flags is a bitmask of VkImageCreateFlags indicating additional parameters of the image, corresponding to VkImageCreateInfo::flags. + /// + [FieldOffset(32)] + public VkImageCreateFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2FeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2FeaturesQCOM.gen.cs new file mode 100644 index 0000000..a2a9291 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2FeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageProcessing2FeaturesQCOM - Structure describing image processing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceImageProcessing2FeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_image_processing2 + /// typedef struct VkPhysicalDeviceImageProcessing2FeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 textureBlockMatch2; + /// } VkPhysicalDeviceImageProcessing2FeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageProcessing2FeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageProcessing2FeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TextureBlockMatch2 + /// + [FieldOffset(16)] + public Brutal.Bool32 TextureBlockMatch2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2PropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2PropertiesQCOM.gen.cs new file mode 100644 index 0000000..50fda0a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing2PropertiesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageProcessing2PropertiesQCOM - Structure containing image processing2 properties + /// + /// + /// + /// The VkPhysicalDeviceImageProcessing2PropertiesQCOM structure is + /// defined as: + /// + /// + /// // Provided by VK_QCOM_image_processing2 + /// typedef struct VkPhysicalDeviceImageProcessing2PropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D maxBlockMatchWindow; + /// } VkPhysicalDeviceImageProcessing2PropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageProcessing2PropertiesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageProcessing2PropertiesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxBlockMatchWindow + /// + [FieldOffset(16)] + public VkExtent2D MaxBlockMatchWindow; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing3FeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing3FeaturesQCOM.gen.cs new file mode 100644 index 0000000..5d4fb25 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessing3FeaturesQCOM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageProcessing3FeaturesQCOM - Structure describing image processing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceImageProcessing3FeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_image_processing3 + /// typedef struct VkPhysicalDeviceImageProcessing3FeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imageGatherLinear; + /// VkBool32 imageGatherExtendedModes; + /// VkBool32 blockMatchExtendedClampToEdge; + /// } VkPhysicalDeviceImageProcessing3FeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceImageProcessing3FeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageProcessing3FeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageGatherLinear + /// + [FieldOffset(16)] + public Brutal.Bool32 ImageGatherLinear; + + /// + /// ImageGatherExtendedModes + /// + [FieldOffset(20)] + public Brutal.Bool32 ImageGatherExtendedModes; + + /// + /// BlockMatchExtendedClampToEdge + /// + [FieldOffset(24)] + public Brutal.Bool32 BlockMatchExtendedClampToEdge; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingFeaturesQCOM.gen.cs new file mode 100644 index 0000000..355a643 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingFeaturesQCOM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageProcessingFeaturesQCOM - Structure describing image processing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceImageProcessingFeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_image_processing + /// typedef struct VkPhysicalDeviceImageProcessingFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 textureSampleWeighted; + /// VkBool32 textureBoxFilter; + /// VkBool32 textureBlockMatch; + /// } VkPhysicalDeviceImageProcessingFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceImageProcessingFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageProcessingFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TextureSampleWeighted + /// + [FieldOffset(16)] + public Brutal.Bool32 TextureSampleWeighted; + + /// + /// TextureBoxFilter + /// + [FieldOffset(20)] + public Brutal.Bool32 TextureBoxFilter; + + /// + /// TextureBlockMatch + /// + [FieldOffset(24)] + public Brutal.Bool32 TextureBlockMatch; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingPropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingPropertiesQCOM.gen.cs new file mode 100644 index 0000000..ae6b76c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageProcessingPropertiesQCOM.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageProcessingPropertiesQCOM - Structure containing image processing properties + /// + /// + /// + /// The VkPhysicalDeviceImageProcessingPropertiesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_image_processing + /// typedef struct VkPhysicalDeviceImageProcessingPropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxWeightFilterPhases; + /// VkExtent2D maxWeightFilterDimension; + /// VkExtent2D maxBlockMatchRegion; + /// VkExtent2D maxBoxFilterBlockSize; + /// } VkPhysicalDeviceImageProcessingPropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceImageProcessingPropertiesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageProcessingPropertiesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxWeightFilterPhases + /// + [FieldOffset(16)] + public int MaxWeightFilterPhases; + + /// + /// MaxWeightFilterDimension + /// + [FieldOffset(20)] + public VkExtent2D MaxWeightFilterDimension; + + /// + /// MaxBlockMatchRegion + /// + [FieldOffset(28)] + public VkExtent2D MaxBlockMatchRegion; + + /// + /// MaxBoxFilterBlockSize + /// + [FieldOffset(36)] + public VkExtent2D MaxBoxFilterBlockSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageRobustnessFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageRobustnessFeatures.gen.cs new file mode 100644 index 0000000..594636c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageRobustnessFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageRobustnessFeatures - Structure describing the out-of-bounds behavior for an implementation + /// + /// + /// + /// The VkPhysicalDeviceImageRobustnessFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceImageRobustnessFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 robustImageAccess; + /// } VkPhysicalDeviceImageRobustnessFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageRobustnessFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageRobustnessFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RobustImageAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 RobustImageAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.gen.cs new file mode 100644 index 0000000..ac91532 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT - Structure describing whether slice-based views of 3D images can be used in storage image descriptors + /// + /// + /// + /// The VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_image_sliced_view_of_3d + /// typedef struct VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imageSlicedViewOf3D; + /// } VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageSlicedViewOf3DFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageSlicedViewOf3D + /// + [FieldOffset(16)] + public Brutal.Bool32 ImageSlicedViewOf3D; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewImageFormatInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewImageFormatInfoEXT.gen.cs new file mode 100644 index 0000000..a53d08c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewImageFormatInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageViewImageFormatInfoEXT - Structure for providing image view type + /// + /// + /// + /// The VkPhysicalDeviceImageViewImageFormatInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_filter_cubic + /// typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkImageViewType imageViewType; + /// } VkPhysicalDeviceImageViewImageFormatInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageViewImageFormatInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageViewImageFormatInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageViewType is a VkImageViewType value specifying the type of the image view. + /// + [FieldOffset(16)] + public VkImageViewType ImageViewType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewMinLodFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewMinLodFeaturesEXT.gen.cs new file mode 100644 index 0000000..9065609 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImageViewMinLodFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImageViewMinLodFeaturesEXT - Structure describing whether clamping the min LOD of an image view is supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceImageViewMinLodFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_image_view_min_lod + /// typedef struct VkPhysicalDeviceImageViewMinLodFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 minLod; + /// } VkPhysicalDeviceImageViewMinLodFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImageViewMinLodFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImageViewMinLodFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinLod + /// + [FieldOffset(16)] + public Brutal.Bool32 MinLod; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImagelessFramebufferFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImagelessFramebufferFeatures.gen.cs new file mode 100644 index 0000000..4289d19 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceImagelessFramebufferFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceImagelessFramebufferFeatures - Structure indicating support for imageless framebuffers + /// + /// + /// + /// The VkPhysicalDeviceImagelessFramebufferFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceImagelessFramebufferFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imagelessFramebuffer; + /// } VkPhysicalDeviceImagelessFramebufferFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceImagelessFramebufferFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceImagelessFramebufferFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImagelessFramebuffer + /// + [FieldOffset(16)] + public Brutal.Bool32 ImagelessFramebuffer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIndexTypeUInt8Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIndexTypeUInt8Features.gen.cs new file mode 100644 index 0000000..efc4ad8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceIndexTypeUInt8Features.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceIndexTypeUint8Features - Structure describing whether uint8 index type can be used + /// + /// + /// + /// The VkPhysicalDeviceIndexTypeUint8Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceIndexTypeUint8Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 indexTypeUint8; + /// } VkPhysicalDeviceIndexTypeUint8Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceIndexTypeUInt8Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceIndexTypeUInt8Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IndexTypeUint8 + /// + [FieldOffset(16)] + public Brutal.Bool32 IndexTypeUint8; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.gen.cs new file mode 100644 index 0000000..b8c1d5c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInheritedViewportScissorFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceInheritedViewportScissorFeaturesNV - Structure describing the viewport scissor inheritance behavior for an implementation + /// + /// + /// + /// The VkPhysicalDeviceInheritedViewportScissorFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_inherited_viewport_scissor + /// typedef struct VkPhysicalDeviceInheritedViewportScissorFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 inheritedViewportScissor2D; + /// } VkPhysicalDeviceInheritedViewportScissorFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceInheritedViewportScissorFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceInheritedViewportScissorFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// InheritedViewportScissor2D + /// + [FieldOffset(16)] + public Brutal.Bool32 InheritedViewportScissor2D; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockFeatures.gen.cs new file mode 100644 index 0000000..57f341f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockFeatures.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceInlineUniformBlockFeatures - Structure describing inline uniform block features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceInlineUniformBlockFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceInlineUniformBlockFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 inlineUniformBlock; + /// VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind; + /// } VkPhysicalDeviceInlineUniformBlockFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceInlineUniformBlockFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceInlineUniformBlockFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// InlineUniformBlock + /// + [FieldOffset(16)] + public Brutal.Bool32 InlineUniformBlock; + + /// + /// DescriptorBindingInlineUniformBlockUpdateAfterBind + /// + [FieldOffset(20)] + public Brutal.Bool32 DescriptorBindingInlineUniformBlockUpdateAfterBind; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockProperties.gen.cs new file mode 100644 index 0000000..cd93119 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInlineUniformBlockProperties.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceInlineUniformBlockProperties - Structure describing inline uniform block properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceInlineUniformBlockProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceInlineUniformBlockProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxInlineUniformBlockSize; + /// uint32_t maxPerStageDescriptorInlineUniformBlocks; + /// uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; + /// uint32_t maxDescriptorSetInlineUniformBlocks; + /// uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks; + /// } VkPhysicalDeviceInlineUniformBlockProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceInlineUniformBlockProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceInlineUniformBlockProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxInlineUniformBlockSize + /// + [FieldOffset(16)] + public int MaxInlineUniformBlockSize; + + /// + /// MaxPerStageDescriptorInlineUniformBlocks + /// + [FieldOffset(20)] + public int MaxPerStageDescriptorInlineUniformBlocks; + + /// + /// MaxPerStageDescriptorUpdateAfterBindInlineUniformBlocks + /// + [FieldOffset(24)] + public int MaxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; + + /// + /// MaxDescriptorSetInlineUniformBlocks + /// + [FieldOffset(28)] + public int MaxDescriptorSetInlineUniformBlocks; + + /// + /// MaxDescriptorSetUpdateAfterBindInlineUniformBlocks + /// + [FieldOffset(32)] + public int MaxDescriptorSetUpdateAfterBindInlineUniformBlocks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR.gen.cs new file mode 100644 index 0000000..2220ffb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR - Structure indicating support for queues that are internally synchronized + /// + /// + /// + /// The VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR structure + /// is defined as: + /// + /// + /// // Provided by VK_KHR_internally_synchronized_queues + /// typedef struct VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 internallySynchronizedQueues; + /// } VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceInternallySynchronizedQueuesFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// InternallySynchronizedQueues + /// + [FieldOffset(16)] + public Brutal.Bool32 InternallySynchronizedQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.gen.cs new file mode 100644 index 0000000..894e89e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceInvocationMaskFeaturesHUAWEI.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceInvocationMaskFeaturesHUAWEI - Structure describing invocation mask features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceInvocationMaskFeaturesHUAWEI structure is defined + /// as: + /// + /// + /// // Provided by VK_HUAWEI_invocation_mask + /// typedef struct VkPhysicalDeviceInvocationMaskFeaturesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 invocationMask; + /// } VkPhysicalDeviceInvocationMaskFeaturesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceInvocationMaskFeaturesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceInvocationMaskFeaturesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// InvocationMask + /// + [FieldOffset(16)] + public Brutal.Bool32 InvocationMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesKHR.gen.cs new file mode 100644 index 0000000..b5a5ecb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLayeredApiPropertiesKHR - Structure describing a single layered implementation underneath the Vulkan physical device + /// + /// + /// + /// The VkPhysicalDeviceLayeredApiPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance7 + /// typedef struct VkPhysicalDeviceLayeredApiPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t vendorID; + /// uint32_t deviceID; + /// VkPhysicalDeviceLayeredApiKHR layeredAPI; + /// char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; + /// } VkPhysicalDeviceLayeredApiPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 288)] + public unsafe partial struct VkPhysicalDeviceLayeredApiPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLayeredApiPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VendorID is a unique identifier for the vendor of the layered implementation. + /// + [FieldOffset(16)] + public int VendorID; + + /// + /// DeviceID is a unique identifier for the layered implementation among devices available from the vendor. + /// + [FieldOffset(20)] + public int DeviceID; + + /// + /// LayeredAPI is a VkPhysicalDeviceLayeredApiKHR specifying the API implemented by the layered implementation. + /// + [FieldOffset(24)] + public VkPhysicalDeviceLayeredApiKHR LayeredAPI; + + /// + [FieldOffset(28)] + public fixed byte DeviceName[256]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesListKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesListKHR.gen.cs new file mode 100644 index 0000000..4013fcb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiPropertiesListKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLayeredApiPropertiesListKHR - Structure describing layered implementations underneath the Vulkan physical device + /// + /// + /// + /// The VkPhysicalDeviceLayeredApiPropertiesListKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_maintenance7 + /// typedef struct VkPhysicalDeviceLayeredApiPropertiesListKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t layeredApiCount; + /// VkPhysicalDeviceLayeredApiPropertiesKHR* pLayeredApis; + /// } VkPhysicalDeviceLayeredApiPropertiesListKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceLayeredApiPropertiesListKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLayeredApiPropertiesListKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LayeredApiCount is an integer related to the number of layered implementations underneath the Vulkan physical device, as described below. + /// + [FieldOffset(16)] + public int LayeredApiCount; + + /// + /// LayeredApis is a pointer to an array of VkPhysicalDeviceLayeredApiPropertiesKHR in which information regarding the layered implementations underneath the Vulkan physical device are returned. + /// + [FieldOffset(24)] + public VkPhysicalDeviceLayeredApiPropertiesKHR* LayeredApis; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.gen.cs new file mode 100644 index 0000000..c0229d7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredApiVulkanPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLayeredApiVulkanPropertiesKHR - Structure describing physical device properties of a layered Vulkan implementation underneath the Vulkan physical device + /// + /// + /// + /// The VkPhysicalDeviceLayeredApiVulkanPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_maintenance7 + /// typedef struct VkPhysicalDeviceLayeredApiVulkanPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceProperties2 properties; + /// } VkPhysicalDeviceLayeredApiVulkanPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 856)] + public unsafe partial struct VkPhysicalDeviceLayeredApiVulkanPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLayeredApiVulkanPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Properties is a VkPhysicalDeviceProperties2 in which properties of the underlying layered Vulkan implementation are returned. + /// + [FieldOffset(16)] + public VkPhysicalDeviceProperties2 Properties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredDriverPropertiesMSFT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredDriverPropertiesMSFT.gen.cs new file mode 100644 index 0000000..5ff46c1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLayeredDriverPropertiesMSFT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLayeredDriverPropertiesMSFT - Structure containing information about driver layering for a physical device + /// + /// + /// + /// The VkPhysicalDeviceLayeredDriverPropertiesMSFT structure is defined + /// as: + /// + /// + /// // Provided by VK_MSFT_layered_driver + /// typedef struct VkPhysicalDeviceLayeredDriverPropertiesMSFT { + /// VkStructureType sType; + /// void* pNext; + /// VkLayeredDriverUnderlyingApiMSFT underlyingAPI; + /// } VkPhysicalDeviceLayeredDriverPropertiesMSFT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceLayeredDriverPropertiesMSFT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLayeredDriverPropertiesMSFT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UnderlyingAPI is a VkLayeredDriverUnderlyingApiMSFT value indicating which underlying API is used to implement the layered driver, or VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT if the driver is not layered. + /// + [FieldOffset(16)] + public VkLayeredDriverUnderlyingApiMSFT UnderlyingAPI; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyDitheringFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyDitheringFeaturesEXT.gen.cs new file mode 100644 index 0000000..40e4c0c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyDitheringFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLegacyDitheringFeaturesEXT - Structure describing support for legacy dithering + /// + /// + /// + /// The VkPhysicalDeviceLegacyDitheringFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_legacy_dithering + /// typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 legacyDithering; + /// } VkPhysicalDeviceLegacyDitheringFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceLegacyDitheringFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLegacyDitheringFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LegacyDithering + /// + [FieldOffset(16)] + public Brutal.Bool32 LegacyDithering; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.gen.cs new file mode 100644 index 0000000..2ae29cf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT - Structure describing compatibility features for vertex attributes + /// + /// + /// + /// The VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_legacy_vertex_attributes + /// typedef struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 legacyVertexAttributes; + /// } VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLegacyVertexAttributesFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LegacyVertexAttributes + /// + [FieldOffset(16)] + public Brutal.Bool32 LegacyVertexAttributes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.gen.cs new file mode 100644 index 0000000..cf59168 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT - Structure describing properties for legacy vertex attributes + /// + /// + /// + /// The VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_legacy_vertex_attributes + /// typedef struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 nativeUnalignedPerformance; + /// } VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLegacyVertexAttributesPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NativeUnalignedPerformance + /// + [FieldOffset(16)] + public Brutal.Bool32 NativeUnalignedPerformance; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLimits.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLimits.gen.cs new file mode 100644 index 0000000..26c28a9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLimits.gen.cs @@ -0,0 +1,761 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLimits - Structure reporting implementation-dependent physical device limits + /// + /// + /// + /// The VkPhysicalDeviceLimits structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPhysicalDeviceLimits { + /// uint32_t maxImageDimension1D; + /// uint32_t maxImageDimension2D; + /// uint32_t maxImageDimension3D; + /// uint32_t maxImageDimensionCube; + /// uint32_t maxImageArrayLayers; + /// uint32_t maxTexelBufferElements; + /// uint32_t maxUniformBufferRange; + /// uint32_t maxStorageBufferRange; + /// uint32_t maxPushConstantsSize; + /// uint32_t maxMemoryAllocationCount; + /// uint32_t maxSamplerAllocationCount; + /// VkDeviceSize bufferImageGranularity; + /// VkDeviceSize sparseAddressSpaceSize; + /// uint32_t maxBoundDescriptorSets; + /// uint32_t maxPerStageDescriptorSamplers; + /// uint32_t maxPerStageDescriptorUniformBuffers; + /// uint32_t maxPerStageDescriptorStorageBuffers; + /// uint32_t maxPerStageDescriptorSampledImages; + /// uint32_t maxPerStageDescriptorStorageImages; + /// uint32_t maxPerStageDescriptorInputAttachments; + /// uint32_t maxPerStageResources; + /// uint32_t maxDescriptorSetSamplers; + /// uint32_t maxDescriptorSetUniformBuffers; + /// uint32_t maxDescriptorSetUniformBuffersDynamic; + /// uint32_t maxDescriptorSetStorageBuffers; + /// uint32_t maxDescriptorSetStorageBuffersDynamic; + /// uint32_t maxDescriptorSetSampledImages; + /// uint32_t maxDescriptorSetStorageImages; + /// uint32_t maxDescriptorSetInputAttachments; + /// uint32_t maxVertexInputAttributes; + /// uint32_t maxVertexInputBindings; + /// uint32_t maxVertexInputAttributeOffset; + /// uint32_t maxVertexInputBindingStride; + /// uint32_t maxVertexOutputComponents; + /// uint32_t maxTessellationGenerationLevel; + /// uint32_t maxTessellationPatchSize; + /// uint32_t maxTessellationControlPerVertexInputComponents; + /// uint32_t maxTessellationControlPerVertexOutputComponents; + /// uint32_t maxTessellationControlPerPatchOutputComponents; + /// uint32_t maxTessellationControlTotalOutputComponents; + /// uint32_t maxTessellationEvaluationInputComponents; + /// uint32_t maxTessellationEvaluationOutputComponents; + /// uint32_t maxGeometryShaderInvocations; + /// uint32_t maxGeometryInputComponents; + /// uint32_t maxGeometryOutputComponents; + /// uint32_t maxGeometryOutputVertices; + /// uint32_t maxGeometryTotalOutputComponents; + /// uint32_t maxFragmentInputComponents; + /// uint32_t maxFragmentOutputAttachments; + /// uint32_t maxFragmentDualSrcAttachments; + /// uint32_t maxFragmentCombinedOutputResources; + /// uint32_t maxComputeSharedMemorySize; + /// uint32_t maxComputeWorkGroupCount[3]; + /// uint32_t maxComputeWorkGroupInvocations; + /// uint32_t maxComputeWorkGroupSize[3]; + /// uint32_t subPixelPrecisionBits; + /// uint32_t subTexelPrecisionBits; + /// uint32_t mipmapPrecisionBits; + /// uint32_t maxDrawIndexedIndexValue; + /// uint32_t maxDrawIndirectCount; + /// float maxSamplerLodBias; + /// float maxSamplerAnisotropy; + /// uint32_t maxViewports; + /// uint32_t maxViewportDimensions[2]; + /// float viewportBoundsRange[2]; + /// uint32_t viewportSubPixelBits; + /// size_t minMemoryMapAlignment; + /// VkDeviceSize minTexelBufferOffsetAlignment; + /// VkDeviceSize minUniformBufferOffsetAlignment; + /// VkDeviceSize minStorageBufferOffsetAlignment; + /// int32_t minTexelOffset; + /// uint32_t maxTexelOffset; + /// int32_t minTexelGatherOffset; + /// uint32_t maxTexelGatherOffset; + /// float minInterpolationOffset; + /// float maxInterpolationOffset; + /// uint32_t subPixelInterpolationOffsetBits; + /// uint32_t maxFramebufferWidth; + /// uint32_t maxFramebufferHeight; + /// uint32_t maxFramebufferLayers; + /// VkSampleCountFlags framebufferColorSampleCounts; + /// VkSampleCountFlags framebufferDepthSampleCounts; + /// VkSampleCountFlags framebufferStencilSampleCounts; + /// VkSampleCountFlags framebufferNoAttachmentsSampleCounts; + /// uint32_t maxColorAttachments; + /// VkSampleCountFlags sampledImageColorSampleCounts; + /// VkSampleCountFlags sampledImageIntegerSampleCounts; + /// VkSampleCountFlags sampledImageDepthSampleCounts; + /// VkSampleCountFlags sampledImageStencilSampleCounts; + /// VkSampleCountFlags storageImageSampleCounts; + /// uint32_t maxSampleMaskWords; + /// VkBool32 timestampComputeAndGraphics; + /// float timestampPeriod; + /// uint32_t maxClipDistances; + /// uint32_t maxCullDistances; + /// uint32_t maxCombinedClipAndCullDistances; + /// uint32_t discreteQueuePriorities; + /// float pointSizeRange[2]; + /// float lineWidthRange[2]; + /// float pointSizeGranularity; + /// float lineWidthGranularity; + /// VkBool32 strictLines; + /// VkBool32 standardSampleLocations; + /// VkDeviceSize optimalBufferCopyOffsetAlignment; + /// VkDeviceSize optimalBufferCopyRowPitchAlignment; + /// VkDeviceSize nonCoherentAtomSize; + /// } VkPhysicalDeviceLimits; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 504)] + public partial struct VkPhysicalDeviceLimits() + { + /// + /// MaxImageDimension1D + /// + [FieldOffset(0)] + public int MaxImageDimension1D; + + /// + /// MaxImageDimension2D + /// + [FieldOffset(4)] + public int MaxImageDimension2D; + + /// + /// MaxImageDimension3D + /// + [FieldOffset(8)] + public int MaxImageDimension3D; + + /// + /// MaxImageDimensionCube + /// + [FieldOffset(12)] + public int MaxImageDimensionCube; + + /// + /// MaxImageArrayLayers + /// + [FieldOffset(16)] + public int MaxImageArrayLayers; + + /// + /// MaxTexelBufferElements + /// + [FieldOffset(20)] + public int MaxTexelBufferElements; + + /// + /// MaxUniformBufferRange + /// + [FieldOffset(24)] + public int MaxUniformBufferRange; + + /// + /// MaxStorageBufferRange + /// + [FieldOffset(28)] + public int MaxStorageBufferRange; + + /// + /// MaxPushConstantsSize + /// + [FieldOffset(32)] + public int MaxPushConstantsSize; + + /// + /// MaxMemoryAllocationCount + /// + [FieldOffset(36)] + public int MaxMemoryAllocationCount; + + /// + /// MaxSamplerAllocationCount + /// + [FieldOffset(40)] + public int MaxSamplerAllocationCount; + + /// + /// BufferImageGranularity + /// + [FieldOffset(48)] + public ByteSize64 BufferImageGranularity; + + /// + /// SparseAddressSpaceSize + /// + [FieldOffset(56)] + public ByteSize64 SparseAddressSpaceSize; + + /// + /// MaxBoundDescriptorSets + /// + [FieldOffset(64)] + public int MaxBoundDescriptorSets; + + /// + /// MaxPerStageDescriptorSamplers + /// + [FieldOffset(68)] + public int MaxPerStageDescriptorSamplers; + + /// + /// MaxPerStageDescriptorUniformBuffers + /// + [FieldOffset(72)] + public int MaxPerStageDescriptorUniformBuffers; + + /// + /// MaxPerStageDescriptorStorageBuffers + /// + [FieldOffset(76)] + public int MaxPerStageDescriptorStorageBuffers; + + /// + /// MaxPerStageDescriptorSampledImages + /// + [FieldOffset(80)] + public int MaxPerStageDescriptorSampledImages; + + /// + /// MaxPerStageDescriptorStorageImages + /// + [FieldOffset(84)] + public int MaxPerStageDescriptorStorageImages; + + /// + /// MaxPerStageDescriptorInputAttachments + /// + [FieldOffset(88)] + public int MaxPerStageDescriptorInputAttachments; + + /// + /// MaxPerStageResources + /// + [FieldOffset(92)] + public int MaxPerStageResources; + + /// + /// MaxDescriptorSetSamplers + /// + [FieldOffset(96)] + public int MaxDescriptorSetSamplers; + + /// + /// MaxDescriptorSetUniformBuffers + /// + [FieldOffset(100)] + public int MaxDescriptorSetUniformBuffers; + + /// + /// MaxDescriptorSetUniformBuffersDynamic + /// + [FieldOffset(104)] + public int MaxDescriptorSetUniformBuffersDynamic; + + /// + /// MaxDescriptorSetStorageBuffers + /// + [FieldOffset(108)] + public int MaxDescriptorSetStorageBuffers; + + /// + /// MaxDescriptorSetStorageBuffersDynamic + /// + [FieldOffset(112)] + public int MaxDescriptorSetStorageBuffersDynamic; + + /// + /// MaxDescriptorSetSampledImages + /// + [FieldOffset(116)] + public int MaxDescriptorSetSampledImages; + + /// + /// MaxDescriptorSetStorageImages + /// + [FieldOffset(120)] + public int MaxDescriptorSetStorageImages; + + /// + /// MaxDescriptorSetInputAttachments + /// + [FieldOffset(124)] + public int MaxDescriptorSetInputAttachments; + + /// + /// MaxVertexInputAttributes + /// + [FieldOffset(128)] + public int MaxVertexInputAttributes; + + /// + /// MaxVertexInputBindings + /// + [FieldOffset(132)] + public int MaxVertexInputBindings; + + /// + /// MaxVertexInputAttributeOffset + /// + [FieldOffset(136)] + public int MaxVertexInputAttributeOffset; + + /// + /// MaxVertexInputBindingStride + /// + [FieldOffset(140)] + public int MaxVertexInputBindingStride; + + /// + /// MaxVertexOutputComponents + /// + [FieldOffset(144)] + public int MaxVertexOutputComponents; + + /// + /// MaxTessellationGenerationLevel + /// + [FieldOffset(148)] + public int MaxTessellationGenerationLevel; + + /// + /// MaxTessellationPatchSize + /// + [FieldOffset(152)] + public int MaxTessellationPatchSize; + + /// + /// MaxTessellationControlPerVertexInputComponents + /// + [FieldOffset(156)] + public int MaxTessellationControlPerVertexInputComponents; + + /// + /// MaxTessellationControlPerVertexOutputComponents + /// + [FieldOffset(160)] + public int MaxTessellationControlPerVertexOutputComponents; + + /// + /// MaxTessellationControlPerPatchOutputComponents + /// + [FieldOffset(164)] + public int MaxTessellationControlPerPatchOutputComponents; + + /// + /// MaxTessellationControlTotalOutputComponents + /// + [FieldOffset(168)] + public int MaxTessellationControlTotalOutputComponents; + + /// + /// MaxTessellationEvaluationInputComponents + /// + [FieldOffset(172)] + public int MaxTessellationEvaluationInputComponents; + + /// + /// MaxTessellationEvaluationOutputComponents + /// + [FieldOffset(176)] + public int MaxTessellationEvaluationOutputComponents; + + /// + /// MaxGeometryShaderInvocations + /// + [FieldOffset(180)] + public int MaxGeometryShaderInvocations; + + /// + /// MaxGeometryInputComponents + /// + [FieldOffset(184)] + public int MaxGeometryInputComponents; + + /// + /// MaxGeometryOutputComponents + /// + [FieldOffset(188)] + public int MaxGeometryOutputComponents; + + /// + /// MaxGeometryOutputVertices + /// + [FieldOffset(192)] + public int MaxGeometryOutputVertices; + + /// + /// MaxGeometryTotalOutputComponents + /// + [FieldOffset(196)] + public int MaxGeometryTotalOutputComponents; + + /// + /// MaxFragmentInputComponents + /// + [FieldOffset(200)] + public int MaxFragmentInputComponents; + + /// + /// MaxFragmentOutputAttachments + /// + [FieldOffset(204)] + public int MaxFragmentOutputAttachments; + + /// + /// MaxFragmentDualSrcAttachments + /// + [FieldOffset(208)] + public int MaxFragmentDualSrcAttachments; + + /// + /// MaxFragmentCombinedOutputResources + /// + [FieldOffset(212)] + public int MaxFragmentCombinedOutputResources; + + /// + /// MaxComputeSharedMemorySize + /// + [FieldOffset(216)] + public int MaxComputeSharedMemorySize; + + /// + /// MaxComputeWorkGroupCount + /// + [FieldOffset(220)] + public uint3 MaxComputeWorkGroupCount; + + /// + /// MaxComputeWorkGroupInvocations + /// + [FieldOffset(232)] + public int MaxComputeWorkGroupInvocations; + + /// + /// MaxComputeWorkGroupSize + /// + [FieldOffset(236)] + public uint3 MaxComputeWorkGroupSize; + + /// + /// SubPixelPrecisionBits + /// + [FieldOffset(248)] + public int SubPixelPrecisionBits; + + /// + /// SubTexelPrecisionBits + /// + [FieldOffset(252)] + public int SubTexelPrecisionBits; + + /// + /// MipmapPrecisionBits + /// + [FieldOffset(256)] + public int MipmapPrecisionBits; + + /// + /// MaxDrawIndexedIndexValue + /// + [FieldOffset(260)] + public int MaxDrawIndexedIndexValue; + + /// + /// MaxDrawIndirectCount + /// + [FieldOffset(264)] + public int MaxDrawIndirectCount; + + /// + /// MaxSamplerLodBias + /// + [FieldOffset(268)] + public float MaxSamplerLodBias; + + /// + /// MaxSamplerAnisotropy + /// + [FieldOffset(272)] + public float MaxSamplerAnisotropy; + + /// + /// MaxViewports + /// + [FieldOffset(276)] + public int MaxViewports; + + /// + /// MaxViewportDimensions + /// + [FieldOffset(280)] + public uint2 MaxViewportDimensions; + + /// + /// ViewportBoundsRange + /// + [FieldOffset(288)] + public float2 ViewportBoundsRange; + + /// + /// ViewportSubPixelBits + /// + [FieldOffset(296)] + public int ViewportSubPixelBits; + + /// + /// MinMemoryMapAlignment + /// + [FieldOffset(304)] + public nuint MinMemoryMapAlignment; + + /// + /// MinTexelBufferOffsetAlignment + /// + [FieldOffset(312)] + public ByteSize64 MinTexelBufferOffsetAlignment; + + /// + /// MinUniformBufferOffsetAlignment + /// + [FieldOffset(320)] + public ByteSize64 MinUniformBufferOffsetAlignment; + + /// + /// MinStorageBufferOffsetAlignment + /// + [FieldOffset(328)] + public ByteSize64 MinStorageBufferOffsetAlignment; + + /// + /// MinTexelOffset + /// + [FieldOffset(336)] + public int MinTexelOffset; + + /// + /// MaxTexelOffset + /// + [FieldOffset(340)] + public int MaxTexelOffset; + + /// + /// MinTexelGatherOffset + /// + [FieldOffset(344)] + public int MinTexelGatherOffset; + + /// + /// MaxTexelGatherOffset + /// + [FieldOffset(348)] + public int MaxTexelGatherOffset; + + /// + /// MinInterpolationOffset + /// + [FieldOffset(352)] + public float MinInterpolationOffset; + + /// + /// MaxInterpolationOffset + /// + [FieldOffset(356)] + public float MaxInterpolationOffset; + + /// + /// SubPixelInterpolationOffsetBits + /// + [FieldOffset(360)] + public int SubPixelInterpolationOffsetBits; + + /// + /// MaxFramebufferWidth + /// + [FieldOffset(364)] + public int MaxFramebufferWidth; + + /// + /// MaxFramebufferHeight + /// + [FieldOffset(368)] + public int MaxFramebufferHeight; + + /// + /// MaxFramebufferLayers + /// + [FieldOffset(372)] + public int MaxFramebufferLayers; + + /// + /// FramebufferColorSampleCounts + /// + [FieldOffset(376)] + public VkSampleCountFlags FramebufferColorSampleCounts; + + /// + /// FramebufferDepthSampleCounts + /// + [FieldOffset(380)] + public VkSampleCountFlags FramebufferDepthSampleCounts; + + /// + /// FramebufferStencilSampleCounts + /// + [FieldOffset(384)] + public VkSampleCountFlags FramebufferStencilSampleCounts; + + /// + /// FramebufferNoAttachmentsSampleCounts + /// + [FieldOffset(388)] + public VkSampleCountFlags FramebufferNoAttachmentsSampleCounts; + + /// + /// MaxColorAttachments + /// + [FieldOffset(392)] + public int MaxColorAttachments; + + /// + /// SampledImageColorSampleCounts + /// + [FieldOffset(396)] + public VkSampleCountFlags SampledImageColorSampleCounts; + + /// + /// SampledImageIntegerSampleCounts + /// + [FieldOffset(400)] + public VkSampleCountFlags SampledImageIntegerSampleCounts; + + /// + /// SampledImageDepthSampleCounts + /// + [FieldOffset(404)] + public VkSampleCountFlags SampledImageDepthSampleCounts; + + /// + /// SampledImageStencilSampleCounts + /// + [FieldOffset(408)] + public VkSampleCountFlags SampledImageStencilSampleCounts; + + /// + /// StorageImageSampleCounts + /// + [FieldOffset(412)] + public VkSampleCountFlags StorageImageSampleCounts; + + /// + /// MaxSampleMaskWords + /// + [FieldOffset(416)] + public int MaxSampleMaskWords; + + /// + /// TimestampComputeAndGraphics + /// + [FieldOffset(420)] + public Brutal.Bool32 TimestampComputeAndGraphics; + + /// + /// TimestampPeriod + /// + [FieldOffset(424)] + public float TimestampPeriod; + + /// + /// MaxClipDistances + /// + [FieldOffset(428)] + public int MaxClipDistances; + + /// + /// MaxCullDistances + /// + [FieldOffset(432)] + public int MaxCullDistances; + + /// + /// MaxCombinedClipAndCullDistances + /// + [FieldOffset(436)] + public int MaxCombinedClipAndCullDistances; + + /// + /// DiscreteQueuePriorities + /// + [FieldOffset(440)] + public int DiscreteQueuePriorities; + + /// + /// PointSizeRange + /// + [FieldOffset(444)] + public float2 PointSizeRange; + + /// + /// LineWidthRange + /// + [FieldOffset(452)] + public float2 LineWidthRange; + + /// + /// PointSizeGranularity + /// + [FieldOffset(460)] + public float PointSizeGranularity; + + /// + /// LineWidthGranularity + /// + [FieldOffset(464)] + public float LineWidthGranularity; + + /// + /// StrictLines + /// + [FieldOffset(468)] + public Brutal.Bool32 StrictLines; + + /// + /// StandardSampleLocations + /// + [FieldOffset(472)] + public Brutal.Bool32 StandardSampleLocations; + + /// + /// OptimalBufferCopyOffsetAlignment + /// + [FieldOffset(480)] + public ByteSize64 OptimalBufferCopyOffsetAlignment; + + /// + /// OptimalBufferCopyRowPitchAlignment + /// + [FieldOffset(488)] + public ByteSize64 OptimalBufferCopyRowPitchAlignment; + + /// + /// NonCoherentAtomSize + /// + [FieldOffset(496)] + public ByteSize64 NonCoherentAtomSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationFeatures.gen.cs new file mode 100644 index 0000000..86d0b0d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationFeatures.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLineRasterizationFeatures - Structure describing the line rasterization features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceLineRasterizationFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceLineRasterizationFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rectangularLines; + /// VkBool32 bresenhamLines; + /// VkBool32 smoothLines; + /// VkBool32 stippledRectangularLines; + /// VkBool32 stippledBresenhamLines; + /// VkBool32 stippledSmoothLines; + /// } VkPhysicalDeviceLineRasterizationFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceLineRasterizationFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLineRasterizationFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RectangularLines + /// + [FieldOffset(16)] + public Brutal.Bool32 RectangularLines; + + /// + /// BresenhamLines + /// + [FieldOffset(20)] + public Brutal.Bool32 BresenhamLines; + + /// + /// SmoothLines + /// + [FieldOffset(24)] + public Brutal.Bool32 SmoothLines; + + /// + /// StippledRectangularLines + /// + [FieldOffset(28)] + public Brutal.Bool32 StippledRectangularLines; + + /// + /// StippledBresenhamLines + /// + [FieldOffset(32)] + public Brutal.Bool32 StippledBresenhamLines; + + /// + /// StippledSmoothLines + /// + [FieldOffset(36)] + public Brutal.Bool32 StippledSmoothLines; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationProperties.gen.cs new file mode 100644 index 0000000..b3f5e7b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLineRasterizationProperties.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLineRasterizationProperties - Structure describing line rasterization properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceLineRasterizationProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceLineRasterizationProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t lineSubPixelPrecisionBits; + /// } VkPhysicalDeviceLineRasterizationProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceLineRasterizationProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLineRasterizationProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LineSubPixelPrecisionBits + /// + [FieldOffset(16)] + public int LineSubPixelPrecisionBits; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.gen.cs new file mode 100644 index 0000000..518fd3e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceLinearColorAttachmentFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceLinearColorAttachmentFeaturesNV - Structure describing whether &lt;&lt;glossary-linear-color-attachment, Linear Color Attachment&gt;&gt; rendering is supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceLinearColorAttachmentFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_linear_color_attachment + /// typedef struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 linearColorAttachment; + /// } VkPhysicalDeviceLinearColorAttachmentFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceLinearColorAttachmentFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LinearColorAttachment + /// + [FieldOffset(16)] + public Brutal.Bool32 LinearColorAttachment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10FeaturesKHR.gen.cs new file mode 100644 index 0000000..3599a63 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance10FeaturesKHR - Structure describing whether the implementation supports maintenance10 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance10FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef struct VkPhysicalDeviceMaintenance10FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance10; + /// } VkPhysicalDeviceMaintenance10FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance10FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance10FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance10 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance10; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10PropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10PropertiesKHR.gen.cs new file mode 100644 index 0000000..a274dd7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance10PropertiesKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance10PropertiesKHR - Structure describing various implementation-defined properties introduced with VK_KHR_maintenance10 + /// + /// + /// + /// The VkPhysicalDeviceMaintenance10PropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef struct VkPhysicalDeviceMaintenance10PropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rgba4OpaqueBlackSwizzled; + /// VkBool32 resolveSrgbFormatAppliesTransferFunction; + /// VkBool32 resolveSrgbFormatSupportsTransferFunctionControl; + /// } VkPhysicalDeviceMaintenance10PropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceMaintenance10PropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance10PropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Rgba4OpaqueBlackSwizzled + /// + [FieldOffset(16)] + public Brutal.Bool32 Rgba4OpaqueBlackSwizzled; + + /// + /// ResolveSrgbFormatAppliesTransferFunction + /// + [FieldOffset(20)] + public Brutal.Bool32 ResolveSrgbFormatAppliesTransferFunction; + + /// + /// ResolveSrgbFormatSupportsTransferFunctionControl + /// + [FieldOffset(24)] + public Brutal.Bool32 ResolveSrgbFormatSupportsTransferFunctionControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance11FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance11FeaturesKHR.gen.cs new file mode 100644 index 0000000..4e4efca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance11FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance11FeaturesKHR - Structure describing whether the implementation supports maintenance11 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance11FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance11 + /// typedef struct VkPhysicalDeviceMaintenance11FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance11; + /// } VkPhysicalDeviceMaintenance11FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance11FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance11FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance11 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance11; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance3Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance3Properties.gen.cs new file mode 100644 index 0000000..76d87c8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance3Properties.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance3Properties - Structure describing descriptor set properties + /// + /// + /// + /// The VkPhysicalDeviceMaintenance3Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceMaintenance3Properties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxPerSetDescriptors; + /// VkDeviceSize maxMemoryAllocationSize; + /// } VkPhysicalDeviceMaintenance3Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceMaintenance3Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance3Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPerSetDescriptors + /// + [FieldOffset(16)] + public int MaxPerSetDescriptors; + + /// + /// MaxMemoryAllocationSize + /// + [FieldOffset(24)] + public ByteSize64 MaxMemoryAllocationSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Features.gen.cs new file mode 100644 index 0000000..d73fe7f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Features.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance4Features - Structure describing whether the implementation supports maintenance4 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance4Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceMaintenance4Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance4; + /// } VkPhysicalDeviceMaintenance4Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance4Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance4Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance4 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance4; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Properties.gen.cs new file mode 100644 index 0000000..c22b695 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance4Properties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance4Properties - Structure describing various implementation-defined properties introduced with VK_KHR_maintenance4 + /// + /// + /// + /// The VkPhysicalDeviceMaintenance4Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceMaintenance4Properties { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize maxBufferSize; + /// } VkPhysicalDeviceMaintenance4Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance4Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance4Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxBufferSize + /// + [FieldOffset(16)] + public ByteSize64 MaxBufferSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Features.gen.cs new file mode 100644 index 0000000..119a9a5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Features.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance5Features - Structure describing whether the implementation supports maintenance5 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance5Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceMaintenance5Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance5; + /// } VkPhysicalDeviceMaintenance5Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance5Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance5Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance5 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance5; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Properties.gen.cs new file mode 100644 index 0000000..6f71311 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance5Properties.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance5Properties - Structure describing various implementation-defined properties introduced with VK_KHR_maintenance5 + /// + /// + /// + /// The VkPhysicalDeviceMaintenance5Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceMaintenance5Properties { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; + /// VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; + /// VkBool32 depthStencilSwizzleOneSupport; + /// VkBool32 polygonModePointSize; + /// VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; + /// VkBool32 nonStrictWideLinesUseParallelogram; + /// } VkPhysicalDeviceMaintenance5Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceMaintenance5Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance5Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// EarlyFragmentMultisampleCoverageAfterSampleCounting + /// + [FieldOffset(16)] + public Brutal.Bool32 EarlyFragmentMultisampleCoverageAfterSampleCounting; + + /// + /// EarlyFragmentSampleMaskTestBeforeSampleCounting + /// + [FieldOffset(20)] + public Brutal.Bool32 EarlyFragmentSampleMaskTestBeforeSampleCounting; + + /// + /// DepthStencilSwizzleOneSupport + /// + [FieldOffset(24)] + public Brutal.Bool32 DepthStencilSwizzleOneSupport; + + /// + /// PolygonModePointSize + /// + [FieldOffset(28)] + public Brutal.Bool32 PolygonModePointSize; + + /// + /// NonStrictSinglePixelWideLinesUseParallelogram + /// + [FieldOffset(32)] + public Brutal.Bool32 NonStrictSinglePixelWideLinesUseParallelogram; + + /// + /// NonStrictWideLinesUseParallelogram + /// + [FieldOffset(36)] + public Brutal.Bool32 NonStrictWideLinesUseParallelogram; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Features.gen.cs new file mode 100644 index 0000000..029d146 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Features.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance6Features - Structure describing whether the implementation supports maintenance6 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance6Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceMaintenance6Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance6; + /// } VkPhysicalDeviceMaintenance6Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance6Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance6Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance6 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance6; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Properties.gen.cs new file mode 100644 index 0000000..2920647 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance6Properties.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance6Properties - Structure describing various implementation-defined properties introduced with VK_KHR_maintenance6 + /// + /// + /// + /// The VkPhysicalDeviceMaintenance6Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceMaintenance6Properties { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 blockTexelViewCompatibleMultipleLayers; + /// uint32_t maxCombinedImageSamplerDescriptorCount; + /// VkBool32 fragmentShadingRateClampCombinerInputs; + /// } VkPhysicalDeviceMaintenance6Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceMaintenance6Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance6Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BlockTexelViewCompatibleMultipleLayers + /// + [FieldOffset(16)] + public Brutal.Bool32 BlockTexelViewCompatibleMultipleLayers; + + /// + /// MaxCombinedImageSamplerDescriptorCount + /// + [FieldOffset(20)] + public int MaxCombinedImageSamplerDescriptorCount; + + /// + /// FragmentShadingRateClampCombinerInputs + /// + [FieldOffset(24)] + public Brutal.Bool32 FragmentShadingRateClampCombinerInputs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7FeaturesKHR.gen.cs new file mode 100644 index 0000000..8486435 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance7FeaturesKHR - Structure describing whether the implementation supports maintenance7 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance7FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance7 + /// typedef struct VkPhysicalDeviceMaintenance7FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance7; + /// } VkPhysicalDeviceMaintenance7FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance7FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance7FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance7 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance7; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7PropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7PropertiesKHR.gen.cs new file mode 100644 index 0000000..c89a9f2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance7PropertiesKHR.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance7PropertiesKHR - Structure describing various implementation-defined properties introduced with VK_KHR_maintenance7 + /// + /// + /// + /// The VkPhysicalDeviceMaintenance7PropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance7 + /// typedef struct VkPhysicalDeviceMaintenance7PropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 robustFragmentShadingRateAttachmentAccess; + /// VkBool32 separateDepthStencilAttachmentAccess; + /// uint32_t maxDescriptorSetTotalUniformBuffersDynamic; + /// uint32_t maxDescriptorSetTotalStorageBuffersDynamic; + /// uint32_t maxDescriptorSetTotalBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic; + /// } VkPhysicalDeviceMaintenance7PropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceMaintenance7PropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance7PropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RobustFragmentShadingRateAttachmentAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 RobustFragmentShadingRateAttachmentAccess; + + /// + /// SeparateDepthStencilAttachmentAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 SeparateDepthStencilAttachmentAccess; + + /// + /// MaxDescriptorSetTotalUniformBuffersDynamic + /// + [FieldOffset(24)] + public int MaxDescriptorSetTotalUniformBuffersDynamic; + + /// + /// MaxDescriptorSetTotalStorageBuffersDynamic + /// + [FieldOffset(28)] + public int MaxDescriptorSetTotalStorageBuffersDynamic; + + /// + /// MaxDescriptorSetTotalBuffersDynamic + /// + [FieldOffset(32)] + public int MaxDescriptorSetTotalBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic + /// + [FieldOffset(36)] + public int MaxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic + /// + [FieldOffset(40)] + public int MaxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindTotalBuffersDynamic + /// + [FieldOffset(44)] + public int MaxDescriptorSetUpdateAfterBindTotalBuffersDynamic; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance8FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance8FeaturesKHR.gen.cs new file mode 100644 index 0000000..b5ace0f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance8FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance8FeaturesKHR - Structure describing whether the implementation supports maintenance8 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance8FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance8 + /// typedef struct VkPhysicalDeviceMaintenance8FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance8; + /// } VkPhysicalDeviceMaintenance8FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance8FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance8FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance8 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance8; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9FeaturesKHR.gen.cs new file mode 100644 index 0000000..179d945 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance9FeaturesKHR - Structure describing whether the implementation supports maintenance9 functionality + /// + /// + /// + /// The VkPhysicalDeviceMaintenance9FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance9 + /// typedef struct VkPhysicalDeviceMaintenance9FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 maintenance9; + /// } VkPhysicalDeviceMaintenance9FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance9FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance9FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Maintenance9 + /// + [FieldOffset(16)] + public Brutal.Bool32 Maintenance9; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9PropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9PropertiesKHR.gen.cs new file mode 100644 index 0000000..0d3054f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMaintenance9PropertiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMaintenance9PropertiesKHR - Structure describing various implementation-defined properties introduced with VK_KHR_maintenance9 + /// + /// + /// + /// The VkPhysicalDeviceMaintenance9PropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance9 + /// typedef struct VkPhysicalDeviceMaintenance9PropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 image2DViewOf3DSparse; + /// VkDefaultVertexAttributeValueKHR defaultVertexAttributeValue; + /// } VkPhysicalDeviceMaintenance9PropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMaintenance9PropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMaintenance9PropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Image2DViewOf3DSparse + /// + [FieldOffset(16)] + public Brutal.Bool32 Image2DViewOf3DSparse; + + /// + /// DefaultVertexAttributeValue + /// + [FieldOffset(20)] + public VkDefaultVertexAttributeValueKHR DefaultVertexAttributeValue; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.gen.cs new file mode 100644 index 0000000..36e5ce9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedFeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMapMemoryPlacedFeaturesEXT - Structure describing placed memory map features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMapMemoryPlacedFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_map_memory_placed + /// typedef struct VkPhysicalDeviceMapMemoryPlacedFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 memoryMapPlaced; + /// VkBool32 memoryMapRangePlaced; + /// VkBool32 memoryUnmapReserve; + /// } VkPhysicalDeviceMapMemoryPlacedFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceMapMemoryPlacedFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMapMemoryPlacedFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryMapPlaced + /// + [FieldOffset(16)] + public Brutal.Bool32 MemoryMapPlaced; + + /// + /// MemoryMapRangePlaced + /// + [FieldOffset(20)] + public Brutal.Bool32 MemoryMapRangePlaced; + + /// + /// MemoryUnmapReserve + /// + [FieldOffset(24)] + public Brutal.Bool32 MemoryUnmapReserve; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.gen.cs new file mode 100644 index 0000000..75a557e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMapMemoryPlacedPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMapMemoryPlacedPropertiesEXT - Structure describing the alignment requirements of placed memory maps for a physical device + /// + /// + /// + /// The VkPhysicalDeviceMapMemoryPlacedPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_map_memory_placed + /// typedef struct VkPhysicalDeviceMapMemoryPlacedPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize minPlacedMemoryMapAlignment; + /// } VkPhysicalDeviceMapMemoryPlacedPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMapMemoryPlacedPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMapMemoryPlacedPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinPlacedMemoryMapAlignment + /// + [FieldOffset(16)] + public ByteSize64 MinPlacedMemoryMapAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs new file mode 100644 index 0000000..470627d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryBudgetPropertiesEXT.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMemoryBudgetPropertiesEXT - Structure specifying physical device memory budget and usage + /// + /// + /// + /// If the VkPhysicalDeviceMemoryBudgetPropertiesEXT structure is included + /// in the pNext chain of VkPhysicalDeviceMemoryProperties2, it is + /// filled with the current memory budgets and usages. + /// + /// + /// The VkPhysicalDeviceMemoryBudgetPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_memory_budget + /// typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize heapBudget[VK_MAX_MEMORY_HEAPS]; + /// VkDeviceSize heapUsage[VK_MAX_MEMORY_HEAPS]; + /// } VkPhysicalDeviceMemoryBudgetPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 272)] + public unsafe partial struct VkPhysicalDeviceMemoryBudgetPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMemoryBudgetPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HeapBudget is an array of VK_MAX_MEMORY_HEAPS basetype:VkDeviceSize values in which memory budgets are returned, with one element for each memory heap. A heap's budget is a rough estimate of how much memory the process can allocate from that heap before allocations may: fail or cause performance degradation. The budget includes any currently allocated device memory. + /// + [FieldOffset(16)] + public ByteSize64_16 HeapBudget; + + /// + /// HeapUsage is an array of VK_MAX_MEMORY_HEAPS basetype:VkDeviceSize values in which memory usages are returned, with one element for each memory heap. A heap's usage is an estimate of how much memory the process is currently using in that heap. + /// + [FieldOffset(144)] + public ByteSize64_16 HeapUsage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionFeaturesEXT.gen.cs new file mode 100644 index 0000000..eb2a8b4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMemoryDecompressionFeaturesEXT - Structure describing if memory decompression is supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMemoryDecompressionFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// typedef struct VkPhysicalDeviceMemoryDecompressionFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 memoryDecompression; + /// } VkPhysicalDeviceMemoryDecompressionFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMemoryDecompressionFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMemoryDecompressionFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryDecompression + /// + [FieldOffset(16)] + public Brutal.Bool32 MemoryDecompression; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionPropertiesEXT.gen.cs new file mode 100644 index 0000000..efe1c65 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryDecompressionPropertiesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMemoryDecompressionPropertiesEXT - Structure describing supported memory decompression methods by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMemoryDecompressionPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_memory_decompression + /// typedef struct VkPhysicalDeviceMemoryDecompressionPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkMemoryDecompressionMethodFlagsEXT decompressionMethods; + /// uint64_t maxDecompressionIndirectCount; + /// } VkPhysicalDeviceMemoryDecompressionPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceMemoryDecompressionPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMemoryDecompressionPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DecompressionMethods is a bitmask of VkMemoryDecompressionMethodFlagsEXT specifying memory decompression methods supported by the implementation. + /// + [FieldOffset(16)] + public VkMemoryDecompressionMethodFlagsEXT DecompressionMethods; + + /// + /// MaxDecompressionIndirectCount specifies the maximum supported count value identified by either vkCmdDecompressMemoryIndirectCountEXT::maxDecompressionCount or the value specified in vkCmdDecompressMemoryIndirectCountEXT::indirectCommandsCountAddress + /// + [FieldOffset(24)] + public nint MaxDecompressionIndirectCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryPriorityFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryPriorityFeaturesEXT.gen.cs new file mode 100644 index 0000000..883b1f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryPriorityFeaturesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMemoryPriorityFeaturesEXT - Structure describing memory priority features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMemoryPriorityFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_memory_priority + /// typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 memoryPriority; + /// } VkPhysicalDeviceMemoryPriorityFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMemoryPriorityFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMemoryPriorityFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryPriority + /// + [FieldOffset(16)] + public Brutal.Bool32 MemoryPriority; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties.gen.cs new file mode 100644 index 0000000..11a8540 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMemoryProperties - Structure specifying physical device memory properties + /// + /// + /// + /// The VkPhysicalDeviceMemoryProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPhysicalDeviceMemoryProperties { + /// uint32_t memoryTypeCount; + /// VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]; + /// uint32_t memoryHeapCount; + /// VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; + /// } VkPhysicalDeviceMemoryProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 520)] + public partial struct VkPhysicalDeviceMemoryProperties() + { + /// + /// MemoryTypeCount is the number of valid elements in the memoryTypes array. + /// + [FieldOffset(0)] + public int MemoryTypeCount; + + /// + /// MemoryTypes is an array of VK_MAX_MEMORY_TYPES VkMemoryType structures describing the memory types that can be used to access memory allocated from the heaps specified by memoryHeaps. + /// + [FieldOffset(4)] + public VkMemoryType_32 MemoryTypes; + + /// + /// MemoryHeapCount is the number of valid elements in the memoryHeaps array. + /// + [FieldOffset(260)] + public int MemoryHeapCount; + + /// + /// MemoryHeaps is an array of VK_MAX_MEMORY_HEAPS VkMemoryHeap structures describing the memory heaps from which memory can be allocated. + /// + [FieldOffset(264)] + public VkMemoryHeap_16 MemoryHeaps; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties2.gen.cs new file mode 100644 index 0000000..29a8922 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMemoryProperties2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMemoryProperties2 - Structure specifying physical device memory properties + /// + /// + /// + /// The VkPhysicalDeviceMemoryProperties2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceMemoryProperties2 { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceMemoryProperties memoryProperties; + /// } VkPhysicalDeviceMemoryProperties2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 536)] + public unsafe partial struct VkPhysicalDeviceMemoryProperties2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMemoryProperties2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryProperties is a VkPhysicalDeviceMemoryProperties structure which is populated with the same values as in vkGetPhysicalDeviceMemoryProperties. + /// + [FieldOffset(16)] + public VkPhysicalDeviceMemoryProperties MemoryProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesEXT.gen.cs new file mode 100644 index 0000000..e849b2d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesEXT.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMeshShaderFeaturesEXT - Structure describing mesh shading features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMeshShaderFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_mesh_shader + /// typedef struct VkPhysicalDeviceMeshShaderFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 taskShader; + /// VkBool32 meshShader; + /// VkBool32 multiviewMeshShader; + /// VkBool32 primitiveFragmentShadingRateMeshShader; + /// VkBool32 meshShaderQueries; + /// } VkPhysicalDeviceMeshShaderFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceMeshShaderFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMeshShaderFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TaskShader + /// + [FieldOffset(16)] + public Brutal.Bool32 TaskShader; + + /// + /// MeshShader + /// + [FieldOffset(20)] + public Brutal.Bool32 MeshShader; + + /// + /// MultiviewMeshShader + /// + [FieldOffset(24)] + public Brutal.Bool32 MultiviewMeshShader; + + /// + /// PrimitiveFragmentShadingRateMeshShader + /// + [FieldOffset(28)] + public Brutal.Bool32 PrimitiveFragmentShadingRateMeshShader; + + /// + /// MeshShaderQueries + /// + [FieldOffset(32)] + public Brutal.Bool32 MeshShaderQueries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesNV.gen.cs new file mode 100644 index 0000000..682da42 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderFeaturesNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMeshShaderFeaturesNV - Structure describing mesh shading features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMeshShaderFeaturesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_mesh_shader + /// typedef struct VkPhysicalDeviceMeshShaderFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 taskShader; + /// VkBool32 meshShader; + /// } VkPhysicalDeviceMeshShaderFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMeshShaderFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMeshShaderFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TaskShader + /// + [FieldOffset(16)] + public Brutal.Bool32 TaskShader; + + /// + /// MeshShader + /// + [FieldOffset(20)] + public Brutal.Bool32 MeshShader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesEXT.gen.cs new file mode 100644 index 0000000..b0d456e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesEXT.gen.cs @@ -0,0 +1,229 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMeshShaderPropertiesEXT - Structure describing mesh shading properties + /// + /// + /// + /// The VkPhysicalDeviceMeshShaderPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_mesh_shader + /// typedef struct VkPhysicalDeviceMeshShaderPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxTaskWorkGroupTotalCount; + /// uint32_t maxTaskWorkGroupCount[3]; + /// uint32_t maxTaskWorkGroupInvocations; + /// uint32_t maxTaskWorkGroupSize[3]; + /// uint32_t maxTaskPayloadSize; + /// uint32_t maxTaskSharedMemorySize; + /// uint32_t maxTaskPayloadAndSharedMemorySize; + /// uint32_t maxMeshWorkGroupTotalCount; + /// uint32_t maxMeshWorkGroupCount[3]; + /// uint32_t maxMeshWorkGroupInvocations; + /// uint32_t maxMeshWorkGroupSize[3]; + /// uint32_t maxMeshSharedMemorySize; + /// uint32_t maxMeshPayloadAndSharedMemorySize; + /// uint32_t maxMeshOutputMemorySize; + /// uint32_t maxMeshPayloadAndOutputMemorySize; + /// uint32_t maxMeshOutputComponents; + /// uint32_t maxMeshOutputVertices; + /// uint32_t maxMeshOutputPrimitives; + /// uint32_t maxMeshOutputLayers; + /// uint32_t maxMeshMultiviewViewCount; + /// uint32_t meshOutputPerVertexGranularity; + /// uint32_t meshOutputPerPrimitiveGranularity; + /// uint32_t maxPreferredTaskWorkGroupInvocations; + /// uint32_t maxPreferredMeshWorkGroupInvocations; + /// VkBool32 prefersLocalInvocationVertexOutput; + /// VkBool32 prefersLocalInvocationPrimitiveOutput; + /// VkBool32 prefersCompactVertexOutput; + /// VkBool32 prefersCompactPrimitiveOutput; + /// } VkPhysicalDeviceMeshShaderPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 160)] + public unsafe partial struct VkPhysicalDeviceMeshShaderPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMeshShaderPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxTaskWorkGroupTotalCount + /// + [FieldOffset(16)] + public int MaxTaskWorkGroupTotalCount; + + /// + /// MaxTaskWorkGroupCount + /// + [FieldOffset(20)] + public uint3 MaxTaskWorkGroupCount; + + /// + /// MaxTaskWorkGroupInvocations + /// + [FieldOffset(32)] + public int MaxTaskWorkGroupInvocations; + + /// + /// MaxTaskWorkGroupSize + /// + [FieldOffset(36)] + public uint3 MaxTaskWorkGroupSize; + + /// + /// MaxTaskPayloadSize + /// + [FieldOffset(48)] + public int MaxTaskPayloadSize; + + /// + /// MaxTaskSharedMemorySize + /// + [FieldOffset(52)] + public int MaxTaskSharedMemorySize; + + /// + /// MaxTaskPayloadAndSharedMemorySize + /// + [FieldOffset(56)] + public int MaxTaskPayloadAndSharedMemorySize; + + /// + /// MaxMeshWorkGroupTotalCount + /// + [FieldOffset(60)] + public int MaxMeshWorkGroupTotalCount; + + /// + /// MaxMeshWorkGroupCount + /// + [FieldOffset(64)] + public uint3 MaxMeshWorkGroupCount; + + /// + /// MaxMeshWorkGroupInvocations + /// + [FieldOffset(76)] + public int MaxMeshWorkGroupInvocations; + + /// + /// MaxMeshWorkGroupSize + /// + [FieldOffset(80)] + public uint3 MaxMeshWorkGroupSize; + + /// + /// MaxMeshSharedMemorySize + /// + [FieldOffset(92)] + public int MaxMeshSharedMemorySize; + + /// + /// MaxMeshPayloadAndSharedMemorySize + /// + [FieldOffset(96)] + public int MaxMeshPayloadAndSharedMemorySize; + + /// + /// MaxMeshOutputMemorySize + /// + [FieldOffset(100)] + public int MaxMeshOutputMemorySize; + + /// + /// MaxMeshPayloadAndOutputMemorySize + /// + [FieldOffset(104)] + public int MaxMeshPayloadAndOutputMemorySize; + + /// + /// MaxMeshOutputComponents + /// + [FieldOffset(108)] + public int MaxMeshOutputComponents; + + /// + /// MaxMeshOutputVertices + /// + [FieldOffset(112)] + public int MaxMeshOutputVertices; + + /// + /// MaxMeshOutputPrimitives + /// + [FieldOffset(116)] + public int MaxMeshOutputPrimitives; + + /// + /// MaxMeshOutputLayers + /// + [FieldOffset(120)] + public int MaxMeshOutputLayers; + + /// + /// MaxMeshMultiviewViewCount + /// + [FieldOffset(124)] + public int MaxMeshMultiviewViewCount; + + /// + /// MeshOutputPerVertexGranularity + /// + [FieldOffset(128)] + public int MeshOutputPerVertexGranularity; + + /// + /// MeshOutputPerPrimitiveGranularity + /// + [FieldOffset(132)] + public int MeshOutputPerPrimitiveGranularity; + + /// + /// MaxPreferredTaskWorkGroupInvocations + /// + [FieldOffset(136)] + public int MaxPreferredTaskWorkGroupInvocations; + + /// + /// MaxPreferredMeshWorkGroupInvocations + /// + [FieldOffset(140)] + public int MaxPreferredMeshWorkGroupInvocations; + + /// + /// PrefersLocalInvocationVertexOutput + /// + [FieldOffset(144)] + public Brutal.Bool32 PrefersLocalInvocationVertexOutput; + + /// + /// PrefersLocalInvocationPrimitiveOutput + /// + [FieldOffset(148)] + public Brutal.Bool32 PrefersLocalInvocationPrimitiveOutput; + + /// + /// PrefersCompactVertexOutput + /// + [FieldOffset(152)] + public Brutal.Bool32 PrefersCompactVertexOutput; + + /// + /// PrefersCompactPrimitiveOutput + /// + [FieldOffset(156)] + public Brutal.Bool32 PrefersCompactPrimitiveOutput; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesNV.gen.cs new file mode 100644 index 0000000..08c9c9d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMeshShaderPropertiesNV.gen.cs @@ -0,0 +1,124 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMeshShaderPropertiesNV - Structure describing mesh shading properties + /// + /// + /// + /// The VkPhysicalDeviceMeshShaderPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_mesh_shader + /// typedef struct VkPhysicalDeviceMeshShaderPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxDrawMeshTasksCount; + /// uint32_t maxTaskWorkGroupInvocations; + /// uint32_t maxTaskWorkGroupSize[3]; + /// uint32_t maxTaskTotalMemorySize; + /// uint32_t maxTaskOutputCount; + /// uint32_t maxMeshWorkGroupInvocations; + /// uint32_t maxMeshWorkGroupSize[3]; + /// uint32_t maxMeshTotalMemorySize; + /// uint32_t maxMeshOutputVertices; + /// uint32_t maxMeshOutputPrimitives; + /// uint32_t maxMeshMultiviewViewCount; + /// uint32_t meshOutputPerVertexGranularity; + /// uint32_t meshOutputPerPrimitiveGranularity; + /// } VkPhysicalDeviceMeshShaderPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkPhysicalDeviceMeshShaderPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMeshShaderPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxDrawMeshTasksCount is the maximum number of local workgroups that can be launched by a single draw mesh tasks command. See here. + /// + [FieldOffset(16)] + public int MaxDrawMeshTasksCount; + + /// + /// MaxTaskWorkGroupInvocations is the maximum total number of task shader invocations in a single local workgroup. The product of the X, Y, and Z sizes, as specified by the LocalSize execution mode in shader modules or by the object decorated by the WorkgroupSize decoration, must be less than or equal to this limit. + /// + [FieldOffset(20)] + public int MaxTaskWorkGroupInvocations; + + /// + /// MaxTaskWorkGroupSize + /// + [FieldOffset(24)] + public uint3 MaxTaskWorkGroupSize; + + /// + /// MaxTaskTotalMemorySize is the maximum number of bytes that the task shader can use in total for shared and output memory combined. + /// + [FieldOffset(36)] + public int MaxTaskTotalMemorySize; + + /// + /// MaxTaskOutputCount is the maximum number of output tasks a single task shader workgroup can emit. + /// + [FieldOffset(40)] + public int MaxTaskOutputCount; + + /// + /// MaxMeshWorkGroupInvocations is the maximum total number of mesh shader invocations in a single local workgroup. The product of the X, Y, and Z sizes, as specified by the LocalSize execution mode in shader modules or by the object decorated by the WorkgroupSize decoration, must be less than or equal to this limit. + /// + [FieldOffset(44)] + public int MaxMeshWorkGroupInvocations; + + /// + /// MaxMeshWorkGroupSize + /// + [FieldOffset(48)] + public uint3 MaxMeshWorkGroupSize; + + /// + /// MaxMeshTotalMemorySize is the maximum number of bytes that the mesh shader can use in total for shared and output memory combined. + /// + [FieldOffset(60)] + public int MaxMeshTotalMemorySize; + + /// + /// MaxMeshOutputVertices is the maximum number of vertices a mesh shader output can store. + /// + [FieldOffset(64)] + public int MaxMeshOutputVertices; + + /// + /// MaxMeshOutputPrimitives is the maximum number of primitives a mesh shader output can store. + /// + [FieldOffset(68)] + public int MaxMeshOutputPrimitives; + + /// + /// MaxMeshMultiviewViewCount is the maximum number of multiview views a mesh shader can use. + /// + [FieldOffset(72)] + public int MaxMeshMultiviewViewCount; + + /// + /// MeshOutputPerVertexGranularity is the granularity with which mesh vertex outputs are allocated. The value can be used to compute the memory size used by the mesh shader, which must be less than or equal to maxMeshTotalMemorySize. + /// + [FieldOffset(76)] + public int MeshOutputPerVertexGranularity; + + /// + /// MeshOutputPerPrimitiveGranularity is the granularity with which mesh outputs qualified as per-primitive are allocated. The value can be used to compute the memory size used by the mesh shader, which must be less than or equal to maxMeshTotalMemorySize. + /// + [FieldOffset(80)] + public int MeshOutputPerPrimitiveGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawFeaturesEXT.gen.cs new file mode 100644 index 0000000..46fcfe1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawFeaturesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiDrawFeaturesEXT - Structure describing whether the implementation supports multi draw functionality + /// + /// + /// + /// The VkPhysicalDeviceMultiDrawFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_multi_draw + /// typedef struct VkPhysicalDeviceMultiDrawFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 multiDraw; + /// } VkPhysicalDeviceMultiDrawFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultiDrawFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiDrawFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MultiDraw + /// + [FieldOffset(16)] + public Brutal.Bool32 MultiDraw; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawPropertiesEXT.gen.cs new file mode 100644 index 0000000..213763c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiDrawPropertiesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiDrawPropertiesEXT - Structure describing multidraw limits of an implementation + /// + /// + /// + /// The VkPhysicalDeviceMultiDrawPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_multi_draw + /// typedef struct VkPhysicalDeviceMultiDrawPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxMultiDrawCount; + /// } VkPhysicalDeviceMultiDrawPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultiDrawPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiDrawPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxMultiDrawCount + /// + [FieldOffset(16)] + public int MaxMultiDrawCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.gen.cs new file mode 100644 index 0000000..262599c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT - Structure describing whether multisampled rendering to single-sampled attachments is supported + /// + /// + /// + /// The VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT + /// structure is defined as: + /// + /// + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// typedef struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 multisampledRenderToSingleSampled; + /// } VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MultisampledRenderToSingleSampled + /// + [FieldOffset(16)] + public Brutal.Bool32 MultisampledRenderToSingleSampled; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT.gen.cs new file mode 100644 index 0000000..23f906d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT - Structure describing whether multisampled rendering to single-sampled attachments is supported on swapchain images + /// + /// + /// + /// The VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_multisampled_render_to_swapchain + /// typedef struct VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 multisampledRenderToSwapchain; + /// } VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceMultisampledRenderToSwapchainFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MultisampledRenderToSwapchain + /// + [FieldOffset(16)] + public Brutal.Bool32 MultisampledRenderToSwapchain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewFeatures.gen.cs new file mode 100644 index 0000000..930332a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewFeatures.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiviewFeatures - Structure describing multiview features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMultiviewFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceMultiviewFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 multiview; + /// VkBool32 multiviewGeometryShader; + /// VkBool32 multiviewTessellationShader; + /// } VkPhysicalDeviceMultiviewFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceMultiviewFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiviewFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Multiview + /// + [FieldOffset(16)] + public Brutal.Bool32 Multiview; + + /// + /// MultiviewGeometryShader + /// + [FieldOffset(20)] + public Brutal.Bool32 MultiviewGeometryShader; + + /// + /// MultiviewTessellationShader + /// + [FieldOffset(24)] + public Brutal.Bool32 MultiviewTessellationShader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.gen.cs new file mode 100644 index 0000000..1dfa5d8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX - Structure describing multiview limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX structure + /// is defined as: + /// + /// + /// // Provided by VK_NVX_multiview_per_view_attributes + /// typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 perViewPositionAllComponents; + /// } VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerViewPositionAllComponents + /// + [FieldOffset(16)] + public Brutal.Bool32 PerViewPositionAllComponents; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.gen.cs new file mode 100644 index 0000000..16dde54 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM - Structure describing multiview per view render areas features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM structure + /// is defined as: + /// + /// + /// // Provided by VK_QCOM_multiview_per_view_render_areas + /// typedef struct VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 multiviewPerViewRenderAreas; + /// } VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MultiviewPerViewRenderAreas + /// + [FieldOffset(16)] + public Brutal.Bool32 MultiviewPerViewRenderAreas; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.gen.cs new file mode 100644 index 0000000..cebbc9f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM - Structure describing multiview per view viewports features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM structure is + /// defined as: + /// + /// + /// // Provided by VK_QCOM_multiview_per_view_viewports + /// typedef struct VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 multiviewPerViewViewports; + /// } VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MultiviewPerViewViewports + /// + [FieldOffset(16)] + public Brutal.Bool32 MultiviewPerViewViewports; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewProperties.gen.cs new file mode 100644 index 0000000..caffc0f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMultiviewProperties.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMultiviewProperties - Structure describing multiview limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceMultiviewProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceMultiviewProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxMultiviewViewCount; + /// uint32_t maxMultiviewInstanceIndex; + /// } VkPhysicalDeviceMultiviewProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMultiviewProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMultiviewProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxMultiviewViewCount + /// + [FieldOffset(16)] + public int MaxMultiviewViewCount; + + /// + /// MaxMultiviewInstanceIndex + /// + [FieldOffset(20)] + public int MaxMultiviewInstanceIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.gen.cs new file mode 100644 index 0000000..da8b797 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT - Structure describing whether the mutable descriptor type is supported + /// + /// + /// + /// The VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_mutable_descriptor_type + /// typedef struct VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 mutableDescriptorType; + /// } VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceMutableDescriptorTypeFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MutableDescriptorType + /// + [FieldOffset(16)] + public Brutal.Bool32 MutableDescriptorType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.gen.cs new file mode 100644 index 0000000..f3dcca9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferFeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceNestedCommandBufferFeaturesEXT - Structure describing whether nested command buffers are supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceNestedCommandBufferFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_nested_command_buffer + /// typedef struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 nestedCommandBuffer; + /// VkBool32 nestedCommandBufferRendering; + /// VkBool32 nestedCommandBufferSimultaneousUse; + /// } VkPhysicalDeviceNestedCommandBufferFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceNestedCommandBufferFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NestedCommandBuffer + /// + [FieldOffset(16)] + public Brutal.Bool32 NestedCommandBuffer; + + /// + /// NestedCommandBufferRendering + /// + [FieldOffset(20)] + public Brutal.Bool32 NestedCommandBufferRendering; + + /// + /// NestedCommandBufferSimultaneousUse + /// + [FieldOffset(24)] + public Brutal.Bool32 NestedCommandBufferSimultaneousUse; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.gen.cs new file mode 100644 index 0000000..eaaa935 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNestedCommandBufferPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceNestedCommandBufferPropertiesEXT - Structure describing the nested command buffer limits of an implementation + /// + /// + /// + /// The VkPhysicalDeviceNestedCommandBufferPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_nested_command_buffer + /// typedef struct VkPhysicalDeviceNestedCommandBufferPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxCommandBufferNestingLevel; + /// } VkPhysicalDeviceNestedCommandBufferPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceNestedCommandBufferPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceNestedCommandBufferPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxCommandBufferNestingLevel + /// + [FieldOffset(16)] + public int MaxCommandBufferNestingLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.gen.cs new file mode 100644 index 0000000..bfb1ea3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT - Structure describing features to disable seamless cube maps + /// + /// + /// + /// The VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_non_seamless_cube_map + /// typedef struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 nonSeamlessCubeMap; + /// } VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceNonSeamlessCubeMapFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NonSeamlessCubeMap + /// + [FieldOffset(16)] + public Brutal.Bool32 NonSeamlessCubeMap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesEXT.gen.cs new file mode 100644 index 0000000..0796e33 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesEXT.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceOpacityMicromapFeaturesEXT - Structure describing the ray tracing opacity micromap features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceOpacityMicromapFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkPhysicalDeviceOpacityMicromapFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 micromap; + /// VkBool32 micromapCaptureReplay; + /// // micromapHostCommands is legacy, but no reason was given in the API XML + /// VkBool32 micromapHostCommands; + /// } VkPhysicalDeviceOpacityMicromapFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceOpacityMicromapFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceOpacityMicromapFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Micromap + /// + [FieldOffset(16)] + public Brutal.Bool32 Micromap; + + /// + /// MicromapCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 MicromapCaptureReplay; + + /// + /// MicromapHostCommands + /// + [FieldOffset(24)] + public Brutal.Bool32 MicromapHostCommands; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesKHR.gen.cs new file mode 100644 index 0000000..f3e95c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceOpacityMicromapFeaturesKHR - Structure describing the ray tracing opacity micromap features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceOpacityMicromapFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef struct VkPhysicalDeviceOpacityMicromapFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 micromap; + /// } VkPhysicalDeviceOpacityMicromapFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceOpacityMicromapFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceOpacityMicromapFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Micromap + /// + [FieldOffset(16)] + public Brutal.Bool32 Micromap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesEXT.gen.cs new file mode 100644 index 0000000..2cbf818 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceOpacityMicromapPropertiesEXT - Structure describing the opacity micromap properties of a physical device + /// + /// + /// + /// The VkPhysicalDeviceOpacityMicromapPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_opacity_micromap + /// typedef struct VkPhysicalDeviceOpacityMicromapPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxOpacity2StateSubdivisionLevel; + /// uint32_t maxOpacity4StateSubdivisionLevel; + /// } VkPhysicalDeviceOpacityMicromapPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceOpacityMicromapPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceOpacityMicromapPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxOpacity2StateSubdivisionLevel + /// + [FieldOffset(16)] + public int MaxOpacity2StateSubdivisionLevel; + + /// + /// MaxOpacity4StateSubdivisionLevel + /// + [FieldOffset(20)] + public int MaxOpacity4StateSubdivisionLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesKHR.gen.cs new file mode 100644 index 0000000..7b9b12b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpacityMicromapPropertiesKHR.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceOpacityMicromapPropertiesKHR - Structure describing the opacity micromap properties of a physical device + /// + /// + /// + /// The VkPhysicalDeviceOpacityMicromapPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_opacity_micromap + /// typedef struct VkPhysicalDeviceOpacityMicromapPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxOpacity2StateSubdivisionLevel; + /// uint32_t maxOpacity4StateSubdivisionLevel; + /// uint32_t maxOpacityLossy4StateSubdivisionLevel; + /// uint64_t maxMicromapTriangles; + /// } VkPhysicalDeviceOpacityMicromapPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceOpacityMicromapPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceOpacityMicromapPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxOpacity2StateSubdivisionLevel + /// + [FieldOffset(16)] + public int MaxOpacity2StateSubdivisionLevel; + + /// + /// MaxOpacity4StateSubdivisionLevel + /// + [FieldOffset(20)] + public int MaxOpacity4StateSubdivisionLevel; + + /// + /// MaxOpacityLossy4StateSubdivisionLevel + /// + [FieldOffset(24)] + public int MaxOpacityLossy4StateSubdivisionLevel; + + /// + /// MaxMicromapTriangles + /// + [FieldOffset(32)] + public nint MaxMicromapTriangles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowFeaturesNV.gen.cs new file mode 100644 index 0000000..f9dc9ca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowFeaturesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceOpticalFlowFeaturesNV - Structure describing the optical flow features supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceOpticalFlowFeaturesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkPhysicalDeviceOpticalFlowFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 opticalFlow; + /// } VkPhysicalDeviceOpticalFlowFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceOpticalFlowFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceOpticalFlowFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OpticalFlow + /// + [FieldOffset(16)] + public Brutal.Bool32 OpticalFlow; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowPropertiesNV.gen.cs new file mode 100644 index 0000000..3fd6114 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceOpticalFlowPropertiesNV.gen.cs @@ -0,0 +1,110 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceOpticalFlowPropertiesNV - Structure describing properties supported by VK_NV_optical_flow + /// + /// + /// + /// The VkPhysicalDeviceOpticalFlowPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_optical_flow + /// typedef struct VkPhysicalDeviceOpticalFlowPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkOpticalFlowGridSizeFlagsNV supportedOutputGridSizes; + /// VkOpticalFlowGridSizeFlagsNV supportedHintGridSizes; + /// VkBool32 hintSupported; + /// VkBool32 costSupported; + /// VkBool32 bidirectionalFlowSupported; + /// VkBool32 globalFlowSupported; + /// uint32_t minWidth; + /// uint32_t minHeight; + /// uint32_t maxWidth; + /// uint32_t maxHeight; + /// uint32_t maxNumRegionsOfInterest; + /// } VkPhysicalDeviceOpticalFlowPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceOpticalFlowPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceOpticalFlowPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedOutputGridSizes + /// + [FieldOffset(16)] + public VkOpticalFlowGridSizeFlagsNV SupportedOutputGridSizes; + + /// + /// SupportedHintGridSizes + /// + [FieldOffset(20)] + public VkOpticalFlowGridSizeFlagsNV SupportedHintGridSizes; + + /// + /// HintSupported + /// + [FieldOffset(24)] + public Brutal.Bool32 HintSupported; + + /// + /// CostSupported + /// + [FieldOffset(28)] + public Brutal.Bool32 CostSupported; + + /// + /// BidirectionalFlowSupported + /// + [FieldOffset(32)] + public Brutal.Bool32 BidirectionalFlowSupported; + + /// + /// GlobalFlowSupported + /// + [FieldOffset(36)] + public Brutal.Bool32 GlobalFlowSupported; + + /// + /// MinWidth + /// + [FieldOffset(40)] + public int MinWidth; + + /// + /// MinHeight + /// + [FieldOffset(44)] + public int MinHeight; + + /// + /// MaxWidth + /// + [FieldOffset(48)] + public int MaxWidth; + + /// + /// MaxHeight + /// + [FieldOffset(52)] + public int MaxHeight; + + /// + /// MaxNumRegionsOfInterest + /// + [FieldOffset(56)] + public int MaxNumRegionsOfInterest; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.gen.cs new file mode 100644 index 0000000..cc60b6a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT - Structure describing whether the implementation supports pageable device-local memory + /// + /// + /// + /// The VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_pageable_device_local_memory + /// typedef struct VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pageableDeviceLocalMemory; + /// } VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PageableDeviceLocalMemory + /// + [FieldOffset(16)] + public Brutal.Bool32 PageableDeviceLocalMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV.gen.cs new file mode 100644 index 0000000..a159b81 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV - Structure describing the ray tracing partitioned top level acceleration structure feature supported by an implementation + /// + /// + /// + /// The VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 partitionedAccelerationStructure; + /// } VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDevicePartitionedAccelerationStructureFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PartitionedAccelerationStructure + /// + [FieldOffset(16)] + public Brutal.Bool32 PartitionedAccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV.gen.cs new file mode 100644 index 0000000..884055f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV - Structure describing properties supported by a partitioned acceleration structure implementation + /// + /// + /// + /// The VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV + /// structure is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxPartitionCount; + /// } VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDevicePartitionedAccelerationStructurePropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPartitionCount + /// + [FieldOffset(16)] + public int MaxPartitionCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePciBusInfoPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePciBusInfoPropertiesEXT.gen.cs new file mode 100644 index 0000000..2bd8161 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePciBusInfoPropertiesEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePCIBusInfoPropertiesEXT - Structure containing PCI bus information of a physical device + /// + /// + /// + /// The VkPhysicalDevicePCIBusInfoPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_pci_bus_info + /// typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t pciDomain; + /// uint32_t pciBus; + /// uint32_t pciDevice; + /// uint32_t pciFunction; + /// } VkPhysicalDevicePCIBusInfoPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevicePciBusInfoPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePciBusInfoPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PciDomain is the PCI bus domain. + /// + [FieldOffset(16)] + public int PciDomain; + + /// + /// PciBus is the PCI bus identifier. + /// + [FieldOffset(20)] + public int PciBus; + + /// + /// PciDevice is the PCI device identifier. + /// + [FieldOffset(24)] + public int PciDevice; + + /// + /// PciFunction is the PCI device function identifier. + /// + [FieldOffset(28)] + public int PciFunction; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.gen.cs new file mode 100644 index 0000000..0da5078 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerStageDescriptorSetFeaturesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePerStageDescriptorSetFeaturesNV - Structure describing feature to allow descriptor set layout bindings to be per-stage + /// + /// + /// + /// The VkPhysicalDevicePerStageDescriptorSetFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_per_stage_descriptor_set + /// typedef struct VkPhysicalDevicePerStageDescriptorSetFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 perStageDescriptorSet; + /// VkBool32 dynamicPipelineLayout; + /// } VkPhysicalDevicePerStageDescriptorSetFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePerStageDescriptorSetFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePerStageDescriptorSetFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerStageDescriptorSet + /// + [FieldOffset(16)] + public Brutal.Bool32 PerStageDescriptorSet; + + /// + /// DynamicPipelineLayout + /// + [FieldOffset(20)] + public Brutal.Bool32 DynamicPipelineLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionFeaturesARM.gen.cs new file mode 100644 index 0000000..793912a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePerformanceCountersByRegionFeaturesARM - Structure describing support for VK_ARM_performance_counters_by_region by an implementation + /// + /// + /// + /// The VkPhysicalDevicePerformanceCountersByRegionFeaturesARM structure + /// is defined as: + /// + /// + /// // Provided by VK_ARM_performance_counters_by_region + /// typedef struct VkPhysicalDevicePerformanceCountersByRegionFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 performanceCountersByRegion; + /// } VkPhysicalDevicePerformanceCountersByRegionFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePerformanceCountersByRegionFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePerformanceCountersByRegionFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerformanceCountersByRegion + /// + [FieldOffset(16)] + public Brutal.Bool32 PerformanceCountersByRegion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionPropertiesARM.gen.cs new file mode 100644 index 0000000..7c09a38 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceCountersByRegionPropertiesARM.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePerformanceCountersByRegionPropertiesARM - Structure describing per region performance counter properties for a physical device + /// + /// + /// + /// The VkPhysicalDevicePerformanceCountersByRegionPropertiesARM structure + /// is defined as: + /// + /// + /// // Provided by VK_ARM_performance_counters_by_region + /// typedef struct VkPhysicalDevicePerformanceCountersByRegionPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxPerRegionPerformanceCounters; + /// VkExtent2D performanceCounterRegionSize; + /// uint32_t rowStrideAlignment; + /// uint32_t regionAlignment; + /// VkBool32 identityTransformOrder; + /// } VkPhysicalDevicePerformanceCountersByRegionPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDevicePerformanceCountersByRegionPropertiesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDevicePerformanceCountersByRegionPropertiesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPerRegionPerformanceCounters + /// + [FieldOffset(16)] + public int MaxPerRegionPerformanceCounters; + + /// + /// PerformanceCounterRegionSize + /// + [FieldOffset(20)] + public VkExtent2D PerformanceCounterRegionSize; + + /// + /// RowStrideAlignment + /// + [FieldOffset(28)] + public int RowStrideAlignment; + + /// + /// RegionAlignment + /// + [FieldOffset(32)] + public int RegionAlignment; + + /// + /// IdentityTransformOrder + /// + [FieldOffset(36)] + public Brutal.Bool32 IdentityTransformOrder; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryFeaturesKHR.gen.cs new file mode 100644 index 0000000..f6a17e1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryFeaturesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePerformanceQueryFeaturesKHR - Structure describing performance query support for an implementation + /// + /// + /// + /// The VkPhysicalDevicePerformanceQueryFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkPhysicalDevicePerformanceQueryFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 performanceCounterQueryPools; + /// VkBool32 performanceCounterMultipleQueryPools; + /// } VkPhysicalDevicePerformanceQueryFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePerformanceQueryFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePerformanceQueryFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. // tag::VK_KHR_performance_query-features[] + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerformanceCounterQueryPools + /// + [FieldOffset(16)] + public Brutal.Bool32 PerformanceCounterQueryPools; + + /// + /// PerformanceCounterMultipleQueryPools + /// + [FieldOffset(20)] + public Brutal.Bool32 PerformanceCounterMultipleQueryPools; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryPropertiesKHR.gen.cs new file mode 100644 index 0000000..f0e70fe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePerformanceQueryPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePerformanceQueryPropertiesKHR - Structure describing performance query properties for an implementation + /// + /// + /// + /// The VkPhysicalDevicePerformanceQueryPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkPhysicalDevicePerformanceQueryPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 allowCommandBufferQueryCopies; + /// } VkPhysicalDevicePerformanceQueryPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePerformanceQueryPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePerformanceQueryPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AllowCommandBufferQueryCopies is VK_TRUE if the performance query pools are allowed to be used with vkCmdCopyQueryPoolResults. + /// + [FieldOffset(16)] + public Brutal.Bool32 AllowCommandBufferQueryCopies; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryFeaturesKHR.gen.cs new file mode 100644 index 0000000..ae70106 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryFeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineBinaryFeaturesKHR - Structure describing support for pipeline binaries + /// + /// + /// + /// The VkPhysicalDevicePipelineBinaryFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPhysicalDevicePipelineBinaryFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineBinaries; + /// } VkPhysicalDevicePipelineBinaryFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineBinaryFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineBinaryFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBinaries + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineBinaries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryPropertiesKHR.gen.cs new file mode 100644 index 0000000..66dde77 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineBinaryPropertiesKHR.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineBinaryPropertiesKHR - Structure describing properties about the pipeline binary implementation + /// + /// + /// + /// The VkPhysicalDevicePipelineBinaryPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPhysicalDevicePipelineBinaryPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineBinaryInternalCache; + /// VkBool32 pipelineBinaryInternalCacheControl; + /// VkBool32 pipelineBinaryPrefersInternalCache; + /// VkBool32 pipelineBinaryPrecompiledInternalCache; + /// VkBool32 pipelineBinaryCompressedData; + /// } VkPhysicalDevicePipelineBinaryPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDevicePipelineBinaryPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineBinaryPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBinaryInternalCache + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineBinaryInternalCache; + + /// + /// PipelineBinaryInternalCacheControl + /// + [FieldOffset(20)] + public Brutal.Bool32 PipelineBinaryInternalCacheControl; + + /// + /// PipelineBinaryPrefersInternalCache + /// + [FieldOffset(24)] + public Brutal.Bool32 PipelineBinaryPrefersInternalCache; + + /// + /// PipelineBinaryPrecompiledInternalCache + /// + [FieldOffset(28)] + public Brutal.Bool32 PipelineBinaryPrecompiledInternalCache; + + /// + /// PipelineBinaryCompressedData + /// + [FieldOffset(32)] + public Brutal.Bool32 PipelineBinaryCompressedData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC.gen.cs new file mode 100644 index 0000000..ceecf92 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC - Stub description of VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC + /// + /// + /// + /// [[features-pipelineCacheIncrementalMode]] + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_SEC_pipeline_cache_incremental_mode + /// typedef struct VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineCacheIncrementalMode; + /// } VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineCacheIncrementalMode + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineCacheIncrementalMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCreationCacheControlFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCreationCacheControlFeatures.gen.cs new file mode 100644 index 0000000..87ce615 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineCreationCacheControlFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineCreationCacheControlFeatures - Structure describing whether pipeline cache control can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDevicePipelineCreationCacheControlFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDevicePipelineCreationCacheControlFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineCreationCacheControl; + /// } VkPhysicalDevicePipelineCreationCacheControlFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineCreationCacheControlFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineCreationCacheControlFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineCreationCacheControl + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineCreationCacheControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.gen.cs new file mode 100644 index 0000000..87be47c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR - Structure describing whether pipeline executable properties are available + /// + /// + /// + /// The VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR structure + /// is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef struct VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineExecutableInfo; + /// } VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineExecutablePropertiesFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineExecutableInfo + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineExecutableInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.gen.cs new file mode 100644 index 0000000..1a38abf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT - Structure describing whether querying shader group handles from a pipeline library is supported by the implementation + /// + /// + /// + /// The VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_pipeline_library_group_handles + /// typedef struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineLibraryGroupHandles; + /// } VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineLibraryGroupHandles + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineLibraryGroupHandles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineOpacityMicromapFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineOpacityMicromapFeaturesARM.gen.cs new file mode 100644 index 0000000..978bcab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineOpacityMicromapFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineOpacityMicromapFeaturesARM - Structure describing features supported by VK_ARM_pipeline_opacity_micromap + /// + /// + /// + /// The VkPhysicalDevicePipelineOpacityMicromapFeaturesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_pipeline_opacity_micromap + /// typedef struct VkPhysicalDevicePipelineOpacityMicromapFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineOpacityMicromap; + /// } VkPhysicalDevicePipelineOpacityMicromapFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineOpacityMicromapFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineOpacityMicromapFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineOpacityMicromap + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineOpacityMicromap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelinePropertiesFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelinePropertiesFeaturesEXT.gen.cs new file mode 100644 index 0000000..71511e1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelinePropertiesFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelinePropertiesFeaturesEXT - Structure describing what pipeline properties are supported + /// + /// + /// + /// The VkPhysicalDevicePipelinePropertiesFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_pipeline_properties + /// typedef struct VkPhysicalDevicePipelinePropertiesFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelinePropertiesIdentifier; + /// } VkPhysicalDevicePipelinePropertiesFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelinePropertiesFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelinePropertiesFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelinePropertiesIdentifier + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelinePropertiesIdentifier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineProtectedAccessFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineProtectedAccessFeatures.gen.cs new file mode 100644 index 0000000..c114337 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineProtectedAccessFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineProtectedAccessFeatures - Structure describing support for specifying protected access on individual pipelines + /// + /// + /// + /// The VkPhysicalDevicePipelineProtectedAccessFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDevicePipelineProtectedAccessFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineProtectedAccess; + /// } VkPhysicalDevicePipelineProtectedAccessFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineProtectedAccessFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineProtectedAccessFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineProtectedAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineProtectedAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessFeatures.gen.cs new file mode 100644 index 0000000..ace6627 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineRobustnessFeatures - Structure describing whether an implementation supports robustness requests on a per-pipeline stage granularity + /// + /// + /// + /// The VkPhysicalDevicePipelineRobustnessFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDevicePipelineRobustnessFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pipelineRobustness; + /// } VkPhysicalDevicePipelineRobustnessFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePipelineRobustnessFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineRobustnessFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineRobustness + /// + [FieldOffset(16)] + public Brutal.Bool32 PipelineRobustness; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessProperties.gen.cs new file mode 100644 index 0000000..982ce97 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePipelineRobustnessProperties.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePipelineRobustnessProperties - Structure describing the default robustness behavior of a physical device + /// + /// + /// + /// The VkPhysicalDevicePipelineRobustnessProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDevicePipelineRobustnessProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; + /// VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; + /// VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; + /// VkPipelineRobustnessImageBehavior defaultRobustnessImages; + /// } VkPhysicalDevicePipelineRobustnessProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevicePipelineRobustnessProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePipelineRobustnessProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DefaultRobustnessStorageBuffers + /// + [FieldOffset(16)] + public VkPipelineRobustnessBufferBehavior DefaultRobustnessStorageBuffers; + + /// + /// DefaultRobustnessUniformBuffers + /// + [FieldOffset(20)] + public VkPipelineRobustnessBufferBehavior DefaultRobustnessUniformBuffers; + + /// + /// DefaultRobustnessVertexInputs + /// + [FieldOffset(24)] + public VkPipelineRobustnessBufferBehavior DefaultRobustnessVertexInputs; + + /// + /// DefaultRobustnessImages + /// + [FieldOffset(28)] + public VkPipelineRobustnessImageBehavior DefaultRobustnessImages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePointClippingProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePointClippingProperties.gen.cs new file mode 100644 index 0000000..48b7a0e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePointClippingProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePointClippingProperties - Structure describing the point clipping behavior supported by an implementation + /// + /// + /// + /// The VkPhysicalDevicePointClippingProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDevicePointClippingProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkPointClippingBehavior pointClippingBehavior; + /// } VkPhysicalDevicePointClippingProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePointClippingProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePointClippingProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PointClippingBehavior + /// + [FieldOffset(16)] + public VkPointClippingBehavior PointClippingBehavior; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetFeaturesKHR.gen.cs new file mode 100644 index 0000000..8ba7805 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetFeaturesKHR.gen.cs @@ -0,0 +1,139 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePortabilitySubsetFeaturesKHR - Structure describing the features that may not be supported by an implementation of the Vulkan 1.0 Portability Subset + /// + /// + /// + /// The VkPhysicalDevicePortabilitySubsetFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_portability_subset + /// typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 constantAlphaColorBlendFactors; + /// VkBool32 events; + /// VkBool32 imageViewFormatReinterpretation; + /// VkBool32 imageViewFormatSwizzle; + /// VkBool32 imageView2DOn3DImage; + /// VkBool32 multisampleArrayImage; + /// VkBool32 mutableComparisonSamplers; + /// VkBool32 pointPolygons; + /// VkBool32 samplerMipLodBias; + /// VkBool32 separateStencilMaskRef; + /// VkBool32 shaderSampleRateInterpolationFunctions; + /// VkBool32 tessellationIsolines; + /// VkBool32 tessellationPointMode; + /// VkBool32 triangleFans; + /// VkBool32 vertexAttributeAccessBeyondStride; + /// } VkPhysicalDevicePortabilitySubsetFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkPhysicalDevicePortabilitySubsetFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePortabilitySubsetFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ConstantAlphaColorBlendFactors + /// + [FieldOffset(16)] + public Brutal.Bool32 ConstantAlphaColorBlendFactors; + + /// + /// Events + /// + [FieldOffset(20)] + public Brutal.Bool32 Events; + + /// + /// ImageViewFormatReinterpretation + /// + [FieldOffset(24)] + public Brutal.Bool32 ImageViewFormatReinterpretation; + + /// + /// ImageViewFormatSwizzle + /// + [FieldOffset(28)] + public Brutal.Bool32 ImageViewFormatSwizzle; + + /// + /// ImageView2DOn3DImage + /// + [FieldOffset(32)] + public Brutal.Bool32 ImageView2DOn3DImage; + + /// + /// MultisampleArrayImage + /// + [FieldOffset(36)] + public Brutal.Bool32 MultisampleArrayImage; + + /// + /// MutableComparisonSamplers + /// + [FieldOffset(40)] + public Brutal.Bool32 MutableComparisonSamplers; + + /// + /// PointPolygons + /// + [FieldOffset(44)] + public Brutal.Bool32 PointPolygons; + + /// + /// SamplerMipLodBias + /// + [FieldOffset(48)] + public Brutal.Bool32 SamplerMipLodBias; + + /// + /// SeparateStencilMaskRef + /// + [FieldOffset(52)] + public Brutal.Bool32 SeparateStencilMaskRef; + + /// + /// ShaderSampleRateInterpolationFunctions + /// + [FieldOffset(56)] + public Brutal.Bool32 ShaderSampleRateInterpolationFunctions; + + /// + /// TessellationIsolines + /// + [FieldOffset(60)] + public Brutal.Bool32 TessellationIsolines; + + /// + /// TessellationPointMode + /// + [FieldOffset(64)] + public Brutal.Bool32 TessellationPointMode; + + /// + /// TriangleFans + /// + [FieldOffset(68)] + public Brutal.Bool32 TriangleFans; + + /// + /// VertexAttributeAccessBeyondStride + /// + [FieldOffset(72)] + public Brutal.Bool32 VertexAttributeAccessBeyondStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetPropertiesKHR.gen.cs new file mode 100644 index 0000000..a42ad67 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePortabilitySubsetPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePortabilitySubsetPropertiesKHR - Structure describing additional properties supported by a portable implementation + /// + /// + /// + /// The VkPhysicalDevicePortabilitySubsetPropertiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_portability_subset + /// typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t minVertexInputBindingStrideAlignment; + /// } VkPhysicalDevicePortabilitySubsetPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePortabilitySubsetPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePortabilitySubsetPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinVertexInputBindingStrideAlignment + /// + [FieldOffset(16)] + public int MinVertexInputBindingStrideAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentBarrierFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentBarrierFeaturesNV.gen.cs new file mode 100644 index 0000000..89e1f08 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentBarrierFeaturesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentBarrierFeaturesNV - Structure indicating support for VK_NV_present_barrier extension + /// + /// + /// + /// The VkPhysicalDevicePresentBarrierFeaturesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_present_barrier + /// typedef struct VkPhysicalDevicePresentBarrierFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentBarrier; + /// } VkPhysicalDevicePresentBarrierFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentBarrierFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentBarrierFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentBarrier + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentBarrier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentId2FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentId2FeaturesKHR.gen.cs new file mode 100644 index 0000000..9d59c72 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentId2FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentId2FeaturesKHR - Structure indicating support for present id 2 + /// + /// + /// + /// The VkPhysicalDevicePresentId2FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_id2 + /// typedef struct VkPhysicalDevicePresentId2FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentId2; + /// } VkPhysicalDevicePresentId2FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentId2FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentId2FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentId2 + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentId2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentIdFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentIdFeaturesKHR.gen.cs new file mode 100644 index 0000000..c92cd6b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentIdFeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentIdFeaturesKHR - Structure indicating support for present id + /// + /// + /// + /// The VkPhysicalDevicePresentIdFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_id + /// typedef struct VkPhysicalDevicePresentIdFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentId; + /// } VkPhysicalDevicePresentIdFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentIdFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentIdFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentId + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentMeteringFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentMeteringFeaturesNV.gen.cs new file mode 100644 index 0000000..8f3a102 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentMeteringFeaturesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentMeteringFeaturesNV - Structure describing whether the present metering features can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDevicePresentMeteringFeaturesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_present_metering + /// typedef struct VkPhysicalDevicePresentMeteringFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentMetering; + /// } VkPhysicalDevicePresentMeteringFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentMeteringFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentMeteringFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentMetering + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentMetering; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR.gen.cs new file mode 100644 index 0000000..5bab69c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR - Structure describing support for VK_PRESENT_MODE_FIFO_LATEST_READY_KHR + /// + /// + /// + /// The VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_present_mode_fifo_latest_ready + /// typedef struct VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentModeFifoLatestReady; + /// } VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentModeFifoLatestReadyFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentModeFifoLatestReadyFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentModeFifoLatestReady + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentModeFifoLatestReady; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentTimingFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentTimingFeaturesEXT.gen.cs new file mode 100644 index 0000000..c61e0d2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentTimingFeaturesEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentTimingFeaturesEXT - Structure indicating support for present timing + /// + /// + /// + /// The VkPhysicalDevicePresentTimingFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPhysicalDevicePresentTimingFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentTiming; + /// VkBool32 presentAtAbsoluteTime; + /// VkBool32 presentAtRelativeTime; + /// } VkPhysicalDevicePresentTimingFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevicePresentTimingFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentTimingFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentTiming + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentTiming; + + /// + /// PresentAtAbsoluteTime + /// + [FieldOffset(20)] + public Brutal.Bool32 PresentAtAbsoluteTime; + + /// + /// PresentAtRelativeTime + /// + [FieldOffset(24)] + public Brutal.Bool32 PresentAtRelativeTime; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWait2FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWait2FeaturesKHR.gen.cs new file mode 100644 index 0000000..5034215 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWait2FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentWait2FeaturesKHR - Structure indicating support for present wait 2 + /// + /// + /// + /// The VkPhysicalDevicePresentWait2FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_wait2 + /// typedef struct VkPhysicalDevicePresentWait2FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentWait2; + /// } VkPhysicalDevicePresentWait2FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentWait2FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentWait2FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentWait2 + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentWait2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWaitFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWaitFeaturesKHR.gen.cs new file mode 100644 index 0000000..ae18644 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePresentWaitFeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePresentWaitFeaturesKHR - Structure indicating support for present wait + /// + /// + /// + /// The VkPhysicalDevicePresentWaitFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_wait + /// typedef struct VkPhysicalDevicePresentWaitFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentWait; + /// } VkPhysicalDevicePresentWaitFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePresentWaitFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePresentWaitFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentWait + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentWait; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT.gen.cs new file mode 100644 index 0000000..dda6caf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT - Structure describing features to configure primitive restart index + /// + /// + /// + /// The VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_primitive_restart_index + /// typedef struct VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 primitiveRestartIndex; + /// } VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePrimitiveRestartIndexFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrimitiveRestartIndex + /// + [FieldOffset(16)] + public Brutal.Bool32 PrimitiveRestartIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.gen.cs new file mode 100644 index 0000000..9fe6a10 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT - Structure describing whether list type primitives can support primitive restart + /// + /// + /// + /// The VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_primitive_topology_list_restart + /// typedef struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 primitiveTopologyListRestart; + /// VkBool32 primitiveTopologyPatchListRestart; + /// } VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrimitiveTopologyListRestart + /// + [FieldOffset(16)] + public Brutal.Bool32 PrimitiveTopologyListRestart; + + /// + /// PrimitiveTopologyPatchListRestart + /// + [FieldOffset(20)] + public Brutal.Bool32 PrimitiveTopologyPatchListRestart; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.gen.cs new file mode 100644 index 0000000..10aaba4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT - Structure describing support for primitives generated query + /// + /// + /// + /// The VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_primitives_generated_query + /// typedef struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 primitivesGeneratedQuery; + /// VkBool32 primitivesGeneratedQueryWithRasterizerDiscard; + /// VkBool32 primitivesGeneratedQueryWithNonZeroStreams; + /// } VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrimitivesGeneratedQuery + /// + [FieldOffset(16)] + public Brutal.Bool32 PrimitivesGeneratedQuery; + + /// + /// PrimitivesGeneratedQueryWithRasterizerDiscard + /// + [FieldOffset(20)] + public Brutal.Bool32 PrimitivesGeneratedQueryWithRasterizerDiscard; + + /// + /// PrimitivesGeneratedQueryWithNonZeroStreams + /// + [FieldOffset(24)] + public Brutal.Bool32 PrimitivesGeneratedQueryWithNonZeroStreams; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrivateDataFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrivateDataFeatures.gen.cs new file mode 100644 index 0000000..330e5a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePrivateDataFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePrivateDataFeatures - Structure specifying physical device support + /// + /// + /// + /// The VkPhysicalDevicePrivateDataFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDevicePrivateDataFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 privateData; + /// } VkPhysicalDevicePrivateDataFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePrivateDataFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePrivateDataFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PrivateData + /// + [FieldOffset(16)] + public Brutal.Bool32 PrivateData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties.gen.cs new file mode 100644 index 0000000..18c4b1b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceProperties - Structure specifying physical device properties + /// + /// + /// + /// The VkPhysicalDeviceProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPhysicalDeviceProperties { + /// uint32_t apiVersion; + /// uint32_t driverVersion; + /// uint32_t vendorID; + /// uint32_t deviceID; + /// VkPhysicalDeviceType deviceType; + /// char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; + /// uint8_t pipelineCacheUUID[VK_UUID_SIZE]; + /// VkPhysicalDeviceLimits limits; + /// VkPhysicalDeviceSparseProperties sparseProperties; + /// } VkPhysicalDeviceProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 824)] + public unsafe partial struct VkPhysicalDeviceProperties() + { + /// + /// ApiVersion is the version of Vulkan supported by the device, encoded as described in here. + /// + [FieldOffset(0)] + public int ApiVersion; + + /// + /// DriverVersion is the vendor-specified version of the driver. + /// + [FieldOffset(4)] + public int DriverVersion; + + /// + /// VendorID is a unique identifier for the vendor (see below) of the physical device. + /// + [FieldOffset(8)] + public int VendorID; + + /// + /// DeviceID is a unique identifier for the physical device among devices available from the vendor. + /// + [FieldOffset(12)] + public int DeviceID; + + /// + /// DeviceType is a VkPhysicalDeviceType specifying the type of device. + /// + [FieldOffset(16)] + public VkPhysicalDeviceType DeviceType; + + /// + [FieldOffset(20)] + public fixed byte DeviceName[256]; + + /// + [FieldOffset(276)] + public fixed byte PipelineCacheUUID[16]; + + /// + /// Limits is the VkPhysicalDeviceLimits structure specifying device-specific limits of the physical device. See Limits^ for details. + /// + [FieldOffset(296)] + public VkPhysicalDeviceLimits Limits; + + /// + /// SparseProperties is the VkPhysicalDeviceSparseProperties structure specifying various sparse related properties of the physical device. See Sparse Properties^ for details. + /// + [FieldOffset(800)] + public VkPhysicalDeviceSparseProperties SparseProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties2.gen.cs new file mode 100644 index 0000000..f7d1f51 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProperties2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceProperties2 - Structure specifying physical device properties + /// + /// + /// + /// The VkPhysicalDeviceProperties2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceProperties2 { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceProperties properties; + /// } VkPhysicalDeviceProperties2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 840)] + public unsafe partial struct VkPhysicalDeviceProperties2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceProperties2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Properties is a VkPhysicalDeviceProperties structure describing properties of the physical device. This structure is written with the same values as if it were written by vkGetPhysicalDeviceProperties. + /// + [FieldOffset(16)] + public VkPhysicalDeviceProperties Properties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryFeatures.gen.cs new file mode 100644 index 0000000..5e1f70d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceProtectedMemoryFeatures - Structure describing protected memory features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceProtectedMemoryFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceProtectedMemoryFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 protectedMemory; + /// } VkPhysicalDeviceProtectedMemoryFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceProtectedMemoryFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceProtectedMemoryFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProtectedMemory + /// + [FieldOffset(16)] + public Brutal.Bool32 ProtectedMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryProperties.gen.cs new file mode 100644 index 0000000..add9d51 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProtectedMemoryProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceProtectedMemoryProperties - Structure describing protected memory properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceProtectedMemoryProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceProtectedMemoryProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 protectedNoFault; + /// } VkPhysicalDeviceProtectedMemoryProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceProtectedMemoryProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceProtectedMemoryProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProtectedNoFault + /// + [FieldOffset(16)] + public Brutal.Bool32 ProtectedNoFault; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexFeaturesEXT.gen.cs new file mode 100644 index 0000000..c0d6944 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceProvokingVertexFeaturesEXT - Structure describing the provoking vertex features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceProvokingVertexFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_provoking_vertex + /// typedef struct VkPhysicalDeviceProvokingVertexFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 provokingVertexLast; + /// VkBool32 transformFeedbackPreservesProvokingVertex; + /// } VkPhysicalDeviceProvokingVertexFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceProvokingVertexFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceProvokingVertexFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProvokingVertexLast + /// + [FieldOffset(16)] + public Brutal.Bool32 ProvokingVertexLast; + + /// + /// TransformFeedbackPreservesProvokingVertex + /// + [FieldOffset(20)] + public Brutal.Bool32 TransformFeedbackPreservesProvokingVertex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexPropertiesEXT.gen.cs new file mode 100644 index 0000000..b932204 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceProvokingVertexPropertiesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceProvokingVertexPropertiesEXT - Structure describing provoking vertex properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceProvokingVertexPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_provoking_vertex + /// typedef struct VkPhysicalDeviceProvokingVertexPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 provokingVertexModePerPipeline; + /// VkBool32 transformFeedbackPreservesTriangleFanProvokingVertex; + /// } VkPhysicalDeviceProvokingVertexPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceProvokingVertexPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceProvokingVertexPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProvokingVertexModePerPipeline + /// + [FieldOffset(16)] + public Brutal.Bool32 ProvokingVertexModePerPipeline; + + /// + /// TransformFeedbackPreservesTriangleFanProvokingVertex + /// + [FieldOffset(20)] + public Brutal.Bool32 TransformFeedbackPreservesTriangleFanProvokingVertex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankFeaturesNV.gen.cs new file mode 100644 index 0000000..fc7b343 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePushConstantBankFeaturesNV - Structure describing push constant bank features + /// + /// + /// + /// The VkPhysicalDevicePushConstantBankFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_push_constant_bank + /// typedef struct VkPhysicalDevicePushConstantBankFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 pushConstantBank; + /// } VkPhysicalDevicePushConstantBankFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePushConstantBankFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePushConstantBankFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PushConstantBank + /// + [FieldOffset(16)] + public Brutal.Bool32 PushConstantBank; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankPropertiesNV.gen.cs new file mode 100644 index 0000000..d1280d6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushConstantBankPropertiesNV.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePushConstantBankPropertiesNV - Structure describing push constant bank properties + /// + /// + /// + /// The VkPhysicalDevicePushConstantBankPropertiesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_push_constant_bank + /// typedef struct VkPhysicalDevicePushConstantBankPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxGraphicsPushConstantBanks; + /// uint32_t maxComputePushConstantBanks; + /// uint32_t maxGraphicsPushDataBanks; + /// uint32_t maxComputePushDataBanks; + /// } VkPhysicalDevicePushConstantBankPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDevicePushConstantBankPropertiesNV() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePushConstantBankPropertiesNV; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxGraphicsPushConstantBanks + /// + [FieldOffset(16)] + public int MaxGraphicsPushConstantBanks; + + /// + /// MaxComputePushConstantBanks + /// + [FieldOffset(20)] + public int MaxComputePushConstantBanks; + + /// + /// MaxGraphicsPushDataBanks + /// + [FieldOffset(24)] + public int MaxGraphicsPushDataBanks; + + /// + /// MaxComputePushDataBanks + /// + [FieldOffset(28)] + public int MaxComputePushDataBanks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushDescriptorProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushDescriptorProperties.gen.cs new file mode 100644 index 0000000..d866193 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDevicePushDescriptorProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDevicePushDescriptorProperties - Structure describing push descriptor limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDevicePushDescriptorProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDevicePushDescriptorProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxPushDescriptors; + /// } VkPhysicalDevicePushDescriptorProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDevicePushDescriptorProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDevicePushDescriptorProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPushDescriptors + /// + [FieldOffset(16)] + public int MaxPushDescriptors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM.gen.cs new file mode 100644 index 0000000..5af74c9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM - Structure specifying a data graph processing engine type and queue family to query + /// + /// + /// + /// The VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM + /// structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t queueFamilyIndex; + /// VkPhysicalDeviceDataGraphProcessingEngineTypeARM engineType; + /// } VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueueFamilyIndex specifies the queue family being queried. + /// + [FieldOffset(16)] + public int QueueFamilyIndex; + + /// + /// EngineType is a VkPhysicalDeviceDataGraphProcessingEngineTypeARM specifying the engine type whose properties are being queried. + /// + [FieldOffset(20)] + public VkPhysicalDeviceDataGraphProcessingEngineTypeARM EngineType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintFeaturesQCOM.gen.cs new file mode 100644 index 0000000..0f09fa6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintFeaturesQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceQueuePerfHintFeaturesQCOM - Structure describing queue perf hint features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceQueuePerfHintFeaturesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_queue_perf_hint + /// typedef struct VkPhysicalDeviceQueuePerfHintFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 queuePerfHint; + /// } VkPhysicalDeviceQueuePerfHintFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceQueuePerfHintFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceQueuePerfHintFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueuePerfHint + /// + [FieldOffset(16)] + public Brutal.Bool32 QueuePerfHint; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintPropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintPropertiesQCOM.gen.cs new file mode 100644 index 0000000..6c533c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceQueuePerfHintPropertiesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceQueuePerfHintPropertiesQCOM - Structure describing queue perf hint properties for a physical device + /// + /// + /// + /// The VkPhysicalDeviceQueuePerfHintPropertiesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_queue_perf_hint + /// typedef struct VkPhysicalDeviceQueuePerfHintPropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkQueueFlags supportedQueues; + /// } VkPhysicalDeviceQueuePerfHintPropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceQueuePerfHintPropertiesQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceQueuePerfHintPropertiesQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedQueues + /// + [FieldOffset(16)] + public VkQueueFlags SupportedQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.gen.cs new file mode 100644 index 0000000..40f275d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT - Structure describing whether rendering to VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 formats can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_rgba10x6_formats + /// typedef struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 formatRgba10x6WithoutYCbCrSampler; + /// } VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRgba10X6FormatsFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FormatRgba10x6WithoutYCbCrSampler + /// + [FieldOffset(16)] + public Brutal.Bool32 FormatRgba10x6WithoutYCbCrSampler; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.gen.cs new file mode 100644 index 0000000..3e4a141 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT - Structure describing whether rasterization order attachment access can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT + /// structure is defined as: + /// + /// + /// // Provided by VK_EXT_rasterization_order_attachment_access + /// typedef struct VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rasterizationOrderColorAttachmentAccess; + /// VkBool32 rasterizationOrderDepthAttachmentAccess; + /// VkBool32 rasterizationOrderStencilAttachmentAccess; + /// } VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RasterizationOrderColorAttachmentAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 RasterizationOrderColorAttachmentAccess; + + /// + /// RasterizationOrderDepthAttachmentAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 RasterizationOrderDepthAttachmentAccess; + + /// + /// RasterizationOrderStencilAttachmentAccess + /// + [FieldOffset(24)] + public Brutal.Bool32 RasterizationOrderStencilAttachmentAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRawAccessChainsFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRawAccessChainsFeaturesNV.gen.cs new file mode 100644 index 0000000..efa2f4b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRawAccessChainsFeaturesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRawAccessChainsFeaturesNV - Structure describing shader raw access chains features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRawAccessChainsFeaturesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_raw_access_chains + /// typedef struct VkPhysicalDeviceRawAccessChainsFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderRawAccessChains; + /// } VkPhysicalDeviceRawAccessChainsFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRawAccessChainsFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRawAccessChainsFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderRawAccessChains + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderRawAccessChains; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayQueryFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayQueryFeaturesKHR.gen.cs new file mode 100644 index 0000000..46ad29a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayQueryFeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayQueryFeaturesKHR - Structure describing the ray query features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayQueryFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_query + /// typedef struct VkPhysicalDeviceRayQueryFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayQuery; + /// } VkPhysicalDeviceRayQueryFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayQueryFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayQueryFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayQuery + /// + [FieldOffset(16)] + public Brutal.Bool32 RayQuery; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT.gen.cs new file mode 100644 index 0000000..921b482 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT - Structure describing feature to control ray tracing invocation reordering + /// + /// + /// + /// The VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_ray_tracing_invocation_reorder + /// typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingInvocationReorder; + /// } VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingInvocationReorderFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingInvocationReorder + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingInvocationReorder; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.gen.cs new file mode 100644 index 0000000..34c0bca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV - Structure describing feature to control ray tracing invocation reordering + /// + /// + /// + /// The VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_invocation_reorder + /// typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingInvocationReorder; + /// } VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingInvocationReorderFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingInvocationReorder + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingInvocationReorder; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT.gen.cs new file mode 100644 index 0000000..54e0839 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT - Structure describing shader module identifier properties of an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_ray_tracing_invocation_reorder + /// typedef struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkRayTracingInvocationReorderModeEXT rayTracingInvocationReorderReorderingHint; + /// uint32_t maxShaderBindingTableRecordIndex; + /// } VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceRayTracingInvocationReorderPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingInvocationReorderReorderingHint is a hint indicating if the implementation may: reorder at the reorder calls. + /// + [FieldOffset(16)] + public VkRayTracingInvocationReorderModeEXT RayTracingInvocationReorderReorderingHint; + + /// + /// MaxShaderBindingTableRecordIndex is the maximum shader binding table record index allowed to be passed in to OpHitObjectSetShaderBindingTableRecordIndexEXT + /// + [FieldOffset(20)] + public int MaxShaderBindingTableRecordIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.gen.cs new file mode 100644 index 0000000..119a648 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV - Structure describing shader module identifier properties of an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_invocation_reorder + /// typedef struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkRayTracingInvocationReorderModeEXT rayTracingInvocationReorderReorderingHint; + /// } VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingInvocationReorderPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingInvocationReorderReorderingHint is a hint indicating if the implementation will actually reorder at the reorder calls. + /// + [FieldOffset(16)] + public VkRayTracingInvocationReorderModeEXT RayTracingInvocationReorderReorderingHint; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV.gen.cs new file mode 100644 index 0000000..aa153e0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV - Structure describing the ray tracing linear swept spheres features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_linear_swept_spheres + /// typedef struct VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 spheres; + /// VkBool32 linearSweptSpheres; + /// } VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Spheres + /// + [FieldOffset(16)] + public Brutal.Bool32 Spheres; + + /// + /// LinearSweptSpheres + /// + [FieldOffset(20)] + public Brutal.Bool32 LinearSweptSpheres; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.gen.cs new file mode 100644 index 0000000..c183d5c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR - Structure describing the ray tracing maintenance features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_maintenance1 + /// typedef struct VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingMaintenance1; + /// VkBool32 rayTracingPipelineTraceRaysIndirect2; + /// } VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingMaintenance1FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingMaintenance1 + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingMaintenance1; + + /// + /// RayTracingPipelineTraceRaysIndirect2 + /// + [FieldOffset(20)] + public Brutal.Bool32 RayTracingPipelineTraceRaysIndirect2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.gen.cs new file mode 100644 index 0000000..414f017 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingMotionBlurFeaturesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingMotionBlurFeaturesNV - Structure describing the ray tracing motion blur features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingMotionBlurFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingMotionBlur; + /// VkBool32 rayTracingMotionBlurPipelineTraceRaysIndirect; + /// } VkPhysicalDeviceRayTracingMotionBlurFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingMotionBlurFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingMotionBlur + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingMotionBlur; + + /// + /// RayTracingMotionBlurPipelineTraceRaysIndirect + /// + [FieldOffset(20)] + public Brutal.Bool32 RayTracingMotionBlurPipelineTraceRaysIndirect; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.gen.cs new file mode 100644 index 0000000..539be01 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelineFeaturesKHR.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingPipelineFeaturesKHR - Structure describing the ray tracing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingPipelineFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingPipeline; + /// VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay; + /// VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed; + /// VkBool32 rayTracingPipelineTraceRaysIndirect; + /// VkBool32 rayTraversalPrimitiveCulling; + /// } VkPhysicalDeviceRayTracingPipelineFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingPipelineFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingPipeline + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingPipeline; + + /// + /// RayTracingPipelineShaderGroupHandleCaptureReplay + /// + [FieldOffset(20)] + public Brutal.Bool32 RayTracingPipelineShaderGroupHandleCaptureReplay; + + /// + /// RayTracingPipelineShaderGroupHandleCaptureReplayMixed + /// + [FieldOffset(24)] + public Brutal.Bool32 RayTracingPipelineShaderGroupHandleCaptureReplayMixed; + + /// + /// RayTracingPipelineTraceRaysIndirect + /// + [FieldOffset(28)] + public Brutal.Bool32 RayTracingPipelineTraceRaysIndirect; + + /// + /// RayTraversalPrimitiveCulling + /// + [FieldOffset(32)] + public Brutal.Bool32 RayTraversalPrimitiveCulling; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.gen.cs new file mode 100644 index 0000000..5a6ea14 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPipelinePropertiesKHR.gen.cs @@ -0,0 +1,90 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingPipelinePropertiesKHR - Properties of the physical device for ray tracing + /// + /// + /// + /// The VkPhysicalDeviceRayTracingPipelinePropertiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkPhysicalDeviceRayTracingPipelinePropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t shaderGroupHandleSize; + /// uint32_t maxRayRecursionDepth; + /// uint32_t maxShaderGroupStride; + /// uint32_t shaderGroupBaseAlignment; + /// uint32_t shaderGroupHandleCaptureReplaySize; + /// uint32_t maxRayDispatchInvocationCount; + /// uint32_t shaderGroupHandleAlignment; + /// uint32_t maxRayHitAttributeSize; + /// } VkPhysicalDeviceRayTracingPipelinePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceRayTracingPipelinePropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingPipelinePropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderGroupHandleSize is the size in bytes of the shader header. + /// + [FieldOffset(16)] + public ByteSize32 ShaderGroupHandleSize; + + /// + /// MaxRayRecursionDepth + /// + [FieldOffset(20)] + public int MaxRayRecursionDepth; + + /// + /// MaxShaderGroupStride + /// + [FieldOffset(24)] + public ByteSize32 MaxShaderGroupStride; + + /// + /// ShaderGroupBaseAlignment is the required: alignment in bytes for the base of the shader binding table. + /// + [FieldOffset(28)] + public ByteSize32 ShaderGroupBaseAlignment; + + /// + /// ShaderGroupHandleCaptureReplaySize is the number of bytes for the information required to do capture and replay for shader group handles. + /// + [FieldOffset(32)] + public ByteSize32 ShaderGroupHandleCaptureReplaySize; + + /// + /// MaxRayDispatchInvocationCount is the maximum number of ray generation shader invocations which may: be produced by a single vkCmdTraceRaysIndirectKHR or vkCmdTraceRaysKHR command. + /// + [FieldOffset(36)] + public int MaxRayDispatchInvocationCount; + + /// + /// ShaderGroupHandleAlignment is the required: alignment in bytes for each entry in a shader binding table. The value must be a power of two. + /// + [FieldOffset(40)] + public ByteSize32 ShaderGroupHandleAlignment; + + /// + /// MaxRayHitAttributeSize is the maximum size in bytes for a ray attribute structure + /// + [FieldOffset(44)] + public ByteSize32 MaxRayHitAttributeSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.gen.cs new file mode 100644 index 0000000..cd281e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR - Structure describing support for fetching vertex positions of hit triangles + /// + /// + /// + /// The VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_position_fetch + /// typedef struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingPositionFetch; + /// } VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingPositionFetchFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingPositionFetch + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingPositionFetch; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPropertiesNV.gen.cs new file mode 100644 index 0000000..b410f5e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingPropertiesNV.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingPropertiesNV - Properties of the physical device for ray tracing + /// + /// + /// + /// The VkPhysicalDeviceRayTracingPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkPhysicalDeviceRayTracingPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t shaderGroupHandleSize; + /// uint32_t maxRecursionDepth; + /// uint32_t maxShaderGroupStride; + /// uint32_t shaderGroupBaseAlignment; + /// uint64_t maxGeometryCount; + /// uint64_t maxInstanceCount; + /// uint64_t maxTriangleCount; + /// uint32_t maxDescriptorSetAccelerationStructures; + /// } VkPhysicalDeviceRayTracingPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceRayTracingPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderGroupHandleSize is the size in bytes of the shader header. + /// + [FieldOffset(16)] + public int ShaderGroupHandleSize; + + /// + /// MaxRecursionDepth + /// + [FieldOffset(20)] + public int MaxRecursionDepth; + + /// + /// MaxShaderGroupStride is the maximum stride in bytes allowed between shader groups in the shader binding table. + /// + [FieldOffset(24)] + public int MaxShaderGroupStride; + + /// + /// ShaderGroupBaseAlignment is the required: alignment in bytes for the base of the shader binding table. + /// + [FieldOffset(28)] + public int ShaderGroupBaseAlignment; + + /// + /// MaxGeometryCount is the maximum number of geometries in the bottom level acceleration structure. + /// + [FieldOffset(32)] + public nint MaxGeometryCount; + + /// + /// MaxInstanceCount is the maximum number of instances in the top level acceleration structure. + /// + [FieldOffset(40)] + public nint MaxInstanceCount; + + /// + /// MaxTriangleCount is the maximum number of triangles in all geometries in the bottom level acceleration structure. + /// + [FieldOffset(48)] + public nint MaxTriangleCount; + + /// + /// MaxDescriptorSetAccelerationStructures is the maximum number of acceleration structure descriptors that are allowed in a descriptor set. + /// + [FieldOffset(56)] + public int MaxDescriptorSetAccelerationStructures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingValidationFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingValidationFeaturesNV.gen.cs new file mode 100644 index 0000000..e6e62c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRayTracingValidationFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRayTracingValidationFeaturesNV - Structure describing the ray tracing validation features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRayTracingValidationFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing_validation + /// typedef struct VkPhysicalDeviceRayTracingValidationFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 rayTracingValidation; + /// } VkPhysicalDeviceRayTracingValidationFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRayTracingValidationFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRayTracingValidationFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RayTracingValidation + /// + [FieldOffset(16)] + public Brutal.Bool32 RayTracingValidation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.gen.cs new file mode 100644 index 0000000..60cb3f1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG - Structure describing relaxed line rasterization features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG structure is + /// defined as: + /// + /// + /// // Provided by VK_IMG_relaxed_line_rasterization + /// typedef struct VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 relaxedLineRasterization; + /// } VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRelaxedLineRasterizationFeaturesIMG; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RelaxedLineRasterization + /// + [FieldOffset(16)] + public Brutal.Bool32 RelaxedLineRasterization; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedFeaturesARM.gen.cs new file mode 100644 index 0000000..3708e84 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRenderPassStripedFeaturesARM - Structure describing whether striped rendering can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRenderPassStripedFeaturesARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_render_pass_striped + /// typedef struct VkPhysicalDeviceRenderPassStripedFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 renderPassStriped; + /// } VkPhysicalDeviceRenderPassStripedFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRenderPassStripedFeaturesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRenderPassStripedFeaturesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RenderPassStriped + /// + [FieldOffset(16)] + public Brutal.Bool32 RenderPassStriped; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedPropertiesARM.gen.cs new file mode 100644 index 0000000..a776bb9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRenderPassStripedPropertiesARM.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRenderPassStripedPropertiesARM - Structure describing striped rendering limits of an implementation + /// + /// + /// + /// The VkPhysicalDeviceRenderPassStripedPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_render_pass_striped + /// typedef struct VkPhysicalDeviceRenderPassStripedPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D renderPassStripeGranularity; + /// uint32_t maxRenderPassStripes; + /// } VkPhysicalDeviceRenderPassStripedPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceRenderPassStripedPropertiesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRenderPassStripedPropertiesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RenderPassStripeGranularity + /// + [FieldOffset(16)] + public VkExtent2D RenderPassStripeGranularity; + + /// + /// MaxRenderPassStripes + /// + [FieldOffset(24)] + public int MaxRenderPassStripes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.gen.cs new file mode 100644 index 0000000..650327c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV - Structure describing the representative fragment test features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_representative_fragment_test + /// typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 representativeFragmentTest; + /// } VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRepresentativeFragmentTestFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RepresentativeFragmentTest + /// + [FieldOffset(16)] + public Brutal.Bool32 RepresentativeFragmentTest; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2FeaturesKHR.gen.cs new file mode 100644 index 0000000..8d00fc6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2FeaturesKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRobustness2FeaturesKHR - Structure describing the out-of-bounds behavior for an implementation + /// + /// + /// + /// The VkPhysicalDeviceRobustness2FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_robustness2 + /// typedef struct VkPhysicalDeviceRobustness2FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 robustBufferAccess2; + /// VkBool32 robustImageAccess2; + /// VkBool32 nullDescriptor; + /// } VkPhysicalDeviceRobustness2FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceRobustness2FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRobustness2FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RobustBufferAccess2 + /// + [FieldOffset(16)] + public Brutal.Bool32 RobustBufferAccess2; + + /// + /// RobustImageAccess2 + /// + [FieldOffset(20)] + public Brutal.Bool32 RobustImageAccess2; + + /// + /// NullDescriptor + /// + [FieldOffset(24)] + public Brutal.Bool32 NullDescriptor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2PropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2PropertiesKHR.gen.cs new file mode 100644 index 0000000..d86c958 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceRobustness2PropertiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceRobustness2PropertiesKHR - Structure describing robust buffer access properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceRobustness2PropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_robustness2 + /// typedef struct VkPhysicalDeviceRobustness2PropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize robustStorageBufferAccessSizeAlignment; + /// VkDeviceSize robustUniformBufferAccessSizeAlignment; + /// } VkPhysicalDeviceRobustness2PropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceRobustness2PropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceRobustness2PropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RobustStorageBufferAccessSizeAlignment + /// + [FieldOffset(16)] + public ByteSize64 RobustStorageBufferAccessSizeAlignment; + + /// + /// RobustUniformBufferAccessSizeAlignment + /// + [FieldOffset(24)] + public ByteSize64 RobustUniformBufferAccessSizeAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSampleLocationsPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSampleLocationsPropertiesEXT.gen.cs new file mode 100644 index 0000000..7d5333a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSampleLocationsPropertiesEXT.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSampleLocationsPropertiesEXT - Structure describing sample location limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceSampleLocationsPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkPhysicalDeviceSampleLocationsPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkSampleCountFlags sampleLocationSampleCounts; + /// VkExtent2D maxSampleLocationGridSize; + /// float sampleLocationCoordinateRange[2]; + /// uint32_t sampleLocationSubPixelBits; + /// VkBool32 variableSampleLocations; + /// } VkPhysicalDeviceSampleLocationsPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceSampleLocationsPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSampleLocationsPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SampleLocationSampleCounts + /// + [FieldOffset(16)] + public VkSampleCountFlags SampleLocationSampleCounts; + + /// + /// MaxSampleLocationGridSize + /// + [FieldOffset(20)] + public VkExtent2D MaxSampleLocationGridSize; + + /// + /// SampleLocationCoordinateRange + /// + [FieldOffset(28)] + public float2 SampleLocationCoordinateRange; + + /// + /// SampleLocationSubPixelBits + /// + [FieldOffset(36)] + public int SampleLocationSubPixelBits; + + /// + /// VariableSampleLocations + /// + [FieldOffset(40)] + public Brutal.Bool32 VariableSampleLocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerFilterMinmaxProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerFilterMinmaxProperties.gen.cs new file mode 100644 index 0000000..f8ff378 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerFilterMinmaxProperties.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSamplerFilterMinmaxProperties - Structure describing sampler filter minmax limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceSamplerFilterMinmaxProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceSamplerFilterMinmaxProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 filterMinmaxSingleComponentFormats; + /// VkBool32 filterMinmaxImageComponentMapping; + /// } VkPhysicalDeviceSamplerFilterMinmaxProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSamplerFilterMinmaxProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSamplerFilterMinmaxProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FilterMinmaxSingleComponentFormats + /// + [FieldOffset(16)] + public Brutal.Bool32 FilterMinmaxSingleComponentFormats; + + /// + /// FilterMinmaxImageComponentMapping + /// + [FieldOffset(20)] + public Brutal.Bool32 FilterMinmaxImageComponentMapping; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerYCbCrConversionFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerYCbCrConversionFeatures.gen.cs new file mode 100644 index 0000000..fb8ccca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSamplerYCbCrConversionFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSamplerYcbcrConversionFeatures - Structure describing {YCbCr} conversion features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceSamplerYcbcrConversionFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 samplerYcbcrConversion; + /// } VkPhysicalDeviceSamplerYcbcrConversionFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSamplerYCbCrConversionFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSamplerYCbCrConversionFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SamplerYcbcrConversion + /// + [FieldOffset(16)] + public Brutal.Bool32 SamplerYcbcrConversion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceScalarBlockLayoutFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceScalarBlockLayoutFeatures.gen.cs new file mode 100644 index 0000000..8e30d3e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceScalarBlockLayoutFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceScalarBlockLayoutFeatures - Structure indicating support for scalar block layouts + /// + /// + /// + /// The VkPhysicalDeviceScalarBlockLayoutFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceScalarBlockLayoutFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 scalarBlockLayout; + /// } VkPhysicalDeviceScalarBlockLayoutFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceScalarBlockLayoutFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceScalarBlockLayoutFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ScalarBlockLayout + /// + [FieldOffset(16)] + public Brutal.Bool32 ScalarBlockLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM.gen.cs new file mode 100644 index 0000000..add62b7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM - Structure containing scheduling control dispatch parameters properties of a physical device + /// + /// + /// + /// The VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM + /// structure is defined as: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// typedef struct VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t schedulingControlsMaxWarpsCount; + /// uint32_t schedulingControlsMaxQueuedBatchesCount; + /// uint32_t schedulingControlsMaxWorkGroupBatchSize; + /// } VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceSchedulingControlsDispatchParametersPropertiesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SchedulingControlsMaxWarpsCount + /// + [FieldOffset(16)] + public int SchedulingControlsMaxWarpsCount; + + /// + /// SchedulingControlsMaxQueuedBatchesCount + /// + [FieldOffset(20)] + public int SchedulingControlsMaxQueuedBatchesCount; + + /// + /// SchedulingControlsMaxWorkGroupBatchSize + /// + [FieldOffset(24)] + public int SchedulingControlsMaxWorkGroupBatchSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsFeaturesARM.gen.cs new file mode 100644 index 0000000..6a9e421 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSchedulingControlsFeaturesARM - Structure describing scheduling controls features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceSchedulingControlsFeaturesARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// typedef struct VkPhysicalDeviceSchedulingControlsFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 schedulingControls; + /// } VkPhysicalDeviceSchedulingControlsFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSchedulingControlsFeaturesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSchedulingControlsFeaturesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SchedulingControls + /// + [FieldOffset(16)] + public Brutal.Bool32 SchedulingControls; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsPropertiesARM.gen.cs new file mode 100644 index 0000000..7d5e2cf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSchedulingControlsPropertiesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSchedulingControlsPropertiesARM - Structure containing scheduling control properties of a physical device + /// + /// + /// + /// The VkPhysicalDeviceSchedulingControlsPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_scheduling_controls + /// typedef struct VkPhysicalDeviceSchedulingControlsPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags; + /// } VkPhysicalDeviceSchedulingControlsPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSchedulingControlsPropertiesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSchedulingControlsPropertiesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SchedulingControlsFlags + /// + [FieldOffset(16)] + public VkPhysicalDeviceSchedulingControlsFlagsARM SchedulingControlsFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.gen.cs new file mode 100644 index 0000000..100b9f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures - Structure describing whether the implementation can do depth and stencil image barriers separately + /// + /// + /// + /// The VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 separateDepthStencilLayouts; + /// } VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSeparateDepthStencilLayoutsFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SeparateDepthStencilLayouts + /// + [FieldOffset(16)] + public Brutal.Bool32 SeparateDepthStencilLayouts; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShader64BitIndexingFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShader64BitIndexingFeaturesEXT.gen.cs new file mode 100644 index 0000000..b46749a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShader64BitIndexingFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShader64BitIndexingFeaturesEXT - Structure describing 64-bit indexing features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShader64BitIndexingFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_64bit_indexing + /// typedef struct VkPhysicalDeviceShader64BitIndexingFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shader64BitIndexing; + /// } VkPhysicalDeviceShader64BitIndexingFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShader64BitIndexingFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShader64BitIndexingFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Shader64BitIndexing + /// + [FieldOffset(16)] + public Brutal.Bool32 Shader64BitIndexing; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortFeaturesKHR.gen.cs new file mode 100644 index 0000000..49d8210 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortFeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderAbortFeaturesKHR - Structure describing whether shader abort is supported or not + /// + /// + /// + /// The VkPhysicalDeviceShaderAbortFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_abort + /// typedef struct VkPhysicalDeviceShaderAbortFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderAbort; + /// } VkPhysicalDeviceShaderAbortFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderAbortFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderAbortFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderAbort + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderAbort; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortPropertiesKHR.gen.cs new file mode 100644 index 0000000..cd3db85 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAbortPropertiesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderAbortPropertiesKHR - Structure describing the maximum size of a shader abort message + /// + /// + /// + /// The VkPhysicalDeviceShaderAbortPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_abort + /// typedef struct VkPhysicalDeviceShaderAbortPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t maxShaderAbortMessageSize; + /// } VkPhysicalDeviceShaderAbortPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderAbortPropertiesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderAbortPropertiesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxShaderAbortMessageSize + /// + [FieldOffset(16)] + public nint MaxShaderAbortMessageSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.gen.cs new file mode 100644 index 0000000..aba0f13 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV - Structure describing features supported by VK_NV_shader_atomic_float16_vector + /// + /// + /// + /// The VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_shader_atomic_float16_vector + /// typedef struct VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderFloat16VectorAtomics; + /// } VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderFloat16VectorAtomics + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderFloat16VectorAtomics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.gen.cs new file mode 100644 index 0000000..b49b377 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.gen.cs @@ -0,0 +1,118 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT - Structure describing features supported by VK_EXT_shader_atomic_float2 + /// + /// + /// + /// The VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_atomic_float2 + /// typedef struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderBufferFloat16Atomics; + /// VkBool32 shaderBufferFloat16AtomicAdd; + /// VkBool32 shaderBufferFloat16AtomicMinMax; + /// VkBool32 shaderBufferFloat32AtomicMinMax; + /// VkBool32 shaderBufferFloat64AtomicMinMax; + /// VkBool32 shaderSharedFloat16Atomics; + /// VkBool32 shaderSharedFloat16AtomicAdd; + /// VkBool32 shaderSharedFloat16AtomicMinMax; + /// VkBool32 shaderSharedFloat32AtomicMinMax; + /// VkBool32 shaderSharedFloat64AtomicMinMax; + /// VkBool32 shaderImageFloat32AtomicMinMax; + /// VkBool32 sparseImageFloat32AtomicMinMax; + /// } VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderAtomicFloat2FeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderBufferFloat16Atomics + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderBufferFloat16Atomics; + + /// + /// ShaderBufferFloat16AtomicAdd + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderBufferFloat16AtomicAdd; + + /// + /// ShaderBufferFloat16AtomicMinMax + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderBufferFloat16AtomicMinMax; + + /// + /// ShaderBufferFloat32AtomicMinMax + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderBufferFloat32AtomicMinMax; + + /// + /// ShaderBufferFloat64AtomicMinMax + /// + [FieldOffset(32)] + public Brutal.Bool32 ShaderBufferFloat64AtomicMinMax; + + /// + /// ShaderSharedFloat16Atomics + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderSharedFloat16Atomics; + + /// + /// ShaderSharedFloat16AtomicAdd + /// + [FieldOffset(40)] + public Brutal.Bool32 ShaderSharedFloat16AtomicAdd; + + /// + /// ShaderSharedFloat16AtomicMinMax + /// + [FieldOffset(44)] + public Brutal.Bool32 ShaderSharedFloat16AtomicMinMax; + + /// + /// ShaderSharedFloat32AtomicMinMax + /// + [FieldOffset(48)] + public Brutal.Bool32 ShaderSharedFloat32AtomicMinMax; + + /// + /// ShaderSharedFloat64AtomicMinMax + /// + [FieldOffset(52)] + public Brutal.Bool32 ShaderSharedFloat64AtomicMinMax; + + /// + /// ShaderImageFloat32AtomicMinMax + /// + [FieldOffset(56)] + public Brutal.Bool32 ShaderImageFloat32AtomicMinMax; + + /// + /// SparseImageFloat32AtomicMinMax + /// + [FieldOffset(60)] + public Brutal.Bool32 SparseImageFloat32AtomicMinMax; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.gen.cs new file mode 100644 index 0000000..aeb310a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.gen.cs @@ -0,0 +1,118 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderAtomicFloatFeaturesEXT - Structure describing features supported by VK_EXT_shader_atomic_float + /// + /// + /// + /// The VkPhysicalDeviceShaderAtomicFloatFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_atomic_float + /// typedef struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderBufferFloat32Atomics; + /// VkBool32 shaderBufferFloat32AtomicAdd; + /// VkBool32 shaderBufferFloat64Atomics; + /// VkBool32 shaderBufferFloat64AtomicAdd; + /// VkBool32 shaderSharedFloat32Atomics; + /// VkBool32 shaderSharedFloat32AtomicAdd; + /// VkBool32 shaderSharedFloat64Atomics; + /// VkBool32 shaderSharedFloat64AtomicAdd; + /// VkBool32 shaderImageFloat32Atomics; + /// VkBool32 shaderImageFloat32AtomicAdd; + /// VkBool32 sparseImageFloat32Atomics; + /// VkBool32 sparseImageFloat32AtomicAdd; + /// } VkPhysicalDeviceShaderAtomicFloatFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderAtomicFloatFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderBufferFloat32Atomics + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderBufferFloat32Atomics; + + /// + /// ShaderBufferFloat32AtomicAdd + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderBufferFloat32AtomicAdd; + + /// + /// ShaderBufferFloat64Atomics + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderBufferFloat64Atomics; + + /// + /// ShaderBufferFloat64AtomicAdd + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderBufferFloat64AtomicAdd; + + /// + /// ShaderSharedFloat32Atomics + /// + [FieldOffset(32)] + public Brutal.Bool32 ShaderSharedFloat32Atomics; + + /// + /// ShaderSharedFloat32AtomicAdd + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderSharedFloat32AtomicAdd; + + /// + /// ShaderSharedFloat64Atomics + /// + [FieldOffset(40)] + public Brutal.Bool32 ShaderSharedFloat64Atomics; + + /// + /// ShaderSharedFloat64AtomicAdd + /// + [FieldOffset(44)] + public Brutal.Bool32 ShaderSharedFloat64AtomicAdd; + + /// + /// ShaderImageFloat32Atomics + /// + [FieldOffset(48)] + public Brutal.Bool32 ShaderImageFloat32Atomics; + + /// + /// ShaderImageFloat32AtomicAdd + /// + [FieldOffset(52)] + public Brutal.Bool32 ShaderImageFloat32AtomicAdd; + + /// + /// SparseImageFloat32Atomics + /// + [FieldOffset(56)] + public Brutal.Bool32 SparseImageFloat32Atomics; + + /// + /// SparseImageFloat32AtomicAdd + /// + [FieldOffset(60)] + public Brutal.Bool32 SparseImageFloat32AtomicAdd; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicInt64Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicInt64Features.gen.cs new file mode 100644 index 0000000..3fac76c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderAtomicInt64Features.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderAtomicInt64Features - Structure describing features supported by VK_KHR_shader_atomic_int64 + /// + /// + /// + /// The VkPhysicalDeviceShaderAtomicInt64Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceShaderAtomicInt64Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderBufferInt64Atomics; + /// VkBool32 shaderSharedInt64Atomics; + /// } VkPhysicalDeviceShaderAtomicInt64Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderAtomicInt64Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderAtomicInt64Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderBufferInt64Atomics + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderBufferInt64Atomics; + + /// + /// ShaderSharedInt64Atomics + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderSharedInt64Atomics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderBfloat16FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderBfloat16FeaturesKHR.gen.cs new file mode 100644 index 0000000..d6dca88 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderBfloat16FeaturesKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderBfloat16FeaturesKHR - Structure describing bfloat16 features that can be supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderBfloat16FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_bfloat16 + /// typedef struct VkPhysicalDeviceShaderBfloat16FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderBFloat16Type; + /// VkBool32 shaderBFloat16DotProduct; + /// VkBool32 shaderBFloat16CooperativeMatrix; + /// } VkPhysicalDeviceShaderBfloat16FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderBfloat16FeaturesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderBfloat16FeaturesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderBFloat16Type + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderBFloat16Type; + + /// + /// ShaderBFloat16DotProduct + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderBFloat16DotProduct; + + /// + /// ShaderBFloat16CooperativeMatrix + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderBFloat16CooperativeMatrix; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderClockFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderClockFeaturesKHR.gen.cs new file mode 100644 index 0000000..b507f35 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderClockFeaturesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderClockFeaturesKHR - Structure describing features supported by VK_KHR_shader_clock + /// + /// + /// + /// The VkPhysicalDeviceShaderClockFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_clock + /// typedef struct VkPhysicalDeviceShaderClockFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSubgroupClock; + /// VkBool32 shaderDeviceClock; + /// } VkPhysicalDeviceShaderClockFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderClockFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderClockFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSubgroupClock + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSubgroupClock; + + /// + /// ShaderDeviceClock + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderDeviceClock; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderConstantDataFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderConstantDataFeaturesKHR.gen.cs new file mode 100644 index 0000000..d881b15 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderConstantDataFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderConstantDataFeaturesKHR - Structure describing support for VK_KHR_shader_constant_data in an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderConstantDataFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_shader_constant_data + /// typedef struct VkPhysicalDeviceShaderConstantDataFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderConstantData; + /// } VkPhysicalDeviceShaderConstantDataFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderConstantDataFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderConstantDataFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderConstantData + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderConstantData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.gen.cs new file mode 100644 index 0000000..2f2e77d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM - Structure describing the shader core builtins features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_shader_core_builtins + /// typedef struct VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderCoreBuiltins; + /// } VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderCoreBuiltinsFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderCoreBuiltins + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderCoreBuiltins; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.gen.cs new file mode 100644 index 0000000..d8e1c7b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM - Structure describing shader core builtins properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_shader_core_builtins + /// typedef struct VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t shaderCoreMask; + /// uint32_t shaderCoreCount; + /// uint32_t shaderWarpsPerCore; + /// } VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderCoreBuiltinsPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderCoreMask + /// + [FieldOffset(16)] + public nint ShaderCoreMask; + + /// + /// ShaderCoreCount + /// + [FieldOffset(24)] + public int ShaderCoreCount; + + /// + /// ShaderWarpsPerCore + /// + [FieldOffset(28)] + public int ShaderWarpsPerCore; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreProperties2AMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreProperties2AMD.gen.cs new file mode 100644 index 0000000..023c5ca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCoreProperties2AMD.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderCoreProperties2AMD - Structure describing shader core properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderCoreProperties2AMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_shader_core_properties2 + /// typedef struct VkPhysicalDeviceShaderCoreProperties2AMD { + /// VkStructureType sType; + /// void* pNext; + /// VkShaderCorePropertiesFlagsAMD shaderCoreFeatures; + /// uint32_t activeComputeUnitCount; + /// } VkPhysicalDeviceShaderCoreProperties2AMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderCoreProperties2AMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderCoreProperties2AMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderCoreFeatures + /// + [FieldOffset(16)] + public VkShaderCorePropertiesFlagsAMD ShaderCoreFeatures; + + /// + /// ActiveComputeUnitCount + /// + [FieldOffset(20)] + public int ActiveComputeUnitCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesAMD.gen.cs new file mode 100644 index 0000000..dbf96ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesAMD.gen.cs @@ -0,0 +1,131 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderCorePropertiesAMD - Structure describing shader core properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderCorePropertiesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_shader_core_properties + /// typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t shaderEngineCount; + /// uint32_t shaderArraysPerEngineCount; + /// uint32_t computeUnitsPerShaderArray; + /// uint32_t simdPerComputeUnit; + /// uint32_t wavefrontsPerSimd; + /// uint32_t wavefrontSize; + /// uint32_t sgprsPerSimd; + /// uint32_t minSgprAllocation; + /// uint32_t maxSgprAllocation; + /// uint32_t sgprAllocationGranularity; + /// uint32_t vgprsPerSimd; + /// uint32_t minVgprAllocation; + /// uint32_t maxVgprAllocation; + /// uint32_t vgprAllocationGranularity; + /// } VkPhysicalDeviceShaderCorePropertiesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkPhysicalDeviceShaderCorePropertiesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderCorePropertiesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderEngineCount + /// + [FieldOffset(16)] + public int ShaderEngineCount; + + /// + /// ShaderArraysPerEngineCount + /// + [FieldOffset(20)] + public int ShaderArraysPerEngineCount; + + /// + /// ComputeUnitsPerShaderArray + /// + [FieldOffset(24)] + public int ComputeUnitsPerShaderArray; + + /// + /// SimdPerComputeUnit + /// + [FieldOffset(28)] + public int SimdPerComputeUnit; + + /// + /// WavefrontsPerSimd + /// + [FieldOffset(32)] + public int WavefrontsPerSimd; + + /// + /// WavefrontSize + /// + [FieldOffset(36)] + public int WavefrontSize; + + /// + /// SgprsPerSimd + /// + [FieldOffset(40)] + public int SgprsPerSimd; + + /// + /// MinSgprAllocation + /// + [FieldOffset(44)] + public int MinSgprAllocation; + + /// + /// MaxSgprAllocation + /// + [FieldOffset(48)] + public int MaxSgprAllocation; + + /// + /// SgprAllocationGranularity + /// + [FieldOffset(52)] + public int SgprAllocationGranularity; + + /// + /// VgprsPerSimd + /// + [FieldOffset(56)] + public int VgprsPerSimd; + + /// + /// MinVgprAllocation + /// + [FieldOffset(60)] + public int MinVgprAllocation; + + /// + /// MaxVgprAllocation + /// + [FieldOffset(64)] + public int MaxVgprAllocation; + + /// + /// VgprAllocationGranularity + /// + [FieldOffset(68)] + public int VgprAllocationGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesARM.gen.cs new file mode 100644 index 0000000..87365f6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderCorePropertiesARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderCorePropertiesARM - Structure describing shader core properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderCorePropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_shader_core_properties + /// typedef struct VkPhysicalDeviceShaderCorePropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t pixelRate; + /// uint32_t texelRate; + /// uint32_t fmaRate; + /// } VkPhysicalDeviceShaderCorePropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderCorePropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderCorePropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PixelRate is an unsigned integer value indicating the maximum number of pixels output per clock per shader core. + /// + [FieldOffset(16)] + public int PixelRate; + + /// + /// TexelRate is an unsigned integer value indicating the maximum number of texels per clock per shader core. + /// + [FieldOffset(20)] + public int TexelRate; + + /// + /// FmaRate is an unsigned integer value indicating the maximum number of single-precision fused multiply-add operations per clock per shader core. + /// + [FieldOffset(24)] + public int FmaRate; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.gen.cs new file mode 100644 index 0000000..c7d5bc9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures - Structure describing the shader demote to helper invocations features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures structure + /// is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderDemoteToHelperInvocation; + /// } VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderDemoteToHelperInvocationFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderDemoteToHelperInvocation + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderDemoteToHelperInvocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDrawParametersFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDrawParametersFeatures.gen.cs new file mode 100644 index 0000000..6d58061 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderDrawParametersFeatures.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderDrawParametersFeatures - Structure describing shader draw parameter features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderDrawParametersFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceShaderDrawParametersFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderDrawParameters; + /// } VkPhysicalDeviceShaderDrawParametersFeatures; + /// + /// + /// // Provided by VK_VERSION_1_1 + /// // Equivalent to VkPhysicalDeviceShaderDrawParametersFeatures + /// typedef VkPhysicalDeviceShaderDrawParametersFeatures VkPhysicalDeviceShaderDrawParameterFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderDrawParametersFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderDrawParametersFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderDrawParameters + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderDrawParameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.gen.cs new file mode 100644 index 0000000..472dc37 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD - Structure describing whether early and late fragment tests can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD + /// structure is defined as: + /// + /// + /// // Provided by VK_AMD_shader_early_and_late_fragment_tests + /// typedef struct VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderEarlyAndLateFragmentTests; + /// } VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderEarlyAndLateFragmentTests + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderEarlyAndLateFragmentTests; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderExpectAssumeFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderExpectAssumeFeatures.gen.cs new file mode 100644 index 0000000..f0568d0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderExpectAssumeFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderExpectAssumeFeatures - Structure describing shader expect assume features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderExpectAssumeFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceShaderExpectAssumeFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderExpectAssume; + /// } VkPhysicalDeviceShaderExpectAssumeFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderExpectAssumeFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderExpectAssumeFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderExpectAssume + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderExpectAssume; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat16Int8Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat16Int8Features.gen.cs new file mode 100644 index 0000000..bbfbdd3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat16Int8Features.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderFloat16Int8Features - Structure describing features supported by VK_KHR_shader_float16_int8 + /// + /// + /// + /// The VkPhysicalDeviceShaderFloat16Int8Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceShaderFloat16Int8Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderFloat16; + /// VkBool32 shaderInt8; + /// } VkPhysicalDeviceShaderFloat16Int8Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderFloat16Int8Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderFloat16Int8Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderFloat16 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderFloat16; + + /// + /// ShaderInt8 + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderInt8; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat8FeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat8FeaturesEXT.gen.cs new file mode 100644 index 0000000..7659138 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloat8FeaturesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderFloat8FeaturesEXT - Structure describing float8 features that can be supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderFloat8FeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_float8 + /// typedef struct VkPhysicalDeviceShaderFloat8FeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderFloat8; + /// VkBool32 shaderFloat8CooperativeMatrix; + /// } VkPhysicalDeviceShaderFloat8FeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderFloat8FeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderFloat8FeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderFloat8 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderFloat8; + + /// + /// ShaderFloat8CooperativeMatrix + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderFloat8CooperativeMatrix; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloatControls2Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloatControls2Features.gen.cs new file mode 100644 index 0000000..f496f33 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFloatControls2Features.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderFloatControls2Features - Structure describing shader float controls 2 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderFloatControls2Features structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceShaderFloatControls2Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderFloatControls2; + /// } VkPhysicalDeviceShaderFloatControls2Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderFloatControls2Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderFloatControls2Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderFloatControls2 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderFloatControls2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFmaFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFmaFeaturesKHR.gen.cs new file mode 100644 index 0000000..856aa08 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderFmaFeaturesKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderFmaFeaturesKHR - Structure indicating support for SPV_KHR_fma OpFmaKHR + /// + /// + /// + /// The VkPhysicalDeviceShaderFmaFeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_fma + /// typedef struct VkPhysicalDeviceShaderFmaFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderFmaFloat16; + /// VkBool32 shaderFmaFloat32; + /// VkBool32 shaderFmaFloat64; + /// } VkPhysicalDeviceShaderFmaFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderFmaFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderFmaFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderFmaFloat16 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderFmaFloat16; + + /// + /// ShaderFmaFloat32 + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderFmaFloat32; + + /// + /// ShaderFmaFloat64 + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderFmaFloat64; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.gen.cs new file mode 100644 index 0000000..b3f0159 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT - Structure describing features supported by VK_EXT_shader_image_atomic_int64 + /// + /// + /// + /// The VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_image_atomic_int64 + /// typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderImageInt64Atomics; + /// VkBool32 sparseImageInt64Atomics; + /// } VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderImageAtomicInt64FeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderImageInt64Atomics + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderImageInt64Atomics; + + /// + /// SparseImageInt64Atomics + /// + [FieldOffset(20)] + public Brutal.Bool32 SparseImageInt64Atomics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageFootprintFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageFootprintFeaturesNV.gen.cs new file mode 100644 index 0000000..6d34b78 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderImageFootprintFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderImageFootprintFeaturesNV - Structure describing shader image footprint features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderImageFootprintFeaturesNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_shader_image_footprint + /// typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 imageFootprint; + /// } VkPhysicalDeviceShaderImageFootprintFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderImageFootprintFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderImageFootprintFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageFootprint + /// + [FieldOffset(16)] + public Brutal.Bool32 ImageFootprint; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationFeaturesARM.gen.cs new file mode 100644 index 0000000..332fc4c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationFeaturesARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderInstrumentationFeaturesARM - Structure describing support for shader instrumentation + /// + /// + /// + /// The VkPhysicalDeviceShaderInstrumentationFeaturesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// typedef struct VkPhysicalDeviceShaderInstrumentationFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderInstrumentation; + /// } VkPhysicalDeviceShaderInstrumentationFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderInstrumentationFeaturesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderInstrumentationFeaturesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderInstrumentation + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderInstrumentation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationPropertiesARM.gen.cs new file mode 100644 index 0000000..ce67aeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderInstrumentationPropertiesARM.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderInstrumentationPropertiesARM - Structure describing shader instrumentation properties for a physical device + /// + /// + /// + /// The VkPhysicalDeviceShaderInstrumentationPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// typedef struct VkPhysicalDeviceShaderInstrumentationPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t numMetrics; + /// VkBool32 perBasicBlockGranularity; + /// } VkPhysicalDeviceShaderInstrumentationPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderInstrumentationPropertiesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderInstrumentationPropertiesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NumMetrics + /// + [FieldOffset(16)] + public int NumMetrics; + + /// + /// PerBasicBlockGranularity + /// + [FieldOffset(20)] + public Brutal.Bool32 PerBasicBlockGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductFeatures.gen.cs new file mode 100644 index 0000000..a5db6f7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderIntegerDotProductFeatures - Structure describing integer dot product features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderIntegerDotProductFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceShaderIntegerDotProductFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderIntegerDotProduct; + /// } VkPhysicalDeviceShaderIntegerDotProductFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderIntegerDotProductFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderIntegerDotProductFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderIntegerDotProduct + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderIntegerDotProduct; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductProperties.gen.cs new file mode 100644 index 0000000..2c732bd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerDotProductProperties.gen.cs @@ -0,0 +1,244 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderIntegerDotProductProperties - Structure containing information about integer dot product support for a physical device + /// + /// + /// + /// The VkPhysicalDeviceShaderIntegerDotProductProperties structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceShaderIntegerDotProductProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 integerDotProduct8BitUnsignedAccelerated; + /// VkBool32 integerDotProduct8BitSignedAccelerated; + /// VkBool32 integerDotProduct8BitMixedSignednessAccelerated; + /// VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated; + /// VkBool32 integerDotProduct4x8BitPackedSignedAccelerated; + /// VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated; + /// VkBool32 integerDotProduct16BitUnsignedAccelerated; + /// VkBool32 integerDotProduct16BitSignedAccelerated; + /// VkBool32 integerDotProduct16BitMixedSignednessAccelerated; + /// VkBool32 integerDotProduct32BitUnsignedAccelerated; + /// VkBool32 integerDotProduct32BitSignedAccelerated; + /// VkBool32 integerDotProduct32BitMixedSignednessAccelerated; + /// VkBool32 integerDotProduct64BitUnsignedAccelerated; + /// VkBool32 integerDotProduct64BitSignedAccelerated; + /// VkBool32 integerDotProduct64BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; + /// } VkPhysicalDeviceShaderIntegerDotProductProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 136)] + public unsafe partial struct VkPhysicalDeviceShaderIntegerDotProductProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderIntegerDotProductProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IntegerDotProduct8BitUnsignedAccelerated + /// + [FieldOffset(16)] + public Brutal.Bool32 IntegerDotProduct8BitUnsignedAccelerated; + + /// + /// IntegerDotProduct8BitSignedAccelerated + /// + [FieldOffset(20)] + public Brutal.Bool32 IntegerDotProduct8BitSignedAccelerated; + + /// + /// IntegerDotProduct8BitMixedSignednessAccelerated + /// + [FieldOffset(24)] + public Brutal.Bool32 IntegerDotProduct8BitMixedSignednessAccelerated; + + /// + /// IntegerDotProduct4x8BitPackedUnsignedAccelerated + /// + [FieldOffset(28)] + public Brutal.Bool32 IntegerDotProduct4x8BitPackedUnsignedAccelerated; + + /// + /// IntegerDotProduct4x8BitPackedSignedAccelerated + /// + [FieldOffset(32)] + public Brutal.Bool32 IntegerDotProduct4x8BitPackedSignedAccelerated; + + /// + /// IntegerDotProduct4x8BitPackedMixedSignednessAccelerated + /// + [FieldOffset(36)] + public Brutal.Bool32 IntegerDotProduct4x8BitPackedMixedSignednessAccelerated; + + /// + /// IntegerDotProduct16BitUnsignedAccelerated + /// + [FieldOffset(40)] + public Brutal.Bool32 IntegerDotProduct16BitUnsignedAccelerated; + + /// + /// IntegerDotProduct16BitSignedAccelerated + /// + [FieldOffset(44)] + public Brutal.Bool32 IntegerDotProduct16BitSignedAccelerated; + + /// + /// IntegerDotProduct16BitMixedSignednessAccelerated + /// + [FieldOffset(48)] + public Brutal.Bool32 IntegerDotProduct16BitMixedSignednessAccelerated; + + /// + /// IntegerDotProduct32BitUnsignedAccelerated + /// + [FieldOffset(52)] + public Brutal.Bool32 IntegerDotProduct32BitUnsignedAccelerated; + + /// + /// IntegerDotProduct32BitSignedAccelerated + /// + [FieldOffset(56)] + public Brutal.Bool32 IntegerDotProduct32BitSignedAccelerated; + + /// + /// IntegerDotProduct32BitMixedSignednessAccelerated + /// + [FieldOffset(60)] + public Brutal.Bool32 IntegerDotProduct32BitMixedSignednessAccelerated; + + /// + /// IntegerDotProduct64BitUnsignedAccelerated + /// + [FieldOffset(64)] + public Brutal.Bool32 IntegerDotProduct64BitUnsignedAccelerated; + + /// + /// IntegerDotProduct64BitSignedAccelerated + /// + [FieldOffset(68)] + public Brutal.Bool32 IntegerDotProduct64BitSignedAccelerated; + + /// + /// IntegerDotProduct64BitMixedSignednessAccelerated + /// + [FieldOffset(72)] + public Brutal.Bool32 IntegerDotProduct64BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating8BitUnsignedAccelerated + /// + [FieldOffset(76)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating8BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating8BitSignedAccelerated + /// + [FieldOffset(80)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating8BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated + /// + [FieldOffset(84)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated + /// + [FieldOffset(88)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated + /// + [FieldOffset(92)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated + /// + [FieldOffset(96)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating16BitUnsignedAccelerated + /// + [FieldOffset(100)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating16BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating16BitSignedAccelerated + /// + [FieldOffset(104)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating16BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated + /// + [FieldOffset(108)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating32BitUnsignedAccelerated + /// + [FieldOffset(112)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating32BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating32BitSignedAccelerated + /// + [FieldOffset(116)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating32BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated + /// + [FieldOffset(120)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating64BitUnsignedAccelerated + /// + [FieldOffset(124)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating64BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating64BitSignedAccelerated + /// + [FieldOffset(128)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating64BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated + /// + [FieldOffset(132)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.gen.cs new file mode 100644 index 0000000..e081bc9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL - Structure describing shader integer functions that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL structure is + /// defined as: + /// + /// + /// // Provided by VK_INTEL_shader_integer_functions2 + /// typedef struct VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderIntegerFunctions2; + /// } VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderIntegerFunctions2 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderIntegerFunctions2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorFeaturesEXT.gen.cs new file mode 100644 index 0000000..79cbb86 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderLongVectorFeaturesEXT - Structure describing long vector features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderLongVectorFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_long_vector + /// typedef struct VkPhysicalDeviceShaderLongVectorFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 longVector; + /// } VkPhysicalDeviceShaderLongVectorFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderLongVectorFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderLongVectorFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LongVector + /// + [FieldOffset(16)] + public Brutal.Bool32 LongVector; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorPropertiesEXT.gen.cs new file mode 100644 index 0000000..22d8560 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderLongVectorPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderLongVectorPropertiesEXT - Structure describing long vector properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderLongVectorPropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_long_vector + /// typedef struct VkPhysicalDeviceShaderLongVectorPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxVectorComponents; + /// } VkPhysicalDeviceShaderLongVectorPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderLongVectorPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderLongVectorPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxVectorComponents + /// + [FieldOffset(16)] + public int MaxVectorComponents; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.gen.cs new file mode 100644 index 0000000..71fb203 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR - Structure describing support for shader maximal reconvergence by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_shader_maximal_reconvergence + /// typedef struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderMaximalReconvergence; + /// } VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderMaximalReconvergence + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderMaximalReconvergence; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE.gen.cs new file mode 100644 index 0000000..4b043a6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE - Structure describing support for mixed float dot products + /// + /// + /// + /// The VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE structure + /// is defined as: + /// + /// + /// // Provided by VK_VALVE_shader_mixed_float_dot_product + /// typedef struct VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderMixedFloatDotProductFloat16AccFloat32; + /// VkBool32 shaderMixedFloatDotProductFloat16AccFloat16; + /// VkBool32 shaderMixedFloatDotProductBFloat16Acc; + /// VkBool32 shaderMixedFloatDotProductFloat8AccFloat32; + /// } VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderMixedFloatDotProductFloat16AccFloat32 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderMixedFloatDotProductFloat16AccFloat32; + + /// + /// ShaderMixedFloatDotProductFloat16AccFloat16 + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderMixedFloatDotProductFloat16AccFloat16; + + /// + /// ShaderMixedFloatDotProductBFloat16Acc + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderMixedFloatDotProductBFloat16Acc; + + /// + /// ShaderMixedFloatDotProductFloat8AccFloat32 + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderMixedFloatDotProductFloat8AccFloat32; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.gen.cs new file mode 100644 index 0000000..9b5df35 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT - Structure describing whether querying and providing an identifier of a shader module is supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_module_identifier + /// typedef struct VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderModuleIdentifier; + /// } VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderModuleIdentifierFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderModuleIdentifier + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderModuleIdentifier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs new file mode 100644 index 0000000..b3f8cb1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT.gen.cs @@ -0,0 +1,39 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT - Structure describing shader module identifier properties of an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_module_identifier + /// typedef struct VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint8_t shaderModuleIdentifierAlgorithmUUID[VK_UUID_SIZE]; + /// } VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderModuleIdentifierPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte ShaderModuleIdentifierAlgorithmUUID[16]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM.gen.cs new file mode 100644 index 0000000..dce4bb1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM - Structure describing whether shader multiple wait queues can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM structure is + /// defined as: + /// + /// + /// // Provided by VK_QCOM_shader_multiple_wait_queues + /// typedef struct VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderMultipleWaitQueues; + /// } VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderMultipleWaitQueuesFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderMultipleWaitQueues + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderMultipleWaitQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM.gen.cs new file mode 100644 index 0000000..7a98ca0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM - Structure describing shader multiple wait queues properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM structure + /// is defined as: + /// + /// + /// // Provided by VK_QCOM_shader_multiple_wait_queues + /// typedef struct VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxShaderWaitQueues; + /// } VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderMultipleWaitQueuesPropertiesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxShaderWaitQueues + /// + [FieldOffset(16)] + public int MaxShaderWaitQueues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT.gen.cs new file mode 100644 index 0000000..3ee9948 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT - Structure describing OCP microscaling types features that can be supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_ocp_microscaling_types + /// typedef struct VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderFloat4; + /// VkBool32 shaderFloat6; + /// VkBool32 shaderFloat8UnsignedE8M0; + /// VkBool32 shaderMXInt8; + /// } VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderOCPMicroscalingTypesFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderOcpMicroscalingTypesFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderFloat4 + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderFloat4; + + /// + /// ShaderFloat6 + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderFloat6; + + /// + /// ShaderFloat8UnsignedE8M0 + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderFloat8UnsignedE8M0; + + /// + /// ShaderMXInt8 + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderMXInt8; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectFeaturesEXT.gen.cs new file mode 100644 index 0000000..eaf06dd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectFeaturesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderObjectFeaturesEXT - Structure describing whether shader objects can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderObjectFeaturesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_object + /// typedef struct VkPhysicalDeviceShaderObjectFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderObject; + /// } VkPhysicalDeviceShaderObjectFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderObjectFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderObjectFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderObject + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderObject; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectPropertiesEXT.gen.cs new file mode 100644 index 0000000..de49d48 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderObjectPropertiesEXT.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderObjectPropertiesEXT - Structure describing shader object properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderObjectPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_object + /// typedef struct VkPhysicalDeviceShaderObjectPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint8_t shaderBinaryUUID[VK_UUID_SIZE]; + /// uint32_t shaderBinaryVersion; + /// } VkPhysicalDeviceShaderObjectPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceShaderObjectPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderObjectPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte ShaderBinaryUUID[16]; + + /// + /// ShaderBinaryVersion + /// + [FieldOffset(32)] + public int ShaderBinaryVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderQuadControlFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderQuadControlFeaturesKHR.gen.cs new file mode 100644 index 0000000..4ce57ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderQuadControlFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderQuadControlFeaturesKHR - Structure describing whether quad scopes are supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderQuadControlFeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_shader_quad_control + /// typedef struct VkPhysicalDeviceShaderQuadControlFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderQuadControl; + /// } VkPhysicalDeviceShaderQuadControlFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderQuadControlFeaturesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderQuadControlFeaturesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderQuadControl + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderQuadControl; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.gen.cs new file mode 100644 index 0000000..8fec64b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR - Structure describing support for VK_KHR_shader_relaxed_extended_instruction an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR + /// structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_relaxed_extended_instruction + /// typedef struct VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderRelaxedExtendedInstruction; + /// } VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderRelaxedExtendedInstruction + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderRelaxedExtendedInstruction; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.gen.cs new file mode 100644 index 0000000..f4c338e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT - Structure describing whether support for replicated composites in SPIR-V is enabled + /// + /// + /// + /// The VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_replicated_composites + /// typedef struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderReplicatedComposites; + /// } VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderReplicatedCompositesFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderReplicatedComposites + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderReplicatedComposites; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsFeaturesNV.gen.cs new file mode 100644 index 0000000..b585a06 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsFeaturesNV.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSMBuiltinsFeaturesNV - Structure describing the shader SM Builtins features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSMBuiltinsFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_shader_sm_builtins + /// typedef struct VkPhysicalDeviceShaderSMBuiltinsFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSMBuiltins; + /// } VkPhysicalDeviceShaderSMBuiltinsFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSmBuiltinsFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSmBuiltinsFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSMBuiltins + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSMBuiltins; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsPropertiesNV.gen.cs new file mode 100644 index 0000000..4c66fa9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSmBuiltinsPropertiesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSMBuiltinsPropertiesNV - Structure describing shader SM Builtins properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSMBuiltinsPropertiesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_shader_sm_builtins + /// typedef struct VkPhysicalDeviceShaderSMBuiltinsPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t shaderSMCount; + /// uint32_t shaderWarpsPerSM; + /// } VkPhysicalDeviceShaderSMBuiltinsPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSmBuiltinsPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSmBuiltinsPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSMCount + /// + [FieldOffset(16)] + public int ShaderSMCount; + + /// + /// ShaderWarpsPerSM + /// + [FieldOffset(20)] + public int ShaderWarpsPerSM; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierFeaturesEXT.gen.cs new file mode 100644 index 0000000..8d141ea --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSplitBarrierFeaturesEXT - Structure describing the shader split barrier features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSplitBarrierFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_split_barrier + /// typedef struct VkPhysicalDeviceShaderSplitBarrierFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSplitBarrier; + /// } VkPhysicalDeviceShaderSplitBarrierFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSplitBarrierFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSplitBarrierFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSplitBarrier + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSplitBarrier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierPropertiesEXT.gen.cs new file mode 100644 index 0000000..1426720 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSplitBarrierPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSplitBarrierPropertiesEXT - Structure describing split barrier properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSplitBarrierPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_split_barrier + /// typedef struct VkPhysicalDeviceShaderSplitBarrierPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t splitBarrierReservedSharedMemory; + /// } VkPhysicalDeviceShaderSplitBarrierPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSplitBarrierPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSplitBarrierPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SplitBarrierReservedSharedMemory + /// + [FieldOffset(16)] + public int SplitBarrierReservedSharedMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.gen.cs new file mode 100644 index 0000000..5703732 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures - Structure describing the extended types subgroups support feature for an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSubgroupExtendedTypes; + /// } VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSubgroupExtendedTypesFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSubgroupExtendedTypes + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSubgroupExtendedTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT.gen.cs new file mode 100644 index 0000000..5d7f418 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT - Structure describing shader subgroup partitioned features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_subgroup_partitioned + /// typedef struct VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSubgroupPartitioned; + /// } VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSubgroupPartitionedFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSubgroupPartitionedFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSubgroupPartitioned + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSubgroupPartitioned; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupRotateFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupRotateFeatures.gen.cs new file mode 100644 index 0000000..36b3471 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupRotateFeatures.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSubgroupRotateFeatures - Structure describing whether subgroup rotation is enabled + /// + /// + /// + /// The VkPhysicalDeviceShaderSubgroupRotateFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceShaderSubgroupRotateFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSubgroupRotate; + /// VkBool32 shaderSubgroupRotateClustered; + /// } VkPhysicalDeviceShaderSubgroupRotateFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSubgroupRotateFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderSubgroupRotateFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSubgroupRotate + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSubgroupRotate; + + /// + /// ShaderSubgroupRotateClustered + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderSubgroupRotateClustered; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.gen.cs new file mode 100644 index 0000000..68b1490 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR - Structure describing support for shader subgroup uniform control flow by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR + /// structure is defined as: + /// + /// + /// // Provided by VK_KHR_shader_subgroup_uniform_control_flow + /// typedef struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderSubgroupUniformControlFlow; + /// } VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderSubgroupUniformControlFlow + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderSubgroupUniformControlFlow; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTerminateInvocationFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTerminateInvocationFeatures.gen.cs new file mode 100644 index 0000000..da3983a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTerminateInvocationFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderTerminateInvocationFeatures - Structure describing support for the SPIR-V <c>SPV_KHR_terminate_invocation</c> extension + /// + /// + /// + /// The VkPhysicalDeviceShaderTerminateInvocationFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceShaderTerminateInvocationFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderTerminateInvocation; + /// } VkPhysicalDeviceShaderTerminateInvocationFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderTerminateInvocationFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderTerminateInvocationFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderTerminateInvocation + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderTerminateInvocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImageFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImageFeaturesEXT.gen.cs new file mode 100644 index 0000000..f04e11c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImageFeaturesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderTileImageFeaturesEXT - Structure describing tile image features supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderTileImageFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_tile_image + /// typedef struct VkPhysicalDeviceShaderTileImageFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderTileImageColorReadAccess; + /// VkBool32 shaderTileImageDepthReadAccess; + /// VkBool32 shaderTileImageStencilReadAccess; + /// } VkPhysicalDeviceShaderTileImageFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderTileImageFeaturesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderTileImageFeaturesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderTileImageColorReadAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderTileImageColorReadAccess; + + /// + /// ShaderTileImageDepthReadAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderTileImageDepthReadAccess; + + /// + /// ShaderTileImageStencilReadAccess + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderTileImageStencilReadAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImagePropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImagePropertiesEXT.gen.cs new file mode 100644 index 0000000..74ef961 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderTileImagePropertiesEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderTileImagePropertiesEXT - Structure containing information about tile image support for a physical device + /// + /// + /// + /// The VkPhysicalDeviceShaderTileImagePropertiesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_shader_tile_image + /// typedef struct VkPhysicalDeviceShaderTileImagePropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderTileImageCoherentReadAccelerated; + /// VkBool32 shaderTileImageReadSampleFromPixelRateInvocation; + /// VkBool32 shaderTileImageReadFromHelperInvocation; + /// } VkPhysicalDeviceShaderTileImagePropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShaderTileImagePropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderTileImagePropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderTileImageCoherentReadAccelerated is a boolean that will be VK_TRUE if coherent reads of tile image data is accelerated. + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderTileImageCoherentReadAccelerated; + + /// + /// ShaderTileImageReadSampleFromPixelRateInvocation is a boolean that will be VK_TRUE if reading from samples from a pixel rate fragment invocation is supported when VkPipelineMultisampleStateCreateInfo::rasterizationSamples > 1. + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderTileImageReadSampleFromPixelRateInvocation; + + /// + /// ShaderTileImageReadFromHelperInvocation is a boolean that will be VK_TRUE if reads of tile image data from helper fragment invocations result in valid values. + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderTileImageReadFromHelperInvocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT.gen.cs new file mode 100644 index 0000000..02ae0ff --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT - Structure describing uniform buffer unsized array features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT + /// structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_uniform_buffer_unsized_array + /// typedef struct VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderUniformBufferUnsizedArray; + /// } VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceShaderUniformBufferUnsizedArrayFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderUniformBufferUnsizedArray + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderUniformBufferUnsizedArray; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUntypedPointersFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUntypedPointersFeaturesKHR.gen.cs new file mode 100644 index 0000000..e9897d0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShaderUntypedPointersFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShaderUntypedPointersFeaturesKHR - Structure describing support for untyped pointers in shader by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShaderUntypedPointersFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_shader_untyped_pointers + /// typedef struct VkPhysicalDeviceShaderUntypedPointersFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderUntypedPointers; + /// } VkPhysicalDeviceShaderUntypedPointersFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShaderUntypedPointersFeaturesKHR() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShaderUntypedPointersFeaturesKHR; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderUntypedPointers + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderUntypedPointers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImageFeaturesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImageFeaturesNV.gen.cs new file mode 100644 index 0000000..4312076 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImageFeaturesNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShadingRateImageFeaturesNV - Structure describing shading rate image features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShadingRateImageFeaturesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkPhysicalDeviceShadingRateImageFeaturesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shadingRateImage; + /// VkBool32 shadingRateCoarseSampleOrder; + /// } VkPhysicalDeviceShadingRateImageFeaturesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceShadingRateImageFeaturesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShadingRateImageFeaturesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShadingRateImage + /// + [FieldOffset(16)] + public Brutal.Bool32 ShadingRateImage; + + /// + /// ShadingRateCoarseSampleOrder + /// + [FieldOffset(20)] + public Brutal.Bool32 ShadingRateCoarseSampleOrder; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImagePropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImagePropertiesNV.gen.cs new file mode 100644 index 0000000..f2c0e1a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceShadingRateImagePropertiesNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceShadingRateImagePropertiesNV - Structure describing shading rate image limits that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceShadingRateImagePropertiesNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkPhysicalDeviceShadingRateImagePropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D shadingRateTexelSize; + /// uint32_t shadingRatePaletteSize; + /// uint32_t shadingRateMaxCoarseSamples; + /// } VkPhysicalDeviceShadingRateImagePropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceShadingRateImagePropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceShadingRateImagePropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShadingRateTexelSize + /// + [FieldOffset(16)] + public VkExtent2D ShadingRateTexelSize; + + /// + /// ShadingRatePaletteSize + /// + [FieldOffset(24)] + public int ShadingRatePaletteSize; + + /// + /// ShadingRateMaxCoarseSamples + /// + [FieldOffset(28)] + public int ShadingRateMaxCoarseSamples; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseImageFormatInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseImageFormatInfo2.gen.cs new file mode 100644 index 0000000..fe303b2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseImageFormatInfo2.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSparseImageFormatInfo2 - Structure specifying sparse image format inputs + /// + /// + /// + /// The VkPhysicalDeviceSparseImageFormatInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceSparseImageFormatInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat format; + /// VkImageType type; + /// VkSampleCountFlagBits samples; + /// VkImageUsageFlags usage; + /// VkImageTiling tiling; + /// } VkPhysicalDeviceSparseImageFormatInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceSparseImageFormatInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSparseImageFormatInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is the image format. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// Type is the dimensionality of the image. + /// + [FieldOffset(20)] + public VkImageType Type; + + /// + /// Samples is a VkSampleCountFlags value specifying the number of samples per texel. + /// + [FieldOffset(24)] + public VkSampleCountFlags Samples; + + /// + /// Usage is a bitmask of VkImageUsageFlags describing the intended usage of the image. + /// + [FieldOffset(28)] + public VkImageUsageFlags Usage; + + /// + /// Tiling is the tiling arrangement of the texel blocks in memory. + /// + [FieldOffset(32)] + public VkImageTiling Tiling; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseProperties.gen.cs new file mode 100644 index 0000000..fc27cce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSparseProperties.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSparseProperties - Structure specifying physical device sparse memory properties + /// + /// + /// + /// The VkPhysicalDeviceSparseProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPhysicalDeviceSparseProperties { + /// VkBool32 residencyStandard2DBlockShape; + /// VkBool32 residencyStandard2DMultisampleBlockShape; + /// VkBool32 residencyStandard3DBlockShape; + /// VkBool32 residencyAlignedMipSize; + /// VkBool32 residencyNonResidentStrict; + /// } VkPhysicalDeviceSparseProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VkPhysicalDeviceSparseProperties() + { + /// + /// ResidencyStandard2DBlockShape is VK_TRUE if the physical device will access all single-sample 2D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (Single Sample)^ table. If this property is not supported the value returned in the imageGranularity member of the VkSparseImageFormatProperties structure for single-sample 2D images is not required: to match the standard sparse image block dimensions listed in the table. + /// + [FieldOffset(0)] + public Brutal.Bool32 ResidencyStandard2DBlockShape; + + /// + /// ResidencyStandard2DMultisampleBlockShape is VK_TRUE if the physical device will access all multisample 2D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (MSAA)^ table. If this property is not supported, the value returned in the imageGranularity member of the VkSparseImageFormatProperties structure for multisample 2D images is not required: to match the standard sparse image block dimensions listed in the table. + /// + [FieldOffset(4)] + public Brutal.Bool32 ResidencyStandard2DMultisampleBlockShape; + + /// + /// ResidencyStandard3DBlockShape is VK_TRUE if the physical device will access all 3D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (Single Sample)^ table. If this property is not supported, the value returned in the imageGranularity member of the VkSparseImageFormatProperties structure for 3D images is not required: to match the standard sparse image block dimensions listed in the table. + /// + [FieldOffset(8)] + public Brutal.Bool32 ResidencyStandard3DBlockShape; + + /// + /// ResidencyAlignedMipSize is VK_TRUE if images with mip level dimensions that are not integer multiples of the corresponding dimensions of the sparse image block may: be placed in the mip tail. If this property is not reported, only mip levels with dimensions smaller than the imageGranularity member of the VkSparseImageFormatProperties structure will be placed in the mip tail. If this property is reported the implementation is allowed to return VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT in the flags member of VkSparseImageFormatProperties, indicating that mip level dimensions that are not integer multiples of the corresponding dimensions of the sparse image block will be placed in the mip tail. + /// + [FieldOffset(12)] + public Brutal.Bool32 ResidencyAlignedMipSize; + + /// + /// ResidencyNonResidentStrict specifies whether the physical device can consistently access non-resident regions of a resource. If this property is VK_TRUE, access to non-resident regions of resources will be guaranteed to return values as if the resource was populated with 0; writes to non-resident regions will be discarded. + /// + [FieldOffset(16)] + public Brutal.Bool32 ResidencyNonResidentStrict; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupProperties.gen.cs new file mode 100644 index 0000000..97a9d8c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupProperties.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSubgroupProperties - Structure describing subgroup support for an implementation + /// + /// + /// + /// The VkPhysicalDeviceSubgroupProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceSubgroupProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t subgroupSize; + /// VkShaderStageFlags supportedStages; + /// VkSubgroupFeatureFlags supportedOperations; + /// VkBool32 quadOperationsInAllStages; + /// } VkPhysicalDeviceSubgroupProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceSubgroupProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSubgroupProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubgroupSize + /// + [FieldOffset(16)] + public int SubgroupSize; + + /// + /// SupportedStages + /// + [FieldOffset(20)] + public VkShaderStageFlags SupportedStages; + + /// + /// SupportedOperations + /// + [FieldOffset(24)] + public VkSubgroupFeatureFlags SupportedOperations; + + /// + /// QuadOperationsInAllStages + /// + [FieldOffset(28)] + public Brutal.Bool32 QuadOperationsInAllStages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlFeatures.gen.cs new file mode 100644 index 0000000..bb51427 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlFeatures.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSubgroupSizeControlFeatures - Structure describing the subgroup size control features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceSubgroupSizeControlFeatures structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceSubgroupSizeControlFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 subgroupSizeControl; + /// VkBool32 computeFullSubgroups; + /// } VkPhysicalDeviceSubgroupSizeControlFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSubgroupSizeControlFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSubgroupSizeControlFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubgroupSizeControl + /// + [FieldOffset(16)] + public Brutal.Bool32 SubgroupSizeControl; + + /// + /// ComputeFullSubgroups + /// + [FieldOffset(20)] + public Brutal.Bool32 ComputeFullSubgroups; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlProperties.gen.cs new file mode 100644 index 0000000..dde61e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubgroupSizeControlProperties.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSubgroupSizeControlProperties - Structure describing the control subgroup size properties of an implementation + /// + /// + /// + /// The VkPhysicalDeviceSubgroupSizeControlProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceSubgroupSizeControlProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t minSubgroupSize; + /// uint32_t maxSubgroupSize; + /// uint32_t maxComputeWorkgroupSubgroups; + /// VkShaderStageFlags requiredSubgroupSizeStages; + /// } VkPhysicalDeviceSubgroupSizeControlProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceSubgroupSizeControlProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSubgroupSizeControlProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinSubgroupSize + /// + [FieldOffset(16)] + public int MinSubgroupSize; + + /// + /// MaxSubgroupSize + /// + [FieldOffset(20)] + public int MaxSubgroupSize; + + /// + /// MaxComputeWorkgroupSubgroups + /// + [FieldOffset(24)] + public int MaxComputeWorkgroupSubgroups; + + /// + /// RequiredSubgroupSizeStages + /// + [FieldOffset(28)] + public VkShaderStageFlags RequiredSubgroupSizeStages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.gen.cs new file mode 100644 index 0000000..5ec1378 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT - Structure describing whether subpass merging feedback can be supported by the implementation + /// + /// + /// + /// The VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef struct VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 subpassMergeFeedback; + /// } VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSubpassMergeFeedbackFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubpassMergeFeedback + /// + [FieldOffset(16)] + public Brutal.Bool32 SubpassMergeFeedback; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.gen.cs new file mode 100644 index 0000000..3bb2565 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingFeaturesHUAWEI.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSubpassShadingFeaturesHUAWEI - Structure describing whether subpass shading is enabled + /// + /// + /// + /// The VkPhysicalDeviceSubpassShadingFeaturesHUAWEI structure is defined + /// as: + /// + /// + /// // Provided by VK_HUAWEI_subpass_shading + /// typedef struct VkPhysicalDeviceSubpassShadingFeaturesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 subpassShading; + /// } VkPhysicalDeviceSubpassShadingFeaturesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSubpassShadingFeaturesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSubpassShadingFeaturesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubpassShading + /// + [FieldOffset(16)] + public Brutal.Bool32 SubpassShading; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.gen.cs new file mode 100644 index 0000000..c1e0e66 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSubpassShadingPropertiesHUAWEI.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSubpassShadingPropertiesHUAWEI - Structure describing subpass shading properties supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceSubpassShadingPropertiesHUAWEI structure is + /// defined as: + /// + /// + /// // Provided by VK_HUAWEI_subpass_shading + /// typedef struct VkPhysicalDeviceSubpassShadingPropertiesHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxSubpassShadingWorkgroupSizeAspectRatio; + /// } VkPhysicalDeviceSubpassShadingPropertiesHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSubpassShadingPropertiesHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSubpassShadingPropertiesHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxSubpassShadingWorkgroupSizeAspectRatio + /// + [FieldOffset(16)] + public int MaxSubpassShadingWorkgroupSizeAspectRatio; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSurfaceInfo2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSurfaceInfo2KHR.gen.cs new file mode 100644 index 0000000..d090ba0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSurfaceInfo2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSurfaceInfo2KHR - Structure specifying a surface and related swapchain creation parameters + /// + /// + /// + /// The VkPhysicalDeviceSurfaceInfo2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_surface_capabilities2 + /// typedef struct VkPhysicalDeviceSurfaceInfo2KHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSurfaceKHR surface; + /// } VkPhysicalDeviceSurfaceInfo2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSurfaceInfo2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSurfaceInfo2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Surface is the surface that will be associated with the swapchain. + /// + [FieldOffset(16)] + public VkSurfaceKHR Surface; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR.gen.cs new file mode 100644 index 0000000..8f07cab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR - Structure describing whether implementation supports swapchain maintenance1 functionality + /// + /// + /// + /// The VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_swapchain_maintenance1 + /// typedef struct VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 swapchainMaintenance1; + /// } VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSwapchainMaintenance1FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSwapchainMaintenance1FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainMaintenance1 + /// + [FieldOffset(16)] + public Brutal.Bool32 SwapchainMaintenance1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSynchronization2Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSynchronization2Features.gen.cs new file mode 100644 index 0000000..89d6f3f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceSynchronization2Features.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceSynchronization2Features - Structure describing whether the implementation supports v2 synchronization commands + /// + /// + /// + /// The VkPhysicalDeviceSynchronization2Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceSynchronization2Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 synchronization2; + /// } VkPhysicalDeviceSynchronization2Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceSynchronization2Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceSynchronization2Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Synchronization2 + /// + [FieldOffset(16)] + public Brutal.Bool32 Synchronization2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorFeaturesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorFeaturesARM.gen.cs new file mode 100644 index 0000000..ee30171 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorFeaturesARM.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTensorFeaturesARM - Structure describing tensor features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTensorFeaturesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkPhysicalDeviceTensorFeaturesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 tensorNonPacked; + /// VkBool32 shaderTensorAccess; + /// VkBool32 shaderStorageTensorArrayDynamicIndexing; + /// VkBool32 shaderStorageTensorArrayNonUniformIndexing; + /// VkBool32 descriptorBindingStorageTensorUpdateAfterBind; + /// VkBool32 tensors; + /// } VkPhysicalDeviceTensorFeaturesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceTensorFeaturesARM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTensorFeaturesARM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorNonPacked + /// + [FieldOffset(16)] + public Brutal.Bool32 TensorNonPacked; + + /// + /// ShaderTensorAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderTensorAccess; + + /// + /// ShaderStorageTensorArrayDynamicIndexing + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderStorageTensorArrayDynamicIndexing; + + /// + /// ShaderStorageTensorArrayNonUniformIndexing + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderStorageTensorArrayNonUniformIndexing; + + /// + /// DescriptorBindingStorageTensorUpdateAfterBind + /// + [FieldOffset(32)] + public Brutal.Bool32 DescriptorBindingStorageTensorUpdateAfterBind; + + /// + /// Tensors + /// + [FieldOffset(36)] + public Brutal.Bool32 Tensors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorPropertiesARM.gen.cs new file mode 100644 index 0000000..ae86f48 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTensorPropertiesARM.gen.cs @@ -0,0 +1,124 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTensorPropertiesARM - Structure describing the tensor properties of a physical device + /// + /// + /// + /// The VkPhysicalDeviceTensorPropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkPhysicalDeviceTensorPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxTensorDimensionCount; + /// uint64_t maxTensorElements; + /// uint64_t maxPerDimensionTensorElements; + /// int64_t maxTensorStride; + /// uint64_t maxTensorSize; + /// uint32_t maxTensorShaderAccessArrayLength; + /// uint32_t maxTensorShaderAccessSize; + /// uint32_t maxDescriptorSetStorageTensors; + /// uint32_t maxPerStageDescriptorSetStorageTensors; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageTensors; + /// uint32_t maxPerStageDescriptorUpdateAfterBindStorageTensors; + /// VkBool32 shaderStorageTensorArrayNonUniformIndexingNative; + /// VkShaderStageFlags shaderTensorSupportedStages; + /// } VkPhysicalDeviceTensorPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkPhysicalDeviceTensorPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTensorPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxTensorDimensionCount + /// + [FieldOffset(16)] + public int MaxTensorDimensionCount; + + /// + /// MaxTensorElements + /// + [FieldOffset(24)] + public nint MaxTensorElements; + + /// + /// MaxPerDimensionTensorElements + /// + [FieldOffset(32)] + public nint MaxPerDimensionTensorElements; + + /// + /// MaxTensorStride + /// + [FieldOffset(40)] + public long MaxTensorStride; + + /// + /// MaxTensorSize + /// + [FieldOffset(48)] + public nint MaxTensorSize; + + /// + /// MaxTensorShaderAccessArrayLength + /// + [FieldOffset(56)] + public int MaxTensorShaderAccessArrayLength; + + /// + /// MaxTensorShaderAccessSize + /// + [FieldOffset(60)] + public int MaxTensorShaderAccessSize; + + /// + /// MaxDescriptorSetStorageTensors + /// + [FieldOffset(64)] + public int MaxDescriptorSetStorageTensors; + + /// + /// MaxPerStageDescriptorSetStorageTensors + /// + [FieldOffset(68)] + public int MaxPerStageDescriptorSetStorageTensors; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageTensors + /// + [FieldOffset(72)] + public int MaxDescriptorSetUpdateAfterBindStorageTensors; + + /// + /// MaxPerStageDescriptorUpdateAfterBindStorageTensors + /// + [FieldOffset(76)] + public int MaxPerStageDescriptorUpdateAfterBindStorageTensors; + + /// + /// ShaderStorageTensorArrayNonUniformIndexingNative + /// + [FieldOffset(80)] + public Brutal.Bool32 ShaderStorageTensorArrayNonUniformIndexingNative; + + /// + /// ShaderTensorSupportedStages + /// + [FieldOffset(84)] + public VkShaderStageFlags ShaderTensorSupportedStages; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.gen.cs new file mode 100644 index 0000000..3899151 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT - Structure describing the texel buffer alignment features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_texel_buffer_alignment + /// typedef struct VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 texelBufferAlignment; + /// } VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTexelBufferAlignmentFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TexelBufferAlignment + /// + [FieldOffset(16)] + public Brutal.Bool32 TexelBufferAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentProperties.gen.cs new file mode 100644 index 0000000..02cf762 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTexelBufferAlignmentProperties.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTexelBufferAlignmentProperties - Structure describing the texel buffer alignment requirements supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTexelBufferAlignmentProperties structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceTexelBufferAlignmentProperties { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize storageTexelBufferOffsetAlignmentBytes; + /// VkBool32 storageTexelBufferOffsetSingleTexelAlignment; + /// VkDeviceSize uniformTexelBufferOffsetAlignmentBytes; + /// VkBool32 uniformTexelBufferOffsetSingleTexelAlignment; + /// } VkPhysicalDeviceTexelBufferAlignmentProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPhysicalDeviceTexelBufferAlignmentProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTexelBufferAlignmentProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StorageTexelBufferOffsetAlignmentBytes + /// + [FieldOffset(16)] + public ByteSize64 StorageTexelBufferOffsetAlignmentBytes; + + /// + /// StorageTexelBufferOffsetSingleTexelAlignment + /// + [FieldOffset(24)] + public Brutal.Bool32 StorageTexelBufferOffsetSingleTexelAlignment; + + /// + /// UniformTexelBufferOffsetAlignmentBytes + /// + [FieldOffset(32)] + public ByteSize64 UniformTexelBufferOffsetAlignmentBytes; + + /// + /// UniformTexelBufferOffsetSingleTexelAlignment + /// + [FieldOffset(40)] + public Brutal.Bool32 UniformTexelBufferOffsetSingleTexelAlignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstc3DFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstc3DFeaturesEXT.gen.cs new file mode 100644 index 0000000..8d10121 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstc3DFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT - Structure describing ASTC 3D features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_texture_compression_astc_3d + /// typedef struct VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 textureCompressionASTC_3D; + /// } VkPhysicalDeviceTextureCompressionASTC3DFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTextureCompressionAstc3DFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTextureCompressionAstc3DFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TextureCompressionASTC_3D + /// + [FieldOffset(16)] + public Brutal.Bool32 TextureCompressionASTC_3D; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstcHdrFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstcHdrFeatures.gen.cs new file mode 100644 index 0000000..35e7aae --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTextureCompressionAstcHdrFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTextureCompressionASTCHDRFeatures - Structure describing ASTC HDR features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTextureCompressionASTCHDRFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceTextureCompressionASTCHDRFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 textureCompressionASTC_HDR; + /// } VkPhysicalDeviceTextureCompressionASTCHDRFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTextureCompressionAstcHdrFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTextureCompressionAstcHdrFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TextureCompressionASTCHdr + /// + [FieldOffset(16)] + public Brutal.Bool32 TextureCompressionASTCHdr; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceThrottleHintFeaturesSEC.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceThrottleHintFeaturesSEC.gen.cs new file mode 100644 index 0000000..4c477f8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceThrottleHintFeaturesSEC.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceThrottleHintFeaturesSEC - Stub description of VkPhysicalDeviceThrottleHintFeaturesSEC + /// + /// + /// + /// [[features-throttleHint]] + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_SEC_throttle_hint + /// typedef struct VkPhysicalDeviceThrottleHintFeaturesSEC { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 throttleHint; + /// } VkPhysicalDeviceThrottleHintFeaturesSEC; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceThrottleHintFeaturesSEC() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceThrottleHintFeaturesSEC; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ThrottleHint + /// + [FieldOffset(16)] + public Brutal.Bool32 ThrottleHint; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapFeaturesQCOM.gen.cs new file mode 100644 index 0000000..d0fdfe4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTileMemoryHeapFeaturesQCOM - Structure describing whether the tile memory heap features can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTileMemoryHeapFeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_tile_memory_heap + /// typedef struct VkPhysicalDeviceTileMemoryHeapFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 tileMemoryHeap; + /// } VkPhysicalDeviceTileMemoryHeapFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTileMemoryHeapFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTileMemoryHeapFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TileMemoryHeap + /// + [FieldOffset(16)] + public Brutal.Bool32 TileMemoryHeap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapPropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapPropertiesQCOM.gen.cs new file mode 100644 index 0000000..0454c5d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileMemoryHeapPropertiesQCOM.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTileMemoryHeapPropertiesQCOM - Structure describing tile memory heap properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTileMemoryHeapPropertiesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_tile_memory_heap + /// typedef struct VkPhysicalDeviceTileMemoryHeapPropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 queueSubmitBoundary; + /// VkBool32 tileBufferTransfers; + /// } VkPhysicalDeviceTileMemoryHeapPropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTileMemoryHeapPropertiesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTileMemoryHeapPropertiesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueueSubmitBoundary + /// + [FieldOffset(16)] + public Brutal.Bool32 QueueSubmitBoundary; + + /// + /// TileBufferTransfers + /// + [FieldOffset(20)] + public Brutal.Bool32 TileBufferTransfers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTilePropertiesFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTilePropertiesFeaturesQCOM.gen.cs new file mode 100644 index 0000000..62d2df1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTilePropertiesFeaturesQCOM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTilePropertiesFeaturesQCOM - Structure describing tile properties features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTilePropertiesFeaturesQCOM structure is defined + /// as: + /// + /// + /// // Provided by VK_QCOM_tile_properties + /// typedef struct VkPhysicalDeviceTilePropertiesFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 tileProperties; + /// } VkPhysicalDeviceTilePropertiesFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTilePropertiesFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTilePropertiesFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TileProperties + /// + [FieldOffset(16)] + public Brutal.Bool32 TileProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingFeaturesQCOM.gen.cs new file mode 100644 index 0000000..e2a6453 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingFeaturesQCOM.gen.cs @@ -0,0 +1,131 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTileShadingFeaturesQCOM - Structure describing tile shading features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTileShadingFeaturesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef struct VkPhysicalDeviceTileShadingFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 tileShading; + /// VkBool32 tileShadingFragmentStage; + /// VkBool32 tileShadingColorAttachments; + /// VkBool32 tileShadingDepthAttachments; + /// VkBool32 tileShadingStencilAttachments; + /// VkBool32 tileShadingInputAttachments; + /// VkBool32 tileShadingSampledAttachments; + /// VkBool32 tileShadingPerTileDraw; + /// VkBool32 tileShadingPerTileDispatch; + /// VkBool32 tileShadingDispatchTile; + /// VkBool32 tileShadingApron; + /// VkBool32 tileShadingAnisotropicApron; + /// VkBool32 tileShadingAtomicOps; + /// VkBool32 tileShadingImageProcessing; + /// } VkPhysicalDeviceTileShadingFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkPhysicalDeviceTileShadingFeaturesQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTileShadingFeaturesQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TileShading + /// + [FieldOffset(16)] + public Brutal.Bool32 TileShading; + + /// + /// TileShadingFragmentStage + /// + [FieldOffset(20)] + public Brutal.Bool32 TileShadingFragmentStage; + + /// + /// TileShadingColorAttachments + /// + [FieldOffset(24)] + public Brutal.Bool32 TileShadingColorAttachments; + + /// + /// TileShadingDepthAttachments + /// + [FieldOffset(28)] + public Brutal.Bool32 TileShadingDepthAttachments; + + /// + /// TileShadingStencilAttachments + /// + [FieldOffset(32)] + public Brutal.Bool32 TileShadingStencilAttachments; + + /// + /// TileShadingInputAttachments + /// + [FieldOffset(36)] + public Brutal.Bool32 TileShadingInputAttachments; + + /// + /// TileShadingSampledAttachments + /// + [FieldOffset(40)] + public Brutal.Bool32 TileShadingSampledAttachments; + + /// + /// TileShadingPerTileDraw + /// + [FieldOffset(44)] + public Brutal.Bool32 TileShadingPerTileDraw; + + /// + /// TileShadingPerTileDispatch + /// + [FieldOffset(48)] + public Brutal.Bool32 TileShadingPerTileDispatch; + + /// + /// TileShadingDispatchTile + /// + [FieldOffset(52)] + public Brutal.Bool32 TileShadingDispatchTile; + + /// + /// TileShadingApron + /// + [FieldOffset(56)] + public Brutal.Bool32 TileShadingApron; + + /// + /// TileShadingAnisotropicApron + /// + [FieldOffset(60)] + public Brutal.Bool32 TileShadingAnisotropicApron; + + /// + /// TileShadingAtomicOps + /// + [FieldOffset(64)] + public Brutal.Bool32 TileShadingAtomicOps; + + /// + /// TileShadingImageProcessing + /// + [FieldOffset(68)] + public Brutal.Bool32 TileShadingImageProcessing; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingPropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingPropertiesQCOM.gen.cs new file mode 100644 index 0000000..cd4d6f9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTileShadingPropertiesQCOM.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTileShadingPropertiesQCOM - Structure describing properties supported by VK_QCOM_tile_shading + /// + /// + /// + /// The VkPhysicalDeviceTileShadingPropertiesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef struct VkPhysicalDeviceTileShadingPropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxApronSize; + /// VkBool32 preferNonCoherent; + /// VkExtent2D tileGranularity; + /// VkExtent2D maxTileShadingRate; + /// } VkPhysicalDeviceTileShadingPropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPhysicalDeviceTileShadingPropertiesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTileShadingPropertiesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxApronSize + /// + [FieldOffset(16)] + public int MaxApronSize; + + /// + /// PreferNonCoherent + /// + [FieldOffset(20)] + public Brutal.Bool32 PreferNonCoherent; + + /// + /// TileGranularity + /// + [FieldOffset(24)] + public VkExtent2D TileGranularity; + + /// + /// MaxTileShadingRate + /// + [FieldOffset(32)] + public VkExtent2D MaxTileShadingRate; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreFeatures.gen.cs new file mode 100644 index 0000000..b428cb8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreFeatures.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTimelineSemaphoreFeatures - Structure describing timeline semaphore features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTimelineSemaphoreFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceTimelineSemaphoreFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 timelineSemaphore; + /// } VkPhysicalDeviceTimelineSemaphoreFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTimelineSemaphoreFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTimelineSemaphoreFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TimelineSemaphore + /// + [FieldOffset(16)] + public Brutal.Bool32 TimelineSemaphore; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreProperties.gen.cs new file mode 100644 index 0000000..af0eeeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTimelineSemaphoreProperties.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTimelineSemaphoreProperties - Structure describing timeline semaphore properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTimelineSemaphoreProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceTimelineSemaphoreProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t maxTimelineSemaphoreValueDifference; + /// } VkPhysicalDeviceTimelineSemaphoreProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTimelineSemaphoreProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTimelineSemaphoreProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxTimelineSemaphoreValueDifference + /// + [FieldOffset(16)] + public nint MaxTimelineSemaphoreValueDifference; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceToolProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceToolProperties.gen.cs new file mode 100644 index 0000000..852536f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceToolProperties.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceToolProperties - Structure providing information about an active tool + /// + /// + /// + /// The VkPhysicalDeviceToolProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceToolProperties { + /// VkStructureType sType; + /// void* pNext; + /// char name[VK_MAX_EXTENSION_NAME_SIZE]; + /// char version[VK_MAX_EXTENSION_NAME_SIZE]; + /// VkToolPurposeFlags purposes; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// char layer[VK_MAX_EXTENSION_NAME_SIZE]; + /// } VkPhysicalDeviceToolProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 1048)] + public unsafe partial struct VkPhysicalDeviceToolProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceToolProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte Name[256]; + + /// + [FieldOffset(272)] + public fixed byte Version[256]; + + /// + /// Purposes is a bitmask of VkToolPurposeFlags which is populated with purposes supported by the tool. + /// + [FieldOffset(528)] + public VkToolPurposeFlags Purposes; + + /// + [FieldOffset(532)] + public fixed byte Description[256]; + + /// + [FieldOffset(788)] + public fixed byte Layer[256]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackFeaturesEXT.gen.cs new file mode 100644 index 0000000..602cf8d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackFeaturesEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTransformFeedbackFeaturesEXT - Structure describing transform feedback features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTransformFeedbackFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 transformFeedback; + /// VkBool32 geometryStreams; + /// } VkPhysicalDeviceTransformFeedbackFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceTransformFeedbackFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTransformFeedbackFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TransformFeedback + /// + [FieldOffset(16)] + public Brutal.Bool32 TransformFeedback; + + /// + /// GeometryStreams + /// + [FieldOffset(20)] + public Brutal.Bool32 GeometryStreams; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackPropertiesEXT.gen.cs new file mode 100644 index 0000000..e652140 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceTransformFeedbackPropertiesEXT.gen.cs @@ -0,0 +1,104 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceTransformFeedbackPropertiesEXT - Structure describing transform feedback properties that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceTransformFeedbackPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// typedef struct VkPhysicalDeviceTransformFeedbackPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxTransformFeedbackStreams; + /// uint32_t maxTransformFeedbackBuffers; + /// VkDeviceSize maxTransformFeedbackBufferSize; + /// uint32_t maxTransformFeedbackStreamDataSize; + /// uint32_t maxTransformFeedbackBufferDataSize; + /// uint32_t maxTransformFeedbackBufferDataStride; + /// VkBool32 transformFeedbackQueries; + /// VkBool32 transformFeedbackStreamsLinesTriangles; + /// VkBool32 transformFeedbackRasterizationStreamSelect; + /// VkBool32 transformFeedbackDraw; + /// } VkPhysicalDeviceTransformFeedbackPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceTransformFeedbackPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceTransformFeedbackPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxTransformFeedbackStreams + /// + [FieldOffset(16)] + public int MaxTransformFeedbackStreams; + + /// + /// MaxTransformFeedbackBuffers + /// + [FieldOffset(20)] + public int MaxTransformFeedbackBuffers; + + /// + /// MaxTransformFeedbackBufferSize + /// + [FieldOffset(24)] + public ByteSize64 MaxTransformFeedbackBufferSize; + + /// + /// MaxTransformFeedbackStreamDataSize + /// + [FieldOffset(32)] + public int MaxTransformFeedbackStreamDataSize; + + /// + /// MaxTransformFeedbackBufferDataSize + /// + [FieldOffset(36)] + public int MaxTransformFeedbackBufferDataSize; + + /// + /// MaxTransformFeedbackBufferDataStride + /// + [FieldOffset(40)] + public int MaxTransformFeedbackBufferDataStride; + + /// + /// TransformFeedbackQueries + /// + [FieldOffset(44)] + public Brutal.Bool32 TransformFeedbackQueries; + + /// + /// TransformFeedbackStreamsLinesTriangles + /// + [FieldOffset(48)] + public Brutal.Bool32 TransformFeedbackStreamsLinesTriangles; + + /// + /// TransformFeedbackRasterizationStreamSelect + /// + [FieldOffset(52)] + public Brutal.Bool32 TransformFeedbackRasterizationStreamSelect; + + /// + /// TransformFeedbackDraw + /// + [FieldOffset(56)] + public Brutal.Bool32 TransformFeedbackDraw; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR.gen.cs new file mode 100644 index 0000000..fd35e22 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR - Structure describing whether the implementation provides unified image layouts + /// + /// + /// + /// The VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_unified_image_layouts + /// typedef struct VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 unifiedImageLayouts; + /// VkBool32 unifiedImageLayoutsVideo; + /// } VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceUnifiedImageLayoutsFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceUnifiedImageLayoutsFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UnifiedImageLayouts + /// + [FieldOffset(16)] + public Brutal.Bool32 UnifiedImageLayouts; + + /// + /// UnifiedImageLayoutsVideo + /// + [FieldOffset(20)] + public Brutal.Bool32 UnifiedImageLayoutsVideo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.gen.cs new file mode 100644 index 0000000..f1b7463 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceUniformBufferStandardLayoutFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceUniformBufferStandardLayoutFeatures - Structure indicating support for std430-like packing in uniform buffers + /// + /// + /// + /// The VkPhysicalDeviceUniformBufferStandardLayoutFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceUniformBufferStandardLayoutFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 uniformBufferStandardLayout; + /// } VkPhysicalDeviceUniformBufferStandardLayoutFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceUniformBufferStandardLayoutFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceUniformBufferStandardLayoutFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UniformBufferStandardLayout + /// + [FieldOffset(16)] + public Brutal.Bool32 UniformBufferStandardLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVariablePointersFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVariablePointersFeatures.gen.cs new file mode 100644 index 0000000..c86304a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVariablePointersFeatures.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVariablePointersFeatures - Structure describing variable pointers features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVariablePointersFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPhysicalDeviceVariablePointersFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 variablePointersStorageBuffer; + /// VkBool32 variablePointers; + /// } VkPhysicalDeviceVariablePointersFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVariablePointersFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVariablePointersFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VariablePointersStorageBuffer + /// + [FieldOffset(16)] + public Brutal.Bool32 VariablePointersStorageBuffer; + + /// + /// VariablePointers + /// + [FieldOffset(20)] + public Brutal.Bool32 VariablePointers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorFeatures.gen.cs new file mode 100644 index 0000000..396c6c6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorFeatures.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVertexAttributeDivisorFeatures - Structure describing if fetching of vertex attribute may be repeated for instanced rendering + /// + /// + /// + /// The VkPhysicalDeviceVertexAttributeDivisorFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceVertexAttributeDivisorFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 vertexAttributeInstanceRateDivisor; + /// VkBool32 vertexAttributeInstanceRateZeroDivisor; + /// } VkPhysicalDeviceVertexAttributeDivisorFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVertexAttributeDivisorFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVertexAttributeDivisorFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexAttributeInstanceRateDivisor + /// + [FieldOffset(16)] + public Brutal.Bool32 VertexAttributeInstanceRateDivisor; + + /// + /// VertexAttributeInstanceRateZeroDivisor + /// + [FieldOffset(20)] + public Brutal.Bool32 VertexAttributeInstanceRateZeroDivisor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorProperties.gen.cs new file mode 100644 index 0000000..5990b2f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorProperties.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVertexAttributeDivisorProperties - Structure describing max value of vertex attribute divisor that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVertexAttributeDivisorProperties structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceVertexAttributeDivisorProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxVertexAttribDivisor; + /// VkBool32 supportsNonZeroFirstInstance; + /// } VkPhysicalDeviceVertexAttributeDivisorProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVertexAttributeDivisorProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVertexAttributeDivisorProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxVertexAttribDivisor + /// + [FieldOffset(16)] + public int MaxVertexAttribDivisor; + + /// + /// SupportsNonZeroFirstInstance + /// + [FieldOffset(20)] + public Brutal.Bool32 SupportsNonZeroFirstInstance; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.gen.cs new file mode 100644 index 0000000..b6e2b1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT - Structure describing max value of vertex attribute divisor that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_vertex_attribute_divisor + /// typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxVertexAttribDivisor; + /// } VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVertexAttributeDivisorPropertiesEXT; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxVertexAttribDivisor + /// + [FieldOffset(16)] + public int MaxVertexAttribDivisor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.gen.cs new file mode 100644 index 0000000..724a466 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT - Structure describing whether the vertex attribute robustness feature is supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_vertex_attribute_robustness + /// typedef struct VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 vertexAttributeRobustness; + /// } VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVertexAttributeRobustnessFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexAttributeRobustness + /// + [FieldOffset(16)] + public Brutal.Bool32 VertexAttributeRobustness; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.gen.cs new file mode 100644 index 0000000..60f946b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT - Structure describing whether the dynamic vertex input state can be used + /// + /// + /// + /// The VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_vertex_input_dynamic_state + /// typedef struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 vertexInputDynamicState; + /// } VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVertexInputDynamicStateFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexInputDynamicState + /// + [FieldOffset(16)] + public Brutal.Bool32 VertexInputDynamicState; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoDecodeVP9FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoDecodeVP9FeaturesKHR.gen.cs new file mode 100644 index 0000000..522597b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoDecodeVP9FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoDecodeVP9FeaturesKHR - Structure describing the video decode VP9 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoDecodeVP9FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_vp9 + /// typedef struct VkPhysicalDeviceVideoDecodeVP9FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoDecodeVP9; + /// } VkPhysicalDeviceVideoDecodeVP9FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoDecodeVP9FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoDecodeVP9FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoDecodeVP9 + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoDecodeVP9; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.gen.cs new file mode 100644 index 0000000..abdf83e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeAV1FeaturesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoEncodeAV1FeaturesKHR - Structure describing the video encode AV1 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoEncodeAV1FeaturesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkPhysicalDeviceVideoEncodeAV1FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoEncodeAV1; + /// } VkPhysicalDeviceVideoEncodeAV1FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoEncodeAV1FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoEncodeAV1FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoEncodeAV1 + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoEncodeAV1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR.gen.cs new file mode 100644 index 0000000..571cc4a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR - Structure describing additional video encode feedback features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_feedback2 + /// typedef struct VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoEncodeFeedback2; + /// } VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoEncodeFeedback2FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoEncodeFeedback2FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoEncodeFeedback2 + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoEncodeFeedback2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR.gen.cs new file mode 100644 index 0000000..e4d6228 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR - Structure describing the video encode intra refresh features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_intra_refresh + /// typedef struct VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoEncodeIntraRefresh; + /// } VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoEncodeIntraRefreshFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoEncodeIntraRefresh + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoEncodeIntraRefresh; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.gen.cs new file mode 100644 index 0000000..dec596e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR - Structure describing the video encode profile and quality level to query properties for + /// + /// + /// + /// The VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const VkVideoProfileInfoKHR* pVideoProfile; + /// uint32_t qualityLevel; + /// } VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoEncodeQualityLevelInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoProfile is a pointer to a VkVideoProfileInfoKHR structure specifying the video profile to query the video encode quality level properties for. + /// + [FieldOffset(16)] + public VkVideoProfileInfoKHR* VideoProfile; + + /// + /// QualityLevel is the video encode quality level to query properties for. + /// + [FieldOffset(24)] + public int QualityLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.gen.cs new file mode 100644 index 0000000..000293b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR - Structure describing the video encode quantization map features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef struct VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoEncodeQuantizationMap; + /// } VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoEncodeQuantizationMap + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoEncodeQuantizationMap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE.gen.cs new file mode 100644 index 0000000..385db6a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE - Structure describing the video encode RGB conversion features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE structure is + /// defined as: + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef struct VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoEncodeRgbConversion; + /// } VkPhysicalDeviceVideoEncodeRgbConversionFeaturesVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoEncodeRGBConversionFeaturesVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoEncodeRgbConversion + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoEncodeRgbConversion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoFormatInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoFormatInfoKHR.gen.cs new file mode 100644 index 0000000..c34ff0a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoFormatInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoFormatInfoKHR - Structure specifying the codec video format + /// + /// + /// + /// The VkPhysicalDeviceVideoFormatInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkPhysicalDeviceVideoFormatInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageUsageFlags imageUsage; + /// } VkPhysicalDeviceVideoFormatInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoFormatInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoFormatInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageUsage is a bitmask of VkImageUsageFlags specifying the intended usage of the video images. + /// + [FieldOffset(16)] + public VkImageUsageFlags ImageUsage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.gen.cs new file mode 100644 index 0000000..d453bd2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance1FeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoMaintenance1FeaturesKHR - Structure describing the video maintenance features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoMaintenance1FeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_maintenance1 + /// typedef struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoMaintenance1; + /// } VkPhysicalDeviceVideoMaintenance1FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoMaintenance1FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoMaintenance1 + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoMaintenance1; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance2FeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance2FeaturesKHR.gen.cs new file mode 100644 index 0000000..91c0d8a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVideoMaintenance2FeaturesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVideoMaintenance2FeaturesKHR - Structure describing the video maintenance features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVideoMaintenance2FeaturesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_maintenance2 + /// typedef struct VkPhysicalDeviceVideoMaintenance2FeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 videoMaintenance2; + /// } VkPhysicalDeviceVideoMaintenance2FeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceVideoMaintenance2FeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVideoMaintenance2FeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoMaintenance2 + /// + [FieldOffset(16)] + public Brutal.Bool32 VideoMaintenance2; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Features.gen.cs new file mode 100644 index 0000000..ab02cb5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Features.gen.cs @@ -0,0 +1,117 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan11Features - Structure describing the Vulkan 1.1 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVulkan11Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceVulkan11Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 storageBuffer16BitAccess; + /// VkBool32 uniformAndStorageBuffer16BitAccess; + /// VkBool32 storagePushConstant16; + /// VkBool32 storageInputOutput16; + /// VkBool32 multiview; + /// VkBool32 multiviewGeometryShader; + /// VkBool32 multiviewTessellationShader; + /// VkBool32 variablePointersStorageBuffer; + /// VkBool32 variablePointers; + /// VkBool32 protectedMemory; + /// VkBool32 samplerYcbcrConversion; + /// VkBool32 shaderDrawParameters; + /// } VkPhysicalDeviceVulkan11Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPhysicalDeviceVulkan11Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan11Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StorageBuffer16BitAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 StorageBuffer16BitAccess; + + /// + /// UniformAndStorageBuffer16BitAccess + /// + [FieldOffset(20)] + public Brutal.Bool32 UniformAndStorageBuffer16BitAccess; + + /// + /// StoragePushConstant16 + /// + [FieldOffset(24)] + public Brutal.Bool32 StoragePushConstant16; + + /// + /// StorageInputOutput16 + /// + [FieldOffset(28)] + public Brutal.Bool32 StorageInputOutput16; + + /// + /// Multiview + /// + [FieldOffset(32)] + public Brutal.Bool32 Multiview; + + /// + /// MultiviewGeometryShader + /// + [FieldOffset(36)] + public Brutal.Bool32 MultiviewGeometryShader; + + /// + /// MultiviewTessellationShader + /// + [FieldOffset(40)] + public Brutal.Bool32 MultiviewTessellationShader; + + /// + /// VariablePointersStorageBuffer + /// + [FieldOffset(44)] + public Brutal.Bool32 VariablePointersStorageBuffer; + + /// + /// VariablePointers + /// + [FieldOffset(48)] + public Brutal.Bool32 VariablePointers; + + /// + /// ProtectedMemory + /// + [FieldOffset(52)] + public Brutal.Bool32 ProtectedMemory; + + /// + /// SamplerYcbcrConversion + /// + [FieldOffset(56)] + public Brutal.Bool32 SamplerYcbcrConversion; + + /// + /// ShaderDrawParameters + /// + [FieldOffset(60)] + public Brutal.Bool32 ShaderDrawParameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Properties.gen.cs new file mode 100644 index 0000000..2c26b15 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan11Properties.gen.cs @@ -0,0 +1,132 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan11Properties - Structure specifying physical device properties for functionality promoted to Vulkan 1.1 + /// + /// + /// + /// The VkPhysicalDeviceVulkan11Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceVulkan11Properties { + /// VkStructureType sType; + /// void* pNext; + /// uint8_t deviceUUID[VK_UUID_SIZE]; + /// uint8_t driverUUID[VK_UUID_SIZE]; + /// uint8_t deviceLUID[VK_LUID_SIZE]; + /// uint32_t deviceNodeMask; + /// VkBool32 deviceLUIDValid; + /// uint32_t subgroupSize; + /// VkShaderStageFlags subgroupSupportedStages; + /// VkSubgroupFeatureFlags subgroupSupportedOperations; + /// VkBool32 subgroupQuadOperationsInAllStages; + /// VkPointClippingBehavior pointClippingBehavior; + /// uint32_t maxMultiviewViewCount; + /// uint32_t maxMultiviewInstanceIndex; + /// VkBool32 protectedNoFault; + /// uint32_t maxPerSetDescriptors; + /// VkDeviceSize maxMemoryAllocationSize; + /// } VkPhysicalDeviceVulkan11Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 112)] + public unsafe partial struct VkPhysicalDeviceVulkan11Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan11Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte DeviceUUID[16]; + + /// + [FieldOffset(32)] + public fixed byte DriverUUID[16]; + + /// + [FieldOffset(48)] + public fixed byte DeviceLUID[8]; + + /// + /// DeviceNodeMask + /// + [FieldOffset(56)] + public int DeviceNodeMask; + + /// + /// DeviceLUIDValid + /// + [FieldOffset(60)] + public Brutal.Bool32 DeviceLUIDValid; + + /// + /// SubgroupSize + /// + [FieldOffset(64)] + public int SubgroupSize; + + /// + /// SubgroupSupportedStages + /// + [FieldOffset(68)] + public VkShaderStageFlags SubgroupSupportedStages; + + /// + /// SubgroupSupportedOperations + /// + [FieldOffset(72)] + public VkSubgroupFeatureFlags SubgroupSupportedOperations; + + /// + /// SubgroupQuadOperationsInAllStages + /// + [FieldOffset(76)] + public Brutal.Bool32 SubgroupQuadOperationsInAllStages; + + /// + /// PointClippingBehavior + /// + [FieldOffset(80)] + public VkPointClippingBehavior PointClippingBehavior; + + /// + /// MaxMultiviewViewCount + /// + [FieldOffset(84)] + public int MaxMultiviewViewCount; + + /// + /// MaxMultiviewInstanceIndex + /// + [FieldOffset(88)] + public int MaxMultiviewInstanceIndex; + + /// + /// ProtectedNoFault + /// + [FieldOffset(92)] + public Brutal.Bool32 ProtectedNoFault; + + /// + /// MaxPerSetDescriptors + /// + [FieldOffset(96)] + public int MaxPerSetDescriptors; + + /// + /// MaxMemoryAllocationSize + /// + [FieldOffset(104)] + public ByteSize64 MaxMemoryAllocationSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Features.gen.cs new file mode 100644 index 0000000..715c547 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Features.gen.cs @@ -0,0 +1,362 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan12Features - Structure describing the Vulkan 1.2 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVulkan12Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceVulkan12Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 samplerMirrorClampToEdge; + /// VkBool32 drawIndirectCount; + /// VkBool32 storageBuffer8BitAccess; + /// VkBool32 uniformAndStorageBuffer8BitAccess; + /// VkBool32 storagePushConstant8; + /// VkBool32 shaderBufferInt64Atomics; + /// VkBool32 shaderSharedInt64Atomics; + /// VkBool32 shaderFloat16; + /// VkBool32 shaderInt8; + /// VkBool32 descriptorIndexing; + /// VkBool32 shaderInputAttachmentArrayDynamicIndexing; + /// VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; + /// VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; + /// VkBool32 shaderUniformBufferArrayNonUniformIndexing; + /// VkBool32 shaderSampledImageArrayNonUniformIndexing; + /// VkBool32 shaderStorageBufferArrayNonUniformIndexing; + /// VkBool32 shaderStorageImageArrayNonUniformIndexing; + /// VkBool32 shaderInputAttachmentArrayNonUniformIndexing; + /// VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; + /// VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; + /// VkBool32 descriptorBindingUniformBufferUpdateAfterBind; + /// VkBool32 descriptorBindingSampledImageUpdateAfterBind; + /// VkBool32 descriptorBindingStorageImageUpdateAfterBind; + /// VkBool32 descriptorBindingStorageBufferUpdateAfterBind; + /// VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; + /// VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; + /// VkBool32 descriptorBindingUpdateUnusedWhilePending; + /// VkBool32 descriptorBindingPartiallyBound; + /// VkBool32 descriptorBindingVariableDescriptorCount; + /// VkBool32 runtimeDescriptorArray; + /// VkBool32 samplerFilterMinmax; + /// VkBool32 scalarBlockLayout; + /// VkBool32 imagelessFramebuffer; + /// VkBool32 uniformBufferStandardLayout; + /// VkBool32 shaderSubgroupExtendedTypes; + /// VkBool32 separateDepthStencilLayouts; + /// VkBool32 hostQueryReset; + /// VkBool32 timelineSemaphore; + /// VkBool32 bufferDeviceAddress; + /// VkBool32 bufferDeviceAddressCaptureReplay; + /// VkBool32 bufferDeviceAddressMultiDevice; + /// VkBool32 vulkanMemoryModel; + /// VkBool32 vulkanMemoryModelDeviceScope; + /// VkBool32 vulkanMemoryModelAvailabilityVisibilityChains; + /// VkBool32 shaderOutputViewportIndex; + /// VkBool32 shaderOutputLayer; + /// VkBool32 subgroupBroadcastDynamicId; + /// } VkPhysicalDeviceVulkan12Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 208)] + public unsafe partial struct VkPhysicalDeviceVulkan12Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan12Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SamplerMirrorClampToEdge + /// + [FieldOffset(16)] + public Brutal.Bool32 SamplerMirrorClampToEdge; + + /// + /// DrawIndirectCount + /// + [FieldOffset(20)] + public Brutal.Bool32 DrawIndirectCount; + + /// + /// StorageBuffer8BitAccess + /// + [FieldOffset(24)] + public Brutal.Bool32 StorageBuffer8BitAccess; + + /// + /// UniformAndStorageBuffer8BitAccess + /// + [FieldOffset(28)] + public Brutal.Bool32 UniformAndStorageBuffer8BitAccess; + + /// + /// StoragePushConstant8 + /// + [FieldOffset(32)] + public Brutal.Bool32 StoragePushConstant8; + + /// + /// ShaderBufferInt64Atomics + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderBufferInt64Atomics; + + /// + /// ShaderSharedInt64Atomics + /// + [FieldOffset(40)] + public Brutal.Bool32 ShaderSharedInt64Atomics; + + /// + /// ShaderFloat16 + /// + [FieldOffset(44)] + public Brutal.Bool32 ShaderFloat16; + + /// + /// ShaderInt8 + /// + [FieldOffset(48)] + public Brutal.Bool32 ShaderInt8; + + /// + /// DescriptorIndexing + /// + [FieldOffset(52)] + public Brutal.Bool32 DescriptorIndexing; + + /// + /// ShaderInputAttachmentArrayDynamicIndexing + /// + [FieldOffset(56)] + public Brutal.Bool32 ShaderInputAttachmentArrayDynamicIndexing; + + /// + /// ShaderUniformTexelBufferArrayDynamicIndexing + /// + [FieldOffset(60)] + public Brutal.Bool32 ShaderUniformTexelBufferArrayDynamicIndexing; + + /// + /// ShaderStorageTexelBufferArrayDynamicIndexing + /// + [FieldOffset(64)] + public Brutal.Bool32 ShaderStorageTexelBufferArrayDynamicIndexing; + + /// + /// ShaderUniformBufferArrayNonUniformIndexing + /// + [FieldOffset(68)] + public Brutal.Bool32 ShaderUniformBufferArrayNonUniformIndexing; + + /// + /// ShaderSampledImageArrayNonUniformIndexing + /// + [FieldOffset(72)] + public Brutal.Bool32 ShaderSampledImageArrayNonUniformIndexing; + + /// + /// ShaderStorageBufferArrayNonUniformIndexing + /// + [FieldOffset(76)] + public Brutal.Bool32 ShaderStorageBufferArrayNonUniformIndexing; + + /// + /// ShaderStorageImageArrayNonUniformIndexing + /// + [FieldOffset(80)] + public Brutal.Bool32 ShaderStorageImageArrayNonUniformIndexing; + + /// + /// ShaderInputAttachmentArrayNonUniformIndexing + /// + [FieldOffset(84)] + public Brutal.Bool32 ShaderInputAttachmentArrayNonUniformIndexing; + + /// + /// ShaderUniformTexelBufferArrayNonUniformIndexing + /// + [FieldOffset(88)] + public Brutal.Bool32 ShaderUniformTexelBufferArrayNonUniformIndexing; + + /// + /// ShaderStorageTexelBufferArrayNonUniformIndexing + /// + [FieldOffset(92)] + public Brutal.Bool32 ShaderStorageTexelBufferArrayNonUniformIndexing; + + /// + /// DescriptorBindingUniformBufferUpdateAfterBind + /// + [FieldOffset(96)] + public Brutal.Bool32 DescriptorBindingUniformBufferUpdateAfterBind; + + /// + /// DescriptorBindingSampledImageUpdateAfterBind + /// + [FieldOffset(100)] + public Brutal.Bool32 DescriptorBindingSampledImageUpdateAfterBind; + + /// + /// DescriptorBindingStorageImageUpdateAfterBind + /// + [FieldOffset(104)] + public Brutal.Bool32 DescriptorBindingStorageImageUpdateAfterBind; + + /// + /// DescriptorBindingStorageBufferUpdateAfterBind + /// + [FieldOffset(108)] + public Brutal.Bool32 DescriptorBindingStorageBufferUpdateAfterBind; + + /// + /// DescriptorBindingUniformTexelBufferUpdateAfterBind + /// + [FieldOffset(112)] + public Brutal.Bool32 DescriptorBindingUniformTexelBufferUpdateAfterBind; + + /// + /// DescriptorBindingStorageTexelBufferUpdateAfterBind + /// + [FieldOffset(116)] + public Brutal.Bool32 DescriptorBindingStorageTexelBufferUpdateAfterBind; + + /// + /// DescriptorBindingUpdateUnusedWhilePending + /// + [FieldOffset(120)] + public Brutal.Bool32 DescriptorBindingUpdateUnusedWhilePending; + + /// + /// DescriptorBindingPartiallyBound + /// + [FieldOffset(124)] + public Brutal.Bool32 DescriptorBindingPartiallyBound; + + /// + /// DescriptorBindingVariableDescriptorCount + /// + [FieldOffset(128)] + public Brutal.Bool32 DescriptorBindingVariableDescriptorCount; + + /// + /// RuntimeDescriptorArray + /// + [FieldOffset(132)] + public Brutal.Bool32 RuntimeDescriptorArray; + + /// + /// SamplerFilterMinmax + /// + [FieldOffset(136)] + public Brutal.Bool32 SamplerFilterMinmax; + + /// + /// ScalarBlockLayout + /// + [FieldOffset(140)] + public Brutal.Bool32 ScalarBlockLayout; + + /// + /// ImagelessFramebuffer + /// + [FieldOffset(144)] + public Brutal.Bool32 ImagelessFramebuffer; + + /// + /// UniformBufferStandardLayout + /// + [FieldOffset(148)] + public Brutal.Bool32 UniformBufferStandardLayout; + + /// + /// ShaderSubgroupExtendedTypes + /// + [FieldOffset(152)] + public Brutal.Bool32 ShaderSubgroupExtendedTypes; + + /// + /// SeparateDepthStencilLayouts + /// + [FieldOffset(156)] + public Brutal.Bool32 SeparateDepthStencilLayouts; + + /// + /// HostQueryReset + /// + [FieldOffset(160)] + public Brutal.Bool32 HostQueryReset; + + /// + /// TimelineSemaphore + /// + [FieldOffset(164)] + public Brutal.Bool32 TimelineSemaphore; + + /// + /// BufferDeviceAddress + /// + [FieldOffset(168)] + public Brutal.Bool32 BufferDeviceAddress; + + /// + /// BufferDeviceAddressCaptureReplay + /// + [FieldOffset(172)] + public Brutal.Bool32 BufferDeviceAddressCaptureReplay; + + /// + /// BufferDeviceAddressMultiDevice + /// + [FieldOffset(176)] + public Brutal.Bool32 BufferDeviceAddressMultiDevice; + + /// + /// VulkanMemoryModel + /// + [FieldOffset(180)] + public Brutal.Bool32 VulkanMemoryModel; + + /// + /// VulkanMemoryModelDeviceScope + /// + [FieldOffset(184)] + public Brutal.Bool32 VulkanMemoryModelDeviceScope; + + /// + /// VulkanMemoryModelAvailabilityVisibilityChains + /// + [FieldOffset(188)] + public Brutal.Bool32 VulkanMemoryModelAvailabilityVisibilityChains; + + /// + /// ShaderOutputViewportIndex + /// + [FieldOffset(192)] + public Brutal.Bool32 ShaderOutputViewportIndex; + + /// + /// ShaderOutputLayer + /// + [FieldOffset(196)] + public Brutal.Bool32 ShaderOutputLayer; + + /// + /// SubgroupBroadcastDynamicId + /// + [FieldOffset(200)] + public Brutal.Bool32 SubgroupBroadcastDynamicId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Properties.gen.cs new file mode 100644 index 0000000..8d62ebf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan12Properties.gen.cs @@ -0,0 +1,393 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan12Properties - Structure specifying physical device properties for functionality promoted to Vulkan 1.2 + /// + /// + /// + /// The VkPhysicalDeviceVulkan12Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceVulkan12Properties { + /// VkStructureType sType; + /// void* pNext; + /// VkDriverId driverID; + /// char driverName[VK_MAX_DRIVER_NAME_SIZE]; + /// char driverInfo[VK_MAX_DRIVER_INFO_SIZE]; + /// VkConformanceVersion conformanceVersion; + /// VkShaderFloatControlsIndependence denormBehaviorIndependence; + /// VkShaderFloatControlsIndependence roundingModeIndependence; + /// VkBool32 shaderSignedZeroInfNanPreserveFloat16; + /// VkBool32 shaderSignedZeroInfNanPreserveFloat32; + /// VkBool32 shaderSignedZeroInfNanPreserveFloat64; + /// VkBool32 shaderDenormPreserveFloat16; + /// VkBool32 shaderDenormPreserveFloat32; + /// VkBool32 shaderDenormPreserveFloat64; + /// VkBool32 shaderDenormFlushToZeroFloat16; + /// VkBool32 shaderDenormFlushToZeroFloat32; + /// VkBool32 shaderDenormFlushToZeroFloat64; + /// VkBool32 shaderRoundingModeRTEFloat16; + /// VkBool32 shaderRoundingModeRTEFloat32; + /// VkBool32 shaderRoundingModeRTEFloat64; + /// VkBool32 shaderRoundingModeRTZFloat16; + /// VkBool32 shaderRoundingModeRTZFloat32; + /// VkBool32 shaderRoundingModeRTZFloat64; + /// uint32_t maxUpdateAfterBindDescriptorsInAllPools; + /// VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; + /// VkBool32 shaderSampledImageArrayNonUniformIndexingNative; + /// VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; + /// VkBool32 shaderStorageImageArrayNonUniformIndexingNative; + /// VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; + /// VkBool32 robustBufferAccessUpdateAfterBind; + /// VkBool32 quadDivergentImplicitLod; + /// uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; + /// uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; + /// uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; + /// uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; + /// uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; + /// uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; + /// uint32_t maxPerStageUpdateAfterBindResources; + /// uint32_t maxDescriptorSetUpdateAfterBindSamplers; + /// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; + /// uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; + /// uint32_t maxDescriptorSetUpdateAfterBindSampledImages; + /// uint32_t maxDescriptorSetUpdateAfterBindStorageImages; + /// uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; + /// VkResolveModeFlags supportedDepthResolveModes; + /// VkResolveModeFlags supportedStencilResolveModes; + /// VkBool32 independentResolveNone; + /// VkBool32 independentResolve; + /// VkBool32 filterMinmaxSingleComponentFormats; + /// VkBool32 filterMinmaxImageComponentMapping; + /// uint64_t maxTimelineSemaphoreValueDifference; + /// VkSampleCountFlags framebufferIntegerColorSampleCounts; + /// } VkPhysicalDeviceVulkan12Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 736)] + public unsafe partial struct VkPhysicalDeviceVulkan12Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan12Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DriverID + /// + [FieldOffset(16)] + public VkDriverId DriverID; + + /// + [FieldOffset(20)] + public fixed byte DriverName[256]; + + /// + [FieldOffset(276)] + public fixed byte DriverInfo[256]; + + /// + /// ConformanceVersion + /// + [FieldOffset(532)] + public VkConformanceVersion ConformanceVersion; + + /// + /// DenormBehaviorIndependence + /// + [FieldOffset(536)] + public VkShaderFloatControlsIndependence DenormBehaviorIndependence; + + /// + /// RoundingModeIndependence + /// + [FieldOffset(540)] + public VkShaderFloatControlsIndependence RoundingModeIndependence; + + /// + /// ShaderSignedZeroInfNanPreserveFloat16 + /// + [FieldOffset(544)] + public Brutal.Bool32 ShaderSignedZeroInfNanPreserveFloat16; + + /// + /// ShaderSignedZeroInfNanPreserveFloat32 + /// + [FieldOffset(548)] + public Brutal.Bool32 ShaderSignedZeroInfNanPreserveFloat32; + + /// + /// ShaderSignedZeroInfNanPreserveFloat64 + /// + [FieldOffset(552)] + public Brutal.Bool32 ShaderSignedZeroInfNanPreserveFloat64; + + /// + /// ShaderDenormPreserveFloat16 + /// + [FieldOffset(556)] + public Brutal.Bool32 ShaderDenormPreserveFloat16; + + /// + /// ShaderDenormPreserveFloat32 + /// + [FieldOffset(560)] + public Brutal.Bool32 ShaderDenormPreserveFloat32; + + /// + /// ShaderDenormPreserveFloat64 + /// + [FieldOffset(564)] + public Brutal.Bool32 ShaderDenormPreserveFloat64; + + /// + /// ShaderDenormFlushToZeroFloat16 + /// + [FieldOffset(568)] + public Brutal.Bool32 ShaderDenormFlushToZeroFloat16; + + /// + /// ShaderDenormFlushToZeroFloat32 + /// + [FieldOffset(572)] + public Brutal.Bool32 ShaderDenormFlushToZeroFloat32; + + /// + /// ShaderDenormFlushToZeroFloat64 + /// + [FieldOffset(576)] + public Brutal.Bool32 ShaderDenormFlushToZeroFloat64; + + /// + /// ShaderRoundingModeRTEFloat16 + /// + [FieldOffset(580)] + public Brutal.Bool32 ShaderRoundingModeRTEFloat16; + + /// + /// ShaderRoundingModeRTEFloat32 + /// + [FieldOffset(584)] + public Brutal.Bool32 ShaderRoundingModeRTEFloat32; + + /// + /// ShaderRoundingModeRTEFloat64 + /// + [FieldOffset(588)] + public Brutal.Bool32 ShaderRoundingModeRTEFloat64; + + /// + /// ShaderRoundingModeRTZFloat16 + /// + [FieldOffset(592)] + public Brutal.Bool32 ShaderRoundingModeRTZFloat16; + + /// + /// ShaderRoundingModeRTZFloat32 + /// + [FieldOffset(596)] + public Brutal.Bool32 ShaderRoundingModeRTZFloat32; + + /// + /// ShaderRoundingModeRTZFloat64 + /// + [FieldOffset(600)] + public Brutal.Bool32 ShaderRoundingModeRTZFloat64; + + /// + /// MaxUpdateAfterBindDescriptorsInAllPools + /// + [FieldOffset(604)] + public int MaxUpdateAfterBindDescriptorsInAllPools; + + /// + /// ShaderUniformBufferArrayNonUniformIndexingNative + /// + [FieldOffset(608)] + public Brutal.Bool32 ShaderUniformBufferArrayNonUniformIndexingNative; + + /// + /// ShaderSampledImageArrayNonUniformIndexingNative + /// + [FieldOffset(612)] + public Brutal.Bool32 ShaderSampledImageArrayNonUniformIndexingNative; + + /// + /// ShaderStorageBufferArrayNonUniformIndexingNative + /// + [FieldOffset(616)] + public Brutal.Bool32 ShaderStorageBufferArrayNonUniformIndexingNative; + + /// + /// ShaderStorageImageArrayNonUniformIndexingNative + /// + [FieldOffset(620)] + public Brutal.Bool32 ShaderStorageImageArrayNonUniformIndexingNative; + + /// + /// ShaderInputAttachmentArrayNonUniformIndexingNative + /// + [FieldOffset(624)] + public Brutal.Bool32 ShaderInputAttachmentArrayNonUniformIndexingNative; + + /// + /// RobustBufferAccessUpdateAfterBind + /// + [FieldOffset(628)] + public Brutal.Bool32 RobustBufferAccessUpdateAfterBind; + + /// + /// QuadDivergentImplicitLod + /// + [FieldOffset(632)] + public Brutal.Bool32 QuadDivergentImplicitLod; + + /// + /// MaxPerStageDescriptorUpdateAfterBindSamplers + /// + [FieldOffset(636)] + public int MaxPerStageDescriptorUpdateAfterBindSamplers; + + /// + /// MaxPerStageDescriptorUpdateAfterBindUniformBuffers + /// + [FieldOffset(640)] + public int MaxPerStageDescriptorUpdateAfterBindUniformBuffers; + + /// + /// MaxPerStageDescriptorUpdateAfterBindStorageBuffers + /// + [FieldOffset(644)] + public int MaxPerStageDescriptorUpdateAfterBindStorageBuffers; + + /// + /// MaxPerStageDescriptorUpdateAfterBindSampledImages + /// + [FieldOffset(648)] + public int MaxPerStageDescriptorUpdateAfterBindSampledImages; + + /// + /// MaxPerStageDescriptorUpdateAfterBindStorageImages + /// + [FieldOffset(652)] + public int MaxPerStageDescriptorUpdateAfterBindStorageImages; + + /// + /// MaxPerStageDescriptorUpdateAfterBindInputAttachments + /// + [FieldOffset(656)] + public int MaxPerStageDescriptorUpdateAfterBindInputAttachments; + + /// + /// MaxPerStageUpdateAfterBindResources + /// + [FieldOffset(660)] + public int MaxPerStageUpdateAfterBindResources; + + /// + /// MaxDescriptorSetUpdateAfterBindSamplers + /// + [FieldOffset(664)] + public int MaxDescriptorSetUpdateAfterBindSamplers; + + /// + /// MaxDescriptorSetUpdateAfterBindUniformBuffers + /// + [FieldOffset(668)] + public int MaxDescriptorSetUpdateAfterBindUniformBuffers; + + /// + /// MaxDescriptorSetUpdateAfterBindUniformBuffersDynamic + /// + [FieldOffset(672)] + public int MaxDescriptorSetUpdateAfterBindUniformBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageBuffers + /// + [FieldOffset(676)] + public int MaxDescriptorSetUpdateAfterBindStorageBuffers; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageBuffersDynamic + /// + [FieldOffset(680)] + public int MaxDescriptorSetUpdateAfterBindStorageBuffersDynamic; + + /// + /// MaxDescriptorSetUpdateAfterBindSampledImages + /// + [FieldOffset(684)] + public int MaxDescriptorSetUpdateAfterBindSampledImages; + + /// + /// MaxDescriptorSetUpdateAfterBindStorageImages + /// + [FieldOffset(688)] + public int MaxDescriptorSetUpdateAfterBindStorageImages; + + /// + /// MaxDescriptorSetUpdateAfterBindInputAttachments + /// + [FieldOffset(692)] + public int MaxDescriptorSetUpdateAfterBindInputAttachments; + + /// + /// SupportedDepthResolveModes + /// + [FieldOffset(696)] + public VkResolveModeFlags SupportedDepthResolveModes; + + /// + /// SupportedStencilResolveModes + /// + [FieldOffset(700)] + public VkResolveModeFlags SupportedStencilResolveModes; + + /// + /// IndependentResolveNone + /// + [FieldOffset(704)] + public Brutal.Bool32 IndependentResolveNone; + + /// + /// IndependentResolve + /// + [FieldOffset(708)] + public Brutal.Bool32 IndependentResolve; + + /// + /// FilterMinmaxSingleComponentFormats + /// + [FieldOffset(712)] + public Brutal.Bool32 FilterMinmaxSingleComponentFormats; + + /// + /// FilterMinmaxImageComponentMapping + /// + [FieldOffset(716)] + public Brutal.Bool32 FilterMinmaxImageComponentMapping; + + /// + /// MaxTimelineSemaphoreValueDifference + /// + [FieldOffset(720)] + public nint MaxTimelineSemaphoreValueDifference; + + /// + /// FramebufferIntegerColorSampleCounts + /// + [FieldOffset(728)] + public VkSampleCountFlags FramebufferIntegerColorSampleCounts; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Features.gen.cs new file mode 100644 index 0000000..93b7dc6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Features.gen.cs @@ -0,0 +1,138 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan13Features - Structure describing the Vulkan 1.3 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVulkan13Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceVulkan13Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 robustImageAccess; + /// VkBool32 inlineUniformBlock; + /// VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind; + /// VkBool32 pipelineCreationCacheControl; + /// VkBool32 privateData; + /// VkBool32 shaderDemoteToHelperInvocation; + /// VkBool32 shaderTerminateInvocation; + /// VkBool32 subgroupSizeControl; + /// VkBool32 computeFullSubgroups; + /// VkBool32 synchronization2; + /// VkBool32 textureCompressionASTC_HDR; + /// VkBool32 shaderZeroInitializeWorkgroupMemory; + /// VkBool32 dynamicRendering; + /// VkBool32 shaderIntegerDotProduct; + /// VkBool32 maintenance4; + /// } VkPhysicalDeviceVulkan13Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkPhysicalDeviceVulkan13Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan13Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RobustImageAccess + /// + [FieldOffset(16)] + public Brutal.Bool32 RobustImageAccess; + + /// + /// InlineUniformBlock + /// + [FieldOffset(20)] + public Brutal.Bool32 InlineUniformBlock; + + /// + /// DescriptorBindingInlineUniformBlockUpdateAfterBind + /// + [FieldOffset(24)] + public Brutal.Bool32 DescriptorBindingInlineUniformBlockUpdateAfterBind; + + /// + /// PipelineCreationCacheControl + /// + [FieldOffset(28)] + public Brutal.Bool32 PipelineCreationCacheControl; + + /// + /// PrivateData + /// + [FieldOffset(32)] + public Brutal.Bool32 PrivateData; + + /// + /// ShaderDemoteToHelperInvocation + /// + [FieldOffset(36)] + public Brutal.Bool32 ShaderDemoteToHelperInvocation; + + /// + /// ShaderTerminateInvocation + /// + [FieldOffset(40)] + public Brutal.Bool32 ShaderTerminateInvocation; + + /// + /// SubgroupSizeControl + /// + [FieldOffset(44)] + public Brutal.Bool32 SubgroupSizeControl; + + /// + /// ComputeFullSubgroups + /// + [FieldOffset(48)] + public Brutal.Bool32 ComputeFullSubgroups; + + /// + /// Synchronization2 + /// + [FieldOffset(52)] + public Brutal.Bool32 Synchronization2; + + /// + /// TextureCompressionASTCHdr + /// + [FieldOffset(56)] + public Brutal.Bool32 TextureCompressionASTCHdr; + + /// + /// ShaderZeroInitializeWorkgroupMemory + /// + [FieldOffset(60)] + public Brutal.Bool32 ShaderZeroInitializeWorkgroupMemory; + + /// + /// DynamicRendering + /// + [FieldOffset(64)] + public Brutal.Bool32 DynamicRendering; + + /// + /// ShaderIntegerDotProduct + /// + [FieldOffset(68)] + public Brutal.Bool32 ShaderIntegerDotProduct; + + /// + /// Maintenance4 + /// + [FieldOffset(72)] + public Brutal.Bool32 Maintenance4; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Properties.gen.cs new file mode 100644 index 0000000..4f27f9a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan13Properties.gen.cs @@ -0,0 +1,348 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan13Properties - Structure specifying physical device properties for functionality promoted to Vulkan 1.3 + /// + /// + /// + /// The VkPhysicalDeviceVulkan13Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceVulkan13Properties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t minSubgroupSize; + /// uint32_t maxSubgroupSize; + /// uint32_t maxComputeWorkgroupSubgroups; + /// VkShaderStageFlags requiredSubgroupSizeStages; + /// uint32_t maxInlineUniformBlockSize; + /// uint32_t maxPerStageDescriptorInlineUniformBlocks; + /// uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; + /// uint32_t maxDescriptorSetInlineUniformBlocks; + /// uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks; + /// uint32_t maxInlineUniformTotalSize; + /// VkBool32 integerDotProduct8BitUnsignedAccelerated; + /// VkBool32 integerDotProduct8BitSignedAccelerated; + /// VkBool32 integerDotProduct8BitMixedSignednessAccelerated; + /// VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated; + /// VkBool32 integerDotProduct4x8BitPackedSignedAccelerated; + /// VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated; + /// VkBool32 integerDotProduct16BitUnsignedAccelerated; + /// VkBool32 integerDotProduct16BitSignedAccelerated; + /// VkBool32 integerDotProduct16BitMixedSignednessAccelerated; + /// VkBool32 integerDotProduct32BitUnsignedAccelerated; + /// VkBool32 integerDotProduct32BitSignedAccelerated; + /// VkBool32 integerDotProduct32BitMixedSignednessAccelerated; + /// VkBool32 integerDotProduct64BitUnsignedAccelerated; + /// VkBool32 integerDotProduct64BitSignedAccelerated; + /// VkBool32 integerDotProduct64BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated; + /// VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; + /// VkDeviceSize storageTexelBufferOffsetAlignmentBytes; + /// VkBool32 storageTexelBufferOffsetSingleTexelAlignment; + /// VkDeviceSize uniformTexelBufferOffsetAlignmentBytes; + /// VkBool32 uniformTexelBufferOffsetSingleTexelAlignment; + /// VkDeviceSize maxBufferSize; + /// } VkPhysicalDeviceVulkan13Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 216)] + public unsafe partial struct VkPhysicalDeviceVulkan13Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan13Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinSubgroupSize + /// + [FieldOffset(16)] + public int MinSubgroupSize; + + /// + /// MaxSubgroupSize + /// + [FieldOffset(20)] + public int MaxSubgroupSize; + + /// + /// MaxComputeWorkgroupSubgroups + /// + [FieldOffset(24)] + public int MaxComputeWorkgroupSubgroups; + + /// + /// RequiredSubgroupSizeStages + /// + [FieldOffset(28)] + public VkShaderStageFlags RequiredSubgroupSizeStages; + + /// + /// MaxInlineUniformBlockSize + /// + [FieldOffset(32)] + public int MaxInlineUniformBlockSize; + + /// + /// MaxPerStageDescriptorInlineUniformBlocks + /// + [FieldOffset(36)] + public int MaxPerStageDescriptorInlineUniformBlocks; + + /// + /// MaxPerStageDescriptorUpdateAfterBindInlineUniformBlocks + /// + [FieldOffset(40)] + public int MaxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; + + /// + /// MaxDescriptorSetInlineUniformBlocks + /// + [FieldOffset(44)] + public int MaxDescriptorSetInlineUniformBlocks; + + /// + /// MaxDescriptorSetUpdateAfterBindInlineUniformBlocks + /// + [FieldOffset(48)] + public int MaxDescriptorSetUpdateAfterBindInlineUniformBlocks; + + /// + /// MaxInlineUniformTotalSize + /// + [FieldOffset(52)] + public int MaxInlineUniformTotalSize; + + /// + /// IntegerDotProduct8BitUnsignedAccelerated + /// + [FieldOffset(56)] + public Brutal.Bool32 IntegerDotProduct8BitUnsignedAccelerated; + + /// + /// IntegerDotProduct8BitSignedAccelerated + /// + [FieldOffset(60)] + public Brutal.Bool32 IntegerDotProduct8BitSignedAccelerated; + + /// + /// IntegerDotProduct8BitMixedSignednessAccelerated + /// + [FieldOffset(64)] + public Brutal.Bool32 IntegerDotProduct8BitMixedSignednessAccelerated; + + /// + /// IntegerDotProduct4x8BitPackedUnsignedAccelerated + /// + [FieldOffset(68)] + public Brutal.Bool32 IntegerDotProduct4x8BitPackedUnsignedAccelerated; + + /// + /// IntegerDotProduct4x8BitPackedSignedAccelerated + /// + [FieldOffset(72)] + public Brutal.Bool32 IntegerDotProduct4x8BitPackedSignedAccelerated; + + /// + /// IntegerDotProduct4x8BitPackedMixedSignednessAccelerated + /// + [FieldOffset(76)] + public Brutal.Bool32 IntegerDotProduct4x8BitPackedMixedSignednessAccelerated; + + /// + /// IntegerDotProduct16BitUnsignedAccelerated + /// + [FieldOffset(80)] + public Brutal.Bool32 IntegerDotProduct16BitUnsignedAccelerated; + + /// + /// IntegerDotProduct16BitSignedAccelerated + /// + [FieldOffset(84)] + public Brutal.Bool32 IntegerDotProduct16BitSignedAccelerated; + + /// + /// IntegerDotProduct16BitMixedSignednessAccelerated + /// + [FieldOffset(88)] + public Brutal.Bool32 IntegerDotProduct16BitMixedSignednessAccelerated; + + /// + /// IntegerDotProduct32BitUnsignedAccelerated + /// + [FieldOffset(92)] + public Brutal.Bool32 IntegerDotProduct32BitUnsignedAccelerated; + + /// + /// IntegerDotProduct32BitSignedAccelerated + /// + [FieldOffset(96)] + public Brutal.Bool32 IntegerDotProduct32BitSignedAccelerated; + + /// + /// IntegerDotProduct32BitMixedSignednessAccelerated + /// + [FieldOffset(100)] + public Brutal.Bool32 IntegerDotProduct32BitMixedSignednessAccelerated; + + /// + /// IntegerDotProduct64BitUnsignedAccelerated + /// + [FieldOffset(104)] + public Brutal.Bool32 IntegerDotProduct64BitUnsignedAccelerated; + + /// + /// IntegerDotProduct64BitSignedAccelerated + /// + [FieldOffset(108)] + public Brutal.Bool32 IntegerDotProduct64BitSignedAccelerated; + + /// + /// IntegerDotProduct64BitMixedSignednessAccelerated + /// + [FieldOffset(112)] + public Brutal.Bool32 IntegerDotProduct64BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating8BitUnsignedAccelerated + /// + [FieldOffset(116)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating8BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating8BitSignedAccelerated + /// + [FieldOffset(120)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating8BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated + /// + [FieldOffset(124)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated + /// + [FieldOffset(128)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated + /// + [FieldOffset(132)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated + /// + [FieldOffset(136)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating16BitUnsignedAccelerated + /// + [FieldOffset(140)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating16BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating16BitSignedAccelerated + /// + [FieldOffset(144)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating16BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated + /// + [FieldOffset(148)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating32BitUnsignedAccelerated + /// + [FieldOffset(152)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating32BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating32BitSignedAccelerated + /// + [FieldOffset(156)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating32BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated + /// + [FieldOffset(160)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating64BitUnsignedAccelerated + /// + [FieldOffset(164)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating64BitUnsignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating64BitSignedAccelerated + /// + [FieldOffset(168)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating64BitSignedAccelerated; + + /// + /// IntegerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated + /// + [FieldOffset(172)] + public Brutal.Bool32 IntegerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; + + /// + /// StorageTexelBufferOffsetAlignmentBytes + /// + [FieldOffset(176)] + public ByteSize64 StorageTexelBufferOffsetAlignmentBytes; + + /// + /// StorageTexelBufferOffsetSingleTexelAlignment + /// + [FieldOffset(184)] + public Brutal.Bool32 StorageTexelBufferOffsetSingleTexelAlignment; + + /// + /// UniformTexelBufferOffsetAlignmentBytes + /// + [FieldOffset(192)] + public ByteSize64 UniformTexelBufferOffsetAlignmentBytes; + + /// + /// UniformTexelBufferOffsetSingleTexelAlignment + /// + [FieldOffset(200)] + public Brutal.Bool32 UniformTexelBufferOffsetSingleTexelAlignment; + + /// + /// MaxBufferSize + /// + [FieldOffset(208)] + public ByteSize64 MaxBufferSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Features.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Features.gen.cs new file mode 100644 index 0000000..ce0ffdd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Features.gen.cs @@ -0,0 +1,180 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan14Features - Structure describing the Vulkan 1.4 features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceVulkan14Features structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceVulkan14Features { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 globalPriorityQuery; + /// VkBool32 shaderSubgroupRotate; + /// VkBool32 shaderSubgroupRotateClustered; + /// VkBool32 shaderFloatControls2; + /// VkBool32 shaderExpectAssume; + /// VkBool32 rectangularLines; + /// VkBool32 bresenhamLines; + /// VkBool32 smoothLines; + /// VkBool32 stippledRectangularLines; + /// VkBool32 stippledBresenhamLines; + /// VkBool32 stippledSmoothLines; + /// VkBool32 vertexAttributeInstanceRateDivisor; + /// VkBool32 vertexAttributeInstanceRateZeroDivisor; + /// VkBool32 indexTypeUint8; + /// VkBool32 dynamicRenderingLocalRead; + /// VkBool32 maintenance5; + /// VkBool32 maintenance6; + /// VkBool32 pipelineProtectedAccess; + /// VkBool32 pipelineRobustness; + /// VkBool32 hostImageCopy; + /// VkBool32 pushDescriptor; + /// } VkPhysicalDeviceVulkan14Features; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct VkPhysicalDeviceVulkan14Features() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan14Features; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// GlobalPriorityQuery + /// + [FieldOffset(16)] + public Brutal.Bool32 GlobalPriorityQuery; + + /// + /// ShaderSubgroupRotate + /// + [FieldOffset(20)] + public Brutal.Bool32 ShaderSubgroupRotate; + + /// + /// ShaderSubgroupRotateClustered + /// + [FieldOffset(24)] + public Brutal.Bool32 ShaderSubgroupRotateClustered; + + /// + /// ShaderFloatControls2 + /// + [FieldOffset(28)] + public Brutal.Bool32 ShaderFloatControls2; + + /// + /// ShaderExpectAssume + /// + [FieldOffset(32)] + public Brutal.Bool32 ShaderExpectAssume; + + /// + /// RectangularLines + /// + [FieldOffset(36)] + public Brutal.Bool32 RectangularLines; + + /// + /// BresenhamLines + /// + [FieldOffset(40)] + public Brutal.Bool32 BresenhamLines; + + /// + /// SmoothLines + /// + [FieldOffset(44)] + public Brutal.Bool32 SmoothLines; + + /// + /// StippledRectangularLines + /// + [FieldOffset(48)] + public Brutal.Bool32 StippledRectangularLines; + + /// + /// StippledBresenhamLines + /// + [FieldOffset(52)] + public Brutal.Bool32 StippledBresenhamLines; + + /// + /// StippledSmoothLines + /// + [FieldOffset(56)] + public Brutal.Bool32 StippledSmoothLines; + + /// + /// VertexAttributeInstanceRateDivisor + /// + [FieldOffset(60)] + public Brutal.Bool32 VertexAttributeInstanceRateDivisor; + + /// + /// VertexAttributeInstanceRateZeroDivisor + /// + [FieldOffset(64)] + public Brutal.Bool32 VertexAttributeInstanceRateZeroDivisor; + + /// + /// IndexTypeUint8 + /// + [FieldOffset(68)] + public Brutal.Bool32 IndexTypeUint8; + + /// + /// DynamicRenderingLocalRead + /// + [FieldOffset(72)] + public Brutal.Bool32 DynamicRenderingLocalRead; + + /// + /// Maintenance5 + /// + [FieldOffset(76)] + public Brutal.Bool32 Maintenance5; + + /// + /// Maintenance6 + /// + [FieldOffset(80)] + public Brutal.Bool32 Maintenance6; + + /// + /// PipelineProtectedAccess + /// + [FieldOffset(84)] + public Brutal.Bool32 PipelineProtectedAccess; + + /// + /// PipelineRobustness + /// + [FieldOffset(88)] + public Brutal.Bool32 PipelineRobustness; + + /// + /// HostImageCopy + /// + [FieldOffset(92)] + public Brutal.Bool32 HostImageCopy; + + /// + /// PushDescriptor + /// + [FieldOffset(96)] + public Brutal.Bool32 PushDescriptor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Properties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Properties.gen.cs new file mode 100644 index 0000000..b03d2e2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkan14Properties.gen.cs @@ -0,0 +1,206 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkan14Properties - Structure specifying physical device properties for functionality promoted to Vulkan 1.4 + /// + /// + /// + /// The VkPhysicalDeviceVulkan14Properties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPhysicalDeviceVulkan14Properties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t lineSubPixelPrecisionBits; + /// uint32_t maxVertexAttribDivisor; + /// VkBool32 supportsNonZeroFirstInstance; + /// uint32_t maxPushDescriptors; + /// VkBool32 dynamicRenderingLocalReadDepthStencilAttachments; + /// VkBool32 dynamicRenderingLocalReadMultisampledAttachments; + /// VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; + /// VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; + /// VkBool32 depthStencilSwizzleOneSupport; + /// VkBool32 polygonModePointSize; + /// VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; + /// VkBool32 nonStrictWideLinesUseParallelogram; + /// VkBool32 blockTexelViewCompatibleMultipleLayers; + /// uint32_t maxCombinedImageSamplerDescriptorCount; + /// VkBool32 fragmentShadingRateClampCombinerInputs; + /// VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; + /// VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; + /// VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; + /// VkPipelineRobustnessImageBehavior defaultRobustnessImages; + /// uint32_t copySrcLayoutCount; + /// VkImageLayout* pCopySrcLayouts; + /// uint32_t copyDstLayoutCount; + /// VkImageLayout* pCopyDstLayouts; + /// uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; + /// VkBool32 identicalMemoryTypeRequirements; + /// } VkPhysicalDeviceVulkan14Properties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 144)] + public unsafe partial struct VkPhysicalDeviceVulkan14Properties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkan14Properties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LineSubPixelPrecisionBits + /// + [FieldOffset(16)] + public int LineSubPixelPrecisionBits; + + /// + /// MaxVertexAttribDivisor + /// + [FieldOffset(20)] + public int MaxVertexAttribDivisor; + + /// + /// SupportsNonZeroFirstInstance + /// + [FieldOffset(24)] + public Brutal.Bool32 SupportsNonZeroFirstInstance; + + /// + /// MaxPushDescriptors + /// + [FieldOffset(28)] + public int MaxPushDescriptors; + + /// + /// DynamicRenderingLocalReadDepthStencilAttachments + /// + [FieldOffset(32)] + public Brutal.Bool32 DynamicRenderingLocalReadDepthStencilAttachments; + + /// + /// DynamicRenderingLocalReadMultisampledAttachments + /// + [FieldOffset(36)] + public Brutal.Bool32 DynamicRenderingLocalReadMultisampledAttachments; + + /// + /// EarlyFragmentMultisampleCoverageAfterSampleCounting + /// + [FieldOffset(40)] + public Brutal.Bool32 EarlyFragmentMultisampleCoverageAfterSampleCounting; + + /// + /// EarlyFragmentSampleMaskTestBeforeSampleCounting + /// + [FieldOffset(44)] + public Brutal.Bool32 EarlyFragmentSampleMaskTestBeforeSampleCounting; + + /// + /// DepthStencilSwizzleOneSupport + /// + [FieldOffset(48)] + public Brutal.Bool32 DepthStencilSwizzleOneSupport; + + /// + /// PolygonModePointSize + /// + [FieldOffset(52)] + public Brutal.Bool32 PolygonModePointSize; + + /// + /// NonStrictSinglePixelWideLinesUseParallelogram + /// + [FieldOffset(56)] + public Brutal.Bool32 NonStrictSinglePixelWideLinesUseParallelogram; + + /// + /// NonStrictWideLinesUseParallelogram + /// + [FieldOffset(60)] + public Brutal.Bool32 NonStrictWideLinesUseParallelogram; + + /// + /// BlockTexelViewCompatibleMultipleLayers + /// + [FieldOffset(64)] + public Brutal.Bool32 BlockTexelViewCompatibleMultipleLayers; + + /// + /// MaxCombinedImageSamplerDescriptorCount + /// + [FieldOffset(68)] + public int MaxCombinedImageSamplerDescriptorCount; + + /// + /// FragmentShadingRateClampCombinerInputs + /// + [FieldOffset(72)] + public Brutal.Bool32 FragmentShadingRateClampCombinerInputs; + + /// + /// DefaultRobustnessStorageBuffers + /// + [FieldOffset(76)] + public VkPipelineRobustnessBufferBehavior DefaultRobustnessStorageBuffers; + + /// + /// DefaultRobustnessUniformBuffers + /// + [FieldOffset(80)] + public VkPipelineRobustnessBufferBehavior DefaultRobustnessUniformBuffers; + + /// + /// DefaultRobustnessVertexInputs + /// + [FieldOffset(84)] + public VkPipelineRobustnessBufferBehavior DefaultRobustnessVertexInputs; + + /// + /// DefaultRobustnessImages + /// + [FieldOffset(88)] + public VkPipelineRobustnessImageBehavior DefaultRobustnessImages; + + /// + /// CopySrcLayoutCount + /// + [FieldOffset(92)] + public int CopySrcLayoutCount; + + /// + /// CopySrcLayouts + /// + [FieldOffset(96)] + public VkImageLayout* CopySrcLayouts; + + /// + /// CopyDstLayoutCount + /// + [FieldOffset(104)] + public int CopyDstLayoutCount; + + /// + /// CopyDstLayouts + /// + [FieldOffset(112)] + public VkImageLayout* CopyDstLayouts; + + /// + [FieldOffset(120)] + public fixed byte OptimalTilingLayoutUUID[16]; + + /// + /// IdenticalMemoryTypeRequirements + /// + [FieldOffset(136)] + public Brutal.Bool32 IdenticalMemoryTypeRequirements; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkanMemoryModelFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkanMemoryModelFeatures.gen.cs new file mode 100644 index 0000000..3a69088 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceVulkanMemoryModelFeatures.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceVulkanMemoryModelFeatures - Structure describing features supported by the memory model + /// + /// + /// + /// The VkPhysicalDeviceVulkanMemoryModelFeatures structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkPhysicalDeviceVulkanMemoryModelFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 vulkanMemoryModel; + /// VkBool32 vulkanMemoryModelDeviceScope; + /// VkBool32 vulkanMemoryModelAvailabilityVisibilityChains; + /// } VkPhysicalDeviceVulkanMemoryModelFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceVulkanMemoryModelFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceVulkanMemoryModelFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VulkanMemoryModel + /// + [FieldOffset(16)] + public Brutal.Bool32 VulkanMemoryModel; + + /// + /// VulkanMemoryModelDeviceScope + /// + [FieldOffset(20)] + public Brutal.Bool32 VulkanMemoryModelDeviceScope; + + /// + /// VulkanMemoryModelAvailabilityVisibilityChains + /// + [FieldOffset(24)] + public Brutal.Bool32 VulkanMemoryModelAvailabilityVisibilityChains; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.gen.cs new file mode 100644 index 0000000..10bcbad --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.gen.cs @@ -0,0 +1,63 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR - Structure describing the workgroup storage explicit layout features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR structure + /// is defined as: + /// + /// + /// // Provided by VK_KHR_workgroup_memory_explicit_layout + /// typedef struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 workgroupMemoryExplicitLayout; + /// VkBool32 workgroupMemoryExplicitLayoutScalarBlockLayout; + /// VkBool32 workgroupMemoryExplicitLayout8BitAccess; + /// VkBool32 workgroupMemoryExplicitLayout16BitAccess; + /// } VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WorkgroupMemoryExplicitLayout + /// + [FieldOffset(16)] + public Brutal.Bool32 WorkgroupMemoryExplicitLayout; + + /// + /// WorkgroupMemoryExplicitLayoutScalarBlockLayout + /// + [FieldOffset(20)] + public Brutal.Bool32 WorkgroupMemoryExplicitLayoutScalarBlockLayout; + + /// + /// WorkgroupMemoryExplicitLayout8BitAccess + /// + [FieldOffset(24)] + public Brutal.Bool32 WorkgroupMemoryExplicitLayout8BitAccess; + + /// + /// WorkgroupMemoryExplicitLayout16BitAccess + /// + [FieldOffset(28)] + public Brutal.Bool32 WorkgroupMemoryExplicitLayout16BitAccess; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT.gen.cs new file mode 100644 index 0000000..387e38f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT - Structure describing whether the implementation supports additional 2-plane 444 {YCbCr} formats + /// + /// + /// + /// The VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_ycbcr_2plane_444_formats + /// typedef struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 ycbcr2plane444Formats; + /// } VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceYCbCr2Plane444FormatsFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Ycbcr2plane444Formats + /// + [FieldOffset(16)] + public Brutal.Bool32 Ycbcr2plane444Formats; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrDegammaFeaturesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrDegammaFeaturesQCOM.gen.cs new file mode 100644 index 0000000..f6ea605 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrDegammaFeaturesQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceYcbcrDegammaFeaturesQCOM - Structure describing {YCbCr} degamma features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceYcbcrDegammaFeaturesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_ycbcr_degamma + /// typedef struct VkPhysicalDeviceYcbcrDegammaFeaturesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 ycbcrDegamma; + /// } VkPhysicalDeviceYcbcrDegammaFeaturesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceYCbCrDegammaFeaturesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceYCbCrDegammaFeaturesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// YcbcrDegamma + /// + [FieldOffset(16)] + public Brutal.Bool32 YcbcrDegamma; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrImageArraysFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrImageArraysFeaturesEXT.gen.cs new file mode 100644 index 0000000..7ed59f1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceYCbCrImageArraysFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceYcbcrImageArraysFeaturesEXT - Structure describing extended {YCbCr} image creation features that can be supported by an implementation + /// + /// + /// + /// The VkPhysicalDeviceYcbcrImageArraysFeaturesEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_ycbcr_image_arrays + /// typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 ycbcrImageArrays; + /// } VkPhysicalDeviceYcbcrImageArraysFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceYCbCrImageArraysFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceYCbCrImageArraysFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// YcbcrImageArrays + /// + [FieldOffset(16)] + public Brutal.Bool32 YcbcrImageArrays; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT.gen.cs new file mode 100644 index 0000000..5dc187b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT - Structure describing whether the implementation supports cleared allocation functionality + /// + /// + /// + /// The VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_zero_initialize_device_memory + /// typedef struct VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 zeroInitializeDeviceMemory; + /// } VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceZeroInitializeDeviceMemoryFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ZeroInitializeDeviceMemory + /// + [FieldOffset(16)] + public Brutal.Bool32 ZeroInitializeDeviceMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.gen.cs new file mode 100644 index 0000000..20603b9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures - Structure describing support for zero initialization of workgroup memory by an implementation + /// + /// + /// + /// The VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 shaderZeroInitializeWorkgroupMemory; + /// } VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShaderZeroInitializeWorkgroupMemory + /// + [FieldOffset(16)] + public Brutal.Bool32 ShaderZeroInitializeWorkgroupMemory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryCreateInfoKHR.gen.cs new file mode 100644 index 0000000..c344309 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryCreateInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryCreateInfoKHR - Structure specifying where to retrieve data for pipeline binary creation + /// + /// + /// + /// The VkPipelineBinaryCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const VkPipelineBinaryKeysAndDataKHR* pKeysAndDataInfo; + /// VkPipeline pipeline; + /// const VkPipelineCreateInfoKHR* pPipelineCreateInfo; + /// } VkPipelineBinaryCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPipelineBinaryCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineBinaryCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// KeysAndDataInfo is `NULL` or a pointer to a VkPipelineBinaryKeysAndDataKHR structure that contains keys and data to create the pipeline binaries from. + /// + [FieldOffset(16)] + public VkPipelineBinaryKeysAndDataKHR* KeysAndDataInfo; + + /// + /// Pipeline is VK_NULL_HANDLE or a VkPipeline that contains data to create the pipeline binaries from. + /// + [FieldOffset(24)] + public VkPipeline Pipeline; + + /// + /// PipelineCreateInfo is `NULL` or a pointer to a VkPipelineCreateInfoKHR structure with the pipeline creation info. This is used to probe the implementation's internal cache for pipeline binaries. + /// + [FieldOffset(32)] + public VkPipelineCreateInfoKHR* PipelineCreateInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataInfoKHR.gen.cs new file mode 100644 index 0000000..8e60eb1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryDataInfoKHR - Structure specifying a pipeline binary to retrieve binary data from + /// + /// + /// + /// The VkPipelineBinaryDataInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryDataInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPipelineBinaryKHR pipelineBinary; + /// } VkPipelineBinaryDataInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineBinaryDataInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineBinaryDataInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBinary is the pipeline binary to get data from. + /// + [FieldOffset(16)] + public VkPipelineBinaryKHR PipelineBinary; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataKHR.gen.cs new file mode 100644 index 0000000..a5ff00e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryDataKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryDataKHR - Structure specifying data and length of a pipeline binary + /// + /// + /// + /// The VkPipelineBinaryDataKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryDataKHR { + /// size_t dataSize; + /// void* pData; + /// } VkPipelineBinaryDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkPipelineBinaryDataKHR() + { + /// + /// DataSize is the size of the pData buffer in bytes. + /// + [FieldOffset(0)] + public nuint DataSize; + + /// + /// Data is a pointer to a buffer of size bytes that contains pipeline binary data obtained from vkGetPipelineBinaryDataKHR. + /// + [FieldOffset(8)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryHandlesInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryHandlesInfoKHR.gen.cs new file mode 100644 index 0000000..d97c9af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryHandlesInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryHandlesInfoKHR - Structure containing newly created pipeline binaries + /// + /// + /// + /// The VkPipelineBinaryHandlesInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryHandlesInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t pipelineBinaryCount; + /// VkPipelineBinaryKHR* pPipelineBinaries; + /// } VkPipelineBinaryHandlesInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineBinaryHandlesInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineBinaryHandlesInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBinaryCount is the number of binaries associated with this pipeline or the number of entries in the pPipelineBinaries array. + /// + [FieldOffset(16)] + public int PipelineBinaryCount; + + /// + /// PipelineBinaries is `NULL` or a pointer to an array of VkPipelineBinaryKHR handles in which the resulting pipeline binaries are returned. + /// + [FieldOffset(24)] + public VkPipelineBinaryKHR* PipelineBinaries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryInfoKHR.gen.cs new file mode 100644 index 0000000..9219906 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryInfoKHR - Structure specifying pipeline binaries to use during pipeline creation + /// + /// + /// + /// The VkPipelineBinaryInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t binaryCount; + /// const VkPipelineBinaryKHR* pPipelineBinaries; + /// } VkPipelineBinaryInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineBinaryInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineBinaryInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// BinaryCount is the number of elements in the pPipelineBinaries array. + /// + [FieldOffset(16)] + public int BinaryCount; + + /// + /// PipelineBinaries is a pointer to an array of VkPipelineBinaryKHR handles. + /// + [FieldOffset(24)] + public VkPipelineBinaryKHR* PipelineBinaries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeyKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeyKHR.gen.cs new file mode 100644 index 0000000..5943c4e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeyKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryKeyKHR - Structure specifying a key to a pipeline binary + /// + /// + /// + /// The VkPipelineBinaryKeyKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryKeyKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t keySize; + /// uint8_t key[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]; + /// } VkPipelineBinaryKeyKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkPipelineBinaryKeyKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineBinaryKeyKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// KeySize is the size, in bytes, of valid data returned in key. + /// + [FieldOffset(16)] + public int KeySize; + + /// + [FieldOffset(20)] + public fixed byte Key[32]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeysAndDataKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeysAndDataKHR.gen.cs new file mode 100644 index 0000000..7b33191 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineBinaryKeysAndDataKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineBinaryKeysAndDataKHR - Structure specifying arrays of key and data pairs + /// + /// + /// + /// The VkPipelineBinaryKeysAndDataKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineBinaryKeysAndDataKHR { + /// uint32_t binaryCount; + /// const VkPipelineBinaryKeyKHR* pPipelineBinaryKeys; + /// const VkPipelineBinaryDataKHR* pPipelineBinaryData; + /// } VkPipelineBinaryKeysAndDataKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineBinaryKeysAndDataKHR() + { + /// + /// BinaryCount is the size of the pPipelineBinaryKeys and pPipelineBinaryData arrays + /// + [FieldOffset(0)] + public int BinaryCount; + + /// + /// PipelineBinaryKeys is a pointer to an array of VkPipelineBinaryKeyKHR structures containing the pipeline binary keys + /// + [FieldOffset(8)] + public VkPipelineBinaryKeyKHR* PipelineBinaryKeys; + + /// + /// PipelineBinaryData is a pointer to an array of VkPipelineBinaryDataKHR structures containing the pipeline binary data + /// + [FieldOffset(16)] + public VkPipelineBinaryDataKHR* PipelineBinaryData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCacheCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCacheCreateInfo.gen.cs new file mode 100644 index 0000000..107ea1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCacheCreateInfo.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCacheCreateInfo - Structure specifying parameters of a newly created pipeline cache + /// + /// + /// + /// The VkPipelineCacheCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineCacheCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCacheCreateFlags flags; + /// size_t initialDataSize; + /// const void* pInitialData; + /// } VkPipelineCacheCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPipelineCacheCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCacheCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineCacheCreateFlags Flags; + + /// + /// InitialDataSize is the number of bytes in pInitialData. If initialDataSize is zero, the pipeline cache will initially be empty. + /// + [FieldOffset(24)] + public nuint InitialDataSize; + + /// + /// InitialData is a pointer to previously retrieved pipeline cache data. If the pipeline cache data is incompatible (as defined below) with the device, the pipeline cache will be initially empty. If initialDataSize is zero, pInitialData is ignored. + /// + [FieldOffset(32)] + public void* InitialData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionDataGraphQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionDataGraphQCOM.gen.cs new file mode 100644 index 0000000..385bc04 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionDataGraphQCOM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCacheHeaderVersionDataGraphQCOM - Structure describing the layout of the pipeline cache header for data graphs + /// + /// + /// + /// The data graph pipeline cache header is defined as: + /// + /// + /// // Provided by VK_QCOM_data_graph_model + /// typedef struct VkPipelineCacheHeaderVersionDataGraphQCOM { + /// uint32_t headerSize; + /// VkPipelineCacheHeaderVersion headerVersion; + /// VkDataGraphModelCacheTypeQCOM cacheType; + /// uint32_t cacheVersion; + /// uint32_t toolchainVersion[VK_DATA_GRAPH_MODEL_TOOLCHAIN_VERSION_LENGTH_QCOM]; + /// } VkPipelineCacheHeaderVersionDataGraphQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct VkPipelineCacheHeaderVersionDataGraphQCOM() + { + /// + /// HeaderSize is the length in bytes of the pipeline cache header. + /// + [FieldOffset(0)] + public int HeaderSize; + + /// + /// HeaderVersion is a VkPipelineCacheHeaderVersion value specifying the version of the header. A consumer of the pipeline cache should use the cache version to interpret the remainder of the cache header. headerVersion must be written as exactly 4 bytes. + /// + [FieldOffset(4)] + public VkPipelineCacheHeaderVersion HeaderVersion; + + /// + /// CacheType is the VkDataGraphModelCacheTypeQCOM type of data graph cache encoded in the data. + /// + [FieldOffset(8)] + public VkDataGraphModelCacheTypeQCOM CacheType; + + /// + /// CacheVersion is the version of the encoding of the data graph cache. + /// + [FieldOffset(12)] + public int CacheVersion; + + /// + /// ToolchainVersion is a null-terminated UTF-8 string specifying the version of the compiler that built the data graph cache. + /// + [FieldOffset(16)] + public uint3 ToolchainVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionOne.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionOne.gen.cs new file mode 100644 index 0000000..0a220cc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCacheHeaderVersionOne.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCacheHeaderVersionOne - Structure describing the layout of the pipeline cache header + /// + /// + /// + /// Version one of the pipeline cache header is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineCacheHeaderVersionOne { + /// uint32_t headerSize; + /// VkPipelineCacheHeaderVersion headerVersion; + /// uint32_t vendorID; + /// uint32_t deviceID; + /// uint8_t pipelineCacheUUID[VK_UUID_SIZE]; + /// } VkPipelineCacheHeaderVersionOne; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineCacheHeaderVersionOne() + { + /// + /// HeaderSize is the length in bytes of the pipeline cache header. + /// + [FieldOffset(0)] + public int HeaderSize; + + /// + /// HeaderVersion is a VkPipelineCacheHeaderVersion value specifying the version of the header. A consumer of the pipeline cache should use the cache version to interpret the remainder of the cache header. headerVersion must be written as exactly 4 bytes. + /// + [FieldOffset(4)] + public VkPipelineCacheHeaderVersion HeaderVersion; + + /// + /// VendorID is the VkPhysicalDeviceProperties::vendorID of the implementation. + /// + [FieldOffset(8)] + public int VendorID; + + /// + /// DeviceID is the VkPhysicalDeviceProperties::deviceID of the implementation. + /// + [FieldOffset(12)] + public int DeviceID; + + /// + [FieldOffset(16)] + public fixed byte PipelineCacheUUID[16]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAdvancedStateCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAdvancedStateCreateInfoEXT.gen.cs new file mode 100644 index 0000000..c33a758 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAdvancedStateCreateInfoEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineColorBlendAdvancedStateCreateInfoEXT - Structure specifying parameters that affect advanced blend operations + /// + /// + /// + /// If the pNext chain of VkPipelineColorBlendStateCreateInfo + /// includes a VkPipelineColorBlendAdvancedStateCreateInfoEXT structure, + /// then that structure includes parameters that affect advanced blend + /// operations. + /// + /// + /// The VkPipelineColorBlendAdvancedStateCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_blend_operation_advanced + /// typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 srcPremultiplied; + /// VkBool32 dstPremultiplied; + /// VkBlendOverlapEXT blendOverlap; + /// } VkPipelineColorBlendAdvancedStateCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineColorBlendAdvancedStateCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineColorBlendAdvancedStateCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcPremultiplied specifies whether the source color of the blend operation is treated as premultiplied. + /// + [FieldOffset(16)] + public Brutal.Bool32 SrcPremultiplied; + + /// + /// DstPremultiplied specifies whether the destination color of the blend operation is treated as premultiplied. + /// + [FieldOffset(20)] + public Brutal.Bool32 DstPremultiplied; + + /// + /// BlendOverlap is a VkBlendOverlapEXT value specifying how the source and destination sample's coverage is correlated. + /// + [FieldOffset(24)] + public VkBlendOverlapEXT BlendOverlap; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAttachmentState.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAttachmentState.gen.cs new file mode 100644 index 0000000..644c2e6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendAttachmentState.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineColorBlendAttachmentState - Structure specifying a pipeline color blend attachment state + /// + /// + /// + /// The VkPipelineColorBlendAttachmentState structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineColorBlendAttachmentState { + /// VkBool32 blendEnable; + /// VkBlendFactor srcColorBlendFactor; + /// VkBlendFactor dstColorBlendFactor; + /// VkBlendOp colorBlendOp; + /// VkBlendFactor srcAlphaBlendFactor; + /// VkBlendFactor dstAlphaBlendFactor; + /// VkBlendOp alphaBlendOp; + /// VkColorComponentFlags colorWriteMask; + /// } VkPipelineColorBlendAttachmentState; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct VkPipelineColorBlendAttachmentState() + { + /// + /// BlendEnable controls whether blending is enabled for the corresponding color attachment. If blending is not enabled, the source fragment's color for that attachment is passed through unmodified. + /// + [FieldOffset(0)] + public Brutal.Bool32 BlendEnable; + + /// + /// SrcColorBlendFactor selects which blend factor is used to determine the source factors (S~r~,S~g~,S~b~). + /// + [FieldOffset(4)] + public VkBlendFactor SrcColorBlendFactor; + + /// + /// DstColorBlendFactor selects which blend factor is used to determine the destination factors (D~r~,D~g~,D~b~). + /// + [FieldOffset(8)] + public VkBlendFactor DstColorBlendFactor; + + /// + /// ColorBlendOp selects which blend operation is used to calculate the RGB values to write to the color attachment. + /// + [FieldOffset(12)] + public VkBlendOp ColorBlendOp; + + /// + /// SrcAlphaBlendFactor selects which blend factor is used to determine the source factor S~a~. + /// + [FieldOffset(16)] + public VkBlendFactor SrcAlphaBlendFactor; + + /// + /// DstAlphaBlendFactor selects which blend factor is used to determine the destination factor D~a~. + /// + [FieldOffset(20)] + public VkBlendFactor DstAlphaBlendFactor; + + /// + /// AlphaBlendOp selects which blend operation is used to calculate the alpha values to write to the color attachment. + /// + [FieldOffset(24)] + public VkBlendOp AlphaBlendOp; + + /// + /// ColorWriteMask is a bitmask of VkColorComponentFlags specifying which of the R, G, B, and/or A components are enabled for writing, as described for the Color Write Mask^. + /// + [FieldOffset(28)] + public VkColorComponentFlags ColorWriteMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendStateCreateInfo.gen.cs new file mode 100644 index 0000000..2b5897a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineColorBlendStateCreateInfo.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineColorBlendStateCreateInfo - Structure specifying parameters of a newly created pipeline color blend state + /// + /// + /// + /// The VkPipelineColorBlendStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineColorBlendStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineColorBlendStateCreateFlags flags; + /// VkBool32 logicOpEnable; + /// VkLogicOp logicOp; + /// uint32_t attachmentCount; + /// const VkPipelineColorBlendAttachmentState* pAttachments; + /// float blendConstants[4]; + /// } VkPipelineColorBlendStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkPipelineColorBlendStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineColorBlendStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineColorBlendStateCreateFlags Flags; + + /// + /// LogicOpEnable controls whether to apply Logical Operations^. + /// + [FieldOffset(20)] + public Brutal.Bool32 LogicOpEnable; + + /// + /// LogicOp selects which logical operation to apply. + /// + [FieldOffset(24)] + public VkLogicOp LogicOp; + + /// + /// AttachmentCount is the number of VkPipelineColorBlendAttachmentState elements in pAttachments. + /// + [FieldOffset(28)] + public int AttachmentCount; + + /// + /// Attachments is a pointer to an array of VkPipelineColorBlendAttachmentState structures defining blend state for each color attachment. + /// + [FieldOffset(32)] + public VkPipelineColorBlendAttachmentState* Attachments; + + /// + /// BlendConstants is a pointer to an array of four values used as the R, G, B, and A components of the blend constant that are used in blending, depending on the blend factor^. + /// + [FieldOffset(40)] + public float4 BlendConstants; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineColorWriteCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineColorWriteCreateInfoEXT.gen.cs new file mode 100644 index 0000000..af333f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineColorWriteCreateInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineColorWriteCreateInfoEXT - Structure specifying color write state of a newly created pipeline + /// + /// + /// + /// The VkPipelineColorWriteCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_color_write_enable + /// typedef struct VkPipelineColorWriteCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t attachmentCount; + /// const VkBool32* pColorWriteEnables; + /// } VkPipelineColorWriteCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineColorWriteCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineColorWriteCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AttachmentCount is the number of basetype:VkBool32 elements in pColorWriteEnables. + /// + [FieldOffset(16)] + public int AttachmentCount; + + /// + /// ColorWriteEnables is a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment. + /// + [FieldOffset(24)] + public Brutal.Bool32* ColorWriteEnables; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCompilerControlCreateInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCompilerControlCreateInfoAMD.gen.cs new file mode 100644 index 0000000..4b632f7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCompilerControlCreateInfoAMD.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCompilerControlCreateInfoAMD - Structure used to pass compilation control flags to a pipeline + /// + /// + /// + /// The compilation of a pipeline can be tuned by adding a + /// VkPipelineCompilerControlCreateInfoAMD structure to the pNext + /// chain of VkGraphicsPipelineCreateInfo or + /// VkComputePipelineCreateInfo. + /// + /// + /// // Provided by VK_AMD_pipeline_compiler_control + /// typedef struct VkPipelineCompilerControlCreateInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCompilerControlFlagsAMD compilerControlFlags; + /// } VkPipelineCompilerControlCreateInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineCompilerControlCreateInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCompilerControlCreateInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CompilerControlFlags is a bitmask of VkPipelineCompilerControlFlagsAMD affecting how the pipeline will be compiled. + /// + [FieldOffset(16)] + public VkPipelineCompilerControlFlagsAMD CompilerControlFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageModulationStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageModulationStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..25f6097 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageModulationStateCreateInfoNV.gen.cs @@ -0,0 +1,79 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCoverageModulationStateCreateInfoNV - Structure specifying parameters controlling coverage modulation + /// + /// + /// + /// As part of coverage reduction, fragment color values can also be modulated + /// (multiplied) by a value that is a function of fraction of covered + /// rasterization samples associated with that color sample. + /// + /// + /// Pipeline state controlling coverage modulation is specified through the + /// members of the VkPipelineCoverageModulationStateCreateInfoNV + /// structure. + /// + /// + /// The VkPipelineCoverageModulationStateCreateInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_framebuffer_mixed_samples + /// typedef struct VkPipelineCoverageModulationStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCoverageModulationStateCreateFlagsNV flags; + /// VkCoverageModulationModeNV coverageModulationMode; + /// VkBool32 coverageModulationTableEnable; + /// uint32_t coverageModulationTableCount; + /// const float* pCoverageModulationTable; + /// } VkPipelineCoverageModulationStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPipelineCoverageModulationStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCoverageModulationStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineCoverageModulationStateCreateFlagsNV Flags; + + /// + /// CoverageModulationMode is a VkCoverageModulationModeNV value controlling which color components are modulated. + /// + [FieldOffset(20)] + public VkCoverageModulationModeNV CoverageModulationMode; + + /// + /// CoverageModulationTableEnable controls whether the modulation factor is looked up from a table in pCoverageModulationTable. + /// + [FieldOffset(24)] + public Brutal.Bool32 CoverageModulationTableEnable; + + /// + /// CoverageModulationTableCount is the number of elements in pCoverageModulationTable. + /// + [FieldOffset(28)] + public int CoverageModulationTableCount; + + /// + /// CoverageModulationTable is a table of modulation factors containing a value for each number of covered samples. + /// + [FieldOffset(32)] + public float* CoverageModulationTable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageReductionStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageReductionStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..46ac3be --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageReductionStateCreateInfoNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCoverageReductionStateCreateInfoNV - Structure specifying parameters controlling coverage reduction + /// + /// + /// + /// The VkPipelineCoverageReductionStateCreateInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_coverage_reduction_mode + /// typedef struct VkPipelineCoverageReductionStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCoverageReductionStateCreateFlagsNV flags; + /// VkCoverageReductionModeNV coverageReductionMode; + /// } VkPipelineCoverageReductionStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineCoverageReductionStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCoverageReductionStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineCoverageReductionStateCreateFlagsNV Flags; + + /// + /// CoverageReductionMode is a VkCoverageReductionModeNV value controlling how color sample coverage is generated from pixel coverage. + /// + [FieldOffset(20)] + public VkCoverageReductionModeNV CoverageReductionMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageToColorStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageToColorStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..6c401ca --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCoverageToColorStateCreateInfoNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCoverageToColorStateCreateInfoNV - Structure specifying whether fragment coverage replaces a color + /// + /// + /// + /// The VkPipelineCoverageToColorStateCreateInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_fragment_coverage_to_color + /// typedef struct VkPipelineCoverageToColorStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCoverageToColorStateCreateFlagsNV flags; + /// VkBool32 coverageToColorEnable; + /// uint32_t coverageToColorLocation; + /// } VkPipelineCoverageToColorStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineCoverageToColorStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCoverageToColorStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineCoverageToColorStateCreateFlagsNV Flags; + + /// + /// CoverageToColorEnable controls whether the fragment coverage value replaces a fragment color output. + /// + [FieldOffset(20)] + public Brutal.Bool32 CoverageToColorEnable; + + /// + /// CoverageToColorLocation controls which fragment shader color output value is replaced. + /// + [FieldOffset(24)] + public int CoverageToColorLocation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCreateFlags2CreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCreateFlags2CreateInfo.gen.cs new file mode 100644 index 0000000..2e8b2ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCreateFlags2CreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreateFlags2CreateInfo - Extended pipeline create flags + /// + /// + /// + /// The VkPipelineCreateFlags2CreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPipelineCreateFlags2CreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreateFlags2 flags; + /// } VkPipelineCreateFlags2CreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineCreateFlags2CreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCreateFlags2CreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineCreateFlags2 specifying how a pipeline will be generated. + /// + [FieldOffset(16)] + public VkPipelineCreateFlags2 Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCreateInfoKHR.gen.cs new file mode 100644 index 0000000..32f7be3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCreateInfoKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreateInfoKHR - Structure specifying a pipeline createinfo chain + /// + /// + /// + /// The VkPipelineCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkPipelineCreateInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// } VkPipelineCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkPipelineCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCreateInfoKHR; + + /// + /// Next is a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedback.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedback.gen.cs new file mode 100644 index 0000000..e040fcc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedback.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreationFeedback - Feedback about the creation of a pipeline or pipeline stage + /// + /// + /// + /// The VkPipelineCreationFeedback structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPipelineCreationFeedback { + /// VkPipelineCreationFeedbackFlags flags; + /// uint64_t duration; + /// } VkPipelineCreationFeedback; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkPipelineCreationFeedback() + { + /// + /// Flags is a bitmask of VkPipelineCreationFeedbackFlags providing feedback about the creation of a pipeline or of a pipeline stage. + /// + [FieldOffset(0)] + public VkPipelineCreationFeedbackFlags Flags; + + /// + /// Duration is the duration spent creating a pipeline or pipeline stage in nanoseconds. + /// + [FieldOffset(8)] + public nint Duration; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedbackCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedbackCreateInfo.gen.cs new file mode 100644 index 0000000..f48aa1e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineCreationFeedbackCreateInfo.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineCreationFeedbackCreateInfo - Request for feedback about the creation of a pipeline + /// + /// + /// + /// Feedback about the creation of a particular pipeline object can be obtained + /// by adding a VkPipelineCreationFeedbackCreateInfo structure to the + /// pNext chain of VkGraphicsPipelineCreateInfo, + /// or VkComputePipelineCreateInfo. + /// The VkPipelineCreationFeedbackCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPipelineCreationFeedbackCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreationFeedback* pPipelineCreationFeedback; + /// uint32_t pipelineStageCreationFeedbackCount; + /// VkPipelineCreationFeedback* pPipelineStageCreationFeedbacks; + /// } VkPipelineCreationFeedbackCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPipelineCreationFeedbackCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineCreationFeedbackCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineCreationFeedback is a pointer to a VkPipelineCreationFeedback structure. + /// + [FieldOffset(16)] + public VkPipelineCreationFeedback* PipelineCreationFeedback; + + /// + /// PipelineStageCreationFeedbackCount is the number of elements in pPipelineStageCreationFeedbacks. + /// + [FieldOffset(24)] + public int PipelineStageCreationFeedbackCount; + + /// + /// PipelineStageCreationFeedbacks is a pointer to an array of pipelineStageCreationFeedbackCount VkPipelineCreationFeedback structures. + /// + [FieldOffset(32)] + public VkPipelineCreationFeedback* PipelineStageCreationFeedbacks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineDepthStencilStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineDepthStencilStateCreateInfo.gen.cs new file mode 100644 index 0000000..51a6adc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineDepthStencilStateCreateInfo.gen.cs @@ -0,0 +1,103 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineDepthStencilStateCreateInfo - Structure specifying parameters of a newly created pipeline depth stencil state + /// + /// + /// + /// The VkPipelineDepthStencilStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineDepthStencilStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineDepthStencilStateCreateFlags flags; + /// VkBool32 depthTestEnable; + /// VkBool32 depthWriteEnable; + /// VkCompareOp depthCompareOp; + /// VkBool32 depthBoundsTestEnable; + /// VkBool32 stencilTestEnable; + /// VkStencilOpState front; + /// VkStencilOpState back; + /// float minDepthBounds; + /// float maxDepthBounds; + /// } VkPipelineDepthStencilStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct VkPipelineDepthStencilStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineDepthStencilStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineDepthStencilStateCreateFlags Flags; + + /// + /// DepthTestEnable controls whether depth testing^ is enabled. + /// + [FieldOffset(20)] + public Brutal.Bool32 DepthTestEnable; + + /// + /// DepthWriteEnable controls whether depth writes^ are enabled when depthTestEnable is VK_TRUE. Depth writes are always disabled when depthTestEnable is VK_FALSE. + /// + [FieldOffset(24)] + public Brutal.Bool32 DepthWriteEnable; + + /// + /// DepthCompareOp is a VkCompareOp value specifying the comparison operator to use in the Depth Comparison^ step of the depth test^. + /// + [FieldOffset(28)] + public VkCompareOp DepthCompareOp; + + /// + /// DepthBoundsTestEnable controls whether depth bounds testing^ is enabled. + /// + [FieldOffset(32)] + public Brutal.Bool32 DepthBoundsTestEnable; + + /// + /// StencilTestEnable controls whether stencil testing^ is enabled. + /// + [FieldOffset(36)] + public Brutal.Bool32 StencilTestEnable; + + /// + /// Front and back are VkStencilOpState values controlling the corresponding parameters of the stencil test^. + /// + [FieldOffset(40)] + public VkStencilOpState Front; + + /// + /// Back + /// + [FieldOffset(68)] + public VkStencilOpState Back; + + /// + /// MinDepthBounds is the minimum depth bound used in the depth bounds test^. + /// + [FieldOffset(96)] + public float MinDepthBounds; + + /// + /// MaxDepthBounds is the maximum depth bound used in the depth bounds test^. + /// + [FieldOffset(100)] + public float MaxDepthBounds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineDiscardRectangleStateCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineDiscardRectangleStateCreateInfoEXT.gen.cs new file mode 100644 index 0000000..67f9529 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineDiscardRectangleStateCreateInfoEXT.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineDiscardRectangleStateCreateInfoEXT - Structure specifying discard rectangle + /// + /// + /// + /// The VkPipelineDiscardRectangleStateCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_discard_rectangles + /// typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineDiscardRectangleStateCreateFlagsEXT flags; + /// VkDiscardRectangleModeEXT discardRectangleMode; + /// uint32_t discardRectangleCount; + /// const VkRect2D* pDiscardRectangles; + /// } VkPipelineDiscardRectangleStateCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPipelineDiscardRectangleStateCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineDiscardRectangleStateCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineDiscardRectangleStateCreateFlagsEXT Flags; + + /// + /// DiscardRectangleMode is a VkDiscardRectangleModeEXT value determining whether the discard rectangle test is inclusive or exclusive. + /// + [FieldOffset(20)] + public VkDiscardRectangleModeEXT DiscardRectangleMode; + + /// + /// DiscardRectangleCount is the number of discard rectangles to use. + /// + [FieldOffset(24)] + public int DiscardRectangleCount; + + /// + /// DiscardRectangles is a pointer to an array of VkRect2D structures defining discard rectangles. + /// + [FieldOffset(32)] + public VkRect2D* DiscardRectangles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineDynamicStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineDynamicStateCreateInfo.gen.cs new file mode 100644 index 0000000..614f0e7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineDynamicStateCreateInfo.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineDynamicStateCreateInfo - Structure specifying parameters of a newly created pipeline dynamic state + /// + /// + /// + /// The VkPipelineDynamicStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineDynamicStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineDynamicStateCreateFlags flags; + /// uint32_t dynamicStateCount; + /// const VkDynamicState* pDynamicStates; + /// } VkPipelineDynamicStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineDynamicStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineDynamicStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineDynamicStateCreateFlags Flags; + + /// + /// DynamicStateCount is the number of elements in the pDynamicStates array. + /// + [FieldOffset(20)] + public int DynamicStateCount; + + /// + /// DynamicStates is a pointer to an array of VkDynamicState values specifying which pieces of pipeline state will use the values from dynamic state commands rather than from pipeline state creation information. + /// + [FieldOffset(24)] + public VkDynamicState* DynamicStates; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInfoKHR.gen.cs new file mode 100644 index 0000000..63e1740 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineExecutableInfoKHR - Structure describing a pipeline executable to query for associated statistics or internal representations + /// + /// + /// + /// The VkPipelineExecutableInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef struct VkPipelineExecutableInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipeline pipeline; + /// uint32_t executableIndex; + /// } VkPipelineExecutableInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineExecutableInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineExecutableInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Pipeline is the pipeline to query. + /// + [FieldOffset(16)] + public VkPipeline Pipeline; + + /// + /// ExecutableIndex is the index of the pipeline executable to query in the array of executable properties returned by vkGetPipelineExecutablePropertiesKHR. + /// + [FieldOffset(24)] + public int ExecutableIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInternalRepresentationKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInternalRepresentationKHR.gen.cs new file mode 100644 index 0000000..844fc32 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableInternalRepresentationKHR.gen.cs @@ -0,0 +1,65 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineExecutableInternalRepresentationKHR - Structure describing the textual form of a pipeline executable internal representation + /// + /// + /// + /// The VkPipelineExecutableInternalRepresentationKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef struct VkPipelineExecutableInternalRepresentationKHR { + /// VkStructureType sType; + /// void* pNext; + /// char name[VK_MAX_DESCRIPTION_SIZE]; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// VkBool32 isText; + /// size_t dataSize; + /// void* pData; + /// } VkPipelineExecutableInternalRepresentationKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 552)] + public unsafe partial struct VkPipelineExecutableInternalRepresentationKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineExecutableInternalRepresentationKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte Name[256]; + + /// + [FieldOffset(272)] + public fixed byte Description[256]; + + /// + /// IsText specifies whether the returned data is text or opaque data. If isText is VK_TRUE then the data returned in pData is text and is guaranteed to be a null-terminated UTF-8 string. + /// + [FieldOffset(528)] + public Brutal.Bool32 IsText; + + /// + /// DataSize is an integer related to the size, in bytes, of the internal representation's data, as described below. + /// + [FieldOffset(536)] + public nuint DataSize; + + /// + /// Data is either `NULL` or a pointer to a block of data into which the implementation will write the internal representation. + /// + [FieldOffset(544)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineExecutablePropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutablePropertiesKHR.gen.cs new file mode 100644 index 0000000..f1dc525 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutablePropertiesKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineExecutablePropertiesKHR - Structure describing a pipeline executable + /// + /// + /// + /// The VkPipelineExecutablePropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef struct VkPipelineExecutablePropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkShaderStageFlags stages; + /// char name[VK_MAX_DESCRIPTION_SIZE]; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// uint32_t subgroupSize; + /// } VkPipelineExecutablePropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 536)] + public unsafe partial struct VkPipelineExecutablePropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineExecutablePropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Stages is a bitmask of zero or more VkShaderStageFlags indicating which shader stages (if any) were principally used as inputs to compile this pipeline executable. + /// + [FieldOffset(16)] + public VkShaderStageFlags Stages; + + /// + [FieldOffset(20)] + public fixed byte Name[256]; + + /// + [FieldOffset(276)] + public fixed byte Description[256]; + + /// + /// SubgroupSize is the subgroup size with which this pipeline executable is dispatched. + /// + [FieldOffset(532)] + public int SubgroupSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticKHR.gen.cs new file mode 100644 index 0000000..34b750c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineExecutableStatisticKHR - Structure describing a compile time pipeline executable statistic + /// + /// + /// + /// The VkPipelineExecutableStatisticKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef struct VkPipelineExecutableStatisticKHR { + /// VkStructureType sType; + /// void* pNext; + /// char name[VK_MAX_DESCRIPTION_SIZE]; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// VkPipelineExecutableStatisticFormatKHR format; + /// VkPipelineExecutableStatisticValueKHR value; + /// } VkPipelineExecutableStatisticKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 544)] + public unsafe partial struct VkPipelineExecutableStatisticKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineExecutableStatisticKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte Name[256]; + + /// + [FieldOffset(272)] + public fixed byte Description[256]; + + /// + /// Format is a VkPipelineExecutableStatisticFormatKHR value specifying the format of the data found in value. + /// + [FieldOffset(528)] + public VkPipelineExecutableStatisticFormatKHR Format; + + /// + /// Value is the value of this statistic. + /// + [FieldOffset(536)] + public VkPipelineExecutableStatisticValueKHR Value; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticValueKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticValueKHR.gen.cs new file mode 100644 index 0000000..83d0804 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineExecutableStatisticValueKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineExecutableStatisticValueKHR - A union describing a pipeline executable statistic + /// + /// + /// + /// The VkPipelineExecutableStatisticValueKHR union is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef union VkPipelineExecutableStatisticValueKHR { + /// VkBool32 b32; + /// int64_t i64; + /// uint64_t u64; + /// double f64; + /// } VkPipelineExecutableStatisticValueKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkPipelineExecutableStatisticValueKHR() + { + /// + /// B32 is the 32-bit boolean value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR. + /// + [FieldOffset(0)] + public Brutal.Bool32 B32; + + /// + /// I64 is the signed 64-bit integer value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR. + /// + [FieldOffset(0)] + public long I64; + + /// + /// U64 is the unsigned 64-bit integer value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR. + /// + [FieldOffset(0)] + public nint U64; + + /// + /// F64 is the 64-bit floating-point value if the VkPipelineExecutableStatisticFormatKHR is VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR. + /// + [FieldOffset(0)] + public double F64; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentDensityMapLayeredCreateInfoVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentDensityMapLayeredCreateInfoVALVE.gen.cs new file mode 100644 index 0000000..c9f69cf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentDensityMapLayeredCreateInfoVALVE.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineFragmentDensityMapLayeredCreateInfoVALVE - Structure specifying layered fragment density map info + /// + /// + /// + /// The VkPipelineFragmentDensityMapLayeredCreateInfoVALVE structure is + /// defined as: + /// + /// + /// // Provided by VK_VALVE_fragment_density_map_layered + /// typedef struct VkPipelineFragmentDensityMapLayeredCreateInfoVALVE { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxFragmentDensityMapLayers; + /// } VkPipelineFragmentDensityMapLayeredCreateInfoVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineFragmentDensityMapLayeredCreateInfoVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineFragmentDensityMapLayeredCreateInfoVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxFragmentDensityMapLayers is the maximum number of layers which can be used with a fragment density map. + /// + [FieldOffset(16)] + public int MaxFragmentDensityMapLayers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..e0a190d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateEnumStateCreateInfoNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineFragmentShadingRateEnumStateCreateInfoNV - Structure specifying parameters controlling the fragment shading rate using rate enums + /// + /// + /// + /// The VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_fragment_shading_rate_enums + /// typedef struct VkPipelineFragmentShadingRateEnumStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkFragmentShadingRateTypeNV shadingRateType; + /// VkFragmentShadingRateNV shadingRate; + /// VkFragmentShadingRateCombinerOpKHR combinerOps[2]; + /// } VkPipelineFragmentShadingRateEnumStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineFragmentShadingRateEnumStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineFragmentShadingRateEnumStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShadingRateType specifies a VkFragmentShadingRateTypeNV value indicating whether fragment shading rates are specified using fragment sizes or VkFragmentShadingRateNV enums. + /// + [FieldOffset(16)] + public VkFragmentShadingRateTypeNV ShadingRateType; + + /// + /// ShadingRate specifies a VkFragmentShadingRateNV value indicating the pipeline fragment shading rate. + /// + [FieldOffset(20)] + public VkFragmentShadingRateNV ShadingRate; + + /// + /// CombinerOps specifies VkFragmentShadingRateCombinerOpKHR values determining how the pipeline^, primitive^, and attachment shading rates^ are combined^ for fragments generated by drawing commands using the created pipeline. + /// + [FieldOffset(24)] + public VkFragmentShadingRateCombinerOpKHR_2 CombinerOps; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateStateCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateStateCreateInfoKHR.gen.cs new file mode 100644 index 0000000..bbe0353 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineFragmentShadingRateStateCreateInfoKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineFragmentShadingRateStateCreateInfoKHR - Structure specifying parameters controlling the fragment shading rate + /// + /// + /// + /// The VkPipelineFragmentShadingRateStateCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate + /// typedef struct VkPipelineFragmentShadingRateStateCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkExtent2D fragmentSize; + /// VkFragmentShadingRateCombinerOpKHR combinerOps[2]; + /// } VkPipelineFragmentShadingRateStateCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineFragmentShadingRateStateCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineFragmentShadingRateStateCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentSize specifies a VkExtent2D structure containing the fragment size used to define the pipeline fragment shading rate for drawing commands using this pipeline. + /// + [FieldOffset(16)] + public VkExtent2D FragmentSize; + + /// + /// CombinerOps specifies a VkFragmentShadingRateCombinerOpKHR value determining how the pipeline^, primitive^, and attachment shading rates^ are combined^ for fragments generated by drawing commands using the created pipeline. + /// + [FieldOffset(24)] + public VkFragmentShadingRateCombinerOpKHR_2 CombinerOps; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineIndirectDeviceAddressInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineIndirectDeviceAddressInfoNV.gen.cs new file mode 100644 index 0000000..4678494 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineIndirectDeviceAddressInfoNV.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineIndirectDeviceAddressInfoNV - Structure specifying the pipeline to query an address for + /// + /// + /// + /// :refpage: VkPipelineIndirectDeviceAddressInfoNV + /// + /// + /// The VkPipelineIndirectDeviceAddressInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_generated_commands_compute + /// typedef struct VkPipelineIndirectDeviceAddressInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineBindPoint pipelineBindPoint; + /// VkPipeline pipeline; + /// } VkPipelineIndirectDeviceAddressInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineIndirectDeviceAddressInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineIndirectDeviceAddressInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PipelineBindPoint is a VkPipelineBindPoint value specifying the type of pipeline whose device address is being queried. + /// + [FieldOffset(16)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// Pipeline specifies the pipeline whose device address is being queried. + /// + [FieldOffset(24)] + public VkPipeline Pipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineInfoKHR.gen.cs new file mode 100644 index 0000000..078a839 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineInfoKHR - Structure describing a pipeline + /// + /// + /// + /// The VkPipelineInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_executable_properties + /// typedef struct VkPipelineInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipeline pipeline; + /// } VkPipelineInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Pipeline is a VkPipeline handle. + /// + [FieldOffset(16)] + public VkPipeline Pipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineInputAssemblyStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineInputAssemblyStateCreateInfo.gen.cs new file mode 100644 index 0000000..3ee34af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineInputAssemblyStateCreateInfo.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineInputAssemblyStateCreateInfo - Structure specifying parameters of a newly created pipeline input assembly state + /// + /// + /// + /// Each draw is made up of zero or more vertices and zero or more instances, + /// which are processed by the device and result in the assembly of primitives. + /// Primitives are assembled according to the pInputAssemblyState member + /// of the VkGraphicsPipelineCreateInfo structure, which is of type + /// VkPipelineInputAssemblyStateCreateInfo: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineInputAssemblyStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineInputAssemblyStateCreateFlags flags; + /// VkPrimitiveTopology topology; + /// VkBool32 primitiveRestartEnable; + /// } VkPipelineInputAssemblyStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineInputAssemblyStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineInputAssemblyStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineInputAssemblyStateCreateFlags Flags; + + /// + /// Topology is a VkPrimitiveTopology defining the primitive topology, as described below. + /// + [FieldOffset(20)] + public VkPrimitiveTopology Topology; + + /// + /// PrimitiveRestartEnable controls whether a special vertex index value is treated as restarting the assembly of primitives. This enable only applies to indexed draws (vkCmdDrawIndexed, and vkCmdDrawIndexedIndirect), and the special index value is either 0xFFFFFFFF when the indexType parameter of vkCmdBindIndexBuffer is equal to VK_INDEX_TYPE_UINT32; or 0xFFFF when indexType is equal to VK_INDEX_TYPE_UINT16. Primitive restart is not allowed for "`list`" topologies. + /// + [FieldOffset(24)] + public Brutal.Bool32 PrimitiveRestartEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineLayoutCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineLayoutCreateInfo.gen.cs new file mode 100644 index 0000000..a5dd447 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineLayoutCreateInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineLayoutCreateInfo - Structure specifying the parameters of a newly created pipeline layout object + /// + /// + /// + /// The VkPipelineLayoutCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineLayoutCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineLayoutCreateFlags flags; + /// uint32_t setLayoutCount; + /// const VkDescriptorSetLayout* pSetLayouts; + /// uint32_t pushConstantRangeCount; + /// const VkPushConstantRange* pPushConstantRanges; + /// } VkPipelineLayoutCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPipelineLayoutCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineLayoutCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineLayoutCreateFlags specifying options for pipeline layout creation. + /// + [FieldOffset(16)] + public VkPipelineLayoutCreateFlags Flags; + + /// + /// SetLayoutCount is the number of descriptor sets included in the pipeline layout. + /// + [FieldOffset(20)] + public int SetLayoutCount; + + /// + /// SetLayouts is a pointer to an array of VkDescriptorSetLayout objects. The implementation must not access these objects outside of the duration of the command this structure is passed to. + /// + [FieldOffset(24)] + public VkDescriptorSetLayout* SetLayouts; + + /// + /// PushConstantRangeCount is the number of push constant ranges included in the pipeline layout. + /// + [FieldOffset(32)] + public int PushConstantRangeCount; + + /// + /// PushConstantRanges is a pointer to an array of VkPushConstantRange structures defining a set of push constant ranges for use in a single pipeline layout. In addition to descriptor set layouts, a pipeline layout also describes how many push constants can be accessed by each stage of the pipeline. + [NOTE] + /// + [FieldOffset(40)] + public VkPushConstantRange* PushConstantRanges; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineLibraryCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineLibraryCreateInfoKHR.gen.cs new file mode 100644 index 0000000..466caf9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineLibraryCreateInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineLibraryCreateInfoKHR - Structure specifying pipeline libraries to use when creating a pipeline + /// + /// + /// + /// The VkPipelineLibraryCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_library + /// typedef struct VkPipelineLibraryCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t libraryCount; + /// const VkPipeline* pLibraries; + /// } VkPipelineLibraryCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineLibraryCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineLibraryCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LibraryCount is the number of pipeline libraries in pLibraries. + /// + [FieldOffset(16)] + public int LibraryCount; + + /// + /// Libraries is a pointer to an array of VkPipeline structures specifying pipeline libraries to use when creating a pipeline. + /// + [FieldOffset(24)] + public VkPipeline* Libraries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineMultisampleStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineMultisampleStateCreateInfo.gen.cs new file mode 100644 index 0000000..5a3a734 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineMultisampleStateCreateInfo.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineMultisampleStateCreateInfo - Structure specifying parameters of a newly created pipeline multisample state + /// + /// + /// + /// The VkPipelineMultisampleStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineMultisampleStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineMultisampleStateCreateFlags flags; + /// VkSampleCountFlagBits rasterizationSamples; + /// VkBool32 sampleShadingEnable; + /// float minSampleShading; + /// const VkSampleMask* pSampleMask; + /// VkBool32 alphaToCoverageEnable; + /// VkBool32 alphaToOneEnable; + /// } VkPipelineMultisampleStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPipelineMultisampleStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineMultisampleStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineMultisampleStateCreateFlags Flags; + + /// + /// RasterizationSamples is a VkSampleCountFlags value specifying the number of samples used in rasterization. + /// + [FieldOffset(20)] + public VkSampleCountFlags RasterizationSamples; + + /// + /// SampleShadingEnable can be used to enable Sample Shading^. + /// + [FieldOffset(24)] + public Brutal.Bool32 SampleShadingEnable; + + /// + /// MinSampleShading specifies a minimum fraction of sample shading if sampleShadingEnable is VK_TRUE. + /// + [FieldOffset(28)] + public float MinSampleShading; + + /// + /// SampleMask is a pointer to an array of basetype:VkSampleMask values used in the sample mask test^. + /// + [FieldOffset(32)] + public VkSampleMask* SampleMask; + + /// + /// AlphaToCoverageEnable controls whether a temporary coverage value is generated based on the alpha component of the fragment's first color output as specified in the Multisample Coverage^ section. + /// + [FieldOffset(40)] + public Brutal.Bool32 AlphaToCoverageEnable; + + /// + /// AlphaToOneEnable controls whether the alpha component of the fragment's first color output is replaced with one as described in Multisample Coverage^. + /// + [FieldOffset(44)] + public Brutal.Bool32 AlphaToOneEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelinePropertiesIdentifierEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelinePropertiesIdentifierEXT.gen.cs new file mode 100644 index 0000000..ab31ee2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelinePropertiesIdentifierEXT.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelinePropertiesIdentifierEXT - Structure used to retrieve pipeline properties + /// + /// + /// + /// The VkPipelinePropertiesIdentifierEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_pipeline_properties + /// typedef struct VkPipelinePropertiesIdentifierEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint8_t pipelineIdentifier[VK_UUID_SIZE]; + /// } VkPipelinePropertiesIdentifierEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelinePropertiesIdentifierEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelinePropertiesIdentifierEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte PipelineIdentifier[16]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationConservativeStateCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationConservativeStateCreateInfoEXT.gen.cs new file mode 100644 index 0000000..a1585ad --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationConservativeStateCreateInfoEXT.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationConservativeStateCreateInfoEXT - Structure specifying conservative raster state + /// + /// + /// + /// If the pNext chain of VkPipelineRasterizationStateCreateInfo + /// includes a VkPipelineRasterizationConservativeStateCreateInfoEXT + /// structure, then that structure includes parameters controlling conservative + /// rasterization. + /// + /// + /// VkPipelineRasterizationConservativeStateCreateInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_conservative_rasterization + /// typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineRasterizationConservativeStateCreateFlagsEXT flags; + /// VkConservativeRasterizationModeEXT conservativeRasterizationMode; + /// float extraPrimitiveOverestimationSize; + /// } VkPipelineRasterizationConservativeStateCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineRasterizationConservativeStateCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRasterizationConservativeStateCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineRasterizationConservativeStateCreateFlagsEXT Flags; + + /// + /// ConservativeRasterizationMode is the conservative rasterization mode to use. + /// + [FieldOffset(20)] + public VkConservativeRasterizationModeEXT ConservativeRasterizationMode; + + /// + /// ExtraPrimitiveOverestimationSize is the extra size in pixels to increase the generating primitive during conservative rasterization at each of its edges in `X` and `Y` equally in screen space beyond the base overestimation specified in VkPhysicalDeviceConservativeRasterizationPropertiesEXT::primitiveOverestimationSize. If conservativeRasterizationMode is not VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, this value is ignored. + /// + [FieldOffset(24)] + public float ExtraPrimitiveOverestimationSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationDepthClipStateCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationDepthClipStateCreateInfoEXT.gen.cs new file mode 100644 index 0000000..6538175 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationDepthClipStateCreateInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationDepthClipStateCreateInfoEXT - Structure specifying depth clipping state + /// + /// + /// + /// If the pNext chain of VkPipelineRasterizationStateCreateInfo + /// includes a VkPipelineRasterizationDepthClipStateCreateInfoEXT + /// structure, then that structure controls whether depth clipping is enabled or + /// disabled. + /// + /// + /// The VkPipelineRasterizationDepthClipStateCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_depth_clip_enable + /// typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineRasterizationDepthClipStateCreateFlagsEXT flags; + /// VkBool32 depthClipEnable; + /// } VkPipelineRasterizationDepthClipStateCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineRasterizationDepthClipStateCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRasterizationDepthClipStateCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineRasterizationDepthClipStateCreateFlagsEXT Flags; + + /// + /// DepthClipEnable controls whether depth clipping is enabled as described in Primitive Clipping^. + /// + [FieldOffset(20)] + public Brutal.Bool32 DepthClipEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationLineStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationLineStateCreateInfo.gen.cs new file mode 100644 index 0000000..be9bf0a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationLineStateCreateInfo.gen.cs @@ -0,0 +1,66 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationLineStateCreateInfo - Structure specifying parameters of a newly created pipeline line rasterization state + /// + /// + /// + /// Line segment rasterization options are controlled by the + /// VkPipelineRasterizationLineStateCreateInfo structure. + /// + /// + /// The VkPipelineRasterizationLineStateCreateInfo structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPipelineRasterizationLineStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkLineRasterizationMode lineRasterizationMode; + /// VkBool32 stippledLineEnable; + /// uint32_t lineStippleFactor; + /// uint16_t lineStipplePattern; + /// } VkPipelineRasterizationLineStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineRasterizationLineStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRasterizationLineStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LineRasterizationMode is a VkLineRasterizationMode value selecting the style of line rasterization. + /// + [FieldOffset(16)] + public VkLineRasterizationMode LineRasterizationMode; + + /// + /// StippledLineEnable enables stippled line rasterization^. + /// + [FieldOffset(20)] + public Brutal.Bool32 StippledLineEnable; + + /// + /// LineStippleFactor is the repeat factor used in stippled line rasterization. + /// + [FieldOffset(24)] + public int LineStippleFactor; + + /// + /// LineStipplePattern is the bit pattern used in stippled line rasterization. + /// + [FieldOffset(28)] + public ushort LineStipplePattern; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.gen.cs new file mode 100644 index 0000000..003e760 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationProvokingVertexStateCreateInfoEXT - Structure specifying provoking vertex mode used by a graphics pipeline + /// + /// + /// + /// For a given primitive topology, the pipeline's provoking vertex mode + /// determines which vertex is the provoking vertex. + /// To specify the provoking vertex mode, include a + /// VkPipelineRasterizationProvokingVertexStateCreateInfoEXT structure in + /// the VkPipelineRasterizationStateCreateInfo::pNext chain when + /// creating the pipeline. + /// + /// + /// The VkPipelineRasterizationProvokingVertexStateCreateInfoEXT structure + /// is defined as: + /// + /// + /// // Provided by VK_EXT_provoking_vertex + /// typedef struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkProvokingVertexModeEXT provokingVertexMode; + /// } VkPipelineRasterizationProvokingVertexStateCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.PipelineRasterizationProvokingVertexStateCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProvokingVertexMode is a VkProvokingVertexModeEXT value selecting the provoking vertex mode. + /// + [FieldOffset(16)] + public VkProvokingVertexModeEXT ProvokingVertexMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateCreateInfo.gen.cs new file mode 100644 index 0000000..fcc9b03 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateCreateInfo.gen.cs @@ -0,0 +1,110 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationStateCreateInfo - Structure specifying parameters of a newly created pipeline rasterization state + /// + /// + /// + /// The VkPipelineRasterizationStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineRasterizationStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineRasterizationStateCreateFlags flags; + /// VkBool32 depthClampEnable; + /// VkBool32 rasterizerDiscardEnable; + /// VkPolygonMode polygonMode; + /// VkCullModeFlags cullMode; + /// VkFrontFace frontFace; + /// VkBool32 depthBiasEnable; + /// float depthBiasConstantFactor; + /// float depthBiasClamp; + /// float depthBiasSlopeFactor; + /// float lineWidth; + /// } VkPipelineRasterizationStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPipelineRasterizationStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRasterizationStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineRasterizationStateCreateFlags Flags; + + /// + /// DepthClampEnable controls whether to clamp the fragment's depth values as described in Depth Test^. Enabling depth clamp will also disable clipping primitives to the z planes of the frustum as described in Primitive Clipping^. + /// + [FieldOffset(20)] + public Brutal.Bool32 DepthClampEnable; + + /// + /// RasterizerDiscardEnable controls whether primitives are discarded immediately before the rasterization stage. + /// + [FieldOffset(24)] + public Brutal.Bool32 RasterizerDiscardEnable; + + /// + /// PolygonMode is the triangle rendering mode. See VkPolygonMode. + /// + [FieldOffset(28)] + public VkPolygonMode PolygonMode; + + /// + /// CullMode is the triangle facing direction used for primitive culling. See VkCullModeFlags. + /// + [FieldOffset(32)] + public VkCullModeFlags CullMode; + + /// + /// FrontFace is a VkFrontFace value specifying the front-facing triangle orientation to be used for culling. + /// + [FieldOffset(36)] + public VkFrontFace FrontFace; + + /// + /// DepthBiasEnable controls whether to bias fragment depth values. + /// + [FieldOffset(40)] + public Brutal.Bool32 DepthBiasEnable; + + /// + /// DepthBiasConstantFactor is a scalar factor controlling the constant depth value added to each fragment. + /// + [FieldOffset(44)] + public float DepthBiasConstantFactor; + + /// + /// DepthBiasClamp is the maximum (or minimum) depth bias of a fragment. + /// + [FieldOffset(48)] + public float DepthBiasClamp; + + /// + /// DepthBiasSlopeFactor is a scalar factor applied to a fragment's slope in depth bias calculations. + /// + [FieldOffset(52)] + public float DepthBiasSlopeFactor; + + /// + /// LineWidth is the width of rasterized line segments. + /// + [FieldOffset(56)] + public float LineWidth; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateRasterizationOrderAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateRasterizationOrderAMD.gen.cs new file mode 100644 index 0000000..ef0756b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateRasterizationOrderAMD.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationStateRasterizationOrderAMD - Structure defining rasterization order for a graphics pipeline + /// + /// + /// + /// The rasterization order to use for a graphics pipeline is specified by + /// adding a VkPipelineRasterizationStateRasterizationOrderAMD structure + /// to the pNext chain of a VkPipelineRasterizationStateCreateInfo + /// structure. + /// + /// + /// The VkPipelineRasterizationStateRasterizationOrderAMD structure is + /// defined as: + /// + /// + /// // Provided by VK_AMD_rasterization_order + /// typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkRasterizationOrderAMD rasterizationOrder; + /// } VkPipelineRasterizationStateRasterizationOrderAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineRasterizationStateRasterizationOrderAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRasterizationStateRasterizationOrderAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RasterizationOrder is a VkRasterizationOrderAMD value specifying the primitive rasterization order to use. + /// + [FieldOffset(16)] + public VkRasterizationOrderAMD RasterizationOrder; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateStreamCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateStreamCreateInfoEXT.gen.cs new file mode 100644 index 0000000..9e2a8f7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRasterizationStateStreamCreateInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRasterizationStateStreamCreateInfoEXT - Structure defining the geometry stream used for rasterization + /// + /// + /// + /// The vertex stream used for rasterization is specified by adding a + /// VkPipelineRasterizationStateStreamCreateInfoEXT structure to the + /// pNext chain of a VkPipelineRasterizationStateCreateInfo + /// structure. + /// + /// + /// The VkPipelineRasterizationStateStreamCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_transform_feedback + /// typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineRasterizationStateStreamCreateFlagsEXT flags; + /// uint32_t rasterizationStream; + /// } VkPipelineRasterizationStateStreamCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineRasterizationStateStreamCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRasterizationStateStreamCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineRasterizationStateStreamCreateFlagsEXT Flags; + + /// + /// RasterizationStream is the vertex stream selected for rasterization. + /// + [FieldOffset(20)] + public int RasterizationStream; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRenderingCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRenderingCreateInfo.gen.cs new file mode 100644 index 0000000..50ee7bd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRenderingCreateInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRenderingCreateInfo - Structure specifying attachment formats + /// + /// + /// + /// The VkPipelineRenderingCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPipelineRenderingCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t viewMask; + /// uint32_t colorAttachmentCount; + /// const VkFormat* pColorAttachmentFormats; + /// VkFormat depthAttachmentFormat; + /// VkFormat stencilAttachmentFormat; + /// } VkPipelineRenderingCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPipelineRenderingCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRenderingCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ViewMask is a bitfield of view indices describing which views are active during rendering. It must match VkRenderingInfo::viewMask when rendering. + /// + [FieldOffset(16)] + public int ViewMask; + + /// + /// ColorAttachmentCount is the number of entries in pColorAttachmentFormats + /// + [FieldOffset(20)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentFormats is a pointer to an array of VkFormat values defining the format of color attachments used in this pipeline. + /// + [FieldOffset(24)] + public VkFormat* ColorAttachmentFormats; + + /// + /// DepthAttachmentFormat is a VkFormat value defining the format of the depth attachment used in this pipeline. + /// + [FieldOffset(32)] + public VkFormat DepthAttachmentFormat; + + /// + /// StencilAttachmentFormat is a VkFormat value defining the format of the stencil attachment used in this pipeline. + /// + [FieldOffset(36)] + public VkFormat StencilAttachmentFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..d053ca6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRepresentativeFragmentTestStateCreateInfoNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRepresentativeFragmentTestStateCreateInfoNV - Structure specifying representative fragment test + /// + /// + /// + /// If the pNext chain of VkGraphicsPipelineCreateInfo includes a + /// VkPipelineRepresentativeFragmentTestStateCreateInfoNV structure, then + /// that structure includes parameters controlling the representative fragment + /// test. + /// + /// + /// The VkPipelineRepresentativeFragmentTestStateCreateInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_representative_fragment_test + /// typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 representativeFragmentTestEnable; + /// } VkPipelineRepresentativeFragmentTestStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRepresentativeFragmentTestStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RepresentativeFragmentTestEnable controls whether the representative fragment test is enabled. + /// + [FieldOffset(16)] + public Brutal.Bool32 RepresentativeFragmentTestEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineRobustnessCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineRobustnessCreateInfo.gen.cs new file mode 100644 index 0000000..8dc2a95 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineRobustnessCreateInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineRobustnessCreateInfo - Structure controlling the robustness of a newly created pipeline shader stage + /// + /// + /// + /// The VkPipelineRobustnessCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPipelineRobustnessCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineRobustnessBufferBehavior storageBuffers; + /// VkPipelineRobustnessBufferBehavior uniformBuffers; + /// VkPipelineRobustnessBufferBehavior vertexInputs; + /// VkPipelineRobustnessImageBehavior images; + /// } VkPipelineRobustnessCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineRobustnessCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineRobustnessCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StorageBuffers sets the behavior of out of bounds accesses made to resources bound as: + /// + [FieldOffset(16)] + public VkPipelineRobustnessBufferBehavior StorageBuffers; + + /// + /// UniformBuffers describes the behavior of out of bounds accesses made to resources bound as: + /// + [FieldOffset(20)] + public VkPipelineRobustnessBufferBehavior UniformBuffers; + + /// + /// VertexInputs describes the behavior of out of bounds accesses made to vertex input attributes + /// + [FieldOffset(24)] + public VkPipelineRobustnessBufferBehavior VertexInputs; + + /// + /// Images describes the behavior of out of bounds accesses made to resources bound as: + /// + [FieldOffset(28)] + public VkPipelineRobustnessImageBehavior Images; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineSampleLocationsStateCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineSampleLocationsStateCreateInfoEXT.gen.cs new file mode 100644 index 0000000..23fab43 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineSampleLocationsStateCreateInfoEXT.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineSampleLocationsStateCreateInfoEXT - Structure specifying sample locations for a pipeline + /// + /// + /// + /// Applications can also control the sample locations used for rasterization. + /// + /// + /// If the pNext chain of the VkPipelineMultisampleStateCreateInfo + /// structure specified at pipeline creation time includes a + /// VkPipelineSampleLocationsStateCreateInfoEXT structure, then that + /// structure controls the sample locations used when rasterizing primitives + /// with the pipeline. + /// + /// + /// The VkPipelineSampleLocationsStateCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkPipelineSampleLocationsStateCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 sampleLocationsEnable; + /// VkSampleLocationsInfoEXT sampleLocationsInfo; + /// } VkPipelineSampleLocationsStateCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPipelineSampleLocationsStateCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineSampleLocationsStateCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SampleLocationsEnable controls whether custom sample locations are used. If sampleLocationsEnable is VK_FALSE, the default sample locations are used and the values specified in sampleLocationsInfo are ignored. + /// + [FieldOffset(16)] + public Brutal.Bool32 SampleLocationsEnable; + + /// + /// SampleLocationsInfo is the sample locations to use during rasterization if sampleLocationsEnable is VK_TRUE and the graphics pipeline is not created with VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT. + /// + [FieldOffset(24)] + public VkSampleLocationsInfoEXT SampleLocationsInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageCreateInfo.gen.cs new file mode 100644 index 0000000..f54af41 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageCreateInfo.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineShaderStageCreateInfo - Structure specifying parameters of a newly created pipeline shader stage + /// + /// + /// + /// :refpage: VkPipelineShaderStageCreateInfo + /// + /// + /// The VkPipelineShaderStageCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineShaderStageCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineShaderStageCreateFlags flags; + /// VkShaderStageFlagBits stage; + /// VkShaderModule module; + /// const char* pName; + /// const VkSpecializationInfo* pSpecializationInfo; + /// } VkPipelineShaderStageCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPipelineShaderStageCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineShaderStageCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineShaderStageCreateFlags specifying how the pipeline shader stage will be generated. + /// + [FieldOffset(16)] + public VkPipelineShaderStageCreateFlags Flags; + + /// + /// Stage is a VkShaderStageFlags value specifying a single pipeline stage. + /// + [FieldOffset(20)] + public VkShaderStageFlags Stage; + + /// + /// Module is a VkShaderModule object containing the shader code for this stage. The implementation must not access this object outside of the duration of the command this structure is passed to. + /// + [FieldOffset(24)] + public VkShaderModule Module; + + /// + /// Name is a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage. + /// + [FieldOffset(32)] + public byte* Name; + + /// + /// SpecializationInfo is a pointer to a VkSpecializationInfo structure, as described in Specialization Constants^, or `NULL`. + /// + [FieldOffset(40)] + public VkSpecializationInfo* SpecializationInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.gen.cs new file mode 100644 index 0000000..11a3210 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineShaderStageModuleIdentifierCreateInfoEXT - Structure specifying an identifier for a shader module + /// + /// + /// + /// An identifier can be provided instead of shader code in an attempt to + /// compile pipelines without providing complete SPIR-V to the implementation. + /// + /// + /// The VkPipelineShaderStageModuleIdentifierCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_shader_module_identifier + /// typedef struct VkPipelineShaderStageModuleIdentifierCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t identifierSize; + /// const uint8_t* pIdentifier; + /// } VkPipelineShaderStageModuleIdentifierCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineShaderStageModuleIdentifierCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineShaderStageModuleIdentifierCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IdentifierSize is the size, in bytes, of the buffer pointed to by pIdentifier. + /// + [FieldOffset(16)] + public int IdentifierSize; + + /// + /// Identifier is a pointer to a buffer of opaque data specifying an identifier. + /// + [FieldOffset(24)] + public byte* Identifier; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.gen.cs new file mode 100644 index 0000000..d072f26 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineShaderStageRequiredSubgroupSizeCreateInfo - Structure specifying the required subgroup size of a newly created pipeline shader stage + /// + /// + /// + /// The VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPipelineShaderStageRequiredSubgroupSizeCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t requiredSubgroupSize; + /// } VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineShaderStageRequiredSubgroupSizeCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineShaderStageRequiredSubgroupSizeCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RequiredSubgroupSize is an unsigned integer value specifying the required subgroup size for the newly created pipeline shader stage. + /// + [FieldOffset(16)] + public int RequiredSubgroupSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineTessellationDomainOriginStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineTessellationDomainOriginStateCreateInfo.gen.cs new file mode 100644 index 0000000..74536da --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineTessellationDomainOriginStateCreateInfo.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineTessellationDomainOriginStateCreateInfo - Structure specifying the orientation of the tessellation domain + /// + /// + /// + /// The VkPipelineTessellationDomainOriginStateCreateInfo structure is + /// defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkPipelineTessellationDomainOriginStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkTessellationDomainOrigin domainOrigin; + /// } VkPipelineTessellationDomainOriginStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineTessellationDomainOriginStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineTessellationDomainOriginStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DomainOrigin is a VkTessellationDomainOrigin value controlling the origin of the tessellation domain space. + /// + [FieldOffset(16)] + public VkTessellationDomainOrigin DomainOrigin; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineTessellationStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineTessellationStateCreateInfo.gen.cs new file mode 100644 index 0000000..cdc0b2b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineTessellationStateCreateInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineTessellationStateCreateInfo - Structure specifying parameters of a newly created pipeline tessellation state + /// + /// + /// + /// The VkPipelineTessellationStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineTessellationStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineTessellationStateCreateFlags flags; + /// uint32_t patchControlPoints; + /// } VkPipelineTessellationStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineTessellationStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineTessellationStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineTessellationStateCreateFlags Flags; + + /// + /// PatchControlPoints is the number of control points per patch. + /// + [FieldOffset(20)] + public int PatchControlPoints; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputDivisorStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputDivisorStateCreateInfo.gen.cs new file mode 100644 index 0000000..2658daf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputDivisorStateCreateInfo.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineVertexInputDivisorStateCreateInfo - Structure specifying vertex attributes assignment during instanced rendering + /// + /// + /// + /// If the vertexAttributeInstanceRateDivisor^ feature is enabled and the + /// pNext chain of VkPipelineVertexInputStateCreateInfo includes a + /// VkPipelineVertexInputDivisorStateCreateInfo structure, then that + /// structure controls how vertex attributes are assigned to an instance when + /// instanced rendering is enabled. + /// + /// + /// The VkPipelineVertexInputDivisorStateCreateInfo structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPipelineVertexInputDivisorStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t vertexBindingDivisorCount; + /// const VkVertexInputBindingDivisorDescription* pVertexBindingDivisors; + /// } VkPipelineVertexInputDivisorStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineVertexInputDivisorStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineVertexInputDivisorStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VertexBindingDivisorCount is the number of elements in the pVertexBindingDivisors array. + /// + [FieldOffset(16)] + public int VertexBindingDivisorCount; + + /// + /// VertexBindingDivisors is a pointer to an array of VkVertexInputBindingDivisorDescription structures specifying the divisor value for each binding. + /// + [FieldOffset(24)] + public VkVertexInputBindingDivisorDescription* VertexBindingDivisors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputStateCreateInfo.gen.cs new file mode 100644 index 0000000..2894095 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineVertexInputStateCreateInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineVertexInputStateCreateInfo - Structure specifying parameters of a newly created pipeline vertex input state + /// + /// + /// + /// The VkPipelineVertexInputStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineVertexInputStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineVertexInputStateCreateFlags flags; + /// uint32_t vertexBindingDescriptionCount; + /// const VkVertexInputBindingDescription* pVertexBindingDescriptions; + /// uint32_t vertexAttributeDescriptionCount; + /// const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; + /// } VkPipelineVertexInputStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPipelineVertexInputStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineVertexInputStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineVertexInputStateCreateFlags Flags; + + /// + /// VertexBindingDescriptionCount is the number of vertex binding descriptions provided in pVertexBindingDescriptions. + /// + [FieldOffset(20)] + public int VertexBindingDescriptionCount; + + /// + /// VertexBindingDescriptions is a pointer to an array of VkVertexInputBindingDescription structures. + /// + [FieldOffset(24)] + public VkVertexInputBindingDescription* VertexBindingDescriptions; + + /// + /// VertexAttributeDescriptionCount is the number of vertex attribute descriptions provided in pVertexAttributeDescriptions. + /// + [FieldOffset(32)] + public int VertexAttributeDescriptionCount; + + /// + /// VertexAttributeDescriptions is a pointer to an array of VkVertexInputAttributeDescription structures. + /// + [FieldOffset(40)] + public VkVertexInputAttributeDescription* VertexAttributeDescriptions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..a74b12d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportCoarseSampleOrderStateCreateInfoNV.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportCoarseSampleOrderStateCreateInfoNV - Structure specifying parameters controlling sample order in coarse fragments + /// + /// + /// + /// If the pNext chain of VkPipelineViewportStateCreateInfo includes + /// a VkPipelineViewportCoarseSampleOrderStateCreateInfoNV structure, then + /// that structure includes parameters controlling the order of coverage samples + /// in fragments larger than one pixel. + /// + /// + /// The VkPipelineViewportCoarseSampleOrderStateCreateInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkCoarseSampleOrderTypeNV sampleOrderType; + /// uint32_t customSampleOrderCount; + /// const VkCoarseSampleOrderCustomNV* pCustomSampleOrders; + /// } VkPipelineViewportCoarseSampleOrderStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportCoarseSampleOrderStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SampleOrderType specifies the mechanism used to order coverage samples in fragments larger than one pixel. + /// + [FieldOffset(16)] + public VkCoarseSampleOrderTypeNV SampleOrderType; + + /// + /// CustomSampleOrderCount specifies the number of custom sample orderings to use when ordering coverage samples. + /// + [FieldOffset(20)] + public int CustomSampleOrderCount; + + /// + /// CustomSampleOrders is a pointer to an array of customSampleOrderCount VkCoarseSampleOrderCustomNV structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count. + /// + [FieldOffset(24)] + public VkCoarseSampleOrderCustomNV* CustomSampleOrders; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClampControlCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClampControlCreateInfoEXT.gen.cs new file mode 100644 index 0000000..7023910 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClampControlCreateInfoEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportDepthClampControlCreateInfoEXT - Structure specifying parameters of a newly created pipeline depth clamp control state + /// + /// + /// + /// The VkPipelineViewportDepthClampControlCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_depth_clamp_control + /// typedef struct VkPipelineViewportDepthClampControlCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDepthClampModeEXT depthClampMode; + /// const VkDepthClampRangeEXT* pDepthClampRange; + /// } VkPipelineViewportDepthClampControlCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineViewportDepthClampControlCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportDepthClampControlCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthClampMode determines how the clamp range is determined for each viewport. + /// + [FieldOffset(16)] + public VkDepthClampModeEXT DepthClampMode; + + /// + /// DepthClampRange sets the depth clamp range for all viewports if depthClampMode is VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT. + /// + [FieldOffset(24)] + public VkDepthClampRangeEXT* DepthClampRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClipControlCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClipControlCreateInfoEXT.gen.cs new file mode 100644 index 0000000..6683a3a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportDepthClipControlCreateInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportDepthClipControlCreateInfoEXT - Structure specifying parameters of a newly created pipeline depth clip control state + /// + /// + /// + /// The VkPipelineViewportDepthClipControlCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_depth_clip_control + /// typedef struct VkPipelineViewportDepthClipControlCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 negativeOneToOne; + /// } VkPipelineViewportDepthClipControlCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPipelineViewportDepthClipControlCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportDepthClipControlCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NegativeOneToOne sets the z~m~ in the view volume to -w~c~ + /// + [FieldOffset(16)] + public Brutal.Bool32 NegativeOneToOne; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportExclusiveScissorStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportExclusiveScissorStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..9732cc7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportExclusiveScissorStateCreateInfoNV.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportExclusiveScissorStateCreateInfoNV - Structure specifying parameters controlling exclusive scissor testing + /// + /// + /// + /// The VkPipelineViewportExclusiveScissorStateCreateInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_scissor_exclusive + /// typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t exclusiveScissorCount; + /// const VkRect2D* pExclusiveScissors; + /// } VkPipelineViewportExclusiveScissorStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineViewportExclusiveScissorStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportExclusiveScissorStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ExclusiveScissorCount is the number of exclusive scissor rectangles. + /// + [FieldOffset(16)] + public int ExclusiveScissorCount; + + /// + /// ExclusiveScissors is a pointer to an array of VkRect2D structures defining exclusive scissor rectangles. + /// + [FieldOffset(24)] + public VkRect2D* ExclusiveScissors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportShadingRateImageStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportShadingRateImageStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..4353dd2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportShadingRateImageStateCreateInfoNV.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportShadingRateImageStateCreateInfoNV - Structure specifying parameters controlling shading rate image usage + /// + /// + /// + /// If the pNext chain of VkPipelineViewportStateCreateInfo includes + /// a VkPipelineViewportShadingRateImageStateCreateInfoNV structure, then + /// that structure includes parameters controlling the shading rate. + /// + /// + /// The VkPipelineViewportShadingRateImageStateCreateInfoNV structure is + /// defined as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkPipelineViewportShadingRateImageStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 shadingRateImageEnable; + /// uint32_t viewportCount; + /// const VkShadingRatePaletteNV* pShadingRatePalettes; + /// } VkPipelineViewportShadingRateImageStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineViewportShadingRateImageStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportShadingRateImageStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ShadingRateImageEnable specifies whether shading rate image and palettes are used during rasterization. + /// + [FieldOffset(16)] + public Brutal.Bool32 ShadingRateImageEnable; + + /// + /// ViewportCount specifies the number of per-viewport palettes used to translate values stored in shading rate images. + /// + [FieldOffset(20)] + public int ViewportCount; + + /// + /// ShadingRatePalettes is a pointer to an array of VkShadingRatePaletteNV structures defining the palette for each viewport. If the shading rate palette state is dynamic, this member is ignored. + /// + [FieldOffset(24)] + public VkShadingRatePaletteNV* ShadingRatePalettes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportStateCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportStateCreateInfo.gen.cs new file mode 100644 index 0000000..d50e8de --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportStateCreateInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportStateCreateInfo - Structure specifying parameters of a newly created pipeline viewport state + /// + /// + /// + /// The VkPipelineViewportStateCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPipelineViewportStateCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineViewportStateCreateFlags flags; + /// uint32_t viewportCount; + /// const VkViewport* pViewports; + /// uint32_t scissorCount; + /// const VkRect2D* pScissors; + /// } VkPipelineViewportStateCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPipelineViewportStateCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportStateCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineViewportStateCreateFlags Flags; + + /// + /// ViewportCount is the number of viewports used by the pipeline. + /// + [FieldOffset(20)] + public int ViewportCount; + + /// + /// Viewports is a pointer to an array of VkViewport structures, defining the viewport transforms. If the viewport state is dynamic, this member is ignored. + /// + [FieldOffset(24)] + public VkViewport* Viewports; + + /// + /// ScissorCount is the number of scissors^ and must match the number of viewports. + /// + [FieldOffset(32)] + public int ScissorCount; + + /// + /// Scissors is a pointer to an array of VkRect2D structures defining the rectangular bounds of the scissor for the corresponding viewport. If the scissor state is dynamic, this member is ignored. + /// + [FieldOffset(40)] + public VkRect2D* Scissors; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportSwizzleStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportSwizzleStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..72434ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportSwizzleStateCreateInfoNV.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportSwizzleStateCreateInfoNV - Structure specifying swizzle applied to primitive clip coordinates + /// + /// + /// + /// Each primitive sent to a given viewport has a swizzle and optional: negation + /// applied to its clip coordinates. + /// The swizzle that is applied depends on the viewport index, and is controlled + /// by the VkPipelineViewportSwizzleStateCreateInfoNV pipeline state: + /// + /// + /// // Provided by VK_NV_viewport_swizzle + /// typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineViewportSwizzleStateCreateFlagsNV flags; + /// uint32_t viewportCount; + /// const VkViewportSwizzleNV* pViewportSwizzles; + /// } VkPipelineViewportSwizzleStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineViewportSwizzleStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportSwizzleStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPipelineViewportSwizzleStateCreateFlagsNV Flags; + + /// + /// ViewportCount is the number of viewport swizzles used by the pipeline. + /// + [FieldOffset(20)] + public int ViewportCount; + + /// + /// ViewportSwizzles is a pointer to an array of VkViewportSwizzleNV structures, defining the viewport swizzles. + /// + [FieldOffset(24)] + public VkViewportSwizzleNV* ViewportSwizzles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPipelineViewportWScalingStateCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportWScalingStateCreateInfoNV.gen.cs new file mode 100644 index 0000000..208f551 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPipelineViewportWScalingStateCreateInfoNV.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPipelineViewportWScalingStateCreateInfoNV - Structure specifying parameters of a newly created pipeline viewport W scaling state + /// + /// + /// + /// The VkPipelineViewportWScalingStateCreateInfoNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_clip_space_w_scaling + /// typedef struct VkPipelineViewportWScalingStateCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 viewportWScalingEnable; + /// uint32_t viewportCount; + /// const VkViewportWScalingNV* pViewportWScalings; + /// } VkPipelineViewportWScalingStateCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPipelineViewportWScalingStateCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PipelineViewportWScalingStateCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ViewportWScalingEnable controls whether viewport *W* scaling is enabled. + /// + [FieldOffset(16)] + public Brutal.Bool32 ViewportWScalingEnable; + + /// + /// ViewportCount is the number of viewports used by *W* scaling, and must match the number of viewports in the pipeline if viewport *W* scaling is enabled. + /// + [FieldOffset(20)] + public int ViewportCount; + + /// + /// ViewportWScalings is a pointer to an array of VkViewportWScalingNV structures defining the *W* scaling parameters for the corresponding viewports. If the viewport *W* scaling state is dynamic, this member is ignored. + /// + [FieldOffset(24)] + public VkViewportWScalingNV* ViewportWScalings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentId2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentId2KHR.gen.cs new file mode 100644 index 0000000..8afe795 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentId2KHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentId2KHR - The list of presentation identifiers + /// + /// + /// + /// The VkPresentId2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_id2 + /// typedef struct VkPresentId2KHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const uint64_t* pPresentIds; + /// } VkPresentId2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentId2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentId2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to the vkQueuePresentKHR command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// PresentIds is `NULL` or a pointer to an array of uint64_t with swapchainCount entries. If not `NULL`, each non-zero value in pPresentIds specifies the present id to be associated with the presentation of the swapchain with the same index in the vkQueuePresentKHR call. + /// + [FieldOffset(24)] + public nint* PresentIds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentIdKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentIdKHR.gen.cs new file mode 100644 index 0000000..2d1e62a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentIdKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentIdKHR - The list of presentation identifiers + /// + /// + /// + /// The VkPresentIdKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_id + /// typedef struct VkPresentIdKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const uint64_t* pPresentIds; + /// } VkPresentIdKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentIdKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentIdKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to the vkQueuePresentKHR command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// PresentIds is `NULL` or a pointer to an array of uint64_t with swapchainCount entries. If not `NULL`, each non-zero value in pPresentIds specifies the present id to be associated with the presentation of the swapchain with the same index in the vkQueuePresentKHR call. + /// + [FieldOffset(24)] + public nint* PresentIds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentInfoKHR.gen.cs new file mode 100644 index 0000000..648c6b6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentInfoKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentInfoKHR - Structure describing parameters of a queue presentation + /// + /// + /// + /// The VkPresentInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain + /// typedef struct VkPresentInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t waitSemaphoreCount; + /// const VkSemaphore* pWaitSemaphores; + /// uint32_t swapchainCount; + /// const VkSwapchainKHR* pSwapchains; + /// const uint32_t* pImageIndices; + /// VkResult* pResults; + /// } VkPresentInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkPresentInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WaitSemaphoreCount is the number of semaphores to wait for before issuing the present request. The number may: be zero. + /// + [FieldOffset(16)] + public int WaitSemaphoreCount; + + /// + /// WaitSemaphores is `NULL` or a pointer to an array of VkSemaphore objects with waitSemaphoreCount entries, and specifies the semaphores to wait for before issuing the present request. + /// + [FieldOffset(24)] + public VkSemaphore* WaitSemaphores; + + /// + /// SwapchainCount is the number of swapchains being presented to by this command. + /// + [FieldOffset(32)] + public int SwapchainCount; + + /// + /// Swapchains is a pointer to an array of VkSwapchainKHR objects with swapchainCount entries. + /// + [FieldOffset(40)] + public VkSwapchainKHR* Swapchains; + + /// + /// ImageIndices is a pointer to an array of indices into the array of each swapchain's presentable images, with swapchainCount entries. Each entry in this array identifies the image to present on the corresponding entry in the pSwapchains array. + /// + [FieldOffset(48)] + public int* ImageIndices; + + /// + /// Results is a pointer to an array of VkResult typed elements with swapchainCount entries. Applications that do not need per-swapchain results can use `NULL` for pResults. If non-`NULL`, each entry in pResults will be set to the VkResult for presenting the swapchain corresponding to the same index in pSwapchains. + /// + [FieldOffset(56)] + public VkResult* Results; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentRegionKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentRegionKHR.gen.cs new file mode 100644 index 0000000..3a82098 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentRegionKHR.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentRegionKHR - Structure containing rectangular region changed by vkQueuePresentKHR for a given VkImage + /// + /// + /// + /// For a given image and swapchain, the region to present is specified by the + /// VkPresentRegionKHR structure, which is defined as: + /// + /// + /// // Provided by VK_KHR_incremental_present + /// typedef struct VkPresentRegionKHR { + /// uint32_t rectangleCount; + /// const VkRectLayerKHR* pRectangles; + /// } VkPresentRegionKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkPresentRegionKHR() + { + /// + /// RectangleCount is the number of rectangles in pRectangles, or zero if the entire image has changed and should be presented. + /// + [FieldOffset(0)] + public int RectangleCount; + + /// + /// Rectangles is either `NULL` or a pointer to an array of VkRectLayerKHR structures. The VkRectLayerKHR structure is the framebuffer coordinates, plus layer, of a portion of a presentable image that has changed and must be presented. If non-`NULL`, each entry in pRectangles is a rectangle of the given image that has changed since the last image was presented to the given swapchain. The rectangles must be specified relative to VkSurfaceCapabilitiesKHR::currentTransform, regardless of the swapchain's preTransform. The presentation engine will apply the preTransform transformation to the rectangles, along with any further transformation it applies to the image content. + /// + [FieldOffset(8)] + public VkRectLayerKHR* Rectangles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentRegionsKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentRegionsKHR.gen.cs new file mode 100644 index 0000000..b622187 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentRegionsKHR.gen.cs @@ -0,0 +1,60 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentRegionsKHR - Structure hint of rectangular regions changed by vkQueuePresentKHR + /// + /// + /// + /// When the `VK_KHR_incremental_present` extension is enabled, + /// additional fields can be specified that allow an application to specify + /// that only certain rectangular regions of the presentable images of a + /// swapchain are changed. + /// This is an optimization hint that a presentation engine may: use to only + /// update the region of a surface that is actually changing. + /// The application still must ensure that all pixels of a presented image + /// contain the desired values, in case the presentation engine ignores this + /// hint. + /// An application can provide this hint by adding a VkPresentRegionsKHR + /// structure to the pNext chain of the VkPresentInfoKHR structure. + /// + /// + /// The VkPresentRegionsKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_incremental_present + /// typedef struct VkPresentRegionsKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const VkPresentRegionKHR* pRegions; + /// } VkPresentRegionsKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentRegionsKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentRegionsKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to by this command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// Regions is `NULL` or a pointer to an array of VkPresentRegionKHR elements with swapchainCount entries. If not `NULL`, each element of pRegions contains the region that has changed since the last present to the swapchain in the corresponding entry in the VkPresentInfoKHR::pSwapchains array. + /// + [FieldOffset(24)] + public VkPresentRegionKHR* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentStageTimeEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentStageTimeEXT.gen.cs new file mode 100644 index 0000000..55547ed --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentStageTimeEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentStageTimeEXT - Associate a present stage with a timestamp + /// + /// + /// + /// The VkPresentStageTimeEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPresentStageTimeEXT { + /// VkPresentStageFlagsEXT stage; + /// uint64_t time; + /// } VkPresentStageTimeEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkPresentStageTimeEXT() + { + /// + /// Stage is a VkPresentStageFlagsEXT value specifying a present stage. + /// + [FieldOffset(0)] + public VkPresentStageFlagsEXT Stage; + + /// + /// Time is a time in nanoseconds associated with the stage. + /// + [FieldOffset(8)] + public nint Time; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentTimeGOOGLE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentTimeGOOGLE.gen.cs new file mode 100644 index 0000000..5fbaa43 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentTimeGOOGLE.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentTimeGOOGLE - The earliest time image should be presented + /// + /// + /// + /// The VkPresentTimeGOOGLE structure is defined as: + /// + /// + /// // Provided by VK_GOOGLE_display_timing + /// typedef struct VkPresentTimeGOOGLE { + /// uint32_t presentID; + /// uint64_t desiredPresentTime; + /// } VkPresentTimeGOOGLE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkPresentTimeGOOGLE() + { + /// + /// PresentID is an application-provided identification value, that can be used with the results of vkGetPastPresentationTimingGOOGLE, in order to uniquely identify this present. In order to be useful to the application, it should be unique within some period of time that is meaningful to the application. + /// + [FieldOffset(0)] + public int PresentID; + + /// + /// DesiredPresentTime specifies that the image given should not be displayed to the user any earlier than this time. desiredPresentTime is a time in nanoseconds, relative to a monotonically-increasing clock (e.g. `CLOCK_MONOTONIC` (see clock_gettime(2)) on Android and Linux). A value of zero specifies that the presentation engine may: display the image at any time. This is useful when the application desires to provide presentID, + /// + [FieldOffset(8)] + public nint DesiredPresentTime; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentTimesInfoGOOGLE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentTimesInfoGOOGLE.gen.cs new file mode 100644 index 0000000..091e7c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentTimesInfoGOOGLE.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentTimesInfoGOOGLE - The earliest time each image should be presented + /// + /// + /// + /// When the `VK_GOOGLE_display_timing` extension is enabled, additional + /// fields can be specified that allow an application to specify the earliest + /// time that an image should be displayed. + /// This allows an application to avoid stutter that is caused by an image being + /// displayed earlier than planned. + /// Such stuttering can occur with both fixed and variable-refresh-rate + /// displays, because stuttering occurs when the geometry is not correctly + /// positioned for when the image is displayed. + /// An application can instruct the presentation engine that an image should + /// not be displayed earlier than a specified time by adding a + /// VkPresentTimesInfoGOOGLE structure to the pNext chain of the + /// VkPresentInfoKHR structure. + /// + /// + /// The VkPresentTimesInfoGOOGLE structure is defined as: + /// + /// + /// // Provided by VK_GOOGLE_display_timing + /// typedef struct VkPresentTimesInfoGOOGLE { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const VkPresentTimeGOOGLE* pTimes; + /// } VkPresentTimesInfoGOOGLE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentTimesInfoGOOGLE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentTimesInfoGOOGLE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to by this command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// Times is `NULL` or a pointer to an array of VkPresentTimeGOOGLE elements with swapchainCount entries. If not `NULL`, each element of pTimes contains the earliest time to present the image corresponding to the entry in the VkPresentInfoKHR::pImageIndices array. + /// + [FieldOffset(24)] + public VkPresentTimeGOOGLE* Times; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentTimingInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentTimingInfoEXT.gen.cs new file mode 100644 index 0000000..f9d5817 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentTimingInfoEXT.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentTimingInfoEXT - Specifies per-present timing information + /// + /// + /// + /// The VkPresentTimingInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPresentTimingInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkPresentTimingInfoFlagsEXT flags; + /// uint64_t targetTime; + /// uint64_t timeDomainId; + /// VkPresentStageFlagsEXT presentStageQueries; + /// VkPresentStageFlagsEXT targetTimeDomainPresentStage; + /// } VkPresentTimingInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPresentTimingInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentTimingInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPresentTimingInfoFlagsEXT specifying options for how to interpret the timing information. + /// + [FieldOffset(16)] + public VkPresentTimingInfoFlagsEXT Flags; + + /// + /// TargetTime is zero or a value specifying the target present time or duration, in nanoseconds, of the presentation request. + /// + [FieldOffset(24)] + public nint TargetTime; + + /// + /// TimeDomainId is the id of the time domain used to specify the absolute target present time and the timing results obtained in a subsequent vkGetPastPresentationTimingEXT call for the current presentation request. + /// + [FieldOffset(32)] + public nint TimeDomainId; + + /// + /// PresentStageQueries is zero or a valid VkPresentStageFlagsEXT value indicating which present stages the presentation engine will collect timing information for. + /// + [FieldOffset(40)] + public VkPresentStageFlagsEXT PresentStageQueries; + + /// + /// TargetTimeDomainPresentStage is a valid VkPresentStageFlagsEXT specifying a single present stage used to interpret targetTime. + /// + [FieldOffset(44)] + public VkPresentStageFlagsEXT TargetTimeDomainPresentStage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentTimingSurfaceCapabilitiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentTimingSurfaceCapabilitiesEXT.gen.cs new file mode 100644 index 0000000..0a17fe5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentTimingSurfaceCapabilitiesEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentTimingSurfaceCapabilitiesEXT - Structure describing present timing capabilities of a surface + /// + /// + /// + /// The VkPresentTimingSurfaceCapabilitiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPresentTimingSurfaceCapabilitiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentTimingSupported; + /// VkBool32 presentAtAbsoluteTimeSupported; + /// VkBool32 presentAtRelativeTimeSupported; + /// VkPresentStageFlagsEXT presentStageQueries; + /// } VkPresentTimingSurfaceCapabilitiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentTimingSurfaceCapabilitiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentTimingSurfaceCapabilitiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentTimingSupported indicates whether querying presentation timestamps is supported for a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::surface. + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentTimingSupported; + + /// + /// PresentAtAbsoluteTimeSupported indicates whether a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::surface supports presenting images with absolute times. + /// + [FieldOffset(20)] + public Brutal.Bool32 PresentAtAbsoluteTimeSupported; + + /// + /// PresentAtRelativeTimeSupported indicates whether a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::surface supports presenting images with relative times. + /// + [FieldOffset(24)] + public Brutal.Bool32 PresentAtRelativeTimeSupported; + + /// + /// PresentStageQueries is a bitmask of VkPresentStageFlagsEXT indicating which present stages a swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::surface is able to provide timing information for. + /// + [FieldOffset(28)] + public VkPresentStageFlagsEXT PresentStageQueries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentTimingsInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentTimingsInfoEXT.gen.cs new file mode 100644 index 0000000..661bbec --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentTimingsInfoEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentTimingsInfoEXT - Array of VkPresentTimingInfoEXT to chain with VkPresentInfoKHR + /// + /// + /// + /// When the presentAtAbsoluteTime^ or + /// presentAtRelativeTime^ feature is + /// enabled, an application can instruct the presentation engine to attempt to + /// display an image at a specified time, or for a minimum duration, by + /// including the VkPresentTimingsInfoEXT structure in the pNext + /// chain of the VkPresentInfoKHR structure. + /// + /// + /// The VkPresentTimingsInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkPresentTimingsInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const VkPresentTimingInfoEXT* pTimingInfos; + /// } VkPresentTimingsInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentTimingsInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentTimingsInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to by this command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// TimingInfos is `NULL` or a pointer to an array of VkPresentTimingInfoEXT elements with swapchainCount entries. If not `NULL`, each element of pTimingInfos contains timing information for the presentation of the image corresponding to the entry in the VkPresentInfoKHR::pImageIndices array. + /// + [FieldOffset(24)] + public VkPresentTimingInfoEXT* TimingInfos; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPresentWait2InfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPresentWait2InfoKHR.gen.cs new file mode 100644 index 0000000..a772adb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPresentWait2InfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPresentWait2InfoKHR - Structure describing parameters of a presentation wait + /// + /// + /// + /// The VkPresentWait2InfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_wait2 + /// typedef struct VkPresentWait2InfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t presentId; + /// uint64_t timeout; + /// } VkPresentWait2InfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkPresentWait2InfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PresentWait2InfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentId is the presentation presentId to wait for. + /// + [FieldOffset(16)] + public nint PresentId; + + /// + /// Timeout is the timeout period in units of nanoseconds. timeout is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may: be substantially longer than one nanosecond, and may: be longer than the requested period. + /// + [FieldOffset(24)] + public nint Timeout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPrivateDataSlotCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPrivateDataSlotCreateInfo.gen.cs new file mode 100644 index 0000000..a9a279b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPrivateDataSlotCreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPrivateDataSlotCreateInfo - Structure specifying the parameters of private data slot construction + /// + /// + /// + /// The VkPrivateDataSlotCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkPrivateDataSlotCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPrivateDataSlotCreateFlags flags; + /// } VkPrivateDataSlotCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPrivateDataSlotCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PrivateDataSlotCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkPrivateDataSlotCreateFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkProtectedSubmitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkProtectedSubmitInfo.gen.cs new file mode 100644 index 0000000..7967b1c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkProtectedSubmitInfo.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkProtectedSubmitInfo - Structure indicating whether the submission is protected + /// + /// + /// + /// If the pNext chain of VkSubmitInfo includes a + /// VkProtectedSubmitInfo structure, then the structure indicates whether + /// the batch is protected. + /// The VkProtectedSubmitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkProtectedSubmitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 protectedSubmit; + /// } VkProtectedSubmitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkProtectedSubmitInfo() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ProtectedSubmitInfo; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProtectedSubmit specifies whether the batch is protected. If protectedSubmit is VK_TRUE, the batch is protected. If protectedSubmit is VK_FALSE, the batch is unprotected. If the VkSubmitInfo::pNext chain does not include this structure, the batch is unprotected. + /// + [FieldOffset(16)] + public Brutal.Bool32 ProtectedSubmit; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPushConstantBankInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPushConstantBankInfoNV.gen.cs new file mode 100644 index 0000000..29c79f9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPushConstantBankInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPushConstantBankInfoNV - Structure specifying push constant bank information + /// + /// + /// + /// The VkPushConstantBankInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_push_constant_bank + /// typedef struct VkPushConstantBankInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t bank; + /// } VkPushConstantBankInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkPushConstantBankInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PushConstantBankInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Bank is the index of the hardware bank into which the data is pushed. + /// + [FieldOffset(16)] + public int Bank; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPushConstantRange.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPushConstantRange.gen.cs new file mode 100644 index 0000000..331f38a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPushConstantRange.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPushConstantRange - Structure specifying a push constant range + /// + /// + /// + /// The VkPushConstantRange structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkPushConstantRange { + /// VkShaderStageFlags stageFlags; + /// uint32_t offset; + /// uint32_t size; + /// } VkPushConstantRange; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkPushConstantRange() + { + /// + /// StageFlags is a set of stage flags describing the shader stages that will access a range of push constants. If a particular stage is not included in the range, then accessing members of that range of push constants from the corresponding shader stage will return undefined: values. + /// + [FieldOffset(0)] + public VkShaderStageFlags StageFlags; + + /// + /// Offset and size are the start offset and size, respectively, consumed by the range. Both offset and size are in units of bytes and must be a multiple of 4. The layout of the push constant variables is specified in the shader. + /// + [FieldOffset(4)] + public ByteSize32 Offset; + + /// + /// Size + /// + [FieldOffset(8)] + public ByteSize32 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPushConstantsInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPushConstantsInfo.gen.cs new file mode 100644 index 0000000..cded058 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPushConstantsInfo.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPushConstantsInfo - Structure specifying a push constant update operation + /// + /// + /// + /// :refpage: VkPushConstantsInfo + /// + /// + /// The VkPushConstantsInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPushConstantsInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineLayout layout; + /// VkShaderStageFlags stageFlags; + /// uint32_t offset; + /// uint32_t size; + /// const void* pValues; + /// } VkPushConstantsInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPushConstantsInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PushConstantsInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Layout is the pipeline layout used to program the push constant updates. + /// + [FieldOffset(16)] + public VkPipelineLayout Layout; + + /// + /// StageFlags is a bitmask of VkShaderStageFlags specifying the shader stages that will use the push constants in the updated range. + /// + [FieldOffset(24)] + public VkShaderStageFlags StageFlags; + + /// + /// Offset is the start offset of the push constant range to update, in units of bytes. + /// + [FieldOffset(28)] + public int Offset; + + /// + /// Size is the size of the push constant range to update, in units of bytes. + /// + [FieldOffset(32)] + public int Size; + + /// + /// Values is a pointer to an array of size bytes containing the new push constant values. + /// + [FieldOffset(40)] + public void* Values; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPushDataInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPushDataInfoEXT.gen.cs new file mode 100644 index 0000000..b9dc832 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPushDataInfoEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPushDataInfoEXT - Structure specifying a push data update operation + /// + /// + /// + /// :refpage: VkPushDataInfoEXT + /// + /// + /// The VkPushDataInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkPushDataInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t offset; + /// VkHostAddressRangeConstEXT data; + /// } VkPushDataInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkPushDataInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PushDataInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Offset is the start offset of the push data range to update, in units of bytes. + /// + [FieldOffset(16)] + public int Offset; + + /// + /// Data is the host address range containing the push data to update. + /// + [FieldOffset(24)] + public VkHostAddressRangeConstEXT Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetInfo.gen.cs new file mode 100644 index 0000000..dd6c617 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetInfo.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPushDescriptorSetInfo - Structure specifying a descriptor set push operation + /// + /// + /// + /// :refpage: VkPushDescriptorSetInfo + /// + /// + /// The VkPushDescriptorSetInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPushDescriptorSetInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderStageFlags stageFlags; + /// VkPipelineLayout layout; + /// uint32_t set; + /// uint32_t descriptorWriteCount; + /// const VkWriteDescriptorSet* pDescriptorWrites; + /// } VkPushDescriptorSetInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPushDescriptorSetInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PushDescriptorSetInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StageFlags is a bitmask of VkShaderStageFlags specifying the shader stages that will use the descriptors. + /// + [FieldOffset(16)] + public VkShaderStageFlags StageFlags; + + /// + /// Layout is a VkPipelineLayout object used to program the bindings. + /// + [FieldOffset(24)] + public VkPipelineLayout Layout; + + /// + /// Set is the set number of the descriptor set in the pipeline layout that will be updated. + /// + [FieldOffset(32)] + public int Set; + + /// + /// DescriptorWriteCount is the number of elements in the pDescriptorWrites array. + /// + [FieldOffset(36)] + public int DescriptorWriteCount; + + /// + /// DescriptorWrites is a pointer to an array of VkWriteDescriptorSet structures describing the descriptors to be updated. + /// + [FieldOffset(40)] + public VkWriteDescriptorSet* DescriptorWrites; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetWithTemplateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetWithTemplateInfo.gen.cs new file mode 100644 index 0000000..f548d3e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkPushDescriptorSetWithTemplateInfo.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkPushDescriptorSetWithTemplateInfo - Structure specifying a descriptor set push operation using a descriptor update template + /// + /// + /// + /// :refpage: VkPushDescriptorSetWithTemplateInfo + /// + /// + /// The VkPushDescriptorSetWithTemplateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkPushDescriptorSetWithTemplateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorUpdateTemplate descriptorUpdateTemplate; + /// VkPipelineLayout layout; + /// uint32_t set; + /// const void* pData; + /// } VkPushDescriptorSetWithTemplateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkPushDescriptorSetWithTemplateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.PushDescriptorSetWithTemplateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DescriptorUpdateTemplate is a descriptor update template defining how to interpret the descriptor information in pData. + /// + [FieldOffset(16)] + public VkDescriptorUpdateTemplate DescriptorUpdateTemplate; + + /// + /// Layout is a VkPipelineLayout object used to program the bindings. It must be compatible with the layout used to create the descriptorUpdateTemplate handle. + /// + [FieldOffset(24)] + public VkPipelineLayout Layout; + + /// + /// Set is the set number of the descriptor set in the pipeline layout that will be updated. This must be the same number used to create the descriptorUpdateTemplate handle. + /// + [FieldOffset(32)] + public int Set; + + /// + /// Data is a pointer to memory containing descriptors for the templated update. + /// + [FieldOffset(40)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueryLowLatencySupportNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueryLowLatencySupportNV.gen.cs new file mode 100644 index 0000000..a7291e1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueryLowLatencySupportNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryLowLatencySupportNV - Structure used for NVIDIA Reflex Support + /// + /// + /// + /// The VkQueryLowLatencySupportNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency + /// typedef struct VkQueryLowLatencySupportNV { + /// VkStructureType sType; + /// const void* pNext; + /// void* pQueriedLowLatencyData; + /// } VkQueryLowLatencySupportNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueryLowLatencySupportNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueryLowLatencySupportNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueriedLowLatencyData is used for NVIDIA Reflex Support. + /// + [FieldOffset(16)] + public void* QueriedLowLatencyData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueryPoolCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueryPoolCreateInfo.gen.cs new file mode 100644 index 0000000..d589043 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueryPoolCreateInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolCreateInfo - Structure specifying parameters of a newly created query pool + /// + /// + /// + /// The VkQueryPoolCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkQueryPoolCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkQueryPoolCreateFlags flags; + /// VkQueryType queryType; + /// uint32_t queryCount; + /// VkQueryPipelineStatisticFlags pipelineStatistics; + /// } VkQueryPoolCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkQueryPoolCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueryPoolCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkQueryPoolCreateFlags + /// + [FieldOffset(16)] + public VkQueryPoolCreateFlags Flags; + + /// + /// QueryType is a VkQueryType value specifying the type of queries managed by the pool. + /// + [FieldOffset(20)] + public VkQueryType QueryType; + + /// + /// QueryCount is the number of queries managed by the pool. + /// + [FieldOffset(24)] + public int QueryCount; + + /// + /// PipelineStatistics is unused and ignored. + /// + [FieldOffset(28)] + public VkQueryPipelineStatisticFlags PipelineStatistics; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..707c806 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceCreateInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolPerformanceCreateInfoKHR - Structure specifying parameters of a newly created performance query pool + /// + /// + /// + /// The VkQueryPoolPerformanceCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_performance_query + /// typedef struct VkQueryPoolPerformanceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t queueFamilyIndex; + /// uint32_t counterIndexCount; + /// const uint32_t* pCounterIndices; + /// } VkQueryPoolPerformanceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkQueryPoolPerformanceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueryPoolPerformanceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueueFamilyIndex is the queue family index to create this performance query pool for. + /// + [FieldOffset(16)] + public int QueueFamilyIndex; + + /// + /// CounterIndexCount is the length of the pCounterIndices array. + /// + [FieldOffset(20)] + public int CounterIndexCount; + + /// + /// CounterIndices is a pointer to an array of indices into the vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR::pCounters to enable in this performance query pool. + /// + [FieldOffset(24)] + public int* CounterIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceQueryCreateInfoINTEL.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceQueryCreateInfoINTEL.gen.cs new file mode 100644 index 0000000..ced50e5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueryPoolPerformanceQueryCreateInfoINTEL.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolPerformanceQueryCreateInfoINTEL - Structure specifying parameters to create a pool of performance queries + /// + /// + /// + /// The VkQueryPoolPerformanceQueryCreateInfoINTEL structure is defined + /// as: + /// + /// + /// // Provided by VK_INTEL_performance_query + /// typedef struct VkQueryPoolPerformanceQueryCreateInfoINTEL { + /// VkStructureType sType; + /// const void* pNext; + /// VkQueryPoolSamplingModeINTEL performanceCountersSampling; + /// } VkQueryPoolPerformanceQueryCreateInfoINTEL; + /// + /// + /// // Provided by VK_INTEL_performance_query + /// // Equivalent to VkQueryPoolPerformanceQueryCreateInfoINTEL + /// typedef VkQueryPoolPerformanceQueryCreateInfoINTEL VkQueryPoolCreateInfoINTEL; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueryPoolPerformanceQueryCreateInfoINTEL() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueryPoolPerformanceQueryCreateInfoINTEL; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerformanceCountersSampling + /// + [FieldOffset(16)] + public VkQueryPoolSamplingModeINTEL PerformanceCountersSampling; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.gen.cs new file mode 100644 index 0000000..6e6f604 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodeFeedbackCreateInfoKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolVideoEncodeFeedbackCreateInfoKHR - Structure specifying enabled video encode feedback values + /// + /// + /// + /// The VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags; + /// } VkQueryPoolVideoEncodeFeedbackCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueryPoolVideoEncodeFeedbackCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// EncodeFeedbackFlags is a bitmask of VkVideoEncodeFeedbackFlagsKHR values specifying the set of enabled video encode feedback values captured by queries of the new pool. + /// + [FieldOffset(16)] + public VkVideoEncodeFeedbackFlagsKHR EncodeFeedbackFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR.gen.cs new file mode 100644 index 0000000..b46410d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR - Structure specifying enabled per picture partition video encode feedback values + /// + /// + /// + /// The VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR structure + /// is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_feedback2 + /// typedef struct VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxPerPartitionFeedbackEntries; + /// VkVideoEncodePerPartitionFeedbackFlagsKHR perPartitionEncodeFeedbackFlags; + /// } VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPerPartitionFeedbackEntries specifies the maximum number of picture partitions for which per picture partition video encode feedback values can be captured by queries of the new pool. + /// + [FieldOffset(16)] + public int MaxPerPartitionFeedbackEntries; + + /// + /// PerPartitionEncodeFeedbackFlags is a bitmask of VkVideoEncodePerPartitionFeedbackFlagsKHR values specifying the set of enabled per picture partition video encode feedback values captured by queries of the new pool. + /// + [FieldOffset(20)] + public VkVideoEncodePerPartitionFeedbackFlagsKHR PerPartitionEncodeFeedbackFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointProperties2NV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointProperties2NV.gen.cs new file mode 100644 index 0000000..afbab58 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointProperties2NV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyCheckpointProperties2NV - Return structure for queue family checkpoint information query + /// + /// + /// + /// The VkQueueFamilyCheckpointProperties2NV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2 + /// typedef struct VkQueueFamilyCheckpointProperties2NV { + /// VkStructureType sType; + /// void* pNext; + /// VkPipelineStageFlags2 checkpointExecutionStageMask; + /// } VkQueueFamilyCheckpointProperties2NV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueueFamilyCheckpointProperties2NV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyCheckpointProperties2NV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CheckpointExecutionStageMask is a mask indicating which pipeline stages the implementation can execute checkpoint markers in. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 CheckpointExecutionStageMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointPropertiesNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointPropertiesNV.gen.cs new file mode 100644 index 0000000..07ff24e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyCheckpointPropertiesNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyCheckpointPropertiesNV - Return structure for queue family checkpoint information query + /// + /// + /// + /// The VkQueueFamilyCheckpointPropertiesNV structure is defined as: + /// + /// + /// // Provided by VK_NV_device_diagnostic_checkpoints + /// typedef struct VkQueueFamilyCheckpointPropertiesNV { + /// VkStructureType sType; + /// void* pNext; + /// VkPipelineStageFlags checkpointExecutionStageMask; + /// } VkQueueFamilyCheckpointPropertiesNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueueFamilyCheckpointPropertiesNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyCheckpointPropertiesNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CheckpointExecutionStageMask is a mask indicating which pipeline stages the implementation can execute checkpoint markers in. + /// + [FieldOffset(16)] + public VkPipelineStageFlags CheckpointExecutionStageMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphOpticalFlowPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphOpticalFlowPropertiesARM.gen.cs new file mode 100644 index 0000000..ca42aea --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphOpticalFlowPropertiesARM.gen.cs @@ -0,0 +1,93 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyDataGraphOpticalFlowPropertiesARM - Structure describing optical flow properties of a processing engine and operation set for a specific queue family of a physical device + /// + /// + /// + /// :refpage: VkQueueFamilyDataGraphOpticalFlowPropertiesARM + /// + /// + /// The VkQueueFamilyDataGraphOpticalFlowPropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_optical_flow + /// typedef struct VkQueueFamilyDataGraphOpticalFlowPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkDataGraphOpticalFlowGridSizeFlagsARM supportedOutputGridSizes; + /// VkDataGraphOpticalFlowGridSizeFlagsARM supportedHintGridSizes; + /// VkBool32 hintSupported; + /// VkBool32 costSupported; + /// uint32_t minWidth; + /// uint32_t minHeight; + /// uint32_t maxWidth; + /// uint32_t maxHeight; + /// } VkQueueFamilyDataGraphOpticalFlowPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkQueueFamilyDataGraphOpticalFlowPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyDataGraphOpticalFlowPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedOutputGridSizes + /// + [FieldOffset(16)] + public VkDataGraphOpticalFlowGridSizeFlagsARM SupportedOutputGridSizes; + + /// + /// SupportedHintGridSizes + /// + [FieldOffset(20)] + public VkDataGraphOpticalFlowGridSizeFlagsARM SupportedHintGridSizes; + + /// + /// HintSupported + /// + [FieldOffset(24)] + public Brutal.Bool32 HintSupported; + + /// + /// CostSupported + /// + [FieldOffset(28)] + public Brutal.Bool32 CostSupported; + + /// + /// MinWidth + /// + [FieldOffset(32)] + public int MinWidth; + + /// + /// MinHeight + /// + [FieldOffset(36)] + public int MinHeight; + + /// + /// MaxWidth + /// + [FieldOffset(40)] + public int MaxWidth; + + /// + /// MaxHeight + /// + [FieldOffset(44)] + public int MaxHeight; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphProcessingEnginePropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphProcessingEnginePropertiesARM.gen.cs new file mode 100644 index 0000000..b242af7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphProcessingEnginePropertiesARM.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyDataGraphProcessingEnginePropertiesARM - Structure describing the properties of a data graph processing engine type for a given queue family + /// + /// + /// + /// The VkQueueFamilyDataGraphProcessingEnginePropertiesARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkQueueFamilyDataGraphProcessingEnginePropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkExternalSemaphoreHandleTypeFlags foreignSemaphoreHandleTypes; + /// VkExternalMemoryHandleTypeFlags foreignMemoryHandleTypes; + /// } VkQueueFamilyDataGraphProcessingEnginePropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueueFamilyDataGraphProcessingEnginePropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyDataGraphProcessingEnginePropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ForeignSemaphoreHandleTypes is a VkExternalSemaphoreHandleTypeFlags that describes the external semaphore handle types supported by a foreign data graph processing engine. + /// + [FieldOffset(16)] + public VkExternalSemaphoreHandleTypeFlags ForeignSemaphoreHandleTypes; + + /// + /// ForeignMemoryHandleTypes is a VkExternalMemoryHandleTypeFlags that describes the external memory handle types supported by a foreign data graph processing engine. + /// + [FieldOffset(20)] + public VkExternalMemoryHandleTypeFlags ForeignMemoryHandleTypes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphPropertiesARM.gen.cs new file mode 100644 index 0000000..50aa95a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphPropertiesARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyDataGraphPropertiesARM - Structure describing a data graph processing engine and operation it supports + /// + /// + /// + /// The VkQueueFamilyDataGraphPropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph + /// typedef struct VkQueueFamilyDataGraphPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkPhysicalDeviceDataGraphProcessingEngineARM engine; + /// VkPhysicalDeviceDataGraphOperationSupportARM operation; + /// } VkQueueFamilyDataGraphPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 160)] + public unsafe partial struct VkQueueFamilyDataGraphPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyDataGraphPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Engine is a VkPhysicalDeviceDataGraphProcessingEngineARM structure describing a data graph processing engine. + /// + [FieldOffset(16)] + public VkPhysicalDeviceDataGraphProcessingEngineARM Engine; + + /// + /// Operation is a VkPhysicalDeviceDataGraphOperationSupportARM structure describing one or more operations supported by a data graph processing engine. + /// + [FieldOffset(24)] + public VkPhysicalDeviceDataGraphOperationSupportARM Operation; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphTosaPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphTosaPropertiesARM.gen.cs new file mode 100644 index 0000000..651a477 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyDataGraphTosaPropertiesARM.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyDataGraphTOSAPropertiesARM - Structure describing the TOSA properties of a processing engine and operation set for a specific queue family of a physical device + /// + /// + /// + /// The VkQueueFamilyDataGraphTOSAPropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_data_graph_instruction_set_tosa + /// typedef struct VkQueueFamilyDataGraphTOSAPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t profileCount; + /// const VkDataGraphTOSANameQualityARM* pProfiles; + /// uint32_t extensionCount; + /// const VkDataGraphTOSANameQualityARM* pExtensions; + /// VkDataGraphTOSALevelARM level; + /// } VkQueueFamilyDataGraphTOSAPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkQueueFamilyDataGraphTosaPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyDataGraphTosaPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProfileCount is the length of the pProfiles array. + /// + [FieldOffset(16)] + public int ProfileCount; + + /// + /// Profiles is a pointer to an array of VkDataGraphTOSANameQualityARM structures describing the TOSA profiles supported. + /// + [FieldOffset(24)] + public VkDataGraphTosaNameQualityARM* Profiles; + + /// + /// ExtensionCount is the length of the pExtensions array. + /// + [FieldOffset(32)] + public int ExtensionCount; + + /// + /// Extensions is a pointer to an array of VkDataGraphTOSANameQualityARM structures describing the TOSA extensions supported. + /// + [FieldOffset(40)] + public VkDataGraphTosaNameQualityARM* Extensions; + + /// + /// Level is a VkDataGraphTOSALevelARM describing the TOSA level supported. + /// + [FieldOffset(48)] + public VkDataGraphTosaLevelARM Level; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyGlobalPriorityProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyGlobalPriorityProperties.gen.cs new file mode 100644 index 0000000..2437b5f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyGlobalPriorityProperties.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyGlobalPriorityProperties - Return structure for queue family global priority information query + /// + /// + /// + /// The VkQueueFamilyGlobalPriorityProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkQueueFamilyGlobalPriorityProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t priorityCount; + /// VkQueueGlobalPriority priorities[VK_MAX_GLOBAL_PRIORITY_SIZE]; + /// } VkQueueFamilyGlobalPriorityProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkQueueFamilyGlobalPriorityProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyGlobalPriorityProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PriorityCount is the number of supported global queue priorities in this queue family, and it must be greater than 0. + /// + [FieldOffset(16)] + public int PriorityCount; + + /// + /// Priorities is an array of VK_MAX_GLOBAL_PRIORITY_SIZE VkQueueGlobalPriority enums representing all supported global queue priorities in this queue family. The first priorityCount elements of the array will be valid. + /// + [FieldOffset(20)] + public VkQueueGlobalPriority_16 Priorities; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR.gen.cs new file mode 100644 index 0000000..4d7a4e4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR - Structure specifying the optimal image transfer granularity for a queue family + /// + /// + /// + /// The VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR + /// structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance11 + /// typedef struct VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent3D optimalImageTransferGranularity; + /// } VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkQueueFamilyOptimalImageTransferGranularityPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.QueueFamilyOptimalImageTransferGranularityPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OptimalImageTransferGranularity is the optimal granularity for image copy operations in this queue family. + /// + [FieldOffset(16)] + public VkExtent3D OptimalImageTransferGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyOwnershipTransferPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyOwnershipTransferPropertiesKHR.gen.cs new file mode 100644 index 0000000..19d1c75 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyOwnershipTransferPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyOwnershipTransferPropertiesKHR - Structure describing queue family ownership transfer properties + /// + /// + /// + /// The VkQueueFamilyOwnershipTransferPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_maintenance9 + /// typedef struct VkQueueFamilyOwnershipTransferPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t optimalImageTransferToQueueFamilies; + /// } VkQueueFamilyOwnershipTransferPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueueFamilyOwnershipTransferPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyOwnershipTransferPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OptimalImageTransferToQueueFamilies is a bitmask of queue family indices that indicates which queue families belonging to the same logical device support implicitly acquiring optimal image resources owned by this queue family, without the resources' contents becoming undefined:. + /// + [FieldOffset(16)] + public int OptimalImageTransferToQueueFamilies; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties.gen.cs new file mode 100644 index 0000000..07835c5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyProperties - Structure providing information about a queue family + /// + /// + /// + /// The VkQueueFamilyProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkQueueFamilyProperties { + /// VkQueueFlags queueFlags; + /// uint32_t queueCount; + /// uint32_t timestampValidBits; + /// VkExtent3D minImageTransferGranularity; + /// } VkQueueFamilyProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkQueueFamilyProperties() + { + /// + /// QueueFlags is a bitmask of VkQueueFlags indicating capabilities of the queues in this queue family. + /// + [FieldOffset(0)] + public VkQueueFlags QueueFlags; + + /// + /// QueueCount is the unsigned integer count of queues in this queue family. Each queue family must support at least one queue. + /// + [FieldOffset(4)] + public int QueueCount; + + /// + /// TimestampValidBits is the unsigned integer count of meaningful bits in the timestamps written via vkCmdWriteTimestamp. The valid range for the count is 36 to 64 bits, or a value of 0, indicating no support for timestamps. Bits outside the valid range are guaranteed to be zeros. + /// + [FieldOffset(8)] + public int TimestampValidBits; + + /// + /// MinImageTransferGranularity is the minimum granularity supported for image transfer operations on the queues in this queue family. + /// + [FieldOffset(12)] + public VkExtent3D MinImageTransferGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties2.gen.cs new file mode 100644 index 0000000..f91c04b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyProperties2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyProperties2 - Structure providing information about a queue family + /// + /// + /// + /// The VkQueueFamilyProperties2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkQueueFamilyProperties2 { + /// VkStructureType sType; + /// void* pNext; + /// VkQueueFamilyProperties queueFamilyProperties; + /// } VkQueueFamilyProperties2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkQueueFamilyProperties2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyProperties2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueueFamilyProperties is a VkQueueFamilyProperties structure which is populated with the same values as in vkGetPhysicalDeviceQueueFamilyProperties. + /// + [FieldOffset(16)] + public VkQueueFamilyProperties QueueFamilyProperties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyQueryResultStatusPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyQueryResultStatusPropertiesKHR.gen.cs new file mode 100644 index 0000000..c32f874 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyQueryResultStatusPropertiesKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyQueryResultStatusPropertiesKHR - Structure specifying support for result status query + /// + /// + /// + /// The VkQueueFamilyQueryResultStatusPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkQueueFamilyQueryResultStatusPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 queryResultStatusSupport; + /// } VkQueueFamilyQueryResultStatusPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueueFamilyQueryResultStatusPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyQueryResultStatusPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueryResultStatusSupport reports VK_TRUE if query type VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR and use of VK_QUERY_RESULT_WITH_STATUS_BIT_KHR are supported. + /// + [FieldOffset(16)] + public Brutal.Bool32 QueryResultStatusSupport; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkQueueFamilyVideoPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyVideoPropertiesKHR.gen.cs new file mode 100644 index 0000000..73366d5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkQueueFamilyVideoPropertiesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkQueueFamilyVideoPropertiesKHR - Structure describing video codec operations supported by a queue family + /// + /// + /// + /// The VkQueueFamilyVideoPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkQueueFamilyVideoPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoCodecOperationFlagsKHR videoCodecOperations; + /// } VkQueueFamilyVideoPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkQueueFamilyVideoPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.QueueFamilyVideoPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoCodecOperations is a bitmask of VkVideoCodecOperationFlagsKHR that indicates the set of video codec operations supported by the queue family. + /// + [FieldOffset(16)] + public VkVideoCodecOperationFlagsKHR VideoCodecOperations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV.gen.cs new file mode 100644 index 0000000..a9bd1e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV - Structure controlling if cluster acceleration structures are allowed + /// + /// + /// + /// :refpage: VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV + /// + /// + /// The VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV + /// structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline with VK_NV_cluster_acceleration_structure + /// typedef struct VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 allowClusterAccelerationStructure; + /// } VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.RayTracingPipelineClusterAccelerationStructureCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AllowClusterAccelerationStructure controls if cluster acceleration structures are allowed in the ray tracing pipeline. + /// + [FieldOffset(16)] + public Brutal.Bool32 AllowClusterAccelerationStructure; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoKHR.gen.cs new file mode 100644 index 0000000..43d8781 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoKHR.gen.cs @@ -0,0 +1,120 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingPipelineCreateInfoKHR - Structure specifying parameters of a newly created ray tracing pipeline + /// + /// + /// + /// :refpage: VkRayTracingPipelineCreateInfoKHR + /// + /// + /// The VkRayTracingPipelineCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkRayTracingPipelineCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreateFlags flags; + /// uint32_t stageCount; + /// const VkPipelineShaderStageCreateInfo* pStages; + /// uint32_t groupCount; + /// const VkRayTracingShaderGroupCreateInfoKHR* pGroups; + /// uint32_t maxPipelineRayRecursionDepth; + /// const VkPipelineLibraryCreateInfoKHR* pLibraryInfo; + /// const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface; + /// const VkPipelineDynamicStateCreateInfo* pDynamicState; + /// VkPipelineLayout layout; + /// VkPipeline basePipelineHandle; + /// int32_t basePipelineIndex; + /// } VkRayTracingPipelineCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct VkRayTracingPipelineCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RayTracingPipelineCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineCreateFlags specifying how the pipeline will be generated. + /// + [FieldOffset(16)] + public VkPipelineCreateFlags Flags; + + /// + /// StageCount is the number of entries in the pStages array. + /// + [FieldOffset(20)] + public int StageCount; + + /// + /// Stages is a pointer to an array of stageCount VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the ray tracing pipeline. + /// + [FieldOffset(24)] + public VkPipelineShaderStageCreateInfo* Stages; + + /// + /// GroupCount is the number of entries in the pGroups array. + /// + [FieldOffset(32)] + public int GroupCount; + + /// + /// Groups is a pointer to an array of groupCount VkRayTracingShaderGroupCreateInfoKHR structures describing the set of the shader stages to be included in each shader group in the ray tracing pipeline. + /// + [FieldOffset(40)] + public VkRayTracingShaderGroupCreateInfoKHR* Groups; + + /// + /// MaxPipelineRayRecursionDepth is the maximum recursion depth^ of shaders executed by this pipeline. + /// + [FieldOffset(48)] + public int MaxPipelineRayRecursionDepth; + + /// + /// LibraryInfo is a pointer to a VkPipelineLibraryCreateInfoKHR structure defining pipeline libraries to include. + /// + [FieldOffset(56)] + public VkPipelineLibraryCreateInfoKHR* LibraryInfo; + + /// + /// LibraryInterface is a pointer to a VkRayTracingPipelineInterfaceCreateInfoKHR structure defining additional information when using pipeline libraries. + /// + [FieldOffset(64)] + public VkRayTracingPipelineInterfaceCreateInfoKHR* LibraryInterface; + + /// + /// DynamicState is a pointer to a VkPipelineDynamicStateCreateInfo structure, and is used to indicate which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state. This can be `NULL`, which means no state in the pipeline is considered dynamic. + /// + [FieldOffset(72)] + public VkPipelineDynamicStateCreateInfo* DynamicState; + + /// + /// Layout is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. + /// + [FieldOffset(80)] + public VkPipelineLayout Layout; + + /// + /// BasePipelineHandle is a pipeline to derive from. + /// + [FieldOffset(88)] + public VkPipeline BasePipelineHandle; + + /// + /// BasePipelineIndex is an index into the pCreateInfos parameter to use as a pipeline to derive from. + /// + [FieldOffset(96)] + public int BasePipelineIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoNV.gen.cs new file mode 100644 index 0000000..70a65d1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineCreateInfoNV.gen.cs @@ -0,0 +1,99 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingPipelineCreateInfoNV - Structure specifying parameters of a newly created ray tracing pipeline + /// + /// + /// + /// :refpage: VkRayTracingPipelineCreateInfoNV + /// + /// + /// The VkRayTracingPipelineCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkRayTracingPipelineCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineCreateFlags flags; + /// uint32_t stageCount; + /// const VkPipelineShaderStageCreateInfo* pStages; + /// uint32_t groupCount; + /// const VkRayTracingShaderGroupCreateInfoNV* pGroups; + /// uint32_t maxRecursionDepth; + /// VkPipelineLayout layout; + /// VkPipeline basePipelineHandle; + /// int32_t basePipelineIndex; + /// } VkRayTracingPipelineCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkRayTracingPipelineCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RayTracingPipelineCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkPipelineCreateFlags specifying how the pipeline will be generated. + /// + [FieldOffset(16)] + public VkPipelineCreateFlags Flags; + + /// + /// StageCount is the number of entries in the pStages array. + /// + [FieldOffset(20)] + public int StageCount; + + /// + /// Stages is a pointer to an array of VkPipelineShaderStageCreateInfo structures specifying the set of the shader stages to be included in the ray tracing pipeline. + /// + [FieldOffset(24)] + public VkPipelineShaderStageCreateInfo* Stages; + + /// + /// GroupCount is the number of entries in the pGroups array. + /// + [FieldOffset(32)] + public int GroupCount; + + /// + /// Groups is a pointer to an array of VkRayTracingShaderGroupCreateInfoNV structures describing the set of the shader stages to be included in each shader group in the ray tracing pipeline. + /// + [FieldOffset(40)] + public VkRayTracingShaderGroupCreateInfoNV* Groups; + + /// + /// MaxRecursionDepth is the maximum recursion depth^ of shaders executed by this pipeline. + /// + [FieldOffset(48)] + public int MaxRecursionDepth; + + /// + /// Layout is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline. + /// + [FieldOffset(56)] + public VkPipelineLayout Layout; + + /// + /// BasePipelineHandle is a pipeline to derive from. + /// + [FieldOffset(64)] + public VkPipeline BasePipelineHandle; + + /// + /// BasePipelineIndex is an index into the pCreateInfos parameter to use as a pipeline to derive from. + /// + [FieldOffset(72)] + public int BasePipelineIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineInterfaceCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineInterfaceCreateInfoKHR.gen.cs new file mode 100644 index 0000000..39934a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRayTracingPipelineInterfaceCreateInfoKHR.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingPipelineInterfaceCreateInfoKHR - Structure specifying additional interface information when using libraries + /// + /// + /// + /// :refpage: VkRayTracingPipelineInterfaceCreateInfoKHR + /// + /// + /// The VkRayTracingPipelineInterfaceCreateInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxPipelineRayPayloadSize; + /// uint32_t maxPipelineRayHitAttributeSize; + /// } VkRayTracingPipelineInterfaceCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRayTracingPipelineInterfaceCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RayTracingPipelineInterfaceCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPipelineRayPayloadSize is the maximum payload size in bytes used by any shader in the pipeline. + /// + [FieldOffset(16)] + public int MaxPipelineRayPayloadSize; + + /// + /// MaxPipelineRayHitAttributeSize is the maximum attribute structure size in bytes used by any shader in the pipeline. + /// + [FieldOffset(20)] + public int MaxPipelineRayHitAttributeSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoKHR.gen.cs new file mode 100644 index 0000000..b9ad4fc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoKHR.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingShaderGroupCreateInfoKHR - Structure specifying shaders in a shader group + /// + /// + /// + /// :refpage: VkRayTracingShaderGroupCreateInfoKHR + /// + /// + /// The VkRayTracingShaderGroupCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkRayTracingShaderGroupCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkRayTracingShaderGroupTypeKHR type; + /// uint32_t generalShader; + /// uint32_t closestHitShader; + /// uint32_t anyHitShader; + /// uint32_t intersectionShader; + /// const void* pShaderGroupCaptureReplayHandle; + /// } VkRayTracingShaderGroupCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkRayTracingShaderGroupCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RayTracingShaderGroupCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is the type of hit group specified in this structure. + /// + [FieldOffset(16)] + public VkRayTracingShaderGroupTypeKHR Type; + + /// + /// GeneralShader is the index of the ray generation, miss, or callable shader from VkRayTracingPipelineCreateInfoKHR::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, and VK_SHADER_UNUSED_KHR otherwise. + /// + [FieldOffset(20)] + public int GeneralShader; + + /// + /// ClosestHitShader is the optional index of the closest hit shader from VkRayTracingPipelineCreateInfoKHR::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and VK_SHADER_UNUSED_KHR otherwise. + /// + [FieldOffset(24)] + public int ClosestHitShader; + + /// + /// AnyHitShader is the optional index of the any-hit shader from VkRayTracingPipelineCreateInfoKHR::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and VK_SHADER_UNUSED_KHR otherwise. + /// + [FieldOffset(28)] + public int AnyHitShader; + + /// + /// IntersectionShader is the index of the intersection shader from VkRayTracingPipelineCreateInfoKHR::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and VK_SHADER_UNUSED_KHR otherwise. + /// + [FieldOffset(32)] + public int IntersectionShader; + + /// + /// ShaderGroupCaptureReplayHandle is `NULL` or a pointer to replay information for this shader group queried from vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, as described in Ray Tracing Capture Replay^. Ignored if VkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplay is VK_FALSE. + /// + [FieldOffset(40)] + public void* ShaderGroupCaptureReplayHandle; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoNV.gen.cs new file mode 100644 index 0000000..c8ab7f4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRayTracingShaderGroupCreateInfoNV.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRayTracingShaderGroupCreateInfoNV - Structure specifying shaders in a shader group + /// + /// + /// + /// :refpage: VkRayTracingShaderGroupCreateInfoNV + /// + /// + /// The VkRayTracingShaderGroupCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkRayTracingShaderGroupCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkRayTracingShaderGroupTypeKHR type; + /// uint32_t generalShader; + /// uint32_t closestHitShader; + /// uint32_t anyHitShader; + /// uint32_t intersectionShader; + /// } VkRayTracingShaderGroupCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkRayTracingShaderGroupCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RayTracingShaderGroupCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is the type of hit group specified in this structure. + /// + [FieldOffset(16)] + public VkRayTracingShaderGroupTypeKHR Type; + + /// + /// GeneralShader is the index of the ray generation, miss, or callable shader from VkRayTracingPipelineCreateInfoNV::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV, and VK_SHADER_UNUSED_NV otherwise. + /// + [FieldOffset(20)] + public int GeneralShader; + + /// + /// ClosestHitShader is the optional index of the closest hit shader from VkRayTracingPipelineCreateInfoNV::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and VK_SHADER_UNUSED_NV otherwise. + /// + [FieldOffset(24)] + public int ClosestHitShader; + + /// + /// AnyHitShader is the optional index of the any-hit shader from VkRayTracingPipelineCreateInfoNV::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and VK_SHADER_UNUSED_NV otherwise. + /// + [FieldOffset(28)] + public int AnyHitShader; + + /// + /// IntersectionShader is the index of the intersection shader from VkRayTracingPipelineCreateInfoNV::pStages in the group if the shader group has type of VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and VK_SHADER_UNUSED_NV otherwise. + /// + [FieldOffset(32)] + public int IntersectionShader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRect2D.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRect2D.gen.cs new file mode 100644 index 0000000..9f8fcbe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRect2D.gen.cs @@ -0,0 +1,37 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRect2D - Structure specifying a two-dimensional subregion + /// + /// + /// + /// Rectangles are used to describe a specified rectangular region of pixels + /// within an image or framebuffer. + /// Rectangles include both an offset and an extent of the same dimensionality, + /// as described above. + /// Two-dimensional rectangles are defined by the structure + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkRect2D { + /// VkOffset2D offset; + /// VkExtent2D extent; + /// } VkRect2D; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkRect2D() + { + /// + /// Offset is a VkOffset2D specifying the rectangle offset. + /// + [FieldOffset(0)] + public VkOffset2D Offset; + + /// + /// Extent is a VkExtent2D specifying the rectangle extent. + /// + [FieldOffset(8)] + public VkExtent2D Extent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRectLayerKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRectLayerKHR.gen.cs new file mode 100644 index 0000000..0c7427f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRectLayerKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRectLayerKHR - Structure containing a rectangle, including layer, changed by vkQueuePresentKHR for a given VkImage + /// + /// + /// + /// The VkRectLayerKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_incremental_present + /// typedef struct VkRectLayerKHR { + /// VkOffset2D offset; + /// VkExtent2D extent; + /// uint32_t layer; + /// } VkRectLayerKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VkRectLayerKHR() + { + /// + /// Offset is the origin of the rectangle, in pixels. + /// + [FieldOffset(0)] + public VkOffset2D Offset; + + /// + /// Extent is the size of the rectangle, in pixels. + /// + [FieldOffset(8)] + public VkExtent2D Extent; + + /// + /// Layer is the layer of the image. For images with only one layer, the value of layer must be 0. + /// + [FieldOffset(16)] + public int Layer; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRefreshCycleDurationGOOGLE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRefreshCycleDurationGOOGLE.gen.cs new file mode 100644 index 0000000..059697a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRefreshCycleDurationGOOGLE.gen.cs @@ -0,0 +1,26 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRefreshCycleDurationGOOGLE - Structure containing the RC duration of a display + /// + /// + /// + /// The VkRefreshCycleDurationGOOGLE structure is defined as: + /// + /// + /// // Provided by VK_GOOGLE_display_timing + /// typedef struct VkRefreshCycleDurationGOOGLE { + /// uint64_t refreshDuration; + /// } VkRefreshCycleDurationGOOGLE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkRefreshCycleDurationGOOGLE() + { + /// + /// RefreshDuration is the number of nanoseconds from the start of one refresh cycle to the next. + /// + [FieldOffset(0)] + public nint RefreshDuration; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkReleaseCapturedPipelineDataInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkReleaseCapturedPipelineDataInfoKHR.gen.cs new file mode 100644 index 0000000..40adc32 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkReleaseCapturedPipelineDataInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkReleaseCapturedPipelineDataInfoKHR - Structure specifying a pipeline whose captured data is to be released + /// + /// + /// + /// The VkReleaseCapturedPipelineDataInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_pipeline_binary + /// typedef struct VkReleaseCapturedPipelineDataInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPipeline pipeline; + /// } VkReleaseCapturedPipelineDataInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkReleaseCapturedPipelineDataInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ReleaseCapturedPipelineDataInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Pipeline the handle of the pipeline object to release the data from. + /// + [FieldOffset(16)] + public VkPipeline Pipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkReleaseSwapchainImagesInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkReleaseSwapchainImagesInfoKHR.gen.cs new file mode 100644 index 0000000..cfbbb74 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkReleaseSwapchainImagesInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkReleaseSwapchainImagesInfoKHR - Structure describing a list of swapchain image indices to be released + /// + /// + /// + /// The VkReleaseSwapchainImagesInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain_maintenance1 + /// typedef struct VkReleaseSwapchainImagesInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSwapchainKHR swapchain; + /// uint32_t imageIndexCount; + /// const uint32_t* pImageIndices; + /// } VkReleaseSwapchainImagesInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkReleaseSwapchainImagesInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ReleaseSwapchainImagesInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Swapchain is a swapchain to which images are being released. + /// + [FieldOffset(16)] + public VkSwapchainKHR Swapchain; + + /// + /// ImageIndexCount is the number of image indices to be released. + /// + [FieldOffset(24)] + public int ImageIndexCount; + + /// + /// ImageIndices is a pointer to an array of indices into the array of swapchain's presentable images, with imageIndexCount entries. + /// + [FieldOffset(32)] + public int* ImageIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassAttachmentBeginInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassAttachmentBeginInfo.gen.cs new file mode 100644 index 0000000..6b2239f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassAttachmentBeginInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassAttachmentBeginInfo - Structure specifying images to be used as framebuffer attachments + /// + /// + /// + /// The VkRenderPassAttachmentBeginInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkRenderPassAttachmentBeginInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t attachmentCount; + /// const VkImageView* pAttachments; + /// } VkRenderPassAttachmentBeginInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassAttachmentBeginInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassAttachmentBeginInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AttachmentCount is the number of attachments. + /// + [FieldOffset(16)] + public int AttachmentCount; + + /// + /// Attachments is a pointer to an array of VkImageView handles, each of which will be used as the corresponding attachment in the render pass instance. + /// + [FieldOffset(24)] + public VkImageView* Attachments; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassBeginInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassBeginInfo.gen.cs new file mode 100644 index 0000000..5de168a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassBeginInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassBeginInfo - Structure specifying render pass begin information + /// + /// + /// + /// The VkRenderPassBeginInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkRenderPassBeginInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderPass renderPass; + /// VkFramebuffer framebuffer; + /// VkRect2D renderArea; + /// uint32_t clearValueCount; + /// const VkClearValue* pClearValues; + /// } VkRenderPassBeginInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkRenderPassBeginInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassBeginInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RenderPass is the render pass to begin an instance of. + /// + [FieldOffset(16)] + public VkRenderPass RenderPass; + + /// + /// Framebuffer is the framebuffer containing the attachments that are used with the render pass. + /// + [FieldOffset(24)] + public VkFramebuffer Framebuffer; + + /// + /// RenderArea is the render area that is affected by the render pass instance, and is described in more detail below. + /// + [FieldOffset(32)] + public VkRect2D RenderArea; + + /// + /// ClearValueCount is the number of elements in pClearValues. + /// + [FieldOffset(48)] + public int ClearValueCount; + + /// + /// ClearValues is a pointer to an array of clearValueCount VkClearValue structures containing clear values for each attachment, if the attachment uses a loadOp value of VK_ATTACHMENT_LOAD_OP_CLEAR or if the attachment has a depth/stencil format and uses a stencilLoadOp value of VK_ATTACHMENT_LOAD_OP_CLEAR. The array is indexed by attachment number. Only elements corresponding to cleared attachments are used. Other elements of pClearValues are ignored. + /// + [FieldOffset(56)] + public VkClearValue* ClearValues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo.gen.cs new file mode 100644 index 0000000..60da7f2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassCreateInfo - Structure specifying parameters of a newly created render pass + /// + /// + /// + /// The VkRenderPassCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkRenderPassCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderPassCreateFlags flags; + /// uint32_t attachmentCount; + /// const VkAttachmentDescription* pAttachments; + /// uint32_t subpassCount; + /// const VkSubpassDescription* pSubpasses; + /// uint32_t dependencyCount; + /// const VkSubpassDependency* pDependencies; + /// } VkRenderPassCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkRenderPassCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkRenderPassCreateFlags Flags; + + /// + /// AttachmentCount is the number of attachments used by this render pass. + /// + [FieldOffset(20)] + public int AttachmentCount; + + /// + /// Attachments is a pointer to an array of attachmentCount VkAttachmentDescription structures describing the attachments used by the render pass. + /// + [FieldOffset(24)] + public VkAttachmentDescription* Attachments; + + /// + /// SubpassCount is the number of subpasses to create. + /// + [FieldOffset(32)] + public int SubpassCount; + + /// + /// Subpasses is a pointer to an array of subpassCount VkSubpassDescription structures describing each subpass. + /// + [FieldOffset(40)] + public VkSubpassDescription* Subpasses; + + /// + /// DependencyCount is the number of memory dependencies between pairs of subpasses. + /// + [FieldOffset(48)] + public int DependencyCount; + + /// + /// Dependencies is a pointer to an array of dependencyCount VkSubpassDependency structures describing dependencies between pairs of subpasses. + /// + [FieldOffset(56)] + public VkSubpassDependency* Dependencies; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo2.gen.cs new file mode 100644 index 0000000..7275af5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreateInfo2.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassCreateInfo2 - Structure specifying parameters of a newly created render pass + /// + /// + /// + /// The VkRenderPassCreateInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkRenderPassCreateInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderPassCreateFlags flags; + /// uint32_t attachmentCount; + /// const VkAttachmentDescription2* pAttachments; + /// uint32_t subpassCount; + /// const VkSubpassDescription2* pSubpasses; + /// uint32_t dependencyCount; + /// const VkSubpassDependency2* pDependencies; + /// uint32_t correlatedViewMaskCount; + /// const uint32_t* pCorrelatedViewMasks; + /// } VkRenderPassCreateInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkRenderPassCreateInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassCreateInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkRenderPassCreateFlags Flags; + + /// + /// AttachmentCount is the number of attachments used by this render pass. + /// + [FieldOffset(20)] + public int AttachmentCount; + + /// + /// Attachments is a pointer to an array of attachmentCount VkAttachmentDescription2 structures describing the attachments used by the render pass. + /// + [FieldOffset(24)] + public VkAttachmentDescription2* Attachments; + + /// + /// SubpassCount is the number of subpasses to create. + /// + [FieldOffset(32)] + public int SubpassCount; + + /// + /// Subpasses is a pointer to an array of subpassCount VkSubpassDescription2 structures describing each subpass. + /// + [FieldOffset(40)] + public VkSubpassDescription2* Subpasses; + + /// + /// DependencyCount is the number of dependencies between pairs of subpasses. + /// + [FieldOffset(48)] + public int DependencyCount; + + /// + /// Dependencies is a pointer to an array of dependencyCount VkSubpassDependency2 structures describing dependencies between pairs of subpasses. + /// + [FieldOffset(56)] + public VkSubpassDependency2* Dependencies; + + /// + /// CorrelatedViewMaskCount is the number of correlation masks. + /// + [FieldOffset(64)] + public int CorrelatedViewMaskCount; + + /// + /// CorrelatedViewMasks is a pointer to an array of view masks indicating sets of views that may: be more efficient to render concurrently. + /// + [FieldOffset(72)] + public int* CorrelatedViewMasks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationControlEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationControlEXT.gen.cs new file mode 100644 index 0000000..b2bacba --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationControlEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassCreationControlEXT - Control about the creation of render pass or subpass + /// + /// + /// + /// A VkRenderPassCreationControlEXT structure can be included in the + /// pNext chain of VkRenderPassCreateInfo2 or pNext chain of + /// VkSubpassDescription2. + /// The VkRenderPassCreationControlEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef struct VkRenderPassCreationControlEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 disallowMerging; + /// } VkRenderPassCreationControlEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRenderPassCreationControlEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassCreationControlEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisallowMerging is a boolean value indicating whether subpass merging will be disabled. + /// + [FieldOffset(16)] + public Brutal.Bool32 DisallowMerging; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackCreateInfoEXT.gen.cs new file mode 100644 index 0000000..89f2ffc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackCreateInfoEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassCreationFeedbackCreateInfoEXT - Request feedback about the creation of render pass + /// + /// + /// + /// To obtain feedback about the creation of a render pass, include a + /// VkRenderPassCreationFeedbackCreateInfoEXT structure in the pNext + /// chain of VkRenderPassCreateInfo2. + /// The VkRenderPassCreationFeedbackCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef struct VkRenderPassCreationFeedbackCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderPassCreationFeedbackInfoEXT* pRenderPassFeedback; + /// } VkRenderPassCreationFeedbackCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRenderPassCreationFeedbackCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassCreationFeedbackCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RenderPassFeedback is a pointer to a VkRenderPassCreationFeedbackInfoEXT structure in which feedback is returned. + /// + [FieldOffset(16)] + public VkRenderPassCreationFeedbackInfoEXT* RenderPassFeedback; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackInfoEXT.gen.cs new file mode 100644 index 0000000..bb4a310 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassCreationFeedbackInfoEXT.gen.cs @@ -0,0 +1,26 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassCreationFeedbackInfoEXT - Feedback about the creation of a render pass + /// + /// + /// + /// The VkRenderPassCreationFeedbackInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef struct VkRenderPassCreationFeedbackInfoEXT { + /// uint32_t postMergeSubpassCount; + /// } VkRenderPassCreationFeedbackInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkRenderPassCreationFeedbackInfoEXT() + { + /// + /// PostMergeSubpassCount is the subpass count after merge. + /// + [FieldOffset(0)] + public int PostMergeSubpassCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapCreateInfoEXT.gen.cs new file mode 100644 index 0000000..3d5bea4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapCreateInfoEXT.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassFragmentDensityMapCreateInfoEXT - Structure containing fragment density map attachment for render pass + /// + /// + /// + /// If the VkRenderPassCreateInfo::pNext chain includes a + /// VkRenderPassFragmentDensityMapCreateInfoEXT structure, then that + /// structure includes a fragment density map attachment for the render pass. + /// + /// + /// The VkRenderPassFragmentDensityMapCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map + /// typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkAttachmentReference fragmentDensityMapAttachment; + /// } VkRenderPassFragmentDensityMapCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRenderPassFragmentDensityMapCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassFragmentDensityMapCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityMapAttachment is the fragment density map to use for the render pass. + /// + [FieldOffset(16)] + public VkAttachmentReference FragmentDensityMapAttachment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapOffsetEndInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapOffsetEndInfoEXT.gen.cs new file mode 100644 index 0000000..b9334b2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassFragmentDensityMapOffsetEndInfoEXT.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassFragmentDensityMapOffsetEndInfoEXT - Structure specifying fragment density map offset subpass end information + /// + /// + /// + /// [[renderpass-fragmentdensitymapoffsets]] + /// If the VkSubpassEndInfo::pNext chain + /// includes a VkRenderPassFragmentDensityMapOffsetEndInfoEXT structure, + /// then that structure includes an array of fragment density map offsets per + /// layer for the render pass. + /// + /// + /// The VkRenderPassFragmentDensityMapOffsetEndInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map_offset + /// typedef struct VkRenderPassFragmentDensityMapOffsetEndInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t fragmentDensityOffsetCount; + /// const VkOffset2D* pFragmentDensityOffsets; + /// } VkRenderPassFragmentDensityMapOffsetEndInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassFragmentDensityMapOffsetEndInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassFragmentDensityMapOffsetEndInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// FragmentDensityOffsetCount is the number of offsets being specified. + /// + [FieldOffset(16)] + public int FragmentDensityOffsetCount; + + /// + /// FragmentDensityOffsets is a pointer to an array of VkOffset2D structs, each of which describes the offset per layer. + /// + [FieldOffset(24)] + public VkOffset2D* FragmentDensityOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassInputAttachmentAspectCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassInputAttachmentAspectCreateInfo.gen.cs new file mode 100644 index 0000000..7e29735 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassInputAttachmentAspectCreateInfo.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassInputAttachmentAspectCreateInfo - Structure specifying, for a given subpass/input attachment pair, which aspect <i>can</i> be read. + /// + /// + /// + /// The VkRenderPassInputAttachmentAspectCreateInfo structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkRenderPassInputAttachmentAspectCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t aspectReferenceCount; + /// const VkInputAttachmentAspectReference* pAspectReferences; + /// } VkRenderPassInputAttachmentAspectCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassInputAttachmentAspectCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassInputAttachmentAspectCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AspectReferenceCount is the number of elements in the pAspectReferences array. + /// + [FieldOffset(16)] + public int AspectReferenceCount; + + /// + /// AspectReferences is a pointer to an array of aspectReferenceCount VkInputAttachmentAspectReference structures containing a mask describing which aspect(s) can be accessed for a given input attachment within a given subpass. + /// + [FieldOffset(24)] + public VkInputAttachmentAspectReference* AspectReferences; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassMultiviewCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassMultiviewCreateInfo.gen.cs new file mode 100644 index 0000000..7eb021d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassMultiviewCreateInfo.gen.cs @@ -0,0 +1,81 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassMultiviewCreateInfo - Structure containing multiview information for all subpasses + /// + /// + /// + /// If the VkRenderPassCreateInfo::pNext chain includes a + /// VkRenderPassMultiviewCreateInfo structure, then that structure + /// includes an array of view masks, view offsets, and correlation masks for the + /// render pass. + /// + /// + /// The VkRenderPassMultiviewCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkRenderPassMultiviewCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t subpassCount; + /// const uint32_t* pViewMasks; + /// uint32_t dependencyCount; + /// const int32_t* pViewOffsets; + /// uint32_t correlationMaskCount; + /// const uint32_t* pCorrelationMasks; + /// } VkRenderPassMultiviewCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkRenderPassMultiviewCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassMultiviewCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubpassCount is zero or the number of subpasses in the render pass. + /// + [FieldOffset(16)] + public int SubpassCount; + + /// + /// ViewMasks is a pointer to an array of subpassCount view masks, where each mask is a bitfield of view indices describing which views rendering is broadcast to in each subpass, when multiview is enabled. If subpassCount is zero, each view mask is treated as zero. + /// + [FieldOffset(24)] + public int* ViewMasks; + + /// + /// DependencyCount is zero or the number of dependencies in the render pass. + /// + [FieldOffset(32)] + public int DependencyCount; + + /// + /// ViewOffsets is a pointer to an array of dependencyCount view offsets, one for each dependency. If dependencyCount is zero, each dependency's view offset is treated as zero. Each view offset controls which views in the source subpass the views in the destination subpass depend on. + /// + [FieldOffset(40)] + public int* ViewOffsets; + + /// + /// CorrelationMaskCount is zero or the number of correlation masks. + /// + [FieldOffset(48)] + public int CorrelationMaskCount; + + /// + /// CorrelationMasks is a pointer to an array of correlationMaskCount view masks indicating sets of views that may: be more efficient to render concurrently. + /// + [FieldOffset(56)] + public int* CorrelationMasks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassPerformanceCountersByRegionBeginInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassPerformanceCountersByRegionBeginInfoARM.gen.cs new file mode 100644 index 0000000..41f7a8a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassPerformanceCountersByRegionBeginInfoARM.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassPerformanceCountersByRegionBeginInfoARM - Structure specifying per region performance counters + /// + /// + /// + /// The VkRenderPassPerformanceCountersByRegionBeginInfoARM structure is + /// defined as: + /// + /// + /// // Provided by VK_ARM_performance_counters_by_region + /// typedef struct VkRenderPassPerformanceCountersByRegionBeginInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t counterAddressCount; + /// const VkDeviceAddress* pCounterAddresses; + /// VkBool32 serializeRegions; + /// uint32_t counterIndexCount; + /// uint32_t* pCounterIndices; + /// } VkRenderPassPerformanceCountersByRegionBeginInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkRenderPassPerformanceCountersByRegionBeginInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassPerformanceCountersByRegionBeginInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CounterAddressCount is the number of entries in the pCounterAddresses array. + /// + [FieldOffset(16)] + public int CounterAddressCount; + + /// + /// CounterAddresses is a pointer to an array of basetype:VkDeviceAddress where performance counter data will be written. + /// + [FieldOffset(24)] + public VkDeviceAddress* CounterAddresses; + + /// + /// SerializeRegions controls whether the implementation serializes the execution of each region. + /// + [FieldOffset(32)] + public Brutal.Bool32 SerializeRegions; + + /// + /// CounterIndexCount is the number of entries in the pCounterIndices array. + /// + [FieldOffset(36)] + public int CounterIndexCount; + + /// + /// CounterIndices is a pointer to an array of VkPerformanceCounterARM::counterID values, as enumerated by vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM, to enable in this render pass instance. + /// + [FieldOffset(40)] + public int* CounterIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassSampleLocationsBeginInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassSampleLocationsBeginInfoEXT.gen.cs new file mode 100644 index 0000000..564409d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassSampleLocationsBeginInfoEXT.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassSampleLocationsBeginInfoEXT - Structure specifying sample locations to use for the layout transition of custom sample locations compatible depth/stencil attachments + /// + /// + /// + /// The image layout of the depth aspect of a depth/stencil attachment referring + /// to an image created with + /// VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT is dependent + /// on the last sample locations used to render to the image subresource, thus + /// preserving the contents of such depth/stencil attachments across subpass + /// boundaries requires the application to specify these sample locations + /// whenever a layout transition of the attachment may: occur. + /// This information can be provided by adding a + /// VkRenderPassSampleLocationsBeginInfoEXT structure to the pNext + /// chain of VkRenderPassBeginInfo. + /// + /// + /// The VkRenderPassSampleLocationsBeginInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkRenderPassSampleLocationsBeginInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t attachmentInitialSampleLocationsCount; + /// const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations; + /// uint32_t postSubpassSampleLocationsCount; + /// const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations; + /// } VkRenderPassSampleLocationsBeginInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkRenderPassSampleLocationsBeginInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassSampleLocationsBeginInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AttachmentInitialSampleLocationsCount is the number of elements in the pAttachmentInitialSampleLocations array. + /// + [FieldOffset(16)] + public int AttachmentInitialSampleLocationsCount; + + /// + /// AttachmentInitialSampleLocations is a pointer to an array of attachmentInitialSampleLocationsCount VkAttachmentSampleLocationsEXT structures specifying the attachment indices and their corresponding sample location state. Each element of pAttachmentInitialSampleLocations can specify the sample location state to use in the automatic layout transition performed to transition a depth/stencil attachment from the initial layout of the attachment to the image layout specified for the attachment in the first subpass using it. + /// + [FieldOffset(24)] + public VkAttachmentSampleLocationsEXT* AttachmentInitialSampleLocations; + + /// + /// PostSubpassSampleLocationsCount is the number of elements in the pPostSubpassSampleLocations array. + /// + [FieldOffset(32)] + public int PostSubpassSampleLocationsCount; + + /// + /// PostSubpassSampleLocations is a pointer to an array of postSubpassSampleLocationsCount VkSubpassSampleLocationsEXT structures specifying the subpass indices and their corresponding sample location state. Each element of pPostSubpassSampleLocations can specify the sample location state to use in the automatic layout transition performed to transition the depth/stencil attachment used by the specified subpass to the image layout specified in a dependent subpass or to the final layout of the attachment in case the specified subpass is the last subpass using that attachment. In addition, if VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_FALSE, each element of pPostSubpassSampleLocations must specify the sample location state that matches the sample locations used by all pipelines that will be bound to a command buffer during the specified subpass. If variableSampleLocations is VK_TRUE, the sample locations used for rasterization do not depend on pPostSubpassSampleLocations. + /// + [FieldOffset(40)] + public VkSubpassSampleLocationsEXT* PostSubpassSampleLocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeBeginInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeBeginInfoARM.gen.cs new file mode 100644 index 0000000..469de3d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeBeginInfoARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassStripeBeginInfoARM - Structure specifying striped rendering information + /// + /// + /// + /// The VkRenderPassStripeBeginInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_render_pass_striped + /// typedef struct VkRenderPassStripeBeginInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stripeInfoCount; + /// const VkRenderPassStripeInfoARM* pStripeInfos; + /// } VkRenderPassStripeBeginInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassStripeBeginInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassStripeBeginInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StripeInfoCount is the number of stripes in this render pass instance + /// + [FieldOffset(16)] + public int StripeInfoCount; + + /// + /// StripeInfos is a pointer to an array of stripeInfoCount VkRenderPassStripeInfoARM structures describing the stripes used by the render pass instance. + /// + [FieldOffset(24)] + public VkRenderPassStripeInfoARM* StripeInfos; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeInfoARM.gen.cs new file mode 100644 index 0000000..63a7dd5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassStripeInfoARM - Structure specifying per rendering stripe information + /// + /// + /// + /// The VkRenderPassStripeInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_render_pass_striped + /// typedef struct VkRenderPassStripeInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkRect2D stripeArea; + /// } VkRenderPassStripeInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassStripeInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassStripeInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StripeArea is the stripe area, and is described in more detail below. + /// + [FieldOffset(16)] + public VkRect2D StripeArea; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeSubmitInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeSubmitInfoARM.gen.cs new file mode 100644 index 0000000..6f6067c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassStripeSubmitInfoARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassStripeSubmitInfoARM - Structure specifying striped rendering submit information + /// + /// + /// + /// The VkRenderPassStripeSubmitInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_render_pass_striped + /// typedef struct VkRenderPassStripeSubmitInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stripeSemaphoreInfoCount; + /// const VkSemaphoreSubmitInfo* pStripeSemaphoreInfos; + /// } VkRenderPassStripeSubmitInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassStripeSubmitInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassStripeSubmitInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StripeSemaphoreInfoCount is the number of semaphores used to signal stripe completion in the render pass instances in the submitted command buffer. + /// + [FieldOffset(16)] + public int StripeSemaphoreInfoCount; + + /// + /// StripeSemaphoreInfos is a pointer to an array of stripeSemaphoreInfoCount VkSemaphoreSubmitInfo structures describing the semaphores used to signal stripe completion. + /// + [FieldOffset(24)] + public VkSemaphoreSubmitInfo* StripeSemaphoreInfos; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackCreateInfoEXT.gen.cs new file mode 100644 index 0000000..2720363 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackCreateInfoEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassSubpassFeedbackCreateInfoEXT - Request for feedback about the creation of subpass + /// + /// + /// + /// Feedback about the creation of a subpass can be obtained by including a + /// VkRenderPassSubpassFeedbackCreateInfoEXT structure in the pNext + /// chain of VkSubpassDescription2. + /// VkRenderPassSubpassFeedbackCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef struct VkRenderPassSubpassFeedbackCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderPassSubpassFeedbackInfoEXT* pSubpassFeedback; + /// } VkRenderPassSubpassFeedbackCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRenderPassSubpassFeedbackCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassSubpassFeedbackCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubpassFeedback is a pointer to a VkRenderPassSubpassFeedbackInfoEXT structure in which feedback is returned. + /// + [FieldOffset(16)] + public VkRenderPassSubpassFeedbackInfoEXT* SubpassFeedback; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackInfoEXT.gen.cs new file mode 100644 index 0000000..f538f23 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassSubpassFeedbackInfoEXT.gen.cs @@ -0,0 +1,38 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassSubpassFeedbackInfoEXT - Feedback about the creation of subpass + /// + /// + /// + /// The VkRenderPassSubpassFeedbackInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_subpass_merge_feedback + /// typedef struct VkRenderPassSubpassFeedbackInfoEXT { + /// VkSubpassMergeStatusEXT subpassMergeStatus; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// uint32_t postMergeIndex; + /// } VkRenderPassSubpassFeedbackInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 264)] + public unsafe partial struct VkRenderPassSubpassFeedbackInfoEXT() + { + /// + /// SubpassMergeStatus is a VkSubpassMergeStatusEXT value specifying information about whether the subpass is merged with the previous subpass and the reason why it is not merged. + /// + [FieldOffset(0)] + public VkSubpassMergeStatusEXT SubpassMergeStatus; + + /// + [FieldOffset(4)] + public fixed byte Description[256]; + + /// + /// PostMergeIndex is the subpass index after the subpass merging. + /// + [FieldOffset(260)] + public int PostMergeIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassTileShadingCreateInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassTileShadingCreateInfoQCOM.gen.cs new file mode 100644 index 0000000..e42b8b2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassTileShadingCreateInfoQCOM.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassTileShadingCreateInfoQCOM - Structure specifying, tile shading information for a render pass object. + /// + /// + /// + /// To enable tile shading for a render pass object, add a + /// VkRenderPassTileShadingCreateInfoQCOM to the pNext chain of + /// VkRenderPassCreateInfo + /// . + /// To execute a secondary command buffer within a render pass, add a + /// VkRenderPassTileShadingCreateInfoQCOM to the pNext chain of + /// VkCommandBufferInheritanceInfo when the secondary command buffer is + /// recorded. + /// + /// + /// The VkRenderPassTileShadingCreateInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_shading + /// typedef struct VkRenderPassTileShadingCreateInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTileShadingRenderPassFlagsQCOM flags; + /// VkExtent2D tileApronSize; + /// } VkRenderPassTileShadingCreateInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderPassTileShadingCreateInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassTileShadingCreateInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkTileShadingRenderPassFlagsQCOM. + /// + [FieldOffset(16)] + public VkTileShadingRenderPassFlagsQCOM Flags; + + /// + /// TileApronSize is a VkExtent2D describing the is size of the tiling apron^ in each dimension. + /// + [FieldOffset(20)] + public VkExtent2D TileApronSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderPassTransformBeginInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderPassTransformBeginInfoQCOM.gen.cs new file mode 100644 index 0000000..eeafabe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderPassTransformBeginInfoQCOM.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderPassTransformBeginInfoQCOM - Structure describing transform parameters of a render pass instance + /// + /// + /// + /// To begin a render pass instance with render pass transform^ enabled, add the + /// VkRenderPassTransformBeginInfoQCOM to the pNext chain of + /// VkRenderPassBeginInfo structure passed to the + /// vkCmdBeginRenderPass command specifying the render pass transform. + /// + /// + /// The VkRenderPassTransformBeginInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_render_pass_transform + /// typedef struct VkRenderPassTransformBeginInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkSurfaceTransformFlagBitsKHR transform; + /// } VkRenderPassTransformBeginInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRenderPassTransformBeginInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderPassTransformBeginInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Transform is a VkSurfaceTransformFlagsKHR value describing the transform to be applied to rasterization. + /// + [FieldOffset(16)] + public VkSurfaceTransformFlagsKHR Transform; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingAreaInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingAreaInfo.gen.cs new file mode 100644 index 0000000..2f6a640 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingAreaInfo.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingAreaInfo - Structure describing rendering area granularity query info + /// + /// + /// + /// The VkRenderingAreaInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkRenderingAreaInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t viewMask; + /// uint32_t colorAttachmentCount; + /// const VkFormat* pColorAttachmentFormats; + /// VkFormat depthAttachmentFormat; + /// VkFormat stencilAttachmentFormat; + /// } VkRenderingAreaInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkRenderingAreaInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingAreaInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ViewMask is the viewMask used for rendering. + /// + [FieldOffset(16)] + public int ViewMask; + + /// + /// ColorAttachmentCount is the number of entries in pColorAttachmentFormats + /// + [FieldOffset(20)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentFormats is a pointer to an array of VkFormat values defining the format of color attachments used in the render pass instance. + /// + [FieldOffset(24)] + public VkFormat* ColorAttachmentFormats; + + /// + /// DepthAttachmentFormat is a VkFormat value defining the format of the depth attachment used in the render pass instance. + /// + [FieldOffset(32)] + public VkFormat DepthAttachmentFormat; + + /// + /// StencilAttachmentFormat is a VkFormat value defining the format of the stencil attachment used in the render pass instance. + /// + [FieldOffset(36)] + public VkFormat StencilAttachmentFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentFlagsInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentFlagsInfoKHR.gen.cs new file mode 100644 index 0000000..affc82d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentFlagsInfoKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingAttachmentFlagsInfoKHR - Structure specifying flags extending a rendering attachment + /// + /// + /// + /// To specify an attachment as an input attachment or to specify resolve + /// operation flags, the VkRenderingAttachmentFlagsInfoKHR structure can + /// be added to the pNext chain of VkRenderingAttachmentInfo. + /// + /// + /// The VkRenderingAttachmentFlagsInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef struct VkRenderingAttachmentFlagsInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderingAttachmentFlagsKHR flags; + /// } VkRenderingAttachmentFlagsInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkRenderingAttachmentFlagsInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingAttachmentFlagsInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkRenderingAttachmentFlagsKHR + /// + [FieldOffset(16)] + public VkRenderingAttachmentFlagsKHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentInfo.gen.cs new file mode 100644 index 0000000..aa57377 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentInfo.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingAttachmentInfo - Structure specifying attachment information + /// + /// + /// + /// The VkRenderingAttachmentInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkRenderingAttachmentInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageView imageView; + /// VkImageLayout imageLayout; + /// VkResolveModeFlagBits resolveMode; + /// VkImageView resolveImageView; + /// VkImageLayout resolveImageLayout; + /// VkAttachmentLoadOp loadOp; + /// VkAttachmentStoreOp storeOp; + /// VkClearValue clearValue; + /// } VkRenderingAttachmentInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkRenderingAttachmentInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingAttachmentInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageView is the image view that will be used for rendering. + /// + [FieldOffset(16)] + public VkImageView ImageView; + + /// + /// ImageLayout is the layout that imageView will be in during rendering. + /// + [FieldOffset(24)] + public VkImageLayout ImageLayout; + + /// + /// ResolveMode is a VkResolveModeFlags value defining how data written to imageView will be resolved into resolveImageView. + /// + [FieldOffset(28)] + public VkResolveModeFlags ResolveMode; + + /// + /// ResolveImageView is an image view used to write resolved data at the end of rendering. + /// + [FieldOffset(32)] + public VkImageView ResolveImageView; + + /// + /// ResolveImageLayout is the layout that resolveImageView will be in during rendering. + /// + [FieldOffset(40)] + public VkImageLayout ResolveImageLayout; + + /// + /// LoadOp is a VkAttachmentLoadOp value defining the load operation^ for the attachment. + /// + [FieldOffset(44)] + public VkAttachmentLoadOp LoadOp; + + /// + /// StoreOp is a VkAttachmentStoreOp value defining the store operation^ for the attachment. + /// + [FieldOffset(48)] + public VkAttachmentStoreOp StoreOp; + + /// + /// ClearValue is a VkClearValue structure defining values used to clear imageView when loadOp is VK_ATTACHMENT_LOAD_OP_CLEAR. + /// + [FieldOffset(52)] + public VkClearValue ClearValue; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentLocationInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentLocationInfo.gen.cs new file mode 100644 index 0000000..bb1f597 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingAttachmentLocationInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingAttachmentLocationInfo - Structure specifying attachment locations + /// + /// + /// + /// The VkRenderingAttachmentLocationInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkRenderingAttachmentLocationInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t colorAttachmentCount; + /// const uint32_t* pColorAttachmentLocations; + /// } VkRenderingAttachmentLocationInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderingAttachmentLocationInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingAttachmentLocationInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ColorAttachmentCount is the number of elements in pColorAttachmentLocations. + /// + [FieldOffset(16)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentLocations is a pointer to an array of colorAttachmentCount uint32_t values defining remapped locations for color attachments. + /// + [FieldOffset(24)] + public int* ColorAttachmentLocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingEndInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingEndInfoKHR.gen.cs new file mode 100644 index 0000000..6ba9f1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingEndInfoKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingEndInfoKHR - Structure specifying render pass end information + /// + /// + /// + /// The VkRenderingEndInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef struct VkRenderingEndInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// } VkRenderingEndInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkRenderingEndInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingEndInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingFragmentDensityMapAttachmentInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingFragmentDensityMapAttachmentInfoEXT.gen.cs new file mode 100644 index 0000000..5eb463a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingFragmentDensityMapAttachmentInfoEXT.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingFragmentDensityMapAttachmentInfoEXT - Structure specifying fragment shading rate attachment information + /// + /// + /// + /// The VkRenderingFragmentDensityMapAttachmentInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_fragment_density_map with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// typedef struct VkRenderingFragmentDensityMapAttachmentInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageView imageView; + /// VkImageLayout imageLayout; + /// } VkRenderingFragmentDensityMapAttachmentInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkRenderingFragmentDensityMapAttachmentInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingFragmentDensityMapAttachmentInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageView is the image view that will be used as a fragment density map attachment. + /// + [FieldOffset(16)] + public VkImageView ImageView; + + /// + /// ImageLayout is the layout that imageView will be in during rendering. + /// + [FieldOffset(24)] + public VkImageLayout ImageLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingFragmentShadingRateAttachmentInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingFragmentShadingRateAttachmentInfoKHR.gen.cs new file mode 100644 index 0000000..766cc69 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingFragmentShadingRateAttachmentInfoKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingFragmentShadingRateAttachmentInfoKHR - Structure specifying fragment shading rate attachment information + /// + /// + /// + /// The VkRenderingFragmentShadingRateAttachmentInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_fragment_shading_rate with VK_VERSION_1_3 or VK_KHR_dynamic_rendering + /// typedef struct VkRenderingFragmentShadingRateAttachmentInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageView imageView; + /// VkImageLayout imageLayout; + /// VkExtent2D shadingRateAttachmentTexelSize; + /// } VkRenderingFragmentShadingRateAttachmentInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkRenderingFragmentShadingRateAttachmentInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingFragmentShadingRateAttachmentInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ImageView is the image view that will be used as a fragment shading rate attachment. + /// + [FieldOffset(16)] + public VkImageView ImageView; + + /// + /// ImageLayout is the layout that imageView will be in during rendering. + /// + [FieldOffset(24)] + public VkImageLayout ImageLayout; + + /// + /// ShadingRateAttachmentTexelSize specifies the number of pixels corresponding to each texel in imageView. + /// + [FieldOffset(28)] + public VkExtent2D ShadingRateAttachmentTexelSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingInfo.gen.cs new file mode 100644 index 0000000..0b681a1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingInfo.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingInfo - Structure specifying render pass instance begin info + /// + /// + /// + /// The VkRenderingInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkRenderingInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkRenderingFlags flags; + /// VkRect2D renderArea; + /// uint32_t layerCount; + /// uint32_t viewMask; + /// uint32_t colorAttachmentCount; + /// const VkRenderingAttachmentInfo* pColorAttachments; + /// const VkRenderingAttachmentInfo* pDepthAttachment; + /// const VkRenderingAttachmentInfo* pStencilAttachment; + /// } VkRenderingInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkRenderingInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkRenderingFlags. + /// + [FieldOffset(16)] + public VkRenderingFlags Flags; + + /// + /// RenderArea is the render area that is affected by the render pass instance. + /// + [FieldOffset(20)] + public VkRect2D RenderArea; + + /// + /// LayerCount is the number of layers rendered to in each attachment when viewMask is `0`. + /// + [FieldOffset(36)] + public int LayerCount; + + /// + /// ViewMask is a bitfield of view indices describing which views are active during rendering, when it is not `0`. + /// + [FieldOffset(40)] + public int ViewMask; + + /// + /// ColorAttachmentCount is the number of elements in pColorAttachments. + /// + [FieldOffset(44)] + public int ColorAttachmentCount; + + /// + /// ColorAttachments is a pointer to an array of colorAttachmentCount VkRenderingAttachmentInfo structures describing any color attachments used. + /// + [FieldOffset(48)] + public VkRenderingAttachmentInfo* ColorAttachments; + + /// + /// DepthAttachment is a pointer to a VkRenderingAttachmentInfo structure describing a depth attachment. + /// + [FieldOffset(56)] + public VkRenderingAttachmentInfo* DepthAttachment; + + /// + /// StencilAttachment is a pointer to a VkRenderingAttachmentInfo structure describing a stencil attachment. + /// + [FieldOffset(64)] + public VkRenderingAttachmentInfo* StencilAttachment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkRenderingInputAttachmentIndexInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkRenderingInputAttachmentIndexInfo.gen.cs new file mode 100644 index 0000000..14795b5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkRenderingInputAttachmentIndexInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkRenderingInputAttachmentIndexInfo - Structure specifying input attachment indices + /// + /// + /// + /// The VkRenderingInputAttachmentIndexInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkRenderingInputAttachmentIndexInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t colorAttachmentCount; + /// const uint32_t* pColorAttachmentInputIndices; + /// const uint32_t* pDepthInputAttachmentIndex; + /// const uint32_t* pStencilInputAttachmentIndex; + /// } VkRenderingInputAttachmentIndexInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkRenderingInputAttachmentIndexInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.RenderingInputAttachmentIndexInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ColorAttachmentCount is the number of elements in pColorAttachmentInputIndices. + /// + [FieldOffset(16)] + public int ColorAttachmentCount; + + /// + /// ColorAttachmentInputIndices is a pointer to an array of colorAttachmentCount uint32_t values defining indices for color attachments to be used as input attachments. + /// + [FieldOffset(24)] + public int* ColorAttachmentInputIndices; + + /// + /// DepthInputAttachmentIndex is either `NULL`, or a pointer to a uint32_t value defining the index for the depth attachment to be used as an input attachment. + /// + [FieldOffset(32)] + public int* DepthInputAttachmentIndex; + + /// + /// StencilInputAttachmentIndex is either `NULL`, or a pointer to a uint32_t value defining the index for the stencil attachment to be used as an input attachment. + /// + [FieldOffset(40)] + public int* StencilInputAttachmentIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkResolveImageInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkResolveImageInfo2.gen.cs new file mode 100644 index 0000000..3526097 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkResolveImageInfo2.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResolveImageInfo2 - Structure specifying parameters of resolve image command + /// + /// + /// + /// :refpage: VkResolveImageInfo2 + /// + /// + /// The VkResolveImageInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkResolveImageInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkImage srcImage; + /// VkImageLayout srcImageLayout; + /// VkImage dstImage; + /// VkImageLayout dstImageLayout; + /// uint32_t regionCount; + /// const VkImageResolve2* pRegions; + /// } VkResolveImageInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkResolveImageInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ResolveImageInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcImage is the source image. + /// + [FieldOffset(16)] + public VkImage SrcImage; + + /// + /// SrcImageLayout is the layout of the source image subresources for the resolve. + /// + [FieldOffset(24)] + public VkImageLayout SrcImageLayout; + + /// + /// DstImage is the destination image. + /// + [FieldOffset(32)] + public VkImage DstImage; + + /// + /// DstImageLayout is the layout of the destination image subresources for the resolve. + /// + [FieldOffset(40)] + public VkImageLayout DstImageLayout; + + /// + /// RegionCount is the number of regions to resolve. + /// + [FieldOffset(44)] + public int RegionCount; + + /// + /// Regions is a pointer to an array of VkImageResolve2 structures specifying the regions to resolve. + /// + [FieldOffset(48)] + public VkImageResolve2* Regions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkResolveImageModeInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkResolveImageModeInfoKHR.gen.cs new file mode 100644 index 0000000..6f7a432 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkResolveImageModeInfoKHR.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResolveImageModeInfoKHR - Structure specifying additional control for VkResolveImageInfo2 + /// + /// + /// + /// :refpage: VkResolveImageModeInfoKHR + /// + /// + /// The VkResolveImageModeInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance10 + /// typedef struct VkResolveImageModeInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkResolveImageFlagsKHR flags; + /// VkResolveModeFlagBits resolveMode; + /// VkResolveModeFlagBits stencilResolveMode; + /// } VkResolveImageModeInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkResolveImageModeInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ResolveImageModeInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkResolveImageFlagsKHR. + /// + [FieldOffset(16)] + public VkResolveImageFlagsKHR Flags; + + /// + /// ResolveMode is a VkResolveModeFlags value defining how srcImage will be resolved into dstImage when resolving non-stencil values. + /// + [FieldOffset(20)] + public VkResolveModeFlags ResolveMode; + + /// + /// StencilResolveMode is a VkResolveModeFlags value defining how srcImage will be resolved into dstImage when resolving stencil values. + /// + [FieldOffset(24)] + public VkResolveModeFlags StencilResolveMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkResourceDescriptorDataEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkResourceDescriptorDataEXT.gen.cs new file mode 100644 index 0000000..b95f5ee --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkResourceDescriptorDataEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResourceDescriptorDataEXT - Union specifying resource descriptor types + /// + /// + /// + /// The VkResourceDescriptorDataEXT union is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef union VkResourceDescriptorDataEXT { + /// const VkImageDescriptorInfoEXT* pImage; + /// const VkTexelBufferDescriptorInfoEXT* pTexelBuffer; + /// const VkDeviceAddressRangeEXT* pAddressRange; + /// const VkTensorViewCreateInfoARM* pTensorARM; + /// } VkResourceDescriptorDataEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public unsafe partial struct VkResourceDescriptorDataEXT() + { + /// + /// Image is a pointer to a VkImageDescriptorInfoEXT structure. + /// + [FieldOffset(0)] + public VkImageDescriptorInfoEXT* Image; + + /// + /// TexelBuffer is a pointer to a VkTexelBufferDescriptorInfoEXT structure. + /// + [FieldOffset(0)] + public VkTexelBufferDescriptorInfoEXT* TexelBuffer; + + /// + /// AddressRange is a pointer to a VkDeviceAddressRangeKHR structure. + /// + [FieldOffset(0)] + public VkDeviceAddressRangeEXT* AddressRange; + + /// + /// TensorARM + /// + [FieldOffset(0)] + public VkTensorViewCreateInfoARM* TensorARM; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkResourceDescriptorInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkResourceDescriptorInfoEXT.gen.cs new file mode 100644 index 0000000..fc33281 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkResourceDescriptorInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkResourceDescriptorInfoEXT - Structure describing a resource descriptor + /// + /// + /// + /// VkResourceDescriptorInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkResourceDescriptorInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorType type; + /// VkResourceDescriptorDataEXT data; + /// } VkResourceDescriptorInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkResourceDescriptorInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ResourceDescriptorInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Type is the type of descriptor to get. + /// + [FieldOffset(16)] + public VkDescriptorType Type; + + /// + /// Data is a VkResourceDescriptorDataEXT union defining the properties of a resource descriptor according to type + /// + [FieldOffset(24)] + public VkResourceDescriptorDataEXT Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSRTDataNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSRTDataNV.gen.cs new file mode 100644 index 0000000..cffd45f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSRTDataNV.gen.cs @@ -0,0 +1,134 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSRTDataNV - Structure specifying a transform in SRT decomposition + /// + /// + /// + /// :refpage: VkSRTDataNV + /// + /// + /// An acceleration structure SRT transform is defined by the structure: + /// + /// + /// // Provided by VK_NV_ray_tracing_motion_blur + /// typedef struct VkSRTDataNV { + /// float sx; + /// float a; + /// float b; + /// float pvx; + /// float sy; + /// float c; + /// float pvy; + /// float sz; + /// float pvz; + /// float qx; + /// float qy; + /// float qz; + /// float qw; + /// float tx; + /// float ty; + /// float tz; + /// } VkSRTDataNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct VkSRTDataNV() + { + /// + /// Sx is the x component of the scale of the transform + /// + [FieldOffset(0)] + public float Sx; + + /// + /// A is one component of the shear for the transform + /// + [FieldOffset(4)] + public float A; + + /// + /// B is one component of the shear for the transform + /// + [FieldOffset(8)] + public float B; + + /// + /// Pvx is the x component of the pivot point of the transform + /// + [FieldOffset(12)] + public float Pvx; + + /// + /// Sy is the y component of the scale of the transform + /// + [FieldOffset(16)] + public float Sy; + + /// + /// C is one component of the shear for the transform + /// + [FieldOffset(20)] + public float C; + + /// + /// Pvy is the y component of the pivot point of the transform + /// + [FieldOffset(24)] + public float Pvy; + + /// + /// Sz is the z component of the scale of the transform + /// + [FieldOffset(28)] + public float Sz; + + /// + /// Pvz is the z component of the pivot point of the transform + /// + [FieldOffset(32)] + public float Pvz; + + /// + /// Qx is the x component of the rotation quaternion + /// + [FieldOffset(36)] + public float Qx; + + /// + /// Qy is the y component of the rotation quaternion + /// + [FieldOffset(40)] + public float Qy; + + /// + /// Qz is the z component of the rotation quaternion + /// + [FieldOffset(44)] + public float Qz; + + /// + /// Qw is the w component of the rotation quaternion + /// + [FieldOffset(48)] + public float Qw; + + /// + /// Tx is the x component of the post-rotation translation + /// + [FieldOffset(52)] + public float Tx; + + /// + /// Ty is the y component of the post-rotation translation + /// + [FieldOffset(56)] + public float Ty; + + /// + /// Tz is the z component of the post-rotation translation + /// + [FieldOffset(60)] + public float Tz; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSampleLocationEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSampleLocationEXT.gen.cs new file mode 100644 index 0000000..528be81 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSampleLocationEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSampleLocationEXT - Structure specifying the coordinates of a sample location + /// + /// + /// + /// The VkSampleLocationEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkSampleLocationEXT { + /// float x; + /// float y; + /// } VkSampleLocationEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkSampleLocationEXT() + { + /// + /// X is the horizontal coordinate of the sample's location. + /// + [FieldOffset(0)] + public float X; + + /// + /// Y is the vertical coordinate of the sample's location. + /// + [FieldOffset(4)] + public float Y; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSampleLocationsInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSampleLocationsInfoEXT.gen.cs new file mode 100644 index 0000000..118743f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSampleLocationsInfoEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSampleLocationsInfoEXT - Structure specifying a set of sample locations + /// + /// + /// + /// The VkSampleLocationsInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkSampleLocationsInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkSampleCountFlagBits sampleLocationsPerPixel; + /// VkExtent2D sampleLocationGridSize; + /// uint32_t sampleLocationsCount; + /// const VkSampleLocationEXT* pSampleLocations; + /// } VkSampleLocationsInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSampleLocationsInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SampleLocationsInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SampleLocationsPerPixel is a VkSampleCountFlags value specifying the number of sample locations per pixel. + /// + [FieldOffset(16)] + public VkSampleCountFlags SampleLocationsPerPixel; + + /// + /// SampleLocationGridSize is the size of the sample location grid to select custom sample locations for. + /// + [FieldOffset(20)] + public VkExtent2D SampleLocationGridSize; + + /// + /// SampleLocationsCount is the number of sample locations in pSampleLocations. + /// + [FieldOffset(28)] + public int SampleLocationsCount; + + /// + /// SampleLocations is a pointer to an array of sampleLocationsCount VkSampleLocationEXT structures. + /// + [FieldOffset(32)] + public VkSampleLocationEXT* SampleLocations; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerBlockMatchWindowCreateInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerBlockMatchWindowCreateInfoQCOM.gen.cs new file mode 100644 index 0000000..aa8a4f2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerBlockMatchWindowCreateInfoQCOM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerBlockMatchWindowCreateInfoQCOM - Structure specifying the block match window parameters + /// + /// + /// + /// The VkSamplerBlockMatchWindowCreateInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_image_processing2 + /// typedef struct VkSamplerBlockMatchWindowCreateInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkExtent2D windowExtent; + /// VkBlockMatchWindowCompareModeQCOM windowCompareMode; + /// } VkSamplerBlockMatchWindowCreateInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSamplerBlockMatchWindowCreateInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerBlockMatchWindowCreateInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WindowExtent is a VkExtent2D specifying a the width and height of the block match window. + /// + [FieldOffset(16)] + public VkExtent2D WindowExtent; + + /// + /// WindowCompareMode is a VkBlockMatchWindowCompareModeQCOM specifying the compare mode. + /// + [FieldOffset(24)] + public VkBlockMatchWindowCompareModeQCOM WindowCompareMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerBorderColorComponentMappingCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerBorderColorComponentMappingCreateInfoEXT.gen.cs new file mode 100644 index 0000000..5af0674 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerBorderColorComponentMappingCreateInfoEXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerBorderColorComponentMappingCreateInfoEXT - Structure specifying the component mapping of the border color + /// + /// + /// + /// If the sampler is created with VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, + /// VK_BORDER_COLOR_INT_OPAQUE_BLACK, + /// VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, or + /// VK_BORDER_COLOR_INT_CUSTOM_EXT borderColor, and that sampler + /// will be combined with an image view that does not have an + /// identity swizzle^, and + /// VkPhysicalDeviceBorderColorSwizzleFeaturesEXT::borderColorSwizzleFromImage + /// is not enabled, then it is necessary to specify the component mapping of the + /// border color, by including the + /// VkSamplerBorderColorComponentMappingCreateInfoEXT structure in the + /// VkSamplerCreateInfo::pNext chain, to get defined results. + /// + /// + /// The VkSamplerBorderColorComponentMappingCreateInfoEXT structure is + /// defined as: + /// + /// + /// // Provided by VK_EXT_border_color_swizzle + /// typedef struct VkSamplerBorderColorComponentMappingCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkComponentMapping components; + /// VkBool32 srgb; + /// } VkSamplerBorderColorComponentMappingCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSamplerBorderColorComponentMappingCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerBorderColorComponentMappingCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Components is a VkComponentMapping structure specifying a remapping of the border color components. + /// + [FieldOffset(16)] + public VkComponentMapping Components; + + /// + /// SRGB indicates that the sampler will be combined with an image view that has an image format which is sRGB encoded. + /// + [FieldOffset(32)] + public Brutal.Bool32 SRGB; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerCaptureDescriptorDataInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerCaptureDescriptorDataInfoEXT.gen.cs new file mode 100644 index 0000000..135ba49 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerCaptureDescriptorDataInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerCaptureDescriptorDataInfoEXT - Structure specifying a sampler for descriptor capture + /// + /// + /// + /// Information about the sampler to get descriptor buffer capture data for is + /// passed in a VkSamplerCaptureDescriptorDataInfoEXT structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer + /// typedef struct VkSamplerCaptureDescriptorDataInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkSampler sampler; + /// } VkSamplerCaptureDescriptorDataInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerCaptureDescriptorDataInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerCaptureDescriptorDataInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Sampler is the VkSampler handle of the sampler to get opaque capture data for. + /// + [FieldOffset(16)] + public VkSampler Sampler; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerCreateInfo.gen.cs new file mode 100644 index 0000000..c1ead3d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerCreateInfo.gen.cs @@ -0,0 +1,145 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerCreateInfo - Structure specifying parameters of a newly created sampler + /// + /// + /// + /// The VkSamplerCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSamplerCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSamplerCreateFlags flags; + /// VkFilter magFilter; + /// VkFilter minFilter; + /// VkSamplerMipmapMode mipmapMode; + /// VkSamplerAddressMode addressModeU; + /// VkSamplerAddressMode addressModeV; + /// VkSamplerAddressMode addressModeW; + /// float mipLodBias; + /// VkBool32 anisotropyEnable; + /// float maxAnisotropy; + /// VkBool32 compareEnable; + /// VkCompareOp compareOp; + /// float minLod; + /// float maxLod; + /// VkBorderColor borderColor; + /// VkBool32 unnormalizedCoordinates; + /// } VkSamplerCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkSamplerCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkSamplerCreateFlags describing additional parameters of the sampler. + /// + [FieldOffset(16)] + public VkSamplerCreateFlags Flags; + + /// + /// MagFilter is a VkFilter value specifying the magnification filter to apply to lookups. + /// + [FieldOffset(20)] + public VkFilter MagFilter; + + /// + /// MinFilter is a VkFilter value specifying the minification filter to apply to lookups. + /// + [FieldOffset(24)] + public VkFilter MinFilter; + + /// + /// MipmapMode is a VkSamplerMipmapMode value specifying the mipmap filter to apply to lookups. + /// + [FieldOffset(28)] + public VkSamplerMipmapMode MipmapMode; + + /// + /// AddressModeU is a VkSamplerAddressMode value specifying the wrapping operation^ used when the i coordinate used to sample the image would be out of bounds. + /// + [FieldOffset(32)] + public VkSamplerAddressMode AddressModeU; + + /// + /// AddressModeV is a VkSamplerAddressMode value specifying the wrapping operation^ used when the j coordinate used to sample the image would be out of bounds. + /// + [FieldOffset(36)] + public VkSamplerAddressMode AddressModeV; + + /// + /// AddressModeW is a VkSamplerAddressMode value specifying the wrapping operation^ used when the k coordinate used to sample the image would be out of bounds. If unnormalizedCoordinates is VK_TRUE, addressModeW is ignored. + /// + [FieldOffset(40)] + public VkSamplerAddressMode AddressModeW; + + /// + /// MipLodBias + /// + [FieldOffset(44)] + public float MipLodBias; + + /// + /// AnisotropyEnable + /// + [FieldOffset(48)] + public Brutal.Bool32 AnisotropyEnable; + + /// + /// MaxAnisotropy is the anisotropy value clamp used by the sampler when anisotropyEnable is VK_TRUE. If anisotropyEnable is VK_FALSE, maxAnisotropy is ignored. + /// + [FieldOffset(52)] + public float MaxAnisotropy; + + /// + /// CompareEnable is VK_TRUE to enable comparison against a reference value during lookups, or VK_FALSE otherwise. + /// + [FieldOffset(56)] + public Brutal.Bool32 CompareEnable; + + /// + /// CompareOp is a VkCompareOp value specifying the comparison operator to apply to fetched data before filtering as described in the Depth Compare Operation^ section. + /// + [FieldOffset(60)] + public VkCompareOp CompareOp; + + /// + /// MinLod is used to clamp the minimum of the computed LOD value^. + /// + [FieldOffset(64)] + public float MinLod; + + /// + /// MaxLod is used to clamp the maximum of the computed LOD value^. To avoid clamping the maximum value, set maxLod to the constant VK_LOD_CLAMP_NONE. + /// + [FieldOffset(68)] + public float MaxLod; + + /// + /// BorderColor is a VkBorderColor value specifying the predefined border color to use. + /// + [FieldOffset(72)] + public VkBorderColor BorderColor; + + /// + /// UnnormalizedCoordinates + /// + [FieldOffset(76)] + public Brutal.Bool32 UnnormalizedCoordinates; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerCubicWeightsCreateInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerCubicWeightsCreateInfoQCOM.gen.cs new file mode 100644 index 0000000..e0f0000 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerCubicWeightsCreateInfoQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerCubicWeightsCreateInfoQCOM - Structure specifying sampler cubic weights + /// + /// + /// + /// The VkSamplerCubicWeightsCreateInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_filter_cubic_weights + /// typedef struct VkSamplerCubicWeightsCreateInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkCubicFilterWeightsQCOM cubicWeights; + /// } VkSamplerCubicWeightsCreateInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerCubicWeightsCreateInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerCubicWeightsCreateInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CubicWeights is a VkCubicFilterWeightsQCOM value controlling which cubic weights are used. + /// + [FieldOffset(16)] + public VkCubicFilterWeightsQCOM CubicWeights; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorCreateInfoEXT.gen.cs new file mode 100644 index 0000000..98da695 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorCreateInfoEXT.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerCustomBorderColorCreateInfoEXT - Structure specifying custom border color + /// + /// + /// + /// In addition to the predefined border color values, applications can provide + /// a custom border color value by including the + /// VkSamplerCustomBorderColorCreateInfoEXT structure in the + /// VkSamplerCreateInfo::pNext chain. + /// + /// + /// The VkSamplerCustomBorderColorCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_custom_border_color + /// typedef struct VkSamplerCustomBorderColorCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkClearColorValue customBorderColor; + /// VkFormat format; + /// } VkSamplerCustomBorderColorCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSamplerCustomBorderColorCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerCustomBorderColorCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CustomBorderColor is a VkClearColorValue representing the desired custom sampler border color. + /// + [FieldOffset(16)] + public VkClearColorValue CustomBorderColor; + + /// + /// Format is a VkFormat representing the format of the sampled image view(s). This field may be VK_FORMAT_UNDEFINED if the customBorderColorWithoutFormat^ feature is enabled. + /// + [FieldOffset(32)] + public VkFormat Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorIndexCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorIndexCreateInfoEXT.gen.cs new file mode 100644 index 0000000..c3c9f17 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerCustomBorderColorIndexCreateInfoEXT.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerCustomBorderColorIndexCreateInfoEXT - Structure specifying the custom border color index for a sampler + /// + /// + /// + /// The VkSamplerCustomBorderColorIndexCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap + /// typedef struct VkSamplerCustomBorderColorIndexCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t index; + /// } VkSamplerCustomBorderColorIndexCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerCustomBorderColorIndexCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerCustomBorderColorIndexCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Index is the uint32_t index value to use with the sampler + /// + [FieldOffset(16)] + public int Index; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerReductionModeCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerReductionModeCreateInfo.gen.cs new file mode 100644 index 0000000..052e57d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerReductionModeCreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerReductionModeCreateInfo - Structure specifying sampler reduction mode + /// + /// + /// + /// The VkSamplerReductionModeCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSamplerReductionModeCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSamplerReductionMode reductionMode; + /// } VkSamplerReductionModeCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerReductionModeCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerReductionModeCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ReductionMode is a VkSamplerReductionMode value controlling how texture filtering combines texel values. + /// + [FieldOffset(16)] + public VkSamplerReductionMode ReductionMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionCreateInfo.gen.cs new file mode 100644 index 0000000..ee99c1c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionCreateInfo.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrConversionCreateInfo - Structure specifying the parameters of the newly created conversion + /// + /// + /// + /// The VkSamplerYcbcrConversionCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkSamplerYcbcrConversionCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat format; + /// VkSamplerYcbcrModelConversion ycbcrModel; + /// VkSamplerYcbcrRange ycbcrRange; + /// VkComponentMapping components; + /// VkChromaLocation xChromaOffset; + /// VkChromaLocation yChromaOffset; + /// VkFilter chromaFilter; + /// VkBool32 forceExplicitReconstruction; + /// } VkSamplerYcbcrConversionCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkSamplerYCbCrConversionCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerYCbCrConversionCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is the format of the image from which color information will be retrieved. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// YcbcrModel describes the color matrix for conversion between color models. + /// + [FieldOffset(20)] + public VkSamplerYCbCrModelConversion YcbcrModel; + + /// + /// YcbcrRange describes whether the encoded values have headroom and foot room, or whether the encoding uses the full numerical range. + /// + [FieldOffset(24)] + public VkSamplerYCbCrRange YcbcrRange; + + /// + /// Components applies a swizzle based on VkComponentSwizzle enums prior to range expansion and color model conversion. + /// + [FieldOffset(28)] + public VkComponentMapping Components; + + /// + /// XChromaOffset describes the sample location^ associated with downsampled chroma components in the x dimension. xChromaOffset has no effect for formats in which chroma components are not downsampled horizontally. + /// + [FieldOffset(44)] + public VkChromaLocation XChromaOffset; + + /// + /// YChromaOffset describes the sample location^ associated with downsampled chroma components in the y dimension. yChromaOffset has no effect for formats in which the chroma components are not downsampled vertically. + /// + [FieldOffset(48)] + public VkChromaLocation YChromaOffset; + + /// + /// ChromaFilter is the filter for chroma reconstruction. + /// + [FieldOffset(52)] + public VkFilter ChromaFilter; + + /// + /// ForceExplicitReconstruction can be used to ensure that reconstruction is done explicitly, if supported. + /// + [FieldOffset(56)] + public Brutal.Bool32 ForceExplicitReconstruction; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionImageFormatProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionImageFormatProperties.gen.cs new file mode 100644 index 0000000..e080973 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionImageFormatProperties.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrConversionImageFormatProperties - Structure specifying combined image sampler descriptor count for multi-planar images + /// + /// + /// + /// To determine the number of combined image samplers required to support a + /// multi-planar format^, add + /// VkSamplerYcbcrConversionImageFormatProperties to the pNext chain + /// of the VkImageFormatProperties2 structure in a call to + /// vkGetPhysicalDeviceImageFormatProperties2. + /// + /// + /// The VkSamplerYcbcrConversionImageFormatProperties structure is defined + /// as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkSamplerYcbcrConversionImageFormatProperties { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t combinedImageSamplerDescriptorCount; + /// } VkSamplerYcbcrConversionImageFormatProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerYCbCrConversionImageFormatProperties() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerYCbCrConversionImageFormatProperties; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CombinedImageSamplerDescriptorCount is the number of combined image sampler descriptors that the implementation uses to access the format. + /// + [FieldOffset(16)] + public int CombinedImageSamplerDescriptorCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionInfo.gen.cs new file mode 100644 index 0000000..fe38f0a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionInfo.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrConversionInfo - Structure specifying {YCbCr} conversion to a sampler or image view + /// + /// + /// + /// To create a sampler with {YCbCr} conversion enabled, add a + /// VkSamplerYcbcrConversionInfo structure to the pNext chain of the + /// VkSamplerCreateInfo structure. + /// To create a sampler {YCbCr} conversion, the + /// samplerYcbcrConversion^ feature + /// must be enabled. + /// Conversion must be fixed at pipeline creation time, through use of + /// a combined image sampler with an immutable sampler in + /// VkDescriptorSetLayoutBinding. + /// + /// + /// A VkSamplerYcbcrConversionInfo must be provided for samplers to be + /// used with image views that access VK_IMAGE_ASPECT_COLOR_BIT if the + /// format is one of the formats + /// that require a sampler {YCbCr} conversion^ + /// . + /// + /// + /// The VkSamplerYcbcrConversionInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkSamplerYcbcrConversionInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSamplerYcbcrConversion conversion; + /// } VkSamplerYcbcrConversionInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerYCbCrConversionInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerYCbCrConversionInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Conversion is a VkSamplerYcbcrConversion handle created with vkCreateSamplerYcbcrConversion. + /// + [FieldOffset(16)] + public VkSamplerYCbCrConversion Conversion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM.gen.cs new file mode 100644 index 0000000..6aedb63 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM - Structure specifying {YCbCr} degamma parameters + /// + /// + /// + /// Applications can enable sRGB to linear conversion for the R, G, and B + /// components of a {YCbCr} image during sampling^ by + /// including VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM structure + /// in the pNext chain of VkSamplerYcbcrConversionCreateInfo. + /// + /// + /// The VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM structure is + /// defined as: + /// + /// + /// // Provided by VK_QCOM_ycbcr_degamma + /// typedef struct VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 enableYDegamma; + /// VkBool32 enableCbCrDegamma; + /// } VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SamplerYCbCrConversionYCbCrDegammaCreateInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// EnableYDegamma indicates sRGB to linear^ conversion is enabled for the G component. + /// + [FieldOffset(16)] + public Brutal.Bool32 EnableYDegamma; + + /// + /// EnableCbCrDegamma indicates sRGB to linear^ conversion is enabled for the R and B components. + /// + [FieldOffset(20)] + public Brutal.Bool32 EnableCbCrDegamma; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSemaphoreCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSemaphoreCreateInfo.gen.cs new file mode 100644 index 0000000..41da5c4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSemaphoreCreateInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreCreateInfo - Structure specifying parameters of a newly created semaphore + /// + /// + /// + /// The VkSemaphoreCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSemaphoreCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphoreCreateFlags flags; + /// } VkSemaphoreCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSemaphoreCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkSemaphoreCreateFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSemaphoreGetFdInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSemaphoreGetFdInfoKHR.gen.cs new file mode 100644 index 0000000..bdb350f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSemaphoreGetFdInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreGetFdInfoKHR - Structure describing a POSIX FD semaphore export operation + /// + /// + /// + /// The VkSemaphoreGetFdInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_external_semaphore_fd + /// typedef struct VkSemaphoreGetFdInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// VkExternalSemaphoreHandleTypeFlagBits handleType; + /// } VkSemaphoreGetFdInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSemaphoreGetFdInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreGetFdInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is the semaphore from which state will be exported. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// HandleType is a VkExternalSemaphoreHandleTypeFlags value specifying the type of handle requested. + /// + [FieldOffset(24)] + public VkExternalSemaphoreHandleTypeFlags HandleType; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSemaphoreSignalInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSemaphoreSignalInfo.gen.cs new file mode 100644 index 0000000..31719dd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSemaphoreSignalInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreSignalInfo - Structure containing information about a semaphore signal operation + /// + /// + /// + /// The VkSemaphoreSignalInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSemaphoreSignalInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// uint64_t value; + /// } VkSemaphoreSignalInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSemaphoreSignalInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreSignalInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is the handle of the semaphore to signal. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// Value is the value to signal. + /// + [FieldOffset(24)] + public nint Value; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSemaphoreSubmitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSemaphoreSubmitInfo.gen.cs new file mode 100644 index 0000000..72712eb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSemaphoreSubmitInfo.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreSubmitInfo - Structure specifying a semaphore signal or wait operation + /// + /// + /// + /// :refpage: VkSemaphoreSubmitInfo + /// + /// + /// The VkSemaphoreSubmitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkSemaphoreSubmitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphore semaphore; + /// uint64_t value; + /// VkPipelineStageFlags2 stageMask; + /// uint32_t deviceIndex; + /// } VkSemaphoreSubmitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkSemaphoreSubmitInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreSubmitInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Semaphore is a VkSemaphore affected by this operation. + /// + [FieldOffset(16)] + public VkSemaphore Semaphore; + + /// + /// Value is ignored. + /// + [FieldOffset(24)] + public nint Value; + + /// + /// StageMask is a VkPipelineStageFlags2 mask of pipeline stages which limit the first synchronization scope of a semaphore signal operation, or second synchronization scope of a semaphore wait operation as described in the semaphore wait operation^ and semaphore signal operation^ sections of the synchronization chapter^. + /// + [FieldOffset(32)] + public VkPipelineStageFlags2 StageMask; + + /// + /// DeviceIndex is the index of the device within a device group that executes the semaphore wait or signal operation. + /// + [FieldOffset(40)] + public int DeviceIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSemaphoreTypeCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSemaphoreTypeCreateInfo.gen.cs new file mode 100644 index 0000000..58c4da3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSemaphoreTypeCreateInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreTypeCreateInfo - Structure specifying the type of a newly created semaphore + /// + /// + /// + /// The VkSemaphoreTypeCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSemaphoreTypeCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphoreType semaphoreType; + /// uint64_t initialValue; + /// } VkSemaphoreTypeCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSemaphoreTypeCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreTypeCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SemaphoreType is a VkSemaphoreType value specifying the type of the semaphore. + /// + [FieldOffset(16)] + public VkSemaphoreType SemaphoreType; + + /// + /// InitialValue is the initial payload value if semaphoreType is VK_SEMAPHORE_TYPE_TIMELINE. + /// + [FieldOffset(24)] + public nint InitialValue; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSemaphoreWaitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSemaphoreWaitInfo.gen.cs new file mode 100644 index 0000000..8c497ab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSemaphoreWaitInfo.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSemaphoreWaitInfo - Structure containing information about the semaphore wait condition + /// + /// + /// + /// The VkSemaphoreWaitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSemaphoreWaitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSemaphoreWaitFlags flags; + /// uint32_t semaphoreCount; + /// const VkSemaphore* pSemaphores; + /// const uint64_t* pValues; + /// } VkSemaphoreWaitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSemaphoreWaitInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SemaphoreWaitInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkSemaphoreWaitFlags specifying additional parameters for the semaphore wait operation. + /// + [FieldOffset(16)] + public VkSemaphoreWaitFlags Flags; + + /// + /// SemaphoreCount is the number of semaphores to wait on. + /// + [FieldOffset(20)] + public int SemaphoreCount; + + /// + /// Semaphores is a pointer to an array of semaphoreCount semaphore handles to wait on. + /// + [FieldOffset(24)] + public VkSemaphore* Semaphores; + + /// + /// Values is a pointer to an array of semaphoreCount timeline semaphore values. + /// + [FieldOffset(32)] + public nint* Values; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSetDescriptorBufferOffsetsInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSetDescriptorBufferOffsetsInfoEXT.gen.cs new file mode 100644 index 0000000..fdaa278 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSetDescriptorBufferOffsetsInfoEXT.gen.cs @@ -0,0 +1,78 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSetDescriptorBufferOffsetsInfoEXT - Structure specifying descriptor buffer offsets to set in a command buffer + /// + /// + /// + /// :refpage: VkSetDescriptorBufferOffsetsInfoEXT + /// + /// + /// The VkSetDescriptorBufferOffsetsInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer + /// typedef struct VkSetDescriptorBufferOffsetsInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderStageFlags stageFlags; + /// VkPipelineLayout layout; + /// uint32_t firstSet; + /// uint32_t setCount; + /// const uint32_t* pBufferIndices; + /// const VkDeviceSize* pOffsets; + /// } VkSetDescriptorBufferOffsetsInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkSetDescriptorBufferOffsetsInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SetDescriptorBufferOffsetsInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StageFlags is a bitmask of VkShaderStageFlags specifying the shader stages the descriptor sets will be bound to + /// + [FieldOffset(16)] + public VkShaderStageFlags StageFlags; + + /// + /// Layout is a VkPipelineLayout object used to program the bindings. + /// + [FieldOffset(24)] + public VkPipelineLayout Layout; + + /// + /// FirstSet is the number of the first set to be bound. + /// + [FieldOffset(32)] + public int FirstSet; + + /// + /// SetCount is the number of elements in the pBufferIndices and pOffsets arrays. + /// + [FieldOffset(36)] + public int SetCount; + + /// + /// BufferIndices is a pointer to an array of indices into the descriptor buffer binding points set by vkCmdBindDescriptorBuffersEXT. + /// + [FieldOffset(40)] + public int* BufferIndices; + + /// + /// Offsets is a pointer to an array of basetype:VkDeviceSize offsets to apply to the bound descriptor buffers. + /// + [FieldOffset(48)] + public ByteSize64* Offsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSetLatencyMarkerInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSetLatencyMarkerInfoNV.gen.cs new file mode 100644 index 0000000..59bc6e6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSetLatencyMarkerInfoNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSetLatencyMarkerInfoNV - Structure specifying the parameters of vkSetLatencyMarkerNV + /// + /// + /// + /// The VkSetLatencyMarkerInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkSetLatencyMarkerInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t presentID; + /// VkLatencyMarkerNV marker; + /// } VkSetLatencyMarkerInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSetLatencyMarkerInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SetLatencyMarkerInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentID is an application provided value that is used to associate the timestamp with a vkQueuePresentKHR command using for a given present. + /// + [FieldOffset(16)] + public nint PresentID; + + /// + /// Marker is the type of timestamp to be recorded. + /// + [FieldOffset(24)] + public VkLatencyMarkerNV Marker; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSetPresentConfigNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSetPresentConfigNV.gen.cs new file mode 100644 index 0000000..934211a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSetPresentConfigNV.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSetPresentConfigNV - Structure specifying present metering configuration + /// + /// + /// + /// Present Metering evenly paces out the next numFramesPerBatch + /// vkQueuePresentKHR presents. + /// This gives smoother pacing between presents in applications with frame + /// generation integrations. + /// + /// + /// The VkSetPresentConfigNV structure is defined as: + /// + /// + /// // Provided by VK_NV_present_metering + /// typedef struct VkSetPresentConfigNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t numFramesPerBatch; + /// uint32_t presentConfigFeedback; + /// } VkSetPresentConfigNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSetPresentConfigNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SetPresentConfigNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NumFramesPerBatch is the number of frames to batch + /// + [FieldOffset(16)] + public int NumFramesPerBatch; + + /// + /// PresentConfigFeedback will return the success or error status + /// + [FieldOffset(20)] + public int PresentConfigFeedback; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSetStateFlagsIndirectCommandNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSetStateFlagsIndirectCommandNV.gen.cs new file mode 100644 index 0000000..60654a8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSetStateFlagsIndirectCommandNV.gen.cs @@ -0,0 +1,29 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSetStateFlagsIndirectCommandNV - Structure specifying input data for a single state flag command token + /// + /// + /// + /// The VkSetStateFlagsIndirectCommandNV structure specifies the input + /// data for the VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV token. + /// Which state is changed depends on the VkIndirectStateFlagsNV + /// specified at VkIndirectCommandsLayoutNV creation time. + /// + /// + /// // Provided by VK_NV_device_generated_commands + /// typedef struct VkSetStateFlagsIndirectCommandNV { + /// uint32_t data; + /// } VkSetStateFlagsIndirectCommandNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 4)] + public partial struct VkSetStateFlagsIndirectCommandNV() + { + /// + /// Data encodes packed state that this command alters. + /// + [FieldOffset(0)] + public int Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderCreateInfoEXT.gen.cs new file mode 100644 index 0000000..b848e6c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderCreateInfoEXT.gen.cs @@ -0,0 +1,120 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderCreateInfoEXT - Structure specifying parameters of a newly created shader + /// + /// + /// + /// :refpage: VkShaderCreateInfoEXT + /// + /// + /// The VkShaderCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_object + /// typedef struct VkShaderCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderCreateFlagsEXT flags; + /// VkShaderStageFlagBits stage; + /// VkShaderStageFlags nextStage; + /// VkShaderCodeTypeEXT codeType; + /// size_t codeSize; + /// const void* pCode; + /// const char* pName; + /// uint32_t setLayoutCount; + /// const VkDescriptorSetLayout* pSetLayouts; + /// uint32_t pushConstantRangeCount; + /// const VkPushConstantRange* pPushConstantRanges; + /// const VkSpecializationInfo* pSpecializationInfo; + /// } VkShaderCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 96)] + public unsafe partial struct VkShaderCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkShaderCreateFlagsEXT describing additional parameters of the shader. + /// + [FieldOffset(16)] + public VkShaderCreateFlagsEXT Flags; + + /// + /// Stage is a VkShaderStageFlags value specifying a single shader stage. + /// + [FieldOffset(20)] + public VkShaderStageFlags Stage; + + /// + /// NextStage is a bitmask of VkShaderStageFlags specifying which stages can be used as a logically next bound stage when drawing with the shader bound. A value of zero indicates this shader stage must be the last one. + /// + [FieldOffset(24)] + public VkShaderStageFlags NextStage; + + /// + /// CodeType is a VkShaderCodeTypeEXT value specifying the type of the shader code pointed to be pCode. + /// + [FieldOffset(28)] + public VkShaderCodeTypeEXT CodeType; + + /// + /// CodeSize is the size in bytes of the shader code pointed to be pCode. + /// + [FieldOffset(32)] + public nuint CodeSize; + + /// + /// Code is a pointer to the shader code to use to create the shader. + /// + [FieldOffset(40)] + public void* Code; + + /// + /// Name is a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage. + /// + [FieldOffset(48)] + public byte* Name; + + /// + /// SetLayoutCount is the number of descriptor set layouts pointed to by pSetLayouts. + /// + [FieldOffset(56)] + public int SetLayoutCount; + + /// + /// SetLayouts is a pointer to an array of VkDescriptorSetLayout objects used by the shader stage. The implementation must not access these objects outside of the duration of the command this structure is passed to. + /// + [FieldOffset(64)] + public VkDescriptorSetLayout* SetLayouts; + + /// + /// PushConstantRangeCount is the number of push constant ranges pointed to by pPushConstantRanges. + /// + [FieldOffset(72)] + public int PushConstantRangeCount; + + /// + /// PushConstantRanges is a pointer to an array of VkPushConstantRange structures used by the shader stage. + /// + [FieldOffset(80)] + public VkPushConstantRange* PushConstantRanges; + + /// + /// SpecializationInfo is a pointer to a VkSpecializationInfo structure, as described in Specialization Constants^, or `NULL`. + /// + [FieldOffset(88)] + public VkSpecializationInfo* SpecializationInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderDescriptorSetAndBindingMappingInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderDescriptorSetAndBindingMappingInfoEXT.gen.cs new file mode 100644 index 0000000..cd5a22e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderDescriptorSetAndBindingMappingInfoEXT.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderDescriptorSetAndBindingMappingInfoEXT - Structure specifying mappings from shader resources to descriptor heaps + /// + /// + /// + /// :refpage: VkShaderDescriptorSetAndBindingMappingInfoEXT + /// + /// + /// The VkShaderDescriptorSetAndBindingMappingInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkShaderDescriptorSetAndBindingMappingInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t mappingCount; + /// const VkDescriptorSetAndBindingMappingEXT* pMappings; + /// } VkShaderDescriptorSetAndBindingMappingInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkShaderDescriptorSetAndBindingMappingInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderDescriptorSetAndBindingMappingInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MappingCount is the number of elements in pMappings. + /// + [FieldOffset(16)] + public int MappingCount; + + /// + /// Mappings is a pointer to an array of VkDescriptorSetAndBindingMappingEXT structures specifying mappings for a set of descriptors + /// + [FieldOffset(24)] + public VkDescriptorSetAndBindingMappingEXT* Mappings; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationCreateInfoARM.gen.cs new file mode 100644 index 0000000..0f1a7ba --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationCreateInfoARM.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderInstrumentationCreateInfoARM - Structure specifying parameters of a newly created shader instrumentation + /// + /// + /// + /// The VkShaderInstrumentationCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// typedef struct VkShaderInstrumentationCreateInfoARM { + /// VkStructureType sType; + /// void* pNext; + /// } VkShaderInstrumentationCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkShaderInstrumentationCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderInstrumentationCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDataHeaderARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDataHeaderARM.gen.cs new file mode 100644 index 0000000..d34dbed --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDataHeaderARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderInstrumentationMetricDataHeaderARM - Structure describing the header of a metric block + /// + /// + /// + /// The shader instrumentation metrics block header is defined as: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// typedef struct VkShaderInstrumentationMetricDataHeaderARM { + /// uint32_t resultIndex; + /// uint32_t resultSubIndex; + /// VkShaderStageFlags stages; + /// uint32_t basicBlockIndex; + /// } VkShaderInstrumentationMetricDataHeaderARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkShaderInstrumentationMetricDataHeaderARM() + { + /// + /// ResultIndex is the result index of the metric block, as captured when the command was recorded. + /// + [FieldOffset(0)] + public int ResultIndex; + + /// + /// ResultSubIndex is a secondary index with the result index, explained further below. + /// + [FieldOffset(4)] + public int ResultSubIndex; + + /// + /// Stages is a bitfield of VkShaderStageFlags describing the shader stages that the metric block is for. + /// + [FieldOffset(8)] + public VkShaderStageFlags Stages; + + /// + /// BasicBlockIndex is the index of the basic block within the shader that the metric block is for. + /// + [FieldOffset(12)] + public int BasicBlockIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDescriptionARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDescriptionARM.gen.cs new file mode 100644 index 0000000..81b4d32 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderInstrumentationMetricDescriptionARM.gen.cs @@ -0,0 +1,44 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderInstrumentationMetricDescriptionARM - Structure specifying shader instrumentation metric properties + /// + /// + /// + /// The VkShaderInstrumentationMetricDescriptionARM structure is defined + /// as: + /// + /// + /// // Provided by VK_ARM_shader_instrumentation + /// typedef struct VkShaderInstrumentationMetricDescriptionARM { + /// VkStructureType sType; + /// void* pNext; + /// char name[VK_MAX_DESCRIPTION_SIZE]; + /// char description[VK_MAX_DESCRIPTION_SIZE]; + /// } VkShaderInstrumentationMetricDescriptionARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 528)] + public unsafe partial struct VkShaderInstrumentationMetricDescriptionARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderInstrumentationMetricDescriptionARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + [FieldOffset(16)] + public fixed byte Name[256]; + + /// + [FieldOffset(272)] + public fixed byte Description[256]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderModuleCreateInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderModuleCreateInfo.gen.cs new file mode 100644 index 0000000..a107e2b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderModuleCreateInfo.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderModuleCreateInfo - Structure specifying parameters of a newly created shader module + /// + /// + /// + /// :refpage: VkShaderModuleCreateInfo + /// + /// + /// The VkShaderModuleCreateInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkShaderModuleCreateInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkShaderModuleCreateFlags flags; + /// size_t codeSize; + /// const uint32_t* pCode; + /// } VkShaderModuleCreateInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkShaderModuleCreateInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderModuleCreateInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkShaderModuleCreateFlags Flags; + + /// + /// CodeSize is the size, in bytes, of the code pointed to by pCode. + /// + [FieldOffset(24)] + public ByteSize64 CodeSize; + + /// + /// Code is a pointer to code that is used to create the shader module. The type and format of the code is determined from the content of the memory addressed by pCode. + /// + [FieldOffset(32)] + public int* Code; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderModuleIdentifierEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderModuleIdentifierEXT.gen.cs new file mode 100644 index 0000000..46ee3f9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderModuleIdentifierEXT.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderModuleIdentifierEXT - A unique identifier for a shader module + /// + /// + /// + /// VkShaderModuleIdentifierEXT represents a shader module identifier + /// returned by the implementation. + /// + /// + /// // Provided by VK_EXT_shader_module_identifier + /// typedef struct VkShaderModuleIdentifierEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t identifierSize; + /// uint8_t identifier[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]; + /// } VkShaderModuleIdentifierEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkShaderModuleIdentifierEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderModuleIdentifierEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IdentifierSize is the size, in bytes, of valid data returned in identifier. + /// + [FieldOffset(16)] + public int IdentifierSize; + + /// + [FieldOffset(20)] + public fixed byte Identifier[32]; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderModuleValidationCacheCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderModuleValidationCacheCreateInfoEXT.gen.cs new file mode 100644 index 0000000..a7da205 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderModuleValidationCacheCreateInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderModuleValidationCacheCreateInfoEXT - Specify validation cache to use during shader module creation + /// + /// + /// + /// To use a VkValidationCacheEXT to cache shader validation results, add + /// a VkShaderModuleValidationCacheCreateInfoEXT structure to the + /// pNext chain of the VkShaderModuleCreateInfo structure, + /// specifying the cache object to use. + /// + /// + /// The VkShaderModuleValidationCacheCreateInfoEXT structure is defined + /// as: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// typedef struct VkShaderModuleValidationCacheCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkValidationCacheEXT validationCache; + /// } VkShaderModuleValidationCacheCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkShaderModuleValidationCacheCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ShaderModuleValidationCacheCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ValidationCache is the validation cache object from which the results of prior validation attempts will be written, and to which new validation results for this VkShaderModule will be written (if not already present). The implementation must not access this object outside of the duration of the command this structure is passed to. + /// + [FieldOffset(16)] + public VkValidationCacheEXT ValidationCache; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderResourceUsageAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderResourceUsageAMD.gen.cs new file mode 100644 index 0000000..7dfb969 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderResourceUsageAMD.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderResourceUsageAMD - Resource usage information about a particular shader within a pipeline + /// + /// + /// + /// The VkShaderResourceUsageAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_shader_info + /// typedef struct VkShaderResourceUsageAMD { + /// uint32_t numUsedVgprs; + /// uint32_t numUsedSgprs; + /// uint32_t ldsSizePerLocalWorkGroup; + /// size_t ldsUsageSizeInBytes; + /// size_t scratchMemUsageInBytes; + /// } VkShaderResourceUsageAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public partial struct VkShaderResourceUsageAMD() + { + /// + /// NumUsedVgprs is the number of vector instruction general-purpose registers used by this shader. + /// + [FieldOffset(0)] + public int NumUsedVgprs; + + /// + /// NumUsedSgprs is the number of scalar instruction general-purpose registers used by this shader. + /// + [FieldOffset(4)] + public int NumUsedSgprs; + + /// + /// LdsSizePerLocalWorkGroup is the maximum local data store size per work group in bytes. + /// + [FieldOffset(8)] + public int LdsSizePerLocalWorkGroup; + + /// + /// LdsUsageSizeInBytes is the LDS usage size in bytes per work group by this shader. + /// + [FieldOffset(16)] + public nuint LdsUsageSizeInBytes; + + /// + /// ScratchMemUsageInBytes is the scratch memory usage in bytes by this shader. + /// + [FieldOffset(24)] + public nuint ScratchMemUsageInBytes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShaderStatisticsInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShaderStatisticsInfoAMD.gen.cs new file mode 100644 index 0000000..ca7d3fe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShaderStatisticsInfoAMD.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShaderStatisticsInfoAMD - Statistical information about a particular shader within a pipeline + /// + /// + /// + /// The VkShaderStatisticsInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_shader_info + /// typedef struct VkShaderStatisticsInfoAMD { + /// VkShaderStageFlags shaderStageMask; + /// VkShaderResourceUsageAMD resourceUsage; + /// uint32_t numPhysicalVgprs; + /// uint32_t numPhysicalSgprs; + /// uint32_t numAvailableVgprs; + /// uint32_t numAvailableSgprs; + /// uint32_t computeWorkGroupSize[3]; + /// } VkShaderStatisticsInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public partial struct VkShaderStatisticsInfoAMD() + { + /// + /// ShaderStageMask are the combination of logical shader stages contained within this shader. + /// + [FieldOffset(0)] + public VkShaderStageFlags ShaderStageMask; + + /// + /// ResourceUsage is a VkShaderResourceUsageAMD structure describing internal physical device resources used by this shader. + /// + [FieldOffset(8)] + public VkShaderResourceUsageAMD ResourceUsage; + + /// + /// NumPhysicalVgprs is the maximum number of vector instruction general-purpose registers (VGPRs) available to the physical device. + /// + [FieldOffset(40)] + public int NumPhysicalVgprs; + + /// + /// NumPhysicalSgprs is the maximum number of scalar instruction general-purpose registers (SGPRs) available to the physical device. + /// + [FieldOffset(44)] + public int NumPhysicalSgprs; + + /// + /// NumAvailableVgprs is the maximum limit of VGPRs made available to the shader compiler. + /// + [FieldOffset(48)] + public int NumAvailableVgprs; + + /// + /// NumAvailableSgprs is the maximum limit of SGPRs made available to the shader compiler. + /// + [FieldOffset(52)] + public int NumAvailableSgprs; + + /// + /// ComputeWorkGroupSize is the local workgroup size of this shader in { X, Y, Z } dimensions. + /// + [FieldOffset(56)] + public uint3 ComputeWorkGroupSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkShadingRatePaletteNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkShadingRatePaletteNV.gen.cs new file mode 100644 index 0000000..bfff8a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkShadingRatePaletteNV.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkShadingRatePaletteNV - Structure specifying a single shading rate palette + /// + /// + /// + /// The VkShadingRatePaletteNV structure specifies to contents of a single + /// shading rate image palette and is defined as: + /// + /// + /// // Provided by VK_NV_shading_rate_image + /// typedef struct VkShadingRatePaletteNV { + /// uint32_t shadingRatePaletteEntryCount; + /// const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries; + /// } VkShadingRatePaletteNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkShadingRatePaletteNV() + { + /// + /// ShadingRatePaletteEntryCount specifies the number of entries in the shading rate image palette. + /// + [FieldOffset(0)] + public int ShadingRatePaletteEntryCount; + + /// + /// ShadingRatePaletteEntries is a pointer to an array of VkShadingRatePaletteEntryNV enums defining the shading rate for each palette entry. + /// + [FieldOffset(8)] + public VkShadingRatePaletteEntryNV* ShadingRatePaletteEntries; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilities2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilities2KHR.gen.cs new file mode 100644 index 0000000..7949f8c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilities2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSharedPresentSurfaceCapabilities2KHR - Structure describing capabilities of a surface for shared presentation + /// + /// + /// + /// The VkSharedPresentSurfaceCapabilities2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_extended_flags with VK_KHR_shared_presentable_image + /// typedef struct VkSharedPresentSurfaceCapabilities2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkImageUsageFlags2KHR sharedPresentSupportedUsageFlags; + /// } VkSharedPresentSurfaceCapabilities2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSharedPresentSurfaceCapabilities2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SharedPresentSurfaceCapabilities2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SharedPresentSupportedUsageFlags is a bitmask of VkImageUsageFlags2KHR representing the ways the application can use the shared presentable image from a swapchain created with VkPresentModeKHR set to VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR for the surface on the specified device. VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR must be included in the set but implementations may: support additional usages. + /// + [FieldOffset(16)] + public VkImageUsageFlags2KHR SharedPresentSupportedUsageFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..530d716 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSharedPresentSurfaceCapabilitiesKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSharedPresentSurfaceCapabilitiesKHR - Structure describing capabilities of a surface for shared presentation + /// + /// + /// + /// The VkSharedPresentSurfaceCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_shared_presentable_image + /// typedef struct VkSharedPresentSurfaceCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkImageUsageFlags sharedPresentSupportedUsageFlags; + /// } VkSharedPresentSurfaceCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSharedPresentSurfaceCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SharedPresentSurfaceCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SharedPresentSupportedUsageFlags is a bitmask of VkImageUsageFlags representing the ways the application can use the shared presentable image from a swapchain created with VkPresentModeKHR set to VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR for the surface on the specified device. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set but implementations may: support additional usages. + /// + [FieldOffset(16)] + public VkImageUsageFlags SharedPresentSupportedUsageFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseBufferMemoryBindInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseBufferMemoryBindInfo.gen.cs new file mode 100644 index 0000000..3bbd284 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseBufferMemoryBindInfo.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseBufferMemoryBindInfo - Structure specifying a sparse buffer memory bind operation + /// + /// + /// + /// Memory is bound to VkBuffer objects created with the + /// VK_BUFFER_CREATE_SPARSE_BINDING_BIT flag using the following + /// structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseBufferMemoryBindInfo { + /// VkBuffer buffer; + /// uint32_t bindCount; + /// const VkSparseMemoryBind* pBinds; + /// } VkSparseBufferMemoryBindInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSparseBufferMemoryBindInfo() + { + /// + /// Buffer is the VkBuffer object to be bound. + /// + [FieldOffset(0)] + public VkBuffer Buffer; + + /// + /// BindCount is the number of VkSparseMemoryBind structures in the pBinds array. + /// + [FieldOffset(8)] + public int BindCount; + + /// + /// Binds is a pointer to an array of VkSparseMemoryBind structures. + /// + [FieldOffset(16)] + public VkSparseMemoryBind* Binds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties.gen.cs new file mode 100644 index 0000000..2c42332 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageFormatProperties - Structure specifying sparse image format properties + /// + /// + /// + /// The VkSparseImageFormatProperties structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseImageFormatProperties { + /// VkImageAspectFlags aspectMask; + /// VkExtent3D imageGranularity; + /// VkSparseImageFormatFlags flags; + /// } VkSparseImageFormatProperties; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 20)] + public partial struct VkSparseImageFormatProperties() + { + /// + /// AspectMask is a bitmask VkImageAspectFlags specifying which aspects of the image the properties apply to. + /// + [FieldOffset(0)] + public VkImageAspectFlags AspectMask; + + /// + /// ImageGranularity is the width, height, and depth of the sparse image block in texels. + /// + [FieldOffset(4)] + public VkExtent3D ImageGranularity; + + /// + /// Flags is a bitmask of VkSparseImageFormatFlags specifying additional information about the sparse resource. + /// + [FieldOffset(16)] + public VkSparseImageFormatFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties2.gen.cs new file mode 100644 index 0000000..972d7bf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageFormatProperties2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageFormatProperties2 - Structure specifying sparse image format properties + /// + /// + /// + /// The VkSparseImageFormatProperties2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkSparseImageFormatProperties2 { + /// VkStructureType sType; + /// void* pNext; + /// VkSparseImageFormatProperties properties; + /// } VkSparseImageFormatProperties2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSparseImageFormatProperties2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SparseImageFormatProperties2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Properties is a VkSparseImageFormatProperties structure which is populated with the same values as in vkGetPhysicalDeviceSparseImageFormatProperties. + /// + [FieldOffset(16)] + public VkSparseImageFormatProperties Properties; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBind.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBind.gen.cs new file mode 100644 index 0000000..6cc2644 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBind.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageMemoryBind - Structure specifying sparse image memory bind + /// + /// + /// + /// The VkSparseImageMemoryBind structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseImageMemoryBind { + /// VkImageSubresource subresource; + /// VkOffset3D offset; + /// VkExtent3D extent; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// VkSparseMemoryBindFlags flags; + /// } VkSparseImageMemoryBind; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public partial struct VkSparseImageMemoryBind() + { + /// + /// Subresource is the image aspect and region of interest in the image. + /// + [FieldOffset(0)] + public VkImageSubresource Subresource; + + /// + /// Offset are the coordinates of the first texel within the image subresource to bind. + /// + [FieldOffset(12)] + public VkOffset3D Offset; + + /// + /// Extent is the size in texels of the region within the image subresource to bind. The extent must be a multiple of the sparse image block dimensions, except when binding sparse image blocks along the edge of an image subresource it can instead be such that any coordinate of offset {plus} extent equals the corresponding dimensions of the image subresource. + /// + [FieldOffset(24)] + public VkExtent3D Extent; + + /// + /// Memory is the VkDeviceMemory object that the sparse image blocks of the image are bound to. If memory is VK_NULL_HANDLE, the sparse image blocks are unbound. + /// + [FieldOffset(40)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is an offset into VkDeviceMemory object. If memory is VK_NULL_HANDLE, this value is ignored. + /// + [FieldOffset(48)] + public ByteSize64 MemoryOffset; + + /// + /// Flags are sparse memory binding flags. + /// + [FieldOffset(56)] + public VkSparseMemoryBindFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBindInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBindInfo.gen.cs new file mode 100644 index 0000000..40de31f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryBindInfo.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageMemoryBindInfo - Structure specifying sparse image memory bind information + /// + /// + /// + /// Memory can be bound to sparse image blocks of VkImage objects created + /// with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag using the following + /// structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseImageMemoryBindInfo { + /// VkImage image; + /// uint32_t bindCount; + /// const VkSparseImageMemoryBind* pBinds; + /// } VkSparseImageMemoryBindInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSparseImageMemoryBindInfo() + { + /// + /// Image is the VkImage object to be bound + /// + [FieldOffset(0)] + public VkImage Image; + + /// + /// BindCount is the number of VkSparseImageMemoryBind structures in pBinds array + /// + [FieldOffset(8)] + public int BindCount; + + /// + /// Binds is a pointer to an array of VkSparseImageMemoryBind structures + /// + [FieldOffset(16)] + public VkSparseImageMemoryBind* Binds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements.gen.cs new file mode 100644 index 0000000..824fa18 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageMemoryRequirements - Structure specifying sparse image memory requirements + /// + /// + /// + /// The VkSparseImageMemoryRequirements structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseImageMemoryRequirements { + /// VkSparseImageFormatProperties formatProperties; + /// uint32_t imageMipTailFirstLod; + /// VkDeviceSize imageMipTailSize; + /// VkDeviceSize imageMipTailOffset; + /// VkDeviceSize imageMipTailStride; + /// } VkSparseImageMemoryRequirements; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct VkSparseImageMemoryRequirements() + { + /// + /// FormatProperties is a VkSparseImageFormatProperties structure specifying properties of the image format. + /// + [FieldOffset(0)] + public VkSparseImageFormatProperties FormatProperties; + + /// + /// ImageMipTailFirstLod is the first mip level at which image subresources are included in the mip tail region. + /// + [FieldOffset(20)] + public int ImageMipTailFirstLod; + + /// + /// ImageMipTailSize is the memory size (in bytes) of the mip tail region. If formatProperties.flags contains VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, this is the size of the whole mip tail, otherwise this is the size of the mip tail of a single array layer. This value is guaranteed to be a multiple of the sparse block size in bytes. + /// + [FieldOffset(24)] + public ByteSize64 ImageMipTailSize; + + /// + /// ImageMipTailOffset is the opaque memory offset used with VkSparseImageOpaqueMemoryBindInfo to bind the mip tail region(s). + /// + [FieldOffset(32)] + public ByteSize64 ImageMipTailOffset; + + /// + /// ImageMipTailStride is the offset stride between each array-layer's mip tail, if formatProperties.flags does not contain VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT (otherwise the value is undefined:). + /// + [FieldOffset(40)] + public ByteSize64 ImageMipTailStride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements2.gen.cs new file mode 100644 index 0000000..a675685 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageMemoryRequirements2.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageMemoryRequirements2 - (None) + /// + /// + /// + /// The VkSparseImageMemoryRequirements2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_1 + /// typedef struct VkSparseImageMemoryRequirements2 { + /// VkStructureType sType; + /// void* pNext; + /// VkSparseImageMemoryRequirements memoryRequirements; + /// } VkSparseImageMemoryRequirements2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkSparseImageMemoryRequirements2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SparseImageMemoryRequirements2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryRequirements is a VkSparseImageMemoryRequirements structure describing the memory requirements of the sparse image. + /// + [FieldOffset(16)] + public VkSparseImageMemoryRequirements MemoryRequirements; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseImageOpaqueMemoryBindInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseImageOpaqueMemoryBindInfo.gen.cs new file mode 100644 index 0000000..db528e9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseImageOpaqueMemoryBindInfo.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseImageOpaqueMemoryBindInfo - Structure specifying sparse image opaque memory bind information + /// + /// + /// + /// Memory is bound to opaque regions of VkImage objects created with the + /// VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag using the following structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseImageOpaqueMemoryBindInfo { + /// VkImage image; + /// uint32_t bindCount; + /// const VkSparseMemoryBind* pBinds; + /// } VkSparseImageOpaqueMemoryBindInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSparseImageOpaqueMemoryBindInfo() + { + /// + /// Image is the VkImage object to be bound. + /// + [FieldOffset(0)] + public VkImage Image; + + /// + /// BindCount is the number of VkSparseMemoryBind structures in the pBinds array. + /// + [FieldOffset(8)] + public int BindCount; + + /// + /// Binds is a pointer to an array of VkSparseMemoryBind structures. + /// + [FieldOffset(16)] + public VkSparseMemoryBind* Binds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSparseMemoryBind.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSparseMemoryBind.gen.cs new file mode 100644 index 0000000..94f4a85 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSparseMemoryBind.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSparseMemoryBind - Structure specifying a sparse memory bind operation + /// + /// + /// + /// The VkSparseMemoryBind structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSparseMemoryBind { + /// VkDeviceSize resourceOffset; + /// VkDeviceSize size; + /// VkDeviceMemory memory; + /// VkDeviceSize memoryOffset; + /// VkSparseMemoryBindFlags flags; + /// } VkSparseMemoryBind; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct VkSparseMemoryBind() + { + /// + /// ResourceOffset is the offset into the resource. + /// + [FieldOffset(0)] + public ByteSize64 ResourceOffset; + + /// + /// Size is the size of the memory region to be bound. + /// + [FieldOffset(8)] + public ByteSize64 Size; + + /// + /// Memory is the VkDeviceMemory object that the range of the resource is bound to. If memory is VK_NULL_HANDLE, the range is unbound. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + + /// + /// MemoryOffset is the offset into the VkDeviceMemory object to bind the resource range to. If memory is VK_NULL_HANDLE, this value is ignored. + /// + [FieldOffset(24)] + public ByteSize64 MemoryOffset; + + /// + /// Flags is a bitmask of VkSparseMemoryBindFlags specifying usage of the binding operation. + /// + [FieldOffset(32)] + public VkSparseMemoryBindFlags Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSpecializationInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSpecializationInfo.gen.cs new file mode 100644 index 0000000..2a06b92 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSpecializationInfo.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSpecializationInfo - Structure specifying specialization information + /// + /// + /// + /// The VkSpecializationInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSpecializationInfo { + /// uint32_t mapEntryCount; + /// const VkSpecializationMapEntry* pMapEntries; + /// size_t dataSize; + /// const void* pData; + /// } VkSpecializationInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSpecializationInfo() + { + /// + /// MapEntryCount is the number of entries in the pMapEntries array. + /// + [FieldOffset(0)] + public int MapEntryCount; + + /// + /// MapEntries is a pointer to an array of VkSpecializationMapEntry structures, which map constant IDs to offsets in pData. + /// + [FieldOffset(8)] + public VkSpecializationMapEntry* MapEntries; + + /// + /// DataSize is the byte size of the pData buffer. + /// + [FieldOffset(16)] + public ByteSize64 DataSize; + + /// + /// Data contains the actual constant values to specialize with. + /// + [FieldOffset(24)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSpecializationMapEntry.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSpecializationMapEntry.gen.cs new file mode 100644 index 0000000..ccc68f7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSpecializationMapEntry.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSpecializationMapEntry - Structure specifying a specialization map entry + /// + /// + /// + /// The VkSpecializationMapEntry structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSpecializationMapEntry { + /// uint32_t constantID; + /// uint32_t offset; + /// size_t size; + /// } VkSpecializationMapEntry; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkSpecializationMapEntry() + { + /// + /// ConstantID is the ID of the specialization constant in SPIR-V. + /// + [FieldOffset(0)] + public int ConstantID; + + /// + /// Offset is the byte offset of the specialization constant value within the supplied data buffer. + /// + [FieldOffset(4)] + public ByteSize32 Offset; + + /// + /// Size is the byte size of the specialization constant value within the supplied data buffer. + /// + [FieldOffset(8)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkStencilOpState.gen.cs b/Brutal.Vulkan/Generated/Structs/VkStencilOpState.gen.cs new file mode 100644 index 0000000..c18856a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkStencilOpState.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStencilOpState - Structure specifying stencil operation state + /// + /// + /// + /// The VkStencilOpState structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkStencilOpState { + /// VkStencilOp failOp; + /// VkStencilOp passOp; + /// VkStencilOp depthFailOp; + /// VkCompareOp compareOp; + /// uint32_t compareMask; + /// uint32_t writeMask; + /// uint32_t reference; + /// } VkStencilOpState; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct VkStencilOpState() + { + /// + /// FailOp is a VkStencilOp value specifying the action performed on samples that fail the stencil test. + /// + [FieldOffset(0)] + public VkStencilOp FailOp; + + /// + /// PassOp is a VkStencilOp value specifying the action performed on samples that pass both the depth and stencil tests. + /// + [FieldOffset(4)] + public VkStencilOp PassOp; + + /// + /// DepthFailOp is a VkStencilOp value specifying the action performed on samples that pass the stencil test and fail the depth test. + /// + [FieldOffset(8)] + public VkStencilOp DepthFailOp; + + /// + /// CompareOp is a VkCompareOp value specifying the comparison operator used in the stencil test. + /// + [FieldOffset(12)] + public VkCompareOp CompareOp; + + /// + /// CompareMask selects the bits of the unsigned integer stencil values participating in the stencil test. + /// + [FieldOffset(16)] + public int CompareMask; + + /// + /// WriteMask selects the bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment. + /// + [FieldOffset(20)] + public int WriteMask; + + /// + /// Reference is an integer stencil reference value that is used in the unsigned stencil comparison. + /// + [FieldOffset(24)] + public int Reference; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressNV.gen.cs new file mode 100644 index 0000000..0d59898 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressNV.gen.cs @@ -0,0 +1,36 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStridedDeviceAddressNV - Structure specifying a device addresses with a stride + /// + /// + /// + /// :refpage: VkStridedDeviceAddressNV + /// + /// + /// The VkStridedDeviceAddressNV structure is defined as: + /// + /// + /// // Provided by VK_NV_cluster_acceleration_structure + /// typedef struct VkStridedDeviceAddressNV { + /// VkDeviceAddress startAddress; + /// VkDeviceSize strideInBytes; + /// } VkStridedDeviceAddressNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkStridedDeviceAddressNV() + { + /// + /// StartAddress is the device address (as returned by the vkGetBufferDeviceAddress command) at which the region starts, or zero if the region is unused. + /// + [FieldOffset(0)] + public VkDeviceAddress StartAddress; + + /// + /// StrideInBytes is the byte stride between consecutive elements. Only the bottom 32 bits are used. The field is 64 bits to ensure consistent alignment across all containing structures. + /// + [FieldOffset(8)] + public ByteSize64 StrideInBytes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRangeKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRangeKHR.gen.cs new file mode 100644 index 0000000..5077639 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRangeKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStridedDeviceAddressRangeKHR - Structure specifying a device address range with a stride + /// + /// + /// + /// :refpage: VkStridedDeviceAddressRangeKHR + /// + /// + /// A strided device address range is defined by the structure: + /// + /// + /// // Provided by VK_KHR_copy_memory_indirect, VK_KHR_device_address_commands + /// typedef struct VkStridedDeviceAddressRangeKHR { + /// VkDeviceAddress address; + /// VkDeviceSize size; + /// VkDeviceSize stride; + /// } VkStridedDeviceAddressRangeKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkStridedDeviceAddressRangeKHR() + { + /// + /// Address is a basetype:VkDeviceAddress specifying the start of the range. + /// + [FieldOffset(0)] + public VkDeviceAddress Address; + + /// + /// Size is a basetype:VkDeviceSize specifying the size of the range. + /// + [FieldOffset(8)] + public ByteSize64 Size; + + /// + /// Stride is a basetype:VkDeviceSize specifying the stride of elements over the range. + /// + [FieldOffset(16)] + public ByteSize64 Stride; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRegionKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRegionKHR.gen.cs new file mode 100644 index 0000000..8f27ab6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkStridedDeviceAddressRegionKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkStridedDeviceAddressRegionKHR - Structure specifying a region of device addresses with a stride + /// + /// + /// + /// :refpage: VkStridedDeviceAddressRegionKHR + /// + /// + /// The VkStridedDeviceAddressRegionKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkStridedDeviceAddressRegionKHR { + /// VkDeviceAddress deviceAddress; + /// VkDeviceSize stride; + /// VkDeviceSize size; + /// } VkStridedDeviceAddressRegionKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkStridedDeviceAddressRegionKHR() + { + /// + /// DeviceAddress is the device address (as returned by the vkGetBufferDeviceAddress command) at which the region starts, or zero if the region is unused. + /// + [FieldOffset(0)] + public VkDeviceAddress DeviceAddress; + + /// + /// Stride is the byte stride between consecutive elements. + /// + [FieldOffset(8)] + public ByteSize64 Stride; + + /// + /// Size is the size in bytes of the region starting at deviceAddress. + /// + [FieldOffset(16)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubmitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubmitInfo.gen.cs new file mode 100644 index 0000000..95928b5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubmitInfo.gen.cs @@ -0,0 +1,83 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubmitInfo - Structure specifying a queue submit operation + /// + /// + /// + /// :refpage: VkSubmitInfo + /// The VkSubmitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSubmitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t waitSemaphoreCount; + /// const VkSemaphore* pWaitSemaphores; + /// const VkPipelineStageFlags* pWaitDstStageMask; + /// uint32_t commandBufferCount; + /// const VkCommandBuffer* pCommandBuffers; + /// uint32_t signalSemaphoreCount; + /// const VkSemaphore* pSignalSemaphores; + /// } VkSubmitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkSubmitInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubmitInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WaitSemaphoreCount is the number of semaphores upon which to wait before executing the command buffers for the batch. + /// + [FieldOffset(16)] + public int WaitSemaphoreCount; + + /// + /// WaitSemaphores is a pointer to an array of VkSemaphore handles upon which to wait before the command buffers for this batch begin execution. If semaphores to wait on are provided, they define a semaphore wait operation^. + /// + [FieldOffset(24)] + public VkSemaphore* WaitSemaphores; + + /// + /// WaitDstStageMask is a pointer to an array of pipeline stages at which each corresponding semaphore wait will occur. + /// + [FieldOffset(32)] + public VkPipelineStageFlags* WaitDstStageMask; + + /// + /// CommandBufferCount is the number of command buffers to execute in the batch. + /// + [FieldOffset(40)] + public int CommandBufferCount; + + /// + /// CommandBuffers is a pointer to an array of VkCommandBuffer handles to execute in the batch. + /// + [FieldOffset(48)] + public VkCommandBuffer* CommandBuffers; + + /// + /// SignalSemaphoreCount is the number of semaphores to be signaled once the commands specified in pCommandBuffers have completed execution. + /// + [FieldOffset(56)] + public int SignalSemaphoreCount; + + /// + /// SignalSemaphores is a pointer to an array of VkSemaphore handles which will be signaled when the command buffers for this batch have completed execution. If semaphores to be signaled are provided, they define a semaphore signal operation^. + /// + [FieldOffset(64)] + public VkSemaphore* SignalSemaphores; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubmitInfo2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubmitInfo2.gen.cs new file mode 100644 index 0000000..e13696d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubmitInfo2.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubmitInfo2 - Structure specifying a queue submit operation + /// + /// + /// + /// The VkSubmitInfo2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkSubmitInfo2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkSubmitFlags flags; + /// uint32_t waitSemaphoreInfoCount; + /// const VkSemaphoreSubmitInfo* pWaitSemaphoreInfos; + /// uint32_t commandBufferInfoCount; + /// const VkCommandBufferSubmitInfo* pCommandBufferInfos; + /// uint32_t signalSemaphoreInfoCount; + /// const VkSemaphoreSubmitInfo* pSignalSemaphoreInfos; + /// } VkSubmitInfo2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkSubmitInfo2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubmitInfo2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkSubmitFlags. + /// + [FieldOffset(16)] + public VkSubmitFlags Flags; + + /// + /// WaitSemaphoreInfoCount is the number of elements in pWaitSemaphoreInfos. + /// + [FieldOffset(20)] + public int WaitSemaphoreInfoCount; + + /// + /// WaitSemaphoreInfos is a pointer to an array of VkSemaphoreSubmitInfo structures defining semaphore wait operations^. + /// + [FieldOffset(24)] + public VkSemaphoreSubmitInfo* WaitSemaphoreInfos; + + /// + /// CommandBufferInfoCount is the number of elements in pCommandBufferInfos and the number of command buffers to execute in the batch. + /// + [FieldOffset(32)] + public int CommandBufferInfoCount; + + /// + /// CommandBufferInfos is a pointer to an array of VkCommandBufferSubmitInfo structures describing command buffers to execute in the batch. + /// + [FieldOffset(40)] + public VkCommandBufferSubmitInfo* CommandBufferInfos; + + /// + /// SignalSemaphoreInfoCount is the number of elements in pSignalSemaphoreInfos. + /// + [FieldOffset(48)] + public int SignalSemaphoreInfoCount; + + /// + /// SignalSemaphoreInfos is a pointer to an array of VkSemaphoreSubmitInfo describing semaphore signal operations^. + /// + [FieldOffset(56)] + public VkSemaphoreSubmitInfo* SignalSemaphoreInfos; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassBeginInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassBeginInfo.gen.cs new file mode 100644 index 0000000..68a10f0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassBeginInfo.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassBeginInfo - Structure specifying subpass begin information + /// + /// + /// + /// The VkSubpassBeginInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSubpassBeginInfo { + /// VkStructureType sType; + /// const void* pNext; + /// VkSubpassContents contents; + /// } VkSubpassBeginInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSubpassBeginInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassBeginInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Contents is a VkSubpassContents value specifying how the commands in the next subpass will be provided. + /// + [FieldOffset(16)] + public VkSubpassContents Contents; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassDependency.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassDependency.gen.cs new file mode 100644 index 0000000..81f9955 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassDependency.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassDependency - Structure specifying a subpass dependency + /// + /// + /// + /// :refpage: VkSubpassDependency + /// The VkSubpassDependency structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSubpassDependency { + /// uint32_t srcSubpass; + /// uint32_t dstSubpass; + /// VkPipelineStageFlags srcStageMask; + /// VkPipelineStageFlags dstStageMask; + /// VkAccessFlags srcAccessMask; + /// VkAccessFlags dstAccessMask; + /// VkDependencyFlags dependencyFlags; + /// } VkSubpassDependency; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 28)] + public partial struct VkSubpassDependency() + { + /// + /// SrcSubpass is the subpass index of the first subpass in the dependency, or VK_SUBPASS_EXTERNAL. + /// + [FieldOffset(0)] + public int SrcSubpass; + + /// + /// DstSubpass is the subpass index of the second subpass in the dependency, or VK_SUBPASS_EXTERNAL. + /// + [FieldOffset(4)] + public int DstSubpass; + + /// + /// SrcStageMask is a bitmask of VkPipelineStageFlags specifying the source stage mask^. If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT. + /// + [FieldOffset(8)] + public VkPipelineStageFlags SrcStageMask; + + /// + /// DstStageMask is a bitmask of VkPipelineStageFlags specifying the destination stage mask^ If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT. + /// + [FieldOffset(12)] + public VkPipelineStageFlags DstStageMask; + + /// + /// SrcAccessMask is a bitmask of VkAccessFlags specifying a source access mask^. + /// + [FieldOffset(16)] + public VkAccessFlags SrcAccessMask; + + /// + /// DstAccessMask is a bitmask of VkAccessFlags specifying a destination access mask^. + /// + [FieldOffset(20)] + public VkAccessFlags DstAccessMask; + + /// + /// DependencyFlags is a bitmask of VkDependencyFlags. + /// + [FieldOffset(24)] + public VkDependencyFlags DependencyFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassDependency2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassDependency2.gen.cs new file mode 100644 index 0000000..c1921a8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassDependency2.gen.cs @@ -0,0 +1,90 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassDependency2 - Structure specifying a subpass dependency + /// + /// + /// + /// :refpage: VkSubpassDependency2 + /// The VkSubpassDependency2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSubpassDependency2 { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t srcSubpass; + /// uint32_t dstSubpass; + /// VkPipelineStageFlags srcStageMask; + /// VkPipelineStageFlags dstStageMask; + /// VkAccessFlags srcAccessMask; + /// VkAccessFlags dstAccessMask; + /// VkDependencyFlags dependencyFlags; + /// int32_t viewOffset; + /// } VkSubpassDependency2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkSubpassDependency2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassDependency2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcSubpass is the subpass index of the first subpass in the dependency, or VK_SUBPASS_EXTERNAL. + /// + [FieldOffset(16)] + public int SrcSubpass; + + /// + /// DstSubpass is the subpass index of the second subpass in the dependency, or VK_SUBPASS_EXTERNAL. + /// + [FieldOffset(20)] + public int DstSubpass; + + /// + /// SrcStageMask is a bitmask of VkPipelineStageFlags specifying the source stage mask^. If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT. + /// + [FieldOffset(24)] + public VkPipelineStageFlags SrcStageMask; + + /// + /// DstStageMask is a bitmask of VkPipelineStageFlags specifying the destination stage mask^ If set to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, it is equivalent to setting it to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT. + /// + [FieldOffset(28)] + public VkPipelineStageFlags DstStageMask; + + /// + /// SrcAccessMask is a bitmask of VkAccessFlags specifying a source access mask^. + /// + [FieldOffset(32)] + public VkAccessFlags SrcAccessMask; + + /// + /// DstAccessMask is a bitmask of VkAccessFlags specifying a destination access mask^. + /// + [FieldOffset(36)] + public VkAccessFlags DstAccessMask; + + /// + /// DependencyFlags is a bitmask of VkDependencyFlags. + /// + [FieldOffset(40)] + public VkDependencyFlags DependencyFlags; + + /// + /// ViewOffset controls which views in the source subpass the views in the destination subpass depend on. + /// + [FieldOffset(44)] + public int ViewOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassDescription.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassDescription.gen.cs new file mode 100644 index 0000000..5062444 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassDescription.gen.cs @@ -0,0 +1,92 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassDescription - Structure specifying a subpass description + /// + /// + /// + /// :refpage: VkSubpassDescription + /// + /// + /// The VkSubpassDescription structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSubpassDescription { + /// VkSubpassDescriptionFlags flags; + /// VkPipelineBindPoint pipelineBindPoint; + /// uint32_t inputAttachmentCount; + /// const VkAttachmentReference* pInputAttachments; + /// uint32_t colorAttachmentCount; + /// const VkAttachmentReference* pColorAttachments; + /// const VkAttachmentReference* pResolveAttachments; + /// const VkAttachmentReference* pDepthStencilAttachment; + /// uint32_t preserveAttachmentCount; + /// const uint32_t* pPreserveAttachments; + /// } VkSubpassDescription; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkSubpassDescription() + { + /// + /// Flags is a bitmask of VkSubpassDescriptionFlags specifying usage of the subpass. + /// + [FieldOffset(0)] + public VkSubpassDescriptionFlags Flags; + + /// + /// PipelineBindPoint is a VkPipelineBindPoint value specifying the pipeline type supported for this subpass. + /// + [FieldOffset(4)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// InputAttachmentCount is the number of input attachments. + /// + [FieldOffset(8)] + public int InputAttachmentCount; + + /// + /// InputAttachments is a pointer to an array of VkAttachmentReference structures defining the input attachments for this subpass and their layouts. + /// + [FieldOffset(16)] + public VkAttachmentReference* InputAttachments; + + /// + /// ColorAttachmentCount is the number of color attachments. + /// + [FieldOffset(24)] + public int ColorAttachmentCount; + + /// + /// ColorAttachments is a pointer to an array of colorAttachmentCount VkAttachmentReference structures defining the color attachments for this subpass and their layouts. + /// + [FieldOffset(32)] + public VkAttachmentReference* ColorAttachments; + + /// + /// ResolveAttachments is `NULL` or a pointer to an array of colorAttachmentCount VkAttachmentReference structures defining the resolve attachments for this subpass and their layouts. + /// + [FieldOffset(40)] + public VkAttachmentReference* ResolveAttachments; + + /// + /// DepthStencilAttachment is a pointer to a VkAttachmentReference structure specifying the depth/stencil attachment for this subpass and its layout. + /// + [FieldOffset(48)] + public VkAttachmentReference* DepthStencilAttachment; + + /// + /// PreserveAttachmentCount is the number of preserved attachments. + /// + [FieldOffset(56)] + public int PreserveAttachmentCount; + + /// + /// PreserveAttachments is a pointer to an array of preserveAttachmentCount render pass attachment indices identifying attachments that are not used by this subpass, but whose contents must be preserved throughout the subpass. + /// + [FieldOffset(64)] + public int* PreserveAttachments; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassDescription2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassDescription2.gen.cs new file mode 100644 index 0000000..500c5c4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassDescription2.gen.cs @@ -0,0 +1,113 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassDescription2 - Structure specifying a subpass description + /// + /// + /// + /// :refpage: VkSubpassDescription2 + /// + /// + /// The VkSubpassDescription2 structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSubpassDescription2 { + /// VkStructureType sType; + /// const void* pNext; + /// VkSubpassDescriptionFlags flags; + /// VkPipelineBindPoint pipelineBindPoint; + /// uint32_t viewMask; + /// uint32_t inputAttachmentCount; + /// const VkAttachmentReference2* pInputAttachments; + /// uint32_t colorAttachmentCount; + /// const VkAttachmentReference2* pColorAttachments; + /// const VkAttachmentReference2* pResolveAttachments; + /// const VkAttachmentReference2* pDepthStencilAttachment; + /// uint32_t preserveAttachmentCount; + /// const uint32_t* pPreserveAttachments; + /// } VkSubpassDescription2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkSubpassDescription2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassDescription2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkSubpassDescriptionFlags specifying usage of the subpass. + /// + [FieldOffset(16)] + public VkSubpassDescriptionFlags Flags; + + /// + /// PipelineBindPoint is a VkPipelineBindPoint value specifying the pipeline type supported for this subpass. + /// + [FieldOffset(20)] + public VkPipelineBindPoint PipelineBindPoint; + + /// + /// ViewMask is a bitfield of view indices describing which views rendering is broadcast to in this subpass, when multiview is enabled. + /// + [FieldOffset(24)] + public int ViewMask; + + /// + /// InputAttachmentCount is the number of input attachments. + /// + [FieldOffset(28)] + public int InputAttachmentCount; + + /// + /// InputAttachments is a pointer to an array of VkAttachmentReference2 structures defining the input attachments for this subpass and their layouts. + /// + [FieldOffset(32)] + public VkAttachmentReference2* InputAttachments; + + /// + /// ColorAttachmentCount is the number of color attachments. + /// + [FieldOffset(40)] + public int ColorAttachmentCount; + + /// + /// ColorAttachments is a pointer to an array of colorAttachmentCount VkAttachmentReference2 structures defining the color attachments for this subpass and their layouts. + /// + [FieldOffset(48)] + public VkAttachmentReference2* ColorAttachments; + + /// + /// ResolveAttachments is `NULL` or a pointer to an array of colorAttachmentCount VkAttachmentReference2 structures defining the resolve attachments for this subpass and their layouts. + /// + [FieldOffset(56)] + public VkAttachmentReference2* ResolveAttachments; + + /// + /// DepthStencilAttachment is a pointer to a VkAttachmentReference2 structure specifying the depth/stencil attachment for this subpass and its layout. + /// + [FieldOffset(64)] + public VkAttachmentReference2* DepthStencilAttachment; + + /// + /// PreserveAttachmentCount is the number of preserved attachments. + /// + [FieldOffset(72)] + public int PreserveAttachmentCount; + + /// + /// PreserveAttachments is a pointer to an array of preserveAttachmentCount render pass attachment indices identifying attachments that are not used by this subpass, but whose contents must be preserved throughout the subpass. + /// + [FieldOffset(80)] + public int* PreserveAttachments; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassDescriptionDepthStencilResolve.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassDescriptionDepthStencilResolve.gen.cs new file mode 100644 index 0000000..5061a12 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassDescriptionDepthStencilResolve.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassDescriptionDepthStencilResolve - Structure specifying depth/stencil resolve operations for a subpass + /// + /// + /// + /// The VkSubpassDescriptionDepthStencilResolve structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSubpassDescriptionDepthStencilResolve { + /// VkStructureType sType; + /// const void* pNext; + /// VkResolveModeFlagBits depthResolveMode; + /// VkResolveModeFlagBits stencilResolveMode; + /// const VkAttachmentReference2* pDepthStencilResolveAttachment; + /// } VkSubpassDescriptionDepthStencilResolve; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSubpassDescriptionDepthStencilResolve() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassDescriptionDepthStencilResolve; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DepthResolveMode is a VkResolveModeFlags value describing the depth resolve mode. + /// + [FieldOffset(16)] + public VkResolveModeFlags DepthResolveMode; + + /// + /// StencilResolveMode is a VkResolveModeFlags value describing the stencil resolve mode. + /// + [FieldOffset(20)] + public VkResolveModeFlags StencilResolveMode; + + /// + /// DepthStencilResolveAttachment is `NULL` or a pointer to a VkAttachmentReference2 structure defining the depth/stencil resolve attachment for this subpass and its layout. + /// + [FieldOffset(24)] + public VkAttachmentReference2* DepthStencilResolveAttachment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassEndInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassEndInfo.gen.cs new file mode 100644 index 0000000..6a35d60 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassEndInfo.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassEndInfo - Structure specifying subpass end information + /// + /// + /// + /// The VkSubpassEndInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkSubpassEndInfo { + /// VkStructureType sType; + /// const void* pNext; + /// } VkSubpassEndInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public unsafe partial struct VkSubpassEndInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassEndInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassResolvePerformanceQueryEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassResolvePerformanceQueryEXT.gen.cs new file mode 100644 index 0000000..c618543 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassResolvePerformanceQueryEXT.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassResolvePerformanceQueryEXT - Structure specifying the efficiency of subpass resolve for an attachment with a format + /// + /// + /// + /// To query the performance characteristics of a subpass + /// resolve^ operation for an attachment with a VkFormat, add a + /// VkSubpassResolvePerformanceQueryEXT structure to the pNext chain + /// of VkFormatProperties2. + /// + /// + /// The VkSubpassResolvePerformanceQueryEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_multisampled_render_to_single_sampled + /// typedef struct VkSubpassResolvePerformanceQueryEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 optimal; + /// } VkSubpassResolvePerformanceQueryEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSubpassResolvePerformanceQueryEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassResolvePerformanceQueryEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Optimal specifies that a subpass resolve operation is optimally performed. + /// + [FieldOffset(16)] + public Brutal.Bool32 Optimal; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassSampleLocationsEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassSampleLocationsEXT.gen.cs new file mode 100644 index 0000000..0e1f3df --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassSampleLocationsEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassSampleLocationsEXT - Structure specifying the sample locations state to use for layout transitions of attachments performed after a given subpass + /// + /// + /// + /// The VkSubpassSampleLocationsEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_sample_locations + /// typedef struct VkSubpassSampleLocationsEXT { + /// uint32_t subpassIndex; + /// VkSampleLocationsInfoEXT sampleLocationsInfo; + /// } VkSubpassSampleLocationsEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public partial struct VkSubpassSampleLocationsEXT() + { + /// + /// SubpassIndex is the index of the subpass for which the sample locations state is provided. + /// + [FieldOffset(0)] + public int SubpassIndex; + + /// + /// SampleLocationsInfo is the sample locations state to use for the layout transition of the depth/stencil attachment away from the image layout the attachment is used with in the subpass specified in subpassIndex. + /// + [FieldOffset(8)] + public VkSampleLocationsInfoEXT SampleLocationsInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubpassShadingPipelineCreateInfoHUAWEI.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubpassShadingPipelineCreateInfoHUAWEI.gen.cs new file mode 100644 index 0000000..0592813 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubpassShadingPipelineCreateInfoHUAWEI.gen.cs @@ -0,0 +1,57 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubpassShadingPipelineCreateInfoHUAWEI - Structure specifying parameters of a newly created subpass shading pipeline + /// + /// + /// + /// A subpass shading pipeline is a compute pipeline which must be called only + /// in a subpass of a render pass with work dimensions specified by render area + /// size. + /// The subpass shading pipeline shader is a compute shader allowed to access + /// input attachments specified in the calling subpass. + /// To create a subpass shading pipeline, call vkCreateComputePipelines + /// with VkSubpassShadingPipelineCreateInfoHUAWEI in the pNext chain + /// of VkComputePipelineCreateInfo. + /// + /// + /// The VkSubpassShadingPipelineCreateInfoHUAWEI structure is defined as: + /// + /// + /// // Provided by VK_HUAWEI_subpass_shading + /// typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI { + /// VkStructureType sType; + /// void* pNext; + /// VkRenderPass renderPass; + /// uint32_t subpass; + /// } VkSubpassShadingPipelineCreateInfoHUAWEI; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSubpassShadingPipelineCreateInfoHUAWEI() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubpassShadingPipelineCreateInfoHUAWEI; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RenderPass is a handle to a render pass object describing the environment in which the pipeline will be used. The pipeline must only be used with a render pass instance compatible with the one provided. See Render Pass Compatibility^ for more information. The implementation must not access this object outside of the duration of the command this structure is passed to. + /// + [FieldOffset(16)] + public VkRenderPass RenderPass; + + /// + /// Subpass is the index of the subpass in the render pass where this pipeline will be used. + /// + [FieldOffset(24)] + public int Subpass; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubresourceHostMemcpySize.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubresourceHostMemcpySize.gen.cs new file mode 100644 index 0000000..72d1e7b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubresourceHostMemcpySize.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubresourceHostMemcpySize - Memory size needed to copy to or from an image on the host with VK_HOST_IMAGE_COPY_MEMCPY_BIT + /// + /// + /// + /// To query the memory size needed to copy to or from an image using + /// vkCopyMemoryToImage or vkCopyImageToMemory when the + /// VK_HOST_IMAGE_COPY_MEMCPY_BIT flag is specified, add a + /// VkSubresourceHostMemcpySize structure to the pNext chain of the + /// VkSubresourceLayout2 structure in a call to + /// vkGetImageSubresourceLayout2. + /// + /// + /// The VkSubresourceHostMemcpySize structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkSubresourceHostMemcpySize { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize size; + /// } VkSubresourceHostMemcpySize; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSubresourceHostMemcpySize() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubresourceHostMemcpySize; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Size is the size in bytes of the image subresource. + /// + [FieldOffset(16)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubresourceLayout.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubresourceLayout.gen.cs new file mode 100644 index 0000000..3a512a3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubresourceLayout.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubresourceLayout - Structure specifying subresource layout + /// + /// + /// + /// Information about the layout of the image subresource is returned in a + /// VkSubresourceLayout structure: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkSubresourceLayout { + /// VkDeviceSize offset; + /// VkDeviceSize size; + /// VkDeviceSize rowPitch; + /// VkDeviceSize arrayPitch; + /// VkDeviceSize depthPitch; + /// } VkSubresourceLayout; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public partial struct VkSubresourceLayout() + { + /// + /// Offset is the byte offset from the start of the image where the image subresource begins. + /// + [FieldOffset(0)] + public ByteSize64 Offset; + + /// + /// Size is the size in bytes of the image subresource. size includes any extra memory that is required based on rowPitch. + /// + [FieldOffset(8)] + public ByteSize64 Size; + + /// + /// RowPitch describes the number of bytes between each row of texels in an image. + /// + [FieldOffset(16)] + public ByteSize64 RowPitch; + + /// + /// ArrayPitch describes the number of bytes between each array layer of an image. + /// + [FieldOffset(24)] + public ByteSize64 ArrayPitch; + + /// + /// DepthPitch describes the number of bytes between each slice of 3D image. + /// + [FieldOffset(32)] + public ByteSize64 DepthPitch; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubresourceLayout2.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubresourceLayout2.gen.cs new file mode 100644 index 0000000..2f520b7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubresourceLayout2.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubresourceLayout2 - Structure specifying subresource layout + /// + /// + /// + /// Information about the layout of the image subresource is returned in a + /// VkSubresourceLayout2 structure: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkSubresourceLayout2 { + /// VkStructureType sType; + /// void* pNext; + /// VkSubresourceLayout subresourceLayout; + /// } VkSubresourceLayout2; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkSubresourceLayout2() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubresourceLayout2; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubresourceLayout is a VkSubresourceLayout structure. + /// + [FieldOffset(16)] + public VkSubresourceLayout SubresourceLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSubsampledImageFormatPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSubsampledImageFormatPropertiesEXT.gen.cs new file mode 100644 index 0000000..81d678c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSubsampledImageFormatPropertiesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSubsampledImageFormatPropertiesEXT - Structure specifying image descriptor count for subsampled images + /// + /// + /// + /// To determine the number of image descriptors required to support a + /// subsampled image created with VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, add + /// VkSubsampledImageFormatPropertiesEXT to the pNext chain of the + /// VkImageFormatProperties2 structure in a call to + /// vkGetPhysicalDeviceImageFormatProperties2. + /// + /// + /// The VkSubsampledImageFormatPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap with VK_EXT_fragment_density_map + /// typedef struct VkSubsampledImageFormatPropertiesEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t subsampledImageDescriptorCount; + /// } VkSubsampledImageFormatPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSubsampledImageFormatPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SubsampledImageFormatPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SubsampledImageDescriptorCount is the number of image descriptors that the implementation uses to access the image. + /// + [FieldOffset(16)] + public int SubsampledImageDescriptorCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2EXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2EXT.gen.cs new file mode 100644 index 0000000..140ba19 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2EXT.gen.cs @@ -0,0 +1,110 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCapabilities2EXT - Structure describing capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilities2EXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_display_surface_counter + /// typedef struct VkSurfaceCapabilities2EXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t minImageCount; + /// uint32_t maxImageCount; + /// VkExtent2D currentExtent; + /// VkExtent2D minImageExtent; + /// VkExtent2D maxImageExtent; + /// uint32_t maxImageArrayLayers; + /// VkSurfaceTransformFlagsKHR supportedTransforms; + /// VkSurfaceTransformFlagBitsKHR currentTransform; + /// VkCompositeAlphaFlagsKHR supportedCompositeAlpha; + /// VkImageUsageFlags supportedUsageFlags; + /// VkSurfaceCounterFlagsEXT supportedSurfaceCounters; + /// } VkSurfaceCapabilities2EXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkSurfaceCapabilities2EXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceCapabilities2EXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. include::{chapters}/VK_KHR_surface/wsi.adoc[tag=surface_capabilities_members] + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinImageCount + /// + [FieldOffset(16)] + public int MinImageCount; + + /// + /// MaxImageCount + /// + [FieldOffset(20)] + public int MaxImageCount; + + /// + /// CurrentExtent + /// + [FieldOffset(24)] + public VkExtent2D CurrentExtent; + + /// + /// MinImageExtent + /// + [FieldOffset(32)] + public VkExtent2D MinImageExtent; + + /// + /// MaxImageExtent + /// + [FieldOffset(40)] + public VkExtent2D MaxImageExtent; + + /// + /// MaxImageArrayLayers + /// + [FieldOffset(48)] + public int MaxImageArrayLayers; + + /// + /// SupportedTransforms + /// + [FieldOffset(52)] + public VkSurfaceTransformFlagsKHR SupportedTransforms; + + /// + /// CurrentTransform + /// + [FieldOffset(56)] + public VkSurfaceTransformFlagsKHR CurrentTransform; + + /// + /// SupportedCompositeAlpha + /// + [FieldOffset(60)] + public VkCompositeAlphaFlagsKHR SupportedCompositeAlpha; + + /// + /// SupportedUsageFlags + /// + [FieldOffset(64)] + public VkImageUsageFlags SupportedUsageFlags; + + /// + /// SupportedSurfaceCounters is a bitmask of VkSurfaceCounterFlagsEXT indicating the supported surface counter types. It must not include VK_SURFACE_COUNTER_VBLANK_BIT_EXT unless the surface queried is a display surface^ + /// + [FieldOffset(68)] + public VkSurfaceCounterFlagsEXT SupportedSurfaceCounters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2KHR.gen.cs new file mode 100644 index 0000000..aa52185 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilities2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCapabilities2KHR - Structure describing capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilities2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_surface_capabilities2 + /// typedef struct VkSurfaceCapabilities2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkSurfaceCapabilitiesKHR surfaceCapabilities; + /// } VkSurfaceCapabilities2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkSurfaceCapabilities2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceCapabilities2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SurfaceCapabilities is a VkSurfaceCapabilitiesKHR structure describing the capabilities of the specified surface. + /// + [FieldOffset(16)] + public VkSurfaceCapabilitiesKHR SurfaceCapabilities; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..489b371 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesKHR.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCapabilitiesKHR - Structure describing capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_surface + /// typedef struct VkSurfaceCapabilitiesKHR { + /// uint32_t minImageCount; + /// uint32_t maxImageCount; + /// VkExtent2D currentExtent; + /// VkExtent2D minImageExtent; + /// VkExtent2D maxImageExtent; + /// uint32_t maxImageArrayLayers; + /// VkSurfaceTransformFlagsKHR supportedTransforms; + /// VkSurfaceTransformFlagBitsKHR currentTransform; + /// VkCompositeAlphaFlagsKHR supportedCompositeAlpha; + /// VkImageUsageFlags supportedUsageFlags; + /// } VkSurfaceCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 52)] + public partial struct VkSurfaceCapabilitiesKHR() + { + /// + /// MinImageCount + /// + [FieldOffset(0)] + public int MinImageCount; + + /// + /// MaxImageCount + /// + [FieldOffset(4)] + public int MaxImageCount; + + /// + /// CurrentExtent + /// + [FieldOffset(8)] + public VkExtent2D CurrentExtent; + + /// + /// MinImageExtent + /// + [FieldOffset(16)] + public VkExtent2D MinImageExtent; + + /// + /// MaxImageExtent + /// + [FieldOffset(24)] + public VkExtent2D MaxImageExtent; + + /// + /// MaxImageArrayLayers + /// + [FieldOffset(32)] + public int MaxImageArrayLayers; + + /// + /// SupportedTransforms + /// + [FieldOffset(36)] + public VkSurfaceTransformFlagsKHR SupportedTransforms; + + /// + /// CurrentTransform + /// + [FieldOffset(40)] + public VkSurfaceTransformFlagsKHR CurrentTransform; + + /// + /// SupportedCompositeAlpha + /// + [FieldOffset(44)] + public VkCompositeAlphaFlagsKHR SupportedCompositeAlpha; + + /// + /// SupportedUsageFlags + /// + [FieldOffset(48)] + public VkImageUsageFlags SupportedUsageFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentBarrierNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentBarrierNV.gen.cs new file mode 100644 index 0000000..450c2fe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentBarrierNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCapabilitiesPresentBarrierNV - Structure describing present barrier capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilitiesPresentBarrierNV structure is defined as: + /// + /// + /// // Provided by VK_NV_present_barrier + /// typedef struct VkSurfaceCapabilitiesPresentBarrierNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentBarrierSupported; + /// } VkSurfaceCapabilitiesPresentBarrierNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSurfaceCapabilitiesPresentBarrierNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceCapabilitiesPresentBarrierNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentBarrierSupported is a boolean describing whether the surface is able to make use of the present barrier feature. + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentBarrierSupported; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentId2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentId2KHR.gen.cs new file mode 100644 index 0000000..b9dc40e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentId2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCapabilitiesPresentId2KHR - Structure describing presentation-ID capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilitiesPresentId2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_id2 + /// typedef struct VkSurfaceCapabilitiesPresentId2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentId2Supported; + /// } VkSurfaceCapabilitiesPresentId2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSurfaceCapabilitiesPresentId2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceCapabilitiesPresentId2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentId2Supported is a boolean describing whether the surface is able to support the present-ID extension + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentId2Supported; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentWait2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentWait2KHR.gen.cs new file mode 100644 index 0000000..d104202 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceCapabilitiesPresentWait2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceCapabilitiesPresentWait2KHR - Structure describing presentation-wait capabilities of a surface + /// + /// + /// + /// The VkSurfaceCapabilitiesPresentWait2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_present_wait2 + /// typedef struct VkSurfaceCapabilitiesPresentWait2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentWait2Supported; + /// } VkSurfaceCapabilitiesPresentWait2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSurfaceCapabilitiesPresentWait2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceCapabilitiesPresentWait2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentWait2Supported is a boolean describing whether the surface is able to support the present-wait extension + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentWait2Supported; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceFormat2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceFormat2KHR.gen.cs new file mode 100644 index 0000000..c4d1de9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceFormat2KHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceFormat2KHR - Structure describing a supported swapchain format tuple + /// + /// + /// + /// The VkSurfaceFormat2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_get_surface_capabilities2 + /// typedef struct VkSurfaceFormat2KHR { + /// VkStructureType sType; + /// void* pNext; + /// VkSurfaceFormatKHR surfaceFormat; + /// } VkSurfaceFormat2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSurfaceFormat2KHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceFormat2KHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SurfaceFormat is a VkSurfaceFormatKHR structure describing a format-color space pair that is compatible with the specified surface. + /// + [FieldOffset(16)] + public VkSurfaceFormatKHR SurfaceFormat; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceFormatKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceFormatKHR.gen.cs new file mode 100644 index 0000000..6f79375 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceFormatKHR.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceFormatKHR - Structure describing a supported swapchain format-color space pair + /// + /// + /// + /// The VkSurfaceFormatKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_surface + /// typedef struct VkSurfaceFormatKHR { + /// VkFormat format; + /// VkColorSpaceKHR colorSpace; + /// } VkSurfaceFormatKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkSurfaceFormatKHR() + { + /// + /// Format is a VkFormat that is compatible with the specified surface. + /// + [FieldOffset(0)] + public VkFormat Format; + + /// + /// ColorSpace is a presentation VkColorSpaceKHR that is compatible with the surface. + /// + [FieldOffset(4)] + public VkColorSpaceKHR ColorSpace; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeCompatibilityKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeCompatibilityKHR.gen.cs new file mode 100644 index 0000000..385f991 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeCompatibilityKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfacePresentModeCompatibilityKHR - Structure describing the subset of compatible presentation modes for the purposes of switching without swapchain recreation + /// + /// + /// + /// The VkSurfacePresentModeCompatibilityKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_surface_maintenance1 + /// typedef struct VkSurfacePresentModeCompatibilityKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t presentModeCount; + /// VkPresentModeKHR* pPresentModes; + /// } VkSurfacePresentModeCompatibilityKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSurfacePresentModeCompatibilityKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfacePresentModeCompatibilityKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentModeCount is an integer related to the number of present modes available or queried, as described below. + /// + [FieldOffset(16)] + public int PresentModeCount; + + /// + /// PresentModes is a pointer to an array of VkPresentModeKHR in which present modes compatible with a given present mode are returned. + /// + [FieldOffset(24)] + public VkPresentModeKHR* PresentModes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeKHR.gen.cs new file mode 100644 index 0000000..15bf394 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfacePresentModeKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfacePresentModeKHR - Structure describing present mode of a surface + /// + /// + /// + /// The VkSurfacePresentModeKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_surface_maintenance1 + /// typedef struct VkSurfacePresentModeKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPresentModeKHR presentMode; + /// } VkSurfacePresentModeKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSurfacePresentModeKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfacePresentModeKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentMode is the presentation mode the swapchain will use. + /// + [FieldOffset(16)] + public VkPresentModeKHR PresentMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfacePresentScalingCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfacePresentScalingCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..843eefd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfacePresentScalingCapabilitiesKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfacePresentScalingCapabilitiesKHR - Structure describing the presentation scaling capabilities of the surface + /// + /// + /// + /// The VkSurfacePresentScalingCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_surface_maintenance1 + /// typedef struct VkSurfacePresentScalingCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkPresentScalingFlagsKHR supportedPresentScaling; + /// VkPresentGravityFlagsKHR supportedPresentGravityX; + /// VkPresentGravityFlagsKHR supportedPresentGravityY; + /// VkExtent2D minScaledImageExtent; + /// VkExtent2D maxScaledImageExtent; + /// } VkSurfacePresentScalingCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkSurfacePresentScalingCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfacePresentScalingCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportedPresentScaling is a bitmask of VkPresentScalingFlagsKHR representing the scaling methods supported by the surface, or `0` if application-defined scaling is not supported. + /// + [FieldOffset(16)] + public VkPresentScalingFlagsKHR SupportedPresentScaling; + + /// + /// SupportedPresentGravityX is a bitmask of VkPresentGravityFlagsKHR representing the X-axis pixel gravity supported by the surface, or `0` if Vulkan-defined pixel gravity is not supported for the X axis. + /// + [FieldOffset(20)] + public VkPresentGravityFlagsKHR SupportedPresentGravityX; + + /// + /// SupportedPresentGravityY is a bitmask of VkPresentGravityFlagsKHR representing the Y-axis pixel gravity supported by the surface, or `0` if Vulkan-defined pixel gravity is not supported for the Y axis. + /// + [FieldOffset(24)] + public VkPresentGravityFlagsKHR SupportedPresentGravityY; + + /// + /// MinScaledImageExtent contains the smallest valid swapchain extent for the surface on the specified device when one of the scaling methods specified in supportedPresentScaling is used, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface. The width and height of the extent will each be smaller than or equal to the corresponding width and height of VkSurfaceCapabilitiesKHR::minImageExtent. + /// + [FieldOffset(28)] + public VkExtent2D MinScaledImageExtent; + + /// + /// MaxScaledImageExtent contains the largest valid swapchain extent for the surface on the specified device when one of the scaling methods specified in supportedPresentScaling is used, or the special value described above for minScaledImageExtent. The width and height of the extent will each be greater than or equal to the corresponding width and height of VkSurfaceCapabilitiesKHR::maxImageExtent. + /// + [FieldOffset(36)] + public VkExtent2D MaxScaledImageExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSurfaceProtectedCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSurfaceProtectedCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..1471b69 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSurfaceProtectedCapabilitiesKHR.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSurfaceProtectedCapabilitiesKHR - Structure describing capability of a surface to be protected + /// + /// + /// + /// An application queries if a protected VkSurfaceKHR is displayable on a + /// specific windowing system using VkSurfaceProtectedCapabilitiesKHR, + /// which can be passed in pNext parameter of + /// VkSurfaceCapabilities2KHR. + /// + /// + /// The VkSurfaceProtectedCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_surface_protected_capabilities + /// typedef struct VkSurfaceProtectedCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 supportsProtected; + /// } VkSurfaceProtectedCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSurfaceProtectedCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SurfaceProtectedCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportsProtected specifies whether a protected swapchain created from VkPhysicalDeviceSurfaceInfo2KHR::surface for a particular windowing system can be displayed on screen or not. If supportsProtected is VK_TRUE, then creation of swapchains with the VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR flag set must be supported for surface. + /// + [FieldOffset(16)] + public Brutal.Bool32 SupportsProtected; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainCalibratedTimestampInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainCalibratedTimestampInfoEXT.gen.cs new file mode 100644 index 0000000..96ddf43 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainCalibratedTimestampInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainCalibratedTimestampInfoEXT - Structure specifying the swapchain to calibrate a swapchain-local timestamp query + /// + /// + /// + /// The VkSwapchainCalibratedTimestampInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkSwapchainCalibratedTimestampInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkSwapchainKHR swapchain; + /// VkPresentStageFlagsEXT presentStage; + /// uint64_t timeDomainId; + /// } VkSwapchainCalibratedTimestampInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSwapchainCalibratedTimestampInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainCalibratedTimestampInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Swapchain is the swapchain to retrieve the swapchain-local timestamp from. + /// + [FieldOffset(16)] + public VkSwapchainKHR Swapchain; + + /// + /// PresentStage is zero or a VkPresentStageFlagsEXT value used to identify a single present stage when calibrating a timestamp in the VK_TIME_DOMAIN_PRESENT_STAGE_LOCAL_EXT time domain. + /// + [FieldOffset(24)] + public VkPresentStageFlagsEXT PresentStage; + + /// + /// TimeDomainId is the id for the opaque time domain being calibrated. + /// + [FieldOffset(32)] + public nint TimeDomainId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainCounterCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainCounterCreateInfoEXT.gen.cs new file mode 100644 index 0000000..1217548 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainCounterCreateInfoEXT.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainCounterCreateInfoEXT - Specify the surface counters desired + /// + /// + /// + /// To enable surface counters when creating a swapchain, add a + /// VkSwapchainCounterCreateInfoEXT structure to the pNext chain of + /// VkSwapchainCreateInfoKHR. + /// VkSwapchainCounterCreateInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_display_control + /// typedef struct VkSwapchainCounterCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkSurfaceCounterFlagsEXT surfaceCounters; + /// } VkSwapchainCounterCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSwapchainCounterCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainCounterCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SurfaceCounters is a bitmask of VkSurfaceCounterFlagsEXT specifying surface counters to enable for the swapchain. + /// + [FieldOffset(16)] + public VkSurfaceCounterFlagsEXT SurfaceCounters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainCreateInfoKHR.gen.cs new file mode 100644 index 0000000..32b5181 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainCreateInfoKHR.gen.cs @@ -0,0 +1,145 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainCreateInfoKHR - Structure specifying parameters of a newly created swapchain object + /// + /// + /// + /// The VkSwapchainCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain + /// typedef struct VkSwapchainCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkSwapchainCreateFlagsKHR flags; + /// VkSurfaceKHR surface; + /// uint32_t minImageCount; + /// VkFormat imageFormat; + /// VkColorSpaceKHR imageColorSpace; + /// VkExtent2D imageExtent; + /// uint32_t imageArrayLayers; + /// VkImageUsageFlags imageUsage; + /// VkSharingMode imageSharingMode; + /// uint32_t queueFamilyIndexCount; + /// const uint32_t* pQueueFamilyIndices; + /// VkSurfaceTransformFlagBitsKHR preTransform; + /// VkCompositeAlphaFlagBitsKHR compositeAlpha; + /// VkPresentModeKHR presentMode; + /// VkBool32 clipped; + /// VkSwapchainKHR oldSwapchain; + /// } VkSwapchainCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public unsafe partial struct VkSwapchainCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkSwapchainCreateFlagsKHR indicating parameters of the swapchain creation. + /// + [FieldOffset(16)] + public VkSwapchainCreateFlagsKHR Flags; + + /// + /// Surface is the surface onto which the swapchain will present images. If the creation succeeds, the swapchain becomes associated with surface. + /// + [FieldOffset(24)] + public VkSurfaceKHR Surface; + + /// + /// MinImageCount is the minimum number of presentable images that the application needs. The implementation will either create the swapchain with at least that many images, or it will fail to create the swapchain. + /// + [FieldOffset(32)] + public int MinImageCount; + + /// + /// ImageFormat is a VkFormat value specifying the format the swapchain image(s) will be created with. + /// + [FieldOffset(36)] + public VkFormat ImageFormat; + + /// + /// ImageColorSpace is a VkColorSpaceKHR value specifying the way the swapchain interprets image data. + /// + [FieldOffset(40)] + public VkColorSpaceKHR ImageColorSpace; + + /// + /// ImageExtent is the size (in pixels) of the swapchain image(s). The behavior is platform-dependent if the image extent does not match the surface's currentExtent as returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR. + [NOTE] + /// + [FieldOffset(44)] + public VkExtent2D ImageExtent; + + /// + /// ImageArrayLayers + /// + [FieldOffset(52)] + public int ImageArrayLayers; + + /// + /// ImageUsage + /// + [FieldOffset(56)] + public VkImageUsageFlags ImageUsage; + + /// + /// ImageSharingMode + /// + [FieldOffset(60)] + public VkSharingMode ImageSharingMode; + + /// + /// QueueFamilyIndexCount + /// + [FieldOffset(64)] + public int QueueFamilyIndexCount; + + /// + /// QueueFamilyIndices + /// + [FieldOffset(72)] + public int* QueueFamilyIndices; + + /// + /// PreTransform + /// + [FieldOffset(80)] + public VkSurfaceTransformFlagsKHR PreTransform; + + /// + /// CompositeAlpha + /// + [FieldOffset(84)] + public VkCompositeAlphaFlagsKHR CompositeAlpha; + + /// + /// PresentMode + /// + [FieldOffset(88)] + public VkPresentModeKHR PresentMode; + + /// + /// Clipped + /// + [FieldOffset(92)] + public Brutal.Bool32 Clipped; + + /// + /// OldSwapchain + /// + [FieldOffset(96)] + public VkSwapchainKHR OldSwapchain; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainDisplayNativeHdrCreateInfoAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainDisplayNativeHdrCreateInfoAMD.gen.cs new file mode 100644 index 0000000..045543d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainDisplayNativeHdrCreateInfoAMD.gen.cs @@ -0,0 +1,46 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainDisplayNativeHdrCreateInfoAMD - Structure specifying display native HDR parameters of a newly created swapchain object + /// + /// + /// + /// If the pNext chain of VkSwapchainCreateInfoKHR includes a + /// VkSwapchainDisplayNativeHdrCreateInfoAMD structure, then that + /// structure includes additional swapchain creation parameters specific to + /// display native HDR support. + /// + /// + /// The VkSwapchainDisplayNativeHdrCreateInfoAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_display_native_hdr + /// typedef struct VkSwapchainDisplayNativeHdrCreateInfoAMD { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 localDimmingEnable; + /// } VkSwapchainDisplayNativeHdrCreateInfoAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSwapchainDisplayNativeHdrCreateInfoAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainDisplayNativeHdrCreateInfoAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LocalDimmingEnable specifies whether local dimming is enabled for the swapchain. + /// + [FieldOffset(16)] + public Brutal.Bool32 LocalDimmingEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainFlagsSurfaceCapabilitiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainFlagsSurfaceCapabilitiesEXT.gen.cs new file mode 100644 index 0000000..b065657 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainFlagsSurfaceCapabilitiesEXT.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainFlagsSurfaceCapabilitiesEXT - Structure describing supported swapchain create flags for a surface + /// + /// + /// + /// The VkSwapchainFlagsSurfaceCapabilitiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_multisampled_render_to_swapchain + /// typedef struct VkSwapchainFlagsSurfaceCapabilitiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// VkSwapchainCreateFlagsKHR swapchainSupportedFlags; + /// } VkSwapchainFlagsSurfaceCapabilitiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSwapchainFlagsSurfaceCapabilitiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainFlagsSurfaceCapabilitiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainSupportedFlags is a bitmask of VkSwapchainCreateFlagsKHR representing the supported flags in VkSwapchainCreateInfoKHR when creating a swapchain for the surface on the specified device. + /// + [FieldOffset(16)] + public VkSwapchainCreateFlagsKHR SwapchainSupportedFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainLatencyCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainLatencyCreateInfoNV.gen.cs new file mode 100644 index 0000000..2e5c686 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainLatencyCreateInfoNV.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainLatencyCreateInfoNV - Specify that a swapchain will use low latency mode + /// + /// + /// + /// To allow low latency mode to be used by a swapchain, add a + /// VkSwapchainLatencyCreateInfoNV structure to the pNext chain of + /// VkSwapchainCreateInfoKHR. + /// + /// + /// The VkSwapchainLatencyCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_low_latency2 + /// typedef struct VkSwapchainLatencyCreateInfoNV { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 latencyModeEnable; + /// } VkSwapchainLatencyCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSwapchainLatencyCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainLatencyCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// LatencyModeEnable is VK_TRUE if the created swapchain will utilize low latency mode, VK_FALSE otherwise. + /// + [FieldOffset(16)] + public Brutal.Bool32 LatencyModeEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentBarrierCreateInfoNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentBarrierCreateInfoNV.gen.cs new file mode 100644 index 0000000..e8758d4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentBarrierCreateInfoNV.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainPresentBarrierCreateInfoNV - specify the present barrier membership of this swapchain + /// + /// + /// + /// The VkSwapchainPresentBarrierCreateInfoNV structure is defined as: + /// + /// + /// // Provided by VK_NV_present_barrier + /// typedef struct VkSwapchainPresentBarrierCreateInfoNV { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 presentBarrierEnable; + /// } VkSwapchainPresentBarrierCreateInfoNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkSwapchainPresentBarrierCreateInfoNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainPresentBarrierCreateInfoNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentBarrierEnable is a boolean value indicating a request for using the present barrier. + /// + [FieldOffset(16)] + public Brutal.Bool32 PresentBarrierEnable; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentFenceInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentFenceInfoKHR.gen.cs new file mode 100644 index 0000000..ea1348b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentFenceInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainPresentFenceInfoKHR - Fences associated with a vkQueuePresentKHR operation + /// + /// + /// + /// The VkSwapchainPresentFenceInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain_maintenance1 + /// typedef struct VkSwapchainPresentFenceInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const VkFence* pFences; + /// } VkSwapchainPresentFenceInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSwapchainPresentFenceInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainPresentFenceInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to by this command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// Fences is a list of fences with swapchainCount entries. Each entry must be VK_NULL_HANDLE or the handle of a fence to signal when the relevant operations on the associated swapchain have completed. + /// + [FieldOffset(24)] + public VkFence* Fences; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModeInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModeInfoKHR.gen.cs new file mode 100644 index 0000000..4664c6c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModeInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainPresentModeInfoKHR - Presentation modes for a vkQueuePresentKHR operation + /// + /// + /// + /// The VkSwapchainPresentModeInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain_maintenance1 + /// typedef struct VkSwapchainPresentModeInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t swapchainCount; + /// const VkPresentModeKHR* pPresentModes; + /// } VkSwapchainPresentModeInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSwapchainPresentModeInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainPresentModeInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SwapchainCount is the number of swapchains being presented to by this command. + /// + [FieldOffset(16)] + public int SwapchainCount; + + /// + /// PresentModes is a list of presentation modes with swapchainCount entries. + /// + [FieldOffset(24)] + public VkPresentModeKHR* PresentModes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModesCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModesCreateInfoKHR.gen.cs new file mode 100644 index 0000000..2c2b6ce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentModesCreateInfoKHR.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainPresentModesCreateInfoKHR - All presentation modes usable by the swapchain + /// + /// + /// + /// Applications can modify the presentation mode used by the swapchain on a + /// per-presentation basis. + /// However, all presentation modes the application intends to use with the + /// swapchain must be specified at swapchain creation time. + /// To specify more than one presentation mode when creating a swapchain, + /// include the VkSwapchainPresentModesCreateInfoKHR structure in the + /// pNext chain of the VkSwapchainCreateInfoKHR structure. + /// + /// + /// The VkSwapchainPresentModesCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain_maintenance1 + /// typedef struct VkSwapchainPresentModesCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t presentModeCount; + /// const VkPresentModeKHR* pPresentModes; + /// } VkSwapchainPresentModesCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSwapchainPresentModesCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainPresentModesCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PresentModeCount is the number of presentation modes provided. + /// + [FieldOffset(16)] + public int PresentModeCount; + + /// + /// PresentModes is a list of presentation modes with presentModeCount entries + /// + [FieldOffset(24)] + public VkPresentModeKHR* PresentModes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentScalingCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentScalingCreateInfoKHR.gen.cs new file mode 100644 index 0000000..54a9b6e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainPresentScalingCreateInfoKHR.gen.cs @@ -0,0 +1,71 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainPresentScalingCreateInfoKHR - Scaling behavior when presenting to the surface + /// + /// + /// + /// When an application presents a swapchain image with dimensions different + /// than those of the target surface, different behavior is possible on + /// different platforms per their respective specifications: + /// + /// + /// * Presentation fails and VK_ERROR_OUT_OF_DATE_KHR is returned + /// * Scaling is done and VK_SUCCESS or VK_SUBOPTIMAL_KHR is + /// returned + /// * Unspecified scaling using an arbitrary combination of stretching, + /// centering and/or clipping. + /// + /// + /// Applications can define specific behavior when creating a swapchain by + /// including the VkSwapchainPresentScalingCreateInfoKHR structure in the + /// pNext chain of the VkSwapchainCreateInfoKHR structure. + /// + /// + /// The VkSwapchainPresentScalingCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_swapchain_maintenance1 + /// typedef struct VkSwapchainPresentScalingCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkPresentScalingFlagsKHR scalingBehavior; + /// VkPresentGravityFlagsKHR presentGravityX; + /// VkPresentGravityFlagsKHR presentGravityY; + /// } VkSwapchainPresentScalingCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSwapchainPresentScalingCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainPresentScalingCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ScalingBehavior is `0` or the scaling method to use when the dimensions of the surface and swapchain images differ. + /// + [FieldOffset(16)] + public VkPresentScalingFlagsKHR ScalingBehavior; + + /// + /// PresentGravityX is `0` or the x-axis direction in which swapchain image pixels gravitate relative to the surface when scalingBehavior does not result in a one-to-one pixel mapping between the scaled swapchain image and the surface. + /// + [FieldOffset(20)] + public VkPresentGravityFlagsKHR PresentGravityX; + + /// + /// PresentGravityY is `0` or the y-axis direction in which swapchain image pixels gravitate relative to the surface when scalingBehavior does not result in a one-to-one pixel mapping between the scaled swapchain image and the surface. + /// + [FieldOffset(24)] + public VkPresentGravityFlagsKHR PresentGravityY; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainTimeDomainPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainTimeDomainPropertiesEXT.gen.cs new file mode 100644 index 0000000..57ce854 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainTimeDomainPropertiesEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainTimeDomainPropertiesEXT - List of available time domains for a swapchain + /// + /// + /// + /// The VkSwapchainTimeDomainPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkSwapchainTimeDomainPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t timeDomainCount; + /// VkTimeDomainKHR* pTimeDomains; + /// uint64_t* pTimeDomainIds; + /// } VkSwapchainTimeDomainPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkSwapchainTimeDomainPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainTimeDomainPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TimeDomainCount is an integer related to the number of time domains available or queried, as described below. + /// + [FieldOffset(16)] + public int TimeDomainCount; + + /// + /// TimeDomains is a pointer to an array of VkTimeDomainKHR values representing time domains that are available for the swapchain. + /// + [FieldOffset(24)] + public VkTimeDomainKHR* TimeDomains; + + /// + /// TimeDomainIds is a pointer to an array of unique identifiers for each time domain. + /// + [FieldOffset(32)] + public nint* TimeDomainIds; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkSwapchainTimingPropertiesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkSwapchainTimingPropertiesEXT.gen.cs new file mode 100644 index 0000000..124ba89 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkSwapchainTimingPropertiesEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkSwapchainTimingPropertiesEXT - Structure containing the RC duration of a display + /// + /// + /// + /// The VkSwapchainTimingPropertiesEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_present_timing + /// typedef struct VkSwapchainTimingPropertiesEXT { + /// VkStructureType sType; + /// void* pNext; + /// uint64_t refreshDuration; + /// uint64_t refreshInterval; + /// } VkSwapchainTimingPropertiesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkSwapchainTimingPropertiesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.SwapchainTimingPropertiesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RefreshDuration is zero or an indication of the duration of a refresh cycle. + /// + [FieldOffset(16)] + public nint RefreshDuration; + + /// + /// RefreshInterval is zero or a duration in nanoseconds indicating the interval between refresh cycle durations. + /// + [FieldOffset(24)] + public nint RefreshInterval; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorCaptureDescriptorDataInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorCaptureDescriptorDataInfoARM.gen.cs new file mode 100644 index 0000000..ffd39d9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorCaptureDescriptorDataInfoARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorCaptureDescriptorDataInfoARM - Structure specifying a tensor for descriptor capture + /// + /// + /// + /// Information about the tensor to get descriptor buffer capture data for is + /// passed in a VkTensorCaptureDescriptorDataInfoARM structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// typedef struct VkTensorCaptureDescriptorDataInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorARM tensor; + /// } VkTensorCaptureDescriptorDataInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkTensorCaptureDescriptorDataInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorCaptureDescriptorDataInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Tensor is the VkTensorARM handle of the tensor to get opaque capture data for. + /// + [FieldOffset(16)] + public VkTensorARM Tensor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorCopyARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorCopyARM.gen.cs new file mode 100644 index 0000000..7805b19 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorCopyARM.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorCopyARM - Structure specifying an tensor copy region + /// + /// + /// + /// The VkTensorCopyARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorCopyARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t dimensionCount; + /// const uint64_t* pSrcOffset; + /// const uint64_t* pDstOffset; + /// const uint64_t* pExtent; + /// } VkTensorCopyARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkTensorCopyARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorCopyARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DimensionCount is the number of elements in the pSrcOffset, pDstOffset and pExtent arrays. + /// + [FieldOffset(16)] + public int DimensionCount; + + /// + /// SrcOffset is `NULL` or an array of size dimensionCount providing an offset into the source tensor. When pSrcOffset is `NULL`, the offset into the source tensor is `0` in all dimensions. + /// + [FieldOffset(24)] + public nint* SrcOffset; + + /// + /// DstOffset is `NULL` or an array of size dimensionCount providing an offset into the destination tensor. When pDstOffset is `NULL`, the offset into the destination tensor is `0` in all dimensions. + /// + [FieldOffset(32)] + public nint* DstOffset; + + /// + /// Extent is `NULL` or an array of size dimensionCount providing the number of elements to copy in each dimension. When pExtent is `NULL`, the number of elements to copy is taken as the total number of elements in each dimension of the source tensor. + /// + [FieldOffset(40)] + public nint* Extent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorCreateInfoARM.gen.cs new file mode 100644 index 0000000..4c4046c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorCreateInfoARM.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorCreateInfoARM - Structure specifying the parameters of a newly created tensor object + /// + /// + /// + /// The VkTensorCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorCreateFlagsARM flags; + /// const VkTensorDescriptionARM* pDescription; + /// VkSharingMode sharingMode; + /// uint32_t queueFamilyIndexCount; + /// const uint32_t* pQueueFamilyIndices; + /// } VkTensorCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkTensorCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkTensorCreateFlagsARM describing additional parameters of the tensor. + /// + [FieldOffset(16)] + public VkTensorCreateFlagsARM Flags; + + /// + /// Description is a pointer to an instance of VkTensorDescriptionARM describing the tensor. + /// + [FieldOffset(24)] + public VkTensorDescriptionARM* Description; + + /// + /// SharingMode is a VkSharingMode value specifying the sharing mode of the tensor when it will be accessed by multiple queue families. + /// + [FieldOffset(32)] + public VkSharingMode SharingMode; + + /// + /// QueueFamilyIndexCount is the number of entries in the pQueueFamilyIndices array. + /// + [FieldOffset(36)] + public int QueueFamilyIndexCount; + + /// + /// QueueFamilyIndices is a list of queue families that will access this tensor (ignored if sharingMode is not VK_SHARING_MODE_CONCURRENT). + /// + [FieldOffset(40)] + public int* QueueFamilyIndices; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorDependencyInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorDependencyInfoARM.gen.cs new file mode 100644 index 0000000..6d04753 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorDependencyInfoARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorDependencyInfoARM - Structure specifying tensor dependency information for a synchronization command + /// + /// + /// + /// The VkTensorDependencyInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorDependencyInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t tensorMemoryBarrierCount; + /// const VkTensorMemoryBarrierARM* pTensorMemoryBarriers; + /// } VkTensorDependencyInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkTensorDependencyInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorDependencyInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorMemoryBarrierCount is the length of the pTensorMemoryBarriers array. + /// + [FieldOffset(16)] + public int TensorMemoryBarrierCount; + + /// + /// TensorMemoryBarriers is a pointer to an array of VkTensorMemoryBarrierARM structures defining memory dependencies between tensors. + /// + [FieldOffset(24)] + public VkTensorMemoryBarrierARM* TensorMemoryBarriers; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorDescriptionARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorDescriptionARM.gen.cs new file mode 100644 index 0000000..9058114 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorDescriptionARM.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorDescriptionARM - Structure describing a tensor + /// + /// + /// + /// The VkTensorDescriptionARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorDescriptionARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorTilingARM tiling; + /// VkFormat format; + /// uint32_t dimensionCount; + /// const int64_t* pDimensions; + /// const int64_t* pStrides; + /// VkTensorUsageFlagsARM usage; + /// } VkTensorDescriptionARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkTensorDescriptionARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorDescriptionARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Tiling is a VkTensorTilingARM value specifying the tiling of the tensor + /// + [FieldOffset(16)] + public VkTensorTilingARM Tiling; + + /// + /// Format is a one component VkFormat describing the format and type of the data elements that will be contained in the tensor. + /// + [FieldOffset(20)] + public VkFormat Format; + + /// + /// DimensionCount is the number of dimensions for the tensor. + /// + [FieldOffset(24)] + public int DimensionCount; + + /// + /// Dimensions is a pointer to an array of integers of size dimensionCount providing the number of data elements in each dimension. + /// + [FieldOffset(32)] + public long* Dimensions; + + /// + /// Strides is either `NULL` or is an array of size dimensionCount providing the strides in bytes for the tensor in each dimension. + /// + [FieldOffset(40)] + public long* Strides; + + /// + /// Usage is a bitmask of VkTensorUsageFlagsARM specifying the usage of the tensor. + /// + [FieldOffset(48)] + public VkTensorUsageFlagsARM Usage; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorExplicitTilingFormatPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorExplicitTilingFormatPropertiesARM.gen.cs new file mode 100644 index 0000000..6f688b0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorExplicitTilingFormatPropertiesARM.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorExplicitTilingFormatPropertiesARM - Structure specifying properties of a format used to describe tensor elements with ARM-specific explicit tiling + /// + /// + /// + /// The VkTensorExplicitTilingFormatPropertiesARM structure describes + /// properties of a VkFormat when that format is used to describe tensor + /// elements. + /// These properties, like those of VkFormatProperties2, are independent + /// of any particular tensor. + /// + /// + /// The VkTensorExplicitTilingFormatPropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensor_controls + /// typedef struct VkTensorExplicitTilingFormatPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkFormatFeatureFlags2 brick16TilingTensorFeatures; + /// VkFormatFeatureFlags2 brick8TilingTensorFeatures; + /// VkFormatFeatureFlags2 brick4TilingTensorFeatures; + /// VkFormatFeatureFlags2 blockUTilingTensorFeatures; + /// VkFormatFeatureFlags2 blockU64kTilingTensorFeatures; + /// } VkTensorExplicitTilingFormatPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkTensorExplicitTilingFormatPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorExplicitTilingFormatPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Brick16TilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_BRICK_16_WIDE_ARM. + /// + [FieldOffset(16)] + public VkFormatFeatureFlags2 Brick16TilingTensorFeatures; + + /// + /// Brick8TilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_BRICK_8_WIDE_ARM. + /// + [FieldOffset(24)] + public VkFormatFeatureFlags2 Brick8TilingTensorFeatures; + + /// + /// Brick4TilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_BRICK_4_WIDE_ARM. + /// + [FieldOffset(32)] + public VkFormatFeatureFlags2 Brick4TilingTensorFeatures; + + /// + /// BlockUTilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_ARM. + /// + [FieldOffset(40)] + public VkFormatFeatureFlags2 BlockUTilingTensorFeatures; + + /// + /// BlockU64kTilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_BLOCK_U_INTERLEAVED_64K_ARM. + /// + [FieldOffset(48)] + public VkFormatFeatureFlags2 BlockU64kTilingTensorFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorFormatPropertiesARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorFormatPropertiesARM.gen.cs new file mode 100644 index 0000000..9db2748 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorFormatPropertiesARM.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorFormatPropertiesARM - Structure specifying properties of a format used to describe tensor elements + /// + /// + /// + /// The VkTensorFormatPropertiesARM structure describes properties of a + /// VkFormat when that format is used to describe tensor elements. + /// These properties, like those of VkFormatProperties2, are independent + /// of any particular tensor. + /// + /// + /// The VkTensorFormatPropertiesARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorFormatPropertiesARM { + /// VkStructureType sType; + /// void* pNext; + /// VkFormatFeatureFlags2 optimalTilingTensorFeatures; + /// VkFormatFeatureFlags2 linearTilingTensorFeatures; + /// } VkTensorFormatPropertiesARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkTensorFormatPropertiesARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorFormatPropertiesARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// OptimalTilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_OPTIMAL_ARM. + /// + [FieldOffset(16)] + public VkFormatFeatureFlags2 OptimalTilingTensorFeatures; + + /// + /// LinearTilingTensorFeatures is a bitmask of VkFormatFeatureFlags2 specifying features supported by tensors created with a tiling parameter of VK_TENSOR_TILING_LINEAR_ARM. + /// + [FieldOffset(24)] + public VkFormatFeatureFlags2 LinearTilingTensorFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorMemoryBarrierARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorMemoryBarrierARM.gen.cs new file mode 100644 index 0000000..6db9cc8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorMemoryBarrierARM.gen.cs @@ -0,0 +1,82 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorMemoryBarrierARM - Structure specifying a tensor memory barrier + /// + /// + /// + /// The VkTensorMemoryBarrierARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorMemoryBarrierARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkPipelineStageFlags2 srcStageMask; + /// VkAccessFlags2 srcAccessMask; + /// VkPipelineStageFlags2 dstStageMask; + /// VkAccessFlags2 dstAccessMask; + /// uint32_t srcQueueFamilyIndex; + /// uint32_t dstQueueFamilyIndex; + /// VkTensorARM tensor; + /// } VkTensorMemoryBarrierARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkTensorMemoryBarrierARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorMemoryBarrierARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SrcStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope^. + /// + [FieldOffset(16)] + public VkPipelineStageFlags2 SrcStageMask; + + /// + /// SrcAccessMask is a VkAccessFlags2 mask of access flags to be included in the first access scope^. + /// + [FieldOffset(24)] + public VkAccessFlags2 SrcAccessMask; + + /// + /// DstStageMask is a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope^. + /// + [FieldOffset(32)] + public VkPipelineStageFlags2 DstStageMask; + + /// + /// DstAccessMask is a VkAccessFlags2 mask of access flags to be included in the second access scope^. + /// + [FieldOffset(40)] + public VkAccessFlags2 DstAccessMask; + + /// + /// SrcQueueFamilyIndex is the source queue family for a queue family ownership transfer^. + /// + [FieldOffset(48)] + public int SrcQueueFamilyIndex; + + /// + /// DstQueueFamilyIndex is the destination queue family for a queue family ownership transfer^. + /// + [FieldOffset(52)] + public int DstQueueFamilyIndex; + + /// + /// Tensor is a handle to the tensor whose backing memory is affected by the barrier. + /// + [FieldOffset(56)] + public VkTensorARM Tensor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorMemoryRequirementsInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorMemoryRequirementsInfoARM.gen.cs new file mode 100644 index 0000000..3538ec3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorMemoryRequirementsInfoARM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorMemoryRequirementsInfoARM - Structure specifying memory requirements + /// + /// + /// + /// The VkTensorMemoryRequirementsInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkTensorMemoryRequirementsInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorARM tensor; + /// } VkTensorMemoryRequirementsInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkTensorMemoryRequirementsInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorMemoryRequirementsInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Tensor is the tensor to query. + /// + [FieldOffset(16)] + public VkTensorARM Tensor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorRollingBackingCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorRollingBackingCreateInfoARM.gen.cs new file mode 100644 index 0000000..33c391e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorRollingBackingCreateInfoARM.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorRollingBackingCreateInfoARM - Structure specifying the parameters of a newly created tensor object with rolling backing + /// + /// + /// + /// To create a tensor for which only a rolling window is backed by memory, add + /// a VkTensorRollingBackingCreateInfoARM structure to the pNext + /// chain of the VkTensorCreateInfoARM structure. + /// + /// + /// The VkTensorRollingBackingCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensor_controls + /// typedef struct VkTensorRollingBackingCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t wraps[VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM]; + /// } VkTensorRollingBackingCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkTensorRollingBackingCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorRollingBackingCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Wraps is an array of VK_MAX_TENSOR_CREATE_INFO_ROLLING_BACKING_WRAP_COUNT_ARM 32-bit integers specifying the size of the rolling window for the tensor along each of its dimensions. + /// + [FieldOffset(16)] + public uint4 Wraps; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorViewCaptureDescriptorDataInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorViewCaptureDescriptorDataInfoARM.gen.cs new file mode 100644 index 0000000..20587f0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorViewCaptureDescriptorDataInfoARM.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorViewCaptureDescriptorDataInfoARM - Structure specifying a tensor view for descriptor capture + /// + /// + /// + /// Information about the tensor view to get descriptor buffer capture data for + /// is passed in a VkTensorViewCaptureDescriptorDataInfoARM structure: + /// + /// + /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors + /// typedef struct VkTensorViewCaptureDescriptorDataInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorViewARM tensorView; + /// } VkTensorViewCaptureDescriptorDataInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkTensorViewCaptureDescriptorDataInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorViewCaptureDescriptorDataInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorView is the VkTensorViewARM handle of the tensor view to get opaque capture data for. + /// + [FieldOffset(16)] + public VkTensorViewARM TensorView; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTensorViewCreateInfoARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTensorViewCreateInfoARM.gen.cs new file mode 100644 index 0000000..bea7752 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTensorViewCreateInfoARM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTensorViewCreateInfoARM - Structure specifying parameters of a newly created tensor view + /// + /// + /// + /// The VkTensorViewCreateInfoARM structure is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap, VK_ARM_tensors + /// typedef struct VkTensorViewCreateInfoARM { + /// VkStructureType sType; + /// const void* pNext; + /// VkTensorViewCreateFlagsARM flags; + /// VkTensorARM tensor; + /// VkFormat format; + /// } VkTensorViewCreateInfoARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkTensorViewCreateInfoARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TensorViewCreateInfoARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkTensorViewCreateFlagsARM Flags; + + /// + /// Tensor is a VkTensorARM on which the view will be created. + /// + [FieldOffset(24)] + public VkTensorARM Tensor; + + /// + /// Format is a VkFormat describing the format and type used to interpret elements in the tensor. + /// + [FieldOffset(32)] + public VkFormat Format; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTexelBufferDescriptorInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTexelBufferDescriptorInfoEXT.gen.cs new file mode 100644 index 0000000..96bf76a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTexelBufferDescriptorInfoEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTexelBufferDescriptorInfoEXT - Structure describing an image descriptor created from a buffer + /// + /// + /// + /// VkTexelBufferDescriptorInfoEXT is defined as: + /// + /// + /// // Provided by VK_EXT_descriptor_heap + /// typedef struct VkTexelBufferDescriptorInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkFormat format; + /// VkDeviceAddressRangeEXT addressRange; + /// } VkTexelBufferDescriptorInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkTexelBufferDescriptorInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TexelBufferDescriptorInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is the VkFormat of the descriptor. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// AddressRange is a VkDeviceAddressRangeKHR defining the range of data backing the descriptor. + /// + [FieldOffset(24)] + public VkDeviceAddressRangeEXT AddressRange; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTextureLodGatherFormatPropertiesAMD.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTextureLodGatherFormatPropertiesAMD.gen.cs new file mode 100644 index 0000000..ea17aeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTextureLodGatherFormatPropertiesAMD.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTextureLODGatherFormatPropertiesAMD - Structure informing whether or not texture gather bias/LOD functionality is supported for a given image format and a given physical device. + /// + /// + /// + /// To determine if texture gather functions that take explicit LOD and/or bias + /// argument values can be used with a given image format, add a + /// VkTextureLODGatherFormatPropertiesAMD structure to the pNext + /// chain of the VkImageFormatProperties2 structure in a call to + /// vkGetPhysicalDeviceImageFormatProperties2. + /// + /// + /// The VkTextureLODGatherFormatPropertiesAMD structure is defined as: + /// + /// + /// // Provided by VK_AMD_texture_gather_bias_lod + /// typedef struct VkTextureLODGatherFormatPropertiesAMD { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 supportsTextureGatherLODBiasAMD; + /// } VkTextureLODGatherFormatPropertiesAMD; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkTextureLodGatherFormatPropertiesAMD() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TextureLodGatherFormatPropertiesAMD; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SupportsTextureGatherLODBiasAMD tells if the image format can be used with texture gather bias/LOD functions, as introduced by the `VK_AMD_texture_gather_bias_lod` extension. This field is set by the implementation. An application-specified value is ignored. + /// + [FieldOffset(16)] + public Brutal.Bool32 SupportsTextureGatherLODBiasAMD; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkThrottleHintSubmitInfoSEC.gen.cs b/Brutal.Vulkan/Generated/Structs/VkThrottleHintSubmitInfoSEC.gen.cs new file mode 100644 index 0000000..a3fc48e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkThrottleHintSubmitInfoSEC.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkThrottleHintSubmitInfoSEC - Stub description of VkThrottleHintSubmitInfoSEC + /// + /// + /// + /// There is currently no specification language written for this type. + /// This section acts only as placeholder and to avoid dead links in the + /// specification and reference pages. + /// + /// + /// // Provided by VK_SEC_throttle_hint + /// typedef struct VkThrottleHintSubmitInfoSEC { + /// VkStructureType sType; + /// const void* pNext; + /// VkThrottleHintTypeSEC throttleHint; + /// } VkThrottleHintSubmitInfoSEC; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkThrottleHintSubmitInfoSEC() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ThrottleHintSubmitInfoSEC; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ThrottleHint + /// + [FieldOffset(16)] + public VkThrottleHintTypeSEC ThrottleHint; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTileMemoryBindInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTileMemoryBindInfoQCOM.gen.cs new file mode 100644 index 0000000..ded59be --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTileMemoryBindInfoQCOM.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTileMemoryBindInfoQCOM - Structure specifying tile memory to bind + /// + /// + /// + /// The VkTileMemoryBindInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_memory_heap + /// typedef struct VkTileMemoryBindInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceMemory memory; + /// } VkTileMemoryBindInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkTileMemoryBindInfoQCOM() + { + /// + /// sType + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TileMemoryBindInfoQCOM; + + /// + /// Next + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Memory is the tile memory object to be bound. + /// + [FieldOffset(16)] + public VkDeviceMemory Memory; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTileMemoryRequirementsQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTileMemoryRequirementsQCOM.gen.cs new file mode 100644 index 0000000..e7d5cce --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTileMemoryRequirementsQCOM.gen.cs @@ -0,0 +1,52 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTileMemoryRequirementsQCOM - Structure specifying tile memory requirements + /// + /// + /// + /// To determine the tile memory allocation requirements of a buffer or image + /// resource, add a VkTileMemoryRequirementsQCOM structure to the + /// pNext chain of the VkMemoryRequirements2 structure passed as the + /// pMemoryRequirements parameter of vkGetBufferMemoryRequirements2 + /// or vkGetImageMemoryRequirements2, respectively. + /// The VkTileMemoryRequirementsQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_memory_heap + /// typedef struct VkTileMemoryRequirementsQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkDeviceSize size; + /// VkDeviceSize alignment; + /// } VkTileMemoryRequirementsQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkTileMemoryRequirementsQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TileMemoryRequirementsQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Size is the size, in bytes, of the tile memory allocation required for the resource. + /// + [FieldOffset(16)] + public ByteSize64 Size; + + /// + /// Alignment is the alignment, in bytes, of the offset within the tile memory allocation required for the resource. + /// + [FieldOffset(24)] + public ByteSize64 Alignment; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTileMemorySizeInfoQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTileMemorySizeInfoQCOM.gen.cs new file mode 100644 index 0000000..ba43fe8 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTileMemorySizeInfoQCOM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTileMemorySizeInfoQCOM - Structure describing tile memory size in use in a render pass instance + /// + /// + /// + /// The tile properties queried using VK_QCOM_tile_properties depend on + /// the size of the reserved tile memory by the application. + /// This size can be specified by the following structure to + /// VkRenderPassCreateInfo, VkRenderPassCreateInfo2 + /// to specify the reserved tile memory size for the render pass object. + /// + /// + /// The VkTileMemorySizeInfoQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_memory_heap with VK_QCOM_tile_properties + /// typedef struct VkTileMemorySizeInfoQCOM { + /// VkStructureType sType; + /// const void* pNext; + /// VkDeviceSize size; + /// } VkTileMemorySizeInfoQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkTileMemorySizeInfoQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TileMemorySizeInfoQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Size is the size in bytes of tile memory used by the render pass or preserved for later use. + /// + [FieldOffset(16)] + public ByteSize64 Size; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTilePropertiesQCOM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTilePropertiesQCOM.gen.cs new file mode 100644 index 0000000..103c5ea --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTilePropertiesQCOM.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTilePropertiesQCOM - Structure holding available tile properties + /// + /// + /// + /// The VkTilePropertiesQCOM structure is defined as: + /// + /// + /// // Provided by VK_QCOM_tile_properties + /// typedef struct VkTilePropertiesQCOM { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent3D tileSize; + /// VkExtent2D apronSize; + /// VkOffset2D origin; + /// } VkTilePropertiesQCOM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkTilePropertiesQCOM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TilePropertiesQCOM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TileSize is the dimensions of a tile, with width and height describing the width and height of a tile in pixels, and depth corresponding to the number of slices the tile spans. + /// + [FieldOffset(16)] + public VkExtent3D TileSize; + + /// + /// ApronSize is the dimension of the apron^. + /// + [FieldOffset(28)] + public VkExtent2D ApronSize; + + /// + /// Origin is the top-left corner of the first tile in attachment space. + /// + [FieldOffset(36)] + public VkOffset2D Origin; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTimelineSemaphoreSubmitInfo.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTimelineSemaphoreSubmitInfo.gen.cs new file mode 100644 index 0000000..09ed931 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTimelineSemaphoreSubmitInfo.gen.cs @@ -0,0 +1,67 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTimelineSemaphoreSubmitInfo - Structure specifying signal and wait values for timeline semaphores + /// + /// + /// + /// To specify the values to use when waiting for and signaling semaphores + /// created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE, + /// add a VkTimelineSemaphoreSubmitInfo structure to the pNext chain + /// of the VkSubmitInfo structure when using vkQueueSubmit + /// or the VkBindSparseInfo structure when using vkQueueBindSparse + /// . + /// The VkTimelineSemaphoreSubmitInfo structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_2 + /// typedef struct VkTimelineSemaphoreSubmitInfo { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t waitSemaphoreValueCount; + /// const uint64_t* pWaitSemaphoreValues; + /// uint32_t signalSemaphoreValueCount; + /// const uint64_t* pSignalSemaphoreValues; + /// } VkTimelineSemaphoreSubmitInfo; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkTimelineSemaphoreSubmitInfo() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.TimelineSemaphoreSubmitInfo; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WaitSemaphoreValueCount is the number of semaphore wait values specified in pWaitSemaphoreValues. + /// + [FieldOffset(16)] + public int WaitSemaphoreValueCount; + + /// + /// WaitSemaphoreValues is a pointer to an array of waitSemaphoreValueCount values for the corresponding semaphores in VkSubmitInfo::pWaitSemaphores to wait for. + /// + [FieldOffset(24)] + public nint* WaitSemaphoreValues; + + /// + /// SignalSemaphoreValueCount is the number of semaphore signal values specified in pSignalSemaphoreValues. + /// + [FieldOffset(32)] + public int SignalSemaphoreValueCount; + + /// + /// SignalSemaphoreValues is a pointer to an array signalSemaphoreValueCount values for the corresponding semaphores in VkSubmitInfo::pSignalSemaphores to set when signaled. + /// + [FieldOffset(40)] + public nint* SignalSemaphoreValues; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommand2KHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommand2KHR.gen.cs new file mode 100644 index 0000000..2f2ee48 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommand2KHR.gen.cs @@ -0,0 +1,120 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTraceRaysIndirectCommand2KHR - Structure specifying the parameters of an indirect trace ray command with indirect shader binding tables + /// + /// + /// + /// :refpage: VkTraceRaysIndirectCommand2KHR + /// + /// + /// The VkTraceRaysIndirectCommand2KHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline + /// typedef struct VkTraceRaysIndirectCommand2KHR { + /// VkDeviceAddress raygenShaderRecordAddress; + /// VkDeviceSize raygenShaderRecordSize; + /// VkDeviceAddress missShaderBindingTableAddress; + /// VkDeviceSize missShaderBindingTableSize; + /// VkDeviceSize missShaderBindingTableStride; + /// VkDeviceAddress hitShaderBindingTableAddress; + /// VkDeviceSize hitShaderBindingTableSize; + /// VkDeviceSize hitShaderBindingTableStride; + /// VkDeviceAddress callableShaderBindingTableAddress; + /// VkDeviceSize callableShaderBindingTableSize; + /// VkDeviceSize callableShaderBindingTableStride; + /// uint32_t width; + /// uint32_t height; + /// uint32_t depth; + /// } VkTraceRaysIndirectCommand2KHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 104)] + public partial struct VkTraceRaysIndirectCommand2KHR() + { + /// + /// RaygenShaderRecordAddress is a basetype:VkDeviceAddress of the ray generation shader binding table record used by this command. + /// + [FieldOffset(0)] + public VkDeviceAddress RaygenShaderRecordAddress; + + /// + /// RaygenShaderRecordSize is a basetype:VkDeviceSize number of bytes corresponding to the ray generation shader binding table record at base address raygenShaderRecordAddress. + /// + [FieldOffset(8)] + public ByteSize64 RaygenShaderRecordSize; + + /// + /// MissShaderBindingTableAddress is a basetype:VkDeviceAddress of the first record in the miss shader binding table used by this command. + /// + [FieldOffset(16)] + public VkDeviceAddress MissShaderBindingTableAddress; + + /// + /// MissShaderBindingTableSize is a basetype:VkDeviceSize number of bytes corresponding to the total size of the miss shader binding table at missShaderBindingTableAddress that may be accessed by this command. + /// + [FieldOffset(24)] + public ByteSize64 MissShaderBindingTableSize; + + /// + /// MissShaderBindingTableStride is a basetype:VkDeviceSize number of bytes between records of the miss shader binding table. + /// + [FieldOffset(32)] + public ByteSize64 MissShaderBindingTableStride; + + /// + /// HitShaderBindingTableAddress is a basetype:VkDeviceAddress of the first record in the hit shader binding table used by this command. + /// + [FieldOffset(40)] + public VkDeviceAddress HitShaderBindingTableAddress; + + /// + /// HitShaderBindingTableSize is a basetype:VkDeviceSize number of bytes corresponding to the total size of the hit shader binding table at hitShaderBindingTableAddress that may be accessed by this command. + /// + [FieldOffset(48)] + public ByteSize64 HitShaderBindingTableSize; + + /// + /// HitShaderBindingTableStride is a basetype:VkDeviceSize number of bytes between records of the hit shader binding table. + /// + [FieldOffset(56)] + public ByteSize64 HitShaderBindingTableStride; + + /// + /// CallableShaderBindingTableAddress is a basetype:VkDeviceAddress of the first record in the callable shader binding table used by this command. + /// + [FieldOffset(64)] + public VkDeviceAddress CallableShaderBindingTableAddress; + + /// + /// CallableShaderBindingTableSize is a basetype:VkDeviceSize number of bytes corresponding to the total size of the callable shader binding table at callableShaderBindingTableAddress that may be accessed by this command. + /// + [FieldOffset(72)] + public ByteSize64 CallableShaderBindingTableSize; + + /// + /// CallableShaderBindingTableStride is a basetype:VkDeviceSize number of bytes between records of the callable shader binding table. + /// + [FieldOffset(80)] + public ByteSize64 CallableShaderBindingTableStride; + + /// + /// Width is the width of the ray trace query dimensions. + /// + [FieldOffset(88)] + public int Width; + + /// + /// Height is height of the ray trace query dimensions. + /// + [FieldOffset(92)] + public int Height; + + /// + /// Depth is depth of the ray trace query dimensions. + /// + [FieldOffset(96)] + public int Depth; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommandKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommandKHR.gen.cs new file mode 100644 index 0000000..a49ec4e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkTraceRaysIndirectCommandKHR.gen.cs @@ -0,0 +1,43 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkTraceRaysIndirectCommandKHR - Structure specifying the parameters of an indirect ray tracing command + /// + /// + /// + /// :refpage: VkTraceRaysIndirectCommandKHR + /// + /// + /// The VkTraceRaysIndirectCommandKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_ray_tracing_pipeline + /// typedef struct VkTraceRaysIndirectCommandKHR { + /// uint32_t width; + /// uint32_t height; + /// uint32_t depth; + /// } VkTraceRaysIndirectCommandKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkTraceRaysIndirectCommandKHR() + { + /// + /// Width is the width of the ray trace query dimensions. + /// + [FieldOffset(0)] + public int Width; + + /// + /// Height is height of the ray trace query dimensions. + /// + [FieldOffset(4)] + public int Height; + + /// + /// Depth is depth of the ray trace query dimensions. + /// + [FieldOffset(8)] + public int Depth; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkValidationCacheCreateInfoEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkValidationCacheCreateInfoEXT.gen.cs new file mode 100644 index 0000000..cd2d66b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkValidationCacheCreateInfoEXT.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationCacheCreateInfoEXT - Structure specifying parameters of a newly created validation cache + /// + /// + /// + /// The VkValidationCacheCreateInfoEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_validation_cache + /// typedef struct VkValidationCacheCreateInfoEXT { + /// VkStructureType sType; + /// const void* pNext; + /// VkValidationCacheCreateFlagsEXT flags; + /// size_t initialDataSize; + /// const void* pInitialData; + /// } VkValidationCacheCreateInfoEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkValidationCacheCreateInfoEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ValidationCacheCreateInfoEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkValidationCacheCreateFlagsEXT Flags; + + /// + /// InitialDataSize is the number of bytes in pInitialData. If initialDataSize is zero, the validation cache will initially be empty. + /// + [FieldOffset(24)] + public nuint InitialDataSize; + + /// + /// InitialData is a pointer to previously retrieved validation cache data. If the validation cache data is incompatible (as defined below) with the device, the validation cache will be initially empty. If initialDataSize is zero, pInitialData is ignored. + /// + [FieldOffset(32)] + public void* InitialData; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkValidationFeaturesEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkValidationFeaturesEXT.gen.cs new file mode 100644 index 0000000..17f7cfb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkValidationFeaturesEXT.gen.cs @@ -0,0 +1,64 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationFeaturesEXT - Specify validation features to enable or disable for a Vulkan instance + /// + /// + /// + /// When creating a Vulkan instance for which you wish to enable or disable + /// specific validation features, add a VkValidationFeaturesEXT structure + /// to the pNext chain of the VkInstanceCreateInfo structure, + /// specifying the features to be enabled or disabled. + /// + /// + /// // Provided by VK_EXT_validation_features + /// typedef struct VkValidationFeaturesEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t enabledValidationFeatureCount; + /// const VkValidationFeatureEnableEXT* pEnabledValidationFeatures; + /// uint32_t disabledValidationFeatureCount; + /// const VkValidationFeatureDisableEXT* pDisabledValidationFeatures; + /// } VkValidationFeaturesEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkValidationFeaturesEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ValidationFeaturesEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// EnabledValidationFeatureCount is the number of features to enable. + /// + [FieldOffset(16)] + public int EnabledValidationFeatureCount; + + /// + /// EnabledValidationFeatures is a pointer to an array of VkValidationFeatureEnableEXT values specifying the validation features to be enabled. + /// + [FieldOffset(24)] + public VkValidationFeatureEnableEXT* EnabledValidationFeatures; + + /// + /// DisabledValidationFeatureCount is the number of features to disable. + /// + [FieldOffset(32)] + public int DisabledValidationFeatureCount; + + /// + /// DisabledValidationFeatures is a pointer to an array of VkValidationFeatureDisableEXT values specifying the validation features to be disabled. + /// + [FieldOffset(40)] + public VkValidationFeatureDisableEXT* DisabledValidationFeatures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkValidationFlagsEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkValidationFlagsEXT.gen.cs new file mode 100644 index 0000000..7c87aeb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkValidationFlagsEXT.gen.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkValidationFlagsEXT - Specify validation checks to disable for a Vulkan instance + /// + /// + /// + /// When creating a Vulkan instance for which you wish to disable validation + /// checks, add a VkValidationFlagsEXT structure to the pNext chain + /// of the VkInstanceCreateInfo structure, specifying the checks to be + /// disabled. + /// + /// + /// // Provided by VK_EXT_validation_flags + /// typedef struct VkValidationFlagsEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t disabledValidationCheckCount; + /// const VkValidationCheckEXT* pDisabledValidationChecks; + /// } VkValidationFlagsEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkValidationFlagsEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.ValidationFlagsEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DisabledValidationCheckCount is the number of checks to disable. + /// + [FieldOffset(16)] + public int DisabledValidationCheckCount; + + /// + /// DisabledValidationChecks is a pointer to an array of VkValidationCheckEXT values specifying the validation checks to be disabled. + /// + [FieldOffset(24)] + public VkValidationCheckEXT* DisabledValidationChecks; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription.gen.cs new file mode 100644 index 0000000..1cb6562 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVertexInputAttributeDescription - Structure specifying vertex input attribute description + /// + /// + /// + /// Each vertex input attribute is specified by the + /// VkVertexInputAttributeDescription structure, defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkVertexInputAttributeDescription { + /// uint32_t location; + /// uint32_t binding; + /// VkFormat format; + /// uint32_t offset; + /// } VkVertexInputAttributeDescription; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkVertexInputAttributeDescription() + { + /// + /// Location is the shader input location number for this attribute. + /// + [FieldOffset(0)] + public int Location; + + /// + /// Binding is the binding number which this attribute takes its data from. + /// + [FieldOffset(4)] + public int Binding; + + /// + /// Format is the size and type of the vertex attribute data. + /// + [FieldOffset(8)] + public VkFormat Format; + + /// + /// Offset is a byte offset of this attribute relative to the start of an element in the vertex input binding. + /// + [FieldOffset(12)] + public ByteSize32 Offset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription2EXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription2EXT.gen.cs new file mode 100644 index 0000000..b737267 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVertexInputAttributeDescription2EXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVertexInputAttributeDescription2EXT - Structure specifying the extended vertex input attribute description + /// + /// + /// + /// The VkVertexInputAttributeDescription2EXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state + /// typedef struct VkVertexInputAttributeDescription2EXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t location; + /// uint32_t binding; + /// VkFormat format; + /// uint32_t offset; + /// } VkVertexInputAttributeDescription2EXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVertexInputAttributeDescription2EXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VertexInputAttributeDescription2EXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Location is the shader input location number for this attribute. + /// + [FieldOffset(16)] + public int Location; + + /// + /// Binding is the binding number which this attribute takes its data from. + /// + [FieldOffset(20)] + public int Binding; + + /// + /// Format is the size and type of the vertex attribute data. + /// + [FieldOffset(24)] + public VkFormat Format; + + /// + /// Offset is a byte offset of this attribute relative to the start of an element in the vertex input binding. + /// + [FieldOffset(28)] + public int Offset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription.gen.cs new file mode 100644 index 0000000..5e81036 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVertexInputBindingDescription - Structure specifying vertex input binding description + /// + /// + /// + /// Each vertex input binding is specified by the + /// VkVertexInputBindingDescription structure, defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkVertexInputBindingDescription { + /// uint32_t binding; + /// uint32_t stride; + /// VkVertexInputRate inputRate; + /// } VkVertexInputBindingDescription; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVertexInputBindingDescription() + { + /// + /// Binding is the binding number that this structure describes. + /// + [FieldOffset(0)] + public int Binding; + + /// + /// Stride is the byte stride between consecutive elements within the buffer. + /// + [FieldOffset(4)] + public ByteSize32 Stride; + + /// + /// InputRate is a VkVertexInputRate value specifying whether vertex attribute addressing is a function of the vertex index or of the instance index. + /// + [FieldOffset(8)] + public VkVertexInputRate InputRate; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription2EXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription2EXT.gen.cs new file mode 100644 index 0000000..7c1bca2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDescription2EXT.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVertexInputBindingDescription2EXT - Structure specifying the extended vertex input binding description + /// + /// + /// + /// The VkVertexInputBindingDescription2EXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state + /// typedef struct VkVertexInputBindingDescription2EXT { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t binding; + /// uint32_t stride; + /// VkVertexInputRate inputRate; + /// uint32_t divisor; + /// } VkVertexInputBindingDescription2EXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVertexInputBindingDescription2EXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VertexInputBindingDescription2EXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Binding is the binding number that this structure describes. + /// + [FieldOffset(16)] + public int Binding; + + /// + /// Stride is the byte stride between consecutive elements within the buffer. + /// + [FieldOffset(20)] + public int Stride; + + /// + /// InputRate is a VkVertexInputRate value specifying whether vertex attribute addressing is a function of the vertex index or of the instance index. + /// + [FieldOffset(24)] + public VkVertexInputRate InputRate; + + /// + /// Divisor must be `1` + /// + [FieldOffset(28)] + public int Divisor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDivisorDescription.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDivisorDescription.gen.cs new file mode 100644 index 0000000..3684ff2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVertexInputBindingDivisorDescription.gen.cs @@ -0,0 +1,34 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVertexInputBindingDivisorDescription - Structure specifying a divisor used in instanced rendering + /// + /// + /// + /// The individual divisor values per binding are specified using the + /// VkVertexInputBindingDivisorDescription structure which is defined as: + /// + /// + /// // Provided by VK_VERSION_1_4 + /// typedef struct VkVertexInputBindingDivisorDescription { + /// uint32_t binding; + /// uint32_t divisor; + /// } VkVertexInputBindingDivisorDescription; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkVertexInputBindingDivisorDescription() + { + /// + /// Binding is the binding number for which the divisor is specified. + /// + [FieldOffset(0)] + public int Binding; + + /// + /// Divisor is the number of successive instances that will use the same value of the vertex attribute when instanced rendering is enabled. For example, if the divisor is N, the same vertex attribute will be applied to N successive instances before moving on to the next vertex attribute. The maximum value of divisor is implementation-dependent and can be queried using VkPhysicalDeviceVertexAttributeDivisorProperties::maxVertexAttribDivisor. A value of `0` can be used for the divisor if the vertexAttributeInstanceRateZeroDivisor^ feature is enabled. In this case, the same vertex attribute will be applied to all instances. + /// + [FieldOffset(4)] + public int Divisor; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoBeginCodingInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoBeginCodingInfoKHR.gen.cs new file mode 100644 index 0000000..8898b01 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoBeginCodingInfoKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoBeginCodingInfoKHR - Structure specifying video coding scope begin information + /// + /// + /// + /// The VkVideoBeginCodingInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoBeginCodingInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoBeginCodingFlagsKHR flags; + /// VkVideoSessionKHR videoSession; + /// VkVideoSessionParametersKHR videoSessionParameters; + /// uint32_t referenceSlotCount; + /// const VkVideoReferenceSlotInfoKHR* pReferenceSlots; + /// } VkVideoBeginCodingInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkVideoBeginCodingInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoBeginCodingInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkVideoBeginCodingFlagsKHR Flags; + + /// + /// VideoSession is the video session object to be bound for the processing of the video commands. + /// + [FieldOffset(24)] + public VkVideoSessionKHR VideoSession; + + /// + /// VideoSessionParameters is VK_NULL_HANDLE or a handle of a VkVideoSessionParametersKHR object to be used for the processing of the video commands. If VK_NULL_HANDLE, then no video session parameters object is bound for the duration of the video coding scope. + /// + [FieldOffset(32)] + public VkVideoSessionParametersKHR VideoSessionParameters; + + /// + /// ReferenceSlotCount is the number of elements in the pReferenceSlots array. + /// + [FieldOffset(40)] + public int ReferenceSlotCount; + + /// + /// ReferenceSlots is a pointer to an array of VkVideoReferenceSlotInfoKHR structures specifying the information used to determine the set of bound reference picture resources^ for the video coding scope and their initial association with DPB slot^ indices. + /// + [FieldOffset(48)] + public VkVideoReferenceSlotInfoKHR* ReferenceSlots; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..2aca37e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoCapabilitiesKHR.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoCapabilitiesKHR - Structure describing general video capabilities for a video profile + /// + /// + /// + /// The VkVideoCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoCapabilityFlagsKHR flags; + /// VkDeviceSize minBitstreamBufferOffsetAlignment; + /// VkDeviceSize minBitstreamBufferSizeAlignment; + /// VkExtent2D pictureAccessGranularity; + /// VkExtent2D minCodedExtent; + /// VkExtent2D maxCodedExtent; + /// uint32_t maxDpbSlots; + /// uint32_t maxActiveReferencePictures; + /// VkExtensionProperties stdHeaderVersion; + /// } VkVideoCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 336)] + public unsafe partial struct VkVideoCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoCapabilityFlagsKHR specifying capability flags. + /// + [FieldOffset(16)] + public VkVideoCapabilityFlagsKHR Flags; + + /// + /// MinBitstreamBufferOffsetAlignment is the minimum alignment for bitstream buffer offsets. + /// + [FieldOffset(24)] + public ByteSize64 MinBitstreamBufferOffsetAlignment; + + /// + /// MinBitstreamBufferSizeAlignment is the minimum alignment for bitstream buffer range sizes. + /// + [FieldOffset(32)] + public ByteSize64 MinBitstreamBufferSizeAlignment; + + /// + /// PictureAccessGranularity is the granularity at which image access to video picture resources happen. + /// + [FieldOffset(40)] + public VkExtent2D PictureAccessGranularity; + + /// + /// MinCodedExtent is the minimum width and height of the coded frames. + /// + [FieldOffset(48)] + public VkExtent2D MinCodedExtent; + + /// + /// MaxCodedExtent is the maximum width and height of the coded frames. + /// + [FieldOffset(56)] + public VkExtent2D MaxCodedExtent; + + /// + /// MaxDpbSlots is the maximum number of DPB slots^ supported by a single video session. + /// + [FieldOffset(64)] + public int MaxDpbSlots; + + /// + /// MaxActiveReferencePictures is the maximum number of active reference pictures^ a single video coding operation can use. + /// + [FieldOffset(68)] + public int MaxActiveReferencePictures; + + /// + /// StdHeaderVersion + /// + [FieldOffset(72)] + public VkExtensionProperties StdHeaderVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoCodingControlInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoCodingControlInfoKHR.gen.cs new file mode 100644 index 0000000..4586460 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoCodingControlInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoCodingControlInfoKHR - Structure specifying video coding control parameters + /// + /// + /// + /// The VkVideoCodingControlInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoCodingControlInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoCodingControlFlagsKHR flags; + /// } VkVideoCodingControlInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoCodingControlInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoCodingControlInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoCodingControlFlagsKHR specifying control flags. + /// + [FieldOffset(16)] + public VkVideoCodingControlFlagsKHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..7171b39 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1CapabilitiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeAV1CapabilitiesKHR - Structure describing AV1 decode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an AV1 decode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoDecodeAV1CapabilitiesKHR structure that will be filled with the + /// profile-specific capabilities. + /// + /// + /// The VkVideoDecodeAV1CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_av1 + /// typedef struct VkVideoDecodeAV1CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// StdVideoAV1Level maxLevel; + /// } VkVideoDecodeAV1CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeAV1CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeAV1CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxLevel is a StdVideoAV1Level value specifying the maximum AV1 level supported by the profile, as defined in section A.3 of the AV1 Specification^. + /// + [FieldOffset(16)] + public StdVideoAV1Level MaxLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1DpbSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1DpbSlotInfoKHR.gen.cs new file mode 100644 index 0000000..d8ceff4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1DpbSlotInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeAV1DpbSlotInfoKHR - Structure specifies AV1 DPB information when decoding a frame + /// + /// + /// + /// The VkVideoDecodeAV1DpbSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_av1 + /// typedef struct VkVideoDecodeAV1DpbSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeAV1ReferenceInfo* pStdReferenceInfo; + /// } VkVideoDecodeAV1DpbSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeAV1DpbSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeAV1DpbSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdReferenceInfo is a pointer to a StdVideoDecodeAV1ReferenceInfo structure specifying AV1 reference information^. + /// + [FieldOffset(16)] + public StdVideoDecodeAV1ReferenceInfo* StdReferenceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1InlineSessionParametersInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1InlineSessionParametersInfoKHR.gen.cs new file mode 100644 index 0000000..6380cab --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1InlineSessionParametersInfoKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeAV1InlineSessionParametersInfoKHR - Structure specifies inline AV1 decoder parameter set information + /// + /// + /// + /// The VkVideoDecodeAV1InlineSessionParametersInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_av1 with VK_KHR_video_maintenance2 + /// typedef struct VkVideoDecodeAV1InlineSessionParametersInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoAV1SequenceHeader* pStdSequenceHeader; + /// } VkVideoDecodeAV1InlineSessionParametersInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeAV1InlineSessionParametersInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeAV1InlineSessionParametersInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdSequenceHeader is `NULL` or a pointer to an instance of the StdVideoAV1SequenceHeader structure describing the active AV1 sequence header^. + /// + [FieldOffset(16)] + public StdVideoAV1SequenceHeader* StdSequenceHeader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1PictureInfoKHR.gen.cs new file mode 100644 index 0000000..8f186a6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1PictureInfoKHR.gen.cs @@ -0,0 +1,73 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeAV1PictureInfoKHR - Structure specifies AV1 picture information when decoding a frame + /// + /// + /// + /// The VkVideoDecodeAV1PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_av1 + /// typedef struct VkVideoDecodeAV1PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeAV1PictureInfo* pStdPictureInfo; + /// int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]; + /// uint32_t frameHeaderOffset; + /// uint32_t tileCount; + /// const uint32_t* pTileOffsets; + /// const uint32_t* pTileSizes; + /// } VkVideoDecodeAV1PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkVideoDecodeAV1PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeAV1PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdPictureInfo is a pointer to a StdVideoDecodeAV1PictureInfo structure specifying AV1 picture information^. + /// + [FieldOffset(16)] + public StdVideoDecodeAV1PictureInfo* StdPictureInfo; + + /// + [FieldOffset(24)] + public fixed int ReferenceNameSlotIndices[7]; + + /// + /// FrameHeaderOffset is the byte offset of the AV1 frame header OBU, as defined in section 5.9 of the AV1 Specification^, within the video bitstream buffer range specified in VkVideoDecodeInfoKHR. + /// + [FieldOffset(52)] + public int FrameHeaderOffset; + + /// + /// TileCount is the number of elements in pTileOffsets and pTileSizes. + /// + [FieldOffset(56)] + public int TileCount; + + /// + /// TileOffsets is a pointer to an array of tileCount integers specifying the byte offset of the tiles of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR. + /// + [FieldOffset(64)] + public int* TileOffsets; + + /// + /// TileSizes is a pointer to an array of tileCount integers specifying the byte size of the tiles of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR. + /// + [FieldOffset(72)] + public int* TileSizes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..f9c5619 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1ProfileInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeAV1ProfileInfoKHR - Structure specifying AV1 decode profile + /// + /// + /// + /// A video profile supporting AV1 video decode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and adding a + /// VkVideoDecodeAV1ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoDecodeAV1ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_av1 + /// typedef struct VkVideoDecodeAV1ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoAV1Profile stdProfile; + /// VkBool32 filmGrainSupport; + /// } VkVideoDecodeAV1ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeAV1ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeAV1ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfile is a StdVideoAV1Profile value specifying the AV1 codec profile, as defined in section A.2 of the AV1 Specification^. + /// + [FieldOffset(16)] + public StdVideoAV1Profile StdProfile; + + /// + /// FilmGrainSupport + /// + [FieldOffset(20)] + public Brutal.Bool32 FilmGrainSupport; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1SessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1SessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..0b18e91 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeAV1SessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,49 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeAV1SessionParametersCreateInfoKHR - Structure specifies AV1 decoder parameter set information + /// + /// + /// + /// When a video session parameters^ object is + /// created with the codec operation + /// VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, the + /// VkVideoSessionParametersCreateInfoKHR::pNext chain must include + /// a VkVideoDecodeAV1SessionParametersCreateInfoKHR structure specifying + /// the contents of the object. + /// + /// + /// The VkVideoDecodeAV1SessionParametersCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_av1 + /// typedef struct VkVideoDecodeAV1SessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoAV1SequenceHeader* pStdSequenceHeader; + /// } VkVideoDecodeAV1SessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeAV1SessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeAV1SessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdSequenceHeader is a pointer to a StdVideoAV1SequenceHeader structure describing the AV1 sequence header^ entry to store in the created object. + /// + [FieldOffset(16)] + public StdVideoAV1SequenceHeader* StdSequenceHeader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..878975d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeCapabilitiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeCapabilitiesKHR - Structure describing general video decode capabilities for a video profile + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with + /// pVideoProfile->videoCodecOperation specifying a decode operation, the + /// VkVideoDecodeCapabilitiesKHR structure must be included in the + /// pNext chain of the VkVideoCapabilitiesKHR structure to retrieve + /// capabilities specific to video decoding. + /// + /// + /// The VkVideoDecodeCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_queue + /// typedef struct VkVideoDecodeCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoDecodeCapabilityFlagsKHR flags; + /// } VkVideoDecodeCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoDecodeCapabilityFlagsKHR describing the supported video decoding capabilities. + /// + [FieldOffset(16)] + public VkVideoDecodeCapabilityFlagsKHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..3359ac3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264CapabilitiesKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264CapabilitiesKHR - Structure describing H.264 decode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an H.264 decode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoDecodeH264CapabilitiesKHR structure that will be filled with + /// the profile-specific capabilities. + /// + /// + /// The VkVideoDecodeH264CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef struct VkVideoDecodeH264CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// StdVideoH264LevelIdc maxLevelIdc; + /// VkOffset2D fieldOffsetGranularity; + /// } VkVideoDecodeH264CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoDecodeH264CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxLevelIdc is a StdVideoH264LevelIdc value indicating the maximum H.264 level supported by the profile, where enum constant `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification^. + /// + [FieldOffset(16)] + public StdVideoH264LevelIdc MaxLevelIdc; + + /// + /// FieldOffsetGranularity is the minimum alignment for VkVideoPictureResourceInfoKHR::codedOffset specified for a video picture resource^ when using the picture layout VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR. + /// + [FieldOffset(20)] + public VkOffset2D FieldOffsetGranularity; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264DpbSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264DpbSlotInfoKHR.gen.cs new file mode 100644 index 0000000..32f3641 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264DpbSlotInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264DpbSlotInfoKHR - Structure specifies H.264 decode DPB picture information + /// + /// + /// + /// The VkVideoDecodeH264DpbSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef struct VkVideoDecodeH264DpbSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeH264ReferenceInfo* pStdReferenceInfo; + /// } VkVideoDecodeH264DpbSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeH264DpbSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264DpbSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdReferenceInfo is a pointer to a StdVideoDecodeH264ReferenceInfo structure specifying H.264 reference information^. + /// + [FieldOffset(16)] + public StdVideoDecodeH264ReferenceInfo* StdReferenceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264InlineSessionParametersInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264InlineSessionParametersInfoKHR.gen.cs new file mode 100644 index 0000000..bc6e5db --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264InlineSessionParametersInfoKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264InlineSessionParametersInfoKHR - Structure specifies inline H.264 decoder parameter set information + /// + /// + /// + /// The VkVideoDecodeH264InlineSessionParametersInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 with VK_KHR_video_maintenance2 + /// typedef struct VkVideoDecodeH264InlineSessionParametersInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoH264SequenceParameterSet* pStdSPS; + /// const StdVideoH264PictureParameterSet* pStdPPS; + /// } VkVideoDecodeH264InlineSessionParametersInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoDecodeH264InlineSessionParametersInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264InlineSessionParametersInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdSPS is `NULL` or a pointer to an instance of the StdVideoH264SequenceParameterSet structure describing the active H.264 SPS^. + /// + [FieldOffset(16)] + public StdVideoH264SequenceParameterSet* StdSPS; + + /// + /// StdPPS is `NULL` or a pointer to an instance of the StdVideoH264PictureParameterSet structure describing the active H.264 PPS^. + /// + [FieldOffset(24)] + public StdVideoH264PictureParameterSet* StdPPS; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264PictureInfoKHR.gen.cs new file mode 100644 index 0000000..fefec1f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264PictureInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264PictureInfoKHR - Structure specifies H.264 decode picture parameters when decoding a picture + /// + /// + /// + /// The VkVideoDecodeH264PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef struct VkVideoDecodeH264PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeH264PictureInfo* pStdPictureInfo; + /// uint32_t sliceCount; + /// const uint32_t* pSliceOffsets; + /// } VkVideoDecodeH264PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoDecodeH264PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdPictureInfo is a pointer to a StdVideoDecodeH264PictureInfo structure specifying H.264 picture information^. + /// + [FieldOffset(16)] + public StdVideoDecodeH264PictureInfo* StdPictureInfo; + + /// + /// SliceCount is the number of elements in pSliceOffsets. + /// + [FieldOffset(24)] + public int SliceCount; + + /// + /// SliceOffsets is a pointer to an array of sliceCount offsets specifying the start offset of the slices of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR. + /// + [FieldOffset(32)] + public int* SliceOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..d1cfd73 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264ProfileInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264ProfileInfoKHR - Structure specifying H.264 decode-specific video profile parameters + /// + /// + /// + /// A video profile supporting H.264 video decode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and adding a + /// VkVideoDecodeH264ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoDecodeH264ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef struct VkVideoDecodeH264ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoH264ProfileIdc stdProfileIdc; + /// VkVideoDecodeH264PictureLayoutFlagBitsKHR pictureLayout; + /// } VkVideoDecodeH264ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeH264ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfileIdc is a StdVideoH264ProfileIdc value specifying the H.264 codec profile IDC, where enum constant `STD_VIDEO_H264_PROFILE_IDC_BASELINE` identifies the Constrained Baseline profile as defined in A.2.1.1 of the ITU-T H.264 Specification^, and all other values correspond to profiles defined in section A.2 of the ITU-T H.264 Specification^. + /// + [FieldOffset(16)] + public StdVideoH264ProfileIdc StdProfileIdc; + + /// + /// PictureLayout is a VkVideoDecodeH264PictureLayoutFlagsKHR value specifying the picture layout used by the H.264 video sequence to be decoded. + /// + [FieldOffset(20)] + public VkVideoDecodeH264PictureLayoutFlagsKHR PictureLayout; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersAddInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersAddInfoKHR.gen.cs new file mode 100644 index 0000000..a983cfc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersAddInfoKHR.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264SessionParametersAddInfoKHR - Structure specifies H.264 decoder parameter set information + /// + /// + /// + /// The VkVideoDecodeH264SessionParametersAddInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef struct VkVideoDecodeH264SessionParametersAddInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stdSPSCount; + /// const StdVideoH264SequenceParameterSet* pStdSPSs; + /// uint32_t stdPPSCount; + /// const StdVideoH264PictureParameterSet* pStdPPSs; + /// } VkVideoDecodeH264SessionParametersAddInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoDecodeH264SessionParametersAddInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264SessionParametersAddInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdSPSCount is the number of elements in the pStdSPSs array. + /// + [FieldOffset(16)] + public int StdSPSCount; + + /// + /// StdSPSs is a pointer to an array of StdVideoH264SequenceParameterSet structures describing the H.264 SPS^ entries to add. + /// + [FieldOffset(24)] + public StdVideoH264SequenceParameterSet* StdSPSs; + + /// + /// StdPPSCount is the number of elements in the pStdPPSs array. + /// + [FieldOffset(32)] + public int StdPPSCount; + + /// + /// StdPPSs is a pointer to an array of StdVideoH264PictureParameterSet structures describing the H.264 PPS^ entries to add. + /// + [FieldOffset(40)] + public StdVideoH264PictureParameterSet* StdPPSs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..6056156 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH264SessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,63 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH264SessionParametersCreateInfoKHR - Structure specifies H.264 decoder parameter set information + /// + /// + /// + /// When a video session parameters^ object is + /// created with the codec operation + /// VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, the + /// VkVideoSessionParametersCreateInfoKHR::pNext chain must include + /// a VkVideoDecodeH264SessionParametersCreateInfoKHR structure specifying + /// the capacity and initial contents of the object. + /// + /// + /// The VkVideoDecodeH264SessionParametersCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h264 + /// typedef struct VkVideoDecodeH264SessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxStdSPSCount; + /// uint32_t maxStdPPSCount; + /// const VkVideoDecodeH264SessionParametersAddInfoKHR* pParametersAddInfo; + /// } VkVideoDecodeH264SessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoDecodeH264SessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH264SessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxStdSPSCount is the maximum number of H.264 SPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(16)] + public int MaxStdSPSCount; + + /// + /// MaxStdPPSCount is the maximum number of H.264 PPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(20)] + public int MaxStdPPSCount; + + /// + /// ParametersAddInfo is `NULL` or a pointer to a VkVideoDecodeH264SessionParametersAddInfoKHR structure specifying H.264 parameters to add upon object creation. + /// + [FieldOffset(24)] + public VkVideoDecodeH264SessionParametersAddInfoKHR* ParametersAddInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..c381702 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265CapabilitiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265CapabilitiesKHR - Structure describing H.265 decode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an H.265 decode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoDecodeH265CapabilitiesKHR structure that will be filled with + /// the profile-specific capabilities. + /// + /// + /// The VkVideoDecodeH265CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 + /// typedef struct VkVideoDecodeH265CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// StdVideoH265LevelIdc maxLevelIdc; + /// } VkVideoDecodeH265CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeH265CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxLevelIdc is a StdVideoH265LevelIdc value indicating the maximum H.265 level supported by the profile, where enum constant `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifies H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification^. + /// + [FieldOffset(16)] + public StdVideoH265LevelIdc MaxLevelIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265DpbSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265DpbSlotInfoKHR.gen.cs new file mode 100644 index 0000000..1ac62c4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265DpbSlotInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265DpbSlotInfoKHR - Structure specifies H.265 DPB information when decoding a frame + /// + /// + /// + /// The VkVideoDecodeH265DpbSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 + /// typedef struct VkVideoDecodeH265DpbSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeH265ReferenceInfo* pStdReferenceInfo; + /// } VkVideoDecodeH265DpbSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeH265DpbSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265DpbSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdReferenceInfo is a pointer to a StdVideoDecodeH265ReferenceInfo structure specifying reference picture information described in section 8.3 of the ITU-T H.265 Specification^. + /// + [FieldOffset(16)] + public StdVideoDecodeH265ReferenceInfo* StdReferenceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265InlineSessionParametersInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265InlineSessionParametersInfoKHR.gen.cs new file mode 100644 index 0000000..167d5bf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265InlineSessionParametersInfoKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265InlineSessionParametersInfoKHR - Structure specifies inline H.265 decoder parameter set information + /// + /// + /// + /// The VkVideoDecodeH265InlineSessionParametersInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 with VK_KHR_video_maintenance2 + /// typedef struct VkVideoDecodeH265InlineSessionParametersInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoH265VideoParameterSet* pStdVPS; + /// const StdVideoH265SequenceParameterSet* pStdSPS; + /// const StdVideoH265PictureParameterSet* pStdPPS; + /// } VkVideoDecodeH265InlineSessionParametersInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoDecodeH265InlineSessionParametersInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265InlineSessionParametersInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdVPS is `NULL` or a pointer to an instance of the StdVideoH265VideoParameterSet structure describing the active H.265 VPS^. + /// + [FieldOffset(16)] + public StdVideoH265VideoParameterSet* StdVPS; + + /// + /// StdSPS is `NULL` or a pointer to an instance of the StdVideoH265SequenceParameterSet structure describing the active H.265 SPS^. + /// + [FieldOffset(24)] + public StdVideoH265SequenceParameterSet* StdSPS; + + /// + /// StdPPS is `NULL` or a pointer to an instance of the StdVideoH265PictureParameterSet structure describing the active H.265 PPS^. + /// + [FieldOffset(32)] + public StdVideoH265PictureParameterSet* StdPPS; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265PictureInfoKHR.gen.cs new file mode 100644 index 0000000..a46b11e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265PictureInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265PictureInfoKHR - Structure specifies H.265 picture information when decoding a frame + /// + /// + /// + /// The VkVideoDecodeH265PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 + /// typedef struct VkVideoDecodeH265PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeH265PictureInfo* pStdPictureInfo; + /// uint32_t sliceSegmentCount; + /// const uint32_t* pSliceSegmentOffsets; + /// } VkVideoDecodeH265PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoDecodeH265PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdPictureInfo is a pointer to a StdVideoDecodeH265PictureInfo structure specifying H.265 picture information^. + /// + [FieldOffset(16)] + public StdVideoDecodeH265PictureInfo* StdPictureInfo; + + /// + /// SliceSegmentCount is the number of elements in pSliceSegmentOffsets. + /// + [FieldOffset(24)] + public int SliceSegmentCount; + + /// + /// SliceSegmentOffsets is a pointer to an array of sliceSegmentCount offsets specifying the start offset of the slice segments of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR. + /// + [FieldOffset(32)] + public int* SliceSegmentOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..4bf2c1e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265ProfileInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265ProfileInfoKHR - Structure specifying H.265 decode profile + /// + /// + /// + /// A video profile supporting H.265 video decode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and adding a + /// VkVideoDecodeH265ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoDecodeH265ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 + /// typedef struct VkVideoDecodeH265ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoH265ProfileIdc stdProfileIdc; + /// } VkVideoDecodeH265ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeH265ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfileIdc is a StdVideoH265ProfileIdc value specifying the H.265 codec profile IDC, as defined in section A.3 of the ITU-T H.265 Specification^. + /// + [FieldOffset(16)] + public StdVideoH265ProfileIdc StdProfileIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersAddInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersAddInfoKHR.gen.cs new file mode 100644 index 0000000..9897956 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersAddInfoKHR.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265SessionParametersAddInfoKHR - Structure specifies H.265 decoder parameter set information + /// + /// + /// + /// The VkVideoDecodeH265SessionParametersAddInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 + /// typedef struct VkVideoDecodeH265SessionParametersAddInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stdVPSCount; + /// const StdVideoH265VideoParameterSet* pStdVPSs; + /// uint32_t stdSPSCount; + /// const StdVideoH265SequenceParameterSet* pStdSPSs; + /// uint32_t stdPPSCount; + /// const StdVideoH265PictureParameterSet* pStdPPSs; + /// } VkVideoDecodeH265SessionParametersAddInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoDecodeH265SessionParametersAddInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265SessionParametersAddInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdVPSCount is the number of elements in the pStdVPSs array. + /// + [FieldOffset(16)] + public int StdVPSCount; + + /// + /// StdVPSs is a pointer to an array of StdVideoH265VideoParameterSet structures describing the H.265 VPS^ entries to add. + /// + [FieldOffset(24)] + public StdVideoH265VideoParameterSet* StdVPSs; + + /// + /// StdSPSCount is the number of elements in the pStdSPSs array. + /// + [FieldOffset(32)] + public int StdSPSCount; + + /// + /// StdSPSs is a pointer to an array of StdVideoH265SequenceParameterSet structures describing the H.265 SPS^ entries to add. + /// + [FieldOffset(40)] + public StdVideoH265SequenceParameterSet* StdSPSs; + + /// + /// StdPPSCount is the number of elements in the pStdPPSs array. + /// + [FieldOffset(48)] + public int StdPPSCount; + + /// + /// StdPPSs is a pointer to an array of StdVideoH265PictureParameterSet structures describing the H.265 PPS^ entries to add. + /// + [FieldOffset(56)] + public StdVideoH265PictureParameterSet* StdPPSs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..9fe0062 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeH265SessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeH265SessionParametersCreateInfoKHR - Structure specifies H.265 decoder parameter set information + /// + /// + /// + /// When a video session parameters^ object is + /// created with the codec operation + /// VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, the + /// VkVideoSessionParametersCreateInfoKHR::pNext chain must include + /// a VkVideoDecodeH265SessionParametersCreateInfoKHR structure specifying + /// the capacity and initial contents of the object. + /// + /// + /// The VkVideoDecodeH265SessionParametersCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_h265 + /// typedef struct VkVideoDecodeH265SessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxStdVPSCount; + /// uint32_t maxStdSPSCount; + /// uint32_t maxStdPPSCount; + /// const VkVideoDecodeH265SessionParametersAddInfoKHR* pParametersAddInfo; + /// } VkVideoDecodeH265SessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoDecodeH265SessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeH265SessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxStdVPSCount is the maximum number of H.265 VPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(16)] + public int MaxStdVPSCount; + + /// + /// MaxStdSPSCount is the maximum number of H.265 SPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(20)] + public int MaxStdSPSCount; + + /// + /// MaxStdPPSCount is the maximum number of H.265 PPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(24)] + public int MaxStdPPSCount; + + /// + /// ParametersAddInfo is `NULL` or a pointer to a VkVideoDecodeH265SessionParametersAddInfoKHR structure specifying H.265 parameters to add upon object creation. + /// + [FieldOffset(32)] + public VkVideoDecodeH265SessionParametersAddInfoKHR* ParametersAddInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeInfoKHR.gen.cs new file mode 100644 index 0000000..820f958 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeInfoKHR.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeInfoKHR - Structure specifying video decode parameters + /// + /// + /// + /// The VkVideoDecodeInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_queue + /// typedef struct VkVideoDecodeInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoDecodeFlagsKHR flags; + /// VkBuffer srcBuffer; + /// VkDeviceSize srcBufferOffset; + /// VkDeviceSize srcBufferRange; + /// VkVideoPictureResourceInfoKHR dstPictureResource; + /// const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; + /// uint32_t referenceSlotCount; + /// const VkVideoReferenceSlotInfoKHR* pReferenceSlots; + /// } VkVideoDecodeInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 120)] + public unsafe partial struct VkVideoDecodeInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkVideoDecodeFlagsKHR Flags; + + /// + /// SrcBuffer is the source video bitstream buffer to read the encoded bitstream from. + /// + [FieldOffset(24)] + public VkBuffer SrcBuffer; + + /// + /// SrcBufferOffset is the starting offset in bytes from the start of srcBuffer to read the encoded bitstream from. + /// + [FieldOffset(32)] + public ByteSize64 SrcBufferOffset; + + /// + /// SrcBufferRange is the size in bytes of the encoded bitstream to decode from srcBuffer, starting from srcBufferOffset. + /// + [FieldOffset(40)] + public ByteSize64 SrcBufferRange; + + /// + /// DstPictureResource is the video picture resource to use as the decode output picture^. + /// + [FieldOffset(48)] + public VkVideoPictureResourceInfoKHR DstPictureResource; + + /// + /// SetupReferenceSlot is `NULL` or a pointer to a VkVideoReferenceSlotInfoKHR structure specifying the reconstructed picture information^. + /// + [FieldOffset(96)] + public VkVideoReferenceSlotInfoKHR* SetupReferenceSlot; + + /// + /// ReferenceSlotCount is the number of elements in the pReferenceSlots array. + /// + [FieldOffset(104)] + public int ReferenceSlotCount; + + /// + /// ReferenceSlots is `NULL` or a pointer to an array of VkVideoReferenceSlotInfoKHR structures describing the DPB slots and corresponding reference picture^ resources to use in this video decode operation (the set of active reference pictures^). + /// + [FieldOffset(112)] + public VkVideoReferenceSlotInfoKHR* ReferenceSlots; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeUsageInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeUsageInfoKHR.gen.cs new file mode 100644 index 0000000..d4d8ef3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeUsageInfoKHR.gen.cs @@ -0,0 +1,45 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeUsageInfoKHR - Structure specifying video decode usage information + /// + /// + /// + /// Additional information about the video decode use case can be provided by + /// adding a VkVideoDecodeUsageInfoKHR structure to the pNext chain + /// of VkVideoProfileInfoKHR. + /// + /// + /// The VkVideoDecodeUsageInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_queue + /// typedef struct VkVideoDecodeUsageInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoDecodeUsageFlagsKHR videoUsageHints; + /// } VkVideoDecodeUsageInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeUsageInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeUsageInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoUsageHints is a bitmask of VkVideoDecodeUsageFlagsKHR specifying hints about the intended use of the video decode profile. + /// + [FieldOffset(16)] + public VkVideoDecodeUsageFlagsKHR VideoUsageHints; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..fe55da4 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9CapabilitiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeVP9CapabilitiesKHR - Structure describing VP9 decode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an VP9 decode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoDecodeVP9CapabilitiesKHR structure that will be filled with the + /// profile-specific capabilities. + /// + /// + /// The VkVideoDecodeVP9CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_vp9 + /// typedef struct VkVideoDecodeVP9CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// StdVideoVP9Level maxLevel; + /// } VkVideoDecodeVP9CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeVP9CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeVP9CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxLevel is a StdVideoVP9Level value specifying the maximum VP9 level supported by the profile, as defined in section A.1 of the VP9 Specification^. + /// + [FieldOffset(16)] + public StdVideoVP9Level MaxLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9PictureInfoKHR.gen.cs new file mode 100644 index 0000000..cbb1a63 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9PictureInfoKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeVP9PictureInfoKHR - Structure specifies VP9 picture information when decoding a frame + /// + /// + /// + /// The VkVideoDecodeVP9PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_vp9 + /// typedef struct VkVideoDecodeVP9PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoDecodeVP9PictureInfo* pStdPictureInfo; + /// int32_t referenceNameSlotIndices[VK_MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR]; + /// uint32_t uncompressedHeaderOffset; + /// uint32_t compressedHeaderOffset; + /// uint32_t tilesOffset; + /// } VkVideoDecodeVP9PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoDecodeVP9PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeVP9PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdPictureInfo is a pointer to a StdVideoDecodeVP9PictureInfo structure specifying VP9 picture information^. + /// + [FieldOffset(16)] + public StdVideoDecodeVP9PictureInfo* StdPictureInfo; + + /// + /// ReferenceNameSlotIndices is an array of three (VK_MAX_VIDEO_VP9_REFERENCES_PER_FRAME_KHR, which is equal to the Video Std definition STD_VIDEO_VP9_REFS_PER_FRAME) signed integer values specifying the index of the DPB slot^ or a negative integer value for each VP9 reference name^ used for inter coding. In particular, the DPB slot index for the VP9 reference name frame is specified in referenceNameSlotIndices[frame - STD_VIDEO_VP9_REFERENCE_NAME_LAST_FRAME]. + /// + [FieldOffset(24)] + public int3 ReferenceNameSlotIndices; + + /// + /// UncompressedHeaderOffset is the byte offset of the uncompressed frame header, as defined in section 6.2 of the VP9 Specification^. + /// + [FieldOffset(36)] + public int UncompressedHeaderOffset; + + /// + /// CompressedHeaderOffset is the byte offset of the compressed frame header, as defined in section 6.3 of the VP9 Specification^. + /// + [FieldOffset(40)] + public int CompressedHeaderOffset; + + /// + /// TilesOffset is the byte offset of the frame tile data, as defined in section 6.4 of the VP9 Specification^. + /// + [FieldOffset(44)] + public int TilesOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..81fafdc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoDecodeVP9ProfileInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoDecodeVP9ProfileInfoKHR - Structure specifying VP9 decode profile + /// + /// + /// + /// A video profile supporting VP9 video decode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR and adding a + /// VkVideoDecodeVP9ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoDecodeVP9ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_decode_vp9 + /// typedef struct VkVideoDecodeVP9ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoVP9Profile stdProfile; + /// } VkVideoDecodeVP9ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoDecodeVP9ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoDecodeVP9ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfile is a StdVideoVP9Profile value specifying the VP9 codec profile, as defined in section 7.2 of the VP9 Specification^. + /// + [FieldOffset(16)] + public StdVideoVP9Profile StdProfile; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..cf39fd5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1CapabilitiesKHR.gen.cs @@ -0,0 +1,208 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1CapabilitiesKHR - Structure describing AV1 encode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an AV1 encode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoEncodeAV1CapabilitiesKHR structure that will be filled with the + /// profile-specific capabilities. + /// + /// + /// The VkVideoEncodeAV1CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeAV1CapabilityFlagsKHR flags; + /// StdVideoAV1Level maxLevel; + /// VkExtent2D codedPictureAlignment; + /// VkExtent2D maxTiles; + /// VkExtent2D minTileSize; + /// VkExtent2D maxTileSize; + /// VkVideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes; + /// uint32_t maxSingleReferenceCount; + /// uint32_t singleReferenceNameMask; + /// uint32_t maxUnidirectionalCompoundReferenceCount; + /// uint32_t maxUnidirectionalCompoundGroup1ReferenceCount; + /// uint32_t unidirectionalCompoundReferenceNameMask; + /// uint32_t maxBidirectionalCompoundReferenceCount; + /// uint32_t maxBidirectionalCompoundGroup1ReferenceCount; + /// uint32_t maxBidirectionalCompoundGroup2ReferenceCount; + /// uint32_t bidirectionalCompoundReferenceNameMask; + /// uint32_t maxTemporalLayerCount; + /// uint32_t maxSpatialLayerCount; + /// uint32_t maxOperatingPoints; + /// uint32_t minQIndex; + /// uint32_t maxQIndex; + /// VkBool32 prefersGopRemainingFrames; + /// VkBool32 requiresGopRemainingFrames; + /// VkVideoEncodeAV1StdFlagsKHR stdSyntaxFlags; + /// } VkVideoEncodeAV1CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 128)] + public unsafe partial struct VkVideoEncodeAV1CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeAV1CapabilityFlagsKHR indicating supported AV1 encoding capabilities. + /// + [FieldOffset(16)] + public VkVideoEncodeAV1CapabilityFlagsKHR Flags; + + /// + /// MaxLevel is a StdVideoAV1Level value indicating the maximum AV1 level supported by the profile, as defined in section A.3 of the AV1 Specification^. + /// + [FieldOffset(20)] + public StdVideoAV1Level MaxLevel; + + /// + /// CodedPictureAlignment indicates the alignment at which the implementation will code pictures. This capability does not impose any valid usage constraints on the application. However, depending on the codedExtent of the encode input picture resource, this capability may: result in a change of the resolution of the encoded picture, as described in more detail below. + /// + [FieldOffset(24)] + public VkExtent2D CodedPictureAlignment; + + /// + /// MaxTiles indicates the maximum number of AV1 tile columns and rows the implementation supports. + /// + [FieldOffset(32)] + public VkExtent2D MaxTiles; + + /// + /// MinTileSize indicates the minimum extent of individual AV1 tiles the implementation supports. + /// + [FieldOffset(40)] + public VkExtent2D MinTileSize; + + /// + /// MaxTileSize indicates the maximum extent of individual AV1 tiles the implementation supports. + /// + [FieldOffset(48)] + public VkExtent2D MaxTileSize; + + /// + /// SuperblockSizes is a bitmask of VkVideoEncodeAV1SuperblockSizeFlagsKHR values indicating the supported AV1 superblock sizes. + /// + [FieldOffset(56)] + public VkVideoEncodeAV1SuperblockSizeFlagsKHR SuperblockSizes; + + /// + /// MaxSingleReferenceCount indicates the maximum number of reference pictures the implementation supports when using single reference prediction mode^. + /// + [FieldOffset(60)] + public int MaxSingleReferenceCount; + + /// + /// SingleReferenceNameMask is a bitmask of supported AV1 reference names^ when using single reference prediction mode^. + /// + [FieldOffset(64)] + public int SingleReferenceNameMask; + + /// + /// MaxUnidirectionalCompoundReferenceCount indicates the maximum number of reference pictures the implementation supports when using unidirectional compound prediction mode^. + /// + [FieldOffset(68)] + public int MaxUnidirectionalCompoundReferenceCount; + + /// + /// MaxUnidirectionalCompoundGroup1ReferenceCount indicates the maximum number of reference pictures the implementation supports when using unidirectional compound prediction mode^ from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification^. + /// + [FieldOffset(72)] + public int MaxUnidirectionalCompoundGroup1ReferenceCount; + + /// + /// UnidirectionalCompoundReferenceNameMask is a bitmask of supported AV1 reference names^ when using unidirectional compound prediction mode^. + /// + [FieldOffset(76)] + public int UnidirectionalCompoundReferenceNameMask; + + /// + /// MaxBidirectionalCompoundReferenceCount indicates the maximum number of reference pictures the implementation supports when using bidirectional compound prediction mode^. + /// + [FieldOffset(80)] + public int MaxBidirectionalCompoundReferenceCount; + + /// + /// MaxBidirectionalCompoundGroup1ReferenceCount indicates the maximum number of reference pictures the implementation supports when using bidirectional compound prediction mode^ from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification^. + /// + [FieldOffset(84)] + public int MaxBidirectionalCompoundGroup1ReferenceCount; + + /// + /// MaxBidirectionalCompoundGroup2ReferenceCount indicates the maximum number of reference pictures the implementation supports when using bidirectional compound prediction mode^ from reference frame group 2, as defined in section 6.10.24 of the AV1 Specification^. + /// + [FieldOffset(88)] + public int MaxBidirectionalCompoundGroup2ReferenceCount; + + /// + /// BidirectionalCompoundReferenceNameMask is a bitmask of supported AV1 reference names^ when using bidirectional compound prediction mode^. + /// + [FieldOffset(92)] + public int BidirectionalCompoundReferenceNameMask; + + /// + /// MaxTemporalLayerCount indicates the maximum number of AV1 temporal layers supported by the implementation. + /// + [FieldOffset(96)] + public int MaxTemporalLayerCount; + + /// + /// MaxSpatialLayerCount indicates the maximum number of AV1 spatial layers supported by the implementation. + /// + [FieldOffset(100)] + public int MaxSpatialLayerCount; + + /// + /// MaxOperatingPoints indicates the maximum number of AV1 operating points supported by the implementation. + /// + [FieldOffset(104)] + public int MaxOperatingPoints; + + /// + /// MinQIndex indicates the minimum quantizer index value supported. + /// + [FieldOffset(108)] + public int MinQIndex; + + /// + /// MaxQIndex indicates the maximum quantizer index value supported. + /// + [FieldOffset(112)] + public int MaxQIndex; + + /// + /// PrefersGopRemainingFrames indicates that the implementation's rate control algorithm prefers the application to specify the number of frames in each AV1 rate control group^ remaining^ in the current group of pictures^ when beginning a video coding scope^. + /// + [FieldOffset(116)] + public Brutal.Bool32 PrefersGopRemainingFrames; + + /// + /// RequiresGopRemainingFrames indicates that the implementation's rate control algorithm requires the application to specify the number of frames in each AV1 rate control group^ remaining^ in the current group of pictures^ when beginning a video coding scope^. + /// + [FieldOffset(120)] + public Brutal.Bool32 RequiresGopRemainingFrames; + + /// + /// StdSyntaxFlags is a bitmask of VkVideoEncodeAV1StdFlagsKHR indicating capabilities related to AV1 syntax elements. + /// + [FieldOffset(124)] + public VkVideoEncodeAV1StdFlagsKHR StdSyntaxFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1DpbSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1DpbSlotInfoKHR.gen.cs new file mode 100644 index 0000000..6aae0af --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1DpbSlotInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1DpbSlotInfoKHR - Structure specifies AV1 encode DPB picture information + /// + /// + /// + /// The VkVideoEncodeAV1DpbSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1DpbSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoEncodeAV1ReferenceInfo* pStdReferenceInfo; + /// } VkVideoEncodeAV1DpbSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeAV1DpbSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1DpbSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdReferenceInfo is a pointer to a StdVideoEncodeAV1ReferenceInfo structure specifying AV1 reference information^. + /// + [FieldOffset(16)] + public StdVideoEncodeAV1ReferenceInfo* StdReferenceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1FrameSizeKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1FrameSizeKHR.gen.cs new file mode 100644 index 0000000..dcf9d9c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1FrameSizeKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1FrameSizeKHR - Structure describing frame size values per AV1 prediction mode + /// + /// + /// + /// The VkVideoEncodeAV1FrameSizeKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1FrameSizeKHR { + /// uint32_t intraFrameSize; + /// uint32_t predictiveFrameSize; + /// uint32_t bipredictiveFrameSize; + /// } VkVideoEncodeAV1FrameSizeKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVideoEncodeAV1FrameSizeKHR() + { + /// + /// IntraFrameSize is the size in bytes to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR. + /// + [FieldOffset(0)] + public int IntraFrameSize; + + /// + /// PredictiveFrameSize is the size in bytes to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR. + /// + [FieldOffset(4)] + public int PredictiveFrameSize; + + /// + /// BipredictiveFrameSize is the size in bytes to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR. + /// + [FieldOffset(8)] + public int BipredictiveFrameSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1GopRemainingFrameInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1GopRemainingFrameInfoKHR.gen.cs new file mode 100644 index 0000000..c64a698 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1GopRemainingFrameInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1GopRemainingFrameInfoKHR - Structure specifying AV1 encode rate control GOP remaining frame counts + /// + /// + /// + /// The VkVideoEncodeAV1GopRemainingFrameInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1GopRemainingFrameInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useGopRemainingFrames; + /// uint32_t gopRemainingIntra; + /// uint32_t gopRemainingPredictive; + /// uint32_t gopRemainingBipredictive; + /// } VkVideoEncodeAV1GopRemainingFrameInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeAV1GopRemainingFrameInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1GopRemainingFrameInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseGopRemainingFrames indicates whether the implementation's rate control algorithm should use the values specified in gopRemainingIntra, gopRemainingPredictive, and gopRemainingBipredictive. If useGopRemainingFrames is VK_FALSE, then the values of gopRemainingIntra, gopRemainingPredictive, and gopRemainingBipredictive are ignored. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseGopRemainingFrames; + + /// + /// GopRemainingIntra specifies the number of frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the next video encode operation. + /// + [FieldOffset(20)] + public int GopRemainingIntra; + + /// + /// GopRemainingPredictive specifies the number of frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the next video encode operation. + /// + [FieldOffset(24)] + public int GopRemainingPredictive; + + /// + /// GopRemainingBipredictive specifies the number of frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the next video encode operation. + /// + [FieldOffset(28)] + public int GopRemainingBipredictive; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1PictureInfoKHR.gen.cs new file mode 100644 index 0000000..9424a71 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1PictureInfoKHR.gen.cs @@ -0,0 +1,80 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1PictureInfoKHR - Structure specifies AV1 encode frame parameters + /// + /// + /// + /// The VkVideoEncodeAV1PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeAV1PredictionModeKHR predictionMode; + /// VkVideoEncodeAV1RateControlGroupKHR rateControlGroup; + /// uint32_t constantQIndex; + /// const StdVideoEncodeAV1PictureInfo* pStdPictureInfo; + /// int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]; + /// VkBool32 primaryReferenceCdfOnly; + /// VkBool32 generateObuExtensionHeader; + /// } VkVideoEncodeAV1PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 80)] + public unsafe partial struct VkVideoEncodeAV1PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PredictionMode specifies the AV1 prediction mode^ to use for the encoded frame. + /// + [FieldOffset(16)] + public VkVideoEncodeAV1PredictionModeKHR PredictionMode; + + /// + /// RateControlGroup specifies the AV1 rate control group^ to use for the encoded frame when the current rate control mode^ is not VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. Otherwise it is ignored. + /// + [FieldOffset(20)] + public VkVideoEncodeAV1RateControlGroupKHR RateControlGroup; + + /// + /// ConstantQIndex is the quantizer index to use for the encoded frame if the current rate control mode^ configured for the video session is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. + /// + [FieldOffset(24)] + public int ConstantQIndex; + + /// + /// StdPictureInfo is a pointer to a StdVideoEncodeAV1PictureInfo structure specifying AV1 picture information^. + /// + [FieldOffset(32)] + public StdVideoEncodeAV1PictureInfo* StdPictureInfo; + + /// + [FieldOffset(40)] + public fixed int ReferenceNameSlotIndices[7]; + + /// + /// PrimaryReferenceCdfOnly controls whether the primary reference frame indicated by the value of pStdPictureInfo->primary_ref_frame is used only for CDF data reference, as defined in sections 6.8.2 of the AV1 Specification^. If set to VK_TRUE, then the primary reference frame's picture data will not be used for sample prediction. + /// + [FieldOffset(68)] + public Brutal.Bool32 PrimaryReferenceCdfOnly; + + /// + /// GenerateObuExtensionHeader controls whether OBU extension headers are generated into the target bitstream, as defined in sections 5.3.1, 5.3.2, and 5.3.3 of the AV1 Specification^. + /// + [FieldOffset(72)] + public Brutal.Bool32 GenerateObuExtensionHeader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..71c0070 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1ProfileInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1ProfileInfoKHR - Structure specifying AV1 encode-specific video profile parameters + /// + /// + /// + /// A video profile supporting AV1 video encode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR and adding a + /// VkVideoEncodeAV1ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoEncodeAV1ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoAV1Profile stdProfile; + /// } VkVideoEncodeAV1ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeAV1ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfile is a StdVideoAV1Profile value specifying the AV1 codec profile, as defined in section A.2 of the AV1 Specification^. + /// + [FieldOffset(16)] + public StdVideoAV1Profile StdProfile; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QIndexKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QIndexKHR.gen.cs new file mode 100644 index 0000000..047680b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QIndexKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1QIndexKHR - Structure describing AV1 quantizer index values per prediction mode + /// + /// + /// + /// The VkVideoEncodeAV1QIndexKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1QIndexKHR { + /// uint32_t intraQIndex; + /// uint32_t predictiveQIndex; + /// uint32_t bipredictiveQIndex; + /// } VkVideoEncodeAV1QIndexKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVideoEncodeAV1QIndexKHR() + { + /// + /// IntraQIndex is the quantizer index to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR. + /// + [FieldOffset(0)] + public int IntraQIndex; + + /// + /// PredictiveQIndex is the quantizer index to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR. + /// + [FieldOffset(4)] + public int PredictiveQIndex; + + /// + /// BipredictiveQIndex is the quantizer index to be used for frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR. + /// + [FieldOffset(8)] + public int BipredictiveQIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QualityLevelPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QualityLevelPropertiesKHR.gen.cs new file mode 100644 index 0000000..3771c47 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QualityLevelPropertiesKHR.gen.cs @@ -0,0 +1,147 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1QualityLevelPropertiesKHR - Structure describing the AV1 encode quality level properties + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR + /// with pVideoProfile->videoCodecOperation specified as + /// VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the + /// VkVideoEncodeAV1QualityLevelPropertiesKHR structure must be included + /// in the pNext chain of the VkVideoEncodeQualityLevelPropertiesKHR + /// structure to retrieve additional video encode quality level properties + /// specific to AV1 encoding. + /// + /// + /// The VkVideoEncodeAV1QualityLevelPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1QualityLevelPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags; + /// uint32_t preferredGopFrameCount; + /// uint32_t preferredKeyFramePeriod; + /// uint32_t preferredConsecutiveBipredictiveFrameCount; + /// uint32_t preferredTemporalLayerCount; + /// VkVideoEncodeAV1QIndexKHR preferredConstantQIndex; + /// uint32_t preferredMaxSingleReferenceCount; + /// uint32_t preferredSingleReferenceNameMask; + /// uint32_t preferredMaxUnidirectionalCompoundReferenceCount; + /// uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount; + /// uint32_t preferredUnidirectionalCompoundReferenceNameMask; + /// uint32_t preferredMaxBidirectionalCompoundReferenceCount; + /// uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount; + /// uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount; + /// uint32_t preferredBidirectionalCompoundReferenceNameMask; + /// } VkVideoEncodeAV1QualityLevelPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkVideoEncodeAV1QualityLevelPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1QualityLevelPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PreferredRateControlFlags is a bitmask of VkVideoEncodeAV1RateControlFlagsKHR values indicating the preferred flags to use for VkVideoEncodeAV1RateControlInfoKHR::flags. + /// + [FieldOffset(16)] + public VkVideoEncodeAV1RateControlFlagsKHR PreferredRateControlFlags; + + /// + /// PreferredGopFrameCount indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::gopFrameCount. + /// + [FieldOffset(20)] + public int PreferredGopFrameCount; + + /// + /// PreferredKeyFramePeriod indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::keyFramePeriod. + /// + [FieldOffset(24)] + public int PreferredKeyFramePeriod; + + /// + /// PreferredConsecutiveBipredictiveFrameCount indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::consecutiveBipredictiveFrameCount. + /// + [FieldOffset(28)] + public int PreferredConsecutiveBipredictiveFrameCount; + + /// + /// PreferredTemporalLayerCount indicates the preferred value to use for VkVideoEncodeAV1RateControlInfoKHR::temporalLayerCount. + /// + [FieldOffset(32)] + public int PreferredTemporalLayerCount; + + /// + /// PreferredConstantQIndex indicates the preferred value to use for VkVideoEncodeAV1PictureInfoKHR::constantQIndex when using rate control mode^ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. + /// + [FieldOffset(36)] + public VkVideoEncodeAV1QIndexKHR PreferredConstantQIndex; + + /// + /// PreferredMaxSingleReferenceCount indicates the preferred maximum number of reference pictures to use with single reference prediction mode^. + /// + [FieldOffset(48)] + public int PreferredMaxSingleReferenceCount; + + /// + /// PreferredSingleReferenceNameMask is a bitmask of preferred AV1 reference names^ when using single reference prediction mode^. + /// + [FieldOffset(52)] + public int PreferredSingleReferenceNameMask; + + /// + /// PreferredMaxUnidirectionalCompoundReferenceCount indicates the preferred maximum number of reference pictures to use with unidirectional compound prediction mode^. + /// + [FieldOffset(56)] + public int PreferredMaxUnidirectionalCompoundReferenceCount; + + /// + /// PreferredMaxUnidirectionalCompoundGroup1ReferenceCount indicates the preferred maximum number of reference pictures to use with unidirectional compound prediction mode^ from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification^. + /// + [FieldOffset(60)] + public int PreferredMaxUnidirectionalCompoundGroup1ReferenceCount; + + /// + /// PreferredUnidirectionalCompoundReferenceNameMask is a bitmask of preferred AV1 reference names^ when using unidirectional compound prediction mode^. + /// + [FieldOffset(64)] + public int PreferredUnidirectionalCompoundReferenceNameMask; + + /// + /// PreferredMaxBidirectionalCompoundReferenceCount indicates the preferred maximum number of reference pictures to use with bidirectional compound prediction mode^. + /// + [FieldOffset(68)] + public int PreferredMaxBidirectionalCompoundReferenceCount; + + /// + /// PreferredMaxBidirectionalCompoundGroup1ReferenceCount indicates the preferred maximum number of reference pictures to use with bidirectional compound prediction mode^ from reference frame group 1, as defined in section 6.10.24 of the AV1 Specification^. + /// + [FieldOffset(72)] + public int PreferredMaxBidirectionalCompoundGroup1ReferenceCount; + + /// + /// PreferredMaxBidirectionalCompoundGroup2ReferenceCount indicates the preferred maximum number of reference pictures to use with bidirectional compound prediction mode^ from reference frame group 2, as defined in section 6.10.24 of the AV1 Specification^. + /// + [FieldOffset(76)] + public int PreferredMaxBidirectionalCompoundGroup2ReferenceCount; + + /// + /// PreferredBidirectionalCompoundReferenceNameMask is a bitmask of preferred AV1 reference names^ when using bidirectional compound prediction mode^. + /// + [FieldOffset(80)] + public int PreferredBidirectionalCompoundReferenceNameMask; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..ed29a13 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1QuantizationMapCapabilitiesKHR.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1QuantizationMapCapabilitiesKHR - Structure describing AV1 encode quantization map capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities of an AV1 encode profile^, the + /// VkVideoEncodeAV1QuantizationMapCapabilitiesKHR structure can be + /// included in the pNext chain of the VkVideoCapabilitiesKHR + /// structure to retrieve additional video encode quantization map capabilities + /// specific to AV1 encode profiles. + /// + /// + /// The VkVideoEncodeAV1QuantizationMapCapabilitiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoEncodeAV1QuantizationMapCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// int32_t minQIndexDelta; + /// int32_t maxQIndexDelta; + /// } VkVideoEncodeAV1QuantizationMapCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeAV1QuantizationMapCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1QuantizationMapCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinQIndexDelta indicates the minimum quantizer index delta value supported for AV1 quantizer index delta maps^. + /// + [FieldOffset(16)] + public int MinQIndexDelta; + + /// + /// MaxQIndexDelta indicates the maximum quantizer index delta value supported for AV1 quantizer index delta maps^. + /// + [FieldOffset(20)] + public int MaxQIndexDelta; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlInfoKHR.gen.cs new file mode 100644 index 0000000..f7a5f6f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlInfoKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1RateControlInfoKHR - Structure describing AV1 stream rate control parameters + /// + /// + /// + /// The VkVideoEncodeAV1RateControlInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1RateControlInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeAV1RateControlFlagsKHR flags; + /// uint32_t gopFrameCount; + /// uint32_t keyFramePeriod; + /// uint32_t consecutiveBipredictiveFrameCount; + /// uint32_t temporalLayerCount; + /// } VkVideoEncodeAV1RateControlInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeAV1RateControlInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1RateControlInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeAV1RateControlFlagsKHR specifying AV1 rate control flags. + /// + [FieldOffset(16)] + public VkVideoEncodeAV1RateControlFlagsKHR Flags; + + /// + /// GopFrameCount is the number of frames within a group of pictures (GOP)^ intended to be used by the application. If it is set to 0, the rate control algorithm may: assume an implementation-dependent GOP length. If it is set to UINT32_MAX, the GOP length is treated as infinite. + /// + [FieldOffset(20)] + public int GopFrameCount; + + /// + /// KeyFramePeriod is the interval, in terms of number of frames, between two frames with the AV1 frame type STD_VIDEO_AV1_FRAME_TYPE_KEY (see key frame period^). If it is set to 0, the rate control algorithm may: assume an implementation-dependent key frame period. If it is set to UINT32_MAX, the key frame period is treated as infinite. + /// + [FieldOffset(24)] + public int KeyFramePeriod; + + /// + /// ConsecutiveBipredictiveFrameCount is the number of consecutive frames encoded with VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR between frames encoded with other rate control groups^ within the GOP^. + /// + [FieldOffset(28)] + public int ConsecutiveBipredictiveFrameCount; + + /// + /// TemporalLayerCount specifies the number of AV1 temporal layers that the application intends to use. + /// + [FieldOffset(32)] + public int TemporalLayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlLayerInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlLayerInfoKHR.gen.cs new file mode 100644 index 0000000..86bdbb9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1RateControlLayerInfoKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1RateControlLayerInfoKHR - Structure describing AV1 per-layer rate control parameters + /// + /// + /// + /// The VkVideoEncodeAV1RateControlLayerInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1RateControlLayerInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useMinQIndex; + /// VkVideoEncodeAV1QIndexKHR minQIndex; + /// VkBool32 useMaxQIndex; + /// VkVideoEncodeAV1QIndexKHR maxQIndex; + /// VkBool32 useMaxFrameSize; + /// VkVideoEncodeAV1FrameSizeKHR maxFrameSize; + /// } VkVideoEncodeAV1RateControlLayerInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoEncodeAV1RateControlLayerInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1RateControlLayerInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseMinQIndex indicates whether the quantizer index values determined by rate control will be clamped to the lower bounds on the quantizer index values specified in minQIndex. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseMinQIndex; + + /// + /// MinQIndex specifies the lower bounds on the quantizer index values, for each rate control group^, that the implementation's rate control algorithm will use when useMinQIndex is set to VK_TRUE. + /// + [FieldOffset(20)] + public VkVideoEncodeAV1QIndexKHR MinQIndex; + + /// + /// UseMaxQIndex indicates whether the quantizer index values determined by rate control will be clamped to the upper bounds on the quantizer index values specified in maxQIndex. + /// + [FieldOffset(32)] + public Brutal.Bool32 UseMaxQIndex; + + /// + /// MaxQIndex specifies the upper bounds on the quantizer index values, for each rate control group^, that the implementation's rate control algorithm will use when useMaxQIndex is set to VK_TRUE. + /// + [FieldOffset(36)] + public VkVideoEncodeAV1QIndexKHR MaxQIndex; + + /// + /// UseMaxFrameSize indicates whether the implementation's rate control algorithm should use the values specified in maxFrameSize as the upper bounds on the encoded frame size for each rate control group^. + /// + [FieldOffset(48)] + public Brutal.Bool32 UseMaxFrameSize; + + /// + /// MaxFrameSize specifies the upper bounds on the encoded frame size, for each rate control group^, when useMaxFrameSize is set to VK_TRUE. + /// + [FieldOffset(52)] + public VkVideoEncodeAV1FrameSizeKHR MaxFrameSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionCreateInfoKHR.gen.cs new file mode 100644 index 0000000..b6d6489 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionCreateInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1SessionCreateInfoKHR - Structure specifies AV1 encode session parameters + /// + /// + /// + /// The VkVideoEncodeAV1SessionCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1SessionCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useMaxLevel; + /// StdVideoAV1Level maxLevel; + /// } VkVideoEncodeAV1SessionCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeAV1SessionCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1SessionCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseMaxLevel indicates whether the value of maxLevel should be used by the implementation. When it is set to VK_FALSE, the implementation ignores the value of maxLevel and uses the value of VkVideoEncodeAV1CapabilitiesKHR::maxLevel, as reported by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseMaxLevel; + + /// + /// MaxLevel is a StdVideoAV1Level value specifying the upper bound on the AV1 level for the video bitstreams produced by the created video session. + /// + [FieldOffset(20)] + public StdVideoAV1Level MaxLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..978d770 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeAV1SessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeAV1SessionParametersCreateInfoKHR - Structure specifies AV1 encoder parameter set information + /// + /// + /// + /// When a video session parameters^ object is + /// created with the codec operation + /// VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR, the + /// VkVideoSessionParametersCreateInfoKHR::pNext chain must include + /// a VkVideoEncodeAV1SessionParametersCreateInfoKHR structure specifying + /// the contents of the object. + /// + /// + /// The VkVideoEncodeAV1SessionParametersCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 + /// typedef struct VkVideoEncodeAV1SessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoAV1SequenceHeader* pStdSequenceHeader; + /// const StdVideoEncodeAV1DecoderModelInfo* pStdDecoderModelInfo; + /// uint32_t stdOperatingPointCount; + /// const StdVideoEncodeAV1OperatingPointInfo* pStdOperatingPoints; + /// } VkVideoEncodeAV1SessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoEncodeAV1SessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeAV1SessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdSequenceHeader is a pointer to a StdVideoAV1SequenceHeader structure describing parameters of the AV1 sequence header^ entry to store in the created object. + /// + [FieldOffset(16)] + public StdVideoAV1SequenceHeader* StdSequenceHeader; + + /// + /// StdDecoderModelInfo is `NULL` or a pointer to a StdVideoEncodeAV1DecoderModelInfo structure specifying the AV1 decoder model information^ to store in the created object. + /// + [FieldOffset(24)] + public StdVideoEncodeAV1DecoderModelInfo* StdDecoderModelInfo; + + /// + /// StdOperatingPointCount is the number of elements in the pStdOperatingPoints array. + /// + [FieldOffset(32)] + public int StdOperatingPointCount; + + /// + /// StdOperatingPoints is `NULL` or a pointer to an array of stdOperatingPointCount number of StdVideoEncodeAV1OperatingPointInfo structures specifying the AV1 operating point information^ to store in the created object. Each element i specifies the parameter values corresponding to element i of the syntax elements defined in section 6.4 of the AV1 Specification^. + /// + [FieldOffset(40)] + public StdVideoEncodeAV1OperatingPointInfo* StdOperatingPoints; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..e0f74c3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeCapabilitiesKHR.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeCapabilitiesKHR - Structure describing general video encode capabilities for a video profile + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with + /// pVideoProfile->videoCodecOperation specifying an encode operation, the + /// VkVideoEncodeCapabilitiesKHR structure must be included in the + /// pNext chain of the VkVideoCapabilitiesKHR structure to retrieve + /// capabilities specific to video encoding. + /// + /// + /// The VkVideoEncodeCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeCapabilityFlagsKHR flags; + /// VkVideoEncodeRateControlModeFlagsKHR rateControlModes; + /// uint32_t maxRateControlLayers; + /// uint64_t maxBitrate; + /// uint32_t maxQualityLevels; + /// VkExtent2D encodeInputPictureGranularity; + /// VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags; + /// } VkVideoEncodeCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkVideoEncodeCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeCapabilityFlagsKHR describing supported encoding features. + /// + [FieldOffset(16)] + public VkVideoEncodeCapabilityFlagsKHR Flags; + + /// + /// RateControlModes is a bitmask of VkVideoEncodeRateControlModeFlagsKHR indicating supported rate control modes^. + /// + [FieldOffset(20)] + public VkVideoEncodeRateControlModeFlagsKHR RateControlModes; + + /// + /// MaxRateControlLayers indicates the maximum number of rate control layers^ supported. + /// + [FieldOffset(24)] + public int MaxRateControlLayers; + + /// + /// MaxBitrate indicates the maximum supported bitrate. + /// + [FieldOffset(32)] + public nint MaxBitrate; + + /// + /// MaxQualityLevels indicates the number of discrete video encode quality levels^ supported. Implementations must support at least one quality level. + /// + [FieldOffset(40)] + public int MaxQualityLevels; + + /// + /// EncodeInputPictureGranularity indicates the granularity at which encode input picture^ data is encoded and may: indicate a texel granularity up to the size of the largest supported codec-specific coding block. This capability does not impose any valid usage constraints on the application, however, depending on the contents of the encode input picture, it may: have effects on the encoded bitstream, as described in more detail below. + /// + [FieldOffset(44)] + public VkExtent2D EncodeInputPictureGranularity; + + /// + /// SupportedEncodeFeedbackFlags is a bitmask of VkVideoEncodeFeedbackFlagsKHR values specifying the supported flags for video encode feedback queries^. + /// + [FieldOffset(52)] + public VkVideoEncodeFeedbackFlagsKHR SupportedEncodeFeedbackFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeFeedback2CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeFeedback2CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..7be8784 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeFeedback2CapabilitiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeFeedback2CapabilitiesKHR - Structure describing additional video encode feedback capabilities for a video profile + /// + /// + /// + /// The VkVideoEncodeFeedback2CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_feedback2 + /// typedef struct VkVideoEncodeFeedback2CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t maxPerPartitionFeedbackEntries; + /// VkVideoEncodePerPartitionFeedbackFlagsKHR supportedPerPartitionEncodeFeedbackFlags; + /// } VkVideoEncodeFeedback2CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeFeedback2CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeFeedback2CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxPerPartitionFeedbackEntries specifies the maximum number of picture partitions for which the implementation supports capturing per picture partition video encode feedback values. + /// + [FieldOffset(16)] + public int MaxPerPartitionFeedbackEntries; + + /// + /// SupportedPerPartitionEncodeFeedbackFlags is a bitmask of VkVideoEncodePerPartitionFeedbackFlagsKHR values specifying the set of per picture partition video encode feedback values supported by video encode feedback queries^. + /// + [FieldOffset(20)] + public VkVideoEncodePerPartitionFeedbackFlagsKHR SupportedPerPartitionEncodeFeedbackFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..62690e2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264CapabilitiesKHR.gen.cs @@ -0,0 +1,131 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264CapabilitiesKHR - Structure describing H.264 encode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an H.264 encode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoEncodeH264CapabilitiesKHR structure that will be filled with + /// the profile-specific capabilities. + /// + /// + /// The VkVideoEncodeH264CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeH264CapabilityFlagsKHR flags; + /// StdVideoH264LevelIdc maxLevelIdc; + /// uint32_t maxSliceCount; + /// uint32_t maxPPictureL0ReferenceCount; + /// uint32_t maxBPictureL0ReferenceCount; + /// uint32_t maxL1ReferenceCount; + /// uint32_t maxTemporalLayerCount; + /// VkBool32 expectDyadicTemporalLayerPattern; + /// int32_t minQp; + /// int32_t maxQp; + /// VkBool32 prefersGopRemainingFrames; + /// VkBool32 requiresGopRemainingFrames; + /// VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags; + /// } VkVideoEncodeH264CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 72)] + public unsafe partial struct VkVideoEncodeH264CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeH264CapabilityFlagsKHR indicating supported H.264 encoding capabilities. + /// + [FieldOffset(16)] + public VkVideoEncodeH264CapabilityFlagsKHR Flags; + + /// + /// MaxLevelIdc is a StdVideoH264LevelIdc value indicating the maximum H.264 level supported by the profile, where enum constant `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification^. + /// + [FieldOffset(20)] + public StdVideoH264LevelIdc MaxLevelIdc; + + /// + /// MaxSliceCount indicates the maximum number of slices that can be encoded for a single picture. Further restrictions may: apply to the number of slices that can be encoded for a single picture depending on other capabilities and codec-specific rules. + /// + [FieldOffset(24)] + public int MaxSliceCount; + + /// + /// MaxPPictureL0ReferenceCount indicates the maximum number of reference pictures the implementation supports in the reference list L0 for P pictures^. + [NOTE] + /// + [FieldOffset(28)] + public int MaxPPictureL0ReferenceCount; + + /// + /// MaxBPictureL0ReferenceCount + /// + [FieldOffset(32)] + public int MaxBPictureL0ReferenceCount; + + /// + /// MaxL1ReferenceCount + /// + [FieldOffset(36)] + public int MaxL1ReferenceCount; + + /// + /// MaxTemporalLayerCount + /// + [FieldOffset(40)] + public int MaxTemporalLayerCount; + + /// + /// ExpectDyadicTemporalLayerPattern + /// + [FieldOffset(44)] + public Brutal.Bool32 ExpectDyadicTemporalLayerPattern; + + /// + /// MinQp + /// + [FieldOffset(48)] + public int MinQp; + + /// + /// MaxQp + /// + [FieldOffset(52)] + public int MaxQp; + + /// + /// PrefersGopRemainingFrames + /// + [FieldOffset(56)] + public Brutal.Bool32 PrefersGopRemainingFrames; + + /// + /// RequiresGopRemainingFrames + /// + [FieldOffset(60)] + public Brutal.Bool32 RequiresGopRemainingFrames; + + /// + /// StdSyntaxFlags + /// + [FieldOffset(64)] + public VkVideoEncodeH264StdFlagsKHR StdSyntaxFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264DpbSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264DpbSlotInfoKHR.gen.cs new file mode 100644 index 0000000..d51f2ad --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264DpbSlotInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264DpbSlotInfoKHR - Structure specifies H.264 encode DPB picture information + /// + /// + /// + /// The VkVideoEncodeH264DpbSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264DpbSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo; + /// } VkVideoEncodeH264DpbSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH264DpbSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264DpbSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdReferenceInfo is a pointer to a StdVideoEncodeH264ReferenceInfo structure specifying H.264 reference information^. + /// + [FieldOffset(16)] + public StdVideoEncodeH264ReferenceInfo* StdReferenceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264FrameSizeKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264FrameSizeKHR.gen.cs new file mode 100644 index 0000000..bc5ff83 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264FrameSizeKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264FrameSizeKHR - Structure describing frame size values per H.264 picture type + /// + /// + /// + /// The VkVideoEncodeH264FrameSizeKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264FrameSizeKHR { + /// uint32_t frameISize; + /// uint32_t framePSize; + /// uint32_t frameBSize; + /// } VkVideoEncodeH264FrameSizeKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVideoEncodeH264FrameSizeKHR() + { + /// + /// FrameISize is the size in bytes to be used for I pictures^. + /// + [FieldOffset(0)] + public int FrameISize; + + /// + /// FramePSize is the size in bytes to be used for P pictures^. + /// + [FieldOffset(4)] + public int FramePSize; + + /// + /// FrameBSize is the size in bytes to be used for B pictures^. + /// + [FieldOffset(8)] + public int FrameBSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264GopRemainingFrameInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264GopRemainingFrameInfoKHR.gen.cs new file mode 100644 index 0000000..45d7747 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264GopRemainingFrameInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264GopRemainingFrameInfoKHR - Structure specifying H.264 encode rate control GOP remaining frame counts + /// + /// + /// + /// The VkVideoEncodeH264GopRemainingFrameInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264GopRemainingFrameInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useGopRemainingFrames; + /// uint32_t gopRemainingI; + /// uint32_t gopRemainingP; + /// uint32_t gopRemainingB; + /// } VkVideoEncodeH264GopRemainingFrameInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH264GopRemainingFrameInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264GopRemainingFrameInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseGopRemainingFrames indicates whether the implementation's rate control algorithm should use the values specified in gopRemainingI, gopRemainingP, and gopRemainingB. If useGopRemainingFrames is VK_FALSE, then the values of gopRemainingI, gopRemainingP, and gopRemainingB are ignored. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseGopRemainingFrames; + + /// + /// GopRemainingI specifies the number of I frames^ the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the video encode operation. + /// + [FieldOffset(20)] + public int GopRemainingI; + + /// + /// GopRemainingP specifies the number of P frames^ the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the video encode operation. + /// + [FieldOffset(24)] + public int GopRemainingP; + + /// + /// GopRemainingB specifies the number of B frames^ the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the video encode operation. + /// + [FieldOffset(28)] + public int GopRemainingB; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264NaluSliceInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264NaluSliceInfoKHR.gen.cs new file mode 100644 index 0000000..16bfdcb --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264NaluSliceInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264NaluSliceInfoKHR - Structure specifies H.264 encode slice NALU parameters + /// + /// + /// + /// The VkVideoEncodeH264NaluSliceInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264NaluSliceInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// int32_t constantQp; + /// const StdVideoEncodeH264SliceHeader* pStdSliceHeader; + /// } VkVideoEncodeH264NaluSliceInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH264NaluSliceInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264NaluSliceInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ConstantQp is the QP to use for the slice if the current rate control mode^ configured for the video session is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. + /// + [FieldOffset(16)] + public int ConstantQp; + + /// + /// StdSliceHeader is a pointer to a StdVideoEncodeH264SliceHeader structure specifying H.264 slice header parameters^ for the slice. + /// + [FieldOffset(24)] + public StdVideoEncodeH264SliceHeader* StdSliceHeader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264PictureInfoKHR.gen.cs new file mode 100644 index 0000000..37ed2c9 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264PictureInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264PictureInfoKHR - Structure specifies H.264 encode frame parameters + /// + /// + /// + /// The VkVideoEncodeH264PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t naluSliceEntryCount; + /// const VkVideoEncodeH264NaluSliceInfoKHR* pNaluSliceEntries; + /// const StdVideoEncodeH264PictureInfo* pStdPictureInfo; + /// VkBool32 generatePrefixNalu; + /// } VkVideoEncodeH264PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoEncodeH264PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NaluSliceEntryCount is the number of elements in pNaluSliceEntries. + /// + [FieldOffset(16)] + public int NaluSliceEntryCount; + + /// + /// NaluSliceEntries is a pointer to an array of naluSliceEntryCount VkVideoEncodeH264NaluSliceInfoKHR structures specifying the parameters of the individual H.264 slices to encode for the input picture. + /// + [FieldOffset(24)] + public VkVideoEncodeH264NaluSliceInfoKHR* NaluSliceEntries; + + /// + /// StdPictureInfo is a pointer to a StdVideoEncodeH264PictureInfo structure specifying H.264 picture information^. + /// + [FieldOffset(32)] + public StdVideoEncodeH264PictureInfo* StdPictureInfo; + + /// + /// GeneratePrefixNalu controls whether prefix NALUs are generated before slice NALUs into the target bitstream, as defined in sections 7.3.2.12 and 7.4.2.12 of the ITU-T H.264 Specification^. + /// + [FieldOffset(40)] + public Brutal.Bool32 GeneratePrefixNalu; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..01fd158 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264ProfileInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264ProfileInfoKHR - Structure specifying H.264 encode-specific video profile parameters + /// + /// + /// + /// A video profile supporting H.264 video encode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR and adding a + /// VkVideoEncodeH264ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoEncodeH264ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoH264ProfileIdc stdProfileIdc; + /// } VkVideoEncodeH264ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH264ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfileIdc is a StdVideoH264ProfileIdc value specifying the H.264 codec profile IDC, where enum constant `STD_VIDEO_H264_PROFILE_IDC_BASELINE` identifies the Constrained Baseline profile as defined in A.2.1.1 of the ITU-T H.264 Specification^, and all other values correspond to profiles defined in section A.2 of the ITU-T H.264 Specification^. + /// + [FieldOffset(16)] + public StdVideoH264ProfileIdc StdProfileIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QpKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QpKHR.gen.cs new file mode 100644 index 0000000..00a6158 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QpKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264QpKHR - Structure describing H.264 QP values per picture type + /// + /// + /// + /// The VkVideoEncodeH264QpKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264QpKHR { + /// int32_t qpI; + /// int32_t qpP; + /// int32_t qpB; + /// } VkVideoEncodeH264QpKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVideoEncodeH264QpKHR() + { + /// + /// QpI is the QP to be used for I pictures^. + /// + [FieldOffset(0)] + public int QpI; + + /// + /// QpP is the QP to be used for P pictures^. + /// + [FieldOffset(4)] + public int QpP; + + /// + /// QpB is the QP to be used for B pictures^. + /// + [FieldOffset(8)] + public int QpB; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QualityLevelPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QualityLevelPropertiesKHR.gen.cs new file mode 100644 index 0000000..35665f3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QualityLevelPropertiesKHR.gen.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264QualityLevelPropertiesKHR - Structure describing the H.264 encode quality level properties + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR + /// with pVideoProfile->videoCodecOperation specified as + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the + /// VkVideoEncodeH264QualityLevelPropertiesKHR structure must be included + /// in the pNext chain of the VkVideoEncodeQualityLevelPropertiesKHR + /// structure to retrieve additional video encode quality level properties + /// specific to H.264 encoding. + /// + /// + /// The VkVideoEncodeH264QualityLevelPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264QualityLevelPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeH264RateControlFlagsKHR preferredRateControlFlags; + /// uint32_t preferredGopFrameCount; + /// uint32_t preferredIdrPeriod; + /// uint32_t preferredConsecutiveBFrameCount; + /// uint32_t preferredTemporalLayerCount; + /// VkVideoEncodeH264QpKHR preferredConstantQp; + /// uint32_t preferredMaxL0ReferenceCount; + /// uint32_t preferredMaxL1ReferenceCount; + /// VkBool32 preferredStdEntropyCodingModeFlag; + /// } VkVideoEncodeH264QualityLevelPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoEncodeH264QualityLevelPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264QualityLevelPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PreferredRateControlFlags is a bitmask of VkVideoEncodeH264RateControlFlagsKHR values indicating the preferred flags to use for VkVideoEncodeH264RateControlInfoKHR::flags. + /// + [FieldOffset(16)] + public VkVideoEncodeH264RateControlFlagsKHR PreferredRateControlFlags; + + /// + /// PreferredGopFrameCount indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::gopFrameCount. + /// + [FieldOffset(20)] + public int PreferredGopFrameCount; + + /// + /// PreferredIdrPeriod indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::idrPeriod. + /// + [FieldOffset(24)] + public int PreferredIdrPeriod; + + /// + /// PreferredConsecutiveBFrameCount indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::consecutiveBFrameCount. + /// + [FieldOffset(28)] + public int PreferredConsecutiveBFrameCount; + + /// + /// PreferredTemporalLayerCount indicates the preferred value to use for VkVideoEncodeH264RateControlInfoKHR::temporalLayerCount. + /// + [FieldOffset(32)] + public int PreferredTemporalLayerCount; + + /// + /// PreferredConstantQp indicates the preferred values to use for VkVideoEncodeH264NaluSliceInfoKHR::constantQp for each picture type when using rate control mode^ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. + /// + [FieldOffset(36)] + public VkVideoEncodeH264QpKHR PreferredConstantQp; + + /// + /// PreferredMaxL0ReferenceCount indicates the preferred maximum number of reference pictures to use in the reference list L0. + /// + [FieldOffset(48)] + public int PreferredMaxL0ReferenceCount; + + /// + /// PreferredMaxL1ReferenceCount indicates the preferred maximum number of reference pictures to use in the reference list L1. + /// + [FieldOffset(52)] + public int PreferredMaxL1ReferenceCount; + + /// + /// PreferredStdEntropyCodingModeFlag indicates the preferred value to use for entropy_coding_mode_flag in StdVideoH264PpsFlags. + /// + [FieldOffset(56)] + public Brutal.Bool32 PreferredStdEntropyCodingModeFlag; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..8e1c9e3 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264QuantizationMapCapabilitiesKHR.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264QuantizationMapCapabilitiesKHR - Structure describing H.264 encode quantization map capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities of an H.264 encode profile^, the + /// VkVideoEncodeH264QuantizationMapCapabilitiesKHR structure can be + /// included in the pNext chain of the VkVideoCapabilitiesKHR + /// structure to retrieve additional video encode quantization map capabilities + /// specific to H.264 encode profiles. + /// + /// + /// The VkVideoEncodeH264QuantizationMapCapabilitiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 with VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoEncodeH264QuantizationMapCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// int32_t minQpDelta; + /// int32_t maxQpDelta; + /// } VkVideoEncodeH264QuantizationMapCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH264QuantizationMapCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264QuantizationMapCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinQpDelta indicates the minimum QP delta value supported for H.264 QP delta maps^. + /// + [FieldOffset(16)] + public int MinQpDelta; + + /// + /// MaxQpDelta indicates the maximum QP delta value supported for H.264 QP delta maps^. + /// + [FieldOffset(20)] + public int MaxQpDelta; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlInfoKHR.gen.cs new file mode 100644 index 0000000..89ae199 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlInfoKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264RateControlInfoKHR - Structure describing H.264 stream rate control parameters + /// + /// + /// + /// The VkVideoEncodeH264RateControlInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264RateControlInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeH264RateControlFlagsKHR flags; + /// uint32_t gopFrameCount; + /// uint32_t idrPeriod; + /// uint32_t consecutiveBFrameCount; + /// uint32_t temporalLayerCount; + /// } VkVideoEncodeH264RateControlInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeH264RateControlInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264RateControlInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeH264RateControlFlagsKHR specifying H.264 rate control flags. + /// + [FieldOffset(16)] + public VkVideoEncodeH264RateControlFlagsKHR Flags; + + /// + /// GopFrameCount is the number of frames within a group of pictures (GOP)^ intended to be used by the application. If it is 0, the rate control algorithm may: assume an implementation-dependent GOP length. If it is UINT32_MAX, the GOP length is treated as infinite. + /// + [FieldOffset(20)] + public int GopFrameCount; + + /// + /// IdrPeriod is the interval, in terms of number of frames, between two IDR frames^ (see IDR period^). If it is 0, the rate control algorithm may: assume an implementation-dependent IDR period. If it is UINT32_MAX, the IDR period is treated as infinite. + /// + [FieldOffset(24)] + public int IdrPeriod; + + /// + /// ConsecutiveBFrameCount is the number of consecutive B frames between I and/or P frames within the GOP^. + /// + [FieldOffset(28)] + public int ConsecutiveBFrameCount; + + /// + /// TemporalLayerCount specifies the number of H.264 temporal layers that the application intends to use. + /// + [FieldOffset(32)] + public int TemporalLayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlLayerInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlLayerInfoKHR.gen.cs new file mode 100644 index 0000000..03f5b43 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264RateControlLayerInfoKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264RateControlLayerInfoKHR - Structure describing H.264 per-layer rate control parameters + /// + /// + /// + /// The VkVideoEncodeH264RateControlLayerInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264RateControlLayerInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useMinQp; + /// VkVideoEncodeH264QpKHR minQp; + /// VkBool32 useMaxQp; + /// VkVideoEncodeH264QpKHR maxQp; + /// VkBool32 useMaxFrameSize; + /// VkVideoEncodeH264FrameSizeKHR maxFrameSize; + /// } VkVideoEncodeH264RateControlLayerInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoEncodeH264RateControlLayerInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264RateControlLayerInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseMinQp indicates whether the QP values determined by rate control will be clamped to the lower bounds on the QP values specified in minQp. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseMinQp; + + /// + /// MinQp specifies the lower bounds on the QP values, for each picture type, that the implementation's rate control algorithm will use when useMinQp is VK_TRUE. + /// + [FieldOffset(20)] + public VkVideoEncodeH264QpKHR MinQp; + + /// + /// UseMaxQp indicates whether the QP values determined by rate control will be clamped to the upper bounds on the QP values specified in maxQp. + /// + [FieldOffset(32)] + public Brutal.Bool32 UseMaxQp; + + /// + /// MaxQp specifies the upper bounds on the QP values, for each picture type, that the implementation's rate control algorithm will use when useMaxQp is VK_TRUE. + /// + [FieldOffset(36)] + public VkVideoEncodeH264QpKHR MaxQp; + + /// + /// UseMaxFrameSize indicates whether the implementation's rate control algorithm should use the values specified in maxFrameSize as the upper bounds on the encoded frame size for each picture type. + /// + [FieldOffset(48)] + public Brutal.Bool32 UseMaxFrameSize; + + /// + /// MaxFrameSize specifies the upper bounds on the encoded frame size, for each picture type, when useMaxFrameSize is VK_TRUE. + /// + [FieldOffset(52)] + public VkVideoEncodeH264FrameSizeKHR MaxFrameSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionCreateInfoKHR.gen.cs new file mode 100644 index 0000000..d1240ac --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionCreateInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264SessionCreateInfoKHR - Structure specifies H.264 encode session parameters + /// + /// + /// + /// The VkVideoEncodeH264SessionCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264SessionCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useMaxLevelIdc; + /// StdVideoH264LevelIdc maxLevelIdc; + /// } VkVideoEncodeH264SessionCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH264SessionCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264SessionCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseMaxLevelIdc indicates whether the value of maxLevelIdc should be used by the implementation. When it is VK_FALSE, the implementation ignores the value of maxLevelIdc and uses the value of VkVideoEncodeH264CapabilitiesKHR::maxLevelIdc, as reported by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseMaxLevelIdc; + + /// + /// MaxLevelIdc is a StdVideoH264LevelIdc value specifying the upper bound on the H.264 level for the video bitstreams produced by the created video session, where enum constant `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifies H.264 level `<major>.<minor>` as defined in section A.3 of the ITU-T H.264 Specification^. + /// + [FieldOffset(20)] + public StdVideoH264LevelIdc MaxLevelIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersAddInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersAddInfoKHR.gen.cs new file mode 100644 index 0000000..22b4c95 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersAddInfoKHR.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264SessionParametersAddInfoKHR - Structure specifies H.264 encoder parameter set information + /// + /// + /// + /// The VkVideoEncodeH264SessionParametersAddInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264SessionParametersAddInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stdSPSCount; + /// const StdVideoH264SequenceParameterSet* pStdSPSs; + /// uint32_t stdPPSCount; + /// const StdVideoH264PictureParameterSet* pStdPPSs; + /// } VkVideoEncodeH264SessionParametersAddInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoEncodeH264SessionParametersAddInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264SessionParametersAddInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdSPSCount is the number of elements in the pStdSPSs array. + /// + [FieldOffset(16)] + public int StdSPSCount; + + /// + /// StdSPSs is a pointer to an array of StdVideoH264SequenceParameterSet structures describing the H.264 SPS^ entries to add. + /// + [FieldOffset(24)] + public StdVideoH264SequenceParameterSet* StdSPSs; + + /// + /// StdPPSCount is the number of elements in the pStdPPSs array. + /// + [FieldOffset(32)] + public int StdPPSCount; + + /// + /// StdPPSs is a pointer to an array of StdVideoH264PictureParameterSet structures describing the H.264 PPS^ entries to add. + /// + [FieldOffset(40)] + public StdVideoH264PictureParameterSet* StdPPSs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..6d46259 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,63 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264SessionParametersCreateInfoKHR - Structure specifies H.264 encoder parameter set information + /// + /// + /// + /// When a video session parameters^ object is + /// created with the codec operation + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, the + /// VkVideoSessionParametersCreateInfoKHR::pNext chain must include + /// a VkVideoEncodeH264SessionParametersCreateInfoKHR structure specifying + /// the capacity and initial contents of the object. + /// + /// + /// The VkVideoEncodeH264SessionParametersCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264SessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxStdSPSCount; + /// uint32_t maxStdPPSCount; + /// const VkVideoEncodeH264SessionParametersAddInfoKHR* pParametersAddInfo; + /// } VkVideoEncodeH264SessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH264SessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264SessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxStdSPSCount is the maximum number of H.264 SPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(16)] + public int MaxStdSPSCount; + + /// + /// MaxStdPPSCount is the maximum number of H.264 PPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(20)] + public int MaxStdPPSCount; + + /// + /// ParametersAddInfo is `NULL` or a pointer to a VkVideoEncodeH264SessionParametersAddInfoKHR structure specifying H.264 parameters to add upon object creation. + /// + [FieldOffset(24)] + public VkVideoEncodeH264SessionParametersAddInfoKHR* ParametersAddInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.gen.cs new file mode 100644 index 0000000..736c907 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersFeedbackInfoKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264SessionParametersFeedbackInfoKHR - Structure providing feedback about the requested H.264 video session parameters + /// + /// + /// + /// The VkVideoEncodeH264SessionParametersFeedbackInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hasStdSPSOverrides; + /// VkBool32 hasStdPPSOverrides; + /// } VkVideoEncodeH264SessionParametersFeedbackInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264SessionParametersFeedbackInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HasStdSPSOverrides indicates whether any of the parameters of the requested H.264 sequence parameter set^, if one was requested via VkVideoEncodeH264SessionParametersGetInfoKHR::writeStdSPS, were overridden^ by the implementation. + /// + [FieldOffset(16)] + public Brutal.Bool32 HasStdSPSOverrides; + + /// + /// HasStdPPSOverrides indicates whether any of the parameters of the requested H.264 picture parameter set^, if one was requested via VkVideoEncodeH264SessionParametersGetInfoKHR::writeStdPPS, were overridden^ by the implementation. + /// + [FieldOffset(20)] + public Brutal.Bool32 HasStdPPSOverrides; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersGetInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersGetInfoKHR.gen.cs new file mode 100644 index 0000000..95e5632 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH264SessionParametersGetInfoKHR.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH264SessionParametersGetInfoKHR - Structure specifying parameters for retrieving encoded H.264 parameter set data + /// + /// + /// + /// The VkVideoEncodeH264SessionParametersGetInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h264 + /// typedef struct VkVideoEncodeH264SessionParametersGetInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 writeStdSPS; + /// VkBool32 writeStdPPS; + /// uint32_t stdSPSId; + /// uint32_t stdPPSId; + /// } VkVideoEncodeH264SessionParametersGetInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH264SessionParametersGetInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH264SessionParametersGetInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WriteStdSPS indicates whether the encoded H.264 sequence parameter set^ identified by stdSPSId is requested to be retrieved. + /// + [FieldOffset(16)] + public Brutal.Bool32 WriteStdSPS; + + /// + /// WriteStdPPS indicates whether the encoded H.264 picture parameter set^ identified by the pair constructed from stdSPSId and stdPPSId is requested to be retrieved. + /// + [FieldOffset(20)] + public Brutal.Bool32 WriteStdPPS; + + /// + /// StdSPSId specifies the H.264 sequence parameter set ID used to identify the retrieved H.264 sequence and/or picture parameter set(s). + /// + [FieldOffset(24)] + public int StdSPSId; + + /// + /// StdPPSId specifies the H.264 picture parameter set ID used to identify the retrieved H.264 picture parameter set when writeStdPPS is VK_TRUE. + /// + [FieldOffset(28)] + public int StdPPSId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265CapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265CapabilitiesKHR.gen.cs new file mode 100644 index 0000000..a461369 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265CapabilitiesKHR.gen.cs @@ -0,0 +1,152 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265CapabilitiesKHR - Structure describing H.265 encode capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities for an H.265 encode profile^, the + /// VkVideoCapabilitiesKHR::pNext chain must include a + /// VkVideoEncodeH265CapabilitiesKHR structure that will be filled with + /// the profile-specific capabilities. + /// + /// + /// The VkVideoEncodeH265CapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265CapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeH265CapabilityFlagsKHR flags; + /// StdVideoH265LevelIdc maxLevelIdc; + /// uint32_t maxSliceSegmentCount; + /// VkExtent2D maxTiles; + /// VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes; + /// VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes; + /// uint32_t maxPPictureL0ReferenceCount; + /// uint32_t maxBPictureL0ReferenceCount; + /// uint32_t maxL1ReferenceCount; + /// uint32_t maxSubLayerCount; + /// VkBool32 expectDyadicTemporalSubLayerPattern; + /// int32_t minQp; + /// int32_t maxQp; + /// VkBool32 prefersGopRemainingFrames; + /// VkBool32 requiresGopRemainingFrames; + /// VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags; + /// } VkVideoEncodeH265CapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 88)] + public unsafe partial struct VkVideoEncodeH265CapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265CapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeH265CapabilityFlagsKHR indicating supported H.265 encoding capabilities. + /// + [FieldOffset(16)] + public VkVideoEncodeH265CapabilityFlagsKHR Flags; + + /// + /// MaxLevelIdc is a StdVideoH265LevelIdc value indicating the maximum H.265 level supported by the profile, where enum constant `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifies H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification^. + /// + [FieldOffset(20)] + public StdVideoH265LevelIdc MaxLevelIdc; + + /// + /// MaxSliceSegmentCount indicates the maximum number of slice segments that can be encoded for a single picture. Further restrictions may: apply to the number of slice segments that can be encoded for a single picture depending on other capabilities and codec-specific rules. + /// + [FieldOffset(24)] + public int MaxSliceSegmentCount; + + /// + /// MaxTiles indicates the maximum number of H.265 tile columns and rows, as defined in sections 3.175 and 3.176 of the ITU-T H.265 Specification^ that can be encoded for a single picture. Further restrictions may: apply to the number of H.265 tiles that can be encoded for a single picture depending on other capabilities and codec-specific rules. + /// + [FieldOffset(28)] + public VkExtent2D MaxTiles; + + /// + /// CtbSizes is a bitmask of VkVideoEncodeH265CtbSizeFlagsKHR describing the supported CTB sizes. + /// + [FieldOffset(36)] + public VkVideoEncodeH265CtbSizeFlagsKHR CtbSizes; + + /// + /// TransformBlockSizes is a bitmask of VkVideoEncodeH265TransformBlockSizeFlagsKHR describing the supported transform block sizes. + /// + [FieldOffset(40)] + public VkVideoEncodeH265TransformBlockSizeFlagsKHR TransformBlockSizes; + + /// + /// MaxPPictureL0ReferenceCount indicates the maximum number of reference pictures the implementation supports in the reference list L0 for P pictures^. + [NOTE] + /// + [FieldOffset(44)] + public int MaxPPictureL0ReferenceCount; + + /// + /// MaxBPictureL0ReferenceCount + /// + [FieldOffset(48)] + public int MaxBPictureL0ReferenceCount; + + /// + /// MaxL1ReferenceCount + /// + [FieldOffset(52)] + public int MaxL1ReferenceCount; + + /// + /// MaxSubLayerCount + /// + [FieldOffset(56)] + public int MaxSubLayerCount; + + /// + /// ExpectDyadicTemporalSubLayerPattern + /// + [FieldOffset(60)] + public Brutal.Bool32 ExpectDyadicTemporalSubLayerPattern; + + /// + /// MinQp + /// + [FieldOffset(64)] + public int MinQp; + + /// + /// MaxQp + /// + [FieldOffset(68)] + public int MaxQp; + + /// + /// PrefersGopRemainingFrames + /// + [FieldOffset(72)] + public Brutal.Bool32 PrefersGopRemainingFrames; + + /// + /// RequiresGopRemainingFrames + /// + [FieldOffset(76)] + public Brutal.Bool32 RequiresGopRemainingFrames; + + /// + /// StdSyntaxFlags + /// + [FieldOffset(80)] + public VkVideoEncodeH265StdFlagsKHR StdSyntaxFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265DpbSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265DpbSlotInfoKHR.gen.cs new file mode 100644 index 0000000..3fcde51 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265DpbSlotInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265DpbSlotInfoKHR - Structure specifies H.265 encode DPB picture information + /// + /// + /// + /// The VkVideoEncodeH265DpbSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265DpbSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo; + /// } VkVideoEncodeH265DpbSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH265DpbSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265DpbSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdReferenceInfo is a pointer to a StdVideoEncodeH265ReferenceInfo structure specifying H.265 reference information^. + /// + [FieldOffset(16)] + public StdVideoEncodeH265ReferenceInfo* StdReferenceInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265FrameSizeKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265FrameSizeKHR.gen.cs new file mode 100644 index 0000000..7f8eb13 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265FrameSizeKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265FrameSizeKHR - Structure describing frame size values per H.265 picture type + /// + /// + /// + /// The VkVideoEncodeH265FrameSizeKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265FrameSizeKHR { + /// uint32_t frameISize; + /// uint32_t framePSize; + /// uint32_t frameBSize; + /// } VkVideoEncodeH265FrameSizeKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVideoEncodeH265FrameSizeKHR() + { + /// + /// FrameISize is the size in bytes to be used for I frames^. + /// + [FieldOffset(0)] + public int FrameISize; + + /// + /// FramePSize is the size in bytes to be used for P frames^. + /// + [FieldOffset(4)] + public int FramePSize; + + /// + /// FrameBSize is the size in bytes to be used for B frames^. + /// + [FieldOffset(8)] + public int FrameBSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265GopRemainingFrameInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265GopRemainingFrameInfoKHR.gen.cs new file mode 100644 index 0000000..2be9542 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265GopRemainingFrameInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265GopRemainingFrameInfoKHR - Structure specifying H.265 encode rate control GOP remaining frame counts + /// + /// + /// + /// The VkVideoEncodeH265GopRemainingFrameInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265GopRemainingFrameInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useGopRemainingFrames; + /// uint32_t gopRemainingI; + /// uint32_t gopRemainingP; + /// uint32_t gopRemainingB; + /// } VkVideoEncodeH265GopRemainingFrameInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH265GopRemainingFrameInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265GopRemainingFrameInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseGopRemainingFrames indicates whether the implementation's rate control algorithm should use the values specified in gopRemainingI, gopRemainingP, and gopRemainingB. If useGopRemainingFrames is VK_FALSE, then the values of gopRemainingI, gopRemainingP, and gopRemainingB are ignored. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseGopRemainingFrames; + + /// + /// GopRemainingI specifies the number of I frames^ the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the video encode operation. + /// + [FieldOffset(20)] + public int GopRemainingI; + + /// + /// GopRemainingP specifies the number of P frames^ the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the video encode operation. + /// + [FieldOffset(24)] + public int GopRemainingP; + + /// + /// GopRemainingB specifies the number of B frames^ the implementation's rate control algorithm should assume to be remaining in the GOP^ prior to executing the video encode operation. + /// + [FieldOffset(28)] + public int GopRemainingB; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265NaluSliceSegmentInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265NaluSliceSegmentInfoKHR.gen.cs new file mode 100644 index 0000000..ab50f93 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265NaluSliceSegmentInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265NaluSliceSegmentInfoKHR - Structure specifies H.265 encode slice segment NALU parameters + /// + /// + /// + /// The VkVideoEncodeH265NaluSliceSegmentInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265NaluSliceSegmentInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// int32_t constantQp; + /// const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader; + /// } VkVideoEncodeH265NaluSliceSegmentInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH265NaluSliceSegmentInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265NaluSliceSegmentInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ConstantQp is the QP to use for the slice segment if the current rate control mode^ configured for the video session is VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. + /// + [FieldOffset(16)] + public int ConstantQp; + + /// + /// StdSliceSegmentHeader is a pointer to a StdVideoEncodeH265SliceSegmentHeader structure specifying H.265 slice segment header parameters^ for the slice segment. + /// + [FieldOffset(24)] + public StdVideoEncodeH265SliceSegmentHeader* StdSliceSegmentHeader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265PictureInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265PictureInfoKHR.gen.cs new file mode 100644 index 0000000..f4f82c0 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265PictureInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265PictureInfoKHR - Structure specifies H.265 encode frame parameters + /// + /// + /// + /// The VkVideoEncodeH265PictureInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265PictureInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t naluSliceSegmentEntryCount; + /// const VkVideoEncodeH265NaluSliceSegmentInfoKHR* pNaluSliceSegmentEntries; + /// const StdVideoEncodeH265PictureInfo* pStdPictureInfo; + /// } VkVideoEncodeH265PictureInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeH265PictureInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265PictureInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// NaluSliceSegmentEntryCount is the number of elements in pNaluSliceSegmentEntries. + /// + [FieldOffset(16)] + public int NaluSliceSegmentEntryCount; + + /// + /// NaluSliceSegmentEntries is a pointer to an array of naluSliceSegmentEntryCount VkVideoEncodeH265NaluSliceSegmentInfoKHR structures specifying the parameters of the individual H.265 slice segments to encode for the input picture. + /// + [FieldOffset(24)] + public VkVideoEncodeH265NaluSliceSegmentInfoKHR* NaluSliceSegmentEntries; + + /// + /// StdPictureInfo is a pointer to a StdVideoEncodeH265PictureInfo structure specifying H.265 picture information^. + /// + [FieldOffset(32)] + public StdVideoEncodeH265PictureInfo* StdPictureInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265ProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265ProfileInfoKHR.gen.cs new file mode 100644 index 0000000..30061a7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265ProfileInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265ProfileInfoKHR - Structure specifying H.265 encode-specific video profile parameters + /// + /// + /// + /// A video profile supporting H.265 video encode operations is specified by + /// setting VkVideoProfileInfoKHR::videoCodecOperation to + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR and adding a + /// VkVideoEncodeH265ProfileInfoKHR structure to the + /// VkVideoProfileInfoKHR::pNext chain. + /// + /// + /// The VkVideoEncodeH265ProfileInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265ProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// StdVideoH265ProfileIdc stdProfileIdc; + /// } VkVideoEncodeH265ProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH265ProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265ProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdProfileIdc is a StdVideoH265ProfileIdc value specifying the H.265 codec profile IDC, as defined in section A.3 of the ITU-T H.265 Specification^. + /// + [FieldOffset(16)] + public StdVideoH265ProfileIdc StdProfileIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QpKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QpKHR.gen.cs new file mode 100644 index 0000000..6aff788 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QpKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265QpKHR - Structure describing H.265 QP values per picture type + /// + /// + /// + /// The VkVideoEncodeH265QpKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265QpKHR { + /// int32_t qpI; + /// int32_t qpP; + /// int32_t qpB; + /// } VkVideoEncodeH265QpKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 12)] + public partial struct VkVideoEncodeH265QpKHR() + { + /// + /// QpI is the QP to be used for I pictures^. + /// + [FieldOffset(0)] + public int QpI; + + /// + /// QpP is the QP to be used for P pictures^. + /// + [FieldOffset(4)] + public int QpP; + + /// + /// QpB is the QP to be used for B pictures^. + /// + [FieldOffset(8)] + public int QpB; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QualityLevelPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QualityLevelPropertiesKHR.gen.cs new file mode 100644 index 0000000..8b8336c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QualityLevelPropertiesKHR.gen.cs @@ -0,0 +1,99 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265QualityLevelPropertiesKHR - Structure describing the H.265 encode quality level properties + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR + /// with pVideoProfile->videoCodecOperation specified as + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the + /// VkVideoEncodeH265QualityLevelPropertiesKHR structure must be included + /// in the pNext chain of the VkVideoEncodeQualityLevelPropertiesKHR + /// structure to retrieve additional video encode quality level properties + /// specific to H.265 encoding. + /// + /// + /// The VkVideoEncodeH265QualityLevelPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265QualityLevelPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeH265RateControlFlagsKHR preferredRateControlFlags; + /// uint32_t preferredGopFrameCount; + /// uint32_t preferredIdrPeriod; + /// uint32_t preferredConsecutiveBFrameCount; + /// uint32_t preferredSubLayerCount; + /// VkVideoEncodeH265QpKHR preferredConstantQp; + /// uint32_t preferredMaxL0ReferenceCount; + /// uint32_t preferredMaxL1ReferenceCount; + /// } VkVideoEncodeH265QualityLevelPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkVideoEncodeH265QualityLevelPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265QualityLevelPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PreferredRateControlFlags is a bitmask of VkVideoEncodeH265RateControlFlagsKHR values indicating the preferred flags to use for VkVideoEncodeH265RateControlInfoKHR::flags. + /// + [FieldOffset(16)] + public VkVideoEncodeH265RateControlFlagsKHR PreferredRateControlFlags; + + /// + /// PreferredGopFrameCount indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::gopFrameCount. + /// + [FieldOffset(20)] + public int PreferredGopFrameCount; + + /// + /// PreferredIdrPeriod indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::idrPeriod. + /// + [FieldOffset(24)] + public int PreferredIdrPeriod; + + /// + /// PreferredConsecutiveBFrameCount indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::consecutiveBFrameCount. + /// + [FieldOffset(28)] + public int PreferredConsecutiveBFrameCount; + + /// + /// PreferredSubLayerCount indicates the preferred value to use for VkVideoEncodeH265RateControlInfoKHR::subLayerCount. + /// + [FieldOffset(32)] + public int PreferredSubLayerCount; + + /// + /// PreferredConstantQp indicates the preferred values to use for VkVideoEncodeH265NaluSliceSegmentInfoKHR::constantQp for each picture type when using rate control mode^ VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR. + /// + [FieldOffset(36)] + public VkVideoEncodeH265QpKHR PreferredConstantQp; + + /// + /// PreferredMaxL0ReferenceCount indicates the preferred maximum number of reference pictures to use in the reference list L0. + /// + [FieldOffset(48)] + public int PreferredMaxL0ReferenceCount; + + /// + /// PreferredMaxL1ReferenceCount indicates the preferred maximum number of reference pictures to use in the reference list L1. + /// + [FieldOffset(52)] + public int PreferredMaxL1ReferenceCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..d377818 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265QuantizationMapCapabilitiesKHR.gen.cs @@ -0,0 +1,56 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265QuantizationMapCapabilitiesKHR - Structure describing H.265 encode quantization map capabilities + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR to query the + /// capabilities of an H.265 encode profile^, the + /// VkVideoEncodeH265QuantizationMapCapabilitiesKHR structure can be + /// included in the pNext chain of the VkVideoCapabilitiesKHR + /// structure to retrieve additional video encode quantization map capabilities + /// specific to H.265 encode profiles. + /// + /// + /// The VkVideoEncodeH265QuantizationMapCapabilitiesKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoEncodeH265QuantizationMapCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// int32_t minQpDelta; + /// int32_t maxQpDelta; + /// } VkVideoEncodeH265QuantizationMapCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH265QuantizationMapCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265QuantizationMapCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MinQpDelta indicates the minimum QP delta value supported for H.265 QP delta maps^. + /// + [FieldOffset(16)] + public int MinQpDelta; + + /// + /// MaxQpDelta indicates the maximum QP delta value supported for H.265 QP delta maps^. + /// + [FieldOffset(20)] + public int MaxQpDelta; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlInfoKHR.gen.cs new file mode 100644 index 0000000..a801c3c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlInfoKHR.gen.cs @@ -0,0 +1,68 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265RateControlInfoKHR - Structure describing H.265 stream rate control parameters + /// + /// + /// + /// The VkVideoEncodeH265RateControlInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265RateControlInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeH265RateControlFlagsKHR flags; + /// uint32_t gopFrameCount; + /// uint32_t idrPeriod; + /// uint32_t consecutiveBFrameCount; + /// uint32_t subLayerCount; + /// } VkVideoEncodeH265RateControlInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeH265RateControlInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265RateControlInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is a bitmask of VkVideoEncodeH265RateControlFlagsKHR specifying H.265 rate control flags. + /// + [FieldOffset(16)] + public VkVideoEncodeH265RateControlFlagsKHR Flags; + + /// + /// GopFrameCount is the number of frames within a group of pictures (GOP)^ intended to be used by the application. If it is 0, the rate control algorithm may: assume an implementation-dependent GOP length. If it is UINT32_MAX, the GOP length is treated as infinite. + /// + [FieldOffset(20)] + public int GopFrameCount; + + /// + /// IdrPeriod is the interval, in terms of number of frames, between two IDR frames^ (see IDR period^). If it is 0, the rate control algorithm may: assume an implementation-dependent IDR period. If it is UINT32_MAX, the IDR period is treated as infinite. + /// + [FieldOffset(24)] + public int IdrPeriod; + + /// + /// ConsecutiveBFrameCount is the number of consecutive B frames between I and/or P frames within the GOP^. + /// + [FieldOffset(28)] + public int ConsecutiveBFrameCount; + + /// + /// SubLayerCount specifies the number of H.265 sub-layers that the application intends to use. + /// + [FieldOffset(32)] + public int SubLayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlLayerInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlLayerInfoKHR.gen.cs new file mode 100644 index 0000000..17f77ff --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265RateControlLayerInfoKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265RateControlLayerInfoKHR - Structure describing H.265 per-layer rate control parameters + /// + /// + /// + /// The VkVideoEncodeH265RateControlLayerInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265RateControlLayerInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useMinQp; + /// VkVideoEncodeH265QpKHR minQp; + /// VkBool32 useMaxQp; + /// VkVideoEncodeH265QpKHR maxQp; + /// VkBool32 useMaxFrameSize; + /// VkVideoEncodeH265FrameSizeKHR maxFrameSize; + /// } VkVideoEncodeH265RateControlLayerInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoEncodeH265RateControlLayerInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265RateControlLayerInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseMinQp indicates whether the QP values determined by rate control will be clamped to the lower bounds on the QP values specified in minQp. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseMinQp; + + /// + /// MinQp specifies the lower bounds on the QP values, for each picture type, that the implementation's rate control algorithm will use when useMinQp is VK_TRUE. + /// + [FieldOffset(20)] + public VkVideoEncodeH265QpKHR MinQp; + + /// + /// UseMaxQp indicates whether the QP values determined by rate control will be clamped to the upper bounds on the QP values specified in maxQp. + /// + [FieldOffset(32)] + public Brutal.Bool32 UseMaxQp; + + /// + /// MaxQp specifies the upper bounds on the QP values, for each picture type, that the implementation's rate control algorithm will use when useMaxQp is VK_TRUE. + /// + [FieldOffset(36)] + public VkVideoEncodeH265QpKHR MaxQp; + + /// + /// UseMaxFrameSize indicates whether the implementation's rate control algorithm should use the values specified in maxFrameSize as the upper bounds on the encoded frame size for each picture type. + /// + [FieldOffset(48)] + public Brutal.Bool32 UseMaxFrameSize; + + /// + /// MaxFrameSize specifies the upper bounds on the encoded frame size, for each picture type, when useMaxFrameSize is VK_TRUE. + /// + [FieldOffset(52)] + public VkVideoEncodeH265FrameSizeKHR MaxFrameSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionCreateInfoKHR.gen.cs new file mode 100644 index 0000000..d37c86d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionCreateInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265SessionCreateInfoKHR - Structure specifies H.265 encode session parameters + /// + /// + /// + /// The VkVideoEncodeH265SessionCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265SessionCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 useMaxLevelIdc; + /// StdVideoH265LevelIdc maxLevelIdc; + /// } VkVideoEncodeH265SessionCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeH265SessionCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265SessionCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UseMaxLevelIdc indicates whether the value of maxLevelIdc should be used by the implementation. When it is VK_FALSE, the implementation ignores the value of maxLevelIdc and uses the value of VkVideoEncodeH265CapabilitiesKHR::maxLevelIdc, as reported by vkGetPhysicalDeviceVideoCapabilitiesKHR for the video profile. + /// + [FieldOffset(16)] + public Brutal.Bool32 UseMaxLevelIdc; + + /// + /// MaxLevelIdc is a StdVideoH265LevelIdc value specifying the upper bound on the H.265 level for the video bitstreams produced by the created video session, where enum constant `STD_VIDEO_H265_LEVEL_IDC_<major>_<minor>` identifies H.265 level `<major>.<minor>` as defined in section A.4 of the ITU-T H.265 Specification^. + /// + [FieldOffset(20)] + public StdVideoH265LevelIdc MaxLevelIdc; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersAddInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersAddInfoKHR.gen.cs new file mode 100644 index 0000000..f198de1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersAddInfoKHR.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265SessionParametersAddInfoKHR - Structure specifies H.265 encoder parameter set information + /// + /// + /// + /// The VkVideoEncodeH265SessionParametersAddInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265SessionParametersAddInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t stdVPSCount; + /// const StdVideoH265VideoParameterSet* pStdVPSs; + /// uint32_t stdSPSCount; + /// const StdVideoH265SequenceParameterSet* pStdSPSs; + /// uint32_t stdPPSCount; + /// const StdVideoH265PictureParameterSet* pStdPPSs; + /// } VkVideoEncodeH265SessionParametersAddInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoEncodeH265SessionParametersAddInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265SessionParametersAddInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// StdVPSCount is the number of elements in the pStdVPSs array. + /// + [FieldOffset(16)] + public int StdVPSCount; + + /// + /// StdVPSs is a pointer to an array of StdVideoH265VideoParameterSet structures describing the H.265 VPS^ entries to add. + /// + [FieldOffset(24)] + public StdVideoH265VideoParameterSet* StdVPSs; + + /// + /// StdSPSCount is the number of elements in the pStdSPSs array. + /// + [FieldOffset(32)] + public int StdSPSCount; + + /// + /// StdSPSs is a pointer to an array of StdVideoH265SequenceParameterSet structures describing the H.265 SPS^ entries to add. + /// + [FieldOffset(40)] + public StdVideoH265SequenceParameterSet* StdSPSs; + + /// + /// StdPPSCount is the number of elements in the pStdPPSs array. + /// + [FieldOffset(48)] + public int StdPPSCount; + + /// + /// StdPPSs is a pointer to an array of StdVideoH265PictureParameterSet structures describing the H.265 PPS^ entries to add. + /// + [FieldOffset(56)] + public StdVideoH265PictureParameterSet* StdPPSs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..2fc9bcc --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,70 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265SessionParametersCreateInfoKHR - Structure specifies H.265 encoder parameter set information + /// + /// + /// + /// When a video session parameters^ object is + /// created with the codec operation + /// VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, the + /// VkVideoSessionParametersCreateInfoKHR::pNext chain must include + /// a VkVideoEncodeH265SessionParametersCreateInfoKHR structure specifying + /// the capacity and initial contents of the object. + /// + /// + /// The VkVideoEncodeH265SessionParametersCreateInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265SessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t maxStdVPSCount; + /// uint32_t maxStdSPSCount; + /// uint32_t maxStdPPSCount; + /// const VkVideoEncodeH265SessionParametersAddInfoKHR* pParametersAddInfo; + /// } VkVideoEncodeH265SessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeH265SessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265SessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxStdVPSCount is the maximum number of H.265 VPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(16)] + public int MaxStdVPSCount; + + /// + /// MaxStdSPSCount is the maximum number of H.265 SPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(20)] + public int MaxStdSPSCount; + + /// + /// MaxStdPPSCount is the maximum number of H.265 PPS^ entries the created VkVideoSessionParametersKHR can contain. + /// + [FieldOffset(24)] + public int MaxStdPPSCount; + + /// + /// ParametersAddInfo is `NULL` or a pointer to a VkVideoEncodeH265SessionParametersAddInfoKHR structure specifying H.265 parameters to add upon object creation. + /// + [FieldOffset(32)] + public VkVideoEncodeH265SessionParametersAddInfoKHR* ParametersAddInfo; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.gen.cs new file mode 100644 index 0000000..1c94ab2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersFeedbackInfoKHR.gen.cs @@ -0,0 +1,55 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265SessionParametersFeedbackInfoKHR - Structure providing feedback about the requested H.265 video session parameters + /// + /// + /// + /// The VkVideoEncodeH265SessionParametersFeedbackInfoKHR structure is + /// defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hasStdVPSOverrides; + /// VkBool32 hasStdSPSOverrides; + /// VkBool32 hasStdPPSOverrides; + /// } VkVideoEncodeH265SessionParametersFeedbackInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265SessionParametersFeedbackInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HasStdVPSOverrides indicates whether any of the parameters of the requested H.265 video parameter set^, if one was requested via VkVideoEncodeH265SessionParametersGetInfoKHR::writeStdVPS, were overridden^ by the implementation. + /// + [FieldOffset(16)] + public Brutal.Bool32 HasStdVPSOverrides; + + /// + /// HasStdSPSOverrides indicates whether any of the parameters of the requested H.265 sequence parameter set^, if one was requested via VkVideoEncodeH265SessionParametersGetInfoKHR::writeStdSPS, were overridden^ by the implementation. + /// + [FieldOffset(20)] + public Brutal.Bool32 HasStdSPSOverrides; + + /// + /// HasStdPPSOverrides indicates whether any of the parameters of the requested H.265 picture parameter set^, if one was requested via VkVideoEncodeH265SessionParametersGetInfoKHR::writeStdPPS, were overridden^ by the implementation. + /// + [FieldOffset(24)] + public Brutal.Bool32 HasStdPPSOverrides; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersGetInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersGetInfoKHR.gen.cs new file mode 100644 index 0000000..9f368f1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeH265SessionParametersGetInfoKHR.gen.cs @@ -0,0 +1,76 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeH265SessionParametersGetInfoKHR - Structure specifying parameters for retrieving encoded H.265 parameter set data + /// + /// + /// + /// The VkVideoEncodeH265SessionParametersGetInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 + /// typedef struct VkVideoEncodeH265SessionParametersGetInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 writeStdVPS; + /// VkBool32 writeStdSPS; + /// VkBool32 writeStdPPS; + /// uint32_t stdVPSId; + /// uint32_t stdSPSId; + /// uint32_t stdPPSId; + /// } VkVideoEncodeH265SessionParametersGetInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeH265SessionParametersGetInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeH265SessionParametersGetInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// WriteStdVPS indicates whether the encoded H.265 video parameter set^ identified by stdVPSId is requested to be retrieved. + /// + [FieldOffset(16)] + public Brutal.Bool32 WriteStdVPS; + + /// + /// WriteStdSPS indicates whether the encoded H.265 sequence parameter set^ identified by the pair constructed from stdVPSId and stdSPSId is requested to be retrieved. + /// + [FieldOffset(20)] + public Brutal.Bool32 WriteStdSPS; + + /// + /// WriteStdPPS indicates whether the encoded H.265 picture parameter set^ identified by the triplet constructed from stdVPSId, stdSPSId, and stdPPSId is requested to be retrieved. + /// + [FieldOffset(24)] + public Brutal.Bool32 WriteStdPPS; + + /// + /// StdVPSId specifies the H.265 video parameter set ID used to identify the retrieved H.265 video, sequence, and/or picture parameter set(s). + /// + [FieldOffset(28)] + public int StdVPSId; + + /// + /// StdSPSId specifies the H.265 sequence parameter set ID used to identify the retrieved H.265 sequence and/or picture parameter set(s) when writeStdSPS and/or writeStdPPS is VK_TRUE. + /// + [FieldOffset(32)] + public int StdSPSId; + + /// + /// StdPPSId specifies the H.265 picture parameter set ID used to identify the retrieved H.265 picture parameter set when writeStdPPS is VK_TRUE. + /// + [FieldOffset(36)] + public int StdPPSId; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeInfoKHR.gen.cs new file mode 100644 index 0000000..a4ff744 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeInfoKHR.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeInfoKHR - Structure specifying video encode parameters + /// + /// + /// + /// The VkVideoEncodeInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeFlagsKHR flags; + /// VkBuffer dstBuffer; + /// VkDeviceSize dstBufferOffset; + /// VkDeviceSize dstBufferRange; + /// VkVideoPictureResourceInfoKHR srcPictureResource; + /// const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; + /// uint32_t referenceSlotCount; + /// const VkVideoReferenceSlotInfoKHR* pReferenceSlots; + /// uint32_t precedingExternallyEncodedBytes; + /// } VkVideoEncodeInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 128)] + public unsafe partial struct VkVideoEncodeInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeInfoKHR; + + /// + /// Next is a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkVideoEncodeFlagsKHR Flags; + + /// + /// DstBuffer is the destination video bitstream buffer to write the encoded bitstream to. + /// + [FieldOffset(24)] + public VkBuffer DstBuffer; + + /// + /// DstBufferOffset is the starting offset in bytes from the start of dstBuffer to write the encoded bitstream to. + /// + [FieldOffset(32)] + public ByteSize64 DstBufferOffset; + + /// + /// DstBufferRange is the maximum bitstream size in bytes that can be written to dstBuffer, starting from dstBufferOffset. + /// + [FieldOffset(40)] + public ByteSize64 DstBufferRange; + + /// + /// SrcPictureResource is the video picture resource to use as the encode input picture^. + /// + [FieldOffset(48)] + public VkVideoPictureResourceInfoKHR SrcPictureResource; + + /// + /// SetupReferenceSlot is `NULL` or a pointer to a VkVideoReferenceSlotInfoKHR structure specifying the reconstructed picture information^. + /// + [FieldOffset(96)] + public VkVideoReferenceSlotInfoKHR* SetupReferenceSlot; + + /// + /// ReferenceSlotCount is the number of elements in the pReferenceSlots array. + /// + [FieldOffset(104)] + public int ReferenceSlotCount; + + /// + /// ReferenceSlots is `NULL` or a pointer to an array of VkVideoReferenceSlotInfoKHR structures describing the DPB slots and corresponding reference picture^ resources to use in this video encode operation (the set of active reference pictures^). + /// + [FieldOffset(112)] + public VkVideoReferenceSlotInfoKHR* ReferenceSlots; + + /// + /// PrecedingExternallyEncodedBytes is the number of bytes externally encoded by the application to the video bitstream and is used to update the internal state of the implementation's rate control^ algorithm to account for the bitrate budget consumed by these externally encoded bytes. + /// + [FieldOffset(120)] + public int PrecedingExternallyEncodedBytes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..6f01e0b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshCapabilitiesKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeIntraRefreshCapabilitiesKHR - Structure describing video encode intra refresh capabilities for a video profile + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with + /// pVideoProfile->videoCodecOperation specifying an encode operation, the + /// VkVideoEncodeIntraRefreshCapabilitiesKHR structure can be included in + /// the pNext chain of the VkVideoCapabilitiesKHR structure to + /// retrieve capabilities specific to video encode intra refresh. + /// + /// + /// The VkVideoEncodeIntraRefreshCapabilitiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_intra_refresh + /// typedef struct VkVideoEncodeIntraRefreshCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeIntraRefreshModeFlagsKHR intraRefreshModes; + /// uint32_t maxIntraRefreshCycleDuration; + /// uint32_t maxIntraRefreshActiveReferencePictures; + /// VkBool32 partitionIndependentIntraRefreshRegions; + /// VkBool32 nonRectangularIntraRefreshRegions; + /// } VkVideoEncodeIntraRefreshCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeIntraRefreshCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeIntraRefreshCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IntraRefreshModes is a bitmask of VkVideoEncodeIntraRefreshModeFlagsKHR values indicating the set of supported intra refresh modes^. + /// + [FieldOffset(16)] + public VkVideoEncodeIntraRefreshModeFlagsKHR IntraRefreshModes; + + /// + /// MaxIntraRefreshCycleDuration specifies the maximum supported intra refresh cycle duration^. + /// + [FieldOffset(20)] + public int MaxIntraRefreshCycleDuration; + + /// + /// MaxIntraRefreshActiveReferencePictures is the maximum number of active reference pictures^ when encoding pictures with intra refresh^ enabled. This capability indicates additional restrictions beyond the maximum number of active reference pictures^ supported by the video profile, as reported in VkVideoCapabilitiesKHR::maxActiveReferencePictures and the maximum requested at video session creation time in VkVideoSessionCreateInfoKHR::maxActiveReferencePictures. + /// + [FieldOffset(24)] + public int MaxIntraRefreshActiveReferencePictures; + + /// + /// PartitionIndependentIntraRefreshRegions specifies whether the implementation supports intra refresh regions that are independent of the picture partitioning used during encoding. If it is VK_TRUE, then pictures can be encoded with multiple picture partitions, independent of the used intra refresh mode. Otherwise, pictures cannot: be encoded with multiple picture partitions with any intra refresh mode other than VK_VIDEO_ENCODE_INTRA_REFRESH_MODE_PER_PICTURE_PARTITION_BIT_KHR. + /// + [FieldOffset(28)] + public Brutal.Bool32 PartitionIndependentIntraRefreshRegions; + + /// + /// NonRectangularIntraRefreshRegions + /// + [FieldOffset(32)] + public Brutal.Bool32 NonRectangularIntraRefreshRegions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshInfoKHR.gen.cs new file mode 100644 index 0000000..ccd2181 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeIntraRefreshInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeIntraRefreshInfoKHR - Structure specifying video encode intra refresh parameters + /// + /// + /// + /// The VkVideoEncodeIntraRefreshInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_intra_refresh + /// typedef struct VkVideoEncodeIntraRefreshInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t intraRefreshCycleDuration; + /// uint32_t intraRefreshIndex; + /// } VkVideoEncodeIntraRefreshInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeIntraRefreshInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeIntraRefreshInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IntraRefreshCycleDuration is the used intra refresh cycle duration^. + /// + [FieldOffset(16)] + public int IntraRefreshCycleDuration; + + /// + /// IntraRefreshIndex is the intra refresh index^ of the encoded picture. + /// + [FieldOffset(20)] + public int IntraRefreshIndex; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeProfileRGBConversionInfoVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeProfileRGBConversionInfoVALVE.gen.cs new file mode 100644 index 0000000..e9afc5f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeProfileRGBConversionInfoVALVE.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeProfileRgbConversionInfoVALVE - Structure describing video encode RGB conversion for a video profile + /// + /// + /// + /// A video profile supporting video encode {RGBprime} conversion is specified + /// by an pVideoProfile->videoCodecOperation specifying an encode + /// operation and including a VkVideoEncodeProfileRgbConversionInfoVALVE + /// structure in the pNext chain of the VkVideoProfileInfoKHR + /// structure and enabling performEncodeRgbConversion. + /// + /// + /// The VkVideoEncodeProfileRgbConversionInfoVALVE structure is defined + /// as: + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef struct VkVideoEncodeProfileRgbConversionInfoVALVE { + /// VkStructureType sType; + /// const void* pNext; + /// VkBool32 performEncodeRgbConversion; + /// } VkVideoEncodeProfileRgbConversionInfoVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeProfileRGBConversionInfoVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeProfileRGBConversionInfoVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PerformEncodeRgbConversion is a boolean value indicating whether video encode {RGBprime} conversion will be used for the encode operation. + /// + [FieldOffset(16)] + public Brutal.Bool32 PerformEncodeRgbConversion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelInfoKHR.gen.cs new file mode 100644 index 0000000..c7b8469 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeQualityLevelInfoKHR - Structure specifying used video encode quality level + /// + /// + /// + /// The VkVideoEncodeQualityLevelInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeQualityLevelInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t qualityLevel; + /// } VkVideoEncodeQualityLevelInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeQualityLevelInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeQualityLevelInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QualityLevel is the used video encode quality level. + /// + [FieldOffset(16)] + public int QualityLevel; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelPropertiesKHR.gen.cs new file mode 100644 index 0000000..a17235e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQualityLevelPropertiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeQualityLevelPropertiesKHR - Structure describing the video encode quality level properties + /// + /// + /// + /// The VkVideoEncodeQualityLevelPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeQualityLevelPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode; + /// uint32_t preferredRateControlLayerCount; + /// } VkVideoEncodeQualityLevelPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeQualityLevelPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeQualityLevelPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// PreferredRateControlMode is a VkVideoEncodeRateControlModeFlagsKHR value indicating the preferred rate control mode^ to use with the video encode quality level. + /// + [FieldOffset(16)] + public VkVideoEncodeRateControlModeFlagsKHR PreferredRateControlMode; + + /// + /// PreferredRateControlLayerCount indicates the preferred number of rate control layers^ to use with the video encode quality level. + /// + [FieldOffset(20)] + public int PreferredRateControlLayerCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapCapabilitiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapCapabilitiesKHR.gen.cs new file mode 100644 index 0000000..8b77f93 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapCapabilitiesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeQuantizationMapCapabilitiesKHR - Structure describing video encode quantization map capabilities for a video profile + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with + /// pVideoProfile->videoCodecOperation specifying an encode operation, the + /// VkVideoEncodeQuantizationMapCapabilitiesKHR structure can be included + /// in the pNext chain of the VkVideoCapabilitiesKHR structure to + /// retrieve capabilities specific to video encode quantization maps. + /// + /// + /// The VkVideoEncodeQuantizationMapCapabilitiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoEncodeQuantizationMapCapabilitiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D maxQuantizationMapExtent; + /// } VkVideoEncodeQuantizationMapCapabilitiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeQuantizationMapCapabilitiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeQuantizationMapCapabilitiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MaxQuantizationMapExtent indicates the maximum supported width and height of quantization maps. + /// + [FieldOffset(16)] + public VkExtent2D MaxQuantizationMapExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapInfoKHR.gen.cs new file mode 100644 index 0000000..6cb3ae5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapInfoKHR.gen.cs @@ -0,0 +1,53 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeQuantizationMapInfoKHR - Structure specifying quantization map information to use for video encode operations + /// + /// + /// + /// The VkVideoEncodeQuantizationMapInfoKHR structure can be included in + /// the pNext chain of the VkVideoEncodeInfoKHR structure passed to + /// the vkCmdEncodeVideoKHR command to specify the quantization map used + /// by the issued video encode operations. + /// + /// + /// The VkVideoEncodeQuantizationMapInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoEncodeQuantizationMapInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkImageView quantizationMap; + /// VkExtent2D quantizationMapExtent; + /// } VkVideoEncodeQuantizationMapInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeQuantizationMapInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeQuantizationMapInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QuantizationMap specifies the image view to use as the quantization map. + /// + [FieldOffset(16)] + public VkImageView QuantizationMap; + + /// + /// QuantizationMapExtent specifies the extent of the image subregion of quantizationMap to use as the quantization map starting at offset (0,0). + /// + [FieldOffset(24)] + public VkExtent2D QuantizationMapExtent; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..bde7715 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,42 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR - Structure specifying quantization map texel size for video session parameters + /// + /// + /// + /// The VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR + /// structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkExtent2D quantizationMapTexelSize; + /// } VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = + VkStructureType.VideoEncodeQuantizationMapSessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QuantizationMapTexelSize specifies the quantization map texel size^ a video session parameters object created with VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR is compatible with. + /// + [FieldOffset(16)] + public VkExtent2D QuantizationMapTexelSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRGBConversionCapabilitiesVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRGBConversionCapabilitiesVALVE.gen.cs new file mode 100644 index 0000000..330d5e6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRGBConversionCapabilitiesVALVE.gen.cs @@ -0,0 +1,69 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRgbConversionCapabilitiesVALVE - Structure describing video encode rgb conversion capabilities for a video profile + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoCapabilitiesKHR with + /// pVideoProfile->videoCodecOperation specifying an encode operation, the + /// VkVideoEncodeRgbConversionCapabilitiesVALVE structure can be included + /// in the pNext chain of the VkVideoCapabilitiesKHR structure to + /// retrieve capabilities specific to video encode {RGBprime} conversion. + /// + /// + /// The VkVideoEncodeRgbConversionCapabilitiesVALVE structure is defined + /// as: + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef struct VkVideoEncodeRgbConversionCapabilitiesVALVE { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeRgbModelConversionFlagsVALVE rgbModels; + /// VkVideoEncodeRgbRangeCompressionFlagsVALVE rgbRanges; + /// VkVideoEncodeRgbChromaOffsetFlagsVALVE xChromaOffsets; + /// VkVideoEncodeRgbChromaOffsetFlagsVALVE yChromaOffsets; + /// } VkVideoEncodeRgbConversionCapabilitiesVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeRGBConversionCapabilitiesVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeRGBConversionCapabilitiesVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RgbModels is a bitmask of VkVideoEncodeRgbModelConversionFlagsVALVE describing supported model conversions^ for video encode {RGBprime} conversion. + /// + [FieldOffset(16)] + public VkVideoEncodeRGBModelConversionFlagsVALVE RgbModels; + + /// + /// RgbRanges is a bitmask of VkVideoEncodeRgbRangeCompressionFlagsVALVE describing supported range compressions^ for video encode {RGBprime} conversion. + /// + [FieldOffset(20)] + public VkVideoEncodeRGBRangeCompressionFlagsVALVE RgbRanges; + + /// + /// XChromaOffsets is a bitmask of VkVideoEncodeRgbChromaOffsetFlagsVALVE describing supported offsets of the output location of the downsampled chroma component on the X axis for video encode {RGBprime} conversion. + /// + [FieldOffset(24)] + public VkVideoEncodeRGBChromaOffsetFlagsVALVE XChromaOffsets; + + /// + /// YChromaOffsets is a bitmask of VkVideoEncodeRgbChromaOffsetFlagsVALVE describing supported offsets of the output location of the downsampled chroma component on the Y axis for video encode {RGBprime} conversion. + /// + [FieldOffset(28)] + public VkVideoEncodeRGBChromaOffsetFlagsVALVE YChromaOffsets; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlInfoKHR.gen.cs new file mode 100644 index 0000000..c4e194d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlInfoKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRateControlInfoKHR - Structure to set encode stream rate control parameters + /// + /// + /// + /// The VkVideoEncodeRateControlInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeRateControlInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeRateControlFlagsKHR flags; + /// VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode; + /// uint32_t layerCount; + /// const VkVideoEncodeRateControlLayerInfoKHR* pLayers; + /// uint32_t virtualBufferSizeInMs; + /// uint32_t initialVirtualBufferSizeInMs; + /// } VkVideoEncodeRateControlInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoEncodeRateControlInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeRateControlInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkVideoEncodeRateControlFlagsKHR Flags; + + /// + /// RateControlMode is a VkVideoEncodeRateControlModeFlagsKHR value specifying the rate control mode^. + /// + [FieldOffset(20)] + public VkVideoEncodeRateControlModeFlagsKHR RateControlMode; + + /// + /// LayerCount specifies the number of rate control layers^ to use. + /// + [FieldOffset(24)] + public int LayerCount; + + /// + /// Layers is a pointer to an array of layerCount VkVideoEncodeRateControlLayerInfoKHR structures, each specifying the rate control configuration of the corresponding rate control layer. + /// + [FieldOffset(32)] + public VkVideoEncodeRateControlLayerInfoKHR* Layers; + + /// + /// VirtualBufferSizeInMs is the size in milliseconds of the virtual buffer used by the implementation's rate control algorithm for the leaky bucket model^, with respect to the average bitrate of the stream calculated by summing the values of the averageBitrate members of the elements of the pLayers array. + /// + [FieldOffset(40)] + public int VirtualBufferSizeInMs; + + /// + /// InitialVirtualBufferSizeInMs is the initial occupancy in milliseconds of the virtual buffer used by the implementation's rate control algorithm for the leaky bucket model^. + /// + [FieldOffset(44)] + public int InitialVirtualBufferSizeInMs; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlLayerInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlLayerInfoKHR.gen.cs new file mode 100644 index 0000000..7134876 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeRateControlLayerInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeRateControlLayerInfoKHR - Structure to set encode per-layer rate control parameters + /// + /// + /// + /// The VkVideoEncodeRateControlLayerInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeRateControlLayerInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint64_t averageBitrate; + /// uint64_t maxBitrate; + /// uint32_t frameRateNumerator; + /// uint32_t frameRateDenominator; + /// } VkVideoEncodeRateControlLayerInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoEncodeRateControlLayerInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeRateControlLayerInfoKHR; + + /// + /// Next is a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AverageBitrate is the average bitrate^ to be targeted by the implementation's rate control algorithm. + /// + [FieldOffset(16)] + public nint AverageBitrate; + + /// + /// MaxBitrate is the peak bitrate^ to be targeted by the implementation's rate control algorithm. + /// + [FieldOffset(24)] + public nint MaxBitrate; + + /// + /// FrameRateNumerator is the numerator of the frame rate assumed by the implementation's rate control algorithm. + /// + [FieldOffset(32)] + public int FrameRateNumerator; + + /// + /// FrameRateDenominator is the denominator of the frame rate assumed by the implementation's rate control algorithm. + /// + [FieldOffset(36)] + public int FrameRateDenominator; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionIntraRefreshCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionIntraRefreshCreateInfoKHR.gen.cs new file mode 100644 index 0000000..cde386a --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionIntraRefreshCreateInfoKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeSessionIntraRefreshCreateInfoKHR - Video encode session intra refresh parameters + /// + /// + /// + /// The VkVideoEncodeSessionIntraRefreshCreateInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_intra_refresh + /// typedef struct VkVideoEncodeSessionIntraRefreshCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeIntraRefreshModeFlagBitsKHR intraRefreshMode; + /// } VkVideoEncodeSessionIntraRefreshCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeSessionIntraRefreshCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeSessionIntraRefreshCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// IntraRefreshMode is a VkVideoEncodeIntraRefreshModeFlagsKHR specifying the used intra refresh mode^. + /// + [FieldOffset(16)] + public VkVideoEncodeIntraRefreshModeFlagsKHR IntraRefreshMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersFeedbackInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersFeedbackInfoKHR.gen.cs new file mode 100644 index 0000000..9979e0f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersFeedbackInfoKHR.gen.cs @@ -0,0 +1,41 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeSessionParametersFeedbackInfoKHR - Structure providing feedback about the requested video session parameters + /// + /// + /// + /// The VkVideoEncodeSessionParametersFeedbackInfoKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkBool32 hasOverrides; + /// } VkVideoEncodeSessionParametersFeedbackInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeSessionParametersFeedbackInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeSessionParametersFeedbackInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// HasOverrides indicates whether any of the requested parameter data were overridden^ by the implementation. + /// + [FieldOffset(16)] + public Brutal.Bool32 HasOverrides; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersGetInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersGetInfoKHR.gen.cs new file mode 100644 index 0000000..f4ba37b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionParametersGetInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeSessionParametersGetInfoKHR - Structure specifying parameters for retrieving encoded video session parameter data + /// + /// + /// + /// The VkVideoEncodeSessionParametersGetInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeSessionParametersGetInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoSessionParametersKHR videoSessionParameters; + /// } VkVideoEncodeSessionParametersGetInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEncodeSessionParametersGetInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeSessionParametersGetInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoSessionParameters is the VkVideoSessionParametersKHR object to retrieve encoded parameter data from. + /// + [FieldOffset(16)] + public VkVideoSessionParametersKHR VideoSessionParameters; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionRGBConversionCreateInfoVALVE.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionRGBConversionCreateInfoVALVE.gen.cs new file mode 100644 index 0000000..fdc7fdf --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeSessionRGBConversionCreateInfoVALVE.gen.cs @@ -0,0 +1,62 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeSessionRgbConversionCreateInfoVALVE - Structure specifying video encode RGB conversion parameters for a video session + /// + /// + /// + /// The VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure is + /// defined as: + /// + /// + /// // Provided by VK_VALVE_video_encode_rgb_conversion + /// typedef struct VkVideoEncodeSessionRgbConversionCreateInfoVALVE { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeRgbModelConversionFlagBitsVALVE rgbModel; + /// VkVideoEncodeRgbRangeCompressionFlagBitsVALVE rgbRange; + /// VkVideoEncodeRgbChromaOffsetFlagBitsVALVE xChromaOffset; + /// VkVideoEncodeRgbChromaOffsetFlagBitsVALVE yChromaOffset; + /// } VkVideoEncodeSessionRgbConversionCreateInfoVALVE; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeSessionRGBConversionCreateInfoVALVE() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeSessionRGBConversionCreateInfoVALVE; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// RgbModel is the used {RGBprime} model conversion^ for the {RGBprime} conversion. + /// + [FieldOffset(16)] + public VkVideoEncodeRGBModelConversionFlagsVALVE RgbModel; + + /// + /// RgbRange is the used {RGBprime} range compression^ for the {RGBprime} conversion. + /// + [FieldOffset(20)] + public VkVideoEncodeRGBRangeCompressionFlagsVALVE RgbRange; + + /// + /// XChromaOffset describes the output location of downsampled chroma components in the x dimension for the {RGBprime} conversion. + /// + [FieldOffset(24)] + public VkVideoEncodeRGBChromaOffsetFlagsVALVE XChromaOffset; + + /// + /// YChromaOffset describes the output location of downsampled chroma components in the y dimension for the {RGBprime} conversion. + /// + [FieldOffset(28)] + public VkVideoEncodeRGBChromaOffsetFlagsVALVE YChromaOffset; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEncodeUsageInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeUsageInfoKHR.gen.cs new file mode 100644 index 0000000..f563ccd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEncodeUsageInfoKHR.gen.cs @@ -0,0 +1,59 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEncodeUsageInfoKHR - Structure specifying video encode usage information + /// + /// + /// + /// Additional information about the video encode use case can be provided by + /// adding a VkVideoEncodeUsageInfoKHR structure to the pNext chain + /// of VkVideoProfileInfoKHR. + /// + /// + /// The VkVideoEncodeUsageInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_queue + /// typedef struct VkVideoEncodeUsageInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEncodeUsageFlagsKHR videoUsageHints; + /// VkVideoEncodeContentFlagsKHR videoContentHints; + /// VkVideoEncodeTuningModeKHR tuningMode; + /// } VkVideoEncodeUsageInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoEncodeUsageInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEncodeUsageInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoUsageHints is a bitmask of VkVideoEncodeUsageFlagsKHR specifying hints about the intended use of the video encode profile. + /// + [FieldOffset(16)] + public VkVideoEncodeUsageFlagsKHR VideoUsageHints; + + /// + /// VideoContentHints is a bitmask of VkVideoEncodeContentFlagsKHR specifying hints about the content to be encoded using the video encode profile. + /// + [FieldOffset(20)] + public VkVideoEncodeContentFlagsKHR VideoContentHints; + + /// + /// TuningMode is a VkVideoEncodeTuningModeKHR value specifying the tuning mode to use when encoding with the video profile. + /// + [FieldOffset(24)] + public VkVideoEncodeTuningModeKHR TuningMode; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoEndCodingInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoEndCodingInfoKHR.gen.cs new file mode 100644 index 0000000..d3f8a1e --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoEndCodingInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoEndCodingInfoKHR - Structure specifying video coding scope end information + /// + /// + /// + /// The VkVideoEndCodingInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoEndCodingInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoEndCodingFlagsKHR flags; + /// } VkVideoEndCodingInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoEndCodingInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoEndCodingInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkVideoEndCodingFlagsKHR Flags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoFormatAV1QuantizationMapPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoFormatAV1QuantizationMapPropertiesKHR.gen.cs new file mode 100644 index 0000000..046bfe7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoFormatAV1QuantizationMapPropertiesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoFormatAV1QuantizationMapPropertiesKHR - Structure describing AV1 quantization map properties + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoFormatPropertiesKHR, the + /// VkVideoFormatAV1QuantizationMapPropertiesKHR structure can be + /// included in the pNext chain of the VkVideoFormatPropertiesKHR + /// structure to retrieve video format properties specific to video encode + /// quantization maps used with an AV1 encode profile^. + /// + /// + /// The VkVideoFormatAV1QuantizationMapPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_av1 with VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoFormatAV1QuantizationMapPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes; + /// } VkVideoFormatAV1QuantizationMapPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoFormatAV1QuantizationMapPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoFormatAV1QuantizationMapPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CompatibleSuperblockSizes is a bitmask of VkVideoEncodeAV1SuperblockSizeFlagsKHR indicating the AV1 superblock sizes that quantization maps using this video format are compatible with. + [NOTE] + /// + [FieldOffset(16)] + public VkVideoEncodeAV1SuperblockSizeFlagsKHR CompatibleSuperblockSizes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoFormatH265QuantizationMapPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoFormatH265QuantizationMapPropertiesKHR.gen.cs new file mode 100644 index 0000000..d72d8da --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoFormatH265QuantizationMapPropertiesKHR.gen.cs @@ -0,0 +1,48 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoFormatH265QuantizationMapPropertiesKHR - Structure describing H.265 quantization map properties + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoFormatPropertiesKHR, the + /// VkVideoFormatH265QuantizationMapPropertiesKHR structure can be + /// included in the pNext chain of the VkVideoFormatPropertiesKHR + /// structure to retrieve video format properties specific to video encode + /// quantization maps used with an H.265 encode profile^. + /// + /// + /// The VkVideoFormatH265QuantizationMapPropertiesKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_video_encode_h265 with VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoFormatH265QuantizationMapPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkVideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes; + /// } VkVideoFormatH265QuantizationMapPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoFormatH265QuantizationMapPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoFormatH265QuantizationMapPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CompatibleCtbSizes is a bitmask of VkVideoEncodeH265CtbSizeFlagsKHR indicating the CTB sizes that quantization maps using this video format are compatible with. + [NOTE] + /// + [FieldOffset(16)] + public VkVideoEncodeH265CtbSizeFlagsKHR CompatibleCtbSizes; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoFormatPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoFormatPropertiesKHR.gen.cs new file mode 100644 index 0000000..aeb9cef --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoFormatPropertiesKHR.gen.cs @@ -0,0 +1,75 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoFormatPropertiesKHR - Structure enumerating the video image formats + /// + /// + /// + /// The VkVideoFormatPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoFormatPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkFormat format; + /// VkComponentMapping componentMapping; + /// VkImageCreateFlags imageCreateFlags; + /// VkImageType imageType; + /// VkImageTiling imageTiling; + /// VkImageUsageFlags imageUsageFlags; + /// } VkVideoFormatPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 56)] + public unsafe partial struct VkVideoFormatPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoFormatPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Format is a VkFormat that specifies the format that can be used with the specified video profiles and image usages. + /// + [FieldOffset(16)] + public VkFormat Format; + + /// + /// ComponentMapping defines the color channel order used for the format. format along with componentMapping describe how the color channels are ordered when producing video decoder output or are expected to be ordered in video encoder input, when applicable. If the format reported does not require component swizzling then all members of componentMapping will be set to VK_COMPONENT_SWIZZLE_IDENTITY. + /// + [FieldOffset(20)] + public VkComponentMapping ComponentMapping; + + /// + /// ImageCreateFlags is a bitmask of VkImageCreateFlags specifying the supported image creation flags for the format. + /// + [FieldOffset(36)] + public VkImageCreateFlags ImageCreateFlags; + + /// + /// ImageType is a VkImageType that specifies the image type the format can be used with. + /// + [FieldOffset(40)] + public VkImageType ImageType; + + /// + /// ImageTiling is a VkImageTiling that specifies the image tiling the format can be used with. + /// + [FieldOffset(44)] + public VkImageTiling ImageTiling; + + /// + /// ImageUsageFlags is a bitmask of VkImageUsageFlags specifying the supported image usage flags for the format. + /// + [FieldOffset(48)] + public VkImageUsageFlags ImageUsageFlags; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoFormatQuantizationMapPropertiesKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoFormatQuantizationMapPropertiesKHR.gen.cs new file mode 100644 index 0000000..9c9c96d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoFormatQuantizationMapPropertiesKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoFormatQuantizationMapPropertiesKHR - Structure describing quantization map properties + /// + /// + /// + /// When calling vkGetPhysicalDeviceVideoFormatPropertiesKHR, the + /// VkVideoFormatQuantizationMapPropertiesKHR structure can be included + /// in the pNext chain of the VkVideoFormatPropertiesKHR structure + /// to retrieve video format properties specific to video encode quantization + /// maps. + /// + /// + /// The VkVideoFormatQuantizationMapPropertiesKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_quantization_map + /// typedef struct VkVideoFormatQuantizationMapPropertiesKHR { + /// VkStructureType sType; + /// void* pNext; + /// VkExtent2D quantizationMapTexelSize; + /// } VkVideoFormatQuantizationMapPropertiesKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoFormatQuantizationMapPropertiesKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoFormatQuantizationMapPropertiesKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QuantizationMapTexelSize indicates the quantization map texel size^ of the video format, i.e. the number of pixels corresponding to each quantization map texel. + /// + [FieldOffset(16)] + public VkExtent2D QuantizationMapTexelSize; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoInlineQueryInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoInlineQueryInfoKHR.gen.cs new file mode 100644 index 0000000..5f920fe --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoInlineQueryInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoInlineQueryInfoKHR - Structure specifying inline query information for video coding commands + /// + /// + /// + /// The VkVideoInlineQueryInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_maintenance1 + /// typedef struct VkVideoInlineQueryInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkQueryPool queryPool; + /// uint32_t firstQuery; + /// uint32_t queryCount; + /// } VkVideoInlineQueryInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoInlineQueryInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoInlineQueryInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueryPool is VK_NULL_HANDLE or a valid handle to a VkQueryPool object that will manage the results of the queries. + /// + [FieldOffset(16)] + public VkQueryPool QueryPool; + + /// + /// FirstQuery is the query index within the query pool that will contain the query results for the first video coding operation. The query results of subsequent video coding operations will be contained by subsequent query indices. + /// + [FieldOffset(24)] + public int FirstQuery; + + /// + /// QueryCount is the number of queries to execute. + [NOTE] + /// + [FieldOffset(28)] + public int QueryCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoPictureResourceInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoPictureResourceInfoKHR.gen.cs new file mode 100644 index 0000000..455fef2 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoPictureResourceInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoPictureResourceInfoKHR - Structure specifying the parameters of a video picture resource + /// + /// + /// + /// The VkVideoPictureResourceInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoPictureResourceInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkOffset2D codedOffset; + /// VkExtent2D codedExtent; + /// uint32_t baseArrayLayer; + /// VkImageView imageViewBinding; + /// } VkVideoPictureResourceInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoPictureResourceInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoPictureResourceInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// CodedOffset is the offset in texels of the image subregion to use. + /// + [FieldOffset(16)] + public VkOffset2D CodedOffset; + + /// + /// CodedExtent is the size in pixels of the coded image data. + /// + [FieldOffset(24)] + public VkExtent2D CodedExtent; + + /// + /// BaseArrayLayer is the array layer of the image view specified in imageViewBinding to use as the video picture resource. + /// + [FieldOffset(32)] + public int BaseArrayLayer; + + /// + /// ImageViewBinding is an image view representing the video picture resource. + /// + [FieldOffset(40)] + public VkImageView ImageViewBinding; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoProfileInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoProfileInfoKHR.gen.cs new file mode 100644 index 0000000..137b94d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoProfileInfoKHR.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoProfileInfoKHR - Structure specifying a video profile + /// + /// + /// + /// The VkVideoProfileInfoKHR structure is defined as follows: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoProfileInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoCodecOperationFlagBitsKHR videoCodecOperation; + /// VkVideoChromaSubsamplingFlagsKHR chromaSubsampling; + /// VkVideoComponentBitDepthFlagsKHR lumaBitDepth; + /// VkVideoComponentBitDepthFlagsKHR chromaBitDepth; + /// } VkVideoProfileInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoProfileInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoProfileInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// VideoCodecOperation is a VkVideoCodecOperationFlagsKHR value specifying a video codec operation. + /// + [FieldOffset(16)] + public VkVideoCodecOperationFlagsKHR VideoCodecOperation; + + /// + /// ChromaSubsampling is a bitmask of VkVideoChromaSubsamplingFlagsKHR specifying video chroma subsampling information. + /// + [FieldOffset(20)] + public VkVideoChromaSubsamplingFlagsKHR ChromaSubsampling; + + /// + /// LumaBitDepth is a bitmask of VkVideoComponentBitDepthFlagsKHR specifying video luma bit depth information. + /// + [FieldOffset(24)] + public VkVideoComponentBitDepthFlagsKHR LumaBitDepth; + + /// + /// ChromaBitDepth is a bitmask of VkVideoComponentBitDepthFlagsKHR specifying video chroma bit depth information. + /// + [FieldOffset(28)] + public VkVideoComponentBitDepthFlagsKHR ChromaBitDepth; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoProfileListInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoProfileListInfoKHR.gen.cs new file mode 100644 index 0000000..e08a78f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoProfileListInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoProfileListInfoKHR - Structure specifying one or more video profiles used in conjunction + /// + /// + /// + /// The VkVideoProfileListInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoProfileListInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t profileCount; + /// const VkVideoProfileInfoKHR* pProfiles; + /// } VkVideoProfileListInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoProfileListInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoProfileListInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// ProfileCount is the number of elements in the pProfiles array. + /// + [FieldOffset(16)] + public int ProfileCount; + + /// + /// Profiles is a pointer to an array of VkVideoProfileInfoKHR structures. + /// + [FieldOffset(24)] + public VkVideoProfileInfoKHR* Profiles; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoReferenceIntraRefreshInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoReferenceIntraRefreshInfoKHR.gen.cs new file mode 100644 index 0000000..157fd6f --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoReferenceIntraRefreshInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoReferenceIntraRefreshInfoKHR - Structure specifying video reference picture intra refresh parameters + /// + /// + /// + /// The VkVideoReferenceIntraRefreshInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_encode_intra_refresh + /// typedef struct VkVideoReferenceIntraRefreshInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t dirtyIntraRefreshRegions; + /// } VkVideoReferenceIntraRefreshInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoReferenceIntraRefreshInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoReferenceIntraRefreshInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DirtyIntraRefreshRegions is the number of dirty intra refresh regions^ in the reference picture. + /// + [FieldOffset(16)] + public int DirtyIntraRefreshRegions; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoReferenceSlotInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoReferenceSlotInfoKHR.gen.cs new file mode 100644 index 0000000..d82c285 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoReferenceSlotInfoKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoReferenceSlotInfoKHR - Structure specifying information about a reference picture slot + /// + /// + /// + /// The VkVideoReferenceSlotInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoReferenceSlotInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// int32_t slotIndex; + /// const VkVideoPictureResourceInfoKHR* pPictureResource; + /// } VkVideoReferenceSlotInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkVideoReferenceSlotInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoReferenceSlotInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// SlotIndex is the index of the DPB slot^ or a negative integer value. + /// + [FieldOffset(16)] + public int SlotIndex; + + /// + /// PictureResource is `NULL` or a pointer to a VkVideoPictureResourceInfoKHR structure describing the video picture resource^ associated with the DPB slot index specified by slotIndex. + /// + [FieldOffset(24)] + public VkVideoPictureResourceInfoKHR* PictureResource; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoSessionCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoSessionCreateInfoKHR.gen.cs new file mode 100644 index 0000000..9cfb9f5 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoSessionCreateInfoKHR.gen.cs @@ -0,0 +1,96 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionCreateInfoKHR - Structure specifying parameters of a newly created video session + /// + /// + /// + /// The VkVideoSessionCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoSessionCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t queueFamilyIndex; + /// VkVideoSessionCreateFlagsKHR flags; + /// const VkVideoProfileInfoKHR* pVideoProfile; + /// VkFormat pictureFormat; + /// VkExtent2D maxCodedExtent; + /// VkFormat referencePictureFormat; + /// uint32_t maxDpbSlots; + /// uint32_t maxActiveReferencePictures; + /// const VkExtensionProperties* pStdHeaderVersion; + /// } VkVideoSessionCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkVideoSessionCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoSessionCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// QueueFamilyIndex is the index of the queue family the created video session will be used with. + /// + [FieldOffset(16)] + public int QueueFamilyIndex; + + /// + /// Flags is a bitmask of VkVideoSessionCreateFlagsKHR specifying creation flags. + /// + [FieldOffset(20)] + public VkVideoSessionCreateFlagsKHR Flags; + + /// + /// VideoProfile is a pointer to a VkVideoProfileInfoKHR structure specifying the video profile the created video session will be used with. + /// + [FieldOffset(24)] + public VkVideoProfileInfoKHR* VideoProfile; + + /// + /// PictureFormat is the image format the created video session will be used with. + /// + [FieldOffset(32)] + public VkFormat PictureFormat; + + /// + /// MaxCodedExtent is the maximum width and height of the coded frames the created video session will be used with. + /// + [FieldOffset(36)] + public VkExtent2D MaxCodedExtent; + + /// + /// ReferencePictureFormat is the image format of reference pictures^ stored in the DPB^ the created video session will be used with. + /// + [FieldOffset(44)] + public VkFormat ReferencePictureFormat; + + /// + /// MaxDpbSlots is the maximum number of DPB Slots^ that can be used with the created video session. + /// + [FieldOffset(48)] + public int MaxDpbSlots; + + /// + /// MaxActiveReferencePictures is the maximum number of active reference pictures^ that can be used in a single video coding operation using the created video session. + /// + [FieldOffset(52)] + public int MaxActiveReferencePictures; + + /// + /// StdHeaderVersion is a pointer to a VkExtensionProperties structure requesting the Video Std header version to use for the videoCodecOperation specified in pVideoProfile. + /// + [FieldOffset(56)] + public VkExtensionProperties* StdHeaderVersion; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoSessionMemoryRequirementsKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoSessionMemoryRequirementsKHR.gen.cs new file mode 100644 index 0000000..54b5aba --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoSessionMemoryRequirementsKHR.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionMemoryRequirementsKHR - Structure describing video session memory requirements + /// + /// + /// + /// The VkVideoSessionMemoryRequirementsKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoSessionMemoryRequirementsKHR { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t memoryBindIndex; + /// VkMemoryRequirements memoryRequirements; + /// } VkVideoSessionMemoryRequirementsKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 48)] + public unsafe partial struct VkVideoSessionMemoryRequirementsKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoSessionMemoryRequirementsKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// MemoryBindIndex is the index of the memory binding. + /// + [FieldOffset(16)] + public int MemoryBindIndex; + + /// + /// MemoryRequirements is a VkMemoryRequirements structure in which the requested memory binding requirements for the binding index specified by memoryBindIndex are returned. + /// + [FieldOffset(24)] + public VkMemoryRequirements MemoryRequirements; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersCreateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersCreateInfoKHR.gen.cs new file mode 100644 index 0000000..733501c --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersCreateInfoKHR.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionParametersCreateInfoKHR - Structure specifying parameters of a newly created video session parameters object + /// + /// + /// + /// The VkVideoSessionParametersCreateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoSessionParametersCreateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// VkVideoSessionParametersCreateFlagsKHR flags; + /// VkVideoSessionParametersKHR videoSessionParametersTemplate; + /// VkVideoSessionKHR videoSession; + /// } VkVideoSessionParametersCreateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 40)] + public unsafe partial struct VkVideoSessionParametersCreateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoSessionParametersCreateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Flags is reserved for future use. + /// + [FieldOffset(16)] + public VkVideoSessionParametersCreateFlagsKHR Flags; + + /// + /// VideoSessionParametersTemplate is VK_NULL_HANDLE or a valid handle to a VkVideoSessionParametersKHR object used as a template for constructing the new video session parameters object. + /// + [FieldOffset(24)] + public VkVideoSessionParametersKHR VideoSessionParametersTemplate; + + /// + /// VideoSession is the video session object against which the video session parameters object is going to be created. + /// + [FieldOffset(32)] + public VkVideoSessionKHR VideoSession; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersUpdateInfoKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersUpdateInfoKHR.gen.cs new file mode 100644 index 0000000..c779373 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkVideoSessionParametersUpdateInfoKHR.gen.cs @@ -0,0 +1,40 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkVideoSessionParametersUpdateInfoKHR - Structure specifying video session parameters update information + /// + /// + /// + /// The VkVideoSessionParametersUpdateInfoKHR structure is defined as: + /// + /// + /// // Provided by VK_KHR_video_queue + /// typedef struct VkVideoSessionParametersUpdateInfoKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t updateSequenceCount; + /// } VkVideoSessionParametersUpdateInfoKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public unsafe partial struct VkVideoSessionParametersUpdateInfoKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.VideoSessionParametersUpdateInfoKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// UpdateSequenceCount is the new update sequence count^ to set for the video session parameters object. + /// + [FieldOffset(16)] + public int UpdateSequenceCount; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkViewport.gen.cs b/Brutal.Vulkan/Generated/Structs/VkViewport.gen.cs new file mode 100644 index 0000000..efa203d --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkViewport.gen.cs @@ -0,0 +1,61 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkViewport - Structure specifying a viewport + /// + /// + /// + /// The VkViewport structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkViewport { + /// float x; + /// float y; + /// float width; + /// float height; + /// float minDepth; + /// float maxDepth; + /// } VkViewport; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 24)] + public partial struct VkViewport() + { + /// + /// X and y are the viewport's upper left corner (x,y). + /// + [FieldOffset(0)] + public float X; + + /// + /// Y + /// + [FieldOffset(4)] + public float Y; + + /// + /// Width and height are the viewport's width and height, respectively. + /// + [FieldOffset(8)] + public float Width; + + /// + /// Height + /// + [FieldOffset(12)] + public float Height; + + /// + /// MinDepth and maxDepth are the depth range for the viewport. + /// + [FieldOffset(16)] + public float MinDepth; + + /// + /// MaxDepth + /// + [FieldOffset(20)] + public float MaxDepth; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkViewportSwizzleNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkViewportSwizzleNV.gen.cs new file mode 100644 index 0000000..f59a59b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkViewportSwizzleNV.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkViewportSwizzleNV - Structure specifying a viewport swizzle + /// + /// + /// + /// The VkViewportSwizzleNV structure is defined as: + /// + /// + /// // Provided by VK_NV_viewport_swizzle + /// typedef struct VkViewportSwizzleNV { + /// VkViewportCoordinateSwizzleNV x; + /// VkViewportCoordinateSwizzleNV y; + /// VkViewportCoordinateSwizzleNV z; + /// VkViewportCoordinateSwizzleNV w; + /// } VkViewportSwizzleNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 16)] + public partial struct VkViewportSwizzleNV() + { + /// + /// X is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the x component of the primitive + /// + [FieldOffset(0)] + public VkViewportCoordinateSwizzleNV X; + + /// + /// Y is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the y component of the primitive + /// + [FieldOffset(4)] + public VkViewportCoordinateSwizzleNV Y; + + /// + /// Z is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the z component of the primitive + /// + [FieldOffset(8)] + public VkViewportCoordinateSwizzleNV Z; + + /// + /// W is a VkViewportCoordinateSwizzleNV value specifying the swizzle operation to apply to the w component of the primitive + /// + [FieldOffset(12)] + public VkViewportCoordinateSwizzleNV W; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkViewportWScalingNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkViewportWScalingNV.gen.cs new file mode 100644 index 0000000..c71d753 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkViewportWScalingNV.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkViewportWScalingNV - Structure specifying a viewport + /// + /// + /// + /// The VkViewportWScalingNV structure is defined as: + /// + /// + /// // Provided by VK_NV_clip_space_w_scaling + /// typedef struct VkViewportWScalingNV { + /// float xcoeff; + /// float ycoeff; + /// } VkViewportWScalingNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkViewportWScalingNV() + { + /// + /// Xcoeff and ycoeff are the viewport's W scaling factor for x and y respectively. + /// + [FieldOffset(0)] + public float Xcoeff; + + /// + /// Ycoeff + /// + [FieldOffset(4)] + public float Ycoeff; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSet.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSet.gen.cs new file mode 100644 index 0000000..346cadd --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSet.gen.cs @@ -0,0 +1,89 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteDescriptorSet - Structure specifying the parameters of a descriptor set write operation + /// + /// + /// + /// The VkWriteDescriptorSet structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_0 + /// typedef struct VkWriteDescriptorSet { + /// VkStructureType sType; + /// const void* pNext; + /// VkDescriptorSet dstSet; + /// uint32_t dstBinding; + /// uint32_t dstArrayElement; + /// uint32_t descriptorCount; + /// VkDescriptorType descriptorType; + /// const VkDescriptorImageInfo* pImageInfo; + /// const VkDescriptorBufferInfo* pBufferInfo; + /// const VkBufferView* pTexelBufferView; + /// } VkWriteDescriptorSet; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 64)] + public unsafe partial struct VkWriteDescriptorSet() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteDescriptorSet; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DstSet is the destination descriptor set to update. + /// + [FieldOffset(16)] + public VkDescriptorSet DstSet; + + /// + /// DstBinding is the descriptor binding within that set. + /// + [FieldOffset(24)] + public int DstBinding; + + /// + /// DstArrayElement is the starting element in that array. + /// + [FieldOffset(28)] + public int DstArrayElement; + + /// + /// DescriptorCount is the number of descriptors to update. descriptorCount is one of + /// + [FieldOffset(32)] + public int DescriptorCount; + + /// + /// DescriptorType is a VkDescriptorType specifying the type of each descriptor in pImageInfo, pBufferInfo, or pTexelBufferView, as described below. It must be the same type as the descriptorType specified in VkDescriptorSetLayoutBinding for dstSet at dstBinding. The type of the descriptor also controls which array the descriptors are taken from. + /// + [FieldOffset(36)] + public VkDescriptorType DescriptorType; + + /// + /// ImageInfo is a pointer to an array of VkDescriptorImageInfo structures or is ignored, as described below. + /// + [FieldOffset(40)] + public VkDescriptorImageInfo* ImageInfo; + + /// + /// BufferInfo is a pointer to an array of VkDescriptorBufferInfo structures or is ignored, as described below. + /// + [FieldOffset(48)] + public VkDescriptorBufferInfo* BufferInfo; + + /// + /// TexelBufferView is a pointer to an array of VkBufferView handles as described in the Buffer Views^ section or is ignored, as described below. + /// + [FieldOffset(56)] + public VkBufferView* TexelBufferView; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureKHR.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureKHR.gen.cs new file mode 100644 index 0000000..af5c81b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureKHR.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteDescriptorSetAccelerationStructureKHR - Structure specifying acceleration structure descriptor information + /// + /// + /// + /// :refpage: VkWriteDescriptorSetAccelerationStructureKHR + /// + /// + /// The VkWriteDescriptorSetAccelerationStructureKHR structure is defined + /// as: + /// + /// + /// // Provided by VK_KHR_acceleration_structure + /// typedef struct VkWriteDescriptorSetAccelerationStructureKHR { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t accelerationStructureCount; + /// const VkAccelerationStructureKHR* pAccelerationStructures; + /// } VkWriteDescriptorSetAccelerationStructureKHR; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteDescriptorSetAccelerationStructureKHR() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteDescriptorSetAccelerationStructureKHR; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructureCount is the number of elements in pAccelerationStructures. + /// + [FieldOffset(16)] + public int AccelerationStructureCount; + + /// + /// AccelerationStructures is a pointer to an array of VkAccelerationStructureKHR structures specifying the acceleration structures to update. + /// + [FieldOffset(24)] + public VkAccelerationStructureKHR* AccelerationStructures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureNV.gen.cs new file mode 100644 index 0000000..7183dd6 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetAccelerationStructureNV.gen.cs @@ -0,0 +1,51 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteDescriptorSetAccelerationStructureNV - Structure specifying acceleration structure descriptor information + /// + /// + /// + /// :refpage: VkWriteDescriptorSetAccelerationStructureNV + /// + /// + /// The VkWriteDescriptorSetAccelerationStructureNV structure is defined + /// as: + /// + /// + /// // Provided by VK_NV_ray_tracing + /// typedef struct VkWriteDescriptorSetAccelerationStructureNV { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t accelerationStructureCount; + /// const VkAccelerationStructureNV* pAccelerationStructures; + /// } VkWriteDescriptorSetAccelerationStructureNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteDescriptorSetAccelerationStructureNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteDescriptorSetAccelerationStructureNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructureCount is the number of elements in pAccelerationStructures. + /// + [FieldOffset(16)] + public int AccelerationStructureCount; + + /// + /// AccelerationStructures is a pointer to an array of VkAccelerationStructureNV structures specifying the acceleration structures to update. + /// + [FieldOffset(24)] + public VkAccelerationStructureNV* AccelerationStructures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetInlineUniformBlock.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetInlineUniformBlock.gen.cs new file mode 100644 index 0000000..76f4ba1 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetInlineUniformBlock.gen.cs @@ -0,0 +1,54 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteDescriptorSetInlineUniformBlock - Structure specifying inline uniform block data + /// + /// + /// + /// If the descriptorType member of VkWriteDescriptorSet is + /// VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK then the data to write to the + /// descriptor set is specified through a + /// VkWriteDescriptorSetInlineUniformBlock structure included in the + /// pNext chain of VkWriteDescriptorSet. + /// + /// + /// The VkWriteDescriptorSetInlineUniformBlock structure is defined as: + /// + /// + /// // Provided by VK_VERSION_1_3 + /// typedef struct VkWriteDescriptorSetInlineUniformBlock { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t dataSize; + /// const void* pData; + /// } VkWriteDescriptorSetInlineUniformBlock; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteDescriptorSetInlineUniformBlock() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteDescriptorSetInlineUniformBlock; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// DataSize is the number of bytes of inline uniform block data pointed to by pData. + /// + [FieldOffset(16)] + public int DataSize; + + /// + /// Data is a pointer to dataSize number of bytes of data to write to the inline uniform block. + /// + [FieldOffset(24)] + public void* Data; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetPartitionedAccelerationStructureNV.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetPartitionedAccelerationStructureNV.gen.cs new file mode 100644 index 0000000..221e7e7 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetPartitionedAccelerationStructureNV.gen.cs @@ -0,0 +1,58 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteDescriptorSetPartitionedAccelerationStructureNV - Structure specifying descriptor for PTLAS + /// + /// + /// + /// :refpage: VkWriteDescriptorSetPartitionedAccelerationStructureNV + /// + /// + /// If the descriptorType member of VkWriteDescriptorSet is + /// VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV, then the + /// data to write to the descriptor set is specified through a + /// VkWriteDescriptorSetPartitionedAccelerationStructureNV structure + /// included in the pNext chain of VkWriteDescriptorSet. + /// + /// + /// The VkWriteDescriptorSetPartitionedAccelerationStructureNV structure + /// is defined as: + /// + /// + /// // Provided by VK_NV_partitioned_acceleration_structure + /// typedef struct VkWriteDescriptorSetPartitionedAccelerationStructureNV { + /// VkStructureType sType; + /// void* pNext; + /// uint32_t accelerationStructureCount; + /// const VkDeviceAddress* pAccelerationStructures; + /// } VkWriteDescriptorSetPartitionedAccelerationStructureNV; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteDescriptorSetPartitionedAccelerationStructureNV() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteDescriptorSetPartitionedAccelerationStructureNV; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// AccelerationStructureCount is the number of elements in pAccelerationStructures. + /// + [FieldOffset(16)] + public int AccelerationStructureCount; + + /// + /// AccelerationStructures is a pointer to an array of accelerationStructureCount device addresses pointing to previously built PTLAS. + /// + [FieldOffset(24)] + public VkDeviceAddress* AccelerationStructures; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetTensorARM.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetTensorARM.gen.cs new file mode 100644 index 0000000..172ab01 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteDescriptorSetTensorARM.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteDescriptorSetTensorARM - Structure specifying descriptor tensor info + /// + /// + /// + /// The VkWriteDescriptorSetTensorARM structure is defined as: + /// + /// + /// // Provided by VK_ARM_tensors + /// typedef struct VkWriteDescriptorSetTensorARM { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t tensorViewCount; + /// const VkTensorViewARM* pTensorViews; + /// } VkWriteDescriptorSetTensorARM; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteDescriptorSetTensorARM() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteDescriptorSetTensorARM; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// TensorViewCount is the number of elements in pTensorViews. + /// + [FieldOffset(16)] + public int TensorViewCount; + + /// + /// TensorViews are the tensor views that will be used to update the descriptor set. + /// + [FieldOffset(24)] + public VkTensorViewARM* TensorViews; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetPipelineEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetPipelineEXT.gen.cs new file mode 100644 index 0000000..35a96df --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetPipelineEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteIndirectExecutionSetPipelineEXT - Struct specifying pipeline update information for an indirect execution set + /// + /// + /// + /// The VkWriteIndirectExecutionSetPipelineEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands + /// typedef struct VkWriteIndirectExecutionSetPipelineEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t index; + /// VkPipeline pipeline; + /// } VkWriteIndirectExecutionSetPipelineEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteIndirectExecutionSetPipelineEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteIndirectExecutionSetPipelineEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Index is the element of the set to update + /// + [FieldOffset(16)] + public int Index; + + /// + /// Pipeline is the pipeline to store in the indirect execution set + /// + [FieldOffset(24)] + public VkPipeline Pipeline; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetShaderEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetShaderEXT.gen.cs new file mode 100644 index 0000000..91bd821 --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkWriteIndirectExecutionSetShaderEXT.gen.cs @@ -0,0 +1,47 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkWriteIndirectExecutionSetShaderEXT - Struct specifying shader object update information for an indirect execution set + /// + /// + /// + /// The VkWriteIndirectExecutionSetShaderEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_device_generated_commands with VK_EXT_shader_object + /// typedef struct VkWriteIndirectExecutionSetShaderEXT { + /// VkStructureType sType; + /// const void* pNext; + /// uint32_t index; + /// VkShaderEXT shader; + /// } VkWriteIndirectExecutionSetShaderEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe partial struct VkWriteIndirectExecutionSetShaderEXT() + { + /// + /// sType is a VkStructureType value identifying this structure. + /// + [FieldOffset(0)] + internal readonly VkStructureType sType = VkStructureType.WriteIndirectExecutionSetShaderEXT; + + /// + /// Next is `NULL` or a pointer to a structure extending this structure. + /// + [FieldOffset(8)] + public void* Next; + + /// + /// Index is the element of the set to update + /// + [FieldOffset(16)] + public int Index; + + /// + /// Shader is the shader to store in the indirect execution set + /// + [FieldOffset(24)] + public VkShaderEXT Shader; + } +} diff --git a/Brutal.Vulkan/Generated/Structs/VkXYColorEXT.gen.cs b/Brutal.Vulkan/Generated/Structs/VkXYColorEXT.gen.cs new file mode 100644 index 0000000..156634b --- /dev/null +++ b/Brutal.Vulkan/Generated/Structs/VkXYColorEXT.gen.cs @@ -0,0 +1,33 @@ +namespace Brutal.VulkanApi +{ + /// + /// VkXYColorEXT - Specify X,Y chromaticity coordinates + /// + /// + /// + /// The VkXYColorEXT structure is defined as: + /// + /// + /// // Provided by VK_EXT_hdr_metadata + /// typedef struct VkXYColorEXT { + /// float x; + /// float y; + /// } VkXYColorEXT; + /// + /// + [StructLayout(LayoutKind.Explicit, Size = 8)] + public partial struct VkXYColorEXT() + { + /// + /// X is the x chromaticity coordinate. + /// + [FieldOffset(0)] + public float X; + + /// + /// Y is the y chromaticity coordinate. + /// + [FieldOffset(4)] + public float Y; + } +} diff --git a/Brutal.Vulkan/GlobalUsings.cs b/Brutal.Vulkan/GlobalUsings.cs new file mode 100644 index 0000000..853766e --- /dev/null +++ b/Brutal.Vulkan/GlobalUsings.cs @@ -0,0 +1,9 @@ +global using System.Runtime.CompilerServices; +global using System.Runtime.InteropServices; +global using Brutal.Logging; +global using Brutal.Memory; +global using Brutal.Numerics; +global using Brutal.Pointers; +global using Brutal.Pointers.Extensions; +global using Brutal.Strings; +global using CommunityToolkit.HighPerformance.Buffers; diff --git a/Brutal.Vulkan/ImportResolver.cs b/Brutal.Vulkan/ImportResolver.cs new file mode 100644 index 0000000..098163b --- /dev/null +++ b/Brutal.Vulkan/ImportResolver.cs @@ -0,0 +1,50 @@ +namespace Brutal.VulkanApi; + +public partial class Vulkan +{ + // The dll name we expect LibraryImport functions calling Vulkan to use + private const string PInvokeDllName = "vulkan"; + + // Cached reference to the loaded Vulkan dll + private static readonly nint Dll; + + /// + /// The function pointer to vkGetInstanceProcAddr, loaded from the Vulkan library. + /// + public static VkGetInstanceProcAddr GetInstanceProcAddr { get; } + + static Vulkan() + { + // Load the correct Vulkan library for the platform + + if (OperatingSystem.IsWindows()) + Dll = NativeLibrary.Load("vulkan-1", typeof(Vulkan).Assembly, DllImportSearchPath.System32); + + // TODO: This is a hack which only works if SDK is installed, we need to package the Vulkan binary on macOS + if (OperatingSystem.IsMacOS()) + Dll = NativeLibrary.Load("VulkanEx", typeof(Vulkan).Assembly, DllImportSearchPath.LegacyBehavior); + + if (OperatingSystem.IsLinux()) + Dll = NativeLibrary.Load("vulkan", typeof(Vulkan).Assembly, DllImportSearchPath.LegacyBehavior); + + if (Dll == nint.Zero) + throw new NullReferenceException("Failed to load Vulkan library"); + + // Assign the native library to the assembly resolver + NativeLibrary.SetDllImportResolver( + typeof(Vulkan).Assembly, + (libraryName, _, _) => libraryName == PInvokeDllName ? Dll : nint.Zero + ); + + // Load the vkGetInstanceProcAddr function + unsafe + { + GetInstanceProcAddr = new VkGetInstanceProcAddr( + (delegate* unmanaged[Cdecl]) + NativeLibrary.GetExport(Dll, "vkGetInstanceProcAddr") + ); + if (GetInstanceProcAddr.Invoke == null) + throw new NullReferenceException("Failed to load vkGetInstanceProcAddr from Vulkan library"); + } + } +} diff --git a/Brutal.Vulkan/LICENSES/BRUTAL-VULKAN-THIRD-PARTY-NOTICES.txt b/Brutal.Vulkan/LICENSES/BRUTAL-VULKAN-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..617d965 --- /dev/null +++ b/Brutal.Vulkan/LICENSES/BRUTAL-VULKAN-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,592 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.Vulkan + +Brutal.Vulkan contains two kinds of Khronos material, each reproduced below with the +license that governs it. The managed bindings are generated from the Vulkan API registry. +The descriptive text in their documentation comments is taken from the specification +reference pages, and reaches this package as the XML documentation file beside the +assembly. + +The native libraries in this package -- VulkanEx.dll, libVulkanEx.so, libVulkanEx.dylib -- +are not third-party. They call the platform's Vulkan loader, which is supplied by the +system and is not redistributed here. + +============================================================ +Vulkan-Headers registry and API headers +Apache-2.0 -- https://github.com/KhronosGroup/Vulkan-Headers +============================================================ + + Name The Khronos Vulkan API registry and C headers + Version upstream v1.4.335 + Copyright Copyright 2015-2025 The Khronos Group Inc. + Upstream https://github.com/KhronosGroup/Vulkan-Headers + SPDX Apache-2.0 + Shipped as no native library. The managed bindings in this package are generated from + the registry XML and the C headers named above + + Upstream offers this material as "Apache-2.0 OR MIT". RocketWerkz takes it under the + Apache License 2.0, reproduced below. The MIT alternative is not taken and its text is + not reproduced here. Upstream states of the choice: + + Note: With the exception of `parse_dependency.py` the files using `MIT` license + also fall under `Apache-2.0`. + + That file is not read by this package. + + The copyright line above is the registry's own. + + Upstream ships no NOTICE file with this material. The bindings this license is carried for + are generated from the registry XML and the C headers named above -- new files produced + from that material, rather than copies of upstream's own files carried forward with + changes. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +============================================================ +Vulkan-Docs reference pages +CC-BY-4.0 -- https://github.com/KhronosGroup/Vulkan-Docs +============================================================ + + Name The Khronos Vulkan API specification reference pages + Version upstream v1.4.335 + Copyright Copyright 2014-2025 The Khronos Group Inc. + Upstream https://github.com/KhronosGroup/Vulkan-Docs + SPDX CC-BY-4.0 + Shipped as no native library. Descriptive text from the reference pages appears in the + XML documentation file packaged beside the assembly + + The text is adapted rather than carried across verbatim. The AsciiDoc markup of the + reference pages is converted to XML documentation markup -- links, cross-references, code + spans and emphasis -- link targets and their labels are rewritten, and the prose is + re-paragraphed to sit inside a documentation comment. + + The copyright line above is the one upstream stamps onto every reference page it + generates. The specification sources those pages are built from carry further copyright + notices, naming parties other than Khronos. Upstream states them as separate lines at the + repository named above. They are not combined here into a single line upstream does not + state. + +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/Brutal.Vulkan/Manual/Classes/CommandBuffer.cs b/Brutal.Vulkan/Manual/Classes/CommandBuffer.cs new file mode 100644 index 0000000..51617c7 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/CommandBuffer.cs @@ -0,0 +1,25 @@ +namespace Brutal.VulkanApi; + +/// +/// Class that wraps a Command Buffer handle. +/// +public struct CommandBuffer : VulkanHandleWrapper +{ + private readonly Ptr _pInvoke; + + public CommandBuffer(Device device, VkCommandBuffer handle) + { + _pInvoke = device._pInvoke; + Handle = handle; + } + + public VkCommandBuffer Handle { get; init; } + public ref VkDevice.FunctionTable PInvoke => ref _pInvoke.Value; + + public bool IsNull() => Handle.IsNull(); + + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkCommandBuffer(CommandBuffer commandBuffer) => commandBuffer.Handle; +} diff --git a/Brutal.Vulkan/Manual/Classes/Device.cs b/Brutal.Vulkan/Manual/Classes/Device.cs new file mode 100644 index 0000000..ccf3286 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/Device.cs @@ -0,0 +1,138 @@ +namespace Brutal.VulkanApi; + +/// +/// Class that wraps a Vulkan Device handle. +/// +public class Device : VulkanHandleWrapper, IDisposable +{ + public ref struct CreateInfo() + { + public HashSet Extensions = []; + public Ptr Features = null; + public ReadOnlySpan QueueCreateInfos = []; + public Ptr Next = null; + public VkAllocator? Allocator = null; + } + + /// + /// The physical device that this device was created from. + /// + public PhysicalDevice PhysicalDevice { get; } + + // Caches a unique queue object for each queue family/index combination. + private readonly Dictionary<(int, int), Queue> _queues = new(); + + /// + /// The set of enabled extensions for this device + /// + public readonly HashSet EnabledExtensions; + + protected VkAllocator? _vkAllocator; + + internal unsafe Device(PhysicalDevice physicalDevice, CreateInfo createInfo) + { + _vkAllocator = createInfo.Allocator; + EnabledExtensions = createInfo.Extensions; + + // Calculate total byte count and individual lengths for each extension + Span lengths = stackalloc int[createInfo.Extensions.Count]; + var totalByteCount = 0; + + var i = 0; + foreach (var extension in createInfo.Extensions) + { + lengths[i] = Utf8.GetByteCount(extension) + 1; // +1 for null terminator + totalByteCount += lengths[i]; + i++; + } + + // Allocate memory for all extension strings and their pointers + Span allExtensionBytes = stackalloc byte[totalByteCount]; + var extensionPtrs = stackalloc byte*[createInfo.Extensions.Count]; + var writePtr = allExtensionBytes; + + // Fill the pointers and copy the strings into the allocated memory + i = 0; + foreach (var ext in createInfo.Extensions) + { + if (!Utf8.TryGetBytes(ext, writePtr, out var bytes)) + throw new Exception("Failed to encode extension name to UTF-8"); + + extensionPtrs[i] = writePtr.AsPointer(); + writePtr[bytes] = 0; // Null-terminate the string + writePtr = writePtr[(bytes + 1)..]; + i++; + } + + var vkCreateInfo = new VkDeviceCreateInfo + { + EnabledExtensionCount = createInfo.Extensions.Count, + QueueCreateInfoCount = createInfo.QueueCreateInfos.Length, + EnabledFeatures = createInfo.Features, + Next = createInfo.Next, + ppEnabledExtensionNames = extensionPtrs, + }; + + fixed (VkDeviceQueueCreateInfo* queueCreateInfosPtr = createInfo.QueueCreateInfos) + { + vkCreateInfo.QueueCreateInfos = queueCreateInfosPtr; + Handle = physicalDevice.CreateDeviceInternal(vkCreateInfo, _vkAllocator); + } + + PhysicalDevice = physicalDevice; + + var getDeviceProcAddr = physicalDevice.Instance.GetProcAddr("vkGetDeviceProcAddr"u8); + _pInvoke = Mem.AllocAndCopy(new VkDevice.FunctionTable(Handle, (VkGetDeviceProcAddr)getDeviceProcAddr)); + } + + /// + /// vkGetDeviceQueue - Get a queue from a device + /// + /// is the index of the queue family to which the queue belongs. + /// is the index within this queue family of the queue to retrieve. + /// Queue object wrapping a QueueHandle + public Queue GetQueue(int queueFamilyIndex, int queueIndex) + { + var tuple = (queueFamilyIndex, queueIndex); + + if (!_queues.TryGetValue(tuple, out var queue)) + { + queue = new Queue(this, queueFamilyIndex, queueIndex); + _queues.Add(tuple, queue); + } + + return queue; + } + + // Detection only, never touch native handles from the finalizer. Mirrors the Instance warning. + ~Device() + { + try + { + Vulkan.Log.Warning("Device was not disposed. Native resources leaked; call Dispose()."); + } + catch + { + // Logging may be torn down during process exit + } + } + + public virtual void Dispose() + { + this.DestroyDeviceInternal(_vkAllocator); + if (_pInvoke.IsNotNull()) + Mem.Free(_pInvoke); + GC.SuppressFinalize(this); + } + + internal readonly Ptr _pInvoke; + public VkDevice Handle { get; init; } + public ref VkDevice.FunctionTable PInvoke => ref _pInvoke.Value; + + public bool IsNull() => Handle.IsNull(); + + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkDevice(Device device) => device.Handle; +} diff --git a/Brutal.Vulkan/Manual/Classes/Instance.cs b/Brutal.Vulkan/Manual/Classes/Instance.cs new file mode 100644 index 0000000..32aa8a2 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/Instance.cs @@ -0,0 +1,169 @@ +namespace Brutal.VulkanApi; + +public struct VkEmptyTable { } + +/// +/// Class that wraps a Vulkan Instance handle. +/// +public class Instance : VulkanHandleWrapper, IDisposable +{ + public unsafe ref struct CreateInfo + { + public VkApplicationInfo AppInfo; + public VkInstanceCreateFlags Flags; + public HashSet EnabledExtensions; + public HashSet EnabledLayers; + public void* Next; + public VkAllocator? Allocator; + } + + public readonly PhysicalDevice[] PhysicalDevices; + + internal unsafe Instance(CreateInfo createInfo) + { + var instanceCreateInfo = new VkInstanceCreateInfo + { + ApplicationInfo = &createInfo.AppInfo, + Flags = createInfo.Flags, + EnabledExtensionCount = createInfo.EnabledExtensions.Count, + EnabledLayerCount = createInfo.EnabledLayers.Count, + Next = createInfo.Next, + }; + + _enabledExtensions = createInfo.EnabledExtensions; + _enabledLayers = createInfo.EnabledLayers; + + var totalByteCount = 0; + Span lengths = stackalloc int[createInfo.EnabledExtensions.Count + createInfo.EnabledLayers.Count]; + var ptrs = stackalloc byte*[createInfo.EnabledExtensions.Count + createInfo.EnabledLayers.Count]; + + instanceCreateInfo.ppEnabledExtensionNames = ptrs; + instanceCreateInfo.ppEnabledLayerNames = ptrs + createInfo.EnabledExtensions.Count; + + // Calculate total byte count and individual lengths for each extension and layer + var i = 0; + foreach (var extension in createInfo.EnabledExtensions) + { + lengths[i] = Utf8.GetByteCount(extension) + 1; // +1 for null terminator + totalByteCount += lengths[i]; + i++; + } + + foreach (var layer in createInfo.EnabledLayers) + { + lengths[i] = Utf8.GetByteCount(layer) + 1; // +1 for null terminator + totalByteCount += lengths[i]; + i++; + } + + Span allBytes = stackalloc byte[totalByteCount]; + + // Allocate memory for all extension strings and their pointers + var writePtr = allBytes; + + // Fill the pointers and copy the strings into the allocated memory + i = 0; + foreach (var extension in createInfo.EnabledExtensions) + { + if (!Utf8.TryGetBytes(extension, writePtr, out var bytes)) + throw new Exception("Failed to encode extension name to UTF-8"); + + ptrs[i] = writePtr.AsPointer(); + writePtr[bytes] = 0; // Null-terminate the string + writePtr = writePtr[(bytes + 1)..]; + i++; + } + + foreach (var layer in createInfo.EnabledLayers) + { + if (!Utf8.TryGetBytes(layer, writePtr, out var bytes)) + throw new Exception("Failed to encode layer name to UTF-8"); + + ptrs[i] = writePtr.AsPointer(); + writePtr[bytes] = 0; // Null-terminate the string + writePtr = writePtr[(bytes + 1)..]; + i++; + } + + Handle = Vulkan.CreateInstanceInternal(instanceCreateInfo, createInfo.Allocator); + + _pInvoke = Mem.AllocAndCopy(new VkInstance.FunctionTable(Handle, Vulkan.GetInstanceProcAddr)); + + _allocator = createInfo.Allocator; + + PhysicalDevices = new PhysicalDevice[this.EnumeratePhysicalDevicesInternal_Count()]; + fixed (VkPhysicalDevice* physicalDevices = stackalloc VkPhysicalDevice[PhysicalDevices.Length]) + { + this.EnumeratePhysicalDevicesInternal_Write( + new Span(physicalDevices, PhysicalDevices.Length) + ); + + for (var pdIndex = 0; pdIndex < PhysicalDevices.Length; pdIndex++) + PhysicalDevices[pdIndex] = new PhysicalDevice(this, physicalDevices[pdIndex]); + } + } + + // Warn about the missed Dispose() and best-effort free the native handle, guarding both since a + // finalizer must never throw and logging or native teardown may already be gone at process exit. + ~Instance() + { + try + { + Vulkan.Log.Warning( + "Instance was not disposed. Freeing native resources from the finalizer; call Dispose()." + ); + } + catch + { + // Logging may be torn down during process exit + } + + try + { + Dispose(fromFinalizer: true); + } + catch + { + // Best-effort cleanup; never let it escape the finalizer + } + } + + public bool IsNull() => Handle.IsNull(); + + /// + /// Returns true if the given extension is enabled on this instance. + /// + /// + /// + public bool IsExtensionEnabled(string inExtensionName) + { + return _enabledExtensions.Contains(inExtensionName); + } + + // Cached lookups for extensions which were enabled on instance creation + private readonly HashSet _enabledExtensions; + + // Cached lookups for layers which were enabled on instance creation + private readonly HashSet _enabledLayers; + private readonly VkAllocator? _allocator; + + public void Dispose() => Dispose(fromFinalizer: false); + + private void Dispose(bool fromFinalizer) + { + // Skip the native destroy from the finalizer with a custom allocator, its callbacks may already be freed + if (!(fromFinalizer && _allocator != null)) + this.DestroyInstanceInternal(_allocator); + if (_pInvoke.IsNotNull()) + Mem.Free(_pInvoke); + GC.SuppressFinalize(this); + } + + private readonly Ptr _pInvoke; + public VkInstance Handle { get; init; } + public ref VkInstance.FunctionTable PInvoke => ref _pInvoke.Value; + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkInstance(Instance instance) => instance.Handle; +} diff --git a/Brutal.Vulkan/Manual/Classes/PhysicalDevice.cs b/Brutal.Vulkan/Manual/Classes/PhysicalDevice.cs new file mode 100644 index 0000000..3d8bee8 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/PhysicalDevice.cs @@ -0,0 +1,214 @@ +using System.Numerics; + +namespace Brutal.VulkanApi; + +/// +/// Class that wraps a Vulkan PhysicalDevice handle. +/// +public class PhysicalDevice : VulkanHandleWrapper +{ + /// + /// The Instance that this physical device was created from. + /// + public Instance Instance { get; } + + /// + /// Cached PhysicalDevice ExtensionNames. + /// + /// + /// Prefer for lookups: this property + /// materializes a managed string per supported extension (200+ on modern drivers), whereas + /// the byte-span lookup avoids all string allocation. + /// + public HashSet ExtensionNames + { + get + { + if (_extensionNames == null) + { + var utf8 = ExtensionNamesUtf8; + _extensionNames = new HashSet(utf8.Length); + foreach (var name in utf8) + _extensionNames.Add(Utf8.GetString(name)); + } + return _extensionNames; + } + } + private HashSet? _extensionNames; + + /// + /// Supported extension names as raw UTF-8 bytes (trimmed to the null terminator), enumerated + /// once on first access. Backs the allocation-free extension lookups. + /// + private byte[][] ExtensionNamesUtf8 + { + get + { + if (_extensionNamesUtf8 == null) + { + ReadOnlySpan extensionProperties = + stackalloc VkExtensionProperties[this.EnumerateDeviceExtensionProperties_Count([])]; + var result = this.EnumerateDeviceExtensionProperties_Write([], extensionProperties); + if (result != VkResult.Success) + throw new InvalidOperationException("Failed to enumerate device extension properties: " + result); + + var names = new byte[extensionProperties.Length][]; + for (var i = 0; i < extensionProperties.Length; i++) + { + unsafe + { + fixed (byte* name = extensionProperties[i].ExtensionName) + names[i] = Utf8.GetNullTerminatedSpan(name).ToArray(); + } + } + _extensionNamesUtf8 = names; + } + return _extensionNamesUtf8; + } + } + private byte[][]? _extensionNamesUtf8; + + internal PhysicalDevice(Instance inInstance, VkPhysicalDevice inHandle) + { + Handle = inHandle; + Instance = inInstance; + } + + /// + /// Naively returns the index of the first queue family which has the given VkQueueFlag, or -1 if no family is found + /// + public int GetFirstQueueFamilyWithFlag(VkQueueFlags flag) + { + using var properties = SpanOwner.Allocate(this.GetQueueFamilyProperties_Count()); + this.GetQueueFamilyProperties_Write(properties.Span); + + for (var i = 0; i < properties.Length; ++i) + if (properties.Span[i].QueueFlags.HasFlag(flag)) + return i; + + return -1; + } + + /// + /// Searches for the first memory type index that satisfies both the specified memory type filter and required property flags. + /// + /// A bitmask representing the candidate memory types. + /// The memory property flags that must be present. + /// The index of the first suitable memory type. + /// Thrown if no memory type meets the required criteria. + public int FindMemoryType(int memoryTypeFilter, VkMemoryPropertyFlags requiredProperties) + { + var memoryProperties = this.GetMemoryProperties(); + var memoryTypeCount = memoryProperties.MemoryTypeCount; + + for (var i = 0; i < memoryTypeCount; i++) + { + var memoryTypeBits = 1 << i; + var isRequiredMemoryType = (memoryTypeFilter & memoryTypeBits) != 0; + + if (!isRequiredMemoryType) + continue; + + var properties = memoryProperties.MemoryTypes[i].PropertyFlags; + var hasRequiredProperties = (properties & requiredProperties) == requiredProperties; + + if (hasRequiredProperties) + return i; + } + + throw new Exception("failed to find suitable memory type!"); + } + + /// + /// Searches for the first memory type index that satisfies both the specified memory type filter and required property flags. + /// + /// A bitmask representing the candidate memory types. + /// The memory property flags that must be present. + /// Memory property flags that are preferred, and will be prioritized + /// The index of the first suitable memory type. + /// Thrown if no memory type meets the required criteria. + public int FindMemoryType( + int memoryTypeFilter, + VkMemoryPropertyFlags requiredProperties, + VkMemoryPropertyFlags preferredProperties + ) + { + var memoryProperties = this.GetMemoryProperties(); + var memoryTypeCount = memoryProperties.MemoryTypeCount; + + int bestHits = 0; + int bestCandidate = -1; + for (var i = 0; i < memoryTypeCount; i++) + { + var memoryTypeBits = 1 << i; + var isRequiredMemoryType = (memoryTypeFilter & memoryTypeBits) != 0; + + if (!isRequiredMemoryType) + continue; + + var properties = memoryProperties.MemoryTypes[i].PropertyFlags; + var hasRequiredProperties = (properties & requiredProperties) == requiredProperties; + if (!hasRequiredProperties) + continue; + var prefMatch = (properties & preferredProperties); + // perfect candidate + if (prefMatch == preferredProperties) + return i; + // sort imperfect candidate by most preferredProperties flag hits + int hits = BitOperations.PopCount((ulong)prefMatch); + if (hits > bestHits) + { + bestCandidate = i; + bestHits = hits; + } + } + + if (bestCandidate == -1) + throw new Exception("failed to find suitable memory type!"); + return bestCandidate; + } + + /// + /// Determines if the physical device supports a given extension, without allocating a string. + /// + /// The extension name as UTF-8 bytes, e.g. a "VK_KHR_swapchain"u8 literal. + public bool SupportsExtension(ReadOnlySpan utf8Name) + { + foreach (var name in ExtensionNamesUtf8) + if (utf8Name.SequenceEqual(name)) + return true; + return false; + } + + /// + /// Determines if the physical device supports a given extension. + /// + /// + /// Answers from so it stays consistent with that mutable set and + /// with the pre-existing behaviour. This materializes the managed string set on first use; + /// prefer on hot paths to avoid the allocation. + /// + public bool SupportsExtension(string extension) + { + return ExtensionNames.Contains(extension); + } + + /// + /// vkCreateDevice - Create a new device instance + /// + /// Device object wrapping a DeviceHandle + public Device CreateDevice(Device.CreateInfo createInfo) + { + return new Device(this, createInfo); + } + + public VkPhysicalDevice Handle { get; init; } + public ref VkInstance.FunctionTable PInvoke => ref Instance.PInvoke; + + public bool IsNull() => Handle.IsNull(); + + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkPhysicalDevice(PhysicalDevice physicalDevice) => physicalDevice.Handle; +} diff --git a/Brutal.Vulkan/Manual/Classes/Queue.cs b/Brutal.Vulkan/Manual/Classes/Queue.cs new file mode 100644 index 0000000..4e54d5a --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/Queue.cs @@ -0,0 +1,106 @@ +namespace Brutal.VulkanApi; + +/// +/// Class that wraps a Vulkan Queue handle. +/// +public class Queue : VulkanHandleWrapper +{ + /// + /// The family index of this queue. + /// + public int Family { get; } + + /// + /// The index of this queue within the family. + /// + public int Index { get; } + + public Device Device { get; init; } + + internal Queue(Device device, int family, int index) + { + Handle = device.GetQueueInternal(family, index); + Family = family; + Index = index; + Device = device; + } + + public VkQueue Handle { get; init; } + public ref VkDevice.FunctionTable PInvoke => ref Device.PInvoke; + + private VulkanHandleWrapper AsWrapper() => this; + + public void WaitIdle() + { + lock (_lock) + { + AsWrapper().WaitIdleInternal(); + } + } + + public void BindSparse(ReadOnlySpan inBindInfo, VkFence inFence) + { + lock (_lock) + { + AsWrapper().BindSparseInternal(inBindInfo, inFence); + } + } + + public void BeginDebugUtilsLabelEXT(VkDebugUtilsLabelEXT inLabelInfo) + { + lock (_lock) + { + AsWrapper().BeginDebugUtilsLabelEXTInternal(inLabelInfo); + } + } + + public void EndDebugUtilsLabelEXT() + { + lock (_lock) + { + AsWrapper().EndDebugUtilsLabelEXTInternal(); + } + } + + public void InsertDebugUtilsLabelEXT(VkDebugUtilsLabelEXT inLabelInfo) + { + lock (_lock) + { + AsWrapper().InsertDebugUtilsLabelEXTInternal(inLabelInfo); + } + } + + public void Submit(Span inSubmits, VkFence inFence) + { + lock (_lock) + { + AsWrapper().SubmitInternal(inSubmits, inFence); + } + } + + public void Submit2(Span inSubmits, VkFence inFence) + { + lock (_lock) + { + AsWrapper().Submit2Internal(inSubmits, inFence); + } + } + + public VkResult PresentKHR(VkPresentInfoKHR inPresentInfo) + { + lock (_lock) + { + return AsWrapper().PresentKHRInternal(inPresentInfo); + } + } + + // Lock to ensure that only one thread is submitting at a time. + private readonly Lock _lock = new(); + + public bool IsNull() => Handle.IsNull(); + + public VkObjectType VkObjectType => Handle.VkObjectType; + public IntPtr VkHandle => Handle.VkHandle; + + public static implicit operator VkQueue(Queue queue) => queue.Handle; +} diff --git a/Brutal.Vulkan/Manual/Classes/VkAllocator.cs b/Brutal.Vulkan/Manual/Classes/VkAllocator.cs new file mode 100644 index 0000000..c35cf77 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/VkAllocator.cs @@ -0,0 +1,13 @@ +namespace Brutal.VulkanApi; + +public class VkAllocator(VkAllocationCallbacks callbacks) : IDisposable +{ + PtrOwner ptr = new(callbacks); + + public static unsafe implicit operator VkAllocationCallbacks*(VkAllocator? allocator) => allocator?.ptr ?? null; + + public void Dispose() + { + ptr.Dispose(); + } +} diff --git a/Brutal.Vulkan/Manual/Classes/VkResultError.cs b/Brutal.Vulkan/Manual/Classes/VkResultError.cs new file mode 100644 index 0000000..adbdec8 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/VkResultError.cs @@ -0,0 +1,12 @@ +namespace Brutal.VulkanApi; + +public class VkResultError : Exception +{ + public VkResult Result { get; } + + public VkResultError(VkResult result, string message) + : base(message) + { + Result = result; + } +} diff --git a/Brutal.Vulkan/Manual/Classes/VulkanHandleWrapper.cs b/Brutal.Vulkan/Manual/Classes/VulkanHandleWrapper.cs new file mode 100644 index 0000000..bd00f99 --- /dev/null +++ b/Brutal.Vulkan/Manual/Classes/VulkanHandleWrapper.cs @@ -0,0 +1,9 @@ +namespace Brutal.VulkanApi; + +public interface VulkanHandleWrapper : IVulkanHandle + where THandleType : unmanaged, IVulkanHandle + where TFunctionTable : unmanaged +{ + internal THandleType Handle { get; init; } + public ref TFunctionTable PInvoke { get; } +} diff --git a/Brutal.Vulkan/Manual/Constants/VK.cs b/Brutal.Vulkan/Manual/Constants/VK.cs new file mode 100644 index 0000000..a65fa7d --- /dev/null +++ b/Brutal.Vulkan/Manual/Constants/VK.cs @@ -0,0 +1,16 @@ +namespace Brutal.VulkanApi; + +public static partial class VK +{ + public static readonly ByteSize WHOLE_SIZE = ByteSize.Of(unchecked((int)(~0UL))); + + // #define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ + // ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) + private const int STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 = 1 << 22; + private const int STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 = 1 << 22; + private const int STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 = 1 << 22; + private const int STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 = 1 << 22; + private const int STD_VULKAN_VIDEO_CODEC_VP9_DECODE_API_VERSION_1_0_0 = 1 << 22; + private const int STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 = 1 << 22; + private const int STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 = 1 << 22; +} diff --git a/Brutal.Vulkan/Manual/Interfaces/IVulkanHandle.cs b/Brutal.Vulkan/Manual/Interfaces/IVulkanHandle.cs new file mode 100644 index 0000000..362d664 --- /dev/null +++ b/Brutal.Vulkan/Manual/Interfaces/IVulkanHandle.cs @@ -0,0 +1,17 @@ +namespace Brutal.VulkanApi; + +/// +/// Interface for Vulkan handles. +/// +public interface IVulkanHandle : INullable +{ + /// + /// Gets the Vulkan object type of the handle. + /// + public VkObjectType VkObjectType { get; } + + /// + /// Gets the handle value. + /// + public nint VkHandle { get; } +} diff --git a/Brutal.Vulkan/Manual/Partials/VK.cs b/Brutal.Vulkan/Manual/Partials/VK.cs new file mode 100644 index 0000000..6937a93 --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VK.cs @@ -0,0 +1,9 @@ +namespace Brutal.VulkanApi; + +public static partial class VK +{ + public const string LAYER_KHRONOS_VALIDATION = "VK_LAYER_KHRONOS_validation"; + + // UTF-8 spelling of the same layer name for allocation-free byte comparisons + public static ReadOnlySpan LAYER_KHRONOS_VALIDATION_UTF8 => "VK_LAYER_KHRONOS_validation"u8; +} diff --git a/Brutal.Vulkan/Manual/Partials/VkClearValue.cs b/Brutal.Vulkan/Manual/Partials/VkClearValue.cs new file mode 100644 index 0000000..e37dd3f --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VkClearValue.cs @@ -0,0 +1,9 @@ +namespace Brutal.VulkanApi; + +public partial struct VkClearValue +{ + public static implicit operator VkClearValue(VkClearColorValue color) => new VkClearValue { Color = color }; + + public static implicit operator VkClearValue(VkClearDepthStencilValue depthStencil) => + new VkClearValue { DepthStencil = depthStencil }; +} diff --git a/Brutal.Vulkan/Manual/Partials/VkExtent2D.cs b/Brutal.Vulkan/Manual/Partials/VkExtent2D.cs new file mode 100644 index 0000000..3b6a5ba --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VkExtent2D.cs @@ -0,0 +1,11 @@ +namespace Brutal.VulkanApi; + +public partial struct VkExtent2D +{ + public VkExtent2D(int width, int height) + : this() + { + Width = width; + Height = height; + } +} diff --git a/Brutal.Vulkan/Manual/Partials/VkExtent3D.cs b/Brutal.Vulkan/Manual/Partials/VkExtent3D.cs new file mode 100644 index 0000000..2a52571 --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VkExtent3D.cs @@ -0,0 +1,12 @@ +namespace Brutal.VulkanApi; + +public partial struct VkExtent3D +{ + public VkExtent3D(int width, int height, int depth) + : this() + { + Width = width; + Height = height; + Depth = depth; + } +} diff --git a/Brutal.Vulkan/Manual/Partials/VkOffset2D.cs b/Brutal.Vulkan/Manual/Partials/VkOffset2D.cs new file mode 100644 index 0000000..3f922d7 --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VkOffset2D.cs @@ -0,0 +1,11 @@ +namespace Brutal.VulkanApi; + +public partial struct VkOffset2D +{ + public VkOffset2D(int x, int y) + : this() + { + X = x; + Y = y; + } +} diff --git a/Brutal.Vulkan/Manual/Partials/VkOffset3D.cs b/Brutal.Vulkan/Manual/Partials/VkOffset3D.cs new file mode 100644 index 0000000..398f5ca --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VkOffset3D.cs @@ -0,0 +1,12 @@ +namespace Brutal.VulkanApi; + +public partial struct VkOffset3D +{ + public VkOffset3D(int x, int y, int z) + : this() + { + X = x; + Y = y; + Z = z; + } +} diff --git a/Brutal.Vulkan/Manual/Partials/VkRect2D.cs b/Brutal.Vulkan/Manual/Partials/VkRect2D.cs new file mode 100644 index 0000000..f749a0b --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/VkRect2D.cs @@ -0,0 +1,18 @@ +namespace Brutal.VulkanApi; + +public partial struct VkRect2D +{ + public VkRect2D(VkExtent2D extent) + : this() + { + Offset = new VkOffset2D(0, 0); + Extent = extent; + } + + public VkRect2D(int width, int height) + : this() + { + Offset = new VkOffset2D(0, 0); + Extent = new VkExtent2D(width, height); + } +} diff --git a/Brutal.Vulkan/Manual/Partials/Vulkan.cs b/Brutal.Vulkan/Manual/Partials/Vulkan.cs new file mode 100644 index 0000000..ab444f4 --- /dev/null +++ b/Brutal.Vulkan/Manual/Partials/Vulkan.cs @@ -0,0 +1,14 @@ +namespace Brutal.VulkanApi; + +public static partial class Vulkan +{ + public static LogCategory Log = LogCategory.Make("Vulkan"); + + /// + /// Assembles the input parameters into a VkInstanceCreateInfo struct and uses it to create an instance + /// + public static Instance CreateInstance(Instance.CreateInfo createInfo) + { + return new Instance(createInfo); + } +} diff --git a/Brutal.Vulkan/Manual/Structs/VkDeviceAddress.cs b/Brutal.Vulkan/Manual/Structs/VkDeviceAddress.cs new file mode 100644 index 0000000..8be7f42 --- /dev/null +++ b/Brutal.Vulkan/Manual/Structs/VkDeviceAddress.cs @@ -0,0 +1,6 @@ +namespace Brutal.VulkanApi; + +public readonly record struct VkDeviceAddress(ulong Value) +{ + public static implicit operator VkDeviceAddress(int value) => new VkDeviceAddress((ulong)value); +} diff --git a/Brutal.Vulkan/Manual/Structs/VkFlags.cs b/Brutal.Vulkan/Manual/Structs/VkFlags.cs new file mode 100644 index 0000000..52ea844 --- /dev/null +++ b/Brutal.Vulkan/Manual/Structs/VkFlags.cs @@ -0,0 +1,6 @@ +namespace Brutal.VulkanApi; + +public readonly record struct VkFlags(uint Value) +{ + public static implicit operator VkFlags(int value) => new VkFlags((uint)value); +} diff --git a/Brutal.Vulkan/Manual/Structs/VkFlags64.cs b/Brutal.Vulkan/Manual/Structs/VkFlags64.cs new file mode 100644 index 0000000..a114a59 --- /dev/null +++ b/Brutal.Vulkan/Manual/Structs/VkFlags64.cs @@ -0,0 +1,6 @@ +namespace Brutal.VulkanApi; + +public readonly record struct VkFlags64(ulong Value) +{ + public static implicit operator VkFlags64(int value) => new VkFlags64((ulong)value); +} diff --git a/Brutal.Vulkan/Manual/Structs/VkRemoteAddressNV.cs b/Brutal.Vulkan/Manual/Structs/VkRemoteAddressNV.cs new file mode 100644 index 0000000..ce08115 --- /dev/null +++ b/Brutal.Vulkan/Manual/Structs/VkRemoteAddressNV.cs @@ -0,0 +1,6 @@ +namespace Brutal.VulkanApi; + +public readonly record struct VkRemoteAddressNV(nint Value) +{ + public static implicit operator VkRemoteAddressNV(int value) => new VkRemoteAddressNV((nint)value); +} diff --git a/Brutal.Vulkan/Manual/Structs/VkSampleMask.cs b/Brutal.Vulkan/Manual/Structs/VkSampleMask.cs new file mode 100644 index 0000000..92d571a --- /dev/null +++ b/Brutal.Vulkan/Manual/Structs/VkSampleMask.cs @@ -0,0 +1,6 @@ +namespace Brutal.VulkanApi; + +public readonly record struct VkSampleMask(uint Value) +{ + public static implicit operator VkSampleMask(int value) => new VkSampleMask((uint)value); +} diff --git a/Brutal.Vulkan/Manual/Structs/VkTransformMatrixKHR.cs b/Brutal.Vulkan/Manual/Structs/VkTransformMatrixKHR.cs new file mode 100644 index 0000000..a312c1b --- /dev/null +++ b/Brutal.Vulkan/Manual/Structs/VkTransformMatrixKHR.cs @@ -0,0 +1,26 @@ +namespace Brutal.VulkanApi; + +/// +/// VkTransformMatrixKHR - Structure specifying a 3x4 affine transformation matrix +/// +/// +/// +/// :refpage: VkTransformMatrixKHR +/// +/// +/// The VkTransformMatrixKHR structure is defined as: +/// +/// +/// // Provided by VK_KHR_acceleration_structure +/// typedef struct VkTransformMatrixKHR { +/// float matrix[3][4]; +/// } VkTransformMatrixKHR; +/// +/// +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public struct VkTransformMatrixKHR +{ + public float4 X; + public float4 Y; + public float4 Z; +} diff --git a/Brutal.ZLib/LICENSES/BRUTAL-ZLIB-THIRD-PARTY-NOTICES.txt b/Brutal.ZLib/LICENSES/BRUTAL-ZLIB-THIRD-PARTY-NOTICES.txt new file mode 100644 index 0000000..01a53d2 --- /dev/null +++ b/Brutal.ZLib/LICENSES/BRUTAL-ZLIB-THIRD-PARTY-NOTICES.txt @@ -0,0 +1,51 @@ +THIRD-PARTY LICENSE NOTICES +RocketWerkz.Brutal.ZLib + +This package ships one third-party component, zlib, as native libraries and as its +public C headers in source form. The license governing it is reproduced in full below. + + +============================================================================== +zlib +============================================================================== + + Name zlib, a general purpose data compression library + Version 1.3.2.1-motley + built from upstream commit e3dc0a85b7032e98380dec011bc8f2c2ee0d8fca + (v1.3.2-85-ge3dc0a8) + Upstream https://zlib.net -- https://github.com/madler/zlib + SPDX Zlib + Shipped as zlib.dll (win-x64); libzlib.so, libzlib.so.1 and libzlib.so.1.3.2.1 + (linux-x64); libzlib.dylib, libzlib.1.dylib and libzlib.1.3.2.1.dylib + (osx-arm64); the public C headers zlib.h and zconf.h in source form; + and the Windows import library zlib.lib + + Built from unaltered upstream source. The build names the output library zlib on all + three platforms, where an upstream build produces z on Linux and macOS; no source is + changed. + + Acknowledgement, as invited by the first condition below: + + This software is based in part on the work of Jean-loup Gailly and Mark Adler, + the authors of the zlib general purpose compression library (https://zlib.net). + + Copyright (C) 1995-2026 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu